@ucdjs-internal/shared-ui 0.1.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 (73) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +27 -0
  3. package/dist/components/shiki-code.d.mts +50 -0
  4. package/dist/components/shiki-code.mjs +76 -0
  5. package/dist/components/theme-toggle.d.mts +6 -0
  6. package/dist/components/theme-toggle.mjs +75 -0
  7. package/dist/hooks/index.d.mts +3 -0
  8. package/dist/hooks/index.mjs +4 -0
  9. package/dist/hooks/use-mobile.d.mts +4 -0
  10. package/dist/hooks/use-mobile.mjs +41 -0
  11. package/dist/hooks/use-theme.d.mts +11 -0
  12. package/dist/hooks/use-theme.mjs +105 -0
  13. package/dist/index.d.mts +3 -0
  14. package/dist/index.mjs +4 -0
  15. package/dist/lib/theme-script.d.mts +5 -0
  16. package/dist/lib/theme-script.mjs +26 -0
  17. package/dist/lib/utils.d.mts +6 -0
  18. package/dist/lib/utils.mjs +10 -0
  19. package/dist/styles/globals.css +219 -0
  20. package/dist/styles/shadcn-vendored.css +95 -0
  21. package/dist/ui/alert-dialog.d.mts +58 -0
  22. package/dist/ui/alert-dialog.mjs +387 -0
  23. package/dist/ui/avatar.d.mts +34 -0
  24. package/dist/ui/avatar.mjs +208 -0
  25. package/dist/ui/badge.d.mts +17 -0
  26. package/dist/ui/badge.mjs +76 -0
  27. package/dist/ui/breadcrumb.d.mts +37 -0
  28. package/dist/ui/breadcrumb.mjs +281 -0
  29. package/dist/ui/button.d.mts +18 -0
  30. package/dist/ui/button.mjs +82 -0
  31. package/dist/ui/card.d.mts +37 -0
  32. package/dist/ui/card.mjs +239 -0
  33. package/dist/ui/checkbox.d.mts +10 -0
  34. package/dist/ui/checkbox.mjs +52 -0
  35. package/dist/ui/collapsible.d.mts +15 -0
  36. package/dist/ui/collapsible.mjs +65 -0
  37. package/dist/ui/combobox.d.mts +81 -0
  38. package/dist/ui/combobox.mjs +641 -0
  39. package/dist/ui/command.d.mts +55 -0
  40. package/dist/ui/command.mjs +378 -0
  41. package/dist/ui/context-menu.d.mts +86 -0
  42. package/dist/ui/context-menu.mjs +520 -0
  43. package/dist/ui/dialog.d.mts +51 -0
  44. package/dist/ui/dialog.mjs +331 -0
  45. package/dist/ui/dropdown-menu.d.mts +84 -0
  46. package/dist/ui/dropdown-menu.mjs +534 -0
  47. package/dist/ui/field.d.mts +64 -0
  48. package/dist/ui/field.mjs +425 -0
  49. package/dist/ui/input-group.d.mts +45 -0
  50. package/dist/ui/input-group.mjs +254 -0
  51. package/dist/ui/input.d.mts +11 -0
  52. package/dist/ui/input.mjs +47 -0
  53. package/dist/ui/label.d.mts +10 -0
  54. package/dist/ui/label.mjs +41 -0
  55. package/dist/ui/scroll-area.d.mts +16 -0
  56. package/dist/ui/scroll-area.mjs +120 -0
  57. package/dist/ui/select.d.mts +55 -0
  58. package/dist/ui/select.mjs +414 -0
  59. package/dist/ui/separator.d.mts +11 -0
  60. package/dist/ui/separator.mjs +47 -0
  61. package/dist/ui/sheet.d.mts +42 -0
  62. package/dist/ui/sheet.mjs +318 -0
  63. package/dist/ui/sidebar.d.mts +160 -0
  64. package/dist/ui/sidebar.mjs +1258 -0
  65. package/dist/ui/skeleton.d.mts +9 -0
  66. package/dist/ui/skeleton.mjs +40 -0
  67. package/dist/ui/table.d.mts +38 -0
  68. package/dist/ui/table.mjs +269 -0
  69. package/dist/ui/textarea.d.mts +10 -0
  70. package/dist/ui/textarea.mjs +41 -0
  71. package/dist/ui/tooltip.d.mts +25 -0
  72. package/dist/ui/tooltip.mjs +149 -0
  73. package/package.json +111 -0
