@commercetools/nimbus 0.0.0-canary-20250918180630 → 0.0.0-canary-20250919133951
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-BVaauB-c.es.js → Button-CNBS3n5a.es.js} +7 -7
- package/dist/chunks/{Button-BVaauB-c.es.js.map → Button-CNBS3n5a.es.js.map} +1 -1
- package/dist/chunks/{DateField-CoKm-f2B.es.js → DateField-Dm2Qlhbk.es.js} +23 -23
- package/dist/chunks/{DateField-CoKm-f2B.es.js.map → DateField-Dm2Qlhbk.es.js.map} +1 -1
- package/dist/chunks/{DatePicker-Df8zjP9h.es.js → DatePicker-kvQcWFTq.es.js} +19 -19
- package/dist/chunks/{DatePicker-Df8zjP9h.es.js.map → DatePicker-kvQcWFTq.es.js.map} +1 -1
- package/dist/chunks/{Dialog-Cva4CZ0O.es.js → Dialog-BH-H4BEe.es.js} +25 -25
- package/dist/chunks/{Dialog-Cva4CZ0O.es.js.map → Dialog-BH-H4BEe.es.js.map} +1 -1
- package/dist/chunks/{DragAndDrop-Bbd4HbfU.es.js → DragAndDrop-ChYb3tCX.es.js} +3 -3
- package/dist/chunks/{DragAndDrop-Bbd4HbfU.es.js.map → DragAndDrop-ChYb3tCX.es.js.map} +1 -1
- package/dist/chunks/{FocusScope-LBESYsSE.es.js → FocusScope-CNO0fzPs.es.js} +5 -5
- package/dist/chunks/{FocusScope-LBESYsSE.es.js.map → FocusScope-CNO0fzPs.es.js.map} +1 -1
- package/dist/chunks/{Group-DUCWhg7j.es.js → Group-Cfixd-fh.es.js} +5 -5
- package/dist/chunks/{Group-DUCWhg7j.es.js.map → Group-Cfixd-fh.es.js.map} +1 -1
- package/dist/chunks/{Header-Cfm2XlNT.es.js → Header-Bi219Q1R.es.js} +5 -5
- package/dist/chunks/{Header-Cfm2XlNT.es.js.map → Header-Bi219Q1R.es.js.map} +1 -1
- package/dist/chunks/{Heading-BX1t1Kmm.es.js → Heading-DEfy_f01.es.js} +15 -15
- package/dist/chunks/{Heading-BX1t1Kmm.es.js.map → Heading-DEfy_f01.es.js.map} +1 -1
- package/dist/chunks/{Input-FFG42ja6.es.js → Input-BiHwUBo4.es.js} +5 -5
- package/dist/chunks/{Input-FFG42ja6.es.js.map → Input-BiHwUBo4.es.js.map} +1 -1
- package/dist/chunks/{Label-BdaLJ5Ha.es.js → Label-B2YyCdLl.es.js} +2 -2
- package/dist/chunks/{Label-BdaLJ5Ha.es.js.map → Label-B2YyCdLl.es.js.map} +1 -1
- package/dist/chunks/{ListBox-BinkXiqM.es.js → ListBox-DKAR_w69.es.js} +15 -15
- package/dist/chunks/{ListBox-BinkXiqM.es.js.map → ListBox-DKAR_w69.es.js.map} +1 -1
- package/dist/chunks/{OverlayArrow-Kk4VWzmN.es.js → OverlayArrow-sJzRZNbO.es.js} +3 -3
- package/dist/chunks/{OverlayArrow-Kk4VWzmN.es.js.map → OverlayArrow-sJzRZNbO.es.js.map} +1 -1
- package/dist/chunks/{ProgressBar-CwFHab_J.es.js → ProgressBar-DjaUQI7N.es.js} +5 -5
- package/dist/chunks/{ProgressBar-CwFHab_J.es.js.map → ProgressBar-DjaUQI7N.es.js.map} +1 -1
- package/dist/chunks/{SSRProvider-v-LddFEs.es.js → SSRProvider-Cu8KibIK.es.js} +2 -2
- package/dist/chunks/{SSRProvider-v-LddFEs.es.js.map → SSRProvider-Cu8KibIK.es.js.map} +1 -1
- package/dist/chunks/{SelectionManager-C-DrFCWk.es.js → SelectionManager-BgUVI3vz.es.js} +11 -11
- package/dist/chunks/{SelectionManager-C-DrFCWk.es.js.map → SelectionManager-BgUVI3vz.es.js.map} +1 -1
- package/dist/chunks/{Separator-D9Sio9QB.es.js → Separator-CuZ-VIh8.es.js} +5 -5
- package/dist/chunks/{Separator-D9Sio9QB.es.js.map → Separator-CuZ-VIh8.es.js.map} +1 -1
- package/dist/chunks/{TextArea-VPSW7sXC.es.js → TextArea-BmpgvS0R.es.js} +5 -5
- package/dist/chunks/{TextArea-VPSW7sXC.es.js.map → TextArea-BmpgvS0R.es.js.map} +1 -1
- package/dist/chunks/{ToggleButton-CRaJMq4q.es.js → ToggleButton-C3JL0pgD.es.js} +7 -7
- package/dist/chunks/{ToggleButton-CRaJMq4q.es.js.map → ToggleButton-C3JL0pgD.es.js.map} +1 -1
- package/dist/chunks/{VisuallyHidden-B0NiNh0E.es.js → VisuallyHidden-VHEPK04F.es.js} +3 -3
- package/dist/chunks/{VisuallyHidden-B0NiNh0E.es.js.map → VisuallyHidden-VHEPK04F.es.js.map} +1 -1
- package/dist/chunks/{accordion-BOm1fDGE.es.js → accordion-DG3lUgRg.es.js} +7 -7
- package/dist/chunks/{accordion-BOm1fDGE.es.js.map → accordion-DG3lUgRg.es.js.map} +1 -1
- package/dist/chunks/{alert-AElDV5sG.es.js → alert-VGuxkbOc.es.js} +2 -2
- package/dist/chunks/{alert-AElDV5sG.es.js.map → alert-VGuxkbOc.es.js.map} +1 -1
- package/dist/chunks/{badge-CHmfeeRs.es.js → badge-BJd-Q81M.es.js} +2 -2
- package/dist/chunks/{badge-CHmfeeRs.es.js.map → badge-BJd-Q81M.es.js.map} +1 -1
- package/dist/chunks/{button-BQ3kiG-V.es.js → button-rNwSVldt.es.js} +5 -5
- package/dist/chunks/{button-BQ3kiG-V.es.js.map → button-rNwSVldt.es.js.map} +1 -1
- package/dist/chunks/{calendar-BK_QGKS0.es.js → calendar-D6NyBain.es.js} +9 -9
- package/dist/chunks/{calendar-BK_QGKS0.es.js.map → calendar-D6NyBain.es.js.map} +1 -1
- package/dist/chunks/{card-D9fWUQqs.es.js → card-BfUdf1Fy.es.js} +3 -3
- package/dist/chunks/{card-D9fWUQqs.es.js.map → card-BfUdf1Fy.es.js.map} +1 -1
- package/dist/chunks/{checkbox-BGAiCLIb.es.js → checkbox-CKNIwwcB.es.js} +9 -9
- package/dist/chunks/{checkbox-BGAiCLIb.es.js.map → checkbox-CKNIwwcB.es.js.map} +1 -1
- package/dist/chunks/{combobox-07vfnDtg.es.js → combobox-BUIW3Acv.es.js} +27 -27
- package/dist/chunks/{combobox-07vfnDtg.es.js.map → combobox-BUIW3Acv.es.js.map} +1 -1
- package/dist/chunks/{context-DHW7D0wv.es.js → context-R4YUlO9Y.es.js} +2 -2
- package/dist/chunks/{context-DHW7D0wv.es.js.map → context-R4YUlO9Y.es.js.map} +1 -1
- package/dist/chunks/{data-table-BCgdkQQg.es.js → data-table-WrOybKO-.es.js} +26 -26
- package/dist/chunks/{data-table-BCgdkQQg.es.js.map → data-table-WrOybKO-.es.js.map} +1 -1
- package/dist/chunks/{date-input-BVqM2Zwt.es.js → date-input-lvHqn9hu.es.js} +2 -2
- package/dist/chunks/{date-input-BVqM2Zwt.es.js.map → date-input-lvHqn9hu.es.js.map} +1 -1
- package/dist/chunks/{date-picker-D5DgoUj4.es.js → date-picker-BClkWxBN.es.js} +13 -13
- package/dist/chunks/{date-picker-D5DgoUj4.es.js.map → date-picker-BClkWxBN.es.js.map} +1 -1
- package/dist/chunks/{date-range-picker-BsRVRy3E.es.js → date-range-picker-DMgDuWt8.es.js} +13 -13
- package/dist/chunks/{date-range-picker-BsRVRy3E.es.js.map → date-range-picker-DMgDuWt8.es.js.map} +1 -1
- package/dist/chunks/{focusSafely-DS3RePi9.es.js → focusSafely-DJpphVHF.es.js} +3 -3
- package/dist/chunks/{focusSafely-DS3RePi9.es.js.map → focusSafely-DJpphVHF.es.js.map} +1 -1
- package/dist/chunks/{form-field-DbrBkvlM.es.js → form-field-CkKl1C4M.es.js} +4 -4
- package/dist/chunks/{form-field-DbrBkvlM.es.js.map → form-field-CkKl1C4M.es.js.map} +1 -1
- package/dist/chunks/{group-FqYM3Go1.es.js → group-CqfSQXe7.es.js} +2 -2
- package/dist/chunks/{group-FqYM3Go1.es.js.map → group-CqfSQXe7.es.js.map} +1 -1
- package/dist/chunks/{icon-button-uSoUy0va.es.js → icon-button-BucXZ7sA.es.js} +2 -2
- package/dist/chunks/{icon-button-uSoUy0va.es.js.map → icon-button-BucXZ7sA.es.js.map} +1 -1
- package/dist/chunks/{icon-toggle-button-0hNL2V8m.es.js → icon-toggle-button-CHJioicU.es.js} +2 -2
- package/dist/chunks/{icon-toggle-button-0hNL2V8m.es.js.map → icon-toggle-button-CHJioicU.es.js.map} +1 -1
- package/dist/chunks/{kbd-D10CDyIE.es.js → kbd-BXN9aXRE.es.js} +2 -2
- package/dist/chunks/{kbd-D10CDyIE.es.js.map → kbd-BXN9aXRE.es.js.map} +1 -1
- package/dist/chunks/{link-CwFZrz1A.es.js → link-CFK97sc0.es.js} +4 -4
- package/dist/chunks/{link-CwFZrz1A.es.js.map → link-CFK97sc0.es.js.map} +1 -1
- package/dist/chunks/{loading-spinner-D3xWum_0.es.js → loading-spinner-DqWmjCK2.es.js} +3 -3
- package/dist/chunks/{loading-spinner-D3xWum_0.es.js.map → loading-spinner-DqWmjCK2.es.js.map} +1 -1
- package/dist/chunks/{make-element-focusable-BjLmsXKn.es.js → make-element-focusable-C4ZHUSEU.es.js} +3 -3
- package/dist/chunks/{make-element-focusable-BjLmsXKn.es.js.map → make-element-focusable-C4ZHUSEU.es.js.map} +1 -1
- package/dist/chunks/{menu-Bw1cKywG.es.js → menu-tco1KyAc.es.js} +5 -5
- package/dist/chunks/{menu-Bw1cKywG.es.js.map → menu-tco1KyAc.es.js.map} +1 -1
- package/dist/chunks/{mergeProps-uJMZqSEt.es.js → mergeProps-B_9syxhT.es.js} +2 -2
- package/dist/chunks/{mergeProps-uJMZqSEt.es.js.map → mergeProps-B_9syxhT.es.js.map} +1 -1
- package/dist/chunks/money-input-CdP3v6p6.cjs.js +2 -0
- package/dist/chunks/money-input-CdP3v6p6.cjs.js.map +1 -0
- package/dist/chunks/money-input-Cvmv4t9C.es.js +617 -0
- package/dist/chunks/money-input-Cvmv4t9C.es.js.map +1 -0
- package/dist/chunks/{multiline-text-input-C72_0pUg.es.js → multiline-text-input-WCmZjwVI.es.js} +3 -3
- package/dist/chunks/{multiline-text-input-C72_0pUg.es.js.map → multiline-text-input-WCmZjwVI.es.js.map} +1 -1
- package/dist/chunks/{nimbus-provider-HIuQgyHu.es.js → nimbus-provider-DXNGbcxb.es.js} +2 -2
- package/dist/chunks/{nimbus-provider-HIuQgyHu.es.js.map → nimbus-provider-DXNGbcxb.es.js.map} +1 -1
- package/dist/chunks/{number-input-CKbE2nF3.es.js → number-input-A8V9jCrF.es.js} +99 -88
- package/dist/chunks/{number-input-CKbE2nF3.es.js.map → number-input-A8V9jCrF.es.js.map} +1 -1
- package/dist/chunks/number-input-BscqsXLr.cjs.js +2 -0
- package/dist/chunks/{number-input-C6V-OoKY.cjs.js.map → number-input-BscqsXLr.cjs.js.map} +1 -1
- package/dist/chunks/{pagination-CvFm3Y-B.es.js → pagination-BilPyKzE.es.js} +5 -5
- package/dist/chunks/{pagination-CvFm3Y-B.es.js.map → pagination-BilPyKzE.es.js.map} +1 -1
- package/dist/chunks/{pagination-DFmOo7da.cjs.js → pagination-BzLsTY48.cjs.js} +2 -2
- package/dist/chunks/{pagination-DFmOo7da.cjs.js.map → pagination-BzLsTY48.cjs.js.map} +1 -1
- package/dist/chunks/{password-input-BIGq3fmn.es.js → password-input-1suWZc7f.es.js} +4 -4
- package/dist/chunks/{password-input-BIGq3fmn.es.js.map → password-input-1suWZc7f.es.js.map} +1 -1
- package/dist/chunks/{progress-bar-DokgT9da.es.js → progress-bar-D2a7ZPWi.es.js} +3 -3
- package/dist/chunks/{progress-bar-DokgT9da.es.js.map → progress-bar-D2a7ZPWi.es.js.map} +1 -1
- package/dist/chunks/{radio-input-BqFnIjO2.es.js → radio-input-BgMS0ym1.es.js} +16 -16
- package/dist/chunks/{radio-input-BqFnIjO2.es.js.map → radio-input-BgMS0ym1.es.js.map} +1 -1
- package/dist/chunks/{range-calendar-uSOrC07P.es.js → range-calendar-_nXf-aoR.es.js} +9 -9
- package/dist/chunks/{range-calendar-uSOrC07P.es.js.map → range-calendar-_nXf-aoR.es.js.map} +1 -1
- package/dist/chunks/{rich-text-input-BeAntm5q.es.js → rich-text-input-BaXDjgVB.es.js} +11 -11
- package/dist/chunks/{rich-text-input-BeAntm5q.es.js.map → rich-text-input-BaXDjgVB.es.js.map} +1 -1
- package/dist/chunks/{scrollIntoView-DW7gkKpB.es.js → scrollIntoView-BYF_8_6g.es.js} +2 -2
- package/dist/chunks/{scrollIntoView-DW7gkKpB.es.js.map → scrollIntoView-BYF_8_6g.es.js.map} +1 -1
- package/dist/chunks/{select-DRUAnKPP.es.js → select-Oi9NKTD2.es.js} +21 -21
- package/dist/chunks/{select-DRUAnKPP.es.js.map → select-Oi9NKTD2.es.js.map} +1 -1
- package/dist/chunks/{separator-BUpLsao0.es.js → separator-D3JP7dvE.es.js} +2 -2
- package/dist/chunks/{separator-BUpLsao0.es.js.map → separator-D3JP7dvE.es.js.map} +1 -1
- package/dist/chunks/{split-button-U_bcotvu.es.js → split-button-FG4rSCzg.es.js} +4 -4
- package/dist/chunks/{split-button-U_bcotvu.es.js.map → split-button-FG4rSCzg.es.js.map} +1 -1
- package/dist/chunks/{switch-DRyBAafG.es.js → switch-BaF0PH5z.es.js} +5 -5
- package/dist/chunks/{switch-DRyBAafG.es.js.map → switch-BaF0PH5z.es.js.map} +1 -1
- package/dist/chunks/{tag-group-BzLpm8Nm.es.js → tag-group-DNGTTkyq.es.js} +22 -22
- package/dist/chunks/{tag-group-BzLpm8Nm.es.js.map → tag-group-DNGTTkyq.es.js.map} +1 -1
- package/dist/chunks/{text-Bi4Gre95.es.js → text-DfQpupDi.es.js} +2 -2
- package/dist/chunks/{text-Bi4Gre95.es.js.map → text-DfQpupDi.es.js.map} +1 -1
- package/dist/chunks/{text-input-De16hUH1.es.js → text-input-Ciz7DJmU.es.js} +3 -3
- package/dist/chunks/{text-input-De16hUH1.es.js.map → text-input-Ciz7DJmU.es.js.map} +1 -1
- package/dist/chunks/{time-input-0zQIcl5w.es.js → time-input-DhNwJx5a.es.js} +2 -2
- package/dist/chunks/{time-input-0zQIcl5w.es.js.map → time-input-DhNwJx5a.es.js.map} +1 -1
- package/dist/chunks/{toggle-button-D1Ul4V1F.es.js → toggle-button-B0Vq-yaq.es.js} +2 -2
- package/dist/chunks/{toggle-button-D1Ul4V1F.es.js.map → toggle-button-B0Vq-yaq.es.js.map} +1 -1
- package/dist/chunks/{toggle-button-group-DXmJCAH5.es.js → toggle-button-group-jRdpdYyd.es.js} +2 -2
- package/dist/chunks/{toggle-button-group-DXmJCAH5.es.js.map → toggle-button-group-jRdpdYyd.es.js.map} +1 -1
- package/dist/chunks/{toolbar-D90bjfN_.es.js → toolbar-CtIrOXXC.es.js} +4 -4
- package/dist/chunks/{toolbar-D90bjfN_.es.js.map → toolbar-CtIrOXXC.es.js.map} +1 -1
- package/dist/chunks/{tooltip-BE3LzL7I.es.js → tooltip-B1YdruCE.es.js} +8 -8
- package/dist/chunks/{tooltip-BE3LzL7I.es.js.map → tooltip-B1YdruCE.es.js.map} +1 -1
- package/dist/chunks/{useButton-CYfXo2Jm.es.js → useButton-DAeSjgg9.es.js} +4 -4
- package/dist/chunks/{useButton-CYfXo2Jm.es.js.map → useButton-DAeSjgg9.es.js.map} +1 -1
- package/dist/chunks/{useCollator-Y-oU82PA.es.js → useCollator-BHMZd1r6.es.js} +2 -2
- package/dist/chunks/{useCollator-Y-oU82PA.es.js.map → useCollator-BHMZd1r6.es.js.map} +1 -1
- package/dist/chunks/{useDateFormatter-BuXtxdR1.es.js → useDateFormatter-C7Kxzwro.es.js} +3 -3
- package/dist/chunks/{useDateFormatter-BuXtxdR1.es.js.map → useDateFormatter-C7Kxzwro.es.js.map} +1 -1
- package/dist/chunks/{useEvent-Bxxy8Y3o.es.js → useEvent-YHhqZvpU.es.js} +2 -2
- package/dist/chunks/{useEvent-Bxxy8Y3o.es.js.map → useEvent-YHhqZvpU.es.js.map} +1 -1
- package/dist/chunks/{useField-Do87rtEk.es.js → useField-Ce9zQxmx.es.js} +3 -3
- package/dist/chunks/{useField-Do87rtEk.es.js.map → useField-Ce9zQxmx.es.js.map} +1 -1
- package/dist/chunks/{useFilter-ClBjQ7pb.es.js → useFilter-DOfNzeZ9.es.js} +2 -2
- package/dist/chunks/{useFilter-ClBjQ7pb.es.js.map → useFilter-DOfNzeZ9.es.js.map} +1 -1
- package/dist/chunks/{useFocus-BmMqaBAE.es.js → useFocus-DkWJ2TJC.es.js} +2 -2
- package/dist/chunks/{useFocus-BmMqaBAE.es.js.map → useFocus-DkWJ2TJC.es.js.map} +1 -1
- package/dist/chunks/{useFocusRing-SQNQ9yn0.es.js → useFocusRing-updnkDQg.es.js} +4 -4
- package/dist/chunks/{useFocusRing-SQNQ9yn0.es.js.map → useFocusRing-updnkDQg.es.js.map} +1 -1
- package/dist/chunks/{useFocusVisible-BrqHqmb9.es.js → useFocusVisible-CWDaG0ze.es.js} +3 -3
- package/dist/chunks/{useFocusVisible-BrqHqmb9.es.js.map → useFocusVisible-CWDaG0ze.es.js.map} +1 -1
- package/dist/chunks/{useFocusWithin-Db5nhiOm.es.js → useFocusWithin-ByYlHjju.es.js} +2 -2
- package/dist/chunks/{useFocusWithin-Db5nhiOm.es.js.map → useFocusWithin-ByYlHjju.es.js.map} +1 -1
- package/dist/chunks/{useFocusable-BqRFi3ok.es.js → useFocusable-CrsD8ZcF.es.js} +5 -5
- package/dist/chunks/{useFocusable-BqRFi3ok.es.js.map → useFocusable-CrsD8ZcF.es.js.map} +1 -1
- package/dist/chunks/{useFormReset-S3fDvX8g.es.js → useFormReset-DurgUJL-.es.js} +2 -2
- package/dist/chunks/{useFormReset-S3fDvX8g.es.js.map → useFormReset-DurgUJL-.es.js.map} +1 -1
- package/dist/chunks/{useFormValidation-CzvY15hR.es.js → useFormValidation-4hZ1_a6w.es.js} +3 -3
- package/dist/chunks/{useFormValidation-CzvY15hR.es.js.map → useFormValidation-4hZ1_a6w.es.js.map} +1 -1
- package/dist/chunks/{useHighlightSelectionDescription-VzA5DMaE.es.js → useHighlightSelectionDescription-BQg1WcM3.es.js} +6 -6
- package/dist/chunks/{useHighlightSelectionDescription-VzA5DMaE.es.js.map → useHighlightSelectionDescription-BQg1WcM3.es.js.map} +1 -1
- package/dist/chunks/{useHover-B6UI1gbJ.es.js → useHover-DhoE75lX.es.js} +2 -2
- package/dist/chunks/{useHover-B6UI1gbJ.es.js.map → useHover-DhoE75lX.es.js.map} +1 -1
- package/dist/chunks/{useLabel-BZKxdTDn.es.js → useLabel-BBmkkrPP.es.js} +2 -2
- package/dist/chunks/{useLabel-BZKxdTDn.es.js.map → useLabel-BBmkkrPP.es.js.map} +1 -1
- package/dist/chunks/{useLocalizedStringFormatter-BpL9LNnx.es.js → useLocalizedStringFormatter-BRnRyxJp.es.js} +2 -2
- package/dist/chunks/{useLocalizedStringFormatter-BpL9LNnx.es.js.map → useLocalizedStringFormatter-BRnRyxJp.es.js.map} +1 -1
- package/dist/chunks/{usePress-BuSQ4Y3L.es.js → usePress-DHhWHfMz.es.js} +6 -6
- package/dist/chunks/{usePress-BuSQ4Y3L.es.js.map → usePress-DHhWHfMz.es.js.map} +1 -1
- package/dist/chunks/{useProgressBar-g3lb_jPQ.es.js → useProgressBar-DHFmTHqL.es.js} +4 -4
- package/dist/chunks/{useProgressBar-g3lb_jPQ.es.js.map → useProgressBar-DHFmTHqL.es.js.map} +1 -1
- package/dist/chunks/{useSingleSelectListState-CUkiyLA6.es.js → useSingleSelectListState-CdPCvWTv.es.js} +2 -2
- package/dist/chunks/{useSingleSelectListState-CUkiyLA6.es.js.map → useSingleSelectListState-CdPCvWTv.es.js.map} +1 -1
- package/dist/chunks/{useSpinButton-DedtXIGZ.es.js → useSpinButton-C9DPDo0r.es.js} +3 -3
- package/dist/chunks/{useSpinButton-DedtXIGZ.es.js.map → useSpinButton-C9DPDo0r.es.js.map} +1 -1
- package/dist/chunks/{useSyncRef-Cipkqs1s.es.js → useSyncRef-DGRbdR4H.es.js} +2 -2
- package/dist/chunks/{useSyncRef-Cipkqs1s.es.js.map → useSyncRef-DGRbdR4H.es.js.map} +1 -1
- package/dist/chunks/{useTextField-tbVMyexr.es.js → useTextField-BnL6tOdd.es.js} +7 -7
- package/dist/chunks/{useTextField-tbVMyexr.es.js.map → useTextField-BnL6tOdd.es.js.map} +1 -1
- package/dist/chunks/{useToggle-CoHAX6Sy.es.js → useToggle-DqruaaTq.es.js} +5 -5
- package/dist/chunks/{useToggle-CoHAX6Sy.es.js.map → useToggle-DqruaaTq.es.js.map} +1 -1
- package/dist/chunks/{useToolbar-B1WYuGxA.es.js → useToolbar-CLH6Sjes.es.js} +4 -4
- package/dist/chunks/{useToolbar-B1WYuGxA.es.js.map → useToolbar-CLH6Sjes.es.js.map} +1 -1
- package/dist/chunks/{utils-CsKCu3xh.es.js → utils-BkdW_cdL.es.js} +2 -2
- package/dist/chunks/{utils-CsKCu3xh.es.js.map → utils-BkdW_cdL.es.js.map} +1 -1
- package/dist/chunks/{utils-d3Zmq36h.es.js → utils-jpfA6kxk.es.js} +2 -2
- package/dist/chunks/{utils-d3Zmq36h.es.js.map → utils-jpfA6kxk.es.js.map} +1 -1
- package/dist/chunks/{visually-hidden-09RsVX6x.es.js → visually-hidden-BluyWhUI.es.js} +2 -2
- package/dist/chunks/{visually-hidden-09RsVX6x.es.js.map → visually-hidden-BluyWhUI.es.js.map} +1 -1
- package/dist/components/accordion.es.js +1 -1
- package/dist/components/alert.es.js +1 -1
- package/dist/components/badge.es.js +1 -1
- package/dist/components/button.es.js +1 -1
- package/dist/components/calendar.es.js +1 -1
- package/dist/components/card.es.js +1 -1
- package/dist/components/checkbox.es.js +1 -1
- package/dist/components/combobox.es.js +1 -1
- package/dist/components/components.cjs +1 -1
- package/dist/components/components.es.js +98 -96
- package/dist/components/components.es.js.map +1 -1
- package/dist/components/data-table.es.js +1 -1
- package/dist/components/date-input.es.js +1 -1
- package/dist/components/date-picker.es.js +1 -1
- package/dist/components/date-range-picker.es.js +1 -1
- package/dist/components/form-field.es.js +1 -1
- package/dist/components/group.es.js +1 -1
- package/dist/components/icon-button.es.js +1 -1
- package/dist/components/icon-toggle-button.es.js +1 -1
- package/dist/components/kbd.es.js +1 -1
- package/dist/components/link.es.js +1 -1
- package/dist/components/loading-spinner.es.js +1 -1
- package/dist/components/money-input.cjs +2 -0
- package/dist/components/money-input.cjs.map +1 -0
- package/dist/components/money-input.es.js +5 -0
- package/dist/components/money-input.es.js.map +1 -0
- package/dist/components/multiline-text-input.es.js +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.es.js +1 -1
- package/dist/components/popover.es.js +1 -1
- package/dist/components/progress-bar.es.js +1 -1
- package/dist/components/radio-input.es.js +1 -1
- package/dist/components/range-calendar.es.js +1 -1
- package/dist/components/rich-text-input.es.js +1 -1
- package/dist/components/select.es.js +1 -1
- package/dist/components/separator.es.js +1 -1
- package/dist/components/split-button.es.js +1 -1
- package/dist/components/switch.es.js +1 -1
- package/dist/components/tag-group.es.js +1 -1
- package/dist/components/text-input.es.js +1 -1
- package/dist/components/text.es.js +1 -1
- package/dist/components/time-input.es.js +1 -1
- package/dist/components/toggle-button-group.es.js +1 -1
- package/dist/components/toggle-button.es.js +1 -1
- package/dist/components/toolbar.es.js +1 -1
- package/dist/components/tooltip.es.js +2 -2
- package/dist/components/visually-hidden.es.js +1 -1
- package/dist/components.d.ts +912 -3
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +912 -3
- package/dist/index.es.js +100 -98
- package/dist/index.es.js.map +1 -1
- package/dist/money-input.d.ts +951 -0
- package/dist/number-input.d.ts +4 -3
- package/package.json +5 -5
- package/dist/chunks/number-input-C6V-OoKY.cjs.js +0 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { createSlotRecipeContext as d, useRecipe as l } from "@chakra-ui/react/styled-system";
|
|
3
3
|
import { d as t } from "./index-B68rhcD_.es.js";
|
|
4
|
-
import { $ as m, a as u, b as f } from "./DateField-
|
|
4
|
+
import { $ as m, a as u, b as f } from "./DateField-Dm2Qlhbk.es.js";
|
|
5
5
|
import { e as h } from "./extractStyleProps-tYFaIfUG.es.js";
|
|
6
6
|
const { withProvider: $, withContext: r } = /* @__PURE__ */ d({
|
|
7
7
|
recipe: t
|
|
@@ -13,4 +13,4 @@ P.displayName = "DateInput";
|
|
|
13
13
|
export {
|
|
14
14
|
P as D
|
|
15
15
|
};
|
|
16
|
-
//# sourceMappingURL=date-input-
|
|
16
|
+
//# sourceMappingURL=date-input-lvHqn9hu.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-input-
|
|
1
|
+
{"version":3,"file":"date-input-lvHqn9hu.es.js","sources":["../../src/components/date-input/date-input.slots.tsx","../../src/components/date-input/date-input.tsx"],"sourcesContent":["import {\n type HTMLChakraProps,\n type RecipeProps,\n type UnstyledProp,\n createSlotRecipeContext,\n} from \"@chakra-ui/react/styled-system\";\n\nimport { dateInputSlotRecipe } from \"./date-input.recipe\";\n\n/**\n * Base recipe props interface that combines Chakra UI's recipe props\n * with the unstyled prop option for the div element.\n */\ninterface DateInputRecipeProps extends RecipeProps<\"div\">, UnstyledProp {}\n\n/**\n * Root props interface that extends Chakra's HTML props with our recipe props.\n * This creates a complete set of props for the root element, combining\n * HTML attributes, Chakra's styling system, and our custom recipe props.\n */\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport interface DateInputRootProps\n extends HTMLChakraProps<\"div\", DateInputRecipeProps> {}\n\n// Correctly destructure from createSlotRecipeContext based on project examples\nconst { withProvider, withContext } = createSlotRecipeContext({\n recipe: dateInputSlotRecipe,\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 DateInputRootProps\n>(\"div\", \"root\");\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 DateInputRootSlot,\n DateInputSegmentGroupSlot,\n DateInputSegmentSlot,\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/extractStyleProps\";\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 [recipeProps, recipeFreeProps] = recipe.splitVariantProps(props);\n const [styleProps, functionalProps] = extractStyleProps(recipeFreeProps);\n\n return (\n <DateInputRootSlot {...recipeProps} {...styleProps} asChild>\n <DateField {...functionalProps}>\n <DateInputSegmentGroupSlot asChild>\n <DateInputField>\n {(segment) => (\n <DateInputSegmentSlot asChild>\n <DateSegment segment={segment} />\n </DateInputSegmentSlot>\n )}\n </DateInputField>\n </DateInputSegmentGroupSlot>\n </DateField>\n </DateInputRootSlot>\n );\n};\n\nDateInput.displayName = \"DateInput\";\n"],"names":["withProvider","withContext","createSlotRecipeContext","dateInputSlotRecipe","DateInputRootSlot","DateInputSegmentGroupSlot","DateInputSegmentSlot","DateInput","props","recipe","useRecipe","recipeProps","recipeFreeProps","styleProps","functionalProps","extractStyleProps","jsx","DateField","DateInputField","segment","DateSegment"],"mappings":";;;;;AAyBA,MAAM,EAAE,cAAAA,GAAc,aAAAC,EAAA,IAAgB,gBAAAC,EAAwB;AAAA,EAC5D,QAAQC;AACV,CAAC,GAMYC,IAAoB,gBAAAJ,EAG/B,OAAO,MAAM,GAKFK,IAA4B,gBAAAJ,EAGvC,OAAO,cAAc,GAKVK,IAAuB,gBAAAL,EAGlC,OAAO,SAAS,GC7BLM,IAAY,CAACC,MAA0B;AAClD,QAAMC,IAASC,EAAU,EAAE,QAAQP,GAAqB,GAClD,CAACQ,GAAaC,CAAe,IAAIH,EAAO,kBAAkBD,CAAK,GAC/D,CAACK,GAAYC,CAAe,IAAIC,EAAkBH,CAAe;AAEvE,SACE,gBAAAI,EAACZ,GAAA,EAAmB,GAAGO,GAAc,GAAGE,GAAY,SAAO,IACzD,UAAA,gBAAAG,EAACC,GAAA,EAAW,GAAGH,GACb,4BAACT,GAAA,EAA0B,SAAO,IAChC,UAAA,gBAAAW,EAACE,GAAA,EACE,UAAA,CAACC,MACA,gBAAAH,EAACV,KAAqB,SAAO,IAC3B,UAAA,gBAAAU,EAACI,GAAA,EAAY,SAAAD,EAAA,CAAkB,EAAA,CACjC,GAEJ,EAAA,CACF,GACF,GACF;AAEJ;AAEAZ,EAAU,cAAc;"}
|
|
@@ -2,22 +2,22 @@ import { jsxs as b, jsx as e } from "react/jsx-runtime";
|
|
|
2
2
|
import { createSlotRecipeContext as D, useSlotRecipe as v } from "@chakra-ui/react/styled-system";
|
|
3
3
|
import { h as x } from "./index-B68rhcD_.es.js";
|
|
4
4
|
import { Close as y, CalendarMonth as C } from "@commercetools/nimbus-icons";
|
|
5
|
-
import { b as S, c as M } from "./DatePicker-
|
|
6
|
-
import { $ as I, a as H } from "./Dialog-
|
|
7
|
-
import { $ as E } from "./Group-
|
|
5
|
+
import { b as S, c as M } from "./DatePicker-kvQcWFTq.es.js";
|
|
6
|
+
import { $ as I, a as H } from "./Dialog-BH-H4BEe.es.js";
|
|
7
|
+
import { $ as E } from "./Group-Cfixd-fh.es.js";
|
|
8
8
|
import { e as N } from "./extractStyleProps-tYFaIfUG.es.js";
|
|
9
|
-
import { I as T } from "./icon-button-
|
|
10
|
-
import { D as R } from "./date-input-
|
|
11
|
-
import { C as V } from "./calendar-
|
|
12
|
-
import { T as w } from "./text-
|
|
13
|
-
import { T as z } from "./time-input-
|
|
9
|
+
import { I as T } from "./icon-button-BucXZ7sA.es.js";
|
|
10
|
+
import { D as R } from "./date-input-lvHqn9hu.es.js";
|
|
11
|
+
import { C as V } from "./calendar-D6NyBain.es.js";
|
|
12
|
+
import { T as w } from "./text-DfQpupDi.es.js";
|
|
13
|
+
import { T as z } from "./time-input-DhNwJx5a.es.js";
|
|
14
14
|
import { useContext as k, useRef as $, useEffect as F } from "react";
|
|
15
15
|
import { defineMessages as j, FormattedMessage as A, useIntl as B } from "react-intl";
|
|
16
|
-
import { $ as G } from "./context-
|
|
16
|
+
import { $ as G } from "./context-R4YUlO9Y.es.js";
|
|
17
17
|
import { Flex as L } from "@chakra-ui/react/flex";
|
|
18
|
-
import { $ as P } from "./Button-
|
|
19
|
-
import { c as O, d as q } from "./utils-
|
|
20
|
-
import { d as W } from "./DateField-
|
|
18
|
+
import { $ as P } from "./Button-CNBS3n5a.es.js";
|
|
19
|
+
import { c as O, d as q } from "./utils-BkdW_cdL.es.js";
|
|
20
|
+
import { d as W } from "./DateField-Dm2Qlhbk.es.js";
|
|
21
21
|
const { withProvider: Z, withContext: h } = /* @__PURE__ */ D({
|
|
22
22
|
recipe: x
|
|
23
23
|
}), J = /* @__PURE__ */ Z("div", "root"), K = /* @__PURE__ */ h("div", "group"), Q = /* @__PURE__ */ h("div", "trigger"), U = /* @__PURE__ */ h("div", "popover"), X = /* @__PURE__ */ h("div", "calendar"), p = /* @__PURE__ */ j({
|
|
@@ -219,4 +219,4 @@ ee.displayName = "DatePicker";
|
|
|
219
219
|
export {
|
|
220
220
|
ee as D
|
|
221
221
|
};
|
|
222
|
-
//# sourceMappingURL=date-picker-
|
|
222
|
+
//# sourceMappingURL=date-picker-BClkWxBN.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-picker-D5DgoUj4.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 type RecipeProps,\n type UnstyledProp,\n createSlotRecipeContext,\n} from \"@chakra-ui/react/styled-system\";\n\nimport { datePickerSlotRecipe } from \"./date-picker.recipe\";\n\n/**\n * Base recipe props interface that combines Chakra UI's recipe props\n * with the unstyled prop option for the div element.\n */\ninterface DatePickerRecipeProps extends RecipeProps<\"div\">, UnstyledProp {}\n\n/**\n * Root props interface that extends Chakra's HTML props with our recipe props.\n * This creates a complete set of props for the root element, combining\n * HTML attributes, Chakra's styling system, and our custom recipe props.\n */\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport interface DatePickerRootProps\n extends HTMLChakraProps<\"div\", DatePickerRecipeProps> {}\n\n// Correctly destructure from createSlotRecipeContext based on project examples\nconst { withProvider, withContext } = createSlotRecipeContext({\n recipe: datePickerSlotRecipe,\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 DatePickerRootProps\n>(\"div\", \"root\");\n\n/**\n * Slot component for the input group containing the DateInput and trigger button.\n */\nexport const DatePickerGroupSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"group\");\n\n/**\n * Slot component for the trigger button that opens the calendar popover.\n */\nexport const DatePickerTriggerSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"trigger\");\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 default 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 { useLocale } from \"react-aria\";\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 { locale } = useLocale();\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 locale={locale}\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 DatePickerTriggerSlot,\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/extractStyleProps\";\nimport { DateInput, Calendar, IconButton } 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 />\n <DatePickerTriggerSlot>\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 </DatePickerTriggerSlot>\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","datePickerSlotRecipe","DatePickerRootSlot","DatePickerGroupSlot","DatePickerTriggerSlot","DatePickerPopoverSlot","DatePickerCalendarSlot","messages","defineMessages","DatePickerTimeInput","hideTimeZone","hourCycle","locale","useLocale","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","recipeProps","remainingProps","styleProps","otherProps","extractStyleProps","overlayButtonSize","shouldCloseOnSelect","ReactAriaDatePicker","Group","DateInput","IconButton","Close","CalendarMonth","Popover","Dialog","Calendar"],"mappings":";;;;;;;;;;;;;;;;;;;;AAyBA,MAAM,EAAE,cAAAA,GAAc,aAAAC,EAAA,IAAgB,gBAAAC,EAAwB;AAAA,EAC5D,QAAQC;AACV,CAAC,GAMYC,IAAqB,gBAAAJ,EAGhC,OAAO,MAAM,GAKFK,IAAsB,gBAAAJ,EAGjC,OAAO,OAAO,GAKHK,IAAwB,gBAAAL,EAGnC,OAAO,SAAS,GAKLM,IAAwB,gBAAAN,EAGnC,OAAO,SAAS,GAKLO,IAAyB,gBAAAP,EAGpC,OAAO,UAAU,GClEnBQ,IAAe,gBAAAC,EAAe;AAAA,EAC5B,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,GCzBYC,IAAsB,CAAC;AAAA,EAClC,cAAAC;AAAA,EACA,WAAAC;AACF,MAAgC;AAC9B,QAAM,EAAE,QAAAC,EAAA,IAAWC,EAAA,GACbC,IAAkBC,EAAWC,CAAsB,GACnD,EAAE,aAAAC,GAAa,WAAAC,EAAA,IAAcJ,GAC7BK,IAAeC,EAAuB,IAAI,GAC1CC,IAAkBD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MAAK;AAAA,gBAEL,4BAACO,GAAA,CAAA,CAAc;AAAA,cAAA;AAAA,YAAA;AAAA,UACjB,EAAA,CACF;AAAA,QAAA,EAAA,CACF,EAAA,CACF;AAAA,QACA,gBAAAxC,EAACvB,KAAsB,SAAO,IAC5B,4BAACgE,GAAA,EAAQ,WAAU,cACjB,UAAA,gBAAA3C,EAAC4C,GAAA,EACC,UAAA;AAAA,UAAA,gBAAA1C,EAACtB,GAAA,EACC,UAAA,gBAAAsB,EAAC2C,GAAA,CAAA,CAAS,GACZ;AAAA,UACA,gBAAA3C;AAAA,YAACnB;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;AAEAuC,GAAW,cAAc;"}
|
|
1
|
+
{"version":3,"file":"date-picker-BClkWxBN.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 type RecipeProps,\n type UnstyledProp,\n createSlotRecipeContext,\n} from \"@chakra-ui/react/styled-system\";\n\nimport { datePickerSlotRecipe } from \"./date-picker.recipe\";\n\n/**\n * Base recipe props interface that combines Chakra UI's recipe props\n * with the unstyled prop option for the div element.\n */\ninterface DatePickerRecipeProps extends RecipeProps<\"div\">, UnstyledProp {}\n\n/**\n * Root props interface that extends Chakra's HTML props with our recipe props.\n * This creates a complete set of props for the root element, combining\n * HTML attributes, Chakra's styling system, and our custom recipe props.\n */\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport interface DatePickerRootProps\n extends HTMLChakraProps<\"div\", DatePickerRecipeProps> {}\n\n// Correctly destructure from createSlotRecipeContext based on project examples\nconst { withProvider, withContext } = createSlotRecipeContext({\n recipe: datePickerSlotRecipe,\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 DatePickerRootProps\n>(\"div\", \"root\");\n\n/**\n * Slot component for the input group containing the DateInput and trigger button.\n */\nexport const DatePickerGroupSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"group\");\n\n/**\n * Slot component for the trigger button that opens the calendar popover.\n */\nexport const DatePickerTriggerSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"trigger\");\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 default 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 { useLocale } from \"react-aria\";\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 { locale } = useLocale();\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 locale={locale}\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 DatePickerTriggerSlot,\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/extractStyleProps\";\nimport { DateInput, Calendar, IconButton } 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 />\n <DatePickerTriggerSlot>\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 </DatePickerTriggerSlot>\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","datePickerSlotRecipe","DatePickerRootSlot","DatePickerGroupSlot","DatePickerTriggerSlot","DatePickerPopoverSlot","DatePickerCalendarSlot","messages","defineMessages","DatePickerTimeInput","hideTimeZone","hourCycle","locale","useLocale","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","recipeProps","remainingProps","styleProps","otherProps","extractStyleProps","overlayButtonSize","shouldCloseOnSelect","ReactAriaDatePicker","Group","DateInput","IconButton","Close","CalendarMonth","Popover","Dialog","Calendar"],"mappings":";;;;;;;;;;;;;;;;;;;;AAyBA,MAAM,EAAE,cAAAA,GAAc,aAAAC,EAAA,IAAgB,gBAAAC,EAAwB;AAAA,EAC5D,QAAQC;AACV,CAAC,GAMYC,IAAqB,gBAAAJ,EAGhC,OAAO,MAAM,GAKFK,IAAsB,gBAAAJ,EAGjC,OAAO,OAAO,GAKHK,IAAwB,gBAAAL,EAGnC,OAAO,SAAS,GAKLM,IAAwB,gBAAAN,EAGnC,OAAO,SAAS,GAKLO,IAAyB,gBAAAP,EAGpC,OAAO,UAAU,GClEnBQ,IAAe,gBAAAC,EAAe;AAAA,EAC5B,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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useSlotRecipe as E } from "@chakra-ui/react/styled-system";
|
|
3
3
|
import { f as T } from "./index-B68rhcD_.es.js";
|
|
4
4
|
import { Close as w, CalendarMonth as z } from "@commercetools/nimbus-icons";
|
|
5
|
-
import { $ as I, a as W } from "./DatePicker-
|
|
6
|
-
import { $ as j, a as F } from "./Dialog-
|
|
7
|
-
import { $ as A } from "./Group-
|
|
5
|
+
import { $ as I, a as W } from "./DatePicker-kvQcWFTq.es.js";
|
|
6
|
+
import { $ as j, a as F } from "./Dialog-BH-H4BEe.es.js";
|
|
7
|
+
import { $ as A } from "./Group-Cfixd-fh.es.js";
|
|
8
8
|
import { e as B } from "./extractStyleProps-tYFaIfUG.es.js";
|
|
9
|
-
import { I as y } from "./icon-button-
|
|
10
|
-
import { T as S } from "./text-
|
|
11
|
-
import { D as C } from "./date-input-
|
|
12
|
-
import { R as G } from "./range-calendar-
|
|
13
|
-
import { T as D } from "./time-input-
|
|
9
|
+
import { I as y } from "./icon-button-BucXZ7sA.es.js";
|
|
10
|
+
import { T as S } from "./text-DfQpupDi.es.js";
|
|
11
|
+
import { D as C } from "./date-input-lvHqn9hu.es.js";
|
|
12
|
+
import { R as G } from "./range-calendar-_nXf-aoR.es.js";
|
|
13
|
+
import { T as D } from "./time-input-DhNwJx5a.es.js";
|
|
14
14
|
import { useContext as k, useRef as P, useEffect as O } from "react";
|
|
15
|
-
import { $ as q } from "./context-
|
|
15
|
+
import { $ as q } from "./context-R4YUlO9Y.es.js";
|
|
16
16
|
import { Flex as x } from "@chakra-ui/react/flex";
|
|
17
|
-
import { $ as R } from "./Button-
|
|
18
|
-
import { c as H, d as L } from "./utils-
|
|
19
|
-
import { d as M } from "./DateField-
|
|
17
|
+
import { $ as R } from "./Button-CNBS3n5a.es.js";
|
|
18
|
+
import { c as H, d as L } from "./utils-BkdW_cdL.es.js";
|
|
19
|
+
import { d as M } from "./DateField-Dm2Qlhbk.es.js";
|
|
20
20
|
const { withProvider: N, withContext: $ } = /* @__PURE__ */ V({
|
|
21
21
|
recipe: T
|
|
22
22
|
}), J = /* @__PURE__ */ N("div", "root"), K = /* @__PURE__ */ $("div", "group"), Q = /* @__PURE__ */ $("div", "trigger"), U = /* @__PURE__ */ $("div", "popover"), X = /* @__PURE__ */ $("div", "calendar"), Y = ({
|
|
@@ -280,4 +280,4 @@ _.displayName = "DateRangePicker";
|
|
|
280
280
|
export {
|
|
281
281
|
_ as D
|
|
282
282
|
};
|
|
283
|
-
//# sourceMappingURL=date-range-picker-
|
|
283
|
+
//# sourceMappingURL=date-range-picker-DMgDuWt8.es.js.map
|
package/dist/chunks/{date-range-picker-BsRVRy3E.es.js.map → date-range-picker-DMgDuWt8.es.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-range-picker-BsRVRy3E.es.js","sources":["../../src/components/date-range-picker/date-range-picker.slots.tsx","../../src/components/date-range-picker/components/date-range-picker.time-input.tsx","../../src/components/date-range-picker/components/date-range-picker.custom-context.tsx","../../src/components/date-range-picker/date-range-picker.tsx"],"sourcesContent":["import {\n type HTMLChakraProps,\n type RecipeProps,\n type UnstyledProp,\n createSlotRecipeContext,\n} from \"@chakra-ui/react/styled-system\";\n\nimport { dateRangePickerSlotRecipe } from \"./date-range-picker.recipe\";\n\n/**\n * Base recipe props interface that combines Chakra UI's recipe props\n * with the unstyled prop option for the div element.\n */\ninterface DateRangePickerRecipeProps extends RecipeProps<\"div\">, UnstyledProp {}\n\n/**\n * Root props interface that extends Chakra's HTML props with our recipe props.\n * This creates a complete set of props for the root element, combining\n * HTML attributes, Chakra's styling system, and our custom recipe props.\n */\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport interface DateRangePickerRootProps\n extends HTMLChakraProps<\"div\", DateRangePickerRecipeProps> {}\n\n// Correctly destructure from createSlotRecipeContext based on project examples\nconst { withProvider, withContext } = createSlotRecipeContext({\n recipe: dateRangePickerSlotRecipe,\n});\n\n/**\n * Root component that provides the styling context for the DateRangePicker component.\n * Uses Chakra UI's recipe context system for consistent styling across instances.\n */\nexport const DateRangePickerRootSlot = withProvider<\n HTMLDivElement,\n DateRangePickerRootProps\n>(\"div\", \"root\");\n\n/**\n * Slot component for the input group containing the DateInput and trigger button.\n */\nexport const DateRangePickerGroupSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"group\");\n\n/**\n * Slot component for the trigger button that opens the calendar popover.\n */\nexport const DateRangePickerTriggerSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"trigger\");\n\n/**\n * Slot component for the popover container.\n */\nexport const DateRangePickerPopoverSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"popover\");\n\n/**\n * Slot component for the calendar container within the popover.\n */\nexport const DateRangePickerCalendarSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"calendar\");\n\n/**\n * Slot component for the calendar header.\n */\nexport const DateRangePickerCalendarHeaderSlot = withContext<\n HTMLElement,\n HTMLChakraProps<\"header\">\n>(\"header\", \"calendarHeader\");\n\n/**\n * Slot component for the calendar grid.\n */\nexport const DateRangePickerCalendarGridSlot = withContext<\n HTMLTableElement,\n HTMLChakraProps<\"table\">\n>(\"table\", \"calendarGrid\");\n\n/**\n * Slot component for individual calendar cells.\n */\nexport const DateRangePickerCalendarCellSlot = withContext<\n HTMLTableCellElement,\n HTMLChakraProps<\"td\">\n>(\"td\", \"calendarCell\");\n","import { Flex, Text, TimeInput } from \"@/components\";\nimport { useContext, useRef, useEffect } from \"react\";\nimport { useLocale } from \"react-aria\";\nimport { DateRangePickerStateContext } from \"react-aria-components\";\nimport type { DateRangePickerTimeInputProps } from \"../date-range-picker.types\";\n\nexport const DateRangePickerTimeInput = ({\n hideTimeZone,\n hourCycle,\n}: DateRangePickerTimeInputProps) => {\n const { locale } = useLocale();\n const dateRangePickerState = useContext(DateRangePickerStateContext);\n const { granularity, value } = dateRangePickerState!;\n const timeInputRef = useRef<HTMLDivElement>(null);\n const previousValueRef = useRef(value);\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 range changes (user selects dates from calendar)\n useEffect(() => {\n let timeoutId: ReturnType<typeof setTimeout> | undefined;\n\n // Check if date range changed by comparing start and end dates\n const hasValueChanged =\n (value?.start &&\n previousValueRef.current?.start?.compare(value.start) !== 0) ||\n (value?.end && previousValueRef.current?.end?.compare(value.end) !== 0);\n\n if (hasValueChanged) {\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\n if (firstSegment) {\n firstSegment.focus();\n }\n }\n }, 50);\n }\n }\n\n previousValueRef.current = value;\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 }, [value]);\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 {/* Start DateInput with separate label */}\n <Flex alignItems=\"center\" gap=\"200\">\n {/* TODO: translate hardcoded string */}\n <Text\n textStyle=\"xs\"\n fontWeight=\"500\"\n color=\"neutral.12\"\n minWidth=\"fit-content\"\n >\n Start time\n </Text>\n <TimeInput\n slot=\"startTimeInput\"\n locale={locale}\n variant=\"ghost\"\n size=\"sm\"\n hideTimeZone={hideTimeZone}\n hourCycle={hourCycle}\n />\n </Flex>\n\n {/* End DateInput with separate label */}\n <Flex alignItems=\"center\" gap=\"200\">\n {/* TODO: translate hardcoded string */}\n <Text\n textStyle=\"xs\"\n fontWeight=\"500\"\n color=\"neutral.12\"\n minWidth=\"fit-content\"\n >\n End time\n </Text>\n <TimeInput\n slot=\"endTimeInput\"\n locale={locale}\n variant=\"ghost\"\n size=\"sm\"\n hideTimeZone={hideTimeZone}\n hourCycle={hourCycle}\n />\n </Flex>\n </Flex>\n );\n};\n","import { useContext, type ReactNode } from \"react\";\nimport {\n Provider,\n ButtonContext,\n DateRangePickerStateContext,\n TimeFieldContext,\n useSlottedContext,\n} from \"react-aria-components\";\nimport type { PressEvent, TimeValue } from \"react-aria\";\n\nexport const DateRangePickerCustomContext = ({\n children,\n}: {\n children: ReactNode;\n}) => {\n const buttonContext = useSlottedContext(ButtonContext) || {};\n const dateRangePickerState = useContext(DateRangePickerStateContext);\n\n // Check if all 6 segments (start: day, month, year; end: day, month, year) have values\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const hasCompleteRangeDate = (date: any) =>\n date?.day && date?.month && date?.year;\n\n const incompleteValue =\n !dateRangePickerState?.value ||\n !hasCompleteRangeDate(dateRangePickerState.value.start) ||\n !hasCompleteRangeDate(dateRangePickerState.value.end);\n\n const { granularity } = dateRangePickerState!;\n\n // Extract time values from start and end dates separately\n const startTimeValue =\n dateRangePickerState?.value?.start &&\n \"hour\" in dateRangePickerState.value.start\n ? dateRangePickerState.value.start\n : null;\n const endTimeValue =\n dateRangePickerState?.value?.end && \"hour\" in dateRangePickerState.value.end\n ? dateRangePickerState.value.end\n : null;\n\n // Try to get disabled state from the button context\n const isDateRangePickerDisabled = buttonContext?.isDisabled;\n\n // Generate default aria-label based on granularity if not provided\n const getDefaultTimeInputAriaLabel = (type: \"start\" | \"end\") => {\n const prefix = type === \"start\" ? \"Start\" : \"End\";\n switch (granularity) {\n case \"hour\":\n return `${prefix} time (hour)`;\n case \"minute\":\n return `${prefix} time (hour and minute)`;\n case \"second\":\n return `${prefix} time (hour, minute, and second)`;\n default:\n return `${prefix} time`;\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 // Clear both start and end values\n onPress: () => dateRangePickerState?.setValue(null),\n \"aria-label\": \"Clear input value\",\n isDisabled: isDateRangePickerDisabled,\n // Hide the button when there's no value\n style: incompleteValue ? { display: \"none\" } : undefined,\n \"aria-hidden\": incompleteValue ? true : undefined,\n },\n };\n\n /**\n * TimeInput slots\n * ================================\n */\n\n // Separate time input slots for start and end times\n const timeInputSlots = {\n startTimeInput: {\n value: startTimeValue,\n onChange: (value: TimeValue | null) => {\n if (value !== null && dateRangePickerState?.value?.start) {\n // Update the start date with the new time\n const currentValue = dateRangePickerState.value;\n const startDate = currentValue.start;\n const endDate = currentValue.end;\n if (startDate && endDate) {\n const newStartDate = startDate.set({\n hour: value.hour,\n minute: value.minute || 0,\n second: value.second || 0,\n millisecond: value.millisecond || 0,\n });\n\n dateRangePickerState.setValue({\n start: newStartDate,\n end: endDate,\n });\n }\n }\n },\n granularity: granularity === \"day\" ? undefined : granularity,\n \"aria-label\": getDefaultTimeInputAriaLabel(\"start\"),\n },\n endTimeInput: {\n value: endTimeValue,\n onChange: (value: TimeValue | null) => {\n if (value !== null && dateRangePickerState?.value?.end) {\n // Update the end date with the new time\n const currentValue = dateRangePickerState.value;\n const startDate = currentValue.start;\n const endDate = currentValue.end;\n if (startDate && endDate) {\n const newEndDate = endDate.set({\n hour: value.hour,\n minute: value.minute || 0,\n second: value.second || 0,\n millisecond: value.millisecond || 0,\n });\n\n dateRangePickerState.setValue({\n start: startDate,\n end: newEndDate,\n });\n }\n }\n },\n granularity: granularity === \"day\" ? undefined : granularity,\n \"aria-label\": getDefaultTimeInputAriaLabel(\"end\"),\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 DateRangePickerRootSlot,\n DateRangePickerGroupSlot,\n DateRangePickerTriggerSlot,\n DateRangePickerPopoverSlot,\n DateRangePickerCalendarSlot,\n} from \"./date-range-picker.slots\";\n\nimport { CalendarMonth, Close } from \"@commercetools/nimbus-icons\";\n\nimport {\n DateRangePicker as ReactAriaDateRangePicker,\n Group,\n Popover,\n Dialog,\n} from \"react-aria-components\";\nimport { useSlotRecipe } from \"@chakra-ui/react/styled-system\";\nimport { dateRangePickerSlotRecipe } from \"./date-range-picker.recipe\";\nimport type { DateRangePickerProps } from \"./date-range-picker.types\";\nimport { extractStyleProps } from \"@/utils/extractStyleProps\";\nimport { DateInput, RangeCalendar, IconButton, Text } from \"@/components\";\nimport { DateRangePickerTimeInput } from \"./components/date-range-picker.time-input\";\nimport { DateRangePickerCustomContext } from \"./components/date-range-picker.custom-context\";\n\n/**\n * DateRangePicker\n * ============================================================\n * Combines a DateInput with a RangeCalendar popover for date range selection.\n * Users can either type a date range directly or select from the calendar.\n */\nexport const DateRangePicker = (props: DateRangePickerProps) => {\n // Forward hideTimeZone and hourCycle to child components (footer time inputs)\n const { granularity = \"day\", hideTimeZone, hourCycle } = props;\n const recipe = useSlotRecipe({ recipe: dateRangePickerSlotRecipe });\n const [recipeProps, remainingProps] = recipe.splitVariantProps(props);\n\n const [styleProps, otherProps] = extractStyleProps(remainingProps);\n\n // Extract size and variant from recipe props to pass to DateInputs\n const { size = \"md\" } = recipeProps;\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 <DateRangePickerRootSlot {...recipeProps} {...styleProps} asChild>\n <ReactAriaDateRangePicker\n {...otherProps}\n shouldCloseOnSelect={shouldCloseOnSelect}\n >\n <DateRangePickerCustomContext>\n <DateRangePickerGroupSlot asChild>\n <Group>\n <DateInput\n slot=\"start\"\n size={size}\n variant=\"plain\"\n width=\"auto\"\n hideTimeZone={hideTimeZone}\n hourCycle={hourCycle}\n />\n <Text\n as=\"span\"\n px=\"150\"\n color=\"neutral.11\"\n userSelect=\"none\"\n aria-hidden=\"true\"\n slot={null}\n >\n –\n </Text>\n <DateInput\n slot=\"end\"\n size={size}\n variant=\"plain\"\n width=\"auto\"\n hideTimeZone={hideTimeZone}\n hourCycle={hourCycle}\n />\n <DateRangePickerTriggerSlot>\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 </DateRangePickerTriggerSlot>\n </Group>\n </DateRangePickerGroupSlot>\n <DateRangePickerPopoverSlot asChild>\n <Popover placement=\"bottom end\">\n <Dialog>\n <DateRangePickerCalendarSlot>\n <RangeCalendar />\n </DateRangePickerCalendarSlot>\n <DateRangePickerTimeInput\n hideTimeZone={hideTimeZone}\n hourCycle={hourCycle}\n />\n </Dialog>\n </Popover>\n </DateRangePickerPopoverSlot>\n </DateRangePickerCustomContext>\n </ReactAriaDateRangePicker>\n </DateRangePickerRootSlot>\n );\n};\n\nDateRangePicker.displayName = \"DateRangePicker\";\n"],"names":["withProvider","withContext","createSlotRecipeContext","dateRangePickerSlotRecipe","DateRangePickerRootSlot","DateRangePickerGroupSlot","DateRangePickerTriggerSlot","DateRangePickerPopoverSlot","DateRangePickerCalendarSlot","DateRangePickerTimeInput","hideTimeZone","hourCycle","locale","useLocale","dateRangePickerState","useContext","DateRangePickerStateContext","granularity","value","timeInputRef","useRef","previousValueRef","useEffect","timeoutId","container","activeElement","firstSegment","jsxs","Flex","jsx","Text","TimeInput","DateRangePickerCustomContext","children","buttonContext","useSlottedContext","ButtonContext","hasCompleteRangeDate","date","incompleteValue","startTimeValue","endTimeValue","isDateRangePickerDisabled","getDefaultTimeInputAriaLabel","type","prefix","buttonSlots","event","timeInputSlots","currentValue","startDate","endDate","newStartDate","newEndDate","Provider","TimeFieldContext","DateRangePicker","props","recipe","useSlotRecipe","recipeProps","remainingProps","styleProps","otherProps","extractStyleProps","size","overlayButtonSize","shouldCloseOnSelect","ReactAriaDateRangePicker","Group","DateInput","IconButton","Close","CalendarMonth","Popover","Dialog","RangeCalendar"],"mappings":";;;;;;;;;;;;;;;;;;;AAyBA,MAAM,EAAE,cAAAA,GAAc,aAAAC,EAAA,IAAgB,gBAAAC,EAAwB;AAAA,EAC5D,QAAQC;AACV,CAAC,GAMYC,IAA0B,gBAAAJ,EAGrC,OAAO,MAAM,GAKFK,IAA2B,gBAAAJ,EAGtC,OAAO,OAAO,GAKHK,IAA6B,gBAAAL,EAGxC,OAAO,SAAS,GAKLM,IAA6B,gBAAAN,EAGxC,OAAO,SAAS,GAKLO,IAA8B,gBAAAP,EAGzC,OAAO,UAAU,GC9DNQ,IAA2B,CAAC;AAAA,EACvC,cAAAC;AAAA,EACA,WAAAC;AACF,MAAqC;AACnC,QAAM,EAAE,QAAAC,EAAA,IAAWC,EAAA,GACbC,IAAuBC,EAAWC,CAA2B,GAC7D,EAAE,aAAAC,GAAa,OAAAC,EAAA,IAAUJ,GACzBK,IAAeC,EAAuB,IAAI,GAC1CC,IAAmBD,EAAOF,CAAK;AAGrC,SAAID,MAAgB,QACX,QAITK,EAAU,MAAM;AACd,QAAIC;AAQJ,QAJGL,GAAO,SACNG,EAA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AAA,YAACpB;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;AAEA6C,EAAgB,cAAc;"}
|
|
1
|
+
{"version":3,"file":"date-range-picker-DMgDuWt8.es.js","sources":["../../src/components/date-range-picker/date-range-picker.slots.tsx","../../src/components/date-range-picker/components/date-range-picker.time-input.tsx","../../src/components/date-range-picker/components/date-range-picker.custom-context.tsx","../../src/components/date-range-picker/date-range-picker.tsx"],"sourcesContent":["import {\n type HTMLChakraProps,\n type RecipeProps,\n type UnstyledProp,\n createSlotRecipeContext,\n} from \"@chakra-ui/react/styled-system\";\n\nimport { dateRangePickerSlotRecipe } from \"./date-range-picker.recipe\";\n\n/**\n * Base recipe props interface that combines Chakra UI's recipe props\n * with the unstyled prop option for the div element.\n */\ninterface DateRangePickerRecipeProps extends RecipeProps<\"div\">, UnstyledProp {}\n\n/**\n * Root props interface that extends Chakra's HTML props with our recipe props.\n * This creates a complete set of props for the root element, combining\n * HTML attributes, Chakra's styling system, and our custom recipe props.\n */\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport interface DateRangePickerRootProps\n extends HTMLChakraProps<\"div\", DateRangePickerRecipeProps> {}\n\n// Correctly destructure from createSlotRecipeContext based on project examples\nconst { withProvider, withContext } = createSlotRecipeContext({\n recipe: dateRangePickerSlotRecipe,\n});\n\n/**\n * Root component that provides the styling context for the DateRangePicker component.\n * Uses Chakra UI's recipe context system for consistent styling across instances.\n */\nexport const DateRangePickerRootSlot = withProvider<\n HTMLDivElement,\n DateRangePickerRootProps\n>(\"div\", \"root\");\n\n/**\n * Slot component for the input group containing the DateInput and trigger button.\n */\nexport const DateRangePickerGroupSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"group\");\n\n/**\n * Slot component for the trigger button that opens the calendar popover.\n */\nexport const DateRangePickerTriggerSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"trigger\");\n\n/**\n * Slot component for the popover container.\n */\nexport const DateRangePickerPopoverSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"popover\");\n\n/**\n * Slot component for the calendar container within the popover.\n */\nexport const DateRangePickerCalendarSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"calendar\");\n\n/**\n * Slot component for the calendar header.\n */\nexport const DateRangePickerCalendarHeaderSlot = withContext<\n HTMLElement,\n HTMLChakraProps<\"header\">\n>(\"header\", \"calendarHeader\");\n\n/**\n * Slot component for the calendar grid.\n */\nexport const DateRangePickerCalendarGridSlot = withContext<\n HTMLTableElement,\n HTMLChakraProps<\"table\">\n>(\"table\", \"calendarGrid\");\n\n/**\n * Slot component for individual calendar cells.\n */\nexport const DateRangePickerCalendarCellSlot = withContext<\n HTMLTableCellElement,\n HTMLChakraProps<\"td\">\n>(\"td\", \"calendarCell\");\n","import { Flex, Text, TimeInput } from \"@/components\";\nimport { useContext, useRef, useEffect } from \"react\";\nimport { useLocale } from \"react-aria\";\nimport { DateRangePickerStateContext } from \"react-aria-components\";\nimport type { DateRangePickerTimeInputProps } from \"../date-range-picker.types\";\n\nexport const DateRangePickerTimeInput = ({\n hideTimeZone,\n hourCycle,\n}: DateRangePickerTimeInputProps) => {\n const { locale } = useLocale();\n const dateRangePickerState = useContext(DateRangePickerStateContext);\n const { granularity, value } = dateRangePickerState!;\n const timeInputRef = useRef<HTMLDivElement>(null);\n const previousValueRef = useRef(value);\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 range changes (user selects dates from calendar)\n useEffect(() => {\n let timeoutId: ReturnType<typeof setTimeout> | undefined;\n\n // Check if date range changed by comparing start and end dates\n const hasValueChanged =\n (value?.start &&\n previousValueRef.current?.start?.compare(value.start) !== 0) ||\n (value?.end && previousValueRef.current?.end?.compare(value.end) !== 0);\n\n if (hasValueChanged) {\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\n if (firstSegment) {\n firstSegment.focus();\n }\n }\n }, 50);\n }\n }\n\n previousValueRef.current = value;\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 }, [value]);\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 {/* Start DateInput with separate label */}\n <Flex alignItems=\"center\" gap=\"200\">\n {/* TODO: translate hardcoded string */}\n <Text\n textStyle=\"xs\"\n fontWeight=\"500\"\n color=\"neutral.12\"\n minWidth=\"fit-content\"\n >\n Start time\n </Text>\n <TimeInput\n slot=\"startTimeInput\"\n locale={locale}\n variant=\"ghost\"\n size=\"sm\"\n hideTimeZone={hideTimeZone}\n hourCycle={hourCycle}\n />\n </Flex>\n\n {/* End DateInput with separate label */}\n <Flex alignItems=\"center\" gap=\"200\">\n {/* TODO: translate hardcoded string */}\n <Text\n textStyle=\"xs\"\n fontWeight=\"500\"\n color=\"neutral.12\"\n minWidth=\"fit-content\"\n >\n End time\n </Text>\n <TimeInput\n slot=\"endTimeInput\"\n locale={locale}\n variant=\"ghost\"\n size=\"sm\"\n hideTimeZone={hideTimeZone}\n hourCycle={hourCycle}\n />\n </Flex>\n </Flex>\n );\n};\n","import { useContext, type ReactNode } from \"react\";\nimport {\n Provider,\n ButtonContext,\n DateRangePickerStateContext,\n TimeFieldContext,\n useSlottedContext,\n} from \"react-aria-components\";\nimport type { PressEvent, TimeValue } from \"react-aria\";\n\nexport const DateRangePickerCustomContext = ({\n children,\n}: {\n children: ReactNode;\n}) => {\n const buttonContext = useSlottedContext(ButtonContext) || {};\n const dateRangePickerState = useContext(DateRangePickerStateContext);\n\n // Check if all 6 segments (start: day, month, year; end: day, month, year) have values\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const hasCompleteRangeDate = (date: any) =>\n date?.day && date?.month && date?.year;\n\n const incompleteValue =\n !dateRangePickerState?.value ||\n !hasCompleteRangeDate(dateRangePickerState.value.start) ||\n !hasCompleteRangeDate(dateRangePickerState.value.end);\n\n const { granularity } = dateRangePickerState!;\n\n // Extract time values from start and end dates separately\n const startTimeValue =\n dateRangePickerState?.value?.start &&\n \"hour\" in dateRangePickerState.value.start\n ? dateRangePickerState.value.start\n : null;\n const endTimeValue =\n dateRangePickerState?.value?.end && \"hour\" in dateRangePickerState.value.end\n ? dateRangePickerState.value.end\n : null;\n\n // Try to get disabled state from the button context\n const isDateRangePickerDisabled = buttonContext?.isDisabled;\n\n // Generate default aria-label based on granularity if not provided\n const getDefaultTimeInputAriaLabel = (type: \"start\" | \"end\") => {\n const prefix = type === \"start\" ? \"Start\" : \"End\";\n switch (granularity) {\n case \"hour\":\n return `${prefix} time (hour)`;\n case \"minute\":\n return `${prefix} time (hour and minute)`;\n case \"second\":\n return `${prefix} time (hour, minute, and second)`;\n default:\n return `${prefix} time`;\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 // Clear both start and end values\n onPress: () => dateRangePickerState?.setValue(null),\n \"aria-label\": \"Clear input value\",\n isDisabled: isDateRangePickerDisabled,\n // Hide the button when there's no value\n style: incompleteValue ? { display: \"none\" } : undefined,\n \"aria-hidden\": incompleteValue ? true : undefined,\n },\n };\n\n /**\n * TimeInput slots\n * ================================\n */\n\n // Separate time input slots for start and end times\n const timeInputSlots = {\n startTimeInput: {\n value: startTimeValue,\n onChange: (value: TimeValue | null) => {\n if (value !== null && dateRangePickerState?.value?.start) {\n // Update the start date with the new time\n const currentValue = dateRangePickerState.value;\n const startDate = currentValue.start;\n const endDate = currentValue.end;\n if (startDate && endDate) {\n const newStartDate = startDate.set({\n hour: value.hour,\n minute: value.minute || 0,\n second: value.second || 0,\n millisecond: value.millisecond || 0,\n });\n\n dateRangePickerState.setValue({\n start: newStartDate,\n end: endDate,\n });\n }\n }\n },\n granularity: granularity === \"day\" ? undefined : granularity,\n \"aria-label\": getDefaultTimeInputAriaLabel(\"start\"),\n },\n endTimeInput: {\n value: endTimeValue,\n onChange: (value: TimeValue | null) => {\n if (value !== null && dateRangePickerState?.value?.end) {\n // Update the end date with the new time\n const currentValue = dateRangePickerState.value;\n const startDate = currentValue.start;\n const endDate = currentValue.end;\n if (startDate && endDate) {\n const newEndDate = endDate.set({\n hour: value.hour,\n minute: value.minute || 0,\n second: value.second || 0,\n millisecond: value.millisecond || 0,\n });\n\n dateRangePickerState.setValue({\n start: startDate,\n end: newEndDate,\n });\n }\n }\n },\n granularity: granularity === \"day\" ? undefined : granularity,\n \"aria-label\": getDefaultTimeInputAriaLabel(\"end\"),\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 DateRangePickerRootSlot,\n DateRangePickerGroupSlot,\n DateRangePickerTriggerSlot,\n DateRangePickerPopoverSlot,\n DateRangePickerCalendarSlot,\n} from \"./date-range-picker.slots\";\n\nimport { CalendarMonth, Close } from \"@commercetools/nimbus-icons\";\n\nimport {\n DateRangePicker as ReactAriaDateRangePicker,\n Group,\n Popover,\n Dialog,\n} from \"react-aria-components\";\nimport { useSlotRecipe } from \"@chakra-ui/react/styled-system\";\nimport { dateRangePickerSlotRecipe } from \"./date-range-picker.recipe\";\nimport type { DateRangePickerProps } from \"./date-range-picker.types\";\nimport { extractStyleProps } from \"@/utils/extractStyleProps\";\nimport { DateInput, RangeCalendar, IconButton, Text } from \"@/components\";\nimport { DateRangePickerTimeInput } from \"./components/date-range-picker.time-input\";\nimport { DateRangePickerCustomContext } from \"./components/date-range-picker.custom-context\";\n\n/**\n * DateRangePicker\n * ============================================================\n * Combines a DateInput with a RangeCalendar popover for date range selection.\n * Users can either type a date range directly or select from the calendar.\n */\nexport const DateRangePicker = (props: DateRangePickerProps) => {\n // Forward hideTimeZone and hourCycle to child components (footer time inputs)\n const { granularity = \"day\", hideTimeZone, hourCycle } = props;\n const recipe = useSlotRecipe({ recipe: dateRangePickerSlotRecipe });\n const [recipeProps, remainingProps] = recipe.splitVariantProps(props);\n\n const [styleProps, otherProps] = extractStyleProps(remainingProps);\n\n // Extract size and variant from recipe props to pass to DateInputs\n const { size = \"md\" } = recipeProps;\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 <DateRangePickerRootSlot {...recipeProps} {...styleProps} asChild>\n <ReactAriaDateRangePicker\n {...otherProps}\n shouldCloseOnSelect={shouldCloseOnSelect}\n >\n <DateRangePickerCustomContext>\n <DateRangePickerGroupSlot asChild>\n <Group>\n <DateInput\n slot=\"start\"\n size={size}\n variant=\"plain\"\n width=\"auto\"\n hideTimeZone={hideTimeZone}\n hourCycle={hourCycle}\n />\n <Text\n as=\"span\"\n px=\"150\"\n color=\"neutral.11\"\n userSelect=\"none\"\n aria-hidden=\"true\"\n slot={null}\n >\n –\n </Text>\n <DateInput\n slot=\"end\"\n size={size}\n variant=\"plain\"\n width=\"auto\"\n hideTimeZone={hideTimeZone}\n hourCycle={hourCycle}\n />\n <DateRangePickerTriggerSlot>\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 </DateRangePickerTriggerSlot>\n </Group>\n </DateRangePickerGroupSlot>\n <DateRangePickerPopoverSlot asChild>\n <Popover placement=\"bottom end\">\n <Dialog>\n <DateRangePickerCalendarSlot>\n <RangeCalendar />\n </DateRangePickerCalendarSlot>\n <DateRangePickerTimeInput\n hideTimeZone={hideTimeZone}\n hourCycle={hourCycle}\n />\n </Dialog>\n </Popover>\n </DateRangePickerPopoverSlot>\n </DateRangePickerCustomContext>\n </ReactAriaDateRangePicker>\n </DateRangePickerRootSlot>\n );\n};\n\nDateRangePicker.displayName = \"DateRangePicker\";\n"],"names":["withProvider","withContext","createSlotRecipeContext","dateRangePickerSlotRecipe","DateRangePickerRootSlot","DateRangePickerGroupSlot","DateRangePickerTriggerSlot","DateRangePickerPopoverSlot","DateRangePickerCalendarSlot","DateRangePickerTimeInput","hideTimeZone","hourCycle","locale","useLocale","dateRangePickerState","useContext","DateRangePickerStateContext","granularity","value","timeInputRef","useRef","previousValueRef","useEffect","timeoutId","container","activeElement","firstSegment","jsxs","Flex","jsx","Text","TimeInput","DateRangePickerCustomContext","children","buttonContext","useSlottedContext","ButtonContext","hasCompleteRangeDate","date","incompleteValue","startTimeValue","endTimeValue","isDateRangePickerDisabled","getDefaultTimeInputAriaLabel","type","prefix","buttonSlots","event","timeInputSlots","currentValue","startDate","endDate","newStartDate","newEndDate","Provider","TimeFieldContext","DateRangePicker","props","recipe","useSlotRecipe","recipeProps","remainingProps","styleProps","otherProps","extractStyleProps","size","overlayButtonSize","shouldCloseOnSelect","ReactAriaDateRangePicker","Group","DateInput","IconButton","Close","CalendarMonth","Popover","Dialog","RangeCalendar"],"mappings":";;;;;;;;;;;;;;;;;;;AAyBA,MAAM,EAAE,cAAAA,GAAc,aAAAC,EAAA,IAAgB,gBAAAC,EAAwB;AAAA,EAC5D,QAAQC;AACV,CAAC,GAMYC,IAA0B,gBAAAJ,EAGrC,OAAO,MAAM,GAKFK,IAA2B,gBAAAJ,EAGtC,OAAO,OAAO,GAKHK,IAA6B,gBAAAL,EAGxC,OAAO,SAAS,GAKLM,IAA6B,gBAAAN,EAGxC,OAAO,SAAS,GAKLO,IAA8B,gBAAAP,EAGzC,OAAO,UAAU,GC9DNQ,IAA2B,CAAC;AAAA,EACvC,cAAAC;AAAA,EACA,WAAAC;AACF,MAAqC;AACnC,QAAM,EAAE,QAAAC,EAAA,IAAWC,EAAA,GACbC,IAAuBC,EAAWC,CAA2B,GAC7D,EAAE,aAAAC,GAAa,OAAAC,EAAA,IAAUJ,GACzBK,IAAeC,EAAuB,IAAI,GAC1CC,IAAmBD,EAAOF,CAAK;AAGrC,SAAID,MAAgB,QACX,QAITK,EAAU,MAAM;AACd,QAAIC;AAQJ,QAJGL,GAAO,SACNG,EAAiB,SAAS,OAAO,QAAQH,EAAM,KAAK,MAAM,KAC3DA,GAAO,OAAOG,EAAiB,SAAS,KAAK,QAAQH,EAAM,GAAG,MAAM,GAElD;AAGnB,YAAMM,IAAYL,EAAa,SACzBM,IAAgB,SAAS;AAK/B,MAHED,GAAW,SAASC,CAAa,KACjCA,GAAe,aAAa,MAAM,MAAM,iBAIxCF,IAAY,WAA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
-
import { b as d } from "./useFocusVisible-
|
|
2
|
-
import { a as c, d as r } from "./utils-
|
|
1
|
+
import { b as d } from "./useFocusVisible-CWDaG0ze.es.js";
|
|
2
|
+
import { a as c, d as r } from "./utils-jpfA6kxk.es.js";
|
|
3
3
|
import { $ as a } from "./focusWithoutScrolling-CDw3JYiq.es.js";
|
|
4
4
|
let t = /* @__PURE__ */ new Map(), f = /* @__PURE__ */ new Set();
|
|
5
5
|
function s() {
|
|
@@ -24,4 +24,4 @@ export {
|
|
|
24
24
|
p as $,
|
|
25
25
|
b as a
|
|
26
26
|
};
|
|
27
|
-
//# sourceMappingURL=focusSafely-
|
|
27
|
+
//# sourceMappingURL=focusSafely-DJpphVHF.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"focusSafely-
|
|
1
|
+
{"version":3,"file":"focusSafely-DJpphVHF.es.js","sources":["../../../../node_modules/.pnpm/@react-aria+utils@3.30.1_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@react-aria/utils/dist/runAfterTransition.mjs","../../../../node_modules/.pnpm/@react-aria+interactions@3.25.5_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@react-aria/interactions/dist/focusSafely.mjs"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ // We store a global list of elements that are currently transitioning,\n// mapped to a set of CSS properties that are transitioning for that element.\n// This is necessary rather than a simple count of transitions because of browser\n// bugs, e.g. Chrome sometimes fires both transitionend and transitioncancel rather\n// than one or the other. So we need to track what's actually transitioning so that\n// we can ignore these duplicate events.\nlet $bbed8b41f857bcc0$var$transitionsByElement = new Map();\n// A list of callbacks to call once there are no transitioning elements.\nlet $bbed8b41f857bcc0$var$transitionCallbacks = new Set();\nfunction $bbed8b41f857bcc0$var$setupGlobalEvents() {\n if (typeof window === 'undefined') return;\n function isTransitionEvent(event) {\n return 'propertyName' in event;\n }\n let onTransitionStart = (e)=>{\n if (!isTransitionEvent(e) || !e.target) return;\n // Add the transitioning property to the list for this element.\n let transitions = $bbed8b41f857bcc0$var$transitionsByElement.get(e.target);\n if (!transitions) {\n transitions = new Set();\n $bbed8b41f857bcc0$var$transitionsByElement.set(e.target, transitions);\n // The transitioncancel event must be registered on the element itself, rather than as a global\n // event. This enables us to handle when the node is deleted from the document while it is transitioning.\n // In that case, the cancel event would have nowhere to bubble to so we need to handle it directly.\n e.target.addEventListener('transitioncancel', onTransitionEnd, {\n once: true\n });\n }\n transitions.add(e.propertyName);\n };\n let onTransitionEnd = (e)=>{\n if (!isTransitionEvent(e) || !e.target) return;\n // Remove property from list of transitioning properties.\n let properties = $bbed8b41f857bcc0$var$transitionsByElement.get(e.target);\n if (!properties) return;\n properties.delete(e.propertyName);\n // If empty, remove transitioncancel event, and remove the element from the list of transitioning elements.\n if (properties.size === 0) {\n e.target.removeEventListener('transitioncancel', onTransitionEnd);\n $bbed8b41f857bcc0$var$transitionsByElement.delete(e.target);\n }\n // If no transitioning elements, call all of the queued callbacks.\n if ($bbed8b41f857bcc0$var$transitionsByElement.size === 0) {\n for (let cb of $bbed8b41f857bcc0$var$transitionCallbacks)cb();\n $bbed8b41f857bcc0$var$transitionCallbacks.clear();\n }\n };\n document.body.addEventListener('transitionrun', onTransitionStart);\n document.body.addEventListener('transitionend', onTransitionEnd);\n}\nif (typeof document !== 'undefined') {\n if (document.readyState !== 'loading') $bbed8b41f857bcc0$var$setupGlobalEvents();\n else document.addEventListener('DOMContentLoaded', $bbed8b41f857bcc0$var$setupGlobalEvents);\n}\n/**\n * Cleans up any elements that are no longer in the document.\n * This is necessary because we can't rely on transitionend events to fire\n * for elements that are removed from the document while transitioning.\n */ function $bbed8b41f857bcc0$var$cleanupDetachedElements() {\n for (const [eventTarget] of $bbed8b41f857bcc0$var$transitionsByElement)// Similar to `eventTarget instanceof Element && !eventTarget.isConnected`, but avoids\n // the explicit instanceof check, since it may be different in different contexts.\n if ('isConnected' in eventTarget && !eventTarget.isConnected) $bbed8b41f857bcc0$var$transitionsByElement.delete(eventTarget);\n}\nfunction $bbed8b41f857bcc0$export$24490316f764c430(fn) {\n // Wait one frame to see if an animation starts, e.g. a transition on mount.\n requestAnimationFrame(()=>{\n $bbed8b41f857bcc0$var$cleanupDetachedElements();\n // If no transitions are running, call the function immediately.\n // Otherwise, add it to a list of callbacks to run at the end of the animation.\n if ($bbed8b41f857bcc0$var$transitionsByElement.size === 0) fn();\n else $bbed8b41f857bcc0$var$transitionCallbacks.add(fn);\n });\n}\n\n\nexport {$bbed8b41f857bcc0$export$24490316f764c430 as runAfterTransition};\n//# sourceMappingURL=runAfterTransition.module.js.map\n","import {getInteractionModality as $507fabe10e71c6fb$export$630ff653c5ada6a9} from \"./useFocusVisible.mjs\";\nimport {getOwnerDocument as $k50bp$getOwnerDocument, getActiveElement as $k50bp$getActiveElement, runAfterTransition as $k50bp$runAfterTransition, focusWithoutScrolling as $k50bp$focusWithoutScrolling} from \"@react-aria/utils\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the 'License');\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\nfunction $3ad3f6e1647bc98d$export$80f3e147d781571c(element) {\n // If the user is interacting with a virtual cursor, e.g. screen reader, then\n // wait until after any animated transitions that are currently occurring on\n // the page before shifting focus. This avoids issues with VoiceOver on iOS\n // causing the page to scroll when moving focus if the element is transitioning\n // from off the screen.\n const ownerDocument = (0, $k50bp$getOwnerDocument)(element);\n const activeElement = (0, $k50bp$getActiveElement)(ownerDocument);\n if ((0, $507fabe10e71c6fb$export$630ff653c5ada6a9)() === 'virtual') {\n let lastFocusedElement = activeElement;\n (0, $k50bp$runAfterTransition)(()=>{\n // If focus did not move and the element is still in the document, focus it.\n if ((0, $k50bp$getActiveElement)(ownerDocument) === lastFocusedElement && element.isConnected) (0, $k50bp$focusWithoutScrolling)(element);\n });\n } else (0, $k50bp$focusWithoutScrolling)(element);\n}\n\n\nexport {$3ad3f6e1647bc98d$export$80f3e147d781571c as focusSafely};\n//# sourceMappingURL=focusSafely.module.js.map\n"],"names":["$bbed8b41f857bcc0$var$transitionsByElement","$bbed8b41f857bcc0$var$transitionCallbacks","$bbed8b41f857bcc0$var$cleanupDetachedElements","eventTarget","$bbed8b41f857bcc0$export$24490316f764c430","fn","$3ad3f6e1647bc98d$export$80f3e147d781571c","element","ownerDocument","$k50bp$getOwnerDocument","activeElement","$k50bp$getActiveElement","$507fabe10e71c6fb$export$630ff653c5ada6a9","lastFocusedElement","$k50bp$runAfterTransition","$k50bp$focusWithoutScrolling"],"mappings":";;;AAgBA,IAAIA,IAA6C,oBAAI,IAAG,GAEpDC,IAA4C,oBAAI,IAAG;AAkDnD,SAASC,IAAgD;AACzD,aAAW,CAACC,CAAW,KAAKH;AAE5B,IAAI,iBAAiBG,KAAe,CAACA,EAAY,eAAaH,EAA2C,OAAOG,CAAW;AAC/H;AACA,SAASC,EAA0CC,GAAI;AAEnD,wBAAsB,MAAI;AACtB,IAAAH,EAA6C,GAGzCF,EAA2C,SAAS,IAAGK,EAAE,IACxDJ,EAA0C,IAAII,CAAE;AAAA,EACzD,CAAC;AACL;ACnEA,SAASC,EAA0CC,GAAS;AAMxD,QAAMC,IAAoBC,EAAyBF,CAAO,GACpDG,IAAoBC,EAAyBH,CAAa;AAChE,MAAQI,EAAyC,MAAQ,WAAW;AAChE,QAAIC,IAAqBH;AACzB,IAAII,EAA2B,MAAI;AAE/B,MAAQH,EAAyBH,CAAa,MAAMK,KAAsBN,EAAQ,eAAiBQ,EAA8BR,CAAO;AAAA,IAC5I,CAAC;AAAA,EACL,MAAO,CAAIQ,EAA8BR,CAAO;AACpD;","x_google_ignoreList":[0,1]}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as l, jsxs as c } from "react/jsx-runtime";
|
|
2
2
|
import { createContext as z, forwardRef as $, useState as P, useEffect as n, Children as w, isValidElement as A, cloneElement as E, useContext as d } from "react";
|
|
3
3
|
import { defineSlotRecipe as H, createSlotRecipeContext as y } from "@chakra-ui/react/styled-system";
|
|
4
|
-
import { e as B, $ as L, a as I } from "./Dialog-
|
|
4
|
+
import { e as B, $ as L, a as I } from "./Dialog-BH-H4BEe.es.js";
|
|
5
5
|
import { B as m } from "./box-DuBoAZvq.es.js";
|
|
6
|
-
import { I as M } from "./icon-button-
|
|
6
|
+
import { I as M } from "./icon-button-BucXZ7sA.es.js";
|
|
7
7
|
import { HelpOutline as R, ErrorOutline as T } from "@commercetools/nimbus-icons";
|
|
8
|
-
import { $ as W } from "./useField-
|
|
8
|
+
import { $ as W } from "./useField-Ce9zQxmx.es.js";
|
|
9
9
|
const a = /* @__PURE__ */ z({
|
|
10
10
|
context: {
|
|
11
11
|
label: null,
|
|
@@ -306,4 +306,4 @@ export {
|
|
|
306
306
|
Z as e,
|
|
307
307
|
q as f
|
|
308
308
|
};
|
|
309
|
-
//# sourceMappingURL=form-field-
|
|
309
|
+
//# sourceMappingURL=form-field-CkKl1C4M.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-field-DbrBkvlM.es.js","sources":["../../src/components/form-field/components/form-field.context.tsx","../../src/components/form-field/form-field.recipe.tsx","../../src/components/form-field/form-field.slots.tsx","../../src/components/form-field/components/form-field.root.tsx","../../src/components/form-field/components/form-field.label.tsx","../../src/components/form-field/components/form-field.input.tsx","../../src/components/form-field/components/form-field.description.tsx","../../src/components/form-field/components/form-field.error.tsx","../../src/components/form-field/components/form-field.info-box.tsx","../../src/components/form-field/form-field.tsx"],"sourcesContent":["import { createContext, type ReactNode } from \"react\";\nimport type {\n FormFieldDescriptionSlotProps,\n FormFieldErrorSlotProps,\n FormFieldInputSlotProps,\n FormFieldLabelSlotProps,\n} from \"../form-field.slots\";\n\nexport type FormFieldContextPayloadType = {\n label: ReactNode;\n labelSlotProps?: FormFieldLabelSlotProps;\n input: ReactNode;\n inputSlotProps?: FormFieldInputSlotProps;\n description: ReactNode;\n descriptionSlotProps?: FormFieldDescriptionSlotProps;\n error: ReactNode;\n errorSlotProps?: FormFieldErrorSlotProps;\n info: ReactNode;\n isInvalid?: boolean;\n isRequired?: boolean;\n isDisabled?: boolean;\n isReadOnly?: boolean;\n};\n\nexport type FormFieldContextType = {\n context: FormFieldContextPayloadType;\n setContext: React.Dispatch<React.SetStateAction<FormFieldContextPayloadType>>;\n};\n\nexport const FormFieldContext = createContext<FormFieldContextType>({\n context: {\n label: null,\n description: null,\n error: null,\n info: null,\n input: null,\n },\n setContext: () => {},\n});\n","import { defineSlotRecipe } from \"@chakra-ui/react/styled-system\";\n\nconst columnLayout = `\n\"label\"\n\"input\"\n\"description\"\n\"error\"\n`;\nconst rowLayout = `\n\"label input\"\n\"label description\"\n\"label error\"\n`;\n\n/**\n * Recipe configuration for the FormField component.\n * Defines the styling variants and base styles using Chakra UI's recipe system.\n */\nexport const formFieldRecipe = defineSlotRecipe({\n slots: [\"root\", \"label\", \"input\", \"description\", \"error\", \"popover\"],\n // Unique class name prefix for the component\n className: \"nimbus-ui-form-field\",\n\n base: {\n root: {\n \"--grid-gap\": \"spacing.100\",\n\n display: \"grid\",\n width: \"auto\",\n },\n label: {\n gridArea: \"label\",\n fontWeight: \"500\",\n color: \"neutral.11\",\n fontSize: \"var(--form-field-font-size)\",\n lineHeight: \"var(--form-field-line-height)\",\n },\n input: {\n gridArea: \"input\",\n },\n description: {\n gridArea: \"description\",\n color: \"neutral.11\",\n fontSize: \"var(--form-field-font-size)\",\n lineHeight: \"var(--form-field-line-height)\",\n },\n error: {\n gridArea: \"error\",\n color: \"critical.11\",\n fontSize: \"var(--form-field-font-size)\",\n lineHeight: \"var(--form-field-line-height)\",\n },\n popover: {\n \"--scrollbar-color\": \"colors.neutral.8\",\n \"--scrollbar-bg\": \"colors.neutral.3\",\n bg: \"neutral.1\",\n maxWidth: \"xl\",\n borderRadius: \"200\",\n boxShadow: \"6\",\n border: \"solid-25\",\n borderColor: \"neutral.8\",\n maxHeight: \"40svh\",\n overflow: \"auto\",\n scrollbarWidth: \"thin\",\n scrollbarColor: \"var(--scrollbar-color) var(--scrollbar-bg)\",\n focusRing: \"outside\",\n },\n },\n\n variants: {\n size: {\n md: {\n root: {\n \"--form-field-font-size\": \"fontSizes.350\",\n \"--form-field-line-height\": \"lineHeights.500\",\n },\n },\n sm: {\n root: {\n \"--form-field-font-size\": \"fontSizes.300\",\n \"--form-field-line-height\": \"lineHeights.450\",\n },\n },\n },\n direction: {\n column: {\n root: {\n gridTemplateAreas: columnLayout,\n },\n input: {\n mt: \"var(--grid-gap)\",\n },\n description: {\n mt: \"var(--grid-gap)\",\n },\n error: {\n mt: \"var(--grid-gap)\",\n },\n },\n row: {\n root: {\n gridTemplateAreas: rowLayout,\n gridTemplateColumns: \"auto 1fr\",\n gridColumnGap: \"200\",\n },\n description: {\n mt: \"var(--grid-gap)\",\n },\n error: {\n mt: \"var(--grid-gap)\",\n },\n },\n },\n },\n\n // Default variant values when not explicitly specified\n defaultVariants: {\n direction: \"column\",\n size: \"md\",\n },\n});\n","/* eslint-disable @typescript-eslint/no-empty-object-type */\nimport {\n type HTMLChakraProps,\n type RecipeVariantProps,\n type UnstyledProp,\n createSlotRecipeContext,\n} from \"@chakra-ui/react/styled-system\";\n\nimport { formFieldRecipe } from \"./form-field.recipe\";\n\nconst { withProvider, withContext } = createSlotRecipeContext({\n recipe: formFieldRecipe,\n});\n\n// Root slot\nexport interface FormFieldRootSlotProps\n extends HTMLChakraProps<\n \"div\",\n RecipeVariantProps<typeof formFieldRecipe> & UnstyledProp\n > {}\n\nexport const FormFieldRootSlot = withProvider<\n HTMLDivElement,\n FormFieldRootSlotProps\n>(\"div\", \"root\");\n\n// Label Slot\nexport interface FormFieldLabelSlotProps extends HTMLChakraProps<\"div\"> {}\nexport const FormFieldLabelSlot = withContext<\n HTMLDivElement,\n FormFieldLabelSlotProps\n>(\"div\", \"label\");\n\n// Input Slot\nexport interface FormFieldInputSlotProps extends HTMLChakraProps<\"div\"> {}\nexport const FormFieldInputSlot = withContext<\n HTMLDivElement,\n FormFieldInputSlotProps\n>(\"div\", \"input\");\n\n// Description Slot\nexport interface FormFieldDescriptionSlotProps extends HTMLChakraProps<\"div\"> {}\nexport const FormFieldDescriptionSlot = withContext<\n HTMLDivElement,\n FormFieldDescriptionSlotProps\n>(\"div\", \"description\");\n\n// Error Slot\nexport interface FormFieldErrorSlotProps extends HTMLChakraProps<\"div\"> {}\nexport const FormFieldErrorSlot = withContext<\n HTMLDivElement,\n FormFieldErrorSlotProps\n>(\"div\", \"error\");\n\n// Error Slot\nexport interface FormFieldPopoverSlotProps extends HTMLChakraProps<\"div\"> {}\nexport const FormFieldPopoverSlot = withContext<\n HTMLDivElement,\n FormFieldPopoverSlotProps\n>(\"div\", \"popover\");\n","import {\n Children,\n cloneElement,\n forwardRef,\n isValidElement,\n useEffect,\n useState,\n} from \"react\";\nimport type { FormFieldProps } from \"../form-field.types\";\nimport { useField } from \"react-aria\";\nimport {\n FormFieldContext,\n type FormFieldContextPayloadType,\n} from \"./form-field.context\";\nimport {\n FormFieldDescriptionSlot,\n FormFieldErrorSlot,\n FormFieldInputSlot,\n FormFieldLabelSlot,\n FormFieldPopoverSlot,\n FormFieldRootSlot,\n} from \"../form-field.slots\";\nimport { Dialog, DialogTrigger, Popover } from \"react-aria-components\";\nimport { Box, IconButton } from \"@/components\";\nimport { ErrorOutline, HelpOutline } from \"@commercetools/nimbus-icons\";\n\n/**\n * # FormField\n *\n * displays miscellaneous inputs in a FormField context\n *\n * @see {@link https://nimbus-documentation.vercel.app/components/inputs/formfield}\n */\nexport const FormFieldRoot = forwardRef<HTMLDivElement, FormFieldProps>(\n (\n { isInvalid, isRequired, isDisabled, isReadOnly, children, ...props },\n ref\n ) => {\n const [context, setContext] = useState<FormFieldContextPayloadType>({\n label: null,\n description: null,\n error: null,\n info: null,\n input: null,\n isInvalid,\n isRequired,\n isDisabled,\n isReadOnly,\n });\n\n const useFieldArgs: Parameters<typeof useField>[0] = {\n description: context.description,\n errorMessage: context.error,\n };\n\n if (context.label) {\n useFieldArgs.label = context.label;\n } else {\n // Context will always start out null, so we need to stub out some aria attributes\n // FIXME: This is a hack to get the form field to work, but it's not the best solution\n // FIXME: We should find a better way to handle this by redesigning the FormField component's structure\n useFieldArgs[\"aria-label\"] = \"empty-label\";\n useFieldArgs[\"aria-labelledby\"] = \"empty-label\";\n }\n\n const { labelProps, fieldProps, descriptionProps, errorMessageProps } =\n useField(useFieldArgs);\n\n useEffect(() => {\n setContext((prevContext) => ({\n ...prevContext,\n isInvalid,\n isRequired,\n isDisabled,\n isReadOnly,\n }));\n }, [isInvalid, isRequired, isDisabled, isReadOnly]);\n\n const inputProps = {\n ...fieldProps,\n isInvalid,\n isRequired,\n isDisabled,\n isReadOnly,\n };\n\n return (\n <FormFieldContext.Provider value={{ context, setContext }}>\n <FormFieldRootSlot ref={ref} {...props}>\n {context.label && (\n <FormFieldLabelSlot {...context.labelSlotProps}>\n <label {...labelProps}>\n {context.label}\n {isRequired && <sup aria-hidden=\"true\">*</sup>}\n </label>\n {context.info && (\n <DialogTrigger>\n <Box\n as=\"span\"\n display=\"inline-block\"\n position=\"relative\"\n width=\"1ch\"\n height=\"1ch\"\n ml=\"200\"\n >\n <Box\n as=\"span\"\n display=\"inline-flex\"\n position=\"absolute\"\n top=\"50%\"\n right=\"50%\"\n transform=\"translate(50%, -50%)\"\n >\n <IconButton\n aria-label=\"__MORE INFO\"\n size=\"2xs\"\n tone=\"info\"\n variant=\"link\"\n >\n <HelpOutline />\n </IconButton>\n </Box>\n </Box>\n <Popover>\n <FormFieldPopoverSlot asChild>\n <Dialog>\n <Box p=\"300\">{context.info}</Box>\n </Dialog>\n </FormFieldPopoverSlot>\n </Popover>\n </DialogTrigger>\n )}\n </FormFieldLabelSlot>\n )}\n {context.input && (\n <FormFieldInputSlot {...context.inputSlotProps}>\n {Children.map(context.input, (child) => {\n // Important: Check if the child is a valid React element before cloning.\n if (isValidElement(child)) {\n return cloneElement(child, inputProps);\n }\n // If it's not a valid element (e.g., text node, null, undefined), return it as is.\n return child;\n })}\n </FormFieldInputSlot>\n )}\n {context.description && (\n <FormFieldDescriptionSlot\n {...descriptionProps}\n {...context.descriptionSlotProps}\n >\n {context.description}\n </FormFieldDescriptionSlot>\n )}\n {isInvalid && context.error && (\n <FormFieldErrorSlot\n {...errorMessageProps}\n {...context.errorSlotProps}\n >\n <Box\n as={ErrorOutline}\n display=\"inline-flex\"\n boxSize=\"400\"\n verticalAlign=\"text-bottom\"\n mr=\"100\"\n />\n {context.error}\n </FormFieldErrorSlot>\n )}\n {children}\n </FormFieldRootSlot>\n </FormFieldContext.Provider>\n );\n }\n);\n","import { useContext, useEffect } from \"react\";\nimport { FormFieldContext } from \"./form-field.context\";\nimport type { FormFieldLabelSlotProps } from \"../form-field.slots\";\n\nexport const FormFieldLabel = ({\n children,\n ...labelSlotProps\n}: FormFieldLabelSlotProps) => {\n const { setContext } = useContext(FormFieldContext);\n\n useEffect(() => {\n setContext((prevContext) => ({\n ...prevContext,\n label: children,\n labelSlotProps,\n }));\n }, [children, setContext]);\n\n return null;\n};\n","import { useContext, useEffect } from \"react\";\nimport { FormFieldContext } from \"./form-field.context\";\nimport type { FormFieldInputSlotProps } from \"../form-field.slots\";\n\nexport const FormFieldInput = ({\n children,\n ...inputSlotProps\n}: FormFieldInputSlotProps) => {\n const { setContext } = useContext(FormFieldContext);\n\n useEffect(() => {\n setContext((prevContext) => ({\n ...prevContext,\n input: children,\n inputSlotProps,\n }));\n }, [children, setContext]);\n\n return null;\n};\n","import { useContext, useEffect } from \"react\";\nimport { FormFieldContext } from \"./form-field.context\";\nimport type { FormFieldDescriptionSlotProps } from \"../form-field.slots\";\n\nexport const FormFieldDescription = ({\n children,\n ...descriptionSlotProps\n}: FormFieldDescriptionSlotProps) => {\n const { setContext } = useContext(FormFieldContext);\n\n useEffect(() => {\n setContext((prevContext) => ({\n ...prevContext,\n description: children,\n descriptionSlotProps,\n }));\n }, [children, setContext]);\n\n return null;\n};\n","import { useContext, useEffect } from \"react\";\nimport { FormFieldContext } from \"./form-field.context\";\nimport type { FormFieldErrorSlotProps } from \"../form-field.slots\";\n\nexport const FormFieldError = ({\n children,\n ...errorSlotProps\n}: FormFieldErrorSlotProps) => {\n const { setContext } = useContext(FormFieldContext);\n\n useEffect(() => {\n setContext((prevContext) => ({\n ...prevContext,\n error: children,\n errorSlotProps,\n }));\n }, [children, setContext]);\n\n return null;\n};\n","import { useContext, useEffect, type ReactNode } from \"react\";\nimport { FormFieldContext } from \"./form-field.context\";\n\ntype FormFieldInfoBoxProps = {\n /**\n * The content to display in the InfoBox\n */\n children: ReactNode;\n};\n\nexport const FormFieldInfoBox = ({ children }: FormFieldInfoBoxProps) => {\n const { setContext } = useContext(FormFieldContext);\n\n useEffect(() => {\n setContext((prevContext) => ({\n ...prevContext,\n info: children,\n }));\n }, [children, setContext]);\n\n return null;\n};\n","import { FormFieldRoot } from \"./components/form-field.root\";\nimport { FormFieldLabel } from \"./components/form-field.label\";\nimport { FormFieldInput } from \"./components/form-field.input\";\nimport { FormFieldDescription } from \"./components/form-field.description\";\nimport { FormFieldError } from \"./components/form-field.error\";\nimport { FormFieldInfoBox } from \"./components/form-field.info-box\";\n\nexport const FormField = {\n Root: FormFieldRoot,\n Label: FormFieldLabel,\n Input: FormFieldInput,\n Description: FormFieldDescription,\n Error: FormFieldError,\n InfoBox: FormFieldInfoBox,\n};\n\nexport {\n FormFieldRoot as _FormFieldRoot,\n FormFieldLabel as _FormFieldLabel,\n FormFieldInput as _FormFieldInput,\n FormFieldDescription as _FormFieldDescription,\n FormFieldError as _FormFieldError,\n FormFieldInfoBox as _FormFieldInfoBox,\n};\n"],"names":["FormFieldContext","createContext","columnLayout","rowLayout","formFieldRecipe","defineSlotRecipe","withProvider","withContext","createSlotRecipeContext","FormFieldRootSlot","FormFieldLabelSlot","FormFieldInputSlot","FormFieldDescriptionSlot","FormFieldErrorSlot","FormFieldPopoverSlot","FormFieldRoot","forwardRef","isInvalid","isRequired","isDisabled","isReadOnly","children","props","ref","context","setContext","useState","useFieldArgs","labelProps","fieldProps","descriptionProps","errorMessageProps","useField","useEffect","prevContext","inputProps","jsx","jsxs","DialogTrigger","Box","IconButton","HelpOutline","Popover","Dialog","Children","child","isValidElement","cloneElement","ErrorOutline","FormFieldLabel","labelSlotProps","useContext","FormFieldInput","inputSlotProps","FormFieldDescription","descriptionSlotProps","FormFieldError","errorSlotProps","FormFieldInfoBox","FormField"],"mappings":";;;;;;;;AA6BO,MAAMA,IAAmB,gBAAAC,EAAoC;AAAA,EAClE,SAAS;AAAA,IACP,OAAO;AAAA,IACP,aAAa;AAAA,IACb,OAAO;AAAA,IACP,MAAM;AAAA,IACN,OAAO;AAAA,EAAA;AAAA,EAET,YAAY,MAAM;AAAA,EAAC;AACrB,CAAC,GCpCKC,IAAe;AAAA;AAAA;AAAA;AAAA;AAAA,GAMfC,IAAY;AAAA;AAAA;AAAA;AAAA,GAULC,IAAkB,gBAAAC,EAAiB;AAAA,EAC9C,OAAO,CAAC,QAAQ,SAAS,SAAS,eAAe,SAAS,SAAS;AAAA;AAAA,EAEnE,WAAW;AAAA,EAEX,MAAM;AAAA,IACJ,MAAM;AAAA,MACJ,cAAc;AAAA,MAEd,SAAS;AAAA,MACT,OAAO;AAAA,IAAA;AAAA,IAET,OAAO;AAAA,MACL,UAAU;AA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B;AAElD,SAAAiC,EAAU,MAAM;AACd,IAAAR,EAAW,CAACS,OAAiB;AAAA,MAC3B,GAAGA;AAAA,MACH,MAAMb;AAAA,IAAA,EACN;AAAA,EACJ,GAAG,CAACA,GAAUI,CAAU,CAAC,GAElB;AACT,GCdakC,KAAY;AAAA,EACvB,MAAM5C;AAAA,EACN,OAAOkC;AAAA,EACP,OAAOG;AAAA,EACP,aAAaE;AAAA,EACb,OAAOE;AAAA,EACP,SAASE;AACX;"}
|
|
1
|
+
{"version":3,"file":"form-field-CkKl1C4M.es.js","sources":["../../src/components/form-field/components/form-field.context.tsx","../../src/components/form-field/form-field.recipe.tsx","../../src/components/form-field/form-field.slots.tsx","../../src/components/form-field/components/form-field.root.tsx","../../src/components/form-field/components/form-field.label.tsx","../../src/components/form-field/components/form-field.input.tsx","../../src/components/form-field/components/form-field.description.tsx","../../src/components/form-field/components/form-field.error.tsx","../../src/components/form-field/components/form-field.info-box.tsx","../../src/components/form-field/form-field.tsx"],"sourcesContent":["import { createContext, type ReactNode } from \"react\";\nimport type {\n FormFieldDescriptionSlotProps,\n FormFieldErrorSlotProps,\n FormFieldInputSlotProps,\n FormFieldLabelSlotProps,\n} from \"../form-field.slots\";\n\nexport type FormFieldContextPayloadType = {\n label: ReactNode;\n labelSlotProps?: FormFieldLabelSlotProps;\n input: ReactNode;\n inputSlotProps?: FormFieldInputSlotProps;\n description: ReactNode;\n descriptionSlotProps?: FormFieldDescriptionSlotProps;\n error: ReactNode;\n errorSlotProps?: FormFieldErrorSlotProps;\n info: ReactNode;\n isInvalid?: boolean;\n isRequired?: boolean;\n isDisabled?: boolean;\n isReadOnly?: boolean;\n};\n\nexport type FormFieldContextType = {\n context: FormFieldContextPayloadType;\n setContext: React.Dispatch<React.SetStateAction<FormFieldContextPayloadType>>;\n};\n\nexport const FormFieldContext = createContext<FormFieldContextType>({\n context: {\n label: null,\n description: null,\n error: null,\n info: null,\n input: null,\n },\n setContext: () => {},\n});\n","import { defineSlotRecipe } from \"@chakra-ui/react/styled-system\";\n\nconst columnLayout = `\n\"label\"\n\"input\"\n\"description\"\n\"error\"\n`;\nconst rowLayout = `\n\"label input\"\n\"label description\"\n\"label error\"\n`;\n\n/**\n * Recipe configuration for the FormField component.\n * Defines the styling variants and base styles using Chakra UI's recipe system.\n */\nexport const formFieldRecipe = defineSlotRecipe({\n slots: [\"root\", \"label\", \"input\", \"description\", \"error\", \"popover\"],\n // Unique class name prefix for the component\n className: \"nimbus-ui-form-field\",\n\n base: {\n root: {\n \"--grid-gap\": \"spacing.100\",\n\n display: \"grid\",\n width: \"auto\",\n },\n label: {\n gridArea: \"label\",\n fontWeight: \"500\",\n color: \"neutral.11\",\n fontSize: \"var(--form-field-font-size)\",\n lineHeight: \"var(--form-field-line-height)\",\n },\n input: {\n gridArea: \"input\",\n },\n description: {\n gridArea: \"description\",\n color: \"neutral.11\",\n fontSize: \"var(--form-field-font-size)\",\n lineHeight: \"var(--form-field-line-height)\",\n },\n error: {\n gridArea: \"error\",\n color: \"critical.11\",\n fontSize: \"var(--form-field-font-size)\",\n lineHeight: \"var(--form-field-line-height)\",\n },\n popover: {\n \"--scrollbar-color\": \"colors.neutral.8\",\n \"--scrollbar-bg\": \"colors.neutral.3\",\n bg: \"neutral.1\",\n maxWidth: \"xl\",\n borderRadius: \"200\",\n boxShadow: \"6\",\n border: \"solid-25\",\n borderColor: \"neutral.8\",\n maxHeight: \"40svh\",\n overflow: \"auto\",\n scrollbarWidth: \"thin\",\n scrollbarColor: \"var(--scrollbar-color) var(--scrollbar-bg)\",\n focusRing: \"outside\",\n },\n },\n\n variants: {\n size: {\n md: {\n root: {\n \"--form-field-font-size\": \"fontSizes.350\",\n \"--form-field-line-height\": \"lineHeights.500\",\n },\n },\n sm: {\n root: {\n \"--form-field-font-size\": \"fontSizes.300\",\n \"--form-field-line-height\": \"lineHeights.450\",\n },\n },\n },\n direction: {\n column: {\n root: {\n gridTemplateAreas: columnLayout,\n },\n input: {\n mt: \"var(--grid-gap)\",\n },\n description: {\n mt: \"var(--grid-gap)\",\n },\n error: {\n mt: \"var(--grid-gap)\",\n },\n },\n row: {\n root: {\n gridTemplateAreas: rowLayout,\n gridTemplateColumns: \"auto 1fr\",\n gridColumnGap: \"200\",\n },\n description: {\n mt: \"var(--grid-gap)\",\n },\n error: {\n mt: \"var(--grid-gap)\",\n },\n },\n },\n },\n\n // Default variant values when not explicitly specified\n defaultVariants: {\n direction: \"column\",\n size: \"md\",\n },\n});\n","/* eslint-disable @typescript-eslint/no-empty-object-type */\nimport {\n type HTMLChakraProps,\n type RecipeVariantProps,\n type UnstyledProp,\n createSlotRecipeContext,\n} from \"@chakra-ui/react/styled-system\";\n\nimport { formFieldRecipe } from \"./form-field.recipe\";\n\nconst { withProvider, withContext } = createSlotRecipeContext({\n recipe: formFieldRecipe,\n});\n\n// Root slot\nexport interface FormFieldRootSlotProps\n extends HTMLChakraProps<\n \"div\",\n RecipeVariantProps<typeof formFieldRecipe> & UnstyledProp\n > {}\n\nexport const FormFieldRootSlot = withProvider<\n HTMLDivElement,\n FormFieldRootSlotProps\n>(\"div\", \"root\");\n\n// Label Slot\nexport interface FormFieldLabelSlotProps extends HTMLChakraProps<\"div\"> {}\nexport const FormFieldLabelSlot = withContext<\n HTMLDivElement,\n FormFieldLabelSlotProps\n>(\"div\", \"label\");\n\n// Input Slot\nexport interface FormFieldInputSlotProps extends HTMLChakraProps<\"div\"> {}\nexport const FormFieldInputSlot = withContext<\n HTMLDivElement,\n FormFieldInputSlotProps\n>(\"div\", \"input\");\n\n// Description Slot\nexport interface FormFieldDescriptionSlotProps extends HTMLChakraProps<\"div\"> {}\nexport const FormFieldDescriptionSlot = withContext<\n HTMLDivElement,\n FormFieldDescriptionSlotProps\n>(\"div\", \"description\");\n\n// Error Slot\nexport interface FormFieldErrorSlotProps extends HTMLChakraProps<\"div\"> {}\nexport const FormFieldErrorSlot = withContext<\n HTMLDivElement,\n FormFieldErrorSlotProps\n>(\"div\", \"error\");\n\n// Error Slot\nexport interface FormFieldPopoverSlotProps extends HTMLChakraProps<\"div\"> {}\nexport const FormFieldPopoverSlot = withContext<\n HTMLDivElement,\n FormFieldPopoverSlotProps\n>(\"div\", \"popover\");\n","import {\n Children,\n cloneElement,\n forwardRef,\n isValidElement,\n useEffect,\n useState,\n} from \"react\";\nimport type { FormFieldProps } from \"../form-field.types\";\nimport { useField } from \"react-aria\";\nimport {\n FormFieldContext,\n type FormFieldContextPayloadType,\n} from \"./form-field.context\";\nimport {\n FormFieldDescriptionSlot,\n FormFieldErrorSlot,\n FormFieldInputSlot,\n FormFieldLabelSlot,\n FormFieldPopoverSlot,\n FormFieldRootSlot,\n} from \"../form-field.slots\";\nimport { Dialog, DialogTrigger, Popover } from \"react-aria-components\";\nimport { Box, IconButton } from \"@/components\";\nimport { ErrorOutline, HelpOutline } from \"@commercetools/nimbus-icons\";\n\n/**\n * # FormField\n *\n * displays miscellaneous inputs in a FormField context\n *\n * @see {@link https://nimbus-documentation.vercel.app/components/inputs/formfield}\n */\nexport const FormFieldRoot = forwardRef<HTMLDivElement, FormFieldProps>(\n (\n { isInvalid, isRequired, isDisabled, isReadOnly, children, ...props },\n ref\n ) => {\n const [context, setContext] = useState<FormFieldContextPayloadType>({\n label: null,\n description: null,\n error: null,\n info: null,\n input: null,\n isInvalid,\n isRequired,\n isDisabled,\n isReadOnly,\n });\n\n const useFieldArgs: Parameters<typeof useField>[0] = {\n description: context.description,\n errorMessage: context.error,\n };\n\n if (context.label) {\n useFieldArgs.label = context.label;\n } else {\n // Context will always start out null, so we need to stub out some aria attributes\n // FIXME: This is a hack to get the form field to work, but it's not the best solution\n // FIXME: We should find a better way to handle this by redesigning the FormField component's structure\n useFieldArgs[\"aria-label\"] = \"empty-label\";\n useFieldArgs[\"aria-labelledby\"] = \"empty-label\";\n }\n\n const { labelProps, fieldProps, descriptionProps, errorMessageProps } =\n useField(useFieldArgs);\n\n useEffect(() => {\n setContext((prevContext) => ({\n ...prevContext,\n isInvalid,\n isRequired,\n isDisabled,\n isReadOnly,\n }));\n }, [isInvalid, isRequired, isDisabled, isReadOnly]);\n\n const inputProps = {\n ...fieldProps,\n isInvalid,\n isRequired,\n isDisabled,\n isReadOnly,\n };\n\n return (\n <FormFieldContext.Provider value={{ context, setContext }}>\n <FormFieldRootSlot ref={ref} {...props}>\n {context.label && (\n <FormFieldLabelSlot {...context.labelSlotProps}>\n <label {...labelProps}>\n {context.label}\n {isRequired && <sup aria-hidden=\"true\">*</sup>}\n </label>\n {context.info && (\n <DialogTrigger>\n <Box\n as=\"span\"\n display=\"inline-block\"\n position=\"relative\"\n width=\"1ch\"\n height=\"1ch\"\n ml=\"200\"\n >\n <Box\n as=\"span\"\n display=\"inline-flex\"\n position=\"absolute\"\n top=\"50%\"\n right=\"50%\"\n transform=\"translate(50%, -50%)\"\n >\n <IconButton\n aria-label=\"__MORE INFO\"\n size=\"2xs\"\n tone=\"info\"\n variant=\"link\"\n >\n <HelpOutline />\n </IconButton>\n </Box>\n </Box>\n <Popover>\n <FormFieldPopoverSlot asChild>\n <Dialog>\n <Box p=\"300\">{context.info}</Box>\n </Dialog>\n </FormFieldPopoverSlot>\n </Popover>\n </DialogTrigger>\n )}\n </FormFieldLabelSlot>\n )}\n {context.input && (\n <FormFieldInputSlot {...context.inputSlotProps}>\n {Children.map(context.input, (child) => {\n // Important: Check if the child is a valid React element before cloning.\n if (isValidElement(child)) {\n return cloneElement(child, inputProps);\n }\n // If it's not a valid element (e.g., text node, null, undefined), return it as is.\n return child;\n })}\n </FormFieldInputSlot>\n )}\n {context.description && (\n <FormFieldDescriptionSlot\n {...descriptionProps}\n {...context.descriptionSlotProps}\n >\n {context.description}\n </FormFieldDescriptionSlot>\n )}\n {isInvalid && context.error && (\n <FormFieldErrorSlot\n {...errorMessageProps}\n {...context.errorSlotProps}\n >\n <Box\n as={ErrorOutline}\n display=\"inline-flex\"\n boxSize=\"400\"\n verticalAlign=\"text-bottom\"\n mr=\"100\"\n />\n {context.error}\n </FormFieldErrorSlot>\n )}\n {children}\n </FormFieldRootSlot>\n </FormFieldContext.Provider>\n );\n }\n);\n","import { useContext, useEffect } from \"react\";\nimport { FormFieldContext } from \"./form-field.context\";\nimport type { FormFieldLabelSlotProps } from \"../form-field.slots\";\n\nexport const FormFieldLabel = ({\n children,\n ...labelSlotProps\n}: FormFieldLabelSlotProps) => {\n const { setContext } = useContext(FormFieldContext);\n\n useEffect(() => {\n setContext((prevContext) => ({\n ...prevContext,\n label: children,\n labelSlotProps,\n }));\n }, [children, setContext]);\n\n return null;\n};\n","import { useContext, useEffect } from \"react\";\nimport { FormFieldContext } from \"./form-field.context\";\nimport type { FormFieldInputSlotProps } from \"../form-field.slots\";\n\nexport const FormFieldInput = ({\n children,\n ...inputSlotProps\n}: FormFieldInputSlotProps) => {\n const { setContext } = useContext(FormFieldContext);\n\n useEffect(() => {\n setContext((prevContext) => ({\n ...prevContext,\n input: children,\n inputSlotProps,\n }));\n }, [children, setContext]);\n\n return null;\n};\n","import { useContext, useEffect } from \"react\";\nimport { FormFieldContext } from \"./form-field.context\";\nimport type { FormFieldDescriptionSlotProps } from \"../form-field.slots\";\n\nexport const FormFieldDescription = ({\n children,\n ...descriptionSlotProps\n}: FormFieldDescriptionSlotProps) => {\n const { setContext } = useContext(FormFieldContext);\n\n useEffect(() => {\n setContext((prevContext) => ({\n ...prevContext,\n description: children,\n descriptionSlotProps,\n }));\n }, [children, setContext]);\n\n return null;\n};\n","import { useContext, useEffect } from \"react\";\nimport { FormFieldContext } from \"./form-field.context\";\nimport type { FormFieldErrorSlotProps } from \"../form-field.slots\";\n\nexport const FormFieldError = ({\n children,\n ...errorSlotProps\n}: FormFieldErrorSlotProps) => {\n const { setContext } = useContext(FormFieldContext);\n\n useEffect(() => {\n setContext((prevContext) => ({\n ...prevContext,\n error: children,\n errorSlotProps,\n }));\n }, [children, setContext]);\n\n return null;\n};\n","import { useContext, useEffect, type ReactNode } from \"react\";\nimport { FormFieldContext } from \"./form-field.context\";\n\ntype FormFieldInfoBoxProps = {\n /**\n * The content to display in the InfoBox\n */\n children: ReactNode;\n};\n\nexport const FormFieldInfoBox = ({ children }: FormFieldInfoBoxProps) => {\n const { setContext } = useContext(FormFieldContext);\n\n useEffect(() => {\n setContext((prevContext) => ({\n ...prevContext,\n info: children,\n }));\n }, [children, setContext]);\n\n return null;\n};\n","import { FormFieldRoot } from \"./components/form-field.root\";\nimport { FormFieldLabel } from \"./components/form-field.label\";\nimport { FormFieldInput } from \"./components/form-field.input\";\nimport { FormFieldDescription } from \"./components/form-field.description\";\nimport { FormFieldError } from \"./components/form-field.error\";\nimport { FormFieldInfoBox } from \"./components/form-field.info-box\";\n\nexport const FormField = {\n Root: FormFieldRoot,\n Label: FormFieldLabel,\n Input: FormFieldInput,\n Description: FormFieldDescription,\n Error: FormFieldError,\n InfoBox: FormFieldInfoBox,\n};\n\nexport {\n FormFieldRoot as _FormFieldRoot,\n FormFieldLabel as _FormFieldLabel,\n FormFieldInput as _FormFieldInput,\n FormFieldDescription as _FormFieldDescription,\n FormFieldError as _FormFieldError,\n FormFieldInfoBox as _FormFieldInfoBox,\n};\n"],"names":["FormFieldContext","createContext","columnLayout","rowLayout","formFieldRecipe","defineSlotRecipe","withProvider","withContext","createSlotRecipeContext","FormFieldRootSlot","FormFieldLabelSlot","FormFieldInputSlot","FormFieldDescriptionSlot","FormFieldErrorSlot","FormFieldPopoverSlot","FormFieldRoot","forwardRef","isInvalid","isRequired","isDisabled","isReadOnly","children","props","ref","context","setContext","useState","useFieldArgs","labelProps","fieldProps","descriptionProps","errorMessageProps","useField","useEffect","prevContext","inputProps","jsx","jsxs","DialogTrigger","Box","IconButton","HelpOutline","Popover","Dialog","Children","child","isValidElement","cloneElement","ErrorOutline","FormFieldLabel","labelSlotProps","useContext","FormFieldInput","inputSlotProps","FormFieldDescription","descriptionSlotProps","FormFieldError","errorSlotProps","FormFieldInfoBox","FormField"],"mappings":";;;;;;;;AA6BO,MAAMA,IAAmB,gBAAAC,EAAoC;AAAA,EAClE,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A,IAAA,EACA;AAAA,EACJ,GAAG,CAAClC,GAAUI,CAAU,CAAC,GAElB;AACT,GCfa+B,IAAiB,CAAC;AAAA,EAC7B,UAAAnC;AAAA,EACA,GAAGoC;AACL,MAA+B;AAC7B,QAAM,EAAE,YAAAhC,EAAA,IAAe0B,EAAWnD,CAAgB;AAElD,SAAAiC,EAAU,MAAM;AACd,IAAAR,EAAW,CAACS,OAAiB;AAAA,MAC3B,GAAGA;AAAA,MACH,OAAOb;AAAA,MACP,gBAAAoC;AAAA,IAAA,EACA;AAAA,EACJ,GAAG,CAACpC,GAAUI,CAAU,CAAC,GAElB;AACT,GCTaiC,IAAmB,CAAC,EAAE,UAAArC,QAAsC;AACvE,QAAM,EAAE,YAAAI,EAAA,IAAe0B,EAAWnD,CAAgB;AAElD,SAAAiC,EAAU,MAAM;AACd,IAAAR,EAAW,CAACS,OAAiB;AAAA,MAC3B,GAAGA;AAAA,MACH,MAAMb;AAAA,IAAA,EACN;AAAA,EACJ,GAAG,CAACA,GAAUI,CAAU,CAAC,GAElB;AACT,GCdakC,KAAY;AAAA,EACvB,MAAM5C;AAAA,EACN,OAAOkC;AAAA,EACP,OAAOG;AAAA,EACP,aAAaE;AAAA,EACb,OAAOE;AAAA,EACP,SAASE;AACX;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as p } from "react/jsx-runtime";
|
|
2
2
|
import { createRecipeContext as c } from "@chakra-ui/react";
|
|
3
|
-
import { $ as i } from "./Group-
|
|
3
|
+
import { $ as i } from "./Group-Cfixd-fh.es.js";
|
|
4
4
|
import { g as s } from "./group.recipe-BQafmscW.es.js";
|
|
5
5
|
const { withContext: f } = /* @__PURE__ */ c({
|
|
6
6
|
recipe: s
|
|
@@ -11,4 +11,4 @@ const { withContext: f } = /* @__PURE__ */ c({
|
|
|
11
11
|
export {
|
|
12
12
|
b as G
|
|
13
13
|
};
|
|
14
|
-
//# sourceMappingURL=group-
|
|
14
|
+
//# sourceMappingURL=group-CqfSQXe7.es.js.map
|