@commercetools/nimbus 2.0.1-rc3 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{accordion-CKDnNkVv.es.js → accordion-CrISuCHH.es.js} +2 -2
- package/dist/chunks/accordion-CrISuCHH.es.js.map +1 -0
- package/dist/chunks/accordion-D7a9HHSH.cjs.js +2 -0
- package/dist/chunks/accordion-D7a9HHSH.cjs.js.map +1 -0
- package/dist/chunks/calendar-0Tr21POc.cjs.js +2 -0
- package/dist/chunks/calendar-0Tr21POc.cjs.js.map +1 -0
- package/dist/chunks/{calendar-lD6G93R9.es.js → calendar-okvAi9qK.es.js} +2 -2
- package/dist/chunks/calendar-okvAi9qK.es.js.map +1 -0
- package/dist/chunks/{checkbox-BB-WJdal.es.js → checkbox-Bp0eyZ6q.es.js} +2 -2
- package/dist/chunks/{checkbox-BB-WJdal.es.js.map → checkbox-Bp0eyZ6q.es.js.map} +1 -1
- package/dist/chunks/checkbox-QQkdNVJO.cjs.js +2 -0
- package/dist/chunks/{checkbox-Dod-yTj4.cjs.js.map → checkbox-QQkdNVJO.cjs.js.map} +1 -1
- package/dist/chunks/collapsible-motion-CykDlHn3.cjs.js +2 -0
- package/dist/chunks/collapsible-motion-CykDlHn3.cjs.js.map +1 -0
- package/dist/chunks/{collapsible-motion-CSrKjF8X.es.js → collapsible-motion-DPqgzRWq.es.js} +2 -2
- package/dist/chunks/collapsible-motion-DPqgzRWq.es.js.map +1 -0
- package/dist/chunks/combobox-Bntl4sYo.cjs.js +2 -0
- package/dist/chunks/{combobox-B5UxZWSX.cjs.js.map → combobox-Bntl4sYo.cjs.js.map} +1 -1
- package/dist/chunks/{combobox-D_7gr3DY.es.js → combobox-DYREbkL7.es.js} +2 -2
- package/dist/chunks/{combobox-D_7gr3DY.es.js.map → combobox-DYREbkL7.es.js.map} +1 -1
- package/dist/chunks/data-table-BhV1DJXJ.cjs.js +2 -0
- package/dist/chunks/{data-table-C51WU0Cc.cjs.js.map → data-table-BhV1DJXJ.cjs.js.map} +1 -1
- package/dist/chunks/{data-table-ClMivKY1.es.js → data-table-TSza8b10.es.js} +4 -4
- package/dist/chunks/{data-table-ClMivKY1.es.js.map → data-table-TSza8b10.es.js.map} +1 -1
- package/dist/chunks/date-input-B84sXbjL.cjs.js +2 -0
- package/dist/chunks/date-input-B84sXbjL.cjs.js.map +1 -0
- package/dist/chunks/{date-input-Cap8-3zj.es.js → date-input-BiOdvpWz.es.js} +2 -2
- package/dist/chunks/date-input-BiOdvpWz.es.js.map +1 -0
- package/dist/chunks/date-picker-2SDD5gY9.cjs.js +2 -0
- package/dist/chunks/{date-picker-CZAoPNsT.cjs.js.map → date-picker-2SDD5gY9.cjs.js.map} +1 -1
- package/dist/chunks/{date-picker-ChZ8H-MT.es.js → date-picker-EuMU6RtR.es.js} +5 -5
- package/dist/chunks/{date-picker-ChZ8H-MT.es.js.map → date-picker-EuMU6RtR.es.js.map} +1 -1
- package/dist/chunks/{date-range-picker-DGWMdcAN.es.js → date-range-picker-CL-QH8BW.es.js} +5 -5
- package/dist/chunks/{date-range-picker-DGWMdcAN.es.js.map → date-range-picker-CL-QH8BW.es.js.map} +1 -1
- package/dist/chunks/date-range-picker-DmHmhMvU.cjs.js +2 -0
- package/dist/chunks/{date-range-picker-iENzosfN.cjs.js.map → date-range-picker-DmHmhMvU.cjs.js.map} +1 -1
- package/dist/chunks/{dialog-CKwC3dk3.cjs.js → dialog-BeKbQUsU.cjs.js} +2 -2
- package/dist/chunks/{dialog-CKwC3dk3.cjs.js.map → dialog-BeKbQUsU.cjs.js.map} +1 -1
- package/dist/chunks/{dialog-BwtIcIvd.es.js → dialog-C9Dn6GoU.es.js} +2 -2
- package/dist/chunks/{dialog-BwtIcIvd.es.js.map → dialog-C9Dn6GoU.es.js.map} +1 -1
- package/dist/chunks/{dialog.title-CP_ZeiK4.es.js → dialog.title-CfBfNT9q.es.js} +2 -2
- package/dist/chunks/dialog.title-CfBfNT9q.es.js.map +1 -0
- package/dist/chunks/dialog.title-CynBe3KN.cjs.js +2 -0
- package/dist/chunks/dialog.title-CynBe3KN.cjs.js.map +1 -0
- package/dist/chunks/{draggable-list-s43baxoM.es.js → draggable-list-3KlajQgQ.es.js} +3 -3
- package/dist/chunks/{draggable-list-s43baxoM.es.js.map → draggable-list-3KlajQgQ.es.js.map} +1 -1
- package/dist/chunks/{draggable-list-MGvr5-A-.cjs.js → draggable-list-uMR8JUsT.cjs.js} +2 -2
- package/dist/chunks/{draggable-list-MGvr5-A-.cjs.js.map → draggable-list-uMR8JUsT.cjs.js.map} +1 -1
- package/dist/chunks/{drawer-BJ4qvGnj.es.js → drawer-CT5qAdLo.es.js} +2 -2
- package/dist/chunks/drawer-CT5qAdLo.es.js.map +1 -0
- package/dist/chunks/drawer-vgDYdzlq.cjs.js +2 -0
- package/dist/chunks/drawer-vgDYdzlq.cjs.js.map +1 -0
- package/dist/chunks/{extractStyleProps-DYXEhLtq.es.js → extract-style-props-DYXEhLtq.es.js} +1 -1
- package/dist/chunks/extract-style-props-DYXEhLtq.es.js.map +1 -0
- package/dist/chunks/{extractStyleProps-Dk3fpLyQ.cjs.js → extract-style-props-Dk3fpLyQ.cjs.js} +1 -1
- package/dist/chunks/extract-style-props-Dk3fpLyQ.cjs.js.map +1 -0
- package/dist/chunks/group-BqUFlw5R.cjs.js.map +1 -1
- package/dist/chunks/group-CWADf2vF.es.js.map +1 -1
- package/dist/chunks/icon-CenxuChf.es.js.map +1 -1
- package/dist/chunks/icon-D39U--jA.cjs.js.map +1 -1
- package/dist/chunks/{icon-toggle-button-Bi-9Obfx.es.js → icon-toggle-button-Bt_1Mdus.es.js} +2 -2
- package/dist/chunks/{icon-toggle-button-Bi-9Obfx.es.js.map → icon-toggle-button-Bt_1Mdus.es.js.map} +1 -1
- package/dist/chunks/{icon-toggle-button-eLrsWehe.cjs.js → icon-toggle-button-Bv-FwWwz.cjs.js} +2 -2
- package/dist/chunks/{icon-toggle-button-eLrsWehe.cjs.js.map → icon-toggle-button-Bv-FwWwz.cjs.js.map} +1 -1
- package/dist/chunks/kbd-BaeV_DL-.cjs.js.map +1 -1
- package/dist/chunks/kbd-CH9rYghB.es.js.map +1 -1
- package/dist/chunks/{localized-field-D3G0Uy7Z.es.js → localized-field-Bp4N2Mvl.es.js} +5 -5
- package/dist/chunks/{localized-field-D3G0Uy7Z.es.js.map → localized-field-Bp4N2Mvl.es.js.map} +1 -1
- package/dist/chunks/{localized-field-C7Vribb2.cjs.js → localized-field-Cmwb6fmQ.cjs.js} +2 -2
- package/dist/chunks/{localized-field-C7Vribb2.cjs.js.map → localized-field-Cmwb6fmQ.cjs.js.map} +1 -1
- package/dist/chunks/menu-SXtkybBB.cjs.js +2 -0
- package/dist/chunks/menu-SXtkybBB.cjs.js.map +1 -0
- package/dist/chunks/{menu-D-vE6ZpM.es.js → menu-XKnGXngu.es.js} +2 -2
- package/dist/chunks/menu-XKnGXngu.es.js.map +1 -0
- package/dist/chunks/{money-input-sk0Slpeu.es.js → money-input-BqYBGLzc.es.js} +4 -4
- package/dist/chunks/{money-input-sk0Slpeu.es.js.map → money-input-BqYBGLzc.es.js.map} +1 -1
- package/dist/chunks/money-input-Cz8E18lq.cjs.js +2 -0
- package/dist/chunks/{money-input-Cu_J86Eu.cjs.js.map → money-input-Cz8E18lq.cjs.js.map} +1 -1
- package/dist/chunks/{multiline-text-input-CilSJJaO.es.js → multiline-text-input-AyyHGKY2.es.js} +2 -2
- package/dist/chunks/multiline-text-input-AyyHGKY2.es.js.map +1 -0
- package/dist/chunks/multiline-text-input-jGidPD3q.cjs.js +2 -0
- package/dist/chunks/multiline-text-input-jGidPD3q.cjs.js.map +1 -0
- package/dist/chunks/number-input-CynG_F-c.cjs.js +2 -0
- package/dist/chunks/{number-input-wMW-o4di.cjs.js.map → number-input-CynG_F-c.cjs.js.map} +1 -1
- package/dist/chunks/{number-input-CktMxOdZ.es.js → number-input-rotBI7ui.es.js} +2 -2
- package/dist/chunks/{number-input-CktMxOdZ.es.js.map → number-input-rotBI7ui.es.js.map} +1 -1
- package/dist/chunks/{pagination-BWdg8s6g.cjs.js → pagination-DdMhz-Ka.cjs.js} +2 -2
- package/dist/chunks/{pagination-BWdg8s6g.cjs.js.map → pagination-DdMhz-Ka.cjs.js.map} +1 -1
- package/dist/chunks/{pagination-Bcq69Nv3.es.js → pagination-Dqt0f5WQ.es.js} +3 -3
- package/dist/chunks/{pagination-Bcq69Nv3.es.js.map → pagination-Dqt0f5WQ.es.js.map} +1 -1
- package/dist/chunks/{password-input-6SMjhXSO.cjs.js → password-input-BVHKD6s2.cjs.js} +2 -2
- package/dist/chunks/{password-input-6SMjhXSO.cjs.js.map → password-input-BVHKD6s2.cjs.js.map} +1 -1
- package/dist/chunks/{password-input-6MO4I-2j.es.js → password-input-DRmX3C3I.es.js} +2 -2
- package/dist/chunks/{password-input-6MO4I-2j.es.js.map → password-input-DRmX3C3I.es.js.map} +1 -1
- package/dist/chunks/popover-CfEq5G5-.cjs.js.map +1 -1
- package/dist/chunks/popover-DNaC7CwB.es.js.map +1 -1
- package/dist/chunks/progress-bar-CmQaITmw.cjs.js +2 -0
- package/dist/chunks/progress-bar-CmQaITmw.cjs.js.map +1 -0
- package/dist/chunks/{progress-bar-DwuOjOcH.es.js → progress-bar-DGFMl3Vg.es.js} +2 -2
- package/dist/chunks/progress-bar-DGFMl3Vg.es.js.map +1 -0
- package/dist/chunks/radio-input-Cg5MZ21w.cjs.js +2 -0
- package/dist/chunks/{radio-input-Dp05SXja.cjs.js.map → radio-input-Cg5MZ21w.cjs.js.map} +1 -1
- package/dist/chunks/{radio-input-4jw6HUjC.es.js → radio-input-DPwU5M16.es.js} +2 -2
- package/dist/chunks/{radio-input-4jw6HUjC.es.js.map → radio-input-DPwU5M16.es.js.map} +1 -1
- package/dist/chunks/{range-calendar-DBpl6y5i.es.js → range-calendar-PUt59Hda.es.js} +2 -2
- package/dist/chunks/range-calendar-PUt59Hda.es.js.map +1 -0
- package/dist/chunks/range-calendar-lhmomEF_.cjs.js +2 -0
- package/dist/chunks/range-calendar-lhmomEF_.cjs.js.map +1 -0
- package/dist/chunks/{rich-text-input-BC8CBVio.es.js → rich-text-input-Cm0M04n-.es.js} +6 -6
- package/dist/chunks/rich-text-input-Cm0M04n-.es.js.map +1 -0
- package/dist/chunks/{rich-text-input-Da5WFZ3l.cjs.js → rich-text-input-DqwZD5Di.cjs.js} +2 -2
- package/dist/chunks/rich-text-input-DqwZD5Di.cjs.js.map +1 -0
- package/dist/chunks/search-input-BvJKOCVM.cjs.js +2 -0
- package/dist/chunks/{search-input-BefkmgPy.cjs.js.map → search-input-BvJKOCVM.cjs.js.map} +1 -1
- package/dist/chunks/{search-input-DJy2NHYW.es.js → search-input-C8cD1bnn.es.js} +2 -2
- package/dist/chunks/{search-input-DJy2NHYW.es.js.map → search-input-C8cD1bnn.es.js.map} +1 -1
- package/dist/chunks/select-DfuSGQSs.cjs.js +2 -0
- package/dist/chunks/{select-DMsU6bk9.cjs.js.map → select-DfuSGQSs.cjs.js.map} +1 -1
- package/dist/chunks/{select-BmMhTBo-.es.js → select-X1qJU5Yn.es.js} +2 -2
- package/dist/chunks/{select-BmMhTBo-.es.js.map → select-X1qJU5Yn.es.js.map} +1 -1
- package/dist/chunks/{separator-DJGUFG-o.es.js → separator-BHD3Ztot.es.js} +2 -2
- package/dist/chunks/separator-BHD3Ztot.es.js.map +1 -0
- package/dist/chunks/separator-FEY8A05K.cjs.js +2 -0
- package/dist/chunks/separator-FEY8A05K.cjs.js.map +1 -0
- package/dist/chunks/{split-button-BxyZmuNi.es.js → split-button-LENwoBTF.es.js} +2 -2
- package/dist/chunks/split-button-LENwoBTF.es.js.map +1 -0
- package/dist/chunks/{split-button-BO52sL7h.cjs.js → split-button-go3Ez6Ea.cjs.js} +2 -2
- package/dist/chunks/split-button-go3Ez6Ea.cjs.js.map +1 -0
- package/dist/chunks/{switch-01hEhL9A.es.js → switch-BDRu376G.es.js} +2 -2
- package/dist/chunks/switch-BDRu376G.es.js.map +1 -0
- package/dist/chunks/switch-RPIMfaqs.cjs.js +2 -0
- package/dist/chunks/switch-RPIMfaqs.cjs.js.map +1 -0
- package/dist/chunks/{tabs-Dhte-RCe.es.js → tabs-BtWK-J_p.es.js} +2 -2
- package/dist/chunks/{tabs-Dhte-RCe.es.js.map → tabs-BtWK-J_p.es.js.map} +1 -1
- package/dist/chunks/tabs-CEB3Dfex.cjs.js +2 -0
- package/dist/chunks/{tabs-CJ0OAUSR.cjs.js.map → tabs-CEB3Dfex.cjs.js.map} +1 -1
- package/dist/chunks/tag-group-Btt0egzG.cjs.js.map +1 -1
- package/dist/chunks/tag-group-D2dgXSsV.es.js.map +1 -1
- package/dist/chunks/text-input-CKGfCx6k.cjs.js +2 -0
- package/dist/chunks/text-input-CKGfCx6k.cjs.js.map +1 -0
- package/dist/chunks/{text-input-CSAODlCw.es.js → text-input-DNorjU50.es.js} +2 -2
- package/dist/chunks/text-input-DNorjU50.es.js.map +1 -0
- package/dist/chunks/{time-input--a_qv-Jk.es.js → time-input-B6we5H7C.es.js} +2 -2
- package/dist/chunks/time-input-B6we5H7C.es.js.map +1 -0
- package/dist/chunks/time-input-CweVZv1Q.cjs.js +2 -0
- package/dist/chunks/time-input-CweVZv1Q.cjs.js.map +1 -0
- package/dist/chunks/toggle-button-CLEgCPGX.cjs.js +2 -0
- package/dist/chunks/toggle-button-CLEgCPGX.cjs.js.map +1 -0
- package/dist/chunks/{toggle-button-awb1jBf8.es.js → toggle-button-D3M4e72c.es.js} +2 -2
- package/dist/chunks/toggle-button-D3M4e72c.es.js.map +1 -0
- package/dist/chunks/{toolbar-Dduysqqi.es.js → toolbar-Bn9pAwjU.es.js} +2 -2
- package/dist/chunks/toolbar-Bn9pAwjU.es.js.map +1 -0
- package/dist/chunks/toolbar-D3Jj83mp.cjs.js +2 -0
- package/dist/chunks/{toolbar-DV0l5MqA.cjs.js.map → toolbar-D3Jj83mp.cjs.js.map} +1 -1
- package/dist/chunks/tooltip-BPTOkK7W.cjs.js.map +1 -1
- package/dist/chunks/tooltip-sgakxhiy.es.js.map +1 -1
- package/dist/components/accordion/accordion.slots.d.ts +1 -1
- package/dist/components/accordion/accordion.types.d.ts +4 -4
- package/dist/components/accordion.cjs +1 -1
- package/dist/components/accordion.es.js +1 -1
- package/dist/components/calendar/calendar.slots.d.ts +1 -1
- package/dist/components/calendar.cjs +1 -1
- package/dist/components/calendar.es.js +1 -1
- package/dist/components/checkbox.cjs +1 -1
- package/dist/components/checkbox.es.js +1 -1
- package/dist/components/collapsible-motion/collapsible-motion.slots.d.ts +1 -1
- package/dist/components/collapsible-motion.cjs +1 -1
- package/dist/components/collapsible-motion.es.js +1 -1
- package/dist/components/combobox/combobox.slots.d.ts +1 -1
- package/dist/components/combobox.cjs +1 -1
- package/dist/components/combobox.es.js +1 -1
- package/dist/components/components.cjs +1 -1
- package/dist/components/components.es.js +1 -1
- package/dist/components/data-table.cjs +1 -1
- package/dist/components/data-table.es.js +1 -1
- package/dist/components/date-input.cjs +1 -1
- package/dist/components/date-input.es.js +1 -1
- package/dist/components/date-picker.cjs +1 -1
- package/dist/components/date-picker.es.js +1 -1
- package/dist/components/date-range-picker.cjs +1 -1
- package/dist/components/date-range-picker.es.js +1 -1
- package/dist/components/dialog.cjs +1 -1
- package/dist/components/dialog.es.js +1 -1
- package/dist/components/draggable-list.cjs +1 -1
- package/dist/components/draggable-list.es.js +1 -1
- package/dist/components/drawer.cjs +1 -1
- package/dist/components/drawer.es.js +1 -1
- package/dist/components/group/group.slots.d.ts +1 -1
- package/dist/components/icon/icon.slots.d.ts +1 -1
- package/dist/components/icon-toggle-button.cjs +1 -1
- package/dist/components/icon-toggle-button.es.js +1 -1
- package/dist/components/kbd/kbd.slots.d.ts +1 -1
- package/dist/components/localized-field.cjs +1 -1
- package/dist/components/localized-field.es.js +1 -1
- package/dist/components/menu/menu.slots.d.ts +1 -1
- package/dist/components/money-input.cjs +1 -1
- package/dist/components/money-input.es.js +1 -1
- package/dist/components/multiline-text-input.cjs +1 -1
- package/dist/components/multiline-text-input.es.js +1 -1
- package/dist/components/number-input.cjs +1 -1
- package/dist/components/number-input.es.js +1 -1
- package/dist/components/pagination.cjs +1 -1
- package/dist/components/pagination.es.js +1 -1
- package/dist/components/password-input.cjs +1 -1
- package/dist/components/password-input.es.js +1 -1
- package/dist/components/popover/popover.slots.d.ts +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/range-calendar.slots.d.ts +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/rich-text-input.slots.d.ts +1 -1
- package/dist/components/rich-text-input.cjs +1 -1
- package/dist/components/rich-text-input.es.js +1 -1
- package/dist/components/scoped-search-input.cjs +1 -1
- package/dist/components/scoped-search-input.cjs.map +1 -1
- package/dist/components/scoped-search-input.es.js +3 -3
- package/dist/components/scoped-search-input.es.js.map +1 -1
- package/dist/components/search-input.cjs +1 -1
- package/dist/components/search-input.es.js +1 -1
- package/dist/components/select.cjs +1 -1
- package/dist/components/select.es.js +1 -1
- package/dist/components/separator/separator.slots.d.ts +1 -1
- package/dist/components/separator.cjs +1 -1
- package/dist/components/separator.es.js +1 -1
- package/dist/components/split-button/split-button.slots.d.ts +1 -1
- package/dist/components/split-button.cjs +1 -1
- package/dist/components/split-button.es.js +1 -1
- package/dist/components/switch/switch.slots.d.ts +1 -1
- package/dist/components/switch.cjs +1 -1
- package/dist/components/switch.es.js +1 -1
- package/dist/components/tabs/tabs.slots.d.ts +1 -1
- package/dist/components/tabs.cjs +1 -1
- package/dist/components/tabs.es.js +1 -1
- package/dist/components/tag-group/tag-group.slots.d.ts +1 -1
- package/dist/components/text-input.cjs +1 -1
- package/dist/components/text-input.es.js +1 -1
- package/dist/components/time-input.cjs +1 -1
- package/dist/components/time-input.es.js +1 -1
- package/dist/components/toggle-button.cjs +1 -1
- package/dist/components/toggle-button.es.js +1 -1
- package/dist/components/toolbar.cjs +1 -1
- package/dist/components/toolbar.es.js +1 -1
- package/dist/components/tooltip/tooltip.slots.d.ts +1 -1
- package/dist/components/tooltip/tooltip.types.d.ts +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.es.js +197 -202
- package/dist/index.es.js.map +1 -1
- package/dist/type-utils/index.d.ts +2 -0
- package/dist/{components/utils/type-helpers.d.ts → type-utils/omit-props.d.ts} +5 -5
- package/dist/utils/extract-aria-attributes.d.ts +6 -0
- package/dist/utils/index.d.ts +3 -3
- package/package.json +5 -5
- package/dist/chunks/accordion-B2FLWAh5.cjs.js +0 -2
- package/dist/chunks/accordion-B2FLWAh5.cjs.js.map +0 -1
- package/dist/chunks/accordion-CKDnNkVv.es.js.map +0 -1
- package/dist/chunks/calendar-V0KeNCQ3.cjs.js +0 -2
- package/dist/chunks/calendar-V0KeNCQ3.cjs.js.map +0 -1
- package/dist/chunks/calendar-lD6G93R9.es.js.map +0 -1
- package/dist/chunks/checkbox-Dod-yTj4.cjs.js +0 -2
- package/dist/chunks/collapsible-motion-C7M_CLNI.cjs.js +0 -2
- package/dist/chunks/collapsible-motion-C7M_CLNI.cjs.js.map +0 -1
- package/dist/chunks/collapsible-motion-CSrKjF8X.es.js.map +0 -1
- package/dist/chunks/combobox-B5UxZWSX.cjs.js +0 -2
- package/dist/chunks/data-table-C51WU0Cc.cjs.js +0 -2
- package/dist/chunks/date-input-Cap8-3zj.es.js.map +0 -1
- package/dist/chunks/date-input-DvOM0DLT.cjs.js +0 -2
- package/dist/chunks/date-input-DvOM0DLT.cjs.js.map +0 -1
- package/dist/chunks/date-picker-CZAoPNsT.cjs.js +0 -2
- package/dist/chunks/date-range-picker-iENzosfN.cjs.js +0 -2
- package/dist/chunks/dialog.title-CP_ZeiK4.es.js.map +0 -1
- package/dist/chunks/dialog.title-DOPP47Zy.cjs.js +0 -2
- package/dist/chunks/dialog.title-DOPP47Zy.cjs.js.map +0 -1
- package/dist/chunks/drawer-BJ4qvGnj.es.js.map +0 -1
- package/dist/chunks/drawer-DzW9wBMk.cjs.js +0 -2
- package/dist/chunks/drawer-DzW9wBMk.cjs.js.map +0 -1
- package/dist/chunks/extractStyleProps-DYXEhLtq.es.js.map +0 -1
- package/dist/chunks/extractStyleProps-Dk3fpLyQ.cjs.js.map +0 -1
- package/dist/chunks/menu-D-vE6ZpM.es.js.map +0 -1
- package/dist/chunks/menu-DIepV2KZ.cjs.js +0 -2
- package/dist/chunks/menu-DIepV2KZ.cjs.js.map +0 -1
- package/dist/chunks/money-input-Cu_J86Eu.cjs.js +0 -2
- package/dist/chunks/multiline-text-input-B9TBDieZ.cjs.js +0 -2
- package/dist/chunks/multiline-text-input-B9TBDieZ.cjs.js.map +0 -1
- package/dist/chunks/multiline-text-input-CilSJJaO.es.js.map +0 -1
- package/dist/chunks/number-input-wMW-o4di.cjs.js +0 -2
- package/dist/chunks/progress-bar-Bhp7W6Eo.cjs.js +0 -2
- package/dist/chunks/progress-bar-Bhp7W6Eo.cjs.js.map +0 -1
- package/dist/chunks/progress-bar-DwuOjOcH.es.js.map +0 -1
- package/dist/chunks/radio-input-Dp05SXja.cjs.js +0 -2
- package/dist/chunks/range-calendar-DBpl6y5i.es.js.map +0 -1
- package/dist/chunks/range-calendar-_dZfAsdG.cjs.js +0 -2
- package/dist/chunks/range-calendar-_dZfAsdG.cjs.js.map +0 -1
- package/dist/chunks/rich-text-input-BC8CBVio.es.js.map +0 -1
- package/dist/chunks/rich-text-input-Da5WFZ3l.cjs.js.map +0 -1
- package/dist/chunks/search-input-BefkmgPy.cjs.js +0 -2
- package/dist/chunks/select-DMsU6bk9.cjs.js +0 -2
- package/dist/chunks/separator-CvRn_J0r.cjs.js +0 -2
- package/dist/chunks/separator-CvRn_J0r.cjs.js.map +0 -1
- package/dist/chunks/separator-DJGUFG-o.es.js.map +0 -1
- package/dist/chunks/split-button-BO52sL7h.cjs.js.map +0 -1
- package/dist/chunks/split-button-BxyZmuNi.es.js.map +0 -1
- package/dist/chunks/switch-01hEhL9A.es.js.map +0 -1
- package/dist/chunks/switch-CdLhBEPq.cjs.js +0 -2
- package/dist/chunks/switch-CdLhBEPq.cjs.js.map +0 -1
- package/dist/chunks/tabs-CJ0OAUSR.cjs.js +0 -2
- package/dist/chunks/text-input-CSAODlCw.es.js.map +0 -1
- package/dist/chunks/text-input-DZdkCbdd.cjs.js +0 -2
- package/dist/chunks/text-input-DZdkCbdd.cjs.js.map +0 -1
- package/dist/chunks/time-input--a_qv-Jk.es.js.map +0 -1
- package/dist/chunks/time-input-zXykDANk.cjs.js +0 -2
- package/dist/chunks/time-input-zXykDANk.cjs.js.map +0 -1
- package/dist/chunks/toggle-button-DxMZsem4.cjs.js +0 -2
- package/dist/chunks/toggle-button-DxMZsem4.cjs.js.map +0 -1
- package/dist/chunks/toggle-button-awb1jBf8.es.js.map +0 -1
- package/dist/chunks/toolbar-DV0l5MqA.cjs.js +0 -2
- package/dist/chunks/toolbar-Dduysqqi.es.js.map +0 -1
- package/dist/components/utils/index.d.ts +0 -4
- /package/dist/{utils → type-utils}/slot-types.d.ts +0 -0
- /package/dist/utils/{extractStyleProps.d.ts → extract-style-props.d.ts} +0 -0
- /package/dist/utils/{noop.d.ts → no-op.d.ts} +0 -0
package/dist/index.es.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es.js","sources":["../../../node_modules/.pnpm/react-hotkeys-hook@5.2.1_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/react-hotkeys-hook/packages/react-hotkeys-hook/dist/index.js","../../../node_modules/.pnpm/react-use@17.6.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/react-use/esm/useMountedState.js","../../../node_modules/.pnpm/react-use@17.6.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/react-use/esm/useSetState.js","../../../node_modules/.pnpm/toggle-selection@1.0.6/node_modules/toggle-selection/index.js","../../../node_modules/.pnpm/copy-to-clipboard@3.3.3/node_modules/copy-to-clipboard/index.js","../../../node_modules/.pnpm/react-use@17.6.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/react-use/esm/useCopyToClipboard.js","../src/hooks/use-color-scheme/use-color-scheme.ts","../src/hooks/use-color-mode/use-color-mode.ts","../src/hooks/use-color-mode-value/use-color-mode-value.ts","../src/utils/noop.ts"],"sourcesContent":["import { createContext as T, useContext as M, useState as A, useCallback as w, useRef as S, useLayoutEffect as z, useEffect as J } from \"react\";\nimport { jsx as b } from \"react/jsx-runtime\";\nconst j = [\"shift\", \"alt\", \"meta\", \"mod\", \"ctrl\", \"control\"], Q = {\n esc: \"escape\",\n return: \"enter\",\n left: \"arrowleft\",\n right: \"arrowright\",\n up: \"arrowup\",\n down: \"arrowdown\",\n ShiftLeft: \"shift\",\n ShiftRight: \"shift\",\n AltLeft: \"alt\",\n AltRight: \"alt\",\n MetaLeft: \"meta\",\n MetaRight: \"meta\",\n OSLeft: \"meta\",\n OSRight: \"meta\",\n ControlLeft: \"ctrl\",\n ControlRight: \"ctrl\"\n};\nfunction K(e) {\n return (Q[e.trim()] || e.trim()).toLowerCase().replace(/key|digit|numpad/, \"\");\n}\nfunction D(e) {\n return j.includes(e);\n}\nfunction H(e, r = \",\") {\n return e.toLowerCase().split(r);\n}\nfunction P(e, r = \"+\", o = \">\", i = !1, u) {\n let n = [], c = !1;\n e = e.trim(), e.includes(o) ? (c = !0, n = e.toLocaleLowerCase().split(o).map((f) => K(f))) : n = e.toLocaleLowerCase().split(r).map((f) => K(f));\n const y = {\n alt: n.includes(\"alt\"),\n ctrl: n.includes(\"ctrl\") || n.includes(\"control\"),\n shift: n.includes(\"shift\"),\n meta: n.includes(\"meta\"),\n mod: n.includes(\"mod\"),\n useKey: i\n }, d = n.filter((f) => !j.includes(f));\n return {\n ...y,\n keys: d,\n description: u,\n isSequence: c,\n hotkey: e\n };\n}\ntypeof document < \"u\" && (document.addEventListener(\"keydown\", (e) => {\n e.code !== void 0 && I([K(e.code)]);\n}), document.addEventListener(\"keyup\", (e) => {\n e.code !== void 0 && _([K(e.code)]);\n})), typeof window < \"u\" && (window.addEventListener(\"blur\", () => {\n L.clear();\n}), window.addEventListener(\"contextmenu\", () => {\n setTimeout(() => {\n L.clear();\n }, 0);\n}));\nconst L = /* @__PURE__ */ new Set();\nfunction R(e) {\n return Array.isArray(e);\n}\nfunction U(e, r = \",\") {\n return (R(e) ? e : e.split(r)).every((i) => L.has(i.trim().toLowerCase()));\n}\nfunction I(e) {\n const r = Array.isArray(e) ? e : [e];\n L.has(\"meta\") && L.forEach((o) => !D(o) && L.delete(o.toLowerCase())), r.forEach((o) => L.add(o.toLowerCase()));\n}\nfunction _(e) {\n const r = Array.isArray(e) ? e : [e];\n e === \"meta\" ? L.clear() : r.forEach((o) => L.delete(o.toLowerCase()));\n}\nfunction V(e, r, o) {\n (typeof o == \"function\" && o(e, r) || o === !0) && e.preventDefault();\n}\nfunction X(e, r, o) {\n return typeof o == \"function\" ? o(e, r) : o === !0 || o === void 0;\n}\nconst Y = [\n \"input\",\n \"textarea\",\n \"select\",\n \"searchbox\",\n \"slider\",\n \"spinbutton\",\n \"menuitem\",\n \"menuitemcheckbox\",\n \"menuitemradio\",\n \"option\",\n \"radio\",\n \"textbox\"\n];\nfunction Z(e) {\n return F(e, Y);\n}\nfunction F(e, r = !1) {\n const { target: o, composed: i } = e;\n let u, n;\n return ee(o) && i ? (u = e.composedPath()[0] && e.composedPath()[0].tagName, n = e.composedPath()[0] && e.composedPath()[0].role) : (u = o && o.tagName, n = o && o.role), R(r) ? !!(u && r && r.some((c) => c.toLowerCase() === u.toLowerCase() || c === n)) : !!(u && r && r);\n}\nfunction ee(e) {\n return !!e.tagName && !e.tagName.startsWith(\"-\") && e.tagName.includes(\"-\");\n}\nfunction te(e, r) {\n return e.length === 0 && r ? (console.warn(\n 'A hotkey has the \"scopes\" option set, however no active scopes were found. If you want to use the global scopes feature, you need to wrap your app in a <HotkeysProvider>'\n ), !0) : r ? e.some((o) => r.includes(o)) || e.includes(\"*\") : !0;\n}\nconst re = (e, r, o = !1) => {\n const { alt: i, meta: u, mod: n, shift: c, ctrl: y, keys: d, useKey: f } = r, { code: p, key: t, ctrlKey: a, metaKey: l, shiftKey: g, altKey: k } = e, m = K(p);\n if (f && d?.length === 1 && d.includes(t))\n return !0;\n if (!d?.includes(m) && ![\"ctrl\", \"control\", \"unknown\", \"meta\", \"alt\", \"shift\", \"os\"].includes(m))\n return !1;\n if (!o) {\n if (i !== k && m !== \"alt\" || c !== g && m !== \"shift\")\n return !1;\n if (n) {\n if (!l && !a)\n return !1;\n } else if (u !== l && m !== \"meta\" && m !== \"os\" || y !== a && m !== \"ctrl\" && m !== \"control\")\n return !1;\n }\n return d && d.length === 1 && d.includes(m) ? !0 : d ? U(d) : !d;\n}, $ = T(void 0), oe = () => M($);\nfunction ne({ addHotkey: e, removeHotkey: r, children: o }) {\n return /* @__PURE__ */ b($.Provider, { value: { addHotkey: e, removeHotkey: r }, children: o });\n}\nfunction x(e, r) {\n return e && r && typeof e == \"object\" && typeof r == \"object\" ? Object.keys(e).length === Object.keys(r).length && // @ts-expect-error TS7053\n Object.keys(e).reduce((o, i) => o && x(e[i], r[i]), !0) : e === r;\n}\nconst W = T({\n hotkeys: [],\n activeScopes: [],\n // This array has to be empty instead of containing '*' as default, to check if the provider is set or not\n toggleScope: () => {\n },\n enableScope: () => {\n },\n disableScope: () => {\n }\n}), se = () => M(W), de = ({ initiallyActiveScopes: e = [\"*\"], children: r }) => {\n const [o, i] = A(e), [u, n] = A([]), c = w((t) => {\n i((a) => a.includes(\"*\") ? [t] : Array.from(/* @__PURE__ */ new Set([...a, t])));\n }, []), y = w((t) => {\n i((a) => a.filter((l) => l !== t));\n }, []), d = w((t) => {\n i((a) => a.includes(t) ? a.filter((l) => l !== t) : a.includes(\"*\") ? [t] : Array.from(/* @__PURE__ */ new Set([...a, t])));\n }, []), f = w((t) => {\n n((a) => [...a, t]);\n }, []), p = w((t) => {\n n((a) => a.filter((l) => !x(l, t)));\n }, []);\n return /* @__PURE__ */ b(\n W.Provider,\n {\n value: { activeScopes: o, hotkeys: u, enableScope: c, disableScope: y, toggleScope: d },\n children: /* @__PURE__ */ b(ne, { addHotkey: f, removeHotkey: p, children: r })\n }\n );\n};\nfunction ie(e) {\n const r = S(void 0);\n return x(r.current, e) || (r.current = e), r.current;\n}\nconst N = (e) => {\n e.stopPropagation(), e.preventDefault(), e.stopImmediatePropagation();\n}, ue = typeof window < \"u\" ? z : J;\nfunction fe(e, r, o, i) {\n const u = S(null), n = S(!1), c = Array.isArray(o) ? Array.isArray(i) ? void 0 : i : o, y = R(e) ? e.join(c?.delimiter) : e, d = Array.isArray(o) ? o : Array.isArray(i) ? i : void 0, f = w(r, d ?? []), p = S(f);\n d ? p.current = f : p.current = r;\n const t = ie(c), { activeScopes: a } = se(), l = oe();\n return ue(() => {\n if (t?.enabled === !1 || !te(a, t?.scopes))\n return;\n let g = [], k;\n const m = (s, B = !1) => {\n if (!(Z(s) && !F(s, t?.enableOnFormTags))) {\n if (u.current !== null) {\n const v = u.current.getRootNode();\n if ((v instanceof Document || v instanceof ShadowRoot) && v.activeElement !== u.current && !u.current.contains(v.activeElement)) {\n N(s);\n return;\n }\n }\n s.target?.isContentEditable && !t?.enableOnContentEditable || H(y, t?.delimiter).forEach((v) => {\n if (v.includes(t?.splitKey ?? \"+\") && v.includes(t?.sequenceSplitKey ?? \">\")) {\n console.warn(\n `Hotkey ${v} contains both ${t?.splitKey ?? \"+\"} and ${t?.sequenceSplitKey ?? \">\"} which is not supported.`\n );\n return;\n }\n const h = P(\n v,\n t?.splitKey,\n t?.sequenceSplitKey,\n t?.useKey,\n t?.description\n );\n if (h.isSequence) {\n k = setTimeout(() => {\n g = [];\n }, t?.sequenceTimeoutMs ?? 1e3);\n const C = h.useKey ? s.key : K(s.code);\n if (D(C.toLowerCase()))\n return;\n g.push(C);\n const G = h.keys?.[g.length - 1];\n if (C !== G) {\n g = [], k && clearTimeout(k);\n return;\n }\n g.length === h.keys?.length && (p.current(s, h), k && clearTimeout(k), g = []);\n } else if (re(s, h, t?.ignoreModifiers) || h.keys?.includes(\"*\")) {\n if (t?.ignoreEventWhen?.(s) || B && n.current)\n return;\n if (V(s, h, t?.preventDefault), !X(s, h, t?.enabled)) {\n N(s);\n return;\n }\n p.current(s, h), B || (n.current = !0);\n }\n });\n }\n }, O = (s) => {\n s.code !== void 0 && (I(K(s.code)), (t?.keydown === void 0 && t?.keyup !== !0 || t?.keydown) && m(s));\n }, q = (s) => {\n s.code !== void 0 && (_(K(s.code)), n.current = !1, t?.keyup && m(s, !0));\n }, E = u.current || c?.document || document;\n return E.addEventListener(\"keyup\", q, c?.eventListenerOptions), E.addEventListener(\"keydown\", O, c?.eventListenerOptions), l && H(y, t?.delimiter).forEach(\n (s) => l.addHotkey(\n P(\n s,\n t?.splitKey,\n t?.sequenceSplitKey,\n t?.useKey,\n t?.description\n )\n )\n ), () => {\n E.removeEventListener(\"keyup\", q, c?.eventListenerOptions), E.removeEventListener(\"keydown\", O, c?.eventListenerOptions), l && H(y, t?.delimiter).forEach(\n (s) => l.removeHotkey(\n P(\n s,\n t?.splitKey,\n t?.sequenceSplitKey,\n t?.useKey,\n t?.description\n )\n )\n ), g = [], k && clearTimeout(k);\n };\n }, [y, t, a]), u;\n}\nfunction le(e = !1) {\n const [r, o] = A(/* @__PURE__ */ new Set()), [i, u] = A(!1), n = w(\n (f) => {\n f.code !== void 0 && (f.preventDefault(), f.stopPropagation(), o((p) => {\n const t = new Set(p);\n return t.add(K(e ? f.key : f.code)), t;\n }));\n },\n [e]\n ), c = w(() => {\n typeof document < \"u\" && (document.removeEventListener(\"keydown\", n), u(!1));\n }, [n]), y = w(() => {\n o(/* @__PURE__ */ new Set()), typeof document < \"u\" && (c(), document.addEventListener(\"keydown\", n), u(!0));\n }, [n, c]), d = w(() => {\n o(/* @__PURE__ */ new Set());\n }, []);\n return [r, { start: y, stop: c, resetKeys: d, isRecording: i }];\n}\nexport {\n de as HotkeysProvider,\n U as isHotkeyPressed,\n fe as useHotkeys,\n se as useHotkeysContext,\n le as useRecordHotkeys\n};\n","import { useCallback, useEffect, useRef } from 'react';\nexport default function useMountedState() {\n var mountedRef = useRef(false);\n var get = useCallback(function () { return mountedRef.current; }, []);\n useEffect(function () {\n mountedRef.current = true;\n return function () {\n mountedRef.current = false;\n };\n }, []);\n return get;\n}\n","import { useCallback, useState } from 'react';\nvar useSetState = function (initialState) {\n if (initialState === void 0) { initialState = {}; }\n var _a = useState(initialState), state = _a[0], set = _a[1];\n var setState = useCallback(function (patch) {\n set(function (prevState) {\n return Object.assign({}, prevState, patch instanceof Function ? patch(prevState) : patch);\n });\n }, []);\n return [state, setState];\n};\nexport default useSetState;\n","\nmodule.exports = function () {\n var selection = document.getSelection();\n if (!selection.rangeCount) {\n return function () {};\n }\n var active = document.activeElement;\n\n var ranges = [];\n for (var i = 0; i < selection.rangeCount; i++) {\n ranges.push(selection.getRangeAt(i));\n }\n\n switch (active.tagName.toUpperCase()) { // .toUpperCase handles XHTML\n case 'INPUT':\n case 'TEXTAREA':\n active.blur();\n break;\n\n default:\n active = null;\n break;\n }\n\n selection.removeAllRanges();\n return function () {\n selection.type === 'Caret' &&\n selection.removeAllRanges();\n\n if (!selection.rangeCount) {\n ranges.forEach(function(range) {\n selection.addRange(range);\n });\n }\n\n active &&\n active.focus();\n };\n};\n","\"use strict\";\n\nvar deselectCurrent = require(\"toggle-selection\");\n\nvar clipboardToIE11Formatting = {\n \"text/plain\": \"Text\",\n \"text/html\": \"Url\",\n \"default\": \"Text\"\n}\n\nvar defaultMessage = \"Copy to clipboard: #{key}, Enter\";\n\nfunction format(message) {\n var copyKey = (/mac os x/i.test(navigator.userAgent) ? \"⌘\" : \"Ctrl\") + \"+C\";\n return message.replace(/#{\\s*key\\s*}/g, copyKey);\n}\n\nfunction copy(text, options) {\n var debug,\n message,\n reselectPrevious,\n range,\n selection,\n mark,\n success = false;\n if (!options) {\n options = {};\n }\n debug = options.debug || false;\n try {\n reselectPrevious = deselectCurrent();\n\n range = document.createRange();\n selection = document.getSelection();\n\n mark = document.createElement(\"span\");\n mark.textContent = text;\n // avoid screen readers from reading out loud the text\n mark.ariaHidden = \"true\"\n // reset user styles for span element\n mark.style.all = \"unset\";\n // prevents scrolling to the end of the page\n mark.style.position = \"fixed\";\n mark.style.top = 0;\n mark.style.clip = \"rect(0, 0, 0, 0)\";\n // used to preserve spaces and line breaks\n mark.style.whiteSpace = \"pre\";\n // do not inherit user-select (it may be `none`)\n mark.style.webkitUserSelect = \"text\";\n mark.style.MozUserSelect = \"text\";\n mark.style.msUserSelect = \"text\";\n mark.style.userSelect = \"text\";\n mark.addEventListener(\"copy\", function(e) {\n e.stopPropagation();\n if (options.format) {\n e.preventDefault();\n if (typeof e.clipboardData === \"undefined\") { // IE 11\n debug && console.warn(\"unable to use e.clipboardData\");\n debug && console.warn(\"trying IE specific stuff\");\n window.clipboardData.clearData();\n var format = clipboardToIE11Formatting[options.format] || clipboardToIE11Formatting[\"default\"]\n window.clipboardData.setData(format, text);\n } else { // all other browsers\n e.clipboardData.clearData();\n e.clipboardData.setData(options.format, text);\n }\n }\n if (options.onCopy) {\n e.preventDefault();\n options.onCopy(e.clipboardData);\n }\n });\n\n document.body.appendChild(mark);\n\n range.selectNodeContents(mark);\n selection.addRange(range);\n\n var successful = document.execCommand(\"copy\");\n if (!successful) {\n throw new Error(\"copy command was unsuccessful\");\n }\n success = true;\n } catch (err) {\n debug && console.error(\"unable to copy using execCommand: \", err);\n debug && console.warn(\"trying IE specific stuff\");\n try {\n window.clipboardData.setData(options.format || \"text\", text);\n options.onCopy && options.onCopy(window.clipboardData);\n success = true;\n } catch (err) {\n debug && console.error(\"unable to copy using clipboardData: \", err);\n debug && console.error(\"falling back to prompt\");\n message = format(\"message\" in options ? options.message : defaultMessage);\n window.prompt(message, text);\n }\n } finally {\n if (selection) {\n if (typeof selection.removeRange == \"function\") {\n selection.removeRange(range);\n } else {\n selection.removeAllRanges();\n }\n }\n\n if (mark) {\n document.body.removeChild(mark);\n }\n reselectPrevious();\n }\n\n return success;\n}\n\nmodule.exports = copy;\n","import writeText from 'copy-to-clipboard';\nimport { useCallback } from 'react';\nimport useMountedState from './useMountedState';\nimport useSetState from './useSetState';\nvar useCopyToClipboard = function () {\n var isMounted = useMountedState();\n var _a = useSetState({\n value: undefined,\n error: undefined,\n noUserInteraction: true,\n }), state = _a[0], setState = _a[1];\n var copyToClipboard = useCallback(function (value) {\n if (!isMounted()) {\n return;\n }\n var noUserInteraction;\n var normalizedValue;\n try {\n // only strings and numbers casted to strings can be copied to clipboard\n if (typeof value !== 'string' && typeof value !== 'number') {\n var error = new Error(\"Cannot copy typeof \" + typeof value + \" to clipboard, must be a string\");\n if (process.env.NODE_ENV === 'development')\n console.error(error);\n setState({\n value: value,\n error: error,\n noUserInteraction: true,\n });\n return;\n }\n // empty strings are also considered invalid\n else if (value === '') {\n var error = new Error(\"Cannot copy empty string to clipboard.\");\n if (process.env.NODE_ENV === 'development')\n console.error(error);\n setState({\n value: value,\n error: error,\n noUserInteraction: true,\n });\n return;\n }\n normalizedValue = value.toString();\n noUserInteraction = writeText(normalizedValue);\n setState({\n value: normalizedValue,\n error: undefined,\n noUserInteraction: noUserInteraction,\n });\n }\n catch (error) {\n setState({\n value: normalizedValue,\n error: error,\n noUserInteraction: noUserInteraction,\n });\n }\n }, []);\n return [state, copyToClipboard];\n};\nexport default useCopyToClipboard;\n","import { useEffect, useState } from \"react\";\n\n/**\n * Hook that provides access to the current color scheme value.\n *\n * @experimental This hook is experimental and may change in future versions.\n *\n * This hook monitors the color-scheme CSS property on the document's HTML element\n * and returns the current value. It automatically updates when the color scheme changes,\n * either through direct style changes or theme updates stored in localStorage.\n *\n * The hook observes mutations to the HTML element's style attribute to detect\n * color scheme changes and re-renders the component when changes occur.\n *\n * @returns The current color scheme value as a string ('light', 'dark')\n */\nexport function useColorScheme() {\n const [colorScheme, setColorScheme] = useState(getCurrentColorScheme());\n\n // Helper function to get the current color-scheme from the <html> tag\n function getCurrentColorScheme() {\n return (\n document.documentElement.style.getPropertyValue(\"color-scheme\") ||\n localStorage.getItem(\"theme\") ||\n \"light\"\n );\n }\n\n useEffect(() => {\n const htmlElement = document.documentElement;\n\n const observer = new MutationObserver(() => {\n const newColorScheme = getCurrentColorScheme();\n setColorScheme(newColorScheme);\n });\n\n // Observe changes to the 'style' attribute of the <html> element\n observer.observe(htmlElement, {\n attributes: true,\n attributeFilter: [\"style\"],\n });\n\n return () => observer.disconnect();\n }, []);\n\n return colorScheme;\n}\n","\"use client\";\nimport { useTheme } from \"next-themes\";\n\n/**\n * Hook for managing color mode (light/dark theme) state.\n *\n * @experimental This hook is experimental and may change in future versions.\n *\n * This hook provides access to the current color mode and functions to change it.\n * It integrates with the next-themes library to handle theme persistence and system preference detection.\n *\n * @returns An object containing:\n * - `colorMode`: The current resolved theme ('light' | 'dark' | 'system' | undefined)\n * - `setColorMode`: Function to set a specific color mode\n * - `toggleColorMode`: Function to toggle between light and dark modes\n *\n * @example\n * ```tsx\n * function ThemeToggle() {\n * const { colorMode, toggleColorMode } = useColorMode();\n *\n * return (\n * <button onClick={toggleColorMode}>\n * Current mode: {colorMode}\n * </button>\n * );\n * }\n * ```\n */\n\nexport function useColorMode() {\n const { resolvedTheme, setTheme } = useTheme();\n const toggleColorMode = () => {\n setTheme(resolvedTheme === \"light\" ? \"dark\" : \"light\");\n };\n return {\n colorMode: resolvedTheme,\n setColorMode: setTheme,\n toggleColorMode,\n };\n}\n","import { useColorMode } from \"./../use-color-mode\";\n\n/**\n * Hook that returns a value based on the current color mode.\n *\n * @experimental This hook is experimental and may change in future versions.\n *\n * @param light - The value to return when the color mode is light\n * @param dark - The value to return when the color mode is dark\n * @returns The appropriate value based on the current color mode\n */\nexport function useColorModeValue<T>(light: T, dark: T) {\n const { colorMode } = useColorMode();\n return colorMode === \"light\" ? light : dark;\n}\n","/**\n * A no-operation function that does nothing.\n * Useful as a default callback or placeholder function.\n *\n * @example\n * ```tsx\n * const MyComponent = ({ onClick = noop }: { onClick?: () => void }) => (\n * <button onClick={onClick}>Click me</button>\n * );\n * ```\n */\nexport const noop = (): void => {\n // Intentionally empty\n};\n"],"names":["j","Q","K","D","H","r","P","i","u","n","c","f","y","d","L","R","U","I","_","V","X","Y","Z","F","ee","te","re","p","t","a","l","g","k","m","$","T","oe","M","x","W","se","ie","S","N","ue","z","J","fe","w","s","B","h","C","G","O","q","E","useMountedState","mountedRef","useRef","get","useCallback","useEffect","useSetState","initialState","_a","useState","state","set","setState","patch","prevState","toggleSelection","selection","active","ranges","range","deselectCurrent","require$$0","clipboardToIE11Formatting","defaultMessage","format","message","copyKey","copy","text","options","debug","reselectPrevious","mark","success","e","successful","err","copyToClipboard","useCopyToClipboard","isMounted","value","noUserInteraction","normalizedValue","error","writeText","useColorScheme","colorScheme","setColorScheme","getCurrentColorScheme","htmlElement","observer","newColorScheme","useColorMode","resolvedTheme","setTheme","useTheme","useColorModeValue","light","dark","colorMode","noop"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,MAAMA,IAAI,CAAC,SAAS,OAAO,QAAQ,OAAO,QAAQ,SAAS,GAAGC,IAAI;AAAA,EAChE,KAAK;AAAA,EACL,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,OAAO;AAAA,EACP,IAAI;AAAA,EACJ,MAAM;AAAA,EACN,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,SAAS;AAAA,EACT,UAAU;AAAA,EACV,UAAU;AAAA,EACV,WAAW;AAAA,EACX,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,aAAa;AAAA,EACb,cAAc;AAChB;AACA,SAASC,EAAE,GAAG;AACZ,UAAQD,EAAE,EAAE,KAAI,CAAE,KAAK,EAAE,KA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AA,EACxB,GAAG,CAAA,CAAE,GAEEJ;AACT;AChBO,SAASM,KAAe;AAC7B,QAAM,EAAE,eAAAC,GAAe,UAAAC,EAAA,IAAaC,EAAA;AAIpC,SAAO;AAAA,IACL,WAAWF;AAAA,IACX,cAAcC;AAAA,IACd,iBANsB,MAAM;AAC5B,MAAAA,EAASD,MAAkB,UAAU,SAAS,OAAO;AAAA,IACvD;AAAA,EAIE;AAEJ;AC7BO,SAASG,GAAqBC,GAAUC,GAAS;AACtD,QAAM,EAAE,WAAAC,EAAA,IAAcP,GAAA;AACtB,SAAOO,MAAc,UAAUF,IAAQC;AACzC;ACHO,MAAME,KAAO,MAAY;AAEhC;","x_google_ignoreList":[0,1,2,3,4,5]}
|
|
1
|
+
{"version":3,"file":"index.es.js","sources":["../../../node_modules/.pnpm/react-hotkeys-hook@5.2.1_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/react-hotkeys-hook/packages/react-hotkeys-hook/dist/index.js","../../../node_modules/.pnpm/react-use@17.6.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/react-use/esm/useMountedState.js","../../../node_modules/.pnpm/react-use@17.6.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/react-use/esm/useSetState.js","../../../node_modules/.pnpm/toggle-selection@1.0.6/node_modules/toggle-selection/index.js","../../../node_modules/.pnpm/copy-to-clipboard@3.3.3/node_modules/copy-to-clipboard/index.js","../../../node_modules/.pnpm/react-use@17.6.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/react-use/esm/useCopyToClipboard.js","../src/hooks/use-color-scheme/use-color-scheme.ts","../src/hooks/use-color-mode/use-color-mode.ts","../src/hooks/use-color-mode-value/use-color-mode-value.ts"],"sourcesContent":["import { createContext as T, useContext as M, useState as A, useCallback as w, useRef as S, useLayoutEffect as z, useEffect as J } from \"react\";\nimport { jsx as b } from \"react/jsx-runtime\";\nconst j = [\"shift\", \"alt\", \"meta\", \"mod\", \"ctrl\", \"control\"], Q = {\n esc: \"escape\",\n return: \"enter\",\n left: \"arrowleft\",\n right: \"arrowright\",\n up: \"arrowup\",\n down: \"arrowdown\",\n ShiftLeft: \"shift\",\n ShiftRight: \"shift\",\n AltLeft: \"alt\",\n AltRight: \"alt\",\n MetaLeft: \"meta\",\n MetaRight: \"meta\",\n OSLeft: \"meta\",\n OSRight: \"meta\",\n ControlLeft: \"ctrl\",\n ControlRight: \"ctrl\"\n};\nfunction K(e) {\n return (Q[e.trim()] || e.trim()).toLowerCase().replace(/key|digit|numpad/, \"\");\n}\nfunction D(e) {\n return j.includes(e);\n}\nfunction H(e, r = \",\") {\n return e.toLowerCase().split(r);\n}\nfunction P(e, r = \"+\", o = \">\", i = !1, u) {\n let n = [], c = !1;\n e = e.trim(), e.includes(o) ? (c = !0, n = e.toLocaleLowerCase().split(o).map((f) => K(f))) : n = e.toLocaleLowerCase().split(r).map((f) => K(f));\n const y = {\n alt: n.includes(\"alt\"),\n ctrl: n.includes(\"ctrl\") || n.includes(\"control\"),\n shift: n.includes(\"shift\"),\n meta: n.includes(\"meta\"),\n mod: n.includes(\"mod\"),\n useKey: i\n }, d = n.filter((f) => !j.includes(f));\n return {\n ...y,\n keys: d,\n description: u,\n isSequence: c,\n hotkey: e\n };\n}\ntypeof document < \"u\" && (document.addEventListener(\"keydown\", (e) => {\n e.code !== void 0 && I([K(e.code)]);\n}), document.addEventListener(\"keyup\", (e) => {\n e.code !== void 0 && _([K(e.code)]);\n})), typeof window < \"u\" && (window.addEventListener(\"blur\", () => {\n L.clear();\n}), window.addEventListener(\"contextmenu\", () => {\n setTimeout(() => {\n L.clear();\n }, 0);\n}));\nconst L = /* @__PURE__ */ new Set();\nfunction R(e) {\n return Array.isArray(e);\n}\nfunction U(e, r = \",\") {\n return (R(e) ? e : e.split(r)).every((i) => L.has(i.trim().toLowerCase()));\n}\nfunction I(e) {\n const r = Array.isArray(e) ? e : [e];\n L.has(\"meta\") && L.forEach((o) => !D(o) && L.delete(o.toLowerCase())), r.forEach((o) => L.add(o.toLowerCase()));\n}\nfunction _(e) {\n const r = Array.isArray(e) ? e : [e];\n e === \"meta\" ? L.clear() : r.forEach((o) => L.delete(o.toLowerCase()));\n}\nfunction V(e, r, o) {\n (typeof o == \"function\" && o(e, r) || o === !0) && e.preventDefault();\n}\nfunction X(e, r, o) {\n return typeof o == \"function\" ? o(e, r) : o === !0 || o === void 0;\n}\nconst Y = [\n \"input\",\n \"textarea\",\n \"select\",\n \"searchbox\",\n \"slider\",\n \"spinbutton\",\n \"menuitem\",\n \"menuitemcheckbox\",\n \"menuitemradio\",\n \"option\",\n \"radio\",\n \"textbox\"\n];\nfunction Z(e) {\n return F(e, Y);\n}\nfunction F(e, r = !1) {\n const { target: o, composed: i } = e;\n let u, n;\n return ee(o) && i ? (u = e.composedPath()[0] && e.composedPath()[0].tagName, n = e.composedPath()[0] && e.composedPath()[0].role) : (u = o && o.tagName, n = o && o.role), R(r) ? !!(u && r && r.some((c) => c.toLowerCase() === u.toLowerCase() || c === n)) : !!(u && r && r);\n}\nfunction ee(e) {\n return !!e.tagName && !e.tagName.startsWith(\"-\") && e.tagName.includes(\"-\");\n}\nfunction te(e, r) {\n return e.length === 0 && r ? (console.warn(\n 'A hotkey has the \"scopes\" option set, however no active scopes were found. If you want to use the global scopes feature, you need to wrap your app in a <HotkeysProvider>'\n ), !0) : r ? e.some((o) => r.includes(o)) || e.includes(\"*\") : !0;\n}\nconst re = (e, r, o = !1) => {\n const { alt: i, meta: u, mod: n, shift: c, ctrl: y, keys: d, useKey: f } = r, { code: p, key: t, ctrlKey: a, metaKey: l, shiftKey: g, altKey: k } = e, m = K(p);\n if (f && d?.length === 1 && d.includes(t))\n return !0;\n if (!d?.includes(m) && ![\"ctrl\", \"control\", \"unknown\", \"meta\", \"alt\", \"shift\", \"os\"].includes(m))\n return !1;\n if (!o) {\n if (i !== k && m !== \"alt\" || c !== g && m !== \"shift\")\n return !1;\n if (n) {\n if (!l && !a)\n return !1;\n } else if (u !== l && m !== \"meta\" && m !== \"os\" || y !== a && m !== \"ctrl\" && m !== \"control\")\n return !1;\n }\n return d && d.length === 1 && d.includes(m) ? !0 : d ? U(d) : !d;\n}, $ = T(void 0), oe = () => M($);\nfunction ne({ addHotkey: e, removeHotkey: r, children: o }) {\n return /* @__PURE__ */ b($.Provider, { value: { addHotkey: e, removeHotkey: r }, children: o });\n}\nfunction x(e, r) {\n return e && r && typeof e == \"object\" && typeof r == \"object\" ? Object.keys(e).length === Object.keys(r).length && // @ts-expect-error TS7053\n Object.keys(e).reduce((o, i) => o && x(e[i], r[i]), !0) : e === r;\n}\nconst W = T({\n hotkeys: [],\n activeScopes: [],\n // This array has to be empty instead of containing '*' as default, to check if the provider is set or not\n toggleScope: () => {\n },\n enableScope: () => {\n },\n disableScope: () => {\n }\n}), se = () => M(W), de = ({ initiallyActiveScopes: e = [\"*\"], children: r }) => {\n const [o, i] = A(e), [u, n] = A([]), c = w((t) => {\n i((a) => a.includes(\"*\") ? [t] : Array.from(/* @__PURE__ */ new Set([...a, t])));\n }, []), y = w((t) => {\n i((a) => a.filter((l) => l !== t));\n }, []), d = w((t) => {\n i((a) => a.includes(t) ? a.filter((l) => l !== t) : a.includes(\"*\") ? [t] : Array.from(/* @__PURE__ */ new Set([...a, t])));\n }, []), f = w((t) => {\n n((a) => [...a, t]);\n }, []), p = w((t) => {\n n((a) => a.filter((l) => !x(l, t)));\n }, []);\n return /* @__PURE__ */ b(\n W.Provider,\n {\n value: { activeScopes: o, hotkeys: u, enableScope: c, disableScope: y, toggleScope: d },\n children: /* @__PURE__ */ b(ne, { addHotkey: f, removeHotkey: p, children: r })\n }\n );\n};\nfunction ie(e) {\n const r = S(void 0);\n return x(r.current, e) || (r.current = e), r.current;\n}\nconst N = (e) => {\n e.stopPropagation(), e.preventDefault(), e.stopImmediatePropagation();\n}, ue = typeof window < \"u\" ? z : J;\nfunction fe(e, r, o, i) {\n const u = S(null), n = S(!1), c = Array.isArray(o) ? Array.isArray(i) ? void 0 : i : o, y = R(e) ? e.join(c?.delimiter) : e, d = Array.isArray(o) ? o : Array.isArray(i) ? i : void 0, f = w(r, d ?? []), p = S(f);\n d ? p.current = f : p.current = r;\n const t = ie(c), { activeScopes: a } = se(), l = oe();\n return ue(() => {\n if (t?.enabled === !1 || !te(a, t?.scopes))\n return;\n let g = [], k;\n const m = (s, B = !1) => {\n if (!(Z(s) && !F(s, t?.enableOnFormTags))) {\n if (u.current !== null) {\n const v = u.current.getRootNode();\n if ((v instanceof Document || v instanceof ShadowRoot) && v.activeElement !== u.current && !u.current.contains(v.activeElement)) {\n N(s);\n return;\n }\n }\n s.target?.isContentEditable && !t?.enableOnContentEditable || H(y, t?.delimiter).forEach((v) => {\n if (v.includes(t?.splitKey ?? \"+\") && v.includes(t?.sequenceSplitKey ?? \">\")) {\n console.warn(\n `Hotkey ${v} contains both ${t?.splitKey ?? \"+\"} and ${t?.sequenceSplitKey ?? \">\"} which is not supported.`\n );\n return;\n }\n const h = P(\n v,\n t?.splitKey,\n t?.sequenceSplitKey,\n t?.useKey,\n t?.description\n );\n if (h.isSequence) {\n k = setTimeout(() => {\n g = [];\n }, t?.sequenceTimeoutMs ?? 1e3);\n const C = h.useKey ? s.key : K(s.code);\n if (D(C.toLowerCase()))\n return;\n g.push(C);\n const G = h.keys?.[g.length - 1];\n if (C !== G) {\n g = [], k && clearTimeout(k);\n return;\n }\n g.length === h.keys?.length && (p.current(s, h), k && clearTimeout(k), g = []);\n } else if (re(s, h, t?.ignoreModifiers) || h.keys?.includes(\"*\")) {\n if (t?.ignoreEventWhen?.(s) || B && n.current)\n return;\n if (V(s, h, t?.preventDefault), !X(s, h, t?.enabled)) {\n N(s);\n return;\n }\n p.current(s, h), B || (n.current = !0);\n }\n });\n }\n }, O = (s) => {\n s.code !== void 0 && (I(K(s.code)), (t?.keydown === void 0 && t?.keyup !== !0 || t?.keydown) && m(s));\n }, q = (s) => {\n s.code !== void 0 && (_(K(s.code)), n.current = !1, t?.keyup && m(s, !0));\n }, E = u.current || c?.document || document;\n return E.addEventListener(\"keyup\", q, c?.eventListenerOptions), E.addEventListener(\"keydown\", O, c?.eventListenerOptions), l && H(y, t?.delimiter).forEach(\n (s) => l.addHotkey(\n P(\n s,\n t?.splitKey,\n t?.sequenceSplitKey,\n t?.useKey,\n t?.description\n )\n )\n ), () => {\n E.removeEventListener(\"keyup\", q, c?.eventListenerOptions), E.removeEventListener(\"keydown\", O, c?.eventListenerOptions), l && H(y, t?.delimiter).forEach(\n (s) => l.removeHotkey(\n P(\n s,\n t?.splitKey,\n t?.sequenceSplitKey,\n t?.useKey,\n t?.description\n )\n )\n ), g = [], k && clearTimeout(k);\n };\n }, [y, t, a]), u;\n}\nfunction le(e = !1) {\n const [r, o] = A(/* @__PURE__ */ new Set()), [i, u] = A(!1), n = w(\n (f) => {\n f.code !== void 0 && (f.preventDefault(), f.stopPropagation(), o((p) => {\n const t = new Set(p);\n return t.add(K(e ? f.key : f.code)), t;\n }));\n },\n [e]\n ), c = w(() => {\n typeof document < \"u\" && (document.removeEventListener(\"keydown\", n), u(!1));\n }, [n]), y = w(() => {\n o(/* @__PURE__ */ new Set()), typeof document < \"u\" && (c(), document.addEventListener(\"keydown\", n), u(!0));\n }, [n, c]), d = w(() => {\n o(/* @__PURE__ */ new Set());\n }, []);\n return [r, { start: y, stop: c, resetKeys: d, isRecording: i }];\n}\nexport {\n de as HotkeysProvider,\n U as isHotkeyPressed,\n fe as useHotkeys,\n se as useHotkeysContext,\n le as useRecordHotkeys\n};\n","import { useCallback, useEffect, useRef } from 'react';\nexport default function useMountedState() {\n var mountedRef = useRef(false);\n var get = useCallback(function () { return mountedRef.current; }, []);\n useEffect(function () {\n mountedRef.current = true;\n return function () {\n mountedRef.current = false;\n };\n }, []);\n return get;\n}\n","import { useCallback, useState } from 'react';\nvar useSetState = function (initialState) {\n if (initialState === void 0) { initialState = {}; }\n var _a = useState(initialState), state = _a[0], set = _a[1];\n var setState = useCallback(function (patch) {\n set(function (prevState) {\n return Object.assign({}, prevState, patch instanceof Function ? patch(prevState) : patch);\n });\n }, []);\n return [state, setState];\n};\nexport default useSetState;\n","\nmodule.exports = function () {\n var selection = document.getSelection();\n if (!selection.rangeCount) {\n return function () {};\n }\n var active = document.activeElement;\n\n var ranges = [];\n for (var i = 0; i < selection.rangeCount; i++) {\n ranges.push(selection.getRangeAt(i));\n }\n\n switch (active.tagName.toUpperCase()) { // .toUpperCase handles XHTML\n case 'INPUT':\n case 'TEXTAREA':\n active.blur();\n break;\n\n default:\n active = null;\n break;\n }\n\n selection.removeAllRanges();\n return function () {\n selection.type === 'Caret' &&\n selection.removeAllRanges();\n\n if (!selection.rangeCount) {\n ranges.forEach(function(range) {\n selection.addRange(range);\n });\n }\n\n active &&\n active.focus();\n };\n};\n","\"use strict\";\n\nvar deselectCurrent = require(\"toggle-selection\");\n\nvar clipboardToIE11Formatting = {\n \"text/plain\": \"Text\",\n \"text/html\": \"Url\",\n \"default\": \"Text\"\n}\n\nvar defaultMessage = \"Copy to clipboard: #{key}, Enter\";\n\nfunction format(message) {\n var copyKey = (/mac os x/i.test(navigator.userAgent) ? \"⌘\" : \"Ctrl\") + \"+C\";\n return message.replace(/#{\\s*key\\s*}/g, copyKey);\n}\n\nfunction copy(text, options) {\n var debug,\n message,\n reselectPrevious,\n range,\n selection,\n mark,\n success = false;\n if (!options) {\n options = {};\n }\n debug = options.debug || false;\n try {\n reselectPrevious = deselectCurrent();\n\n range = document.createRange();\n selection = document.getSelection();\n\n mark = document.createElement(\"span\");\n mark.textContent = text;\n // avoid screen readers from reading out loud the text\n mark.ariaHidden = \"true\"\n // reset user styles for span element\n mark.style.all = \"unset\";\n // prevents scrolling to the end of the page\n mark.style.position = \"fixed\";\n mark.style.top = 0;\n mark.style.clip = \"rect(0, 0, 0, 0)\";\n // used to preserve spaces and line breaks\n mark.style.whiteSpace = \"pre\";\n // do not inherit user-select (it may be `none`)\n mark.style.webkitUserSelect = \"text\";\n mark.style.MozUserSelect = \"text\";\n mark.style.msUserSelect = \"text\";\n mark.style.userSelect = \"text\";\n mark.addEventListener(\"copy\", function(e) {\n e.stopPropagation();\n if (options.format) {\n e.preventDefault();\n if (typeof e.clipboardData === \"undefined\") { // IE 11\n debug && console.warn(\"unable to use e.clipboardData\");\n debug && console.warn(\"trying IE specific stuff\");\n window.clipboardData.clearData();\n var format = clipboardToIE11Formatting[options.format] || clipboardToIE11Formatting[\"default\"]\n window.clipboardData.setData(format, text);\n } else { // all other browsers\n e.clipboardData.clearData();\n e.clipboardData.setData(options.format, text);\n }\n }\n if (options.onCopy) {\n e.preventDefault();\n options.onCopy(e.clipboardData);\n }\n });\n\n document.body.appendChild(mark);\n\n range.selectNodeContents(mark);\n selection.addRange(range);\n\n var successful = document.execCommand(\"copy\");\n if (!successful) {\n throw new Error(\"copy command was unsuccessful\");\n }\n success = true;\n } catch (err) {\n debug && console.error(\"unable to copy using execCommand: \", err);\n debug && console.warn(\"trying IE specific stuff\");\n try {\n window.clipboardData.setData(options.format || \"text\", text);\n options.onCopy && options.onCopy(window.clipboardData);\n success = true;\n } catch (err) {\n debug && console.error(\"unable to copy using clipboardData: \", err);\n debug && console.error(\"falling back to prompt\");\n message = format(\"message\" in options ? options.message : defaultMessage);\n window.prompt(message, text);\n }\n } finally {\n if (selection) {\n if (typeof selection.removeRange == \"function\") {\n selection.removeRange(range);\n } else {\n selection.removeAllRanges();\n }\n }\n\n if (mark) {\n document.body.removeChild(mark);\n }\n reselectPrevious();\n }\n\n return success;\n}\n\nmodule.exports = copy;\n","import writeText from 'copy-to-clipboard';\nimport { useCallback } from 'react';\nimport useMountedState from './useMountedState';\nimport useSetState from './useSetState';\nvar useCopyToClipboard = function () {\n var isMounted = useMountedState();\n var _a = useSetState({\n value: undefined,\n error: undefined,\n noUserInteraction: true,\n }), state = _a[0], setState = _a[1];\n var copyToClipboard = useCallback(function (value) {\n if (!isMounted()) {\n return;\n }\n var noUserInteraction;\n var normalizedValue;\n try {\n // only strings and numbers casted to strings can be copied to clipboard\n if (typeof value !== 'string' && typeof value !== 'number') {\n var error = new Error(\"Cannot copy typeof \" + typeof value + \" to clipboard, must be a string\");\n if (process.env.NODE_ENV === 'development')\n console.error(error);\n setState({\n value: value,\n error: error,\n noUserInteraction: true,\n });\n return;\n }\n // empty strings are also considered invalid\n else if (value === '') {\n var error = new Error(\"Cannot copy empty string to clipboard.\");\n if (process.env.NODE_ENV === 'development')\n console.error(error);\n setState({\n value: value,\n error: error,\n noUserInteraction: true,\n });\n return;\n }\n normalizedValue = value.toString();\n noUserInteraction = writeText(normalizedValue);\n setState({\n value: normalizedValue,\n error: undefined,\n noUserInteraction: noUserInteraction,\n });\n }\n catch (error) {\n setState({\n value: normalizedValue,\n error: error,\n noUserInteraction: noUserInteraction,\n });\n }\n }, []);\n return [state, copyToClipboard];\n};\nexport default useCopyToClipboard;\n","import { useEffect, useState } from \"react\";\n\n/**\n * Hook that provides access to the current color scheme value.\n *\n * @experimental This hook is experimental and may change in future versions.\n *\n * This hook monitors the color-scheme CSS property on the document's HTML element\n * and returns the current value. It automatically updates when the color scheme changes,\n * either through direct style changes or theme updates stored in localStorage.\n *\n * The hook observes mutations to the HTML element's style attribute to detect\n * color scheme changes and re-renders the component when changes occur.\n *\n * @returns The current color scheme value as a string ('light', 'dark')\n */\nexport function useColorScheme() {\n const [colorScheme, setColorScheme] = useState(getCurrentColorScheme());\n\n // Helper function to get the current color-scheme from the <html> tag\n function getCurrentColorScheme() {\n return (\n document.documentElement.style.getPropertyValue(\"color-scheme\") ||\n localStorage.getItem(\"theme\") ||\n \"light\"\n );\n }\n\n useEffect(() => {\n const htmlElement = document.documentElement;\n\n const observer = new MutationObserver(() => {\n const newColorScheme = getCurrentColorScheme();\n setColorScheme(newColorScheme);\n });\n\n // Observe changes to the 'style' attribute of the <html> element\n observer.observe(htmlElement, {\n attributes: true,\n attributeFilter: [\"style\"],\n });\n\n return () => observer.disconnect();\n }, []);\n\n return colorScheme;\n}\n","\"use client\";\nimport { useTheme } from \"next-themes\";\n\n/**\n * Hook for managing color mode (light/dark theme) state.\n *\n * @experimental This hook is experimental and may change in future versions.\n *\n * This hook provides access to the current color mode and functions to change it.\n * It integrates with the next-themes library to handle theme persistence and system preference detection.\n *\n * @returns An object containing:\n * - `colorMode`: The current resolved theme ('light' | 'dark' | 'system' | undefined)\n * - `setColorMode`: Function to set a specific color mode\n * - `toggleColorMode`: Function to toggle between light and dark modes\n *\n * @example\n * ```tsx\n * function ThemeToggle() {\n * const { colorMode, toggleColorMode } = useColorMode();\n *\n * return (\n * <button onClick={toggleColorMode}>\n * Current mode: {colorMode}\n * </button>\n * );\n * }\n * ```\n */\n\nexport function useColorMode() {\n const { resolvedTheme, setTheme } = useTheme();\n const toggleColorMode = () => {\n setTheme(resolvedTheme === \"light\" ? \"dark\" : \"light\");\n };\n return {\n colorMode: resolvedTheme,\n setColorMode: setTheme,\n toggleColorMode,\n };\n}\n","import { useColorMode } from \"./../use-color-mode\";\n\n/**\n * Hook that returns a value based on the current color mode.\n *\n * @experimental This hook is experimental and may change in future versions.\n *\n * @param light - The value to return when the color mode is light\n * @param dark - The value to return when the color mode is dark\n * @returns The appropriate value based on the current color mode\n */\nexport function useColorModeValue<T>(light: T, dark: T) {\n const { colorMode } = useColorMode();\n return colorMode === \"light\" ? light : dark;\n}\n"],"names":["j","Q","K","D","H","r","P","i","u","n","c","f","y","d","L","R","U","I","_","V","X","Y","Z","F","ee","te","re","p","t","a","l","g","k","m","$","T","oe","M","x","W","se","ie","S","N","ue","z","J","fe","w","s","B","h","C","G","O","q","E","useMountedState","mountedRef","useRef","get","useCallback","useEffect","useSetState","initialState","_a","useState","state","set","setState","patch","prevState","toggleSelection","selection","active","ranges","range","deselectCurrent","require$$0","clipboardToIE11Formatting","defaultMessage","format","message","copyKey","copy","text","options","debug","reselectPrevious","mark","success","e","successful","err","copyToClipboard","useCopyToClipboard","isMounted","value","noUserInteraction","normalizedValue","error","writeText","useColorScheme","colorScheme","setColorScheme","getCurrentColorScheme","htmlElement","observer","newColorScheme","use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AAa;AAAA,MACL;AAAA;AAAA,EACJ,GAAG,CAAA,CAAE;AACL,SAAO,CAAC/B,GAAO2B,CAAe;AAClC;AC3CO,SAASQ,KAAiB;AAC/B,QAAM,CAACC,GAAaC,CAAc,IAAItC,EAASuC,GAAuB;AAGtE,WAASA,IAAwB;AAC/B,WACE,SAAS,gBAAgB,MAAM,iBAAiB,cAAc,KAC9D,aAAa,QAAQ,OAAO,KAC5B;AAAA,EAEJ;AAEA,SAAA3C,EAAU,MAAM;AACd,UAAM4C,IAAc,SAAS,iBAEvBC,IAAW,IAAI,iBAAiB,MAAM;AAC1C,YAAMC,IAAiBH,EAAA;AACvB,MAAAD,EAAeI,CAAc;AAAA,IAC/B,CAAC;AAGD,WAAAD,EAAS,QAAQD,GAAa;AAAA,MAC5B,YAAY;AAAA,MACZ,iBAAiB,CAAC,OAAO;AAAA,IAAA,CAC1B,GAEM,MAAMC,EAAS,WAAA;AAAA,EACxB,GAAG,CAAA,CAAE,GAEEJ;AACT;AChBO,SAASM,KAAe;AAC7B,QAAM,EAAE,eAAAC,GAAe,UAAAC,EAAA,IAAaC,EAAA;AAIpC,SAAO;AAAA,IACL,WAAWF;AAAA,IACX,cAAcC;AAAA,IACd,iBANsB,MAAM;AAC5B,MAAAA,EAASD,MAAkB,UAAU,SAAS,OAAO;AAAA,IACvD;AAAA,EAIE;AAEJ;AC7BO,SAASG,GAAqBC,GAAUC,GAAS;AACtD,QAAM,EAAE,WAAAC,EAAA,IAAcP,GAAA;AACtB,SAAOO,MAAc,UAAUF,IAAQC;AACzC;","x_google_ignoreList":[0,1,2,3,4,5]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Utility type helpers for
|
|
2
|
+
* Utility type helpers for omitting props from consumer-facing component prop types
|
|
3
3
|
*/
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* Omit polymorphic props (`as` and `asChild`) from a type.
|
|
6
6
|
*
|
|
7
7
|
* **Use case:** For components that use the polymorphic `as` and `asChild` props
|
|
8
8
|
* internally, but do not make them available to the consumer.
|
|
@@ -15,15 +15,15 @@
|
|
|
15
15
|
* This means that we need to allow polymorphism internally, but should not
|
|
16
16
|
* allow it in the external props API since it would not work.
|
|
17
17
|
*
|
|
18
|
-
* @template T - The type to
|
|
18
|
+
* @template T - The type to omit polymorphic props from
|
|
19
19
|
*
|
|
20
20
|
* @example
|
|
21
21
|
* ```typescript
|
|
22
|
-
* export type AccordionItemProps =
|
|
22
|
+
* export type AccordionItemProps = OmitPolymorphicProps<
|
|
23
23
|
* RaDisclosureProps & HTMLChakraProps<"div">
|
|
24
24
|
* > & {
|
|
25
25
|
* children: ReactNode;
|
|
26
26
|
* };
|
|
27
27
|
* ```
|
|
28
28
|
*/
|
|
29
|
-
export type
|
|
29
|
+
export type OmitPolymorphicProps<T> = Omit<T, "as" | "asChild">;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Extracts aria attributes from an object, separating them from other props
|
|
3
|
+
* @param props The props object to separate
|
|
4
|
+
* @returns A tuple containing [ariaAttributes, otherProps]
|
|
5
|
+
*/
|
|
6
|
+
export declare function extractAriaAttributes<T extends object>(props: T): [Record<string, unknown>, Omit<T, string>];
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
3
|
-
export
|
|
1
|
+
export { extractAriaAttributes } from './extract-aria-attributes';
|
|
2
|
+
export { extractStyleProps } from './extract-style-props';
|
|
3
|
+
export { noop } from './no-op';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercetools/nimbus",
|
|
3
|
-
"version": "2.0.1
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"main": "./dist/index.cjs",
|
|
5
5
|
"module": "./dist/index.es.js",
|
|
6
6
|
"type": "module",
|
|
@@ -100,15 +100,15 @@
|
|
|
100
100
|
"vite-plugin-dts": "^4.5.4",
|
|
101
101
|
"vite-tsconfig-paths": "^5.1.4",
|
|
102
102
|
"vitest": "^3.2.4",
|
|
103
|
-
"@commercetools/nimbus-icons": "^2.0.
|
|
104
|
-
"@commercetools/nimbus-tokens": "^2.0.
|
|
103
|
+
"@commercetools/nimbus-icons": "^2.0.1",
|
|
104
|
+
"@commercetools/nimbus-tokens": "^2.0.1"
|
|
105
105
|
},
|
|
106
106
|
"peerDependencies": {
|
|
107
107
|
"@chakra-ui/react": "^3.27.1",
|
|
108
108
|
"react": "19.x",
|
|
109
109
|
"react-intl": "7.x",
|
|
110
|
-
"@commercetools/nimbus-icons": "^2.0.
|
|
111
|
-
"@commercetools/nimbus-tokens": "^2.0.
|
|
110
|
+
"@commercetools/nimbus-icons": "^2.0.1",
|
|
111
|
+
"@commercetools/nimbus-tokens": "^2.0.1"
|
|
112
112
|
},
|
|
113
113
|
"scripts": {
|
|
114
114
|
"build": "pnpm run build-theme-typings && pnpm run build:lib",
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";const I=require("@chakra-ui/react"),c=require("react/jsx-runtime"),H=require("@chakra-ui/react/styled-system"),C=require("./Button-CFZnLKVR.cjs.js"),f=require("./utils-BHdR5Nww.cjs.js"),P=require("./mergeProps-BA5Cwf5w.cjs.js"),g=require("./filterDOMProps-WUskt27c.cjs.js"),d=require("react"),v=require("./useFocusRing-BuJmrp03.cjs.js"),m=require("./useDisclosureState-ipt8A1Kc.cjs.js"),W=require("./useControlledState-D0L6S_5r.cjs.js"),p=require("./extractStyleProps-Dk3fpLyQ.cjs.js"),N=require("@commercetools/nimbus-icons"),T=require("@chakra-ui/react/flex");function B(n){let{allowsMultipleExpanded:e=!1,isDisabled:a=!1}=n,[t,s]=W.$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(!e&&t.size>1){let o=t.values().next().value;o!=null&&s(new Set([o]))}}),{allowsMultipleExpanded:e,isDisabled:a,expandedKeys:t,setExpandedKeys:s,toggleKey(o){let r;e?(r=new Set(t),r.has(o)?r.delete(o):r.add(o)):r=new Set(t.has(o)?[]:[o]),s(r)}}}const S=d.createContext(null),G=d.forwardRef(function(e,a){let t=B(e),s=f.$64fa3d84918910a7$export$4d86445c2cf5e3({...e,defaultClassName:"react-aria-DisclosureGroup",values:{isDisabled:t.isDisabled,state:t}}),o=g.$65484d02dcb7eb3e$export$457c3d6518dd4c6f(e,{global:!0});return d.createElement("div",{...o,...s,ref:a,"data-disabled":e.isDisabled||void 0},d.createElement(S.Provider,{value:t},s.children))}),O=d.createContext(null),_=d.createContext(null),R=d.createContext(null),z=d.forwardRef(function(e,a){[e,a]=f.$64fa3d84918910a7$export$29f1550f4b0d4415(e,a,O);let t=d.useContext(S),{id:s,...o}=e,r=P.$bdb11010cef70236$export$f680877a34711e37();s||(s=r);let l=t?t.expandedKeys.has(s):e.isExpanded,i=m.$bf996d45f4a36925$export$3fcbf6e4407997e0({...e,isExpanded:l,onExpandedChange(V){var h;t&&t.toggleKey(s),(h=e.onExpandedChange)===null||h===void 0||h.call(e,V)}}),$=d.useRef(null),b=e.isDisabled||t?.isDisabled||!1,{buttonProps:j,panelProps:q}=m.$5e910fae8e128ead$export$6e3e27031a30522f({...e,isExpanded:l,isDisabled:b},i,$),{isFocusVisible:E,focusProps:F}=v.$f7dceffc5ad7768b$export$4e328f61c538687f({within:!0}),y=f.$64fa3d84918910a7$export$4d86445c2cf5e3({...e,id:void 0,defaultClassName:"react-aria-Disclosure",values:{isExpanded:i.isExpanded,isDisabled:b,isFocusVisibleWithin:E,state:i}}),M=g.$65484d02dcb7eb3e$export$457c3d6518dd4c6f(o,{global:!0});return d.createElement(f.$64fa3d84918910a7$export$2881499e37b75b9a,{values:[[C.$d2b4bc8c273e7be6$export$24d547caef80ccd1,{slots:{[f.$64fa3d84918910a7$export$c62b8e45d58ddad9]:{},trigger:j}}],[R,{panelProps:q,panelRef:$}],[_,i]]},d.createElement("div",{...P.$3ef42575df84b30b$export$9d1611c77c2fe928(M,y,F),ref:a,"data-expanded":i.isExpanded||void 0,"data-disabled":b||void 0,"data-focus-visible-within":E||void 0},y.children))}),J=d.forwardRef(function(e,a){let{role:t="group"}=e,{panelProps:s,panelRef:o}=d.useContext(R),{isFocusVisible:r,focusProps:l}=v.$f7dceffc5ad7768b$export$4e328f61c538687f({within:!0}),i=f.$64fa3d84918910a7$export$4d86445c2cf5e3({...e,defaultClassName:"react-aria-DisclosurePanel",values:{isFocusVisibleWithin:r}}),$=g.$65484d02dcb7eb3e$export$457c3d6518dd4c6f(e,{global:!0});return d.createElement("div",{...P.$3ef42575df84b30b$export$9d1611c77c2fe928($,i,s,l),ref:f.$5dc95899b306f630$export$c9058316764c140e(a,o),role:t,"data-focus-visible-within":r||void 0},d.createElement(f.$64fa3d84918910a7$export$2881499e37b75b9a,{values:[[C.$d2b4bc8c273e7be6$export$24d547caef80ccd1,null]]},e.children))}),{withProvider:L,withContext:u}=I.createSlotRecipeContext({key:"accordion"}),Q=L("div","root"),U=u("div","disclosure"),X=u("button","trigger"),Y=u("div","panel"),Z=u("div","accordionTitle"),x=u("div","headerContentRight"),D=n=>{const{ref:e,...a}=n,t=H.useSlotRecipe({key:"accordion"}),[s,o]=t.splitVariantProps(a),[r,l]=p.extractStyleProps(o);return c.jsx(Q,{ref:e,...s,...r,asChild:!0,children:c.jsx(G,{...l})})},w=({children:n,ref:e,...a})=>{const[t,s]=p.extractStyleProps(a),o=d.useMemo(()=>{const r=[],l=[];return d.Children.forEach(n,i=>{d.isValidElement(i)&&i.type===x?l.push(i):r.push(i)}),{main:r,rightContent:l}},[n]);return c.jsxs(T.Flex,{justifyContent:"space-between",alignItems:"center",borderBottom:"solid-25",borderColor:"neutral.4",...t,children:[c.jsx(X,{ref:e,slot:"trigger",asChild:!0,children:c.jsxs(C.$d2b4bc8c273e7be6$export$353f5b6fc5456de1,{...s,children:[c.jsx(N.KeyboardArrowRight,{}),c.jsx(Z,{children:o.main})]})}),o.rightContent.length>0&&c.jsx(x,{children:o.rightContent})]})},A=({children:n,ref:e,...a})=>{const[t,s]=p.extractStyleProps(a);return c.jsx(Y,{ref:e,...t,asChild:!0,children:c.jsx(J,{...s,children:n})})},K=({children:n,value:e,ref:a,...t})=>{const[s,o]=p.extractStyleProps(t),r={...o,id:e};return c.jsx(U,{"data-value":e,ref:a,...s,asChild:!0,children:c.jsx(z,{...r,children:n})})},k={Root:D,Item:K,Header:w,Content:A,HeaderRightContent:x};exports.Accordion=k;exports.AccordionContent=A;exports.AccordionHeader=w;exports.AccordionHeaderRightContentSlot=x;exports.AccordionItem=K;exports.AccordionRoot=D;
|
|
2
|
-
//# sourceMappingURL=accordion-B2FLWAh5.cjs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"accordion-B2FLWAh5.cjs.js","sources":["../../../../node_modules/.pnpm/@react-stately+disclosure@3.0.8_react@19.1.0/node_modules/@react-stately/disclosure/dist/useDisclosureGroupState.mjs","../../../../node_modules/.pnpm/react-aria-components@1.13.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/react-aria-components/dist/Disclosure.mjs","../../src/components/accordion/accordion.slots.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 {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 {ButtonContext as $d2b4bc8c273e7be6$export$24d547caef80ccd1} from \"./Button.mjs\";\nimport {DEFAULT_SLOT as $64fa3d84918910a7$export$c62b8e45d58ddad9, Provider as $64fa3d84918910a7$export$2881499e37b75b9a, useContextProps as $64fa3d84918910a7$export$29f1550f4b0d4415, useRenderProps as $64fa3d84918910a7$export$4d86445c2cf5e3} from \"./utils.mjs\";\nimport {useDisclosure as $hI1OT$useDisclosure, useFocusRing as $hI1OT$useFocusRing} from \"react-aria\";\nimport {useDisclosureGroupState as $hI1OT$useDisclosureGroupState, useDisclosureState as $hI1OT$useDisclosureState} from \"react-stately\";\nimport {filterDOMProps as $hI1OT$filterDOMProps, useId as $hI1OT$useId, mergeProps as $hI1OT$mergeProps, mergeRefs as $hI1OT$mergeRefs} from \"@react-aria/utils\";\nimport $hI1OT$react, {createContext as $hI1OT$createContext, forwardRef as $hI1OT$forwardRef, useContext as $hI1OT$useContext} 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\n\n\n\n\nconst $28f4fd908f0de97f$export$1d40e3e0cc4d5de = /*#__PURE__*/ (0, $hI1OT$createContext)(null);\nconst $28f4fd908f0de97f$export$944aceb4f8c89f10 = /*#__PURE__*/ (0, $hI1OT$forwardRef)(function DisclosureGroup(props, ref) {\n let state = (0, $hI1OT$useDisclosureGroupState)(props);\n let renderProps = (0, $64fa3d84918910a7$export$4d86445c2cf5e3)({\n ...props,\n defaultClassName: 'react-aria-DisclosureGroup',\n values: {\n isDisabled: state.isDisabled,\n state: state\n }\n });\n let domProps = (0, $hI1OT$filterDOMProps)(props, {\n global: true\n });\n return /*#__PURE__*/ (0, $hI1OT$react).createElement(\"div\", {\n ...domProps,\n ...renderProps,\n ref: ref,\n \"data-disabled\": props.isDisabled || undefined\n }, /*#__PURE__*/ (0, $hI1OT$react).createElement($28f4fd908f0de97f$export$1d40e3e0cc4d5de.Provider, {\n value: state\n }, renderProps.children));\n});\nconst $28f4fd908f0de97f$export$d665dd135a51b28a = /*#__PURE__*/ (0, $hI1OT$createContext)(null);\nconst $28f4fd908f0de97f$export$dab3ea4a6ef094da = /*#__PURE__*/ (0, $hI1OT$createContext)(null);\nconst $28f4fd908f0de97f$var$InternalDisclosureContext = /*#__PURE__*/ (0, $hI1OT$createContext)(null);\nconst $28f4fd908f0de97f$export$74a362b31437ec83 = /*#__PURE__*/ (0, $hI1OT$forwardRef)(function Disclosure(props, ref) {\n [props, ref] = (0, $64fa3d84918910a7$export$29f1550f4b0d4415)(props, ref, $28f4fd908f0de97f$export$d665dd135a51b28a);\n let groupState = (0, $hI1OT$useContext)($28f4fd908f0de97f$export$1d40e3e0cc4d5de);\n let { id: id, ...otherProps } = props;\n // Generate an id if one wasn't provided.\n // (can't pass id into useId since it can also be a number)\n let defaultId = (0, $hI1OT$useId)();\n id || (id = defaultId);\n let isExpanded = groupState ? groupState.expandedKeys.has(id) : props.isExpanded;\n let state = (0, $hI1OT$useDisclosureState)({\n ...props,\n isExpanded: isExpanded,\n onExpandedChange (isExpanded) {\n var _props_onExpandedChange;\n if (groupState) groupState.toggleKey(id);\n (_props_onExpandedChange = props.onExpandedChange) === null || _props_onExpandedChange === void 0 ? void 0 : _props_onExpandedChange.call(props, isExpanded);\n }\n });\n let panelRef = (0, $hI1OT$react).useRef(null);\n let isDisabled = props.isDisabled || (groupState === null || groupState === void 0 ? void 0 : groupState.isDisabled) || false;\n let { buttonProps: buttonProps, panelProps: panelProps } = (0, $hI1OT$useDisclosure)({\n ...props,\n isExpanded: isExpanded,\n isDisabled: isDisabled\n }, state, panelRef);\n let { isFocusVisible: isFocusVisibleWithin, focusProps: focusWithinProps } = (0, $hI1OT$useFocusRing)({\n within: true\n });\n let renderProps = (0, $64fa3d84918910a7$export$4d86445c2cf5e3)({\n ...props,\n id: undefined,\n defaultClassName: 'react-aria-Disclosure',\n values: {\n isExpanded: state.isExpanded,\n isDisabled: isDisabled,\n isFocusVisibleWithin: isFocusVisibleWithin,\n state: state\n }\n });\n let domProps = (0, $hI1OT$filterDOMProps)(otherProps, {\n global: true\n });\n return /*#__PURE__*/ (0, $hI1OT$react).createElement((0, $64fa3d84918910a7$export$2881499e37b75b9a), {\n values: [\n [\n (0, $d2b4bc8c273e7be6$export$24d547caef80ccd1),\n {\n slots: {\n [(0, $64fa3d84918910a7$export$c62b8e45d58ddad9)]: {},\n trigger: buttonProps\n }\n }\n ],\n [\n $28f4fd908f0de97f$var$InternalDisclosureContext,\n {\n panelProps: panelProps,\n panelRef: panelRef\n }\n ],\n [\n $28f4fd908f0de97f$export$dab3ea4a6ef094da,\n state\n ]\n ]\n }, /*#__PURE__*/ (0, $hI1OT$react).createElement(\"div\", {\n ...(0, $hI1OT$mergeProps)(domProps, renderProps, focusWithinProps),\n ref: ref,\n \"data-expanded\": state.isExpanded || undefined,\n \"data-disabled\": isDisabled || undefined,\n \"data-focus-visible-within\": isFocusVisibleWithin || undefined\n }, renderProps.children));\n});\nconst $28f4fd908f0de97f$export$feabaa331e1d464c = /*#__PURE__*/ (0, $hI1OT$forwardRef)(function DisclosurePanel(props, ref) {\n let { role: role = 'group' } = props;\n let { panelProps: panelProps, panelRef: panelRef } = (0, $hI1OT$useContext)($28f4fd908f0de97f$var$InternalDisclosureContext);\n let { isFocusVisible: isFocusVisibleWithin, focusProps: focusWithinProps } = (0, $hI1OT$useFocusRing)({\n within: true\n });\n let renderProps = (0, $64fa3d84918910a7$export$4d86445c2cf5e3)({\n ...props,\n defaultClassName: 'react-aria-DisclosurePanel',\n values: {\n isFocusVisibleWithin: isFocusVisibleWithin\n }\n });\n let DOMProps = (0, $hI1OT$filterDOMProps)(props, {\n global: true\n });\n return /*#__PURE__*/ (0, $hI1OT$react).createElement(\"div\", {\n ...(0, $hI1OT$mergeProps)(DOMProps, renderProps, panelProps, focusWithinProps),\n ref: (0, $hI1OT$mergeRefs)(ref, panelRef),\n role: role,\n \"data-focus-visible-within\": isFocusVisibleWithin || undefined\n }, /*#__PURE__*/ (0, $hI1OT$react).createElement((0, $64fa3d84918910a7$export$2881499e37b75b9a), {\n values: [\n [\n (0, $d2b4bc8c273e7be6$export$24d547caef80ccd1),\n null\n ]\n ]\n }, props.children));\n});\n\n\nexport {$28f4fd908f0de97f$export$1d40e3e0cc4d5de as DisclosureGroupStateContext, $28f4fd908f0de97f$export$944aceb4f8c89f10 as DisclosureGroup, $28f4fd908f0de97f$export$d665dd135a51b28a as DisclosureContext, $28f4fd908f0de97f$export$dab3ea4a6ef094da as DisclosureStateContext, $28f4fd908f0de97f$export$74a362b31437ec83 as Disclosure, $28f4fd908f0de97f$export$feabaa331e1d464c as DisclosurePanel};\n//# sourceMappingURL=Disclosure.module.js.map\n","import {\n createSlotRecipeContext,\n type HTMLChakraProps,\n} from \"@chakra-ui/react\";\nimport type { AccordionRootSlotProps } from \"./accordion.types\";\nimport type { SlotComponent } from \"@/utils/slot-types\";\n\nconst { withProvider, withContext } = createSlotRecipeContext({\n key: \"accordion\",\n});\n\nexport const AccordionRootSlot: SlotComponent<\n HTMLDivElement,\n AccordionRootSlotProps\n> = withProvider<HTMLDivElement, AccordionRootSlotProps>(\"div\", \"root\");\n\nexport const AccordionDisclosureSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"disclosure\");\n\nexport const AccordionTriggerSlot = withContext<\n HTMLButtonElement,\n HTMLChakraProps<\"button\">\n>(\"button\", \"trigger\");\n\nexport const AccordionPanelSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"panel\");\n\nexport const AccordionTitleSlot = withContext<\n HTMLButtonElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"accordionTitle\");\n\nexport const AccordionHeaderRightContentSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"headerContentRight\");\n","import { AccordionRootSlot } from \"../accordion.slots\";\nimport { useSlotRecipe } from \"@chakra-ui/react/styled-system\";\nimport { DisclosureGroup as RaDisclosureGroup } from \"react-aria-components\";\nimport type { AccordionRootProps } from \"../accordion.types\";\nimport { extractStyleProps } from \"@/utils/extractStyleProps\";\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 = (props: AccordionRootProps) => {\n const { ref, ...restProps } = props;\n const recipe = useSlotRecipe({ key: \"accordion\" });\n const [recipeProps, restRecipeProps] = recipe.splitVariantProps(restProps);\n const [styleProps, raProps] = extractStyleProps(restRecipeProps);\n\n return (\n <AccordionRootSlot ref={ref} {...recipeProps} {...styleProps} asChild>\n <RaDisclosureGroup {...raProps} />\n </AccordionRootSlot>\n );\n};\n","import React, { useMemo } from \"react\";\nimport {\n AccordionTriggerSlot,\n AccordionTitleSlot,\n AccordionHeaderRightContentSlot,\n} from \"../accordion.slots\";\nimport { Flex } from \"@/components\";\nimport { KeyboardArrowRight } from \"@commercetools/nimbus-icons\";\nimport { Button as RaButton } from \"react-aria-components\";\nimport type { AccordionHeaderProps } from \"../accordion.types\";\nimport { extractStyleProps } from \"@/utils/extractStyleProps\";\n\nexport const AccordionHeader = ({\n children,\n ref,\n ...props\n}: AccordionHeaderProps) => {\n const [styleProps, restProps] = extractStyleProps(props);\n // Extract HeaderRightContent if present\n const headerContent = useMemo(() => {\n const main: React.ReactNode[] = [];\n const rightContent: React.ReactNode[] = [];\n\n React.Children.forEach(children, (child) => {\n if (\n React.isValidElement(child) &&\n child.type === AccordionHeaderRightContentSlot\n ) {\n rightContent.push(child);\n } else {\n main.push(child);\n }\n });\n\n return { main, rightContent };\n }, [children]);\n\n return (\n <Flex\n justifyContent=\"space-between\"\n alignItems=\"center\"\n borderBottom=\"solid-25\"\n borderColor=\"neutral.4\"\n {...styleProps}\n >\n <AccordionTriggerSlot ref={ref} slot=\"trigger\" asChild>\n <RaButton {...restProps}>\n <KeyboardArrowRight />\n <AccordionTitleSlot>{headerContent.main}</AccordionTitleSlot>\n </RaButton>\n </AccordionTriggerSlot>\n {headerContent.rightContent.length > 0 && (\n <AccordionHeaderRightContentSlot>\n {headerContent.rightContent}\n </AccordionHeaderRightContentSlot>\n )}\n </Flex>\n );\n};\n","import { AccordionPanelSlot } from \"../accordion.slots\";\nimport { DisclosurePanel as RaDisclosurePanel } from \"react-aria-components\";\nimport type { AccordionContentProps } from \"../accordion.types\";\nimport { extractStyleProps } from \"@/utils/extractStyleProps\";\n\n// Create Content component\nexport const AccordionContent = ({\n children,\n ref,\n ...props\n}: AccordionContentProps) => {\n const [styleProps, restProps] = extractStyleProps(props);\n\n return (\n <AccordionPanelSlot ref={ref} {...styleProps} asChild>\n <RaDisclosurePanel {...restProps}>{children}</RaDisclosurePanel>\n </AccordionPanelSlot>\n );\n};\n","import { AccordionDisclosureSlot } from \"../accordion.slots\";\nimport { Disclosure as RaDisclosure } from \"react-aria-components\";\nimport type { AccordionItemProps } from \"../accordion.types\";\nimport { extractStyleProps } from \"@/utils/extractStyleProps\";\n\nexport const AccordionItem = ({\n children,\n value,\n ref,\n ...props\n}: AccordionItemProps) => {\n const [styleProps, restProps] = extractStyleProps(props);\n const disclosureProps = {\n ...restProps,\n id: value, // React Aria uses id for the key\n };\n\n return (\n <AccordionDisclosureSlot\n data-value={value}\n ref={ref}\n {...styleProps}\n asChild\n >\n <RaDisclosure {...disclosureProps}>{children}</RaDisclosure>\n </AccordionDisclosureSlot>\n );\n};\n","import { AccordionHeaderRightContentSlot } 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: AccordionHeaderRightContentSlot,\n};\n\nexport {\n AccordionRoot as _AccordionRoot,\n AccordionItem as _AccordionItem,\n AccordionHeader as _AccordionHeader,\n AccordionContent as _AccordionContent,\n AccordionHeaderRightContentSlot as _AccordionHeaderRightContent,\n};\n"],"names":["$9385b3affbdec831$export$f36461af0ef4707d","props","allowsMultipleExpanded","isDisabled","expandedKeys","setExpandedKeys","$j4gLc$useControlledState","$j4gLc$useMemo","$j4gLc$useEffect","firstKey","key","keys","$28f4fd908f0de97f$export$1d40e3e0cc4d5de","$hI1OT$createContext","$28f4fd908f0de97f$export$944aceb4f8c89f10","$hI1OT$forwardRef","ref","state","$hI1OT$useDisclosureGroupState","renderProps","$64fa3d84918910a7$export$4d86445c2cf5e3","domProps","$hI1OT$filterDOMProps","$hI1OT$react","$28f4fd908f0de97f$export$d665dd135a51b28a","$28f4fd908f0de97f$export$dab3ea4a6ef094da","$28f4fd908f0de97f$var$InternalDisclosureContext","$28f4fd908f0de97f$export$74a362b31437ec83","$64fa3d84918910a7$export$29f1550f4b0d4415","groupState","$hI1OT$useContext","id","otherProps","defaultId","$hI1OT$useId","isExpanded","$hI1OT$useDisclosureState","_props_onExpandedChange","panelRef","buttonProps","panelProps","$hI1OT$useDisclosure","isFocusVisibleWithin","focusWithinProps","$hI1OT$useFocusRing","$64fa3d84918910a7$export$2881499e37b75b9a","$d2b4bc8c273e7be6$export$24d547caef80ccd1","$64fa3d84918910a7$export$c62b8e45d58ddad9","$hI1OT$mergeProps","$28f4fd908f0de97f$export$feabaa331e1d464c","role","DOMProps","$hI1OT$mergeRefs","withProvider","withContext","createSlotRecipeContext","AccordionRootSlot","AccordionDisclosureSlot","AccordionTriggerSlot","AccordionPanelSlot","AccordionTitleSlot","AccordionHeaderRightContentSlot","AccordionRoot","restProps","recipe","useSlotRecipe","recipeProps","restRecipeProps","styleProps","raProps","extractStyleProps","jsx","RaDisclosureGroup","AccordionHeader","children","headerContent","useMemo","main","rightContent","React","child","jsxs","Flex","RaButton","KeyboardArrowRight","AccordionContent","RaDisclosurePanel","AccordionItem","value","disclosureProps","RaDisclosure","Accordion"],"mappings":"+jBAeA,SAASA,EAA0CC,EAAO,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
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"accordion-CKDnNkVv.es.js","sources":["../../../../node_modules/.pnpm/@react-stately+disclosure@3.0.8_react@19.1.0/node_modules/@react-stately/disclosure/dist/useDisclosureGroupState.mjs","../../../../node_modules/.pnpm/react-aria-components@1.13.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/react-aria-components/dist/Disclosure.mjs","../../src/components/accordion/accordion.slots.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 {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 {ButtonContext as $d2b4bc8c273e7be6$export$24d547caef80ccd1} from \"./Button.mjs\";\nimport {DEFAULT_SLOT as $64fa3d84918910a7$export$c62b8e45d58ddad9, Provider as $64fa3d84918910a7$export$2881499e37b75b9a, useContextProps as $64fa3d84918910a7$export$29f1550f4b0d4415, useRenderProps as $64fa3d84918910a7$export$4d86445c2cf5e3} from \"./utils.mjs\";\nimport {useDisclosure as $hI1OT$useDisclosure, useFocusRing as $hI1OT$useFocusRing} from \"react-aria\";\nimport {useDisclosureGroupState as $hI1OT$useDisclosureGroupState, useDisclosureState as $hI1OT$useDisclosureState} from \"react-stately\";\nimport {filterDOMProps as $hI1OT$filterDOMProps, useId as $hI1OT$useId, mergeProps as $hI1OT$mergeProps, mergeRefs as $hI1OT$mergeRefs} from \"@react-aria/utils\";\nimport $hI1OT$react, {createContext as $hI1OT$createContext, forwardRef as $hI1OT$forwardRef, useContext as $hI1OT$useContext} 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\n\n\n\n\nconst $28f4fd908f0de97f$export$1d40e3e0cc4d5de = /*#__PURE__*/ (0, $hI1OT$createContext)(null);\nconst $28f4fd908f0de97f$export$944aceb4f8c89f10 = /*#__PURE__*/ (0, $hI1OT$forwardRef)(function DisclosureGroup(props, ref) {\n let state = (0, $hI1OT$useDisclosureGroupState)(props);\n let renderProps = (0, $64fa3d84918910a7$export$4d86445c2cf5e3)({\n ...props,\n defaultClassName: 'react-aria-DisclosureGroup',\n values: {\n isDisabled: state.isDisabled,\n state: state\n }\n });\n let domProps = (0, $hI1OT$filterDOMProps)(props, {\n global: true\n });\n return /*#__PURE__*/ (0, $hI1OT$react).createElement(\"div\", {\n ...domProps,\n ...renderProps,\n ref: ref,\n \"data-disabled\": props.isDisabled || undefined\n }, /*#__PURE__*/ (0, $hI1OT$react).createElement($28f4fd908f0de97f$export$1d40e3e0cc4d5de.Provider, {\n value: state\n }, renderProps.children));\n});\nconst $28f4fd908f0de97f$export$d665dd135a51b28a = /*#__PURE__*/ (0, $hI1OT$createContext)(null);\nconst $28f4fd908f0de97f$export$dab3ea4a6ef094da = /*#__PURE__*/ (0, $hI1OT$createContext)(null);\nconst $28f4fd908f0de97f$var$InternalDisclosureContext = /*#__PURE__*/ (0, $hI1OT$createContext)(null);\nconst $28f4fd908f0de97f$export$74a362b31437ec83 = /*#__PURE__*/ (0, $hI1OT$forwardRef)(function Disclosure(props, ref) {\n [props, ref] = (0, $64fa3d84918910a7$export$29f1550f4b0d4415)(props, ref, $28f4fd908f0de97f$export$d665dd135a51b28a);\n let groupState = (0, $hI1OT$useContext)($28f4fd908f0de97f$export$1d40e3e0cc4d5de);\n let { id: id, ...otherProps } = props;\n // Generate an id if one wasn't provided.\n // (can't pass id into useId since it can also be a number)\n let defaultId = (0, $hI1OT$useId)();\n id || (id = defaultId);\n let isExpanded = groupState ? groupState.expandedKeys.has(id) : props.isExpanded;\n let state = (0, $hI1OT$useDisclosureState)({\n ...props,\n isExpanded: isExpanded,\n onExpandedChange (isExpanded) {\n var _props_onExpandedChange;\n if (groupState) groupState.toggleKey(id);\n (_props_onExpandedChange = props.onExpandedChange) === null || _props_onExpandedChange === void 0 ? void 0 : _props_onExpandedChange.call(props, isExpanded);\n }\n });\n let panelRef = (0, $hI1OT$react).useRef(null);\n let isDisabled = props.isDisabled || (groupState === null || groupState === void 0 ? void 0 : groupState.isDisabled) || false;\n let { buttonProps: buttonProps, panelProps: panelProps } = (0, $hI1OT$useDisclosure)({\n ...props,\n isExpanded: isExpanded,\n isDisabled: isDisabled\n }, state, panelRef);\n let { isFocusVisible: isFocusVisibleWithin, focusProps: focusWithinProps } = (0, $hI1OT$useFocusRing)({\n within: true\n });\n let renderProps = (0, $64fa3d84918910a7$export$4d86445c2cf5e3)({\n ...props,\n id: undefined,\n defaultClassName: 'react-aria-Disclosure',\n values: {\n isExpanded: state.isExpanded,\n isDisabled: isDisabled,\n isFocusVisibleWithin: isFocusVisibleWithin,\n state: state\n }\n });\n let domProps = (0, $hI1OT$filterDOMProps)(otherProps, {\n global: true\n });\n return /*#__PURE__*/ (0, $hI1OT$react).createElement((0, $64fa3d84918910a7$export$2881499e37b75b9a), {\n values: [\n [\n (0, $d2b4bc8c273e7be6$export$24d547caef80ccd1),\n {\n slots: {\n [(0, $64fa3d84918910a7$export$c62b8e45d58ddad9)]: {},\n trigger: buttonProps\n }\n }\n ],\n [\n $28f4fd908f0de97f$var$InternalDisclosureContext,\n {\n panelProps: panelProps,\n panelRef: panelRef\n }\n ],\n [\n $28f4fd908f0de97f$export$dab3ea4a6ef094da,\n state\n ]\n ]\n }, /*#__PURE__*/ (0, $hI1OT$react).createElement(\"div\", {\n ...(0, $hI1OT$mergeProps)(domProps, renderProps, focusWithinProps),\n ref: ref,\n \"data-expanded\": state.isExpanded || undefined,\n \"data-disabled\": isDisabled || undefined,\n \"data-focus-visible-within\": isFocusVisibleWithin || undefined\n }, renderProps.children));\n});\nconst $28f4fd908f0de97f$export$feabaa331e1d464c = /*#__PURE__*/ (0, $hI1OT$forwardRef)(function DisclosurePanel(props, ref) {\n let { role: role = 'group' } = props;\n let { panelProps: panelProps, panelRef: panelRef } = (0, $hI1OT$useContext)($28f4fd908f0de97f$var$InternalDisclosureContext);\n let { isFocusVisible: isFocusVisibleWithin, focusProps: focusWithinProps } = (0, $hI1OT$useFocusRing)({\n within: true\n });\n let renderProps = (0, $64fa3d84918910a7$export$4d86445c2cf5e3)({\n ...props,\n defaultClassName: 'react-aria-DisclosurePanel',\n values: {\n isFocusVisibleWithin: isFocusVisibleWithin\n }\n });\n let DOMProps = (0, $hI1OT$filterDOMProps)(props, {\n global: true\n });\n return /*#__PURE__*/ (0, $hI1OT$react).createElement(\"div\", {\n ...(0, $hI1OT$mergeProps)(DOMProps, renderProps, panelProps, focusWithinProps),\n ref: (0, $hI1OT$mergeRefs)(ref, panelRef),\n role: role,\n \"data-focus-visible-within\": isFocusVisibleWithin || undefined\n }, /*#__PURE__*/ (0, $hI1OT$react).createElement((0, $64fa3d84918910a7$export$2881499e37b75b9a), {\n values: [\n [\n (0, $d2b4bc8c273e7be6$export$24d547caef80ccd1),\n null\n ]\n ]\n }, props.children));\n});\n\n\nexport {$28f4fd908f0de97f$export$1d40e3e0cc4d5de as DisclosureGroupStateContext, $28f4fd908f0de97f$export$944aceb4f8c89f10 as DisclosureGroup, $28f4fd908f0de97f$export$d665dd135a51b28a as DisclosureContext, $28f4fd908f0de97f$export$dab3ea4a6ef094da as DisclosureStateContext, $28f4fd908f0de97f$export$74a362b31437ec83 as Disclosure, $28f4fd908f0de97f$export$feabaa331e1d464c as DisclosurePanel};\n//# sourceMappingURL=Disclosure.module.js.map\n","import {\n createSlotRecipeContext,\n type HTMLChakraProps,\n} from \"@chakra-ui/react\";\nimport type { AccordionRootSlotProps } from \"./accordion.types\";\nimport type { SlotComponent } from \"@/utils/slot-types\";\n\nconst { withProvider, withContext } = createSlotRecipeContext({\n key: \"accordion\",\n});\n\nexport const AccordionRootSlot: SlotComponent<\n HTMLDivElement,\n AccordionRootSlotProps\n> = withProvider<HTMLDivElement, AccordionRootSlotProps>(\"div\", \"root\");\n\nexport const AccordionDisclosureSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"disclosure\");\n\nexport const AccordionTriggerSlot = withContext<\n HTMLButtonElement,\n HTMLChakraProps<\"button\">\n>(\"button\", \"trigger\");\n\nexport const AccordionPanelSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"panel\");\n\nexport const AccordionTitleSlot = withContext<\n HTMLButtonElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"accordionTitle\");\n\nexport const AccordionHeaderRightContentSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"headerContentRight\");\n","import { AccordionRootSlot } from \"../accordion.slots\";\nimport { useSlotRecipe } from \"@chakra-ui/react/styled-system\";\nimport { DisclosureGroup as RaDisclosureGroup } from \"react-aria-components\";\nimport type { AccordionRootProps } from \"../accordion.types\";\nimport { extractStyleProps } from \"@/utils/extractStyleProps\";\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 = (props: AccordionRootProps) => {\n const { ref, ...restProps } = props;\n const recipe = useSlotRecipe({ key: \"accordion\" });\n const [recipeProps, restRecipeProps] = recipe.splitVariantProps(restProps);\n const [styleProps, raProps] = extractStyleProps(restRecipeProps);\n\n return (\n <AccordionRootSlot ref={ref} {...recipeProps} {...styleProps} asChild>\n <RaDisclosureGroup {...raProps} />\n </AccordionRootSlot>\n );\n};\n","import React, { useMemo } from \"react\";\nimport {\n AccordionTriggerSlot,\n AccordionTitleSlot,\n AccordionHeaderRightContentSlot,\n} from \"../accordion.slots\";\nimport { Flex } from \"@/components\";\nimport { KeyboardArrowRight } from \"@commercetools/nimbus-icons\";\nimport { Button as RaButton } from \"react-aria-components\";\nimport type { AccordionHeaderProps } from \"../accordion.types\";\nimport { extractStyleProps } from \"@/utils/extractStyleProps\";\n\nexport const AccordionHeader = ({\n children,\n ref,\n ...props\n}: AccordionHeaderProps) => {\n const [styleProps, restProps] = extractStyleProps(props);\n // Extract HeaderRightContent if present\n const headerContent = useMemo(() => {\n const main: React.ReactNode[] = [];\n const rightContent: React.ReactNode[] = [];\n\n React.Children.forEach(children, (child) => {\n if (\n React.isValidElement(child) &&\n child.type === AccordionHeaderRightContentSlot\n ) {\n rightContent.push(child);\n } else {\n main.push(child);\n }\n });\n\n return { main, rightContent };\n }, [children]);\n\n return (\n <Flex\n justifyContent=\"space-between\"\n alignItems=\"center\"\n borderBottom=\"solid-25\"\n borderColor=\"neutral.4\"\n {...styleProps}\n >\n <AccordionTriggerSlot ref={ref} slot=\"trigger\" asChild>\n <RaButton {...restProps}>\n <KeyboardArrowRight />\n <AccordionTitleSlot>{headerContent.main}</AccordionTitleSlot>\n </RaButton>\n </AccordionTriggerSlot>\n {headerContent.rightContent.length > 0 && (\n <AccordionHeaderRightContentSlot>\n {headerContent.rightContent}\n </AccordionHeaderRightContentSlot>\n )}\n </Flex>\n );\n};\n","import { AccordionPanelSlot } from \"../accordion.slots\";\nimport { DisclosurePanel as RaDisclosurePanel } from \"react-aria-components\";\nimport type { AccordionContentProps } from \"../accordion.types\";\nimport { extractStyleProps } from \"@/utils/extractStyleProps\";\n\n// Create Content component\nexport const AccordionContent = ({\n children,\n ref,\n ...props\n}: AccordionContentProps) => {\n const [styleProps, restProps] = extractStyleProps(props);\n\n return (\n <AccordionPanelSlot ref={ref} {...styleProps} asChild>\n <RaDisclosurePanel {...restProps}>{children}</RaDisclosurePanel>\n </AccordionPanelSlot>\n );\n};\n","import { AccordionDisclosureSlot } from \"../accordion.slots\";\nimport { Disclosure as RaDisclosure } from \"react-aria-components\";\nimport type { AccordionItemProps } from \"../accordion.types\";\nimport { extractStyleProps } from \"@/utils/extractStyleProps\";\n\nexport const AccordionItem = ({\n children,\n value,\n ref,\n ...props\n}: AccordionItemProps) => {\n const [styleProps, restProps] = extractStyleProps(props);\n const disclosureProps = {\n ...restProps,\n id: value, // React Aria uses id for the key\n };\n\n return (\n <AccordionDisclosureSlot\n data-value={value}\n ref={ref}\n {...styleProps}\n asChild\n >\n <RaDisclosure {...disclosureProps}>{children}</RaDisclosure>\n </AccordionDisclosureSlot>\n );\n};\n","import { AccordionHeaderRightContentSlot } 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: AccordionHeaderRightContentSlot,\n};\n\nexport {\n AccordionRoot as _AccordionRoot,\n AccordionItem as _AccordionItem,\n AccordionHeader as _AccordionHeader,\n AccordionContent as _AccordionContent,\n AccordionHeaderRightContentSlot as _AccordionHeaderRightContent,\n};\n"],"names":["$9385b3affbdec831$export$f36461af0ef4707d","props","allowsMultipleExpanded","isDisabled","expandedKeys","setExpandedKeys","$j4gLc$useControlledState","$j4gLc$useMemo","$j4gLc$useEffect","firstKey","key","keys","$28f4fd908f0de97f$export$1d40e3e0cc4d5de","$hI1OT$createContext","$28f4fd908f0de97f$export$944aceb4f8c89f10","$hI1OT$forwardRef","ref","state","$hI1OT$useDisclosureGroupState","renderProps","$64fa3d84918910a7$export$4d86445c2cf5e3","domProps","$hI1OT$filterDOMProps","$hI1OT$react","$28f4fd908f0de97f$export$d665dd135a51b28a","$28f4fd908f0de97f$export$dab3ea4a6ef094da","$28f4fd908f0de97f$var$InternalDisclosureContext","$28f4fd908f0de97f$export$74a362b31437ec83","$64fa3d84918910a7$export$29f1550f4b0d4415","groupState","$hI1OT$useContext","id","otherProps","defaultId","$hI1OT$useId","isExpanded","$hI1OT$useDisclosureState","_props_onExpandedChange","panelRef","buttonProps","panelProps","$hI1OT$useDisclosure","isFocusVisibleWithin","focusWithinProps","$hI1OT$useFocusRing","$64fa3d84918910a7$export$2881499e37b75b9a","$d2b4bc8c273e7be6$export$24d547caef80ccd1","$64fa3d84918910a7$export$c62b8e45d58ddad9","$hI1OT$mergeProps","$28f4fd908f0de97f$export$feabaa331e1d464c","role","DOMProps","$hI1OT$mergeRefs","withProvider","withContext","createSlotRecipeContext","AccordionRootSlot","AccordionDisclosureSlot","AccordionTriggerSlot","AccordionPanelSlot","AccordionTitleSlot","AccordionHeaderRightContentSlot","AccordionRoot","restProps","recipe","useSlotRecipe","recipeProps","restRecipeProps","styleProps","raProps","extractStyleProps","jsx","RaDisclosureGroup","AccordionHeader","children","headerContent","useMemo","main","rightContent","React","child","jsxs","Flex","RaButton","KeyboardArrowRight","AccordionContent","RaDisclosurePanel","AccordionItem","value","disclosureProps","RaDisclosure","Accordion"],"mappings":";;;;;;;;;;;;;;AAeA,SAASA,EAA0CC,GAAO;AACtD,MAAI,EAAE,wBAAwBC,IAAyB,IAAO,YAAYC,IAAa,GAAK,IAAKF,GAC7F,CAACG,GAAcC,CAAe,IAAQC,EAA+BC,EAAgB,MAAIN,EAAM,eAAe,IAAI,IAAIA,EAAM,YAAY,IAAI,QAAW;AAAA,IACvJA,EAAM;AAAA,EACd,CAAK,GAAOM,EAAgB,MAAIN,EAAM,sBAAsB,IAAI,IAAIA,EAAM,mBAAmB,IAAI,oBAAI,IAAG,GAAI;AAAA,IACpGA,EAAM;AAAA,EACd,CAAK,GAAGA,EAAM,gBAAgB;AAC1B,SAAIO,EAAkB,MAAI;AAEtB,QAAI,CAACN,KAA0BE,EAAa,OAAO,GAAG;AAClD,UAAIK,IAAWL,EAAa,OAAM,EAAG,KAAI,EAAG;AAC5C,MAAIK,KAAY,QAAMJ,EAAgB,oBAAI,IAAI;AAAA,QAC1CI;AAAA,MAChB,CAAa,C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;AAAA,MACZ,KAAAxE;AAAA,MACC,GAAGoD;AAAA,MACJ,SAAO;AAAA,MAEP,UAAA,gBAAAG,EAACmB,IAAA,EAAc,GAAGD,GAAkB,UAAAf,EAAA,CAAS;AAAA,IAAA;AAAA,EAAA;AAGnD,GCpBaiB,KAAY;AAAA,EACvB,MAAM7B;AAAA,EACN,MAAMyB;AAAA,EACN,QAAQd;AAAA,EACR,SAASY;AAAA,EACT,oBAAoBxB;AACtB;","x_google_ignoreList":[0,1]}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";const e=require("react/jsx-runtime"),a=require("./Heading-CCs6OF_m.cjs.js"),q=require("@chakra-ui/react"),$=require("react"),c=require("./useDateFormatter-BBcUQTYP.cjs.js"),m=require("./utils-BHdR5Nww.cjs.js"),v=require("./context-OoV8SSWX.cjs.js"),S=require("./box-CWni3A32.cjs.js"),h=require("@commercetools/nimbus-icons"),j=require("./stack-CIN13EDn.cjs.js"),y=require("./text-CCW9kDT_.cjs.js"),D=require("@chakra-ui/react/flex"),P=require("./visually-hidden-tTYCAVoQ.cjs.js"),u=require("./icon-button-vWPrT-bR.cjs.js"),R=require("./index-CRFg4Mhx.cjs.js"),I=require("@chakra-ui/react/styled-system"),T=require("./extractStyleProps-Dk3fpLyQ.cjs.js"),C=require("./Button-CFZnLKVR.cjs.js"),g=require("./Text-BWSfeB9p.cjs.js"),{withProvider:B,withContext:s}=q.createSlotRecipeContext({key:"calendar"}),H=B("div","root"),A=s("div","header"),F=s("div","grids"),G=s("div","monthTitle"),L=s("table","grid"),k=s("thead","gridHeader"),M=s("th","headerCell"),N=s("tbody","gridBody"),z=s("td","bodyCell"),K=()=>{const{locale:d}=v.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),n=m.$64fa3d84918910a7$export$fabf2dc03a41866e(a.$dfd62f934fc76fed$export$3b805cea1f178355),t=$.useContext(a.$dfd62f934fc76fed$export$9e31dcedda1dadc7),r=n?.visibleDuration?.months||1,o=c.$14e0f24ef4ac5c92$export$d0bdf45af03a6ea3(c.$14e0f24ef4ac5c92$export$aa8b41735afcabd2()),i=r>1;return e.jsx(F,{children:Array.from({length:r},(p,l)=>{const b=t.visibleRange.start.add({months:l}),f=new Intl.DateTimeFormat(d,{month:"long"}).format(b.toDate(c.$14e0f24ef4ac5c92$export$aa8b41735afcabd2()));return e.jsxs(S.Box,{width:r==1?"full":"auto",children:[i&&e.jsx(G,{children:f}),e.jsx(L,{asChild:!0,children:e.jsxs(a.$dfd62f934fc76fed$export$5bd780d491cfc46c,{offset:{months:l},weekdayStyle:"short",children:[e.jsx(k,{asChild:!0,children:e.jsx(a.$dfd62f934fc76fed$export$22e2d15eaa4d2377,{children:x=>e.jsx(M,{asChild:!0,children:e.jsx(a.$dfd62f934fc76fed$export$ad2135cac3a11b3d,{children:x})})})}),e.jsx(N,{asChild:!0,children:e.jsx(a.$dfd62f934fc76fed$export$e11f8ba65d857bff,{children:x=>{const w=x.compare(o)===0;return e.jsx(z,{asChild:!0,"data-today":w,children:e.jsx(a.$dfd62f934fc76fed$export$5d847498420df57b,{date:x})})}})})]})})]},f)})})},V=()=>{const t=(m.$64fa3d84918910a7$export$fabf2dc03a41866e(a.$dfd62f934fc76fed$export$3b805cea1f178355)?.visibleDuration?.months||1)>1;return e.jsx(A,{children:e.jsxs(D.Flex,{children:[e.jsxs(j.Stack,{direction:"row",alignItems:"center",children:[e.jsx(P.VisuallyHidden,{children:e.jsx(a.$5cb03073d3f54797$export$a8a3e93435678ff9,{})}),e.jsx(u.IconButton,{slot:t?"previous":"previous-month",size:"xs",variant:"ghost",tone:"primary",children:e.jsx(h.KeyboardArrowLeft,{})}),e.jsx(y.Text,{textStyle:"sm",fontWeight:"500",color:"neutral.11",width:t?"4000":"2000",textAlign:"center","aria-hidden":"true",slot:t?"monthRange":"month"}),e.jsx(u.IconButton,{slot:t?"next":"next-month",size:"xs",variant:"ghost",tone:"primary",children:e.jsx(h.KeyboardArrowRight,{})})]}),e.jsx(S.Box,{flexGrow:"1"}),e.jsxs(j.Stack,{direction:"row",alignItems:"center",children:[e.jsx(u.IconButton,{slot:"previous-year",size:"xs",variant:"ghost",tone:"primary",children:e.jsx(h.KeyboardArrowLeft,{})}),e.jsx(y.Text,{textStyle:"sm",fontWeight:"500",color:"neutral.11",width:"1400",textAlign:"center","aria-hidden":"true",slot:"year"}),e.jsx(u.IconButton,{slot:"next-year",size:"xs",variant:"ghost",tone:"primary",children:e.jsx(h.KeyboardArrowRight,{})})]})]})})},W=({children:d})=>{const{locale:n}=v.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),t=$.useContext(C.$d2b4bc8c273e7be6$export$24d547caef80ccd1),r=$.useContext(g.$514c0188e459b4c0$export$9afb8bc826b033ea),o=$.useContext(a.$dfd62f934fc76fed$export$9e31dcedda1dadc7),i={"next-month":{onPress:()=>o.focusNextSection(),"aria-label":"Next month"},"previous-month":{onPress:()=>o.focusPreviousSection(),"aria-label":"Previous month"},"next-year":{onPress:()=>o.focusNextSection(!0),"aria-label":"Next year"},"previous-year":{onPress:()=>o.focusPreviousSection(!0),"aria-label":"Previous year"}},p=new Intl.DateTimeFormat(n,{month:"long"}).format(o.focusedDate.toDate(c.$14e0f24ef4ac5c92$export$aa8b41735afcabd2())),l=[new Intl.DateTimeFormat(n,{month:"long"}).format(o.visibleRange.start.toDate(c.$14e0f24ef4ac5c92$export$aa8b41735afcabd2())),new Intl.DateTimeFormat(n,{month:"long"}).format(o.visibleRange.end.toDate(c.$14e0f24ef4ac5c92$export$aa8b41735afcabd2()))].join(" - "),b=new Intl.DateTimeFormat(n,{year:"numeric"}).format(o.focusedDate.toDate(c.$14e0f24ef4ac5c92$export$aa8b41735afcabd2())),f={month:{children:p},monthRange:{children:l},year:{children:b}};return e.jsx(m.$64fa3d84918910a7$export$2881499e37b75b9a,{values:[[C.$d2b4bc8c273e7be6$export$24d547caef80ccd1,{...t,slots:{...t&&typeof t=="object"&&"slots"in t?t.slots:{},...i}}],[g.$514c0188e459b4c0$export$9afb8bc826b033ea,{...r,slots:{...r&&typeof r=="object"&&"slots"in r?r.slots:{},...f}}]],children:d})},_=d=>{const n=I.useRecipe({recipe:R.calendarSlotRecipe}),[t,r]=n.splitVariantProps(d),[o,i]=T.extractStyleProps(r);return e.jsx(H,{...t,...o,asChild:!0,children:e.jsx(a.$dfd62f934fc76fed$export$e1aef45b828286de,{...i,children:e.jsxs(W,{children:[e.jsx(V,{}),e.jsx(K,{})]})})})};exports.Calendar=_;
|
|
2
|
-
//# sourceMappingURL=calendar-V0KeNCQ3.cjs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"calendar-V0KeNCQ3.cjs.js","sources":["../../src/components/calendar/calendar.slots.tsx","../../src/components/calendar/components/calendar.grids.tsx","../../src/components/calendar/components/calendar.header.tsx","../../src/components/calendar/components/calendar.custom-context.tsx","../../src/components/calendar/calendar.tsx"],"sourcesContent":["import { createSlotRecipeContext } from \"@chakra-ui/react\";\nimport type {\n CalendarCellSlotProps,\n CalendarGridBodySlotProps,\n CalendarGridHeaderSlotProps,\n CalendarGridSlotProps,\n CalendarGridsSlotProps,\n CalendarHeaderCellSlotProps,\n CalendarHeaderSlotProps,\n CalendarMonthTitleSlotProps,\n CalendarRootSlotProps,\n} from \"./calendar.types\";\nimport type { SlotComponent } from \"@/utils/slot-types\";\n\nconst { withProvider, withContext } = createSlotRecipeContext({\n key: \"calendar\",\n});\n\nexport const CalendarRootSlot: SlotComponent<\n HTMLDivElement,\n CalendarRootSlotProps\n> = withProvider<HTMLDivElement, CalendarRootSlotProps>(\"div\", \"root\");\n\nexport const CalendarHeaderSlot = withContext<\n HTMLDivElement,\n CalendarHeaderSlotProps\n>(\"div\", \"header\");\n\nexport const CalendarGridsSlot = withContext<\n HTMLDivElement,\n CalendarGridsSlotProps\n>(\"div\", \"grids\");\n\nexport const CalendarMonthTitleSlot = withContext<\n HTMLDivElement,\n CalendarMonthTitleSlotProps\n>(\"div\", \"monthTitle\");\n\nexport const CalendarGridSlot = withContext<\n HTMLTableElement,\n CalendarGridSlotProps\n>(\"table\", \"grid\");\n\nexport const CalendarGridHeaderSlot = withContext<\n HTMLTableSectionElement,\n CalendarGridHeaderSlotProps\n>(\"thead\", \"gridHeader\");\n\nexport const CalendarHeaderCellSlot = withContext<\n HTMLTableCellElement,\n CalendarHeaderCellSlotProps\n>(\"th\", \"headerCell\");\n\nexport const CalendarGridBodySlot = withContext<\n HTMLTableSectionElement,\n CalendarGridBodySlotProps\n>(\"tbody\", \"gridBody\");\n\nexport const CalendarCellSlot = withContext<\n HTMLTableCellElement,\n CalendarCellSlotProps\n>(\"td\", \"bodyCell\");\n","import { useContext } from \"react\";\nimport { today, getLocalTimeZone } from \"@internationalized/date\";\nimport {\n CalendarGrid as RaCalendarGrid,\n CalendarGridBody as RaCalendarGridBody,\n CalendarGridHeader as RaCalendarGridHeader,\n CalendarHeaderCell as RaCalendarHeaderCell,\n CalendarCell as RaCalendarCell,\n useSlottedContext,\n CalendarContext,\n CalendarStateContext,\n useLocale,\n} from \"react-aria-components\";\n\nimport { Box } from \"@/components\";\n\nimport {\n CalendarCellSlot,\n CalendarGridBodySlot,\n CalendarGridHeaderSlot,\n CalendarGridSlot,\n CalendarGridsSlot,\n CalendarHeaderCellSlot,\n CalendarMonthTitleSlot,\n} from \"../calendar.slots\";\n\nexport const CalendarGrids = () => {\n const { locale } = useLocale();\n const context = useSlottedContext(CalendarContext);\n const calendarState = useContext(CalendarStateContext)!;\n const visibleMonthsCount = context?.visibleDuration?.months || 1;\n const todayDate = today(getLocalTimeZone());\n const showMonthTitles = visibleMonthsCount > 1;\n\n return (\n <CalendarGridsSlot>\n {Array.from({ length: visibleMonthsCount }, (_, index) => {\n const gridDate = calendarState.visibleRange.start.add({\n months: index,\n });\n const monthName = new Intl.DateTimeFormat(locale, {\n month: \"long\",\n }).format(gridDate.toDate(getLocalTimeZone()));\n\n return (\n <Box\n key={monthName}\n width={visibleMonthsCount == 1 ? \"full\" : \"auto\"}\n >\n {showMonthTitles && (\n <CalendarMonthTitleSlot>{monthName}</CalendarMonthTitleSlot>\n )}\n <CalendarGridSlot asChild>\n <RaCalendarGrid offset={{ months: index }} weekdayStyle=\"short\">\n <CalendarGridHeaderSlot asChild>\n <RaCalendarGridHeader>\n {(day) => (\n <CalendarHeaderCellSlot asChild>\n <RaCalendarHeaderCell>{day}</RaCalendarHeaderCell>\n </CalendarHeaderCellSlot>\n )}\n </RaCalendarGridHeader>\n </CalendarGridHeaderSlot>\n <CalendarGridBodySlot asChild>\n <RaCalendarGridBody>\n {(date) => {\n const isToday = date.compare(todayDate) === 0;\n return (\n <CalendarCellSlot asChild data-today={isToday}>\n <RaCalendarCell date={date} />\n </CalendarCellSlot>\n );\n }}\n </RaCalendarGridBody>\n </CalendarGridBodySlot>\n </RaCalendarGrid>\n </CalendarGridSlot>\n </Box>\n );\n })}\n </CalendarGridsSlot>\n );\n};\n","import {\n CalendarContext,\n Heading,\n useSlottedContext,\n} from \"react-aria-components\";\nimport {\n Box,\n Flex,\n IconButton,\n Stack,\n Text,\n VisuallyHidden,\n} from \"@/components\";\nimport {\n KeyboardArrowLeft,\n KeyboardArrowRight,\n} from \"@commercetools/nimbus-icons\";\nimport { CalendarHeaderSlot } from \"../calendar.slots\";\n\nexport const CalendarHeader = () => {\n const calendarProps = useSlottedContext(CalendarContext);\n\n // Needed to decide wether to show a single month or a range\n const visibleDurationMonths = calendarProps?.visibleDuration?.months || 1;\n const showRangeLabel = visibleDurationMonths > 1;\n\n return (\n <CalendarHeaderSlot>\n <Flex>\n <Stack direction=\"row\" alignItems=\"center\">\n {/** solely for screen readers, if not present, a11y issues are raised */}\n <VisuallyHidden>\n <Heading />\n </VisuallyHidden>\n {/* @ts-expect-error - custom-context will add aria-label via the \"slot\" prop */}\n <IconButton\n slot={showRangeLabel ? \"previous\" : \"previous-month\"}\n size=\"xs\"\n variant=\"ghost\"\n tone=\"primary\"\n >\n <KeyboardArrowLeft />\n </IconButton>\n <Text\n textStyle=\"sm\"\n fontWeight=\"500\"\n color=\"neutral.11\"\n width={showRangeLabel ? \"4000\" : \"2000\"}\n textAlign=\"center\"\n aria-hidden=\"true\"\n slot={showRangeLabel ? \"monthRange\" : \"month\"}\n />\n {/* @ts-expect-error - custom-context will add aria-label via the \"slot\" prop */}\n <IconButton\n slot={showRangeLabel ? \"next\" : \"next-month\"}\n size=\"xs\"\n variant=\"ghost\"\n tone=\"primary\"\n >\n <KeyboardArrowRight />\n </IconButton>\n </Stack>\n <Box flexGrow=\"1\" />\n <Stack direction=\"row\" alignItems=\"center\">\n {/* @ts-expect-error - custom-context will add aria-label via the \"slot\" prop */}\n <IconButton\n slot=\"previous-year\"\n size=\"xs\"\n variant=\"ghost\"\n tone=\"primary\"\n >\n <KeyboardArrowLeft />\n </IconButton>\n <Text\n textStyle=\"sm\"\n fontWeight=\"500\"\n color=\"neutral.11\"\n width=\"1400\"\n textAlign=\"center\"\n aria-hidden=\"true\"\n slot=\"year\"\n />\n {/* @ts-expect-error - custom-context will add aria-label via the \"slot\" prop */}\n <IconButton slot=\"next-year\" size=\"xs\" variant=\"ghost\" tone=\"primary\">\n <KeyboardArrowRight />\n </IconButton>\n </Stack>\n </Flex>\n </CalendarHeaderSlot>\n );\n};\n","import { getLocalTimeZone } from \"@internationalized/date\";\nimport { useContext } from \"react\";\nimport {\n Provider,\n ButtonContext,\n CalendarStateContext,\n TextContext,\n useLocale,\n} from \"react-aria-components\";\n\nexport const CalendarCustomContext = ({\n children,\n}: {\n children: React.ReactNode;\n}) => {\n const { locale } = useLocale();\n const buttonContext = useContext(ButtonContext)!;\n const textContext = useContext(TextContext)!;\n const calendarState = useContext(CalendarStateContext)!;\n\n /**\n * Button slots\n * ================================\n */\n const buttonSlots = {\n \"next-month\": {\n onPress: () => calendarState.focusNextSection(),\n \"aria-label\": \"Next month\",\n },\n \"previous-month\": {\n onPress: () => calendarState.focusPreviousSection(),\n \"aria-label\": \"Previous month\",\n },\n \"next-year\": {\n onPress: () => calendarState.focusNextSection(true),\n \"aria-label\": \"Next year\",\n },\n \"previous-year\": {\n onPress: () => calendarState.focusPreviousSection(true),\n \"aria-label\": \"Previous year\",\n },\n };\n\n /**\n * Text slots\n * ================================\n */\n const monthLabel = new Intl.DateTimeFormat(locale, {\n month: \"long\",\n }).format(calendarState.focusedDate.toDate(getLocalTimeZone()));\n\n const monthRangeLabel = [\n new Intl.DateTimeFormat(locale, {\n month: \"long\",\n }).format(calendarState.visibleRange.start.toDate(getLocalTimeZone())),\n new Intl.DateTimeFormat(locale, {\n month: \"long\",\n }).format(calendarState.visibleRange.end.toDate(getLocalTimeZone())),\n ].join(\" - \");\n\n const yearLabel = new Intl.DateTimeFormat(locale, {\n year: \"numeric\",\n }).format(calendarState.focusedDate.toDate(getLocalTimeZone()));\n\n const textSlots = {\n month: { children: monthLabel },\n monthRange: { children: monthRangeLabel },\n year: { children: yearLabel },\n };\n\n return (\n <Provider\n values={[\n [\n ButtonContext,\n {\n ...buttonContext,\n slots: {\n ...(buttonContext &&\n typeof buttonContext === \"object\" &&\n \"slots\" in buttonContext\n ? buttonContext.slots\n : {}),\n ...buttonSlots,\n },\n },\n ],\n [\n TextContext,\n {\n ...textContext,\n slots: {\n ...(textContext &&\n typeof textContext === \"object\" &&\n \"slots\" in textContext\n ? textContext.slots\n : {}),\n ...textSlots,\n },\n },\n ],\n ]}\n >\n {children}\n </Provider>\n );\n};\n","import type { CalendarProps } from \"./calendar.types\";\nimport type { DateValue } from \"react-aria\";\n\nimport { Calendar as RaCalendar } from \"react-aria-components\";\n\nimport { CalendarRootSlot } from \"./calendar.slots\";\nimport { CalendarGrids } from \"./components/calendar.grids\";\nimport { CalendarHeader } from \"./components/calendar.header\";\nimport { calendarSlotRecipe } from \"./calendar.recipe\";\nimport { useRecipe } from \"@chakra-ui/react/styled-system\";\nimport { extractStyleProps } from \"@/utils/extractStyleProps\";\nimport { CalendarCustomContext } from \"./components/calendar.custom-context\";\n\n/**\n * # Calendar\n *\n * Calendars display a grid of days in one or more months and allow users to select a single date.\n *\n * @see {@link https://nimbus-documentation.vercel.app/components/inputs/calendar}\n */\nexport const Calendar = (props: CalendarProps<DateValue>) => {\n const recipe = useRecipe({ recipe: calendarSlotRecipe });\n const [recipeProps, remainingProps] = recipe.splitVariantProps(props);\n const [styleProps, otherProps] = extractStyleProps(remainingProps);\n\n return (\n <CalendarRootSlot {...recipeProps} {...styleProps} asChild>\n <RaCalendar {...otherProps}>\n <CalendarCustomContext>\n <CalendarHeader />\n <CalendarGrids />\n </CalendarCustomContext>\n </RaCalendar>\n </CalendarRootSlot>\n );\n};\n"],"names":["withProvider","withContext","createSlotRecipeContext","CalendarRootSlot","CalendarHeaderSlot","CalendarGridsSlot","CalendarMonthTitleSlot","CalendarGridSlot","CalendarGridHeaderSlot","CalendarHeaderCellSlot","CalendarGridBodySlot","CalendarCellSlot","CalendarGrids","locale","useLocale","context","useSlottedContext","CalendarContext","calendarState","useContext","CalendarStateContext","visibleMonthsCount","todayDate","today","getLocalTimeZone","showMonthTitles","jsx","_","index","gridDate","monthName","jsxs","Box","RaCalendarGrid","RaCalendarGridHeader","day","RaCalendarHeaderCell","RaCalendarGridBody","date","isToday","RaCalendarCell","CalendarHeader","showRangeLabel","Flex","Stack","VisuallyHidden","Heading","IconButton","KeyboardArrowLeft","Text","KeyboardArrowRight","CalendarCustomContext","children","buttonContext","ButtonContext","textContext","TextContext","buttonSlots","monthLabel","monthRangeLabel","yearLabel","textSlots","Provider","Calendar","props","recipe","useRecipe","calendarSlotRecipe","recipeProps","remainingProps","styleProps","otherProps","extractStyleProps","RaCalendar"],"mappings":"ouBAcM,CAAE,aAAAA,EAAc,YAAAC,CAAA,EAAgBC,0BAAwB,CAC5D,IAAK,UACP,CAAC,EAEYC,EAGTH,EAAoD,MAAO,MAAM,EAExDI,EAAqBH,EAGhC,MAAO,QAAQ,EAEJI,EAAoBJ,EAG/B,MAAO,OAAO,EAEHK,EAAyBL,EAGpC,MAAO,YAAY,EAERM,EAAmBN,E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,CAEJ"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"calendar-lD6G93R9.es.js","sources":["../../src/components/calendar/calendar.slots.tsx","../../src/components/calendar/components/calendar.grids.tsx","../../src/components/calendar/components/calendar.header.tsx","../../src/components/calendar/components/calendar.custom-context.tsx","../../src/components/calendar/calendar.tsx"],"sourcesContent":["import { createSlotRecipeContext } from \"@chakra-ui/react\";\nimport type {\n CalendarCellSlotProps,\n CalendarGridBodySlotProps,\n CalendarGridHeaderSlotProps,\n CalendarGridSlotProps,\n CalendarGridsSlotProps,\n CalendarHeaderCellSlotProps,\n CalendarHeaderSlotProps,\n CalendarMonthTitleSlotProps,\n CalendarRootSlotProps,\n} from \"./calendar.types\";\nimport type { SlotComponent } from \"@/utils/slot-types\";\n\nconst { withProvider, withContext } = createSlotRecipeContext({\n key: \"calendar\",\n});\n\nexport const CalendarRootSlot: SlotComponent<\n HTMLDivElement,\n CalendarRootSlotProps\n> = withProvider<HTMLDivElement, CalendarRootSlotProps>(\"div\", \"root\");\n\nexport const CalendarHeaderSlot = withContext<\n HTMLDivElement,\n CalendarHeaderSlotProps\n>(\"div\", \"header\");\n\nexport const CalendarGridsSlot = withContext<\n HTMLDivElement,\n CalendarGridsSlotProps\n>(\"div\", \"grids\");\n\nexport const CalendarMonthTitleSlot = withContext<\n HTMLDivElement,\n CalendarMonthTitleSlotProps\n>(\"div\", \"monthTitle\");\n\nexport const CalendarGridSlot = withContext<\n HTMLTableElement,\n CalendarGridSlotProps\n>(\"table\", \"grid\");\n\nexport const CalendarGridHeaderSlot = withContext<\n HTMLTableSectionElement,\n CalendarGridHeaderSlotProps\n>(\"thead\", \"gridHeader\");\n\nexport const CalendarHeaderCellSlot = withContext<\n HTMLTableCellElement,\n CalendarHeaderCellSlotProps\n>(\"th\", \"headerCell\");\n\nexport const CalendarGridBodySlot = withContext<\n HTMLTableSectionElement,\n CalendarGridBodySlotProps\n>(\"tbody\", \"gridBody\");\n\nexport const CalendarCellSlot = withContext<\n HTMLTableCellElement,\n CalendarCellSlotProps\n>(\"td\", \"bodyCell\");\n","import { useContext } from \"react\";\nimport { today, getLocalTimeZone } from \"@internationalized/date\";\nimport {\n CalendarGrid as RaCalendarGrid,\n CalendarGridBody as RaCalendarGridBody,\n CalendarGridHeader as RaCalendarGridHeader,\n CalendarHeaderCell as RaCalendarHeaderCell,\n CalendarCell as RaCalendarCell,\n useSlottedContext,\n CalendarContext,\n CalendarStateContext,\n useLocale,\n} from \"react-aria-components\";\n\nimport { Box } from \"@/components\";\n\nimport {\n CalendarCellSlot,\n CalendarGridBodySlot,\n CalendarGridHeaderSlot,\n CalendarGridSlot,\n CalendarGridsSlot,\n CalendarHeaderCellSlot,\n CalendarMonthTitleSlot,\n} from \"../calendar.slots\";\n\nexport const CalendarGrids = () => {\n const { locale } = useLocale();\n const context = useSlottedContext(CalendarContext);\n const calendarState = useContext(CalendarStateContext)!;\n const visibleMonthsCount = context?.visibleDuration?.months || 1;\n const todayDate = today(getLocalTimeZone());\n const showMonthTitles = visibleMonthsCount > 1;\n\n return (\n <CalendarGridsSlot>\n {Array.from({ length: visibleMonthsCount }, (_, index) => {\n const gridDate = calendarState.visibleRange.start.add({\n months: index,\n });\n const monthName = new Intl.DateTimeFormat(locale, {\n month: \"long\",\n }).format(gridDate.toDate(getLocalTimeZone()));\n\n return (\n <Box\n key={monthName}\n width={visibleMonthsCount == 1 ? \"full\" : \"auto\"}\n >\n {showMonthTitles && (\n <CalendarMonthTitleSlot>{monthName}</CalendarMonthTitleSlot>\n )}\n <CalendarGridSlot asChild>\n <RaCalendarGrid offset={{ months: index }} weekdayStyle=\"short\">\n <CalendarGridHeaderSlot asChild>\n <RaCalendarGridHeader>\n {(day) => (\n <CalendarHeaderCellSlot asChild>\n <RaCalendarHeaderCell>{day}</RaCalendarHeaderCell>\n </CalendarHeaderCellSlot>\n )}\n </RaCalendarGridHeader>\n </CalendarGridHeaderSlot>\n <CalendarGridBodySlot asChild>\n <RaCalendarGridBody>\n {(date) => {\n const isToday = date.compare(todayDate) === 0;\n return (\n <CalendarCellSlot asChild data-today={isToday}>\n <RaCalendarCell date={date} />\n </CalendarCellSlot>\n );\n }}\n </RaCalendarGridBody>\n </CalendarGridBodySlot>\n </RaCalendarGrid>\n </CalendarGridSlot>\n </Box>\n );\n })}\n </CalendarGridsSlot>\n );\n};\n","import {\n CalendarContext,\n Heading,\n useSlottedContext,\n} from \"react-aria-components\";\nimport {\n Box,\n Flex,\n IconButton,\n Stack,\n Text,\n VisuallyHidden,\n} from \"@/components\";\nimport {\n KeyboardArrowLeft,\n KeyboardArrowRight,\n} from \"@commercetools/nimbus-icons\";\nimport { CalendarHeaderSlot } from \"../calendar.slots\";\n\nexport const CalendarHeader = () => {\n const calendarProps = useSlottedContext(CalendarContext);\n\n // Needed to decide wether to show a single month or a range\n const visibleDurationMonths = calendarProps?.visibleDuration?.months || 1;\n const showRangeLabel = visibleDurationMonths > 1;\n\n return (\n <CalendarHeaderSlot>\n <Flex>\n <Stack direction=\"row\" alignItems=\"center\">\n {/** solely for screen readers, if not present, a11y issues are raised */}\n <VisuallyHidden>\n <Heading />\n </VisuallyHidden>\n {/* @ts-expect-error - custom-context will add aria-label via the \"slot\" prop */}\n <IconButton\n slot={showRangeLabel ? \"previous\" : \"previous-month\"}\n size=\"xs\"\n variant=\"ghost\"\n tone=\"primary\"\n >\n <KeyboardArrowLeft />\n </IconButton>\n <Text\n textStyle=\"sm\"\n fontWeight=\"500\"\n color=\"neutral.11\"\n width={showRangeLabel ? \"4000\" : \"2000\"}\n textAlign=\"center\"\n aria-hidden=\"true\"\n slot={showRangeLabel ? \"monthRange\" : \"month\"}\n />\n {/* @ts-expect-error - custom-context will add aria-label via the \"slot\" prop */}\n <IconButton\n slot={showRangeLabel ? \"next\" : \"next-month\"}\n size=\"xs\"\n variant=\"ghost\"\n tone=\"primary\"\n >\n <KeyboardArrowRight />\n </IconButton>\n </Stack>\n <Box flexGrow=\"1\" />\n <Stack direction=\"row\" alignItems=\"center\">\n {/* @ts-expect-error - custom-context will add aria-label via the \"slot\" prop */}\n <IconButton\n slot=\"previous-year\"\n size=\"xs\"\n variant=\"ghost\"\n tone=\"primary\"\n >\n <KeyboardArrowLeft />\n </IconButton>\n <Text\n textStyle=\"sm\"\n fontWeight=\"500\"\n color=\"neutral.11\"\n width=\"1400\"\n textAlign=\"center\"\n aria-hidden=\"true\"\n slot=\"year\"\n />\n {/* @ts-expect-error - custom-context will add aria-label via the \"slot\" prop */}\n <IconButton slot=\"next-year\" size=\"xs\" variant=\"ghost\" tone=\"primary\">\n <KeyboardArrowRight />\n </IconButton>\n </Stack>\n </Flex>\n </CalendarHeaderSlot>\n );\n};\n","import { getLocalTimeZone } from \"@internationalized/date\";\nimport { useContext } from \"react\";\nimport {\n Provider,\n ButtonContext,\n CalendarStateContext,\n TextContext,\n useLocale,\n} from \"react-aria-components\";\n\nexport const CalendarCustomContext = ({\n children,\n}: {\n children: React.ReactNode;\n}) => {\n const { locale } = useLocale();\n const buttonContext = useContext(ButtonContext)!;\n const textContext = useContext(TextContext)!;\n const calendarState = useContext(CalendarStateContext)!;\n\n /**\n * Button slots\n * ================================\n */\n const buttonSlots = {\n \"next-month\": {\n onPress: () => calendarState.focusNextSection(),\n \"aria-label\": \"Next month\",\n },\n \"previous-month\": {\n onPress: () => calendarState.focusPreviousSection(),\n \"aria-label\": \"Previous month\",\n },\n \"next-year\": {\n onPress: () => calendarState.focusNextSection(true),\n \"aria-label\": \"Next year\",\n },\n \"previous-year\": {\n onPress: () => calendarState.focusPreviousSection(true),\n \"aria-label\": \"Previous year\",\n },\n };\n\n /**\n * Text slots\n * ================================\n */\n const monthLabel = new Intl.DateTimeFormat(locale, {\n month: \"long\",\n }).format(calendarState.focusedDate.toDate(getLocalTimeZone()));\n\n const monthRangeLabel = [\n new Intl.DateTimeFormat(locale, {\n month: \"long\",\n }).format(calendarState.visibleRange.start.toDate(getLocalTimeZone())),\n new Intl.DateTimeFormat(locale, {\n month: \"long\",\n }).format(calendarState.visibleRange.end.toDate(getLocalTimeZone())),\n ].join(\" - \");\n\n const yearLabel = new Intl.DateTimeFormat(locale, {\n year: \"numeric\",\n }).format(calendarState.focusedDate.toDate(getLocalTimeZone()));\n\n const textSlots = {\n month: { children: monthLabel },\n monthRange: { children: monthRangeLabel },\n year: { children: yearLabel },\n };\n\n return (\n <Provider\n values={[\n [\n ButtonContext,\n {\n ...buttonContext,\n slots: {\n ...(buttonContext &&\n typeof buttonContext === \"object\" &&\n \"slots\" in buttonContext\n ? buttonContext.slots\n : {}),\n ...buttonSlots,\n },\n },\n ],\n [\n TextContext,\n {\n ...textContext,\n slots: {\n ...(textContext &&\n typeof textContext === \"object\" &&\n \"slots\" in textContext\n ? textContext.slots\n : {}),\n ...textSlots,\n },\n },\n ],\n ]}\n >\n {children}\n </Provider>\n );\n};\n","import type { CalendarProps } from \"./calendar.types\";\nimport type { DateValue } from \"react-aria\";\n\nimport { Calendar as RaCalendar } from \"react-aria-components\";\n\nimport { CalendarRootSlot } from \"./calendar.slots\";\nimport { CalendarGrids } from \"./components/calendar.grids\";\nimport { CalendarHeader } from \"./components/calendar.header\";\nimport { calendarSlotRecipe } from \"./calendar.recipe\";\nimport { useRecipe } from \"@chakra-ui/react/styled-system\";\nimport { extractStyleProps } from \"@/utils/extractStyleProps\";\nimport { CalendarCustomContext } from \"./components/calendar.custom-context\";\n\n/**\n * # Calendar\n *\n * Calendars display a grid of days in one or more months and allow users to select a single date.\n *\n * @see {@link https://nimbus-documentation.vercel.app/components/inputs/calendar}\n */\nexport const Calendar = (props: CalendarProps<DateValue>) => {\n const recipe = useRecipe({ recipe: calendarSlotRecipe });\n const [recipeProps, remainingProps] = recipe.splitVariantProps(props);\n const [styleProps, otherProps] = extractStyleProps(remainingProps);\n\n return (\n <CalendarRootSlot {...recipeProps} {...styleProps} asChild>\n <RaCalendar {...otherProps}>\n <CalendarCustomContext>\n <CalendarHeader />\n <CalendarGrids />\n </CalendarCustomContext>\n </RaCalendar>\n </CalendarRootSlot>\n );\n};\n"],"names":["withProvider","withContext","createSlotRecipeContext","CalendarRootSlot","CalendarHeaderSlot","CalendarGridsSlot","CalendarMonthTitleSlot","CalendarGridSlot","CalendarGridHeaderSlot","CalendarHeaderCellSlot","CalendarGridBodySlot","CalendarCellSlot","CalendarGrids","locale","useLocale","context","useSlottedContext","CalendarContext","calendarState","useContext","CalendarStateContext","visibleMonthsCount","todayDate","today","getLocalTimeZone","showMonthTitles","jsx","_","index","gridDate","monthName","jsxs","Box","RaCalendarGrid","RaCalendarGridHeader","day","RaCalendarHeaderCell","RaCalendarGridBody","date","isToday","RaCalendarCell","CalendarHeader","showRangeLabel","Flex","Stack","VisuallyHidden","Heading","IconButton","KeyboardArrowLeft","Text","KeyboardArrowRight","CalendarCustomContext","children","buttonContext","ButtonContext","textContext","TextContext","buttonSlots","monthLabel","monthRangeLabel","yearLabel","textSlots","Provider","Calendar","props","recipe","useRecipe","calendarSlotRecipe","recipeProps","remainingProps","styleProps","otherProps","extractStyleProps","RaCalendar"],"mappings":";;;;;;;;;;;;;;;;;;;AAcA,MAAM,EAAE,cAAAA,GAAc,aAAAC,EAAA,IAAgB,gBAAAC,EAAwB;AAAA,EAC5D,KAAK;AACP,CAAC,GAEYC,IAGT,gBAAAH,EAAoD,OAAO,MAAM,GAExDI,IAAqB,gBAAAH,EAGhC,OAAO,QAAQ,GAEJI,IAAoB,gBAAAJ,EAG/B,OAAO,OAAO,GAEHK,IAAyB,gBAAAL,EAGpC,OAAO,YAAY,GAERM,IAAmB,gBAAAN,EAG9B,SAAS,MAAM,GAEJO,IAAyB,gBAAAP,EAGpC,SAAS,YAAY,GAEVQ,IAAyB,gBAAAR,EAGpC,MAAM,YAAY,GAEPS,IAAuB,gBAAAT,EAGlC,SAAS,UAAU,GAERU,IAAmB,gBAAAV,EAG9B,MAAM,UAAU,GCnCLW,KAAgB,MAAM;AACjC,QAAM,EAAE,QAAAC,EAAA,IAAWC,EAAA,GACbC,IAAUC,EAAk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AO,kBAAkBD,CAAK,GAC9D,CAACM,GAAYC,CAAU,IAAIC,EAAkBH,CAAc;AAEjE,SACE,gBAAA3C,EAACvB,GAAA,EAAkB,GAAGiE,GAAc,GAAGE,GAAY,SAAO,IACxD,UAAA,gBAAA5C,EAAC+C,GAAA,EAAY,GAAGF,GACd,4BAACpB,IAAA,EACC,UAAA;AAAA,IAAA,gBAAAzB,EAACe,IAAA,EAAe;AAAA,sBACf7B,IAAA,CAAA,CAAc;AAAA,EAAA,EAAA,CACjB,GACF,GACF;AAEJ;"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";const P=require("react/jsx-runtime"),M=require("@chakra-ui/react/styled-system"),C=require("@commercetools/nimbus-icons"),_=require("./extractStyleProps-Dk3fpLyQ.cjs.js"),w=require("@chakra-ui/react"),H=require("./RSPContexts-BdKenzIN.cjs.js"),R=require("./utils-BHdR5Nww.cjs.js"),T=require("./Form-BuOomA4T.cjs.js"),p=require("./mergeProps-BA5Cwf5w.cjs.js"),N=require("./filterDOMProps-WUskt27c.cjs.js"),L=require("./useObjectRef-dXOJdONs.cjs.js"),o=require("react"),q=require("./useFormValidation-STNSjSmx.cjs.js"),W=require("./usePress-D5REDWI3.cjs.js"),z=require("./useToggle-BXaU8bD5.cjs.js"),D=require("./useToggleState-Dl-o05wQ.cjs.js"),A=require("./useFocusRing-BuJmrp03.cjs.js"),G=require("./useHover-271zEzph.cjs.js"),J=require("./VisuallyHidden-C1WQXLCm.cjs.js");function k(i,e,a){let r=q.$e5be200c675c3b3a$export$fc1a364ae1f3ff10({...i,value:e.isSelected}),{isInvalid:x,validationErrors:m,validationDetails:u}=r.displayValidation,{labelProps:f,inputProps:s,isSelected:d,isPressed:t,isDisabled:$,isReadOnly:b}=z.$d2c8e2b0480f3f34$export$cbe85ee05b554577({...i,isInvalid:x},e,a);q.$e93e671b31057976$export$b8473d3665f3a75a(i,r,a);let{isIndeterminate:v,isRequired:l,validationBehavior:c="aria"}=i;o.useEffect(()=>{a.current&&(a.current.indeterminate=!!v)});let{pressProps:h}=W.$f6c31cce2adf654f$export$45712eceda6fad21({isDisabled:$||b,onPress(){let{[q.$e5be200c675c3b3a$export$a763b9476acd3eb]:n}=i,{commitValidation:y}=n||r;y()}});return{labelProps:p.$3ef42575df84b30b$export$9d1611c77c2fe928(f,h,o.useMemo(()=>({onMouseDown:n=>n.preventDefault()}),[])),inputProps:{...s,checked:d,"aria-required":l&&c==="aria"||void 0,required:l&&c==="native"},isSelected:d,isPressed:t,isDisabled:$,isReadOnly:b,isInvalid:x,validationErrors:m,validationDetails:u}}const K=new WeakMap;function Q(i,e,a){const r=D.$3017fa7ffdddec74$export$8042c6c013fd5226({isReadOnly:i.isReadOnly||e.isReadOnly,isSelected:e.isSelected(i.value),defaultSelected:e.defaultValue.includes(i.value),onChange(n){n?e.addValue(i.value):e.removeValue(i.value),i.onChange&&i.onChange(n)}});let{name:x,form:m,descriptionId:u,errorMessageId:f,validationBehavior:s}=K.get(e);var d;s=(d=i.validationBehavior)!==null&&d!==void 0?d:s;let{realtimeValidation:t}=q.$e5be200c675c3b3a$export$fc1a364ae1f3ff10({...i,value:r.isSelected,name:void 0,validationBehavior:"aria"}),$=o.useRef(q.$e5be200c675c3b3a$export$dad6ae84456c676a),b=()=>{e.setInvalid(i.value,t.isInvalid?t:$.current)};o.useEffect(b);let v=e.realtimeValidation.isInvalid?e.realtimeValidation:t,l=s==="native"?e.displayValidation:v;var c;let h=k({...i,isReadOnly:i.isReadOnly||e.isReadOnly,isDisabled:i.isDisabled||e.isDisabled,name:i.name||x,form:i.form||m,isRequired:(c=i.isRequired)!==null&&c!==void 0?c:e.isRequired,validationBehavior:s,[q.$e5be200c675c3b3a$export$a763b9476acd3eb]:{realtimeValidation:v,displayValidation:l,resetValidation:e.resetValidation,commitValidation:e.commitValidation,updateValidation(n){$.current=n,b()}}},r,a);return{...h,inputProps:{...h.inputProps,"aria-describedby":[i["aria-describedby"],e.isInvalid?f:null,u].filter(Boolean).join(" ")||void 0}}}const U=o.createContext(null),X=o.forwardRef(function(e,a){let{inputRef:r=null,...x}=e;[e,a]=R.$64fa3d84918910a7$export$29f1550f4b0d4415(x,a,H.$4e85f108e88277b8$export$b085522c77523c51);let{validationBehavior:m}=R.$64fa3d84918910a7$export$fabf2dc03a41866e(T.$d3e0e05bdfcf66bd$export$c24727297075ec6a)||{};var u,f;let s=(f=(u=e.validationBehavior)!==null&&u!==void 0?u:m)!==null&&f!==void 0?f:"native",d=o.useContext(U),t=L.$df56164dff5785e2$export$4338b53315abf666(o.useMemo(()=>R.$5dc95899b306f630$export$c9058316764c140e(r,e.inputRef!==void 0?e.inputRef:null),[r,e.inputRef])),{labelProps:$,inputProps:b,isSelected:v,isDisabled:l,isReadOnly:c,isPressed:h,isInvalid:n}=d?Q({...R.$64fa3d84918910a7$export$ef03459518577ad4(e),value:e.value,children:typeof e.children=="function"?!0:e.children},d,t):k({...R.$64fa3d84918910a7$export$ef03459518577ad4(e),children:typeof e.children=="function"?!0:e.children,validationBehavior:s},D.$3017fa7ffdddec74$export$8042c6c013fd5226(e),t),{isFocused:y,isFocusVisible:I,focusProps:F}=A.$f7dceffc5ad7768b$export$4e328f61c538687f(),j=l||c,{hoverProps:E,isHovered:S}=G.$6179b936705e76d3$export$ae780daf29e6d456({...e,isDisabled:j}),g=R.$64fa3d84918910a7$export$4d86445c2cf5e3({...e,defaultClassName:"react-aria-Checkbox",values:{isSelected:v,isIndeterminate:e.isIndeterminate||!1,isPressed:h,isHovered:S,isFocused:y,isFocusVisible:I,isDisabled:l,isReadOnly:c,isInvalid:n,isRequired:e.isRequired||!1}}),V=N.$65484d02dcb7eb3e$export$457c3d6518dd4c6f(e,{global:!0});return delete V.id,delete V.onClick,o.createElement("label",{...p.$3ef42575df84b30b$export$9d1611c77c2fe928(V,$,E,g),ref:a,slot:e.slot||void 0,"data-selected":v||void 0,"data-indeterminate":e.isIndeterminate||void 0,"data-pressed":h||void 0,"data-hovered":S||void 0,"data-focused":y||void 0,"data-focus-visible":I||void 0,"data-disabled":l||void 0,"data-readonly":c||void 0,"data-invalid":n||void 0,"data-required":e.isRequired||void 0},o.createElement(J.$5c3e21d68f1c4674$export$439d29a4e110a164,{elementType:"span"},o.createElement("input",{...p.$3ef42575df84b30b$export$9d1611c77c2fe928(b,F),ref:t})),g.children)}),{withProvider:Y,withContext:B}=w.createSlotRecipeContext({key:"checkbox"}),Z=Y(X,"root"),ee=B("span","label"),ie=B("span","indicator"),O=i=>{const{ref:e,children:a,...r}=i,x=M.useSlotRecipe({key:"checkbox"}),[m,u]=x.splitVariantProps(r),[f,s]=_.extractStyleProps(u);return P.jsx(Z,{ref:e,"data-slot":"root",...s,...m,...f,children:({isSelected:d,isIndeterminate:t,isInvalid:$,isDisabled:b,isFocused:v})=>{const l={"data-selected":d,"data-indeterminate":t,"data-invalid":$,"data-disabled":b,"data-focus":v||void 0};return P.jsxs(P.Fragment,{children:[P.jsxs(ie,{"data-slot":"indicator",...l,children:[d&&P.jsx(C.Check,{}),t&&P.jsx(C.Remove,{})]}),a&&P.jsx(ee,{"data-slot":"label",...l,children:a})]})}})};O.displayName="Checkbox";exports.Checkbox=O;
|
|
2
|
-
//# sourceMappingURL=checkbox-Dod-yTj4.cjs.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";const o=require("react/jsx-runtime"),t=require("react"),d=require("@chakra-ui/react"),u=require("./useDisclosureState-ipt8A1Kc.cjs.js"),g=require("./Button-CFZnLKVR.cjs.js"),h=require("@chakra-ui/react/styled-system"),j=require("./extractStyleProps-Dk3fpLyQ.cjs.js"),q=require("./mergeProps-BA5Cwf5w.cjs.js"),y=require("./useObjectRef-dXOJdONs.cjs.js"),f=t.createContext(void 0);function b(){const e=t.useContext(f);if(e===void 0)throw new Error("useCollapsibleMotionContext must be used within a CollapsibleMotion.Root component");return e}const{withProvider:S,withContext:x}=d.createSlotRecipeContext({key:"collapsibleMotion"}),w=S("div","root"),v=x("button","trigger"),E=x("div","content"),C=t.forwardRef(({children:e,defaultExpanded:r=!1,isExpanded:i,onExpandedChange:l,isDisabled:n=!1,...a},s)=>{const c=u.$bf996d45f4a36925$export$3fcbf6e4407997e0({defaultExpanded:r,isExpanded:i,onExpandedChange:l}),p=t.useRef(null),{buttonProps:$,panelProps:m}=u.$5e910fae8e128ead$export$6e3e27031a30522f({isDisabled:n},c,p),P={isDisabled:n,isExpanded:c.isExpanded,buttonProps:$,panelProps:m,panelRef:p};return o.jsx(f.Provider,{value:P,children:o.jsx(w,{ref:s,...a,children:e})})});C.displayName="CollapsibleMotion.Root";const R=t.forwardRef(({children:e,asChild:r,...i},l)=>{const{buttonProps:n,isDisabled:a}=b(),s=q.$3ef42575df84b30b$export$9d1611c77c2fe928(i,n,{disabled:a});if(r)return o.jsx(h.chakra.button,{asChild:!0,...s,children:e});const[c,p]=j.extractStyleProps(s);return o.jsx(v,{ref:l,...c,asChild:!0,children:o.jsx(g.$d2b4bc8c273e7be6$export$353f5b6fc5456de1,{...p,children:e})})});R.displayName="CollapsibleMotion.Trigger";const M=t.forwardRef(({children:e,...r},i)=>{const{panelProps:l,isExpanded:n}=b(),a=t.useRef(null),s=y.$df56164dff5785e2$export$4338b53315abf666(d.mergeRefs(a,i));return o.jsx(E,{ref:s,...r,...l,asChild:!0,children:o.jsx(d.Presence,{present:n,animationName:{_open:"slide-from-top, fade-in",_closed:"slide-to-top, fade-out"},animationDuration:"fast",children:e})})});M.displayName="CollapsibleMotion.Content";const N={Root:C,Trigger:R,Content:M};exports.CollapsibleMotion=N;
|
|
2
|
-
//# sourceMappingURL=collapsible-motion-C7M_CLNI.cjs.js.map
|