@commercetools/nimbus 0.0.0-canary-20251027194157 → 0.0.0-canary-20251028202350
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/chunks/{Button-CqCJF7Kz.es.js → Button-SjGHt140.es.js} +2 -2
- package/dist/chunks/{Button-CqCJF7Kz.es.js.map → Button-SjGHt140.es.js.map} +1 -1
- package/dist/chunks/{CollectionBuilder-CoZRYV8T.es.js → CollectionBuilder-BhYUxJYI.es.js} +6 -6
- package/dist/chunks/{CollectionBuilder-CoZRYV8T.es.js.map → CollectionBuilder-BhYUxJYI.es.js.map} +1 -1
- package/dist/chunks/{DateField-ChNVEFNs.es.js → DateField-DMjgxual.es.js} +5 -5
- package/dist/chunks/{DateField-ChNVEFNs.es.js.map → DateField-DMjgxual.es.js.map} +1 -1
- package/dist/chunks/{DatePicker-uW8Z5fWm.es.js → DatePicker-Cvad8nra.es.js} +7 -7
- package/dist/chunks/{DatePicker-uW8Z5fWm.es.js.map → DatePicker-Cvad8nra.es.js.map} +1 -1
- package/dist/chunks/{DatePicker-Codg0QnC.cjs.js → DatePicker-DGLrUdLu.cjs.js} +2 -2
- package/dist/chunks/{DatePicker-Codg0QnC.cjs.js.map → DatePicker-DGLrUdLu.cjs.js.map} +1 -1
- package/dist/chunks/{Dialog-DyQtQIZJ.es.js → Dialog-BUtdEtlF.es.js} +11 -11
- package/dist/chunks/{Dialog-DyQtQIZJ.es.js.map → Dialog-BUtdEtlF.es.js.map} +1 -1
- package/dist/chunks/{Dialog-DINBl88u.cjs.js → Dialog-Ye_7tQZU.cjs.js} +2 -2
- package/dist/chunks/{Dialog-DINBl88u.cjs.js.map → Dialog-Ye_7tQZU.cjs.js.map} +1 -1
- package/dist/chunks/Header-Bvl-gjeR.cjs.js +2 -0
- package/dist/chunks/Header-Bvl-gjeR.cjs.js.map +1 -0
- package/dist/chunks/Header-CpF5ynyj.es.js +213 -0
- package/dist/chunks/Header-CpF5ynyj.es.js.map +1 -0
- package/dist/chunks/{Heading-C5BLc9Ds.es.js → Heading-DXod1zoy.es.js} +7 -7
- package/dist/chunks/{Heading-C5BLc9Ds.es.js.map → Heading-DXod1zoy.es.js.map} +1 -1
- package/dist/chunks/ListBox-CdtzuZzA.es.js +561 -0
- package/dist/chunks/ListBox-CdtzuZzA.es.js.map +1 -0
- package/dist/chunks/ListBox-Dcnj8pHo.cjs.js +2 -0
- package/dist/chunks/ListBox-Dcnj8pHo.cjs.js.map +1 -0
- package/dist/chunks/{Modal-DDTTtqGV.es.js → Modal-BgIeZMyG.es.js} +4 -4
- package/dist/chunks/{Modal-DDTTtqGV.es.js.map → Modal-BgIeZMyG.es.js.map} +1 -1
- package/dist/chunks/{Modal-C9uSJ3BN.cjs.js → Modal-DjOIA2BE.cjs.js} +2 -2
- package/dist/chunks/{Modal-C9uSJ3BN.cjs.js.map → Modal-DjOIA2BE.cjs.js.map} +1 -1
- package/dist/chunks/{RSPContexts-DV4cFLUV.es.js → RSPContexts-DLgb84PF.es.js} +3 -3
- package/dist/chunks/{RSPContexts-DV4cFLUV.es.js.map → RSPContexts-DLgb84PF.es.js.map} +1 -1
- package/dist/chunks/{SelectionManager-Bo1rTzWU.es.js → SelectionManager-S9Amkvfg.es.js} +9 -9
- package/dist/chunks/{SelectionManager-Bo1rTzWU.es.js.map → SelectionManager-S9Amkvfg.es.js.map} +1 -1
- package/dist/chunks/{Separator-OdAUxccH.es.js → Separator-kuF-Wo1o.es.js} +2 -2
- package/dist/chunks/{Separator-OdAUxccH.es.js.map → Separator-kuF-Wo1o.es.js.map} +1 -1
- package/dist/chunks/{ToggleButton-BlpcYfFt.es.js → ToggleButton-BIiBT_jL.es.js} +2 -2
- package/dist/chunks/{ToggleButton-BlpcYfFt.es.js.map → ToggleButton-BIiBT_jL.es.js.map} +1 -1
- package/dist/chunks/{accordion-B9pzlIJn.cjs.js → accordion-DhybkUP0.cjs.js} +2 -2
- package/dist/chunks/{accordion-B9pzlIJn.cjs.js.map → accordion-DhybkUP0.cjs.js.map} +1 -1
- package/dist/chunks/{accordion-BazoFx8H.es.js → accordion-DwkpvHwM.es.js} +3 -3
- package/dist/chunks/{accordion-BazoFx8H.es.js.map → accordion-DwkpvHwM.es.js.map} +1 -1
- package/dist/chunks/alert-BlkniDy9.cjs.js +2 -0
- package/dist/chunks/alert-BlkniDy9.cjs.js.map +1 -0
- package/dist/chunks/{alert-DafE92Ep.es.js → alert-CVXQqjXr.es.js} +33 -33
- package/dist/chunks/alert-CVXQqjXr.es.js.map +1 -0
- package/dist/chunks/{button-rMTplznF.es.js → button-B1VvTs1w.es.js} +5 -5
- package/dist/chunks/{button-rMTplznF.es.js.map → button-B1VvTs1w.es.js.map} +1 -1
- package/dist/chunks/{button-DEenpJMD.cjs.js → button-CrUeW0pR.cjs.js} +2 -2
- package/dist/chunks/{button-DEenpJMD.cjs.js.map → button-CrUeW0pR.cjs.js.map} +1 -1
- package/dist/chunks/calendar-BiE914Ki.cjs.js +2 -0
- package/dist/chunks/calendar-BiE914Ki.cjs.js.map +1 -0
- package/dist/chunks/{calendar-B_6JEmid.es.js → calendar-D7pzgXqX.es.js} +27 -18
- package/dist/chunks/calendar-D7pzgXqX.es.js.map +1 -0
- package/dist/chunks/{checkbox-CBESN7DZ.cjs.js → checkbox-CVnNylPS.cjs.js} +2 -2
- package/dist/chunks/{checkbox-CBESN7DZ.cjs.js.map → checkbox-CVnNylPS.cjs.js.map} +1 -1
- package/dist/chunks/{checkbox-BAfhgr2Q.es.js → checkbox-CjR64WWv.es.js} +5 -5
- package/dist/chunks/{checkbox-BAfhgr2Q.es.js.map → checkbox-CjR64WWv.es.js.map} +1 -1
- package/dist/chunks/{collapsible-motion-D0FWLqB-.cjs.js → collapsible-motion-CUcSKaFQ.cjs.js} +2 -2
- package/dist/chunks/{collapsible-motion-D0FWLqB-.cjs.js.map → collapsible-motion-CUcSKaFQ.cjs.js.map} +1 -1
- package/dist/chunks/{collapsible-motion-BAHapRD_.es.js → collapsible-motion-CqJQvrAr.es.js} +3 -3
- package/dist/chunks/{collapsible-motion-BAHapRD_.es.js.map → collapsible-motion-CqJQvrAr.es.js.map} +1 -1
- package/dist/chunks/combobox-Bm_d6SaB.cjs.js +2 -0
- package/dist/chunks/{combobox-CJEs8K1H.cjs.js.map → combobox-Bm_d6SaB.cjs.js.map} +1 -1
- package/dist/chunks/{combobox-Dcaw-Scl.es.js → combobox-g3cCFSMZ.es.js} +127 -128
- package/dist/chunks/{combobox-Dcaw-Scl.es.js.map → combobox-g3cCFSMZ.es.js.map} +1 -1
- package/dist/chunks/data-table--7Qxgjb7.cjs.js +2 -0
- package/dist/chunks/data-table--7Qxgjb7.cjs.js.map +1 -0
- package/dist/chunks/data-table-Dnp2C_pq.es.js +4176 -0
- package/dist/chunks/data-table-Dnp2C_pq.es.js.map +1 -0
- package/dist/chunks/{date-input-Edn9vWV1.es.js → date-input-CRnreBK0.es.js} +4 -4
- package/dist/chunks/{date-input-Edn9vWV1.es.js.map → date-input-CRnreBK0.es.js.map} +1 -1
- package/dist/chunks/{date-input-CbJeRnmd.cjs.js → date-input-CXFII_3C.cjs.js} +2 -2
- package/dist/chunks/{date-input-CbJeRnmd.cjs.js.map → date-input-CXFII_3C.cjs.js.map} +1 -1
- package/dist/chunks/{date-picker-Bedy6752.cjs.js → date-picker-BzSXCoJ0.cjs.js} +2 -2
- package/dist/chunks/{date-picker-Bedy6752.cjs.js.map → date-picker-BzSXCoJ0.cjs.js.map} +1 -1
- package/dist/chunks/{date-picker-DvI-NGBn.es.js → date-picker-Zz2Sp3S6.es.js} +16 -18
- package/dist/chunks/{date-picker-DvI-NGBn.es.js.map → date-picker-Zz2Sp3S6.es.js.map} +1 -1
- package/dist/chunks/{date-range-picker-BoYoffUD.es.js → date-range-picker-B2Cln3mU.es.js} +15 -17
- package/dist/chunks/{date-range-picker-BoYoffUD.es.js.map → date-range-picker-B2Cln3mU.es.js.map} +1 -1
- package/dist/chunks/{date-range-picker-odYIm4fD.cjs.js → date-range-picker-H_YtkQRE.cjs.js} +2 -2
- package/dist/chunks/{date-range-picker-odYIm4fD.cjs.js.map → date-range-picker-H_YtkQRE.cjs.js.map} +1 -1
- package/dist/chunks/{date-range-picker.field-CzsXm49P.es.js → date-range-picker.field-BUaFYM2O.es.js} +3 -3
- package/dist/chunks/{date-range-picker.field-CzsXm49P.es.js.map → date-range-picker.field-BUaFYM2O.es.js.map} +1 -1
- package/dist/chunks/{date-range-picker.field-DTWGHjdx.cjs.js → date-range-picker.field-CS0YU89_.cjs.js} +2 -2
- package/dist/chunks/{date-range-picker.field-DTWGHjdx.cjs.js.map → date-range-picker.field-CS0YU89_.cjs.js.map} +1 -1
- package/dist/chunks/{dialog-CMGeFzws.cjs.js → dialog-D7sGE9KU.cjs.js} +2 -2
- package/dist/chunks/{dialog-CMGeFzws.cjs.js.map → dialog-D7sGE9KU.cjs.js.map} +1 -1
- package/dist/chunks/{dialog-DuiXnZGx.es.js → dialog-DPpvAxDq.es.js} +2 -2
- package/dist/chunks/{dialog-DuiXnZGx.es.js.map → dialog-DPpvAxDq.es.js.map} +1 -1
- package/dist/chunks/{dialog.close-trigger-BNvTsWOn.es.js → dialog.close-trigger-BhUQxKIh.es.js} +7 -7
- package/dist/chunks/{dialog.close-trigger-BNvTsWOn.es.js.map → dialog.close-trigger-BhUQxKIh.es.js.map} +1 -1
- package/dist/chunks/{dialog.close-trigger-Crx_OdhW.cjs.js → dialog.close-trigger-Y9dS7xOy.cjs.js} +2 -2
- package/dist/chunks/{dialog.close-trigger-Crx_OdhW.cjs.js.map → dialog.close-trigger-Y9dS7xOy.cjs.js.map} +1 -1
- package/dist/chunks/{draggable-list-DR2KKaO_.cjs.js → draggable-list-TkB0lPBh.cjs.js} +3 -3
- package/dist/chunks/draggable-list-TkB0lPBh.cjs.js.map +1 -0
- package/dist/chunks/{draggable-list-BB8IGQJ6.es.js → draggable-list-ibWoXfeJ.es.js} +332 -318
- package/dist/chunks/draggable-list-ibWoXfeJ.es.js.map +1 -0
- package/dist/chunks/{drawer-DUVlTd1F.cjs.js → drawer-DZ75mvzL.cjs.js} +2 -2
- package/dist/chunks/{drawer-DUVlTd1F.cjs.js.map → drawer-DZ75mvzL.cjs.js.map} +1 -1
- package/dist/chunks/{drawer-hKr6SpSe.es.js → drawer-ZczUeqdd.es.js} +8 -8
- package/dist/chunks/{drawer-hKr6SpSe.es.js.map → drawer-ZczUeqdd.es.js.map} +1 -1
- package/dist/chunks/{extract-style-props-CBaCGha4.cjs.js → extract-style-props-B6-o20G1.cjs.js} +2 -2
- package/dist/chunks/{extract-style-props-CBaCGha4.cjs.js.map → extract-style-props-B6-o20G1.cjs.js.map} +1 -1
- package/dist/chunks/{extract-style-props-Cw0ebuoO.es.js → extract-style-props-fH5EHRZU.es.js} +2 -2
- package/dist/chunks/{extract-style-props-Cw0ebuoO.es.js.map → extract-style-props-fH5EHRZU.es.js.map} +1 -1
- package/dist/chunks/{form-field-DBi9CFok.es.js → form-field-C25xvMEM.es.js} +4 -4
- package/dist/chunks/form-field-C25xvMEM.es.js.map +1 -0
- package/dist/chunks/form-field-CpRzgqpq.cjs.js +2 -0
- package/dist/chunks/form-field-CpRzgqpq.cjs.js.map +1 -0
- package/dist/chunks/{getScrollParent-BsNSsJla.es.js → getScrollParent-g7luwBTz.es.js} +2 -2
- package/dist/chunks/{getScrollParent-BsNSsJla.es.js.map → getScrollParent-g7luwBTz.es.js.map} +1 -1
- package/dist/chunks/{heading-Ck9HCM5P.es.js → heading-BfaL2s7d.es.js} +2 -2
- package/dist/chunks/{heading-Ck9HCM5P.es.js.map → heading-BfaL2s7d.es.js.map} +1 -1
- package/dist/chunks/{icon-button-DJZJwO7E.cjs.js → icon-button-C_itb6iA.cjs.js} +2 -2
- package/dist/chunks/{icon-button-DJZJwO7E.cjs.js.map → icon-button-C_itb6iA.cjs.js.map} +1 -1
- package/dist/chunks/{icon-button-Bvr0zLGt.es.js → icon-button-XkzBkGuJ.es.js} +2 -2
- package/dist/chunks/{icon-button-Bvr0zLGt.es.js.map → icon-button-XkzBkGuJ.es.js.map} +1 -1
- package/dist/chunks/{icon-toggle-button-BlY5NEmP.es.js → icon-toggle-button-D4MFHBgl.es.js} +2 -2
- package/dist/chunks/{icon-toggle-button-BlY5NEmP.es.js.map → icon-toggle-button-D4MFHBgl.es.js.map} +1 -1
- package/dist/chunks/{icon-toggle-button-CUmglgfA.cjs.js → icon-toggle-button-D562D8WP.cjs.js} +2 -2
- package/dist/chunks/{icon-toggle-button-CUmglgfA.cjs.js.map → icon-toggle-button-D562D8WP.cjs.js.map} +1 -1
- package/dist/chunks/{index-CFfbr5i_.cjs.js → index-8m2zx8YL.cjs.js} +3 -3
- package/dist/chunks/index-8m2zx8YL.cjs.js.map +1 -0
- package/dist/chunks/{index-BGkAxVw_.es.js → index-B7wlrXvj.es.js} +22 -39
- package/dist/chunks/index-B7wlrXvj.es.js.map +1 -0
- package/dist/chunks/{link-CU-7XY0h.es.js → link-CPnL46cY.es.js} +3 -3
- package/dist/chunks/{link-CU-7XY0h.es.js.map → link-CPnL46cY.es.js.map} +1 -1
- package/dist/chunks/{localized-field-Cfr2yWfg.cjs.js → localized-field-ByW-vsvR.cjs.js} +2 -2
- package/dist/chunks/{localized-field-Cfr2yWfg.cjs.js.map → localized-field-ByW-vsvR.cjs.js.map} +1 -1
- package/dist/chunks/{localized-field-CmbkpZ4q.es.js → localized-field-DyZpSuGk.es.js} +23 -23
- package/dist/chunks/{localized-field-CmbkpZ4q.es.js.map → localized-field-DyZpSuGk.es.js.map} +1 -1
- package/dist/chunks/{menu-KGSl9Em7.cjs.js → menu-CJeqjRAs.cjs.js} +2 -2
- package/dist/chunks/{menu-KGSl9Em7.cjs.js.map → menu-CJeqjRAs.cjs.js.map} +1 -1
- package/dist/chunks/{menu-DG4V0LSQ.es.js → menu-CaSPNND_.es.js} +6 -6
- package/dist/chunks/{menu-DG4V0LSQ.es.js.map → menu-CaSPNND_.es.js.map} +1 -1
- package/dist/chunks/{money-input-CGMeW-uD.cjs.js → money-input-BT3JhOpu.cjs.js} +2 -2
- package/dist/chunks/{money-input-CGMeW-uD.cjs.js.map → money-input-BT3JhOpu.cjs.js.map} +1 -1
- package/dist/chunks/{money-input-Dci2k5rg.es.js → money-input-D6_TFZB-.es.js} +5 -5
- package/dist/chunks/{money-input-Dci2k5rg.es.js.map → money-input-D6_TFZB-.es.js.map} +1 -1
- package/dist/chunks/{multiline-text-input-IMPfRfkg.cjs.js → multiline-text-input-BWEsaxf_.cjs.js} +2 -2
- package/dist/chunks/{multiline-text-input-IMPfRfkg.cjs.js.map → multiline-text-input-BWEsaxf_.cjs.js.map} +1 -1
- package/dist/chunks/{multiline-text-input-DvnSJca6.es.js → multiline-text-input-DqLmTSr5.es.js} +3 -3
- package/dist/chunks/{multiline-text-input-DvnSJca6.es.js.map → multiline-text-input-DqLmTSr5.es.js.map} +1 -1
- package/dist/chunks/{nimbus-provider-CymDVsXZ.es.js → nimbus-provider-Bap0WHRm.es.js} +9 -9
- package/dist/chunks/{nimbus-provider-CymDVsXZ.es.js.map → nimbus-provider-Bap0WHRm.es.js.map} +1 -1
- package/dist/chunks/{nimbus-provider-DyYGXHWz.cjs.js → nimbus-provider-BarcIhYi.cjs.js} +2 -2
- package/dist/chunks/{nimbus-provider-DyYGXHWz.cjs.js.map → nimbus-provider-BarcIhYi.cjs.js.map} +1 -1
- package/dist/chunks/{number-input-D5uge6-t.cjs.js → number-input-BskHV8w5.cjs.js} +2 -2
- package/dist/chunks/{number-input-D5uge6-t.cjs.js.map → number-input-BskHV8w5.cjs.js.map} +1 -1
- package/dist/chunks/{number-input-CoVt943T.es.js → number-input-CerB7jp0.es.js} +4 -4
- package/dist/chunks/{number-input-CoVt943T.es.js.map → number-input-CerB7jp0.es.js.map} +1 -1
- package/dist/chunks/{openLink-D7--QlSJ.es.js → openLink-BNz58j4a.es.js} +7 -7
- package/dist/chunks/{openLink-D7--QlSJ.es.js.map → openLink-BNz58j4a.es.js.map} +1 -1
- package/dist/chunks/{pagination-C4_2Ov7h.es.js → pagination-dlHn3OhV.es.js} +25 -25
- package/dist/chunks/{pagination-C4_2Ov7h.es.js.map → pagination-dlHn3OhV.es.js.map} +1 -1
- package/dist/chunks/{pagination-Dbf6i8je.cjs.js → pagination-xj41eBPX.cjs.js} +2 -2
- package/dist/chunks/{pagination-Dbf6i8je.cjs.js.map → pagination-xj41eBPX.cjs.js.map} +1 -1
- package/dist/chunks/password-input-DGtJisDd.cjs.js +2 -0
- package/dist/chunks/password-input-DGtJisDd.cjs.js.map +1 -0
- package/dist/chunks/{password-input-D-WKBfJ_.es.js → password-input-Dw-m0lej.es.js} +11 -11
- package/dist/chunks/password-input-Dw-m0lej.es.js.map +1 -0
- package/dist/chunks/{popover-B5j28gJx.es.js → popover-CaE5pDl9.es.js} +2 -2
- package/dist/chunks/{popover-B5j28gJx.es.js.map → popover-CaE5pDl9.es.js.map} +1 -1
- package/dist/chunks/{popover-D0TkE271.cjs.js → popover-DY7ASSCU.cjs.js} +2 -2
- package/dist/chunks/{popover-D0TkE271.cjs.js.map → popover-DY7ASSCU.cjs.js.map} +1 -1
- package/dist/chunks/{progress-bar-DrK5bppD.es.js → progress-bar-CYd6T1Ax.es.js} +2 -2
- package/dist/chunks/{progress-bar-DrK5bppD.es.js.map → progress-bar-CYd6T1Ax.es.js.map} +1 -1
- package/dist/chunks/{progress-bar-CJqyWOZe.cjs.js → progress-bar-Dx9Zr5Yh.cjs.js} +2 -2
- package/dist/chunks/{progress-bar-CJqyWOZe.cjs.js.map → progress-bar-Dx9Zr5Yh.cjs.js.map} +1 -1
- package/dist/chunks/{radio-input-BL1YItkC.es.js → radio-input-Dg7PXbQa.es.js} +4 -4
- package/dist/chunks/{radio-input-BL1YItkC.es.js.map → radio-input-Dg7PXbQa.es.js.map} +1 -1
- package/dist/chunks/{radio-input-1myCCuNN.cjs.js → radio-input-yA7MF_jw.cjs.js} +2 -2
- package/dist/chunks/{radio-input-1myCCuNN.cjs.js.map → radio-input-yA7MF_jw.cjs.js.map} +1 -1
- package/dist/chunks/{range-calendar-C_2BhVos.es.js → range-calendar-D6nonjnz.es.js} +40 -31
- package/dist/chunks/range-calendar-D6nonjnz.es.js.map +1 -0
- package/dist/chunks/range-calendar-DhKTQPnz.cjs.js +2 -0
- package/dist/chunks/range-calendar-DhKTQPnz.cjs.js.map +1 -0
- package/dist/chunks/{rich-text-input-rd0Z_BZN.cjs.js → rich-text-input-CViBsj3Y.cjs.js} +2 -2
- package/dist/chunks/{rich-text-input-rd0Z_BZN.cjs.js.map → rich-text-input-CViBsj3Y.cjs.js.map} +1 -1
- package/dist/chunks/{rich-text-input-BH9R2Ndd.es.js → rich-text-input-hBorJHFw.es.js} +9 -9
- package/dist/chunks/{rich-text-input-BH9R2Ndd.es.js.map → rich-text-input-hBorJHFw.es.js.map} +1 -1
- package/dist/chunks/{scoped-search-input-DZYDPxMi.es.js → scoped-search-input-B7rDiJuj.es.js} +5 -5
- package/dist/chunks/{scoped-search-input-DZYDPxMi.es.js.map → scoped-search-input-B7rDiJuj.es.js.map} +1 -1
- package/dist/chunks/{scoped-search-input-DNmFeyN7.cjs.js → scoped-search-input-C6B7Szzk.cjs.js} +2 -2
- package/dist/chunks/{scoped-search-input-DNmFeyN7.cjs.js.map → scoped-search-input-C6B7Szzk.cjs.js.map} +1 -1
- package/dist/chunks/{scrollIntoView-DniANfOx.es.js → scrollIntoView-CRn_Y0bq.es.js} +4 -4
- package/dist/chunks/{scrollIntoView-DniANfOx.es.js.map → scrollIntoView-CRn_Y0bq.es.js.map} +1 -1
- package/dist/chunks/{search-input-CbKf6uv-.es.js → search-input-tna-iiqy.es.js} +7 -7
- package/dist/chunks/{search-input-CbKf6uv-.es.js.map → search-input-tna-iiqy.es.js.map} +1 -1
- package/dist/chunks/{search-input-Cuqj5Ozc.cjs.js → search-input-vq7lviez.cjs.js} +2 -2
- package/dist/chunks/{search-input-Cuqj5Ozc.cjs.js.map → search-input-vq7lviez.cjs.js.map} +1 -1
- package/dist/chunks/{select-C2lIA5hg.es.js → select-B0WZuFVc.es.js} +66 -67
- package/dist/chunks/{select-C2lIA5hg.es.js.map → select-B0WZuFVc.es.js.map} +1 -1
- package/dist/chunks/select-wD3QlanS.cjs.js +2 -0
- package/dist/chunks/{select-CWaI47Kc.cjs.js.map → select-wD3QlanS.cjs.js.map} +1 -1
- package/dist/chunks/{separator-DVnpuMAc.es.js → separator-Dng72n3L.es.js} +4 -4
- package/dist/chunks/{separator-DVnpuMAc.es.js.map → separator-Dng72n3L.es.js.map} +1 -1
- package/dist/chunks/{separator-D75V0Oga.cjs.js → separator-TrQT9Pcb.cjs.js} +2 -2
- package/dist/chunks/{separator-D75V0Oga.cjs.js.map → separator-TrQT9Pcb.cjs.js.map} +1 -1
- package/dist/chunks/split-button-BH500vls.cjs.js +2 -0
- package/dist/chunks/split-button-BH500vls.cjs.js.map +1 -0
- package/dist/chunks/{split-button-C1PFrcU6.es.js → split-button-pF0iIa_0.es.js} +10 -10
- package/dist/chunks/split-button-pF0iIa_0.es.js.map +1 -0
- package/dist/chunks/{switch-2AsRNDVU.cjs.js → switch-D3tDl7RG.cjs.js} +2 -2
- package/dist/chunks/{switch-2AsRNDVU.cjs.js.map → switch-D3tDl7RG.cjs.js.map} +1 -1
- package/dist/chunks/{switch-DVQRB0wu.es.js → switch-DJENPCZA.es.js} +4 -4
- package/dist/chunks/{switch-DVQRB0wu.es.js.map → switch-DJENPCZA.es.js.map} +1 -1
- package/dist/chunks/tabs-Bj24YiXX.cjs.js +2 -0
- package/dist/chunks/{tabs-BlcjUZnC.cjs.js.map → tabs-Bj24YiXX.cjs.js.map} +1 -1
- package/dist/chunks/{tabs-SeVATsGV.es.js → tabs-D3SqKC9V.es.js} +35 -35
- package/dist/chunks/{tabs-SeVATsGV.es.js.map → tabs-D3SqKC9V.es.js.map} +1 -1
- package/dist/chunks/{tag-group-DrCKPNqX.es.js → tag-group-DQ72dsVp.es.js} +13 -13
- package/dist/chunks/{tag-group-DrCKPNqX.es.js.map → tag-group-DQ72dsVp.es.js.map} +1 -1
- package/dist/chunks/tag-group-Djb2ouRY.cjs.js +2 -0
- package/dist/chunks/{tag-group-DexGJ8Hf.cjs.js.map → tag-group-Djb2ouRY.cjs.js.map} +1 -1
- package/dist/chunks/{text-input-Bm7-FMPR.cjs.js → text-input-B5tizBg4.cjs.js} +2 -2
- package/dist/chunks/{text-input-Bm7-FMPR.cjs.js.map → text-input-B5tizBg4.cjs.js.map} +1 -1
- package/dist/chunks/{text-input-CSkQFwGX.es.js → text-input-DBFEKmrv.es.js} +3 -3
- package/dist/chunks/{text-input-CSkQFwGX.es.js.map → text-input-DBFEKmrv.es.js.map} +1 -1
- package/dist/chunks/{time-input-ClOP5fJr.es.js → time-input-BJ1nDsyZ.es.js} +4 -4
- package/dist/chunks/{time-input-ClOP5fJr.es.js.map → time-input-BJ1nDsyZ.es.js.map} +1 -1
- package/dist/chunks/{time-input-BHyImNO3.cjs.js → time-input-DWrgu6Yp.cjs.js} +2 -2
- package/dist/chunks/{time-input-BHyImNO3.cjs.js.map → time-input-DWrgu6Yp.cjs.js.map} +1 -1
- package/dist/chunks/{toggle-button-Rczis1rR.es.js → toggle-button-Dm4hPGPr.es.js} +4 -4
- package/dist/chunks/{toggle-button-Rczis1rR.es.js.map → toggle-button-Dm4hPGPr.es.js.map} +1 -1
- package/dist/chunks/{toggle-button-group-TrFHgAeL.es.js → toggle-button-group-DMH0nd7S.es.js} +3 -3
- package/dist/chunks/{toggle-button-group-TrFHgAeL.es.js.map → toggle-button-group-DMH0nd7S.es.js.map} +1 -1
- package/dist/chunks/{toggle-button-group-BQczQ6D_.cjs.js → toggle-button-group-Lfn3zYmC.cjs.js} +2 -2
- package/dist/chunks/{toggle-button-group-BQczQ6D_.cjs.js.map → toggle-button-group-Lfn3zYmC.cjs.js.map} +1 -1
- package/dist/chunks/{toggle-button-group.recipe-DgySRvOW.cjs.js → toggle-button-group.recipe-COF-yHYR.cjs.js} +2 -2
- package/dist/chunks/{toggle-button-group.recipe-DgySRvOW.cjs.js.map → toggle-button-group.recipe-COF-yHYR.cjs.js.map} +1 -1
- package/dist/chunks/{toggle-button-group.recipe-CbCnJQP3.es.js → toggle-button-group.recipe-Cl3PTeGf.es.js} +2 -16
- package/dist/chunks/toggle-button-group.recipe-Cl3PTeGf.es.js.map +1 -0
- package/dist/chunks/{toggle-button-enJHTjsJ.cjs.js → toggle-button-mL9CAReh.cjs.js} +2 -2
- package/dist/chunks/{toggle-button-enJHTjsJ.cjs.js.map → toggle-button-mL9CAReh.cjs.js.map} +1 -1
- package/dist/chunks/{toolbar-CNqSGtQi.cjs.js → toolbar-Df-6gFqW.cjs.js} +2 -2
- package/dist/chunks/{toolbar-CNqSGtQi.cjs.js.map → toolbar-Df-6gFqW.cjs.js.map} +1 -1
- package/dist/chunks/{toolbar-CsuzuQNn.es.js → toolbar-wCiInDj2.es.js} +3 -3
- package/dist/chunks/{toolbar-CsuzuQNn.es.js.map → toolbar-wCiInDj2.es.js.map} +1 -1
- package/dist/chunks/{useButton-DEV993k7.es.js → useButton-C6AOJI9V.es.js} +2 -2
- package/dist/chunks/{useButton-DEV993k7.es.js.map → useButton-C6AOJI9V.es.js.map} +1 -1
- package/dist/chunks/{useDateFormatter-YLMdKUmg.es.js → useDateFormatter-eE8d1TkO.es.js} +2 -2
- package/dist/chunks/{useDateFormatter-YLMdKUmg.es.js.map → useDateFormatter-eE8d1TkO.es.js.map} +1 -1
- package/dist/chunks/useGridListItem-BETI-KGO.cjs.js +2 -0
- package/dist/chunks/useGridListItem-BETI-KGO.cjs.js.map +1 -0
- package/dist/chunks/{useHighlightSelectionDescription-DH3XBG7f.es.js → useGridListItem-WBYPB9KF.es.js} +406 -163
- package/dist/chunks/useGridListItem-WBYPB9KF.es.js.map +1 -0
- package/dist/chunks/useListState-BFNT8oUW.es.js +139 -0
- package/dist/chunks/useListState-BFNT8oUW.es.js.map +1 -0
- package/dist/chunks/useListState-QQtJHpsQ.cjs.js +2 -0
- package/dist/chunks/useListState-QQtJHpsQ.cjs.js.map +1 -0
- package/dist/chunks/{usePress-D9qOoxbA.es.js → usePress-HeLch-fy.es.js} +2 -2
- package/dist/chunks/{usePress-D9qOoxbA.es.js.map → usePress-HeLch-fy.es.js.map} +1 -1
- package/dist/chunks/{useSingleSelectListState-BawVWofI.cjs.js → useSingleSelectListState-CsD7W9nK.cjs.js} +2 -2
- package/dist/chunks/{useSingleSelectListState-BawVWofI.cjs.js.map → useSingleSelectListState-CsD7W9nK.cjs.js.map} +1 -1
- package/dist/chunks/{useSingleSelectListState-Bjn8R8w0.es.js → useSingleSelectListState-DcU-tU_H.es.js} +2 -2
- package/dist/chunks/{useSingleSelectListState-Bjn8R8w0.es.js.map → useSingleSelectListState-DcU-tU_H.es.js.map} +1 -1
- package/dist/chunks/{useToggle-Cc5uCpc9.es.js → useToggle-XQtoJnll.es.js} +2 -2
- package/dist/chunks/{useToggle-Cc5uCpc9.es.js.map → useToggle-XQtoJnll.es.js.map} +1 -1
- package/dist/components/accordion.cjs +1 -1
- package/dist/components/accordion.es.js +1 -1
- package/dist/components/alert/alert.recipe.d.ts +0 -22
- package/dist/components/alert/alert.slots.d.ts +4 -9
- package/dist/components/alert/alert.types.d.ts +5 -3
- package/dist/components/alert.cjs +1 -1
- package/dist/components/alert.es.js +1 -1
- package/dist/components/button/button.recipe.d.ts +0 -14
- package/dist/components/button/button.slots.d.ts +2 -2
- package/dist/components/button/button.types.d.ts +6 -5
- package/dist/components/button.cjs +1 -1
- package/dist/components/button.es.js +1 -1
- package/dist/components/calendar.cjs +1 -1
- package/dist/components/calendar.es.js +1 -1
- package/dist/components/checkbox.cjs +1 -1
- package/dist/components/checkbox.es.js +1 -1
- package/dist/components/collapsible-motion.cjs +1 -1
- package/dist/components/collapsible-motion.es.js +1 -1
- package/dist/components/combobox.cjs +1 -1
- package/dist/components/combobox.es.js +1 -1
- package/dist/components/components.cjs +1 -1
- package/dist/components/components.es.js +1 -1
- package/dist/components/data-table/components/data-table.layout-settings-panel.d.ts +4 -0
- package/dist/components/data-table/components/data-table.manager.d.ts +9 -0
- package/dist/components/data-table/components/data-table.visible-columns-panel.d.ts +7 -0
- package/dist/components/data-table/constants.d.ts +4 -0
- package/dist/components/data-table/data-table.d.ts +24 -1
- package/dist/components/data-table/data-table.i18n.d.ts +120 -0
- package/dist/components/data-table/data-table.slots.d.ts +2 -2
- package/dist/components/data-table/data-table.types.d.ts +20 -7
- package/dist/components/data-table/index.d.ts +1 -0
- package/dist/components/data-table/test-data.d.ts +4 -1
- package/dist/components/data-table.cjs +1 -1
- package/dist/components/data-table.es.js +10 -8
- package/dist/components/date-input.cjs +1 -1
- package/dist/components/date-input.es.js +1 -1
- package/dist/components/date-picker.cjs +1 -1
- package/dist/components/date-picker.es.js +1 -1
- package/dist/components/date-range-picker-field.cjs +1 -1
- package/dist/components/date-range-picker-field.es.js +1 -1
- package/dist/components/date-range-picker.cjs +1 -1
- package/dist/components/date-range-picker.es.js +1 -1
- package/dist/components/dialog.cjs +1 -1
- package/dist/components/dialog.es.js +1 -1
- package/dist/components/draggable-list.cjs +1 -1
- package/dist/components/draggable-list.es.js +1 -1
- package/dist/components/drawer.cjs +1 -1
- package/dist/components/drawer.es.js +1 -1
- package/dist/components/fields.cjs +1 -1
- package/dist/components/fields.es.js +1 -1
- package/dist/components/form-field.cjs +1 -1
- package/dist/components/form-field.es.js +1 -1
- package/dist/components/heading.es.js +1 -1
- package/dist/components/icon-button.cjs +1 -1
- package/dist/components/icon-button.es.js +1 -1
- package/dist/components/icon-toggle-button.cjs +1 -1
- package/dist/components/icon-toggle-button.es.js +1 -1
- package/dist/components/link.es.js +1 -1
- package/dist/components/loading-spinner/loading-spinner.recipe.d.ts +1 -1
- package/dist/components/loading-spinner/loading-spinner.slots.d.ts +5 -2
- package/dist/components/loading-spinner/loading-spinner.types.d.ts +3 -6
- package/dist/components/localized-field.cjs +1 -1
- package/dist/components/localized-field.es.js +1 -1
- package/dist/components/money-input.cjs +1 -1
- package/dist/components/money-input.es.js +1 -1
- package/dist/components/multiline-text-input.cjs +1 -1
- package/dist/components/multiline-text-input.es.js +1 -1
- package/dist/components/nimbus-provider.cjs +1 -1
- package/dist/components/nimbus-provider.es.js +1 -1
- package/dist/components/number-input.cjs +1 -1
- package/dist/components/number-input.es.js +1 -1
- package/dist/components/pagination.cjs +1 -1
- package/dist/components/pagination.es.js +1 -1
- package/dist/components/password-input.cjs +1 -1
- package/dist/components/password-input.es.js +1 -1
- package/dist/components/patterns.cjs +1 -1
- package/dist/components/patterns.es.js +1 -1
- package/dist/components/popover.cjs +1 -1
- package/dist/components/popover.es.js +1 -1
- package/dist/components/progress-bar.cjs +1 -1
- package/dist/components/progress-bar.es.js +1 -1
- package/dist/components/radio-input.cjs +1 -1
- package/dist/components/radio-input.es.js +1 -1
- package/dist/components/range-calendar.cjs +1 -1
- package/dist/components/range-calendar.es.js +1 -1
- package/dist/components/rich-text-input.cjs +1 -1
- package/dist/components/rich-text-input.es.js +1 -1
- package/dist/components/scoped-search-input.cjs +1 -1
- package/dist/components/scoped-search-input.es.js +1 -1
- package/dist/components/search-input.cjs +1 -1
- package/dist/components/search-input.es.js +1 -1
- package/dist/components/select.cjs +1 -1
- package/dist/components/select.es.js +1 -1
- package/dist/components/separator.cjs +1 -1
- package/dist/components/separator.es.js +1 -1
- package/dist/components/split-button/split-button.types.d.ts +1 -1
- package/dist/components/split-button.cjs +1 -1
- package/dist/components/split-button.es.js +1 -1
- package/dist/components/switch.cjs +1 -1
- package/dist/components/switch.es.js +1 -1
- package/dist/components/tabs.cjs +1 -1
- package/dist/components/tabs.es.js +1 -1
- package/dist/components/tag-group.cjs +1 -1
- package/dist/components/tag-group.es.js +1 -1
- package/dist/components/text-input.cjs +1 -1
- package/dist/components/text-input.es.js +1 -1
- package/dist/components/time-input.cjs +1 -1
- package/dist/components/time-input.es.js +1 -1
- package/dist/components/toggle-button/toggle-button.recipe.d.ts +0 -14
- package/dist/components/toggle-button/toggle-button.slots.d.ts +4 -11
- package/dist/components/toggle-button/toggle-button.types.d.ts +5 -4
- package/dist/components/toggle-button-group/toggle-button-group.recipe.d.ts +1 -1
- package/dist/components/toggle-button-group/toggle-button-group.types.d.ts +6 -4
- package/dist/components/toggle-button-group.cjs +1 -1
- package/dist/components/toggle-button-group.es.js +1 -1
- package/dist/components/toggle-button.cjs +1 -1
- package/dist/components/toggle-button.es.js +1 -1
- package/dist/components/toolbar.cjs +1 -1
- package/dist/components/toolbar.es.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.es.js +136 -134
- package/dist/index.es.js.map +1 -1
- package/dist/theme/recipes/index.d.ts +1 -29
- package/dist/theme/slot-recipes/index.d.ts +1 -23
- package/dist/type-utils/shared-types.d.ts +3 -6
- package/package.json +5 -5
- package/dist/chunks/DragAndDrop-35iVlv_E.cjs.js +0 -2
- package/dist/chunks/DragAndDrop-35iVlv_E.cjs.js.map +0 -1
- package/dist/chunks/DragAndDrop-Cu_xjzZg.es.js +0 -76
- package/dist/chunks/DragAndDrop-Cu_xjzZg.es.js.map +0 -1
- package/dist/chunks/Header-BE5dOA7y.es.js +0 -59
- package/dist/chunks/Header-BE5dOA7y.es.js.map +0 -1
- package/dist/chunks/Header-Ba1_guwA.cjs.js +0 -2
- package/dist/chunks/Header-Ba1_guwA.cjs.js.map +0 -1
- package/dist/chunks/ListBox-DkXFmzHf.cjs.js +0 -2
- package/dist/chunks/ListBox-DkXFmzHf.cjs.js.map +0 -1
- package/dist/chunks/ListBox-DxgCeXuN.es.js +0 -493
- package/dist/chunks/ListBox-DxgCeXuN.es.js.map +0 -1
- package/dist/chunks/ListKeyboardDelegate-BEarLHjT.cjs.js +0 -2
- package/dist/chunks/ListKeyboardDelegate-BEarLHjT.cjs.js.map +0 -1
- package/dist/chunks/ListKeyboardDelegate-ekIDdehS.es.js +0 -159
- package/dist/chunks/ListKeyboardDelegate-ekIDdehS.es.js.map +0 -1
- package/dist/chunks/alert-BYw_3VgA.cjs.js +0 -2
- package/dist/chunks/alert-BYw_3VgA.cjs.js.map +0 -1
- package/dist/chunks/alert-DafE92Ep.es.js.map +0 -1
- package/dist/chunks/calendar-B_6JEmid.es.js.map +0 -1
- package/dist/chunks/calendar-Kd_2ZJIo.cjs.js +0 -2
- package/dist/chunks/calendar-Kd_2ZJIo.cjs.js.map +0 -1
- package/dist/chunks/combobox-CJEs8K1H.cjs.js +0 -2
- package/dist/chunks/data-table-DdnSEpEq.cjs.js +0 -2
- package/dist/chunks/data-table-DdnSEpEq.cjs.js.map +0 -1
- package/dist/chunks/data-table-zaE0wk1G.es.js +0 -3638
- package/dist/chunks/data-table-zaE0wk1G.es.js.map +0 -1
- package/dist/chunks/draggable-list-BB8IGQJ6.es.js.map +0 -1
- package/dist/chunks/draggable-list-DR2KKaO_.cjs.js.map +0 -1
- package/dist/chunks/form-field-DBi9CFok.es.js.map +0 -1
- package/dist/chunks/form-field-Dn5VxoQ2.cjs.js +0 -2
- package/dist/chunks/form-field-Dn5VxoQ2.cjs.js.map +0 -1
- package/dist/chunks/index-BGkAxVw_.es.js.map +0 -1
- package/dist/chunks/index-CFfbr5i_.cjs.js.map +0 -1
- package/dist/chunks/inertValue-B7loUihk.es.js +0 -9
- package/dist/chunks/inertValue-B7loUihk.es.js.map +0 -1
- package/dist/chunks/inertValue-BWmZ1afe.cjs.js +0 -2
- package/dist/chunks/inertValue-BWmZ1afe.cjs.js.map +0 -1
- package/dist/chunks/password-input-D-WKBfJ_.es.js.map +0 -1
- package/dist/chunks/password-input-DApa74CT.cjs.js +0 -2
- package/dist/chunks/password-input-DApa74CT.cjs.js.map +0 -1
- package/dist/chunks/range-calendar-C_2BhVos.es.js.map +0 -1
- package/dist/chunks/range-calendar-M5itlXS-.cjs.js +0 -2
- package/dist/chunks/range-calendar-M5itlXS-.cjs.js.map +0 -1
- package/dist/chunks/select-CWaI47Kc.cjs.js +0 -2
- package/dist/chunks/split-button-C1PFrcU6.es.js.map +0 -1
- package/dist/chunks/split-button-DhxZShYM.cjs.js +0 -2
- package/dist/chunks/split-button-DhxZShYM.cjs.js.map +0 -1
- package/dist/chunks/tabs-BlcjUZnC.cjs.js +0 -2
- package/dist/chunks/tag-group-DexGJ8Hf.cjs.js +0 -2
- package/dist/chunks/toggle-button-group.recipe-CbCnJQP3.es.js.map +0 -1
- package/dist/chunks/useGridListItem-DSRAVcC0.es.js +0 -251
- package/dist/chunks/useGridListItem-DSRAVcC0.es.js.map +0 -1
- package/dist/chunks/useGridListItem-Dt8Kui_9.cjs.js +0 -2
- package/dist/chunks/useGridListItem-Dt8Kui_9.cjs.js.map +0 -1
- package/dist/chunks/useGridSelectionCheckbox-CB9AkcJ-.cjs.js +0 -2
- package/dist/chunks/useGridSelectionCheckbox-CB9AkcJ-.cjs.js.map +0 -1
- package/dist/chunks/useGridSelectionCheckbox-qNlOk_Zu.es.js +0 -23
- package/dist/chunks/useGridSelectionCheckbox-qNlOk_Zu.es.js.map +0 -1
- package/dist/chunks/useHighlightSelectionDescription-C37fwYgQ.cjs.js +0 -2
- package/dist/chunks/useHighlightSelectionDescription-C37fwYgQ.cjs.js.map +0 -1
- package/dist/chunks/useHighlightSelectionDescription-DH3XBG7f.es.js.map +0 -1
- package/dist/chunks/useListState-HM8Jsi0C.cjs.js +0 -2
- package/dist/chunks/useListState-HM8Jsi0C.cjs.js.map +0 -1
- package/dist/chunks/useListState-QNqJ2RZ-.es.js +0 -134
- package/dist/chunks/useListState-QNqJ2RZ-.es.js.map +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as e, jsxs as m, Fragment as u } from "react/jsx-runtime";
|
|
2
2
|
import { createSlotRecipeContext as f } from "@chakra-ui/react";
|
|
3
|
-
import { $ as h, a as g, b as S } from "./DateField-
|
|
3
|
+
import { $ as h, a as g, b as S } from "./DateField-DMjgxual.es.js";
|
|
4
4
|
import { useRecipe as $ } from "@chakra-ui/react/styled-system";
|
|
5
|
-
import { d as x } from "./index-
|
|
6
|
-
import { e as I } from "./extract-style-props-
|
|
5
|
+
import { d as x } from "./index-B7wlrXvj.es.js";
|
|
6
|
+
import { e as I } from "./extract-style-props-fH5EHRZU.es.js";
|
|
7
7
|
const { withProvider: D, withContext: t } = /* @__PURE__ */ f({
|
|
8
8
|
key: "dateInput"
|
|
9
9
|
}), b = /* @__PURE__ */ D("div", "root"), P = /* @__PURE__ */ t("div", "leadingElement"), v = /* @__PURE__ */ t("div", "trailingElement"), E = /* @__PURE__ */ t("div", "segmentGroup"), C = /* @__PURE__ */ t("div", "segment"), y = (o) => {
|
|
@@ -18,4 +18,4 @@ y.displayName = "DateInput";
|
|
|
18
18
|
export {
|
|
19
19
|
y as D
|
|
20
20
|
};
|
|
21
|
-
//# sourceMappingURL=date-input-
|
|
21
|
+
//# sourceMappingURL=date-input-CRnreBK0.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-input-
|
|
1
|
+
{"version":3,"file":"date-input-CRnreBK0.es.js","sources":["../../src/components/date-input/date-input.slots.tsx","../../src/components/date-input/date-input.tsx"],"sourcesContent":["import {\n type HTMLChakraProps,\n createSlotRecipeContext,\n} from \"@chakra-ui/react\";\nimport type { DateInputRootSlotProps } from \"./date-input.types\";\n\n// Correctly destructure from createSlotRecipeContext based on project examples\nconst { withProvider, withContext } = createSlotRecipeContext({\n key: \"dateInput\",\n});\n\n/**\n * Root component that provides the styling context for the DateInput component.\n * Uses Chakra UI's recipe context system for consistent styling across instances.\n */\nexport const DateInputRootSlot = withProvider<\n HTMLDivElement,\n DateInputRootSlotProps\n>(\"div\", \"root\");\n\nexport const DateInputLeadingElementSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"leadingElement\");\n\nexport const DateInputTrailingElementSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"trailingElement\");\n\n/**\n * Slot component for the DateField part of the DateInput.\n */\nexport const DateInputSegmentGroupSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"segmentGroup\");\n\n/**\n * Slot component for the DateField part of the DateInput.\n */\nexport const DateInputSegmentSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"segment\");\n","import {\n DateInputLeadingElementSlot,\n DateInputRootSlot,\n DateInputSegmentGroupSlot,\n DateInputSegmentSlot,\n DateInputTrailingElementSlot,\n} from \"./date-input.slots\";\n\nimport {\n DateField,\n DateInput as DateInputField,\n DateSegment,\n} from \"react-aria-components\";\nimport { useRecipe } from \"@chakra-ui/react/styled-system\";\nimport { dateInputSlotRecipe } from \"./date-input.recipe\";\nimport type { DateInputProps } from \"./date-input.types\";\nimport { extractStyleProps } from \"@/utils\";\n\n/**\n * # DateInput\n *\n * allows entering a date\n *\n * @see {@link https://nimbus-documentation.vercel.app/components/inputs/dateinput}\n */\nexport const DateInput = (props: DateInputProps) => {\n const recipe = useRecipe({ recipe: dateInputSlotRecipe });\n const { leadingElement, trailingElement, ...rest } = props;\n const [recipeProps, recipeFreeProps] = recipe.splitVariantProps({ ...rest });\n const [styleProps, functionalProps] = extractStyleProps(recipeFreeProps);\n\n return (\n <DateInputRootSlot {...recipeProps} {...styleProps} asChild>\n <DateField {...functionalProps}>\n <>\n {leadingElement && (\n <DateInputLeadingElementSlot>\n {leadingElement}\n </DateInputLeadingElementSlot>\n )}\n <DateInputSegmentGroupSlot asChild>\n <DateInputField>\n {(segment) => (\n <DateInputSegmentSlot asChild>\n <DateSegment segment={segment} />\n </DateInputSegmentSlot>\n )}\n </DateInputField>\n </DateInputSegmentGroupSlot>\n {trailingElement && (\n <DateInputTrailingElementSlot>\n {trailingElement}\n </DateInputTrailingElementSlot>\n )}\n </>\n </DateField>\n </DateInputRootSlot>\n );\n};\n\nDateInput.displayName = \"DateInput\";\n"],"names":["withProvider","withContext","createSlotRecipeContext","DateInputRootSlot","DateInputLeadingElementSlot","DateInputTrailingElementSlot","DateInputSegmentGroupSlot","DateInputSegmentSlot","DateInput","props","recipe","useRecipe","dateInputSlotRecipe","leadingElement","trailingElement","rest","recipeProps","recipeFreeProps","styleProps","functionalProps","extractStyleProps","jsx","DateField","jsxs","Fragment","DateInputField","segment","DateSegment"],"mappings":";;;;;;AAOA,MAAM,EAAE,cAAAA,GAAc,aAAAC,EAAA,IAAgB,gBAAAC,EAAwB;AAAA,EAC5D,KAAK;AACP,CAAC,GAMYC,IAAoB,gBAAAH,EAG/B,OAAO,MAAM,GAEFI,IAA8B,gBAAAH,EAGzC,OAAO,gBAAgB,GAEZI,IAA+B,gBAAAJ,EAG1C,OAAO,iBAAiB,GAKbK,IAA4B,gBAAAL,EAGvC,OAAO,cAAc,GAKVM,IAAuB,gBAAAN,EAGlC,OAAO,SAAS,GCnBLO,IAAY,CAACC,MAA0B;AAClD,QAAMC,IAASC,EAAU,EAAE,QAAQC,GAAqB,GAClD,EAAE,gBAAAC,GAAgB,iBAAAC,GAAiB,GAAGC,MAASN,GAC/C,CAACO,GAAaC,CAAe,IAAIP,EAAO,kBAAkB,EAAE,GAAGK,GAAM,GACrE,CAACG,GAAYC,CAAe,IAAIC,EAAkBH,CAAe;AAEvE,SACE,gBAAAI,EAAClB,GAAA,EAAmB,GAAGa,GAAc,GAAGE,GAAY,SAAO,IACzD,UAAA,gBAAAG,EAACC,GAAA,EAAW,GAAGH,GACb,UAAA,gBAAAI,EAAAC,GAAA,EACG,UAAA;AAAA,IAAAX,KACC,gBAAAQ,EAACjB,KACE,UAAAS,EAAA,CACH;AAAA,sBAEDP,GAAA,EAA0B,SAAO,IAChC,UAAA,gBAAAe,EAACI,KACE,UAAA,CAACC,MACA,gBAAAL,EAACd,GAAA,EAAqB,SAAO,IAC3B,UAAA,gBAAAc,EAACM,KAAY,SAAAD,EAAA,CAAkB,GACjC,GAEJ,EAAA,CACF;AAAA,IACCZ,KACC,gBAAAO,EAAChB,GAAA,EACE,UAAAS,EAAA,CACH;AAAA,EAAA,EAAA,CAEJ,GACF,GACF;AAEJ;AAEAN,EAAU,cAAc;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const e=require("react/jsx-runtime"),m=require("@chakra-ui/react"),n=require("./DateField-B5u8QZFY.cjs.js"),h=require("@chakra-ui/react/styled-system"),S=require("./index-
|
|
2
|
-
//# sourceMappingURL=date-input-
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),m=require("@chakra-ui/react"),n=require("./DateField-B5u8QZFY.cjs.js"),h=require("@chakra-ui/react/styled-system"),S=require("./index-8m2zx8YL.cjs.js"),g=require("./extract-style-props-B6-o20G1.cjs.js"),{withProvider:j,withContext:t}=m.createSlotRecipeContext({key:"dateInput"}),I=j("div","root"),D=t("div","leadingElement"),$=t("div","trailingElement"),f=t("div","segmentGroup"),P=t("div","segment"),s=c=>{const o=h.useRecipe({recipe:S.dateInputSlotRecipe}),{leadingElement:r,trailingElement:i,...l}=c,[a,d]=o.splitVariantProps({...l}),[p,u]=g.extractStyleProps(d);return e.jsx(I,{...a,...p,asChild:!0,children:e.jsx(n.$40825cdb76e74f70$export$d9781c7894a82487,{...u,children:e.jsxs(e.Fragment,{children:[r&&e.jsx(D,{children:r}),e.jsx(f,{asChild:!0,children:e.jsx(n.$40825cdb76e74f70$export$7edc06cf1783b30f,{children:x=>e.jsx(P,{asChild:!0,children:e.jsx(n.$40825cdb76e74f70$export$336ab7fa954c4b5f,{segment:x})})})}),i&&e.jsx($,{children:i})]})})})};s.displayName="DateInput";exports.DateInput=s;
|
|
2
|
+
//# sourceMappingURL=date-input-CXFII_3C.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-input-
|
|
1
|
+
{"version":3,"file":"date-input-CXFII_3C.cjs.js","sources":["../../src/components/date-input/date-input.slots.tsx","../../src/components/date-input/date-input.tsx"],"sourcesContent":["import {\n type HTMLChakraProps,\n createSlotRecipeContext,\n} from \"@chakra-ui/react\";\nimport type { DateInputRootSlotProps } from \"./date-input.types\";\n\n// Correctly destructure from createSlotRecipeContext based on project examples\nconst { withProvider, withContext } = createSlotRecipeContext({\n key: \"dateInput\",\n});\n\n/**\n * Root component that provides the styling context for the DateInput component.\n * Uses Chakra UI's recipe context system for consistent styling across instances.\n */\nexport const DateInputRootSlot = withProvider<\n HTMLDivElement,\n DateInputRootSlotProps\n>(\"div\", \"root\");\n\nexport const DateInputLeadingElementSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"leadingElement\");\n\nexport const DateInputTrailingElementSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"trailingElement\");\n\n/**\n * Slot component for the DateField part of the DateInput.\n */\nexport const DateInputSegmentGroupSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"segmentGroup\");\n\n/**\n * Slot component for the DateField part of the DateInput.\n */\nexport const DateInputSegmentSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"segment\");\n","import {\n DateInputLeadingElementSlot,\n DateInputRootSlot,\n DateInputSegmentGroupSlot,\n DateInputSegmentSlot,\n DateInputTrailingElementSlot,\n} from \"./date-input.slots\";\n\nimport {\n DateField,\n DateInput as DateInputField,\n DateSegment,\n} from \"react-aria-components\";\nimport { useRecipe } from \"@chakra-ui/react/styled-system\";\nimport { dateInputSlotRecipe } from \"./date-input.recipe\";\nimport type { DateInputProps } from \"./date-input.types\";\nimport { extractStyleProps } from \"@/utils\";\n\n/**\n * # DateInput\n *\n * allows entering a date\n *\n * @see {@link https://nimbus-documentation.vercel.app/components/inputs/dateinput}\n */\nexport const DateInput = (props: DateInputProps) => {\n const recipe = useRecipe({ recipe: dateInputSlotRecipe });\n const { leadingElement, trailingElement, ...rest } = props;\n const [recipeProps, recipeFreeProps] = recipe.splitVariantProps({ ...rest });\n const [styleProps, functionalProps] = extractStyleProps(recipeFreeProps);\n\n return (\n <DateInputRootSlot {...recipeProps} {...styleProps} asChild>\n <DateField {...functionalProps}>\n <>\n {leadingElement && (\n <DateInputLeadingElementSlot>\n {leadingElement}\n </DateInputLeadingElementSlot>\n )}\n <DateInputSegmentGroupSlot asChild>\n <DateInputField>\n {(segment) => (\n <DateInputSegmentSlot asChild>\n <DateSegment segment={segment} />\n </DateInputSegmentSlot>\n )}\n </DateInputField>\n </DateInputSegmentGroupSlot>\n {trailingElement && (\n <DateInputTrailingElementSlot>\n {trailingElement}\n </DateInputTrailingElementSlot>\n )}\n </>\n </DateField>\n </DateInputRootSlot>\n );\n};\n\nDateInput.displayName = \"DateInput\";\n"],"names":["withProvider","withContext","createSlotRecipeContext","DateInputRootSlot","DateInputLeadingElementSlot","DateInputTrailingElementSlot","DateInputSegmentGroupSlot","DateInputSegmentSlot","DateInput","props","recipe","useRecipe","dateInputSlotRecipe","leadingElement","trailingElement","rest","recipeProps","recipeFreeProps","styleProps","functionalProps","extractStyleProps","jsx","DateField","jsxs","Fragment","DateInputField","segment","DateSegment"],"mappings":"6PAOM,CAAE,aAAAA,EAAc,YAAAC,CAAA,EAAgBC,0BAAwB,CAC5D,IAAK,WACP,CAAC,EAMYC,EAAoBH,EAG/B,MAAO,MAAM,EAEFI,EAA8BH,EAGzC,MAAO,gBAAgB,EAEZI,EAA+BJ,EAG1C,MAAO,iBAAiB,EAKbK,EAA4BL,EAGvC,MAAO,cAAc,EAKVM,EAAuBN,EAGlC,MAAO,SAAS,ECnBLO,EAAaC,GAA0B,CAClD,MAAMC,EAASC,EAAAA,UAAU,CAAE,OAAQC,EAAAA,oBAAqB,EAClD,CAAE,eAAAC,EAAgB,gBAAAC,EAAiB,GAAGC,GAASN,EAC/C,CAACO,EAAaC,CAAe,EAAIP,EAAO,kBAAkB,CAAE,GAAGK,EAAM,EACrE,CAACG,EAAYC,CAAe,EAAIC,EAAAA,kBAAkBH,CAAe,EAEvE,OACEI,EAAAA,IAAClB,EAAA,CAAmB,GAAGa,EAAc,GAAGE,EAAY,QAAO,GACzD,SAAAG,EAAAA,IAACC,EAAAA,0CAAA,CAAW,GAAGH,EACb,SAAAI,OAAAC,EAAAA,SAAA,CACG,SAAA,CAAAX,GACCQ,EAAAA,IAACjB,GACE,SAAAS,CAAA,CACH,QAEDP,EAAA,CAA0B,QAAO,GAChC,SAAAe,EAAAA,IAACI,6CACE,SAACC,GACAL,EAAAA,IAACd,EAAA,CAAqB,QAAO,GAC3B,SAAAc,EAAAA,IAACM,6CAAY,QAAAD,CAAA,CAAkB,EACjC,EAEJ,CAAA,CACF,EACCZ,GACCO,EAAAA,IAAChB,EAAA,CACE,SAAAS,CAAA,CACH,CAAA,CAAA,CAEJ,EACF,EACF,CAEJ,EAEAN,EAAU,YAAc"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const e=require("react/jsx-runtime"),
|
|
2
|
-
//# sourceMappingURL=date-picker-
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),y=require("@chakra-ui/react"),P=require("@commercetools/nimbus-icons"),x=require("./DatePicker-DGLrUdLu.cjs.js"),T=require("./Dialog-Ye_7tQZU.cjs.js"),q=require("./Group-1nWkximy.cjs.js"),v=require("@chakra-ui/react/styled-system"),C=require("./index-8m2zx8YL.cjs.js"),I=require("./extract-style-props-B6-o20G1.cjs.js"),f=require("react"),h=require("react-intl"),M=require("./time-input-DWrgu6Yp.cjs.js"),E=require("@chakra-ui/react/flex"),H=require("./text-BtRhIklG.cjs.js"),k=require("./Button-DLCecw8f.cjs.js"),S=require("./utils-DVb3jcp5.cjs.js"),R=require("./DateField-B5u8QZFY.cjs.js"),N=require("./date-input-CXFII_3C.cjs.js"),V=require("./calendar-BiE914Ki.cjs.js"),B=require("./box-CWni3A32.cjs.js"),D=require("./icon-button-C_itb6iA.cjs.js"),{withProvider:w,withContext:g}=y.createSlotRecipeContext({key:"datePicker"}),z=w("div","root"),F=g("div","group"),G=g("div","popover"),A=g("div","calendar"),m=h.defineMessages({clearInput:{id:"Nimbus.DatePicker.clearInput",description:"aria-label for clear input button in date picker",defaultMessage:"Clear input value"},enterTime:{id:"Nimbus.DatePicker.Time.enterTime",description:"aria-label for time input field in date picker",defaultMessage:"Enter time"},enterTimeHour:{id:"Nimbus.DatePicker.Time.enterTimeHour",description:"aria-label for hour-only time input in date picker",defaultMessage:"Enter time (hour)"},enterTimeHourMinute:{id:"Nimbus.DatePicker.Time.enterTimeHourMinute",description:"aria-label for hour and minute time input in date picker",defaultMessage:"Enter time (hour and minute)"},enterTimeHourMinuteSecond:{id:"Nimbus.DatePicker.Time.enterTimeHourMinuteSecond",description:"aria-label for full time input with seconds in date picker",defaultMessage:"Enter time (hour, minute, and second)"},startTime:{id:"Nimbus.DatePicker.Time.startTime",description:"Label for start time in date picker",defaultMessage:"Start time"}}),L=({hideTimeZone:n,hourCycle:r})=>{const s=f.useContext(x.$06d5b8ec9ee5d538$export$50a10c048fdcdee9),{granularity:a,dateValue:t}=s,o=f.useRef(null),u=f.useRef(t);return a==="day"?null:(f.useEffect(()=>{let i;if(t&&u.current?.compare(t)!==0){const c=o.current,l=document.activeElement;c?.contains(l)&&l?.getAttribute("role")==="spinbutton"||(i=setTimeout(()=>{c&&c.querySelector('[role="spinbutton"]')?.focus()},50))}return u.current=t,()=>{i&&clearTimeout(i)}},[t]),e.jsxs(E.Flex,{ref:o,borderTop:"solid-25",borderColor:"neutral.3",py:"300",px:"400",alignItems:"center",justifyContent:"center",gap:"200",children:[e.jsx(H.Text,{textStyle:"xs",fontWeight:"500",color:"neutral.12",children:e.jsx(h.FormattedMessage,{...m.startTime})}),e.jsx(M.TimeInput,{slot:"timeInput",variant:"ghost",size:"sm",hideTimeZone:n,hourCycle:r})]}))},O=({children:n})=>{const r=h.useIntl(),s=S.$64fa3d84918910a7$export$fabf2dc03a41866e(k.$d2b4bc8c273e7be6$export$24d547caef80ccd1)||{},a=f.useContext(x.$06d5b8ec9ee5d538$export$50a10c048fdcdee9),t=a?.dateValue===null,{timeValue:o,setTimeValue:u,granularity:i}=a,c=s?.isDisabled,l=()=>{switch(i){case"hour":return r.formatMessage(m.enterTimeHour);case"minute":return r.formatMessage(m.enterTimeHourMinute);case"second":return r.formatMessage(m.enterTimeHourMinuteSecond);default:return r.formatMessage(m.enterTime)}},b={calendarToggle:{...s,onPress:d=>{const $=document?.activeElement;$&&$.blur(),s.onPress?.(d)}},clear:{onPress:()=>a?.setValue(null),"aria-label":r.formatMessage(m.clearInput),isDisabled:c,style:t?{display:"none"}:void 0,"aria-hidden":t?!0:void 0}},p={timeInput:{value:o,onChange:d=>{d!==null&&u(d)},granularity:i==="day"?void 0:i,"aria-label":l()}};return e.jsx(S.$64fa3d84918910a7$export$2881499e37b75b9a,{values:[[k.$d2b4bc8c273e7be6$export$24d547caef80ccd1,{slots:b}],[R.$40825cdb76e74f70$export$8e17ddc448e87c1e,{slots:p}]],children:n})},j=n=>{const{size:r="md",variant:s,granularity:a="day",hideTimeZone:t,hourCycle:o}=n,u=v.useSlotRecipe({recipe:C.datePickerSlotRecipe}),[i,c]=u.splitVariantProps(n),[l,b]=I.extractStyleProps(c),p=r==="md"?"xs":"2xs",d=a==="day"?n.shouldCloseOnSelect:!1;return e.jsx(z,{...i,...l,asChild:!0,children:e.jsx(x.$06d5b8ec9ee5d538$export$5109c6dd95d8fb00,{...b,shouldCloseOnSelect:d,children:e.jsxs(O,{children:[e.jsx(F,{asChild:!0,children:e.jsx(q.$a049562f99e7db0e$export$eb2fcfdbd7ba97d4,{children:e.jsx(N.DateInput,{size:r,variant:s,width:"full",hideTimeZone:t,hourCycle:o,trailingElement:e.jsxs(B.Box,{children:[e.jsx(D.IconButton,{variant:"ghost",size:p,slot:"clear",children:e.jsx(P.Close,{})}),e.jsx(D.IconButton,{variant:"ghost",size:p,slot:"calendarToggle",children:e.jsx(P.CalendarMonth,{})})]})})})}),e.jsx(G,{asChild:!0,children:e.jsx(T.$07b14b47974efb58$export$5b6b19405a83ff9d,{placement:"bottom end",children:e.jsxs(T.$de32f1b87079253c$export$3ddf2d174ce01153,{children:[e.jsx(A,{children:e.jsx(V.Calendar,{})}),e.jsx(L,{hideTimeZone:t,hourCycle:o})]})})})]})})})};j.displayName="DatePicker";exports.DatePicker=j;
|
|
2
|
+
//# sourceMappingURL=date-picker-BzSXCoJ0.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-picker-Bedy6752.cjs.js","sources":["../../src/components/date-picker/date-picker.slots.tsx","../../src/components/date-picker/date-picker.i18n.ts","../../src/components/date-picker/components/date-picker.time-input.tsx","../../src/components/date-picker/components/date-picker.custom-context.tsx","../../src/components/date-picker/date-picker.tsx"],"sourcesContent":["import {\n type HTMLChakraProps,\n createSlotRecipeContext,\n} from \"@chakra-ui/react\";\nimport type { DatePickerRootSlotProps } from \"./date-picker.types\";\n\n// Correctly destructure from createSlotRecipeContext based on project examples\nconst { withProvider, withContext } = createSlotRecipeContext({\n key: \"datePicker\",\n});\n\n/**\n * Root component that provides the styling context for the DatePicker component.\n * Uses Chakra UI's recipe context system for consistent styling across instances.\n */\nexport const DatePickerRootSlot = withProvider<\n HTMLDivElement,\n DatePickerRootSlotProps\n>(\"div\", \"root\");\n\n/**\n * Slot component for the input group containing the DateInput.\n */\nexport const DatePickerGroupSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"group\");\n\n/**\n * Slot component for the popover container.\n */\nexport const DatePickerPopoverSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"popover\");\n\n/**\n * Slot component for the calendar container within the popover.\n */\nexport const DatePickerCalendarSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"calendar\");\n\n/**\n * Slot component for the calendar header.\n */\nexport const DatePickerCalendarHeaderSlot = withContext<\n HTMLElement,\n HTMLChakraProps<\"header\">\n>(\"header\", \"calendarHeader\");\n\n/**\n * Slot component for the calendar grid.\n */\nexport const DatePickerCalendarGridSlot = withContext<\n HTMLTableElement,\n HTMLChakraProps<\"table\">\n>(\"table\", \"calendarGrid\");\n\n/**\n * Slot component for individual calendar cells.\n */\nexport const DatePickerCalendarCellSlot = withContext<\n HTMLTableCellElement,\n HTMLChakraProps<\"td\">\n>(\"td\", \"calendarCell\");\n","import { defineMessages } from \"react-intl\";\n\nexport const messages = defineMessages({\n clearInput: {\n id: \"Nimbus.DatePicker.clearInput\",\n description: \"aria-label for clear input button in date picker\",\n defaultMessage: \"Clear input value\",\n },\n enterTime: {\n id: \"Nimbus.DatePicker.Time.enterTime\",\n description: \"aria-label for time input field in date picker\",\n defaultMessage: \"Enter time\",\n },\n enterTimeHour: {\n id: \"Nimbus.DatePicker.Time.enterTimeHour\",\n description: \"aria-label for hour-only time input in date picker\",\n defaultMessage: \"Enter time (hour)\",\n },\n enterTimeHourMinute: {\n id: \"Nimbus.DatePicker.Time.enterTimeHourMinute\",\n description: \"aria-label for hour and minute time input in date picker\",\n defaultMessage: \"Enter time (hour and minute)\",\n },\n enterTimeHourMinuteSecond: {\n id: \"Nimbus.DatePicker.Time.enterTimeHourMinuteSecond\",\n description: \"aria-label for full time input with seconds in date picker\",\n defaultMessage: \"Enter time (hour, minute, and second)\",\n },\n startTime: {\n id: \"Nimbus.DatePicker.Time.startTime\",\n description: \"Label for start time in date picker\",\n defaultMessage: \"Start time\",\n },\n});\n","import { Flex, Text, TimeInput } from \"@/components\";\nimport { useContext, useRef, useEffect } from \"react\";\nimport { DatePickerStateContext } from \"react-aria-components\";\nimport type { DatePickerTimeInputProps } from \"../date-picker.types\";\nimport { FormattedMessage } from \"react-intl\";\nimport { messages } from \"../date-picker.i18n\";\n\nexport const DatePickerTimeInput = ({\n hideTimeZone,\n hourCycle,\n}: DatePickerTimeInputProps) => {\n const datePickerState = useContext(DatePickerStateContext);\n const { granularity, dateValue } = datePickerState!;\n const timeInputRef = useRef<HTMLDivElement>(null);\n const previousDateRef = useRef(dateValue);\n\n // do not show up to the party if you're not invited\n if (granularity === \"day\") {\n return null;\n }\n\n // Focus the time input when date changes (user selects a date from calendar)\n useEffect(() => {\n // Check if date changed\n let timeoutId: ReturnType<typeof setTimeout> | undefined;\n\n if (dateValue && previousDateRef.current?.compare(dateValue) !== 0) {\n // Only auto-focus if no time input segment currently has focus\n // This prevents stealing focus during user interaction with time segments\n const container = timeInputRef.current;\n const activeElement = document.activeElement;\n const hasTimeSegmentFocus =\n container?.contains(activeElement) &&\n activeElement?.getAttribute(\"role\") === \"spinbutton\";\n\n if (!hasTimeSegmentFocus) {\n // Small delay to ensure the DOM is ready\n timeoutId = setTimeout(() => {\n // Find the first focusable segment within the time input container\n if (container) {\n const firstSegment = container.querySelector(\n '[role=\"spinbutton\"]'\n ) as HTMLElement;\n firstSegment?.focus();\n }\n }, 50);\n }\n }\n\n previousDateRef.current = dateValue;\n\n // Cleanup timeout on effect re-run or unmount to prevent memory leaks\n return () => {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n };\n }, [dateValue]);\n\n return (\n <Flex\n ref={timeInputRef}\n borderTop=\"solid-25\"\n borderColor=\"neutral.3\"\n py=\"300\"\n px=\"400\"\n alignItems=\"center\"\n justifyContent=\"center\"\n gap=\"200\"\n >\n <Text textStyle=\"xs\" fontWeight=\"500\" color=\"neutral.12\">\n <FormattedMessage {...messages.startTime} />\n </Text>\n <TimeInput\n slot=\"timeInput\"\n variant=\"ghost\"\n size=\"sm\"\n hideTimeZone={hideTimeZone}\n hourCycle={hourCycle}\n />\n </Flex>\n );\n};\n","import { useContext } from \"react\";\nimport {\n Provider,\n ButtonContext,\n DatePickerStateContext,\n TimeFieldContext,\n useSlottedContext,\n} from \"react-aria-components\";\nimport type { PressEvent, TimeValue } from \"react-aria\";\nimport { useIntl } from \"react-intl\";\nimport { messages } from \"../date-picker.i18n\";\n\nexport const DatePickerCustomContext = ({\n children,\n}: {\n children: React.ReactNode;\n}) => {\n const intl = useIntl();\n const buttonContext = useSlottedContext(ButtonContext) || {};\n const datePickerState = useContext(DatePickerStateContext);\n const noInputValue = datePickerState?.dateValue === null;\n\n const { timeValue, setTimeValue, granularity } = datePickerState!;\n\n // Try to get disabled state from the button context\n const isDatePickerDisabled = buttonContext?.isDisabled;\n\n // Generate default aria-label based on granularity if not provided\n const getDefaultTimeInputAriaLabel = () => {\n switch (granularity) {\n case \"hour\":\n return intl.formatMessage(messages.enterTimeHour);\n case \"minute\":\n return intl.formatMessage(messages.enterTimeHourMinute);\n case \"second\":\n return intl.formatMessage(messages.enterTimeHourMinuteSecond);\n default:\n return intl.formatMessage(messages.enterTime);\n }\n };\n\n /**\n * Button slots\n * ================================\n */\n const buttonSlots = {\n /** toggles the calendar popover */\n calendarToggle: {\n ...buttonContext,\n onPress: (event: PressEvent) => {\n // Ensure any active input (e.g., date picker segment) loses focus\n // because blurring the input will close the popover if it's open (or was just opened)\n const activeElement = document?.activeElement as HTMLElement | null;\n\n if (activeElement) {\n activeElement.blur();\n }\n\n buttonContext.onPress?.(event);\n },\n },\n /** Clear button that displays when there's a value in each segment - hidden from both visual and screen readers when there's no value */\n clear: {\n onPress: () => datePickerState?.setValue(null),\n \"aria-label\": intl.formatMessage(messages.clearInput),\n isDisabled: isDatePickerDisabled,\n // Hide the button when there's no value\n style: noInputValue ? { display: \"none\" } : undefined,\n \"aria-hidden\": noInputValue ? true : undefined,\n },\n };\n\n /**\n * TimeInput slots\n * ================================\n */\n\n const timeInputSlots = {\n timeInput: {\n value: timeValue,\n onChange: (value: TimeValue | null) => {\n if (value !== null) {\n setTimeValue(value);\n }\n },\n granularity: granularity === \"day\" ? undefined : granularity,\n \"aria-label\": getDefaultTimeInputAriaLabel(),\n },\n };\n\n return (\n <Provider\n values={[\n [\n ButtonContext,\n {\n slots: buttonSlots,\n },\n ],\n [TimeFieldContext, { slots: timeInputSlots }],\n ]}\n >\n {children}\n </Provider>\n );\n};\n","import {\n DatePickerRootSlot,\n DatePickerGroupSlot,\n DatePickerPopoverSlot,\n DatePickerCalendarSlot,\n} from \"./date-picker.slots\";\n\nimport { CalendarMonth, Close } from \"@commercetools/nimbus-icons\";\n\nimport {\n DatePicker as ReactAriaDatePicker,\n Group,\n Popover,\n Dialog,\n} from \"react-aria-components\";\nimport { useSlotRecipe } from \"@chakra-ui/react/styled-system\";\nimport { datePickerSlotRecipe } from \"./date-picker.recipe\";\nimport type { DatePickerProps } from \"./date-picker.types\";\nimport { extractStyleProps } from \"@/utils\";\nimport { DateInput, Calendar, IconButton, Box } from \"@/components\";\nimport { DatePickerTimeInput } from \"./components/date-picker.time-input\";\nimport { DatePickerCustomContext } from \"./components/date-picker.custom-context\";\n\n/**\n * # DatePicker\n *\n * a UI component for users to enter or select a specific calendar date.\n *\n * @see {@link https://nimbus-documentation.vercel.app/components/inputs/datepicker}\n */\nexport const DatePicker = (props: DatePickerProps) => {\n const {\n size = \"md\",\n variant,\n granularity = \"day\",\n hideTimeZone,\n hourCycle,\n } = props;\n const recipe = useSlotRecipe({ recipe: datePickerSlotRecipe });\n const [recipeProps, remainingProps] = recipe.splitVariantProps(props);\n const [styleProps, otherProps] = extractStyleProps(remainingProps);\n\n // the size of the buttons overlaying the input\n const overlayButtonSize = size === \"md\" ? \"xs\" : \"2xs\";\n\n // When granularity is \"day\", use the prop value (defaults to true if not provided)\n // For other granularities (time-based), force to false so users can set both date and time\n const shouldCloseOnSelect =\n granularity === \"day\" ? props.shouldCloseOnSelect : false;\n\n return (\n <DatePickerRootSlot {...recipeProps} {...styleProps} asChild>\n <ReactAriaDatePicker\n {...otherProps}\n shouldCloseOnSelect={shouldCloseOnSelect}\n >\n <DatePickerCustomContext>\n <DatePickerGroupSlot asChild>\n <Group>\n <DateInput\n size={size}\n variant={variant}\n width=\"full\"\n hideTimeZone={hideTimeZone}\n hourCycle={hourCycle}\n trailingElement={\n <Box>\n {/* @ts-expect-error react aria is adding the aria-label prop */}\n <IconButton\n tone=\"primary\"\n variant=\"ghost\"\n size={overlayButtonSize}\n slot=\"clear\"\n >\n <Close />\n </IconButton>\n {/* @ts-expect-error react aria is adding the aria-label prop */}\n <IconButton\n tone=\"primary\"\n variant=\"ghost\"\n size={overlayButtonSize}\n slot=\"calendarToggle\"\n >\n <CalendarMonth />\n </IconButton>\n </Box>\n }\n />\n </Group>\n </DatePickerGroupSlot>\n <DatePickerPopoverSlot asChild>\n <Popover placement=\"bottom end\">\n <Dialog>\n <DatePickerCalendarSlot>\n <Calendar />\n </DatePickerCalendarSlot>\n <DatePickerTimeInput\n hideTimeZone={hideTimeZone}\n hourCycle={hourCycle}\n />\n </Dialog>\n </Popover>\n </DatePickerPopoverSlot>\n </DatePickerCustomContext>\n </ReactAriaDatePicker>\n </DatePickerRootSlot>\n );\n};\n\nDatePicker.displayName = \"DatePicker\";\n"],"names":["withProvider","withContext","createSlotRecipeContext","DatePickerRootSlot","DatePickerGroupSlot","DatePickerPopoverSlot","DatePickerCalendarSlot","messages","defineMessages","DatePickerTimeInput","hideTimeZone","hourCycle","datePickerState","useContext","DatePickerStateContext","granularity","dateValue","timeInputRef","useRef","previousDateRef","useEffect","timeoutId","container","activeElement","jsxs","Flex","jsx","Text","FormattedMessage","TimeInput","DatePickerCustomContext","children","intl","useIntl","buttonContext","useSlottedContext","ButtonContext","noInputValue","timeValue","setTimeValue","isDatePickerDisabled","getDefaultTimeInputAriaLabel","buttonSlots","event","timeInputSlots","value","Provider","TimeFieldContext","DatePicker","props","size","variant","recipe","useSlotRecipe","datePickerSlotRecipe","recipeProps","remainingProps","styleProps","otherProps","extractStyleProps","overlayButtonSize","shouldCloseOnSelect","ReactAriaDatePicker","Group","DateInput","Box","IconButton","Close","CalendarMonth","Popover","Dialog","Calendar"],"mappings":"kyBAOM,CAAE,aAAAA,EAAc,YAAAC,CAAA,EAAgBC,0BAAwB,CAC5D,IAAK,YACP,CAAC,EAMYC,EAAqBH,EAGhC,MAAO,MAAM,EAKFI,EAAsBH,EAGjC,MAAO,OAAO,EAKHI,EAAwBJ,EAGnC,MAAO,SAAS,EAKLK,EAAyBL,EAGpC,MAAO,UAAU,ECxCNM,EAAWC,EAAAA,eAAe,CACrC,WAAY,CACV,GAAI,+BACJ,YAAa,mDACb,eAAgB,mBAAA,EAElB,UAAW,CACT,GAAI,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,CAAQ,UAAU,aACjB,SAAA7C,EAAAA,KAAC8C,EAAAA,0CAAA,CACC,SAAA,CAAA5C,EAAAA,IAACpB,EAAA,CACC,SAAAoB,EAAAA,IAAC6C,EAAAA,SAAA,CAAA,CAAS,EACZ,EACA7C,EAAAA,IAACjB,EAAA,CACC,aAAAC,EACA,UAAAC,CAAA,CAAA,CACF,CAAA,CACF,EACF,CAAA,CACF,CAAA,CAAA,CACF,CAAA,CAAA,EAEJ,CAEJ,EAEAqC,EAAW,YAAc"}
|
|
1
|
+
{"version":3,"file":"date-picker-BzSXCoJ0.cjs.js","sources":["../../src/components/date-picker/date-picker.slots.tsx","../../src/components/date-picker/date-picker.i18n.ts","../../src/components/date-picker/components/date-picker.time-input.tsx","../../src/components/date-picker/components/date-picker.custom-context.tsx","../../src/components/date-picker/date-picker.tsx"],"sourcesContent":["import {\n type HTMLChakraProps,\n createSlotRecipeContext,\n} from \"@chakra-ui/react\";\nimport type { DatePickerRootSlotProps } from \"./date-picker.types\";\n\n// Correctly destructure from createSlotRecipeContext based on project examples\nconst { withProvider, withContext } = createSlotRecipeContext({\n key: \"datePicker\",\n});\n\n/**\n * Root component that provides the styling context for the DatePicker component.\n * Uses Chakra UI's recipe context system for consistent styling across instances.\n */\nexport const DatePickerRootSlot = withProvider<\n HTMLDivElement,\n DatePickerRootSlotProps\n>(\"div\", \"root\");\n\n/**\n * Slot component for the input group containing the DateInput.\n */\nexport const DatePickerGroupSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"group\");\n\n/**\n * Slot component for the popover container.\n */\nexport const DatePickerPopoverSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"popover\");\n\n/**\n * Slot component for the calendar container within the popover.\n */\nexport const DatePickerCalendarSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"calendar\");\n\n/**\n * Slot component for the calendar header.\n */\nexport const DatePickerCalendarHeaderSlot = withContext<\n HTMLElement,\n HTMLChakraProps<\"header\">\n>(\"header\", \"calendarHeader\");\n\n/**\n * Slot component for the calendar grid.\n */\nexport const DatePickerCalendarGridSlot = withContext<\n HTMLTableElement,\n HTMLChakraProps<\"table\">\n>(\"table\", \"calendarGrid\");\n\n/**\n * Slot component for individual calendar cells.\n */\nexport const DatePickerCalendarCellSlot = withContext<\n HTMLTableCellElement,\n HTMLChakraProps<\"td\">\n>(\"td\", \"calendarCell\");\n","import { defineMessages } from \"react-intl\";\n\nexport const messages = defineMessages({\n clearInput: {\n id: \"Nimbus.DatePicker.clearInput\",\n description: \"aria-label for clear input button in date picker\",\n defaultMessage: \"Clear input value\",\n },\n enterTime: {\n id: \"Nimbus.DatePicker.Time.enterTime\",\n description: \"aria-label for time input field in date picker\",\n defaultMessage: \"Enter time\",\n },\n enterTimeHour: {\n id: \"Nimbus.DatePicker.Time.enterTimeHour\",\n description: \"aria-label for hour-only time input in date picker\",\n defaultMessage: \"Enter time (hour)\",\n },\n enterTimeHourMinute: {\n id: \"Nimbus.DatePicker.Time.enterTimeHourMinute\",\n description: \"aria-label for hour and minute time input in date picker\",\n defaultMessage: \"Enter time (hour and minute)\",\n },\n enterTimeHourMinuteSecond: {\n id: \"Nimbus.DatePicker.Time.enterTimeHourMinuteSecond\",\n description: \"aria-label for full time input with seconds in date picker\",\n defaultMessage: \"Enter time (hour, minute, and second)\",\n },\n startTime: {\n id: \"Nimbus.DatePicker.Time.startTime\",\n description: \"Label for start time in date picker\",\n defaultMessage: \"Start time\",\n },\n});\n","import { Flex, Text, TimeInput } from \"@/components\";\nimport { useContext, useRef, useEffect } from \"react\";\nimport { DatePickerStateContext } from \"react-aria-components\";\nimport type { DatePickerTimeInputProps } from \"../date-picker.types\";\nimport { FormattedMessage } from \"react-intl\";\nimport { messages } from \"../date-picker.i18n\";\n\nexport const DatePickerTimeInput = ({\n hideTimeZone,\n hourCycle,\n}: DatePickerTimeInputProps) => {\n const datePickerState = useContext(DatePickerStateContext);\n const { granularity, dateValue } = datePickerState!;\n const timeInputRef = useRef<HTMLDivElement>(null);\n const previousDateRef = useRef(dateValue);\n\n // do not show up to the party if you're not invited\n if (granularity === \"day\") {\n return null;\n }\n\n // Focus the time input when date changes (user selects a date from calendar)\n useEffect(() => {\n // Check if date changed\n let timeoutId: ReturnType<typeof setTimeout> | undefined;\n\n if (dateValue && previousDateRef.current?.compare(dateValue) !== 0) {\n // Only auto-focus if no time input segment currently has focus\n // This prevents stealing focus during user interaction with time segments\n const container = timeInputRef.current;\n const activeElement = document.activeElement;\n const hasTimeSegmentFocus =\n container?.contains(activeElement) &&\n activeElement?.getAttribute(\"role\") === \"spinbutton\";\n\n if (!hasTimeSegmentFocus) {\n // Small delay to ensure the DOM is ready\n timeoutId = setTimeout(() => {\n // Find the first focusable segment within the time input container\n if (container) {\n const firstSegment = container.querySelector(\n '[role=\"spinbutton\"]'\n ) as HTMLElement;\n firstSegment?.focus();\n }\n }, 50);\n }\n }\n\n previousDateRef.current = dateValue;\n\n // Cleanup timeout on effect re-run or unmount to prevent memory leaks\n return () => {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n };\n }, [dateValue]);\n\n return (\n <Flex\n ref={timeInputRef}\n borderTop=\"solid-25\"\n borderColor=\"neutral.3\"\n py=\"300\"\n px=\"400\"\n alignItems=\"center\"\n justifyContent=\"center\"\n gap=\"200\"\n >\n <Text textStyle=\"xs\" fontWeight=\"500\" color=\"neutral.12\">\n <FormattedMessage {...messages.startTime} />\n </Text>\n <TimeInput\n slot=\"timeInput\"\n variant=\"ghost\"\n size=\"sm\"\n hideTimeZone={hideTimeZone}\n hourCycle={hourCycle}\n />\n </Flex>\n );\n};\n","import { useContext } from \"react\";\nimport {\n Provider,\n ButtonContext,\n DatePickerStateContext,\n TimeFieldContext,\n useSlottedContext,\n} from \"react-aria-components\";\nimport type { PressEvent, TimeValue } from \"react-aria\";\nimport { useIntl } from \"react-intl\";\nimport { messages } from \"../date-picker.i18n\";\n\nexport const DatePickerCustomContext = ({\n children,\n}: {\n children: React.ReactNode;\n}) => {\n const intl = useIntl();\n const buttonContext = useSlottedContext(ButtonContext) || {};\n const datePickerState = useContext(DatePickerStateContext);\n const noInputValue = datePickerState?.dateValue === null;\n\n const { timeValue, setTimeValue, granularity } = datePickerState!;\n\n // Try to get disabled state from the button context\n const isDatePickerDisabled = buttonContext?.isDisabled;\n\n // Generate default aria-label based on granularity if not provided\n const getDefaultTimeInputAriaLabel = () => {\n switch (granularity) {\n case \"hour\":\n return intl.formatMessage(messages.enterTimeHour);\n case \"minute\":\n return intl.formatMessage(messages.enterTimeHourMinute);\n case \"second\":\n return intl.formatMessage(messages.enterTimeHourMinuteSecond);\n default:\n return intl.formatMessage(messages.enterTime);\n }\n };\n\n /**\n * Button slots\n * ================================\n */\n const buttonSlots = {\n /** toggles the calendar popover */\n calendarToggle: {\n ...buttonContext,\n onPress: (event: PressEvent) => {\n // Ensure any active input (e.g., date picker segment) loses focus\n // because blurring the input will close the popover if it's open (or was just opened)\n const activeElement = document?.activeElement as HTMLElement | null;\n\n if (activeElement) {\n activeElement.blur();\n }\n\n buttonContext.onPress?.(event);\n },\n },\n /** Clear button that displays when there's a value in each segment - hidden from both visual and screen readers when there's no value */\n clear: {\n onPress: () => datePickerState?.setValue(null),\n \"aria-label\": intl.formatMessage(messages.clearInput),\n isDisabled: isDatePickerDisabled,\n // Hide the button when there's no value\n style: noInputValue ? { display: \"none\" } : undefined,\n \"aria-hidden\": noInputValue ? true : undefined,\n },\n };\n\n /**\n * TimeInput slots\n * ================================\n */\n\n const timeInputSlots = {\n timeInput: {\n value: timeValue,\n onChange: (value: TimeValue | null) => {\n if (value !== null) {\n setTimeValue(value);\n }\n },\n granularity: granularity === \"day\" ? undefined : granularity,\n \"aria-label\": getDefaultTimeInputAriaLabel(),\n },\n };\n\n return (\n <Provider\n values={[\n [\n ButtonContext,\n {\n slots: buttonSlots,\n },\n ],\n [TimeFieldContext, { slots: timeInputSlots }],\n ]}\n >\n {children}\n </Provider>\n );\n};\n","import {\n DatePickerRootSlot,\n DatePickerGroupSlot,\n DatePickerPopoverSlot,\n DatePickerCalendarSlot,\n} from \"./date-picker.slots\";\n\nimport { CalendarMonth, Close } from \"@commercetools/nimbus-icons\";\n\nimport {\n DatePicker as ReactAriaDatePicker,\n Group,\n Popover,\n Dialog,\n} from \"react-aria-components\";\nimport { useSlotRecipe } from \"@chakra-ui/react/styled-system\";\nimport { datePickerSlotRecipe } from \"./date-picker.recipe\";\nimport type { DatePickerProps } from \"./date-picker.types\";\nimport { extractStyleProps } from \"@/utils\";\nimport { DateInput, Calendar, IconButton, Box } from \"@/components\";\nimport { DatePickerTimeInput } from \"./components/date-picker.time-input\";\nimport { DatePickerCustomContext } from \"./components/date-picker.custom-context\";\n\n/**\n * # DatePicker\n *\n * a UI component for users to enter or select a specific calendar date.\n *\n * @see {@link https://nimbus-documentation.vercel.app/components/inputs/datepicker}\n */\nexport const DatePicker = (props: DatePickerProps) => {\n const {\n size = \"md\",\n variant,\n granularity = \"day\",\n hideTimeZone,\n hourCycle,\n } = props;\n const recipe = useSlotRecipe({ recipe: datePickerSlotRecipe });\n const [recipeProps, remainingProps] = recipe.splitVariantProps(props);\n const [styleProps, otherProps] = extractStyleProps(remainingProps);\n\n // the size of the buttons overlaying the input\n const overlayButtonSize = size === \"md\" ? \"xs\" : \"2xs\";\n\n // When granularity is \"day\", use the prop value (defaults to true if not provided)\n // For other granularities (time-based), force to false so users can set both date and time\n const shouldCloseOnSelect =\n granularity === \"day\" ? props.shouldCloseOnSelect : false;\n\n return (\n <DatePickerRootSlot {...recipeProps} {...styleProps} asChild>\n <ReactAriaDatePicker\n {...otherProps}\n shouldCloseOnSelect={shouldCloseOnSelect}\n >\n <DatePickerCustomContext>\n <DatePickerGroupSlot asChild>\n <Group>\n <DateInput\n size={size}\n variant={variant}\n width=\"full\"\n hideTimeZone={hideTimeZone}\n hourCycle={hourCycle}\n trailingElement={\n <Box>\n {/* @ts-expect-error react aria is adding the aria-label prop */}\n <IconButton\n variant=\"ghost\"\n size={overlayButtonSize}\n slot=\"clear\"\n >\n <Close />\n </IconButton>\n {/* @ts-expect-error react aria is adding the aria-label prop */}\n <IconButton\n variant=\"ghost\"\n size={overlayButtonSize}\n slot=\"calendarToggle\"\n >\n <CalendarMonth />\n </IconButton>\n </Box>\n }\n />\n </Group>\n </DatePickerGroupSlot>\n <DatePickerPopoverSlot asChild>\n <Popover placement=\"bottom end\">\n <Dialog>\n <DatePickerCalendarSlot>\n <Calendar />\n </DatePickerCalendarSlot>\n <DatePickerTimeInput\n hideTimeZone={hideTimeZone}\n hourCycle={hourCycle}\n />\n </Dialog>\n </Popover>\n </DatePickerPopoverSlot>\n </DatePickerCustomContext>\n </ReactAriaDatePicker>\n </DatePickerRootSlot>\n );\n};\n\nDatePicker.displayName = \"DatePicker\";\n"],"names":["withProvider","withContext","createSlotRecipeContext","DatePickerRootSlot","DatePickerGroupSlot","DatePickerPopoverSlot","DatePickerCalendarSlot","messages","defineMessages","DatePickerTimeInput","hideTimeZone","hourCycle","datePickerState","useContext","DatePickerStateContext","granularity","dateValue","timeInputRef","useRef","previousDateRef","useEffect","timeoutId","container","activeElement","jsxs","Flex","jsx","Text","FormattedMessage","TimeInput","DatePickerCustomContext","children","intl","useIntl","buttonContext","useSlottedContext","ButtonContext","noInputValue","timeValue","setTimeValue","isDatePickerDisabled","getDefaultTimeInputAriaLabel","buttonSlots","event","timeInputSlots","value","Provider","TimeFieldContext","DatePicker","props","size","variant","recipe","useSlotRecipe","datePickerSlotRecipe","recipeProps","remainingProps","styleProps","otherProps","extractStyleProps","overlayButtonSize","shouldCloseOnSelect","ReactAriaDatePicker","Group","DateInput","Box","IconButton","Close","CalendarMonth","Popover","Dialog","Calendar"],"mappings":"kyBAOM,CAAE,aAAAA,EAAc,YAAAC,CAAA,EAAgBC,0BAAwB,CAC5D,IAAK,YACP,CAAC,EAMYC,EAAqBH,EAGhC,MAAO,MAAM,EAKFI,EAAsBH,EAGjC,MAAO,O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K,iBAEL,eAACQ,EAAAA,cAAA,CAAA,CAAc,CAAA,CAAA,CACjB,CAAA,CACF,CAAA,CAAA,EAGN,CAAA,CACF,EACA1C,EAAAA,IAACrB,GAAsB,QAAO,GAC5B,eAACgE,EAAAA,0CAAA,CAAQ,UAAU,aACjB,SAAA7C,EAAAA,KAAC8C,EAAAA,0CAAA,CACC,SAAA,CAAA5C,EAAAA,IAACpB,EAAA,CACC,SAAAoB,EAAAA,IAAC6C,EAAAA,SAAA,CAAA,CAAS,EACZ,EACA7C,EAAAA,IAACjB,EAAA,CACC,aAAAC,EACA,UAAAC,CAAA,CAAA,CACF,CAAA,CACF,EACF,CAAA,CACF,CAAA,CAAA,CACF,CAAA,CAAA,EAEJ,CAEJ,EAEAqC,EAAW,YAAc"}
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { jsxs as b, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { createSlotRecipeContext as S } from "@chakra-ui/react";
|
|
3
|
-
import { Close as
|
|
4
|
-
import { b as k, c as
|
|
5
|
-
import { $ as
|
|
3
|
+
import { Close as D, CalendarMonth as v } from "@commercetools/nimbus-icons";
|
|
4
|
+
import { b as k, c as C } from "./DatePicker-Cvad8nra.es.js";
|
|
5
|
+
import { $ as y, h as M } from "./Dialog-BUtdEtlF.es.js";
|
|
6
6
|
import { $ as I } from "./Group-zHIVpnch.es.js";
|
|
7
7
|
import { useSlotRecipe as E } from "@chakra-ui/react/styled-system";
|
|
8
|
-
import { h as H } from "./index-
|
|
9
|
-
import { e as N } from "./extract-style-props-
|
|
8
|
+
import { h as H } from "./index-B7wlrXvj.es.js";
|
|
9
|
+
import { e as N } from "./extract-style-props-fH5EHRZU.es.js";
|
|
10
10
|
import { useContext as x, useRef as T, useEffect as R } from "react";
|
|
11
11
|
import { defineMessages as V, FormattedMessage as w, useIntl as z } from "react-intl";
|
|
12
|
-
import { T as B } from "./time-input-
|
|
12
|
+
import { T as B } from "./time-input-BJ1nDsyZ.es.js";
|
|
13
13
|
import { Flex as F } from "@chakra-ui/react/flex";
|
|
14
14
|
import { T as j } from "./text-BVYJmhjj.es.js";
|
|
15
|
-
import { $ as P } from "./Button-
|
|
15
|
+
import { $ as P } from "./Button-SjGHt140.es.js";
|
|
16
16
|
import { c as A, e as G } from "./utils-_m_bPtjI.es.js";
|
|
17
|
-
import { d as L } from "./DateField-
|
|
18
|
-
import { D as O } from "./date-input-
|
|
19
|
-
import { C as q } from "./calendar-
|
|
17
|
+
import { d as L } from "./DateField-DMjgxual.es.js";
|
|
18
|
+
import { D as O } from "./date-input-CRnreBK0.es.js";
|
|
19
|
+
import { C as q } from "./calendar-D7pzgXqX.es.js";
|
|
20
20
|
import { B as W } from "./box-DuBoAZvq.es.js";
|
|
21
|
-
import { I as $ } from "./icon-button-
|
|
21
|
+
import { I as $ } from "./icon-button-XkzBkGuJ.es.js";
|
|
22
22
|
const { withProvider: Z, withContext: h } = /* @__PURE__ */ S({
|
|
23
23
|
key: "datePicker"
|
|
24
24
|
}), J = /* @__PURE__ */ Z("div", "root"), K = /* @__PURE__ */ h("div", "group"), Q = /* @__PURE__ */ h("div", "popover"), U = /* @__PURE__ */ h("div", "calendar"), u = /* @__PURE__ */ V({
|
|
@@ -162,7 +162,7 @@ const { withProvider: Z, withContext: h } = /* @__PURE__ */ S({
|
|
|
162
162
|
hourCycle: s
|
|
163
163
|
} = o, l = E({ recipe: H }), [i, c] = l.splitVariantProps(o), [d, f] = N(c), p = r === "md" ? "xs" : "2xs", m = n === "day" ? o.shouldCloseOnSelect : !1;
|
|
164
164
|
return /* @__PURE__ */ e(J, { ...i, ...d, asChild: !0, children: /* @__PURE__ */ e(
|
|
165
|
-
|
|
165
|
+
C,
|
|
166
166
|
{
|
|
167
167
|
...f,
|
|
168
168
|
shouldCloseOnSelect: m,
|
|
@@ -179,27 +179,25 @@ const { withProvider: Z, withContext: h } = /* @__PURE__ */ S({
|
|
|
179
179
|
/* @__PURE__ */ e(
|
|
180
180
|
$,
|
|
181
181
|
{
|
|
182
|
-
tone: "primary",
|
|
183
182
|
variant: "ghost",
|
|
184
183
|
size: p,
|
|
185
184
|
slot: "clear",
|
|
186
|
-
children: /* @__PURE__ */ e(
|
|
185
|
+
children: /* @__PURE__ */ e(D, {})
|
|
187
186
|
}
|
|
188
187
|
),
|
|
189
188
|
/* @__PURE__ */ e(
|
|
190
189
|
$,
|
|
191
190
|
{
|
|
192
|
-
tone: "primary",
|
|
193
191
|
variant: "ghost",
|
|
194
192
|
size: p,
|
|
195
193
|
slot: "calendarToggle",
|
|
196
|
-
children: /* @__PURE__ */ e(
|
|
194
|
+
children: /* @__PURE__ */ e(v, {})
|
|
197
195
|
}
|
|
198
196
|
)
|
|
199
197
|
] })
|
|
200
198
|
}
|
|
201
199
|
) }) }),
|
|
202
|
-
/* @__PURE__ */ e(Q, { asChild: !0, children: /* @__PURE__ */ e(
|
|
200
|
+
/* @__PURE__ */ e(Q, { asChild: !0, children: /* @__PURE__ */ e(y, { placement: "bottom end", children: /* @__PURE__ */ b(M, { children: [
|
|
203
201
|
/* @__PURE__ */ e(U, { children: /* @__PURE__ */ e(q, {}) }),
|
|
204
202
|
/* @__PURE__ */ e(
|
|
205
203
|
X,
|
|
@@ -217,4 +215,4 @@ _.displayName = "DatePicker";
|
|
|
217
215
|
export {
|
|
218
216
|
_ as D
|
|
219
217
|
};
|
|
220
|
-
//# sourceMappingURL=date-picker-
|
|
218
|
+
//# sourceMappingURL=date-picker-Zz2Sp3S6.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-picker-DvI-NGBn.es.js","sources":["../../src/components/date-picker/date-picker.slots.tsx","../../src/components/date-picker/date-picker.i18n.ts","../../src/components/date-picker/components/date-picker.time-input.tsx","../../src/components/date-picker/components/date-picker.custom-context.tsx","../../src/components/date-picker/date-picker.tsx"],"sourcesContent":["import {\n type HTMLChakraProps,\n createSlotRecipeContext,\n} from \"@chakra-ui/react\";\nimport type { DatePickerRootSlotProps } from \"./date-picker.types\";\n\n// Correctly destructure from createSlotRecipeContext based on project examples\nconst { withProvider, withContext } = createSlotRecipeContext({\n key: \"datePicker\",\n});\n\n/**\n * Root component that provides the styling context for the DatePicker component.\n * Uses Chakra UI's recipe context system for consistent styling across instances.\n */\nexport const DatePickerRootSlot = withProvider<\n HTMLDivElement,\n DatePickerRootSlotProps\n>(\"div\", \"root\");\n\n/**\n * Slot component for the input group containing the DateInput.\n */\nexport const DatePickerGroupSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"group\");\n\n/**\n * Slot component for the popover container.\n */\nexport const DatePickerPopoverSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"popover\");\n\n/**\n * Slot component for the calendar container within the popover.\n */\nexport const DatePickerCalendarSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"calendar\");\n\n/**\n * Slot component for the calendar header.\n */\nexport const DatePickerCalendarHeaderSlot = withContext<\n HTMLElement,\n HTMLChakraProps<\"header\">\n>(\"header\", \"calendarHeader\");\n\n/**\n * Slot component for the calendar grid.\n */\nexport const DatePickerCalendarGridSlot = withContext<\n HTMLTableElement,\n HTMLChakraProps<\"table\">\n>(\"table\", \"calendarGrid\");\n\n/**\n * Slot component for individual calendar cells.\n */\nexport const DatePickerCalendarCellSlot = withContext<\n HTMLTableCellElement,\n HTMLChakraProps<\"td\">\n>(\"td\", \"calendarCell\");\n","import { defineMessages } from \"react-intl\";\n\nexport const messages = defineMessages({\n clearInput: {\n id: \"Nimbus.DatePicker.clearInput\",\n description: \"aria-label for clear input button in date picker\",\n defaultMessage: \"Clear input value\",\n },\n enterTime: {\n id: \"Nimbus.DatePicker.Time.enterTime\",\n description: \"aria-label for time input field in date picker\",\n defaultMessage: \"Enter time\",\n },\n enterTimeHour: {\n id: \"Nimbus.DatePicker.Time.enterTimeHour\",\n description: \"aria-label for hour-only time input in date picker\",\n defaultMessage: \"Enter time (hour)\",\n },\n enterTimeHourMinute: {\n id: \"Nimbus.DatePicker.Time.enterTimeHourMinute\",\n description: \"aria-label for hour and minute time input in date picker\",\n defaultMessage: \"Enter time (hour and minute)\",\n },\n enterTimeHourMinuteSecond: {\n id: \"Nimbus.DatePicker.Time.enterTimeHourMinuteSecond\",\n description: \"aria-label for full time input with seconds in date picker\",\n defaultMessage: \"Enter time (hour, minute, and second)\",\n },\n startTime: {\n id: \"Nimbus.DatePicker.Time.startTime\",\n description: \"Label for start time in date picker\",\n defaultMessage: \"Start time\",\n },\n});\n","import { Flex, Text, TimeInput } from \"@/components\";\nimport { useContext, useRef, useEffect } from \"react\";\nimport { DatePickerStateContext } from \"react-aria-components\";\nimport type { DatePickerTimeInputProps } from \"../date-picker.types\";\nimport { FormattedMessage } from \"react-intl\";\nimport { messages } from \"../date-picker.i18n\";\n\nexport const DatePickerTimeInput = ({\n hideTimeZone,\n hourCycle,\n}: DatePickerTimeInputProps) => {\n const datePickerState = useContext(DatePickerStateContext);\n const { granularity, dateValue } = datePickerState!;\n const timeInputRef = useRef<HTMLDivElement>(null);\n const previousDateRef = useRef(dateValue);\n\n // do not show up to the party if you're not invited\n if (granularity === \"day\") {\n return null;\n }\n\n // Focus the time input when date changes (user selects a date from calendar)\n useEffect(() => {\n // Check if date changed\n let timeoutId: ReturnType<typeof setTimeout> | undefined;\n\n if (dateValue && previousDateRef.current?.compare(dateValue) !== 0) {\n // Only auto-focus if no time input segment currently has focus\n // This prevents stealing focus during user interaction with time segments\n const container = timeInputRef.current;\n const activeElement = document.activeElement;\n const hasTimeSegmentFocus =\n container?.contains(activeElement) &&\n activeElement?.getAttribute(\"role\") === \"spinbutton\";\n\n if (!hasTimeSegmentFocus) {\n // Small delay to ensure the DOM is ready\n timeoutId = setTimeout(() => {\n // Find the first focusable segment within the time input container\n if (container) {\n const firstSegment = container.querySelector(\n '[role=\"spinbutton\"]'\n ) as HTMLElement;\n firstSegment?.focus();\n }\n }, 50);\n }\n }\n\n previousDateRef.current = dateValue;\n\n // Cleanup timeout on effect re-run or unmount to prevent memory leaks\n return () => {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n };\n }, [dateValue]);\n\n return (\n <Flex\n ref={timeInputRef}\n borderTop=\"solid-25\"\n borderColor=\"neutral.3\"\n py=\"300\"\n px=\"400\"\n alignItems=\"center\"\n justifyContent=\"center\"\n gap=\"200\"\n >\n <Text textStyle=\"xs\" fontWeight=\"500\" color=\"neutral.12\">\n <FormattedMessage {...messages.startTime} />\n </Text>\n <TimeInput\n slot=\"timeInput\"\n variant=\"ghost\"\n size=\"sm\"\n hideTimeZone={hideTimeZone}\n hourCycle={hourCycle}\n />\n </Flex>\n );\n};\n","import { useContext } from \"react\";\nimport {\n Provider,\n ButtonContext,\n DatePickerStateContext,\n TimeFieldContext,\n useSlottedContext,\n} from \"react-aria-components\";\nimport type { PressEvent, TimeValue } from \"react-aria\";\nimport { useIntl } from \"react-intl\";\nimport { messages } from \"../date-picker.i18n\";\n\nexport const DatePickerCustomContext = ({\n children,\n}: {\n children: React.ReactNode;\n}) => {\n const intl = useIntl();\n const buttonContext = useSlottedContext(ButtonContext) || {};\n const datePickerState = useContext(DatePickerStateContext);\n const noInputValue = datePickerState?.dateValue === null;\n\n const { timeValue, setTimeValue, granularity } = datePickerState!;\n\n // Try to get disabled state from the button context\n const isDatePickerDisabled = buttonContext?.isDisabled;\n\n // Generate default aria-label based on granularity if not provided\n const getDefaultTimeInputAriaLabel = () => {\n switch (granularity) {\n case \"hour\":\n return intl.formatMessage(messages.enterTimeHour);\n case \"minute\":\n return intl.formatMessage(messages.enterTimeHourMinute);\n case \"second\":\n return intl.formatMessage(messages.enterTimeHourMinuteSecond);\n default:\n return intl.formatMessage(messages.enterTime);\n }\n };\n\n /**\n * Button slots\n * ================================\n */\n const buttonSlots = {\n /** toggles the calendar popover */\n calendarToggle: {\n ...buttonContext,\n onPress: (event: PressEvent) => {\n // Ensure any active input (e.g., date picker segment) loses focus\n // because blurring the input will close the popover if it's open (or was just opened)\n const activeElement = document?.activeElement as HTMLElement | null;\n\n if (activeElement) {\n activeElement.blur();\n }\n\n buttonContext.onPress?.(event);\n },\n },\n /** Clear button that displays when there's a value in each segment - hidden from both visual and screen readers when there's no value */\n clear: {\n onPress: () => datePickerState?.setValue(null),\n \"aria-label\": intl.formatMessage(messages.clearInput),\n isDisabled: isDatePickerDisabled,\n // Hide the button when there's no value\n style: noInputValue ? { display: \"none\" } : undefined,\n \"aria-hidden\": noInputValue ? true : undefined,\n },\n };\n\n /**\n * TimeInput slots\n * ================================\n */\n\n const timeInputSlots = {\n timeInput: {\n value: timeValue,\n onChange: (value: TimeValue | null) => {\n if (value !== null) {\n setTimeValue(value);\n }\n },\n granularity: granularity === \"day\" ? undefined : granularity,\n \"aria-label\": getDefaultTimeInputAriaLabel(),\n },\n };\n\n return (\n <Provider\n values={[\n [\n ButtonContext,\n {\n slots: buttonSlots,\n },\n ],\n [TimeFieldContext, { slots: timeInputSlots }],\n ]}\n >\n {children}\n </Provider>\n );\n};\n","import {\n DatePickerRootSlot,\n DatePickerGroupSlot,\n DatePickerPopoverSlot,\n DatePickerCalendarSlot,\n} from \"./date-picker.slots\";\n\nimport { CalendarMonth, Close } from \"@commercetools/nimbus-icons\";\n\nimport {\n DatePicker as ReactAriaDatePicker,\n Group,\n Popover,\n Dialog,\n} from \"react-aria-components\";\nimport { useSlotRecipe } from \"@chakra-ui/react/styled-system\";\nimport { datePickerSlotRecipe } from \"./date-picker.recipe\";\nimport type { DatePickerProps } from \"./date-picker.types\";\nimport { extractStyleProps } from \"@/utils\";\nimport { DateInput, Calendar, IconButton, Box } from \"@/components\";\nimport { DatePickerTimeInput } from \"./components/date-picker.time-input\";\nimport { DatePickerCustomContext } from \"./components/date-picker.custom-context\";\n\n/**\n * # DatePicker\n *\n * a UI component for users to enter or select a specific calendar date.\n *\n * @see {@link https://nimbus-documentation.vercel.app/components/inputs/datepicker}\n */\nexport const DatePicker = (props: DatePickerProps) => {\n const {\n size = \"md\",\n variant,\n granularity = \"day\",\n hideTimeZone,\n hourCycle,\n } = props;\n const recipe = useSlotRecipe({ recipe: datePickerSlotRecipe });\n const [recipeProps, remainingProps] = recipe.splitVariantProps(props);\n const [styleProps, otherProps] = extractStyleProps(remainingProps);\n\n // the size of the buttons overlaying the input\n const overlayButtonSize = size === \"md\" ? \"xs\" : \"2xs\";\n\n // When granularity is \"day\", use the prop value (defaults to true if not provided)\n // For other granularities (time-based), force to false so users can set both date and time\n const shouldCloseOnSelect =\n granularity === \"day\" ? props.shouldCloseOnSelect : false;\n\n return (\n <DatePickerRootSlot {...recipeProps} {...styleProps} asChild>\n <ReactAriaDatePicker\n {...otherProps}\n shouldCloseOnSelect={shouldCloseOnSelect}\n >\n <DatePickerCustomContext>\n <DatePickerGroupSlot asChild>\n <Group>\n <DateInput\n size={size}\n variant={variant}\n width=\"full\"\n hideTimeZone={hideTimeZone}\n hourCycle={hourCycle}\n trailingElement={\n <Box>\n {/* @ts-expect-error react aria is adding the aria-label prop */}\n <IconButton\n tone=\"primary\"\n variant=\"ghost\"\n size={overlayButtonSize}\n slot=\"clear\"\n >\n <Close />\n </IconButton>\n {/* @ts-expect-error react aria is adding the aria-label prop */}\n <IconButton\n tone=\"primary\"\n variant=\"ghost\"\n size={overlayButtonSize}\n slot=\"calendarToggle\"\n >\n <CalendarMonth />\n </IconButton>\n </Box>\n }\n />\n </Group>\n </DatePickerGroupSlot>\n <DatePickerPopoverSlot asChild>\n <Popover placement=\"bottom end\">\n <Dialog>\n <DatePickerCalendarSlot>\n <Calendar />\n </DatePickerCalendarSlot>\n <DatePickerTimeInput\n hideTimeZone={hideTimeZone}\n hourCycle={hourCycle}\n />\n </Dialog>\n </Popover>\n </DatePickerPopoverSlot>\n </DatePickerCustomContext>\n </ReactAriaDatePicker>\n </DatePickerRootSlot>\n );\n};\n\nDatePicker.displayName = \"DatePicker\";\n"],"names":["withProvider","withContext","createSlotRecipeContext","DatePickerRootSlot","DatePickerGroupSlot","DatePickerPopoverSlot","DatePickerCalendarSlot","messages","defineMessages","DatePickerTimeInput","hideTimeZone","hourCycle","datePickerState","useContext","DatePickerStateContext","granularity","dateValue","timeInputRef","useRef","previousDateRef","useEffect","timeoutId","container","activeElement","jsxs","Flex","jsx","Text","FormattedMessage","TimeInput","DatePickerCustomContext","children","intl","useIntl","buttonContext","useSlottedContext","ButtonContext","noInputValue","timeValue","setTimeValue","isDatePickerDisabled","getDefaultTimeInputAriaLabel","buttonSlots","event","timeInputSlots","value","Provider","TimeFieldContext","DatePicker","props","size","variant","recipe","useSlotRecipe","datePickerSlotRecipe","recipeProps","remainingProps","styleProps","otherProps","extractStyleProps","overlayButtonSize","shouldCloseOnSelect","ReactAriaDatePicker","Group","DateInput","Box","IconButton","Close","CalendarMonth","Popover","Dialog","Calendar"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAOA,MAAM,EAAE,cAAAA,GAAc,aAAAC,EAAA,IAAgB,gBAAAC,EAAwB;AAAA,EAC5D,KAAK;AACP,CAAC,GAMYC,IAAqB,gBAAAH,EAGhC,OAAO,MAAM,GAKFI,IAAsB,gBAAAH,EAGjC,OAAO,OAAO,GAKHI,IAAwB,gBAAAJ,EAGnC,OAAO,SAAS,GAKLK,IAAyB,gBAAAL,EAGpC,OAAO,UAAU,GCxCNM,IAAW,gBAAAC,EAAe;AAAA,EACrC,YAAY;AAAA,IACV,IAAI;AAAA,IACJ,aAAa;AAAA,IACb,gBAAgB;AAAA,EAAA;AAAA,EAElB,WAAW;AAAA,IACT,IAAI;AAAA,IACJ,aAAa;AAAA,IACb,gBAAgB;AAAA,EAAA;AAAA,EAElB,eAAe;AAAA,IACb,IAAI;AAAA,IACJ,aAAa;AAAA,IACb,gBAAgB;AAAA,EAAA;AAAA,EAElB,qBAAqB;AAAA,IACnB,IAAI;AAAA,IACJ,aAAa;AAAA,IACb,gBAAgB;AAAA,EAAA;AAAA,EAElB,2BAA2B;AAAA,IACzB,IAAI;AAAA,IACJ,aAAa;AAAA,IACb,gBAA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,gBAAA;AAAA,kBACC,MAAK;AAAA,kBACL,SAAQ;AAAA,kBACR,MAAMN;AAAA,kBACN,MAAK;AAAA,kBAEL,4BAACO,GAAA,CAAA,CAAM;AAAA,gBAAA;AAAA,cAAA;AAAA,cAGT,gBAAAzC;AAAA,gBAACwC;AAAA,gBAAA;AAAA,kBACC,MAAK;AAAA,kBACL,SAAQ;AAAA,kBACR,MAAMN;AAAA,kBACN,MAAK;AAAA,kBAEL,4BAACQ,GAAA,CAAA,CAAc;AAAA,gBAAA;AAAA,cAAA;AAAA,YACjB,EAAA,CACF;AAAA,UAAA;AAAA,QAAA,GAGN,EAAA,CACF;AAAA,QACA,gBAAA1C,EAACrB,KAAsB,SAAO,IAC5B,4BAACgE,GAAA,EAAQ,WAAU,cACjB,UAAA,gBAAA7C,EAAC8C,GAAA,EACC,UAAA;AAAA,UAAA,gBAAA5C,EAACpB,GAAA,EACC,UAAA,gBAAAoB,EAAC6C,GAAA,CAAA,CAAS,GACZ;AAAA,UACA,gBAAA7C;AAAA,YAACjB;AAAA,YAAA;AAAA,cACC,cAAAC;AAAA,cACA,WAAAC;AAAA,YAAA;AAAA,UAAA;AAAA,QACF,EAAA,CACF,GACF,EAAA,CACF;AAAA,MAAA,EAAA,CACF;AAAA,IAAA;AAAA,EAAA,GAEJ;AAEJ;AAEAqC,EAAW,cAAc;"}
|
|
1
|
+
{"version":3,"file":"date-picker-Zz2Sp3S6.es.js","sources":["../../src/components/date-picker/date-picker.slots.tsx","../../src/components/date-picker/date-picker.i18n.ts","../../src/components/date-picker/components/date-picker.time-input.tsx","../../src/components/date-picker/components/date-picker.custom-context.tsx","../../src/components/date-picker/date-picker.tsx"],"sourcesContent":["import {\n type HTMLChakraProps,\n createSlotRecipeContext,\n} from \"@chakra-ui/react\";\nimport type { DatePickerRootSlotProps } from \"./date-picker.types\";\n\n// Correctly destructure from createSlotRecipeContext based on project examples\nconst { withProvider, withContext } = createSlotRecipeContext({\n key: \"datePicker\",\n});\n\n/**\n * Root component that provides the styling context for the DatePicker component.\n * Uses Chakra UI's recipe context system for consistent styling across instances.\n */\nexport const DatePickerRootSlot = withProvider<\n HTMLDivElement,\n DatePickerRootSlotProps\n>(\"div\", \"root\");\n\n/**\n * Slot component for the input group containing the DateInput.\n */\nexport const DatePickerGroupSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"group\");\n\n/**\n * Slot component for the popover container.\n */\nexport const DatePickerPopoverSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"popover\");\n\n/**\n * Slot component for the calendar container within the popover.\n */\nexport const DatePickerCalendarSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"calendar\");\n\n/**\n * Slot component for the calendar header.\n */\nexport const DatePickerCalendarHeaderSlot = withContext<\n HTMLElement,\n HTMLChakraProps<\"header\">\n>(\"header\", \"calendarHeader\");\n\n/**\n * Slot component for the calendar grid.\n */\nexport const DatePickerCalendarGridSlot = withContext<\n HTMLTableElement,\n HTMLChakraProps<\"table\">\n>(\"table\", \"calendarGrid\");\n\n/**\n * Slot component for individual calendar cells.\n */\nexport const DatePickerCalendarCellSlot = withContext<\n HTMLTableCellElement,\n HTMLChakraProps<\"td\">\n>(\"td\", \"calendarCell\");\n","import { defineMessages } from \"react-intl\";\n\nexport const messages = defineMessages({\n clearInput: {\n id: \"Nimbus.DatePicker.clearInput\",\n description: \"aria-label for clear input button in date picker\",\n defaultMessage: \"Clear input value\",\n },\n enterTime: {\n id: \"Nimbus.DatePicker.Time.enterTime\",\n description: \"aria-label for time input field in date picker\",\n defaultMessage: \"Enter time\",\n },\n enterTimeHour: {\n id: \"Nimbus.DatePicker.Time.enterTimeHour\",\n description: \"aria-label for hour-only time input in date picker\",\n defaultMessage: \"Enter time (hour)\",\n },\n enterTimeHourMinute: {\n id: \"Nimbus.DatePicker.Time.enterTimeHourMinute\",\n description: \"aria-label for hour and minute time input in date picker\",\n defaultMessage: \"Enter time (hour and minute)\",\n },\n enterTimeHourMinuteSecond: {\n id: \"Nimbus.DatePicker.Time.enterTimeHourMinuteSecond\",\n description: \"aria-label for full time input with seconds in date picker\",\n defaultMessage: \"Enter time (hour, minute, and second)\",\n },\n startTime: {\n id: \"Nimbus.DatePicker.Time.startTime\",\n description: \"Label for start time in date picker\",\n defaultMessage: \"Start time\",\n },\n});\n","import { Flex, Text, TimeInput } from \"@/components\";\nimport { useContext, useRef, useEffect } from \"react\";\nimport { DatePickerStateContext } from \"react-aria-components\";\nimport type { DatePickerTimeInputProps } from \"../date-picker.types\";\nimport { FormattedMessage } from \"react-intl\";\nimport { messages } from \"../date-picker.i18n\";\n\nexport const DatePickerTimeInput = ({\n hideTimeZone,\n hourCycle,\n}: DatePickerTimeInputProps) => {\n const datePickerState = useContext(DatePickerStateContext);\n const { granularity, dateValue } = datePickerState!;\n const timeInputRef = useRef<HTMLDivElement>(null);\n const previousDateRef = useRef(dateValue);\n\n // do not show up to the party if you're not invited\n if (granularity === \"day\") {\n return null;\n }\n\n // Focus the time input when date changes (user selects a date from calendar)\n useEffect(() => {\n // Check if date changed\n let timeoutId: ReturnType<typeof setTimeout> | undefined;\n\n if (dateValue && previousDateRef.current?.compare(dateValue) !== 0) {\n // Only auto-focus if no time input segment currently has focus\n // This prevents stealing focus during user interaction with time segments\n const container = timeInputRef.current;\n const activeElement = document.activeElement;\n const hasTimeSegmentFocus =\n container?.contains(activeElement) &&\n activeElement?.getAttribute(\"role\") === \"spinbutton\";\n\n if (!hasTimeSegmentFocus) {\n // Small delay to ensure the DOM is ready\n timeoutId = setTimeout(() => {\n // Find the first focusable segment within the time input container\n if (container) {\n const firstSegment = container.querySelector(\n '[role=\"spinbutton\"]'\n ) as HTMLElement;\n firstSegment?.focus();\n }\n }, 50);\n }\n }\n\n previousDateRef.current = dateValue;\n\n // Cleanup timeout on effect re-run or unmount to prevent memory leaks\n return () => {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n };\n }, [dateValue]);\n\n return (\n <Flex\n ref={timeInputRef}\n borderTop=\"solid-25\"\n borderColor=\"neutral.3\"\n py=\"300\"\n px=\"400\"\n alignItems=\"center\"\n justifyContent=\"center\"\n gap=\"200\"\n >\n <Text textStyle=\"xs\" fontWeight=\"500\" color=\"neutral.12\">\n <FormattedMessage {...messages.startTime} />\n </Text>\n <TimeInput\n slot=\"timeInput\"\n variant=\"ghost\"\n size=\"sm\"\n hideTimeZone={hideTimeZone}\n hourCycle={hourCycle}\n />\n </Flex>\n );\n};\n","import { useContext } from \"react\";\nimport {\n Provider,\n ButtonContext,\n DatePickerStateContext,\n TimeFieldContext,\n useSlottedContext,\n} from \"react-aria-components\";\nimport type { PressEvent, TimeValue } from \"react-aria\";\nimport { useIntl } from \"react-intl\";\nimport { messages } from \"../date-picker.i18n\";\n\nexport const DatePickerCustomContext = ({\n children,\n}: {\n children: React.ReactNode;\n}) => {\n const intl = useIntl();\n const buttonContext = useSlottedContext(ButtonContext) || {};\n const datePickerState = useContext(DatePickerStateContext);\n const noInputValue = datePickerState?.dateValue === null;\n\n const { timeValue, setTimeValue, granularity } = datePickerState!;\n\n // Try to get disabled state from the button context\n const isDatePickerDisabled = buttonContext?.isDisabled;\n\n // Generate default aria-label based on granularity if not provided\n const getDefaultTimeInputAriaLabel = () => {\n switch (granularity) {\n case \"hour\":\n return intl.formatMessage(messages.enterTimeHour);\n case \"minute\":\n return intl.formatMessage(messages.enterTimeHourMinute);\n case \"second\":\n return intl.formatMessage(messages.enterTimeHourMinuteSecond);\n default:\n return intl.formatMessage(messages.enterTime);\n }\n };\n\n /**\n * Button slots\n * ================================\n */\n const buttonSlots = {\n /** toggles the calendar popover */\n calendarToggle: {\n ...buttonContext,\n onPress: (event: PressEvent) => {\n // Ensure any active input (e.g., date picker segment) loses focus\n // because blurring the input will close the popover if it's open (or was just opened)\n const activeElement = document?.activeElement as HTMLElement | null;\n\n if (activeElement) {\n activeElement.blur();\n }\n\n buttonContext.onPress?.(event);\n },\n },\n /** Clear button that displays when there's a value in each segment - hidden from both visual and screen readers when there's no value */\n clear: {\n onPress: () => datePickerState?.setValue(null),\n \"aria-label\": intl.formatMessage(messages.clearInput),\n isDisabled: isDatePickerDisabled,\n // Hide the button when there's no value\n style: noInputValue ? { display: \"none\" } : undefined,\n \"aria-hidden\": noInputValue ? true : undefined,\n },\n };\n\n /**\n * TimeInput slots\n * ================================\n */\n\n const timeInputSlots = {\n timeInput: {\n value: timeValue,\n onChange: (value: TimeValue | null) => {\n if (value !== null) {\n setTimeValue(value);\n }\n },\n granularity: granularity === \"day\" ? undefined : granularity,\n \"aria-label\": getDefaultTimeInputAriaLabel(),\n },\n };\n\n return (\n <Provider\n values={[\n [\n ButtonContext,\n {\n slots: buttonSlots,\n },\n ],\n [TimeFieldContext, { slots: timeInputSlots }],\n ]}\n >\n {children}\n </Provider>\n );\n};\n","import {\n DatePickerRootSlot,\n DatePickerGroupSlot,\n DatePickerPopoverSlot,\n DatePickerCalendarSlot,\n} from \"./date-picker.slots\";\n\nimport { CalendarMonth, Close } from \"@commercetools/nimbus-icons\";\n\nimport {\n DatePicker as ReactAriaDatePicker,\n Group,\n Popover,\n Dialog,\n} from \"react-aria-components\";\nimport { useSlotRecipe } from \"@chakra-ui/react/styled-system\";\nimport { datePickerSlotRecipe } from \"./date-picker.recipe\";\nimport type { DatePickerProps } from \"./date-picker.types\";\nimport { extractStyleProps } from \"@/utils\";\nimport { DateInput, Calendar, IconButton, Box } from \"@/components\";\nimport { DatePickerTimeInput } from \"./components/date-picker.time-input\";\nimport { DatePickerCustomContext } from \"./components/date-picker.custom-context\";\n\n/**\n * # DatePicker\n *\n * a UI component for users to enter or select a specific calendar date.\n *\n * @see {@link https://nimbus-documentation.vercel.app/components/inputs/datepicker}\n */\nexport const DatePicker = (props: DatePickerProps) => {\n const {\n size = \"md\",\n variant,\n granularity = \"day\",\n hideTimeZone,\n hourCycle,\n } = props;\n const recipe = useSlotRecipe({ recipe: datePickerSlotRecipe });\n const [recipeProps, remainingProps] = recipe.splitVariantProps(props);\n const [styleProps, otherProps] = extractStyleProps(remainingProps);\n\n // the size of the buttons overlaying the input\n const overlayButtonSize = size === \"md\" ? \"xs\" : \"2xs\";\n\n // When granularity is \"day\", use the prop value (defaults to true if not provided)\n // For other granularities (time-based), force to false so users can set both date and time\n const shouldCloseOnSelect =\n granularity === \"day\" ? props.shouldCloseOnSelect : false;\n\n return (\n <DatePickerRootSlot {...recipeProps} {...styleProps} asChild>\n <ReactAriaDatePicker\n {...otherProps}\n shouldCloseOnSelect={shouldCloseOnSelect}\n >\n <DatePickerCustomContext>\n <DatePickerGroupSlot asChild>\n <Group>\n <DateInput\n size={size}\n variant={variant}\n width=\"full\"\n hideTimeZone={hideTimeZone}\n hourCycle={hourCycle}\n trailingElement={\n <Box>\n {/* @ts-expect-error react aria is adding the aria-label prop */}\n <IconButton\n variant=\"ghost\"\n size={overlayButtonSize}\n slot=\"clear\"\n >\n <Close />\n </IconButton>\n {/* @ts-expect-error react aria is adding the aria-label prop */}\n <IconButton\n variant=\"ghost\"\n size={overlayButtonSize}\n slot=\"calendarToggle\"\n >\n <CalendarMonth />\n </IconButton>\n </Box>\n }\n />\n </Group>\n </DatePickerGroupSlot>\n <DatePickerPopoverSlot asChild>\n <Popover placement=\"bottom end\">\n <Dialog>\n <DatePickerCalendarSlot>\n <Calendar />\n </DatePickerCalendarSlot>\n <DatePickerTimeInput\n hideTimeZone={hideTimeZone}\n hourCycle={hourCycle}\n />\n </Dialog>\n </Popover>\n </DatePickerPopoverSlot>\n </DatePickerCustomContext>\n </ReactAriaDatePicker>\n </DatePickerRootSlot>\n );\n};\n\nDatePicker.displayName = \"DatePicker\";\n"],"names":["withProvider","withContext","createSlotRecipeContext","DatePickerRootSlot","DatePickerGroupSlot","DatePickerPopoverSlot","DatePickerCalendarSlot","messages","defineMessages","DatePickerTimeInput","hideTimeZone","hourCycle","datePickerState","useContext","DatePickerStateContext","granularity","dateValue","timeInputRef","useRef","previousDateRef","useEffect","timeoutId","container","activeElement","jsxs","Flex","jsx","Text","FormattedMessage","TimeInput","DatePickerCustomContext","children","intl","useIntl","buttonContext","useSlottedContext","ButtonContext","noInputValue","timeValue","setTimeValue","isDatePickerDisabled","getDefaultTimeInputAriaLabel","buttonSlots","event","timeInputSlots","value","Provider","TimeFieldContext","DatePicker","props","size","variant","recipe","useSlotRecipe","datePickerSlotRecipe","recipeProps","remainingProps","styleProps","otherProps","extractStyleProps","overlayButtonSize","shouldCloseOnSelect","ReactAriaDatePicker","Group","DateInput","Box","IconButton","Close","CalendarMonth","Popover","Dialog","Calendar"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAOA,MAAM,EAAE,cAAAA,GAAc,aAAAC,EAAA,IAAgB,gBAAAC,EAAwB;AAAA,EAC5D,KAAK;AACP,CAAC,GAMYC,IAAqB,gBAAAH,EAGhC,OAAO,MAAM,GAKFI,IAAsB,gBAAAH,EAGjC,OAAO,OAAO,GAKHI,IAAwB,gBAAAJ,EAGnC,OAAO,SAAS,GAKLK,IAAyB,gBAAAL,EAGpC,OAAO,UAAU,GCxCNM,IAAW,gBAAAC,EAAe;AAAA,EACrC,YAAY;AAAA,IACV,IAAI;AAAA,IACJ,aAAa;AAAA,IACb,gBAAgB;AAAA,EAAA;AAAA,EAElB,WAAW;AAAA,IACT,IAAI;AAAA,IACJ,aAAa;AAAA,IACb,gBAAgB;AAAA,EAAA;AAAA,EAElB,eAAe;AAAA,IACb,IAAI;AAAA,IACJ,aAAa;AAAA,IACb,gBAAgB;AAAA,EAAA;AAAA,EAElB,qBAAqB;AAAA,IACnB,IAAI;AAAA,IACJ,aAAa;AAAA,IACb,gBAAgB;AAAA,EAAA;AAAA,EAElB,2BAA2B;AAAA,IACzB,IAAI;AAAA,IACJ,aAAa;AAAA,IACb,gBAAgB;AAAA,EAAA;AAAA,EAElB,WAAW;AAAA,IACT,IAAI;AAAA,IACJ,aAAa;AAAA,IACb,gBAAgB;AAAA,EAAA;AAEpB,CAAC,GC1BYC,IAAsB,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AAAA,cAGT,gBAAAzC;AAAA,gBAACwC;AAAA,gBAAA;AAAA,kBACC,SAAQ;AAAA,kBACR,MAAMN;AAAA,kBACN,MAAK;AAAA,kBAEL,4BAACQ,GAAA,CAAA,CAAc;AAAA,gBAAA;AAAA,cAAA;AAAA,YACjB,EAAA,CACF;AAAA,UAAA;AAAA,QAAA,GAGN,EAAA,CACF;AAAA,QACA,gBAAA1C,EAACrB,KAAsB,SAAO,IAC5B,4BAACgE,GAAA,EAAQ,WAAU,cACjB,UAAA,gBAAA7C,EAAC8C,GAAA,EACC,UAAA;AAAA,UAAA,gBAAA5C,EAACpB,GAAA,EACC,UAAA,gBAAAoB,EAAC6C,GAAA,CAAA,CAAS,GACZ;AAAA,UACA,gBAAA7C;AAAA,YAACjB;AAAA,YAAA;AAAA,cACC,cAAAC;AAAA,cACA,WAAAC;AAAA,YAAA;AAAA,UAAA;AAAA,QACF,EAAA,CACF,GACF,EAAA,CACF;AAAA,MAAA,EAAA,CACF;AAAA,IAAA;AAAA,EAAA,GAEJ;AAEJ;AAEAqC,EAAW,cAAc;"}
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import { jsxs as g, jsx as a } from "react/jsx-runtime";
|
|
2
2
|
import { createSlotRecipeContext as N } from "@chakra-ui/react";
|
|
3
3
|
import { Close as V, CalendarMonth as E } from "@commercetools/nimbus-icons";
|
|
4
|
-
import { $ as I, a as z } from "./DatePicker-
|
|
5
|
-
import { $ as w, h as L } from "./Dialog-
|
|
4
|
+
import { $ as I, a as z } from "./DatePicker-Cvad8nra.es.js";
|
|
5
|
+
import { $ as w, h as L } from "./Dialog-BUtdEtlF.es.js";
|
|
6
6
|
import { $ as W } from "./Group-zHIVpnch.es.js";
|
|
7
7
|
import { useSlotRecipe as j } from "@chakra-ui/react/styled-system";
|
|
8
|
-
import { g as F } from "./index-
|
|
9
|
-
import { e as O } from "./extract-style-props-
|
|
8
|
+
import { g as F } from "./index-B7wlrXvj.es.js";
|
|
9
|
+
import { e as O } from "./extract-style-props-fH5EHRZU.es.js";
|
|
10
10
|
import { useContext as H, useRef as M, useEffect as A } from "react";
|
|
11
11
|
import { defineMessages as B, useIntl as $ } from "react-intl";
|
|
12
12
|
import { Flex as S } from "@chakra-ui/react/flex";
|
|
13
13
|
import { T as v } from "./text-BVYJmhjj.es.js";
|
|
14
|
-
import { T as
|
|
15
|
-
import { $ as
|
|
14
|
+
import { T as k } from "./time-input-BJ1nDsyZ.es.js";
|
|
15
|
+
import { $ as y } from "./Button-SjGHt140.es.js";
|
|
16
16
|
import { c as G, e as q } from "./utils-_m_bPtjI.es.js";
|
|
17
|
-
import { d as K } from "./DateField-
|
|
18
|
-
import { R as J } from "./range-calendar-
|
|
19
|
-
import { D as x } from "./date-input-
|
|
20
|
-
import { I as C } from "./icon-button-
|
|
17
|
+
import { d as K } from "./DateField-DMjgxual.es.js";
|
|
18
|
+
import { R as J } from "./range-calendar-D6nonjnz.es.js";
|
|
19
|
+
import { D as x } from "./date-input-CRnreBK0.es.js";
|
|
20
|
+
import { I as C } from "./icon-button-XkzBkGuJ.es.js";
|
|
21
21
|
const { withProvider: Q, withContext: D } = /* @__PURE__ */ N({
|
|
22
22
|
key: "dateRangePicker"
|
|
23
23
|
}), U = /* @__PURE__ */ Q("div", "root"), X = /* @__PURE__ */ D("div", "group"), Y = /* @__PURE__ */ D("div", "trigger"), Z = /* @__PURE__ */ D("div", "popover"), _ = /* @__PURE__ */ D("div", "calendar"), l = /* @__PURE__ */ B({
|
|
@@ -131,7 +131,7 @@ const { withProvider: Q, withContext: D } = /* @__PURE__ */ N({
|
|
|
131
131
|
}
|
|
132
132
|
),
|
|
133
133
|
/* @__PURE__ */ a(
|
|
134
|
-
|
|
134
|
+
k,
|
|
135
135
|
{
|
|
136
136
|
slot: "startTimeInput",
|
|
137
137
|
variant: "ghost",
|
|
@@ -153,7 +153,7 @@ const { withProvider: Q, withContext: D } = /* @__PURE__ */ N({
|
|
|
153
153
|
}
|
|
154
154
|
),
|
|
155
155
|
/* @__PURE__ */ a(
|
|
156
|
-
|
|
156
|
+
k,
|
|
157
157
|
{
|
|
158
158
|
slot: "endTimeInput",
|
|
159
159
|
variant: "ghost",
|
|
@@ -169,7 +169,7 @@ const { withProvider: Q, withContext: D } = /* @__PURE__ */ N({
|
|
|
169
169
|
}, te = ({
|
|
170
170
|
children: s
|
|
171
171
|
}) => {
|
|
172
|
-
const i = $(), d = G(
|
|
172
|
+
const i = $(), d = G(y) || {}, e = H(I), c = (t) => t?.day && t?.month && t?.year, n = !e?.value || !c(e.value.start) || !c(e.value.end), { granularity: o } = e, m = e?.value?.start && "hour" in e.value.start ? e.value.start : null, p = e?.value?.end && "hour" in e.value.end ? e.value.end : null, T = d?.isDisabled, u = (t) => {
|
|
173
173
|
const r = t === "start" ? "start" : "end";
|
|
174
174
|
switch (o) {
|
|
175
175
|
case "hour":
|
|
@@ -259,7 +259,7 @@ const { withProvider: Q, withContext: D } = /* @__PURE__ */ N({
|
|
|
259
259
|
{
|
|
260
260
|
values: [
|
|
261
261
|
[
|
|
262
|
-
|
|
262
|
+
y,
|
|
263
263
|
{
|
|
264
264
|
slots: f
|
|
265
265
|
}
|
|
@@ -316,7 +316,6 @@ const { withProvider: Q, withContext: D } = /* @__PURE__ */ N({
|
|
|
316
316
|
/* @__PURE__ */ a(
|
|
317
317
|
C,
|
|
318
318
|
{
|
|
319
|
-
tone: "primary",
|
|
320
319
|
variant: "ghost",
|
|
321
320
|
size: f,
|
|
322
321
|
slot: "clear",
|
|
@@ -327,7 +326,6 @@ const { withProvider: Q, withContext: D } = /* @__PURE__ */ N({
|
|
|
327
326
|
/* @__PURE__ */ a(
|
|
328
327
|
C,
|
|
329
328
|
{
|
|
330
|
-
tone: "primary",
|
|
331
329
|
variant: "ghost",
|
|
332
330
|
size: f,
|
|
333
331
|
slot: "calendarToggle",
|
|
@@ -355,4 +353,4 @@ ae.displayName = "DateRangePicker";
|
|
|
355
353
|
export {
|
|
356
354
|
ae as D
|
|
357
355
|
};
|
|
358
|
-
//# sourceMappingURL=date-range-picker-
|
|
356
|
+
//# sourceMappingURL=date-range-picker-B2Cln3mU.es.js.map
|