@commercetools/nimbus 2.1.0 → 2.2.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/README.md +87 -21
- package/dist/chunks/{CollectionBuilder-ZlIN4SR4.es.js → CollectionBuilder-BOe312C_.es.js} +6 -24
- package/dist/chunks/{CollectionBuilder-ZlIN4SR4.es.js.map → CollectionBuilder-BOe312C_.es.js.map} +1 -1
- package/dist/chunks/{CollectionBuilder-BipvtvSl.cjs.js → CollectionBuilder-DjRx57vm.cjs.js} +2 -18
- package/dist/chunks/{CollectionBuilder-BipvtvSl.cjs.js.map → CollectionBuilder-DjRx57vm.cjs.js.map} +1 -1
- package/dist/chunks/DateField-BxXzaXAv.cjs.js +2 -0
- package/dist/chunks/DateField-BxXzaXAv.cjs.js.map +1 -0
- package/dist/chunks/{DateField-C5JgBb30.es.js → DateField-DCWy1Ysp.es.js} +662 -631
- package/dist/chunks/DateField-DCWy1Ysp.es.js.map +1 -0
- package/dist/chunks/{DatePicker-DeknOPX6.es.js → DatePicker-CL72jbDo.es.js} +6 -6
- package/dist/chunks/{DatePicker-DeknOPX6.es.js.map → DatePicker-CL72jbDo.es.js.map} +1 -1
- package/dist/chunks/{DatePicker-DGLrUdLu.cjs.js → DatePicker-NWRDzwUt.cjs.js} +2 -2
- package/dist/chunks/{DatePicker-DGLrUdLu.cjs.js.map → DatePicker-NWRDzwUt.cjs.js.map} +1 -1
- package/dist/chunks/{Dialog-DUbUCf4o.es.js → Dialog-B0BQfdQa.es.js} +58 -58
- package/dist/chunks/{Dialog-DUbUCf4o.es.js.map → Dialog-B0BQfdQa.es.js.map} +1 -1
- package/dist/chunks/{Dialog-Ye_7tQZU.cjs.js → Dialog-CSr6lHSd.cjs.js} +2 -2
- package/dist/chunks/{Dialog-Ye_7tQZU.cjs.js.map → Dialog-CSr6lHSd.cjs.js.map} +1 -1
- package/dist/chunks/{Header-Bvl-gjeR.cjs.js → Header-BXEPjypM.cjs.js} +2 -2
- package/dist/chunks/{Header-Bvl-gjeR.cjs.js.map → Header-BXEPjypM.cjs.js.map} +1 -1
- package/dist/chunks/{Header-Bvo6aMcQ.es.js → Header-CiYtrnTw.es.js} +3 -3
- package/dist/chunks/{Header-Bvo6aMcQ.es.js.map → Header-CiYtrnTw.es.js.map} +1 -1
- package/dist/chunks/{Heading-D7Ut7eK3.es.js → Heading-BMsylHxq.es.js} +3 -3
- package/dist/chunks/{Heading-D7Ut7eK3.es.js.map → Heading-BMsylHxq.es.js.map} +1 -1
- package/dist/chunks/{Heading-kcnZ-PKv.cjs.js → Heading-C7J8IDnn.cjs.js} +2 -2
- package/dist/chunks/{Heading-kcnZ-PKv.cjs.js.map → Heading-C7J8IDnn.cjs.js.map} +1 -1
- package/dist/chunks/{ListBox-C8TVMFFY.es.js → ListBox-RrHJjnuq.es.js} +34 -36
- package/dist/chunks/{ListBox-C8TVMFFY.es.js.map → ListBox-RrHJjnuq.es.js.map} +1 -1
- package/dist/chunks/{ListBox-Dcnj8pHo.cjs.js → ListBox-rm_vuzPg.cjs.js} +2 -2
- package/dist/chunks/{ListBox-Dcnj8pHo.cjs.js.map → ListBox-rm_vuzPg.cjs.js.map} +1 -1
- package/dist/chunks/LocalizedStringDictionary-DZNwHzto.cjs.js +2 -0
- package/dist/chunks/LocalizedStringDictionary-DZNwHzto.cjs.js.map +1 -0
- package/dist/chunks/LocalizedStringDictionary-rmcyf3BY.es.js +48 -0
- package/dist/chunks/LocalizedStringDictionary-rmcyf3BY.es.js.map +1 -0
- package/dist/chunks/{Modal-CMJEwrBs.es.js → Modal-K4JEy19g.es.js} +3 -3
- package/dist/chunks/{Modal-CMJEwrBs.es.js.map → Modal-K4JEy19g.es.js.map} +1 -1
- package/dist/chunks/{Modal-DjOIA2BE.cjs.js → Modal-u97jKK9t.cjs.js} +2 -2
- package/dist/chunks/{Modal-DjOIA2BE.cjs.js.map → Modal-u97jKK9t.cjs.js.map} +1 -1
- package/dist/chunks/{SelectionManager-CCETIs4l.cjs.js → SelectionManager-5YkuhVau.cjs.js} +2 -2
- package/dist/chunks/{SelectionManager-CCETIs4l.cjs.js.map → SelectionManager-5YkuhVau.cjs.js.map} +1 -1
- package/dist/chunks/{SelectionManager-bgcDT3lR.es.js → SelectionManager-CX9btso_.es.js} +24 -31
- package/dist/chunks/{SelectionManager-bgcDT3lR.es.js.map → SelectionManager-CX9btso_.es.js.map} +1 -1
- package/dist/chunks/{Separator-DyU2njbj.cjs.js → Separator-BvA4UGuq.cjs.js} +2 -2
- package/dist/chunks/{Separator-DyU2njbj.cjs.js.map → Separator-BvA4UGuq.cjs.js.map} +1 -1
- package/dist/chunks/{Separator-BmVimNX_.es.js → Separator-x6wk4JUe.es.js} +2 -2
- package/dist/chunks/{Separator-BmVimNX_.es.js.map → Separator-x6wk4JUe.es.js.map} +1 -1
- package/dist/chunks/{accordion-AupzDJ2i.cjs.js → accordion-CVpg-FdJ.cjs.js} +2 -2
- package/dist/chunks/{accordion-AupzDJ2i.cjs.js.map → accordion-CVpg-FdJ.cjs.js.map} +1 -1
- package/dist/chunks/{accordion-Bu9iEN-Z.es.js → accordion-Dh0RVlNx.es.js} +2 -2
- package/dist/chunks/{accordion-Bu9iEN-Z.es.js.map → accordion-Dh0RVlNx.es.js.map} +1 -1
- package/dist/chunks/{accordion.content-DwLtYzIy.cjs.js → accordion.content-Cqet9SQ-.cjs.js} +2 -2
- package/dist/chunks/{accordion.content-DwLtYzIy.cjs.js.map → accordion.content-Cqet9SQ-.cjs.js.map} +1 -1
- package/dist/chunks/{accordion.content-C8iYlvoi.es.js → accordion.content-GGayEeqD.es.js} +2 -2
- package/dist/chunks/{accordion.content-C8iYlvoi.es.js.map → accordion.content-GGayEeqD.es.js.map} +1 -1
- package/dist/chunks/alert-DCgWOaY2.es.js +158 -0
- package/dist/chunks/alert-DCgWOaY2.es.js.map +1 -0
- package/dist/chunks/alert-pPmN9CXZ.cjs.js +2 -0
- package/dist/chunks/alert-pPmN9CXZ.cjs.js.map +1 -0
- package/dist/chunks/avatar-1Y7cLjZT.es.js +59 -0
- package/dist/chunks/avatar-1Y7cLjZT.es.js.map +1 -0
- package/dist/chunks/avatar-BVQ91Ccd.cjs.js +2 -0
- package/dist/chunks/avatar-BVQ91Ccd.cjs.js.map +1 -0
- package/dist/chunks/box-CWni3A32.cjs.js.map +1 -1
- package/dist/chunks/box-DuBoAZvq.es.js.map +1 -1
- package/dist/chunks/{button-czddlTvJ.es.js → button-BEJnxXsL.es.js} +2 -2
- package/dist/chunks/{button-czddlTvJ.es.js.map → button-BEJnxXsL.es.js.map} +1 -1
- package/dist/chunks/{button-DF_RV6pd.cjs.js → button-BR4fvcmi.cjs.js} +2 -2
- package/dist/chunks/{button-DF_RV6pd.cjs.js.map → button-BR4fvcmi.cjs.js.map} +1 -1
- package/dist/chunks/calendar-B01Vti5k.cjs.js +2 -0
- package/dist/chunks/calendar-B01Vti5k.cjs.js.map +1 -0
- package/dist/chunks/calendar-lSoXK-yt.es.js +227 -0
- package/dist/chunks/calendar-lSoXK-yt.es.js.map +1 -0
- package/dist/chunks/card-Bk3xHlo2.cjs.js +2 -0
- package/dist/chunks/card-Bk3xHlo2.cjs.js.map +1 -0
- package/dist/chunks/card-q5i119kB.es.js +115 -0
- package/dist/chunks/card-q5i119kB.es.js.map +1 -0
- package/dist/chunks/{checkbox-CWhwDnrI.cjs.js → checkbox-BJANm94D.cjs.js} +2 -2
- package/dist/chunks/{checkbox-CWhwDnrI.cjs.js.map → checkbox-BJANm94D.cjs.js.map} +1 -1
- package/dist/chunks/{checkbox-BAZ2ps7B.es.js → checkbox-CputcCVr.es.js} +2 -2
- package/dist/chunks/{checkbox-BAZ2ps7B.es.js.map → checkbox-CputcCVr.es.js.map} +1 -1
- package/dist/chunks/{collapsible-motion-D4u7W2de.cjs.js → collapsible-motion-Biq0QGUr.cjs.js} +2 -2
- package/dist/chunks/{collapsible-motion-D4u7W2de.cjs.js.map → collapsible-motion-Biq0QGUr.cjs.js.map} +1 -1
- package/dist/chunks/{collapsible-motion-dMfEe4kv.es.js → collapsible-motion-DvtUDuxb.es.js} +2 -2
- package/dist/chunks/{collapsible-motion-dMfEe4kv.es.js.map → collapsible-motion-DvtUDuxb.es.js.map} +1 -1
- package/dist/chunks/combobox-B7ck7gxL.cjs.js +2 -0
- package/dist/chunks/combobox-B7ck7gxL.cjs.js.map +1 -0
- package/dist/chunks/combobox-vjauyzlS.es.js +1551 -0
- package/dist/chunks/combobox-vjauyzlS.es.js.map +1 -0
- package/dist/chunks/data-table-CBZLbe9h.cjs.js +2 -0
- package/dist/chunks/data-table-CBZLbe9h.cjs.js.map +1 -0
- package/dist/chunks/{data-table-C0rC7Jgu.es.js → data-table-DA4SdIgU.es.js} +1448 -1423
- package/dist/chunks/data-table-DA4SdIgU.es.js.map +1 -0
- package/dist/chunks/{date-input-Cnlg-VXW.es.js → date-input-Cd9q4qBj.es.js} +4 -4
- package/dist/chunks/{date-input-Cnlg-VXW.es.js.map → date-input-Cd9q4qBj.es.js.map} +1 -1
- package/dist/chunks/{date-input-DlQD1DQ3.cjs.js → date-input-DkYcGwBy.cjs.js} +2 -2
- package/dist/chunks/{date-input-DlQD1DQ3.cjs.js.map → date-input-DkYcGwBy.cjs.js.map} +1 -1
- package/dist/chunks/date-picker-B8VVNXU3.es.js +228 -0
- package/dist/chunks/date-picker-B8VVNXU3.es.js.map +1 -0
- package/dist/chunks/date-picker-DQ5IZcRe.cjs.js +2 -0
- package/dist/chunks/date-picker-DQ5IZcRe.cjs.js.map +1 -0
- package/dist/chunks/date-range-picker-BnbKgO1E.es.js +364 -0
- package/dist/chunks/date-range-picker-BnbKgO1E.es.js.map +1 -0
- package/dist/chunks/date-range-picker-CO2HH0mY.cjs.js +2 -0
- package/dist/chunks/date-range-picker-CO2HH0mY.cjs.js.map +1 -0
- package/dist/chunks/{date-range-picker-field-D3tLPzMb.es.js → date-range-picker-field-BuI6eLMY.es.js} +4 -4
- package/dist/chunks/date-range-picker-field-BuI6eLMY.es.js.map +1 -0
- package/dist/chunks/{date-range-picker-field-DipL5QZq.cjs.js → date-range-picker-field-DcIo1YzI.cjs.js} +2 -2
- package/dist/chunks/date-range-picker-field-DcIo1YzI.cjs.js.map +1 -0
- package/dist/chunks/{dialog-z8EM12xr.es.js → dialog-DuS3dXVi.es.js} +89 -89
- package/dist/chunks/dialog-DuS3dXVi.es.js.map +1 -0
- package/dist/chunks/dialog-gyrFT8w0.cjs.js +2 -0
- package/dist/chunks/dialog-gyrFT8w0.cjs.js.map +1 -0
- package/dist/chunks/{draggable-list-DNQAZADx.cjs.js → draggable-list-fvTG-VYt.cjs.js} +3 -3
- package/dist/chunks/{draggable-list-DNQAZADx.cjs.js.map → draggable-list-fvTG-VYt.cjs.js.map} +1 -1
- package/dist/chunks/{draggable-list-B0MpgfeC.es.js → draggable-list-z7a7tu_F.es.js} +1406 -1601
- package/dist/chunks/{draggable-list-B0MpgfeC.es.js.map → draggable-list-z7a7tu_F.es.js.map} +1 -1
- package/dist/chunks/{drawer-BZBluK-I.es.js → drawer-BPcEUbUt.es.js} +94 -86
- package/dist/chunks/drawer-BPcEUbUt.es.js.map +1 -0
- package/dist/chunks/drawer-DbSJSCl_.cjs.js +2 -0
- package/dist/chunks/drawer-DbSJSCl_.cjs.js.map +1 -0
- package/dist/chunks/{extract-style-props-BilMyFTD.cjs.js → extract-style-props-B4hqila-.cjs.js} +2 -2
- package/dist/chunks/{extract-style-props-BilMyFTD.cjs.js.map → extract-style-props-B4hqila-.cjs.js.map} +1 -1
- package/dist/chunks/{extract-style-props-DChosa6I.es.js → extract-style-props-BdibuNZ7.es.js} +2 -2
- package/dist/chunks/{extract-style-props-DChosa6I.es.js.map → extract-style-props-BdibuNZ7.es.js.map} +1 -1
- package/dist/chunks/field-errors-D1BQvoYg.es.js +219 -0
- package/dist/chunks/field-errors-D1BQvoYg.es.js.map +1 -0
- package/dist/chunks/field-errors-aqrV93vp.cjs.js +2 -0
- package/dist/chunks/field-errors-aqrV93vp.cjs.js.map +1 -0
- package/dist/chunks/{form-field-BqlkPY29.es.js → form-field-BfDU18h3.es.js} +16 -16
- package/dist/chunks/form-field-BfDU18h3.es.js.map +1 -0
- package/dist/chunks/form-field-FdRNl2bZ.cjs.js +2 -0
- package/dist/chunks/form-field-FdRNl2bZ.cjs.js.map +1 -0
- package/dist/chunks/icon-DJsVh7VR.es.js +19 -0
- package/dist/chunks/{icon-CenxuChf.es.js.map → icon-DJsVh7VR.es.js.map} +1 -1
- package/dist/chunks/icon-RyFjTAmU.cjs.js +2 -0
- package/dist/chunks/{icon-D39U--jA.cjs.js.map → icon-RyFjTAmU.cjs.js.map} +1 -1
- package/dist/chunks/icon-button-CeB8_Yyr.cjs.js +2 -0
- package/dist/chunks/icon-button-CeB8_Yyr.cjs.js.map +1 -0
- package/dist/chunks/icon-button-CosIm3oY.es.js +28 -0
- package/dist/chunks/icon-button-CosIm3oY.es.js.map +1 -0
- package/dist/chunks/{icon-toggle-button-BKmjmlZt.es.js → icon-toggle-button-8fX8JAXp.es.js} +2 -2
- package/dist/chunks/icon-toggle-button-8fX8JAXp.es.js.map +1 -0
- package/dist/chunks/{icon-toggle-button-D3spgxe2.cjs.js → icon-toggle-button-C4Tnlt4t.cjs.js} +2 -2
- package/dist/chunks/icon-toggle-button-C4Tnlt4t.cjs.js.map +1 -0
- package/dist/chunks/image-CGOYoc2s.cjs.js.map +1 -1
- package/dist/chunks/image-DRigLU80.es.js.map +1 -1
- package/dist/chunks/{index-BEgCT-l6.es.js → index-C2qW4ynb.es.js} +671 -557
- package/dist/chunks/index-C2qW4ynb.es.js.map +1 -0
- package/dist/chunks/index-CVXB9mwf.cjs.js +34 -0
- package/dist/chunks/index-CVXB9mwf.cjs.js.map +1 -0
- package/dist/chunks/inline-svg-BzzKpbrB.cjs.js +2 -0
- package/dist/chunks/{inline-svg-Yb2OyzRw.cjs.js.map → inline-svg-BzzKpbrB.cjs.js.map} +1 -1
- package/dist/chunks/inline-svg-Cwl9dFvu.es.js +21 -0
- package/dist/chunks/{inline-svg-CbSC6O5X.es.js.map → inline-svg-Cwl9dFvu.es.js.map} +1 -1
- package/dist/chunks/list-DJC9BmoC.cjs.js.map +1 -1
- package/dist/chunks/list-Nz5KjWzs.es.js.map +1 -1
- package/dist/chunks/loading-spinner-DYEYnI5N.cjs.js +2 -0
- package/dist/chunks/loading-spinner-DYEYnI5N.cjs.js.map +1 -0
- package/dist/chunks/loading-spinner-gf62wtm3.es.js +53 -0
- package/dist/chunks/loading-spinner-gf62wtm3.es.js.map +1 -0
- package/dist/chunks/localized-field-D78l88ux.cjs.js +2 -0
- package/dist/chunks/localized-field-D78l88ux.cjs.js.map +1 -0
- package/dist/chunks/localized-field-DdeHzXdh.es.js +483 -0
- package/dist/chunks/localized-field-DdeHzXdh.es.js.map +1 -0
- package/dist/chunks/{menu-Vj3cVc_v.cjs.js → menu-Dno8yFDE.cjs.js} +2 -2
- package/dist/chunks/menu-Dno8yFDE.cjs.js.map +1 -0
- package/dist/chunks/{menu-C3Ovi5Mr.es.js → menu-Zlnps1eW.es.js} +6 -6
- package/dist/chunks/menu-Zlnps1eW.es.js.map +1 -0
- package/dist/chunks/money-input-C9eVmgeL.cjs.js +2 -0
- package/dist/chunks/money-input-C9eVmgeL.cjs.js.map +1 -0
- package/dist/chunks/{money-input-BEek-VSq.es.js → money-input-D65vrUj4.es.js} +119 -109
- package/dist/chunks/money-input-D65vrUj4.es.js.map +1 -0
- package/dist/chunks/money-input-field-BGZ_9HKh.cjs.js +2 -0
- package/dist/chunks/money-input-field-BGZ_9HKh.cjs.js.map +1 -0
- package/dist/chunks/money-input-field-CSnaaDk-.es.js +51 -0
- package/dist/chunks/money-input-field-CSnaaDk-.es.js.map +1 -0
- package/dist/chunks/multiline-text-input-CULLuZBp.cjs.js +2 -0
- package/dist/chunks/multiline-text-input-CULLuZBp.cjs.js.map +1 -0
- package/dist/chunks/multiline-text-input-CrDTYrM3.es.js +98 -0
- package/dist/chunks/multiline-text-input-CrDTYrM3.es.js.map +1 -0
- package/dist/chunks/multiline-text-input-field-BX-w2v1Y.cjs.js +2 -0
- package/dist/chunks/multiline-text-input-field-BX-w2v1Y.cjs.js.map +1 -0
- package/dist/chunks/multiline-text-input-field-C6UTl_c8.es.js +56 -0
- package/dist/chunks/multiline-text-input-field-C6UTl_c8.es.js.map +1 -0
- package/dist/chunks/nimbus-provider-Dnu5ohMR.cjs.js +2 -0
- package/dist/chunks/nimbus-provider-Dnu5ohMR.cjs.js.map +1 -0
- package/dist/chunks/nimbus-provider-S02SpkpM.es.js +101 -0
- package/dist/chunks/nimbus-provider-S02SpkpM.es.js.map +1 -0
- package/dist/chunks/normalize-messages-CaDzkuUm.cjs.js +2 -0
- package/dist/chunks/normalize-messages-CaDzkuUm.cjs.js.map +1 -0
- package/dist/chunks/normalize-messages-D5T4I93D.es.js +52 -0
- package/dist/chunks/normalize-messages-D5T4I93D.es.js.map +1 -0
- package/dist/chunks/number-input-CR1hdy-B.cjs.js +2 -0
- package/dist/chunks/number-input-CR1hdy-B.cjs.js.map +1 -0
- package/dist/chunks/{number-input-DrhSvm6o.es.js → number-input-Dp13Mn-8.es.js} +224 -229
- package/dist/chunks/number-input-Dp13Mn-8.es.js.map +1 -0
- package/dist/chunks/number-input-field-BDNpAP6t.cjs.js +2 -0
- package/dist/chunks/number-input-field-BDNpAP6t.cjs.js.map +1 -0
- package/dist/chunks/number-input-field-C90uFO4e.es.js +51 -0
- package/dist/chunks/number-input-field-C90uFO4e.es.js.map +1 -0
- package/dist/chunks/pagination-BIxlGft7.cjs.js +2 -0
- package/dist/chunks/pagination-BIxlGft7.cjs.js.map +1 -0
- package/dist/chunks/pagination-BlrGdyD5.es.js +226 -0
- package/dist/chunks/pagination-BlrGdyD5.es.js.map +1 -0
- package/dist/chunks/password-input-8bkpGOIX.es.js +47 -0
- package/dist/chunks/password-input-8bkpGOIX.es.js.map +1 -0
- package/dist/chunks/password-input-BVbQ42NG.cjs.js +2 -0
- package/dist/chunks/password-input-BVbQ42NG.cjs.js.map +1 -0
- package/dist/chunks/password-input-field-B5lWzWAQ.cjs.js +2 -0
- package/dist/chunks/password-input-field-B5lWzWAQ.cjs.js.map +1 -0
- package/dist/chunks/password-input-field-XXaNUALk.es.js +56 -0
- package/dist/chunks/password-input-field-XXaNUALk.es.js.map +1 -0
- package/dist/chunks/popover-CuA9VugH.es.js +11 -0
- package/dist/chunks/popover-CuA9VugH.es.js.map +1 -0
- package/dist/chunks/popover-Dhg--8YC.cjs.js +2 -0
- package/dist/chunks/popover-Dhg--8YC.cjs.js.map +1 -0
- package/dist/chunks/{progress-bar-vRz1k6ol.es.js → progress-bar-C2ZnGdLv.es.js} +2 -2
- package/dist/chunks/{progress-bar-vRz1k6ol.es.js.map → progress-bar-C2ZnGdLv.es.js.map} +1 -1
- package/dist/chunks/{progress-bar-NAFgbTy5.cjs.js → progress-bar-dRKyuT1-.cjs.js} +2 -2
- package/dist/chunks/{progress-bar-NAFgbTy5.cjs.js.map → progress-bar-dRKyuT1-.cjs.js.map} +1 -1
- package/dist/chunks/{radio-input-CRvjsU1E.cjs.js → radio-input-BecbxXcF.cjs.js} +2 -2
- package/dist/chunks/{radio-input-CRvjsU1E.cjs.js.map → radio-input-BecbxXcF.cjs.js.map} +1 -1
- package/dist/chunks/{radio-input-C2lCxDiv.es.js → radio-input-DV-hhL4S.es.js} +8 -8
- package/dist/chunks/{radio-input-C2lCxDiv.es.js.map → radio-input-DV-hhL4S.es.js.map} +1 -1
- package/dist/chunks/range-calendar-CEIaa08T.es.js +229 -0
- package/dist/chunks/range-calendar-CEIaa08T.es.js.map +1 -0
- package/dist/chunks/range-calendar-Dq5Gtsb6.cjs.js +2 -0
- package/dist/chunks/range-calendar-Dq5Gtsb6.cjs.js.map +1 -0
- package/dist/chunks/rich-text-input-CRGUa5d2.es.js +1200 -0
- package/dist/chunks/rich-text-input-CRGUa5d2.es.js.map +1 -0
- package/dist/chunks/rich-text-input-Dml5F7pU.cjs.js +4 -0
- package/dist/chunks/rich-text-input-Dml5F7pU.cjs.js.map +1 -0
- package/dist/chunks/scoped-search-input-CSpFefUJ.es.js +147 -0
- package/dist/chunks/scoped-search-input-CSpFefUJ.es.js.map +1 -0
- package/dist/chunks/scoped-search-input-DKCK7idN.cjs.js +2 -0
- package/dist/chunks/scoped-search-input-DKCK7idN.cjs.js.map +1 -0
- package/dist/chunks/{search-input-CMrPbAUI.es.js → search-input-BDUJ48BC.es.js} +147 -147
- package/dist/chunks/search-input-BDUJ48BC.es.js.map +1 -0
- package/dist/chunks/search-input-BNXlpYtP.cjs.js +2 -0
- package/dist/chunks/search-input-BNXlpYtP.cjs.js.map +1 -0
- package/dist/chunks/search-input-field-CEemw2P1.es.js +51 -0
- package/dist/chunks/search-input-field-CEemw2P1.es.js.map +1 -0
- package/dist/chunks/search-input-field-v60x1oiw.cjs.js +2 -0
- package/dist/chunks/search-input-field-v60x1oiw.cjs.js.map +1 -0
- package/dist/chunks/{select-DG6qOekv.es.js → select-D9yYDW0d.es.js} +229 -229
- package/dist/chunks/select-D9yYDW0d.es.js.map +1 -0
- package/dist/chunks/select-Dq_6o0BB.cjs.js +2 -0
- package/dist/chunks/select-Dq_6o0BB.cjs.js.map +1 -0
- package/dist/chunks/{separator-B-ibkWW-.es.js → separator-BJ9k_D4l.es.js} +4 -4
- package/dist/chunks/{separator-B-ibkWW-.es.js.map → separator-BJ9k_D4l.es.js.map} +1 -1
- package/dist/chunks/{separator-DYCn6JPo.cjs.js → separator-u_4por07.cjs.js} +2 -2
- package/dist/chunks/{separator-DYCn6JPo.cjs.js.map → separator-u_4por07.cjs.js.map} +1 -1
- package/dist/chunks/split-button-B4gVhpP9.cjs.js +2 -0
- package/dist/chunks/split-button-B4gVhpP9.cjs.js.map +1 -0
- package/dist/chunks/split-button-C94SY3qF.es.js +106 -0
- package/dist/chunks/split-button-C94SY3qF.es.js.map +1 -0
- package/dist/chunks/stack-CIN13EDn.cjs.js.map +1 -1
- package/dist/chunks/stack-CoNreM7B.es.js.map +1 -1
- package/dist/chunks/{switch-BzYS9qlr.cjs.js → switch-CsiG41ZR.cjs.js} +2 -2
- package/dist/chunks/{switch-BzYS9qlr.cjs.js.map → switch-CsiG41ZR.cjs.js.map} +1 -1
- package/dist/chunks/{switch-_TfZ37Nm.es.js → switch-Nn1Fbk5O.es.js} +3 -3
- package/dist/chunks/{switch-_TfZ37Nm.es.js.map → switch-Nn1Fbk5O.es.js.map} +1 -1
- package/dist/chunks/tabs-D0OPeQ_J.es.js +516 -0
- package/dist/chunks/tabs-D0OPeQ_J.es.js.map +1 -0
- package/dist/chunks/tabs-iV08OTqG.cjs.js +2 -0
- package/dist/chunks/tabs-iV08OTqG.cjs.js.map +1 -0
- package/dist/chunks/{tag-group-Aa30DcsU.es.js → tag-group-BE8d6xcP.es.js} +209 -208
- package/dist/chunks/tag-group-BE8d6xcP.es.js.map +1 -0
- package/dist/chunks/tag-group-BI8_32rM.cjs.js +2 -0
- package/dist/chunks/tag-group-BI8_32rM.cjs.js.map +1 -0
- package/dist/chunks/text-BtRhIklG.cjs.js.map +1 -1
- package/dist/chunks/text-CIb_VDvO.es.js.map +1 -1
- package/dist/chunks/{text-input-D3KWm-NF.cjs.js → text-input-BlxK2Naj.cjs.js} +2 -2
- package/dist/chunks/{text-input-D3KWm-NF.cjs.js.map → text-input-BlxK2Naj.cjs.js.map} +1 -1
- package/dist/chunks/{text-input-DOTYCJyJ.es.js → text-input-CCiZeQad.es.js} +3 -3
- package/dist/chunks/{text-input-DOTYCJyJ.es.js.map → text-input-CCiZeQad.es.js.map} +1 -1
- package/dist/chunks/text-input-field-6Cj35cYL.es.js +58 -0
- package/dist/chunks/text-input-field-6Cj35cYL.es.js.map +1 -0
- package/dist/chunks/text-input-field-Cmht3hDK.cjs.js +2 -0
- package/dist/chunks/text-input-field-Cmht3hDK.cjs.js.map +1 -0
- package/dist/chunks/{time-input-BYGEbCd6.cjs.js → time-input-9Q5vV4UD.cjs.js} +2 -2
- package/dist/chunks/{time-input-BYGEbCd6.cjs.js.map → time-input-9Q5vV4UD.cjs.js.map} +1 -1
- package/dist/chunks/{time-input-KrO-X3uW.es.js → time-input-CCuIFoY2.es.js} +4 -4
- package/dist/chunks/{time-input-KrO-X3uW.es.js.map → time-input-CCuIFoY2.es.js.map} +1 -1
- package/dist/chunks/{toggle-button-BKXhwp3e.cjs.js → toggle-button-L7i1XaWg.cjs.js} +2 -2
- package/dist/chunks/{toggle-button-BKXhwp3e.cjs.js.map → toggle-button-L7i1XaWg.cjs.js.map} +1 -1
- package/dist/chunks/{toggle-button-C03AKN2I.es.js → toggle-button-UcXy5q2C.es.js} +3 -3
- package/dist/chunks/{toggle-button-C03AKN2I.es.js.map → toggle-button-UcXy5q2C.es.js.map} +1 -1
- package/dist/chunks/{toolbar-D0WjTxz2.es.js → toolbar-C7-6gqba.es.js} +3 -3
- package/dist/chunks/{toolbar-D0WjTxz2.es.js.map → toolbar-C7-6gqba.es.js.map} +1 -1
- package/dist/chunks/{toolbar-DMowluJ2.cjs.js → toolbar-D4fLFiSb.cjs.js} +2 -2
- package/dist/chunks/{toolbar-DMowluJ2.cjs.js.map → toolbar-D4fLFiSb.cjs.js.map} +1 -1
- package/dist/chunks/{useDateFormatter-886GJ5w1.es.js → useDateFormatter-9juUpmrj.es.js} +246 -244
- package/dist/chunks/useDateFormatter-9juUpmrj.es.js.map +1 -0
- package/dist/chunks/useDateFormatter-Bq98mt4A.cjs.js +2 -0
- package/dist/chunks/useDateFormatter-Bq98mt4A.cjs.js.map +1 -0
- package/dist/chunks/{useGridListItem-BETI-KGO.cjs.js → useGridListItem-Bjqm2KGe.cjs.js} +2 -2
- package/dist/chunks/{useGridListItem-BETI-KGO.cjs.js.map → useGridListItem-Bjqm2KGe.cjs.js.map} +1 -1
- package/dist/chunks/{useGridListItem-DAGp36bD.es.js → useGridListItem-CJrr2QNO.es.js} +4 -4
- package/dist/chunks/{useGridListItem-DAGp36bD.es.js.map → useGridListItem-CJrr2QNO.es.js.map} +1 -1
- package/dist/chunks/useListData-BGzhnkuO.cjs.js +2 -0
- package/dist/chunks/useListData-BGzhnkuO.cjs.js.map +1 -0
- package/dist/chunks/useListData-CX8_NxJv.es.js +211 -0
- package/dist/chunks/useListData-CX8_NxJv.es.js.map +1 -0
- package/dist/chunks/useListState-BjCb6LLO.cjs.js +2 -0
- package/dist/chunks/{useListState-QQtJHpsQ.cjs.js.map → useListState-BjCb6LLO.cjs.js.map} +1 -1
- package/dist/chunks/{useListState-BHLGQlP3.es.js → useListState-Dd0Mtev3.es.js} +17 -18
- package/dist/chunks/{useListState-BHLGQlP3.es.js.map → useListState-Dd0Mtev3.es.js.map} +1 -1
- package/dist/chunks/useLocalizedStringFormatter-CJ-iYW1Z.cjs.js +2 -0
- package/dist/chunks/useLocalizedStringFormatter-CJ-iYW1Z.cjs.js.map +1 -0
- package/dist/chunks/useLocalizedStringFormatter-DWb0DkHL.es.js +53 -0
- package/dist/chunks/useLocalizedStringFormatter-DWb0DkHL.es.js.map +1 -0
- package/dist/chunks/{useSpinButton-YcV6vlPf.es.js → useSpinButton-D8B_x4uj.es.js} +2 -2
- package/dist/chunks/{useSpinButton-YcV6vlPf.es.js.map → useSpinButton-D8B_x4uj.es.js.map} +1 -1
- package/dist/chunks/{useSpinButton-Dyt6kG4o.cjs.js → useSpinButton-RB0J1fiP.cjs.js} +2 -2
- package/dist/chunks/{useSpinButton-Dyt6kG4o.cjs.js.map → useSpinButton-RB0J1fiP.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/alert.messages.d.ts +6 -0
- package/dist/components/alert/alert.types.d.ts +2 -2
- 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/intl/de.d.ts +9 -0
- package/dist/components/alert/intl/en.d.ts +9 -0
- package/dist/components/alert/intl/es.d.ts +9 -0
- package/dist/components/alert/intl/fr-FR.d.ts +9 -0
- package/dist/components/alert/intl/pt-BR.d.ts +9 -0
- package/dist/components/alert.cjs +1 -1
- package/dist/components/alert.es.js +1 -1
- package/dist/components/avatar/avatar.messages.d.ts +6 -0
- package/dist/components/avatar/intl/de.d.ts +9 -0
- package/dist/components/avatar/intl/en.d.ts +9 -0
- package/dist/components/avatar/intl/es.d.ts +9 -0
- package/dist/components/avatar/intl/fr-FR.d.ts +9 -0
- package/dist/components/avatar/intl/pt-BR.d.ts +9 -0
- package/dist/components/avatar.cjs +1 -1
- package/dist/components/avatar.es.js +1 -1
- package/dist/components/box/box.d.ts +2 -0
- package/dist/components/button.cjs +1 -1
- package/dist/components/button.es.js +1 -1
- package/dist/components/calendar/calendar.messages.d.ts +6 -0
- package/dist/components/calendar/intl/de.d.ts +12 -0
- package/dist/components/calendar/intl/en.d.ts +12 -0
- package/dist/components/calendar/intl/es.d.ts +12 -0
- package/dist/components/calendar/intl/fr-FR.d.ts +12 -0
- package/dist/components/calendar/intl/pt-BR.d.ts +12 -0
- package/dist/components/calendar.cjs +1 -1
- package/dist/components/calendar.es.js +1 -1
- package/dist/components/card/card.recipe.d.ts +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/combo-box/combo-box.messages.d.ts +6 -0
- package/dist/components/combo-box/intl/de.d.ts +12 -0
- package/dist/components/combo-box/intl/en.d.ts +12 -0
- package/dist/components/combo-box/intl/es.d.ts +12 -0
- package/dist/components/combo-box/intl/fr-FR.d.ts +12 -0
- package/dist/components/combo-box/intl/pt-BR.d.ts +12 -0
- package/dist/components/combobox/combobox.d.ts +203 -27
- package/dist/components/combobox/combobox.i18n.d.ts +3 -13
- package/dist/components/combobox/combobox.messages.d.ts +6 -0
- package/dist/components/combobox/combobox.recipe.d.ts +18 -17
- package/dist/components/combobox/combobox.slots.d.ts +14 -28
- package/dist/components/combobox/combobox.types.d.ts +704 -105
- package/dist/components/combobox/components/combobox.hidden-input.d.ts +17 -0
- package/dist/components/combobox/components/combobox.input.d.ts +20 -0
- package/dist/components/combobox/components/combobox.leading-element.d.ts +5 -5
- package/dist/components/combobox/components/combobox.listbox.d.ts +27 -0
- package/dist/components/combobox/components/combobox.option.d.ts +29 -5
- package/dist/components/combobox/components/combobox.popover.d.ts +27 -0
- package/dist/components/combobox/components/combobox.root-context.d.ts +13 -0
- package/dist/components/combobox/components/combobox.root.d.ts +26 -6
- package/dist/components/combobox/components/combobox.section.d.ts +32 -0
- package/dist/components/combobox/components/combobox.tag-group.d.ts +26 -0
- package/dist/components/combobox/components/combobox.trigger.d.ts +26 -0
- package/dist/components/combobox/components/index.d.ts +4 -9
- package/dist/components/combobox/index.d.ts +1 -1
- package/dist/components/combobox/intl/de.d.ts +12 -0
- package/dist/components/combobox/intl/en.d.ts +12 -0
- package/dist/components/combobox/intl/es.d.ts +12 -0
- package/dist/components/combobox/intl/fr-FR.d.ts +12 -0
- package/dist/components/combobox/intl/pt-BR.d.ts +12 -0
- package/dist/components/combobox/utils/collection.d.ts +13 -0
- package/dist/components/combobox/utils/filters.d.ts +339 -0
- package/dist/components/combobox/utils/selection.d.ts +10 -0
- package/dist/components/combobox/utils/test-data.d.ts +6 -0
- package/dist/components/combobox/utils/test-utils.d.ts +30 -0
- 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.context.d.ts +3 -1
- package/dist/components/data-table/components/index.d.ts +1 -1
- package/dist/components/data-table/data-table.messages.d.ts +6 -0
- package/dist/components/data-table/data-table.recipe.d.ts +1 -1
- package/dist/components/data-table/data-table.types.d.ts +11 -2
- package/dist/components/data-table/intl/de.d.ts +39 -0
- package/dist/components/data-table/intl/en.d.ts +39 -0
- package/dist/components/data-table/intl/es.d.ts +39 -0
- package/dist/components/data-table/intl/fr-FR.d.ts +39 -0
- package/dist/components/data-table/intl/pt-BR.d.ts +39 -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/date-picker.messages.d.ts +6 -0
- package/dist/components/date-picker/date-picker.types.d.ts +1 -1
- package/dist/components/date-picker/intl/de.d.ts +14 -0
- package/dist/components/date-picker/intl/en.d.ts +14 -0
- package/dist/components/date-picker/intl/es.d.ts +14 -0
- package/dist/components/date-picker/intl/fr-FR.d.ts +14 -0
- package/dist/components/date-picker/intl/pt-BR.d.ts +14 -0
- package/dist/components/date-picker.cjs +1 -1
- package/dist/components/date-picker.es.js +1 -1
- package/dist/components/date-range-picker/date-range-picker.messages.d.ts +6 -0
- package/dist/components/date-range-picker/intl/de.d.ts +21 -0
- package/dist/components/date-range-picker/intl/en.d.ts +21 -0
- package/dist/components/date-range-picker/intl/es.d.ts +21 -0
- package/dist/components/date-range-picker/intl/fr-FR.d.ts +21 -0
- package/dist/components/date-range-picker/intl/pt-BR.d.ts +21 -0
- 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/dialog.messages.d.ts +6 -0
- package/dist/components/dialog/dialog.types.d.ts +2 -2
- package/dist/components/dialog/intl/de.d.ts +9 -0
- package/dist/components/dialog/intl/en.d.ts +9 -0
- package/dist/components/dialog/intl/es.d.ts +9 -0
- package/dist/components/dialog/intl/fr-FR.d.ts +9 -0
- package/dist/components/dialog/intl/pt-BR.d.ts +9 -0
- package/dist/components/dialog.cjs +1 -1
- package/dist/components/dialog.es.js +1 -1
- package/dist/components/draggable-list/draggable-list.messages.d.ts +6 -0
- package/dist/components/draggable-list/intl/de.d.ts +10 -0
- package/dist/components/draggable-list/intl/en.d.ts +10 -0
- package/dist/components/draggable-list/intl/es.d.ts +10 -0
- package/dist/components/draggable-list/intl/fr-FR.d.ts +10 -0
- package/dist/components/draggable-list/intl/pt-BR.d.ts +10 -0
- package/dist/components/draggable-list.cjs +1 -1
- package/dist/components/draggable-list.es.js +1 -1
- package/dist/components/drawer/components/drawer.context.d.ts +8 -2
- package/dist/components/drawer/drawer.messages.d.ts +6 -0
- package/dist/components/drawer/drawer.types.d.ts +2 -2
- package/dist/components/drawer/intl/de.d.ts +9 -0
- package/dist/components/drawer/intl/en.d.ts +9 -0
- package/dist/components/drawer/intl/es.d.ts +9 -0
- package/dist/components/drawer/intl/fr-FR.d.ts +9 -0
- package/dist/components/drawer/intl/pt-BR.d.ts +9 -0
- package/dist/components/drawer.cjs +1 -1
- package/dist/components/drawer.es.js +1 -1
- package/dist/components/field-errors/field-errors.d.ts +1 -1
- package/dist/components/field-errors/field-errors.messages.d.ts +6 -0
- package/dist/components/field-errors/field-errors.types.d.ts +1 -1
- package/dist/components/field-errors/intl/de.d.ts +23 -0
- package/dist/components/field-errors/intl/en.d.ts +23 -0
- package/dist/components/field-errors/intl/es.d.ts +23 -0
- package/dist/components/field-errors/intl/fr-FR.d.ts +23 -0
- package/dist/components/field-errors/intl/pt-BR.d.ts +23 -0
- package/dist/components/field-errors.cjs +1 -1
- package/dist/components/field-errors.es.js +1 -1
- package/dist/components/fields.cjs +1 -1
- package/dist/components/fields.es.js +13 -3
- package/dist/components/fields.es.js.map +1 -1
- package/dist/components/form-field.cjs +1 -1
- package/dist/components/form-field.es.js +1 -1
- package/dist/components/icon-button/icon-button.types.d.ts +15 -3
- package/dist/components/icon-button.cjs +1 -1
- package/dist/components/icon-button.es.js +1 -1
- package/dist/components/icon-toggle-button/icon-toggle-button.types.d.ts +1 -1
- package/dist/components/icon-toggle-button.cjs +1 -1
- package/dist/components/icon-toggle-button.es.js +1 -1
- package/dist/components/icon.cjs +1 -1
- package/dist/components/icon.es.js +1 -1
- package/dist/components/image/image.d.ts +2 -0
- package/dist/components/inline-svg.cjs +1 -1
- package/dist/components/inline-svg.es.js +1 -1
- package/dist/components/list/components/index.d.ts +3 -0
- package/dist/components/list/components/list.indicator.d.ts +19 -0
- package/dist/components/list/components/list.item.d.ts +15 -0
- package/dist/components/list/components/list.root.d.ts +25 -0
- package/dist/components/list/list.d.ts +3 -6
- package/dist/components/loading-spinner/intl/de.d.ts +9 -0
- package/dist/components/loading-spinner/intl/en.d.ts +9 -0
- package/dist/components/loading-spinner/intl/es.d.ts +9 -0
- package/dist/components/loading-spinner/intl/fr-FR.d.ts +9 -0
- package/dist/components/loading-spinner/intl/pt-BR.d.ts +9 -0
- package/dist/components/loading-spinner/loading-spinner.messages.d.ts +6 -0
- package/dist/components/loading-spinner.cjs +1 -1
- package/dist/components/loading-spinner.es.js +1 -1
- package/dist/components/localized-field/intl/de.d.ts +14 -0
- package/dist/components/localized-field/intl/en.d.ts +14 -0
- package/dist/components/localized-field/intl/es.d.ts +14 -0
- package/dist/components/localized-field/intl/fr-FR.d.ts +14 -0
- package/dist/components/localized-field/intl/pt-BR.d.ts +14 -0
- package/dist/components/localized-field/localized-field.messages.d.ts +6 -0
- package/dist/components/localized-field/localized-field.types.d.ts +1 -1
- package/dist/components/localized-field.cjs +1 -1
- package/dist/components/localized-field.es.js +1 -1
- package/dist/components/money-input/intl/de.d.ts +11 -0
- package/dist/components/money-input/intl/en.d.ts +11 -0
- package/dist/components/money-input/intl/es.d.ts +11 -0
- package/dist/components/money-input/intl/fr-FR.d.ts +11 -0
- package/dist/components/money-input/intl/pt-BR.d.ts +11 -0
- package/dist/components/money-input/money-input.messages.d.ts +6 -0
- package/dist/components/money-input/money-input.recipe.d.ts +1 -1
- package/dist/components/money-input-field.cjs +2 -0
- package/dist/components/money-input-field.cjs.map +1 -0
- package/dist/components/money-input-field.es.js +5 -0
- package/dist/components/money-input-field.es.js.map +1 -0
- package/dist/components/money-input.cjs +1 -1
- package/dist/components/money-input.es.js +1 -1
- package/dist/components/multiline-text-input/multiline-text-input.types.d.ts +1 -1
- package/dist/components/multiline-text-input-field.cjs +2 -0
- package/dist/components/multiline-text-input-field.cjs.map +1 -0
- package/dist/components/multiline-text-input-field.es.js +5 -0
- package/dist/components/multiline-text-input-field.es.js.map +1 -0
- package/dist/components/multiline-text-input.cjs +1 -1
- package/dist/components/multiline-text-input.es.js +1 -1
- package/dist/components/nimbus-provider/index.d.ts +0 -1
- package/dist/components/nimbus-provider/nimbus-provider.d.ts +1 -0
- package/dist/components/nimbus-provider.cjs +1 -1
- package/dist/components/nimbus-provider.es.js +1 -3
- package/dist/components/nimbus-provider.es.js.map +1 -1
- package/dist/components/number-input/intl/de.d.ts +10 -0
- package/dist/components/number-input/intl/en.d.ts +10 -0
- package/dist/components/number-input/intl/es.d.ts +10 -0
- package/dist/components/number-input/intl/fr-FR.d.ts +10 -0
- package/dist/components/number-input/intl/pt-BR.d.ts +10 -0
- package/dist/components/number-input/number-input.messages.d.ts +6 -0
- package/dist/components/number-input-field.cjs +2 -0
- package/dist/components/number-input-field.cjs.map +1 -0
- package/dist/components/number-input-field.es.js +5 -0
- package/dist/components/number-input-field.es.js.map +1 -0
- package/dist/components/number-input.cjs +1 -1
- package/dist/components/number-input.es.js +1 -1
- package/dist/components/pagination/intl/de.d.ts +16 -0
- package/dist/components/pagination/intl/en.d.ts +16 -0
- package/dist/components/pagination/intl/es.d.ts +16 -0
- package/dist/components/pagination/intl/fr-FR.d.ts +16 -0
- package/dist/components/pagination/intl/pt-BR.d.ts +16 -0
- package/dist/components/pagination/pagination.messages.d.ts +6 -0
- package/dist/components/pagination.cjs +1 -1
- package/dist/components/pagination.es.js +1 -1
- package/dist/components/password-input/intl/de.d.ts +10 -0
- package/dist/components/password-input/intl/en.d.ts +10 -0
- package/dist/components/password-input/intl/es.d.ts +10 -0
- package/dist/components/password-input/intl/fr-FR.d.ts +10 -0
- package/dist/components/password-input/intl/pt-BR.d.ts +10 -0
- package/dist/components/password-input/password-input.messages.d.ts +6 -0
- package/dist/components/password-input-field.cjs +2 -0
- package/dist/components/password-input-field.cjs.map +1 -0
- package/dist/components/password-input-field.es.js +5 -0
- package/dist/components/password-input-field.es.js.map +1 -0
- 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 +13 -3
- package/dist/components/patterns.es.js.map +1 -1
- package/dist/components/popover/popover.d.ts +1 -1
- package/dist/components/popover/popover.slots.d.ts +2 -4
- package/dist/components/popover/popover.types.d.ts +12 -2
- package/dist/components/popover.cjs +1 -1
- package/dist/components/popover.es.js +1 -1
- package/dist/components/progress-bar.cjs +1 -1
- package/dist/components/progress-bar.es.js +1 -1
- package/dist/components/radio-input.cjs +1 -1
- package/dist/components/radio-input.es.js +1 -1
- package/dist/components/range-calendar/intl/de.d.ts +12 -0
- package/dist/components/range-calendar/intl/en.d.ts +12 -0
- package/dist/components/range-calendar/intl/es.d.ts +12 -0
- package/dist/components/range-calendar/intl/fr-FR.d.ts +12 -0
- package/dist/components/range-calendar/intl/pt-BR.d.ts +12 -0
- package/dist/components/range-calendar/range-calendar.messages.d.ts +6 -0
- package/dist/components/range-calendar.cjs +1 -1
- package/dist/components/range-calendar.es.js +1 -1
- package/dist/components/rich-text-input/constants/text-styles.d.ts +2 -3
- package/dist/components/rich-text-input/intl/de.d.ts +32 -0
- package/dist/components/rich-text-input/intl/en.d.ts +32 -0
- package/dist/components/rich-text-input/intl/es.d.ts +32 -0
- package/dist/components/rich-text-input/intl/fr-FR.d.ts +32 -0
- package/dist/components/rich-text-input/intl/pt-BR.d.ts +32 -0
- package/dist/components/rich-text-input/rich-text-input.messages.d.ts +6 -0
- 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/intl/de.d.ts +10 -0
- package/dist/components/scoped-search-input/intl/en.d.ts +10 -0
- package/dist/components/scoped-search-input/intl/es.d.ts +10 -0
- package/dist/components/scoped-search-input/intl/fr-FR.d.ts +10 -0
- package/dist/components/scoped-search-input/intl/pt-BR.d.ts +10 -0
- package/dist/components/scoped-search-input/scoped-search-input.messages.d.ts +6 -0
- package/dist/components/scoped-search-input.cjs +1 -1
- package/dist/components/scoped-search-input.es.js +1 -1
- package/dist/components/search-input/intl/de.d.ts +9 -0
- package/dist/components/search-input/intl/en.d.ts +9 -0
- package/dist/components/search-input/intl/es.d.ts +9 -0
- package/dist/components/search-input/intl/fr-FR.d.ts +9 -0
- package/dist/components/search-input/intl/pt-BR.d.ts +9 -0
- package/dist/components/search-input/search-input.messages.d.ts +6 -0
- package/dist/components/search-input-field.cjs +2 -0
- package/dist/components/search-input-field.cjs.map +1 -0
- package/dist/components/search-input-field.es.js +5 -0
- package/dist/components/search-input-field.es.js.map +1 -0
- package/dist/components/search-input.cjs +1 -1
- package/dist/components/search-input.es.js +1 -1
- package/dist/components/select/components/select.root.d.ts +2 -2
- package/dist/components/select/intl/de.d.ts +9 -0
- package/dist/components/select/intl/en.d.ts +9 -0
- package/dist/components/select/intl/es.d.ts +9 -0
- package/dist/components/select/intl/fr-FR.d.ts +9 -0
- package/dist/components/select/intl/pt-BR.d.ts +9 -0
- package/dist/components/select/select.d.ts +1 -1
- package/dist/components/select/select.messages.d.ts +6 -0
- package/dist/components/select/select.recipe.d.ts +1 -1
- package/dist/components/select/select.types.d.ts +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/intl/de.d.ts +9 -0
- package/dist/components/split-button/intl/en.d.ts +9 -0
- package/dist/components/split-button/intl/es.d.ts +9 -0
- package/dist/components/split-button/intl/fr-FR.d.ts +9 -0
- package/dist/components/split-button/intl/pt-BR.d.ts +9 -0
- package/dist/components/split-button/split-button.messages.d.ts +6 -0
- package/dist/components/split-button/split-button.types.d.ts +1 -1
- package/dist/components/split-button.cjs +1 -1
- package/dist/components/split-button.es.js +1 -1
- package/dist/components/stack/index.d.ts +2 -1
- package/dist/components/stack/stack.d.ts +3 -5
- package/dist/components/stack/stack.types.d.ts +33 -0
- 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.recipe.d.ts +12 -11
- package/dist/components/tabs/tabs.slots.d.ts +10 -0
- package/dist/components/tabs/tabs.types.d.ts +9 -0
- package/dist/components/tabs.cjs +1 -1
- package/dist/components/tabs.es.js +1 -1
- package/dist/components/tag-group/intl/de.d.ts +9 -0
- package/dist/components/tag-group/intl/en.d.ts +9 -0
- package/dist/components/tag-group/intl/es.d.ts +9 -0
- package/dist/components/tag-group/intl/fr-FR.d.ts +9 -0
- package/dist/components/tag-group/intl/pt-BR.d.ts +9 -0
- package/dist/components/tag-group/tag-group.messages.d.ts +6 -0
- package/dist/components/tag-group.cjs +1 -1
- package/dist/components/tag-group.es.js +1 -1
- package/dist/components/text/text.d.ts +2 -0
- 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/components/utils.cjs +2 -2
- package/dist/components/utils.cjs.map +1 -1
- package/dist/components/utils.es.js +121 -122
- package/dist/components/utils.es.js.map +1 -1
- package/dist/constants/color-palettes.d.ts +24 -0
- package/dist/constants/index.d.ts +1 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/use-localized-string-formatter/index.d.ts +1 -0
- package/dist/hooks/use-localized-string-formatter/use-localized-string-formatter.d.ts +56 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.es.js +278 -268
- package/dist/index.es.js.map +1 -1
- package/dist/patterns/fields/date-range-picker-field/date-range-picker-field.types.d.ts +12 -14
- package/dist/patterns/fields/index.d.ts +5 -0
- package/dist/patterns/fields/money-input-field/index.d.ts +2 -0
- package/dist/patterns/fields/money-input-field/money-input-field.d.ts +32 -0
- package/dist/patterns/fields/money-input-field/money-input-field.types.d.ts +56 -0
- package/dist/patterns/fields/multiline-text-input-field/index.d.ts +2 -0
- package/dist/patterns/fields/multiline-text-input-field/multiline-text-input-field.d.ts +30 -0
- package/dist/patterns/fields/multiline-text-input-field/multiline-text-input-field.types.d.ts +44 -0
- package/dist/patterns/fields/number-input-field/index.d.ts +2 -0
- package/dist/patterns/fields/number-input-field/number-input-field.d.ts +31 -0
- package/dist/patterns/fields/number-input-field/number-input-field.types.d.ts +52 -0
- package/dist/patterns/fields/password-input-field/index.d.ts +2 -0
- package/dist/patterns/fields/password-input-field/password-input-field.d.ts +28 -0
- package/dist/patterns/fields/password-input-field/password-input-field.types.d.ts +43 -0
- package/dist/patterns/fields/search-input-field/index.d.ts +2 -0
- package/dist/patterns/fields/search-input-field/search-input-field.d.ts +30 -0
- package/dist/patterns/fields/search-input-field/search-input-field.types.d.ts +50 -0
- package/dist/patterns/fields/text-input-field/text-input-field.d.ts +1 -1
- package/dist/patterns/fields/text-input-field/text-input-field.types.d.ts +8 -3
- package/dist/theme/semantic-tokens/colors.d.ts +2 -8
- package/dist/theme/semantic-tokens/index.d.ts +1 -4
- package/dist/theme/slot-recipes/index.d.ts +34 -32
- package/dist/type-utils/shared-types.d.ts +12 -4
- package/dist/utils/display-color-palettes.d.ts +39 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/normalize-messages.d.ts +10 -0
- package/package.json +32 -28
- package/dist/chunks/DateField-B5u8QZFY.cjs.js +0 -2
- package/dist/chunks/DateField-B5u8QZFY.cjs.js.map +0 -1
- package/dist/chunks/DateField-C5JgBb30.es.js.map +0 -1
- package/dist/chunks/TextArea-2QJpeMJq.cjs.js +0 -2
- package/dist/chunks/TextArea-2QJpeMJq.cjs.js.map +0 -1
- package/dist/chunks/TextArea-CXEdUjgW.es.js +0 -42
- package/dist/chunks/TextArea-CXEdUjgW.es.js.map +0 -1
- package/dist/chunks/alert-ByKnzJtr.cjs.js +0 -2
- package/dist/chunks/alert-ByKnzJtr.cjs.js.map +0 -1
- package/dist/chunks/alert-Cb8WoJYV.es.js +0 -211
- package/dist/chunks/alert-Cb8WoJYV.es.js.map +0 -1
- package/dist/chunks/avatar-Dx_Cda2J.es.js +0 -47
- package/dist/chunks/avatar-Dx_Cda2J.es.js.map +0 -1
- package/dist/chunks/avatar-wRR1leVi.cjs.js +0 -2
- package/dist/chunks/avatar-wRR1leVi.cjs.js.map +0 -1
- package/dist/chunks/calendar-B--ZxTlQ.es.js +0 -217
- package/dist/chunks/calendar-B--ZxTlQ.es.js.map +0 -1
- package/dist/chunks/calendar-DLSOwy_e.cjs.js +0 -2
- package/dist/chunks/calendar-DLSOwy_e.cjs.js.map +0 -1
- package/dist/chunks/card-B2TxE_Ez.cjs.js +0 -2
- package/dist/chunks/card-B2TxE_Ez.cjs.js.map +0 -1
- package/dist/chunks/card-CEfEgF48.es.js +0 -120
- package/dist/chunks/card-CEfEgF48.es.js.map +0 -1
- package/dist/chunks/combobox-B2nkVE2H.cjs.js +0 -2
- package/dist/chunks/combobox-B2nkVE2H.cjs.js.map +0 -1
- package/dist/chunks/combobox-COyroO64.es.js +0 -2497
- package/dist/chunks/combobox-COyroO64.es.js.map +0 -1
- package/dist/chunks/data-table-BzY3lLyR.cjs.js +0 -2
- package/dist/chunks/data-table-BzY3lLyR.cjs.js.map +0 -1
- package/dist/chunks/data-table-C0rC7Jgu.es.js.map +0 -1
- package/dist/chunks/date-picker-8kdn6Ih5.es.js +0 -218
- package/dist/chunks/date-picker-8kdn6Ih5.es.js.map +0 -1
- package/dist/chunks/date-picker-CxJ6zMkz.cjs.js +0 -2
- package/dist/chunks/date-picker-CxJ6zMkz.cjs.js.map +0 -1
- package/dist/chunks/date-range-picker-B2VUcKjG.cjs.js +0 -2
- package/dist/chunks/date-range-picker-B2VUcKjG.cjs.js.map +0 -1
- package/dist/chunks/date-range-picker-Di9p8cKs.es.js +0 -356
- package/dist/chunks/date-range-picker-Di9p8cKs.es.js.map +0 -1
- package/dist/chunks/date-range-picker-field-D3tLPzMb.es.js.map +0 -1
- package/dist/chunks/date-range-picker-field-DipL5QZq.cjs.js.map +0 -1
- package/dist/chunks/dialog-qw6IMWj3.cjs.js +0 -2
- package/dist/chunks/dialog-qw6IMWj3.cjs.js.map +0 -1
- package/dist/chunks/dialog-z8EM12xr.es.js.map +0 -1
- package/dist/chunks/drawer-BZBluK-I.es.js.map +0 -1
- package/dist/chunks/drawer-DfJY_5pD.cjs.js +0 -2
- package/dist/chunks/drawer-DfJY_5pD.cjs.js.map +0 -1
- package/dist/chunks/field-errors-ClQprmQz.es.js +0 -213
- package/dist/chunks/field-errors-ClQprmQz.es.js.map +0 -1
- package/dist/chunks/field-errors-D2re_C_c.cjs.js +0 -2
- package/dist/chunks/field-errors-D2re_C_c.cjs.js.map +0 -1
- package/dist/chunks/form-field-BqlkPY29.es.js.map +0 -1
- package/dist/chunks/form-field-lALRYL6D.cjs.js +0 -2
- package/dist/chunks/form-field-lALRYL6D.cjs.js.map +0 -1
- package/dist/chunks/icon-CenxuChf.es.js +0 -11
- package/dist/chunks/icon-D39U--jA.cjs.js +0 -2
- package/dist/chunks/icon-button-BUmqYcIF.cjs.js +0 -2
- package/dist/chunks/icon-button-BUmqYcIF.cjs.js.map +0 -1
- package/dist/chunks/icon-button-DgL7XNUZ.es.js +0 -14
- package/dist/chunks/icon-button-DgL7XNUZ.es.js.map +0 -1
- package/dist/chunks/icon-toggle-button-BKmjmlZt.es.js.map +0 -1
- package/dist/chunks/icon-toggle-button-D3spgxe2.cjs.js.map +0 -1
- package/dist/chunks/index-BEgCT-l6.es.js.map +0 -1
- package/dist/chunks/index-DzRjEtIu.cjs.js +0 -34
- package/dist/chunks/index-DzRjEtIu.cjs.js.map +0 -1
- package/dist/chunks/inline-svg-CbSC6O5X.es.js +0 -21
- package/dist/chunks/inline-svg-Yb2OyzRw.cjs.js +0 -2
- package/dist/chunks/loading-spinner-DF6c3rBM.es.js +0 -59
- package/dist/chunks/loading-spinner-DF6c3rBM.es.js.map +0 -1
- package/dist/chunks/loading-spinner-DsKcjJ2b.cjs.js +0 -2
- package/dist/chunks/loading-spinner-DsKcjJ2b.cjs.js.map +0 -1
- package/dist/chunks/localized-field-CtLqzEnl.cjs.js +0 -2
- package/dist/chunks/localized-field-CtLqzEnl.cjs.js.map +0 -1
- package/dist/chunks/localized-field-XLDcWlU1.es.js +0 -470
- package/dist/chunks/localized-field-XLDcWlU1.es.js.map +0 -1
- package/dist/chunks/menu-C3Ovi5Mr.es.js.map +0 -1
- package/dist/chunks/menu-Vj3cVc_v.cjs.js.map +0 -1
- package/dist/chunks/money-input-B2tSXXU9.cjs.js +0 -2
- package/dist/chunks/money-input-B2tSXXU9.cjs.js.map +0 -1
- package/dist/chunks/money-input-BEek-VSq.es.js.map +0 -1
- package/dist/chunks/multiline-text-input-D5vbZHyU.es.js +0 -64
- package/dist/chunks/multiline-text-input-D5vbZHyU.es.js.map +0 -1
- package/dist/chunks/multiline-text-input-G1ZSL7hm.cjs.js +0 -2
- package/dist/chunks/multiline-text-input-G1ZSL7hm.cjs.js.map +0 -1
- package/dist/chunks/nimbus-provider-BHwVMxgZ.es.js +0 -102
- package/dist/chunks/nimbus-provider-BHwVMxgZ.es.js.map +0 -1
- package/dist/chunks/nimbus-provider-DHZ_RRPR.cjs.js +0 -2
- package/dist/chunks/nimbus-provider-DHZ_RRPR.cjs.js.map +0 -1
- package/dist/chunks/number-input-CwrgDAWw.cjs.js +0 -2
- package/dist/chunks/number-input-CwrgDAWw.cjs.js.map +0 -1
- package/dist/chunks/number-input-DrhSvm6o.es.js.map +0 -1
- package/dist/chunks/pagination-C6OYOaIl.cjs.js +0 -2
- package/dist/chunks/pagination-C6OYOaIl.cjs.js.map +0 -1
- package/dist/chunks/pagination-aj1F0182.es.js +0 -210
- package/dist/chunks/pagination-aj1F0182.es.js.map +0 -1
- package/dist/chunks/password-input-BILx_1d0.cjs.js +0 -2
- package/dist/chunks/password-input-BILx_1d0.cjs.js.map +0 -1
- package/dist/chunks/password-input-DTPr52a3.es.js +0 -54
- package/dist/chunks/password-input-DTPr52a3.es.js.map +0 -1
- package/dist/chunks/popover-BAIwOPdC.es.js +0 -14
- package/dist/chunks/popover-BAIwOPdC.es.js.map +0 -1
- package/dist/chunks/popover-DY7ASSCU.cjs.js +0 -2
- package/dist/chunks/popover-DY7ASSCU.cjs.js.map +0 -1
- package/dist/chunks/range-calendar-BagHIF-Y.es.js +0 -219
- package/dist/chunks/range-calendar-BagHIF-Y.es.js.map +0 -1
- package/dist/chunks/range-calendar-sHWelH3C.cjs.js +0 -2
- package/dist/chunks/range-calendar-sHWelH3C.cjs.js.map +0 -1
- package/dist/chunks/rich-text-input-B4ksKYJh.cjs.js +0 -10
- package/dist/chunks/rich-text-input-B4ksKYJh.cjs.js.map +0 -1
- package/dist/chunks/rich-text-input-CZqXRWdM.es.js +0 -1200
- package/dist/chunks/rich-text-input-CZqXRWdM.es.js.map +0 -1
- package/dist/chunks/scoped-search-input-BKTc1h-7.cjs.js +0 -2
- package/dist/chunks/scoped-search-input-BKTc1h-7.cjs.js.map +0 -1
- package/dist/chunks/scoped-search-input-DY4w22Ki.es.js +0 -152
- package/dist/chunks/scoped-search-input-DY4w22Ki.es.js.map +0 -1
- package/dist/chunks/search-input-Bl0EswfK.cjs.js +0 -2
- package/dist/chunks/search-input-Bl0EswfK.cjs.js.map +0 -1
- package/dist/chunks/search-input-CMrPbAUI.es.js.map +0 -1
- package/dist/chunks/select-B2MAR-fq.cjs.js +0 -2
- package/dist/chunks/select-B2MAR-fq.cjs.js.map +0 -1
- package/dist/chunks/select-DG6qOekv.es.js.map +0 -1
- package/dist/chunks/split-button-BpZ8jMvw.es.js +0 -106
- package/dist/chunks/split-button-BpZ8jMvw.es.js.map +0 -1
- package/dist/chunks/split-button-C99oShiQ.cjs.js +0 -2
- package/dist/chunks/split-button-C99oShiQ.cjs.js.map +0 -1
- package/dist/chunks/tabs-HOHhoLn5.es.js +0 -502
- package/dist/chunks/tabs-HOHhoLn5.es.js.map +0 -1
- package/dist/chunks/tabs-gitNliDG.cjs.js +0 -2
- package/dist/chunks/tabs-gitNliDG.cjs.js.map +0 -1
- package/dist/chunks/tag-group-Aa30DcsU.es.js.map +0 -1
- package/dist/chunks/tag-group-Ci_H89V0.cjs.js +0 -2
- package/dist/chunks/tag-group-Ci_H89V0.cjs.js.map +0 -1
- package/dist/chunks/text-input-field-BgQ4Te_a.cjs.js +0 -2
- package/dist/chunks/text-input-field-BgQ4Te_a.cjs.js.map +0 -1
- package/dist/chunks/text-input-field-CkcoMrv2.es.js +0 -55
- package/dist/chunks/text-input-field-CkcoMrv2.es.js.map +0 -1
- package/dist/chunks/useDateFormatter-886GJ5w1.es.js.map +0 -1
- package/dist/chunks/useDateFormatter-WCaFojul.cjs.js +0 -2
- package/dist/chunks/useDateFormatter-WCaFojul.cjs.js.map +0 -1
- package/dist/chunks/useFilter-BgT0isJK.es.js +0 -36
- package/dist/chunks/useFilter-BgT0isJK.es.js.map +0 -1
- package/dist/chunks/useFilter-CAVKltBB.cjs.js +0 -2
- package/dist/chunks/useFilter-CAVKltBB.cjs.js.map +0 -1
- package/dist/chunks/useListState-QQtJHpsQ.cjs.js +0 -2
- package/dist/chunks/useLocalizedStringFormatter-DaRRUvyV.es.js +0 -97
- package/dist/chunks/useLocalizedStringFormatter-DaRRUvyV.es.js.map +0 -1
- package/dist/chunks/useLocalizedStringFormatter-kWoZGAh5.cjs.js +0 -2
- package/dist/chunks/useLocalizedStringFormatter-kWoZGAh5.cjs.js.map +0 -1
- package/dist/chunks/useSingleSelectListState-B29G7the.es.js +0 -35
- package/dist/chunks/useSingleSelectListState-B29G7the.es.js.map +0 -1
- package/dist/chunks/useSingleSelectListState-CsD7W9nK.cjs.js +0 -2
- package/dist/chunks/useSingleSelectListState-CsD7W9nK.cjs.js.map +0 -1
- package/dist/components/combobox/components/combobox.multi-select-button-group.d.ts +0 -7
- package/dist/components/combobox/components/combobox.multi-select-root.d.ts +0 -7
- package/dist/components/combobox/components/combobox.multi-select-tag-group.d.ts +0 -7
- package/dist/components/combobox/components/combobox.option-group.d.ts +0 -11
- package/dist/components/combobox/components/combobox.options.d.ts +0 -10
- package/dist/components/combobox/components/combobox.single-select-button-group.d.ts +0 -7
- package/dist/components/combobox/components/combobox.single-select-input.d.ts +0 -7
- package/dist/components/combobox/components/combobox.single-select-root.d.ts +0 -7
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"drawer-BZBluK-I.es.js","sources":["../../src/components/drawer/drawer.slots.tsx","../../src/components/drawer/components/drawer.context.tsx","../../src/components/drawer/components/drawer.root.tsx","../../src/components/drawer/components/drawer.trigger.tsx","../../src/components/drawer/components/drawer.content.tsx","../../src/components/drawer/components/drawer.header.tsx","../../src/components/drawer/components/drawer.body.tsx","../../src/components/drawer/components/drawer.footer.tsx","../../src/components/drawer/components/drawer.title.tsx","../../src/components/drawer/drawer.i18n.ts","../../src/components/drawer/components/drawer.close-trigger.tsx","../../src/components/drawer/drawer.tsx"],"sourcesContent":["import {\n createSlotRecipeContext,\n type HTMLChakraProps,\n} from \"@chakra-ui/react/styled-system\";\nimport { drawerSlotRecipe } from \"./drawer.recipe\";\n\nconst { withProvider, withContext } = createSlotRecipeContext({\n recipe: drawerSlotRecipe,\n});\n\n// Root slot - provides recipe context + config to all child components\nexport type DrawerRootSlotProps = HTMLChakraProps<\"div\">;\nexport const DrawerRootSlot = withProvider<HTMLDivElement, DrawerRootSlotProps>(\n \"div\",\n \"root\"\n);\n\n// Trigger slot - button that opens the drawer\nexport type DrawerTriggerSlotProps = HTMLChakraProps<\"button\">;\nexport const DrawerTriggerSlot = withContext<\n HTMLButtonElement,\n DrawerTriggerSlotProps\n>(\"button\", \"trigger\");\n\n// Backdrop slot - overlay displayed behind the drawer\nexport type DrawerModalOverlaySlotProps = HTMLChakraProps<\"div\">;\nexport const DrawerModalOverlaySlot = withContext<\n HTMLDivElement,\n DrawerModalOverlaySlotProps\n>(\"div\", \"modalOverlay\");\n\n// modal slot - positions the drawer content\nexport type DrawerModalSlotProps = HTMLChakraProps<\"div\">;\nexport const DrawerModalSlot = withContext<\n HTMLDivElement,\n DrawerModalSlotProps\n>(\"div\", \"modal\");\n\n// Content slot - main drawer container\nexport type DrawerContentSlotProps = HTMLChakraProps<\"div\">;\nexport const DrawerContentSlot = withContext<\n HTMLDivElement,\n DrawerContentSlotProps\n>(\"div\", \"content\");\n\n// Header slot - drawer header section\nexport type DrawerHeaderSlotProps = HTMLChakraProps<\"header\">;\nexport const DrawerHeaderSlot = withContext<HTMLElement, DrawerHeaderSlotProps>(\n \"header\",\n \"header\"\n);\n\n// Body slot - drawer body content\nexport type DrawerBodySlotProps = HTMLChakraProps<\"div\">;\nexport const DrawerBodySlot = withContext<HTMLDivElement, DrawerBodySlotProps>(\n \"div\",\n \"body\"\n);\n\n// Footer slot - drawer footer section with actions\nexport type DrawerFooterSlotProps = HTMLChakraProps<\"footer\">;\nexport const DrawerFooterSlot = withContext<HTMLElement, DrawerFooterSlotProps>(\n \"footer\",\n \"footer\"\n);\n\n// Title slot - accessible drawer title\nexport type DrawerTitleSlotProps = HTMLChakraProps<\"h2\">;\nexport const DrawerTitleSlot = withContext<\n HTMLHeadingElement,\n DrawerTitleSlotProps\n>(\"h2\", \"title\");\n\n// Close trigger slot - div container for positioning close button\nexport type DrawerCloseTriggerSlotProps = HTMLChakraProps<\"div\">;\nexport const DrawerCloseTriggerSlot = withContext<\n HTMLDivElement,\n DrawerCloseTriggerSlotProps\n>(\"div\", \"closeTrigger\");\n","import { createContext, useContext } from \"react\";\nimport type { DrawerRootProps } from \"../drawer.types\";\n\n/**\n * Context value containing drawer configuration passed from Root to child components\n */\nexport type DrawerContextValue = DrawerRootProps;\n\nexport const DrawerContext = createContext<DrawerContextValue | undefined>(\n undefined\n);\n\n/**\n * Hook to access drawer configuration from DrawerContext\n * @returns Drawer configuration from context\n * @throws Error if used outside of Drawer.Root\n */\nexport const useDrawerRootContext = (): DrawerContextValue => {\n const context = useContext(DrawerContext);\n if (!context) {\n throw new Error(\"useDrawerContext must be used within Drawer.Root\");\n }\n return context;\n};\n\n/**\n * Provider component that passes drawer configuration down to child components\n */\nexport const DrawerProvider = ({\n children,\n value,\n}: {\n children: React.ReactNode;\n value: DrawerContextValue;\n}) => {\n return <DrawerContext value={value}>{children}</DrawerContext>;\n};\n","import React from \"react\";\nimport { DialogTrigger as RaDialogTrigger } from \"react-aria-components\";\nimport { useSlotRecipe } from \"@chakra-ui/react/styled-system\";\nimport { DrawerRootSlot } from \"../drawer.slots\";\nimport type { DrawerRootProps } from \"../drawer.types\";\nimport { DrawerProvider } from \"./drawer.context\";\nimport { drawerSlotRecipe } from \"../drawer.recipe\";\n\nexport const DrawerRoot = (props: DrawerRootProps) => {\n const recipe = useSlotRecipe({ recipe: drawerSlotRecipe });\n // Extract recipe props\n const [recipeProps] = recipe.splitVariantProps(props);\n // Extract props that are usable on RaDialogTrigger\n const { children, isOpen, onOpenChange, defaultOpen = false } = props;\n\n const content = <DrawerRootSlot {...recipeProps}>{children}</DrawerRootSlot>;\n\n // Check if any child is a Drawer.Trigger component\n // React Aria's DialogTrigger needs a pressable child, so we only use it when there's a trigger\n const hasDrawerTrigger = React.Children.toArray(children).some((child) => {\n if (React.isValidElement(child) && typeof child.type === \"function\") {\n const displayName = (\n child.type as React.ComponentType & { displayName?: string }\n )?.displayName;\n return (\n displayName === \"DrawerTrigger\" || displayName === \"Drawer.Trigger\"\n );\n }\n return false;\n });\n\n // Share all props (config + variant props) with the Drawer subcomponents\n return (\n <DrawerProvider value={props}>\n {hasDrawerTrigger ? (\n // When there's a Drawer.Trigger, use DialogTrigger for React Aria integration\n <RaDialogTrigger\n isOpen={isOpen}\n onOpenChange={onOpenChange}\n defaultOpen={defaultOpen}\n >\n {content}\n </RaDialogTrigger>\n ) : (\n // When no Drawer.Trigger, skip DialogTrigger to avoid the warning\n content\n )}\n </DrawerProvider>\n );\n};\n\nDrawerRoot.displayName = \"Drawer.Root\";\n","import { Button as RaButton } from \"react-aria-components\";\nimport { DrawerTriggerSlot } from \"../drawer.slots\";\nimport type { DrawerTriggerProps } from \"../drawer.types\";\nimport { extractStyleProps } from \"@/utils\";\nimport { chakra } from \"@chakra-ui/react/styled-system\";\n\n/**\n * Drawer.Trigger - The trigger element that opens the drawer when activated\n *\n * @supportsStyleProps\n */\nexport const DrawerTrigger = ({\n ref: forwardedRef,\n children,\n asChild,\n ...props\n}: DrawerTriggerProps) => {\n // If asChild is true, wrap children directly in RaButton with asChild\n if (asChild) {\n return (\n <chakra.button ref={forwardedRef} asChild {...props}>\n {children}\n </chakra.button>\n );\n }\n\n const [styleProps, restProps] = extractStyleProps(props);\n\n // Otherwise, wrap with both DrawerTriggerSlot and RaButton\n // Only pass React Aria compatible props to avoid type conflicts\n return (\n <DrawerTriggerSlot {...styleProps} asChild>\n <RaButton ref={forwardedRef} {...restProps}>\n {children}\n </RaButton>\n </DrawerTriggerSlot>\n );\n};\n\nDrawerTrigger.displayName = \"Drawer.Trigger\";\n","import {\n Modal as RaModal,\n ModalOverlay as RaModalOverlay,\n Dialog as RaDialog,\n} from \"react-aria-components\";\nimport {\n DrawerModalOverlaySlot,\n DrawerModalSlot,\n DrawerContentSlot,\n} from \"../drawer.slots\";\nimport type { DrawerContentProps } from \"../drawer.types\";\nimport { extractStyleProps } from \"@/utils\";\nimport { useDrawerRootContext } from \"./drawer.context\";\n\n/**\n * Drawer.Content - The main drawer content container\n *\n * @supportsStyleProps\n */\nexport const DrawerContent = (props: DrawerContentProps) => {\n const { ref: forwardedRef, children, ...restProps } = props;\n\n // Get recipe configuration from context instead of props\n const {\n defaultOpen,\n isDismissable,\n isKeyboardDismissDisabled,\n shouldCloseOnInteractOutside,\n isOpen,\n onOpenChange,\n } = useDrawerRootContext();\n\n const modalProps = {\n defaultOpen,\n isDismissable,\n isKeyboardDismissDisabled,\n shouldCloseOnInteractOutside,\n isOpen,\n onOpenChange,\n };\n\n const [styleProps] = extractStyleProps(restProps);\n\n return (\n <DrawerModalOverlaySlot asChild>\n <RaModalOverlay {...modalProps}>\n <DrawerModalSlot asChild>\n <RaModal>\n <DrawerContentSlot asChild {...styleProps}>\n <RaDialog ref={forwardedRef}>{children}</RaDialog>\n </DrawerContentSlot>\n </RaModal>\n </DrawerModalSlot>\n </RaModalOverlay>\n </DrawerModalOverlaySlot>\n );\n};\n\nDrawerContent.displayName = \"Drawer.Content\";\n","import { DrawerHeaderSlot } from \"../drawer.slots\";\nimport type { DrawerHeaderProps } from \"../drawer.types\";\n\n/**\n * Drawer.Header - The header section of the drawer\n *\n * @supportsStyleProps\n */\nexport const DrawerHeader = (props: DrawerHeaderProps) => {\n const { ref: forwardedRef, children, ...restProps } = props;\n\n return (\n <DrawerHeaderSlot ref={forwardedRef} {...restProps}>\n {children}\n </DrawerHeaderSlot>\n );\n};\n\nDrawerHeader.displayName = \"Drawer.Header\";\n","import { DrawerBodySlot } from \"../drawer.slots\";\nimport type { DrawerBodyProps } from \"../drawer.types\";\n\n/**\n * Drawer.Body - The main body content section of the drawer\n *\n * @supportsStyleProps\n */\nexport const DrawerBody = (props: DrawerBodyProps) => {\n const { ref: forwardedRef, children, ...restProps } = props;\n\n const defaultProps = {\n /**\n * Set tabIndex to 0 to allow the body to receive focus,\n * effectively enabling scrolling via keyboard arrow keys.\n */\n tabIndex: 0,\n };\n\n return (\n <DrawerBodySlot ref={forwardedRef} {...defaultProps} {...restProps}>\n {children}\n </DrawerBodySlot>\n );\n};\n\nDrawerBody.displayName = \"Drawer.Body\";\n","import { DrawerFooterSlot } from \"../drawer.slots\";\nimport type { DrawerFooterProps } from \"../drawer.types\";\n\n/**\n * Drawer.Footer - The footer section of the drawer\n *\n * @supportsStyleProps\n */\nexport const DrawerFooter = (props: DrawerFooterProps) => {\n const { ref: forwardedRef, children, ...restProps } = props;\n\n return (\n <DrawerFooterSlot ref={forwardedRef} {...restProps}>\n {children}\n </DrawerFooterSlot>\n );\n};\n\nDrawerFooter.displayName = \"Drawer.Footer\";\n","import { DrawerTitleSlot } from \"../drawer.slots\";\nimport type { DrawerTitleProps } from \"../drawer.types\";\nimport { Heading } from \"@/components\";\n\n/**\n * Drawer.Title - The accessible title element for the drawer\n *\n * @supportsStyleProps\n */\nexport const DrawerTitle = (props: DrawerTitleProps) => {\n const { ref: forwardedRef, children, ...restProps } = props;\n\n return (\n <DrawerTitleSlot asChild {...restProps}>\n <Heading ref={forwardedRef} slot=\"title\" as=\"h2\" textStyle=\"lg\">\n {children}\n </Heading>\n </DrawerTitleSlot>\n );\n};\n\nDrawerTitle.displayName = \"Drawer.Title\";\n","import { defineMessages } from \"react-intl\";\n\nexport const messages = defineMessages({\n closeTrigger: {\n id: \"Nimbus.Drawer.closeTrigger\",\n description: \"aria-label for the default close trigger button\",\n defaultMessage: \"Close drawer\",\n },\n});\n","import { Close } from \"@commercetools/nimbus-icons\";\nimport { DrawerCloseTriggerSlot } from \"../drawer.slots\";\nimport type { DrawerCloseTriggerProps } from \"../drawer.types\";\nimport { IconButton } from \"@/components\";\nimport { messages } from \"../drawer.i18n\";\nimport { useIntl } from \"react-intl\";\n\n/**\n * Drawer.CloseTrigger - A button that closes the drawer when activated\n *\n * @supportsStyleProps\n */\nexport const DrawerCloseTrigger = (props: DrawerCloseTriggerProps) => {\n const { ref: forwardedRef, \"aria-label\": ariaLabel, ...restProps } = props;\n const intl = useIntl();\n\n return (\n <DrawerCloseTriggerSlot>\n <IconButton\n ref={forwardedRef}\n slot=\"close\"\n size=\"xs\"\n variant=\"ghost\"\n aria-label={ariaLabel || intl.formatMessage(messages.closeTrigger)}\n {...restProps}\n >\n <Close />\n </IconButton>\n </DrawerCloseTriggerSlot>\n );\n};\n\nDrawerCloseTrigger.displayName = \"Drawer.CloseTrigger\";\n","import { DrawerRoot } from \"./components/drawer.root\";\nimport { DrawerTrigger } from \"./components/drawer.trigger\";\nimport { DrawerContent } from \"./components/drawer.content\";\nimport { DrawerHeader } from \"./components/drawer.header\";\nimport { DrawerBody } from \"./components/drawer.body\";\nimport { DrawerFooter } from \"./components/drawer.footer\";\nimport { DrawerTitle } from \"./components/drawer.title\";\nimport { DrawerCloseTrigger } from \"./components/drawer.close-trigger\";\n\n/**\n * Drawer\n * ============================================================\n * A foundational drawer component for overlays that require user attention.\n * Built for accessibility and WCAG 2.1 AA compliance.\n *\n * Features:\n * - Controlled and uncontrolled modes\n * - Customizable placement, size, and animations\n * - Focus management and keyboard navigation\n * - Click-outside and Escape key dismissal\n * - Portal rendering support\n * - Backdrop overlay with animations\n *\n * @example\n * ```tsx\n * <Drawer.Root>\n * <Drawer.Trigger>Open Drawer</Drawer.Trigger>\n * <Drawer.Content size=\"md\" placement=\"center\">\n * <Drawer.Header>\n * <Drawer.Title>Drawer Title</Drawer.Title>\n * <Drawer.CloseTrigger>×</Drawer.CloseTrigger>\n * </Drawer.Header>\n * <Drawer.Body>\n * Drawer content goes here\n * </Drawer.Body>\n * <Drawer.Footer>\n * <button>Cancel</button>\n * <button>Save</button>\n * </Drawer.Footer>\n * </Drawer.Content>\n * </Drawer.Root>\n * ```\n * @see https://nimbus-documentation.vercel.app/components/feedback/drawer\n */\nexport const Drawer = {\n /**\n * # Drawer.Root\n *\n * The root component that provides context and state management for the drawer.\n * Handles accessibility and keyboard interaction.\n *\n * This component must wrap all drawer parts (Trigger, Content, etc.) and provides\n * the drawer open/close state and variant styling context.\n *\n * @example\n * ```tsx\n * <Drawer.Root>\n * <Drawer.Trigger>Open Drawer</Drawer.Trigger>\n * <Drawer.Content>\n * <Drawer.Header>\n * <Drawer.Title>Drawer Title</Drawer.Title>\n * </Drawer.Header>\n * <Drawer.Body>Drawer content</Drawer.Body>\n * </Drawer.Content>\n * </Drawer.Root>\n * ```\n */\n Root: DrawerRoot,\n /**\n * # Drawer.Trigger\n *\n * The trigger element that opens the drawer when activated.\n * Provides accessibility and keyboard support.\n *\n * @example\n * ```tsx\n * <Drawer.Root>\n * <Drawer.Trigger>Open Drawer</Drawer.Trigger>\n * <Drawer.Content>...</Drawer.Content>\n * </Drawer.Root>\n * ```\n */\n Trigger: DrawerTrigger,\n /**\n * # Drawer.Content\n *\n * The main drawer content container that handles portalling, backdrop,\n * positioning, and content styling.\n *\n * This component creates the drawer overlay, positions the content, and provides\n * accessibility features like focus management and keyboard dismissal.\n *\n * @example\n * ```tsx\n * <Drawer.Root>\n * <Drawer.Trigger>Open Drawer</Drawer.Trigger>\n * <Drawer.Content size=\"md\" placement=\"center\">\n * <Drawer.Header>\n * <Drawer.Title>Title</Drawer.Title>\n * </Drawer.Header>\n * <Drawer.Body>Content</Drawer.Body>\n * <Drawer.Footer>Actions</Drawer.Footer>\n * </Drawer.Content>\n * </Drawer.Root>\n * ```\n */\n Content: DrawerContent,\n /**\n * # Drawer.Header\n *\n * The header section of the drawer content.\n * Typically contains the title and close button.\n *\n * @example\n * ```tsx\n * <Drawer.Content>\n * <Drawer.Header>\n * <Drawer.Title>Drawer Title</Drawer.Title>\n * <Drawer.CloseTrigger />\n * </Drawer.Header>\n * <Drawer.Body>...</Drawer.Body>\n * </Drawer.Content>\n * ```\n */\n Header: DrawerHeader,\n /**\n * # Drawer.Body\n *\n * The main body content section of the drawer.\n * Contains the primary drawer content and handles overflow/scrolling.\n *\n * @example\n * ```tsx\n * <Drawer.Content>\n * <Drawer.Header>...</Drawer.Header>\n * <Drawer.Body>\n * <p>This is the main content of the drawer.</p>\n * </Drawer.Body>\n * <Drawer.Footer>...</Drawer.Footer>\n * </Drawer.Content>\n * ```\n */\n Body: DrawerBody,\n /**\n * # Drawer.Footer\n *\n * The footer section of the drawer, typically containing action buttons.\n * Provides consistent spacing and alignment for drawer actions.\n *\n * @example\n * ```tsx\n * <Drawer.Content>\n * <Drawer.Header>...</Drawer.Header>\n * <Drawer.Body>...</Drawer.Body>\n * <Drawer.Footer>\n * <Button variant=\"outline\">Cancel</Button>\n * <Button>Confirm</Button>\n * </Drawer.Footer>\n * </Drawer.Content>\n * ```\n */\n Footer: DrawerFooter,\n /**\n * # Drawer.Title\n *\n * The accessible title element for the drawer.\n * Provides proper accessibility and screen reader support.\n *\n * @example\n * ```tsx\n * <Drawer.Content>\n * <Drawer.Header>\n * <Drawer.Title>Confirm Action</Drawer.Title>\n * </Drawer.Header>\n * <Drawer.Body>...</Drawer.Body>\n * </Drawer.Content>\n * ```\n */\n Title: DrawerTitle,\n /**\n * # Drawer.CloseTrigger\n *\n * A button that closes the drawer when activated.\n * Displays an IconButton with a close (X) icon by default.\n *\n * The component automatically handles the close behavior,\n * so no additional onPress handler is needed.\n *\n * @example\n * ```tsx\n * <Drawer.Root>\n * <Drawer.Trigger>Open Drawer</Drawer.Trigger>\n * <Drawer.Content>\n * <Drawer.Header>\n * <Drawer.Title>Title</Drawer.Title>\n * <Drawer.CloseTrigger aria-label=\"Close drawer\" />\n * </Drawer.Header>\n * <Drawer.Body>Content</Drawer.Body>\n * </Drawer.Content>\n * </Drawer.Root>\n * ```\n */\n CloseTrigger: DrawerCloseTrigger,\n};\n\n// Internal exports for react-docgen\nexport {\n DrawerRoot as _DrawerRoot,\n DrawerTrigger as _DrawerTrigger,\n DrawerContent as _DrawerContent,\n DrawerHeader as _DrawerHeader,\n DrawerBody as _DrawerBody,\n DrawerFooter as _DrawerFooter,\n DrawerTitle as _DrawerTitle,\n DrawerCloseTrigger as _DrawerCloseTrigger,\n};\n"],"names":["withProvider","withContext","createSlotRecipeContext","drawerSlotRecipe","DrawerRootSlot","DrawerTriggerSlot","DrawerModalOverlaySlot","DrawerModalSlot","DrawerContentSlot","DrawerHeaderSlot","DrawerBodySlot","DrawerFooterSlot","DrawerTitleSlot","DrawerCloseTriggerSlot","DrawerContext","createContext","useDrawerRootContext","context","useContext","DrawerProvider","children","value","jsx","DrawerRoot","props","recipe","useSlotRecipe","recipeProps","isOpen","onOpenChange","defaultOpen","content","hasDrawerTrigger","React","child","displayName","RaDialogTrigger","DrawerTrigger","forwardedRef","asChild","chakra","styleProps","restProps","extractStyleProps","RaButton","DrawerContent","isDismissable","isKeyboardDismissDisabled","shouldCloseOnInteractOutside","modalProps","RaModalOverlay","RaModal","RaDialog","DrawerHeader","DrawerBody","DrawerFooter","DrawerTitle","Heading","messages","defineMessages","DrawerCloseTrigger","ariaLabel","intl","useIntl","IconButton","Close","Drawer"],"mappings":";;;;;;;;;;;;AAMA,MAAM,EAAE,cAAAA,GAAc,aAAAC,EAAA,IAAgB,gBAAAC,EAAwB;AAAA,EAC5D,QAAQC;AACV,CAAC,GAIYC,IAAiB,gBAAAJ;AAAA,EAC5B;AAAA,EACA;AACF,GAIaK,IAAoB,gBAAAJ,EAG/B,UAAU,SAAS,GAIRK,IAAyB,gBAAAL,EAGpC,OAAO,cAAc,GAIVM,IAAkB,gBAAAN,EAG7B,OAAO,OAAO,GAIHO,IAAoB,gBAAAP,EAG/B,OAAO,SAAS,GAILQ,IAAmB,gBAAAR;AAAA,EAC9B;AAAA,EACA;AACF,GAIaS,IAAiB,gBAAAT;AAAA,EAC5B;AAAA,EACA;AACF,GAIaU,IAAmB,gBAAAV;AAAA,EAC9B;AAAA,EACA;AACF,GAIaW,IAAkB,gBAAAX,EAG7B,MAAM,OAAO,GAIFY,IAAyB,gBAAAZ,EAGpC,OAAO,cAAc,GCtEVa,IAAgB,gBAAAC;AAAA,EAC3B;AACF,GAOaC,IAAuB,MAA0B;AAC5D,QAAMC,IAAUC,EAAWJ,CAAa;AACxC,MAAI,CAACG;AACH,UAAM,IAAI,MAAM,kDAAkD;AAEpE,SAAOA;AACT,GAKaE,IAAiB,CAAC;AAAA,EAC7B,U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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAuBpB,MAAM3C;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAeN,SAASc;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAwBT,SAASQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAkBT,QAAQQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAkBR,MAAMC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAmBN,QAAQC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAiBR,OAAOC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAwBP,cAAcI;AAChB;"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";const r=require("react/jsx-runtime"),w=require("react"),T=require("./Dialog-Ye_7tQZU.cjs.js"),g=require("@chakra-ui/react/styled-system"),S=require("./index-DzRjEtIu.cjs.js"),q=require("./Button-DLCecw8f.cjs.js"),P=require("./extract-style-props-BilMyFTD.cjs.js"),j=require("./Modal-DjOIA2BE.cjs.js"),N=require("./heading-DWweWKGQ.cjs.js"),O=require("@commercetools/nimbus-icons"),R=require("react-intl"),B=require("./icon-button-BUmqYcIF.cjs.js"),{withProvider:H,withContext:n}=g.createSlotRecipeContext({recipe:S.drawerSlotRecipe}),I=H("div","root"),M=n("button","trigger"),F=n("div","modalOverlay"),E=n("div","modal"),V=n("div","content"),k=n("header","header"),z=n("div","body"),A=n("footer","footer"),K=n("h2","title"),L=n("div","closeTrigger"),$=w.createContext(void 0),G=()=>{const e=w.useContext($);if(!e)throw new Error("useDrawerContext must be used within Drawer.Root");return e},J=({children:e,value:t})=>r.jsx($,{value:t,children:e}),D=e=>{const t=g.useSlotRecipe({recipe:S.drawerSlotRecipe}),[s]=t.splitVariantProps(e),{children:o,isOpen:a,onOpenChange:i,defaultOpen:u=!1}=e,l=r.jsx(I,{...s,children:o}),f=w.Children.toArray(o).some(c=>{if(w.isValidElement(c)&&typeof c.type=="function"){const d=c.type?.displayName;return d==="DrawerTrigger"||d==="Drawer.Trigger"}return!1});return r.jsx(J,{value:e,children:f?r.jsx(T.$de32f1b87079253c$export$2e1e1122cf0cba88,{isOpen:a,onOpenChange:i,defaultOpen:u,children:l}):l})};D.displayName="Drawer.Root";const p=({ref:e,children:t,asChild:s,...o})=>{if(s)return r.jsx(g.chakra.button,{ref:e,asChild:!0,...o,children:t});const[a,i]=P.extractStyleProps(o);return r.jsx(M,{...a,asChild:!0,children:r.jsx(q.$d2b4bc8c273e7be6$export$353f5b6fc5456de1,{ref:e,...i,children:t})})};p.displayName="Drawer.Trigger";const x=e=>{const{ref:t,children:s,...o}=e,{defaultOpen:a,isDismissable:i,isKeyboardDismissDisabled:u,shouldCloseOnInteractOutside:l,isOpen:f,onOpenChange:c}=G(),d={defaultOpen:a,isDismissable:i,isKeyboardDismissDisabled:u,shouldCloseOnInteractOutside:l,isOpen:f,onOpenChange:c},[v]=P.extractStyleProps(o);return r.jsx(F,{asChild:!0,children:r.jsx(j.$f3f84453ead64de5$export$8948f78d83984c69,{...d,children:r.jsx(E,{asChild:!0,children:r.jsx(j.$f3f84453ead64de5$export$2b77a92f1a5ad772,{children:r.jsx(V,{asChild:!0,...v,children:r.jsx(T.$de32f1b87079253c$export$3ddf2d174ce01153,{ref:t,children:s})})})})})})};x.displayName="Drawer.Content";const h=e=>{const{ref:t,children:s,...o}=e;return r.jsx(k,{ref:t,...o,children:s})};h.displayName="Drawer.Header";const y=e=>{const{ref:t,children:s,...o}=e,a={tabIndex:0};return r.jsx(z,{ref:t,...a,...o,children:s})};y.displayName="Drawer.Body";const C=e=>{const{ref:t,children:s,...o}=e;return r.jsx(A,{ref:t,...o,children:s})};C.displayName="Drawer.Footer";const b=e=>{const{ref:t,children:s,...o}=e;return r.jsx(K,{asChild:!0,...o,children:r.jsx(N.Heading,{ref:t,slot:"title",as:"h2",textStyle:"lg",children:s})})};b.displayName="Drawer.Title";const Q=R.defineMessages({closeTrigger:{id:"Nimbus.Drawer.closeTrigger",description:"aria-label for the default close trigger button",defaultMessage:"Close drawer"}}),m=e=>{const{ref:t,"aria-label":s,...o}=e,a=R.useIntl();return r.jsx(L,{children:r.jsx(B.IconButton,{ref:t,slot:"close",size:"xs",variant:"ghost","aria-label":s||a.formatMessage(Q.closeTrigger),...o,children:r.jsx(O.Close,{})})})};m.displayName="Drawer.CloseTrigger";const U={Root:D,Trigger:p,Content:x,Header:h,Body:y,Footer:C,Title:b,CloseTrigger:m};exports.Drawer=U;exports.DrawerBody=y;exports.DrawerCloseTrigger=m;exports.DrawerContent=x;exports.DrawerFooter=C;exports.DrawerHeader=h;exports.DrawerRoot=D;exports.DrawerTitle=b;exports.DrawerTrigger=p;
|
|
2
|
-
//# sourceMappingURL=drawer-DfJY_5pD.cjs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"drawer-DfJY_5pD.cjs.js","sources":["../../src/components/drawer/drawer.slots.tsx","../../src/components/drawer/components/drawer.context.tsx","../../src/components/drawer/components/drawer.root.tsx","../../src/components/drawer/components/drawer.trigger.tsx","../../src/components/drawer/components/drawer.content.tsx","../../src/components/drawer/components/drawer.header.tsx","../../src/components/drawer/components/drawer.body.tsx","../../src/components/drawer/components/drawer.footer.tsx","../../src/components/drawer/components/drawer.title.tsx","../../src/components/drawer/drawer.i18n.ts","../../src/components/drawer/components/drawer.close-trigger.tsx","../../src/components/drawer/drawer.tsx"],"sourcesContent":["import {\n createSlotRecipeContext,\n type HTMLChakraProps,\n} from \"@chakra-ui/react/styled-system\";\nimport { drawerSlotRecipe } from \"./drawer.recipe\";\n\nconst { withProvider, withContext } = createSlotRecipeContext({\n recipe: drawerSlotRecipe,\n});\n\n// Root slot - provides recipe context + config to all child components\nexport type DrawerRootSlotProps = HTMLChakraProps<\"div\">;\nexport const DrawerRootSlot = withProvider<HTMLDivElement, DrawerRootSlotProps>(\n \"div\",\n \"root\"\n);\n\n// Trigger slot - button that opens the drawer\nexport type DrawerTriggerSlotProps = HTMLChakraProps<\"button\">;\nexport const DrawerTriggerSlot = withContext<\n HTMLButtonElement,\n DrawerTriggerSlotProps\n>(\"button\", \"trigger\");\n\n// Backdrop slot - overlay displayed behind the drawer\nexport type DrawerModalOverlaySlotProps = HTMLChakraProps<\"div\">;\nexport const DrawerModalOverlaySlot = withContext<\n HTMLDivElement,\n DrawerModalOverlaySlotProps\n>(\"div\", \"modalOverlay\");\n\n// modal slot - positions the drawer content\nexport type DrawerModalSlotProps = HTMLChakraProps<\"div\">;\nexport const DrawerModalSlot = withContext<\n HTMLDivElement,\n DrawerModalSlotProps\n>(\"div\", \"modal\");\n\n// Content slot - main drawer container\nexport type DrawerContentSlotProps = HTMLChakraProps<\"div\">;\nexport const DrawerContentSlot = withContext<\n HTMLDivElement,\n DrawerContentSlotProps\n>(\"div\", \"content\");\n\n// Header slot - drawer header section\nexport type DrawerHeaderSlotProps = HTMLChakraProps<\"header\">;\nexport const DrawerHeaderSlot = withContext<HTMLElement, DrawerHeaderSlotProps>(\n \"header\",\n \"header\"\n);\n\n// Body slot - drawer body content\nexport type DrawerBodySlotProps = HTMLChakraProps<\"div\">;\nexport const DrawerBodySlot = withContext<HTMLDivElement, DrawerBodySlotProps>(\n \"div\",\n \"body\"\n);\n\n// Footer slot - drawer footer section with actions\nexport type DrawerFooterSlotProps = HTMLChakraProps<\"footer\">;\nexport const DrawerFooterSlot = withContext<HTMLElement, DrawerFooterSlotProps>(\n \"footer\",\n \"footer\"\n);\n\n// Title slot - accessible drawer title\nexport type DrawerTitleSlotProps = HTMLChakraProps<\"h2\">;\nexport const DrawerTitleSlot = withContext<\n HTMLHeadingElement,\n DrawerTitleSlotProps\n>(\"h2\", \"title\");\n\n// Close trigger slot - div container for positioning close button\nexport type DrawerCloseTriggerSlotProps = HTMLChakraProps<\"div\">;\nexport const DrawerCloseTriggerSlot = withContext<\n HTMLDivElement,\n DrawerCloseTriggerSlotProps\n>(\"div\", \"closeTrigger\");\n","import { createContext, useContext } from \"react\";\nimport type { DrawerRootProps } from \"../drawer.types\";\n\n/**\n * Context value containing drawer configuration passed from Root to child components\n */\nexport type DrawerContextValue = DrawerRootProps;\n\nexport const DrawerContext = createContext<DrawerContextValue | undefined>(\n undefined\n);\n\n/**\n * Hook to access drawer configuration from DrawerContext\n * @returns Drawer configuration from context\n * @throws Error if used outside of Drawer.Root\n */\nexport const useDrawerRootContext = (): DrawerContextValue => {\n const context = useContext(DrawerContext);\n if (!context) {\n throw new Error(\"useDrawerContext must be used within Drawer.Root\");\n }\n return context;\n};\n\n/**\n * Provider component that passes drawer configuration down to child components\n */\nexport const DrawerProvider = ({\n children,\n value,\n}: {\n children: React.ReactNode;\n value: DrawerContextValue;\n}) => {\n return <DrawerContext value={value}>{children}</DrawerContext>;\n};\n","import React from \"react\";\nimport { DialogTrigger as RaDialogTrigger } from \"react-aria-components\";\nimport { useSlotRecipe } from \"@chakra-ui/react/styled-system\";\nimport { DrawerRootSlot } from \"../drawer.slots\";\nimport type { DrawerRootProps } from \"../drawer.types\";\nimport { DrawerProvider } from \"./drawer.context\";\nimport { drawerSlotRecipe } from \"../drawer.recipe\";\n\nexport const DrawerRoot = (props: DrawerRootProps) => {\n const recipe = useSlotRecipe({ recipe: drawerSlotRecipe });\n // Extract recipe props\n const [recipeProps] = recipe.splitVariantProps(props);\n // Extract props that are usable on RaDialogTrigger\n const { children, isOpen, onOpenChange, defaultOpen = false } = props;\n\n const content = <DrawerRootSlot {...recipeProps}>{children}</DrawerRootSlot>;\n\n // Check if any child is a Drawer.Trigger component\n // React Aria's DialogTrigger needs a pressable child, so we only use it when there's a trigger\n const hasDrawerTrigger = React.Children.toArray(children).some((child) => {\n if (React.isValidElement(child) && typeof child.type === \"function\") {\n const displayName = (\n child.type as React.ComponentType & { displayName?: string }\n )?.displayName;\n return (\n displayName === \"DrawerTrigger\" || displayName === \"Drawer.Trigger\"\n );\n }\n return false;\n });\n\n // Share all props (config + variant props) with the Drawer subcomponents\n return (\n <DrawerProvider value={props}>\n {hasDrawerTrigger ? (\n // When there's a Drawer.Trigger, use DialogTrigger for React Aria integration\n <RaDialogTrigger\n isOpen={isOpen}\n onOpenChange={onOpenChange}\n defaultOpen={defaultOpen}\n >\n {content}\n </RaDialogTrigger>\n ) : (\n // When no Drawer.Trigger, skip DialogTrigger to avoid the warning\n content\n )}\n </DrawerProvider>\n );\n};\n\nDrawerRoot.displayName = \"Drawer.Root\";\n","import { Button as RaButton } from \"react-aria-components\";\nimport { DrawerTriggerSlot } from \"../drawer.slots\";\nimport type { DrawerTriggerProps } from \"../drawer.types\";\nimport { extractStyleProps } from \"@/utils\";\nimport { chakra } from \"@chakra-ui/react/styled-system\";\n\n/**\n * Drawer.Trigger - The trigger element that opens the drawer when activated\n *\n * @supportsStyleProps\n */\nexport const DrawerTrigger = ({\n ref: forwardedRef,\n children,\n asChild,\n ...props\n}: DrawerTriggerProps) => {\n // If asChild is true, wrap children directly in RaButton with asChild\n if (asChild) {\n return (\n <chakra.button ref={forwardedRef} asChild {...props}>\n {children}\n </chakra.button>\n );\n }\n\n const [styleProps, restProps] = extractStyleProps(props);\n\n // Otherwise, wrap with both DrawerTriggerSlot and RaButton\n // Only pass React Aria compatible props to avoid type conflicts\n return (\n <DrawerTriggerSlot {...styleProps} asChild>\n <RaButton ref={forwardedRef} {...restProps}>\n {children}\n </RaButton>\n </DrawerTriggerSlot>\n );\n};\n\nDrawerTrigger.displayName = \"Drawer.Trigger\";\n","import {\n Modal as RaModal,\n ModalOverlay as RaModalOverlay,\n Dialog as RaDialog,\n} from \"react-aria-components\";\nimport {\n DrawerModalOverlaySlot,\n DrawerModalSlot,\n DrawerContentSlot,\n} from \"../drawer.slots\";\nimport type { DrawerContentProps } from \"../drawer.types\";\nimport { extractStyleProps } from \"@/utils\";\nimport { useDrawerRootContext } from \"./drawer.context\";\n\n/**\n * Drawer.Content - The main drawer content container\n *\n * @supportsStyleProps\n */\nexport const DrawerContent = (props: DrawerContentProps) => {\n const { ref: forwardedRef, children, ...restProps } = props;\n\n // Get recipe configuration from context instead of props\n const {\n defaultOpen,\n isDismissable,\n isKeyboardDismissDisabled,\n shouldCloseOnInteractOutside,\n isOpen,\n onOpenChange,\n } = useDrawerRootContext();\n\n const modalProps = {\n defaultOpen,\n isDismissable,\n isKeyboardDismissDisabled,\n shouldCloseOnInteractOutside,\n isOpen,\n onOpenChange,\n };\n\n const [styleProps] = extractStyleProps(restProps);\n\n return (\n <DrawerModalOverlaySlot asChild>\n <RaModalOverlay {...modalProps}>\n <DrawerModalSlot asChild>\n <RaModal>\n <DrawerContentSlot asChild {...styleProps}>\n <RaDialog ref={forwardedRef}>{children}</RaDialog>\n </DrawerContentSlot>\n </RaModal>\n </DrawerModalSlot>\n </RaModalOverlay>\n </DrawerModalOverlaySlot>\n );\n};\n\nDrawerContent.displayName = \"Drawer.Content\";\n","import { DrawerHeaderSlot } from \"../drawer.slots\";\nimport type { DrawerHeaderProps } from \"../drawer.types\";\n\n/**\n * Drawer.Header - The header section of the drawer\n *\n * @supportsStyleProps\n */\nexport const DrawerHeader = (props: DrawerHeaderProps) => {\n const { ref: forwardedRef, children, ...restProps } = props;\n\n return (\n <DrawerHeaderSlot ref={forwardedRef} {...restProps}>\n {children}\n </DrawerHeaderSlot>\n );\n};\n\nDrawerHeader.displayName = \"Drawer.Header\";\n","import { DrawerBodySlot } from \"../drawer.slots\";\nimport type { DrawerBodyProps } from \"../drawer.types\";\n\n/**\n * Drawer.Body - The main body content section of the drawer\n *\n * @supportsStyleProps\n */\nexport const DrawerBody = (props: DrawerBodyProps) => {\n const { ref: forwardedRef, children, ...restProps } = props;\n\n const defaultProps = {\n /**\n * Set tabIndex to 0 to allow the body to receive focus,\n * effectively enabling scrolling via keyboard arrow keys.\n */\n tabIndex: 0,\n };\n\n return (\n <DrawerBodySlot ref={forwardedRef} {...defaultProps} {...restProps}>\n {children}\n </DrawerBodySlot>\n );\n};\n\nDrawerBody.displayName = \"Drawer.Body\";\n","import { DrawerFooterSlot } from \"../drawer.slots\";\nimport type { DrawerFooterProps } from \"../drawer.types\";\n\n/**\n * Drawer.Footer - The footer section of the drawer\n *\n * @supportsStyleProps\n */\nexport const DrawerFooter = (props: DrawerFooterProps) => {\n const { ref: forwardedRef, children, ...restProps } = props;\n\n return (\n <DrawerFooterSlot ref={forwardedRef} {...restProps}>\n {children}\n </DrawerFooterSlot>\n );\n};\n\nDrawerFooter.displayName = \"Drawer.Footer\";\n","import { DrawerTitleSlot } from \"../drawer.slots\";\nimport type { DrawerTitleProps } from \"../drawer.types\";\nimport { Heading } from \"@/components\";\n\n/**\n * Drawer.Title - The accessible title element for the drawer\n *\n * @supportsStyleProps\n */\nexport const DrawerTitle = (props: DrawerTitleProps) => {\n const { ref: forwardedRef, children, ...restProps } = props;\n\n return (\n <DrawerTitleSlot asChild {...restProps}>\n <Heading ref={forwardedRef} slot=\"title\" as=\"h2\" textStyle=\"lg\">\n {children}\n </Heading>\n </DrawerTitleSlot>\n );\n};\n\nDrawerTitle.displayName = \"Drawer.Title\";\n","import { defineMessages } from \"react-intl\";\n\nexport const messages = defineMessages({\n closeTrigger: {\n id: \"Nimbus.Drawer.closeTrigger\",\n description: \"aria-label for the default close trigger button\",\n defaultMessage: \"Close drawer\",\n },\n});\n","import { Close } from \"@commercetools/nimbus-icons\";\nimport { DrawerCloseTriggerSlot } from \"../drawer.slots\";\nimport type { DrawerCloseTriggerProps } from \"../drawer.types\";\nimport { IconButton } from \"@/components\";\nimport { messages } from \"../drawer.i18n\";\nimport { useIntl } from \"react-intl\";\n\n/**\n * Drawer.CloseTrigger - A button that closes the drawer when activated\n *\n * @supportsStyleProps\n */\nexport const DrawerCloseTrigger = (props: DrawerCloseTriggerProps) => {\n const { ref: forwardedRef, \"aria-label\": ariaLabel, ...restProps } = props;\n const intl = useIntl();\n\n return (\n <DrawerCloseTriggerSlot>\n <IconButton\n ref={forwardedRef}\n slot=\"close\"\n size=\"xs\"\n variant=\"ghost\"\n aria-label={ariaLabel || intl.formatMessage(messages.closeTrigger)}\n {...restProps}\n >\n <Close />\n </IconButton>\n </DrawerCloseTriggerSlot>\n );\n};\n\nDrawerCloseTrigger.displayName = \"Drawer.CloseTrigger\";\n","import { DrawerRoot } from \"./components/drawer.root\";\nimport { DrawerTrigger } from \"./components/drawer.trigger\";\nimport { DrawerContent } from \"./components/drawer.content\";\nimport { DrawerHeader } from \"./components/drawer.header\";\nimport { DrawerBody } from \"./components/drawer.body\";\nimport { DrawerFooter } from \"./components/drawer.footer\";\nimport { DrawerTitle } from \"./components/drawer.title\";\nimport { DrawerCloseTrigger } from \"./components/drawer.close-trigger\";\n\n/**\n * Drawer\n * ============================================================\n * A foundational drawer component for overlays that require user attention.\n * Built for accessibility and WCAG 2.1 AA compliance.\n *\n * Features:\n * - Controlled and uncontrolled modes\n * - Customizable placement, size, and animations\n * - Focus management and keyboard navigation\n * - Click-outside and Escape key dismissal\n * - Portal rendering support\n * - Backdrop overlay with animations\n *\n * @example\n * ```tsx\n * <Drawer.Root>\n * <Drawer.Trigger>Open Drawer</Drawer.Trigger>\n * <Drawer.Content size=\"md\" placement=\"center\">\n * <Drawer.Header>\n * <Drawer.Title>Drawer Title</Drawer.Title>\n * <Drawer.CloseTrigger>×</Drawer.CloseTrigger>\n * </Drawer.Header>\n * <Drawer.Body>\n * Drawer content goes here\n * </Drawer.Body>\n * <Drawer.Footer>\n * <button>Cancel</button>\n * <button>Save</button>\n * </Drawer.Footer>\n * </Drawer.Content>\n * </Drawer.Root>\n * ```\n * @see https://nimbus-documentation.vercel.app/components/feedback/drawer\n */\nexport const Drawer = {\n /**\n * # Drawer.Root\n *\n * The root component that provides context and state management for the drawer.\n * Handles accessibility and keyboard interaction.\n *\n * This component must wrap all drawer parts (Trigger, Content, etc.) and provides\n * the drawer open/close state and variant styling context.\n *\n * @example\n * ```tsx\n * <Drawer.Root>\n * <Drawer.Trigger>Open Drawer</Drawer.Trigger>\n * <Drawer.Content>\n * <Drawer.Header>\n * <Drawer.Title>Drawer Title</Drawer.Title>\n * </Drawer.Header>\n * <Drawer.Body>Drawer content</Drawer.Body>\n * </Drawer.Content>\n * </Drawer.Root>\n * ```\n */\n Root: DrawerRoot,\n /**\n * # Drawer.Trigger\n *\n * The trigger element that opens the drawer when activated.\n * Provides accessibility and keyboard support.\n *\n * @example\n * ```tsx\n * <Drawer.Root>\n * <Drawer.Trigger>Open Drawer</Drawer.Trigger>\n * <Drawer.Content>...</Drawer.Content>\n * </Drawer.Root>\n * ```\n */\n Trigger: DrawerTrigger,\n /**\n * # Drawer.Content\n *\n * The main drawer content container that handles portalling, backdrop,\n * positioning, and content styling.\n *\n * This component creates the drawer overlay, positions the content, and provides\n * accessibility features like focus management and keyboard dismissal.\n *\n * @example\n * ```tsx\n * <Drawer.Root>\n * <Drawer.Trigger>Open Drawer</Drawer.Trigger>\n * <Drawer.Content size=\"md\" placement=\"center\">\n * <Drawer.Header>\n * <Drawer.Title>Title</Drawer.Title>\n * </Drawer.Header>\n * <Drawer.Body>Content</Drawer.Body>\n * <Drawer.Footer>Actions</Drawer.Footer>\n * </Drawer.Content>\n * </Drawer.Root>\n * ```\n */\n Content: DrawerContent,\n /**\n * # Drawer.Header\n *\n * The header section of the drawer content.\n * Typically contains the title and close button.\n *\n * @example\n * ```tsx\n * <Drawer.Content>\n * <Drawer.Header>\n * <Drawer.Title>Drawer Title</Drawer.Title>\n * <Drawer.CloseTrigger />\n * </Drawer.Header>\n * <Drawer.Body>...</Drawer.Body>\n * </Drawer.Content>\n * ```\n */\n Header: DrawerHeader,\n /**\n * # Drawer.Body\n *\n * The main body content section of the drawer.\n * Contains the primary drawer content and handles overflow/scrolling.\n *\n * @example\n * ```tsx\n * <Drawer.Content>\n * <Drawer.Header>...</Drawer.Header>\n * <Drawer.Body>\n * <p>This is the main content of the drawer.</p>\n * </Drawer.Body>\n * <Drawer.Footer>...</Drawer.Footer>\n * </Drawer.Content>\n * ```\n */\n Body: DrawerBody,\n /**\n * # Drawer.Footer\n *\n * The footer section of the drawer, typically containing action buttons.\n * Provides consistent spacing and alignment for drawer actions.\n *\n * @example\n * ```tsx\n * <Drawer.Content>\n * <Drawer.Header>...</Drawer.Header>\n * <Drawer.Body>...</Drawer.Body>\n * <Drawer.Footer>\n * <Button variant=\"outline\">Cancel</Button>\n * <Button>Confirm</Button>\n * </Drawer.Footer>\n * </Drawer.Content>\n * ```\n */\n Footer: DrawerFooter,\n /**\n * # Drawer.Title\n *\n * The accessible title element for the drawer.\n * Provides proper accessibility and screen reader support.\n *\n * @example\n * ```tsx\n * <Drawer.Content>\n * <Drawer.Header>\n * <Drawer.Title>Confirm Action</Drawer.Title>\n * </Drawer.Header>\n * <Drawer.Body>...</Drawer.Body>\n * </Drawer.Content>\n * ```\n */\n Title: DrawerTitle,\n /**\n * # Drawer.CloseTrigger\n *\n * A button that closes the drawer when activated.\n * Displays an IconButton with a close (X) icon by default.\n *\n * The component automatically handles the close behavior,\n * so no additional onPress handler is needed.\n *\n * @example\n * ```tsx\n * <Drawer.Root>\n * <Drawer.Trigger>Open Drawer</Drawer.Trigger>\n * <Drawer.Content>\n * <Drawer.Header>\n * <Drawer.Title>Title</Drawer.Title>\n * <Drawer.CloseTrigger aria-label=\"Close drawer\" />\n * </Drawer.Header>\n * <Drawer.Body>Content</Drawer.Body>\n * </Drawer.Content>\n * </Drawer.Root>\n * ```\n */\n CloseTrigger: DrawerCloseTrigger,\n};\n\n// Internal exports for react-docgen\nexport {\n DrawerRoot as _DrawerRoot,\n DrawerTrigger as _DrawerTrigger,\n DrawerContent as _DrawerContent,\n DrawerHeader as _DrawerHeader,\n DrawerBody as _DrawerBody,\n DrawerFooter as _DrawerFooter,\n DrawerTitle as _DrawerTitle,\n DrawerCloseTrigger as _DrawerCloseTrigger,\n};\n"],"names":["withProvider","withContext","createSlotRecipeContext","drawerSlotRecipe","DrawerRootSlot","DrawerTriggerSlot","DrawerModalOverlaySlot","DrawerModalSlot","DrawerContentSlot","DrawerHeaderSlot","DrawerBodySlot","DrawerFooterSlot","DrawerTitleSlot","DrawerCloseTriggerSlot","DrawerContext","createContext","useDrawerRootContext","context","useContext","DrawerProvider","children","value","jsx","DrawerRoot","props","recipe","useSlotRecipe","recipeProps","isOpen","onOpenChange","defaultOpen","content","hasDrawerTrigger","React","child","displayName","RaDialogTrigger","DrawerTrigger","forwardedRef","asChild","chakra","styleProps","restProps","extractStyleProps","RaButton","DrawerContent","isDismissable","isKeyboardDismissDisabled","shouldCloseOnInteractOutside","modalProps","RaModalOverlay","RaModal","RaDialog","DrawerHeader","DrawerBody","defaultProps","DrawerFooter","DrawerTitle","Heading","messages","defineMessages","DrawerCloseTrigger","ariaLabel","intl","useIntl","IconButton","Close","Drawer"],"mappings":"6cAMM,CAAE,aAAAA,EAAc,YAAAC,CAAA,EAAgBC,0BAAwB,CAC5D,OAAQC,EAAAA,gBACV,CAAC,EAIYC,EAAiBJ,EAC5B,MACA,MACF,EAIaK,EAAoBJ,EAG/B,SAAU,SAAS,EAIRK,EAAyBL,EAGpC,MAAO,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,YAAY,EAChE,GAAGjB,EAEJ,eAACwB,EAAAA,MAAA,CAAA,CAAM,CAAA,CAAA,EAEX,CAEJ,EAEAL,EAAmB,YAAc,sBCY1B,MAAMM,EAAS,CAuBpB,KAAM5C,EAeN,QAASc,EAwBT,QAASQ,EAkBT,OAAQQ,EAkBR,KAAMC,EAmBN,OAAQE,EAiBR,MAAOC,EAwBP,aAAcI,CAChB"}
|
|
@@ -1,213 +0,0 @@
|
|
|
1
|
-
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
-
import { defineMessages as T, FormattedMessage as a } from "react-intl";
|
|
3
|
-
import { createSlotRecipeContext as h } from "@chakra-ui/react";
|
|
4
|
-
const { withProvider: O, withContext: I } = /* @__PURE__ */ h({
|
|
5
|
-
key: "fieldErrors"
|
|
6
|
-
}), A = /* @__PURE__ */ O("div", "root"), u = /* @__PURE__ */ I("div", "message"), l = /* @__PURE__ */ T({
|
|
7
|
-
// Basic validation
|
|
8
|
-
missingRequiredField: {
|
|
9
|
-
id: "Nimbus.FieldErrors.missingRequiredField",
|
|
10
|
-
description: "Error message for missing required value",
|
|
11
|
-
defaultMessage: "This field is required. Provide a value."
|
|
12
|
-
},
|
|
13
|
-
invalidValue: {
|
|
14
|
-
id: "Nimbus.FieldErrors.invalidValue",
|
|
15
|
-
description: "Error message for invalid value or format",
|
|
16
|
-
defaultMessage: "The provided value is invalid."
|
|
17
|
-
},
|
|
18
|
-
emptyValue: {
|
|
19
|
-
id: "Nimbus.FieldErrors.emptyValue",
|
|
20
|
-
description: "Error message for empty value when content is required",
|
|
21
|
-
defaultMessage: "This field cannot be empty."
|
|
22
|
-
},
|
|
23
|
-
// Length validation
|
|
24
|
-
valueTooShort: {
|
|
25
|
-
id: "Nimbus.FieldErrors.valueTooShort",
|
|
26
|
-
description: "Error message for minimum length validation",
|
|
27
|
-
defaultMessage: "This value is too short."
|
|
28
|
-
},
|
|
29
|
-
valueTooLong: {
|
|
30
|
-
id: "Nimbus.FieldErrors.valueTooLong",
|
|
31
|
-
description: "Error message for maximum length validation",
|
|
32
|
-
defaultMessage: "This value is too long."
|
|
33
|
-
},
|
|
34
|
-
// Format validation
|
|
35
|
-
invalidFormat: {
|
|
36
|
-
id: "Nimbus.FieldErrors.invalidFormat",
|
|
37
|
-
description: "Error message for format validation",
|
|
38
|
-
defaultMessage: "Please enter a valid format."
|
|
39
|
-
},
|
|
40
|
-
duplicateValue: {
|
|
41
|
-
id: "Nimbus.FieldErrors.duplicateValue",
|
|
42
|
-
description: "Error message for duplicate value validation",
|
|
43
|
-
defaultMessage: "This value is already in use. It must be unique."
|
|
44
|
-
},
|
|
45
|
-
// Numeric validation
|
|
46
|
-
invalidNegativeNumber: {
|
|
47
|
-
id: "Nimbus.FieldErrors.invalidNegativeNumber",
|
|
48
|
-
description: "Error message when negative number is used",
|
|
49
|
-
defaultMessage: "Negative number is not supported."
|
|
50
|
-
},
|
|
51
|
-
invalidFractionalNumber: {
|
|
52
|
-
id: "Nimbus.FieldErrors.invalidFractionalNumber",
|
|
53
|
-
description: "Error message when fractional number is used",
|
|
54
|
-
defaultMessage: "A whole number is required."
|
|
55
|
-
},
|
|
56
|
-
valueBelowMinimum: {
|
|
57
|
-
id: "Nimbus.FieldErrors.valueBelowMinimum",
|
|
58
|
-
description: "Error message for values below minimum threshold",
|
|
59
|
-
defaultMessage: "Value must be greater than or equal to the minimum."
|
|
60
|
-
},
|
|
61
|
-
valueAboveMaximum: {
|
|
62
|
-
id: "Nimbus.FieldErrors.valueAboveMaximum",
|
|
63
|
-
description: "Error message for values above maximum threshold",
|
|
64
|
-
defaultMessage: "Value must be less than or equal to the maximum."
|
|
65
|
-
},
|
|
66
|
-
valueOutOfRange: {
|
|
67
|
-
id: "Nimbus.FieldErrors.valueOutOfRange",
|
|
68
|
-
description: "Error message for values outside acceptable range",
|
|
69
|
-
defaultMessage: "Value must be within the acceptable range."
|
|
70
|
-
},
|
|
71
|
-
// Server/async validation
|
|
72
|
-
invalidFromServer: {
|
|
73
|
-
id: "Nimbus.FieldErrors.invalidFromServer",
|
|
74
|
-
description: "Error message for server-side validation errors",
|
|
75
|
-
defaultMessage: "Server validation failed. Please check your input."
|
|
76
|
-
},
|
|
77
|
-
resourceNotFound: {
|
|
78
|
-
id: "Nimbus.FieldErrors.resourceNotFound",
|
|
79
|
-
description: "Error message when a resource is not found",
|
|
80
|
-
defaultMessage: "The requested resource was not found."
|
|
81
|
-
},
|
|
82
|
-
valueBlocked: {
|
|
83
|
-
id: "Nimbus.FieldErrors.valueBlocked",
|
|
84
|
-
description: "Error message for blocked or restricted values",
|
|
85
|
-
defaultMessage: "This value is not allowed."
|
|
86
|
-
}
|
|
87
|
-
}), e = {
|
|
88
|
-
MISSING: "missing",
|
|
89
|
-
INVALID: "invalid",
|
|
90
|
-
EMPTY: "empty",
|
|
91
|
-
MIN_LENGTH: "min",
|
|
92
|
-
MAX_LENGTH: "max",
|
|
93
|
-
FORMAT: "format",
|
|
94
|
-
DUPLICATE: "duplicate",
|
|
95
|
-
NEGATIVE: "negative",
|
|
96
|
-
FRACTIONS: "fractions",
|
|
97
|
-
BELOW_MIN: "belowMin",
|
|
98
|
-
ABOVE_MAX: "aboveMax",
|
|
99
|
-
OUT_OF_RANGE: "outOfRange",
|
|
100
|
-
INVALID_FROM_SERVER: "invalidFromServer",
|
|
101
|
-
NOT_FOUND: "notFound",
|
|
102
|
-
BLOCKED: "blocked"
|
|
103
|
-
}, R = (t) => typeof t == "object", N = (t, r) => {
|
|
104
|
-
if (!r) return null;
|
|
105
|
-
switch (t) {
|
|
106
|
-
case e.MISSING:
|
|
107
|
-
return r.missing || null;
|
|
108
|
-
case e.INVALID:
|
|
109
|
-
return r.invalid || null;
|
|
110
|
-
case e.EMPTY:
|
|
111
|
-
return r.empty || null;
|
|
112
|
-
case e.MIN_LENGTH:
|
|
113
|
-
return r.min || null;
|
|
114
|
-
case e.MAX_LENGTH:
|
|
115
|
-
return r.max || null;
|
|
116
|
-
case e.FORMAT:
|
|
117
|
-
return r.format || null;
|
|
118
|
-
case e.DUPLICATE:
|
|
119
|
-
return r.duplicate || null;
|
|
120
|
-
case e.NEGATIVE:
|
|
121
|
-
return r.negative || null;
|
|
122
|
-
case e.FRACTIONS:
|
|
123
|
-
return r.fractions || null;
|
|
124
|
-
case e.BELOW_MIN:
|
|
125
|
-
return r.belowMin || null;
|
|
126
|
-
case e.ABOVE_MAX:
|
|
127
|
-
return r.aboveMax || null;
|
|
128
|
-
case e.OUT_OF_RANGE:
|
|
129
|
-
return r.outOfRange || null;
|
|
130
|
-
case e.INVALID_FROM_SERVER:
|
|
131
|
-
return r.invalidFromServer || null;
|
|
132
|
-
case e.NOT_FOUND:
|
|
133
|
-
return r.notFound || null;
|
|
134
|
-
case e.BLOCKED:
|
|
135
|
-
return r.blocked || null;
|
|
136
|
-
default:
|
|
137
|
-
return null;
|
|
138
|
-
}
|
|
139
|
-
}, f = (t) => {
|
|
140
|
-
switch (t) {
|
|
141
|
-
// Basic validation
|
|
142
|
-
case e.MISSING:
|
|
143
|
-
return /* @__PURE__ */ i(a, { ...l.missingRequiredField });
|
|
144
|
-
case e.INVALID:
|
|
145
|
-
return /* @__PURE__ */ i(a, { ...l.invalidValue });
|
|
146
|
-
case e.EMPTY:
|
|
147
|
-
return /* @__PURE__ */ i(a, { ...l.emptyValue });
|
|
148
|
-
// Length validation
|
|
149
|
-
case e.MIN_LENGTH:
|
|
150
|
-
return /* @__PURE__ */ i(a, { ...l.valueTooShort });
|
|
151
|
-
case e.MAX_LENGTH:
|
|
152
|
-
return /* @__PURE__ */ i(a, { ...l.valueTooLong });
|
|
153
|
-
// Format validation
|
|
154
|
-
case e.FORMAT:
|
|
155
|
-
return /* @__PURE__ */ i(a, { ...l.invalidFormat });
|
|
156
|
-
case e.DUPLICATE:
|
|
157
|
-
return /* @__PURE__ */ i(a, { ...l.duplicateValue });
|
|
158
|
-
// Numeric validation
|
|
159
|
-
case e.NEGATIVE:
|
|
160
|
-
return /* @__PURE__ */ i(a, { ...l.invalidNegativeNumber });
|
|
161
|
-
case e.FRACTIONS:
|
|
162
|
-
return /* @__PURE__ */ i(a, { ...l.invalidFractionalNumber });
|
|
163
|
-
case e.BELOW_MIN:
|
|
164
|
-
return /* @__PURE__ */ i(a, { ...l.valueBelowMinimum });
|
|
165
|
-
case e.ABOVE_MAX:
|
|
166
|
-
return /* @__PURE__ */ i(a, { ...l.valueAboveMaximum });
|
|
167
|
-
case e.OUT_OF_RANGE:
|
|
168
|
-
return /* @__PURE__ */ i(a, { ...l.valueOutOfRange });
|
|
169
|
-
// Server/async validation
|
|
170
|
-
case e.INVALID_FROM_SERVER:
|
|
171
|
-
return /* @__PURE__ */ i(a, { ...l.invalidFromServer });
|
|
172
|
-
case e.NOT_FOUND:
|
|
173
|
-
return /* @__PURE__ */ i(a, { ...l.resourceNotFound });
|
|
174
|
-
case e.BLOCKED:
|
|
175
|
-
return /* @__PURE__ */ i(a, { ...l.valueBlocked });
|
|
176
|
-
default:
|
|
177
|
-
return null;
|
|
178
|
-
}
|
|
179
|
-
}, o = ({
|
|
180
|
-
id: t,
|
|
181
|
-
errors: r,
|
|
182
|
-
isVisible: g = !0,
|
|
183
|
-
// Default to true for backwards compatibility, but will be auto-handled in future
|
|
184
|
-
renderError: F,
|
|
185
|
-
renderDefaultError: b,
|
|
186
|
-
customMessages: p,
|
|
187
|
-
...M
|
|
188
|
-
}) => {
|
|
189
|
-
if (!g || !r || !R(r)) return null;
|
|
190
|
-
const s = Object.entries(r).filter(([, n]) => n);
|
|
191
|
-
return s.length === 0 ? null : /* @__PURE__ */ i(A, { id: t, role: "alert", ...M, children: s.map(([n, d]) => {
|
|
192
|
-
const m = F?.(n, d);
|
|
193
|
-
if (m)
|
|
194
|
-
return /* @__PURE__ */ i(u, { children: m }, n);
|
|
195
|
-
const c = b?.(n, d);
|
|
196
|
-
if (c)
|
|
197
|
-
return /* @__PURE__ */ i(u, { children: c }, n);
|
|
198
|
-
const v = N(n, p);
|
|
199
|
-
if (v)
|
|
200
|
-
return /* @__PURE__ */ i(u, { children: v }, n);
|
|
201
|
-
const E = f(n);
|
|
202
|
-
return E ? /* @__PURE__ */ i(u, { children: E }, n) : null;
|
|
203
|
-
}) });
|
|
204
|
-
};
|
|
205
|
-
o.displayName = "FieldErrors";
|
|
206
|
-
o.errorTypes = e;
|
|
207
|
-
o.getBuiltInMessage = f;
|
|
208
|
-
o.getCustomMessage = N;
|
|
209
|
-
export {
|
|
210
|
-
o as F,
|
|
211
|
-
e as a
|
|
212
|
-
};
|
|
213
|
-
//# sourceMappingURL=field-errors-ClQprmQz.es.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"field-errors-ClQprmQz.es.js","sources":["../../src/components/field-errors/field-errors.slots.tsx","../../src/components/field-errors/field-errors.i18n.ts","../../src/components/field-errors/field-errors.types.ts","../../src/components/field-errors/field-errors.tsx"],"sourcesContent":["import { createSlotRecipeContext } from \"@chakra-ui/react\";\nimport type { SlotComponent } from \"../../type-utils/slot-types\";\nimport type {\n FieldErrorsMessageSlotProps,\n FieldErrorsRootSlotProps,\n} from \"./field-errors.types\";\n\nconst { withProvider, withContext } = createSlotRecipeContext({\n key: \"fieldErrors\",\n});\n\nexport const FieldErrorsRoot: SlotComponent<\n HTMLDivElement,\n FieldErrorsRootSlotProps\n> = withProvider<HTMLDivElement, FieldErrorsRootSlotProps>(\"div\", \"root\");\n\nexport const FieldErrorsMessage: SlotComponent<\n HTMLDivElement,\n FieldErrorsMessageSlotProps\n> = withContext<HTMLDivElement, FieldErrorsMessageSlotProps>(\"div\", \"message\");\n","import { defineMessages } from \"react-intl\";\n\nexport const messages = defineMessages({\n // Basic validation\n missingRequiredField: {\n id: \"Nimbus.FieldErrors.missingRequiredField\",\n description: \"Error message for missing required value\",\n defaultMessage: \"This field is required. Provide a value.\",\n },\n invalidValue: {\n id: \"Nimbus.FieldErrors.invalidValue\",\n description: \"Error message for invalid value or format\",\n defaultMessage: \"The provided value is invalid.\",\n },\n emptyValue: {\n id: \"Nimbus.FieldErrors.emptyValue\",\n description: \"Error message for empty value when content is required\",\n defaultMessage: \"This field cannot be empty.\",\n },\n\n // Length validation\n valueTooShort: {\n id: \"Nimbus.FieldErrors.valueTooShort\",\n description: \"Error message for minimum length validation\",\n defaultMessage: \"This value is too short.\",\n },\n valueTooLong: {\n id: \"Nimbus.FieldErrors.valueTooLong\",\n description: \"Error message for maximum length validation\",\n defaultMessage: \"This value is too long.\",\n },\n\n // Format validation\n invalidFormat: {\n id: \"Nimbus.FieldErrors.invalidFormat\",\n description: \"Error message for format validation\",\n defaultMessage: \"Please enter a valid format.\",\n },\n duplicateValue: {\n id: \"Nimbus.FieldErrors.duplicateValue\",\n description: \"Error message for duplicate value validation\",\n defaultMessage: \"This value is already in use. It must be unique.\",\n },\n\n // Numeric validation\n invalidNegativeNumber: {\n id: \"Nimbus.FieldErrors.invalidNegativeNumber\",\n description: \"Error message when negative number is used\",\n defaultMessage: \"Negative number is not supported.\",\n },\n invalidFractionalNumber: {\n id: \"Nimbus.FieldErrors.invalidFractionalNumber\",\n description: \"Error message when fractional number is used\",\n defaultMessage: \"A whole number is required.\",\n },\n valueBelowMinimum: {\n id: \"Nimbus.FieldErrors.valueBelowMinimum\",\n description: \"Error message for values below minimum threshold\",\n defaultMessage: \"Value must be greater than or equal to the minimum.\",\n },\n valueAboveMaximum: {\n id: \"Nimbus.FieldErrors.valueAboveMaximum\",\n description: \"Error message for values above maximum threshold\",\n defaultMessage: \"Value must be less than or equal to the maximum.\",\n },\n valueOutOfRange: {\n id: \"Nimbus.FieldErrors.valueOutOfRange\",\n description: \"Error message for values outside acceptable range\",\n defaultMessage: \"Value must be within the acceptable range.\",\n },\n\n // Server/async validation\n invalidFromServer: {\n id: \"Nimbus.FieldErrors.invalidFromServer\",\n description: \"Error message for server-side validation errors\",\n defaultMessage: \"Server validation failed. Please check your input.\",\n },\n resourceNotFound: {\n id: \"Nimbus.FieldErrors.resourceNotFound\",\n description: \"Error message when a resource is not found\",\n defaultMessage: \"The requested resource was not found.\",\n },\n valueBlocked: {\n id: \"Nimbus.FieldErrors.valueBlocked\",\n description: \"Error message for blocked or restricted values\",\n defaultMessage: \"This value is not allowed.\",\n },\n});\n","import type { ReactNode } from \"react\";\nimport type {\n HTMLChakraProps,\n SlotRecipeProps,\n UnstyledProp,\n} from \"@chakra-ui/react\";\nimport type { OmitInternalProps } from \"../../type-utils/omit-props\";\n\n// ============================================================\n// RECIPE PROPS\n// ============================================================\n\ntype FieldErrorsRecipeProps = SlotRecipeProps<\"fieldErrors\"> & UnstyledProp;\n\n// ============================================================\n// SLOT PROPS\n// ============================================================\n\nexport type FieldErrorsRootSlotProps = OmitInternalProps<\n HTMLChakraProps<\"div\", FieldErrorsRecipeProps>\n>;\n\nexport type FieldErrorsMessageSlotProps = HTMLChakraProps<\"div\">;\n\n// ============================================================\n// HELPER TYPES\n// ============================================================\n\nexport type FieldErrorsData = Record<string, boolean>;\n\nexport type TErrorRenderer = (key: string, error?: boolean) => ReactNode;\n\nexport const FieldErrorTypes = {\n MISSING: \"missing\",\n INVALID: \"invalid\",\n EMPTY: \"empty\",\n MIN_LENGTH: \"min\",\n MAX_LENGTH: \"max\",\n FORMAT: \"format\",\n DUPLICATE: \"duplicate\",\n NEGATIVE: \"negative\",\n FRACTIONS: \"fractions\",\n BELOW_MIN: \"belowMin\",\n ABOVE_MAX: \"aboveMax\",\n OUT_OF_RANGE: \"outOfRange\",\n INVALID_FROM_SERVER: \"invalidFromServer\",\n NOT_FOUND: \"notFound\",\n BLOCKED: \"blocked\",\n} as const;\n\nexport type TFieldErrorTypes =\n (typeof FieldErrorTypes)[keyof typeof FieldErrorTypes];\n\n// ============================================================\n// MAIN PROPS\n// ============================================================\n\nexport type FieldErrorsProps = FieldErrorsRootSlotProps & {\n /**\n * Object mapping error types to boolean values indicating presence\n */\n errors?: FieldErrorsData;\n /**\n * Whether the error messages are visible\n * @default false\n */\n isVisible?: boolean;\n /**\n * Custom render function for error messages\n */\n renderError?: TErrorRenderer;\n /**\n * Default render function for error messages when no custom renderer is provided\n */\n renderDefaultError?: TErrorRenderer;\n /**\n * Custom message overrides for specific error types\n */\n customMessages?: {\n /** Message for missing field error */\n missing?: ReactNode;\n /** Message for invalid field error */\n invalid?: ReactNode;\n /** Message for empty field error */\n empty?: ReactNode;\n /** Message for minimum length error */\n min?: ReactNode;\n /** Message for maximum length error */\n max?: ReactNode;\n /** Message for format error */\n format?: ReactNode;\n /** Message for duplicate value error */\n duplicate?: ReactNode;\n /** Message for negative value error */\n negative?: ReactNode;\n /** Message for fractional value error */\n fractions?: ReactNode;\n /** Message for below minimum value error */\n belowMin?: ReactNode;\n /** Message for above maximum value error */\n aboveMax?: ReactNode;\n /** Message for out of range error */\n outOfRange?: ReactNode;\n /** Message for invalid from server error */\n invalidFromServer?: ReactNode;\n /** Message for not found error */\n notFound?: ReactNode;\n /** Message for blocked error */\n blocked?: ReactNode;\n };\n};\n","import { FormattedMessage } from \"react-intl\";\nimport { FieldErrorsRoot, FieldErrorsMessage } from \"./field-errors.slots\";\nimport { messages } from \"./field-errors.i18n\";\nimport type { FieldErrorsProps } from \"./field-errors.types\";\nimport { FieldErrorTypes } from \"./field-errors.types\";\n\nconst isObject = (obj: unknown): boolean => typeof obj === \"object\";\n\n/**\n * Get custom message for a given error key\n */\nconst getCustomMessage = (\n key: string,\n customMessages?: FieldErrorsProps[\"customMessages\"]\n): React.ReactNode => {\n if (!customMessages) return null;\n\n // Map error keys to custom messages\n switch (key) {\n case FieldErrorTypes.MISSING:\n return customMessages.missing || null;\n case FieldErrorTypes.INVALID:\n return customMessages.invalid || null;\n case FieldErrorTypes.EMPTY:\n return customMessages.empty || null;\n case FieldErrorTypes.MIN_LENGTH:\n return customMessages.min || null;\n case FieldErrorTypes.MAX_LENGTH:\n return customMessages.max || null;\n case FieldErrorTypes.FORMAT:\n return customMessages.format || null;\n case FieldErrorTypes.DUPLICATE:\n return customMessages.duplicate || null;\n case FieldErrorTypes.NEGATIVE:\n return customMessages.negative || null;\n case FieldErrorTypes.FRACTIONS:\n return customMessages.fractions || null;\n case FieldErrorTypes.BELOW_MIN:\n return customMessages.belowMin || null;\n case FieldErrorTypes.ABOVE_MAX:\n return customMessages.aboveMax || null;\n case FieldErrorTypes.OUT_OF_RANGE:\n return customMessages.outOfRange || null;\n case FieldErrorTypes.INVALID_FROM_SERVER:\n return customMessages.invalidFromServer || null;\n case FieldErrorTypes.NOT_FOUND:\n return customMessages.notFound || null;\n case FieldErrorTypes.BLOCKED:\n return customMessages.blocked || null;\n default:\n return null;\n }\n};\n\n/**\n * Get built-in localized message for a given error key\n */\nconst getBuiltInMessage = (key: string): React.ReactNode => {\n switch (key) {\n // Basic validation\n case FieldErrorTypes.MISSING:\n return <FormattedMessage {...messages.missingRequiredField} />;\n case FieldErrorTypes.INVALID:\n return <FormattedMessage {...messages.invalidValue} />;\n case FieldErrorTypes.EMPTY:\n return <FormattedMessage {...messages.emptyValue} />;\n\n // Length validation\n case FieldErrorTypes.MIN_LENGTH:\n return <FormattedMessage {...messages.valueTooShort} />;\n case FieldErrorTypes.MAX_LENGTH:\n return <FormattedMessage {...messages.valueTooLong} />;\n\n // Format validation\n case FieldErrorTypes.FORMAT:\n return <FormattedMessage {...messages.invalidFormat} />;\n case FieldErrorTypes.DUPLICATE:\n return <FormattedMessage {...messages.duplicateValue} />;\n\n // Numeric validation\n case FieldErrorTypes.NEGATIVE:\n return <FormattedMessage {...messages.invalidNegativeNumber} />;\n case FieldErrorTypes.FRACTIONS:\n return <FormattedMessage {...messages.invalidFractionalNumber} />;\n case FieldErrorTypes.BELOW_MIN:\n return <FormattedMessage {...messages.valueBelowMinimum} />;\n case FieldErrorTypes.ABOVE_MAX:\n return <FormattedMessage {...messages.valueAboveMaximum} />;\n case FieldErrorTypes.OUT_OF_RANGE:\n return <FormattedMessage {...messages.valueOutOfRange} />;\n\n // Server/async validation\n case FieldErrorTypes.INVALID_FROM_SERVER:\n return <FormattedMessage {...messages.invalidFromServer} />;\n case FieldErrorTypes.NOT_FOUND:\n return <FormattedMessage {...messages.resourceNotFound} />;\n case FieldErrorTypes.BLOCKED:\n return <FormattedMessage {...messages.valueBlocked} />;\n\n default:\n return null;\n }\n};\n\n/**\n * # FieldErrors\n *\n * Renders error messages based on error object configuration.\n * Provides backwards compatibility with UI-Kit FieldErrors while integrating\n * with Nimbus design system patterns.\n *\n * Supports custom error renderers and localized built-in error messages\n * for common validation scenarios like missing required fields.\n *\n * @see {@link https://nimbus.commercetools.com/components/field-errors}\n *\n * @supportsStyleProps\n */\nexport const FieldErrors = ({\n id,\n errors,\n isVisible = true, // Default to true for backwards compatibility, but will be auto-handled in future\n renderError,\n renderDefaultError,\n customMessages,\n ...props\n}: FieldErrorsProps) => {\n // Don't render if not visible or no errors\n if (!isVisible) return null;\n if (!errors || !isObject(errors)) return null;\n\n // Filter to only show truthy errors\n const activeErrors = Object.entries(errors).filter(([, error]) => error);\n\n // Don't render if no active errors\n if (activeErrors.length === 0) return null;\n\n return (\n <FieldErrorsRoot id={id} role=\"alert\" {...props}>\n {activeErrors.map(([key, error]) => {\n // Try custom error renderer first\n const customErrorElement = renderError?.(key, error);\n if (customErrorElement) {\n return (\n <FieldErrorsMessage key={key}>\n {customErrorElement}\n </FieldErrorsMessage>\n );\n }\n\n // Try default error renderer second\n const defaultErrorElement = renderDefaultError?.(key, error);\n if (defaultErrorElement) {\n return (\n <FieldErrorsMessage key={key}>\n {defaultErrorElement}\n </FieldErrorsMessage>\n );\n }\n\n // Try custom messages for built-in error types first\n const customMessage = getCustomMessage(key, customMessages);\n if (customMessage) {\n return (\n <FieldErrorsMessage key={key}>{customMessage}</FieldErrorsMessage>\n );\n }\n\n // Fall back to built-in localized messages\n const builtInMessage = getBuiltInMessage(key);\n if (builtInMessage) {\n return (\n <FieldErrorsMessage key={key}>{builtInMessage}</FieldErrorsMessage>\n );\n }\n\n // If no renderer handles it, render nothing\n return null;\n })}\n </FieldErrorsRoot>\n );\n};\n\n// Static properties for backwards compatibility with UI-Kit\nFieldErrors.displayName = \"FieldErrors\";\nFieldErrors.errorTypes = FieldErrorTypes;\n// Static properties for string conversion, mostly for testing\nFieldErrors.getBuiltInMessage = getBuiltInMessage;\nFieldErrors.getCustomMessage = getCustomMessage;\n"],"names":["withProvider","withContext","createSlotRecipeContext","FieldErrorsRoot","FieldErrorsMessage","messages","defineMessages","FieldErrorTypes","isObject","obj","getCustomMessage","key","customMessages","getBuiltInMessage","jsx","FormattedMessage","FieldErrors","id","errors","isVisible","renderError","renderDefaultError","props","activeErrors","error","customErrorElement","defaultErrorElement","customMessage","builtInMessage"],"mappings":";;;AAOA,MAAM,EAAE,cAAAA,GAAc,aAAAC,EAAA,IAAgB,gBAAAC,EAAwB;AAAA,EAC5D,KAAK;AACP,CAAC,GAEYC,IAGT,gBAAAH,EAAuD,OAAO,MAAM,GAE3DI,IAGT,gBAAAH,EAAyD,OAAO,SAAS,GCjBhEI,IAAW,gBAAAC,EAAe;AAAA;AAAA,EAErC,sBAAsB;AAAA,IACpB,IAAI;AAAA,IACJ,aAAa;AAAA,IACb,gBAAgB;AAAA,EAAA;AAAA,EAElB,cAAc;AAAA,IACZ,IAAI;AAAA,IACJ,aAAa;AAAA,IACb,gBAAgB;AAAA,EAAA;AAAA,EAElB,YAAY;AAAA,IACV,IAAI;AAAA,IACJ,aAAa;AAAA,IACb,gBAAgB;AAAA,EAAA;AAAA;AAAA,EAIlB,eAAe;AAAA,IACb,IAAI;AAAA,IACJ,aAAa;AAAA,IACb,gBAAgB;AAAA,EAAA;AAAA,EAElB,cAAc;AAAA,IACZ,IAAI;AAAA,IACJ,aAAa;AAAA,IACb,gBAAgB;AAAA,EAAA;AAAA;AAAA,EAIlB,eAAe;AAAA,IACb,IAAI;AAAA,IACJ,aAAa;AAAA,IACb,gBAAgB;AAAA,EAAA;AAAA,EAElB,gBAAgB;AAAA,IACd,IAAI;AAAA,IACJ,aAAa;AAAA,IACb,gBAAgB;AAAA,EAAA;AAAA;AAAA,EAIlB,uBAAuB;AAA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;AAGzC,QAAMK,IAAe,OAAO,QAAQL,CAAM,EAAE,OAAO,CAAC,CAAA,EAAGM,CAAK,MAAMA,CAAK;AAGvE,SAAID,EAAa,WAAW,IAAU,OAGpC,gBAAAT,EAACX,GAAA,EAAgB,IAAAc,GAAQ,MAAK,SAAS,GAAGK,GACvC,UAAAC,EAAa,IAAI,CAAC,CAACZ,GAAKa,CAAK,MAAM;AAElC,UAAMC,IAAqBL,IAAcT,GAAKa,CAAK;AACnD,QAAIC;AACF,aACE,gBAAAX,EAACV,GAAA,EACE,UAAAqB,EAAA,GADsBd,CAEzB;AAKJ,UAAMe,IAAsBL,IAAqBV,GAAKa,CAAK;AAC3D,QAAIE;AACF,aACE,gBAAAZ,EAACV,GAAA,EACE,UAAAsB,EAAA,GADsBf,CAEzB;AAKJ,UAAMgB,IAAgBjB,EAAiBC,GAAKC,CAAc;AAC1D,QAAIe;AACF,aACE,gBAAAb,EAACV,GAAA,EAA8B,UAAAuB,EAAA,GAANhB,CAAoB;AAKjD,UAAMiB,IAAiBf,EAAkBF,CAAG;AAC5C,WAAIiB,IAEA,gBAAAd,EAACV,GAAA,EAA8B,UAAAwB,EAAA,GAANjB,CAAqB,IAK3C;AAAA,EACT,CAAC,EAAA,CACH;AAEJ;AAGAK,EAAY,cAAc;AAC1BA,EAAY,aAAaT;AAEzBS,EAAY,oBAAoBH;AAChCG,EAAY,mBAAmBN;"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";const i=require("react/jsx-runtime"),a=require("react-intl"),p=require("@chakra-ui/react"),{withProvider:h,withContext:O}=p.createSlotRecipeContext({key:"fieldErrors"}),I=h("div","root"),u=O("div","message"),s=a.defineMessages({missingRequiredField:{id:"Nimbus.FieldErrors.missingRequiredField",description:"Error message for missing required value",defaultMessage:"This field is required. Provide a value."},invalidValue:{id:"Nimbus.FieldErrors.invalidValue",description:"Error message for invalid value or format",defaultMessage:"The provided value is invalid."},emptyValue:{id:"Nimbus.FieldErrors.emptyValue",description:"Error message for empty value when content is required",defaultMessage:"This field cannot be empty."},valueTooShort:{id:"Nimbus.FieldErrors.valueTooShort",description:"Error message for minimum length validation",defaultMessage:"This value is too short."},valueTooLong:{id:"Nimbus.FieldErrors.valueTooLong",description:"Error message for maximum length validation",defaultMessage:"This value is too long."},invalidFormat:{id:"Nimbus.FieldErrors.invalidFormat",description:"Error message for format validation",defaultMessage:"Please enter a valid format."},duplicateValue:{id:"Nimbus.FieldErrors.duplicateValue",description:"Error message for duplicate value validation",defaultMessage:"This value is already in use. It must be unique."},invalidNegativeNumber:{id:"Nimbus.FieldErrors.invalidNegativeNumber",description:"Error message when negative number is used",defaultMessage:"Negative number is not supported."},invalidFractionalNumber:{id:"Nimbus.FieldErrors.invalidFractionalNumber",description:"Error message when fractional number is used",defaultMessage:"A whole number is required."},valueBelowMinimum:{id:"Nimbus.FieldErrors.valueBelowMinimum",description:"Error message for values below minimum threshold",defaultMessage:"Value must be greater than or equal to the minimum."},valueAboveMaximum:{id:"Nimbus.FieldErrors.valueAboveMaximum",description:"Error message for values above maximum threshold",defaultMessage:"Value must be less than or equal to the maximum."},valueOutOfRange:{id:"Nimbus.FieldErrors.valueOutOfRange",description:"Error message for values outside acceptable range",defaultMessage:"Value must be within the acceptable range."},invalidFromServer:{id:"Nimbus.FieldErrors.invalidFromServer",description:"Error message for server-side validation errors",defaultMessage:"Server validation failed. Please check your input."},resourceNotFound:{id:"Nimbus.FieldErrors.resourceNotFound",description:"Error message when a resource is not found",defaultMessage:"The requested resource was not found."},valueBlocked:{id:"Nimbus.FieldErrors.valueBlocked",description:"Error message for blocked or restricted values",defaultMessage:"This value is not allowed."}}),e={MISSING:"missing",INVALID:"invalid",EMPTY:"empty",MIN_LENGTH:"min",MAX_LENGTH:"max",FORMAT:"format",DUPLICATE:"duplicate",NEGATIVE:"negative",FRACTIONS:"fractions",BELOW_MIN:"belowMin",ABOVE_MAX:"aboveMax",OUT_OF_RANGE:"outOfRange",INVALID_FROM_SERVER:"invalidFromServer",NOT_FOUND:"notFound",BLOCKED:"blocked"},A=l=>typeof l=="object",g=(l,r)=>{if(!r)return null;switch(l){case e.MISSING:return r.missing||null;case e.INVALID:return r.invalid||null;case e.EMPTY:return r.empty||null;case e.MIN_LENGTH:return r.min||null;case e.MAX_LENGTH:return r.max||null;case e.FORMAT:return r.format||null;case e.DUPLICATE:return r.duplicate||null;case e.NEGATIVE:return r.negative||null;case e.FRACTIONS:return r.fractions||null;case e.BELOW_MIN:return r.belowMin||null;case e.ABOVE_MAX:return r.aboveMax||null;case e.OUT_OF_RANGE:return r.outOfRange||null;case e.INVALID_FROM_SERVER:return r.invalidFromServer||null;case e.NOT_FOUND:return r.notFound||null;case e.BLOCKED:return r.blocked||null;default:return null}},F=l=>{switch(l){case e.MISSING:return i.jsx(a.FormattedMessage,{...s.missingRequiredField});case e.INVALID:return i.jsx(a.FormattedMessage,{...s.invalidValue});case e.EMPTY:return i.jsx(a.FormattedMessage,{...s.emptyValue});case e.MIN_LENGTH:return i.jsx(a.FormattedMessage,{...s.valueTooShort});case e.MAX_LENGTH:return i.jsx(a.FormattedMessage,{...s.valueTooLong});case e.FORMAT:return i.jsx(a.FormattedMessage,{...s.invalidFormat});case e.DUPLICATE:return i.jsx(a.FormattedMessage,{...s.duplicateValue});case e.NEGATIVE:return i.jsx(a.FormattedMessage,{...s.invalidNegativeNumber});case e.FRACTIONS:return i.jsx(a.FormattedMessage,{...s.invalidFractionalNumber});case e.BELOW_MIN:return i.jsx(a.FormattedMessage,{...s.valueBelowMinimum});case e.ABOVE_MAX:return i.jsx(a.FormattedMessage,{...s.valueAboveMaximum});case e.OUT_OF_RANGE:return i.jsx(a.FormattedMessage,{...s.valueOutOfRange});case e.INVALID_FROM_SERVER:return i.jsx(a.FormattedMessage,{...s.invalidFromServer});case e.NOT_FOUND:return i.jsx(a.FormattedMessage,{...s.resourceNotFound});case e.BLOCKED:return i.jsx(a.FormattedMessage,{...s.valueBlocked});default:return null}},n=({id:l,errors:r,isVisible:N=!0,renderError:f,renderDefaultError:M,customMessages:b,...T})=>{if(!N||!r||!A(r))return null;const o=Object.entries(r).filter(([,t])=>t);return o.length===0?null:i.jsx(I,{id:l,role:"alert",...T,children:o.map(([t,d])=>{const m=f?.(t,d);if(m)return i.jsx(u,{children:m},t);const c=M?.(t,d);if(c)return i.jsx(u,{children:c},t);const v=g(t,b);if(v)return i.jsx(u,{children:v},t);const E=F(t);return E?i.jsx(u,{children:E},t):null})})};n.displayName="FieldErrors";n.errorTypes=e;n.getBuiltInMessage=F;n.getCustomMessage=g;exports.FieldErrorTypes=e;exports.FieldErrors=n;
|
|
2
|
-
//# sourceMappingURL=field-errors-D2re_C_c.cjs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"field-errors-D2re_C_c.cjs.js","sources":["../../src/components/field-errors/field-errors.slots.tsx","../../src/components/field-errors/field-errors.i18n.ts","../../src/components/field-errors/field-errors.types.ts","../../src/components/field-errors/field-errors.tsx"],"sourcesContent":["import { createSlotRecipeContext } from \"@chakra-ui/react\";\nimport type { SlotComponent } from \"../../type-utils/slot-types\";\nimport type {\n FieldErrorsMessageSlotProps,\n FieldErrorsRootSlotProps,\n} from \"./field-errors.types\";\n\nconst { withProvider, withContext } = createSlotRecipeContext({\n key: \"fieldErrors\",\n});\n\nexport const FieldErrorsRoot: SlotComponent<\n HTMLDivElement,\n FieldErrorsRootSlotProps\n> = withProvider<HTMLDivElement, FieldErrorsRootSlotProps>(\"div\", \"root\");\n\nexport const FieldErrorsMessage: SlotComponent<\n HTMLDivElement,\n FieldErrorsMessageSlotProps\n> = withContext<HTMLDivElement, FieldErrorsMessageSlotProps>(\"div\", \"message\");\n","import { defineMessages } from \"react-intl\";\n\nexport const messages = defineMessages({\n // Basic validation\n missingRequiredField: {\n id: \"Nimbus.FieldErrors.missingRequiredField\",\n description: \"Error message for missing required value\",\n defaultMessage: \"This field is required. Provide a value.\",\n },\n invalidValue: {\n id: \"Nimbus.FieldErrors.invalidValue\",\n description: \"Error message for invalid value or format\",\n defaultMessage: \"The provided value is invalid.\",\n },\n emptyValue: {\n id: \"Nimbus.FieldErrors.emptyValue\",\n description: \"Error message for empty value when content is required\",\n defaultMessage: \"This field cannot be empty.\",\n },\n\n // Length validation\n valueTooShort: {\n id: \"Nimbus.FieldErrors.valueTooShort\",\n description: \"Error message for minimum length validation\",\n defaultMessage: \"This value is too short.\",\n },\n valueTooLong: {\n id: \"Nimbus.FieldErrors.valueTooLong\",\n description: \"Error message for maximum length validation\",\n defaultMessage: \"This value is too long.\",\n },\n\n // Format validation\n invalidFormat: {\n id: \"Nimbus.FieldErrors.invalidFormat\",\n description: \"Error message for format validation\",\n defaultMessage: \"Please enter a valid format.\",\n },\n duplicateValue: {\n id: \"Nimbus.FieldErrors.duplicateValue\",\n description: \"Error message for duplicate value validation\",\n defaultMessage: \"This value is already in use. It must be unique.\",\n },\n\n // Numeric validation\n invalidNegativeNumber: {\n id: \"Nimbus.FieldErrors.invalidNegativeNumber\",\n description: \"Error message when negative number is used\",\n defaultMessage: \"Negative number is not supported.\",\n },\n invalidFractionalNumber: {\n id: \"Nimbus.FieldErrors.invalidFractionalNumber\",\n description: \"Error message when fractional number is used\",\n defaultMessage: \"A whole number is required.\",\n },\n valueBelowMinimum: {\n id: \"Nimbus.FieldErrors.valueBelowMinimum\",\n description: \"Error message for values below minimum threshold\",\n defaultMessage: \"Value must be greater than or equal to the minimum.\",\n },\n valueAboveMaximum: {\n id: \"Nimbus.FieldErrors.valueAboveMaximum\",\n description: \"Error message for values above maximum threshold\",\n defaultMessage: \"Value must be less than or equal to the maximum.\",\n },\n valueOutOfRange: {\n id: \"Nimbus.FieldErrors.valueOutOfRange\",\n description: \"Error message for values outside acceptable range\",\n defaultMessage: \"Value must be within the acceptable range.\",\n },\n\n // Server/async validation\n invalidFromServer: {\n id: \"Nimbus.FieldErrors.invalidFromServer\",\n description: \"Error message for server-side validation errors\",\n defaultMessage: \"Server validation failed. Please check your input.\",\n },\n resourceNotFound: {\n id: \"Nimbus.FieldErrors.resourceNotFound\",\n description: \"Error message when a resource is not found\",\n defaultMessage: \"The requested resource was not found.\",\n },\n valueBlocked: {\n id: \"Nimbus.FieldErrors.valueBlocked\",\n description: \"Error message for blocked or restricted values\",\n defaultMessage: \"This value is not allowed.\",\n },\n});\n","import type { ReactNode } from \"react\";\nimport type {\n HTMLChakraProps,\n SlotRecipeProps,\n UnstyledProp,\n} from \"@chakra-ui/react\";\nimport type { OmitInternalProps } from \"../../type-utils/omit-props\";\n\n// ============================================================\n// RECIPE PROPS\n// ============================================================\n\ntype FieldErrorsRecipeProps = SlotRecipeProps<\"fieldErrors\"> & UnstyledProp;\n\n// ============================================================\n// SLOT PROPS\n// ============================================================\n\nexport type FieldErrorsRootSlotProps = OmitInternalProps<\n HTMLChakraProps<\"div\", FieldErrorsRecipeProps>\n>;\n\nexport type FieldErrorsMessageSlotProps = HTMLChakraProps<\"div\">;\n\n// ============================================================\n// HELPER TYPES\n// ============================================================\n\nexport type FieldErrorsData = Record<string, boolean>;\n\nexport type TErrorRenderer = (key: string, error?: boolean) => ReactNode;\n\nexport const FieldErrorTypes = {\n MISSING: \"missing\",\n INVALID: \"invalid\",\n EMPTY: \"empty\",\n MIN_LENGTH: \"min\",\n MAX_LENGTH: \"max\",\n FORMAT: \"format\",\n DUPLICATE: \"duplicate\",\n NEGATIVE: \"negative\",\n FRACTIONS: \"fractions\",\n BELOW_MIN: \"belowMin\",\n ABOVE_MAX: \"aboveMax\",\n OUT_OF_RANGE: \"outOfRange\",\n INVALID_FROM_SERVER: \"invalidFromServer\",\n NOT_FOUND: \"notFound\",\n BLOCKED: \"blocked\",\n} as const;\n\nexport type TFieldErrorTypes =\n (typeof FieldErrorTypes)[keyof typeof FieldErrorTypes];\n\n// ============================================================\n// MAIN PROPS\n// ============================================================\n\nexport type FieldErrorsProps = FieldErrorsRootSlotProps & {\n /**\n * Object mapping error types to boolean values indicating presence\n */\n errors?: FieldErrorsData;\n /**\n * Whether the error messages are visible\n * @default false\n */\n isVisible?: boolean;\n /**\n * Custom render function for error messages\n */\n renderError?: TErrorRenderer;\n /**\n * Default render function for error messages when no custom renderer is provided\n */\n renderDefaultError?: TErrorRenderer;\n /**\n * Custom message overrides for specific error types\n */\n customMessages?: {\n /** Message for missing field error */\n missing?: ReactNode;\n /** Message for invalid field error */\n invalid?: ReactNode;\n /** Message for empty field error */\n empty?: ReactNode;\n /** Message for minimum length error */\n min?: ReactNode;\n /** Message for maximum length error */\n max?: ReactNode;\n /** Message for format error */\n format?: ReactNode;\n /** Message for duplicate value error */\n duplicate?: ReactNode;\n /** Message for negative value error */\n negative?: ReactNode;\n /** Message for fractional value error */\n fractions?: ReactNode;\n /** Message for below minimum value error */\n belowMin?: ReactNode;\n /** Message for above maximum value error */\n aboveMax?: ReactNode;\n /** Message for out of range error */\n outOfRange?: ReactNode;\n /** Message for invalid from server error */\n invalidFromServer?: ReactNode;\n /** Message for not found error */\n notFound?: ReactNode;\n /** Message for blocked error */\n blocked?: ReactNode;\n };\n};\n","import { FormattedMessage } from \"react-intl\";\nimport { FieldErrorsRoot, FieldErrorsMessage } from \"./field-errors.slots\";\nimport { messages } from \"./field-errors.i18n\";\nimport type { FieldErrorsProps } from \"./field-errors.types\";\nimport { FieldErrorTypes } from \"./field-errors.types\";\n\nconst isObject = (obj: unknown): boolean => typeof obj === \"object\";\n\n/**\n * Get custom message for a given error key\n */\nconst getCustomMessage = (\n key: string,\n customMessages?: FieldErrorsProps[\"customMessages\"]\n): React.ReactNode => {\n if (!customMessages) return null;\n\n // Map error keys to custom messages\n switch (key) {\n case FieldErrorTypes.MISSING:\n return customMessages.missing || null;\n case FieldErrorTypes.INVALID:\n return customMessages.invalid || null;\n case FieldErrorTypes.EMPTY:\n return customMessages.empty || null;\n case FieldErrorTypes.MIN_LENGTH:\n return customMessages.min || null;\n case FieldErrorTypes.MAX_LENGTH:\n return customMessages.max || null;\n case FieldErrorTypes.FORMAT:\n return customMessages.format || null;\n case FieldErrorTypes.DUPLICATE:\n return customMessages.duplicate || null;\n case FieldErrorTypes.NEGATIVE:\n return customMessages.negative || null;\n case FieldErrorTypes.FRACTIONS:\n return customMessages.fractions || null;\n case FieldErrorTypes.BELOW_MIN:\n return customMessages.belowMin || null;\n case FieldErrorTypes.ABOVE_MAX:\n return customMessages.aboveMax || null;\n case FieldErrorTypes.OUT_OF_RANGE:\n return customMessages.outOfRange || null;\n case FieldErrorTypes.INVALID_FROM_SERVER:\n return customMessages.invalidFromServer || null;\n case FieldErrorTypes.NOT_FOUND:\n return customMessages.notFound || null;\n case FieldErrorTypes.BLOCKED:\n return customMessages.blocked || null;\n default:\n return null;\n }\n};\n\n/**\n * Get built-in localized message for a given error key\n */\nconst getBuiltInMessage = (key: string): React.ReactNode => {\n switch (key) {\n // Basic validation\n case FieldErrorTypes.MISSING:\n return <FormattedMessage {...messages.missingRequiredField} />;\n case FieldErrorTypes.INVALID:\n return <FormattedMessage {...messages.invalidValue} />;\n case FieldErrorTypes.EMPTY:\n return <FormattedMessage {...messages.emptyValue} />;\n\n // Length validation\n case FieldErrorTypes.MIN_LENGTH:\n return <FormattedMessage {...messages.valueTooShort} />;\n case FieldErrorTypes.MAX_LENGTH:\n return <FormattedMessage {...messages.valueTooLong} />;\n\n // Format validation\n case FieldErrorTypes.FORMAT:\n return <FormattedMessage {...messages.invalidFormat} />;\n case FieldErrorTypes.DUPLICATE:\n return <FormattedMessage {...messages.duplicateValue} />;\n\n // Numeric validation\n case FieldErrorTypes.NEGATIVE:\n return <FormattedMessage {...messages.invalidNegativeNumber} />;\n case FieldErrorTypes.FRACTIONS:\n return <FormattedMessage {...messages.invalidFractionalNumber} />;\n case FieldErrorTypes.BELOW_MIN:\n return <FormattedMessage {...messages.valueBelowMinimum} />;\n case FieldErrorTypes.ABOVE_MAX:\n return <FormattedMessage {...messages.valueAboveMaximum} />;\n case FieldErrorTypes.OUT_OF_RANGE:\n return <FormattedMessage {...messages.valueOutOfRange} />;\n\n // Server/async validation\n case FieldErrorTypes.INVALID_FROM_SERVER:\n return <FormattedMessage {...messages.invalidFromServer} />;\n case FieldErrorTypes.NOT_FOUND:\n return <FormattedMessage {...messages.resourceNotFound} />;\n case FieldErrorTypes.BLOCKED:\n return <FormattedMessage {...messages.valueBlocked} />;\n\n default:\n return null;\n }\n};\n\n/**\n * # FieldErrors\n *\n * Renders error messages based on error object configuration.\n * Provides backwards compatibility with UI-Kit FieldErrors while integrating\n * with Nimbus design system patterns.\n *\n * Supports custom error renderers and localized built-in error messages\n * for common validation scenarios like missing required fields.\n *\n * @see {@link https://nimbus.commercetools.com/components/field-errors}\n *\n * @supportsStyleProps\n */\nexport const FieldErrors = ({\n id,\n errors,\n isVisible = true, // Default to true for backwards compatibility, but will be auto-handled in future\n renderError,\n renderDefaultError,\n customMessages,\n ...props\n}: FieldErrorsProps) => {\n // Don't render if not visible or no errors\n if (!isVisible) return null;\n if (!errors || !isObject(errors)) return null;\n\n // Filter to only show truthy errors\n const activeErrors = Object.entries(errors).filter(([, error]) => error);\n\n // Don't render if no active errors\n if (activeErrors.length === 0) return null;\n\n return (\n <FieldErrorsRoot id={id} role=\"alert\" {...props}>\n {activeErrors.map(([key, error]) => {\n // Try custom error renderer first\n const customErrorElement = renderError?.(key, error);\n if (customErrorElement) {\n return (\n <FieldErrorsMessage key={key}>\n {customErrorElement}\n </FieldErrorsMessage>\n );\n }\n\n // Try default error renderer second\n const defaultErrorElement = renderDefaultError?.(key, error);\n if (defaultErrorElement) {\n return (\n <FieldErrorsMessage key={key}>\n {defaultErrorElement}\n </FieldErrorsMessage>\n );\n }\n\n // Try custom messages for built-in error types first\n const customMessage = getCustomMessage(key, customMessages);\n if (customMessage) {\n return (\n <FieldErrorsMessage key={key}>{customMessage}</FieldErrorsMessage>\n );\n }\n\n // Fall back to built-in localized messages\n const builtInMessage = getBuiltInMessage(key);\n if (builtInMessage) {\n return (\n <FieldErrorsMessage key={key}>{builtInMessage}</FieldErrorsMessage>\n );\n }\n\n // If no renderer handles it, render nothing\n return null;\n })}\n </FieldErrorsRoot>\n );\n};\n\n// Static properties for backwards compatibility with UI-Kit\nFieldErrors.displayName = \"FieldErrors\";\nFieldErrors.errorTypes = FieldErrorTypes;\n// Static properties for string conversion, mostly for testing\nFieldErrors.getBuiltInMessage = getBuiltInMessage;\nFieldErrors.getCustomMessage = getCustomMessage;\n"],"names":["withProvider","withContext","createSlotRecipeContext","FieldErrorsRoot","FieldErrorsMessage","messages","defineMessages","FieldErrorTypes","isObject","obj","getCustomMessage","key","customMessages","getBuiltInMessage","jsx","FormattedMessage","FieldErrors","id","errors","isVisible","renderError","renderDefaultError","props","activeErrors","error","customErrorElement","defaultErrorElement","customMessage","builtInMessage"],"mappings":"wGAOM,CAAE,aAAAA,EAAc,YAAAC,CAAA,EAAgBC,0BAAwB,CAC5D,IAAK,aACP,CAAC,EAEYC,EAGTH,EAAuD,MAAO,MAAM,EAE3DI,EAGTH,EAAyD,MAAO,SAAS,ECjBhEI,EAAWC,EAAAA,eAAe,CAErC,qBAAsB,CACpB,GAAI,0CACJ,YAAa,2CACb,eAAgB,0CAAA,EAElB,aAAc,CACZ,GAAI,kCACJ,YAAa,4CACb,eAAgB,gCAAA,EAElB,WAAY,CACV,GAAI,gCACJ,YAAa,yDACb,eAAgB,6BAAA,EAIlB,cAAe,CACb,GAAI,mCACJ,YAAa,8CACb,eAAgB,0BAAA,EAElB,aAAc,CACZ,GAAI,kCACJ,YAAa,8CACb,eAAgB,yBAAA,EAIlB,cAAe,CACb,GAAI,mCACJ,YAAa,sCACb,eAAgB,8BAAA,EAElB,eAAgB,CACd,GAAI,oCACJ,YAAa,+CACb,eAAgB,kDAAA,EAIlB,sBAAuB,CACrB,GAAI,2CACJ,YAAa,6CACb,eAAgB,mCAAA,EAElB,wBAAyB,CACvB,GAAI,6CACJ,YAAa,+CACb,eAAgB,6BAAA,EAElB,kBAAmB,CACjB,GAAI,uCACJ,YAAa,mDACb,eAAgB,qDAAA,EAElB,kBAAmB,CACjB,GAAI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,OAAIiB,EAEAd,EAAAA,IAACV,EAAA,CAA8B,SAAAwB,CAAA,EAANjB,CAAqB,EAK3C,IACT,CAAC,CAAA,CACH,CAEJ,EAGAK,EAAY,YAAc,cAC1BA,EAAY,WAAaT,EAEzBS,EAAY,kBAAoBH,EAChCG,EAAY,iBAAmBN"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"form-field-BqlkPY29.es.js","sources":["../../src/components/form-field/components/form-field.context.tsx","../../src/components/form-field/form-field.slots.tsx","../../src/components/form-field/components/form-field.root.tsx","../../src/components/form-field/components/form-field.label.tsx","../../src/components/form-field/components/form-field.input.tsx","../../src/components/form-field/components/form-field.description.tsx","../../src/components/form-field/components/form-field.error.tsx","../../src/components/form-field/components/form-field.info-box.tsx","../../src/components/form-field/form-field.tsx"],"sourcesContent":["import { createContext, type ReactNode } from \"react\";\nimport type {\n FormFieldDescriptionSlotProps,\n FormFieldErrorSlotProps,\n FormFieldInputSlotProps,\n FormFieldLabelSlotProps,\n} from \"../form-field.types\";\n\nexport type FormFieldContextPayloadType = {\n label: ReactNode;\n labelSlotProps?: FormFieldLabelSlotProps;\n input: ReactNode;\n inputSlotProps?: FormFieldInputSlotProps;\n description: ReactNode;\n descriptionSlotProps?: FormFieldDescriptionSlotProps;\n error: ReactNode;\n errorSlotProps?: FormFieldErrorSlotProps;\n info: ReactNode;\n isInvalid?: boolean;\n isRequired?: boolean;\n isDisabled?: boolean;\n isReadOnly?: boolean;\n};\n\nexport type FormFieldContextType = {\n context: FormFieldContextPayloadType;\n setContext: React.Dispatch<React.SetStateAction<FormFieldContextPayloadType>>;\n};\n\nexport const FormFieldContext = createContext<FormFieldContextType>({\n context: {\n label: null,\n description: null,\n error: null,\n info: null,\n input: null,\n },\n setContext: () => {},\n});\n","import { createSlotRecipeContext } from \"@chakra-ui/react\";\nimport type {\n FormFieldRootSlotProps,\n FormFieldLabelSlotProps,\n FormFieldInputSlotProps,\n FormFieldDescriptionSlotProps,\n FormFieldErrorSlotProps,\n FormFieldPopoverSlotProps,\n} from \"./form-field.types\";\n\nconst { withProvider, withContext } = createSlotRecipeContext({\n key: \"formField\",\n});\n\n// Root slot\nexport const FormFieldRootSlot = withProvider<\n HTMLDivElement,\n FormFieldRootSlotProps\n>(\"div\", \"root\");\n\n// Label Slot\nexport const FormFieldLabelSlot = withContext<\n HTMLDivElement,\n FormFieldLabelSlotProps\n>(\"div\", \"label\");\n\n// Input Slot\nexport const FormFieldInputSlot = withContext<\n HTMLDivElement,\n FormFieldInputSlotProps\n>(\"div\", \"input\");\n\n// Description Slot\nexport const FormFieldDescriptionSlot = withContext<\n HTMLDivElement,\n FormFieldDescriptionSlotProps\n>(\"div\", \"description\");\n\n// Error Slot\nexport const FormFieldErrorSlot = withContext<\n HTMLDivElement,\n FormFieldErrorSlotProps\n>(\"div\", \"error\");\n\n// Error Slot\nexport const FormFieldPopoverSlot = withContext<\n HTMLDivElement,\n FormFieldPopoverSlotProps\n>(\"div\", \"popover\");\n","import {\n Children,\n cloneElement,\n isValidElement,\n useEffect,\n useMemo,\n useState,\n useRef,\n} from \"react\";\nimport type { FormFieldProps } from \"../form-field.types\";\nimport { useField, useObjectRef } from \"react-aria\";\nimport { mergeRefs } from \"@chakra-ui/react\";\nimport {\n FormFieldContext,\n type FormFieldContextPayloadType,\n} from \"./form-field.context\";\nimport {\n FormFieldDescriptionSlot,\n FormFieldErrorSlot,\n FormFieldInputSlot,\n FormFieldLabelSlot,\n FormFieldPopoverSlot,\n FormFieldRootSlot,\n} from \"../form-field.slots\";\nimport { Dialog, DialogTrigger, Popover } from \"react-aria-components\";\nimport { Box, IconButton } from \"@/components\";\nimport { ErrorOutline, HelpOutline } from \"@commercetools/nimbus-icons\";\n\n/**\n * # FormField.Root\n *\n * displays miscellaneous inputs in a FormField context\n *\n * @supportsStyleProps\n */\nexport const FormFieldRoot = function FormFieldRoot({\n ref: forwardedRef,\n id,\n isInvalid,\n isRequired,\n isDisabled,\n isReadOnly,\n children,\n ...props\n}: FormFieldProps) {\n const localRef = useRef<HTMLDivElement>(null);\n const ref = useObjectRef(mergeRefs(localRef, forwardedRef));\n const [context, setContext] = useState<FormFieldContextPayloadType>({\n label: null,\n description: null,\n error: null,\n info: null,\n input: null,\n isInvalid,\n isRequired,\n isDisabled,\n isReadOnly,\n });\n\n const useFieldArgs: Parameters<typeof useField>[0] = useMemo(() => {\n const args: Parameters<typeof useField>[0] = {\n id,\n description: context.description,\n errorMessage: context.error,\n };\n\n if (context.label) {\n args.label = context.label;\n } else {\n // Context will always start out null, so we need to stub out some aria attributes\n // FIXME: This is a hack to get the form field to work, but it's not the best solution\n // FIXME: We should find a better way to handle this by redesigning the FormField component's structure\n args[\"aria-label\"] = \"empty-label\";\n args[\"aria-labelledby\"] = \"empty-label\";\n }\n\n return args;\n }, [id, context.description, context.error, context.label]);\n\n const { labelProps, fieldProps, descriptionProps, errorMessageProps } =\n useField(useFieldArgs);\n\n useEffect(() => {\n setContext((prevContext) => ({\n ...prevContext,\n isInvalid,\n isRequired,\n isDisabled,\n isReadOnly,\n }));\n }, [isInvalid, isRequired, isDisabled, isReadOnly]);\n\n const inputProps = useMemo(\n () => ({\n ...fieldProps,\n isInvalid,\n isRequired,\n isDisabled,\n isReadOnly,\n }),\n [fieldProps, isInvalid, isRequired, isDisabled, isReadOnly]\n );\n\n const contextValue = useMemo(() => ({ context, setContext }), [context]);\n\n return (\n <FormFieldContext.Provider value={contextValue}>\n <FormFieldRootSlot ref={ref} {...props}>\n {context.label && (\n <FormFieldLabelSlot {...context.labelSlotProps}>\n <label {...labelProps}>\n {context.label}\n {isRequired && <sup aria-hidden=\"true\">*</sup>}\n </label>\n {context.info && (\n <DialogTrigger>\n <Box\n as=\"span\"\n display=\"inline-block\"\n position=\"relative\"\n width=\"1ch\"\n height=\"1ch\"\n ml=\"200\"\n >\n <Box\n as=\"span\"\n display=\"inline-flex\"\n position=\"absolute\"\n top=\"50%\"\n right=\"50%\"\n transform=\"translate(50%, -50%)\"\n >\n <IconButton\n aria-label=\"__MORE INFO\"\n size=\"2xs\"\n colorPalette=\"info\"\n variant=\"link\"\n >\n <HelpOutline />\n </IconButton>\n </Box>\n </Box>\n <Popover>\n <FormFieldPopoverSlot asChild>\n <Dialog>\n <Box p=\"300\">{context.info}</Box>\n </Dialog>\n </FormFieldPopoverSlot>\n </Popover>\n </DialogTrigger>\n )}\n </FormFieldLabelSlot>\n )}\n {context.input && (\n <FormFieldInputSlot {...context.inputSlotProps}>\n {Children.map(context.input, (child) => {\n // Important: Check if the child is a valid React element before cloning.\n if (isValidElement(child)) {\n return cloneElement(child, inputProps);\n }\n // If it's not a valid element (e.g., text node, null, undefined), return it as is.\n return child;\n })}\n </FormFieldInputSlot>\n )}\n {context.description && (\n <FormFieldDescriptionSlot\n {...descriptionProps}\n {...context.descriptionSlotProps}\n >\n {context.description}\n </FormFieldDescriptionSlot>\n )}\n {isInvalid && context.error && (\n <FormFieldErrorSlot\n {...errorMessageProps}\n {...context.errorSlotProps}\n >\n <Box\n as={ErrorOutline}\n display=\"inline-flex\"\n boxSize=\"400\"\n verticalAlign=\"text-bottom\"\n mr=\"100\"\n alignSelf=\"center\"\n />\n {context.error}\n </FormFieldErrorSlot>\n )}\n {children}\n </FormFieldRootSlot>\n </FormFieldContext.Provider>\n );\n};\n\nFormFieldRoot.displayName = \"FormField.Root\";\n","import { useContext, useEffect } from \"react\";\nimport { FormFieldContext } from \"./form-field.context\";\nimport type { FormFieldLabelSlotProps } from \"../form-field.types\";\n\n/**\n * FormField.Label - The label element for the form field\n *\n * @supportsStyleProps\n */\n// TODO: should this be wrapped in react-aria's `LabelContext` provider?, e.g. https://react-spectrum.adobe.com/react-aria/TextField.html#custom-children\nexport const FormFieldLabel = ({\n children,\n ...labelSlotProps\n}: FormFieldLabelSlotProps) => {\n const { setContext } = useContext(FormFieldContext);\n\n useEffect(() => {\n setContext((prevContext) => ({\n ...prevContext,\n label: children,\n labelSlotProps,\n }));\n\n // Cleanup: clear label when component unmounts\n return () => {\n setContext((prevContext) => ({\n ...prevContext,\n label: null,\n labelSlotProps: undefined,\n }));\n };\n }, [children, setContext]);\n\n return null;\n};\n\nFormFieldLabel.displayName = \"FormField.Label\";\n","import { useContext, useEffect } from \"react\";\nimport { FormFieldContext } from \"./form-field.context\";\nimport type { FormFieldInputSlotProps } from \"../form-field.types\";\n\n/**\n * FormField.Input - The input wrapper element for the form field\n *\n * @supportsStyleProps\n */\nexport const FormFieldInput = ({\n children,\n ...inputSlotProps\n}: FormFieldInputSlotProps) => {\n const { setContext } = useContext(FormFieldContext);\n\n useEffect(() => {\n setContext((prevContext) => ({\n ...prevContext,\n input: children,\n inputSlotProps,\n }));\n }, [children, setContext]);\n\n return null;\n};\n\nFormFieldInput.displayName = \"FormField.Input\";\n","import { useContext, useEffect } from \"react\";\nimport { FormFieldContext } from \"./form-field.context\";\nimport type { FormFieldDescriptionSlotProps } from \"../form-field.types\";\n\n/**\n * FormField.Description - The description element for the form field\n *\n * @supportsStyleProps\n */\nexport const FormFieldDescription = ({\n children,\n ...descriptionSlotProps\n}: FormFieldDescriptionSlotProps) => {\n const { setContext } = useContext(FormFieldContext);\n\n useEffect(() => {\n setContext((prevContext) => ({\n ...prevContext,\n description: children,\n descriptionSlotProps,\n }));\n\n // Cleanup: clear description when component unmounts\n return () => {\n setContext((prevContext) => ({\n ...prevContext,\n description: null,\n descriptionSlotProps: undefined,\n }));\n };\n }, [children, setContext]);\n\n return null;\n};\n\nFormFieldDescription.displayName = \"FormField.Description\";\n","import { useContext, useEffect } from \"react\";\nimport { FormFieldContext } from \"./form-field.context\";\nimport type { FormFieldErrorSlotProps } from \"../form-field.types\";\n\n/**\n * FormField.Error - The error message element for the form field\n *\n * @supportsStyleProps\n */\nexport const FormFieldError = ({\n children,\n ...errorSlotProps\n}: FormFieldErrorSlotProps) => {\n const { setContext } = useContext(FormFieldContext);\n\n useEffect(() => {\n setContext((prevContext) => ({\n ...prevContext,\n error: children,\n errorSlotProps,\n }));\n\n // Cleanup: clear error when component unmounts\n return () => {\n setContext((prevContext) => ({\n ...prevContext,\n error: null,\n errorSlotProps: undefined,\n }));\n };\n }, [children, setContext]);\n\n return null;\n};\n\nFormFieldError.displayName = \"FormField.Error\";\n","import { useContext, useEffect, type ReactNode } from \"react\";\nimport { FormFieldContext } from \"./form-field.context\";\n\ntype FormFieldInfoBoxProps = {\n /**\n * The content to display in the InfoBox\n */\n children: ReactNode;\n};\n\n/**\n * FormField.InfoBox - The info box popover content for the form field\n *\n * @supportsStyleProps\n */\nexport const FormFieldInfoBox = ({ children }: FormFieldInfoBoxProps) => {\n const { setContext } = useContext(FormFieldContext);\n\n useEffect(() => {\n setContext((prevContext) => ({\n ...prevContext,\n info: children,\n }));\n\n // Cleanup: clear info when component unmounts\n return () => {\n setContext((prevContext) => ({\n ...prevContext,\n info: null,\n }));\n };\n }, [children, setContext]);\n\n return null;\n};\n\nFormFieldInfoBox.displayName = \"FormField.InfoBox\";\n","import {\n FormFieldRoot,\n FormFieldLabel,\n FormFieldInput,\n FormFieldDescription,\n FormFieldError,\n FormFieldInfoBox,\n} from \"./components\";\n\nexport const FormField = {\n /**\n * # FormField.Root\n *\n * The root container for the form field that provides context and state management\n * for all child components. Handles React Aria integration for accessibility,\n * manages field state (required, invalid, disabled, readonly), and coordinates\n * rendering of label, input, description, and error elements.\n *\n * @example\n * ```tsx\n * <FormField.Root isRequired isInvalid>\n * <FormField.Label>Username</FormField.Label>\n * <FormField.Input>\n * <TextInput />\n * </FormField.Input>\n * <FormField.Description>Enter your username</FormField.Description>\n * <FormField.Error>Username is required</FormField.Error>\n * </FormField.Root>\n * ```\n */\n Root: FormFieldRoot,\n\n /**\n * # FormField.Label\n *\n * The label element for the form field. Automatically associates with the input\n * via React Aria and displays a required indicator when the field is required.\n * Supports an optional info box trigger for additional field information.\n *\n * @example\n * ```tsx\n * <FormField.Root>\n * <FormField.Label>Email Address</FormField.Label>\n * <FormField.InfoBox>\n * Your email will be used for account notifications\n * </FormField.InfoBox>\n * <FormField.Input>\n * <TextInput />\n * </FormField.Input>\n * </FormField.Root>\n * ```\n */\n Label: FormFieldLabel,\n\n /**\n * # FormField.Input\n *\n * The input wrapper element that receives and displays the actual input component.\n * Automatically clones children and passes accessibility props, validation state,\n * and field attributes from React Aria.\n *\n * @example\n * ```tsx\n * <FormField.Root>\n * <FormField.Label>Password</FormField.Label>\n * <FormField.Input>\n * <PasswordInput />\n * </FormField.Input>\n * </FormField.Root>\n * ```\n */\n Input: FormFieldInput,\n\n /**\n * # FormField.Description\n *\n * The description element that provides helpful information about the field.\n * Automatically associates with the input via `aria-describedby` for screen readers.\n *\n * @example\n * ```tsx\n * <FormField.Root>\n * <FormField.Label>Username</FormField.Label>\n * <FormField.Input>\n * <TextInput />\n * </FormField.Input>\n * <FormField.Description>\n * Must be 3-20 characters, letters and numbers only\n * </FormField.Description>\n * </FormField.Root>\n * ```\n */\n Description: FormFieldDescription,\n\n /**\n * # FormField.Error\n *\n * The error message element that displays validation errors. Only visible when\n * the field is invalid. Automatically associates with the input via\n * `aria-errormessage` and includes an error icon.\n *\n * @example\n * ```tsx\n * <FormField.Root isInvalid>\n * <FormField.Label>Email</FormField.Label>\n * <FormField.Input>\n * <TextInput />\n * </FormField.Input>\n * <FormField.Error>Please enter a valid email address</FormField.Error>\n * </FormField.Root>\n * ```\n */\n Error: FormFieldError,\n\n /**\n * # FormField.InfoBox\n *\n * The info box content that appears in a popover when the help icon next to\n * the label is clicked. Use for additional context or instructions that don't\n * need to be visible by default.\n *\n * @example\n * ```tsx\n * <FormField.Root>\n * <FormField.Label>API Key</FormField.Label>\n * <FormField.InfoBox>\n * Your API key can be found in your account settings.\n * Keep it secure and never share it publicly.\n * </FormField.InfoBox>\n * <FormField.Input>\n * <TextInput />\n * </FormField.Input>\n * </FormField.Root>\n * ```\n */\n InfoBox: FormFieldInfoBox,\n};\n\nexport {\n FormFieldRoot as _FormFieldRoot,\n FormFieldLabel as _FormFieldLabel,\n FormFieldInput as _FormFieldInput,\n FormFieldDescription as _FormFieldDescription,\n FormFieldError as _FormFieldError,\n FormFieldInfoBox as _FormFieldInfoBox,\n};\n"],"names":["FormFieldContext","createContext","withProvider","withContext","createSlotRecipeContext","FormFieldRootSlot","FormFieldLabelSlot","FormFieldInputSlot","FormFieldDescriptionSlot","FormFieldErrorSlot","FormFieldPopoverSlot","FormFieldRoot","forwardedRef","id","isInvalid","isRequired","isDisabled","isReadOnly","children","props","localRef","useRef","ref","useObjectRef","mergeRefs","context","setContext","useState","useFieldArgs","useMemo","args","labelProps","fieldProps","descriptionProps","errorMessageProps","useField","useEffect","prevContext","inputProps","contextValue","jsx","jsxs","DialogTrigger","Box","IconButton","HelpOutline","Popover","Dialog","Children","child","isValidElement","cloneElement","ErrorOutline","FormFieldLabel","labelSlotProps","useContext","FormFieldInput","inputSlotProps","FormFieldDescription","descriptionSlotProps","FormFieldError","errorSlotProps","FormFieldInfoBox","FormField"],"mappings":";;;;;;;;;AA6BO,MAAMA,IAAmB,gBAAAC,EAAoC;AAAA,EAClE,SAAS;AAAA,IACP,OAAO;AAAA,IACP,aAAa;AAAA,IACb,OAAO;AAAA,IACP,MAAM;AAAA,IACN,OAAO;AAAA,EAAA;AAAA,EAET,YAAY,MAAM;AAAA,EAAC;AACrB,CAAC,GC5BK,EAAE,cAAAC,GAAc,aAAAC,EAAA,IAAgB,gBAAAC,EAAwB;AAAA,EAC5D,KAAK;AACP,CAAC,GAGYC,IAAoB,gBAAAH,EAG/B,OAAO,MAAM,GAGFI,IAAqB,gBAAAH,EAGhC,OAAO,OAAO,GAGHI,KAAqB,gBAAAJ,EAGhC,OAAO,OAAO,GAGHK,KAA2B,gBAAAL,EAGtC,OAAO,aAAa,GAGTM,KAAqB,gBAAAN,EAGhC,OAAO,OAAO,GAGHO,KAAuB,gBAAAP,EAGlC,OAAO,SAAS,GCbLQ,IAAgB,SAAuB;AAAA,EAClD,KAAKC;AAAA,EACL,IAAAC;AAAA,EACA,WAAAC;AAAA,EACA,YAAAC;AAAA,E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A;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAuBP,SAASE;AACX;"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";const t=require("react"),l=require("react/jsx-runtime"),E=require("@chakra-ui/react"),x=require("./Dialog-Ye_7tQZU.cjs.js"),P=require("@commercetools/nimbus-icons"),k=require("./useObjectRef-4v2MxSjQ.cjs.js"),w=require("./useField-lK6K_h1G.cjs.js"),F=require("./box-CWni3A32.cjs.js"),z=require("./icon-button-BUmqYcIF.cjs.js"),u=t.createContext({context:{label:null,description:null,error:null,info:null,input:null},setContext:()=>{}}),{withProvider:A,withContext:p}=E.createSlotRecipeContext({key:"formField"}),D=A("div","root"),V=p("div","label"),_=p("div","input"),H=p("div","description"),O=p("div","error"),G=p("div","popover"),f=function({ref:i,id:o,isInvalid:r,isRequired:c,isDisabled:a,isReadOnly:d,children:v,...g}){const B=t.useRef(null),y=k.$df56164dff5785e2$export$4338b53315abf666(E.mergeRefs(B,i)),[e,S]=t.useState({label:null,description:null,error:null,info:null,input:null,isInvalid:r,isRequired:c,isDisabled:a,isReadOnly:d}),I=t.useMemo(()=>{const s={id:o,description:e.description,errorMessage:e.error};return e.label?s.label=e.label:(s["aria-label"]="empty-label",s["aria-labelledby"]="empty-label"),s},[o,e.description,e.error,e.label]),{labelProps:N,fieldProps:$,descriptionProps:M,errorMessageProps:L}=w.$2baaea4c71418dea$export$294aa081a6c6f55d(I);t.useEffect(()=>{S(s=>({...s,isInvalid:r,isRequired:c,isDisabled:a,isReadOnly:d}))},[r,c,a,d]);const R=t.useMemo(()=>({...$,isInvalid:r,isRequired:c,isDisabled:a,isReadOnly:d}),[$,r,c,a,d]),q=t.useMemo(()=>({context:e,setContext:S}),[e]);return l.jsx(u.Provider,{value:q,children:l.jsxs(D,{ref:y,...g,children:[e.label&&l.jsxs(V,{...e.labelSlotProps,children:[l.jsxs("label",{...N,children:[e.label,c&&l.jsx("sup",{"aria-hidden":"true",children:"*"})]}),e.info&&l.jsxs(x.$de32f1b87079253c$export$2e1e1122cf0cba88,{children:[l.jsx(F.Box,{as:"span",display:"inline-block",position:"relative",width:"1ch",height:"1ch",ml:"200",children:l.jsx(F.Box,{as:"span",display:"inline-flex",position:"absolute",top:"50%",right:"50%",transform:"translate(50%, -50%)",children:l.jsx(z.IconButton,{"aria-label":"__MORE INFO",size:"2xs",colorPalette:"info",variant:"link",children:l.jsx(P.HelpOutline,{})})})}),l.jsx(x.$07b14b47974efb58$export$5b6b19405a83ff9d,{children:l.jsx(G,{asChild:!0,children:l.jsx(x.$de32f1b87079253c$export$3ddf2d174ce01153,{children:l.jsx(F.Box,{p:"300",children:e.info})})})})]})]}),e.input&&l.jsx(_,{...e.inputSlotProps,children:t.Children.map(e.input,s=>t.isValidElement(s)?t.cloneElement(s,R):s)}),e.description&&l.jsx(H,{...M,...e.descriptionSlotProps,children:e.description}),r&&e.error&&l.jsxs(O,{...L,...e.errorSlotProps,children:[l.jsx(F.Box,{as:P.ErrorOutline,display:"inline-flex",boxSize:"400",verticalAlign:"text-bottom",mr:"100",alignSelf:"center"}),e.error]}),v]})})};f.displayName="FormField.Root";const m=({children:n,...i})=>{const{setContext:o}=t.useContext(u);return t.useEffect(()=>(o(r=>({...r,label:n,labelSlotProps:i})),()=>{o(r=>({...r,label:null,labelSlotProps:void 0}))}),[n,o]),null};m.displayName="FormField.Label";const b=({children:n,...i})=>{const{setContext:o}=t.useContext(u);return t.useEffect(()=>{o(r=>({...r,input:n,inputSlotProps:i}))},[n,o]),null};b.displayName="FormField.Input";const h=({children:n,...i})=>{const{setContext:o}=t.useContext(u);return t.useEffect(()=>(o(r=>({...r,description:n,descriptionSlotProps:i})),()=>{o(r=>({...r,description:null,descriptionSlotProps:void 0}))}),[n,o]),null};h.displayName="FormField.Description";const j=({children:n,...i})=>{const{setContext:o}=t.useContext(u);return t.useEffect(()=>(o(r=>({...r,error:n,errorSlotProps:i})),()=>{o(r=>({...r,error:null,errorSlotProps:void 0}))}),[n,o]),null};j.displayName="FormField.Error";const C=({children:n})=>{const{setContext:i}=t.useContext(u);return t.useEffect(()=>(i(o=>({...o,info:n})),()=>{i(o=>({...o,info:null}))}),[n,i]),null};C.displayName="FormField.InfoBox";const J={Root:f,Label:m,Input:b,Description:h,Error:j,InfoBox:C};exports.FormField=J;exports.FormFieldDescription=h;exports.FormFieldError=j;exports.FormFieldInfoBox=C;exports.FormFieldInput=b;exports.FormFieldLabel=m;exports.FormFieldRoot=f;
|
|
2
|
-
//# sourceMappingURL=form-field-lALRYL6D.cjs.js.map
|