@commercetools/nimbus 0.0.0-canary-20260116101948 → 0.0.0-canary-20260119090325
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-BnYe2z4W.es.js → CollectionBuilder-BOe312C_.es.js} +6 -6
- package/dist/chunks/{CollectionBuilder-BnYe2z4W.es.js.map → CollectionBuilder-BOe312C_.es.js.map} +1 -1
- package/dist/chunks/DateField-BxXzaXAv.cjs.js +2 -0
- package/dist/chunks/{DateField-D_ywBfBB.cjs.js.map → DateField-BxXzaXAv.cjs.js.map} +1 -1
- package/dist/chunks/{DateField-DMHI1uyM.es.js → DateField-DCWy1Ysp.es.js} +25 -24
- package/dist/chunks/{DateField-DMHI1uyM.es.js.map → DateField-DCWy1Ysp.es.js.map} +1 -1
- package/dist/chunks/{DatePicker-VyVWP-2-.es.js → DatePicker-CL72jbDo.es.js} +5 -5
- package/dist/chunks/{DatePicker-VyVWP-2-.es.js.map → DatePicker-CL72jbDo.es.js.map} +1 -1
- package/dist/chunks/{DatePicker-DdoSCY92.cjs.js → DatePicker-NWRDzwUt.cjs.js} +2 -2
- package/dist/chunks/{DatePicker-DdoSCY92.cjs.js.map → DatePicker-NWRDzwUt.cjs.js.map} +1 -1
- package/dist/chunks/{Dialog-BZs_dKan.es.js → Dialog-B0BQfdQa.es.js} +58 -58
- package/dist/chunks/{Dialog-BZs_dKan.es.js.map → Dialog-B0BQfdQa.es.js.map} +1 -1
- package/dist/chunks/{Dialog-DilDtCFc.cjs.js → Dialog-CSr6lHSd.cjs.js} +2 -2
- package/dist/chunks/{Dialog-DilDtCFc.cjs.js.map → Dialog-CSr6lHSd.cjs.js.map} +1 -1
- package/dist/chunks/{Header-2KETI4X9.es.js → Header-CiYtrnTw.es.js} +3 -3
- package/dist/chunks/{Header-2KETI4X9.es.js.map → Header-CiYtrnTw.es.js.map} +1 -1
- package/dist/chunks/{Heading-DDEPjNlF.es.js → Heading-BMsylHxq.es.js} +2 -2
- package/dist/chunks/{Heading-DDEPjNlF.es.js.map → Heading-BMsylHxq.es.js.map} +1 -1
- package/dist/chunks/{Heading-UZcOiBkN.cjs.js → Heading-C7J8IDnn.cjs.js} +2 -2
- package/dist/chunks/{Heading-UZcOiBkN.cjs.js.map → Heading-C7J8IDnn.cjs.js.map} +1 -1
- package/dist/chunks/{ListBox-DkaySjTS.es.js → ListBox-RrHJjnuq.es.js} +6 -6
- package/dist/chunks/{ListBox-DkaySjTS.es.js.map → ListBox-RrHJjnuq.es.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-DcbaiE5l.es.js → Modal-K4JEy19g.es.js} +3 -3
- package/dist/chunks/{Modal-DcbaiE5l.es.js.map → Modal-K4JEy19g.es.js.map} +1 -1
- package/dist/chunks/{Modal-CSjx-pPv.cjs.js → Modal-u97jKK9t.cjs.js} +2 -2
- package/dist/chunks/{Modal-CSjx-pPv.cjs.js.map → Modal-u97jKK9t.cjs.js.map} +1 -1
- package/dist/chunks/{SelectionManager-XpKaZHOS.es.js → SelectionManager-CX9btso_.es.js} +5 -5
- package/dist/chunks/{SelectionManager-XpKaZHOS.es.js.map → SelectionManager-CX9btso_.es.js.map} +1 -1
- package/dist/chunks/{Separator-DP89PKAS.es.js → Separator-x6wk4JUe.es.js} +2 -2
- package/dist/chunks/{Separator-DP89PKAS.es.js.map → Separator-x6wk4JUe.es.js.map} +1 -1
- package/dist/chunks/{accordion-C0MESyjK.es.js → accordion-Dh0RVlNx.es.js} +2 -2
- package/dist/chunks/{accordion-C0MESyjK.es.js.map → accordion-Dh0RVlNx.es.js.map} +1 -1
- package/dist/chunks/{accordion.content-DxOsZTFV.es.js → accordion.content-GGayEeqD.es.js} +2 -2
- package/dist/chunks/{accordion.content-DxOsZTFV.es.js.map → accordion.content-GGayEeqD.es.js.map} +1 -1
- package/dist/chunks/{alert-DVNh9ZZh.es.js → alert-DCgWOaY2.es.js} +50 -50
- 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/{button-CGhRXrYT.es.js → button-BEJnxXsL.es.js} +2 -2
- package/dist/chunks/{button-CGhRXrYT.es.js.map → button-BEJnxXsL.es.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-BClQfyiK.es.js → card-q5i119kB.es.js} +2 -2
- package/dist/chunks/{card-BClQfyiK.es.js.map → card-q5i119kB.es.js.map} +1 -1
- package/dist/chunks/{checkbox-C714rIb1.es.js → checkbox-CputcCVr.es.js} +2 -2
- package/dist/chunks/{checkbox-C714rIb1.es.js.map → checkbox-CputcCVr.es.js.map} +1 -1
- package/dist/chunks/{collapsible-motion-CfzVnfFa.es.js → collapsible-motion-DvtUDuxb.es.js} +2 -2
- package/dist/chunks/{collapsible-motion-CfzVnfFa.es.js.map → collapsible-motion-DvtUDuxb.es.js.map} +1 -1
- package/dist/chunks/combobox-Do4z66WO.cjs.js +2 -0
- package/dist/chunks/combobox-Do4z66WO.cjs.js.map +1 -0
- package/dist/chunks/{combobox-B_Qx3gRo.es.js → combobox-h1qOiDJD.es.js} +232 -222
- package/dist/chunks/combobox-h1qOiDJD.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-4Q4HP9cz.es.js → data-table-DA4SdIgU.es.js} +1186 -1192
- package/dist/chunks/data-table-DA4SdIgU.es.js.map +1 -0
- package/dist/chunks/{date-input-BYwVUYj2.es.js → date-input-Cd9q4qBj.es.js} +4 -4
- package/dist/chunks/{date-input-BYwVUYj2.es.js.map → date-input-Cd9q4qBj.es.js.map} +1 -1
- package/dist/chunks/{date-input-DnFinTEI.cjs.js → date-input-DkYcGwBy.cjs.js} +2 -2
- package/dist/chunks/{date-input-DnFinTEI.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-DDfKxFxE.es.js → date-range-picker-field-BuI6eLMY.es.js} +4 -4
- package/dist/chunks/{date-range-picker-field-DDfKxFxE.es.js.map → date-range-picker-field-BuI6eLMY.es.js.map} +1 -1
- package/dist/chunks/{date-range-picker-field-EKBwiCfz.cjs.js → date-range-picker-field-DcIo1YzI.cjs.js} +2 -2
- package/dist/chunks/{date-range-picker-field-EKBwiCfz.cjs.js.map → date-range-picker-field-DcIo1YzI.cjs.js.map} +1 -1
- package/dist/chunks/{dialog-D70n2Z4v.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-hEe1Td1r.cjs.js → draggable-list-fvTG-VYt.cjs.js} +3 -3
- package/dist/chunks/{draggable-list-C5rPnMr8.es.js.map → draggable-list-fvTG-VYt.cjs.js.map} +1 -1
- package/dist/chunks/{draggable-list-C5rPnMr8.es.js → draggable-list-z7a7tu_F.es.js} +349 -339
- package/dist/chunks/draggable-list-z7a7tu_F.es.js.map +1 -0
- package/dist/chunks/{drawer-CyVQICgN.es.js → drawer-BPcEUbUt.es.js} +94 -94
- 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-BUbbGs7l.es.js → extract-style-props-BdibuNZ7.es.js} +2 -2
- package/dist/chunks/{extract-style-props-BUbbGs7l.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-m9PmNrgJ.es.js → form-field-BfDU18h3.es.js} +7 -7
- package/dist/chunks/{form-field-m9PmNrgJ.es.js.map → form-field-BfDU18h3.es.js.map} +1 -1
- package/dist/chunks/{form-field-Cjpw2GQw.cjs.js → form-field-FdRNl2bZ.cjs.js} +2 -2
- package/dist/chunks/{form-field-Cjpw2GQw.cjs.js.map → form-field-FdRNl2bZ.cjs.js.map} +1 -1
- package/dist/chunks/{icon-button-CXRvSNxO.es.js → icon-button-CosIm3oY.es.js} +2 -2
- package/dist/chunks/{icon-button-CXRvSNxO.es.js.map → icon-button-CosIm3oY.es.js.map} +1 -1
- package/dist/chunks/{icon-toggle-button-BhzKiS9U.es.js → icon-toggle-button-8fX8JAXp.es.js} +2 -2
- package/dist/chunks/{icon-toggle-button-BhzKiS9U.es.js.map → icon-toggle-button-8fX8JAXp.es.js.map} +1 -1
- package/dist/chunks/{index-UVW-kSPu.es.js → index-C2qW4ynb.es.js} +3 -3
- package/dist/chunks/{index-UVW-kSPu.es.js.map → index-C2qW4ynb.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-Bb7wAuM8.cjs.js → menu-Dno8yFDE.cjs.js} +2 -2
- package/dist/chunks/{menu-Bb7wAuM8.cjs.js.map → menu-Dno8yFDE.cjs.js.map} +1 -1
- package/dist/chunks/{menu-BMnaUtPU.es.js → menu-Zlnps1eW.es.js} +5 -5
- package/dist/chunks/{menu-BMnaUtPU.es.js.map → menu-Zlnps1eW.es.js.map} +1 -1
- 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-D876xwrm.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-CkUVFul7.cjs.js → money-input-field-BGZ_9HKh.cjs.js} +2 -2
- package/dist/chunks/{money-input-field-CkUVFul7.cjs.js.map → money-input-field-BGZ_9HKh.cjs.js.map} +1 -1
- package/dist/chunks/{money-input-field-DsnyL34_.es.js → money-input-field-CSnaaDk-.es.js} +4 -4
- package/dist/chunks/{money-input-field-DsnyL34_.es.js.map → money-input-field-CSnaaDk-.es.js.map} +1 -1
- package/dist/chunks/{multiline-text-input-CHtsHJ-Y.es.js → multiline-text-input-CrDTYrM3.es.js} +3 -3
- package/dist/chunks/{multiline-text-input-CHtsHJ-Y.es.js.map → multiline-text-input-CrDTYrM3.es.js.map} +1 -1
- package/dist/chunks/{multiline-text-input-field-Czy-oJel.cjs.js → multiline-text-input-field-BX-w2v1Y.cjs.js} +2 -2
- package/dist/chunks/{multiline-text-input-field-Czy-oJel.cjs.js.map → multiline-text-input-field-BX-w2v1Y.cjs.js.map} +1 -1
- package/dist/chunks/{multiline-text-input-field-D5goi-7i.es.js → multiline-text-input-field-C6UTl_c8.es.js} +4 -4
- package/dist/chunks/{multiline-text-input-field-D5goi-7i.es.js.map → multiline-text-input-field-C6UTl_c8.es.js.map} +1 -1
- 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-BVq6t7j1.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-D8feRNKH.cjs.js → number-input-field-BDNpAP6t.cjs.js} +2 -2
- package/dist/chunks/{number-input-field-D8feRNKH.cjs.js.map → number-input-field-BDNpAP6t.cjs.js.map} +1 -1
- package/dist/chunks/{number-input-field-BqBsmhZg.es.js → number-input-field-C90uFO4e.es.js} +4 -4
- package/dist/chunks/{number-input-field-BqBsmhZg.es.js.map → number-input-field-C90uFO4e.es.js.map} +1 -1
- 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-2myF6wdP.cjs.js → password-input-field-B5lWzWAQ.cjs.js} +2 -2
- package/dist/chunks/{password-input-field-2myF6wdP.cjs.js.map → password-input-field-B5lWzWAQ.cjs.js.map} +1 -1
- package/dist/chunks/{password-input-field-CgkfaI7E.es.js → password-input-field-XXaNUALk.es.js} +4 -4
- package/dist/chunks/{password-input-field-CgkfaI7E.es.js.map → password-input-field-XXaNUALk.es.js.map} +1 -1
- package/dist/chunks/{popover-MW_SlCEP.es.js → popover-CuA9VugH.es.js} +2 -2
- package/dist/chunks/{popover-MW_SlCEP.es.js.map → popover-CuA9VugH.es.js.map} +1 -1
- package/dist/chunks/{popover-2KxMEf0s.cjs.js → popover-Dhg--8YC.cjs.js} +2 -2
- package/dist/chunks/{popover-2KxMEf0s.cjs.js.map → popover-Dhg--8YC.cjs.js.map} +1 -1
- package/dist/chunks/{progress-bar-QL-876RP.es.js → progress-bar-C2ZnGdLv.es.js} +2 -2
- package/dist/chunks/{progress-bar-QL-876RP.es.js.map → progress-bar-C2ZnGdLv.es.js.map} +1 -1
- package/dist/chunks/{radio-input-CjJwVVHd.es.js → radio-input-DV-hhL4S.es.js} +8 -8
- package/dist/chunks/{radio-input-CjJwVVHd.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-CdiPpvIA.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-CxbiRQfV.es.js → search-input-field-CEemw2P1.es.js} +4 -4
- package/dist/chunks/{search-input-field-CxbiRQfV.es.js.map → search-input-field-CEemw2P1.es.js.map} +1 -1
- package/dist/chunks/{search-input-field-CBzwVEI3.cjs.js → search-input-field-v60x1oiw.cjs.js} +2 -2
- package/dist/chunks/{search-input-field-CBzwVEI3.cjs.js.map → search-input-field-v60x1oiw.cjs.js.map} +1 -1
- package/dist/chunks/{select-DrkplYbs.es.js → select-D9yYDW0d.es.js} +243 -243
- 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-CN_ly_kW.es.js → separator-BJ9k_D4l.es.js} +4 -4
- package/dist/chunks/{separator-CN_ly_kW.es.js.map → separator-BJ9k_D4l.es.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/{switch-B_xUN9Bs.es.js → switch-Nn1Fbk5O.es.js} +3 -3
- package/dist/chunks/{switch-B_xUN9Bs.es.js.map → switch-Nn1Fbk5O.es.js.map} +1 -1
- package/dist/chunks/{tabs-CkZr6Jmu.es.js → tabs-D0OPeQ_J.es.js} +10 -10
- package/dist/chunks/{tabs-CkZr6Jmu.es.js.map → tabs-D0OPeQ_J.es.js.map} +1 -1
- package/dist/chunks/{tag-group-DrXuPS-n.es.js → tag-group-BE8d6xcP.es.js} +208 -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-input-BJzS6xDD.es.js → text-input-CCiZeQad.es.js} +3 -3
- package/dist/chunks/{text-input-BJzS6xDD.es.js.map → text-input-CCiZeQad.es.js.map} +1 -1
- package/dist/chunks/{text-input-field-D5-C6-_a.es.js → text-input-field-6Cj35cYL.es.js} +4 -4
- package/dist/chunks/{text-input-field-D5-C6-_a.es.js.map → text-input-field-6Cj35cYL.es.js.map} +1 -1
- package/dist/chunks/{text-input-field-ecy-VdRB.cjs.js → text-input-field-Cmht3hDK.cjs.js} +2 -2
- package/dist/chunks/{text-input-field-ecy-VdRB.cjs.js.map → text-input-field-Cmht3hDK.cjs.js.map} +1 -1
- package/dist/chunks/{time-input-v2Tg1CRp.cjs.js → time-input-9Q5vV4UD.cjs.js} +2 -2
- package/dist/chunks/{time-input-v2Tg1CRp.cjs.js.map → time-input-9Q5vV4UD.cjs.js.map} +1 -1
- package/dist/chunks/{time-input-DbWrpALN.es.js → time-input-CCuIFoY2.es.js} +4 -4
- package/dist/chunks/{time-input-DbWrpALN.es.js.map → time-input-CCuIFoY2.es.js.map} +1 -1
- package/dist/chunks/{toggle-button-DsGaTWXb.es.js → toggle-button-UcXy5q2C.es.js} +3 -3
- package/dist/chunks/{toggle-button-DsGaTWXb.es.js.map → toggle-button-UcXy5q2C.es.js.map} +1 -1
- package/dist/chunks/{toolbar-CyVt8Wsi.es.js → toolbar-C7-6gqba.es.js} +3 -3
- package/dist/chunks/{toolbar-CyVt8Wsi.es.js.map → toolbar-C7-6gqba.es.js.map} +1 -1
- package/dist/chunks/{useGridListItem-CoQB2TMS.cjs.js → useGridListItem-Bjqm2KGe.cjs.js} +2 -2
- package/dist/chunks/{useGridListItem-CoQB2TMS.cjs.js.map → useGridListItem-Bjqm2KGe.cjs.js.map} +1 -1
- package/dist/chunks/{useGridListItem-BghCdwwN.es.js → useGridListItem-CJrr2QNO.es.js} +4 -4
- package/dist/chunks/{useGridListItem-BghCdwwN.es.js.map → useGridListItem-CJrr2QNO.es.js.map} +1 -1
- package/dist/chunks/{useListState-6ejgSjM7.es.js → useListState-Dd0Mtev3.es.js} +2 -2
- package/dist/chunks/{useListState-6ejgSjM7.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.es.js +2 -2
- package/dist/components/alert/alert.messages.d.ts +6 -0
- 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/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.es.js +1 -1
- package/dist/components/checkbox.es.js +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 +14 -0
- package/dist/components/combo-box/intl/en.d.ts +14 -0
- package/dist/components/combo-box/intl/es.d.ts +14 -0
- package/dist/components/combo-box/intl/fr-FR.d.ts +14 -0
- package/dist/components/combo-box/intl/pt-BR.d.ts +14 -0
- package/dist/components/combobox/combobox.messages.d.ts +6 -0
- 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.cjs +1 -1
- package/dist/components/combobox.es.js +1 -1
- package/dist/components/components.es.js +1 -1
- package/dist/components/data-table/data-table.messages.d.ts +6 -0
- 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/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/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/drawer.messages.d.ts +6 -0
- 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/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 +7 -7
- package/dist/components/form-field.cjs +1 -1
- package/dist/components/form-field.es.js +1 -1
- package/dist/components/icon-button.es.js +1 -1
- package/dist/components/icon-toggle-button.es.js +1 -1
- package/dist/components/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.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-field.cjs +1 -1
- package/dist/components/money-input-field.es.js +1 -1
- package/dist/components/money-input.cjs +1 -1
- package/dist/components/money-input.es.js +1 -1
- package/dist/components/multiline-text-input-field.cjs +1 -1
- package/dist/components/multiline-text-input-field.es.js +1 -1
- package/dist/components/multiline-text-input.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 +1 -1
- package/dist/components/number-input-field.es.js +1 -1
- package/dist/components/number-input.cjs +1 -1
- package/dist/components/number-input.es.js +1 -1
- package/dist/components/pagination/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 +1 -1
- package/dist/components/password-input-field.es.js +1 -1
- package/dist/components/password-input.cjs +1 -1
- package/dist/components/password-input.es.js +1 -1
- package/dist/components/patterns.cjs +1 -1
- package/dist/components/patterns.es.js +7 -7
- package/dist/components/popover.cjs +1 -1
- package/dist/components/popover.es.js +1 -1
- package/dist/components/progress-bar.es.js +1 -1
- package/dist/components/radio-input.es.js +1 -1
- package/dist/components/range-calendar/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 +1 -1
- package/dist/components/search-input-field.es.js +1 -1
- package/dist/components/search-input.cjs +1 -1
- package/dist/components/search-input.es.js +1 -1
- package/dist/components/select/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.messages.d.ts +6 -0
- package/dist/components/select.cjs +1 -1
- package/dist/components/select.es.js +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.cjs +1 -1
- package/dist/components/split-button.es.js +1 -1
- package/dist/components/switch.es.js +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-input-field.cjs +1 -1
- package/dist/components/text-input-field.es.js +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.es.js +1 -1
- package/dist/components/toolbar.es.js +1 -1
- 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 +180 -180
- package/dist/utils/normalize-messages.d.ts +10 -0
- package/package.json +6 -6
- package/dist/chunks/DateField-D_ywBfBB.cjs.js +0 -2
- package/dist/chunks/alert-D4tX-OcR.cjs.js +0 -2
- package/dist/chunks/alert-D4tX-OcR.cjs.js.map +0 -1
- package/dist/chunks/alert-DVNh9ZZh.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-B8v5EUVK.es.js +0 -217
- package/dist/chunks/calendar-B8v5EUVK.es.js.map +0 -1
- package/dist/chunks/calendar-CiVIhTnF.cjs.js +0 -2
- package/dist/chunks/calendar-CiVIhTnF.cjs.js.map +0 -1
- package/dist/chunks/combobox-B_Qx3gRo.es.js.map +0 -1
- package/dist/chunks/combobox-DInM9yq3.cjs.js +0 -2
- package/dist/chunks/combobox-DInM9yq3.cjs.js.map +0 -1
- package/dist/chunks/data-table-4Q4HP9cz.es.js.map +0 -1
- package/dist/chunks/data-table-BIRJ5k7_.cjs.js +0 -2
- package/dist/chunks/data-table-BIRJ5k7_.cjs.js.map +0 -1
- package/dist/chunks/date-picker-BpjiOuWS.es.js +0 -218
- package/dist/chunks/date-picker-BpjiOuWS.es.js.map +0 -1
- package/dist/chunks/date-picker-Dut8OHjl.cjs.js +0 -2
- package/dist/chunks/date-picker-Dut8OHjl.cjs.js.map +0 -1
- package/dist/chunks/date-range-picker-CHZHQHZe.cjs.js +0 -2
- package/dist/chunks/date-range-picker-CHZHQHZe.cjs.js.map +0 -1
- package/dist/chunks/date-range-picker-f-_fag4t.es.js +0 -356
- package/dist/chunks/date-range-picker-f-_fag4t.es.js.map +0 -1
- package/dist/chunks/dialog-CJIPm3PE.cjs.js +0 -2
- package/dist/chunks/dialog-CJIPm3PE.cjs.js.map +0 -1
- package/dist/chunks/dialog-D70n2Z4v.es.js.map +0 -1
- package/dist/chunks/draggable-list-hEe1Td1r.cjs.js.map +0 -1
- package/dist/chunks/drawer-Bl0M98va.cjs.js +0 -2
- package/dist/chunks/drawer-Bl0M98va.cjs.js.map +0 -1
- package/dist/chunks/drawer-CyVQICgN.es.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/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-B1qPoFn3.es.js +0 -470
- package/dist/chunks/localized-field-B1qPoFn3.es.js.map +0 -1
- package/dist/chunks/localized-field-DYJRI5TY.cjs.js +0 -2
- package/dist/chunks/localized-field-DYJRI5TY.cjs.js.map +0 -1
- package/dist/chunks/money-input-0nJup2NP.cjs.js +0 -2
- package/dist/chunks/money-input-0nJup2NP.cjs.js.map +0 -1
- package/dist/chunks/money-input-D876xwrm.es.js.map +0 -1
- package/dist/chunks/nimbus-provider-CRTp8MQ2.es.js +0 -102
- package/dist/chunks/nimbus-provider-CRTp8MQ2.es.js.map +0 -1
- package/dist/chunks/nimbus-provider-pE_RwP9a.cjs.js +0 -2
- package/dist/chunks/nimbus-provider-pE_RwP9a.cjs.js.map +0 -1
- package/dist/chunks/number-input-BVq6t7j1.es.js.map +0 -1
- package/dist/chunks/number-input-ClPH8jSw.cjs.js +0 -2
- package/dist/chunks/number-input-ClPH8jSw.cjs.js.map +0 -1
- package/dist/chunks/pagination-BxHJknCr.es.js +0 -210
- package/dist/chunks/pagination-BxHJknCr.es.js.map +0 -1
- package/dist/chunks/pagination-DCC0XyhX.cjs.js +0 -2
- package/dist/chunks/pagination-DCC0XyhX.cjs.js.map +0 -1
- package/dist/chunks/password-input-DSv5pS26.cjs.js +0 -2
- package/dist/chunks/password-input-DSv5pS26.cjs.js.map +0 -1
- package/dist/chunks/password-input-NQVqLKTo.es.js +0 -54
- package/dist/chunks/password-input-NQVqLKTo.es.js.map +0 -1
- package/dist/chunks/range-calendar-BybIyx-9.es.js +0 -219
- package/dist/chunks/range-calendar-BybIyx-9.es.js.map +0 -1
- package/dist/chunks/range-calendar-DFs8cfYP.cjs.js +0 -2
- package/dist/chunks/range-calendar-DFs8cfYP.cjs.js.map +0 -1
- package/dist/chunks/rich-text-input-CJuQruOT.cjs.js +0 -4
- package/dist/chunks/rich-text-input-CJuQruOT.cjs.js.map +0 -1
- package/dist/chunks/rich-text-input-DTaul6rg.es.js +0 -1193
- package/dist/chunks/rich-text-input-DTaul6rg.es.js.map +0 -1
- package/dist/chunks/scoped-search-input-C87JBFtg.es.js +0 -152
- package/dist/chunks/scoped-search-input-C87JBFtg.es.js.map +0 -1
- package/dist/chunks/scoped-search-input-Ck7qrfBS.cjs.js +0 -2
- package/dist/chunks/scoped-search-input-Ck7qrfBS.cjs.js.map +0 -1
- package/dist/chunks/search-input-CdiPpvIA.es.js.map +0 -1
- package/dist/chunks/search-input-CkVlnfvh.cjs.js +0 -2
- package/dist/chunks/search-input-CkVlnfvh.cjs.js.map +0 -1
- package/dist/chunks/select-DqTNXz4B.cjs.js +0 -2
- package/dist/chunks/select-DqTNXz4B.cjs.js.map +0 -1
- package/dist/chunks/select-DrkplYbs.es.js.map +0 -1
- package/dist/chunks/split-button--8mZUaqB.es.js +0 -106
- package/dist/chunks/split-button--8mZUaqB.es.js.map +0 -1
- package/dist/chunks/split-button-CN_kydZc.cjs.js +0 -2
- package/dist/chunks/split-button-CN_kydZc.cjs.js.map +0 -1
- package/dist/chunks/tag-group-CVLufmbd.cjs.js +0 -2
- package/dist/chunks/tag-group-CVLufmbd.cjs.js.map +0 -1
- package/dist/chunks/tag-group-DrXuPS-n.es.js.map +0 -1
- 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/components/combobox/combobox.i18n.d.ts +0 -22
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";const r=require("react/jsx-runtime"),f=require("react"),j=require("./Dialog-DilDtCFc.cjs.js"),g=require("@chakra-ui/react/styled-system"),S=require("./index-CVXB9mwf.cjs.js"),N=require("./Button-DLCecw8f.cjs.js"),P=require("./extract-style-props-B4hqila-.cjs.js"),T=require("./Modal-CSjx-pPv.cjs.js"),O=require("./heading-DWweWKGQ.cjs.js"),B=require("@commercetools/nimbus-icons"),R=require("react-intl"),H=require("./icon-button-CeB8_Yyr.cjs.js"),{withProvider:I,withContext:n}=g.createSlotRecipeContext({recipe:S.drawerSlotRecipe}),M=I("div","root"),F=n("button","trigger"),E=n("div","modalOverlay"),V=n("div","modal"),k=n("div","content"),z=n("header","header"),A=n("div","body"),K=n("footer","footer"),L=n("h2","title"),G=n("div","closeTrigger"),$=f.createContext(void 0),J=()=>{const e=f.useContext($);if(!e)throw new Error("useDrawerContext must be used within Drawer.Root");return e},Q=({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:d=!1}=e,c=r.jsx(M,{...s,children:o}),w=f.Children.toArray(o).some(l=>{if(f.isValidElement(l)&&typeof l.type=="function"){const u=l.type?.displayName;return u==="DrawerTrigger"||u==="Drawer.Trigger"}return!1});return r.jsx(Q,{value:{...e,hasDrawerTrigger:w},children:w?r.jsx(j.$de32f1b87079253c$export$2e1e1122cf0cba88,{isOpen:a,onOpenChange:i,defaultOpen:d,children:c}):c})};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(F,{...a,asChild:!0,children:r.jsx(N.$d2b4bc8c273e7be6$export$353f5b6fc5456de1,{ref:e,...i,children:t})})};p.displayName="Drawer.Trigger";const x=e=>{const{ref:t,children:s,...o}=e,{hasDrawerTrigger:a,isDismissable:i=!0,isKeyboardDismissDisabled:d,shouldCloseOnInteractOutside:c,isOpen:w,onOpenChange:l,defaultOpen:u}=J(),v=a?{isDismissable:i,isKeyboardDismissDisabled:d,shouldCloseOnInteractOutside:c}:{isDismissable:i,isKeyboardDismissDisabled:d,shouldCloseOnInteractOutside:c,isOpen:w,onOpenChange:l,defaultOpen:u},[q]=P.extractStyleProps(o);return r.jsx(E,{asChild:!0,children:r.jsx(T.$f3f84453ead64de5$export$8948f78d83984c69,{...v,children:r.jsx(V,{asChild:!0,children:r.jsx(T.$f3f84453ead64de5$export$2b77a92f1a5ad772,{children:r.jsx(k,{asChild:!0,...q,children:r.jsx(j.$de32f1b87079253c$export$3ddf2d174ce01153,{ref:t,children:s})})})})})})};x.displayName="Drawer.Content";const h=e=>{const{ref:t,children:s,...o}=e;return r.jsx(z,{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(A,{ref:t,...a,...o,children:s})};y.displayName="Drawer.Body";const C=e=>{const{ref:t,children:s,...o}=e;return r.jsx(K,{ref:t,...o,children:s})};C.displayName="Drawer.Footer";const b=e=>{const{ref:t,children:s,...o}=e;return r.jsx(L,{asChild:!0,...o,children:r.jsx(O.Heading,{ref:t,slot:"title",as:"h2",textStyle:"lg",children:s})})};b.displayName="Drawer.Title";const U=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(G,{children:r.jsx(H.IconButton,{ref:t,slot:"close",size:"xs",variant:"ghost","aria-label":s||a.formatMessage(U.closeTrigger),...o,children:r.jsx(B.Close,{})})})};m.displayName="Drawer.CloseTrigger";const W={Root:D,Trigger:p,Content:x,Header:h,Body:y,Footer:C,Title:b,CloseTrigger:m};exports.Drawer=W;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-Bl0M98va.cjs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"drawer-Bl0M98va.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 /**\n * Internal flag indicating whether the drawer has a Drawer.Trigger component.\n * Used by DrawerContent to determine whether DialogTrigger is managing state.\n */\n hasDrawerTrigger?: boolean;\n};\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 // Also pass hasDrawerTrigger so DrawerContent knows whether to manage its own state\n return (\n <DrawerProvider value={{ ...props, hasDrawerTrigger }}>\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 configuration from context\n const {\n hasDrawerTrigger,\n isDismissable = true, // Default to true so clicking outside closes the drawer\n isKeyboardDismissDisabled,\n shouldCloseOnInteractOutside,\n isOpen,\n onOpenChange,\n defaultOpen,\n } = useDrawerRootContext();\n\n // When there's a Drawer.Trigger, DialogTrigger manages state via React Context\n // When there's NO Drawer.Trigger, ModalOverlay must manage its own state\n const modalProps = hasDrawerTrigger\n ? {\n // With trigger: Only pass dismissal props, state is managed by DialogTrigger\n isDismissable,\n isKeyboardDismissDisabled,\n shouldCloseOnInteractOutside,\n }\n : {\n // Without trigger: Pass state management props to ModalOverlay\n isDismissable,\n isKeyboardDismissDisabled,\n shouldCloseOnInteractOutside,\n isOpen,\n onOpenChange,\n defaultOpen,\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,cAAc,EAIVM,EAAkBN,EAG7B,MAAO,OAAO,EAIHO,EAAoBP,EAG/B,MAAO,SAAS,EAILQ,EAAmBR,EAC9B,SACA,QACF,EAIaS,EAAiBT,EAC5B,MACA,MACF,EAIaU,EAAmBV,EAC9B,SACA,QACF,EAIaW,EAAkBX,EAG7B,KAAM,OAAO,EAIFY,EAAyBZ,EAGpC,MAAO,cAAc,EChEVa,EAAgBC,EAAAA,cAC3B,MACF,EAOaC,EAAuB,IAA0B,CAC5D,MAAMC,EAAUC,EAAAA,WAAWJ,CAAa,EACxC,GAAI,CAACG,EACH,MAAM,IAAI,MAAM,kDAAkD,EAEpE,OAAOA,CACT,EAKaE,EAAiB,CAAC,CAC7B,SAAAC,EACA,MAAAC,CACF,IAISC,EAAAA,IAACR,EAAA,CAAc,MAAAO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,EAAgBhC,GAA6B,CACxD,KAAM,CAAE,IAAKc,EAAc,SAAAlB,EAAU,GAAGsB,GAAclB,EAEtD,aACGb,EAAA,CAAiB,IAAK2B,EAAe,GAAGI,EACtC,SAAAtB,EACH,CAEJ,EAEAoC,EAAa,YAAc,gBCTpB,MAAMC,EAAejC,GAA4B,CACtD,KAAM,CAAE,IAAKc,EAAc,SAAAlB,EAAU,GAAGsB,GAAclB,EAEtD,aACGZ,EAAA,CAAgB,QAAO,GAAE,GAAG8B,EAC3B,SAAApB,EAAAA,IAACoC,UAAA,CAAQ,IAAKpB,EAAc,KAAK,QAAQ,GAAG,KAAK,UAAU,KACxD,SAAAlB,EACH,EACF,CAEJ,EAEAqC,EAAY,YAAc,eCnBnB,MAAME,EAAWC,EAAAA,eAAe,CACrC,aAAc,CACZ,GAAI,6BACJ,YAAa,kDACb,eAAgB,cAAA,CAEpB,CAAC,ECIYC,EAAsBrC,GAAmC,CACpE,KAAM,CAAE,IAAKc,EAAc,aAAcwB,EAAW,GAAGpB,GAAclB,EAC/DuC,EAAOC,EAAAA,QAAA,EAEb,aACGnD,EAAA,CACC,SAAAS,EAAAA,IAAC2C,EAAAA,WAAA,CACC,IAAK3B,EACL,KAAK,QACL,KAAK,KACL,QAAQ,QACR,aAAYwB,GAAaC,EAAK,cAAcJ,EAAS,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 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"drawer-CyVQICgN.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 /**\n * Internal flag indicating whether the drawer has a Drawer.Trigger component.\n * Used by DrawerContent to determine whether DialogTrigger is managing state.\n */\n hasDrawerTrigger?: boolean;\n};\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 // Also pass hasDrawerTrigger so DrawerContent knows whether to manage its own state\n return (\n <DrawerProvider value={{ ...props, hasDrawerTrigger }}>\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 configuration from context\n const {\n hasDrawerTrigger,\n isDismissable = true, // Default to true so clicking outside closes the drawer\n isKeyboardDismissDisabled,\n shouldCloseOnInteractOutside,\n isOpen,\n onOpenChange,\n defaultOpen,\n } = useDrawerRootContext();\n\n // When there's a Drawer.Trigger, DialogTrigger manages state via React Context\n // When there's NO Drawer.Trigger, ModalOverlay must manage its own state\n const modalProps = hasDrawerTrigger\n ? {\n // With trigger: Only pass dismissal props, state is managed by DialogTrigger\n isDismissable,\n isKeyboardDismissDisabled,\n shouldCloseOnInteractOutside,\n }\n : {\n // Without trigger: Pass state management props to ModalOverlay\n isDismissable,\n isKeyboardDismissDisabled,\n shouldCloseOnInteractOutside,\n isOpen,\n onOpenChange,\n defaultOpen,\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,GChEVa,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,KAAiB,CAAC;AAAA,EAC7B,UAAAC;AAAA,EACA,OAAAC;AACF,MAIS,gBAAAC,EAACR,GAAA,EAAc,OAAAO,GAAe,UAAAD,EAAA,CAAS,GCjCnCG,IAAa,CAACC,MAA2B;AACpD,QAAMC,IAASC,EAAc,EAAE,QAAQvB,GAAkB,GAEnD,CAACwB,CAAW,IAAIF,EAAO,kBAAkBD,CAAK,GAE9C,EAAE,UAAAJ,GAAU,QAAAQ,GAAQ,cAAAC,GAAc,aAAAC,IAAc,OAAUN,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;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,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 true\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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AAuB,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 true\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,ECj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O,QAAQL,CAAM,EAAE,OAAO,CAAC,CAAA,CAAGM,CAAK,IAAMA,CAAK,EAGvE,OAAID,EAAa,SAAW,EAAU,KAGpCT,EAAAA,IAACX,EAAA,CAAgB,GAAAc,EAAQ,KAAK,QAAS,GAAGK,EACvC,SAAAC,EAAa,IAAI,CAAC,CAACZ,EAAKa,CAAK,IAAM,CAElC,MAAMC,EAAqBL,IAAcT,EAAKa,CAAK,EACnD,GAAIC,EACF,OACEX,EAAAA,IAACV,EAAA,CACE,SAAAqB,CAAA,EADsBd,CAEzB,EAKJ,MAAMe,EAAsBL,IAAqBV,EAAKa,CAAK,EAC3D,GAAIE,EACF,OACEZ,EAAAA,IAACV,EAAA,CACE,SAAAsB,CAAA,EADsBf,CAEzB,EAKJ,MAAMgB,EAAgBjB,EAAiBC,EAAKC,CAAc,EAC1D,GAAIe,EACF,OACEb,EAAAA,IAACV,EAAA,CAA8B,SAAAuB,CAAA,EAANhB,CAAoB,EAKjD,MAAMiB,EAAiBf,EAAkBF,CAAG,EAC5C,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,59 +0,0 @@
|
|
|
1
|
-
import { jsx as e, jsxs as i } from "react/jsx-runtime";
|
|
2
|
-
import { createRecipeContext as d } from "@chakra-ui/react";
|
|
3
|
-
import { defineMessages as p, useIntl as l } from "react-intl";
|
|
4
|
-
import { $ as c } from "./useProgressBar--OvVKto2.es.js";
|
|
5
|
-
import { $ as g } from "./mergeProps-Dsl8k3Ig.es.js";
|
|
6
|
-
const { withContext: C } = /* @__PURE__ */ d({ key: "loadingSpinner" }), f = /* @__PURE__ */ C("div"), m = /* @__PURE__ */ p({
|
|
7
|
-
defaultLoadingMessage: {
|
|
8
|
-
id: "Nimbus.LoadingSpinner.default",
|
|
9
|
-
description: "Default loading message for loading spinners",
|
|
10
|
-
defaultMessage: "Loading data"
|
|
11
|
-
}
|
|
12
|
-
}), L = "M22.5 12C22.5 13.3789 22.2284 14.7443 21.7007 16.0182C21.1731 17.2921 20.3996 18.4496 19.4246 19.4246C18.4496 20.3996 17.2921 21.1731 16.0182 21.7007C14.7443 22.2284 13.3789 22.5 12 22.5C10.6211 22.5 9.25574 22.2284 7.98182 21.7007C6.7079 21.1731 5.55039 20.3996 4.57538 19.4246C3.60036 18.4496 2.82694 17.2921 2.29926 16.0182C1.77159 14.7443 1.5 13.3789 1.5 12C1.5 10.6211 1.77159 9.25574 2.29927 7.98182C2.82694 6.7079 3.60037 5.55039 4.57538 4.57538C5.5504 3.60036 6.70791 2.82694 7.98183 2.29926C9.25575 1.77159 10.6211 1.5 12 1.5C13.3789 1.5 14.7443 1.77159 16.0182 2.29927C17.2921 2.82694 18.4496 3.60037 19.4246 4.57538C20.3996 5.5504 21.1731 6.70791 21.7007 7.98183C22.2284 9.25575 22.5 10.6211 22.5 12L22.5 12Z", u = "M12 1.5C13.3789 1.5 14.7443 1.77159 16.0182 2.29927C17.2921 2.82694 18.4496 3.60036 19.4246 4.57538C20.3996 5.55039 21.1731 6.70791 21.7007 7.98183C22.2284 9.25574 22.5 10.6211 22.5 12", h = (o) => {
|
|
13
|
-
const t = l(), {
|
|
14
|
-
ref: r,
|
|
15
|
-
"aria-label": n = t.formatMessage(
|
|
16
|
-
m.defaultLoadingMessage
|
|
17
|
-
),
|
|
18
|
-
...a
|
|
19
|
-
} = o, { progressBarProps: s } = c({
|
|
20
|
-
isIndeterminate: !0,
|
|
21
|
-
"aria-label": n,
|
|
22
|
-
...a
|
|
23
|
-
});
|
|
24
|
-
return /* @__PURE__ */ e(
|
|
25
|
-
f,
|
|
26
|
-
{
|
|
27
|
-
ref: r,
|
|
28
|
-
...g(a, s),
|
|
29
|
-
"aria-label": n,
|
|
30
|
-
children: /* @__PURE__ */ i("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "none", children: [
|
|
31
|
-
/* @__PURE__ */ e(
|
|
32
|
-
"path",
|
|
33
|
-
{
|
|
34
|
-
d: L,
|
|
35
|
-
"data-svg-path": "spinner-circle",
|
|
36
|
-
strokeWidth: "3",
|
|
37
|
-
strokeLinecap: "round",
|
|
38
|
-
strokeLinejoin: "round"
|
|
39
|
-
}
|
|
40
|
-
),
|
|
41
|
-
/* @__PURE__ */ e(
|
|
42
|
-
"path",
|
|
43
|
-
{
|
|
44
|
-
d: u,
|
|
45
|
-
"data-svg-path": "spinner-pointer",
|
|
46
|
-
strokeWidth: "3",
|
|
47
|
-
strokeLinecap: "round",
|
|
48
|
-
strokeLinejoin: "round"
|
|
49
|
-
}
|
|
50
|
-
)
|
|
51
|
-
] })
|
|
52
|
-
}
|
|
53
|
-
);
|
|
54
|
-
};
|
|
55
|
-
h.displayName = "LoadingSpinner";
|
|
56
|
-
export {
|
|
57
|
-
h as L
|
|
58
|
-
};
|
|
59
|
-
//# sourceMappingURL=loading-spinner-DF6c3rBM.es.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"loading-spinner-DF6c3rBM.es.js","sources":["../../src/components/loading-spinner/loading-spinner.slots.tsx","../../src/components/loading-spinner/loading-spinner.i18n.ts","../../src/components/loading-spinner/loading-spinner.tsx"],"sourcesContent":["import { createRecipeContext } from \"@chakra-ui/react\";\nimport type { LoadingSpinnerRootSlotProps } from \"./loading-spinner.types\";\n\nconst { withContext } = createRecipeContext({ key: \"loadingSpinner\" });\n\n/**\n * Root component that provides the styling context for the LoadingSpinner component.\n * Uses Chakra UI's recipe context system for consistent styling across instances.\n */\nexport const LoadingSpinnerRoot = withContext<\n HTMLDivElement,\n LoadingSpinnerRootSlotProps\n>(\"div\");\n","import { defineMessages } from \"react-intl\";\n\nexport const messages = defineMessages({\n defaultLoadingMessage: {\n id: \"Nimbus.LoadingSpinner.default\",\n description: \"Default loading message for loading spinners\",\n defaultMessage: \"Loading data\",\n },\n});\n","import { mergeProps, useProgressBar } from \"react-aria\";\nimport { LoadingSpinnerRoot } from \"./loading-spinner.slots\";\nimport type { LoadingSpinnerProps } from \"./loading-spinner.types\";\nimport { messages } from \"./loading-spinner.i18n\";\nimport { useIntl } from \"react-intl\";\n\nconst circlePath =\n \"M22.5 12C22.5 13.3789 22.2284 14.7443 21.7007 16.0182C21.1731 17.2921 20.3996 18.4496 19.4246 19.4246C18.4496 20.3996 17.2921 21.1731 16.0182 21.7007C14.7443 22.2284 13.3789 22.5 12 22.5C10.6211 22.5 9.25574 22.2284 7.98182 21.7007C6.7079 21.1731 5.55039 20.3996 4.57538 19.4246C3.60036 18.4496 2.82694 17.2921 2.29926 16.0182C1.77159 14.7443 1.5 13.3789 1.5 12C1.5 10.6211 1.77159 9.25574 2.29927 7.98182C2.82694 6.7079 3.60037 5.55039 4.57538 4.57538C5.5504 3.60036 6.70791 2.82694 7.98183 2.29926C9.25575 1.77159 10.6211 1.5 12 1.5C13.3789 1.5 14.7443 1.77159 16.0182 2.29927C17.2921 2.82694 18.4496 3.60037 19.4246 4.57538C20.3996 5.5504 21.1731 6.70791 21.7007 7.98183C22.2284 9.25575 22.5 10.6211 22.5 12L22.5 12Z\";\nconst pointerPath =\n \"M12 1.5C13.3789 1.5 14.7443 1.77159 16.0182 2.29927C17.2921 2.82694 18.4496 3.60036 19.4246 4.57538C20.3996 5.55039 21.1731 6.70791 21.7007 7.98183C22.2284 9.25574 22.5 10.6211 22.5 12\";\n\n/**\n * # LoadingSpinner\n *\n * Indicates ongoing processes or loading states\n *\n * @see {@link https://nimbus-documentation.vercel.app/components/feedback/loadingspinner}\n */\nexport const LoadingSpinner = (props: LoadingSpinnerProps) => {\n const intl = useIntl();\n const {\n ref,\n \"aria-label\": ariaLabel = intl.formatMessage(\n messages.defaultLoadingMessage\n ),\n ...restProps\n } = props;\n const { progressBarProps } = useProgressBar({\n isIndeterminate: true,\n \"aria-label\": ariaLabel,\n ...restProps,\n });\n\n return (\n <LoadingSpinnerRoot\n ref={ref}\n {...mergeProps(restProps, progressBarProps)}\n aria-label={ariaLabel}\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\">\n <path\n d={circlePath}\n data-svg-path=\"spinner-circle\"\n strokeWidth=\"3\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n <path\n d={pointerPath}\n data-svg-path=\"spinner-pointer\"\n strokeWidth=\"3\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n </LoadingSpinnerRoot>\n );\n};\n\nLoadingSpinner.displayName = \"LoadingSpinner\";\n"],"names":["withContext","createRecipeContext","LoadingSpinnerRoot","messages","defineMessages","circlePath","pointerPath","LoadingSpinner","props","intl","useIntl","ref","ariaLabel","restProps","progressBarProps","useProgressBar","jsx","mergeProps"],"mappings":";;;;;AAGA,MAAM,EAAE,aAAAA,EAAA,IAAgB,gBAAAC,EAAoB,EAAE,KAAK,kBAAkB,GAMxDC,IAAqB,gBAAAF,EAGhC,KAAK,GCVMG,IAAW,gBAAAC,EAAe;AAAA,EACrC,uBAAuB;AAAA,IACrB,IAAI;AAAA,IACJ,aAAa;AAAA,IACb,gBAAgB;AAAA,EAAA;AAEpB,CAAC,GCFKC,IACJ,mtBACIC,IACJ,4LASWC,IAAiB,CAACC,MAA+B;AAC5D,QAAMC,IAAOC,EAAA,GACP;AAAA,IACJ,KAAAC;AAAA,IACA,cAAcC,IAAYH,EAAK;AAAA,MAC7BN,EAAS;AAAA,IAAA;AAAA,IAEX,GAAGU;AAAA,EAAA,IACDL,GACE,EAAE,kBAAAM,EAAA,IAAqBC,EAAe;AAAA,IAC1C,iBAAiB;AAAA,IACjB,cAAcH;AAAA,IACd,GAAGC;AAAA,EAAA,CACJ;AAED,SACE,gBAAAG;AAAA,IAACd;AAAA,IAAA;AAAA,MACC,KAAAS;AAAA,MACC,GAAGM,EAAWJ,GAAWC,CAAgB;AAAA,MAC1C,cAAYF;AAAA,MAEZ,4BAAC,OAAA,EAAI,OAAM,8BAA6B,SAAQ,aAAY,MAAK,QAC/D,UAAA;AAAA,QAAA,gBAAAI;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,GAAGX;AAAA,YACH,iBAAc;AAAA,YACd,aAAY;AAAA,YACZ,eAAc;AAAA,YACd,gBAAe;AAAA,UAAA;AAAA,QAAA;AAAA,QAEjB,gBAAAW;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,GAAGV;AAAA,YACH,iBAAc;AAAA,YACd,aAAY;AAAA,YACZ,eAAc;AAAA,YACd,gBAAe;AAAA,UAAA;AAAA,QAAA;AAAA,MACjB,EAAA,CACF;AAAA,IAAA;AAAA,EAAA;AAGN;AAEAC,EAAe,cAAc;"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";const e=require("react/jsx-runtime"),c=require("@chakra-ui/react"),r=require("react-intl"),p=require("./useProgressBar-C_mJ1JKi.cjs.js"),g=require("./mergeProps-CxnHrnow.cjs.js"),{withContext:l}=c.createRecipeContext({key:"loadingSpinner"}),C=l("div"),u=r.defineMessages({defaultLoadingMessage:{id:"Nimbus.LoadingSpinner.default",description:"Default loading message for loading spinners",defaultMessage:"Loading data"}}),f="M22.5 12C22.5 13.3789 22.2284 14.7443 21.7007 16.0182C21.1731 17.2921 20.3996 18.4496 19.4246 19.4246C18.4496 20.3996 17.2921 21.1731 16.0182 21.7007C14.7443 22.2284 13.3789 22.5 12 22.5C10.6211 22.5 9.25574 22.2284 7.98182 21.7007C6.7079 21.1731 5.55039 20.3996 4.57538 19.4246C3.60036 18.4496 2.82694 17.2921 2.29926 16.0182C1.77159 14.7443 1.5 13.3789 1.5 12C1.5 10.6211 1.77159 9.25574 2.29927 7.98182C2.82694 6.7079 3.60037 5.55039 4.57538 4.57538C5.5504 3.60036 6.70791 2.82694 7.98183 2.29926C9.25575 1.77159 10.6211 1.5 12 1.5C13.3789 1.5 14.7443 1.77159 16.0182 2.29927C17.2921 2.82694 18.4496 3.60037 19.4246 4.57538C20.3996 5.5504 21.1731 6.70791 21.7007 7.98183C22.2284 9.25575 22.5 10.6211 22.5 12L22.5 12Z",L="M12 1.5C13.3789 1.5 14.7443 1.77159 16.0182 2.29927C17.2921 2.82694 18.4496 3.60036 19.4246 4.57538C20.3996 5.55039 21.1731 6.70791 21.7007 7.98183C22.2284 9.25574 22.5 10.6211 22.5 12",t=a=>{const i=r.useIntl(),{ref:o,"aria-label":n=i.formatMessage(u.defaultLoadingMessage),...s}=a,{progressBarProps:d}=p.$204d9ebcedfb8806$export$ed5abd763a836edc({isIndeterminate:!0,"aria-label":n,...s});return e.jsx(C,{ref:o,...g.$3ef42575df84b30b$export$9d1611c77c2fe928(s,d),"aria-label":n,children:e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",children:[e.jsx("path",{d:f,"data-svg-path":"spinner-circle",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:L,"data-svg-path":"spinner-pointer",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round"})]})})};t.displayName="LoadingSpinner";exports.LoadingSpinner=t;
|
|
2
|
-
//# sourceMappingURL=loading-spinner-DsKcjJ2b.cjs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"loading-spinner-DsKcjJ2b.cjs.js","sources":["../../src/components/loading-spinner/loading-spinner.slots.tsx","../../src/components/loading-spinner/loading-spinner.i18n.ts","../../src/components/loading-spinner/loading-spinner.tsx"],"sourcesContent":["import { createRecipeContext } from \"@chakra-ui/react\";\nimport type { LoadingSpinnerRootSlotProps } from \"./loading-spinner.types\";\n\nconst { withContext } = createRecipeContext({ key: \"loadingSpinner\" });\n\n/**\n * Root component that provides the styling context for the LoadingSpinner component.\n * Uses Chakra UI's recipe context system for consistent styling across instances.\n */\nexport const LoadingSpinnerRoot = withContext<\n HTMLDivElement,\n LoadingSpinnerRootSlotProps\n>(\"div\");\n","import { defineMessages } from \"react-intl\";\n\nexport const messages = defineMessages({\n defaultLoadingMessage: {\n id: \"Nimbus.LoadingSpinner.default\",\n description: \"Default loading message for loading spinners\",\n defaultMessage: \"Loading data\",\n },\n});\n","import { mergeProps, useProgressBar } from \"react-aria\";\nimport { LoadingSpinnerRoot } from \"./loading-spinner.slots\";\nimport type { LoadingSpinnerProps } from \"./loading-spinner.types\";\nimport { messages } from \"./loading-spinner.i18n\";\nimport { useIntl } from \"react-intl\";\n\nconst circlePath =\n \"M22.5 12C22.5 13.3789 22.2284 14.7443 21.7007 16.0182C21.1731 17.2921 20.3996 18.4496 19.4246 19.4246C18.4496 20.3996 17.2921 21.1731 16.0182 21.7007C14.7443 22.2284 13.3789 22.5 12 22.5C10.6211 22.5 9.25574 22.2284 7.98182 21.7007C6.7079 21.1731 5.55039 20.3996 4.57538 19.4246C3.60036 18.4496 2.82694 17.2921 2.29926 16.0182C1.77159 14.7443 1.5 13.3789 1.5 12C1.5 10.6211 1.77159 9.25574 2.29927 7.98182C2.82694 6.7079 3.60037 5.55039 4.57538 4.57538C5.5504 3.60036 6.70791 2.82694 7.98183 2.29926C9.25575 1.77159 10.6211 1.5 12 1.5C13.3789 1.5 14.7443 1.77159 16.0182 2.29927C17.2921 2.82694 18.4496 3.60037 19.4246 4.57538C20.3996 5.5504 21.1731 6.70791 21.7007 7.98183C22.2284 9.25575 22.5 10.6211 22.5 12L22.5 12Z\";\nconst pointerPath =\n \"M12 1.5C13.3789 1.5 14.7443 1.77159 16.0182 2.29927C17.2921 2.82694 18.4496 3.60036 19.4246 4.57538C20.3996 5.55039 21.1731 6.70791 21.7007 7.98183C22.2284 9.25574 22.5 10.6211 22.5 12\";\n\n/**\n * # LoadingSpinner\n *\n * Indicates ongoing processes or loading states\n *\n * @see {@link https://nimbus-documentation.vercel.app/components/feedback/loadingspinner}\n */\nexport const LoadingSpinner = (props: LoadingSpinnerProps) => {\n const intl = useIntl();\n const {\n ref,\n \"aria-label\": ariaLabel = intl.formatMessage(\n messages.defaultLoadingMessage\n ),\n ...restProps\n } = props;\n const { progressBarProps } = useProgressBar({\n isIndeterminate: true,\n \"aria-label\": ariaLabel,\n ...restProps,\n });\n\n return (\n <LoadingSpinnerRoot\n ref={ref}\n {...mergeProps(restProps, progressBarProps)}\n aria-label={ariaLabel}\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\">\n <path\n d={circlePath}\n data-svg-path=\"spinner-circle\"\n strokeWidth=\"3\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n <path\n d={pointerPath}\n data-svg-path=\"spinner-pointer\"\n strokeWidth=\"3\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n </LoadingSpinnerRoot>\n );\n};\n\nLoadingSpinner.displayName = \"LoadingSpinner\";\n"],"names":["withContext","createRecipeContext","LoadingSpinnerRoot","messages","defineMessages","circlePath","pointerPath","LoadingSpinner","props","intl","useIntl","ref","ariaLabel","restProps","progressBarProps","useProgressBar","jsx","mergeProps"],"mappings":"gMAGM,CAAE,YAAAA,CAAA,EAAgBC,EAAAA,oBAAoB,CAAE,IAAK,iBAAkB,EAMxDC,EAAqBF,EAGhC,KAAK,ECVMG,EAAWC,EAAAA,eAAe,CACrC,sBAAuB,CACrB,GAAI,gCACJ,YAAa,+CACb,eAAgB,cAAA,CAEpB,CAAC,ECFKC,EACJ,ktBACIC,EACJ,2LASWC,EAAkBC,GAA+B,CAC5D,MAAMC,EAAOC,EAAAA,QAAA,EACP,CACJ,IAAAC,EACA,aAAcC,EAAYH,EAAK,cAC7BN,EAAS,qBAAA,EAEX,GAAGU,CAAA,EACDL,EACE,CAAE,iBAAAM,CAAA,EAAqBC,4CAAe,CAC1C,gBAAiB,GACjB,aAAcH,EACd,GAAGC,CAAA,CACJ,EAED,OACEG,EAAAA,IAACd,EAAA,CACC,IAAAS,EACC,GAAGM,EAAAA,0CAAWJ,EAAWC,CAAgB,EAC1C,aAAYF,EAEZ,gBAAC,MAAA,CAAI,MAAM,6BAA6B,QAAQ,YAAY,KAAK,OAC/D,SAAA,CAAAI,EAAAA,IAAC,OAAA,CACC,EAAGX,EACH,gBAAc,iBACd,YAAY,IACZ,cAAc,QACd,eAAe,OAAA,CAAA,EAEjBW,EAAAA,IAAC,OAAA,CACC,EAAGV,EACH,gBAAc,kBACd,YAAY,IACZ,cAAc,QACd,eAAe,OAAA,CAAA,CACjB,CAAA,CACF,CAAA,CAAA,CAGN,EAEAC,EAAe,YAAc"}
|