@locusgraph/components 0.2.0 → 0.2.1

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 (102) hide show
  1. package/dist/action/button-group.js +148 -17
  2. package/dist/action/button.js +91 -27
  3. package/dist/action/toggle-group.js +176 -12
  4. package/dist/action/toggle.js +70 -17
  5. package/dist/display/avatar.js +118 -7
  6. package/dist/display/badge.js +74 -20
  7. package/dist/display/chart/chart-container.js +205 -45
  8. package/dist/display/chart/chart-legend.js +79 -14
  9. package/dist/display/chart/chart-tooltip.js +211 -40
  10. package/dist/display/chat/attachment/attachment-parts.js +222 -13
  11. package/dist/display/chat/attachment/attachment.js +210 -28
  12. package/dist/display/chat/bubble.js +225 -37
  13. package/dist/display/chat/marker.js +143 -15
  14. package/dist/display/chat/message-scroller.js +276 -14
  15. package/dist/display/chat/message.js +238 -13
  16. package/dist/display/content/item.js +448 -47
  17. package/dist/display/content/kbd.js +78 -5
  18. package/dist/display/media/aspect-ratio.js +27 -3
  19. package/dist/display/media/carousel-controls.js +162 -11
  20. package/dist/display/media/carousel.js +325 -65
  21. package/dist/display/rule-grid/rule-grid.js +309 -29
  22. package/dist/display/separator.js +56 -3
  23. package/dist/display/skeletons/layouts/skeleton-rule-grid.js +79 -6
  24. package/dist/display/skeletons/layouts/skeleton-table.js +163 -5
  25. package/dist/display/skeletons/shapes/skeleton-avatar.js +95 -13
  26. package/dist/display/skeletons/shapes/skeleton-button.js +95 -13
  27. package/dist/display/skeletons/shapes/skeleton-text.js +78 -7
  28. package/dist/display/skeletons/skeleton-parts.js +63 -6
  29. package/dist/display/status/alert.js +136 -18
  30. package/dist/display/status/empty.js +250 -22
  31. package/dist/display/status/progress.js +116 -16
  32. package/dist/display/status/skeleton.js +40 -3
  33. package/dist/display/status/spinner.js +41 -3
  34. package/dist/display/table.js +310 -17
  35. package/dist/feedback/toaster.js +98 -21
  36. package/dist/form/advanced/calendar-day-button.js +89 -12
  37. package/dist/form/advanced/calendar.js +349 -56
  38. package/dist/form/advanced/combobox/combobox-chips.js +151 -8
  39. package/dist/form/advanced/combobox/combobox-items.js +239 -14
  40. package/dist/form/advanced/combobox/combobox.js +386 -13
  41. package/dist/form/advanced/input-otp.js +201 -11
  42. package/dist/form/choice/checkbox.js +58 -3
  43. package/dist/form/choice/radio-group.js +94 -5
  44. package/dist/form/choice/select.js +479 -25
  45. package/dist/form/choice/slider.js +118 -4
  46. package/dist/form/choice/switch.js +53 -3
  47. package/dist/form/field/field-error.js +117 -14
  48. package/dist/form/field/field-separator.js +70 -3
  49. package/dist/form/field/field-set.js +85 -5
  50. package/dist/form/field/field-text.js +116 -7
  51. package/dist/form/field/field.js +137 -25
  52. package/dist/form/hook-form/form.js +338 -40
  53. package/dist/form/input-group.js +297 -47
  54. package/dist/form/input.js +47 -3
  55. package/dist/form/label.js +42 -3
  56. package/dist/form/native-select.js +147 -7
  57. package/dist/form/textarea.js +41 -3
  58. package/dist/layout/accordion.js +165 -8
  59. package/dist/layout/collapsible.js +75 -7
  60. package/dist/layout/resizable.js +122 -7
  61. package/dist/layout/scroll/direction.js +25 -3
  62. package/dist/layout/scroll/scroll-area.js +138 -5
  63. package/dist/layout/sidebar/sidebar-context.js +184 -51
  64. package/dist/layout/sidebar/sidebar-menu-sub.js +219 -14
  65. package/dist/layout/sidebar/sidebar-menu.js +319 -38
  66. package/dist/layout/sidebar/sidebar-sections.js +369 -22
  67. package/dist/layout/sidebar/sidebar.js +384 -28
  68. package/dist/layout/tabs.js +183 -18
  69. package/dist/layout/use-mobile.js +23 -10
  70. package/dist/navigation/breadcrumb.js +301 -17
  71. package/dist/navigation/menubar/menubar-items.js +322 -16
  72. package/dist/navigation/menubar/menubar-sub.js +125 -7
  73. package/dist/navigation/menubar/menubar.js +213 -13
  74. package/dist/navigation/navigation-menu.js +366 -18
  75. package/dist/navigation/pagination.js +328 -20
  76. package/dist/overlay/alert-dialog.js +485 -26
  77. package/dist/overlay/context-menu/context-menu-items.js +322 -16
  78. package/dist/overlay/context-menu/context-menu-sub.js +125 -7
  79. package/dist/overlay/context-menu/context-menu.js +140 -11
  80. package/dist/overlay/dialog.js +405 -24
  81. package/dist/overlay/floating/command.js +423 -20
  82. package/dist/overlay/floating/drawer.js +354 -22
  83. package/dist/overlay/floating/hover-card.js +107 -7
  84. package/dist/overlay/menu/dropdown-menu-choice.js +149 -7
  85. package/dist/overlay/menu/dropdown-menu-item.js +174 -9
  86. package/dist/overlay/menu/dropdown-menu-sub.js +124 -7
  87. package/dist/overlay/menu/dropdown-menu.js +147 -12
  88. package/dist/overlay/popover.js +106 -7
  89. package/dist/overlay/sheet.js +379 -26
  90. package/dist/overlay/tooltip.js +145 -9
  91. package/dist/shell/app-header.js +81 -5
  92. package/dist/shell/app-shell.js +58 -3
  93. package/dist/shell/breadcrumbs.js +102 -12
  94. package/dist/shell/docs/docs-header.js +210 -10
  95. package/dist/shell/docs/docs-shell.js +100 -3
  96. package/dist/shell/docs/docs-sidebar.js +88 -7
  97. package/dist/shell/docs/on-this-page.js +78 -7
  98. package/dist/shell/docs/use-active-section.js +88 -42
  99. package/dist/shell/navigation/app-sidebar.js +188 -6
  100. package/dist/shell/navigation/nav-group.js +161 -10
  101. package/dist/shell/theme-toggle.js +51 -4
  102. package/package.json +2 -2
