@dalexto/lexsys-registry 0.0.2 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/index.js +53 -52
- package/dist/items/empty.d.ts +7 -0
- package/dist/items/index.d.ts +2 -0
- package/dist/items/table.d.ts +7 -0
- package/dist/registry.types.d.ts +0 -1
- package/package.json +1 -1
- package/templates/blocks/AuthForm/AuthForm.tsx +3 -3
- package/templates/blocks/AuthForm/AuthForm.variants.ts +3 -3
- package/templates/blocks/CommandPalette/CommandPalette.tsx +14 -14
- package/templates/blocks/CommandPalette/CommandPalette.types.ts +3 -9
- package/templates/blocks/CommandPalette/CommandPalette.variants.ts +13 -14
- package/templates/blocks/Empty/Empty.tsx +91 -0
- package/templates/blocks/Empty/Empty.types.ts +8 -0
- package/templates/blocks/Empty/Empty.variants.ts +51 -0
- package/templates/blocks/FormField/FormField.tsx +2 -6
- package/templates/blocks/FormField/FormField.variants.ts +2 -2
- package/templates/blocks/SettingsPanel/SettingsPanel.tsx +2 -2
- package/templates/blocks/SettingsPanel/SettingsPanel.variants.ts +2 -2
- package/templates/blocks/Sidebar/Sidebar.tsx +45 -85
- package/templates/blocks/Sidebar/Sidebar.types.ts +2 -7
- package/templates/blocks/Sidebar/Sidebar.variants.ts +36 -40
- package/templates/primitives/Accordion/Accordion.variants.ts +7 -7
- package/templates/primitives/Alert/Alert.variants.ts +7 -7
- package/templates/primitives/AlertDialog/AlertDialog.variants.ts +16 -16
- package/templates/primitives/Autocomplete/Autocomplete.variants.ts +49 -49
- package/templates/primitives/Avatar/Avatar.variants.ts +10 -10
- package/templates/primitives/Badge/Badge.variants.ts +14 -14
- package/templates/primitives/Button/Button.variants.ts +26 -26
- package/templates/primitives/Card/Card.tsx +19 -1
- package/templates/primitives/Card/Card.types.ts +1 -0
- package/templates/primitives/Card/Card.variants.ts +14 -11
- package/templates/primitives/Checkbox/Checkbox.variants.ts +11 -15
- package/templates/primitives/CheckboxGroup/CheckboxGroup.variants.ts +2 -2
- package/templates/primitives/Collapsible/Collapsible.variants.ts +10 -10
- package/templates/primitives/Combobox/Combobox.variants.ts +58 -58
- package/templates/primitives/ContextMenu/ContextMenu.variants.ts +1 -1
- package/templates/primitives/Dialog/Dialog.variants.ts +16 -16
- package/templates/primitives/Drawer/Drawer.types.ts +3 -1
- package/templates/primitives/Drawer/Drawer.variants.ts +37 -37
- package/templates/primitives/Field/Field.variants.ts +22 -22
- package/templates/primitives/Fieldset/Fieldset.variants.ts +8 -8
- package/templates/primitives/Form/Form.variants.ts +1 -1
- package/templates/primitives/Input/Input.variants.ts +11 -11
- package/templates/primitives/Menu/Menu.variants.ts +25 -25
- package/templates/primitives/Menubar/Menubar.variants.ts +1 -1
- package/templates/primitives/Meter/Meter.variants.ts +11 -11
- package/templates/primitives/NavigationMenu/NavigationMenu.variants.ts +2 -2
- package/templates/primitives/NumberField/NumberField.variants.ts +25 -25
- package/templates/primitives/OtpField/OtpField.variants.ts +12 -12
- package/templates/primitives/Popover/Popover.variants.ts +18 -20
- package/templates/primitives/PreviewCard/PreviewCard.variants.ts +1 -1
- package/templates/primitives/Progress/Progress.variants.ts +8 -8
- package/templates/primitives/RadioGroup/RadioGroup.variants.ts +14 -14
- package/templates/primitives/ScrollArea/ScrollArea.variants.ts +3 -3
- package/templates/primitives/Select/Select.tsx +29 -29
- package/templates/primitives/Select/Select.types.ts +4 -4
- package/templates/primitives/Select/Select.variants.ts +44 -59
- package/templates/primitives/Separator/Separator.variants.ts +3 -3
- package/templates/primitives/Slider/Slider.tsx +14 -14
- package/templates/primitives/Slider/Slider.variants.ts +17 -26
- package/templates/primitives/Switch/Switch.types.ts +2 -2
- package/templates/primitives/Switch/Switch.variants.ts +13 -13
- package/templates/primitives/Table/Table.tsx +121 -0
- package/templates/primitives/Table/Table.types.ts +68 -0
- package/templates/primitives/Table/Table.variants.ts +51 -0
- package/templates/primitives/Tabs/Tabs.variants.ts +8 -8
- package/templates/primitives/Textarea/Textarea.variants.ts +11 -11
- package/templates/primitives/Toast/Toast.variants.ts +20 -20
- package/templates/primitives/Toggle/Toggle.variants.ts +9 -9
- package/templates/primitives/ToggleGroup/ToggleGroup.variants.ts +5 -5
- package/templates/primitives/Toolbar/Toolbar.variants.ts +18 -18
- package/templates/primitives/Tooltip/Tooltip.variants.ts +5 -5
- package/templates/styles/theme.css +301 -299
- package/templates/styles/tokens.css +1495 -1441
- package/templates/templates/DashboardShell/DashboardShell.tsx +10 -10
- package/templates/templates/DashboardShell/DashboardShell.variants.ts +10 -10
|
@@ -8,22 +8,22 @@ import { cva } from "class-variance-authority"
|
|
|
8
8
|
import { disabledStateClasses } from "@/lib/utils"
|
|
9
9
|
|
|
10
10
|
export const numberFieldVariants = cva(
|
|
11
|
-
"grid gap-(--
|
|
11
|
+
"grid gap-(--lex-number-field-gap) text-(--lex-number-field-foreground) data-[disabled]:opacity-(--lex-opacity-disabled)",
|
|
12
12
|
)
|
|
13
13
|
|
|
14
14
|
export const numberFieldGroupVariants = cva(
|
|
15
15
|
[
|
|
16
|
-
"inline-flex w-full min-w-0 items-stretch overflow-hidden rounded-(--
|
|
17
|
-
"border border-(--
|
|
18
|
-
"transition-colors duration-(--
|
|
19
|
-
"data-[disabled]:cursor-not-allowed data-[disabled]:opacity-(--
|
|
16
|
+
"inline-flex w-full min-w-0 items-stretch overflow-hidden rounded-(--lex-number-field-radius)",
|
|
17
|
+
"border border-(--lex-number-field-border-color) bg-(--lex-number-field-background)",
|
|
18
|
+
"transition-colors duration-(--lex-number-field-transition-duration) ease-(--lex-number-field-transition-easing)",
|
|
19
|
+
"data-[disabled]:cursor-not-allowed data-[disabled]:opacity-(--lex-opacity-disabled)",
|
|
20
20
|
].join(" "),
|
|
21
21
|
{
|
|
22
22
|
variants: {
|
|
23
23
|
size: {
|
|
24
|
-
sm: "h-(--
|
|
25
|
-
md: "h-(--
|
|
26
|
-
lg: "h-(--
|
|
24
|
+
sm: "h-(--lex-number-field-height-sm)",
|
|
25
|
+
md: "h-(--lex-number-field-height-md)",
|
|
26
|
+
lg: "h-(--lex-number-field-height-lg)",
|
|
27
27
|
},
|
|
28
28
|
},
|
|
29
29
|
defaultVariants: {
|
|
@@ -34,19 +34,19 @@ export const numberFieldGroupVariants = cva(
|
|
|
34
34
|
|
|
35
35
|
export const numberFieldInputVariants = cva(
|
|
36
36
|
[
|
|
37
|
-
"min-w-0 flex-1 border-0 bg-transparent text-(--
|
|
38
|
-
"font-(family-name:--
|
|
39
|
-
"placeholder:text-(--
|
|
40
|
-
"outline-none focus-visible:ring-(length:--
|
|
41
|
-
"aria-invalid:ring-(length:--
|
|
37
|
+
"min-w-0 flex-1 border-0 bg-transparent text-(--lex-number-field-input-foreground)",
|
|
38
|
+
"font-(family-name:--lex-number-field-input-font-family) font-(--lex-number-field-input-font-weight) leading-(--lex-number-field-input-font-line-height) tracking-(--lex-number-field-input-font-letter-spacing)",
|
|
39
|
+
"placeholder:text-(--lex-number-field-input-placeholder-color)",
|
|
40
|
+
"outline-none focus-visible:ring-(length:--lex-number-field-focus-ring-width) focus-visible:ring-inset focus-visible:ring-(--lex-number-field-focus-ring-color)",
|
|
41
|
+
"aria-invalid:ring-(length:--lex-number-field-invalid-ring-width) aria-invalid:ring-inset aria-invalid:ring-(--lex-number-field-invalid-ring-color) data-[invalid]:ring-(length:--lex-number-field-invalid-ring-width) data-[invalid]:ring-inset data-[invalid]:ring-(--lex-number-field-invalid-ring-color)",
|
|
42
42
|
"disabled:cursor-not-allowed data-[disabled]:cursor-not-allowed",
|
|
43
43
|
].join(" "),
|
|
44
44
|
{
|
|
45
45
|
variants: {
|
|
46
46
|
size: {
|
|
47
|
-
sm: "px-(--
|
|
48
|
-
md: "px-(--
|
|
49
|
-
lg: "px-(--
|
|
47
|
+
sm: "px-(--lex-number-field-input-padding-x-sm) text-(length:--lex-number-field-input-font-size-sm)",
|
|
48
|
+
md: "px-(--lex-number-field-input-padding-x-md) text-(length:--lex-number-field-input-font-size-md)",
|
|
49
|
+
lg: "px-(--lex-number-field-input-padding-x-lg) text-(length:--lex-number-field-input-font-size-lg)",
|
|
50
50
|
},
|
|
51
51
|
},
|
|
52
52
|
defaultVariants: {
|
|
@@ -57,10 +57,10 @@ export const numberFieldInputVariants = cva(
|
|
|
57
57
|
|
|
58
58
|
export const numberFieldButtonVariants = cva(
|
|
59
59
|
[
|
|
60
|
-
"inline-flex shrink-0 select-none items-center justify-center border-(--
|
|
61
|
-
"bg-(--
|
|
62
|
-
"font-(--
|
|
63
|
-
"hover:bg-(--
|
|
60
|
+
"inline-flex shrink-0 select-none items-center justify-center border-(--lex-number-field-stepper-border-color)",
|
|
61
|
+
"bg-(--lex-number-field-stepper-background) text-(--lex-number-field-stepper-foreground)",
|
|
62
|
+
"font-(--lex-number-field-stepper-font-weight) transition-colors duration-(--lex-number-field-transition-duration) ease-(--lex-number-field-transition-easing)",
|
|
63
|
+
"hover:bg-(--lex-number-field-stepper-hover-background) focus-visible:outline-none focus-visible:ring-(length:--lex-number-field-focus-ring-width) focus-visible:ring-inset focus-visible:ring-(--lex-number-field-focus-ring-color)",
|
|
64
64
|
"disabled:cursor-not-allowed",
|
|
65
65
|
disabledStateClasses,
|
|
66
66
|
].join(" "),
|
|
@@ -71,9 +71,9 @@ export const numberFieldButtonVariants = cva(
|
|
|
71
71
|
increment: "border-l",
|
|
72
72
|
},
|
|
73
73
|
size: {
|
|
74
|
-
sm: "w-(--
|
|
75
|
-
md: "w-(--
|
|
76
|
-
lg: "w-(--
|
|
74
|
+
sm: "w-(--lex-number-field-stepper-width-sm) text-(length:--lex-number-field-stepper-font-size-sm)",
|
|
75
|
+
md: "w-(--lex-number-field-stepper-width-md) text-(length:--lex-number-field-stepper-font-size-md)",
|
|
76
|
+
lg: "w-(--lex-number-field-stepper-width-lg) text-(length:--lex-number-field-stepper-font-size-lg)",
|
|
77
77
|
},
|
|
78
78
|
},
|
|
79
79
|
defaultVariants: {
|
|
@@ -84,9 +84,9 @@ export const numberFieldButtonVariants = cva(
|
|
|
84
84
|
)
|
|
85
85
|
|
|
86
86
|
export const numberFieldScrubAreaVariants = cva(
|
|
87
|
-
"w-fit cursor-ew-resize text-(length:--
|
|
87
|
+
"w-fit cursor-ew-resize text-(length:--lex-number-field-scrub-font-size) font-(--lex-number-field-scrub-font-weight) text-(--lex-number-field-scrub-foreground)",
|
|
88
88
|
)
|
|
89
89
|
|
|
90
90
|
export const numberFieldScrubAreaCursorVariants = cva(
|
|
91
|
-
"size-(--
|
|
91
|
+
"size-(--lex-number-field-scrub-cursor-size) rounded-(--lex-number-field-scrub-cursor-radius) bg-(--lex-number-field-scrub-cursor-background)",
|
|
92
92
|
)
|
|
@@ -9,19 +9,19 @@ import { disabledStateClasses, invalidStateClasses } from "@/lib/utils"
|
|
|
9
9
|
|
|
10
10
|
export const otpFieldVariants = cva(
|
|
11
11
|
[
|
|
12
|
-
"inline-flex items-center gap-(--
|
|
13
|
-
"data-[disabled]:cursor-not-allowed data-[disabled]:opacity-(--
|
|
12
|
+
"inline-flex items-center gap-(--lex-input-padding-x-sm) text-(--lex-field-foreground)",
|
|
13
|
+
"data-[disabled]:cursor-not-allowed data-[disabled]:opacity-(--lex-opacity-disabled)",
|
|
14
14
|
].join(" "),
|
|
15
15
|
)
|
|
16
16
|
|
|
17
17
|
export const otpFieldInputVariants = cva(
|
|
18
18
|
[
|
|
19
|
-
"flex shrink-0 items-center justify-center border bg-(--
|
|
20
|
-
"rounded-(--
|
|
21
|
-
"font-(family-name:--
|
|
22
|
-
"transition-colors duration-(--
|
|
23
|
-
"outline-none focus-visible:border-(--
|
|
24
|
-
"data-[filled]:border-(--
|
|
19
|
+
"flex shrink-0 items-center justify-center border bg-(--lex-input-background) text-center text-(--lex-input-foreground)",
|
|
20
|
+
"rounded-(--lex-input-radius) border-(--lex-input-border-color)",
|
|
21
|
+
"font-(family-name:--lex-input-font-family) font-(--lex-input-font-weight) leading-(--lex-input-font-line-height) tracking-(--lex-input-font-letter-spacing)",
|
|
22
|
+
"transition-colors duration-(--lex-input-transition-duration) ease-(--lex-input-transition-easing)",
|
|
23
|
+
"outline-none focus-visible:border-(--lex-input-focus-border-color) focus-visible:ring-(length:--lex-input-focus-ring-width) focus-visible:ring-(--lex-input-focus-ring-color) focus-visible:ring-offset-(length:--lex-input-focus-ring-offset) focus-visible:ring-offset-(--lex-input-focus-ring-offset-color)",
|
|
24
|
+
"data-[filled]:border-(--lex-input-focus-border-color)",
|
|
25
25
|
"disabled:cursor-not-allowed",
|
|
26
26
|
disabledStateClasses,
|
|
27
27
|
invalidStateClasses,
|
|
@@ -29,9 +29,9 @@ export const otpFieldInputVariants = cva(
|
|
|
29
29
|
{
|
|
30
30
|
variants: {
|
|
31
31
|
size: {
|
|
32
|
-
sm: "size-(--
|
|
33
|
-
md: "size-(--
|
|
34
|
-
lg: "size-(--
|
|
32
|
+
sm: "size-(--lex-input-height-sm) text-(length:--lex-input-font-size-sm)",
|
|
33
|
+
md: "size-(--lex-input-height-md) text-(length:--lex-input-font-size-md)",
|
|
34
|
+
lg: "size-(--lex-input-height-lg) text-(length:--lex-input-font-size-lg)",
|
|
35
35
|
},
|
|
36
36
|
},
|
|
37
37
|
defaultVariants: {
|
|
@@ -41,5 +41,5 @@ export const otpFieldInputVariants = cva(
|
|
|
41
41
|
)
|
|
42
42
|
|
|
43
43
|
export const otpFieldSeparatorVariants = cva(
|
|
44
|
-
"select-none text-(length:--
|
|
44
|
+
"select-none text-(length:--lex-input-font-size-md) font-(--lex-input-font-weight) text-(--lex-input-placeholder-color)",
|
|
45
45
|
)
|
|
@@ -9,60 +9,58 @@ import { disabledStateClasses } from "@/lib/utils"
|
|
|
9
9
|
|
|
10
10
|
export const popoverTriggerVariants = cva(
|
|
11
11
|
[
|
|
12
|
-
"inline-flex h-(--
|
|
13
|
-
"border border-(--
|
|
14
|
-
"text-(length:--
|
|
15
|
-
"transition-colors duration-(--
|
|
16
|
-
"outline-none hover:bg-(--
|
|
12
|
+
"inline-flex h-(--lex-popover-trigger-height) items-center justify-center rounded-(--lex-popover-trigger-radius)",
|
|
13
|
+
"border border-(--lex-popover-trigger-border-color) bg-(--lex-popover-trigger-background) px-(--lex-popover-trigger-padding-x) text-(--lex-popover-trigger-foreground)",
|
|
14
|
+
"text-(length:--lex-popover-trigger-font-size) font-(--lex-popover-trigger-font-weight) leading-(--lex-popover-trigger-font-line-height)",
|
|
15
|
+
"transition-colors duration-(--lex-popover-transition-duration) ease-(--lex-popover-transition-easing)",
|
|
16
|
+
"outline-none hover:bg-(--lex-popover-trigger-hover-background) focus-visible:ring-(length:--lex-popover-focus-ring-width) focus-visible:ring-(--lex-popover-focus-ring-color) focus-visible:ring-offset-(length:--lex-popover-focus-ring-offset) focus-visible:ring-offset-(--lex-popover-focus-ring-offset-color)",
|
|
17
17
|
disabledStateClasses,
|
|
18
18
|
].join(" "),
|
|
19
19
|
)
|
|
20
20
|
|
|
21
21
|
export const popoverBackdropVariants = cva(
|
|
22
22
|
[
|
|
23
|
-
"fixed inset-0 z-(--
|
|
23
|
+
"fixed inset-0 z-(--lex-popover-backdrop-z-index) bg-(--lex-popover-backdrop-background) opacity-(--lex-popover-backdrop-opacity)",
|
|
24
24
|
"data-[starting-style]:opacity-0 data-[ending-style]:opacity-0",
|
|
25
|
-
"transition-opacity duration-(--
|
|
25
|
+
"transition-opacity duration-(--lex-popover-transition-duration) ease-(--lex-popover-transition-easing)",
|
|
26
26
|
].join(" "),
|
|
27
27
|
)
|
|
28
28
|
|
|
29
29
|
export const popoverPositionerVariants = cva(
|
|
30
|
-
"z-(--
|
|
30
|
+
"z-(--lex-popover-positioner-z-index) outline-none data-[anchor-hidden]:hidden",
|
|
31
31
|
)
|
|
32
32
|
|
|
33
33
|
export const popoverPopupVariants = cva(
|
|
34
34
|
[
|
|
35
|
-
"grid w-[min(calc(100vw-(var(--
|
|
36
|
-
"border-(--
|
|
35
|
+
"grid w-[min(calc(100vw-(var(--lex-popover-popup-inset)*2)),var(--lex-popover-popup-max-width))] gap-(--lex-popover-popup-gap) rounded-(--lex-popover-popup-radius) border",
|
|
36
|
+
"border-(--lex-popover-popup-border-color) bg-(--lex-popover-popup-background) p-(--lex-popover-popup-padding) text-(--lex-popover-popup-foreground) shadow-(--lex-popover-popup-shadow)",
|
|
37
37
|
"outline-none data-[starting-style]:scale-95 data-[starting-style]:opacity-0 data-[ending-style]:scale-95 data-[ending-style]:opacity-0",
|
|
38
|
-
"transition-[opacity,transform] duration-(--
|
|
38
|
+
"transition-[opacity,transform] duration-(--lex-popover-transition-duration) ease-(--lex-popover-transition-easing)",
|
|
39
39
|
].join(" "),
|
|
40
40
|
)
|
|
41
41
|
|
|
42
42
|
export const popoverArrowVariants = cva(
|
|
43
43
|
[
|
|
44
|
-
"size-(--
|
|
44
|
+
"size-(--lex-popover-arrow-size) rotate-45 border border-(--lex-popover-popup-border-color) bg-(--lex-popover-popup-background)",
|
|
45
45
|
"data-[side=bottom]:-translate-y-1/2 data-[side=left]:translate-x-1/2 data-[side=right]:-translate-x-1/2 data-[side=top]:translate-y-1/2",
|
|
46
46
|
].join(" "),
|
|
47
47
|
)
|
|
48
48
|
|
|
49
49
|
export const popoverTitleVariants = cva(
|
|
50
|
-
"pr-(--
|
|
50
|
+
"pr-(--lex-popover-title-padding-end) text-(length:--lex-popover-title-font-size) font-(--lex-popover-title-font-weight) leading-(--lex-popover-title-font-line-height) text-(--lex-popover-title-foreground)",
|
|
51
51
|
)
|
|
52
52
|
|
|
53
53
|
export const popoverDescriptionVariants = cva(
|
|
54
|
-
"text-(length:--
|
|
54
|
+
"text-(length:--lex-popover-description-font-size) font-(--lex-popover-description-font-weight) leading-(--lex-popover-description-font-line-height) text-(--lex-popover-description-foreground)",
|
|
55
55
|
)
|
|
56
56
|
|
|
57
57
|
export const popoverCloseVariants = cva(
|
|
58
58
|
[
|
|
59
|
-
"absolute right-(--
|
|
60
|
-
"text-(--
|
|
61
|
-
"hover:bg-(--
|
|
59
|
+
"absolute right-(--lex-popover-close-inset) top-(--lex-popover-close-inset) inline-flex size-(--lex-popover-close-size) items-center justify-center rounded-(--lex-popover-close-radius)",
|
|
60
|
+
"text-(--lex-popover-close-foreground) outline-none transition-colors duration-(--lex-popover-transition-duration) ease-(--lex-popover-transition-easing)",
|
|
61
|
+
"hover:bg-(--lex-popover-close-hover-background) focus-visible:ring-(length:--lex-popover-focus-ring-width) focus-visible:ring-(--lex-popover-focus-ring-color) focus-visible:ring-offset-(length:--lex-popover-focus-ring-offset) focus-visible:ring-offset-(--lex-popover-focus-ring-offset-color)",
|
|
62
62
|
disabledStateClasses,
|
|
63
63
|
].join(" "),
|
|
64
64
|
)
|
|
65
65
|
|
|
66
|
-
export const popoverViewportVariants = cva(
|
|
67
|
-
"grid gap-(--lsys-popover-popup-gap)",
|
|
68
|
-
)
|
|
66
|
+
export const popoverViewportVariants = cva("grid gap-(--lex-popover-popup-gap)")
|
|
@@ -20,5 +20,5 @@ export const previewCardArrowVariants = popoverArrowVariants
|
|
|
20
20
|
export const previewCardViewportVariants = popoverViewportVariants
|
|
21
21
|
|
|
22
22
|
export const previewCardTriggerVariants = cva(
|
|
23
|
-
"inline-flex outline-none focus-visible:ring-(length:--
|
|
23
|
+
"inline-flex outline-none focus-visible:ring-(length:--lex-popover-focus-ring-width) focus-visible:ring-(--lex-popover-focus-ring-color)",
|
|
24
24
|
)
|
|
@@ -7,17 +7,17 @@
|
|
|
7
7
|
import { cva } from "class-variance-authority"
|
|
8
8
|
|
|
9
9
|
export const progressVariants = cva(
|
|
10
|
-
"grid gap-(--
|
|
10
|
+
"grid gap-(--lex-progress-gap) text-(length:--lex-progress-label-font-size) leading-(--lex-progress-label-font-line-height) text-(--lex-progress-label-foreground)",
|
|
11
11
|
)
|
|
12
12
|
|
|
13
13
|
export const progressTrackVariants = cva(
|
|
14
|
-
"overflow-hidden rounded-(--
|
|
14
|
+
"overflow-hidden rounded-(--lex-progress-track-radius) bg-(--lex-progress-track-background)",
|
|
15
15
|
{
|
|
16
16
|
variants: {
|
|
17
17
|
size: {
|
|
18
|
-
sm: "h-(--
|
|
19
|
-
md: "h-(--
|
|
20
|
-
lg: "h-(--
|
|
18
|
+
sm: "h-(--lex-progress-track-height-sm)",
|
|
19
|
+
md: "h-(--lex-progress-track-height-md)",
|
|
20
|
+
lg: "h-(--lex-progress-track-height-lg)",
|
|
21
21
|
},
|
|
22
22
|
},
|
|
23
23
|
defaultVariants: {
|
|
@@ -27,13 +27,13 @@ export const progressTrackVariants = cva(
|
|
|
27
27
|
)
|
|
28
28
|
|
|
29
29
|
export const progressIndicatorVariants = cva(
|
|
30
|
-
"h-full bg-(--
|
|
30
|
+
"h-full bg-(--lex-progress-indicator-background) transition-transform duration-(--lex-progress-transition-duration) ease-(--lex-progress-transition-easing) data-[indeterminate]:animate-pulse",
|
|
31
31
|
)
|
|
32
32
|
|
|
33
33
|
export const progressLabelVariants = cva(
|
|
34
|
-
"text-(--
|
|
34
|
+
"text-(--lex-progress-label-foreground)",
|
|
35
35
|
)
|
|
36
36
|
|
|
37
37
|
export const progressValueVariants = cva(
|
|
38
|
-
"font-(--
|
|
38
|
+
"font-(--lex-meter-value-font-weight) text-(--lex-meter-value-foreground)",
|
|
39
39
|
)
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
import { cva } from "class-variance-authority"
|
|
8
8
|
|
|
9
|
-
export const radioGroupVariants = cva("grid gap-(--
|
|
9
|
+
export const radioGroupVariants = cva("grid gap-(--lex-radio-group-gap)", {
|
|
10
10
|
variants: {
|
|
11
11
|
orientation: {
|
|
12
12
|
horizontal: "grid-flow-col justify-start",
|
|
@@ -20,19 +20,19 @@ export const radioGroupVariants = cva("grid gap-(--lsys-radio-group-gap)", {
|
|
|
20
20
|
|
|
21
21
|
export const radioGroupItemVariants = cva(
|
|
22
22
|
[
|
|
23
|
-
"inline-flex shrink-0 items-center justify-center rounded-(--
|
|
24
|
-
"border-(--
|
|
25
|
-
"transition-colors duration-(--
|
|
26
|
-
"outline-none data-[checked]:border-(--
|
|
27
|
-
"data-[focused]:ring-(length:--
|
|
28
|
-
"data-[disabled]:cursor-not-allowed data-[disabled]:opacity-(--
|
|
23
|
+
"inline-flex shrink-0 items-center justify-center rounded-(--lex-radio-group-item-radius) border",
|
|
24
|
+
"border-(--lex-radio-group-item-border-color) bg-(--lex-radio-group-item-background) text-(--lex-radio-group-item-foreground)",
|
|
25
|
+
"transition-colors duration-(--lex-radio-group-transition-duration) ease-(--lex-radio-group-transition-easing)",
|
|
26
|
+
"outline-none data-[checked]:border-(--lex-radio-group-item-checked-border-color)",
|
|
27
|
+
"data-[focused]:ring-(length:--lex-radio-group-focus-ring-width) data-[focused]:ring-(--lex-radio-group-focus-ring-color) data-[focused]:ring-offset-(length:--lex-radio-group-focus-ring-offset) data-[focused]:ring-offset-(--lex-radio-group-focus-ring-offset-color)",
|
|
28
|
+
"data-[disabled]:cursor-not-allowed data-[disabled]:opacity-(--lex-opacity-disabled)",
|
|
29
29
|
].join(" "),
|
|
30
30
|
{
|
|
31
31
|
variants: {
|
|
32
32
|
size: {
|
|
33
|
-
sm: "size-(--
|
|
34
|
-
md: "size-(--
|
|
35
|
-
lg: "size-(--
|
|
33
|
+
sm: "size-(--lex-radio-group-item-size-sm)",
|
|
34
|
+
md: "size-(--lex-radio-group-item-size-md)",
|
|
35
|
+
lg: "size-(--lex-radio-group-item-size-lg)",
|
|
36
36
|
},
|
|
37
37
|
},
|
|
38
38
|
defaultVariants: {
|
|
@@ -42,15 +42,15 @@ export const radioGroupItemVariants = cva(
|
|
|
42
42
|
)
|
|
43
43
|
|
|
44
44
|
export const radioGroupLabelVariants = cva(
|
|
45
|
-
"inline-flex items-center gap-(--
|
|
45
|
+
"inline-flex items-center gap-(--lex-radio-group-label-gap) text-(length:--lex-radio-group-label-font-size) font-(--lex-radio-group-label-font-weight) leading-(--lex-radio-group-label-font-line-height) text-(--lex-radio-group-label-foreground)",
|
|
46
46
|
)
|
|
47
47
|
|
|
48
48
|
export const radioGroupIndicatorVariants = cva("rounded-full bg-current", {
|
|
49
49
|
variants: {
|
|
50
50
|
size: {
|
|
51
|
-
sm: "size-(--
|
|
52
|
-
md: "size-(--
|
|
53
|
-
lg: "size-(--
|
|
51
|
+
sm: "size-(--lex-radio-group-indicator-size-sm)",
|
|
52
|
+
md: "size-(--lex-radio-group-indicator-size-md)",
|
|
53
|
+
lg: "size-(--lex-radio-group-indicator-size-lg)",
|
|
54
54
|
},
|
|
55
55
|
},
|
|
56
56
|
defaultVariants: {
|
|
@@ -20,9 +20,9 @@ export const scrollAreaScrollbarVariants = cva(
|
|
|
20
20
|
variants: {
|
|
21
21
|
orientation: {
|
|
22
22
|
vertical:
|
|
23
|
-
"h-full w-(--
|
|
23
|
+
"h-full w-(--lex-scroll-area-scrollbar-size) border-l border-l-transparent p-(--lex-scroll-area-scrollbar-padding)",
|
|
24
24
|
horizontal:
|
|
25
|
-
"h-(--
|
|
25
|
+
"h-(--lex-scroll-area-scrollbar-size) flex-col border-t border-t-transparent p-(--lex-scroll-area-scrollbar-padding)",
|
|
26
26
|
},
|
|
27
27
|
},
|
|
28
28
|
defaultVariants: {
|
|
@@ -32,7 +32,7 @@ export const scrollAreaScrollbarVariants = cva(
|
|
|
32
32
|
)
|
|
33
33
|
|
|
34
34
|
export const scrollAreaThumbVariants = cva(
|
|
35
|
-
"relative flex-1 rounded-(--
|
|
35
|
+
"relative flex-1 rounded-(--lex-scroll-area-thumb-radius) bg-(--lex-scroll-area-thumb-background)",
|
|
36
36
|
)
|
|
37
37
|
|
|
38
38
|
export const scrollAreaCornerVariants = cva("bg-transparent")
|
|
@@ -27,21 +27,21 @@ import type {
|
|
|
27
27
|
SelectValueProps,
|
|
28
28
|
} from "./Select.types"
|
|
29
29
|
import {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
selectScrollArrowVariants,
|
|
30
|
+
selectArrowClasses,
|
|
31
|
+
selectBackdropClasses,
|
|
32
|
+
selectGroupClasses,
|
|
33
|
+
selectGroupLabelClasses,
|
|
34
|
+
selectIconClasses,
|
|
35
|
+
selectItemClasses,
|
|
36
|
+
selectItemIndicatorClasses,
|
|
37
|
+
selectItemTextClasses,
|
|
38
|
+
selectListClasses,
|
|
39
|
+
selectPopupClasses,
|
|
40
|
+
selectPositionerClasses,
|
|
41
|
+
selectScrollArrowClasses,
|
|
43
42
|
selectTriggerVariants,
|
|
44
|
-
|
|
43
|
+
selectValueClasses,
|
|
44
|
+
selectLabelClasses,
|
|
45
45
|
} from "./Select.variants"
|
|
46
46
|
import { mergeClassName } from "@/lib/utils"
|
|
47
47
|
import { overlayPositionerSideOffset } from "@/lib/utils"
|
|
@@ -58,7 +58,7 @@ const SelectLabel = ({ ref, className, ...props }: SelectLabelProps) => {
|
|
|
58
58
|
return (
|
|
59
59
|
<BaseSelect.Label
|
|
60
60
|
ref={ref}
|
|
61
|
-
className={mergeClassName(
|
|
61
|
+
className={mergeClassName(selectLabelClasses, className)}
|
|
62
62
|
{...props}
|
|
63
63
|
/>
|
|
64
64
|
)
|
|
@@ -87,7 +87,7 @@ const SelectValue = ({ ref, className, ...props }: SelectValueProps) => {
|
|
|
87
87
|
return (
|
|
88
88
|
<BaseSelect.Value
|
|
89
89
|
ref={ref}
|
|
90
|
-
className={mergeClassName(
|
|
90
|
+
className={mergeClassName(selectValueClasses, className)}
|
|
91
91
|
{...props}
|
|
92
92
|
/>
|
|
93
93
|
)
|
|
@@ -104,7 +104,7 @@ const SelectIcon = ({
|
|
|
104
104
|
return (
|
|
105
105
|
<BaseSelect.Icon
|
|
106
106
|
ref={ref}
|
|
107
|
-
className={mergeClassName(
|
|
107
|
+
className={mergeClassName(selectIconClasses, className)}
|
|
108
108
|
{...props}
|
|
109
109
|
>
|
|
110
110
|
{children ?? <ChevronDown aria-hidden="true" size={16} />}
|
|
@@ -124,7 +124,7 @@ const SelectBackdrop = ({ ref, className, ...props }: SelectBackdropProps) => {
|
|
|
124
124
|
return (
|
|
125
125
|
<BaseSelect.Backdrop
|
|
126
126
|
ref={ref}
|
|
127
|
-
className={mergeClassName(
|
|
127
|
+
className={mergeClassName(selectBackdropClasses, className)}
|
|
128
128
|
{...props}
|
|
129
129
|
/>
|
|
130
130
|
)
|
|
@@ -144,7 +144,7 @@ const SelectPositioner = ({
|
|
|
144
144
|
ref={ref}
|
|
145
145
|
alignItemWithTrigger={alignItemWithTrigger}
|
|
146
146
|
sideOffset={sideOffset}
|
|
147
|
-
className={mergeClassName(
|
|
147
|
+
className={mergeClassName(selectPositionerClasses, className)}
|
|
148
148
|
{...props}
|
|
149
149
|
/>
|
|
150
150
|
)
|
|
@@ -156,7 +156,7 @@ const SelectPopup = ({ ref, className, ...props }: SelectPopupProps) => {
|
|
|
156
156
|
return (
|
|
157
157
|
<BaseSelect.Popup
|
|
158
158
|
ref={ref}
|
|
159
|
-
className={mergeClassName(
|
|
159
|
+
className={mergeClassName(selectPopupClasses, className)}
|
|
160
160
|
{...props}
|
|
161
161
|
/>
|
|
162
162
|
)
|
|
@@ -168,7 +168,7 @@ const SelectList = ({ ref, className, ...props }: SelectListProps) => {
|
|
|
168
168
|
return (
|
|
169
169
|
<BaseSelect.List
|
|
170
170
|
ref={ref}
|
|
171
|
-
className={mergeClassName(
|
|
171
|
+
className={mergeClassName(selectListClasses, className)}
|
|
172
172
|
{...props}
|
|
173
173
|
/>
|
|
174
174
|
)
|
|
@@ -180,7 +180,7 @@ const SelectItem = ({ ref, className, ...props }: SelectItemProps) => {
|
|
|
180
180
|
return (
|
|
181
181
|
<BaseSelect.Item
|
|
182
182
|
ref={ref}
|
|
183
|
-
className={mergeClassName(
|
|
183
|
+
className={mergeClassName(selectItemClasses, className)}
|
|
184
184
|
{...props}
|
|
185
185
|
/>
|
|
186
186
|
)
|
|
@@ -197,7 +197,7 @@ const SelectItemIndicator = ({
|
|
|
197
197
|
return (
|
|
198
198
|
<BaseSelect.ItemIndicator
|
|
199
199
|
ref={ref}
|
|
200
|
-
className={mergeClassName(
|
|
200
|
+
className={mergeClassName(selectItemIndicatorClasses, className)}
|
|
201
201
|
{...props}
|
|
202
202
|
>
|
|
203
203
|
{children ?? <Check aria-hidden="true" size={14} />}
|
|
@@ -211,7 +211,7 @@ const SelectItemText = ({ ref, className, ...props }: SelectItemTextProps) => {
|
|
|
211
211
|
return (
|
|
212
212
|
<BaseSelect.ItemText
|
|
213
213
|
ref={ref}
|
|
214
|
-
className={mergeClassName(
|
|
214
|
+
className={mergeClassName(selectItemTextClasses, className)}
|
|
215
215
|
{...props}
|
|
216
216
|
/>
|
|
217
217
|
)
|
|
@@ -223,7 +223,7 @@ const SelectArrow = ({ ref, className, ...props }: SelectArrowProps) => {
|
|
|
223
223
|
return (
|
|
224
224
|
<BaseSelect.Arrow
|
|
225
225
|
ref={ref}
|
|
226
|
-
className={mergeClassName(
|
|
226
|
+
className={mergeClassName(selectArrowClasses, className)}
|
|
227
227
|
{...props}
|
|
228
228
|
/>
|
|
229
229
|
)
|
|
@@ -240,7 +240,7 @@ const SelectScrollUpArrow = ({
|
|
|
240
240
|
return (
|
|
241
241
|
<BaseSelect.ScrollUpArrow
|
|
242
242
|
ref={ref}
|
|
243
|
-
className={mergeClassName(
|
|
243
|
+
className={mergeClassName(selectScrollArrowClasses, className)}
|
|
244
244
|
{...props}
|
|
245
245
|
>
|
|
246
246
|
{children ?? <ChevronUp aria-hidden="true" size={16} />}
|
|
@@ -259,7 +259,7 @@ const SelectScrollDownArrow = ({
|
|
|
259
259
|
return (
|
|
260
260
|
<BaseSelect.ScrollDownArrow
|
|
261
261
|
ref={ref}
|
|
262
|
-
className={mergeClassName(
|
|
262
|
+
className={mergeClassName(selectScrollArrowClasses, className)}
|
|
263
263
|
{...props}
|
|
264
264
|
>
|
|
265
265
|
{children ?? <ChevronDown aria-hidden="true" size={16} />}
|
|
@@ -273,7 +273,7 @@ const SelectGroup = ({ ref, className, ...props }: SelectGroupProps) => {
|
|
|
273
273
|
return (
|
|
274
274
|
<BaseSelect.Group
|
|
275
275
|
ref={ref}
|
|
276
|
-
className={mergeClassName(
|
|
276
|
+
className={mergeClassName(selectGroupClasses, className)}
|
|
277
277
|
{...props}
|
|
278
278
|
/>
|
|
279
279
|
)
|
|
@@ -289,7 +289,7 @@ const SelectGroupLabel = ({
|
|
|
289
289
|
return (
|
|
290
290
|
<BaseSelect.GroupLabel
|
|
291
291
|
ref={ref}
|
|
292
|
-
className={mergeClassName(
|
|
292
|
+
className={mergeClassName(selectGroupLabelClasses, className)}
|
|
293
293
|
{...props}
|
|
294
294
|
/>
|
|
295
295
|
)
|
|
@@ -9,10 +9,11 @@ import type { Select as BaseSelect } from "@base-ui/react/select"
|
|
|
9
9
|
|
|
10
10
|
export type SelectSize = "sm" | "md" | "lg"
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
13
|
+
export interface SelectProps<
|
|
13
14
|
Value = string,
|
|
14
15
|
Multiple extends boolean | undefined = false,
|
|
15
|
-
>
|
|
16
|
+
> extends BaseSelect.Root.Props<Value, Multiple> {}
|
|
16
17
|
|
|
17
18
|
export type SelectLabelProps = BaseSelect.Label.Props & {
|
|
18
19
|
ref?: Ref<HTMLDivElement>
|
|
@@ -47,9 +48,8 @@ export type SelectListProps = BaseSelect.List.Props
|
|
|
47
48
|
|
|
48
49
|
export interface SelectItemProps extends Omit<
|
|
49
50
|
BaseSelect.Item.Props,
|
|
50
|
-
"className"
|
|
51
|
+
"className"
|
|
51
52
|
> {
|
|
52
|
-
ref?: Ref<HTMLDivElement>
|
|
53
53
|
className?: BaseSelect.Item.Props["className"]
|
|
54
54
|
}
|
|
55
55
|
|