feat: migrate Select with field, collection and SSR contracts

This commit is contained in:
maoyingjie
2026-10-23 22:05:44 +08:00
parent 65db60a7ac
commit 2b569451b6
52 changed files with 4172 additions and 33 deletions
+34
View File
@@ -1298,3 +1298,37 @@ export const listboxSectionVariants = tv({ base: "hv-list-box-section" });
export type ListBoxSectionVariants = VariantProps<
typeof listboxSectionVariants
>;
export const selectVariants = tv({
defaultVariants: {
fullWidth: false,
variant: "primary",
},
slots: {
base: "hv-select",
clearButton: "hv-select__clear-button",
indicator: "hv-select__indicator",
popover: "hv-select__popover",
trigger: "hv-select__trigger",
value: "hv-select__value",
},
variants: {
fullWidth: {
false: {},
true: {
base: "hv-select--full-width",
trigger: "hv-select__trigger--full-width",
},
},
variant: {
primary: {
base: "hv-select--primary",
},
secondary: {
base: "hv-select--secondary",
},
},
},
});
export type SelectVariants = VariantProps<typeof selectVariants>;