@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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"footer.d.ts","sourceRoot":"","sources":["../../../../../src/components/features/picker/components/footer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAKtC,UAAU,iBAAiB;IACzB,QAAQ,EAAE,SAAS,CAAA;IACnB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,wBAAgB,YAAY,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,iBAAiB,2CAMtE;yBANe,YAAY;;;AAS5B,wBAAgB,WAAW,CAAC,EAAE,QAAkB,EAAE,EAAE;IAAE,QAAQ,CAAC,EAAE,SAAS,CAAA;CAAE,2CAU3E;yBAVe,WAAW;;;AAa3B,wBAAgB,WAAW,CAAC,EAAE,QAAkB,EAAE,EAAE;IAAE,QAAQ,CAAC,EAAE,SAAS,CAAA;CAAE,2CAO3E;yBAPe,WAAW;;;AAU3B,wBAAgB,YAAY,CAAC,EAC3B,QAAmB,GACpB,EAAE;IACD,QAAQ,CAAC,EAAE,SAAS,CAAA;CACrB,2CAYA;yBAhBe,YAAY;;;AAmB5B,wBAAgB,WAAW,CAAC,EAAE,QAAkB,EAAE,EAAE;IAAE,QAAQ,CAAC,EAAE,SAAS,CAAA;CAAE,2CAO3E;yBAPe,WAAW"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { PickerCalendar } from './calendar';
|
|
2
|
+
import { PickerContent } from './content';
|
|
3
|
+
import { PickerApply, PickerCancel, PickerClear, PickerFooter, PickerReset } from './footer';
|
|
4
|
+
import { PickerPresets } from './presets';
|
|
5
|
+
import { PickerTimeInput } from './time-input';
|
|
6
|
+
import { PickerTimezoneIndicator } from './timezone-indicator';
|
|
7
|
+
import { PickerTimezoneSelect } from './timezone-select';
|
|
8
|
+
import { PickerTrigger } from './trigger';
|
|
9
|
+
declare const Picker: {
|
|
10
|
+
Root: typeof import("./root").PickerRoot;
|
|
11
|
+
} & {
|
|
12
|
+
Trigger: typeof PickerTrigger;
|
|
13
|
+
Content: typeof PickerContent;
|
|
14
|
+
Calendar: typeof PickerCalendar;
|
|
15
|
+
TimeInput: typeof PickerTimeInput;
|
|
16
|
+
Presets: typeof PickerPresets;
|
|
17
|
+
Footer: typeof PickerFooter;
|
|
18
|
+
Apply: typeof PickerApply;
|
|
19
|
+
Reset: typeof PickerReset;
|
|
20
|
+
Cancel: typeof PickerCancel;
|
|
21
|
+
Clear: typeof PickerClear;
|
|
22
|
+
TimezoneIndicator: typeof PickerTimezoneIndicator;
|
|
23
|
+
TimezoneSelect: typeof PickerTimezoneSelect;
|
|
24
|
+
};
|
|
25
|
+
export { Picker };
|
|
26
|
+
export { PickerContext, usePickerContext } from './context';
|
|
27
|
+
export type { PickerContextValue } from './context';
|
|
28
|
+
export { PickerCalendar };
|
|
29
|
+
export { PickerContent };
|
|
30
|
+
export { PickerApply, PickerCancel, PickerClear, PickerFooter, PickerReset };
|
|
31
|
+
export { PickerPresets };
|
|
32
|
+
export { PickerTimeInput };
|
|
33
|
+
export { PickerTimezoneIndicator };
|
|
34
|
+
export { PickerTimezoneSelect };
|
|
35
|
+
export { PickerTrigger };
|
|
36
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/features/picker/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAA;AACzC,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAC5F,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAA;AAEzC,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAC9C,OAAO,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAA;AAC9D,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAA;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAA;AAEzC,QAAA,MAAM,MAAM;;;;;;;;;;;;;;;CAaV,CAAA;AAEF,OAAO,EAAE,MAAM,EAAE,CAAA;AACjB,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAA;AAC3D,YAAY,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAA;AACnD,OAAO,EAAE,cAAc,EAAE,CAAA;AACzB,OAAO,EAAE,aAAa,EAAE,CAAA;AACxB,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,WAAW,EAAE,CAAA;AAC5E,OAAO,EAAE,aAAa,EAAE,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,CAAA;AAC1B,OAAO,EAAE,uBAAuB,EAAE,CAAA;AAClC,OAAO,EAAE,oBAAoB,EAAE,CAAA;AAC/B,OAAO,EAAE,aAAa,EAAE,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
interface PickerPresetsProps {
|
|
2
|
+
className?: string;
|
|
3
|
+
}
|
|
4
|
+
export declare function PickerPresets({ className }: PickerPresetsProps): import("react/jsx-runtime").JSX.Element | null;
|
|
5
|
+
export declare namespace PickerPresets {
|
|
6
|
+
var displayName: string;
|
|
7
|
+
}
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=presets.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presets.d.ts","sourceRoot":"","sources":["../../../../../src/components/features/picker/components/presets.tsx"],"names":[],"mappings":"AAIA,UAAU,kBAAkB;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,wBAAgB,aAAa,CAAC,EAAE,SAAS,EAAE,EAAE,kBAAkB,kDAiC9D;yBAjCe,aAAa"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { AllowedStep, HourCycle, PickerCommit, PickerMode, PickerPreset, PickerValueOf } from '../types';
|
|
3
|
+
export interface PickerRootProps<M extends PickerMode> {
|
|
4
|
+
mode: M;
|
|
5
|
+
value: PickerValueOf<M>;
|
|
6
|
+
onChange: (value: PickerValueOf<M>) => void;
|
|
7
|
+
/** When `commit` is omitted, defaults to `'apply'` for range modes and `'immediate'` otherwise. */
|
|
8
|
+
commit?: PickerCommit;
|
|
9
|
+
/** IANA timezone for time-bearing modes. Default: browser-detected. */
|
|
10
|
+
timezone?: string;
|
|
11
|
+
/** Time slot step in minutes. Default `15`. */
|
|
12
|
+
step?: AllowedStep;
|
|
13
|
+
/** Display cycle for time labels. Default detected from locale; falls back to `'24'`. */
|
|
14
|
+
hourCycle?: HourCycle;
|
|
15
|
+
/** Hide the always-on timezone indicator. Default `false`. */
|
|
16
|
+
hideTimezone?: boolean;
|
|
17
|
+
/** Force desktop popover even on mobile. Default `true` (responsive). */
|
|
18
|
+
responsive?: boolean;
|
|
19
|
+
/** Custom preset list. When set, replaces defaults. */
|
|
20
|
+
presets?: readonly PickerPreset[];
|
|
21
|
+
/** Filter applied to default presets. Ignored when `presets` is set. */
|
|
22
|
+
excludePresets?: readonly string[];
|
|
23
|
+
/** Date constraints applied to calendar + preset filtering. */
|
|
24
|
+
minDate?: Date;
|
|
25
|
+
maxDate?: Date;
|
|
26
|
+
disablePast?: boolean;
|
|
27
|
+
disableFuture?: boolean;
|
|
28
|
+
children: ReactNode;
|
|
29
|
+
}
|
|
30
|
+
export declare function PickerRoot<M extends PickerMode>({ mode, value, onChange, commit, timezone: timezoneProp, step, hourCycle: hourCycleProp, hideTimezone, responsive, presets: customPresets, excludePresets, minDate, maxDate, disablePast, disableFuture, children, }: PickerRootProps<M>): import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
export declare namespace PickerRoot {
|
|
32
|
+
var displayName: string;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Public namespace export. Subsequent tasks add Trigger, Content, etc.
|
|
36
|
+
*/
|
|
37
|
+
export declare const Picker: {
|
|
38
|
+
Root: typeof PickerRoot;
|
|
39
|
+
};
|
|
40
|
+
//# sourceMappingURL=root.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"root.d.ts","sourceRoot":"","sources":["../../../../../src/components/features/picker/components/root.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACtC,OAAO,KAAK,EACV,WAAW,EACX,SAAS,EACT,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,aAAa,EACd,MAAM,UAAU,CAAA;AAYjB,MAAM,WAAW,eAAe,CAAC,CAAC,SAAS,UAAU;IACnD,IAAI,EAAE,CAAC,CAAA;IACP,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,CAAA;IACvB,QAAQ,EAAE,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,KAAK,IAAI,CAAA;IAC3C,mGAAmG;IACnG,MAAM,CAAC,EAAE,YAAY,CAAA;IACrB,uEAAuE;IACvE,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,+CAA+C;IAC/C,IAAI,CAAC,EAAE,WAAW,CAAA;IAClB,yFAAyF;IACzF,SAAS,CAAC,EAAE,SAAS,CAAA;IACrB,8DAA8D;IAC9D,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,yEAAyE;IACzE,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,uDAAuD;IACvD,OAAO,CAAC,EAAE,SAAS,YAAY,EAAE,CAAA;IACjC,wEAAwE;IACxE,cAAc,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IAClC,+DAA+D;IAC/D,OAAO,CAAC,EAAE,IAAI,CAAA;IACd,OAAO,CAAC,EAAE,IAAI,CAAA;IACd,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,QAAQ,EAAE,SAAS,CAAA;CACpB;AAeD,wBAAgB,UAAU,CAAC,CAAC,SAAS,UAAU,EAAE,EAC/C,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,MAAM,EACN,QAAQ,EAAE,YAAY,EACtB,IAAS,EACT,SAAS,EAAE,aAAa,EACxB,YAAoB,EACpB,UAAiB,EACjB,OAAO,EAAE,aAAa,EACtB,cAAc,EACd,OAAO,EACP,OAAO,EACP,WAAW,EACX,aAAa,EACb,QAAQ,GACT,EAAE,eAAe,CAAC,CAAC,CAAC,2CA4DpB;yBA7Ee,UAAU;;;AAiF1B;;GAEG;AACH,eAAO,MAAM,MAAM,EAEd;IACH,IAAI,EAAE,OAAO,UAAU,CAAA;CACxB,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
interface PickerTimeInputFieldProps {
|
|
2
|
+
className?: string;
|
|
3
|
+
/** ARIA label for the input. Default `"Select time"`. */
|
|
4
|
+
ariaLabel?: string;
|
|
5
|
+
/** id forwarded to the input element. */
|
|
6
|
+
id?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare function PickerTimeInputField({ className, ariaLabel, id, }: PickerTimeInputFieldProps): import("react/jsx-runtime").JSX.Element | null;
|
|
9
|
+
export declare namespace PickerTimeInputField {
|
|
10
|
+
var displayName: string;
|
|
11
|
+
}
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=time-input-field.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"time-input-field.d.ts","sourceRoot":"","sources":["../../../../../src/components/features/picker/components/time-input-field.tsx"],"names":[],"mappings":"AAMA,UAAU,yBAAyB;IACjC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,yDAAyD;IACzD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,yCAAyC;IACzC,EAAE,CAAC,EAAE,MAAM,CAAA;CACZ;AAcD,wBAAgB,oBAAoB,CAAC,EACnC,SAAS,EACT,SAAyB,EACzB,EAAE,GACH,EAAE,yBAAyB,kDA8C3B;yBAlDe,oBAAoB"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
type Target = 'single' | 'range-from' | 'range-to' | 'embedded-from' | 'embedded-to';
|
|
2
|
+
interface PickerTimeInputProps {
|
|
3
|
+
target: Target;
|
|
4
|
+
min?: string;
|
|
5
|
+
max?: string;
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare function PickerTimeInput({ target, min, max, className }: PickerTimeInputProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare namespace PickerTimeInput {
|
|
10
|
+
var displayName: string;
|
|
11
|
+
}
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=time-input.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"time-input.d.ts","sourceRoot":"","sources":["../../../../../src/components/features/picker/components/time-input.tsx"],"names":[],"mappings":"AAWA,KAAK,MAAM,GACL,QAAQ,GACR,YAAY,GACZ,UAAU,GACV,eAAe,GACf,aAAa,CAAA;AAEnB,UAAU,oBAAoB;IAC5B,MAAM,EAAE,MAAM,CAAA;IACd,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAWD,wBAAgB,eAAe,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,EAAE,oBAAoB,2CA4FpF;yBA5Fe,eAAe"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
interface PickerTimezoneIndicatorProps {
|
|
2
|
+
className?: string;
|
|
3
|
+
/**
|
|
4
|
+
* `'full'` (default) renders "Times shown in <TZ>" with a globe icon.
|
|
5
|
+
* `'compact'` renders just the bare timezone identifier (no prefix or icon).
|
|
6
|
+
*/
|
|
7
|
+
variant?: 'full' | 'compact';
|
|
8
|
+
}
|
|
9
|
+
export declare function PickerTimezoneIndicator({ className, variant, }: PickerTimezoneIndicatorProps): import("react/jsx-runtime").JSX.Element | null;
|
|
10
|
+
export declare namespace PickerTimezoneIndicator {
|
|
11
|
+
var displayName: string;
|
|
12
|
+
}
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=timezone-indicator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"timezone-indicator.d.ts","sourceRoot":"","sources":["../../../../../src/components/features/picker/components/timezone-indicator.tsx"],"names":[],"mappings":"AAMA,UAAU,4BAA4B;IACpC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAC7B;AAED,wBAAgB,uBAAuB,CAAC,EACtC,SAAS,EACT,OAAgB,GACjB,EAAE,4BAA4B,kDAmC9B;yBAtCe,uBAAuB"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
interface TimezoneOption {
|
|
2
|
+
value: string;
|
|
3
|
+
label: string;
|
|
4
|
+
}
|
|
5
|
+
interface PickerTimezoneSelectProps {
|
|
6
|
+
options: TimezoneOption[];
|
|
7
|
+
onChange: (value: string) => void;
|
|
8
|
+
className?: string;
|
|
9
|
+
placeholder?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare function PickerTimezoneSelect({ options, onChange, className, placeholder, }: PickerTimezoneSelectProps): import("react/jsx-runtime").JSX.Element | null;
|
|
12
|
+
export declare namespace PickerTimezoneSelect {
|
|
13
|
+
var displayName: string;
|
|
14
|
+
}
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=timezone-select.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"timezone-select.d.ts","sourceRoot":"","sources":["../../../../../src/components/features/picker/components/timezone-select.tsx"],"names":[],"mappings":"AAYA,UAAU,cAAc;IACtB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;CACd;AAED,UAAU,yBAAyB;IACjC,OAAO,EAAE,cAAc,EAAE,CAAA;IACzB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACjC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;AAED,wBAAgB,oBAAoB,CAAC,EACnC,OAAO,EACP,QAAQ,EACR,SAAS,EACT,WAA+B,GAChC,EAAE,yBAAyB,kDAuB3B;yBA5Be,oBAAoB"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { ComponentProps, ReactNode } from 'react';
|
|
2
|
+
import { Button } from '../../../../_shadcn/ui/button';
|
|
3
|
+
interface PickerTriggerProps extends Omit<ComponentProps<typeof Button>, 'children'> {
|
|
4
|
+
placeholder?: string;
|
|
5
|
+
clearable?: boolean;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
/** Custom render override — receives `pendingValue` and returns JSX. */
|
|
8
|
+
children?: (value: unknown) => ReactNode;
|
|
9
|
+
className?: string;
|
|
10
|
+
triggerClassName?: string;
|
|
11
|
+
id?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Trigger leading icon. Pass a ReactNode to override the default calendar
|
|
14
|
+
* icon, or `false` to hide it entirely.
|
|
15
|
+
*/
|
|
16
|
+
icon?: ReactNode | false;
|
|
17
|
+
}
|
|
18
|
+
export declare function PickerTrigger({ placeholder, clearable, disabled, children, className, triggerClassName, id, icon, onClick, ...slotProps }: PickerTriggerProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export declare namespace PickerTrigger {
|
|
20
|
+
var displayName: string;
|
|
21
|
+
}
|
|
22
|
+
export {};
|
|
23
|
+
//# sourceMappingURL=trigger.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trigger.d.ts","sourceRoot":"","sources":["../../../../../src/components/features/picker/components/trigger.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACtD,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAK/C,UAAU,kBAAmB,SAAQ,IAAI,CAAC,cAAc,CAAC,OAAO,MAAM,CAAC,EAAE,UAAU,CAAC;IAClF,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,wEAAwE;IACxE,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,SAAS,CAAA;IACxC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,EAAE,CAAC,EAAE,MAAM,CAAA;IACX;;;OAGG;IACH,IAAI,CAAC,EAAE,SAAS,GAAG,KAAK,CAAA;CACzB;AAMD,wBAAgB,aAAa,CAAC,EAC5B,WAA2B,EAC3B,SAAiB,EACjB,QAAgB,EAChB,QAAQ,EACR,SAAS,EACT,gBAAgB,EAChB,EAAE,EACF,IAAI,EACJ,OAAO,EACP,GAAG,SAAS,EACb,EAAE,kBAAkB,2CA4CpB;yBAvDe,aAAa"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/features/picker/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAA;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { RefObject } from 'react';
|
|
2
|
+
import type { PickerPreset } from '../types';
|
|
3
|
+
interface UseKeyboardShortcutsArgs {
|
|
4
|
+
/** Element on which the keydown listener is attached. */
|
|
5
|
+
rootRef: RefObject<HTMLElement | null>;
|
|
6
|
+
/** Available presets. Ones with `shortcut` defined are bound. */
|
|
7
|
+
presets: readonly PickerPreset[];
|
|
8
|
+
/** Called when a shortcut matches. */
|
|
9
|
+
onSelect: (preset: PickerPreset) => void;
|
|
10
|
+
/** Disable the binding (e.g. when popover is closed). */
|
|
11
|
+
enabled: boolean;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Bind preset keyboard shortcuts to a scoped root element (NOT document).
|
|
15
|
+
*
|
|
16
|
+
* Why root-scoped: binding on `document` causes presets to fire when the
|
|
17
|
+
* user is typing in any input on the page — a well-known bug in the legacy
|
|
18
|
+
* TimeRangePicker. Scoping to the picker's root element fixes it.
|
|
19
|
+
*
|
|
20
|
+
* Modifier keys (Ctrl, Meta, Alt) are ignored to avoid colliding with
|
|
21
|
+
* browser/OS shortcuts.
|
|
22
|
+
*/
|
|
23
|
+
export declare function useKeyboardShortcuts({ rootRef, presets, onSelect, enabled, }: UseKeyboardShortcutsArgs): void;
|
|
24
|
+
export {};
|
|
25
|
+
//# sourceMappingURL=use-keyboard-shortcuts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-keyboard-shortcuts.d.ts","sourceRoot":"","sources":["../../../../../src/components/features/picker/hooks/use-keyboard-shortcuts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACtC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAG5C,UAAU,wBAAwB;IAChC,yDAAyD;IACzD,OAAO,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAA;IACtC,iEAAiE;IACjE,OAAO,EAAE,SAAS,YAAY,EAAE,CAAA;IAChC,sCAAsC;IACtC,QAAQ,EAAE,CAAC,MAAM,EAAE,YAAY,KAAK,IAAI,CAAA;IACxC,yDAAyD;IACzD,OAAO,EAAE,OAAO,CAAA;CACjB;AAED;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAAC,EACnC,OAAO,EACP,OAAO,EACP,QAAQ,EACR,OAAO,GACR,EAAE,wBAAwB,GAAG,IAAI,CAuBjC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { PickerCommit, PickerMode, PickerValueOf } from '../types';
|
|
2
|
+
interface UsePickerStateArgs<M extends PickerMode> {
|
|
3
|
+
mode: M;
|
|
4
|
+
value: PickerValueOf<M>;
|
|
5
|
+
onChange: (value: PickerValueOf<M>) => void;
|
|
6
|
+
/** Default: `'apply'` for range modes, `'immediate'` for single. */
|
|
7
|
+
commit?: PickerCommit;
|
|
8
|
+
/** IANA timezone — used by `selectPreset` to encode Date ranges into mode-specific value shapes. */
|
|
9
|
+
timezone: string;
|
|
10
|
+
}
|
|
11
|
+
interface UsePickerStateReturn<M extends PickerMode> {
|
|
12
|
+
state: {
|
|
13
|
+
pendingValue: PickerValueOf<M>;
|
|
14
|
+
open: boolean;
|
|
15
|
+
selectedPresetKey: string | undefined;
|
|
16
|
+
monthFrom: Date | undefined;
|
|
17
|
+
monthTo: Date | undefined;
|
|
18
|
+
};
|
|
19
|
+
actions: {
|
|
20
|
+
setSingleDate: (d: Date | null) => void;
|
|
21
|
+
setSingleTime: (t: string | null) => void;
|
|
22
|
+
setSingleDatetime: (iso: string | null) => void;
|
|
23
|
+
setRange: (r: {
|
|
24
|
+
from: Date;
|
|
25
|
+
to: Date;
|
|
26
|
+
} | null) => void;
|
|
27
|
+
setTimeRange: (r: {
|
|
28
|
+
from: string;
|
|
29
|
+
to: string;
|
|
30
|
+
} | null) => void;
|
|
31
|
+
setDatetimeRange: (r: {
|
|
32
|
+
from: string;
|
|
33
|
+
to: string;
|
|
34
|
+
} | null) => void;
|
|
35
|
+
selectPreset: (range: {
|
|
36
|
+
from: Date;
|
|
37
|
+
to: Date;
|
|
38
|
+
}, key: string) => void;
|
|
39
|
+
setMonthFrom: (d: Date) => void;
|
|
40
|
+
setMonthTo: (d: Date) => void;
|
|
41
|
+
open: () => void;
|
|
42
|
+
close: () => void;
|
|
43
|
+
apply: () => void;
|
|
44
|
+
reset: () => void;
|
|
45
|
+
cancel: () => void;
|
|
46
|
+
clear: () => void;
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
export declare function usePickerState<M extends PickerMode>({ mode, value, onChange, commit, timezone, }: UsePickerStateArgs<M>): UsePickerStateReturn<M>;
|
|
50
|
+
export {};
|
|
51
|
+
//# sourceMappingURL=use-picker-state.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-picker-state.d.ts","sourceRoot":"","sources":["../../../../../src/components/features/picker/hooks/use-picker-state.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EACZ,UAAU,EACV,aAAa,EACd,MAAM,UAAU,CAAA;AAuEjB,UAAU,kBAAkB,CAAC,CAAC,SAAS,UAAU;IAC/C,IAAI,EAAE,CAAC,CAAA;IACP,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,CAAA;IACvB,QAAQ,EAAE,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,KAAK,IAAI,CAAA;IAC3C,oEAAoE;IACpE,MAAM,CAAC,EAAE,YAAY,CAAA;IACrB,oGAAoG;IACpG,QAAQ,EAAE,MAAM,CAAA;CACjB;AAsCD,UAAU,oBAAoB,CAAC,CAAC,SAAS,UAAU;IACjD,KAAK,EAAE;QACL,YAAY,EAAE,aAAa,CAAC,CAAC,CAAC,CAAA;QAC9B,IAAI,EAAE,OAAO,CAAA;QACb,iBAAiB,EAAE,MAAM,GAAG,SAAS,CAAA;QACrC,SAAS,EAAE,IAAI,GAAG,SAAS,CAAA;QAC3B,OAAO,EAAE,IAAI,GAAG,SAAS,CAAA;KAC1B,CAAA;IACD,OAAO,EAAE;QACP,aAAa,EAAE,CAAC,CAAC,EAAE,IAAI,GAAG,IAAI,KAAK,IAAI,CAAA;QACvC,aAAa,EAAE,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAA;QACzC,iBAAiB,EAAE,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAA;QAC/C,QAAQ,EAAE,CAAC,CAAC,EAAE;YAAE,IAAI,EAAE,IAAI,CAAC;YAAC,EAAE,EAAE,IAAI,CAAA;SAAE,GAAG,IAAI,KAAK,IAAI,CAAA;QACtD,YAAY,EAAE,CAAC,CAAC,EAAE;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,EAAE,EAAE,MAAM,CAAA;SAAE,GAAG,IAAI,KAAK,IAAI,CAAA;QAC9D,gBAAgB,EAAE,CAAC,CAAC,EAAE;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,EAAE,EAAE,MAAM,CAAA;SAAE,GAAG,IAAI,KAAK,IAAI,CAAA;QAClE,YAAY,EAAE,CAAC,KAAK,EAAE;YAAE,IAAI,EAAE,IAAI,CAAC;YAAC,EAAE,EAAE,IAAI,CAAA;SAAE,EAAE,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;QACpE,YAAY,EAAE,CAAC,CAAC,EAAE,IAAI,KAAK,IAAI,CAAA;QAC/B,UAAU,EAAE,CAAC,CAAC,EAAE,IAAI,KAAK,IAAI,CAAA;QAC7B,IAAI,EAAE,MAAM,IAAI,CAAA;QAChB,KAAK,EAAE,MAAM,IAAI,CAAA;QACjB,KAAK,EAAE,MAAM,IAAI,CAAA;QACjB,KAAK,EAAE,MAAM,IAAI,CAAA;QACjB,MAAM,EAAE,MAAM,IAAI,CAAA;QAClB,KAAK,EAAE,MAAM,IAAI,CAAA;KAClB,CAAA;CACF;AAED,wBAAgB,cAAc,CAAC,CAAC,SAAS,UAAU,EAAE,EACnD,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,MAAM,EACN,QAAQ,GACT,EAAE,kBAAkB,CAAC,CAAC,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAkHjD"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { PickerMode, PickerPreset } from '../types';
|
|
2
|
+
interface UsePresetsArgs {
|
|
3
|
+
mode: PickerMode;
|
|
4
|
+
timezone: string;
|
|
5
|
+
/** Caller-supplied presets. When set, replaces defaults entirely. */
|
|
6
|
+
custom?: readonly PickerPreset[];
|
|
7
|
+
/** Filter applied to defaults — ignored when `custom` is supplied. */
|
|
8
|
+
excludeKeys?: readonly string[];
|
|
9
|
+
/** Used to filter out presets whose range falls on a disabled date. */
|
|
10
|
+
isDateDisabled: (date: Date) => boolean;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Resolve the effective list of presets for a picker.
|
|
14
|
+
*
|
|
15
|
+
* Resolution order:
|
|
16
|
+
* 1. If `custom` is provided, use it as-is (no exclusion, no constraint check).
|
|
17
|
+
* 2. Otherwise: defaults for `mode`, minus `excludeKeys`, minus presets
|
|
18
|
+
* whose `getRange(timezone).from` or `.to` is rejected by `isDateDisabled`.
|
|
19
|
+
*
|
|
20
|
+
* Returns a memoized array; identity-stable when inputs haven't changed.
|
|
21
|
+
*/
|
|
22
|
+
export declare function usePresets({ mode, timezone, custom, excludeKeys, isDateDisabled, }: UsePresetsArgs): readonly PickerPreset[];
|
|
23
|
+
export {};
|
|
24
|
+
//# sourceMappingURL=use-presets.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-presets.d.ts","sourceRoot":"","sources":["../../../../../src/components/features/picker/hooks/use-presets.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAIxD,UAAU,cAAc;IACtB,IAAI,EAAE,UAAU,CAAA;IAChB,QAAQ,EAAE,MAAM,CAAA;IAChB,qEAAqE;IACrE,MAAM,CAAC,EAAE,SAAS,YAAY,EAAE,CAAA;IAChC,sEAAsE;IACtE,WAAW,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IAC/B,uEAAuE;IACvE,cAAc,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,OAAO,CAAA;CACxC;AAED;;;;;;;;;GASG;AACH,wBAAgB,UAAU,CAAC,EACzB,IAAI,EACJ,QAAQ,EACR,MAAM,EACN,WAAW,EACX,cAAc,GACf,EAAE,cAAc,GAAG,SAAS,YAAY,EAAE,CAmB1C"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { OptionPickerOption } from '../../../base/option-picker';
|
|
2
|
+
import type { AllowedStep, HourCycle } from '../types';
|
|
3
|
+
interface UseTimeSlotsArgs {
|
|
4
|
+
/** Inclusive lower bound in `HH:mm`. Default `"00:00"`. */
|
|
5
|
+
min?: string;
|
|
6
|
+
/** Inclusive upper bound in `HH:mm`. Default `"23:59"`. */
|
|
7
|
+
max?: string;
|
|
8
|
+
/** Step in minutes. Default `15`. */
|
|
9
|
+
step?: AllowedStep;
|
|
10
|
+
/** Display label cycle. Default `'24'`. */
|
|
11
|
+
hourCycle?: HourCycle;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Generate an `OptionPickerOption[]` of HH:mm slots for the slot-dropdown UI.
|
|
15
|
+
*
|
|
16
|
+
* Slots are produced in pure minute arithmetic — DST is not considered (slots
|
|
17
|
+
* are wall-clock times of day, independent of any specific calendar date).
|
|
18
|
+
*/
|
|
19
|
+
export declare function useTimeSlots({ min, max, step, hourCycle, }: UseTimeSlotsArgs): OptionPickerOption[];
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=use-time-slots.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-time-slots.d.ts","sourceRoot":"","sources":["../../../../../src/components/features/picker/hooks/use-time-slots.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAA;AACrE,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AAItD,UAAU,gBAAgB;IACxB,2DAA2D;IAC3D,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,2DAA2D;IAC3D,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,qCAAqC;IACrC,IAAI,CAAC,EAAE,WAAW,CAAA;IAClB,2CAA2C;IAC3C,SAAS,CAAC,EAAE,SAAS,CAAA;CACtB;AAaD;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,EAC3B,GAAG,EACH,GAAG,EACH,IAAS,EACT,SAAgB,GACjB,EAAE,gBAAgB,GAAG,kBAAkB,EAAE,CAazC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from './components';
|
|
2
|
+
export * from './hooks';
|
|
3
|
+
export { DATE_PRESETS, DATETIME_PRESETS, getDefaultPresets } from './presets';
|
|
4
|
+
export type { AllowedStep, DateBearingMode, DateRangeTimeValue, DateRangeValue, DatetimeRangeValue, DatetimeValue, DateValue, HourCycle, PickerCommit, PickerMode, PickerPreset, PickerValueMap, PickerValueOf, RangeMode, TimeBearingMode, TimeRangeValue, TimeValue, } from './types';
|
|
5
|
+
export { ALLOWED_STEPS, DATE_BEARING_MODES, isDateBearingMode, isRangeMode, isTimeBearingMode, RANGE_MODES, TIME_BEARING_MODES, } from './types';
|
|
6
|
+
export * from './utils';
|
|
7
|
+
export * from './wrappers';
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/features/picker/index.ts"],"names":[],"mappings":"AAGA,cAAc,cAAc,CAAA;AAC5B,cAAc,SAAS,CAAA;AACvB,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAA;AAC7E,YAAY,EACV,WAAW,EACX,eAAe,EACf,kBAAkB,EAClB,cAAc,EACd,kBAAkB,EAClB,aAAa,EACb,SAAS,EACT,SAAS,EACT,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,cAAc,EACd,aAAa,EACb,SAAS,EACT,eAAe,EACf,cAAc,EACd,SAAS,GACV,MAAM,SAAS,CAAA;AAChB,OAAO,EACL,aAAa,EACb,kBAAkB,EAClB,iBAAiB,EACjB,WAAW,EACX,iBAAiB,EACjB,WAAW,EACX,kBAAkB,GACnB,MAAM,SAAS,CAAA;AAChB,cAAc,SAAS,CAAA;AACvB,cAAc,YAAY,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Logs a one-time `console.warn` in development warning that the legacy
|
|
3
|
+
* component is deprecated and pointing the consumer at the replacement.
|
|
4
|
+
*
|
|
5
|
+
* No-op in `test` and `production` builds. Deduplicated by `legacyName`
|
|
6
|
+
* across the entire session.
|
|
7
|
+
*/
|
|
8
|
+
export declare function useDeprecationWarning(legacyName: string, replacement: string): void;
|
|
9
|
+
//# sourceMappingURL=use-deprecation-warning.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-deprecation-warning.d.ts","sourceRoot":"","sources":["../../../../../src/components/features/picker/internal/use-deprecation-warning.ts"],"names":[],"mappings":"AAQA;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,UAAU,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,IAAI,CAYnF"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { PickerMode, PickerPreset } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Date-bearing presets. Operate on calendar days; ignore time-of-day.
|
|
4
|
+
*/
|
|
5
|
+
export declare const DATE_PRESETS: readonly PickerPreset[];
|
|
6
|
+
/**
|
|
7
|
+
* Datetime-bearing presets. Use "now" as the upper bound for past windows
|
|
8
|
+
* (so the picker doesn't propose future timestamps).
|
|
9
|
+
*/
|
|
10
|
+
export declare const DATETIME_PRESETS: readonly PickerPreset[];
|
|
11
|
+
/**
|
|
12
|
+
* Default preset set for a given mode. Time-only modes return empty —
|
|
13
|
+
* presets rarely make sense for picking a wall-clock time.
|
|
14
|
+
*/
|
|
15
|
+
export declare function getDefaultPresets(mode: PickerMode): readonly PickerPreset[];
|
|
16
|
+
//# sourceMappingURL=defaults.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["../../../../../src/components/features/picker/presets/defaults.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AA0BxD;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,SAAS,YAAY,EAgEtC,CAAA;AAEV;;;GAGG;AACH,eAAO,MAAM,gBAAgB,EAAE,SAAS,YAAY,EAsD1C,CAAA;AAIV;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,UAAU,GAAG,SAAS,YAAY,EAAE,CAc3E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/features/picker/presets/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Picker mode — discriminator for the 7 useful cells of the date×time matrix.
|
|
3
|
+
* (8 cells exist; single-date+time-range collapses into datetime-range with same-day from/to.)
|
|
4
|
+
*/
|
|
5
|
+
export type PickerMode = 'date' | 'date-range' | 'time' | 'time-range' | 'datetime' | 'datetime-range' | 'date-range-time';
|
|
6
|
+
/** When does onChange fire? */
|
|
7
|
+
export type PickerCommit = 'immediate' | 'apply';
|
|
8
|
+
/** A preset is a labeled, TZ-aware range factory. */
|
|
9
|
+
export interface PickerPreset {
|
|
10
|
+
/** Stable identifier — persisted in emitted value for URL hydration. */
|
|
11
|
+
key: string;
|
|
12
|
+
/** Display label (user-facing). */
|
|
13
|
+
label: string;
|
|
14
|
+
/** Optional keyboard shortcut (single character; case-insensitive). */
|
|
15
|
+
shortcut?: string;
|
|
16
|
+
/** Compute the range in the user's selected timezone. Lazy and TZ-aware. */
|
|
17
|
+
getRange: (timezone: string) => {
|
|
18
|
+
from: Date;
|
|
19
|
+
to: Date;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
export type DateValue = Date | null;
|
|
23
|
+
export type DateRangeValue = {
|
|
24
|
+
from: Date;
|
|
25
|
+
to: Date;
|
|
26
|
+
/** Set when the range came from a preset click. Undefined for manual ranges. */
|
|
27
|
+
preset?: string;
|
|
28
|
+
} | null;
|
|
29
|
+
/** Time-of-day in `"HH:mm"` 24-hour format. Display formatting is separate. */
|
|
30
|
+
export type TimeValue = string | null;
|
|
31
|
+
export type TimeRangeValue = {
|
|
32
|
+
from: string;
|
|
33
|
+
to: string;
|
|
34
|
+
preset?: string;
|
|
35
|
+
} | null;
|
|
36
|
+
/** Datetime as UTC ISO string. Display timezone is a separate prop. */
|
|
37
|
+
export type DatetimeValue = string | null;
|
|
38
|
+
export type DatetimeRangeValue = {
|
|
39
|
+
from: string;
|
|
40
|
+
to: string;
|
|
41
|
+
preset?: string;
|
|
42
|
+
} | null;
|
|
43
|
+
export type DateRangeTimeValue = {
|
|
44
|
+
from: string;
|
|
45
|
+
to: string;
|
|
46
|
+
preset?: string;
|
|
47
|
+
} | null;
|
|
48
|
+
export interface PickerValueMap {
|
|
49
|
+
'date': DateValue;
|
|
50
|
+
'date-range': DateRangeValue;
|
|
51
|
+
'time': TimeValue;
|
|
52
|
+
'time-range': TimeRangeValue;
|
|
53
|
+
'datetime': DatetimeValue;
|
|
54
|
+
'datetime-range': DatetimeRangeValue;
|
|
55
|
+
'date-range-time': DateRangeTimeValue;
|
|
56
|
+
}
|
|
57
|
+
export type PickerValueOf<M extends PickerMode> = PickerValueMap[M];
|
|
58
|
+
export declare const RANGE_MODES: readonly ["date-range", "time-range", "datetime-range", "date-range-time"];
|
|
59
|
+
export type RangeMode = typeof RANGE_MODES[number];
|
|
60
|
+
export declare const TIME_BEARING_MODES: readonly ["time", "time-range", "datetime", "datetime-range", "date-range-time"];
|
|
61
|
+
export type TimeBearingMode = typeof TIME_BEARING_MODES[number];
|
|
62
|
+
export declare const DATE_BEARING_MODES: readonly ["date", "date-range", "datetime", "datetime-range", "date-range-time"];
|
|
63
|
+
export type DateBearingMode = typeof DATE_BEARING_MODES[number];
|
|
64
|
+
export declare function isRangeMode(mode: PickerMode): mode is RangeMode;
|
|
65
|
+
export declare function isTimeBearingMode(mode: PickerMode): mode is TimeBearingMode;
|
|
66
|
+
export declare function isDateBearingMode(mode: PickerMode): mode is DateBearingMode;
|
|
67
|
+
export type HourCycle = '12' | '24';
|
|
68
|
+
export declare const ALLOWED_STEPS: readonly [1, 5, 10, 15, 30, 60];
|
|
69
|
+
export type AllowedStep = typeof ALLOWED_STEPS[number];
|
|
70
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/features/picker/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,MAAM,UAAU,GAChB,MAAM,GACN,YAAY,GACZ,MAAM,GACN,YAAY,GACZ,UAAU,GACV,gBAAgB,GAChB,iBAAiB,CAAA;AAEvB,+BAA+B;AAC/B,MAAM,MAAM,YAAY,GAAG,WAAW,GAAG,OAAO,CAAA;AAEhD,qDAAqD;AACrD,MAAM,WAAW,YAAY;IAC3B,wEAAwE;IACxE,GAAG,EAAE,MAAM,CAAA;IACX,mCAAmC;IACnC,KAAK,EAAE,MAAM,CAAA;IACb,uEAAuE;IACvE,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,4EAA4E;IAC5E,QAAQ,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK;QAAE,IAAI,EAAE,IAAI,CAAC;QAAC,EAAE,EAAE,IAAI,CAAA;KAAE,CAAA;CACzD;AAID,MAAM,MAAM,SAAS,GAAG,IAAI,GAAG,IAAI,CAAA;AAEnC,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,EAAE,IAAI,CAAA;IACV,EAAE,EAAE,IAAI,CAAA;IACR,gFAAgF;IAChF,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,GAAG,IAAI,CAAA;AAER,+EAA+E;AAC/E,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,IAAI,CAAA;AAErC,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,EAAE,MAAM,CAAA;IACZ,EAAE,EAAE,MAAM,CAAA;IACV,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,GAAG,IAAI,CAAA;AAER,uEAAuE;AACvE,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,IAAI,CAAA;AAEzC,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,EAAE,MAAM,CAAA;IACZ,EAAE,EAAE,MAAM,CAAA;IACV,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,GAAG,IAAI,CAAA;AAER,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,EAAE,MAAM,CAAA;IACZ,EAAE,EAAE,MAAM,CAAA;IACV,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,GAAG,IAAI,CAAA;AAIR,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,SAAS,CAAA;IACjB,YAAY,EAAE,cAAc,CAAA;IAC5B,MAAM,EAAE,SAAS,CAAA;IACjB,YAAY,EAAE,cAAc,CAAA;IAC5B,UAAU,EAAE,aAAa,CAAA;IACzB,gBAAgB,EAAE,kBAAkB,CAAA;IACpC,iBAAiB,EAAE,kBAAkB,CAAA;CACtC;AAED,MAAM,MAAM,aAAa,CAAC,CAAC,SAAS,UAAU,IAAI,cAAc,CAAC,CAAC,CAAC,CAAA;AAInE,eAAO,MAAM,WAAW,4EAKkB,CAAA;AAE1C,MAAM,MAAM,SAAS,GAAG,OAAO,WAAW,CAAC,MAAM,CAAC,CAAA;AAElD,eAAO,MAAM,kBAAkB,kFAMW,CAAA;AAE1C,MAAM,MAAM,eAAe,GAAG,OAAO,kBAAkB,CAAC,MAAM,CAAC,CAAA;AAE/D,eAAO,MAAM,kBAAkB,kFAMW,CAAA;AAE1C,MAAM,MAAM,eAAe,GAAG,OAAO,kBAAkB,CAAC,MAAM,CAAC,CAAA;AAS/D,wBAAgB,WAAW,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI,IAAI,SAAS,CAE/D;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI,IAAI,eAAe,CAE3E;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI,IAAI,eAAe,CAE3E;AAID,MAAM,MAAM,SAAS,GAAG,IAAI,GAAG,IAAI,CAAA;AAInC,eAAO,MAAM,aAAa,iCAAkC,CAAA;AAC5D,MAAM,MAAM,WAAW,GAAG,OAAO,aAAa,CAAC,MAAM,CAAC,CAAA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { PickerCommit, PickerMode } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Resolves the effective commit semantics for a picker.
|
|
4
|
+
*
|
|
5
|
+
* - Date + time combined modes (`datetime` / `datetime-range` /
|
|
6
|
+
* `date-range-time`) **always** commit on Apply, regardless of the
|
|
7
|
+
* caller-supplied override. Picking a date alone shouldn't publish a
|
|
8
|
+
* value with an unconfirmed 00:00 time — the user needs to set the
|
|
9
|
+
* time too, then explicitly Apply. The wrappers don't expose a
|
|
10
|
+
* `commit` prop for these modes; primitive consumers can still pass
|
|
11
|
+
* one through `Picker.Root` but it's silently overridden here.
|
|
12
|
+
* - Range modes (`date-range`, `time-range`) default to `'apply'`.
|
|
13
|
+
* - Everything else defaults to `'immediate'`.
|
|
14
|
+
*/
|
|
15
|
+
export declare function resolveCommit(mode: PickerMode, commit: PickerCommit | undefined): PickerCommit;
|
|
16
|
+
//# sourceMappingURL=commit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commit.d.ts","sourceRoot":"","sources":["../../../../../src/components/features/picker/utils/commit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAGxD;;;;;;;;;;;;GAYG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,YAAY,GAAG,SAAS,GAAG,YAAY,CAI9F"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { DateRangeTimeValue, DateRangeValue, DatetimeRangeValue, TimeRangeValue } from '../types';
|
|
2
|
+
/** Strict equality of two nullable Date references by millisecond value. */
|
|
3
|
+
export declare function isSameDate(a: Date | null, b: Date | null): boolean;
|
|
4
|
+
/** Equality of two nullable date ranges. Compares from, to (by ms), and preset. */
|
|
5
|
+
export declare function isSameDateRange(a: DateRangeValue, b: DateRangeValue): boolean;
|
|
6
|
+
/**
|
|
7
|
+
* Equality of two nullable string ranges. Used for time-of-day, time-range,
|
|
8
|
+
* and datetime-range value shapes (all structurally identical).
|
|
9
|
+
* Compares from, to, and optional preset.
|
|
10
|
+
*/
|
|
11
|
+
export declare function isSameStringRange(a: TimeRangeValue | DatetimeRangeValue | DateRangeTimeValue, b: TimeRangeValue | DatetimeRangeValue | DateRangeTimeValue): boolean;
|
|
12
|
+
//# sourceMappingURL=compare.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compare.d.ts","sourceRoot":"","sources":["../../../../../src/components/features/picker/utils/compare.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,kBAAkB,EAClB,cAAc,EACd,kBAAkB,EAClB,cAAc,EACf,MAAM,UAAU,CAAA;AAEjB,4EAA4E;AAC5E,wBAAgB,UAAU,CAAC,CAAC,EAAE,IAAI,GAAG,IAAI,EAAE,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,OAAO,CAMlE;AAED,mFAAmF;AACnF,wBAAgB,eAAe,CAAC,CAAC,EAAE,cAAc,EAAE,CAAC,EAAE,cAAc,GAAG,OAAO,CAU7E;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAC/B,CAAC,EAAE,cAAc,GAAG,kBAAkB,GAAG,kBAAkB,EAC3D,CAAC,EAAE,cAAc,GAAG,kBAAkB,GAAG,kBAAkB,GAC1D,OAAO,CAMT"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { HourCycle, PickerMode } from '../types';
|
|
2
|
+
interface FormatOptions {
|
|
3
|
+
timezone?: string;
|
|
4
|
+
hourCycle?: HourCycle;
|
|
5
|
+
locale?: string;
|
|
6
|
+
/**
|
|
7
|
+
* date-fns format pattern for the date portion of the display label.
|
|
8
|
+
* When set, replaces the default `MMM dd, yyyy`-style locale rendering.
|
|
9
|
+
* Examples: `'dd/MM/yyyy'`, `'EEE, MMM do'`, `'yyyy-MM-dd'`.
|
|
10
|
+
*/
|
|
11
|
+
dateFormat?: string;
|
|
12
|
+
/**
|
|
13
|
+
* date-fns format pattern for the time portion of the display label.
|
|
14
|
+
* When set, replaces the default `HH:mm` rendering (overrides `hourCycle`).
|
|
15
|
+
* Examples: `'HH:mm'`, `'hh:mm a'`, `'HH:mm:ss'`.
|
|
16
|
+
*/
|
|
17
|
+
timeFormat?: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Renders a human-readable trigger label for any picker mode.
|
|
21
|
+
* Returns the empty string when the value is null/undefined or unparseable.
|
|
22
|
+
*/
|
|
23
|
+
export declare function formatPickerValue(value: unknown, mode: PickerMode, opts?: FormatOptions): string;
|
|
24
|
+
export {};
|
|
25
|
+
//# sourceMappingURL=format-value.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"format-value.d.ts","sourceRoot":"","sources":["../../../../../src/components/features/picker/utils/format-value.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAKrD,UAAU,aAAa;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,SAAS,CAAC,EAAE,SAAS,CAAA;IACrB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AA+DD;;;GAGG;AACH,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,OAAO,EACd,IAAI,EAAE,UAAU,EAChB,IAAI,GAAE,aAAkB,GACvB,MAAM,CA+DR"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Format a Date as YYYY-MM-DD using local-time components.
|
|
3
|
+
*
|
|
4
|
+
* Note: this is the consumer-friendly format for date-only modes.
|
|
5
|
+
* It does NOT round-trip through timezones; that's intentional —
|
|
6
|
+
* a calendar day has no timezone.
|
|
7
|
+
*/
|
|
8
|
+
export declare function dateToYYYYMMDD(d: Date): string;
|
|
9
|
+
/**
|
|
10
|
+
* Extract `"HH:mm"` from a Date using its wall-clock components.
|
|
11
|
+
*
|
|
12
|
+
* Caller is responsible for ensuring those components reflect the
|
|
13
|
+
* intended timezone (typically via `dateToZoned` / `isoToZonedDate`
|
|
14
|
+
* upstream). Pads single-digit hour/minute to two characters.
|
|
15
|
+
*/
|
|
16
|
+
export declare function dateToHHmm(d: Date): string;
|
|
17
|
+
/**
|
|
18
|
+
* Strict HH:mm validation. Rejects single-digit components,
|
|
19
|
+
* out-of-range hours/minutes, and any non-numeric content.
|
|
20
|
+
*/
|
|
21
|
+
export declare function isValidTimeString(s: string): boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Parse a HH:mm string. Returns null for invalid input.
|
|
24
|
+
*/
|
|
25
|
+
export declare function parseTimeString(s: string): {
|
|
26
|
+
h: number;
|
|
27
|
+
m: number;
|
|
28
|
+
} | null;
|
|
29
|
+
/**
|
|
30
|
+
* Format a HH:mm string for user display, respecting hour cycle.
|
|
31
|
+
*
|
|
32
|
+
* - `'24'`: returns the input as-is (`"14:30"`)
|
|
33
|
+
* - `'12'`: returns `"2:30 PM"` style with AM/PM and no leading zero on hour
|
|
34
|
+
*
|
|
35
|
+
* Returns empty string for invalid input — callers should validate first.
|
|
36
|
+
*/
|
|
37
|
+
export declare function formatTimeLabel(time: string, hourCycle: '12' | '24'): string;
|
|
38
|
+
//# sourceMappingURL=format.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../../../../src/components/features/picker/utils/format.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAAE,IAAI,GAAG,MAAM,CAK9C;AAED;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAAE,IAAI,GAAG,MAAM,CAI1C;AAID;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAOpD;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAAE,MAAM,GAAG;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAK1E;AAED;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,IAAI,GAAG,IAAI,GAAG,MAAM,CAW5E"}
|