@locusgraph/components 0.1.1 → 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 (116) 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 +71 -18
  5. package/dist/display/avatar.js +118 -7
  6. package/dist/display/badge.d.ts +1 -1
  7. package/dist/display/badge.js +74 -17
  8. package/dist/display/chart/chart-container.js +205 -45
  9. package/dist/display/chart/chart-legend.js +79 -14
  10. package/dist/display/chart/chart-tooltip.js +211 -40
  11. package/dist/display/chat/attachment/attachment-parts.js +222 -13
  12. package/dist/display/chat/attachment/attachment.js +210 -28
  13. package/dist/display/chat/bubble.js +225 -37
  14. package/dist/display/chat/marker.js +143 -15
  15. package/dist/display/chat/message-scroller.js +277 -15
  16. package/dist/display/chat/message.js +238 -13
  17. package/dist/display/content/item.js +448 -47
  18. package/dist/display/content/kbd.js +78 -5
  19. package/dist/display/media/aspect-ratio.js +27 -3
  20. package/dist/display/media/carousel-controls.js +163 -12
  21. package/dist/display/media/carousel.js +325 -65
  22. package/dist/display/rule-grid/rule-grid.d.ts +3 -1
  23. package/dist/display/rule-grid/rule-grid.js +311 -25
  24. package/dist/display/separator.js +56 -3
  25. package/dist/display/skeletons/layouts/skeleton-rule-grid.d.ts +8 -0
  26. package/dist/display/skeletons/layouts/skeleton-rule-grid.js +83 -0
  27. package/dist/display/skeletons/layouts/skeleton-table.d.ts +8 -0
  28. package/dist/display/skeletons/layouts/skeleton-table.js +174 -0
  29. package/dist/display/skeletons/shapes/skeleton-avatar.d.ts +10 -0
  30. package/dist/display/skeletons/shapes/skeleton-avatar.js +102 -0
  31. package/dist/display/skeletons/shapes/skeleton-button.d.ts +10 -0
  32. package/dist/display/skeletons/shapes/skeleton-button.js +102 -0
  33. package/dist/display/skeletons/shapes/skeleton-text.d.ts +7 -0
  34. package/dist/display/skeletons/shapes/skeleton-text.js +84 -0
  35. package/dist/display/skeletons/skeleton-parts.d.ts +11 -0
  36. package/dist/display/skeletons/skeleton-parts.js +68 -0
  37. package/dist/display/status/alert.d.ts +1 -1
  38. package/dist/display/status/alert.js +137 -17
  39. package/dist/display/status/empty.js +250 -22
  40. package/dist/display/status/progress.d.ts +5 -1
  41. package/dist/display/status/progress.js +120 -3
  42. package/dist/display/status/skeleton.js +40 -3
  43. package/dist/display/status/spinner.js +42 -4
  44. package/dist/display/table.js +310 -17
  45. package/dist/feedback/toaster.d.ts +1 -1
  46. package/dist/feedback/toaster.js +100 -25
  47. package/dist/form/advanced/calendar-day-button.js +89 -12
  48. package/dist/form/advanced/calendar.js +349 -56
  49. package/dist/form/advanced/combobox/combobox-chips.js +152 -9
  50. package/dist/form/advanced/combobox/combobox-items.js +240 -15
  51. package/dist/form/advanced/combobox/combobox.js +387 -14
  52. package/dist/form/advanced/input-otp.js +202 -12
  53. package/dist/form/choice/checkbox.js +59 -4
  54. package/dist/form/choice/radio-group.js +95 -6
  55. package/dist/form/choice/select.js +479 -25
  56. package/dist/form/choice/slider.js +118 -4
  57. package/dist/form/choice/switch.js +53 -3
  58. package/dist/form/field/field-error.js +117 -14
  59. package/dist/form/field/field-separator.js +70 -3
  60. package/dist/form/field/field-set.js +85 -5
  61. package/dist/form/field/field-text.js +116 -7
  62. package/dist/form/field/field.js +138 -26
  63. package/dist/form/hook-form/form.js +338 -40
  64. package/dist/form/input-group.js +297 -47
  65. package/dist/form/input.js +47 -3
  66. package/dist/form/label.js +42 -3
  67. package/dist/form/native-select.js +148 -8
  68. package/dist/form/textarea.js +41 -3
  69. package/dist/index.d.ts +6 -0
  70. package/dist/index.js +6 -0
  71. package/dist/layout/accordion.js +166 -9
  72. package/dist/layout/collapsible.js +75 -7
  73. package/dist/layout/resizable.js +123 -8
  74. package/dist/layout/scroll/direction.js +25 -3
  75. package/dist/layout/scroll/scroll-area.d.ts +1 -1
  76. package/dist/layout/scroll/scroll-area.js +138 -5
  77. package/dist/layout/sidebar/sidebar-context.js +184 -51
  78. package/dist/layout/sidebar/sidebar-menu-sub.js +219 -14
  79. package/dist/layout/sidebar/sidebar-menu.js +319 -38
  80. package/dist/layout/sidebar/sidebar-sections.js +369 -22
  81. package/dist/layout/sidebar/sidebar.js +385 -29
  82. package/dist/layout/tabs.js +183 -18
  83. package/dist/layout/use-mobile.js +23 -10
  84. package/dist/navigation/breadcrumb.js +302 -18
  85. package/dist/navigation/menubar/menubar-items.js +323 -17
  86. package/dist/navigation/menubar/menubar-sub.js +126 -8
  87. package/dist/navigation/menubar/menubar.js +213 -13
  88. package/dist/navigation/navigation-menu.js +367 -19
  89. package/dist/navigation/pagination.js +329 -20
  90. package/dist/overlay/alert-dialog.js +485 -26
  91. package/dist/overlay/context-menu/context-menu-items.js +323 -17
  92. package/dist/overlay/context-menu/context-menu-sub.js +126 -8
  93. package/dist/overlay/context-menu/context-menu.js +140 -11
  94. package/dist/overlay/dialog.js +406 -25
  95. package/dist/overlay/floating/command.js +424 -21
  96. package/dist/overlay/floating/drawer.js +354 -22
  97. package/dist/overlay/floating/hover-card.js +107 -7
  98. package/dist/overlay/menu/dropdown-menu-choice.js +150 -8
  99. package/dist/overlay/menu/dropdown-menu-item.js +174 -9
  100. package/dist/overlay/menu/dropdown-menu-sub.js +125 -8
  101. package/dist/overlay/menu/dropdown-menu.js +147 -12
  102. package/dist/overlay/popover.js +106 -7
  103. package/dist/overlay/sheet.js +380 -27
  104. package/dist/overlay/tooltip.js +145 -9
  105. package/dist/shell/app-header.js +81 -5
  106. package/dist/shell/app-shell.js +58 -3
  107. package/dist/shell/breadcrumbs.js +102 -12
  108. package/dist/shell/docs/docs-header.js +211 -11
  109. package/dist/shell/docs/docs-shell.js +100 -3
  110. package/dist/shell/docs/docs-sidebar.js +88 -7
  111. package/dist/shell/docs/on-this-page.js +78 -7
  112. package/dist/shell/docs/use-active-section.js +88 -42
  113. package/dist/shell/navigation/app-sidebar.js +188 -6
  114. package/dist/shell/navigation/nav-group.js +161 -10
  115. package/dist/shell/theme-toggle.js +52 -5
  116. package/package.json +5 -5
