@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
|
@@ -33,59 +33,39 @@ import type {
|
|
|
33
33
|
SidebarItemButtonProps,
|
|
34
34
|
SidebarItemLinkProps,
|
|
35
35
|
SidebarItemProps,
|
|
36
|
-
SidebarItemSize,
|
|
37
|
-
SidebarItemVariant,
|
|
38
36
|
SidebarListProps,
|
|
39
37
|
SidebarMobileHeaderProps,
|
|
40
38
|
SidebarProps,
|
|
41
39
|
SidebarTriggerProps,
|
|
42
40
|
} from "./Sidebar.types"
|
|
43
41
|
import {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
sidebarRootVariants,
|
|
42
|
+
sidebarBrandClasses,
|
|
43
|
+
sidebarDesktopClasses,
|
|
44
|
+
sidebarDrawerFooterClasses,
|
|
45
|
+
sidebarFooterClasses,
|
|
46
|
+
sidebarGroupContentClasses,
|
|
47
|
+
sidebarGroupLabelClasses,
|
|
48
|
+
sidebarGroupClasses,
|
|
49
|
+
sidebarMainClasses,
|
|
50
|
+
sidebarMobileHeaderClasses,
|
|
51
|
+
sidebarNavItemClasses,
|
|
52
|
+
sidebarNavListClasses,
|
|
53
|
+
sidebarNavClasses,
|
|
54
|
+
sidebarRootClasses,
|
|
58
55
|
} from "./Sidebar.variants"
|
|
59
56
|
import { cn } from "@/lib/utils"
|
|
60
57
|
|
|
61
|
-
interface SidebarContextValue {
|
|
62
|
-
itemVariant: SidebarItemVariant
|
|
63
|
-
itemSize: SidebarItemSize
|
|
64
|
-
}
|
|
65
|
-
|
|
66
58
|
interface SidebarMobileContextValue {
|
|
67
59
|
closeOnSelect: boolean
|
|
68
60
|
}
|
|
69
61
|
|
|
70
|
-
const SidebarContext = createContext<SidebarContextValue>({
|
|
71
|
-
itemVariant: "ghost",
|
|
72
|
-
itemSize: "sm",
|
|
73
|
-
})
|
|
74
|
-
|
|
75
62
|
const SidebarMobileContext = createContext<SidebarMobileContextValue>({
|
|
76
63
|
closeOnSelect: false,
|
|
77
64
|
})
|
|
78
65
|
|
|
79
66
|
const useSidebarMobileContext = () => useContext(SidebarMobileContext)
|
|
80
67
|
|
|
81
|
-
const Sidebar = ({
|
|
82
|
-
ref,
|
|
83
|
-
className,
|
|
84
|
-
itemVariant = "ghost",
|
|
85
|
-
itemSize = "sm",
|
|
86
|
-
children,
|
|
87
|
-
...props
|
|
88
|
-
}: SidebarProps) => {
|
|
68
|
+
const Sidebar = ({ ref, className, children, ...props }: SidebarProps) => {
|
|
89
69
|
const sidebarBody = (
|
|
90
70
|
<SidebarMobileContext.Provider value={{ closeOnSelect: false }}>
|
|
91
71
|
{children}
|
|
@@ -95,7 +75,7 @@ const Sidebar = ({
|
|
|
95
75
|
const drawerBody = (
|
|
96
76
|
<SidebarMobileContext.Provider value={{ closeOnSelect: true }}>
|
|
97
77
|
{children}
|
|
98
|
-
<div className={
|
|
78
|
+
<div className={sidebarDrawerFooterClasses()}>
|
|
99
79
|
<DrawerClose render={<Button variant="secondary" size="sm" />}>
|
|
100
80
|
Close
|
|
101
81
|
</DrawerClose>
|
|
@@ -104,38 +84,26 @@ const Sidebar = ({
|
|
|
104
84
|
)
|
|
105
85
|
|
|
106
86
|
return (
|
|
107
|
-
<
|
|
108
|
-
<
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
<DrawerDescription className="sr-only">
|
|
128
|
-
Application navigation links
|
|
129
|
-
</DrawerDescription>
|
|
130
|
-
{drawerBody}
|
|
131
|
-
</DrawerContent>
|
|
132
|
-
</DrawerPopup>
|
|
133
|
-
</DrawerViewport>
|
|
134
|
-
</DrawerPortal>
|
|
135
|
-
</Drawer>
|
|
136
|
-
</div>
|
|
137
|
-
</aside>
|
|
138
|
-
</SidebarContext.Provider>
|
|
87
|
+
<aside ref={ref} className={cn(sidebarRootClasses(), className)} {...props}>
|
|
88
|
+
<Drawer swipeDirection="left">
|
|
89
|
+
<div className={sidebarDesktopClasses()}>{sidebarBody}</div>
|
|
90
|
+
<DrawerPortal>
|
|
91
|
+
<DrawerBackdrop />
|
|
92
|
+
<DrawerViewport side="left">
|
|
93
|
+
<DrawerPopup side="left" size="sm">
|
|
94
|
+
<DrawerClose aria-label="Close navigation" />
|
|
95
|
+
<DrawerContent className={sidebarMainClasses()}>
|
|
96
|
+
<DrawerTitle className="sr-only">Navigation</DrawerTitle>
|
|
97
|
+
<DrawerDescription className="sr-only">
|
|
98
|
+
Application navigation links
|
|
99
|
+
</DrawerDescription>
|
|
100
|
+
{drawerBody}
|
|
101
|
+
</DrawerContent>
|
|
102
|
+
</DrawerPopup>
|
|
103
|
+
</DrawerViewport>
|
|
104
|
+
</DrawerPortal>
|
|
105
|
+
</Drawer>
|
|
106
|
+
</aside>
|
|
139
107
|
)
|
|
140
108
|
}
|
|
141
109
|
|
|
@@ -148,7 +116,7 @@ const SidebarHeader = ({
|
|
|
148
116
|
...props
|
|
149
117
|
}: SidebarHeaderProps) => {
|
|
150
118
|
return (
|
|
151
|
-
<div ref={ref} className={cn(
|
|
119
|
+
<div ref={ref} className={cn(sidebarBrandClasses(), className)} {...props}>
|
|
152
120
|
{children}
|
|
153
121
|
</div>
|
|
154
122
|
)
|
|
@@ -163,7 +131,7 @@ const SidebarContent = ({
|
|
|
163
131
|
...props
|
|
164
132
|
}: SidebarContentProps) => {
|
|
165
133
|
return (
|
|
166
|
-
<ScrollArea className={
|
|
134
|
+
<ScrollArea className={sidebarNavClasses()}>
|
|
167
135
|
<ScrollAreaViewport>
|
|
168
136
|
<ScrollAreaContent>
|
|
169
137
|
<nav
|
|
@@ -189,11 +157,7 @@ const SidebarFooter = ({
|
|
|
189
157
|
...props
|
|
190
158
|
}: SidebarFooterProps) => {
|
|
191
159
|
return (
|
|
192
|
-
<div
|
|
193
|
-
ref={ref}
|
|
194
|
-
className={cn(sidebarFooterVariants(), className)}
|
|
195
|
-
{...props}
|
|
196
|
-
>
|
|
160
|
+
<div ref={ref} className={cn(sidebarFooterClasses(), className)} {...props}>
|
|
197
161
|
{children}
|
|
198
162
|
</div>
|
|
199
163
|
)
|
|
@@ -237,7 +201,7 @@ const SidebarMobileHeader = ({
|
|
|
237
201
|
return (
|
|
238
202
|
<div
|
|
239
203
|
ref={ref}
|
|
240
|
-
className={cn(
|
|
204
|
+
className={cn(sidebarMobileHeaderClasses(), className)}
|
|
241
205
|
{...props}
|
|
242
206
|
>
|
|
243
207
|
{children}
|
|
@@ -254,7 +218,7 @@ const SidebarGroup = ({
|
|
|
254
218
|
...props
|
|
255
219
|
}: SidebarGroupProps) => {
|
|
256
220
|
return (
|
|
257
|
-
<div ref={ref} className={cn(
|
|
221
|
+
<div ref={ref} className={cn(sidebarGroupClasses(), className)} {...props}>
|
|
258
222
|
{children}
|
|
259
223
|
</div>
|
|
260
224
|
)
|
|
@@ -271,7 +235,7 @@ const SidebarGroupLabel = ({
|
|
|
271
235
|
return (
|
|
272
236
|
<div
|
|
273
237
|
ref={ref}
|
|
274
|
-
className={cn(
|
|
238
|
+
className={cn(sidebarGroupLabelClasses(), className)}
|
|
275
239
|
{...props}
|
|
276
240
|
>
|
|
277
241
|
{children}
|
|
@@ -290,7 +254,7 @@ const SidebarGroupContent = ({
|
|
|
290
254
|
return (
|
|
291
255
|
<div
|
|
292
256
|
ref={ref}
|
|
293
|
-
className={cn(
|
|
257
|
+
className={cn(sidebarGroupContentClasses(), className)}
|
|
294
258
|
{...props}
|
|
295
259
|
>
|
|
296
260
|
{children}
|
|
@@ -307,11 +271,7 @@ const SidebarList = ({
|
|
|
307
271
|
...props
|
|
308
272
|
}: SidebarListProps) => {
|
|
309
273
|
return (
|
|
310
|
-
<ul
|
|
311
|
-
ref={ref}
|
|
312
|
-
className={cn(sidebarNavListVariants(), className)}
|
|
313
|
-
{...props}
|
|
314
|
-
>
|
|
274
|
+
<ul ref={ref} className={cn(sidebarNavListClasses(), className)} {...props}>
|
|
315
275
|
{children}
|
|
316
276
|
</ul>
|
|
317
277
|
)
|
|
@@ -342,7 +302,7 @@ const SidebarItemLink = ({
|
|
|
342
302
|
...props
|
|
343
303
|
}: SidebarItemLinkProps) => {
|
|
344
304
|
const { closeOnSelect } = useSidebarMobileContext()
|
|
345
|
-
const linkClassName = cn(
|
|
305
|
+
const linkClassName = cn(sidebarNavItemClasses(active), className)
|
|
346
306
|
|
|
347
307
|
if (!closeOnSelect) {
|
|
348
308
|
return (
|
|
@@ -373,7 +333,7 @@ const SidebarItemButton = ({
|
|
|
373
333
|
...props
|
|
374
334
|
}: SidebarItemButtonProps) => {
|
|
375
335
|
const { closeOnSelect } = useSidebarMobileContext()
|
|
376
|
-
const buttonClassName = cn(
|
|
336
|
+
const buttonClassName = cn(sidebarNavItemClasses(active), className)
|
|
377
337
|
|
|
378
338
|
if (!closeOnSelect) {
|
|
379
339
|
return (
|
|
@@ -14,14 +14,9 @@ import type {
|
|
|
14
14
|
} from "react"
|
|
15
15
|
import type { ButtonProps } from "../../primitives/Button/Button.types"
|
|
16
16
|
|
|
17
|
-
export type SidebarItemVariant = ButtonProps["variant"]
|
|
18
|
-
export type SidebarItemSize = ButtonProps["size"]
|
|
19
|
-
|
|
20
17
|
export interface SidebarProps extends HTMLAttributes<HTMLElement> {
|
|
21
18
|
ref?: Ref<HTMLElement>
|
|
22
19
|
className?: string
|
|
23
|
-
itemVariant?: SidebarItemVariant
|
|
24
|
-
itemSize?: SidebarItemSize
|
|
25
20
|
children?: ReactNode
|
|
26
21
|
}
|
|
27
22
|
|
|
@@ -31,8 +26,8 @@ export interface SidebarHeaderProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
31
26
|
children?: ReactNode
|
|
32
27
|
}
|
|
33
28
|
|
|
34
|
-
export interface SidebarContentProps extends HTMLAttributes<
|
|
35
|
-
ref?: Ref<
|
|
29
|
+
export interface SidebarContentProps extends HTMLAttributes<HTMLElement> {
|
|
30
|
+
ref?: Ref<HTMLElement>
|
|
36
31
|
className?: string
|
|
37
32
|
children?: ReactNode
|
|
38
33
|
}
|
|
@@ -4,81 +4,77 @@
|
|
|
4
4
|
* Variant classes for the Sidebar block.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
export const
|
|
8
|
-
return "
|
|
7
|
+
export const sidebarRootClasses = (): string => {
|
|
8
|
+
return "lex-sidebar w-full shrink-0 md:h-full md:w-auto"
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
export const
|
|
12
|
-
return "
|
|
11
|
+
export const sidebarDesktopClasses = (): string => {
|
|
12
|
+
return "lex-sidebar__desktop hidden h-full w-[var(--lex-size-sidebar-width,16rem)] shrink-0 border-r border-[var(--lex-border-default)] bg-[var(--lex-color-background-subtle)] md:flex md:flex-col"
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
export const
|
|
16
|
-
return "
|
|
15
|
+
export const sidebarMobileHeaderClasses = (): string => {
|
|
16
|
+
return "lex-sidebar__mobile-header min-w-0 flex-1"
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
export const
|
|
20
|
-
return "
|
|
19
|
+
export const sidebarBrandClasses = (): string => {
|
|
20
|
+
return "lex-sidebar__brand border-b border-[var(--lex-border-default)] px-[var(--lex-space-4)] py-[var(--lex-space-3)]"
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
export const
|
|
24
|
-
return "
|
|
23
|
+
export const sidebarNavClasses = (): string => {
|
|
24
|
+
return "lex-sidebar__nav min-h-0 flex-1 p-[var(--lex-space-2)]"
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
export const
|
|
28
|
-
return "
|
|
27
|
+
export const sidebarNavListClasses = (): string => {
|
|
28
|
+
return "lex-sidebar__list m-0 flex list-none flex-col gap-[var(--lex-space-1)] p-0"
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
export const
|
|
32
|
-
return "lsys-sidebar__list m-0 flex list-none flex-col gap-[var(--lsys-space-1)] p-0"
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export const sidebarNavItemVariants = (active?: boolean): string => {
|
|
31
|
+
export const sidebarNavItemClasses = (active?: boolean): string => {
|
|
36
32
|
const base = [
|
|
37
|
-
"
|
|
38
|
-
"flex w-full items-center rounded-(--
|
|
39
|
-
"px-(--
|
|
40
|
-
"text-(length:--
|
|
41
|
-
"leading-(--
|
|
33
|
+
"lex-sidebar__item",
|
|
34
|
+
"flex w-full items-center rounded-(--lex-menu-item-radius)",
|
|
35
|
+
"px-(--lex-menu-item-padding-x) py-(--lex-menu-item-padding-y)",
|
|
36
|
+
"text-(length:--lex-menu-item-font-size) font-(--lex-menu-item-font-weight)",
|
|
37
|
+
"leading-(--lex-menu-item-font-line-height) text-(--lex-menu-item-foreground)",
|
|
42
38
|
"no-underline outline-none transition-colors",
|
|
43
|
-
"focus-visible:ring-(length:--
|
|
44
|
-
"focus-visible:ring-offset-(length:--
|
|
39
|
+
"focus-visible:ring-(length:--lex-menu-item-focus-ring-width) focus-visible:ring-(--lex-menu-item-focus-ring-color)",
|
|
40
|
+
"focus-visible:ring-offset-(length:--lex-menu-item-focus-ring-offset) focus-visible:ring-offset-(--lex-menu-item-focus-ring-offset-color)",
|
|
45
41
|
].join(" ")
|
|
46
42
|
|
|
47
43
|
if (active) {
|
|
48
44
|
return [
|
|
49
45
|
base,
|
|
50
|
-
"
|
|
51
|
-
"bg-(--
|
|
52
|
-
"hover:bg-(--
|
|
46
|
+
"lex-sidebar__item--active",
|
|
47
|
+
"bg-(--lex-menu-item-checked-background) text-(--lex-menu-item-checked-foreground)",
|
|
48
|
+
"hover:bg-(--lex-action-primary-hover) hover:text-(--lex-menu-item-checked-foreground)",
|
|
53
49
|
].join(" ")
|
|
54
50
|
}
|
|
55
51
|
|
|
56
52
|
return [
|
|
57
53
|
base,
|
|
58
|
-
"hover:bg-(--
|
|
54
|
+
"hover:bg-(--lex-action-secondary-hover) hover:text-(--lex-color-text-primary)",
|
|
59
55
|
].join(" ")
|
|
60
56
|
}
|
|
61
57
|
|
|
62
|
-
export const
|
|
63
|
-
return "
|
|
58
|
+
export const sidebarMainClasses = (): string => {
|
|
59
|
+
return "lex-sidebar__drawer-content flex h-full min-h-0 flex-col"
|
|
64
60
|
}
|
|
65
61
|
|
|
66
|
-
export const
|
|
67
|
-
return "
|
|
62
|
+
export const sidebarDrawerFooterClasses = (): string => {
|
|
63
|
+
return "lex-sidebar__drawer-footer border-t border-[var(--lex-border-default)] p-[var(--lex-space-2)]"
|
|
68
64
|
}
|
|
69
65
|
|
|
70
|
-
export const
|
|
71
|
-
return "
|
|
66
|
+
export const sidebarFooterClasses = (): string => {
|
|
67
|
+
return "lex-sidebar__footer border-t border-[var(--lex-border-default)] p-[var(--lex-space-2)]"
|
|
72
68
|
}
|
|
73
69
|
|
|
74
|
-
export const
|
|
75
|
-
return "
|
|
70
|
+
export const sidebarGroupClasses = (): string => {
|
|
71
|
+
return "lex-sidebar__group flex flex-col gap-[var(--lex-space-1)]"
|
|
76
72
|
}
|
|
77
73
|
|
|
78
|
-
export const
|
|
79
|
-
return "
|
|
74
|
+
export const sidebarGroupLabelClasses = (): string => {
|
|
75
|
+
return "lex-sidebar__group-label px-[var(--lex-space-3)] py-[var(--lex-space-1)] text-(length:--lex-menu-group-label-font-size) font-(--lex-menu-group-label-font-weight) leading-(--lex-menu-group-label-font-line-height) text-(--lex-menu-group-label-foreground)"
|
|
80
76
|
}
|
|
81
77
|
|
|
82
|
-
export const
|
|
83
|
-
return "
|
|
78
|
+
export const sidebarGroupContentClasses = (): string => {
|
|
79
|
+
return "lex-sidebar__group-content flex flex-col gap-[var(--lex-space-1)]"
|
|
84
80
|
}
|
|
@@ -8,25 +8,25 @@ import { cva } from "class-variance-authority"
|
|
|
8
8
|
import { disabledStateClasses } from "@/lib/utils"
|
|
9
9
|
|
|
10
10
|
export const accordionVariants = cva(
|
|
11
|
-
"grid overflow-hidden rounded-(--
|
|
11
|
+
"grid overflow-hidden rounded-(--lex-accordion-radius) border border-(--lex-accordion-border-color) bg-(--lex-accordion-background) text-(--lex-accordion-foreground)",
|
|
12
12
|
)
|
|
13
13
|
|
|
14
14
|
export const accordionItemVariants = cva(
|
|
15
|
-
"border-b border-(--
|
|
15
|
+
"border-b border-(--lex-accordion-item-border-color) last:border-b-0",
|
|
16
16
|
)
|
|
17
17
|
|
|
18
18
|
export const accordionHeaderVariants = cva("flex")
|
|
19
19
|
|
|
20
20
|
export const accordionTriggerVariants = cva(
|
|
21
21
|
[
|
|
22
|
-
"flex w-full items-center justify-between px-(--
|
|
23
|
-
"text-(length:--
|
|
24
|
-
"transition-colors duration-(--
|
|
25
|
-
"outline-none hover:bg-(--
|
|
22
|
+
"flex w-full items-center justify-between px-(--lex-accordion-trigger-padding-x) py-(--lex-accordion-trigger-padding-y) text-left",
|
|
23
|
+
"text-(length:--lex-accordion-trigger-font-size) font-(--lex-accordion-trigger-font-weight) leading-(--lex-accordion-trigger-font-line-height) text-(--lex-accordion-foreground)",
|
|
24
|
+
"transition-colors duration-(--lex-accordion-transition-duration) ease-(--lex-accordion-transition-easing)",
|
|
25
|
+
"outline-none hover:bg-(--lex-accordion-trigger-background-hover) focus-visible:ring-(length:--lex-accordion-focus-ring-width) focus-visible:ring-inset focus-visible:ring-(--lex-accordion-focus-ring-color)",
|
|
26
26
|
disabledStateClasses,
|
|
27
27
|
].join(" "),
|
|
28
28
|
)
|
|
29
29
|
|
|
30
30
|
export const accordionPanelVariants = cva(
|
|
31
|
-
"px-(--
|
|
31
|
+
"px-(--lex-accordion-panel-padding-x) pb-(--lex-accordion-panel-padding-bottom) text-(length:--lex-accordion-panel-font-size) leading-(--lex-accordion-panel-font-line-height) text-(--lex-accordion-panel-foreground)",
|
|
32
32
|
)
|
|
@@ -7,18 +7,18 @@
|
|
|
7
7
|
import { cva } from "class-variance-authority"
|
|
8
8
|
|
|
9
9
|
const neutralVariant =
|
|
10
|
-
"border-(--
|
|
10
|
+
"border-(--lex-alert-neutral-border-color) bg-(--lex-alert-neutral-background) text-(--lex-alert-neutral-foreground)"
|
|
11
11
|
|
|
12
12
|
const primaryVariant =
|
|
13
|
-
"border-(--
|
|
13
|
+
"border-(--lex-alert-primary-border-color) bg-(--lex-alert-primary-background) text-(--lex-alert-primary-foreground)"
|
|
14
14
|
|
|
15
15
|
const dangerVariant =
|
|
16
|
-
"border-(--
|
|
16
|
+
"border-(--lex-alert-danger-border-color) bg-(--lex-alert-danger-background) text-(--lex-alert-danger-foreground)"
|
|
17
17
|
|
|
18
18
|
export const alertVariants = cva(
|
|
19
19
|
[
|
|
20
|
-
"grid gap-(--
|
|
21
|
-
"transition-colors duration-(--
|
|
20
|
+
"grid gap-(--lex-alert-gap) rounded-(--lex-alert-radius) border p-(--lex-alert-padding)",
|
|
21
|
+
"transition-colors duration-(--lex-alert-transition-duration) ease-(--lex-alert-transition-easing)",
|
|
22
22
|
].join(" "),
|
|
23
23
|
{
|
|
24
24
|
variants: {
|
|
@@ -35,7 +35,7 @@ export const alertVariants = cva(
|
|
|
35
35
|
)
|
|
36
36
|
|
|
37
37
|
export const alertTitleClassName =
|
|
38
|
-
"text-(length:--
|
|
38
|
+
"text-(length:--lex-alert-title-font-size) font-(--lex-alert-title-font-weight) leading-(--lex-alert-title-font-line-height)"
|
|
39
39
|
|
|
40
40
|
export const alertDescriptionClassName =
|
|
41
|
-
"text-(length:--
|
|
41
|
+
"text-(length:--lex-alert-description-font-size) leading-(--lex-alert-description-font-line-height) text-(--lex-alert-description-foreground)"
|
|
@@ -9,49 +9,49 @@ import { disabledStateClasses } from "@/lib/utils"
|
|
|
9
9
|
|
|
10
10
|
export const alertDialogTriggerVariants = cva(
|
|
11
11
|
[
|
|
12
|
-
"inline-flex h-(--
|
|
13
|
-
"bg-(--
|
|
14
|
-
"text-(length:--
|
|
15
|
-
"transition-colors duration-(--
|
|
16
|
-
"outline-none hover:bg-(--
|
|
12
|
+
"inline-flex h-(--lex-alert-dialog-trigger-height) items-center justify-center rounded-(--lex-alert-dialog-trigger-radius)",
|
|
13
|
+
"bg-(--lex-alert-dialog-trigger-background) px-(--lex-alert-dialog-trigger-padding-x) text-(--lex-alert-dialog-trigger-foreground)",
|
|
14
|
+
"text-(length:--lex-alert-dialog-trigger-font-size) font-(--lex-alert-dialog-trigger-font-weight) leading-(--lex-alert-dialog-trigger-font-line-height)",
|
|
15
|
+
"transition-colors duration-(--lex-alert-dialog-transition-duration) ease-(--lex-alert-dialog-transition-easing)",
|
|
16
|
+
"outline-none hover:bg-(--lex-alert-dialog-trigger-hover-background) focus-visible:ring-(length:--lex-alert-dialog-focus-ring-width) focus-visible:ring-(--lex-alert-dialog-focus-ring-color) focus-visible:ring-offset-(length:--lex-alert-dialog-focus-ring-offset) focus-visible:ring-offset-(--lex-alert-dialog-focus-ring-offset-color)",
|
|
17
17
|
disabledStateClasses,
|
|
18
18
|
].join(" "),
|
|
19
19
|
)
|
|
20
20
|
|
|
21
21
|
export const alertDialogBackdropVariants = cva(
|
|
22
22
|
[
|
|
23
|
-
"fixed inset-0 z-(--
|
|
23
|
+
"fixed inset-0 z-(--lex-alert-dialog-backdrop-z-index) bg-(--lex-alert-dialog-backdrop-background) opacity-(--lex-alert-dialog-backdrop-opacity)",
|
|
24
24
|
"data-[starting-style]:opacity-0 data-[ending-style]:opacity-0",
|
|
25
|
-
"transition-opacity duration-(--
|
|
25
|
+
"transition-opacity duration-(--lex-alert-dialog-transition-duration) ease-(--lex-alert-dialog-transition-easing)",
|
|
26
26
|
].join(" "),
|
|
27
27
|
)
|
|
28
28
|
|
|
29
29
|
export const alertDialogViewportVariants = cva(
|
|
30
|
-
"fixed inset-0 z-(--
|
|
30
|
+
"fixed inset-0 z-(--lex-alert-dialog-viewport-z-index) grid place-items-center overflow-y-auto p-(--lex-alert-dialog-viewport-padding)",
|
|
31
31
|
)
|
|
32
32
|
|
|
33
33
|
export const alertDialogPopupVariants = cva(
|
|
34
34
|
[
|
|
35
|
-
"grid w-[min(calc(100vw-(var(--
|
|
36
|
-
"border-(--
|
|
35
|
+
"grid w-[min(calc(100vw-(var(--lex-alert-dialog-viewport-inset)*2)),var(--lex-alert-dialog-popup-max-width))] gap-(--lex-alert-dialog-popup-gap) rounded-(--lex-alert-dialog-popup-radius) border",
|
|
36
|
+
"border-(--lex-alert-dialog-popup-border-color) bg-(--lex-alert-dialog-popup-background) p-(--lex-alert-dialog-popup-padding) text-(--lex-alert-dialog-popup-foreground) shadow-(--lex-alert-dialog-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-alert-dialog-transition-duration) ease-(--lex-alert-dialog-transition-easing)",
|
|
39
39
|
].join(" "),
|
|
40
40
|
)
|
|
41
41
|
|
|
42
42
|
export const alertDialogTitleVariants = cva(
|
|
43
|
-
"pr-(--
|
|
43
|
+
"pr-(--lex-alert-dialog-title-padding-end) text-(length:--lex-alert-dialog-title-font-size) font-(--lex-alert-dialog-title-font-weight) leading-(--lex-alert-dialog-title-font-line-height) text-(--lex-alert-dialog-title-foreground)",
|
|
44
44
|
)
|
|
45
45
|
|
|
46
46
|
export const alertDialogDescriptionVariants = cva(
|
|
47
|
-
"text-(length:--
|
|
47
|
+
"text-(length:--lex-alert-dialog-description-font-size) font-(--lex-alert-dialog-description-font-weight) leading-(--lex-alert-dialog-description-font-line-height) text-(--lex-alert-dialog-description-foreground)",
|
|
48
48
|
)
|
|
49
49
|
|
|
50
50
|
export const alertDialogCloseVariants = cva(
|
|
51
51
|
[
|
|
52
|
-
"absolute right-(--
|
|
53
|
-
"text-(--
|
|
54
|
-
"hover:bg-(--
|
|
52
|
+
"absolute right-(--lex-alert-dialog-close-inset) top-(--lex-alert-dialog-close-inset) inline-flex size-(--lex-alert-dialog-close-size) items-center justify-center rounded-(--lex-alert-dialog-close-radius)",
|
|
53
|
+
"text-(--lex-alert-dialog-close-foreground) outline-none transition-colors duration-(--lex-alert-dialog-transition-duration) ease-(--lex-alert-dialog-transition-easing)",
|
|
54
|
+
"hover:bg-(--lex-alert-dialog-close-hover-background) focus-visible:ring-(length:--lex-alert-dialog-focus-ring-width) focus-visible:ring-(--lex-alert-dialog-focus-ring-color) focus-visible:ring-offset-(length:--lex-alert-dialog-focus-ring-offset) focus-visible:ring-offset-(--lex-alert-dialog-focus-ring-offset-color)",
|
|
55
55
|
disabledStateClasses,
|
|
56
56
|
].join(" "),
|
|
57
57
|
)
|