@datum-cloud/datum-ui 0.8.1 → 0.10.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/{adapter-context-NyGTDZYq.mjs → adapter-context-DemTWhel.mjs} +3 -3
- package/dist/alert/index.mjs +1 -1
- package/dist/{alert-BDj6od5I.mjs → alert-Cz56SqdN.mjs} +2 -2
- package/dist/app-navigation/index.mjs +2 -2
- package/dist/{app-navigation-rSOfo1KV.mjs → app-navigation-CG0A8Qjz.mjs} +12 -6
- package/dist/autocomplete/index.mjs +1 -1
- package/dist/{autocomplete-DdbTQe6u.mjs → autocomplete-ChuPNldi.mjs} +6 -6
- package/dist/autosearch/index.mjs +12 -12
- package/dist/avatar-stack/index.mjs +1 -1
- package/dist/{avatar-stack-CDhlA1Nm.mjs → avatar-stack-WqoQ3l06.mjs} +1 -1
- package/dist/{button-D3RrsMfQ.mjs → button-Rw1xI-k9.mjs} +2 -2
- package/dist/calendar/index.mjs +1 -1
- package/dist/calendar-D_DriVHT.mjs +77 -0
- package/dist/{calendar-C-Hbf74r.mjs → calendar-Dwvq3Vu_.mjs} +6 -6
- package/dist/calendar-date-picker-CchHKodM.mjs +52 -0
- package/dist/chart/index.mjs +1 -1
- package/dist/{chart-CUa21ynK.mjs → chart-DgcOwkOh.mjs} +5 -5
- package/dist/code-editor/index.mjs +1 -1
- package/dist/{col-DISdGlqY.mjs → col-Q6yazFwL.mjs} +2 -1
- package/dist/components/base/button/button.d.ts.map +1 -1
- package/dist/components/features/app-navigation/app-navigation.d.ts +5 -1
- package/dist/components/features/app-navigation/app-navigation.d.ts.map +1 -1
- package/dist/components/features/app-navigation/nav-menu.d.ts +4 -1
- package/dist/components/features/app-navigation/nav-menu.d.ts.map +1 -1
- package/dist/components/features/calendar-date-picker/calendar-date-picker.d.ts +6 -5
- package/dist/components/features/calendar-date-picker/calendar-date-picker.d.ts.map +1 -1
- package/dist/components/features/calendar-date-picker/types.d.ts +19 -0
- package/dist/components/features/calendar-date-picker/types.d.ts.map +1 -1
- package/dist/components/features/code-editor/code-editor.d.ts +1 -1
- package/dist/components/features/code-editor/code-editor.d.ts.map +1 -1
- package/dist/components/features/code-editor/index.d.ts +1 -1
- package/dist/components/features/code-editor/index.d.ts.map +1 -1
- package/dist/components/features/code-editor/types.d.ts +25 -2
- package/dist/components/features/code-editor/types.d.ts.map +1 -1
- package/dist/components/features/data-table/core/client-provider.d.ts.map +1 -1
- package/dist/components/features/date-time-picker/date-time-picker.d.ts +12 -4
- package/dist/components/features/date-time-picker/date-time-picker.d.ts.map +1 -1
- package/dist/components/features/date-time-picker/types.d.ts +9 -0
- package/dist/components/features/date-time-picker/types.d.ts.map +1 -1
- package/dist/components/features/grid/components/col.d.ts +1 -1
- package/dist/components/features/grid/components/col.d.ts.map +1 -1
- package/dist/components/features/grid/components/row.d.ts +1 -1
- package/dist/components/features/grid/components/row.d.ts.map +1 -1
- package/dist/components/features/index.d.ts +1 -0
- package/dist/components/features/index.d.ts.map +1 -1
- package/dist/components/features/logo/index.d.ts +7 -0
- package/dist/components/features/logo/index.d.ts.map +1 -0
- package/dist/components/features/logo/logo-flat.d.ts +28 -0
- package/dist/components/features/logo/logo-flat.d.ts.map +1 -0
- package/dist/components/features/logo/logo-icon.d.ts +27 -0
- package/dist/components/features/logo/logo-icon.d.ts.map +1 -0
- package/dist/components/features/logo/logo-stacked.d.ts +24 -0
- package/dist/components/features/logo/logo-stacked.d.ts.map +1 -0
- package/dist/components/features/logo/logo-text.d.ts +27 -0
- package/dist/components/features/logo/logo-text.d.ts.map +1 -0
- package/dist/components/features/logo/logo.d.ts +24 -0
- package/dist/components/features/logo/logo.d.ts.map +1 -0
- package/dist/components/features/logo/logo.styles.d.ts +28 -0
- package/dist/components/features/logo/logo.styles.d.ts.map +1 -0
- package/dist/components/features/logo/themed/index.d.ts +2 -0
- package/dist/components/features/logo/themed/index.d.ts.map +1 -0
- package/dist/components/features/logo/themed/logo-themed.d.ts +54 -0
- package/dist/components/features/logo/themed/logo-themed.d.ts.map +1 -0
- package/dist/components/features/picker/components/calendar.d.ts +14 -0
- package/dist/components/features/picker/components/calendar.d.ts.map +1 -0
- package/dist/components/features/picker/components/content.d.ts +18 -0
- package/dist/components/features/picker/components/content.d.ts.map +1 -0
- package/dist/components/features/picker/components/context.d.ts +57 -0
- package/dist/components/features/picker/components/context.d.ts.map +1 -0
- package/dist/components/features/picker/components/footer.d.ts +35 -0
- package/dist/components/features/picker/components/footer.d.ts.map +1 -0
- package/dist/components/features/picker/components/index.d.ts +36 -0
- package/dist/components/features/picker/components/index.d.ts.map +1 -0
- package/dist/components/features/picker/components/presets.d.ts +9 -0
- package/dist/components/features/picker/components/presets.d.ts.map +1 -0
- package/dist/components/features/picker/components/root.d.ts +40 -0
- package/dist/components/features/picker/components/root.d.ts.map +1 -0
- package/dist/components/features/picker/components/time-input-field.d.ts +13 -0
- package/dist/components/features/picker/components/time-input-field.d.ts.map +1 -0
- package/dist/components/features/picker/components/time-input.d.ts +13 -0
- package/dist/components/features/picker/components/time-input.d.ts.map +1 -0
- package/dist/components/features/picker/components/timezone-indicator.d.ts +14 -0
- package/dist/components/features/picker/components/timezone-indicator.d.ts.map +1 -0
- package/dist/components/features/picker/components/timezone-select.d.ts +16 -0
- package/dist/components/features/picker/components/timezone-select.d.ts.map +1 -0
- package/dist/components/features/picker/components/trigger.d.ts +23 -0
- package/dist/components/features/picker/components/trigger.d.ts.map +1 -0
- package/dist/components/features/picker/hooks/index.d.ts +5 -0
- package/dist/components/features/picker/hooks/index.d.ts.map +1 -0
- package/dist/components/features/picker/hooks/use-keyboard-shortcuts.d.ts +25 -0
- package/dist/components/features/picker/hooks/use-keyboard-shortcuts.d.ts.map +1 -0
- package/dist/components/features/picker/hooks/use-picker-state.d.ts +51 -0
- package/dist/components/features/picker/hooks/use-picker-state.d.ts.map +1 -0
- package/dist/components/features/picker/hooks/use-presets.d.ts +24 -0
- package/dist/components/features/picker/hooks/use-presets.d.ts.map +1 -0
- package/dist/components/features/picker/hooks/use-time-slots.d.ts +21 -0
- package/dist/components/features/picker/hooks/use-time-slots.d.ts.map +1 -0
- package/dist/components/features/picker/index.d.ts +8 -0
- package/dist/components/features/picker/index.d.ts.map +1 -0
- package/dist/components/features/picker/internal/use-deprecation-warning.d.ts +9 -0
- package/dist/components/features/picker/internal/use-deprecation-warning.d.ts.map +1 -0
- package/dist/components/features/picker/presets/defaults.d.ts +16 -0
- package/dist/components/features/picker/presets/defaults.d.ts.map +1 -0
- package/dist/components/features/picker/presets/index.d.ts +2 -0
- package/dist/components/features/picker/presets/index.d.ts.map +1 -0
- package/dist/components/features/picker/types.d.ts +70 -0
- package/dist/components/features/picker/types.d.ts.map +1 -0
- package/dist/components/features/picker/utils/commit.d.ts +16 -0
- package/dist/components/features/picker/utils/commit.d.ts.map +1 -0
- package/dist/components/features/picker/utils/compare.d.ts +12 -0
- package/dist/components/features/picker/utils/compare.d.ts.map +1 -0
- package/dist/components/features/picker/utils/format-value.d.ts +25 -0
- package/dist/components/features/picker/utils/format-value.d.ts.map +1 -0
- package/dist/components/features/picker/utils/format.d.ts +38 -0
- package/dist/components/features/picker/utils/format.d.ts.map +1 -0
- package/dist/components/features/picker/utils/index.d.ts +7 -0
- package/dist/components/features/picker/utils/index.d.ts.map +1 -0
- package/dist/components/features/picker/utils/range.d.ts +26 -0
- package/dist/components/features/picker/utils/range.d.ts.map +1 -0
- package/dist/components/features/picker/utils/timezone.d.ts +38 -0
- package/dist/components/features/picker/utils/timezone.d.ts.map +1 -0
- package/dist/components/features/picker/wrappers/date-picker.d.ts +10 -0
- package/dist/components/features/picker/wrappers/date-picker.d.ts.map +1 -0
- package/dist/components/features/picker/wrappers/date-range-picker.d.ts +16 -0
- package/dist/components/features/picker/wrappers/date-range-picker.d.ts.map +1 -0
- package/dist/components/features/picker/wrappers/date-range-time-picker.d.ts +16 -0
- package/dist/components/features/picker/wrappers/date-range-time-picker.d.ts.map +1 -0
- package/dist/components/features/picker/wrappers/date-time-picker.d.ts +20 -0
- package/dist/components/features/picker/wrappers/date-time-picker.d.ts.map +1 -0
- package/dist/components/features/picker/wrappers/date-time-range-picker.d.ts +16 -0
- package/dist/components/features/picker/wrappers/date-time-range-picker.d.ts.map +1 -0
- package/dist/components/features/picker/wrappers/index.d.ts +16 -0
- package/dist/components/features/picker/wrappers/index.d.ts.map +1 -0
- package/dist/components/features/picker/wrappers/internal/default-footer.d.ts +7 -0
- package/dist/components/features/picker/wrappers/internal/default-footer.d.ts.map +1 -0
- package/dist/components/features/picker/wrappers/time-picker.d.ts +14 -0
- package/dist/components/features/picker/wrappers/time-picker.d.ts.map +1 -0
- package/dist/components/features/picker/wrappers/time-range-picker.d.ts +16 -0
- package/dist/components/features/picker/wrappers/time-range-picker.d.ts.map +1 -0
- package/dist/components/features/picker/wrappers/types.d.ts +118 -0
- package/dist/components/features/picker/wrappers/types.d.ts.map +1 -0
- package/dist/components/features/tag-input/tag-input.d.ts +1 -1
- package/dist/components/features/tag-input/tag-input.d.ts.map +1 -1
- package/dist/components/features/time-picker/time-picker.d.ts +5 -0
- package/dist/components/features/time-picker/time-picker.d.ts.map +1 -1
- package/dist/components/features/time-picker/types.d.ts +5 -0
- package/dist/components/features/time-picker/types.d.ts.map +1 -1
- package/dist/components/features/time-range-picker/index.d.ts +5 -0
- package/dist/components/features/time-range-picker/index.d.ts.map +1 -1
- package/dist/components/features/time-range-picker/time-range-picker.d.ts +19 -14
- package/dist/components/features/time-range-picker/time-range-picker.d.ts.map +1 -1
- package/dist/components/features/time-range-picker/types.d.ts +20 -0
- package/dist/components/features/time-range-picker/types.d.ts.map +1 -1
- package/dist/data-table/index.mjs +22 -15
- package/dist/date-picker/index.mjs +2 -2
- package/dist/date-range-picker-DNZh06zo.mjs +77 -0
- package/dist/date-time-picker/index.mjs +1 -1
- package/dist/date-time-picker-BiobghTJ.mjs +43 -0
- package/dist/date-time-picker-C0fF7s_e.mjs +109 -0
- package/dist/date-time-range-picker-BAsH_Wv9.mjs +82 -0
- package/dist/default-footer-DbpemJVl.mjs +1037 -0
- package/dist/dropzone/index.mjs +1 -1
- package/dist/{dropzone-Bt0plEuw.mjs → dropzone-DXH0xHso.mjs} +1 -1
- package/dist/empty-content/index.mjs +1 -1
- package/dist/form/adapters/conform/index.mjs +19 -19
- package/dist/form/adapters/rhf/index.mjs +18 -18
- package/dist/form/index.mjs +2 -2
- package/dist/form/stepper/index.mjs +25 -23
- package/dist/{form-CCNN9VtJ.mjs → form-DvgKb4s4.mjs} +49 -42
- package/dist/{form-context-CeKyvO-A.mjs → form-context-0usxTumz.mjs} +3 -3
- package/dist/grid/index.mjs +1 -1
- package/dist/hooks/index.mjs +2 -2
- package/dist/index.mjs +44 -42
- package/dist/input-group/index.mjs +1 -1
- package/dist/{input-group-DDtz-RT7.mjs → input-group-CeMsDhOk.mjs} +1 -1
- package/dist/input-number/index.mjs +1 -1
- package/dist/{input-number-Diu-C6d5.mjs → input-number-BU4nno8J.mjs} +1 -1
- package/dist/loader-overlay/index.mjs +1 -1
- package/dist/logo/index.mjs +3 -0
- package/dist/logo/themed/index.mjs +106 -0
- package/dist/logo-BQVyMDDx.mjs +23 -0
- package/dist/logo-text-BW31T2dS.mjs +227 -0
- package/dist/map/index.mjs +1 -1
- package/dist/{map-qo7bY_g_.mjs → map-t6n7VaX1.mjs} +24 -27
- package/dist/more-actions/index.mjs +2 -2
- package/dist/{more-actions-Ca5qqd0H.mjs → more-actions-Bp0b_jek.mjs} +2 -2
- package/dist/multi-select/index.mjs +1 -1
- package/dist/{multi-select-DM_dxnSV.mjs → multi-select-7jly2Hcd.mjs} +6 -6
- package/dist/page-title/index.mjs +1 -1
- package/dist/picker/index.mjs +273 -0
- package/dist/rich-text-editor/index.mjs +1 -1
- package/dist/{rich-text-editor-CQH_U4T5.mjs → rich-text-editor-Ddqx_EiO.mjs} +1 -1
- package/dist/select/index.mjs +1 -1
- package/dist/select-By1ZqPgr.mjs +94 -0
- package/dist/select-Ck0szhAH.mjs +73 -0
- package/dist/sidebar/index.mjs +1 -1
- package/dist/{sidebar-B8LQJiNI.mjs → sidebar-CUnFkH7o.mjs} +32 -32
- package/dist/skeleton/index.mjs +1 -1
- package/dist/{skeleton-D4HOEiOZ.mjs → skeleton-CxAhQT6T.mjs} +1 -1
- package/dist/stepper/index.mjs +1 -1
- package/dist/{stepper-Beb-zbdL.mjs → stepper-BMC_QbJK.mjs} +7 -7
- package/dist/styles/root.css +4 -2
- package/dist/styles/shadcn/shadcn.css +212 -213
- package/dist/switch/index.mjs +1 -1
- package/dist/table/index.mjs +1 -1
- package/dist/tag-input/index.mjs +1 -1
- package/dist/{tag-input-Bf4GMptp.mjs → tag-input-CV1JbKTm.mjs} +1 -1
- package/dist/task-queue/index.mjs +1 -1
- package/dist/{task-queue-dropdown-D-LncEWm.mjs → task-queue-dropdown-J1FuQOSr.mjs} +3 -3
- package/dist/textarea/index.mjs +1 -1
- package/dist/theme/index.mjs +1 -1
- package/dist/{themes-CAiN4b6G.mjs → themes-08-znmBI.mjs} +16 -16
- package/dist/time-input-9LdNL0Us.mjs +196 -0
- package/dist/time-picker/index.mjs +1 -1
- package/dist/time-picker-B-vpUClR.mjs +45 -0
- package/dist/time-picker-C840fLl6.mjs +49 -0
- package/dist/timezone-indicator-COoeMKKs.mjs +27 -0
- package/dist/{to-api-format-CgKcC9SK.mjs → to-api-format-CmXTvYka.mjs} +58 -243
- package/dist/toast/index.mjs +2 -2
- package/dist/{toast-DDdLgY53.mjs → toast-Bd5Kk7BB.mjs} +1 -1
- package/dist/tooltip/index.mjs +1 -1
- package/dist/transfer/index.mjs +1 -1
- package/dist/{transfer-CoGPwOc6.mjs → transfer-CuJGL420.mjs} +6 -6
- package/dist/{types-CKIe2WlV.mjs → types-DvMIxilw.mjs} +9 -3
- package/dist/typography/index.mjs +1 -1
- package/dist/{typography-TRKP_CLT.mjs → typography-CBwfg-vz.mjs} +5 -5
- package/dist/{use-copy-to-clipboard-D7KyLIAt.mjs → use-copy-to-clipboard-ZHDvfV3W.mjs} +1 -1
- package/dist/use-deprecation-warning-Dy_DOyLu.mjs +20 -0
- package/dist/{use-display-touched-C-afz17j.mjs → use-display-touched-CiY6ajpy.mjs} +5 -5
- package/dist/{use-option-picker-BXQOfyrK.mjs → use-option-picker-DV5O68eV.mjs} +1 -1
- package/dist/utils/index.mjs +1 -1
- package/dist/visually-hidden/index.mjs +1 -1
- package/package.json +40 -25
- package/dist/calendar-date-picker-BaykEs6j.mjs +0 -749
- package/dist/date-time-picker-DKOxrhmc.mjs +0 -193
- package/dist/select-zxwykvQn.mjs +0 -163
- package/dist/time-picker-BZF5jbF6.mjs +0 -99
- package/dist/use-date-constraints-R3H4lIoT.mjs +0 -41
- /package/dist/{action-row-DnhBhMtt.mjs → action-row-DXw4UnHU.mjs} +0 -0
- /package/dist/{empty-content-CBh5bbtJ.mjs → empty-content-DTk_lwnh.mjs} +0 -0
- /package/dist/{hooks-DQXVwbrs.mjs → hooks-BPxgIHKV.mjs} +0 -0
- /package/dist/{loader-overlay-C2WDla6V.mjs → loader-overlay-B3YEoOFJ.mjs} +0 -0
- /package/dist/{map-leaflet-imports-yWwH4CHB.mjs → map-leaflet-imports-C8l0RTTP.mjs} +0 -0
- /package/dist/{page-title-ChLiv6gB.mjs → page-title-CGW3f4qH.mjs} +0 -0
- /package/dist/{skeleton-D2xuJdE1.mjs → skeleton-B1NOdZGM.mjs} +0 -0
- /package/dist/{switch-DcSF42Kc.mjs → switch-BcQaR1Bp.mjs} +0 -0
- /package/dist/{table-DWGT4cqh.mjs → table-ouGk4Vxe.mjs} +0 -0
- /package/dist/{textarea-BoChBcFz.mjs → textarea-q-k7DYwi.mjs} +0 -0
- /package/dist/{toast-D5XD7goD.mjs → toast-BWol1pyV.mjs} +0 -0
- /package/dist/{tooltip-a7NTDCWw.mjs → tooltip-CHuzXR_O.mjs} +0 -0
- /package/dist/{utils-BwB1mIdZ.mjs → utils-C07H7h7q.mjs} +0 -0
- /package/dist/{visuallyhidden-BHOPczmW.mjs → visuallyhidden-CoIJOJ9z.mjs} +0 -0
|
@@ -4,13 +4,13 @@ import { t as Button } from "../button-BllvE9Lm.mjs";
|
|
|
4
4
|
import { t as Checkbox } from "../checkbox-I5BvrMPe.mjs";
|
|
5
5
|
import { t as Input } from "../input-FKGqZypx.mjs";
|
|
6
6
|
import { t as ResponsiveDropdown } from "../responsive-dropdown-IFroDgKn.mjs";
|
|
7
|
-
import { i as SelectItem, l as SelectTrigger, n as SelectContent, t as Select, u as SelectValue } from "../select-
|
|
8
|
-
import { t as Skeleton } from "../skeleton-
|
|
9
|
-
import { c as TableRow, i as TableCell, n as TableBody, o as TableHead, s as TableHeader, t as Table } from "../table-
|
|
10
|
-
import { t as Autocomplete } from "../autocomplete-
|
|
11
|
-
import { t as CalendarDatePicker } from "../calendar-date-picker-
|
|
12
|
-
import { t as ActionRow } from "../action-row-
|
|
13
|
-
import { t as MultiSelect } from "../multi-select-
|
|
7
|
+
import { i as SelectItem, l as SelectTrigger, n as SelectContent, t as Select, u as SelectValue } from "../select-Ck0szhAH.mjs";
|
|
8
|
+
import { t as Skeleton } from "../skeleton-CxAhQT6T.mjs";
|
|
9
|
+
import { c as TableRow, i as TableCell, n as TableBody, o as TableHead, s as TableHeader, t as Table } from "../table-ouGk4Vxe.mjs";
|
|
10
|
+
import { t as Autocomplete } from "../autocomplete-ChuPNldi.mjs";
|
|
11
|
+
import { t as CalendarDatePicker } from "../calendar-date-picker-CchHKodM.mjs";
|
|
12
|
+
import { t as ActionRow } from "../action-row-DXw4UnHU.mjs";
|
|
13
|
+
import { t as MultiSelect } from "../multi-select-7jly2Hcd.mjs";
|
|
14
14
|
import { ArrowDown, ArrowUp, ArrowUpDown, ChevronLeft, ChevronRight, MoreHorizontal, X } from "lucide-react";
|
|
15
15
|
import { createContext, memo, use, useCallback, useContext, useEffect, useId, useMemo, useRef, useState, useSyncExternalStore } from "react";
|
|
16
16
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1228,6 +1228,14 @@ function ClientProvider(props) {
|
|
|
1228
1228
|
}
|
|
1229
1229
|
store.setData(data);
|
|
1230
1230
|
}, [data, store]);
|
|
1231
|
+
const isPageSizeInitial = useRef(true);
|
|
1232
|
+
useEffect(() => {
|
|
1233
|
+
if (isPageSizeInitial.current) {
|
|
1234
|
+
isPageSizeInitial.current = false;
|
|
1235
|
+
return;
|
|
1236
|
+
}
|
|
1237
|
+
if (pageSize != null) store.setPageSize(pageSize);
|
|
1238
|
+
}, [pageSize, store]);
|
|
1231
1239
|
const [tableReady, setTableReady] = useState(false);
|
|
1232
1240
|
useEffect(() => setTableReady(true), []);
|
|
1233
1241
|
useEffect(() => {
|
|
@@ -1494,17 +1502,16 @@ function DatePickerFilter({ column, label, className, datePickerPopoverClassName
|
|
|
1494
1502
|
registerFilter,
|
|
1495
1503
|
unregisterFilter
|
|
1496
1504
|
]);
|
|
1497
|
-
const dateRange = useMemo(() => {
|
|
1498
|
-
const date = rawValue ? new Date(rawValue) : void 0;
|
|
1499
|
-
return {
|
|
1500
|
-
from: date,
|
|
1501
|
-
to: date
|
|
1502
|
-
};
|
|
1503
|
-
}, [rawValue]);
|
|
1504
1505
|
return /* @__PURE__ */ jsx("div", {
|
|
1505
1506
|
"data-slot": "dt-filter",
|
|
1506
1507
|
children: /* @__PURE__ */ jsx(CalendarDatePicker, {
|
|
1507
|
-
date:
|
|
1508
|
+
date: useMemo(() => {
|
|
1509
|
+
const date = rawValue ? new Date(rawValue) : void 0;
|
|
1510
|
+
return {
|
|
1511
|
+
from: date,
|
|
1512
|
+
to: date
|
|
1513
|
+
};
|
|
1514
|
+
}, [rawValue]),
|
|
1508
1515
|
numberOfMonths: 1,
|
|
1509
1516
|
closeOnSelect: true,
|
|
1510
1517
|
placeholder: label,
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { t as CalendarDatePicker } from "../calendar-date-picker-
|
|
2
|
-
import { C as utcToLocalInputString, S as utcStringToZonedDate, _ as getBrowserTimezone, a as
|
|
1
|
+
import { t as CalendarDatePicker } from "../calendar-date-picker-CchHKodM.mjs";
|
|
2
|
+
import { C as utcToLocalInputString, S as utcStringToZonedDate, _ as getBrowserTimezone, a as TimeRangePicker, b as getTimezoneOffset, c as getPresetByKey, d as TimezoneSelector, f as QuickRangesPanel, g as formatUtcForDisplay, h as formatTimezoneLabel, i as formatTimeRangeDisplay, l as getPresetByShortcut, m as createTimezoneOption, n as formatDateForInput, o as DEFAULT_PRESETS, p as CustomRangePanel, r as formatSingleTimeDisplay, s as getDefaultPreset, t as toApiTimeRange, u as getPresetRange, v as getDefaultTimezoneOptions, w as zonedDateToUtcString, x as localInputStringToUtc, y as getShortTimezoneDisplay } from "../to-api-format-CmXTvYka.mjs";
|
|
3
3
|
export { CustomRangePanel as AbsoluteRangePanel, CustomRangePanel, CalendarDatePicker, DEFAULT_PRESETS, QuickRangesPanel, TimeRangePicker, TimezoneSelector, createTimezoneOption, formatDateForInput, formatSingleTimeDisplay, formatTimeRangeDisplay, formatTimezoneLabel, formatUtcForDisplay, getBrowserTimezone, getDefaultPreset, getDefaultTimezoneOptions, getPresetByKey, getPresetByShortcut, getPresetRange, getShortTimezoneDisplay, getTimezoneOffset, localInputStringToUtc, toApiTimeRange, utcStringToZonedDate, utcToLocalInputString, zonedDateToUtcString };
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { t as cn } from "./cn-D2KYQ917.mjs";
|
|
2
|
+
import { t as Button } from "./button-Rw1xI-k9.mjs";
|
|
3
|
+
import { S as PickerContent, c as PickerTrigger, l as Picker, s as formatPickerValue, t as DefaultFooter, w as usePickerContext } from "./default-footer-DbpemJVl.mjs";
|
|
4
|
+
import { t as PickerCalendar } from "./calendar-D_DriVHT.mjs";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
//#region src/components/features/picker/components/presets.tsx
|
|
7
|
+
function PickerPresets({ className }) {
|
|
8
|
+
const { presets, state, actions, timezone } = usePickerContext();
|
|
9
|
+
if (presets.length === 0) return null;
|
|
10
|
+
return /* @__PURE__ */ jsx("div", {
|
|
11
|
+
className: cn("border-border hidden flex-col gap-1 border-r p-2 md:flex", className),
|
|
12
|
+
children: presets.map((preset) => {
|
|
13
|
+
return /* @__PURE__ */ jsxs(Button, {
|
|
14
|
+
type: "button",
|
|
15
|
+
variant: state.selectedPresetKey === preset.key ? "default" : "ghost",
|
|
16
|
+
size: "sm",
|
|
17
|
+
className: "justify-start font-normal",
|
|
18
|
+
onClick: () => {
|
|
19
|
+
const range = preset.getRange(timezone);
|
|
20
|
+
actions.selectPreset(range, preset.key);
|
|
21
|
+
},
|
|
22
|
+
children: [/* @__PURE__ */ jsx("span", { children: preset.label }), preset.shortcut && /* @__PURE__ */ jsx("kbd", {
|
|
23
|
+
className: "bg-muted ml-auto hidden rounded border px-1.5 font-mono text-[10px] sm:inline-flex",
|
|
24
|
+
children: preset.shortcut
|
|
25
|
+
})]
|
|
26
|
+
}, preset.key);
|
|
27
|
+
})
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
PickerPresets.displayName = "Picker.Presets";
|
|
31
|
+
//#endregion
|
|
32
|
+
//#region src/components/features/picker/wrappers/date-range-picker.tsx
|
|
33
|
+
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 }) {
|
|
34
|
+
return /* @__PURE__ */ jsx(Picker.Root, {
|
|
35
|
+
mode: "date-range",
|
|
36
|
+
value,
|
|
37
|
+
onChange,
|
|
38
|
+
commit,
|
|
39
|
+
responsive,
|
|
40
|
+
presets,
|
|
41
|
+
excludePresets,
|
|
42
|
+
disablePast,
|
|
43
|
+
disableFuture,
|
|
44
|
+
minDate,
|
|
45
|
+
maxDate,
|
|
46
|
+
children: /* @__PURE__ */ jsx(PickerContent, {
|
|
47
|
+
trigger: /* @__PURE__ */ jsx(PickerTrigger, {
|
|
48
|
+
placeholder,
|
|
49
|
+
clearable,
|
|
50
|
+
disabled,
|
|
51
|
+
className,
|
|
52
|
+
triggerClassName,
|
|
53
|
+
id,
|
|
54
|
+
icon,
|
|
55
|
+
children: (v) => triggerLabel ? triggerLabel(v) : formatPickerValue(v, "date-range", { dateFormat })
|
|
56
|
+
}),
|
|
57
|
+
sheetTitle,
|
|
58
|
+
sheetDescription,
|
|
59
|
+
modal,
|
|
60
|
+
contentClassName: popoverClassName,
|
|
61
|
+
footer: /* @__PURE__ */ jsx(DefaultFooter, {}),
|
|
62
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
63
|
+
className: "flex flex-col md:flex-row",
|
|
64
|
+
children: [/* @__PURE__ */ jsx(PickerPresets, {}), /* @__PURE__ */ jsx(PickerCalendar, {
|
|
65
|
+
numberOfMonths,
|
|
66
|
+
minDate,
|
|
67
|
+
maxDate,
|
|
68
|
+
disablePast,
|
|
69
|
+
disableFuture
|
|
70
|
+
})]
|
|
71
|
+
})
|
|
72
|
+
})
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
DateRangePicker.displayName = "DateRangePicker";
|
|
76
|
+
//#endregion
|
|
77
|
+
export { PickerPresets as n, DateRangePicker as t };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as DateTimePicker } from "../date-time-picker-
|
|
1
|
+
import { t as DateTimePicker } from "../date-time-picker-BiobghTJ.mjs";
|
|
2
2
|
export { DateTimePicker };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { t as useDeprecationWarning } from "./use-deprecation-warning-Dy_DOyLu.mjs";
|
|
2
|
+
import { t as DateTimePicker$1 } from "./date-time-picker-C0fF7s_e.mjs";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
//#region src/components/features/date-time-picker/date-time-picker.tsx
|
|
5
|
+
/**
|
|
6
|
+
* @deprecated Use `DateTimePicker` from `@datum-cloud/datum-ui/picker`
|
|
7
|
+
* instead. This adapter shim ships through 0.10.x and is removed in 1.0.0.
|
|
8
|
+
* See `picker-migration.mdx`.
|
|
9
|
+
*
|
|
10
|
+
* Notable diff: legacy `showTimezoneIndicator` (default `false`) is the
|
|
11
|
+
* inverse of the new `hideTimezone` prop. The shim handles the inversion
|
|
12
|
+
* and pins the trigger label / time-input UX to the legacy semantics
|
|
13
|
+
* (typeable input via `timeInputMode='input'`, bare TZ name via
|
|
14
|
+
* `timezoneIndicatorVariant='compact'`).
|
|
15
|
+
*/
|
|
16
|
+
function DateTimePicker({ value, onChange, minDate, maxDate, disabledDates: _disabledDates, disablePast, disableFuture, timezone, showTimezoneIndicator = false, placeholder, disabled, className, modal, sheetTitle, sheetDescription, responsive = true }) {
|
|
17
|
+
useDeprecationWarning("DateTimePicker (legacy)", "DateTimePicker");
|
|
18
|
+
return /* @__PURE__ */ jsx(DateTimePicker$1, {
|
|
19
|
+
value: value ?? null,
|
|
20
|
+
onChange: (next) => {
|
|
21
|
+
onChange?.(next ?? "");
|
|
22
|
+
},
|
|
23
|
+
placeholder: placeholder ?? "Select date and time",
|
|
24
|
+
sheetTitle: sheetTitle ?? placeholder ?? "Select date and time",
|
|
25
|
+
sheetDescription,
|
|
26
|
+
responsive,
|
|
27
|
+
modal,
|
|
28
|
+
disabled,
|
|
29
|
+
className,
|
|
30
|
+
hideTimezone: !showTimezoneIndicator,
|
|
31
|
+
timezone,
|
|
32
|
+
minDate,
|
|
33
|
+
maxDate,
|
|
34
|
+
disablePast,
|
|
35
|
+
disableFuture,
|
|
36
|
+
timeInputMode: "input",
|
|
37
|
+
timezoneIndicatorVariant: "compact",
|
|
38
|
+
hourCycle: "24"
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
DateTimePicker.displayName = "DateTimePicker";
|
|
42
|
+
//#endregion
|
|
43
|
+
export { DateTimePicker as t };
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { t as cn } from "./cn-D2KYQ917.mjs";
|
|
2
|
+
import { A as zonedDateToIso, S as PickerContent, c as PickerTrigger, k as isoToZonedDate, l as Picker, s as formatPickerValue, t as DefaultFooter, w as usePickerContext, y as parseTimeString } from "./default-footer-DbpemJVl.mjs";
|
|
3
|
+
import { t as PickerCalendar } from "./calendar-D_DriVHT.mjs";
|
|
4
|
+
import { t as PickerTimeInput } from "./time-input-9LdNL0Us.mjs";
|
|
5
|
+
import { t as PickerTimezoneIndicator } from "./timezone-indicator-COoeMKKs.mjs";
|
|
6
|
+
import { useEffect, useState } from "react";
|
|
7
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
//#region src/components/features/picker/components/time-input-field.tsx
|
|
9
|
+
function formatZonedTimeOfDay(iso, tz) {
|
|
10
|
+
try {
|
|
11
|
+
const d = isoToZonedDate(iso, tz);
|
|
12
|
+
if (Number.isNaN(d.getTime())) return "";
|
|
13
|
+
return `${String(d.getHours()).padStart(2, "0")}:${String(d.getMinutes()).padStart(2, "0")}`;
|
|
14
|
+
} catch {
|
|
15
|
+
return "";
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
function PickerTimeInputField({ className, ariaLabel = "Select time", id }) {
|
|
19
|
+
const { mode, timezone, state, actions } = usePickerContext();
|
|
20
|
+
const isoValue = mode === "datetime" ? state.pendingValue : null;
|
|
21
|
+
const externalTimeValue = isoValue ? formatZonedTimeOfDay(isoValue, timezone) : "";
|
|
22
|
+
const [localValue, setLocalValue] = useState(externalTimeValue);
|
|
23
|
+
useEffect(() => {
|
|
24
|
+
setLocalValue(externalTimeValue);
|
|
25
|
+
}, [externalTimeValue]);
|
|
26
|
+
if (mode !== "datetime") return null;
|
|
27
|
+
const disabled = isoValue === null;
|
|
28
|
+
const handleChange = (e) => {
|
|
29
|
+
const next = e.target.value;
|
|
30
|
+
setLocalValue(next);
|
|
31
|
+
if (!isoValue) return;
|
|
32
|
+
const parsed = parseTimeString(next);
|
|
33
|
+
if (!parsed) return;
|
|
34
|
+
const d = isoToZonedDate(isoValue, timezone);
|
|
35
|
+
d.setHours(parsed.h, parsed.m, 0, 0);
|
|
36
|
+
actions.setSingleDatetime(zonedDateToIso(d, timezone));
|
|
37
|
+
};
|
|
38
|
+
return /* @__PURE__ */ jsx("input", {
|
|
39
|
+
type: "text",
|
|
40
|
+
id,
|
|
41
|
+
"aria-label": ariaLabel,
|
|
42
|
+
value: localValue,
|
|
43
|
+
onChange: handleChange,
|
|
44
|
+
disabled,
|
|
45
|
+
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)
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
PickerTimeInputField.displayName = "Picker.TimeInputField";
|
|
49
|
+
//#endregion
|
|
50
|
+
//#region src/components/features/picker/wrappers/date-time-picker.tsx
|
|
51
|
+
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 }) {
|
|
52
|
+
return /* @__PURE__ */ jsx(Picker.Root, {
|
|
53
|
+
mode: "datetime",
|
|
54
|
+
value,
|
|
55
|
+
onChange,
|
|
56
|
+
responsive,
|
|
57
|
+
timezone,
|
|
58
|
+
step,
|
|
59
|
+
hourCycle,
|
|
60
|
+
hideTimezone,
|
|
61
|
+
presets: [],
|
|
62
|
+
disablePast,
|
|
63
|
+
disableFuture,
|
|
64
|
+
minDate,
|
|
65
|
+
maxDate,
|
|
66
|
+
children: /* @__PURE__ */ jsx(PickerContent, {
|
|
67
|
+
trigger: /* @__PURE__ */ jsx(PickerTrigger, {
|
|
68
|
+
placeholder,
|
|
69
|
+
clearable,
|
|
70
|
+
disabled,
|
|
71
|
+
className,
|
|
72
|
+
triggerClassName,
|
|
73
|
+
id,
|
|
74
|
+
icon,
|
|
75
|
+
children: (v) => triggerLabel ? triggerLabel(v) : formatPickerValue(v, "datetime", {
|
|
76
|
+
timezone,
|
|
77
|
+
hourCycle,
|
|
78
|
+
dateFormat,
|
|
79
|
+
timeFormat
|
|
80
|
+
})
|
|
81
|
+
}),
|
|
82
|
+
sheetTitle,
|
|
83
|
+
sheetDescription,
|
|
84
|
+
modal,
|
|
85
|
+
contentClassName: popoverClassName,
|
|
86
|
+
footer: /* @__PURE__ */ jsx(DefaultFooter, {}),
|
|
87
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
88
|
+
className: "flex flex-col",
|
|
89
|
+
children: [
|
|
90
|
+
/* @__PURE__ */ jsx(PickerCalendar, {
|
|
91
|
+
numberOfMonths,
|
|
92
|
+
minDate,
|
|
93
|
+
maxDate,
|
|
94
|
+
disablePast,
|
|
95
|
+
disableFuture
|
|
96
|
+
}),
|
|
97
|
+
/* @__PURE__ */ jsx("div", {
|
|
98
|
+
className: "border-t p-3",
|
|
99
|
+
children: timeInputMode === "input" ? /* @__PURE__ */ jsx(PickerTimeInputField, {}) : /* @__PURE__ */ jsx(PickerTimeInput, { target: "embedded-from" })
|
|
100
|
+
}),
|
|
101
|
+
/* @__PURE__ */ jsx(PickerTimezoneIndicator, { variant: timezoneIndicatorVariant })
|
|
102
|
+
]
|
|
103
|
+
})
|
|
104
|
+
})
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
DateTimePicker.displayName = "DateTimePicker";
|
|
108
|
+
//#endregion
|
|
109
|
+
export { DateTimePicker as t };
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { S as PickerContent, c as PickerTrigger, l as Picker, s as formatPickerValue, t as DefaultFooter } from "./default-footer-DbpemJVl.mjs";
|
|
2
|
+
import { t as PickerCalendar } from "./calendar-D_DriVHT.mjs";
|
|
3
|
+
import { n as PickerPresets } from "./date-range-picker-DNZh06zo.mjs";
|
|
4
|
+
import { t as PickerTimeInput } from "./time-input-9LdNL0Us.mjs";
|
|
5
|
+
import { t as PickerTimezoneIndicator } from "./timezone-indicator-COoeMKKs.mjs";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
//#region src/components/features/picker/wrappers/date-time-range-picker.tsx
|
|
8
|
+
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 }) {
|
|
9
|
+
return /* @__PURE__ */ jsx(Picker.Root, {
|
|
10
|
+
mode: "datetime-range",
|
|
11
|
+
value,
|
|
12
|
+
onChange,
|
|
13
|
+
responsive,
|
|
14
|
+
timezone,
|
|
15
|
+
step,
|
|
16
|
+
hourCycle,
|
|
17
|
+
hideTimezone,
|
|
18
|
+
presets,
|
|
19
|
+
excludePresets,
|
|
20
|
+
disablePast,
|
|
21
|
+
disableFuture,
|
|
22
|
+
minDate,
|
|
23
|
+
maxDate,
|
|
24
|
+
children: /* @__PURE__ */ jsx(PickerContent, {
|
|
25
|
+
trigger: /* @__PURE__ */ jsx(PickerTrigger, {
|
|
26
|
+
placeholder,
|
|
27
|
+
clearable,
|
|
28
|
+
disabled,
|
|
29
|
+
className,
|
|
30
|
+
triggerClassName,
|
|
31
|
+
id,
|
|
32
|
+
icon,
|
|
33
|
+
children: (v) => triggerLabel ? triggerLabel(v) : formatPickerValue(v, "datetime-range", {
|
|
34
|
+
timezone,
|
|
35
|
+
hourCycle,
|
|
36
|
+
dateFormat,
|
|
37
|
+
timeFormat
|
|
38
|
+
})
|
|
39
|
+
}),
|
|
40
|
+
sheetTitle,
|
|
41
|
+
sheetDescription,
|
|
42
|
+
modal,
|
|
43
|
+
contentClassName: popoverClassName,
|
|
44
|
+
footer: /* @__PURE__ */ jsx(DefaultFooter, {}),
|
|
45
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
46
|
+
className: "flex flex-col md:flex-row",
|
|
47
|
+
children: [/* @__PURE__ */ jsx(PickerPresets, {}), /* @__PURE__ */ jsxs("div", {
|
|
48
|
+
className: "flex flex-col",
|
|
49
|
+
children: [
|
|
50
|
+
/* @__PURE__ */ jsx(PickerCalendar, {
|
|
51
|
+
numberOfMonths,
|
|
52
|
+
minDate,
|
|
53
|
+
maxDate,
|
|
54
|
+
disablePast,
|
|
55
|
+
disableFuture
|
|
56
|
+
}),
|
|
57
|
+
/* @__PURE__ */ jsxs("div", {
|
|
58
|
+
className: "flex gap-2 border-t p-3",
|
|
59
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
60
|
+
className: "flex-1",
|
|
61
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
62
|
+
className: "text-muted-foreground mb-1 text-xs",
|
|
63
|
+
children: "From"
|
|
64
|
+
}), /* @__PURE__ */ jsx(PickerTimeInput, { target: "embedded-from" })]
|
|
65
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
66
|
+
className: "flex-1",
|
|
67
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
68
|
+
className: "text-muted-foreground mb-1 text-xs",
|
|
69
|
+
children: "To"
|
|
70
|
+
}), /* @__PURE__ */ jsx(PickerTimeInput, { target: "embedded-to" })]
|
|
71
|
+
})]
|
|
72
|
+
}),
|
|
73
|
+
/* @__PURE__ */ jsx(PickerTimezoneIndicator, {})
|
|
74
|
+
]
|
|
75
|
+
})]
|
|
76
|
+
})
|
|
77
|
+
})
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
DateTimeRangePicker.displayName = "DateTimeRangePicker";
|
|
81
|
+
//#endregion
|
|
82
|
+
export { DateTimeRangePicker as t };
|