@commercetools/nimbus 2.0.1-rc1 → 2.0.1-rc2

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.
Files changed (192) hide show
  1. package/dist/chunks/{Button-CrgZzRm9.es.js → Button-Dx3xzN8n.es.js} +2 -2
  2. package/dist/chunks/{Button-CrgZzRm9.es.js.map → Button-Dx3xzN8n.es.js.map} +1 -1
  3. package/dist/chunks/{DateField-qGypjFaJ.es.js → DateField-B-4ymU5i.es.js} +3 -3
  4. package/dist/chunks/{DateField-qGypjFaJ.es.js.map → DateField-B-4ymU5i.es.js.map} +1 -1
  5. package/dist/chunks/{DatePicker-Dn0LNd7V.es.js → DatePicker-ByxT1sNF.es.js} +6 -6
  6. package/dist/chunks/{DatePicker-Dn0LNd7V.es.js.map → DatePicker-ByxT1sNF.es.js.map} +1 -1
  7. package/dist/chunks/{Dialog-B2hCMJnM.es.js → Dialog-Qpq4hk89.es.js} +6 -6
  8. package/dist/chunks/{Dialog-B2hCMJnM.es.js.map → Dialog-Qpq4hk89.es.js.map} +1 -1
  9. package/dist/chunks/{Header-B4V0zxSN.es.js → Header-DFcQWjkP.es.js} +3 -3
  10. package/dist/chunks/{Header-B4V0zxSN.es.js.map → Header-DFcQWjkP.es.js.map} +1 -1
  11. package/dist/chunks/{Heading-CfiWDgRZ.es.js → Heading-DFiVmZUR.es.js} +4 -4
  12. package/dist/chunks/{Heading-CfiWDgRZ.es.js.map → Heading-DFiVmZUR.es.js.map} +1 -1
  13. package/dist/chunks/{ListBox-DAcVFwWW.es.js → ListBox-_1Uk-5-7.es.js} +6 -6
  14. package/dist/chunks/{ListBox-DAcVFwWW.es.js.map → ListBox-_1Uk-5-7.es.js.map} +1 -1
  15. package/dist/chunks/{ListKeyboardDelegate-D-k0fIME.es.js → ListKeyboardDelegate-ByRdSpOe.es.js} +2 -2
  16. package/dist/chunks/{ListKeyboardDelegate-D-k0fIME.es.js.map → ListKeyboardDelegate-ByRdSpOe.es.js.map} +1 -1
  17. package/dist/chunks/{Modal-D91zBjIP.es.js → Modal-DZrVgGsJ.es.js} +3 -3
  18. package/dist/chunks/{Modal-D91zBjIP.es.js.map → Modal-DZrVgGsJ.es.js.map} +1 -1
  19. package/dist/chunks/{SelectionManager-2q7N4psD.es.js → SelectionManager-DMLLo5N3.es.js} +3 -3
  20. package/dist/chunks/{SelectionManager-2q7N4psD.es.js.map → SelectionManager-DMLLo5N3.es.js.map} +1 -1
  21. package/dist/chunks/{ToggleButton-Cj9AtHpY.es.js → ToggleButton-881iW8P_.es.js} +2 -2
  22. package/dist/chunks/{ToggleButton-Cj9AtHpY.es.js.map → ToggleButton-881iW8P_.es.js.map} +1 -1
  23. package/dist/chunks/accordion-B2FLWAh5.cjs.js.map +1 -1
  24. package/dist/chunks/{accordion-DSLccfDW.es.js → accordion-CKDnNkVv.es.js} +2 -2
  25. package/dist/chunks/accordion-CKDnNkVv.es.js.map +1 -0
  26. package/dist/chunks/{alert-Cz2mnKir.es.js → alert-lNg0Rz2w.es.js} +2 -2
  27. package/dist/chunks/{alert-Cz2mnKir.es.js.map → alert-lNg0Rz2w.es.js.map} +1 -1
  28. package/dist/chunks/{button-Cnui897Z.es.js → button-IZUJaJku.es.js} +3 -3
  29. package/dist/chunks/{button-Cnui897Z.es.js.map → button-IZUJaJku.es.js.map} +1 -1
  30. package/dist/chunks/calendar-V0KeNCQ3.cjs.js.map +1 -1
  31. package/dist/chunks/{calendar-BTdHdh7y.es.js → calendar-lD6G93R9.es.js} +5 -5
  32. package/dist/chunks/calendar-lD6G93R9.es.js.map +1 -0
  33. package/dist/chunks/{checkbox-Bm4Yqa_0.es.js → checkbox-BB-WJdal.es.js} +3 -3
  34. package/dist/chunks/{checkbox-Bm4Yqa_0.es.js.map → checkbox-BB-WJdal.es.js.map} +1 -1
  35. package/dist/chunks/collapsible-motion-C7M_CLNI.cjs.js.map +1 -1
  36. package/dist/chunks/{collapsible-motion-OOUmjdKw.es.js → collapsible-motion-CSrKjF8X.es.js} +2 -2
  37. package/dist/chunks/collapsible-motion-CSrKjF8X.es.js.map +1 -0
  38. package/dist/chunks/combobox-B5UxZWSX.cjs.js.map +1 -1
  39. package/dist/chunks/{combobox-Ch4VokC9.es.js → combobox-D_7gr3DY.es.js} +13 -13
  40. package/dist/chunks/{combobox-Ch4VokC9.es.js.map → combobox-D_7gr3DY.es.js.map} +1 -1
  41. package/dist/chunks/{data-table-DC369pb3.es.js → data-table-ClMivKY1.es.js} +8 -8
  42. package/dist/chunks/{data-table-DC369pb3.es.js.map → data-table-ClMivKY1.es.js.map} +1 -1
  43. package/dist/chunks/{date-input-KVuRsFzs.es.js → date-input-Do1wXp3t.es.js} +2 -2
  44. package/dist/chunks/{date-input-KVuRsFzs.es.js.map → date-input-Do1wXp3t.es.js.map} +1 -1
  45. package/dist/chunks/{date-picker-C304WfAN.es.js → date-picker-ClYge74a.es.js} +9 -9
  46. package/dist/chunks/{date-picker-C304WfAN.es.js.map → date-picker-ClYge74a.es.js.map} +1 -1
  47. package/dist/chunks/{date-range-picker-CkRgcwfm.es.js → date-range-picker-KRcGUZW-.es.js} +9 -9
  48. package/dist/chunks/{date-range-picker-CkRgcwfm.es.js.map → date-range-picker-KRcGUZW-.es.js.map} +1 -1
  49. package/dist/chunks/{dialog-gTeRW6GK.es.js → dialog-BwtIcIvd.es.js} +2 -2
  50. package/dist/chunks/{dialog-gTeRW6GK.es.js.map → dialog-BwtIcIvd.es.js.map} +1 -1
  51. package/dist/chunks/{dialog.title-B9cEUH8w.es.js → dialog.title-CP_ZeiK4.es.js} +5 -5
  52. package/dist/chunks/{dialog.title-B9cEUH8w.es.js.map → dialog.title-CP_ZeiK4.es.js.map} +1 -1
  53. package/dist/chunks/{draggable-list-BIJ7t5ou.es.js → draggable-list-s43baxoM.es.js} +11 -11
  54. package/dist/chunks/{draggable-list-BIJ7t5ou.es.js.map → draggable-list-s43baxoM.es.js.map} +1 -1
  55. package/dist/chunks/{drawer-DKF34Nfc.es.js → drawer-BJ4qvGnj.es.js} +5 -5
  56. package/dist/chunks/{drawer-DKF34Nfc.es.js.map → drawer-BJ4qvGnj.es.js.map} +1 -1
  57. package/dist/chunks/{form-field-cRZo4WSf.es.js → form-field-BYlpCXdY.es.js} +3 -3
  58. package/dist/chunks/{form-field-cRZo4WSf.es.js.map → form-field-BYlpCXdY.es.js.map} +1 -1
  59. package/dist/chunks/group-BqUFlw5R.cjs.js.map +1 -1
  60. package/dist/chunks/group-CWADf2vF.es.js.map +1 -1
  61. package/dist/chunks/icon-CenxuChf.es.js.map +1 -1
  62. package/dist/chunks/icon-D39U--jA.cjs.js.map +1 -1
  63. package/dist/chunks/{icon-button-9Ni8-hO7.es.js → icon-button-DQS2apw-.es.js} +2 -2
  64. package/dist/chunks/{icon-button-9Ni8-hO7.es.js.map → icon-button-DQS2apw-.es.js.map} +1 -1
  65. package/dist/chunks/{icon-toggle-button-Db8CLmE5.es.js → icon-toggle-button-Bi-9Obfx.es.js} +2 -2
  66. package/dist/chunks/{icon-toggle-button-Db8CLmE5.es.js.map → icon-toggle-button-Bi-9Obfx.es.js.map} +1 -1
  67. package/dist/chunks/kbd-BaeV_DL-.cjs.js.map +1 -1
  68. package/dist/chunks/kbd-CH9rYghB.es.js.map +1 -1
  69. package/dist/chunks/{link-QwdgCWJd.es.js → link-BEhlSTUU.es.js} +3 -3
  70. package/dist/chunks/{link-QwdgCWJd.es.js.map → link-BEhlSTUU.es.js.map} +1 -1
  71. package/dist/chunks/{localized-field-pJSLdod5.es.js → localized-field-D3G0Uy7Z.es.js} +8 -8
  72. package/dist/chunks/{localized-field-pJSLdod5.es.js.map → localized-field-D3G0Uy7Z.es.js.map} +1 -1
  73. package/dist/chunks/{menu-4QTf2m-7.es.js → menu-D-vE6ZpM.es.js} +4 -4
  74. package/dist/chunks/menu-D-vE6ZpM.es.js.map +1 -0
  75. package/dist/chunks/menu-DIepV2KZ.cjs.js.map +1 -1
  76. package/dist/chunks/{money-input-BJpffXRR.es.js → money-input-sk0Slpeu.es.js} +3 -3
  77. package/dist/chunks/{money-input-BJpffXRR.es.js.map → money-input-sk0Slpeu.es.js.map} +1 -1
  78. package/dist/chunks/{nimbus-provider-BfpEKy6w.es.js → nimbus-provider-BHNFDQ0f.es.js} +5 -5
  79. package/dist/chunks/{nimbus-provider-BfpEKy6w.es.js.map → nimbus-provider-BHNFDQ0f.es.js.map} +1 -1
  80. package/dist/chunks/{number-input-DXiwgboS.es.js → number-input-CktMxOdZ.es.js} +2 -2
  81. package/dist/chunks/{number-input-DXiwgboS.es.js.map → number-input-CktMxOdZ.es.js.map} +1 -1
  82. package/dist/chunks/{openLink-DT8XzqFh.es.js → openLink-CY66vjvW.es.js} +3 -3
  83. package/dist/chunks/{openLink-DT8XzqFh.es.js.map → openLink-CY66vjvW.es.js.map} +1 -1
  84. package/dist/chunks/{pagination-Sq1twv0k.es.js → pagination-Bcq69Nv3.es.js} +4 -4
  85. package/dist/chunks/{pagination-Sq1twv0k.es.js.map → pagination-Bcq69Nv3.es.js.map} +1 -1
  86. package/dist/chunks/{password-input-CBhC_e5Z.es.js → password-input-6MO4I-2j.es.js} +2 -2
  87. package/dist/chunks/{password-input-CBhC_e5Z.es.js.map → password-input-6MO4I-2j.es.js.map} +1 -1
  88. package/dist/chunks/popover-CfEq5G5-.cjs.js.map +1 -1
  89. package/dist/chunks/{popover-Cz6TnNt_.es.js → popover-DNaC7CwB.es.js} +2 -2
  90. package/dist/chunks/popover-DNaC7CwB.es.js.map +1 -0
  91. package/dist/chunks/{radio-input-DhqS9ipf.es.js → radio-input-4jw6HUjC.es.js} +2 -2
  92. package/dist/chunks/{radio-input-DhqS9ipf.es.js.map → radio-input-4jw6HUjC.es.js.map} +1 -1
  93. package/dist/chunks/{range-calendar-RBEpLQJb.es.js → range-calendar-DBpl6y5i.es.js} +5 -5
  94. package/dist/chunks/range-calendar-DBpl6y5i.es.js.map +1 -0
  95. package/dist/chunks/range-calendar-_dZfAsdG.cjs.js.map +1 -1
  96. package/dist/chunks/{rich-text-input-CrjP71KM.es.js → rich-text-input-BC8CBVio.es.js} +5 -5
  97. package/dist/chunks/rich-text-input-BC8CBVio.es.js.map +1 -0
  98. package/dist/chunks/rich-text-input-Da5WFZ3l.cjs.js.map +1 -1
  99. package/dist/chunks/{search-input-DCpjVXVS.es.js → search-input-DJy2NHYW.es.js} +3 -3
  100. package/dist/chunks/{search-input-DCpjVXVS.es.js.map → search-input-DJy2NHYW.es.js.map} +1 -1
  101. package/dist/chunks/{select-xlqMXZuO.es.js → select-BmMhTBo-.es.js} +9 -9
  102. package/dist/chunks/{select-xlqMXZuO.es.js.map → select-BmMhTBo-.es.js.map} +1 -1
  103. package/dist/chunks/separator-CvRn_J0r.cjs.js.map +1 -1
  104. package/dist/chunks/separator-DJGUFG-o.es.js.map +1 -1
  105. package/dist/chunks/split-button-BO52sL7h.cjs.js.map +1 -1
  106. package/dist/chunks/{split-button-C5MmKuVW.es.js → split-button-BxyZmuNi.es.js} +4 -4
  107. package/dist/chunks/split-button-BxyZmuNi.es.js.map +1 -0
  108. package/dist/chunks/{switch-B5bEl91n.es.js → switch-01hEhL9A.es.js} +2 -2
  109. package/dist/chunks/switch-01hEhL9A.es.js.map +1 -0
  110. package/dist/chunks/switch-CdLhBEPq.cjs.js.map +1 -1
  111. package/dist/chunks/tabs-CJ0OAUSR.cjs.js.map +1 -1
  112. package/dist/chunks/{tabs-DGzmzlun.es.js → tabs-Dhte-RCe.es.js} +4 -4
  113. package/dist/chunks/{tabs-DGzmzlun.es.js.map → tabs-Dhte-RCe.es.js.map} +1 -1
  114. package/dist/chunks/tag-group-Btt0egzG.cjs.js.map +1 -1
  115. package/dist/chunks/{tag-group-pJFnuRoJ.es.js → tag-group-D2dgXSsV.es.js} +9 -9
  116. package/dist/chunks/{tag-group-pJFnuRoJ.es.js.map → tag-group-D2dgXSsV.es.js.map} +1 -1
  117. package/dist/chunks/{time-input-BUej1BjY.es.js → time-input-DDrB_c0M.es.js} +2 -2
  118. package/dist/chunks/{time-input-BUej1BjY.es.js.map → time-input-DDrB_c0M.es.js.map} +1 -1
  119. package/dist/chunks/{toggle-button-CPzjUSI_.es.js → toggle-button-awb1jBf8.es.js} +2 -2
  120. package/dist/chunks/{toggle-button-CPzjUSI_.es.js.map → toggle-button-awb1jBf8.es.js.map} +1 -1
  121. package/dist/chunks/{toggle-button-group-DOxjowig.es.js → toggle-button-group-Ce7ezOED.es.js} +2 -2
  122. package/dist/chunks/{toggle-button-group-DOxjowig.es.js.map → toggle-button-group-Ce7ezOED.es.js.map} +1 -1
  123. package/dist/chunks/tooltip-BPTOkK7W.cjs.js.map +1 -1
  124. package/dist/chunks/tooltip-sgakxhiy.es.js.map +1 -1
  125. package/dist/chunks/{useButton-DkQVxdIF.es.js → useButton-_sJ3_8ha.es.js} +2 -2
  126. package/dist/chunks/{useButton-DkQVxdIF.es.js.map → useButton-_sJ3_8ha.es.js.map} +1 -1
  127. package/dist/chunks/{useDateFormatter-BkKCXbud.es.js → useDateFormatter-C4zVAL_K.es.js} +2 -2
  128. package/dist/chunks/{useDateFormatter-BkKCXbud.es.js.map → useDateFormatter-C4zVAL_K.es.js.map} +1 -1
  129. package/dist/chunks/{useGridListItem-Cosrmt8g.es.js → useGridListItem--iMluO7K.es.js} +4 -4
  130. package/dist/chunks/{useGridListItem-Cosrmt8g.es.js.map → useGridListItem--iMluO7K.es.js.map} +1 -1
  131. package/dist/chunks/{useListState-CUO8Wibt.es.js → useListState-Cf8n791-.es.js} +2 -2
  132. package/dist/chunks/{useListState-CUO8Wibt.es.js.map → useListState-Cf8n791-.es.js.map} +1 -1
  133. package/dist/chunks/{usePress-Bxb2-xLP.es.js → usePress-Dc6amhnJ.es.js} +2 -2
  134. package/dist/chunks/{usePress-Bxb2-xLP.es.js.map → usePress-Dc6amhnJ.es.js.map} +1 -1
  135. package/dist/chunks/{useSingleSelectListState-CnVWWOJD.es.js → useSingleSelectListState-DLY6K_dU.es.js} +2 -2
  136. package/dist/chunks/{useSingleSelectListState-CnVWWOJD.es.js.map → useSingleSelectListState-DLY6K_dU.es.js.map} +1 -1
  137. package/dist/chunks/{useToggle-CUMQAGyE.es.js → useToggle-CKEhqMIa.es.js} +2 -2
  138. package/dist/chunks/{useToggle-CUMQAGyE.es.js.map → useToggle-CKEhqMIa.es.js.map} +1 -1
  139. package/dist/components/accordion.es.js +1 -1
  140. package/dist/components/alert.es.js +1 -1
  141. package/dist/components/button.es.js +1 -1
  142. package/dist/components/calendar.es.js +1 -1
  143. package/dist/components/checkbox.es.js +1 -1
  144. package/dist/components/collapsible-motion.es.js +1 -1
  145. package/dist/components/combobox.es.js +1 -1
  146. package/dist/components/components.es.js +1 -1
  147. package/dist/components/data-table.es.js +1 -1
  148. package/dist/components/date-input.es.js +1 -1
  149. package/dist/components/date-picker.es.js +1 -1
  150. package/dist/components/date-range-picker.es.js +1 -1
  151. package/dist/components/dialog.es.js +1 -1
  152. package/dist/components/draggable-list.es.js +1 -1
  153. package/dist/components/drawer.es.js +1 -1
  154. package/dist/components/form-field.es.js +1 -1
  155. package/dist/components/icon-button.es.js +1 -1
  156. package/dist/components/icon-toggle-button.es.js +1 -1
  157. package/dist/components/link.es.js +1 -1
  158. package/dist/components/localized-field.es.js +1 -1
  159. package/dist/components/money-input.es.js +1 -1
  160. package/dist/components/nimbus-provider.es.js +1 -1
  161. package/dist/components/number-input.es.js +1 -1
  162. package/dist/components/pagination.es.js +1 -1
  163. package/dist/components/password-input.es.js +1 -1
  164. package/dist/components/popover.es.js +1 -1
  165. package/dist/components/radio-input.es.js +1 -1
  166. package/dist/components/range-calendar.es.js +1 -1
  167. package/dist/components/rich-text-input.es.js +1 -1
  168. package/dist/components/scoped-search-input.es.js +2 -2
  169. package/dist/components/search-input.es.js +1 -1
  170. package/dist/components/select.es.js +1 -1
  171. package/dist/components/split-button.es.js +1 -1
  172. package/dist/components/switch.es.js +1 -1
  173. package/dist/components/tabs.es.js +1 -1
  174. package/dist/components/tag-group.es.js +1 -1
  175. package/dist/components/time-input.es.js +1 -1
  176. package/dist/components/toggle-button-group.es.js +1 -1
  177. package/dist/components/toggle-button.es.js +1 -1
  178. package/dist/index.cjs +1 -1
  179. package/dist/index.cjs.map +1 -1
  180. package/dist/index.d.ts +34 -0
  181. package/dist/index.es.js +203 -198
  182. package/dist/index.es.js.map +1 -1
  183. package/package.json +1 -1
  184. package/dist/chunks/accordion-DSLccfDW.es.js.map +0 -1
  185. package/dist/chunks/calendar-BTdHdh7y.es.js.map +0 -1
  186. package/dist/chunks/collapsible-motion-OOUmjdKw.es.js.map +0 -1
  187. package/dist/chunks/menu-4QTf2m-7.es.js.map +0 -1
  188. package/dist/chunks/popover-Cz6TnNt_.es.js.map +0 -1
  189. package/dist/chunks/range-calendar-RBEpLQJb.es.js.map +0 -1
  190. package/dist/chunks/rich-text-input-CrjP71KM.es.js.map +0 -1
  191. package/dist/chunks/split-button-C5MmKuVW.es.js.map +0 -1
  192. package/dist/chunks/switch-B5bEl91n.es.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"accordion-DSLccfDW.es.js","sources":["../../../../node_modules/.pnpm/@react-stately+disclosure@3.0.8_react@19.1.0/node_modules/@react-stately/disclosure/dist/useDisclosureGroupState.mjs","../../../../node_modules/.pnpm/react-aria-components@1.13.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/react-aria-components/dist/Disclosure.mjs","../../src/components/accordion/accordion.slots.tsx","../../src/components/accordion/components/accordion-root.tsx","../../src/components/accordion/components/accordion-header.tsx","../../src/components/accordion/components/accordion-content.tsx","../../src/components/accordion/components/accordion-item.tsx","../../src/components/accordion/accordion.tsx"],"sourcesContent":["import {useControlledState as $j4gLc$useControlledState} from \"@react-stately/utils\";\nimport {useMemo as $j4gLc$useMemo, useEffect as $j4gLc$useEffect} from \"react\";\n\n/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\nfunction $9385b3affbdec831$export$f36461af0ef4707d(props) {\n let { allowsMultipleExpanded: allowsMultipleExpanded = false, isDisabled: isDisabled = false } = props;\n let [expandedKeys, setExpandedKeys] = (0, $j4gLc$useControlledState)((0, $j4gLc$useMemo)(()=>props.expandedKeys ? new Set(props.expandedKeys) : undefined, [\n props.expandedKeys\n ]), (0, $j4gLc$useMemo)(()=>props.defaultExpandedKeys ? new Set(props.defaultExpandedKeys) : new Set(), [\n props.defaultExpandedKeys\n ]), props.onExpandedChange);\n (0, $j4gLc$useEffect)(()=>{\n // Ensure only one item is expanded if allowsMultipleExpanded is false.\n if (!allowsMultipleExpanded && expandedKeys.size > 1) {\n let firstKey = expandedKeys.values().next().value;\n if (firstKey != null) setExpandedKeys(new Set([\n firstKey\n ]));\n }\n });\n return {\n allowsMultipleExpanded: allowsMultipleExpanded,\n isDisabled: isDisabled,\n expandedKeys: expandedKeys,\n setExpandedKeys: setExpandedKeys,\n toggleKey (key) {\n let keys;\n if (allowsMultipleExpanded) {\n keys = new Set(expandedKeys);\n if (keys.has(key)) keys.delete(key);\n else keys.add(key);\n } else keys = new Set(expandedKeys.has(key) ? [] : [\n key\n ]);\n setExpandedKeys(keys);\n }\n };\n}\n\n\nexport {$9385b3affbdec831$export$f36461af0ef4707d as useDisclosureGroupState};\n//# sourceMappingURL=useDisclosureGroupState.module.js.map\n","import {ButtonContext as $d2b4bc8c273e7be6$export$24d547caef80ccd1} from \"./Button.mjs\";\nimport {DEFAULT_SLOT as $64fa3d84918910a7$export$c62b8e45d58ddad9, Provider as $64fa3d84918910a7$export$2881499e37b75b9a, useContextProps as $64fa3d84918910a7$export$29f1550f4b0d4415, useRenderProps as $64fa3d84918910a7$export$4d86445c2cf5e3} from \"./utils.mjs\";\nimport {useDisclosure as $hI1OT$useDisclosure, useFocusRing as $hI1OT$useFocusRing} from \"react-aria\";\nimport {useDisclosureGroupState as $hI1OT$useDisclosureGroupState, useDisclosureState as $hI1OT$useDisclosureState} from \"react-stately\";\nimport {filterDOMProps as $hI1OT$filterDOMProps, useId as $hI1OT$useId, mergeProps as $hI1OT$mergeProps, mergeRefs as $hI1OT$mergeRefs} from \"@react-aria/utils\";\nimport $hI1OT$react, {createContext as $hI1OT$createContext, forwardRef as $hI1OT$forwardRef, useContext as $hI1OT$useContext} from \"react\";\n\n/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\n\n\n\n\nconst $28f4fd908f0de97f$export$1d40e3e0cc4d5de = /*#__PURE__*/ (0, $hI1OT$createContext)(null);\nconst $28f4fd908f0de97f$export$944aceb4f8c89f10 = /*#__PURE__*/ (0, $hI1OT$forwardRef)(function DisclosureGroup(props, ref) {\n let state = (0, $hI1OT$useDisclosureGroupState)(props);\n let renderProps = (0, $64fa3d84918910a7$export$4d86445c2cf5e3)({\n ...props,\n defaultClassName: 'react-aria-DisclosureGroup',\n values: {\n isDisabled: state.isDisabled,\n state: state\n }\n });\n let domProps = (0, $hI1OT$filterDOMProps)(props, {\n global: true\n });\n return /*#__PURE__*/ (0, $hI1OT$react).createElement(\"div\", {\n ...domProps,\n ...renderProps,\n ref: ref,\n \"data-disabled\": props.isDisabled || undefined\n }, /*#__PURE__*/ (0, $hI1OT$react).createElement($28f4fd908f0de97f$export$1d40e3e0cc4d5de.Provider, {\n value: state\n }, renderProps.children));\n});\nconst $28f4fd908f0de97f$export$d665dd135a51b28a = /*#__PURE__*/ (0, $hI1OT$createContext)(null);\nconst $28f4fd908f0de97f$export$dab3ea4a6ef094da = /*#__PURE__*/ (0, $hI1OT$createContext)(null);\nconst $28f4fd908f0de97f$var$InternalDisclosureContext = /*#__PURE__*/ (0, $hI1OT$createContext)(null);\nconst $28f4fd908f0de97f$export$74a362b31437ec83 = /*#__PURE__*/ (0, $hI1OT$forwardRef)(function Disclosure(props, ref) {\n [props, ref] = (0, $64fa3d84918910a7$export$29f1550f4b0d4415)(props, ref, $28f4fd908f0de97f$export$d665dd135a51b28a);\n let groupState = (0, $hI1OT$useContext)($28f4fd908f0de97f$export$1d40e3e0cc4d5de);\n let { id: id, ...otherProps } = props;\n // Generate an id if one wasn't provided.\n // (can't pass id into useId since it can also be a number)\n let defaultId = (0, $hI1OT$useId)();\n id || (id = defaultId);\n let isExpanded = groupState ? groupState.expandedKeys.has(id) : props.isExpanded;\n let state = (0, $hI1OT$useDisclosureState)({\n ...props,\n isExpanded: isExpanded,\n onExpandedChange (isExpanded) {\n var _props_onExpandedChange;\n if (groupState) groupState.toggleKey(id);\n (_props_onExpandedChange = props.onExpandedChange) === null || _props_onExpandedChange === void 0 ? void 0 : _props_onExpandedChange.call(props, isExpanded);\n }\n });\n let panelRef = (0, $hI1OT$react).useRef(null);\n let isDisabled = props.isDisabled || (groupState === null || groupState === void 0 ? void 0 : groupState.isDisabled) || false;\n let { buttonProps: buttonProps, panelProps: panelProps } = (0, $hI1OT$useDisclosure)({\n ...props,\n isExpanded: isExpanded,\n isDisabled: isDisabled\n }, state, panelRef);\n let { isFocusVisible: isFocusVisibleWithin, focusProps: focusWithinProps } = (0, $hI1OT$useFocusRing)({\n within: true\n });\n let renderProps = (0, $64fa3d84918910a7$export$4d86445c2cf5e3)({\n ...props,\n id: undefined,\n defaultClassName: 'react-aria-Disclosure',\n values: {\n isExpanded: state.isExpanded,\n isDisabled: isDisabled,\n isFocusVisibleWithin: isFocusVisibleWithin,\n state: state\n }\n });\n let domProps = (0, $hI1OT$filterDOMProps)(otherProps, {\n global: true\n });\n return /*#__PURE__*/ (0, $hI1OT$react).createElement((0, $64fa3d84918910a7$export$2881499e37b75b9a), {\n values: [\n [\n (0, $d2b4bc8c273e7be6$export$24d547caef80ccd1),\n {\n slots: {\n [(0, $64fa3d84918910a7$export$c62b8e45d58ddad9)]: {},\n trigger: buttonProps\n }\n }\n ],\n [\n $28f4fd908f0de97f$var$InternalDisclosureContext,\n {\n panelProps: panelProps,\n panelRef: panelRef\n }\n ],\n [\n $28f4fd908f0de97f$export$dab3ea4a6ef094da,\n state\n ]\n ]\n }, /*#__PURE__*/ (0, $hI1OT$react).createElement(\"div\", {\n ...(0, $hI1OT$mergeProps)(domProps, renderProps, focusWithinProps),\n ref: ref,\n \"data-expanded\": state.isExpanded || undefined,\n \"data-disabled\": isDisabled || undefined,\n \"data-focus-visible-within\": isFocusVisibleWithin || undefined\n }, renderProps.children));\n});\nconst $28f4fd908f0de97f$export$feabaa331e1d464c = /*#__PURE__*/ (0, $hI1OT$forwardRef)(function DisclosurePanel(props, ref) {\n let { role: role = 'group' } = props;\n let { panelProps: panelProps, panelRef: panelRef } = (0, $hI1OT$useContext)($28f4fd908f0de97f$var$InternalDisclosureContext);\n let { isFocusVisible: isFocusVisibleWithin, focusProps: focusWithinProps } = (0, $hI1OT$useFocusRing)({\n within: true\n });\n let renderProps = (0, $64fa3d84918910a7$export$4d86445c2cf5e3)({\n ...props,\n defaultClassName: 'react-aria-DisclosurePanel',\n values: {\n isFocusVisibleWithin: isFocusVisibleWithin\n }\n });\n let DOMProps = (0, $hI1OT$filterDOMProps)(props, {\n global: true\n });\n return /*#__PURE__*/ (0, $hI1OT$react).createElement(\"div\", {\n ...(0, $hI1OT$mergeProps)(DOMProps, renderProps, panelProps, focusWithinProps),\n ref: (0, $hI1OT$mergeRefs)(ref, panelRef),\n role: role,\n \"data-focus-visible-within\": isFocusVisibleWithin || undefined\n }, /*#__PURE__*/ (0, $hI1OT$react).createElement((0, $64fa3d84918910a7$export$2881499e37b75b9a), {\n values: [\n [\n (0, $d2b4bc8c273e7be6$export$24d547caef80ccd1),\n null\n ]\n ]\n }, props.children));\n});\n\n\nexport {$28f4fd908f0de97f$export$1d40e3e0cc4d5de as DisclosureGroupStateContext, $28f4fd908f0de97f$export$944aceb4f8c89f10 as DisclosureGroup, $28f4fd908f0de97f$export$d665dd135a51b28a as DisclosureContext, $28f4fd908f0de97f$export$dab3ea4a6ef094da as DisclosureStateContext, $28f4fd908f0de97f$export$74a362b31437ec83 as Disclosure, $28f4fd908f0de97f$export$feabaa331e1d464c as DisclosurePanel};\n//# sourceMappingURL=Disclosure.module.js.map\n","import {\n createSlotRecipeContext,\n type HTMLChakraProps,\n} from \"@chakra-ui/react\";\nimport type { AccordionRootSlotProps } from \"./accordion.types\";\nimport type { SlotComponent } from \"../utils/slot-types\";\n\nconst { withProvider, withContext } = createSlotRecipeContext({\n key: \"accordion\",\n});\n\nexport const AccordionRootSlot: SlotComponent<\n HTMLDivElement,\n AccordionRootSlotProps\n> = withProvider<HTMLDivElement, AccordionRootSlotProps>(\"div\", \"root\");\n\nexport const AccordionDisclosureSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"disclosure\");\n\nexport const AccordionTriggerSlot = withContext<\n HTMLButtonElement,\n HTMLChakraProps<\"button\">\n>(\"button\", \"trigger\");\n\nexport const AccordionPanelSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"panel\");\n\nexport const AccordionTitleSlot = withContext<\n HTMLButtonElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"accordionTitle\");\n\nexport const AccordionHeaderRightContentSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"headerContentRight\");\n","import { AccordionRootSlot } from \"../accordion.slots\";\nimport { useSlotRecipe } from \"@chakra-ui/react/styled-system\";\nimport { DisclosureGroup as RaDisclosureGroup } from \"react-aria-components\";\nimport type { AccordionRootProps } from \"../accordion.types\";\nimport { extractStyleProps } from \"@/utils/extractStyleProps\";\n\n/**\n * # Accordion\n *\n * Displays an Accordion.\n *\n * @see {@link https://nimbus-documentation.vercel.app/components/navigation/accordion}\n */\nexport const AccordionRoot = (props: AccordionRootProps) => {\n const { ref, ...restProps } = props;\n const recipe = useSlotRecipe({ key: \"accordion\" });\n const [recipeProps, restRecipeProps] = recipe.splitVariantProps(restProps);\n const [styleProps, raProps] = extractStyleProps(restRecipeProps);\n\n return (\n <AccordionRootSlot ref={ref} {...recipeProps} {...styleProps} asChild>\n <RaDisclosureGroup {...raProps} />\n </AccordionRootSlot>\n );\n};\n","import React, { useMemo } from \"react\";\nimport {\n AccordionTriggerSlot,\n AccordionTitleSlot,\n AccordionHeaderRightContentSlot,\n} from \"../accordion.slots\";\nimport { Flex } from \"@/components\";\nimport { KeyboardArrowRight } from \"@commercetools/nimbus-icons\";\nimport { Button as RaButton } from \"react-aria-components\";\nimport type { AccordionHeaderProps } from \"../accordion.types\";\nimport { extractStyleProps } from \"@/utils/extractStyleProps\";\n\nexport const AccordionHeader = ({\n children,\n ref,\n ...props\n}: AccordionHeaderProps) => {\n const [styleProps, restProps] = extractStyleProps(props);\n // Extract HeaderRightContent if present\n const headerContent = useMemo(() => {\n const main: React.ReactNode[] = [];\n const rightContent: React.ReactNode[] = [];\n\n React.Children.forEach(children, (child) => {\n if (\n React.isValidElement(child) &&\n child.type === AccordionHeaderRightContentSlot\n ) {\n rightContent.push(child);\n } else {\n main.push(child);\n }\n });\n\n return { main, rightContent };\n }, [children]);\n\n return (\n <Flex\n justifyContent=\"space-between\"\n alignItems=\"center\"\n borderBottom=\"solid-25\"\n borderColor=\"neutral.4\"\n {...styleProps}\n >\n <AccordionTriggerSlot ref={ref} slot=\"trigger\" asChild>\n <RaButton {...restProps}>\n <KeyboardArrowRight />\n <AccordionTitleSlot>{headerContent.main}</AccordionTitleSlot>\n </RaButton>\n </AccordionTriggerSlot>\n {headerContent.rightContent.length > 0 && (\n <AccordionHeaderRightContentSlot>\n {headerContent.rightContent}\n </AccordionHeaderRightContentSlot>\n )}\n </Flex>\n );\n};\n","import { AccordionPanelSlot } from \"../accordion.slots\";\nimport { DisclosurePanel as RaDisclosurePanel } from \"react-aria-components\";\nimport type { AccordionContentProps } from \"../accordion.types\";\nimport { extractStyleProps } from \"@/utils/extractStyleProps\";\n\n// Create Content component\nexport const AccordionContent = ({\n children,\n ref,\n ...props\n}: AccordionContentProps) => {\n const [styleProps, restProps] = extractStyleProps(props);\n\n return (\n <AccordionPanelSlot ref={ref} {...styleProps} asChild>\n <RaDisclosurePanel {...restProps}>{children}</RaDisclosurePanel>\n </AccordionPanelSlot>\n );\n};\n","import { AccordionDisclosureSlot } from \"../accordion.slots\";\nimport { Disclosure as RaDisclosure } from \"react-aria-components\";\nimport type { AccordionItemProps } from \"../accordion.types\";\nimport { extractStyleProps } from \"@/utils/extractStyleProps\";\n\nexport const AccordionItem = ({\n children,\n value,\n ref,\n ...props\n}: AccordionItemProps) => {\n const [styleProps, restProps] = extractStyleProps(props);\n const disclosureProps = {\n ...restProps,\n id: value, // React Aria uses id for the key\n };\n\n return (\n <AccordionDisclosureSlot\n data-value={value}\n ref={ref}\n {...styleProps}\n asChild\n >\n <RaDisclosure {...disclosureProps}>{children}</RaDisclosure>\n </AccordionDisclosureSlot>\n );\n};\n","import { AccordionHeaderRightContentSlot } from \"./accordion.slots\";\nimport { AccordionRoot } from \"./components/accordion-root\";\nimport { AccordionHeader } from \"./components/accordion-header\";\nimport { AccordionContent } from \"./components/accordion-content\";\nimport { AccordionItem } from \"./components/accordion-item\";\n\n// Create the Accordion namespace object as an object literal\nexport const Accordion = {\n Root: AccordionRoot,\n Item: AccordionItem,\n Header: AccordionHeader,\n Content: AccordionContent,\n HeaderRightContent: AccordionHeaderRightContentSlot,\n};\n\nexport {\n AccordionRoot as _AccordionRoot,\n AccordionItem as _AccordionItem,\n AccordionHeader as _AccordionHeader,\n AccordionContent as _AccordionContent,\n AccordionHeaderRightContentSlot as _AccordionHeaderRightContent,\n};\n"],"names":["$9385b3affbdec831$export$f36461af0ef4707d","props","allowsMultipleExpanded","isDisabled","expandedKeys","setExpandedKeys","$j4gLc$useControlledState","$j4gLc$useMemo","$j4gLc$useEffect","firstKey","key","keys","$28f4fd908f0de97f$export$1d40e3e0cc4d5de","$hI1OT$createContext","$28f4fd908f0de97f$export$944aceb4f8c89f10","$hI1OT$forwardRef","ref","state","$hI1OT$useDisclosureGroupState","renderProps","$64fa3d84918910a7$export$4d86445c2cf5e3","domProps","$hI1OT$filterDOMProps","$hI1OT$react","$28f4fd908f0de97f$export$d665dd135a51b28a","$28f4fd908f0de97f$export$dab3ea4a6ef094da","$28f4fd908f0de97f$var$InternalDisclosureContext","$28f4fd908f0de97f$export$74a362b31437ec83","$64fa3d84918910a7$export$29f1550f4b0d4415","groupState","$hI1OT$useContext","id","otherProps","defaultId","$hI1OT$useId","isExpanded","$hI1OT$useDisclosureState","_props_onExpandedChange","panelRef","buttonProps","panelProps","$hI1OT$useDisclosure","isFocusVisibleWithin","focusWithinProps","$hI1OT$useFocusRing","$64fa3d84918910a7$export$2881499e37b75b9a","$d2b4bc8c273e7be6$export$24d547caef80ccd1","$64fa3d84918910a7$export$c62b8e45d58ddad9","$hI1OT$mergeProps","$28f4fd908f0de97f$export$feabaa331e1d464c","role","DOMProps","$hI1OT$mergeRefs","withProvider","withContext","createSlotRecipeContext","AccordionRootSlot","AccordionDisclosureSlot","AccordionTriggerSlot","AccordionPanelSlot","AccordionTitleSlot","AccordionHeaderRightContentSlot","AccordionRoot","restProps","recipe","useSlotRecipe","recipeProps","restRecipeProps","styleProps","raProps","extractStyleProps","jsx","RaDisclosureGroup","AccordionHeader","children","headerContent","useMemo","main","rightContent","React","child","jsxs","Flex","RaButton","KeyboardArrowRight","AccordionContent","RaDisclosurePanel","AccordionItem","value","disclosureProps","RaDisclosure","Accordion"],"mappings":";;;;;;;;;;;;;;AAeA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EAC/B,UAAAX;AAAA,EACA,KAAA1D;AAAA,EACA,GAAGf;AACL,MAA6B;AAC3B,QAAM,CAACmE,GAAYL,CAAS,IAAIO,EAAkBrE,CAAK;AAEvD,SACE,gBAAAsE,EAACZ,IAAA,EAAmB,KAAA3C,GAAW,GAAGoD,GAAY,SAAO,IACnD,UAAA,gBAAAG,EAACe,IAAA,EAAmB,GAAGvB,GAAY,UAAAW,EAAA,CAAS,GAC9C;AAEJ,GCbaa,KAAgB,CAAC;AAAA,EAC5B,UAAAb;AAAA,EACA,OAAAc;AAAA,EACA,KAAAxE;AAAA,EACA,GAAGf;AACL,MAA0B;AACxB,QAAM,CAACmE,GAAYL,CAAS,IAAIO,EAAkBrE,CAAK,GACjDwF,IAAkB;AAAA,IACtB,GAAG1B;AAAA,IACH,IAAIyB;AAAA;AAAA,EAAA;AAGN,SACE,gBAAAjB;AAAA,IAACd;AAAA,IAAA;AAAA,MACC,cAAY+B;AAAA,MACZ,KAAAxE;AAAA,MACC,GAAGoD;AAAA,MACJ,SAAO;AAAA,MAEP,UAAA,gBAAAG,EAACmB,IAAA,EAAc,GAAGD,GAAkB,UAAAf,EAAA,CAAS;AAAA,IAAA;AAAA,EAAA;AAGnD,GCpBaiB,KAAY;AAAA,EACvB,MAAM7B;AAAA,EACN,MAAMyB;AAAA,EACN,QAAQd;AAAA,EACR,SAASY;AAAA,EACT,oBAAoBxB;AACtB;","x_google_ignoreList":[0,1]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"calendar-BTdHdh7y.es.js","sources":["../../src/components/calendar/calendar.slots.tsx","../../src/components/calendar/components/calendar.grids.tsx","../../src/components/calendar/components/calendar.header.tsx","../../src/components/calendar/components/calendar.custom-context.tsx","../../src/components/calendar/calendar.tsx"],"sourcesContent":["import { createSlotRecipeContext } from \"@chakra-ui/react\";\nimport type {\n CalendarCellSlotProps,\n CalendarGridBodySlotProps,\n CalendarGridHeaderSlotProps,\n CalendarGridSlotProps,\n CalendarGridsSlotProps,\n CalendarHeaderCellSlotProps,\n CalendarHeaderSlotProps,\n CalendarMonthTitleSlotProps,\n CalendarRootSlotProps,\n} from \"./calendar.types\";\nimport type { SlotComponent } from \"../utils/slot-types\";\n\nconst { withProvider, withContext } = createSlotRecipeContext({\n key: \"calendar\",\n});\n\nexport const CalendarRootSlot: SlotComponent<\n HTMLDivElement,\n CalendarRootSlotProps\n> = withProvider<HTMLDivElement, CalendarRootSlotProps>(\"div\", \"root\");\n\nexport const CalendarHeaderSlot = withContext<\n HTMLDivElement,\n CalendarHeaderSlotProps\n>(\"div\", \"header\");\n\nexport const CalendarGridsSlot = withContext<\n HTMLDivElement,\n CalendarGridsSlotProps\n>(\"div\", \"grids\");\n\nexport const CalendarMonthTitleSlot = withContext<\n HTMLDivElement,\n CalendarMonthTitleSlotProps\n>(\"div\", \"monthTitle\");\n\nexport const CalendarGridSlot = withContext<\n HTMLTableElement,\n CalendarGridSlotProps\n>(\"table\", \"grid\");\n\nexport const CalendarGridHeaderSlot = withContext<\n HTMLTableSectionElement,\n CalendarGridHeaderSlotProps\n>(\"thead\", \"gridHeader\");\n\nexport const CalendarHeaderCellSlot = withContext<\n HTMLTableCellElement,\n CalendarHeaderCellSlotProps\n>(\"th\", \"headerCell\");\n\nexport const CalendarGridBodySlot = withContext<\n HTMLTableSectionElement,\n CalendarGridBodySlotProps\n>(\"tbody\", \"gridBody\");\n\nexport const CalendarCellSlot = withContext<\n HTMLTableCellElement,\n CalendarCellSlotProps\n>(\"td\", \"bodyCell\");\n","import { useContext } from \"react\";\nimport { today, getLocalTimeZone } from \"@internationalized/date\";\nimport {\n CalendarGrid as RaCalendarGrid,\n CalendarGridBody as RaCalendarGridBody,\n CalendarGridHeader as RaCalendarGridHeader,\n CalendarHeaderCell as RaCalendarHeaderCell,\n CalendarCell as RaCalendarCell,\n useSlottedContext,\n CalendarContext,\n CalendarStateContext,\n useLocale,\n} from \"react-aria-components\";\n\nimport { Box } from \"@/components\";\n\nimport {\n CalendarCellSlot,\n CalendarGridBodySlot,\n CalendarGridHeaderSlot,\n CalendarGridSlot,\n CalendarGridsSlot,\n CalendarHeaderCellSlot,\n CalendarMonthTitleSlot,\n} from \"../calendar.slots\";\n\nexport const CalendarGrids = () => {\n const { locale } = useLocale();\n const context = useSlottedContext(CalendarContext);\n const calendarState = useContext(CalendarStateContext)!;\n const visibleMonthsCount = context?.visibleDuration?.months || 1;\n const todayDate = today(getLocalTimeZone());\n const showMonthTitles = visibleMonthsCount > 1;\n\n return (\n <CalendarGridsSlot>\n {Array.from({ length: visibleMonthsCount }, (_, index) => {\n const gridDate = calendarState.visibleRange.start.add({\n months: index,\n });\n const monthName = new Intl.DateTimeFormat(locale, {\n month: \"long\",\n }).format(gridDate.toDate(getLocalTimeZone()));\n\n return (\n <Box\n key={monthName}\n width={visibleMonthsCount == 1 ? \"full\" : \"auto\"}\n >\n {showMonthTitles && (\n <CalendarMonthTitleSlot>{monthName}</CalendarMonthTitleSlot>\n )}\n <CalendarGridSlot asChild>\n <RaCalendarGrid offset={{ months: index }} weekdayStyle=\"short\">\n <CalendarGridHeaderSlot asChild>\n <RaCalendarGridHeader>\n {(day) => (\n <CalendarHeaderCellSlot asChild>\n <RaCalendarHeaderCell>{day}</RaCalendarHeaderCell>\n </CalendarHeaderCellSlot>\n )}\n </RaCalendarGridHeader>\n </CalendarGridHeaderSlot>\n <CalendarGridBodySlot asChild>\n <RaCalendarGridBody>\n {(date) => {\n const isToday = date.compare(todayDate) === 0;\n return (\n <CalendarCellSlot asChild data-today={isToday}>\n <RaCalendarCell date={date} />\n </CalendarCellSlot>\n );\n }}\n </RaCalendarGridBody>\n </CalendarGridBodySlot>\n </RaCalendarGrid>\n </CalendarGridSlot>\n </Box>\n );\n })}\n </CalendarGridsSlot>\n );\n};\n","import {\n CalendarContext,\n Heading,\n useSlottedContext,\n} from \"react-aria-components\";\nimport {\n Box,\n Flex,\n IconButton,\n Stack,\n Text,\n VisuallyHidden,\n} from \"@/components\";\nimport {\n KeyboardArrowLeft,\n KeyboardArrowRight,\n} from \"@commercetools/nimbus-icons\";\nimport { CalendarHeaderSlot } from \"../calendar.slots\";\n\nexport const CalendarHeader = () => {\n const calendarProps = useSlottedContext(CalendarContext);\n\n // Needed to decide wether to show a single month or a range\n const visibleDurationMonths = calendarProps?.visibleDuration?.months || 1;\n const showRangeLabel = visibleDurationMonths > 1;\n\n return (\n <CalendarHeaderSlot>\n <Flex>\n <Stack direction=\"row\" alignItems=\"center\">\n {/** solely for screen readers, if not present, a11y issues are raised */}\n <VisuallyHidden>\n <Heading />\n </VisuallyHidden>\n {/* @ts-expect-error - custom-context will add aria-label via the \"slot\" prop */}\n <IconButton\n slot={showRangeLabel ? \"previous\" : \"previous-month\"}\n size=\"xs\"\n variant=\"ghost\"\n tone=\"primary\"\n >\n <KeyboardArrowLeft />\n </IconButton>\n <Text\n textStyle=\"sm\"\n fontWeight=\"500\"\n color=\"neutral.11\"\n width={showRangeLabel ? \"4000\" : \"2000\"}\n textAlign=\"center\"\n aria-hidden=\"true\"\n slot={showRangeLabel ? \"monthRange\" : \"month\"}\n />\n {/* @ts-expect-error - custom-context will add aria-label via the \"slot\" prop */}\n <IconButton\n slot={showRangeLabel ? \"next\" : \"next-month\"}\n size=\"xs\"\n variant=\"ghost\"\n tone=\"primary\"\n >\n <KeyboardArrowRight />\n </IconButton>\n </Stack>\n <Box flexGrow=\"1\" />\n <Stack direction=\"row\" alignItems=\"center\">\n {/* @ts-expect-error - custom-context will add aria-label via the \"slot\" prop */}\n <IconButton\n slot=\"previous-year\"\n size=\"xs\"\n variant=\"ghost\"\n tone=\"primary\"\n >\n <KeyboardArrowLeft />\n </IconButton>\n <Text\n textStyle=\"sm\"\n fontWeight=\"500\"\n color=\"neutral.11\"\n width=\"1400\"\n textAlign=\"center\"\n aria-hidden=\"true\"\n slot=\"year\"\n />\n {/* @ts-expect-error - custom-context will add aria-label via the \"slot\" prop */}\n <IconButton slot=\"next-year\" size=\"xs\" variant=\"ghost\" tone=\"primary\">\n <KeyboardArrowRight />\n </IconButton>\n </Stack>\n </Flex>\n </CalendarHeaderSlot>\n );\n};\n","import { getLocalTimeZone } from \"@internationalized/date\";\nimport { useContext } from \"react\";\nimport {\n Provider,\n ButtonContext,\n CalendarStateContext,\n TextContext,\n useLocale,\n} from \"react-aria-components\";\n\nexport const CalendarCustomContext = ({\n children,\n}: {\n children: React.ReactNode;\n}) => {\n const { locale } = useLocale();\n const buttonContext = useContext(ButtonContext)!;\n const textContext = useContext(TextContext)!;\n const calendarState = useContext(CalendarStateContext)!;\n\n /**\n * Button slots\n * ================================\n */\n const buttonSlots = {\n \"next-month\": {\n onPress: () => calendarState.focusNextSection(),\n \"aria-label\": \"Next month\",\n },\n \"previous-month\": {\n onPress: () => calendarState.focusPreviousSection(),\n \"aria-label\": \"Previous month\",\n },\n \"next-year\": {\n onPress: () => calendarState.focusNextSection(true),\n \"aria-label\": \"Next year\",\n },\n \"previous-year\": {\n onPress: () => calendarState.focusPreviousSection(true),\n \"aria-label\": \"Previous year\",\n },\n };\n\n /**\n * Text slots\n * ================================\n */\n const monthLabel = new Intl.DateTimeFormat(locale, {\n month: \"long\",\n }).format(calendarState.focusedDate.toDate(getLocalTimeZone()));\n\n const monthRangeLabel = [\n new Intl.DateTimeFormat(locale, {\n month: \"long\",\n }).format(calendarState.visibleRange.start.toDate(getLocalTimeZone())),\n new Intl.DateTimeFormat(locale, {\n month: \"long\",\n }).format(calendarState.visibleRange.end.toDate(getLocalTimeZone())),\n ].join(\" - \");\n\n const yearLabel = new Intl.DateTimeFormat(locale, {\n year: \"numeric\",\n }).format(calendarState.focusedDate.toDate(getLocalTimeZone()));\n\n const textSlots = {\n month: { children: monthLabel },\n monthRange: { children: monthRangeLabel },\n year: { children: yearLabel },\n };\n\n return (\n <Provider\n values={[\n [\n ButtonContext,\n {\n ...buttonContext,\n slots: {\n ...(buttonContext &&\n typeof buttonContext === \"object\" &&\n \"slots\" in buttonContext\n ? buttonContext.slots\n : {}),\n ...buttonSlots,\n },\n },\n ],\n [\n TextContext,\n {\n ...textContext,\n slots: {\n ...(textContext &&\n typeof textContext === \"object\" &&\n \"slots\" in textContext\n ? textContext.slots\n : {}),\n ...textSlots,\n },\n },\n ],\n ]}\n >\n {children}\n </Provider>\n );\n};\n","import type { CalendarProps } from \"./calendar.types\";\nimport type { DateValue } from \"react-aria\";\n\nimport { Calendar as RaCalendar } from \"react-aria-components\";\n\nimport { CalendarRootSlot } from \"./calendar.slots\";\nimport { CalendarGrids } from \"./components/calendar.grids\";\nimport { CalendarHeader } from \"./components/calendar.header\";\nimport { calendarSlotRecipe } from \"./calendar.recipe\";\nimport { useRecipe } from \"@chakra-ui/react/styled-system\";\nimport { extractStyleProps } from \"@/utils/extractStyleProps\";\nimport { CalendarCustomContext } from \"./components/calendar.custom-context\";\n\n/**\n * # Calendar\n *\n * Calendars display a grid of days in one or more months and allow users to select a single date.\n *\n * @see {@link https://nimbus-documentation.vercel.app/components/inputs/calendar}\n */\nexport const Calendar = (props: CalendarProps<DateValue>) => {\n const recipe = useRecipe({ recipe: calendarSlotRecipe });\n const [recipeProps, remainingProps] = recipe.splitVariantProps(props);\n const [styleProps, otherProps] = extractStyleProps(remainingProps);\n\n return (\n <CalendarRootSlot {...recipeProps} {...styleProps} asChild>\n <RaCalendar {...otherProps}>\n <CalendarCustomContext>\n <CalendarHeader />\n <CalendarGrids />\n </CalendarCustomContext>\n </RaCalendar>\n </CalendarRootSlot>\n );\n};\n"],"names":["withProvider","withContext","createSlotRecipeContext","CalendarRootSlot","CalendarHeaderSlot","CalendarGridsSlot","CalendarMonthTitleSlot","CalendarGridSlot","CalendarGridHeaderSlot","CalendarHeaderCellSlot","CalendarGridBodySlot","CalendarCellSlot","CalendarGrids","locale","useLocale","context","useSlottedContext","CalendarContext","calendarState","useContext","CalendarStateContext","visibleMonthsCount","todayDate","today","getLocalTimeZone","showMonthTitles","jsx","_","index","gridDate","monthName","jsxs","Box","RaCalendarGrid","RaCalendarGridHeader","day","RaCalendarHeaderCell","RaCalendarGridBody","date","isToday","RaCalendarCell","CalendarHeader","showRangeLabel","Flex","Stack","VisuallyHidden","Heading","IconButton","KeyboardArrowLeft","Text","KeyboardArrowRight","CalendarCustomContext","children","buttonContext","ButtonContext","textContext","TextContext","buttonSlots","monthLabel","monthRangeLabel","yearLabel","textSlots","Provider","Calendar","props","recipe","useRecipe","calendarSlotRecipe","recipeProps","remainingProps","styleProps","otherProps","extractStyleProps","RaCalendar"],"mappings":";;;;;;;;;;;;;;;;;;;AAcA,MAAM,EAAE,cAAAA,GAAc,aAAAC,EAAA,IAAgB,gBAAAC,EAAwB;AAAA,EAC5D,KAAK;AACP,CAAC,GAEYC,IAGT,gBAAAH,EAAoD,OAAO,MAAM,GAExDI,IAAqB,gBAAAH,EAGhC,OAAO,QAAQ,GAEJI,IAAoB,gBAAAJ,EAG/B,OAAO,OAAO,GAEHK,IAAyB,gBAAAL,EAGpC,OAAO,YAAY,GAERM,IAAmB,gBAAAN,EAG9B,SAAS,MAAM,GAEJO,IAAyB,gBAAAP,EAGpC,SAAS,YAAY,GAEVQ,IAAyB,gBAAAR,EAGpC,MAAM,YAAY,GAEPS,IAAuB,gBAAAT,EAGlC,SAAS,UAAU,GAERU,IAAmB,gBAAAV,EAG9B,MAAM,UAAU,GCnCLW,KAAgB,MAAM;AACjC,QAAM,EAAE,QAAAC,EAAA,IAAWC,EAAA,GACbC,IAAUC,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,KAAK,EAAE,QAAQgB,EAAA,GAAsB,CAACM,GAAGC,MAAU;AACxD,UAAMC,IAAWX,EAAc,aAAa,MAAM,IAAI;AAAA,MACpD,QAAQU;AAAA,IAAA,CACT,GACKE,IAAY,IAAI,KAAK,eAAejB,GAAQ;AAAA,MAChD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3,"file":"collapsible-motion-OOUmjdKw.es.js","sources":["../../src/components/collapsible-motion/components/collapsible-motion-context.tsx","../../src/components/collapsible-motion/collapsible-motion.slots.tsx","../../src/components/collapsible-motion/components/collapsible-motion-root.tsx","../../src/components/collapsible-motion/components/collapsible-motion-trigger.tsx","../../src/components/collapsible-motion/components/collapsible-motion-content.tsx","../../src/components/collapsible-motion/collapsible-motion.tsx"],"sourcesContent":["import { createContext, useContext } from \"react\";\nimport type { CollapsibleMotionContextValue } from \"../collapsible-motion.types\";\n\n/**\n * React Context for sharing CollapsibleMotion state between compound components\n */\nexport const CollapsibleMotionContext = createContext<\n CollapsibleMotionContextValue | undefined\n>(undefined);\n\n/**\n * Custom hook to consume CollapsibleMotion context\n */\nexport function useCollapsibleMotionContext(): CollapsibleMotionContextValue {\n const context = useContext(CollapsibleMotionContext);\n\n if (context === undefined) {\n throw new Error(\n \"useCollapsibleMotionContext must be used within a CollapsibleMotion.Root component\"\n );\n }\n\n return context;\n}\n","import {\n createSlotRecipeContext,\n type HTMLChakraProps,\n} from \"@chakra-ui/react\";\nimport type { CollapsibleMotionRootSlotProps } from \"./collapsible-motion.types\";\nimport type { SlotComponent } from \"../utils/slot-types\";\n\nconst { withProvider, withContext } = createSlotRecipeContext({\n key: \"collapsibleMotion\",\n});\n\nexport const CollapsibleMotionRootSlot: SlotComponent<\n HTMLDivElement,\n CollapsibleMotionRootSlotProps\n> = withProvider<HTMLDivElement, CollapsibleMotionRootSlotProps>(\"div\", \"root\");\n\nexport const CollapsibleMotionTriggerSlot = withContext<\n HTMLButtonElement,\n HTMLChakraProps<\"button\">\n>(\"button\", \"trigger\");\n\nexport const CollapsibleMotionContentSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"content\");\n","import { useRef, forwardRef } from \"react\";\nimport { useDisclosure } from \"react-aria\";\nimport { useDisclosureState } from \"react-stately\";\nimport { CollapsibleMotionContext } from \"./collapsible-motion-context\";\nimport { CollapsibleMotionRootSlot } from \"../collapsible-motion.slots\";\nimport type { CollapsibleMotionRootProps } from \"../collapsible-motion.types\";\n\n/**\n * CollapsibleMotion.Root - The root container component that manages state and provides context\n *\n * This component contains all the state management logic and provides context to\n * CollapsibleMotion.Trigger and CollapsibleMotion.Content components.\n */\nexport const CollapsibleMotionRoot: React.ForwardRefExoticComponent<\n CollapsibleMotionRootProps & React.RefAttributes<HTMLDivElement>\n> = forwardRef<HTMLDivElement, CollapsibleMotionRootProps>(\n (\n {\n children,\n defaultExpanded = false,\n isExpanded: controlledExpanded,\n onExpandedChange,\n isDisabled = false,\n ...props\n },\n forwardedRef\n ) => {\n // Use React Aria's disclosure state management\n const disclosureState = useDisclosureState({\n defaultExpanded,\n isExpanded: controlledExpanded,\n onExpandedChange,\n });\n\n const panelRef = useRef<HTMLDivElement>(null);\n\n // Use React Aria's disclosure hook for ARIA props\n const { buttonProps, panelProps } = useDisclosure(\n { isDisabled },\n disclosureState,\n panelRef\n );\n\n // Context value to provide to child components\n const contextValue = {\n isDisabled,\n isExpanded: disclosureState.isExpanded,\n buttonProps,\n panelProps,\n panelRef,\n };\n\n return (\n <CollapsibleMotionContext.Provider value={contextValue}>\n <CollapsibleMotionRootSlot ref={forwardedRef} {...props}>\n {children}\n </CollapsibleMotionRootSlot>\n </CollapsibleMotionContext.Provider>\n );\n }\n);\n\nCollapsibleMotionRoot.displayName = \"CollapsibleMotion.Root\";\n","import { forwardRef } from \"react\";\nimport { mergeProps } from \"react-aria\";\nimport { useCollapsibleMotionContext } from \"./collapsible-motion-context\";\nimport { CollapsibleMotionTriggerSlot } from \"../collapsible-motion.slots\";\nimport type { CollapsibleMotionTriggerProps } from \"../collapsible-motion.types\";\nimport { Button as RaButton } from \"react-aria-components\";\nimport { chakra } from \"@chakra-ui/react/styled-system\";\nimport { extractStyleProps } from \"@/utils/extractStyleProps\";\n\n/**\n * CollapsibleMotion.Trigger - The trigger button that toggles the collapsible content\n *\n * This component renders a button with proper ARIA attributes for accessibility.\n * It automatically handles the toggle functionality when clicked.\n */\nexport const CollapsibleMotionTrigger = forwardRef<\n HTMLButtonElement,\n CollapsibleMotionTriggerProps\n>(({ children, asChild, ...props }, forwardedRef) => {\n const { buttonProps, isDisabled } = useCollapsibleMotionContext();\n\n // Use mergeProps to properly compose event handlers like React Aria does\n const componentProps = mergeProps(props, buttonProps, {\n disabled: isDisabled,\n });\n\n // If asChild is true, wrap children directly in a button with asChild\n if (asChild) {\n return (\n <chakra.button asChild {...componentProps}>\n {children}\n </chakra.button>\n );\n }\n\n const [styleProps, restProps] = extractStyleProps(componentProps);\n\n // Otherwise, wrap with both CollapsibleMotionTriggerSlot and RaButton\n // Only pass React Aria compatible props to avoid type conflicts\n return (\n <CollapsibleMotionTriggerSlot ref={forwardedRef} {...styleProps} asChild>\n <RaButton {...restProps}>{children}</RaButton>\n </CollapsibleMotionTriggerSlot>\n );\n});\n\nCollapsibleMotionTrigger.displayName = \"CollapsibleMotion.Trigger\";\n","import { forwardRef, useRef } from \"react\";\nimport { useObjectRef } from \"react-aria\";\nimport { mergeRefs, Presence } from \"@chakra-ui/react\";\nimport { useCollapsibleMotionContext } from \"./collapsible-motion-context\";\nimport { CollapsibleMotionContentSlot } from \"../collapsible-motion.slots\";\nimport type { CollapsibleMotionContentProps } from \"../collapsible-motion.types\";\n\n/**\n * CollapsibleMotion.Content - The collapsible content container\n *\n * This component renders the content that will expand and collapse.\n * It handles accessibility attributes through React Aria.\n */\nexport const CollapsibleMotionContent = forwardRef<\n HTMLDivElement,\n CollapsibleMotionContentProps\n>(({ children, ...props }, forwardedRef) => {\n const { panelProps, isExpanded } = useCollapsibleMotionContext();\n\n // Create a local ref and merge with forwardedRef (for user)\n const localRef = useRef<HTMLDivElement>(null);\n const ref = useObjectRef(mergeRefs(localRef, forwardedRef));\n\n return (\n <CollapsibleMotionContentSlot ref={ref} {...props} {...panelProps} asChild>\n <Presence\n present={isExpanded}\n animationName={{\n _open: \"slide-from-top, fade-in\",\n _closed: \"slide-to-top, fade-out\",\n }}\n animationDuration=\"fast\"\n >\n {children}\n </Presence>\n </CollapsibleMotionContentSlot>\n );\n});\n\nCollapsibleMotionContent.displayName = \"CollapsibleMotion.Content\";\n","import { CollapsibleMotionRoot } from \"./components/collapsible-motion-root\";\nimport { CollapsibleMotionTrigger } from \"./components/collapsible-motion-trigger\";\nimport { CollapsibleMotionContent } from \"./components/collapsible-motion-content\";\n\n// Exports for internal use by react-docgen\nexport {\n CollapsibleMotionRoot as _CollapsibleMotionRoot,\n CollapsibleMotionTrigger as _CollapsibleMotionTrigger,\n CollapsibleMotionContent as _CollapsibleMotionContent,\n};\n\ntype CollapsibleMotionNamespace = {\n Root: typeof CollapsibleMotionRoot;\n Trigger: typeof CollapsibleMotionTrigger;\n Content: typeof CollapsibleMotionContent;\n};\n\nexport const CollapsibleMotion: CollapsibleMotionNamespace = {\n Root: CollapsibleMotionRoot,\n Trigger: CollapsibleMotionTrigger,\n Content: CollapsibleMotionContent,\n};\n"],"names":["CollapsibleMotionContext","createContext","useCollapsibleMotionContext","context","useContext","withProvider","withContext","createSlotRecipeContext","CollapsibleMotionRootSlot","CollapsibleMotionTriggerSlot","CollapsibleMotionContentSlot","CollapsibleMotionRoot","forwardRef","children","defaultExpanded","controlledExpanded","onExpandedChange","isDisabled","props","forwardedRef","disclosureState","useDisclosureState","panelRef","useRef","buttonProps","panelProps","useDisclosure","contextValue","jsx","CollapsibleMotionTrigger","asChild","componentProps","mergeProps","chakra","styleProps","restProps","extractStyleProps","RaButton","CollapsibleMotionContent","isExpanded","localRef","ref","useObjectRef","mergeRefs","Presence","CollapsibleMotion"],"mappings":";;;;;;;;;AAMO,MAAMA,IAA2B,gBAAAC,EAEtC,MAAS;AAKJ,SAASC,IAA6D;AAC3E,QAAMC,IAAUC,EAAWJ,CAAwB;AAEnD,MAAIG,MAAY;AACd,UAAM,IAAI;AAAA,MACR;AAAA,IAAA;AAIJ,SAAOA;AACT;AChBA,MAAM,EAAE,cAAAE,GAAc,aAAAC,EAA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AGF,GACxB,UAAAlB,GACH;AAIJ,QAAM,CAACqB,GAAYC,CAAS,IAAIC,EAAkBL,CAAc;AAIhE,SACE,gBAAAH,EAACnB,GAAA,EAA6B,KAAKU,GAAe,GAAGe,GAAY,SAAO,IACtE,UAAA,gBAAAN,EAACS,GAAA,EAAU,GAAGF,GAAY,UAAAtB,GAAS,GACrC;AAEJ,CAAC;AAEDgB,EAAyB,cAAc;ACjChC,MAAMS,IAA2B,gBAAA1B,EAGtC,CAAC,EAAE,UAAAC,GAAU,GAAGK,EAAA,GAASC,MAAiB;AAC1C,QAAM,EAAE,YAAAM,GAAY,YAAAc,EAAA,IAAerC,EAAA,GAG7BsC,IAAWjB,EAAuB,IAAI,GACtCkB,IAAMC,EAAaC,EAAUH,GAAUrB,CAAY,CAAC;AAE1D,SACE,gBAAAS,EAAClB,KAA6B,KAAA+B,GAAW,GAAGvB,GAAQ,GAAGO,GAAY,SAAO,IACxE,UAAA,gBAAAG;AAAA,IAACgB;AAAA,IAAA;AAAA,MACC,SAASL;AAAA,MACT,eAAe;AAAA,QACb,OAAO;AAAA,QACP,SAAS;AAAA,MAAA;AAAA,MAEX,mBAAkB;AAAA,MAEjB,UAAA1B;AAAA,IAAA;AAAA,EAAA,GAEL;AAEJ,CAAC;AAEDyB,EAAyB,cAAc;ACtBhC,MAAMO,IAAgD;AAAA,EAC3D,MAAMlC;AAAA,EACN,SAASkB;AAAA,EACT,SAASS;AACX;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"menu-4QTf2m-7.es.js","sources":["../../src/components/menu/menu.slots.tsx","../../src/components/menu/components/menu.context.tsx","../../src/components/menu/components/menu.root.tsx","../../src/components/menu/components/menu.trigger.tsx","../../src/components/menu/components/menu.section-context.tsx","../../src/components/menu/components/menu.content.tsx","../../src/components/menu/components/menu.item.tsx","../../src/components/menu/components/menu.section-label.tsx","../../src/components/menu/components/menu.section.tsx","../../src/components/menu/components/menu.submenu-trigger.tsx","../../src/components/menu/components/menu.submenu.tsx","../../src/components/menu/menu.tsx"],"sourcesContent":["import { createSlotRecipeContext } from \"@chakra-ui/react\";\nimport type {\n MenuRootSlotProps,\n MenuTriggerSlotProps,\n MenuPopoverSlotProps,\n MenuContentSlotProps,\n MenuItemSlotProps,\n MenuSectionSlotProps,\n MenuSectionLabelSlotProps,\n MenuSubmenuSlotProps,\n} from \"./menu.types\";\nimport type { SlotComponent } from \"../utils/slot-types\";\n\nconst { withProvider, withContext } = createSlotRecipeContext({\n key: \"menu\",\n});\n\n// Menu Root\nexport const MenuRootSlot: SlotComponent<HTMLDivElement, MenuRootSlotProps> =\n withProvider<HTMLDivElement, MenuRootSlotProps>(\"div\", \"root\");\n\n// Menu Trigger\nexport const MenuTriggerSlot = withContext<\n HTMLButtonElement,\n MenuTriggerSlotProps\n>(\"button\", \"trigger\");\n\n// Menu Popover\nexport const MenuPopoverSlot = withContext<\n HTMLDivElement,\n MenuPopoverSlotProps\n>(\"div\", \"popover\");\n\n// Menu Content\nexport const MenuContentSlot = withContext<\n HTMLDivElement,\n MenuContentSlotProps\n>(\"div\", \"content\");\n\n// Menu Item\nexport const MenuItemSlot = withContext<HTMLDivElement, MenuItemSlotProps>(\n \"div\",\n \"item\"\n);\n\n// Menu Section\nexport const MenuSectionSlot = withContext<\n HTMLDivElement,\n MenuSectionSlotProps\n>(\"div\", \"section\");\n\n// Menu Section Label\nexport const MenuSectionLabelSlot = withContext<\n HTMLDivElement,\n MenuSectionLabelSlotProps\n>(\"div\", \"sectionLabel\");\n\n// Menu Group Label\nexport const MenuSubmenuSlot = withContext<\n HTMLDivElement,\n MenuSubmenuSlotProps\n>(\"div\", \"submenu\");\n","import { createContext, useContext } from \"react\";\nimport type { MenuRootProps } from \"./../menu.types\";\nimport type { MenuTriggerProps as RaMenuTriggerProps } from \"react-aria-components\";\n\n// Context should contain all Menu props (excluding MenuTrigger-specific props)\nexport type MenuContextValue = Omit<\n MenuRootProps,\n keyof RaMenuTriggerProps | \"children\" | \"trigger\"\n>;\n\nconst MenuContext = createContext<MenuContextValue | undefined>(undefined);\n\nexport const MenuProvider = MenuContext.Provider;\n\nexport const useMenuContext = () => {\n const context = useContext(MenuContext);\n return context;\n};\n","import { useSlotRecipe } from \"@chakra-ui/react/styled-system\";\nimport { MenuTrigger as RaMenuTrigger } from \"react-aria-components\";\nimport type { MenuRootProps } from \"../menu.types\";\nimport { MenuRootSlot } from \"../menu.slots\";\nimport { MenuProvider } from \"./menu.context\";\n\nexport const MenuRoot = (props: MenuRootProps) => {\n const recipe = useSlotRecipe({ key: \"menu\" });\n const [recipeProps, functionalProps] = recipe.splitVariantProps(props);\n\n // Separate MenuTrigger props from Menu props\n const {\n children,\n trigger,\n isOpen,\n defaultOpen,\n onOpenChange,\n ...menuContextProps\n } = functionalProps;\n\n const menuTriggerProps = {\n trigger,\n isOpen,\n defaultOpen,\n onOpenChange,\n };\n\n return (\n <MenuRootSlot {...recipeProps} asChild>\n <RaMenuTrigger {...menuTriggerProps}>\n <MenuProvider value={menuContextProps}>{children}</MenuProvider>\n </RaMenuTrigger>\n </MenuRootSlot>\n );\n};\n\nMenuRoot.displayName = \"Menu.Root\";\n","import { Button } from \"react-aria-components\";\nimport { MenuTriggerSlot } from \"../menu.slots\";\nimport type { MenuTriggerProps } from \"../menu.types\";\nimport { extractStyleProps } from \"@/utils/extractStyleProps\";\nimport type { ReactNode } from \"react\";\n\nexport const MenuTrigger = ({\n children,\n asChild,\n ref,\n ...props\n}: MenuTriggerProps) => {\n const [styleProps, restProps] = extractStyleProps(props);\n\n /**\n * The user supplied a Button as the trigger\n */\n if (asChild) {\n // When asChild is true, apply styles to the child element\n return (\n <MenuTriggerSlot ref={ref} asChild {...styleProps}>\n {children as ReactNode}\n </MenuTriggerSlot>\n );\n }\n\n /**\n * The user did not supply a Button as trigger, use an unstyled button\n * to wrap which ever element the user supplied and make it a trigger\n */\n return (\n <MenuTriggerSlot asChild {...styleProps}>\n <Button ref={ref} {...restProps}>\n {children}\n </Button>\n </MenuTriggerSlot>\n );\n};\n\nMenuTrigger.displayName = \"Menu.Trigger\";\n","import { createContext, useContext } from \"react\";\n\nexport type MenuSectionContextValue = {\n selectionMode?: \"single\" | \"multiple\" | \"none\";\n};\n/**\n * Why is a second context (MenuSectionContext) needed?\n *\n * MenuSectionContext enables section-level config for menu items, such as\n * selection mode, which may differ from the global menu context. This allows\n * advanced menus where each section can have its own selection behavior\n * (e.g., one section is single-select, another is multi-select).\n * By scoping context to a section, menu items inherit settings from their\n * nearest section, falling back to the global menu context if not present.\n * This pattern improves flexibility and composability for complex menus,\n * and avoids prop drilling or awkward prop merging.\n */\n\nconst MenuSectionContext = createContext<MenuSectionContextValue | undefined>(\n undefined\n);\n\nexport const MenuSectionProvider = MenuSectionContext.Provider;\n\nexport const useMenuSectionContext = () => {\n return useContext(MenuSectionContext);\n};\n","import { Menu, Popover } from \"react-aria-components\";\nimport { MenuContentSlot, MenuPopoverSlot } from \"../menu.slots\";\nimport type { MenuContentProps } from \"../menu.types\";\nimport { useMenuContext } from \"./menu.context\";\nimport { MenuSectionProvider } from \"./menu.section-context\";\n\nexport const MenuContent = ({\n children,\n placement: placementOverride,\n ref,\n}: MenuContentProps) => {\n const contextProps = useMenuContext();\n\n if (!contextProps) {\n throw new Error(\"Menu.Content must be used within Menu.Root\");\n }\n\n // Separate placement from other props since it's handled by Popover\n const { placement, ...menuProps } = contextProps;\n const finalPlacement = placementOverride || placement || \"bottom start\";\n\n return (\n <MenuSectionProvider value={{ selectionMode: menuProps.selectionMode }}>\n <MenuPopoverSlot asChild>\n <Popover placement={finalPlacement} offset={4} shouldFlip>\n <MenuContentSlot asChild>\n <Menu ref={ref} shouldFocusWrap autoFocus=\"first\" {...menuProps}>\n {children}\n </Menu>\n </MenuContentSlot>\n </Popover>\n </MenuPopoverSlot>\n </MenuSectionProvider>\n );\n};\n\nMenuContent.displayName = \"Menu.Content\";\n","import { MenuItem as RaMenuItem } from \"react-aria-components\";\nimport { MenuItemSlot } from \"../menu.slots\";\nimport type { MenuItemProps } from \"../menu.types\";\nimport { extractStyleProps } from \"@/utils/extractStyleProps\";\nimport { ChevronRight } from \"@commercetools/nimbus-icons\";\nimport { Icon } from \"@/components/icon\";\n\nexport const MenuItem = ({\n children,\n isCritical,\n ref,\n ...props\n}: MenuItemProps) => {\n const [styleProps, restProps] = extractStyleProps(props);\n\n return (\n <MenuItemSlot\n asChild\n {...styleProps}\n data-critical={isCritical ? \"\" : undefined}\n >\n <RaMenuItem ref={ref} {...restProps}>\n {({ hasSubmenu }) => (\n <>\n {children}\n {hasSubmenu && (\n <Icon slot=\"caretIcon\">\n <ChevronRight />\n </Icon>\n )}\n </>\n )}\n </RaMenuItem>\n </MenuItemSlot>\n );\n};\n\nMenuItem.displayName = \"Menu.Item\";\n","import { Header } from \"react-aria-components\";\nimport { MenuSectionLabelSlot } from \"../menu.slots\";\nimport type { MenuSectionLabelProps } from \"../menu.types\";\nimport { extractStyleProps } from \"@/utils/extractStyleProps\";\n\n/**\n * Used in MenuSection for rendering the `label` property.\n */\nexport const MenuSectionLabel = ({\n children,\n ref,\n ...props\n}: MenuSectionLabelProps) => {\n const [styleProps, restProps] = extractStyleProps(props);\n\n return (\n <MenuSectionLabelSlot asChild {...styleProps}>\n <Header ref={ref} {...restProps}>\n {children}\n </Header>\n </MenuSectionLabelSlot>\n );\n};\n\nMenuSectionLabel.displayName = \"Menu.SectionLabel\";\n","import {\n MenuSection as RaMenuSection,\n Collection,\n} from \"react-aria-components\";\nimport { MenuSectionSlot } from \"../menu.slots\";\nimport type { MenuSectionProps } from \"../menu.types\";\nimport { extractStyleProps } from \"@/utils/extractStyleProps\";\nimport { useMenuContext } from \"./menu.context\";\nimport { MenuSectionProvider } from \"./menu.section-context\";\nimport { MenuSectionLabel } from \"./menu.section-label\";\nimport type { ReactNode } from \"react\";\n\nexport const MenuSection = <T extends object = object>({\n children,\n ref,\n label,\n items,\n ...props\n}: MenuSectionProps<T>) => {\n const contextProps = useMenuContext();\n\n // Extract selection-related props before extracting style props\n const {\n selectionMode = contextProps?.selectionMode,\n selectedKeys = contextProps?.selectedKeys,\n defaultSelectedKeys = contextProps?.defaultSelectedKeys,\n onSelectionChange = contextProps?.onSelectionChange,\n disallowEmptySelection = contextProps?.disallowEmptySelection,\n ...restProps\n } = props;\n\n const [styleProps, otherProps] = extractStyleProps(restProps);\n\n return (\n <MenuSectionProvider value={{ selectionMode }}>\n <MenuSectionSlot asChild {...styleProps}>\n <RaMenuSection\n ref={ref}\n selectionMode={selectionMode}\n selectedKeys={selectedKeys}\n defaultSelectedKeys={defaultSelectedKeys}\n onSelectionChange={onSelectionChange}\n disallowEmptySelection={disallowEmptySelection}\n {...otherProps}\n >\n <MenuSectionLabel>{label}</MenuSectionLabel>\n {items ? (\n <Collection items={items}>{children}</Collection>\n ) : (\n (children as ReactNode)\n )}\n </RaMenuSection>\n </MenuSectionSlot>\n </MenuSectionProvider>\n );\n};\n\nMenuSection.displayName = \"Menu.Section\";\n","import { SubmenuTrigger as RaSubmenuTrigger } from \"react-aria-components\";\nimport type { MenuSubmenuTriggerProps } from \"../menu.types\";\n\nexport const MenuSubmenuTrigger = ({\n children,\n ...props\n}: MenuSubmenuTriggerProps) => {\n return <RaSubmenuTrigger {...props}>{children}</RaSubmenuTrigger>;\n};\n\nMenuSubmenuTrigger.displayName = \"Menu.SubmenuTrigger\";\n","import type { MenuSubmenuProps } from \"../menu.types\";\nimport { MenuContent } from \"./menu.content\";\n\nexport const MenuSubmenu = ({ children, ...props }: MenuSubmenuProps) => {\n return (\n <MenuContent {...props} placement=\"end\">\n {children}\n </MenuContent>\n );\n};\n\nMenuSubmenu.displayName = \"Menu.Submenu\";\n","import { MenuRoot } from \"./components/menu.root\";\nimport { MenuTrigger } from \"./components/menu.trigger\";\nimport { MenuContent } from \"./components/menu.content\";\nimport { MenuItem } from \"./components/menu.item\";\nimport { MenuSection } from \"./components/menu.section\";\nimport { MenuSubmenuTrigger } from \"./components/menu.submenu-trigger\";\nimport { MenuSubmenu } from \"./components/menu.submenu\";\n\n// Re-export types\nexport type * from \"./menu.types\";\n\nexport const Menu = {\n Root: MenuRoot,\n Trigger: MenuTrigger,\n Content: MenuContent,\n Item: MenuItem,\n Section: MenuSection,\n Submenu: MenuSubmenu,\n SubmenuTrigger: MenuSubmenuTrigger,\n};\n\n// Exports for internal use by react-docgen\nexport {\n MenuRoot as _MenuRoot,\n MenuTrigger as _MenuTrigger,\n MenuContent as _MenuContent,\n MenuItem as _MenuItem,\n MenuSection as _MenuSection,\n MenuSubmenuTrigger as _MenuSubmenuTrigger,\n MenuSubmenu as _MenuSubmenu,\n};\n"],"names":["withProvider","withContext","createSlotRecipeContext","MenuRootSlot","MenuTriggerSlot","MenuPopoverSlot","MenuContentSlot","MenuItemSlot","MenuSectionSlot","MenuSectionLabelSlot","MenuContext","createContext","MenuProvider","useMenuContext","useContext","MenuRoot","props","recipe","useSlotRecipe","recipeProps","functionalProps","children","trigger","isOpen","defaultOpen","onOpenChange","menuContextProps","jsx","RaMenuTrigger","MenuTrigger","asChild","ref","styleProps","restProps","extractStyleProps","Button","MenuSectionContext","MenuSectionProvider","MenuContent","placementOverride","contextProps","placement","menuProps","finalPlacement","Popover","Menu","MenuItem","isCritical","RaMenuItem","hasSubmenu","jsxs","Fragment","Icon","ChevronRight","MenuSectionLabel","Header","MenuSection","label","items","selectionMode","selectedKeys","defaultSelectedKeys","onSelectionChange","disallowEmptySelection","otherProps","RaMenuSection","Collection","MenuSubmenuTrigger","RaSubmenuTrigger","MenuSubmenu"],"mappings":";;;;;;;;;;;AAaA,MAAM,EAAE,cAAAA,GAAc,aAAAC,EAAA,IAAgB,gBAAAC,EAAwB;AAAA,EAC5D,KAAK;AACP,CAAC,GAGYC,IACX,gBAAAH,EAAgD,OAAO,MAAM,GAGlDI,IAAkB,gBAAAH,EAG7B,UAAU,SAAS,GAGRI,IAAkB,gBAAAJ,EAG7B,OAAO,SAAS,GAGLK,IAAkB,gBAAAL,EAG7B,OAAO,SAAS,GAGLM,IAAe,gBAAAN;A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GAAA,EAAW,OAAAR,GAAe,UAAArC,GAAS,IAEnCA;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA,GAGP,EAAA,CACF;AAEJ;AAEAmC,EAAY,cAAc;ACtDnB,MAAMW,IAAqB,CAAC;AAAA,EACjC,UAAA9C;AAAA,EACA,GAAGL;AACL,MACS,gBAAAW,EAACyC,GAAA,EAAkB,GAAGpD,GAAQ,UAAAK,EAAA,CAAS;AAGhD8C,EAAmB,cAAc;ACP1B,MAAME,IAAc,CAAC,EAAE,UAAAhD,GAAU,GAAGL,0BAEtCsB,GAAA,EAAa,GAAGtB,GAAO,WAAU,OAC/B,UAAAK,GACH;AAIJgD,EAAY,cAAc;ACAnB,MAAMxB,KAAO;AAAA,EAClB,MAAM9B;AAAA,EACN,SAASc;AAAA,EACT,SAASS;AAAA,EACT,MAAMQ;AAAA,EACN,SAASU;AAAA,EACT,SAASa;AAAA,EACT,gBAAgBF;AAClB;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"popover-Cz6TnNt_.es.js","sources":["../../src/components/popover/popover.slots.tsx","../../src/components/popover/popover.tsx"],"sourcesContent":["import { createRecipeContext } from \"@chakra-ui/react\";\nimport { Popover as RaPopover } from \"react-aria-components\";\nimport type { PopoverProps } from \"./popover.types\";\nimport type { SlotComponent } from \"../utils/slot-types\";\n\nconst { withContext } = createRecipeContext({\n key: \"popover\",\n});\n\nexport const PopoverRootSlot: SlotComponent<typeof RaPopover, PopoverProps> =\n withContext<typeof RaPopover, PopoverProps>(RaPopover);\n","import { PopoverRootSlot } from \"./popover.slots\";\nimport type { PopoverProps } from \"./popover.types\";\n\n/**\n * # Popover\n *\n * A component that displays floating content in relation to a trigger element.\n *\n * Note this component is only used internally.\n */\nexport const Popover = (props: PopoverProps) => {\n const { children, ...rest } = props;\n\n return <PopoverRootSlot {...rest}>{children}</PopoverRootSlot>;\n};\n\nPopover.displayName = \"Popover\";\n"],"names":["withContext","createRecipeContext","PopoverRootSlot","RaPopover","Popover","props","children","rest","jsx"],"mappings":";;;AAKA,MAAM,EAAE,aAAAA,EAAA,IAAgB,gBAAAC,EAAoB;AAAA,EAC1C,KAAK;AACP,CAAC,GAEYC,IACX,gBAAAF,EAA4CG,CAAS,GCA1CC,IAAU,CAACC,MAAwB;AAC9C,QAAM,EAAE,UAAAC,GAAU,GAAGC,EAAA,IAASF;AAE9B,SAAO,gBAAAG,EAACN,GAAA,EAAiB,GAAGK,GAAO,UAAAD,EAAA,CAAS;AAC9C;AAEAF,EAAQ,cAAc;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"range-calendar-RBEpLQJb.es.js","sources":["../../src/components/range-calendar/range-calendar.slots.tsx","../../src/components/range-calendar/components/range-calendar.grids.tsx","../../src/components/range-calendar/components/range-calendar.header.tsx","../../src/components/range-calendar/components/range-calendar.custom-context.tsx","../../src/components/range-calendar/range-calendar.tsx"],"sourcesContent":["import { createSlotRecipeContext } from \"@chakra-ui/react\";\nimport type {\n RangeCalendarRootSlotProps,\n RangeCalendarHeaderSlotProps,\n RangeCalendarGridsSlotProps,\n RangeCalendarMonthTitleSlotProps,\n RangeCalendarGridSlotProps,\n RangeCalendarGridHeaderSlotProps,\n RangeCalendarHeaderCellSlotProps,\n RangeCalendarGridBodySlotProps,\n RangeCalendarCellSlotProps,\n} from \"./range-calendar.types\";\nimport type { SlotComponent } from \"../utils/slot-types\";\n\nconst { withProvider, withContext } = createSlotRecipeContext({\n key: \"rangeCalendar\",\n});\n\nexport const RangeCalendarRootSlot: SlotComponent<\n HTMLDivElement,\n RangeCalendarRootSlotProps\n> = withProvider<HTMLDivElement, RangeCalendarRootSlotProps>(\"div\", \"root\");\n\nexport const RangeCalendarHeaderSlot = withContext<\n HTMLDivElement,\n RangeCalendarHeaderSlotProps\n>(\"div\", \"header\");\n\nexport const RangeCalendarGridsSlot = withContext<\n HTMLDivElement,\n RangeCalendarGridsSlotProps\n>(\"div\", \"grids\");\n\nexport const RangeCalendarMonthTitleSlot = withContext<\n HTMLDivElement,\n RangeCalendarMonthTitleSlotProps\n>(\"div\", \"monthTitle\");\n\nexport const RangeCalendarGridSlot = withContext<\n HTMLTableElement,\n RangeCalendarGridSlotProps\n>(\"table\", \"grid\");\n\nexport const RangeCalendarGridHeaderSlot = withContext<\n HTMLTableSectionElement,\n RangeCalendarGridHeaderSlotProps\n>(\"thead\", \"gridHeader\");\n\nexport const RangeCalendarHeaderCellSlot = withContext<\n HTMLTableCellElement,\n RangeCalendarHeaderCellSlotProps\n>(\"th\", \"headerCell\");\n\nexport const RangeCalendarGridBodySlot = withContext<\n HTMLTableSectionElement,\n RangeCalendarGridBodySlotProps\n>(\"tbody\", \"gridBody\");\n\nexport const RangeCalendarCellSlot = withContext<\n HTMLTableCellElement,\n RangeCalendarCellSlotProps\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 RangeCalendarContext,\n RangeCalendarStateContext,\n useLocale,\n} from \"react-aria-components\";\nimport { Box } from \"@/components\";\n\nimport {\n RangeCalendarCellSlot,\n RangeCalendarGridBodySlot,\n RangeCalendarGridHeaderSlot,\n RangeCalendarGridsSlot,\n RangeCalendarGridSlot,\n RangeCalendarHeaderCellSlot,\n RangeCalendarMonthTitleSlot,\n} from \"../range-calendar.slots\";\n\nexport const RangeCalendarGrids = () => {\n const { locale } = useLocale();\n const context = useSlottedContext(RangeCalendarContext);\n\n const calendarState = useContext(RangeCalendarStateContext)!;\n const visibleMonthsCount = context?.visibleDuration?.months || 1;\n const todayDate = today(getLocalTimeZone());\n const showMonthTitles = visibleMonthsCount > 1;\n\n return (\n <RangeCalendarGridsSlot>\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 <RangeCalendarMonthTitleSlot>\n {monthName}\n </RangeCalendarMonthTitleSlot>\n )}\n <RangeCalendarGridSlot asChild>\n <RaCalendarGrid offset={{ months: index }} weekdayStyle=\"short\">\n <RangeCalendarGridHeaderSlot asChild>\n <RaCalendarGridHeader>\n {(day) => (\n <RangeCalendarHeaderCellSlot asChild>\n <RaCalendarHeaderCell>{day}</RaCalendarHeaderCell>\n </RangeCalendarHeaderCellSlot>\n )}\n </RaCalendarGridHeader>\n </RangeCalendarGridHeaderSlot>\n <RangeCalendarGridBodySlot asChild>\n <RaCalendarGridBody>\n {(date) => {\n const isToday = date.compare(todayDate) === 0;\n return (\n <RangeCalendarCellSlot asChild data-today={isToday}>\n <RaCalendarCell date={date} />\n </RangeCalendarCellSlot>\n );\n }}\n </RaCalendarGridBody>\n </RangeCalendarGridBodySlot>\n </RaCalendarGrid>\n </RangeCalendarGridSlot>\n </Box>\n );\n })}\n </RangeCalendarGridsSlot>\n );\n};\n","import {\n RangeCalendarContext,\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 { RangeCalendarHeaderSlot } from \"../range-calendar.slots\";\n\nexport const RangeCalendarHeader = () => {\n const rangeCalendarProps = useSlottedContext(RangeCalendarContext);\n\n // Needed to decide whether to show a single month or a range\n const visibleDurationMonths =\n rangeCalendarProps?.visibleDuration?.months || 1;\n const showRangeLabel = visibleDurationMonths > 1;\n\n return (\n <RangeCalendarHeaderSlot>\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 </RangeCalendarHeaderSlot>\n );\n};\n","import { getLocalTimeZone } from \"@internationalized/date\";\nimport { useContext } from \"react\";\nimport {\n Provider,\n ButtonContext,\n RangeCalendarStateContext,\n TextContext,\n useLocale,\n} from \"react-aria-components\";\n\nexport const RangeCalendarCustomContext = ({\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(RangeCalendarStateContext)!;\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 { RangeCalendarProps } from \"./range-calendar.types\";\nimport type { DateValue } from \"@internationalized/date\";\n\nimport { RangeCalendar as RaRangeCalendar } from \"react-aria-components\";\n\nimport { RangeCalendarRootSlot } from \"./range-calendar.slots\";\nimport { RangeCalendarGrids } from \"./components/range-calendar.grids\";\nimport { RangeCalendarHeader } from \"./components/range-calendar.header\";\nimport { rangeCalendarSlotRecipe } from \"./range-calendar.recipe\";\nimport { useRecipe } from \"@chakra-ui/react/styled-system\";\nimport { extractStyleProps } from \"@/utils/extractStyleProps\";\nimport { RangeCalendarCustomContext } from \"./components/range-calendar.custom-context\";\n\nexport const RangeCalendar = (props: RangeCalendarProps<DateValue>) => {\n const recipe = useRecipe({ recipe: rangeCalendarSlotRecipe });\n const [recipeProps, remainingProps] = recipe.splitVariantProps(props);\n const [styleProps, otherProps] = extractStyleProps(remainingProps);\n\n return (\n <RangeCalendarRootSlot {...recipeProps} {...styleProps} asChild>\n <RaRangeCalendar {...otherProps}>\n <RangeCalendarCustomContext>\n <RangeCalendarHeader />\n <RangeCalendarGrids />\n </RangeCalendarCustomContext>\n </RaRangeCalendar>\n </RangeCalendarRootSlot>\n );\n};\n"],"names":["withProvider","withContext","createSlotRecipeContext","RangeCalendarRootSlot","RangeCalendarHeaderSlot","RangeCalendarGridsSlot","RangeCalendarMonthTitleSlot","RangeCalendarGridSlot","RangeCalendarGridHeaderSlot","RangeCalendarHeaderCellSlot","RangeCalendarGridBodySlot","RangeCalendarCellSlot","RangeCalendarGrids","locale","useLocale","context","useSlottedContext","RangeCalendarContext","calendarState","useContext","RangeCalendarStateContext","visibleMonthsCount","todayDate","today","getLocalTimeZone","showMonthTitles","jsx","_","index","gridDate","monthName","jsxs","Box","RaCalendarGrid","RaCalendarGridHeader","day","RaCalendarHeaderCell","RaCalendarGridBody","date","isToday","RaCalendarCell","RangeCalendarHeader","showRangeLabel","Flex","Stack","VisuallyHidden","Heading","IconButton","KeyboardArrowLeft","Text","KeyboardArrowRight","RangeCalendarCustomContext","children","buttonContext","ButtonContext","textContext","TextContext","buttonSlots","monthLabel","monthRangeLabel","yearLabel","textSlots","Provider","RangeCalendar","props","recipe","useRecipe","rangeCalendarSlotRecipe","recipeProps","remain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