@@ -0,0 +1,9 @@
1
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
2
+
3
+ //#region src/ui/skeleton.d.ts
4
+ declare function Skeleton({
5
+ className,
6
+ ...props
7
+ }: React.ComponentProps<"div">): react_jsx_runtime0.JSX.Element;
8
+ //#endregion
9
+ export { Skeleton };
@@ -0,0 +1,40 @@
1
+ import { cn } from "../lib/utils.mjs";
2
+ import { jsx } from "react/jsx-runtime";
3
+ import { c } from "react/compiler-runtime";
4
+
5
+ //#region src/ui/skeleton.tsx
6
+ function Skeleton(t0) {
7
+ const $ = c(8);
8
+ let className;
9
+ let props;
10
+ if ($[0] !== t0) {
11
+ ({className, ...props} = t0);
12
+ $[0] = t0;
13
+ $[1] = className;
14
+ $[2] = props;
15
+ } else {
16
+ className = $[1];
17
+ props = $[2];
18
+ }
19
+ let t1;
20
+ if ($[3] !== className) {
21
+ t1 = cn("bg-muted rounded-md animate-pulse", className);
22
+ $[3] = className;
23
+ $[4] = t1;
24
+ } else t1 = $[4];
25
+ let t2;
26
+ if ($[5] !== props || $[6] !== t1) {
27
+ t2 = /* @__PURE__ */ jsx("div", {
28
+ "data-slot": "skeleton",
29
+ className: t1,
30
+ ...props
31
+ });
32
+ $[5] = props;
33
+ $[6] = t1;
34
+ $[7] = t2;
35
+ } else t2 = $[7];
36
+ return t2;
37
+ }
38
+
39
+ //#endregion
40
+ export { Skeleton };
@@ -0,0 +1,38 @@
1
+ import * as React from "react";
2
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
3
+
4
+ //#region src/ui/table.d.ts
5
+ declare function Table({
6
+ className,
7
+ ...props
8
+ }: React.ComponentProps<"table">): react_jsx_runtime0.JSX.Element;
9
+ declare function TableHeader({
10
+ className,
11
+ ...props
12
+ }: React.ComponentProps<"thead">): react_jsx_runtime0.JSX.Element;
13
+ declare function TableBody({
14
+ className,
15
+ ...props
16
+ }: React.ComponentProps<"tbody">): react_jsx_runtime0.JSX.Element;
17
+ declare function TableFooter({
18
+ className,
19
+ ...props
20
+ }: React.ComponentProps<"tfoot">): react_jsx_runtime0.JSX.Element;
21
+ declare function TableRow({
22
+ className,
23
+ ...props
24
+ }: React.ComponentProps<"tr">): react_jsx_runtime0.JSX.Element;
25
+ declare function TableHead({
26
+ className,
27
+ ...props
28
+ }: React.ComponentProps<"th">): react_jsx_runtime0.JSX.Element;
29
+ declare function TableCell({
30
+ className,
31
+ ...props
32
+ }: React.ComponentProps<"td">): react_jsx_runtime0.JSX.Element;
33
+ declare function TableCaption({
34
+ className,
35
+ ...props
36
+ }: React.ComponentProps<"caption">): react_jsx_runtime0.JSX.Element;
37
+ //#endregion
38
+ export { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow };
@@ -0,0 +1,269 @@
1
+ import { cn } from "../lib/utils.mjs";
2
+ import "react";
3
+ import { jsx } from "react/jsx-runtime";
4
+ import { c } from "react/compiler-runtime";
5
+
6
+ //#region src/ui/table.tsx
7
+ function Table(t0) {
8
+ const $ = c(8);
9
+ let className;
10
+ let props;
11
+ if ($[0] !== t0) {
12
+ ({className, ...props} = t0);
13
+ $[0] = t0;
14
+ $[1] = className;
15
+ $[2] = props;
16
+ } else {
17
+ className = $[1];
18
+ props = $[2];
19
+ }
20
+ let t1;
21
+ if ($[3] !== className) {
22
+ t1 = cn("w-full caption-bottom text-sm", className);
23
+ $[3] = className;
24
+ $[4] = t1;
25
+ } else t1 = $[4];
26
+ let t2;
27
+ if ($[5] !== props || $[6] !== t1) {
28
+ t2 = /* @__PURE__ */ jsx("div", {
29
+ "data-slot": "table-container",
30
+ className: "relative w-full overflow-x-auto",
31
+ children: /* @__PURE__ */ jsx("table", {
32
+ "data-slot": "table",
33
+ className: t1,
34
+ ...props
35
+ })
36
+ });
37
+ $[5] = props;
38
+ $[6] = t1;
39
+ $[7] = t2;
40
+ } else t2 = $[7];
41
+ return t2;
42
+ }
43
+ function TableHeader(t0) {
44
+ const $ = c(8);
45
+ let className;
46
+ let props;
47
+ if ($[0] !== t0) {
48
+ ({className, ...props} = t0);
49
+ $[0] = t0;
50
+ $[1] = className;
51
+ $[2] = props;
52
+ } else {
53
+ className = $[1];
54
+ props = $[2];
55
+ }
56
+ let t1;
57
+ if ($[3] !== className) {
58
+ t1 = cn("[&_tr]:border-b", className);
59
+ $[3] = className;
60
+ $[4] = t1;
61
+ } else t1 = $[4];
62
+ let t2;
63
+ if ($[5] !== props || $[6] !== t1) {
64
+ t2 = /* @__PURE__ */ jsx("thead", {
65
+ "data-slot": "table-header",
66
+ className: t1,
67
+ ...props
68
+ });
69
+ $[5] = props;
70
+ $[6] = t1;
71
+ $[7] = t2;
72
+ } else t2 = $[7];
73
+ return t2;
74
+ }
75
+ function TableBody(t0) {
76
+ const $ = c(8);
77
+ let className;
78
+ let props;
79
+ if ($[0] !== t0) {
80
+ ({className, ...props} = t0);
81
+ $[0] = t0;
82
+ $[1] = className;
83
+ $[2] = props;
84
+ } else {
85
+ className = $[1];
86
+ props = $[2];
87
+ }
88
+ let t1;
89
+ if ($[3] !== className) {
90
+ t1 = cn("[&_tr:last-child]:border-0", className);
91
+ $[3] = className;
92
+ $[4] = t1;
93
+ } else t1 = $[4];
94
+ let t2;
95
+ if ($[5] !== props || $[6] !== t1) {
96
+ t2 = /* @__PURE__ */ jsx("tbody", {
97
+ "data-slot": "table-body",
98
+ className: t1,
99
+ ...props
100
+ });
101
+ $[5] = props;
102
+ $[6] = t1;
103
+ $[7] = t2;
104
+ } else t2 = $[7];
105
+ return t2;
106
+ }
107
+ function TableFooter(t0) {
108
+ const $ = c(8);
109
+ let className;
110
+ let props;
111
+ if ($[0] !== t0) {
112
+ ({className, ...props} = t0);
113
+ $[0] = t0;
114
+ $[1] = className;
115
+ $[2] = props;
116
+ } else {
117
+ className = $[1];
118
+ props = $[2];
119
+ }
120
+ let t1;
121
+ if ($[3] !== className) {
122
+ t1 = cn("bg-muted/50 border-t font-medium [&>tr]:last:border-b-0", className);
123
+ $[3] = className;
124
+ $[4] = t1;
125
+ } else t1 = $[4];
126
+ let t2;
127
+ if ($[5] !== props || $[6] !== t1) {
128
+ t2 = /* @__PURE__ */ jsx("tfoot", {
129
+ "data-slot": "table-footer",
130
+ className: t1,
131
+ ...props
132
+ });
133
+ $[5] = props;
134
+ $[6] = t1;
135
+ $[7] = t2;
136
+ } else t2 = $[7];
137
+ return t2;
138
+ }
139
+ function TableRow(t0) {
140
+ const $ = c(8);
141
+ let className;
142
+ let props;
143
+ if ($[0] !== t0) {
144
+ ({className, ...props} = t0);
145
+ $[0] = t0;
146
+ $[1] = className;
147
+ $[2] = props;
148
+ } else {
149
+ className = $[1];
150
+ props = $[2];
151
+ }
152
+ let t1;
153
+ if ($[3] !== className) {
154
+ t1 = cn("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors", className);
155
+ $[3] = className;
156
+ $[4] = t1;
157
+ } else t1 = $[4];
158
+ let t2;
159
+ if ($[5] !== props || $[6] !== t1) {
160
+ t2 = /* @__PURE__ */ jsx("tr", {
161
+ "data-slot": "table-row",
162
+ className: t1,
163
+ ...props
164
+ });
165
+ $[5] = props;
166
+ $[6] = t1;
167
+ $[7] = t2;
168
+ } else t2 = $[7];
169
+ return t2;
170
+ }
171
+ function TableHead(t0) {
172
+ const $ = c(8);
173
+ let className;
174
+ let props;
175
+ if ($[0] !== t0) {
176
+ ({className, ...props} = t0);
177
+ $[0] = t0;
178
+ $[1] = className;
179
+ $[2] = props;
180
+ } else {
181
+ className = $[1];
182
+ props = $[2];
183
+ }
184
+ let t1;
185
+ if ($[3] !== className) {
186
+ t1 = cn("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0", className);
187
+ $[3] = className;
188
+ $[4] = t1;
189
+ } else t1 = $[4];
190
+ let t2;
191
+ if ($[5] !== props || $[6] !== t1) {
192
+ t2 = /* @__PURE__ */ jsx("th", {
193
+ "data-slot": "table-head",
194
+ className: t1,
195
+ ...props
196
+ });
197
+ $[5] = props;
198
+ $[6] = t1;
199
+ $[7] = t2;
200
+ } else t2 = $[7];
201
+ return t2;
202
+ }
203
+ function TableCell(t0) {
204
+ const $ = c(8);
205
+ let className;
206
+ let props;
207
+ if ($[0] !== t0) {
208
+ ({className, ...props} = t0);
209
+ $[0] = t0;
210
+ $[1] = className;
211
+ $[2] = props;
212
+ } else {
213
+ className = $[1];
214
+ props = $[2];
215
+ }
216
+ let t1;
217
+ if ($[3] !== className) {
218
+ t1 = cn("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0", className);
219
+ $[3] = className;
220
+ $[4] = t1;
221
+ } else t1 = $[4];
222
+ let t2;
223
+ if ($[5] !== props || $[6] !== t1) {
224
+ t2 = /* @__PURE__ */ jsx("td", {
225
+ "data-slot": "table-cell",
226
+ className: t1,
227
+ ...props
228
+ });
229
+ $[5] = props;
230
+ $[6] = t1;
231
+ $[7] = t2;
232
+ } else t2 = $[7];
233
+ return t2;
234
+ }
235
+ function TableCaption(t0) {
236
+ const $ = c(8);
237
+ let className;
238
+ let props;
239
+ if ($[0] !== t0) {
240
+ ({className, ...props} = t0);
241
+ $[0] = t0;
242
+ $[1] = className;
243
+ $[2] = props;
244
+ } else {
245
+ className = $[1];
246
+ props = $[2];
247
+ }
248
+ let t1;
249
+ if ($[3] !== className) {
250
+ t1 = cn("text-muted-foreground mt-4 text-sm", className);
251
+ $[3] = className;
252
+ $[4] = t1;
253
+ } else t1 = $[4];
254
+ let t2;
255
+ if ($[5] !== props || $[6] !== t1) {
256
+ t2 = /* @__PURE__ */ jsx("caption", {
257
+ "data-slot": "table-caption",
258
+ className: t1,
259
+ ...props
260
+ });
261
+ $[5] = props;
262
+ $[6] = t1;
263
+ $[7] = t2;
264
+ } else t2 = $[7];
265
+ return t2;
266
+ }
267
+
268
+ //#endregion
269
+ export { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow };
@@ -0,0 +1,10 @@
1
+ import * as React from "react";
2
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
3
+
4
+ //#region src/ui/textarea.d.ts
5
+ declare function Textarea({
6
+ className,
7
+ ...props
8
+ }: React.ComponentProps<"textarea">): react_jsx_runtime0.JSX.Element;
9
+ //#endregion
10
+ export { Textarea };
@@ -0,0 +1,41 @@
1
+ import { cn } from "../lib/utils.mjs";
2
+ import "react";
3
+ import { jsx } from "react/jsx-runtime";
4
+ import { c } from "react/compiler-runtime";
5
+
6
+ //#region src/ui/textarea.tsx
7
+ function Textarea(t0) {
8
+ const $ = c(8);
9
+ let className;
10
+ let props;
11
+ if ($[0] !== t0) {
12
+ ({className, ...props} = t0);
13
+ $[0] = t0;
14
+ $[1] = className;
15
+ $[2] = props;
16
+ } else {
17
+ className = $[1];
18
+ props = $[2];
19
+ }
20
+ let t1;
21
+ if ($[3] !== className) {
22
+ t1 = cn("border-input dark:bg-input/30 focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 disabled:bg-input/50 dark:disabled:bg-input/80 rounded-lg border bg-transparent px-2.5 py-2 text-base transition-colors focus-visible:ring-[3px] aria-invalid:ring-[3px] md:text-sm placeholder:text-muted-foreground flex field-sizing-content min-h-16 w-full outline-none disabled:cursor-not-allowed disabled:opacity-50", className);
23
+ $[3] = className;
24
+ $[4] = t1;
25
+ } else t1 = $[4];
26
+ let t2;
27
+ if ($[5] !== props || $[6] !== t1) {
28
+ t2 = /* @__PURE__ */ jsx("textarea", {
29
+ "data-slot": "textarea",
30
+ className: t1,
31
+ ...props
32
+ });
33
+ $[5] = props;
34
+ $[6] = t1;
35
+ $[7] = t2;
36
+ } else t2 = $[7];
37
+ return t2;
38
+ }
39
+
40
+ //#endregion
41
+ export { Textarea };
@@ -0,0 +1,25 @@
1
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
2
+ import { Tooltip as Tooltip$1 } from "@base-ui/react/tooltip";
3
+
4
+ //#region src/ui/tooltip.d.ts
5
+ declare function TooltipProvider({
6
+ delay,
7
+ ...props
8
+ }: Tooltip$1.Provider.Props): react_jsx_runtime0.JSX.Element;
9
+ declare function Tooltip({
10
+ ...props
11
+ }: Tooltip$1.Root.Props): react_jsx_runtime0.JSX.Element;
12
+ declare function TooltipTrigger({
13
+ ...props
14
+ }: Tooltip$1.Trigger.Props): react_jsx_runtime0.JSX.Element;
15
+ declare function TooltipContent({
16
+ className,
17
+ side,
18
+ sideOffset,
19
+ align,
20
+ alignOffset,
21
+ children,
22
+ ...props
23
+ }: Tooltip$1.Popup.Props & Pick<Tooltip$1.Positioner.Props, "align" | "alignOffset" | "side" | "sideOffset">): react_jsx_runtime0.JSX.Element;
24
+ //#endregion
25
+ export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
@@ -0,0 +1,149 @@
1
+ import { cn } from "../lib/utils.mjs";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import { c } from "react/compiler-runtime";
4
+ import { Tooltip as Tooltip$1 } from "@base-ui/react/tooltip";
5
+
6
+ //#region src/ui/tooltip.tsx
7
+ function TooltipProvider(t0) {
8
+ const $ = c(6);
9
+ let props;
10
+ let t1;
11
+ if ($[0] !== t0) {
12
+ ({delay: t1, ...props} = t0);
13
+ $[0] = t0;
14
+ $[1] = props;
15
+ $[2] = t1;
16
+ } else {
17
+ props = $[1];
18
+ t1 = $[2];
19
+ }
20
+ const delay = t1 === void 0 ? 0 : t1;
21
+ let t2;
22
+ if ($[3] !== delay || $[4] !== props) {
23
+ t2 = /* @__PURE__ */ jsx(Tooltip$1.Provider, {
24
+ "data-slot": "tooltip-provider",
25
+ delay,
26
+ ...props
27
+ });
28
+ $[3] = delay;
29
+ $[4] = props;
30
+ $[5] = t2;
31
+ } else t2 = $[5];
32
+ return t2;
33
+ }
34
+ function Tooltip(t0) {
35
+ const $ = c(4);
36
+ let props;
37
+ if ($[0] !== t0) {
38
+ ({...props} = t0);
39
+ $[0] = t0;
40
+ $[1] = props;
41
+ } else props = $[1];
42
+ let t1;
43
+ if ($[2] !== props) {
44
+ t1 = /* @__PURE__ */ jsx(TooltipProvider, { children: /* @__PURE__ */ jsx(Tooltip$1.Root, {
45
+ "data-slot": "tooltip",
46
+ ...props
47
+ }) });
48
+ $[2] = props;
49
+ $[3] = t1;
50
+ } else t1 = $[3];
51
+ return t1;
52
+ }
53
+ function TooltipTrigger(t0) {
54
+ const $ = c(4);
55
+ let props;
56
+ if ($[0] !== t0) {
57
+ ({...props} = t0);
58
+ $[0] = t0;
59
+ $[1] = props;
60
+ } else props = $[1];
61
+ let t1;
62
+ if ($[2] !== props) {
63
+ t1 = /* @__PURE__ */ jsx(Tooltip$1.Trigger, {
64
+ "data-slot": "tooltip-trigger",
65
+ ...props
66
+ });
67
+ $[2] = props;
68
+ $[3] = t1;
69
+ } else t1 = $[3];
70
+ return t1;
71
+ }
72
+ function TooltipContent(t0) {
73
+ const $ = c(21);
74
+ let children;
75
+ let className;
76
+ let props;
77
+ let t1;
78
+ let t2;
79
+ let t3;
80
+ let t4;
81
+ if ($[0] !== t0) {
82
+ ({className, side: t1, sideOffset: t2, align: t3, alignOffset: t4, children, ...props} = t0);
83
+ $[0] = t0;
84
+ $[1] = children;
85
+ $[2] = className;
86
+ $[3] = props;
87
+ $[4] = t1;
88
+ $[5] = t2;
89
+ $[6] = t3;
90
+ $[7] = t4;
91
+ } else {
92
+ children = $[1];
93
+ className = $[2];
94
+ props = $[3];
95
+ t1 = $[4];
96
+ t2 = $[5];
97
+ t3 = $[6];
98
+ t4 = $[7];
99
+ }
100
+ const side = t1 === void 0 ? "top" : t1;
101
+ const sideOffset = t2 === void 0 ? 4 : t2;
102
+ const align = t3 === void 0 ? "center" : t3;
103
+ const alignOffset = t4 === void 0 ? 0 : t4;
104
+ let t5;
105
+ if ($[8] !== className) {
106
+ t5 = cn("data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 rounded-md px-3 py-1.5 text-xs bg-foreground text-background z-50 w-fit max-w-xs origin-(--transform-origin)", className);
107
+ $[8] = className;
108
+ $[9] = t5;
109
+ } else t5 = $[9];
110
+ let t6;
111
+ if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
112
+ t6 = /* @__PURE__ */ jsx(Tooltip$1.Arrow, { className: "size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground z-50 data-[side=bottom]:top-1 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5" });
113
+ $[10] = t6;
114
+ } else t6 = $[10];
115
+ let t7;
116
+ if ($[11] !== children || $[12] !== props || $[13] !== t5) {
117
+ t7 = /* @__PURE__ */ jsxs(Tooltip$1.Popup, {
118
+ "data-slot": "tooltip-content",
119
+ className: t5,
120
+ ...props,
121
+ children: [children, t6]
122
+ });
123
+ $[11] = children;
124
+ $[12] = props;
125
+ $[13] = t5;
126
+ $[14] = t7;
127
+ } else t7 = $[14];
128
+ let t8;
129
+ if ($[15] !== align || $[16] !== alignOffset || $[17] !== side || $[18] !== sideOffset || $[19] !== t7) {
130
+ t8 = /* @__PURE__ */ jsx(Tooltip$1.Portal, { children: /* @__PURE__ */ jsx(Tooltip$1.Positioner, {
131
+ align,
132
+ alignOffset,
133
+ side,
134
+ sideOffset,
135
+ className: "isolate z-50",
136
+ children: t7
137
+ }) });
138
+ $[15] = align;
139
+ $[16] = alignOffset;
140
+ $[17] = side;
141
+ $[18] = sideOffset;
142
+ $[19] = t7;
143
+ $[20] = t8;
144
+ } else t8 = $[20];
145
+ return t8;
146
+ }
147
+
148
+ //#endregion
149
+ export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
package/package.json ADDED
@@ -0,0 +1,111 @@
1
+ {
2
+ "name": "@ucdjs-internal/shared-ui",
3
+ "version": "0.1.0",
4
+ "type": "module",
5
+ "author": {
6
+ "name": "Lucas Nørgård",
7
+ "email": "lucasnrgaard@gmail.com",
8
+ "url": "https://luxass.dev"
9
+ },
10
+ "license": "MIT",
11
+ "homepage": "https://github.com/ucdjs/ucd",
12
+ "repository": {
13
+ "type": "git",
14
+ "url": "git+https://github.com/ucdjs/ucd.git",
15
+ "directory": "packages/shared-ui"
16
+ },
17
+ "bugs": {
18
+ "url": "https://github.com/ucdjs/ucd/issues"
19
+ },
20
+ "imports": {
21
+ "#components/*": "./src/components/*.tsx",
22
+ "#ui/*": "./src/ui/*.tsx",
23
+ "#lib/*": "./src/lib/*.ts",
24
+ "#hooks/*": "./src/hooks/*.ts"
25
+ },
26
+ "exports": {
27
+ ".": "./dist/index.mjs",
28
+ "./components/shiki-code": "./dist/components/shiki-code.mjs",
29
+ "./components/theme-toggle": "./dist/components/theme-toggle.mjs",
30
+ "./hooks": "./dist/hooks/index.mjs",
31
+ "./lib/theme-script": "./dist/lib/theme-script.mjs",
32
+ "./lib/utils": "./dist/lib/utils.mjs",
33
+ "./ui/alert-dialog": "./dist/ui/alert-dialog.mjs",
34
+ "./ui/avatar": "./dist/ui/avatar.mjs",
35
+ "./ui/badge": "./dist/ui/badge.mjs",
36
+ "./ui/breadcrumb": "./dist/ui/breadcrumb.mjs",
37
+ "./ui/button": "./dist/ui/button.mjs",
38
+ "./ui/card": "./dist/ui/card.mjs",
39
+ "./ui/checkbox": "./dist/ui/checkbox.mjs",
40
+ "./ui/collapsible": "./dist/ui/collapsible.mjs",
41
+ "./ui/combobox": "./dist/ui/combobox.mjs",
42
+ "./ui/command": "./dist/ui/command.mjs",
43
+ "./ui/context-menu": "./dist/ui/context-menu.mjs",
44
+ "./ui/dialog": "./dist/ui/dialog.mjs",
45
+ "./ui/dropdown-menu": "./dist/ui/dropdown-menu.mjs",
46
+ "./ui/field": "./dist/ui/field.mjs",
47
+ "./ui/input": "./dist/ui/input.mjs",
48
+ "./ui/input-group": "./dist/ui/input-group.mjs",
49
+ "./ui/label": "./dist/ui/label.mjs",
50
+ "./ui/scroll-area": "./dist/ui/scroll-area.mjs",
51
+ "./ui/select": "./dist/ui/select.mjs",
52
+ "./ui/separator": "./dist/ui/separator.mjs",
53
+ "./ui/sheet": "./dist/ui/sheet.mjs",
54
+ "./ui/sidebar": "./dist/ui/sidebar.mjs",
55
+ "./ui/skeleton": "./dist/ui/skeleton.mjs",
56
+ "./ui/table": "./dist/ui/table.mjs",
57
+ "./ui/textarea": "./dist/ui/textarea.mjs",
58
+ "./ui/tooltip": "./dist/ui/tooltip.mjs",
59
+ "./styles.css": "./dist/styles/globals.css",
60
+ "./package.json": "./package.json"
61
+ },
62
+ "types": "./dist/index.d.mts",
63
+ "files": [
64
+ "dist"
65
+ ],
66
+ "engines": {
67
+ "node": ">=22.18"
68
+ },
69
+ "dependencies": {
70
+ "@base-ui/react": "1.1.0",
71
+ "@fontsource-variable/inter": "5.2.8",
72
+ "class-variance-authority": "0.7.1",
73
+ "clsx": "2.1.1",
74
+ "cmdk": "1.1.1",
75
+ "lucide-react": "0.563.0",
76
+ "react": "19.2.4",
77
+ "react-dom": "19.2.4",
78
+ "shiki": "3.22.0",
79
+ "tailwind-merge": "3.4.0",
80
+ "tailwindcss": "4.1.18",
81
+ "tw-animate-css": "1.4.0",
82
+ "zod": "4.3.6"
83
+ },
84
+ "devDependencies": {
85
+ "@eslint-react/eslint-plugin": "2.12.4",
86
+ "@luxass/eslint-config": "7.2.0",
87
+ "@rollup/plugin-babel": "6.1.0",
88
+ "@types/react": "19.2.14",
89
+ "@types/react-dom": "19.2.3",
90
+ "babel-plugin-react-compiler": "1.0.0",
91
+ "eslint": "10.0.0",
92
+ "eslint-plugin-format": "1.4.0",
93
+ "eslint-plugin-react-hooks": "7.0.1",
94
+ "eslint-plugin-react-refresh": "0.5.0",
95
+ "publint": "0.3.17",
96
+ "tsdown": "0.20.3",
97
+ "typescript": "5.9.3",
98
+ "@ucdjs-tooling/tsdown-config": "1.0.0",
99
+ "@ucdjs-tooling/tsconfig": "1.0.0"
100
+ },
101
+ "publishConfig": {
102
+ "access": "public"
103
+ },
104
+ "scripts": {
105
+ "build": "tsdown --tsconfig=./tsconfig.build.json",
106
+ "dev": "tsdown --watch",
107
+ "clean": "git clean -xdf dist node_modules",
108
+ "lint": "eslint .",
109
+ "typecheck": "tsc --noEmit -p tsconfig.build.json"
110
+ }
111
+ }