@commercetools/nimbus 2.0.1-rc1 → 2.0.1-rc3
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/{Button-CrgZzRm9.es.js → Button-Dx3xzN8n.es.js} +2 -2
- package/dist/chunks/{Button-CrgZzRm9.es.js.map → Button-Dx3xzN8n.es.js.map} +1 -1
- package/dist/chunks/{DateField-qGypjFaJ.es.js → DateField-DZwn3cIj.es.js} +3 -3
- package/dist/chunks/{DateField-qGypjFaJ.es.js.map → DateField-DZwn3cIj.es.js.map} +1 -1
- package/dist/chunks/{DatePicker-Dn0LNd7V.es.js → DatePicker-B2Nf_0Sq.es.js} +6 -6
- package/dist/chunks/{DatePicker-Dn0LNd7V.es.js.map → DatePicker-B2Nf_0Sq.es.js.map} +1 -1
- package/dist/chunks/{Dialog-B2hCMJnM.es.js → Dialog-Qpq4hk89.es.js} +6 -6
- package/dist/chunks/{Dialog-B2hCMJnM.es.js.map → Dialog-Qpq4hk89.es.js.map} +1 -1
- package/dist/chunks/{Header-B4V0zxSN.es.js → Header-DFcQWjkP.es.js} +3 -3
- package/dist/chunks/{Header-B4V0zxSN.es.js.map → Header-DFcQWjkP.es.js.map} +1 -1
- package/dist/chunks/{Heading-CfiWDgRZ.es.js → Heading-DFiVmZUR.es.js} +4 -4
- package/dist/chunks/{Heading-CfiWDgRZ.es.js.map → Heading-DFiVmZUR.es.js.map} +1 -1
- package/dist/chunks/{ListBox-DAcVFwWW.es.js → ListBox-_1Uk-5-7.es.js} +6 -6
- package/dist/chunks/{ListBox-DAcVFwWW.es.js.map → ListBox-_1Uk-5-7.es.js.map} +1 -1
- package/dist/chunks/{ListKeyboardDelegate-D-k0fIME.es.js → ListKeyboardDelegate-ByRdSpOe.es.js} +2 -2
- package/dist/chunks/{ListKeyboardDelegate-D-k0fIME.es.js.map → ListKeyboardDelegate-ByRdSpOe.es.js.map} +1 -1
- package/dist/chunks/{Modal-D91zBjIP.es.js → Modal-DZrVgGsJ.es.js} +3 -3
- package/dist/chunks/{Modal-D91zBjIP.es.js.map → Modal-DZrVgGsJ.es.js.map} +1 -1
- package/dist/chunks/{SelectionManager-2q7N4psD.es.js → SelectionManager-DMLLo5N3.es.js} +3 -3
- package/dist/chunks/{SelectionManager-2q7N4psD.es.js.map → SelectionManager-DMLLo5N3.es.js.map} +1 -1
- package/dist/chunks/{ToggleButton-Cj9AtHpY.es.js → ToggleButton-881iW8P_.es.js} +2 -2
- package/dist/chunks/{ToggleButton-Cj9AtHpY.es.js.map → ToggleButton-881iW8P_.es.js.map} +1 -1
- package/dist/chunks/accordion-B2FLWAh5.cjs.js.map +1 -1
- package/dist/chunks/{accordion-DSLccfDW.es.js → accordion-CKDnNkVv.es.js} +2 -2
- package/dist/chunks/accordion-CKDnNkVv.es.js.map +1 -0
- package/dist/chunks/{alert-Cz2mnKir.es.js → alert-lNg0Rz2w.es.js} +2 -2
- package/dist/chunks/{alert-Cz2mnKir.es.js.map → alert-lNg0Rz2w.es.js.map} +1 -1
- package/dist/chunks/{button-Cnui897Z.es.js → button-IZUJaJku.es.js} +3 -3
- package/dist/chunks/{button-Cnui897Z.es.js.map → button-IZUJaJku.es.js.map} +1 -1
- package/dist/chunks/calendar-V0KeNCQ3.cjs.js.map +1 -1
- package/dist/chunks/{calendar-BTdHdh7y.es.js → calendar-lD6G93R9.es.js} +5 -5
- package/dist/chunks/calendar-lD6G93R9.es.js.map +1 -0
- package/dist/chunks/{checkbox-Bm4Yqa_0.es.js → checkbox-BB-WJdal.es.js} +3 -3
- package/dist/chunks/{checkbox-Bm4Yqa_0.es.js.map → checkbox-BB-WJdal.es.js.map} +1 -1
- package/dist/chunks/collapsible-motion-C7M_CLNI.cjs.js.map +1 -1
- package/dist/chunks/{collapsible-motion-OOUmjdKw.es.js → collapsible-motion-CSrKjF8X.es.js} +2 -2
- package/dist/chunks/collapsible-motion-CSrKjF8X.es.js.map +1 -0
- package/dist/chunks/combobox-B5UxZWSX.cjs.js.map +1 -1
- package/dist/chunks/{combobox-Ch4VokC9.es.js → combobox-D_7gr3DY.es.js} +13 -13
- package/dist/chunks/{combobox-Ch4VokC9.es.js.map → combobox-D_7gr3DY.es.js.map} +1 -1
- package/dist/chunks/{data-table-DC369pb3.es.js → data-table-ClMivKY1.es.js} +8 -8
- package/dist/chunks/{data-table-DC369pb3.es.js.map → data-table-ClMivKY1.es.js.map} +1 -1
- package/dist/chunks/{date-input-KVuRsFzs.es.js → date-input-Cap8-3zj.es.js} +2 -2
- package/dist/chunks/{date-input-KVuRsFzs.es.js.map → date-input-Cap8-3zj.es.js.map} +1 -1
- package/dist/chunks/{date-picker-C304WfAN.es.js → date-picker-ChZ8H-MT.es.js} +9 -9
- package/dist/chunks/{date-picker-C304WfAN.es.js.map → date-picker-ChZ8H-MT.es.js.map} +1 -1
- package/dist/chunks/{date-range-picker-CkRgcwfm.es.js → date-range-picker-DGWMdcAN.es.js} +9 -9
- package/dist/chunks/{date-range-picker-CkRgcwfm.es.js.map → date-range-picker-DGWMdcAN.es.js.map} +1 -1
- package/dist/chunks/{dialog-gTeRW6GK.es.js → dialog-BwtIcIvd.es.js} +2 -2
- package/dist/chunks/{dialog-gTeRW6GK.es.js.map → dialog-BwtIcIvd.es.js.map} +1 -1
- package/dist/chunks/{dialog.title-B9cEUH8w.es.js → dialog.title-CP_ZeiK4.es.js} +5 -5
- package/dist/chunks/{dialog.title-B9cEUH8w.es.js.map → dialog.title-CP_ZeiK4.es.js.map} +1 -1
- package/dist/chunks/{draggable-list-BIJ7t5ou.es.js → draggable-list-s43baxoM.es.js} +11 -11
- package/dist/chunks/{draggable-list-BIJ7t5ou.es.js.map → draggable-list-s43baxoM.es.js.map} +1 -1
- package/dist/chunks/{drawer-DKF34Nfc.es.js → drawer-BJ4qvGnj.es.js} +5 -5
- package/dist/chunks/{drawer-DKF34Nfc.es.js.map → drawer-BJ4qvGnj.es.js.map} +1 -1
- package/dist/chunks/{form-field-cRZo4WSf.es.js → form-field-BYlpCXdY.es.js} +3 -3
- package/dist/chunks/{form-field-cRZo4WSf.es.js.map → form-field-BYlpCXdY.es.js.map} +1 -1
- 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-button-9Ni8-hO7.es.js → icon-button-DQS2apw-.es.js} +2 -2
- package/dist/chunks/{icon-button-9Ni8-hO7.es.js.map → icon-button-DQS2apw-.es.js.map} +1 -1
- package/dist/chunks/{icon-toggle-button-Db8CLmE5.es.js → icon-toggle-button-Bi-9Obfx.es.js} +2 -2
- package/dist/chunks/{icon-toggle-button-Db8CLmE5.es.js.map → icon-toggle-button-Bi-9Obfx.es.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/{link-QwdgCWJd.es.js → link-BEhlSTUU.es.js} +3 -3
- package/dist/chunks/{link-QwdgCWJd.es.js.map → link-BEhlSTUU.es.js.map} +1 -1
- package/dist/chunks/{localized-field-pJSLdod5.es.js → localized-field-D3G0Uy7Z.es.js} +8 -8
- package/dist/chunks/{localized-field-pJSLdod5.es.js.map → localized-field-D3G0Uy7Z.es.js.map} +1 -1
- package/dist/chunks/{menu-4QTf2m-7.es.js → menu-D-vE6ZpM.es.js} +4 -4
- package/dist/chunks/menu-D-vE6ZpM.es.js.map +1 -0
- package/dist/chunks/menu-DIepV2KZ.cjs.js.map +1 -1
- package/dist/chunks/{money-input-BJpffXRR.es.js → money-input-sk0Slpeu.es.js} +3 -3
- package/dist/chunks/{money-input-BJpffXRR.es.js.map → money-input-sk0Slpeu.es.js.map} +1 -1
- package/dist/chunks/{nimbus-provider-BfpEKy6w.es.js → nimbus-provider-BHNFDQ0f.es.js} +5 -5
- package/dist/chunks/{nimbus-provider-BfpEKy6w.es.js.map → nimbus-provider-BHNFDQ0f.es.js.map} +1 -1
- package/dist/chunks/{number-input-DXiwgboS.es.js → number-input-CktMxOdZ.es.js} +2 -2
- package/dist/chunks/{number-input-DXiwgboS.es.js.map → number-input-CktMxOdZ.es.js.map} +1 -1
- package/dist/chunks/{openLink-DT8XzqFh.es.js → openLink-CY66vjvW.es.js} +3 -3
- package/dist/chunks/{openLink-DT8XzqFh.es.js.map → openLink-CY66vjvW.es.js.map} +1 -1
- package/dist/chunks/{pagination-Sq1twv0k.es.js → pagination-Bcq69Nv3.es.js} +4 -4
- package/dist/chunks/{pagination-Sq1twv0k.es.js.map → pagination-Bcq69Nv3.es.js.map} +1 -1
- package/dist/chunks/{password-input-CBhC_e5Z.es.js → password-input-6MO4I-2j.es.js} +2 -2
- package/dist/chunks/{password-input-CBhC_e5Z.es.js.map → password-input-6MO4I-2j.es.js.map} +1 -1
- package/dist/chunks/popover-CfEq5G5-.cjs.js.map +1 -1
- package/dist/chunks/{popover-Cz6TnNt_.es.js → popover-DNaC7CwB.es.js} +2 -2
- package/dist/chunks/popover-DNaC7CwB.es.js.map +1 -0
- package/dist/chunks/{radio-input-DhqS9ipf.es.js → radio-input-4jw6HUjC.es.js} +2 -2
- package/dist/chunks/{radio-input-DhqS9ipf.es.js.map → radio-input-4jw6HUjC.es.js.map} +1 -1
- package/dist/chunks/{range-calendar-RBEpLQJb.es.js → range-calendar-DBpl6y5i.es.js} +5 -5
- package/dist/chunks/range-calendar-DBpl6y5i.es.js.map +1 -0
- package/dist/chunks/range-calendar-_dZfAsdG.cjs.js.map +1 -1
- package/dist/chunks/{rich-text-input-CrjP71KM.es.js → rich-text-input-BC8CBVio.es.js} +5 -5
- package/dist/chunks/rich-text-input-BC8CBVio.es.js.map +1 -0
- package/dist/chunks/rich-text-input-Da5WFZ3l.cjs.js.map +1 -1
- package/dist/chunks/{search-input-DCpjVXVS.es.js → search-input-DJy2NHYW.es.js} +3 -3
- package/dist/chunks/{search-input-DCpjVXVS.es.js.map → search-input-DJy2NHYW.es.js.map} +1 -1
- package/dist/chunks/{select-xlqMXZuO.es.js → select-BmMhTBo-.es.js} +9 -9
- package/dist/chunks/{select-xlqMXZuO.es.js.map → select-BmMhTBo-.es.js.map} +1 -1
- package/dist/chunks/separator-CvRn_J0r.cjs.js.map +1 -1
- package/dist/chunks/separator-DJGUFG-o.es.js.map +1 -1
- package/dist/chunks/split-button-BO52sL7h.cjs.js.map +1 -1
- package/dist/chunks/{split-button-C5MmKuVW.es.js → split-button-BxyZmuNi.es.js} +4 -4
- package/dist/chunks/split-button-BxyZmuNi.es.js.map +1 -0
- package/dist/chunks/{switch-B5bEl91n.es.js → switch-01hEhL9A.es.js} +2 -2
- package/dist/chunks/switch-01hEhL9A.es.js.map +1 -0
- package/dist/chunks/switch-CdLhBEPq.cjs.js.map +1 -1
- package/dist/chunks/tabs-CJ0OAUSR.cjs.js.map +1 -1
- package/dist/chunks/{tabs-DGzmzlun.es.js → tabs-Dhte-RCe.es.js} +4 -4
- package/dist/chunks/{tabs-DGzmzlun.es.js.map → tabs-Dhte-RCe.es.js.map} +1 -1
- package/dist/chunks/tag-group-Btt0egzG.cjs.js.map +1 -1
- package/dist/chunks/{tag-group-pJFnuRoJ.es.js → tag-group-D2dgXSsV.es.js} +9 -9
- package/dist/chunks/{tag-group-pJFnuRoJ.es.js.map → tag-group-D2dgXSsV.es.js.map} +1 -1
- package/dist/chunks/{time-input-BUej1BjY.es.js → time-input--a_qv-Jk.es.js} +2 -2
- package/dist/chunks/{time-input-BUej1BjY.es.js.map → time-input--a_qv-Jk.es.js.map} +1 -1
- package/dist/chunks/{toggle-button-CPzjUSI_.es.js → toggle-button-awb1jBf8.es.js} +2 -2
- package/dist/chunks/{toggle-button-CPzjUSI_.es.js.map → toggle-button-awb1jBf8.es.js.map} +1 -1
- package/dist/chunks/{toggle-button-group-DOxjowig.es.js → toggle-button-group-Ce7ezOED.es.js} +2 -2
- package/dist/chunks/{toggle-button-group-DOxjowig.es.js.map → toggle-button-group-Ce7ezOED.es.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/chunks/{useButton-DkQVxdIF.es.js → useButton-_sJ3_8ha.es.js} +2 -2
- package/dist/chunks/{useButton-DkQVxdIF.es.js.map → useButton-_sJ3_8ha.es.js.map} +1 -1
- package/dist/chunks/{useDateFormatter-BkKCXbud.es.js → useDateFormatter-C4zVAL_K.es.js} +2 -2
- package/dist/chunks/{useDateFormatter-BkKCXbud.es.js.map → useDateFormatter-C4zVAL_K.es.js.map} +1 -1
- package/dist/chunks/{useGridListItem-Cosrmt8g.es.js → useGridListItem--iMluO7K.es.js} +4 -4
- package/dist/chunks/{useGridListItem-Cosrmt8g.es.js.map → useGridListItem--iMluO7K.es.js.map} +1 -1
- package/dist/chunks/{useListState-CUO8Wibt.es.js → useListState-Cf8n791-.es.js} +2 -2
- package/dist/chunks/{useListState-CUO8Wibt.es.js.map → useListState-Cf8n791-.es.js.map} +1 -1
- package/dist/chunks/{usePress-Bxb2-xLP.es.js → usePress-Dc6amhnJ.es.js} +2 -2
- package/dist/chunks/{usePress-Bxb2-xLP.es.js.map → usePress-Dc6amhnJ.es.js.map} +1 -1
- package/dist/chunks/{useSingleSelectListState-CnVWWOJD.es.js → useSingleSelectListState-DLY6K_dU.es.js} +2 -2
- package/dist/chunks/{useSingleSelectListState-CnVWWOJD.es.js.map → useSingleSelectListState-DLY6K_dU.es.js.map} +1 -1
- package/dist/chunks/{useToggle-CUMQAGyE.es.js → useToggle-CKEhqMIa.es.js} +2 -2
- package/dist/chunks/{useToggle-CUMQAGyE.es.js.map → useToggle-CKEhqMIa.es.js.map} +1 -1
- package/dist/components/accordion/accordion.d.ts +13 -0
- package/dist/components/accordion/accordion.recipe.d.ts +36 -0
- package/dist/components/accordion/accordion.slots.d.ts +8 -0
- package/dist/components/accordion/accordion.types.d.ts +48 -0
- package/dist/components/accordion/components/accordion-content.d.ts +2 -0
- package/dist/components/accordion/components/accordion-header.d.ts +2 -0
- package/dist/components/accordion/components/accordion-item.d.ts +2 -0
- package/dist/components/accordion/components/accordion-root.d.ts +9 -0
- package/dist/components/accordion/index.d.ts +2 -0
- package/dist/components/accordion.es.js +1 -1
- package/dist/components/alert/alert.d.ts +30 -0
- package/dist/components/alert/alert.i18n.d.ts +7 -0
- package/dist/components/alert/alert.recipe.d.ts +40 -0
- package/dist/components/alert/alert.slots.d.ts +16 -0
- package/dist/components/alert/alert.types.d.ts +48 -0
- package/dist/components/alert/components/alert.actions.d.ts +5 -0
- package/dist/components/alert/components/alert.description.d.ts +5 -0
- package/dist/components/alert/components/alert.dismiss-button.d.ts +5 -0
- package/dist/components/alert/components/alert.root.d.ts +18 -0
- package/dist/components/alert/components/alert.title.d.ts +5 -0
- package/dist/components/alert/index.d.ts +2 -0
- package/dist/components/alert.es.js +1 -1
- package/dist/components/avatar/avatar.d.ts +5 -0
- package/dist/components/avatar/avatar.recipe.d.ts +19 -0
- package/dist/components/avatar/avatar.slots.d.ts +3 -0
- package/dist/{avatar.d.ts → components/avatar/avatar.types.d.ts} +42 -63
- package/dist/components/avatar/index.d.ts +2 -0
- package/dist/components/badge/badge.d.ts +12 -0
- package/dist/components/badge/badge.recipe.d.ts +41 -0
- package/dist/components/badge/badge.slots.d.ts +3 -0
- package/dist/components/badge/badge.types.d.ts +24 -0
- package/dist/components/badge/index.d.ts +2 -0
- package/dist/{box.d.ts → components/box/box.d.ts} +16 -30
- package/dist/components/box/index.d.ts +1 -0
- package/dist/components/button/button.d.ts +12 -0
- package/dist/components/button/button.recipe.d.ts +107 -0
- package/dist/components/button/button.slots.d.ts +11 -0
- package/dist/components/button/button.types.d.ts +36 -0
- package/dist/components/button/index.d.ts +2 -0
- package/dist/components/button.es.js +1 -1
- package/dist/components/calendar/calendar.d.ts +10 -0
- package/dist/components/calendar/calendar.recipe.d.ts +1 -0
- package/dist/components/calendar/calendar.slots.d.ts +11 -0
- package/dist/components/calendar/calendar.types.d.ts +16 -0
- package/dist/components/calendar/components/calendar.custom-context.d.ts +3 -0
- package/dist/components/calendar/components/calendar.grids.d.ts +1 -0
- package/dist/components/calendar/components/calendar.header.d.ts +1 -0
- package/dist/components/calendar/index.d.ts +2 -0
- package/dist/components/calendar.es.js +1 -1
- package/dist/components/card/card.d.ts +18 -0
- package/dist/components/card/card.recipe.d.ts +52 -0
- package/dist/components/card/card.slots.d.ts +12 -0
- package/dist/components/card/card.types.d.ts +28 -0
- package/dist/components/card/components/card.content.d.ts +5 -0
- package/dist/components/card/components/card.header.d.ts +5 -0
- package/dist/components/card/components/card.root.d.ts +18 -0
- package/dist/components/card/index.d.ts +2 -0
- package/dist/components/checkbox/checkbox.d.ts +12 -0
- package/dist/components/checkbox/checkbox.recipe.d.ts +27 -0
- package/dist/components/checkbox/checkbox.slots.d.ts +5 -0
- package/dist/components/checkbox/checkbox.types.d.ts +24 -0
- package/dist/components/checkbox/index.d.ts +2 -0
- package/dist/components/checkbox.es.js +1 -1
- package/dist/components/code/code.d.ts +10 -0
- package/dist/components/code/code.recipe.d.ts +48 -0
- package/dist/components/code/index.d.ts +1 -0
- package/dist/components/collapsible-motion/collapsible-motion.d.ts +10 -0
- package/dist/components/collapsible-motion/collapsible-motion.recipe.d.ts +1 -0
- package/dist/components/collapsible-motion/collapsible-motion.slots.d.ts +5 -0
- package/dist/components/collapsible-motion/collapsible-motion.types.d.ts +59 -0
- package/dist/components/collapsible-motion/components/collapsible-motion-content.d.ts +9 -0
- package/dist/components/collapsible-motion/components/collapsible-motion-context.d.ts +9 -0
- package/dist/components/collapsible-motion/components/collapsible-motion-root.d.ts +8 -0
- package/dist/components/collapsible-motion/components/collapsible-motion-trigger.d.ts +10 -0
- package/dist/components/collapsible-motion/index.d.ts +2 -0
- package/dist/components/collapsible-motion.es.js +1 -1
- package/dist/components/combobox/combobox.d.ts +18 -0
- package/dist/components/combobox/combobox.recipe.d.ts +96 -0
- package/dist/components/combobox/combobox.slots.d.ts +27 -0
- package/dist/components/combobox/combobox.types.d.ts +152 -0
- package/dist/components/combobox/components/combobox.leading-element.d.ts +11 -0
- package/dist/components/combobox/components/combobox.multi-select-button-group.d.ts +2 -0
- package/dist/components/combobox/components/combobox.multi-select-root.d.ts +2 -0
- package/dist/components/combobox/components/combobox.multi-select-tag-group.d.ts +2 -0
- package/dist/components/combobox/components/combobox.option-group.d.ts +6 -0
- package/dist/components/combobox/components/combobox.option.d.ts +5 -0
- package/dist/components/combobox/components/combobox.options.d.ts +5 -0
- package/dist/components/combobox/components/combobox.root.d.ts +12 -0
- package/dist/components/combobox/components/combobox.single-select-button-group.d.ts +2 -0
- package/dist/components/combobox/components/combobox.single-select-input.d.ts +2 -0
- package/dist/components/combobox/components/combobox.single-select-root.d.ts +2 -0
- package/dist/components/combobox/index.d.ts +2 -0
- package/dist/components/combobox.es.js +1 -1
- package/dist/components/components.es.js +1 -1
- package/dist/components/data-table/components/data-table.body.d.ts +5 -0
- package/dist/components/data-table/components/data-table.cell.d.ts +2 -0
- package/dist/components/data-table/components/data-table.column.d.ts +2 -0
- package/dist/components/data-table/components/data-table.context.d.ts +3 -0
- package/dist/components/data-table/components/data-table.footer.d.ts +11 -0
- package/dist/components/data-table/components/data-table.header.d.ts +5 -0
- package/dist/components/data-table/components/data-table.root.d.ts +5 -0
- package/dist/components/data-table/components/data-table.row.d.ts +5 -0
- package/dist/components/data-table/components/data-table.table.d.ts +5 -0
- package/dist/components/data-table/data-table.d.ts +52 -0
- package/dist/components/data-table/data-table.recipe.d.ts +32 -0
- package/dist/components/data-table/data-table.slots.d.ts +21 -0
- package/dist/components/data-table/data-table.types.d.ts +154 -0
- package/dist/components/data-table/index.d.ts +2 -0
- package/dist/components/data-table/test-data.d.ts +58 -0
- package/dist/components/data-table/utils/rows.utils.d.ts +4 -0
- package/dist/components/data-table.es.js +1 -1
- package/dist/components/date-input/date-input.d.ts +12 -0
- package/dist/components/date-input/date-input.recipe.d.ts +71 -0
- package/dist/components/date-input/date-input.slots.d.ts +18 -0
- package/dist/components/date-input/date-input.types.d.ts +20 -0
- package/dist/components/date-input/index.d.ts +2 -0
- package/dist/components/date-input.es.js +1 -1
- package/dist/components/date-picker/components/date-picker.custom-context.d.ts +3 -0
- package/dist/components/date-picker/components/date-picker.time-input.d.ts +2 -0
- package/dist/components/date-picker/date-picker.d.ts +12 -0
- package/dist/components/date-picker/date-picker.i18n.d.ts +33 -0
- package/dist/components/date-picker/date-picker.recipe.d.ts +14 -0
- package/dist/components/date-picker/date-picker.slots.d.ts +30 -0
- package/dist/components/date-picker/date-picker.types.d.ts +43 -0
- package/dist/components/date-picker/index.d.ts +2 -0
- package/dist/components/date-picker.es.js +1 -1
- package/dist/components/date-range-picker/components/date-range-picker.custom-context.d.ts +4 -0
- package/dist/components/date-range-picker/components/date-range-picker.time-input.d.ts +2 -0
- package/dist/components/date-range-picker/date-range-picker.d.ts +11 -0
- package/dist/components/date-range-picker/date-range-picker.recipe.d.ts +34 -0
- package/dist/components/date-range-picker/date-range-picker.slots.d.ts +36 -0
- package/dist/components/date-range-picker/date-range-picker.types.d.ts +44 -0
- package/dist/components/date-range-picker/index.d.ts +2 -0
- package/dist/components/date-range-picker.es.js +1 -1
- package/dist/components/dialog/components/dialog.body.d.ts +5 -0
- package/dist/components/dialog/components/dialog.close-trigger.d.ts +5 -0
- package/dist/components/dialog/components/dialog.content.d.ts +5 -0
- package/dist/components/dialog/components/dialog.context.d.ts +19 -0
- package/dist/components/dialog/components/dialog.footer.d.ts +5 -0
- package/dist/components/dialog/components/dialog.header.d.ts +5 -0
- package/dist/components/dialog/components/dialog.root.d.ts +5 -0
- package/dist/components/dialog/components/dialog.title.d.ts +5 -0
- package/dist/components/dialog/components/dialog.trigger.d.ts +5 -0
- package/dist/components/dialog/components/index.d.ts +8 -0
- package/dist/components/dialog/dialog.d.ts +229 -0
- package/dist/components/dialog/dialog.i18n.d.ts +7 -0
- package/dist/components/dialog/dialog.recipe.d.ts +54 -0
- package/dist/components/dialog/dialog.slots.d.ts +28 -0
- package/dist/components/dialog/dialog.types.d.ts +189 -0
- package/dist/components/dialog/index.d.ts +2 -0
- package/dist/components/dialog.es.js +1 -1
- package/dist/components/draggable-list/components/draggable-list.field.d.ts +2 -0
- package/dist/components/draggable-list/components/draggable-list.item.d.ts +2 -0
- package/dist/components/draggable-list/components/draggable-list.root.d.ts +2 -0
- package/dist/components/draggable-list/draggable-list.d.ts +107 -0
- package/dist/components/draggable-list/draggable-list.i18n.d.ts +12 -0
- package/dist/components/draggable-list/draggable-list.recipe.d.ts +14 -0
- package/dist/components/draggable-list/draggable-list.slots.d.ts +6 -0
- package/dist/components/draggable-list/draggable-list.types.d.ts +141 -0
- package/dist/components/draggable-list/index.d.ts +2 -0
- package/dist/components/draggable-list/utils/draggable-list.test-data.d.ts +3 -0
- package/dist/components/draggable-list/utils/draggable-list.test-utils.d.ts +1 -0
- package/dist/components/draggable-list.es.js +1 -1
- package/dist/components/drawer/components/drawer.body.d.ts +5 -0
- package/dist/components/drawer/components/drawer.close-trigger.d.ts +5 -0
- package/dist/components/drawer/components/drawer.content.d.ts +5 -0
- package/dist/components/drawer/components/drawer.context.d.ts +19 -0
- package/dist/components/drawer/components/drawer.footer.d.ts +5 -0
- package/dist/components/drawer/components/drawer.header.d.ts +5 -0
- package/dist/components/drawer/components/drawer.root.d.ts +5 -0
- package/dist/components/drawer/components/drawer.title.d.ts +5 -0
- package/dist/components/drawer/components/drawer.trigger.d.ts +5 -0
- package/dist/components/drawer/components/index.d.ts +8 -0
- package/dist/components/drawer/drawer.d.ts +228 -0
- package/dist/components/drawer/drawer.i18n.d.ts +7 -0
- package/dist/components/drawer/drawer.recipe.d.ts +98 -0
- package/dist/components/drawer/drawer.slots.d.ts +21 -0
- package/dist/components/drawer/drawer.types.d.ts +175 -0
- package/dist/components/drawer/index.d.ts +3 -0
- package/dist/components/drawer.es.js +1 -1
- package/dist/components/field-errors/field-errors.d.ts +34 -0
- package/dist/components/field-errors/field-errors.i18n.d.ts +77 -0
- package/dist/components/field-errors/field-errors.recipe.d.ts +1 -0
- package/dist/components/field-errors/field-errors.slots.d.ts +6 -0
- package/dist/{field-errors.d.ts → components/field-errors/field-errors.types.d.ts} +95 -144
- package/dist/components/field-errors/index.d.ts +3 -0
- package/dist/components/flex/flex.d.ts +8 -0
- package/dist/components/flex/index.d.ts +1 -0
- package/dist/components/form-field/components/form-field.context.d.ts +22 -0
- package/dist/components/form-field/components/form-field.description.d.ts +2 -0
- package/dist/components/form-field/components/form-field.error.d.ts +2 -0
- package/dist/components/form-field/components/form-field.info-box.d.ts +9 -0
- package/dist/components/form-field/components/form-field.input.d.ts +2 -0
- package/dist/components/form-field/components/form-field.label.d.ts +2 -0
- package/dist/components/form-field/components/form-field.root.d.ts +9 -0
- package/dist/components/form-field/form-field.d.ts +17 -0
- package/dist/components/form-field/form-field.recipe.d.ts +49 -0
- package/dist/components/form-field/form-field.slots.d.ts +15 -0
- package/dist/components/form-field/form-field.types.d.ts +54 -0
- package/dist/components/form-field/index.d.ts +2 -0
- package/dist/components/form-field.es.js +1 -1
- package/dist/components/grid/grid.d.ts +18 -0
- package/dist/components/grid/index.d.ts +1 -0
- package/dist/components/group/group.d.ts +2 -0
- package/dist/components/group/group.recipe.d.ts +5 -0
- package/dist/components/group/group.slots.d.ts +8 -0
- package/dist/components/group/group.types.d.ts +17 -0
- package/dist/components/group/index.d.ts +2 -0
- package/dist/{heading.d.ts → components/heading/heading.d.ts} +41 -55
- package/dist/components/heading/heading.recipe.d.ts +37 -0
- package/dist/components/heading/index.d.ts +1 -0
- package/dist/components/icon/icon.d.ts +12 -0
- package/dist/components/icon/icon.recipe.d.ts +29 -0
- package/dist/components/icon/icon.slots.d.ts +7 -0
- package/dist/components/icon/icon.types.d.ts +29 -0
- package/dist/components/icon/index.d.ts +2 -0
- package/dist/components/icon-button/icon-button.d.ts +12 -0
- package/dist/components/icon-button/icon-button.types.d.ts +11 -0
- package/dist/components/icon-button/index.d.ts +2 -0
- package/dist/components/icon-button.es.js +1 -1
- package/dist/components/icon-toggle-button/icon-toggle-button.d.ts +12 -0
- package/dist/components/icon-toggle-button/icon-toggle-button.types.d.ts +11 -0
- package/dist/components/icon-toggle-button/index.d.ts +2 -0
- package/dist/components/icon-toggle-button.es.js +1 -1
- package/dist/components/image/image.d.ts +13 -0
- package/dist/components/image/index.d.ts +1 -0
- package/dist/components/index.d.ts +65 -0
- package/dist/components/inline-svg/constants/index.d.ts +1 -0
- package/dist/{constants.d.ts → components/inline-svg/constants/sanitization.constants.d.ts} +8 -20
- package/dist/components/inline-svg/hooks/index.d.ts +1 -0
- package/dist/{hooks.d.ts → components/inline-svg/hooks/use-inline-svg.d.ts} +10 -21
- package/dist/components/inline-svg/index.d.ts +2 -0
- package/dist/components/inline-svg/inline-svg.d.ts +23 -0
- package/dist/components/inline-svg/inline-svg.slots.d.ts +22 -0
- package/dist/components/inline-svg/inline-svg.types.d.ts +12 -0
- package/dist/components/inline-svg/utils/index.d.ts +1 -0
- package/dist/{utils.d.ts → components/inline-svg/utils/sanitize-svg.d.ts} +32 -44
- package/dist/components/kbd/index.d.ts +1 -0
- package/dist/components/kbd/kbd.d.ts +15 -0
- package/dist/components/kbd/kbd.recipe.d.ts +1 -0
- package/dist/components/kbd/kbd.slots.d.ts +19 -0
- package/dist/components/link/index.d.ts +2 -0
- package/dist/components/link/link.d.ts +12 -0
- package/dist/components/link/link.recipe.d.ts +28 -0
- package/dist/components/link/link.slots.d.ts +8 -0
- package/dist/components/link/link.types.d.ts +27 -0
- package/dist/components/link.es.js +1 -1
- package/dist/components/list/index.d.ts +1 -0
- package/dist/components/list/list.d.ts +18 -0
- package/dist/components/list/list.recipe.d.ts +38 -0
- package/dist/components/loading-spinner/index.d.ts +2 -0
- package/dist/components/loading-spinner/loading-spinner.d.ts +12 -0
- package/dist/components/loading-spinner/loading-spinner.i18n.d.ts +8 -0
- package/dist/components/loading-spinner/loading-spinner.recipe.d.ts +36 -0
- package/dist/components/loading-spinner/loading-spinner.slots.d.ts +6 -0
- package/dist/components/loading-spinner/loading-spinner.types.d.ts +24 -0
- package/dist/components/localized-field/components/localized-field.locale-field.d.ts +2 -0
- package/dist/components/localized-field/components/localized-field.root.d.ts +2 -0
- package/dist/components/localized-field/index.d.ts +2 -0
- package/dist/components/localized-field/localized-field.d.ts +17 -0
- package/dist/components/localized-field/localized-field.i18n.d.ts +33 -0
- package/dist/components/localized-field/localized-field.recipe.d.ts +22 -0
- package/dist/components/localized-field/localized-field.slots.d.ts +19 -0
- package/dist/components/localized-field/localized-field.types.d.ts +188 -0
- package/dist/components/localized-field/utils/localized-field.story-component.d.ts +39 -0
- package/dist/components/localized-field/utils/localized-field.utils.d.ts +34 -0
- package/dist/components/localized-field/utils/test-data.d.ts +340 -0
- package/dist/components/localized-field/utils/test-utils.d.ts +22 -0
- package/dist/components/localized-field.es.js +1 -1
- package/dist/components/menu/components/menu.content.d.ts +5 -0
- package/dist/components/menu/components/menu.context.d.ts +5 -0
- package/dist/components/menu/components/menu.item.d.ts +5 -0
- package/dist/components/menu/components/menu.root.d.ts +5 -0
- package/dist/components/menu/components/menu.section-context.d.ts +5 -0
- package/dist/components/menu/components/menu.section-label.d.ts +8 -0
- package/dist/components/menu/components/menu.section.d.ts +5 -0
- package/dist/components/menu/components/menu.submenu-trigger.d.ts +5 -0
- package/dist/components/menu/components/menu.submenu.d.ts +5 -0
- package/dist/components/menu/components/menu.trigger.d.ts +5 -0
- package/dist/components/menu/index.d.ts +2 -0
- package/dist/components/menu/menu.d.ts +39 -0
- package/dist/components/menu/menu.recipe.d.ts +5 -0
- package/dist/components/menu/menu.slots.d.ts +10 -0
- package/dist/components/menu/menu.types.d.ts +62 -0
- package/dist/components/money-input/index.d.ts +2 -0
- package/dist/components/money-input/money-input.d.ts +77 -0
- package/dist/components/money-input/money-input.i18n.d.ts +18 -0
- package/dist/components/money-input/money-input.recipe.d.ts +40 -0
- package/dist/components/money-input/money-input.slots.d.ts +8 -0
- package/dist/components/money-input/money-input.types.d.ts +102 -0
- package/dist/{money-input.d.ts → components/money-input/utils/currencies.d.ts} +666 -879
- package/dist/components/money-input/utils/index.d.ts +2 -0
- package/dist/components/money-input/utils/parsing-utilities.d.ts +22 -0
- package/dist/components/money-input/utils/static-methods.d.ts +6 -0
- package/dist/components/money-input.es.js +1 -1
- package/dist/components/multiline-text-input/hooks/index.d.ts +1 -0
- package/dist/components/multiline-text-input/hooks/use-autogrow.d.ts +16 -0
- package/dist/components/multiline-text-input/index.d.ts +2 -0
- package/dist/components/multiline-text-input/multiline-text-input.d.ts +12 -0
- package/dist/components/multiline-text-input/multiline-text-input.recipe.d.ts +64 -0
- package/dist/components/multiline-text-input/multiline-text-input.slots.d.ts +16 -0
- package/dist/components/multiline-text-input/multiline-text-input.types.d.ts +42 -0
- package/dist/components/nimbus-provider/components/nimbus-provider.color-mode-provider.d.ts +2 -0
- package/dist/components/nimbus-provider/index.d.ts +2 -0
- package/dist/components/nimbus-provider/nimbus-provider.d.ts +9 -0
- package/dist/{nimbus-provider.d.ts → components/nimbus-provider/nimbus-provider.types.d.ts} +92 -119
- package/dist/components/nimbus-provider.es.js +1 -1
- package/dist/components/number-input/index.d.ts +2 -0
- package/dist/components/number-input/number-input.d.ts +11 -0
- package/dist/components/number-input/number-input.i18n.d.ts +13 -0
- package/dist/components/number-input/number-input.recipe.d.ts +113 -0
- package/dist/components/number-input/number-input.slots.d.ts +42 -0
- package/dist/components/number-input/number-input.types.d.ts +40 -0
- package/dist/components/number-input.es.js +1 -1
- package/dist/components/pagination/hooks/use-pagination.d.ts +72 -0
- package/dist/components/pagination/index.d.ts +2 -0
- package/dist/components/pagination/pagination.d.ts +13 -0
- package/dist/{pagination.d.ts → components/pagination/pagination.types.d.ts} +44 -70
- package/dist/components/pagination.es.js +1 -1
- package/dist/components/password-input/index.d.ts +2 -0
- package/dist/components/password-input/password-input.d.ts +12 -0
- package/dist/components/password-input/password-input.i18n.d.ts +13 -0
- package/dist/components/password-input/password-input.types.d.ts +2 -0
- package/dist/components/password-input.es.js +1 -1
- package/dist/components/popover/index.d.ts +2 -0
- package/dist/components/popover/popover.d.ts +12 -0
- package/dist/components/popover/popover.recipe.d.ts +5 -0
- package/dist/components/popover/popover.slots.d.ts +4 -0
- package/dist/components/popover/popover.types.d.ts +6 -0
- package/dist/components/popover.es.js +1 -1
- package/dist/components/progress-bar/index.d.ts +2 -0
- package/dist/components/progress-bar/progress-bar.d.ts +22 -0
- package/dist/components/progress-bar/progress-bar.recipe.d.ts +91 -0
- package/dist/components/progress-bar/progress-bar.slots.d.ts +20 -0
- package/dist/components/progress-bar/progress-bar.types.d.ts +53 -0
- package/dist/components/radio-input/components/radio-input.option.d.ts +5 -0
- package/dist/components/radio-input/components/radio-input.root.d.ts +12 -0
- package/dist/components/radio-input/index.d.ts +2 -0
- package/dist/components/radio-input/radio-input.d.ts +13 -0
- package/dist/components/radio-input/radio-input.recipe.d.ts +21 -0
- package/dist/components/radio-input/radio-input.slots.d.ts +6 -0
- package/dist/components/radio-input/radio-input.types.d.ts +18 -0
- package/dist/components/radio-input.es.js +1 -1
- package/dist/components/range-calendar/components/range-calendar.custom-context.d.ts +3 -0
- package/dist/components/range-calendar/components/range-calendar.grids.d.ts +1 -0
- package/dist/components/range-calendar/components/range-calendar.header.d.ts +1 -0
- package/dist/components/range-calendar/index.d.ts +2 -0
- package/dist/components/range-calendar/range-calendar.d.ts +3 -0
- package/dist/components/range-calendar/range-calendar.recipe.d.ts +1 -0
- package/dist/components/range-calendar/range-calendar.slots.d.ts +11 -0
- package/dist/components/range-calendar/range-calendar.types.d.ts +20 -0
- package/dist/components/range-calendar.es.js +1 -1
- package/dist/components/rich-text-input/components/formatting-menu.d.ts +4 -0
- package/dist/components/rich-text-input/components/rich-text-editor.d.ts +25 -0
- package/dist/components/rich-text-input/components/rich-text-toolbar.d.ts +7 -0
- package/dist/components/rich-text-input/constants/editor-constants.d.ts +65 -0
- package/dist/components/rich-text-input/constants/index.d.ts +2 -0
- package/dist/components/rich-text-input/constants/text-styles.d.ts +32 -0
- package/dist/components/rich-text-input/hooks/index.d.ts +4 -0
- package/dist/components/rich-text-input/hooks/use-formatting-state.d.ts +10 -0
- package/dist/components/rich-text-input/hooks/use-keyboard-shortcuts.d.ts +7 -0
- package/dist/components/rich-text-input/hooks/use-preserved-selection.d.ts +11 -0
- package/dist/components/rich-text-input/hooks/use-toolbar-state.d.ts +15 -0
- package/dist/components/rich-text-input/index.d.ts +2 -0
- package/dist/components/rich-text-input/rich-text-input.d.ts +8 -0
- package/dist/components/rich-text-input/rich-text-input.recipe.d.ts +1 -0
- package/dist/components/rich-text-input/rich-text-input.slots.d.ts +5 -0
- package/dist/components/rich-text-input/rich-text-input.types.d.ts +54 -0
- package/dist/components/rich-text-input/utils/html-serialization.d.ts +4 -0
- package/dist/components/rich-text-input/utils/index.d.ts +5 -0
- package/dist/components/rich-text-input/utils/is-empty.d.ts +4 -0
- package/dist/components/rich-text-input/utils/slate-helpers.d.ts +19 -0
- package/dist/components/rich-text-input/utils/text-style-utils.d.ts +33 -0
- package/dist/components/rich-text-input/utils/types.d.ts +28 -0
- package/dist/components/rich-text-input.es.js +1 -1
- package/dist/components/scoped-search-input/index.d.ts +2 -0
- package/dist/components/scoped-search-input/scoped-search-input.d.ts +6 -0
- package/dist/components/scoped-search-input/scoped-search-input.i18n.d.ts +23 -0
- package/dist/components/scoped-search-input/scoped-search-input.recipe.d.ts +6 -0
- package/dist/components/scoped-search-input/scoped-search-input.slots.d.ts +6 -0
- package/dist/{scoped-search-input.d.ts → components/scoped-search-input/scoped-search-input.types.d.ts} +72 -94
- package/dist/components/scoped-search-input/utils/helpers.d.ts +5 -0
- package/dist/components/scoped-search-input.es.js +2 -2
- package/dist/components/search-input/index.d.ts +2 -0
- package/dist/components/search-input/search-input.d.ts +11 -0
- package/dist/components/search-input/search-input.i18n.d.ts +8 -0
- package/dist/components/search-input/search-input.recipe.d.ts +44 -0
- package/dist/components/search-input/search-input.slots.d.ts +12 -0
- package/dist/components/search-input/search-input.types.d.ts +28 -0
- package/dist/components/search-input.es.js +1 -1
- package/dist/components/select/components/select.clear-button.d.ts +4 -0
- package/dist/components/select/components/select.option-group.d.ts +7 -0
- package/dist/components/select/components/select.option.d.ts +5 -0
- package/dist/components/select/components/select.options.d.ts +7 -0
- package/dist/components/select/components/select.root.d.ts +12 -0
- package/dist/components/select/index.d.ts +2 -0
- package/dist/components/select/select.d.ts +135 -0
- package/dist/components/select/select.i18n.d.ts +8 -0
- package/dist/components/select/select.recipe.d.ts +69 -0
- package/dist/components/select/select.slots.d.ts +16 -0
- package/dist/components/select/select.types.d.ts +59 -0
- package/dist/components/select.es.js +1 -1
- package/dist/components/separator/index.d.ts +2 -0
- package/dist/components/separator/separator.d.ts +19 -0
- package/dist/components/separator/separator.recipe.d.ts +16 -0
- package/dist/components/separator/separator.slots.d.ts +3 -0
- package/dist/components/separator/separator.types.d.ts +14 -0
- package/dist/components/simple-grid/index.d.ts +1 -0
- package/dist/components/simple-grid/simple-grid.d.ts +18 -0
- package/dist/components/spacer/index.d.ts +2 -0
- package/dist/components/spacer/spacer.d.ts +17 -0
- package/dist/components/spacer/spacer.types.d.ts +11 -0
- package/dist/components/split-button/index.d.ts +2 -0
- package/dist/components/split-button/split-button.d.ts +18 -0
- package/dist/components/split-button/split-button.recipe.d.ts +21 -0
- package/dist/components/split-button/split-button.slots.d.ts +6 -0
- package/dist/components/split-button/split-button.types.d.ts +26 -0
- package/dist/components/split-button.es.js +1 -1
- package/dist/components/stack/index.d.ts +1 -0
- package/dist/components/stack/stack.d.ts +16 -0
- package/dist/components/switch/index.d.ts +2 -0
- package/dist/components/switch/switch.d.ts +12 -0
- package/dist/components/switch/switch.recipe.d.ts +32 -0
- package/dist/components/switch/switch.slots.d.ts +6 -0
- package/dist/components/switch/switch.types.d.ts +19 -0
- package/dist/components/switch.es.js +1 -1
- package/dist/components/table/index.d.ts +1 -0
- package/dist/components/table/table.d.ts +8 -0
- package/dist/components/table/table.recipe.d.ts +121 -0
- package/dist/components/tabs/components/tabs.list.d.ts +10 -0
- package/dist/components/tabs/components/tabs.panel.d.ts +7 -0
- package/dist/components/tabs/components/tabs.panels.d.ts +10 -0
- package/dist/components/tabs/components/tabs.root.d.ts +12 -0
- package/dist/components/tabs/components/tabs.tab.d.ts +10 -0
- package/dist/components/tabs/index.d.ts +2 -0
- package/dist/components/tabs/tabs.d.ts +31 -0
- package/dist/components/tabs/tabs.recipe.d.ts +67 -0
- package/dist/components/tabs/tabs.slots.d.ts +58 -0
- package/dist/components/tabs/tabs.types.d.ts +112 -0
- package/dist/components/tabs.es.js +1 -1
- package/dist/components/tag-group/components/tag-group.root.d.ts +9 -0
- package/dist/components/tag-group/components/tag-group.tag-list.d.ts +6 -0
- package/dist/components/tag-group/components/tag-group.tag.d.ts +2 -0
- package/dist/components/tag-group/index.d.ts +2 -0
- package/dist/components/tag-group/tag-group.d.ts +14 -0
- package/dist/components/tag-group/tag-group.recipe.d.ts +29 -0
- package/dist/components/tag-group/tag-group.slots.d.ts +7 -0
- package/dist/components/tag-group/tag-group.types.d.ts +27 -0
- package/dist/components/tag-group.es.js +1 -1
- package/dist/components/text/index.d.ts +1 -0
- package/dist/components/text/text.d.ts +16 -0
- package/dist/components/text-input/index.d.ts +2 -0
- package/dist/components/text-input/text-input.d.ts +12 -0
- package/dist/components/text-input/text-input.recipe.d.ts +54 -0
- package/dist/components/text-input/text-input.slots.d.ts +13 -0
- package/dist/components/text-input/text-input.types.d.ts +39 -0
- package/dist/components/time-input/index.d.ts +2 -0
- package/dist/components/time-input/time-input.d.ts +10 -0
- package/dist/components/time-input/time-input.recipe.d.ts +67 -0
- package/dist/components/time-input/time-input.slots.d.ts +24 -0
- package/dist/components/time-input/time-input.types.d.ts +21 -0
- package/dist/components/time-input.es.js +1 -1
- package/dist/components/toggle-button/index.d.ts +2 -0
- package/dist/components/toggle-button/toggle-button.d.ts +13 -0
- package/dist/components/toggle-button/toggle-button.recipe.d.ts +95 -0
- package/dist/components/toggle-button/toggle-button.slots.d.ts +17 -0
- package/dist/components/toggle-button/toggle-button.types.d.ts +28 -0
- package/dist/components/toggle-button-group/components/toggle-button-group.button.d.ts +2 -0
- package/dist/components/toggle-button-group/components/toggle-button-group.root.d.ts +9 -0
- package/dist/components/toggle-button-group/index.d.ts +2 -0
- package/dist/components/toggle-button-group/toggle-button-group.d.ts +12 -0
- package/dist/components/toggle-button-group/toggle-button-group.recipe.d.ts +54 -0
- package/dist/components/toggle-button-group/toggle-button-group.slots.d.ts +3 -0
- package/dist/components/toggle-button-group/toggle-button-group.types.d.ts +32 -0
- package/dist/components/toggle-button-group.es.js +1 -1
- package/dist/components/toggle-button.es.js +1 -1
- package/dist/components/toolbar/index.d.ts +2 -0
- package/dist/components/toolbar/toolbar.d.ts +2 -0
- package/dist/components/toolbar/toolbar.recipe.d.ts +34 -0
- package/dist/components/toolbar/toolbar.slots.d.ts +11 -0
- package/dist/components/toolbar/toolbar.types.d.ts +20 -0
- package/dist/components/tooltip/components/tooltip.content.d.ts +21 -0
- package/dist/components/tooltip/components/tooltip.root.d.ts +12 -0
- package/dist/components/tooltip/index.d.ts +3 -0
- package/dist/components/tooltip/make-element-focusable.d.ts +32 -0
- package/dist/components/tooltip/tooltip.d.ts +7 -0
- package/dist/components/tooltip/tooltip.recipe.d.ts +5 -0
- package/dist/components/tooltip/tooltip.slots.d.ts +7 -0
- package/dist/components/tooltip/tooltip.types.d.ts +9 -0
- package/dist/components/utils/index.d.ts +4 -0
- package/dist/components/utils/type-helpers.d.ts +29 -0
- package/dist/components/visually-hidden/index.d.ts +1 -0
- package/dist/components/visually-hidden/visually-hidden.d.ts +17 -0
- package/dist/hooks/index.d.ts +5 -0
- package/dist/hooks/use-color-mode/index.d.ts +1 -0
- package/dist/hooks/use-color-mode/use-color-mode.d.ts +31 -0
- package/dist/hooks/use-color-mode-value/index.d.ts +1 -0
- package/dist/hooks/use-color-mode-value/use-color-mode-value.d.ts +10 -0
- package/dist/hooks/use-color-scheme/index.d.ts +1 -0
- package/dist/hooks/use-color-scheme/use-color-scheme.d.ts +15 -0
- package/dist/hooks/use-copy-to-clipboard/index.d.ts +1 -0
- package/dist/hooks/use-copy-to-clipboard/use-copy-to-clipboard.d.ts +1 -0
- package/dist/hooks/use-hotkeys/index.d.ts +1 -0
- package/dist/hooks/use-hotkeys/use-hotkeys.d.ts +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +4 -313
- package/dist/index.es.js +203 -198
- package/dist/index.es.js.map +1 -1
- package/dist/theme/animation-styles.d.ts +4 -0
- package/dist/theme/breakpoints.d.ts +5 -0
- package/dist/theme/conditions.d.ts +16 -0
- package/dist/theme/global-css.d.ts +1 -0
- package/dist/theme/index.d.ts +1 -0
- package/dist/theme/keyframes.d.ts +207 -0
- package/dist/theme/layer-styles.d.ts +4 -0
- package/dist/theme/recipes/index.d.ts +490 -0
- package/dist/theme/semantic-tokens/colors.d.ts +12478 -0
- package/dist/theme/semantic-tokens/index.d.ts +6262 -0
- package/dist/theme/semantic-tokens/radii.d.ts +1 -0
- package/dist/theme/semantic-tokens/shadows.d.ts +20 -0
- package/dist/theme/slot-recipes/index.d.ts +1489 -0
- package/dist/theme/text-styles.d.ts +4 -0
- package/dist/theme/tokens/animations.d.ts +14 -0
- package/dist/theme/tokens/aspect-ratios.d.ts +20 -0
- package/dist/theme/tokens/blurs.d.ts +26 -0
- package/dist/theme/tokens/borders.d.ts +14 -0
- package/dist/theme/tokens/colors.d.ts +168 -0
- package/dist/theme/tokens/cursor.d.ts +26 -0
- package/dist/theme/tokens/durations.d.ts +29 -0
- package/dist/theme/tokens/easings.d.ts +17 -0
- package/dist/theme/tokens/font-sizes.d.ts +44 -0
- package/dist/theme/tokens/font-weights.d.ts +29 -0
- package/dist/theme/tokens/fonts.d.ts +11 -0
- package/dist/theme/tokens/index.d.ts +1642 -0
- package/dist/theme/tokens/letter-spacings.d.ts +3 -0
- package/dist/theme/tokens/line-heights.d.ts +80 -0
- package/dist/theme/tokens/radii.d.ts +29 -0
- package/dist/theme/tokens/sizes.d.ts +278 -0
- package/dist/theme/tokens/spacing.d.ts +74 -0
- package/dist/theme/tokens/z-index.d.ts +41 -0
- package/dist/utils/extractStyleProps.d.ts +6 -0
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/noop.d.ts +12 -0
- package/dist/utils/slot-types.d.ts +22 -0
- package/package.json +1 -1
- package/dist/accordion.d.ts +0 -135
- package/dist/alert.d.ts +0 -172
- package/dist/badge.d.ts +0 -52
- package/dist/button.d.ts +0 -64
- package/dist/calendar.d.ts +0 -50
- package/dist/card.d.ts +0 -88
- package/dist/checkbox.d.ts +0 -54
- package/dist/chunks/accordion-DSLccfDW.es.js.map +0 -1
- package/dist/chunks/calendar-BTdHdh7y.es.js.map +0 -1
- package/dist/chunks/collapsible-motion-OOUmjdKw.es.js.map +0 -1
- package/dist/chunks/menu-4QTf2m-7.es.js.map +0 -1
- package/dist/chunks/popover-Cz6TnNt_.es.js.map +0 -1
- package/dist/chunks/range-calendar-RBEpLQJb.es.js.map +0 -1
- package/dist/chunks/rich-text-input-CrjP71KM.es.js.map +0 -1
- package/dist/chunks/split-button-C5MmKuVW.es.js.map +0 -1
- package/dist/chunks/switch-B5bEl91n.es.js.map +0 -1
- package/dist/code.d.ts +0 -25
- package/dist/collapsible-motion.d.ts +0 -125
- package/dist/combobox.d.ts +0 -236
- package/dist/components.d.ts +0 -299
- package/dist/data-table.d.ts +0 -302
- package/dist/date-input.d.ts +0 -51
- package/dist/date-picker.d.ts +0 -92
- package/dist/date-range-picker.d.ts +0 -73
- package/dist/dialog.d.ts +0 -499
- package/dist/draggable-list.d.ts +0 -331
- package/dist/drawer.d.ts +0 -590
- package/dist/flex.d.ts +0 -14
- package/dist/form-field.d.ts +0 -118
- package/dist/grid.d.ts +0 -35
- package/dist/group.d.ts +0 -38
- package/dist/icon-button.d.ts +0 -75
- package/dist/icon-toggle-button.d.ts +0 -67
- package/dist/icon.d.ts +0 -58
- package/dist/image.d.ts +0 -28
- package/dist/inline-svg.d.ts +0 -81
- package/dist/kbd.d.ts +0 -29
- package/dist/link.d.ts +0 -56
- package/dist/list.d.ts +0 -35
- package/dist/loading-spinner.d.ts +0 -53
- package/dist/localized-field.d.ts +0 -935
- package/dist/multiline-text-input.d.ts +0 -73
- package/dist/number-input.d.ts +0 -63
- package/dist/password-input.d.ts +0 -65
- package/dist/popover.d.ts +0 -34
- package/dist/progress-bar.d.ts +0 -96
- package/dist/radio-input.d.ts +0 -67
- package/dist/range-calendar.d.ts +0 -47
- package/dist/rich-text-input.d.ts +0 -82
- package/dist/search-input.d.ts +0 -56
- package/dist/select.d.ts +0 -246
- package/dist/separator.d.ts +0 -49
- package/dist/setup-jsdom-polyfills.d.ts +0 -10
- package/dist/simple-grid.d.ts +0 -35
- package/dist/spacer.d.ts +0 -41
- package/dist/split-button.d.ts +0 -99
- package/dist/stack.d.ts +0 -30
- package/dist/switch.d.ts +0 -44
- package/dist/table.d.ts +0 -14
- package/dist/tabs.d.ts +0 -213
- package/dist/tag-group.d.ts +0 -75
- package/dist/text-input.d.ts +0 -69
- package/dist/text.d.ts +0 -31
- package/dist/time-input.d.ts +0 -51
- package/dist/toggle-button-group.d.ts +0 -76
- package/dist/toggle-button.d.ts +0 -57
- package/dist/toolbar.d.ts +0 -40
- package/dist/tooltip.d.ts +0 -131
- package/dist/visually-hidden.d.ts +0 -31
|
@@ -4,7 +4,7 @@ import { e as F, a as r } from "./mergeProps-CzyOU2NE.es.js";
|
|
|
4
4
|
import { $ as D } from "./filterDOMProps-BSVCO5jK.es.js";
|
|
5
5
|
import n, { useMemo as g, forwardRef as h, createContext as u, useContext as B } from "react";
|
|
6
6
|
import { $ as T } from "./useControlledState-u436Wbp1.es.js";
|
|
7
|
-
import { $ as H } from "./useButton-
|
|
7
|
+
import { $ as H } from "./useButton-_sJ3_8ha.es.js";
|
|
8
8
|
import { $ as V } from "./useToolbar-CnYu1bn9.es.js";
|
|
9
9
|
import { $ as z } from "./useToggleState-Uh0wTgdI.es.js";
|
|
10
10
|
import { $ as G } from "./useFocusRing-DRIG5NVg.es.js";
|
|
@@ -147,4 +147,4 @@ export {
|
|
|
147
147
|
ee as $,
|
|
148
148
|
p as a
|
|
149
149
|
};
|
|
150
|
-
//# sourceMappingURL=ToggleButton-
|
|
150
|
+
//# sourceMappingURL=ToggleButton-881iW8P_.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToggleButton-Cj9AtHpY.es.js","sources":["../../../../node_modules/.pnpm/@react-aria+button@3.14.2_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@react-aria/button/dist/useToggleButton.mjs","../../../../node_modules/.pnpm/@react-aria+button@3.14.2_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@react-aria/button/dist/useToggleButtonGroup.mjs","../../../../node_modules/.pnpm/@react-stately+toggle@3.9.2_react@19.1.0/node_modules/@react-stately/toggle/dist/useToggleGroupState.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/ToggleButtonGroup.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/ToggleButton.mjs"],"sourcesContent":["import {useButton as $701a24aa0da5b062$export$ea18c227d4417cc3} from \"./useButton.mjs\";\nimport {chain as $h7Tql$chain, mergeProps as $h7Tql$mergeProps} from \"@react-aria/utils\";\n\n/*\n * Copyright 2020 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 $55f54f7887471b58$export$51e84d46ca0bc451(props, state, ref) {\n const { isSelected: isSelected } = state;\n const { isPressed: isPressed, buttonProps: buttonProps } = (0, $701a24aa0da5b062$export$ea18c227d4417cc3)({\n ...props,\n onPress: (0, $h7Tql$chain)(state.toggle, props.onPress)\n }, ref);\n return {\n isPressed: isPressed,\n isSelected: isSelected,\n isDisabled: props.isDisabled || false,\n buttonProps: (0, $h7Tql$mergeProps)(buttonProps, {\n 'aria-pressed': isSelected\n })\n };\n}\n\n\nexport {$55f54f7887471b58$export$51e84d46ca0bc451 as useToggleButton};\n//# sourceMappingURL=useToggleButton.module.js.map\n","import {useToggleButton as $55f54f7887471b58$export$51e84d46ca0bc451} from \"./useToggleButton.mjs\";\nimport {useToolbar as $9iEyV$useToolbar} from \"@react-aria/toolbar\";\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 $4547d1bf40011fdf$export$dd5580ae642f110f(props, state, ref) {\n let { isDisabled: isDisabled } = props;\n let { toolbarProps: toolbarProps } = (0, $9iEyV$useToolbar)(props, ref);\n return {\n groupProps: {\n ...toolbarProps,\n role: state.selectionMode === 'single' ? 'radiogroup' : toolbarProps.role,\n 'aria-disabled': isDisabled\n }\n };\n}\nfunction $4547d1bf40011fdf$export$bc53712daae3d6e6(props, state, ref) {\n let toggleState = {\n isSelected: state.selectedKeys.has(props.id),\n defaultSelected: false,\n setSelected (isSelected) {\n state.setSelected(props.id, isSelected);\n },\n toggle () {\n state.toggleKey(props.id);\n }\n };\n let { isPressed: isPressed, isSelected: isSelected, isDisabled: isDisabled, buttonProps: buttonProps } = (0, $55f54f7887471b58$export$51e84d46ca0bc451)({\n ...props,\n id: undefined,\n isDisabled: props.isDisabled || state.isDisabled\n }, toggleState, ref);\n if (state.selectionMode === 'single') {\n buttonProps.role = 'radio';\n buttonProps['aria-checked'] = toggleState.isSelected;\n delete buttonProps['aria-pressed'];\n }\n return {\n isPressed: isPressed,\n isSelected: isSelected,\n isDisabled: isDisabled,\n buttonProps: buttonProps\n };\n}\n\n\nexport {$4547d1bf40011fdf$export$dd5580ae642f110f as useToggleButtonGroup, $4547d1bf40011fdf$export$bc53712daae3d6e6 as useToggleButtonGroupItem};\n//# sourceMappingURL=useToggleButtonGroup.module.js.map\n","import {useControlledState as $69RjW$useControlledState} from \"@react-stately/utils\";\nimport {useMemo as $69RjW$useMemo} 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 $ad999b7f496648d1$export$8deac67f4addf270(props) {\n let { selectionMode: selectionMode = 'single', disallowEmptySelection: disallowEmptySelection, isDisabled: isDisabled = false } = props;\n let [selectedKeys, setSelectedKeys] = (0, $69RjW$useControlledState)((0, $69RjW$useMemo)(()=>props.selectedKeys ? new Set(props.selectedKeys) : undefined, [\n props.selectedKeys\n ]), (0, $69RjW$useMemo)(()=>props.defaultSelectedKeys ? new Set(props.defaultSelectedKeys) : new Set(), [\n props.defaultSelectedKeys\n ]), props.onSelectionChange);\n return {\n selectionMode: selectionMode,\n isDisabled: isDisabled,\n selectedKeys: selectedKeys,\n setSelectedKeys: setSelectedKeys,\n toggleKey (key) {\n let keys;\n if (selectionMode === 'multiple') {\n keys = new Set(selectedKeys);\n if (keys.has(key) && (!disallowEmptySelection || keys.size > 1)) keys.delete(key);\n else keys.add(key);\n } else keys = new Set(selectedKeys.has(key) && !disallowEmptySelection ? [] : [\n key\n ]);\n setSelectedKeys(keys);\n },\n setSelected (key, isSelected) {\n if (isSelected !== selectedKeys.has(key)) this.toggleKey(key);\n }\n };\n}\n\n\nexport {$ad999b7f496648d1$export$8deac67f4addf270 as useToggleGroupState};\n//# sourceMappingURL=useToggleGroupState.module.js.map\n","import {useContextProps as $64fa3d84918910a7$export$29f1550f4b0d4415, useRenderProps as $64fa3d84918910a7$export$4d86445c2cf5e3} from \"./utils.mjs\";\nimport {SharedElementTransition as $c8a5a149f625efcf$export$758399f318e6385a} from \"./SharedElementTransition.mjs\";\nimport {useToggleButtonGroup as $1lXgK$useToggleButtonGroup} from \"react-aria\";\nimport {filterDOMProps as $1lXgK$filterDOMProps, mergeProps as $1lXgK$mergeProps} from \"@react-aria/utils\";\nimport $1lXgK$react, {createContext as $1lXgK$createContext, forwardRef as $1lXgK$forwardRef} from \"react\";\nimport {useToggleGroupState as $1lXgK$useToggleGroupState} from \"react-stately\";\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 $84b7d8702d4ff4a8$export$298258635ae0dd97 = /*#__PURE__*/ (0, $1lXgK$createContext)({});\nconst $84b7d8702d4ff4a8$export$a8a71863db173133 = /*#__PURE__*/ (0, $1lXgK$createContext)(null);\nconst $84b7d8702d4ff4a8$export$40258cc1d95ff477 = /*#__PURE__*/ (0, $1lXgK$forwardRef)(function ToggleButtonGroup(props, ref) {\n [props, ref] = (0, $64fa3d84918910a7$export$29f1550f4b0d4415)(props, ref, $84b7d8702d4ff4a8$export$298258635ae0dd97);\n let state = (0, $1lXgK$useToggleGroupState)(props);\n let { groupProps: groupProps } = (0, $1lXgK$useToggleButtonGroup)(props, state, ref);\n let renderProps = (0, $64fa3d84918910a7$export$4d86445c2cf5e3)({\n ...props,\n values: {\n isDisabled: state.isDisabled,\n state: state\n },\n defaultClassName: 'react-aria-ToggleButtonGroup'\n });\n let DOMProps = (0, $1lXgK$filterDOMProps)(props, {\n global: true\n });\n return /*#__PURE__*/ (0, $1lXgK$react).createElement(\"div\", {\n ...(0, $1lXgK$mergeProps)(DOMProps, renderProps, groupProps),\n ref: ref,\n slot: props.slot || undefined,\n \"data-orientation\": props.orientation || 'horizontal',\n \"data-disabled\": props.isDisabled || undefined\n }, /*#__PURE__*/ (0, $1lXgK$react).createElement($84b7d8702d4ff4a8$export$a8a71863db173133.Provider, {\n value: state\n }, /*#__PURE__*/ (0, $1lXgK$react).createElement((0, $c8a5a149f625efcf$export$758399f318e6385a), null, renderProps.children)));\n});\n\n\nexport {$84b7d8702d4ff4a8$export$298258635ae0dd97 as ToggleButtonGroupContext, $84b7d8702d4ff4a8$export$a8a71863db173133 as ToggleGroupStateContext, $84b7d8702d4ff4a8$export$40258cc1d95ff477 as ToggleButtonGroup};\n//# sourceMappingURL=ToggleButtonGroup.module.js.map\n","import {useContextProps as $64fa3d84918910a7$export$29f1550f4b0d4415, useRenderProps as $64fa3d84918910a7$export$4d86445c2cf5e3} from \"./utils.mjs\";\nimport {SelectionIndicatorContext as $1d5b8b8664671ef2$export$c9549807523555e0} from \"./SelectionIndicator.mjs\";\nimport {ToggleGroupStateContext as $84b7d8702d4ff4a8$export$a8a71863db173133} from \"./ToggleButtonGroup.mjs\";\nimport {useToggleButtonGroupItem as $jrJ9L$useToggleButtonGroupItem, useToggleButton as $jrJ9L$useToggleButton, useFocusRing as $jrJ9L$useFocusRing, useHover as $jrJ9L$useHover, mergeProps as $jrJ9L$mergeProps} from \"react-aria\";\nimport {filterDOMProps as $jrJ9L$filterDOMProps} from \"@react-aria/utils\";\nimport $jrJ9L$react, {createContext as $jrJ9L$createContext, forwardRef as $jrJ9L$forwardRef, useContext as $jrJ9L$useContext} from \"react\";\nimport {useToggleState as $jrJ9L$useToggleState} from \"react-stately\";\n\n/*\n * Copyright 2022 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\n\nconst $efde0372d7a700fe$export$43506d75ebd2e218 = /*#__PURE__*/ (0, $jrJ9L$createContext)({});\nconst $efde0372d7a700fe$export$d2b052e7b4be1756 = /*#__PURE__*/ (0, $jrJ9L$forwardRef)(function ToggleButton(props, ref) {\n [props, ref] = (0, $64fa3d84918910a7$export$29f1550f4b0d4415)(props, ref, $efde0372d7a700fe$export$43506d75ebd2e218);\n let groupState = (0, $jrJ9L$useContext)((0, $84b7d8702d4ff4a8$export$a8a71863db173133));\n let state = (0, $jrJ9L$useToggleState)(groupState && props.id != null ? {\n isSelected: groupState.selectedKeys.has(props.id),\n onChange (isSelected) {\n groupState.setSelected(props.id, isSelected);\n }\n } : props);\n let { buttonProps: buttonProps, isPressed: isPressed, isSelected: isSelected, isDisabled: isDisabled } = groupState && props.id != null ? (0, $jrJ9L$useToggleButtonGroupItem)({\n ...props,\n id: props.id\n }, groupState, ref) : (0, $jrJ9L$useToggleButton)({\n ...props,\n id: props.id != null ? String(props.id) : undefined\n }, state, ref);\n let { focusProps: focusProps, isFocused: isFocused, isFocusVisible: isFocusVisible } = (0, $jrJ9L$useFocusRing)(props);\n let { hoverProps: hoverProps, isHovered: isHovered } = (0, $jrJ9L$useHover)(props);\n let renderProps = (0, $64fa3d84918910a7$export$4d86445c2cf5e3)({\n ...props,\n id: undefined,\n values: {\n isHovered: isHovered,\n isPressed: isPressed,\n isFocused: isFocused,\n isSelected: state.isSelected,\n isFocusVisible: isFocusVisible,\n isDisabled: isDisabled,\n state: state\n },\n defaultClassName: 'react-aria-ToggleButton'\n });\n let DOMProps = (0, $jrJ9L$filterDOMProps)(props, {\n global: true\n });\n delete DOMProps.id;\n delete DOMProps.onClick;\n return /*#__PURE__*/ (0, $jrJ9L$react).createElement(\"button\", {\n ...(0, $jrJ9L$mergeProps)(DOMProps, renderProps, buttonProps, focusProps, hoverProps),\n ref: ref,\n slot: props.slot || undefined,\n \"data-focused\": isFocused || undefined,\n \"data-disabled\": isDisabled || undefined,\n \"data-pressed\": isPressed || undefined,\n \"data-selected\": isSelected || undefined,\n \"data-hovered\": isHovered || undefined,\n \"data-focus-visible\": isFocusVisible || undefined\n }, /*#__PURE__*/ (0, $jrJ9L$react).createElement((0, $1d5b8b8664671ef2$export$c9549807523555e0).Provider, {\n value: {\n isSelected: isSelected\n }\n }, renderProps.children));\n});\n\n\nexport {$efde0372d7a700fe$export$43506d75ebd2e218 as ToggleButtonContext, $efde0372d7a700fe$export$d2b052e7b4be1756 as ToggleButton};\n//# sourceMappingURL=ToggleButton.module.js.map\n"],"names":["$55f54f7887471b58$export$51e84d46ca0bc451","props","state","ref","isSelected","isPressed","buttonProps","$701a24aa0da5b062$export$ea18c227d4417cc3","$h7Tql$chain","$h7Tql$mergeProps","$4547d1bf40011fdf$export$dd5580ae642f110f","isDisabled","toolbarProps","$9iEyV$useToolbar","$4547d1bf40011fdf$export$bc53712daae3d6e6","toggleState","$ad999b7f496648d1$export$8deac67f4addf270","selectionMode","disallowEmptySelection","selectedKeys","setSelectedKeys","$69RjW$useControlledState","$69RjW$useMemo","key","keys","$84b7d8702d4ff4a8$export$298258635ae0dd97","$1lXgK$createContext","$84b7d8702d4ff4a8$export$a8a71863db173133","$84b7d8702d4ff4a8$export$40258cc1d95ff477","$1lXgK$forwardRef","$64fa3d84918910a7$export$29f1550f4b0d4415","$1lXgK$useToggleGroupState","groupProps","$1lXgK$useToggleButtonGroup","renderProps","$64fa3d84918910a7$export$4d86445c2cf5e3","DOMProps","$1lXgK$filterDOMProps","$1lXgK$react","$1lXgK$mergeProps","$c8a5a149f625efcf$export$758399f318e6385a","$efde0372d7a700fe$export$43506d75ebd2e218","$jrJ9L$createContext","$efde0372d7a700fe$export$d2b052e7b4be1756","$jrJ9L$forwardRef","groupState","$jrJ9L$useContext","$jrJ9L$useToggleState","$jrJ9L$useToggleButtonGroupItem","$jrJ9L$useToggleButton","focusProps","isFocused","isFocusVisible","$jrJ9L$useFocusRing","hoverProps","isHovered","$jrJ9L$useHover","$jrJ9L$filterDOMProps","$jrJ9L$react","$jrJ9L$mergeProps","$1d5b8b8664671ef2$export$c9549807523555e0"],"mappings":";;;;;;;;;;;AAeA,SAASA,EAA0CC,GAAOC,GAAOC,GAAK;AAClE,QAAM,EAAE,YAAYC,EAAU,IAAKF,GAC7B,EAAE,WAAWG,GAAW,aAAaC,EAAW,IAASC,EAA2C;AAAA,IACtG,GAAGN;AAAA,IACH,SAAaO,EAAcN,EAAM,QAAQD,EAAM,OAAO;AAAA,EAC9D,GAAOE,CAAG;AACN,SAAO;AAAA,IACH,WAAWE;AAAA,IACX,YAAYD;AAAA,IACZ,YAAYH,EAAM,cAAc;AAAA,IAChC,aAAiBQ,EAAmBH,GAAa;AAAA,MAC7C,gBAAgBF;AAAA,IAC5B,CAAS;AAAA,EACT;AACA;ACdA,SAASM,EAA0CT,GAAOC,GAAOC,GAAK;AAClE,MAAI,EAAE,YAAYQ,EAAU,IAAKV,GAC7B,EAAE,cAAcW,EAAY,IAASC,EAAmBZ,GAAOE,CAAG;AACtE,SAAO;AAAA,IACH,YAAY;AAAA,MACR,GAAGS;AAAA,MACH,MAAMV,EAAM,kB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MAChB,YAAYzC;AAAA,MACZ,OAAOT;AAAA,IACnB;AAAA,IACQ,kBAAkB;AAAA,EAC1B,CAAK,GACGkC,IAAeqB,EAAuBxD,GAAO;AAAA,IAC7C,QAAQ;AAAA,EAChB,CAAK;AACD,gBAAOmC,EAAS,IAChB,OAAOA,EAAS,SACSsB,gBAAAA,EAAc,cAAc,UAAU;AAAA,IAC3D,GAAOC,EAAmBvB,GAAUF,GAAa5B,GAAa4C,GAAYI,CAAU;AAAA,IACpF,KAAKnD;AAAA,IACL,MAAMF,EAAM,QAAQ;AAAA,IACpB,gBAAgBkD,KAAa;AAAA,IAC7B,iBAAiBxC,KAAc;AAAA,IAC/B,gBAAgBN,KAAa;AAAA,IAC7B,iBAAiBD,KAAc;AAAA,IAC/B,gBAAgBmD,KAAa;AAAA,IAC7B,sBAAsBH,KAAkB;AAAA,EAChD,GAAyBM,gBAAAA,EAAc,cAAkBE,EAA2C,UAAU;AAAA,IACtG,OAAO;AAAA,MACH,YAAYxD;AAAA,IACxB;AAAA,EACA,GAAO8B,EAAY,QAAQ,CAAC;AAC5B,CAAC;","x_google_ignoreList":[0,1,2,3,4]}
|
|
1
|
+
{"version":3,"file":"ToggleButton-881iW8P_.es.js","sources":["../../../../node_modules/.pnpm/@react-aria+button@3.14.2_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@react-aria/button/dist/useToggleButton.mjs","../../../../node_modules/.pnpm/@react-aria+button@3.14.2_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@react-aria/button/dist/useToggleButtonGroup.mjs","../../../../node_modules/.pnpm/@react-stately+toggle@3.9.2_react@19.1.0/node_modules/@react-stately/toggle/dist/useToggleGroupState.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/ToggleButtonGroup.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/ToggleButton.mjs"],"sourcesContent":["import {useButton as $701a24aa0da5b062$export$ea18c227d4417cc3} from \"./useButton.mjs\";\nimport {chain as $h7Tql$chain, mergeProps as $h7Tql$mergeProps} from \"@react-aria/utils\";\n\n/*\n * Copyright 2020 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 $55f54f7887471b58$export$51e84d46ca0bc451(props, state, ref) {\n const { isSelected: isSelected } = state;\n const { isPressed: isPressed, buttonProps: buttonProps } = (0, $701a24aa0da5b062$export$ea18c227d4417cc3)({\n ...props,\n onPress: (0, $h7Tql$chain)(state.toggle, props.onPress)\n }, ref);\n return {\n isPressed: isPressed,\n isSelected: isSelected,\n isDisabled: props.isDisabled || false,\n buttonProps: (0, $h7Tql$mergeProps)(buttonProps, {\n 'aria-pressed': isSelected\n })\n };\n}\n\n\nexport {$55f54f7887471b58$export$51e84d46ca0bc451 as useToggleButton};\n//# sourceMappingURL=useToggleButton.module.js.map\n","import {useToggleButton as $55f54f7887471b58$export$51e84d46ca0bc451} from \"./useToggleButton.mjs\";\nimport {useToolbar as $9iEyV$useToolbar} from \"@react-aria/toolbar\";\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 $4547d1bf40011fdf$export$dd5580ae642f110f(props, state, ref) {\n let { isDisabled: isDisabled } = props;\n let { toolbarProps: toolbarProps } = (0, $9iEyV$useToolbar)(props, ref);\n return {\n groupProps: {\n ...toolbarProps,\n role: state.selectionMode === 'single' ? 'radiogroup' : toolbarProps.role,\n 'aria-disabled': isDisabled\n }\n };\n}\nfunction $4547d1bf40011fdf$export$bc53712daae3d6e6(props, state, ref) {\n let toggleState = {\n isSelected: state.selectedKeys.has(props.id),\n defaultSelected: false,\n setSelected (isSelected) {\n state.setSelected(props.id, isSelected);\n },\n toggle () {\n state.toggleKey(props.id);\n }\n };\n let { isPressed: isPressed, isSelected: isSelected, isDisabled: isDisabled, buttonProps: buttonProps } = (0, $55f54f7887471b58$export$51e84d46ca0bc451)({\n ...props,\n id: undefined,\n isDisabled: props.isDisabled || state.isDisabled\n }, toggleState, ref);\n if (state.selectionMode === 'single') {\n buttonProps.role = 'radio';\n buttonProps['aria-checked'] = toggleState.isSelected;\n delete buttonProps['aria-pressed'];\n }\n return {\n isPressed: isPressed,\n isSelected: isSelected,\n isDisabled: isDisabled,\n buttonProps: buttonProps\n };\n}\n\n\nexport {$4547d1bf40011fdf$export$dd5580ae642f110f as useToggleButtonGroup, $4547d1bf40011fdf$export$bc53712daae3d6e6 as useToggleButtonGroupItem};\n//# sourceMappingURL=useToggleButtonGroup.module.js.map\n","import {useControlledState as $69RjW$useControlledState} from \"@react-stately/utils\";\nimport {useMemo as $69RjW$useMemo} 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 $ad999b7f496648d1$export$8deac67f4addf270(props) {\n let { selectionMode: selectionMode = 'single', disallowEmptySelection: disallowEmptySelection, isDisabled: isDisabled = false } = props;\n let [selectedKeys, setSelectedKeys] = (0, $69RjW$useControlledState)((0, $69RjW$useMemo)(()=>props.selectedKeys ? new Set(props.selectedKeys) : undefined, [\n props.selectedKeys\n ]), (0, $69RjW$useMemo)(()=>props.defaultSelectedKeys ? new Set(props.defaultSelectedKeys) : new Set(), [\n props.defaultSelectedKeys\n ]), props.onSelectionChange);\n return {\n selectionMode: selectionMode,\n isDisabled: isDisabled,\n selectedKeys: selectedKeys,\n setSelectedKeys: setSelectedKeys,\n toggleKey (key) {\n let keys;\n if (selectionMode === 'multiple') {\n keys = new Set(selectedKeys);\n if (keys.has(key) && (!disallowEmptySelection || keys.size > 1)) keys.delete(key);\n else keys.add(key);\n } else keys = new Set(selectedKeys.has(key) && !disallowEmptySelection ? [] : [\n key\n ]);\n setSelectedKeys(keys);\n },\n setSelected (key, isSelected) {\n if (isSelected !== selectedKeys.has(key)) this.toggleKey(key);\n }\n };\n}\n\n\nexport {$ad999b7f496648d1$export$8deac67f4addf270 as useToggleGroupState};\n//# sourceMappingURL=useToggleGroupState.module.js.map\n","import {useContextProps as $64fa3d84918910a7$export$29f1550f4b0d4415, useRenderProps as $64fa3d84918910a7$export$4d86445c2cf5e3} from \"./utils.mjs\";\nimport {SharedElementTransition as $c8a5a149f625efcf$export$758399f318e6385a} from \"./SharedElementTransition.mjs\";\nimport {useToggleButtonGroup as $1lXgK$useToggleButtonGroup} from \"react-aria\";\nimport {filterDOMProps as $1lXgK$filterDOMProps, mergeProps as $1lXgK$mergeProps} from \"@react-aria/utils\";\nimport $1lXgK$react, {createContext as $1lXgK$createContext, forwardRef as $1lXgK$forwardRef} from \"react\";\nimport {useToggleGroupState as $1lXgK$useToggleGroupState} from \"react-stately\";\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 $84b7d8702d4ff4a8$export$298258635ae0dd97 = /*#__PURE__*/ (0, $1lXgK$createContext)({});\nconst $84b7d8702d4ff4a8$export$a8a71863db173133 = /*#__PURE__*/ (0, $1lXgK$createContext)(null);\nconst $84b7d8702d4ff4a8$export$40258cc1d95ff477 = /*#__PURE__*/ (0, $1lXgK$forwardRef)(function ToggleButtonGroup(props, ref) {\n [props, ref] = (0, $64fa3d84918910a7$export$29f1550f4b0d4415)(props, ref, $84b7d8702d4ff4a8$export$298258635ae0dd97);\n let state = (0, $1lXgK$useToggleGroupState)(props);\n let { groupProps: groupProps } = (0, $1lXgK$useToggleButtonGroup)(props, state, ref);\n let renderProps = (0, $64fa3d84918910a7$export$4d86445c2cf5e3)({\n ...props,\n values: {\n isDisabled: state.isDisabled,\n state: state\n },\n defaultClassName: 'react-aria-ToggleButtonGroup'\n });\n let DOMProps = (0, $1lXgK$filterDOMProps)(props, {\n global: true\n });\n return /*#__PURE__*/ (0, $1lXgK$react).createElement(\"div\", {\n ...(0, $1lXgK$mergeProps)(DOMProps, renderProps, groupProps),\n ref: ref,\n slot: props.slot || undefined,\n \"data-orientation\": props.orientation || 'horizontal',\n \"data-disabled\": props.isDisabled || undefined\n }, /*#__PURE__*/ (0, $1lXgK$react).createElement($84b7d8702d4ff4a8$export$a8a71863db173133.Provider, {\n value: state\n }, /*#__PURE__*/ (0, $1lXgK$react).createElement((0, $c8a5a149f625efcf$export$758399f318e6385a), null, renderProps.children)));\n});\n\n\nexport {$84b7d8702d4ff4a8$export$298258635ae0dd97 as ToggleButtonGroupContext, $84b7d8702d4ff4a8$export$a8a71863db173133 as ToggleGroupStateContext, $84b7d8702d4ff4a8$export$40258cc1d95ff477 as ToggleButtonGroup};\n//# sourceMappingURL=ToggleButtonGroup.module.js.map\n","import {useContextProps as $64fa3d84918910a7$export$29f1550f4b0d4415, useRenderProps as $64fa3d84918910a7$export$4d86445c2cf5e3} from \"./utils.mjs\";\nimport {SelectionIndicatorContext as $1d5b8b8664671ef2$export$c9549807523555e0} from \"./SelectionIndicator.mjs\";\nimport {ToggleGroupStateContext as $84b7d8702d4ff4a8$export$a8a71863db173133} from \"./ToggleButtonGroup.mjs\";\nimport {useToggleButtonGroupItem as $jrJ9L$useToggleButtonGroupItem, useToggleButton as $jrJ9L$useToggleButton, useFocusRing as $jrJ9L$useFocusRing, useHover as $jrJ9L$useHover, mergeProps as $jrJ9L$mergeProps} from \"react-aria\";\nimport {filterDOMProps as $jrJ9L$filterDOMProps} from \"@react-aria/utils\";\nimport $jrJ9L$react, {createContext as $jrJ9L$createContext, forwardRef as $jrJ9L$forwardRef, useContext as $jrJ9L$useContext} from \"react\";\nimport {useToggleState as $jrJ9L$useToggleState} from \"react-stately\";\n\n/*\n * Copyright 2022 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\n\nconst $efde0372d7a700fe$export$43506d75ebd2e218 = /*#__PURE__*/ (0, $jrJ9L$createContext)({});\nconst $efde0372d7a700fe$export$d2b052e7b4be1756 = /*#__PURE__*/ (0, $jrJ9L$forwardRef)(function ToggleButton(props, ref) {\n [props, ref] = (0, $64fa3d84918910a7$export$29f1550f4b0d4415)(props, ref, $efde0372d7a700fe$export$43506d75ebd2e218);\n let groupState = (0, $jrJ9L$useContext)((0, $84b7d8702d4ff4a8$export$a8a71863db173133));\n let state = (0, $jrJ9L$useToggleState)(groupState && props.id != null ? {\n isSelected: groupState.selectedKeys.has(props.id),\n onChange (isSelected) {\n groupState.setSelected(props.id, isSelected);\n }\n } : props);\n let { buttonProps: buttonProps, isPressed: isPressed, isSelected: isSelected, isDisabled: isDisabled } = groupState && props.id != null ? (0, $jrJ9L$useToggleButtonGroupItem)({\n ...props,\n id: props.id\n }, groupState, ref) : (0, $jrJ9L$useToggleButton)({\n ...props,\n id: props.id != null ? String(props.id) : undefined\n }, state, ref);\n let { focusProps: focusProps, isFocused: isFocused, isFocusVisible: isFocusVisible } = (0, $jrJ9L$useFocusRing)(props);\n let { hoverProps: hoverProps, isHovered: isHovered } = (0, $jrJ9L$useHover)(props);\n let renderProps = (0, $64fa3d84918910a7$export$4d86445c2cf5e3)({\n ...props,\n id: undefined,\n values: {\n isHovered: isHovered,\n isPressed: isPressed,\n isFocused: isFocused,\n isSelected: state.isSelected,\n isFocusVisible: isFocusVisible,\n isDisabled: isDisabled,\n state: state\n },\n defaultClassName: 'react-aria-ToggleButton'\n });\n let DOMProps = (0, $jrJ9L$filterDOMProps)(props, {\n global: true\n });\n delete DOMProps.id;\n delete DOMProps.onClick;\n return /*#__PURE__*/ (0, $jrJ9L$react).createElement(\"button\", {\n ...(0, $jrJ9L$mergeProps)(DOMProps, renderProps, buttonProps, focusProps, hoverProps),\n ref: ref,\n slot: props.slot || undefined,\n \"data-focused\": isFocused || undefined,\n \"data-disabled\": isDisabled || undefined,\n \"data-pressed\": isPressed || undefined,\n \"data-selected\": isSelected || undefined,\n \"data-hovered\": isHovered || undefined,\n \"data-focus-visible\": isFocusVisible || undefined\n }, /*#__PURE__*/ (0, $jrJ9L$react).createElement((0, $1d5b8b8664671ef2$export$c9549807523555e0).Provider, {\n value: {\n isSelected: isSelected\n }\n }, renderProps.children));\n});\n\n\nexport {$efde0372d7a700fe$export$43506d75ebd2e218 as ToggleButtonContext, $efde0372d7a700fe$export$d2b052e7b4be1756 as ToggleButton};\n//# sourceMappingURL=ToggleButton.module.js.map\n"],"names":["$55f54f7887471b58$export$51e84d46ca0bc451","props","state","ref","isSelected","isPressed","buttonProps","$701a24aa0da5b062$export$ea18c227d4417cc3","$h7Tql$chain","$h7Tql$mergeProps","$4547d1bf40011fdf$export$dd5580ae642f110f","isDisabled","toolbarProps","$9iEyV$useToolbar","$4547d1bf40011fdf$export$bc53712daae3d6e6","toggleState","$ad999b7f496648d1$export$8deac67f4addf270","selectionMode","disallowEmptySelection","selectedKeys","setSelectedKeys","$69RjW$useControlledState","$69RjW$useMemo","key","keys","$84b7d8702d4ff4a8$export$298258635ae0dd97","$1lXgK$createContext","$84b7d8702d4ff4a8$export$a8a71863db173133","$84b7d8702d4ff4a8$export$40258cc1d95ff477","$1lXgK$forwardRef","$64fa3d84918910a7$export$29f1550f4b0d4415","$1lXgK$useToggleGroupState","groupProps","$1lXgK$useToggleButtonGroup","renderProps","$64fa3d84918910a7$export$4d86445c2cf5e3","DOMProps","$1lXgK$filterDOMProps","$1lXgK$react","$1lXgK$mergeProps","$c8a5a149f625efcf$export$758399f318e6385a","$efde0372d7a700fe$export$43506d75ebd2e218","$jrJ9L$createContext","$efde0372d7a700fe$export$d2b052e7b4be1756","$jrJ9L$forwardRef","groupState","$jrJ9L$useContext","$jrJ9L$useToggleState","$jrJ9L$useToggleButtonGroupItem","$jrJ9L$useToggleButton","focusProps","isFocused","isFocusVisible","$jrJ9L$useFocusRing","hoverProps","isHovered","$jrJ9L$useHover","$jrJ9L$filterDOMProps","$jrJ9L$react","$jrJ9L$mergeProps","$1d5b8b8664671ef2$export$c9549807523555e0"],"mappings":";;;;;;;;;;;AAeA,SAASA,EAA0CC,GAAOC,GAAOC,GAAK;AAClE,QAAM,EAAE,YAAYC,EAAU,IAAKF,GAC7B,EAAE,WAAWG,GAAW,aAAaC,EAAW,IAASC,EAA2C;AAAA,IACtG,GAAGN;AAAA,IACH,SAAaO,EAAcN,EA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/@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,CACtD,GAAI,CAAE,uBAAwBC,EAAyB,GAAO,WAAYC,EAAa,EAAK,EAAKF,EAC7F,CAACG,EAAcC,CAAe,EAAQC,EAAAA,0CAA+BC,EAAAA,QAAgB,IAAIN,EAAM,aAAe,IAAI,IAAIA,EAAM,YAAY,EAAI,OAAW,CACvJA,EAAM,YACd,CAAK,EAAOM,EAAAA,QAAgB,IAAIN,EAAM,oBAAsB,IAAI,IAAIA,EAAM,mBAAmB,EAAI,IAAI,IAAO,CACpGA,EAAM,mBACd,CAAK,EAAGA,EAAM,gBAAgB,EAC1B,OAAIO,EAAAA,UAAkB,IAAI,CAEtB,GAAI,CAACN,GAA0BE,EAAa,KAAO,EAAG,CAClD,IAAIK,EAAWL,EAAa,OAAM,EAAG,KAAI,EAAG,MACxCK,GAAY,MAAMJ,EAAgB,IAAI,IAAI,CAC1CI,CAChB,CAAa,CAAC,CACN,CACJ,CAAC,EACM,CACH,uBAAwBP,EACxB,WAAYC,EACZ,aAAcC,EACd,gBAAiBC,EACjB,UAAWK,EAAK,CACZ,IAAIC,EACAT,GACA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AAAG,EAAAA,IAACe,EAAA,CAAmB,GAAGvB,EAAY,SAAAW,CAAA,CAAS,EAC9C,CAEJ,ECbaa,EAAgB,CAAC,CAC5B,SAAAb,EACA,MAAAc,EACA,IAAAxE,EACA,GAAGf,CACL,IAA0B,CACxB,KAAM,CAACmE,EAAYL,CAAS,EAAIO,EAAAA,kBAAkBrE,CAAK,EACjDwF,EAAkB,CACtB,GAAG1B,EACH,GAAIyB,CAAA,EAGN,OACEjB,EAAAA,IAACd,EAAA,CACC,aAAY+B,EACZ,IAAAxE,EACC,GAAGoD,EACJ,QAAO,GAEP,SAAAG,EAAAA,IAACmB,EAAA,CAAc,GAAGD,EAAkB,SAAAf,CAAA,CAAS,CAAA,CAAA,CAGnD,ECpBaiB,EAAY,CACvB,KAAM7B,EACN,KAAMyB,EACN,OAAQd,EACR,QAASY,EACT,mBAAoBxB,CACtB","x_google_ignoreList":[0,1]}
|
|
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,CACtD,GAAI,CAAE,uBAAwBC,EAAy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1
|
import { createSlotRecipeContext as _ } from "@chakra-ui/react";
|
|
2
2
|
import { jsx as i, jsxs as y } from "react/jsx-runtime";
|
|
3
3
|
import { useSlotRecipe as j } from "@chakra-ui/react/styled-system";
|
|
4
|
-
import { $ as D, a as N } from "./Button-
|
|
4
|
+
import { $ as D, a as N } from "./Button-Dx3xzN8n.es.js";
|
|
5
5
|
import { a as P, c as T, d as w, $ as G, f as z } from "./utils-Cyja2WdR.es.js";
|
|
6
6
|
import { a as R, $ as B } from "./mergeProps-CzyOU2NE.es.js";
|
|
7
7
|
import { $ as g } from "./filterDOMProps-BSVCO5jK.es.js";
|
|
@@ -218,4 +218,4 @@ export {
|
|
|
218
218
|
ce as d,
|
|
219
219
|
h as e
|
|
220
220
|
};
|
|
221
|
-
//# sourceMappingURL=accordion-
|
|
221
|
+
//# sourceMappingURL=accordion-CKDnNkVv.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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,EAA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A,EACA,GAAGf;AACL,MAA6B;AAC3B,QAAM,CAACmE,GAAYL,CAAS,IAAIO,EAAkBrE,CAAK;AAEvD,SACE,gBAAAsE,EAACZ,IAAA,EAAmB,KAAA3C,GAAW,GAAGoD,GAAY,SAAO,IACnD,UAAA,gBAAAG,EAACe,IAAA,EAAmB,GAAGvB,GAAY,UAAAW,EAAA,CAAS,GAC9C;AAEJ,GCbaa,KAAgB,CAAC;AAAA,EAC5B,UAAAb;AAAA,EACA,OAAAc;AAAA,EACA,KAAAxE;AAAA,EACA,GAAGf;AACL,MAA0B;AACxB,QAAM,CAACmE,GAAYL,CAAS,IAAIO,EAAkBrE,CAAK,GACjDwF,IAAkB;AAAA,IACtB,GAAG1B;AAAA,IACH,IAAIyB;AAAA;AAAA,EAAA;AAGN,SACE,gBAAAjB;AAAA,IAACd;AAAA,IAAA;AAAA,MACC,cAAY+B;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]}
|
|
@@ -4,7 +4,7 @@ import { createSlotRecipeContext as y } from "@chakra-ui/react";
|
|
|
4
4
|
import { B as E } from "./box-DuBoAZvq.es.js";
|
|
5
5
|
import { S as R } from "./stack-CoNreM7B.es.js";
|
|
6
6
|
import { CheckCircleOutline as $, WarningAmber as w, Info as M, ErrorOutline as S, Clear as k } from "@commercetools/nimbus-icons";
|
|
7
|
-
import { I as P } from "./icon-button-
|
|
7
|
+
import { I as P } from "./icon-button-DQS2apw-.es.js";
|
|
8
8
|
import { defineMessages as j, useIntl as O } from "react-intl";
|
|
9
9
|
const { withProvider: W, withContext: o } = /* @__PURE__ */ y({
|
|
10
10
|
key: "alert"
|
|
@@ -135,4 +135,4 @@ export {
|
|
|
135
135
|
h as d,
|
|
136
136
|
v as e
|
|
137
137
|
};
|
|
138
|
-
//# sourceMappingURL=alert-
|
|
138
|
+
//# sourceMappingURL=alert-lNg0Rz2w.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alert-Cz2mnKir.es.js","sources":["../../src/components/alert/alert.slots.tsx","../../src/components/alert/components/alert.root.tsx","../../src/components/alert/components/alert.title.tsx","../../src/components/alert/components/alert.description.tsx","../../src/components/alert/components/alert.actions.tsx","../../src/components/alert/alert.i18n.ts","../../src/components/alert/components/alert.dismiss-button.tsx","../../src/components/alert/alert.tsx"],"sourcesContent":["import { createSlotRecipeContext } from \"@chakra-ui/react\";\nimport type {\n AlertActionsSlotProps,\n AlertDescriptionProps,\n AlertDismissButtonProps,\n AlertIconSlotProps,\n AlertRootSlotProps,\n AlertTitleProps,\n} from \"./alert.types\";\n\nconst { withProvider, withContext } = createSlotRecipeContext({\n key: \"alert\",\n});\n\nexport const AlertRoot = withProvider<HTMLDivElement, AlertRootSlotProps>(\n \"div\",\n \"root\"\n);\n\nexport const AlertTitle = withContext<HTMLDivElement, AlertTitleProps>(\n \"div\",\n \"title\"\n);\n\nexport const AlertDescription = withContext<\n HTMLDivElement,\n AlertDescriptionProps\n>(\"div\", \"description\");\n\nexport const AlertIcon = withContext<HTMLDivElement, AlertIconSlotProps>(\n \"div\",\n \"icon\"\n);\n\nexport const AlertActions = withContext<HTMLDivElement, AlertActionsSlotProps>(\n \"div\",\n \"actions\"\n);\n\n// This is a div wrapper for layout placement - note that we expect it to receive `IconButton` props, but we use a `div`.\n// We then forward the consumer props to the interior `IconButton` component.\nexport const AlertDismissButton = withContext<\n HTMLDivElement,\n AlertDismissButtonProps\n>(\"div\", \"dismissButton\");\n","import { createContext, useMemo, useState, type ReactNode } from \"react\";\nimport { AlertRoot as AlertRootSlot, AlertIcon } from \"../alert.slots\";\nimport type { AlertProps, AlertRootComponent } from \"../alert.types\";\nimport { Box } from \"../../box\";\nimport { Stack } from \"../../stack\";\nimport {\n CheckCircleOutline,\n ErrorOutline,\n Info,\n WarningAmber,\n} from \"@commercetools/nimbus-icons\";\n\nconst getIconFromTone = (tone: AlertProps[\"tone\"]) => {\n switch (tone) {\n case \"critical\":\n return <ErrorOutline />;\n case \"info\":\n return <Info />;\n case \"warning\":\n return <WarningAmber />;\n case \"positive\":\n return <CheckCircleOutline />;\n default:\n return null;\n }\n};\n\ntype AlertContextValue = {\n setTitle: (title: ReactNode) => void;\n setDescription: (description: ReactNode) => void;\n setActions: (actions: ReactNode) => void;\n setDismiss: (dismiss: ReactNode) => void;\n};\n\nexport const AlertContext = createContext<AlertContextValue | undefined>(\n undefined\n);\n\n/**\n * # Alert\n *\n * Provides feedback to the user about the status of an action or system event\n *\n * @see {@link https://nimbus-documentation.vercel.app/components/feedback/alert}\n */\nexport const AlertRoot: AlertRootComponent = (props) => {\n const { ref, children, ...restProps } = props;\n const [titleNode, setTitle] = useState<ReactNode>(null);\n const [descriptionNode, setDescription] = useState<ReactNode>(null);\n const [actionsNode, setActions] = useState<ReactNode>(null);\n const [dismissNode, setDismiss] = useState<ReactNode>(null);\n\n // Memoize the context value so we don't cause unnecessary re-renders\n const contextValue = useMemo(\n () => ({\n setTitle,\n setDescription,\n setActions,\n setDismiss,\n }),\n [setTitle, setDescription, setActions, setDismiss]\n );\n\n return (\n <AlertContext.Provider value={contextValue}>\n <AlertRootSlot ref={ref} {...restProps} role=\"alert\">\n <AlertIcon alignItems=\"flex-start\">\n {getIconFromTone(restProps.tone)}\n </AlertIcon>\n <Stack flex=\"1\" gap=\"200\">\n <Box>\n {titleNode}\n {descriptionNode}\n </Box>\n {actionsNode}\n </Stack>\n {dismissNode}\n\n {children}\n </AlertRootSlot>\n </AlertContext.Provider>\n );\n};\n\nAlertRoot.displayName = \"Alert.Root\";\n","import { useContext, useEffect } from \"react\";\nimport { AlertTitle as AlertTitleSlot } from \"../alert.slots\";\nimport type { AlertTitleProps } from \"../alert.types\";\nimport { AlertContext } from \"./alert.root\";\n\nexport const AlertTitle = ({ children, ...props }: AlertTitleProps) => {\n const context = useContext(AlertContext);\n\n useEffect(() => {\n if (context) {\n const slotElement = (\n <AlertTitleSlot {...props} fontWeight=\"600\">\n {children}\n </AlertTitleSlot>\n );\n // Register it with the parent\n context.setTitle(slotElement);\n\n // On unmount, remove it\n return () => context.setTitle(null);\n }\n }, [children, props]);\n\n return null;\n};\n\nAlertTitle.displayName = \"Alert.Title\";\n","import { useContext, useEffect } from \"react\";\nimport { AlertDescription as AlertDescriptionSlot } from \"../alert.slots\";\nimport type { AlertDescriptionProps } from \"../alert.types\";\nimport { AlertContext } from \"./alert.root\";\n\nexport const AlertDescription = ({\n children,\n ...props\n}: AlertDescriptionProps) => {\n const context = useContext(AlertContext);\n\n useEffect(() => {\n if (context) {\n const slotElement = (\n <AlertDescriptionSlot {...props}>{children}</AlertDescriptionSlot>\n );\n // Register it with the parent\n context.setDescription(slotElement);\n\n // On unmount, remove it\n return () => context.setDescription(null);\n }\n }, [children, props]);\n\n return null;\n};\n\nAlertDescription.displayName = \"Alert.Description\";\n","import { useContext, useEffect } from \"react\";\nimport { AlertActions as AlertActionsSlot } from \"../alert.slots\";\nimport type { AlertActionsProps } from \"../alert.types\";\nimport { AlertContext } from \"./alert.root\";\n\nexport const AlertActions = ({ children, ...props }: AlertActionsProps) => {\n const context = useContext(AlertContext);\n\n useEffect(() => {\n if (context) {\n const slotElement = (\n <AlertActionsSlot {...props}>{children}</AlertActionsSlot>\n );\n // Register it with the parent\n context.setActions(slotElement);\n\n // On unmount, remove it\n return () => context.setActions(null);\n }\n }, [children, props]);\n\n return null;\n};\n\nAlertActions.displayName = \"Alert.Actions\";\n","import { defineMessages } from \"react-intl\";\n\nexport const messages = defineMessages({\n dismiss: {\n id: \"Nimbus.Alert.dismiss\",\n description: \"aria-label for the dismiss button in an alert\",\n defaultMessage: \"Dismiss\",\n },\n});\n","import { useContext, useEffect } from \"react\";\nimport { AlertDismissButton as AlertDismissButtonSlot } from \"../alert.slots\";\nimport type { AlertDismissButtonProps } from \"../alert.types\";\nimport { Clear } from \"@commercetools/nimbus-icons\";\nimport { IconButton } from \"../../icon-button\";\nimport { AlertContext } from \"./alert.root\";\nimport { useIntl } from \"react-intl\";\nimport { messages } from \"../alert.i18n\";\n\nexport const AlertDismissButton = ({\n children,\n ...props\n}: AlertDismissButtonProps) => {\n const context = useContext(AlertContext);\n const intl = useIntl();\n\n useEffect(() => {\n if (context) {\n const slotElement = (\n <AlertDismissButtonSlot>\n <IconButton\n aria-label={intl.formatMessage(messages.dismiss)}\n {...props}\n variant=\"ghost\"\n size=\"2xs\"\n >\n <Clear role=\"img\" />\n </IconButton>\n </AlertDismissButtonSlot>\n );\n // Register it with the parent\n context.setDismiss(slotElement);\n\n // On unmount, remove it\n return () => context.setDismiss(null);\n }\n }, [children, props]);\n\n return null;\n};\n\nAlertDismissButton.displayName = \"Alert.DismissButton\";\n","import { AlertTitle } from \"./components/alert.title\";\nimport { AlertDescription } from \"./components/alert.description\";\nimport { AlertActions } from \"./components/alert.actions\";\nimport { AlertDismissButton } from \"./components/alert.dismiss-button\";\nimport { AlertRoot } from \"./components/alert.root\";\n\n/**\n * Alert\n * ============================================================\n * Provides feedback to the user about the status of an action or system event\n */\nexport const Alert = {\n Root: AlertRoot,\n Title: AlertTitle,\n Description: AlertDescription,\n Actions: AlertActions,\n DismissButton: AlertDismissButton,\n};\n\n// exports for internal use by react-docgen\nexport {\n AlertRoot as _AlertRoot,\n AlertTitle as _AlertTitle,\n AlertDescription as _AlertDescription,\n AlertActions as _AlertActions,\n AlertDismissButton as _AlertDismissButton,\n};\n"],"names":["withProvider","withContext","createSlotRecipeContext","AlertRoot","AlertTitle","AlertDescription","AlertIcon","AlertActions","AlertDismissButton","getIconFromTone","tone","ErrorOutline","Info","WarningAmber","CheckCircleOutline","AlertContext","createContext","props","ref","children","restProps","titleNode","setTitle","useState","descriptionNode","setDescription","actionsNode","setActions","dismissNode","setDismiss","contextValue","useMemo","jsx","jsxs","AlertRootSlot","Stack","Box","context","useContext","useEffect","slotElement","AlertTitleSlot","AlertDescriptionSlot","AlertActionsSlot","messages","defineMessages","intl","useIntl","AlertDismissButtonSlot","IconButton","Clear","Alert"],"mappings":";;;;;;;;AAUA,MAAM,EAAE,cAAAA,GAAc,aAAAC,EAAA,IAAgB,gBAAAC,EAAwB;AAAA,EAC5D,KAAK;AACP,CAAC,GAEYC,IAAY,gBAAAH;AAAA,EACvB;AAAA,EACA;AACF,GAEaI,IAAa,gBAAAH;AAAA,EACxB;AAAA,EACA;AACF,GAEaI,IAAmB,gBAAAJ,EAG9B,OAAO,aAAa,GAETK,IAAY,gBAAAL;AAAA,EACvB;AAAA,EACA;AACF,GAEaM,IAAe,gBAAAN;AAAA,EAC1B;AAAA,EACA;AACF,GAIaO,IAAqB,gBAAAP,EAGhC,OAAO,eAAe,GChClBQ,IAAkB,CAACC,MAA6B;AACpD,UAAQA,GAAA;AAAA,IACN,KAAK;AACH,+BAAQC,GAAA,EAAa;AAAA,IACvB,KAAK;AACH,+BAAQC,GAAA,EAAK;AAAA,IACf,KAAK;AACH,+BAAQC,GAAA,EAAa;AAAA,IACvB,KAAK;AACH,+BAAQC,GAAA,EAAmB;AAAA,IAC7B;AACE,aAAO;AAAA,EAAA;AAEb,GASaC,IAAe,gBAAAC;AAAA,EAC1B;AACF,GASab,IAAgC,CAACc,MAAU;AACtD,QAAM,EAAE,KAAAC,GAAK,UAAAC,GAAU,GAAGC,MAAcH,GAClC,CAACI,GAAWC,CAAQ,IAAIC,EAAoB,IAAI,GAChD,CAACC,GAAiBC,CAAc,IAAIF,EAAoB,IAAI,GAC5D,CAACG,GAAaC,CAAU,IAAIJ,EAAoB,IAAI,GACpD,CAACK,GAAaC,CAAU,IAAIN,EAAoB,IAAI,GAGpDO,IAAeC;AAAA,IACnB,OAAO;AAAA,MACL,UA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AC,GAEb;AACT;AAEAT,EAAmB,cAAc;AC9B1B,MAAM2C,KAAQ;AAAA,EACnB,MAAMhD;AAAA,EACN,OAAOC;AAAA,EACP,aAAaC;AAAA,EACb,SAASE;AAAA,EACT,eAAeC;AACjB;"}
|
|
1
|
+
{"version":3,"file":"alert-lNg0Rz2w.es.js","sources":["../../src/components/alert/alert.slots.tsx","../../src/components/alert/components/alert.root.tsx","../../src/components/alert/components/alert.title.tsx","../../src/components/alert/components/alert.description.tsx","../../src/components/alert/components/alert.actions.tsx","../../src/components/alert/alert.i18n.ts","../../src/components/alert/components/alert.dismiss-button.tsx","../../src/components/alert/alert.tsx"],"sourcesContent":["import { createSlotRecipeContext } from \"@chakra-ui/react\";\nimport type {\n AlertActionsSlotProps,\n AlertDescriptionProps,\n AlertDismissButtonProps,\n AlertIconSlotProps,\n AlertRootSlotProps,\n AlertTitleProps,\n} from \"./alert.types\";\n\nconst { withProvider, withContext } = createSlotRecipeContext({\n key: \"alert\",\n});\n\nexport const AlertRoot = withProvider<HTMLDivElement, AlertRootSlotProps>(\n \"div\",\n \"root\"\n);\n\nexport const AlertTitle = withContext<HTMLDivElement, AlertTitleProps>(\n \"div\",\n \"title\"\n);\n\nexport const AlertDescription = withContext<\n HTMLDivElement,\n AlertDescriptionProps\n>(\"div\", \"description\");\n\nexport const AlertIcon = withContext<HTMLDivElement, AlertIconSlotProps>(\n \"div\",\n \"icon\"\n);\n\nexport const AlertActions = withContext<HTMLDivElement, AlertActionsSlotProps>(\n \"div\",\n \"actions\"\n);\n\n// This is a div wrapper for layout placement - note that we expect it to receive `IconButton` props, but we use a `div`.\n// We then forward the consumer props to the interior `IconButton` component.\nexport const AlertDismissButton = withContext<\n HTMLDivElement,\n AlertDismissButtonProps\n>(\"div\", \"dismissButton\");\n","import { createContext, useMemo, useState, type ReactNode } from \"react\";\nimport { AlertRoot as AlertRootSlot, AlertIcon } from \"../alert.slots\";\nimport type { AlertProps, AlertRootComponent } from \"../alert.types\";\nimport { Box } from \"../../box\";\nimport { Stack } from \"../../stack\";\nimport {\n CheckCircleOutline,\n ErrorOutline,\n Info,\n WarningAmber,\n} from \"@commercetools/nimbus-icons\";\n\nconst getIconFromTone = (tone: AlertProps[\"tone\"]) => {\n switch (tone) {\n case \"critical\":\n return <ErrorOutline />;\n case \"info\":\n return <Info />;\n case \"warning\":\n return <WarningAmber />;\n case \"positive\":\n return <CheckCircleOutline />;\n default:\n return null;\n }\n};\n\ntype AlertContextValue = {\n setTitle: (title: ReactNode) => void;\n setDescription: (description: ReactNode) => void;\n setActions: (actions: ReactNode) => void;\n setDismiss: (dismiss: ReactNode) => void;\n};\n\nexport const AlertContext = createContext<AlertContextValue | undefined>(\n undefined\n);\n\n/**\n * # Alert\n *\n * Provides feedback to the user about the status of an action or system event\n *\n * @see {@link https://nimbus-documentation.vercel.app/components/feedback/alert}\n */\nexport const AlertRoot: AlertRootComponent = (props) => {\n const { ref, children, ...restProps } = props;\n const [titleNode, setTitle] = useState<ReactNode>(null);\n const [descriptionNode, setDescription] = useState<ReactNode>(null);\n const [actionsNode, setActions] = useState<ReactNode>(null);\n const [dismissNode, setDismiss] = useState<ReactNode>(null);\n\n // Memoize the context value so we don't cause unnecessary re-renders\n const contextValue = useMemo(\n () => ({\n setTitle,\n setDescription,\n setActions,\n setDismiss,\n }),\n [setTitle, setDescription, setActions, setDismiss]\n );\n\n return (\n <AlertContext.Provider value={contextValue}>\n <AlertRootSlot ref={ref} {...restProps} role=\"alert\">\n <AlertIcon alignItems=\"flex-start\">\n {getIconFromTone(restProps.tone)}\n </AlertIcon>\n <Stack flex=\"1\" gap=\"200\">\n <Box>\n {titleNode}\n {descriptionNode}\n </Box>\n {actionsNode}\n </Stack>\n {dismissNode}\n\n {children}\n </AlertRootSlot>\n </AlertContext.Provider>\n );\n};\n\nAlertRoot.displayName = \"Alert.Root\";\n","import { useContext, useEffect } from \"react\";\nimport { AlertTitle as AlertTitleSlot } from \"../alert.slots\";\nimport type { AlertTitleProps } from \"../alert.types\";\nimport { AlertContext } from \"./alert.root\";\n\nexport const AlertTitle = ({ children, ...props }: AlertTitleProps) => {\n const context = useContext(AlertContext);\n\n useEffect(() => {\n if (context) {\n const slotElement = (\n <AlertTitleSlot {...props} fontWeight=\"600\">\n {children}\n </AlertTitleSlot>\n );\n // Register it with the parent\n context.setTitle(slotElement);\n\n // On unmount, remove it\n return () => context.setTitle(null);\n }\n }, [children, props]);\n\n return null;\n};\n\nAlertTitle.displayName = \"Alert.Title\";\n","import { useContext, useEffect } from \"react\";\nimport { AlertDescription as AlertDescriptionSlot } from \"../alert.slots\";\nimport type { AlertDescriptionProps } from \"../alert.types\";\nimport { AlertContext } from \"./alert.root\";\n\nexport const AlertDescription = ({\n children,\n ...props\n}: AlertDescriptionProps) => {\n const context = useContext(AlertContext);\n\n useEffect(() => {\n if (context) {\n const slotElement = (\n <AlertDescriptionSlot {...props}>{children}</AlertDescriptionSlot>\n );\n // Register it with the parent\n context.setDescription(slotElement);\n\n // On unmount, remove it\n return () => context.setDescription(null);\n }\n }, [children, props]);\n\n return null;\n};\n\nAlertDescription.displayName = \"Alert.Description\";\n","import { useContext, useEffect } from \"react\";\nimport { AlertActions as AlertActionsSlot } from \"../alert.slots\";\nimport type { AlertActionsProps } from \"../alert.types\";\nimport { AlertContext } from \"./alert.root\";\n\nexport const AlertActions = ({ children, ...props }: AlertActionsProps) => {\n const context = useContext(AlertContext);\n\n useEffect(() => {\n if (context) {\n const slotElement = (\n <AlertActionsSlot {...props}>{children}</AlertActionsSlot>\n );\n // Register it with the parent\n context.setActions(slotElement);\n\n // On unmount, remove it\n return () => context.setActions(null);\n }\n }, [children, props]);\n\n return null;\n};\n\nAlertActions.displayName = \"Alert.Actions\";\n","import { defineMessages } from \"react-intl\";\n\nexport const messages = defineMessages({\n dismiss: {\n id: \"Nimbus.Alert.dismiss\",\n description: \"aria-label for the dismiss button in an alert\",\n defaultMessage: \"Dismiss\",\n },\n});\n","import { useContext, useEffect } from \"react\";\nimport { AlertDismissButton as AlertDismissButtonSlot } from \"../alert.slots\";\nimport type { AlertDismissButtonProps } from \"../alert.types\";\nimport { Clear } from \"@commercetools/nimbus-icons\";\nimport { IconButton } from \"../../icon-button\";\nimport { AlertContext } from \"./alert.root\";\nimport { useIntl } from \"react-intl\";\nimport { messages } from \"../alert.i18n\";\n\nexport const AlertDismissButton = ({\n children,\n ...props\n}: AlertDismissButtonProps) => {\n const context = useContext(AlertContext);\n const intl = useIntl();\n\n useEffect(() => {\n if (context) {\n const slotElement = (\n <AlertDismissButtonSlot>\n <IconButton\n aria-label={intl.formatMessage(messages.dismiss)}\n {...props}\n variant=\"ghost\"\n size=\"2xs\"\n >\n <Clear role=\"img\" />\n </IconButton>\n </AlertDismissButtonSlot>\n );\n // Register it with the parent\n context.setDismiss(slotElement);\n\n // On unmount, remove it\n return () => context.setDismiss(null);\n }\n }, [children, props]);\n\n return null;\n};\n\nAlertDismissButton.displayName = \"Alert.DismissButton\";\n","import { AlertTitle } from \"./components/alert.title\";\nimport { AlertDescription } from \"./components/alert.description\";\nimport { AlertActions } from \"./components/alert.actions\";\nimport { AlertDismissButton } from \"./components/alert.dismiss-button\";\nimport { AlertRoot } from \"./components/alert.root\";\n\n/**\n * Alert\n * ============================================================\n * Provides feedback to the user about the status of an action or system event\n */\nexport const Alert = {\n Root: AlertRoot,\n Title: AlertTitle,\n Description: AlertDescription,\n Actions: AlertActions,\n DismissButton: AlertDismissButton,\n};\n\n// exports for internal use by react-docgen\nexport {\n AlertRoot as _AlertRoot,\n AlertTitle as _AlertTitle,\n AlertDescription as _AlertDescription,\n AlertActions as _AlertActions,\n AlertDismissButton as _AlertDismissButton,\n};\n"],"names":["withProvider","withContext","createSlotRecipeContext","AlertRoot","AlertTitle","AlertDescription","AlertIcon","AlertActions","AlertDismissButton","getIconFromTone","tone","ErrorOutline","Info","WarningAmber","CheckCircleOutline","AlertContext","createContext","props","ref","children","restProps","titleNode","setTitle","useState","descriptionNode","setDescription","actionsNode","setActions","dismissNode","setDismiss","contextValue","useMemo","jsx","jsxs","AlertRootSlot","Stack","Box","context","useContext","useEffect","slotElement","AlertTitleSlot","AlertDescriptionSlot","AlertActionsSlot","messages","defineMessages","intl","useIntl","AlertDismissButtonSlot","IconButton","Clear","Alert"],"mappings":";;;;;;;;AAUA,MAAM,EAAE,cAAAA,GAAc,aAAAC,EAAA,IAAgB,gBAAAC,EAAwB;AAAA,EAC5D,KAAK;AACP,CAAC,GAEYC,IAAY,gBAAAH;AAAA,EACvB;AAAA,EACA;AACF,GAEaI,IAAa,gBAAAH;AAAA,EACxB;AAAA,EACA;AACF,GAEaI,IAAmB,gBAAAJ,EAG9B,OAAO,aAAa,GAETK,IAAY,gBAAAL;AAAA,EACvB;AAAA,EACA;AACF,GAEaM,IAAe,gBAAAN;AAAA,EAC1B;AAAA,EACA;AACF,GAIaO,IAAqB,gBAAAP,EAGhC,OAAO,eAAe,GChClBQ,IAAkB,CAACC,MAA6B;AACpD,UAAQA,GAAA;AAAA,IACN,KAAK;AACH,+BAAQC,GAAA,EAAa;AAAA,IACvB,KAAK;AACH,+BAAQC,GAAA,EAAK;AAAA,IACf,KAAK;AACH,+BAAQC,GAAA,EAAa;AAAA,IACvB,KAAK;AACH,+BAAQC,GAAA,EAAmB;AAAA,IAC7B;AACE,aAAO;AAAA,EAAA;AAEb,GASaC,IAAe,gBAAAC;AAAA,EAC1B;AACF,GASab,IAAgC,CAACc,MAAU;AACtD,QAAM,EAAE,KAAAC,GAAK,UAAAC,GAAU,GAAGC,MAAcH,GAClC,CAACI,GAAWC,CAAQ,IAAIC,EAAoB,IAAI,GAChD,CAACC,GAAiBC,CAAc,IAAIF,EAAoB,IAAI,GAC5D,CAACG,GAAaC,CAAU,IAAIJ,EAAoB,IAAI,GACpD,CAACK,GAAaC,CAAU,IAAIN,EAAoB,IAAI,GAGpDO,IAAeC;AAAA,IACnB,OAAO;AAAA,MACL,UAAAT;AAAA,MACA,gBAAAG;AAAA,MACA,YAAAE;AAAA,MACA,YAAA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;AAAA,EACnB,MAAMhD;AAAA,EACN,OAAOC;AAAA,EACP,aAAaC;AAAA,EACb,SAASE;AAAA,EACT,eAAeC;AACjB;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as b } from "react/jsx-runtime";
|
|
2
2
|
import { useRef as l } from "react";
|
|
3
|
-
import { $ } from "./Button-
|
|
3
|
+
import { $ } from "./Button-Dx3xzN8n.es.js";
|
|
4
4
|
import { $ as u } from "./utils-Cyja2WdR.es.js";
|
|
5
5
|
import { createRecipeContext as x, mergeRefs as R } from "@chakra-ui/react";
|
|
6
6
|
import { b as P } from "./toggle-button-group.recipe-CbCnJQP3.es.js";
|
|
@@ -8,7 +8,7 @@ import { i as h } from "./emotion-is-prop-valid.esm-BUuA3iy8.es.js";
|
|
|
8
8
|
import { s as y } from "./index-CtB71yr7.es.js";
|
|
9
9
|
import { $ as B } from "./useObjectRef-CaJ5pgjX.es.js";
|
|
10
10
|
import { a as v } from "./mergeProps-CzyOU2NE.es.js";
|
|
11
|
-
import { $ as w } from "./useButton-
|
|
11
|
+
import { $ as w } from "./useButton-_sJ3_8ha.es.js";
|
|
12
12
|
const { withContext: C } = /* @__PURE__ */ x({
|
|
13
13
|
recipe: P
|
|
14
14
|
}), D = /* @__PURE__ */ C(
|
|
@@ -59,4 +59,4 @@ V.displayName = "Button";
|
|
|
59
59
|
export {
|
|
60
60
|
V as B
|
|
61
61
|
};
|
|
62
|
-
//# sourceMappingURL=button-
|
|
62
|
+
//# sourceMappingURL=button-IZUJaJku.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button-
|
|
1
|
+
{"version":3,"file":"button-IZUJaJku.es.js","sources":["../../src/components/button/button.slots.tsx","../../src/components/button/button.tsx"],"sourcesContent":["import { createRecipeContext } from \"@chakra-ui/react\";\nimport { buttonRecipe } from \"./button.recipe\";\nimport shouldForwardProp from \"@emotion/is-prop-valid\";\nimport { system } from \"@/theme\";\nimport type { ButtonRootSlotProps } from \"./button.types\";\n\nconst { withContext } = createRecipeContext({\n recipe: buttonRecipe,\n});\n\n/**\n * Root component that provides the styling context for the Button component.\n * Uses Chakra UI's recipe context system for consistent styling across instances.\n */\nexport const ButtonRoot = withContext<HTMLButtonElement, ButtonRootSlotProps>(\n \"button\",\n {\n defaultProps: {\n type: \"button\",\n },\n /** make sure the `onPress` properties won't end up as attribute on the rendered DOM element */\n shouldForwardProp(prop, variantKeys) {\n const chakraSfp =\n !variantKeys?.includes(prop) && !system.isValidProperty(prop);\n return shouldForwardProp(prop) && chakraSfp && !prop.includes(\"onPress\");\n },\n }\n);\n","import { useRef } from \"react\";\nimport { useButton, useObjectRef, mergeProps } from \"react-aria\";\nimport { ButtonContext, useContextProps } from \"react-aria-components\";\nimport { mergeRefs } from \"@chakra-ui/react\";\nimport { ButtonRoot } from \"./button.slots.tsx\";\nimport type { ButtonProps } from \"./button.types.ts\";\n\n/**\n * # Button\n *\n * Displays a Button.\n *\n * @see {@link https://nimbus-documentation.vercel.app/components/inputs/button}\n */\nexport const Button = (props: ButtonProps) => {\n const { ref: forwardedRef, as, asChild, children, ...rest } = props;\n\n // create a local ref (because the consumer may not provide a forwardedRef)\n const localRef = useRef<HTMLButtonElement>(null);\n // merge the local ref with a potentially forwarded ref\n const baseRef = useObjectRef(mergeRefs(localRef, forwardedRef));\n\n // Consume context props based on slot (this enables slot-aware behavior)\n const [contextProps, contextRef] = useContextProps(\n rest,\n baseRef,\n ButtonContext\n );\n\n // if asChild is set, for react-aria to add the button-role, the elementType\n // has to be manually set to something else than button\n\n const elementType = as || (asChild ? \"a\" : \"button\") || \"button\";\n\n const { buttonProps } = useButton(\n {\n ...contextProps,\n elementType,\n },\n contextRef\n );\n\n const componentProps = mergeProps(contextProps, buttonProps, {\n as,\n asChild,\n /**\n * In case `slot` was null, the `useContextProps` hook already\n * processed it at this point, so it's safe to not attach it\n * to the DOM element\n */\n slot: contextProps.slot || undefined,\n });\n\n return (\n <ButtonRoot\n ref={contextRef}\n {...componentProps}\n aria-disabled={componentProps.isDisabled || undefined}\n data-disabled={componentProps.isDisabled || undefined}\n >\n {children}\n </ButtonRoot>\n );\n};\n\n// Manually assign a displayName for debugging purposes\nButton.displayName = \"Button\";\n"],"names":["withContext","createRecipeContext","buttonRecipe","ButtonRoot","prop","variantKeys","chakraSfp","system","shouldForwardProp","Button","props","forwardedRef","as","asChild","children","rest","localRef","useRef","baseRef","useObjectRef","mergeRefs","contextProps","contextRef","useContextProps","ButtonContext","elementType","buttonProps","useButton","componentProps","mergeProps","jsx"],"mappings":";;;;;;;;;;;AAMA,MAAM,EAAE,aAAAA,EAAA,IAAgB,gBAAAC,EAAoB;AAAA,EAC1C,QAAQC;AACV,CAAC,GAMYC,IAAa,gBAAAH;AAAA,EACxB;AAAA,EACA;AAAA,IACE,cAAc;AAAA,MACZ,MAAM;AAAA,IAAA;AAAA;AAAA,IAGR,kBAAkBI,GAAMC,GAAa;AACnC,YAAMC,IACJ,CAACD,GAAa,SAASD,CAAI,KAAK,CAACG,EAAO,gBAAgBH,CAAI;AAC9D,aAAOI,EAAkBJ,CAAI,KAAKE,KAAa,CAACF,EAAK,SAAS,SAAS;AAAA,IACzE;AAAA,EAAA;AAEJ,GCbaK,IAAS,CAACC,MAAuB;AAC5C,QAAM,EAAE,KAAKC,GAAc,IAAAC,GAAI,SAAAC,GAAS,UAAAC,GAAU,GAAGC,MAASL,GAGxDM,IAAWC,EAA0B,IAAI,GAEzCC,IAAUC,EAAaC,EAAUJ,GAAUL,CAAY,CAAC,GAGxD,CAACU,GAAcC,CAAU,IAAIC;AAAAA,IACjCR;AAAA,IACAG;AAAA,IACAM;AAAAA,EAAA,GAMIC,IAAcb,MAAOC,IAAU,MAAM,WAErC,EAAE,aAAAa,MAAgBC;AAAAA,IACtB;AAAA,MACE,GAAGN;AAAA,MACH,aAAAI;AAAA,IAAA;AAAA,IAEFH;AAAA,EAAA,GAGIM,IAAiBC,EAAWR,GAAcK,GAAa;AAAA,IAC3D,IAAAd;AAAA,IACA,SAAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,MAAMQ,EAAa,QAAQ;AAAA,EAAA,CAC5B;AAED,SACE,gBAAAS;AAAA,IAAC3B;AAAA,IAAA;AAAA,MACC,KAAKmB;AAAA,MACJ,GAAGM;AAAA,MACJ,iBAAeA,EAAe,cAAc;AAAA,MAC5C,iBAAeA,EAAe,cAAc;AAAA,MAE3C,UAAAd;AAAA,IAAA;AAAA,EAAA;AAGP;AAGAL,EAAO,cAAc;"}
|
|
@@ -1 +1 @@
|
|
|
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,EAG9B,QAAS,MAAM,EAEJO,EAA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,"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,EAG9B,QAAS,MAAM,EAEJO,EAAyBP,EAGpC,QAAS,YAAY,EAEVQ,EAAyBR,EAGpC,KAAM,YAAY,EAEPS,EAAuBT,EAGlC,QAAS,UAAU,EAERU,EAAmBV,EAG9B,KAAM,UAAU,ECnCLW,EAAgB,IAAM,CACjC,KAAM,CAAE,OAAAC,CAAA,EAAWC,4CAAA,EACbC,EAAUC,EAAAA,0CAAkBC,2CAAe,EAC3CC,EAAgBC,EAAAA,WAAWC,2CAAoB,EAC/CC,EAAqBN,GAAS,iBAAiB,QAAU,EACzDO,EAAYC,4CAAMC,EAAAA,2CAAkB,EACpCC,EAAkBJ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