@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.
Files changed (92) hide show
  1. package/README.md +6 -3
  2. package/dist/components/account-drawer.d.ts +3 -3
  3. package/dist/components/account-drawer.js +119 -19
  4. package/dist/components/on-screen-controls.d.ts +2 -1
  5. package/dist/components/on-screen-controls.js +158 -46
  6. package/dist/components/scene-settings.d.ts +3 -3
  7. package/dist/components/scene-settings.js +247 -28
  8. package/dist/components/theme-provider.d.ts +27 -5
  9. package/dist/components/theme-provider.js +96 -7
  10. package/dist/components/theme-toggle.d.ts +4 -4
  11. package/dist/components/theme-toggle.js +62 -18
  12. package/dist/components/ui/badge.d.ts +4 -3
  13. package/dist/components/ui/badge.js +31 -30
  14. package/dist/components/ui/button.d.ts +4 -3
  15. package/dist/components/ui/button.js +49 -32
  16. package/dist/components/ui/card.d.ts +3 -3
  17. package/dist/components/ui/card.js +25 -6
  18. package/dist/components/ui/dialog.d.ts +13 -13
  19. package/dist/components/ui/dialog.js +94 -26
  20. package/dist/components/ui/drawer.d.ts +23 -15
  21. package/dist/components/ui/drawer.js +109 -64
  22. package/dist/components/ui/dropdown-menu.d.ts +28 -22
  23. package/dist/components/ui/dropdown-menu.js +165 -36
  24. package/dist/components/ui/empty.d.ts +7 -6
  25. package/dist/components/ui/empty.js +78 -26
  26. package/dist/components/ui/field.d.ts +15 -14
  27. package/dist/components/ui/field.js +177 -55
  28. package/dist/components/ui/input.d.ts +2 -2
  29. package/dist/components/ui/input.js +20 -5
  30. package/dist/components/ui/label.d.ts +2 -2
  31. package/dist/components/ui/label.js +15 -5
  32. package/dist/components/ui/radio-group.d.ts +4 -4
  33. package/dist/components/ui/radio-group.js +36 -9
  34. package/dist/components/ui/separator.d.ts +6 -2
  35. package/dist/components/ui/separator.js +18 -6
  36. package/dist/components/ui/skeleton.d.ts +2 -1
  37. package/dist/components/ui/skeleton.js +15 -4
  38. package/dist/components/ui/spinner.d.ts +4 -3
  39. package/dist/components/ui/spinner.js +15 -5
  40. package/dist/components/ui/switch.d.ts +6 -3
  41. package/dist/components/ui/switch.js +57 -6
  42. package/dist/components/ui/tabs.d.ts +6 -5
  43. package/dist/components/ui/tabs.js +52 -24
  44. package/dist/components/ui/toggle-group.d.ts +10 -8
  45. package/dist/components/ui/toggle-group.js +91 -20
  46. package/dist/components/ui/toggle.d.ts +4 -2
  47. package/dist/components/ui/toggle.js +38 -23
  48. package/dist/components/ui/tooltip.d.ts +13 -6
  49. package/dist/components/ui/tooltip.js +51 -14
  50. package/dist/components/version-dialog.d.ts +2 -2
  51. package/dist/components/version-dialog.js +322 -129
  52. package/dist/components/workspace-brand.d.ts +1 -1
  53. package/dist/components/workspace-brand.js +12 -3
  54. package/dist/components/workspace-logo.d.ts +2 -2
  55. package/dist/components/workspace-logo.js +15 -3
  56. package/dist/index.d.ts +1 -1
  57. package/dist/index.js +20 -19
  58. package/dist/lib/utils.js +7 -4
  59. package/dist/lib/version-notes.js +14 -29
  60. package/package.json +18 -16
  61. package/src/components/account-drawer.tsx +48 -67
  62. package/src/components/on-screen-controls.tsx +55 -62
  63. package/src/components/scene-settings.tsx +97 -100
  64. package/src/components/theme-provider.tsx +122 -22
  65. package/src/components/theme-toggle.tsx +29 -54
  66. package/src/components/ui/badge.tsx +14 -23
  67. package/src/components/ui/button.tsx +9 -11
  68. package/src/components/ui/card.tsx +9 -6
  69. package/src/components/ui/dialog.tsx +58 -55
  70. package/src/components/ui/drawer.tsx +84 -125
  71. package/src/components/ui/dropdown-menu.tsx +130 -153
  72. package/src/components/ui/empty.tsx +29 -26
  73. package/src/components/ui/field.tsx +83 -87
  74. package/src/components/ui/input.tsx +8 -8
  75. package/src/components/ui/label.tsx +6 -7
  76. package/src/components/ui/radio-group.tsx +22 -19
  77. package/src/components/ui/separator.tsx +16 -9
  78. package/src/components/ui/skeleton.tsx +6 -3
  79. package/src/components/ui/spinner.tsx +9 -5
  80. package/src/components/ui/switch.tsx +47 -20
  81. package/src/components/ui/tabs.tsx +31 -30
  82. package/src/components/ui/toggle-group.tsx +65 -54
  83. package/src/components/ui/toggle.tsx +9 -12
  84. package/src/components/ui/tooltip.tsx +41 -36
  85. package/src/components/version-dialog.tsx +144 -144
  86. package/src/components/workspace-brand.tsx +5 -5
  87. package/src/components/workspace-logo.tsx +9 -8
  88. package/src/index.tsx +7 -1
  89. package/src/styles/base.css +637 -0
  90. package/src/styles/globals.css +1 -1
  91. package/tsconfig.json +2 -1
  92. package/components.json +0 -19
