@uipath/apollo-wind 0.9.0 → 0.10.0-pr257.2a4b17b
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/components/forms/field-renderer.cjs +120 -69
- package/dist/components/forms/field-renderer.js +120 -69
- package/dist/components/forms/form-designer.cjs +2352 -1488
- package/dist/components/forms/form-designer.js +2353 -1489
- package/dist/components/forms/form-examples.cjs +10 -10
- package/dist/components/forms/form-examples.js +10 -10
- package/dist/components/forms/form-state-viewer.cjs +988 -433
- package/dist/components/forms/form-state-viewer.js +988 -433
- package/dist/components/forms/metadata-form.cjs +446 -170
- package/dist/components/forms/metadata-form.js +446 -170
- package/dist/components/forms/schema-viewer.cjs +173 -80
- package/dist/components/forms/schema-viewer.js +173 -80
- package/dist/components/ui/accordion.cjs +131 -27
- package/dist/components/ui/accordion.js +131 -27
- package/dist/components/ui/alert-dialog.cjs +273 -45
- package/dist/components/ui/alert-dialog.js +273 -45
- package/dist/components/ui/alert.cjs +106 -17
- package/dist/components/ui/alert.js +106 -17
- package/dist/components/ui/avatar.cjs +100 -15
- package/dist/components/ui/avatar.js +100 -15
- package/dist/components/ui/badge.cjs +36 -6
- package/dist/components/ui/badge.js +36 -6
- package/dist/components/ui/breadcrumb.cjs +258 -52
- package/dist/components/ui/breadcrumb.js +258 -52
- package/dist/components/ui/button-group.cjs +119 -19
- package/dist/components/ui/button-group.js +119 -19
- package/dist/components/ui/button.cjs +48 -8
- package/dist/components/ui/button.js +48 -8
- package/dist/components/ui/calendar.cjs +88 -30
- package/dist/components/ui/calendar.js +88 -30
- package/dist/components/ui/card.cjs +199 -30
- package/dist/components/ui/card.js +199 -30
- package/dist/components/ui/checkbox.cjs +42 -8
- package/dist/components/ui/checkbox.js +42 -8
- package/dist/components/ui/combobox.cjs +150 -53
- package/dist/components/ui/combobox.js +150 -53
- package/dist/components/ui/command.cjs +291 -53
- package/dist/components/ui/command.js +291 -53
- package/dist/components/ui/context-menu.cjs +370 -72
- package/dist/components/ui/context-menu.js +370 -72
- package/dist/components/ui/data-table.cjs +76 -39
- package/dist/components/ui/data-table.js +76 -39
- package/dist/components/ui/date-picker.cjs +179 -68
- package/dist/components/ui/date-picker.js +179 -68
- package/dist/components/ui/datetime-picker.cjs +225 -104
- package/dist/components/ui/datetime-picker.js +225 -104
- package/dist/components/ui/dialog.cjs +290 -78
- package/dist/components/ui/dialog.js +290 -78
- package/dist/components/ui/drawer.cjs +220 -39
- package/dist/components/ui/drawer.js +220 -39
- package/dist/components/ui/dropdown-menu.cjs +376 -73
- package/dist/components/ui/dropdown-menu.js +376 -73
- package/dist/components/ui/editable-cell.cjs +106 -42
- package/dist/components/ui/editable-cell.js +106 -42
- package/dist/components/ui/empty-state.cjs +106 -33
- package/dist/components/ui/empty-state.js +106 -33
- package/dist/components/ui/file-upload.cjs +405 -187
- package/dist/components/ui/file-upload.d.ts +3 -1
- package/dist/components/ui/file-upload.js +405 -187
- package/dist/components/ui/hover-card.cjs +46 -7
- package/dist/components/ui/hover-card.js +46 -7
- package/dist/components/ui/index.cjs +4 -4
- package/dist/components/ui/input.cjs +39 -6
- package/dist/components/ui/input.js +39 -6
- package/dist/components/ui/label.cjs +34 -5
- package/dist/components/ui/label.js +34 -5
- package/dist/components/ui/layout/column.cjs +209 -41
- package/dist/components/ui/layout/column.js +209 -41
- package/dist/components/ui/layout/grid.cjs +275 -60
- package/dist/components/ui/layout/grid.js +275 -60
- package/dist/components/ui/layout/row.cjs +209 -41
- package/dist/components/ui/layout/row.js +209 -41
- package/dist/components/ui/menubar.cjs +540 -106
- package/dist/components/ui/menubar.js +540 -106
- package/dist/components/ui/multi-select.cjs +289 -135
- package/dist/components/ui/multi-select.js +289 -135
- package/dist/components/ui/navigation-menu.cjs +244 -47
- package/dist/components/ui/navigation-menu.js +244 -47
- package/dist/components/ui/pagination.cjs +301 -65
- package/dist/components/ui/pagination.js +301 -65
- package/dist/components/ui/popover.cjs +48 -9
- package/dist/components/ui/popover.js +48 -9
- package/dist/components/ui/progress.cjs +48 -8
- package/dist/components/ui/progress.js +48 -8
- package/dist/components/ui/radio-group.cjs +74 -12
- package/dist/components/ui/radio-group.js +74 -12
- package/dist/components/ui/resizable.cjs +75 -10
- package/dist/components/ui/resizable.js +75 -10
- package/dist/components/ui/scroll-area.cjs +113 -21
- package/dist/components/ui/scroll-area.js +113 -21
- package/dist/components/ui/search.cjs +280 -98
- package/dist/components/ui/search.js +280 -98
- package/dist/components/ui/select.cjs +334 -68
- package/dist/components/ui/select.js +334 -68
- package/dist/components/ui/separator.cjs +48 -7
- package/dist/components/ui/separator.js +48 -7
- package/dist/components/ui/sheet.cjs +236 -50
- package/dist/components/ui/sheet.js +236 -50
- package/dist/components/ui/skeleton.cjs +31 -5
- package/dist/components/ui/skeleton.js +31 -5
- package/dist/components/ui/slider.cjs +71 -21
- package/dist/components/ui/slider.js +71 -21
- package/dist/components/ui/sonner.cjs +43 -15
- package/dist/components/ui/sonner.js +43 -15
- package/dist/components/ui/spinner.cjs +83 -21
- package/dist/components/ui/spinner.js +83 -21
- package/dist/components/ui/stats-card.cjs +169 -60
- package/dist/components/ui/stats-card.js +169 -60
- package/dist/components/ui/stepper.cjs +126 -57
- package/dist/components/ui/stepper.js +126 -57
- package/dist/components/ui/switch.cjs +42 -8
- package/dist/components/ui/switch.js +42 -8
- package/dist/components/ui/table.cjs +267 -42
- package/dist/components/ui/table.js +267 -42
- package/dist/components/ui/tabs.cjs +100 -15
- package/dist/components/ui/tabs.js +100 -15
- package/dist/components/ui/textarea.cjs +34 -5
- package/dist/components/ui/textarea.js +34 -5
- package/dist/components/ui/toggle-group.cjs +112 -19
- package/dist/components/ui/toggle-group.js +112 -19
- package/dist/components/ui/toggle.cjs +43 -6
- package/dist/components/ui/toggle.js +43 -6
- package/dist/components/ui/tooltip.cjs +40 -6
- package/dist/components/ui/tooltip.js +40 -6
- package/dist/examples/admin-layout-example.cjs +879 -347
- package/dist/examples/admin-layout-example.js +879 -347
- package/dist/examples/app-shell-example.cjs +14 -14
- package/dist/examples/app-shell-example.js +14 -14
- package/dist/examples/dashboard-example.cjs +495 -334
- package/dist/examples/dashboard-example.js +495 -334
- package/dist/examples/data-management-example.cjs +501 -303
- package/dist/examples/data-management-example.js +502 -304
- package/dist/examples/flow-editor-layout-example.cjs +435 -231
- package/dist/examples/flow-editor-layout-example.js +436 -232
- package/dist/examples/flow-start-example.cjs +508 -251
- package/dist/examples/flow-start-example.js +509 -252
- package/dist/examples/form-builder-example.cjs +1006 -602
- package/dist/examples/form-builder-example.js +1007 -603
- package/dist/examples/new-project-example.cjs +806 -474
- package/dist/examples/new-project-example.js +807 -475
- package/dist/examples/settings-example.cjs +792 -704
- package/dist/examples/settings-example.js +792 -704
- package/dist/examples/vscode-example.cjs +731 -236
- package/dist/examples/vscode-example.js +731 -236
- package/package.json +4 -1
|
@@ -1,81 +1,192 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { c } from "react/compiler-runtime";
|
|
3
4
|
import { format } from "date-fns";
|
|
4
5
|
import { CalendarIcon } from "lucide-react";
|
|
5
6
|
import { Button } from "./button.js";
|
|
6
7
|
import { Calendar } from "./calendar.js";
|
|
7
8
|
import { Popover, PopoverContent, PopoverTrigger } from "./popover.js";
|
|
8
9
|
import { cn } from "../../lib/index.js";
|
|
9
|
-
function DatePicker(
|
|
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
|
-
|
|
10
|
+
function DatePicker(t0) {
|
|
11
|
+
const $ = c(22);
|
|
12
|
+
const { value, onValueChange, disabled, placeholder: t1, className, calendarProps } = t0;
|
|
13
|
+
const placeholder = void 0 === t1 ? "Pick a date" : t1;
|
|
14
|
+
let t2;
|
|
15
|
+
if ($[0] !== placeholder || $[1] !== value) {
|
|
16
|
+
t2 = value ? `Selected date: ${format(value, "PPP")}` : placeholder;
|
|
17
|
+
$[0] = placeholder;
|
|
18
|
+
$[1] = value;
|
|
19
|
+
$[2] = t2;
|
|
20
|
+
} else t2 = $[2];
|
|
21
|
+
const t3 = !value && "text-muted-foreground";
|
|
22
|
+
let t4;
|
|
23
|
+
if ($[3] !== className || $[4] !== t3) {
|
|
24
|
+
t4 = cn("w-full justify-start text-left font-normal", t3, className);
|
|
25
|
+
$[3] = className;
|
|
26
|
+
$[4] = t3;
|
|
27
|
+
$[5] = t4;
|
|
28
|
+
} else t4 = $[5];
|
|
29
|
+
let t5;
|
|
30
|
+
if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
|
|
31
|
+
t5 = /*#__PURE__*/ jsx(CalendarIcon, {});
|
|
32
|
+
$[6] = t5;
|
|
33
|
+
} else t5 = $[6];
|
|
34
|
+
let t6;
|
|
35
|
+
if ($[7] !== placeholder || $[8] !== value) {
|
|
36
|
+
t6 = value ? format(value, "PPP") : /*#__PURE__*/ jsx("span", {
|
|
37
|
+
children: placeholder
|
|
38
|
+
});
|
|
39
|
+
$[7] = placeholder;
|
|
40
|
+
$[8] = value;
|
|
41
|
+
$[9] = t6;
|
|
42
|
+
} else t6 = $[9];
|
|
43
|
+
let t7;
|
|
44
|
+
if ($[10] !== disabled || $[11] !== t2 || $[12] !== t4 || $[13] !== t6) {
|
|
45
|
+
t7 = /*#__PURE__*/ jsx(PopoverTrigger, {
|
|
46
|
+
asChild: true,
|
|
47
|
+
children: /*#__PURE__*/ jsxs(Button, {
|
|
48
|
+
variant: "outline",
|
|
49
|
+
"aria-label": t2,
|
|
50
|
+
className: t4,
|
|
51
|
+
disabled: disabled,
|
|
52
|
+
children: [
|
|
53
|
+
t5,
|
|
54
|
+
t6
|
|
55
|
+
]
|
|
36
56
|
})
|
|
37
|
-
|
|
38
|
-
|
|
57
|
+
});
|
|
58
|
+
$[10] = disabled;
|
|
59
|
+
$[11] = t2;
|
|
60
|
+
$[12] = t4;
|
|
61
|
+
$[13] = t6;
|
|
62
|
+
$[14] = t7;
|
|
63
|
+
} else t7 = $[14];
|
|
64
|
+
let t8;
|
|
65
|
+
if ($[15] !== calendarProps || $[16] !== onValueChange || $[17] !== value) {
|
|
66
|
+
t8 = /*#__PURE__*/ jsx(PopoverContent, {
|
|
67
|
+
className: "w-auto p-0",
|
|
68
|
+
children: /*#__PURE__*/ jsx(Calendar, {
|
|
69
|
+
mode: "single",
|
|
70
|
+
selected: value,
|
|
71
|
+
onSelect: onValueChange,
|
|
72
|
+
initialFocus: true,
|
|
73
|
+
...calendarProps
|
|
74
|
+
})
|
|
75
|
+
});
|
|
76
|
+
$[15] = calendarProps;
|
|
77
|
+
$[16] = onValueChange;
|
|
78
|
+
$[17] = value;
|
|
79
|
+
$[18] = t8;
|
|
80
|
+
} else t8 = $[18];
|
|
81
|
+
let t9;
|
|
82
|
+
if ($[19] !== t7 || $[20] !== t8) {
|
|
83
|
+
t9 = /*#__PURE__*/ jsxs(Popover, {
|
|
84
|
+
children: [
|
|
85
|
+
t7,
|
|
86
|
+
t8
|
|
87
|
+
]
|
|
88
|
+
});
|
|
89
|
+
$[19] = t7;
|
|
90
|
+
$[20] = t8;
|
|
91
|
+
$[21] = t9;
|
|
92
|
+
} else t9 = $[21];
|
|
93
|
+
return t9;
|
|
39
94
|
}
|
|
40
|
-
function DateRangePicker(
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
95
|
+
function DateRangePicker(t0) {
|
|
96
|
+
const $ = c(23);
|
|
97
|
+
const { value, onValueChange, disabled, placeholder: t1, className, calendarProps } = t0;
|
|
98
|
+
const placeholder = void 0 === t1 ? "Pick a date range" : t1;
|
|
99
|
+
let t2;
|
|
100
|
+
if ($[0] !== placeholder || $[1] !== value) {
|
|
101
|
+
t2 = value?.from ? value.to ? `Selected range: ${format(value.from, "LLL dd, y")} to ${format(value.to, "LLL dd, y")}` : `Selected date: ${format(value.from, "LLL dd, y")}` : placeholder;
|
|
102
|
+
$[0] = placeholder;
|
|
103
|
+
$[1] = value;
|
|
104
|
+
$[2] = t2;
|
|
105
|
+
} else t2 = $[2];
|
|
106
|
+
const t3 = !value && "text-muted-foreground";
|
|
107
|
+
let t4;
|
|
108
|
+
if ($[3] !== className || $[4] !== t3) {
|
|
109
|
+
t4 = cn("w-[300px] justify-start text-left font-normal", t3, className);
|
|
110
|
+
$[3] = className;
|
|
111
|
+
$[4] = t3;
|
|
112
|
+
$[5] = t4;
|
|
113
|
+
} else t4 = $[5];
|
|
114
|
+
let t5;
|
|
115
|
+
if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
|
|
116
|
+
t5 = /*#__PURE__*/ jsx(CalendarIcon, {});
|
|
117
|
+
$[6] = t5;
|
|
118
|
+
} else t5 = $[6];
|
|
119
|
+
let t6;
|
|
120
|
+
if ($[7] !== placeholder || $[8] !== value) {
|
|
121
|
+
t6 = value?.from ? value.to ? /*#__PURE__*/ jsxs(Fragment, {
|
|
122
|
+
children: [
|
|
123
|
+
format(value.from, "LLL dd, y"),
|
|
124
|
+
" - ",
|
|
125
|
+
format(value.to, "LLL dd, y")
|
|
126
|
+
]
|
|
127
|
+
}) : format(value.from, "LLL dd, y") : /*#__PURE__*/ jsx("span", {
|
|
128
|
+
children: placeholder
|
|
129
|
+
});
|
|
130
|
+
$[7] = placeholder;
|
|
131
|
+
$[8] = value;
|
|
132
|
+
$[9] = t6;
|
|
133
|
+
} else t6 = $[9];
|
|
134
|
+
let t7;
|
|
135
|
+
if ($[10] !== disabled || $[11] !== t2 || $[12] !== t4 || $[13] !== t6) {
|
|
136
|
+
t7 = /*#__PURE__*/ jsx(PopoverTrigger, {
|
|
137
|
+
asChild: true,
|
|
138
|
+
children: /*#__PURE__*/ jsxs(Button, {
|
|
139
|
+
variant: "outline",
|
|
140
|
+
"aria-label": t2,
|
|
141
|
+
className: t4,
|
|
142
|
+
disabled: disabled,
|
|
143
|
+
children: [
|
|
144
|
+
t5,
|
|
145
|
+
t6
|
|
146
|
+
]
|
|
147
|
+
})
|
|
148
|
+
});
|
|
149
|
+
$[10] = disabled;
|
|
150
|
+
$[11] = t2;
|
|
151
|
+
$[12] = t4;
|
|
152
|
+
$[13] = t6;
|
|
153
|
+
$[14] = t7;
|
|
154
|
+
} else t7 = $[14];
|
|
155
|
+
const t8 = value?.from;
|
|
156
|
+
let t9;
|
|
157
|
+
if ($[15] !== calendarProps || $[16] !== onValueChange || $[17] !== t8 || $[18] !== value) {
|
|
158
|
+
t9 = /*#__PURE__*/ jsx(PopoverContent, {
|
|
159
|
+
className: "w-auto p-0",
|
|
160
|
+
align: "start",
|
|
161
|
+
children: /*#__PURE__*/ jsx(Calendar, {
|
|
162
|
+
initialFocus: true,
|
|
163
|
+
mode: "range",
|
|
164
|
+
defaultMonth: t8,
|
|
165
|
+
selected: value,
|
|
166
|
+
onSelect: onValueChange,
|
|
167
|
+
numberOfMonths: 2,
|
|
168
|
+
required: false,
|
|
169
|
+
...calendarProps
|
|
77
170
|
})
|
|
78
|
-
|
|
79
|
-
|
|
171
|
+
});
|
|
172
|
+
$[15] = calendarProps;
|
|
173
|
+
$[16] = onValueChange;
|
|
174
|
+
$[17] = t8;
|
|
175
|
+
$[18] = value;
|
|
176
|
+
$[19] = t9;
|
|
177
|
+
} else t9 = $[19];
|
|
178
|
+
let t10;
|
|
179
|
+
if ($[20] !== t7 || $[21] !== t9) {
|
|
180
|
+
t10 = /*#__PURE__*/ jsxs(Popover, {
|
|
181
|
+
children: [
|
|
182
|
+
t7,
|
|
183
|
+
t9
|
|
184
|
+
]
|
|
185
|
+
});
|
|
186
|
+
$[20] = t7;
|
|
187
|
+
$[21] = t9;
|
|
188
|
+
$[22] = t10;
|
|
189
|
+
} else t10 = $[22];
|
|
190
|
+
return t10;
|
|
80
191
|
}
|
|
81
192
|
export { DatePicker, DateRangePicker };
|
|
@@ -27,6 +27,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
27
27
|
DateTimePicker: ()=>DateTimePicker
|
|
28
28
|
});
|
|
29
29
|
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
30
|
+
const compiler_runtime_namespaceObject = require("react/compiler-runtime");
|
|
30
31
|
const external_react_namespaceObject = require("react");
|
|
31
32
|
const external_date_fns_namespaceObject = require("date-fns");
|
|
32
33
|
const external_lucide_react_namespaceObject = require("lucide-react");
|
|
@@ -36,114 +37,234 @@ const external_popover_cjs_namespaceObject = require("./popover.cjs");
|
|
|
36
37
|
const external_input_cjs_namespaceObject = require("./input.cjs");
|
|
37
38
|
const external_label_cjs_namespaceObject = require("./label.cjs");
|
|
38
39
|
const index_cjs_namespaceObject = require("../../lib/index.cjs");
|
|
39
|
-
function DateTimePicker(
|
|
40
|
+
function DateTimePicker(t0) {
|
|
41
|
+
const $ = (0, compiler_runtime_namespaceObject.c)(46);
|
|
42
|
+
const { value, onValueChange, disabled, placeholder: t1, className, use12Hour: t2 } = t0;
|
|
43
|
+
const placeholder = void 0 === t1 ? "Pick a date and time" : t1;
|
|
44
|
+
const use12Hour = void 0 === t2 ? false : t2;
|
|
40
45
|
const [open, setOpen] = external_react_namespaceObject.useState(false);
|
|
41
46
|
const [selectedDate, setSelectedDate] = external_react_namespaceObject.useState(value);
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
onValueChange
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
47
|
+
let t3;
|
|
48
|
+
if ($[0] !== use12Hour || $[1] !== value) {
|
|
49
|
+
t3 = value ? (0, external_date_fns_namespaceObject.format)(value, use12Hour ? "hh:mm a" : "HH:mm") : "";
|
|
50
|
+
$[0] = use12Hour;
|
|
51
|
+
$[1] = value;
|
|
52
|
+
$[2] = t3;
|
|
53
|
+
} else t3 = $[2];
|
|
54
|
+
const [timeValue, setTimeValue] = external_react_namespaceObject.useState(t3);
|
|
55
|
+
let t4;
|
|
56
|
+
if ($[3] !== onValueChange || $[4] !== selectedDate) {
|
|
57
|
+
t4 = (date)=>{
|
|
58
|
+
if (!date) return;
|
|
59
|
+
if (selectedDate) {
|
|
60
|
+
date.setHours(selectedDate.getHours());
|
|
61
|
+
date.setMinutes(selectedDate.getMinutes());
|
|
62
|
+
date.setSeconds(selectedDate.getSeconds());
|
|
63
|
+
}
|
|
64
|
+
setSelectedDate(date);
|
|
65
|
+
onValueChange?.(date);
|
|
66
|
+
};
|
|
67
|
+
$[3] = onValueChange;
|
|
68
|
+
$[4] = selectedDate;
|
|
69
|
+
$[5] = t4;
|
|
70
|
+
} else t4 = $[5];
|
|
71
|
+
const handleDateSelect = t4;
|
|
72
|
+
let t5;
|
|
73
|
+
if ($[6] !== onValueChange || $[7] !== selectedDate) {
|
|
74
|
+
t5 = (e)=>{
|
|
75
|
+
const time = e.target.value;
|
|
76
|
+
setTimeValue(time);
|
|
77
|
+
if (!selectedDate) return;
|
|
78
|
+
const [hours, minutes] = time.split(":").map(Number);
|
|
79
|
+
const newDate = new Date(selectedDate);
|
|
80
|
+
newDate.setHours(hours);
|
|
81
|
+
newDate.setMinutes(minutes);
|
|
82
|
+
setSelectedDate(newDate);
|
|
83
|
+
onValueChange?.(newDate);
|
|
84
|
+
};
|
|
85
|
+
$[6] = onValueChange;
|
|
86
|
+
$[7] = selectedDate;
|
|
87
|
+
$[8] = t5;
|
|
88
|
+
} else t5 = $[8];
|
|
89
|
+
const handleTimeChange = t5;
|
|
90
|
+
let t6;
|
|
91
|
+
if ($[9] !== placeholder || $[10] !== selectedDate || $[11] !== use12Hour) {
|
|
92
|
+
t6 = ()=>{
|
|
93
|
+
if (!selectedDate) return placeholder;
|
|
94
|
+
const datePart = (0, external_date_fns_namespaceObject.format)(selectedDate, "PPP");
|
|
95
|
+
const timePart = (0, external_date_fns_namespaceObject.format)(selectedDate, use12Hour ? "hh:mm a" : "HH:mm");
|
|
96
|
+
return `${datePart} at ${timePart}`;
|
|
97
|
+
};
|
|
98
|
+
$[9] = placeholder;
|
|
99
|
+
$[10] = selectedDate;
|
|
100
|
+
$[11] = use12Hour;
|
|
101
|
+
$[12] = t6;
|
|
102
|
+
} else t6 = $[12];
|
|
103
|
+
const formatDisplayValue = t6;
|
|
104
|
+
const t7 = !selectedDate && "text-muted-foreground";
|
|
105
|
+
let t8;
|
|
106
|
+
if ($[13] !== className || $[14] !== t7) {
|
|
107
|
+
t8 = (0, index_cjs_namespaceObject.cn)("w-full justify-start text-left font-normal", t7, className);
|
|
108
|
+
$[13] = className;
|
|
109
|
+
$[14] = t7;
|
|
110
|
+
$[15] = t8;
|
|
111
|
+
} else t8 = $[15];
|
|
112
|
+
let t9;
|
|
113
|
+
if ($[16] === Symbol.for("react.memo_cache_sentinel")) {
|
|
114
|
+
t9 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.CalendarIcon, {
|
|
115
|
+
className: "mr-2 h-4 w-4"
|
|
116
|
+
});
|
|
117
|
+
$[16] = t9;
|
|
118
|
+
} else t9 = $[16];
|
|
119
|
+
let t10;
|
|
120
|
+
if ($[17] !== formatDisplayValue) {
|
|
121
|
+
t10 = formatDisplayValue();
|
|
122
|
+
$[17] = formatDisplayValue;
|
|
123
|
+
$[18] = t10;
|
|
124
|
+
} else t10 = $[18];
|
|
125
|
+
let t11;
|
|
126
|
+
if ($[19] !== disabled || $[20] !== t10 || $[21] !== t8) {
|
|
127
|
+
t11 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_popover_cjs_namespaceObject.PopoverTrigger, {
|
|
128
|
+
asChild: true,
|
|
129
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_button_cjs_namespaceObject.Button, {
|
|
130
|
+
variant: "outline",
|
|
131
|
+
className: t8,
|
|
132
|
+
disabled: disabled,
|
|
133
|
+
children: [
|
|
134
|
+
t9,
|
|
135
|
+
t10
|
|
136
|
+
]
|
|
137
|
+
})
|
|
138
|
+
});
|
|
139
|
+
$[19] = disabled;
|
|
140
|
+
$[20] = t10;
|
|
141
|
+
$[21] = t8;
|
|
142
|
+
$[22] = t11;
|
|
143
|
+
} else t11 = $[22];
|
|
144
|
+
let t12;
|
|
145
|
+
if ($[23] !== handleDateSelect || $[24] !== selectedDate) {
|
|
146
|
+
t12 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_calendar_cjs_namespaceObject.Calendar, {
|
|
147
|
+
mode: "single",
|
|
148
|
+
selected: selectedDate,
|
|
149
|
+
onSelect: handleDateSelect,
|
|
150
|
+
initialFocus: true
|
|
151
|
+
});
|
|
152
|
+
$[23] = handleDateSelect;
|
|
153
|
+
$[24] = selectedDate;
|
|
154
|
+
$[25] = t12;
|
|
155
|
+
} else t12 = $[25];
|
|
156
|
+
let t13;
|
|
157
|
+
if ($[26] === Symbol.for("react.memo_cache_sentinel")) {
|
|
158
|
+
t13 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_label_cjs_namespaceObject.Label, {
|
|
159
|
+
className: "text-sm font-medium flex items-center gap-2",
|
|
160
|
+
children: [
|
|
161
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.Clock, {
|
|
162
|
+
className: "h-4 w-4"
|
|
163
|
+
}),
|
|
164
|
+
"Time"
|
|
165
|
+
]
|
|
166
|
+
});
|
|
167
|
+
$[26] = t13;
|
|
168
|
+
} else t13 = $[26];
|
|
169
|
+
let t14;
|
|
170
|
+
if ($[27] !== handleTimeChange || $[28] !== timeValue) {
|
|
171
|
+
t14 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
172
|
+
className: "border-t pt-3 space-y-2",
|
|
173
|
+
children: [
|
|
174
|
+
t13,
|
|
175
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_input_cjs_namespaceObject.Input, {
|
|
176
|
+
type: "time",
|
|
177
|
+
value: timeValue,
|
|
178
|
+
onChange: handleTimeChange,
|
|
179
|
+
className: "w-full"
|
|
143
180
|
})
|
|
181
|
+
]
|
|
182
|
+
});
|
|
183
|
+
$[27] = handleTimeChange;
|
|
184
|
+
$[28] = timeValue;
|
|
185
|
+
$[29] = t14;
|
|
186
|
+
} else t14 = $[29];
|
|
187
|
+
let t15;
|
|
188
|
+
if ($[30] !== onValueChange) {
|
|
189
|
+
t15 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_button_cjs_namespaceObject.Button, {
|
|
190
|
+
variant: "outline",
|
|
191
|
+
className: "w-full",
|
|
192
|
+
onClick: ()=>{
|
|
193
|
+
setSelectedDate(void 0);
|
|
194
|
+
setTimeValue("");
|
|
195
|
+
onValueChange?.(void 0);
|
|
196
|
+
setOpen(false);
|
|
197
|
+
},
|
|
198
|
+
children: "Clear"
|
|
199
|
+
});
|
|
200
|
+
$[30] = onValueChange;
|
|
201
|
+
$[31] = t15;
|
|
202
|
+
} else t15 = $[31];
|
|
203
|
+
let t16;
|
|
204
|
+
if ($[32] === Symbol.for("react.memo_cache_sentinel")) {
|
|
205
|
+
t16 = ()=>setOpen(false);
|
|
206
|
+
$[32] = t16;
|
|
207
|
+
} else t16 = $[32];
|
|
208
|
+
const t17 = !selectedDate;
|
|
209
|
+
let t18;
|
|
210
|
+
if ($[33] !== t17) {
|
|
211
|
+
t18 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_button_cjs_namespaceObject.Button, {
|
|
212
|
+
className: "w-full",
|
|
213
|
+
onClick: t16,
|
|
214
|
+
disabled: t17,
|
|
215
|
+
children: "Done"
|
|
216
|
+
});
|
|
217
|
+
$[33] = t17;
|
|
218
|
+
$[34] = t18;
|
|
219
|
+
} else t18 = $[34];
|
|
220
|
+
let t19;
|
|
221
|
+
if ($[35] !== t15 || $[36] !== t18) {
|
|
222
|
+
t19 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
223
|
+
className: "flex gap-2",
|
|
224
|
+
children: [
|
|
225
|
+
t15,
|
|
226
|
+
t18
|
|
227
|
+
]
|
|
228
|
+
});
|
|
229
|
+
$[35] = t15;
|
|
230
|
+
$[36] = t18;
|
|
231
|
+
$[37] = t19;
|
|
232
|
+
} else t19 = $[37];
|
|
233
|
+
let t20;
|
|
234
|
+
if ($[38] !== t12 || $[39] !== t14 || $[40] !== t19) {
|
|
235
|
+
t20 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_popover_cjs_namespaceObject.PopoverContent, {
|
|
236
|
+
className: "w-auto p-0",
|
|
237
|
+
align: "start",
|
|
238
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
239
|
+
className: "p-3 space-y-3",
|
|
240
|
+
children: [
|
|
241
|
+
t12,
|
|
242
|
+
t14,
|
|
243
|
+
t19
|
|
244
|
+
]
|
|
144
245
|
})
|
|
145
|
-
|
|
146
|
-
|
|
246
|
+
});
|
|
247
|
+
$[38] = t12;
|
|
248
|
+
$[39] = t14;
|
|
249
|
+
$[40] = t19;
|
|
250
|
+
$[41] = t20;
|
|
251
|
+
} else t20 = $[41];
|
|
252
|
+
let t21;
|
|
253
|
+
if ($[42] !== open || $[43] !== t11 || $[44] !== t20) {
|
|
254
|
+
t21 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_popover_cjs_namespaceObject.Popover, {
|
|
255
|
+
open: open,
|
|
256
|
+
onOpenChange: setOpen,
|
|
257
|
+
children: [
|
|
258
|
+
t11,
|
|
259
|
+
t20
|
|
260
|
+
]
|
|
261
|
+
});
|
|
262
|
+
$[42] = open;
|
|
263
|
+
$[43] = t11;
|
|
264
|
+
$[44] = t20;
|
|
265
|
+
$[45] = t21;
|
|
266
|
+
} else t21 = $[45];
|
|
267
|
+
return t21;
|
|
147
268
|
}
|
|
148
269
|
exports.DateTimePicker = __webpack_exports__.DateTimePicker;
|
|
149
270
|
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|