@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
package/dist/index.js
CHANGED
|
@@ -1609,6 +1609,26 @@ var otpFieldRegistryItem = {
|
|
|
1609
1609
|
target: "src/components/ui/OtpField"
|
|
1610
1610
|
};
|
|
1611
1611
|
|
|
1612
|
+
// src/items/empty.ts
|
|
1613
|
+
var emptyRegistryItem = {
|
|
1614
|
+
name: "empty",
|
|
1615
|
+
canonicalName: "Empty",
|
|
1616
|
+
version: "0.0.3",
|
|
1617
|
+
type: "block",
|
|
1618
|
+
category: "layout",
|
|
1619
|
+
aliases: ["empty-state"],
|
|
1620
|
+
files: [
|
|
1621
|
+
"blocks/Empty/Empty.tsx",
|
|
1622
|
+
"blocks/Empty/Empty.types.ts",
|
|
1623
|
+
"blocks/Empty/Empty.variants.ts"
|
|
1624
|
+
],
|
|
1625
|
+
dependencies: ["clsx", "tailwind-merge"],
|
|
1626
|
+
registryDependencies: [],
|
|
1627
|
+
utilities: ["cn"],
|
|
1628
|
+
styles: ["theme"],
|
|
1629
|
+
target: "src/components/ui/Empty"
|
|
1630
|
+
};
|
|
1631
|
+
|
|
1612
1632
|
// src/items/index.ts
|
|
1613
1633
|
var registryItems = [
|
|
1614
1634
|
accordionRegistryItem,
|
|
@@ -1657,7 +1677,8 @@ var registryItems = [
|
|
|
1657
1677
|
autocompleteRegistryItem,
|
|
1658
1678
|
checkboxGroupRegistryItem,
|
|
1659
1679
|
comboboxRegistryItem,
|
|
1660
|
-
otpFieldRegistryItem
|
|
1680
|
+
otpFieldRegistryItem,
|
|
1681
|
+
emptyRegistryItem
|
|
1661
1682
|
];
|
|
1662
1683
|
|
|
1663
1684
|
// src/styles/theme.ts
|
|
@@ -2161,4 +2182,4 @@ var registryManifest = {
|
|
|
2161
2182
|
utilities: registryUtilities
|
|
2162
2183
|
};
|
|
2163
2184
|
|
|
2164
|
-
export { accordionRegistryItem, alertDialogRegistryItem, alertRegistryItem, authFormRegistryItem, autocompleteRegistryItem, avatarRegistryItem, badgeRegistryItem, buttonRegistryItem, cardRegistryItem, checkboxGroupRegistryItem, checkboxRegistryItem, cnRegistryUtility, collapsibleRegistryItem, comboboxRegistryItem, commandPaletteRegistryItem, contextMenuRegistryItem, dashboardShellRegistryItem, dialogRegistryItem, drawerRegistryItem, fieldRegistryItem, fieldsetRegistryItem, formFieldRegistryItem, formRegistryItem, getInstallLayer, inputRegistryItem, menuRegistryItem, menubarRegistryItem, meterRegistryItem, navigationMenuRegistryItem, numberFieldRegistryItem, otpFieldRegistryItem, popoverRegistryItem, previewCardRegistryItem, progressRegistryItem, radioGroupRegistryItem, registryItems, registryManifest, registryStyles, registryUtilities, registryVersion, scrollAreaRegistryItem, selectRegistryItem, separatorRegistryItem, settingsPanelRegistryItem, sidebarRegistryItem, sliderRegistryItem, switchRegistryItem, tabsRegistryItem, textareaRegistryItem, themeRegistryStyle, toastRegistryItem, toggleGroupRegistryItem, toggleRegistryItem, toolbarRegistryItem, tooltipRegistryItem, validateRegistry, validateRegistryItem };
|
|
2185
|
+
export { accordionRegistryItem, alertDialogRegistryItem, alertRegistryItem, authFormRegistryItem, autocompleteRegistryItem, avatarRegistryItem, badgeRegistryItem, buttonRegistryItem, cardRegistryItem, checkboxGroupRegistryItem, checkboxRegistryItem, cnRegistryUtility, collapsibleRegistryItem, comboboxRegistryItem, commandPaletteRegistryItem, contextMenuRegistryItem, dashboardShellRegistryItem, dialogRegistryItem, drawerRegistryItem, emptyRegistryItem, fieldRegistryItem, fieldsetRegistryItem, formFieldRegistryItem, formRegistryItem, getInstallLayer, inputRegistryItem, menuRegistryItem, menubarRegistryItem, meterRegistryItem, navigationMenuRegistryItem, numberFieldRegistryItem, otpFieldRegistryItem, popoverRegistryItem, previewCardRegistryItem, progressRegistryItem, radioGroupRegistryItem, registryItems, registryManifest, registryStyles, registryUtilities, registryVersion, scrollAreaRegistryItem, selectRegistryItem, separatorRegistryItem, settingsPanelRegistryItem, sidebarRegistryItem, sliderRegistryItem, switchRegistryItem, tabsRegistryItem, textareaRegistryItem, themeRegistryStyle, toastRegistryItem, toggleGroupRegistryItem, toggleRegistryItem, toolbarRegistryItem, tooltipRegistryItem, validateRegistry, validateRegistryItem };
|
package/dist/items/index.d.ts
CHANGED
|
@@ -46,4 +46,5 @@ export { comboboxRegistryItem } from "./combobox.js";
|
|
|
46
46
|
export { authFormRegistryItem } from "./auth-form.js";
|
|
47
47
|
export { commandPaletteRegistryItem } from "./command-palette.js";
|
|
48
48
|
export { otpFieldRegistryItem } from "./otp-field.js";
|
|
49
|
+
export { emptyRegistryItem } from "./empty.js";
|
|
49
50
|
export declare const registryItems: RegistryItem[];
|
package/package.json
CHANGED
|
@@ -19,7 +19,7 @@ import type {
|
|
|
19
19
|
AuthFormProps,
|
|
20
20
|
AuthFormSubmitProps,
|
|
21
21
|
} from "./AuthForm.types"
|
|
22
|
-
import { authFormFieldsClassName,
|
|
22
|
+
import { authFormFieldsClassName, authFormClasses } from "./AuthForm.variants"
|
|
23
23
|
import { cn } from "@/lib/utils"
|
|
24
24
|
|
|
25
25
|
const AuthForm = ({
|
|
@@ -35,7 +35,7 @@ const AuthForm = ({
|
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
return (
|
|
38
|
-
<Card className={cn(
|
|
38
|
+
<Card className={cn(authFormClasses(), className)} {...cardProps}>
|
|
39
39
|
<form ref={ref} onSubmit={handleSubmit}>
|
|
40
40
|
{children}
|
|
41
41
|
</form>
|
|
@@ -71,7 +71,7 @@ const AuthFormFooter = ({ ref, className, ...props }: AuthFormFooterProps) => {
|
|
|
71
71
|
return (
|
|
72
72
|
<CardFooter
|
|
73
73
|
ref={ref}
|
|
74
|
-
className={cn("flex-col gap-(--
|
|
74
|
+
className={cn("flex-col gap-(--lex-space-3)", className)}
|
|
75
75
|
{...props}
|
|
76
76
|
/>
|
|
77
77
|
)
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* Variant classes for the AuthForm block.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
export const
|
|
8
|
-
return "
|
|
7
|
+
export const authFormClasses = (): string => {
|
|
8
|
+
return "lex-auth-form w-full text-(--lex-color-text-primary)"
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
export const authFormFieldsClassName = "flex flex-col gap-(--
|
|
11
|
+
export const authFormFieldsClassName = "flex flex-col gap-(--lex-space-4)"
|
|
@@ -33,13 +33,13 @@ import type {
|
|
|
33
33
|
CommandPaletteTitleProps,
|
|
34
34
|
} from "./CommandPalette.types"
|
|
35
35
|
import {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
36
|
+
commandPaletteEmptyClasses,
|
|
37
|
+
commandPaletteGroupLabelClasses,
|
|
38
|
+
commandPaletteInputClasses,
|
|
39
|
+
commandPaletteItemClasses,
|
|
40
|
+
commandPaletteItemDescriptionClasses,
|
|
41
|
+
commandPaletteListClasses,
|
|
42
|
+
commandPaletteRootClasses,
|
|
43
43
|
} from "./CommandPalette.variants"
|
|
44
44
|
import { cn } from "@/lib/utils"
|
|
45
45
|
|
|
@@ -61,7 +61,7 @@ const CommandPaletteContent = ({
|
|
|
61
61
|
<DialogViewport>
|
|
62
62
|
<DialogPopup
|
|
63
63
|
ref={ref}
|
|
64
|
-
className={cn(
|
|
64
|
+
className={cn(commandPaletteRootClasses, className)}
|
|
65
65
|
{...props}
|
|
66
66
|
>
|
|
67
67
|
{children}
|
|
@@ -116,7 +116,7 @@ const CommandPaletteInput = ({
|
|
|
116
116
|
<Input
|
|
117
117
|
ref={ref}
|
|
118
118
|
autoFocus
|
|
119
|
-
className={cn(
|
|
119
|
+
className={cn(commandPaletteInputClasses, className)}
|
|
120
120
|
aria-label="Search commands"
|
|
121
121
|
{...props}
|
|
122
122
|
/>
|
|
@@ -138,7 +138,7 @@ const CommandPaletteList = ({
|
|
|
138
138
|
...props
|
|
139
139
|
}: CommandPaletteListProps) => {
|
|
140
140
|
return (
|
|
141
|
-
<ScrollArea className={cn(
|
|
141
|
+
<ScrollArea className={cn(commandPaletteListClasses, className)}>
|
|
142
142
|
<ScrollAreaViewport>
|
|
143
143
|
<ScrollAreaContent ref={ref} {...props}>
|
|
144
144
|
{children}
|
|
@@ -174,7 +174,7 @@ const CommandPaletteGroupLabel = ({
|
|
|
174
174
|
return (
|
|
175
175
|
<h3
|
|
176
176
|
ref={ref}
|
|
177
|
-
className={cn(
|
|
177
|
+
className={cn(commandPaletteGroupLabelClasses, className)}
|
|
178
178
|
{...props}
|
|
179
179
|
>
|
|
180
180
|
{children}
|
|
@@ -196,12 +196,12 @@ const CommandPaletteItem = ({
|
|
|
196
196
|
<button
|
|
197
197
|
ref={ref}
|
|
198
198
|
type={type}
|
|
199
|
-
className={cn(
|
|
199
|
+
className={cn(commandPaletteItemClasses, className)}
|
|
200
200
|
{...props}
|
|
201
201
|
>
|
|
202
202
|
<span>{children}</span>
|
|
203
203
|
{description ? (
|
|
204
|
-
<span className={
|
|
204
|
+
<span className={commandPaletteItemDescriptionClasses}>
|
|
205
205
|
{description}
|
|
206
206
|
</span>
|
|
207
207
|
) : null}
|
|
@@ -220,7 +220,7 @@ const CommandPaletteEmpty = ({
|
|
|
220
220
|
return (
|
|
221
221
|
<p
|
|
222
222
|
ref={ref}
|
|
223
|
-
className={cn(
|
|
223
|
+
className={cn(commandPaletteEmptyClasses, className)}
|
|
224
224
|
{...props}
|
|
225
225
|
>
|
|
226
226
|
{children}
|
|
@@ -23,9 +23,7 @@ export interface CommandPaletteContentProps extends HTMLAttributes<HTMLDivElemen
|
|
|
23
23
|
children?: ReactNode
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
export
|
|
27
|
-
ref?: Ref<HTMLInputElement>
|
|
28
|
-
}
|
|
26
|
+
export type CommandPaletteInputProps = InputProps
|
|
29
27
|
|
|
30
28
|
export type CommandPaletteSeparatorProps = Record<string, never>
|
|
31
29
|
|
|
@@ -60,14 +58,10 @@ export interface CommandPaletteEmptyProps extends HTMLAttributes<HTMLParagraphEl
|
|
|
60
58
|
children?: ReactNode
|
|
61
59
|
}
|
|
62
60
|
|
|
63
|
-
export interface CommandPaletteTitleProps {
|
|
61
|
+
export interface CommandPaletteTitleProps extends HTMLAttributes<HTMLHeadingElement> {
|
|
64
62
|
ref?: Ref<HTMLHeadingElement>
|
|
65
|
-
className?: string
|
|
66
|
-
children?: ReactNode
|
|
67
63
|
}
|
|
68
64
|
|
|
69
|
-
export interface CommandPaletteDescriptionProps {
|
|
65
|
+
export interface CommandPaletteDescriptionProps extends HTMLAttributes<HTMLParagraphElement> {
|
|
70
66
|
ref?: Ref<HTMLParagraphElement>
|
|
71
|
-
className?: string
|
|
72
|
-
children?: ReactNode
|
|
73
67
|
}
|
|
@@ -4,23 +4,22 @@
|
|
|
4
4
|
* Variant classes for the CommandPalette block.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
export const
|
|
8
|
-
|
|
9
|
-
}
|
|
7
|
+
export const commandPaletteRootClasses =
|
|
8
|
+
"lex-command-palette flex flex-col gap-(--lex-space-2)"
|
|
10
9
|
|
|
11
|
-
export const
|
|
10
|
+
export const commandPaletteInputClasses = "w-full"
|
|
12
11
|
|
|
13
|
-
export const
|
|
14
|
-
"flex max-h-(--
|
|
12
|
+
export const commandPaletteListClasses =
|
|
13
|
+
"flex max-h-(--lex-size-command-palette-list-max-height,16rem) flex-col"
|
|
15
14
|
|
|
16
|
-
export const
|
|
17
|
-
"px-(--
|
|
15
|
+
export const commandPaletteGroupLabelClasses =
|
|
16
|
+
"px-(--lex-space-3) py-(--lex-space-1) text-(length:--lex-typography-label-xs-font-size) font-(--lex-typography-label-xs-font-weight) text-(--lex-color-text-secondary)"
|
|
18
17
|
|
|
19
|
-
export const
|
|
20
|
-
"flex w-full flex-col items-start gap-(--
|
|
18
|
+
export const commandPaletteItemClasses =
|
|
19
|
+
"flex w-full flex-col items-start gap-(--lex-space-1) rounded-(--lex-radius-control) px-(--lex-space-3) py-(--lex-space-2) text-left text-(--lex-color-text-primary) outline-none transition-colors hover:bg-(--lex-action-secondary-hover) focus-visible:bg-(--lex-action-secondary-hover)"
|
|
21
20
|
|
|
22
|
-
export const
|
|
23
|
-
"text-(length:--
|
|
21
|
+
export const commandPaletteItemDescriptionClasses =
|
|
22
|
+
"text-(length:--lex-typography-body-xs-font-size) text-(--lex-color-text-secondary)"
|
|
24
23
|
|
|
25
|
-
export const
|
|
26
|
-
"px-(--
|
|
24
|
+
export const commandPaletteEmptyClasses =
|
|
25
|
+
"px-(--lex-space-3) py-(--lex-space-4) text-(length:--lex-typography-body-sm-font-size) text-(--lex-color-text-secondary)"
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Empty.tsx
|
|
3
|
+
*
|
|
4
|
+
* Reference Empty block implementation.
|
|
5
|
+
* Used for zero-data surfaces: no results, no items, unauthenticated views.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import { cn } from "@/lib/utils"
|
|
9
|
+
import type {
|
|
10
|
+
EmptyContentProps,
|
|
11
|
+
EmptyDescriptionProps,
|
|
12
|
+
EmptyHeaderProps,
|
|
13
|
+
EmptyMediaProps,
|
|
14
|
+
EmptyProps,
|
|
15
|
+
EmptyTitleProps,
|
|
16
|
+
} from "./Empty.types"
|
|
17
|
+
import {
|
|
18
|
+
emptyClasses,
|
|
19
|
+
emptyContentClasses,
|
|
20
|
+
emptyDescriptionClasses,
|
|
21
|
+
emptyHeaderClasses,
|
|
22
|
+
emptyMediaClasses,
|
|
23
|
+
emptyTitleClasses,
|
|
24
|
+
} from "./Empty.variants"
|
|
25
|
+
|
|
26
|
+
const Empty = ({ ref, className, ...props }: EmptyProps) => {
|
|
27
|
+
return <div ref={ref} className={cn(emptyClasses(), className)} {...props} />
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
Empty.displayName = "Empty"
|
|
31
|
+
|
|
32
|
+
const EmptyHeader = ({ ref, className, ...props }: EmptyHeaderProps) => {
|
|
33
|
+
return (
|
|
34
|
+
<div ref={ref} className={cn(emptyHeaderClasses(), className)} {...props} />
|
|
35
|
+
)
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
EmptyHeader.displayName = "EmptyHeader"
|
|
39
|
+
|
|
40
|
+
const EmptyMedia = ({ ref, className, ...props }: EmptyMediaProps) => {
|
|
41
|
+
return (
|
|
42
|
+
<div ref={ref} className={cn(emptyMediaClasses(), className)} {...props} />
|
|
43
|
+
)
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
EmptyMedia.displayName = "EmptyMedia"
|
|
47
|
+
|
|
48
|
+
const EmptyTitle = ({ ref, className, ...props }: EmptyTitleProps) => {
|
|
49
|
+
return (
|
|
50
|
+
<h3 ref={ref} className={cn(emptyTitleClasses(), className)} {...props} />
|
|
51
|
+
)
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
EmptyTitle.displayName = "EmptyTitle"
|
|
55
|
+
|
|
56
|
+
const EmptyDescription = ({
|
|
57
|
+
ref,
|
|
58
|
+
className,
|
|
59
|
+
...props
|
|
60
|
+
}: EmptyDescriptionProps) => {
|
|
61
|
+
return (
|
|
62
|
+
<p
|
|
63
|
+
ref={ref}
|
|
64
|
+
className={cn(emptyDescriptionClasses(), className)}
|
|
65
|
+
{...props}
|
|
66
|
+
/>
|
|
67
|
+
)
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
EmptyDescription.displayName = "EmptyDescription"
|
|
71
|
+
|
|
72
|
+
const EmptyContent = ({ ref, className, ...props }: EmptyContentProps) => {
|
|
73
|
+
return (
|
|
74
|
+
<div
|
|
75
|
+
ref={ref}
|
|
76
|
+
className={cn(emptyContentClasses(), className)}
|
|
77
|
+
{...props}
|
|
78
|
+
/>
|
|
79
|
+
)
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
EmptyContent.displayName = "EmptyContent"
|
|
83
|
+
|
|
84
|
+
export {
|
|
85
|
+
Empty,
|
|
86
|
+
EmptyHeader,
|
|
87
|
+
EmptyMedia,
|
|
88
|
+
EmptyTitle,
|
|
89
|
+
EmptyDescription,
|
|
90
|
+
EmptyContent,
|
|
91
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ComponentPropsWithRef } from "react"
|
|
2
|
+
|
|
3
|
+
export type EmptyProps = ComponentPropsWithRef<"div">
|
|
4
|
+
export type EmptyHeaderProps = ComponentPropsWithRef<"div">
|
|
5
|
+
export type EmptyMediaProps = ComponentPropsWithRef<"div">
|
|
6
|
+
export type EmptyTitleProps = ComponentPropsWithRef<"h3">
|
|
7
|
+
export type EmptyDescriptionProps = ComponentPropsWithRef<"p">
|
|
8
|
+
export type EmptyContentProps = ComponentPropsWithRef<"div">
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Empty.variants.ts
|
|
3
|
+
*
|
|
4
|
+
* Variant classes for the Empty block.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
export const emptyClasses = (): string => {
|
|
8
|
+
return [
|
|
9
|
+
"lex-empty",
|
|
10
|
+
"flex w-full flex-col items-center justify-center text-center",
|
|
11
|
+
"gap-(--lex-empty-gap) p-(--lex-empty-padding)",
|
|
12
|
+
].join(" ")
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export const emptyHeaderClasses = (): string => {
|
|
16
|
+
return [
|
|
17
|
+
"lex-empty__header",
|
|
18
|
+
"flex flex-col items-center",
|
|
19
|
+
"gap-(--lex-empty-header-gap)",
|
|
20
|
+
].join(" ")
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export const emptyMediaClasses = (): string => {
|
|
24
|
+
return [
|
|
25
|
+
"lex-empty__media",
|
|
26
|
+
"flex items-center justify-center",
|
|
27
|
+
"size-(--lex-empty-media-size) text-(--lex-empty-media-foreground)",
|
|
28
|
+
].join(" ")
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export const emptyTitleClasses = (): string => {
|
|
32
|
+
return [
|
|
33
|
+
"lex-empty__title",
|
|
34
|
+
"text-(length:--lex-empty-title-font-size) font-(--lex-empty-title-font-weight)",
|
|
35
|
+
"leading-(--lex-empty-title-font-line-height) text-(--lex-empty-title-foreground)",
|
|
36
|
+
"m-0",
|
|
37
|
+
].join(" ")
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export const emptyDescriptionClasses = (): string => {
|
|
41
|
+
return [
|
|
42
|
+
"lex-empty__description",
|
|
43
|
+
"text-(length:--lex-empty-description-font-size)",
|
|
44
|
+
"leading-(--lex-empty-description-font-line-height) text-(--lex-empty-description-foreground)",
|
|
45
|
+
"m-0",
|
|
46
|
+
].join(" ")
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export const emptyContentClasses = (): string => {
|
|
50
|
+
return "lex-empty__content flex items-center justify-center gap-(--lex-empty-gap)"
|
|
51
|
+
}
|
|
@@ -20,16 +20,12 @@ import type {
|
|
|
20
20
|
FormFieldLabelProps,
|
|
21
21
|
FormFieldProps,
|
|
22
22
|
} from "./FormField.types"
|
|
23
|
-
import {
|
|
23
|
+
import { formFieldClasses } from "./FormField.variants"
|
|
24
24
|
import { cn } from "@/lib/utils"
|
|
25
25
|
|
|
26
26
|
const FormField = ({ ref, className, ...props }: FormFieldProps) => {
|
|
27
27
|
return (
|
|
28
|
-
<Field
|
|
29
|
-
ref={ref}
|
|
30
|
-
className={cn(formFieldVariants(), className)}
|
|
31
|
-
{...props}
|
|
32
|
-
/>
|
|
28
|
+
<Field ref={ref} className={cn(formFieldClasses(), className)} {...props} />
|
|
33
29
|
)
|
|
34
30
|
}
|
|
35
31
|
|
|
@@ -4,6 +4,6 @@
|
|
|
4
4
|
* Variant classes for the FormField block.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
export const
|
|
8
|
-
return "
|
|
7
|
+
export const formFieldClasses = (): string => {
|
|
8
|
+
return "lex-form-field flex flex-col gap-[var(--lex-space-2)]"
|
|
9
9
|
}
|
|
@@ -20,7 +20,7 @@ import type {
|
|
|
20
20
|
SettingsPanelProps,
|
|
21
21
|
SettingsPanelTitleProps,
|
|
22
22
|
} from "./SettingsPanel.types"
|
|
23
|
-
import {
|
|
23
|
+
import { settingsPanelClasses } from "./SettingsPanel.variants"
|
|
24
24
|
import { cn } from "@/lib/utils"
|
|
25
25
|
|
|
26
26
|
const SettingsPanel = ({
|
|
@@ -34,7 +34,7 @@ const SettingsPanel = ({
|
|
|
34
34
|
<Card
|
|
35
35
|
ref={ref}
|
|
36
36
|
variant={variant}
|
|
37
|
-
className={cn(
|
|
37
|
+
className={cn(settingsPanelClasses(), className)}
|
|
38
38
|
{...cardProps}
|
|
39
39
|
>
|
|
40
40
|
{children}
|
|
@@ -4,6 +4,6 @@
|
|
|
4
4
|
* Variant classes for the SettingsPanel block.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
export const
|
|
8
|
-
return "
|
|
7
|
+
export const settingsPanelClasses = (): string => {
|
|
8
|
+
return "lex-settings-panel w-full text-(--lex-color-text-primary)"
|
|
9
9
|
}
|