@@ -1,27 +1,320 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
1
+ import { c as _c } from "react/compiler-runtime";
2
2
  import { cn } from "cn";
3
- function Table({ className, ...props }) {
4
- return (_jsx("div", { "data-slot": "table-container", className: "relative w-full overflow-x-auto scroll-fade-x", children: _jsx("table", { "data-slot": "table", className: cn("w-full caption-bottom text-sm", className), ...props }) }));
3
+ import { jsx as _jsx } from "react/jsx-runtime";
4
+ function Table(t0) {
5
+ const $ = _c(8);
6
+ let className;
7
+ let props;
8
+ if ($[0] !== t0) {
9
+ ({
10
+ className,
11
+ ...props
12
+ } = 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 {
26
+ t1 = $[4];
27
+ }
28
+ let t2;
29
+ if ($[5] !== props || $[6] !== t1) {
30
+ t2 = /*#__PURE__*/_jsx("div", {
31
+ "data-slot": "table-container",
32
+ className: "relative w-full overflow-x-auto scroll-fade-x",
33
+ children: /*#__PURE__*/_jsx("table", {
34
+ "data-slot": "table",
35
+ className: t1,
36
+ ...props
37
+ })
38
+ });
39
+ $[5] = props;
40
+ $[6] = t1;
41
+ $[7] = t2;
42
+ } else {
43
+ t2 = $[7];
44
+ }
45
+ return t2;
5
46
  }
6
- function TableHeader({ className, ...props }) {
7
- return _jsx("thead", { "data-slot": "table-header", className: cn("[&_tr]:border-b", className), ...props });
47
+ function TableHeader(t0) {
48
+ const $ = _c(8);
49
+ let className;
50
+ let props;
51
+ if ($[0] !== t0) {
52
+ ({
53
+ className,
54
+ ...props
55
+ } = t0);
56
+ $[0] = t0;
57
+ $[1] = className;
58
+ $[2] = props;
59
+ } else {
60
+ className = $[1];
61
+ props = $[2];
62
+ }
63
+ let t1;
64
+ if ($[3] !== className) {
65
+ t1 = cn("[&_tr]:border-b", className);
66
+ $[3] = className;
67
+ $[4] = t1;
68
+ } else {
69
+ t1 = $[4];
70
+ }
71
+ let t2;
72
+ if ($[5] !== props || $[6] !== t1) {
73
+ t2 = /*#__PURE__*/_jsx("thead", {
74
+ "data-slot": "table-header",
75
+ className: t1,
76
+ ...props
77
+ });
78
+ $[5] = props;
79
+ $[6] = t1;
80
+ $[7] = t2;
81
+ } else {
82
+ t2 = $[7];
83
+ }
84
+ return t2;
8
85
  }
9
- function TableBody({ className, ...props }) {
10
- return (_jsx("tbody", { "data-slot": "table-body", className: cn("[&_tr:last-child]:border-0", className), ...props }));
86
+ function TableBody(t0) {
87
+ const $ = _c(8);
88
+ let className;
89
+ let props;
90
+ if ($[0] !== t0) {
91
+ ({
92
+ className,
93
+ ...props
94
+ } = t0);
95
+ $[0] = t0;
96
+ $[1] = className;
97
+ $[2] = props;
98
+ } else {
99
+ className = $[1];
100
+ props = $[2];
101
+ }
102
+ let t1;
103
+ if ($[3] !== className) {
104
+ t1 = cn("[&_tr:last-child]:border-0", className);
105
+ $[3] = className;
106
+ $[4] = t1;
107
+ } else {
108
+ t1 = $[4];
109
+ }
110
+ let t2;
111
+ if ($[5] !== props || $[6] !== t1) {
112
+ t2 = /*#__PURE__*/_jsx("tbody", {
113
+ "data-slot": "table-body",
114
+ className: t1,
115
+ ...props
116
+ });
117
+ $[5] = props;
118
+ $[6] = t1;
119
+ $[7] = t2;
120
+ } else {
121
+ t2 = $[7];
122
+ }
123
+ return t2;
11
124
  }
12
- function TableFooter({ className, ...props }) {
13
- return (_jsx("tfoot", { "data-slot": "table-footer", className: cn("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0", className), ...props }));
125
+ function TableFooter(t0) {
126
+ const $ = _c(8);
127
+ let className;
128
+ let props;
129
+ if ($[0] !== t0) {
130
+ ({
131
+ className,
132
+ ...props
133
+ } = t0);
134
+ $[0] = t0;
135
+ $[1] = className;
136
+ $[2] = props;
137
+ } else {
138
+ className = $[1];
139
+ props = $[2];
140
+ }
141
+ let t1;
142
+ if ($[3] !== className) {
143
+ t1 = cn("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0", className);
144
+ $[3] = className;
145
+ $[4] = t1;
146
+ } else {
147
+ t1 = $[4];
148
+ }
149
+ let t2;
150
+ if ($[5] !== props || $[6] !== t1) {
151
+ t2 = /*#__PURE__*/_jsx("tfoot", {
152
+ "data-slot": "table-footer",
153
+ className: t1,
154
+ ...props
155
+ });
156
+ $[5] = props;
157
+ $[6] = t1;
158
+ $[7] = t2;
159
+ } else {
160
+ t2 = $[7];
161
+ }
162
+ return t2;
14
163
  }
15
- function TableRow({ className, ...props }) {
16
- return (_jsx("tr", { "data-slot": "table-row", className: cn("border-b transition-colors duration-150 ease-out hover:bg-muted/40 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted", className), ...props }));
164
+ function TableRow(t0) {
165
+ const $ = _c(8);
166
+ let className;
167
+ let props;
168
+ if ($[0] !== t0) {
169
+ ({
170
+ className,
171
+ ...props
172
+ } = t0);
173
+ $[0] = t0;
174
+ $[1] = className;
175
+ $[2] = props;
176
+ } else {
177
+ className = $[1];
178
+ props = $[2];
179
+ }
180
+ let t1;
181
+ if ($[3] !== className) {
182
+ t1 = cn("border-b transition-colors duration-150 ease-out hover:bg-muted/40 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted", className);
183
+ $[3] = className;
184
+ $[4] = t1;
185
+ } else {
186
+ t1 = $[4];
187
+ }
188
+ let t2;
189
+ if ($[5] !== props || $[6] !== t1) {
190
+ t2 = /*#__PURE__*/_jsx("tr", {
191
+ "data-slot": "table-row",
192
+ className: t1,
193
+ ...props
194
+ });
195
+ $[5] = props;
196
+ $[6] = t1;
197
+ $[7] = t2;
198
+ } else {
199
+ t2 = $[7];
200
+ }
201
+ return t2;
17
202
  }
18
- function TableHead({ className, ...props }) {
19
- return (_jsx("th", { "data-slot": "table-head", className: cn("h-9 px-3 text-left align-middle font-mono sm:px-4 text-[11.5px] font-normal whitespace-nowrap text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]", className), ...props }));
203
+ function TableHead(t0) {
204
+ const $ = _c(8);
205
+ let className;
206
+ let props;
207
+ if ($[0] !== t0) {
208
+ ({
209
+ className,
210
+ ...props
211
+ } = t0);
212
+ $[0] = t0;
213
+ $[1] = className;
214
+ $[2] = props;
215
+ } else {
216
+ className = $[1];
217
+ props = $[2];
218
+ }
219
+ let t1;
220
+ if ($[3] !== className) {
221
+ t1 = cn("eyebrow h-9 px-3 text-left align-middle font-normal whitespace-nowrap sm:px-4 [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]", className);
222
+ $[3] = className;
223
+ $[4] = t1;
224
+ } else {
225
+ t1 = $[4];
226
+ }
227
+ let t2;
228
+ if ($[5] !== props || $[6] !== t1) {
229
+ t2 = /*#__PURE__*/_jsx("th", {
230
+ "data-slot": "table-head",
231
+ className: t1,
232
+ ...props
233
+ });
234
+ $[5] = props;
235
+ $[6] = t1;
236
+ $[7] = t2;
237
+ } else {
238
+ t2 = $[7];
239
+ }
240
+ return t2;
20
241
  }
21
- function TableCell({ className, ...props }) {
22
- return (_jsx("td", { "data-slot": "table-cell", className: cn("px-3 py-2.5 align-middle whitespace-nowrap tabular-nums sm:px-4 [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]", className), ...props }));
242
+ function TableCell(t0) {
243
+ const $ = _c(8);
244
+ let className;
245
+ let props;
246
+ if ($[0] !== t0) {
247
+ ({
248
+ className,
249
+ ...props
250
+ } = t0);
251
+ $[0] = t0;
252
+ $[1] = className;
253
+ $[2] = props;
254
+ } else {
255
+ className = $[1];
256
+ props = $[2];
257
+ }
258
+ let t1;
259
+ if ($[3] !== className) {
260
+ t1 = cn("px-3 py-2.5 align-middle whitespace-nowrap tabular-nums sm:px-4 [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]", className);
261
+ $[3] = className;
262
+ $[4] = t1;
263
+ } else {
264
+ t1 = $[4];
265
+ }
266
+ let t2;
267
+ if ($[5] !== props || $[6] !== t1) {
268
+ t2 = /*#__PURE__*/_jsx("td", {
269
+ "data-slot": "table-cell",
270
+ className: t1,
271
+ ...props
272
+ });
273
+ $[5] = props;
274
+ $[6] = t1;
275
+ $[7] = t2;
276
+ } else {
277
+ t2 = $[7];
278
+ }
279
+ return t2;
23
280
  }
24
- function TableCaption({ className, ...props }) {
25
- return (_jsx("caption", { "data-slot": "table-caption", className: cn("mt-4 text-sm text-muted-foreground", className), ...props }));
281
+ function TableCaption(t0) {
282
+ const $ = _c(8);
283
+ let className;
284
+ let props;
285
+ if ($[0] !== t0) {
286
+ ({
287
+ className,
288
+ ...props
289
+ } = t0);
290
+ $[0] = t0;
291
+ $[1] = className;
292
+ $[2] = props;
293
+ } else {
294
+ className = $[1];
295
+ props = $[2];
296
+ }
297
+ let t1;
298
+ if ($[3] !== className) {
299
+ t1 = cn("mt-4 text-sm text-muted-foreground", className);
300
+ $[3] = className;
301
+ $[4] = t1;
302
+ } else {
303
+ t1 = $[4];
304
+ }
305
+ let t2;
306
+ if ($[5] !== props || $[6] !== t1) {
307
+ t2 = /*#__PURE__*/_jsx("caption", {
308
+ "data-slot": "table-caption",
309
+ className: t1,
310
+ ...props
311
+ });
312
+ $[5] = props;
313
+ $[6] = t1;
314
+ $[7] = t2;
315
+ } else {
316
+ t2 = $[7];
317
+ }
318
+ return t2;
26
319
  }
27
320
  export { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow };
@@ -1,5 +1,5 @@
1
1
  import type * as React from "react";
2
2
  import { type ToasterProps } from "sonner";
3
- declare function Toaster({ theme, ...props }: ToasterProps): React.JSX.Element;
3
+ declare function Toaster({ theme, toastOptions, ...props }: ToasterProps): React.JSX.Element;
4
4
  export { toast } from "sonner";
5
5
  export { Toaster };
@@ -1,32 +1,107 @@
1
1
  "use client";
2
- import { jsx as _jsx } from "react/jsx-runtime";
3
- import { CircleCheckIcon, InfoIcon, Loader2Icon, OctagonXIcon, TriangleAlertIcon, } from "lucide-react";
2
+
3
+ import { c as _c } from "react/compiler-runtime";
4
+ import { CheckmarkOutline as CircleCheckIcon, Information as InfoIcon, InProgress as Loader2Icon, ErrorOutline as OctagonXIcon, WarningAlt as TriangleAlertIcon } from "@carbon/icons-react";
4
5
  import { Toaster as Sonner } from "sonner";
5
- function statusColors(type, color) {
6
- return {
7
- [`--${type}-bg`]: `color-mix(in srgb, var(${color}) 8%, var(--popover))`,
8
- [`--${type}-border`]: `color-mix(in srgb, var(${color}) 30%, var(--popover))`,
9
- [`--${type}-text`]: `var(${color})`,
10
- };
11
- }
6
+ import { jsx as _jsx } from "react/jsx-runtime";
12
7
  const toasterColors = {
13
- "--normal-bg": "var(--popover)",
14
- "--normal-text": "var(--popover-foreground)",
15
- "--normal-border": "var(--border)",
16
- "--border-radius": "var(--radius)",
17
- ...statusColors("success", "--good"),
18
- ...statusColors("info", "--info"),
19
- ...statusColors("warning", "--warn"),
20
- ...statusColors("error", "--bad"),
8
+ "--normal-bg": "var(--popover)",
9
+ "--normal-text": "var(--popover-foreground)",
10
+ "--normal-border": "var(--border)",
11
+ "--border-radius": "var(--radius)"
21
12
  };
22
- function Toaster({ theme = "system", ...props }) {
23
- return (_jsx(Sonner, { theme: theme, richColors: true, className: "toaster group", icons: {
24
- success: _jsx(CircleCheckIcon, { className: "size-4" }),
25
- info: _jsx(InfoIcon, { className: "size-4" }),
26
- warning: _jsx(TriangleAlertIcon, { className: "size-4" }),
27
- error: _jsx(OctagonXIcon, { className: "size-4" }),
28
- loading: _jsx(Loader2Icon, { className: "size-4 animate-spin" }),
29
- }, style: toasterColors, ...props }));
13
+ const statusRuleClassNames = {
14
+ success: "border-l-2! border-l-good! [&_[data-icon]]:text-good",
15
+ info: "border-l-2! border-l-info! [&_[data-icon]]:text-info",
16
+ warning: "border-l-2! border-l-warn! [&_[data-icon]]:text-warn",
17
+ error: "border-l-2! border-l-destructive! [&_[data-icon]]:text-destructive"
18
+ };
19
+ function Toaster(t0) {
20
+ const $ = _c(14);
21
+ let props;
22
+ let t1;
23
+ let toastOptions;
24
+ if ($[0] !== t0) {
25
+ ({
26
+ theme: t1,
27
+ toastOptions,
28
+ ...props
29
+ } = t0);
30
+ $[0] = t0;
31
+ $[1] = props;
32
+ $[2] = t1;
33
+ $[3] = toastOptions;
34
+ } else {
35
+ props = $[1];
36
+ t1 = $[2];
37
+ toastOptions = $[3];
38
+ }
39
+ const theme = t1 === undefined ? "system" : t1;
40
+ const t2 = toastOptions?.classNames;
41
+ let t3;
42
+ if ($[4] !== t2) {
43
+ t3 = {
44
+ ...statusRuleClassNames,
45
+ ...t2
46
+ };
47
+ $[4] = t2;
48
+ $[5] = t3;
49
+ } else {
50
+ t3 = $[5];
51
+ }
52
+ let t4;
53
+ if ($[6] !== t3 || $[7] !== toastOptions) {
54
+ t4 = {
55
+ ...toastOptions,
56
+ classNames: t3
57
+ };
58
+ $[6] = t3;
59
+ $[7] = toastOptions;
60
+ $[8] = t4;
61
+ } else {
62
+ t4 = $[8];
63
+ }
64
+ let t5;
65
+ if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
66
+ t5 = {
67
+ success: /*#__PURE__*/_jsx(CircleCheckIcon, {
68
+ className: "size-4"
69
+ }),
70
+ info: /*#__PURE__*/_jsx(InfoIcon, {
71
+ className: "size-4"
72
+ }),
73
+ warning: /*#__PURE__*/_jsx(TriangleAlertIcon, {
74
+ className: "size-4"
75
+ }),
76
+ error: /*#__PURE__*/_jsx(OctagonXIcon, {
77
+ className: "size-4"
78
+ }),
79
+ loading: /*#__PURE__*/_jsx(Loader2Icon, {
80
+ className: "size-4 animate-spin"
81
+ })
82
+ };
83
+ $[9] = t5;
84
+ } else {
85
+ t5 = $[9];
86
+ }
87
+ let t6;
88
+ if ($[10] !== props || $[11] !== t4 || $[12] !== theme) {
89
+ t6 = /*#__PURE__*/_jsx(Sonner, {
90
+ theme: theme,
91
+ className: "toaster group",
92
+ toastOptions: t4,
93
+ icons: t5,
94
+ style: toasterColors,
95
+ ...props
96
+ });
97
+ $[10] = props;
98
+ $[11] = t4;
99
+ $[12] = theme;
100
+ $[13] = t6;
101
+ } else {
102
+ t6 = $[13];
103
+ }
104
+ return t6;
30
105
  }
31
106
  export { toast } from "sonner";
32
107
  export { Toaster };
@@ -1,19 +1,96 @@
1
1
  "use client";
2
- import { jsx as _jsx } from "react/jsx-runtime";
2
+
3
+ import { c as _c } from "react/compiler-runtime";
3
4
  import { cn } from "cn";
4
5
  import * as React from "react";
5
6
  import { getDefaultClassNames } from "react-day-picker";
6
7
  import { Button } from "../../action/button.js";
7
- function CalendarDayButton({ className, day, modifiers, ...props }) {
8
- const defaultClassNames = getDefaultClassNames();
9
- const ref = React.useRef(null);
10
- React.useEffect(() => {
11
- if (modifiers.focused)
12
- ref.current?.focus();
13
- }, [modifiers.focused]);
14
- return (_jsx(Button, { ref: ref, variant: "ghost", size: "icon", "data-day": day.date.toLocaleDateString(), "data-selected-single": modifiers.selected &&
15
- !modifiers.range_start &&
16
- !modifiers.range_end &&
17
- !modifiers.range_middle, "data-range-start": modifiers.range_start, "data-range-end": modifiers.range_end, "data-range-middle": modifiers.range_middle, className: cn("flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-[3px] group-data-[focused=true]/day:ring-ring/50 data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground data-[range-middle=true]:rounded-none data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground dark:hover:text-accent-foreground [&>span]:text-xs [&>span]:opacity-70", defaultClassNames.day, className), ...props }));
8
+ import { jsx as _jsx } from "react/jsx-runtime";
9
+ function CalendarDayButton(t0) {
10
+ const $ = _c(19);
11
+ let className;
12
+ let day;
13
+ let modifiers;
14
+ let props;
15
+ if ($[0] !== t0) {
16
+ ({
17
+ className,
18
+ day,
19
+ modifiers,
20
+ ...props
21
+ } = t0);
22
+ $[0] = t0;
23
+ $[1] = className;
24
+ $[2] = day;
25
+ $[3] = modifiers;
26
+ $[4] = props;
27
+ } else {
28
+ className = $[1];
29
+ day = $[2];
30
+ modifiers = $[3];
31
+ props = $[4];
32
+ }
33
+ const defaultClassNames = getDefaultClassNames();
34
+ const ref = React.useRef(null);
35
+ let t1;
36
+ let t2;
37
+ if ($[5] !== modifiers.focused) {
38
+ t1 = () => {
39
+ if (modifiers.focused) {
40
+ ref.current?.focus();
41
+ }
42
+ };
43
+ t2 = [modifiers.focused];
44
+ $[5] = modifiers.focused;
45
+ $[6] = t1;
46
+ $[7] = t2;
47
+ } else {
48
+ t1 = $[6];
49
+ t2 = $[7];
50
+ }
51
+ React.useEffect(t1, t2);
52
+ const T0 = Button;
53
+ const t3 = "ghost";
54
+ const t4 = "icon";
55
+ let t5;
56
+ if ($[8] !== day.date) {
57
+ t5 = day.date.toLocaleDateString();
58
+ $[8] = day.date;
59
+ $[9] = t5;
60
+ } else {
61
+ t5 = $[9];
62
+ }
63
+ const t6 = modifiers.selected && !modifiers.range_start && !modifiers.range_end && !modifiers.range_middle;
64
+ const t7 = modifiers.range_start;
65
+ const t8 = modifiers.range_end;
66
+ const t9 = modifiers.range_middle;
67
+ const t10 = cn("flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-2 group-data-[focused=true]/day:ring-ring/70 data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground data-[range-middle=true]:rounded-none data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[selected-single=true]:rounded-none data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground dark:hover:text-accent-foreground [&>span]:text-xs [&>span]:opacity-70", defaultClassNames.day, className);
68
+ let t11;
69
+ if ($[10] !== T0 || $[11] !== modifiers.range_end || $[12] !== modifiers.range_middle || $[13] !== modifiers.range_start || $[14] !== props || $[15] !== t10 || $[16] !== t5 || $[17] !== t6) {
70
+ t11 = /*#__PURE__*/_jsx(T0, {
71
+ ref: ref,
72
+ variant: t3,
73
+ size: t4,
74
+ "data-day": t5,
75
+ "data-selected-single": t6,
76
+ "data-range-start": t7,
77
+ "data-range-end": t8,
78
+ "data-range-middle": t9,
79
+ className: t10,
80
+ ...props
81
+ });
82
+ $[10] = T0;
83
+ $[11] = modifiers.range_end;
84
+ $[12] = modifiers.range_middle;
85
+ $[13] = modifiers.range_start;
86
+ $[14] = props;
87
+ $[15] = t10;
88
+ $[16] = t5;
89
+ $[17] = t6;
90
+ $[18] = t11;
91
+ } else {
92
+ t11 = $[18];
93
+ }
94
+ return t11;
18
95
  }
19
96
  export { CalendarDayButton };