@datum-cloud/datum-ui 2.0.0 → 2.3.0

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 (80) hide show
  1. package/dist/app-navigation/index.mjs +2 -2
  2. package/dist/{app-navigation-CNig4Maj.mjs → app-navigation--tEBCrfl.mjs} +180 -164
  3. package/dist/autocomplete/index.mjs +1 -1
  4. package/dist/{autocomplete-DM6JYV4W.mjs → autocomplete-DZ_HSBak.mjs} +1 -1
  5. package/dist/autosearch/index.mjs +1 -1
  6. package/dist/{calendar-date-picker-AzvSqjeS.mjs → calendar-date-picker-ynSGADfR.mjs} +1 -1
  7. package/dist/components/base/sheet/sheet.d.ts +2 -1
  8. package/dist/components/base/sidebar/context.d.ts +3 -0
  9. package/dist/components/base/sidebar/shell.d.ts +2 -2
  10. package/dist/components/features/app-navigation/nav-menu/index.d.ts +1 -1
  11. package/dist/components/features/app-navigation/nav-menu/nav-menu-context.d.ts +4 -0
  12. package/dist/components/features/app-navigation/nav-menu/nav-menu-item.d.ts +3 -0
  13. package/dist/components/features/app-navigation/nav-menu/types.d.ts +18 -0
  14. package/dist/components/features/date-time/date-time.d.ts +6 -0
  15. package/dist/components/features/date-time/formatters.d.ts +13 -0
  16. package/dist/components/features/date-time/index.d.ts +3 -0
  17. package/dist/components/features/date-time/types.d.ts +47 -0
  18. package/dist/components/features/index.d.ts +1 -0
  19. package/dist/components/features/logs/components/detail.d.ts +3 -0
  20. package/dist/components/features/logs/components/explorer.d.ts +3 -0
  21. package/dist/components/features/logs/components/filters.d.ts +11 -0
  22. package/dist/components/features/logs/components/root.d.ts +2 -0
  23. package/dist/components/features/logs/components/status-badge.d.ts +7 -0
  24. package/dist/components/features/logs/components/table.d.ts +3 -0
  25. package/dist/components/features/logs/components/toolbar.d.ts +12 -0
  26. package/dist/components/features/logs/fixtures/index.d.ts +2 -0
  27. package/dist/components/features/logs/hooks/use-controllable-state.d.ts +5 -0
  28. package/dist/components/features/logs/hooks/use-logs.d.ts +3 -0
  29. package/dist/components/features/logs/index.d.ts +4 -0
  30. package/dist/components/features/logs/logs.d.ts +18 -0
  31. package/dist/components/features/logs/types.d.ts +105 -0
  32. package/dist/components/features/logs/utils/build-logql.d.ts +2 -0
  33. package/dist/components/features/logs/utils/constants.d.ts +6 -0
  34. package/dist/components/features/logs/utils/facets.d.ts +3 -0
  35. package/dist/components/features/logs/utils/flatten-loki.d.ts +3 -0
  36. package/dist/components/features/logs/utils/format-timestamp.d.ts +4 -0
  37. package/dist/components/features/logs/utils/index.d.ts +8 -0
  38. package/dist/components/features/logs/utils/parse-log-line.d.ts +7 -0
  39. package/dist/components/features/logs/utils/severity.d.ts +5 -0
  40. package/dist/components/features/logs/utils/time-range.d.ts +3 -0
  41. package/dist/data-table/index.mjs +1 -1
  42. package/dist/{data-table-DjGvAdO_.mjs → data-table-Du7_FLBi.mjs} +4 -4
  43. package/dist/date-picker/index.mjs +3 -3
  44. package/dist/date-time/index.mjs +2 -0
  45. package/dist/date-time-CA-09lnw.mjs +134 -0
  46. package/dist/date-time-picker/index.mjs +1 -1
  47. package/dist/{date-time-picker-D3-DeNo8.mjs → date-time-picker-BzcHrf-A.mjs} +1 -1
  48. package/dist/{picker-b5-x-EHs.mjs → date-time-range-picker-Dog33Ry0.mjs} +22 -456
  49. package/dist/form/index.mjs +1 -1
  50. package/dist/{form-BUUNQfC9.mjs → form-BhBsoMFA.mjs} +4 -4
  51. package/dist/grouped-table/index.mjs +1 -1
  52. package/dist/{grouped-table-D4J3ioHb.mjs → grouped-table--jejU1Jy.mjs} +1 -1
  53. package/dist/index.mjs +21 -20
  54. package/dist/logs/fixtures/index.mjs +231 -0
  55. package/dist/logs/index.mjs +980 -0
  56. package/dist/mobile-sheet/index.mjs +1 -1
  57. package/dist/{mobile-sheet-D9L-JOee.mjs → mobile-sheet-BYp-QQmn.mjs} +1 -1
  58. package/dist/more-actions/index.mjs +1 -1
  59. package/dist/{more-actions-Bx443Ccx.mjs → more-actions-B1FUf2rm.mjs} +1 -1
  60. package/dist/multi-select/index.mjs +1 -1
  61. package/dist/{multi-select-PHaMEbY-.mjs → multi-select-PtdMChPF.mjs} +1 -1
  62. package/dist/picker/index.mjs +2 -1
  63. package/dist/picker-raVuDxsh.mjs +453 -0
  64. package/dist/responsive-dropdown/index.mjs +1 -1
  65. package/dist/{responsive-dropdown-fCmduKaz.mjs → responsive-dropdown-n0Txkax5.mjs} +1 -1
  66. package/dist/responsive-popover/index.mjs +1 -1
  67. package/dist/{responsive-popover-DJZgXWIE.mjs → responsive-popover-C_1nzIvm.mjs} +1 -1
  68. package/dist/rich-text-editor/index.mjs +1 -1
  69. package/dist/{rich-text-editor-CGuSn8xi.mjs → rich-text-editor-Dohp-pbf.mjs} +1 -1
  70. package/dist/sheet/index.mjs +1 -1
  71. package/dist/{sheet-BZViad2U.mjs → sheet-C2i2k5i2.mjs} +2 -2
  72. package/dist/sidebar/index.mjs +1 -1
  73. package/dist/{sidebar-BRUNOqXi.mjs → sidebar-D6BoAr6C.mjs} +53 -16
  74. package/dist/styles/shadcn/animations.css +2 -2
  75. package/dist/task-queue/index.mjs +1 -1
  76. package/dist/{task-queue-dropdown-pqFd4rSf.mjs → task-queue-dropdown-ClLLTMxU.mjs} +1 -1
  77. package/dist/time-picker/index.mjs +1 -1
  78. package/dist/{time-picker-B_fN5vhO.mjs → time-picker-CFhaHTtI.mjs} +1 -1
  79. package/dist/{to-api-format-43Boq7OR.mjs → to-api-format-WC7b9Mcv.mjs} +2 -2
  80. package/package.json +16 -1
