@commercetools/nimbus 0.0.0-canary-20250930190235 → 0.0.0-canary-20251001071243
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/accordion.d.ts +3 -3
- package/dist/alert.d.ts +1 -1
- package/dist/calendar.d.ts +1 -1
- package/dist/chunks/{Button-BVaauB-c.es.js → Button-B6xR_FqM.es.js} +7 -7
- package/dist/chunks/{Button-BVaauB-c.es.js.map → Button-B6xR_FqM.es.js.map} +1 -1
- package/dist/chunks/{Button-BtJHe9xY.cjs.js → Button-BBCRIYjC.cjs.js} +2 -2
- package/dist/chunks/{Button-BtJHe9xY.cjs.js.map → Button-BBCRIYjC.cjs.js.map} +1 -1
- package/dist/chunks/{DateField-rweHHCKR.cjs.js → DateField-XplnfOh0.cjs.js} +2 -2
- package/dist/chunks/{DateField-rweHHCKR.cjs.js.map → DateField-XplnfOh0.cjs.js.map} +1 -1
- package/dist/chunks/{DateField-CoKm-f2B.es.js → DateField-ilC6DQcU.es.js} +29 -29
- package/dist/chunks/{DateField-CoKm-f2B.es.js.map → DateField-ilC6DQcU.es.js.map} +1 -1
- package/dist/chunks/{DatePicker-BYhiEF2C.cjs.js → DatePicker-Cy1-NRmz.cjs.js} +2 -2
- package/dist/chunks/{DatePicker-BYhiEF2C.cjs.js.map → DatePicker-Cy1-NRmz.cjs.js.map} +1 -1
- package/dist/chunks/{DatePicker-UdS55fqN.es.js → DatePicker-DOq_YUYb.es.js} +21 -21
- package/dist/chunks/{DatePicker-UdS55fqN.es.js.map → DatePicker-DOq_YUYb.es.js.map} +1 -1
- package/dist/chunks/{Dialog-C_Lr_ZUo.es.js → Dialog-BgV9Ur8E.es.js} +42 -37
- package/dist/chunks/{Dialog-C_Lr_ZUo.es.js.map → Dialog-BgV9Ur8E.es.js.map} +1 -1
- package/dist/chunks/{Dialog-32GmWneq.cjs.js → Dialog-BhqTE75I.cjs.js} +2 -2
- package/dist/chunks/{Dialog-32GmWneq.cjs.js.map → Dialog-BhqTE75I.cjs.js.map} +1 -1
- package/dist/chunks/{DragAndDrop-Bbd4HbfU.es.js → DragAndDrop-BnOybCz1.es.js} +12 -12
- package/dist/chunks/{DragAndDrop-Bbd4HbfU.es.js.map → DragAndDrop-BnOybCz1.es.js.map} +1 -1
- package/dist/chunks/{FocusScope-LBESYsSE.es.js → FocusScope-9EbM1-n6.es.js} +36 -36
- package/dist/chunks/{FocusScope-LBESYsSE.es.js.map → FocusScope-9EbM1-n6.es.js.map} +1 -1
- package/dist/chunks/{Group-DUCWhg7j.es.js → Group-DI0poa1g.es.js} +5 -5
- package/dist/chunks/{Group-DUCWhg7j.es.js.map → Group-DI0poa1g.es.js.map} +1 -1
- package/dist/chunks/{Header-C0mOQKWH.cjs.js → Header-BzYpow-F.cjs.js} +2 -2
- package/dist/chunks/{Header-C0mOQKWH.cjs.js.map → Header-BzYpow-F.cjs.js.map} +1 -1
- package/dist/chunks/{Header-CU7qXUk9.es.js → Header-LkbMVqUr.es.js} +8 -8
- package/dist/chunks/{Header-CU7qXUk9.es.js.map → Header-LkbMVqUr.es.js.map} +1 -1
- package/dist/chunks/{Heading-BaW6t55l.cjs.js → Heading-B83Y0yT_.cjs.js} +2 -2
- package/dist/chunks/{Heading-BaW6t55l.cjs.js.map → Heading-B83Y0yT_.cjs.js.map} +1 -1
- package/dist/chunks/{Heading-BX1t1Kmm.es.js → Heading-DK3LFGss.es.js} +76 -76
- package/dist/chunks/{Heading-BX1t1Kmm.es.js.map → Heading-DK3LFGss.es.js.map} +1 -1
- package/dist/chunks/{Input-FFG42ja6.es.js → Input-C_bvHj-u.es.js} +5 -5
- package/dist/chunks/{Input-FFG42ja6.es.js.map → Input-C_bvHj-u.es.js.map} +1 -1
- package/dist/chunks/{Label-BdaLJ5Ha.es.js → Label-DJtK5B3m.es.js} +2 -2
- package/dist/chunks/{Label-BdaLJ5Ha.es.js.map → Label-DJtK5B3m.es.js.map} +1 -1
- package/dist/chunks/{ListBox-DW2g6DgQ.cjs.js → ListBox-BBHyjoJ_.cjs.js} +2 -2
- package/dist/chunks/{ListBox-DW2g6DgQ.cjs.js.map → ListBox-BBHyjoJ_.cjs.js.map} +1 -1
- package/dist/chunks/{ListBox-CN09KH4h.es.js → ListBox-BLYSfKWM.es.js} +17 -17
- package/dist/chunks/{ListBox-CN09KH4h.es.js.map → ListBox-BLYSfKWM.es.js.map} +1 -1
- package/dist/chunks/{OverlayArrow-Kk4VWzmN.es.js → OverlayArrow-CTv6jme7.es.js} +3 -3
- package/dist/chunks/{OverlayArrow-Kk4VWzmN.es.js.map → OverlayArrow-CTv6jme7.es.js.map} +1 -1
- package/dist/chunks/{ProgressBar-CwFHab_J.es.js → ProgressBar-BTjAZZI-.es.js} +11 -11
- package/dist/chunks/{ProgressBar-CwFHab_J.es.js.map → ProgressBar-BTjAZZI-.es.js.map} +1 -1
- package/dist/chunks/{RSPContexts-B4yvXuBR.es.js → RSPContexts-sA4dJls7.es.js} +3 -3
- package/dist/chunks/{RSPContexts-B4yvXuBR.es.js.map → RSPContexts-sA4dJls7.es.js.map} +1 -1
- package/dist/chunks/{SSRProvider-v-LddFEs.es.js → SSRProvider-Cu8KibIK.es.js} +2 -2
- package/dist/chunks/{SSRProvider-v-LddFEs.es.js.map → SSRProvider-Cu8KibIK.es.js.map} +1 -1
- package/dist/chunks/{SelectionManager-3CeJgTGR.es.js → SelectionManager-DPe6sYkP.es.js} +27 -26
- package/dist/chunks/SelectionManager-DPe6sYkP.es.js.map +1 -0
- package/dist/chunks/SelectionManager-rtNqqyQQ.cjs.js +2 -0
- package/dist/chunks/SelectionManager-rtNqqyQQ.cjs.js.map +1 -0
- package/dist/chunks/Separator-CqqJM-tW.cjs.js +18 -0
- package/dist/chunks/Separator-CqqJM-tW.cjs.js.map +1 -0
- package/dist/chunks/{Separator-C_j2BhgD.es.js → Separator-DOY-4i96.es.js} +174 -174
- package/dist/chunks/Separator-DOY-4i96.es.js.map +1 -0
- package/dist/chunks/{TextArea-VPSW7sXC.es.js → TextArea-P6n8ajPu.es.js} +5 -5
- package/dist/chunks/{TextArea-VPSW7sXC.es.js.map → TextArea-P6n8ajPu.es.js.map} +1 -1
- package/dist/chunks/{ToggleButton-CPAdPTCr.cjs.js → ToggleButton-DVrc4vg7.cjs.js} +2 -2
- package/dist/chunks/{ToggleButton-CPAdPTCr.cjs.js.map → ToggleButton-DVrc4vg7.cjs.js.map} +1 -1
- package/dist/chunks/{ToggleButton-CRaJMq4q.es.js → ToggleButton-Xg4v21hw.es.js} +8 -8
- package/dist/chunks/{ToggleButton-CRaJMq4q.es.js.map → ToggleButton-Xg4v21hw.es.js.map} +1 -1
- package/dist/chunks/{VisuallyHidden-B0NiNh0E.es.js → VisuallyHidden-Do7AN5Hy.es.js} +3 -3
- package/dist/chunks/{VisuallyHidden-B0NiNh0E.es.js.map → VisuallyHidden-Do7AN5Hy.es.js.map} +1 -1
- package/dist/chunks/{accordion-DloMbCb7.cjs.js → accordion-4Vh8MRHG.cjs.js} +2 -2
- package/dist/chunks/{accordion-DloMbCb7.cjs.js.map → accordion-4Vh8MRHG.cjs.js.map} +1 -1
- package/dist/chunks/{accordion-BdPLxwi8.es.js → accordion-BSR4mSOu.es.js} +7 -7
- package/dist/chunks/{accordion-BdPLxwi8.es.js.map → accordion-BSR4mSOu.es.js.map} +1 -1
- package/dist/chunks/{alert-CiUQDrPl.es.js → alert-C0YsaZz2.es.js} +2 -2
- package/dist/chunks/{alert-CiUQDrPl.es.js.map → alert-C0YsaZz2.es.js.map} +1 -1
- package/dist/chunks/{alert-DpqyCZ2q.cjs.js → alert-cCy3Ka2E.cjs.js} +2 -2
- package/dist/chunks/{alert-DpqyCZ2q.cjs.js.map → alert-cCy3Ka2E.cjs.js.map} +1 -1
- package/dist/chunks/{badge-CHmfeeRs.es.js → badge-qLydLdTu.es.js} +2 -2
- package/dist/chunks/{badge-CHmfeeRs.es.js.map → badge-qLydLdTu.es.js.map} +1 -1
- package/dist/chunks/{button-DxNEOjS_.cjs.js → button-BAH2aLJh.cjs.js} +2 -2
- package/dist/chunks/{button-DxNEOjS_.cjs.js.map → button-BAH2aLJh.cjs.js.map} +1 -1
- package/dist/chunks/{button-CzLJhEV7.es.js → button-DSws4IjQ.es.js} +7 -7
- package/dist/chunks/{button-CzLJhEV7.es.js.map → button-DSws4IjQ.es.js.map} +1 -1
- package/dist/chunks/{calendar-CxWpOUYN.cjs.js → calendar-CNjZUyhZ.cjs.js} +2 -2
- package/dist/chunks/{calendar-CxWpOUYN.cjs.js.map → calendar-CNjZUyhZ.cjs.js.map} +1 -1
- package/dist/chunks/{range-calendar-BQsO9nZw.es.js → calendar-QYUcSSuy.es.js} +34 -34
- package/dist/chunks/{calendar-B_H9_kwD.es.js.map → calendar-QYUcSSuy.es.js.map} +1 -1
- package/dist/chunks/{card-D9fWUQqs.es.js → card-B-NYoYot.es.js} +3 -3
- package/dist/chunks/{card-D9fWUQqs.es.js.map → card-B-NYoYot.es.js.map} +1 -1
- package/dist/chunks/{checkbox-hKLS_Hpf.es.js → checkbox-BYw5k4jR.es.js} +11 -11
- package/dist/chunks/{checkbox-hKLS_Hpf.es.js.map → checkbox-BYw5k4jR.es.js.map} +1 -1
- package/dist/chunks/{checkbox-B5AI2jZt.cjs.js → checkbox-BjhklyOp.cjs.js} +2 -2
- package/dist/chunks/{checkbox-B5AI2jZt.cjs.js.map → checkbox-BjhklyOp.cjs.js.map} +1 -1
- package/dist/chunks/{collapsible-motion-D8dG2JLf.es.js → collapsible-motion-BASfX7dq.es.js} +5 -5
- package/dist/chunks/{collapsible-motion-D8dG2JLf.es.js.map → collapsible-motion-BASfX7dq.es.js.map} +1 -1
- package/dist/chunks/{collapsible-motion-BQ6C7uqG.cjs.js → collapsible-motion-CKitPEjA.cjs.js} +2 -2
- package/dist/chunks/{collapsible-motion-BQ6C7uqG.cjs.js.map → collapsible-motion-CKitPEjA.cjs.js.map} +1 -1
- package/dist/chunks/combobox-D0zYU4ZZ.cjs.js +2 -0
- package/dist/chunks/{combobox-CnveMVKQ.cjs.js.map → combobox-D0zYU4ZZ.cjs.js.map} +1 -1
- package/dist/chunks/{combobox-wkLS3Qcd.es.js → combobox-DmQUeFFT.es.js} +65 -65
- package/dist/chunks/{combobox-wkLS3Qcd.es.js.map → combobox-DmQUeFFT.es.js.map} +1 -1
- package/dist/chunks/{context-DHW7D0wv.es.js → context-R4YUlO9Y.es.js} +2 -2
- package/dist/chunks/{context-DHW7D0wv.es.js.map → context-R4YUlO9Y.es.js.map} +1 -1
- package/dist/chunks/{data-table-Bp2P2wVh.es.js → data-table-BKJDvxYT.es.js} +39 -39
- package/dist/chunks/{data-table-Bp2P2wVh.es.js.map → data-table-BKJDvxYT.es.js.map} +1 -1
- package/dist/chunks/{data-table-0qRALK0I.cjs.js → data-table-Cipv3jS9.cjs.js} +2 -2
- package/dist/chunks/{data-table-0qRALK0I.cjs.js.map → data-table-Cipv3jS9.cjs.js.map} +1 -1
- package/dist/chunks/{date-input-KbMioTti.es.js → date-input-BS7NT0zS.es.js} +4 -4
- package/dist/chunks/{date-input-KbMioTti.es.js.map → date-input-BS7NT0zS.es.js.map} +1 -1
- package/dist/chunks/{date-input-8mtWarDE.cjs.js → date-input-x1wfQ64a.cjs.js} +2 -2
- package/dist/chunks/{date-input-8mtWarDE.cjs.js.map → date-input-x1wfQ64a.cjs.js.map} +1 -1
- package/dist/chunks/{date-picker-rBQTH5hR.es.js → date-picker-BIvJI-6_.es.js} +32 -32
- package/dist/chunks/{date-picker-rBQTH5hR.es.js.map → date-picker-BIvJI-6_.es.js.map} +1 -1
- package/dist/chunks/{date-picker-BYhvkKI0.cjs.js → date-picker-BKudarck.cjs.js} +2 -2
- package/dist/chunks/{date-picker-BYhvkKI0.cjs.js.map → date-picker-BKudarck.cjs.js.map} +1 -1
- package/dist/chunks/{date-range-picker-6rafHs9g.cjs.js → date-range-picker-4mZ19UM7.cjs.js} +2 -2
- package/dist/chunks/{date-range-picker-6rafHs9g.cjs.js.map → date-range-picker-4mZ19UM7.cjs.js.map} +1 -1
- package/dist/chunks/{date-range-picker-BEk9kT2e.es.js → date-range-picker-DelR30zw.es.js} +28 -28
- package/dist/chunks/{date-range-picker-BEk9kT2e.es.js.map → date-range-picker-DelR30zw.es.js.map} +1 -1
- package/dist/chunks/dialog-B-NKwVSi.es.js +165 -0
- package/dist/chunks/dialog-B-NKwVSi.es.js.map +1 -0
- package/dist/chunks/dialog-D0RnaoTx.cjs.js +2 -0
- package/dist/chunks/dialog-D0RnaoTx.cjs.js.map +1 -0
- package/dist/chunks/dialog.title-Co1QDiYA.cjs.js +2 -0
- package/dist/chunks/dialog.title-Co1QDiYA.cjs.js.map +1 -0
- package/dist/chunks/dialog.title-DyRR_xdZ.es.js +322 -0
- package/dist/chunks/dialog.title-DyRR_xdZ.es.js.map +1 -0
- package/dist/chunks/{extractStyleProps-B-gDi9Qk.cjs.js → extractStyleProps-BIJocpXL.cjs.js} +2 -2
- package/dist/chunks/{extractStyleProps-B-gDi9Qk.cjs.js.map → extractStyleProps-BIJocpXL.cjs.js.map} +1 -1
- package/dist/chunks/{extractStyleProps-D6kxUL-O.es.js → extractStyleProps-i_um9deg.es.js} +2 -2
- package/dist/chunks/{extractStyleProps-D6kxUL-O.es.js.map → extractStyleProps-i_um9deg.es.js.map} +1 -1
- package/dist/chunks/{focusSafely-DS3RePi9.es.js → focusSafely-Bi_1H1qm.es.js} +3 -3
- package/dist/chunks/{focusSafely-DS3RePi9.es.js.map → focusSafely-Bi_1H1qm.es.js.map} +1 -1
- package/dist/chunks/{form-field-ZCIvXD-t.es.js → form-field-ClSAs-Vz.es.js} +11 -11
- package/dist/chunks/{form-field-ZCIvXD-t.es.js.map → form-field-ClSAs-Vz.es.js.map} +1 -1
- package/dist/chunks/{form-field-Cy7eAZCz.cjs.js → form-field-DVpuX6t5.cjs.js} +3 -3
- package/dist/chunks/{form-field-Cy7eAZCz.cjs.js.map → form-field-DVpuX6t5.cjs.js.map} +1 -1
- package/dist/chunks/{group-FqYM3Go1.es.js → group-DRLYSxIt.es.js} +2 -2
- package/dist/chunks/{group-FqYM3Go1.es.js.map → group-DRLYSxIt.es.js.map} +1 -1
- package/dist/chunks/heading-C3E6ZfYZ.es.js +25 -0
- package/dist/chunks/heading-C3E6ZfYZ.es.js.map +1 -0
- package/dist/chunks/heading-DmM-w8Sb.cjs.js +2 -0
- package/dist/chunks/heading-DmM-w8Sb.cjs.js.map +1 -0
- package/dist/chunks/icon-button-CBhvV2Ok.cjs.js +2 -0
- package/dist/chunks/{icon-button-DWBhjWpa.cjs.js.map → icon-button-CBhvV2Ok.cjs.js.map} +1 -1
- package/dist/chunks/icon-button-_9swBHc3.es.js +14 -0
- package/dist/chunks/{icon-button-CwG0NBaY.es.js.map → icon-button-_9swBHc3.es.js.map} +1 -1
- package/dist/chunks/{icon-toggle-button-Ya3xXEj8.es.js → icon-toggle-button-S56p30pP.es.js} +2 -2
- package/dist/chunks/{icon-toggle-button-Ya3xXEj8.es.js.map → icon-toggle-button-S56p30pP.es.js.map} +1 -1
- package/dist/chunks/{icon-toggle-button-BpLuJRaJ.cjs.js → icon-toggle-button-wPsxrI7v.cjs.js} +2 -2
- package/dist/chunks/{icon-toggle-button-BpLuJRaJ.cjs.js.map → icon-toggle-button-wPsxrI7v.cjs.js.map} +1 -1
- package/dist/chunks/{index-C7AV1c1_.es.js → index-DRb2wMPi.es.js} +290 -371
- package/dist/chunks/index-DRb2wMPi.es.js.map +1 -0
- package/dist/chunks/index-L5KSWClG.cjs.js +4 -0
- package/dist/chunks/index-L5KSWClG.cjs.js.map +1 -0
- package/dist/chunks/{kbd-D10CDyIE.es.js → kbd-DwetANiO.es.js} +2 -2
- package/dist/chunks/{kbd-D10CDyIE.es.js.map → kbd-DwetANiO.es.js.map} +1 -1
- package/dist/chunks/{link-CwFZrz1A.es.js → link--ktzvjSJ.es.js} +9 -9
- package/dist/chunks/{link-CwFZrz1A.es.js.map → link--ktzvjSJ.es.js.map} +1 -1
- package/dist/chunks/{link-DWa1zIUJ.cjs.js → link-CUKAEwrI.cjs.js} +2 -2
- package/dist/chunks/{link-DWa1zIUJ.cjs.js.map → link-CUKAEwrI.cjs.js.map} +1 -1
- package/dist/chunks/{loading-spinner-D3xWum_0.es.js → loading-spinner-CcVJ_X-1.es.js} +3 -3
- package/dist/chunks/{loading-spinner-D3xWum_0.es.js.map → loading-spinner-CcVJ_X-1.es.js.map} +1 -1
- package/dist/chunks/{make-element-focusable-DRTJNWHH.es.js → make-element-focusable-D5ajCMdm.es.js} +6 -6
- package/dist/chunks/{make-element-focusable-DRTJNWHH.es.js.map → make-element-focusable-D5ajCMdm.es.js.map} +1 -1
- package/dist/chunks/{menu-DbyMTgKs.cjs.js → menu-BfwjSmIS.cjs.js} +2 -2
- package/dist/chunks/{menu-DbyMTgKs.cjs.js.map → menu-BfwjSmIS.cjs.js.map} +1 -1
- package/dist/chunks/{menu-Bo_DdYZH.es.js → menu-CVO7gYdK.es.js} +7 -7
- package/dist/chunks/{menu-Bo_DdYZH.es.js.map → menu-CVO7gYdK.es.js.map} +1 -1
- package/dist/chunks/{mergeProps-uJMZqSEt.es.js → mergeProps-CzyOU2NE.es.js} +7 -7
- package/dist/chunks/{mergeProps-uJMZqSEt.es.js.map → mergeProps-CzyOU2NE.es.js.map} +1 -1
- package/dist/chunks/{money-input-Bp0LI7WP.es.js → money-input-C1jSkjXo.es.js} +23 -23
- package/dist/chunks/{money-input-Bp0LI7WP.es.js.map → money-input-C1jSkjXo.es.js.map} +1 -1
- package/dist/chunks/{money-input-CZ72JQGm.cjs.js → money-input-DJMTLGRy.cjs.js} +2 -2
- package/dist/chunks/{money-input-CZ72JQGm.cjs.js.map → money-input-DJMTLGRy.cjs.js.map} +1 -1
- package/dist/chunks/{multiline-text-input-N6E5HpPN.cjs.js → multiline-text-input-Dz0ikaM-.cjs.js} +2 -2
- package/dist/chunks/{multiline-text-input-N6E5HpPN.cjs.js.map → multiline-text-input-Dz0ikaM-.cjs.js.map} +1 -1
- package/dist/chunks/{multiline-text-input-uXOEV56a.es.js → multiline-text-input-_G6GcQrg.es.js} +4 -4
- package/dist/chunks/{multiline-text-input-uXOEV56a.es.js.map → multiline-text-input-_G6GcQrg.es.js.map} +1 -1
- package/dist/chunks/{nimbus-provider-DBBdCIeV.es.js → nimbus-provider-BDP4hXF7.es.js} +7 -7
- package/dist/chunks/{nimbus-provider-DBBdCIeV.es.js.map → nimbus-provider-BDP4hXF7.es.js.map} +1 -1
- package/dist/chunks/{nimbus-provider-CoNjJjM9.cjs.js → nimbus-provider-CyRDR7rD.cjs.js} +2 -2
- package/dist/chunks/{nimbus-provider-CoNjJjM9.cjs.js.map → nimbus-provider-CyRDR7rD.cjs.js.map} +1 -1
- package/dist/chunks/{number-input-GalEa1xO.es.js → number-input-CI0DSniW.es.js} +118 -118
- package/dist/chunks/{number-input-GalEa1xO.es.js.map → number-input-CI0DSniW.es.js.map} +1 -1
- package/dist/chunks/{number-input-BlWDe877.cjs.js → number-input-DnBbey5l.cjs.js} +2 -2
- package/dist/chunks/{number-input-BlWDe877.cjs.js.map → number-input-DnBbey5l.cjs.js.map} +1 -1
- package/dist/chunks/{openLink-Ctl0AdAy.es.js → openLink-BMfblNBC.es.js} +5 -5
- package/dist/chunks/{openLink-Ctl0AdAy.es.js.map → openLink-BMfblNBC.es.js.map} +1 -1
- package/dist/chunks/{pagination-wNk5gMNe.es.js → pagination-Bi6keZ3a.es.js} +14 -14
- package/dist/chunks/{pagination-wNk5gMNe.es.js.map → pagination-Bi6keZ3a.es.js.map} +1 -1
- package/dist/chunks/{pagination-g1eYG6Lt.cjs.js → pagination-DdGULNPt.cjs.js} +2 -2
- package/dist/chunks/{pagination-g1eYG6Lt.cjs.js.map → pagination-DdGULNPt.cjs.js.map} +1 -1
- package/dist/chunks/{password-input-XPlnNgUY.es.js → password-input-BC8qYtsr.es.js} +12 -12
- package/dist/chunks/{password-input-XPlnNgUY.es.js.map → password-input-BC8qYtsr.es.js.map} +1 -1
- package/dist/chunks/{password-input-CahrOPlY.cjs.js → password-input-Lh2HHpnL.cjs.js} +2 -2
- package/dist/chunks/{password-input-CahrOPlY.cjs.js.map → password-input-Lh2HHpnL.cjs.js.map} +1 -1
- package/dist/chunks/{progress-bar-CpKSaB_5.es.js → progress-bar-7H8xrBrA.es.js} +10 -10
- package/dist/chunks/{progress-bar-CpKSaB_5.es.js.map → progress-bar-7H8xrBrA.es.js.map} +1 -1
- package/dist/chunks/{progress-bar-DHA74qr-.cjs.js → progress-bar-Cw9FWHlW.cjs.js} +2 -2
- package/dist/chunks/{progress-bar-DHA74qr-.cjs.js.map → progress-bar-Cw9FWHlW.cjs.js.map} +1 -1
- package/dist/chunks/{radio-input-B0M7JizK.es.js → radio-input-BR53WuBU.es.js} +41 -41
- package/dist/chunks/{radio-input-B0M7JizK.es.js.map → radio-input-BR53WuBU.es.js.map} +1 -1
- package/dist/chunks/{radio-input-DnRVGbA1.cjs.js → radio-input-CsIiU86R.cjs.js} +2 -2
- package/dist/chunks/{radio-input-DnRVGbA1.cjs.js.map → radio-input-CsIiU86R.cjs.js.map} +1 -1
- package/dist/chunks/{range-calendar-ou9EuY-p.cjs.js → range-calendar-BH-2JsiF.cjs.js} +2 -2
- package/dist/chunks/{range-calendar-ou9EuY-p.cjs.js.map → range-calendar-BH-2JsiF.cjs.js.map} +1 -1
- package/dist/chunks/{calendar-B_H9_kwD.es.js → range-calendar-DFb9bsJ4.es.js} +31 -31
- package/dist/chunks/{range-calendar-BQsO9nZw.es.js.map → range-calendar-DFb9bsJ4.es.js.map} +1 -1
- package/dist/chunks/{rich-text-input-frvGdwoR.cjs.js → rich-text-input-BZ-Msa-L.cjs.js} +2 -2
- package/dist/chunks/{rich-text-input-frvGdwoR.cjs.js.map → rich-text-input-BZ-Msa-L.cjs.js.map} +1 -1
- package/dist/chunks/{rich-text-input-ADGWauFn.es.js → rich-text-input-BmdxXmR4.es.js} +25 -25
- package/dist/chunks/{rich-text-input-ADGWauFn.es.js.map → rich-text-input-BmdxXmR4.es.js.map} +1 -1
- package/dist/chunks/{scrollIntoView-DW7gkKpB.es.js → scrollIntoView-CAVHG58T.es.js} +2 -2
- package/dist/chunks/{scrollIntoView-DW7gkKpB.es.js.map → scrollIntoView-CAVHG58T.es.js.map} +1 -1
- package/dist/chunks/{select-CU6bPTz6.es.js → select-CTbgnj8L.es.js} +28 -28
- package/dist/chunks/{select-CU6bPTz6.es.js.map → select-CTbgnj8L.es.js.map} +1 -1
- package/dist/chunks/{select-BCsl2nEh.cjs.js → select-kYdilBPV.cjs.js} +2 -2
- package/dist/chunks/{select-BCsl2nEh.cjs.js.map → select-kYdilBPV.cjs.js.map} +1 -1
- package/dist/chunks/{separator-hUd3X_aL.cjs.js → separator-BPbw-2l_.cjs.js} +2 -2
- package/dist/chunks/{separator-hUd3X_aL.cjs.js.map → separator-BPbw-2l_.cjs.js.map} +1 -1
- package/dist/chunks/{separator-Demj-lbE.es.js → separator-kuEDe6AG.es.js} +3 -3
- package/dist/chunks/{separator-Demj-lbE.es.js.map → separator-kuEDe6AG.es.js.map} +1 -1
- package/dist/chunks/{split-button-DKBX--jQ.cjs.js → split-button-OxOyRI3k.cjs.js} +2 -2
- package/dist/chunks/{split-button-DKBX--jQ.cjs.js.map → split-button-OxOyRI3k.cjs.js.map} +1 -1
- package/dist/chunks/{split-button-8Dt6KkSc.es.js → split-button-VbEC4QmQ.es.js} +5 -5
- package/dist/chunks/{split-button-8Dt6KkSc.es.js.map → split-button-VbEC4QmQ.es.js.map} +1 -1
- package/dist/chunks/{switch-BID-KiLr.cjs.js → switch-BtgfHCUU.cjs.js} +2 -2
- package/dist/chunks/{switch-BID-KiLr.cjs.js.map → switch-BtgfHCUU.cjs.js.map} +1 -1
- package/dist/chunks/{switch-D28v2iAJ.es.js → switch-Cqlh-hxo.es.js} +14 -14
- package/dist/chunks/{switch-D28v2iAJ.es.js.map → switch-Cqlh-hxo.es.js.map} +1 -1
- package/dist/chunks/{tag-group-CXwXfpL3.cjs.js → tag-group-BiHCKIBb.cjs.js} +2 -2
- package/dist/chunks/{tag-group-CXwXfpL3.cjs.js.map → tag-group-BiHCKIBb.cjs.js.map} +1 -1
- package/dist/chunks/{tag-group-RzZiEVi1.es.js → tag-group-Dd6RDJ85.es.js} +23 -23
- package/dist/chunks/{tag-group-RzZiEVi1.es.js.map → tag-group-Dd6RDJ85.es.js.map} +1 -1
- package/dist/chunks/{text-Bi4Gre95.es.js → text-05SUCJIk.es.js} +2 -2
- package/dist/chunks/{text-Bi4Gre95.es.js.map → text-05SUCJIk.es.js.map} +1 -1
- package/dist/chunks/{text-input-CiZheGLu.es.js → text-input-Ch6OZEU5.es.js} +5 -5
- package/dist/chunks/{text-input-CiZheGLu.es.js.map → text-input-Ch6OZEU5.es.js.map} +1 -1
- package/dist/chunks/{text-input-xJIpxbYd.cjs.js → text-input-NqDP9nsj.cjs.js} +2 -2
- package/dist/chunks/{text-input-xJIpxbYd.cjs.js.map → text-input-NqDP9nsj.cjs.js.map} +1 -1
- package/dist/chunks/{time-input-CGwOrAf4.es.js → time-input-BPMoY1TY.es.js} +3 -3
- package/dist/chunks/{time-input-CGwOrAf4.es.js.map → time-input-BPMoY1TY.es.js.map} +1 -1
- package/dist/chunks/{time-input-Dqbx5jq_.cjs.js → time-input-CAUpjIAO.cjs.js} +2 -2
- package/dist/chunks/{time-input-Dqbx5jq_.cjs.js.map → time-input-CAUpjIAO.cjs.js.map} +1 -1
- package/dist/chunks/{toggle-button-Cv291lWy.cjs.js → toggle-button-BcqqrZ6N.cjs.js} +2 -2
- package/dist/chunks/{toggle-button-Cv291lWy.cjs.js.map → toggle-button-BcqqrZ6N.cjs.js.map} +1 -1
- package/dist/chunks/{toggle-button-Cj4XMEzn.es.js → toggle-button-Q0HDyGR5.es.js} +4 -4
- package/dist/chunks/{toggle-button-Cj4XMEzn.es.js.map → toggle-button-Q0HDyGR5.es.js.map} +1 -1
- package/dist/chunks/{toggle-button-group-DX134q7m.cjs.js → toggle-button-group-BR8PFfEf.cjs.js} +2 -2
- package/dist/chunks/{toggle-button-group-DX134q7m.cjs.js.map → toggle-button-group-BR8PFfEf.cjs.js.map} +1 -1
- package/dist/chunks/{toggle-button-group-DXmJCAH5.es.js → toggle-button-group-CYpa7G3-.es.js} +2 -2
- package/dist/chunks/{toggle-button-group-DXmJCAH5.es.js.map → toggle-button-group-CYpa7G3-.es.js.map} +1 -1
- package/dist/chunks/{toolbar-CoeY5d0M.cjs.js → toolbar-CK8vOB4V.cjs.js} +2 -2
- package/dist/chunks/{toolbar-CoeY5d0M.cjs.js.map → toolbar-CK8vOB4V.cjs.js.map} +1 -1
- package/dist/chunks/{toolbar-5TZLzPq3.es.js → toolbar-CpMMNKHw.es.js} +6 -6
- package/dist/chunks/{toolbar-5TZLzPq3.es.js.map → toolbar-CpMMNKHw.es.js.map} +1 -1
- package/dist/chunks/{tooltip-BE3LzL7I.es.js → tooltip-B8OD-6ed.es.js} +8 -8
- package/dist/chunks/{tooltip-BE3LzL7I.es.js.map → tooltip-B8OD-6ed.es.js.map} +1 -1
- package/dist/chunks/{useButton-CYfXo2Jm.es.js → useButton-exR3VPRk.es.js} +4 -4
- package/dist/chunks/{useButton-CYfXo2Jm.es.js.map → useButton-exR3VPRk.es.js.map} +1 -1
- package/dist/chunks/{useButton-BgBfaV_L.cjs.js → useButton-uDev7ez9.cjs.js} +2 -2
- package/dist/chunks/{useButton-BgBfaV_L.cjs.js.map → useButton-uDev7ez9.cjs.js.map} +1 -1
- package/dist/chunks/{useCollator-Y-oU82PA.es.js → useCollator-BHMZd1r6.es.js} +2 -2
- package/dist/chunks/{useCollator-Y-oU82PA.es.js.map → useCollator-BHMZd1r6.es.js.map} +1 -1
- package/dist/chunks/{useDateFormatter-BuXtxdR1.es.js → useDateFormatter-CUeAfTit.es.js} +5 -5
- package/dist/chunks/{useDateFormatter-BuXtxdR1.es.js.map → useDateFormatter-CUeAfTit.es.js.map} +1 -1
- package/dist/chunks/{useDateFormatter-CS19Cch2.cjs.js → useDateFormatter-DawPGCXt.cjs.js} +2 -2
- package/dist/chunks/{useDateFormatter-CS19Cch2.cjs.js.map → useDateFormatter-DawPGCXt.cjs.js.map} +1 -1
- package/dist/chunks/{useDisclosureState-BlZT0hmS.es.js → useDisclosureState-Tf9crdBs.es.js} +4 -4
- package/dist/chunks/{useDisclosureState-BlZT0hmS.es.js.map → useDisclosureState-Tf9crdBs.es.js.map} +1 -1
- package/dist/chunks/{useEvent-Bxxy8Y3o.es.js → useEvent-Bh_fbauk.es.js} +7 -7
- package/dist/chunks/{useEvent-Bxxy8Y3o.es.js.map → useEvent-Bh_fbauk.es.js.map} +1 -1
- package/dist/chunks/{useField-Do87rtEk.es.js → useField-BHGdzEiI.es.js} +8 -8
- package/dist/chunks/{useField-Do87rtEk.es.js.map → useField-BHGdzEiI.es.js.map} +1 -1
- package/dist/chunks/{useFilter-ClBjQ7pb.es.js → useFilter-DOfNzeZ9.es.js} +2 -2
- package/dist/chunks/{useFilter-ClBjQ7pb.es.js.map → useFilter-DOfNzeZ9.es.js.map} +1 -1
- package/dist/chunks/{useFocus-BmMqaBAE.es.js → useFocus-C9lb2m-i.es.js} +6 -6
- package/dist/chunks/{useFocus-BmMqaBAE.es.js.map → useFocus-C9lb2m-i.es.js.map} +1 -1
- package/dist/chunks/{useFocusRing-SQNQ9yn0.es.js → useFocusRing-h0FI3Bnv.es.js} +4 -4
- package/dist/chunks/{useFocusRing-SQNQ9yn0.es.js.map → useFocusRing-h0FI3Bnv.es.js.map} +1 -1
- package/dist/chunks/{useFocusVisible-BrqHqmb9.es.js → useFocusVisible-BQJ0cc5O.es.js} +6 -6
- package/dist/chunks/{useFocusVisible-BrqHqmb9.es.js.map → useFocusVisible-BQJ0cc5O.es.js.map} +1 -1
- package/dist/chunks/{useFocusWithin-Db5nhiOm.es.js → useFocusWithin-CelvVfPc.es.js} +6 -6
- package/dist/chunks/{useFocusWithin-Db5nhiOm.es.js.map → useFocusWithin-CelvVfPc.es.js.map} +1 -1
- package/dist/chunks/{useFocusable-BqRFi3ok.es.js → useFocusable-2UlJ2jic.es.js} +10 -10
- package/dist/chunks/{useFocusable-BqRFi3ok.es.js.map → useFocusable-2UlJ2jic.es.js.map} +1 -1
- package/dist/chunks/{useFormReset-S3fDvX8g.es.js → useFormReset-D_wskGk5.es.js} +2 -2
- package/dist/chunks/{useFormReset-S3fDvX8g.es.js.map → useFormReset-D_wskGk5.es.js.map} +1 -1
- package/dist/chunks/{useFormValidation-CzvY15hR.es.js → useFormValidation-UuUTYmIX.es.js} +3 -3
- package/dist/chunks/{useFormValidation-CzvY15hR.es.js.map → useFormValidation-UuUTYmIX.es.js.map} +1 -1
- package/dist/chunks/{useHighlightSelectionDescription-VzA5DMaE.es.js → useHighlightSelectionDescription-pmA2R2J7.es.js} +6 -6
- package/dist/chunks/{useHighlightSelectionDescription-VzA5DMaE.es.js.map → useHighlightSelectionDescription-pmA2R2J7.es.js.map} +1 -1
- package/dist/chunks/{useHover-B6UI1gbJ.es.js → useHover-Cb0lPkvP.es.js} +2 -2
- package/dist/chunks/{useHover-B6UI1gbJ.es.js.map → useHover-Cb0lPkvP.es.js.map} +1 -1
- package/dist/chunks/{useLabel-BZKxdTDn.es.js → useLabel-CzA-UqrL.es.js} +2 -2
- package/dist/chunks/{useLabel-BZKxdTDn.es.js.map → useLabel-CzA-UqrL.es.js.map} +1 -1
- package/dist/chunks/{useLocalizedStringFormatter-BpL9LNnx.es.js → useLocalizedStringFormatter-BRnRyxJp.es.js} +2 -2
- package/dist/chunks/{useLocalizedStringFormatter-BpL9LNnx.es.js.map → useLocalizedStringFormatter-BRnRyxJp.es.js.map} +1 -1
- package/dist/chunks/{usePress-C8-hLXJw.cjs.js → usePress-BrVCtBty.cjs.js} +3 -3
- package/dist/chunks/{usePress-C8-hLXJw.cjs.js.map → usePress-BrVCtBty.cjs.js.map} +1 -1
- package/dist/chunks/{usePress-BuSQ4Y3L.es.js → usePress-DWxMRKB2.es.js} +20 -20
- package/dist/chunks/{usePress-BuSQ4Y3L.es.js.map → usePress-DWxMRKB2.es.js.map} +1 -1
- package/dist/chunks/{useProgressBar-g3lb_jPQ.es.js → useProgressBar-C9zDMfHv.es.js} +8 -8
- package/dist/chunks/{useProgressBar-g3lb_jPQ.es.js.map → useProgressBar-C9zDMfHv.es.js.map} +1 -1
- package/dist/chunks/{useSingleSelectListState-ZzM7H50N.es.js → useSingleSelectListState-BCxpO0gf.es.js} +2 -2
- package/dist/chunks/{useSingleSelectListState-ZzM7H50N.es.js.map → useSingleSelectListState-BCxpO0gf.es.js.map} +1 -1
- package/dist/chunks/{useSingleSelectListState-BjYKH0pH.cjs.js → useSingleSelectListState-DbqMu5y_.cjs.js} +2 -2
- package/dist/chunks/{useSingleSelectListState-BjYKH0pH.cjs.js.map → useSingleSelectListState-DbqMu5y_.cjs.js.map} +1 -1
- package/dist/chunks/{useSpinButton-DedtXIGZ.es.js → useSpinButton-2dD53rZp.es.js} +3 -3
- package/dist/chunks/{useSpinButton-DedtXIGZ.es.js.map → useSpinButton-2dD53rZp.es.js.map} +1 -1
- package/dist/chunks/{useSyncRef-Cipkqs1s.es.js → useSyncRef-nVBzPD3o.es.js} +2 -2
- package/dist/chunks/{useSyncRef-Cipkqs1s.es.js.map → useSyncRef-nVBzPD3o.es.js.map} +1 -1
- package/dist/chunks/{useTextField-tbVMyexr.es.js → useTextField-CFlmp99F.es.js} +7 -7
- package/dist/chunks/{useTextField-tbVMyexr.es.js.map → useTextField-CFlmp99F.es.js.map} +1 -1
- package/dist/chunks/{useToggle-VJWgbeCC.cjs.js → useToggle-CB9pQ8ri.cjs.js} +2 -2
- package/dist/chunks/{useToggle-VJWgbeCC.cjs.js.map → useToggle-CB9pQ8ri.cjs.js.map} +1 -1
- package/dist/chunks/{useToggle-CoHAX6Sy.es.js → useToggle-lFy51sx5.es.js} +5 -5
- package/dist/chunks/{useToggle-CoHAX6Sy.es.js.map → useToggle-lFy51sx5.es.js.map} +1 -1
- package/dist/chunks/{useToolbar-B1WYuGxA.es.js → useToolbar-DAsENCEY.es.js} +4 -4
- package/dist/chunks/{useToolbar-B1WYuGxA.es.js.map → useToolbar-DAsENCEY.es.js.map} +1 -1
- package/dist/chunks/{utils-CsKCu3xh.es.js → utils-DkbE8ciF.es.js} +5 -5
- package/dist/chunks/{utils-CsKCu3xh.es.js.map → utils-DkbE8ciF.es.js.map} +1 -1
- package/dist/chunks/{utils-d3Zmq36h.es.js → utils-bpt7OfyH.es.js} +28 -28
- package/dist/chunks/{utils-d3Zmq36h.es.js.map → utils-bpt7OfyH.es.js.map} +1 -1
- package/dist/chunks/{visually-hidden-09RsVX6x.es.js → visually-hidden-BoNAVE5W.es.js} +2 -2
- package/dist/chunks/{visually-hidden-09RsVX6x.es.js.map → visually-hidden-BoNAVE5W.es.js.map} +1 -1
- package/dist/collapsible-motion.d.ts +1 -1
- package/dist/combobox.d.ts +1 -1
- package/dist/components/accordion.cjs +1 -1
- package/dist/components/accordion.es.js +1 -1
- package/dist/components/alert.cjs +1 -1
- package/dist/components/alert.es.js +1 -1
- package/dist/components/badge.es.js +1 -1
- package/dist/components/button.cjs +1 -1
- package/dist/components/button.es.js +1 -1
- package/dist/components/calendar.cjs +1 -1
- package/dist/components/calendar.es.js +1 -1
- package/dist/components/card.es.js +1 -1
- package/dist/components/checkbox.cjs +1 -1
- package/dist/components/checkbox.es.js +1 -1
- package/dist/components/collapsible-motion.cjs +1 -1
- package/dist/components/collapsible-motion.es.js +1 -1
- package/dist/components/combobox.cjs +1 -1
- package/dist/components/combobox.es.js +1 -1
- package/dist/components/components.cjs +1 -1
- package/dist/components/components.es.js +9 -174
- package/dist/components/components.es.js.map +1 -1
- package/dist/components/data-table.cjs +1 -1
- package/dist/components/data-table.es.js +1 -1
- package/dist/components/date-input.cjs +1 -1
- package/dist/components/date-input.es.js +1 -1
- package/dist/components/date-picker.cjs +1 -1
- package/dist/components/date-picker.es.js +1 -1
- package/dist/components/date-range-picker.cjs +1 -1
- package/dist/components/date-range-picker.es.js +1 -1
- package/dist/components/dialog.cjs +1 -1
- package/dist/components/dialog.es.js +1 -1
- package/dist/components/form-field.cjs +1 -1
- package/dist/components/form-field.es.js +1 -1
- package/dist/components/group.es.js +1 -1
- package/dist/components/heading.cjs +1 -1
- package/dist/components/heading.es.js +2 -2
- package/dist/components/icon-button.cjs +1 -1
- package/dist/components/icon-button.es.js +1 -1
- package/dist/components/icon-toggle-button.cjs +1 -1
- package/dist/components/icon-toggle-button.es.js +1 -1
- package/dist/components/kbd.es.js +1 -1
- package/dist/components/link.cjs +1 -1
- package/dist/components/link.es.js +1 -1
- package/dist/components/loading-spinner.es.js +1 -1
- package/dist/components/money-input.cjs +1 -1
- package/dist/components/money-input.es.js +1 -1
- package/dist/components/multiline-text-input.cjs +1 -1
- package/dist/components/multiline-text-input.es.js +1 -1
- package/dist/components/nimbus-provider.cjs +1 -1
- package/dist/components/nimbus-provider.es.js +1 -1
- package/dist/components/number-input.cjs +1 -1
- package/dist/components/number-input.es.js +1 -1
- package/dist/components/pagination.cjs +1 -1
- package/dist/components/pagination.es.js +1 -1
- package/dist/components/password-input.cjs +1 -1
- package/dist/components/password-input.es.js +1 -1
- package/dist/components/popover.cjs +1 -1
- package/dist/components/popover.es.js +1 -1
- package/dist/components/progress-bar.cjs +1 -1
- package/dist/components/progress-bar.es.js +1 -1
- package/dist/components/radio-input.cjs +1 -1
- package/dist/components/radio-input.es.js +1 -1
- package/dist/components/range-calendar.cjs +1 -1
- package/dist/components/range-calendar.es.js +1 -1
- package/dist/components/rich-text-input.cjs +1 -1
- package/dist/components/rich-text-input.es.js +1 -1
- package/dist/components/select.cjs +1 -1
- package/dist/components/select.es.js +1 -1
- package/dist/components/separator.cjs +1 -1
- package/dist/components/separator.es.js +1 -1
- package/dist/components/split-button.cjs +1 -1
- package/dist/components/split-button.es.js +1 -1
- package/dist/components/switch.cjs +1 -1
- package/dist/components/switch.es.js +1 -1
- package/dist/components/tag-group.cjs +1 -1
- package/dist/components/tag-group.es.js +1 -1
- package/dist/components/text-input.cjs +1 -1
- package/dist/components/text-input.es.js +1 -1
- package/dist/components/text.es.js +1 -1
- package/dist/components/time-input.cjs +1 -1
- package/dist/components/time-input.es.js +1 -1
- package/dist/components/toggle-button-group.cjs +1 -1
- package/dist/components/toggle-button-group.es.js +1 -1
- package/dist/components/toggle-button.cjs +1 -1
- package/dist/components/toggle-button.es.js +1 -1
- package/dist/components/toolbar.cjs +1 -1
- package/dist/components/toolbar.es.js +1 -1
- package/dist/components/tooltip.es.js +2 -2
- package/dist/components/visually-hidden.es.js +1 -1
- package/dist/components.d.ts +216 -5337
- package/dist/data-table.d.ts +7 -7
- package/dist/date-picker.d.ts +1 -1
- package/dist/date-range-picker.d.ts +1 -1
- package/dist/dialog.d.ts +505 -25
- package/dist/form-field.d.ts +1 -1
- package/dist/heading.d.ts +30 -2
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +224 -5345
- package/dist/index.es.js +182 -182
- package/dist/progress-bar.d.ts +1 -1
- package/dist/range-calendar.d.ts +1 -1
- package/dist/rich-text-input.d.ts +1 -1
- package/dist/select.d.ts +1 -1
- package/package.json +5 -5
- package/dist/chunks/SelectionManager-3CeJgTGR.es.js.map +0 -1
- package/dist/chunks/SelectionManager-CZSEfn4s.cjs.js +0 -2
- package/dist/chunks/SelectionManager-CZSEfn4s.cjs.js.map +0 -1
- package/dist/chunks/Separator-C_j2BhgD.es.js.map +0 -1
- package/dist/chunks/Separator-DQ53Zxpp.cjs.js +0 -18
- package/dist/chunks/Separator-DQ53Zxpp.cjs.js.map +0 -1
- package/dist/chunks/combobox-CnveMVKQ.cjs.js +0 -2
- package/dist/chunks/dialog-CVa-E9-A.cjs.js +0 -2
- package/dist/chunks/dialog-CVa-E9-A.cjs.js.map +0 -1
- package/dist/chunks/dialog-DTSuKnyk.es.js +0 -34
- package/dist/chunks/dialog-DTSuKnyk.es.js.map +0 -1
- package/dist/chunks/icon-button-CwG0NBaY.es.js +0 -14
- package/dist/chunks/icon-button-DWBhjWpa.cjs.js +0 -2
- package/dist/chunks/index-C7AV1c1_.es.js.map +0 -1
- package/dist/chunks/index-ChJGUoLk.cjs.js +0 -4
- package/dist/chunks/index-ChJGUoLk.cjs.js.map +0 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { jsx as p } from "react/jsx-runtime";
|
|
2
2
|
import { useRef as l } from "react";
|
|
3
|
-
import { $ } from "./Button-
|
|
4
|
-
import { $
|
|
3
|
+
import { $ as b } from "./Button-B6xR_FqM.es.js";
|
|
4
|
+
import { $ } from "./utils-DkbE8ciF.es.js";
|
|
5
5
|
import { mergeRefs as u } from "@chakra-ui/react";
|
|
6
6
|
import { createRecipeContext as x } from "@chakra-ui/react/styled-system";
|
|
7
7
|
import { b as P } from "./button.recipe-NdTb5f8M.es.js";
|
|
8
8
|
import { i as R } from "./emotion-is-prop-valid.esm-BUuA3iy8.es.js";
|
|
9
|
-
import { s as h } from "./index-
|
|
9
|
+
import { s as h } from "./index-DRb2wMPi.es.js";
|
|
10
10
|
import { $ as y } from "./useObjectRef-CaJ5pgjX.es.js";
|
|
11
|
-
import {
|
|
12
|
-
import { $ as v } from "./useButton-
|
|
11
|
+
import { a as B } from "./mergeProps-CzyOU2NE.es.js";
|
|
12
|
+
import { $ as v } from "./useButton-exR3VPRk.es.js";
|
|
13
13
|
const { withContext: w } = /* @__PURE__ */ x({
|
|
14
14
|
recipe: P
|
|
15
15
|
}), C = /* @__PURE__ */ w(
|
|
@@ -25,7 +25,7 @@ const { withContext: w } = /* @__PURE__ */ x({
|
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
), D = (o) => {
|
|
28
|
-
const { ref: e, as: t, asChild: i, children: d, ...c } = o, f = l(null), r = y(u(f, e)), [s] =
|
|
28
|
+
const { ref: e, as: t, asChild: i, children: d, ...c } = o, f = l(null), r = y(u(f, e)), [s] = $(c, r, b), n = t || (i ? "a" : "button"), { buttonProps: m } = v(
|
|
29
29
|
{
|
|
30
30
|
...s,
|
|
31
31
|
elementType: n
|
|
@@ -56,4 +56,4 @@ D.displayName = "Button";
|
|
|
56
56
|
export {
|
|
57
57
|
D as B
|
|
58
58
|
};
|
|
59
|
-
//# sourceMappingURL=button-
|
|
59
|
+
//# sourceMappingURL=button-DSws4IjQ.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button-
|
|
1
|
+
{"version":3,"file":"button-DSws4IjQ.es.js","sources":["../../src/components/button/button.slots.tsx","../../src/components/button/button.tsx"],"sourcesContent":["import {\n type HTMLChakraProps,\n type RecipeProps,\n type UnstyledProp,\n createRecipeContext,\n} from \"@chakra-ui/react/styled-system\";\nimport { buttonRecipe } from \"./button.recipe\";\nimport shouldForwardProp from \"@emotion/is-prop-valid\";\nimport { system } from \"@/theme\";\n\n/**\n * Base recipe props interface that combines Chakra UI's recipe props\n * with the unstyled prop option for the button element.\n */\ninterface ButtonRecipeProps extends RecipeProps<\"button\">, UnstyledProp {}\n\n/**\n * Root props interface that extends Chakra's HTML props with our recipe props.\n * This creates a complete set of props for the root element, combining\n * HTML attributes, Chakra's styling system, and our custom recipe props.\n */\nexport interface ButtonRootProps\n extends Omit<HTMLChakraProps<\"button\", ButtonRecipeProps>, \"slot\"> {\n // insure that the `ButtonRoot` component doesn't give a type error\n slot?: string | null | undefined;\n}\n\nconst { withContext } = createRecipeContext({\n recipe: buttonRecipe,\n});\n\n/**\n * Root component that provides the styling context for the Button component.\n * Uses Chakra UI's recipe context system for consistent styling across instances.\n */\nexport const ButtonRoot = withContext<HTMLButtonElement, ButtonRootProps>(\n \"button\",\n {\n defaultProps: {\n type: \"button\",\n },\n /** make sure the `onPress` properties won't end up as attribute on the rendered DOM element */\n shouldForwardProp(prop, variantKeys) {\n const chakraSfp =\n !variantKeys?.includes(prop) && !system.isValidProperty(prop);\n return shouldForwardProp(prop) && chakraSfp && !prop.includes(\"onPress\");\n },\n }\n);\n","import { useRef } from \"react\";\nimport { useButton, useObjectRef, mergeProps } from \"react-aria\";\nimport { ButtonContext, useContextProps } from \"react-aria-components\";\nimport { mergeRefs } from \"@chakra-ui/react\";\nimport { ButtonRoot } from \"./button.slots.tsx\";\nimport type { ButtonProps } from \"./button.types.ts\";\n\n/**\n * # Button\n *\n * Displays a Button.\n *\n * @see {@link https://nimbus-documentation.vercel.app/components/inputs/button}\n */\nexport const Button = (props: ButtonProps) => {\n const { ref: forwardedRef, as, asChild, children, ...rest } = props;\n\n // create a local ref (because the consumer may not provide a forwardedRef)\n const localRef = useRef<HTMLButtonElement>(null);\n // merge the local ref with a potentially forwarded ref\n const ref = useObjectRef(mergeRefs(localRef, forwardedRef));\n\n // Consume context props based on slot (this enables slot-aware behavior)\n const [contextProps] = useContextProps(rest, ref, ButtonContext);\n\n // if asChild is set, for react-aria to add the button-role, the elementType\n // has to be manually set to something else than button\n\n const elementType = as || (asChild ? \"a\" : \"button\") || \"button\";\n\n const { buttonProps } = useButton(\n {\n ...contextProps,\n elementType,\n },\n ref\n );\n\n const componentProps = mergeProps(contextProps, buttonProps, {\n as,\n asChild,\n /**\n * In case `slot` was null, the `useContextProps` hook already\n * processed it at this point, so it's safe to not attach it\n * to the DOM element\n */\n slot: contextProps.slot || undefined,\n });\n\n return (\n <ButtonRoot\n ref={ref}\n {...componentProps}\n aria-disabled={componentProps.isDisabled || undefined}\n data-disabled={componentProps.isDisabled || undefined}\n >\n {children}\n </ButtonRoot>\n );\n};\n\n// Manually assign a displayName for debugging purposes\nButton.displayName = \"Button\";\n"],"names":["withContext","createRecipeContext","buttonRecipe","ButtonRoot","prop","variantKeys","chakraSfp","system","shouldForwardProp","Button","props","forwardedRef","as","asChild","children","rest","localRef","useRef","ref","useObjectRef","mergeRefs","contextProps","useContextProps","ButtonContext","elementType","buttonProps","useButton","componentProps","mergeProps","jsx"],"mappings":";;;;;;;;;;;;AA2BA,MAAM,EAAE,aAAAA,EAAA,IAAgB,gBAAAC,EAAoB;AAAA,EAC1C,QAAQC;AACV,CAAC,GAMYC,IAAa,gBAAAH;AAAA,EACxB;AAAA,EACA;AAAA,IACE,cAAc;AAAA,MACZ,MAAM;AAAA,IAAA;AAAA;AAAA,IAGR,kBAAkBI,GAAMC,GAAa;AACnC,YAAMC,IACJ,CAACD,GAAa,SAASD,CAAI,KAAK,CAACG,EAAO,gBAAgBH,CAAI;AAC9D,aAAOI,EAAkBJ,CAAI,KAAKE,KAAa,CAACF,EAAK,SAAS,SAAS;AAAA,IACzE;AAAA,EAAA;AAEJ,GClCaK,IAAS,CAACC,MAAuB;AAC5C,QAAM,EAAE,KAAKC,GAAc,IAAAC,GAAI,SAAAC,GAAS,UAAAC,GAAU,GAAGC,MAASL,GAGxDM,IAAWC,EAA0B,IAAI,GAEzCC,IAAMC,EAAaC,EAAUJ,GAAUL,CAAY,CAAC,GAGpD,CAACU,CAAY,IAAIC,EAAgBP,GAAMG,GAAKK,CAAa,GAKzDC,IAAcZ,MAAOC,IAAU,MAAM,WAErC,EAAE,aAAAY,MAAgBC;AAAAA,IACtB;AAAA,MACE,GAAGL;AAAA,MACH,aAAAG;AAAA,IAAA;AAAA,IAEFN;AAAA,EAAA,GAGIS,IAAiBC,EAAWP,GAAcI,GAAa;AAAA,IAC3D,IAAAb;AAAA,IACA,SAAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,MAAMQ,EAAa,QAAQ;AAAA,EAAA,CAC5B;AAED,SACE,gBAAAQ;AAAA,IAAC1B;AAAA,IAAA;AAAA,MACC,KAAAe;AAAA,MACC,GAAGS;AAAA,MACJ,iBAAeA,EAAe,cAAc;AAAA,MAC5C,iBAAeA,EAAe,cAAc;AAAA,MAE3C,UAAAb;AAAA,IAAA;AAAA,EAAA;AAGP;AAGAL,EAAO,cAAc;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const e=require("react/jsx-runtime"),a=require("./Heading-
|
|
2
|
-
//# sourceMappingURL=calendar-
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),a=require("./Heading-B83Y0yT_.cjs.js"),v=require("@chakra-ui/react/styled-system"),u=require("react"),c=require("./useDateFormatter-DawPGCXt.cjs.js"),m=require("./utils-BHdR5Nww.cjs.js"),S=require("./context-OoV8SSWX.cjs.js"),w=require("./box-CWni3A32.cjs.js"),h=require("@commercetools/nimbus-icons"),j=require("./stack-CIN13EDn.cjs.js"),y=require("./text-CCW9kDT_.cjs.js"),q=require("@chakra-ui/react/flex"),P=require("./visually-hidden-Bh-G5QHv.cjs.js"),$=require("./icon-button-CBhvV2Ok.cjs.js"),R=require("./index-L5KSWClG.cjs.js"),I=require("./extractStyleProps-BIJocpXL.cjs.js"),C=require("./Button-BBCRIYjC.cjs.js"),g=require("./Text-BWSfeB9p.cjs.js"),{withProvider:T,withContext:s}=v.createSlotRecipeContext({key:"calendar"}),B=T("div","root"),H=s("div","header"),A=s("div","grids"),F=s("div","monthTitle"),G=s("table","grid"),L=s("thead","gridHeader"),k=s("th","headerCell"),M=s("tbody","gridBody"),N=s("td","bodyCell"),z=()=>{const{locale:d}=S.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),n=m.$64fa3d84918910a7$export$fabf2dc03a41866e(a.$dfd62f934fc76fed$export$3b805cea1f178355),t=u.useContext(a.$dfd62f934fc76fed$export$9e31dcedda1dadc7),r=n?.visibleDuration?.months||1,o=c.$14e0f24ef4ac5c92$export$d0bdf45af03a6ea3(c.$14e0f24ef4ac5c92$export$aa8b41735afcabd2()),i=r>1;return e.jsx(A,{children:Array.from({length:r},(p,l)=>{const b=t.visibleRange.start.add({months:l}),f=new Intl.DateTimeFormat(d,{month:"long"}).format(b.toDate(c.$14e0f24ef4ac5c92$export$aa8b41735afcabd2()));return e.jsxs(w.Box,{width:r==1?"full":"auto",children:[i&&e.jsx(F,{children:f}),e.jsx(G,{asChild:!0,children:e.jsxs(a.$dfd62f934fc76fed$export$5bd780d491cfc46c,{offset:{months:l},weekdayStyle:"short",children:[e.jsx(L,{asChild:!0,children:e.jsx(a.$dfd62f934fc76fed$export$22e2d15eaa4d2377,{children:x=>e.jsx(k,{asChild:!0,children:e.jsx(a.$dfd62f934fc76fed$export$ad2135cac3a11b3d,{children:x})})})}),e.jsx(M,{asChild:!0,children:e.jsx(a.$dfd62f934fc76fed$export$e11f8ba65d857bff,{children:x=>{const D=x.compare(o)===0;return e.jsx(N,{asChild:!0,"data-today":D,children:e.jsx(a.$dfd62f934fc76fed$export$5d847498420df57b,{date:x})})}})})]})})]},f)})})},K=()=>{const t=(m.$64fa3d84918910a7$export$fabf2dc03a41866e(a.$dfd62f934fc76fed$export$3b805cea1f178355)?.visibleDuration?.months||1)>1;return e.jsx(H,{children:e.jsxs(q.Flex,{children:[e.jsxs(j.Stack,{direction:"row",alignItems:"center",children:[e.jsx(P.VisuallyHidden,{children:e.jsx(a.$5cb03073d3f54797$export$a8a3e93435678ff9,{})}),e.jsx($.IconButton,{slot:t?"previous":"previous-month",size:"xs",variant:"ghost",tone:"primary",children:e.jsx(h.KeyboardArrowLeft,{})}),e.jsx(y.Text,{textStyle:"sm",fontWeight:"500",color:"neutral.11",width:t?"4000":"2000",textAlign:"center","aria-hidden":"true",slot:t?"monthRange":"month"}),e.jsx($.IconButton,{slot:t?"next":"next-month",size:"xs",variant:"ghost",tone:"primary",children:e.jsx(h.KeyboardArrowRight,{})})]}),e.jsx(w.Box,{flexGrow:"1"}),e.jsxs(j.Stack,{direction:"row",alignItems:"center",children:[e.jsx($.IconButton,{slot:"previous-year",size:"xs",variant:"ghost",tone:"primary",children:e.jsx(h.KeyboardArrowLeft,{})}),e.jsx(y.Text,{textStyle:"sm",fontWeight:"500",color:"neutral.11",width:"1400",textAlign:"center","aria-hidden":"true",slot:"year"}),e.jsx($.IconButton,{slot:"next-year",size:"xs",variant:"ghost",tone:"primary",children:e.jsx(h.KeyboardArrowRight,{})})]})]})})},V=({children:d})=>{const{locale:n}=S.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),t=u.useContext(C.$d2b4bc8c273e7be6$export$24d547caef80ccd1),r=u.useContext(g.$514c0188e459b4c0$export$9afb8bc826b033ea),o=u.useContext(a.$dfd62f934fc76fed$export$9e31dcedda1dadc7),i={"next-month":{onPress:()=>o.focusNextSection(),"aria-label":"Next month"},"previous-month":{onPress:()=>o.focusPreviousSection(),"aria-label":"Previous month"},"next-year":{onPress:()=>o.focusNextSection(!0),"aria-label":"Next year"},"previous-year":{onPress:()=>o.focusPreviousSection(!0),"aria-label":"Previous year"}},p=new Intl.DateTimeFormat(n,{month:"long"}).format(o.focusedDate.toDate(c.$14e0f24ef4ac5c92$export$aa8b41735afcabd2())),l=[new Intl.DateTimeFormat(n,{month:"long"}).format(o.visibleRange.start.toDate(c.$14e0f24ef4ac5c92$export$aa8b41735afcabd2())),new Intl.DateTimeFormat(n,{month:"long"}).format(o.visibleRange.end.toDate(c.$14e0f24ef4ac5c92$export$aa8b41735afcabd2()))].join(" - "),b=new Intl.DateTimeFormat(n,{year:"numeric"}).format(o.focusedDate.toDate(c.$14e0f24ef4ac5c92$export$aa8b41735afcabd2())),f={month:{children:p},monthRange:{children:l},year:{children:b}};return e.jsx(m.$64fa3d84918910a7$export$2881499e37b75b9a,{values:[[C.$d2b4bc8c273e7be6$export$24d547caef80ccd1,{...t,slots:{...t&&typeof t=="object"&&"slots"in t?t.slots:{},...i}}],[g.$514c0188e459b4c0$export$9afb8bc826b033ea,{...r,slots:{...r&&typeof r=="object"&&"slots"in r?r.slots:{},...f}}]],children:d})},W=d=>{const n=v.useRecipe({recipe:R.calendarSlotRecipe}),[t,r]=n.splitVariantProps(d),[o,i]=I.extractStyleProps(r);return e.jsx(B,{...t,...o,asChild:!0,children:e.jsx(a.$dfd62f934fc76fed$export$e1aef45b828286de,{...i,children:e.jsxs(V,{children:[e.jsx(K,{}),e.jsx(z,{})]})})})};exports.Calendar=W;
|
|
2
|
+
//# sourceMappingURL=calendar-CNjZUyhZ.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"calendar-CxWpOUYN.cjs.js","sources":["../../src/components/calendar/calendar.slots.tsx","../../src/components/calendar/components/calendar.grids.tsx","../../src/components/calendar/components/calendar.header.tsx","../../src/components/calendar/components/calendar.custom-context.tsx","../../src/components/calendar/calendar.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-empty-object-type */\nimport {\n createSlotRecipeContext,\n type HTMLChakraProps,\n type RecipeVariantProps,\n} from \"@chakra-ui/react/styled-system\";\nimport { calendarSlotRecipe } from \"./calendar.recipe\";\nimport type { CalendarProps } from \"react-aria-components\";\nimport type { DateValue } from \"@internationalized/date\";\n\nconst { withProvider, withContext } = createSlotRecipeContext({\n key: \"calendar\",\n});\n\nexport interface CalendarRootSlotProps\n extends HTMLChakraProps<\n \"div\",\n RecipeVariantProps<typeof calendarSlotRecipe> & CalendarProps<DateValue>\n > {}\nexport const CalendarRootSlot = withProvider<\n HTMLDivElement,\n CalendarRootSlotProps\n>(\"div\", \"root\");\n\nexport interface CalendarHeaderSlotProps extends HTMLChakraProps<\"div\"> {}\nexport const CalendarHeaderSlot = withContext<\n HTMLDivElement,\n CalendarHeaderSlotProps\n>(\"div\", \"header\");\n\nexport interface CalendarGridsSlotProps extends HTMLChakraProps<\"div\"> {}\nexport const CalendarGridsSlot = withContext<\n HTMLDivElement,\n CalendarGridsSlotProps\n>(\"div\", \"grids\");\n\nexport interface CalendarMonthTitleSlotProps extends HTMLChakraProps<\"div\"> {}\nexport const CalendarMonthTitleSlot = withContext<\n HTMLDivElement,\n CalendarMonthTitleSlotProps\n>(\"div\", \"monthTitle\");\n\nexport interface CalendarGridSlotProps extends HTMLChakraProps<\"table\"> {}\nexport const CalendarGridSlot = withContext<\n HTMLTableElement,\n CalendarGridSlotProps\n>(\"table\", \"grid\");\n\nexport interface CalendarGridHeaderSlotProps extends HTMLChakraProps<\"thead\"> {}\nexport const CalendarGridHeaderSlot = withContext<\n HTMLTableSectionElement,\n CalendarGridHeaderSlotProps\n>(\"thead\", \"gridHeader\");\n\nexport interface CalendarHeaderCellSlotProps extends HTMLChakraProps<\"th\"> {}\nexport const CalendarHeaderCellSlot = withContext<\n HTMLTableCellElement,\n CalendarHeaderCellSlotProps\n>(\"th\", \"headerCell\");\n\nexport interface CalendarGridBodySlotProps extends HTMLChakraProps<\"tbody\"> {}\nexport const CalendarGridBodySlot = withContext<\n HTMLTableSectionElement,\n CalendarGridBodySlotProps\n>(\"tbody\", \"gridBody\");\n\nexport interface CalendarCellSlotProps extends HTMLChakraProps<\"td\"> {}\nexport const CalendarCellSlot = withContext<\n HTMLTableCellElement,\n CalendarCellSlotProps\n>(\"td\", \"bodyCell\");\n","import { useContext } from \"react\";\nimport { today, getLocalTimeZone } from \"@internationalized/date\";\nimport {\n CalendarGrid as RaCalendarGrid,\n CalendarGridBody as RaCalendarGridBody,\n CalendarGridHeader as RaCalendarGridHeader,\n CalendarHeaderCell as RaCalendarHeaderCell,\n CalendarCell as RaCalendarCell,\n useSlottedContext,\n CalendarContext,\n CalendarStateContext,\n useLocale,\n} from \"react-aria-components\";\n\nimport { Box } from \"@/components\";\n\nimport {\n CalendarCellSlot,\n CalendarGridBodySlot,\n CalendarGridHeaderSlot,\n CalendarGridSlot,\n CalendarGridsSlot,\n CalendarHeaderCellSlot,\n CalendarMonthTitleSlot,\n} from \"../calendar.slots\";\n\nexport const CalendarGrids = () => {\n const { locale } = useLocale();\n const context = useSlottedContext(CalendarContext);\n const calendarState = useContext(CalendarStateContext)!;\n const visibleMonthsCount = context?.visibleDuration?.months || 1;\n const todayDate = today(getLocalTimeZone());\n const showMonthTitles = visibleMonthsCount > 1;\n\n return (\n <CalendarGridsSlot>\n {Array.from({ length: visibleMonthsCount }, (_, index) => {\n const gridDate = calendarState.visibleRange.start.add({\n months: index,\n });\n const monthName = new Intl.DateTimeFormat(locale, {\n month: \"long\",\n }).format(gridDate.toDate(getLocalTimeZone()));\n\n return (\n <Box\n key={monthName}\n width={visibleMonthsCount == 1 ? \"full\" : \"auto\"}\n >\n {showMonthTitles && (\n <CalendarMonthTitleSlot>{monthName}</CalendarMonthTitleSlot>\n )}\n <CalendarGridSlot asChild>\n <RaCalendarGrid offset={{ months: index }} weekdayStyle=\"short\">\n <CalendarGridHeaderSlot asChild>\n <RaCalendarGridHeader>\n {(day) => (\n <CalendarHeaderCellSlot asChild>\n <RaCalendarHeaderCell>{day}</RaCalendarHeaderCell>\n </CalendarHeaderCellSlot>\n )}\n </RaCalendarGridHeader>\n </CalendarGridHeaderSlot>\n <CalendarGridBodySlot asChild>\n <RaCalendarGridBody>\n {(date) => {\n const isToday = date.compare(todayDate) === 0;\n return (\n <CalendarCellSlot asChild data-today={isToday}>\n <RaCalendarCell date={date} />\n </CalendarCellSlot>\n );\n }}\n </RaCalendarGridBody>\n </CalendarGridBodySlot>\n </RaCalendarGrid>\n </CalendarGridSlot>\n </Box>\n );\n })}\n </CalendarGridsSlot>\n );\n};\n","import {\n CalendarContext,\n Heading,\n useSlottedContext,\n} from \"react-aria-components\";\nimport {\n Box,\n Flex,\n IconButton,\n Stack,\n Text,\n VisuallyHidden,\n} from \"@/components\";\nimport {\n KeyboardArrowLeft,\n KeyboardArrowRight,\n} from \"@commercetools/nimbus-icons\";\nimport { CalendarHeaderSlot } from \"../calendar.slots\";\n\nexport const CalendarHeader = () => {\n const calendarProps = useSlottedContext(CalendarContext);\n\n // Needed to decide wether to show a single month or a range\n const visibleDurationMonths = calendarProps?.visibleDuration?.months || 1;\n const showRangeLabel = visibleDurationMonths > 1;\n\n return (\n <CalendarHeaderSlot>\n <Flex>\n <Stack direction=\"row\" alignItems=\"center\">\n {/** solely for screen readers, if not present, a11y issues are raised */}\n <VisuallyHidden>\n <Heading />\n </VisuallyHidden>\n {/* @ts-expect-error - custom-context will add aria-label via the \"slot\" prop */}\n <IconButton\n slot={showRangeLabel ? \"previous\" : \"previous-month\"}\n size=\"xs\"\n variant=\"ghost\"\n tone=\"primary\"\n >\n <KeyboardArrowLeft />\n </IconButton>\n <Text\n textStyle=\"sm\"\n fontWeight=\"500\"\n color=\"neutral.11\"\n width={showRangeLabel ? \"4000\" : \"2000\"}\n textAlign=\"center\"\n aria-hidden=\"true\"\n slot={showRangeLabel ? \"monthRange\" : \"month\"}\n />\n {/* @ts-expect-error - custom-context will add aria-label via the \"slot\" prop */}\n <IconButton\n slot={showRangeLabel ? \"next\" : \"next-month\"}\n size=\"xs\"\n variant=\"ghost\"\n tone=\"primary\"\n >\n <KeyboardArrowRight />\n </IconButton>\n </Stack>\n <Box flexGrow=\"1\" />\n <Stack direction=\"row\" alignItems=\"center\">\n {/* @ts-expect-error - custom-context will add aria-label via the \"slot\" prop */}\n <IconButton\n slot=\"previous-year\"\n size=\"xs\"\n variant=\"ghost\"\n tone=\"primary\"\n >\n <KeyboardArrowLeft />\n </IconButton>\n <Text\n textStyle=\"sm\"\n fontWeight=\"500\"\n color=\"neutral.11\"\n width=\"1400\"\n textAlign=\"center\"\n aria-hidden=\"true\"\n slot=\"year\"\n />\n {/* @ts-expect-error - custom-context will add aria-label via the \"slot\" prop */}\n <IconButton slot=\"next-year\" size=\"xs\" variant=\"ghost\" tone=\"primary\">\n <KeyboardArrowRight />\n </IconButton>\n </Stack>\n </Flex>\n </CalendarHeaderSlot>\n );\n};\n","import { getLocalTimeZone } from \"@internationalized/date\";\nimport { useContext } from \"react\";\nimport {\n Provider,\n ButtonContext,\n CalendarStateContext,\n TextContext,\n useLocale,\n} from \"react-aria-components\";\n\nexport const CalendarCustomContext = ({\n children,\n}: {\n children: React.ReactNode;\n}) => {\n const { locale } = useLocale();\n const buttonContext = useContext(ButtonContext)!;\n const textContext = useContext(TextContext)!;\n const calendarState = useContext(CalendarStateContext)!;\n\n /**\n * Button slots\n * ================================\n */\n const buttonSlots = {\n \"next-month\": {\n onPress: () => calendarState.focusNextSection(),\n \"aria-label\": \"Next month\",\n },\n \"previous-month\": {\n onPress: () => calendarState.focusPreviousSection(),\n \"aria-label\": \"Previous month\",\n },\n \"next-year\": {\n onPress: () => calendarState.focusNextSection(true),\n \"aria-label\": \"Next year\",\n },\n \"previous-year\": {\n onPress: () => calendarState.focusPreviousSection(true),\n \"aria-label\": \"Previous year\",\n },\n };\n\n /**\n * Text slots\n * ================================\n */\n const monthLabel = new Intl.DateTimeFormat(locale, {\n month: \"long\",\n }).format(calendarState.focusedDate.toDate(getLocalTimeZone()));\n\n const monthRangeLabel = [\n new Intl.DateTimeFormat(locale, {\n month: \"long\",\n }).format(calendarState.visibleRange.start.toDate(getLocalTimeZone())),\n new Intl.DateTimeFormat(locale, {\n month: \"long\",\n }).format(calendarState.visibleRange.end.toDate(getLocalTimeZone())),\n ].join(\" - \");\n\n const yearLabel = new Intl.DateTimeFormat(locale, {\n year: \"numeric\",\n }).format(calendarState.focusedDate.toDate(getLocalTimeZone()));\n\n const textSlots = {\n month: { children: monthLabel },\n monthRange: { children: monthRangeLabel },\n year: { children: yearLabel },\n };\n\n return (\n <Provider\n values={[\n [\n ButtonContext,\n {\n ...buttonContext,\n slots: {\n ...(buttonContext &&\n typeof buttonContext === \"object\" &&\n \"slots\" in buttonContext\n ? buttonContext.slots\n : {}),\n ...buttonSlots,\n },\n },\n ],\n [\n TextContext,\n {\n ...textContext,\n slots: {\n ...(textContext &&\n typeof textContext === \"object\" &&\n \"slots\" in textContext\n ? textContext.slots\n : {}),\n ...textSlots,\n },\n },\n ],\n ]}\n >\n {children}\n </Provider>\n );\n};\n","import type { CalendarProps } from \"./calendar.types\";\nimport type { DateValue } from \"react-aria\";\n\nimport { Calendar as RaCalendar } from \"react-aria-components\";\n\nimport { CalendarRootSlot } from \"./calendar.slots\";\nimport { CalendarGrids } from \"./components/calendar.grids\";\nimport { CalendarHeader } from \"./components/calendar.header\";\nimport { calendarSlotRecipe } from \"./calendar.recipe\";\nimport { useRecipe } from \"@chakra-ui/react/styled-system\";\nimport { extractStyleProps } from \"@/utils/extractStyleProps\";\nimport { CalendarCustomContext } from \"./components/calendar.custom-context\";\n\n/**\n * # Calendar\n *\n * Calendars display a grid of days in one or more months and allow users to select a single date.\n *\n * @see {@link https://nimbus-documentation.vercel.app/components/inputs/calendar}\n */\nexport const Calendar = (props: CalendarProps<DateValue>) => {\n const recipe = useRecipe({ recipe: calendarSlotRecipe });\n const [recipeProps, remainingProps] = recipe.splitVariantProps(props);\n const [styleProps, otherProps] = extractStyleProps(remainingProps);\n\n return (\n <CalendarRootSlot {...recipeProps} {...styleProps} asChild>\n <RaCalendar {...otherProps}>\n <CalendarCustomContext>\n <CalendarHeader />\n <CalendarGrids />\n </CalendarCustomContext>\n </RaCalendar>\n </CalendarRootSlot>\n );\n};\n"],"names":["withProvider","withContext","createSlotRecipeContext","CalendarRootSlot","CalendarHeaderSlot","CalendarGridsSlot","CalendarMonthTitleSlot","CalendarGridSlot","CalendarGridHeaderSlot","CalendarHeaderCellSlot","CalendarGridBodySlot","CalendarCellSlot","CalendarGrids","locale","useLocale","context","useSlottedContext","CalendarContext","calendarState","useContext","CalendarStateContext","visibleMonthsCount","todayDate","today","getLocalTimeZone","showMonthTitles","jsx","_","index","gridDate","monthName","jsxs","Box","RaCalendarGrid","RaCalendarGridHeader","day","RaCalendarHeaderCell","RaCalendarGridBody","date","isToday","RaCalendarCell","CalendarHeader","showRangeLabel","Flex","Stack","VisuallyHidden","Heading","IconButton","KeyboardArrowLeft","Text","KeyboardArrowRight","CalendarCustomContext","children","buttonContext","ButtonContext","textContext","TextContext","buttonSlots","monthLabel","monthRangeLabel","yearLabel","textSlots","Provider","Calendar","props","recipe","useRecipe","calendarSlotRecipe","recipeProps","remainingProps","styleProps","otherProps","extractStyleProps","RaCalendar"],"mappings":"ssBAUM,CAAE,aAAAA,EAAc,YAAAC,CAAA,EAAgBC,0BAAwB,CAC5D,IAAK,UACP,CAAC,EAOYC,EAAmBH,EAG9B,MAAO,MAAM,EAGFI,EAAqBH,EAGhC,MAAO,QAAQ,EAGJI,EAAoBJ,EAG/B,MAAO,OAAO,EAGHK,EAAyBL,EAGpC,MAAO,YAAY,EAGRM,EAAmBN,EAG9B,QAAS,MAAM,EAGJO,EAAyBP,EAGpC,QAAS,YAAY,EAGVQ,EAAyBR,EAGp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ar/calendar.slots.tsx","../../src/components/calendar/components/calendar.grids.tsx","../../src/components/calendar/components/calendar.header.tsx","../../src/components/calendar/components/calendar.custom-context.tsx","../../src/components/calendar/calendar.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-empty-object-type */\nimport {\n createSlotRecipeContext,\n type HTMLChakraProps,\n type RecipeVariantProps,\n} from \"@chakra-ui/react/styled-system\";\nimport { calendarSlotRecipe } from \"./calendar.recipe\";\nimport type { CalendarProps } from \"react-aria-components\";\nimport type { DateValue } from \"@internationalized/date\";\n\nconst { withProvider, withContext } = createSlotRecipeContext({\n key: \"calendar\",\n});\n\nexport interface CalendarRootSlotProps\n extends HTMLChakraProps<\n \"div\",\n RecipeVariantProps<typeof calendarSlotRecipe> & CalendarProps<DateValue>\n > {}\nexport const CalendarRootSlot = withProvider<\n HTMLDivElement,\n CalendarRootSlotProps\n>(\"div\", \"root\");\n\nexport interface CalendarHeaderSlotProps extends HTMLChakraProps<\"div\"> {}\nexport const CalendarHeaderSlot = withContext<\n HTMLDivElement,\n CalendarHeaderSlotProps\n>(\"div\", \"header\");\n\nexport interface CalendarGridsSlotProps extends HTMLChakraProps<\"div\"> {}\nexport const CalendarGridsSlot = withContext<\n HTMLDivElement,\n CalendarGridsSlotProps\n>(\"div\", \"grids\");\n\nexport interface CalendarMonthTitleSlotProps extends HTMLChakraProps<\"div\"> {}\nexport const CalendarMonthTitleSlot = withContext<\n HTMLDivElement,\n CalendarMonthTitleSlotProps\n>(\"div\", \"monthTitle\");\n\nexport interface CalendarGridSlotProps extends HTMLChakraProps<\"table\"> {}\nexport const CalendarGridSlot = withContext<\n HTMLTableElement,\n CalendarGridSlotProps\n>(\"table\", \"grid\");\n\nexport interface CalendarGridHeaderSlotProps extends HTMLChakraProps<\"thead\"> {}\nexport const CalendarGridHeaderSlot = withContext<\n HTMLTableSectionElement,\n CalendarGridHeaderSlotProps\n>(\"thead\", \"gridHeader\");\n\nexport interface CalendarHeaderCellSlotProps extends HTMLChakraProps<\"th\"> {}\nexport const CalendarHeaderCellSlot = withContext<\n HTMLTableCellElement,\n CalendarHeaderCellSlotProps\n>(\"th\", \"headerCell\");\n\nexport interface CalendarGridBodySlotProps extends HTMLChakraProps<\"tbody\"> {}\nexport const CalendarGridBodySlot = withContext<\n HTMLTableSectionElement,\n CalendarGridBodySlotProps\n>(\"tbody\", \"gridBody\");\n\nexport interface CalendarCellSlotProps extends HTMLChakraProps<\"td\"> {}\nexport const CalendarCellSlot = withContext<\n HTMLTableCellElement,\n CalendarCellSlotProps\n>(\"td\", \"bodyCell\");\n","import { useContext } from \"react\";\nimport { today, getLocalTimeZone } from \"@internationalized/date\";\nimport {\n CalendarGrid as RaCalendarGrid,\n CalendarGridBody as RaCalendarGridBody,\n CalendarGridHeader as RaCalendarGridHeader,\n CalendarHeaderCell as RaCalendarHeaderCell,\n CalendarCell as RaCalendarCell,\n useSlottedContext,\n CalendarContext,\n CalendarStateContext,\n useLocale,\n} from \"react-aria-components\";\n\nimport { Box } from \"@/components\";\n\nimport {\n CalendarCellSlot,\n CalendarGridBodySlot,\n CalendarGridHeaderSlot,\n CalendarGridSlot,\n CalendarGridsSlot,\n CalendarHeaderCellSlot,\n CalendarMonthTitleSlot,\n} from \"../calendar.slots\";\n\nexport const CalendarGrids = () => {\n const { locale } = useLocale();\n const context = useSlottedContext(CalendarContext);\n const calendarState = useContext(CalendarStateContext)!;\n const visibleMonthsCount = context?.visibleDuration?.months || 1;\n const todayDate = today(getLocalTimeZone());\n const showMonthTitles = visibleMonthsCount > 1;\n\n return (\n <CalendarGridsSlot>\n {Array.from({ length: visibleMonthsCount }, (_, index) => {\n const gridDate = calendarState.visibleRange.start.add({\n months: index,\n });\n const monthName = new Intl.DateTimeFormat(locale, {\n month: \"long\",\n }).format(gridDate.toDate(getLocalTimeZone()));\n\n return (\n <Box\n key={monthName}\n width={visibleMonthsCount == 1 ? \"full\" : \"auto\"}\n >\n {showMonthTitles && (\n <CalendarMonthTitleSlot>{monthName}</CalendarMonthTitleSlot>\n )}\n <CalendarGridSlot asChild>\n <RaCalendarGrid offset={{ months: index }} weekdayStyle=\"short\">\n <CalendarGridHeaderSlot asChild>\n <RaCalendarGridHeader>\n {(day) => (\n <CalendarHeaderCellSlot asChild>\n <RaCalendarHeaderCell>{day}</RaCalendarHeaderCell>\n </CalendarHeaderCellSlot>\n )}\n </RaCalendarGridHeader>\n </CalendarGridHeaderSlot>\n <CalendarGridBodySlot asChild>\n <RaCalendarGridBody>\n {(date) => {\n const isToday = date.compare(todayDate) === 0;\n return (\n <CalendarCellSlot asChild data-today={isToday}>\n <RaCalendarCell date={date} />\n </CalendarCellSlot>\n );\n }}\n </RaCalendarGridBody>\n </CalendarGridBodySlot>\n </RaCalendarGrid>\n </CalendarGridSlot>\n </Box>\n );\n })}\n </CalendarGridsSlot>\n );\n};\n","import {\n CalendarContext,\n Heading,\n useSlottedContext,\n} from \"react-aria-components\";\nimport {\n Box,\n Flex,\n IconButton,\n Stack,\n Text,\n VisuallyHidden,\n} from \"@/components\";\nimport {\n KeyboardArrowLeft,\n KeyboardArrowRight,\n} from \"@commercetools/nimbus-icons\";\nimport { CalendarHeaderSlot } from \"../calendar.slots\";\n\nexport const CalendarHeader = () => {\n const calendarProps = useSlottedContext(CalendarContext);\n\n // Needed to decide wether to show a single month or a range\n const visibleDurationMonths = calendarProps?.visibleDuration?.months || 1;\n const showRangeLabel = visibleDurationMonths > 1;\n\n return (\n <CalendarHeaderSlot>\n <Flex>\n <Stack direction=\"row\" alignItems=\"center\">\n {/** solely for screen readers, if not present, a11y issues are raised */}\n <VisuallyHidden>\n <Heading />\n </VisuallyHidden>\n {/* @ts-expect-error - custom-context will add aria-label via the \"slot\" prop */}\n <IconButton\n slot={showRangeLabel ? \"previous\" : \"previous-month\"}\n size=\"xs\"\n variant=\"ghost\"\n tone=\"primary\"\n >\n <KeyboardArrowLeft />\n </IconButton>\n <Text\n textStyle=\"sm\"\n fontWeight=\"500\"\n color=\"neutral.11\"\n width={showRangeLabel ? \"4000\" : \"2000\"}\n textAlign=\"center\"\n aria-hidden=\"true\"\n slot={showRangeLabel ? \"monthRange\" : \"month\"}\n />\n {/* @ts-expect-error - custom-context will add aria-label via the \"slot\" prop */}\n <IconButton\n slot={showRangeLabel ? \"next\" : \"next-month\"}\n size=\"xs\"\n variant=\"ghost\"\n tone=\"primary\"\n >\n <KeyboardArrowRight />\n </IconButton>\n </Stack>\n <Box flexGrow=\"1\" />\n <Stack direction=\"row\" alignItems=\"center\">\n {/* @ts-expect-error - custom-context will add aria-label via the \"slot\" prop */}\n <IconButton\n slot=\"previous-year\"\n size=\"xs\"\n variant=\"ghost\"\n tone=\"primary\"\n >\n <KeyboardArrowLeft />\n </IconButton>\n <Text\n textStyle=\"sm\"\n fontWeight=\"500\"\n color=\"neutral.11\"\n width=\"1400\"\n textAlign=\"center\"\n aria-hidden=\"true\"\n slot=\"year\"\n />\n {/* @ts-expect-error - custom-context will add aria-label via the \"slot\" prop */}\n <IconButton slot=\"next-year\" size=\"xs\" variant=\"ghost\" tone=\"primary\">\n <KeyboardArrowRight />\n </IconButton>\n </Stack>\n </Flex>\n </CalendarHeaderSlot>\n );\n};\n","import { getLocalTimeZone } from \"@internationalized/date\";\nimport { useContext } from \"react\";\nimport {\n Provider,\n ButtonContext,\n CalendarStateContext,\n TextContext,\n useLocale,\n} from \"react-aria-components\";\n\nexport const CalendarCustomContext = ({\n children,\n}: {\n children: React.ReactNode;\n}) => {\n const { locale } = useLocale();\n const buttonContext = useContext(ButtonContext)!;\n const textContext = useContext(TextContext)!;\n const calendarState = useContext(CalendarStateContext)!;\n\n /**\n * Button slots\n * ================================\n */\n const buttonSlots = {\n \"next-month\": {\n onPress: () => calendarState.focusNextSection(),\n \"aria-label\": \"Next month\",\n },\n \"previous-month\": {\n onPress: () => calendarState.focusPreviousSection(),\n \"aria-label\": \"Previous month\",\n },\n \"next-year\": {\n onPress: () => calendarState.focusNextSection(true),\n \"aria-label\": \"Next year\",\n },\n \"previous-year\": {\n onPress: () => calendarState.focusPreviousSection(true),\n \"aria-label\": \"Previous year\",\n },\n };\n\n /**\n * Text slots\n * ================================\n */\n const monthLabel = new Intl.DateTimeFormat(locale, {\n month: \"long\",\n }).format(calendarState.focusedDate.toDate(getLocalTimeZone()));\n\n const monthRangeLabel = [\n new Intl.DateTimeFormat(locale, {\n month: \"long\",\n }).format(calendarState.visibleRange.start.toDate(getLocalTimeZone())),\n new Intl.DateTimeFormat(locale, {\n month: \"long\",\n }).format(calendarState.visibleRange.end.toDate(getLocalTimeZone())),\n ].join(\" - \");\n\n const yearLabel = new Intl.DateTimeFormat(locale, {\n year: \"numeric\",\n }).format(calendarState.focusedDate.toDate(getLocalTimeZone()));\n\n const textSlots = {\n month: { children: monthLabel },\n monthRange: { children: monthRangeLabel },\n year: { children: yearLabel },\n };\n\n return (\n <Provider\n values={[\n [\n ButtonContext,\n {\n ...buttonContext,\n slots: {\n ...(buttonContext &&\n typeof buttonContext === \"object\" &&\n \"slots\" in buttonContext\n ? buttonContext.slots\n : {}),\n ...buttonSlots,\n },\n },\n ],\n [\n TextContext,\n {\n ...textContext,\n slots: {\n ...(textContext &&\n typeof textContext === \"object\" &&\n \"slots\" in textContext\n ? textContext.slots\n : {}),\n ...textSlots,\n },\n },\n ],\n ]}\n >\n {children}\n </Provider>\n );\n};\n","import type { CalendarProps } from \"./calendar.types\";\nimport type { DateValue } from \"react-aria\";\n\nimport { Calendar as RaCalendar } from \"react-aria-components\";\n\nimport { CalendarRootSlot } from \"./calendar.slots\";\nimport { CalendarGrids } from \"./components/calendar.grids\";\nimport { CalendarHeader } from \"./components/calendar.header\";\nimport { calendarSlotRecipe } from \"./calendar.recipe\";\nimport { useRecipe } from \"@chakra-ui/react/styled-system\";\nimport { extractStyleProps } from \"@/utils/extractStyleProps\";\nimport { CalendarCustomContext } from \"./components/calendar.custom-context\";\n\n/**\n * # Calendar\n *\n * Calendars display a grid of days in one or more months and allow users to select a single date.\n *\n * @see {@link https://nimbus-documentation.vercel.app/components/inputs/calendar}\n */\nexport const Calendar = (props: CalendarProps<DateValue>) => {\n const recipe = useRecipe({ recipe: calendarSlotRecipe });\n const [recipeProps, remainingProps] = recipe.splitVariantProps(props);\n const [styleProps, otherProps] = extractStyleProps(remainingProps);\n\n return (\n <CalendarRootSlot {...recipeProps} {...styleProps} asChild>\n <RaCalendar {...otherProps}>\n <CalendarCustomContext>\n <CalendarHeader />\n <CalendarGrids />\n </CalendarCustomContext>\n </RaCalendar>\n </CalendarRootSlot>\n );\n};\n"],"names":["withProvider","withContext","createSlotRecipeContext","CalendarRootSlot","CalendarHeaderSlot","CalendarGridsSlot","CalendarMonthTitleSlot","CalendarGridSlot","CalendarGridHeaderSlot","CalendarHeaderCellSlot","CalendarGridBodySlot","CalendarCellSlot","CalendarGrids","locale","useLocale","context","useSlottedContext","CalendarContext","calendarState","useContext","CalendarStateContext","visibleMonthsCount","todayDate","today","getLocalTimeZone","showMonthTitles","jsx","_","index","gridDate","monthName","jsxs","Box","RaCalendarGrid","RaCalendarGridHeader","day","RaCalendarHeaderCell","RaCalendarGridBody","date","isToday","RaCalendarCell","CalendarHeader","showRangeLabel","Flex","Stack","VisuallyHidden","Heading","IconButton","KeyboardArrowLeft","Text","KeyboardArrowRight","CalendarCustomContext","children","buttonContext","ButtonContext","textContext","TextContext","buttonSlots","monthLabel","monthRangeLabel","yearLabel","textSlots","Provider","Calendar","props","recipe","useRecipe","calendarSlotRecipe","recipeProps","remainingProps","styleProps","otherProps","extractStyleProps","RaCalendar"],"mappings":"ssBAUM,CAAE,aAAAA,EAAc,YAAAC,CAAA,EAAgBC,0BAAwB,CAC5D,IAAK,UACP,CAAC,EAOYC,EAAmBH,EAG9B,MAAO,MAAM,EAGFI,EAAqBH,EAGhC,MAAO,QAAQ,EAGJI,EAAoBJ,EAG/B,MAAO,OAAO,EAGHK,EAAyBL,EAGpC,MAAO,YAAY,EAGRM,EAAmBN,EAG9B,QAAS,MAAM,EAGJO,EAAyBP,EAGpC,QAAS,YA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
import { jsx as e, jsxs as d } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { j as S, a as I, b as j, c as F, d as G, e as H, i as w, g as A, k as B } from "./Heading-DK3LFGss.es.js";
|
|
3
3
|
import { createSlotRecipeContext as L, useRecipe as M } from "@chakra-ui/react/styled-system";
|
|
4
4
|
import { useContext as p } from "react";
|
|
5
|
-
import { $ as N, a as i } from "./useDateFormatter-
|
|
6
|
-
import { c as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import { e as W } from "./extractStyleProps-
|
|
17
|
-
import { $ as
|
|
5
|
+
import { $ as N, a as i } from "./useDateFormatter-CUeAfTit.es.js";
|
|
6
|
+
import { c as D, d as k } from "./utils-DkbE8ciF.es.js";
|
|
7
|
+
import { $ as P } from "./context-R4YUlO9Y.es.js";
|
|
8
|
+
import { B as R } from "./box-DuBoAZvq.es.js";
|
|
9
|
+
import { KeyboardArrowLeft as u, KeyboardArrowRight as x } from "@commercetools/nimbus-icons";
|
|
10
|
+
import { S as y } from "./stack-CoNreM7B.es.js";
|
|
11
|
+
import { T as C } from "./text-05SUCJIk.es.js";
|
|
12
|
+
import { Flex as z } from "@chakra-ui/react/flex";
|
|
13
|
+
import { V } from "./visually-hidden-BoNAVE5W.es.js";
|
|
14
|
+
import { I as h } from "./icon-button-_9swBHc3.es.js";
|
|
15
|
+
import { h as K } from "./index-DRb2wMPi.es.js";
|
|
16
|
+
import { e as W } from "./extractStyleProps-i_um9deg.es.js";
|
|
17
|
+
import { $ as g } from "./Button-B6xR_FqM.es.js";
|
|
18
18
|
import { $ as v } from "./Text-DOcU1ycg.es.js";
|
|
19
19
|
const { withProvider: _, withContext: n } = /* @__PURE__ */ L({
|
|
20
|
-
key: "
|
|
20
|
+
key: "calendar"
|
|
21
21
|
}), q = /* @__PURE__ */ _("div", "root"), E = /* @__PURE__ */ n("div", "header"), J = /* @__PURE__ */ n("div", "grids"), O = /* @__PURE__ */ n("div", "monthTitle"), Q = /* @__PURE__ */ n("table", "grid"), U = /* @__PURE__ */ n("thead", "gridHeader"), X = /* @__PURE__ */ n("th", "headerCell"), Y = /* @__PURE__ */ n("tbody", "gridBody"), Z = /* @__PURE__ */ n("td", "bodyCell"), ee = () => {
|
|
22
|
-
const { locale: s } = P(), a = w
|
|
22
|
+
const { locale: s } = P(), a = D(w), t = p(S), r = a?.visibleDuration?.months || 1, o = N(i()), l = r > 1;
|
|
23
23
|
return /* @__PURE__ */ e(J, { children: Array.from({ length: r }, (b, c) => {
|
|
24
24
|
const $ = t.visibleRange.start.add({
|
|
25
25
|
months: c
|
|
@@ -27,7 +27,7 @@ const { withProvider: _, withContext: n } = /* @__PURE__ */ L({
|
|
|
27
27
|
month: "long"
|
|
28
28
|
}).format($.toDate(i()));
|
|
29
29
|
return /* @__PURE__ */ d(
|
|
30
|
-
|
|
30
|
+
R,
|
|
31
31
|
{
|
|
32
32
|
width: r == 1 ? "full" : "auto",
|
|
33
33
|
children: [
|
|
@@ -45,10 +45,10 @@ const { withProvider: _, withContext: n } = /* @__PURE__ */ L({
|
|
|
45
45
|
);
|
|
46
46
|
}) });
|
|
47
47
|
}, te = () => {
|
|
48
|
-
const t = (w
|
|
49
|
-
return /* @__PURE__ */ e(E, { children: /* @__PURE__ */ d(
|
|
50
|
-
/* @__PURE__ */ d(
|
|
51
|
-
/* @__PURE__ */ e(
|
|
48
|
+
const t = (D(w)?.visibleDuration?.months || 1) > 1;
|
|
49
|
+
return /* @__PURE__ */ e(E, { children: /* @__PURE__ */ d(z, { children: [
|
|
50
|
+
/* @__PURE__ */ d(y, { direction: "row", alignItems: "center", children: [
|
|
51
|
+
/* @__PURE__ */ e(V, { children: /* @__PURE__ */ e(A, {}) }),
|
|
52
52
|
/* @__PURE__ */ e(
|
|
53
53
|
h,
|
|
54
54
|
{
|
|
@@ -56,11 +56,11 @@ const { withProvider: _, withContext: n } = /* @__PURE__ */ L({
|
|
|
56
56
|
size: "xs",
|
|
57
57
|
variant: "ghost",
|
|
58
58
|
tone: "primary",
|
|
59
|
-
children: /* @__PURE__ */ e(
|
|
59
|
+
children: /* @__PURE__ */ e(u, {})
|
|
60
60
|
}
|
|
61
61
|
),
|
|
62
62
|
/* @__PURE__ */ e(
|
|
63
|
-
|
|
63
|
+
C,
|
|
64
64
|
{
|
|
65
65
|
textStyle: "sm",
|
|
66
66
|
fontWeight: "500",
|
|
@@ -78,12 +78,12 @@ const { withProvider: _, withContext: n } = /* @__PURE__ */ L({
|
|
|
78
78
|
size: "xs",
|
|
79
79
|
variant: "ghost",
|
|
80
80
|
tone: "primary",
|
|
81
|
-
children: /* @__PURE__ */ e(
|
|
81
|
+
children: /* @__PURE__ */ e(x, {})
|
|
82
82
|
}
|
|
83
83
|
)
|
|
84
84
|
] }),
|
|
85
|
-
/* @__PURE__ */ e(
|
|
86
|
-
/* @__PURE__ */ d(
|
|
85
|
+
/* @__PURE__ */ e(R, { flexGrow: "1" }),
|
|
86
|
+
/* @__PURE__ */ d(y, { direction: "row", alignItems: "center", children: [
|
|
87
87
|
/* @__PURE__ */ e(
|
|
88
88
|
h,
|
|
89
89
|
{
|
|
@@ -91,11 +91,11 @@ const { withProvider: _, withContext: n } = /* @__PURE__ */ L({
|
|
|
91
91
|
size: "xs",
|
|
92
92
|
variant: "ghost",
|
|
93
93
|
tone: "primary",
|
|
94
|
-
children: /* @__PURE__ */ e(
|
|
94
|
+
children: /* @__PURE__ */ e(u, {})
|
|
95
95
|
}
|
|
96
96
|
),
|
|
97
97
|
/* @__PURE__ */ e(
|
|
98
|
-
|
|
98
|
+
C,
|
|
99
99
|
{
|
|
100
100
|
textStyle: "sm",
|
|
101
101
|
fontWeight: "500",
|
|
@@ -106,13 +106,13 @@ const { withProvider: _, withContext: n } = /* @__PURE__ */ L({
|
|
|
106
106
|
slot: "year"
|
|
107
107
|
}
|
|
108
108
|
),
|
|
109
|
-
/* @__PURE__ */ e(h, { slot: "next-year", size: "xs", variant: "ghost", tone: "primary", children: /* @__PURE__ */ e(
|
|
109
|
+
/* @__PURE__ */ e(h, { slot: "next-year", size: "xs", variant: "ghost", tone: "primary", children: /* @__PURE__ */ e(x, {}) })
|
|
110
110
|
] })
|
|
111
111
|
] }) });
|
|
112
112
|
}, oe = ({
|
|
113
113
|
children: s
|
|
114
114
|
}) => {
|
|
115
|
-
const { locale: a } = P(), t = p(
|
|
115
|
+
const { locale: a } = P(), t = p(g), r = p(v), o = p(S), l = {
|
|
116
116
|
"next-month": {
|
|
117
117
|
onPress: () => o.focusNextSection(),
|
|
118
118
|
"aria-label": "Next month"
|
|
@@ -150,7 +150,7 @@ const { withProvider: _, withContext: n } = /* @__PURE__ */ L({
|
|
|
150
150
|
{
|
|
151
151
|
values: [
|
|
152
152
|
[
|
|
153
|
-
|
|
153
|
+
g,
|
|
154
154
|
{
|
|
155
155
|
...t,
|
|
156
156
|
slots: {
|
|
@@ -173,7 +173,7 @@ const { withProvider: _, withContext: n } = /* @__PURE__ */ L({
|
|
|
173
173
|
children: s
|
|
174
174
|
}
|
|
175
175
|
);
|
|
176
|
-
},
|
|
176
|
+
}, ge = (s) => {
|
|
177
177
|
const a = M({ recipe: K }), [t, r] = a.splitVariantProps(s), [o, l] = W(r);
|
|
178
178
|
return /* @__PURE__ */ e(q, { ...t, ...o, asChild: !0, children: /* @__PURE__ */ e(B, { ...l, children: /* @__PURE__ */ d(oe, { children: [
|
|
179
179
|
/* @__PURE__ */ e(te, {}),
|
|
@@ -181,6 +181,6 @@ const { withProvider: _, withContext: n } = /* @__PURE__ */ L({
|
|
|
181
181
|
] }) }) });
|
|
182
182
|
};
|
|
183
183
|
export {
|
|
184
|
-
|
|
184
|
+
ge as C
|
|
185
185
|
};
|
|
186
|
-
//# sourceMappingURL=
|
|
186
|
+
//# sourceMappingURL=calendar-QYUcSSuy.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"calendar-B_H9_kwD.es.js","sources":["../../src/components/calendar/calendar.slots.tsx","../../src/components/calendar/components/calendar.grids.tsx","../../src/components/calendar/components/calendar.header.tsx","../../src/components/calendar/components/calendar.custom-context.tsx","../../src/components/calendar/calendar.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-empty-object-type */\nimport {\n createSlotRecipeContext,\n type HTMLChakraProps,\n type RecipeVariantProps,\n} from \"@chakra-ui/react/styled-system\";\nimport { calendarSlotRecipe } from \"./calendar.recipe\";\nimport type { CalendarProps } from \"react-aria-components\";\nimport type { DateValue } from \"@internationalized/date\";\n\nconst { withProvider, withContext } = createSlotRecipeContext({\n key: \"calendar\",\n});\n\nexport interface CalendarRootSlotProps\n extends HTMLChakraProps<\n \"div\",\n RecipeVariantProps<typeof calendarSlotRecipe> & CalendarProps<DateValue>\n > {}\nexport const CalendarRootSlot = withProvider<\n HTMLDivElement,\n CalendarRootSlotProps\n>(\"div\", \"root\");\n\nexport interface CalendarHeaderSlotProps extends HTMLChakraProps<\"div\"> {}\nexport const CalendarHeaderSlot = withContext<\n HTMLDivElement,\n CalendarHeaderSlotProps\n>(\"div\", \"header\");\n\nexport interface CalendarGridsSlotProps extends HTMLChakraProps<\"div\"> {}\nexport const CalendarGridsSlot = withContext<\n HTMLDivElement,\n CalendarGridsSlotProps\n>(\"div\", \"grids\");\n\nexport interface CalendarMonthTitleSlotProps extends HTMLChakraProps<\"div\"> {}\nexport const CalendarMonthTitleSlot = withContext<\n HTMLDivElement,\n CalendarMonthTitleSlotProps\n>(\"div\", \"monthTitle\");\n\nexport interface CalendarGridSlotProps extends HTMLChakraProps<\"table\"> {}\nexport const CalendarGridSlot = withContext<\n HTMLTableElement,\n CalendarGridSlotProps\n>(\"table\", \"grid\");\n\nexport interface CalendarGridHeaderSlotProps extends HTMLChakraProps<\"thead\"> {}\nexport const CalendarGridHeaderSlot = withContext<\n HTMLTableSectionElement,\n CalendarGridHeaderSlotProps\n>(\"thead\", \"gridHeader\");\n\nexport interface CalendarHeaderCellSlotProps extends HTMLChakraProps<\"th\"> {}\nexport const CalendarHeaderCellSlot = withContext<\n HTMLTableCellElement,\n CalendarHeaderCellSlotProps\n>(\"th\", \"headerCell\");\n\nexport interface CalendarGridBodySlotProps extends HTMLChakraProps<\"tbody\"> {}\nexport const CalendarGridBodySlot = withContext<\n HTMLTableSectionElement,\n CalendarGridBodySlotProps\n>(\"tbody\", \"gridBody\");\n\nexport interface CalendarCellSlotProps extends HTMLChakraProps<\"td\"> {}\nexport const CalendarCellSlot = withContext<\n HTMLTableCellElement,\n CalendarCellSlotProps\n>(\"td\", \"bodyCell\");\n","import { useContext } from \"react\";\nimport { today, getLocalTimeZone } from \"@internationalized/date\";\nimport {\n CalendarGrid as RaCalendarGrid,\n CalendarGridBody as RaCalendarGridBody,\n CalendarGridHeader as RaCalendarGridHeader,\n CalendarHeaderCell as RaCalendarHeaderCell,\n CalendarCell as RaCalendarCell,\n useSlottedContext,\n CalendarContext,\n CalendarStateContext,\n useLocale,\n} from \"react-aria-components\";\n\nimport { Box } from \"@/components\";\n\nimport {\n CalendarCellSlot,\n CalendarGridBodySlot,\n CalendarGridHeaderSlot,\n CalendarGridSlot,\n CalendarGridsSlot,\n CalendarHeaderCellSlot,\n CalendarMonthTitleSlot,\n} from \"../calendar.slots\";\n\nexport const CalendarGrids = () => {\n const { locale } = useLocale();\n const context = useSlottedContext(CalendarContext);\n const calendarState = useContext(CalendarStateContext)!;\n const visibleMonthsCount = context?.visibleDuration?.months || 1;\n const todayDate = today(getLocalTimeZone());\n const showMonthTitles = visibleMonthsCount > 1;\n\n return (\n <CalendarGridsSlot>\n {Array.from({ length: visibleMonthsCount }, (_, index) => {\n const gridDate = calendarState.visibleRange.start.add({\n months: index,\n });\n const monthName = new Intl.DateTimeFormat(locale, {\n month: \"long\",\n }).format(gridDate.toDate(getLocalTimeZone()));\n\n return (\n <Box\n key={monthName}\n width={visibleMonthsCount == 1 ? \"full\" : \"auto\"}\n >\n {showMonthTitles && (\n <CalendarMonthTitleSlot>{monthName}</CalendarMonthTitleSlot>\n )}\n <CalendarGridSlot asChild>\n <RaCalendarGrid offset={{ months: index }} weekdayStyle=\"short\">\n <CalendarGridHeaderSlot asChild>\n <RaCalendarGridHeader>\n {(day) => (\n <CalendarHeaderCellSlot asChild>\n <RaCalendarHeaderCell>{day}</RaCalendarHeaderCell>\n </CalendarHeaderCellSlot>\n )}\n </RaCalendarGridHeader>\n </CalendarGridHeaderSlot>\n <CalendarGridBodySlot asChild>\n <RaCalendarGridBody>\n {(date) => {\n const isToday = date.compare(todayDate) === 0;\n return (\n <CalendarCellSlot asChild data-today={isToday}>\n <RaCalendarCell date={date} />\n </CalendarCellSlot>\n );\n }}\n </RaCalendarGridBody>\n </CalendarGridBodySlot>\n </RaCalendarGrid>\n </CalendarGridSlot>\n </Box>\n );\n })}\n </CalendarGridsSlot>\n );\n};\n","import {\n CalendarContext,\n Heading,\n useSlottedContext,\n} from \"react-aria-components\";\nimport {\n Box,\n Flex,\n IconButton,\n Stack,\n Text,\n VisuallyHidden,\n} from \"@/components\";\nimport {\n KeyboardArrowLeft,\n KeyboardArrowRight,\n} from \"@commercetools/nimbus-icons\";\nimport { CalendarHeaderSlot } from \"../calendar.slots\";\n\nexport const CalendarHeader = () => {\n const calendarProps = useSlottedContext(CalendarContext);\n\n // Needed to decide wether to show a single month or a range\n const visibleDurationMonths = calendarProps?.visibleDuration?.months || 1;\n const showRangeLabel = visibleDurationMonths > 1;\n\n return (\n <CalendarHeaderSlot>\n <Flex>\n <Stack direction=\"row\" alignItems=\"center\">\n {/** solely for screen readers, if not present, a11y issues are raised */}\n <VisuallyHidden>\n <Heading />\n </VisuallyHidden>\n {/* @ts-expect-error - custom-context will add aria-label via the \"slot\" prop */}\n <IconButton\n slot={showRangeLabel ? \"previous\" : \"previous-month\"}\n size=\"xs\"\n variant=\"ghost\"\n tone=\"primary\"\n >\n <KeyboardArrowLeft />\n </IconButton>\n <Text\n textStyle=\"sm\"\n fontWeight=\"500\"\n color=\"neutral.11\"\n width={showRangeLabel ? \"4000\" : \"2000\"}\n textAlign=\"center\"\n aria-hidden=\"true\"\n slot={showRangeLabel ? \"monthRange\" : \"month\"}\n />\n {/* @ts-expect-error - custom-context will add aria-label via the \"slot\" prop */}\n <IconButton\n slot={showRangeLabel ? \"next\" : \"next-month\"}\n size=\"xs\"\n variant=\"ghost\"\n tone=\"primary\"\n >\n <KeyboardArrowRight />\n </IconButton>\n </Stack>\n <Box flexGrow=\"1\" />\n <Stack direction=\"row\" alignItems=\"center\">\n {/* @ts-expect-error - custom-context will add aria-label via the \"slot\" prop */}\n <IconButton\n slot=\"previous-year\"\n size=\"xs\"\n variant=\"ghost\"\n tone=\"primary\"\n >\n <KeyboardArrowLeft />\n </IconButton>\n <Text\n textStyle=\"sm\"\n fontWeight=\"500\"\n color=\"neutral.11\"\n width=\"1400\"\n textAlign=\"center\"\n aria-hidden=\"true\"\n slot=\"year\"\n />\n {/* @ts-expect-error - custom-context will add aria-label via the \"slot\" prop */}\n <IconButton slot=\"next-year\" size=\"xs\" variant=\"ghost\" tone=\"primary\">\n <KeyboardArrowRight />\n </IconButton>\n </Stack>\n </Flex>\n </CalendarHeaderSlot>\n );\n};\n","import { getLocalTimeZone } from \"@internationalized/date\";\nimport { useContext } from \"react\";\nimport {\n Provider,\n ButtonContext,\n CalendarStateContext,\n TextContext,\n useLocale,\n} from \"react-aria-components\";\n\nexport const CalendarCustomContext = ({\n children,\n}: {\n children: React.ReactNode;\n}) => {\n const { locale } = useLocale();\n const buttonContext = useContext(ButtonContext)!;\n const textContext = useContext(TextContext)!;\n const calendarState = useContext(CalendarStateContext)!;\n\n /**\n * Button slots\n * ================================\n */\n const buttonSlots = {\n \"next-month\": {\n onPress: () => calendarState.focusNextSection(),\n \"aria-label\": \"Next month\",\n },\n \"previous-month\": {\n onPress: () => calendarState.focusPreviousSection(),\n \"aria-label\": \"Previous month\",\n },\n \"next-year\": {\n onPress: () => calendarState.focusNextSection(true),\n \"aria-label\": \"Next year\",\n },\n \"previous-year\": {\n onPress: () => calendarState.focusPreviousSection(true),\n \"aria-label\": \"Previous year\",\n },\n };\n\n /**\n * Text slots\n * ================================\n */\n const monthLabel = new Intl.DateTimeFormat(locale, {\n month: \"long\",\n }).format(calendarState.focusedDate.toDate(getLocalTimeZone()));\n\n const monthRangeLabel = [\n new Intl.DateTimeFormat(locale, {\n month: \"long\",\n }).format(calendarState.visibleRange.start.toDate(getLocalTimeZone())),\n new Intl.DateTimeFormat(locale, {\n month: \"long\",\n }).format(calendarState.visibleRange.end.toDate(getLocalTimeZone())),\n ].join(\" - \");\n\n const yearLabel = new Intl.DateTimeFormat(locale, {\n year: \"numeric\",\n }).format(calendarState.focusedDate.toDate(getLocalTimeZone()));\n\n const textSlots = {\n month: { children: monthLabel },\n monthRange: { children: monthRangeLabel },\n year: { children: yearLabel },\n };\n\n return (\n <Provider\n values={[\n [\n ButtonContext,\n {\n ...buttonContext,\n slots: {\n ...(buttonContext &&\n typeof buttonContext === \"object\" &&\n \"slots\" in buttonContext\n ? buttonContext.slots\n : {}),\n ...buttonSlots,\n },\n },\n ],\n [\n TextContext,\n {\n ...textContext,\n slots: {\n ...(textContext &&\n typeof textContext === \"object\" &&\n \"slots\" in textContext\n ? textContext.slots\n : {}),\n ...textSlots,\n },\n },\n ],\n ]}\n >\n {children}\n </Provider>\n );\n};\n","import type { CalendarProps } from \"./calendar.types\";\nimport type { DateValue } from \"react-aria\";\n\nimport { Calendar as RaCalendar } from \"react-aria-components\";\n\nimport { CalendarRootSlot } from \"./calendar.slots\";\nimport { CalendarGrids } from \"./components/calendar.grids\";\nimport { CalendarHeader } from \"./components/calendar.header\";\nimport { calendarSlotRecipe } from \"./calendar.recipe\";\nimport { useRecipe } from \"@chakra-ui/react/styled-system\";\nimport { extractStyleProps } from \"@/utils/extractStyleProps\";\nimport { CalendarCustomContext } from \"./components/calendar.custom-context\";\n\n/**\n * # Calendar\n *\n * Calendars display a grid of days in one or more months and allow users to select a single date.\n *\n * @see {@link https://nimbus-documentation.vercel.app/components/inputs/calendar}\n */\nexport const Calendar = (props: CalendarProps<DateValue>) => {\n const recipe = useRecipe({ recipe: calendarSlotRecipe });\n const [recipeProps, remainingProps] = recipe.splitVariantProps(props);\n const [styleProps, otherProps] = extractStyleProps(remainingProps);\n\n return (\n <CalendarRootSlot {...recipeProps} {...styleProps} asChild>\n <RaCalendar {...otherProps}>\n <CalendarCustomContext>\n <CalendarHeader />\n <CalendarGrids />\n </CalendarCustomContext>\n </RaCalendar>\n </CalendarRootSlot>\n );\n};\n"],"names":["withProvider","withContext","createSlotRecipeContext","CalendarRootSlot","CalendarHeaderSlot","CalendarGridsSlot","CalendarMonthTitleSlot","CalendarGridSlot","CalendarGridHeaderSlot","CalendarHeaderCellSlot","CalendarGridBodySlot","CalendarCellSlot","CalendarGrids","locale","useLocale","context","useSlottedContext","CalendarContext","calendarState","useContext","CalendarStateContext","visibleMonthsCount","todayDate","today","getLocalTimeZone","showMonthTitles","jsx","_","index","gridDate","monthName","jsxs","Box","RaCalendarGrid","RaCalendarGridHeader","day","RaCalendarHeaderCell","RaCalendarGridBody","date","isToday","RaCalendarCell","CalendarHeader","showRangeLabel","Flex","Stack","VisuallyHidden","Heading","IconButton","KeyboardArrowLeft","Text","KeyboardArrowRight","CalendarCustomContext","children","buttonContext","ButtonContext","textContext","TextContext","buttonSlots","monthLabel","monthRangeLabel","yearLabel","textSlots","Provider","Calendar","props","recipe","useRecipe","calendarSlotRecipe","recipeProps","remainingProps","styleProps","otherProps","extractStyleProps","RaCalendar"],"mappings":";;;;;;;;;;;;;;;;;;AAUA,MAAM,EAAE,cAAAA,GAAc,aAAAC,EAAA,IAAgB,gBAAAC,EAAwB;AAAA,EAC5D,KAAK;AACP,CAAC,GAOYC,IAAmB,gBAAAH,EAG9B,OAAO,MAAM,GAGFI,IAAqB,gBAAAH,EAGhC,OAAO,QAAQ,GAGJI,IAAoB,gBAAAJ,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AAAA,UACED;AAAAA,UACA;AAAA,YACE,GAAGD;AAAA,YACH,OAAO;AAAA,cACL,GAAIA,KACJ,OAAOA,KAAgB,YACvB,WAAWA,IACPA,EAAY,QACZ,CAAA;AAAA,cACJ,GAAGM;AAAA,YAAA;AAAA,UACL;AAAA,QACF;AAAA,MACF;AAAA,MAGD,UAAAT;AAAA,IAAA;AAAA,EAAA;AAGP,GCtFaW,KAAW,CAACC,MAAoC;AAC3D,QAAMC,IAASC,EAAU,EAAE,QAAQC,GAAoB,GACjD,CAACC,GAAaC,CAAc,IAAIJ,EAAO,kBAAkBD,CAAK,GAC9D,CAACM,GAAYC,CAAU,IAAIC,EAAkBH,CAAc;AAEjE,SACE,gBAAA3C,EAACvB,GAAA,EAAkB,GAAGiE,GAAc,GAAGE,GAAY,SAAO,IACxD,UAAA,gBAAA5C,EAAC+C,GAAA,EAAY,GAAGF,GACd,4BAACpB,IAAA,EACC,UAAA;AAAA,IAAA,gBAAAzB,EAACe,IAAA,EAAe;AAAA,sBACf7B,IAAA,CAAA,CAAc;AAAA,EAAA,EAAA,CACjB,GACF,GACF;AAEJ;"}
|
|
1
|
+
{"version":3,"file":"calendar-QYUcSSuy.es.js","sources":["../../src/components/calendar/calendar.slots.tsx","../../src/components/calendar/components/calendar.grids.tsx","../../src/components/calendar/components/calendar.header.tsx","../../src/components/calendar/components/calendar.custom-context.tsx","../../src/components/calendar/calendar.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-empty-object-type */\nimport {\n createSlotRecipeContext,\n type HTMLChakraProps,\n type RecipeVariantProps,\n} from \"@chakra-ui/react/styled-system\";\nimport { calendarSlotRecipe } from \"./calendar.recipe\";\nimport type { CalendarProps } from \"react-aria-components\";\nimport type { DateValue } from \"@internationalized/date\";\n\nconst { withProvider, withContext } = createSlotRecipeContext({\n key: \"calendar\",\n});\n\nexport interface CalendarRootSlotProps\n extends HTMLChakraProps<\n \"div\",\n RecipeVariantProps<typeof calendarSlotRecipe> & CalendarProps<DateValue>\n > {}\nexport const CalendarRootSlot = withProvider<\n HTMLDivElement,\n CalendarRootSlotProps\n>(\"div\", \"root\");\n\nexport interface CalendarHeaderSlotProps extends HTMLChakraProps<\"div\"> {}\nexport const CalendarHeaderSlot = withContext<\n HTMLDivElement,\n CalendarHeaderSlotProps\n>(\"div\", \"header\");\n\nexport interface CalendarGridsSlotProps extends HTMLChakraProps<\"div\"> {}\nexport const CalendarGridsSlot = withContext<\n HTMLDivElement,\n CalendarGridsSlotProps\n>(\"div\", \"grids\");\n\nexport interface CalendarMonthTitleSlotProps extends HTMLChakraProps<\"div\"> {}\nexport const CalendarMonthTitleSlot = withContext<\n HTMLDivElement,\n CalendarMonthTitleSlotProps\n>(\"div\", \"monthTitle\");\n\nexport interface CalendarGridSlotProps extends HTMLChakraProps<\"table\"> {}\nexport const CalendarGridSlot = withContext<\n HTMLTableElement,\n CalendarGridSlotProps\n>(\"table\", \"grid\");\n\nexport interface CalendarGridHeaderSlotProps extends HTMLChakraProps<\"thead\"> {}\nexport const CalendarGridHeaderSlot = withContext<\n HTMLTableSectionElement,\n CalendarGridHeaderSlotProps\n>(\"thead\", \"gridHeader\");\n\nexport interface CalendarHeaderCellSlotProps extends HTMLChakraProps<\"th\"> {}\nexport const CalendarHeaderCellSlot = withContext<\n HTMLTableCellElement,\n CalendarHeaderCellSlotProps\n>(\"th\", \"headerCell\");\n\nexport interface CalendarGridBodySlotProps extends HTMLChakraProps<\"tbody\"> {}\nexport const CalendarGridBodySlot = withContext<\n HTMLTableSectionElement,\n CalendarGridBodySlotProps\n>(\"tbody\", \"gridBody\");\n\nexport interface CalendarCellSlotProps extends HTMLChakraProps<\"td\"> {}\nexport const CalendarCellSlot = withContext<\n HTMLTableCellElement,\n CalendarCellSlotProps\n>(\"td\", \"bodyCell\");\n","import { useContext } from \"react\";\nimport { today, getLocalTimeZone } from \"@internationalized/date\";\nimport {\n CalendarGrid as RaCalendarGrid,\n CalendarGridBody as RaCalendarGridBody,\n CalendarGridHeader as RaCalendarGridHeader,\n CalendarHeaderCell as RaCalendarHeaderCell,\n CalendarCell as RaCalendarCell,\n useSlottedContext,\n CalendarContext,\n CalendarStateContext,\n useLocale,\n} from \"react-aria-components\";\n\nimport { Box } from \"@/components\";\n\nimport {\n CalendarCellSlot,\n CalendarGridBodySlot,\n CalendarGridHeaderSlot,\n CalendarGridSlot,\n CalendarGridsSlot,\n CalendarHeaderCellSlot,\n CalendarMonthTitleSlot,\n} from \"../calendar.slots\";\n\nexport const CalendarGrids = () => {\n const { locale } = useLocale();\n const context = useSlottedContext(CalendarContext);\n const calendarState = useContext(CalendarStateContext)!;\n const visibleMonthsCount = context?.visibleDuration?.months || 1;\n const todayDate = today(getLocalTimeZone());\n const showMonthTitles = visibleMonthsCount > 1;\n\n return (\n <CalendarGridsSlot>\n {Array.from({ length: visibleMonthsCount }, (_, index) => {\n const gridDate = calendarState.visibleRange.start.add({\n months: index,\n });\n const monthName = new Intl.DateTimeFormat(locale, {\n month: \"long\",\n }).format(gridDate.toDate(getLocalTimeZone()));\n\n return (\n <Box\n key={monthName}\n width={visibleMonthsCount == 1 ? \"full\" : \"auto\"}\n >\n {showMonthTitles && (\n <CalendarMonthTitleSlot>{monthName}</CalendarMonthTitleSlot>\n )}\n <CalendarGridSlot asChild>\n <RaCalendarGrid offset={{ months: index }} weekdayStyle=\"short\">\n <CalendarGridHeaderSlot asChild>\n <RaCalendarGridHeader>\n {(day) => (\n <CalendarHeaderCellSlot asChild>\n <RaCalendarHeaderCell>{day}</RaCalendarHeaderCell>\n </CalendarHeaderCellSlot>\n )}\n </RaCalendarGridHeader>\n </CalendarGridHeaderSlot>\n <CalendarGridBodySlot asChild>\n <RaCalendarGridBody>\n {(date) => {\n const isToday = date.compare(todayDate) === 0;\n return (\n <CalendarCellSlot asChild data-today={isToday}>\n <RaCalendarCell date={date} />\n </CalendarCellSlot>\n );\n }}\n </RaCalendarGridBody>\n </CalendarGridBodySlot>\n </RaCalendarGrid>\n </CalendarGridSlot>\n </Box>\n );\n })}\n </CalendarGridsSlot>\n );\n};\n","import {\n CalendarContext,\n Heading,\n useSlottedContext,\n} from \"react-aria-components\";\nimport {\n Box,\n Flex,\n IconButton,\n Stack,\n Text,\n VisuallyHidden,\n} from \"@/components\";\nimport {\n KeyboardArrowLeft,\n KeyboardArrowRight,\n} from \"@commercetools/nimbus-icons\";\nimport { CalendarHeaderSlot } from \"../calendar.slots\";\n\nexport const CalendarHeader = () => {\n const calendarProps = useSlottedContext(CalendarContext);\n\n // Needed to decide wether to show a single month or a range\n const visibleDurationMonths = calendarProps?.visibleDuration?.months || 1;\n const showRangeLabel = visibleDurationMonths > 1;\n\n return (\n <CalendarHeaderSlot>\n <Flex>\n <Stack direction=\"row\" alignItems=\"center\">\n {/** solely for screen readers, if not present, a11y issues are raised */}\n <VisuallyHidden>\n <Heading />\n </VisuallyHidden>\n {/* @ts-expect-error - custom-context will add aria-label via the \"slot\" prop */}\n <IconButton\n slot={showRangeLabel ? \"previous\" : \"previous-month\"}\n size=\"xs\"\n variant=\"ghost\"\n tone=\"primary\"\n >\n <KeyboardArrowLeft />\n </IconButton>\n <Text\n textStyle=\"sm\"\n fontWeight=\"500\"\n color=\"neutral.11\"\n width={showRangeLabel ? \"4000\" : \"2000\"}\n textAlign=\"center\"\n aria-hidden=\"true\"\n slot={showRangeLabel ? \"monthRange\" : \"month\"}\n />\n {/* @ts-expect-error - custom-context will add aria-label via the \"slot\" prop */}\n <IconButton\n slot={showRangeLabel ? \"next\" : \"next-month\"}\n size=\"xs\"\n variant=\"ghost\"\n tone=\"primary\"\n >\n <KeyboardArrowRight />\n </IconButton>\n </Stack>\n <Box flexGrow=\"1\" />\n <Stack direction=\"row\" alignItems=\"center\">\n {/* @ts-expect-error - custom-context will add aria-label via the \"slot\" prop */}\n <IconButton\n slot=\"previous-year\"\n size=\"xs\"\n variant=\"ghost\"\n tone=\"primary\"\n >\n <KeyboardArrowLeft />\n </IconButton>\n <Text\n textStyle=\"sm\"\n fontWeight=\"500\"\n color=\"neutral.11\"\n width=\"1400\"\n textAlign=\"center\"\n aria-hidden=\"true\"\n slot=\"year\"\n />\n {/* @ts-expect-error - custom-context will add aria-label via the \"slot\" prop */}\n <IconButton slot=\"next-year\" size=\"xs\" variant=\"ghost\" tone=\"primary\">\n <KeyboardArrowRight />\n </IconButton>\n </Stack>\n </Flex>\n </CalendarHeaderSlot>\n );\n};\n","import { getLocalTimeZone } from \"@internationalized/date\";\nimport { useContext } from \"react\";\nimport {\n Provider,\n ButtonContext,\n CalendarStateContext,\n TextContext,\n useLocale,\n} from \"react-aria-components\";\n\nexport const CalendarCustomContext = ({\n children,\n}: {\n children: React.ReactNode;\n}) => {\n const { locale } = useLocale();\n const buttonContext = useContext(ButtonContext)!;\n const textContext = useContext(TextContext)!;\n const calendarState = useContext(CalendarStateContext)!;\n\n /**\n * Button slots\n * ================================\n */\n const buttonSlots = {\n \"next-month\": {\n onPress: () => calendarState.focusNextSection(),\n \"aria-label\": \"Next month\",\n },\n \"previous-month\": {\n onPress: () => calendarState.focusPreviousSection(),\n \"aria-label\": \"Previous month\",\n },\n \"next-year\": {\n onPress: () => calendarState.focusNextSection(true),\n \"aria-label\": \"Next year\",\n },\n \"previous-year\": {\n onPress: () => calendarState.focusPreviousSection(true),\n \"aria-label\": \"Previous year\",\n },\n };\n\n /**\n * Text slots\n * ================================\n */\n const monthLabel = new Intl.DateTimeFormat(locale, {\n month: \"long\",\n }).format(calendarState.focusedDate.toDate(getLocalTimeZone()));\n\n const monthRangeLabel = [\n new Intl.DateTimeFormat(locale, {\n month: \"long\",\n }).format(calendarState.visibleRange.start.toDate(getLocalTimeZone())),\n new Intl.DateTimeFormat(locale, {\n month: \"long\",\n }).format(calendarState.visibleRange.end.toDate(getLocalTimeZone())),\n ].join(\" - \");\n\n const yearLabel = new Intl.DateTimeFormat(locale, {\n year: \"numeric\",\n }).format(calendarState.focusedDate.toDate(getLocalTimeZone()));\n\n const textSlots = {\n month: { children: monthLabel },\n monthRange: { children: monthRangeLabel },\n year: { children: yearLabel },\n };\n\n return (\n <Provider\n values={[\n [\n ButtonContext,\n {\n ...buttonContext,\n slots: {\n ...(buttonContext &&\n typeof buttonContext === \"object\" &&\n \"slots\" in buttonContext\n ? buttonContext.slots\n : {}),\n ...buttonSlots,\n },\n },\n ],\n [\n TextContext,\n {\n ...textContext,\n slots: {\n ...(textContext &&\n typeof textContext === \"object\" &&\n \"slots\" in textContext\n ? textContext.slots\n : {}),\n ...textSlots,\n },\n },\n ],\n ]}\n >\n {children}\n </Provider>\n );\n};\n","import type { CalendarProps } from \"./calendar.types\";\nimport type { DateValue } from \"react-aria\";\n\nimport { Calendar as RaCalendar } from \"react-aria-components\";\n\nimport { CalendarRootSlot } from \"./calendar.slots\";\nimport { CalendarGrids } from \"./components/calendar.grids\";\nimport { CalendarHeader } from \"./components/calendar.header\";\nimport { calendarSlotRecipe } from \"./calendar.recipe\";\nimport { useRecipe } from \"@chakra-ui/react/styled-system\";\nimport { extractStyleProps } from \"@/utils/extractStyleProps\";\nimport { CalendarCustomContext } from \"./components/calendar.custom-context\";\n\n/**\n * # Calendar\n *\n * Calendars display a grid of days in one or more months and allow users to select a single date.\n *\n * @see {@link https://nimbus-documentation.vercel.app/components/inputs/calendar}\n */\nexport const Calendar = (props: CalendarProps<DateValue>) => {\n const recipe = useRecipe({ recipe: calendarSlotRecipe });\n const [recipeProps, remainingProps] = recipe.splitVariantProps(props);\n const [styleProps, otherProps] = extractStyleProps(remainingProps);\n\n return (\n <CalendarRootSlot {...recipeProps} {...styleProps} asChild>\n <RaCalendar {...otherProps}>\n <CalendarCustomContext>\n <CalendarHeader />\n <CalendarGrids />\n </CalendarCustomContext>\n </RaCalendar>\n </CalendarRootSlot>\n );\n};\n"],"names":["withProvider","withContext","createSlotRecipeContext","CalendarRootSlot","CalendarHeaderSlot","CalendarGridsSlot","CalendarMonthTitleSlot","CalendarGridSlot","CalendarGridHeaderSlot","CalendarHeaderCellSlot","CalendarGridBodySlot","CalendarCellSlot","CalendarGrids","locale","useLocale","context","useSlottedContext","CalendarContext","calendarState","useContext","CalendarStateContext","visibleMonthsCount","todayDate","today","getLocalTimeZone","showMonthTitles","jsx","_","index","gridDate","monthName","jsxs","Box","RaCalendarGrid","RaCalendarGridHeader","day","RaCalendarHeaderCell","RaCalendarGridBody","date","isToday","RaCalendarCell","CalendarHeader","showRangeLabel","Flex","Stack","VisuallyHidden","Heading","IconButton","KeyboardArrowLeft","Text","KeyboardArrowRight","CalendarCustomContext","children","buttonContext","ButtonContext","textContext","TextContext","buttonSlots","monthLabel","monthRangeLabel","yearLabel","textSlots","Provider","Calendar","props","recipe","useRecipe","calendarSlotRecipe","recipeProps","remainingProps","styleProps","otherProps","extractStyleProps","RaCalendar"],"mappings":";;;;;;;;;;;;;;;;;;AAUA,MAAM,EAAE,cAAAA,GAAc,aAAAC,EAAA,IAAgB,gBAAAC,EAAwB;AAAA,EAC5D,KAAK;AACP,CAAC,GAOYC,IAAmB,gBAAAH,EAG9B,OAAO,MAAM,GAGFI,IAAqB,gBAAAH,EAGhC,OAAO,QAAQ,GAGJI,IAAoB,gBAAAJ,EAG/B,OAAO,OAAO,GAGHK,IAAyB,gBAAAL,EAGpC,OAAO,YAAY,GAGRM,IAAmB,gBAAAN,EAG9B,SAAS,MAAM,GAGJO,IAAyB,gBAAAP,EAGpC,SAAS,YAAY,GAGVQ,IAAyB,gBAAAR,EAGpC,MAAM,YAAY,GAGPS,IAAuB,gBAAAT,EAGlC,SAAS,UAAU,GAGRU,IAAmB,gBAAAV,EAG9B,MAAM,UAAU,GC5CLW,KAAgB,MAAM;AACjC,QAAM,EAAE,QAAAC,EAAA,IAAWC,EAAA,GACbC,IAAUC,EAAkBC,CAAe,GAC3CC,IAAgBC,EAAWC,CAAoB,GAC/CC,IAAqBN,GAAS,iBAAiB,UAAU,GACzDO,IAAYC,EAAMC,GAAkB,GACpCC,IAAkBJ,IAAqB;AAE7C,SACE,gBAAAK,EAACrB,GAAA,EACE,UAAA,MAAM,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AY,GAAGF,GACd,4BAACpB,IAAA,EACC,UAAA;AAAA,IAAA,gBAAAzB,EAACe,IAAA,EAAe;AAAA,sBACf7B,IAAA,CAAA,CAAc;AAAA,EAAA,EAAA,CACjB,GACF,GACF;AAEJ;"}
|
|
@@ -2,8 +2,8 @@ import { jsx as n, jsxs as c } from "react/jsx-runtime";
|
|
|
2
2
|
import { createContext as R, useState as l, useMemo as P, useContext as i, useEffect as u } from "react";
|
|
3
3
|
import { defineSlotRecipe as h, createSlotRecipeContext as H } from "@chakra-ui/react/styled-system";
|
|
4
4
|
import { S } from "./stack-CoNreM7B.es.js";
|
|
5
|
-
import { $ as y } from "./useFocusRing-
|
|
6
|
-
import {
|
|
5
|
+
import { $ as y } from "./useFocusRing-h0FI3Bnv.es.js";
|
|
6
|
+
import { a as N } from "./mergeProps-CzyOU2NE.es.js";
|
|
7
7
|
const k = /* @__PURE__ */ h({
|
|
8
8
|
slots: ["root", "header", "content"],
|
|
9
9
|
className: "nimbus-card",
|
|
@@ -135,4 +135,4 @@ export {
|
|
|
135
135
|
m as b,
|
|
136
136
|
p as c
|
|
137
137
|
};
|
|
138
|
-
//# sourceMappingURL=card-
|
|
138
|
+
//# sourceMappingURL=card-B-NYoYot.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card-D9fWUQqs.es.js","sources":["../../src/components/card/card.recipe.tsx","../../src/components/card/card.slots.tsx","../../src/components/card/components/card.root.tsx","../../src/components/card/components/card.header.tsx","../../src/components/card/components/card.content.tsx","../../src/components/card/card.tsx"],"sourcesContent":["import { defineSlotRecipe } from \"@chakra-ui/react/styled-system\";\n\n/**\n * Recipe configuration for the Card component.\n * Defines the styling variants and base styles using Chakra UI's recipe system.\n */\nexport const cardRecipe = defineSlotRecipe({\n slots: [\"root\", \"header\", \"content\"],\n\n className: \"nimbus-card\",\n\n base: {\n root: {\n colorPalette: \"slate\",\n display: \"inline-flex\",\n alignItems: \"flex-start\",\n borderRadius: \"300\",\n focusVisibleRing: \"outside\",\n },\n },\n\n variants: {\n cardPadding: {\n sm: {\n root: {\n padding: \"200\",\n },\n },\n md: {\n root: {\n padding: \"400\",\n },\n },\n lg: {\n root: {\n padding: \"600\",\n },\n },\n },\n\n borderStyle: {\n none: {},\n outlined: {\n root: {\n border: \"solid-25\",\n borderColor: \"colorPalette.3\",\n },\n },\n },\n elevation: {\n none: {},\n elevated: {\n root: {\n shadow: \"1\",\n },\n },\n },\n backgroundStyle: {\n default: {\n root: {\n backgroundColor: \"colorPalette.contrast\",\n },\n },\n muted: {\n root: {\n backgroundColor: \"colorPalette.2\",\n },\n },\n },\n },\n});\n","import {\n type HTMLChakraProps,\n type RecipeProps,\n type UnstyledProp,\n createSlotRecipeContext,\n} from \"@chakra-ui/react/styled-system\";\n\nimport { cardRecipe } from \"./card.recipe\";\n\n/**\n * Base recipe props interface that combines Chakra UI's recipe props\n * with the unstyled prop option for the div element.\n */\ninterface CardRecipeProps extends RecipeProps<\"div\">, UnstyledProp {}\n\n/**\n * Root props interface that extends Chakra's HTML props with our recipe props.\n * This creates a complete set of props for the root element, combining\n * HTML attributes, Chakra's styling system, and our custom recipe props.\n */\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport interface CardRootProps\n extends HTMLChakraProps<\"div\", CardRecipeProps> {}\n\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport interface CardHeaderProps\n extends HTMLChakraProps<\"div\", CardRecipeProps> {}\n\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport interface CardContentProps\n extends HTMLChakraProps<\"div\", CardRecipeProps> {}\n\nconst { withProvider, withContext } = createSlotRecipeContext({\n recipe: cardRecipe,\n});\n\n/**\n * Root component that provides the styling context for the Card component.\n * Uses Chakra UI's recipe context system for consistent styling across instances.\n */\nexport const CardRoot = withProvider<HTMLDivElement, CardRootProps>(\n \"div\",\n \"root\"\n);\n\nexport const CardHeader = withContext<HTMLDivElement, CardHeaderProps>(\n \"div\",\n \"header\"\n);\nexport const CardContent = withContext<HTMLDivElement, CardContentProps>(\n \"div\",\n \"content\"\n);\n","import { createContext, useMemo, useState, type ReactNode } from \"react\";\nimport { CardRoot as CardRootSlot } from \"../card.slots\";\nimport type { CardProps } from \"../card.types\";\nimport { Stack } from \"../../stack\";\nimport { mergeProps, useFocusRing } from \"react-aria\";\n\ntype CardContextValue = {\n setHeader: (header: React.ReactNode) => void;\n setContent: (content: React.ReactNode) => void;\n};\n\nexport const CardContext = createContext<CardContextValue | undefined>(\n undefined\n);\n\n/**\n * # Card\n *\n * A versatile container component presents self-contained information\n *\n * @see {@link https://nimbus-documentation.vercel.app/components/data-display/card}\n */\nexport const CardRoot = ({ children, ref, ...props }: CardProps) => {\n const { isFocused, isFocusVisible, focusProps } = useFocusRing();\n const [headerNode, setHeader] = useState<ReactNode>(null);\n const [contentNode, setContent] = useState<ReactNode>(null);\n\n // Memoize the context value so we don't cause unnecessary re-renders\n const contextValue = useMemo(\n () => ({\n setHeader,\n setContent,\n }),\n [setHeader, setContent]\n );\n\n return (\n <CardContext.Provider value={contextValue}>\n <CardRootSlot\n ref={ref}\n {...mergeProps(props, focusProps)}\n data-focus={isFocused || undefined}\n data-focus-visible={isFocusVisible || undefined}\n tabIndex={0}\n >\n {/* Always render them in this order/layout to protect consumers */}\n <Stack direction=\"column\" gap=\"200\">\n {headerNode}\n {contentNode}\n </Stack>\n\n {/* Render all consumer sub-components, including our own */}\n {children}\n </CardRootSlot>\n </CardContext.Provider>\n );\n};\n\nCardRoot.displayName = \"Card.Root\";\n","import { useContext, useEffect } from \"react\";\nimport {\n CardHeader as CardHeaderSlot,\n type CardHeaderProps,\n} from \"../card.slots\";\nimport { CardContext } from \"./card.root\";\n\nexport const CardHeader = ({ children, ...props }: CardHeaderProps) => {\n const context = useContext(CardContext);\n\n useEffect(() => {\n if (context) {\n const slotElement = (\n <CardHeaderSlot {...props}>{children}</CardHeaderSlot>\n );\n // Register it with the parent\n context.setHeader(slotElement);\n\n // On unmount, remove it\n return () => context.setHeader(null);\n }\n }, [children, props]);\n\n return null;\n};\nCardHeader.displayName = \"Card.Header\";\n","import { useContext, useEffect } from \"react\";\nimport {\n CardContent as CardContentSlot,\n type CardContentProps,\n} from \"../card.slots\";\nimport { CardContext } from \"./card.root\";\n\nexport const CardContent = ({ children, ...props }: CardContentProps) => {\n const context = useContext(CardContext);\n\n useEffect(() => {\n if (context) {\n const slotElement = (\n <CardContentSlot {...props}>{children}</CardContentSlot>\n );\n // Register it with the parent\n context.setContent(slotElement);\n\n // On unmount, remove it\n return () => context.setContent(null);\n }\n }, [children, props]);\n\n return null;\n};\n\nCardContent.displayName = \"Card.Content\";\n","import { CardRoot } from \"./components/card.root\";\nimport { CardHeader } from \"./components/card.header\";\nimport { CardContent } from \"./components/card.content\";\n\nexport const Card = {\n Root: CardRoot,\n Header: CardHeader,\n Content: CardContent,\n};\n\nexport {\n CardRoot as _CardRoot,\n CardHeader as _CardHeader,\n CardContent as _CardContent,\n};\n"],"names":["cardRecipe","defineSlotRecipe","withProvider","withContext","createSlotRecipeContext","CardRoot","CardHeader","CardContent","CardContext","createContext","children","ref","props","isFocused","isFocusVisible","focusProps","useFocusRing","headerNode","setHeader","useState","contentNode","setContent","contextValue","useMemo","jsx","jsxs","CardRootSlot","mergeProps","Stack","context","useContext","useEffect","slotElement","CardHeaderSlot","CardContentSlot","Card"],"mappings":";;;;;;AAMO,MAAMA,IAAa,gBAAAC,EAAiB;AAAA,EACzC,OAAO,CAAC,QAAQ,UAAU,SAAS;AAAA,EAEnC,WAAW;AAAA,EAEX,MAAM;AAAA,IACJ,MAAM;AAAA,MACJ,cAAc;AAAA,MACd,SAAS;AAAA,MACT,YAAY;AAAA,MACZ,cAAc;AAAA,MACd,kBAAkB;AAAA,IAAA;AAAA,EACpB;AAAA,EAGF,UAAU;AAAA,IACR,aAAa;AAAA,MACX,IAAI;AAAA,QACF,MAAM;AAAA,UACJ,SAAS;AAAA,QAAA;AAAA,MACX;AAAA,MAEF,IAAI;AAAA,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4B,IAAO;AAAA,EAClB,MAAM9B;AAAA,EACN,QAAQC;AAAA,EACR,SAASC;AACX;"}
|
|
1
|
+
{"version":3,"file":"card-B-NYoYot.es.js","sources":["../../src/components/card/card.recipe.tsx","../../src/components/card/card.slots.tsx","../../src/components/card/components/card.root.tsx","../../src/components/card/components/card.header.tsx","../../src/components/card/components/card.content.tsx","../../src/components/card/card.tsx"],"sourcesContent":["import { defineSlotRecipe } from \"@chakra-ui/react/styled-system\";\n\n/**\n * Recipe configuration for the Card component.\n * Defines the styling variants and base styles using Chakra UI's recipe system.\n */\nexport const cardRecipe = defineSlotRecipe({\n slots: [\"root\", \"header\", \"content\"],\n\n className: \"nimbus-card\",\n\n base: {\n root: {\n colorPalette: \"slate\",\n display: \"inline-flex\",\n alignItems: \"flex-start\",\n borderRadius: \"300\",\n focusVisibleRing: \"outside\",\n },\n },\n\n variants: {\n cardPadding: {\n sm: {\n root: {\n padding: \"200\",\n },\n },\n md: {\n root: {\n padding: \"400\",\n },\n },\n lg: {\n root: {\n padding: \"600\",\n },\n },\n },\n\n borderStyle: {\n none: {},\n outlined: {\n root: {\n border: \"solid-25\",\n borderColor: \"colorPalette.3\",\n },\n },\n },\n elevation: {\n none: {},\n elevated: {\n root: {\n shadow: \"1\",\n },\n },\n },\n backgroundStyle: {\n default: {\n root: {\n backgroundColor: \"colorPalette.contrast\",\n },\n },\n muted: {\n root: {\n backgroundColor: \"colorPalette.2\",\n },\n },\n },\n },\n});\n","import {\n type HTMLChakraProps,\n type RecipeProps,\n type UnstyledProp,\n createSlotRecipeContext,\n} from \"@chakra-ui/react/styled-system\";\n\nimport { cardRecipe } from \"./card.recipe\";\n\n/**\n * Base recipe props interface that combines Chakra UI's recipe props\n * with the unstyled prop option for the div element.\n */\ninterface CardRecipeProps extends RecipeProps<\"div\">, UnstyledProp {}\n\n/**\n * Root props interface that extends Chakra's HTML props with our recipe props.\n * This creates a complete set of props for the root element, combining\n * HTML attributes, Chakra's styling system, and our custom recipe props.\n */\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport interface CardRootProps\n extends HTMLChakraProps<\"div\", CardRecipeProps> {}\n\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport interface CardHeaderProps\n extends HTMLChakraProps<\"div\", CardRecipeProps> {}\n\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport interface CardContentProps\n extends HTMLChakraProps<\"div\", CardRecipeProps> {}\n\nconst { withProvider, withContext } = createSlotRecipeContext({\n recipe: cardRecipe,\n});\n\n/**\n * Root component that provides the styling context for the Card component.\n * Uses Chakra UI's recipe context system for consistent styling across instances.\n */\nexport const CardRoot = withProvider<HTMLDivElement, CardRootProps>(\n \"div\",\n \"root\"\n);\n\nexport const CardHeader = withContext<HTMLDivElement, CardHeaderProps>(\n \"div\",\n \"header\"\n);\nexport const CardContent = withContext<HTMLDivElement, CardContentProps>(\n \"div\",\n \"content\"\n);\n","import { createContext, useMemo, useState, type ReactNode } from \"react\";\nimport { CardRoot as CardRootSlot } from \"../card.slots\";\nimport type { CardProps } from \"../card.types\";\nimport { Stack } from \"../../stack\";\nimport { mergeProps, useFocusRing } from \"react-aria\";\n\ntype CardContextValue = {\n setHeader: (header: React.ReactNode) => void;\n setContent: (content: React.ReactNode) => void;\n};\n\nexport const CardContext = createContext<CardContextValue | undefined>(\n undefined\n);\n\n/**\n * # Card\n *\n * A versatile container component presents self-contained information\n *\n * @see {@link https://nimbus-documentation.vercel.app/components/data-display/card}\n */\nexport const CardRoot = ({ children, ref, ...props }: CardProps) => {\n const { isFocused, isFocusVisible, focusProps } = useFocusRing();\n const [headerNode, setHeader] = useState<ReactNode>(null);\n const [contentNode, setContent] = useState<ReactNode>(null);\n\n // Memoize the context value so we don't cause unnecessary re-renders\n const contextValue = useMemo(\n () => ({\n setHeader,\n setContent,\n }),\n [setHeader, setContent]\n );\n\n return (\n <CardContext.Provider value={contextValue}>\n <CardRootSlot\n ref={ref}\n {...mergeProps(props, focusProps)}\n data-focus={isFocused || undefined}\n data-focus-visible={isFocusVisible || undefined}\n tabIndex={0}\n >\n {/* Always render them in this order/layout to protect consumers */}\n <Stack direction=\"column\" gap=\"200\">\n {headerNode}\n {contentNode}\n </Stack>\n\n {/* Render all consumer sub-components, including our own */}\n {children}\n </CardRootSlot>\n </CardContext.Provider>\n );\n};\n\nCardRoot.displayName = \"Card.Root\";\n","import { useContext, useEffect } from \"react\";\nimport {\n CardHeader as CardHeaderSlot,\n type CardHeaderProps,\n} from \"../card.slots\";\nimport { CardContext } from \"./card.root\";\n\nexport const CardHeader = ({ children, ...props }: CardHeaderProps) => {\n const context = useContext(CardContext);\n\n useEffect(() => {\n if (context) {\n const slotElement = (\n <CardHeaderSlot {...props}>{children}</CardHeaderSlot>\n );\n // Register it with the parent\n context.setHeader(slotElement);\n\n // On unmount, remove it\n return () => context.setHeader(null);\n }\n }, [children, props]);\n\n return null;\n};\nCardHeader.displayName = \"Card.Header\";\n","import { useContext, useEffect } from \"react\";\nimport {\n CardContent as CardContentSlot,\n type CardContentProps,\n} from \"../card.slots\";\nimport { CardContext } from \"./card.root\";\n\nexport const CardContent = ({ children, ...props }: CardContentProps) => {\n const context = useContext(CardContext);\n\n useEffect(() => {\n if (context) {\n const slotElement = (\n <CardContentSlot {...props}>{children}</CardContentSlot>\n );\n // Register it with the parent\n context.setContent(slotElement);\n\n // On unmount, remove it\n return () => context.setContent(null);\n }\n }, [children, props]);\n\n return null;\n};\n\nCardContent.displayName = \"Card.Content\";\n","import { CardRoot } from \"./components/card.root\";\nimport { CardHeader } from \"./components/card.header\";\nimport { CardContent } from \"./components/card.content\";\n\nexport const Card = {\n Root: CardRoot,\n Header: CardHeader,\n Content: CardContent,\n};\n\nexport {\n CardRoot as _CardRoot,\n CardHeader as _CardHeader,\n CardContent as _CardContent,\n};\n"],"names":["cardRecipe","defineSlotRecipe","withProvider","withContext","createSlotRecipeContext","CardRoot","CardHeader","CardContent","CardContext","createContext","children","ref","props","isFocused","isFocusVisible","focusProps","useFocusRing","headerNode","setHeader","useState","contentNode","setContent","contextValue","useMemo","jsx","jsxs","CardRootSlot","mergeProps","Stack","context","useContext","useEffect","slotElement","CardHeaderSlot","CardContentSlot","Card"],"mappings":";;;;;;AAMO,MAAMA,IAAa,gBAAAC,EAAiB;AAAA,EACzC,OAAO,CAAC,QAAQ,UAAU,SAAS;AAAA,EAEnC,WAAW;AAAA,EAEX,MAAM;AAAA,IACJ,MAAM;AAAA,MACJ,cAAc;AAAA,MACd,SAAS;AAAA,MACT,YAAY;AAAA,MACZ,cAAc;AAAA,MACd,kBAAkB;AAAA,IAAA;AAAA,EACpB;AAAA,EAGF,UAAU;AAAA,IACR,aAAa;AAAA,MACX,IAAI;AAAA,QACF,MAAM;AAAA,UACJ,SAAS;AAAA,QAAA;AAAA,MACX;AAAA,MAEF,IAAI;AAAA,QACF,MAAM;AAAA,UACJ,SAAS;AAAA,QAAA;AAAA,MACX;AAAA,MAEF,IAAI;AAAA,QACF,MAAM;AAAA,UACJ,SAAS;AAAA,QAAA;AAAA,MACX;AAAA,IACF;AAAA,IAGF,aAAa;AAAA,MACX,MAAM,CAAA;AAAA,MACN,UAAU;AAAA,QACR,MAAM;AAAA,UACJ,QAAQ;AAAA,UACR,aAAa;AAAA,QAAA;AAAA,MACf;AAAA,IACF;AAAA,IAEF,WAAW;AAAA,MACT,MAAM,CAAA;AAAA,MACN,UAAU;AAAA,QACR,MAAM;AAAA,UACJ,QAAQ;AAAA,QAAA;AAAA,MACV;AAAA,IACF;AAAA,IAEF,iBAAiB;AAAA,MACf,SAAS;AAAA,QACP,MAAM;AAAA,UACJ,iBAAiB;AAAA,QAAA;AAAA,MACnB;AAAA,MAEF,OAAO;AAAA,QACL,MAAM;AAAA,UACJ,iBAAiB;AAAA,QAAA;AAAA,MACnB;AAAA,IACF;AAAA,EACF;AAEJ,CAAC,GCtCK,EAAE,cAAAC,GAAc,aAAAC,EAAA,IAAgB,gBAAAC,EAAwB;AAAA,EAC5D,QAAQJ;AACV,CAAC,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AUG,CAAW,GAGtB,MAAMH,EAAQ,UAAU,IAAI;AAAA,IACrC;AAAA,EACF,GAAG,CAACnB,GAAUE,CAAK,CAAC,GAEb;AACT;AACAN,EAAW,cAAc;AClBlB,MAAMC,IAAc,CAAC,EAAE,UAAAG,GAAU,GAAGE,QAA8B;AACvE,QAAMiB,IAAUC,EAAWtB,CAAW;AAEtC,SAAAuB,EAAU,MAAM;AACd,QAAIF,GAAS;AACX,YAAMG,IACJ,gBAAAR,EAACU,GAAA,EAAiB,GAAGtB,GAAQ,UAAAF,GAAS;AAGxC,aAAAmB,EAAQ,WAAWG,CAAW,GAGvB,MAAMH,EAAQ,WAAW,IAAI;AAAA,IACtC;AAAA,EACF,GAAG,CAACnB,GAAUE,CAAK,CAAC,GAEb;AACT;AAEAL,EAAY,cAAc;ACtBnB,MAAM4B,IAAO;AAAA,EAClB,MAAM9B;AAAA,EACN,QAAQC;AAAA,EACR,SAASC;AACX;"}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { jsx as P, jsxs as D, Fragment as M } from "react/jsx-runtime";
|
|
2
2
|
import { createSlotRecipeContext as j, useSlotRecipe as H } from "@chakra-ui/react/styled-system";
|
|
3
3
|
import { Check as N, Remove as L } from "@commercetools/nimbus-icons";
|
|
4
|
-
import { e as T } from "./extractStyleProps-
|
|
5
|
-
import {
|
|
6
|
-
import { $ as z, c as A, f as G, e as S, a as J } from "./utils-
|
|
4
|
+
import { e as T } from "./extractStyleProps-i_um9deg.es.js";
|
|
5
|
+
import { a as W } from "./RSPContexts-sA4dJls7.es.js";
|
|
6
|
+
import { $ as z, c as A, f as G, e as S, a as J } from "./utils-DkbE8ciF.es.js";
|
|
7
7
|
import { $ as K } from "./Form-CXcEMuBf.es.js";
|
|
8
|
-
import {
|
|
8
|
+
import { a as V } from "./mergeProps-CzyOU2NE.es.js";
|
|
9
9
|
import { $ as Q } from "./filterDOMProps-BSVCO5jK.es.js";
|
|
10
10
|
import { $ as U } from "./useObjectRef-CaJ5pgjX.es.js";
|
|
11
11
|
import R, { useEffect as k, useRef as X, forwardRef as Y, useContext as Z, createContext as ee, useMemo as ie } from "react";
|
|
12
|
-
import { $ as B, a as ae, b as g, c as de } from "./useFormValidation-
|
|
13
|
-
import { $ as te } from "./usePress-
|
|
14
|
-
import { $ as le } from "./useToggle-
|
|
12
|
+
import { $ as B, a as ae, b as g, c as de } from "./useFormValidation-UuUTYmIX.es.js";
|
|
13
|
+
import { $ as te } from "./usePress-DWxMRKB2.es.js";
|
|
14
|
+
import { $ as le } from "./useToggle-lFy51sx5.es.js";
|
|
15
15
|
import { $ as O } from "./useToggleState-Uh0wTgdI.es.js";
|
|
16
|
-
import { $ as ne } from "./useFocusRing-
|
|
17
|
-
import { $ as oe } from "./useHover-
|
|
18
|
-
import { $ as re } from "./VisuallyHidden-
|
|
16
|
+
import { $ as ne } from "./useFocusRing-h0FI3Bnv.es.js";
|
|
17
|
+
import { $ as oe } from "./useHover-Cb0lPkvP.es.js";
|
|
18
|
+
import { $ as re } from "./VisuallyHidden-Do7AN5Hy.es.js";
|
|
19
19
|
function q(i, e, a) {
|
|
20
20
|
let l = B({
|
|
21
21
|
...i,
|
|
@@ -216,4 +216,4 @@ he.displayName = "Checkbox";
|
|
|
216
216
|
export {
|
|
217
217
|
he as C
|
|
218
218
|
};
|
|
219
|
-
//# sourceMappingURL=checkbox-
|
|
219
|
+
//# sourceMappingURL=checkbox-BYw5k4jR.es.js.map
|