@commercetools/nimbus 0.0.0-canary-20250820123249 → 0.0.0-canary-20250821080039
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-BLV4Eycw.cjs.js +2 -0
- package/dist/chunks/Button-BLV4Eycw.cjs.js.map +1 -0
- package/dist/chunks/Button-Dbso0-qF.es.js +73 -0
- package/dist/chunks/Button-Dbso0-qF.es.js.map +1 -0
- package/dist/chunks/DateField-iMlYFknq.cjs.js +2 -0
- package/dist/chunks/DateField-iMlYFknq.cjs.js.map +1 -0
- package/dist/chunks/{DateField-B54wG86x.es.js → DateField-pv0EoMnC.es.js} +855 -774
- package/dist/chunks/DateField-pv0EoMnC.es.js.map +1 -0
- package/dist/chunks/DatePicker-COZaw7tZ.es.js +777 -0
- package/dist/chunks/DatePicker-COZaw7tZ.es.js.map +1 -0
- package/dist/chunks/DatePicker-DhT2ekYj.cjs.js +2 -0
- package/dist/chunks/DatePicker-DhT2ekYj.cjs.js.map +1 -0
- package/dist/chunks/Dialog-CptyD9rP.cjs.js +2 -0
- package/dist/chunks/Dialog-CptyD9rP.cjs.js.map +1 -0
- package/dist/chunks/Dialog-zk-xJfoo.es.js +1902 -0
- package/dist/chunks/Dialog-zk-xJfoo.es.js.map +1 -0
- package/dist/chunks/FocusScope-DqjrxokF.es.js +625 -0
- package/dist/chunks/FocusScope-DqjrxokF.es.js.map +1 -0
- package/dist/chunks/FocusScope-GecpDnRx.cjs.js +2 -0
- package/dist/chunks/FocusScope-GecpDnRx.cjs.js.map +1 -0
- package/dist/chunks/Form-amb1SjpT.cjs.js.map +1 -1
- package/dist/chunks/Form-yBl0QZl8.es.js.map +1 -1
- package/dist/chunks/{Group-mwXBycvF.es.js → Group-BrHhkg3Q.es.js} +5 -5
- package/dist/chunks/{Group-mwXBycvF.es.js.map → Group-BrHhkg3Q.es.js.map} +1 -1
- package/dist/chunks/{Group-S8qldAfB.cjs.js → Group-NyoRRxUI.cjs.js} +2 -2
- package/dist/chunks/{Group-S8qldAfB.cjs.js.map → Group-NyoRRxUI.cjs.js.map} +1 -1
- package/dist/chunks/{Heading-CNw7cSHE.es.js → Heading-6PRCde4r.es.js} +552 -539
- package/dist/chunks/Heading-6PRCde4r.es.js.map +1 -0
- package/dist/chunks/Heading-P3M5XVwg.cjs.js +2 -0
- package/dist/chunks/Heading-P3M5XVwg.cjs.js.map +1 -0
- package/dist/chunks/Hidden-CNJIJ63M.cjs.js.map +1 -1
- package/dist/chunks/Hidden-j3Lbt7xL.es.js.map +1 -1
- package/dist/chunks/{Input-DdVYDR5H.cjs.js → Input-3b57jDmV.cjs.js} +2 -2
- package/dist/chunks/{Input-DdVYDR5H.cjs.js.map → Input-3b57jDmV.cjs.js.map} +1 -1
- package/dist/chunks/{Input-BVKgvaGQ.es.js → Input-DEUFE8kQ.es.js} +5 -5
- package/dist/chunks/{Input-BVKgvaGQ.es.js.map → Input-DEUFE8kQ.es.js.map} +1 -1
- package/dist/chunks/Keyboard-Clnp4zAC.es.js.map +1 -1
- package/dist/chunks/Keyboard-rYf2KxZN.cjs.js.map +1 -1
- package/dist/chunks/{Label-HQH6CpQI.es.js → Label-B2YyCdLl.es.js} +2 -2
- package/dist/chunks/{Label-HQH6CpQI.es.js.map → Label-B2YyCdLl.es.js.map} +1 -1
- package/dist/chunks/{Label-CECAwZGp.cjs.js → Label-BgrYyYXn.cjs.js} +2 -2
- package/dist/chunks/{Label-CECAwZGp.cjs.js.map → Label-BgrYyYXn.cjs.js.map} +1 -1
- package/dist/chunks/ListBox-CWStps80.es.js +662 -0
- package/dist/chunks/ListBox-CWStps80.es.js.map +1 -0
- package/dist/chunks/ListBox-s8tRtwA0.cjs.js +2 -0
- package/dist/chunks/ListBox-s8tRtwA0.cjs.js.map +1 -0
- package/dist/chunks/LiveAnnouncer-BkrEjKY8.cjs.js.map +1 -1
- package/dist/chunks/LiveAnnouncer-CsPyaceH.es.js.map +1 -1
- package/dist/chunks/NumberFormatter-DewVDY5w.cjs.js.map +1 -1
- package/dist/chunks/NumberFormatter-DgOUVrge.es.js.map +1 -1
- package/dist/chunks/{OverlayArrow-BXmPG4ww.es.js → OverlayArrow-BuwEfnJ_.es.js} +4 -4
- package/dist/chunks/{OverlayArrow-BXmPG4ww.es.js.map → OverlayArrow-BuwEfnJ_.es.js.map} +1 -1
- package/dist/chunks/{OverlayArrow-BApTHrZU.cjs.js → OverlayArrow-C5Ymp9MC.cjs.js} +2 -2
- package/dist/chunks/{OverlayArrow-BApTHrZU.cjs.js.map → OverlayArrow-C5Ymp9MC.cjs.js.map} +1 -1
- package/dist/chunks/ProgressBar-BNPexoD9.cjs.js +2 -0
- package/dist/chunks/ProgressBar-BNPexoD9.cjs.js.map +1 -0
- package/dist/chunks/ProgressBar-BnGsEC_2.es.js +42 -0
- package/dist/chunks/ProgressBar-BnGsEC_2.es.js.map +1 -0
- package/dist/chunks/RSPContexts-AkhSBHGO.es.js.map +1 -1
- package/dist/chunks/RSPContexts-CIAIlAKH.cjs.js.map +1 -1
- package/dist/chunks/SSRProvider-Bc-sMhsT.cjs.js.map +1 -1
- package/dist/chunks/SSRProvider-Cu8KibIK.es.js.map +1 -1
- package/dist/chunks/Separator-DOmXRTmt.cjs.js +18 -0
- package/dist/chunks/Separator-DOmXRTmt.cjs.js.map +1 -0
- package/dist/chunks/{Separator-m-nxIY-Z.es.js → Separator-jqT9Eof_.es.js} +577 -579
- package/dist/chunks/Separator-jqT9Eof_.es.js.map +1 -0
- package/dist/chunks/Text-BWSfeB9p.cjs.js.map +1 -1
- package/dist/chunks/Text-DOcU1ycg.es.js.map +1 -1
- package/dist/chunks/{TextArea-Dd44XtIL.es.js → TextArea-D31Tyn5f.es.js} +5 -5
- package/dist/chunks/{TextArea-Dd44XtIL.es.js.map → TextArea-D31Tyn5f.es.js.map} +1 -1
- package/dist/chunks/{TextArea-CKgj3W0e.cjs.js → TextArea-DfONO55t.cjs.js} +2 -2
- package/dist/chunks/{TextArea-CKgj3W0e.cjs.js.map → TextArea-DfONO55t.cjs.js.map} +1 -1
- package/dist/chunks/{ToggleButton--Chrvt2-.es.js → ToggleButton-BwfjgdrS.es.js} +51 -47
- package/dist/chunks/ToggleButton-BwfjgdrS.es.js.map +1 -0
- package/dist/chunks/ToggleButton-CgYoKWXE.cjs.js +2 -0
- package/dist/chunks/ToggleButton-CgYoKWXE.cjs.js.map +1 -0
- package/dist/chunks/{VisuallyHidden-D_v-Q4zg.cjs.js → VisuallyHidden-Cry3ILzH.cjs.js} +2 -2
- package/dist/chunks/{VisuallyHidden-D_v-Q4zg.cjs.js.map → VisuallyHidden-Cry3ILzH.cjs.js.map} +1 -1
- package/dist/chunks/{VisuallyHidden-OA9O6ss7.es.js → VisuallyHidden-vWWAOaeB.es.js} +3 -3
- package/dist/chunks/{VisuallyHidden-OA9O6ss7.es.js.map → VisuallyHidden-vWWAOaeB.es.js.map} +1 -1
- package/dist/chunks/{accordion-ClYjUgCm.es.js → accordion-BzVLPw0m.es.js} +5 -5
- package/dist/chunks/{accordion-ClYjUgCm.es.js.map → accordion-BzVLPw0m.es.js.map} +1 -1
- package/dist/chunks/{accordion-BCevgjfz.cjs.js → accordion-CqVqPnnk.cjs.js} +2 -2
- package/dist/chunks/{accordion-BCevgjfz.cjs.js.map → accordion-CqVqPnnk.cjs.js.map} +1 -1
- package/dist/chunks/{alert-DtykbztH.cjs.js → alert-7fGS6Jtp.cjs.js} +2 -2
- package/dist/chunks/{alert-DtykbztH.cjs.js.map → alert-7fGS6Jtp.cjs.js.map} +1 -1
- package/dist/chunks/{alert-CkCA_F0G.es.js → alert-BjlXzvt9.es.js} +2 -2
- package/dist/chunks/{alert-CkCA_F0G.es.js.map → alert-BjlXzvt9.es.js.map} +1 -1
- package/dist/chunks/{badge-svy4D5LX.es.js → badge-BeR8OqtD.es.js} +2 -2
- package/dist/chunks/{badge-svy4D5LX.es.js.map → badge-BeR8OqtD.es.js.map} +1 -1
- package/dist/chunks/{badge-DrunOIl4.cjs.js → badge-CJK91qKC.cjs.js} +2 -2
- package/dist/chunks/{badge-DrunOIl4.cjs.js.map → badge-CJK91qKC.cjs.js.map} +1 -1
- package/dist/chunks/{button-CtcszdQr.es.js → button-CuhF1g5I.es.js} +5 -5
- package/dist/chunks/{button-CtcszdQr.es.js.map → button-CuhF1g5I.es.js.map} +1 -1
- package/dist/chunks/{button-Cc5bRJ6s.cjs.js → button-DQVmtZsI.cjs.js} +2 -2
- package/dist/chunks/{button-Cc5bRJ6s.cjs.js.map → button-DQVmtZsI.cjs.js.map} +1 -1
- package/dist/chunks/{calendar-bCvE33zv.cjs.js → calendar-CX2aTMuK.cjs.js} +2 -2
- package/dist/chunks/{calendar-bCvE33zv.cjs.js.map → calendar-CX2aTMuK.cjs.js.map} +1 -1
- package/dist/chunks/{calendar-D5ju_SXN.es.js → calendar-Cgb94GBg.es.js} +8 -8
- package/dist/chunks/{calendar-D5ju_SXN.es.js.map → calendar-Cgb94GBg.es.js.map} +1 -1
- package/dist/chunks/{card-vyVNrQUp.cjs.js → card-DR7vGEKx.cjs.js} +2 -2
- package/dist/chunks/{card-vyVNrQUp.cjs.js.map → card-DR7vGEKx.cjs.js.map} +1 -1
- package/dist/chunks/{card-DuySl12T.es.js → card-DTunB9ZY.es.js} +3 -3
- package/dist/chunks/{card-DuySl12T.es.js.map → card-DTunB9ZY.es.js.map} +1 -1
- package/dist/chunks/{checkbox-1YXl_lbS.cjs.js → checkbox-Ci8-0C_9.cjs.js} +2 -2
- package/dist/chunks/{checkbox-1YXl_lbS.cjs.js.map → checkbox-Ci8-0C_9.cjs.js.map} +1 -1
- package/dist/chunks/{checkbox-CmNhDeu0.es.js → checkbox-CjpbV9HI.es.js} +8 -8
- package/dist/chunks/{checkbox-CmNhDeu0.es.js.map → checkbox-CjpbV9HI.es.js.map} +1 -1
- package/dist/chunks/combobox-1Kzme-cs.es.js +1910 -0
- package/dist/chunks/combobox-1Kzme-cs.es.js.map +1 -0
- package/dist/chunks/combobox-9_6OFmgk.cjs.js +2 -0
- package/dist/chunks/combobox-9_6OFmgk.cjs.js.map +1 -0
- package/dist/chunks/context-D0_cRaDZ.cjs.js.map +1 -1
- package/dist/chunks/context-Pt-0ojuK.es.js.map +1 -1
- package/dist/chunks/{date-input-C9ZcvfbY.cjs.js → date-input-BiNLEpfR.cjs.js} +2 -2
- package/dist/chunks/{date-input-C9ZcvfbY.cjs.js.map → date-input-BiNLEpfR.cjs.js.map} +1 -1
- package/dist/chunks/{date-input-B2h5XYct.es.js → date-input-DU74Qqxa.es.js} +2 -2
- package/dist/chunks/{date-input-B2h5XYct.es.js.map → date-input-DU74Qqxa.es.js.map} +1 -1
- package/dist/chunks/{date-picker-CoSwmyDt.cjs.js → date-picker-BU4NVftG.cjs.js} +2 -2
- package/dist/chunks/{date-picker-CoSwmyDt.cjs.js.map → date-picker-BU4NVftG.cjs.js.map} +1 -1
- package/dist/chunks/{date-picker-BNtQMIfz.es.js → date-picker-D6h7NeRV.es.js} +12 -12
- package/dist/chunks/{date-picker-BNtQMIfz.es.js.map → date-picker-D6h7NeRV.es.js.map} +1 -1
- package/dist/chunks/{date-range-picker-lX9xNms_.cjs.js → date-range-picker-BhWMCCGo.cjs.js} +2 -2
- package/dist/chunks/{date-range-picker-lX9xNms_.cjs.js.map → date-range-picker-BhWMCCGo.cjs.js.map} +1 -1
- package/dist/chunks/{date-range-picker-CsyWGPqF.es.js → date-range-picker-DouNAx8F.es.js} +12 -12
- package/dist/chunks/{date-range-picker-CsyWGPqF.es.js.map → date-range-picker-DouNAx8F.es.js.map} +1 -1
- package/dist/chunks/{divider-DqTADRa0.cjs.js → divider-BicBw1PK.cjs.js} +2 -2
- package/dist/chunks/{divider-DqTADRa0.cjs.js.map → divider-BicBw1PK.cjs.js.map} +1 -1
- package/dist/chunks/{divider-CvKO3nQL.es.js → divider-DMH0p6Pr.es.js} +3 -3
- package/dist/chunks/{divider-CvKO3nQL.es.js.map → divider-DMH0p6Pr.es.js.map} +1 -1
- package/dist/chunks/filterDOMProps-BSVCO5jK.es.js +66 -0
- package/dist/chunks/filterDOMProps-BSVCO5jK.es.js.map +1 -0
- package/dist/chunks/filterDOMProps-WUskt27c.cjs.js +2 -0
- package/dist/chunks/filterDOMProps-WUskt27c.cjs.js.map +1 -0
- package/dist/chunks/focusSafely-IqPqYGW2.cjs.js +2 -0
- package/dist/chunks/{focusSafely-Bv_RnHNT.cjs.js.map → focusSafely-IqPqYGW2.cjs.js.map} +1 -1
- package/dist/chunks/{focusSafely-DoM_n2jA.es.js → focusSafely-Z_llPDi1.es.js} +6 -5
- package/dist/chunks/{focusSafely-DoM_n2jA.es.js.map → focusSafely-Z_llPDi1.es.js.map} +1 -1
- package/dist/chunks/focusWithoutScrolling-BlyUcXdY.cjs.js.map +1 -1
- package/dist/chunks/focusWithoutScrolling-CDw3JYiq.es.js.map +1 -1
- package/dist/chunks/{form-field-D8OuOQ5E.cjs.js → form-field-CtS2lThW.cjs.js} +2 -2
- package/dist/chunks/{form-field-D8OuOQ5E.cjs.js.map → form-field-CtS2lThW.cjs.js.map} +1 -1
- package/dist/chunks/{form-field-QQSY_Jm4.es.js → form-field-DyC1BwgL.es.js} +4 -4
- package/dist/chunks/{form-field-QQSY_Jm4.es.js.map → form-field-DyC1BwgL.es.js.map} +1 -1
- package/dist/chunks/{group-gNVdnMp6.cjs.js → group-BlwUrhBo.cjs.js} +2 -2
- package/dist/chunks/{group-gNVdnMp6.cjs.js.map → group-BlwUrhBo.cjs.js.map} +1 -1
- package/dist/chunks/{group-BUyqvOqA.es.js → group-C-AOBEBA.es.js} +2 -2
- package/dist/chunks/{group-BUyqvOqA.es.js.map → group-C-AOBEBA.es.js.map} +1 -1
- package/dist/chunks/{icon-button-DBY3-KjA.cjs.js → icon-button-Dz81DR3X.cjs.js} +2 -2
- package/dist/chunks/{icon-button-DBY3-KjA.cjs.js.map → icon-button-Dz81DR3X.cjs.js.map} +1 -1
- package/dist/chunks/{icon-button-CH683kN2.es.js → icon-button-eAxeO5Sy.es.js} +2 -2
- package/dist/chunks/{icon-button-CH683kN2.es.js.map → icon-button-eAxeO5Sy.es.js.map} +1 -1
- package/dist/chunks/{icon-toggle-button-B7ttsu07.cjs.js → icon-toggle-button-C0lscD-H.cjs.js} +2 -2
- package/dist/chunks/{icon-toggle-button-B7ttsu07.cjs.js.map → icon-toggle-button-C0lscD-H.cjs.js.map} +1 -1
- package/dist/chunks/{icon-toggle-button-DB4vAc3G.es.js → icon-toggle-button-JIH-oYkL.es.js} +2 -2
- package/dist/chunks/{icon-toggle-button-DB4vAc3G.es.js.map → icon-toggle-button-JIH-oYkL.es.js.map} +1 -1
- package/dist/chunks/{kbd-DtkBixW-.cjs.js → kbd-CSMHvaH6.cjs.js} +2 -2
- package/dist/chunks/{kbd-DtkBixW-.cjs.js.map → kbd-CSMHvaH6.cjs.js.map} +1 -1
- package/dist/chunks/{kbd-D2TJB0Xw.es.js → kbd-CUSbYvfc.es.js} +2 -2
- package/dist/chunks/{kbd-D2TJB0Xw.es.js.map → kbd-CUSbYvfc.es.js.map} +1 -1
- package/dist/chunks/link-ghRc-njF.es.js +50 -0
- package/dist/chunks/link-ghRc-njF.es.js.map +1 -0
- package/dist/chunks/link-sv3Y9kiL.cjs.js +2 -0
- package/dist/chunks/link-sv3Y9kiL.cjs.js.map +1 -0
- package/dist/chunks/{loading-spinner-CWiVMPa9.cjs.js → loading-spinner-Czc9y_Gn.cjs.js} +2 -2
- package/dist/chunks/{loading-spinner-CWiVMPa9.cjs.js.map → loading-spinner-Czc9y_Gn.cjs.js.map} +1 -1
- package/dist/chunks/{loading-spinner-CDxvsTM7.es.js → loading-spinner-hZA3mTh7.es.js} +3 -3
- package/dist/chunks/{loading-spinner-CDxvsTM7.es.js.map → loading-spinner-hZA3mTh7.es.js.map} +1 -1
- package/dist/chunks/{make-element-focusable-B3nqm8sS.cjs.js → make-element-focusable-DH5D8RT_.cjs.js} +2 -2
- package/dist/chunks/{make-element-focusable-B3nqm8sS.cjs.js.map → make-element-focusable-DH5D8RT_.cjs.js.map} +1 -1
- package/dist/chunks/{make-element-focusable-Cwa2mbxh.es.js → make-element-focusable-ZJARjxxy.es.js} +3 -3
- package/dist/chunks/{make-element-focusable-Cwa2mbxh.es.js.map → make-element-focusable-ZJARjxxy.es.js.map} +1 -1
- package/dist/chunks/mergeProps-BA5Cwf5w.cjs.js +2 -0
- package/dist/chunks/mergeProps-BA5Cwf5w.cjs.js.map +1 -0
- package/dist/chunks/{mergeProps-Cwgnfqio.es.js → mergeProps-B_9syxhT.es.js} +28 -27
- package/dist/chunks/mergeProps-B_9syxhT.es.js.map +1 -0
- package/dist/chunks/{multiline-text-input-ClPMQ7tA.es.js → multiline-text-input-C92pFhFJ.es.js} +3 -3
- package/dist/chunks/{multiline-text-input-ClPMQ7tA.es.js.map → multiline-text-input-C92pFhFJ.es.js.map} +1 -1
- package/dist/chunks/{multiline-text-input-DA_Fz8h9.cjs.js → multiline-text-input-CyuK_OFR.cjs.js} +2 -2
- package/dist/chunks/{multiline-text-input-DA_Fz8h9.cjs.js.map → multiline-text-input-CyuK_OFR.cjs.js.map} +1 -1
- package/dist/chunks/{nimbus-provider-D8US7K6p.cjs.js → nimbus-provider-DCCIMVE_.cjs.js} +2 -2
- package/dist/chunks/{nimbus-provider-D8US7K6p.cjs.js.map → nimbus-provider-DCCIMVE_.cjs.js.map} +1 -1
- package/dist/chunks/{nimbus-provider-Csv9bA7X.es.js → nimbus-provider-ayl_l7xS.es.js} +2 -2
- package/dist/chunks/{nimbus-provider-Csv9bA7X.es.js.map → nimbus-provider-ayl_l7xS.es.js.map} +1 -1
- package/dist/chunks/number-DHvo-MDe.cjs.js +2 -0
- package/dist/chunks/number-DHvo-MDe.cjs.js.map +1 -0
- package/dist/chunks/number-dMxJejI6.es.js +26 -0
- package/dist/chunks/number-dMxJejI6.es.js.map +1 -0
- package/dist/chunks/number-input-B1dhdihJ.cjs.js +2 -0
- package/dist/chunks/number-input-B1dhdihJ.cjs.js.map +1 -0
- package/dist/chunks/{number-input-DhePUBX4.es.js → number-input-CW2-kmte.es.js} +241 -254
- package/dist/chunks/number-input-CW2-kmte.es.js.map +1 -0
- package/dist/chunks/openLink-DkCJYbzq.cjs.js +2 -0
- package/dist/chunks/{openLink-BjodHrGD.cjs.js.map → openLink-DkCJYbzq.cjs.js.map} +1 -1
- package/dist/chunks/{openLink-BRnXRj9w.es.js → openLink-UGin_Dml.es.js} +42 -38
- package/dist/chunks/{openLink-BRnXRj9w.es.js.map → openLink-UGin_Dml.es.js.map} +1 -1
- package/dist/chunks/{password-input-DqBr_SOU.es.js → password-input-Cu0dFS1a.es.js} +4 -4
- package/dist/chunks/{password-input-DqBr_SOU.es.js.map → password-input-Cu0dFS1a.es.js.map} +1 -1
- package/dist/chunks/{password-input-C0i1n4rW.cjs.js → password-input-JB8O_D-h.cjs.js} +2 -2
- package/dist/chunks/{password-input-C0i1n4rW.cjs.js.map → password-input-JB8O_D-h.cjs.js.map} +1 -1
- package/dist/chunks/platform-BDLy2vDY.cjs.js +2 -0
- package/dist/chunks/platform-BDLy2vDY.cjs.js.map +1 -0
- package/dist/chunks/platform-BuOpbxqC.es.js +47 -0
- package/dist/chunks/platform-BuOpbxqC.es.js.map +1 -0
- package/dist/chunks/{progress-bar-BPk6bjED.cjs.js → progress-bar-BsWBRJc2.cjs.js} +2 -2
- package/dist/chunks/{progress-bar-BPk6bjED.cjs.js.map → progress-bar-BsWBRJc2.cjs.js.map} +1 -1
- package/dist/chunks/{progress-bar-BP4F1gOI.es.js → progress-bar-CUa2a1GW.es.js} +3 -3
- package/dist/chunks/{progress-bar-BP4F1gOI.es.js.map → progress-bar-CUa2a1GW.es.js.map} +1 -1
- package/dist/chunks/radio-input-Dm2vi4Tr.es.js +340 -0
- package/dist/chunks/radio-input-Dm2vi4Tr.es.js.map +1 -0
- package/dist/chunks/radio-input-ks3uMIHH.cjs.js +2 -0
- package/dist/chunks/radio-input-ks3uMIHH.cjs.js.map +1 -0
- package/dist/chunks/{range-calendar-CTngGdKU.es.js → range-calendar-BPr3OzhD.es.js} +8 -8
- package/dist/chunks/{range-calendar-CTngGdKU.es.js.map → range-calendar-BPr3OzhD.es.js.map} +1 -1
- package/dist/chunks/{range-calendar-DsPvLwZi.cjs.js → range-calendar-p93X9--W.cjs.js} +2 -2
- package/dist/chunks/{range-calendar-DsPvLwZi.cjs.js.map → range-calendar-p93X9--W.cjs.js.map} +1 -1
- package/dist/chunks/scrollIntoView-BzIqpHLO.cjs.js +2 -0
- package/dist/chunks/scrollIntoView-BzIqpHLO.cjs.js.map +1 -0
- package/dist/chunks/scrollIntoView-DBSz0DQ7.es.js +94 -0
- package/dist/chunks/scrollIntoView-DBSz0DQ7.es.js.map +1 -0
- package/dist/chunks/select-DZ-oIsVV.cjs.js +2 -0
- package/dist/chunks/select-DZ-oIsVV.cjs.js.map +1 -0
- package/dist/chunks/select-sJlm2NT8.es.js +831 -0
- package/dist/chunks/select-sJlm2NT8.es.js.map +1 -0
- package/dist/chunks/{split-button-S3vDaSRE.es.js → split-button-CD_Lc9Zk.es.js} +6 -6
- package/dist/chunks/{split-button-S3vDaSRE.es.js.map → split-button-CD_Lc9Zk.es.js.map} +1 -1
- package/dist/chunks/{split-button-BjXKLuNF.cjs.js → split-button-CcDW5RoK.cjs.js} +2 -2
- package/dist/chunks/{split-button-BjXKLuNF.cjs.js.map → split-button-CcDW5RoK.cjs.js.map} +1 -1
- package/dist/chunks/{switch-Dz65MgpM.cjs.js → switch-Crc8nVlW.cjs.js} +2 -2
- package/dist/chunks/{switch-Dz65MgpM.cjs.js.map → switch-Crc8nVlW.cjs.js.map} +1 -1
- package/dist/chunks/{switch-yxZy9-ic.es.js → switch-xIG_-I0g.es.js} +6 -6
- package/dist/chunks/{switch-yxZy9-ic.es.js.map → switch-xIG_-I0g.es.js.map} +1 -1
- package/dist/chunks/{tag-group-1AADllBn.es.js → tag-group-Dw0sYuC6.es.js} +467 -464
- package/dist/chunks/tag-group-Dw0sYuC6.es.js.map +1 -0
- package/dist/chunks/tag-group-lc7cj8fj.cjs.js +2 -0
- package/dist/chunks/tag-group-lc7cj8fj.cjs.js.map +1 -0
- package/dist/chunks/{text-DmDvx7V_.cjs.js → text-DNjTZCtR.cjs.js} +2 -2
- package/dist/chunks/{text-DmDvx7V_.cjs.js.map → text-DNjTZCtR.cjs.js.map} +1 -1
- package/dist/chunks/{text-DkDCu8ot.es.js → text-QANNJ4E4.es.js} +2 -2
- package/dist/chunks/{text-DkDCu8ot.es.js.map → text-QANNJ4E4.es.js.map} +1 -1
- package/dist/chunks/{text-input-BWzdKRYV.cjs.js → text-input-C-OhJndO.cjs.js} +2 -2
- package/dist/chunks/{text-input-BWzdKRYV.cjs.js.map → text-input-C-OhJndO.cjs.js.map} +1 -1
- package/dist/chunks/{text-input-W1iPBvXd.es.js → text-input-Co1vIdZ4.es.js} +3 -3
- package/dist/chunks/{text-input-W1iPBvXd.es.js.map → text-input-Co1vIdZ4.es.js.map} +1 -1
- package/dist/chunks/{time-input-DyKhJkkD.cjs.js → time-input-DBhELOKp.cjs.js} +2 -2
- package/dist/chunks/{time-input-DyKhJkkD.cjs.js.map → time-input-DBhELOKp.cjs.js.map} +1 -1
- package/dist/chunks/{time-input-DrAd1lXq.es.js → time-input-Qllp0HZz.es.js} +2 -2
- package/dist/chunks/{time-input-DrAd1lXq.es.js.map → time-input-Qllp0HZz.es.js.map} +1 -1
- package/dist/chunks/{toggle-button-Dowh5X2c.es.js → toggle-button-DS19vPrG.es.js} +2 -2
- package/dist/chunks/{toggle-button-Dowh5X2c.es.js.map → toggle-button-DS19vPrG.es.js.map} +1 -1
- package/dist/chunks/{toggle-button-CUbE_upB.cjs.js → toggle-button-DY1owmQc.cjs.js} +2 -2
- package/dist/chunks/{toggle-button-CUbE_upB.cjs.js.map → toggle-button-DY1owmQc.cjs.js.map} +1 -1
- package/dist/chunks/{toggle-button-group-Dwp7V9nb.cjs.js → toggle-button-group-BWIvUU_4.cjs.js} +2 -2
- package/dist/chunks/{toggle-button-group-Dwp7V9nb.cjs.js.map → toggle-button-group-BWIvUU_4.cjs.js.map} +1 -1
- package/dist/chunks/{toggle-button-group-Bh_OZF74.es.js → toggle-button-group-CgjXp8XN.es.js} +2 -2
- package/dist/chunks/{toggle-button-group-Bh_OZF74.es.js.map → toggle-button-group-CgjXp8XN.es.js.map} +1 -1
- package/dist/chunks/toolbar-CjHj5fIX.cjs.js +2 -0
- package/dist/chunks/toolbar-CjHj5fIX.cjs.js.map +1 -0
- package/dist/chunks/{toolbar-Bc6yC_Kq.es.js → toolbar-DLScuBdf.es.js} +14 -13
- package/dist/chunks/toolbar-DLScuBdf.es.js.map +1 -0
- package/dist/chunks/tooltip-BB7ooTKa.cjs.js +2 -0
- package/dist/chunks/tooltip-BB7ooTKa.cjs.js.map +1 -0
- package/dist/chunks/tooltip-Q46epl2a.es.js +274 -0
- package/dist/chunks/tooltip-Q46epl2a.es.js.map +1 -0
- package/dist/chunks/useButton-DlcUcB98.es.js +56 -0
- package/dist/chunks/useButton-DlcUcB98.es.js.map +1 -0
- package/dist/chunks/useButton-hi3sM3Ce.cjs.js +2 -0
- package/dist/chunks/useButton-hi3sM3Ce.cjs.js.map +1 -0
- package/dist/chunks/useCollator-BvjDbml1.es.js.map +1 -1
- package/dist/chunks/useCollator-ZqnkTllN.cjs.js.map +1 -1
- package/dist/chunks/useControlledState-D0L6S_5r.cjs.js.map +1 -1
- package/dist/chunks/useControlledState-u436Wbp1.es.js.map +1 -1
- package/dist/chunks/useDateFormatter-Dw7VGiwz.cjs.js +2 -0
- package/dist/chunks/{useDateFormatter-dQunecsL.cjs.js.map → useDateFormatter-Dw7VGiwz.cjs.js.map} +1 -1
- package/dist/chunks/{useDateFormatter-CFejfBgJ.es.js → useDateFormatter-kmlij37M.es.js} +441 -421
- package/dist/chunks/{useDateFormatter-CFejfBgJ.es.js.map → useDateFormatter-kmlij37M.es.js.map} +1 -1
- package/dist/chunks/{useEvent-Cao_u7hG.cjs.js → useEvent-CuUOU5WV.cjs.js} +2 -2
- package/dist/chunks/{useEvent-Cao_u7hG.cjs.js.map → useEvent-CuUOU5WV.cjs.js.map} +1 -1
- package/dist/chunks/{useEvent-CMKtxjkk.es.js → useEvent-YHhqZvpU.es.js} +7 -7
- package/dist/chunks/{useEvent-CMKtxjkk.es.js.map → useEvent-YHhqZvpU.es.js.map} +1 -1
- package/dist/chunks/{useField-BeQNqtrH.es.js → useField-Ce9zQxmx.es.js} +3 -3
- package/dist/chunks/{useField-BeQNqtrH.es.js.map → useField-Ce9zQxmx.es.js.map} +1 -1
- package/dist/chunks/{useField-C3i64Axh.cjs.js → useField-DmqO9k7a.cjs.js} +2 -2
- package/dist/chunks/{useField-C3i64Axh.cjs.js.map → useField-DmqO9k7a.cjs.js.map} +1 -1
- package/dist/chunks/useFilter-Bh0adxQ-.es.js.map +1 -1
- package/dist/chunks/useFilter-Du48WXDn.cjs.js.map +1 -1
- package/dist/chunks/{useFocus-B2KLYI7p.es.js → useFocus-BvGvYIan.es.js} +6 -6
- package/dist/chunks/{useFocus-B2KLYI7p.es.js.map → useFocus-BvGvYIan.es.js.map} +1 -1
- package/dist/chunks/{useFocus-BmPbv2AS.cjs.js → useFocus-CXfPnJ5G.cjs.js} +2 -2
- package/dist/chunks/{useFocus-BmPbv2AS.cjs.js.map → useFocus-CXfPnJ5G.cjs.js.map} +1 -1
- package/dist/chunks/{useFocusRing-CGS5w1di.es.js → useFocusRing-C1vq7lTw.es.js} +4 -4
- package/dist/chunks/{useFocusRing-CGS5w1di.es.js.map → useFocusRing-C1vq7lTw.es.js.map} +1 -1
- package/dist/chunks/{useFocusRing-Cq8Zm8qB.cjs.js → useFocusRing-ixPPR18r.cjs.js} +2 -2
- package/dist/chunks/{useFocusRing-Cq8Zm8qB.cjs.js.map → useFocusRing-ixPPR18r.cjs.js.map} +1 -1
- package/dist/chunks/useFocusVisible-BvNyuIMJ.es.js +111 -0
- package/dist/chunks/useFocusVisible-BvNyuIMJ.es.js.map +1 -0
- package/dist/chunks/useFocusVisible-ofYjJ-l6.cjs.js +2 -0
- package/dist/chunks/useFocusVisible-ofYjJ-l6.cjs.js.map +1 -0
- package/dist/chunks/{useFocusWithin-ypYig0QZ.cjs.js → useFocusWithin-Bf2suIR7.cjs.js} +2 -2
- package/dist/chunks/{useFocusWithin-ypYig0QZ.cjs.js.map → useFocusWithin-Bf2suIR7.cjs.js.map} +1 -1
- package/dist/chunks/{useFocusWithin-DxkmDuYs.es.js → useFocusWithin-s8WR5xWD.es.js} +6 -6
- package/dist/chunks/{useFocusWithin-DxkmDuYs.es.js.map → useFocusWithin-s8WR5xWD.es.js.map} +1 -1
- package/dist/chunks/useFocusable-9nZX8LFj.es.js +77 -0
- package/dist/chunks/useFocusable-9nZX8LFj.es.js.map +1 -0
- package/dist/chunks/useFocusable-lxn-toA4.cjs.js +2 -0
- package/dist/chunks/useFocusable-lxn-toA4.cjs.js.map +1 -0
- package/dist/chunks/useFormReset--wPlnEOl.cjs.js +2 -0
- package/dist/chunks/useFormReset--wPlnEOl.cjs.js.map +1 -0
- package/dist/chunks/useFormReset-DurgUJL-.es.js +21 -0
- package/dist/chunks/useFormReset-DurgUJL-.es.js.map +1 -0
- package/dist/chunks/useFormValidation-Cuj--965.cjs.js +2 -0
- package/dist/chunks/useFormValidation-Cuj--965.cjs.js.map +1 -0
- package/dist/chunks/useFormValidation-YmZxjLYm.es.js +202 -0
- package/dist/chunks/useFormValidation-YmZxjLYm.es.js.map +1 -0
- package/dist/chunks/{useHover-CTqV4Nw8.cjs.js → useHover-CS1E3DZy.cjs.js} +2 -2
- package/dist/chunks/{useHover-CTqV4Nw8.cjs.js.map → useHover-CS1E3DZy.cjs.js.map} +1 -1
- package/dist/chunks/{useHover-Dcwl8eOA.es.js → useHover-D4cqdNG6.es.js} +2 -2
- package/dist/chunks/{useHover-Dcwl8eOA.es.js.map → useHover-D4cqdNG6.es.js.map} +1 -1
- package/dist/chunks/{useLabel-CisZ8a6h.es.js → useLabel-BBmkkrPP.es.js} +2 -2
- package/dist/chunks/{useLabel-CisZ8a6h.es.js.map → useLabel-BBmkkrPP.es.js.map} +1 -1
- package/dist/chunks/{useLabel-CNejlqhX.cjs.js → useLabel-Y8tWagLu.cjs.js} +2 -2
- package/dist/chunks/{useLabel-CNejlqhX.cjs.js.map → useLabel-Y8tWagLu.cjs.js.map} +1 -1
- package/dist/chunks/useLocalizedStringFormatter-CvzOUusg.es.js.map +1 -1
- package/dist/chunks/useLocalizedStringFormatter-fJnbqb2x.cjs.js.map +1 -1
- package/dist/chunks/useObjectRef-CaJ5pgjX.es.js.map +1 -1
- package/dist/chunks/useObjectRef-dXOJdONs.cjs.js.map +1 -1
- package/dist/chunks/usePress-CHQHbwut.es.js +454 -0
- package/dist/chunks/usePress-CHQHbwut.es.js.map +1 -0
- package/dist/chunks/usePress-EAB51g0R.cjs.js +8 -0
- package/dist/chunks/usePress-EAB51g0R.cjs.js.map +1 -0
- package/dist/chunks/{useProgressBar-PUck7ed-.cjs.js → useProgressBar-8ZyM2_T3.cjs.js} +2 -2
- package/dist/chunks/{useProgressBar-PUck7ed-.cjs.js.map → useProgressBar-8ZyM2_T3.cjs.js.map} +1 -1
- package/dist/chunks/{useProgressBar-CRW7pbYx.es.js → useProgressBar-BgURyN6q.es.js} +5 -5
- package/dist/chunks/{useProgressBar-CRW7pbYx.es.js.map → useProgressBar-BgURyN6q.es.js.map} +1 -1
- package/dist/chunks/{useSeparator-CZKjqF0N.cjs.js → useSeparator-B-OtWwE7.cjs.js} +2 -2
- package/dist/chunks/{useSeparator-CZKjqF0N.cjs.js.map → useSeparator-B-OtWwE7.cjs.js.map} +1 -1
- package/dist/chunks/{useSeparator-g1ilWvTX.es.js → useSeparator-Dg70ACBm.es.js} +2 -2
- package/dist/chunks/{useSeparator-g1ilWvTX.es.js.map → useSeparator-Dg70ACBm.es.js.map} +1 -1
- package/dist/chunks/{useSingleSelectListState-BrOqG2AF.cjs.js → useSingleSelectListState-C0yvvGsR.cjs.js} +2 -2
- package/dist/chunks/{useSingleSelectListState-BrOqG2AF.cjs.js.map → useSingleSelectListState-C0yvvGsR.cjs.js.map} +1 -1
- package/dist/chunks/{useSingleSelectListState-BrpXw6lw.es.js → useSingleSelectListState-uzLHyabs.es.js} +2 -2
- package/dist/chunks/{useSingleSelectListState-BrpXw6lw.es.js.map → useSingleSelectListState-uzLHyabs.es.js.map} +1 -1
- package/dist/chunks/{useSpinButton-DcOZDNgb.es.js → useSpinButton-C-tpK-T9.es.js} +181 -209
- package/dist/chunks/useSpinButton-C-tpK-T9.es.js.map +1 -0
- package/dist/chunks/useSpinButton-Cw8QxU2l.cjs.js +2 -0
- package/dist/chunks/useSpinButton-Cw8QxU2l.cjs.js.map +1 -0
- package/dist/chunks/useSyncRef-DGRbdR4H.es.js +13 -0
- package/dist/chunks/useSyncRef-DGRbdR4H.es.js.map +1 -0
- package/dist/chunks/useSyncRef-bcjp9eId.cjs.js +2 -0
- package/dist/chunks/useSyncRef-bcjp9eId.cjs.js.map +1 -0
- package/dist/chunks/useTextField-Dxspe3Dd.es.js +91 -0
- package/dist/chunks/useTextField-Dxspe3Dd.es.js.map +1 -0
- package/dist/chunks/useTextField-MxjVF2Cs.cjs.js +2 -0
- package/dist/chunks/useTextField-MxjVF2Cs.cjs.js.map +1 -0
- package/dist/chunks/useToggle-CCq_jSTE.es.js +62 -0
- package/dist/chunks/useToggle-CCq_jSTE.es.js.map +1 -0
- package/dist/chunks/useToggle-CTG3hkKx.cjs.js +2 -0
- package/dist/chunks/useToggle-CTG3hkKx.cjs.js.map +1 -0
- package/dist/chunks/useToggleState-Dl-o05wQ.cjs.js +2 -0
- package/dist/chunks/useToggleState-Dl-o05wQ.cjs.js.map +1 -0
- package/dist/chunks/useToggleState-Uh0wTgdI.es.js +22 -0
- package/dist/chunks/useToggleState-Uh0wTgdI.es.js.map +1 -0
- package/dist/chunks/{useToolbar-DaBxAQpy.es.js → useToolbar-Be7EMzF5.es.js} +4 -4
- package/dist/chunks/{useToolbar-DaBxAQpy.es.js.map → useToolbar-Be7EMzF5.es.js.map} +1 -1
- package/dist/chunks/{useToolbar-CqrPUpY4.cjs.js → useToolbar-Dx3B5fDy.cjs.js} +2 -2
- package/dist/chunks/{useToolbar-CqrPUpY4.cjs.js.map → useToolbar-Dx3B5fDy.cjs.js.map} +1 -1
- package/dist/chunks/useUpdateEffect-C5YQs_1w.cjs.js.map +1 -1
- package/dist/chunks/useUpdateEffect-CCDx8D4X.es.js.map +1 -1
- package/dist/chunks/{utils-Bag2AAeo.cjs.js → utils-BHdR5Nww.cjs.js} +2 -2
- package/dist/chunks/{utils-Bag2AAeo.cjs.js.map → utils-BHdR5Nww.cjs.js.map} +1 -1
- package/dist/chunks/{utils-CK1WzOK8.es.js → utils-BkdW_cdL.es.js} +2 -2
- package/dist/chunks/{utils-CK1WzOK8.es.js.map → utils-BkdW_cdL.es.js.map} +1 -1
- package/dist/chunks/utils-BlXAWjB_.es.js +184 -0
- package/dist/chunks/utils-BlXAWjB_.es.js.map +1 -0
- package/dist/chunks/utils-JGx-H9sJ.cjs.js +2 -0
- package/dist/chunks/utils-JGx-H9sJ.cjs.js.map +1 -0
- package/dist/chunks/{visually-hidden-Ct7jWlZQ.es.js → visually-hidden-Cr2DdJfv.es.js} +2 -2
- package/dist/chunks/{visually-hidden-Ct7jWlZQ.es.js.map → visually-hidden-Cr2DdJfv.es.js.map} +1 -1
- package/dist/chunks/{visually-hidden-CcZJkTkB.cjs.js → visually-hidden-DxNUFbOh.cjs.js} +2 -2
- package/dist/chunks/{visually-hidden-CcZJkTkB.cjs.js.map → visually-hidden-DxNUFbOh.cjs.js.map} +1 -1
- package/dist/components/accordion.cjs +1 -1
- package/dist/components/accordion.es.js +1 -1
- package/dist/components/alert.cjs +1 -1
- package/dist/components/alert.es.js +1 -1
- package/dist/components/badge.cjs +1 -1
- package/dist/components/badge.es.js +1 -1
- package/dist/components/button.cjs +1 -1
- package/dist/components/button.es.js +1 -1
- package/dist/components/calendar.cjs +1 -1
- package/dist/components/calendar.es.js +1 -1
- package/dist/components/card.cjs +1 -1
- package/dist/components/card.es.js +1 -1
- package/dist/components/checkbox.cjs +1 -1
- package/dist/components/checkbox.es.js +1 -1
- package/dist/components/combobox.cjs +1 -1
- package/dist/components/combobox.es.js +1 -1
- package/dist/components/components.cjs +1 -1
- package/dist/components/components.es.js +39 -39
- package/dist/components/date-input.cjs +1 -1
- package/dist/components/date-input.es.js +1 -1
- package/dist/components/date-picker.cjs +1 -1
- package/dist/components/date-picker.es.js +1 -1
- package/dist/components/date-range-picker.cjs +1 -1
- package/dist/components/date-range-picker.es.js +1 -1
- package/dist/components/divider.cjs +1 -1
- package/dist/components/divider.es.js +1 -1
- package/dist/components/form-field.cjs +1 -1
- package/dist/components/form-field.es.js +1 -1
- package/dist/components/group.cjs +1 -1
- package/dist/components/group.es.js +1 -1
- package/dist/components/icon-button.cjs +1 -1
- package/dist/components/icon-button.es.js +1 -1
- package/dist/components/icon-toggle-button.cjs +1 -1
- package/dist/components/icon-toggle-button.es.js +1 -1
- package/dist/components/kbd.cjs +1 -1
- package/dist/components/kbd.es.js +1 -1
- package/dist/components/link.cjs +1 -1
- package/dist/components/link.es.js +1 -1
- package/dist/components/loading-spinner.cjs +1 -1
- package/dist/components/loading-spinner.es.js +1 -1
- package/dist/components/multiline-text-input.cjs +1 -1
- package/dist/components/multiline-text-input.es.js +1 -1
- package/dist/components/nimbus-provider.cjs +1 -1
- package/dist/components/nimbus-provider.es.js +1 -1
- package/dist/components/number-input.cjs +1 -1
- package/dist/components/number-input.es.js +1 -1
- package/dist/components/password-input.cjs +1 -1
- package/dist/components/password-input.es.js +1 -1
- package/dist/components/progress-bar.cjs +1 -1
- package/dist/components/progress-bar.es.js +1 -1
- package/dist/components/radio-input.cjs +1 -1
- package/dist/components/radio-input.es.js +1 -1
- package/dist/components/range-calendar.cjs +1 -1
- package/dist/components/range-calendar.es.js +1 -1
- package/dist/components/select.cjs +1 -1
- package/dist/components/select.es.js +1 -1
- package/dist/components/split-button.cjs +1 -1
- package/dist/components/split-button.es.js +1 -1
- package/dist/components/switch.cjs +1 -1
- package/dist/components/switch.es.js +1 -1
- package/dist/components/tag-group.cjs +1 -1
- package/dist/components/tag-group.es.js +1 -1
- package/dist/components/text-input.cjs +1 -1
- package/dist/components/text-input.es.js +1 -1
- package/dist/components/text.cjs +1 -1
- package/dist/components/text.es.js +1 -1
- package/dist/components/time-input.cjs +1 -1
- package/dist/components/time-input.es.js +1 -1
- package/dist/components/toggle-button-group.cjs +1 -1
- package/dist/components/toggle-button-group.es.js +1 -1
- package/dist/components/toggle-button.cjs +1 -1
- package/dist/components/toggle-button.es.js +1 -1
- package/dist/components/toolbar.cjs +1 -1
- package/dist/components/toolbar.es.js +1 -1
- package/dist/components/tooltip.cjs +1 -1
- package/dist/components/tooltip.es.js +2 -2
- package/dist/components/visually-hidden.cjs +1 -1
- package/dist/components/visually-hidden.es.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.es.js +40 -40
- package/package.json +9 -10
- package/dist/chunks/Button-CcXB_0ry.es.js +0 -80
- package/dist/chunks/Button-CcXB_0ry.es.js.map +0 -1
- package/dist/chunks/Button-POnkHGAl.cjs.js +0 -2
- package/dist/chunks/Button-POnkHGAl.cjs.js.map +0 -1
- package/dist/chunks/DateField-1UP91HrH.cjs.js +0 -2
- package/dist/chunks/DateField-1UP91HrH.cjs.js.map +0 -1
- package/dist/chunks/DateField-B54wG86x.es.js.map +0 -1
- package/dist/chunks/DatePicker-BG5u-FaB.es.js +0 -762
- package/dist/chunks/DatePicker-BG5u-FaB.es.js.map +0 -1
- package/dist/chunks/DatePicker-BKexK-Dx.cjs.js +0 -2
- package/dist/chunks/DatePicker-BKexK-Dx.cjs.js.map +0 -1
- package/dist/chunks/Dialog-Dz-h29rR.es.js +0 -1890
- package/dist/chunks/Dialog-Dz-h29rR.es.js.map +0 -1
- package/dist/chunks/Dialog-cOejkHqh.cjs.js +0 -2
- package/dist/chunks/Dialog-cOejkHqh.cjs.js.map +0 -1
- package/dist/chunks/FocusScope-C0BWU3OK.cjs.js +0 -2
- package/dist/chunks/FocusScope-C0BWU3OK.cjs.js.map +0 -1
- package/dist/chunks/FocusScope-WG69HxuH.es.js +0 -671
- package/dist/chunks/FocusScope-WG69HxuH.es.js.map +0 -1
- package/dist/chunks/Heading-CNw7cSHE.es.js.map +0 -1
- package/dist/chunks/Heading-HwM6p_yd.cjs.js +0 -2
- package/dist/chunks/Heading-HwM6p_yd.cjs.js.map +0 -1
- package/dist/chunks/ListBox-D3hU3NYN.cjs.js +0 -2
- package/dist/chunks/ListBox-D3hU3NYN.cjs.js.map +0 -1
- package/dist/chunks/ListBox-oj3R0YoN.es.js +0 -645
- package/dist/chunks/ListBox-oj3R0YoN.es.js.map +0 -1
- package/dist/chunks/ProgressBar-B7u7ocRM.cjs.js +0 -2
- package/dist/chunks/ProgressBar-B7u7ocRM.cjs.js.map +0 -1
- package/dist/chunks/ProgressBar-DSxkuZBK.es.js +0 -39
- package/dist/chunks/ProgressBar-DSxkuZBK.es.js.map +0 -1
- package/dist/chunks/Separator-BVSCS8fb.cjs.js +0 -18
- package/dist/chunks/Separator-BVSCS8fb.cjs.js.map +0 -1
- package/dist/chunks/Separator-m-nxIY-Z.es.js.map +0 -1
- package/dist/chunks/ToggleButton--Chrvt2-.es.js.map +0 -1
- package/dist/chunks/ToggleButton-M-hJvuFu.cjs.js +0 -2
- package/dist/chunks/ToggleButton-M-hJvuFu.cjs.js.map +0 -1
- package/dist/chunks/combobox-0Wmq1eri.es.js +0 -1919
- package/dist/chunks/combobox-0Wmq1eri.es.js.map +0 -1
- package/dist/chunks/combobox-B8xjkPGW.cjs.js +0 -2
- package/dist/chunks/combobox-B8xjkPGW.cjs.js.map +0 -1
- package/dist/chunks/domHelpers-InH3T0qs.es.js +0 -16
- package/dist/chunks/domHelpers-InH3T0qs.es.js.map +0 -1
- package/dist/chunks/domHelpers-YAYZ9fE9.cjs.js +0 -2
- package/dist/chunks/domHelpers-YAYZ9fE9.cjs.js.map +0 -1
- package/dist/chunks/filterDOMProps-HzsCnE3d.es.js +0 -25
- package/dist/chunks/filterDOMProps-HzsCnE3d.es.js.map +0 -1
- package/dist/chunks/filterDOMProps-_f3L9QML.cjs.js +0 -2
- package/dist/chunks/filterDOMProps-_f3L9QML.cjs.js.map +0 -1
- package/dist/chunks/focusSafely-Bv_RnHNT.cjs.js +0 -2
- package/dist/chunks/link-B4E0SLxG.es.js +0 -51
- package/dist/chunks/link-B4E0SLxG.es.js.map +0 -1
- package/dist/chunks/link-CV620rwL.cjs.js +0 -2
- package/dist/chunks/link-CV620rwL.cjs.js.map +0 -1
- package/dist/chunks/mergeProps-CqhkQvMb.cjs.js +0 -2
- package/dist/chunks/mergeProps-CqhkQvMb.cjs.js.map +0 -1
- package/dist/chunks/mergeProps-Cwgnfqio.es.js.map +0 -1
- package/dist/chunks/number-5qMXmHyn.es.js +0 -21
- package/dist/chunks/number-5qMXmHyn.es.js.map +0 -1
- package/dist/chunks/number-CnrRPi4_.cjs.js +0 -2
- package/dist/chunks/number-CnrRPi4_.cjs.js.map +0 -1
- package/dist/chunks/number-input-CecYepck.cjs.js +0 -2
- package/dist/chunks/number-input-CecYepck.cjs.js.map +0 -1
- package/dist/chunks/number-input-DhePUBX4.es.js.map +0 -1
- package/dist/chunks/openLink-BjodHrGD.cjs.js +0 -2
- package/dist/chunks/platform-D-bXaP3n.es.js +0 -45
- package/dist/chunks/platform-D-bXaP3n.es.js.map +0 -1
- package/dist/chunks/platform-Vom5nEUR.cjs.js +0 -2
- package/dist/chunks/platform-Vom5nEUR.cjs.js.map +0 -1
- package/dist/chunks/radio-input-CvBi7RAL.es.js +0 -320
- package/dist/chunks/radio-input-CvBi7RAL.es.js.map +0 -1
- package/dist/chunks/radio-input-jKyEGJsg.cjs.js +0 -2
- package/dist/chunks/radio-input-jKyEGJsg.cjs.js.map +0 -1
- package/dist/chunks/scrollIntoView-B2eLOBfw.cjs.js +0 -2
- package/dist/chunks/scrollIntoView-B2eLOBfw.cjs.js.map +0 -1
- package/dist/chunks/scrollIntoView-C5qp-va8.es.js +0 -64
- package/dist/chunks/scrollIntoView-C5qp-va8.es.js.map +0 -1
- package/dist/chunks/select-B3WgS573.cjs.js +0 -2
- package/dist/chunks/select-B3WgS573.cjs.js.map +0 -1
- package/dist/chunks/select-DbtGesVC.es.js +0 -795
- package/dist/chunks/select-DbtGesVC.es.js.map +0 -1
- package/dist/chunks/tag-group-1AADllBn.es.js.map +0 -1
- package/dist/chunks/tag-group-DNhZCkrF.cjs.js +0 -2
- package/dist/chunks/tag-group-DNhZCkrF.cjs.js.map +0 -1
- package/dist/chunks/toolbar-BOvyhSyS.cjs.js +0 -2
- package/dist/chunks/toolbar-BOvyhSyS.cjs.js.map +0 -1
- package/dist/chunks/toolbar-Bc6yC_Kq.es.js.map +0 -1
- package/dist/chunks/tooltip-ChDnFUve.cjs.js +0 -2
- package/dist/chunks/tooltip-ChDnFUve.cjs.js.map +0 -1
- package/dist/chunks/tooltip-cAKlYo3d.es.js +0 -273
- package/dist/chunks/tooltip-cAKlYo3d.es.js.map +0 -1
- package/dist/chunks/useButton-ChUnssRf.cjs.js +0 -2
- package/dist/chunks/useButton-ChUnssRf.cjs.js.map +0 -1
- package/dist/chunks/useButton-Cpm7uwPO.es.js +0 -48
- package/dist/chunks/useButton-Cpm7uwPO.es.js.map +0 -1
- package/dist/chunks/useDateFormatter-dQunecsL.cjs.js +0 -2
- package/dist/chunks/useDescription-D908ZGGj.es.js +0 -33
- package/dist/chunks/useDescription-D908ZGGj.es.js.map +0 -1
- package/dist/chunks/useDescription-Dy1e4_gg.cjs.js +0 -2
- package/dist/chunks/useDescription-Dy1e4_gg.cjs.js.map +0 -1
- package/dist/chunks/useFocusVisible-CfEJEJCf.cjs.js +0 -2
- package/dist/chunks/useFocusVisible-CfEJEJCf.cjs.js.map +0 -1
- package/dist/chunks/useFocusVisible-Dk8OwOkH.es.js +0 -165
- package/dist/chunks/useFocusVisible-Dk8OwOkH.es.js.map +0 -1
- package/dist/chunks/useFocusable-Btl_N3EJ.cjs.js +0 -2
- package/dist/chunks/useFocusable-Btl_N3EJ.cjs.js.map +0 -1
- package/dist/chunks/useFocusable-CxDxGOcK.es.js +0 -101
- package/dist/chunks/useFocusable-CxDxGOcK.es.js.map +0 -1
- package/dist/chunks/useFormReset-BiO2-w_B.es.js +0 -21
- package/dist/chunks/useFormReset-BiO2-w_B.es.js.map +0 -1
- package/dist/chunks/useFormReset-DXbasS3m.cjs.js +0 -2
- package/dist/chunks/useFormReset-DXbasS3m.cjs.js.map +0 -1
- package/dist/chunks/useFormValidation-BHPlWicy.cjs.js +0 -2
- package/dist/chunks/useFormValidation-BHPlWicy.cjs.js.map +0 -1
- package/dist/chunks/useFormValidation-wEYzOtbK.es.js +0 -200
- package/dist/chunks/useFormValidation-wEYzOtbK.es.js.map +0 -1
- package/dist/chunks/usePress-DrP775Ks.cjs.js +0 -8
- package/dist/chunks/usePress-DrP775Ks.cjs.js.map +0 -1
- package/dist/chunks/usePress-K9GdFtHv.es.js +0 -471
- package/dist/chunks/usePress-K9GdFtHv.es.js.map +0 -1
- package/dist/chunks/useSpinButton-BowNa_-v.cjs.js +0 -2
- package/dist/chunks/useSpinButton-BowNa_-v.cjs.js.map +0 -1
- package/dist/chunks/useSpinButton-DcOZDNgb.es.js.map +0 -1
- package/dist/chunks/useSyncRef-D9Qzt8nv.cjs.js +0 -2
- package/dist/chunks/useSyncRef-D9Qzt8nv.cjs.js.map +0 -1
- package/dist/chunks/useSyncRef-Gu0I2GXX.es.js +0 -47
- package/dist/chunks/useSyncRef-Gu0I2GXX.es.js.map +0 -1
- package/dist/chunks/useTextField-Birct0ti.cjs.js +0 -2
- package/dist/chunks/useTextField-Birct0ti.cjs.js.map +0 -1
- package/dist/chunks/useTextField-CF9hrjRg.es.js +0 -88
- package/dist/chunks/useTextField-CF9hrjRg.es.js.map +0 -1
- package/dist/chunks/useToggle-B5oGO_Tl.cjs.js +0 -2
- package/dist/chunks/useToggle-B5oGO_Tl.cjs.js.map +0 -1
- package/dist/chunks/useToggle-DL960lkn.es.js +0 -50
- package/dist/chunks/useToggle-DL960lkn.es.js.map +0 -1
- package/dist/chunks/useToggleState-bO90kfqG.cjs.js +0 -2
- package/dist/chunks/useToggleState-bO90kfqG.cjs.js.map +0 -1
- package/dist/chunks/useToggleState-mKFEFD2Q.es.js +0 -19
- package/dist/chunks/useToggleState-mKFEFD2Q.es.js.map +0 -1
- package/dist/chunks/utils-C732zipO.es.js +0 -238
- package/dist/chunks/utils-C732zipO.es.js.map +0 -1
- package/dist/chunks/utils-Ci_mT5Zh.cjs.js +0 -2
- package/dist/chunks/utils-Ci_mT5Zh.cjs.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context-Pt-0ojuK.es.js","sources":["../../../../node_modules/.pnpm/@react-aria+i18n@3.12.10_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@react-aria/i18n/dist/utils.mjs","../../../../node_modules/.pnpm/@react-aria+i18n@3.12.10_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@react-aria/i18n/dist/useDefaultLocale.mjs","../../../../node_modules/.pnpm/@react-aria+i18n@3.12.10_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@react-aria/i18n/dist/context.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 */ // https://en.wikipedia.org/wiki/Right-to-left\nconst $148a7a147e38ea7f$var$RTL_SCRIPTS = new Set([\n 'Arab',\n 'Syrc',\n 'Samr',\n 'Mand',\n 'Thaa',\n 'Mend',\n 'Nkoo',\n 'Adlm',\n 'Rohg',\n 'Hebr'\n]);\nconst $148a7a147e38ea7f$var$RTL_LANGS = new Set([\n 'ae',\n 'ar',\n 'arc',\n 'bcc',\n 'bqi',\n 'ckb',\n 'dv',\n 'fa',\n 'glk',\n 'he',\n 'ku',\n 'mzn',\n 'nqo',\n 'pnb',\n 'ps',\n 'sd',\n 'ug',\n 'ur',\n 'yi'\n]);\nfunction $148a7a147e38ea7f$export$702d680b21cbd764(localeString) {\n // If the Intl.Locale API is available, use it to get the locale's text direction.\n if (Intl.Locale) {\n let locale = new Intl.Locale(localeString).maximize();\n // Use the text info object to get the direction if possible.\n // @ts-ignore - this was implemented as a property by some browsers before it was standardized as a function.\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getTextInfo\n let textInfo = typeof locale.getTextInfo === 'function' ? locale.getTextInfo() : locale.textInfo;\n if (textInfo) return textInfo.direction === 'rtl';\n // Fallback: guess using the script.\n // This is more accurate than guessing by language, since languages can be written in multiple scripts.\n if (locale.script) return $148a7a147e38ea7f$var$RTL_SCRIPTS.has(locale.script);\n }\n // If not, just guess by the language (first part of the locale)\n let lang = localeString.split('-')[0];\n return $148a7a147e38ea7f$var$RTL_LANGS.has(lang);\n}\n\n\nexport {$148a7a147e38ea7f$export$702d680b21cbd764 as isRTL};\n//# sourceMappingURL=utils.module.js.map\n","import {isRTL as $148a7a147e38ea7f$export$702d680b21cbd764} from \"./utils.mjs\";\nimport {useState as $ffhGL$useState, useEffect as $ffhGL$useEffect} from \"react\";\nimport {useIsSSR as $ffhGL$useIsSSR} from \"@react-aria/ssr\";\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\n\n// Locale passed from server by PackageLocalizationProvider.\nconst $1e5a04cdaf7d1af8$var$localeSymbol = Symbol.for('react-aria.i18n.locale');\nfunction $1e5a04cdaf7d1af8$export$f09106e7c6677ec5() {\n let locale = typeof window !== 'undefined' && window[$1e5a04cdaf7d1af8$var$localeSymbol] || typeof navigator !== 'undefined' && (navigator.language || navigator.userLanguage) || 'en-US';\n try {\n Intl.DateTimeFormat.supportedLocalesOf([\n locale\n ]);\n } catch {\n locale = 'en-US';\n }\n return {\n locale: locale,\n direction: (0, $148a7a147e38ea7f$export$702d680b21cbd764)(locale) ? 'rtl' : 'ltr'\n };\n}\nlet $1e5a04cdaf7d1af8$var$currentLocale = $1e5a04cdaf7d1af8$export$f09106e7c6677ec5();\nlet $1e5a04cdaf7d1af8$var$listeners = new Set();\nfunction $1e5a04cdaf7d1af8$var$updateLocale() {\n $1e5a04cdaf7d1af8$var$currentLocale = $1e5a04cdaf7d1af8$export$f09106e7c6677ec5();\n for (let listener of $1e5a04cdaf7d1af8$var$listeners)listener($1e5a04cdaf7d1af8$var$currentLocale);\n}\nfunction $1e5a04cdaf7d1af8$export$188ec29ebc2bdc3a() {\n let isSSR = (0, $ffhGL$useIsSSR)();\n let [defaultLocale, setDefaultLocale] = (0, $ffhGL$useState)($1e5a04cdaf7d1af8$var$currentLocale);\n (0, $ffhGL$useEffect)(()=>{\n if ($1e5a04cdaf7d1af8$var$listeners.size === 0) window.addEventListener('languagechange', $1e5a04cdaf7d1af8$var$updateLocale);\n $1e5a04cdaf7d1af8$var$listeners.add(setDefaultLocale);\n return ()=>{\n $1e5a04cdaf7d1af8$var$listeners.delete(setDefaultLocale);\n if ($1e5a04cdaf7d1af8$var$listeners.size === 0) window.removeEventListener('languagechange', $1e5a04cdaf7d1af8$var$updateLocale);\n };\n }, []);\n // We cannot determine the browser's language on the server, so default to\n // en-US. This will be updated after hydration on the client to the correct value.\n if (isSSR) return {\n locale: 'en-US',\n direction: 'ltr'\n };\n return defaultLocale;\n}\n\n\nexport {$1e5a04cdaf7d1af8$export$f09106e7c6677ec5 as getDefaultLocale, $1e5a04cdaf7d1af8$export$188ec29ebc2bdc3a as useDefaultLocale};\n//# sourceMappingURL=useDefaultLocale.module.js.map\n","import {isRTL as $148a7a147e38ea7f$export$702d680b21cbd764} from \"./utils.mjs\";\nimport {useDefaultLocale as $1e5a04cdaf7d1af8$export$188ec29ebc2bdc3a} from \"./useDefaultLocale.mjs\";\nimport $h9FiU$react, {useContext as $h9FiU$useContext} from \"react\";\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\n\nconst $18f2051aff69b9bf$var$I18nContext = /*#__PURE__*/ (0, $h9FiU$react).createContext(null);\nfunction $18f2051aff69b9bf$export$a54013f0d02a8f82(props) {\n let { locale: locale, children: children } = props;\n let defaultLocale = (0, $1e5a04cdaf7d1af8$export$188ec29ebc2bdc3a)();\n let value = (0, $h9FiU$react).useMemo(()=>{\n if (!locale) return defaultLocale;\n return {\n locale: locale,\n direction: (0, $148a7a147e38ea7f$export$702d680b21cbd764)(locale) ? 'rtl' : 'ltr'\n };\n }, [\n defaultLocale,\n locale\n ]);\n return /*#__PURE__*/ (0, $h9FiU$react).createElement($18f2051aff69b9bf$var$I18nContext.Provider, {\n value: value\n }, children);\n}\nfunction $18f2051aff69b9bf$export$43bb16f9c6d9e3f7() {\n let defaultLocale = (0, $1e5a04cdaf7d1af8$export$188ec29ebc2bdc3a)();\n let context = (0, $h9FiU$useContext)($18f2051aff69b9bf$var$I18nContext);\n return context || defaultLocale;\n}\n\n\nexport {$18f2051aff69b9bf$export$a54013f0d02a8f82 as I18nProvider, $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 as useLocale};\n//# sourceMappingURL=context.module.js.map\n"],"names":["$148a7a147e38ea7f$var$RTL_SCRIPTS","$148a7a147e38ea7f$var$RTL_LANGS","$148a7a147e38ea7f$export$702d680b21cbd764","localeString","locale","textInfo","lang","$1e5a04cdaf7d1af8$var$localeSymbol","$1e5a04cdaf7d1af8$export$f09106e7c6677ec5","$1e5a04cdaf7d1af8$var$currentLocale","$1e5a04cdaf7d1af8$var$listeners","$1e5a04cdaf7d1af8$var$updateLocale","listener","$1e5a04cdaf7d1af8$export$188ec29ebc2bdc3a","isSSR","$ffhGL$useIsSSR","defaultLocale","setDefaultLocale","$ffhGL$useState","$ffhGL$useEffect","$18f2051aff69b9bf$var$I18nContext","$h9FiU$react","$18f2051aff69b9bf$export$a54013f0d02a8f82","props","children","value","$18f2051aff69b9bf$export$43bb16f9c6d9e3f7","$h9FiU$useContext"],"mappings":";;AAWA,MAAMA,IAAoC,oBAAI,IAAI;AAAA,EAC9C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACJ,CAAC,GACKC,IAAkC,oBAAI,IAAI;AAAA,EAC5C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACJ,CAAC;AACD,SAASC,EAA0CC,GAAc;AAE7D,MAAI,KAAK,QAAQ;AACb,QAAIC,IAAS,IAAI,KAAK,OAAOD,CAAY,EAAE,SAAQ,GAI/CE,IAAW,OAAOD,EAAO,eAAgB,aAAaA,EAAO,gBAAgBA,EAAO;AACxF,QAAIC,EAA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AQnB,GAAQ,UAAUoB,EAAQ,IAAKD,GACzCP,IAAoBH,EAAyC,GAC7DY,IAAYJ,EAAc,QAAQ,MAC7BjB,IACE;AAAA,IACH,QAAQA;AAAA,IACR,WAAeF,EAA2CE,CAAM,IAAI,QAAQ;AAAA,EACxF,IAJ4BY,GAKrB;AAAA,IACCA;AAAA,IACAZ;AAAA,EACR,CAAK;AACD,SAAyBiB,gBAAAA,EAAc,cAAcD,EAAkC,UAAU;AAAA,IAC7F,OAAOK;AAAA,EACf,GAAOD,CAAQ;AACf;AACA,SAASE,IAA4C;AACjD,MAAIV,IAAoBH,EAAyC;AAEjE,SADkBc,EAAmBP,CAAiC,KACpDJ;AACtB;","x_google_ignoreList":[0,1,2]}
|
|
1
|
+
{"version":3,"file":"context-Pt-0ojuK.es.js","sources":["../../../../node_modules/.pnpm/@react-aria+i18n@3.12.11_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@react-aria/i18n/dist/utils.mjs","../../../../node_modules/.pnpm/@react-aria+i18n@3.12.11_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@react-aria/i18n/dist/useDefaultLocale.mjs","../../../../node_modules/.pnpm/@react-aria+i18n@3.12.11_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@react-aria/i18n/dist/context.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 */ // https://en.wikipedia.org/wiki/Right-to-left\nconst $148a7a147e38ea7f$var$RTL_SCRIPTS = new Set([\n 'Arab',\n 'Syrc',\n 'Samr',\n 'Mand',\n 'Thaa',\n 'Mend',\n 'Nkoo',\n 'Adlm',\n 'Rohg',\n 'Hebr'\n]);\nconst $148a7a147e38ea7f$var$RTL_LANGS = new Set([\n 'ae',\n 'ar',\n 'arc',\n 'bcc',\n 'bqi',\n 'ckb',\n 'dv',\n 'fa',\n 'glk',\n 'he',\n 'ku',\n 'mzn',\n 'nqo',\n 'pnb',\n 'ps',\n 'sd',\n 'ug',\n 'ur',\n 'yi'\n]);\nfunction $148a7a147e38ea7f$export$702d680b21cbd764(localeString) {\n // If the Intl.Locale API is available, use it to get the locale's text direction.\n if (Intl.Locale) {\n let locale = new Intl.Locale(localeString).maximize();\n // Use the text info object to get the direction if possible.\n // @ts-ignore - this was implemented as a property by some browsers before it was standardized as a function.\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getTextInfo\n let textInfo = typeof locale.getTextInfo === 'function' ? locale.getTextInfo() : locale.textInfo;\n if (textInfo) return textInfo.direction === 'rtl';\n // Fallback: guess using the script.\n // This is more accurate than guessing by language, since languages can be written in multiple scripts.\n if (locale.script) return $148a7a147e38ea7f$var$RTL_SCRIPTS.has(locale.script);\n }\n // If not, just guess by the language (first part of the locale)\n let lang = localeString.split('-')[0];\n return $148a7a147e38ea7f$var$RTL_LANGS.has(lang);\n}\n\n\nexport {$148a7a147e38ea7f$export$702d680b21cbd764 as isRTL};\n//# sourceMappingURL=utils.module.js.map\n","import {isRTL as $148a7a147e38ea7f$export$702d680b21cbd764} from \"./utils.mjs\";\nimport {useState as $ffhGL$useState, useEffect as $ffhGL$useEffect} from \"react\";\nimport {useIsSSR as $ffhGL$useIsSSR} from \"@react-aria/ssr\";\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\n\n// Locale passed from server by PackageLocalizationProvider.\nconst $1e5a04cdaf7d1af8$var$localeSymbol = Symbol.for('react-aria.i18n.locale');\nfunction $1e5a04cdaf7d1af8$export$f09106e7c6677ec5() {\n let locale = typeof window !== 'undefined' && window[$1e5a04cdaf7d1af8$var$localeSymbol] || typeof navigator !== 'undefined' && (navigator.language || navigator.userLanguage) || 'en-US';\n try {\n Intl.DateTimeFormat.supportedLocalesOf([\n locale\n ]);\n } catch {\n locale = 'en-US';\n }\n return {\n locale: locale,\n direction: (0, $148a7a147e38ea7f$export$702d680b21cbd764)(locale) ? 'rtl' : 'ltr'\n };\n}\nlet $1e5a04cdaf7d1af8$var$currentLocale = $1e5a04cdaf7d1af8$export$f09106e7c6677ec5();\nlet $1e5a04cdaf7d1af8$var$listeners = new Set();\nfunction $1e5a04cdaf7d1af8$var$updateLocale() {\n $1e5a04cdaf7d1af8$var$currentLocale = $1e5a04cdaf7d1af8$export$f09106e7c6677ec5();\n for (let listener of $1e5a04cdaf7d1af8$var$listeners)listener($1e5a04cdaf7d1af8$var$currentLocale);\n}\nfunction $1e5a04cdaf7d1af8$export$188ec29ebc2bdc3a() {\n let isSSR = (0, $ffhGL$useIsSSR)();\n let [defaultLocale, setDefaultLocale] = (0, $ffhGL$useState)($1e5a04cdaf7d1af8$var$currentLocale);\n (0, $ffhGL$useEffect)(()=>{\n if ($1e5a04cdaf7d1af8$var$listeners.size === 0) window.addEventListener('languagechange', $1e5a04cdaf7d1af8$var$updateLocale);\n $1e5a04cdaf7d1af8$var$listeners.add(setDefaultLocale);\n return ()=>{\n $1e5a04cdaf7d1af8$var$listeners.delete(setDefaultLocale);\n if ($1e5a04cdaf7d1af8$var$listeners.size === 0) window.removeEventListener('languagechange', $1e5a04cdaf7d1af8$var$updateLocale);\n };\n }, []);\n // We cannot determine the browser's language on the server, so default to\n // en-US. This will be updated after hydration on the client to the correct value.\n if (isSSR) return {\n locale: 'en-US',\n direction: 'ltr'\n };\n return defaultLocale;\n}\n\n\nexport {$1e5a04cdaf7d1af8$export$f09106e7c6677ec5 as getDefaultLocale, $1e5a04cdaf7d1af8$export$188ec29ebc2bdc3a as useDefaultLocale};\n//# sourceMappingURL=useDefaultLocale.module.js.map\n","import {isRTL as $148a7a147e38ea7f$export$702d680b21cbd764} from \"./utils.mjs\";\nimport {useDefaultLocale as $1e5a04cdaf7d1af8$export$188ec29ebc2bdc3a} from \"./useDefaultLocale.mjs\";\nimport $h9FiU$react, {useContext as $h9FiU$useContext} from \"react\";\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\n\nconst $18f2051aff69b9bf$var$I18nContext = /*#__PURE__*/ (0, $h9FiU$react).createContext(null);\nfunction $18f2051aff69b9bf$export$a54013f0d02a8f82(props) {\n let { locale: locale, children: children } = props;\n let defaultLocale = (0, $1e5a04cdaf7d1af8$export$188ec29ebc2bdc3a)();\n let value = (0, $h9FiU$react).useMemo(()=>{\n if (!locale) return defaultLocale;\n return {\n locale: locale,\n direction: (0, $148a7a147e38ea7f$export$702d680b21cbd764)(locale) ? 'rtl' : 'ltr'\n };\n }, [\n defaultLocale,\n locale\n ]);\n return /*#__PURE__*/ (0, $h9FiU$react).createElement($18f2051aff69b9bf$var$I18nContext.Provider, {\n value: value\n }, children);\n}\nfunction $18f2051aff69b9bf$export$43bb16f9c6d9e3f7() {\n let defaultLocale = (0, $1e5a04cdaf7d1af8$export$188ec29ebc2bdc3a)();\n let context = (0, $h9FiU$useContext)($18f2051aff69b9bf$var$I18nContext);\n return context || defaultLocale;\n}\n\n\nexport {$18f2051aff69b9bf$export$a54013f0d02a8f82 as I18nProvider, $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 as useLocale};\n//# sourceMappingURL=context.module.js.map\n"],"names":["$148a7a147e38ea7f$var$RTL_SCRIPTS","$148a7a147e38ea7f$var$RTL_LANGS","$148a7a147e38ea7f$export$702d680b21cbd764","localeString","locale","textInfo","lang","$1e5a04cdaf7d1af8$var$localeSymbol","$1e5a04cdaf7d1af8$export$f09106e7c6677ec5","$1e5a04cdaf7d1af8$var$currentLocale","$1e5a04cdaf7d1af8$var$listeners","$1e5a04cdaf7d1af8$var$updateLocale","listener","$1e5a04cdaf7d1af8$export$188ec29ebc2bdc3a","isSSR","$ffhGL$useIsSSR","defaultLocale","setDefaultLocale","$ffhGL$useState","$ffhGL$useEffect","$18f2051aff69b9bf$var$I18nContext","$h9FiU$react","$18f2051aff69b9bf$export$a54013f0d02a8f82","props","children","value","$18f2051aff69b9bf$export$43bb16f9c6d9e3f7","$h9FiU$useContext"],"mappings":";;AAWA,MAAMA,IAAoC,oBAAI,IAAI;AAAA,EAC9C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACJ,CAAC,GACKC,IAAkC,oBAAI,IAAI;AAAA,EAC5C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACJ,CAAC;AACD,SAASC,EAA0CC,GAAc;AAE7D,MAAI,KAAK,QAAQ;AACb,QAAIC,IAAS,IAAI,KAAK,OAAOD,CAAY,EAAE,SAAQ,GAI/CE,IAAW,OAAOD,EAAO,eAAgB,aAAaA,EAAO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AA0CC,GAAO;AACtD,MAAI,EAAE,QAAQnB,GAAQ,UAAUoB,EAAQ,IAAKD,GACzCP,IAAoBH,EAAyC,GAC7DY,IAAYJ,EAAc,QAAQ,MAC7BjB,IACE;AAAA,IACH,QAAQA;AAAA,IACR,WAAeF,EAA2CE,CAAM,IAAI,QAAQ;AAAA,EACxF,IAJ4BY,GAKrB;AAAA,IACCA;AAAA,IACAZ;AAAA,EACR,CAAK;AACD,SAAyBiB,gBAAAA,EAAc,cAAcD,EAAkC,UAAU;AAAA,IAC7F,OAAOK;AAAA,EACf,GAAOD,CAAQ;AACf;AACA,SAASE,IAA4C;AACjD,MAAIV,IAAoBH,EAAyC;AAEjE,SADkBc,EAAmBP,CAAiC,KACpDJ;AACtB;","x_google_ignoreList":[0,1,2]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const e=require("react/jsx-runtime"),r=require("./index-XyB4gGC8.cjs.js"),l=require("./create-slot-recipe-context-CHGQvGou.cjs.js"),t=require("./DateField-
|
|
2
|
-
//# sourceMappingURL=date-input-
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),r=require("./index-XyB4gGC8.cjs.js"),l=require("./create-slot-recipe-context-CHGQvGou.cjs.js"),t=require("./DateField-iMlYFknq.cjs.js"),x=require("./extractStyleProps-wjyId_vK.cjs.js"),S=require("./use-recipe-BZ_iqCkN.cjs.js"),{withProvider:h,withContext:c}=l.createSlotRecipeContext({recipe:r.dateInputSlotRecipe}),$=h("div","root"),f=c("div","segmentGroup"),I=c("div","segment"),o=n=>{const s=S.useRecipe({recipe:r.dateInputSlotRecipe}),[i,p]=s.splitVariantProps(n),[u,a]=x.extractStyleProps(p);return e.jsx($,{...i,...u,asChild:!0,children:e.jsx(t.$40825cdb76e74f70$export$d9781c7894a82487,{...a,children:e.jsx(f,{asChild:!0,children:e.jsx(t.$40825cdb76e74f70$export$7edc06cf1783b30f,{children:d=>e.jsx(I,{asChild:!0,children:e.jsx(t.$40825cdb76e74f70$export$336ab7fa954c4b5f,{segment:d})})})})})})};o.displayName="DateInput";exports.DateInput=o;
|
|
2
|
+
//# sourceMappingURL=date-input-BiNLEpfR.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-input-
|
|
1
|
+
{"version":3,"file":"date-input-BiNLEpfR.cjs.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":"qRAyBM,CAAE,aAAAA,EAAc,YAAAC,CAAA,EAAgBC,0BAAwB,CAC5D,OAAQC,EAAAA,mBACV,CAAC,EAMYC,EAAoBJ,EAG/B,MAAO,MAAM,EAKFK,EAA4BJ,EAGvC,MAAO,cAAc,EAKVK,EAAuBL,EAGlC,MAAO,SAAS,EC7BLM,EAAaC,GAA0B,CAClD,MAAMC,EAASC,EAAAA,UAAU,CAAE,OAAQP,EAAAA,oBAAqB,EAClD,CAACQ,EAAaC,CAAe,EAAIH,EAAO,kBAAkBD,CAAK,EAC/D,CAACK,EAAYC,CAAe,EAAIC,EAAAA,kBAAkBH,CAAe,EAEvE,OACEI,EAAAA,IAACZ,EAAA,CAAmB,GAAGO,EAAc,GAAGE,EAAY,QAAO,GACzD,SAAAG,EAAAA,IAACC,4CAAA,CAAW,GAAGH,EACb,eAACT,EAAA,CAA0B,QAAO,GAChC,SAAAW,EAAAA,IAACE,EAAAA,0CAAA,CACE,SAACC,GACAH,EAAAA,IAACV,GAAqB,QAAO,GAC3B,SAAAU,MAACI,EAAAA,0CAAA,CAAY,QAAAD,CAAA,CAAkB,CAAA,CACjC,EAEJ,CAAA,CACF,EACF,EACF,CAEJ,EAEAZ,EAAU,YAAc"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { d as t } from "./index-BbFVxNB8.es.js";
|
|
3
3
|
import { c as d } from "./create-slot-recipe-context-DgamNbR-.es.js";
|
|
4
|
-
import { $ as l, a as m, b as u } from "./DateField-
|
|
4
|
+
import { $ as l, a as m, b as u } from "./DateField-pv0EoMnC.es.js";
|
|
5
5
|
import { e as f } from "./extractStyleProps-DV7dej9J.es.js";
|
|
6
6
|
import { u as h } from "./use-recipe-CR4W7Dne.es.js";
|
|
7
7
|
const { withProvider: $, withContext: r } = /* @__PURE__ */ d({
|
|
@@ -14,4 +14,4 @@ P.displayName = "DateInput";
|
|
|
14
14
|
export {
|
|
15
15
|
P as D
|
|
16
16
|
};
|
|
17
|
-
//# sourceMappingURL=date-input-
|
|
17
|
+
//# sourceMappingURL=date-input-DU74Qqxa.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-input-
|
|
1
|
+
{"version":3,"file":"date-input-DU74Qqxa.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;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const e=require("react/jsx-runtime"),j=require("./index-XyB4gGC8.cjs.js"),v=require("./create-slot-recipe-context-CHGQvGou.cjs.js"),h=require("@commercetools/nimbus-icons"),b=require("./DatePicker-
|
|
2
|
-
//# sourceMappingURL=date-picker-
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),j=require("./index-XyB4gGC8.cjs.js"),v=require("./create-slot-recipe-context-CHGQvGou.cjs.js"),h=require("@commercetools/nimbus-icons"),b=require("./DatePicker-DhT2ekYj.cjs.js"),$=require("./Dialog-CptyD9rP.cjs.js"),y=require("./Group-NyoRRxUI.cjs.js"),q=require("./extractStyleProps-wjyId_vK.cjs.js"),g=require("./icon-button-Dz81DR3X.cjs.js"),D=require("./date-input-BiNLEpfR.cjs.js"),k=require("./calendar-CX2aTMuK.cjs.js"),I=require("./text-DNjTZCtR.cjs.js"),T=require("./time-input-DBhELOKp.cjs.js"),f=require("react"),R=require("./context-D0_cRaDZ.cjs.js"),E=require("./flex-CDVfeTs4.cjs.js"),P=require("./Button-BLV4Eycw.cjs.js"),S=require("./utils-BHdR5Nww.cjs.js"),V=require("./DateField-iMlYFknq.cjs.js"),{withProvider:z,withContext:m}=v.createSlotRecipeContext({recipe:j.datePickerSlotRecipe}),B=z("div","root"),w=m("div","group"),F=m("div","trigger"),G=m("div","popover"),A=m("div","calendar"),O=({hideTimeZone:c,hourCycle:r})=>{const{locale:i}=R.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),l=f.useContext(b.$06d5b8ec9ee5d538$export$50a10c048fdcdee9),{granularity:u,dateValue:t}=l,n=f.useRef(null),d=f.useRef(t);return u==="day"?null:(f.useEffect(()=>{let s;if(t&&d.current?.compare(t)!==0){const a=n.current,p=document.activeElement;a?.contains(p)&&p?.getAttribute("role")==="spinbutton"||(s=setTimeout(()=>{a&&a.querySelector('[role="spinbutton"]')?.focus()},50))}return d.current=t,()=>{s&&clearTimeout(s)}},[t]),e.jsxs(E.Flex,{ref:n,borderTop:"solid-25",borderColor:"neutral.3",py:"300",px:"400",alignItems:"center",justifyContent:"center",gap:"200",children:[e.jsx(I.Text,{textStyle:"xs",fontWeight:"500",color:"neutral.12",children:"Start time"}),e.jsx(T.TimeInput,{slot:"timeInput",locale:i,variant:"ghost",size:"sm",hideTimeZone:c,hourCycle:r})]}))},H=({children:c})=>{const r=S.$64fa3d84918910a7$export$fabf2dc03a41866e(P.$d2b4bc8c273e7be6$export$24d547caef80ccd1)||{},i=f.useContext(b.$06d5b8ec9ee5d538$export$50a10c048fdcdee9),l=i?.dateValue===null,{timeValue:u,setTimeValue:t,granularity:n}=i,d=r?.isDisabled,s=()=>{switch(n){case"hour":return"Enter time (hour)";case"minute":return"Enter time (hour and minute)";case"second":return"Enter time (hour, minute, and second)";default:return"Enter time"}},a={calendarToggle:{...r,onPress:o=>{const x=document?.activeElement;x&&x.blur(),r.onPress?.(o)}},clear:{onPress:()=>i?.setValue(null),"aria-label":"Clear input value",isDisabled:d,style:l?{display:"none"}:void 0,"aria-hidden":l?!0:void 0}},p={timeInput:{value:u,onChange:o=>{o!==null&&t(o)},granularity:n==="day"?void 0:n,"aria-label":s()}};return e.jsx(S.$64fa3d84918910a7$export$2881499e37b75b9a,{values:[[P.$d2b4bc8c273e7be6$export$24d547caef80ccd1,{slots:a}],[V.$40825cdb76e74f70$export$8e17ddc448e87c1e,{slots:p}]],children:c})},C=c=>{const{size:r="md",variant:i,granularity:l="day",hideTimeZone:u,hourCycle:t}=c,n=v.useSlotRecipe({recipe:j.datePickerSlotRecipe}),[d,s]=n.splitVariantProps(c),[a,p]=q.extractStyleProps(s),o=r==="md"?"xs":"2xs",x=l==="day"?c.shouldCloseOnSelect:!1;return e.jsx(B,{...d,...a,asChild:!0,children:e.jsx(b.$06d5b8ec9ee5d538$export$5109c6dd95d8fb00,{...p,shouldCloseOnSelect:x,children:e.jsxs(H,{children:[e.jsx(w,{asChild:!0,children:e.jsxs(y.$a049562f99e7db0e$export$eb2fcfdbd7ba97d4,{children:[e.jsx(D.DateInput,{size:r,variant:i,width:"full",hideTimeZone:u,hourCycle:t}),e.jsxs(F,{children:[e.jsx(g.IconButton,{tone:"primary",variant:"ghost",size:o,slot:"clear",children:e.jsx(h.Close,{})}),e.jsx(g.IconButton,{tone:"primary",variant:"ghost",size:o,slot:"calendarToggle",children:e.jsx(h.CalendarMonth,{})})]})]})}),e.jsx(G,{asChild:!0,children:e.jsx($.$07b14b47974efb58$export$5b6b19405a83ff9d,{placement:"bottom end",children:e.jsxs($.$de32f1b87079253c$export$3ddf2d174ce01153,{children:[e.jsx(A,{children:e.jsx(k.Calendar,{})}),e.jsx(O,{hideTimeZone:u,hourCycle:t})]})})})]})})})};C.displayName="DatePicker";exports.DatePicker=C;
|
|
2
|
+
//# sourceMappingURL=date-picker-BU4NVftG.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-picker-CoSwmyDt.cjs.js","sources":["../../src/components/date-picker/date-picker.slots.tsx","../../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 { 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\";\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: NodeJS.Timeout | 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 {/* TODO: translate hardcoded string */}\n <Text textStyle=\"xs\" fontWeight=\"500\" color=\"neutral.12\">\n Start time\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\";\n\nexport const DatePickerCustomContext = ({\n children,\n}: {\n children: React.ReactNode;\n}) => {\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 \"Enter time (hour)\";\n case \"minute\":\n return \"Enter time (hour and minute)\";\n case \"second\":\n return \"Enter time (hour, minute, and second)\";\n default:\n return \"Enter 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 onPress: () => datePickerState?.setValue(null),\n \"aria-label\": \"Clear input value\",\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","DatePickerTimeInput","hideTimeZone","hourCycle","locale","useLocale","datePickerState","useContext","DatePickerStateContext","granularity","dateValue","timeInputRef","useRef","previousDateRef","useEffect","timeoutId","container","activeElement","jsxs","Flex","jsx","Text","TimeInput","DatePickerCustomContext","children","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":"6vBAyBM,CAAE,aAAAA,EAAc,YAAAC,CAAA,EAAgBC,0BAAwB,CAC5D,OAAQC,EAAAA,oBACV,CAAC,EAMYC,EAAqBJ,EAGhC,MAAO,MAAM,EAKFK,EAAsBJ,EAGjC,MAAO,OAAO,EAKHK,EAAwBL,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cjs.js","sources":["../../src/components/date-picker/date-picker.slots.tsx","../../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 { 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\";\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: NodeJS.Timeout | 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 {/* TODO: translate hardcoded string */}\n <Text textStyle=\"xs\" fontWeight=\"500\" color=\"neutral.12\">\n Start time\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\";\n\nexport const DatePickerCustomContext = ({\n children,\n}: {\n children: React.ReactNode;\n}) => {\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 \"Enter time (hour)\";\n case \"minute\":\n return \"Enter time (hour and minute)\";\n case \"second\":\n return \"Enter time (hour, minute, and second)\";\n default:\n return \"Enter 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 onPress: () => datePickerState?.setValue(null),\n \"aria-label\": \"Clear input value\",\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","DatePickerTimeInput","hideTimeZone","hourCycle","locale","useLocale","datePickerState","useContext","DatePickerStateContext","granularity","dateValue","timeInputRef","useRef","previousDateRef","useEffect","timeoutId","container","activeElement","jsxs","Flex","jsx","Text","TimeInput","DatePickerCustomContext","children","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":"6vBAyBM,CAAE,aAAAA,EAAc,YAAAC,CAAA,EAAgBC,0BAAwB,CAC5D,OAAQC,EAAAA,oBACV,CAAC,EAMYC,EAAqBJ,EAGhC,MAAO,MAAM,EAKFK,EAAsBJ,EAGjC,MAAO,OAAO,EAKHK,EAAwBL,EAGnC,MAAO,SAAS,EAKLM,EAAwBN,EAGnC,MAAO,SAAS,EAKLO,EAAyBP,EAGpC,MAAO,UAAU,EC9DNQ,EAAsB,CAAC,CAClC,aAAAC,EACA,UAAAC,CACF,IAAgC,CAC9B,KAAM,CAAE,OAAAC,CAAA,EAAWC,4CAAA,EACbC,EAAkBC,EAAAA,WAAWC,2CAAsB,EACnD,CAAE,YAAAC,EAAa,UAAAC,CAAA,EAAcJ,EAC7BK,EAAeC,EAAAA,OAAuB,IAAI,EAC1CC,EAAkBD,EAAAA,OAAOF,CAAS,EAGxC,OAAID,IAAgB,MACX,MAITK,EAAAA,UAAU,IAAM,CAEd,IAAIC,EAEJ,GAAIL,GAAaG,EAAgB,SAAS,QAAQH,CAAS,IAAM,EAAG,CAGlE,MAAMM,EAAYL,EAAa,QACzBM,EAAgB,SAAS,cAE7BD,GAAW,SAASC,CAAa,GACjCA,GAAe,aAAa,MAAM,IAAM,eAIxCF,EAAY,WAAW,IAAM,CAEvBC,GACm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M,CAAA,CAAA,EAGTpC,EAAAA,IAACmC,EAAAA,WAAA,CACC,KAAK,UACL,QAAQ,QACR,KAAML,EACN,KAAK,iBAEL,eAACO,EAAAA,cAAA,CAAA,CAAc,CAAA,CAAA,CACjB,CAAA,CACF,CAAA,CAAA,CACF,CAAA,CACF,EACArC,EAAAA,IAACrB,GAAsB,QAAO,GAC5B,eAAC2D,EAAAA,0CAAA,CAAQ,UAAU,aACjB,SAAAxC,EAAAA,KAACyC,EAAAA,0CAAA,CACC,SAAA,CAAAvC,EAAAA,IAACpB,EAAA,CACC,SAAAoB,EAAAA,IAACwC,EAAAA,SAAA,CAAA,CAAS,EACZ,EACAxC,EAAAA,IAACnB,EAAA,CACC,aAAAC,EACA,UAAAC,CAAA,CAAA,CACF,CAAA,CACF,EACF,CAAA,CACF,CAAA,CAAA,CACF,CAAA,CAAA,EAEJ,CAEJ,EAEAoC,EAAW,YAAc"}
|
|
@@ -2,21 +2,21 @@ import { jsxs as f, jsx as e } from "react/jsx-runtime";
|
|
|
2
2
|
import { e as x } from "./index-BbFVxNB8.es.js";
|
|
3
3
|
import { c as S, u as C } from "./create-slot-recipe-context-DgamNbR-.es.js";
|
|
4
4
|
import { Close as y, CalendarMonth as D } from "@commercetools/nimbus-icons";
|
|
5
|
-
import { $ as P, a as T } from "./DatePicker-
|
|
6
|
-
import { $ as k, a as I } from "./Dialog-
|
|
7
|
-
import { $ as E } from "./Group-
|
|
5
|
+
import { $ as P, a as T } from "./DatePicker-COZaw7tZ.es.js";
|
|
6
|
+
import { $ as k, a as I } from "./Dialog-zk-xJfoo.es.js";
|
|
7
|
+
import { $ as E } from "./Group-BrHhkg3Q.es.js";
|
|
8
8
|
import { e as R } from "./extractStyleProps-DV7dej9J.es.js";
|
|
9
|
-
import { I as h } from "./icon-button-
|
|
10
|
-
import { D as V } from "./date-input-
|
|
11
|
-
import { C as z } from "./calendar-
|
|
12
|
-
import { T as w } from "./text-
|
|
13
|
-
import { T as F } from "./time-input-
|
|
9
|
+
import { I as h } from "./icon-button-eAxeO5Sy.es.js";
|
|
10
|
+
import { D as V } from "./date-input-DU74Qqxa.es.js";
|
|
11
|
+
import { C as z } from "./calendar-Cgb94GBg.es.js";
|
|
12
|
+
import { T as w } from "./text-QANNJ4E4.es.js";
|
|
13
|
+
import { T as F } from "./time-input-Qllp0HZz.es.js";
|
|
14
14
|
import { useContext as v, useRef as $, useEffect as j } from "react";
|
|
15
15
|
import { $ as A } from "./context-Pt-0ojuK.es.js";
|
|
16
16
|
import { F as B } from "./flex-9fkV4bsm.es.js";
|
|
17
|
-
import { $ as g } from "./Button-
|
|
18
|
-
import { c as G, d as O } from "./utils-
|
|
19
|
-
import { d as q } from "./DateField-
|
|
17
|
+
import { $ as g } from "./Button-Dbso0-qF.es.js";
|
|
18
|
+
import { c as G, d as O } from "./utils-BkdW_cdL.es.js";
|
|
19
|
+
import { d as q } from "./DateField-pv0EoMnC.es.js";
|
|
20
20
|
const { withProvider: H, withContext: b } = /* @__PURE__ */ S({
|
|
21
21
|
recipe: x
|
|
22
22
|
}), L = /* @__PURE__ */ H("div", "root"), M = /* @__PURE__ */ b("div", "group"), N = /* @__PURE__ */ b("div", "trigger"), W = /* @__PURE__ */ b("div", "popover"), Z = /* @__PURE__ */ b("div", "calendar"), J = ({
|
|
@@ -187,4 +187,4 @@ Q.displayName = "DatePicker";
|
|
|
187
187
|
export {
|
|
188
188
|
Q as D
|
|
189
189
|
};
|
|
190
|
-
//# sourceMappingURL=date-picker-
|
|
190
|
+
//# sourceMappingURL=date-picker-D6h7NeRV.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-picker-BNtQMIfz.es.js","sources":["../../src/components/date-picker/date-picker.slots.tsx","../../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 { 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\";\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: NodeJS.Timeout | 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 {/* TODO: translate hardcoded string */}\n <Text textStyle=\"xs\" fontWeight=\"500\" color=\"neutral.12\">\n Start time\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\";\n\nexport const DatePickerCustomContext = ({\n children,\n}: {\n children: React.ReactNode;\n}) => {\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 \"Enter time (hour)\";\n case \"minute\":\n return \"Enter time (hour and minute)\";\n case \"second\":\n return \"Enter time (hour, minute, and second)\";\n default:\n return \"Enter 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 onPress: () => datePickerState?.setValue(null),\n \"aria-label\": \"Clear input value\",\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","DatePickerTimeInput","hideTimeZone","hourCycle","locale","useLocale","datePickerState","useContext","DatePickerStateContext","granularity","dateValue","timeInputRef","useRef","previousDateRef","useEffect","timeoutId","container","activeElement","jsxs","Flex","jsx","Text","TimeInput","DatePickerCustomContext","children","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,GC9DNQ,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,EAAOF,CAAS;AAGxC,SAAID,MAAgB,QACX,QAITK,EAAU,MAAM;AAEd,QAAIC;AAEJ,QAAIL,KAAaG,EAAgB,SAAS,QAAQH,CAAS,MAAM,GAAG;AAGlE,YAAMM,IAAYL,EAAa,SACzBM,IAAgB,SAAS;AAK/B,MAHED,GAAW,SAASC,CAAa,KACjCA,GAAe,aAAa,MAAM,MAAM,iBAIxCF,IAAY,WAAW,MAAM;AAE3B,QAAIC,KACmBA,EAAU;AAAA,UAC7B;AAAA,QAAA,GAEY,MAAA;AAAA,MAElB,GAAG,EAAE;AAAA,IAET;AAEA,WAAAH,EAAgB,UAAUH,GAGnB,MAAM;AACX,MAAIK,KACF,aAA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AAAH,EAACvB,GAAA,EAAoB,SAAO,IAC1B,UAAA,gBAAAqB,EAACmC,GAAA,EACC,UAAA;AAAA,UAAA,gBAAAjC;AAAA,YAACkC;AAAA,YAAA;AAAA,cACC,MAAAb;AAAA,cACA,SAAAC;AAAA,cACA,OAAM;AAAA,cACN,cAAAxC;AAAA,cACA,WAAAC;AAAA,YAAA;AAAA,UAAA;AAAA,4BAEDL,GAAA,EAEC,UAAA;AAAA,YAAA,gBAAAsB;AAAA,cAACmC;AAAA,cAAA;AAAA,gBACC,MAAK;AAAA,gBACL,SAAQ;AAAA,gBACR,MAAML;AAAA,gBACN,MAAK;AAAA,gBAEL,4BAACM,GAAA,CAAA,CAAM;AAAA,cAAA;AAAA,YAAA;AAAA,YAGT,gBAAApC;AAAA,cAACmC;AAAA,cAAA;AAAA,gBACC,MAAK;AAAA,gBACL,SAAQ;AAAA,gBACR,MAAML;AAAA,gBACN,MAAK;AAAA,gBAEL,4BAACO,GAAA,CAAA,CAAc;AAAA,cAAA;AAAA,YAAA;AAAA,UACjB,EAAA,CACF;AAAA,QAAA,EAAA,CACF,EAAA,CACF;AAAA,QACA,gBAAArC,EAACrB,KAAsB,SAAO,IAC5B,4BAAC2D,GAAA,EAAQ,WAAU,cACjB,UAAA,gBAAAxC,EAACyC,GAAA,EACC,UAAA;AAAA,UAAA,gBAAAvC,EAACpB,GAAA,EACC,UAAA,gBAAAoB,EAACwC,GAAA,CAAA,CAAS,GACZ;AAAA,UACA,gBAAAxC;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;AAEAoC,EAAW,cAAc;"}
|
|
1
|
+
{"version":3,"file":"date-picker-D6h7NeRV.es.js","sources":["../../src/components/date-picker/date-picker.slots.tsx","../../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 { 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\";\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: NodeJS.Timeout | 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 {/* TODO: translate hardcoded string */}\n <Text textStyle=\"xs\" fontWeight=\"500\" color=\"neutral.12\">\n Start time\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\";\n\nexport const DatePickerCustomContext = ({\n children,\n}: {\n children: React.ReactNode;\n}) => {\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 \"Enter time (hour)\";\n case \"minute\":\n return \"Enter time (hour and minute)\";\n case \"second\":\n return \"Enter time (hour, minute, and second)\";\n default:\n return \"Enter 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 onPress: () => datePickerState?.setValue(null),\n \"aria-label\": \"Clear input value\",\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","DatePickerTimeInput","hideTimeZone","hourCycle","locale","useLocale","datePickerState","useContext","DatePickerStateContext","granularity","dateValue","timeInputRef","useRef","previousDateRef","useEffect","timeoutId","container","activeElement","jsxs","Flex","jsx","Text","TimeInput","DatePickerCustomContext","children","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,GC9DNQ,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,EAAOF,CAAS;AAGxC,SAAID,MAAgB,QACX,QAITK,EAAU,MAAM;AAEd,QAAIC;AAEJ,QAAIL,KAAaG,EAAgB,SAAS,QAAQH,CAAS,MAAM,GAAG;AAGlE,YAAMM,IAAYL,EAAa,SACzBM,IAAgB,SAAS;AAK/B,MAHED,GAAW,SAASC,CAAa,KACjCA,GAAe,aAAa,MAAM,MAAM,iBAIxCF,IAAY,WAAW,MAAM;AAE3B,QAAIC,KACmBA,E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AEJ;AAEJ;AAEAoC,EAAW,cAAc;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const e=require("react/jsx-runtime"),q=require("./index-XyB4gGC8.cjs.js"),k=require("./create-slot-recipe-context-CHGQvGou.cjs.js"),S=require("@commercetools/nimbus-icons"),R=require("./DatePicker-
|
|
2
|
-
//# sourceMappingURL=date-range-picker-
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),q=require("./index-XyB4gGC8.cjs.js"),k=require("./create-slot-recipe-context-CHGQvGou.cjs.js"),S=require("@commercetools/nimbus-icons"),R=require("./DatePicker-DhT2ekYj.cjs.js"),P=require("./Dialog-CptyD9rP.cjs.js"),E=require("./Group-NyoRRxUI.cjs.js"),w=require("./extractStyleProps-wjyId_vK.cjs.js"),C=require("./icon-button-Dz81DR3X.cjs.js"),j=require("./text-DNjTZCtR.cjs.js"),D=require("./date-input-BiNLEpfR.cjs.js"),z=require("./range-calendar-p93X9--W.cjs.js"),y=require("./time-input-DBhELOKp.cjs.js"),f=require("react"),F=require("./context-D0_cRaDZ.cjs.js"),v=require("./flex-CDVfeTs4.cjs.js"),I=require("./Button-BLV4Eycw.cjs.js"),T=require("./utils-BHdR5Nww.cjs.js"),B=require("./DateField-iMlYFknq.cjs.js"),{withProvider:W,withContext:b}=k.createSlotRecipeContext({recipe:q.dateRangePickerSlotRecipe}),G=W("div","root"),A=b("div","group"),O=b("div","trigger"),H=b("div","popover"),L=b("div","calendar"),M=({hideTimeZone:s,hourCycle:o})=>{const{locale:t}=F.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),i=f.useContext(R.$06d5b8ec9ee5d538$export$80d7ae1f804790be),{granularity:p,value:r}=i,x=f.useRef(null),l=f.useRef(r);return p==="day"?null:(f.useEffect(()=>{let u;if(r?.start&&l.current?.start?.compare(r.start)!==0||r?.end&&l.current?.end?.compare(r.end)!==0){const c=x.current,m=document.activeElement;c?.contains(m)&&m?.getAttribute("role")==="spinbutton"||(u=setTimeout(()=>{if(c){const a=c.querySelector('[role="spinbutton"]');a&&a.focus()}},50))}return l.current=r,()=>{u&&clearTimeout(u)}},[r]),e.jsxs(v.Flex,{ref:x,borderTop:"solid-25",borderColor:"neutral.3",py:"300",px:"400",alignItems:"center",justifyContent:"center",gap:"200",children:[e.jsxs(v.Flex,{alignItems:"center",gap:"200",children:[e.jsx(j.Text,{textStyle:"xs",fontWeight:"500",color:"neutral.12",minWidth:"fit-content",children:"Start time"}),e.jsx(y.TimeInput,{slot:"startTimeInput",locale:t,variant:"ghost",size:"sm",hideTimeZone:s,hourCycle:o})]}),e.jsxs(v.Flex,{alignItems:"center",gap:"200",children:[e.jsx(j.Text,{textStyle:"xs",fontWeight:"500",color:"neutral.12",minWidth:"fit-content",children:"End time"}),e.jsx(y.TimeInput,{slot:"endTimeInput",locale:t,variant:"ghost",size:"sm",hideTimeZone:s,hourCycle:o})]})]}))},N=({children:s})=>{const o=T.$64fa3d84918910a7$export$fabf2dc03a41866e(I.$d2b4bc8c273e7be6$export$24d547caef80ccd1)||{},t=f.useContext(R.$06d5b8ec9ee5d538$export$80d7ae1f804790be),i=n=>n?.day&&n?.month&&n?.year,p=!t?.value||!i(t.value.start)||!i(t.value.end),{granularity:r}=t,x=t?.value?.start&&"hour"in t.value.start?t.value.start:null,l=t?.value?.end&&"hour"in t.value.end?t.value.end:null,u=o?.isDisabled,d=n=>{const a=n==="start"?"Start":"End";switch(r){case"hour":return`${a} time (hour)`;case"minute":return`${a} time (hour and minute)`;case"second":return`${a} time (hour, minute, and second)`;default:return`${a} time`}},c={calendarToggle:{...o,onPress:n=>{const a=document?.activeElement;a&&a.blur(),o.onPress?.(n)}},clear:{onPress:()=>t?.setValue(null),"aria-label":"Clear input value",isDisabled:u,style:p?{display:"none"}:void 0,"aria-hidden":p?!0:void 0}},m={startTimeInput:{value:x,onChange:n=>{if(n!==null&&t?.value?.start){const a=t.value,h=a.start,g=a.end;if(h&&g){const $=h.set({hour:n.hour,minute:n.minute||0,second:n.second||0,millisecond:n.millisecond||0});t.setValue({start:$,end:g})}}},granularity:r==="day"?void 0:r,"aria-label":d("start")},endTimeInput:{value:l,onChange:n=>{if(n!==null&&t?.value?.end){const a=t.value,h=a.start,g=a.end;if(h&&g){const $=g.set({hour:n.hour,minute:n.minute||0,second:n.second||0,millisecond:n.millisecond||0});t.setValue({start:h,end:$})}}},granularity:r==="day"?void 0:r,"aria-label":d("end")}};return e.jsx(T.$64fa3d84918910a7$export$2881499e37b75b9a,{values:[[I.$d2b4bc8c273e7be6$export$24d547caef80ccd1,{slots:c}],[B.$40825cdb76e74f70$export$8e17ddc448e87c1e,{slots:m}]],children:s})},V=s=>{const{granularity:o="day",hideTimeZone:t,hourCycle:i}=s,p=k.useSlotRecipe({recipe:q.dateRangePickerSlotRecipe}),[r,x]=p.splitVariantProps(s),[l,u]=w.extractStyleProps(x),{size:d="md"}=r,c=d==="md"?"xs":"2xs",m=o==="day"?s.shouldCloseOnSelect:!1;return e.jsx(G,{...r,...l,asChild:!0,children:e.jsx(R.$06d5b8ec9ee5d538$export$17334619f3ac2224,{...u,shouldCloseOnSelect:m,children:e.jsxs(N,{children:[e.jsx(A,{asChild:!0,children:e.jsxs(E.$a049562f99e7db0e$export$eb2fcfdbd7ba97d4,{children:[e.jsx(D.DateInput,{slot:"start",size:d,variant:"plain",width:"auto",hideTimeZone:t,hourCycle:i}),e.jsx(j.Text,{as:"span",px:"150",color:"neutral.11",userSelect:"none","aria-hidden":"true",slot:null,children:"–"}),e.jsx(D.DateInput,{slot:"end",size:d,variant:"plain",width:"auto",hideTimeZone:t,hourCycle:i}),e.jsxs(O,{children:[e.jsx(C.IconButton,{tone:"primary",variant:"ghost",size:c,slot:"clear",children:e.jsx(S.Close,{})}),e.jsx(C.IconButton,{tone:"primary",variant:"ghost",size:c,slot:"calendarToggle",children:e.jsx(S.CalendarMonth,{})})]})]})}),e.jsx(H,{asChild:!0,children:e.jsx(P.$07b14b47974efb58$export$5b6b19405a83ff9d,{placement:"bottom end",children:e.jsxs(P.$de32f1b87079253c$export$3ddf2d174ce01153,{children:[e.jsx(L,{children:e.jsx(z.RangeCalendar,{})}),e.jsx(M,{hideTimeZone:t,hourCycle:i})]})})})]})})})};V.displayName="DateRangePicker";exports.DateRangePicker=V;
|
|
2
|
+
//# sourceMappingURL=date-range-picker-BhWMCCGo.cjs.js.map
|
package/dist/chunks/{date-range-picker-lX9xNms_.cjs.js.map → date-range-picker-BhWMCCGo.cjs.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-range-picker-lX9xNms_.cjs.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: NodeJS.Timeout | 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":"mwBAyBM,CAAE,aAAAA,EAAc,YAAAC,CAAA,EAAgBC,0BAAwB,CAC5D,OAAQC,EAAAA,yBACV,CAAC,EAMYC,EAA0BJ,EAGrC,MAAO,MAAM,EAKFK,EAA2BJ,EAGtC,MAAO,OAAO,EAKHK,EAA6BL,EAGxC,MAAO,SAAS,EAKLM,EAA6BN,EAGxC,MAAO,SAAS,EAKLO,EAA8BP,EAGzC,MAAO,UAAU,EC9DNQ,EAA2B,CAAC,CACvC,aAAAC,EACA,UAAAC,CACF,IAAqC,CACnC,KAAM,CAAE,OAAAC,CAAA,EAAWC,4CAAA,EACbC,EAAuBC,EAAAA,WAAWC,2CAA2B,EAC7D,CAAE,YAAAC,EAAa,MAAAC,CAAA,EAAUJ,EACzBK,EAAeC,EAAAA,OAAuB,IAAI,EAC1CC,EAAmBD,EAAAA,OAAOF,CAAK,EAGrC,OAAID,IAAgB,MACX,MAITK,EAAAA,UAAU,IAAM,CACd,IAAIC,EAQJ,GAJGL,GAAO,OACNG,EAAiB,SAAS,OAAO,QAAQH,EAAM,KAAK,IAAM,GAC3DA,GAAO,KAAOG,EAAiB,SAAS,KAAK,QAAQH,EAAM,GAAG,IAAM,EAElD,CAGnB,MAAMM,EAAYL,EAAa,QACzBM,EAAgB,SAAS,cAE7BD,GAAW,SAASC,CAA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F,CAAA,CAAA,CACF,CAAA,CAAA,EAEJ,CAEJ,EAEA6C,EAAgB,YAAc"}
|
|
1
|
+
{"version":3,"file":"date-range-picker-BhWMCCGo.cjs.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: NodeJS.Timeout | 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":"mwBAyBM,CAAE,aAAAA,EAAc,YAAAC,CAAA,EAAgBC,0BAAwB,CAC5D,OAAQC,EAAAA,yBACV,CAAC,EAMYC,EAA0BJ,EAGrC,MAAO,MAAM,EAKFK,EAA2BJ,EAGtC,MAAO,OAAO,EAKHK,EAA6BL,EAGxC,MAAO,SAAS,EAKLM,EAA6BN,EAGxC,MAAO,SAAS,EAKLO,EAA8BP,EAGzC,MAAO,UAAU,EC9DNQ,EAA2B,CAAC,CACvC,aAAAC,EACA,UAAAC,CACF,IAAqC,CACnC,KAAM,CAAE,OAAAC,CAAA,EAAWC,4CAAA,EACbC,EAAuBC,EAAAA,WAAWC,2CAA2B,EAC7D,CAAE,YAAAC,EAAa,MAAAC,CAAA,EAAUJ,EACzBK,EAAeC,EAAAA,OAAuB,IAAI,EAC1CC,EAAmBD,EAAAA,OAAOF,CAAK,EAGrC,OAAID,IAAgB,MACX,MAITK,EAAAA,UAAU,IAAM,CACd,IAAIC,EAQJ,GAJGL,GAAO,OACNG,EAAiB,SAAS,OAAO,QAAQH,EAAM,KAAK,IAAM,GAC3DA,GAAO,KAAOG,EAAiB,SAAS,KAAK,QAAQH,EAAM,GAAG,IAAM,EAElD,CAGnB,MAAMM,EAAYL,EAAa,QACzBM,EAAgB,SAAS,cAE7BD,GAAW,SAASC,CAAa,GACjCA,GAAe,aAAa,MAAM,IAAM,eAIxCF,EAAY,WAAW,IAAM,CAE3B,GAAIC,EAAW,CACb,MAAME,EAAeF,EAAU,cAC7B,qBAAA,EAGEE,GACFA,EAAa,MAAA,CAEjB,CACF,EAAG,EAAE,EAET,CAEA,OAAAL,EAAiB,QAAUH,EAGpB,IAAM,CACPK,GACF,aAAaA,CAAS,CAE1B,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