@adea-ai/ui 0.22.2 → 0.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -3
- package/dist/components/account-drawer.d.ts +3 -3
- package/dist/components/account-drawer.js +119 -19
- package/dist/components/on-screen-controls.d.ts +2 -1
- package/dist/components/on-screen-controls.js +158 -46
- package/dist/components/scene-settings.d.ts +3 -3
- package/dist/components/scene-settings.js +247 -28
- package/dist/components/theme-provider.d.ts +27 -5
- package/dist/components/theme-provider.js +96 -7
- package/dist/components/theme-toggle.d.ts +4 -4
- package/dist/components/theme-toggle.js +62 -18
- package/dist/components/ui/badge.d.ts +4 -3
- package/dist/components/ui/badge.js +31 -30
- package/dist/components/ui/button.d.ts +4 -3
- package/dist/components/ui/button.js +49 -32
- package/dist/components/ui/card.d.ts +3 -3
- package/dist/components/ui/card.js +25 -6
- package/dist/components/ui/dialog.d.ts +13 -13
- package/dist/components/ui/dialog.js +94 -26
- package/dist/components/ui/drawer.d.ts +23 -15
- package/dist/components/ui/drawer.js +109 -64
- package/dist/components/ui/dropdown-menu.d.ts +28 -22
- package/dist/components/ui/dropdown-menu.js +165 -36
- package/dist/components/ui/empty.d.ts +7 -6
- package/dist/components/ui/empty.js +78 -26
- package/dist/components/ui/field.d.ts +15 -14
- package/dist/components/ui/field.js +177 -55
- package/dist/components/ui/input.d.ts +2 -2
- package/dist/components/ui/input.js +20 -5
- package/dist/components/ui/label.d.ts +2 -2
- package/dist/components/ui/label.js +15 -5
- package/dist/components/ui/radio-group.d.ts +4 -4
- package/dist/components/ui/radio-group.js +36 -9
- package/dist/components/ui/separator.d.ts +6 -2
- package/dist/components/ui/separator.js +18 -6
- package/dist/components/ui/skeleton.d.ts +2 -1
- package/dist/components/ui/skeleton.js +15 -4
- package/dist/components/ui/spinner.d.ts +4 -3
- package/dist/components/ui/spinner.js +15 -5
- package/dist/components/ui/switch.d.ts +6 -3
- package/dist/components/ui/switch.js +57 -6
- package/dist/components/ui/tabs.d.ts +6 -5
- package/dist/components/ui/tabs.js +52 -24
- package/dist/components/ui/toggle-group.d.ts +10 -8
- package/dist/components/ui/toggle-group.js +91 -20
- package/dist/components/ui/toggle.d.ts +4 -2
- package/dist/components/ui/toggle.js +38 -23
- package/dist/components/ui/tooltip.d.ts +13 -6
- package/dist/components/ui/tooltip.js +51 -14
- package/dist/components/version-dialog.d.ts +2 -2
- package/dist/components/version-dialog.js +322 -129
- package/dist/components/workspace-brand.d.ts +1 -1
- package/dist/components/workspace-brand.js +12 -3
- package/dist/components/workspace-logo.d.ts +2 -2
- package/dist/components/workspace-logo.js +15 -3
- package/dist/index.d.ts +1 -1
- package/dist/index.js +20 -19
- package/dist/lib/utils.js +7 -4
- package/dist/lib/version-notes.js +14 -29
- package/package.json +18 -16
- package/src/components/account-drawer.tsx +48 -67
- package/src/components/on-screen-controls.tsx +55 -62
- package/src/components/scene-settings.tsx +97 -100
- package/src/components/theme-provider.tsx +122 -22
- package/src/components/theme-toggle.tsx +29 -54
- package/src/components/ui/badge.tsx +14 -23
- package/src/components/ui/button.tsx +9 -11
- package/src/components/ui/card.tsx +9 -6
- package/src/components/ui/dialog.tsx +58 -55
- package/src/components/ui/drawer.tsx +84 -125
- package/src/components/ui/dropdown-menu.tsx +130 -153
- package/src/components/ui/empty.tsx +29 -26
- package/src/components/ui/field.tsx +83 -87
- package/src/components/ui/input.tsx +8 -8
- package/src/components/ui/label.tsx +6 -7
- package/src/components/ui/radio-group.tsx +22 -19
- package/src/components/ui/separator.tsx +16 -9
- package/src/components/ui/skeleton.tsx +6 -3
- package/src/components/ui/spinner.tsx +9 -5
- package/src/components/ui/switch.tsx +47 -20
- package/src/components/ui/tabs.tsx +31 -30
- package/src/components/ui/toggle-group.tsx +65 -54
- package/src/components/ui/toggle.tsx +9 -12
- package/src/components/ui/tooltip.tsx +41 -36
- package/src/components/version-dialog.tsx +144 -144
- package/src/components/workspace-brand.tsx +5 -5
- package/src/components/workspace-logo.tsx +9 -8
- package/src/index.tsx +7 -1
- package/src/styles/base.css +637 -0
- package/src/styles/globals.css +1 -1
- package/tsconfig.json +2 -1
- package/components.json +0 -19
|
@@ -1,51 +1,180 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { cn } from "../../lib/utils.js";
|
|
2
|
+
import { createComponent, insert, memo, mergeProps, spread, template } from "solid-js/web";
|
|
3
|
+
import { CheckIcon, ChevronRightIcon } from "lucide-solid";
|
|
4
|
+
import { splitProps } from "solid-js";
|
|
5
|
+
import { DropdownMenu as DropdownMenu$1 } from "@kobalte/core/dropdown-menu";
|
|
6
|
+
//#region src/components/ui/dropdown-menu.tsx
|
|
7
|
+
var _tmpl$ = /*#__PURE__*/ template(`<span class="pointer-events-none absolute right-2 flex items-center justify-center"data-slot=dropdown-menu-checkbox-item-indicator>`);
|
|
8
|
+
var _tmpl$2 = /*#__PURE__*/ template(`<span class="pointer-events-none absolute right-2 flex items-center justify-center"data-slot=dropdown-menu-radio-item-indicator>`);
|
|
9
|
+
var _tmpl$3 = /*#__PURE__*/ template(`<span data-slot=dropdown-menu-shortcut>`);
|
|
10
|
+
function DropdownMenu(props) {
|
|
11
|
+
return createComponent(DropdownMenu$1, mergeProps({ "data-slot": "dropdown-menu" }, props));
|
|
8
12
|
}
|
|
9
|
-
function DropdownMenuPortal(
|
|
10
|
-
|
|
13
|
+
function DropdownMenuPortal(props) {
|
|
14
|
+
return createComponent(DropdownMenu$1.Portal, mergeProps({ "data-slot": "dropdown-menu-portal" }, props));
|
|
11
15
|
}
|
|
12
|
-
function DropdownMenuTrigger(
|
|
13
|
-
|
|
16
|
+
function DropdownMenuTrigger(props) {
|
|
17
|
+
return createComponent(DropdownMenu$1.Trigger, mergeProps({ "data-slot": "dropdown-menu-trigger" }, props));
|
|
14
18
|
}
|
|
15
|
-
function DropdownMenuContent(
|
|
16
|
-
|
|
19
|
+
function DropdownMenuContent(props) {
|
|
20
|
+
const [local, rest] = splitProps(props, [
|
|
21
|
+
"class",
|
|
22
|
+
"side",
|
|
23
|
+
"align",
|
|
24
|
+
"sideOffset",
|
|
25
|
+
"children"
|
|
26
|
+
]);
|
|
27
|
+
const placement = () => `${local.side ?? "bottom"}${local.align ? `-${local.align}` : ""}`;
|
|
28
|
+
return createComponent(DropdownMenu$1.Portal, { get children() {
|
|
29
|
+
return createComponent(DropdownMenu$1.Content, mergeProps({
|
|
30
|
+
"data-slot": "dropdown-menu-content",
|
|
31
|
+
get placement() {
|
|
32
|
+
return placement();
|
|
33
|
+
},
|
|
34
|
+
get gutter() {
|
|
35
|
+
return local.sideOffset ?? 4;
|
|
36
|
+
},
|
|
37
|
+
get ["class"]() {
|
|
38
|
+
return cn("z-[140] max-h-(--kb-popper-available-height) min-w-32 origin-(--kb-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 data-expanded:animate-in data-expanded:fade-in-0 data-expanded:zoom-in-95", local.class);
|
|
39
|
+
}
|
|
40
|
+
}, rest, { get children() {
|
|
41
|
+
return local.children;
|
|
42
|
+
} }));
|
|
43
|
+
} });
|
|
17
44
|
}
|
|
18
|
-
function DropdownMenuGroup(
|
|
19
|
-
|
|
45
|
+
function DropdownMenuGroup(props) {
|
|
46
|
+
return createComponent(DropdownMenu$1.Group, mergeProps({ "data-slot": "dropdown-menu-group" }, props));
|
|
20
47
|
}
|
|
21
|
-
function DropdownMenuLabel(
|
|
22
|
-
|
|
48
|
+
function DropdownMenuLabel(props) {
|
|
49
|
+
const [local, rest] = splitProps(props, ["class", "inset"]);
|
|
50
|
+
return createComponent(DropdownMenu$1.GroupLabel, mergeProps({
|
|
51
|
+
"data-slot": "dropdown-menu-label",
|
|
52
|
+
get ["data-inset"]() {
|
|
53
|
+
return local.inset;
|
|
54
|
+
},
|
|
55
|
+
get ["class"]() {
|
|
56
|
+
return cn("px-1.5 py-1 text-xs font-medium text-muted-foreground data-[inset]:pl-7", local.class);
|
|
57
|
+
}
|
|
58
|
+
}, rest));
|
|
23
59
|
}
|
|
24
|
-
function DropdownMenuItem(
|
|
25
|
-
|
|
60
|
+
function DropdownMenuItem(props) {
|
|
61
|
+
const [local, rest] = splitProps(props, [
|
|
62
|
+
"class",
|
|
63
|
+
"inset",
|
|
64
|
+
"variant"
|
|
65
|
+
]);
|
|
66
|
+
return createComponent(DropdownMenu$1.Item, mergeProps({
|
|
67
|
+
"data-slot": "dropdown-menu-item",
|
|
68
|
+
get ["data-inset"]() {
|
|
69
|
+
return local.inset;
|
|
70
|
+
},
|
|
71
|
+
get ["data-variant"]() {
|
|
72
|
+
return local.variant ?? "default";
|
|
73
|
+
},
|
|
74
|
+
get ["class"]() {
|
|
75
|
+
return cn("group/dropdown-menu-item relative flex cursor-pointer items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-[inset]:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-highlighted:bg-accent data-highlighted:text-accent-foreground data-highlighted:not-data-[variant=destructive]:text-accent-foreground data-[variant=destructive]:data-highlighted:bg-destructive/10 data-[variant=destructive]:data-highlighted:text-destructive data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive", local.class);
|
|
76
|
+
}
|
|
77
|
+
}, rest));
|
|
26
78
|
}
|
|
27
|
-
function DropdownMenuSub(
|
|
28
|
-
|
|
79
|
+
function DropdownMenuSub(props) {
|
|
80
|
+
return createComponent(DropdownMenu$1.Sub, mergeProps({ "data-slot": "dropdown-menu-sub" }, props));
|
|
29
81
|
}
|
|
30
|
-
function DropdownMenuSubTrigger(
|
|
31
|
-
|
|
82
|
+
function DropdownMenuSubTrigger(props) {
|
|
83
|
+
const [local, rest] = splitProps(props, [
|
|
84
|
+
"class",
|
|
85
|
+
"inset",
|
|
86
|
+
"children"
|
|
87
|
+
]);
|
|
88
|
+
return createComponent(DropdownMenu$1.SubTrigger, mergeProps({
|
|
89
|
+
"data-slot": "dropdown-menu-sub-trigger",
|
|
90
|
+
get ["data-inset"]() {
|
|
91
|
+
return local.inset;
|
|
92
|
+
},
|
|
93
|
+
get ["class"]() {
|
|
94
|
+
return cn("flex cursor-pointer items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[inset]:pl-7 data-expanded:bg-accent data-expanded:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", local.class);
|
|
95
|
+
}
|
|
96
|
+
}, rest, { get children() {
|
|
97
|
+
return [memo(() => local.children), createComponent(ChevronRightIcon, { "class": "ml-auto" })];
|
|
98
|
+
} }));
|
|
32
99
|
}
|
|
33
|
-
function DropdownMenuSubContent(
|
|
34
|
-
|
|
100
|
+
function DropdownMenuSubContent(props) {
|
|
101
|
+
const [local, rest] = splitProps(props, ["class"]);
|
|
102
|
+
return createComponent(DropdownMenuContent, mergeProps({
|
|
103
|
+
"data-slot": "dropdown-menu-sub-content",
|
|
104
|
+
get ["class"]() {
|
|
105
|
+
return cn("w-auto min-w-[96px] rounded-lg bg-popover p-1 text-popover-foreground shadow-lg ring-1 ring-foreground/10 duration-100 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 data-expanded:animate-in data-expanded:fade-in-0 data-expanded:zoom-in-95", local.class);
|
|
106
|
+
}
|
|
107
|
+
}, rest));
|
|
35
108
|
}
|
|
36
|
-
function DropdownMenuCheckboxItem(
|
|
37
|
-
|
|
109
|
+
function DropdownMenuCheckboxItem(props) {
|
|
110
|
+
const [local, rest] = splitProps(props, [
|
|
111
|
+
"class",
|
|
112
|
+
"children",
|
|
113
|
+
"inset"
|
|
114
|
+
]);
|
|
115
|
+
return createComponent(DropdownMenu$1.CheckboxItem, mergeProps({
|
|
116
|
+
"data-slot": "dropdown-menu-checkbox-item",
|
|
117
|
+
get ["data-inset"]() {
|
|
118
|
+
return local.inset;
|
|
119
|
+
},
|
|
120
|
+
get ["class"]() {
|
|
121
|
+
return cn("relative flex cursor-pointer items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-[inset]:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", local.class);
|
|
122
|
+
}
|
|
123
|
+
}, rest, { get children() {
|
|
124
|
+
return [(() => {
|
|
125
|
+
var _el$ = _tmpl$();
|
|
126
|
+
insert(_el$, createComponent(DropdownMenu$1.ItemIndicator, { get children() {
|
|
127
|
+
return createComponent(CheckIcon, {});
|
|
128
|
+
} }));
|
|
129
|
+
return _el$;
|
|
130
|
+
})(), memo(() => local.children)];
|
|
131
|
+
} }));
|
|
38
132
|
}
|
|
39
|
-
function DropdownMenuRadioGroup(
|
|
40
|
-
|
|
133
|
+
function DropdownMenuRadioGroup(props) {
|
|
134
|
+
return createComponent(DropdownMenu$1.RadioGroup, mergeProps({ "data-slot": "dropdown-menu-radio-group" }, props));
|
|
41
135
|
}
|
|
42
|
-
function DropdownMenuRadioItem(
|
|
43
|
-
|
|
136
|
+
function DropdownMenuRadioItem(props) {
|
|
137
|
+
const [local, rest] = splitProps(props, [
|
|
138
|
+
"class",
|
|
139
|
+
"children",
|
|
140
|
+
"inset"
|
|
141
|
+
]);
|
|
142
|
+
return createComponent(DropdownMenu$1.RadioItem, mergeProps({
|
|
143
|
+
"data-slot": "dropdown-menu-radio-item",
|
|
144
|
+
get ["data-inset"]() {
|
|
145
|
+
return local.inset;
|
|
146
|
+
},
|
|
147
|
+
get ["class"]() {
|
|
148
|
+
return cn("relative flex cursor-pointer items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-[inset]:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", local.class);
|
|
149
|
+
}
|
|
150
|
+
}, rest, { get children() {
|
|
151
|
+
return [(() => {
|
|
152
|
+
var _el$2 = _tmpl$2();
|
|
153
|
+
insert(_el$2, createComponent(DropdownMenu$1.ItemIndicator, { get children() {
|
|
154
|
+
return createComponent(CheckIcon, {});
|
|
155
|
+
} }));
|
|
156
|
+
return _el$2;
|
|
157
|
+
})(), memo(() => local.children)];
|
|
158
|
+
} }));
|
|
44
159
|
}
|
|
45
|
-
function DropdownMenuSeparator(
|
|
46
|
-
|
|
160
|
+
function DropdownMenuSeparator(props) {
|
|
161
|
+
const [local, rest] = splitProps(props, ["class"]);
|
|
162
|
+
return createComponent(DropdownMenu$1.Separator, mergeProps({
|
|
163
|
+
"data-slot": "dropdown-menu-separator",
|
|
164
|
+
get ["class"]() {
|
|
165
|
+
return cn("-mx-1 my-1 h-px bg-border", local.class);
|
|
166
|
+
}
|
|
167
|
+
}, rest));
|
|
47
168
|
}
|
|
48
|
-
function DropdownMenuShortcut(
|
|
49
|
-
|
|
169
|
+
function DropdownMenuShortcut(props) {
|
|
170
|
+
const [local, rest] = splitProps(props, ["class"]);
|
|
171
|
+
return (() => {
|
|
172
|
+
var _el$3 = _tmpl$3();
|
|
173
|
+
spread(_el$3, mergeProps({ get ["class"]() {
|
|
174
|
+
return cn("ml-auto text-xs tracking-widest text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground", local.class);
|
|
175
|
+
} }, rest), false, false);
|
|
176
|
+
return _el$3;
|
|
177
|
+
})();
|
|
50
178
|
}
|
|
51
|
-
|
|
179
|
+
//#endregion
|
|
180
|
+
export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger };
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { type VariantProps } from 'class-variance-authority';
|
|
2
|
-
|
|
3
|
-
declare function
|
|
2
|
+
import { type ComponentProps } from 'solid-js';
|
|
3
|
+
declare function Empty(props: ComponentProps<'div'>): import("solid-js").JSX.Element;
|
|
4
|
+
declare function EmptyHeader(props: ComponentProps<'div'>): import("solid-js").JSX.Element;
|
|
4
5
|
declare const emptyMediaVariants: (props?: ({
|
|
5
6
|
variant?: "default" | "icon" | null | undefined;
|
|
6
7
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
|
-
declare function EmptyMedia(
|
|
8
|
-
declare function EmptyTitle(
|
|
9
|
-
declare function EmptyDescription(
|
|
10
|
-
declare function EmptyContent(
|
|
8
|
+
declare function EmptyMedia(props: ComponentProps<'div'> & VariantProps<typeof emptyMediaVariants>): import("solid-js").JSX.Element;
|
|
9
|
+
declare function EmptyTitle(props: ComponentProps<'div'>): import("solid-js").JSX.Element;
|
|
10
|
+
declare function EmptyDescription(props: ComponentProps<'p'>): import("solid-js").JSX.Element;
|
|
11
|
+
declare function EmptyContent(props: ComponentProps<'div'>): import("solid-js").JSX.Element;
|
|
11
12
|
export { Empty, EmptyHeader, EmptyTitle, EmptyDescription, EmptyContent, EmptyMedia };
|
|
@@ -1,33 +1,85 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { cn } from "../../lib/utils.js";
|
|
2
|
+
import { mergeProps, spread, template } from "solid-js/web";
|
|
3
|
+
import { splitProps } from "solid-js";
|
|
4
|
+
import { cva } from "class-variance-authority";
|
|
5
|
+
//#region src/components/ui/empty.tsx
|
|
6
|
+
var _tmpl$ = /*#__PURE__*/ template(`<div data-slot=empty>`);
|
|
7
|
+
var _tmpl$2 = /*#__PURE__*/ template(`<div data-slot=empty-header>`);
|
|
8
|
+
var _tmpl$3 = /*#__PURE__*/ template(`<div data-slot=empty-icon>`);
|
|
9
|
+
var _tmpl$4 = /*#__PURE__*/ template(`<div data-slot=empty-title>`);
|
|
10
|
+
var _tmpl$5 = /*#__PURE__*/ template(`<div data-slot=empty-description>`);
|
|
11
|
+
var _tmpl$6 = /*#__PURE__*/ template(`<div data-slot=empty-content>`);
|
|
12
|
+
function Empty(props) {
|
|
13
|
+
const [local, rest] = splitProps(props, ["class"]);
|
|
14
|
+
return (() => {
|
|
15
|
+
var _el$ = _tmpl$();
|
|
16
|
+
spread(_el$, mergeProps({ get ["class"]() {
|
|
17
|
+
return cn("flex w-full min-w-0 flex-1 flex-col items-center justify-center gap-4 rounded-xl border-dashed p-6 text-center text-balance", local.class);
|
|
18
|
+
} }, rest), false, false);
|
|
19
|
+
return _el$;
|
|
20
|
+
})();
|
|
6
21
|
}
|
|
7
|
-
function EmptyHeader(
|
|
8
|
-
|
|
22
|
+
function EmptyHeader(props) {
|
|
23
|
+
const [local, rest] = splitProps(props, ["class"]);
|
|
24
|
+
return (() => {
|
|
25
|
+
var _el$2 = _tmpl$2();
|
|
26
|
+
spread(_el$2, mergeProps({ get ["class"]() {
|
|
27
|
+
return cn("flex max-w-sm flex-col items-center gap-2", local.class);
|
|
28
|
+
} }, rest), false, false);
|
|
29
|
+
return _el$2;
|
|
30
|
+
})();
|
|
9
31
|
}
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
},
|
|
17
|
-
defaultVariants: {
|
|
18
|
-
variant: 'default',
|
|
19
|
-
},
|
|
32
|
+
var emptyMediaVariants = cva("mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0", {
|
|
33
|
+
variants: { variant: {
|
|
34
|
+
default: "bg-transparent",
|
|
35
|
+
icon: "flex size-8 shrink-0 items-center justify-center rounded-lg bg-muted text-foreground [&_svg:not([class*='size-'])]:size-4"
|
|
36
|
+
} },
|
|
37
|
+
defaultVariants: { variant: "default" }
|
|
20
38
|
});
|
|
21
|
-
function EmptyMedia(
|
|
22
|
-
|
|
39
|
+
function EmptyMedia(props) {
|
|
40
|
+
const [local, rest] = splitProps(props, ["class", "variant"]);
|
|
41
|
+
return (() => {
|
|
42
|
+
var _el$3 = _tmpl$3();
|
|
43
|
+
spread(_el$3, mergeProps({
|
|
44
|
+
get ["data-variant"]() {
|
|
45
|
+
return local.variant ?? "default";
|
|
46
|
+
},
|
|
47
|
+
get ["class"]() {
|
|
48
|
+
return cn(emptyMediaVariants({ variant: local.variant }), local.class);
|
|
49
|
+
}
|
|
50
|
+
}, rest), false, false);
|
|
51
|
+
return _el$3;
|
|
52
|
+
})();
|
|
23
53
|
}
|
|
24
|
-
function EmptyTitle(
|
|
25
|
-
|
|
54
|
+
function EmptyTitle(props) {
|
|
55
|
+
const [local, rest] = splitProps(props, ["class"]);
|
|
56
|
+
return (() => {
|
|
57
|
+
var _el$4 = _tmpl$4();
|
|
58
|
+
spread(_el$4, mergeProps({ get ["class"]() {
|
|
59
|
+
return cn("text-sm font-medium tracking-tight", local.class);
|
|
60
|
+
} }, rest), false, false);
|
|
61
|
+
return _el$4;
|
|
62
|
+
})();
|
|
26
63
|
}
|
|
27
|
-
function EmptyDescription(
|
|
28
|
-
|
|
64
|
+
function EmptyDescription(props) {
|
|
65
|
+
const [local, rest] = splitProps(props, ["class"]);
|
|
66
|
+
return (() => {
|
|
67
|
+
var _el$5 = _tmpl$5();
|
|
68
|
+
spread(_el$5, mergeProps({ get ["class"]() {
|
|
69
|
+
return cn("text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary", local.class);
|
|
70
|
+
} }, rest), false, false);
|
|
71
|
+
return _el$5;
|
|
72
|
+
})();
|
|
29
73
|
}
|
|
30
|
-
function EmptyContent(
|
|
31
|
-
|
|
74
|
+
function EmptyContent(props) {
|
|
75
|
+
const [local, rest] = splitProps(props, ["class"]);
|
|
76
|
+
return (() => {
|
|
77
|
+
var _el$6 = _tmpl$6();
|
|
78
|
+
spread(_el$6, mergeProps({ get ["class"]() {
|
|
79
|
+
return cn("flex w-full max-w-sm min-w-0 flex-col items-center gap-2.5 text-sm text-balance", local.class);
|
|
80
|
+
} }, rest), false, false);
|
|
81
|
+
return _el$6;
|
|
82
|
+
})();
|
|
32
83
|
}
|
|
33
|
-
|
|
84
|
+
//#endregion
|
|
85
|
+
export { Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle };
|
|
@@ -1,24 +1,25 @@
|
|
|
1
1
|
import { type VariantProps } from 'class-variance-authority';
|
|
2
|
+
import { type ComponentProps, type JSX } from 'solid-js';
|
|
2
3
|
import { Label } from '#components/ui/label';
|
|
3
|
-
declare function FieldSet(
|
|
4
|
-
declare function FieldLegend(
|
|
4
|
+
declare function FieldSet(props: ComponentProps<'fieldset'>): JSX.Element;
|
|
5
|
+
declare function FieldLegend(props: ComponentProps<'legend'> & {
|
|
5
6
|
variant?: 'legend' | 'label';
|
|
6
|
-
}):
|
|
7
|
-
declare function FieldGroup(
|
|
7
|
+
}): JSX.Element;
|
|
8
|
+
declare function FieldGroup(props: ComponentProps<'div'>): JSX.Element;
|
|
8
9
|
declare const fieldVariants: (props?: ({
|
|
9
10
|
orientation?: "horizontal" | "vertical" | "responsive" | null | undefined;
|
|
10
11
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
11
|
-
declare function Field(
|
|
12
|
-
declare function FieldContent(
|
|
13
|
-
declare function FieldLabel(
|
|
14
|
-
declare function FieldTitle(
|
|
15
|
-
declare function FieldDescription(
|
|
16
|
-
declare function FieldSeparator(
|
|
17
|
-
children?:
|
|
18
|
-
}):
|
|
19
|
-
declare function FieldError(
|
|
12
|
+
declare function Field(props: ComponentProps<'div'> & VariantProps<typeof fieldVariants>): JSX.Element;
|
|
13
|
+
declare function FieldContent(props: ComponentProps<'div'>): JSX.Element;
|
|
14
|
+
declare function FieldLabel(props: ComponentProps<typeof Label>): JSX.Element;
|
|
15
|
+
declare function FieldTitle(props: ComponentProps<'div'>): JSX.Element;
|
|
16
|
+
declare function FieldDescription(props: ComponentProps<'p'>): JSX.Element;
|
|
17
|
+
declare function FieldSeparator(props: ComponentProps<'div'> & {
|
|
18
|
+
children?: JSX.Element;
|
|
19
|
+
}): JSX.Element;
|
|
20
|
+
declare function FieldError(props: ComponentProps<'div'> & {
|
|
20
21
|
errors?: Array<{
|
|
21
22
|
message?: string;
|
|
22
23
|
} | undefined>;
|
|
23
|
-
}):
|
|
24
|
+
}): JSX.Element;
|
|
24
25
|
export { Field, FieldLabel, FieldDescription, FieldError, FieldGroup, FieldLegend, FieldSeparator, FieldSet, FieldContent, FieldTitle, };
|