@@ -1,2 +1,2 @@
1
- import { i as useInSheet, n as MobileSheet, r as InSheetContext, t as ResponsiveSheetTrigger } from "../mobile-sheet-D9L-JOee.mjs";
1
+ import { i as useInSheet, n as MobileSheet, r as InSheetContext, t as ResponsiveSheetTrigger } from "../mobile-sheet-BYp-QQmn.mjs";
2
2
  export { InSheetContext, MobileSheet, ResponsiveSheetTrigger, useInSheet };
@@ -1,6 +1,6 @@
1
1
  import { t as cn } from "./utils-Bu32wN-x.mjs";
2
2
  import { a as SheetHeader, o as SheetTitle, r as SheetDescription } from "./sheet-DXCZyMHI.mjs";
3
- import { r as SheetContent, t as Sheet } from "./sheet-BZViad2U.mjs";
3
+ import { r as SheetContent, t as Sheet } from "./sheet-C2i2k5i2.mjs";
4
4
  import { createContext, use } from "react";
5
5
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
6
6
  import { Slot } from "@radix-ui/react-slot";
@@ -1,3 +1,3 @@
1
1
  import { t as ActionRow } from "../action-row-DTvs91_3.mjs";
2
- import { t as MoreActions } from "../more-actions-Bx443Ccx.mjs";
2
+ import { t as MoreActions } from "../more-actions-B1FUf2rm.mjs";
3
3
  export { ActionRow, MoreActions };
@@ -1,6 +1,6 @@
1
1
  import { t as cn } from "./utils-Bu32wN-x.mjs";
2
2
  import { t as Button } from "./button-A1qTjZ8U.mjs";
3
- import { t as ResponsiveDropdown } from "./responsive-dropdown-fCmduKaz.mjs";
3
+ import { t as ResponsiveDropdown } from "./responsive-dropdown-n0Txkax5.mjs";
4
4
  import { t as Tooltip } from "./tooltip-C_SL1imw.mjs";
5
5
  import { t as ActionRow } from "./action-row-DTvs91_3.mjs";
6
6
  import { Ellipsis } from "lucide-react";
@@ -1,2 +1,2 @@
1
- import { t as MultiSelect } from "../multi-select-PHaMEbY-.mjs";
1
+ import { t as MultiSelect } from "../multi-select-PtdMChPF.mjs";
2
2
  export { MultiSelect };
@@ -2,7 +2,7 @@ import { t as cn } from "./utils-Bu32wN-x.mjs";
2
2
  import { t as Badge } from "./badge-BTNW_FEU.mjs";
3
3
  import { t as Separator } from "./separator-vbPD_WFQ.mjs";
4
4
  import { t as useControllableState } from "./use-controllable-state-Dna7u3r9.mjs";
5
- import { t as ResponsivePopover } from "./responsive-popover-DJZgXWIE.mjs";
5
+ import { t as ResponsivePopover } from "./responsive-popover-C_1nzIvm.mjs";
6
6
  import { t as LoaderOverlay } from "./loader-overlay-DD94azZX.mjs";
7
7
  import { n as OptionList, t as useOptionPicker } from "./use-option-picker-s2bUYwXC.mjs";
8
8
  import { cva } from "class-variance-authority";