@@ -1,66 +1,188 @@
1
- 'use client';
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { useMemo } from 'react';
4
- import { cva } from 'class-variance-authority';
5
- import { cn } from '#lib/utils';
6
- import { Label } from '#components/ui/label';
7
- import { Separator } from '#components/ui/separator';
8
- function FieldSet({ className, ...props }) {
9
- return (_jsx("fieldset", { "data-slot": "field-set", className: cn('flex flex-col gap-4 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3', className), ...props }));
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({ className, variant = 'legend', ...props }) {
12
- return (_jsx("legend", { "data-slot": "field-legend", "data-variant": variant, className: cn('mb-1.5 font-medium data-[variant=label]:text-sm data-[variant=legend]:text-base', className), ...props }));
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({ className, ...props }) {
15
- return (_jsx("div", { "data-slot": "field-group", className: 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', className), ...props }));
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
- const fieldVariants = cva('group/field flex w-full gap-2 data-[invalid=true]:text-destructive', {
18
- variants: {
19
- orientation: {
20
- vertical: 'flex-col *:w-full [&>.sr-only]:w-auto',
21
- 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',
22
- 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',
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({ className, orientation = 'vertical', ...props }) {
30
- return (_jsx("div", { role: "group", "data-slot": "field", "data-orientation": orientation, className: cn(fieldVariants({ orientation }), className), ...props }));
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({ className, ...props }) {
33
- return (_jsx("div", { "data-slot": "field-content", className: cn('group/field-content flex flex-1 flex-col gap-0.5 leading-snug', className), ...props }));
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({ className, ...props }) {
36
- return (_jsx(Label, { "data-slot": "field-label", className: 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', className), ...props }));
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({ className, ...props }) {
39
- return (_jsx("div", { "data-slot": "field-label", className: cn('flex w-fit items-center gap-2 text-sm font-medium group-data-[disabled=true]/field:opacity-50', className), ...props }));
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({ className, ...props }) {
42
- return (_jsx("p", { "data-slot": "field-description", className: 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', className), ...props }));
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({ children, className, ...props }) {
45
- return (_jsxs("div", { "data-slot": "field-separator", "data-content": !!children, className: cn('relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2', className), ...props, children: [_jsx(Separator, { className: "absolute inset-0 top-1/2" }), children && (_jsx("span", { className: "relative mx-auto block w-fit bg-background px-2 text-muted-foreground", "data-slot": "field-separator-content", children: children }))] }));
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({ className, children, errors, ...props }) {
48
- const content = useMemo(() => {
49
- if (children) {
50
- return children;
51
- }
52
- if (!errors?.length) {
53
- return null;
54
- }
55
- const uniqueErrors = [...new Map(errors.map((error) => [error?.message, error])).values()];
56
- if (uniqueErrors?.length == 1) {
57
- return uniqueErrors[0]?.message;
58
- }
59
- return (_jsx("ul", { className: "ml-4 flex list-disc flex-col gap-1", children: uniqueErrors.map((error, index) => error?.message && _jsx("li", { children: error.message }, index)) }));
60
- }, [children, errors]);
61
- if (!content) {
62
- return null;
63
- }
64
- return (_jsx("div", { role: "alert", "data-slot": "field-error", className: cn('text-sm font-normal text-destructive', className), ...props, children: content }));
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
- export { Field, FieldLabel, FieldDescription, FieldError, FieldGroup, FieldLegend, FieldSeparator, FieldSet, FieldContent, FieldTitle, };
187
+ //#endregion
188
+ export { Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle };
@@ -1,3 +1,3 @@
1
- import * as React from 'react';
2
- declare function Input({ className, type, ...props }: React.ComponentProps<'input'>): React.JSX.Element;
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 { jsx as _jsx } from "react/jsx-runtime";
2
- import { Input as InputPrimitive } from '@base-ui/react/input';
3
- import { cn } from '#lib/utils';
4
- function Input({ className, type, ...props }) {
5
- return (_jsx(InputPrimitive, { type: type, "data-slot": "input", className: 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', className), ...props }));
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 * as React from 'react';
2
- declare function Label({ className, ...props }: React.ComponentProps<'label'>): React.JSX.Element;
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
- 'use client';
2
- import { jsx as _jsx } from "react/jsx-runtime";
3
- import { cn } from '#lib/utils';
4
- function Label({ className, ...props }) {
5
- return (_jsx("label", { "data-slot": "label", className: 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', className), ...props }));
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 { Radio as RadioPrimitive } from '@base-ui/react/radio';
2
- import { RadioGroup as RadioGroupPrimitive } from '@base-ui/react/radio-group';
3
- declare function RadioGroup({ className, ...props }: RadioGroupPrimitive.Props): import("react").JSX.Element;
4
- declare function RadioGroupItem({ className, ...props }: RadioPrimitive.Root.Props): import("react").JSX.Element;
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
- 'use client';
2
- import { jsx as _jsx } from "react/jsx-runtime";
3
- import { Radio as RadioPrimitive } from '@base-ui/react/radio';
4
- import { RadioGroup as RadioGroupPrimitive } from '@base-ui/react/radio-group';
5
- import { cn } from '#lib/utils';
6
- function RadioGroup({ className, ...props }) {
7
- return (_jsx(RadioGroupPrimitive, { "data-slot": "radio-group", className: cn('grid w-full gap-2', className), ...props }));
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({ className, ...props }) {
10
- return (_jsx(RadioPrimitive.Root, { "data-slot": "radio-group-item", className: 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', className), ...props, children: _jsx(RadioPrimitive.Indicator, { "data-slot": "radio-group-indicator", className: "flex size-4 items-center justify-center", children: _jsx("span", { className: "absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2 rounded-full bg-primary-foreground" }) }) }));
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 '@base-ui/react/separator';
2
- declare function Separator({ className, orientation, ...props }: SeparatorPrimitive.Props): import("react").JSX.Element;
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
- 'use client';
2
- import { jsx as _jsx } from "react/jsx-runtime";
3
- import { Separator as SeparatorPrimitive } from '@base-ui/react/separator';
4
- import { cn } from '#lib/utils';
5
- function Separator({ className, orientation = 'horizontal', ...props }) {
6
- return (_jsx(SeparatorPrimitive, { "data-slot": "separator", orientation: orientation, className: cn('shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch', className), ...props }));
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,2 +1,3 @@
1
- declare function Skeleton({ className, ...props }: React.ComponentProps<'div'>): import("react").JSX.Element;
1
+ import { type ComponentProps } from 'solid-js';
2
+ declare function Skeleton(props: ComponentProps<'div'>): import("solid-js").JSX.Element;
2
3
  export { Skeleton };
@@ -1,6 +1,17 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { cn } from '#lib/utils';
3
- function Skeleton({ className, ...props }) {
4
- return (_jsx("div", { "data-slot": "skeleton", className: cn('animate-pulse rounded-md bg-muted', className), ...props }));
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-react';
2
- import type { ComponentProps } from 'react';
3
- declare function Spinner({ className, ...props }: ComponentProps<typeof LoaderCircle>): import("react").JSX.Element;
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 { jsx as _jsx } from "react/jsx-runtime";
2
- import { LoaderCircle } from 'lucide-react';
3
- import { cn } from '#lib/utils';
4
- function Spinner({ className, ...props }) {
5
- return (_jsx(LoaderCircle, { role: "status", "aria-label": "Loading", className: cn('animate-spin', className), ...props }));
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 '@base-ui/react/switch';
2
- declare function Switch({ className, size, ...props }: SwitchPrimitive.Root.Props & {
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
- }): import("react").JSX.Element;
6
+ };
7
+ declare function Switch(props: SwitchProps): import("solid-js").JSX.Element;
5
8
  export { Switch };
@@ -1,8 +1,59 @@
1
- 'use client';
2
- import { jsx as _jsx } from "react/jsx-runtime";
3
- import { Switch as SwitchPrimitive } from '@base-ui/react/switch';
4
- import { cn } from '#lib/utils';
5
- function Switch({ className, size = 'default', ...props }) {
6
- return (_jsx(SwitchPrimitive.Root, { "data-slot": "switch", "data-size": size, className: cn('peer group/switch relative inline-flex shrink-0 items-center rounded-full border border-transparent transition-all 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 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px] dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:bg-primary data-unchecked:bg-input dark:data-unchecked:bg-input/80 data-disabled:cursor-not-allowed data-disabled:opacity-50', className), ...props, children: _jsx(SwitchPrimitive.Thumb, { "data-slot": "switch-thumb", className: "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-[size=default]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=sm]/switch:data-checked:translate-x-[calc(100%-2px)] dark:data-checked:bg-primary-foreground group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0 dark:data-unchecked:bg-foreground" }) }));
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 '@base-ui/react/tabs';
1
+ import { Tabs as TabsPrimitive } from '@kobalte/core/tabs';
2
2
  import { type VariantProps } from 'class-variance-authority';
3
- declare function Tabs({ className, orientation, ...props }: TabsPrimitive.Root.Props): import("react").JSX.Element;
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({ className, variant, ...props }: TabsPrimitive.List.Props & VariantProps<typeof tabsListVariants>): import("react").JSX.Element;
8
- declare function TabsTrigger({ className, ...props }: TabsPrimitive.Tab.Props): import("react").JSX.Element;
9
- declare function TabsContent({ className, ...props }: TabsPrimitive.Panel.Props): import("react").JSX.Element;
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 };