@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,4 +1,5 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { c } from "react/compiler-runtime";
2
3
  import { useMemo, useState } from "react";
3
4
  import { ArrowDown, ArrowUp, ArrowUpDown, ChevronDown } from "lucide-react";
4
5
  import { Button } from "./button.js";
@@ -88,12 +89,12 @@ function DataTable({ columns, data, searchKey, searchPlaceholder = 'Search...',
88
89
  }),
89
90
  /*#__PURE__*/ jsx(DropdownMenuContent, {
90
91
  align: "end",
91
- children: table.getAllColumns().filter((column)=>column.getCanHide()).map((column)=>/*#__PURE__*/ jsx(DropdownMenuCheckboxItem, {
92
+ children: table.getAllColumns().filter((column)=>column.getCanHide()).map((column_0)=>/*#__PURE__*/ jsx(DropdownMenuCheckboxItem, {
92
93
  className: "capitalize",
93
- checked: column.getIsVisible(),
94
- onCheckedChange: (value)=>column.toggleVisibility(!!value),
95
- children: column.id
96
- }, column.id))
94
+ checked: column_0.getIsVisible(),
95
+ onCheckedChange: (value_0)=>column_0.toggleVisibility(!!value_0),
96
+ children: column_0.id
97
+ }, column_0.id))
97
98
  })
98
99
  ]
99
100
  })
