@locusgraph/components 0.2.0 → 0.2.2
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.
- package/dist/action/button-group.js +45 -17
- package/dist/action/button.js +44 -27
- package/dist/action/toggle-group.js +176 -12
- package/dist/action/toggle.js +70 -17
- package/dist/display/avatar.js +118 -7
- package/dist/display/badge.js +33 -20
- package/dist/display/chart/chart-container.js +205 -45
- package/dist/display/chart/chart-legend.js +79 -14
- package/dist/display/chart/chart-tooltip.js +211 -40
- package/dist/display/chat/attachment/attachment-parts.js +56 -13
- package/dist/display/chat/attachment/attachment.js +70 -28
- package/dist/display/chat/bubble.js +80 -37
- package/dist/display/chat/marker.js +44 -15
- package/dist/display/chat/message-scroller.js +276 -14
- package/dist/display/chat/message.js +58 -13
- package/dist/display/content/item.js +134 -47
- package/dist/display/content/kbd.js +19 -5
- package/dist/display/media/aspect-ratio.js +27 -3
- package/dist/display/media/carousel-controls.js +162 -11
- package/dist/display/media/carousel.js +325 -65
- package/dist/display/rule-grid/rule-grid.js +86 -29
- package/dist/display/separator.js +56 -3
- package/dist/display/skeletons/layouts/skeleton-rule-grid.js +30 -6
- package/dist/display/skeletons/layouts/skeleton-table.js +44 -6
- package/dist/display/skeletons/shapes/skeleton-avatar.js +31 -13
- package/dist/display/skeletons/shapes/skeleton-button.js +31 -13
- package/dist/display/skeletons/shapes/skeleton-text.js +25 -7
- package/dist/display/skeletons/skeleton-parts.js +22 -6
- package/dist/display/status/alert.js +44 -18
- package/dist/display/status/empty.js +69 -22
- package/dist/display/status/progress.js +116 -16
- package/dist/display/status/skeleton.js +10 -3
- package/dist/display/status/spinner.js +11 -3
- package/dist/display/table.js +77 -17
- package/dist/feedback/toaster.js +98 -21
- package/dist/form/advanced/calendar-day-button.js +89 -12
- package/dist/form/advanced/calendar.js +349 -56
- package/dist/form/advanced/combobox/combobox-chips.js +151 -8
- package/dist/form/advanced/combobox/combobox-items.js +239 -14
- package/dist/form/advanced/combobox/combobox.js +386 -13
- package/dist/form/advanced/input-otp.js +201 -11
- package/dist/form/choice/checkbox.js +58 -3
- package/dist/form/choice/radio-group.js +94 -5
- package/dist/form/choice/select.js +479 -25
- package/dist/form/choice/slider.js +118 -4
- package/dist/form/choice/switch.js +53 -3
- package/dist/form/field/field-error.js +34 -14
- package/dist/form/field/field-separator.js +19 -3
- package/dist/form/field/field-set.js +21 -5
- package/dist/form/field/field-text.js +28 -7
- package/dist/form/field/field.js +43 -25
- package/dist/form/hook-form/form.js +338 -40
- package/dist/form/input-group.js +297 -47
- package/dist/form/input.js +13 -3
- package/dist/form/label.js +42 -3
- package/dist/form/native-select.js +39 -7
- package/dist/form/textarea.js +11 -3
- package/dist/layout/accordion.js +165 -8
- package/dist/layout/collapsible.js +75 -7
- package/dist/layout/resizable.js +122 -7
- package/dist/layout/scroll/direction.js +25 -3
- package/dist/layout/scroll/scroll-area.js +138 -5
- package/dist/layout/sidebar/sidebar-context.js +184 -51
- package/dist/layout/sidebar/sidebar-menu-sub.js +219 -14
- package/dist/layout/sidebar/sidebar-menu.js +319 -38
- package/dist/layout/sidebar/sidebar-sections.js +369 -22
- package/dist/layout/sidebar/sidebar.js +384 -28
- package/dist/layout/tabs.js +183 -18
- package/dist/layout/use-mobile.js +11 -11
- package/dist/navigation/breadcrumb.js +82 -17
- package/dist/navigation/menubar/menubar-items.js +322 -16
- package/dist/navigation/menubar/menubar-sub.js +125 -7
- package/dist/navigation/menubar/menubar.js +213 -13
- package/dist/navigation/navigation-menu.js +90 -18
- package/dist/navigation/pagination.js +91 -20
- package/dist/overlay/alert-dialog.js +485 -26
- package/dist/overlay/context-menu/context-menu-items.js +322 -16
- package/dist/overlay/context-menu/context-menu-sub.js +125 -7
- package/dist/overlay/context-menu/context-menu.js +140 -11
- package/dist/overlay/dialog.js +405 -24
- package/dist/overlay/floating/command.js +423 -20
- package/dist/overlay/floating/drawer.js +354 -22
- package/dist/overlay/floating/hover-card.js +107 -7
- package/dist/overlay/menu/dropdown-menu-choice.js +149 -7
- package/dist/overlay/menu/dropdown-menu-item.js +174 -9
- package/dist/overlay/menu/dropdown-menu-sub.js +124 -7
- package/dist/overlay/menu/dropdown-menu.js +147 -12
- package/dist/overlay/popover.js +106 -7
- package/dist/overlay/sheet.js +379 -26
- package/dist/overlay/tooltip.js +145 -9
- package/dist/shell/app-header.js +29 -5
- package/dist/shell/app-shell.js +19 -3
- package/dist/shell/breadcrumbs.js +46 -14
- package/dist/shell/docs/docs-header.js +210 -10
- package/dist/shell/docs/docs-shell.js +36 -3
- package/dist/shell/docs/docs-sidebar.js +41 -7
- package/dist/shell/docs/on-this-page.js +78 -7
- package/dist/shell/docs/use-active-section.js +44 -42
- package/dist/shell/navigation/app-sidebar.js +66 -6
- package/dist/shell/navigation/nav-group.js +53 -11
- package/dist/shell/theme-toggle.js +51 -4
- package/package.json +2 -2
|
@@ -1,64 +1,357 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
3
|
-
import {
|
|
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
|
-
|
|
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
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
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
|
-
|
|
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
|
-
|
|
9
|
-
|
|
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(
|
|
12
|
-
|
|
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(
|
|
15
|
-
|
|
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
|
-
|
|
161
|
+
return React.useRef(null);
|
|
19
162
|
}
|
|
20
163
|
export { ComboboxChip, ComboboxChips, ComboboxChipsInput, useComboboxAnchor };
|