@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
|
@@ -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
|
|
|
@@ -6,26 +6,25 @@
|
|
|
6
6
|
|
|
7
7
|
import { cva } from "class-variance-authority"
|
|
8
8
|
|
|
9
|
-
export const
|
|
10
|
-
"text-(length:--
|
|
11
|
-
)
|
|
9
|
+
export const selectLabelClasses =
|
|
10
|
+
"text-(length:--lex-select-label-font-size) font-(--lex-select-label-font-weight) leading-(--lex-select-label-font-line-height) text-(--lex-select-label-foreground)"
|
|
12
11
|
|
|
13
12
|
export const selectTriggerVariants = cva(
|
|
14
13
|
[
|
|
15
|
-
"inline-flex w-full min-w-0 items-center justify-between gap-(--
|
|
16
|
-
"border-(--
|
|
17
|
-
"font-(family-name:--
|
|
18
|
-
"transition-colors duration-(--
|
|
19
|
-
"outline-none data-[focused]:border-(--
|
|
20
|
-
"data-[invalid]:border-(--
|
|
21
|
-
"data-[disabled]:cursor-not-allowed data-[disabled]:opacity-(--
|
|
14
|
+
"inline-flex w-full min-w-0 items-center justify-between gap-(--lex-select-trigger-gap) rounded-(--lex-select-radius) border",
|
|
15
|
+
"border-(--lex-select-border-color) bg-(--lex-select-background) text-(--lex-select-foreground)",
|
|
16
|
+
"font-(family-name:--lex-select-font-family) font-(--lex-select-font-weight) leading-(--lex-select-font-line-height) tracking-(--lex-select-font-letter-spacing)",
|
|
17
|
+
"transition-colors duration-(--lex-select-transition-duration) ease-(--lex-select-transition-easing)",
|
|
18
|
+
"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)",
|
|
19
|
+
"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)",
|
|
20
|
+
"data-[disabled]:cursor-not-allowed data-[disabled]:opacity-(--lex-opacity-disabled)",
|
|
22
21
|
].join(" "),
|
|
23
22
|
{
|
|
24
23
|
variants: {
|
|
25
24
|
size: {
|
|
26
|
-
sm: "h-(--
|
|
27
|
-
md: "h-(--
|
|
28
|
-
lg: "h-(--
|
|
25
|
+
sm: "h-(--lex-select-height-sm) px-(--lex-select-padding-x-sm) text-(length:--lex-select-font-size-sm)",
|
|
26
|
+
md: "h-(--lex-select-height-md) px-(--lex-select-padding-x-md) text-(length:--lex-select-font-size-md)",
|
|
27
|
+
lg: "h-(--lex-select-height-lg) px-(--lex-select-padding-x-lg) text-(length:--lex-select-font-size-lg)",
|
|
29
28
|
},
|
|
30
29
|
},
|
|
31
30
|
defaultVariants: {
|
|
@@ -34,61 +33,47 @@ export const selectTriggerVariants = cva(
|
|
|
34
33
|
},
|
|
35
34
|
)
|
|
36
35
|
|
|
37
|
-
export const
|
|
38
|
-
"min-w-0 flex-1 truncate text-left data-[placeholder]:text-(--
|
|
39
|
-
)
|
|
36
|
+
export const selectValueClasses =
|
|
37
|
+
"min-w-0 flex-1 truncate text-left data-[placeholder]:text-(--lex-select-placeholder-color)"
|
|
40
38
|
|
|
41
|
-
export const
|
|
42
|
-
"inline-flex size-(--
|
|
43
|
-
)
|
|
39
|
+
export const selectIconClasses =
|
|
40
|
+
"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"
|
|
44
41
|
|
|
45
|
-
export const
|
|
46
|
-
"fixed inset-0 z-(--
|
|
47
|
-
)
|
|
42
|
+
export const selectBackdropClasses =
|
|
43
|
+
"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"
|
|
48
44
|
|
|
49
|
-
export const
|
|
50
|
-
"z-(--lsys-select-positioner-z-index)",
|
|
51
|
-
)
|
|
45
|
+
export const selectPositionerClasses = "z-(--lex-select-positioner-z-index)"
|
|
52
46
|
|
|
53
|
-
export const
|
|
54
|
-
[
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
].join(" "),
|
|
60
|
-
)
|
|
47
|
+
export const selectPopupClasses = [
|
|
48
|
+
"min-w-[var(--anchor-width)] overflow-hidden rounded-(--lex-select-radius) border",
|
|
49
|
+
"border-(--lex-select-popup-border-color) bg-(--lex-select-popup-background) text-(--lex-select-popup-foreground) shadow-(--lex-select-popup-shadow)",
|
|
50
|
+
"data-[starting-style]:scale-95 data-[starting-style]:opacity-0 data-[ending-style]:scale-95 data-[ending-style]:opacity-0",
|
|
51
|
+
"origin-[var(--transform-origin)] transition-[opacity,transform] duration-(--lex-select-transition-duration) ease-(--lex-select-transition-easing)",
|
|
52
|
+
].join(" ")
|
|
61
53
|
|
|
62
|
-
export const
|
|
63
|
-
"grid max-h-(--
|
|
64
|
-
)
|
|
54
|
+
export const selectListClasses =
|
|
55
|
+
"grid max-h-(--lex-select-popup-max-height) gap-(--lex-select-list-gap) overflow-y-auto p-(--lex-select-list-padding)"
|
|
65
56
|
|
|
66
|
-
export const
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
].join(" "),
|
|
74
|
-
)
|
|
57
|
+
export const selectItemClasses = [
|
|
58
|
+
"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)",
|
|
59
|
+
"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",
|
|
60
|
+
"data-[highlighted]:bg-(--lex-select-item-highlight-background) data-[highlighted]:text-(--lex-select-item-highlight-foreground)",
|
|
61
|
+
"data-[selected]:bg-(--lex-select-item-selected-background) data-[selected]:text-(--lex-select-item-selected-foreground)",
|
|
62
|
+
"data-[disabled]:pointer-events-none data-[disabled]:opacity-(--lex-opacity-disabled)",
|
|
63
|
+
].join(" ")
|
|
75
64
|
|
|
76
|
-
export const
|
|
77
|
-
"inline-flex size-(--
|
|
78
|
-
)
|
|
65
|
+
export const selectItemIndicatorClasses =
|
|
66
|
+
"inline-flex size-(--lex-select-item-indicator-size) shrink-0 items-center justify-center text-current"
|
|
79
67
|
|
|
80
|
-
export const
|
|
68
|
+
export const selectItemTextClasses = "min-w-0 flex-1 truncate"
|
|
81
69
|
|
|
82
|
-
export const
|
|
83
|
-
"size-(--
|
|
84
|
-
)
|
|
70
|
+
export const selectArrowClasses =
|
|
71
|
+
"size-(--lex-select-arrow-size) rotate-45 border border-(--lex-select-popup-border-color) bg-(--lex-select-popup-background)"
|
|
85
72
|
|
|
86
|
-
export const
|
|
87
|
-
"flex h-(--
|
|
88
|
-
)
|
|
73
|
+
export const selectScrollArrowClasses =
|
|
74
|
+
"flex h-(--lex-select-scroll-arrow-height) items-center justify-center text-(--lex-select-icon-foreground)"
|
|
89
75
|
|
|
90
|
-
export const
|
|
76
|
+
export const selectGroupClasses = "grid gap-(--lex-select-group-gap)"
|
|
91
77
|
|
|
92
|
-
export const
|
|
93
|
-
"px-(--
|
|
94
|
-
)
|
|
78
|
+
export const selectGroupLabelClasses =
|
|
79
|
+
"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)"
|
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
|
|
7
7
|
import { cva } from "class-variance-authority"
|
|
8
8
|
|
|
9
|
-
export const separatorVariants = cva("shrink-0 bg-(--
|
|
9
|
+
export const separatorVariants = cva("shrink-0 bg-(--lex-separator-color)", {
|
|
10
10
|
variants: {
|
|
11
11
|
orientation: {
|
|
12
|
-
horizontal: "h-(--
|
|
13
|
-
vertical: "h-full w-(--
|
|
12
|
+
horizontal: "h-(--lex-separator-thickness) w-full",
|
|
13
|
+
vertical: "h-full w-(--lex-separator-thickness)",
|
|
14
14
|
},
|
|
15
15
|
},
|
|
16
16
|
defaultVariants: {
|
|
@@ -15,13 +15,13 @@ import type {
|
|
|
15
15
|
SliderValueProps,
|
|
16
16
|
} from "./Slider.types"
|
|
17
17
|
import {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
18
|
+
sliderClasses,
|
|
19
|
+
sliderControlClasses,
|
|
20
|
+
sliderIndicatorClasses,
|
|
21
|
+
sliderLabelClasses,
|
|
22
|
+
sliderThumbClasses,
|
|
23
|
+
sliderTrackClasses,
|
|
24
|
+
sliderValueClasses,
|
|
25
25
|
} from "./Slider.variants"
|
|
26
26
|
import { mergeClassName } from "@/lib/utils"
|
|
27
27
|
|
|
@@ -29,7 +29,7 @@ const Slider = ({ ref, className, children, ...props }: SliderProps) => {
|
|
|
29
29
|
return (
|
|
30
30
|
<BaseSlider.Root
|
|
31
31
|
ref={ref}
|
|
32
|
-
className={mergeClassName(
|
|
32
|
+
className={mergeClassName(sliderClasses, className)}
|
|
33
33
|
{...props}
|
|
34
34
|
>
|
|
35
35
|
{children}
|
|
@@ -46,7 +46,7 @@ const SliderControl = ({
|
|
|
46
46
|
}: SliderControlProps) => {
|
|
47
47
|
return (
|
|
48
48
|
<BaseSlider.Control
|
|
49
|
-
className={mergeClassName(
|
|
49
|
+
className={mergeClassName(sliderControlClasses, className)}
|
|
50
50
|
{...props}
|
|
51
51
|
>
|
|
52
52
|
{children}
|
|
@@ -59,7 +59,7 @@ SliderControl.displayName = "SliderControl"
|
|
|
59
59
|
const SliderTrack = ({ className, children, ...props }: SliderTrackProps) => {
|
|
60
60
|
return (
|
|
61
61
|
<BaseSlider.Track
|
|
62
|
-
className={mergeClassName(
|
|
62
|
+
className={mergeClassName(sliderTrackClasses, className)}
|
|
63
63
|
{...props}
|
|
64
64
|
>
|
|
65
65
|
{children}
|
|
@@ -72,7 +72,7 @@ SliderTrack.displayName = "SliderTrack"
|
|
|
72
72
|
const SliderIndicator = ({ className, ...props }: SliderIndicatorProps) => {
|
|
73
73
|
return (
|
|
74
74
|
<BaseSlider.Indicator
|
|
75
|
-
className={mergeClassName(
|
|
75
|
+
className={mergeClassName(sliderIndicatorClasses, className)}
|
|
76
76
|
{...props}
|
|
77
77
|
/>
|
|
78
78
|
)
|
|
@@ -83,7 +83,7 @@ SliderIndicator.displayName = "SliderIndicator"
|
|
|
83
83
|
const SliderThumb = ({ className, ...props }: SliderThumbProps) => {
|
|
84
84
|
return (
|
|
85
85
|
<BaseSlider.Thumb
|
|
86
|
-
className={mergeClassName(
|
|
86
|
+
className={mergeClassName(sliderThumbClasses, className)}
|
|
87
87
|
{...props}
|
|
88
88
|
/>
|
|
89
89
|
)
|
|
@@ -94,7 +94,7 @@ SliderThumb.displayName = "SliderThumb"
|
|
|
94
94
|
const SliderLabel = ({ className, ...props }: SliderLabelProps) => {
|
|
95
95
|
return (
|
|
96
96
|
<BaseSlider.Label
|
|
97
|
-
className={mergeClassName(
|
|
97
|
+
className={mergeClassName(sliderLabelClasses, className)}
|
|
98
98
|
{...props}
|
|
99
99
|
/>
|
|
100
100
|
)
|
|
@@ -105,7 +105,7 @@ SliderLabel.displayName = "SliderLabel"
|
|
|
105
105
|
const SliderValue = ({ className, ...props }: SliderValueProps) => {
|
|
106
106
|
return (
|
|
107
107
|
<BaseSlider.Value
|
|
108
|
-
className={mergeClassName(
|
|
108
|
+
className={mergeClassName(sliderValueClasses, className)}
|
|
109
109
|
{...props}
|
|
110
110
|
/>
|
|
111
111
|
)
|
|
@@ -4,35 +4,26 @@
|
|
|
4
4
|
* Defines visual variants using class composition.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
export const sliderClasses = "grid gap-(--lex-slider-gap)"
|
|
8
8
|
|
|
9
|
-
export const
|
|
9
|
+
export const sliderControlClasses =
|
|
10
|
+
"relative flex touch-none items-center py-(--lex-slider-control-padding-y) data-[disabled]:opacity-(--lex-opacity-disabled)"
|
|
10
11
|
|
|
11
|
-
export const
|
|
12
|
-
"relative
|
|
13
|
-
)
|
|
12
|
+
export const sliderTrackClasses =
|
|
13
|
+
"relative h-(--lex-slider-track-height) w-full overflow-hidden rounded-(--lex-slider-track-radius) bg-(--lex-slider-track-background)"
|
|
14
14
|
|
|
15
|
-
export const
|
|
16
|
-
"
|
|
17
|
-
)
|
|
15
|
+
export const sliderIndicatorClasses =
|
|
16
|
+
"h-full bg-(--lex-slider-indicator-background)"
|
|
18
17
|
|
|
19
|
-
export const
|
|
20
|
-
"
|
|
21
|
-
)
|
|
18
|
+
export const sliderThumbClasses = [
|
|
19
|
+
"block size-(--lex-slider-thumb-size) rounded-(--lex-slider-thumb-radius) border border-(--lex-slider-thumb-border-color) bg-(--lex-slider-thumb-background) shadow-sm",
|
|
20
|
+
"outline-none transition-colors duration-(--lex-slider-transition-duration) ease-(--lex-slider-transition-easing)",
|
|
21
|
+
"focus-visible:ring-(length:--lex-slider-focus-ring-width) focus-visible:ring-(--lex-slider-focus-ring-color) focus-visible:ring-offset-(length:--lex-slider-focus-ring-offset) focus-visible:ring-offset-(--lex-slider-focus-ring-offset-color)",
|
|
22
|
+
"data-[disabled]:cursor-not-allowed",
|
|
23
|
+
].join(" ")
|
|
22
24
|
|
|
23
|
-
export const
|
|
24
|
-
|
|
25
|
-
"block size-(--lsys-slider-thumb-size) rounded-(--lsys-slider-thumb-radius) border border-(--lsys-slider-thumb-border-color) bg-(--lsys-slider-thumb-background) shadow-sm",
|
|
26
|
-
"outline-none transition-colors duration-(--lsys-slider-transition-duration) ease-(--lsys-slider-transition-easing)",
|
|
27
|
-
"focus-visible:ring-(length:--lsys-slider-focus-ring-width) focus-visible:ring-(--lsys-slider-focus-ring-color) focus-visible:ring-offset-(length:--lsys-slider-focus-ring-offset) focus-visible:ring-offset-(--lsys-slider-focus-ring-offset-color)",
|
|
28
|
-
"data-[disabled]:cursor-not-allowed",
|
|
29
|
-
].join(" "),
|
|
30
|
-
)
|
|
25
|
+
export const sliderLabelClasses =
|
|
26
|
+
"font-(--lex-meter-label-font-weight) text-(length:--lex-meter-label-font-size) leading-(--lex-meter-label-font-line-height) text-(--lex-meter-label-foreground)"
|
|
31
27
|
|
|
32
|
-
export const
|
|
33
|
-
"font-(--
|
|
34
|
-
)
|
|
35
|
-
|
|
36
|
-
export const sliderValueVariants = cva(
|
|
37
|
-
"font-(--lsys-meter-value-font-weight) text-(--lsys-meter-value-foreground)",
|
|
38
|
-
)
|
|
28
|
+
export const sliderValueClasses =
|
|
29
|
+
"font-(--lex-meter-value-font-weight) text-(--lex-meter-value-foreground)"
|
|
@@ -13,7 +13,7 @@ export interface SwitchProps extends Omit<
|
|
|
13
13
|
BaseSwitch.Root.Props,
|
|
14
14
|
"className" | "children"
|
|
15
15
|
> {
|
|
16
|
-
ref?: Ref<
|
|
16
|
+
ref?: Ref<HTMLButtonElement>
|
|
17
17
|
size?: SwitchSize
|
|
18
18
|
className?: BaseSwitch.Root.Props["className"]
|
|
19
19
|
children?: BaseSwitch.Root.Props["children"]
|
|
@@ -23,7 +23,7 @@ export interface SwitchThumbProps extends Omit<
|
|
|
23
23
|
BaseSwitch.Thumb.Props,
|
|
24
24
|
"className"
|
|
25
25
|
> {
|
|
26
|
-
ref?: Ref<
|
|
26
|
+
ref?: Ref<HTMLSpanElement>
|
|
27
27
|
size?: SwitchSize
|
|
28
28
|
className?: BaseSwitch.Thumb.Props["className"]
|
|
29
29
|
}
|
|
@@ -8,18 +8,18 @@ import { cva } from "class-variance-authority"
|
|
|
8
8
|
|
|
9
9
|
export const switchVariants = cva(
|
|
10
10
|
[
|
|
11
|
-
"inline-flex shrink-0 cursor-pointer items-center rounded-(--
|
|
12
|
-
"transition-colors duration-(--
|
|
13
|
-
"outline-none data-[checked]:bg-(--
|
|
14
|
-
"data-[focused]:ring-(length:--
|
|
15
|
-
"data-[disabled]:cursor-not-allowed data-[disabled]:opacity-(--
|
|
11
|
+
"inline-flex shrink-0 cursor-pointer items-center rounded-(--lex-switch-radius) border border-transparent bg-(--lex-switch-background) p-(--lex-switch-padding)",
|
|
12
|
+
"transition-colors duration-(--lex-switch-transition-duration) ease-(--lex-switch-transition-easing)",
|
|
13
|
+
"outline-none data-[checked]:bg-(--lex-switch-checked-background)",
|
|
14
|
+
"data-[focused]:ring-(length:--lex-switch-focus-ring-width) data-[focused]:ring-(--lex-switch-focus-ring-color) data-[focused]:ring-offset-(length:--lex-switch-focus-ring-offset) data-[focused]:ring-offset-(--lex-switch-focus-ring-offset-color)",
|
|
15
|
+
"data-[disabled]:cursor-not-allowed data-[disabled]:opacity-(--lex-opacity-disabled)",
|
|
16
16
|
].join(" "),
|
|
17
17
|
{
|
|
18
18
|
variants: {
|
|
19
19
|
size: {
|
|
20
|
-
sm: "h-(--
|
|
21
|
-
md: "h-(--
|
|
22
|
-
lg: "h-(--
|
|
20
|
+
sm: "h-(--lex-switch-height-sm) w-(--lex-switch-width-sm)",
|
|
21
|
+
md: "h-(--lex-switch-height-md) w-(--lex-switch-width-md)",
|
|
22
|
+
lg: "h-(--lex-switch-height-lg) w-(--lex-switch-width-lg)",
|
|
23
23
|
},
|
|
24
24
|
},
|
|
25
25
|
defaultVariants: {
|
|
@@ -30,15 +30,15 @@ export const switchVariants = cva(
|
|
|
30
30
|
|
|
31
31
|
export const switchThumbVariants = cva(
|
|
32
32
|
[
|
|
33
|
-
"block rounded-(--
|
|
34
|
-
"transition-transform duration-(--
|
|
33
|
+
"block rounded-(--lex-switch-thumb-radius) bg-(--lex-switch-thumb-background) shadow-sm ring-0",
|
|
34
|
+
"transition-transform duration-(--lex-switch-transition-duration) ease-(--lex-switch-transition-easing)",
|
|
35
35
|
].join(" "),
|
|
36
36
|
{
|
|
37
37
|
variants: {
|
|
38
38
|
size: {
|
|
39
|
-
sm: "size-(--
|
|
40
|
-
md: "size-(--
|
|
41
|
-
lg: "size-(--
|
|
39
|
+
sm: "size-(--lex-switch-thumb-size-sm) data-[checked]:translate-x-(--lex-switch-thumb-translate-sm)",
|
|
40
|
+
md: "size-(--lex-switch-thumb-size-md) data-[checked]:translate-x-(--lex-switch-thumb-translate-md)",
|
|
41
|
+
lg: "size-(--lex-switch-thumb-size-lg) data-[checked]:translate-x-(--lex-switch-thumb-translate-lg)",
|
|
42
42
|
},
|
|
43
43
|
},
|
|
44
44
|
defaultVariants: {
|
|
@@ -7,23 +7,23 @@
|
|
|
7
7
|
import { cva } from "class-variance-authority"
|
|
8
8
|
import { disabledStateClasses } from "@/lib/utils"
|
|
9
9
|
|
|
10
|
-
export const tabsRootVariants = cva("grid gap-(--
|
|
10
|
+
export const tabsRootVariants = cva("grid gap-(--lex-tabs-gap)")
|
|
11
11
|
|
|
12
12
|
export const tabsListVariants = cva(
|
|
13
|
-
"inline-flex w-fit items-center rounded-(--
|
|
13
|
+
"inline-flex w-fit items-center rounded-(--lex-tabs-list-radius) bg-(--lex-tabs-list-background) p-(--lex-tabs-list-padding)",
|
|
14
14
|
)
|
|
15
15
|
|
|
16
16
|
export const tabsTabVariants = cva(
|
|
17
17
|
[
|
|
18
|
-
"inline-flex items-center justify-center rounded-(--
|
|
19
|
-
"text-(length:--
|
|
20
|
-
"transition-colors duration-(--
|
|
21
|
-
"outline-none data-[active]:bg-(--
|
|
22
|
-
"focus-visible:ring-(length:--
|
|
18
|
+
"inline-flex items-center justify-center rounded-(--lex-tabs-tab-radius) px-(--lex-tabs-tab-padding-x) py-(--lex-tabs-tab-padding-y)",
|
|
19
|
+
"text-(length:--lex-tabs-tab-font-size) font-(--lex-tabs-tab-font-weight) leading-(--lex-tabs-tab-font-line-height) text-(--lex-tabs-tab-foreground)",
|
|
20
|
+
"transition-colors duration-(--lex-tabs-transition-duration) ease-(--lex-tabs-transition-easing)",
|
|
21
|
+
"outline-none data-[active]:bg-(--lex-tabs-tab-active-background) data-[active]:text-(--lex-tabs-tab-active-foreground) data-[active]:shadow-sm",
|
|
22
|
+
"focus-visible:ring-(length:--lex-tabs-focus-ring-width) focus-visible:ring-(--lex-tabs-focus-ring-color)",
|
|
23
23
|
disabledStateClasses,
|
|
24
24
|
].join(" "),
|
|
25
25
|
)
|
|
26
26
|
|
|
27
27
|
export const tabsPanelVariants = cva(
|
|
28
|
-
"text-(length:--
|
|
28
|
+
"text-(length:--lex-tabs-panel-font-size) leading-(--lex-tabs-panel-font-line-height) text-(--lex-tabs-panel-foreground) outline-none focus-visible:ring-(length:--lex-tabs-focus-ring-width) focus-visible:ring-(--lex-tabs-focus-ring-color)",
|
|
29
29
|
)
|