@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,64 +1,357 @@
1
1
  "use client";
2
- import { jsx as _jsx } from "react/jsx-runtime";
3
- import { ChevronDown as ChevronDownIcon, ChevronLeft as ChevronLeftIcon, ChevronRight as ChevronRightIcon, } from "@carbon/icons-react";
2
+
3
+ import { c as _c } from "react/compiler-runtime";
4
+ import { ChevronDown as ChevronDownIcon, ChevronLeft as ChevronLeftIcon, ChevronRight as ChevronRightIcon } from "@carbon/icons-react";
4
5
  import { cn } from "cn";
6
+ import * as React from "react";
5
7
  import { DayPicker, getDefaultClassNames } from "react-day-picker";
6
8
  import { buttonVariants } from "../../action/button.js";
7
9
  import { CalendarDayButton } from "./calendar-day-button.js";
8
- function Calendar({ className, classNames, showOutsideDays = true, captionLayout = "label", buttonVariant = "ghost", formatters, components, ...props }) {
10
+ import { jsx as _jsx } from "react/jsx-runtime";
11
+ const rtlFlippedNavIcons = [String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`, String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`];
12
+ function Calendar(t0) {
13
+ const $ = _c(87);
14
+ let className;
15
+ let classNames;
16
+ let components;
17
+ let formatters;
18
+ let props;
19
+ let t1;
20
+ let t2;
21
+ let t3;
22
+ if ($[0] !== t0) {
23
+ ({
24
+ className,
25
+ classNames,
26
+ showOutsideDays: t1,
27
+ captionLayout: t2,
28
+ buttonVariant: t3,
29
+ formatters,
30
+ components,
31
+ ...props
32
+ } = t0);
33
+ $[0] = t0;
34
+ $[1] = className;
35
+ $[2] = classNames;
36
+ $[3] = components;
37
+ $[4] = formatters;
38
+ $[5] = props;
39
+ $[6] = t1;
40
+ $[7] = t2;
41
+ $[8] = t3;
42
+ } else {
43
+ className = $[1];
44
+ classNames = $[2];
45
+ components = $[3];
46
+ formatters = $[4];
47
+ props = $[5];
48
+ t1 = $[6];
49
+ t2 = $[7];
50
+ t3 = $[8];
51
+ }
52
+ const showOutsideDays = t1 === undefined ? true : t1;
53
+ const captionLayout = t2 === undefined ? "label" : t2;
54
+ const buttonVariant = t3 === undefined ? "ghost" : t3;
55
+ let T0;
56
+ let t10;
57
+ let t11;
58
+ let t12;
59
+ let t13;
60
+ let t14;
61
+ let t15;
62
+ let t16;
63
+ let t17;
64
+ let t18;
65
+ let t19;
66
+ let t20;
67
+ let t21;
68
+ let t22;
69
+ let t23;
70
+ let t24;
71
+ let t25;
72
+ let t26;
73
+ let t27;
74
+ let t28;
75
+ let t29;
76
+ let t30;
77
+ let t31;
78
+ let t32;
79
+ let t4;
80
+ let t5;
81
+ let t6;
82
+ let t7;
83
+ let t8;
84
+ let t9;
85
+ if ($[9] !== buttonVariant || $[10] !== captionLayout || $[11] !== className || $[12] !== formatters || $[13] !== props.showWeekNumber || $[14] !== showOutsideDays) {
9
86
  const defaultClassNames = getDefaultClassNames();
10
- return (_jsx(DayPicker, { showOutsideDays: showOutsideDays, className: cn("group/calendar bg-background p-3 [--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent", String.raw `rtl:**:[.rdp-button\_next>svg]:rotate-180`, String.raw `rtl:**:[.rdp-button\_previous>svg]:rotate-180`, className), captionLayout: captionLayout, formatters: {
11
- formatMonthDropdown: (date) => date.toLocaleString("default", { month: "short" }),
12
- ...formatters,
13
- }, classNames: {
14
- root: cn("w-fit", defaultClassNames.root),
15
- months: cn("relative flex flex-col gap-4 md:flex-row", defaultClassNames.months),
16
- month: cn("flex w-full flex-col gap-4", defaultClassNames.month),
17
- nav: cn("absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1", defaultClassNames.nav),
18
- button_previous: cn(buttonVariants({ variant: buttonVariant }), "size-(--cell-size) p-0 select-none aria-disabled:opacity-50", defaultClassNames.button_previous),
19
- button_next: cn(buttonVariants({ variant: buttonVariant }), "size-(--cell-size) p-0 select-none aria-disabled:opacity-50", defaultClassNames.button_next),
20
- month_caption: cn("flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)", defaultClassNames.month_caption),
21
- dropdowns: cn("flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm font-medium", defaultClassNames.dropdowns),
22
- dropdown_root: cn("relative rounded-md border border-input shadow-xs has-focus:border-ring has-focus:ring-1 has-focus:ring-ring", defaultClassNames.dropdown_root),
23
- dropdown: cn("absolute inset-0 bg-popover opacity-0", defaultClassNames.dropdown),
24
- caption_label: cn("font-medium select-none", captionLayout === "label"
25
- ? "text-sm"
26
- : "flex h-8 items-center gap-1 rounded-md pr-1 pl-2 text-sm [&>svg]:size-3.5 [&>svg]:text-muted-foreground", defaultClassNames.caption_label),
27
- month_grid: cn("w-full border-collapse", defaultClassNames.month_grid),
28
- weekdays: cn("flex", defaultClassNames.weekdays),
29
- weekday: cn("flex-1 rounded-md text-xs font-normal text-muted-foreground select-none", defaultClassNames.weekday),
30
- week: cn("mt-2 flex w-full", defaultClassNames.week),
31
- week_number_header: cn("w-(--cell-size) select-none", defaultClassNames.week_number_header),
32
- week_number: cn("text-xs text-muted-foreground select-none", defaultClassNames.week_number),
33
- day: cn("group/day relative aspect-square h-full w-full p-0 text-center select-none [&:last-child[data-selected=true]_button]:rounded-r-md", props.showWeekNumber
34
- ? "[&:nth-child(2)[data-selected=true]_button]:rounded-l-md"
35
- : "[&:first-child[data-selected=true]_button]:rounded-l-md", defaultClassNames.day),
36
- range_start: cn("rounded-l-md bg-accent", defaultClassNames.range_start),
37
- range_middle: cn("rounded-none", defaultClassNames.range_middle),
38
- range_end: cn("rounded-r-md bg-accent", defaultClassNames.range_end),
39
- today: cn("rounded-md bg-accent text-accent-foreground data-[selected=true]:rounded-none", defaultClassNames.today),
40
- outside: cn("text-muted-foreground aria-selected:text-muted-foreground", defaultClassNames.outside),
41
- disabled: cn("text-muted-foreground opacity-50", defaultClassNames.disabled),
42
- hidden: cn("invisible", defaultClassNames.hidden),
43
- ...classNames,
44
- }, components: {
45
- Root: ({ className, rootRef, ...props }) => {
46
- return _jsx("div", { "data-slot": "calendar", ref: rootRef, className: cn(className), ...props });
47
- },
48
- Chevron: ({ className, orientation, ...props }) => {
49
- if (orientation === "left") {
50
- return _jsx(ChevronLeftIcon, { className: cn("size-4", className), ...props });
51
- }
52
- if (orientation === "right") {
53
- return _jsx(ChevronRightIcon, { className: cn("size-4", className), ...props });
54
- }
55
- return _jsx(ChevronDownIcon, { className: cn("size-4", className), ...props });
56
- },
57
- DayButton: CalendarDayButton,
58
- WeekNumber: ({ children, ...props }) => {
59
- return (_jsx("td", { ...props, children: _jsx("div", { className: "flex size-(--cell-size) items-center justify-center text-center", children: children }) }));
60
- },
61
- ...components,
62
- }, ...props }));
87
+ T0 = DayPicker;
88
+ t29 = showOutsideDays;
89
+ if ($[45] !== className) {
90
+ t30 = cn("group/calendar bg-background p-3 [--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent", rtlFlippedNavIcons, className);
91
+ $[45] = className;
92
+ $[46] = t30;
93
+ } else {
94
+ t30 = $[46];
95
+ }
96
+ t31 = captionLayout;
97
+ if ($[47] !== formatters) {
98
+ t32 = {
99
+ formatMonthDropdown: _temp,
100
+ ...formatters
101
+ };
102
+ $[47] = formatters;
103
+ $[48] = t32;
104
+ } else {
105
+ t32 = $[48];
106
+ }
107
+ t4 = cn("w-fit", defaultClassNames.root);
108
+ t5 = cn("relative flex flex-col gap-4 md:flex-row", defaultClassNames.months);
109
+ t6 = cn("flex w-full flex-col gap-4", defaultClassNames.month);
110
+ t7 = cn("absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1", defaultClassNames.nav);
111
+ t8 = cn(buttonVariants({
112
+ variant: buttonVariant
113
+ }), "size-(--cell-size) p-0 select-none aria-disabled:opacity-50", defaultClassNames.button_previous);
114
+ t9 = cn(buttonVariants({
115
+ variant: buttonVariant
116
+ }), "size-(--cell-size) p-0 select-none aria-disabled:opacity-50", defaultClassNames.button_next);
117
+ t10 = cn("flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)", defaultClassNames.month_caption);
118
+ t11 = cn("flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm font-medium", defaultClassNames.dropdowns);
119
+ t12 = cn("relative rounded-md border border-input shadow-xs has-focus:border-ring has-focus:ring-1 has-focus:ring-ring", defaultClassNames.dropdown_root);
120
+ t13 = cn("absolute inset-0 bg-popover opacity-0", defaultClassNames.dropdown);
121
+ t14 = cn("font-medium select-none", captionLayout === "label" ? "text-sm" : "flex h-8 items-center gap-1 rounded-md pr-1 pl-2 text-sm [&>svg]:size-3.5 [&>svg]:text-muted-foreground", defaultClassNames.caption_label);
122
+ t15 = cn("w-full border-collapse", defaultClassNames.month_grid);
123
+ t16 = cn("flex", defaultClassNames.weekdays);
124
+ t17 = cn("flex-1 rounded-md text-xs font-normal text-muted-foreground select-none", defaultClassNames.weekday);
125
+ t18 = cn("mt-2 flex w-full", defaultClassNames.week);
126
+ t19 = cn("w-(--cell-size) select-none", defaultClassNames.week_number_header);
127
+ t20 = cn("text-xs text-muted-foreground select-none", defaultClassNames.week_number);
128
+ t21 = cn("group/day relative aspect-square h-full w-full p-0 text-center select-none [&:last-child[data-selected=true]_button]:rounded-r-md", props.showWeekNumber ? "[&:nth-child(2)[data-selected=true]_button]:rounded-l-md" : "[&:first-child[data-selected=true]_button]:rounded-l-md", defaultClassNames.day);
129
+ t22 = cn("rounded-l-md bg-accent", defaultClassNames.range_start);
130
+ t23 = cn("rounded-none", defaultClassNames.range_middle);
131
+ t24 = cn("rounded-r-md bg-accent", defaultClassNames.range_end);
132
+ t25 = cn("rounded-md bg-accent text-accent-foreground data-[selected=true]:rounded-none", defaultClassNames.today);
133
+ t26 = cn("text-muted-foreground aria-selected:text-muted-foreground", defaultClassNames.outside);
134
+ t27 = cn("text-muted-foreground opacity-50", defaultClassNames.disabled);
135
+ t28 = cn("invisible", defaultClassNames.hidden);
136
+ $[9] = buttonVariant;
137
+ $[10] = captionLayout;
138
+ $[11] = className;
139
+ $[12] = formatters;
140
+ $[13] = props.showWeekNumber;
141
+ $[14] = showOutsideDays;
142
+ $[15] = T0;
143
+ $[16] = t10;
144
+ $[17] = t11;
145
+ $[18] = t12;
146
+ $[19] = t13;
147
+ $[20] = t14;
148
+ $[21] = t15;
149
+ $[22] = t16;
150
+ $[23] = t17;
151
+ $[24] = t18;
152
+ $[25] = t19;
153
+ $[26] = t20;
154
+ $[27] = t21;
155
+ $[28] = t22;
156
+ $[29] = t23;
157
+ $[30] = t24;
158
+ $[31] = t25;
159
+ $[32] = t26;
160
+ $[33] = t27;
161
+ $[34] = t28;
162
+ $[35] = t29;
163
+ $[36] = t30;
164
+ $[37] = t31;
165
+ $[38] = t32;
166
+ $[39] = t4;
167
+ $[40] = t5;
168
+ $[41] = t6;
169
+ $[42] = t7;
170
+ $[43] = t8;
171
+ $[44] = t9;
172
+ } else {
173
+ T0 = $[15];
174
+ t10 = $[16];
175
+ t11 = $[17];
176
+ t12 = $[18];
177
+ t13 = $[19];
178
+ t14 = $[20];
179
+ t15 = $[21];
180
+ t16 = $[22];
181
+ t17 = $[23];
182
+ t18 = $[24];
183
+ t19 = $[25];
184
+ t20 = $[26];
185
+ t21 = $[27];
186
+ t22 = $[28];
187
+ t23 = $[29];
188
+ t24 = $[30];
189
+ t25 = $[31];
190
+ t26 = $[32];
191
+ t27 = $[33];
192
+ t28 = $[34];
193
+ t29 = $[35];
194
+ t30 = $[36];
195
+ t31 = $[37];
196
+ t32 = $[38];
197
+ t4 = $[39];
198
+ t5 = $[40];
199
+ t6 = $[41];
200
+ t7 = $[42];
201
+ t8 = $[43];
202
+ t9 = $[44];
203
+ }
204
+ let t33;
205
+ if ($[49] !== classNames || $[50] !== t10 || $[51] !== t11 || $[52] !== t12 || $[53] !== t13 || $[54] !== t14 || $[55] !== t15 || $[56] !== t16 || $[57] !== t17 || $[58] !== t18 || $[59] !== t19 || $[60] !== t20 || $[61] !== t21 || $[62] !== t22 || $[63] !== t23 || $[64] !== t24 || $[65] !== t25 || $[66] !== t26 || $[67] !== t27 || $[68] !== t28 || $[69] !== t4 || $[70] !== t5 || $[71] !== t6 || $[72] !== t7 || $[73] !== t8 || $[74] !== t9) {
206
+ t33 = {
207
+ root: t4,
208
+ months: t5,
209
+ month: t6,
210
+ nav: t7,
211
+ button_previous: t8,
212
+ button_next: t9,
213
+ month_caption: t10,
214
+ dropdowns: t11,
215
+ dropdown_root: t12,
216
+ dropdown: t13,
217
+ caption_label: t14,
218
+ month_grid: t15,
219
+ weekdays: t16,
220
+ weekday: t17,
221
+ week: t18,
222
+ week_number_header: t19,
223
+ week_number: t20,
224
+ day: t21,
225
+ range_start: t22,
226
+ range_middle: t23,
227
+ range_end: t24,
228
+ today: t25,
229
+ outside: t26,
230
+ disabled: t27,
231
+ hidden: t28,
232
+ ...classNames
233
+ };
234
+ $[49] = classNames;
235
+ $[50] = t10;
236
+ $[51] = t11;
237
+ $[52] = t12;
238
+ $[53] = t13;
239
+ $[54] = t14;
240
+ $[55] = t15;
241
+ $[56] = t16;
242
+ $[57] = t17;
243
+ $[58] = t18;
244
+ $[59] = t19;
245
+ $[60] = t20;
246
+ $[61] = t21;
247
+ $[62] = t22;
248
+ $[63] = t23;
249
+ $[64] = t24;
250
+ $[65] = t25;
251
+ $[66] = t26;
252
+ $[67] = t27;
253
+ $[68] = t28;
254
+ $[69] = t4;
255
+ $[70] = t5;
256
+ $[71] = t6;
257
+ $[72] = t7;
258
+ $[73] = t8;
259
+ $[74] = t9;
260
+ $[75] = t33;
261
+ } else {
262
+ t33 = $[75];
263
+ }
264
+ let t34;
265
+ if ($[76] !== components) {
266
+ t34 = {
267
+ Root: _temp2,
268
+ Chevron: _temp3,
269
+ DayButton: CalendarDayButton,
270
+ WeekNumber: _temp4,
271
+ ...components
272
+ };
273
+ $[76] = components;
274
+ $[77] = t34;
275
+ } else {
276
+ t34 = $[77];
277
+ }
278
+ let t35;
279
+ if ($[78] !== T0 || $[79] !== props || $[80] !== t29 || $[81] !== t30 || $[82] !== t31 || $[83] !== t32 || $[84] !== t33 || $[85] !== t34) {
280
+ t35 = /*#__PURE__*/_jsx(T0, {
281
+ showOutsideDays: t29,
282
+ className: t30,
283
+ captionLayout: t31,
284
+ formatters: t32,
285
+ classNames: t33,
286
+ components: t34,
287
+ ...props
288
+ });
289
+ $[78] = T0;
290
+ $[79] = props;
291
+ $[80] = t29;
292
+ $[81] = t30;
293
+ $[82] = t31;
294
+ $[83] = t32;
295
+ $[84] = t33;
296
+ $[85] = t34;
297
+ $[86] = t35;
298
+ } else {
299
+ t35 = $[86];
300
+ }
301
+ return t35;
302
+ }
303
+ function _temp4(t0) {
304
+ const {
305
+ children,
306
+ ...props_2
307
+ } = t0;
308
+ return /*#__PURE__*/_jsx("td", {
309
+ ...props_2,
310
+ children: /*#__PURE__*/_jsx("div", {
311
+ className: "flex size-(--cell-size) items-center justify-center text-center",
312
+ children: children
313
+ })
314
+ });
315
+ }
316
+ function _temp3(t0) {
317
+ const {
318
+ className: className_1,
319
+ orientation,
320
+ ...props_1
321
+ } = t0;
322
+ if (orientation === "left") {
323
+ return /*#__PURE__*/_jsx(ChevronLeftIcon, {
324
+ className: cn("size-4", className_1),
325
+ ...props_1
326
+ });
327
+ }
328
+ if (orientation === "right") {
329
+ return /*#__PURE__*/_jsx(ChevronRightIcon, {
330
+ className: cn("size-4", className_1),
331
+ ...props_1
332
+ });
333
+ }
334
+ return /*#__PURE__*/_jsx(ChevronDownIcon, {
335
+ className: cn("size-4", className_1),
336
+ ...props_1
337
+ });
338
+ }
339
+ function _temp2(t0) {
340
+ const {
341
+ className: className_0,
342
+ rootRef,
343
+ ...props_0
344
+ } = t0;
345
+ return /*#__PURE__*/_jsx("div", {
346
+ "data-slot": "calendar",
347
+ ref: rootRef,
348
+ className: cn(className_0),
349
+ ...props_0
350
+ });
351
+ }
352
+ function _temp(date) {
353
+ return date.toLocaleString("default", {
354
+ month: "short"
355
+ });
63
356
  }
64
357
  export { Calendar };
@@ -1,20 +1,163 @@
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 { Combobox as ComboboxPrimitive } from "@base-ui/react";
4
5
  import { Close as XIcon } from "@carbon/icons-react";
5
6
  import { cn } from "cn";
6
7
  import * as React from "react";
7
8
  import { Button } from "../../../action/button.js";
8
- function ComboboxChips({ className, ...props }) {
9
- return (_jsx(ComboboxPrimitive.Chips, { "data-slot": "combobox-chips", className: cn("flex min-h-9 flex-wrap items-center gap-1.5 rounded-md border border-input bg-transparent bg-clip-padding px-2.5 py-1.5 text-sm shadow-xs transition-[color,box-shadow] focus-within:border-ring focus-within:ring-1 focus-within:ring-ring has-aria-invalid:border-destructive has-aria-invalid:ring-destructive/20 has-data-[slot=combobox-chip]:px-1.5 dark:bg-input/30 dark:has-aria-invalid:border-destructive/50 dark:has-aria-invalid:ring-destructive/40", className), ...props }));
9
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
10
+ function ComboboxChips(t0) {
11
+ const $ = _c(8);
12
+ let className;
13
+ let props;
14
+ if ($[0] !== t0) {
15
+ ({
16
+ className,
17
+ ...props
18
+ } = t0);
19
+ $[0] = t0;
20
+ $[1] = className;
21
+ $[2] = props;
22
+ } else {
23
+ className = $[1];
24
+ props = $[2];
25
+ }
26
+ let t1;
27
+ if ($[3] !== className) {
28
+ t1 = cn("flex min-h-9 flex-wrap items-center gap-1.5 rounded-md border border-input bg-transparent bg-clip-padding px-2.5 py-1.5 text-sm shadow-xs transition-[color,box-shadow] focus-within:border-ring focus-within:ring-1 focus-within:ring-ring has-aria-invalid:border-destructive has-aria-invalid:ring-destructive/20 has-data-[slot=combobox-chip]:px-1.5 dark:bg-input/30 dark:has-aria-invalid:border-destructive/50 dark:has-aria-invalid:ring-destructive/40", className);
29
+ $[3] = className;
30
+ $[4] = t1;
31
+ } else {
32
+ t1 = $[4];
33
+ }
34
+ let t2;
35
+ if ($[5] !== props || $[6] !== t1) {
36
+ t2 = /*#__PURE__*/_jsx(ComboboxPrimitive.Chips, {
37
+ "data-slot": "combobox-chips",
38
+ className: t1,
39
+ ...props
40
+ });
41
+ $[5] = props;
42
+ $[6] = t1;
43
+ $[7] = t2;
44
+ } else {
45
+ t2 = $[7];
46
+ }
47
+ return t2;
10
48
  }
11
- function ComboboxChip({ className, children, showRemove = true, ...props }) {
12
- return (_jsxs(ComboboxPrimitive.Chip, { "data-slot": "combobox-chip", className: cn("flex h-[calc(--spacing(5.5))] w-fit items-center justify-center gap-1 rounded-sm bg-muted px-1.5 text-xs font-medium whitespace-nowrap text-foreground has-disabled:pointer-events-none has-disabled:cursor-not-allowed has-disabled:opacity-50 has-data-[slot=combobox-chip-remove]:pr-0", className), ...props, children: [children, showRemove && (_jsx(ComboboxPrimitive.ChipRemove, { render: _jsx(Button, { variant: "ghost", size: "icon-xs" }), className: "-ml-1 opacity-50 hover:opacity-100", "data-slot": "combobox-chip-remove", children: _jsx(XIcon, { className: "pointer-events-none" }) }))] }));
49
+ function ComboboxChip(t0) {
50
+ const $ = _c(14);
51
+ let children;
52
+ let className;
53
+ let props;
54
+ let t1;
55
+ if ($[0] !== t0) {
56
+ ({
57
+ className,
58
+ children,
59
+ showRemove: t1,
60
+ ...props
61
+ } = t0);
62
+ $[0] = t0;
63
+ $[1] = children;
64
+ $[2] = className;
65
+ $[3] = props;
66
+ $[4] = t1;
67
+ } else {
68
+ children = $[1];
69
+ className = $[2];
70
+ props = $[3];
71
+ t1 = $[4];
72
+ }
73
+ const showRemove = t1 === undefined ? true : t1;
74
+ let t2;
75
+ if ($[5] !== className) {
76
+ t2 = cn("flex h-[calc(--spacing(5.5))] w-fit items-center justify-center gap-1 rounded-sm bg-muted px-1.5 text-xs font-medium whitespace-nowrap text-foreground has-disabled:pointer-events-none has-disabled:cursor-not-allowed has-disabled:opacity-50 has-data-[slot=combobox-chip-remove]:pr-0", className);
77
+ $[5] = className;
78
+ $[6] = t2;
79
+ } else {
80
+ t2 = $[6];
81
+ }
82
+ let t3;
83
+ if ($[7] !== showRemove) {
84
+ t3 = showRemove && /*#__PURE__*/_jsx(ComboboxPrimitive.ChipRemove, {
85
+ render: /*#__PURE__*/_jsx(Button, {
86
+ variant: "ghost",
87
+ size: "icon-xs"
88
+ }),
89
+ className: "-ml-1 opacity-50 hover:opacity-100",
90
+ "data-slot": "combobox-chip-remove",
91
+ children: /*#__PURE__*/_jsx(XIcon, {
92
+ className: "pointer-events-none"
93
+ })
94
+ });
95
+ $[7] = showRemove;
96
+ $[8] = t3;
97
+ } else {
98
+ t3 = $[8];
99
+ }
100
+ let t4;
101
+ if ($[9] !== children || $[10] !== props || $[11] !== t2 || $[12] !== t3) {
102
+ t4 = /*#__PURE__*/_jsxs(ComboboxPrimitive.Chip, {
103
+ "data-slot": "combobox-chip",
104
+ className: t2,
105
+ ...props,
106
+ children: [children, t3]
107
+ });
108
+ $[9] = children;
109
+ $[10] = props;
110
+ $[11] = t2;
111
+ $[12] = t3;
112
+ $[13] = t4;
113
+ } else {
114
+ t4 = $[13];
115
+ }
116
+ return t4;
13
117
  }
14
- function ComboboxChipsInput({ className, children, ...props }) {
15
- return (_jsx(ComboboxPrimitive.Input, { "data-slot": "combobox-chip-input", className: cn("min-w-16 flex-1 outline-none", className), ...props }));
118
+ function ComboboxChipsInput(t0) {
119
+ const $ = _c(8);
120
+ let className;
121
+ let props;
122
+ if ($[0] !== t0) {
123
+ const {
124
+ className: t1,
125
+ children,
126
+ ...t2
127
+ } = t0;
128
+ className = t1;
129
+ props = t2;
130
+ $[0] = t0;
131
+ $[1] = className;
132
+ $[2] = props;
133
+ } else {
134
+ className = $[1];
135
+ props = $[2];
136
+ }
137
+ let t1;
138
+ if ($[3] !== className) {
139
+ t1 = cn("min-w-16 flex-1 outline-none", className);
140
+ $[3] = className;
141
+ $[4] = t1;
142
+ } else {
143
+ t1 = $[4];
144
+ }
145
+ let t2;
146
+ if ($[5] !== props || $[6] !== t1) {
147
+ t2 = /*#__PURE__*/_jsx(ComboboxPrimitive.Input, {
148
+ "data-slot": "combobox-chip-input",
149
+ className: t1,
150
+ ...props
151
+ });
152
+ $[5] = props;
153
+ $[6] = t1;
154
+ $[7] = t2;
155
+ } else {
156
+ t2 = $[7];
157
+ }
158
+ return t2;
16
159
  }
17
160
  function useComboboxAnchor() {
18
- return React.useRef(null);
161
+ return React.useRef(null);
19
162
  }
20
163
  export { ComboboxChip, ComboboxChips, ComboboxChipsInput, useComboboxAnchor };