@commercetools/nimbus 2.2.0 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{accordion-Dh0RVlNx.es.js → accordion-Cwy8ywRo.es.js} +2 -2
- package/dist/chunks/{accordion-Dh0RVlNx.es.js.map → accordion-Cwy8ywRo.es.js.map} +1 -1
- package/dist/chunks/{accordion-CVpg-FdJ.cjs.js → accordion-DvftRW7J.cjs.js} +2 -2
- package/dist/chunks/{accordion-CVpg-FdJ.cjs.js.map → accordion-DvftRW7J.cjs.js.map} +1 -1
- package/dist/chunks/{accordion.content-Cqet9SQ-.cjs.js → accordion.content-DBBMLq5x.cjs.js} +2 -2
- package/dist/chunks/{accordion.content-Cqet9SQ-.cjs.js.map → accordion.content-DBBMLq5x.cjs.js.map} +1 -1
- package/dist/chunks/{accordion.content-GGayEeqD.es.js → accordion.content-DR_1dtdK.es.js} +2 -2
- package/dist/chunks/{accordion.content-GGayEeqD.es.js.map → accordion.content-DR_1dtdK.es.js.map} +1 -1
- package/dist/chunks/{alert-pPmN9CXZ.cjs.js → alert-D5SDMEKA.cjs.js} +2 -2
- package/dist/chunks/{alert-pPmN9CXZ.cjs.js.map → alert-D5SDMEKA.cjs.js.map} +1 -1
- package/dist/chunks/{alert-DCgWOaY2.es.js → alert-WiLa3ap4.es.js} +2 -2
- package/dist/chunks/{alert-DCgWOaY2.es.js.map → alert-WiLa3ap4.es.js.map} +1 -1
- package/dist/chunks/{button-BR4fvcmi.cjs.js → button-Bz1hc0LL.cjs.js} +2 -2
- package/dist/chunks/{button-BR4fvcmi.cjs.js.map → button-Bz1hc0LL.cjs.js.map} +1 -1
- package/dist/chunks/{button-BEJnxXsL.es.js → button-CANeXX_D.es.js} +2 -2
- package/dist/chunks/{button-BEJnxXsL.es.js.map → button-CANeXX_D.es.js.map} +1 -1
- package/dist/chunks/{calendar-lSoXK-yt.es.js → calendar-Bnw0u0vz.es.js} +3 -3
- package/dist/chunks/{calendar-lSoXK-yt.es.js.map → calendar-Bnw0u0vz.es.js.map} +1 -1
- package/dist/chunks/{calendar-B01Vti5k.cjs.js → calendar-D0OrT88Y.cjs.js} +2 -2
- package/dist/chunks/{calendar-B01Vti5k.cjs.js.map → calendar-D0OrT88Y.cjs.js.map} +1 -1
- package/dist/chunks/{card-q5i119kB.es.js → card-BHw7lWYe.es.js} +2 -2
- package/dist/chunks/{card-q5i119kB.es.js.map → card-BHw7lWYe.es.js.map} +1 -1
- package/dist/chunks/{card-Bk3xHlo2.cjs.js → card-CgBcH7Zm.cjs.js} +2 -2
- package/dist/chunks/{card-Bk3xHlo2.cjs.js.map → card-CgBcH7Zm.cjs.js.map} +1 -1
- package/dist/chunks/{checkbox-BJANm94D.cjs.js → checkbox-BYBGaSV9.cjs.js} +2 -2
- package/dist/chunks/{checkbox-BJANm94D.cjs.js.map → checkbox-BYBGaSV9.cjs.js.map} +1 -1
- package/dist/chunks/{checkbox-CputcCVr.es.js → checkbox-UATxAVti.es.js} +2 -2
- package/dist/chunks/{checkbox-CputcCVr.es.js.map → checkbox-UATxAVti.es.js.map} +1 -1
- package/dist/chunks/{collapsible-motion-DvtUDuxb.es.js → collapsible-motion-BsyuKtxS.es.js} +2 -2
- package/dist/chunks/{collapsible-motion-DvtUDuxb.es.js.map → collapsible-motion-BsyuKtxS.es.js.map} +1 -1
- package/dist/chunks/{collapsible-motion-Biq0QGUr.cjs.js → collapsible-motion-Cj6ESwsR.cjs.js} +2 -2
- package/dist/chunks/{collapsible-motion-Biq0QGUr.cjs.js.map → collapsible-motion-Cj6ESwsR.cjs.js.map} +1 -1
- package/dist/chunks/{combobox-vjauyzlS.es.js → combobox-B30crY-T.es.js} +356 -344
- package/dist/chunks/combobox-B30crY-T.es.js.map +1 -0
- package/dist/chunks/combobox-D_L2EmTy.cjs.js +2 -0
- package/dist/chunks/combobox-D_L2EmTy.cjs.js.map +1 -0
- package/dist/chunks/{data-table-DA4SdIgU.es.js → data-table-B7orK0Y6.es.js} +953 -933
- package/dist/chunks/{data-table-DA4SdIgU.es.js.map → data-table-B7orK0Y6.es.js.map} +1 -1
- package/dist/chunks/data-table-Cg75JPdu.cjs.js +2 -0
- package/dist/chunks/{data-table-CBZLbe9h.cjs.js.map → data-table-Cg75JPdu.cjs.js.map} +1 -1
- package/dist/chunks/{date-input-DkYcGwBy.cjs.js → date-input-BL7owE4Q.cjs.js} +2 -2
- package/dist/chunks/{date-input-DkYcGwBy.cjs.js.map → date-input-BL7owE4Q.cjs.js.map} +1 -1
- package/dist/chunks/{date-input-Cd9q4qBj.es.js → date-input-Ba6r9wMb.es.js} +3 -3
- package/dist/chunks/{date-input-Cd9q4qBj.es.js.map → date-input-Ba6r9wMb.es.js.map} +1 -1
- package/dist/chunks/{date-picker-DQ5IZcRe.cjs.js → date-picker-Bm6DjFOx.cjs.js} +2 -2
- package/dist/chunks/{date-picker-DQ5IZcRe.cjs.js.map → date-picker-Bm6DjFOx.cjs.js.map} +1 -1
- package/dist/chunks/{date-picker-B8VVNXU3.es.js → date-picker-DwQ1WWNP.es.js} +7 -7
- package/dist/chunks/{date-picker-B8VVNXU3.es.js.map → date-picker-DwQ1WWNP.es.js.map} +1 -1
- package/dist/chunks/{date-range-picker-CO2HH0mY.cjs.js → date-range-picker-DaSUwkke.cjs.js} +2 -2
- package/dist/chunks/{date-range-picker-CO2HH0mY.cjs.js.map → date-range-picker-DaSUwkke.cjs.js.map} +1 -1
- package/dist/chunks/{date-range-picker-BnbKgO1E.es.js → date-range-picker-dw7c9idV.es.js} +7 -7
- package/dist/chunks/{date-range-picker-BnbKgO1E.es.js.map → date-range-picker-dw7c9idV.es.js.map} +1 -1
- package/dist/chunks/{date-range-picker-field-BuI6eLMY.es.js → date-range-picker-field-D-kCkHEF.es.js} +3 -3
- package/dist/chunks/{date-range-picker-field-BuI6eLMY.es.js.map → date-range-picker-field-D-kCkHEF.es.js.map} +1 -1
- package/dist/chunks/{date-range-picker-field-DcIo1YzI.cjs.js → date-range-picker-field-J2b1-A1l.cjs.js} +2 -2
- package/dist/chunks/{date-range-picker-field-DcIo1YzI.cjs.js.map → date-range-picker-field-J2b1-A1l.cjs.js.map} +1 -1
- package/dist/chunks/{dialog-gyrFT8w0.cjs.js → dialog-ByHd6RlA.cjs.js} +2 -2
- package/dist/chunks/{dialog-gyrFT8w0.cjs.js.map → dialog-ByHd6RlA.cjs.js.map} +1 -1
- package/dist/chunks/{dialog-DuS3dXVi.es.js → dialog-vnnSNnUC.es.js} +3 -3
- package/dist/chunks/{dialog-DuS3dXVi.es.js.map → dialog-vnnSNnUC.es.js.map} +1 -1
- package/dist/chunks/{draggable-list-fvTG-VYt.cjs.js → draggable-list-CGpLzk-D.cjs.js} +2 -2
- package/dist/chunks/{draggable-list-fvTG-VYt.cjs.js.map → draggable-list-CGpLzk-D.cjs.js.map} +1 -1
- package/dist/chunks/{draggable-list-z7a7tu_F.es.js → draggable-list-DR-559Qk.es.js} +5 -5
- package/dist/chunks/{draggable-list-z7a7tu_F.es.js.map → draggable-list-DR-559Qk.es.js.map} +1 -1
- package/dist/chunks/{drawer-BPcEUbUt.es.js → drawer-CasegOAE.es.js} +49 -49
- package/dist/chunks/drawer-CasegOAE.es.js.map +1 -0
- package/dist/chunks/drawer-CmxHDgtW.cjs.js +2 -0
- package/dist/chunks/drawer-CmxHDgtW.cjs.js.map +1 -0
- package/dist/chunks/{extract-style-props-B4hqila-.cjs.js → extract-style-props-BvvBKXOu.cjs.js} +2 -2
- package/dist/chunks/{extract-style-props-B4hqila-.cjs.js.map → extract-style-props-BvvBKXOu.cjs.js.map} +1 -1
- package/dist/chunks/{extract-style-props-BdibuNZ7.es.js → extract-style-props-CM4QZGaE.es.js} +2 -2
- package/dist/chunks/{extract-style-props-BdibuNZ7.es.js.map → extract-style-props-CM4QZGaE.es.js.map} +1 -1
- package/dist/chunks/{form-field-FdRNl2bZ.cjs.js → form-field-52--hhlj.cjs.js} +2 -2
- package/dist/chunks/{form-field-FdRNl2bZ.cjs.js.map → form-field-52--hhlj.cjs.js.map} +1 -1
- package/dist/chunks/{form-field-BfDU18h3.es.js → form-field-DCWDyNJx.es.js} +2 -2
- package/dist/chunks/{form-field-BfDU18h3.es.js.map → form-field-DCWDyNJx.es.js.map} +1 -1
- package/dist/chunks/{icon-button-CeB8_Yyr.cjs.js → icon-button-5pYAEokc.cjs.js} +2 -2
- package/dist/chunks/{icon-button-CeB8_Yyr.cjs.js.map → icon-button-5pYAEokc.cjs.js.map} +1 -1
- package/dist/chunks/{icon-button-CosIm3oY.es.js → icon-button-DhHKxd27.es.js} +2 -2
- package/dist/chunks/{icon-button-CosIm3oY.es.js.map → icon-button-DhHKxd27.es.js.map} +1 -1
- package/dist/chunks/{icon-toggle-button-C4Tnlt4t.cjs.js → icon-toggle-button-BsQzSrKe.cjs.js} +2 -2
- package/dist/chunks/{icon-toggle-button-C4Tnlt4t.cjs.js.map → icon-toggle-button-BsQzSrKe.cjs.js.map} +1 -1
- package/dist/chunks/{icon-toggle-button-8fX8JAXp.es.js → icon-toggle-button-C7HZUXh5.es.js} +2 -2
- package/dist/chunks/{icon-toggle-button-8fX8JAXp.es.js.map → icon-toggle-button-C7HZUXh5.es.js.map} +1 -1
- package/dist/chunks/{index-CVXB9mwf.cjs.js → index-CBRmb4jF.cjs.js} +2 -2
- package/dist/chunks/index-CBRmb4jF.cjs.js.map +1 -0
- package/dist/chunks/{index-C2qW4ynb.es.js → index-D3KlpJA5.es.js} +3 -3
- package/dist/chunks/index-D3KlpJA5.es.js.map +1 -0
- package/dist/chunks/{localized-field-D78l88ux.cjs.js → localized-field-BJTWKclB.cjs.js} +2 -2
- package/dist/chunks/{localized-field-D78l88ux.cjs.js.map → localized-field-BJTWKclB.cjs.js.map} +1 -1
- package/dist/chunks/{localized-field-DdeHzXdh.es.js → localized-field-CHXN7Zf1.es.js} +8 -8
- package/dist/chunks/{localized-field-DdeHzXdh.es.js.map → localized-field-CHXN7Zf1.es.js.map} +1 -1
- package/dist/chunks/{menu-Dno8yFDE.cjs.js → menu-Cu7gIVGQ.cjs.js} +2 -2
- package/dist/chunks/{menu-Dno8yFDE.cjs.js.map → menu-Cu7gIVGQ.cjs.js.map} +1 -1
- package/dist/chunks/{menu-Zlnps1eW.es.js → menu-SxqgiwJf.es.js} +2 -2
- package/dist/chunks/{menu-Zlnps1eW.es.js.map → menu-SxqgiwJf.es.js.map} +1 -1
- package/dist/chunks/{money-input-D65vrUj4.es.js → money-input-B5kFhLR0.es.js} +15 -15
- package/dist/chunks/{money-input-D65vrUj4.es.js.map → money-input-B5kFhLR0.es.js.map} +1 -1
- package/dist/chunks/{money-input-C9eVmgeL.cjs.js → money-input-CBKb1D73.cjs.js} +2 -2
- package/dist/chunks/{money-input-C9eVmgeL.cjs.js.map → money-input-CBKb1D73.cjs.js.map} +1 -1
- package/dist/chunks/{money-input-field-CSnaaDk-.es.js → money-input-field-0vXOOTvx.es.js} +3 -3
- package/dist/chunks/{money-input-field-CSnaaDk-.es.js.map → money-input-field-0vXOOTvx.es.js.map} +1 -1
- package/dist/chunks/{money-input-field-BGZ_9HKh.cjs.js → money-input-field-DjpKPCGo.cjs.js} +2 -2
- package/dist/chunks/{money-input-field-BGZ_9HKh.cjs.js.map → money-input-field-DjpKPCGo.cjs.js.map} +1 -1
- package/dist/chunks/{multiline-text-input-CULLuZBp.cjs.js → multiline-text-input-DN9yF7Di.cjs.js} +2 -2
- package/dist/chunks/{multiline-text-input-CULLuZBp.cjs.js.map → multiline-text-input-DN9yF7Di.cjs.js.map} +1 -1
- package/dist/chunks/{multiline-text-input-CrDTYrM3.es.js → multiline-text-input-DkruVK6m.es.js} +3 -3
- package/dist/chunks/{multiline-text-input-CrDTYrM3.es.js.map → multiline-text-input-DkruVK6m.es.js.map} +1 -1
- package/dist/chunks/{multiline-text-input-field-BX-w2v1Y.cjs.js → multiline-text-input-field-QLmo_I6Q.cjs.js} +2 -2
- package/dist/chunks/{multiline-text-input-field-BX-w2v1Y.cjs.js.map → multiline-text-input-field-QLmo_I6Q.cjs.js.map} +1 -1
- package/dist/chunks/{multiline-text-input-field-C6UTl_c8.es.js → multiline-text-input-field-ipwTTNg6.es.js} +3 -3
- package/dist/chunks/{multiline-text-input-field-C6UTl_c8.es.js.map → multiline-text-input-field-ipwTTNg6.es.js.map} +1 -1
- package/dist/chunks/{nimbus-provider-S02SpkpM.es.js → nimbus-provider-4H3HucGg.es.js} +2 -2
- package/dist/chunks/{nimbus-provider-S02SpkpM.es.js.map → nimbus-provider-4H3HucGg.es.js.map} +1 -1
- package/dist/chunks/{nimbus-provider-Dnu5ohMR.cjs.js → nimbus-provider-CbD64J_V.cjs.js} +2 -2
- package/dist/chunks/{nimbus-provider-Dnu5ohMR.cjs.js.map → nimbus-provider-CbD64J_V.cjs.js.map} +1 -1
- package/dist/chunks/{number-input-CR1hdy-B.cjs.js → number-input-B29DJ2_U.cjs.js} +2 -2
- package/dist/chunks/{number-input-CR1hdy-B.cjs.js.map → number-input-B29DJ2_U.cjs.js.map} +1 -1
- package/dist/chunks/{number-input-Dp13Mn-8.es.js → number-input-BVTqEzzS.es.js} +3 -3
- package/dist/chunks/{number-input-Dp13Mn-8.es.js.map → number-input-BVTqEzzS.es.js.map} +1 -1
- package/dist/chunks/{number-input-field-BDNpAP6t.cjs.js → number-input-field-DHBy_GKG.cjs.js} +2 -2
- package/dist/chunks/{number-input-field-BDNpAP6t.cjs.js.map → number-input-field-DHBy_GKG.cjs.js.map} +1 -1
- package/dist/chunks/{number-input-field-C90uFO4e.es.js → number-input-field-DenXeCQQ.es.js} +3 -3
- package/dist/chunks/{number-input-field-C90uFO4e.es.js.map → number-input-field-DenXeCQQ.es.js.map} +1 -1
- package/dist/chunks/{pagination-BlrGdyD5.es.js → pagination-BjUXs0hd.es.js} +4 -4
- package/dist/chunks/{pagination-BlrGdyD5.es.js.map → pagination-BjUXs0hd.es.js.map} +1 -1
- package/dist/chunks/{pagination-BIxlGft7.cjs.js → pagination-D8Tn2HGh.cjs.js} +2 -2
- package/dist/chunks/{pagination-BIxlGft7.cjs.js.map → pagination-D8Tn2HGh.cjs.js.map} +1 -1
- package/dist/chunks/{password-input-BVbQ42NG.cjs.js → password-input-DQM-caak.cjs.js} +2 -2
- package/dist/chunks/{password-input-BVbQ42NG.cjs.js.map → password-input-DQM-caak.cjs.js.map} +1 -1
- package/dist/chunks/{password-input-field-XXaNUALk.es.js → password-input-field-CNLpabCL.es.js} +3 -3
- package/dist/chunks/{password-input-field-XXaNUALk.es.js.map → password-input-field-CNLpabCL.es.js.map} +1 -1
- package/dist/chunks/{password-input-field-B5lWzWAQ.cjs.js → password-input-field-CgQEW15R.cjs.js} +2 -2
- package/dist/chunks/{password-input-field-B5lWzWAQ.cjs.js.map → password-input-field-CgQEW15R.cjs.js.map} +1 -1
- package/dist/chunks/{password-input-8bkpGOIX.es.js → password-input-vu3kFdzW.es.js} +3 -3
- package/dist/chunks/{password-input-8bkpGOIX.es.js.map → password-input-vu3kFdzW.es.js.map} +1 -1
- package/dist/chunks/{progress-bar-dRKyuT1-.cjs.js → progress-bar-CMRmoNou.cjs.js} +2 -2
- package/dist/chunks/{progress-bar-dRKyuT1-.cjs.js.map → progress-bar-CMRmoNou.cjs.js.map} +1 -1
- package/dist/chunks/{progress-bar-C2ZnGdLv.es.js → progress-bar-D99U1mF3.es.js} +2 -2
- package/dist/chunks/{progress-bar-C2ZnGdLv.es.js.map → progress-bar-D99U1mF3.es.js.map} +1 -1
- package/dist/chunks/{radio-input-BecbxXcF.cjs.js → radio-input-B91hQHjX.cjs.js} +2 -2
- package/dist/chunks/{radio-input-BecbxXcF.cjs.js.map → radio-input-B91hQHjX.cjs.js.map} +1 -1
- package/dist/chunks/{radio-input-DV-hhL4S.es.js → radio-input-S4OwAttR.es.js} +3 -3
- package/dist/chunks/{radio-input-DV-hhL4S.es.js.map → radio-input-S4OwAttR.es.js.map} +1 -1
- package/dist/chunks/{range-calendar-CEIaa08T.es.js → range-calendar-qoiJRxsH.es.js} +4 -4
- package/dist/chunks/{range-calendar-CEIaa08T.es.js.map → range-calendar-qoiJRxsH.es.js.map} +1 -1
- package/dist/chunks/{range-calendar-Dq5Gtsb6.cjs.js → range-calendar-tLrCZyTQ.cjs.js} +2 -2
- package/dist/chunks/{range-calendar-Dq5Gtsb6.cjs.js.map → range-calendar-tLrCZyTQ.cjs.js.map} +1 -1
- package/dist/chunks/{rich-text-input-CRGUa5d2.es.js → rich-text-input-COjV3y9x.es.js} +8 -8
- package/dist/chunks/{rich-text-input-CRGUa5d2.es.js.map → rich-text-input-COjV3y9x.es.js.map} +1 -1
- package/dist/chunks/{rich-text-input-Dml5F7pU.cjs.js → rich-text-input-Cx9u2DDm.cjs.js} +2 -2
- package/dist/chunks/{rich-text-input-Dml5F7pU.cjs.js.map → rich-text-input-Cx9u2DDm.cjs.js.map} +1 -1
- package/dist/chunks/scoped-search-input-DYOcOZ0t.cjs.js +2 -0
- package/dist/chunks/scoped-search-input-DYOcOZ0t.cjs.js.map +1 -0
- package/dist/chunks/scoped-search-input-Qf2F3cu-.es.js +151 -0
- package/dist/chunks/scoped-search-input-Qf2F3cu-.es.js.map +1 -0
- package/dist/chunks/{search-input-BDUJ48BC.es.js → search-input-Ba7KSi4m.es.js} +4 -4
- package/dist/chunks/{search-input-BDUJ48BC.es.js.map → search-input-Ba7KSi4m.es.js.map} +1 -1
- package/dist/chunks/{search-input-BNXlpYtP.cjs.js → search-input-DrTdsAJB.cjs.js} +2 -2
- package/dist/chunks/{search-input-BNXlpYtP.cjs.js.map → search-input-DrTdsAJB.cjs.js.map} +1 -1
- package/dist/chunks/{search-input-field-v60x1oiw.cjs.js → search-input-field-Dan6FtWD.cjs.js} +2 -2
- package/dist/chunks/{search-input-field-v60x1oiw.cjs.js.map → search-input-field-Dan6FtWD.cjs.js.map} +1 -1
- package/dist/chunks/{search-input-field-CEemw2P1.es.js → search-input-field-G080Ti8W.es.js} +3 -3
- package/dist/chunks/{search-input-field-CEemw2P1.es.js.map → search-input-field-G080Ti8W.es.js.map} +1 -1
- package/dist/chunks/{select-D9yYDW0d.es.js → select-B3w10lhg.es.js} +4 -4
- package/dist/chunks/{select-D9yYDW0d.es.js.map → select-B3w10lhg.es.js.map} +1 -1
- package/dist/chunks/{select-Dq_6o0BB.cjs.js → select-DzHoPh1S.cjs.js} +2 -2
- package/dist/chunks/{select-Dq_6o0BB.cjs.js.map → select-DzHoPh1S.cjs.js.map} +1 -1
- package/dist/chunks/{separator-u_4por07.cjs.js → separator-D0uGdP2M.cjs.js} +2 -2
- package/dist/chunks/{separator-u_4por07.cjs.js.map → separator-D0uGdP2M.cjs.js.map} +1 -1
- package/dist/chunks/{separator-BJ9k_D4l.es.js → separator-DX_ZJMkp.es.js} +3 -3
- package/dist/chunks/{separator-BJ9k_D4l.es.js.map → separator-DX_ZJMkp.es.js.map} +1 -1
- package/dist/chunks/{split-button-C94SY3qF.es.js → split-button-BGDUOZcq.es.js} +4 -4
- package/dist/chunks/{split-button-C94SY3qF.es.js.map → split-button-BGDUOZcq.es.js.map} +1 -1
- package/dist/chunks/{split-button-B4gVhpP9.cjs.js → split-button-Cu7MwPgo.cjs.js} +2 -2
- package/dist/chunks/{split-button-B4gVhpP9.cjs.js.map → split-button-Cu7MwPgo.cjs.js.map} +1 -1
- package/dist/chunks/{switch-Nn1Fbk5O.es.js → switch-GD8BjCPZ.es.js} +3 -3
- package/dist/chunks/{switch-Nn1Fbk5O.es.js.map → switch-GD8BjCPZ.es.js.map} +1 -1
- package/dist/chunks/{switch-CsiG41ZR.cjs.js → switch-dDLFRsag.cjs.js} +2 -2
- package/dist/chunks/{switch-CsiG41ZR.cjs.js.map → switch-dDLFRsag.cjs.js.map} +1 -1
- package/dist/chunks/{tabs-D0OPeQ_J.es.js → tabs-Dh_AK8jc.es.js} +38 -33
- package/dist/chunks/{tabs-D0OPeQ_J.es.js.map → tabs-Dh_AK8jc.es.js.map} +1 -1
- package/dist/chunks/tabs-Dxwwd4jH.cjs.js +2 -0
- package/dist/chunks/{tabs-iV08OTqG.cjs.js.map → tabs-Dxwwd4jH.cjs.js.map} +1 -1
- package/dist/chunks/{tag-group-BE8d6xcP.es.js → tag-group-CMfyCIc3.es.js} +2 -2
- package/dist/chunks/{tag-group-BE8d6xcP.es.js.map → tag-group-CMfyCIc3.es.js.map} +1 -1
- package/dist/chunks/{tag-group-BI8_32rM.cjs.js → tag-group-rbUwxsaP.cjs.js} +2 -2
- package/dist/chunks/{tag-group-BI8_32rM.cjs.js.map → tag-group-rbUwxsaP.cjs.js.map} +1 -1
- package/dist/chunks/{text-input-CCiZeQad.es.js → text-input-UaixbZjE.es.js} +3 -3
- package/dist/chunks/{text-input-CCiZeQad.es.js.map → text-input-UaixbZjE.es.js.map} +1 -1
- package/dist/chunks/{text-input-field-Cmht3hDK.cjs.js → text-input-field-C_Ykb6V3.cjs.js} +2 -2
- package/dist/chunks/{text-input-field-Cmht3hDK.cjs.js.map → text-input-field-C_Ykb6V3.cjs.js.map} +1 -1
- package/dist/chunks/{text-input-field-6Cj35cYL.es.js → text-input-field-ChGQsEAJ.es.js} +3 -3
- package/dist/chunks/{text-input-field-6Cj35cYL.es.js.map → text-input-field-ChGQsEAJ.es.js.map} +1 -1
- package/dist/chunks/{text-input-BlxK2Naj.cjs.js → text-input-n7jUFat6.cjs.js} +2 -2
- package/dist/chunks/{text-input-BlxK2Naj.cjs.js.map → text-input-n7jUFat6.cjs.js.map} +1 -1
- package/dist/chunks/{time-input-9Q5vV4UD.cjs.js → time-input-G64QnJLm.cjs.js} +2 -2
- package/dist/chunks/{time-input-9Q5vV4UD.cjs.js.map → time-input-G64QnJLm.cjs.js.map} +1 -1
- package/dist/chunks/{time-input-CCuIFoY2.es.js → time-input-T4jAE9kM.es.js} +3 -3
- package/dist/chunks/{time-input-CCuIFoY2.es.js.map → time-input-T4jAE9kM.es.js.map} +1 -1
- package/dist/chunks/{toggle-button-UcXy5q2C.es.js → toggle-button-J0Vys1xC.es.js} +3 -3
- package/dist/chunks/{toggle-button-UcXy5q2C.es.js.map → toggle-button-J0Vys1xC.es.js.map} +1 -1
- package/dist/chunks/{toggle-button-L7i1XaWg.cjs.js → toggle-button-aX7Gr-Ib.cjs.js} +2 -2
- package/dist/chunks/{toggle-button-L7i1XaWg.cjs.js.map → toggle-button-aX7Gr-Ib.cjs.js.map} +1 -1
- package/dist/chunks/{toolbar-D4fLFiSb.cjs.js → toolbar-Bw9mLuBU.cjs.js} +2 -2
- package/dist/chunks/{toolbar-D4fLFiSb.cjs.js.map → toolbar-Bw9mLuBU.cjs.js.map} +1 -1
- package/dist/chunks/{toolbar-C7-6gqba.es.js → toolbar-QZSD0kko.es.js} +3 -3
- package/dist/chunks/{toolbar-C7-6gqba.es.js.map → toolbar-QZSD0kko.es.js.map} +1 -1
- package/dist/components/accordion.cjs +1 -1
- package/dist/components/accordion.es.js +2 -2
- package/dist/components/alert.cjs +1 -1
- package/dist/components/alert.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/collapsible-motion.cjs +1 -1
- package/dist/components/collapsible-motion.es.js +1 -1
- package/dist/components/combobox.cjs +1 -1
- package/dist/components/combobox.es.js +1 -1
- package/dist/components/components.cjs +1 -1
- package/dist/components/components.es.js +1 -1
- package/dist/components/data-table/components/data-table.body.d.ts +1 -1
- package/dist/components/data-table/components/data-table.header.d.ts +1 -1
- package/dist/components/data-table/components/data-table.table.d.ts +1 -1
- package/dist/components/data-table/data-table.d.ts +3 -3
- package/dist/components/data-table/data-table.i18n.d.ts +5 -0
- package/dist/components/data-table/data-table.messages.d.ts +1 -1
- package/dist/components/data-table/intl/de.d.ts +1 -0
- package/dist/components/data-table/intl/en.d.ts +1 -0
- package/dist/components/data-table/intl/es.d.ts +1 -0
- package/dist/components/data-table/intl/fr-FR.d.ts +1 -0
- package/dist/components/data-table/intl/pt-BR.d.ts +1 -0
- package/dist/components/data-table.cjs +1 -1
- package/dist/components/data-table.es.js +1 -1
- package/dist/components/date-input.cjs +1 -1
- package/dist/components/date-input.es.js +1 -1
- package/dist/components/date-picker.cjs +1 -1
- package/dist/components/date-picker.es.js +1 -1
- package/dist/components/date-range-picker-field.cjs +1 -1
- package/dist/components/date-range-picker-field.es.js +1 -1
- package/dist/components/date-range-picker.cjs +1 -1
- package/dist/components/date-range-picker.es.js +1 -1
- package/dist/components/dialog.cjs +1 -1
- package/dist/components/dialog.es.js +1 -1
- package/dist/components/draggable-list.cjs +1 -1
- package/dist/components/draggable-list.es.js +1 -1
- package/dist/components/drawer.cjs +1 -1
- package/dist/components/drawer.es.js +1 -1
- package/dist/components/fields.cjs +1 -1
- package/dist/components/fields.es.js +7 -7
- package/dist/components/form-field.cjs +1 -1
- package/dist/components/form-field.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/localized-field.cjs +1 -1
- package/dist/components/localized-field.es.js +1 -1
- package/dist/components/money-input-field.cjs +1 -1
- package/dist/components/money-input-field.es.js +1 -1
- package/dist/components/money-input.cjs +1 -1
- package/dist/components/money-input.es.js +1 -1
- package/dist/components/multiline-text-input-field.cjs +1 -1
- package/dist/components/multiline-text-input-field.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-field.cjs +1 -1
- package/dist/components/number-input-field.es.js +1 -1
- package/dist/components/number-input.cjs +1 -1
- package/dist/components/number-input.es.js +1 -1
- package/dist/components/pagination.cjs +1 -1
- package/dist/components/pagination.es.js +1 -1
- package/dist/components/password-input-field.cjs +1 -1
- package/dist/components/password-input-field.es.js +1 -1
- package/dist/components/password-input.cjs +1 -1
- package/dist/components/password-input.es.js +1 -1
- package/dist/components/patterns.cjs +1 -1
- package/dist/components/patterns.es.js +7 -7
- package/dist/components/progress-bar.cjs +1 -1
- package/dist/components/progress-bar.es.js +1 -1
- package/dist/components/radio-input.cjs +1 -1
- package/dist/components/radio-input.es.js +1 -1
- package/dist/components/range-calendar.cjs +1 -1
- package/dist/components/range-calendar.es.js +1 -1
- package/dist/components/rich-text-input.cjs +1 -1
- package/dist/components/rich-text-input.es.js +1 -1
- package/dist/components/scoped-search-input.cjs +1 -1
- package/dist/components/scoped-search-input.es.js +1 -1
- package/dist/components/search-input-field.cjs +1 -1
- package/dist/components/search-input-field.es.js +1 -1
- package/dist/components/search-input.cjs +1 -1
- package/dist/components/search-input.es.js +1 -1
- package/dist/components/select.cjs +1 -1
- package/dist/components/select.es.js +1 -1
- package/dist/components/separator.cjs +1 -1
- package/dist/components/separator.es.js +1 -1
- package/dist/components/split-button.cjs +1 -1
- package/dist/components/split-button.es.js +1 -1
- package/dist/components/switch.cjs +1 -1
- package/dist/components/switch.es.js +1 -1
- package/dist/components/tabs/components/tabs.root.d.ts +1 -1
- package/dist/components/tabs/tabs.d.ts +1 -1
- package/dist/components/tabs/tabs.types.d.ts +5 -0
- package/dist/components/tabs.cjs +1 -1
- package/dist/components/tabs.es.js +1 -1
- package/dist/components/tag-group.cjs +1 -1
- package/dist/components/tag-group.es.js +1 -1
- package/dist/components/text-input-field.cjs +1 -1
- package/dist/components/text-input-field.es.js +1 -1
- package/dist/components/text-input.cjs +1 -1
- package/dist/components/text-input.es.js +1 -1
- package/dist/components/time-input.cjs +1 -1
- package/dist/components/time-input.es.js +1 -1
- package/dist/components/toggle-button.cjs +1 -1
- package/dist/components/toggle-button.es.js +1 -1
- package/dist/components/toolbar.cjs +1 -1
- package/dist/components/toolbar.es.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.es.js +53 -53
- package/dist/setup-jsdom-polyfills.cjs +1 -1
- package/dist/setup-jsdom-polyfills.cjs.map +1 -1
- package/dist/setup-jsdom-polyfills.es.js +17 -0
- package/dist/setup-jsdom-polyfills.es.js.map +1 -1
- package/package.json +5 -5
- package/dist/chunks/combobox-B7ck7gxL.cjs.js +0 -2
- package/dist/chunks/combobox-B7ck7gxL.cjs.js.map +0 -1
- package/dist/chunks/combobox-vjauyzlS.es.js.map +0 -1
- package/dist/chunks/data-table-CBZLbe9h.cjs.js +0 -2
- package/dist/chunks/drawer-BPcEUbUt.es.js.map +0 -1
- package/dist/chunks/drawer-DbSJSCl_.cjs.js +0 -2
- package/dist/chunks/drawer-DbSJSCl_.cjs.js.map +0 -1
- package/dist/chunks/index-C2qW4ynb.es.js.map +0 -1
- package/dist/chunks/index-CVXB9mwf.cjs.js.map +0 -1
- package/dist/chunks/scoped-search-input-CSpFefUJ.es.js +0 -147
- package/dist/chunks/scoped-search-input-CSpFefUJ.es.js.map +0 -1
- package/dist/chunks/scoped-search-input-DKCK7idN.cjs.js +0 -2
- package/dist/chunks/scoped-search-input-DKCK7idN.cjs.js.map +0 -1
- package/dist/chunks/tabs-iV08OTqG.cjs.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const e=require("react/jsx-runtime"),m=require("@chakra-ui/react"),n=require("./DateField-BxXzaXAv.cjs.js"),h=require("@chakra-ui/react/styled-system"),S=require("./index-
|
|
2
|
-
//# sourceMappingURL=date-input-
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),m=require("@chakra-ui/react"),n=require("./DateField-BxXzaXAv.cjs.js"),h=require("@chakra-ui/react/styled-system"),S=require("./index-CBRmb4jF.cjs.js"),g=require("./extract-style-props-BvvBKXOu.cjs.js"),{withProvider:j,withContext:t}=m.createSlotRecipeContext({key:"dateInput"}),I=j("div","root"),D=t("div","leadingElement"),$=t("div","trailingElement"),f=t("div","segmentGroup"),P=t("div","segment"),s=c=>{const o=h.useRecipe({recipe:S.dateInputSlotRecipe}),{leadingElement:r,trailingElement:i,...l}=c,[a,d]=o.splitVariantProps({...l}),[p,u]=g.extractStyleProps(d);return e.jsx(I,{...a,...p,asChild:!0,children:e.jsx(n.$40825cdb76e74f70$export$d9781c7894a82487,{...u,children:e.jsxs(e.Fragment,{children:[r&&e.jsx(D,{children:r}),e.jsx(f,{asChild:!0,children:e.jsx(n.$40825cdb76e74f70$export$7edc06cf1783b30f,{children:x=>e.jsx(P,{asChild:!0,children:e.jsx(n.$40825cdb76e74f70$export$336ab7fa954c4b5f,{segment:x})})})}),i&&e.jsx($,{children:i})]})})})};s.displayName="DateInput";exports.DateInput=s;
|
|
2
|
+
//# sourceMappingURL=date-input-BL7owE4Q.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-input-
|
|
1
|
+
{"version":3,"file":"date-input-BL7owE4Q.cjs.js","sources":["../../src/components/date-input/date-input.slots.tsx","../../src/components/date-input/date-input.tsx"],"sourcesContent":["import {\n type HTMLChakraProps,\n createSlotRecipeContext,\n} from \"@chakra-ui/react\";\nimport type { DateInputRootSlotProps } from \"./date-input.types\";\n\n// Correctly destructure from createSlotRecipeContext based on project examples\nconst { withProvider, withContext } = createSlotRecipeContext({\n key: \"dateInput\",\n});\n\n/**\n * Root component that provides the styling context for the DateInput component.\n * Uses Chakra UI's recipe context system for consistent styling across instances.\n */\nexport const DateInputRootSlot = withProvider<\n HTMLDivElement,\n DateInputRootSlotProps\n>(\"div\", \"root\");\n\nexport const DateInputLeadingElementSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"leadingElement\");\n\nexport const DateInputTrailingElementSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"trailingElement\");\n\n/**\n * Slot component for the DateField part of the DateInput.\n */\nexport const DateInputSegmentGroupSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"segmentGroup\");\n\n/**\n * Slot component for the DateField part of the DateInput.\n */\nexport const DateInputSegmentSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"segment\");\n","import {\n DateInputLeadingElementSlot,\n DateInputRootSlot,\n DateInputSegmentGroupSlot,\n DateInputSegmentSlot,\n DateInputTrailingElementSlot,\n} from \"./date-input.slots\";\n\nimport {\n DateField,\n DateInput as DateInputField,\n DateSegment,\n} from \"react-aria-components\";\nimport { useRecipe } from \"@chakra-ui/react/styled-system\";\nimport { dateInputSlotRecipe } from \"./date-input.recipe\";\nimport type { DateInputProps } from \"./date-input.types\";\nimport { extractStyleProps } from \"@/utils\";\n\n/**\n * # DateInput\n *\n * allows entering a date\n *\n * @see {@link https://nimbus-documentation.vercel.app/components/inputs/dateinput}\n */\nexport const DateInput = (props: DateInputProps) => {\n const recipe = useRecipe({ recipe: dateInputSlotRecipe });\n const { leadingElement, trailingElement, ...rest } = props;\n const [recipeProps, recipeFreeProps] = recipe.splitVariantProps({ ...rest });\n const [styleProps, functionalProps] = extractStyleProps(recipeFreeProps);\n\n return (\n <DateInputRootSlot {...recipeProps} {...styleProps} asChild>\n <DateField {...functionalProps}>\n <>\n {leadingElement && (\n <DateInputLeadingElementSlot>\n {leadingElement}\n </DateInputLeadingElementSlot>\n )}\n <DateInputSegmentGroupSlot asChild>\n <DateInputField>\n {(segment) => (\n <DateInputSegmentSlot asChild>\n <DateSegment segment={segment} />\n </DateInputSegmentSlot>\n )}\n </DateInputField>\n </DateInputSegmentGroupSlot>\n {trailingElement && (\n <DateInputTrailingElementSlot>\n {trailingElement}\n </DateInputTrailingElementSlot>\n )}\n </>\n </DateField>\n </DateInputRootSlot>\n );\n};\n\nDateInput.displayName = \"DateInput\";\n"],"names":["withProvider","withContext","createSlotRecipeContext","DateInputRootSlot","DateInputLeadingElementSlot","DateInputTrailingElementSlot","DateInputSegmentGroupSlot","DateInputSegmentSlot","DateInput","props","recipe","useRecipe","dateInputSlotRecipe","leadingElement","trailingElement","rest","recipeProps","recipeFreeProps","styleProps","functionalProps","extractStyleProps","jsx","DateField","jsxs","Fragment","DateInputField","segment","DateSegment"],"mappings":"6PAOM,CAAE,aAAAA,EAAc,YAAAC,CAAA,EAAgBC,0BAAwB,CAC5D,IAAK,WACP,CAAC,EAMYC,EAAoBH,EAG/B,MAAO,MAAM,EAEFI,EAA8BH,EAGzC,MAAO,gBAAgB,EAEZI,EAA+BJ,EAG1C,MAAO,iBAAiB,EAKbK,EAA4BL,EAGvC,MAAO,cAAc,EAKVM,EAAuBN,EAGlC,MAAO,SAAS,ECnBLO,EAAaC,GAA0B,CAClD,MAAMC,EAASC,EAAAA,UAAU,CAAE,OAAQC,EAAAA,oBAAqB,EAClD,CAAE,eAAAC,EAAgB,gBAAAC,EAAiB,GAAGC,GAASN,EAC/C,CAACO,EAAaC,CAAe,EAAIP,EAAO,kBAAkB,CAAE,GAAGK,EAAM,EACrE,CAACG,EAAYC,CAAe,EAAIC,EAAAA,kBAAkBH,CAAe,EAEvE,OACEI,EAAAA,IAAClB,EAAA,CAAmB,GAAGa,EAAc,GAAGE,EAAY,QAAO,GACzD,SAAAG,EAAAA,IAACC,EAAAA,0CAAA,CAAW,GAAGH,EACb,SAAAI,OAAAC,EAAAA,SAAA,CACG,SAAA,CAAAX,GACCQ,EAAAA,IAACjB,GACE,SAAAS,CAAA,CACH,QAEDP,EAAA,CAA0B,QAAO,GAChC,SAAAe,EAAAA,IAACI,6CACE,SAACC,GACAL,EAAAA,IAACd,EAAA,CAAqB,QAAO,GAC3B,SAAAc,EAAAA,IAACM,6CAAY,QAAAD,CAAA,CAAkB,EACjC,EAEJ,CAAA,CACF,EACCZ,GACCO,EAAAA,IAAChB,EAAA,CACE,SAAAS,CAAA,CACH,CAAA,CAAA,CAEJ,EACF,EACF,CAEJ,EAEAN,EAAU,YAAc"}
|
|
@@ -2,8 +2,8 @@ import { jsx as e, jsxs as m, Fragment as u } from "react/jsx-runtime";
|
|
|
2
2
|
import { createSlotRecipeContext as f } from "@chakra-ui/react";
|
|
3
3
|
import { $ as h, a as g, b as S } from "./DateField-DCWy1Ysp.es.js";
|
|
4
4
|
import { useRecipe as $ } from "@chakra-ui/react/styled-system";
|
|
5
|
-
import { d as x } from "./index-
|
|
6
|
-
import { e as I } from "./extract-style-props-
|
|
5
|
+
import { d as x } from "./index-D3KlpJA5.es.js";
|
|
6
|
+
import { e as I } from "./extract-style-props-CM4QZGaE.es.js";
|
|
7
7
|
const { withProvider: D, withContext: t } = /* @__PURE__ */ f({
|
|
8
8
|
key: "dateInput"
|
|
9
9
|
}), b = /* @__PURE__ */ D("div", "root"), P = /* @__PURE__ */ t("div", "leadingElement"), v = /* @__PURE__ */ t("div", "trailingElement"), E = /* @__PURE__ */ t("div", "segmentGroup"), C = /* @__PURE__ */ t("div", "segment"), y = (o) => {
|
|
@@ -18,4 +18,4 @@ y.displayName = "DateInput";
|
|
|
18
18
|
export {
|
|
19
19
|
y as D
|
|
20
20
|
};
|
|
21
|
-
//# sourceMappingURL=date-input-
|
|
21
|
+
//# sourceMappingURL=date-input-Ba6r9wMb.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-input-
|
|
1
|
+
{"version":3,"file":"date-input-Ba6r9wMb.es.js","sources":["../../src/components/date-input/date-input.slots.tsx","../../src/components/date-input/date-input.tsx"],"sourcesContent":["import {\n type HTMLChakraProps,\n createSlotRecipeContext,\n} from \"@chakra-ui/react\";\nimport type { DateInputRootSlotProps } from \"./date-input.types\";\n\n// Correctly destructure from createSlotRecipeContext based on project examples\nconst { withProvider, withContext } = createSlotRecipeContext({\n key: \"dateInput\",\n});\n\n/**\n * Root component that provides the styling context for the DateInput component.\n * Uses Chakra UI's recipe context system for consistent styling across instances.\n */\nexport const DateInputRootSlot = withProvider<\n HTMLDivElement,\n DateInputRootSlotProps\n>(\"div\", \"root\");\n\nexport const DateInputLeadingElementSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"leadingElement\");\n\nexport const DateInputTrailingElementSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"trailingElement\");\n\n/**\n * Slot component for the DateField part of the DateInput.\n */\nexport const DateInputSegmentGroupSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"segmentGroup\");\n\n/**\n * Slot component for the DateField part of the DateInput.\n */\nexport const DateInputSegmentSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"segment\");\n","import {\n DateInputLeadingElementSlot,\n DateInputRootSlot,\n DateInputSegmentGroupSlot,\n DateInputSegmentSlot,\n DateInputTrailingElementSlot,\n} from \"./date-input.slots\";\n\nimport {\n DateField,\n DateInput as DateInputField,\n DateSegment,\n} from \"react-aria-components\";\nimport { useRecipe } from \"@chakra-ui/react/styled-system\";\nimport { dateInputSlotRecipe } from \"./date-input.recipe\";\nimport type { DateInputProps } from \"./date-input.types\";\nimport { extractStyleProps } from \"@/utils\";\n\n/**\n * # DateInput\n *\n * allows entering a date\n *\n * @see {@link https://nimbus-documentation.vercel.app/components/inputs/dateinput}\n */\nexport const DateInput = (props: DateInputProps) => {\n const recipe = useRecipe({ recipe: dateInputSlotRecipe });\n const { leadingElement, trailingElement, ...rest } = props;\n const [recipeProps, recipeFreeProps] = recipe.splitVariantProps({ ...rest });\n const [styleProps, functionalProps] = extractStyleProps(recipeFreeProps);\n\n return (\n <DateInputRootSlot {...recipeProps} {...styleProps} asChild>\n <DateField {...functionalProps}>\n <>\n {leadingElement && (\n <DateInputLeadingElementSlot>\n {leadingElement}\n </DateInputLeadingElementSlot>\n )}\n <DateInputSegmentGroupSlot asChild>\n <DateInputField>\n {(segment) => (\n <DateInputSegmentSlot asChild>\n <DateSegment segment={segment} />\n </DateInputSegmentSlot>\n )}\n </DateInputField>\n </DateInputSegmentGroupSlot>\n {trailingElement && (\n <DateInputTrailingElementSlot>\n {trailingElement}\n </DateInputTrailingElementSlot>\n )}\n </>\n </DateField>\n </DateInputRootSlot>\n );\n};\n\nDateInput.displayName = \"DateInput\";\n"],"names":["withProvider","withContext","createSlotRecipeContext","DateInputRootSlot","DateInputLeadingElementSlot","DateInputTrailingElementSlot","DateInputSegmentGroupSlot","DateInputSegmentSlot","DateInput","props","recipe","useRecipe","dateInputSlotRecipe","leadingElement","trailingElement","rest","recipeProps","recipeFreeProps","styleProps","functionalProps","extractStyleProps","jsx","DateField","jsxs","Fragment","DateInputField","segment","DateSegment"],"mappings":";;;;;;AAOA,MAAM,EAAE,cAAAA,GAAc,aAAAC,EAAA,IAAgB,gBAAAC,EAAwB;AAAA,EAC5D,KAAK;AACP,CAAC,GAMYC,IAAoB,gBAAAH,EAG/B,OAAO,MAAM,GAEFI,IAA8B,gBAAAH,EAGzC,OAAO,gBAAgB,GAEZI,IAA+B,gBAAAJ,EAG1C,OAAO,iBAAiB,GAKbK,IAA4B,gBAAAL,EAGvC,OAAO,cAAc,GAKVM,IAAuB,gBAAAN,EAGlC,OAAO,SAAS,GCnBLO,IAAY,CAACC,MAA0B;AAClD,QAAMC,IAASC,EAAU,EAAE,QAAQC,GAAqB,GAClD,EAAE,gBAAAC,GAAgB,iBAAAC,GAAiB,GAAGC,MAASN,GAC/C,CAACO,GAAaC,CAAe,IAAIP,EAAO,kBAAkB,EAAE,GAAGK,GAAM,GACrE,CAACG,GAAYC,CAAe,IAAIC,EAAkBH,CAAe;AAEvE,SACE,gBAAAI,EAAClB,GAAA,EAAmB,GAAGa,GAAc,GAAGE,GAAY,SAAO,IACzD,UAAA,gBAAAG,EAACC,GAAA,EAAW,GAAGH,GACb,UAAA,gBAAAI,EAAAC,GAAA,EACG,UAAA;AAAA,IAAAX,KACC,gBAAAQ,EAACjB,KACE,UAAAS,EAAA,CACH;AAAA,sBAEDP,GAAA,EAA0B,SAAO,IAChC,UAAA,gBAAAe,EAACI,KACE,UAAA,CAACC,MACA,gBAAAL,EAACd,GAAA,EAAqB,SAAO,IAC3B,UAAA,gBAAAc,EAACM,KAAY,SAAAD,EAAA,CAAkB,GACjC,GAEJ,EAAA,CACF;AAAA,IACCZ,KACC,gBAAAO,EAAChB,GAAA,EACE,UAAAS,EAAA,CACH;AAAA,EAAA,EAAA,CAEJ,GACF,GACF;AAEJ;AAEAN,EAAU,cAAc;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const e=require("react/jsx-runtime"),y=require("@chakra-ui/react"),g=require("@commercetools/nimbus-icons"),x=require("./DatePicker-NWRDzwUt.cjs.js"),S=require("./Dialog-CSr6lHSd.cjs.js"),j=require("./Group-1nWkximy.cjs.js"),k=require("@chakra-ui/react/styled-system"),q=require("./index-
|
|
2
|
-
//# sourceMappingURL=date-picker-
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),y=require("@chakra-ui/react"),g=require("@commercetools/nimbus-icons"),x=require("./DatePicker-NWRDzwUt.cjs.js"),S=require("./Dialog-CSr6lHSd.cjs.js"),j=require("./Group-1nWkximy.cjs.js"),k=require("@chakra-ui/react/styled-system"),q=require("./index-CBRmb4jF.cjs.js"),C=require("./extract-style-props-BvvBKXOu.cjs.js"),h=require("react"),$=require("./Button-DLCecw8f.cjs.js"),P=require("./utils-DVb3jcp5.cjs.js"),H=require("./DateField-BxXzaXAv.cjs.js"),d=require("./normalize-messages-CaDzkuUm.cjs.js"),D=require("./date-input-BL7owE4Q.cjs.js"),z=require("./calendar-D0OrT88Y.cjs.js"),E=require("./time-input-G64QnJLm.cjs.js"),R=require("@chakra-ui/react/flex"),B=require("./text-BtRhIklG.cjs.js"),F=require("./box-CWni3A32.cjs.js"),I=require("./icon-button-5pYAEokc.cjs.js"),{withProvider:V,withContext:f}=y.createSlotRecipeContext({key:"datePicker"}),w=V("div","root"),Z=f("div","group"),_=f("div","popover"),L=f("div","calendar"),G={"Time.enterTime":"Enter time","Time.enterTimeHour":"Enter time (hour)","Time.enterTimeHourMinute":"Enter time (hour and minute)","Time.enterTimeHourMinuteSecond":"Enter time (hour, minute, and second)","Time.startTime":"Start time",clearInput:"Clear input value"},A={"Time.enterTime":"Zeit eingeben","Time.enterTimeHour":"Zeit eingeben (Stunde)","Time.enterTimeHourMinute":"Zeit eingeben (Stunde und Minute)","Time.enterTimeHourMinuteSecond":"Zeit eingeben (Stunde, Minute und Sekunde)","Time.startTime":"Startzeit",clearInput:"Eingabewert löschen"},O={"Time.enterTime":"Indicar tiempo","Time.enterTimeHour":"Indicar tiempo (hora)","Time.enterTimeHourMinute":"Indicar tiempo (hora y minuto)","Time.enterTimeHourMinuteSecond":"Indicar tiempo (hora, minuto y segundo)","Time.startTime":"Iniciar tiempo",clearInput:"Eliminar valor de entrada"},N={"Time.enterTime":"Saisir l'heure","Time.enterTimeHour":"Saisir l'heure (heure)","Time.enterTimeHourMinute":"Saisir l'heure (heure et minute)","Time.enterTimeHourMinuteSecond":"Saisir l'heure (heure, minute et seconde)","Time.startTime":"Heure de début",clearInput:"Effacer la valeur saisie"},W={"Time.enterTime":"Inserir hora","Time.enterTimeHour":"Inserir hora (hora)","Time.enterTimeHourMinute":"Inserir hora (hora e minutos)","Time.enterTimeHourMinuteSecond":"Inserir hora (hora, minutos e segundos)","Time.startTime":"Hora de início",clearInput:"Limpar valores inseridos"},M={en:d.normalizeMessages(G),de:d.normalizeMessages(A),es:d.normalizeMessages(O),"fr-FR":d.normalizeMessages(N),"pt-BR":d.normalizeMessages(W)},J=({children:n})=>{const t=d.useLocalizedStringFormatter(M),o=P.$64fa3d84918910a7$export$fabf2dc03a41866e($.$d2b4bc8c273e7be6$export$24d547caef80ccd1)||{},s=h.useContext(x.$06d5b8ec9ee5d538$export$50a10c048fdcdee9),a=s?.dateValue===null,{timeValue:r,setTimeValue:m,granularity:i}=s,c=o?.isDisabled,u=()=>{switch(i){case"hour":return t.format("Time.enterTimeHour");case"minute":return t.format("Time.enterTimeHourMinute");case"second":return t.format("Time.enterTimeHourMinuteSecond");default:return t.format("Time.enterTime")}},T={calendarToggle:{...o,onPress:l=>{const b=document?.activeElement;b&&b.blur(),o.onPress?.(l)}},clear:{onPress:()=>s?.setValue(null),"aria-label":t.format("clearInput"),isDisabled:c,style:a?{display:"none"}:void 0,"aria-hidden":a?!0:void 0}},p={timeInput:{value:r,onChange:l=>{l!==null&&m(l)},granularity:i==="day"?void 0:i,"aria-label":u()}};return e.jsx(P.$64fa3d84918910a7$export$2881499e37b75b9a,{values:[[$.$d2b4bc8c273e7be6$export$24d547caef80ccd1,{slots:T}],[H.$40825cdb76e74f70$export$8e17ddc448e87c1e,{slots:p}]],children:n})},K=({hideTimeZone:n,hourCycle:t})=>{const o=d.useLocalizedStringFormatter(M),s=h.useContext(x.$06d5b8ec9ee5d538$export$50a10c048fdcdee9),{granularity:a,dateValue:r}=s,m=h.useRef(null),i=h.useRef(r);return a==="day"?null:(h.useEffect(()=>{let c;if(r&&i.current?.compare(r)!==0){const u=m.current,T=document.activeElement;u?.contains(T)&&T?.getAttribute("role")==="spinbutton"||(c=setTimeout(()=>{u&&u.querySelector('[role="spinbutton"]')?.focus()},50))}return i.current=r,()=>{c&&clearTimeout(c)}},[r]),e.jsxs(R.Flex,{ref:m,borderTop:"solid-25",borderColor:"neutral.3",py:"300",px:"400",alignItems:"center",justifyContent:"center",gap:"200",children:[e.jsx(B.Text,{textStyle:"xs",fontWeight:"500",color:"neutral.12",children:o.format("Time.startTime")}),e.jsx(E.TimeInput,{slot:"timeInput",variant:"ghost",size:"sm",hideTimeZone:n,hourCycle:t})]}))},v=n=>{const{size:t="md",variant:o,granularity:s="day",hideTimeZone:a,hourCycle:r}=n,m=k.useSlotRecipe({recipe:q.datePickerSlotRecipe}),[i,c]=m.splitVariantProps(n),[u,T]=C.extractStyleProps(c),p=t==="md"?"xs":"2xs",l=s==="day"?n.shouldCloseOnSelect:!1;return e.jsx(w,{...i,...u,asChild:!0,children:e.jsx(x.$06d5b8ec9ee5d538$export$5109c6dd95d8fb00,{...T,shouldCloseOnSelect:l,children:e.jsxs(J,{children:[e.jsx(Z,{asChild:!0,children:e.jsx(j.$a049562f99e7db0e$export$eb2fcfdbd7ba97d4,{children:e.jsx(D.DateInput,{size:t,variant:o,width:"full",hideTimeZone:a,hourCycle:r,trailingElement:e.jsxs(F.Box,{children:[e.jsx(I.IconButton,{variant:"ghost",size:p,slot:"clear",children:e.jsx(g.Close,{})}),e.jsx(I.IconButton,{variant:"ghost",size:p,slot:"calendarToggle",children:e.jsx(g.CalendarMonth,{})})]})})})}),e.jsx(_,{asChild:!0,children:e.jsx(S.$07b14b47974efb58$export$5b6b19405a83ff9d,{placement:"bottom end",children:e.jsxs(S.$de32f1b87079253c$export$3ddf2d174ce01153,{children:[e.jsx(L,{children:e.jsx(z.Calendar,{})}),e.jsx(K,{hideTimeZone:a,hourCycle:r})]})})})]})})})};v.displayName="DatePicker";exports.DatePicker=v;
|
|
2
|
+
//# sourceMappingURL=date-picker-Bm6DjFOx.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-picker-DQ5IZcRe.cjs.js","sources":["../../src/components/date-picker/date-picker.slots.tsx","../../src/components/date-picker/intl/en.ts","../../src/components/date-picker/intl/de.ts","../../src/components/date-picker/intl/es.ts","../../src/components/date-picker/intl/fr-FR.ts","../../src/components/date-picker/intl/pt-BR.ts","../../src/components/date-picker/date-picker.messages.ts","../../src/components/date-picker/components/date-picker.custom-context.tsx","../../src/components/date-picker/components/date-picker.time-input.tsx","../../src/components/date-picker/date-picker.tsx"],"sourcesContent":["import {\n type HTMLChakraProps,\n createSlotRecipeContext,\n} from \"@chakra-ui/react\";\nimport type { DatePickerRootSlotProps } from \"./date-picker.types\";\n\n// Correctly destructure from createSlotRecipeContext based on project examples\nconst { withProvider, withContext } = createSlotRecipeContext({\n key: \"datePicker\",\n});\n\n/**\n * Root component that provides the styling context for the DatePicker component.\n * Uses Chakra UI's recipe context system for consistent styling across instances.\n */\nexport const DatePickerRootSlot = withProvider<\n HTMLDivElement,\n DatePickerRootSlotProps\n>(\"div\", \"root\");\n\n/**\n * Slot component for the input group containing the DateInput.\n */\nexport const DatePickerGroupSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"group\");\n\n/**\n * Slot component for the popover container.\n */\nexport const DatePickerPopoverSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"popover\");\n\n/**\n * Slot component for the calendar container within the popover.\n */\nexport const DatePickerCalendarSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"calendar\");\n\n/**\n * Slot component for the calendar header.\n */\nexport const DatePickerCalendarHeaderSlot = withContext<\n HTMLElement,\n HTMLChakraProps<\"header\">\n>(\"header\", \"calendarHeader\");\n\n/**\n * Slot component for the calendar grid.\n */\nexport const DatePickerCalendarGridSlot = withContext<\n HTMLTableElement,\n HTMLChakraProps<\"table\">\n>(\"table\", \"calendarGrid\");\n\n/**\n * Slot component for individual calendar cells.\n */\nexport const DatePickerCalendarCellSlot = withContext<\n HTMLTableCellElement,\n HTMLChakraProps<\"td\">\n>(\"td\", \"calendarCell\");\n","/**\n * Pre-compiled en messages for DatePicker\n * Generated by @internationalized/string-compiler\n * DO NOT EDIT MANUALLY\n */\n\nexport default {\n \"Time.enterTime\": `Enter time`,\n \"Time.enterTimeHour\": `Enter time (hour)`,\n \"Time.enterTimeHourMinute\": `Enter time (hour and minute)`,\n \"Time.enterTimeHourMinuteSecond\": `Enter time (hour, minute, and second)`,\n \"Time.startTime\": `Start time`,\n clearInput: `Clear input value`,\n};\n","/**\n * Pre-compiled de messages for DatePicker\n * Generated by @internationalized/string-compiler\n * DO NOT EDIT MANUALLY\n */\n\nexport default {\n \"Time.enterTime\": `Zeit eingeben`,\n \"Time.enterTimeHour\": `Zeit eingeben (Stunde)`,\n \"Time.enterTimeHourMinute\": `Zeit eingeben (Stunde und Minute)`,\n \"Time.enterTimeHourMinuteSecond\": `Zeit eingeben (Stunde, Minute und Sekunde)`,\n \"Time.startTime\": `Startzeit`,\n clearInput: `Eingabewert löschen`,\n};\n","/**\n * Pre-compiled es messages for DatePicker\n * Generated by @internationalized/string-compiler\n * DO NOT EDIT MANUALLY\n */\n\nexport default {\n \"Time.enterTime\": `Indicar tiempo`,\n \"Time.enterTimeHour\": `Indicar tiempo (hora)`,\n \"Time.enterTimeHourMinute\": `Indicar tiempo (hora y minuto)`,\n \"Time.enterTimeHourMinuteSecond\": `Indicar tiempo (hora, minuto y segundo)`,\n \"Time.startTime\": `Iniciar tiempo`,\n clearInput: `Eliminar valor de entrada`,\n};\n","/**\n * Pre-compiled fr-FR messages for DatePicker\n * Generated by @internationalized/string-compiler\n * DO NOT EDIT MANUALLY\n */\n\nexport default {\n \"Time.enterTime\": `Saisir l'heure`,\n \"Time.enterTimeHour\": `Saisir l'heure (heure)`,\n \"Time.enterTimeHourMinute\": `Saisir l'heure (heure et minute)`,\n \"Time.enterTimeHourMinuteSecond\": `Saisir l'heure (heure, minute et seconde)`,\n \"Time.startTime\": `Heure de début`,\n clearInput: `Effacer la valeur saisie`,\n};\n","/**\n * Pre-compiled pt-BR messages for DatePicker\n * Generated by @internationalized/string-compiler\n * DO NOT EDIT MANUALLY\n */\n\nexport default {\n \"Time.enterTime\": `Inserir hora`,\n \"Time.enterTimeHour\": `Inserir hora (hora)`,\n \"Time.enterTimeHourMinute\": `Inserir hora (hora e minutos)`,\n \"Time.enterTimeHourMinuteSecond\": `Inserir hora (hora, minutos e segundos)`,\n \"Time.startTime\": `Hora de início`,\n clearInput: `Limpar valores inseridos`,\n};\n","/**\n * Pre-compiled localized messages for DatePicker component\n *\n * Generated by scripts/generate-dictionaries.ts\n * DO NOT EDIT MANUALLY\n *\n * @see https://react-spectrum.adobe.com/react-aria/internationalization.html\n */\n\nimport {\n type LocalizedString,\n type LocalizedStrings,\n} from \"@internationalized/string\";\nimport { normalizeMessages } from \"../../utils/normalize-messages\";\n\n// Pre-compiled message functions\nimport datePickerMessages_en from \"./intl/en\";\nimport datePickerMessages_de from \"./intl/de\";\nimport datePickerMessages_es from \"./intl/es\";\nimport datePickerMessages_fr from \"./intl/fr-FR\";\nimport datePickerMessages_pt from \"./intl/pt-BR\";\n\n// Raw LocalizedStrings object for use with useLocalizedStringFormatter hook\nexport const datePickerMessagesStrings: LocalizedStrings<\n string,\n LocalizedString\n> = {\n en: normalizeMessages(datePickerMessages_en),\n de: normalizeMessages(datePickerMessages_de),\n es: normalizeMessages(datePickerMessages_es),\n \"fr-FR\": normalizeMessages(datePickerMessages_fr),\n \"pt-BR\": normalizeMessages(datePickerMessages_pt),\n} as LocalizedStrings<string, LocalizedString>;\n\n/**\n * Available message keys for DatePicker component\n */\nexport type DatePickerMessageKey =\n | \"Time.enterTime\"\n | \"Time.enterTimeHour\"\n | \"Time.enterTimeHourMinute\"\n | \"Time.enterTimeHourMinuteSecond\"\n | \"Time.startTime\"\n | \"clearInput\";\n","import { useContext } from \"react\";\nimport {\n Provider,\n ButtonContext,\n DatePickerStateContext,\n TimeFieldContext,\n useSlottedContext,\n} from \"react-aria-components\";\nimport type { PressEvent, TimeValue } from \"react-aria\";\nimport { useLocalizedStringFormatter } from \"@/hooks\";\nimport { datePickerMessagesStrings } from \"../date-picker.messages\";\n\n/**\n * DatePickerCustomContext - Custom context provider for DatePicker\n *\n * Provides React Aria context overrides for button and time input slots,\n * enabling coordinated behavior between DatePicker parts.\n */\nexport const DatePickerCustomContext = ({\n children,\n}: {\n children: React.ReactNode;\n}) => {\n const msg = useLocalizedStringFormatter(datePickerMessagesStrings);\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 msg.format(\"Time.enterTimeHour\");\n case \"minute\":\n return msg.format(\"Time.enterTimeHourMinute\");\n case \"second\":\n return msg.format(\"Time.enterTimeHourMinuteSecond\");\n default:\n return msg.format(\"Time.enterTime\");\n }\n };\n\n /**\n * Button slots\n * ================================\n */\n const buttonSlots = {\n /** toggles the calendar popover */\n calendarToggle: {\n ...buttonContext,\n onPress: (event: PressEvent) => {\n // Ensure any active input (e.g., date picker segment) loses focus\n // because blurring the input will close the popover if it's open (or was just opened)\n const activeElement = document?.activeElement as HTMLElement | null;\n\n if (activeElement) {\n activeElement.blur();\n }\n\n buttonContext.onPress?.(event);\n },\n },\n /** Clear button that displays when there's a value in each segment - hidden from both visual and screen readers when there's no value */\n clear: {\n onPress: () => datePickerState?.setValue(null),\n \"aria-label\": msg.format(\"clearInput\"),\n isDisabled: isDatePickerDisabled,\n // Hide the button when there's no value\n style: noInputValue ? { display: \"none\" } : undefined,\n \"aria-hidden\": noInputValue ? true : undefined,\n },\n };\n\n /**\n * TimeInput slots\n * ================================\n */\n\n const timeInputSlots = {\n timeInput: {\n value: timeValue,\n onChange: (value: TimeValue | null) => {\n if (value !== null) {\n setTimeValue(value);\n }\n },\n granularity: granularity === \"day\" ? undefined : granularity,\n \"aria-label\": getDefaultTimeInputAriaLabel(),\n },\n };\n\n return (\n <Provider\n values={[\n [\n ButtonContext,\n {\n slots: buttonSlots,\n },\n ],\n [TimeFieldContext, { slots: timeInputSlots }],\n ]}\n >\n {children}\n </Provider>\n );\n};\n","import { Flex, Text, TimeInput } from \"@/components\";\nimport { useContext, useRef, useEffect } from \"react\";\nimport { DatePickerStateContext } from \"react-aria-components\";\nimport type { DatePickerTimeInputProps } from \"../date-picker.types\";\nimport { useLocalizedStringFormatter } from \"@/hooks\";\nimport { datePickerMessagesStrings } from \"../date-picker.messages\";\n\n/**\n * DatePickerTimeInput - Time input component displayed in DatePicker popover footer\n *\n * Only renders when granularity requires time selection (hour, minute, second).\n * Automatically focuses when user selects a date from the calendar.\n *\n * @supportsStyleProps\n */\nexport const DatePickerTimeInput = ({\n hideTimeZone,\n hourCycle,\n}: DatePickerTimeInputProps) => {\n const msg = useLocalizedStringFormatter(datePickerMessagesStrings);\n const datePickerState = useContext(DatePickerStateContext);\n const { granularity, dateValue } = datePickerState!;\n const timeInputRef = useRef<HTMLDivElement>(null);\n const previousDateRef = useRef(dateValue);\n\n // do not show up to the party if you're not invited\n if (granularity === \"day\") {\n return null;\n }\n\n // Focus the time input when date changes (user selects a date from calendar)\n useEffect(() => {\n // Check if date changed\n let timeoutId: ReturnType<typeof setTimeout> | undefined;\n\n if (dateValue && previousDateRef.current?.compare(dateValue) !== 0) {\n // Only auto-focus if no time input segment currently has focus\n // This prevents stealing focus during user interaction with time segments\n const container = timeInputRef.current;\n const activeElement = document.activeElement;\n const hasTimeSegmentFocus =\n container?.contains(activeElement) &&\n activeElement?.getAttribute(\"role\") === \"spinbutton\";\n\n if (!hasTimeSegmentFocus) {\n // Small delay to ensure the DOM is ready\n timeoutId = setTimeout(() => {\n // Find the first focusable segment within the time input container\n if (container) {\n const firstSegment = container.querySelector(\n '[role=\"spinbutton\"]'\n ) as HTMLElement;\n firstSegment?.focus();\n }\n }, 50);\n }\n }\n\n previousDateRef.current = dateValue;\n\n // Cleanup timeout on effect re-run or unmount to prevent memory leaks\n return () => {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n };\n }, [dateValue]);\n\n return (\n <Flex\n ref={timeInputRef}\n borderTop=\"solid-25\"\n borderColor=\"neutral.3\"\n py=\"300\"\n px=\"400\"\n alignItems=\"center\"\n justifyContent=\"center\"\n gap=\"200\"\n >\n <Text textStyle=\"xs\" fontWeight=\"500\" color=\"neutral.12\">\n {msg.format(\"Time.startTime\")}\n </Text>\n <TimeInput\n slot=\"timeInput\"\n variant=\"ghost\"\n size=\"sm\"\n hideTimeZone={hideTimeZone}\n hourCycle={hourCycle}\n />\n </Flex>\n );\n};\n","import {\n DatePickerRootSlot,\n DatePickerGroupSlot,\n DatePickerPopoverSlot,\n DatePickerCalendarSlot,\n} from \"./date-picker.slots\";\n\nimport { CalendarMonth, Close } from \"@commercetools/nimbus-icons\";\n\nimport {\n DatePicker as ReactAriaDatePicker,\n Group,\n Popover,\n Dialog,\n} from \"react-aria-components\";\nimport { useSlotRecipe } from \"@chakra-ui/react/styled-system\";\nimport { datePickerSlotRecipe } from \"./date-picker.recipe\";\nimport type { DatePickerProps } from \"./date-picker.types\";\nimport { extractStyleProps } from \"@/utils\";\nimport { DateInput, Calendar, IconButton, Box } from \"@/components\";\nimport { DatePickerTimeInput, DatePickerCustomContext } from \"./components\";\n\n/**\n * # DatePicker\n *\n * a UI component for users to enter or select a specific calendar date.\n *\n * @see {@link https://nimbus-documentation.vercel.app/components/inputs/datepicker}\n */\nexport const DatePicker = (props: DatePickerProps) => {\n const {\n size = \"md\",\n variant,\n granularity = \"day\",\n hideTimeZone,\n hourCycle,\n } = props;\n const recipe = useSlotRecipe({ recipe: datePickerSlotRecipe });\n const [recipeProps, remainingProps] = recipe.splitVariantProps(props);\n const [styleProps, otherProps] = extractStyleProps(remainingProps);\n\n // the size of the buttons overlaying the input\n const overlayButtonSize = size === \"md\" ? \"xs\" : \"2xs\";\n\n // When granularity is \"day\", use the prop value (defaults to true if not provided)\n // For other granularities (time-based), force to false so users can set both date and time\n const shouldCloseOnSelect =\n granularity === \"day\" ? props.shouldCloseOnSelect : false;\n\n return (\n <DatePickerRootSlot {...recipeProps} {...styleProps} asChild>\n <ReactAriaDatePicker\n {...otherProps}\n shouldCloseOnSelect={shouldCloseOnSelect}\n >\n <DatePickerCustomContext>\n <DatePickerGroupSlot asChild>\n <Group>\n <DateInput\n size={size}\n variant={variant}\n width=\"full\"\n hideTimeZone={hideTimeZone}\n hourCycle={hourCycle}\n trailingElement={\n <Box>\n <IconButton\n variant=\"ghost\"\n size={overlayButtonSize}\n slot=\"clear\"\n >\n <Close />\n </IconButton>\n <IconButton\n variant=\"ghost\"\n size={overlayButtonSize}\n slot=\"calendarToggle\"\n >\n <CalendarMonth />\n </IconButton>\n </Box>\n }\n />\n </Group>\n </DatePickerGroupSlot>\n <DatePickerPopoverSlot asChild>\n <Popover placement=\"bottom end\">\n <Dialog>\n <DatePickerCalendarSlot>\n <Calendar />\n </DatePickerCalendarSlot>\n <DatePickerTimeInput\n hideTimeZone={hideTimeZone}\n hourCycle={hourCycle}\n />\n </Dialog>\n </Popover>\n </DatePickerPopoverSlot>\n </DatePickerCustomContext>\n </ReactAriaDatePicker>\n </DatePickerRootSlot>\n );\n};\n\nDatePicker.displayName = \"DatePicker\";\n"],"names":["withProvider","withContext","createSlotRecipeContext","DatePickerRootSlot","DatePickerGroupSlot","DatePickerPopoverSlot","DatePickerCalendarSlot","datePickerMessages_en","datePickerMessages_de","datePickerMessages_es","datePickerMessages_fr","datePickerMessages_pt","datePickerMessagesStrings","normalizeMessages","DatePickerCustomContext","children","msg","useLocalizedStringFormatter","buttonContext","useSlottedContext","ButtonContext","datePickerState","useContext","DatePickerStateContext","noInputValue","timeValue","setTimeValue","granularity","isDatePickerDisabled","getDefaultTimeInputAriaLabel","buttonSlots","event","activeElement","timeInputSlots","value","jsx","Provider","TimeFieldContext","DatePickerTimeInput","hideTimeZone","hourCycle","dateValue","timeInputRef","useRef","previousDateRef","useEffect","timeoutId","container","jsxs","Flex","Text","TimeInput","DatePicker","props","size","variant","recipe","useSlotRecipe","datePickerSlotRecipe","recipeProps","remainingProps","styleProps","otherProps","extractStyleProps","overlayButtonSize","shouldCloseOnSelect","ReactAriaDatePicker","Group","DateInput","Box","IconButton","Close","CalendarMonth","Popover","Dialog","Calendar"],"mappings":"4zBAOM,CAAE,aAAAA,EAAc,YAAAC,CAAA,EAAgBC,0BAAwB,CAC5D,IAAK,YACP,CAAC,EAMYC,EAAqBH,EAGhC,MAAO,MAAM,EAKFI,EAAsBH,EAGjC,MAAO,OAAO,EAKHI,EAAwBJ,EAGnC,MAAO,SAAS,EAKLK,EAAyBL,EAGpC,MAAO,UAAU,ECpCnBM,EAAe,CACb,iBAAkB,aAClB,qBAAsB,oBACtB,2BAA4B,+BAC5B,iCAAkC,wCAClC,iBAAkB,aAClB,WAA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mC,EAAAA,WAAA,CACC,QAAQ,QACR,KAAMN,EACN,KAAK,QAEL,eAACO,EAAAA,MAAA,CAAA,CAAM,CAAA,CAAA,EAETpC,EAAAA,IAACmC,EAAAA,WAAA,CACC,QAAQ,QACR,KAAMN,EACN,KAAK,iBAEL,eAACQ,EAAAA,cAAA,CAAA,CAAc,CAAA,CAAA,CACjB,CAAA,CACF,CAAA,CAAA,EAGN,CAAA,CACF,EACArC,EAAAA,IAAC9B,GAAsB,QAAO,GAC5B,eAACoE,EAAAA,0CAAA,CAAQ,UAAU,aACjB,SAAAzB,EAAAA,KAAC0B,EAAAA,0CAAA,CACC,SAAA,CAAAvC,EAAAA,IAAC7B,EAAA,CACC,SAAA6B,EAAAA,IAACwC,EAAAA,SAAA,CAAA,CAAS,EACZ,EACAxC,EAAAA,IAACG,EAAA,CACC,aAAAC,EACA,UAAAC,CAAA,CAAA,CACF,CAAA,CACF,EACF,CAAA,CACF,CAAA,CAAA,CACF,CAAA,CAAA,EAEJ,CAEJ,EAEAY,EAAW,YAAc"}
|
|
1
|
+
{"version":3,"file":"date-picker-Bm6DjFOx.cjs.js","sources":["../../src/components/date-picker/date-picker.slots.tsx","../../src/components/date-picker/intl/en.ts","../../src/components/date-picker/intl/de.ts","../../src/components/date-picker/intl/es.ts","../../src/components/date-picker/intl/fr-FR.ts","../../src/components/date-picker/intl/pt-BR.ts","../../src/components/date-picker/date-picker.messages.ts","../../src/components/date-picker/components/date-picker.custom-context.tsx","../../src/components/date-picker/components/date-picker.time-input.tsx","../../src/components/date-picker/date-picker.tsx"],"sourcesContent":["import {\n type HTMLChakraProps,\n createSlotRecipeContext,\n} from \"@chakra-ui/react\";\nimport type { DatePickerRootSlotProps } from \"./date-picker.types\";\n\n// Correctly destructure from createSlotRecipeContext based on project examples\nconst { withProvider, withContext } = createSlotRecipeContext({\n key: \"datePicker\",\n});\n\n/**\n * Root component that provides the styling context for the DatePicker component.\n * Uses Chakra UI's recipe context system for consistent styling across instances.\n */\nexport const DatePickerRootSlot = withProvider<\n HTMLDivElement,\n DatePickerRootSlotProps\n>(\"div\", \"root\");\n\n/**\n * Slot component for the input group containing the DateInput.\n */\nexport const DatePickerGroupSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"group\");\n\n/**\n * Slot component for the popover container.\n */\nexport const DatePickerPopoverSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"popover\");\n\n/**\n * Slot component for the calendar container within the popover.\n */\nexport const DatePickerCalendarSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"calendar\");\n\n/**\n * Slot component for the calendar header.\n */\nexport const DatePickerCalendarHeaderSlot = withContext<\n HTMLElement,\n HTMLChakraProps<\"header\">\n>(\"header\", \"calendarHeader\");\n\n/**\n * Slot component for the calendar grid.\n */\nexport const DatePickerCalendarGridSlot = withContext<\n HTMLTableElement,\n HTMLChakraProps<\"table\">\n>(\"table\", \"calendarGrid\");\n\n/**\n * Slot component for individual calendar cells.\n */\nexport const DatePickerCalendarCellSlot = withContext<\n HTMLTableCellElement,\n HTMLChakraProps<\"td\">\n>(\"td\", \"calendarCell\");\n","/**\n * Pre-compiled en messages for DatePicker\n * Generated by @internationalized/string-compiler\n * DO NOT EDIT MANUALLY\n */\n\nexport default {\n \"Time.enterTime\": `Enter time`,\n \"Time.enterTimeHour\": `Enter time (hour)`,\n \"Time.enterTimeHourMinute\": `Enter time (hour and minute)`,\n \"Time.enterTimeHourMinuteSecond\": `Enter time (hour, minute, and second)`,\n \"Time.startTime\": `Start time`,\n clearInput: `Clear input value`,\n};\n","/**\n * Pre-compiled de messages for DatePicker\n * Generated by @internationalized/string-compiler\n * DO NOT EDIT MANUALLY\n */\n\nexport default {\n \"Time.enterTime\": `Zeit eingeben`,\n \"Time.enterTimeHour\": `Zeit eingeben (Stunde)`,\n \"Time.enterTimeHourMinute\": `Zeit eingeben (Stunde und Minute)`,\n \"Time.enterTimeHourMinuteSecond\": `Zeit eingeben (Stunde, Minute und Sekunde)`,\n \"Time.startTime\": `Startzeit`,\n clearInput: `Eingabewert löschen`,\n};\n","/**\n * Pre-compiled es messages for DatePicker\n * Generated by @internationalized/string-compiler\n * DO NOT EDIT MANUALLY\n */\n\nexport default {\n \"Time.enterTime\": `Indicar tiempo`,\n \"Time.enterTimeHour\": `Indicar tiempo (hora)`,\n \"Time.enterTimeHourMinute\": `Indicar tiempo (hora y minuto)`,\n \"Time.enterTimeHourMinuteSecond\": `Indicar tiempo (hora, minuto y segundo)`,\n \"Time.startTime\": `Iniciar tiempo`,\n clearInput: `Eliminar valor de entrada`,\n};\n","/**\n * Pre-compiled fr-FR messages for DatePicker\n * Generated by @internationalized/string-compiler\n * DO NOT EDIT MANUALLY\n */\n\nexport default {\n \"Time.enterTime\": `Saisir l'heure`,\n \"Time.enterTimeHour\": `Saisir l'heure (heure)`,\n \"Time.enterTimeHourMinute\": `Saisir l'heure (heure et minute)`,\n \"Time.enterTimeHourMinuteSecond\": `Saisir l'heure (heure, minute et seconde)`,\n \"Time.startTime\": `Heure de début`,\n clearInput: `Effacer la valeur saisie`,\n};\n","/**\n * Pre-compiled pt-BR messages for DatePicker\n * Generated by @internationalized/string-compiler\n * DO NOT EDIT MANUALLY\n */\n\nexport default {\n \"Time.enterTime\": `Inserir hora`,\n \"Time.enterTimeHour\": `Inserir hora (hora)`,\n \"Time.enterTimeHourMinute\": `Inserir hora (hora e minutos)`,\n \"Time.enterTimeHourMinuteSecond\": `Inserir hora (hora, minutos e segundos)`,\n \"Time.startTime\": `Hora de início`,\n clearInput: `Limpar valores inseridos`,\n};\n","/**\n * Pre-compiled localized messages for DatePicker component\n *\n * Generated by scripts/generate-dictionaries.ts\n * DO NOT EDIT MANUALLY\n *\n * @see https://react-spectrum.adobe.com/react-aria/internationalization.html\n */\n\nimport {\n type LocalizedString,\n type LocalizedStrings,\n} from \"@internationalized/string\";\nimport { normalizeMessages } from \"../../utils/normalize-messages\";\n\n// Pre-compiled message functions\nimport datePickerMessages_en from \"./intl/en\";\nimport datePickerMessages_de from \"./intl/de\";\nimport datePickerMessages_es from \"./intl/es\";\nimport datePickerMessages_fr from \"./intl/fr-FR\";\nimport datePickerMessages_pt from \"./intl/pt-BR\";\n\n// Raw LocalizedStrings object for use with useLocalizedStringFormatter hook\nexport const datePickerMessagesStrings: LocalizedStrings<\n string,\n LocalizedString\n> = {\n en: normalizeMessages(datePickerMessages_en),\n de: normalizeMessages(datePickerMessages_de),\n es: normalizeMessages(datePickerMessages_es),\n \"fr-FR\": normalizeMessages(datePickerMessages_fr),\n \"pt-BR\": normalizeMessages(datePickerMessages_pt),\n} as LocalizedStrings<string, LocalizedString>;\n\n/**\n * Available message keys for DatePicker component\n */\nexport type DatePickerMessageKey =\n | \"Time.enterTime\"\n | \"Time.enterTimeHour\"\n | \"Time.enterTimeHourMinute\"\n | \"Time.enterTimeHourMinuteSecond\"\n | \"Time.startTime\"\n | \"clearInput\";\n","import { useContext } from \"react\";\nimport {\n Provider,\n ButtonContext,\n DatePickerStateContext,\n TimeFieldContext,\n useSlottedContext,\n} from \"react-aria-components\";\nimport type { PressEvent, TimeValue } from \"react-aria\";\nimport { useLocalizedStringFormatter } from \"@/hooks\";\nimport { datePickerMessagesStrings } from \"../date-picker.messages\";\n\n/**\n * DatePickerCustomContext - Custom context provider for DatePicker\n *\n * Provides React Aria context overrides for button and time input slots,\n * enabling coordinated behavior between DatePicker parts.\n */\nexport const DatePickerCustomContext = ({\n children,\n}: {\n children: React.ReactNode;\n}) => {\n const msg = useLocalizedStringFormatter(datePickerMessagesStrings);\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 msg.format(\"Time.enterTimeHour\");\n case \"minute\":\n return msg.format(\"Time.enterTimeHourMinute\");\n case \"second\":\n return msg.format(\"Time.enterTimeHourMinuteSecond\");\n default:\n return msg.format(\"Time.enterTime\");\n }\n };\n\n /**\n * Button slots\n * ================================\n */\n const buttonSlots = {\n /** toggles the calendar popover */\n calendarToggle: {\n ...buttonContext,\n onPress: (event: PressEvent) => {\n // Ensure any active input (e.g., date picker segment) loses focus\n // because blurring the input will close the popover if it's open (or was just opened)\n const activeElement = document?.activeElement as HTMLElement | null;\n\n if (activeElement) {\n activeElement.blur();\n }\n\n buttonContext.onPress?.(event);\n },\n },\n /** Clear button that displays when there's a value in each segment - hidden from both visual and screen readers when there's no value */\n clear: {\n onPress: () => datePickerState?.setValue(null),\n \"aria-label\": msg.format(\"clearInput\"),\n isDisabled: isDatePickerDisabled,\n // Hide the button when there's no value\n style: noInputValue ? { display: \"none\" } : undefined,\n \"aria-hidden\": noInputValue ? true : undefined,\n },\n };\n\n /**\n * TimeInput slots\n * ================================\n */\n\n const timeInputSlots = {\n timeInput: {\n value: timeValue,\n onChange: (value: TimeValue | null) => {\n if (value !== null) {\n setTimeValue(value);\n }\n },\n granularity: granularity === \"day\" ? undefined : granularity,\n \"aria-label\": getDefaultTimeInputAriaLabel(),\n },\n };\n\n return (\n <Provider\n values={[\n [\n ButtonContext,\n {\n slots: buttonSlots,\n },\n ],\n [TimeFieldContext, { slots: timeInputSlots }],\n ]}\n >\n {children}\n </Provider>\n );\n};\n","import { Flex, Text, TimeInput } from \"@/components\";\nimport { useContext, useRef, useEffect } from \"react\";\nimport { DatePickerStateContext } from \"react-aria-components\";\nimport type { DatePickerTimeInputProps } from \"../date-picker.types\";\nimport { useLocalizedStringFormatter } from \"@/hooks\";\nimport { datePickerMessagesStrings } from \"../date-picker.messages\";\n\n/**\n * DatePickerTimeInput - Time input component displayed in DatePicker popover footer\n *\n * Only renders when granularity requires time selection (hour, minute, second).\n * Automatically focuses when user selects a date from the calendar.\n *\n * @supportsStyleProps\n */\nexport const DatePickerTimeInput = ({\n hideTimeZone,\n hourCycle,\n}: DatePickerTimeInputProps) => {\n const msg = useLocalizedStringFormatter(datePickerMessagesStrings);\n const datePickerState = useContext(DatePickerStateContext);\n const { granularity, dateValue } = datePickerState!;\n const timeInputRef = useRef<HTMLDivElement>(null);\n const previousDateRef = useRef(dateValue);\n\n // do not show up to the party if you're not invited\n if (granularity === \"day\") {\n return null;\n }\n\n // Focus the time input when date changes (user selects a date from calendar)\n useEffect(() => {\n // Check if date changed\n let timeoutId: ReturnType<typeof setTimeout> | undefined;\n\n if (dateValue && previousDateRef.current?.compare(dateValue) !== 0) {\n // Only auto-focus if no time input segment currently has focus\n // This prevents stealing focus during user interaction with time segments\n const container = timeInputRef.current;\n const activeElement = document.activeElement;\n const hasTimeSegmentFocus =\n container?.contains(activeElement) &&\n activeElement?.getAttribute(\"role\") === \"spinbutton\";\n\n if (!hasTimeSegmentFocus) {\n // Small delay to ensure the DOM is ready\n timeoutId = setTimeout(() => {\n // Find the first focusable segment within the time input container\n if (container) {\n const firstSegment = container.querySelector(\n '[role=\"spinbutton\"]'\n ) as HTMLElement;\n firstSegment?.focus();\n }\n }, 50);\n }\n }\n\n previousDateRef.current = dateValue;\n\n // Cleanup timeout on effect re-run or unmount to prevent memory leaks\n return () => {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n };\n }, [dateValue]);\n\n return (\n <Flex\n ref={timeInputRef}\n borderTop=\"solid-25\"\n borderColor=\"neutral.3\"\n py=\"300\"\n px=\"400\"\n alignItems=\"center\"\n justifyContent=\"center\"\n gap=\"200\"\n >\n <Text textStyle=\"xs\" fontWeight=\"500\" color=\"neutral.12\">\n {msg.format(\"Time.startTime\")}\n </Text>\n <TimeInput\n slot=\"timeInput\"\n variant=\"ghost\"\n size=\"sm\"\n hideTimeZone={hideTimeZone}\n hourCycle={hourCycle}\n />\n </Flex>\n );\n};\n","import {\n DatePickerRootSlot,\n DatePickerGroupSlot,\n DatePickerPopoverSlot,\n DatePickerCalendarSlot,\n} from \"./date-picker.slots\";\n\nimport { CalendarMonth, Close } from \"@commercetools/nimbus-icons\";\n\nimport {\n DatePicker as ReactAriaDatePicker,\n Group,\n Popover,\n Dialog,\n} from \"react-aria-components\";\nimport { useSlotRecipe } from \"@chakra-ui/react/styled-system\";\nimport { datePickerSlotRecipe } from \"./date-picker.recipe\";\nimport type { DatePickerProps } from \"./date-picker.types\";\nimport { extractStyleProps } from \"@/utils\";\nimport { DateInput, Calendar, IconButton, Box } from \"@/components\";\nimport { DatePickerTimeInput, DatePickerCustomContext } from \"./components\";\n\n/**\n * # DatePicker\n *\n * a UI component for users to enter or select a specific calendar date.\n *\n * @see {@link https://nimbus-documentation.vercel.app/components/inputs/datepicker}\n */\nexport const DatePicker = (props: DatePickerProps) => {\n const {\n size = \"md\",\n variant,\n granularity = \"day\",\n hideTimeZone,\n hourCycle,\n } = props;\n const recipe = useSlotRecipe({ recipe: datePickerSlotRecipe });\n const [recipeProps, remainingProps] = recipe.splitVariantProps(props);\n const [styleProps, otherProps] = extractStyleProps(remainingProps);\n\n // the size of the buttons overlaying the input\n const overlayButtonSize = size === \"md\" ? \"xs\" : \"2xs\";\n\n // When granularity is \"day\", use the prop value (defaults to true if not provided)\n // For other granularities (time-based), force to false so users can set both date and time\n const shouldCloseOnSelect =\n granularity === \"day\" ? props.shouldCloseOnSelect : false;\n\n return (\n <DatePickerRootSlot {...recipeProps} {...styleProps} asChild>\n <ReactAriaDatePicker\n {...otherProps}\n shouldCloseOnSelect={shouldCloseOnSelect}\n >\n <DatePickerCustomContext>\n <DatePickerGroupSlot asChild>\n <Group>\n <DateInput\n size={size}\n variant={variant}\n width=\"full\"\n hideTimeZone={hideTimeZone}\n hourCycle={hourCycle}\n trailingElement={\n <Box>\n <IconButton\n variant=\"ghost\"\n size={overlayButtonSize}\n slot=\"clear\"\n >\n <Close />\n </IconButton>\n <IconButton\n variant=\"ghost\"\n size={overlayButtonSize}\n slot=\"calendarToggle\"\n >\n <CalendarMonth />\n </IconButton>\n </Box>\n }\n />\n </Group>\n </DatePickerGroupSlot>\n <DatePickerPopoverSlot asChild>\n <Popover placement=\"bottom end\">\n <Dialog>\n <DatePickerCalendarSlot>\n <Calendar />\n </DatePickerCalendarSlot>\n <DatePickerTimeInput\n hideTimeZone={hideTimeZone}\n hourCycle={hourCycle}\n />\n </Dialog>\n </Popover>\n </DatePickerPopoverSlot>\n </DatePickerCustomContext>\n </ReactAriaDatePicker>\n </DatePickerRootSlot>\n );\n};\n\nDatePicker.displayName = \"DatePicker\";\n"],"names":["withProvider","withContext","createSlotRecipeContext","DatePickerRootSlot","DatePickerGroupSlot","DatePickerPopoverSlot","DatePickerCalendarSlot","datePickerMessages_en","datePickerMessages_de","datePickerMessages_es","datePickerMessages_fr","datePickerMessages_pt","datePickerMessagesStrings","normalizeMessages","DatePickerCustomContext","children","msg","useLocalizedStringFormatter","buttonContext","useSlottedContext","ButtonContext","datePickerState","useContext","DatePickerStateContext","noInputValue","timeValue","setTimeValue","granularity","isDatePickerDisabled","getDefaultTimeInputAriaLabel","buttonSlots","event","activeElement","timeInputSlots","value","jsx","Provider","TimeFieldContext","DatePickerTimeInput","hideTimeZone","hourCycle","dateValue","timeInputRef","useRef","previousDateRef","useEffect","timeoutId","container","jsxs","Flex","Text","TimeInput","DatePicker","props","size","variant","recipe","useSlotRecipe","datePickerSlotRecipe","recipeProps","remainingProps","styleProps","otherProps","extractStyleProps","overlayButtonSize","shouldCloseOnSelect","ReactAriaDatePicker","Group","DateInput","Box","IconButton","Close","CalendarMonth","Popover","Dialog","Calendar"],"mappings":"4zBAOM,CAAE,aAAAA,EAAc,YAAAC,CAAA,EAAgBC,0BAAwB,CAC5D,IAAK,YACP,CAAC,EAMYC,EAAqBH,EAGhC,MAAO,MAAM,EAKFI,EAAsBH,EAGjC,MAAO,OAAO,EAKHI,EAAwBJ,EAGnC,MAAO,SAAS,EAKLK,EAAyBL,EAGpC,MAAO,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C,KAAAd,EACA,QAAAC,EACA,MAAM,OACN,aAAAhB,EACA,UAAAC,EACA,uBACG6B,MAAA,CACC,SAAA,CAAAlC,EAAAA,IAACmC,EAAAA,WAAA,CACC,QAAQ,QACR,KAAMN,EACN,KAAK,QAEL,eAACO,EAAAA,MAAA,CAAA,CAAM,CAAA,CAAA,EAETpC,EAAAA,IAACmC,EAAAA,WAAA,CACC,QAAQ,QACR,KAAMN,EACN,KAAK,iBAEL,eAACQ,EAAAA,cAAA,CAAA,CAAc,CAAA,CAAA,CACjB,CAAA,CACF,CAAA,CAAA,EAGN,CAAA,CACF,EACArC,EAAAA,IAAC9B,GAAsB,QAAO,GAC5B,eAACoE,EAAAA,0CAAA,CAAQ,UAAU,aACjB,SAAAzB,EAAAA,KAAC0B,EAAAA,0CAAA,CACC,SAAA,CAAAvC,EAAAA,IAAC7B,EAAA,CACC,SAAA6B,EAAAA,IAACwC,EAAAA,SAAA,CAAA,CAAS,EACZ,EACAxC,EAAAA,IAACG,EAAA,CACC,aAAAC,EACA,UAAAC,CAAA,CAAA,CACF,CAAA,CACF,EACF,CAAA,CACF,CAAA,CAAA,CACF,CAAA,CAAA,EAEJ,CAEJ,EAEAY,EAAW,YAAc"}
|
|
@@ -5,20 +5,20 @@ import { b as $, c as M } from "./DatePicker-CL72jbDo.es.js";
|
|
|
5
5
|
import { $ as H, k as D } from "./Dialog-B0BQfdQa.es.js";
|
|
6
6
|
import { $ as E } from "./Group-BQc9LuMT.es.js";
|
|
7
7
|
import { useSlotRecipe as R } from "@chakra-ui/react/styled-system";
|
|
8
|
-
import { h as z } from "./index-
|
|
9
|
-
import { e as V } from "./extract-style-props-
|
|
8
|
+
import { h as z } from "./index-D3KlpJA5.es.js";
|
|
9
|
+
import { e as V } from "./extract-style-props-CM4QZGaE.es.js";
|
|
10
10
|
import { useContext as I, useRef as g, useEffect as w } from "react";
|
|
11
11
|
import { $ as S } from "./Button-BjcDZ5eb.es.js";
|
|
12
12
|
import { c as B, e as F } from "./utils-B6pV5ewr.es.js";
|
|
13
13
|
import { o as Z } from "./DateField-DCWy1Ysp.es.js";
|
|
14
14
|
import { n as T, u as x } from "./normalize-messages-D5T4I93D.es.js";
|
|
15
|
-
import { D as _ } from "./date-input-
|
|
16
|
-
import { C as j } from "./calendar-
|
|
17
|
-
import { T as L } from "./time-input-
|
|
15
|
+
import { D as _ } from "./date-input-Ba6r9wMb.es.js";
|
|
16
|
+
import { C as j } from "./calendar-Bnw0u0vz.es.js";
|
|
17
|
+
import { T as L } from "./time-input-T4jAE9kM.es.js";
|
|
18
18
|
import { Flex as A } from "@chakra-ui/react/flex";
|
|
19
19
|
import { T as G } from "./text-CIb_VDvO.es.js";
|
|
20
20
|
import { B as O } from "./box-DuBoAZvq.es.js";
|
|
21
|
-
import { I as P } from "./icon-button-
|
|
21
|
+
import { I as P } from "./icon-button-DhHKxd27.es.js";
|
|
22
22
|
const { withProvider: q, withContext: h } = /* @__PURE__ */ k({
|
|
23
23
|
key: "datePicker"
|
|
24
24
|
}), N = /* @__PURE__ */ q("div", "root"), W = /* @__PURE__ */ h("div", "group"), J = /* @__PURE__ */ h("div", "popover"), K = /* @__PURE__ */ h("div", "calendar"), Q = {
|
|
@@ -225,4 +225,4 @@ ie.displayName = "DatePicker";
|
|
|
225
225
|
export {
|
|
226
226
|
ie as D
|
|
227
227
|
};
|
|
228
|
-
//# sourceMappingURL=date-picker-
|
|
228
|
+
//# sourceMappingURL=date-picker-DwQ1WWNP.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-picker-B8VVNXU3.es.js","sources":["../../src/components/date-picker/date-picker.slots.tsx","../../src/components/date-picker/intl/en.ts","../../src/components/date-picker/intl/de.ts","../../src/components/date-picker/intl/es.ts","../../src/components/date-picker/intl/fr-FR.ts","../../src/components/date-picker/intl/pt-BR.ts","../../src/components/date-picker/date-picker.messages.ts","../../src/components/date-picker/components/date-picker.custom-context.tsx","../../src/components/date-picker/components/date-picker.time-input.tsx","../../src/components/date-picker/date-picker.tsx"],"sourcesContent":["import {\n type HTMLChakraProps,\n createSlotRecipeContext,\n} from \"@chakra-ui/react\";\nimport type { DatePickerRootSlotProps } from \"./date-picker.types\";\n\n// Correctly destructure from createSlotRecipeContext based on project examples\nconst { withProvider, withContext } = createSlotRecipeContext({\n key: \"datePicker\",\n});\n\n/**\n * Root component that provides the styling context for the DatePicker component.\n * Uses Chakra UI's recipe context system for consistent styling across instances.\n */\nexport const DatePickerRootSlot = withProvider<\n HTMLDivElement,\n DatePickerRootSlotProps\n>(\"div\", \"root\");\n\n/**\n * Slot component for the input group containing the DateInput.\n */\nexport const DatePickerGroupSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"group\");\n\n/**\n * Slot component for the popover container.\n */\nexport const DatePickerPopoverSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"popover\");\n\n/**\n * Slot component for the calendar container within the popover.\n */\nexport const DatePickerCalendarSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"calendar\");\n\n/**\n * Slot component for the calendar header.\n */\nexport const DatePickerCalendarHeaderSlot = withContext<\n HTMLElement,\n HTMLChakraProps<\"header\">\n>(\"header\", \"calendarHeader\");\n\n/**\n * Slot component for the calendar grid.\n */\nexport const DatePickerCalendarGridSlot = withContext<\n HTMLTableElement,\n HTMLChakraProps<\"table\">\n>(\"table\", \"calendarGrid\");\n\n/**\n * Slot component for individual calendar cells.\n */\nexport const DatePickerCalendarCellSlot = withContext<\n HTMLTableCellElement,\n HTMLChakraProps<\"td\">\n>(\"td\", \"calendarCell\");\n","/**\n * Pre-compiled en messages for DatePicker\n * Generated by @internationalized/string-compiler\n * DO NOT EDIT MANUALLY\n */\n\nexport default {\n \"Time.enterTime\": `Enter time`,\n \"Time.enterTimeHour\": `Enter time (hour)`,\n \"Time.enterTimeHourMinute\": `Enter time (hour and minute)`,\n \"Time.enterTimeHourMinuteSecond\": `Enter time (hour, minute, and second)`,\n \"Time.startTime\": `Start time`,\n clearInput: `Clear input value`,\n};\n","/**\n * Pre-compiled de messages for DatePicker\n * Generated by @internationalized/string-compiler\n * DO NOT EDIT MANUALLY\n */\n\nexport default {\n \"Time.enterTime\": `Zeit eingeben`,\n \"Time.enterTimeHour\": `Zeit eingeben (Stunde)`,\n \"Time.enterTimeHourMinute\": `Zeit eingeben (Stunde und Minute)`,\n \"Time.enterTimeHourMinuteSecond\": `Zeit eingeben (Stunde, Minute und Sekunde)`,\n \"Time.startTime\": `Startzeit`,\n clearInput: `Eingabewert löschen`,\n};\n","/**\n * Pre-compiled es messages for DatePicker\n * Generated by @internationalized/string-compiler\n * DO NOT EDIT MANUALLY\n */\n\nexport default {\n \"Time.enterTime\": `Indicar tiempo`,\n \"Time.enterTimeHour\": `Indicar tiempo (hora)`,\n \"Time.enterTimeHourMinute\": `Indicar tiempo (hora y minuto)`,\n \"Time.enterTimeHourMinuteSecond\": `Indicar tiempo (hora, minuto y segundo)`,\n \"Time.startTime\": `Iniciar tiempo`,\n clearInput: `Eliminar valor de entrada`,\n};\n","/**\n * Pre-compiled fr-FR messages for DatePicker\n * Generated by @internationalized/string-compiler\n * DO NOT EDIT MANUALLY\n */\n\nexport default {\n \"Time.enterTime\": `Saisir l'heure`,\n \"Time.enterTimeHour\": `Saisir l'heure (heure)`,\n \"Time.enterTimeHourMinute\": `Saisir l'heure (heure et minute)`,\n \"Time.enterTimeHourMinuteSecond\": `Saisir l'heure (heure, minute et seconde)`,\n \"Time.startTime\": `Heure de début`,\n clearInput: `Effacer la valeur saisie`,\n};\n","/**\n * Pre-compiled pt-BR messages for DatePicker\n * Generated by @internationalized/string-compiler\n * DO NOT EDIT MANUALLY\n */\n\nexport default {\n \"Time.enterTime\": `Inserir hora`,\n \"Time.enterTimeHour\": `Inserir hora (hora)`,\n \"Time.enterTimeHourMinute\": `Inserir hora (hora e minutos)`,\n \"Time.enterTimeHourMinuteSecond\": `Inserir hora (hora, minutos e segundos)`,\n \"Time.startTime\": `Hora de início`,\n clearInput: `Limpar valores inseridos`,\n};\n","/**\n * Pre-compiled localized messages for DatePicker component\n *\n * Generated by scripts/generate-dictionaries.ts\n * DO NOT EDIT MANUALLY\n *\n * @see https://react-spectrum.adobe.com/react-aria/internationalization.html\n */\n\nimport {\n type LocalizedString,\n type LocalizedStrings,\n} from \"@internationalized/string\";\nimport { normalizeMessages } from \"../../utils/normalize-messages\";\n\n// Pre-compiled message functions\nimport datePickerMessages_en from \"./intl/en\";\nimport datePickerMessages_de from \"./intl/de\";\nimport datePickerMessages_es from \"./intl/es\";\nimport datePickerMessages_fr from \"./intl/fr-FR\";\nimport datePickerMessages_pt from \"./intl/pt-BR\";\n\n// Raw LocalizedStrings object for use with useLocalizedStringFormatter hook\nexport const datePickerMessagesStrings: LocalizedStrings<\n string,\n LocalizedString\n> = {\n en: normalizeMessages(datePickerMessages_en),\n de: normalizeMessages(datePickerMessages_de),\n es: normalizeMessages(datePickerMessages_es),\n \"fr-FR\": normalizeMessages(datePickerMessages_fr),\n \"pt-BR\": normalizeMessages(datePickerMessages_pt),\n} as LocalizedStrings<string, LocalizedString>;\n\n/**\n * Available message keys for DatePicker component\n */\nexport type DatePickerMessageKey =\n | \"Time.enterTime\"\n | \"Time.enterTimeHour\"\n | \"Time.enterTimeHourMinute\"\n | \"Time.enterTimeHourMinuteSecond\"\n | \"Time.startTime\"\n | \"clearInput\";\n","import { useContext } from \"react\";\nimport {\n Provider,\n ButtonContext,\n DatePickerStateContext,\n TimeFieldContext,\n useSlottedContext,\n} from \"react-aria-components\";\nimport type { PressEvent, TimeValue } from \"react-aria\";\nimport { useLocalizedStringFormatter } from \"@/hooks\";\nimport { datePickerMessagesStrings } from \"../date-picker.messages\";\n\n/**\n * DatePickerCustomContext - Custom context provider for DatePicker\n *\n * Provides React Aria context overrides for button and time input slots,\n * enabling coordinated behavior between DatePicker parts.\n */\nexport const DatePickerCustomContext = ({\n children,\n}: {\n children: React.ReactNode;\n}) => {\n const msg = useLocalizedStringFormatter(datePickerMessagesStrings);\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 msg.format(\"Time.enterTimeHour\");\n case \"minute\":\n return msg.format(\"Time.enterTimeHourMinute\");\n case \"second\":\n return msg.format(\"Time.enterTimeHourMinuteSecond\");\n default:\n return msg.format(\"Time.enterTime\");\n }\n };\n\n /**\n * Button slots\n * ================================\n */\n const buttonSlots = {\n /** toggles the calendar popover */\n calendarToggle: {\n ...buttonContext,\n onPress: (event: PressEvent) => {\n // Ensure any active input (e.g., date picker segment) loses focus\n // because blurring the input will close the popover if it's open (or was just opened)\n const activeElement = document?.activeElement as HTMLElement | null;\n\n if (activeElement) {\n activeElement.blur();\n }\n\n buttonContext.onPress?.(event);\n },\n },\n /** Clear button that displays when there's a value in each segment - hidden from both visual and screen readers when there's no value */\n clear: {\n onPress: () => datePickerState?.setValue(null),\n \"aria-label\": msg.format(\"clearInput\"),\n isDisabled: isDatePickerDisabled,\n // Hide the button when there's no value\n style: noInputValue ? { display: \"none\" } : undefined,\n \"aria-hidden\": noInputValue ? true : undefined,\n },\n };\n\n /**\n * TimeInput slots\n * ================================\n */\n\n const timeInputSlots = {\n timeInput: {\n value: timeValue,\n onChange: (value: TimeValue | null) => {\n if (value !== null) {\n setTimeValue(value);\n }\n },\n granularity: granularity === \"day\" ? undefined : granularity,\n \"aria-label\": getDefaultTimeInputAriaLabel(),\n },\n };\n\n return (\n <Provider\n values={[\n [\n ButtonContext,\n {\n slots: buttonSlots,\n },\n ],\n [TimeFieldContext, { slots: timeInputSlots }],\n ]}\n >\n {children}\n </Provider>\n );\n};\n","import { Flex, Text, TimeInput } from \"@/components\";\nimport { useContext, useRef, useEffect } from \"react\";\nimport { DatePickerStateContext } from \"react-aria-components\";\nimport type { DatePickerTimeInputProps } from \"../date-picker.types\";\nimport { useLocalizedStringFormatter } from \"@/hooks\";\nimport { datePickerMessagesStrings } from \"../date-picker.messages\";\n\n/**\n * DatePickerTimeInput - Time input component displayed in DatePicker popover footer\n *\n * Only renders when granularity requires time selection (hour, minute, second).\n * Automatically focuses when user selects a date from the calendar.\n *\n * @supportsStyleProps\n */\nexport const DatePickerTimeInput = ({\n hideTimeZone,\n hourCycle,\n}: DatePickerTimeInputProps) => {\n const msg = useLocalizedStringFormatter(datePickerMessagesStrings);\n const datePickerState = useContext(DatePickerStateContext);\n const { granularity, dateValue } = datePickerState!;\n const timeInputRef = useRef<HTMLDivElement>(null);\n const previousDateRef = useRef(dateValue);\n\n // do not show up to the party if you're not invited\n if (granularity === \"day\") {\n return null;\n }\n\n // Focus the time input when date changes (user selects a date from calendar)\n useEffect(() => {\n // Check if date changed\n let timeoutId: ReturnType<typeof setTimeout> | undefined;\n\n if (dateValue && previousDateRef.current?.compare(dateValue) !== 0) {\n // Only auto-focus if no time input segment currently has focus\n // This prevents stealing focus during user interaction with time segments\n const container = timeInputRef.current;\n const activeElement = document.activeElement;\n const hasTimeSegmentFocus =\n container?.contains(activeElement) &&\n activeElement?.getAttribute(\"role\") === \"spinbutton\";\n\n if (!hasTimeSegmentFocus) {\n // Small delay to ensure the DOM is ready\n timeoutId = setTimeout(() => {\n // Find the first focusable segment within the time input container\n if (container) {\n const firstSegment = container.querySelector(\n '[role=\"spinbutton\"]'\n ) as HTMLElement;\n firstSegment?.focus();\n }\n }, 50);\n }\n }\n\n previousDateRef.current = dateValue;\n\n // Cleanup timeout on effect re-run or unmount to prevent memory leaks\n return () => {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n };\n }, [dateValue]);\n\n return (\n <Flex\n ref={timeInputRef}\n borderTop=\"solid-25\"\n borderColor=\"neutral.3\"\n py=\"300\"\n px=\"400\"\n alignItems=\"center\"\n justifyContent=\"center\"\n gap=\"200\"\n >\n <Text textStyle=\"xs\" fontWeight=\"500\" color=\"neutral.12\">\n {msg.format(\"Time.startTime\")}\n </Text>\n <TimeInput\n slot=\"timeInput\"\n variant=\"ghost\"\n size=\"sm\"\n hideTimeZone={hideTimeZone}\n hourCycle={hourCycle}\n />\n </Flex>\n );\n};\n","import {\n DatePickerRootSlot,\n DatePickerGroupSlot,\n DatePickerPopoverSlot,\n DatePickerCalendarSlot,\n} from \"./date-picker.slots\";\n\nimport { CalendarMonth, Close } from \"@commercetools/nimbus-icons\";\n\nimport {\n DatePicker as ReactAriaDatePicker,\n Group,\n Popover,\n Dialog,\n} from \"react-aria-components\";\nimport { useSlotRecipe } from \"@chakra-ui/react/styled-system\";\nimport { datePickerSlotRecipe } from \"./date-picker.recipe\";\nimport type { DatePickerProps } from \"./date-picker.types\";\nimport { extractStyleProps } from \"@/utils\";\nimport { DateInput, Calendar, IconButton, Box } from \"@/components\";\nimport { DatePickerTimeInput, DatePickerCustomContext } from \"./components\";\n\n/**\n * # DatePicker\n *\n * a UI component for users to enter or select a specific calendar date.\n *\n * @see {@link https://nimbus-documentation.vercel.app/components/inputs/datepicker}\n */\nexport const DatePicker = (props: DatePickerProps) => {\n const {\n size = \"md\",\n variant,\n granularity = \"day\",\n hideTimeZone,\n hourCycle,\n } = props;\n const recipe = useSlotRecipe({ recipe: datePickerSlotRecipe });\n const [recipeProps, remainingProps] = recipe.splitVariantProps(props);\n const [styleProps, otherProps] = extractStyleProps(remainingProps);\n\n // the size of the buttons overlaying the input\n const overlayButtonSize = size === \"md\" ? \"xs\" : \"2xs\";\n\n // When granularity is \"day\", use the prop value (defaults to true if not provided)\n // For other granularities (time-based), force to false so users can set both date and time\n const shouldCloseOnSelect =\n granularity === \"day\" ? props.shouldCloseOnSelect : false;\n\n return (\n <DatePickerRootSlot {...recipeProps} {...styleProps} asChild>\n <ReactAriaDatePicker\n {...otherProps}\n shouldCloseOnSelect={shouldCloseOnSelect}\n >\n <DatePickerCustomContext>\n <DatePickerGroupSlot asChild>\n <Group>\n <DateInput\n size={size}\n variant={variant}\n width=\"full\"\n hideTimeZone={hideTimeZone}\n hourCycle={hourCycle}\n trailingElement={\n <Box>\n <IconButton\n variant=\"ghost\"\n size={overlayButtonSize}\n slot=\"clear\"\n >\n <Close />\n </IconButton>\n <IconButton\n variant=\"ghost\"\n size={overlayButtonSize}\n slot=\"calendarToggle\"\n >\n <CalendarMonth />\n </IconButton>\n </Box>\n }\n />\n </Group>\n </DatePickerGroupSlot>\n <DatePickerPopoverSlot asChild>\n <Popover placement=\"bottom end\">\n <Dialog>\n <DatePickerCalendarSlot>\n <Calendar />\n </DatePickerCalendarSlot>\n <DatePickerTimeInput\n hideTimeZone={hideTimeZone}\n hourCycle={hourCycle}\n />\n </Dialog>\n </Popover>\n </DatePickerPopoverSlot>\n </DatePickerCustomContext>\n </ReactAriaDatePicker>\n </DatePickerRootSlot>\n );\n};\n\nDatePicker.displayName = \"DatePicker\";\n"],"names":["withProvider","withContext","createSlotRecipeContext","DatePickerRootSlot","DatePickerGroupSlot","DatePickerPopoverSlot","DatePickerCalendarSlot","datePickerMessages_en","datePickerMessages_de","datePickerMessages_es","datePickerMessages_fr","datePickerMessages_pt","datePickerMessagesStrings","normalizeMessages","DatePickerCustomContext","children","msg","useLocalizedStringFormatter","buttonContext","useSlottedContext","ButtonContext","datePickerState","useContext","DatePickerStateContext","noInputValue","timeValue","setTimeValue","granularity","isDatePickerDisabled","getDefaultTimeInputAriaLabel","buttonSlots","event","activeElement","timeInputSlots","value","jsx","Provider","TimeFieldContext","DatePickerTimeInput","hideTimeZone","hourCycle","dateValue","timeInputRef","useRef","previousDateRef","useEffect","timeoutId","container","jsxs","Flex","Text","TimeInput","DatePicker","props","size","variant","recipe","useSlotRecipe","datePickerSlotRecipe","recipeProps","remainingProps","styleProps","otherProps","extractStyleProps","overlayButtonSize","shouldCloseOnSelect","React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,GAAA,CAAA,CAAM;AAAA,gBAAA;AAAA,cAAA;AAAA,cAET,gBAAApC;AAAA,gBAACmC;AAAA,gBAAA;AAAA,kBACC,SAAQ;AAAA,kBACR,MAAMN;AAAA,kBACN,MAAK;AAAA,kBAEL,4BAACQ,GAAA,CAAA,CAAc;AAAA,gBAAA;AAAA,cAAA;AAAA,YACjB,EAAA,CACF;AAAA,UAAA;AAAA,QAAA,GAGN,EAAA,CACF;AAAA,QACA,gBAAArC,EAAC9B,KAAsB,SAAO,IAC5B,4BAACoE,GAAA,EAAQ,WAAU,cACjB,UAAA,gBAAAzB,EAAC0B,GAAA,EACC,UAAA;AAAA,UAAA,gBAAAvC,EAAC7B,GAAA,EACC,UAAA,gBAAA6B,EAACwC,GAAA,CAAA,CAAS,GACZ;AAAA,UACA,gBAAAxC;AAAA,YAACG;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;AAEAY,GAAW,cAAc;"}
|
|
1
|
+
{"version":3,"file":"date-picker-DwQ1WWNP.es.js","sources":["../../src/components/date-picker/date-picker.slots.tsx","../../src/components/date-picker/intl/en.ts","../../src/components/date-picker/intl/de.ts","../../src/components/date-picker/intl/es.ts","../../src/components/date-picker/intl/fr-FR.ts","../../src/components/date-picker/intl/pt-BR.ts","../../src/components/date-picker/date-picker.messages.ts","../../src/components/date-picker/components/date-picker.custom-context.tsx","../../src/components/date-picker/components/date-picker.time-input.tsx","../../src/components/date-picker/date-picker.tsx"],"sourcesContent":["import {\n type HTMLChakraProps,\n createSlotRecipeContext,\n} from \"@chakra-ui/react\";\nimport type { DatePickerRootSlotProps } from \"./date-picker.types\";\n\n// Correctly destructure from createSlotRecipeContext based on project examples\nconst { withProvider, withContext } = createSlotRecipeContext({\n key: \"datePicker\",\n});\n\n/**\n * Root component that provides the styling context for the DatePicker component.\n * Uses Chakra UI's recipe context system for consistent styling across instances.\n */\nexport const DatePickerRootSlot = withProvider<\n HTMLDivElement,\n DatePickerRootSlotProps\n>(\"div\", \"root\");\n\n/**\n * Slot component for the input group containing the DateInput.\n */\nexport const DatePickerGroupSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"group\");\n\n/**\n * Slot component for the popover container.\n */\nexport const DatePickerPopoverSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"popover\");\n\n/**\n * Slot component for the calendar container within the popover.\n */\nexport const DatePickerCalendarSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"calendar\");\n\n/**\n * Slot component for the calendar header.\n */\nexport const DatePickerCalendarHeaderSlot = withContext<\n HTMLElement,\n HTMLChakraProps<\"header\">\n>(\"header\", \"calendarHeader\");\n\n/**\n * Slot component for the calendar grid.\n */\nexport const DatePickerCalendarGridSlot = withContext<\n HTMLTableElement,\n HTMLChakraProps<\"table\">\n>(\"table\", \"calendarGrid\");\n\n/**\n * Slot component for individual calendar cells.\n */\nexport const DatePickerCalendarCellSlot = withContext<\n HTMLTableCellElement,\n HTMLChakraProps<\"td\">\n>(\"td\", \"calendarCell\");\n","/**\n * Pre-compiled en messages for DatePicker\n * Generated by @internationalized/string-compiler\n * DO NOT EDIT MANUALLY\n */\n\nexport default {\n \"Time.enterTime\": `Enter time`,\n \"Time.enterTimeHour\": `Enter time (hour)`,\n \"Time.enterTimeHourMinute\": `Enter time (hour and minute)`,\n \"Time.enterTimeHourMinuteSecond\": `Enter time (hour, minute, and second)`,\n \"Time.startTime\": `Start time`,\n clearInput: `Clear input value`,\n};\n","/**\n * Pre-compiled de messages for DatePicker\n * Generated by @internationalized/string-compiler\n * DO NOT EDIT MANUALLY\n */\n\nexport default {\n \"Time.enterTime\": `Zeit eingeben`,\n \"Time.enterTimeHour\": `Zeit eingeben (Stunde)`,\n \"Time.enterTimeHourMinute\": `Zeit eingeben (Stunde und Minute)`,\n \"Time.enterTimeHourMinuteSecond\": `Zeit eingeben (Stunde, Minute und Sekunde)`,\n \"Time.startTime\": `Startzeit`,\n clearInput: `Eingabewert löschen`,\n};\n","/**\n * Pre-compiled es messages for DatePicker\n * Generated by @internationalized/string-compiler\n * DO NOT EDIT MANUALLY\n */\n\nexport default {\n \"Time.enterTime\": `Indicar tiempo`,\n \"Time.enterTimeHour\": `Indicar tiempo (hora)`,\n \"Time.enterTimeHourMinute\": `Indicar tiempo (hora y minuto)`,\n \"Time.enterTimeHourMinuteSecond\": `Indicar tiempo (hora, minuto y segundo)`,\n \"Time.startTime\": `Iniciar tiempo`,\n clearInput: `Eliminar valor de entrada`,\n};\n","/**\n * Pre-compiled fr-FR messages for DatePicker\n * Generated by @internationalized/string-compiler\n * DO NOT EDIT MANUALLY\n */\n\nexport default {\n \"Time.enterTime\": `Saisir l'heure`,\n \"Time.enterTimeHour\": `Saisir l'heure (heure)`,\n \"Time.enterTimeHourMinute\": `Saisir l'heure (heure et minute)`,\n \"Time.enterTimeHourMinuteSecond\": `Saisir l'heure (heure, minute et seconde)`,\n \"Time.startTime\": `Heure de début`,\n clearInput: `Effacer la valeur saisie`,\n};\n","/**\n * Pre-compiled pt-BR messages for DatePicker\n * Generated by @internationalized/string-compiler\n * DO NOT EDIT MANUALLY\n */\n\nexport default {\n \"Time.enterTime\": `Inserir hora`,\n \"Time.enterTimeHour\": `Inserir hora (hora)`,\n \"Time.enterTimeHourMinute\": `Inserir hora (hora e minutos)`,\n \"Time.enterTimeHourMinuteSecond\": `Inserir hora (hora, minutos e segundos)`,\n \"Time.startTime\": `Hora de início`,\n clearInput: `Limpar valores inseridos`,\n};\n","/**\n * Pre-compiled localized messages for DatePicker component\n *\n * Generated by scripts/generate-dictionaries.ts\n * DO NOT EDIT MANUALLY\n *\n * @see https://react-spectrum.adobe.com/react-aria/internationalization.html\n */\n\nimport {\n type LocalizedString,\n type LocalizedStrings,\n} from \"@internationalized/string\";\nimport { normalizeMessages } from \"../../utils/normalize-messages\";\n\n// Pre-compiled message functions\nimport datePickerMessages_en from \"./intl/en\";\nimport datePickerMessages_de from \"./intl/de\";\nimport datePickerMessages_es from \"./intl/es\";\nimport datePickerMessages_fr from \"./intl/fr-FR\";\nimport datePickerMessages_pt from \"./intl/pt-BR\";\n\n// Raw LocalizedStrings object for use with useLocalizedStringFormatter hook\nexport const datePickerMessagesStrings: LocalizedStrings<\n string,\n LocalizedString\n> = {\n en: normalizeMessages(datePickerMessages_en),\n de: normalizeMessages(datePickerMessages_de),\n es: normalizeMessages(datePickerMessages_es),\n \"fr-FR\": normalizeMessages(datePickerMessages_fr),\n \"pt-BR\": normalizeMessages(datePickerMessages_pt),\n} as LocalizedStrings<string, LocalizedString>;\n\n/**\n * Available message keys for DatePicker component\n */\nexport type DatePickerMessageKey =\n | \"Time.enterTime\"\n | \"Time.enterTimeHour\"\n | \"Time.enterTimeHourMinute\"\n | \"Time.enterTimeHourMinuteSecond\"\n | \"Time.startTime\"\n | \"clearInput\";\n","import { useContext } from \"react\";\nimport {\n Provider,\n ButtonContext,\n DatePickerStateContext,\n TimeFieldContext,\n useSlottedContext,\n} from \"react-aria-components\";\nimport type { PressEvent, TimeValue } from \"react-aria\";\nimport { useLocalizedStringFormatter } from \"@/hooks\";\nimport { datePickerMessagesStrings } from \"../date-picker.messages\";\n\n/**\n * DatePickerCustomContext - Custom context provider for DatePicker\n *\n * Provides React Aria context overrides for button and time input slots,\n * enabling coordinated behavior between DatePicker parts.\n */\nexport const DatePickerCustomContext = ({\n children,\n}: {\n children: React.ReactNode;\n}) => {\n const msg = useLocalizedStringFormatter(datePickerMessagesStrings);\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 msg.format(\"Time.enterTimeHour\");\n case \"minute\":\n return msg.format(\"Time.enterTimeHourMinute\");\n case \"second\":\n return msg.format(\"Time.enterTimeHourMinuteSecond\");\n default:\n return msg.format(\"Time.enterTime\");\n }\n };\n\n /**\n * Button slots\n * ================================\n */\n const buttonSlots = {\n /** toggles the calendar popover */\n calendarToggle: {\n ...buttonContext,\n onPress: (event: PressEvent) => {\n // Ensure any active input (e.g., date picker segment) loses focus\n // because blurring the input will close the popover if it's open (or was just opened)\n const activeElement = document?.activeElement as HTMLElement | null;\n\n if (activeElement) {\n activeElement.blur();\n }\n\n buttonContext.onPress?.(event);\n },\n },\n /** Clear button that displays when there's a value in each segment - hidden from both visual and screen readers when there's no value */\n clear: {\n onPress: () => datePickerState?.setValue(null),\n \"aria-label\": msg.format(\"clearInput\"),\n isDisabled: isDatePickerDisabled,\n // Hide the button when there's no value\n style: noInputValue ? { display: \"none\" } : undefined,\n \"aria-hidden\": noInputValue ? true : undefined,\n },\n };\n\n /**\n * TimeInput slots\n * ================================\n */\n\n const timeInputSlots = {\n timeInput: {\n value: timeValue,\n onChange: (value: TimeValue | null) => {\n if (value !== null) {\n setTimeValue(value);\n }\n },\n granularity: granularity === \"day\" ? undefined : granularity,\n \"aria-label\": getDefaultTimeInputAriaLabel(),\n },\n };\n\n return (\n <Provider\n values={[\n [\n ButtonContext,\n {\n slots: buttonSlots,\n },\n ],\n [TimeFieldContext, { slots: timeInputSlots }],\n ]}\n >\n {children}\n </Provider>\n );\n};\n","import { Flex, Text, TimeInput } from \"@/components\";\nimport { useContext, useRef, useEffect } from \"react\";\nimport { DatePickerStateContext } from \"react-aria-components\";\nimport type { DatePickerTimeInputProps } from \"../date-picker.types\";\nimport { useLocalizedStringFormatter } from \"@/hooks\";\nimport { datePickerMessagesStrings } from \"../date-picker.messages\";\n\n/**\n * DatePickerTimeInput - Time input component displayed in DatePicker popover footer\n *\n * Only renders when granularity requires time selection (hour, minute, second).\n * Automatically focuses when user selects a date from the calendar.\n *\n * @supportsStyleProps\n */\nexport const DatePickerTimeInput = ({\n hideTimeZone,\n hourCycle,\n}: DatePickerTimeInputProps) => {\n const msg = useLocalizedStringFormatter(datePickerMessagesStrings);\n const datePickerState = useContext(DatePickerStateContext);\n const { granularity, dateValue } = datePickerState!;\n const timeInputRef = useRef<HTMLDivElement>(null);\n const previousDateRef = useRef(dateValue);\n\n // do not show up to the party if you're not invited\n if (granularity === \"day\") {\n return null;\n }\n\n // Focus the time input when date changes (user selects a date from calendar)\n useEffect(() => {\n // Check if date changed\n let timeoutId: ReturnType<typeof setTimeout> | undefined;\n\n if (dateValue && previousDateRef.current?.compare(dateValue) !== 0) {\n // Only auto-focus if no time input segment currently has focus\n // This prevents stealing focus during user interaction with time segments\n const container = timeInputRef.current;\n const activeElement = document.activeElement;\n const hasTimeSegmentFocus =\n container?.contains(activeElement) &&\n activeElement?.getAttribute(\"role\") === \"spinbutton\";\n\n if (!hasTimeSegmentFocus) {\n // Small delay to ensure the DOM is ready\n timeoutId = setTimeout(() => {\n // Find the first focusable segment within the time input container\n if (container) {\n const firstSegment = container.querySelector(\n '[role=\"spinbutton\"]'\n ) as HTMLElement;\n firstSegment?.focus();\n }\n }, 50);\n }\n }\n\n previousDateRef.current = dateValue;\n\n // Cleanup timeout on effect re-run or unmount to prevent memory leaks\n return () => {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n };\n }, [dateValue]);\n\n return (\n <Flex\n ref={timeInputRef}\n borderTop=\"solid-25\"\n borderColor=\"neutral.3\"\n py=\"300\"\n px=\"400\"\n alignItems=\"center\"\n justifyContent=\"center\"\n gap=\"200\"\n >\n <Text textStyle=\"xs\" fontWeight=\"500\" color=\"neutral.12\">\n {msg.format(\"Time.startTime\")}\n </Text>\n <TimeInput\n slot=\"timeInput\"\n variant=\"ghost\"\n size=\"sm\"\n hideTimeZone={hideTimeZone}\n hourCycle={hourCycle}\n />\n </Flex>\n );\n};\n","import {\n DatePickerRootSlot,\n DatePickerGroupSlot,\n DatePickerPopoverSlot,\n DatePickerCalendarSlot,\n} from \"./date-picker.slots\";\n\nimport { CalendarMonth, Close } from \"@commercetools/nimbus-icons\";\n\nimport {\n DatePicker as ReactAriaDatePicker,\n Group,\n Popover,\n Dialog,\n} from \"react-aria-components\";\nimport { useSlotRecipe } from \"@chakra-ui/react/styled-system\";\nimport { datePickerSlotRecipe } from \"./date-picker.recipe\";\nimport type { DatePickerProps } from \"./date-picker.types\";\nimport { extractStyleProps } from \"@/utils\";\nimport { DateInput, Calendar, IconButton, Box } from \"@/components\";\nimport { DatePickerTimeInput, DatePickerCustomContext } from \"./components\";\n\n/**\n * # DatePicker\n *\n * a UI component for users to enter or select a specific calendar date.\n *\n * @see {@link https://nimbus-documentation.vercel.app/components/inputs/datepicker}\n */\nexport const DatePicker = (props: DatePickerProps) => {\n const {\n size = \"md\",\n variant,\n granularity = \"day\",\n hideTimeZone,\n hourCycle,\n } = props;\n const recipe = useSlotRecipe({ recipe: datePickerSlotRecipe });\n const [recipeProps, remainingProps] = recipe.splitVariantProps(props);\n const [styleProps, otherProps] = extractStyleProps(remainingProps);\n\n // the size of the buttons overlaying the input\n const overlayButtonSize = size === \"md\" ? \"xs\" : \"2xs\";\n\n // When granularity is \"day\", use the prop value (defaults to true if not provided)\n // For other granularities (time-based), force to false so users can set both date and time\n const shouldCloseOnSelect =\n granularity === \"day\" ? props.shouldCloseOnSelect : false;\n\n return (\n <DatePickerRootSlot {...recipeProps} {...styleProps} asChild>\n <ReactAriaDatePicker\n {...otherProps}\n shouldCloseOnSelect={shouldCloseOnSelect}\n >\n <DatePickerCustomContext>\n <DatePickerGroupSlot asChild>\n <Group>\n <DateInput\n size={size}\n variant={variant}\n width=\"full\"\n hideTimeZone={hideTimeZone}\n hourCycle={hourCycle}\n trailingElement={\n <Box>\n <IconButton\n variant=\"ghost\"\n size={overlayButtonSize}\n slot=\"clear\"\n >\n <Close />\n </IconButton>\n <IconButton\n variant=\"ghost\"\n size={overlayButtonSize}\n slot=\"calendarToggle\"\n >\n <CalendarMonth />\n </IconButton>\n </Box>\n }\n />\n </Group>\n </DatePickerGroupSlot>\n <DatePickerPopoverSlot asChild>\n <Popover placement=\"bottom end\">\n <Dialog>\n <DatePickerCalendarSlot>\n <Calendar />\n </DatePickerCalendarSlot>\n <DatePickerTimeInput\n hideTimeZone={hideTimeZone}\n hourCycle={hourCycle}\n />\n </Dialog>\n </Popover>\n </DatePickerPopoverSlot>\n </DatePickerCustomContext>\n </ReactAriaDatePicker>\n </DatePickerRootSlot>\n );\n};\n\nDatePicker.displayName = \"DatePicker\";\n"],"names":["withProvider","withContext","createSlotRecipeContext","DatePickerRootSlot","DatePickerGroupSlot","DatePickerPopoverSlot","DatePickerCalendarSlot","datePickerMessages_en","datePickerMessages_de","datePickerMessages_es","datePickerMessages_fr","datePickerMessages_pt","datePickerMessagesStrings","normalizeMessages","DatePickerCustomContext","children","msg","useLocalizedStringFormatter","buttonContext","useSlottedContext","ButtonContext","datePickerState","useContext","DatePickerStateContext","noInputValue","timeValue","setTimeValue","granularity","isDatePickerDisabled","getDefaultTimeInputAriaLabel","buttonSlots","event","activeElement","timeInputSlots","value","jsx","Provider","TimeFieldContext","DatePickerTimeInput","hideTimeZone","hourCycle","dateValue","timeInputRef","useRef","previousDateRef","useEffect","timeoutId","container","jsxs","Flex","Text","TimeInput","DatePicker","props","size","variant","recipe","useSlotRecipe","datePickerSlotRecipe","recipeProps","remainingProps","styleProps","otherProps","extractStyleProps","overlayButtonSize","shouldCloseOnSelect","ReactAriaDatePicker","Group","DateInput","Box","IconButton","Close","CalendarMonth","Popover","Dialog","Calendar"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAOA,MAAM,EAAE,cAAAA,GAAc,aAAAC,EAAA,IAAgB,gBAAAC,EAAwB;AAAA,EAC5D,KAAK;AACP,CAAC,GAMYC,IAAqB,gBAAAH,EAGhC,OA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B,EAAA,CACF;AAAA,UAAA;AAAA,QAAA,GAGN,EAAA,CACF;AAAA,QACA,gBAAArC,EAAC9B,KAAsB,SAAO,IAC5B,4BAACoE,GAAA,EAAQ,WAAU,cACjB,UAAA,gBAAAzB,EAAC0B,GAAA,EACC,UAAA;AAAA,UAAA,gBAAAvC,EAAC7B,GAAA,EACC,UAAA,gBAAA6B,EAACwC,GAAA,CAAA,CAAS,GACZ;AAAA,UACA,gBAAAxC;AAAA,YAACG;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;AAEAY,GAAW,cAAc;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const e=require("react/jsx-runtime"),q=require("@chakra-ui/react"),z=require("@commercetools/nimbus-icons"),$=require("./DatePicker-NWRDzwUt.cjs.js"),P=require("./Dialog-CSr6lHSd.cjs.js"),E=require("./Group-1nWkximy.cjs.js"),L=require("@chakra-ui/react/styled-system"),F=require("./index-
|
|
2
|
-
//# sourceMappingURL=date-range-picker-
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),q=require("@chakra-ui/react"),z=require("@commercetools/nimbus-icons"),$=require("./DatePicker-NWRDzwUt.cjs.js"),P=require("./Dialog-CSr6lHSd.cjs.js"),E=require("./Group-1nWkximy.cjs.js"),L=require("@chakra-ui/react/styled-system"),F=require("./index-CBRmb4jF.cjs.js"),V=require("./extract-style-props-BvvBKXOu.cjs.js"),f=require("react"),l=require("./normalize-messages-CaDzkuUm.cjs.js"),v=require("@chakra-ui/react/flex"),M=require("./text-BtRhIklG.cjs.js"),C=require("./time-input-G64QnJLm.cjs.js"),I=require("./Button-DLCecw8f.cjs.js"),y=require("./utils-DVb3jcp5.cjs.js"),w=require("./DateField-BxXzaXAv.cjs.js"),B=require("./range-calendar-tLrCZyTQ.cjs.js"),j=require("./date-input-BL7owE4Q.cjs.js"),D=require("./icon-button-5pYAEokc.cjs.js"),{withProvider:_,withContext:x}=q.createSlotRecipeContext({key:"dateRangePicker"}),A=_("div","root"),O=x("div","group"),W=x("div","trigger"),G=x("div","popover"),K=x("div","calendar"),N={clearInput:"Clear input value",clearSelection:"Clear date range",endTime:"End time",endTimeHour:"End time (hour)",endTimeHourMinute:"End time (hour and minute)",endTimeHourMinuteSecond:"End time (hour, minute, and second)",endTimeLabel:"End time",openCalendar:"Open calendar",startTime:"Start time",startTimeHour:"Start time (hour)",startTimeHourMinute:"Start time (hour and minute)",startTimeHourMinuteSecond:"Start time (hour, minute, and second)",startTimeLabel:"Start time"},J={clearInput:"Eingabewert löschen",clearSelection:"Datumsbereich löschen",endTime:"Endzeit",endTimeHour:"Endzeit (Stunde)",endTimeHourMinute:"Endzeit (Stunde und Minute)",endTimeHourMinuteSecond:"Endzeit (Stunde, Minute und Sekunde)",endTimeLabel:"Endzeit",openCalendar:"Kalender öffnen",startTime:"Startzeit",startTimeHour:"Startzeit (Stunde)",startTimeHourMinute:"Startzeit (Stunde und Minute)",startTimeHourMinuteSecond:"Startzeit (Stunde, Minute und Sekunde)",startTimeLabel:"Startzeit"},Q={clearInput:"Eliminar valor de entrada",clearSelection:"Borrar rango de fechas",endTime:"Finalizar tiempo",endTimeHour:"Finalizar tiempo (hora)",endTimeHourMinute:"Finalizar tiempo (hora y minuto)",endTimeHourMinuteSecond:"Finalizar tiempo (hora, minuto, segundo)",endTimeLabel:"Finalizar tiempo",openCalendar:"Abrir calendario",startTime:"Iniciar tiempo",startTimeHour:"Iniciar tiempo (hora)",startTimeHourMinute:"Iniciar tiempo (hora y minuto)",startTimeHourMinuteSecond:"Iniciar tiempo (hora, minuto y segundo)",startTimeLabel:"Iniciar tiempo"},U={clearInput:"Effacer la valeur saisie",clearSelection:"Effacer la plage de dates",endTime:"Heure de fin",endTimeHour:"Heure de fin (heure)",endTimeHourMinute:"Heure de fin (heure et minute)",endTimeHourMinuteSecond:" Heure de fin (heure, minute et seconde)",endTimeLabel:"Heure de fin",openCalendar:"Ouvrir le calendrier",startTime:"Heure de début",startTimeHour:"Heure de début (heure)",startTimeHourMinute:"Heure de début (heure et minute)",startTimeHourMinuteSecond:"Heure de début (heure, minute et seconde)",startTimeLabel:"Heure de début"},X={clearInput:"Limpar valores inseridos",clearSelection:"Limpar intervalo de datas",endTime:"Hora de término",endTimeHour:"Hora de término (hora)",endTimeHourMinute:"Hora de término (hora e minutos)",endTimeHourMinuteSecond:"Hora de término (hora, minutos e segundos)",endTimeLabel:"Hora de término",openCalendar:"Abrir agenda",startTime:"Hora de início",startTimeHour:"Hora de início (hora)",startTimeHourMinute:"Hora de início (hora e minutos)",startTimeHourMinuteSecond:"Hora de início (hora, minutos e segundos)",startTimeLabel:"Hora de início"},R={en:l.normalizeMessages(N),de:l.normalizeMessages(J),es:l.normalizeMessages(Q),"fr-FR":l.normalizeMessages(U),"pt-BR":l.normalizeMessages(X)},Y=({hideTimeZone:s,hourCycle:i})=>{const u=l.useLocalizedStringFormatter(R),t=f.useContext($.$06d5b8ec9ee5d538$export$80d7ae1f804790be),{granularity:d,value:a}=t,o=f.useRef(null),m=f.useRef(a);return d==="day"?null:(f.useEffect(()=>{let g;if(a?.start&&m.current?.start?.compare(a.start)!==0||a?.end&&m.current?.end?.compare(a.end)!==0){const c=o.current,h=document.activeElement;c?.contains(h)&&h?.getAttribute("role")==="spinbutton"||(g=setTimeout(()=>{if(c){const n=c.querySelector('[role="spinbutton"]');n&&n.focus()}},50))}return m.current=a,()=>{g&&clearTimeout(g)}},[a]),e.jsxs(v.Flex,{ref:o,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(M.Text,{textStyle:"xs",fontWeight:"500",color:"neutral.12",minWidth:"fit-content",children:u.format("startTimeLabel")}),e.jsx(C.TimeInput,{slot:"startTimeInput",variant:"ghost",size:"sm",hideTimeZone:s,hourCycle:i})]}),e.jsxs(v.Flex,{alignItems:"center",gap:"200",children:[e.jsx(M.Text,{textStyle:"xs",fontWeight:"500",color:"neutral.12",minWidth:"fit-content",children:u.format("endTimeLabel")}),e.jsx(C.TimeInput,{slot:"endTimeInput",variant:"ghost",size:"sm",hideTimeZone:s,hourCycle:i})]})]}))},Z=({children:s})=>{const i=l.useLocalizedStringFormatter(R),u=y.$64fa3d84918910a7$export$fabf2dc03a41866e(I.$d2b4bc8c273e7be6$export$24d547caef80ccd1)||{},t=f.useContext($.$06d5b8ec9ee5d538$export$80d7ae1f804790be),d=n=>n?.day&&n?.month&&n?.year,a=!t?.value||!d(t.value.start)||!d(t.value.end),{granularity:o}=t,m=t?.value?.start&&"hour"in t.value.start?t.value.start:null,g=t?.value?.end&&"hour"in t.value.end?t.value.end:null,b=u?.isDisabled,c=n=>{const r=n==="start"?"start":"end";switch(o){case"hour":return i.format(`${r}TimeHour`);case"minute":return i.format(`${r}TimeHourMinute`);case"second":return i.format(`${r}TimeHourMinuteSecond`);default:return i.format(`${r}Time`)}},h={calendarToggle:{...u,onPress:n=>{const r=document?.activeElement;r&&r.blur(),u.onPress?.(n)}},clear:{onPress:()=>t?.setValue(null),"aria-label":i.format("clearInput"),isDisabled:b,style:a?{display:"none"}:void 0,"aria-hidden":a?!0:void 0}},S={startTimeInput:{value:m,onChange:n=>{if(n!==null&&t?.value?.start){const r=t.value,p=r.start,T=r.end;if(p&&T){const H=p.set({hour:n.hour,minute:n.minute||0,second:n.second||0,millisecond:n.millisecond||0});t.setValue({start:H,end:T})}}},granularity:o==="day"?void 0:o,"aria-label":c("start")},endTimeInput:{value:g,onChange:n=>{if(n!==null&&t?.value?.end){const r=t.value,p=r.start,T=r.end;if(p&&T){const H=T.set({hour:n.hour,minute:n.minute||0,second:n.second||0,millisecond:n.millisecond||0});t.setValue({start:p,end:H})}}},granularity:o==="day"?void 0:o,"aria-label":c("end")}};return e.jsx(y.$64fa3d84918910a7$export$2881499e37b75b9a,{values:[[I.$d2b4bc8c273e7be6$export$24d547caef80ccd1,{slots:h}],[w.$40825cdb76e74f70$export$8e17ddc448e87c1e,{slots:S}]],children:s})},k=s=>{const i=l.useLocalizedStringFormatter(R),{granularity:u="day",hideTimeZone:t,hourCycle:d}=s,a=L.useSlotRecipe({recipe:F.dateRangePickerSlotRecipe}),[o,m]=a.splitVariantProps(s),[g,b]=V.extractStyleProps(m),{size:c="md"}=o,h=c==="md"?"xs":"2xs",S=u==="day"?s.shouldCloseOnSelect:!1;return e.jsx(A,{...o,...g,asChild:!0,children:e.jsx($.$06d5b8ec9ee5d538$export$17334619f3ac2224,{...b,shouldCloseOnSelect:S,children:e.jsxs(Z,{children:[e.jsx(O,{asChild:!0,children:e.jsxs(E.$a049562f99e7db0e$export$eb2fcfdbd7ba97d4,{children:[e.jsx(j.DateInput,{slot:"start",size:s.size,variant:"plain",width:"auto",hideTimeZone:t,hourCycle:d}),e.jsx(M.Text,{as:"span",px:"150",color:"neutral.11",userSelect:"none","aria-hidden":"true",slot:null,children:"–"}),e.jsx(j.DateInput,{slot:"end",size:s.size,variant:"plain",width:"auto",hideTimeZone:t,hourCycle:d}),e.jsxs(W,{children:[e.jsx(D.IconButton,{variant:"ghost",size:h,slot:"clear","aria-label":i.format("clearSelection"),children:e.jsx(z.Close,{})}),e.jsx(D.IconButton,{variant:"ghost",size:h,slot:"calendarToggle","aria-label":i.format("openCalendar"),children:e.jsx(z.CalendarMonth,{})})]})]})}),e.jsx(G,{asChild:!0,children:e.jsx(P.$07b14b47974efb58$export$5b6b19405a83ff9d,{placement:"bottom end",children:e.jsxs(P.$de32f1b87079253c$export$3ddf2d174ce01153,{children:[e.jsx(K,{children:e.jsx(B.RangeCalendar,{})}),e.jsx(Y,{hideTimeZone:t,hourCycle:d})]})})})]})})})};k.displayName="DateRangePicker";exports.DateRangePicker=k;
|
|
2
|
+
//# sourceMappingURL=date-range-picker-DaSUwkke.cjs.js.map
|