@@ -1,2 +1,3 @@
1
- import { $ as isRangeMode, A as resolveCommit, B as PickerContext, C as DATE_PRESETS, D as formatTimeLabel, E as dateToYYYYMMDD, F as PickerClear, G as getTimezoneOffset, H as formatInTimezone, I as PickerFooter, J as ALLOWED_STEPS, K as isoToZonedDate, L as PickerReset, M as PickerPresets, N as PickerApply, O as isValidTimeString, P as PickerCancel, Q as isDateBearingMode, R as PickerContent, S as DATETIME_PRESETS, T as usePickerState, U as formatTimezoneLabel, V as usePickerContext, W as getBrowserTimezone, X as RANGE_MODES, Y as DATE_BEARING_MODES, Z as TIME_BEARING_MODES, _ as PickerTimezoneSelect, a as DateRangeTimePicker, b as useTimeSlots, c as clampRange, d as formatPickerValue, et as isTimeBearingMode, f as isSameDate, g as PickerTrigger, h as Picker, i as DateTimePicker, j as useKeyboardShortcuts, k as parseTimeString, l as getDaysDifference, m as isSameStringRange, n as TimePicker, o as DateRangePicker, p as isSameDateRange, q as zonedDateToIso, r as DateTimeRangePicker, s as DatePicker, t as TimeRangePicker, u as isRangeValid, v as PickerTimezoneIndicator, w as getDefaultPresets, x as usePresets, y as PickerTimeInput, z as PickerCalendar } from "../picker-b5-x-EHs.mjs";
1
+ import { A as formatInTimezone, B as isDateBearingMode, C as PickerClear, D as PickerCalendar, E as PickerContent, F as zonedDateToIso, H as isTimeBearingMode, I as ALLOWED_STEPS, L as DATE_BEARING_MODES, M as getBrowserTimezone, N as getTimezoneOffset, O as PickerContext, P as isoToZonedDate, R as RANGE_MODES, S as PickerCancel, T as PickerReset, V as isRangeMode, _ as parseTimeString, a as PickerTimezoneIndicator, b as PickerPresets, d as DATE_PRESETS, f as getDefaultPresets, g as isValidTimeString, h as formatTimeLabel, i as PickerTrigger, j as formatTimezoneLabel, k as usePickerContext, l as usePresets, m as dateToYYYYMMDD, o as PickerTimeInput, p as usePickerState, r as formatPickerValue, s as useTimeSlots, t as DateTimeRangePicker, u as DATETIME_PRESETS, v as resolveCommit, w as PickerFooter, x as PickerApply, y as useKeyboardShortcuts, z as TIME_BEARING_MODES } from "../date-time-range-picker-Dog33Ry0.mjs";
2
+ import { a as DateRangePicker, c as getDaysDifference, d as isSameDateRange, f as isSameStringRange, i as DateRangeTimePicker, l as isRangeValid, m as PickerTimezoneSelect, n as TimePicker, o as DatePicker, p as Picker, r as DateTimePicker, s as clampRange, t as TimeRangePicker, u as isSameDate } from "../picker-raVuDxsh.mjs";
2
3
  export { ALLOWED_STEPS, DATETIME_PRESETS, DATE_BEARING_MODES, DATE_PRESETS, DatePicker, DateRangePicker, DateRangeTimePicker, DateTimePicker, DateTimeRangePicker, Picker, PickerApply, PickerCalendar, PickerCancel, PickerClear, PickerContent, PickerContext, PickerFooter, PickerPresets, PickerReset, PickerTimeInput, PickerTimezoneIndicator, PickerTimezoneSelect, PickerTrigger, RANGE_MODES, TIME_BEARING_MODES, TimePicker, TimeRangePicker, clampRange, dateToYYYYMMDD, formatInTimezone, formatPickerValue, formatTimeLabel, formatTimezoneLabel, getBrowserTimezone, getDaysDifference, getDefaultPresets, getTimezoneOffset, isDateBearingMode, isRangeMode, isRangeValid, isSameDate, isSameDateRange, isSameStringRange, isTimeBearingMode, isValidTimeString, isoToZonedDate, parseTimeString, resolveCommit, useKeyboardShortcuts, usePickerContext, usePickerState, usePresets, useTimeSlots, zonedDateToIso };
