@datum-cloud/datum-ui 3.7.0 → 3.8.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.
- package/dist/{action-row-DTvs91_3.mjs → action-row-BEzE9x37.mjs} +2 -3
- package/dist/{adapter-context-h0jCVqGO.mjs → adapter-context-XT749tyT.mjs} +1 -2
- package/dist/alert/index.mjs +1 -2
- package/dist/{alert-SAPwee1h.mjs → alert-CVckvox4.mjs} +2 -3
- package/dist/app-navigation/index.mjs +2 -2
- package/dist/{app-navigation-BB_NLEWv.mjs → app-navigation-DyNZwlSG.mjs} +14 -20
- package/dist/assistant/index.mjs +57 -63
- package/dist/autocomplete/index.mjs +1 -2
- package/dist/{autocomplete-BxtzndxZ.mjs → autocomplete-D0zAcT78.mjs} +6 -8
- package/dist/autosearch/index.mjs +8 -10
- package/dist/avatar/index.mjs +2 -3
- package/dist/avatar-stack/index.mjs +1 -2
- package/dist/{avatar-stack-BUcsjhA6.mjs → avatar-stack-2ow672bR.mjs} +3 -4
- package/dist/badge/index.mjs +181 -1
- package/dist/breadcrumb/index.mjs +1 -2
- package/dist/{breadcrumb-DmdhC8bE.mjs → breadcrumb-D97jAZ2N.mjs} +2 -3
- package/dist/button/index.mjs +2 -2
- package/dist/{button-CsdF61EI.mjs → button-C57mkFkS.mjs} +2 -3
- package/dist/{button-DoMqfQLu.mjs → button-Cn4KagBO.mjs} +4 -6
- package/dist/{button-CDPui_Ov.mjs → button-IK-Lnu_9.mjs} +3 -4
- package/dist/button-group/index.mjs +1 -2
- package/dist/{button-group-DFrTH4L8.mjs → button-group-C3GKo-0p.mjs} +3 -4
- package/dist/calendar/index.mjs +4 -5
- package/dist/{calendar-date-picker-DPvVAW2I.mjs → calendar-date-picker-CknZM6a2.mjs} +3 -4
- package/dist/card/index.mjs +1 -2
- package/dist/{card-save-bar-BZzNnKYj.mjs → card-save-bar-Te8jf-ie.mjs} +5 -8
- package/dist/chart/index.mjs +1 -2
- package/dist/{chart-EgzTS28l.mjs → chart-BsGsx2jb.mjs} +2 -3
- package/dist/checkbox/index.mjs +1 -2
- package/dist/checkbox-BAo5sbHk.mjs +84 -0
- package/dist/{close.icon-DdXKQ4m0.mjs → close.icon-BCPmH4nN.mjs} +2 -3
- package/dist/code-editor/index.mjs +1 -2
- package/dist/{col-BYGWTB4j.mjs → col-CYHIfPJq.mjs} +5 -9
- package/dist/collapsible/index.mjs +1 -7
- package/dist/collapsible-B-KP3JZ-.mjs +104 -0
- package/dist/command/index.mjs +1 -2
- package/dist/{command-C0aGIYnQ.mjs → command-B0be-zU5.mjs} +3 -4
- package/dist/components/base/checkbox/checkbox.d.ts +11 -3
- package/dist/components/base/collapsible/collapsible.d.ts +28 -0
- package/dist/components/base/collapsible/index.d.ts +1 -1
- package/dist/components/base/radio-group/radio-group.d.ts +11 -5
- package/dist/components/base/spinner/index.d.ts +1 -1
- package/dist/components/base/spinner/spinner.d.ts +11 -0
- package/dist/components/base/switch/switch.d.ts +6 -1
- package/dist/components/base/typography/typography.d.ts +1 -1
- package/dist/components/features/_shared/copy-state-icon.d.ts +12 -0
- package/dist/components/features/_shared/index.d.ts +2 -0
- package/dist/components/features/_shared/motion-chip.d.ts +293 -0
- package/dist/components/features/assistant/components/message/plan-card.d.ts +1 -1
- package/dist/components/icons/spinner.icon.d.ts +17 -3
- package/dist/copy-state-icon-DMvXXsZm.mjs +61 -0
- package/dist/data-table/index.mjs +1 -2
- package/dist/{data-table-CJiQQ6TM.mjs → data-table-CpBwO8Ea.mjs} +39 -66
- package/dist/date-picker/index.mjs +3 -3
- package/dist/date-time/index.mjs +1 -2
- package/dist/{date-time-lZdefM4H.mjs → date-time-BBRVM9qb.mjs} +4 -6
- package/dist/date-time-picker/index.mjs +1 -2
- package/dist/{date-time-picker-CricsXgF.mjs → date-time-picker-Bc41Ixrs.mjs} +3 -4
- package/dist/{date-time-range-picker-DM4AIvQ1.mjs → date-time-range-picker-yy1Acntn.mjs} +36 -59
- package/dist/dialog/index.mjs +1 -2
- package/dist/{dialog-Gu70fban.mjs → dialog-C8RXIQYm.mjs} +4 -5
- package/dist/{dialog-CmkrpaYy.mjs → dialog-D6sDXaH6.mjs} +2 -3
- package/dist/dropdown/index.mjs +1 -2
- package/dist/{dropdown-Xvduih96.mjs → dropdown-DR9j3Ni_.mjs} +3 -4
- package/dist/{dropdown-menu-b8zY5Cs6.mjs → dropdown-menu-CjgTr8Ab.mjs} +2 -3
- package/dist/dropzone/index.mjs +1 -2
- package/dist/{dropzone-ihksfjN2.mjs → dropzone-qKYfSe7o.mjs} +6 -8
- package/dist/empty-content/index.mjs +1 -2
- package/dist/{empty-content-CmuVcU0P.mjs → empty-content-CTMHak36.mjs} +8 -13
- package/dist/form/adapters/conform/index.mjs +4 -6
- package/dist/form/adapters/rhf/index.mjs +6 -9
- package/dist/form/index.mjs +2 -2
- package/dist/form/stepper/index.mjs +11 -16
- package/dist/{form-D4R6C609.mjs → form-DTaVgDSV.mjs} +64 -89
- package/dist/{form-context-DzB2a-dw.mjs → form-context-BRzt53M5.mjs} +1 -2
- package/dist/grid/index.mjs +1 -2
- package/dist/grouped-table/index.mjs +1 -2
- package/dist/{grouped-table-fHguJz9W.mjs → grouped-table-Dl6DclbV.mjs} +17 -25
- package/dist/hooks/index.mjs +4 -4
- package/dist/{hooks-CwZ6hyI1.mjs → hooks-WVJbyhCz.mjs} +1 -2
- package/dist/hover-card/index.mjs +1 -2
- package/dist/{hover-card-BNOE5vT5.mjs → hover-card-DSt1lZGg.mjs} +3 -5
- package/dist/{icon-wrapper-DKfJlJd0.mjs → icon-wrapper-CIk2th6R.mjs} +1 -2
- package/dist/icons/index.mjs +3 -3
- package/dist/index.mjs +80 -80
- package/dist/input/index.mjs +1 -2
- package/dist/{input-j4tbmYYz.mjs → input-DsT5qkJn.mjs} +3 -4
- package/dist/{input-DR-XbgpD.mjs → input-Wl1K48ca.mjs} +2 -3
- package/dist/input-group/index.mjs +1 -2
- package/dist/{input-group-DieA8aBt.mjs → input-group-CCzvJIZM.mjs} +5 -6
- package/dist/input-number/index.mjs +1 -2
- package/dist/{input-number-TXmW-X9o.mjs → input-number-DF-bfIo8.mjs} +5 -6
- package/dist/input-with-addons/index.mjs +2 -3
- package/dist/label/index.mjs +1 -2
- package/dist/{label-Bk6FXsju.mjs → label-BR1V3Imy.mjs} +3 -5
- package/dist/{layers-DWYdrGmC.mjs → layers-DLUbkJtt.mjs} +26 -27
- package/dist/loader-overlay/index.mjs +1 -2
- package/dist/{loader-overlay-DD94azZX.mjs → loader-overlay-DP0pvHuG.mjs} +3 -4
- package/dist/logo/index.mjs +2 -2
- package/dist/logo/themed/index.mjs +3 -4
- package/dist/{logo-C3FxD7jb.mjs → logo-CkzKra6H.mjs} +2 -3
- package/dist/{logo-text-Dpm5O6Kg.mjs → logo-text-B54YiEte.mjs} +6 -11
- package/dist/logs/fixtures/index.mjs +2 -4
- package/dist/logs/index.mjs +68 -87
- package/dist/map/index.mjs +1 -2
- package/dist/{map-leaflet-imports-S3kx8Q-S.mjs → map-leaflet-imports-Xdz9Xiaf.mjs} +1 -2
- package/dist/mobile-sheet/index.mjs +1 -2
- package/dist/{mobile-sheet-9TootJGg.mjs → mobile-sheet-1995HYY_.mjs} +6 -9
- package/dist/more-actions/index.mjs +2 -2
- package/dist/{more-actions-C3DYWO0a.mjs → more-actions-BlSOVwa8.mjs} +6 -7
- package/dist/{motion-DvGRWdsm.mjs → motion-DOrRbLmy.mjs} +1 -2
- package/dist/motion-chip-BczV7spP.mjs +52 -0
- package/dist/multi-select/index.mjs +1 -2
- package/dist/{multi-select-CF0Yq5yf.mjs → multi-select-C2cBrqXl.mjs} +61 -57
- package/dist/nprogress/index.mjs +1 -2
- package/dist/page-title/index.mjs +1 -2
- package/dist/{page-title-ipRWEOeM.mjs → page-title-Djl3LvPT.mjs} +2 -3
- package/dist/picker/index.mjs +2 -2
- package/dist/{picker-BoKXW6_s.mjs → picker-DC3GErYg.mjs} +14 -25
- package/dist/popover/index.mjs +1 -2
- package/dist/{popover-X82NwhX9.mjs → popover-7YxyP_W0.mjs} +3 -5
- package/dist/radio-group/index.mjs +1 -2
- package/dist/radio-group-Boxi2hm0.mjs +83 -0
- package/dist/responsive-dropdown/index.mjs +1 -2
- package/dist/{responsive-dropdown-C_KKgLbH.mjs → responsive-dropdown-DsWgpE_i.mjs} +5 -6
- package/dist/responsive-popover/index.mjs +1 -2
- package/dist/{responsive-popover-8VcjBM2d.mjs → responsive-popover-DJYd8lOK.mjs} +5 -6
- package/dist/rich-text-content/index.mjs +1 -2
- package/dist/{rich-text-content-DNonBD39.mjs → rich-text-content-BiIIowBU.mjs} +2 -3
- package/dist/rich-text-editor/index.mjs +2 -2
- package/dist/{rich-text-editor-CP1YyxMR.mjs → rich-text-editor-BUz06s-b.mjs} +14 -22
- package/dist/select/index.mjs +1 -2
- package/dist/{select-D4pk9e2d.mjs → select-DemYhwnG.mjs} +3 -4
- package/dist/{select-daE2Nn0Z.mjs → select-jgK6wyXj.mjs} +2 -3
- package/dist/separator/index.mjs +1 -2
- package/dist/{separator-vbPD_WFQ.mjs → separator-DNiiN2BN.mjs} +2 -3
- package/dist/settings-nav/index.mjs +1 -2
- package/dist/{settings-nav-Hf3GrCGv.mjs → settings-nav-CCZdPD-x.mjs} +2 -3
- package/dist/sheet/index.mjs +2 -2
- package/dist/{sheet-DHn6C_rs.mjs → sheet-DEpEJ_Rk.mjs} +4 -5
- package/dist/{sheet-DXCZyMHI.mjs → sheet-DYPtVIb2.mjs} +2 -3
- package/dist/sidebar/index.mjs +1 -2
- package/dist/{sidebar-sbqOOFii.mjs → sidebar-DWnxQWQ8.mjs} +13 -18
- package/dist/skeleton/index.mjs +3 -4
- package/dist/{skeleton-DFExK4GX.mjs → skeleton-CDPoo7-M.mjs} +2 -3
- package/dist/spinner/index.mjs +1 -2
- package/dist/spinner-DSlDJdWl.mjs +23 -0
- package/dist/spinner.icon-BiUnMAxw.mjs +104 -0
- package/dist/stepper/index.mjs +1 -2
- package/dist/{stepper-dNvkipop.mjs → stepper-ZipxpzWY.mjs} +10 -11
- package/dist/switch/index.mjs +1 -2
- package/dist/switch-IduVwiPZ.mjs +114 -0
- package/dist/table/index.mjs +2 -3
- package/dist/tabs/index.mjs +3 -4
- package/dist/tag-input/index.mjs +1 -2
- package/dist/{tag-input-c9OvWTSe.mjs → tag-input-a3ktkGrH.mjs} +46 -43
- package/dist/task-queue/index.mjs +1 -2
- package/dist/{task-queue-dropdown-CHPP5WIm.mjs → task-queue-dropdown-DuCAAybs.mjs} +39 -59
- package/dist/textarea/index.mjs +1 -2
- package/dist/{textarea-DiSGxCBO.mjs → textarea-CvhdK6JY.mjs} +3 -4
- package/dist/{textarea-CCxpXJdh.mjs → textarea-D36SE4ki.mjs} +2 -3
- package/dist/theme/index.mjs +1 -2
- package/dist/{themes-Ba2bajuF.mjs → themes-BoxnQbbu.mjs} +8 -10
- package/dist/time-picker/index.mjs +1 -2
- package/dist/{time-picker-DQlc2gKW.mjs → time-picker-B_am4eAK.mjs} +3 -4
- package/dist/{to-api-format-QuJ81vQ9.mjs → to-api-format-DyImCzCn.mjs} +15 -23
- package/dist/toast/index.mjs +2 -2
- package/dist/{toast-BUPlDkN3.mjs → toast-CizxCEcK.mjs} +4 -6
- package/dist/tooltip/index.mjs +1 -2
- package/dist/{tooltip-DhbN1BDK.mjs → tooltip-OIySjJWW.mjs} +3 -5
- package/dist/transfer/index.mjs +1 -2
- package/dist/{transfer-DsshYgIk.mjs → transfer-DGUeAQUL.mjs} +8 -14
- package/dist/{types-agDpVXBG.mjs → types-ChINrR8H.mjs} +7 -11
- package/dist/typography/index.mjs +1 -2
- package/dist/{typography-B1bpHKmV.mjs → typography-XFfN6PGD.mjs} +2 -3
- package/dist/{use-breakpoint-CwiUJSmk.mjs → use-breakpoint-zY_JYINK.mjs} +1 -2
- package/dist/{use-controllable-state-Dna7u3r9.mjs → use-controllable-state-DLeVgbAb.mjs} +1 -2
- package/dist/{use-copy-to-clipboard-DZDq_85T.mjs → use-copy-to-clipboard-CWKWHLxI.mjs} +1 -2
- package/dist/{use-debounced-search-input-yu_F0QBt.mjs → use-debounced-search-input-B4u28iLx.mjs} +1 -2
- package/dist/{use-deprecation-warning-DXrGc0jX.mjs → use-deprecation-warning-BS1V4IS5.mjs} +1 -2
- package/dist/{use-display-touched-CMEEv7aT.mjs → use-display-touched-BSq0Ninl.mjs} +3 -5
- package/dist/{use-option-picker-s2bUYwXC.mjs → use-option-picker-DXY2SNnT.mjs} +6 -9
- package/dist/{use-toast-Bpq0yJIT.mjs → use-toast-CZAZeS95.mjs} +3 -5
- package/dist/utils/index.mjs +3 -3
- package/dist/{utils-CA4QEIJ8.mjs → utils-CPJ5MCfd.mjs} +1 -2
- package/dist/{utils-Bu32wN-x.mjs → utils-CTIuhCOs.mjs} +1 -2
- package/dist/visually-hidden/index.mjs +1 -2
- package/dist/{visuallyhidden-D7L_qs8b.mjs → visuallyhidden-Mg4OsZ-l.mjs} +1 -2
- package/dist/{zod-helpers-YEhVo2S-.mjs → zod-helpers-JcfFVJJd.mjs} +1 -2
- package/package.json +20 -23
- package/dist/badge-DOZUr5DV.mjs +0 -183
- package/dist/checkbox-C6P12fio.mjs +0 -30
- package/dist/radio-group-LduBVTnh.mjs +0 -45
- package/dist/spinner-C5Xv-i2C.mjs +0 -14
- package/dist/spinner.icon-BYUMQ8H-.mjs +0 -48
- package/dist/switch-BaR-Vna4.mjs +0 -34
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { t as cn } from "./utils-Bu32wN-x.mjs";
|
|
2
|
-
import { t as Button } from "./button-DoMqfQLu.mjs";
|
|
3
|
-
import { t as Button$1 } from "./button-CsdF61EI.mjs";
|
|
4
1
|
import { Calendar } from "./calendar/index.mjs";
|
|
5
|
-
import { t as
|
|
6
|
-
import { t as ResponsivePopover } from "./responsive-popover-
|
|
7
|
-
import {
|
|
2
|
+
import { t as cn } from "./utils-CTIuhCOs.mjs";
|
|
3
|
+
import { t as ResponsivePopover } from "./responsive-popover-DJYd8lOK.mjs";
|
|
4
|
+
import { t as Button } from "./button-C57mkFkS.mjs";
|
|
5
|
+
import { t as useBreakpoint } from "./use-breakpoint-zY_JYINK.mjs";
|
|
6
|
+
import { n as OptionList, t as useOptionPicker } from "./use-option-picker-DXY2SNnT.mjs";
|
|
7
|
+
import { t as Button$1 } from "./button-Cn4KagBO.mjs";
|
|
8
8
|
import { CalendarIcon, Clock, Globe, X } from "lucide-react";
|
|
9
9
|
import { createContext, useCallback, useContext, useEffect, useMemo, useReducer, useRef, useState } from "react";
|
|
10
10
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
11
|
import { formatInTimeZone, fromZonedTime, toZonedTime } from "date-fns-tz";
|
|
12
12
|
import { endOfDay, endOfMonth, endOfWeek, endOfYear, format, startOfDay, startOfMonth, startOfWeek, startOfYear, subDays, subHours, subMinutes } from "date-fns";
|
|
13
|
-
|
|
13
|
+
// src/components/features/_shared/timezone.ts
|
|
14
14
|
/**
|
|
15
15
|
* Start of the calendar day (00:00:00.000) for `date`, interpreted in
|
|
16
16
|
* `timezone`, returned as a real UTC instant.
|
|
@@ -32,8 +32,7 @@ function endOfDayInTz(date, timezone) {
|
|
|
32
32
|
zoned.setHours(23, 59, 59, 999);
|
|
33
33
|
return fromZonedTime(zoned, timezone);
|
|
34
34
|
}
|
|
35
|
-
|
|
36
|
-
//#region src/components/base/date-picker/use-date-constraints.ts
|
|
35
|
+
// src/components/base/date-picker/use-date-constraints.ts
|
|
37
36
|
function useDateConstraints({ minDate, maxDate, disablePast, disableFuture }) {
|
|
38
37
|
const today = useMemo(() => /* @__PURE__ */ new Date(), []);
|
|
39
38
|
const effectiveMinDate = useMemo(() => {
|
|
@@ -70,8 +69,7 @@ function useDateConstraints({ minDate, maxDate, disablePast, disableFuture }) {
|
|
|
70
69
|
}, [effectiveMinDate, effectiveMaxDate])
|
|
71
70
|
};
|
|
72
71
|
}
|
|
73
|
-
|
|
74
|
-
//#region src/components/features/picker/types.ts
|
|
72
|
+
// src/components/features/picker/types.ts
|
|
75
73
|
const RANGE_MODES = [
|
|
76
74
|
"date-range",
|
|
77
75
|
"time-range",
|
|
@@ -109,8 +107,7 @@ const ALLOWED_STEPS = [
|
|
|
109
107
|
30,
|
|
110
108
|
60
|
|
111
109
|
];
|
|
112
|
-
|
|
113
|
-
//#region src/components/features/picker/utils/timezone.ts
|
|
110
|
+
// src/components/features/picker/utils/timezone.ts
|
|
114
111
|
/** Browser-detected IANA timezone, falling back to UTC if unavailable. */
|
|
115
112
|
function getBrowserTimezone() {
|
|
116
113
|
try {
|
|
@@ -189,8 +186,7 @@ function formatInTimezone(iso, timezone, pattern) {
|
|
|
189
186
|
return "";
|
|
190
187
|
}
|
|
191
188
|
}
|
|
192
|
-
|
|
193
|
-
//#region src/components/features/picker/components/context.ts
|
|
189
|
+
// src/components/features/picker/components/context.ts
|
|
194
190
|
const PickerContext = createContext(null);
|
|
195
191
|
/** Throws when used outside `<Picker.Root>` — enforces compound-component discipline. */
|
|
196
192
|
function usePickerContext() {
|
|
@@ -198,8 +194,7 @@ function usePickerContext() {
|
|
|
198
194
|
if (!ctx) throw new Error("Picker primitives must be rendered inside <Picker.Root>");
|
|
199
195
|
return ctx;
|
|
200
196
|
}
|
|
201
|
-
|
|
202
|
-
//#region src/components/features/picker/components/calendar.tsx
|
|
197
|
+
// src/components/features/picker/components/calendar.tsx
|
|
203
198
|
/**
|
|
204
199
|
* Override the base Calendar's default `w-fit` root so the calendar fills the
|
|
205
200
|
* mobile sheet width (cells flex via the underlying day-picker) and reverts to
|
|
@@ -293,8 +288,7 @@ function PickerCalendar({ numberOfMonths = 1, className, minDate, maxDate, disab
|
|
|
293
288
|
});
|
|
294
289
|
}
|
|
295
290
|
PickerCalendar.displayName = "Picker.Calendar";
|
|
296
|
-
|
|
297
|
-
//#region src/components/features/picker/components/content.tsx
|
|
291
|
+
// src/components/features/picker/components/content.tsx
|
|
298
292
|
function PickerContent({ trigger, sheetTitle, sheetDescription, footer, align = "start", side = "bottom", modal, contentClassName, children }) {
|
|
299
293
|
const { state, actions, effectiveCommit, responsive, breakpoint } = usePickerContext();
|
|
300
294
|
const isMobileSheet = responsive && breakpoint === "mobile";
|
|
@@ -325,8 +319,7 @@ function PickerContent({ trigger, sheetTitle, sheetDescription, footer, align =
|
|
|
325
319
|
});
|
|
326
320
|
}
|
|
327
321
|
PickerContent.displayName = "Picker.Content";
|
|
328
|
-
|
|
329
|
-
//#region src/components/features/picker/components/footer.tsx
|
|
322
|
+
// src/components/features/picker/components/footer.tsx
|
|
330
323
|
function PickerFooter({ children, className }) {
|
|
331
324
|
return /* @__PURE__ */ jsx("div", {
|
|
332
325
|
className: cn("flex items-center justify-end gap-2", className),
|
|
@@ -337,7 +330,7 @@ PickerFooter.displayName = "Picker.Footer";
|
|
|
337
330
|
function PickerApply({ children = "Apply" }) {
|
|
338
331
|
const { state, actions } = usePickerContext();
|
|
339
332
|
const disabled = state.pendingValue === null || state.pendingValue === void 0;
|
|
340
|
-
return /* @__PURE__ */ jsx(Button, {
|
|
333
|
+
return /* @__PURE__ */ jsx(Button$1, {
|
|
341
334
|
type: "primary",
|
|
342
335
|
theme: "solid",
|
|
343
336
|
size: "xs",
|
|
@@ -349,7 +342,7 @@ function PickerApply({ children = "Apply" }) {
|
|
|
349
342
|
PickerApply.displayName = "Picker.Apply";
|
|
350
343
|
function PickerReset({ children = "Reset" }) {
|
|
351
344
|
const { actions } = usePickerContext();
|
|
352
|
-
return /* @__PURE__ */ jsx(Button, {
|
|
345
|
+
return /* @__PURE__ */ jsx(Button$1, {
|
|
353
346
|
type: "quaternary",
|
|
354
347
|
theme: "outline",
|
|
355
348
|
size: "xs",
|
|
@@ -360,7 +353,7 @@ function PickerReset({ children = "Reset" }) {
|
|
|
360
353
|
PickerReset.displayName = "Picker.Reset";
|
|
361
354
|
function PickerCancel({ children = "Cancel" }) {
|
|
362
355
|
const { actions } = usePickerContext();
|
|
363
|
-
return /* @__PURE__ */ jsx(Button, {
|
|
356
|
+
return /* @__PURE__ */ jsx(Button$1, {
|
|
364
357
|
type: "quaternary",
|
|
365
358
|
theme: "borderless",
|
|
366
359
|
size: "xs",
|
|
@@ -371,7 +364,7 @@ function PickerCancel({ children = "Cancel" }) {
|
|
|
371
364
|
PickerCancel.displayName = "Picker.Cancel";
|
|
372
365
|
function PickerClear({ children = "Clear" }) {
|
|
373
366
|
const { actions } = usePickerContext();
|
|
374
|
-
return /* @__PURE__ */ jsx(Button, {
|
|
367
|
+
return /* @__PURE__ */ jsx(Button$1, {
|
|
375
368
|
type: "primary",
|
|
376
369
|
theme: "borderless",
|
|
377
370
|
size: "xs",
|
|
@@ -380,8 +373,7 @@ function PickerClear({ children = "Clear" }) {
|
|
|
380
373
|
});
|
|
381
374
|
}
|
|
382
375
|
PickerClear.displayName = "Picker.Clear";
|
|
383
|
-
|
|
384
|
-
//#region src/components/features/picker/components/presets.tsx
|
|
376
|
+
// src/components/features/picker/components/presets.tsx
|
|
385
377
|
function PickerPresets({ className }) {
|
|
386
378
|
const { presets, state, actions, timezone } = usePickerContext();
|
|
387
379
|
if (presets.length === 0) return null;
|
|
@@ -389,7 +381,7 @@ function PickerPresets({ className }) {
|
|
|
389
381
|
className: cn("border-border hidden flex-col gap-1 border-r p-2 md:flex", className),
|
|
390
382
|
children: presets.map((preset) => {
|
|
391
383
|
const isSelected = state.selectedPresetKey === preset.key;
|
|
392
|
-
return /* @__PURE__ */ jsxs(Button
|
|
384
|
+
return /* @__PURE__ */ jsxs(Button, {
|
|
393
385
|
type: "button",
|
|
394
386
|
variant: isSelected ? "default" : "ghost",
|
|
395
387
|
size: "sm",
|
|
@@ -407,8 +399,7 @@ function PickerPresets({ className }) {
|
|
|
407
399
|
});
|
|
408
400
|
}
|
|
409
401
|
PickerPresets.displayName = "Picker.Presets";
|
|
410
|
-
|
|
411
|
-
//#region src/components/features/picker/hooks/use-keyboard-shortcuts.ts
|
|
402
|
+
// src/components/features/picker/hooks/use-keyboard-shortcuts.ts
|
|
412
403
|
/** True when the event target is a text-editable control we must not hijack. */
|
|
413
404
|
function isEditableTarget(target) {
|
|
414
405
|
if (!(target instanceof HTMLElement)) return false;
|
|
@@ -448,8 +439,7 @@ function useKeyboardShortcuts({ presets, onSelect, enabled }) {
|
|
|
448
439
|
enabled
|
|
449
440
|
]);
|
|
450
441
|
}
|
|
451
|
-
|
|
452
|
-
//#region src/components/features/picker/utils/commit.ts
|
|
442
|
+
// src/components/features/picker/utils/commit.ts
|
|
453
443
|
/**
|
|
454
444
|
* Resolves the effective commit semantics for a picker.
|
|
455
445
|
*
|
|
@@ -467,8 +457,7 @@ function resolveCommit(mode, commit) {
|
|
|
467
457
|
if (isDateBearingMode(mode) && isTimeBearingMode(mode)) return "apply";
|
|
468
458
|
return commit ?? (isRangeMode(mode) ? "apply" : "immediate");
|
|
469
459
|
}
|
|
470
|
-
|
|
471
|
-
//#region src/components/features/picker/utils/format.ts
|
|
460
|
+
// src/components/features/picker/utils/format.ts
|
|
472
461
|
/**
|
|
473
462
|
* Format a Date as YYYY-MM-DD using local-time components.
|
|
474
463
|
*
|
|
@@ -527,8 +516,7 @@ function formatTimeLabel(time, hourCycle) {
|
|
|
527
516
|
const period = parsed.h >= 12 ? "PM" : "AM";
|
|
528
517
|
return `${parsed.h === 0 ? 12 : parsed.h > 12 ? parsed.h - 12 : parsed.h}:${String(parsed.m).padStart(2, "0")} ${period}`;
|
|
529
518
|
}
|
|
530
|
-
|
|
531
|
-
//#region src/components/features/picker/hooks/use-picker-state.ts
|
|
519
|
+
// src/components/features/picker/hooks/use-picker-state.ts
|
|
532
520
|
/**
|
|
533
521
|
* Preset key carried on a range value (`{ from, to, preset }`), so a value
|
|
534
522
|
* hydrated from props / URL highlights its preset chip.
|
|
@@ -787,8 +775,7 @@ function usePickerState({ mode, value, onChange, commit, timezone }) {
|
|
|
787
775
|
actions
|
|
788
776
|
};
|
|
789
777
|
}
|
|
790
|
-
|
|
791
|
-
//#region src/components/features/picker/presets/defaults.ts
|
|
778
|
+
// src/components/features/picker/presets/defaults.ts
|
|
792
779
|
/**
|
|
793
780
|
* Compute a `{ from, to }` window in `tz` wall-clock space using date-fns
|
|
794
781
|
* boundary helpers, then project both ends back to real UTC instants. Keeps
|
|
@@ -962,8 +949,7 @@ function getDefaultPresets(mode) {
|
|
|
962
949
|
default: return EMPTY;
|
|
963
950
|
}
|
|
964
951
|
}
|
|
965
|
-
|
|
966
|
-
//#region src/components/features/picker/hooks/use-presets.ts
|
|
952
|
+
// src/components/features/picker/hooks/use-presets.ts
|
|
967
953
|
/**
|
|
968
954
|
* Resolve the effective list of presets for a picker.
|
|
969
955
|
*
|
|
@@ -994,8 +980,7 @@ function usePresets({ mode, timezone, custom, excludeKeys, isDateDisabled }) {
|
|
|
994
980
|
isDateDisabled
|
|
995
981
|
]);
|
|
996
982
|
}
|
|
997
|
-
|
|
998
|
-
//#region src/components/features/picker/components/root.tsx
|
|
983
|
+
// src/components/features/picker/components/root.tsx
|
|
999
984
|
function detectHourCycle() {
|
|
1000
985
|
try {
|
|
1001
986
|
const opts = new Intl.DateTimeFormat(void 0, { hour: "numeric" }).resolvedOptions();
|
|
@@ -1079,8 +1064,7 @@ PickerRoot.displayName = "Picker.Root";
|
|
|
1079
1064
|
* Public namespace export. Subsequent tasks add Trigger, Content, etc.
|
|
1080
1065
|
*/
|
|
1081
1066
|
const Picker = { Root: PickerRoot };
|
|
1082
|
-
|
|
1083
|
-
//#region src/components/features/picker/hooks/use-time-slots.ts
|
|
1067
|
+
// src/components/features/picker/hooks/use-time-slots.ts
|
|
1084
1068
|
function timeToMinutes(t) {
|
|
1085
1069
|
const parsed = parseTimeString(t);
|
|
1086
1070
|
return parsed ? parsed.h * 60 + parsed.m : null;
|
|
@@ -1117,8 +1101,7 @@ function useTimeSlots({ min, max, step = 15, hourCycle = "24" }) {
|
|
|
1117
1101
|
hourCycle
|
|
1118
1102
|
]);
|
|
1119
1103
|
}
|
|
1120
|
-
|
|
1121
|
-
//#region src/components/features/picker/components/time-input.tsx
|
|
1104
|
+
// src/components/features/picker/components/time-input.tsx
|
|
1122
1105
|
function combineDateAndTime(dateIso, time, timezone) {
|
|
1123
1106
|
const d = isoToZonedDate(dateIso, timezone);
|
|
1124
1107
|
const parsed = parseTimeString(time);
|
|
@@ -1250,7 +1233,7 @@ function EmbeddedSlotInput({ label, slots, value, onSelect, disabled = false, cl
|
|
|
1250
1233
|
open,
|
|
1251
1234
|
onOpenChange: disabled ? () => {} : setOpen,
|
|
1252
1235
|
sheetTitle: "Select time",
|
|
1253
|
-
trigger: /* @__PURE__ */ jsxs(Button
|
|
1236
|
+
trigger: /* @__PURE__ */ jsxs(Button, {
|
|
1254
1237
|
type: "button",
|
|
1255
1238
|
variant: "outline",
|
|
1256
1239
|
disabled,
|
|
@@ -1267,8 +1250,7 @@ function EmbeddedSlotInput({ label, slots, value, onSelect, disabled = false, cl
|
|
|
1267
1250
|
})
|
|
1268
1251
|
});
|
|
1269
1252
|
}
|
|
1270
|
-
|
|
1271
|
-
//#region src/components/features/picker/components/timezone-indicator.tsx
|
|
1253
|
+
// src/components/features/picker/components/timezone-indicator.tsx
|
|
1272
1254
|
function PickerTimezoneIndicator({ className, variant = "full" }) {
|
|
1273
1255
|
const { mode, timezone, hideTimezone } = usePickerContext();
|
|
1274
1256
|
if (hideTimezone) return null;
|
|
@@ -1289,14 +1271,13 @@ function PickerTimezoneIndicator({ className, variant = "full" }) {
|
|
|
1289
1271
|
});
|
|
1290
1272
|
}
|
|
1291
1273
|
PickerTimezoneIndicator.displayName = "Picker.TimezoneIndicator";
|
|
1292
|
-
|
|
1293
|
-
//#region src/components/features/picker/components/trigger.tsx
|
|
1274
|
+
// src/components/features/picker/components/trigger.tsx
|
|
1294
1275
|
const DEFAULT_ICON = /* @__PURE__ */ jsx(CalendarIcon, { className: "text-muted-foreground size-4 shrink-0" });
|
|
1295
1276
|
function PickerTrigger({ placeholder = "Pick a date", clearable = false, disabled = false, children, className, triggerClassName, id, icon, onClick, ...slotProps }) {
|
|
1296
1277
|
const { state, actions } = usePickerContext();
|
|
1297
1278
|
const hasValue = state.pendingValue !== null && state.pendingValue !== void 0;
|
|
1298
1279
|
const renderedIcon = icon === false ? null : icon ?? DEFAULT_ICON;
|
|
1299
|
-
return /* @__PURE__ */ jsxs(Button
|
|
1280
|
+
return /* @__PURE__ */ jsxs(Button, {
|
|
1300
1281
|
id,
|
|
1301
1282
|
type: "button",
|
|
1302
1283
|
variant: "outline",
|
|
@@ -1330,8 +1311,7 @@ function PickerTrigger({ placeholder = "Pick a date", clearable = false, disable
|
|
|
1330
1311
|
});
|
|
1331
1312
|
}
|
|
1332
1313
|
PickerTrigger.displayName = "Picker.Trigger";
|
|
1333
|
-
|
|
1334
|
-
//#region src/components/features/picker/utils/format-value.ts
|
|
1314
|
+
// src/components/features/picker/utils/format-value.ts
|
|
1335
1315
|
const DATE_OPTS = {
|
|
1336
1316
|
year: "numeric",
|
|
1337
1317
|
month: "short",
|
|
@@ -1432,8 +1412,7 @@ function formatPickerValue(value, mode, opts = {}) {
|
|
|
1432
1412
|
}
|
|
1433
1413
|
return "";
|
|
1434
1414
|
}
|
|
1435
|
-
|
|
1436
|
-
//#region src/components/features/picker/wrappers/internal/default-footer.tsx
|
|
1415
|
+
// src/components/features/picker/wrappers/internal/default-footer.tsx
|
|
1437
1416
|
/**
|
|
1438
1417
|
* The standard Cancel / Reset / Apply footer used by every wrapper.
|
|
1439
1418
|
* `Picker.Content` decides whether to render it - desktop popover renders
|
|
@@ -1446,8 +1425,7 @@ function DefaultFooter() {
|
|
|
1446
1425
|
/* @__PURE__ */ jsx(PickerApply, {})
|
|
1447
1426
|
] });
|
|
1448
1427
|
}
|
|
1449
|
-
|
|
1450
|
-
//#region src/components/features/picker/wrappers/date-time-range-picker.tsx
|
|
1428
|
+
// src/components/features/picker/wrappers/date-time-range-picker.tsx
|
|
1451
1429
|
function DateTimeRangePicker({ value, onChange, placeholder = "Pick a date & time range", clearable = true, responsive = true, sheetTitle = "Pick a date & time range", 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 }) {
|
|
1452
1430
|
return /* @__PURE__ */ jsx(Picker.Root, {
|
|
1453
1431
|
mode: "datetime-range",
|
|
@@ -1521,5 +1499,4 @@ function DateTimeRangePicker({ value, onChange, placeholder = "Pick a date & tim
|
|
|
1521
1499
|
});
|
|
1522
1500
|
}
|
|
1523
1501
|
DateTimeRangePicker.displayName = "DateTimeRangePicker";
|
|
1524
|
-
//#endregion
|
|
1525
1502
|
export { formatInTimezone as A, isDateBearingMode as B, PickerClear as C, PickerCalendar as D, PickerContent as E, zonedDateToIso as F, isTimeBearingMode as H, ALLOWED_STEPS as I, DATE_BEARING_MODES as L, getBrowserTimezone as M, getTimezoneOffset as N, PickerContext as O, isoToZonedDate as P, RANGE_MODES as R, PickerCancel as S, PickerReset as T, endOfDayInTz as U, isRangeMode as V, startOfDayInTz as W, parseTimeString as _, PickerTimezoneIndicator as a, PickerPresets as b, Picker as c, DATE_PRESETS as d, getDefaultPresets as f, isValidTimeString as g, formatTimeLabel as h, PickerTrigger as i, formatTimezoneLabel as j, usePickerContext as k, usePresets as l, dateToYYYYMMDD as m, DefaultFooter as n, PickerTimeInput as o, usePickerState as p, formatPickerValue as r, useTimeSlots as s, DateTimeRangePicker as t, DATETIME_PRESETS as u, resolveCommit as v, PickerFooter as w, PickerApply as x, useKeyboardShortcuts as y, TIME_BEARING_MODES as z };
|
package/dist/dialog/index.mjs
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { Dialog };
|
|
1
|
+
export { t as Dialog } from "../dialog-C8RXIQYm.mjs";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { t as
|
|
2
|
-
import {
|
|
3
|
-
import { t as CloseIcon } from "./close.icon-
|
|
1
|
+
import { a as DialogFooter, c as DialogPortal, i as DialogDescription, l as DialogTitle, n as DialogClose, s as DialogOverlay$1, t as Dialog$1, u as DialogTrigger } from "./dialog-D6sDXaH6.mjs";
|
|
2
|
+
import { t as cn } from "./utils-CTIuhCOs.mjs";
|
|
3
|
+
import { t as CloseIcon } from "./close.icon-BCPmH4nN.mjs";
|
|
4
4
|
import "react";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
7
|
-
|
|
7
|
+
// src/components/base/dialog/dialog.tsx
|
|
8
8
|
function Dialog({ children, ...props }) {
|
|
9
9
|
return /* @__PURE__ */ jsx(Dialog$1, {
|
|
10
10
|
...props,
|
|
@@ -67,5 +67,4 @@ Dialog.Header = Header;
|
|
|
67
67
|
Dialog.Body = Body;
|
|
68
68
|
Dialog.Footer = Footer;
|
|
69
69
|
Dialog.Overlay = DialogOverlay;
|
|
70
|
-
//#endregion
|
|
71
70
|
export { Dialog as t };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { t as cn } from "./utils-
|
|
1
|
+
import { t as cn } from "./utils-CTIuhCOs.mjs";
|
|
2
2
|
import { XIcon } from "lucide-react";
|
|
3
3
|
import "react";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
6
|
-
|
|
6
|
+
// ../shadcn/ui/dialog.tsx
|
|
7
7
|
function Dialog({ ...props }) {
|
|
8
8
|
return /* @__PURE__ */ jsx(DialogPrimitive.Root, {
|
|
9
9
|
"data-slot": "dialog",
|
|
@@ -80,5 +80,4 @@ function DialogDescription({ className, ...props }) {
|
|
|
80
80
|
...props
|
|
81
81
|
});
|
|
82
82
|
}
|
|
83
|
-
//#endregion
|
|
84
83
|
export { DialogFooter as a, DialogPortal as c, DialogDescription as i, DialogTitle as l, DialogClose as n, DialogHeader as o, DialogContent as r, DialogOverlay as s, Dialog as t, DialogTrigger as u };
|
package/dist/dropdown/index.mjs
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger };
|
|
1
|
+
export { t as DropdownMenu, n as DropdownMenuCheckboxItem, r as DropdownMenuContent, i as DropdownMenuGroup, a as DropdownMenuItem, o as DropdownMenuLabel, s as DropdownMenuPortal, c as DropdownMenuRadioGroup, l as DropdownMenuRadioItem, u as DropdownMenuSeparator, d as DropdownMenuShortcut, f as DropdownMenuSub, p as DropdownMenuSubContent, m as DropdownMenuSubTrigger, h as DropdownMenuTrigger } from "../dropdown-DR9j3Ni_.mjs";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { t as cn } from "./utils-
|
|
2
|
-
import { t as Icon } from "./icon-wrapper-
|
|
1
|
+
import { t as cn } from "./utils-CTIuhCOs.mjs";
|
|
2
|
+
import { t as Icon } from "./icon-wrapper-CIk2th6R.mjs";
|
|
3
3
|
import { CheckIcon, ChevronRightIcon, CircleIcon } from "lucide-react";
|
|
4
4
|
import "react";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
7
|
-
|
|
7
|
+
// src/components/features/dropdown/dropdown.tsx
|
|
8
8
|
/**
|
|
9
9
|
* Datum Dropdown Menu Component
|
|
10
10
|
* Extends shadcn DropdownMenu with:
|
|
@@ -106,5 +106,4 @@ function DropdownMenuSubContent({ className, ...props }) {
|
|
|
106
106
|
...props
|
|
107
107
|
});
|
|
108
108
|
}
|
|
109
|
-
//#endregion
|
|
110
109
|
export { DropdownMenuItem as a, DropdownMenuRadioGroup as c, DropdownMenuShortcut as d, DropdownMenuSub as f, DropdownMenuTrigger as h, DropdownMenuGroup as i, DropdownMenuRadioItem as l, DropdownMenuSubTrigger as m, DropdownMenuCheckboxItem as n, DropdownMenuLabel as o, DropdownMenuSubContent as p, DropdownMenuContent as r, DropdownMenuPortal as s, DropdownMenu as t, DropdownMenuSeparator as u };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { t as cn } from "./utils-
|
|
1
|
+
import { t as cn } from "./utils-CTIuhCOs.mjs";
|
|
2
2
|
import { CheckIcon, ChevronRightIcon, CircleIcon } from "lucide-react";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
6
|
-
|
|
6
|
+
// ../shadcn/ui/dropdown-menu.tsx
|
|
7
7
|
/**
|
|
8
8
|
* Vanilla shadcn/ui DropdownMenu Component
|
|
9
9
|
* Pure shadcn dropdown without Datum customizations
|
|
@@ -78,5 +78,4 @@ function DropdownMenuShortcut({ className, ...props }) {
|
|
|
78
78
|
});
|
|
79
79
|
}
|
|
80
80
|
DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
|
|
81
|
-
//#endregion
|
|
82
81
|
export { DropdownMenuRadioGroup as a, DropdownMenuTrigger as c, DropdownMenuLabel as i, DropdownMenuCheckboxItem as n, DropdownMenuRadioItem as o, DropdownMenuContent as r, DropdownMenuSeparator as s, DropdownMenu as t };
|
package/dist/dropzone/index.mjs
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { Dropzone, DropzoneContent, DropzoneEmptyState, FileInputButton };
|
|
1
|
+
export { t as Dropzone, n as DropzoneContent, r as DropzoneEmptyState, i as FileInputButton } from "../dropzone-qKYfSe7o.mjs";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { t as cn } from "./utils-
|
|
2
|
-
import { t as Button } from "./button-
|
|
3
|
-
import { t as Button$1 } from "./button-
|
|
4
|
-
import { t as Icon } from "./icon-wrapper-
|
|
1
|
+
import { t as cn } from "./utils-CTIuhCOs.mjs";
|
|
2
|
+
import { t as Button } from "./button-Cn4KagBO.mjs";
|
|
3
|
+
import { t as Button$1 } from "./button-C57mkFkS.mjs";
|
|
4
|
+
import { t as Icon } from "./icon-wrapper-CIk2th6R.mjs";
|
|
5
5
|
import { UploadIcon } from "lucide-react";
|
|
6
6
|
import { createContext, use, useRef } from "react";
|
|
7
7
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
import { useDropzone } from "react-dropzone";
|
|
9
|
-
|
|
9
|
+
// src/components/features/file-input-button/file-input-button.tsx
|
|
10
10
|
/**
|
|
11
11
|
* A simple button that triggers a file input dialog.
|
|
12
12
|
* Alternative to Dropzone for cases where drag-and-drop is not needed.
|
|
@@ -85,8 +85,7 @@ function FileInputButton({ accept, maxSize, minSize, multiple = false, onFileSel
|
|
|
85
85
|
children
|
|
86
86
|
})] });
|
|
87
87
|
}
|
|
88
|
-
|
|
89
|
-
//#region src/components/features/dropzone/dropzone.tsx
|
|
88
|
+
// src/components/features/dropzone/dropzone.tsx
|
|
90
89
|
function renderBytes(bytes) {
|
|
91
90
|
const units = [
|
|
92
91
|
"B",
|
|
@@ -216,5 +215,4 @@ function DropzoneEmptyState({ children, className, icon, label, description, sho
|
|
|
216
215
|
]
|
|
217
216
|
});
|
|
218
217
|
}
|
|
219
|
-
//#endregion
|
|
220
218
|
export { FileInputButton as i, DropzoneContent as n, DropzoneEmptyState as r, Dropzone as t };
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { EmptyContent };
|
|
1
|
+
export { t as EmptyContent } from "../empty-content-CTMHak36.mjs";
|