@@ -1,40 +1,393 @@
1
1
  "use client";
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+
3
+ import { c as _c } from "react/compiler-runtime";
3
4
  import { Close as XIcon } from "@carbon/icons-react";
4
5
  import { cn } from "cn";
5
6
  import * as SheetPrimitive from "radix-ui/dialog";
6
- function Sheet({ ...props }) {
7
- return _jsx(SheetPrimitive.Root, { "data-slot": "sheet", ...props });
7
+ import * as React from "react";
8
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
9
+ function Sheet(t0) {
10
+ const $ = _c(4);
11
+ let props;
12
+ if ($[0] !== t0) {
13
+ ({
14
+ ...props
15
+ } = t0);
16
+ $[0] = t0;
17
+ $[1] = props;
18
+ } else {
19
+ props = $[1];
20
+ }
21
+ let t1;
22
+ if ($[2] !== props) {
23
+ t1 = /*#__PURE__*/_jsx(SheetPrimitive.Root, {
24
+ "data-slot": "sheet",
25
+ ...props
26
+ });
27
+ $[2] = props;
28
+ $[3] = t1;
29
+ } else {
30
+ t1 = $[3];
31
+ }
32
+ return t1;
8
33
  }
9
- function SheetTrigger({ ...props }) {
10
- return _jsx(SheetPrimitive.Trigger, { "data-slot": "sheet-trigger", ...props });
34
+ function SheetTrigger(t0) {
35
+ const $ = _c(4);
36
+ let props;
37
+ if ($[0] !== t0) {
38
+ ({
39
+ ...props
40
+ } = t0);
41
+ $[0] = t0;
42
+ $[1] = props;
43
+ } else {
44
+ props = $[1];
45
+ }
46
+ let t1;
47
+ if ($[2] !== props) {
48
+ t1 = /*#__PURE__*/_jsx(SheetPrimitive.Trigger, {
49
+ "data-slot": "sheet-trigger",
50
+ ...props
51
+ });
52
+ $[2] = props;
53
+ $[3] = t1;
54
+ } else {
55
+ t1 = $[3];
56
+ }
57
+ return t1;
11
58
  }
12
- function SheetClose({ ...props }) {
13
- return _jsx(SheetPrimitive.Close, { "data-slot": "sheet-close", ...props });
59
+ function SheetClose(t0) {
60
+ const $ = _c(4);
61
+ let props;
62
+ if ($[0] !== t0) {
63
+ ({
64
+ ...props
65
+ } = t0);
66
+ $[0] = t0;
67
+ $[1] = props;
68
+ } else {
69
+ props = $[1];
70
+ }
71
+ let t1;
72
+ if ($[2] !== props) {
73
+ t1 = /*#__PURE__*/_jsx(SheetPrimitive.Close, {
74
+ "data-slot": "sheet-close",
75
+ ...props
76
+ });
77
+ $[2] = props;
78
+ $[3] = t1;
79
+ } else {
80
+ t1 = $[3];
81
+ }
82
+ return t1;
14
83
  }
15
- function SheetPortal({ ...props }) {
16
- return _jsx(SheetPrimitive.Portal, { "data-slot": "sheet-portal", ...props });
84
+ function SheetPortal(t0) {
85
+ const $ = _c(4);
86
+ let props;
87
+ if ($[0] !== t0) {
88
+ ({
89
+ ...props
90
+ } = t0);
91
+ $[0] = t0;
92
+ $[1] = props;
93
+ } else {
94
+ props = $[1];
95
+ }
96
+ let t1;
97
+ if ($[2] !== props) {
98
+ t1 = /*#__PURE__*/_jsx(SheetPrimitive.Portal, {
99
+ "data-slot": "sheet-portal",
100
+ ...props
101
+ });
102
+ $[2] = props;
103
+ $[3] = t1;
104
+ } else {
105
+ t1 = $[3];
106
+ }
107
+ return t1;
17
108
  }
18
- function SheetOverlay({ className, ...props }) {
19
- return (_jsx(SheetPrimitive.Overlay, { "data-slot": "sheet-overlay", className: cn("fixed inset-0 z-[300] bg-scrim backdrop-blur-[2px] data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0", className), ...props }));
109
+ function SheetOverlay(t0) {
110
+ const $ = _c(8);
111
+ let className;
112
+ let props;
113
+ if ($[0] !== t0) {
114
+ ({
115
+ className,
116
+ ...props
117
+ } = t0);
118
+ $[0] = t0;
119
+ $[1] = className;
120
+ $[2] = props;
121
+ } else {
122
+ className = $[1];
123
+ props = $[2];
124
+ }
125
+ let t1;
126
+ if ($[3] !== className) {
127
+ t1 = cn("fixed inset-0 z-[300] bg-scrim backdrop-blur-[2px] data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0", className);
128
+ $[3] = className;
129
+ $[4] = t1;
130
+ } else {
131
+ t1 = $[4];
132
+ }
133
+ let t2;
134
+ if ($[5] !== props || $[6] !== t1) {
135
+ t2 = /*#__PURE__*/_jsx(SheetPrimitive.Overlay, {
136
+ "data-slot": "sheet-overlay",
137
+ className: t1,
138
+ ...props
139
+ });
140
+ $[5] = props;
141
+ $[6] = t1;
142
+ $[7] = t2;
143
+ } else {
144
+ t2 = $[7];
145
+ }
146
+ return t2;
20
147
  }
21
- function SheetContent({ className, children, side = "right", showCloseButton = true, ...props }) {
22
- return (_jsxs(SheetPortal, { children: [_jsx(SheetOverlay, {}), _jsxs(SheetPrimitive.Content, { "data-slot": "sheet-content", className: cn("fixed z-[300] flex flex-col gap-4 bg-popover shadow-overlay transition ease-in-out data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:animate-in data-[state=open]:duration-500", side === "right" &&
23
- "inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm", side === "left" &&
24
- "inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm", side === "top" &&
25
- "inset-x-0 top-0 h-auto border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top", side === "bottom" &&
26
- "inset-x-0 bottom-0 h-auto border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom", className), ...props, children: [children, showCloseButton && (_jsxs(SheetPrimitive.Close, { className: "absolute top-4 right-4 rounded-sm text-soft opacity-70 transition-opacity hover:text-foreground hover:opacity-100 focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-hidden disabled:pointer-events-none", children: [_jsx(XIcon, { className: "size-4" }), _jsx("span", { className: "sr-only", children: "Close" })] }))] })] }));
148
+ function SheetContent(t0) {
149
+ const $ = _c(20);
150
+ let children;
151
+ let className;
152
+ let props;
153
+ let t1;
154
+ let t2;
155
+ if ($[0] !== t0) {
156
+ ({
157
+ className,
158
+ children,
159
+ side: t1,
160
+ showCloseButton: t2,
161
+ ...props
162
+ } = t0);
163
+ $[0] = t0;
164
+ $[1] = children;
165
+ $[2] = className;
166
+ $[3] = props;
167
+ $[4] = t1;
168
+ $[5] = t2;
169
+ } else {
170
+ children = $[1];
171
+ className = $[2];
172
+ props = $[3];
173
+ t1 = $[4];
174
+ t2 = $[5];
175
+ }
176
+ const side = t1 === undefined ? "right" : t1;
177
+ const showCloseButton = t2 === undefined ? true : t2;
178
+ let t3;
179
+ if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
180
+ t3 = /*#__PURE__*/_jsx(SheetOverlay, {});
181
+ $[6] = t3;
182
+ } else {
183
+ t3 = $[6];
184
+ }
185
+ const t4 = side === "right" && "inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm";
186
+ const t5 = side === "left" && "inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm";
187
+ const t6 = side === "top" && "inset-x-0 top-0 h-auto border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top";
188
+ const t7 = side === "bottom" && "inset-x-0 bottom-0 h-auto border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom";
189
+ let t8;
190
+ if ($[7] !== className || $[8] !== t4 || $[9] !== t5 || $[10] !== t6 || $[11] !== t7) {
191
+ t8 = cn("fixed z-[300] flex flex-col gap-4 bg-popover shadow-overlay transition ease-in-out data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:animate-in data-[state=open]:duration-500", t4, t5, t6, t7, className);
192
+ $[7] = className;
193
+ $[8] = t4;
194
+ $[9] = t5;
195
+ $[10] = t6;
196
+ $[11] = t7;
197
+ $[12] = t8;
198
+ } else {
199
+ t8 = $[12];
200
+ }
201
+ let t9;
202
+ if ($[13] !== showCloseButton) {
203
+ t9 = showCloseButton && /*#__PURE__*/_jsxs(SheetPrimitive.Close, {
204
+ className: "absolute top-4 right-4 rounded-sm text-soft opacity-70 transition-opacity hover:text-foreground hover:opacity-100 focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-hidden disabled:pointer-events-none",
205
+ children: [/*#__PURE__*/_jsx(XIcon, {
206
+ className: "size-4"
207
+ }), /*#__PURE__*/_jsx("span", {
208
+ className: "sr-only",
209
+ children: "Close"
210
+ })]
211
+ });
212
+ $[13] = showCloseButton;
213
+ $[14] = t9;
214
+ } else {
215
+ t9 = $[14];
216
+ }
217
+ let t10;
218
+ if ($[15] !== children || $[16] !== props || $[17] !== t8 || $[18] !== t9) {
219
+ t10 = /*#__PURE__*/_jsxs(SheetPortal, {
220
+ children: [t3, /*#__PURE__*/_jsxs(SheetPrimitive.Content, {
221
+ "data-slot": "sheet-content",
222
+ className: t8,
223
+ ...props,
224
+ children: [children, t9]
225
+ })]
226
+ });
227
+ $[15] = children;
228
+ $[16] = props;
229
+ $[17] = t8;
230
+ $[18] = t9;
231
+ $[19] = t10;
232
+ } else {
233
+ t10 = $[19];
234
+ }
235
+ return t10;
27
236
  }
28
- function SheetHeader({ className, ...props }) {
29
- return (_jsx("div", { "data-slot": "sheet-header", className: cn("flex flex-col gap-1.5 px-6 pt-6 pb-2 pr-12", className), ...props }));
237
+ function SheetHeader(t0) {
238
+ const $ = _c(8);
239
+ let className;
240
+ let props;
241
+ if ($[0] !== t0) {
242
+ ({
243
+ className,
244
+ ...props
245
+ } = t0);
246
+ $[0] = t0;
247
+ $[1] = className;
248
+ $[2] = props;
249
+ } else {
250
+ className = $[1];
251
+ props = $[2];
252
+ }
253
+ let t1;
254
+ if ($[3] !== className) {
255
+ t1 = cn("flex flex-col gap-1.5 px-6 pt-6 pb-2 pr-12", className);
256
+ $[3] = className;
257
+ $[4] = t1;
258
+ } else {
259
+ t1 = $[4];
260
+ }
261
+ let t2;
262
+ if ($[5] !== props || $[6] !== t1) {
263
+ t2 = /*#__PURE__*/_jsx("div", {
264
+ "data-slot": "sheet-header",
265
+ className: t1,
266
+ ...props
267
+ });
268
+ $[5] = props;
269
+ $[6] = t1;
270
+ $[7] = t2;
271
+ } else {
272
+ t2 = $[7];
273
+ }
274
+ return t2;
30
275
  }
31
- function SheetFooter({ className, ...props }) {
32
- return (_jsx("div", { "data-slot": "sheet-footer", className: cn("mt-auto flex flex-col gap-2 px-6 pt-4 pb-6", className), ...props }));
276
+ function SheetFooter(t0) {
277
+ const $ = _c(8);
278
+ let className;
279
+ let props;
280
+ if ($[0] !== t0) {
281
+ ({
282
+ className,
283
+ ...props
284
+ } = t0);
285
+ $[0] = t0;
286
+ $[1] = className;
287
+ $[2] = props;
288
+ } else {
289
+ className = $[1];
290
+ props = $[2];
291
+ }
292
+ let t1;
293
+ if ($[3] !== className) {
294
+ t1 = cn("mt-auto flex flex-col gap-2 px-6 pt-4 pb-6", className);
295
+ $[3] = className;
296
+ $[4] = t1;
297
+ } else {
298
+ t1 = $[4];
299
+ }
300
+ let t2;
301
+ if ($[5] !== props || $[6] !== t1) {
302
+ t2 = /*#__PURE__*/_jsx("div", {
303
+ "data-slot": "sheet-footer",
304
+ className: t1,
305
+ ...props
306
+ });
307
+ $[5] = props;
308
+ $[6] = t1;
309
+ $[7] = t2;
310
+ } else {
311
+ t2 = $[7];
312
+ }
313
+ return t2;
33
314
  }
34
- function SheetTitle({ className, ...props }) {
35
- return (_jsx(SheetPrimitive.Title, { "data-slot": "sheet-title", className: cn("text-base font-semibold tracking-tight text-foreground", className), ...props }));
315
+ function SheetTitle(t0) {
316
+ const $ = _c(8);
317
+ let className;
318
+ let props;
319
+ if ($[0] !== t0) {
320
+ ({
321
+ className,
322
+ ...props
323
+ } = t0);
324
+ $[0] = t0;
325
+ $[1] = className;
326
+ $[2] = props;
327
+ } else {
328
+ className = $[1];
329
+ props = $[2];
330
+ }
331
+ let t1;
332
+ if ($[3] !== className) {
333
+ t1 = cn("text-base font-semibold tracking-tight text-foreground", className);
334
+ $[3] = className;
335
+ $[4] = t1;
336
+ } else {
337
+ t1 = $[4];
338
+ }
339
+ let t2;
340
+ if ($[5] !== props || $[6] !== t1) {
341
+ t2 = /*#__PURE__*/_jsx(SheetPrimitive.Title, {
342
+ "data-slot": "sheet-title",
343
+ className: t1,
344
+ ...props
345
+ });
346
+ $[5] = props;
347
+ $[6] = t1;
348
+ $[7] = t2;
349
+ } else {
350
+ t2 = $[7];
351
+ }
352
+ return t2;
36
353
  }
37
- function SheetDescription({ className, ...props }) {
38
- return (_jsx(SheetPrimitive.Description, { "data-slot": "sheet-description", className: cn("text-sm text-muted-foreground", className), ...props }));
354
+ function SheetDescription(t0) {
355
+ const $ = _c(8);
356
+ let className;
357
+ let props;
358
+ if ($[0] !== t0) {
359
+ ({
360
+ className,
361
+ ...props
362
+ } = t0);
363
+ $[0] = t0;
364
+ $[1] = className;
365
+ $[2] = props;
366
+ } else {
367
+ className = $[1];
368
+ props = $[2];
369
+ }
370
+ let t1;
371
+ if ($[3] !== className) {
372
+ t1 = cn("text-sm text-muted-foreground", className);
373
+ $[3] = className;
374
+ $[4] = t1;
375
+ } else {
376
+ t1 = $[4];
377
+ }
378
+ let t2;
379
+ if ($[5] !== props || $[6] !== t1) {
380
+ t2 = /*#__PURE__*/_jsx(SheetPrimitive.Description, {
381
+ "data-slot": "sheet-description",
382
+ className: t1,
383
+ ...props
384
+ });
385
+ $[5] = props;
386
+ $[6] = t1;
387
+ $[7] = t2;
388
+ } else {
389
+ t2 = $[7];
390
+ }
391
+ return t2;
39
392
  }
40
- export { Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, };
393
+ export { Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger };
@@ -1,17 +1,153 @@
1
1
  "use client";
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+
3
+ import { c as _c } from "react/compiler-runtime";
3
4
  import { cn } from "cn";
4
5
  import * as TooltipPrimitive from "radix-ui/tooltip";
5
- function TooltipProvider({ delayDuration = 0, ...props }) {
6
- return (_jsx(TooltipPrimitive.Provider, { "data-slot": "tooltip-provider", delayDuration: delayDuration, ...props }));
6
+ import * as React from "react";
7
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
8
+ function TooltipProvider(t0) {
9
+ const $ = _c(6);
10
+ let props;
11
+ let t1;
12
+ if ($[0] !== t0) {
13
+ ({
14
+ delayDuration: t1,
15
+ ...props
16
+ } = t0);
17
+ $[0] = t0;
18
+ $[1] = props;
19
+ $[2] = t1;
20
+ } else {
21
+ props = $[1];
22
+ t1 = $[2];
23
+ }
24
+ const delayDuration = t1 === undefined ? 0 : t1;
25
+ let t2;
26
+ if ($[3] !== delayDuration || $[4] !== props) {
27
+ t2 = /*#__PURE__*/_jsx(TooltipPrimitive.Provider, {
28
+ "data-slot": "tooltip-provider",
29
+ delayDuration: delayDuration,
30
+ ...props
31
+ });
32
+ $[3] = delayDuration;
33
+ $[4] = props;
34
+ $[5] = t2;
35
+ } else {
36
+ t2 = $[5];
37
+ }
38
+ return t2;
7
39
  }
8
- function Tooltip({ ...props }) {
9
- return _jsx(TooltipPrimitive.Root, { "data-slot": "tooltip", ...props });
40
+ function Tooltip(t0) {
41
+ const $ = _c(4);
42
+ let props;
43
+ if ($[0] !== t0) {
44
+ ({
45
+ ...props
46
+ } = t0);
47
+ $[0] = t0;
48
+ $[1] = props;
49
+ } else {
50
+ props = $[1];
51
+ }
52
+ let t1;
53
+ if ($[2] !== props) {
54
+ t1 = /*#__PURE__*/_jsx(TooltipPrimitive.Root, {
55
+ "data-slot": "tooltip",
56
+ ...props
57
+ });
58
+ $[2] = props;
59
+ $[3] = t1;
60
+ } else {
61
+ t1 = $[3];
62
+ }
63
+ return t1;
10
64
  }
11
- function TooltipTrigger({ ...props }) {
12
- return _jsx(TooltipPrimitive.Trigger, { "data-slot": "tooltip-trigger", ...props });
65
+ function TooltipTrigger(t0) {
66
+ const $ = _c(4);
67
+ let props;
68
+ if ($[0] !== t0) {
69
+ ({
70
+ ...props
71
+ } = t0);
72
+ $[0] = t0;
73
+ $[1] = props;
74
+ } else {
75
+ props = $[1];
76
+ }
77
+ let t1;
78
+ if ($[2] !== props) {
79
+ t1 = /*#__PURE__*/_jsx(TooltipPrimitive.Trigger, {
80
+ "data-slot": "tooltip-trigger",
81
+ ...props
82
+ });
83
+ $[2] = props;
84
+ $[3] = t1;
85
+ } else {
86
+ t1 = $[3];
87
+ }
88
+ return t1;
13
89
  }
14
- function TooltipContent({ className, sideOffset = 0, children, ...props }) {
15
- return (_jsx(TooltipPrimitive.Portal, { children: _jsxs(TooltipPrimitive.Content, { "data-slot": "tooltip-content", sideOffset: sideOffset, className: cn("z-50 w-fit origin-(--radix-tooltip-content-transform-origin) animate-in rounded-md bg-foreground px-3 py-1.5 text-xs text-balance text-background fade-in-0 zoom-in-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 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95", className), ...props, children: [children, _jsx(TooltipPrimitive.Arrow, { className: "z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground" })] }) }));
90
+ function TooltipContent(t0) {
91
+ const $ = _c(13);
92
+ let children;
93
+ let className;
94
+ let props;
95
+ let t1;
96
+ if ($[0] !== t0) {
97
+ ({
98
+ className,
99
+ sideOffset: t1,
100
+ children,
101
+ ...props
102
+ } = t0);
103
+ $[0] = t0;
104
+ $[1] = children;
105
+ $[2] = className;
106
+ $[3] = props;
107
+ $[4] = t1;
108
+ } else {
109
+ children = $[1];
110
+ className = $[2];
111
+ props = $[3];
112
+ t1 = $[4];
113
+ }
114
+ const sideOffset = t1 === undefined ? 0 : t1;
115
+ let t2;
116
+ if ($[5] !== className) {
117
+ t2 = cn("z-50 w-fit origin-(--radix-tooltip-content-transform-origin) animate-in rounded-md bg-foreground px-3 py-1.5 text-xs text-balance text-background fade-in-0 zoom-in-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 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95", className);
118
+ $[5] = className;
119
+ $[6] = t2;
120
+ } else {
121
+ t2 = $[6];
122
+ }
123
+ let t3;
124
+ if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
125
+ t3 = /*#__PURE__*/_jsx(TooltipPrimitive.Arrow, {
126
+ className: "z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground"
127
+ });
128
+ $[7] = t3;
129
+ } else {
130
+ t3 = $[7];
131
+ }
132
+ let t4;
133
+ if ($[8] !== children || $[9] !== props || $[10] !== sideOffset || $[11] !== t2) {
134
+ t4 = /*#__PURE__*/_jsx(TooltipPrimitive.Portal, {
135
+ children: /*#__PURE__*/_jsxs(TooltipPrimitive.Content, {
136
+ "data-slot": "tooltip-content",
137
+ sideOffset: sideOffset,
138
+ className: t2,
139
+ ...props,
140
+ children: [children, t3]
141
+ })
142
+ });
143
+ $[8] = children;
144
+ $[9] = props;
145
+ $[10] = sideOffset;
146
+ $[11] = t2;
147
+ $[12] = t4;
148
+ } else {
149
+ t4 = $[12];
150
+ }
151
+ return t4;
16
152
  }
17
153
  export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
@@ -1,10 +1,86 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { c as _c } from "react/compiler-runtime";
2
2
  import { Separator } from "../display/separator.js";
3
3
  import { SidebarTrigger } from "../layout/sidebar/sidebar.js";
4
- function AppHeader({ breadcrumbs, children }) {
5
- return (_jsxs("header", { "data-slot": "app-header", className: "flex h-14 shrink-0 items-center gap-3 border-b border-line bg-background px-4", children: [_jsx(SidebarTrigger, { className: "-ml-1" }), _jsx(Separator, { orientation: "vertical", className: "h-4" }), breadcrumbs, _jsx("div", { className: "ml-auto flex shrink-0 items-center gap-2", children: children })] }));
4
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
5
+ function AppHeader(t0) {
6
+ const $ = _c(7);
7
+ const {
8
+ breadcrumbs,
9
+ children
10
+ } = t0;
11
+ let t1;
12
+ let t2;
13
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
14
+ t1 = /*#__PURE__*/_jsx(SidebarTrigger, {
15
+ className: "-ml-1"
16
+ });
17
+ t2 = /*#__PURE__*/_jsx(Separator, {
18
+ orientation: "vertical",
19
+ className: "h-4"
20
+ });
21
+ $[0] = t1;
22
+ $[1] = t2;
23
+ } else {
24
+ t1 = $[0];
25
+ t2 = $[1];
26
+ }
27
+ let t3;
28
+ if ($[2] !== children) {
29
+ t3 = /*#__PURE__*/_jsx("div", {
30
+ className: "ml-auto flex shrink-0 items-center gap-2",
31
+ children: children
32
+ });
33
+ $[2] = children;
34
+ $[3] = t3;
35
+ } else {
36
+ t3 = $[3];
37
+ }
38
+ let t4;
39
+ if ($[4] !== breadcrumbs || $[5] !== t3) {
40
+ t4 = /*#__PURE__*/_jsxs("header", {
41
+ "data-slot": "app-header",
42
+ className: "flex h-14 shrink-0 items-center gap-3 border-b border-line bg-background px-4",
43
+ children: [t1, t2, breadcrumbs, t3]
44
+ });
45
+ $[4] = breadcrumbs;
46
+ $[5] = t3;
47
+ $[6] = t4;
48
+ } else {
49
+ t4 = $[6];
50
+ }
51
+ return t4;
6
52
  }
7
- function CommandHint({ shortcut = "⌘K", label = "commands", }) {
8
- return (_jsxs("span", { className: "hidden items-center gap-1.5 text-xs text-faint 2xl:flex", children: [_jsx("kbd", { className: "rounded border border-line bg-ghost px-1.5 py-0.5 font-mono text-[11px]", children: shortcut }), label] }));
53
+ function CommandHint(t0) {
54
+ const $ = _c(5);
55
+ const {
56
+ shortcut: t1,
57
+ label: t2
58
+ } = t0;
59
+ const shortcut = t1 === undefined ? "\u2318K" : t1;
60
+ const label = t2 === undefined ? "commands" : t2;
61
+ let t3;
62
+ if ($[0] !== shortcut) {
63
+ t3 = /*#__PURE__*/_jsx("kbd", {
64
+ className: "rounded border border-line bg-ghost px-1.5 py-0.5 font-mono text-[11px]",
65
+ children: shortcut
66
+ });
67
+ $[0] = shortcut;
68
+ $[1] = t3;
69
+ } else {
70
+ t3 = $[1];
71
+ }
72
+ let t4;
73
+ if ($[2] !== label || $[3] !== t3) {
74
+ t4 = /*#__PURE__*/_jsxs("span", {
75
+ className: "hidden items-center gap-1.5 text-xs text-faint 2xl:flex",
76
+ children: [t3, label]
77
+ });
78
+ $[2] = label;
79
+ $[3] = t3;
80
+ $[4] = t4;
81
+ } else {
82
+ t4 = $[4];
83
+ }
84
+ return t4;
9
85
  }
10
86
  export { AppHeader, CommandHint };