@@ -110,13 +111,13 @@ function DataTable({ columns, data, searchKey, searchPlaceholder = 'Search...',
110
111
  /*#__PURE__*/ jsx(TableHeader, {
111
112
  children: table.getHeaderGroups().map((headerGroup)=>/*#__PURE__*/ jsx(TableRow, {
112
113
  children: headerGroup.headers.map((header)=>{
113
- const { column } = header;
114
+ const { column: column_1 } = header;
114
115
  return /*#__PURE__*/ jsxs(TableHead, {
115
116
  className: compact ? 'relative h-8 px-2 py-1' : 'relative',
116
117
  style: {
117
- width: resizable ? header.getSize() : 150 !== column.getSize() ? column.getSize() : void 0,
118
- minWidth: column.columnDef.minSize,
119
- maxWidth: column.columnDef.maxSize
118
+ width: resizable ? header.getSize() : 150 !== column_1.getSize() ? column_1.getSize() : void 0,
119
+ minWidth: column_1.columnDef.minSize,
120
+ maxWidth: column_1.columnDef.maxSize
120
121
  },
121
122
  children: [
122
123
  header.isPlaceholder ? null : flexRender(header.column.columnDef.header, header.getContext()),
@@ -137,13 +138,13 @@ function DataTable({ columns, data, searchKey, searchPlaceholder = 'Search...',
137
138
  children: table.getRowModel().rows?.length ? table.getRowModel().rows.map((row)=>/*#__PURE__*/ jsx(TableRow, {
138
139
  "data-state": row.getIsSelected() && 'selected',
139
140
  children: row.getVisibleCells().map((cell)=>{
140
- const { column } = cell;
141
+ const { column: column_2 } = cell;
141
142
  return /*#__PURE__*/ jsx(TableCell, {
142
143
  className: compact ? 'truncate px-2 py-1' : 'truncate',
143
144
  style: {
144
- width: resizable ? cell.column.getSize() : 150 !== column.getSize() ? column.getSize() : void 0,
145
- minWidth: column.columnDef.minSize,
146
- maxWidth: column.columnDef.maxSize
145
+ width: resizable ? cell.column.getSize() : 150 !== column_2.getSize() ? column_2.getSize() : void 0,
146
+ minWidth: column_2.columnDef.minSize,
147
+ maxWidth: column_2.columnDef.maxSize
147
148
  },
148
149
  children: flexRender(cell.column.columnDef.cell, cell.getContext())
149
150
  }, cell.id);
@@ -205,32 +206,68 @@ function DataTable({ columns, data, searchKey, searchPlaceholder = 'Search...',
205
206
  ]
206
207
  });
207
208
  }
208
- function DataTableColumnHeader({ column, title, children }) {
209
- const sorted = column.getIsSorted();
210
- const handleClick = ()=>{
211
- if ('asc' === sorted) column.toggleSorting(true);
212
- else if ('desc' === sorted) column.clearSorting();
213
- else column.toggleSorting(false);
214
- };
215
- return /*#__PURE__*/ jsxs(Button, {
216
- variant: "ghost",
217
- size: "sm",
218
- className: "-ml-3 h-8 data-[state=open]:bg-accent",
219
- onClick: handleClick,
220
- children: [
221
- /*#__PURE__*/ jsx("span", {
222
- children: title
223
- }),
224
- children,
225
- 'asc' === sorted ? /*#__PURE__*/ jsx(ArrowUp, {
226
- className: "ml-2 h-4 w-4"
227
- }) : 'desc' === sorted ? /*#__PURE__*/ jsx(ArrowDown, {
228
- className: "ml-2 h-4 w-4"
229
- }) : /*#__PURE__*/ jsx(ArrowUpDown, {
230
- className: "ml-2 h-4 w-4"
231
- })
232
- ]
233
- });
209
+ function DataTableColumnHeader(t0) {
210
+ const $ = c(14);
211
+ const { column, title, children } = t0;
212
+ let t1;
213
+ if ($[0] !== column) {
214
+ t1 = column.getIsSorted();
215
+ $[0] = column;
216
+ $[1] = t1;
217
+ } else t1 = $[1];
218
+ const sorted = t1;
219
+ let t2;
220
+ if ($[2] !== column || $[3] !== sorted) {
221
+ t2 = ()=>{
222
+ if ("asc" === sorted) column.toggleSorting(true);
223
+ else if ("desc" === sorted) column.clearSorting();
224
+ else column.toggleSorting(false);
225
+ };
226
+ $[2] = column;
227
+ $[3] = sorted;
228
+ $[4] = t2;
229
+ } else t2 = $[4];
230
+ const handleClick = t2;
231
+ let t3;
232
+ if ($[5] !== title) {
233
+ t3 = /*#__PURE__*/ jsx("span", {
234
+ children: title
235
+ });
236
+ $[5] = title;
237
+ $[6] = t3;
238
+ } else t3 = $[6];
239
+ let t4;
240
+ if ($[7] !== sorted) {
241
+ t4 = "asc" === sorted ? /*#__PURE__*/ jsx(ArrowUp, {
242
+ className: "ml-2 h-4 w-4"
243
+ }) : "desc" === sorted ? /*#__PURE__*/ jsx(ArrowDown, {
244
+ className: "ml-2 h-4 w-4"
245
+ }) : /*#__PURE__*/ jsx(ArrowUpDown, {
246
+ className: "ml-2 h-4 w-4"
247
+ });
248
+ $[7] = sorted;
249
+ $[8] = t4;
250
+ } else t4 = $[8];
251
+ let t5;
252
+ if ($[9] !== children || $[10] !== handleClick || $[11] !== t3 || $[12] !== t4) {
253
+ t5 = /*#__PURE__*/ jsxs(Button, {
254
+ variant: "ghost",
255
+ size: "sm",
256
+ className: "-ml-3 h-8 data-[state=open]:bg-accent",
257
+ onClick: handleClick,
258
+ children: [
259
+ t3,
260
+ children,
261
+ t4
262
+ ]
263
+ });
264
+ $[9] = children;
265
+ $[10] = handleClick;
266
+ $[11] = t3;
267
+ $[12] = t4;
268
+ $[13] = t5;
269
+ } else t5 = $[13];
270
+ return t5;
234
271
  }
235
272
  function DataTableSelectColumn() {
236
273
  return {
@@ -29,83 +29,194 @@ __webpack_require__.d(__webpack_exports__, {
29
29
  DateRangePicker: ()=>DateRangePicker
30
30
  });
31
31
  const jsx_runtime_namespaceObject = require("react/jsx-runtime");
32
+ const compiler_runtime_namespaceObject = require("react/compiler-runtime");
32
33
  const external_date_fns_namespaceObject = require("date-fns");
33
34
  const external_lucide_react_namespaceObject = require("lucide-react");
34
35
  const external_button_cjs_namespaceObject = require("./button.cjs");
35
36
  const external_calendar_cjs_namespaceObject = require("./calendar.cjs");
36
37
  const external_popover_cjs_namespaceObject = require("./popover.cjs");
37
38
  const index_cjs_namespaceObject = require("../../lib/index.cjs");
38
- function DatePicker({ value, onValueChange, disabled, placeholder = 'Pick a date', className, calendarProps }) {
39
- return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_popover_cjs_namespaceObject.Popover, {
40
- children: [
41
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_popover_cjs_namespaceObject.PopoverTrigger, {
42
- asChild: true,
43
- children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_button_cjs_namespaceObject.Button, {
44
- variant: "outline",
45
- "aria-label": value ? `Selected date: ${(0, external_date_fns_namespaceObject.format)(value, 'PPP')}` : placeholder,
46
- className: (0, index_cjs_namespaceObject.cn)('w-full justify-start text-left font-normal', !value && 'text-muted-foreground', className),
47
- disabled: disabled,
48
- children: [
49
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.CalendarIcon, {}),
50
- value ? (0, external_date_fns_namespaceObject.format)(value, 'PPP') : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
51
- children: placeholder
52
- })
53
- ]
54
- })
55
- }),
56
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_popover_cjs_namespaceObject.PopoverContent, {
57
- className: "w-auto p-0",
58
- children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_calendar_cjs_namespaceObject.Calendar, {
59
- mode: "single",
60
- selected: value,
61
- onSelect: onValueChange,
62
- initialFocus: true,
63
- ...calendarProps
64
- })
39
+ function DatePicker(t0) {
40
+ const $ = (0, compiler_runtime_namespaceObject.c)(22);
41
+ const { value, onValueChange, disabled, placeholder: t1, className, calendarProps } = t0;
42
+ const placeholder = void 0 === t1 ? "Pick a date" : t1;
43
+ let t2;
44
+ if ($[0] !== placeholder || $[1] !== value) {
45
+ t2 = value ? `Selected date: ${(0, external_date_fns_namespaceObject.format)(value, "PPP")}` : placeholder;
46
+ $[0] = placeholder;
47
+ $[1] = value;
48
+ $[2] = t2;
49
+ } else t2 = $[2];
50
+ const t3 = !value && "text-muted-foreground";
51
+ let t4;
52
+ if ($[3] !== className || $[4] !== t3) {
53
+ t4 = (0, index_cjs_namespaceObject.cn)("w-full justify-start text-left font-normal", t3, className);
54
+ $[3] = className;
55
+ $[4] = t3;
56
+ $[5] = t4;
57
+ } else t4 = $[5];
58
+ let t5;
59
+ if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
60
+ t5 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.CalendarIcon, {});
61
+ $[6] = t5;
62
+ } else t5 = $[6];
63
+ let t6;
64
+ if ($[7] !== placeholder || $[8] !== value) {
65
+ t6 = value ? (0, external_date_fns_namespaceObject.format)(value, "PPP") : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
66
+ children: placeholder
67
+ });
68
+ $[7] = placeholder;
69
+ $[8] = value;
70
+ $[9] = t6;
71
+ } else t6 = $[9];
72
+ let t7;
73
+ if ($[10] !== disabled || $[11] !== t2 || $[12] !== t4 || $[13] !== t6) {
74
+ t7 = /*#__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
+ "aria-label": t2,
79
+ className: t4,
80
+ disabled: disabled,
81
+ children: [
82
+ t5,
83
+ t6
84
+ ]
85
+ })
86
+ });
87
+ $[10] = disabled;
88
+ $[11] = t2;
89
+ $[12] = t4;
90
+ $[13] = t6;
91
+ $[14] = t7;
92
+ } else t7 = $[14];
93
+ let t8;
94
+ if ($[15] !== calendarProps || $[16] !== onValueChange || $[17] !== value) {
95
+ t8 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_popover_cjs_namespaceObject.PopoverContent, {
96
+ className: "w-auto p-0",
97
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_calendar_cjs_namespaceObject.Calendar, {
98
+ mode: "single",
99
+ selected: value,
100
+ onSelect: onValueChange,
101
+ initialFocus: true,
102
+ ...calendarProps
65
103
  })
66
- ]
67
- });
104
+ });
105
+ $[15] = calendarProps;
106
+ $[16] = onValueChange;
107
+ $[17] = value;
108
+ $[18] = t8;
109
+ } else t8 = $[18];
110
+ let t9;
111
+ if ($[19] !== t7 || $[20] !== t8) {
112
+ t9 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_popover_cjs_namespaceObject.Popover, {
113
+ children: [
114
+ t7,
115
+ t8
116
+ ]
117
+ });
118
+ $[19] = t7;
119
+ $[20] = t8;
120
+ $[21] = t9;
121
+ } else t9 = $[21];
122
+ return t9;
68
123
  }
69
- function DateRangePicker({ value, onValueChange, disabled, placeholder = 'Pick a date range', className, calendarProps }) {
70
- return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_popover_cjs_namespaceObject.Popover, {
71
- children: [
72
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_popover_cjs_namespaceObject.PopoverTrigger, {
73
- asChild: true,
74
- children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_button_cjs_namespaceObject.Button, {
75
- variant: "outline",
76
- "aria-label": value?.from ? value.to ? `Selected range: ${(0, external_date_fns_namespaceObject.format)(value.from, 'LLL dd, y')} to ${(0, external_date_fns_namespaceObject.format)(value.to, 'LLL dd, y')}` : `Selected date: ${(0, external_date_fns_namespaceObject.format)(value.from, 'LLL dd, y')}` : placeholder,
77
- className: (0, index_cjs_namespaceObject.cn)('w-[300px] justify-start text-left font-normal', !value && 'text-muted-foreground', className),
78
- disabled: disabled,
79
- children: [
80
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.CalendarIcon, {}),
81
- value?.from ? value.to ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(jsx_runtime_namespaceObject.Fragment, {
82
- children: [
83
- (0, external_date_fns_namespaceObject.format)(value.from, 'LLL dd, y'),
84
- " - ",
85
- (0, external_date_fns_namespaceObject.format)(value.to, 'LLL dd, y')
86
- ]
87
- }) : (0, external_date_fns_namespaceObject.format)(value.from, 'LLL dd, y') : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
88
- children: placeholder
89
- })
90
- ]
91
- })
92
- }),
93
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_popover_cjs_namespaceObject.PopoverContent, {
94
- className: "w-auto p-0",
95
- align: "start",
96
- children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_calendar_cjs_namespaceObject.Calendar, {
97
- initialFocus: true,
98
- mode: "range",
99
- defaultMonth: value?.from,
100
- selected: value,
101
- onSelect: onValueChange,
102
- numberOfMonths: 2,
103
- required: false,
104
- ...calendarProps
105
- })
124
+ function DateRangePicker(t0) {
125
+ const $ = (0, compiler_runtime_namespaceObject.c)(23);
126
+ const { value, onValueChange, disabled, placeholder: t1, className, calendarProps } = t0;
127
+ const placeholder = void 0 === t1 ? "Pick a date range" : t1;
128
+ let t2;
129
+ if ($[0] !== placeholder || $[1] !== value) {
130
+ t2 = value?.from ? value.to ? `Selected range: ${(0, external_date_fns_namespaceObject.format)(value.from, "LLL dd, y")} to ${(0, external_date_fns_namespaceObject.format)(value.to, "LLL dd, y")}` : `Selected date: ${(0, external_date_fns_namespaceObject.format)(value.from, "LLL dd, y")}` : placeholder;
131
+ $[0] = placeholder;
132
+ $[1] = value;
133
+ $[2] = t2;
134
+ } else t2 = $[2];
135
+ const t3 = !value && "text-muted-foreground";
136
+ let t4;
137
+ if ($[3] !== className || $[4] !== t3) {
138
+ t4 = (0, index_cjs_namespaceObject.cn)("w-[300px] justify-start text-left font-normal", t3, className);
139
+ $[3] = className;
140
+ $[4] = t3;
141
+ $[5] = t4;
142
+ } else t4 = $[5];
143
+ let t5;
144
+ if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
145
+ t5 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.CalendarIcon, {});
146
+ $[6] = t5;
147
+ } else t5 = $[6];
148
+ let t6;
149
+ if ($[7] !== placeholder || $[8] !== value) {
150
+ t6 = value?.from ? value.to ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(jsx_runtime_namespaceObject.Fragment, {
151
+ children: [
152
+ (0, external_date_fns_namespaceObject.format)(value.from, "LLL dd, y"),
153
+ " - ",
154
+ (0, external_date_fns_namespaceObject.format)(value.to, "LLL dd, y")
155
+ ]
156
+ }) : (0, external_date_fns_namespaceObject.format)(value.from, "LLL dd, y") : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
157
+ children: placeholder
158
+ });
159
+ $[7] = placeholder;
160
+ $[8] = value;
161
+ $[9] = t6;
162
+ } else t6 = $[9];
163
+ let t7;
164
+ if ($[10] !== disabled || $[11] !== t2 || $[12] !== t4 || $[13] !== t6) {
165
+ t7 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_popover_cjs_namespaceObject.PopoverTrigger, {
166
+ asChild: true,
167
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_button_cjs_namespaceObject.Button, {
168
+ variant: "outline",
169
+ "aria-label": t2,
170
+ className: t4,
171
+ disabled: disabled,
172
+ children: [
173
+ t5,
174
+ t6
175
+ ]
176
+ })
177
+ });
178
+ $[10] = disabled;
179
+ $[11] = t2;
180
+ $[12] = t4;
181
+ $[13] = t6;
182
+ $[14] = t7;
183
+ } else t7 = $[14];
184
+ const t8 = value?.from;
185
+ let t9;
186
+ if ($[15] !== calendarProps || $[16] !== onValueChange || $[17] !== t8 || $[18] !== value) {
187
+ t9 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_popover_cjs_namespaceObject.PopoverContent, {
188
+ className: "w-auto p-0",
189
+ align: "start",
190
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_calendar_cjs_namespaceObject.Calendar, {
191
+ initialFocus: true,
192
+ mode: "range",
193
+ defaultMonth: t8,
194
+ selected: value,
195
+ onSelect: onValueChange,
196
+ numberOfMonths: 2,
197
+ required: false,
198
+ ...calendarProps
106
199
  })
107
- ]
108
- });
200
+ });
201
+ $[15] = calendarProps;
202
+ $[16] = onValueChange;
203
+ $[17] = t8;
204
+ $[18] = value;
205
+ $[19] = t9;
206
+ } else t9 = $[19];
207
+ let t10;
208
+ if ($[20] !== t7 || $[21] !== t9) {
209
+ t10 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_popover_cjs_namespaceObject.Popover, {
210
+ children: [
211
+ t7,
212
+ t9
213
+ ]
214
+ });
215
+ $[20] = t7;
216
+ $[21] = t9;
217
+ $[22] = t10;
218
+ } else t10 = $[22];
219
+ return t10;
109
220
  }
110
221
  exports.DatePicker = __webpack_exports__.DatePicker;
111
222
  exports.DateRangePicker = __webpack_exports__.DateRangePicker;