@@ -0,0 +1,453 @@
1
+ import { t as cn } from "./utils-Bu32wN-x.mjs";
2
+ import { i as SelectItem, l as SelectTrigger, n as SelectContent, t as Select, u as SelectValue } from "./select-daE2Nn0Z.mjs";
3
+ import { C as PickerClear, D as PickerCalendar, E as PickerContent, F as zonedDateToIso, H as isTimeBearingMode, P as isoToZonedDate, S as PickerCancel, T as PickerReset, _ as parseTimeString, a as PickerTimezoneIndicator, b as PickerPresets, c as Picker$1, i as PickerTrigger, k as usePickerContext, n as DefaultFooter, o as PickerTimeInput, r as formatPickerValue, w as PickerFooter, x as PickerApply } from "./date-time-range-picker-Dog33Ry0.mjs";
4
+ import { Clock, Globe } from "lucide-react";
5
+ import { useEffect, useState } from "react";
6
+ import { jsx, jsxs } from "react/jsx-runtime";
7
+ import { addDays, differenceInCalendarDays } from "date-fns";
8
+ //#region src/components/features/picker/components/timezone-select.tsx
9
+ function PickerTimezoneSelect({ options, onChange, className, placeholder = "Select timezone" }) {
10
+ const { mode, timezone } = usePickerContext();
11
+ if (!isTimeBearingMode(mode)) return null;
12
+ return /* @__PURE__ */ jsxs("div", {
13
+ "data-slot": "picker-tz-select",
14
+ className: cn("flex items-center gap-2 px-3 py-2", className),
15
+ children: [/* @__PURE__ */ jsx(Globe, { className: "text-muted-foreground size-4 shrink-0" }), /* @__PURE__ */ jsxs(Select, {
16
+ value: timezone,
17
+ onValueChange: onChange,
18
+ children: [/* @__PURE__ */ jsx(SelectTrigger, {
19
+ className: "hover:bg-accent h-8 min-w-[180px] border-0 bg-transparent px-2 text-xs shadow-none",
20
+ children: /* @__PURE__ */ jsx(SelectValue, { placeholder })
21
+ }), /* @__PURE__ */ jsx(SelectContent, { children: options.map((opt) => /* @__PURE__ */ jsx(SelectItem, {
22
+ value: opt.value,
23
+ className: "text-xs",
24
+ children: opt.label
25
+ }, opt.value)) })]
26
+ })]
27
+ });
28
+ }
29
+ PickerTimezoneSelect.displayName = "Picker.TimezoneSelect";
30
+ //#endregion
31
+ //#region src/components/features/picker/components/index.ts
32
+ const Picker = Object.assign(Picker$1, {
33
+ Trigger: PickerTrigger,
34
+ Content: PickerContent,
35
+ Calendar: PickerCalendar,
36
+ TimeInput: PickerTimeInput,
37
+ Presets: PickerPresets,
38
+ Footer: PickerFooter,
39
+ Apply: PickerApply,
40
+ Reset: PickerReset,
41
+ Cancel: PickerCancel,
42
+ Clear: PickerClear,
43
+ TimezoneIndicator: PickerTimezoneIndicator,
44
+ TimezoneSelect: PickerTimezoneSelect
45
+ });
46
+ //#endregion
47
+ //#region src/components/features/picker/utils/compare.ts
48
+ /** Strict equality of two nullable Date references by millisecond value. */
49
+ function isSameDate(a, b) {
50
+ if (a === b) return true;
51
+ if (a === null || b === null) return false;
52
+ return a.getTime() === b.getTime();
53
+ }
54
+ /** Equality of two nullable date ranges. Compares from, to (by ms), and preset. */
55
+ function isSameDateRange(a, b) {
56
+ if (a === b) return true;
57
+ if (a === null || b === null) return false;
58
+ return a.from.getTime() === b.from.getTime() && a.to.getTime() === b.to.getTime() && a.preset === b.preset;
59
+ }
60
+ /**
61
+ * Equality of two nullable string ranges. Used for time-of-day, time-range,
62
+ * and datetime-range value shapes (all structurally identical).
63
+ * Compares from, to, and optional preset.
64
+ */
65
+ function isSameStringRange(a, b) {
66
+ if (a === b) return true;
67
+ if (a === null || b === null) return false;
68
+ return a.from === b.from && a.to === b.to && a.preset === b.preset;
69
+ }
70
+ //#endregion
71
+ //#region src/components/features/picker/utils/range.ts
72
+ /**
73
+ * Number of calendar days between two dates. Always non-negative.
74
+ *
75
+ * Uses calendar-day boundaries (not 24-hour windows), so a range from
76
+ * 23:59 today to 00:00 tomorrow counts as 1 day, not 0.
77
+ */
78
+ function getDaysDifference(from, to) {
79
+ return Math.abs(differenceInCalendarDays(to, from));
80
+ }
81
+ /**
82
+ * Validate a range against a maximum span (inclusive).
83
+ *
84
+ * - Returns `true` when `maxRange` is undefined.
85
+ * - Returns `true` when the range spans at most `maxRange` days.
86
+ */
87
+ function isRangeValid(from, to, maxRange) {
88
+ if (maxRange === void 0) return true;
89
+ return getDaysDifference(from, to) <= maxRange;
90
+ }
91
+ /**
92
+ * Clamp a range to fit within `maxRange` days.
93
+ *
94
+ * If the range already fits, returns the original `{from, to}`.
95
+ * Otherwise, holds `from` and clamps `to` forward to exactly `maxRange`
96
+ * days after `from`.
97
+ */
98
+ function clampRange(from, to, maxRange) {
99
+ if (isRangeValid(from, to, maxRange)) return {
100
+ from,
101
+ to
102
+ };
103
+ return {
104
+ from,
105
+ to: addDays(from, maxRange)
106
+ };
107
+ }
108
+ //#endregion
109
+ //#region src/components/features/picker/wrappers/date-picker.tsx
110
+ function DatePicker({ value, onChange, placeholder = "Pick a date", clearable = true, responsive = true, sheetTitle = "Pick a date", numberOfMonths = 1, triggerLabel, icon, disabled, className, triggerClassName, popoverClassName, id, sheetDescription, modal, commit, disablePast, disableFuture, minDate, maxDate, dateFormat }) {
111
+ return /* @__PURE__ */ jsx(Picker$1.Root, {
112
+ mode: "date",
113
+ value,
114
+ onChange,
115
+ commit,
116
+ responsive,
117
+ presets: [],
118
+ disablePast,
119
+ disableFuture,
120
+ minDate,
121
+ maxDate,
122
+ children: /* @__PURE__ */ jsx(PickerContent, {
123
+ trigger: /* @__PURE__ */ jsx(PickerTrigger, {
124
+ placeholder,
125
+ clearable,
126
+ disabled,
127
+ className,
128
+ triggerClassName,
129
+ id,
130
+ icon,
131
+ children: (v) => triggerLabel ? triggerLabel(v) : formatPickerValue(v, "date", { dateFormat })
132
+ }),
133
+ sheetTitle,
134
+ sheetDescription,
135
+ modal,
136
+ contentClassName: popoverClassName,
137
+ footer: /* @__PURE__ */ jsx(DefaultFooter, {}),
138
+ children: /* @__PURE__ */ jsx(PickerCalendar, {
139
+ numberOfMonths,
140
+ minDate,
141
+ maxDate,
142
+ disablePast,
143
+ disableFuture
144
+ })
145
+ })
146
+ });
147
+ }
148
+ DatePicker.displayName = "DatePicker";
149
+ //#endregion
150
+ //#region src/components/features/picker/wrappers/date-range-picker.tsx
151
+ function DateRangePicker({ value, onChange, placeholder = "Pick a date range", clearable = true, responsive = true, sheetTitle = "Pick a date range", numberOfMonths = 2, triggerLabel, icon, disabled, className, triggerClassName, popoverClassName, id, sheetDescription, modal, commit, disablePast, disableFuture, minDate, maxDate, presets, excludePresets, dateFormat }) {
152
+ return /* @__PURE__ */ jsx(Picker$1.Root, {
153
+ mode: "date-range",
154
+ value,
155
+ onChange,
156
+ commit,
157
+ responsive,
158
+ presets,
159
+ excludePresets,
160
+ disablePast,
161
+ disableFuture,
162
+ minDate,
163
+ maxDate,
164
+ children: /* @__PURE__ */ jsx(PickerContent, {
165
+ trigger: /* @__PURE__ */ jsx(PickerTrigger, {
166
+ placeholder,
167
+ clearable,
168
+ disabled,
169
+ className,
170
+ triggerClassName,
171
+ id,
172
+ icon,
173
+ children: (v) => triggerLabel ? triggerLabel(v) : formatPickerValue(v, "date-range", { dateFormat })
174
+ }),
175
+ sheetTitle,
176
+ sheetDescription,
177
+ modal,
178
+ contentClassName: popoverClassName,
179
+ footer: /* @__PURE__ */ jsx(DefaultFooter, {}),
180
+ children: /* @__PURE__ */ jsxs("div", {
181
+ className: "flex flex-col md:flex-row",
182
+ children: [/* @__PURE__ */ jsx(PickerPresets, {}), /* @__PURE__ */ jsx(PickerCalendar, {
183
+ numberOfMonths,
184
+ minDate,
185
+ maxDate,
186
+ disablePast,
187
+ disableFuture
188
+ })]
189
+ })
190
+ })
191
+ });
192
+ }
193
+ DateRangePicker.displayName = "DateRangePicker";
194
+ //#endregion
195
+ //#region src/components/features/picker/wrappers/date-range-time-picker.tsx
196
+ function DateRangeTimePicker({ value, onChange, placeholder = "Pick a date range with time", clearable = true, responsive = true, sheetTitle = "Pick a date range with time", timezone, step = 15, hourCycle, numberOfMonths = 2, hideTimezone = false, triggerLabel, icon, disabled, className, triggerClassName, popoverClassName, id, sheetDescription, modal, disablePast, disableFuture, minDate, maxDate, presets, excludePresets, dateFormat, timeFormat }) {
197
+ return /* @__PURE__ */ jsx(Picker$1.Root, {
198
+ mode: "date-range-time",
199
+ value,
200
+ onChange,
201
+ responsive,
202
+ timezone,
203
+ step,
204
+ hourCycle,
205
+ hideTimezone,
206
+ presets,
207
+ excludePresets,
208
+ disablePast,
209
+ disableFuture,
210
+ minDate,
211
+ maxDate,
212
+ children: /* @__PURE__ */ jsx(PickerContent, {
213
+ trigger: /* @__PURE__ */ jsx(PickerTrigger, {
214
+ placeholder,
215
+ clearable,
216
+ disabled,
217
+ className,
218
+ triggerClassName,
219
+ id,
220
+ icon,
221
+ children: (v) => triggerLabel ? triggerLabel(v) : formatPickerValue(v, "date-range-time", {
222
+ timezone,
223
+ hourCycle,
224
+ dateFormat,
225
+ timeFormat
226
+ })
227
+ }),
228
+ sheetTitle,
229
+ sheetDescription,
230
+ modal,
231
+ contentClassName: popoverClassName,
232
+ footer: /* @__PURE__ */ jsx(DefaultFooter, {}),
233
+ children: /* @__PURE__ */ jsxs("div", {
234
+ className: "flex flex-col md:flex-row",
235
+ children: [/* @__PURE__ */ jsx(PickerPresets, {}), /* @__PURE__ */ jsxs("div", {
236
+ className: "flex flex-col",
237
+ children: [
238
+ /* @__PURE__ */ jsx(PickerCalendar, {
239
+ numberOfMonths,
240
+ minDate,
241
+ maxDate,
242
+ disablePast,
243
+ disableFuture
244
+ }),
245
+ /* @__PURE__ */ jsxs("div", {
246
+ className: "border-t p-3",
247
+ children: [/* @__PURE__ */ jsx("div", {
248
+ className: "text-muted-foreground mb-1 text-xs",
249
+ children: "Time of day"
250
+ }), /* @__PURE__ */ jsx(PickerTimeInput, { target: "embedded-from" })]
251
+ }),
252
+ /* @__PURE__ */ jsx(PickerTimezoneIndicator, {})
253
+ ]
254
+ })]
255
+ })
256
+ })
257
+ });
258
+ }
259
+ DateRangeTimePicker.displayName = "DateRangeTimePicker";
260
+ //#endregion
261
+ //#region src/components/features/picker/components/time-input-field.tsx
262
+ function formatZonedTimeOfDay(iso, tz) {
263
+ try {
264
+ const d = isoToZonedDate(iso, tz);
265
+ if (Number.isNaN(d.getTime())) return "";
266
+ return `${String(d.getHours()).padStart(2, "0")}:${String(d.getMinutes()).padStart(2, "0")}`;
267
+ } catch {
268
+ return "";
269
+ }
270
+ }
271
+ function PickerTimeInputField({ className, ariaLabel = "Select time", id }) {
272
+ const { mode, timezone, state, actions } = usePickerContext();
273
+ const isoValue = mode === "datetime" ? state.pendingValue : null;
274
+ const externalTimeValue = isoValue ? formatZonedTimeOfDay(isoValue, timezone) : "";
275
+ const [localValue, setLocalValue] = useState(externalTimeValue);
276
+ useEffect(() => {
277
+ setLocalValue(externalTimeValue);
278
+ }, [externalTimeValue]);
279
+ if (mode !== "datetime") return null;
280
+ const disabled = isoValue === null;
281
+ const handleChange = (e) => {
282
+ const next = e.target.value;
283
+ setLocalValue(next);
284
+ if (!isoValue) return;
285
+ const parsed = parseTimeString(next);
286
+ if (!parsed) return;
287
+ const d = isoToZonedDate(isoValue, timezone);
288
+ d.setHours(parsed.h, parsed.m, 0, 0);
289
+ actions.setSingleDatetime(zonedDateToIso(d, timezone));
290
+ };
291
+ return /* @__PURE__ */ jsx("input", {
292
+ type: "text",
293
+ id,
294
+ "aria-label": ariaLabel,
295
+ value: localValue,
296
+ onChange: handleChange,
297
+ disabled,
298
+ className: cn("border-input-border bg-input-background/50 h-10 w-full rounded-lg border px-3 text-sm", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", "disabled:cursor-not-allowed disabled:opacity-50", className)
299
+ });
300
+ }
301
+ PickerTimeInputField.displayName = "Picker.TimeInputField";
302
+ //#endregion
303
+ //#region src/components/features/picker/wrappers/date-time-picker.tsx
304
+ function DateTimePicker({ value, onChange, placeholder = "Pick a date & time", clearable = true, responsive = true, sheetTitle = "Pick a date & time", timezone, step = 15, hourCycle, numberOfMonths = 1, hideTimezone = false, timeInputMode = "slot", timezoneIndicatorVariant = "full", triggerLabel, icon, disabled, className, triggerClassName, popoverClassName, id, sheetDescription, modal, disablePast, disableFuture, minDate, maxDate, dateFormat, timeFormat }) {
305
+ return /* @__PURE__ */ jsx(Picker$1.Root, {
306
+ mode: "datetime",
307
+ value,
308
+ onChange,
309
+ responsive,
310
+ timezone,
311
+ step,
312
+ hourCycle,
313
+ hideTimezone,
314
+ presets: [],
315
+ disablePast,
316
+ disableFuture,
317
+ minDate,
318
+ maxDate,
319
+ children: /* @__PURE__ */ jsx(PickerContent, {
320
+ trigger: /* @__PURE__ */ jsx(PickerTrigger, {
321
+ placeholder,
322
+ clearable,
323
+ disabled,
324
+ className,
325
+ triggerClassName,
326
+ id,
327
+ icon,
328
+ children: (v) => triggerLabel ? triggerLabel(v) : formatPickerValue(v, "datetime", {
329
+ timezone,
330
+ hourCycle,
331
+ dateFormat,
332
+ timeFormat
333
+ })
334
+ }),
335
+ sheetTitle,
336
+ sheetDescription,
337
+ modal,
338
+ contentClassName: popoverClassName,
339
+ footer: /* @__PURE__ */ jsx(DefaultFooter, {}),
340
+ children: /* @__PURE__ */ jsxs("div", {
341
+ className: "flex flex-col",
342
+ children: [
343
+ /* @__PURE__ */ jsx(PickerCalendar, {
344
+ numberOfMonths,
345
+ minDate,
346
+ maxDate,
347
+ disablePast,
348
+ disableFuture
349
+ }),
350
+ /* @__PURE__ */ jsx("div", {
351
+ className: "border-t p-3",
352
+ children: timeInputMode === "input" ? /* @__PURE__ */ jsx(PickerTimeInputField, {}) : /* @__PURE__ */ jsx(PickerTimeInput, { target: "embedded-from" })
353
+ }),
354
+ /* @__PURE__ */ jsx(PickerTimezoneIndicator, { variant: timezoneIndicatorVariant })
355
+ ]
356
+ })
357
+ })
358
+ });
359
+ }
360
+ DateTimePicker.displayName = "DateTimePicker";
361
+ //#endregion
362
+ //#region src/components/features/picker/wrappers/time-picker.tsx
363
+ const DEFAULT_TIME_ICON$1 = /* @__PURE__ */ jsx(Clock, { className: "text-muted-foreground size-4 shrink-0" });
364
+ function TimePicker({ value, onChange, placeholder = "Pick a time", clearable = true, responsive = true, sheetTitle = "Pick a time", step = 15, hourCycle, minTime, maxTime, timeFormat, triggerLabel, icon, disabled, className, triggerClassName, popoverClassName, id, sheetDescription, modal, commit }) {
365
+ return /* @__PURE__ */ jsx(Picker$1.Root, {
366
+ mode: "time",
367
+ value,
368
+ onChange,
369
+ commit,
370
+ responsive,
371
+ step,
372
+ hourCycle,
373
+ children: /* @__PURE__ */ jsx(PickerContent, {
374
+ trigger: /* @__PURE__ */ jsx(PickerTrigger, {
375
+ placeholder,
376
+ clearable,
377
+ disabled,
378
+ className,
379
+ triggerClassName,
380
+ id,
381
+ icon: icon ?? DEFAULT_TIME_ICON$1,
382
+ children: (v) => triggerLabel ? triggerLabel(v) : formatPickerValue(v, "time", {
383
+ hourCycle,
384
+ timeFormat
385
+ })
386
+ }),
387
+ sheetTitle,
388
+ sheetDescription,
389
+ modal,
390
+ contentClassName: popoverClassName,
391
+ footer: /* @__PURE__ */ jsx(DefaultFooter, {}),
392
+ children: /* @__PURE__ */ jsx(PickerTimeInput, {
393
+ target: "single",
394
+ min: minTime,
395
+ max: maxTime
396
+ })
397
+ })
398
+ });
399
+ }
400
+ TimePicker.displayName = "TimePicker";
401
+ //#endregion
402
+ //#region src/components/features/picker/wrappers/time-range-picker.tsx
403
+ const DEFAULT_TIME_ICON = /* @__PURE__ */ jsx(Clock, { className: "text-muted-foreground size-4 shrink-0" });
404
+ function TimeRangePicker({ value, onChange, placeholder = "Pick a time range", clearable = true, responsive = true, sheetTitle = "Pick a time range", step = 15, hourCycle, timeFormat, triggerLabel, icon, disabled, className, triggerClassName, popoverClassName, id, sheetDescription, modal, commit }) {
405
+ return /* @__PURE__ */ jsx(Picker$1.Root, {
406
+ mode: "time-range",
407
+ value,
408
+ onChange,
409
+ commit,
410
+ responsive,
411
+ step,
412
+ hourCycle,
413
+ children: /* @__PURE__ */ jsx(PickerContent, {
414
+ trigger: /* @__PURE__ */ jsx(PickerTrigger, {
415
+ placeholder,
416
+ clearable,
417
+ disabled,
418
+ className,
419
+ triggerClassName,
420
+ id,
421
+ icon: icon ?? DEFAULT_TIME_ICON,
422
+ children: (v) => triggerLabel ? triggerLabel(v) : formatPickerValue(v, "time-range", {
423
+ hourCycle,
424
+ timeFormat
425
+ })
426
+ }),
427
+ sheetTitle,
428
+ sheetDescription,
429
+ modal,
430
+ contentClassName: popoverClassName,
431
+ footer: /* @__PURE__ */ jsx(DefaultFooter, {}),
432
+ children: /* @__PURE__ */ jsxs("div", {
433
+ className: "flex gap-2 p-3",
434
+ children: [/* @__PURE__ */ jsxs("div", {
435
+ className: "flex-1",
436
+ children: [/* @__PURE__ */ jsx("div", {
437
+ className: "text-muted-foreground mb-1 text-xs",
438
+ children: "From"
439
+ }), /* @__PURE__ */ jsx(PickerTimeInput, { target: "range-from" })]
440
+ }), /* @__PURE__ */ jsxs("div", {
441
+ className: "flex-1",
442
+ children: [/* @__PURE__ */ jsx("div", {
443
+ className: "text-muted-foreground mb-1 text-xs",
444
+ children: "To"
445
+ }), /* @__PURE__ */ jsx(PickerTimeInput, { target: "range-to" })]
446
+ })]
447
+ })
448
+ })
449
+ });
450
+ }
451
+ TimeRangePicker.displayName = "TimeRangePicker";
452
+ //#endregion
453
+ export { DateRangePicker as a, getDaysDifference as c, isSameDateRange as d, isSameStringRange as f, DateRangeTimePicker as i, isRangeValid as l, PickerTimezoneSelect as m, TimePicker as n, DatePicker as o, Picker as p, DateTimePicker as r, clampRange as s, TimeRangePicker as t, isSameDate as u };
@@ -1,2 +1,2 @@
1
- import { t as ResponsiveDropdown } from "../responsive-dropdown-fCmduKaz.mjs";
1
+ import { t as ResponsiveDropdown } from "../responsive-dropdown-n0Txkax5.mjs";
2
2
  export { ResponsiveDropdown };
@@ -1,5 +1,5 @@
1
1
  import { t as cn } from "./utils-Bu32wN-x.mjs";
2
- import { i as useInSheet, t as ResponsiveSheetTrigger } from "./mobile-sheet-D9L-JOee.mjs";
2
+ import { i as useInSheet, t as ResponsiveSheetTrigger } from "./mobile-sheet-BYp-QQmn.mjs";
3
3
  import { Popover, PopoverContent, PopoverTrigger } from "./popover/index.mjs";
4
4
  import { t as useBreakpoint } from "./use-breakpoint-CwiUJSmk.mjs";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -1,2 +1,2 @@
1
- import { t as ResponsivePopover } from "../responsive-popover-DJZgXWIE.mjs";
1
+ import { t as ResponsivePopover } from "../responsive-popover-C_1nzIvm.mjs";
2
2
  export { ResponsivePopover };
@@ -1,5 +1,5 @@
1
1
  import { t as cn } from "./utils-Bu32wN-x.mjs";
2
- import { i as useInSheet, t as ResponsiveSheetTrigger } from "./mobile-sheet-D9L-JOee.mjs";
2
+ import { i as useInSheet, t as ResponsiveSheetTrigger } from "./mobile-sheet-BYp-QQmn.mjs";
3
3
  import { Popover, PopoverContent, PopoverTrigger } from "./popover/index.mjs";
4
4
  import { t as useBreakpoint } from "./use-breakpoint-CwiUJSmk.mjs";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -1,2 +1,2 @@
1
- import { n as useRichTextEditor, r as RichTextContent, t as RichTextEditor } from "../rich-text-editor-CGuSn8xi.mjs";
1
+ import { n as useRichTextEditor, r as RichTextContent, t as RichTextEditor } from "../rich-text-editor-Dohp-pbf.mjs";
2
2
  export { RichTextContent, RichTextEditor, useRichTextEditor };
@@ -2,7 +2,7 @@ import { t as cn } from "./utils-Bu32wN-x.mjs";
2
2
  import { t as Button } from "./button-A1qTjZ8U.mjs";
3
3
  import { t as Icon } from "./icon-wrapper-DKfJlJd0.mjs";
4
4
  import { t as Input } from "./input-j4tbmYYz.mjs";
5
- import { t as ResponsivePopover } from "./responsive-popover-DJZgXWIE.mjs";
5
+ import { t as ResponsivePopover } from "./responsive-popover-C_1nzIvm.mjs";
6
6
  import { t as Tooltip } from "./tooltip-C_SL1imw.mjs";
7
7
  import { BoldIcon, ItalicIcon, LinkIcon, StrikethroughIcon, UnderlineIcon, UnlinkIcon } from "lucide-react";
8
8
  import { createContext, use, useCallback, useEffect, useState } from "react";
@@ -1,3 +1,3 @@
1
1
  import { a as SheetHeader, i as SheetFooter, o as SheetTitle, r as SheetDescription, s as SheetTrigger } from "../sheet-DXCZyMHI.mjs";
2
- import { i as SheetOverlay, n as SheetClose, r as SheetContent, t as Sheet } from "../sheet-BZViad2U.mjs";
2
+ import { i as SheetOverlay, n as SheetClose, r as SheetContent, t as Sheet } from "../sheet-C2i2k5i2.mjs";
3
3
  export { Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetTitle, SheetTrigger };
@@ -13,14 +13,14 @@ function SheetOverlay({ className, ...props }) {
13
13
  ...props
14
14
  });
