@commercetools/nimbus 0.0.0-canary-20251119195710 → 0.0.0-canary-20251119201319
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-Dgumal3x.es.js → accordion-CDPW4YqE.es.js} +2 -2
- package/dist/chunks/{accordion-Dgumal3x.es.js.map → accordion-CDPW4YqE.es.js.map} +1 -1
- package/dist/chunks/{accordion-BMkxjDH8.cjs.js → accordion-CHXTjjZb.cjs.js} +2 -2
- package/dist/chunks/{accordion-BMkxjDH8.cjs.js.map → accordion-CHXTjjZb.cjs.js.map} +1 -1
- package/dist/chunks/{accordion.content-bp1qgxpB.cjs.js → accordion.content-DVg8gjOb.cjs.js} +2 -2
- package/dist/chunks/{accordion.content-bp1qgxpB.cjs.js.map → accordion.content-DVg8gjOb.cjs.js.map} +1 -1
- package/dist/chunks/{accordion.content-BBfehrgZ.es.js → accordion.content-y0RnNj9Z.es.js} +2 -2
- package/dist/chunks/{accordion.content-BBfehrgZ.es.js.map → accordion.content-y0RnNj9Z.es.js.map} +1 -1
- package/dist/chunks/alert-Bcd-RjP2.cjs.js +2 -0
- package/dist/chunks/alert-Bcd-RjP2.cjs.js.map +1 -0
- package/dist/chunks/alert-DD1hd-Va.es.js +158 -0
- package/dist/chunks/alert-DD1hd-Va.es.js.map +1 -0
- package/dist/chunks/{button-B4P8Ur2S.cjs.js → button-DYT63YaG.cjs.js} +2 -2
- package/dist/chunks/{button-B4P8Ur2S.cjs.js.map → button-DYT63YaG.cjs.js.map} +1 -1
- package/dist/chunks/{button-DNnMesnW.es.js → button-WbcOHikD.es.js} +2 -2
- package/dist/chunks/{button-DNnMesnW.es.js.map → button-WbcOHikD.es.js.map} +1 -1
- package/dist/chunks/{calendar-vjx6_S-P.es.js → calendar-CrDQ41NO.es.js} +3 -3
- package/dist/chunks/{calendar-vjx6_S-P.es.js.map → calendar-CrDQ41NO.es.js.map} +1 -1
- package/dist/chunks/{calendar-DtHsJkjK.cjs.js → calendar-g3VfLnzB.cjs.js} +2 -2
- package/dist/chunks/{calendar-DtHsJkjK.cjs.js.map → calendar-g3VfLnzB.cjs.js.map} +1 -1
- package/dist/chunks/{card-CwXif_Sl.es.js → card-CYYspg3V.es.js} +2 -2
- package/dist/chunks/{card-CwXif_Sl.es.js.map → card-CYYspg3V.es.js.map} +1 -1
- package/dist/chunks/{card-ewQyUS5H.cjs.js → card-CZoXttks.cjs.js} +2 -2
- package/dist/chunks/{card-ewQyUS5H.cjs.js.map → card-CZoXttks.cjs.js.map} +1 -1
- package/dist/chunks/{checkbox-CPmXEPZL.cjs.js → checkbox-BBOVsqdM.cjs.js} +2 -2
- package/dist/chunks/{checkbox-CPmXEPZL.cjs.js.map → checkbox-BBOVsqdM.cjs.js.map} +1 -1
- package/dist/chunks/{checkbox-N_ykJSJV.es.js → checkbox-CTtcL9PS.es.js} +2 -2
- package/dist/chunks/{checkbox-N_ykJSJV.es.js.map → checkbox-CTtcL9PS.es.js.map} +1 -1
- package/dist/chunks/{collapsible-motion-BDLpKW8q.es.js → collapsible-motion-Cs_MJ84K.es.js} +2 -2
- package/dist/chunks/{collapsible-motion-BDLpKW8q.es.js.map → collapsible-motion-Cs_MJ84K.es.js.map} +1 -1
- package/dist/chunks/{collapsible-motion-3bissPmv.cjs.js → collapsible-motion-JoeWhvf_.cjs.js} +2 -2
- package/dist/chunks/{collapsible-motion-3bissPmv.cjs.js.map → collapsible-motion-JoeWhvf_.cjs.js.map} +1 -1
- package/dist/chunks/{combobox-B-vm618h.cjs.js → combobox-BAOSfyZz.cjs.js} +2 -2
- package/dist/chunks/{combobox-B-vm618h.cjs.js.map → combobox-BAOSfyZz.cjs.js.map} +1 -1
- package/dist/chunks/{combobox-MBi6Qtoz.es.js → combobox-D-sXUVsS.es.js} +5 -5
- package/dist/chunks/{combobox-MBi6Qtoz.es.js.map → combobox-D-sXUVsS.es.js.map} +1 -1
- package/dist/chunks/{data-table-1IrX3AIs.es.js → data-table-VGdNqVuy.es.js} +12 -12
- package/dist/chunks/{data-table-1IrX3AIs.es.js.map → data-table-VGdNqVuy.es.js.map} +1 -1
- package/dist/chunks/{data-table-BNPcYz1W.cjs.js → data-table-q_xAC6Y4.cjs.js} +2 -2
- package/dist/chunks/{data-table-BNPcYz1W.cjs.js.map → data-table-q_xAC6Y4.cjs.js.map} +1 -1
- package/dist/chunks/{date-input-Dlumd921.es.js → date-input-B8MeBGZ1.es.js} +3 -3
- package/dist/chunks/{date-input-Dlumd921.es.js.map → date-input-B8MeBGZ1.es.js.map} +1 -1
- package/dist/chunks/{date-input-ojTPLGbm.cjs.js → date-input-CJ-2i6eH.cjs.js} +2 -2
- package/dist/chunks/{date-input-ojTPLGbm.cjs.js.map → date-input-CJ-2i6eH.cjs.js.map} +1 -1
- package/dist/chunks/{date-picker-Bh2vtQ_p.cjs.js → date-picker-Bx4kkIdC.cjs.js} +2 -2
- package/dist/chunks/{date-picker-Bh2vtQ_p.cjs.js.map → date-picker-Bx4kkIdC.cjs.js.map} +1 -1
- package/dist/chunks/{date-picker-BU35i_kc.es.js → date-picker-CRo_w6Jz.es.js} +7 -7
- package/dist/chunks/{date-picker-BU35i_kc.es.js.map → date-picker-CRo_w6Jz.es.js.map} +1 -1
- package/dist/chunks/{date-range-picker-BNOXoiXB.cjs.js → date-range-picker-BcY8cXPH.cjs.js} +2 -2
- package/dist/chunks/{date-range-picker-BNOXoiXB.cjs.js.map → date-range-picker-BcY8cXPH.cjs.js.map} +1 -1
- package/dist/chunks/{date-range-picker-CTHXfNFr.es.js → date-range-picker-CrFq736s.es.js} +7 -7
- package/dist/chunks/{date-range-picker-CTHXfNFr.es.js.map → date-range-picker-CrFq736s.es.js.map} +1 -1
- package/dist/chunks/{date-range-picker-field-j_qg0bHX.cjs.js → date-range-picker-field-BDCEC-kA.cjs.js} +2 -2
- package/dist/chunks/{date-range-picker-field-j_qg0bHX.cjs.js.map → date-range-picker-field-BDCEC-kA.cjs.js.map} +1 -1
- package/dist/chunks/{date-range-picker-field-DqeCSG-K.es.js → date-range-picker-field-L56QHJs-.es.js} +3 -3
- package/dist/chunks/{date-range-picker-field-DqeCSG-K.es.js.map → date-range-picker-field-L56QHJs-.es.js.map} +1 -1
- package/dist/chunks/{dialog-DJl77UzL.cjs.js → dialog-BHTOGgtN.cjs.js} +2 -2
- package/dist/chunks/{dialog-DJl77UzL.cjs.js.map → dialog-BHTOGgtN.cjs.js.map} +1 -1
- package/dist/chunks/{dialog-3NBQ0jW1.es.js → dialog-DGko_UBT.es.js} +3 -3
- package/dist/chunks/{dialog-3NBQ0jW1.es.js.map → dialog-DGko_UBT.es.js.map} +1 -1
- package/dist/chunks/{draggable-list-5cgsBAjP.cjs.js → draggable-list-BPM-ioyq.cjs.js} +2 -2
- package/dist/chunks/{draggable-list-5cgsBAjP.cjs.js.map → draggable-list-BPM-ioyq.cjs.js.map} +1 -1
- package/dist/chunks/{draggable-list-C7marUxx.es.js → draggable-list-Dk7BxgW-.es.js} +5 -5
- package/dist/chunks/{draggable-list-C7marUxx.es.js.map → draggable-list-Dk7BxgW-.es.js.map} +1 -1
- package/dist/chunks/{drawer-CtLkos4t.es.js → drawer-BUiIQ9L5.es.js} +4 -4
- package/dist/chunks/{drawer-CtLkos4t.es.js.map → drawer-BUiIQ9L5.es.js.map} +1 -1
- package/dist/chunks/{drawer-CgpIzrV0.cjs.js → drawer-DbQScPqa.cjs.js} +2 -2
- package/dist/chunks/{drawer-CgpIzrV0.cjs.js.map → drawer-DbQScPqa.cjs.js.map} +1 -1
- package/dist/chunks/{extract-style-props-Bmms_quC.es.js → extract-style-props-BvGKJ0ar.es.js} +2 -2
- package/dist/chunks/{extract-style-props-Bmms_quC.es.js.map → extract-style-props-BvGKJ0ar.es.js.map} +1 -1
- package/dist/chunks/{extract-style-props-KIxfRV-2.cjs.js → extract-style-props-CZMJJ-Ii.cjs.js} +2 -2
- package/dist/chunks/{extract-style-props-KIxfRV-2.cjs.js.map → extract-style-props-CZMJJ-Ii.cjs.js.map} +1 -1
- package/dist/chunks/{form-field-CsRv0AFz.es.js → form-field-CGjPf6rA.es.js} +2 -2
- package/dist/chunks/{form-field-CsRv0AFz.es.js.map → form-field-CGjPf6rA.es.js.map} +1 -1
- package/dist/chunks/{form-field-B3uQXnlC.cjs.js → form-field-CJHX6A4q.cjs.js} +2 -2
- package/dist/chunks/{form-field-B3uQXnlC.cjs.js.map → form-field-CJHX6A4q.cjs.js.map} +1 -1
- package/dist/chunks/{icon-button-DcBreh2S.es.js → icon-button-1gt1BCJ2.es.js} +2 -2
- package/dist/chunks/{icon-button-DcBreh2S.es.js.map → icon-button-1gt1BCJ2.es.js.map} +1 -1
- package/dist/chunks/{icon-button-BbLd8BSj.cjs.js → icon-button-LnGKZj9k.cjs.js} +2 -2
- package/dist/chunks/{icon-button-BbLd8BSj.cjs.js.map → icon-button-LnGKZj9k.cjs.js.map} +1 -1
- package/dist/chunks/{icon-toggle-button-DcdzHEIq.cjs.js → icon-toggle-button-BArvrcyQ.cjs.js} +2 -2
- package/dist/chunks/{icon-toggle-button-DcdzHEIq.cjs.js.map → icon-toggle-button-BArvrcyQ.cjs.js.map} +1 -1
- package/dist/chunks/{icon-toggle-button-B762TOKa.es.js → icon-toggle-button-C4ISptbh.es.js} +2 -2
- package/dist/chunks/{icon-toggle-button-B762TOKa.es.js.map → icon-toggle-button-C4ISptbh.es.js.map} +1 -1
- package/dist/chunks/{index-GtJPgmcq.es.js → index-BA58iOLX.es.js} +19 -4
- package/dist/chunks/index-BA58iOLX.es.js.map +1 -0
- package/dist/chunks/{index-D7AZ7gZk.cjs.js → index-LgrrgjIe.cjs.js} +4 -4
- package/dist/chunks/index-LgrrgjIe.cjs.js.map +1 -0
- package/dist/chunks/{localized-field-_LCs8Eqr.cjs.js → localized-field-Cb0fyOZF.cjs.js} +2 -2
- package/dist/chunks/{localized-field-_LCs8Eqr.cjs.js.map → localized-field-Cb0fyOZF.cjs.js.map} +1 -1
- package/dist/chunks/{localized-field-Bljs9CAV.es.js → localized-field-DFQ6Knzt.es.js} +8 -8
- package/dist/chunks/{localized-field-Bljs9CAV.es.js.map → localized-field-DFQ6Knzt.es.js.map} +1 -1
- package/dist/chunks/{menu-PCDXM-lN.cjs.js → menu-Ctsou8BQ.cjs.js} +2 -2
- package/dist/chunks/{menu-PCDXM-lN.cjs.js.map → menu-Ctsou8BQ.cjs.js.map} +1 -1
- package/dist/chunks/{menu-TmTFubBx.es.js → menu-hZacrl0C.es.js} +2 -2
- package/dist/chunks/{menu-TmTFubBx.es.js.map → menu-hZacrl0C.es.js.map} +1 -1
- package/dist/chunks/{money-input-BxlHQho5.es.js → money-input-BmRHEzuc.es.js} +5 -5
- package/dist/chunks/{money-input-BxlHQho5.es.js.map → money-input-BmRHEzuc.es.js.map} +1 -1
- package/dist/chunks/{money-input-D9_uQTfR.cjs.js → money-input-Dg8WwuK4.cjs.js} +2 -2
- package/dist/chunks/{money-input-D9_uQTfR.cjs.js.map → money-input-Dg8WwuK4.cjs.js.map} +1 -1
- package/dist/chunks/{money-input-field-hItU-TMS.cjs.js → money-input-field-Cj9jvBsE.cjs.js} +2 -2
- package/dist/chunks/{money-input-field-hItU-TMS.cjs.js.map → money-input-field-Cj9jvBsE.cjs.js.map} +1 -1
- package/dist/chunks/{money-input-field-Dny3Zs5t.es.js → money-input-field-Dec63VQv.es.js} +3 -3
- package/dist/chunks/{money-input-field-Dny3Zs5t.es.js.map → money-input-field-Dec63VQv.es.js.map} +1 -1
- package/dist/chunks/{multiline-text-input-D_Eobz0v.cjs.js → multiline-text-input-BsqrmqVM.cjs.js} +2 -2
- package/dist/chunks/{multiline-text-input-D_Eobz0v.cjs.js.map → multiline-text-input-BsqrmqVM.cjs.js.map} +1 -1
- package/dist/chunks/{multiline-text-input-BUcgL9JD.es.js → multiline-text-input-CjtXIsaQ.es.js} +3 -3
- package/dist/chunks/{multiline-text-input-BUcgL9JD.es.js.map → multiline-text-input-CjtXIsaQ.es.js.map} +1 -1
- package/dist/chunks/{nimbus-provider-BDZudEgV.cjs.js → nimbus-provider-DEVKU5vp.cjs.js} +2 -2
- package/dist/chunks/{nimbus-provider-BDZudEgV.cjs.js.map → nimbus-provider-DEVKU5vp.cjs.js.map} +1 -1
- package/dist/chunks/{nimbus-provider-qxlBdPaV.es.js → nimbus-provider-DnYwOsgB.es.js} +2 -2
- package/dist/chunks/{nimbus-provider-qxlBdPaV.es.js.map → nimbus-provider-DnYwOsgB.es.js.map} +1 -1
- package/dist/chunks/{number-input-tW2sZBll.cjs.js → number-input-CRk-3ae8.cjs.js} +2 -2
- package/dist/chunks/{number-input-tW2sZBll.cjs.js.map → number-input-CRk-3ae8.cjs.js.map} +1 -1
- package/dist/chunks/{number-input-QKQNMdjA.es.js → number-input-Dtu6vHfl.es.js} +3 -3
- package/dist/chunks/{number-input-QKQNMdjA.es.js.map → number-input-Dtu6vHfl.es.js.map} +1 -1
- package/dist/chunks/{number-input-field-_ZFC-lsy.cjs.js → number-input-field-BgCaRtnS.cjs.js} +2 -2
- package/dist/chunks/{number-input-field-_ZFC-lsy.cjs.js.map → number-input-field-BgCaRtnS.cjs.js.map} +1 -1
- package/dist/chunks/{number-input-field-C3q6JG4C.es.js → number-input-field-D7aLGfzZ.es.js} +3 -3
- package/dist/chunks/{number-input-field-C3q6JG4C.es.js.map → number-input-field-D7aLGfzZ.es.js.map} +1 -1
- package/dist/chunks/{pagination-EhqWj85Q.cjs.js → pagination-CQ0roDut.cjs.js} +2 -2
- package/dist/chunks/{pagination-EhqWj85Q.cjs.js.map → pagination-CQ0roDut.cjs.js.map} +1 -1
- package/dist/chunks/{pagination-CdGUZ4m6.es.js → pagination-DPEQK0Xq.es.js} +4 -4
- package/dist/chunks/{pagination-CdGUZ4m6.es.js.map → pagination-DPEQK0Xq.es.js.map} +1 -1
- package/dist/chunks/{password-input-C3As0KmX.cjs.js → password-input-BDr6w2c9.cjs.js} +2 -2
- package/dist/chunks/{password-input-C3As0KmX.cjs.js.map → password-input-BDr6w2c9.cjs.js.map} +1 -1
- package/dist/chunks/{password-input-D0N_UVhB.es.js → password-input-BWdVEHir.es.js} +3 -3
- package/dist/chunks/{password-input-D0N_UVhB.es.js.map → password-input-BWdVEHir.es.js.map} +1 -1
- package/dist/chunks/{progress-bar-BY6e1uWv.cjs.js → progress-bar-B6NmD044.cjs.js} +2 -2
- package/dist/chunks/{progress-bar-BY6e1uWv.cjs.js.map → progress-bar-B6NmD044.cjs.js.map} +1 -1
- package/dist/chunks/{progress-bar-DknuaSHj.es.js → progress-bar-CLTFIeJQ.es.js} +2 -2
- package/dist/chunks/{progress-bar-DknuaSHj.es.js.map → progress-bar-CLTFIeJQ.es.js.map} +1 -1
- package/dist/chunks/{radio-input-CrEOnYa0.es.js → radio-input-B1krp3Lh.es.js} +3 -3
- package/dist/chunks/{radio-input-CrEOnYa0.es.js.map → radio-input-B1krp3Lh.es.js.map} +1 -1
- package/dist/chunks/{radio-input-7Ao6_x7k.cjs.js → radio-input-CZH0xqSP.cjs.js} +2 -2
- package/dist/chunks/{radio-input-7Ao6_x7k.cjs.js.map → radio-input-CZH0xqSP.cjs.js.map} +1 -1
- package/dist/chunks/{range-calendar-fvekZzen.es.js → range-calendar-Q0QKtRQY.es.js} +4 -4
- package/dist/chunks/{range-calendar-fvekZzen.es.js.map → range-calendar-Q0QKtRQY.es.js.map} +1 -1
- package/dist/chunks/{range-calendar-Dt6fGwHE.cjs.js → range-calendar-_a9mYU8O.cjs.js} +2 -2
- package/dist/chunks/{range-calendar-Dt6fGwHE.cjs.js.map → range-calendar-_a9mYU8O.cjs.js.map} +1 -1
- package/dist/chunks/{rich-text-input-_JzfQXxk.es.js → rich-text-input-DAc5Qrg9.es.js} +8 -8
- package/dist/chunks/{rich-text-input-_JzfQXxk.es.js.map → rich-text-input-DAc5Qrg9.es.js.map} +1 -1
- package/dist/chunks/{rich-text-input-BUU-KkK7.cjs.js → rich-text-input-uQdozf3f.cjs.js} +2 -2
- package/dist/chunks/{rich-text-input-BUU-KkK7.cjs.js.map → rich-text-input-uQdozf3f.cjs.js.map} +1 -1
- package/dist/chunks/{scoped-search-input-vrva_y5R.cjs.js → scoped-search-input-Bjm-BowW.cjs.js} +2 -2
- package/dist/chunks/{scoped-search-input-vrva_y5R.cjs.js.map → scoped-search-input-Bjm-BowW.cjs.js.map} +1 -1
- package/dist/chunks/{scoped-search-input-DDdbMyiM.es.js → scoped-search-input-D5GJjsyF.es.js} +5 -5
- package/dist/chunks/{scoped-search-input-DDdbMyiM.es.js.map → scoped-search-input-D5GJjsyF.es.js.map} +1 -1
- package/dist/chunks/{search-input-D0kf50zE.cjs.js → search-input-Bex68IhV.cjs.js} +2 -2
- package/dist/chunks/{search-input-D0kf50zE.cjs.js.map → search-input-Bex68IhV.cjs.js.map} +1 -1
- package/dist/chunks/{search-input-Bcmga7Cw.es.js → search-input-CyKGVTq3.es.js} +4 -4
- package/dist/chunks/{search-input-Bcmga7Cw.es.js.map → search-input-CyKGVTq3.es.js.map} +1 -1
- package/dist/chunks/{select-k8bs40hC.es.js → select-CQwpSckj.es.js} +4 -4
- package/dist/chunks/{select-k8bs40hC.es.js.map → select-CQwpSckj.es.js.map} +1 -1
- package/dist/chunks/{select-DMpVSJ1h.cjs.js → select-muD4KBy_.cjs.js} +2 -2
- package/dist/chunks/{select-DMpVSJ1h.cjs.js.map → select-muD4KBy_.cjs.js.map} +1 -1
- package/dist/chunks/{separator-fycEZ9D9.cjs.js → separator-1ZNnZk9T.cjs.js} +2 -2
- package/dist/chunks/{separator-fycEZ9D9.cjs.js.map → separator-1ZNnZk9T.cjs.js.map} +1 -1
- package/dist/chunks/{separator-hmR3p1yn.es.js → separator-CxPOiV-V.es.js} +3 -3
- package/dist/chunks/{separator-hmR3p1yn.es.js.map → separator-CxPOiV-V.es.js.map} +1 -1
- package/dist/chunks/{split-button-BnArCjhx.es.js → split-button-Dtp64tp3.es.js} +4 -4
- package/dist/chunks/{split-button-BnArCjhx.es.js.map → split-button-Dtp64tp3.es.js.map} +1 -1
- package/dist/chunks/{split-button-Bp7IHv45.cjs.js → split-button-jWOgks2W.cjs.js} +2 -2
- package/dist/chunks/{split-button-Bp7IHv45.cjs.js.map → split-button-jWOgks2W.cjs.js.map} +1 -1
- package/dist/chunks/{switch-BP5qlLxf.cjs.js → switch-Dg64nTZL.cjs.js} +2 -2
- package/dist/chunks/{switch-BP5qlLxf.cjs.js.map → switch-Dg64nTZL.cjs.js.map} +1 -1
- package/dist/chunks/{switch-CRUwwDMH.es.js → switch-bQf5AhI3.es.js} +3 -3
- package/dist/chunks/{switch-CRUwwDMH.es.js.map → switch-bQf5AhI3.es.js.map} +1 -1
- package/dist/chunks/{tabs-CQCbEhLQ.cjs.js → tabs-CHNOmHyg.cjs.js} +2 -2
- package/dist/chunks/{tabs-CQCbEhLQ.cjs.js.map → tabs-CHNOmHyg.cjs.js.map} +1 -1
- package/dist/chunks/{tabs-CyjH1V_G.es.js → tabs-DfNhZz7h.es.js} +2 -2
- package/dist/chunks/{tabs-CyjH1V_G.es.js.map → tabs-DfNhZz7h.es.js.map} +1 -1
- package/dist/chunks/{tag-group-9ad6p_4X.es.js → tag-group-CaQdCaEc.es.js} +2 -2
- package/dist/chunks/{tag-group-9ad6p_4X.es.js.map → tag-group-CaQdCaEc.es.js.map} +1 -1
- package/dist/chunks/{tag-group-gHWAhKng.cjs.js → tag-group-D5Mhaf6-.cjs.js} +2 -2
- package/dist/chunks/{tag-group-gHWAhKng.cjs.js.map → tag-group-D5Mhaf6-.cjs.js.map} +1 -1
- package/dist/chunks/{text-input-Nyoma10w.es.js → text-input-BsC8K75b.es.js} +3 -3
- package/dist/chunks/{text-input-Nyoma10w.es.js.map → text-input-BsC8K75b.es.js.map} +1 -1
- package/dist/chunks/{text-input-aI-8DS_E.cjs.js → text-input-CHwtpRzk.cjs.js} +2 -2
- package/dist/chunks/{text-input-aI-8DS_E.cjs.js.map → text-input-CHwtpRzk.cjs.js.map} +1 -1
- package/dist/chunks/{text-input-field-JMCGnalG.es.js → text-input-field-CNXk82pQ.es.js} +3 -3
- package/dist/chunks/{text-input-field-JMCGnalG.es.js.map → text-input-field-CNXk82pQ.es.js.map} +1 -1
- package/dist/chunks/{text-input-field-DjeoHvGR.cjs.js → text-input-field-DbicgCUY.cjs.js} +2 -2
- package/dist/chunks/{text-input-field-DjeoHvGR.cjs.js.map → text-input-field-DbicgCUY.cjs.js.map} +1 -1
- package/dist/chunks/{time-input-CyiC6ME0.es.js → time-input-2Dsps1zh.es.js} +3 -3
- package/dist/chunks/{time-input-CyiC6ME0.es.js.map → time-input-2Dsps1zh.es.js.map} +1 -1
- package/dist/chunks/{time-input-CpkzZhKG.cjs.js → time-input-5TSbIWQl.cjs.js} +2 -2
- package/dist/chunks/{time-input-CpkzZhKG.cjs.js.map → time-input-5TSbIWQl.cjs.js.map} +1 -1
- package/dist/chunks/{toggle-button-ilM1Z4j9.es.js → toggle-button-DnznFtWJ.es.js} +3 -3
- package/dist/chunks/{toggle-button-ilM1Z4j9.es.js.map → toggle-button-DnznFtWJ.es.js.map} +1 -1
- package/dist/chunks/{toggle-button-Bc60z09M.cjs.js → toggle-button-DqFFGgPy.cjs.js} +2 -2
- package/dist/chunks/{toggle-button-Bc60z09M.cjs.js.map → toggle-button-DqFFGgPy.cjs.js.map} +1 -1
- package/dist/chunks/{toolbar-DIHsP28I.es.js → toolbar-DE2w5rxi.es.js} +3 -3
- package/dist/chunks/{toolbar-DIHsP28I.es.js.map → toolbar-DE2w5rxi.es.js.map} +1 -1
- package/dist/chunks/{toolbar-CbpktU24.cjs.js → toolbar-E2paihzp.cjs.js} +2 -2
- package/dist/chunks/{toolbar-CbpktU24.cjs.js.map → toolbar-E2paihzp.cjs.js.map} +1 -1
- package/dist/components/accordion.cjs +1 -1
- package/dist/components/accordion.es.js +2 -2
- package/dist/components/alert/alert.d.ts +4 -4
- package/dist/components/alert/components/alert.actions.d.ts +1 -1
- package/dist/components/alert/components/alert.description.d.ts +1 -1
- package/dist/components/alert/components/alert.dismiss-button.d.ts +1 -1
- package/dist/components/alert/components/alert.root.d.ts +0 -9
- package/dist/components/alert/components/alert.title.d.ts +1 -1
- 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.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 +4 -4
- 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.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.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 +4 -4
- package/dist/components/progress-bar.cjs +1 -1
- package/dist/components/progress-bar.es.js +1 -1
- package/dist/components/radio-input.cjs +1 -1
- package/dist/components/radio-input.es.js +1 -1
- package/dist/components/range-calendar.cjs +1 -1
- package/dist/components/range-calendar.es.js +1 -1
- package/dist/components/rich-text-input.cjs +1 -1
- package/dist/components/rich-text-input.es.js +1 -1
- package/dist/components/scoped-search-input.cjs +1 -1
- package/dist/components/scoped-search-input.es.js +1 -1
- package/dist/components/search-input.cjs +1 -1
- package/dist/components/search-input.es.js +1 -1
- package/dist/components/select.cjs +1 -1
- package/dist/components/select.es.js +1 -1
- package/dist/components/separator.cjs +1 -1
- package/dist/components/separator.es.js +1 -1
- package/dist/components/split-button.cjs +1 -1
- package/dist/components/split-button.es.js +1 -1
- package/dist/components/switch.cjs +1 -1
- package/dist/components/switch.es.js +1 -1
- package/dist/components/tabs.cjs +1 -1
- package/dist/components/tabs.es.js +1 -1
- package/dist/components/tag-group.cjs +1 -1
- package/dist/components/tag-group.es.js +1 -1
- package/dist/components/text-input-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 +50 -50
- package/package.json +5 -5
- package/dist/chunks/alert-BCYCzZHo.cjs.js +0 -2
- package/dist/chunks/alert-BCYCzZHo.cjs.js.map +0 -1
- package/dist/chunks/alert-CHelUUKJ.es.js +0 -211
- package/dist/chunks/alert-CHelUUKJ.es.js.map +0 -1
- package/dist/chunks/index-D7AZ7gZk.cjs.js.map +0 -1
- package/dist/chunks/index-GtJPgmcq.es.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"range-calendar-fvekZzen.es.js","sources":["../../src/components/range-calendar/range-calendar.slots.tsx","../../src/components/range-calendar/range-calendar.i18n.ts","../../src/components/range-calendar/components/range-calendar.custom-context.tsx","../../src/components/range-calendar/components/range-calendar.header.tsx","../../src/components/range-calendar/components/range-calendar.grids.tsx","../../src/components/range-calendar/range-calendar.tsx"],"sourcesContent":["import { createSlotRecipeContext } from \"@chakra-ui/react\";\nimport type { SlotComponent } from \"@/type-utils\";\nimport type {\n RangeCalendarRootSlotProps,\n RangeCalendarHeaderSlotProps,\n RangeCalendarGridsSlotProps,\n RangeCalendarMonthTitleSlotProps,\n RangeCalendarGridSlotProps,\n RangeCalendarGridHeaderSlotProps,\n RangeCalendarHeaderCellSlotProps,\n RangeCalendarGridBodySlotProps,\n RangeCalendarCellSlotProps,\n} from \"./range-calendar.types\";\n\nconst { withProvider, withContext } = createSlotRecipeContext({\n key: \"rangeCalendar\",\n});\n\nexport const RangeCalendarRootSlot: SlotComponent<\n HTMLDivElement,\n RangeCalendarRootSlotProps\n> = withProvider<HTMLDivElement, RangeCalendarRootSlotProps>(\"div\", \"root\");\n\nexport const RangeCalendarHeaderSlot = withContext<\n HTMLDivElement,\n RangeCalendarHeaderSlotProps\n>(\"div\", \"header\");\n\nexport const RangeCalendarGridsSlot = withContext<\n HTMLDivElement,\n RangeCalendarGridsSlotProps\n>(\"div\", \"grids\");\n\nexport const RangeCalendarMonthTitleSlot = withContext<\n HTMLDivElement,\n RangeCalendarMonthTitleSlotProps\n>(\"div\", \"monthTitle\");\n\nexport const RangeCalendarGridSlot = withContext<\n HTMLTableElement,\n RangeCalendarGridSlotProps\n>(\"table\", \"grid\");\n\nexport const RangeCalendarGridHeaderSlot = withContext<\n HTMLTableSectionElement,\n RangeCalendarGridHeaderSlotProps\n>(\"thead\", \"gridHeader\");\n\nexport const RangeCalendarHeaderCellSlot = withContext<\n HTMLTableCellElement,\n RangeCalendarHeaderCellSlotProps\n>(\"th\", \"headerCell\");\n\nexport const RangeCalendarGridBodySlot = withContext<\n HTMLTableSectionElement,\n RangeCalendarGridBodySlotProps\n>(\"tbody\", \"gridBody\");\n\nexport const RangeCalendarCellSlot = withContext<\n HTMLTableCellElement,\n RangeCalendarCellSlotProps\n>(\"td\", \"bodyCell\");\n","import { defineMessages } from \"react-intl\";\n\nexport const messages = defineMessages({\n nextMonth: {\n id: \"Nimbus.RangeCalendar.nextMonth\",\n description: \"aria-label for next month navigation button\",\n defaultMessage: \"Next month\",\n },\n previousMonth: {\n id: \"Nimbus.RangeCalendar.previousMonth\",\n description: \"aria-label for previous month navigation button\",\n defaultMessage: \"Previous month\",\n },\n nextYear: {\n id: \"Nimbus.RangeCalendar.nextYear\",\n description: \"aria-label for next year navigation button\",\n defaultMessage: \"Next year\",\n },\n previousYear: {\n id: \"Nimbus.RangeCalendar.previousYear\",\n description: \"aria-label for previous year navigation button\",\n defaultMessage: \"Previous year\",\n },\n});\n","import { getLocalTimeZone } from \"@internationalized/date\";\nimport { useContext } from \"react\";\nimport {\n Provider,\n ButtonContext,\n RangeCalendarStateContext,\n TextContext,\n useLocale,\n} from \"react-aria-components\";\nimport { useIntl } from \"react-intl\";\nimport { messages } from \"../range-calendar.i18n\";\n\nexport const RangeCalendarCustomContext = ({\n children,\n}: {\n children: React.ReactNode;\n}) => {\n const intl = useIntl();\n const { locale } = useLocale();\n const buttonContext = useContext(ButtonContext)!;\n const textContext = useContext(TextContext)!;\n const calendarState = useContext(RangeCalendarStateContext)!;\n\n /**\n * Button slots\n * ================================\n */\n const buttonSlots = {\n \"next-month\": {\n onPress: () => calendarState.focusNextSection(),\n \"aria-label\": intl.formatMessage(messages.nextMonth),\n },\n \"previous-month\": {\n onPress: () => calendarState.focusPreviousSection(),\n \"aria-label\": intl.formatMessage(messages.previousMonth),\n },\n \"next-year\": {\n onPress: () => calendarState.focusNextSection(true),\n \"aria-label\": intl.formatMessage(messages.nextYear),\n },\n \"previous-year\": {\n onPress: () => calendarState.focusPreviousSection(true),\n \"aria-label\": intl.formatMessage(messages.previousYear),\n },\n };\n\n /**\n * Text slots\n * ================================\n */\n const monthLabel = new Intl.DateTimeFormat(locale, {\n month: \"long\",\n }).format(calendarState.focusedDate.toDate(getLocalTimeZone()));\n\n const monthRangeLabel = [\n new Intl.DateTimeFormat(locale, {\n month: \"long\",\n }).format(calendarState.visibleRange.start.toDate(getLocalTimeZone())),\n new Intl.DateTimeFormat(locale, {\n month: \"long\",\n }).format(calendarState.visibleRange.end.toDate(getLocalTimeZone())),\n ].join(\" - \");\n\n const yearLabel = new Intl.DateTimeFormat(locale, {\n year: \"numeric\",\n }).format(calendarState.focusedDate.toDate(getLocalTimeZone()));\n\n const textSlots = {\n month: { children: monthLabel },\n monthRange: { children: monthRangeLabel },\n year: { children: yearLabel },\n };\n\n return (\n <Provider\n values={[\n [\n ButtonContext,\n {\n ...buttonContext,\n slots: {\n ...(buttonContext &&\n typeof buttonContext === \"object\" &&\n \"slots\" in buttonContext\n ? buttonContext.slots\n : {}),\n ...buttonSlots,\n },\n },\n ],\n [\n TextContext,\n {\n ...textContext,\n slots: {\n ...(textContext &&\n typeof textContext === \"object\" &&\n \"slots\" in textContext\n ? textContext.slots\n : {}),\n ...textSlots,\n },\n },\n ],\n ]}\n >\n {children}\n </Provider>\n );\n};\n","import {\n RangeCalendarContext,\n Heading,\n useSlottedContext,\n} from \"react-aria-components\";\nimport {\n Box,\n Flex,\n IconButton,\n Stack,\n Text,\n VisuallyHidden,\n} from \"@/components\";\nimport {\n KeyboardArrowLeft,\n KeyboardArrowRight,\n} from \"@commercetools/nimbus-icons\";\nimport { RangeCalendarHeaderSlot } from \"../range-calendar.slots\";\n\n/**\n * RangeCalendarHeader - Header component for the RangeCalendar\n *\n * Displays navigation controls for month and year selection with proper\n * internationalization and accessibility support.\n */\nexport const RangeCalendarHeader = () => {\n const rangeCalendarProps = useSlottedContext(RangeCalendarContext);\n\n // Needed to decide whether to show a single month or a range\n const visibleDurationMonths =\n rangeCalendarProps?.visibleDuration?.months || 1;\n const showRangeLabel = visibleDurationMonths > 1;\n\n return (\n <RangeCalendarHeaderSlot>\n <Flex>\n <Stack direction=\"row\" alignItems=\"center\">\n {/** solely for screen readers, if not present, a11y issues are raised */}\n <VisuallyHidden>\n <Heading />\n </VisuallyHidden>\n {/* @ts-expect-error - custom-context will add aria-label via the \"slot\" prop */}\n <IconButton\n slot={showRangeLabel ? \"previous\" : \"previous-month\"}\n size=\"xs\"\n variant=\"ghost\"\n colorPalette=\"primary\"\n >\n <KeyboardArrowLeft />\n </IconButton>\n <Text\n textStyle=\"sm\"\n fontWeight=\"500\"\n color=\"neutral.11\"\n width={showRangeLabel ? \"4000\" : \"2000\"}\n textAlign=\"center\"\n aria-hidden=\"true\"\n slot={showRangeLabel ? \"monthRange\" : \"month\"}\n />\n {/* @ts-expect-error - custom-context will add aria-label via the \"slot\" prop */}\n <IconButton\n slot={showRangeLabel ? \"next\" : \"next-month\"}\n size=\"xs\"\n variant=\"ghost\"\n colorPalette=\"primary\"\n >\n <KeyboardArrowRight />\n </IconButton>\n </Stack>\n <Box flexGrow=\"1\" />\n <Stack direction=\"row\" alignItems=\"center\">\n {/* @ts-expect-error - custom-context will add aria-label via the \"slot\" prop */}\n <IconButton\n slot=\"previous-year\"\n size=\"xs\"\n variant=\"ghost\"\n colorPalette=\"primary\"\n >\n <KeyboardArrowLeft />\n </IconButton>\n <Text\n textStyle=\"sm\"\n fontWeight=\"500\"\n color=\"neutral.11\"\n width=\"1400\"\n textAlign=\"center\"\n aria-hidden=\"true\"\n slot=\"year\"\n />\n {/* @ts-expect-error - custom-context will add aria-label via the \"slot\" prop */}\n <IconButton\n slot=\"next-year\"\n size=\"xs\"\n variant=\"ghost\"\n colorPalette=\"primary\"\n >\n <KeyboardArrowRight />\n </IconButton>\n </Stack>\n </Flex>\n </RangeCalendarHeaderSlot>\n );\n};\n","import { useContext } from \"react\";\nimport { today, getLocalTimeZone } from \"@internationalized/date\";\nimport {\n CalendarGrid as RaCalendarGrid,\n CalendarGridBody as RaCalendarGridBody,\n CalendarGridHeader as RaCalendarGridHeader,\n CalendarHeaderCell as RaCalendarHeaderCell,\n CalendarCell as RaCalendarCell,\n useSlottedContext,\n RangeCalendarContext,\n RangeCalendarStateContext,\n useLocale,\n} from \"react-aria-components\";\nimport { Box } from \"@/components\";\n\nimport {\n RangeCalendarCellSlot,\n RangeCalendarGridBodySlot,\n RangeCalendarGridHeaderSlot,\n RangeCalendarGridsSlot,\n RangeCalendarGridSlot,\n RangeCalendarHeaderCellSlot,\n RangeCalendarMonthTitleSlot,\n} from \"../range-calendar.slots\";\n\n/**\n * RangeCalendarGrids - Grid container component for the RangeCalendar\n *\n * Renders calendar grids for one or more months with proper date cells,\n * weekday headers, and internationalization support.\n */\nexport const RangeCalendarGrids = () => {\n const { locale } = useLocale();\n const context = useSlottedContext(RangeCalendarContext);\n\n const calendarState = useContext(RangeCalendarStateContext)!;\n const visibleMonthsCount = context?.visibleDuration?.months || 1;\n const todayDate = today(getLocalTimeZone());\n const showMonthTitles = visibleMonthsCount > 1;\n\n return (\n <RangeCalendarGridsSlot>\n {Array.from({ length: visibleMonthsCount }, (_, index) => {\n const gridDate = calendarState.visibleRange.start.add({\n months: index,\n });\n const monthName = new Intl.DateTimeFormat(locale, {\n month: \"long\",\n }).format(gridDate.toDate(getLocalTimeZone()));\n\n return (\n <Box\n key={monthName}\n width={visibleMonthsCount == 1 ? \"full\" : \"auto\"}\n >\n {showMonthTitles && (\n <RangeCalendarMonthTitleSlot>\n {monthName}\n </RangeCalendarMonthTitleSlot>\n )}\n <RangeCalendarGridSlot asChild>\n <RaCalendarGrid offset={{ months: index }} weekdayStyle=\"short\">\n <RangeCalendarGridHeaderSlot asChild>\n <RaCalendarGridHeader>\n {(day) => (\n <RangeCalendarHeaderCellSlot asChild>\n <RaCalendarHeaderCell>{day}</RaCalendarHeaderCell>\n </RangeCalendarHeaderCellSlot>\n )}\n </RaCalendarGridHeader>\n </RangeCalendarGridHeaderSlot>\n <RangeCalendarGridBodySlot asChild>\n <RaCalendarGridBody>\n {(date) => {\n const isToday = date.compare(todayDate) === 0;\n return (\n <RangeCalendarCellSlot asChild data-today={isToday}>\n <RaCalendarCell date={date} />\n </RangeCalendarCellSlot>\n );\n }}\n </RaCalendarGridBody>\n </RangeCalendarGridBodySlot>\n </RaCalendarGrid>\n </RangeCalendarGridSlot>\n </Box>\n );\n })}\n </RangeCalendarGridsSlot>\n );\n};\n","import type { RangeCalendarProps } from \"./range-calendar.types\";\nimport type { DateValue } from \"@internationalized/date\";\nimport { RangeCalendar as RaRangeCalendar } from \"react-aria-components\";\nimport { RangeCalendarRootSlot } from \"./range-calendar.slots\";\nimport {\n RangeCalendarCustomContext,\n RangeCalendarHeader,\n RangeCalendarGrids,\n} from \"./components\";\nimport { rangeCalendarSlotRecipe } from \"./range-calendar.recipe\";\nimport { useRecipe } from \"@chakra-ui/react/styled-system\";\nimport { extractStyleProps } from \"@/utils\";\n\n/**\n * RangeCalendar\n * ============================================================\n * Calendar component that displays a grid of days in one or more months\n * and allows users to select a range of dates. Built with React Aria\n * Components for accessibility and WCAG 2.1 AA compliance.\n *\n * @see {@link https://nimbus-documentation.vercel.app/components/inputs/rangecalendar}\n *\n * @supportsStylePropsx\n */\nexport const RangeCalendar = (props: RangeCalendarProps<DateValue>) => {\n const recipe = useRecipe({ recipe: rangeCalendarSlotRecipe });\n const [recipeProps, remainingProps] = recipe.splitVariantProps(props);\n const [styleProps, otherProps] = extractStyleProps(remainingProps);\n\n return (\n <RangeCalendarRootSlot {...recipeProps} {...styleProps} asChild>\n <RaRangeCalendar {...otherProps}>\n <RangeCalendarCustomContext>\n <RangeCalendarHeader />\n <RangeCalendarGrids />\n </RangeCalendarCustomContext>\n </RaRangeCalendar>\n </RangeCalendarRootSlot>\n );\n};\n\nRangeCalendar.displayName = \"RangeCalendar\";\n"],"names":["withProvider","withContext","createSlotRecipeContext","RangeCalendarRootSlot","RangeCalendarHeaderSlot","RangeCalendarGridsSlot","RangeCalendarMonthTitleSlot","RangeCalendarGridSlot","RangeCalendarGridHeaderSlot","RangeCalendarHeaderCellSlot","RangeCalendarGridBodySlot","RangeCalendarCellSlot","messages","defineMessages","RangeCalendarCustomContext","children","intl","useIntl","locale","useLocale","buttonContext","useContext","ButtonContext","textContext","TextContext","calendarState","RangeCalendarStateContext","buttonSlots","monthLabel","getLocalTimeZone","monthRangeLabel","yearLabel","textSlots","jsx","Provider","RangeCalendarHeader","showRangeLabel","useSlottedContext","RangeCalendarContext","jsxs","Flex","Stack","VisuallyHidden","Heading","IconButton","KeyboardArrowLeft","Text","KeyboardArrowRight","Box","RangeCalendarGrids","context","visibleMonthsCount","todayDate","today","showMonthTitles","_","index","gridDate","monthName","RaCalendarGrid","RaCalendarGridHeader","day","RaCalendarHeaderCell","RaCalendarGridBody","date","isToday","RaCalendarCell","RangeCalendar","props","recipe","useRecipe","rangeCalendarSlotRecipe","recipeProps","remainingProps","styleProps","otherProps","extractStyleProps","RaRangeCalendar"],"mappings":";;;;;;;;;;;;;;;;;;;;AAcA,MAAM,EAAE,cAAAA,GAAc,aAAAC,EAAA,IAAgB,gBAAAC,EAAwB;AAAA,EAC5D,KAAK;AACP,CAAC,GAEYC,IAGT,gBAAAH,EAAyD,OAAO,MAAM,GAE7DI,IAA0B,gBAAAH,EAGrC,OAAO,QAAQ,GAEJI,IAAyB,gB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,GACF;AAEJ;AAEAkB,GAAc,cAAc;"}
|
|
1
|
+
{"version":3,"file":"range-calendar-Q0QKtRQY.es.js","sources":["../../src/components/range-calendar/range-calendar.slots.tsx","../../src/components/range-calendar/range-calendar.i18n.ts","../../src/components/range-calendar/components/range-calendar.custom-context.tsx","../../src/components/range-calendar/components/range-calendar.header.tsx","../../src/components/range-calendar/components/range-calendar.grids.tsx","../../src/components/range-calendar/range-calendar.tsx"],"sourcesContent":["import { createSlotRecipeContext } from \"@chakra-ui/react\";\nimport type { SlotComponent } from \"@/type-utils\";\nimport type {\n RangeCalendarRootSlotProps,\n RangeCalendarHeaderSlotProps,\n RangeCalendarGridsSlotProps,\n RangeCalendarMonthTitleSlotProps,\n RangeCalendarGridSlotProps,\n RangeCalendarGridHeaderSlotProps,\n RangeCalendarHeaderCellSlotProps,\n RangeCalendarGridBodySlotProps,\n RangeCalendarCellSlotProps,\n} from \"./range-calendar.types\";\n\nconst { withProvider, withContext } = createSlotRecipeContext({\n key: \"rangeCalendar\",\n});\n\nexport const RangeCalendarRootSlot: SlotComponent<\n HTMLDivElement,\n RangeCalendarRootSlotProps\n> = withProvider<HTMLDivElement, RangeCalendarRootSlotProps>(\"div\", \"root\");\n\nexport const RangeCalendarHeaderSlot = withContext<\n HTMLDivElement,\n RangeCalendarHeaderSlotProps\n>(\"div\", \"header\");\n\nexport const RangeCalendarGridsSlot = withContext<\n HTMLDivElement,\n RangeCalendarGridsSlotProps\n>(\"div\", \"grids\");\n\nexport const RangeCalendarMonthTitleSlot = withContext<\n HTMLDivElement,\n RangeCalendarMonthTitleSlotProps\n>(\"div\", \"monthTitle\");\n\nexport const RangeCalendarGridSlot = withContext<\n HTMLTableElement,\n RangeCalendarGridSlotProps\n>(\"table\", \"grid\");\n\nexport const RangeCalendarGridHeaderSlot = withContext<\n HTMLTableSectionElement,\n RangeCalendarGridHeaderSlotProps\n>(\"thead\", \"gridHeader\");\n\nexport const RangeCalendarHeaderCellSlot = withContext<\n HTMLTableCellElement,\n RangeCalendarHeaderCellSlotProps\n>(\"th\", \"headerCell\");\n\nexport const RangeCalendarGridBodySlot = withContext<\n HTMLTableSectionElement,\n RangeCalendarGridBodySlotProps\n>(\"tbody\", \"gridBody\");\n\nexport const RangeCalendarCellSlot = withContext<\n HTMLTableCellElement,\n RangeCalendarCellSlotProps\n>(\"td\", \"bodyCell\");\n","import { defineMessages } from \"react-intl\";\n\nexport const messages = defineMessages({\n nextMonth: {\n id: \"Nimbus.RangeCalendar.nextMonth\",\n description: \"aria-label for next month navigation button\",\n defaultMessage: \"Next month\",\n },\n previousMonth: {\n id: \"Nimbus.RangeCalendar.previousMonth\",\n description: \"aria-label for previous month navigation button\",\n defaultMessage: \"Previous month\",\n },\n nextYear: {\n id: \"Nimbus.RangeCalendar.nextYear\",\n description: \"aria-label for next year navigation button\",\n defaultMessage: \"Next year\",\n },\n previousYear: {\n id: \"Nimbus.RangeCalendar.previousYear\",\n description: \"aria-label for previous year navigation button\",\n defaultMessage: \"Previous year\",\n },\n});\n","import { getLocalTimeZone } from \"@internationalized/date\";\nimport { useContext } from \"react\";\nimport {\n Provider,\n ButtonContext,\n RangeCalendarStateContext,\n TextContext,\n useLocale,\n} from \"react-aria-components\";\nimport { useIntl } from \"react-intl\";\nimport { messages } from \"../range-calendar.i18n\";\n\nexport const RangeCalendarCustomContext = ({\n children,\n}: {\n children: React.ReactNode;\n}) => {\n const intl = useIntl();\n const { locale } = useLocale();\n const buttonContext = useContext(ButtonContext)!;\n const textContext = useContext(TextContext)!;\n const calendarState = useContext(RangeCalendarStateContext)!;\n\n /**\n * Button slots\n * ================================\n */\n const buttonSlots = {\n \"next-month\": {\n onPress: () => calendarState.focusNextSection(),\n \"aria-label\": intl.formatMessage(messages.nextMonth),\n },\n \"previous-month\": {\n onPress: () => calendarState.focusPreviousSection(),\n \"aria-label\": intl.formatMessage(messages.previousMonth),\n },\n \"next-year\": {\n onPress: () => calendarState.focusNextSection(true),\n \"aria-label\": intl.formatMessage(messages.nextYear),\n },\n \"previous-year\": {\n onPress: () => calendarState.focusPreviousSection(true),\n \"aria-label\": intl.formatMessage(messages.previousYear),\n },\n };\n\n /**\n * Text slots\n * ================================\n */\n const monthLabel = new Intl.DateTimeFormat(locale, {\n month: \"long\",\n }).format(calendarState.focusedDate.toDate(getLocalTimeZone()));\n\n const monthRangeLabel = [\n new Intl.DateTimeFormat(locale, {\n month: \"long\",\n }).format(calendarState.visibleRange.start.toDate(getLocalTimeZone())),\n new Intl.DateTimeFormat(locale, {\n month: \"long\",\n }).format(calendarState.visibleRange.end.toDate(getLocalTimeZone())),\n ].join(\" - \");\n\n const yearLabel = new Intl.DateTimeFormat(locale, {\n year: \"numeric\",\n }).format(calendarState.focusedDate.toDate(getLocalTimeZone()));\n\n const textSlots = {\n month: { children: monthLabel },\n monthRange: { children: monthRangeLabel },\n year: { children: yearLabel },\n };\n\n return (\n <Provider\n values={[\n [\n ButtonContext,\n {\n ...buttonContext,\n slots: {\n ...(buttonContext &&\n typeof buttonContext === \"object\" &&\n \"slots\" in buttonContext\n ? buttonContext.slots\n : {}),\n ...buttonSlots,\n },\n },\n ],\n [\n TextContext,\n {\n ...textContext,\n slots: {\n ...(textContext &&\n typeof textContext === \"object\" &&\n \"slots\" in textContext\n ? textContext.slots\n : {}),\n ...textSlots,\n },\n },\n ],\n ]}\n >\n {children}\n </Provider>\n );\n};\n","import {\n RangeCalendarContext,\n Heading,\n useSlottedContext,\n} from \"react-aria-components\";\nimport {\n Box,\n Flex,\n IconButton,\n Stack,\n Text,\n VisuallyHidden,\n} from \"@/components\";\nimport {\n KeyboardArrowLeft,\n KeyboardArrowRight,\n} from \"@commercetools/nimbus-icons\";\nimport { RangeCalendarHeaderSlot } from \"../range-calendar.slots\";\n\n/**\n * RangeCalendarHeader - Header component for the RangeCalendar\n *\n * Displays navigation controls for month and year selection with proper\n * internationalization and accessibility support.\n */\nexport const RangeCalendarHeader = () => {\n const rangeCalendarProps = useSlottedContext(RangeCalendarContext);\n\n // Needed to decide whether to show a single month or a range\n const visibleDurationMonths =\n rangeCalendarProps?.visibleDuration?.months || 1;\n const showRangeLabel = visibleDurationMonths > 1;\n\n return (\n <RangeCalendarHeaderSlot>\n <Flex>\n <Stack direction=\"row\" alignItems=\"center\">\n {/** solely for screen readers, if not present, a11y issues are raised */}\n <VisuallyHidden>\n <Heading />\n </VisuallyHidden>\n {/* @ts-expect-error - custom-context will add aria-label via the \"slot\" prop */}\n <IconButton\n slot={showRangeLabel ? \"previous\" : \"previous-month\"}\n size=\"xs\"\n variant=\"ghost\"\n colorPalette=\"primary\"\n >\n <KeyboardArrowLeft />\n </IconButton>\n <Text\n textStyle=\"sm\"\n fontWeight=\"500\"\n color=\"neutral.11\"\n width={showRangeLabel ? \"4000\" : \"2000\"}\n textAlign=\"center\"\n aria-hidden=\"true\"\n slot={showRangeLabel ? \"monthRange\" : \"month\"}\n />\n {/* @ts-expect-error - custom-context will add aria-label via the \"slot\" prop */}\n <IconButton\n slot={showRangeLabel ? \"next\" : \"next-month\"}\n size=\"xs\"\n variant=\"ghost\"\n colorPalette=\"primary\"\n >\n <KeyboardArrowRight />\n </IconButton>\n </Stack>\n <Box flexGrow=\"1\" />\n <Stack direction=\"row\" alignItems=\"center\">\n {/* @ts-expect-error - custom-context will add aria-label via the \"slot\" prop */}\n <IconButton\n slot=\"previous-year\"\n size=\"xs\"\n variant=\"ghost\"\n colorPalette=\"primary\"\n >\n <KeyboardArrowLeft />\n </IconButton>\n <Text\n textStyle=\"sm\"\n fontWeight=\"500\"\n color=\"neutral.11\"\n width=\"1400\"\n textAlign=\"center\"\n aria-hidden=\"true\"\n slot=\"year\"\n />\n {/* @ts-expect-error - custom-context will add aria-label via the \"slot\" prop */}\n <IconButton\n slot=\"next-year\"\n size=\"xs\"\n variant=\"ghost\"\n colorPalette=\"primary\"\n >\n <KeyboardArrowRight />\n </IconButton>\n </Stack>\n </Flex>\n </RangeCalendarHeaderSlot>\n );\n};\n","import { useContext } from \"react\";\nimport { today, getLocalTimeZone } from \"@internationalized/date\";\nimport {\n CalendarGrid as RaCalendarGrid,\n CalendarGridBody as RaCalendarGridBody,\n CalendarGridHeader as RaCalendarGridHeader,\n CalendarHeaderCell as RaCalendarHeaderCell,\n CalendarCell as RaCalendarCell,\n useSlottedContext,\n RangeCalendarContext,\n RangeCalendarStateContext,\n useLocale,\n} from \"react-aria-components\";\nimport { Box } from \"@/components\";\n\nimport {\n RangeCalendarCellSlot,\n RangeCalendarGridBodySlot,\n RangeCalendarGridHeaderSlot,\n RangeCalendarGridsSlot,\n RangeCalendarGridSlot,\n RangeCalendarHeaderCellSlot,\n RangeCalendarMonthTitleSlot,\n} from \"../range-calendar.slots\";\n\n/**\n * RangeCalendarGrids - Grid container component for the RangeCalendar\n *\n * Renders calendar grids for one or more months with proper date cells,\n * weekday headers, and internationalization support.\n */\nexport const RangeCalendarGrids = () => {\n const { locale } = useLocale();\n const context = useSlottedContext(RangeCalendarContext);\n\n const calendarState = useContext(RangeCalendarStateContext)!;\n const visibleMonthsCount = context?.visibleDuration?.months || 1;\n const todayDate = today(getLocalTimeZone());\n const showMonthTitles = visibleMonthsCount > 1;\n\n return (\n <RangeCalendarGridsSlot>\n {Array.from({ length: visibleMonthsCount }, (_, index) => {\n const gridDate = calendarState.visibleRange.start.add({\n months: index,\n });\n const monthName = new Intl.DateTimeFormat(locale, {\n month: \"long\",\n }).format(gridDate.toDate(getLocalTimeZone()));\n\n return (\n <Box\n key={monthName}\n width={visibleMonthsCount == 1 ? \"full\" : \"auto\"}\n >\n {showMonthTitles && (\n <RangeCalendarMonthTitleSlot>\n {monthName}\n </RangeCalendarMonthTitleSlot>\n )}\n <RangeCalendarGridSlot asChild>\n <RaCalendarGrid offset={{ months: index }} weekdayStyle=\"short\">\n <RangeCalendarGridHeaderSlot asChild>\n <RaCalendarGridHeader>\n {(day) => (\n <RangeCalendarHeaderCellSlot asChild>\n <RaCalendarHeaderCell>{day}</RaCalendarHeaderCell>\n </RangeCalendarHeaderCellSlot>\n )}\n </RaCalendarGridHeader>\n </RangeCalendarGridHeaderSlot>\n <RangeCalendarGridBodySlot asChild>\n <RaCalendarGridBody>\n {(date) => {\n const isToday = date.compare(todayDate) === 0;\n return (\n <RangeCalendarCellSlot asChild data-today={isToday}>\n <RaCalendarCell date={date} />\n </RangeCalendarCellSlot>\n );\n }}\n </RaCalendarGridBody>\n </RangeCalendarGridBodySlot>\n </RaCalendarGrid>\n </RangeCalendarGridSlot>\n </Box>\n );\n })}\n </RangeCalendarGridsSlot>\n );\n};\n","import type { RangeCalendarProps } from \"./range-calendar.types\";\nimport type { DateValue } from \"@internationalized/date\";\nimport { RangeCalendar as RaRangeCalendar } from \"react-aria-components\";\nimport { RangeCalendarRootSlot } from \"./range-calendar.slots\";\nimport {\n RangeCalendarCustomContext,\n RangeCalendarHeader,\n RangeCalendarGrids,\n} from \"./components\";\nimport { rangeCalendarSlotRecipe } from \"./range-calendar.recipe\";\nimport { useRecipe } from \"@chakra-ui/react/styled-system\";\nimport { extractStyleProps } from \"@/utils\";\n\n/**\n * RangeCalendar\n * ============================================================\n * Calendar component that displays a grid of days in one or more months\n * and allows users to select a range of dates. Built with React Aria\n * Components for accessibility and WCAG 2.1 AA compliance.\n *\n * @see {@link https://nimbus-documentation.vercel.app/components/inputs/rangecalendar}\n *\n * @supportsStylePropsx\n */\nexport const RangeCalendar = (props: RangeCalendarProps<DateValue>) => {\n const recipe = useRecipe({ recipe: rangeCalendarSlotRecipe });\n const [recipeProps, remainingProps] = recipe.splitVariantProps(props);\n const [styleProps, otherProps] = extractStyleProps(remainingProps);\n\n return (\n <RangeCalendarRootSlot {...recipeProps} {...styleProps} asChild>\n <RaRangeCalendar {...otherProps}>\n <RangeCalendarCustomContext>\n <RangeCalendarHeader />\n <RangeCalendarGrids />\n </RangeCalendarCustomContext>\n </RaRangeCalendar>\n </RangeCalendarRootSlot>\n );\n};\n\nRangeCalendar.displayName = \"RangeCalendar\";\n"],"names":["withProvider","withContext","createSlotRecipeContext","RangeCalendarRootSlot","RangeCalendarHeaderSlot","RangeCalendarGridsSlot","RangeCalendarMonthTitleSlot","RangeCalendarGridSlot","RangeCalendarGridHeaderSlot","RangeCalendarHeaderCellSlot","RangeCalendarGridBodySlot","RangeCalendarCellSlot","messages","defineMessages","RangeCalendarCustomContext","children","intl","useIntl","locale","useLocale","buttonContext","useContext","ButtonContext","textContext","TextContext","calendarState","RangeCalendarStateContext","buttonSlots","monthLabel","getLocalTimeZone","monthRangeLabel","yearLabel","textSlots","jsx","Provider","RangeCalendarHeader","showRangeLabel","useSlottedContext","RangeCalendarContext","jsxs","Flex","Stack","VisuallyHidden","Heading","IconButton","KeyboardArrowLeft","Text","KeyboardArrowRight","Box","RangeCalendarGrids","context","visibleMonthsCount","todayDate","today","showMonthTitles","_","index","gridDate","monthName","RaCalendarGrid","RaCalendarGridHeader","day","RaCalendarHeaderCell","RaCalendarGridBody","date","isToday","RaCalendarCell","RangeCalendar","props","recipe","useRecipe","rangeCalendarSlotRecipe","recipeProps","remainingProps","styleProps","otherProps","extractStyleProps","RaRangeCalendar"],"mappings":";;;;;;;;;;;;;;;;;;;;AAcA,MAAM,EAAE,cAAAA,GAAc,aAAAC,EAAA,IAAgB,gBAAAC,EAAwB;AAAA,EAC5D,KAAK;AACP,CAAC,GAEYC,IAGT,gBAAAH,EAAyD,OAAO,MAAM,GAE7DI,IAA0B,gBAAAH,EAGrC,OAAO,QAAQ,GAEJI,IAAyB,gBAAAJ,EAGpC,OAAO,OAAO,GAEHK,IAA8B,gBAAAL,EAGzC,OAAO,YAAY,GAERM,IAAwB,gBAAAN,EAGnC,SAAS,MAAM,GAEJO,IAA8B,gBAAAP,EAGzC,SAAS,YAAY,GAEVQ,KAA8B,gBAAAR,EAGzC,MAAM,YAAY,GAEPS,KAA4B,gBAAAT,EAGvC,SAAS,UAAU,GAERU,KAAwB,gBAAAV,EAGnC,MAAM,UAAU,GC3DLW,IAAW,gBAAAC,EAAe;AAAA,EACrC,WAAW;AAAA,IACT,IAA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EAAA,CAAI,GAC7B,GAEJ,EAAA,CACF;AAAA,8BACCnD,IAAA,EAA0B,SAAO,IAChC,UAAA,gBAAAuB,EAAC8B,GAAA,EACE,WAACC,MAAS;AACT,oBAAMC,IAAUD,EAAK,QAAQZ,CAAS,MAAM;AAC5C,qBACE,gBAAAnB,EAACtB,MAAsB,SAAO,IAAC,cAAYsD,GACzC,UAAA,gBAAAhC,EAACiC,GAAA,EAAe,MAAAF,EAAA,CAAY,EAAA,CAC9B;AAAA,YAEJ,GACF,EAAA,CACF;AAAA,UAAA,EAAA,CACF,EAAA,CACF;AAAA,QAAA;AAAA,MAAA;AAAA,MAhCKN;AAAA,IAAA;AAAA,EAmCX,CAAC,EAAA,CACH;AAEJ,GClEaS,KAAgB,CAACC,MAAyC;AACrE,QAAMC,IAASC,EAAU,EAAE,QAAQC,GAAyB,GACtD,CAACC,GAAaC,CAAc,IAAIJ,EAAO,kBAAkBD,CAAK,GAC9D,CAACM,GAAYC,CAAU,IAAIC,EAAkBH,CAAc;AAEjE,SACE,gBAAAxC,EAAC9B,GAAA,EAAuB,GAAGqE,GAAc,GAAGE,GAAY,SAAO,IAC7D,UAAA,gBAAAzC,EAAC4C,GAAA,EAAiB,GAAGF,GACnB,4BAAC7D,IAAA,EACC,UAAA;AAAA,IAAA,gBAAAmB,EAACE,IAAA,EAAoB;AAAA,sBACpBc,IAAA,CAAA,CAAmB;AAAA,EAAA,EAAA,CACtB,GACF,GACF;AAEJ;AAEAkB,GAAc,cAAc;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const e=require("react/jsx-runtime"),r=require("./Heading-kcnZ-PKv.cjs.js"),M=require("@chakra-ui/react"),D=require("./index-
|
|
2
|
-
//# sourceMappingURL=range-calendar-
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),r=require("./Heading-kcnZ-PKv.cjs.js"),M=require("@chakra-ui/react"),D=require("./index-LgrrgjIe.cjs.js"),I=require("@chakra-ui/react/styled-system"),T=require("./extract-style-props-CZMJJ-Ii.cjs.js"),c=require("./useDateFormatter-WCaFojul.cjs.js"),$=require("react"),C=require("./Button-DLCecw8f.cjs.js"),p=require("./utils-DVb3jcp5.cjs.js"),y=require("./Text-BWSfeB9p.cjs.js"),R=require("react-intl"),S=require("./context-CyT9C4U4.cjs.js"),u=require("@commercetools/nimbus-icons"),B=require("@chakra-ui/react/flex"),j=require("./stack-CIN13EDn.cjs.js"),N=require("./visually-hidden-BjtXUoFK.cjs.js"),h=require("./icon-button-LnGKZj9k.cjs.js"),v=require("./text-BtRhIklG.cjs.js"),P=require("./box-CWni3A32.cjs.js"),{withProvider:H,withContext:i}=M.createSlotRecipeContext({key:"rangeCalendar"}),A=H("div","root"),F=i("div","header"),G=i("div","grids"),L=i("div","monthTitle"),Y=i("table","grid"),k=i("thead","gridHeader"),z=i("th","headerCell"),K=i("tbody","gridBody"),V=i("td","bodyCell"),b=R.defineMessages({nextMonth:{id:"Nimbus.RangeCalendar.nextMonth",description:"aria-label for next month navigation button",defaultMessage:"Next month"},previousMonth:{id:"Nimbus.RangeCalendar.previousMonth",description:"aria-label for previous month navigation button",defaultMessage:"Previous month"},nextYear:{id:"Nimbus.RangeCalendar.nextYear",description:"aria-label for next year navigation button",defaultMessage:"Next year"},previousYear:{id:"Nimbus.RangeCalendar.previousYear",description:"aria-label for previous year navigation button",defaultMessage:"Previous year"}}),W=({children:d})=>{const n=R.useIntl(),{locale:t}=S.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),o=$.useContext(C.$d2b4bc8c273e7be6$export$24d547caef80ccd1),s=$.useContext(y.$514c0188e459b4c0$export$9afb8bc826b033ea),a=$.useContext(r.$dfd62f934fc76fed$export$5e0fc348c00f87a0),m={"next-month":{onPress:()=>a.focusNextSection(),"aria-label":n.formatMessage(b.nextMonth)},"previous-month":{onPress:()=>a.focusPreviousSection(),"aria-label":n.formatMessage(b.previousMonth)},"next-year":{onPress:()=>a.focusNextSection(!0),"aria-label":n.formatMessage(b.nextYear)},"previous-year":{onPress:()=>a.focusPreviousSection(!0),"aria-label":n.formatMessage(b.previousYear)}},f=new Intl.DateTimeFormat(t,{month:"long"}).format(a.focusedDate.toDate(c.$14e0f24ef4ac5c92$export$aa8b41735afcabd2())),g=[new Intl.DateTimeFormat(t,{month:"long"}).format(a.visibleRange.start.toDate(c.$14e0f24ef4ac5c92$export$aa8b41735afcabd2())),new Intl.DateTimeFormat(t,{month:"long"}).format(a.visibleRange.end.toDate(c.$14e0f24ef4ac5c92$export$aa8b41735afcabd2()))].join(" - "),x=new Intl.DateTimeFormat(t,{year:"numeric"}).format(a.focusedDate.toDate(c.$14e0f24ef4ac5c92$export$aa8b41735afcabd2())),l={month:{children:f},monthRange:{children:g},year:{children:x}};return e.jsx(p.$64fa3d84918910a7$export$2881499e37b75b9a,{values:[[C.$d2b4bc8c273e7be6$export$24d547caef80ccd1,{...o,slots:{...o&&typeof o=="object"&&"slots"in o?o.slots:{},...m}}],[y.$514c0188e459b4c0$export$9afb8bc826b033ea,{...s,slots:{...s&&typeof s=="object"&&"slots"in s?s.slots:{},...l}}]],children:d})},_=()=>{const t=(p.$64fa3d84918910a7$export$fabf2dc03a41866e(r.$dfd62f934fc76fed$export$233dd9682e1ad64b)?.visibleDuration?.months||1)>1;return e.jsx(F,{children:e.jsxs(B.Flex,{children:[e.jsxs(j.Stack,{direction:"row",alignItems:"center",children:[e.jsx(N.VisuallyHidden,{children:e.jsx(r.$5cb03073d3f54797$export$a8a3e93435678ff9,{})}),e.jsx(h.IconButton,{slot:t?"previous":"previous-month",size:"xs",variant:"ghost",colorPalette:"primary",children:e.jsx(u.KeyboardArrowLeft,{})}),e.jsx(v.Text,{textStyle:"sm",fontWeight:"500",color:"neutral.11",width:t?"4000":"2000",textAlign:"center","aria-hidden":"true",slot:t?"monthRange":"month"}),e.jsx(h.IconButton,{slot:t?"next":"next-month",size:"xs",variant:"ghost",colorPalette:"primary",children:e.jsx(u.KeyboardArrowRight,{})})]}),e.jsx(P.Box,{flexGrow:"1"}),e.jsxs(j.Stack,{direction:"row",alignItems:"center",children:[e.jsx(h.IconButton,{slot:"previous-year",size:"xs",variant:"ghost",colorPalette:"primary",children:e.jsx(u.KeyboardArrowLeft,{})}),e.jsx(v.Text,{textStyle:"sm",fontWeight:"500",color:"neutral.11",width:"1400",textAlign:"center","aria-hidden":"true",slot:"year"}),e.jsx(h.IconButton,{slot:"next-year",size:"xs",variant:"ghost",colorPalette:"primary",children:e.jsx(u.KeyboardArrowRight,{})})]})]})})},E=()=>{const{locale:d}=S.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),n=p.$64fa3d84918910a7$export$fabf2dc03a41866e(r.$dfd62f934fc76fed$export$233dd9682e1ad64b),t=$.useContext(r.$dfd62f934fc76fed$export$5e0fc348c00f87a0),o=n?.visibleDuration?.months||1,s=c.$14e0f24ef4ac5c92$export$d0bdf45af03a6ea3(c.$14e0f24ef4ac5c92$export$aa8b41735afcabd2()),a=o>1;return e.jsx(G,{children:Array.from({length:o},(m,f)=>{const g=t.visibleRange.start.add({months:f}),x=new Intl.DateTimeFormat(d,{month:"long"}).format(g.toDate(c.$14e0f24ef4ac5c92$export$aa8b41735afcabd2()));return e.jsxs(P.Box,{width:o==1?"full":"auto",children:[a&&e.jsx(L,{children:x}),e.jsx(Y,{asChild:!0,children:e.jsxs(r.$dfd62f934fc76fed$export$5bd780d491cfc46c,{offset:{months:f},weekdayStyle:"short",children:[e.jsx(k,{asChild:!0,children:e.jsx(r.$dfd62f934fc76fed$export$22e2d15eaa4d2377,{children:l=>e.jsx(z,{asChild:!0,children:e.jsx(r.$dfd62f934fc76fed$export$ad2135cac3a11b3d,{children:l})})})}),e.jsx(K,{asChild:!0,children:e.jsx(r.$dfd62f934fc76fed$export$e11f8ba65d857bff,{children:l=>{const w=l.compare(s)===0;return e.jsx(V,{asChild:!0,"data-today":w,children:e.jsx(r.$dfd62f934fc76fed$export$5d847498420df57b,{date:l})})}})})]})})]},x)})})},q=d=>{const n=I.useRecipe({recipe:D.rangeCalendarSlotRecipe}),[t,o]=n.splitVariantProps(d),[s,a]=T.extractStyleProps(o);return e.jsx(A,{...t,...s,asChild:!0,children:e.jsx(r.$dfd62f934fc76fed$export$a4f5c8b89d277a8d,{...a,children:e.jsxs(W,{children:[e.jsx(_,{}),e.jsx(E,{})]})})})};q.displayName="RangeCalendar";exports.RangeCalendar=q;
|
|
2
|
+
//# sourceMappingURL=range-calendar-_a9mYU8O.cjs.js.map
|
package/dist/chunks/{range-calendar-Dt6fGwHE.cjs.js.map → range-calendar-_a9mYU8O.cjs.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"range-calendar-Dt6fGwHE.cjs.js","sources":["../../src/components/range-calendar/range-calendar.slots.tsx","../../src/components/range-calendar/range-calendar.i18n.ts","../../src/components/range-calendar/components/range-calendar.custom-context.tsx","../../src/components/range-calendar/components/range-calendar.header.tsx","../../src/components/range-calendar/components/range-calendar.grids.tsx","../../src/components/range-calendar/range-calendar.tsx"],"sourcesContent":["import { createSlotRecipeContext } from \"@chakra-ui/react\";\nimport type { SlotComponent } from \"@/type-utils\";\nimport type {\n RangeCalendarRootSlotProps,\n RangeCalendarHeaderSlotProps,\n RangeCalendarGridsSlotProps,\n RangeCalendarMonthTitleSlotProps,\n RangeCalendarGridSlotProps,\n RangeCalendarGridHeaderSlotProps,\n RangeCalendarHeaderCellSlotProps,\n RangeCalendarGridBodySlotProps,\n RangeCalendarCellSlotProps,\n} from \"./range-calendar.types\";\n\nconst { withProvider, withContext } = createSlotRecipeContext({\n key: \"rangeCalendar\",\n});\n\nexport const RangeCalendarRootSlot: SlotComponent<\n HTMLDivElement,\n RangeCalendarRootSlotProps\n> = withProvider<HTMLDivElement, RangeCalendarRootSlotProps>(\"div\", \"root\");\n\nexport const RangeCalendarHeaderSlot = withContext<\n HTMLDivElement,\n RangeCalendarHeaderSlotProps\n>(\"div\", \"header\");\n\nexport const RangeCalendarGridsSlot = withContext<\n HTMLDivElement,\n RangeCalendarGridsSlotProps\n>(\"div\", \"grids\");\n\nexport const RangeCalendarMonthTitleSlot = withContext<\n HTMLDivElement,\n RangeCalendarMonthTitleSlotProps\n>(\"div\", \"monthTitle\");\n\nexport const RangeCalendarGridSlot = withContext<\n HTMLTableElement,\n RangeCalendarGridSlotProps\n>(\"table\", \"grid\");\n\nexport const RangeCalendarGridHeaderSlot = withContext<\n HTMLTableSectionElement,\n RangeCalendarGridHeaderSlotProps\n>(\"thead\", \"gridHeader\");\n\nexport const RangeCalendarHeaderCellSlot = withContext<\n HTMLTableCellElement,\n RangeCalendarHeaderCellSlotProps\n>(\"th\", \"headerCell\");\n\nexport const RangeCalendarGridBodySlot = withContext<\n HTMLTableSectionElement,\n RangeCalendarGridBodySlotProps\n>(\"tbody\", \"gridBody\");\n\nexport const RangeCalendarCellSlot = withContext<\n HTMLTableCellElement,\n RangeCalendarCellSlotProps\n>(\"td\", \"bodyCell\");\n","import { defineMessages } from \"react-intl\";\n\nexport const messages = defineMessages({\n nextMonth: {\n id: \"Nimbus.RangeCalendar.nextMonth\",\n description: \"aria-label for next month navigation button\",\n defaultMessage: \"Next month\",\n },\n previousMonth: {\n id: \"Nimbus.RangeCalendar.previousMonth\",\n description: \"aria-label for previous month navigation button\",\n defaultMessage: \"Previous month\",\n },\n nextYear: {\n id: \"Nimbus.RangeCalendar.nextYear\",\n description: \"aria-label for next year navigation button\",\n defaultMessage: \"Next year\",\n },\n previousYear: {\n id: \"Nimbus.RangeCalendar.previousYear\",\n description: \"aria-label for previous year navigation button\",\n defaultMessage: \"Previous year\",\n },\n});\n","import { getLocalTimeZone } from \"@internationalized/date\";\nimport { useContext } from \"react\";\nimport {\n Provider,\n ButtonContext,\n RangeCalendarStateContext,\n TextContext,\n useLocale,\n} from \"react-aria-components\";\nimport { useIntl } from \"react-intl\";\nimport { messages } from \"../range-calendar.i18n\";\n\nexport const RangeCalendarCustomContext = ({\n children,\n}: {\n children: React.ReactNode;\n}) => {\n const intl = useIntl();\n const { locale } = useLocale();\n const buttonContext = useContext(ButtonContext)!;\n const textContext = useContext(TextContext)!;\n const calendarState = useContext(RangeCalendarStateContext)!;\n\n /**\n * Button slots\n * ================================\n */\n const buttonSlots = {\n \"next-month\": {\n onPress: () => calendarState.focusNextSection(),\n \"aria-label\": intl.formatMessage(messages.nextMonth),\n },\n \"previous-month\": {\n onPress: () => calendarState.focusPreviousSection(),\n \"aria-label\": intl.formatMessage(messages.previousMonth),\n },\n \"next-year\": {\n onPress: () => calendarState.focusNextSection(true),\n \"aria-label\": intl.formatMessage(messages.nextYear),\n },\n \"previous-year\": {\n onPress: () => calendarState.focusPreviousSection(true),\n \"aria-label\": intl.formatMessage(messages.previousYear),\n },\n };\n\n /**\n * Text slots\n * ================================\n */\n const monthLabel = new Intl.DateTimeFormat(locale, {\n month: \"long\",\n }).format(calendarState.focusedDate.toDate(getLocalTimeZone()));\n\n const monthRangeLabel = [\n new Intl.DateTimeFormat(locale, {\n month: \"long\",\n }).format(calendarState.visibleRange.start.toDate(getLocalTimeZone())),\n new Intl.DateTimeFormat(locale, {\n month: \"long\",\n }).format(calendarState.visibleRange.end.toDate(getLocalTimeZone())),\n ].join(\" - \");\n\n const yearLabel = new Intl.DateTimeFormat(locale, {\n year: \"numeric\",\n }).format(calendarState.focusedDate.toDate(getLocalTimeZone()));\n\n const textSlots = {\n month: { children: monthLabel },\n monthRange: { children: monthRangeLabel },\n year: { children: yearLabel },\n };\n\n return (\n <Provider\n values={[\n [\n ButtonContext,\n {\n ...buttonContext,\n slots: {\n ...(buttonContext &&\n typeof buttonContext === \"object\" &&\n \"slots\" in buttonContext\n ? buttonContext.slots\n : {}),\n ...buttonSlots,\n },\n },\n ],\n [\n TextContext,\n {\n ...textContext,\n slots: {\n ...(textContext &&\n typeof textContext === \"object\" &&\n \"slots\" in textContext\n ? textContext.slots\n : {}),\n ...textSlots,\n },\n },\n ],\n ]}\n >\n {children}\n </Provider>\n );\n};\n","import {\n RangeCalendarContext,\n Heading,\n useSlottedContext,\n} from \"react-aria-components\";\nimport {\n Box,\n Flex,\n IconButton,\n Stack,\n Text,\n VisuallyHidden,\n} from \"@/components\";\nimport {\n KeyboardArrowLeft,\n KeyboardArrowRight,\n} from \"@commercetools/nimbus-icons\";\nimport { RangeCalendarHeaderSlot } from \"../range-calendar.slots\";\n\n/**\n * RangeCalendarHeader - Header component for the RangeCalendar\n *\n * Displays navigation controls for month and year selection with proper\n * internationalization and accessibility support.\n */\nexport const RangeCalendarHeader = () => {\n const rangeCalendarProps = useSlottedContext(RangeCalendarContext);\n\n // Needed to decide whether to show a single month or a range\n const visibleDurationMonths =\n rangeCalendarProps?.visibleDuration?.months || 1;\n const showRangeLabel = visibleDurationMonths > 1;\n\n return (\n <RangeCalendarHeaderSlot>\n <Flex>\n <Stack direction=\"row\" alignItems=\"center\">\n {/** solely for screen readers, if not present, a11y issues are raised */}\n <VisuallyHidden>\n <Heading />\n </VisuallyHidden>\n {/* @ts-expect-error - custom-context will add aria-label via the \"slot\" prop */}\n <IconButton\n slot={showRangeLabel ? \"previous\" : \"previous-month\"}\n size=\"xs\"\n variant=\"ghost\"\n colorPalette=\"primary\"\n >\n <KeyboardArrowLeft />\n </IconButton>\n <Text\n textStyle=\"sm\"\n fontWeight=\"500\"\n color=\"neutral.11\"\n width={showRangeLabel ? \"4000\" : \"2000\"}\n textAlign=\"center\"\n aria-hidden=\"true\"\n slot={showRangeLabel ? \"monthRange\" : \"month\"}\n />\n {/* @ts-expect-error - custom-context will add aria-label via the \"slot\" prop */}\n <IconButton\n slot={showRangeLabel ? \"next\" : \"next-month\"}\n size=\"xs\"\n variant=\"ghost\"\n colorPalette=\"primary\"\n >\n <KeyboardArrowRight />\n </IconButton>\n </Stack>\n <Box flexGrow=\"1\" />\n <Stack direction=\"row\" alignItems=\"center\">\n {/* @ts-expect-error - custom-context will add aria-label via the \"slot\" prop */}\n <IconButton\n slot=\"previous-year\"\n size=\"xs\"\n variant=\"ghost\"\n colorPalette=\"primary\"\n >\n <KeyboardArrowLeft />\n </IconButton>\n <Text\n textStyle=\"sm\"\n fontWeight=\"500\"\n color=\"neutral.11\"\n width=\"1400\"\n textAlign=\"center\"\n aria-hidden=\"true\"\n slot=\"year\"\n />\n {/* @ts-expect-error - custom-context will add aria-label via the \"slot\" prop */}\n <IconButton\n slot=\"next-year\"\n size=\"xs\"\n variant=\"ghost\"\n colorPalette=\"primary\"\n >\n <KeyboardArrowRight />\n </IconButton>\n </Stack>\n </Flex>\n </RangeCalendarHeaderSlot>\n );\n};\n","import { useContext } from \"react\";\nimport { today, getLocalTimeZone } from \"@internationalized/date\";\nimport {\n CalendarGrid as RaCalendarGrid,\n CalendarGridBody as RaCalendarGridBody,\n CalendarGridHeader as RaCalendarGridHeader,\n CalendarHeaderCell as RaCalendarHeaderCell,\n CalendarCell as RaCalendarCell,\n useSlottedContext,\n RangeCalendarContext,\n RangeCalendarStateContext,\n useLocale,\n} from \"react-aria-components\";\nimport { Box } from \"@/components\";\n\nimport {\n RangeCalendarCellSlot,\n RangeCalendarGridBodySlot,\n RangeCalendarGridHeaderSlot,\n RangeCalendarGridsSlot,\n RangeCalendarGridSlot,\n RangeCalendarHeaderCellSlot,\n RangeCalendarMonthTitleSlot,\n} from \"../range-calendar.slots\";\n\n/**\n * RangeCalendarGrids - Grid container component for the RangeCalendar\n *\n * Renders calendar grids for one or more months with proper date cells,\n * weekday headers, and internationalization support.\n */\nexport const RangeCalendarGrids = () => {\n const { locale } = useLocale();\n const context = useSlottedContext(RangeCalendarContext);\n\n const calendarState = useContext(RangeCalendarStateContext)!;\n const visibleMonthsCount = context?.visibleDuration?.months || 1;\n const todayDate = today(getLocalTimeZone());\n const showMonthTitles = visibleMonthsCount > 1;\n\n return (\n <RangeCalendarGridsSlot>\n {Array.from({ length: visibleMonthsCount }, (_, index) => {\n const gridDate = calendarState.visibleRange.start.add({\n months: index,\n });\n const monthName = new Intl.DateTimeFormat(locale, {\n month: \"long\",\n }).format(gridDate.toDate(getLocalTimeZone()));\n\n return (\n <Box\n key={monthName}\n width={visibleMonthsCount == 1 ? \"full\" : \"auto\"}\n >\n {showMonthTitles && (\n <RangeCalendarMonthTitleSlot>\n {monthName}\n </RangeCalendarMonthTitleSlot>\n )}\n <RangeCalendarGridSlot asChild>\n <RaCalendarGrid offset={{ months: index }} weekdayStyle=\"short\">\n <RangeCalendarGridHeaderSlot asChild>\n <RaCalendarGridHeader>\n {(day) => (\n <RangeCalendarHeaderCellSlot asChild>\n <RaCalendarHeaderCell>{day}</RaCalendarHeaderCell>\n </RangeCalendarHeaderCellSlot>\n )}\n </RaCalendarGridHeader>\n </RangeCalendarGridHeaderSlot>\n <RangeCalendarGridBodySlot asChild>\n <RaCalendarGridBody>\n {(date) => {\n const isToday = date.compare(todayDate) === 0;\n return (\n <RangeCalendarCellSlot asChild data-today={isToday}>\n <RaCalendarCell date={date} />\n </RangeCalendarCellSlot>\n );\n }}\n </RaCalendarGridBody>\n </RangeCalendarGridBodySlot>\n </RaCalendarGrid>\n </RangeCalendarGridSlot>\n </Box>\n );\n })}\n </RangeCalendarGridsSlot>\n );\n};\n","import type { RangeCalendarProps } from \"./range-calendar.types\";\nimport type { DateValue } from \"@internationalized/date\";\nimport { RangeCalendar as RaRangeCalendar } from \"react-aria-components\";\nimport { RangeCalendarRootSlot } from \"./range-calendar.slots\";\nimport {\n RangeCalendarCustomContext,\n RangeCalendarHeader,\n RangeCalendarGrids,\n} from \"./components\";\nimport { rangeCalendarSlotRecipe } from \"./range-calendar.recipe\";\nimport { useRecipe } from \"@chakra-ui/react/styled-system\";\nimport { extractStyleProps } from \"@/utils\";\n\n/**\n * RangeCalendar\n * ============================================================\n * Calendar component that displays a grid of days in one or more months\n * and allows users to select a range of dates. Built with React Aria\n * Components for accessibility and WCAG 2.1 AA compliance.\n *\n * @see {@link https://nimbus-documentation.vercel.app/components/inputs/rangecalendar}\n *\n * @supportsStylePropsx\n */\nexport const RangeCalendar = (props: RangeCalendarProps<DateValue>) => {\n const recipe = useRecipe({ recipe: rangeCalendarSlotRecipe });\n const [recipeProps, remainingProps] = recipe.splitVariantProps(props);\n const [styleProps, otherProps] = extractStyleProps(remainingProps);\n\n return (\n <RangeCalendarRootSlot {...recipeProps} {...styleProps} asChild>\n <RaRangeCalendar {...otherProps}>\n <RangeCalendarCustomContext>\n <RangeCalendarHeader />\n <RangeCalendarGrids />\n </RangeCalendarCustomContext>\n </RaRangeCalendar>\n </RangeCalendarRootSlot>\n );\n};\n\nRangeCalendar.displayName = \"RangeCalendar\";\n"],"names":["withProvider","withContext","createSlotRecipeContext","RangeCalendarRootSlot","RangeCalendarHeaderSlot","RangeCalendarGridsSlot","RangeCalendarMonthTitleSlot","RangeCalendarGridSlot","RangeCalendarGridHeaderSlot","RangeCalendarHeaderCellSlot","RangeCalendarGridBodySlot","RangeCalendarCellSlot","messages","defineMessages","RangeCalendarCustomContext","children","intl","useIntl","locale","useLocale","buttonContext","useContext","ButtonContext","textContext","TextContext","calendarState","RangeCalendarStateContext","buttonSlots","monthLabel","getLocalTimeZone","monthRangeLabel","yearLabel","textSlots","jsx","Provider","RangeCalendarHeader","showRangeLabel","useSlottedContext","RangeCalendarContext","jsxs","Flex","Stack","VisuallyHidden","Heading","IconButton","KeyboardArrowLeft","Text","KeyboardArrowRight","Box","RangeCalendarGrids","context","visibleMonthsCount","todayDate","today","showMonthTitles","_","index","gridDate","monthName","RaCalendarGrid","RaCalendarGridHeader","day","RaCalendarHeaderCell","RaCalendarGridBody","date","isToday","RaCalendarCell","RangeCalendar","props","recipe","useRecipe","rangeCalendarSlotRecipe","recipeProps","remainingProps","styleProps","otherProps","extractStyleProps","RaRangeCalendar"],"mappings":"8vBAcM,CAAE,aAAAA,EAAc,YAAAC,CAAA,EAAgBC,0BAAwB,CAC5D,IAAK,eACP,CAAC,EAEYC,EAGTH,EAAyD,MAAO,MAAM,EAE7DI,EAA0BH,EAGrC,MAAO,QAAQ,EAEJI,EAAyBJ,EAGpC,MAAO,OAAO,EAEHK,EAA8BL,EAGzC,M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C,EAAAA,UAAU,CAAE,OAAQC,EAAAA,wBAAyB,EACtD,CAACC,EAAaC,CAAc,EAAIJ,EAAO,kBAAkBD,CAAK,EAC9D,CAACM,EAAYC,CAAU,EAAIC,EAAAA,kBAAkBH,CAAc,EAEjE,OACExC,EAAAA,IAAC9B,EAAA,CAAuB,GAAGqE,EAAc,GAAGE,EAAY,QAAO,GAC7D,SAAAzC,EAAAA,IAAC4C,EAAAA,0CAAA,CAAiB,GAAGF,EACnB,gBAAC7D,EAAA,CACC,SAAA,CAAAmB,EAAAA,IAACE,EAAA,EAAoB,QACpBc,EAAA,CAAA,CAAmB,CAAA,CAAA,CACtB,EACF,EACF,CAEJ,EAEAkB,EAAc,YAAc"}
|
|
1
|
+
{"version":3,"file":"range-calendar-_a9mYU8O.cjs.js","sources":["../../src/components/range-calendar/range-calendar.slots.tsx","../../src/components/range-calendar/range-calendar.i18n.ts","../../src/components/range-calendar/components/range-calendar.custom-context.tsx","../../src/components/range-calendar/components/range-calendar.header.tsx","../../src/components/range-calendar/components/range-calendar.grids.tsx","../../src/components/range-calendar/range-calendar.tsx"],"sourcesContent":["import { createSlotRecipeContext } from \"@chakra-ui/react\";\nimport type { SlotComponent } from \"@/type-utils\";\nimport type {\n RangeCalendarRootSlotProps,\n RangeCalendarHeaderSlotProps,\n RangeCalendarGridsSlotProps,\n RangeCalendarMonthTitleSlotProps,\n RangeCalendarGridSlotProps,\n RangeCalendarGridHeaderSlotProps,\n RangeCalendarHeaderCellSlotProps,\n RangeCalendarGridBodySlotProps,\n RangeCalendarCellSlotProps,\n} from \"./range-calendar.types\";\n\nconst { withProvider, withContext } = createSlotRecipeContext({\n key: \"rangeCalendar\",\n});\n\nexport const RangeCalendarRootSlot: SlotComponent<\n HTMLDivElement,\n RangeCalendarRootSlotProps\n> = withProvider<HTMLDivElement, RangeCalendarRootSlotProps>(\"div\", \"root\");\n\nexport const RangeCalendarHeaderSlot = withContext<\n HTMLDivElement,\n RangeCalendarHeaderSlotProps\n>(\"div\", \"header\");\n\nexport const RangeCalendarGridsSlot = withContext<\n HTMLDivElement,\n RangeCalendarGridsSlotProps\n>(\"div\", \"grids\");\n\nexport const RangeCalendarMonthTitleSlot = withContext<\n HTMLDivElement,\n RangeCalendarMonthTitleSlotProps\n>(\"div\", \"monthTitle\");\n\nexport const RangeCalendarGridSlot = withContext<\n HTMLTableElement,\n RangeCalendarGridSlotProps\n>(\"table\", \"grid\");\n\nexport const RangeCalendarGridHeaderSlot = withContext<\n HTMLTableSectionElement,\n RangeCalendarGridHeaderSlotProps\n>(\"thead\", \"gridHeader\");\n\nexport const RangeCalendarHeaderCellSlot = withContext<\n HTMLTableCellElement,\n RangeCalendarHeaderCellSlotProps\n>(\"th\", \"headerCell\");\n\nexport const RangeCalendarGridBodySlot = withContext<\n HTMLTableSectionElement,\n RangeCalendarGridBodySlotProps\n>(\"tbody\", \"gridBody\");\n\nexport const RangeCalendarCellSlot = withContext<\n HTMLTableCellElement,\n RangeCalendarCellSlotProps\n>(\"td\", \"bodyCell\");\n","import { defineMessages } from \"react-intl\";\n\nexport const messages = defineMessages({\n nextMonth: {\n id: \"Nimbus.RangeCalendar.nextMonth\",\n description: \"aria-label for next month navigation button\",\n defaultMessage: \"Next month\",\n },\n previousMonth: {\n id: \"Nimbus.RangeCalendar.previousMonth\",\n description: \"aria-label for previous month navigation button\",\n defaultMessage: \"Previous month\",\n },\n nextYear: {\n id: \"Nimbus.RangeCalendar.nextYear\",\n description: \"aria-label for next year navigation button\",\n defaultMessage: \"Next year\",\n },\n previousYear: {\n id: \"Nimbus.RangeCalendar.previousYear\",\n description: \"aria-label for previous year navigation button\",\n defaultMessage: \"Previous year\",\n },\n});\n","import { getLocalTimeZone } from \"@internationalized/date\";\nimport { useContext } from \"react\";\nimport {\n Provider,\n ButtonContext,\n RangeCalendarStateContext,\n TextContext,\n useLocale,\n} from \"react-aria-components\";\nimport { useIntl } from \"react-intl\";\nimport { messages } from \"../range-calendar.i18n\";\n\nexport const RangeCalendarCustomContext = ({\n children,\n}: {\n children: React.ReactNode;\n}) => {\n const intl = useIntl();\n const { locale } = useLocale();\n const buttonContext = useContext(ButtonContext)!;\n const textContext = useContext(TextContext)!;\n const calendarState = useContext(RangeCalendarStateContext)!;\n\n /**\n * Button slots\n * ================================\n */\n const buttonSlots = {\n \"next-month\": {\n onPress: () => calendarState.focusNextSection(),\n \"aria-label\": intl.formatMessage(messages.nextMonth),\n },\n \"previous-month\": {\n onPress: () => calendarState.focusPreviousSection(),\n \"aria-label\": intl.formatMessage(messages.previousMonth),\n },\n \"next-year\": {\n onPress: () => calendarState.focusNextSection(true),\n \"aria-label\": intl.formatMessage(messages.nextYear),\n },\n \"previous-year\": {\n onPress: () => calendarState.focusPreviousSection(true),\n \"aria-label\": intl.formatMessage(messages.previousYear),\n },\n };\n\n /**\n * Text slots\n * ================================\n */\n const monthLabel = new Intl.DateTimeFormat(locale, {\n month: \"long\",\n }).format(calendarState.focusedDate.toDate(getLocalTimeZone()));\n\n const monthRangeLabel = [\n new Intl.DateTimeFormat(locale, {\n month: \"long\",\n }).format(calendarState.visibleRange.start.toDate(getLocalTimeZone())),\n new Intl.DateTimeFormat(locale, {\n month: \"long\",\n }).format(calendarState.visibleRange.end.toDate(getLocalTimeZone())),\n ].join(\" - \");\n\n const yearLabel = new Intl.DateTimeFormat(locale, {\n year: \"numeric\",\n }).format(calendarState.focusedDate.toDate(getLocalTimeZone()));\n\n const textSlots = {\n month: { children: monthLabel },\n monthRange: { children: monthRangeLabel },\n year: { children: yearLabel },\n };\n\n return (\n <Provider\n values={[\n [\n ButtonContext,\n {\n ...buttonContext,\n slots: {\n ...(buttonContext &&\n typeof buttonContext === \"object\" &&\n \"slots\" in buttonContext\n ? buttonContext.slots\n : {}),\n ...buttonSlots,\n },\n },\n ],\n [\n TextContext,\n {\n ...textContext,\n slots: {\n ...(textContext &&\n typeof textContext === \"object\" &&\n \"slots\" in textContext\n ? textContext.slots\n : {}),\n ...textSlots,\n },\n },\n ],\n ]}\n >\n {children}\n </Provider>\n );\n};\n","import {\n RangeCalendarContext,\n Heading,\n useSlottedContext,\n} from \"react-aria-components\";\nimport {\n Box,\n Flex,\n IconButton,\n Stack,\n Text,\n VisuallyHidden,\n} from \"@/components\";\nimport {\n KeyboardArrowLeft,\n KeyboardArrowRight,\n} from \"@commercetools/nimbus-icons\";\nimport { RangeCalendarHeaderSlot } from \"../range-calendar.slots\";\n\n/**\n * RangeCalendarHeader - Header component for the RangeCalendar\n *\n * Displays navigation controls for month and year selection with proper\n * internationalization and accessibility support.\n */\nexport const RangeCalendarHeader = () => {\n const rangeCalendarProps = useSlottedContext(RangeCalendarContext);\n\n // Needed to decide whether to show a single month or a range\n const visibleDurationMonths =\n rangeCalendarProps?.visibleDuration?.months || 1;\n const showRangeLabel = visibleDurationMonths > 1;\n\n return (\n <RangeCalendarHeaderSlot>\n <Flex>\n <Stack direction=\"row\" alignItems=\"center\">\n {/** solely for screen readers, if not present, a11y issues are raised */}\n <VisuallyHidden>\n <Heading />\n </VisuallyHidden>\n {/* @ts-expect-error - custom-context will add aria-label via the \"slot\" prop */}\n <IconButton\n slot={showRangeLabel ? \"previous\" : \"previous-month\"}\n size=\"xs\"\n variant=\"ghost\"\n colorPalette=\"primary\"\n >\n <KeyboardArrowLeft />\n </IconButton>\n <Text\n textStyle=\"sm\"\n fontWeight=\"500\"\n color=\"neutral.11\"\n width={showRangeLabel ? \"4000\" : \"2000\"}\n textAlign=\"center\"\n aria-hidden=\"true\"\n slot={showRangeLabel ? \"monthRange\" : \"month\"}\n />\n {/* @ts-expect-error - custom-context will add aria-label via the \"slot\" prop */}\n <IconButton\n slot={showRangeLabel ? \"next\" : \"next-month\"}\n size=\"xs\"\n variant=\"ghost\"\n colorPalette=\"primary\"\n >\n <KeyboardArrowRight />\n </IconButton>\n </Stack>\n <Box flexGrow=\"1\" />\n <Stack direction=\"row\" alignItems=\"center\">\n {/* @ts-expect-error - custom-context will add aria-label via the \"slot\" prop */}\n <IconButton\n slot=\"previous-year\"\n size=\"xs\"\n variant=\"ghost\"\n colorPalette=\"primary\"\n >\n <KeyboardArrowLeft />\n </IconButton>\n <Text\n textStyle=\"sm\"\n fontWeight=\"500\"\n color=\"neutral.11\"\n width=\"1400\"\n textAlign=\"center\"\n aria-hidden=\"true\"\n slot=\"year\"\n />\n {/* @ts-expect-error - custom-context will add aria-label via the \"slot\" prop */}\n <IconButton\n slot=\"next-year\"\n size=\"xs\"\n variant=\"ghost\"\n colorPalette=\"primary\"\n >\n <KeyboardArrowRight />\n </IconButton>\n </Stack>\n </Flex>\n </RangeCalendarHeaderSlot>\n );\n};\n","import { useContext } from \"react\";\nimport { today, getLocalTimeZone } from \"@internationalized/date\";\nimport {\n CalendarGrid as RaCalendarGrid,\n CalendarGridBody as RaCalendarGridBody,\n CalendarGridHeader as RaCalendarGridHeader,\n CalendarHeaderCell as RaCalendarHeaderCell,\n CalendarCell as RaCalendarCell,\n useSlottedContext,\n RangeCalendarContext,\n RangeCalendarStateContext,\n useLocale,\n} from \"react-aria-components\";\nimport { Box } from \"@/components\";\n\nimport {\n RangeCalendarCellSlot,\n RangeCalendarGridBodySlot,\n RangeCalendarGridHeaderSlot,\n RangeCalendarGridsSlot,\n RangeCalendarGridSlot,\n RangeCalendarHeaderCellSlot,\n RangeCalendarMonthTitleSlot,\n} from \"../range-calendar.slots\";\n\n/**\n * RangeCalendarGrids - Grid container component for the RangeCalendar\n *\n * Renders calendar grids for one or more months with proper date cells,\n * weekday headers, and internationalization support.\n */\nexport const RangeCalendarGrids = () => {\n const { locale } = useLocale();\n const context = useSlottedContext(RangeCalendarContext);\n\n const calendarState = useContext(RangeCalendarStateContext)!;\n const visibleMonthsCount = context?.visibleDuration?.months || 1;\n const todayDate = today(getLocalTimeZone());\n const showMonthTitles = visibleMonthsCount > 1;\n\n return (\n <RangeCalendarGridsSlot>\n {Array.from({ length: visibleMonthsCount }, (_, index) => {\n const gridDate = calendarState.visibleRange.start.add({\n months: index,\n });\n const monthName = new Intl.DateTimeFormat(locale, {\n month: \"long\",\n }).format(gridDate.toDate(getLocalTimeZone()));\n\n return (\n <Box\n key={monthName}\n width={visibleMonthsCount == 1 ? \"full\" : \"auto\"}\n >\n {showMonthTitles && (\n <RangeCalendarMonthTitleSlot>\n {monthName}\n </RangeCalendarMonthTitleSlot>\n )}\n <RangeCalendarGridSlot asChild>\n <RaCalendarGrid offset={{ months: index }} weekdayStyle=\"short\">\n <RangeCalendarGridHeaderSlot asChild>\n <RaCalendarGridHeader>\n {(day) => (\n <RangeCalendarHeaderCellSlot asChild>\n <RaCalendarHeaderCell>{day}</RaCalendarHeaderCell>\n </RangeCalendarHeaderCellSlot>\n )}\n </RaCalendarGridHeader>\n </RangeCalendarGridHeaderSlot>\n <RangeCalendarGridBodySlot asChild>\n <RaCalendarGridBody>\n {(date) => {\n const isToday = date.compare(todayDate) === 0;\n return (\n <RangeCalendarCellSlot asChild data-today={isToday}>\n <RaCalendarCell date={date} />\n </RangeCalendarCellSlot>\n );\n }}\n </RaCalendarGridBody>\n </RangeCalendarGridBodySlot>\n </RaCalendarGrid>\n </RangeCalendarGridSlot>\n </Box>\n );\n })}\n </RangeCalendarGridsSlot>\n );\n};\n","import type { RangeCalendarProps } from \"./range-calendar.types\";\nimport type { DateValue } from \"@internationalized/date\";\nimport { RangeCalendar as RaRangeCalendar } from \"react-aria-components\";\nimport { RangeCalendarRootSlot } from \"./range-calendar.slots\";\nimport {\n RangeCalendarCustomContext,\n RangeCalendarHeader,\n RangeCalendarGrids,\n} from \"./components\";\nimport { rangeCalendarSlotRecipe } from \"./range-calendar.recipe\";\nimport { useRecipe } from \"@chakra-ui/react/styled-system\";\nimport { extractStyleProps } from \"@/utils\";\n\n/**\n * RangeCalendar\n * ============================================================\n * Calendar component that displays a grid of days in one or more months\n * and allows users to select a range of dates. Built with React Aria\n * Components for accessibility and WCAG 2.1 AA compliance.\n *\n * @see {@link https://nimbus-documentation.vercel.app/components/inputs/rangecalendar}\n *\n * @supportsStylePropsx\n */\nexport const RangeCalendar = (props: RangeCalendarProps<DateValue>) => {\n const recipe = useRecipe({ recipe: rangeCalendarSlotRecipe });\n const [recipeProps, remainingProps] = recipe.splitVariantProps(props);\n const [styleProps, otherProps] = extractStyleProps(remainingProps);\n\n return (\n <RangeCalendarRootSlot {...recipeProps} {...styleProps} asChild>\n <RaRangeCalendar {...otherProps}>\n <RangeCalendarCustomContext>\n <RangeCalendarHeader />\n <RangeCalendarGrids />\n </RangeCalendarCustomContext>\n </RaRangeCalendar>\n </RangeCalendarRootSlot>\n );\n};\n\nRangeCalendar.displayName = \"RangeCalendar\";\n"],"names":["withProvider","withContext","createSlotRecipeContext","RangeCalendarRootSlot","RangeCalendarHeaderSlot","RangeCalendarGridsSlot","RangeCalendarMonthTitleSlot","RangeCalendarGridSlot","RangeCalendarGridHeaderSlot","RangeCalendarHeaderCellSlot","RangeCalendarGridBodySlot","RangeCalendarCellSlot","messages","defineMessages","RangeCalendarCustomContext","children","intl","useIntl","locale","useLocale","buttonContext","useContext","ButtonContext","textContext","TextContext","calendarState","RangeCalendarStateContext","buttonSlots","monthLabel","getLocalTimeZone","monthRangeLabel","yearLabel","textSlots","jsx","Provider","RangeCalendarHeader","showRangeLabel","useSlottedContext","RangeCalendarContext","jsxs","Flex","Stack","VisuallyHidden","Heading","IconButton","KeyboardArrowLeft","Text","KeyboardArrowRight","Box","RangeCalendarGrids","context","visibleMonthsCount","todayDate","today","showMonthTitles","_","index","gridDate","monthName","RaCalendarGrid","RaCalendarGridHeader","day","RaCalendarHeaderCell","RaCalendarGridBody","date","isToday","RaCalendarCell","RangeCalendar","props","recipe","useRecipe","rangeCalendarSlotRecipe","recipeProps","remainingProps","styleProps","otherProps","extractStyleProps","RaRangeCalendar"],"mappings":"8vBAcM,CAAE,aAAAA,EAAc,YAAAC,CAAA,EAAgBC,0BAAwB,CAC5D,IAAK,eACP,CAAC,EAEYC,EAGTH,EAAyD,MAAO,MAAM,EAE7DI,EAA0BH,EAGrC,MAAO,QAAQ,E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,CAAA,CACH,CAEJ,EClEaS,EAAiBC,GAAyC,CACrE,MAAMC,EAASC,EAAAA,UAAU,CAAE,OAAQC,EAAAA,wBAAyB,EACtD,CAACC,EAAaC,CAAc,EAAIJ,EAAO,kBAAkBD,CAAK,EAC9D,CAACM,EAAYC,CAAU,EAAIC,EAAAA,kBAAkBH,CAAc,EAEjE,OACExC,EAAAA,IAAC9B,EAAA,CAAuB,GAAGqE,EAAc,GAAGE,EAAY,QAAO,GAC7D,SAAAzC,EAAAA,IAAC4C,EAAAA,0CAAA,CAAiB,GAAGF,EACnB,gBAAC7D,EAAA,CACC,SAAA,CAAAmB,EAAAA,IAACE,EAAA,EAAoB,QACpBc,EAAA,CAAA,CAAmB,CAAA,CAAA,CACtB,EACF,EACF,CAEJ,EAEAkB,EAAc,YAAc"}
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import { jsx as o, jsxs as h } from "react/jsx-runtime";
|
|
2
2
|
import { useCallback as C, useMemo as A, useRef as ye, useImperativeHandle as De, useState as ie, useEffect as Le } from "react";
|
|
3
3
|
import { createSlotRecipeContext as Fe, mergeRefs as Ke, useSlotRecipe as He } from "@chakra-ui/react";
|
|
4
|
-
import { e as Oe } from "./extract-style-props-
|
|
5
|
-
import { n as $e } from "./index-
|
|
4
|
+
import { e as Oe } from "./extract-style-props-BvGKJ0ar.es.js";
|
|
5
|
+
import { n as $e } from "./index-BA58iOLX.es.js";
|
|
6
6
|
import { Transforms as I, Text as W, Element as q, Editor as x, Range as xe, createEditor as Pe } from "slate";
|
|
7
7
|
import { ReactEditor as ne, useSlate as J, withReact as Be, Slate as _e, Editable as qe } from "slate-react";
|
|
8
8
|
import { withHistory as ze } from "slate-history";
|
|
9
9
|
import { $ as Ue } from "./useObjectRef-CaJ5pgjX.es.js";
|
|
10
10
|
import { defineMessages as Ve, useIntl as Te } from "react-intl";
|
|
11
|
-
import { I as U } from "./icon-toggle-button-
|
|
11
|
+
import { I as U } from "./icon-toggle-button-C4ISptbh.es.js";
|
|
12
12
|
import { G as ae } from "./group-CCBgdph2.es.js";
|
|
13
13
|
import { MoreHoriz as je, FormatStrikethrough as We, Code as Ge, KeyboardArrowDown as Xe, FormatBold as Ye, FormatItalic as Qe, FormatUnderlined as Je, FormatListBulleted as Ze, FormatListNumbered as et, Undo as tt, Redo as rt } from "@commercetools/nimbus-icons";
|
|
14
|
-
import { M as v } from "./menu-
|
|
14
|
+
import { M as v } from "./menu-hZacrl0C.es.js";
|
|
15
15
|
import { T as b } from "./tooltip-D3QrrizN.es.js";
|
|
16
|
-
import { I as se } from "./icon-button-
|
|
16
|
+
import { I as se } from "./icon-button-1gt1BCJ2.es.js";
|
|
17
17
|
import { B } from "./box-DuBoAZvq.es.js";
|
|
18
18
|
import { T as L } from "./text-CIb_VDvO.es.js";
|
|
19
|
-
import { T as nt } from "./toolbar-
|
|
20
|
-
import { S as le } from "./separator-
|
|
19
|
+
import { T as nt } from "./toolbar-DE2w5rxi.es.js";
|
|
20
|
+
import { S as le } from "./separator-CxPOiV-V.es.js";
|
|
21
21
|
import { T as ce } from "./toggle-button-group-BWpmMkEz.es.js";
|
|
22
22
|
import { V } from "./visually-hidden-Dj5CT-u_.es.js";
|
|
23
23
|
function Me(t) {
|
|
@@ -1197,4 +1197,4 @@ export {
|
|
|
1197
1197
|
Lt as R,
|
|
1198
1198
|
Me as g
|
|
1199
1199
|
};
|
|
1200
|
-
//# sourceMappingURL=rich-text-input-
|
|
1200
|
+
//# sourceMappingURL=rich-text-input-DAc5Qrg9.es.js.map
|