@commercetools/nimbus 0.0.0-canary-20250904053156 → 0.0.0-canary-20250916130207
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/accordion.d.ts +53 -88
- package/dist/chunks/{Button-CNBS3n5a.es.js → Button-BVaauB-c.es.js} +7 -7
- package/dist/chunks/{Button-CNBS3n5a.es.js.map → Button-BVaauB-c.es.js.map} +1 -1
- package/dist/chunks/Button-BtJHe9xY.cjs.js.map +1 -1
- package/dist/chunks/{DateField-Dm2Qlhbk.es.js → DateField-CoKm-f2B.es.js} +23 -23
- package/dist/chunks/{DateField-Dm2Qlhbk.es.js.map → DateField-CoKm-f2B.es.js.map} +1 -1
- package/dist/chunks/DateField-rweHHCKR.cjs.js.map +1 -1
- package/dist/chunks/{DatePicker-B1Unwe6C.es.js → DatePicker-Df8zjP9h.es.js} +23 -23
- package/dist/chunks/{DatePicker-B1Unwe6C.es.js.map → DatePicker-Df8zjP9h.es.js.map} +1 -1
- package/dist/chunks/{DatePicker-_aG-c1ms.cjs.js → DatePicker-e_53Dtsm.cjs.js} +2 -2
- package/dist/chunks/{DatePicker-_aG-c1ms.cjs.js.map → DatePicker-e_53Dtsm.cjs.js.map} +1 -1
- package/dist/chunks/{Dialog-C9HXv1rP.es.js → Dialog-Cva4CZ0O.es.js} +25 -25
- package/dist/chunks/{Dialog-C9HXv1rP.es.js.map → Dialog-Cva4CZ0O.es.js.map} +1 -1
- package/dist/chunks/{Dialog-DZm5Sj40.cjs.js → Dialog-K19USc7c.cjs.js} +2 -2
- package/dist/chunks/{Dialog-DZm5Sj40.cjs.js.map → Dialog-K19USc7c.cjs.js.map} +1 -1
- package/dist/chunks/{DragAndDrop-ChYb3tCX.es.js → DragAndDrop-Bbd4HbfU.es.js} +3 -3
- package/dist/chunks/{DragAndDrop-ChYb3tCX.es.js.map → DragAndDrop-Bbd4HbfU.es.js.map} +1 -1
- package/dist/chunks/DragAndDrop-cOfUfFj8.cjs.js.map +1 -1
- package/dist/chunks/FieldError-CXcEMuBf.es.js.map +1 -1
- package/dist/chunks/FieldError-DyGFfqST.cjs.js.map +1 -1
- package/dist/chunks/FocusScope-DPn5XtSy.cjs.js.map +1 -1
- package/dist/chunks/{FocusScope-CNO0fzPs.es.js → FocusScope-LBESYsSE.es.js} +5 -5
- package/dist/chunks/{FocusScope-CNO0fzPs.es.js.map → FocusScope-LBESYsSE.es.js.map} +1 -1
- package/dist/chunks/Form-BuOomA4T.cjs.js.map +1 -1
- package/dist/chunks/Form-CXcEMuBf.es.js.map +1 -1
- package/dist/chunks/{Group-Cfixd-fh.es.js → Group-DUCWhg7j.es.js} +5 -5
- package/dist/chunks/{Group-Cfixd-fh.es.js.map → Group-DUCWhg7j.es.js.map} +1 -1
- package/dist/chunks/Group-MdeByg6t.cjs.js.map +1 -1
- package/dist/chunks/{Header-CZkkXWBA.es.js → Header-Cfm2XlNT.es.js} +5 -5
- package/dist/chunks/{Header-CZkkXWBA.es.js.map → Header-Cfm2XlNT.es.js.map} +1 -1
- package/dist/chunks/{Header-D24AtheW.cjs.js → Header-zz3aj0c7.cjs.js} +2 -2
- package/dist/chunks/{Header-D24AtheW.cjs.js.map → Header-zz3aj0c7.cjs.js.map} +1 -1
- package/dist/chunks/{Heading-DEfy_f01.es.js → Heading-BX1t1Kmm.es.js} +15 -15
- package/dist/chunks/{Heading-DEfy_f01.es.js.map → Heading-BX1t1Kmm.es.js.map} +1 -1
- package/dist/chunks/Heading-BaW6t55l.cjs.js.map +1 -1
- package/dist/chunks/Hidden-CNJIJ63M.cjs.js.map +1 -1
- package/dist/chunks/Hidden-j3Lbt7xL.es.js.map +1 -1
- package/dist/chunks/{Input-BiHwUBo4.es.js → Input-FFG42ja6.es.js} +5 -5
- package/dist/chunks/{Input-BiHwUBo4.es.js.map → Input-FFG42ja6.es.js.map} +1 -1
- package/dist/chunks/Input-HBDt7LmM.cjs.js.map +1 -1
- package/dist/chunks/Keyboard-Clnp4zAC.es.js.map +1 -1
- package/dist/chunks/Keyboard-rYf2KxZN.cjs.js.map +1 -1
- package/dist/chunks/{Label-B2YyCdLl.es.js → Label-BdaLJ5Ha.es.js} +2 -2
- package/dist/chunks/{Label-B2YyCdLl.es.js.map → Label-BdaLJ5Ha.es.js.map} +1 -1
- package/dist/chunks/Label-BgrYyYXn.cjs.js.map +1 -1
- package/dist/chunks/{ListBox-Dnuz2Daa.cjs.js → ListBox-BHUS7cW2.cjs.js} +2 -2
- package/dist/chunks/{ListBox-Dnuz2Daa.cjs.js.map → ListBox-BHUS7cW2.cjs.js.map} +1 -1
- package/dist/chunks/{ListBox-DWMnhpDd.es.js → ListBox-BinkXiqM.es.js} +15 -15
- package/dist/chunks/{ListBox-DWMnhpDd.es.js.map → ListBox-BinkXiqM.es.js.map} +1 -1
- package/dist/chunks/OverlayArrow-CYjyBtg8.cjs.js.map +1 -1
- package/dist/chunks/{OverlayArrow-sJzRZNbO.es.js → OverlayArrow-Kk4VWzmN.es.js} +3 -3
- package/dist/chunks/{OverlayArrow-sJzRZNbO.es.js.map → OverlayArrow-Kk4VWzmN.es.js.map} +1 -1
- package/dist/chunks/ProgressBar-BA3sLh1k.cjs.js.map +1 -1
- package/dist/chunks/{ProgressBar-DjaUQI7N.es.js → ProgressBar-CwFHab_J.es.js} +5 -5
- package/dist/chunks/{ProgressBar-DjaUQI7N.es.js.map → ProgressBar-CwFHab_J.es.js.map} +1 -1
- package/dist/chunks/RSPContexts-B4yvXuBR.es.js.map +1 -1
- package/dist/chunks/RSPContexts-CkSl9jRK.cjs.js.map +1 -1
- package/dist/chunks/SSRProvider-Bc-sMhsT.cjs.js.map +1 -1
- package/dist/chunks/{SSRProvider-Cu8KibIK.es.js → SSRProvider-v-LddFEs.es.js} +2 -2
- package/dist/chunks/{SSRProvider-Cu8KibIK.es.js.map → SSRProvider-v-LddFEs.es.js.map} +1 -1
- package/dist/chunks/{SelectionManager-CtwcAiw4.es.js → SelectionManager-C-DrFCWk.es.js} +11 -11
- package/dist/chunks/{SelectionManager-CtwcAiw4.es.js.map → SelectionManager-C-DrFCWk.es.js.map} +1 -1
- package/dist/chunks/{SelectionManager-x0j8UpyW.cjs.js → SelectionManager-CmUHDDN6.cjs.js} +2 -2
- package/dist/chunks/{SelectionManager-x0j8UpyW.cjs.js.map → SelectionManager-CmUHDDN6.cjs.js.map} +1 -1
- package/dist/chunks/Separator-CTkcgvBE.cjs.js +18 -0
- package/dist/chunks/{Separator-CcMEmnGS.cjs.js.map → Separator-CTkcgvBE.cjs.js.map} +1 -1
- package/dist/chunks/{Separator-BCuq0iz5.es.js → Separator-D9Sio9QB.es.js} +7 -7
- package/dist/chunks/{Separator-BCuq0iz5.es.js.map → Separator-D9Sio9QB.es.js.map} +1 -1
- package/dist/chunks/Text-BWSfeB9p.cjs.js.map +1 -1
- package/dist/chunks/Text-DOcU1ycg.es.js.map +1 -1
- package/dist/chunks/TextArea-D3FFXnUy.cjs.js.map +1 -1
- package/dist/chunks/{TextArea-BmpgvS0R.es.js → TextArea-VPSW7sXC.es.js} +5 -5
- package/dist/chunks/{TextArea-BmpgvS0R.es.js.map → TextArea-VPSW7sXC.es.js.map} +1 -1
- package/dist/chunks/ToggleButton-CPAdPTCr.cjs.js.map +1 -1
- package/dist/chunks/{ToggleButton-C3JL0pgD.es.js → ToggleButton-CRaJMq4q.es.js} +7 -7
- package/dist/chunks/{ToggleButton-C3JL0pgD.es.js.map → ToggleButton-CRaJMq4q.es.js.map} +1 -1
- package/dist/chunks/{VisuallyHidden-VHEPK04F.es.js → VisuallyHidden-B0NiNh0E.es.js} +3 -3
- package/dist/chunks/{VisuallyHidden-VHEPK04F.es.js.map → VisuallyHidden-B0NiNh0E.es.js.map} +1 -1
- package/dist/chunks/VisuallyHidden-Bv_AJXZ7.cjs.js.map +1 -1
- package/dist/chunks/accordion-D06jBMOb.es.js +276 -0
- package/dist/chunks/accordion-D06jBMOb.es.js.map +1 -0
- package/dist/chunks/accordion-PyQH8Q_y.cjs.js +2 -0
- package/dist/chunks/accordion-PyQH8Q_y.cjs.js.map +1 -0
- package/dist/chunks/alert-BhezYOzs.cjs.js +2 -0
- package/dist/chunks/alert-BhezYOzs.cjs.js.map +1 -0
- package/dist/chunks/{alert-fGOiy9nj.es.js → alert-L8PXimjc.es.js} +59 -52
- package/dist/chunks/alert-L8PXimjc.es.js.map +1 -0
- package/dist/chunks/{badge-BJd-Q81M.es.js → badge-CHmfeeRs.es.js} +2 -2
- package/dist/chunks/{badge-BJd-Q81M.es.js.map → badge-CHmfeeRs.es.js.map} +1 -1
- package/dist/chunks/{button-DEgBQobR.es.js → button-BXR4T980.es.js} +7 -7
- package/dist/chunks/{button-DEgBQobR.es.js.map → button-BXR4T980.es.js.map} +1 -1
- package/dist/chunks/{button-DJYITnqc.cjs.js → button-BooV4ncX.cjs.js} +2 -2
- package/dist/chunks/{button-DJYITnqc.cjs.js.map → button-BooV4ncX.cjs.js.map} +1 -1
- package/dist/chunks/{calendar-Csq6ml4F.es.js → calendar-DBk-sVXs.es.js} +11 -11
- package/dist/chunks/{calendar-Csq6ml4F.es.js.map → calendar-DBk-sVXs.es.js.map} +1 -1
- package/dist/chunks/{calendar-BdL5nJXs.cjs.js → calendar-Dyy7Fm8f.cjs.js} +2 -2
- package/dist/chunks/{calendar-BdL5nJXs.cjs.js.map → calendar-Dyy7Fm8f.cjs.js.map} +1 -1
- package/dist/chunks/{card-BfUdf1Fy.es.js → card-D9fWUQqs.es.js} +3 -3
- package/dist/chunks/{card-BfUdf1Fy.es.js.map → card-D9fWUQqs.es.js.map} +1 -1
- package/dist/chunks/{checkbox-D-x7pyAC.cjs.js → checkbox-DDB06avu.cjs.js} +2 -2
- package/dist/chunks/{checkbox-D-x7pyAC.cjs.js.map → checkbox-DDB06avu.cjs.js.map} +1 -1
- package/dist/chunks/{checkbox-BFQXCWuz.es.js → checkbox-Vo5d1nT3.es.js} +10 -10
- package/dist/chunks/{checkbox-BFQXCWuz.es.js.map → checkbox-Vo5d1nT3.es.js.map} +1 -1
- package/dist/chunks/{combobox-DXzhNwE_.es.js → combobox-7BYJqsr6.es.js} +31 -31
- package/dist/chunks/{combobox-DXzhNwE_.es.js.map → combobox-7BYJqsr6.es.js.map} +1 -1
- package/dist/chunks/{combobox-Zdlr1WyV.cjs.js → combobox-BNYcRoYl.cjs.js} +2 -2
- package/dist/chunks/{combobox-Zdlr1WyV.cjs.js.map → combobox-BNYcRoYl.cjs.js.map} +1 -1
- package/dist/chunks/{context-R4YUlO9Y.es.js → context-DHW7D0wv.es.js} +2 -2
- package/dist/chunks/{context-R4YUlO9Y.es.js.map → context-DHW7D0wv.es.js.map} +1 -1
- package/dist/chunks/context-OoV8SSWX.cjs.js.map +1 -1
- package/dist/chunks/{data-table-M8ZE7bUF.es.js → data-table-6OCmas4y.es.js} +28 -28
- package/dist/chunks/{data-table-M8ZE7bUF.es.js.map → data-table-6OCmas4y.es.js.map} +1 -1
- package/dist/chunks/{data-table-DjXI7oCC.cjs.js → data-table-DFhiLq16.cjs.js} +2 -2
- package/dist/chunks/{data-table-DjXI7oCC.cjs.js.map → data-table-DFhiLq16.cjs.js.map} +1 -1
- package/dist/chunks/{date-input-C4NM5AFC.cjs.js → date-input-DaemC1P1.cjs.js} +2 -2
- package/dist/chunks/{date-input-C4NM5AFC.cjs.js.map → date-input-DaemC1P1.cjs.js.map} +1 -1
- package/dist/chunks/{date-input-BGa-cgj-.es.js → date-input-DzpneTE3.es.js} +4 -4
- package/dist/chunks/{date-input-BGa-cgj-.es.js.map → date-input-DzpneTE3.es.js.map} +1 -1
- package/dist/chunks/date-picker-Bmlxwhhp.es.js +222 -0
- package/dist/chunks/date-picker-Bmlxwhhp.es.js.map +1 -0
- package/dist/chunks/date-picker-Bqf7Y-W-.cjs.js +2 -0
- package/dist/chunks/date-picker-Bqf7Y-W-.cjs.js.map +1 -0
- package/dist/chunks/{date-range-picker-DLEQGtgO.cjs.js → date-range-picker-DHnuq-hT.cjs.js} +2 -2
- package/dist/chunks/{date-range-picker-DLEQGtgO.cjs.js.map → date-range-picker-DHnuq-hT.cjs.js.map} +1 -1
- package/dist/chunks/{date-range-picker-DL00UKjF.es.js → date-range-picker-b-Qkz44d.es.js} +15 -15
- package/dist/chunks/{date-range-picker-DL00UKjF.es.js.map → date-range-picker-b-Qkz44d.es.js.map} +1 -1
- package/dist/chunks/{divider-BdtT_f-U.es.js → divider-C11VwZPX.es.js} +3 -3
- package/dist/chunks/{divider-BdtT_f-U.es.js.map → divider-C11VwZPX.es.js.map} +1 -1
- package/dist/chunks/{divider-o2LVtQJm.cjs.js → divider-Lm98hgn6.cjs.js} +2 -2
- package/dist/chunks/{divider-o2LVtQJm.cjs.js.map → divider-Lm98hgn6.cjs.js.map} +1 -1
- package/dist/chunks/emotion-is-prop-valid.esm-BUuA3iy8.es.js +16 -0
- package/dist/chunks/emotion-is-prop-valid.esm-BUuA3iy8.es.js.map +1 -0
- package/dist/chunks/emotion-is-prop-valid.esm-ux_11lix.cjs.js +2 -0
- package/dist/chunks/emotion-is-prop-valid.esm-ux_11lix.cjs.js.map +1 -0
- package/dist/chunks/{extractStyleProps-bWKBkEco.cjs.js → extractStyleProps-CDKV7i5o.cjs.js} +2 -2
- package/dist/chunks/{extractStyleProps-bWKBkEco.cjs.js.map → extractStyleProps-CDKV7i5o.cjs.js.map} +1 -1
- package/dist/chunks/{extractStyleProps-CFQKiz8b.es.js → extractStyleProps-vXiS8lCp.es.js} +2 -2
- package/dist/chunks/{extractStyleProps-CFQKiz8b.es.js.map → extractStyleProps-vXiS8lCp.es.js.map} +1 -1
- package/dist/chunks/filterDOMProps-BSVCO5jK.es.js.map +1 -1
- package/dist/chunks/filterDOMProps-WUskt27c.cjs.js.map +1 -1
- package/dist/chunks/{focusSafely-DJpphVHF.es.js → focusSafely-DS3RePi9.es.js} +3 -3
- package/dist/chunks/{focusSafely-DJpphVHF.es.js.map → focusSafely-DS3RePi9.es.js.map} +1 -1
- package/dist/chunks/focusSafely-jDMW9aEx.cjs.js.map +1 -1
- package/dist/chunks/focusWithoutScrolling-BlyUcXdY.cjs.js.map +1 -1
- package/dist/chunks/focusWithoutScrolling-CDw3JYiq.es.js.map +1 -1
- package/dist/chunks/{form-field-DDTIZj9s.es.js → form-field-BF03DSg5.es.js} +4 -4
- package/dist/chunks/{form-field-DDTIZj9s.es.js.map → form-field-BF03DSg5.es.js.map} +1 -1
- package/dist/chunks/{form-field-D1lcT5f5.cjs.js → form-field-DMiHuyrx.cjs.js} +2 -2
- package/dist/chunks/{form-field-D1lcT5f5.cjs.js.map → form-field-DMiHuyrx.cjs.js.map} +1 -1
- package/dist/chunks/{group-CqfSQXe7.es.js → group-FqYM3Go1.es.js} +2 -2
- package/dist/chunks/{group-CqfSQXe7.es.js.map → group-FqYM3Go1.es.js.map} +1 -1
- package/dist/chunks/{icon-button-CPXhdrQY.cjs.js → icon-button-CFLScvMi.cjs.js} +2 -2
- package/dist/chunks/{icon-button-CPXhdrQY.cjs.js.map → icon-button-CFLScvMi.cjs.js.map} +1 -1
- package/dist/chunks/{icon-button-DPtCLr1A.es.js → icon-button-CKidhzN0.es.js} +2 -2
- package/dist/chunks/{icon-button-DPtCLr1A.es.js.map → icon-button-CKidhzN0.es.js.map} +1 -1
- package/dist/chunks/{icon-toggle-button-BItuQ_Lh.es.js → icon-toggle-button-CfrW8nn2.es.js} +2 -2
- package/dist/chunks/{icon-toggle-button-BItuQ_Lh.es.js.map → icon-toggle-button-CfrW8nn2.es.js.map} +1 -1
- package/dist/chunks/{icon-toggle-button-BG-F1KE7.cjs.js → icon-toggle-button-DJsMgc_N.cjs.js} +2 -2
- package/dist/chunks/{icon-toggle-button-BG-F1KE7.cjs.js.map → icon-toggle-button-DJsMgc_N.cjs.js.map} +1 -1
- package/dist/chunks/{index-BDXHumM1.es.js → index-BZioZQfA.es.js} +15 -8
- package/dist/chunks/index-BZioZQfA.es.js.map +1 -0
- package/dist/chunks/index-QBeUpHcK.cjs.js +4 -0
- package/dist/chunks/index-QBeUpHcK.cjs.js.map +1 -0
- package/dist/chunks/intlStrings-Cd44R5hT.es.js.map +1 -1
- package/dist/chunks/intlStrings-ClBuC6xN.cjs.js.map +1 -1
- package/dist/chunks/{kbd-BXN9aXRE.es.js → kbd-D10CDyIE.es.js} +2 -2
- package/dist/chunks/{kbd-BXN9aXRE.es.js.map → kbd-D10CDyIE.es.js.map} +1 -1
- package/dist/chunks/{link-CFK97sc0.es.js → link-CwFZrz1A.es.js} +4 -4
- package/dist/chunks/{link-CFK97sc0.es.js.map → link-CwFZrz1A.es.js.map} +1 -1
- package/dist/chunks/link-DWa1zIUJ.cjs.js.map +1 -1
- package/dist/chunks/loading-spinner-CSKBo1bM.cjs.js +2 -0
- package/dist/chunks/loading-spinner-CSKBo1bM.cjs.js.map +1 -0
- package/dist/chunks/{loading-spinner-CvggCl-H.es.js → loading-spinner-D3xWum_0.es.js} +29 -16
- package/dist/chunks/loading-spinner-D3xWum_0.es.js.map +1 -0
- package/dist/chunks/{make-element-focusable-C4ZHUSEU.es.js → make-element-focusable-BjLmsXKn.es.js} +3 -3
- package/dist/chunks/{make-element-focusable-C4ZHUSEU.es.js.map → make-element-focusable-BjLmsXKn.es.js.map} +1 -1
- package/dist/chunks/{menu-aLEA43vB.es.js → menu-DZVU5Z-r.es.js} +7 -7
- package/dist/chunks/{menu-aLEA43vB.es.js.map → menu-DZVU5Z-r.es.js.map} +1 -1
- package/dist/chunks/{menu-DxXsyeUG.cjs.js → menu-bzi7WVh0.cjs.js} +2 -2
- package/dist/chunks/{menu-DxXsyeUG.cjs.js.map → menu-bzi7WVh0.cjs.js.map} +1 -1
- package/dist/chunks/mergeProps-BA5Cwf5w.cjs.js.map +1 -1
- package/dist/chunks/{mergeProps-B_9syxhT.es.js → mergeProps-uJMZqSEt.es.js} +2 -2
- package/dist/chunks/{mergeProps-B_9syxhT.es.js.map → mergeProps-uJMZqSEt.es.js.map} +1 -1
- package/dist/chunks/{multiline-text-input-sr-8f5JV.es.js → multiline-text-input-BxC-HBJS.es.js} +4 -4
- package/dist/chunks/{multiline-text-input-sr-8f5JV.es.js.map → multiline-text-input-BxC-HBJS.es.js.map} +1 -1
- package/dist/chunks/{multiline-text-input-z1pACPVX.cjs.js → multiline-text-input-XDsu-5Ir.cjs.js} +2 -2
- package/dist/chunks/{multiline-text-input-z1pACPVX.cjs.js.map → multiline-text-input-XDsu-5Ir.cjs.js.map} +1 -1
- package/dist/chunks/{nimbus-provider-ClSAgdoD.cjs.js → nimbus-provider-DU9neylH.cjs.js} +2 -2
- package/dist/chunks/{nimbus-provider-ClSAgdoD.cjs.js.map → nimbus-provider-DU9neylH.cjs.js.map} +1 -1
- package/dist/chunks/{nimbus-provider-DaWtjnp-.es.js → nimbus-provider-mSQ00EQj.es.js} +3 -3
- package/dist/chunks/{nimbus-provider-DaWtjnp-.es.js.map → nimbus-provider-mSQ00EQj.es.js.map} +1 -1
- package/dist/chunks/number-DHvo-MDe.cjs.js.map +1 -1
- package/dist/chunks/number-dMxJejI6.es.js.map +1 -1
- package/dist/chunks/{number-input-D4DKdybl.es.js → number-input-86JlfGyD.es.js} +311 -297
- package/dist/chunks/number-input-86JlfGyD.es.js.map +1 -0
- package/dist/chunks/number-input-C6V-OoKY.cjs.js +2 -0
- package/dist/chunks/number-input-C6V-OoKY.cjs.js.map +1 -0
- package/dist/chunks/openLink-Ctl0AdAy.es.js.map +1 -1
- package/dist/chunks/openLink-DkCJYbzq.cjs.js.map +1 -1
- package/dist/chunks/pagination-D-PpTgDZ.es.js +160 -0
- package/dist/chunks/pagination-D-PpTgDZ.es.js.map +1 -0
- package/dist/chunks/pagination-DFmOo7da.cjs.js +2 -0
- package/dist/chunks/pagination-DFmOo7da.cjs.js.map +1 -0
- package/dist/chunks/password-input-BVDnOfvR.cjs.js +2 -0
- package/dist/chunks/password-input-BVDnOfvR.cjs.js.map +1 -0
- package/dist/chunks/password-input-BizG9N1_.es.js +67 -0
- package/dist/chunks/password-input-BizG9N1_.es.js.map +1 -0
- package/dist/chunks/platform-BDLy2vDY.cjs.js.map +1 -1
- package/dist/chunks/platform-Z5fvtFmM.es.js.map +1 -1
- package/dist/chunks/{progress-bar-Wka_eryr.es.js → progress-bar-8JDUwg7A.es.js} +4 -4
- package/dist/chunks/{progress-bar-Wka_eryr.es.js.map → progress-bar-8JDUwg7A.es.js.map} +1 -1
- package/dist/chunks/{progress-bar-Dz8r8vuu.cjs.js → progress-bar-EQdUUcCZ.cjs.js} +2 -2
- package/dist/chunks/{progress-bar-Dz8r8vuu.cjs.js.map → progress-bar-EQdUUcCZ.cjs.js.map} +1 -1
- package/dist/chunks/{radio-input-B0qTg-Fb.es.js → radio-input-CSatNmXz.es.js} +18 -18
- package/dist/chunks/{radio-input-B0qTg-Fb.es.js.map → radio-input-CSatNmXz.es.js.map} +1 -1
- package/dist/chunks/{radio-input-D_pe6uBJ.cjs.js → radio-input-CpWPWVHJ.cjs.js} +2 -2
- package/dist/chunks/{radio-input-D_pe6uBJ.cjs.js.map → radio-input-CpWPWVHJ.cjs.js.map} +1 -1
- package/dist/chunks/{range-calendar-CoAszOTq.es.js → range-calendar-6mWVLehI.es.js} +11 -11
- package/dist/chunks/{range-calendar-CoAszOTq.es.js.map → range-calendar-6mWVLehI.es.js.map} +1 -1
- package/dist/chunks/{range-calendar-T1Wlvm-Z.cjs.js → range-calendar-jXa_w-79.cjs.js} +2 -2
- package/dist/chunks/{range-calendar-T1Wlvm-Z.cjs.js.map → range-calendar-jXa_w-79.cjs.js.map} +1 -1
- package/dist/chunks/rich-text-input-B3s6cy-T.cjs.js +2 -0
- package/dist/chunks/rich-text-input-B3s6cy-T.cjs.js.map +1 -0
- package/dist/chunks/{rich-text-input-9MdutxJr.es.js → rich-text-input-D4cP13Oo.es.js} +182 -195
- package/dist/chunks/rich-text-input-D4cP13Oo.es.js.map +1 -0
- package/dist/chunks/scrollIntoView-BzIqpHLO.cjs.js.map +1 -1
- package/dist/chunks/{scrollIntoView-BYF_8_6g.es.js → scrollIntoView-DW7gkKpB.es.js} +2 -2
- package/dist/chunks/{scrollIntoView-BYF_8_6g.es.js.map → scrollIntoView-DW7gkKpB.es.js.map} +1 -1
- package/dist/chunks/select-BAV0cdM5.cjs.js +2 -0
- package/dist/chunks/select-BAV0cdM5.cjs.js.map +1 -0
- package/dist/chunks/{select-Dz2O_cFR.es.js → select-BEko2rwu.es.js} +124 -114
- package/dist/chunks/select-BEko2rwu.es.js.map +1 -0
- package/dist/chunks/slate-helpers-BwRHJO4o.es.js +6919 -0
- package/dist/chunks/slate-helpers-BwRHJO4o.es.js.map +1 -0
- package/dist/chunks/slate-helpers-CMAwCMk0.cjs.js +24 -0
- package/dist/chunks/slate-helpers-CMAwCMk0.cjs.js.map +1 -0
- package/dist/chunks/split-button-1uPesHKO.cjs.js +2 -0
- package/dist/chunks/split-button-1uPesHKO.cjs.js.map +1 -0
- package/dist/chunks/split-button-BR8DktKd.es.js +101 -0
- package/dist/chunks/split-button-BR8DktKd.es.js.map +1 -0
- package/dist/chunks/{switch-BToNhl42.cjs.js → switch-BjdhpPWV.cjs.js} +2 -2
- package/dist/chunks/{switch-BToNhl42.cjs.js.map → switch-BjdhpPWV.cjs.js.map} +1 -1
- package/dist/chunks/{switch-Poa2k7a5.es.js → switch-D08_asL7.es.js} +7 -7
- package/dist/chunks/{switch-Poa2k7a5.es.js.map → switch-D08_asL7.es.js.map} +1 -1
- package/dist/chunks/{tag-group-BCNooINR.es.js → tag-group-C8xH9Mqk.es.js} +22 -22
- package/dist/chunks/{tag-group-BCNooINR.es.js.map → tag-group-C8xH9Mqk.es.js.map} +1 -1
- package/dist/chunks/{tag-group-DzXa9m7w.cjs.js → tag-group-D6_THomO.cjs.js} +2 -2
- package/dist/chunks/{tag-group-DzXa9m7w.cjs.js.map → tag-group-D6_THomO.cjs.js.map} +1 -1
- package/dist/chunks/{text-DfQpupDi.es.js → text-Bi4Gre95.es.js} +2 -2
- package/dist/chunks/{text-DfQpupDi.es.js.map → text-Bi4Gre95.es.js.map} +1 -1
- package/dist/chunks/{text-input-5jfm2V1Y.cjs.js → text-input-BtBwAmoa.cjs.js} +2 -2
- package/dist/chunks/{text-input-5jfm2V1Y.cjs.js.map → text-input-BtBwAmoa.cjs.js.map} +1 -1
- package/dist/chunks/{text-input-Dqx8GVHm.es.js → text-input-bPh9j1cv.es.js} +5 -5
- package/dist/chunks/{text-input-Dqx8GVHm.es.js.map → text-input-bPh9j1cv.es.js.map} +1 -1
- package/dist/chunks/{time-input-B_PIpe-Z.cjs.js → time-input-DP2ci38H.cjs.js} +2 -2
- package/dist/chunks/{time-input-B_PIpe-Z.cjs.js.map → time-input-DP2ci38H.cjs.js.map} +1 -1
- package/dist/chunks/{time-input-DxKFrUee.es.js → time-input-Dg7SfITo.es.js} +3 -3
- package/dist/chunks/{time-input-DxKFrUee.es.js.map → time-input-Dg7SfITo.es.js.map} +1 -1
- package/dist/chunks/{toggle-button-Cg00z4JT.cjs.js → toggle-button-D8qdeoHu.cjs.js} +2 -2
- package/dist/chunks/{toggle-button-Cg00z4JT.cjs.js.map → toggle-button-D8qdeoHu.cjs.js.map} +1 -1
- package/dist/chunks/{toggle-button-C1bAVGF3.es.js → toggle-button-DeqTwBN5.es.js} +5 -5
- package/dist/chunks/{toggle-button-C1bAVGF3.es.js.map → toggle-button-DeqTwBN5.es.js.map} +1 -1
- package/dist/chunks/{toggle-button-group-jRdpdYyd.es.js → toggle-button-group-DXmJCAH5.es.js} +2 -2
- package/dist/chunks/{toggle-button-group-jRdpdYyd.es.js.map → toggle-button-group-DXmJCAH5.es.js.map} +1 -1
- package/dist/chunks/{toolbar-ClUkHnY4.cjs.js → toolbar-BfEvyuOt.cjs.js} +2 -2
- package/dist/chunks/{toolbar-ClUkHnY4.cjs.js.map → toolbar-BfEvyuOt.cjs.js.map} +1 -1
- package/dist/chunks/{toolbar-Oxkd8pfI.es.js → toolbar-Dv9YKOSU.es.js} +6 -6
- package/dist/chunks/{toolbar-Oxkd8pfI.es.js.map → toolbar-Dv9YKOSU.es.js.map} +1 -1
- package/dist/chunks/{tooltip-B1YdruCE.es.js → tooltip-BE3LzL7I.es.js} +8 -8
- package/dist/chunks/{tooltip-B1YdruCE.es.js.map → tooltip-BE3LzL7I.es.js.map} +1 -1
- package/dist/chunks/tooltip-g8-hEdZp.cjs.js.map +1 -1
- package/dist/chunks/use-formatting-state-Denpy3Zo.cjs.js +2 -0
- package/dist/chunks/use-formatting-state-Denpy3Zo.cjs.js.map +1 -0
- package/dist/chunks/use-formatting-state-RJvSR-Zg.es.js +247 -0
- package/dist/chunks/use-formatting-state-RJvSR-Zg.es.js.map +1 -0
- package/dist/chunks/useButton-BgBfaV_L.cjs.js.map +1 -1
- package/dist/chunks/{useButton-DAeSjgg9.es.js → useButton-CYfXo2Jm.es.js} +4 -4
- package/dist/chunks/{useButton-DAeSjgg9.es.js.map → useButton-CYfXo2Jm.es.js.map} +1 -1
- package/dist/chunks/{useCollator-BHMZd1r6.es.js → useCollator-Y-oU82PA.es.js} +2 -2
- package/dist/chunks/{useCollator-BHMZd1r6.es.js.map → useCollator-Y-oU82PA.es.js.map} +1 -1
- package/dist/chunks/useCollator-YVJAe1GI.cjs.js.map +1 -1
- package/dist/chunks/useControlledState-D0L6S_5r.cjs.js.map +1 -1
- package/dist/chunks/useControlledState-u436Wbp1.es.js.map +1 -1
- package/dist/chunks/{useDateFormatter-C7Kxzwro.es.js → useDateFormatter-BuXtxdR1.es.js} +3 -3
- package/dist/chunks/{useDateFormatter-C7Kxzwro.es.js.map → useDateFormatter-BuXtxdR1.es.js.map} +1 -1
- package/dist/chunks/useDateFormatter-CS19Cch2.cjs.js.map +1 -1
- package/dist/chunks/{useEvent-YHhqZvpU.es.js → useEvent-Bxxy8Y3o.es.js} +2 -2
- package/dist/chunks/{useEvent-YHhqZvpU.es.js.map → useEvent-Bxxy8Y3o.es.js.map} +1 -1
- package/dist/chunks/useEvent-CuUOU5WV.cjs.js.map +1 -1
- package/dist/chunks/useField-DmqO9k7a.cjs.js.map +1 -1
- package/dist/chunks/{useField-Ce9zQxmx.es.js → useField-Do87rtEk.es.js} +3 -3
- package/dist/chunks/{useField-Ce9zQxmx.es.js.map → useField-Do87rtEk.es.js.map} +1 -1
- package/dist/chunks/useFilter-CG8lxfCP.cjs.js.map +1 -1
- package/dist/chunks/{useFilter-DOfNzeZ9.es.js → useFilter-ClBjQ7pb.es.js} +2 -2
- package/dist/chunks/{useFilter-DOfNzeZ9.es.js.map → useFilter-ClBjQ7pb.es.js.map} +1 -1
- package/dist/chunks/{useFocus-DkWJ2TJC.es.js → useFocus-BmMqaBAE.es.js} +2 -2
- package/dist/chunks/{useFocus-DkWJ2TJC.es.js.map → useFocus-BmMqaBAE.es.js.map} +1 -1
- package/dist/chunks/useFocus-BtJ38vev.cjs.js.map +1 -1
- package/dist/chunks/useFocusRing-CzFer4bD.cjs.js.map +1 -1
- package/dist/chunks/{useFocusRing-updnkDQg.es.js → useFocusRing-SQNQ9yn0.es.js} +4 -4
- package/dist/chunks/{useFocusRing-updnkDQg.es.js.map → useFocusRing-SQNQ9yn0.es.js.map} +1 -1
- package/dist/chunks/{useFocusVisible-CWDaG0ze.es.js → useFocusVisible-BrqHqmb9.es.js} +3 -3
- package/dist/chunks/{useFocusVisible-CWDaG0ze.es.js.map → useFocusVisible-BrqHqmb9.es.js.map} +1 -1
- package/dist/chunks/useFocusVisible-Co0C61s7.cjs.js.map +1 -1
- package/dist/chunks/useFocusWithin-BDSWp3rw.cjs.js.map +1 -1
- package/dist/chunks/{useFocusWithin-ByYlHjju.es.js → useFocusWithin-Db5nhiOm.es.js} +2 -2
- package/dist/chunks/{useFocusWithin-ByYlHjju.es.js.map → useFocusWithin-Db5nhiOm.es.js.map} +1 -1
- package/dist/chunks/{useFocusable-CrsD8ZcF.es.js → useFocusable-BqRFi3ok.es.js} +5 -5
- package/dist/chunks/{useFocusable-CrsD8ZcF.es.js.map → useFocusable-BqRFi3ok.es.js.map} +1 -1
- package/dist/chunks/useFocusable-DCgmQxS1.cjs.js.map +1 -1
- package/dist/chunks/useFormReset--wPlnEOl.cjs.js.map +1 -1
- package/dist/chunks/{useFormReset-DurgUJL-.es.js → useFormReset-S3fDvX8g.es.js} +2 -2
- package/dist/chunks/{useFormReset-DurgUJL-.es.js.map → useFormReset-S3fDvX8g.es.js.map} +1 -1
- package/dist/chunks/useFormValidation-BEaCuNx1.cjs.js.map +1 -1
- package/dist/chunks/{useFormValidation-4hZ1_a6w.es.js → useFormValidation-CzvY15hR.es.js} +3 -3
- package/dist/chunks/{useFormValidation-4hZ1_a6w.es.js.map → useFormValidation-CzvY15hR.es.js.map} +1 -1
- package/dist/chunks/useGlobalListeners-BOOfV5Wh.es.js.map +1 -1
- package/dist/chunks/useGlobalListeners-DcmIlwrO.cjs.js.map +1 -1
- package/dist/chunks/useHighlightSelectionDescription-CpDw-Mgj.cjs.js.map +1 -1
- package/dist/chunks/{useHighlightSelectionDescription-BQg1WcM3.es.js → useHighlightSelectionDescription-VzA5DMaE.es.js} +6 -6
- package/dist/chunks/{useHighlightSelectionDescription-BQg1WcM3.es.js.map → useHighlightSelectionDescription-VzA5DMaE.es.js.map} +1 -1
- package/dist/chunks/{useHover-DhoE75lX.es.js → useHover-B6UI1gbJ.es.js} +2 -2
- package/dist/chunks/{useHover-DhoE75lX.es.js.map → useHover-B6UI1gbJ.es.js.map} +1 -1
- package/dist/chunks/useHover-CiP9jMFy.cjs.js.map +1 -1
- package/dist/chunks/{useLabel-BBmkkrPP.es.js → useLabel-BZKxdTDn.es.js} +2 -2
- package/dist/chunks/{useLabel-BBmkkrPP.es.js.map → useLabel-BZKxdTDn.es.js.map} +1 -1
- package/dist/chunks/useLabel-Y8tWagLu.cjs.js.map +1 -1
- package/dist/chunks/{useLocalizedStringFormatter-BRnRyxJp.es.js → useLocalizedStringFormatter-BpL9LNnx.es.js} +2 -2
- package/dist/chunks/{useLocalizedStringFormatter-BRnRyxJp.es.js.map → useLocalizedStringFormatter-BpL9LNnx.es.js.map} +1 -1
- package/dist/chunks/useLocalizedStringFormatter-sB0mFYtL.cjs.js.map +1 -1
- package/dist/chunks/useObjectRef-CaJ5pgjX.es.js.map +1 -1
- package/dist/chunks/useObjectRef-dXOJdONs.cjs.js.map +1 -1
- package/dist/chunks/{usePress-DHhWHfMz.es.js → usePress-BuSQ4Y3L.es.js} +6 -6
- package/dist/chunks/{usePress-DHhWHfMz.es.js.map → usePress-BuSQ4Y3L.es.js.map} +1 -1
- package/dist/chunks/usePress-C8-hLXJw.cjs.js.map +1 -1
- package/dist/chunks/useProgressBar-DWH4I0qR.cjs.js.map +1 -1
- package/dist/chunks/{useProgressBar-DHFmTHqL.es.js → useProgressBar-g3lb_jPQ.es.js} +4 -4
- package/dist/chunks/{useProgressBar-DHFmTHqL.es.js.map → useProgressBar-g3lb_jPQ.es.js.map} +1 -1
- package/dist/chunks/{useSingleSelectListState-C_48GoKf.cjs.js → useSingleSelectListState-C-E1yca1.cjs.js} +2 -2
- package/dist/chunks/{useSingleSelectListState-C_48GoKf.cjs.js.map → useSingleSelectListState-C-E1yca1.cjs.js.map} +1 -1
- package/dist/chunks/{useSingleSelectListState-DZavH1SN.es.js → useSingleSelectListState-CUkiyLA6.es.js} +2 -2
- package/dist/chunks/{useSingleSelectListState-DZavH1SN.es.js.map → useSingleSelectListState-CUkiyLA6.es.js.map} +1 -1
- package/dist/chunks/useSpinButton-DA7sVP3T.cjs.js.map +1 -1
- package/dist/chunks/{useSpinButton-C9DPDo0r.es.js → useSpinButton-DedtXIGZ.es.js} +3 -3
- package/dist/chunks/{useSpinButton-C9DPDo0r.es.js.map → useSpinButton-DedtXIGZ.es.js.map} +1 -1
- package/dist/chunks/{useSyncRef-DGRbdR4H.es.js → useSyncRef-Cipkqs1s.es.js} +2 -2
- package/dist/chunks/{useSyncRef-DGRbdR4H.es.js.map → useSyncRef-Cipkqs1s.es.js.map} +1 -1
- package/dist/chunks/useSyncRef-bcjp9eId.cjs.js.map +1 -1
- package/dist/chunks/useTextField-BcthGRd8.cjs.js.map +1 -1
- package/dist/chunks/{useTextField-BnL6tOdd.es.js → useTextField-tbVMyexr.es.js} +7 -7
- package/dist/chunks/{useTextField-BnL6tOdd.es.js.map → useTextField-tbVMyexr.es.js.map} +1 -1
- package/dist/chunks/{useToggle-DqruaaTq.es.js → useToggle-CoHAX6Sy.es.js} +5 -5
- package/dist/chunks/{useToggle-DqruaaTq.es.js.map → useToggle-CoHAX6Sy.es.js.map} +1 -1
- package/dist/chunks/useToggle-VJWgbeCC.cjs.js.map +1 -1
- package/dist/chunks/useToggleState-Dl-o05wQ.cjs.js.map +1 -1
- package/dist/chunks/useToggleState-Uh0wTgdI.es.js.map +1 -1
- package/dist/chunks/{useToolbar-CLH6Sjes.es.js → useToolbar-B1WYuGxA.es.js} +4 -4
- package/dist/chunks/{useToolbar-CLH6Sjes.es.js.map → useToolbar-B1WYuGxA.es.js.map} +1 -1
- package/dist/chunks/useToolbar-Bqn3EANT.cjs.js.map +1 -1
- package/dist/chunks/useUpdateEffect-C5YQs_1w.cjs.js.map +1 -1
- package/dist/chunks/useUpdateEffect-CCDx8D4X.es.js.map +1 -1
- package/dist/chunks/utils-BGHwK7fd.cjs.js.map +1 -1
- package/dist/chunks/utils-BHdR5Nww.cjs.js.map +1 -1
- package/dist/chunks/{utils-BkdW_cdL.es.js → utils-CsKCu3xh.es.js} +2 -2
- package/dist/chunks/{utils-BkdW_cdL.es.js.map → utils-CsKCu3xh.es.js.map} +1 -1
- package/dist/chunks/{utils-jpfA6kxk.es.js → utils-d3Zmq36h.es.js} +2 -2
- package/dist/chunks/{utils-jpfA6kxk.es.js.map → utils-d3Zmq36h.es.js.map} +1 -1
- package/dist/chunks/{visually-hidden-BluyWhUI.es.js → visually-hidden-09RsVX6x.es.js} +2 -2
- package/dist/chunks/{visually-hidden-BluyWhUI.es.js.map → visually-hidden-09RsVX6x.es.js.map} +1 -1
- package/dist/components/accordion.cjs +1 -1
- package/dist/components/accordion.es.js +1 -1
- package/dist/components/alert.cjs +1 -1
- package/dist/components/alert.es.js +1 -1
- package/dist/components/badge.es.js +1 -1
- package/dist/components/button.cjs +1 -1
- package/dist/components/button.es.js +1 -1
- package/dist/components/calendar.cjs +1 -1
- package/dist/components/calendar.es.js +1 -1
- package/dist/components/card.es.js +1 -1
- package/dist/components/checkbox.cjs +1 -1
- package/dist/components/checkbox.es.js +1 -1
- package/dist/components/combobox.cjs +1 -1
- package/dist/components/combobox.es.js +1 -1
- package/dist/components/components.cjs +1 -1
- package/dist/components/components.es.js +70 -68
- package/dist/components/components.es.js.map +1 -1
- package/dist/components/data-table.cjs +1 -1
- package/dist/components/data-table.es.js +1 -1
- package/dist/components/date-input.cjs +1 -1
- package/dist/components/date-input.es.js +1 -1
- package/dist/components/date-picker.cjs +1 -1
- package/dist/components/date-picker.es.js +1 -1
- package/dist/components/date-range-picker.cjs +1 -1
- package/dist/components/date-range-picker.es.js +1 -1
- package/dist/components/divider.cjs +1 -1
- package/dist/components/divider.es.js +1 -1
- package/dist/components/form-field.cjs +1 -1
- package/dist/components/form-field.es.js +1 -1
- package/dist/components/group.es.js +1 -1
- package/dist/components/hooks.cjs +1 -1
- package/dist/components/hooks.es.js +1 -1
- package/dist/components/icon-button.cjs +1 -1
- package/dist/components/icon-button.es.js +1 -1
- package/dist/components/icon-toggle-button.cjs +1 -1
- package/dist/components/icon-toggle-button.es.js +1 -1
- package/dist/components/kbd.es.js +1 -1
- package/dist/components/link.es.js +1 -1
- package/dist/components/loading-spinner.cjs +1 -1
- package/dist/components/loading-spinner.es.js +1 -1
- package/dist/components/multiline-text-input.cjs +1 -1
- package/dist/components/multiline-text-input.es.js +1 -1
- package/dist/components/nimbus-provider.cjs +1 -1
- package/dist/components/nimbus-provider.es.js +1 -1
- package/dist/components/number-input.cjs +1 -1
- package/dist/components/number-input.es.js +1 -1
- package/dist/components/pagination.cjs +2 -0
- package/dist/components/pagination.cjs.map +1 -0
- package/dist/components/pagination.es.js +5 -0
- package/dist/components/pagination.es.js.map +1 -0
- package/dist/components/password-input.cjs +1 -1
- package/dist/components/password-input.es.js +1 -1
- package/dist/components/popover.cjs +1 -1
- package/dist/components/popover.es.js +1 -1
- package/dist/components/progress-bar.cjs +1 -1
- package/dist/components/progress-bar.es.js +1 -1
- package/dist/components/radio-input.cjs +1 -1
- package/dist/components/radio-input.es.js +1 -1
- package/dist/components/range-calendar.cjs +1 -1
- package/dist/components/range-calendar.es.js +1 -1
- package/dist/components/rich-text-input.cjs +1 -1
- package/dist/components/rich-text-input.es.js +1 -1
- package/dist/components/select.cjs +1 -1
- package/dist/components/select.es.js +1 -1
- package/dist/components/split-button.cjs +1 -1
- package/dist/components/split-button.es.js +1 -1
- package/dist/components/switch.cjs +1 -1
- package/dist/components/switch.es.js +1 -1
- package/dist/components/tag-group.cjs +1 -1
- package/dist/components/tag-group.es.js +1 -1
- package/dist/components/text-input.cjs +1 -1
- package/dist/components/text-input.es.js +1 -1
- package/dist/components/text.es.js +1 -1
- package/dist/components/time-input.cjs +1 -1
- package/dist/components/time-input.es.js +1 -1
- package/dist/components/toggle-button-group.es.js +1 -1
- package/dist/components/toggle-button.cjs +1 -1
- package/dist/components/toggle-button.es.js +1 -1
- package/dist/components/toolbar.cjs +1 -1
- package/dist/components/toolbar.es.js +1 -1
- package/dist/components/tooltip.es.js +2 -2
- package/dist/components/utils.cjs +1 -1
- package/dist/components/utils.es.js +2 -2
- package/dist/components/visually-hidden.es.js +1 -1
- package/dist/components.d.ts +98 -88
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +98 -87
- package/dist/index.es.js +62 -60
- package/dist/index.es.js.map +1 -1
- package/dist/pagination.d.ts +46 -0
- package/dist/select.d.ts +9 -0
- package/dist/split-button.d.ts +5 -3
- package/package.json +19 -18
- package/dist/chunks/Separator-CcMEmnGS.cjs.js +0 -18
- package/dist/chunks/accordion-EDJoghXQ.cjs.js +0 -2
- package/dist/chunks/accordion-EDJoghXQ.cjs.js.map +0 -1
- package/dist/chunks/accordion-UL4pfC2d.es.js +0 -223
- package/dist/chunks/accordion-UL4pfC2d.es.js.map +0 -1
- package/dist/chunks/alert-Ce4-sHmy.cjs.js +0 -2
- package/dist/chunks/alert-Ce4-sHmy.cjs.js.map +0 -1
- package/dist/chunks/alert-fGOiy9nj.es.js.map +0 -1
- package/dist/chunks/date-picker-ChoImuv_.cjs.js +0 -2
- package/dist/chunks/date-picker-ChoImuv_.cjs.js.map +0 -1
- package/dist/chunks/date-picker-S6C2mWMs.es.js +0 -190
- package/dist/chunks/date-picker-S6C2mWMs.es.js.map +0 -1
- package/dist/chunks/emotion-is-prop-valid.esm-Bb7Ou5_X.cjs.js +0 -2
- package/dist/chunks/emotion-is-prop-valid.esm-Bb7Ou5_X.cjs.js.map +0 -1
- package/dist/chunks/emotion-is-prop-valid.esm-qvxbqhmq.es.js +0 -16
- package/dist/chunks/emotion-is-prop-valid.esm-qvxbqhmq.es.js.map +0 -1
- package/dist/chunks/index-B3DGNvyC.cjs.js +0 -4
- package/dist/chunks/index-B3DGNvyC.cjs.js.map +0 -1
- package/dist/chunks/index-BDXHumM1.es.js.map +0 -1
- package/dist/chunks/loading-spinner-CvggCl-H.es.js.map +0 -1
- package/dist/chunks/loading-spinner-DdYXuYkg.cjs.js +0 -2
- package/dist/chunks/loading-spinner-DdYXuYkg.cjs.js.map +0 -1
- package/dist/chunks/number-input-BszmEIip.cjs.js +0 -2
- package/dist/chunks/number-input-BszmEIip.cjs.js.map +0 -1
- package/dist/chunks/number-input-D4DKdybl.es.js.map +0 -1
- package/dist/chunks/password-input-7AyAmLgJ.es.js +0 -50
- package/dist/chunks/password-input-7AyAmLgJ.es.js.map +0 -1
- package/dist/chunks/password-input-BtvFF-4B.cjs.js +0 -2
- package/dist/chunks/password-input-BtvFF-4B.cjs.js.map +0 -1
- package/dist/chunks/rich-text-input-9MdutxJr.es.js.map +0 -1
- package/dist/chunks/rich-text-input-D36fnIHb.cjs.js +0 -7
- package/dist/chunks/rich-text-input-D36fnIHb.cjs.js.map +0 -1
- package/dist/chunks/select-DFNyky2d.cjs.js +0 -2
- package/dist/chunks/select-DFNyky2d.cjs.js.map +0 -1
- package/dist/chunks/select-Dz2O_cFR.es.js.map +0 -1
- package/dist/chunks/slate-helpers-CcSj-DBm.cjs.js +0 -24
- package/dist/chunks/slate-helpers-CcSj-DBm.cjs.js.map +0 -1
- package/dist/chunks/slate-helpers-DsTiLoO8.es.js +0 -9042
- package/dist/chunks/slate-helpers-DsTiLoO8.es.js.map +0 -1
- package/dist/chunks/split-button-BIMKDmUe.cjs.js +0 -2
- package/dist/chunks/split-button-BIMKDmUe.cjs.js.map +0 -1
- package/dist/chunks/split-button-C5Op1s7Z.es.js +0 -103
- package/dist/chunks/split-button-C5Op1s7Z.es.js.map +0 -1
- package/dist/chunks/use-formatting-state-B26nE9CO.es.js +0 -113
- package/dist/chunks/use-formatting-state-B26nE9CO.es.js.map +0 -1
- package/dist/chunks/use-formatting-state-D7zenGZW.cjs.js +0 -2
- package/dist/chunks/use-formatting-state-D7zenGZW.cjs.js.map +0 -1
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";const J=require("./utils-BHdR5Nww.cjs.js"),o=require("react"),Q=require("./Hidden-CNJIJ63M.cjs.js"),X=require("react-dom"),_=require("./useFocusable-DCgmQxS1.cjs.js"),R=require("./SSRProvider-Bc-sMhsT.cjs.js"),O=require("./mergeProps-BA5Cwf5w.cjs.js"),V=require("./filterDOMProps-WUskt27c.cjs.js");var C={exports:{}},E={};/**
|
|
2
|
-
* @license React
|
|
3
|
-
* use-sync-external-store-shim.production.js
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
-
*
|
|
7
|
-
* This source code is licensed under the MIT license found in the
|
|
8
|
-
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var D;function Z(){if(D)return E;D=1;var r=o;function e(c,f){return c===f&&(c!==0||1/c===1/f)||c!==c&&f!==f}var t=typeof Object.is=="function"?Object.is:e,l=r.useState,i=r.useEffect,n=r.useLayoutEffect,s=r.useDebugValue;function u(c,f){var h=f(),y=l({inst:{value:h,getSnapshot:f}}),v=y[0].inst,b=y[1];return n(function(){v.value=h,v.getSnapshot=f,a(v)&&b({inst:v})},[c,h,f]),i(function(){return a(v)&&b({inst:v}),c(function(){a(v)&&b({inst:v})})},[c]),s(h),h}function a(c){var f=c.getSnapshot;c=c.value;try{var h=f();return!t(c,h)}catch{return!0}}function d(c,f){return f()}var p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?d:u;return E.useSyncExternalStore=r.useSyncExternalStore!==void 0?r.useSyncExternalStore:p,E}var K={};/**
|
|
10
|
-
* @license React
|
|
11
|
-
* use-sync-external-store-shim.development.js
|
|
12
|
-
*
|
|
13
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
-
*
|
|
15
|
-
* This source code is licensed under the MIT license found in the
|
|
16
|
-
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var I;function ee(){return I||(I=1,process.env.NODE_ENV!=="production"&&(function(){function r(h,y){return h===y&&(h!==0||1/h===1/y)||h!==h&&y!==y}function e(h,y){p||i.startTransition===void 0||(p=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var v=y();if(!c){var b=y();n(v,b)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),c=!0)}b=s({inst:{value:v,getSnapshot:y}});var S=b[0].inst,g=b[1];return a(function(){S.value=v,S.getSnapshot=y,t(S)&&g({inst:S})},[h,v,y]),u(function(){return t(S)&&g({inst:S}),h(function(){t(S)&&g({inst:S})})},[h]),d(v),v}function t(h){var y=h.getSnapshot;h=h.value;try{var v=y();return!n(h,v)}catch{return!0}}function l(h,y){return y()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var i=o,n=typeof Object.is=="function"?Object.is:r,s=i.useState,u=i.useEffect,a=i.useLayoutEffect,d=i.useDebugValue,p=!1,c=!1,f=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?l:e;K.useSyncExternalStore=i.useSyncExternalStore!==void 0?i.useSyncExternalStore:f,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),K}var M;function te(){return M||(M=1,process.env.NODE_ENV==="production"?C.exports=Z():C.exports=ee()),C.exports}var ie=te();function ne(r){let e=V.$65484d02dcb7eb3e$export$457c3d6518dd4c6f(r,{labelable:!0}),t;return r.orientation==="vertical"&&(t="vertical"),r.elementType!=="hr"?{separatorProps:{...e,role:"separator","aria-orientation":t}}:{separatorProps:e}}class ${get childNodes(){throw new Error("childNodes is not supported")}clone(){let e=new this.constructor(this.key);return e.value=this.value,e.level=this.level,e.hasChildNodes=this.hasChildNodes,e.rendered=this.rendered,e.textValue=this.textValue,e["aria-label"]=this["aria-label"],e.index=this.index,e.parentKey=this.parentKey,e.prevKey=this.prevKey,e.nextKey=this.nextKey,e.firstChildKey=this.firstChildKey,e.lastChildKey=this.lastChildKey,e.props=this.props,e.render=this.render,e.colSpan=this.colSpan,e.colIndex=this.colIndex,e}filter(e,t,l){let i=this.clone();return t.addDescendants(i,e),i}constructor(e){this.value=null,this.level=0,this.hasChildNodes=!1,this.rendered=null,this.textValue="",this["aria-label"]=void 0,this.index=0,this.parentKey=null,this.prevKey=null,this.nextKey=null,this.firstChildKey=null,this.lastChildKey=null,this.props={},this.colSpan=null,this.colIndex=null,this.type=this.constructor.type,this.key=e}}class k extends ${filter(e,t,l){let[i,n]=H(e,t,this.firstChildKey,l),s=this.clone();return s.firstChildKey=i,s.lastChildKey=n,s}}class P extends ${}P.type="header";class A extends ${}A.type="loader";class L extends k{filter(e,t,l){if(l(this.textValue,this)){let i=this.clone();return t.addDescendants(i,e),i}return null}}L.type="item";class q extends k{filter(e,t,l){let i=super.filter(e,t,l);if(i&&i.lastChildKey!==null){let n=e.getItem(i.lastChildKey);if(n&&n.type!=="header")return i}return null}}q.type="section";class T{get size(){return this.itemCount}getKeys(){return this.keyMap.keys()}*[Symbol.iterator](){let e=this.firstKey!=null?this.keyMap.get(this.firstKey):void 0;for(;e;)yield e,e=e.nextKey!=null?this.keyMap.get(e.nextKey):void 0}getChildren(e){let t=this.keyMap;return{*[Symbol.iterator](){let l=t.get(e),i=l?.firstChildKey!=null?t.get(l.firstChildKey):null;for(;i;)yield i,i=i.nextKey!=null?t.get(i.nextKey):void 0}}}getKeyBefore(e){let t=this.keyMap.get(e);if(!t)return null;if(t.prevKey!=null){for(t=this.keyMap.get(t.prevKey);t&&t.type!=="item"&&t.lastChildKey!=null;)t=this.keyMap.get(t.lastChildKey);var l;return(l=t?.key)!==null&&l!==void 0?l:null}return t.parentKey}getKeyAfter(e){let t=this.keyMap.get(e);if(!t)return null;if(t.type!=="item"&&t.firstChildKey!=null)return t.firstChildKey;for(;t;){if(t.nextKey!=null)return t.nextKey;if(t.parentKey!=null)t=this.keyMap.get(t.parentKey);else return null}return null}getFirstKey(){return this.firstKey}getLastKey(){let e=this.lastKey!=null?this.keyMap.get(this.lastKey):null;for(;e?.lastChildKey!=null;)e=this.keyMap.get(e.lastChildKey);var t;return(t=e?.key)!==null&&t!==void 0?t:null}getItem(e){var t;return(t=this.keyMap.get(e))!==null&&t!==void 0?t:null}at(){throw new Error("Not implemented")}clone(){let e=this.constructor,t=new e;return t.keyMap=new Map(this.keyMap),t.firstKey=this.firstKey,t.lastKey=this.lastKey,t.itemCount=this.itemCount,t}addNode(e){if(this.frozen)throw new Error("Cannot add a node to a frozen collection");e.type==="item"&&this.keyMap.get(e.key)==null&&this.itemCount++,this.keyMap.set(e.key,e)}addDescendants(e,t){this.addNode(e);let l=t.getChildren(e.key);for(let i of l)this.addDescendants(i,t)}removeNode(e){if(this.frozen)throw new Error("Cannot remove a node to a frozen collection");let t=this.keyMap.get(e);t!=null&&t.type==="item"&&this.itemCount--,this.keyMap.delete(e)}commit(e,t,l=!1){if(this.frozen)throw new Error("Cannot commit a frozen collection");this.firstKey=e,this.lastKey=t,this.frozen=!l}filter(e){let t=new this.constructor,[l,i]=H(this,t,this.firstKey,e);return t?.commit(l,i),t}constructor(){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.frozen=!1,this.itemCount=0}}function H(r,e,t,l){if(t==null)return[null,null];let i=null,n=null,s=r.getItem(t);for(;s!=null;){let d=s.filter(r,e,l);d!=null&&(d.nextKey=null,n&&(d.prevKey=n.key,n.nextKey=d.key),i==null&&(i=d),e.addNode(d),n=d),s=s.nextKey?r.getItem(s.nextKey):null}if(n&&n.type==="separator"){let d=n.prevKey;e.removeNode(n.key),d?(n=e.getItem(d),n.nextKey=null):n=null}var u,a;return[(u=i?.key)!==null&&u!==void 0?u:null,(a=n?.key)!==null&&a!==void 0?a:null]}class U{*[Symbol.iterator](){let e=this.firstChild;for(;e;)yield e,e=e.nextSibling}get firstChild(){return this._firstChild}set firstChild(e){this._firstChild=e,this.ownerDocument.markDirty(this)}get lastChild(){return this._lastChild}set lastChild(e){this._lastChild=e,this.ownerDocument.markDirty(this)}get previousSibling(){return this._previousSibling}set previousSibling(e){this._previousSibling=e,this.ownerDocument.markDirty(this)}get nextSibling(){return this._nextSibling}set nextSibling(e){this._nextSibling=e,this.ownerDocument.markDirty(this)}get parentNode(){return this._parentNode}set parentNode(e){this._parentNode=e,this.ownerDocument.markDirty(this)}get isConnected(){var e;return((e=this.parentNode)===null||e===void 0?void 0:e.isConnected)||!1}invalidateChildIndices(e){(this._minInvalidChildIndex==null||!this._minInvalidChildIndex.isConnected||e.index<this._minInvalidChildIndex.index)&&(this._minInvalidChildIndex=e,this.ownerDocument.markDirty(this))}updateChildIndices(){let e=this._minInvalidChildIndex;for(;e;)e.index=e.previousSibling?e.previousSibling.index+1:0,e=e.nextSibling;this._minInvalidChildIndex=null}appendChild(e){e.parentNode&&e.parentNode.removeChild(e),this.firstChild==null&&(this.firstChild=e),this.lastChild?(this.lastChild.nextSibling=e,e.index=this.lastChild.index+1,e.previousSibling=this.lastChild):(e.previousSibling=null,e.index=0),e.parentNode=this,e.nextSibling=null,this.lastChild=e,this.ownerDocument.markDirty(this),this.isConnected&&this.ownerDocument.queueUpdate()}insertBefore(e,t){if(t==null)return this.appendChild(e);e.parentNode&&e.parentNode.removeChild(e),e.nextSibling=t,e.previousSibling=t.previousSibling,e.index=t.index-1,this.firstChild===t?this.firstChild=e:t.previousSibling&&(t.previousSibling.nextSibling=e),t.previousSibling=e,e.parentNode=t.parentNode,this.invalidateChildIndices(e),this.isConnected&&this.ownerDocument.queueUpdate()}removeChild(e){e.parentNode!==this||!this.ownerDocument.isMounted||(this._minInvalidChildIndex===e&&(this._minInvalidChildIndex=null),e.nextSibling&&(this.invalidateChildIndices(e.nextSibling),e.nextSibling.previousSibling=e.previousSibling),e.previousSibling&&(e.previousSibling.nextSibling=e.nextSibling),this.firstChild===e&&(this.firstChild=e.nextSibling),this.lastChild===e&&(this.lastChild=e.previousSibling),e.parentNode=null,e.nextSibling=null,e.previousSibling=null,e.index=0,this.ownerDocument.markDirty(e),this.isConnected&&this.ownerDocument.queueUpdate())}addEventListener(){}removeEventListener(){}get previousVisibleSibling(){let e=this.previousSibling;for(;e&&e.isHidden;)e=e.previousSibling;return e}get nextVisibleSibling(){let e=this.nextSibling;for(;e&&e.isHidden;)e=e.nextSibling;return e}get firstVisibleChild(){let e=this.firstChild;for(;e&&e.isHidden;)e=e.nextSibling;return e}get lastVisibleChild(){let e=this.lastChild;for(;e&&e.isHidden;)e=e.previousSibling;return e}constructor(e){this._firstChild=null,this._lastChild=null,this._previousSibling=null,this._nextSibling=null,this._parentNode=null,this._minInvalidChildIndex=null,this.ownerDocument=e}}class x extends U{get index(){return this._index}set index(e){this._index=e,this.ownerDocument.markDirty(this)}get level(){var e;return this.parentNode instanceof x?this.parentNode.level+(((e=this.node)===null||e===void 0?void 0:e.type)==="item"?1:0):0}get node(){if(this._node==null)throw Error("Attempted to access node before it was defined. Check if setProps wasn't called before attempting to access the node.");return this._node}set node(e){this._node=e}getMutableNode(){return this.isMutated||(this.node=this.node.clone(),this.isMutated=!0),this.ownerDocument.markDirty(this),this.node}updateNode(){var e,t,l;let i=this.nextVisibleSibling,n=this.getMutableNode();n.index=this.index,n.level=this.level,n.parentKey=this.parentNode instanceof x?this.parentNode.node.key:null;var s;n.prevKey=(s=(e=this.previousVisibleSibling)===null||e===void 0?void 0:e.node.key)!==null&&s!==void 0?s:null;var u;n.nextKey=(u=i?.node.key)!==null&&u!==void 0?u:null,n.hasChildNodes=!!this.firstChild;var a;n.firstChildKey=(a=(t=this.firstVisibleChild)===null||t===void 0?void 0:t.node.key)!==null&&a!==void 0?a:null;var d;if(n.lastChildKey=(d=(l=this.lastVisibleChild)===null||l===void 0?void 0:l.node.key)!==null&&d!==void 0?d:null,(n.colSpan!=null||n.colIndex!=null)&&i){var p,c;let f=((p=n.colIndex)!==null&&p!==void 0?p:n.index)+((c=n.colSpan)!==null&&c!==void 0?c:1);if(f!==i.node.colIndex){let h=i.getMutableNode();h.colIndex=f}}}setProps(e,t,l,i,n){let s,{value:u,textValue:a,id:d,...p}=e;if(this._node==null?(s=new l(d??`react-aria-${++this.ownerDocument.nodeId}`),this.node=s):s=this.getMutableNode(),p.ref=t,s.props=p,s.rendered=i,s.render=n,s.value=u,s.textValue=a||(typeof p.children=="string"?p.children:"")||e["aria-label"]||"",d!=null&&d!==s.key)throw new Error("Cannot change the id of an item");p.colSpan!=null&&(s.colSpan=p.colSpan),this.isConnected&&this.ownerDocument.queueUpdate()}get style(){let e=this;return{get display(){return e.isHidden?"none":""},set display(t){let l=t==="none";if(e.isHidden!==l){var i,n;(((i=e.parentNode)===null||i===void 0?void 0:i.firstVisibleChild)===e||((n=e.parentNode)===null||n===void 0?void 0:n.lastVisibleChild)===e)&&e.ownerDocument.markDirty(e.parentNode);let s=e.previousVisibleSibling,u=e.nextVisibleSibling;s&&e.ownerDocument.markDirty(s),u&&e.ownerDocument.markDirty(u),e.isHidden=l,e.ownerDocument.markDirty(e)}}}}hasAttribute(){}setAttribute(){}setAttributeNS(){}removeAttribute(){}constructor(e,t){super(t),this.nodeType=8,this.isMutated=!0,this._index=0,this.isHidden=!1,this._node=null}}class le extends U{get isConnected(){return this.isMounted}createElement(e){return new x(e,this)}getMutableCollection(){return this.nextCollection||(this.nextCollection=this.collection.clone()),this.nextCollection}markDirty(e){this.dirtyNodes.add(e)}addNode(e){if(e.isHidden)return;let t=this.getMutableCollection();if(!t.getItem(e.node.key))for(let l of e)this.addNode(l);t.addNode(e.node)}removeNode(e){for(let l of e)this.removeNode(l);this.getMutableCollection().removeNode(e.node.key)}getCollection(){return this.inSubscription?this.collection.clone():(this.queuedRender=!1,this.updateCollection(),this.collection)}updateCollection(){for(let n of this.dirtyNodes)n instanceof x&&(!n.isConnected||n.isHidden)?this.removeNode(n):n.updateChildIndices();for(let n of this.dirtyNodes)n instanceof x&&(n.isConnected&&!n.isHidden&&(n.updateNode(),this.addNode(n)),n.isMutated=!1);if(this.dirtyNodes.clear(),this.nextCollection){var e,t,l,i;this.nextCollection.commit((l=(e=this.firstVisibleChild)===null||e===void 0?void 0:e.node.key)!==null&&l!==void 0?l:null,(i=(t=this.lastVisibleChild)===null||t===void 0?void 0:t.node.key)!==null&&i!==void 0?i:null,this.isSSR),this.isSSR||(this.collection=this.nextCollection,this.nextCollection=null)}}queueUpdate(){if(!(this.dirtyNodes.size===0||this.queuedRender)){this.queuedRender=!0,this.inSubscription=!0;for(let e of this.subscriptions)e();this.inSubscription=!1}}subscribe(e){return this.subscriptions.add(e),()=>this.subscriptions.delete(e)}resetAfterSSR(){this.isSSR&&(this.isSSR=!1,this.firstChild=null,this.lastChild=null,this.nodeId=0)}constructor(e){super(null),this.nodeType=11,this.ownerDocument=this,this.dirtyNodes=new Set,this.isSSR=!1,this.nodeId=0,this.nodesByProps=new WeakMap,this.isMounted=!0,this.nextCollection=null,this.subscriptions=new Set,this.queuedRender=!1,this.inSubscription=!1,this.collection=e,this.nextCollection=e}}function B(r){let{children:e,items:t,idScope:l,addIdAndValue:i,dependencies:n=[]}=r,s=o.useMemo(()=>new WeakMap,n);return o.useMemo(()=>{if(t&&typeof e=="function"){let d=[];for(let p of t){let c=s.get(p);if(!c){c=e(p);var u,a;let f=(a=(u=c.props.id)!==null&&u!==void 0?u:p.key)!==null&&a!==void 0?a:p.id;if(f==null)throw new Error("Could not determine key for item");l&&(f=l+":"+f),c=o.cloneElement(c,i?{key:f,id:f,value:p}:{key:f}),s.set(p,c)}d.push(c)}return d}else if(typeof e!="function")return e},[e,t,s,l,i])}const z=o.createContext(!1),m=o.createContext(null);function re(r){if(o.useContext(m))return r.content;let{collection:t,document:l}=de(r.createCollection);return o.createElement(o.Fragment,null,o.createElement(Q.$f39a9eba43920ace$export$8dc98ba7eadeaa56,null,o.createElement(m.Provider,{value:l},r.content)),o.createElement(se,{render:r.children,collection:t}))}function se({collection:r,render:e}){return e(r)}function oe(r,e,t){let l=R.$b5e257d569688ac6$export$535bd6ca7f90a273(),i=o.useRef(l);i.current=l;let n=o.useCallback(()=>i.current?t():e(),[e,t]);return ie.useSyncExternalStore(r,n)}const ae=typeof o.useSyncExternalStore=="function"?o.useSyncExternalStore:oe;function de(r){let[e]=o.useState(()=>new le(r?.()||new T)),t=o.useCallback(s=>e.subscribe(s),[e]),l=o.useCallback(()=>{let s=e.getCollection();return e.isSSR&&e.resetAfterSSR(),s},[e]),i=o.useCallback(()=>(e.isSSR=!0,e.getCollection()),[e]),n=ae(t,l,i);return O.$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(()=>(e.isMounted=!0,()=>{e.isMounted=!1}),[e]),{collection:n,document:e}}const w=o.createContext(null);function ue(r){var e;return e=class extends ${},e.type=r,e}function G(r,e,t,l,i,n){typeof r=="string"&&(r=ue(r));let s=o.useCallback(a=>{a?.setProps(e,t,r,l,n)},[e,t,l,n,r]),u=o.useContext(w);if(u){let a=u.ownerDocument.nodesByProps.get(e);return a||(a=u.ownerDocument.createElement(r.type),a.setProps(e,t,r,l,n),u.appendChild(a),u.ownerDocument.updateCollection(),u.ownerDocument.nodesByProps.set(e,a)),i?o.createElement(w.Provider,{value:a},i):null}return o.createElement(r.type,{ref:s},i)}function F(r,e){let t=({node:i})=>e(i.props,i.props.ref,i),l=o.forwardRef((i,n)=>{let s=o.useContext(_.$f645667febf57a63$export$f9762fab77588ecb);if(!o.useContext(z)){if(e.length>=3)throw new Error(e.name+" cannot be rendered outside a collection.");return e(i,n)}return G(r,i,n,"children"in i?i.children:null,null,a=>o.createElement(_.$f645667febf57a63$export$f9762fab77588ecb.Provider,{value:s},o.createElement(t,{node:a})))});return l.displayName=e.name,l}function ce(r,e,t=j){let l=({node:n})=>e(n.props,n.props.ref,n),i=o.forwardRef((n,s)=>{let u=t(n);var a;return(a=G(r,n,s,null,u,d=>o.createElement(l,{node:d})))!==null&&a!==void 0?a:o.createElement(o.Fragment,null)});return i.displayName=e.name,i}function j(r){return B({...r,addIdAndValue:!0})}const N=o.createContext(null);function fe(r){let e=o.useContext(N),t=(e?.dependencies||[]).concat(r.dependencies),l=r.idScope||e?.idScope,i=j({...r,idScope:l,dependencies:t});return o.useContext(m)&&(i=o.createElement(he,null,i)),e=o.useMemo(()=>({dependencies:t,idScope:l}),[l,...t]),o.createElement(N.Provider,{value:e},i)}function he({children:r}){let e=o.useContext(m),t=o.useMemo(()=>o.createElement(m.Provider,{value:null},o.createElement(z.Provider,{value:!0},r)),[r]);return R.$b5e257d569688ac6$export$535bd6ca7f90a273()?o.createElement(w.Provider,{value:e},t):X.createPortal(t,e)}const W=o.createContext({});class Y extends ${filter(e,t){let l=t.getItem(this.prevKey);if(l&&l.type!=="separator"){let i=this.clone();return t.addDescendants(i,e),i}return null}}Y.type="separator";const pe=F(Y,function(e,t){[e,t]=J.$64fa3d84918910a7$export$29f1550f4b0d4415(e,t,W);let{elementType:l,orientation:i,style:n,className:s,slot:u,...a}=e,d=l||"hr";d==="hr"&&i==="vertical"&&(d="div");let{separatorProps:p}=ne({...a,elementType:l,orientation:i}),c=V.$65484d02dcb7eb3e$export$457c3d6518dd4c6f(e,{global:!0});return o.createElement(d,{...O.$3ef42575df84b30b$export$9d1611c77c2fe928(c,p),style:n,className:s??"react-aria-Separator",ref:t,slot:u||void 0})});exports.$23b9f4fcf0fe224b$export$408d25a4e12db025=T;exports.$23b9f4fcf0fe224b$export$437f11dc9b403b78=q;exports.$23b9f4fcf0fe224b$export$5ae2504e948afce5=P;exports.$23b9f4fcf0fe224b$export$8258a0665a675899=A;exports.$23b9f4fcf0fe224b$export$b1918e978f1ee46f=k;exports.$23b9f4fcf0fe224b$export$d68d59712b04d9d1=$;exports.$23b9f4fcf0fe224b$export$fd11f34e1d07f134=L;exports.$431f98aba6844401$export$1ff3c3f08ae963c0=pe;exports.$431f98aba6844401$export$6615d83f6de245ce=W;exports.$e1995378a142960e$export$18af5c7a9e9b3664=F;exports.$e1995378a142960e$export$bf788dd355e3a401=re;exports.$e1995378a142960e$export$e953bb1cd0f19726=ce;exports.$e1995378a142960e$export$fb8073518f34e6ec=fe;exports.$e948873055cbafe4$export$727c8fc270210f13=B;
|
|
18
|
-
//# sourceMappingURL=Separator-CcMEmnGS.cjs.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";const E=require("@chakra-ui/react/styled-system"),i=require("react/jsx-runtime"),d=require("react"),R=require("./useControlledState-D0L6S_5r.cjs.js"),$=require("@chakra-ui/react"),T=require("@commercetools/nimbus-icons"),V=require("@chakra-ui/react/flex"),k=require("./useObjectRef-dXOJdONs.cjs.js"),x=require("./mergeProps-BA5Cwf5w.cjs.js"),B=require("react-dom"),z=require("./useEvent-CuUOU5WV.cjs.js"),O=require("./SSRProvider-Bc-sMhsT.cjs.js"),G=require("./useButton-BgBfaV_L.cjs.js"),J=require("./useFocusRing-CzFer4bD.cjs.js");function L(n,t,e){let{isDisabled:o}=n,s=x.$bdb11010cef70236$export$f680877a34711e37(),r=x.$bdb11010cef70236$export$f680877a34711e37(),l=!O.$b5e257d569688ac6$export$535bd6ca7f90a273()&&"onbeforematch"in document.body,u=d.useRef(null),f=d.useCallback(()=>{u.current=requestAnimationFrame(()=>{e.current&&e.current.setAttribute("hidden","until-found")}),B.flushSync(()=>{t.toggle()})},[e,t]);return z.$e9faafb641e167db$export$90fc3a17d93f704c(e,"beforematch",l?f:null),x.$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(()=>{u.current&&cancelAnimationFrame(u.current),l&&e.current&&!o&&(t.isExpanded?e.current.removeAttribute("hidden"):e.current.setAttribute("hidden","until-found"))},[o,e,t.isExpanded,l]),d.useEffect(()=>()=>{u.current&&cancelAnimationFrame(u.current)},[]),{buttonProps:{id:s,"aria-expanded":t.isExpanded,"aria-controls":r,onPress:c=>{!o&&c.pointerType!=="keyboard"&&t.toggle()},isDisabled:o,onPressStart(c){c.pointerType==="keyboard"&&!o&&t.toggle()}},panelProps:{id:r,role:"group","aria-labelledby":s,"aria-hidden":!t.isExpanded,hidden:l?!0:!t.isExpanded}}}function N(n){let[t,e]=R.$458b0a5536c1a7cf$export$40bfa8c7b0832715(n.isExpanded,n.defaultExpanded||!1,n.onExpandedChange);const o=d.useCallback(()=>{e(!0)},[e]),s=d.useCallback(()=>{e(!1)},[e]),r=d.useCallback(()=>{e(!t)},[e,t]);return{isExpanded:t,setExpanded:e,expand:o,collapse:s,toggle:r}}function Q(n){let{allowsMultipleExpanded:t=!1,isDisabled:e=!1}=n,[o,s]=R.$458b0a5536c1a7cf$export$40bfa8c7b0832715(d.useMemo(()=>n.expandedKeys?new Set(n.expandedKeys):void 0,[n.expandedKeys]),d.useMemo(()=>n.defaultExpandedKeys?new Set(n.defaultExpandedKeys):new Set,[n.defaultExpandedKeys]),n.onExpandedChange);return d.useEffect(()=>{if(!t&&o.size>1){let r=o.values().next().value;r!=null&&s(new Set([r]))}}),{allowsMultipleExpanded:t,isDisabled:e,expandedKeys:o,setExpandedKeys:s,toggleKey(r){let a;t?(a=new Set(o),a.has(r)?a.delete(r):a.add(r)):a=new Set(o.has(r)?[]:[r]),s(a)}}}const{withProvider:U,withContext:p}=E.createSlotRecipeContext({key:"accordion"}),W=U("div","root"),X=p("div","disclosure"),Y=p("button","trigger"),Z=p("div","panel"),_=p("div","accordionTitle"),g=p("div","headerContentRight"),h=d.createContext(null),A=d.createContext(null),y=d.forwardRef(({children:n,onExpandedChange:t,...e},o)=>{const s=Q({...e,onExpandedChange:l=>{t?.(l.size>0)}}),r=E.useSlotRecipe({key:"accordion"}),[a]=r.splitVariantProps(e);return i.jsx(A.Provider,{value:s,children:i.jsx(W,{"data-slot":"root",ref:o,...a,children:n})})}),P=d.forwardRef(({children:n},t)=>{const e=d.useContext(h);if(!e)throw new Error("Accordion.Header must be used within Accordion.Item");const o=d.Children.toArray(n).reduce((s,r)=>(d.isValidElement(r)&&r.type===g?s.rightContent.push(r):s.main.push(r),s),{main:[],rightContent:[]});return i.jsxs(V.Flex,{justifyContent:"space-between",alignItems:"center",borderBottom:"solid-25",borderColor:"neutral.4",children:[i.jsxs(Y,{ref:$.mergeRefs(e.triggerRef,t),...e.buttonProps,"data-slot":"trigger",outline:e.isFocusVisible?void 0:"none",children:[i.jsx(T.KeyboardArrowRight,{}),i.jsx(_,{"data-slot":"accordionTitle",children:o.main})]}),o.rightContent.length>0&&i.jsx(g,{"data-slot":"headerContentRight",children:o.rightContent})]})}),w=d.forwardRef((n,t)=>{const e=d.useContext(h),o=k.$df56164dff5785e2$export$4338b53315abf666($.mergeRefs(e?.panelRef,t));return i.jsx(Z,{ref:o,...$.mergeProps({...e?.panelProps,...n}),"data-slot":"panel",children:n.children})}),S=d.forwardRef(({children:n,id:t,isDisabled:e,isExpanded:o,onExpandedChange:s,value:r},a)=>{const l=x.$bdb11010cef70236$export$f680877a34711e37(),f=r||(t||l),c=d.useContext(A),v=c?c.expandedKeys.has(f):o,b=N({isExpanded:v,onExpandedChange:M=>{c&&c.toggleKey(f),s?.(M)}}),m=d.useRef(null),C=d.useRef(null),q=e||c?.isDisabled||!1,{buttonProps:K,panelProps:j}=L({isExpanded:b.isExpanded,isDisabled:q},b,m),{buttonProps:I}=G.$701a24aa0da5b062$export$ea18c227d4417cc3(K,C),{focusProps:D,isFocusVisible:F}=J.$f7dceffc5ad7768b$export$4e328f61c538687f(),H={isExpanded:b.isExpanded,triggerRef:C,panelRef:m,buttonProps:x.$3ef42575df84b30b$export$9d1611c77c2fe928(I,D),panelProps:j,isFocusVisible:F};return i.jsx(h.Provider,{value:H,children:i.jsx(X,{"data-slot":"disclosure","data-value":f,"data-expanded":b.isExpanded,ref:a,children:n})})}),ee={Root:y,Item:S,Header:P,Content:w,HeaderRightContent:g};exports.Accordion=ee;exports.AccordionContent=w;exports.AccordionHeader=P;exports.AccordionHeaderRightContent=g;exports.AccordionItem=S;exports.AccordionRoot=y;
|
|
2
|
-
//# sourceMappingURL=accordion-EDJoghXQ.cjs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"accordion-EDJoghXQ.cjs.js","sources":["../../../../node_modules/.pnpm/@react-aria+disclosure@3.0.8_react-dom@19.1.1_react@19.1.1__react@19.1.1/node_modules/@react-aria/disclosure/dist/useDisclosure.mjs","../../../../node_modules/.pnpm/@react-stately+disclosure@3.0.7_react@19.1.1/node_modules/@react-stately/disclosure/dist/useDisclosureState.mjs","../../../../node_modules/.pnpm/@react-stately+disclosure@3.0.7_react@19.1.1/node_modules/@react-stately/disclosure/dist/useDisclosureGroupState.mjs","../../src/components/accordion/accordion.slots.tsx","../../src/components/accordion/accordion-context.tsx","../../src/components/accordion/components/accordion-root.tsx","../../src/components/accordion/components/accordion-header.tsx","../../src/components/accordion/components/accordion-content.tsx","../../src/components/accordion/components/accordion-item.tsx","../../src/components/accordion/accordion.tsx"],"sourcesContent":["import {flushSync as $6wN6e$flushSync} from \"react-dom\";\nimport {useRef as $6wN6e$useRef, useCallback as $6wN6e$useCallback, useEffect as $6wN6e$useEffect} from \"react\";\nimport {useId as $6wN6e$useId, useEvent as $6wN6e$useEvent, useLayoutEffect as $6wN6e$useLayoutEffect} from \"@react-aria/utils\";\nimport {useIsSSR as $6wN6e$useIsSSR} from \"@react-aria/ssr\";\n\n/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the 'License');\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\n\n\nfunction $5e910fae8e128ead$export$6e3e27031a30522f(props, state, ref) {\n let { isDisabled: isDisabled } = props;\n let triggerId = (0, $6wN6e$useId)();\n let panelId = (0, $6wN6e$useId)();\n let isSSR = (0, $6wN6e$useIsSSR)();\n let supportsBeforeMatch = !isSSR && 'onbeforematch' in document.body;\n let raf = (0, $6wN6e$useRef)(null);\n let handleBeforeMatch = (0, $6wN6e$useCallback)(()=>{\n // Wait a frame to revert browser's removal of hidden attribute\n raf.current = requestAnimationFrame(()=>{\n if (ref.current) ref.current.setAttribute('hidden', 'until-found');\n });\n // Force sync state update\n (0, $6wN6e$flushSync)(()=>{\n state.toggle();\n });\n }, [\n ref,\n state\n ]);\n // @ts-ignore https://github.com/facebook/react/pull/24741\n (0, $6wN6e$useEvent)(ref, 'beforematch', supportsBeforeMatch ? handleBeforeMatch : null);\n (0, $6wN6e$useLayoutEffect)(()=>{\n // Cancel any pending RAF to prevent stale updates\n if (raf.current) cancelAnimationFrame(raf.current);\n // Until React supports hidden=\"until-found\": https://github.com/facebook/react/pull/24741\n if (supportsBeforeMatch && ref.current && !isDisabled) {\n if (state.isExpanded) ref.current.removeAttribute('hidden');\n else ref.current.setAttribute('hidden', 'until-found');\n }\n }, [\n isDisabled,\n ref,\n state.isExpanded,\n supportsBeforeMatch\n ]);\n (0, $6wN6e$useEffect)(()=>{\n return ()=>{\n if (raf.current) cancelAnimationFrame(raf.current);\n };\n }, []);\n return {\n buttonProps: {\n id: triggerId,\n 'aria-expanded': state.isExpanded,\n 'aria-controls': panelId,\n onPress: (e)=>{\n if (!isDisabled && e.pointerType !== 'keyboard') state.toggle();\n },\n isDisabled: isDisabled,\n onPressStart (e) {\n if (e.pointerType === 'keyboard' && !isDisabled) state.toggle();\n }\n },\n panelProps: {\n id: panelId,\n // This can be overridden at the panel element level.\n role: 'group',\n 'aria-labelledby': triggerId,\n 'aria-hidden': !state.isExpanded,\n hidden: supportsBeforeMatch ? true : !state.isExpanded\n }\n };\n}\n\n\nexport {$5e910fae8e128ead$export$6e3e27031a30522f as useDisclosure};\n//# sourceMappingURL=useDisclosure.module.js.map\n","import {useCallback as $acGV5$useCallback} from \"react\";\nimport {useControlledState as $acGV5$useControlledState} from \"@react-stately/utils\";\n\n/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\nfunction $bf996d45f4a36925$export$3fcbf6e4407997e0(props) {\n let [isExpanded, setExpanded] = (0, $acGV5$useControlledState)(props.isExpanded, props.defaultExpanded || false, props.onExpandedChange);\n const expand = (0, $acGV5$useCallback)(()=>{\n setExpanded(true);\n }, [\n setExpanded\n ]);\n const collapse = (0, $acGV5$useCallback)(()=>{\n setExpanded(false);\n }, [\n setExpanded\n ]);\n const toggle = (0, $acGV5$useCallback)(()=>{\n setExpanded(!isExpanded);\n }, [\n setExpanded,\n isExpanded\n ]);\n return {\n isExpanded: isExpanded,\n setExpanded: setExpanded,\n expand: expand,\n collapse: collapse,\n toggle: toggle\n };\n}\n\n\nexport {$bf996d45f4a36925$export$3fcbf6e4407997e0 as useDisclosureState};\n//# sourceMappingURL=useDisclosureState.module.js.map\n","import {useControlledState as $j4gLc$useControlledState} from \"@react-stately/utils\";\nimport {useMemo as $j4gLc$useMemo, useEffect as $j4gLc$useEffect} from \"react\";\n\n/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\nfunction $9385b3affbdec831$export$f36461af0ef4707d(props) {\n let { allowsMultipleExpanded: allowsMultipleExpanded = false, isDisabled: isDisabled = false } = props;\n let [expandedKeys, setExpandedKeys] = (0, $j4gLc$useControlledState)((0, $j4gLc$useMemo)(()=>props.expandedKeys ? new Set(props.expandedKeys) : undefined, [\n props.expandedKeys\n ]), (0, $j4gLc$useMemo)(()=>props.defaultExpandedKeys ? new Set(props.defaultExpandedKeys) : new Set(), [\n props.defaultExpandedKeys\n ]), props.onExpandedChange);\n (0, $j4gLc$useEffect)(()=>{\n // Ensure only one item is expanded if allowsMultipleExpanded is false.\n if (!allowsMultipleExpanded && expandedKeys.size > 1) {\n let firstKey = expandedKeys.values().next().value;\n if (firstKey != null) setExpandedKeys(new Set([\n firstKey\n ]));\n }\n });\n return {\n allowsMultipleExpanded: allowsMultipleExpanded,\n isDisabled: isDisabled,\n expandedKeys: expandedKeys,\n setExpandedKeys: setExpandedKeys,\n toggleKey (key) {\n let keys;\n if (allowsMultipleExpanded) {\n keys = new Set(expandedKeys);\n if (keys.has(key)) keys.delete(key);\n else keys.add(key);\n } else keys = new Set(expandedKeys.has(key) ? [] : [\n key\n ]);\n setExpandedKeys(keys);\n }\n };\n}\n\n\nexport {$9385b3affbdec831$export$f36461af0ef4707d as useDisclosureGroupState};\n//# sourceMappingURL=useDisclosureGroupState.module.js.map\n","import {\n createSlotRecipeContext,\n type HTMLChakraProps,\n} from \"@chakra-ui/react/styled-system\";\nimport type { AccordionRootProps } from \"./accordion.types\";\n\nconst { withProvider, withContext } = createSlotRecipeContext({\n key: \"accordion\",\n});\n\nexport const AccordionRoot = withProvider<HTMLDivElement, AccordionRootProps>(\n \"div\",\n \"root\"\n);\n\nexport const AccordionDisclosure = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"disclosure\");\n\nexport const AccordionTrigger = withContext<\n HTMLButtonElement,\n HTMLChakraProps<\"button\">\n>(\"button\", \"trigger\");\n\nexport const AccordionPanel = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"panel\");\n\nexport const AccordionTitle = withContext<\n HTMLButtonElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"accordionTitle\");\n\nexport const AccordionHeaderRightContent = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"headerContentRight\");\n","import React, { createContext } from \"react\";\nimport type { DisclosureGroupState } from \"react-stately\";\n\n// Define types for the item context\nexport interface ItemContextType {\n isExpanded: boolean;\n triggerRef: React.RefObject<HTMLButtonElement | null>;\n panelRef: React.RefObject<HTMLDivElement | null>;\n buttonProps: React.ButtonHTMLAttributes<HTMLButtonElement>;\n panelProps: React.ButtonHTMLAttributes<HTMLButtonElement>;\n isFocusVisible: boolean;\n}\n\n// Create and export the contexts\nexport const ItemContext = createContext<ItemContextType | null>(null);\nexport const DisclosureGroupStateContext =\n createContext<DisclosureGroupState | null>(null);\n","import React, { forwardRef, type Key } from \"react\";\nimport { AccordionRoot as AccordionRootSlot } from \"../accordion.slots\";\nimport { useDisclosureGroupState } from \"react-stately\";\nimport { useSlotRecipe } from \"@chakra-ui/react/styled-system\";\nimport type { DisclosureGroupProps } from \"../accordion.types\";\nimport { DisclosureGroupStateContext } from \"../accordion-context\";\n\n/**\n * # Accordion\n *\n * Displays an Accordion.\n *\n * @see {@link https://nimbus-documentation.vercel.app/components/navigation/accordion}\n */\nexport const AccordionRoot = forwardRef<HTMLDivElement, DisclosureGroupProps>(\n ({ children, onExpandedChange, ...props }, forwardedRef) => {\n const state = useDisclosureGroupState({\n ...props,\n onExpandedChange: (keys: Set<Key>) => {\n onExpandedChange?.(keys.size > 0);\n },\n });\n const recipe = useSlotRecipe({ key: \"accordion\" });\n const [recipeProps] = recipe.splitVariantProps(props);\n\n return (\n <DisclosureGroupStateContext.Provider value={state}>\n <AccordionRootSlot data-slot=\"root\" ref={forwardedRef} {...recipeProps}>\n {children}\n </AccordionRootSlot>\n </DisclosureGroupStateContext.Provider>\n );\n }\n);\n","import React, { forwardRef, useContext, type ReactNode } from \"react\";\nimport {\n AccordionTrigger,\n AccordionTitle,\n AccordionHeaderRightContent,\n} from \"../accordion.slots\";\nimport { mergeRefs } from \"@chakra-ui/react\";\nimport { Flex } from \"@/components\";\nimport { KeyboardArrowRight } from \"@commercetools/nimbus-icons\";\nimport { ItemContext } from \"../accordion-context\";\n\ntype AccordionHeaderProps = {\n /**\n * The text / content to display in the Header\n */\n children: ReactNode;\n};\n\nexport const AccordionHeader = forwardRef<\n HTMLButtonElement,\n AccordionHeaderProps\n>(({ children }, ref) => {\n const context = useContext(ItemContext);\n if (!context) {\n throw new Error(\"Accordion.Header must be used within Accordion.Item\");\n }\n\n // Extract HeaderRightContent if present\n const headerContent = React.Children.toArray(children).reduce<{\n main: React.ReactNode[];\n rightContent: React.ReactNode[];\n }>(\n (acc, child) => {\n if (\n React.isValidElement(child) &&\n child.type === AccordionHeaderRightContent\n ) {\n acc.rightContent.push(child);\n } else {\n acc.main.push(child);\n }\n return acc;\n },\n { main: [], rightContent: [] }\n );\n\n return (\n <Flex\n justifyContent=\"space-between\"\n alignItems=\"center\"\n borderBottom=\"solid-25\"\n borderColor=\"neutral.4\"\n >\n <AccordionTrigger\n ref={mergeRefs(context.triggerRef, ref)}\n {...context.buttonProps}\n data-slot=\"trigger\"\n outline={context.isFocusVisible ? undefined : \"none\"}\n >\n <KeyboardArrowRight />\n <AccordionTitle data-slot=\"accordionTitle\">\n {headerContent.main}\n </AccordionTitle>\n </AccordionTrigger>\n {headerContent.rightContent.length > 0 && (\n <AccordionHeaderRightContent data-slot=\"headerContentRight\">\n {headerContent.rightContent}\n </AccordionHeaderRightContent>\n )}\n </Flex>\n );\n});\n","import React, {\n forwardRef,\n useContext,\n type ComponentProps,\n type ReactNode,\n} from \"react\";\nimport { AccordionPanel } from \"../accordion.slots\";\nimport { useObjectRef } from \"react-aria\";\nimport { mergeProps, mergeRefs } from \"@chakra-ui/react\";\nimport { ItemContext } from \"../accordion-context\";\n\ntype AccordionContentProps = {\n /**\n * The content to display\n */\n children: ReactNode;\n} & ComponentProps<typeof AccordionPanel>;\n\n// Create Content component\nexport const AccordionContent = forwardRef<\n HTMLDivElement,\n AccordionContentProps\n>((props, forwardedRef) => {\n const context = useContext(ItemContext);\n const ref = useObjectRef<HTMLDivElement>(\n mergeRefs(context?.panelRef, forwardedRef)\n );\n\n return (\n // @ts-expect-error TODO - fix prop types merging conflict\n <AccordionPanel\n ref={ref}\n {...mergeProps({ ...context?.panelProps, ...props })}\n data-slot=\"panel\"\n >\n {props.children}\n </AccordionPanel>\n );\n});\n","import React, { forwardRef, useContext, useRef } from \"react\";\nimport { AccordionDisclosure } from \"../accordion.slots\";\nimport { useDisclosureState } from \"react-stately\";\nimport {\n useDisclosure,\n mergeProps,\n useButton,\n useFocusRing,\n useId,\n} from \"react-aria\";\nimport type { DisclosureItemProps } from \"../accordion.types\";\n// Import the contexts from the shared file\nimport { ItemContext, DisclosureGroupStateContext } from \"../accordion-context\";\n\nexport const AccordionItem = forwardRef<HTMLDivElement, DisclosureItemProps>(\n (\n { children, id, isDisabled, isExpanded, onExpandedChange, value },\n forwardedRef\n ) => {\n const defaultId = useId();\n const itemId = id || defaultId;\n const itemValue = value || itemId;\n\n // Get group state from context\n const groupState = useContext(DisclosureGroupStateContext);\n\n // Determine if expanded based on group state or prop\n const expanded = groupState\n ? groupState.expandedKeys.has(itemValue)\n : isExpanded;\n\n // Create disclosure state\n const state = useDisclosureState({\n isExpanded: expanded,\n onExpandedChange: (isExpanded) => {\n if (groupState) {\n groupState.toggleKey(itemValue);\n }\n onExpandedChange?.(isExpanded);\n },\n });\n\n // Create refs and get props\n const panelRef = useRef<HTMLDivElement>(null);\n const triggerRef = useRef<HTMLButtonElement>(null);\n const disabled = isDisabled || groupState?.isDisabled || false;\n\n const { buttonProps, panelProps } = useDisclosure(\n {\n isExpanded: state.isExpanded,\n isDisabled: disabled,\n },\n state,\n panelRef\n );\n\n const { buttonProps: finalButtonProps } = useButton(\n buttonProps,\n triggerRef\n );\n const { focusProps, isFocusVisible } = useFocusRing();\n\n // Create context value for Header and Content\n const contextValue = {\n isExpanded: state.isExpanded,\n triggerRef,\n panelRef,\n buttonProps: mergeProps(finalButtonProps, focusProps),\n panelProps,\n isFocusVisible,\n };\n\n // Using the imported ItemContext\n return (\n <ItemContext.Provider value={contextValue}>\n <AccordionDisclosure\n data-slot=\"disclosure\"\n data-value={itemValue}\n data-expanded={state.isExpanded}\n ref={forwardedRef}\n >\n {children}\n </AccordionDisclosure>\n </ItemContext.Provider>\n );\n }\n);\n","import { AccordionHeaderRightContent } from \"./accordion.slots\";\nimport { AccordionRoot } from \"./components/accordion-root\";\nimport { AccordionHeader } from \"./components/accordion-header\";\nimport { AccordionContent } from \"./components/accordion-content\";\nimport { AccordionItem } from \"./components/accordion-item\";\n\n// Create the Accordion namespace object as an object literal\nexport const Accordion = {\n Root: AccordionRoot,\n Item: AccordionItem,\n Header: AccordionHeader,\n Content: AccordionContent,\n HeaderRightContent: AccordionHeaderRightContent,\n};\n\nexport {\n AccordionRoot as _AccordionRoot,\n AccordionItem as _AccordionItem,\n AccordionHeader as _AccordionHeader,\n AccordionContent as _AccordionContent,\n AccordionHeaderRightContent as _AccordionHeaderRightContent,\n};\n"],"names":["$5e910fae8e128ead$export$6e3e27031a30522f","props","state","ref","isDisabled","triggerId","$6wN6e$useId","panelId","supportsBeforeMatch","$6wN6e$useIsSSR","raf","$6wN6e$useRef","handleBeforeMatch","$6wN6e$useCallback","$6wN6e$flushSync","$6wN6e$useEvent","$6wN6e$useLayoutEffect","$6wN6e$useEffect","e","$bf996d45f4a36925$export$3fcbf6e4407997e0","isExpanded","setExpanded","$acGV5$useControlledState","expand","$acGV5$useCallback","collapse","toggle","$9385b3affbdec831$export$f36461af0ef4707d","allowsMultipleExpanded","expandedKeys","setExpandedKeys","$j4gLc$useControlledState","$j4gLc$useMemo","$j4gLc$useEffect","firstKey","key","keys","withProvider","withContext","createSlotRecipeContext","AccordionRoot","AccordionDisclosure","AccordionTrigger","AccordionPanel","AccordionTitle","AccordionHeaderRightContent","ItemContext","createContext","DisclosureGroupStateContext","forwardRef","children","onExpandedChange","forwardedRef","useDisclosureGroupState","recipe","useSlotRecipe","recipeProps","jsx","AccordionRootSlot","AccordionHeader","context","useContext","headerContent","React","acc","child","jsxs","Flex","mergeRefs","KeyboardArrowRight","AccordionContent","useObjectRef","mergeProps","AccordionItem","id","value","defaultId","useId","itemValue","groupState","expanded","useDisclosureState","panelRef","useRef","triggerRef","disabled","buttonProps","panelProps","useDisclosure","finalButtonProps","useButton","focusProps","isFocusVisible","useFocusRing","contextValue","Accordion"],"mappings":"kiBAmBA,SAASA,EAA0CC,EAAOC,EAAOC,EAAK,CAClE,GAAI,CAAE,WAAYC,CAAU,EAAKH,EAC7BI,EAAgBC,4CAAY,EAC5BC,EAAcD,4CAAY,EAE1BE,EAAsB,CADVC,4CAAe,GACK,kBAAmB,SAAS,KAC5DC,EAAUC,EAAAA,OAAe,IAAI,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D,EAGK8D,EAAWC,EAAAA,OAAuB,IAAI,EACtCC,EAAaD,EAAAA,OAA0B,IAAI,EAC3CE,EAAWjF,GAAc2E,GAAY,YAAc,GAEnD,CAAE,YAAAO,EAAa,WAAAC,CAAA,EAAeC,EAClC,CACE,WAAYtF,EAAM,WAClB,WAAYmF,CAAA,EAEdnF,EACAgF,CAAA,EAGI,CAAE,YAAaO,CAAA,EAAqBC,EAAAA,0CACxCJ,EACAF,CAAA,EAEI,CAAE,WAAAO,EAAY,eAAAC,CAAA,EAAmBC,4CAAA,EAGjCC,EAAe,CACnB,WAAY5F,EAAM,WAClB,WAAAkF,EACA,SAAAF,EACA,YAAaV,EAAAA,0CAAWiB,EAAkBE,CAAU,EACpD,WAAAJ,EACA,eAAAK,CAAA,EAIF,OACEnC,EAAAA,IAACX,EAAY,SAAZ,CAAqB,MAAOgD,EAC3B,SAAArC,EAAAA,IAAChB,EAAA,CACC,YAAU,aACV,aAAYqC,EACZ,gBAAe5E,EAAM,WACrB,IAAKkD,EAEJ,SAAAF,CAAA,CAAA,EAEL,CAEJ,CACF,EC/Ea6C,GAAY,CACvB,KAAMvD,EACN,KAAMiC,EACN,OAAQd,EACR,QAASW,EACT,mBAAoBzB,CACtB","x_google_ignoreList":[0,1,2]}
|
|
@@ -1,223 +0,0 @@
|
|
|
1
|
-
import { createSlotRecipeContext as z, useSlotRecipe as _ } from "@chakra-ui/react/styled-system";
|
|
2
|
-
import { jsx as c, jsxs as A } from "react/jsx-runtime";
|
|
3
|
-
import R, { useRef as m, useCallback as x, useEffect as w, useMemo as P, createContext as S, forwardRef as b, useContext as h } from "react";
|
|
4
|
-
import { $ as v } from "./useControlledState-u436Wbp1.es.js";
|
|
5
|
-
import { mergeRefs as K, mergeProps as q } from "@chakra-ui/react";
|
|
6
|
-
import { KeyboardArrowRight as G } from "@commercetools/nimbus-icons";
|
|
7
|
-
import { Flex as J } from "@chakra-ui/react/flex";
|
|
8
|
-
import { $ as L } from "./useObjectRef-CaJ5pgjX.es.js";
|
|
9
|
-
import { a as g, c as N, $ as O } from "./mergeProps-B_9syxhT.es.js";
|
|
10
|
-
import { flushSync as Q } from "react-dom";
|
|
11
|
-
import { $ as U } from "./useEvent-YHhqZvpU.es.js";
|
|
12
|
-
import { $ as W } from "./SSRProvider-Cu8KibIK.es.js";
|
|
13
|
-
import { $ as X } from "./useButton-DAeSjgg9.es.js";
|
|
14
|
-
import { $ as Y } from "./useFocusRing-updnkDQg.es.js";
|
|
15
|
-
function Z(n, t, e) {
|
|
16
|
-
let { isDisabled: o } = n, r = g(), d = g(), s = !W() && "onbeforematch" in document.body, l = m(null), f = x(() => {
|
|
17
|
-
l.current = requestAnimationFrame(() => {
|
|
18
|
-
e.current && e.current.setAttribute("hidden", "until-found");
|
|
19
|
-
}), Q(() => {
|
|
20
|
-
t.toggle();
|
|
21
|
-
});
|
|
22
|
-
}, [
|
|
23
|
-
e,
|
|
24
|
-
t
|
|
25
|
-
]);
|
|
26
|
-
return U(e, "beforematch", s ? f : null), N(() => {
|
|
27
|
-
l.current && cancelAnimationFrame(l.current), s && e.current && !o && (t.isExpanded ? e.current.removeAttribute("hidden") : e.current.setAttribute("hidden", "until-found"));
|
|
28
|
-
}, [
|
|
29
|
-
o,
|
|
30
|
-
e,
|
|
31
|
-
t.isExpanded,
|
|
32
|
-
s
|
|
33
|
-
]), w(() => () => {
|
|
34
|
-
l.current && cancelAnimationFrame(l.current);
|
|
35
|
-
}, []), {
|
|
36
|
-
buttonProps: {
|
|
37
|
-
id: r,
|
|
38
|
-
"aria-expanded": t.isExpanded,
|
|
39
|
-
"aria-controls": d,
|
|
40
|
-
onPress: (i) => {
|
|
41
|
-
!o && i.pointerType !== "keyboard" && t.toggle();
|
|
42
|
-
},
|
|
43
|
-
isDisabled: o,
|
|
44
|
-
onPressStart(i) {
|
|
45
|
-
i.pointerType === "keyboard" && !o && t.toggle();
|
|
46
|
-
}
|
|
47
|
-
},
|
|
48
|
-
panelProps: {
|
|
49
|
-
id: d,
|
|
50
|
-
// This can be overridden at the panel element level.
|
|
51
|
-
role: "group",
|
|
52
|
-
"aria-labelledby": r,
|
|
53
|
-
"aria-hidden": !t.isExpanded,
|
|
54
|
-
hidden: s ? !0 : !t.isExpanded
|
|
55
|
-
}
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
function ee(n) {
|
|
59
|
-
let [t, e] = v(n.isExpanded, n.defaultExpanded || !1, n.onExpandedChange);
|
|
60
|
-
const o = x(() => {
|
|
61
|
-
e(!0);
|
|
62
|
-
}, [
|
|
63
|
-
e
|
|
64
|
-
]), r = x(() => {
|
|
65
|
-
e(!1);
|
|
66
|
-
}, [
|
|
67
|
-
e
|
|
68
|
-
]), d = x(() => {
|
|
69
|
-
e(!t);
|
|
70
|
-
}, [
|
|
71
|
-
e,
|
|
72
|
-
t
|
|
73
|
-
]);
|
|
74
|
-
return {
|
|
75
|
-
isExpanded: t,
|
|
76
|
-
setExpanded: e,
|
|
77
|
-
expand: o,
|
|
78
|
-
collapse: r,
|
|
79
|
-
toggle: d
|
|
80
|
-
};
|
|
81
|
-
}
|
|
82
|
-
function te(n) {
|
|
83
|
-
let { allowsMultipleExpanded: t = !1, isDisabled: e = !1 } = n, [o, r] = v(P(() => n.expandedKeys ? new Set(n.expandedKeys) : void 0, [
|
|
84
|
-
n.expandedKeys
|
|
85
|
-
]), P(() => n.defaultExpandedKeys ? new Set(n.defaultExpandedKeys) : /* @__PURE__ */ new Set(), [
|
|
86
|
-
n.defaultExpandedKeys
|
|
87
|
-
]), n.onExpandedChange);
|
|
88
|
-
return w(() => {
|
|
89
|
-
if (!t && o.size > 1) {
|
|
90
|
-
let d = o.values().next().value;
|
|
91
|
-
d != null && r(/* @__PURE__ */ new Set([
|
|
92
|
-
d
|
|
93
|
-
]));
|
|
94
|
-
}
|
|
95
|
-
}), {
|
|
96
|
-
allowsMultipleExpanded: t,
|
|
97
|
-
isDisabled: e,
|
|
98
|
-
expandedKeys: o,
|
|
99
|
-
setExpandedKeys: r,
|
|
100
|
-
toggleKey(d) {
|
|
101
|
-
let a;
|
|
102
|
-
t ? (a = new Set(o), a.has(d) ? a.delete(d) : a.add(d)) : a = new Set(o.has(d) ? [] : [
|
|
103
|
-
d
|
|
104
|
-
]), r(a);
|
|
105
|
-
}
|
|
106
|
-
};
|
|
107
|
-
}
|
|
108
|
-
const { withProvider: ne, withContext: u } = /* @__PURE__ */ z({
|
|
109
|
-
key: "accordion"
|
|
110
|
-
}), oe = /* @__PURE__ */ ne(
|
|
111
|
-
"div",
|
|
112
|
-
"root"
|
|
113
|
-
), de = /* @__PURE__ */ u("div", "disclosure"), re = /* @__PURE__ */ u("button", "trigger"), ae = /* @__PURE__ */ u("div", "panel"), ie = /* @__PURE__ */ u("div", "accordionTitle"), $ = /* @__PURE__ */ u("div", "headerContentRight"), E = /* @__PURE__ */ S(null), D = /* @__PURE__ */ S(null), se = /* @__PURE__ */ b(
|
|
114
|
-
({ children: n, onExpandedChange: t, ...e }, o) => {
|
|
115
|
-
const r = te({
|
|
116
|
-
...e,
|
|
117
|
-
onExpandedChange: (s) => {
|
|
118
|
-
t?.(s.size > 0);
|
|
119
|
-
}
|
|
120
|
-
}), d = _({ key: "accordion" }), [a] = d.splitVariantProps(e);
|
|
121
|
-
return /* @__PURE__ */ c(D.Provider, { value: r, children: /* @__PURE__ */ c(oe, { "data-slot": "root", ref: o, ...a, children: n }) });
|
|
122
|
-
}
|
|
123
|
-
), ce = /* @__PURE__ */ b(({ children: n }, t) => {
|
|
124
|
-
const e = h(E);
|
|
125
|
-
if (!e)
|
|
126
|
-
throw new Error("Accordion.Header must be used within Accordion.Item");
|
|
127
|
-
const o = R.Children.toArray(n).reduce(
|
|
128
|
-
(r, d) => (R.isValidElement(d) && d.type === $ ? r.rightContent.push(d) : r.main.push(d), r),
|
|
129
|
-
{ main: [], rightContent: [] }
|
|
130
|
-
);
|
|
131
|
-
return /* @__PURE__ */ A(
|
|
132
|
-
J,
|
|
133
|
-
{
|
|
134
|
-
justifyContent: "space-between",
|
|
135
|
-
alignItems: "center",
|
|
136
|
-
borderBottom: "solid-25",
|
|
137
|
-
borderColor: "neutral.4",
|
|
138
|
-
children: [
|
|
139
|
-
/* @__PURE__ */ A(
|
|
140
|
-
re,
|
|
141
|
-
{
|
|
142
|
-
ref: K(e.triggerRef, t),
|
|
143
|
-
...e.buttonProps,
|
|
144
|
-
"data-slot": "trigger",
|
|
145
|
-
outline: e.isFocusVisible ? void 0 : "none",
|
|
146
|
-
children: [
|
|
147
|
-
/* @__PURE__ */ c(G, {}),
|
|
148
|
-
/* @__PURE__ */ c(ie, { "data-slot": "accordionTitle", children: o.main })
|
|
149
|
-
]
|
|
150
|
-
}
|
|
151
|
-
),
|
|
152
|
-
o.rightContent.length > 0 && /* @__PURE__ */ c($, { "data-slot": "headerContentRight", children: o.rightContent })
|
|
153
|
-
]
|
|
154
|
-
}
|
|
155
|
-
);
|
|
156
|
-
}), le = /* @__PURE__ */ b((n, t) => {
|
|
157
|
-
const e = h(E), o = L(
|
|
158
|
-
K(e?.panelRef, t)
|
|
159
|
-
);
|
|
160
|
-
return (
|
|
161
|
-
// @ts-expect-error TODO - fix prop types merging conflict
|
|
162
|
-
/* @__PURE__ */ c(
|
|
163
|
-
ae,
|
|
164
|
-
{
|
|
165
|
-
ref: o,
|
|
166
|
-
...q({ ...e?.panelProps, ...n }),
|
|
167
|
-
"data-slot": "panel",
|
|
168
|
-
children: n.children
|
|
169
|
-
}
|
|
170
|
-
)
|
|
171
|
-
);
|
|
172
|
-
}), fe = /* @__PURE__ */ b(
|
|
173
|
-
({ children: n, id: t, isDisabled: e, isExpanded: o, onExpandedChange: r, value: d }, a) => {
|
|
174
|
-
const s = g(), f = d || (t || s), i = h(D), I = i ? i.expandedKeys.has(f) : o, p = ee({
|
|
175
|
-
isExpanded: I,
|
|
176
|
-
onExpandedChange: (k) => {
|
|
177
|
-
i && i.toggleKey(f), r?.(k);
|
|
178
|
-
}
|
|
179
|
-
}), C = m(null), y = m(null), F = e || i?.isDisabled || !1, { buttonProps: M, panelProps: T } = Z(
|
|
180
|
-
{
|
|
181
|
-
isExpanded: p.isExpanded,
|
|
182
|
-
isDisabled: F
|
|
183
|
-
},
|
|
184
|
-
p,
|
|
185
|
-
C
|
|
186
|
-
), { buttonProps: V } = X(
|
|
187
|
-
M,
|
|
188
|
-
y
|
|
189
|
-
), { focusProps: H, isFocusVisible: B } = Y(), j = {
|
|
190
|
-
isExpanded: p.isExpanded,
|
|
191
|
-
triggerRef: y,
|
|
192
|
-
panelRef: C,
|
|
193
|
-
buttonProps: O(V, H),
|
|
194
|
-
panelProps: T,
|
|
195
|
-
isFocusVisible: B
|
|
196
|
-
};
|
|
197
|
-
return /* @__PURE__ */ c(E.Provider, { value: j, children: /* @__PURE__ */ c(
|
|
198
|
-
de,
|
|
199
|
-
{
|
|
200
|
-
"data-slot": "disclosure",
|
|
201
|
-
"data-value": f,
|
|
202
|
-
"data-expanded": p.isExpanded,
|
|
203
|
-
ref: a,
|
|
204
|
-
children: n
|
|
205
|
-
}
|
|
206
|
-
) });
|
|
207
|
-
}
|
|
208
|
-
), we = {
|
|
209
|
-
Root: se,
|
|
210
|
-
Item: fe,
|
|
211
|
-
Header: ce,
|
|
212
|
-
Content: le,
|
|
213
|
-
HeaderRightContent: $
|
|
214
|
-
};
|
|
215
|
-
export {
|
|
216
|
-
we as A,
|
|
217
|
-
se as a,
|
|
218
|
-
fe as b,
|
|
219
|
-
ce as c,
|
|
220
|
-
le as d,
|
|
221
|
-
$ as e
|
|
222
|
-
};
|
|
223
|
-
//# sourceMappingURL=accordion-UL4pfC2d.es.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"accordion-UL4pfC2d.es.js","sources":["../../../../node_modules/.pnpm/@react-aria+disclosure@3.0.8_react-dom@19.1.1_react@19.1.1__react@19.1.1/node_modules/@react-aria/disclosure/dist/useDisclosure.mjs","../../../../node_modules/.pnpm/@react-stately+disclosure@3.0.7_react@19.1.1/node_modules/@react-stately/disclosure/dist/useDisclosureState.mjs","../../../../node_modules/.pnpm/@react-stately+disclosure@3.0.7_react@19.1.1/node_modules/@react-stately/disclosure/dist/useDisclosureGroupState.mjs","../../src/components/accordion/accordion.slots.tsx","../../src/components/accordion/accordion-context.tsx","../../src/components/accordion/components/accordion-root.tsx","../../src/components/accordion/components/accordion-header.tsx","../../src/components/accordion/components/accordion-content.tsx","../../src/components/accordion/components/accordion-item.tsx","../../src/components/accordion/accordion.tsx"],"sourcesContent":["import {flushSync as $6wN6e$flushSync} from \"react-dom\";\nimport {useRef as $6wN6e$useRef, useCallback as $6wN6e$useCallback, useEffect as $6wN6e$useEffect} from \"react\";\nimport {useId as $6wN6e$useId, useEvent as $6wN6e$useEvent, useLayoutEffect as $6wN6e$useLayoutEffect} from \"@react-aria/utils\";\nimport {useIsSSR as $6wN6e$useIsSSR} from \"@react-aria/ssr\";\n\n/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the 'License');\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\n\n\nfunction $5e910fae8e128ead$export$6e3e27031a30522f(props, state, ref) {\n let { isDisabled: isDisabled } = props;\n let triggerId = (0, $6wN6e$useId)();\n let panelId = (0, $6wN6e$useId)();\n let isSSR = (0, $6wN6e$useIsSSR)();\n let supportsBeforeMatch = !isSSR && 'onbeforematch' in document.body;\n let raf = (0, $6wN6e$useRef)(null);\n let handleBeforeMatch = (0, $6wN6e$useCallback)(()=>{\n // Wait a frame to revert browser's removal of hidden attribute\n raf.current = requestAnimationFrame(()=>{\n if (ref.current) ref.current.setAttribute('hidden', 'until-found');\n });\n // Force sync state update\n (0, $6wN6e$flushSync)(()=>{\n state.toggle();\n });\n }, [\n ref,\n state\n ]);\n // @ts-ignore https://github.com/facebook/react/pull/24741\n (0, $6wN6e$useEvent)(ref, 'beforematch', supportsBeforeMatch ? handleBeforeMatch : null);\n (0, $6wN6e$useLayoutEffect)(()=>{\n // Cancel any pending RAF to prevent stale updates\n if (raf.current) cancelAnimationFrame(raf.current);\n // Until React supports hidden=\"until-found\": https://github.com/facebook/react/pull/24741\n if (supportsBeforeMatch && ref.current && !isDisabled) {\n if (state.isExpanded) ref.current.removeAttribute('hidden');\n else ref.current.setAttribute('hidden', 'until-found');\n }\n }, [\n isDisabled,\n ref,\n state.isExpanded,\n supportsBeforeMatch\n ]);\n (0, $6wN6e$useEffect)(()=>{\n return ()=>{\n if (raf.current) cancelAnimationFrame(raf.current);\n };\n }, []);\n return {\n buttonProps: {\n id: triggerId,\n 'aria-expanded': state.isExpanded,\n 'aria-controls': panelId,\n onPress: (e)=>{\n if (!isDisabled && e.pointerType !== 'keyboard') state.toggle();\n },\n isDisabled: isDisabled,\n onPressStart (e) {\n if (e.pointerType === 'keyboard' && !isDisabled) state.toggle();\n }\n },\n panelProps: {\n id: panelId,\n // This can be overridden at the panel element level.\n role: 'group',\n 'aria-labelledby': triggerId,\n 'aria-hidden': !state.isExpanded,\n hidden: supportsBeforeMatch ? true : !state.isExpanded\n }\n };\n}\n\n\nexport {$5e910fae8e128ead$export$6e3e27031a30522f as useDisclosure};\n//# sourceMappingURL=useDisclosure.module.js.map\n","import {useCallback as $acGV5$useCallback} from \"react\";\nimport {useControlledState as $acGV5$useControlledState} from \"@react-stately/utils\";\n\n/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\nfunction $bf996d45f4a36925$export$3fcbf6e4407997e0(props) {\n let [isExpanded, setExpanded] = (0, $acGV5$useControlledState)(props.isExpanded, props.defaultExpanded || false, props.onExpandedChange);\n const expand = (0, $acGV5$useCallback)(()=>{\n setExpanded(true);\n }, [\n setExpanded\n ]);\n const collapse = (0, $acGV5$useCallback)(()=>{\n setExpanded(false);\n }, [\n setExpanded\n ]);\n const toggle = (0, $acGV5$useCallback)(()=>{\n setExpanded(!isExpanded);\n }, [\n setExpanded,\n isExpanded\n ]);\n return {\n isExpanded: isExpanded,\n setExpanded: setExpanded,\n expand: expand,\n collapse: collapse,\n toggle: toggle\n };\n}\n\n\nexport {$bf996d45f4a36925$export$3fcbf6e4407997e0 as useDisclosureState};\n//# sourceMappingURL=useDisclosureState.module.js.map\n","import {useControlledState as $j4gLc$useControlledState} from \"@react-stately/utils\";\nimport {useMemo as $j4gLc$useMemo, useEffect as $j4gLc$useEffect} from \"react\";\n\n/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\nfunction $9385b3affbdec831$export$f36461af0ef4707d(props) {\n let { allowsMultipleExpanded: allowsMultipleExpanded = false, isDisabled: isDisabled = false } = props;\n let [expandedKeys, setExpandedKeys] = (0, $j4gLc$useControlledState)((0, $j4gLc$useMemo)(()=>props.expandedKeys ? new Set(props.expandedKeys) : undefined, [\n props.expandedKeys\n ]), (0, $j4gLc$useMemo)(()=>props.defaultExpandedKeys ? new Set(props.defaultExpandedKeys) : new Set(), [\n props.defaultExpandedKeys\n ]), props.onExpandedChange);\n (0, $j4gLc$useEffect)(()=>{\n // Ensure only one item is expanded if allowsMultipleExpanded is false.\n if (!allowsMultipleExpanded && expandedKeys.size > 1) {\n let firstKey = expandedKeys.values().next().value;\n if (firstKey != null) setExpandedKeys(new Set([\n firstKey\n ]));\n }\n });\n return {\n allowsMultipleExpanded: allowsMultipleExpanded,\n isDisabled: isDisabled,\n expandedKeys: expandedKeys,\n setExpandedKeys: setExpandedKeys,\n toggleKey (key) {\n let keys;\n if (allowsMultipleExpanded) {\n keys = new Set(expandedKeys);\n if (keys.has(key)) keys.delete(key);\n else keys.add(key);\n } else keys = new Set(expandedKeys.has(key) ? [] : [\n key\n ]);\n setExpandedKeys(keys);\n }\n };\n}\n\n\nexport {$9385b3affbdec831$export$f36461af0ef4707d as useDisclosureGroupState};\n//# sourceMappingURL=useDisclosureGroupState.module.js.map\n","import {\n createSlotRecipeContext,\n type HTMLChakraProps,\n} from \"@chakra-ui/react/styled-system\";\nimport type { AccordionRootProps } from \"./accordion.types\";\n\nconst { withProvider, withContext } = createSlotRecipeContext({\n key: \"accordion\",\n});\n\nexport const AccordionRoot = withProvider<HTMLDivElement, AccordionRootProps>(\n \"div\",\n \"root\"\n);\n\nexport const AccordionDisclosure = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"disclosure\");\n\nexport const AccordionTrigger = withContext<\n HTMLButtonElement,\n HTMLChakraProps<\"button\">\n>(\"button\", \"trigger\");\n\nexport const AccordionPanel = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"panel\");\n\nexport const AccordionTitle = withContext<\n HTMLButtonElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"accordionTitle\");\n\nexport const AccordionHeaderRightContent = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"headerContentRight\");\n","import React, { createContext } from \"react\";\nimport type { DisclosureGroupState } from \"react-stately\";\n\n// Define types for the item context\nexport interface ItemContextType {\n isExpanded: boolean;\n triggerRef: React.RefObject<HTMLButtonElement | null>;\n panelRef: React.RefObject<HTMLDivElement | null>;\n buttonProps: React.ButtonHTMLAttributes<HTMLButtonElement>;\n panelProps: React.ButtonHTMLAttributes<HTMLButtonElement>;\n isFocusVisible: boolean;\n}\n\n// Create and export the contexts\nexport const ItemContext = createContext<ItemContextType | null>(null);\nexport const DisclosureGroupStateContext =\n createContext<DisclosureGroupState | null>(null);\n","import React, { forwardRef, type Key } from \"react\";\nimport { AccordionRoot as AccordionRootSlot } from \"../accordion.slots\";\nimport { useDisclosureGroupState } from \"react-stately\";\nimport { useSlotRecipe } from \"@chakra-ui/react/styled-system\";\nimport type { DisclosureGroupProps } from \"../accordion.types\";\nimport { DisclosureGroupStateContext } from \"../accordion-context\";\n\n/**\n * # Accordion\n *\n * Displays an Accordion.\n *\n * @see {@link https://nimbus-documentation.vercel.app/components/navigation/accordion}\n */\nexport const AccordionRoot = forwardRef<HTMLDivElement, DisclosureGroupProps>(\n ({ children, onExpandedChange, ...props }, forwardedRef) => {\n const state = useDisclosureGroupState({\n ...props,\n onExpandedChange: (keys: Set<Key>) => {\n onExpandedChange?.(keys.size > 0);\n },\n });\n const recipe = useSlotRecipe({ key: \"accordion\" });\n const [recipeProps] = recipe.splitVariantProps(props);\n\n return (\n <DisclosureGroupStateContext.Provider value={state}>\n <AccordionRootSlot data-slot=\"root\" ref={forwardedRef} {...recipeProps}>\n {children}\n </AccordionRootSlot>\n </DisclosureGroupStateContext.Provider>\n );\n }\n);\n","import React, { forwardRef, useContext, type ReactNode } from \"react\";\nimport {\n AccordionTrigger,\n AccordionTitle,\n AccordionHeaderRightContent,\n} from \"../accordion.slots\";\nimport { mergeRefs } from \"@chakra-ui/react\";\nimport { Flex } from \"@/components\";\nimport { KeyboardArrowRight } from \"@commercetools/nimbus-icons\";\nimport { ItemContext } from \"../accordion-context\";\n\ntype AccordionHeaderProps = {\n /**\n * The text / content to display in the Header\n */\n children: ReactNode;\n};\n\nexport const AccordionHeader = forwardRef<\n HTMLButtonElement,\n AccordionHeaderProps\n>(({ children }, ref) => {\n const context = useContext(ItemContext);\n if (!context) {\n throw new Error(\"Accordion.Header must be used within Accordion.Item\");\n }\n\n // Extract HeaderRightContent if present\n const headerContent = React.Children.toArray(children).reduce<{\n main: React.ReactNode[];\n rightContent: React.ReactNode[];\n }>(\n (acc, child) => {\n if (\n React.isValidElement(child) &&\n child.type === AccordionHeaderRightContent\n ) {\n acc.rightContent.push(child);\n } else {\n acc.main.push(child);\n }\n return acc;\n },\n { main: [], rightContent: [] }\n );\n\n return (\n <Flex\n justifyContent=\"space-between\"\n alignItems=\"center\"\n borderBottom=\"solid-25\"\n borderColor=\"neutral.4\"\n >\n <AccordionTrigger\n ref={mergeRefs(context.triggerRef, ref)}\n {...context.buttonProps}\n data-slot=\"trigger\"\n outline={context.isFocusVisible ? undefined : \"none\"}\n >\n <KeyboardArrowRight />\n <AccordionTitle data-slot=\"accordionTitle\">\n {headerContent.main}\n </AccordionTitle>\n </AccordionTrigger>\n {headerContent.rightContent.length > 0 && (\n <AccordionHeaderRightContent data-slot=\"headerContentRight\">\n {headerContent.rightContent}\n </AccordionHeaderRightContent>\n )}\n </Flex>\n );\n});\n","import React, {\n forwardRef,\n useContext,\n type ComponentProps,\n type ReactNode,\n} from \"react\";\nimport { AccordionPanel } from \"../accordion.slots\";\nimport { useObjectRef } from \"react-aria\";\nimport { mergeProps, mergeRefs } from \"@chakra-ui/react\";\nimport { ItemContext } from \"../accordion-context\";\n\ntype AccordionContentProps = {\n /**\n * The content to display\n */\n children: ReactNode;\n} & ComponentProps<typeof AccordionPanel>;\n\n// Create Content component\nexport const AccordionContent = forwardRef<\n HTMLDivElement,\n AccordionContentProps\n>((props, forwardedRef) => {\n const context = useContext(ItemContext);\n const ref = useObjectRef<HTMLDivElement>(\n mergeRefs(context?.panelRef, forwardedRef)\n );\n\n return (\n // @ts-expect-error TODO - fix prop types merging conflict\n <AccordionPanel\n ref={ref}\n {...mergeProps({ ...context?.panelProps, ...props })}\n data-slot=\"panel\"\n >\n {props.children}\n </AccordionPanel>\n );\n});\n","import React, { forwardRef, useContext, useRef } from \"react\";\nimport { AccordionDisclosure } from \"../accordion.slots\";\nimport { useDisclosureState } from \"react-stately\";\nimport {\n useDisclosure,\n mergeProps,\n useButton,\n useFocusRing,\n useId,\n} from \"react-aria\";\nimport type { DisclosureItemProps } from \"../accordion.types\";\n// Import the contexts from the shared file\nimport { ItemContext, DisclosureGroupStateContext } from \"../accordion-context\";\n\nexport const AccordionItem = forwardRef<HTMLDivElement, DisclosureItemProps>(\n (\n { children, id, isDisabled, isExpanded, onExpandedChange, value },\n forwardedRef\n ) => {\n const defaultId = useId();\n const itemId = id || defaultId;\n const itemValue = value || itemId;\n\n // Get group state from context\n const groupState = useContext(DisclosureGroupStateContext);\n\n // Determine if expanded based on group state or prop\n const expanded = groupState\n ? groupState.expandedKeys.has(itemValue)\n : isExpanded;\n\n // Create disclosure state\n const state = useDisclosureState({\n isExpanded: expanded,\n onExpandedChange: (isExpanded) => {\n if (groupState) {\n groupState.toggleKey(itemValue);\n }\n onExpandedChange?.(isExpanded);\n },\n });\n\n // Create refs and get props\n const panelRef = useRef<HTMLDivElement>(null);\n const triggerRef = useRef<HTMLButtonElement>(null);\n const disabled = isDisabled || groupState?.isDisabled || false;\n\n const { buttonProps, panelProps } = useDisclosure(\n {\n isExpanded: state.isExpanded,\n isDisabled: disabled,\n },\n state,\n panelRef\n );\n\n const { buttonProps: finalButtonProps } = useButton(\n buttonProps,\n triggerRef\n );\n const { focusProps, isFocusVisible } = useFocusRing();\n\n // Create context value for Header and Content\n const contextValue = {\n isExpanded: state.isExpanded,\n triggerRef,\n panelRef,\n buttonProps: mergeProps(finalButtonProps, focusProps),\n panelProps,\n isFocusVisible,\n };\n\n // Using the imported ItemContext\n return (\n <ItemContext.Provider value={contextValue}>\n <AccordionDisclosure\n data-slot=\"disclosure\"\n data-value={itemValue}\n data-expanded={state.isExpanded}\n ref={forwardedRef}\n >\n {children}\n </AccordionDisclosure>\n </ItemContext.Provider>\n );\n }\n);\n","import { AccordionHeaderRightContent } from \"./accordion.slots\";\nimport { AccordionRoot } from \"./components/accordion-root\";\nimport { AccordionHeader } from \"./components/accordion-header\";\nimport { AccordionContent } from \"./components/accordion-content\";\nimport { AccordionItem } from \"./components/accordion-item\";\n\n// Create the Accordion namespace object as an object literal\nexport const Accordion = {\n Root: AccordionRoot,\n Item: AccordionItem,\n Header: AccordionHeader,\n Content: AccordionContent,\n HeaderRightContent: AccordionHeaderRightContent,\n};\n\nexport {\n AccordionRoot as _AccordionRoot,\n AccordionItem as _AccordionItem,\n AccordionHeader as _AccordionHeader,\n AccordionContent as _AccordionContent,\n AccordionHeaderRightContent as _AccordionHeaderRightContent,\n};\n"],"names":["$5e910fae8e128ead$export$6e3e27031a30522f","props","state","ref","isDisabled","triggerId","$6wN6e$useId","panelId","supportsBeforeMatch","$6wN6e$useIsSSR","raf","$6wN6e$useRef","handleBeforeMatch","$6wN6e$useCallback","$6wN6e$flushSync","$6wN6e$useEvent","$6wN6e$useLayoutEffect","$6wN6e$useEffect","e","$bf996d45f4a36925$export$3fcbf6e4407997e0","isExpanded","setExpanded","$acGV5$useControlledState","expand","$acGV5$useCallback","collapse","toggle","$9385b3affbdec831$export$f36461af0ef4707d","allowsMultipleExpanded","expandedKeys","setExpandedKeys","$j4gLc$useControlledState","$j4gLc$useMemo","$j4gLc$useEffect","firstKey","key","keys","withProvider","withContext","createSlotRecipeContext","AccordionRoot","AccordionDisclosure","AccordionTrigger","AccordionPanel","AccordionTitle","AccordionHeaderRightContent","ItemContext","createContext","DisclosureGroupStateContext","forwardRef","children","onExpandedChange","forwardedRef","useDisclosureGroupState","recipe","useSlotRecipe","recipeProps","jsx","AccordionRootSlot","AccordionHeader","context","useContext","headerContent","React","acc","child","jsxs","Flex","mergeRefs","KeyboardArrowRight","AccordionContent","useObjectRef","mergeProps","AccordionItem","id","value","defaultId","useId","itemValue","groupState","expanded","useDisclosureState","panelRef","useRef","triggerRef","disabled","buttonProps","panelProps","useDisclosure","finalButtonProps","useButton","focusProps","isFocusVisible","useFocusRing","contextValue","Accordion"],"mappings":";;;;;;;;;;;;;;AAmBA,SAASA,EAA0CC,GAAOC,GAAOC,GAAK;AAClE,MAAI,EAAE,YAAYC,EAAU,IAAKH,GAC7BI,IAAgBC,EAAY,GAC5BC,IAAcD,EAAY,GAE1BE,IAAsB,CADVC,EAAe,KACK,mBAAmB,SAAS,MAC5DC,IAAUC,EAAe,IAAI,GAC7BC,IAAwBC,EAAoB,MAAI;AAEhD,IAAAH,EAAI,UAAU,sBAAsB,MAAI;AACpC,MAAIP,EAAI,WAASA,EAAI,QAAQ,aAAa,UAAU,aAAa;AAAA,IACrE,CAAC,GAEGW,EAAkB,MAAI;AACtB,MAAAZ,EAAM,OAAM;AAAA,IAChB,CAAC;AAAA,EACL,GAAG;AAAA,IACCC;AAAA,IACAD;AAAA,EACR,CAAK;AAED,SAAIa,EAAiBZ,GAAK,eAAeK,IAAsBI,IAAoB,IAAI,GACnFI,EAAwB,MAAI;AAE5B,IAAIN,EAAI,WAAS,qBAAqBA,EAAI,OAAO,GAE7CF,KAAuBL,EAAI,WAAW,CAACC,MACnCF,EAAM,aAAYC,EAAI,QAAQ,gBAAgB,QAAQ,IACrDA,EAAI,QAAQ,aAAa,UAAU,aAAa;AAAA,EAE7D,GAAG;AAAA,IACCC;AAAA,IACAD;AAAA,IACAD,EAAM;AAAA,IACNM;AAAA,EACR,CAAK,GACGS,EAAkB,MACX,MAAI;AACP,IAAIP,EAAI,WAAS,qBAAqBA,EAAI,OAAO;AAAA,EACrD,GACD,CAAA,CAAE,GACE;AAAA,IACH,aAAa;AAAA,MACT,IAAIL;AAAA,MACJ,iBAAiBH,EAAM;AAAA,MACvB,iBAAiBK;AAAA,MACjB,SAAS,CAACW,MAAI;AACV,QAAI,CAACd,KAAcc,EAAE,gBAAgB,cAAYhB,EAAM,OAAM;AAAA,MACjE;AAAA,MACA,YAAYE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F;AAAA,MAAA;AAAA,MAEdnF;AAAA,MACAgF;AAAA,IAAA,GAGI,EAAE,aAAaO,EAAA,IAAqBC;AAAAA,MACxCJ;AAAA,MACAF;AAAA,IAAA,GAEI,EAAE,YAAAO,GAAY,gBAAAC,EAAA,IAAmBC,EAAA,GAGjCC,IAAe;AAAA,MACnB,YAAY5F,EAAM;AAAA,MAClB,YAAAkF;AAAA,MACA,UAAAF;AAAA,MACA,aAAaV,EAAWiB,GAAkBE,CAAU;AAAA,MACpD,YAAAJ;AAAA,MACA,gBAAAK;AAAA,IAAA;AAIF,WACE,gBAAAnC,EAACX,EAAY,UAAZ,EAAqB,OAAOgD,GAC3B,UAAA,gBAAArC;AAAA,MAAChB;AAAA,MAAA;AAAA,QACC,aAAU;AAAA,QACV,cAAYqC;AAAA,QACZ,iBAAe5E,EAAM;AAAA,QACrB,KAAKkD;AAAA,QAEJ,UAAAF;AAAA,MAAA;AAAA,IAAA,GAEL;AAAA,EAEJ;AACF,GC/Ea6C,KAAY;AAAA,EACvB,MAAMvD;AAAA,EACN,MAAMiC;AAAA,EACN,QAAQd;AAAA,EACR,SAASW;AAAA,EACT,oBAAoBzB;AACtB;","x_google_ignoreList":[0,1,2]}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";const e=require("react/jsx-runtime"),s=require("react"),v=require("@chakra-ui/react/styled-system"),b=require("./box-CWni3A32.cjs.js"),R=require("./stack-CIN13EDn.cjs.js"),r=require("@commercetools/nimbus-icons"),B=require("./icon-button-CPXhdrQY.cjs.js"),N=v.defineSlotRecipe({slots:["root","title","description","icon","actions","dismissButton"],className:"nimbus-alert",base:{root:{display:"inline-flex",flexDirection:"row",gap:"200",width:"100%"},icon:{marginTop:"50","& svg":{width:"500",height:"500",color:"colorPalette.11"}},title:{color:"colorPalette.11"},description:{color:"colorPalette.11"}},variants:{tone:{critical:{root:{colorPalette:"critical"}},info:{root:{colorPalette:"info"}},warning:{root:{colorPalette:"amber"}},positive:{root:{colorPalette:"positive"}}},variant:{flat:{},outlined:{root:{border:"solid-25",borderColor:"colorPalette.5",backgroundColor:"colorPalette.2",padding:"200",borderRadius:"200"}}}}}),{withProvider:T,withContext:l}=v.createSlotRecipeContext({recipe:N}),E=T("div","root"),w=l("div","title"),y=l("div","description"),S=l("div","icon"),q=l("div","actions"),I=l("div","dismissButton"),$=o=>{switch(o){case"critical":return e.jsx(r.ErrorOutline,{});case"info":return e.jsx(r.Info,{});case"warning":return e.jsx(r.WarningAmber,{});case"positive":return e.jsx(r.CheckCircleOutline,{});default:return null}},c=s.createContext(void 0),a=o=>{const{ref:i,children:t,...n}=o,[j,A]=s.useState(null),[g,f]=s.useState(null),[h,p]=s.useState(null),[C,D]=s.useState(null),P=s.useMemo(()=>({setTitle:A,setDescription:f,setActions:p,setDismiss:D}),[A,f,p,D]);return e.jsx(c.Provider,{value:P,children:e.jsxs(E,{ref:i,...n,role:"alert",children:[e.jsx(S,{alignItems:"flex-start",children:$(n.tone)}),e.jsxs(R.Stack,{flex:"1",gap:"200",children:[e.jsxs(b.Box,{children:[j,g]}),h]}),C,t]})})};a.displayName="Alert.Root";const u=({children:o,...i})=>{const t=s.useContext(c);return s.useEffect(()=>{if(t){const n=e.jsx(w,{...i,fontWeight:"600",children:o});return t.setTitle(n),()=>t.setTitle(null)}},[o,i]),null};u.displayName="Alert.Title";const d=({children:o,...i})=>{const t=s.useContext(c);return s.useEffect(()=>{if(t){const n=e.jsx(y,{...i,children:o});return t.setDescription(n),()=>t.setDescription(null)}},[o,i]),null};d.displayName="Alert.Description";const x=({children:o,...i})=>{const t=s.useContext(c);return s.useEffect(()=>{if(t){const n=e.jsx(q,{...i,children:o});return t.setActions(n),()=>t.setActions(null)}},[o,i]),null};x.displayName="Alert.Actions";const m=({children:o,...i})=>{const t=s.useContext(c);return s.useEffect(()=>{if(t){const n=e.jsx(I,{children:e.jsx(B.IconButton,{"aria-label":"Dismiss",...i,variant:"ghost",size:"2xs",children:e.jsx(r.Clear,{role:"img"})})});return t.setDismiss(n),()=>t.setDismiss(null)}},[o,i]),null};m.displayName="Alert.DismissButton";const k={Root:a,Title:u,Description:d,Actions:x,DismissButton:m};exports.Alert=k;exports.AlertActions=x;exports.AlertDescription=d;exports.AlertDismissButton=m;exports.AlertRoot=a;exports.AlertTitle=u;
|
|
2
|
-
//# sourceMappingURL=alert-Ce4-sHmy.cjs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"alert-Ce4-sHmy.cjs.js","sources":["../../src/components/alert/alert.recipe.tsx","../../src/components/alert/alert.slots.tsx","../../src/components/alert/components/alert.root.tsx","../../src/components/alert/components/alert.title.tsx","../../src/components/alert/components/alert.description.tsx","../../src/components/alert/components/alert.actions.tsx","../../src/components/alert/components/alert.dismiss-button.tsx","../../src/components/alert/alert.tsx"],"sourcesContent":["import { defineSlotRecipe } from \"@chakra-ui/react/styled-system\";\n/**\n * Recipe configuration for the Alert component.\n * Defines the styling variants and base styles using Chakra UI's recipe system.\n */\nexport const alertRecipe = defineSlotRecipe({\n slots: [\"root\", \"title\", \"description\", \"icon\", \"actions\", \"dismissButton\"],\n // Unique class name prefix for the component\n className: \"nimbus-alert\",\n\n // Base styles applied to all instances of the component\n base: {\n root: {\n display: \"inline-flex\",\n flexDirection: \"row\",\n gap: \"200\",\n width: \"100%\",\n },\n icon: {\n marginTop: \"50\",\n \"& svg\": {\n width: \"500\",\n height: \"500\",\n color: \"colorPalette.11\",\n },\n },\n title: {\n color: \"colorPalette.11\",\n },\n description: {\n color: \"colorPalette.11\",\n },\n },\n\n variants: {\n tone: {\n critical: {\n root: { colorPalette: \"critical\" },\n },\n info: {\n root: { colorPalette: \"info\" },\n },\n warning: {\n root: { colorPalette: \"amber\" },\n },\n positive: {\n root: { colorPalette: \"positive\" },\n },\n },\n\n variant: {\n flat: {},\n outlined: {\n root: {\n border: \"solid-25\",\n borderColor: \"colorPalette.5\",\n backgroundColor: \"colorPalette.2\",\n padding: \"200\",\n borderRadius: \"200\",\n },\n },\n },\n },\n});\n","import { createSlotRecipeContext } from \"@chakra-ui/react/styled-system\";\nimport { alertRecipe } from \"./alert.recipe\";\nimport type {\n AlertActionsProps,\n AlertDescriptionProps,\n AlertDismissButtonProps,\n AlertIconProps,\n AlertRootProps,\n AlertTitleProps,\n} from \"./alert.types\";\n\nconst { withProvider, withContext } = createSlotRecipeContext({\n recipe: alertRecipe,\n});\n\nexport const AlertRoot = withProvider<HTMLDivElement, AlertRootProps>(\n \"div\",\n \"root\"\n);\n\nexport const AlertTitle = withContext<HTMLDivElement, AlertTitleProps>(\n \"div\",\n \"title\"\n);\n\nexport const AlertDescription = withContext<\n HTMLDivElement,\n AlertDescriptionProps\n>(\"div\", \"description\");\n\nexport const AlertIcon = withContext<HTMLDivElement, AlertIconProps>(\n \"div\",\n \"icon\"\n);\n\nexport const AlertActions = withContext<HTMLDivElement, AlertActionsProps>(\n \"div\",\n \"actions\"\n);\n\n// This is a div wrapper for layout placement - note that we expect it to receive `IconButton` props, but we use a `div`.\n// We then forward the consumer props to the interior `IconButton` component.\nexport const AlertDismissButton = withContext<\n HTMLDivElement,\n AlertDismissButtonProps\n>(\"div\", \"dismissButton\");\n","import { createContext, useMemo, useState, type ReactNode } from \"react\";\nimport { AlertRoot as AlertRootSlot, AlertIcon } from \"../alert.slots\";\nimport type { AlertProps, AlertRootComponent } from \"../alert.types\";\nimport { Box } from \"../../box\";\nimport { Stack } from \"../../stack\";\nimport {\n CheckCircleOutline,\n ErrorOutline,\n Info,\n WarningAmber,\n} from \"@commercetools/nimbus-icons\";\n\nconst getIconFromTone = (tone: AlertProps[\"tone\"]) => {\n switch (tone) {\n case \"critical\":\n return <ErrorOutline />;\n case \"info\":\n return <Info />;\n case \"warning\":\n return <WarningAmber />;\n case \"positive\":\n return <CheckCircleOutline />;\n default:\n return null;\n }\n};\n\ntype AlertContextValue = {\n setTitle: (title: ReactNode) => void;\n setDescription: (description: ReactNode) => void;\n setActions: (actions: ReactNode) => void;\n setDismiss: (dismiss: ReactNode) => void;\n};\n\nexport const AlertContext = createContext<AlertContextValue | undefined>(\n undefined\n);\n\n/**\n * # Alert\n *\n * Provides feedback to the user about the status of an action or system event\n *\n * @see {@link https://nimbus-documentation.vercel.app/components/feedback/alert}\n */\nexport const AlertRoot: AlertRootComponent = (props) => {\n const { ref, children, ...restProps } = props;\n const [titleNode, setTitle] = useState<ReactNode>(null);\n const [descriptionNode, setDescription] = useState<ReactNode>(null);\n const [actionsNode, setActions] = useState<ReactNode>(null);\n const [dismissNode, setDismiss] = useState<ReactNode>(null);\n\n // Memoize the context value so we don't cause unnecessary re-renders\n const contextValue = useMemo(\n () => ({\n setTitle,\n setDescription,\n setActions,\n setDismiss,\n }),\n [setTitle, setDescription, setActions, setDismiss]\n );\n\n return (\n <AlertContext.Provider value={contextValue}>\n <AlertRootSlot ref={ref} {...restProps} role=\"alert\">\n <AlertIcon alignItems=\"flex-start\">\n {getIconFromTone(restProps.tone)}\n </AlertIcon>\n <Stack flex=\"1\" gap=\"200\">\n <Box>\n {titleNode}\n {descriptionNode}\n </Box>\n {actionsNode}\n </Stack>\n {dismissNode}\n\n {children}\n </AlertRootSlot>\n </AlertContext.Provider>\n );\n};\n\nAlertRoot.displayName = \"Alert.Root\";\n","import { useContext, useEffect } from \"react\";\nimport { AlertTitle as AlertTitleSlot } from \"../alert.slots\";\nimport type { AlertTitleProps } from \"../alert.types\";\nimport { AlertContext } from \"./alert.root\";\n\nexport const AlertTitle = ({ children, ...props }: AlertTitleProps) => {\n const context = useContext(AlertContext);\n\n useEffect(() => {\n if (context) {\n const slotElement = (\n <AlertTitleSlot {...props} fontWeight=\"600\">\n {children}\n </AlertTitleSlot>\n );\n // Register it with the parent\n context.setTitle(slotElement);\n\n // On unmount, remove it\n return () => context.setTitle(null);\n }\n }, [children, props]);\n\n return null;\n};\n\nAlertTitle.displayName = \"Alert.Title\";\n","import { useContext, useEffect } from \"react\";\nimport { AlertDescription as AlertDescriptionSlot } from \"../alert.slots\";\nimport type { AlertDescriptionProps } from \"../alert.types\";\nimport { AlertContext } from \"./alert.root\";\n\nexport const AlertDescription = ({\n children,\n ...props\n}: AlertDescriptionProps) => {\n const context = useContext(AlertContext);\n\n useEffect(() => {\n if (context) {\n const slotElement = (\n <AlertDescriptionSlot {...props}>{children}</AlertDescriptionSlot>\n );\n // Register it with the parent\n context.setDescription(slotElement);\n\n // On unmount, remove it\n return () => context.setDescription(null);\n }\n }, [children, props]);\n\n return null;\n};\n\nAlertDescription.displayName = \"Alert.Description\";\n","import { useContext, useEffect } from \"react\";\nimport { AlertActions as AlertActionsSlot } from \"../alert.slots\";\nimport type { AlertActionsProps } from \"../alert.types\";\nimport { AlertContext } from \"./alert.root\";\n\nexport const AlertActions = ({ children, ...props }: AlertActionsProps) => {\n const context = useContext(AlertContext);\n\n useEffect(() => {\n if (context) {\n const slotElement = (\n <AlertActionsSlot {...props}>{children}</AlertActionsSlot>\n );\n // Register it with the parent\n context.setActions(slotElement);\n\n // On unmount, remove it\n return () => context.setActions(null);\n }\n }, [children, props]);\n\n return null;\n};\n\nAlertActions.displayName = \"Alert.Actions\";\n","import { useContext, useEffect } from \"react\";\nimport { AlertDismissButton as AlertDismissButtonSlot } from \"../alert.slots\";\nimport type { AlertDismissButtonProps } from \"../alert.types\";\nimport { Clear } from \"@commercetools/nimbus-icons\";\nimport { IconButton } from \"../../icon-button\";\nimport { AlertContext } from \"./alert.root\";\n\nexport const AlertDismissButton = ({\n children,\n ...props\n}: AlertDismissButtonProps) => {\n const context = useContext(AlertContext);\n\n useEffect(() => {\n if (context) {\n const slotElement = (\n <AlertDismissButtonSlot>\n <IconButton\n aria-label=\"Dismiss\"\n {...props}\n variant=\"ghost\"\n size=\"2xs\"\n >\n <Clear role=\"img\" />\n </IconButton>\n </AlertDismissButtonSlot>\n );\n // Register it with the parent\n context.setDismiss(slotElement);\n\n // On unmount, remove it\n return () => context.setDismiss(null);\n }\n }, [children, props]);\n\n return null;\n};\n\nAlertDismissButton.displayName = \"Alert.DismissButton\";\n","import { AlertTitle } from \"./components/alert.title\";\nimport { AlertDescription } from \"./components/alert.description\";\nimport { AlertActions } from \"./components/alert.actions\";\nimport { AlertDismissButton } from \"./components/alert.dismiss-button\";\nimport { AlertRoot } from \"./components/alert.root\";\n\n/**\n * Alert\n * ============================================================\n * Provides feedback to the user about the status of an action or system event\n */\nexport const Alert = {\n Root: AlertRoot,\n Title: AlertTitle,\n Description: AlertDescription,\n Actions: AlertActions,\n DismissButton: AlertDismissButton,\n};\n\n// exports for internal use by react-docgen\nexport {\n AlertRoot as _AlertRoot,\n AlertTitle as _AlertTitle,\n AlertDescription as _AlertDescription,\n AlertActions as _AlertActions,\n AlertDismissButton as _AlertDismissButton,\n};\n"],"names":["alertRecipe","defineSlotRecipe","withProvider","withContext","createSlotRecipeContext","AlertRoot","AlertTitle","AlertDescription","AlertIcon","AlertActions","AlertDismissButton","getIconFromTone","tone","ErrorOutline","Info","WarningAmber","CheckCircleOutline","AlertContext","createContext","props","ref","children","restProps","titleNode","setTitle","useState","descriptionNode","setDescription","actionsNode","setActions","dismissNode","setDismiss","contextValue","useMemo","jsx","jsxs","AlertRootSlot","Stack","Box","context","useContext","useEffect","slotElement","AlertTitleSlot","AlertDescriptionSlot","AlertActionsSlot","AlertDismissButtonSlot","IconButton","Clear","Alert"],"mappings":"6QAKaA,EAAcC,EAAAA,iBAAiB,CAC1C,MAAO,CAAC,OAAQ,QAAS,cAAe,OAAQ,UAAW,eAAe,EAE1E,UAAW,eAGX,KAAM,CACJ,KAAM,CACJ,QAAS,cACT,cAAe,MACf,IAAK,MACL,MAAO,MAAA,EAET,KAAM,CACJ,UAAW,KACX,QAAS,CACP,MAAO,MACP,OAAQ,MACR,MAAO,iBAAA,CACT,EAEF,MAAO,CACL,MAAO,iBAAA,EAET,YAAa,CACX,MAAO,iBAAA,CACT,EAGF,SAAU,CACR,KAAM,CACJ,SAAU,CACR,KAAM,CAAE,aAAc,UAAA,CAAW,EAEnC,KAAM,CACJ,KAAM,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AAME,EAAe,CAAC,CAAE,SAAAY,EAAU,GAAGF,KAA+B,CACzE,MAAMoB,EAAUC,EAAAA,WAAWvB,CAAY,EAEvCwB,OAAAA,EAAAA,UAAU,IAAM,CACd,GAAIF,EAAS,CACX,MAAMG,EACJR,EAAAA,IAACW,EAAA,CAAkB,GAAG1B,EAAQ,SAAAE,EAAS,EAGzC,OAAAkB,EAAQ,WAAWG,CAAW,EAGvB,IAAMH,EAAQ,WAAW,IAAI,CACtC,CACF,EAAG,CAAClB,EAAUF,CAAK,CAAC,EAEb,IACT,EAEAV,EAAa,YAAc,gBCjBpB,MAAMC,EAAqB,CAAC,CACjC,SAAAW,EACA,GAAGF,CACL,IAA+B,CAC7B,MAAMoB,EAAUC,EAAAA,WAAWvB,CAAY,EAEvCwB,OAAAA,EAAAA,UAAU,IAAM,CACd,GAAIF,EAAS,CACX,MAAMG,QACHI,EAAA,CACC,SAAAZ,EAAAA,IAACa,EAAAA,WAAA,CACC,aAAW,UACV,GAAG5B,EACJ,QAAQ,QACR,KAAK,MAEL,SAAAe,EAAAA,IAACc,EAAAA,MAAA,CAAM,KAAK,KAAA,CAAM,CAAA,CAAA,EAEtB,EAGF,OAAAT,EAAQ,WAAWG,CAAW,EAGvB,IAAMH,EAAQ,WAAW,IAAI,CACtC,CACF,EAAG,CAAClB,EAAUF,CAAK,CAAC,EAEb,IACT,EAEAT,EAAmB,YAAc,sBC3B1B,MAAMuC,EAAQ,CACnB,KAAM5C,EACN,MAAOC,EACP,YAAaC,EACb,QAASE,EACT,cAAeC,CACjB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"alert-fGOiy9nj.es.js","sources":["../../src/components/alert/alert.recipe.tsx","../../src/components/alert/alert.slots.tsx","../../src/components/alert/components/alert.root.tsx","../../src/components/alert/components/alert.title.tsx","../../src/components/alert/components/alert.description.tsx","../../src/components/alert/components/alert.actions.tsx","../../src/components/alert/components/alert.dismiss-button.tsx","../../src/components/alert/alert.tsx"],"sourcesContent":["import { defineSlotRecipe } from \"@chakra-ui/react/styled-system\";\n/**\n * Recipe configuration for the Alert component.\n * Defines the styling variants and base styles using Chakra UI's recipe system.\n */\nexport const alertRecipe = defineSlotRecipe({\n slots: [\"root\", \"title\", \"description\", \"icon\", \"actions\", \"dismissButton\"],\n // Unique class name prefix for the component\n className: \"nimbus-alert\",\n\n // Base styles applied to all instances of the component\n base: {\n root: {\n display: \"inline-flex\",\n flexDirection: \"row\",\n gap: \"200\",\n width: \"100%\",\n },\n icon: {\n marginTop: \"50\",\n \"& svg\": {\n width: \"500\",\n height: \"500\",\n color: \"colorPalette.11\",\n },\n },\n title: {\n color: \"colorPalette.11\",\n },\n description: {\n color: \"colorPalette.11\",\n },\n },\n\n variants: {\n tone: {\n critical: {\n root: { colorPalette: \"critical\" },\n },\n info: {\n root: { colorPalette: \"info\" },\n },\n warning: {\n root: { colorPalette: \"amber\" },\n },\n positive: {\n root: { colorPalette: \"positive\" },\n },\n },\n\n variant: {\n flat: {},\n outlined: {\n root: {\n border: \"solid-25\",\n borderColor: \"colorPalette.5\",\n backgroundColor: \"colorPalette.2\",\n padding: \"200\",\n borderRadius: \"200\",\n },\n },\n },\n },\n});\n","import { createSlotRecipeContext } from \"@chakra-ui/react/styled-system\";\nimport { alertRecipe } from \"./alert.recipe\";\nimport type {\n AlertActionsProps,\n AlertDescriptionProps,\n AlertDismissButtonProps,\n AlertIconProps,\n AlertRootProps,\n AlertTitleProps,\n} from \"./alert.types\";\n\nconst { withProvider, withContext } = createSlotRecipeContext({\n recipe: alertRecipe,\n});\n\nexport const AlertRoot = withProvider<HTMLDivElement, AlertRootProps>(\n \"div\",\n \"root\"\n);\n\nexport const AlertTitle = withContext<HTMLDivElement, AlertTitleProps>(\n \"div\",\n \"title\"\n);\n\nexport const AlertDescription = withContext<\n HTMLDivElement,\n AlertDescriptionProps\n>(\"div\", \"description\");\n\nexport const AlertIcon = withContext<HTMLDivElement, AlertIconProps>(\n \"div\",\n \"icon\"\n);\n\nexport const AlertActions = withContext<HTMLDivElement, AlertActionsProps>(\n \"div\",\n \"actions\"\n);\n\n// This is a div wrapper for layout placement - note that we expect it to receive `IconButton` props, but we use a `div`.\n// We then forward the consumer props to the interior `IconButton` component.\nexport const AlertDismissButton = withContext<\n HTMLDivElement,\n AlertDismissButtonProps\n>(\"div\", \"dismissButton\");\n","import { createContext, useMemo, useState, type ReactNode } from \"react\";\nimport { AlertRoot as AlertRootSlot, AlertIcon } from \"../alert.slots\";\nimport type { AlertProps, AlertRootComponent } from \"../alert.types\";\nimport { Box } from \"../../box\";\nimport { Stack } from \"../../stack\";\nimport {\n CheckCircleOutline,\n ErrorOutline,\n Info,\n WarningAmber,\n} from \"@commercetools/nimbus-icons\";\n\nconst getIconFromTone = (tone: AlertProps[\"tone\"]) => {\n switch (tone) {\n case \"critical\":\n return <ErrorOutline />;\n case \"info\":\n return <Info />;\n case \"warning\":\n return <WarningAmber />;\n case \"positive\":\n return <CheckCircleOutline />;\n default:\n return null;\n }\n};\n\ntype AlertContextValue = {\n setTitle: (title: ReactNode) => void;\n setDescription: (description: ReactNode) => void;\n setActions: (actions: ReactNode) => void;\n setDismiss: (dismiss: ReactNode) => void;\n};\n\nexport const AlertContext = createContext<AlertContextValue | undefined>(\n undefined\n);\n\n/**\n * # Alert\n *\n * Provides feedback to the user about the status of an action or system event\n *\n * @see {@link https://nimbus-documentation.vercel.app/components/feedback/alert}\n */\nexport const AlertRoot: AlertRootComponent = (props) => {\n const { ref, children, ...restProps } = props;\n const [titleNode, setTitle] = useState<ReactNode>(null);\n const [descriptionNode, setDescription] = useState<ReactNode>(null);\n const [actionsNode, setActions] = useState<ReactNode>(null);\n const [dismissNode, setDismiss] = useState<ReactNode>(null);\n\n // Memoize the context value so we don't cause unnecessary re-renders\n const contextValue = useMemo(\n () => ({\n setTitle,\n setDescription,\n setActions,\n setDismiss,\n }),\n [setTitle, setDescription, setActions, setDismiss]\n );\n\n return (\n <AlertContext.Provider value={contextValue}>\n <AlertRootSlot ref={ref} {...restProps} role=\"alert\">\n <AlertIcon alignItems=\"flex-start\">\n {getIconFromTone(restProps.tone)}\n </AlertIcon>\n <Stack flex=\"1\" gap=\"200\">\n <Box>\n {titleNode}\n {descriptionNode}\n </Box>\n {actionsNode}\n </Stack>\n {dismissNode}\n\n {children}\n </AlertRootSlot>\n </AlertContext.Provider>\n );\n};\n\nAlertRoot.displayName = \"Alert.Root\";\n","import { useContext, useEffect } from \"react\";\nimport { AlertTitle as AlertTitleSlot } from \"../alert.slots\";\nimport type { AlertTitleProps } from \"../alert.types\";\nimport { AlertContext } from \"./alert.root\";\n\nexport const AlertTitle = ({ children, ...props }: AlertTitleProps) => {\n const context = useContext(AlertContext);\n\n useEffect(() => {\n if (context) {\n const slotElement = (\n <AlertTitleSlot {...props} fontWeight=\"600\">\n {children}\n </AlertTitleSlot>\n );\n // Register it with the parent\n context.setTitle(slotElement);\n\n // On unmount, remove it\n return () => context.setTitle(null);\n }\n }, [children, props]);\n\n return null;\n};\n\nAlertTitle.displayName = \"Alert.Title\";\n","import { useContext, useEffect } from \"react\";\nimport { AlertDescription as AlertDescriptionSlot } from \"../alert.slots\";\nimport type { AlertDescriptionProps } from \"../alert.types\";\nimport { AlertContext } from \"./alert.root\";\n\nexport const AlertDescription = ({\n children,\n ...props\n}: AlertDescriptionProps) => {\n const context = useContext(AlertContext);\n\n useEffect(() => {\n if (context) {\n const slotElement = (\n <AlertDescriptionSlot {...props}>{children}</AlertDescriptionSlot>\n );\n // Register it with the parent\n context.setDescription(slotElement);\n\n // On unmount, remove it\n return () => context.setDescription(null);\n }\n }, [children, props]);\n\n return null;\n};\n\nAlertDescription.displayName = \"Alert.Description\";\n","import { useContext, useEffect } from \"react\";\nimport { AlertActions as AlertActionsSlot } from \"../alert.slots\";\nimport type { AlertActionsProps } from \"../alert.types\";\nimport { AlertContext } from \"./alert.root\";\n\nexport const AlertActions = ({ children, ...props }: AlertActionsProps) => {\n const context = useContext(AlertContext);\n\n useEffect(() => {\n if (context) {\n const slotElement = (\n <AlertActionsSlot {...props}>{children}</AlertActionsSlot>\n );\n // Register it with the parent\n context.setActions(slotElement);\n\n // On unmount, remove it\n return () => context.setActions(null);\n }\n }, [children, props]);\n\n return null;\n};\n\nAlertActions.displayName = \"Alert.Actions\";\n","import { useContext, useEffect } from \"react\";\nimport { AlertDismissButton as AlertDismissButtonSlot } from \"../alert.slots\";\nimport type { AlertDismissButtonProps } from \"../alert.types\";\nimport { Clear } from \"@commercetools/nimbus-icons\";\nimport { IconButton } from \"../../icon-button\";\nimport { AlertContext } from \"./alert.root\";\n\nexport const AlertDismissButton = ({\n children,\n ...props\n}: AlertDismissButtonProps) => {\n const context = useContext(AlertContext);\n\n useEffect(() => {\n if (context) {\n const slotElement = (\n <AlertDismissButtonSlot>\n <IconButton\n aria-label=\"Dismiss\"\n {...props}\n variant=\"ghost\"\n size=\"2xs\"\n >\n <Clear role=\"img\" />\n </IconButton>\n </AlertDismissButtonSlot>\n );\n // Register it with the parent\n context.setDismiss(slotElement);\n\n // On unmount, remove it\n return () => context.setDismiss(null);\n }\n }, [children, props]);\n\n return null;\n};\n\nAlertDismissButton.displayName = \"Alert.DismissButton\";\n","import { AlertTitle } from \"./components/alert.title\";\nimport { AlertDescription } from \"./components/alert.description\";\nimport { AlertActions } from \"./components/alert.actions\";\nimport { AlertDismissButton } from \"./components/alert.dismiss-button\";\nimport { AlertRoot } from \"./components/alert.root\";\n\n/**\n * Alert\n * ============================================================\n * Provides feedback to the user about the status of an action or system event\n */\nexport const Alert = {\n Root: AlertRoot,\n Title: AlertTitle,\n Description: AlertDescription,\n Actions: AlertActions,\n DismissButton: AlertDismissButton,\n};\n\n// exports for internal use by react-docgen\nexport {\n AlertRoot as _AlertRoot,\n AlertTitle as _AlertTitle,\n AlertDescription as _AlertDescription,\n AlertActions as _AlertActions,\n AlertDismissButton as _AlertDismissButton,\n};\n"],"names":["alertRecipe","defineSlotRecipe","withProvider","withContext","createSlotRecipeContext","AlertRoot","AlertTitle","AlertDescription","AlertIcon","AlertActions","AlertDismissButton","getIconFromTone","tone","ErrorOutline","Info","WarningAmber","CheckCircleOutline","AlertContext","createContext","props","ref","children","restProps","titleNode","setTitle","useState","descriptionNode","setDescription","actionsNode","setActions","dismissNode","setDismiss","contextValue","useMemo","jsx","jsxs","AlertRootSlot","Stack","Box","context","useContext","useEffect","slotElement","AlertTitleSlot","AlertDescriptionSlot","AlertActionsSlot","AlertDismissButtonSlot","IconButton","Clear","Alert"],"mappings":";;;;;;;AAKO,MAAMA,IAAc,gBAAAC,EAAiB;AAAA,EAC1C,OAAO,CAAC,QAAQ,SAAS,eAAe,QAAQ,WAAW,eAAe;AAAA;AAAA,EAE1E,WAAW;AAAA;AAAA,EAGX,MAAM;AAAA,IACJ,MAAM;AAAA,MACJ,SAAS;AAAA,MACT,eAAe;AAAA,MACf,KAAK;AAAA,MACL,OAAO;AAAA,IAAA;AAAA,IAET,MAAM;AAAA,MACJ,WAAW;AAAA,MACX,SAAS;AAAA,QACP,OAAO;AAAA,QACP,QAAQ;AAAA,QACR,OAAO;AAAA,MAAA;AAAA,IACT;AAAA,IAEF,OAAO;AAAA,MACL,OAAO;AAAA,IAAA;AAAA,IAET,aAAa;AAAA,MACX,OAAO;AAAA,IAAA;AAAA,EACT;AAAA,EAGF,UAAU;AAAA,IACR,MAAM;AAAA,MACJ,UAAU;AAAA,QACR,MAAM,EAAE,cAAc,WAAA;AAAA,MAAW;AAAA,MAEnC,MAAM;AAAA,QACJ,MAAM,EAAE,cAAc,OAAA;AAAA,MAAO;AAAA,MAE/B,SAAS;AAAA,QACP,MAAM,EAAE,cAAc,QAAA;AAAA,MAAQ;AAAA,MAEhC,UAAU;AAAA,QACR,MAAM,EAAE,cAAc,WAAA;AAAA,MAAW;AAAA,IACnC;AAAA,IAGF,SAAS;AAAA,MACP,MAAM,CAAA;AAAA,MACN,UAAU;AAAA,QACR,MAAM;AAAA,UACJ,QAAQ;AAAA,UACR,aAAa;AAAA,UACb,iBAAiB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ACT;AAEAZ,EAAiB,cAAc;ACtBxB,MAAME,IAAe,CAAC,EAAE,UAAAY,GAAU,GAAGF,QAA+B;AACzE,QAAMoB,IAAUC,EAAWvB,CAAY;AAEvC,SAAAwB,EAAU,MAAM;AACd,QAAIF,GAAS;AACX,YAAMG,IACJ,gBAAAR,EAACW,GAAA,EAAkB,GAAG1B,GAAQ,UAAAE,GAAS;AAGzC,aAAAkB,EAAQ,WAAWG,CAAW,GAGvB,MAAMH,EAAQ,WAAW,IAAI;AAAA,IACtC;AAAA,EACF,GAAG,CAAClB,GAAUF,CAAK,CAAC,GAEb;AACT;AAEAV,EAAa,cAAc;ACjBpB,MAAMC,IAAqB,CAAC;AAAA,EACjC,UAAAW;AAAA,EACA,GAAGF;AACL,MAA+B;AAC7B,QAAMoB,IAAUC,EAAWvB,CAAY;AAEvC,SAAAwB,EAAU,MAAM;AACd,QAAIF,GAAS;AACX,YAAMG,sBACHI,GAAA,EACC,UAAA,gBAAAZ;AAAA,QAACa;AAAA,QAAA;AAAA,UACC,cAAW;AAAA,UACV,GAAG5B;AAAA,UACJ,SAAQ;AAAA,UACR,MAAK;AAAA,UAEL,UAAA,gBAAAe,EAACc,GAAA,EAAM,MAAK,MAAA,CAAM;AAAA,QAAA;AAAA,MAAA,GAEtB;AAGF,aAAAT,EAAQ,WAAWG,CAAW,GAGvB,MAAMH,EAAQ,WAAW,IAAI;AAAA,IACtC;AAAA,EACF,GAAG,CAAClB,GAAUF,CAAK,CAAC,GAEb;AACT;AAEAT,EAAmB,cAAc;AC3B1B,MAAMuC,IAAQ;AAAA,EACnB,MAAM5C;AAAA,EACN,OAAOC;AAAA,EACP,aAAaC;AAAA,EACb,SAASE;AAAA,EACT,eAAeC;AACjB;"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";const e=require("react/jsx-runtime"),y=require("@chakra-ui/react/styled-system"),j=require("./index-B3DGNvyC.cjs.js"),h=require("@commercetools/nimbus-icons"),b=require("./DatePicker-_aG-c1ms.cjs.js"),$=require("./Dialog-DZm5Sj40.cjs.js"),C=require("./Group-MdeByg6t.cjs.js"),q=require("./extractStyleProps-bWKBkEco.cjs.js"),g=require("./icon-button-CPXhdrQY.cjs.js"),D=require("./date-input-C4NM5AFC.cjs.js"),k=require("./calendar-BdL5nJXs.cjs.js"),I=require("./text-CCW9kDT_.cjs.js"),T=require("./time-input-B_PIpe-Z.cjs.js"),m=require("react"),R=require("./context-OoV8SSWX.cjs.js"),E=require("@chakra-ui/react/flex"),P=require("./Button-BtJHe9xY.cjs.js"),S=require("./utils-BHdR5Nww.cjs.js"),V=require("./DateField-rweHHCKR.cjs.js"),{withProvider:z,withContext:f}=y.createSlotRecipeContext({recipe:j.datePickerSlotRecipe}),B=z("div","root"),w=f("div","group"),F=f("div","trigger"),G=f("div","popover"),A=f("div","calendar"),O=({hideTimeZone:s,hourCycle:r})=>{const{locale:c}=R.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),l=m.useContext(b.$06d5b8ec9ee5d538$export$50a10c048fdcdee9),{granularity:u,dateValue:t}=l,n=m.useRef(null),d=m.useRef(t);return u==="day"?null:(m.useEffect(()=>{let i;if(t&&d.current?.compare(t)!==0){const a=n.current,p=document.activeElement;a?.contains(p)&&p?.getAttribute("role")==="spinbutton"||(i=setTimeout(()=>{a&&a.querySelector('[role="spinbutton"]')?.focus()},50))}return d.current=t,()=>{i&&clearTimeout(i)}},[t]),e.jsxs(E.Flex,{ref:n,borderTop:"solid-25",borderColor:"neutral.3",py:"300",px:"400",alignItems:"center",justifyContent:"center",gap:"200",children:[e.jsx(I.Text,{textStyle:"xs",fontWeight:"500",color:"neutral.12",children:"Start time"}),e.jsx(T.TimeInput,{slot:"timeInput",locale:c,variant:"ghost",size:"sm",hideTimeZone:s,hourCycle:r})]}))},H=({children:s})=>{const r=S.$64fa3d84918910a7$export$fabf2dc03a41866e(P.$d2b4bc8c273e7be6$export$24d547caef80ccd1)||{},c=m.useContext(b.$06d5b8ec9ee5d538$export$50a10c048fdcdee9),l=c?.dateValue===null,{timeValue:u,setTimeValue:t,granularity:n}=c,d=r?.isDisabled,i=()=>{switch(n){case"hour":return"Enter time (hour)";case"minute":return"Enter time (hour and minute)";case"second":return"Enter time (hour, minute, and second)";default:return"Enter time"}},a={calendarToggle:{...r,onPress:o=>{const x=document?.activeElement;x&&x.blur(),r.onPress?.(o)}},clear:{onPress:()=>c?.setValue(null),"aria-label":"Clear input value",isDisabled:d,style:l?{display:"none"}:void 0,"aria-hidden":l?!0:void 0}},p={timeInput:{value:u,onChange:o=>{o!==null&&t(o)},granularity:n==="day"?void 0:n,"aria-label":i()}};return e.jsx(S.$64fa3d84918910a7$export$2881499e37b75b9a,{values:[[P.$d2b4bc8c273e7be6$export$24d547caef80ccd1,{slots:a}],[V.$40825cdb76e74f70$export$8e17ddc448e87c1e,{slots:p}]],children:s})},v=s=>{const{size:r="md",variant:c,granularity:l="day",hideTimeZone:u,hourCycle:t}=s,n=y.useSlotRecipe({recipe:j.datePickerSlotRecipe}),[d,i]=n.splitVariantProps(s),[a,p]=q.extractStyleProps(i),o=r==="md"?"xs":"2xs",x=l==="day"?s.shouldCloseOnSelect:!1;return e.jsx(B,{...d,...a,asChild:!0,children:e.jsx(b.$06d5b8ec9ee5d538$export$5109c6dd95d8fb00,{...p,shouldCloseOnSelect:x,children:e.jsxs(H,{children:[e.jsx(w,{asChild:!0,children:e.jsxs(C.$a049562f99e7db0e$export$eb2fcfdbd7ba97d4,{children:[e.jsx(D.DateInput,{size:r,variant:c,width:"full",hideTimeZone:u,hourCycle:t}),e.jsxs(F,{children:[e.jsx(g.IconButton,{tone:"primary",variant:"ghost",size:o,slot:"clear",children:e.jsx(h.Close,{})}),e.jsx(g.IconButton,{tone:"primary",variant:"ghost",size:o,slot:"calendarToggle",children:e.jsx(h.CalendarMonth,{})})]})]})}),e.jsx(G,{asChild:!0,children:e.jsx($.$07b14b47974efb58$export$5b6b19405a83ff9d,{placement:"bottom end",children:e.jsxs($.$de32f1b87079253c$export$3ddf2d174ce01153,{children:[e.jsx(A,{children:e.jsx(k.Calendar,{})}),e.jsx(O,{hideTimeZone:u,hourCycle:t})]})})})]})})})};v.displayName="DatePicker";exports.DatePicker=v;
|
|
2
|
-
//# sourceMappingURL=date-picker-ChoImuv_.cjs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"date-picker-ChoImuv_.cjs.js","sources":["../../src/components/date-picker/date-picker.slots.tsx","../../src/components/date-picker/components/date-picker.time-input.tsx","../../src/components/date-picker/components/date-picker.custom-context.tsx","../../src/components/date-picker/date-picker.tsx"],"sourcesContent":["import {\n type HTMLChakraProps,\n type RecipeProps,\n type UnstyledProp,\n createSlotRecipeContext,\n} from \"@chakra-ui/react/styled-system\";\n\nimport { datePickerSlotRecipe } from \"./date-picker.recipe\";\n\n/**\n * Base recipe props interface that combines Chakra UI's recipe props\n * with the unstyled prop option for the div element.\n */\ninterface DatePickerRecipeProps extends RecipeProps<\"div\">, UnstyledProp {}\n\n/**\n * Root props interface that extends Chakra's HTML props with our recipe props.\n * This creates a complete set of props for the root element, combining\n * HTML attributes, Chakra's styling system, and our custom recipe props.\n */\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport interface DatePickerRootProps\n extends HTMLChakraProps<\"div\", DatePickerRecipeProps> {}\n\n// Correctly destructure from createSlotRecipeContext based on project examples\nconst { withProvider, withContext } = createSlotRecipeContext({\n recipe: datePickerSlotRecipe,\n});\n\n/**\n * Root component that provides the styling context for the DatePicker component.\n * Uses Chakra UI's recipe context system for consistent styling across instances.\n */\nexport const DatePickerRootSlot = withProvider<\n HTMLDivElement,\n DatePickerRootProps\n>(\"div\", \"root\");\n\n/**\n * Slot component for the input group containing the DateInput and trigger button.\n */\nexport const DatePickerGroupSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"group\");\n\n/**\n * Slot component for the trigger button that opens the calendar popover.\n */\nexport const DatePickerTriggerSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"trigger\");\n\n/**\n * Slot component for the popover container.\n */\nexport const DatePickerPopoverSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"popover\");\n\n/**\n * Slot component for the calendar container within the popover.\n */\nexport const DatePickerCalendarSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"calendar\");\n\n/**\n * Slot component for the calendar header.\n */\nexport const DatePickerCalendarHeaderSlot = withContext<\n HTMLElement,\n HTMLChakraProps<\"header\">\n>(\"header\", \"calendarHeader\");\n\n/**\n * Slot component for the calendar grid.\n */\nexport const DatePickerCalendarGridSlot = withContext<\n HTMLTableElement,\n HTMLChakraProps<\"table\">\n>(\"table\", \"calendarGrid\");\n\n/**\n * Slot component for individual calendar cells.\n */\nexport const DatePickerCalendarCellSlot = withContext<\n HTMLTableCellElement,\n HTMLChakraProps<\"td\">\n>(\"td\", \"calendarCell\");\n","import { Flex, Text, TimeInput } from \"@/components\";\nimport { useContext, useRef, useEffect } from \"react\";\nimport { useLocale } from \"react-aria\";\nimport { DatePickerStateContext } from \"react-aria-components\";\nimport type { DatePickerTimeInputProps } from \"../date-picker.types\";\n\nexport const DatePickerTimeInput = ({\n hideTimeZone,\n hourCycle,\n}: DatePickerTimeInputProps) => {\n const { locale } = useLocale();\n const datePickerState = useContext(DatePickerStateContext);\n const { granularity, dateValue } = datePickerState!;\n const timeInputRef = useRef<HTMLDivElement>(null);\n const previousDateRef = useRef(dateValue);\n\n // do not show up to the party if you're not invited\n if (granularity === \"day\") {\n return null;\n }\n\n // Focus the time input when date changes (user selects a date from calendar)\n useEffect(() => {\n // Check if date changed\n let timeoutId: ReturnType<typeof setTimeout> | undefined;\n\n if (dateValue && previousDateRef.current?.compare(dateValue) !== 0) {\n // Only auto-focus if no time input segment currently has focus\n // This prevents stealing focus during user interaction with time segments\n const container = timeInputRef.current;\n const activeElement = document.activeElement;\n const hasTimeSegmentFocus =\n container?.contains(activeElement) &&\n activeElement?.getAttribute(\"role\") === \"spinbutton\";\n\n if (!hasTimeSegmentFocus) {\n // Small delay to ensure the DOM is ready\n timeoutId = setTimeout(() => {\n // Find the first focusable segment within the time input container\n if (container) {\n const firstSegment = container.querySelector(\n '[role=\"spinbutton\"]'\n ) as HTMLElement;\n firstSegment?.focus();\n }\n }, 50);\n }\n }\n\n previousDateRef.current = dateValue;\n\n // Cleanup timeout on effect re-run or unmount to prevent memory leaks\n return () => {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n };\n }, [dateValue]);\n\n return (\n <Flex\n ref={timeInputRef}\n borderTop=\"solid-25\"\n borderColor=\"neutral.3\"\n py=\"300\"\n px=\"400\"\n alignItems=\"center\"\n justifyContent=\"center\"\n gap=\"200\"\n >\n {/* TODO: translate hardcoded string */}\n <Text textStyle=\"xs\" fontWeight=\"500\" color=\"neutral.12\">\n Start time\n </Text>\n <TimeInput\n slot=\"timeInput\"\n locale={locale}\n variant=\"ghost\"\n size=\"sm\"\n hideTimeZone={hideTimeZone}\n hourCycle={hourCycle}\n />\n </Flex>\n );\n};\n","import { useContext } from \"react\";\nimport {\n Provider,\n ButtonContext,\n DatePickerStateContext,\n TimeFieldContext,\n useSlottedContext,\n} from \"react-aria-components\";\nimport type { PressEvent, TimeValue } from \"react-aria\";\n\nexport const DatePickerCustomContext = ({\n children,\n}: {\n children: React.ReactNode;\n}) => {\n const buttonContext = useSlottedContext(ButtonContext) || {};\n const datePickerState = useContext(DatePickerStateContext);\n const noInputValue = datePickerState?.dateValue === null;\n\n const { timeValue, setTimeValue, granularity } = datePickerState!;\n\n // Try to get disabled state from the button context\n const isDatePickerDisabled = buttonContext?.isDisabled;\n\n // Generate default aria-label based on granularity if not provided\n const getDefaultTimeInputAriaLabel = () => {\n switch (granularity) {\n case \"hour\":\n return \"Enter time (hour)\";\n case \"minute\":\n return \"Enter time (hour and minute)\";\n case \"second\":\n return \"Enter time (hour, minute, and second)\";\n default:\n return \"Enter time\";\n }\n };\n\n /**\n * Button slots\n * ================================\n */\n const buttonSlots = {\n /** toggles the calendar popover */\n calendarToggle: {\n ...buttonContext,\n onPress: (event: PressEvent) => {\n // Ensure any active input (e.g., date picker segment) loses focus\n // because blurring the input will close the popover if it's open (or was just opened)\n const activeElement = document?.activeElement as HTMLElement | null;\n\n if (activeElement) {\n activeElement.blur();\n }\n\n buttonContext.onPress?.(event);\n },\n },\n /** Clear button that displays when there's a value in each segment - hidden from both visual and screen readers when there's no value */\n clear: {\n onPress: () => datePickerState?.setValue(null),\n \"aria-label\": \"Clear input value\",\n isDisabled: isDatePickerDisabled,\n // Hide the button when there's no value\n style: noInputValue ? { display: \"none\" } : undefined,\n \"aria-hidden\": noInputValue ? true : undefined,\n },\n };\n\n /**\n * TimeInput slots\n * ================================\n */\n\n const timeInputSlots = {\n timeInput: {\n value: timeValue,\n onChange: (value: TimeValue | null) => {\n if (value !== null) {\n setTimeValue(value);\n }\n },\n granularity: granularity === \"day\" ? undefined : granularity,\n \"aria-label\": getDefaultTimeInputAriaLabel(),\n },\n };\n\n return (\n <Provider\n values={[\n [\n ButtonContext,\n {\n slots: buttonSlots,\n },\n ],\n [TimeFieldContext, { slots: timeInputSlots }],\n ]}\n >\n {children}\n </Provider>\n );\n};\n","import {\n DatePickerRootSlot,\n DatePickerGroupSlot,\n DatePickerTriggerSlot,\n DatePickerPopoverSlot,\n DatePickerCalendarSlot,\n} from \"./date-picker.slots\";\n\nimport { CalendarMonth, Close } from \"@commercetools/nimbus-icons\";\n\nimport {\n DatePicker as ReactAriaDatePicker,\n Group,\n Popover,\n Dialog,\n} from \"react-aria-components\";\nimport { useSlotRecipe } from \"@chakra-ui/react/styled-system\";\nimport { datePickerSlotRecipe } from \"./date-picker.recipe\";\nimport type { DatePickerProps } from \"./date-picker.types\";\nimport { extractStyleProps } from \"@/utils/extractStyleProps\";\nimport { DateInput, Calendar, IconButton } from \"@/components\";\nimport { DatePickerTimeInput } from \"./components/date-picker.time-input\";\nimport { DatePickerCustomContext } from \"./components/date-picker.custom-context\";\n\n/**\n * # DatePicker\n *\n * a UI component for users to enter or select a specific calendar date.\n *\n * @see {@link https://nimbus-documentation.vercel.app/components/inputs/datepicker}\n */\nexport const DatePicker = (props: DatePickerProps) => {\n const {\n size = \"md\",\n variant,\n granularity = \"day\",\n hideTimeZone,\n hourCycle,\n } = props;\n const recipe = useSlotRecipe({ recipe: datePickerSlotRecipe });\n const [recipeProps, remainingProps] = recipe.splitVariantProps(props);\n const [styleProps, otherProps] = extractStyleProps(remainingProps);\n\n // the size of the buttons overlaying the input\n const overlayButtonSize = size === \"md\" ? \"xs\" : \"2xs\";\n\n // When granularity is \"day\", use the prop value (defaults to true if not provided)\n // For other granularities (time-based), force to false so users can set both date and time\n const shouldCloseOnSelect =\n granularity === \"day\" ? props.shouldCloseOnSelect : false;\n\n return (\n <DatePickerRootSlot {...recipeProps} {...styleProps} asChild>\n <ReactAriaDatePicker\n {...otherProps}\n shouldCloseOnSelect={shouldCloseOnSelect}\n >\n <DatePickerCustomContext>\n <DatePickerGroupSlot asChild>\n <Group>\n <DateInput\n size={size}\n variant={variant}\n width=\"full\"\n hideTimeZone={hideTimeZone}\n hourCycle={hourCycle}\n />\n <DatePickerTriggerSlot>\n {/* @ts-expect-error react aria is adding the aria-label prop */}\n <IconButton\n tone=\"primary\"\n variant=\"ghost\"\n size={overlayButtonSize}\n slot=\"clear\"\n >\n <Close />\n </IconButton>\n {/* @ts-expect-error react aria is adding the aria-label prop */}\n <IconButton\n tone=\"primary\"\n variant=\"ghost\"\n size={overlayButtonSize}\n slot=\"calendarToggle\"\n >\n <CalendarMonth />\n </IconButton>\n </DatePickerTriggerSlot>\n </Group>\n </DatePickerGroupSlot>\n <DatePickerPopoverSlot asChild>\n <Popover placement=\"bottom end\">\n <Dialog>\n <DatePickerCalendarSlot>\n <Calendar />\n </DatePickerCalendarSlot>\n <DatePickerTimeInput\n hideTimeZone={hideTimeZone}\n hourCycle={hourCycle}\n />\n </Dialog>\n </Popover>\n </DatePickerPopoverSlot>\n </DatePickerCustomContext>\n </ReactAriaDatePicker>\n </DatePickerRootSlot>\n );\n};\n\nDatePicker.displayName = \"DatePicker\";\n"],"names":["withProvider","withContext","createSlotRecipeContext","datePickerSlotRecipe","DatePickerRootSlot","DatePickerGroupSlot","DatePickerTriggerSlot","DatePickerPopoverSlot","DatePickerCalendarSlot","DatePickerTimeInput","hideTimeZone","hourCycle","locale","useLocale","datePickerState","useContext","DatePickerStateContext","granularity","dateValue","timeInputRef","useRef","previousDateRef","useEffect","timeoutId","container","activeElement","jsxs","Flex","jsx","Text","TimeInput","DatePickerCustomContext","children","buttonContext","useSlottedContext","ButtonContext","noInputValue","timeValue","setTimeValue","isDatePickerDisabled","getDefaultTimeInputAriaLabel","buttonSlots","event","timeInputSlots","value","Provider","TimeFieldContext","DatePicker","props","size","variant","recipe","useSlotRecipe","recipeProps","remainingProps","styleProps","otherProps","extractStyleProps","overlayButtonSize","shouldCloseOnSelect","ReactAriaDatePicker","Group","DateInput","IconButton","Close","CalendarMonth","Popover","Dialog","Calendar"],"mappings":"8uBAyBM,CAAE,aAAAA,EAAc,YAAAC,CAAA,EAAgBC,0BAAwB,CAC5D,OAAQC,EAAAA,oBACV,CAAC,EAMYC,EAAqBJ,EAGhC,MAAO,MAAM,EAKFK,EAAsBJ,EAGjC,MAAO,OAAO,EAKHK,EAAwBL,EAGnC,MAAO,SAAS,EAKLM,EAAwBN,EAGnC,MAAO,SAAS,EAKLO,EAAyBP,EAGpC,MAAO,UAAU,EC9DNQ,EAAsB,CAAC,CAClC,aAAAC,EACA,UAAAC,CACF,IAAgC,CAC9B,KAAM,CAAE,OAAAC,CAAA,EAAWC,4CAAA,EACbC,EAAkBC,EAAAA,WAAWC,2CAAsB,EACnD,CAAE,YAAAC,EAAa,UAAAC,CAAA,EAAcJ,EAC7BK,EAAeC,EAAAA,OAAuB,IAAI,EAC1CC,EAAkBD,EAAAA,OAAOF,CAAS,EAGxC,OAAID,IAA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