@dalexto/lexsys-registry 0.0.2 → 0.0.3
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/dist/index.js +23 -2
- package/dist/items/empty.d.ts +7 -0
- package/dist/items/index.d.ts +1 -0
- 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/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 +1477 -1441
- package/templates/templates/DashboardShell/DashboardShell.tsx +10 -10
- package/templates/templates/DashboardShell/DashboardShell.variants.ts +10 -10
|
@@ -9,20 +9,20 @@ import { disabledStateClasses } from "@/lib/utils"
|
|
|
9
9
|
|
|
10
10
|
export const autocompleteTriggerVariants = cva(
|
|
11
11
|
[
|
|
12
|
-
"inline-flex w-full min-w-0 items-center justify-between gap-(--
|
|
13
|
-
"border-(--
|
|
14
|
-
"font-(family-name:--
|
|
15
|
-
"transition-colors duration-(--
|
|
16
|
-
"outline-none data-[focused]:border-(--
|
|
17
|
-
"data-[invalid]:border-(--
|
|
18
|
-
"data-[disabled]:cursor-not-allowed data-[disabled]:opacity-(--
|
|
12
|
+
"inline-flex w-full min-w-0 items-center justify-between gap-(--lex-select-trigger-gap) rounded-(--lex-select-radius) border",
|
|
13
|
+
"border-(--lex-select-border-color) bg-(--lex-select-background) text-(--lex-select-foreground)",
|
|
14
|
+
"font-(family-name:--lex-select-font-family) font-(--lex-select-font-weight) leading-(--lex-select-font-line-height) tracking-(--lex-select-font-letter-spacing)",
|
|
15
|
+
"transition-colors duration-(--lex-select-transition-duration) ease-(--lex-select-transition-easing)",
|
|
16
|
+
"outline-none data-[focused]:border-(--lex-select-focus-border-color) data-[focused]:ring-(length:--lex-select-focus-ring-width) data-[focused]:ring-(--lex-select-focus-ring-color) data-[focused]:ring-offset-(length:--lex-select-focus-ring-offset) data-[focused]:ring-offset-(--lex-select-focus-ring-offset-color)",
|
|
17
|
+
"data-[invalid]:border-(--lex-select-invalid-border-color) data-[invalid]:ring-(length:--lex-select-invalid-ring-width) data-[invalid]:ring-(--lex-select-invalid-ring-color)",
|
|
18
|
+
"data-[disabled]:cursor-not-allowed data-[disabled]:opacity-(--lex-opacity-disabled)",
|
|
19
19
|
].join(" "),
|
|
20
20
|
{
|
|
21
21
|
variants: {
|
|
22
22
|
size: {
|
|
23
|
-
sm: "h-(--
|
|
24
|
-
md: "h-(--
|
|
25
|
-
lg: "h-(--
|
|
23
|
+
sm: "h-(--lex-select-height-sm) px-(--lex-select-padding-x-sm) text-(length:--lex-select-font-size-sm)",
|
|
24
|
+
md: "h-(--lex-select-height-md) px-(--lex-select-padding-x-md) text-(length:--lex-select-font-size-md)",
|
|
25
|
+
lg: "h-(--lex-select-height-lg) px-(--lex-select-padding-x-lg) text-(length:--lex-select-font-size-lg)",
|
|
26
26
|
},
|
|
27
27
|
},
|
|
28
28
|
defaultVariants: {
|
|
@@ -33,20 +33,20 @@ export const autocompleteTriggerVariants = cva(
|
|
|
33
33
|
|
|
34
34
|
export const autocompleteInputGroupVariants = cva(
|
|
35
35
|
[
|
|
36
|
-
"inline-flex w-full min-w-0 items-center gap-(--
|
|
37
|
-
"border-(--
|
|
38
|
-
"font-(family-name:--
|
|
39
|
-
"transition-colors duration-(--
|
|
40
|
-
"outline-none data-[focused]:border-(--
|
|
41
|
-
"data-[invalid]:border-(--
|
|
42
|
-
"data-[disabled]:cursor-not-allowed data-[disabled]:opacity-(--
|
|
36
|
+
"inline-flex w-full min-w-0 items-center gap-(--lex-select-trigger-gap) rounded-(--lex-select-radius) border",
|
|
37
|
+
"border-(--lex-select-border-color) bg-(--lex-select-background) text-(--lex-select-foreground)",
|
|
38
|
+
"font-(family-name:--lex-select-font-family) font-(--lex-select-font-weight) leading-(--lex-select-font-line-height) tracking-(--lex-select-font-letter-spacing)",
|
|
39
|
+
"transition-colors duration-(--lex-select-transition-duration) ease-(--lex-select-transition-easing)",
|
|
40
|
+
"outline-none data-[focused]:border-(--lex-select-focus-border-color) data-[focused]:ring-(length:--lex-select-focus-ring-width) data-[focused]:ring-(--lex-select-focus-ring-color) data-[focused]:ring-offset-(length:--lex-select-focus-ring-offset) data-[focused]:ring-offset-(--lex-select-focus-ring-offset-color)",
|
|
41
|
+
"data-[invalid]:border-(--lex-select-invalid-border-color) data-[invalid]:ring-(length:--lex-select-invalid-ring-width) data-[invalid]:ring-(--lex-select-invalid-ring-color)",
|
|
42
|
+
"data-[disabled]:cursor-not-allowed data-[disabled]:opacity-(--lex-opacity-disabled)",
|
|
43
43
|
].join(" "),
|
|
44
44
|
{
|
|
45
45
|
variants: {
|
|
46
46
|
size: {
|
|
47
|
-
sm: "h-(--
|
|
48
|
-
md: "h-(--
|
|
49
|
-
lg: "h-(--
|
|
47
|
+
sm: "h-(--lex-select-height-sm) px-(--lex-select-padding-x-sm) text-(length:--lex-select-font-size-sm)",
|
|
48
|
+
md: "h-(--lex-select-height-md) px-(--lex-select-padding-x-md) text-(length:--lex-select-font-size-md)",
|
|
49
|
+
lg: "h-(--lex-select-height-lg) px-(--lex-select-padding-x-lg) text-(length:--lex-select-font-size-lg)",
|
|
50
50
|
},
|
|
51
51
|
},
|
|
52
52
|
defaultVariants: {
|
|
@@ -57,18 +57,18 @@ export const autocompleteInputGroupVariants = cva(
|
|
|
57
57
|
|
|
58
58
|
export const autocompleteInputVariants = cva(
|
|
59
59
|
[
|
|
60
|
-
"min-w-0 flex-1 border-0 bg-transparent text-(--
|
|
61
|
-
"font-(family-name:--
|
|
62
|
-
"placeholder:text-(--
|
|
60
|
+
"min-w-0 flex-1 border-0 bg-transparent text-(--lex-select-foreground) outline-none",
|
|
61
|
+
"font-(family-name:--lex-select-font-family) font-(--lex-select-font-weight) leading-(--lex-select-font-line-height) tracking-(--lex-select-font-letter-spacing)",
|
|
62
|
+
"placeholder:text-(--lex-select-placeholder-color)",
|
|
63
63
|
"disabled:cursor-not-allowed",
|
|
64
64
|
disabledStateClasses,
|
|
65
65
|
].join(" "),
|
|
66
66
|
{
|
|
67
67
|
variants: {
|
|
68
68
|
size: {
|
|
69
|
-
sm: "text-(length:--
|
|
70
|
-
md: "text-(length:--
|
|
71
|
-
lg: "text-(length:--
|
|
69
|
+
sm: "text-(length:--lex-select-font-size-sm)",
|
|
70
|
+
md: "text-(length:--lex-select-font-size-md)",
|
|
71
|
+
lg: "text-(length:--lex-select-font-size-lg)",
|
|
72
72
|
},
|
|
73
73
|
},
|
|
74
74
|
defaultVariants: {
|
|
@@ -78,71 +78,71 @@ export const autocompleteInputVariants = cva(
|
|
|
78
78
|
)
|
|
79
79
|
|
|
80
80
|
export const autocompleteValueVariants = cva(
|
|
81
|
-
"min-w-0 flex-1 truncate text-left data-[placeholder]:text-(--
|
|
81
|
+
"min-w-0 flex-1 truncate text-left data-[placeholder]:text-(--lex-select-placeholder-color)",
|
|
82
82
|
)
|
|
83
83
|
|
|
84
84
|
export const autocompleteIconVariants = cva(
|
|
85
|
-
"inline-flex size-(--
|
|
85
|
+
"inline-flex size-(--lex-select-icon-size) shrink-0 items-center justify-center text-(--lex-select-icon-foreground) transition-transform duration-(--lex-select-transition-duration) ease-(--lex-select-transition-easing) data-[open]:rotate-180",
|
|
86
86
|
)
|
|
87
87
|
|
|
88
88
|
export const autocompleteClearVariants = cva(
|
|
89
89
|
[
|
|
90
|
-
"inline-flex size-(--
|
|
91
|
-
"transition-colors duration-(--
|
|
92
|
-
"hover:bg-(--
|
|
93
|
-
"data-[disabled]:pointer-events-none data-[disabled]:opacity-(--
|
|
90
|
+
"inline-flex size-(--lex-select-icon-size) shrink-0 items-center justify-center rounded-(--lex-select-item-radius) text-(--lex-select-icon-foreground)",
|
|
91
|
+
"transition-colors duration-(--lex-select-transition-duration) ease-(--lex-select-transition-easing)",
|
|
92
|
+
"hover:bg-(--lex-select-item-highlight-background) hover:text-(--lex-select-item-highlight-foreground)",
|
|
93
|
+
"data-[disabled]:pointer-events-none data-[disabled]:opacity-(--lex-opacity-disabled)",
|
|
94
94
|
].join(" "),
|
|
95
95
|
)
|
|
96
96
|
|
|
97
97
|
export const autocompleteBackdropVariants = cva(
|
|
98
|
-
"fixed inset-0 z-(--
|
|
98
|
+
"fixed inset-0 z-(--lex-select-backdrop-z-index) bg-(--lex-select-backdrop-background) opacity-(--lex-select-backdrop-opacity) data-[starting-style]:opacity-0 data-[ending-style]:opacity-0",
|
|
99
99
|
)
|
|
100
100
|
|
|
101
101
|
export const autocompletePositionerVariants = cva(
|
|
102
|
-
"z-(--
|
|
102
|
+
"z-(--lex-select-positioner-z-index)",
|
|
103
103
|
)
|
|
104
104
|
|
|
105
105
|
export const autocompletePopupVariants = cva(
|
|
106
106
|
[
|
|
107
|
-
"min-w-[var(--anchor-width)] overflow-hidden rounded-(--
|
|
108
|
-
"border-(--
|
|
107
|
+
"min-w-[var(--anchor-width)] overflow-hidden rounded-(--lex-select-radius) border",
|
|
108
|
+
"border-(--lex-select-popup-border-color) bg-(--lex-select-popup-background) text-(--lex-select-popup-foreground) shadow-(--lex-select-popup-shadow)",
|
|
109
109
|
"data-[starting-style]:scale-95 data-[starting-style]:opacity-0 data-[ending-style]:scale-95 data-[ending-style]:opacity-0",
|
|
110
|
-
"origin-[var(--transform-origin)] transition-[opacity,transform] duration-(--
|
|
110
|
+
"origin-[var(--transform-origin)] transition-[opacity,transform] duration-(--lex-select-transition-duration) ease-(--lex-select-transition-easing)",
|
|
111
111
|
].join(" "),
|
|
112
112
|
)
|
|
113
113
|
|
|
114
114
|
export const autocompleteListVariants = cva(
|
|
115
|
-
"grid max-h-(--
|
|
115
|
+
"grid max-h-(--lex-select-popup-max-height) gap-(--lex-select-list-gap) overflow-y-auto p-(--lex-select-list-padding)",
|
|
116
116
|
)
|
|
117
117
|
|
|
118
118
|
export const autocompleteItemVariants = cva(
|
|
119
119
|
[
|
|
120
|
-
"relative flex min-w-0 cursor-default select-none items-center gap-(--
|
|
121
|
-
"text-(length:--
|
|
122
|
-
"data-[highlighted]:bg-(--
|
|
123
|
-
"data-[selected]:bg-(--
|
|
124
|
-
"data-[disabled]:pointer-events-none data-[disabled]:opacity-(--
|
|
120
|
+
"relative flex min-w-0 cursor-default select-none items-center gap-(--lex-select-item-gap) rounded-(--lex-select-item-radius) px-(--lex-select-item-padding-x) py-(--lex-select-item-padding-y)",
|
|
121
|
+
"text-(length:--lex-select-item-font-size) font-(--lex-select-item-font-weight) leading-(--lex-select-item-font-line-height) text-(--lex-select-item-foreground) outline-none",
|
|
122
|
+
"data-[highlighted]:bg-(--lex-select-item-highlight-background) data-[highlighted]:text-(--lex-select-item-highlight-foreground)",
|
|
123
|
+
"data-[selected]:bg-(--lex-select-item-selected-background) data-[selected]:text-(--lex-select-item-selected-foreground)",
|
|
124
|
+
"data-[disabled]:pointer-events-none data-[disabled]:opacity-(--lex-opacity-disabled)",
|
|
125
125
|
].join(" "),
|
|
126
126
|
)
|
|
127
127
|
|
|
128
128
|
export const autocompleteArrowVariants = cva(
|
|
129
|
-
"size-(--
|
|
129
|
+
"size-(--lex-select-arrow-size) rotate-45 border border-(--lex-select-popup-border-color) bg-(--lex-select-popup-background)",
|
|
130
130
|
)
|
|
131
131
|
|
|
132
132
|
export const autocompleteGroupVariants = cva(
|
|
133
|
-
"grid gap-(--
|
|
133
|
+
"grid gap-(--lex-select-group-gap)",
|
|
134
134
|
)
|
|
135
135
|
|
|
136
136
|
export const autocompleteGroupLabelVariants = cva(
|
|
137
|
-
"px-(--
|
|
137
|
+
"px-(--lex-select-item-padding-x) py-(--lex-select-group-label-padding-y) text-(length:--lex-select-group-label-font-size) font-(--lex-select-group-label-font-weight) leading-(--lex-select-group-label-font-line-height) text-(--lex-select-group-label-foreground)",
|
|
138
138
|
)
|
|
139
139
|
|
|
140
140
|
export const autocompleteEmptyVariants = cva(
|
|
141
|
-
"px-(--
|
|
141
|
+
"px-(--lex-select-item-padding-x) py-(--lex-select-item-padding-y) text-(length:--lex-select-item-font-size) text-(--lex-select-placeholder-color)",
|
|
142
142
|
)
|
|
143
143
|
|
|
144
144
|
export const autocompleteStatusVariants = cva(
|
|
145
|
-
"px-(--
|
|
145
|
+
"px-(--lex-select-item-padding-x) py-(--lex-select-item-padding-y) text-(length:--lex-select-item-font-size) text-(--lex-select-placeholder-color)",
|
|
146
146
|
)
|
|
147
147
|
|
|
148
148
|
export const autocompleteRowVariants = cva("flex min-w-0 items-center")
|
|
@@ -150,5 +150,5 @@ export const autocompleteRowVariants = cva("flex min-w-0 items-center")
|
|
|
150
150
|
export const autocompleteCollectionVariants = cva("contents")
|
|
151
151
|
|
|
152
152
|
export const autocompleteSeparatorVariants = cva(
|
|
153
|
-
"mx-(--
|
|
153
|
+
"mx-(--lex-select-item-padding-x) my-(--lex-select-group-label-padding-y) h-(--lex-separator-thickness) bg-(--lex-separator-color)",
|
|
154
154
|
)
|
|
@@ -8,20 +8,20 @@ import { cva } from "class-variance-authority"
|
|
|
8
8
|
|
|
9
9
|
export const avatarVariants = cva(
|
|
10
10
|
[
|
|
11
|
-
"inline-flex shrink-0 items-center justify-center overflow-hidden border border-(--
|
|
12
|
-
"bg-(--
|
|
13
|
-
"font-(--
|
|
11
|
+
"inline-flex shrink-0 items-center justify-center overflow-hidden border border-(--lex-avatar-border-color)",
|
|
12
|
+
"bg-(--lex-avatar-background) text-(--lex-avatar-foreground)",
|
|
13
|
+
"font-(--lex-avatar-font-weight) leading-(--lex-avatar-font-line-height)",
|
|
14
14
|
].join(" "),
|
|
15
15
|
{
|
|
16
16
|
variants: {
|
|
17
17
|
size: {
|
|
18
|
-
sm: "size-(--
|
|
19
|
-
md: "size-(--
|
|
20
|
-
lg: "size-(--
|
|
18
|
+
sm: "size-(--lex-avatar-size-sm) text-(length:--lex-avatar-font-size-sm)",
|
|
19
|
+
md: "size-(--lex-avatar-size-md) text-(length:--lex-avatar-font-size-md)",
|
|
20
|
+
lg: "size-(--lex-avatar-size-lg) text-(length:--lex-avatar-font-size-lg)",
|
|
21
21
|
},
|
|
22
22
|
shape: {
|
|
23
|
-
circle: "rounded-(--
|
|
24
|
-
square: "rounded-(--
|
|
23
|
+
circle: "rounded-(--lex-avatar-radius-circle)",
|
|
24
|
+
square: "rounded-(--lex-avatar-radius-square)",
|
|
25
25
|
},
|
|
26
26
|
},
|
|
27
27
|
defaultVariants: {
|
|
@@ -32,9 +32,9 @@ export const avatarVariants = cva(
|
|
|
32
32
|
)
|
|
33
33
|
|
|
34
34
|
export const avatarImageVariants = cva(
|
|
35
|
-
"size-full object-cover transition-opacity duration-(--
|
|
35
|
+
"size-full object-cover transition-opacity duration-(--lex-avatar-transition-duration) ease-(--lex-avatar-transition-easing) data-[starting-style]:opacity-0 data-[ending-style]:opacity-0",
|
|
36
36
|
)
|
|
37
37
|
|
|
38
38
|
export const avatarFallbackVariants = cva(
|
|
39
|
-
"flex size-full items-center justify-center bg-(--
|
|
39
|
+
"flex size-full items-center justify-center bg-(--lex-avatar-fallback-background) text-(--lex-avatar-fallback-foreground)",
|
|
40
40
|
)
|
|
@@ -7,40 +7,40 @@
|
|
|
7
7
|
import { cva } from "class-variance-authority"
|
|
8
8
|
|
|
9
9
|
const neutralSolid =
|
|
10
|
-
"border-(--
|
|
10
|
+
"border-(--lex-badge-neutral-border-color) bg-(--lex-badge-neutral-background) text-(--lex-badge-neutral-foreground)"
|
|
11
11
|
|
|
12
12
|
const neutralOutline =
|
|
13
|
-
"border-(--
|
|
13
|
+
"border-(--lex-badge-neutral-border-color) bg-(--lex-badge-outline-background) text-(--lex-badge-neutral-foreground)"
|
|
14
14
|
|
|
15
15
|
const primarySolid =
|
|
16
|
-
"border-(--
|
|
16
|
+
"border-(--lex-badge-primary-border-color) bg-(--lex-badge-primary-background) text-(--lex-badge-primary-foreground)"
|
|
17
17
|
|
|
18
18
|
const primaryOutline =
|
|
19
|
-
"border-(--
|
|
19
|
+
"border-(--lex-badge-primary-border-color) bg-(--lex-badge-outline-background) text-(--lex-badge-primary-border-color)"
|
|
20
20
|
|
|
21
21
|
const dangerSolid =
|
|
22
|
-
"border-(--
|
|
22
|
+
"border-(--lex-badge-danger-border-color) bg-(--lex-badge-danger-background) text-(--lex-badge-danger-foreground)"
|
|
23
23
|
|
|
24
24
|
const dangerOutline =
|
|
25
|
-
"border-(--
|
|
25
|
+
"border-(--lex-badge-danger-border-color) bg-(--lex-badge-outline-background) text-(--lex-badge-danger-border-color)"
|
|
26
26
|
|
|
27
27
|
const successSolid =
|
|
28
|
-
"border-(--
|
|
28
|
+
"border-(--lex-color-feedback-success-foreground) bg-(--lex-color-feedback-success-background) text-(--lex-color-feedback-success-foreground)"
|
|
29
29
|
|
|
30
30
|
const successOutline =
|
|
31
|
-
"border-(--
|
|
31
|
+
"border-(--lex-color-feedback-success-foreground) bg-(--lex-badge-outline-background) text-(--lex-color-feedback-success-foreground)"
|
|
32
32
|
|
|
33
33
|
const warningSolid =
|
|
34
|
-
"border-(--
|
|
34
|
+
"border-(--lex-color-feedback-warning-foreground) bg-(--lex-color-feedback-warning-background) text-(--lex-color-feedback-warning-foreground)"
|
|
35
35
|
|
|
36
36
|
const warningOutline =
|
|
37
|
-
"border-(--
|
|
37
|
+
"border-(--lex-color-feedback-warning-foreground) bg-(--lex-badge-outline-background) text-(--lex-color-feedback-warning-foreground)"
|
|
38
38
|
|
|
39
39
|
export const badgeVariants = cva(
|
|
40
40
|
[
|
|
41
41
|
"inline-flex items-center justify-center whitespace-nowrap border",
|
|
42
|
-
"rounded-(--
|
|
43
|
-
"transition-colors duration-(--
|
|
42
|
+
"rounded-(--lex-badge-radius) font-(--lex-badge-font-weight) leading-(--lex-badge-font-line-height)",
|
|
43
|
+
"transition-colors duration-(--lex-badge-transition-duration) ease-(--lex-badge-transition-easing)",
|
|
44
44
|
].join(" "),
|
|
45
45
|
{
|
|
46
46
|
variants: {
|
|
@@ -56,8 +56,8 @@ export const badgeVariants = cva(
|
|
|
56
56
|
outline: "",
|
|
57
57
|
},
|
|
58
58
|
size: {
|
|
59
|
-
sm: "h-(--
|
|
60
|
-
md: "h-(--
|
|
59
|
+
sm: "h-(--lex-badge-height-sm) px-(--lex-badge-padding-x-sm) text-(length:--lex-badge-font-size-sm)",
|
|
60
|
+
md: "h-(--lex-badge-height-md) px-(--lex-badge-padding-x-md) text-(length:--lex-badge-font-size-md)",
|
|
61
61
|
},
|
|
62
62
|
},
|
|
63
63
|
compoundVariants: [
|
|
@@ -10,54 +10,54 @@ import { busyStateClasses, disabledStateClasses } from "@/lib/utils"
|
|
|
10
10
|
export const buttonVariants = cva(
|
|
11
11
|
[
|
|
12
12
|
"inline-flex items-center justify-center whitespace-nowrap border border-transparent",
|
|
13
|
-
"rounded-(--
|
|
14
|
-
"transition-colors duration-(--
|
|
15
|
-
"outline-none focus-visible:ring-(length:--
|
|
13
|
+
"rounded-(--lex-button-radius) font-(family-name:--lex-button-font-family) font-(--lex-button-font-weight)",
|
|
14
|
+
"transition-colors duration-(--lex-button-transition-duration) ease-(--lex-button-transition-easing)",
|
|
15
|
+
"outline-none focus-visible:ring-(length:--lex-button-focus-ring-width) focus-visible:ring-(--lex-button-focus-ring-color) focus-visible:ring-offset-(length:--lex-button-focus-ring-offset) focus-visible:ring-offset-(--lex-button-focus-ring-offset-color)",
|
|
16
16
|
disabledStateClasses,
|
|
17
17
|
busyStateClasses,
|
|
18
|
-
"text-(length:--
|
|
19
|
-
"leading-(--
|
|
20
|
-
"tracking-(--
|
|
18
|
+
"text-(length:--lex-button-font-size-md)",
|
|
19
|
+
"leading-(--lex-button-font-line-height)",
|
|
20
|
+
"tracking-(--lex-button-font-letter-spacing)",
|
|
21
21
|
].join(" "),
|
|
22
22
|
{
|
|
23
23
|
variants: {
|
|
24
24
|
variant: {
|
|
25
25
|
primary:
|
|
26
|
-
"border-(--
|
|
26
|
+
"border-(--lex-button-primary-border-color) bg-(--lex-button-primary-background) text-(--lex-button-primary-foreground) hover:bg-(--lex-button-primary-hover-background)",
|
|
27
27
|
secondary:
|
|
28
|
-
"border-(--
|
|
28
|
+
"border-(--lex-button-secondary-border-color) bg-(--lex-button-secondary-background) text-(--lex-button-secondary-foreground) hover:bg-(--lex-button-secondary-hover-background)",
|
|
29
29
|
ghost:
|
|
30
|
-
"border-transparent bg-transparent text-(--
|
|
30
|
+
"border-transparent bg-transparent text-(--lex-button-secondary-foreground) hover:bg-(--lex-button-secondary-hover-background)",
|
|
31
31
|
outline:
|
|
32
|
-
"border-(--
|
|
32
|
+
"border-(--lex-button-secondary-border-color) bg-transparent text-(--lex-button-secondary-foreground) hover:bg-(--lex-button-secondary-hover-background)",
|
|
33
33
|
danger:
|
|
34
|
-
"border-(--
|
|
34
|
+
"border-(--lex-button-danger-border-color) bg-(--lex-button-danger-background) text-(--lex-button-danger-foreground) hover:bg-(--lex-button-danger-hover-background)",
|
|
35
35
|
},
|
|
36
36
|
size: {
|
|
37
37
|
xs: [
|
|
38
|
-
"h-(--
|
|
39
|
-
"px-(--
|
|
40
|
-
"text-(length:--
|
|
38
|
+
"h-(--lex-button-height-xs)",
|
|
39
|
+
"px-(--lex-button-padding-x-xs)",
|
|
40
|
+
"text-(length:--lex-button-font-size-xs)",
|
|
41
41
|
],
|
|
42
42
|
sm: [
|
|
43
|
-
"h-(--
|
|
44
|
-
"px-(--
|
|
45
|
-
"text-(length:--
|
|
43
|
+
"h-(--lex-button-height-sm)",
|
|
44
|
+
"px-(--lex-button-padding-x-sm)",
|
|
45
|
+
"text-(length:--lex-button-font-size-sm)",
|
|
46
46
|
],
|
|
47
47
|
md: [
|
|
48
|
-
"h-(--
|
|
49
|
-
"px-(--
|
|
50
|
-
"text-(length:--
|
|
48
|
+
"h-(--lex-button-height-md)",
|
|
49
|
+
"px-(--lex-button-padding-x-md)",
|
|
50
|
+
"text-(length:--lex-button-font-size-md)",
|
|
51
51
|
],
|
|
52
52
|
lg: [
|
|
53
|
-
"h-(--
|
|
54
|
-
"px-(--
|
|
55
|
-
"text-(length:--
|
|
53
|
+
"h-(--lex-button-height-lg)",
|
|
54
|
+
"px-(--lex-button-padding-x-lg)",
|
|
55
|
+
"text-(length:--lex-button-font-size-lg)",
|
|
56
56
|
],
|
|
57
57
|
xl: [
|
|
58
|
-
"h-(--
|
|
59
|
-
"px-(--
|
|
60
|
-
"text-(length:--
|
|
58
|
+
"h-(--lex-button-height-xl)",
|
|
59
|
+
"px-(--lex-button-padding-x-xl)",
|
|
60
|
+
"text-(length:--lex-button-font-size-xl)",
|
|
61
61
|
],
|
|
62
62
|
},
|
|
63
63
|
},
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import type {
|
|
8
|
+
CardActionProps,
|
|
8
9
|
CardContentProps,
|
|
9
10
|
CardDescriptionProps,
|
|
10
11
|
CardFooterProps,
|
|
@@ -13,6 +14,7 @@ import type {
|
|
|
13
14
|
CardTitleProps,
|
|
14
15
|
} from "./Card.types"
|
|
15
16
|
import {
|
|
17
|
+
cardActionClassName,
|
|
16
18
|
cardContentClassName,
|
|
17
19
|
cardDescriptionClassName,
|
|
18
20
|
cardFooterClassName,
|
|
@@ -82,4 +84,20 @@ const CardFooter = ({ ref, className, ...props }: CardFooterProps) => {
|
|
|
82
84
|
|
|
83
85
|
CardFooter.displayName = "CardFooter"
|
|
84
86
|
|
|
85
|
-
|
|
87
|
+
const CardAction = ({ ref, className, ...props }: CardActionProps) => {
|
|
88
|
+
return (
|
|
89
|
+
<div ref={ref} className={cn(cardActionClassName, className)} {...props} />
|
|
90
|
+
)
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
CardAction.displayName = "CardAction"
|
|
94
|
+
|
|
95
|
+
export {
|
|
96
|
+
Card,
|
|
97
|
+
CardHeader,
|
|
98
|
+
CardTitle,
|
|
99
|
+
CardDescription,
|
|
100
|
+
CardContent,
|
|
101
|
+
CardFooter,
|
|
102
|
+
CardAction,
|
|
103
|
+
}
|
|
@@ -8,19 +8,19 @@ import { cva } from "class-variance-authority"
|
|
|
8
8
|
|
|
9
9
|
export const cardVariants = cva(
|
|
10
10
|
[
|
|
11
|
-
"rounded-(--
|
|
12
|
-
"bg-(--
|
|
13
|
-
"duration-(--
|
|
11
|
+
"rounded-(--lex-card-radius) border border-(--lex-card-border-color)",
|
|
12
|
+
"bg-(--lex-card-background) text-(--lex-card-foreground) transition-colors",
|
|
13
|
+
"duration-(--lex-card-transition-duration) ease-(--lex-card-transition-easing)",
|
|
14
14
|
].join(" "),
|
|
15
15
|
{
|
|
16
16
|
variants: {
|
|
17
17
|
variant: {
|
|
18
18
|
surface: "",
|
|
19
|
-
muted: "bg-(--
|
|
19
|
+
muted: "bg-(--lex-card-muted-background)",
|
|
20
20
|
default: "",
|
|
21
|
-
outlined: "border-(--
|
|
21
|
+
outlined: "border-(--lex-border-strong)",
|
|
22
22
|
elevated:
|
|
23
|
-
"border-transparent shadow-(--
|
|
23
|
+
"border-transparent shadow-(--lex-elevation-shadow-raised-box-shadow)",
|
|
24
24
|
ghost: "border-transparent bg-transparent shadow-none",
|
|
25
25
|
},
|
|
26
26
|
},
|
|
@@ -31,16 +31,19 @@ export const cardVariants = cva(
|
|
|
31
31
|
)
|
|
32
32
|
|
|
33
33
|
export const cardHeaderClassName =
|
|
34
|
-
"grid gap-(--
|
|
34
|
+
"grid grid-cols-[1fr_auto] items-start gap-x-(--lex-card-gap-md) gap-y-(--lex-card-gap-sm) p-(--lex-card-padding) pb-(--lex-card-header-padding-bottom)"
|
|
35
35
|
|
|
36
36
|
export const cardTitleClassName =
|
|
37
|
-
"text-(length:--
|
|
37
|
+
"col-start-1 text-(length:--lex-card-title-font-size) font-(--lex-card-title-font-weight) leading-(--lex-card-title-font-line-height) tracking-(--lex-card-title-font-letter-spacing) text-(--lex-card-title-foreground)"
|
|
38
38
|
|
|
39
39
|
export const cardDescriptionClassName =
|
|
40
|
-
"text-(length:--
|
|
40
|
+
"col-start-1 text-(length:--lex-card-description-font-size) leading-(--lex-card-description-font-line-height) text-(--lex-card-description-foreground)"
|
|
41
41
|
|
|
42
42
|
export const cardContentClassName =
|
|
43
|
-
"p-(--
|
|
43
|
+
"p-(--lex-card-padding) pt-(--lex-card-content-padding-top) text-(length:--lex-card-content-font-size) leading-(--lex-card-content-font-line-height)"
|
|
44
44
|
|
|
45
45
|
export const cardFooterClassName =
|
|
46
|
-
"flex items-center gap-(--
|
|
46
|
+
"flex items-center gap-(--lex-card-gap-md) p-(--lex-card-padding) pt-(--lex-card-footer-padding-top)"
|
|
47
|
+
|
|
48
|
+
export const cardActionClassName =
|
|
49
|
+
"col-start-2 row-start-1 row-span-2 flex items-center gap-(--lex-card-gap-sm)"
|
|
@@ -8,20 +8,20 @@ import { cva } from "class-variance-authority"
|
|
|
8
8
|
|
|
9
9
|
export const checkboxVariants = cva(
|
|
10
10
|
[
|
|
11
|
-
"inline-flex shrink-0 items-center justify-center rounded-(--
|
|
12
|
-
"border-(--
|
|
13
|
-
"transition-colors duration-(--
|
|
14
|
-
"outline-none data-[checked]:border-(--
|
|
15
|
-
"data-[indeterminate]:border-(--
|
|
16
|
-
"data-[focused]:ring-(length:--
|
|
17
|
-
"data-[disabled]:cursor-not-allowed data-[disabled]:opacity-(--
|
|
11
|
+
"inline-flex shrink-0 items-center justify-center rounded-(--lex-checkbox-radius) border",
|
|
12
|
+
"border-(--lex-checkbox-border-color) bg-(--lex-checkbox-background) text-(--lex-checkbox-foreground)",
|
|
13
|
+
"transition-colors duration-(--lex-checkbox-transition-duration) ease-(--lex-checkbox-transition-easing)",
|
|
14
|
+
"outline-none data-[checked]:border-(--lex-checkbox-checked-border-color) data-[checked]:bg-(--lex-checkbox-checked-background) data-[checked]:text-(--lex-checkbox-checked-foreground)",
|
|
15
|
+
"data-[indeterminate]:border-(--lex-checkbox-checked-border-color) data-[indeterminate]:bg-(--lex-checkbox-checked-background)",
|
|
16
|
+
"data-[focused]:ring-(length:--lex-checkbox-focus-ring-width) data-[focused]:ring-(--lex-checkbox-focus-ring-color) data-[focused]:ring-offset-(length:--lex-checkbox-focus-ring-offset) data-[focused]:ring-offset-(--lex-checkbox-focus-ring-offset-color)",
|
|
17
|
+
"data-[disabled]:cursor-not-allowed data-[disabled]:opacity-(--lex-opacity-disabled)",
|
|
18
18
|
].join(" "),
|
|
19
19
|
{
|
|
20
20
|
variants: {
|
|
21
21
|
size: {
|
|
22
|
-
sm: "size-(--
|
|
23
|
-
md: "size-(--
|
|
24
|
-
lg: "size-(--
|
|
22
|
+
sm: "size-(--lex-checkbox-size-sm) text-(length:--lex-checkbox-indicator-font-size-sm)",
|
|
23
|
+
md: "size-(--lex-checkbox-size-md) text-(length:--lex-checkbox-indicator-font-size-md)",
|
|
24
|
+
lg: "size-(--lex-checkbox-size-lg) text-(length:--lex-checkbox-indicator-font-size-lg)",
|
|
25
25
|
},
|
|
26
26
|
},
|
|
27
27
|
defaultVariants: {
|
|
@@ -30,10 +30,6 @@ export const checkboxVariants = cva(
|
|
|
30
30
|
},
|
|
31
31
|
)
|
|
32
32
|
|
|
33
|
-
export const checkboxLabelVariants = cva(
|
|
34
|
-
"inline-flex items-center gap-(--lsys-checkbox-label-gap) text-(length:--lsys-checkbox-label-font-size) font-(--lsys-checkbox-label-font-weight) leading-(--lsys-checkbox-label-font-line-height) text-(--lsys-checkbox-label-foreground)",
|
|
35
|
-
)
|
|
36
|
-
|
|
37
33
|
export const checkboxIndicatorVariants = cva(
|
|
38
|
-
"leading-(--
|
|
34
|
+
"leading-(--lex-checkbox-label-font-line-height)",
|
|
39
35
|
)
|
|
@@ -8,8 +8,8 @@ import { cva } from "class-variance-authority"
|
|
|
8
8
|
|
|
9
9
|
export const checkboxGroupVariants = cva(
|
|
10
10
|
[
|
|
11
|
-
"grid gap-(--
|
|
12
|
-
"data-[disabled]:cursor-not-allowed data-[disabled]:opacity-(--
|
|
11
|
+
"grid gap-(--lex-checkbox-label-gap) text-(length:--lex-checkbox-label-font-size) font-(--lex-checkbox-label-font-weight) leading-(--lex-checkbox-label-font-line-height) text-(--lex-checkbox-label-foreground)",
|
|
12
|
+
"data-[disabled]:cursor-not-allowed data-[disabled]:opacity-(--lex-opacity-disabled)",
|
|
13
13
|
].join(" "),
|
|
14
14
|
{
|
|
15
15
|
variants: {
|
|
@@ -8,12 +8,12 @@ import { cva } from "class-variance-authority"
|
|
|
8
8
|
import { disabledStateClasses } from "@/lib/utils"
|
|
9
9
|
|
|
10
10
|
export const collapsibleVariants = cva(
|
|
11
|
-
"grid rounded-(--
|
|
11
|
+
"grid rounded-(--lex-collapsible-radius) text-(--lex-collapsible-foreground)",
|
|
12
12
|
{
|
|
13
13
|
variants: {
|
|
14
14
|
variant: {
|
|
15
15
|
surface:
|
|
16
|
-
"border border-(--
|
|
16
|
+
"border border-(--lex-collapsible-border-color) bg-(--lex-collapsible-background)",
|
|
17
17
|
plain: "bg-transparent",
|
|
18
18
|
},
|
|
19
19
|
},
|
|
@@ -25,20 +25,20 @@ export const collapsibleVariants = cva(
|
|
|
25
25
|
|
|
26
26
|
export const collapsibleTriggerVariants = cva(
|
|
27
27
|
[
|
|
28
|
-
"flex w-full items-center justify-between gap-(--
|
|
29
|
-
"text-(length:--
|
|
30
|
-
"transition-colors duration-(--
|
|
31
|
-
"outline-none hover:bg-(--
|
|
28
|
+
"flex w-full items-center justify-between gap-(--lex-collapsible-trigger-gap) px-(--lex-collapsible-trigger-padding-x) py-(--lex-collapsible-trigger-padding-y) text-left",
|
|
29
|
+
"text-(length:--lex-collapsible-trigger-font-size) font-(--lex-collapsible-trigger-font-weight) leading-(--lex-collapsible-trigger-font-line-height)",
|
|
30
|
+
"transition-colors duration-(--lex-collapsible-transition-duration) ease-(--lex-collapsible-transition-easing)",
|
|
31
|
+
"outline-none hover:bg-(--lex-collapsible-trigger-background-hover) focus-visible:ring-(length:--lex-collapsible-focus-ring-width) focus-visible:ring-inset focus-visible:ring-(--lex-collapsible-focus-ring-color)",
|
|
32
32
|
disabledStateClasses,
|
|
33
|
-
"[&>svg]:size-(--
|
|
33
|
+
"[&>svg]:size-(--lex-collapsible-trigger-icon-size) [&>svg]:transition-transform data-[panel-open]:[&>svg]:rotate-45",
|
|
34
34
|
].join(" "),
|
|
35
35
|
)
|
|
36
36
|
|
|
37
37
|
export const collapsiblePanelVariants = cva(
|
|
38
38
|
[
|
|
39
|
-
"overflow-hidden px-(--
|
|
40
|
-
"text-(length:--
|
|
41
|
-
"transition-[height,opacity] duration-(--
|
|
39
|
+
"overflow-hidden px-(--lex-collapsible-panel-padding-x) pb-(--lex-collapsible-panel-padding-bottom)",
|
|
40
|
+
"text-(length:--lex-collapsible-panel-font-size) leading-(--lex-collapsible-panel-font-line-height) text-(--lex-collapsible-panel-foreground)",
|
|
41
|
+
"transition-[height,opacity] duration-(--lex-collapsible-transition-duration) ease-(--lex-collapsible-transition-easing)",
|
|
42
42
|
"data-[starting-style]:h-0 data-[starting-style]:opacity-0 data-[ending-style]:h-0 data-[ending-style]:opacity-0",
|
|
43
43
|
].join(" "),
|
|
44
44
|
)
|