@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,66 +1,188 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { cn } from "../../lib/utils.js";
|
|
2
|
+
import { Label } from "./label.js";
|
|
3
|
+
import { Separator } from "./separator.js";
|
|
4
|
+
import { createComponent, insert, mergeProps, spread, template } from "solid-js/web";
|
|
5
|
+
import { Show, createMemo, splitProps } from "solid-js";
|
|
6
|
+
import { cva } from "class-variance-authority";
|
|
7
|
+
//#region src/components/ui/field.tsx
|
|
8
|
+
var _tmpl$ = /*#__PURE__*/ template(`<fieldset data-slot=field-set>`);
|
|
9
|
+
var _tmpl$2 = /*#__PURE__*/ template(`<legend data-slot=field-legend>`);
|
|
10
|
+
var _tmpl$3 = /*#__PURE__*/ template(`<div data-slot=field-group>`);
|
|
11
|
+
var _tmpl$4 = /*#__PURE__*/ template(`<div role=group data-slot=field>`);
|
|
12
|
+
var _tmpl$5 = /*#__PURE__*/ template(`<div data-slot=field-content>`);
|
|
13
|
+
var _tmpl$6 = /*#__PURE__*/ template(`<div data-slot=field-label>`);
|
|
14
|
+
var _tmpl$7 = /*#__PURE__*/ template(`<p data-slot=field-description>`);
|
|
15
|
+
var _tmpl$8 = /*#__PURE__*/ template(`<span class="relative mx-auto block w-fit bg-background px-2 text-muted-foreground"data-slot=field-separator-content>`);
|
|
16
|
+
var _tmpl$9 = /*#__PURE__*/ template(`<div data-slot=field-separator>`);
|
|
17
|
+
var _tmpl$0 = /*#__PURE__*/ template(`<span>`);
|
|
18
|
+
var _tmpl$1 = /*#__PURE__*/ template(`<ul class="ml-4 flex list-disc flex-col gap-1">`);
|
|
19
|
+
var _tmpl$10 = /*#__PURE__*/ template(`<li>`);
|
|
20
|
+
var _tmpl$11 = /*#__PURE__*/ template(`<div role=alert data-slot=field-error>`);
|
|
21
|
+
function FieldSet(props) {
|
|
22
|
+
const [local, rest] = splitProps(props, ["class"]);
|
|
23
|
+
return (() => {
|
|
24
|
+
var _el$ = _tmpl$();
|
|
25
|
+
spread(_el$, mergeProps({ get ["class"]() {
|
|
26
|
+
return cn("flex flex-col gap-4 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3", local.class);
|
|
27
|
+
} }, rest), false, false);
|
|
28
|
+
return _el$;
|
|
29
|
+
})();
|
|
10
30
|
}
|
|
11
|
-
function FieldLegend(
|
|
12
|
-
|
|
31
|
+
function FieldLegend(props) {
|
|
32
|
+
const [local, rest] = splitProps(props, ["class", "variant"]);
|
|
33
|
+
return (() => {
|
|
34
|
+
var _el$2 = _tmpl$2();
|
|
35
|
+
spread(_el$2, mergeProps({
|
|
36
|
+
get ["data-variant"]() {
|
|
37
|
+
return local.variant ?? "legend";
|
|
38
|
+
},
|
|
39
|
+
get ["class"]() {
|
|
40
|
+
return cn("mb-1.5 font-medium data-[variant=label]:text-sm data-[variant=legend]:text-base", local.class);
|
|
41
|
+
}
|
|
42
|
+
}, rest), false, false);
|
|
43
|
+
return _el$2;
|
|
44
|
+
})();
|
|
13
45
|
}
|
|
14
|
-
function FieldGroup(
|
|
15
|
-
|
|
46
|
+
function FieldGroup(props) {
|
|
47
|
+
const [local, rest] = splitProps(props, ["class"]);
|
|
48
|
+
return (() => {
|
|
49
|
+
var _el$3 = _tmpl$3();
|
|
50
|
+
spread(_el$3, mergeProps({ get ["class"]() {
|
|
51
|
+
return cn("group/field-group @container/field-group flex w-full flex-col gap-5 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4", local.class);
|
|
52
|
+
} }, rest), false, false);
|
|
53
|
+
return _el$3;
|
|
54
|
+
})();
|
|
16
55
|
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
},
|
|
25
|
-
defaultVariants: {
|
|
26
|
-
orientation: 'vertical',
|
|
27
|
-
},
|
|
56
|
+
var fieldVariants = cva("group/field flex w-full gap-2 data-[invalid=true]:text-destructive", {
|
|
57
|
+
variants: { orientation: {
|
|
58
|
+
vertical: "flex-col *:w-full [&>.sr-only]:w-auto",
|
|
59
|
+
horizontal: "flex-row items-center has-[>[data-slot=field-content]]:items-start *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",
|
|
60
|
+
responsive: "flex-col *:w-full @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:*:data-[slot=field-label]:flex-auto [&>.sr-only]:w-auto @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"
|
|
61
|
+
} },
|
|
62
|
+
defaultVariants: { orientation: "vertical" }
|
|
28
63
|
});
|
|
29
|
-
function Field(
|
|
30
|
-
|
|
64
|
+
function Field(props) {
|
|
65
|
+
const [local, rest] = splitProps(props, ["class", "orientation"]);
|
|
66
|
+
return (() => {
|
|
67
|
+
var _el$4 = _tmpl$4();
|
|
68
|
+
spread(_el$4, mergeProps({
|
|
69
|
+
get ["data-orientation"]() {
|
|
70
|
+
return local.orientation ?? "vertical";
|
|
71
|
+
},
|
|
72
|
+
get ["class"]() {
|
|
73
|
+
return cn(fieldVariants({ orientation: local.orientation }), local.class);
|
|
74
|
+
}
|
|
75
|
+
}, rest), false, false);
|
|
76
|
+
return _el$4;
|
|
77
|
+
})();
|
|
31
78
|
}
|
|
32
|
-
function FieldContent(
|
|
33
|
-
|
|
79
|
+
function FieldContent(props) {
|
|
80
|
+
const [local, rest] = splitProps(props, ["class"]);
|
|
81
|
+
return (() => {
|
|
82
|
+
var _el$5 = _tmpl$5();
|
|
83
|
+
spread(_el$5, mergeProps({ get ["class"]() {
|
|
84
|
+
return cn("group/field-content flex flex-1 flex-col gap-0.5 leading-snug", local.class);
|
|
85
|
+
} }, rest), false, false);
|
|
86
|
+
return _el$5;
|
|
87
|
+
})();
|
|
34
88
|
}
|
|
35
|
-
function FieldLabel(
|
|
36
|
-
|
|
89
|
+
function FieldLabel(props) {
|
|
90
|
+
const [local, rest] = splitProps(props, ["class"]);
|
|
91
|
+
return createComponent(Label, mergeProps({
|
|
92
|
+
"data-slot": "field-label",
|
|
93
|
+
get ["class"]() {
|
|
94
|
+
return cn("group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-data-checked:border-primary/30 has-data-checked:bg-primary/5 has-[>[data-slot=field]]:rounded-lg has-[>[data-slot=field]]:border has-[>[data-slot=field]]:not-has-[:disabled,[data-disabled]]:hover:bg-muted/50 has-[>[data-slot=field]]:has-[:focus-visible]:border-ring has-[>[data-slot=field]]:has-[:focus-visible]:ring-3 has-[>[data-slot=field]]:has-[:focus-visible]:ring-ring/50 *:data-[slot=field]:p-2.5 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10", "has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col", local.class);
|
|
95
|
+
}
|
|
96
|
+
}, rest));
|
|
37
97
|
}
|
|
38
|
-
function FieldTitle(
|
|
39
|
-
|
|
98
|
+
function FieldTitle(props) {
|
|
99
|
+
const [local, rest] = splitProps(props, ["class"]);
|
|
100
|
+
return (() => {
|
|
101
|
+
var _el$6 = _tmpl$6();
|
|
102
|
+
spread(_el$6, mergeProps({ get ["class"]() {
|
|
103
|
+
return cn("flex w-fit items-center gap-2 text-sm font-medium group-data-[disabled=true]/field:opacity-50", local.class);
|
|
104
|
+
} }, rest), false, false);
|
|
105
|
+
return _el$6;
|
|
106
|
+
})();
|
|
40
107
|
}
|
|
41
|
-
function FieldDescription(
|
|
42
|
-
|
|
108
|
+
function FieldDescription(props) {
|
|
109
|
+
const [local, rest] = splitProps(props, ["class"]);
|
|
110
|
+
return (() => {
|
|
111
|
+
var _el$7 = _tmpl$7();
|
|
112
|
+
spread(_el$7, mergeProps({ get ["class"]() {
|
|
113
|
+
return cn("text-left text-sm leading-normal font-normal text-muted-foreground group-has-data-horizontal/field:text-balance [[data-variant=legend]+&]:-mt-1.5", "last:mt-0 nth-last-2:-mt-1", "[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary", local.class);
|
|
114
|
+
} }, rest), false, false);
|
|
115
|
+
return _el$7;
|
|
116
|
+
})();
|
|
43
117
|
}
|
|
44
|
-
function FieldSeparator(
|
|
45
|
-
|
|
118
|
+
function FieldSeparator(props) {
|
|
119
|
+
const [local, rest] = splitProps(props, ["class", "children"]);
|
|
120
|
+
return (() => {
|
|
121
|
+
var _el$8 = _tmpl$9();
|
|
122
|
+
spread(_el$8, mergeProps({
|
|
123
|
+
get ["data-content"]() {
|
|
124
|
+
return !!local.children;
|
|
125
|
+
},
|
|
126
|
+
get ["class"]() {
|
|
127
|
+
return cn("relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2", local.class);
|
|
128
|
+
}
|
|
129
|
+
}, rest), false, true);
|
|
130
|
+
insert(_el$8, createComponent(Separator, { "class": "absolute inset-0 top-1/2" }), null);
|
|
131
|
+
insert(_el$8, createComponent(Show, {
|
|
132
|
+
get when() {
|
|
133
|
+
return local.children;
|
|
134
|
+
},
|
|
135
|
+
get children() {
|
|
136
|
+
var _el$9 = _tmpl$8();
|
|
137
|
+
insert(_el$9, () => local.children);
|
|
138
|
+
return _el$9;
|
|
139
|
+
}
|
|
140
|
+
}), null);
|
|
141
|
+
return _el$8;
|
|
142
|
+
})();
|
|
46
143
|
}
|
|
47
|
-
function FieldError(
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
144
|
+
function FieldError(props) {
|
|
145
|
+
const [local, rest] = splitProps(props, [
|
|
146
|
+
"class",
|
|
147
|
+
"children",
|
|
148
|
+
"errors"
|
|
149
|
+
]);
|
|
150
|
+
const content = createMemo(() => {
|
|
151
|
+
if (local.children) return local.children;
|
|
152
|
+
const errors = local.errors;
|
|
153
|
+
if (!errors?.length) return null;
|
|
154
|
+
const uniqueErrors = [...new Map(errors.map((error) => [error?.message, error])).values()];
|
|
155
|
+
if (uniqueErrors.length === 1) {
|
|
156
|
+
const message = uniqueErrors[0]?.message;
|
|
157
|
+
return message ? (() => {
|
|
158
|
+
var _el$0 = _tmpl$0();
|
|
159
|
+
insert(_el$0, message);
|
|
160
|
+
return _el$0;
|
|
161
|
+
})() : null;
|
|
162
|
+
}
|
|
163
|
+
return (() => {
|
|
164
|
+
var _el$1 = _tmpl$1();
|
|
165
|
+
insert(_el$1, () => uniqueErrors.map((error) => error?.message && (() => {
|
|
166
|
+
var _el$10 = _tmpl$10();
|
|
167
|
+
insert(_el$10, () => error.message);
|
|
168
|
+
return _el$10;
|
|
169
|
+
})()));
|
|
170
|
+
return _el$1;
|
|
171
|
+
})();
|
|
172
|
+
});
|
|
173
|
+
return createComponent(Show, {
|
|
174
|
+
get when() {
|
|
175
|
+
return content();
|
|
176
|
+
},
|
|
177
|
+
get children() {
|
|
178
|
+
var _el$11 = _tmpl$11();
|
|
179
|
+
spread(_el$11, mergeProps({ get ["class"]() {
|
|
180
|
+
return cn("text-sm font-normal text-destructive", local.class);
|
|
181
|
+
} }, rest), false, true);
|
|
182
|
+
insert(_el$11, content);
|
|
183
|
+
return _el$11;
|
|
184
|
+
}
|
|
185
|
+
});
|
|
65
186
|
}
|
|
66
|
-
|
|
187
|
+
//#endregion
|
|
188
|
+
export { Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
declare function Input(
|
|
1
|
+
import { type ComponentProps } from 'solid-js';
|
|
2
|
+
declare function Input(props: ComponentProps<'input'>): import("solid-js").JSX.Element;
|
|
3
3
|
export { Input };
|
|
@@ -1,7 +1,22 @@
|
|
|
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
|
+
//#region src/components/ui/input.tsx
|
|
5
|
+
var _tmpl$ = /*#__PURE__*/ template(`<input data-slot=input>`);
|
|
6
|
+
function Input(props) {
|
|
7
|
+
const [local, rest] = splitProps(props, ["class", "type"]);
|
|
8
|
+
return (() => {
|
|
9
|
+
var _el$ = _tmpl$();
|
|
10
|
+
spread(_el$, mergeProps({
|
|
11
|
+
get type() {
|
|
12
|
+
return local.type;
|
|
13
|
+
},
|
|
14
|
+
get ["class"]() {
|
|
15
|
+
return cn("h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40", local.class);
|
|
16
|
+
}
|
|
17
|
+
}, rest), false, false);
|
|
18
|
+
return _el$;
|
|
19
|
+
})();
|
|
6
20
|
}
|
|
21
|
+
//#endregion
|
|
7
22
|
export { Input };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
declare function Label(
|
|
1
|
+
import { type ComponentProps } from 'solid-js';
|
|
2
|
+
declare function Label(props: ComponentProps<'label'>): import("solid-js").JSX.Element;
|
|
3
3
|
export { Label };
|
|
@@ -1,7 +1,17 @@
|
|
|
1
|
-
|
|
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
|
+
//#region src/components/ui/label.tsx
|
|
5
|
+
var _tmpl$ = /*#__PURE__*/ template(`<label data-slot=label>`);
|
|
6
|
+
function Label(props) {
|
|
7
|
+
const [local, rest] = splitProps(props, ["class"]);
|
|
8
|
+
return (() => {
|
|
9
|
+
var _el$ = _tmpl$();
|
|
10
|
+
spread(_el$, mergeProps({ get ["class"]() {
|
|
11
|
+
return cn("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50", local.class);
|
|
12
|
+
} }, rest), false, false);
|
|
13
|
+
return _el$;
|
|
14
|
+
})();
|
|
6
15
|
}
|
|
16
|
+
//#endregion
|
|
7
17
|
export { Label };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
declare function RadioGroup(
|
|
4
|
-
declare function RadioGroupItem(
|
|
1
|
+
import { RadioGroup as RadioGroupPrimitive } from '@kobalte/core/radio-group';
|
|
2
|
+
import { type ComponentProps } from 'solid-js';
|
|
3
|
+
declare function RadioGroup(props: ComponentProps<typeof RadioGroupPrimitive>): import("solid-js").JSX.Element;
|
|
4
|
+
declare function RadioGroupItem(props: ComponentProps<typeof RadioGroupPrimitive.Item>): import("solid-js").JSX.Element;
|
|
5
5
|
export { RadioGroup, RadioGroupItem };
|
|
@@ -1,12 +1,39 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { RadioGroup as
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { cn } from "../../lib/utils.js";
|
|
2
|
+
import { createComponent, mergeProps, template } from "solid-js/web";
|
|
3
|
+
import { splitProps } from "solid-js";
|
|
4
|
+
import { RadioGroup as RadioGroup$1 } from "@kobalte/core/radio-group";
|
|
5
|
+
//#region src/components/ui/radio-group.tsx
|
|
6
|
+
var _tmpl$ = /*#__PURE__*/ template(`<span class="absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2 rounded-full bg-primary-foreground">`);
|
|
7
|
+
function RadioGroup(props) {
|
|
8
|
+
const [local, rest] = splitProps(props, ["class"]);
|
|
9
|
+
return createComponent(RadioGroup$1, mergeProps({
|
|
10
|
+
"data-slot": "radio-group",
|
|
11
|
+
get ["class"]() {
|
|
12
|
+
return cn("grid w-full gap-2", local.class);
|
|
13
|
+
}
|
|
14
|
+
}, rest));
|
|
8
15
|
}
|
|
9
|
-
function RadioGroupItem(
|
|
10
|
-
|
|
16
|
+
function RadioGroupItem(props) {
|
|
17
|
+
const [local, rest] = splitProps(props, ["class"]);
|
|
18
|
+
return createComponent(RadioGroup$1.Item, mergeProps({
|
|
19
|
+
"data-slot": "radio-group-item",
|
|
20
|
+
get ["class"]() {
|
|
21
|
+
return cn("group/radio-group-item peer relative flex aspect-square size-4 shrink-0 rounded-full border border-input outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary", local.class);
|
|
22
|
+
}
|
|
23
|
+
}, rest, { get children() {
|
|
24
|
+
return [createComponent(RadioGroup$1.ItemInput, {}), createComponent(RadioGroup$1.ItemControl, {
|
|
25
|
+
"class": "flex size-4 items-center justify-center rounded-full",
|
|
26
|
+
get children() {
|
|
27
|
+
return createComponent(RadioGroup$1.ItemIndicator, {
|
|
28
|
+
"data-slot": "radio-group-indicator",
|
|
29
|
+
"class": "flex size-4 items-center justify-center",
|
|
30
|
+
get children() {
|
|
31
|
+
return _tmpl$();
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
})];
|
|
36
|
+
} }));
|
|
11
37
|
}
|
|
38
|
+
//#endregion
|
|
12
39
|
export { RadioGroup, RadioGroupItem };
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
-
import { Separator as SeparatorPrimitive } from '@
|
|
2
|
-
|
|
1
|
+
import { Separator as SeparatorPrimitive } from '@kobalte/core/separator';
|
|
2
|
+
import { type ComponentProps } from 'solid-js';
|
|
3
|
+
type SeparatorProps = ComponentProps<typeof SeparatorPrimitive> & {
|
|
4
|
+
orientation?: 'horizontal' | 'vertical';
|
|
5
|
+
};
|
|
6
|
+
declare function Separator(props: SeparatorProps): import("solid-js").JSX.Element;
|
|
3
7
|
export { Separator };
|
|
@@ -1,8 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { cn } from "../../lib/utils.js";
|
|
2
|
+
import { createComponent, mergeProps } from "solid-js/web";
|
|
3
|
+
import { splitProps } from "solid-js";
|
|
4
|
+
import { Separator as Separator$1 } from "@kobalte/core/separator";
|
|
5
|
+
//#region src/components/ui/separator.tsx
|
|
6
|
+
function Separator(props) {
|
|
7
|
+
const [local, rest] = splitProps(props, ["class", "orientation"]);
|
|
8
|
+
const orientation = () => local.orientation ?? "horizontal";
|
|
9
|
+
return createComponent(Separator$1, mergeProps({
|
|
10
|
+
"data-slot": "separator",
|
|
11
|
+
get orientation() {
|
|
12
|
+
return orientation();
|
|
13
|
+
},
|
|
14
|
+
get ["class"]() {
|
|
15
|
+
return cn("shrink-0 bg-border", orientation() === "vertical" ? "w-px self-stretch" : "h-px w-full", local.class);
|
|
16
|
+
}
|
|
17
|
+
}, rest));
|
|
7
18
|
}
|
|
19
|
+
//#endregion
|
|
8
20
|
export { Separator };
|
|
@@ -1,6 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { cn } from "../../lib/utils.js";
|
|
2
|
+
import { mergeProps, spread, template } from "solid-js/web";
|
|
3
|
+
import { splitProps } from "solid-js";
|
|
4
|
+
//#region src/components/ui/skeleton.tsx
|
|
5
|
+
var _tmpl$ = /*#__PURE__*/ template(`<div data-slot=skeleton>`);
|
|
6
|
+
function Skeleton(props) {
|
|
7
|
+
const [local, rest] = splitProps(props, ["class"]);
|
|
8
|
+
return (() => {
|
|
9
|
+
var _el$ = _tmpl$();
|
|
10
|
+
spread(_el$, mergeProps({ get ["class"]() {
|
|
11
|
+
return cn("animate-pulse rounded-md bg-muted", local.class);
|
|
12
|
+
} }, rest), false, false);
|
|
13
|
+
return _el$;
|
|
14
|
+
})();
|
|
5
15
|
}
|
|
16
|
+
//#endregion
|
|
6
17
|
export { Skeleton };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { LoaderCircle } from 'lucide-
|
|
2
|
-
import type
|
|
3
|
-
|
|
1
|
+
import { LoaderCircle } from 'lucide-solid';
|
|
2
|
+
import { type ComponentProps } from 'solid-js';
|
|
3
|
+
type SpinnerProps = ComponentProps<typeof LoaderCircle>;
|
|
4
|
+
declare function Spinner(props: SpinnerProps): import("solid-js").JSX.Element;
|
|
4
5
|
export { Spinner };
|
|
@@ -1,7 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { cn } from "../../lib/utils.js";
|
|
2
|
+
import { createComponent, mergeProps } from "solid-js/web";
|
|
3
|
+
import { LoaderCircle } from "lucide-solid";
|
|
4
|
+
import { splitProps } from "solid-js";
|
|
5
|
+
//#region src/components/ui/spinner.tsx
|
|
6
|
+
function Spinner(props) {
|
|
7
|
+
const [local, rest] = splitProps(props, ["class"]);
|
|
8
|
+
return createComponent(LoaderCircle, mergeProps({
|
|
9
|
+
role: "status",
|
|
10
|
+
"aria-label": "Loading",
|
|
11
|
+
get ["class"]() {
|
|
12
|
+
return cn("animate-spin", local.class);
|
|
13
|
+
}
|
|
14
|
+
}, rest));
|
|
6
15
|
}
|
|
16
|
+
//#endregion
|
|
7
17
|
export { Spinner };
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import { Switch as SwitchPrimitive } from '@
|
|
2
|
-
|
|
1
|
+
import { Switch as SwitchPrimitive } from '@kobalte/core/switch';
|
|
2
|
+
import { type ComponentProps } from 'solid-js';
|
|
3
|
+
type SwitchProps = ComponentProps<typeof SwitchPrimitive> & {
|
|
4
|
+
class?: string;
|
|
3
5
|
size?: 'sm' | 'default';
|
|
4
|
-
}
|
|
6
|
+
};
|
|
7
|
+
declare function Switch(props: SwitchProps): import("solid-js").JSX.Element;
|
|
5
8
|
export { Switch };
|
|
@@ -1,8 +1,59 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { cn } from "../../lib/utils.js";
|
|
2
|
+
import { createComponent, mergeProps } from "solid-js/web";
|
|
3
|
+
import { splitProps } from "solid-js";
|
|
4
|
+
import { Switch as Switch$1 } from "@kobalte/core/switch";
|
|
5
|
+
//#region src/components/ui/switch.tsx
|
|
6
|
+
function Switch(props) {
|
|
7
|
+
const [local, rest] = splitProps(props, [
|
|
8
|
+
"class",
|
|
9
|
+
"size",
|
|
10
|
+
"aria-label",
|
|
11
|
+
"aria-describedby"
|
|
12
|
+
]);
|
|
13
|
+
return createComponent(Switch$1, mergeProps({
|
|
14
|
+
"data-slot": "switch",
|
|
15
|
+
get ["data-size"]() {
|
|
16
|
+
return local.size ?? "default";
|
|
17
|
+
},
|
|
18
|
+
get ["class"]() {
|
|
19
|
+
return cn("peer group/switch relative inline-flex shrink-0 items-center", local.class);
|
|
20
|
+
}
|
|
21
|
+
}, rest, { get children() {
|
|
22
|
+
return [createComponent(Switch$1.Input, {
|
|
23
|
+
get ["aria-label"]() {
|
|
24
|
+
return local["aria-label"];
|
|
25
|
+
},
|
|
26
|
+
get ["aria-describedby"]() {
|
|
27
|
+
return local["aria-describedby"];
|
|
28
|
+
},
|
|
29
|
+
style: {
|
|
30
|
+
position: "absolute",
|
|
31
|
+
inset: "0",
|
|
32
|
+
width: "100%",
|
|
33
|
+
height: "100%",
|
|
34
|
+
margin: "0",
|
|
35
|
+
padding: "0",
|
|
36
|
+
border: "0",
|
|
37
|
+
opacity: "0",
|
|
38
|
+
cursor: "pointer",
|
|
39
|
+
clip: "auto",
|
|
40
|
+
"clip-path": "none",
|
|
41
|
+
overflow: "visible",
|
|
42
|
+
"white-space": "normal",
|
|
43
|
+
"z-index": "2"
|
|
44
|
+
}
|
|
45
|
+
}), createComponent(Switch$1.Control, {
|
|
46
|
+
get ["class"]() {
|
|
47
|
+
return cn("inline-flex shrink-0 items-center rounded-full border border-transparent transition-all outline-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 group-data-[size=default]/switch:h-[18.4px] group-data-[size=default]/switch:w-[32px] group-data-[size=sm]/switch:h-[14px] group-data-[size=sm]/switch:w-[24px] dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 group-data-checked/switch:bg-primary group-not-data-checked/switch:bg-input dark:group-not-data-checked/switch:bg-input/80 group-data-disabled/switch:cursor-not-allowed group-data-disabled/switch:opacity-50");
|
|
48
|
+
},
|
|
49
|
+
get children() {
|
|
50
|
+
return createComponent(Switch$1.Thumb, {
|
|
51
|
+
"data-slot": "switch-thumb",
|
|
52
|
+
"class": "pointer-events-none block rounded-full bg-background ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-checked/switch:translate-x-[calc(100%-2px)] dark:group-data-checked/switch:bg-primary-foreground dark:group-not-data-checked/switch:bg-foreground"
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
})];
|
|
56
|
+
} }));
|
|
7
57
|
}
|
|
58
|
+
//#endregion
|
|
8
59
|
export { Switch };
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { Tabs as TabsPrimitive } from '@
|
|
1
|
+
import { Tabs as TabsPrimitive } from '@kobalte/core/tabs';
|
|
2
2
|
import { type VariantProps } from 'class-variance-authority';
|
|
3
|
-
|
|
3
|
+
import { type ComponentProps } from 'solid-js';
|
|
4
|
+
declare function Tabs(props: ComponentProps<typeof TabsPrimitive>): import("solid-js").JSX.Element;
|
|
4
5
|
declare const tabsListVariants: (props?: ({
|
|
5
6
|
variant?: "default" | "line" | null | undefined;
|
|
6
7
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
|
-
declare function TabsList(
|
|
8
|
-
declare function TabsTrigger(
|
|
9
|
-
declare function TabsContent(
|
|
8
|
+
declare function TabsList(props: ComponentProps<typeof TabsPrimitive.List> & VariantProps<typeof tabsListVariants>): import("solid-js").JSX.Element;
|
|
9
|
+
declare function TabsTrigger(props: ComponentProps<typeof TabsPrimitive.Trigger>): import("solid-js").JSX.Element;
|
|
10
|
+
declare function TabsContent(props: ComponentProps<typeof TabsPrimitive.Content>): import("solid-js").JSX.Element;
|
|
10
11
|
export { Tabs, TabsList, TabsTrigger, TabsContent, tabsListVariants };
|