@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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as e, jsxs as m, Fragment as u } from "react/jsx-runtime";
|
|
2
2
|
import { createSlotRecipeContext as f } from "@chakra-ui/react";
|
|
3
|
-
import { c as h, a as g, b as S } from "./DateField-
|
|
3
|
+
import { c as h, a as g, b as S } from "./DateField-DZwn3cIj.es.js";
|
|
4
4
|
import { useRecipe as x } from "@chakra-ui/react/styled-system";
|
|
5
5
|
import { d as I } from "./index-CtB71yr7.es.js";
|
|
6
6
|
import { e as $ } from "./extractStyleProps-DYXEhLtq.es.js";
|
|
@@ -18,4 +18,4 @@ y.displayName = "DateInput";
|
|
|
18
18
|
export {
|
|
19
19
|
y as D
|
|
20
20
|
};
|
|
21
|
-
//# sourceMappingURL=date-input-
|
|
21
|
+
//# sourceMappingURL=date-input-Cap8-3zj.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-input-
|
|
1
|
+
{"version":3,"file":"date-input-Cap8-3zj.es.js","sources":["../../src/components/date-input/date-input.slots.tsx","../../src/components/date-input/date-input.tsx"],"sourcesContent":["import {\n type HTMLChakraProps,\n createSlotRecipeContext,\n} from \"@chakra-ui/react\";\nimport type { DateInputRootSlotProps } from \"./date-input.types\";\n\n// Correctly destructure from createSlotRecipeContext based on project examples\nconst { withProvider, withContext } = createSlotRecipeContext({\n key: \"dateInput\",\n});\n\n/**\n * Root component that provides the styling context for the DateInput component.\n * Uses Chakra UI's recipe context system for consistent styling across instances.\n */\nexport const DateInputRootSlot = withProvider<\n HTMLDivElement,\n DateInputRootSlotProps\n>(\"div\", \"root\");\n\nexport const DateInputLeadingElementSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"leadingElement\");\n\nexport const DateInputTrailingElementSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"trailingElement\");\n\n/**\n * Slot component for the DateField part of the DateInput.\n */\nexport const DateInputSegmentGroupSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"segmentGroup\");\n\n/**\n * Slot component for the DateField part of the DateInput.\n */\nexport const DateInputSegmentSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"segment\");\n","import {\n DateInputLeadingElementSlot,\n DateInputRootSlot,\n DateInputSegmentGroupSlot,\n DateInputSegmentSlot,\n DateInputTrailingElementSlot,\n} from \"./date-input.slots\";\n\nimport {\n DateField,\n DateInput as DateInputField,\n DateSegment,\n} from \"react-aria-components\";\nimport { useRecipe } from \"@chakra-ui/react/styled-system\";\nimport { dateInputSlotRecipe } from \"./date-input.recipe\";\nimport type { DateInputProps } from \"./date-input.types\";\nimport { extractStyleProps } from \"@/utils/extractStyleProps\";\n\n/**\n * # DateInput\n *\n * allows entering a date\n *\n * @see {@link https://nimbus-documentation.vercel.app/components/inputs/dateinput}\n */\nexport const DateInput = (props: DateInputProps) => {\n const recipe = useRecipe({ recipe: dateInputSlotRecipe });\n const { leadingElement, trailingElement, ...rest } = props;\n const [recipeProps, recipeFreeProps] = recipe.splitVariantProps({ ...rest });\n const [styleProps, functionalProps] = extractStyleProps(recipeFreeProps);\n\n return (\n <DateInputRootSlot {...recipeProps} {...styleProps} asChild>\n <DateField {...functionalProps}>\n <>\n {leadingElement && (\n <DateInputLeadingElementSlot>\n {leadingElement}\n </DateInputLeadingElementSlot>\n )}\n <DateInputSegmentGroupSlot asChild>\n <DateInputField>\n {(segment) => (\n <DateInputSegmentSlot asChild>\n <DateSegment segment={segment} />\n </DateInputSegmentSlot>\n )}\n </DateInputField>\n </DateInputSegmentGroupSlot>\n {trailingElement && (\n <DateInputTrailingElementSlot>\n {trailingElement}\n </DateInputTrailingElementSlot>\n )}\n </>\n </DateField>\n </DateInputRootSlot>\n );\n};\n\nDateInput.displayName = \"DateInput\";\n"],"names":["withProvider","withContext","createSlotRecipeContext","DateInputRootSlot","DateInputLeadingElementSlot","DateInputTrailingElementSlot","DateInputSegmentGroupSlot","DateInputSegmentSlot","DateInput","props","recipe","useRecipe","dateInputSlotRecipe","leadingElement","trailingElement","rest","recipeProps","recipeFreeProps","styleProps","functionalProps","extractStyleProps","jsx","DateField","jsxs","Fragment","DateInputField","segment","DateSegment"],"mappings":";;;;;;AAOA,MAAM,EAAE,cAAAA,GAAc,aAAAC,EAAA,IAAgB,gBAAAC,EAAwB;AAAA,EAC5D,KAAK;AACP,CAAC,GAMYC,IAAoB,gBAAAH,EAG/B,OAAO,MAAM,GAEFI,IAA8B,gBAAAH,EAGzC,OAAO,gBAAgB,GAEZI,IAA+B,gBAAAJ,EAG1C,OAAO,iBAAiB,GAKbK,IAA4B,gBAAAL,EAGvC,OAAO,cAAc,GAKVM,IAAuB,gBAAAN,EAGlC,OAAO,SAAS,GCnBLO,IAAY,CAACC,MAA0B;AAClD,QAAMC,IAASC,EAAU,EAAE,QAAQC,GAAqB,GAClD,EAAE,gBAAAC,GAAgB,iBAAAC,GAAiB,GAAGC,MAASN,GAC/C,CAACO,GAAaC,CAAe,IAAIP,EAAO,kBAAkB,EAAE,GAAGK,GAAM,GACrE,CAACG,GAAYC,CAAe,IAAIC,EAAkBH,CAAe;AAEvE,SACE,gBAAAI,EAAClB,GAAA,EAAmB,GAAGa,GAAc,GAAGE,GAAY,SAAO,IACzD,UAAA,gBAAAG,EAACC,GAAA,EAAW,GAAGH,GACb,UAAA,gBAAAI,EAAAC,GAAA,EACG,UAAA;AAAA,IAAAX,KACC,gBAAAQ,EAACjB,KACE,UAAAS,EAAA,CACH;AAAA,sBAEDP,GAAA,EAA0B,SAAO,IAChC,UAAA,gBAAAe,EAACI,KACE,UAAA,CAACC,MACA,gBAAAL,EAACd,GAAA,EAAqB,SAAO,IAC3B,UAAA,gBAAAc,EAACM,KAAY,SAAAD,EAAA,CAAkB,GACjC,GAEJ,EAAA,CACF;AAAA,IACCZ,KACC,gBAAAO,EAAChB,GAAA,EACE,UAAAS,EAAA,CACH;AAAA,EAAA,EAAA,CAEJ,GACF,GACF;AAEJ;AAEAN,EAAU,cAAc;"}
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { jsxs as b, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { createSlotRecipeContext as S } from "@chakra-ui/react";
|
|
3
3
|
import { Close as y, CalendarMonth as D } from "@commercetools/nimbus-icons";
|
|
4
|
-
import { b as k, c as v } from "./DatePicker-
|
|
5
|
-
import { $ as C, h as M } from "./Dialog-
|
|
4
|
+
import { b as k, c as v } from "./DatePicker-B2Nf_0Sq.es.js";
|
|
5
|
+
import { $ as C, h as M } from "./Dialog-Qpq4hk89.es.js";
|
|
6
6
|
import { $ as I } from "./Group-BBaUrRF9.es.js";
|
|
7
7
|
import { useSlotRecipe as E } from "@chakra-ui/react/styled-system";
|
|
8
8
|
import { h as H } from "./index-CtB71yr7.es.js";
|
|
9
9
|
import { e as N } from "./extractStyleProps-DYXEhLtq.es.js";
|
|
10
10
|
import { useContext as x, useRef as T, useEffect as R } from "react";
|
|
11
11
|
import { defineMessages as V, FormattedMessage as w, useIntl as z } from "react-intl";
|
|
12
|
-
import { T as B } from "./time-input-
|
|
12
|
+
import { T as B } from "./time-input--a_qv-Jk.es.js";
|
|
13
13
|
import { Flex as F } from "@chakra-ui/react/flex";
|
|
14
14
|
import { T as j } from "./text-BgiP8ZB6.es.js";
|
|
15
|
-
import { $ as P } from "./Button-
|
|
15
|
+
import { $ as P } from "./Button-Dx3xzN8n.es.js";
|
|
16
16
|
import { e as A, d as G } from "./utils-Cyja2WdR.es.js";
|
|
17
|
-
import { d as L } from "./DateField-
|
|
18
|
-
import { D as O } from "./date-input-
|
|
19
|
-
import { C as q } from "./calendar-
|
|
17
|
+
import { d as L } from "./DateField-DZwn3cIj.es.js";
|
|
18
|
+
import { D as O } from "./date-input-Cap8-3zj.es.js";
|
|
19
|
+
import { C as q } from "./calendar-lD6G93R9.es.js";
|
|
20
20
|
import { B as W } from "./box-DuBoAZvq.es.js";
|
|
21
|
-
import { I as $ } from "./icon-button-
|
|
21
|
+
import { I as $ } from "./icon-button-DQS2apw-.es.js";
|
|
22
22
|
const { withProvider: Z, withContext: h } = /* @__PURE__ */ S({
|
|
23
23
|
key: "datePicker"
|
|
24
24
|
}), J = /* @__PURE__ */ Z("div", "root"), K = /* @__PURE__ */ h("div", "group"), Q = /* @__PURE__ */ h("div", "popover"), U = /* @__PURE__ */ h("div", "calendar"), u = /* @__PURE__ */ V({
|
|
@@ -217,4 +217,4 @@ _.displayName = "DatePicker";
|
|
|
217
217
|
export {
|
|
218
218
|
_ as D
|
|
219
219
|
};
|
|
220
|
-
//# sourceMappingURL=date-picker-
|
|
220
|
+
//# sourceMappingURL=date-picker-ChZ8H-MT.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-picker-C304WfAN.es.js","sources":["../../src/components/date-picker/date-picker.slots.tsx","../../src/components/date-picker/date-picker.i18n.ts","../../src/components/date-picker/components/date-picker.time-input.tsx","../../src/components/date-picker/components/date-picker.custom-context.tsx","../../src/components/date-picker/date-picker.tsx"],"sourcesContent":["import {\n type HTMLChakraProps,\n createSlotRecipeContext,\n} from \"@chakra-ui/react\";\nimport type { DatePickerRootSlotProps } from \"./date-picker.types\";\n\n// Correctly destructure from createSlotRecipeContext based on project examples\nconst { withProvider, withContext } = createSlotRecipeContext({\n key: \"datePicker\",\n});\n\n/**\n * Root component that provides the styling context for the DatePicker component.\n * Uses Chakra UI's recipe context system for consistent styling across instances.\n */\nexport const DatePickerRootSlot = withProvider<\n HTMLDivElement,\n DatePickerRootSlotProps\n>(\"div\", \"root\");\n\n/**\n * Slot component for the input group containing the DateInput.\n */\nexport const DatePickerGroupSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"group\");\n\n/**\n * Slot component for the popover container.\n */\nexport const DatePickerPopoverSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"popover\");\n\n/**\n * Slot component for the calendar container within the popover.\n */\nexport const DatePickerCalendarSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"calendar\");\n\n/**\n * Slot component for the calendar header.\n */\nexport const DatePickerCalendarHeaderSlot = withContext<\n HTMLElement,\n HTMLChakraProps<\"header\">\n>(\"header\", \"calendarHeader\");\n\n/**\n * Slot component for the calendar grid.\n */\nexport const DatePickerCalendarGridSlot = withContext<\n HTMLTableElement,\n HTMLChakraProps<\"table\">\n>(\"table\", \"calendarGrid\");\n\n/**\n * Slot component for individual calendar cells.\n */\nexport const DatePickerCalendarCellSlot = withContext<\n HTMLTableCellElement,\n HTMLChakraProps<\"td\">\n>(\"td\", \"calendarCell\");\n","import { defineMessages } from \"react-intl\";\n\nexport default defineMessages({\n clearInput: {\n id: \"Nimbus.DatePicker.clearInput\",\n description: \"aria-label for clear input button in date picker\",\n defaultMessage: \"Clear input value\",\n },\n enterTime: {\n id: \"Nimbus.DatePicker.Time.enterTime\",\n description: \"aria-label for time input field in date picker\",\n defaultMessage: \"Enter time\",\n },\n enterTimeHour: {\n id: \"Nimbus.DatePicker.Time.enterTimeHour\",\n description: \"aria-label for hour-only time input in date picker\",\n defaultMessage: \"Enter time (hour)\",\n },\n enterTimeHourMinute: {\n id: \"Nimbus.DatePicker.Time.enterTimeHourMinute\",\n description: \"aria-label for hour and minute time input in date picker\",\n defaultMessage: \"Enter time (hour and minute)\",\n },\n enterTimeHourMinuteSecond: {\n id: \"Nimbus.DatePicker.Time.enterTimeHourMinuteSecond\",\n description: \"aria-label for full time input with seconds in date picker\",\n defaultMessage: \"Enter time (hour, minute, and second)\",\n },\n startTime: {\n id: \"Nimbus.DatePicker.Time.startTime\",\n description: \"Label for start time in date picker\",\n defaultMessage: \"Start time\",\n },\n});\n","import { Flex, Text, TimeInput } from \"@/components\";\nimport { useContext, useRef, useEffect } from \"react\";\nimport { DatePickerStateContext } from \"react-aria-components\";\nimport type { DatePickerTimeInputProps } from \"../date-picker.types\";\nimport { FormattedMessage } from \"react-intl\";\nimport messages from \"../date-picker.i18n\";\n\nexport const DatePickerTimeInput = ({\n hideTimeZone,\n hourCycle,\n}: DatePickerTimeInputProps) => {\n const datePickerState = useContext(DatePickerStateContext);\n const { granularity, dateValue } = datePickerState!;\n const timeInputRef = useRef<HTMLDivElement>(null);\n const previousDateRef = useRef(dateValue);\n\n // do not show up to the party if you're not invited\n if (granularity === \"day\") {\n return null;\n }\n\n // Focus the time input when date changes (user selects a date from calendar)\n useEffect(() => {\n // Check if date changed\n let timeoutId: ReturnType<typeof setTimeout> | undefined;\n\n if (dateValue && previousDateRef.current?.compare(dateValue) !== 0) {\n // Only auto-focus if no time input segment currently has focus\n // This prevents stealing focus during user interaction with time segments\n const container = timeInputRef.current;\n const activeElement = document.activeElement;\n const hasTimeSegmentFocus =\n container?.contains(activeElement) &&\n activeElement?.getAttribute(\"role\") === \"spinbutton\";\n\n if (!hasTimeSegmentFocus) {\n // Small delay to ensure the DOM is ready\n timeoutId = setTimeout(() => {\n // Find the first focusable segment within the time input container\n if (container) {\n const firstSegment = container.querySelector(\n '[role=\"spinbutton\"]'\n ) as HTMLElement;\n firstSegment?.focus();\n }\n }, 50);\n }\n }\n\n previousDateRef.current = dateValue;\n\n // Cleanup timeout on effect re-run or unmount to prevent memory leaks\n return () => {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n };\n }, [dateValue]);\n\n return (\n <Flex\n ref={timeInputRef}\n borderTop=\"solid-25\"\n borderColor=\"neutral.3\"\n py=\"300\"\n px=\"400\"\n alignItems=\"center\"\n justifyContent=\"center\"\n gap=\"200\"\n >\n <Text textStyle=\"xs\" fontWeight=\"500\" color=\"neutral.12\">\n <FormattedMessage {...messages.startTime} />\n </Text>\n <TimeInput\n slot=\"timeInput\"\n variant=\"ghost\"\n size=\"sm\"\n hideTimeZone={hideTimeZone}\n hourCycle={hourCycle}\n />\n </Flex>\n );\n};\n","import { useContext } from \"react\";\nimport {\n Provider,\n ButtonContext,\n DatePickerStateContext,\n TimeFieldContext,\n useSlottedContext,\n} from \"react-aria-components\";\nimport type { PressEvent, TimeValue } from \"react-aria\";\nimport { useIntl } from \"react-intl\";\nimport messages from \"../date-picker.i18n\";\n\nexport const DatePickerCustomContext = ({\n children,\n}: {\n children: React.ReactNode;\n}) => {\n const intl = useIntl();\n const buttonContext = useSlottedContext(ButtonContext) || {};\n const datePickerState = useContext(DatePickerStateContext);\n const noInputValue = datePickerState?.dateValue === null;\n\n const { timeValue, setTimeValue, granularity } = datePickerState!;\n\n // Try to get disabled state from the button context\n const isDatePickerDisabled = buttonContext?.isDisabled;\n\n // Generate default aria-label based on granularity if not provided\n const getDefaultTimeInputAriaLabel = () => {\n switch (granularity) {\n case \"hour\":\n return intl.formatMessage(messages.enterTimeHour);\n case \"minute\":\n return intl.formatMessage(messages.enterTimeHourMinute);\n case \"second\":\n return intl.formatMessage(messages.enterTimeHourMinuteSecond);\n default:\n return intl.formatMessage(messages.enterTime);\n }\n };\n\n /**\n * Button slots\n * ================================\n */\n const buttonSlots = {\n /** toggles the calendar popover */\n calendarToggle: {\n ...buttonContext,\n onPress: (event: PressEvent) => {\n // Ensure any active input (e.g., date picker segment) loses focus\n // because blurring the input will close the popover if it's open (or was just opened)\n const activeElement = document?.activeElement as HTMLElement | null;\n\n if (activeElement) {\n activeElement.blur();\n }\n\n buttonContext.onPress?.(event);\n },\n },\n /** Clear button that displays when there's a value in each segment - hidden from both visual and screen readers when there's no value */\n clear: {\n onPress: () => datePickerState?.setValue(null),\n \"aria-label\": intl.formatMessage(messages.clearInput),\n isDisabled: isDatePickerDisabled,\n // Hide the button when there's no value\n style: noInputValue ? { display: \"none\" } : undefined,\n \"aria-hidden\": noInputValue ? true : undefined,\n },\n };\n\n /**\n * TimeInput slots\n * ================================\n */\n\n const timeInputSlots = {\n timeInput: {\n value: timeValue,\n onChange: (value: TimeValue | null) => {\n if (value !== null) {\n setTimeValue(value);\n }\n },\n granularity: granularity === \"day\" ? undefined : granularity,\n \"aria-label\": getDefaultTimeInputAriaLabel(),\n },\n };\n\n return (\n <Provider\n values={[\n [\n ButtonContext,\n {\n slots: buttonSlots,\n },\n ],\n [TimeFieldContext, { slots: timeInputSlots }],\n ]}\n >\n {children}\n </Provider>\n );\n};\n","import {\n DatePickerRootSlot,\n DatePickerGroupSlot,\n DatePickerPopoverSlot,\n DatePickerCalendarSlot,\n} from \"./date-picker.slots\";\n\nimport { CalendarMonth, Close } from \"@commercetools/nimbus-icons\";\n\nimport {\n DatePicker as ReactAriaDatePicker,\n Group,\n Popover,\n Dialog,\n} from \"react-aria-components\";\nimport { useSlotRecipe } from \"@chakra-ui/react/styled-system\";\nimport { datePickerSlotRecipe } from \"./date-picker.recipe\";\nimport type { DatePickerProps } from \"./date-picker.types\";\nimport { extractStyleProps } from \"@/utils/extractStyleProps\";\nimport { DateInput, Calendar, IconButton, Box } from \"@/components\";\nimport { DatePickerTimeInput } from \"./components/date-picker.time-input\";\nimport { DatePickerCustomContext } from \"./components/date-picker.custom-context\";\n\n/**\n * # DatePicker\n *\n * a UI component for users to enter or select a specific calendar date.\n *\n * @see {@link https://nimbus-documentation.vercel.app/components/inputs/datepicker}\n */\nexport const DatePicker = (props: DatePickerProps) => {\n const {\n size = \"md\",\n variant,\n granularity = \"day\",\n hideTimeZone,\n hourCycle,\n } = props;\n const recipe = useSlotRecipe({ recipe: datePickerSlotRecipe });\n const [recipeProps, remainingProps] = recipe.splitVariantProps(props);\n const [styleProps, otherProps] = extractStyleProps(remainingProps);\n\n // the size of the buttons overlaying the input\n const overlayButtonSize = size === \"md\" ? \"xs\" : \"2xs\";\n\n // When granularity is \"day\", use the prop value (defaults to true if not provided)\n // For other granularities (time-based), force to false so users can set both date and time\n const shouldCloseOnSelect =\n granularity === \"day\" ? props.shouldCloseOnSelect : false;\n\n return (\n <DatePickerRootSlot {...recipeProps} {...styleProps} asChild>\n <ReactAriaDatePicker\n {...otherProps}\n shouldCloseOnSelect={shouldCloseOnSelect}\n >\n <DatePickerCustomContext>\n <DatePickerGroupSlot asChild>\n <Group>\n <DateInput\n size={size}\n variant={variant}\n width=\"full\"\n hideTimeZone={hideTimeZone}\n hourCycle={hourCycle}\n trailingElement={\n <Box>\n {/* @ts-expect-error react aria is adding the aria-label prop */}\n <IconButton\n tone=\"primary\"\n variant=\"ghost\"\n size={overlayButtonSize}\n slot=\"clear\"\n >\n <Close />\n </IconButton>\n {/* @ts-expect-error react aria is adding the aria-label prop */}\n <IconButton\n tone=\"primary\"\n variant=\"ghost\"\n size={overlayButtonSize}\n slot=\"calendarToggle\"\n >\n <CalendarMonth />\n </IconButton>\n </Box>\n }\n />\n </Group>\n </DatePickerGroupSlot>\n <DatePickerPopoverSlot asChild>\n <Popover placement=\"bottom end\">\n <Dialog>\n <DatePickerCalendarSlot>\n <Calendar />\n </DatePickerCalendarSlot>\n <DatePickerTimeInput\n hideTimeZone={hideTimeZone}\n hourCycle={hourCycle}\n />\n </Dialog>\n </Popover>\n </DatePickerPopoverSlot>\n </DatePickerCustomContext>\n </ReactAriaDatePicker>\n </DatePickerRootSlot>\n );\n};\n\nDatePicker.displayName = \"DatePicker\";\n"],"names":["withProvider","withContext","createSlotRecipeContext","DatePickerRootSlot","DatePickerGroupSlot","DatePickerPopoverSlot","DatePickerCalendarSlot","messages","defineMessages","DatePickerTimeInput","hideTimeZone","hourCycle","datePickerState","useContext","DatePickerStateContext","granularity","dateValue","timeInputRef","useRef","previousDateRef","useEffect","timeoutId","container","activeElement","jsxs","Flex","jsx","Text","FormattedMessage","TimeInput","DatePickerCustomContext","children","intl","useIntl","buttonContext","useSlottedContext","ButtonContext","noInputValue","timeValue","setTimeValue","isDatePickerDisabled","getDefaultTimeInputAriaLabel","buttonSlots","event","timeInputSlots","value","Provider","TimeFieldContext","DatePicker","props","size","variant","recipe","useSlotRecipe","datePickerSlotRecipe","recipeProps","remainingProps","styleProps","otherProps","extractStyleProps","overlayButtonSize","shouldCloseOnSelect","ReactAriaDatePicker","Group","DateInput","Box","IconButton","Close","CalendarMonth","Popover","Dialog","Calendar"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAOA,MAAM,EAAE,cAAAA,GAAc,aAAAC,EAAA,IAAgB,gBAAAC,EAAwB;AAAA,EAC5D,KAAK;AACP,CAAC,GAMYC,IAAqB,gBAAAH,EAGhC,OAAO,MAAM,GAKFI,IAAsB,gBAAAH,EAGjC,OAAO,OAAO,GAKHI,IAAwB,gBAAAJ,EAGnC,OAAO,SAAS,GAKLK,IAAyB,gBAAAL,EAGpC,OAAO,UAAU,GCxCnBM,IAAe,gBAAAC,EAAe;AAAA,EAC5B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AAc;"}
|
|
1
|
+
{"version":3,"file":"date-picker-ChZ8H-MT.es.js","sources":["../../src/components/date-picker/date-picker.slots.tsx","../../src/components/date-picker/date-picker.i18n.ts","../../src/components/date-picker/components/date-picker.time-input.tsx","../../src/components/date-picker/components/date-picker.custom-context.tsx","../../src/components/date-picker/date-picker.tsx"],"sourcesContent":["import {\n type HTMLChakraProps,\n createSlotRecipeContext,\n} from \"@chakra-ui/react\";\nimport type { DatePickerRootSlotProps } from \"./date-picker.types\";\n\n// Correctly destructure from createSlotRecipeContext based on project examples\nconst { withProvider, withContext } = createSlotRecipeContext({\n key: \"datePicker\",\n});\n\n/**\n * Root component that provides the styling context for the DatePicker component.\n * Uses Chakra UI's recipe context system for consistent styling across instances.\n */\nexport const DatePickerRootSlot = withProvider<\n HTMLDivElement,\n DatePickerRootSlotProps\n>(\"div\", \"root\");\n\n/**\n * Slot component for the input group containing the DateInput.\n */\nexport const DatePickerGroupSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"group\");\n\n/**\n * Slot component for the popover container.\n */\nexport const DatePickerPopoverSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"popover\");\n\n/**\n * Slot component for the calendar container within the popover.\n */\nexport const DatePickerCalendarSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"calendar\");\n\n/**\n * Slot component for the calendar header.\n */\nexport const DatePickerCalendarHeaderSlot = withContext<\n HTMLElement,\n HTMLChakraProps<\"header\">\n>(\"header\", \"calendarHeader\");\n\n/**\n * Slot component for the calendar grid.\n */\nexport const DatePickerCalendarGridSlot = withContext<\n HTMLTableElement,\n HTMLChakraProps<\"table\">\n>(\"table\", \"calendarGrid\");\n\n/**\n * Slot component for individual calendar cells.\n */\nexport const DatePickerCalendarCellSlot = withContext<\n HTMLTableCellElement,\n HTMLChakraProps<\"td\">\n>(\"td\", \"calendarCell\");\n","import { defineMessages } from \"react-intl\";\n\nexport default defineMessages({\n clearInput: {\n id: \"Nimbus.DatePicker.clearInput\",\n description: \"aria-label for clear input button in date picker\",\n defaultMessage: \"Clear input value\",\n },\n enterTime: {\n id: \"Nimbus.DatePicker.Time.enterTime\",\n description: \"aria-label for time input field in date picker\",\n defaultMessage: \"Enter time\",\n },\n enterTimeHour: {\n id: \"Nimbus.DatePicker.Time.enterTimeHour\",\n description: \"aria-label for hour-only time input in date picker\",\n defaultMessage: \"Enter time (hour)\",\n },\n enterTimeHourMinute: {\n id: \"Nimbus.DatePicker.Time.enterTimeHourMinute\",\n description: \"aria-label for hour and minute time input in date picker\",\n defaultMessage: \"Enter time (hour and minute)\",\n },\n enterTimeHourMinuteSecond: {\n id: \"Nimbus.DatePicker.Time.enterTimeHourMinuteSecond\",\n description: \"aria-label for full time input with seconds in date picker\",\n defaultMessage: \"Enter time (hour, minute, and second)\",\n },\n startTime: {\n id: \"Nimbus.DatePicker.Time.startTime\",\n description: \"Label for start time in date picker\",\n defaultMessage: \"Start time\",\n },\n});\n","import { Flex, Text, TimeInput } from \"@/components\";\nimport { useContext, useRef, useEffect } from \"react\";\nimport { DatePickerStateContext } from \"react-aria-components\";\nimport type { DatePickerTimeInputProps } from \"../date-picker.types\";\nimport { FormattedMessage } from \"react-intl\";\nimport messages from \"../date-picker.i18n\";\n\nexport const DatePickerTimeInput = ({\n hideTimeZone,\n hourCycle,\n}: DatePickerTimeInputProps) => {\n const datePickerState = useContext(DatePickerStateContext);\n const { granularity, dateValue } = datePickerState!;\n const timeInputRef = useRef<HTMLDivElement>(null);\n const previousDateRef = useRef(dateValue);\n\n // do not show up to the party if you're not invited\n if (granularity === \"day\") {\n return null;\n }\n\n // Focus the time input when date changes (user selects a date from calendar)\n useEffect(() => {\n // Check if date changed\n let timeoutId: ReturnType<typeof setTimeout> | undefined;\n\n if (dateValue && previousDateRef.current?.compare(dateValue) !== 0) {\n // Only auto-focus if no time input segment currently has focus\n // This prevents stealing focus during user interaction with time segments\n const container = timeInputRef.current;\n const activeElement = document.activeElement;\n const hasTimeSegmentFocus =\n container?.contains(activeElement) &&\n activeElement?.getAttribute(\"role\") === \"spinbutton\";\n\n if (!hasTimeSegmentFocus) {\n // Small delay to ensure the DOM is ready\n timeoutId = setTimeout(() => {\n // Find the first focusable segment within the time input container\n if (container) {\n const firstSegment = container.querySelector(\n '[role=\"spinbutton\"]'\n ) as HTMLElement;\n firstSegment?.focus();\n }\n }, 50);\n }\n }\n\n previousDateRef.current = dateValue;\n\n // Cleanup timeout on effect re-run or unmount to prevent memory leaks\n return () => {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n };\n }, [dateValue]);\n\n return (\n <Flex\n ref={timeInputRef}\n borderTop=\"solid-25\"\n borderColor=\"neutral.3\"\n py=\"300\"\n px=\"400\"\n alignItems=\"center\"\n justifyContent=\"center\"\n gap=\"200\"\n >\n <Text textStyle=\"xs\" fontWeight=\"500\" color=\"neutral.12\">\n <FormattedMessage {...messages.startTime} />\n </Text>\n <TimeInput\n slot=\"timeInput\"\n variant=\"ghost\"\n size=\"sm\"\n hideTimeZone={hideTimeZone}\n hourCycle={hourCycle}\n />\n </Flex>\n );\n};\n","import { useContext } from \"react\";\nimport {\n Provider,\n ButtonContext,\n DatePickerStateContext,\n TimeFieldContext,\n useSlottedContext,\n} from \"react-aria-components\";\nimport type { PressEvent, TimeValue } from \"react-aria\";\nimport { useIntl } from \"react-intl\";\nimport messages from \"../date-picker.i18n\";\n\nexport const DatePickerCustomContext = ({\n children,\n}: {\n children: React.ReactNode;\n}) => {\n const intl = useIntl();\n const buttonContext = useSlottedContext(ButtonContext) || {};\n const datePickerState = useContext(DatePickerStateContext);\n const noInputValue = datePickerState?.dateValue === null;\n\n const { timeValue, setTimeValue, granularity } = datePickerState!;\n\n // Try to get disabled state from the button context\n const isDatePickerDisabled = buttonContext?.isDisabled;\n\n // Generate default aria-label based on granularity if not provided\n const getDefaultTimeInputAriaLabel = () => {\n switch (granularity) {\n case \"hour\":\n return intl.formatMessage(messages.enterTimeHour);\n case \"minute\":\n return intl.formatMessage(messages.enterTimeHourMinute);\n case \"second\":\n return intl.formatMessage(messages.enterTimeHourMinuteSecond);\n default:\n return intl.formatMessage(messages.enterTime);\n }\n };\n\n /**\n * Button slots\n * ================================\n */\n const buttonSlots = {\n /** toggles the calendar popover */\n calendarToggle: {\n ...buttonContext,\n onPress: (event: PressEvent) => {\n // Ensure any active input (e.g., date picker segment) loses focus\n // because blurring the input will close the popover if it's open (or was just opened)\n const activeElement = document?.activeElement as HTMLElement | null;\n\n if (activeElement) {\n activeElement.blur();\n }\n\n buttonContext.onPress?.(event);\n },\n },\n /** Clear button that displays when there's a value in each segment - hidden from both visual and screen readers when there's no value */\n clear: {\n onPress: () => datePickerState?.setValue(null),\n \"aria-label\": intl.formatMessage(messages.clearInput),\n isDisabled: isDatePickerDisabled,\n // Hide the button when there's no value\n style: noInputValue ? { display: \"none\" } : undefined,\n \"aria-hidden\": noInputValue ? true : undefined,\n },\n };\n\n /**\n * TimeInput slots\n * ================================\n */\n\n const timeInputSlots = {\n timeInput: {\n value: timeValue,\n onChange: (value: TimeValue | null) => {\n if (value !== null) {\n setTimeValue(value);\n }\n },\n granularity: granularity === \"day\" ? undefined : granularity,\n \"aria-label\": getDefaultTimeInputAriaLabel(),\n },\n };\n\n return (\n <Provider\n values={[\n [\n ButtonContext,\n {\n slots: buttonSlots,\n },\n ],\n [TimeFieldContext, { slots: timeInputSlots }],\n ]}\n >\n {children}\n </Provider>\n );\n};\n","import {\n DatePickerRootSlot,\n DatePickerGroupSlot,\n DatePickerPopoverSlot,\n DatePickerCalendarSlot,\n} from \"./date-picker.slots\";\n\nimport { CalendarMonth, Close } from \"@commercetools/nimbus-icons\";\n\nimport {\n DatePicker as ReactAriaDatePicker,\n Group,\n Popover,\n Dialog,\n} from \"react-aria-components\";\nimport { useSlotRecipe } from \"@chakra-ui/react/styled-system\";\nimport { datePickerSlotRecipe } from \"./date-picker.recipe\";\nimport type { DatePickerProps } from \"./date-picker.types\";\nimport { extractStyleProps } from \"@/utils/extractStyleProps\";\nimport { DateInput, Calendar, IconButton, Box } from \"@/components\";\nimport { DatePickerTimeInput } from \"./components/date-picker.time-input\";\nimport { DatePickerCustomContext } from \"./components/date-picker.custom-context\";\n\n/**\n * # DatePicker\n *\n * a UI component for users to enter or select a specific calendar date.\n *\n * @see {@link https://nimbus-documentation.vercel.app/components/inputs/datepicker}\n */\nexport const DatePicker = (props: DatePickerProps) => {\n const {\n size = \"md\",\n variant,\n granularity = \"day\",\n hideTimeZone,\n hourCycle,\n } = props;\n const recipe = useSlotRecipe({ recipe: datePickerSlotRecipe });\n const [recipeProps, remainingProps] = recipe.splitVariantProps(props);\n const [styleProps, otherProps] = extractStyleProps(remainingProps);\n\n // the size of the buttons overlaying the input\n const overlayButtonSize = size === \"md\" ? \"xs\" : \"2xs\";\n\n // When granularity is \"day\", use the prop value (defaults to true if not provided)\n // For other granularities (time-based), force to false so users can set both date and time\n const shouldCloseOnSelect =\n granularity === \"day\" ? props.shouldCloseOnSelect : false;\n\n return (\n <DatePickerRootSlot {...recipeProps} {...styleProps} asChild>\n <ReactAriaDatePicker\n {...otherProps}\n shouldCloseOnSelect={shouldCloseOnSelect}\n >\n <DatePickerCustomContext>\n <DatePickerGroupSlot asChild>\n <Group>\n <DateInput\n size={size}\n variant={variant}\n width=\"full\"\n hideTimeZone={hideTimeZone}\n hourCycle={hourCycle}\n trailingElement={\n <Box>\n {/* @ts-expect-error react aria is adding the aria-label prop */}\n <IconButton\n tone=\"primary\"\n variant=\"ghost\"\n size={overlayButtonSize}\n slot=\"clear\"\n >\n <Close />\n </IconButton>\n {/* @ts-expect-error react aria is adding the aria-label prop */}\n <IconButton\n tone=\"primary\"\n variant=\"ghost\"\n size={overlayButtonSize}\n slot=\"calendarToggle\"\n >\n <CalendarMonth />\n </IconButton>\n </Box>\n }\n />\n </Group>\n </DatePickerGroupSlot>\n <DatePickerPopoverSlot asChild>\n <Popover placement=\"bottom end\">\n <Dialog>\n <DatePickerCalendarSlot>\n <Calendar />\n </DatePickerCalendarSlot>\n <DatePickerTimeInput\n hideTimeZone={hideTimeZone}\n hourCycle={hourCycle}\n />\n </Dialog>\n </Popover>\n </DatePickerPopoverSlot>\n </DatePickerCustomContext>\n </ReactAriaDatePicker>\n </DatePickerRootSlot>\n );\n};\n\nDatePicker.displayName = \"DatePicker\";\n"],"names":["withProvider","withContext","createSlotRecipeContext","DatePickerRootSlot","DatePickerGroupSlot","DatePickerPopoverSlot","DatePickerCalendarSlot","messages","defineMessages","DatePickerTimeInput","hideTimeZone","hourCycle","datePickerState","useContext","DatePickerStateContext","granularity","dateValue","timeInputRef","useRef","previousDateRef","useEffect","timeoutId","container","activeElement","jsxs","Flex","jsx","Text","FormattedMessage","TimeInput","DatePickerCustomContext","children","intl","useIntl","buttonContext","useSlottedContext","ButtonContext","noInputValue","timeValue","setTimeValue","isDatePickerDisabled","getDefaultTimeInputAriaLabel","buttonSlots","event","timeInputSlots","value","Provider","TimeFieldContext","DatePicker","props","size","variant","recipe","useSlotRecipe","datePickerSlotRecipe","recipeProps","remainingProps","styleProps","otherProps","extractStyleProps","overlayButtonSize","shouldCloseOnSelect","ReactAriaDatePicker","Group","DateInput","Box","IconButton","Close","CalendarMonth","Popover","Dialog","Calendar"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAOA,MAAM,EAAE,cAAAA,GAAc,aAAAC,EAAA,IAAgB,gBAAAC,EAAwB;AAAA,EAC5D,KAAK;AACP,CAAC,GAMYC,IAAqB,gBAAAH,EAGhC,OAAO,MAAM,GAKFI,IAAsB,gBAAAH,EAGjC,OAAO,OAAO,GAKHI,IAAwB,gBAAAJ,EAGnC,OAAO,SAAS,GAKLK,IAAyB,gBAAAL,EAGpC,OAAO,UAAU,GCxCnBM,IAAe,gBAAAC,EAAe;AAAA,EAC5B,YAAY;AAAA,IACV,IAAI;AAAA,IACJ,aAAa;AAAA,IACb,gBAAgB;AAAA,EAAA;AAAA,EAElB,WAAW;AAAA,IAC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RecipeContext as k } from "@chakra-ui/react";
|
|
3
3
|
import { Close as V, CalendarMonth as z } from "@commercetools/nimbus-icons";
|
|
4
|
-
import { $ as T, a as E } from "./DatePicker-
|
|
5
|
-
import { $ as w, h as W } from "./Dialog-
|
|
4
|
+
import { $ as T, a as E } from "./DatePicker-B2Nf_0Sq.es.js";
|
|
5
|
+
import { $ as w, h as W } from "./Dialog-Qpq4hk89.es.js";
|
|
6
6
|
import { $ as j } from "./Group-BBaUrRF9.es.js";
|
|
7
7
|
import { useSlotRecipe as F } from "@chakra-ui/react/styled-system";
|
|
8
8
|
import { g as A } from "./index-CtB71yr7.es.js";
|
|
@@ -10,13 +10,13 @@ import { e as B } from "./extractStyleProps-DYXEhLtq.es.js";
|
|
|
10
10
|
import { useContext as I, useRef as S, useEffect as G } from "react";
|
|
11
11
|
import { Flex as x } from "@chakra-ui/react/flex";
|
|
12
12
|
import { T as y } from "./text-BgiP8ZB6.es.js";
|
|
13
|
-
import { T as P } from "./time-input-
|
|
14
|
-
import { $ as C } from "./Button-
|
|
13
|
+
import { T as P } from "./time-input--a_qv-Jk.es.js";
|
|
14
|
+
import { $ as C } from "./Button-Dx3xzN8n.es.js";
|
|
15
15
|
import { e as O, d as q } from "./utils-Cyja2WdR.es.js";
|
|
16
|
-
import { d as H } from "./DateField-
|
|
17
|
-
import { R as L } from "./range-calendar-
|
|
18
|
-
import { D } from "./date-input-
|
|
19
|
-
import { I as R } from "./icon-button-
|
|
16
|
+
import { d as H } from "./DateField-DZwn3cIj.es.js";
|
|
17
|
+
import { R as L } from "./range-calendar-DBpl6y5i.es.js";
|
|
18
|
+
import { D } from "./date-input-Cap8-3zj.es.js";
|
|
19
|
+
import { I as R } from "./icon-button-DQS2apw-.es.js";
|
|
20
20
|
const { withProvider: M, withContext: $ } = /* @__PURE__ */ k({
|
|
21
21
|
key: "dateRangePicker"
|
|
22
22
|
}), N = /* @__PURE__ */ M("div", "root"), J = /* @__PURE__ */ $("div", "group"), K = /* @__PURE__ */ $("div", "trigger"), Q = /* @__PURE__ */ $("div", "popover"), U = /* @__PURE__ */ $("div", "calendar"), X = ({
|
|
@@ -278,4 +278,4 @@ Z.displayName = "DateRangePicker";
|
|
|
278
278
|
export {
|
|
279
279
|
Z as D
|
|
280
280
|
};
|
|
281
|
-
//# sourceMappingURL=date-range-picker-
|
|
281
|
+
//# sourceMappingURL=date-range-picker-DGWMdcAN.es.js.map
|
package/dist/chunks/{date-range-picker-CkRgcwfm.es.js.map → date-range-picker-DGWMdcAN.es.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-range-picker-CkRgcwfm.es.js","sources":["../../src/components/date-range-picker/date-range-picker.slots.tsx","../../src/components/date-range-picker/components/date-range-picker.time-input.tsx","../../src/components/date-range-picker/components/date-range-picker.custom-context.tsx","../../src/components/date-range-picker/date-range-picker.tsx"],"sourcesContent":["import {\n type HTMLChakraProps,\n createSlotRecipeContext,\n} from \"@chakra-ui/react\";\nimport type { DateRangePickerRootSlotProps } from \"./date-range-picker.types\";\n\n// Correctly destructure from createSlotRecipeContext based on project examples\nconst { withProvider, withContext } = createSlotRecipeContext({\n key: \"dateRangePicker\",\n});\n\n/**\n * Root component that provides the styling context for the DateRangePicker component.\n * Uses Chakra UI's recipe context system for consistent styling across instances.\n */\nexport const DateRangePickerRootSlot = withProvider<\n HTMLDivElement,\n DateRangePickerRootSlotProps\n>(\"div\", \"root\");\n\n/**\n * Slot component for the input group containing the DateInput and trigger button.\n */\nexport const DateRangePickerGroupSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"group\");\n\n/**\n * Slot component for the trigger button that opens the calendar popover.\n */\nexport const DateRangePickerTriggerSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"trigger\");\n\n/**\n * Slot component for the popover container.\n */\nexport const DateRangePickerPopoverSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"popover\");\n\n/**\n * Slot component for the calendar container within the popover.\n */\nexport const DateRangePickerCalendarSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"calendar\");\n\n/**\n * Slot component for the calendar header.\n */\nexport const DateRangePickerCalendarHeaderSlot = withContext<\n HTMLElement,\n HTMLChakraProps<\"header\">\n>(\"header\", \"calendarHeader\");\n\n/**\n * Slot component for the calendar grid.\n */\nexport const DateRangePickerCalendarGridSlot = withContext<\n HTMLTableElement,\n HTMLChakraProps<\"table\">\n>(\"table\", \"calendarGrid\");\n\n/**\n * Slot component for individual calendar cells.\n */\nexport const DateRangePickerCalendarCellSlot = withContext<\n HTMLTableCellElement,\n HTMLChakraProps<\"td\">\n>(\"td\", \"calendarCell\");\n","import { Flex, Text, TimeInput } from \"@/components\";\nimport { useContext, useRef, useEffect } from \"react\";\nimport { DateRangePickerStateContext } from \"react-aria-components\";\nimport type { DateRangePickerTimeInputProps } from \"../date-range-picker.types\";\n\nexport const DateRangePickerTimeInput = ({\n hideTimeZone,\n hourCycle,\n}: DateRangePickerTimeInputProps) => {\n const dateRangePickerState = useContext(DateRangePickerStateContext);\n const { granularity, value } = dateRangePickerState!;\n const timeInputRef = useRef<HTMLDivElement>(null);\n const previousValueRef = useRef(value);\n\n // do not show up to the party if you're not invited\n if (granularity === \"day\") {\n return null;\n }\n\n // Focus the time input when date range changes (user selects dates from calendar)\n useEffect(() => {\n let timeoutId: ReturnType<typeof setTimeout> | undefined;\n\n // Check if date range changed by comparing start and end dates\n const hasValueChanged =\n (value?.start &&\n previousValueRef.current?.start?.compare(value.start) !== 0) ||\n (value?.end && previousValueRef.current?.end?.compare(value.end) !== 0);\n\n if (hasValueChanged) {\n // Only auto-focus if no time input segment currently has focus\n // This prevents stealing focus during user interaction with time segments\n const container = timeInputRef.current;\n const activeElement = document.activeElement;\n const hasTimeSegmentFocus =\n container?.contains(activeElement) &&\n activeElement?.getAttribute(\"role\") === \"spinbutton\";\n\n if (!hasTimeSegmentFocus) {\n // Small delay to ensure the DOM is ready\n timeoutId = setTimeout(() => {\n // Find the first focusable segment within the time input container\n if (container) {\n const firstSegment = container.querySelector(\n '[role=\"spinbutton\"]'\n ) as HTMLElement;\n\n if (firstSegment) {\n firstSegment.focus();\n }\n }\n }, 50);\n }\n }\n\n previousValueRef.current = value;\n\n // Cleanup timeout on effect re-run or unmount to prevent memory leaks\n return () => {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n };\n }, [value]);\n\n return (\n <Flex\n ref={timeInputRef}\n borderTop=\"solid-25\"\n borderColor=\"neutral.3\"\n py=\"300\"\n px=\"400\"\n alignItems=\"center\"\n justifyContent=\"center\"\n gap=\"200\"\n >\n {/* Start DateInput with separate label */}\n <Flex alignItems=\"center\" gap=\"200\">\n {/* TODO: translate hardcoded string */}\n <Text\n textStyle=\"xs\"\n fontWeight=\"500\"\n color=\"neutral.12\"\n minWidth=\"fit-content\"\n >\n Start time\n </Text>\n <TimeInput\n slot=\"startTimeInput\"\n variant=\"ghost\"\n size=\"sm\"\n hideTimeZone={hideTimeZone}\n hourCycle={hourCycle}\n />\n </Flex>\n\n {/* End DateInput with separate label */}\n <Flex alignItems=\"center\" gap=\"200\">\n {/* TODO: translate hardcoded string */}\n <Text\n textStyle=\"xs\"\n fontWeight=\"500\"\n color=\"neutral.12\"\n minWidth=\"fit-content\"\n >\n End time\n </Text>\n <TimeInput\n slot=\"endTimeInput\"\n variant=\"ghost\"\n size=\"sm\"\n hideTimeZone={hideTimeZone}\n hourCycle={hourCycle}\n />\n </Flex>\n </Flex>\n );\n};\n","import { useContext, type ReactNode } from \"react\";\nimport {\n Provider,\n ButtonContext,\n DateRangePickerStateContext,\n TimeFieldContext,\n useSlottedContext,\n} from \"react-aria-components\";\nimport type { PressEvent, TimeValue } from \"react-aria\";\n\nexport const DateRangePickerCustomContext = ({\n children,\n}: {\n children: ReactNode;\n}) => {\n const buttonContext = useSlottedContext(ButtonContext) || {};\n const dateRangePickerState = useContext(DateRangePickerStateContext);\n\n // Check if all 6 segments (start: day, month, year; end: day, month, year) have values\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const hasCompleteRangeDate = (date: any) =>\n date?.day && date?.month && date?.year;\n\n const incompleteValue =\n !dateRangePickerState?.value ||\n !hasCompleteRangeDate(dateRangePickerState.value.start) ||\n !hasCompleteRangeDate(dateRangePickerState.value.end);\n\n const { granularity } = dateRangePickerState!;\n\n // Extract time values from start and end dates separately\n const startTimeValue =\n dateRangePickerState?.value?.start &&\n \"hour\" in dateRangePickerState.value.start\n ? dateRangePickerState.value.start\n : null;\n const endTimeValue =\n dateRangePickerState?.value?.end && \"hour\" in dateRangePickerState.value.end\n ? dateRangePickerState.value.end\n : null;\n\n // Try to get disabled state from the button context\n const isDateRangePickerDisabled = buttonContext?.isDisabled;\n\n // Generate default aria-label based on granularity if not provided\n const getDefaultTimeInputAriaLabel = (type: \"start\" | \"end\") => {\n const prefix = type === \"start\" ? \"Start\" : \"End\";\n switch (granularity) {\n case \"hour\":\n return `${prefix} time (hour)`;\n case \"minute\":\n return `${prefix} time (hour and minute)`;\n case \"second\":\n return `${prefix} time (hour, minute, and second)`;\n default:\n return `${prefix} time`;\n }\n };\n\n /**\n * Button slots\n * ================================\n */\n const buttonSlots = {\n /** toggles the calendar popover */\n calendarToggle: {\n ...buttonContext,\n onPress: (event: PressEvent) => {\n // Ensure any active input (e.g., date picker segment) loses focus\n // because blurring the input will close the popover if it's open (or was just opened)\n const activeElement = document?.activeElement as HTMLElement | null;\n\n if (activeElement) {\n activeElement.blur();\n }\n\n buttonContext.onPress?.(event);\n },\n },\n /** Clear button that displays when there's a value in each segment - hidden from both visual and screen readers when there's no value */\n clear: {\n // Clear both start and end values\n onPress: () => dateRangePickerState?.setValue(null),\n \"aria-label\": \"Clear input value\",\n isDisabled: isDateRangePickerDisabled,\n // Hide the button when there's no value\n style: incompleteValue ? { display: \"none\" } : undefined,\n \"aria-hidden\": incompleteValue ? true : undefined,\n },\n };\n\n /**\n * TimeInput slots\n * ================================\n */\n\n // Separate time input slots for start and end times\n const timeInputSlots = {\n startTimeInput: {\n value: startTimeValue,\n onChange: (value: TimeValue | null) => {\n if (value !== null && dateRangePickerState?.value?.start) {\n // Update the start date with the new time\n const currentValue = dateRangePickerState.value;\n const startDate = currentValue.start;\n const endDate = currentValue.end;\n if (startDate && endDate) {\n const newStartDate = startDate.set({\n hour: value.hour,\n minute: value.minute || 0,\n second: value.second || 0,\n millisecond: value.millisecond || 0,\n });\n\n dateRangePickerState.setValue({\n start: newStartDate,\n end: endDate,\n });\n }\n }\n },\n granularity: granularity === \"day\" ? undefined : granularity,\n \"aria-label\": getDefaultTimeInputAriaLabel(\"start\"),\n },\n endTimeInput: {\n value: endTimeValue,\n onChange: (value: TimeValue | null) => {\n if (value !== null && dateRangePickerState?.value?.end) {\n // Update the end date with the new time\n const currentValue = dateRangePickerState.value;\n const startDate = currentValue.start;\n const endDate = currentValue.end;\n if (startDate && endDate) {\n const newEndDate = endDate.set({\n hour: value.hour,\n minute: value.minute || 0,\n second: value.second || 0,\n millisecond: value.millisecond || 0,\n });\n\n dateRangePickerState.setValue({\n start: startDate,\n end: newEndDate,\n });\n }\n }\n },\n granularity: granularity === \"day\" ? undefined : granularity,\n \"aria-label\": getDefaultTimeInputAriaLabel(\"end\"),\n },\n };\n\n return (\n <Provider\n values={[\n [\n ButtonContext,\n {\n slots: buttonSlots,\n },\n ],\n [TimeFieldContext, { slots: timeInputSlots }],\n ]}\n >\n {children}\n </Provider>\n );\n};\n","import {\n DateRangePickerRootSlot,\n DateRangePickerGroupSlot,\n DateRangePickerTriggerSlot,\n DateRangePickerPopoverSlot,\n DateRangePickerCalendarSlot,\n} from \"./date-range-picker.slots\";\n\nimport { CalendarMonth, Close } from \"@commercetools/nimbus-icons\";\n\nimport {\n DateRangePicker as ReactAriaDateRangePicker,\n Group,\n Popover,\n Dialog,\n} from \"react-aria-components\";\nimport { useSlotRecipe } from \"@chakra-ui/react/styled-system\";\nimport { dateRangePickerSlotRecipe } from \"./date-range-picker.recipe\";\nimport type { DateRangePickerProps } from \"./date-range-picker.types\";\nimport { extractStyleProps } from \"@/utils/extractStyleProps\";\nimport { DateInput, RangeCalendar, IconButton, Text } from \"@/components\";\nimport { DateRangePickerTimeInput } from \"./components/date-range-picker.time-input\";\nimport { DateRangePickerCustomContext } from \"./components/date-range-picker.custom-context\";\n\n/**\n * DateRangePicker\n * ============================================================\n * Combines a DateInput with a RangeCalendar popover for date range selection.\n * Users can either type a date range directly or select from the calendar.\n */\nexport const DateRangePicker = (props: DateRangePickerProps) => {\n // Forward hideTimeZone and hourCycle to child components (footer time inputs)\n const { granularity = \"day\", hideTimeZone, hourCycle } = props;\n const recipe = useSlotRecipe({ recipe: dateRangePickerSlotRecipe });\n const [recipeProps, remainingProps] = recipe.splitVariantProps(props);\n\n const [styleProps, otherProps] = extractStyleProps(remainingProps);\n\n // Extract size and variant from recipe props to pass to DateInputs\n const { size = \"md\" } = recipeProps;\n\n // the size of the buttons overlaying the input\n const overlayButtonSize = size === \"md\" ? \"xs\" : \"2xs\";\n\n // When granularity is \"day\", use the prop value (defaults to true if not provided)\n // For other granularities (time-based), force to false so users can set both date and time\n const shouldCloseOnSelect =\n granularity === \"day\" ? props.shouldCloseOnSelect : false;\n\n return (\n <DateRangePickerRootSlot {...recipeProps} {...styleProps} asChild>\n <ReactAriaDateRangePicker\n {...otherProps}\n shouldCloseOnSelect={shouldCloseOnSelect}\n >\n <DateRangePickerCustomContext>\n <DateRangePickerGroupSlot asChild>\n <Group>\n <DateInput\n slot=\"start\"\n size={props.size}\n variant=\"plain\"\n width=\"auto\"\n hideTimeZone={hideTimeZone}\n hourCycle={hourCycle}\n />\n <Text\n as=\"span\"\n px=\"150\"\n color=\"neutral.11\"\n userSelect=\"none\"\n aria-hidden=\"true\"\n slot={null}\n >\n –\n </Text>\n <DateInput\n slot=\"end\"\n size={props.size}\n variant=\"plain\"\n width=\"auto\"\n hideTimeZone={hideTimeZone}\n hourCycle={hourCycle}\n />\n <DateRangePickerTriggerSlot>\n {/* @ts-expect-error react aria is adding the aria-label prop */}\n <IconButton\n tone=\"primary\"\n variant=\"ghost\"\n size={overlayButtonSize}\n slot=\"clear\"\n >\n <Close />\n </IconButton>\n {/* @ts-expect-error react aria is adding the aria-label prop */}\n <IconButton\n tone=\"primary\"\n variant=\"ghost\"\n size={overlayButtonSize}\n slot=\"calendarToggle\"\n >\n <CalendarMonth />\n </IconButton>\n </DateRangePickerTriggerSlot>\n </Group>\n </DateRangePickerGroupSlot>\n <DateRangePickerPopoverSlot asChild>\n <Popover placement=\"bottom end\">\n <Dialog>\n <DateRangePickerCalendarSlot>\n <RangeCalendar />\n </DateRangePickerCalendarSlot>\n <DateRangePickerTimeInput\n hideTimeZone={hideTimeZone}\n hourCycle={hourCycle}\n />\n </Dialog>\n </Popover>\n </DateRangePickerPopoverSlot>\n </DateRangePickerCustomContext>\n </ReactAriaDateRangePicker>\n </DateRangePickerRootSlot>\n );\n};\n\nDateRangePicker.displayName = \"DateRangePicker\";\n"],"names":["withProvider","withContext","createSlotRecipeContext","DateRangePickerRootSlot","DateRangePickerGroupSlot","DateRangePickerTriggerSlot","DateRangePickerPopoverSlot","DateRangePickerCalendarSlot","DateRangePickerTimeInput","hideTimeZone","hourCycle","dateRangePickerState","useContext","DateRangePickerStateContext","granularity","value","timeInputRef","useRef","previousValueRef","useEffect","timeoutId","container","activeElement","firstSegment","jsxs","Flex","jsx","Text","TimeInput","DateRangePickerCustomContext","children","buttonContext","useSlottedContext","ButtonContext","hasCompleteRangeDate","date","incompleteValue","startTimeValue","endTimeValue","isDateRangePickerDisabled","getDefaultTimeInputAriaLabel","type","prefix","buttonSlots","event","timeInputSlots","currentValue","startDate","endDate","newStartDate","newEndDate","Provider","TimeFieldContext","DateRangePicker","props","recipe","useSlotRecipe","dateRangePickerSlotRecipe","recipeProps","remainingProps","styleProps","otherProps","extractStyleProps","size","overlayButtonSize","shouldCloseOnSelect","ReactAriaDateRangePicker","Group","DateInput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;AAAA,YAAA,gBAAAqB;AAAA,cAAC2C;AAAA,cAAA;AAAA,gBACC,MAAK;AAAA,gBACL,SAAQ;AAAA,gBACR,MAAML;AAAA,gBACN,MAAK;AAAA,gBAEL,4BAACM,GAAA,CAAA,CAAM;AAAA,cAAA;AAAA,YAAA;AAAA,YAGT,gBAAA5C;AAAA,cAAC2C;AAAA,cAAA;AAAA,gBACC,MAAK;AAAA,gBACL,SAAQ;AAAA,gBACR,MAAML;AAAA,gBACN,MAAK;AAAA,gBAEL,4BAACO,GAAA,CAAA,CAAc;AAAA,cAAA;AAAA,YAAA;AAAA,UACjB,EAAA,CACF;AAAA,QAAA,EAAA,CACF,EAAA,CACF;AAAA,QACA,gBAAA7C,EAACpB,KAA2B,SAAO,IACjC,4BAACkE,GAAA,EAAQ,WAAU,cACjB,UAAA,gBAAAhD,EAACiD,GAAA,EACC,UAAA;AAAA,UAAA,gBAAA/C,EAACnB,GAAA,EACC,UAAA,gBAAAmB,EAACgD,GAAA,CAAA,CAAc,GACjB;AAAA,UACA,gBAAAhD;AAAA,YAAClB;AAAA,YAAA;AAAA,cACC,cAAAC;AAAA,cACA,WAAAC;AAAA,YAAA;AAAA,UAAA;AAAA,QACF,EAAA,CACF,GACF,EAAA,CACF;AAAA,MAAA,EAAA,CACF;AAAA,IAAA;AAAA,EAAA,GAEJ;AAEJ;AAEA2C,EAAgB,cAAc;"}
|
|
1
|
+
{"version":3,"file":"date-range-picker-DGWMdcAN.es.js","sources":["../../src/components/date-range-picker/date-range-picker.slots.tsx","../../src/components/date-range-picker/components/date-range-picker.time-input.tsx","../../src/components/date-range-picker/components/date-range-picker.custom-context.tsx","../../src/components/date-range-picker/date-range-picker.tsx"],"sourcesContent":["import {\n type HTMLChakraProps,\n createSlotRecipeContext,\n} from \"@chakra-ui/react\";\nimport type { DateRangePickerRootSlotProps } from \"./date-range-picker.types\";\n\n// Correctly destructure from createSlotRecipeContext based on project examples\nconst { withProvider, withContext } = createSlotRecipeContext({\n key: \"dateRangePicker\",\n});\n\n/**\n * Root component that provides the styling context for the DateRangePicker component.\n * Uses Chakra UI's recipe context system for consistent styling across instances.\n */\nexport const DateRangePickerRootSlot = withProvider<\n HTMLDivElement,\n DateRangePickerRootSlotProps\n>(\"div\", \"root\");\n\n/**\n * Slot component for the input group containing the DateInput and trigger button.\n */\nexport const DateRangePickerGroupSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"group\");\n\n/**\n * Slot component for the trigger button that opens the calendar popover.\n */\nexport const DateRangePickerTriggerSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"trigger\");\n\n/**\n * Slot component for the popover container.\n */\nexport const DateRangePickerPopoverSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"popover\");\n\n/**\n * Slot component for the calendar container within the popover.\n */\nexport const DateRangePickerCalendarSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"calendar\");\n\n/**\n * Slot component for the calendar header.\n */\nexport const DateRangePickerCalendarHeaderSlot = withContext<\n HTMLElement,\n HTMLChakraProps<\"header\">\n>(\"header\", \"calendarHeader\");\n\n/**\n * Slot component for the calendar grid.\n */\nexport const DateRangePickerCalendarGridSlot = withContext<\n HTMLTableElement,\n HTMLChakraProps<\"table\">\n>(\"table\", \"calendarGrid\");\n\n/**\n * Slot component for individual calendar cells.\n */\nexport const DateRangePickerCalendarCellSlot = withContext<\n HTMLTableCellElement,\n HTMLChakraProps<\"td\">\n>(\"td\", \"calendarCell\");\n","import { Flex, Text, TimeInput } from \"@/components\";\nimport { useContext, useRef, useEffect } from \"react\";\nimport { DateRangePickerStateContext } from \"react-aria-components\";\nimport type { DateRangePickerTimeInputProps } from \"../date-range-picker.types\";\n\nexport const DateRangePickerTimeInput = ({\n hideTimeZone,\n hourCycle,\n}: DateRangePickerTimeInputProps) => {\n const dateRangePickerState = useContext(DateRangePickerStateContext);\n const { granularity, value } = dateRangePickerState!;\n const timeInputRef = useRef<HTMLDivElement>(null);\n const previousValueRef = useRef(value);\n\n // do not show up to the party if you're not invited\n if (granularity === \"day\") {\n return null;\n }\n\n // Focus the time input when date range changes (user selects dates from calendar)\n useEffect(() => {\n let timeoutId: ReturnType<typeof setTimeout> | undefined;\n\n // Check if date range changed by comparing start and end dates\n const hasValueChanged =\n (value?.start &&\n previousValueRef.current?.start?.compare(value.start) !== 0) ||\n (value?.end && previousValueRef.current?.end?.compare(value.end) !== 0);\n\n if (hasValueChanged) {\n // Only auto-focus if no time input segment currently has focus\n // This prevents stealing focus during user interaction with time segments\n const container = timeInputRef.current;\n const activeElement = document.activeElement;\n const hasTimeSegmentFocus =\n container?.contains(activeElement) &&\n activeElement?.getAttribute(\"role\") === \"spinbutton\";\n\n if (!hasTimeSegmentFocus) {\n // Small delay to ensure the DOM is ready\n timeoutId = setTimeout(() => {\n // Find the first focusable segment within the time input container\n if (container) {\n const firstSegment = container.querySelector(\n '[role=\"spinbutton\"]'\n ) as HTMLElement;\n\n if (firstSegment) {\n firstSegment.focus();\n }\n }\n }, 50);\n }\n }\n\n previousValueRef.current = value;\n\n // Cleanup timeout on effect re-run or unmount to prevent memory leaks\n return () => {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n };\n }, [value]);\n\n return (\n <Flex\n ref={timeInputRef}\n borderTop=\"solid-25\"\n borderColor=\"neutral.3\"\n py=\"300\"\n px=\"400\"\n alignItems=\"center\"\n justifyContent=\"center\"\n gap=\"200\"\n >\n {/* Start DateInput with separate label */}\n <Flex alignItems=\"center\" gap=\"200\">\n {/* TODO: translate hardcoded string */}\n <Text\n textStyle=\"xs\"\n fontWeight=\"500\"\n color=\"neutral.12\"\n minWidth=\"fit-content\"\n >\n Start time\n </Text>\n <TimeInput\n slot=\"startTimeInput\"\n variant=\"ghost\"\n size=\"sm\"\n hideTimeZone={hideTimeZone}\n hourCycle={hourCycle}\n />\n </Flex>\n\n {/* End DateInput with separate label */}\n <Flex alignItems=\"center\" gap=\"200\">\n {/* TODO: translate hardcoded string */}\n <Text\n textStyle=\"xs\"\n fontWeight=\"500\"\n color=\"neutral.12\"\n minWidth=\"fit-content\"\n >\n End time\n </Text>\n <TimeInput\n slot=\"endTimeInput\"\n variant=\"ghost\"\n size=\"sm\"\n hideTimeZone={hideTimeZone}\n hourCycle={hourCycle}\n />\n </Flex>\n </Flex>\n );\n};\n","import { useContext, type ReactNode } from \"react\";\nimport {\n Provider,\n ButtonContext,\n DateRangePickerStateContext,\n TimeFieldContext,\n useSlottedContext,\n} from \"react-aria-components\";\nimport type { PressEvent, TimeValue } from \"react-aria\";\n\nexport const DateRangePickerCustomContext = ({\n children,\n}: {\n children: ReactNode;\n}) => {\n const buttonContext = useSlottedContext(ButtonContext) || {};\n const dateRangePickerState = useContext(DateRangePickerStateContext);\n\n // Check if all 6 segments (start: day, month, year; end: day, month, year) have values\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const hasCompleteRangeDate = (date: any) =>\n date?.day && date?.month && date?.year;\n\n const incompleteValue =\n !dateRangePickerState?.value ||\n !hasCompleteRangeDate(dateRangePickerState.value.start) ||\n !hasCompleteRangeDate(dateRangePickerState.value.end);\n\n const { granularity } = dateRangePickerState!;\n\n // Extract time values from start and end dates separately\n const startTimeValue =\n dateRangePickerState?.value?.start &&\n \"hour\" in dateRangePickerState.value.start\n ? dateRangePickerState.value.start\n : null;\n const endTimeValue =\n dateRangePickerState?.value?.end && \"hour\" in dateRangePickerState.value.end\n ? dateRangePickerState.value.end\n : null;\n\n // Try to get disabled state from the button context\n const isDateRangePickerDisabled = buttonContext?.isDisabled;\n\n // Generate default aria-label based on granularity if not provided\n const getDefaultTimeInputAriaLabel = (type: \"start\" | \"end\") => {\n const prefix = type === \"start\" ? \"Start\" : \"End\";\n switch (granularity) {\n case \"hour\":\n return `${prefix} time (hour)`;\n case \"minute\":\n return `${prefix} time (hour and minute)`;\n case \"second\":\n return `${prefix} time (hour, minute, and second)`;\n default:\n return `${prefix} time`;\n }\n };\n\n /**\n * Button slots\n * ================================\n */\n const buttonSlots = {\n /** toggles the calendar popover */\n calendarToggle: {\n ...buttonContext,\n onPress: (event: PressEvent) => {\n // Ensure any active input (e.g., date picker segment) loses focus\n // because blurring the input will close the popover if it's open (or was just opened)\n const activeElement = document?.activeElement as HTMLElement | null;\n\n if (activeElement) {\n activeElement.blur();\n }\n\n buttonContext.onPress?.(event);\n },\n },\n /** Clear button that displays when there's a value in each segment - hidden from both visual and screen readers when there's no value */\n clear: {\n // Clear both start and end values\n onPress: () => dateRangePickerState?.setValue(null),\n \"aria-label\": \"Clear input value\",\n isDisabled: isDateRangePickerDisabled,\n // Hide the button when there's no value\n style: incompleteValue ? { display: \"none\" } : undefined,\n \"aria-hidden\": incompleteValue ? true : undefined,\n },\n };\n\n /**\n * TimeInput slots\n * ================================\n */\n\n // Separate time input slots for start and end times\n const timeInputSlots = {\n startTimeInput: {\n value: startTimeValue,\n onChange: (value: TimeValue | null) => {\n if (value !== null && dateRangePickerState?.value?.start) {\n // Update the start date with the new time\n const currentValue = dateRangePickerState.value;\n const startDate = currentValue.start;\n const endDate = currentValue.end;\n if (startDate && endDate) {\n const newStartDate = startDate.set({\n hour: value.hour,\n minute: value.minute || 0,\n second: value.second || 0,\n millisecond: value.millisecond || 0,\n });\n\n dateRangePickerState.setValue({\n start: newStartDate,\n end: endDate,\n });\n }\n }\n },\n granularity: granularity === \"day\" ? undefined : granularity,\n \"aria-label\": getDefaultTimeInputAriaLabel(\"start\"),\n },\n endTimeInput: {\n value: endTimeValue,\n onChange: (value: TimeValue | null) => {\n if (value !== null && dateRangePickerState?.value?.end) {\n // Update the end date with the new time\n const currentValue = dateRangePickerState.value;\n const startDate = currentValue.start;\n const endDate = currentValue.end;\n if (startDate && endDate) {\n const newEndDate = endDate.set({\n hour: value.hour,\n minute: value.minute || 0,\n second: value.second || 0,\n millisecond: value.millisecond || 0,\n });\n\n dateRangePickerState.setValue({\n start: startDate,\n end: newEndDate,\n });\n }\n }\n },\n granularity: granularity === \"day\" ? undefined : granularity,\n \"aria-label\": getDefaultTimeInputAriaLabel(\"end\"),\n },\n };\n\n return (\n <Provider\n values={[\n [\n ButtonContext,\n {\n slots: buttonSlots,\n },\n ],\n [TimeFieldContext, { slots: timeInputSlots }],\n ]}\n >\n {children}\n </Provider>\n );\n};\n","import {\n DateRangePickerRootSlot,\n DateRangePickerGroupSlot,\n DateRangePickerTriggerSlot,\n DateRangePickerPopoverSlot,\n DateRangePickerCalendarSlot,\n} from \"./date-range-picker.slots\";\n\nimport { CalendarMonth, Close } from \"@commercetools/nimbus-icons\";\n\nimport {\n DateRangePicker as ReactAriaDateRangePicker,\n Group,\n Popover,\n Dialog,\n} from \"react-aria-components\";\nimport { useSlotRecipe } from \"@chakra-ui/react/styled-system\";\nimport { dateRangePickerSlotRecipe } from \"./date-range-picker.recipe\";\nimport type { DateRangePickerProps } from \"./date-range-picker.types\";\nimport { extractStyleProps } from \"@/utils/extractStyleProps\";\nimport { DateInput, RangeCalendar, IconButton, Text } from \"@/components\";\nimport { DateRangePickerTimeInput } from \"./components/date-range-picker.time-input\";\nimport { DateRangePickerCustomContext } from \"./components/date-range-picker.custom-context\";\n\n/**\n * DateRangePicker\n * ============================================================\n * Combines a DateInput with a RangeCalendar popover for date range selection.\n * Users can either type a date range directly or select from the calendar.\n */\nexport const DateRangePicker = (props: DateRangePickerProps) => {\n // Forward hideTimeZone and hourCycle to child components (footer time inputs)\n const { granularity = \"day\", hideTimeZone, hourCycle } = props;\n const recipe = useSlotRecipe({ recipe: dateRangePickerSlotRecipe });\n const [recipeProps, remainingProps] = recipe.splitVariantProps(props);\n\n const [styleProps, otherProps] = extractStyleProps(remainingProps);\n\n // Extract size and variant from recipe props to pass to DateInputs\n const { size = \"md\" } = recipeProps;\n\n // the size of the buttons overlaying the input\n const overlayButtonSize = size === \"md\" ? \"xs\" : \"2xs\";\n\n // When granularity is \"day\", use the prop value (defaults to true if not provided)\n // For other granularities (time-based), force to false so users can set both date and time\n const shouldCloseOnSelect =\n granularity === \"day\" ? props.shouldCloseOnSelect : false;\n\n return (\n <DateRangePickerRootSlot {...recipeProps} {...styleProps} asChild>\n <ReactAriaDateRangePicker\n {...otherProps}\n shouldCloseOnSelect={shouldCloseOnSelect}\n >\n <DateRangePickerCustomContext>\n <DateRangePickerGroupSlot asChild>\n <Group>\n <DateInput\n slot=\"start\"\n size={props.size}\n variant=\"plain\"\n width=\"auto\"\n hideTimeZone={hideTimeZone}\n hourCycle={hourCycle}\n />\n <Text\n as=\"span\"\n px=\"150\"\n color=\"neutral.11\"\n userSelect=\"none\"\n aria-hidden=\"true\"\n slot={null}\n >\n –\n </Text>\n <DateInput\n slot=\"end\"\n size={props.size}\n variant=\"plain\"\n width=\"auto\"\n hideTimeZone={hideTimeZone}\n hourCycle={hourCycle}\n />\n <DateRangePickerTriggerSlot>\n {/* @ts-expect-error react aria is adding the aria-label prop */}\n <IconButton\n tone=\"primary\"\n variant=\"ghost\"\n size={overlayButtonSize}\n slot=\"clear\"\n >\n <Close />\n </IconButton>\n {/* @ts-expect-error react aria is adding the aria-label prop */}\n <IconButton\n tone=\"primary\"\n variant=\"ghost\"\n size={overlayButtonSize}\n slot=\"calendarToggle\"\n >\n <CalendarMonth />\n </IconButton>\n </DateRangePickerTriggerSlot>\n </Group>\n </DateRangePickerGroupSlot>\n <DateRangePickerPopoverSlot asChild>\n <Popover placement=\"bottom end\">\n <Dialog>\n <DateRangePickerCalendarSlot>\n <RangeCalendar />\n </DateRangePickerCalendarSlot>\n <DateRangePickerTimeInput\n hideTimeZone={hideTimeZone}\n hourCycle={hourCycle}\n />\n </Dialog>\n </Popover>\n </DateRangePickerPopoverSlot>\n </DateRangePickerCustomContext>\n </ReactAriaDateRangePicker>\n </DateRangePickerRootSlot>\n );\n};\n\nDateRangePicker.displayName = \"DateRangePicker\";\n"],"names":["withProvider","withContext","createSlotRecipeContext","DateRangePickerRootSlot","DateRangePickerGroupSlot","DateRangePickerTriggerSlot","DateRangePickerPopoverSlot","DateRangePickerCalendarSlot","DateRangePickerTimeInput","hideTimeZone","hourCycle","dateRangePickerState","useContext","DateRangePickerStateContext","granularity","value","timeInputRef","useRef","previousValueRef","useEffect","timeoutId","container","activeElement","firstSegment","jsxs","Flex","jsx","Text","TimeInput","DateRangePickerCustomContext","children","buttonContext","useSlottedContext","ButtonContext","hasCompleteRangeDate","date","incompleteValue","startTimeValue","endTimeValue","isDateRangePickerDisabled","getDefaultTimeInputAriaLabel","type","prefix","buttonSlots","event","timeInputSlots","currentValue","startDate","endDate","newStartDate","newEndDate","Provider","TimeFieldContext","DateRangePicker","props","recipe","useSlotRecipe","dateRangePickerSlotRecipe","recipeProps","remainingProps","styleProps","otherProps","extractStyleProps","size","overlayButtonSize","shouldCloseOnSelect","ReactAriaDateRangePicker","Group","DateInput","IconButton","Close","CalendarMonth","Popover","Dialog","RangeCalendar"],"mappings":";;;;;;;;;;;;;;;;;;;AAOA,MAAM,EAAE,cAAAA,GAAc,aAAAC,EAAA,IAAgB,gBAAAC,EAAwB;AAAA,EAC5D,KAAK;AACP,CAAC,GAMYC,IAA0B,gBAAAH,EAGrC,OAAO,MAAM,GAKFI,IAA2B,gBAAAH,EAGtC,OAAO,OAAO,GAKHI,IAA6B,gBAAAJ,EAGxC,OAAO,SAAS,GAKLK,IAA6B,gBAAAL,EAGxC,OAAO,SAAS,GAKLM,IAA8B,gBAAAN,EAGzC,OAAO,UAAU,GC7CNO,IAA2B,CAAC;AAAA,EACvC,cAAAC;AAAA,EACA,WAAAC;AACF,MAAqC;AACnC,QAAMC,IAAuBC,EAAWC,CAA2B,GAC7D,EAAE,aAAAC,GAAa,OAAAC,EAAA,IAAUJ,GACzBK,IAAeC,EAAuB,IAAI,GAC1CC,IAAmBD,EAAOF,CAAK;AAGrC,SAAID,MAAgB,QACX,QAITK,EAAU,MAAM;AACd,QAAIC;AAQJ,QAJGL,GAAO,SACNG,EAAiB,SAAS,OAAO,QAAQH,EAAM,KAAK,MAAM,K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YAAA;AAAA,UAAA;AAAA,QACF,EAAA,CACF,GACF,EAAA,CACF;AAAA,MAAA,EAAA,CACF;AAAA,IAAA;AAAA,EAAA,GAEJ;AAEJ;AAEA2C,EAAgB,cAAc;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as o, f as a, e, d as g, c as i, b as r, a as l, D as t } from "./dialog.title-
|
|
1
|
+
import { g as o, f as a, e, d as g, c as i, b as r, a as l, D as t } from "./dialog.title-CP_ZeiK4.es.js";
|
|
2
2
|
const D = {
|
|
3
3
|
/**
|
|
4
4
|
* # Dialog.Root
|
|
@@ -162,4 +162,4 @@ const D = {
|
|
|
162
162
|
export {
|
|
163
163
|
D
|
|
164
164
|
};
|
|
165
|
-
//# sourceMappingURL=dialog-
|
|
165
|
+
//# sourceMappingURL=dialog-BwtIcIvd.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog-
|
|
1
|
+
{"version":3,"file":"dialog-BwtIcIvd.es.js","sources":["../../src/components/dialog/dialog.tsx"],"sourcesContent":["import { DialogRoot } from \"./components/dialog.root\";\nimport { DialogTrigger } from \"./components/dialog.trigger\";\nimport { DialogContent } from \"./components/dialog.content\";\nimport { DialogHeader } from \"./components/dialog.header\";\nimport { DialogBody } from \"./components/dialog.body\";\nimport { DialogFooter } from \"./components/dialog.footer\";\nimport { DialogTitle } from \"./components/dialog.title\";\nimport { DialogCloseTrigger } from \"./components/dialog.close-trigger\";\n\n/**\n * Dialog\n * ============================================================\n * A foundational dialog component for overlays that require user attention.\n * Built with React Aria Components for accessibility and WCAG 2.1 AA compliance.\n *\n * Features:\n * - Controlled and uncontrolled modes\n * - Customizable placement, size, and animations\n * - Focus management and keyboard navigation\n * - Click-outside and Escape key dismissal\n * - Portal rendering support\n * - Backdrop overlay with animations\n *\n * @example\n * ```tsx\n * <Dialog.Root>\n * <Dialog.Trigger>Open Dialog</Dialog.Trigger>\n * <Dialog.Content size=\"md\" placement=\"center\">\n * <Dialog.Header>\n * <Dialog.Title>Dialog Title</Dialog.Title>\n * <Dialog.CloseTrigger>×</Dialog.CloseTrigger>\n * </Dialog.Header>\n * <Dialog.Body>\n * Dialog content goes here\n * </Dialog.Body>\n * <Dialog.Footer>\n * <button>Cancel</button>\n * <button>Save</button>\n * </Dialog.Footer>\n * </Dialog.Content>\n * </Dialog.Root>\n * ```\n *\n * @see https://nimbus-documentation.vercel.app/components/feedback/dialog\n */\nexport const Dialog = {\n /**\n * # Dialog.Root\n *\n * The root component that provides context and state management for the dialog.\n * Uses React Aria's DialogTrigger for accessibility and keyboard interaction.\n *\n * This component must wrap all dialog parts (Trigger, Content, etc.) and provides\n * the dialog open/close state and variant styling context.\n *\n * @example\n * ```tsx\n * <Dialog.Root>\n * <Dialog.Trigger>Open Dialog</Dialog.Trigger>\n * <Dialog.Content>\n * <Dialog.Header>\n * <Dialog.Title>Dialog Title</Dialog.Title>\n * </Dialog.Header>\n * <Dialog.Body>Dialog content</Dialog.Body>\n * </Dialog.Content>\n * </Dialog.Root>\n * ```\n */\n Root: DialogRoot,\n /**\n * # Dialog.Trigger\n *\n * The trigger element that opens the dialog when activated.\n * Uses React Aria's Button for accessibility and keyboard support.\n *\n * @example\n * ```tsx\n * <Dialog.Root>\n * <Dialog.Trigger>Open Dialog</Dialog.Trigger>\n * <Dialog.Content>...</Dialog.Content>\n * </Dialog.Root>\n * ```\n */\n Trigger: DialogTrigger,\n /**\n * # Dialog.Content\n *\n * The main dialog content container that wraps React Aria's Modal and Dialog.\n * Handles portalling, backdrop, positioning, and content styling.\n *\n * This component creates the dialog overlay, positions the content, and provides\n * accessibility features like focus management and keyboard dismissal.\n *\n * @example\n * ```tsx\n * <Dialog.Root>\n * <Dialog.Trigger>Open Dialog</Dialog.Trigger>\n * <Dialog.Content size=\"md\" placement=\"center\">\n * <Dialog.Header>\n * <Dialog.Title>Title</Dialog.Title>\n * </Dialog.Header>\n * <Dialog.Body>Content</Dialog.Body>\n * <Dialog.Footer>Actions</Dialog.Footer>\n * </Dialog.Content>\n * </Dialog.Root>\n * ```\n */\n Content: DialogContent,\n /**\n * # Dialog.Header\n *\n * The header section of the dialog content.\n * Typically contains the title and close button.\n *\n * @example\n * ```tsx\n * <Dialog.Content>\n * <Dialog.Header>\n * <Dialog.Title>Dialog Title</Dialog.Title>\n * <Dialog.CloseTrigger />\n * </Dialog.Header>\n * <Dialog.Body>...</Dialog.Body>\n * </Dialog.Content>\n * ```\n */\n Header: DialogHeader,\n /**\n * # Dialog.Body\n *\n * The main body content section of the dialog.\n * Contains the primary dialog content and handles overflow/scrolling.\n *\n * @example\n * ```tsx\n * <Dialog.Content>\n * <Dialog.Header>...</Dialog.Header>\n * <Dialog.Body>\n * <p>This is the main content of the dialog.</p>\n * </Dialog.Body>\n * <Dialog.Footer>...</Dialog.Footer>\n * </Dialog.Content>\n * ```\n */\n Body: DialogBody,\n /**\n * # Dialog.Footer\n *\n * The footer section of the dialog, typically containing action buttons.\n * Provides consistent spacing and alignment for dialog actions.\n *\n * @example\n * ```tsx\n * <Dialog.Content>\n * <Dialog.Header>...</Dialog.Header>\n * <Dialog.Body>...</Dialog.Body>\n * <Dialog.Footer>\n * <Button variant=\"outline\">Cancel</Button>\n * <Button>Confirm</Button>\n * </Dialog.Footer>\n * </Dialog.Content>\n * ```\n */\n Footer: DialogFooter,\n /**\n * # Dialog.Title\n *\n * The accessible title element for the dialog.\n * Uses React Aria's Heading for proper accessibility and screen reader support.\n *\n * @example\n * ```tsx\n * <Dialog.Content>\n * <Dialog.Header>\n * <Dialog.Title>Confirm Action</Dialog.Title>\n * </Dialog.Header>\n * <Dialog.Body>...</Dialog.Body>\n * </Dialog.Content>\n * ```\n */\n Title: DialogTitle,\n /**\n * # Dialog.CloseTrigger\n *\n * A button that closes the dialog when activated.\n * Displays an IconButton with a close (X) icon by default.\n *\n * The component automatically handles the close behavior through React Aria's\n * context, so no additional onPress handler is needed.\n *\n * @example\n * ```tsx\n * <Dialog.Root>\n * <Dialog.Trigger>Open Dialog</Dialog.Trigger>\n * <Dialog.Content>\n * <Dialog.Header>\n * <Dialog.Title>Title</Dialog.Title>\n * <Dialog.CloseTrigger aria-label=\"Close dialog\" />\n * </Dialog.Header>\n * <Dialog.Body>Content</Dialog.Body>\n * </Dialog.Content>\n * </Dialog.Root>\n * ```\n */\n CloseTrigger: DialogCloseTrigger,\n};\n\n// Internal exports for react-docgen\nexport {\n DialogRoot as _DialogRoot,\n DialogTrigger as _DialogTrigger,\n DialogContent as _DialogContent,\n DialogHeader as _DialogHeader,\n DialogBody as _DialogBody,\n DialogFooter as _DialogFooter,\n DialogTitle as _DialogTitle,\n DialogCloseTrigger as _DialogCloseTrigger,\n};\n"],"names":["Dialog","DialogRoot","DialogTrigger","DialogContent","DialogHeader","DialogBody","DialogFooter","DialogTitle","DialogCloseTrigger"],"mappings":";AA6CO,MAAMA,IAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAuBpB,MAAMC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAeN,SAASC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAwBT,SAASC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAkBT,QAAQC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAkBR,MAAMC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAmBN,QAAQC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAiBR,OAAOC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAwBP,cAAcC;AAChB;"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import p, { createContext as y, useContext as C } from "react";
|
|
3
|
-
import { k as b, h as x } from "./Dialog-
|
|
3
|
+
import { k as b, h as x } from "./Dialog-Qpq4hk89.es.js";
|
|
4
4
|
import { useSlotRecipe as P, chakra as T } from "@chakra-ui/react/styled-system";
|
|
5
|
-
import { a as $ } from "./Button-
|
|
5
|
+
import { a as $ } from "./Button-Dx3xzN8n.es.js";
|
|
6
6
|
import { e as m } from "./extractStyleProps-DYXEhLtq.es.js";
|
|
7
|
-
import { $ as v, a as S } from "./Modal-
|
|
7
|
+
import { $ as v, a as S } from "./Modal-DZrVgGsJ.es.js";
|
|
8
8
|
import { Close as R } from "@commercetools/nimbus-icons";
|
|
9
9
|
import { defineMessages as N, useIntl as w } from "react-intl";
|
|
10
|
-
import { I as O } from "./icon-button-
|
|
10
|
+
import { I as O } from "./icon-button-DQS2apw-.es.js";
|
|
11
11
|
import { createSlotRecipeContext as B } from "@chakra-ui/react";
|
|
12
12
|
import { H } from "./heading-BtazVUd5.es.js";
|
|
13
13
|
const { withProvider: I, withContext: i } = /* @__PURE__ */ B({
|
|
@@ -149,4 +149,4 @@ export {
|
|
|
149
149
|
Z as f,
|
|
150
150
|
Y as g
|
|
151
151
|
};
|
|
152
|
-
//# sourceMappingURL=dialog.title-
|
|
152
|
+
//# sourceMappingURL=dialog.title-CP_ZeiK4.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog.title-B9cEUH8w.es.js","sources":["../../src/components/dialog/dialog.slots.tsx","../../src/components/dialog/components/dialog.context.tsx","../../src/components/dialog/components/dialog.root.tsx","../../src/components/dialog/components/dialog.trigger.tsx","../../src/components/dialog/components/dialog.content.tsx","../../src/components/dialog/components/dialog.header.tsx","../../src/components/dialog/components/dialog.body.tsx","../../src/components/dialog/components/dialog.footer.tsx","../../src/components/dialog/dialog.i18n.ts","../../src/components/dialog/components/dialog.close-trigger.tsx","../../src/components/dialog/components/dialog.title.tsx"],"sourcesContent":["import { createSlotRecipeContext } from \"@chakra-ui/react\";\nimport type {\n DialogBodySlotProps,\n DialogCloseTriggerSlotProps,\n DialogContentSlotProps,\n DialogFooterSlotProps,\n DialogHeaderSlotProps,\n DialogModalOverlaySlotProps,\n DialogModalSlotProps,\n DialogRootProps,\n DialogTitleSlotProps,\n DialogTriggerSlotProps,\n} from \"./dialog.types\";\n\nconst { withProvider, withContext } = createSlotRecipeContext({\n key: \"dialog\",\n});\n\n// Root slot - provides recipe context + config to all child components\nexport const DialogRootSlot = withProvider<HTMLDivElement, DialogRootProps>(\n \"div\",\n \"root\"\n);\n\n// Trigger slot - button that opens the dialog\nexport const DialogTriggerSlot = withContext<\n HTMLButtonElement,\n DialogTriggerSlotProps\n>(\"button\", \"trigger\");\n\n// Backdrop slot - overlay displayed behind the dialog\nexport const DialogModalOverlaySlot = withContext<\n HTMLDivElement,\n DialogModalOverlaySlotProps\n>(\"div\", \"modalOverlay\");\n\n// modal slot - positions the dialog content\n\nexport const DialogModalSlot = withContext<\n HTMLDivElement,\n DialogModalSlotProps\n>(\"div\", \"modal\");\n\n// Content slot - main dialog container\nexport const DialogContentSlot = withContext<\n HTMLDivElement,\n DialogContentSlotProps\n>(\"div\", \"content\");\n\n// Header slot - dialog header section\nexport const DialogHeaderSlot = withContext<HTMLElement, DialogHeaderSlotProps>(\n \"header\",\n \"header\"\n);\n\n// Body slot - dialog body content\nexport const DialogBodySlot = withContext<HTMLDivElement, DialogBodySlotProps>(\n \"div\",\n \"body\"\n);\n\n// Footer slot - dialog footer section with actions\nexport const DialogFooterSlot = withContext<HTMLElement, DialogFooterSlotProps>(\n \"footer\",\n \"footer\"\n);\n\n// Title slot - accessible dialog title\nexport const DialogTitleSlot = withContext<\n HTMLHeadingElement,\n DialogTitleSlotProps\n>(\"h2\", \"title\");\n\n// Close trigger slot - div container for positioning close button\nexport const DialogCloseTriggerSlot = withContext<\n HTMLDivElement,\n DialogCloseTriggerSlotProps\n>(\"div\", \"closeTrigger\");\n","import { createContext, useContext } from \"react\";\nimport type { DialogRootProps } from \"../dialog.types\";\n\n/**\n * Context value containing dialog configuration passed from Root to child components\n */\nexport type DialogContextValue = DialogRootProps;\n\nexport const DialogContext = createContext<DialogContextValue | undefined>(\n undefined\n);\n\n/**\n * Hook to access dialog configuration from DialogContext\n * @returns Dialog configuration from context\n * @throws Error if used outside of Dialog.Root\n */\nexport const useDialogRootContext = (): DialogContextValue => {\n const context = useContext(DialogContext);\n if (!context) {\n throw new Error(\"useDialogContext must be used within Dialog.Root\");\n }\n return context;\n};\n\n/**\n * Provider component that passes dialog configuration down to child components\n */\nexport const DialogProvider = ({\n children,\n value,\n}: {\n children: React.ReactNode;\n value: DialogContextValue;\n}) => {\n return <DialogContext value={value}>{children}</DialogContext>;\n};\n","import React from \"react\";\nimport { DialogTrigger as RaDialogTrigger } from \"react-aria-components\";\nimport { useSlotRecipe } from \"@chakra-ui/react/styled-system\";\nimport { DialogRootSlot } from \"../dialog.slots\";\nimport type { DialogRootProps } from \"../dialog.types\";\nimport { DialogProvider } from \"./dialog.context\";\n\nexport const DialogRoot = (props: DialogRootProps) => {\n const recipe = useSlotRecipe({ key: \"dialog\" });\n // Extract recipe props\n const [recipeProps] = recipe.splitVariantProps(props);\n // Extract props that are usable on RaDialogTrigger\n const { children, isOpen, onOpenChange, defaultOpen = false } = props;\n\n const content = <DialogRootSlot {...recipeProps}>{children}</DialogRootSlot>;\n\n // Check if any direct child is a Dialog.Trigger component\n // React Aria's DialogTrigger needs a pressable child, so we only use it when there's a trigger\n const hasDialogTrigger = React.Children.toArray(children).some((child) => {\n if (React.isValidElement(child) && typeof child.type === \"function\") {\n const displayName = (\n child.type as React.ComponentType & { displayName?: string }\n )?.displayName;\n return (\n displayName === \"DialogTrigger\" || displayName === \"Dialog.Trigger\"\n );\n }\n return false;\n });\n\n // Share all props (config + variant props) with the Dialog subcomponents\n return (\n <DialogProvider value={props}>\n {hasDialogTrigger ? (\n // When there's a Dialog.Trigger, use DialogTrigger for React Aria integration\n <RaDialogTrigger\n isOpen={isOpen}\n onOpenChange={onOpenChange}\n defaultOpen={defaultOpen}\n >\n {content}\n </RaDialogTrigger>\n ) : (\n // When no Dialog.Trigger, skip using RaDialogTrigger to avoid console.warning's\n content\n )}\n </DialogProvider>\n );\n};\n\nDialogRoot.displayName = \"Dialog.Root\";\n","import { Button as RaButton } from \"react-aria-components\";\nimport { DialogTriggerSlot } from \"../dialog.slots\";\nimport type { DialogTriggerProps } from \"../dialog.types\";\nimport { extractStyleProps } from \"@/utils/extractStyleProps\";\nimport { chakra } from \"@chakra-ui/react/styled-system\";\n\nexport const DialogTrigger = ({\n ref: forwardedRef,\n children,\n asChild,\n ...props\n}: DialogTriggerProps) => {\n // If asChild is true, wrap children directly in RaButton with asChild\n if (asChild) {\n return (\n <chakra.button ref={forwardedRef} asChild {...props}>\n {children}\n </chakra.button>\n );\n }\n\n const [styleProps, restProps] = extractStyleProps(props);\n\n // Otherwise, wrap with both DialogTriggerSlot and RaButton\n // Only pass React Aria compatible props to avoid type conflicts\n return (\n <DialogTriggerSlot {...styleProps} asChild>\n <RaButton ref={forwardedRef} {...restProps}>\n {children}\n </RaButton>\n </DialogTriggerSlot>\n );\n};\n\nDialogTrigger.displayName = \"Dialog.Trigger\";\n","import {\n Modal as RaModal,\n ModalOverlay as RaModalOverlay,\n Dialog as RaDialog,\n} from \"react-aria-components\";\nimport {\n DialogModalOverlaySlot,\n DialogModalSlot,\n DialogContentSlot,\n} from \"../dialog.slots\";\nimport type { DialogContentProps } from \"../dialog.types\";\nimport { extractStyleProps } from \"@/utils/extractStyleProps\";\nimport { useDialogRootContext } from \"./dialog.context\";\n\nexport const DialogContent = (props: DialogContentProps) => {\n const { ref: forwardedRef, children, ...restProps } = props;\n\n // Get recipe configuration from context instead of props\n const {\n defaultOpen,\n isDismissable,\n isKeyboardDismissDisabled,\n shouldCloseOnInteractOutside,\n isOpen,\n onOpenChange,\n } = useDialogRootContext();\n\n const modalProps = {\n defaultOpen,\n isDismissable,\n isKeyboardDismissDisabled,\n shouldCloseOnInteractOutside,\n isOpen,\n onOpenChange,\n };\n\n const [styleProps] = extractStyleProps(restProps);\n\n return (\n <DialogModalOverlaySlot asChild>\n <RaModalOverlay {...modalProps}>\n <DialogModalSlot asChild>\n <RaModal>\n <DialogContentSlot asChild {...styleProps}>\n <RaDialog ref={forwardedRef}>{children}</RaDialog>\n </DialogContentSlot>\n </RaModal>\n </DialogModalSlot>\n </RaModalOverlay>\n </DialogModalOverlaySlot>\n );\n};\n\nDialogContent.displayName = \"Dialog.Content\";\n","import { DialogHeaderSlot } from \"../dialog.slots\";\nimport type { DialogHeaderProps } from \"../dialog.types\";\n\nexport const DialogHeader = (props: DialogHeaderProps) => {\n const { ref: forwardedRef, children, ...restProps } = props;\n\n return (\n <DialogHeaderSlot ref={forwardedRef} {...restProps}>\n {children}\n </DialogHeaderSlot>\n );\n};\n\nDialogHeader.displayName = \"Dialog.Header\";\n","import { DialogBodySlot } from \"../dialog.slots\";\nimport type { DialogBodyProps } from \"../dialog.types\";\nimport { useDialogRootContext } from \"./dialog.context\";\n\nexport const DialogBody = (props: DialogBodyProps) => {\n const { ref: forwardedRef, children, ...restProps } = props;\n const { scrollBehavior } = useDialogRootContext();\n\n const defaultProps = {\n /**\n * if scrollBehavior is set to \"inside\", set tabIndex to 0 to allow the body to\n * receive focus, effectively enabling scrolling via keyboard\n * arrow keys.\n */\n tabIndex: scrollBehavior === \"inside\" ? 0 : undefined,\n };\n\n return (\n <DialogBodySlot ref={forwardedRef} {...defaultProps} {...restProps}>\n {children}\n </DialogBodySlot>\n );\n};\n\nDialogBody.displayName = \"Dialog.Body\";\n","import { DialogFooterSlot } from \"../dialog.slots\";\nimport type { DialogFooterProps } from \"../dialog.types\";\n\nexport const DialogFooter = (props: DialogFooterProps) => {\n const { ref: forwardedRef, children, ...restProps } = props;\n\n return (\n <DialogFooterSlot ref={forwardedRef} {...restProps}>\n {children}\n </DialogFooterSlot>\n );\n};\n\nDialogFooter.displayName = \"Dialog.Footer\";\n","import { defineMessages } from \"react-intl\";\n\nexport const messages = defineMessages({\n closeTrigger: {\n id: \"Nimbus.Dialog.closeTrigger\",\n description: \"aria-label for the default close trigger button\",\n defaultMessage: \"Close dialog\",\n },\n});\n","import { Close } from \"@commercetools/nimbus-icons\";\nimport { DialogCloseTriggerSlot } from \"../dialog.slots\";\nimport type { DialogCloseTriggerProps } from \"../dialog.types\";\nimport { IconButton } from \"@/components\";\nimport { messages } from \"../dialog.i18n\";\nimport { useIntl } from \"react-intl\";\n\nexport const DialogCloseTrigger = (props: DialogCloseTriggerProps) => {\n const { ref: forwardedRef, \"aria-label\": ariaLabel, ...restProps } = props;\n const intl = useIntl();\n\n return (\n <DialogCloseTriggerSlot>\n <IconButton\n ref={forwardedRef}\n slot=\"close\"\n size=\"xs\"\n variant=\"ghost\"\n aria-label={ariaLabel || intl.formatMessage(messages.closeTrigger)}\n {...restProps}\n >\n <Close />\n </IconButton>\n </DialogCloseTriggerSlot>\n );\n};\n\nDialogCloseTrigger.displayName = \"Dialog.CloseTrigger\";\n","import { DialogTitleSlot } from \"../dialog.slots\";\nimport type { DialogTitleProps } from \"../dialog.types\";\nimport { Heading } from \"@/components\";\n\nexport const DialogTitle = (props: DialogTitleProps) => {\n const { ref: forwardedRef, children, ...restProps } = props;\n\n return (\n <DialogTitleSlot asChild {...restProps}>\n <Heading ref={forwardedRef} slot=\"title\" as=\"h2\" textStyle=\"lg\">\n {children}\n </Heading>\n </DialogTitleSlot>\n );\n};\n\nDialogTitle.displayName = \"Dialog.Title\";\n"],"names":["withProvider","withContext","createSlotRecipeContext","DialogRootSlot","DialogTriggerSlot","DialogModalOverlaySlot","DialogModalSlot","DialogContentSlot","DialogHeaderSlot","DialogBodySlot","DialogFooterSlot","DialogTitleSlot","DialogCloseTriggerSlot","DialogContext","createContext","useDialogRootContext","context","useContext","DialogProvider","children","value","jsx","DialogRoot","props","recipe","useSlotRecipe","recipeProps","isOpen","onOpenChange","defaultOpen","content","hasDialogTrigger","React","child","displayName","RaDialogTrigger","DialogTrigger","forwardedRef","asChild","chakra","styleProps","restProps","extractStyleProps","RaButton","DialogContent","isDismissable","isKeyboardDismissDisabled","shouldCloseOnInteractOutside","modalProps","RaModalOverlay","RaModal","RaDialog","DialogHeader","DialogBody","scrollBehavior","DialogFooter","messages","defineMessages","DialogCloseTrigger","ariaLabel","intl","useIntl","IconButton","Close","DialogTitle","Heading"],"mappings":";;;;;;;;;;;;AAcA,MAAM,EAAE,cAAAA,GAAc,aAAAC,EAAA,IAAgB,gBAAAC,EAAwB;AAAA,EAC5D,KAAK;AACP,CAAC,GAGYC,IAAiB,gBAAAH;AAAA,EAC5B;AAAA,EACA;AACF,GAGaI,IAAoB,gBAAAH,EAG/B,UAAU,SAAS,GAGRI,IAAyB,gBAAAJ,EAGpC,OAAO,cAAc,GAIVK,IAAkB,gBAAAL,EAG7B,OAAO,OAAO,GAGHM,IAAoB,gBAAAN,EAG/B,OAAO,SAAS,GAGLO,IAAmB,gBAAAP;AAAA,EAC9B;AAAA,EACA;AACF,GAGaQ,IAAiB,gBAAAR;AAAA,EAC5B;AAAA,EACA;AACF,GAGaS,IAAmB,gBAAAT;AAAA,EAC9B;AAAA,EACA;AACF,GAGaU,IAAkB,gBAAAV,EAG7B,M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IAAc,CAACzC,MAA4B;AACtD,QAAM,EAAE,KAAKc,GAAc,UAAAlB,GAAU,GAAGsB,MAAclB;AAEtD,2BACGZ,GAAA,EAAgB,SAAO,IAAE,GAAG8B,GAC3B,UAAA,gBAAApB,EAAC4C,GAAA,EAAQ,KAAK5B,GAAc,MAAK,SAAQ,IAAG,MAAK,WAAU,MACxD,UAAAlB,GACH,GACF;AAEJ;AAEA6C,EAAY,cAAc;"}
|
|
1
|
+
{"version":3,"file":"dialog.title-CP_ZeiK4.es.js","sources":["../../src/components/dialog/dialog.slots.tsx","../../src/components/dialog/components/dialog.context.tsx","../../src/components/dialog/components/dialog.root.tsx","../../src/components/dialog/components/dialog.trigger.tsx","../../src/components/dialog/components/dialog.content.tsx","../../src/components/dialog/components/dialog.header.tsx","../../src/components/dialog/components/dialog.body.tsx","../../src/components/dialog/components/dialog.footer.tsx","../../src/components/dialog/dialog.i18n.ts","../../src/components/dialog/components/dialog.close-trigger.tsx","../../src/components/dialog/components/dialog.title.tsx"],"sourcesContent":["import { createSlotRecipeContext } from \"@chakra-ui/react\";\nimport type {\n DialogBodySlotProps,\n DialogCloseTriggerSlotProps,\n DialogContentSlotProps,\n DialogFooterSlotProps,\n DialogHeaderSlotProps,\n DialogModalOverlaySlotProps,\n DialogModalSlotProps,\n DialogRootProps,\n DialogTitleSlotProps,\n DialogTriggerSlotProps,\n} from \"./dialog.types\";\n\nconst { withProvider, withContext } = createSlotRecipeContext({\n key: \"dialog\",\n});\n\n// Root slot - provides recipe context + config to all child components\nexport const DialogRootSlot = withProvider<HTMLDivElement, DialogRootProps>(\n \"div\",\n \"root\"\n);\n\n// Trigger slot - button that opens the dialog\nexport const DialogTriggerSlot = withContext<\n HTMLButtonElement,\n DialogTriggerSlotProps\n>(\"button\", \"trigger\");\n\n// Backdrop slot - overlay displayed behind the dialog\nexport const DialogModalOverlaySlot = withContext<\n HTMLDivElement,\n DialogModalOverlaySlotProps\n>(\"div\", \"modalOverlay\");\n\n// modal slot - positions the dialog content\n\nexport const DialogModalSlot = withContext<\n HTMLDivElement,\n DialogModalSlotProps\n>(\"div\", \"modal\");\n\n// Content slot - main dialog container\nexport const DialogContentSlot = withContext<\n HTMLDivElement,\n DialogContentSlotProps\n>(\"div\", \"content\");\n\n// Header slot - dialog header section\nexport const DialogHeaderSlot = withContext<HTMLElement, DialogHeaderSlotProps>(\n \"header\",\n \"header\"\n);\n\n// Body slot - dialog body content\nexport const DialogBodySlot = withContext<HTMLDivElement, DialogBodySlotProps>(\n \"div\",\n \"body\"\n);\n\n// Footer slot - dialog footer section with actions\nexport const DialogFooterSlot = withContext<HTMLElement, DialogFooterSlotProps>(\n \"footer\",\n \"footer\"\n);\n\n// Title slot - accessible dialog title\nexport const DialogTitleSlot = withContext<\n HTMLHeadingElement,\n DialogTitleSlotProps\n>(\"h2\", \"title\");\n\n// Close trigger slot - div container for positioning close button\nexport const DialogCloseTriggerSlot = withContext<\n HTMLDivElement,\n DialogCloseTriggerSlotProps\n>(\"div\", \"closeTrigger\");\n","import { createContext, useContext } from \"react\";\nimport type { DialogRootProps } from \"../dialog.types\";\n\n/**\n * Context value containing dialog configuration passed from Root to child components\n */\nexport type DialogContextValue = DialogRootProps;\n\nexport const DialogContext = createContext<DialogContextValue | undefined>(\n undefined\n);\n\n/**\n * Hook to access dialog configuration from DialogContext\n * @returns Dialog configuration from context\n * @throws Error if used outside of Dialog.Root\n */\nexport const useDialogRootContext = (): DialogContextValue => {\n const context = useContext(DialogContext);\n if (!context) {\n throw new Error(\"useDialogContext must be used within Dialog.Root\");\n }\n return context;\n};\n\n/**\n * Provider component that passes dialog configuration down to child components\n */\nexport const DialogProvider = ({\n children,\n value,\n}: {\n children: React.ReactNode;\n value: DialogContextValue;\n}) => {\n return <DialogContext value={value}>{children}</DialogContext>;\n};\n","import React from \"react\";\nimport { DialogTrigger as RaDialogTrigger } from \"react-aria-components\";\nimport { useSlotRecipe } from \"@chakra-ui/react/styled-system\";\nimport { DialogRootSlot } from \"../dialog.slots\";\nimport type { DialogRootProps } from \"../dialog.types\";\nimport { DialogProvider } from \"./dialog.context\";\n\nexport const DialogRoot = (props: DialogRootProps) => {\n const recipe = useSlotRecipe({ key: \"dialog\" });\n // Extract recipe props\n const [recipeProps] = recipe.splitVariantProps(props);\n // Extract props that are usable on RaDialogTrigger\n const { children, isOpen, onOpenChange, defaultOpen = false } = props;\n\n const content = <DialogRootSlot {...recipeProps}>{children}</DialogRootSlot>;\n\n // Check if any direct child is a Dialog.Trigger component\n // React Aria's DialogTrigger needs a pressable child, so we only use it when there's a trigger\n const hasDialogTrigger = React.Children.toArray(children).some((child) => {\n if (React.isValidElement(child) && typeof child.type === \"function\") {\n const displayName = (\n child.type as React.ComponentType & { displayName?: string }\n )?.displayName;\n return (\n displayName === \"DialogTrigger\" || displayName === \"Dialog.Trigger\"\n );\n }\n return false;\n });\n\n // Share all props (config + variant props) with the Dialog subcomponents\n return (\n <DialogProvider value={props}>\n {hasDialogTrigger ? (\n // When there's a Dialog.Trigger, use DialogTrigger for React Aria integration\n <RaDialogTrigger\n isOpen={isOpen}\n onOpenChange={onOpenChange}\n defaultOpen={defaultOpen}\n >\n {content}\n </RaDialogTrigger>\n ) : (\n // When no Dialog.Trigger, skip using RaDialogTrigger to avoid console.warning's\n content\n )}\n </DialogProvider>\n );\n};\n\nDialogRoot.displayName = \"Dialog.Root\";\n","import { Button as RaButton } from \"react-aria-components\";\nimport { DialogTriggerSlot } from \"../dialog.slots\";\nimport type { DialogTriggerProps } from \"../dialog.types\";\nimport { extractStyleProps } from \"@/utils/extractStyleProps\";\nimport { chakra } from \"@chakra-ui/react/styled-system\";\n\nexport const DialogTrigger = ({\n ref: forwardedRef,\n children,\n asChild,\n ...props\n}: DialogTriggerProps) => {\n // If asChild is true, wrap children directly in RaButton with asChild\n if (asChild) {\n return (\n <chakra.button ref={forwardedRef} asChild {...props}>\n {children}\n </chakra.button>\n );\n }\n\n const [styleProps, restProps] = extractStyleProps(props);\n\n // Otherwise, wrap with both DialogTriggerSlot and RaButton\n // Only pass React Aria compatible props to avoid type conflicts\n return (\n <DialogTriggerSlot {...styleProps} asChild>\n <RaButton ref={forwardedRef} {...restProps}>\n {children}\n </RaButton>\n </DialogTriggerSlot>\n );\n};\n\nDialogTrigger.displayName = \"Dialog.Trigger\";\n","import {\n Modal as RaModal,\n ModalOverlay as RaModalOverlay,\n Dialog as RaDialog,\n} from \"react-aria-components\";\nimport {\n DialogModalOverlaySlot,\n DialogModalSlot,\n DialogContentSlot,\n} from \"../dialog.slots\";\nimport type { DialogContentProps } from \"../dialog.types\";\nimport { extractStyleProps } from \"@/utils/extractStyleProps\";\nimport { useDialogRootContext } from \"./dialog.context\";\n\nexport const DialogContent = (props: DialogContentProps) => {\n const { ref: forwardedRef, children, ...restProps } = props;\n\n // Get recipe configuration from context instead of props\n const {\n defaultOpen,\n isDismissable,\n isKeyboardDismissDisabled,\n shouldCloseOnInteractOutside,\n isOpen,\n onOpenChange,\n } = useDialogRootContext();\n\n const modalProps = {\n defaultOpen,\n isDismissable,\n isKeyboardDismissDisabled,\n shouldCloseOnInteractOutside,\n isOpen,\n onOpenChange,\n };\n\n const [styleProps] = extractStyleProps(restProps);\n\n return (\n <DialogModalOverlaySlot asChild>\n <RaModalOverlay {...modalProps}>\n <DialogModalSlot asChild>\n <RaModal>\n <DialogContentSlot asChild {...styleProps}>\n <RaDialog ref={forwardedRef}>{children}</RaDialog>\n </DialogContentSlot>\n </RaModal>\n </DialogModalSlot>\n </RaModalOverlay>\n </DialogModalOverlaySlot>\n );\n};\n\nDialogContent.displayName = \"Dialog.Content\";\n","import { DialogHeaderSlot } from \"../dialog.slots\";\nimport type { DialogHeaderProps } from \"../dialog.types\";\n\nexport const DialogHeader = (props: DialogHeaderProps) => {\n const { ref: forwardedRef, children, ...restProps } = props;\n\n return (\n <DialogHeaderSlot ref={forwardedRef} {...restProps}>\n {children}\n </DialogHeaderSlot>\n );\n};\n\nDialogHeader.displayName = \"Dialog.Header\";\n","import { DialogBodySlot } from \"../dialog.slots\";\nimport type { DialogBodyProps } from \"../dialog.types\";\nimport { useDialogRootContext } from \"./dialog.context\";\n\nexport const DialogBody = (props: DialogBodyProps) => {\n const { ref: forwardedRef, children, ...restProps } = props;\n const { scrollBehavior } = useDialogRootContext();\n\n const defaultProps = {\n /**\n * if scrollBehavior is set to \"inside\", set tabIndex to 0 to allow the body to\n * receive focus, effectively enabling scrolling via keyboard\n * arrow keys.\n */\n tabIndex: scrollBehavior === \"inside\" ? 0 : undefined,\n };\n\n return (\n <DialogBodySlot ref={forwardedRef} {...defaultProps} {...restProps}>\n {children}\n </DialogBodySlot>\n );\n};\n\nDialogBody.displayName = \"Dialog.Body\";\n","import { DialogFooterSlot } from \"../dialog.slots\";\nimport type { DialogFooterProps } from \"../dialog.types\";\n\nexport const DialogFooter = (props: DialogFooterProps) => {\n const { ref: forwardedRef, children, ...restProps } = props;\n\n return (\n <DialogFooterSlot ref={forwardedRef} {...restProps}>\n {children}\n </DialogFooterSlot>\n );\n};\n\nDialogFooter.displayName = \"Dialog.Footer\";\n","import { defineMessages } from \"react-intl\";\n\nexport const messages = defineMessages({\n closeTrigger: {\n id: \"Nimbus.Dialog.closeTrigger\",\n description: \"aria-label for the default close trigger button\",\n defaultMessage: \"Close dialog\",\n },\n});\n","import { Close } from \"@commercetools/nimbus-icons\";\nimport { DialogCloseTriggerSlot } from \"../dialog.slots\";\nimport type { DialogCloseTriggerProps } from \"../dialog.types\";\nimport { IconButton } from \"@/components\";\nimport { messages } from \"../dialog.i18n\";\nimport { useIntl } from \"react-intl\";\n\nexport const DialogCloseTrigger = (props: DialogCloseTriggerProps) => {\n const { ref: forwardedRef, \"aria-label\": ariaLabel, ...restProps } = props;\n const intl = useIntl();\n\n return (\n <DialogCloseTriggerSlot>\n <IconButton\n ref={forwardedRef}\n slot=\"close\"\n size=\"xs\"\n variant=\"ghost\"\n aria-label={ariaLabel || intl.formatMessage(messages.closeTrigger)}\n {...restProps}\n >\n <Close />\n </IconButton>\n </DialogCloseTriggerSlot>\n );\n};\n\nDialogCloseTrigger.displayName = \"Dialog.CloseTrigger\";\n","import { DialogTitleSlot } from \"../dialog.slots\";\nimport type { DialogTitleProps } from \"../dialog.types\";\nimport { Heading } from \"@/components\";\n\nexport const DialogTitle = (props: DialogTitleProps) => {\n const { ref: forwardedRef, children, ...restProps } = props;\n\n return (\n <DialogTitleSlot asChild {...restProps}>\n <Heading ref={forwardedRef} slot=\"title\" as=\"h2\" textStyle=\"lg\">\n {children}\n </Heading>\n </DialogTitleSlot>\n );\n};\n\nDialogTitle.displayName = \"Dialog.Title\";\n"],"names":["withProvider","withContext","createSlotRecipeContext","DialogRootSlot","DialogTriggerSlot","DialogModalOverlaySlot","DialogModalSlot","DialogContentSlot","DialogHeaderSlot","DialogBodySlot","DialogFooterSlot","DialogTitleSlot","DialogCloseTriggerSlot","DialogContext","createContext","useDialogRootContext","context","useContext","DialogProvider","children","value","jsx","DialogRoot","props","recipe","useSlotRecipe","recipeProps","isOpen","onOpenChange","defaultOpen","content","hasDialogTrigger","React","child","displayName","RaDialogTrigger","DialogTrigger","forwardedRef","asChild","chakra","styleProps","restProps","extractStyleProps","RaButton","DialogContent","isDismissable","isKeyboardDismissDisabled","shouldCloseOnInteractOutside","modalProps","RaModalOverlay","RaModal","RaDialog","DialogHeader","DialogBody","scrollBehavior","DialogFooter","messages","defineMessages","DialogCloseTrigger","ariaLabel","intl","useIntl","IconButton","Close","DialogTitle","Heading"],"mappings":";;;;;;;;;;;;AAcA,MAAM,EAAE,cAAAA,GAAc,aAAAC,EAAA,IAAgB,gBAAAC,EAAwB;AAAA,EAC5D,KAAK;AACP,CAAC,GAGYC,IAAiB,gBAAAH;AAAA,EAC5B;AAAA,EACA;AACF,GAGaI,IAAoB,gBAAAH,EAG/B,UAAU,SAAS,GAGRI,IAAyB,gBAAAJ,EAGpC,OAAO,cAAc,GAIVK,IAAkB,gBAAAL,EAG7B,OAAO,OAAO,GAGHM,IAAoB,gBAAAN,EAG/B,OA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MACL,SAAQ;AAAA,MACR,cAAYsB,KAAaC,EAAK,cAAcJ,EAAS,YAAY;AAAA,MAChE,GAAGf;AAAA,MAEJ,4BAACsB,GAAA,CAAA,CAAM;AAAA,IAAA;AAAA,EAAA,GAEX;AAEJ;AAEAL,EAAmB,cAAc;ACvB1B,MAAMM,IAAc,CAACzC,MAA4B;AACtD,QAAM,EAAE,KAAKc,GAAc,UAAAlB,GAAU,GAAGsB,MAAclB;AAEtD,2BACGZ,GAAA,EAAgB,SAAO,IAAE,GAAG8B,GAC3B,UAAA,gBAAApB,EAAC4C,GAAA,EAAQ,KAAK5B,GAAc,MAAK,SAAQ,IAAG,MAAK,WAAU,MACxD,UAAAlB,GACH,GACF;AAEJ;AAEA6C,EAAY,cAAc;"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx as w, jsxs as Ye, Fragment as it } from "react/jsx-runtime";
|
|
2
2
|
import A, { useState as X, useEffect as R, useRef as K, version as at, useCallback as J, useImperativeHandle as lt, useMemo as Se, forwardRef as Ze, useContext as W, createContext as dt, createElement as st } from "react";
|
|
3
3
|
import { defineMessages as ct, useIntl as Je } from "react-intl";
|
|
4
|
-
import { $ as pt } from "./Button-
|
|
4
|
+
import { $ as pt } from "./Button-Dx3xzN8n.es.js";
|
|
5
5
|
import { b as Dt, a as We, c as gt } from "./RSPContexts-DV4cFLUV.es.js";
|
|
6
|
-
import { f as mt, h as he, k as ft } from "./SelectionManager-
|
|
6
|
+
import { f as mt, h as he, k as ft } from "./SelectionManager-DMLLo5N3.es.js";
|
|
7
7
|
import { a as Ke, d as Qe, f as be, $ as _e } from "./utils-Cyja2WdR.es.js";
|
|
8
8
|
import { $ as me, b as Bt, a as bt, c as xt, d as sn } from "./DragAndDrop-BXEtfOEa.es.js";
|
|
9
|
-
import { a as ke } from "./ListBox-
|
|
9
|
+
import { a as ke } from "./ListBox-_1Uk-5-7.es.js";
|
|
10
10
|
import { a as Et, $ as Ct } from "./SelectionIndicator-DopimabS.es.js";
|
|
11
11
|
import { $ as $t } from "./Text-DOcU1ycg.es.js";
|
|
12
12
|
import { $ as yt, e as vt, f as ht, g as kt, h as mn } from "./CollectionBuilder-Wz-mnWjQ.es.js";
|
|
@@ -14,19 +14,19 @@ import { c as _, b as eu, $ as uu, a as Pe } from "./mergeProps-CzyOU2NE.es.js";
|
|
|
14
14
|
import { $ as tu } from "./filterDOMProps-BSVCO5jK.es.js";
|
|
15
15
|
import { $ as ru } from "./useObjectRef-CaJ5pgjX.es.js";
|
|
16
16
|
import { $ as En } from "./inertValue-B7loUihk.es.js";
|
|
17
|
-
import { b as At, a as Tt, $ as Ft } from "./useGridListItem
|
|
17
|
+
import { b as At, a as Tt, $ as Ft } from "./useGridListItem--iMluO7K.es.js";
|
|
18
18
|
import { $ as St } from "./useGridSelectionCheckbox-yspK-vJA.es.js";
|
|
19
19
|
import { $ as Kt } from "./useHover-9Xdm5U9d.es.js";
|
|
20
20
|
import { $ as nu } from "./useFocusRing-DRIG5NVg.es.js";
|
|
21
21
|
import { b as Pt } from "./FocusScope-BY2fddGq.es.js";
|
|
22
22
|
import { a as Ie } from "./VisuallyHidden-Dxf1qswV.es.js";
|
|
23
|
-
import { $ as It, a as zt } from "./useListState-
|
|
23
|
+
import { $ as It, a as zt } from "./useListState-Cf8n791-.es.js";
|
|
24
24
|
import { $ as wt } from "./useCollator-BHMZd1r6.es.js";
|
|
25
25
|
import { $ as ou } from "./context-R4YUlO9Y.es.js";
|
|
26
|
-
import { $ as Re } from "./ListKeyboardDelegate-
|
|
26
|
+
import { $ as Re } from "./ListKeyboardDelegate-ByRdSpOe.es.js";
|
|
27
27
|
import { f as Ot, b as Vt, e as iu, d as au, c as ne } from "./useFocusVisible-BIPjFmFE.es.js";
|
|
28
28
|
import { $ as oe } from "./LiveAnnouncer-CsPyaceH.es.js";
|
|
29
|
-
import { d as jt } from "./Dialog-
|
|
29
|
+
import { d as jt } from "./Dialog-Qpq4hk89.es.js";
|
|
30
30
|
import { $ as Lt } from "./getScrollParent-BS4bncfK.es.js";
|
|
31
31
|
import { b as ze, $ as Rt } from "./scrollIntoView-DTfS0nWq.es.js";
|
|
32
32
|
import { b as Mt, c as Nt, a as Ht, f as Ut } from "./platform-Z5fvtFmM.es.js";
|
|
@@ -37,9 +37,9 @@ import { useSlotRecipe as Xt } from "@chakra-ui/react/styled-system";
|
|
|
37
37
|
import { e as lu } from "./extractStyleProps-DYXEhLtq.es.js";
|
|
38
38
|
import { createSlotRecipeContext as Yt } from "@chakra-ui/react";
|
|
39
39
|
import { DragIndicator as Zt, Close as Jt } from "@commercetools/nimbus-icons";
|
|
40
|
-
import { C as Wt } from "./checkbox-
|
|
41
|
-
import { I as Me } from "./icon-button-
|
|
42
|
-
import { F as Y } from "./form-field-
|
|
40
|
+
import { C as Wt } from "./checkbox-BB-WJdal.es.js";
|
|
41
|
+
import { I as Me } from "./icon-button-DQS2apw-.es.js";
|
|
42
|
+
import { F as Y } from "./form-field-BYlpCXdY.es.js";
|
|
43
43
|
var I = /* @__PURE__ */ function(e) {
|
|
44
44
|
return e[e.none = 0] = "none", e[e.cancel = 0] = "cancel", e[e.move = 1] = "move", e[e.copy = 2] = "copy", e[e.link = 4] = "link", e[e.all = 7] = "all", e;
|
|
45
45
|
}({});
|
|
@@ -4208,4 +4208,4 @@ export {
|
|
|
4208
4208
|
ut as b,
|
|
4209
4209
|
en as c
|
|
4210
4210
|
};
|
|
4211
|
-
//# sourceMappingURL=draggable-list-
|
|
4211
|
+
//# sourceMappingURL=draggable-list-s43baxoM.es.js.map
|