15
15
  }
16
- function SheetContent({ className, children, side = "right", ...props }) {
16
+ function SheetContent({ className, children, side = "right", showCloseButton = true, ...props }) {
17
17
  return /* @__PURE__ */ jsxs(SheetPrimitive.Portal, {
18
18
  "data-slot": "sheet-portal",
19
19
  children: [/* @__PURE__ */ jsx(SheetOverlay, {}), /* @__PURE__ */ jsxs(SheetPrimitive.Content, {
20
20
  "data-slot": "sheet-content",
21
21
  className: cn("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500", side === "right" && "data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm", side === "left" && "data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm", side === "top" && "data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b", side === "bottom" && "data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t", className),
22
22
  ...props,
23
- children: [children, /* @__PURE__ */ jsxs(SheetPrimitive.Close, {
23
+ children: [children, showCloseButton && /* @__PURE__ */ jsxs(SheetPrimitive.Close, {
24
24
  className: "ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 cursor-pointer rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0",
25
25
  children: [/* @__PURE__ */ jsx(CloseIcon, { className: "size-4" }), /* @__PURE__ */ jsx("span", {
26
26
  className: "sr-only",
@@ -1,2 +1,2 @@
1
- import { C as SidebarProvider, S as SidebarGroupLabel, _ as SidebarMenuSubButton, a as SidebarInput, b as SidebarGroupAction, c as SidebarSeparator, d as SidebarMenuAction, f as SidebarMenuBadge, g as SidebarMenuSub, h as SidebarMenuSkeleton, i as SidebarHeader, l as SidebarTrigger, m as SidebarMenuItem, n as SidebarContent, o as SidebarInset, p as SidebarMenuButton, r as SidebarFooter, s as SidebarRail, t as Sidebar, u as SidebarMenu, v as SidebarMenuSubItem, w as useSidebar, x as SidebarGroupContent, y as SidebarGroup } from "../sidebar-BRUNOqXi.mjs";
1
+ import { C as SidebarProvider, S as SidebarGroupLabel, _ as SidebarMenuSubButton, a as SidebarInput, b as SidebarGroupAction, c as SidebarSeparator, d as SidebarMenuAction, f as SidebarMenuBadge, g as SidebarMenuSub, h as SidebarMenuSkeleton, i as SidebarHeader, l as SidebarTrigger, m as SidebarMenuItem, n as SidebarContent, o as SidebarInset, p as SidebarMenuButton, r as SidebarFooter, s as SidebarRail, t as Sidebar, u as SidebarMenu, v as SidebarMenuSubItem, w as useSidebar, x as SidebarGroupContent, y as SidebarGroup } from "../sidebar-D6BoAr6C.mjs";
2
2
  export { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, useSidebar };