@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.
Files changed (145) hide show
  1. package/dist/components/forms/field-renderer.cjs +120 -69
  2. package/dist/components/forms/field-renderer.js +120 -69
  3. package/dist/components/forms/form-designer.cjs +2352 -1488
  4. package/dist/components/forms/form-designer.js +2353 -1489
  5. package/dist/components/forms/form-examples.cjs +10 -10
  6. package/dist/components/forms/form-examples.js +10 -10
  7. package/dist/components/forms/form-state-viewer.cjs +988 -433
  8. package/dist/components/forms/form-state-viewer.js +988 -433
  9. package/dist/components/forms/metadata-form.cjs +446 -170
  10. package/dist/components/forms/metadata-form.js +446 -170
  11. package/dist/components/forms/schema-viewer.cjs +173 -80
  12. package/dist/components/forms/schema-viewer.js +173 -80
  13. package/dist/components/ui/accordion.cjs +131 -27
  14. package/dist/components/ui/accordion.js +131 -27
  15. package/dist/components/ui/alert-dialog.cjs +273 -45
  16. package/dist/components/ui/alert-dialog.js +273 -45
  17. package/dist/components/ui/alert.cjs +106 -17
  18. package/dist/components/ui/alert.js +106 -17
  19. package/dist/components/ui/avatar.cjs +100 -15
  20. package/dist/components/ui/avatar.js +100 -15
  21. package/dist/components/ui/badge.cjs +36 -6
  22. package/dist/components/ui/badge.js +36 -6
  23. package/dist/components/ui/breadcrumb.cjs +258 -52
  24. package/dist/components/ui/breadcrumb.js +258 -52
  25. package/dist/components/ui/button-group.cjs +119 -19
  26. package/dist/components/ui/button-group.js +119 -19
  27. package/dist/components/ui/button.cjs +48 -8
  28. package/dist/components/ui/button.js +48 -8
  29. package/dist/components/ui/calendar.cjs +88 -30
  30. package/dist/components/ui/calendar.js +88 -30
  31. package/dist/components/ui/card.cjs +199 -30
  32. package/dist/components/ui/card.js +199 -30
  33. package/dist/components/ui/checkbox.cjs +42 -8
  34. package/dist/components/ui/checkbox.js +42 -8
  35. package/dist/components/ui/combobox.cjs +150 -53
  36. package/dist/components/ui/combobox.js +150 -53
  37. package/dist/components/ui/command.cjs +291 -53
  38. package/dist/components/ui/command.js +291 -53
  39. package/dist/components/ui/context-menu.cjs +370 -72
  40. package/dist/components/ui/context-menu.js +370 -72
  41. package/dist/components/ui/data-table.cjs +76 -39
  42. package/dist/components/ui/data-table.js +76 -39
  43. package/dist/components/ui/date-picker.cjs +179 -68
  44. package/dist/components/ui/date-picker.js +179 -68
  45. package/dist/components/ui/datetime-picker.cjs +225 -104
  46. package/dist/components/ui/datetime-picker.js +225 -104
  47. package/dist/components/ui/dialog.cjs +290 -78
  48. package/dist/components/ui/dialog.js +290 -78
  49. package/dist/components/ui/drawer.cjs +220 -39
  50. package/dist/components/ui/drawer.js +220 -39
  51. package/dist/components/ui/dropdown-menu.cjs +376 -73
  52. package/dist/components/ui/dropdown-menu.js +376 -73
  53. package/dist/components/ui/editable-cell.cjs +106 -42
  54. package/dist/components/ui/editable-cell.js +106 -42
  55. package/dist/components/ui/empty-state.cjs +106 -33
  56. package/dist/components/ui/empty-state.js +106 -33
  57. package/dist/components/ui/file-upload.cjs +405 -187
  58. package/dist/components/ui/file-upload.d.ts +3 -1
  59. package/dist/components/ui/file-upload.js +405 -187
  60. package/dist/components/ui/hover-card.cjs +46 -7
  61. package/dist/components/ui/hover-card.js +46 -7
  62. package/dist/components/ui/index.cjs +4 -4
  63. package/dist/components/ui/input.cjs +39 -6
  64. package/dist/components/ui/input.js +39 -6
  65. package/dist/components/ui/label.cjs +34 -5
  66. package/dist/components/ui/label.js +34 -5
  67. package/dist/components/ui/layout/column.cjs +209 -41
  68. package/dist/components/ui/layout/column.js +209 -41
  69. package/dist/components/ui/layout/grid.cjs +275 -60
  70. package/dist/components/ui/layout/grid.js +275 -60
  71. package/dist/components/ui/layout/row.cjs +209 -41
  72. package/dist/components/ui/layout/row.js +209 -41
  73. package/dist/components/ui/menubar.cjs +540 -106
  74. package/dist/components/ui/menubar.js +540 -106
  75. package/dist/components/ui/multi-select.cjs +289 -135
  76. package/dist/components/ui/multi-select.js +289 -135
  77. package/dist/components/ui/navigation-menu.cjs +244 -47
  78. package/dist/components/ui/navigation-menu.js +244 -47
  79. package/dist/components/ui/pagination.cjs +301 -65
  80. package/dist/components/ui/pagination.js +301 -65
  81. package/dist/components/ui/popover.cjs +48 -9
  82. package/dist/components/ui/popover.js +48 -9
  83. package/dist/components/ui/progress.cjs +48 -8
  84. package/dist/components/ui/progress.js +48 -8
  85. package/dist/components/ui/radio-group.cjs +74 -12
  86. package/dist/components/ui/radio-group.js +74 -12
  87. package/dist/components/ui/resizable.cjs +75 -10
  88. package/dist/components/ui/resizable.js +75 -10
  89. package/dist/components/ui/scroll-area.cjs +113 -21
  90. package/dist/components/ui/scroll-area.js +113 -21
  91. package/dist/components/ui/search.cjs +280 -98
  92. package/dist/components/ui/search.js +280 -98
  93. package/dist/components/ui/select.cjs +334 -68
  94. package/dist/components/ui/select.js +334 -68
  95. package/dist/components/ui/separator.cjs +48 -7
  96. package/dist/components/ui/separator.js +48 -7
  97. package/dist/components/ui/sheet.cjs +236 -50
  98. package/dist/components/ui/sheet.js +236 -50
  99. package/dist/components/ui/skeleton.cjs +31 -5
  100. package/dist/components/ui/skeleton.js +31 -5
  101. package/dist/components/ui/slider.cjs +71 -21
  102. package/dist/components/ui/slider.js +71 -21
  103. package/dist/components/ui/sonner.cjs +43 -15
  104. package/dist/components/ui/sonner.js +43 -15
  105. package/dist/components/ui/spinner.cjs +83 -21
  106. package/dist/components/ui/spinner.js +83 -21
  107. package/dist/components/ui/stats-card.cjs +169 -60
  108. package/dist/components/ui/stats-card.js +169 -60
  109. package/dist/components/ui/stepper.cjs +126 -57
  110. package/dist/components/ui/stepper.js +126 -57
  111. package/dist/components/ui/switch.cjs +42 -8
  112. package/dist/components/ui/switch.js +42 -8
  113. package/dist/components/ui/table.cjs +267 -42
  114. package/dist/components/ui/table.js +267 -42
  115. package/dist/components/ui/tabs.cjs +100 -15
  116. package/dist/components/ui/tabs.js +100 -15
  117. package/dist/components/ui/textarea.cjs +34 -5
  118. package/dist/components/ui/textarea.js +34 -5
  119. package/dist/components/ui/toggle-group.cjs +112 -19
  120. package/dist/components/ui/toggle-group.js +112 -19
  121. package/dist/components/ui/toggle.cjs +43 -6
  122. package/dist/components/ui/toggle.js +43 -6
  123. package/dist/components/ui/tooltip.cjs +40 -6
  124. package/dist/components/ui/tooltip.js +40 -6
  125. package/dist/examples/admin-layout-example.cjs +879 -347
  126. package/dist/examples/admin-layout-example.js +879 -347
  127. package/dist/examples/app-shell-example.cjs +14 -14
  128. package/dist/examples/app-shell-example.js +14 -14
  129. package/dist/examples/dashboard-example.cjs +495 -334
  130. package/dist/examples/dashboard-example.js +495 -334
  131. package/dist/examples/data-management-example.cjs +501 -303
  132. package/dist/examples/data-management-example.js +502 -304
  133. package/dist/examples/flow-editor-layout-example.cjs +435 -231
  134. package/dist/examples/flow-editor-layout-example.js +436 -232
  135. package/dist/examples/flow-start-example.cjs +508 -251
  136. package/dist/examples/flow-start-example.js +509 -252
  137. package/dist/examples/form-builder-example.cjs +1006 -602
  138. package/dist/examples/form-builder-example.js +1007 -603
  139. package/dist/examples/new-project-example.cjs +806 -474
  140. package/dist/examples/new-project-example.js +807 -475
  141. package/dist/examples/settings-example.cjs +792 -704
  142. package/dist/examples/settings-example.js +792 -704
  143. package/dist/examples/vscode-example.cjs +731 -236
  144. package/dist/examples/vscode-example.js +731 -236
  145. 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({ value, onValueChange, disabled, placeholder = 'Pick a date', className, calendarProps }) {
10
- return /*#__PURE__*/ jsxs(Popover, {
11
- children: [
12
- /*#__PURE__*/ jsx(PopoverTrigger, {
13
- asChild: true,
14
- children: /*#__PURE__*/ jsxs(Button, {
15
- variant: "outline",
16
- "aria-label": value ? `Selected date: ${format(value, 'PPP')}` : placeholder,
17
- className: cn('w-full justify-start text-left font-normal', !value && 'text-muted-foreground', className),
18
- disabled: disabled,
19
- children: [
20
- /*#__PURE__*/ jsx(CalendarIcon, {}),
21
- value ? format(value, 'PPP') : /*#__PURE__*/ jsx("span", {
22
- children: placeholder
23
- })
24
- ]
25
- })
26
- }),
27
- /*#__PURE__*/ jsx(PopoverContent, {
28
- className: "w-auto p-0",
29
- children: /*#__PURE__*/ jsx(Calendar, {
30
- mode: "single",
31
- selected: value,
32
- onSelect: onValueChange,
33
- initialFocus: true,
34
- ...calendarProps
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({ value, onValueChange, disabled, placeholder = 'Pick a date range', className, calendarProps }) {
41
- return /*#__PURE__*/ jsxs(Popover, {
42
- children: [
43
- /*#__PURE__*/ jsx(PopoverTrigger, {
44
- asChild: true,
45
- children: /*#__PURE__*/ jsxs(Button, {
46
- variant: "outline",
47
- "aria-label": 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,
48
- className: cn('w-[300px] justify-start text-left font-normal', !value && 'text-muted-foreground', className),
49
- disabled: disabled,
50
- children: [
51
- /*#__PURE__*/ jsx(CalendarIcon, {}),
52
- value?.from ? value.to ? /*#__PURE__*/ jsxs(Fragment, {
53
- children: [
54
- format(value.from, 'LLL dd, y'),
55
- " - ",
56
- format(value.to, 'LLL dd, y')
57
- ]
58
- }) : format(value.from, 'LLL dd, y') : /*#__PURE__*/ jsx("span", {
59
- children: placeholder
60
- })
61
- ]
62
- })
63
- }),
64
- /*#__PURE__*/ jsx(PopoverContent, {
65
- className: "w-auto p-0",
66
- align: "start",
67
- children: /*#__PURE__*/ jsx(Calendar, {
68
- initialFocus: true,
69
- mode: "range",
70
- defaultMonth: value?.from,
71
- selected: value,
72
- onSelect: onValueChange,
73
- numberOfMonths: 2,
74
- required: false,
75
- ...calendarProps
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({ value, onValueChange, disabled, placeholder = 'Pick a date and time', className, use12Hour = false }) {
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
- const [timeValue, setTimeValue] = external_react_namespaceObject.useState(value ? (0, external_date_fns_namespaceObject.format)(value, use12Hour ? 'hh:mm a' : 'HH:mm') : '');
43
- const handleDateSelect = (date)=>{
44
- if (!date) return;
45
- if (selectedDate) {
46
- date.setHours(selectedDate.getHours());
47
- date.setMinutes(selectedDate.getMinutes());
48
- date.setSeconds(selectedDate.getSeconds());
49
- }
50
- setSelectedDate(date);
51
- onValueChange?.(date);
52
- };
53
- const handleTimeChange = (e)=>{
54
- const time = e.target.value;
55
- setTimeValue(time);
56
- if (!selectedDate) return;
57
- const [hours, minutes] = time.split(':').map(Number);
58
- const newDate = new Date(selectedDate);
59
- newDate.setHours(hours);
60
- newDate.setMinutes(minutes);
61
- setSelectedDate(newDate);
62
- onValueChange?.(newDate);
63
- };
64
- const formatDisplayValue = ()=>{
65
- if (!selectedDate) return placeholder;
66
- const datePart = (0, external_date_fns_namespaceObject.format)(selectedDate, 'PPP');
67
- const timePart = (0, external_date_fns_namespaceObject.format)(selectedDate, use12Hour ? 'hh:mm a' : 'HH:mm');
68
- return `${datePart} at ${timePart}`;
69
- };
70
- return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_popover_cjs_namespaceObject.Popover, {
71
- open: open,
72
- onOpenChange: setOpen,
73
- children: [
74
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_popover_cjs_namespaceObject.PopoverTrigger, {
75
- asChild: true,
76
- children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_button_cjs_namespaceObject.Button, {
77
- variant: "outline",
78
- className: (0, index_cjs_namespaceObject.cn)('w-full justify-start text-left font-normal', !selectedDate && 'text-muted-foreground', className),
79
- disabled: disabled,
80
- children: [
81
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.CalendarIcon, {
82
- className: "mr-2 h-4 w-4"
83
- }),
84
- formatDisplayValue()
85
- ]
86
- })
87
- }),
88
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_popover_cjs_namespaceObject.PopoverContent, {
89
- className: "w-auto p-0",
90
- align: "start",
91
- children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
92
- className: "p-3 space-y-3",
93
- children: [
94
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_calendar_cjs_namespaceObject.Calendar, {
95
- mode: "single",
96
- selected: selectedDate,
97
- onSelect: handleDateSelect,
98
- initialFocus: true
99
- }),
100
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
101
- className: "border-t pt-3 space-y-2",
102
- children: [
103
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_label_cjs_namespaceObject.Label, {
104
- className: "text-sm font-medium flex items-center gap-2",
105
- children: [
106
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.Clock, {
107
- className: "h-4 w-4"
108
- }),
109
- "Time"
110
- ]
111
- }),
112
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_input_cjs_namespaceObject.Input, {
113
- type: "time",
114
- value: timeValue,
115
- onChange: handleTimeChange,
116
- className: "w-full"
117
- })
118
- ]
119
- }),
120
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
121
- className: "flex gap-2",
122
- children: [
123
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_button_cjs_namespaceObject.Button, {
124
- variant: "outline",
125
- className: "w-full",
126
- onClick: ()=>{
127
- setSelectedDate(void 0);
128
- setTimeValue('');
129
- onValueChange?.(void 0);
130
- setOpen(false);
131
- },
132
- children: "Clear"
133
- }),
134
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_button_cjs_namespaceObject.Button, {
135
- className: "w-full",
136
- onClick: ()=>setOpen(false),
137
- disabled: !selectedDate,
138
- children: "Done"
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 === [