@commercetools/nimbus 0.0.0-canary-20250918120058 → 0.0.0-canary-20250918131030

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 (132) hide show
  1. package/dist/chunks/{accordion-D06jBMOb.es.js → accordion-BOm1fDGE.es.js} +2 -2
  2. package/dist/chunks/{accordion-D06jBMOb.es.js.map → accordion-BOm1fDGE.es.js.map} +1 -1
  3. package/dist/chunks/{alert-L8PXimjc.es.js → alert-AElDV5sG.es.js} +2 -2
  4. package/dist/chunks/{alert-L8PXimjc.es.js.map → alert-AElDV5sG.es.js.map} +1 -1
  5. package/dist/chunks/{button-BXR4T980.es.js → button-BQ3kiG-V.es.js} +2 -2
  6. package/dist/chunks/{button-BXR4T980.es.js.map → button-BQ3kiG-V.es.js.map} +1 -1
  7. package/dist/chunks/{calendar-DBk-sVXs.es.js → calendar-BK_QGKS0.es.js} +4 -4
  8. package/dist/chunks/{calendar-DBk-sVXs.es.js.map → calendar-BK_QGKS0.es.js.map} +1 -1
  9. package/dist/chunks/{checkbox-Vo5d1nT3.es.js → checkbox-BGAiCLIb.es.js} +2 -2
  10. package/dist/chunks/{checkbox-Vo5d1nT3.es.js.map → checkbox-BGAiCLIb.es.js.map} +1 -1
  11. package/dist/chunks/{combobox-7BYJqsr6.es.js → combobox-07vfnDtg.es.js} +5 -5
  12. package/dist/chunks/{combobox-7BYJqsr6.es.js.map → combobox-07vfnDtg.es.js.map} +1 -1
  13. package/dist/chunks/{data-table-6OCmas4y.es.js → data-table-BCgdkQQg.es.js} +6 -6
  14. package/dist/chunks/{data-table-6OCmas4y.es.js.map → data-table-BCgdkQQg.es.js.map} +1 -1
  15. package/dist/chunks/data-table-fD5FYEWC.cjs.js +2 -0
  16. package/dist/chunks/{data-table-DFhiLq16.cjs.js.map → data-table-fD5FYEWC.cjs.js.map} +1 -1
  17. package/dist/chunks/{date-input-DzpneTE3.es.js → date-input-BVqM2Zwt.es.js} +3 -3
  18. package/dist/chunks/{date-input-DzpneTE3.es.js.map → date-input-BVqM2Zwt.es.js.map} +1 -1
  19. package/dist/chunks/{date-picker-Bmlxwhhp.es.js → date-picker-D5DgoUj4.es.js} +7 -7
  20. package/dist/chunks/{date-picker-Bmlxwhhp.es.js.map → date-picker-D5DgoUj4.es.js.map} +1 -1
  21. package/dist/chunks/{date-range-picker-b-Qkz44d.es.js → date-range-picker-BsRVRy3E.es.js} +7 -7
  22. package/dist/chunks/{date-range-picker-b-Qkz44d.es.js.map → date-range-picker-BsRVRy3E.es.js.map} +1 -1
  23. package/dist/chunks/{extractStyleProps-vXiS8lCp.es.js → extractStyleProps-tYFaIfUG.es.js} +2 -2
  24. package/dist/chunks/{extractStyleProps-vXiS8lCp.es.js.map → extractStyleProps-tYFaIfUG.es.js.map} +1 -1
  25. package/dist/chunks/{form-field-BF03DSg5.es.js → form-field-DbrBkvlM.es.js} +2 -2
  26. package/dist/chunks/{form-field-BF03DSg5.es.js.map → form-field-DbrBkvlM.es.js.map} +1 -1
  27. package/dist/chunks/{icon-button-CKidhzN0.es.js → icon-button-uSoUy0va.es.js} +2 -2
  28. package/dist/chunks/{icon-button-CKidhzN0.es.js.map → icon-button-uSoUy0va.es.js.map} +1 -1
  29. package/dist/chunks/{icon-toggle-button-CfrW8nn2.es.js → icon-toggle-button-0hNL2V8m.es.js} +2 -2
  30. package/dist/chunks/{icon-toggle-button-CfrW8nn2.es.js.map → icon-toggle-button-0hNL2V8m.es.js.map} +1 -1
  31. package/dist/chunks/{index-BZioZQfA.es.js → index-B68rhcD_.es.js} +2 -2
  32. package/dist/chunks/{index-BZioZQfA.es.js.map → index-B68rhcD_.es.js.map} +1 -1
  33. package/dist/chunks/index-QBeUpHcK.cjs.js.map +1 -1
  34. package/dist/chunks/{menu-DnbrSKhK.es.js → menu-Bw1cKywG.es.js} +3 -3
  35. package/dist/chunks/{menu-DnbrSKhK.es.js.map → menu-Bw1cKywG.es.js.map} +1 -1
  36. package/dist/chunks/{multiline-text-input-BxC-HBJS.es.js → multiline-text-input-C72_0pUg.es.js} +2 -2
  37. package/dist/chunks/{multiline-text-input-BxC-HBJS.es.js.map → multiline-text-input-C72_0pUg.es.js.map} +1 -1
  38. package/dist/chunks/{nimbus-provider-mSQ00EQj.es.js → nimbus-provider-HIuQgyHu.es.js} +2 -2
  39. package/dist/chunks/{nimbus-provider-mSQ00EQj.es.js.map → nimbus-provider-HIuQgyHu.es.js.map} +1 -1
  40. package/dist/chunks/{number-input-86JlfGyD.es.js → number-input-CKbE2nF3.es.js} +3 -3
  41. package/dist/chunks/{number-input-86JlfGyD.es.js.map → number-input-CKbE2nF3.es.js.map} +1 -1
  42. package/dist/chunks/{pagination-D-PpTgDZ.es.js → pagination-CvFm3Y-B.es.js} +4 -4
  43. package/dist/chunks/{pagination-D-PpTgDZ.es.js.map → pagination-CvFm3Y-B.es.js.map} +1 -1
  44. package/dist/chunks/{password-input-BizG9N1_.es.js → password-input-BIGq3fmn.es.js} +3 -3
  45. package/dist/chunks/{password-input-BizG9N1_.es.js.map → password-input-BIGq3fmn.es.js.map} +1 -1
  46. package/dist/chunks/{progress-bar-8JDUwg7A.es.js → progress-bar-DokgT9da.es.js} +2 -2
  47. package/dist/chunks/{progress-bar-8JDUwg7A.es.js.map → progress-bar-DokgT9da.es.js.map} +1 -1
  48. package/dist/chunks/{radio-input-CSatNmXz.es.js → radio-input-BqFnIjO2.es.js} +3 -3
  49. package/dist/chunks/{radio-input-CSatNmXz.es.js.map → radio-input-BqFnIjO2.es.js.map} +1 -1
  50. package/dist/chunks/{range-calendar-6mWVLehI.es.js → range-calendar-uSOrC07P.es.js} +4 -4
  51. package/dist/chunks/{range-calendar-6mWVLehI.es.js.map → range-calendar-uSOrC07P.es.js.map} +1 -1
  52. package/dist/chunks/{rich-text-input-BbCjT_Nf.es.js → rich-text-input-BeAntm5q.es.js} +12 -12
  53. package/dist/chunks/{rich-text-input-BbCjT_Nf.es.js.map → rich-text-input-BeAntm5q.es.js.map} +1 -1
  54. package/dist/chunks/{rich-text-input-BwrGY2EU.cjs.js → rich-text-input-SCDOBJ2D.cjs.js} +3 -3
  55. package/dist/chunks/{rich-text-input-BwrGY2EU.cjs.js.map → rich-text-input-SCDOBJ2D.cjs.js.map} +1 -1
  56. package/dist/chunks/{select-BEko2rwu.es.js → select-DRUAnKPP.es.js} +4 -4
  57. package/dist/chunks/{select-BEko2rwu.es.js.map → select-DRUAnKPP.es.js.map} +1 -1
  58. package/dist/chunks/separator-BUpLsao0.es.js +52 -0
  59. package/dist/chunks/separator-BUpLsao0.es.js.map +1 -0
  60. package/dist/chunks/separator-BbkhgIID.cjs.js +2 -0
  61. package/dist/chunks/separator-BbkhgIID.cjs.js.map +1 -0
  62. package/dist/chunks/split-button-D-3pT-LA.cjs.js.map +1 -1
  63. package/dist/chunks/{split-button-ClVaxLZ7.es.js → split-button-U_bcotvu.es.js} +5 -5
  64. package/dist/chunks/split-button-U_bcotvu.es.js.map +1 -0
  65. package/dist/chunks/{switch-D08_asL7.es.js → switch-DRyBAafG.es.js} +3 -3
  66. package/dist/chunks/{switch-D08_asL7.es.js.map → switch-DRyBAafG.es.js.map} +1 -1
  67. package/dist/chunks/{tag-group-C8xH9Mqk.es.js → tag-group-BzLpm8Nm.es.js} +2 -2
  68. package/dist/chunks/{tag-group-C8xH9Mqk.es.js.map → tag-group-BzLpm8Nm.es.js.map} +1 -1
  69. package/dist/chunks/{text-input-bPh9j1cv.es.js → text-input-De16hUH1.es.js} +3 -3
  70. package/dist/chunks/{text-input-bPh9j1cv.es.js.map → text-input-De16hUH1.es.js.map} +1 -1
  71. package/dist/chunks/{time-input-Dg7SfITo.es.js → time-input-0zQIcl5w.es.js} +2 -2
  72. package/dist/chunks/{time-input-Dg7SfITo.es.js.map → time-input-0zQIcl5w.es.js.map} +1 -1
  73. package/dist/chunks/{toggle-button-DeqTwBN5.es.js → toggle-button-D1Ul4V1F.es.js} +3 -3
  74. package/dist/chunks/{toggle-button-DeqTwBN5.es.js.map → toggle-button-D1Ul4V1F.es.js.map} +1 -1
  75. package/dist/chunks/{toolbar-Dv9YKOSU.es.js → toolbar-D90bjfN_.es.js} +3 -3
  76. package/dist/chunks/{toolbar-Dv9YKOSU.es.js.map → toolbar-D90bjfN_.es.js.map} +1 -1
  77. package/dist/components/accordion.es.js +1 -1
  78. package/dist/components/alert.es.js +1 -1
  79. package/dist/components/button.es.js +1 -1
  80. package/dist/components/calendar.es.js +1 -1
  81. package/dist/components/checkbox.es.js +1 -1
  82. package/dist/components/combobox.es.js +1 -1
  83. package/dist/components/components.cjs +1 -1
  84. package/dist/components/components.es.js +76 -76
  85. package/dist/components/data-table.cjs +1 -1
  86. package/dist/components/data-table.es.js +1 -1
  87. package/dist/components/date-input.es.js +1 -1
  88. package/dist/components/date-picker.es.js +1 -1
  89. package/dist/components/date-range-picker.es.js +1 -1
  90. package/dist/components/form-field.es.js +1 -1
  91. package/dist/components/icon-button.es.js +1 -1
  92. package/dist/components/icon-toggle-button.es.js +1 -1
  93. package/dist/components/multiline-text-input.es.js +1 -1
  94. package/dist/components/nimbus-provider.es.js +1 -1
  95. package/dist/components/number-input.es.js +1 -1
  96. package/dist/components/pagination.es.js +1 -1
  97. package/dist/components/password-input.es.js +1 -1
  98. package/dist/components/progress-bar.es.js +1 -1
  99. package/dist/components/radio-input.es.js +1 -1
  100. package/dist/components/range-calendar.es.js +1 -1
  101. package/dist/components/rich-text-input.cjs +1 -1
  102. package/dist/components/rich-text-input.es.js +1 -1
  103. package/dist/components/select.es.js +1 -1
  104. package/dist/components/separator.cjs +2 -0
  105. package/dist/components/separator.cjs.map +1 -0
  106. package/dist/components/separator.es.js +5 -0
  107. package/dist/components/separator.es.js.map +1 -0
  108. package/dist/components/split-button.es.js +1 -1
  109. package/dist/components/switch.es.js +1 -1
  110. package/dist/components/tag-group.es.js +1 -1
  111. package/dist/components/text-input.es.js +1 -1
  112. package/dist/components/time-input.es.js +1 -1
  113. package/dist/components/toggle-button.es.js +1 -1
  114. package/dist/components/toolbar.es.js +1 -1
  115. package/dist/components.d.ts +74 -74
  116. package/dist/index.cjs +1 -1
  117. package/dist/index.cjs.map +1 -1
  118. package/dist/index.d.ts +74 -74
  119. package/dist/index.es.js +147 -147
  120. package/dist/{divider.d.ts → separator.d.ts} +14 -14
  121. package/dist/split-button.d.ts +1 -1
  122. package/package.json +5 -5
  123. package/dist/chunks/data-table-DFhiLq16.cjs.js +0 -2
  124. package/dist/chunks/divider-C11VwZPX.es.js +0 -50
  125. package/dist/chunks/divider-C11VwZPX.es.js.map +0 -1
  126. package/dist/chunks/divider-Lm98hgn6.cjs.js +0 -2
  127. package/dist/chunks/divider-Lm98hgn6.cjs.js.map +0 -1
  128. package/dist/chunks/split-button-ClVaxLZ7.es.js.map +0 -1
  129. package/dist/components/divider.cjs +0 -2
  130. package/dist/components/divider.cjs.map +0 -1
  131. package/dist/components/divider.es.js +0 -5
  132. package/dist/components/divider.es.js.map +0 -1
@@ -10,7 +10,7 @@ import { $ as V } from "./useControlledState-u436Wbp1.es.js";
10
10
  import { flushSync as L } from "react-dom";
11
11
  import { $ as Q } from "./useEvent-Bxxy8Y3o.es.js";
12
12
  import { $ as U } from "./SSRProvider-v-LddFEs.es.js";
13
- import { e as X } from "./extractStyleProps-vXiS8lCp.es.js";
13
+ import { e as X } from "./extractStyleProps-tYFaIfUG.es.js";
14
14
  import { KeyboardArrowRight as Y } from "@commercetools/nimbus-icons";
15
15
  import { Flex as Z } from "@chakra-ui/react/flex";
16
16
  function ee(n, e, d) {
@@ -273,4 +273,4 @@ export {
273
273
  xe as d,
274
274
  g as e
275
275
  };
276
- //# sourceMappingURL=accordion-D06jBMOb.es.js.map
276
+ //# sourceMappingURL=accordion-BOm1fDGE.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"accordion-D06jBMOb.es.js","sources":["../../../../node_modules/.pnpm/@react-aria+disclosure@3.0.8_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@react-aria/disclosure/dist/useDisclosure.mjs","../../../../node_modules/.pnpm/@react-stately+disclosure@3.0.7_react@19.1.0/node_modules/@react-stately/disclosure/dist/useDisclosureState.mjs","../../../../node_modules/.pnpm/@react-stately+disclosure@3.0.7_react@19.1.0/node_modules/@react-stately/disclosure/dist/useDisclosureGroupState.mjs","../../../../node_modules/.pnpm/react-aria-components@1.12.1_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 {flushSync as $6wN6e$flushSync} from \"react-dom\";\nimport {useRef as $6wN6e$useRef, useCallback as $6wN6e$useCallback, useEffect as $6wN6e$useEffect} from \"react\";\nimport {useId as $6wN6e$useId, useEvent as $6wN6e$useEvent, useLayoutEffect as $6wN6e$useLayoutEffect} from \"@react-aria/utils\";\nimport {useIsSSR as $6wN6e$useIsSSR} from \"@react-aria/ssr\";\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\nfunction $5e910fae8e128ead$export$6e3e27031a30522f(props, state, ref) {\n let { isDisabled: isDisabled } = props;\n let triggerId = (0, $6wN6e$useId)();\n let panelId = (0, $6wN6e$useId)();\n let isSSR = (0, $6wN6e$useIsSSR)();\n let supportsBeforeMatch = !isSSR && 'onbeforematch' in document.body;\n let raf = (0, $6wN6e$useRef)(null);\n let handleBeforeMatch = (0, $6wN6e$useCallback)(()=>{\n // Wait a frame to revert browser's removal of hidden attribute\n raf.current = requestAnimationFrame(()=>{\n if (ref.current) ref.current.setAttribute('hidden', 'until-found');\n });\n // Force sync state update\n (0, $6wN6e$flushSync)(()=>{\n state.toggle();\n });\n }, [\n ref,\n state\n ]);\n // @ts-ignore https://github.com/facebook/react/pull/24741\n (0, $6wN6e$useEvent)(ref, 'beforematch', supportsBeforeMatch ? handleBeforeMatch : null);\n (0, $6wN6e$useLayoutEffect)(()=>{\n // Cancel any pending RAF to prevent stale updates\n if (raf.current) cancelAnimationFrame(raf.current);\n // Until React supports hidden=\"until-found\": https://github.com/facebook/react/pull/24741\n if (supportsBeforeMatch && ref.current && !isDisabled) {\n if (state.isExpanded) ref.current.removeAttribute('hidden');\n else ref.current.setAttribute('hidden', 'until-found');\n }\n }, [\n isDisabled,\n ref,\n state.isExpanded,\n supportsBeforeMatch\n ]);\n (0, $6wN6e$useEffect)(()=>{\n return ()=>{\n if (raf.current) cancelAnimationFrame(raf.current);\n };\n }, []);\n return {\n buttonProps: {\n id: triggerId,\n 'aria-expanded': state.isExpanded,\n 'aria-controls': panelId,\n onPress: (e)=>{\n if (!isDisabled && e.pointerType !== 'keyboard') state.toggle();\n },\n isDisabled: isDisabled,\n onPressStart (e) {\n if (e.pointerType === 'keyboard' && !isDisabled) state.toggle();\n }\n },\n panelProps: {\n id: panelId,\n // This can be overridden at the panel element level.\n role: 'group',\n 'aria-labelledby': triggerId,\n 'aria-hidden': !state.isExpanded,\n hidden: supportsBeforeMatch ? true : !state.isExpanded\n }\n };\n}\n\n\nexport {$5e910fae8e128ead$export$6e3e27031a30522f as useDisclosure};\n//# sourceMappingURL=useDisclosure.module.js.map\n","import {useCallback as $acGV5$useCallback} from \"react\";\nimport {useControlledState as $acGV5$useControlledState} from \"@react-stately/utils\";\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 $bf996d45f4a36925$export$3fcbf6e4407997e0(props) {\n let [isExpanded, setExpanded] = (0, $acGV5$useControlledState)(props.isExpanded, props.defaultExpanded || false, props.onExpandedChange);\n const expand = (0, $acGV5$useCallback)(()=>{\n setExpanded(true);\n }, [\n setExpanded\n ]);\n const collapse = (0, $acGV5$useCallback)(()=>{\n setExpanded(false);\n }, [\n setExpanded\n ]);\n const toggle = (0, $acGV5$useCallback)(()=>{\n setExpanded(!isExpanded);\n }, [\n setExpanded,\n isExpanded\n ]);\n return {\n isExpanded: isExpanded,\n setExpanded: setExpanded,\n expand: expand,\n collapse: collapse,\n toggle: toggle\n };\n}\n\n\nexport {$bf996d45f4a36925$export$3fcbf6e4407997e0 as useDisclosureState};\n//# sourceMappingURL=useDisclosureState.module.js.map\n","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 type RecipeVariantProps,\n} from \"@chakra-ui/react/styled-system\";\nimport { accordionSlotRecipe } from \"./accordion.recipe\";\n\nconst { withProvider, withContext } = createSlotRecipeContext({\n key: \"accordion\",\n});\n\nexport type AccordionRootSlotProps = HTMLChakraProps<\n \"div\",\n RecipeVariantProps<typeof accordionSlotRecipe>\n>;\n\nexport const AccordionRootSlot = withProvider<\n HTMLDivElement,\n AccordionRootSlotProps\n>(\"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\";\n\nexport const AccordionHeader = ({\n children,\n ref,\n ...props\n}: AccordionHeaderProps) => {\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 >\n <AccordionTriggerSlot ref={ref} slot=\"trigger\" asChild>\n <RaButton {...props}>\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\";\n\n// Create Content component\nexport const AccordionContent = ({\n children,\n ref,\n ...props\n}: AccordionContentProps) => {\n return (\n <AccordionPanelSlot ref={ref} asChild>\n <RaDisclosurePanel {...props}>{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\";\n\nexport const AccordionItem = ({\n children,\n value,\n ref,\n ...props\n}: AccordionItemProps) => {\n const disclosureProps = {\n ...props,\n id: value, // React Aria uses id for the key\n };\n\n return (\n <AccordionDisclosureSlot data-value={value} ref={ref} asChild>\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":["$5e910fae8e128ead$export$6e3e27031a30522f","props","state","ref","isDisabled","triggerId","$6wN6e$useId","panelId","supportsBeforeMatch","$6wN6e$useIsSSR","raf","$6wN6e$useRef","handleBeforeMatch","$6wN6e$useCallback","$6wN6e$flushSync","$6wN6e$useEvent","$6wN6e$useLayoutEffect","$6wN6e$useEffect","e","$bf996d45f4a36925$export$3fcbf6e4407997e0","isExpanded","setExpanded","$acGV5$useControlledState","expand","$acGV5$useCallback","collapse","toggle","$9385b3affbdec831$export$f36461af0ef4707d","allowsMultipleExpanded","expandedKeys","setExpandedKeys","$j4gLc$useControlledState","$j4gLc$useMemo","$j4gLc$useEffect","firstKey","key","keys","$28f4fd908f0de97f$export$1d40e3e0cc4d5de","$hI1OT$createContext","$28f4fd908f0de97f$export$944aceb4f8c89f10","$hI1OT$forwardRef","$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","$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":";;;;;;;;;;;;;;;AAmBA,SAASA,GAA0CC,GAAOC,GAAOC,GAAK;AAClE,MAAI,EAAE,YAAYC,EAAU,IAAKH,GAC7BI,IAAgBC,EAAY,GAC5BC,IAAcD,EAAY,GAE1BE,IAAsB,CADVC,EAAe,KACK,mBAAmB,SAAS,MAC5DC,IAAUC,EAAe,IAAI,GAC7BC,IAAwBC,EAAoB,MAAI;AAEhD,IAAAH,EAAI,UAAU,sBAAsB,MAAI;AACpC,MAAIP,EAAI,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QAAA,gBAAAX,EAACb,IAAA,EAAqB,KAAA7E,GAAU,MAAK,WAAU,SAAO,IACpD,UAAA,gBAAAoG,EAACE,GAAA,EAAU,GAAGxG,GACZ,UAAA;AAAA,UAAA,gBAAA4F,EAACa,GAAA,EAAmB;AAAA,UACpB,gBAAAb,EAACX,IAAA,EAAoB,UAAAe,EAAc,KAAA,CAAK;AAAA,QAAA,EAAA,CAC1C,EAAA,CACF;AAAA,QACCA,EAAc,aAAa,SAAS,KACnC,gBAAAJ,EAACV,GAAA,EACE,YAAc,aAAA,CACjB;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAIR,GClDawB,KAAmB,CAAC;AAAA,EAC/B,UAAAX;AAAA,EACA,KAAA7F;AAAA,EACA,GAAGF;AACL,MAEI,gBAAA4F,EAACZ,IAAA,EAAmB,KAAA9E,GAAU,SAAO,IACnC,4BAACyG,IAAA,EAAmB,GAAG3G,GAAQ,UAAA+F,EAAA,CAAS,EAAA,CAC1C,GCTSa,KAAgB,CAAC;AAAA,EAC5B,UAAAb;AAAA,EACA,OAAAc;AAAA,EACA,KAAA3G;AAAA,EACA,GAAGF;AACL,MAA0B;AACxB,QAAM8G,IAAkB;AAAA,IACtB,GAAG9G;AAAA,IACH,IAAI6G;AAAA;AAAA,EAAA;AAGN,SACE,gBAAAjB,EAACd,IAAA,EAAwB,cAAY+B,GAAO,KAAA3G,GAAU,SAAO,IAC3D,UAAA,gBAAA0F,EAACmB,IAAA,EAAc,GAAGD,GAAkB,UAAAf,EAAA,CAAS,GAC/C;AAEJ,GCbaiB,KAAY;AAAA,EACvB,MAAM7B;AAAA,EACN,MAAMyB;AAAA,EACN,QAAQd;AAAA,EACR,SAASY;AAAA,EACT,oBAAoBxB;AACtB;","x_google_ignoreList":[0,1,2,3]}
1
+ {"version":3,"file":"accordion-BOm1fDGE.es.js","sources":["../../../../node_modules/.pnpm/@react-aria+disclosure@3.0.8_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@react-aria/disclosure/dist/useDisclosure.mjs","../../../../node_modules/.pnpm/@react-stately+disclosure@3.0.7_react@19.1.0/node_modules/@react-stately/disclosure/dist/useDisclosureState.mjs","../../../../node_modules/.pnpm/@react-stately+disclosure@3.0.7_react@19.1.0/node_modules/@react-stately/disclosure/dist/useDisclosureGroupState.mjs","../../../../node_modules/.pnpm/react-aria-components@1.12.1_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 {flushSync as $6wN6e$flushSync} from \"react-dom\";\nimport {useRef as $6wN6e$useRef, useCallback as $6wN6e$useCallback, useEffect as $6wN6e$useEffect} from \"react\";\nimport {useId as $6wN6e$useId, useEvent as $6wN6e$useEvent, useLayoutEffect as $6wN6e$useLayoutEffect} from \"@react-aria/utils\";\nimport {useIsSSR as $6wN6e$useIsSSR} from \"@react-aria/ssr\";\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\nfunction $5e910fae8e128ead$export$6e3e27031a30522f(props, state, ref) {\n let { isDisabled: isDisabled } = props;\n let triggerId = (0, $6wN6e$useId)();\n let panelId = (0, $6wN6e$useId)();\n let isSSR = (0, $6wN6e$useIsSSR)();\n let supportsBeforeMatch = !isSSR && 'onbeforematch' in document.body;\n let raf = (0, $6wN6e$useRef)(null);\n let handleBeforeMatch = (0, $6wN6e$useCallback)(()=>{\n // Wait a frame to revert browser's removal of hidden attribute\n raf.current = requestAnimationFrame(()=>{\n if (ref.current) ref.current.setAttribute('hidden', 'until-found');\n });\n // Force sync state update\n (0, $6wN6e$flushSync)(()=>{\n state.toggle();\n });\n }, [\n ref,\n state\n ]);\n // @ts-ignore https://github.com/facebook/react/pull/24741\n (0, $6wN6e$useEvent)(ref, 'beforematch', supportsBeforeMatch ? handleBeforeMatch : null);\n (0, $6wN6e$useLayoutEffect)(()=>{\n // Cancel any pending RAF to prevent stale updates\n if (raf.current) cancelAnimationFrame(raf.current);\n // Until React supports hidden=\"until-found\": https://github.com/facebook/react/pull/24741\n if (supportsBeforeMatch && ref.current && !isDisabled) {\n if (state.isExpanded) ref.current.removeAttribute('hidden');\n else ref.current.setAttribute('hidden', 'until-found');\n }\n }, [\n isDisabled,\n ref,\n state.isExpanded,\n supportsBeforeMatch\n ]);\n (0, $6wN6e$useEffect)(()=>{\n return ()=>{\n if (raf.current) cancelAnimationFrame(raf.current);\n };\n }, []);\n return {\n buttonProps: {\n id: triggerId,\n 'aria-expanded': state.isExpanded,\n 'aria-controls': panelId,\n onPress: (e)=>{\n if (!isDisabled && e.pointerType !== 'keyboard') state.toggle();\n },\n isDisabled: isDisabled,\n onPressStart (e) {\n if (e.pointerType === 'keyboard' && !isDisabled) state.toggle();\n }\n },\n panelProps: {\n id: panelId,\n // This can be overridden at the panel element level.\n role: 'group',\n 'aria-labelledby': triggerId,\n 'aria-hidden': !state.isExpanded,\n hidden: supportsBeforeMatch ? true : !state.isExpanded\n }\n };\n}\n\n\nexport {$5e910fae8e128ead$export$6e3e27031a30522f as useDisclosure};\n//# sourceMappingURL=useDisclosure.module.js.map\n","import {useCallback as $acGV5$useCallback} from \"react\";\nimport {useControlledState as $acGV5$useControlledState} from \"@react-stately/utils\";\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 $bf996d45f4a36925$export$3fcbf6e4407997e0(props) {\n let [isExpanded, setExpanded] = (0, $acGV5$useControlledState)(props.isExpanded, props.defaultExpanded || false, props.onExpandedChange);\n const expand = (0, $acGV5$useCallback)(()=>{\n setExpanded(true);\n }, [\n setExpanded\n ]);\n const collapse = (0, $acGV5$useCallback)(()=>{\n setExpanded(false);\n }, [\n setExpanded\n ]);\n const toggle = (0, $acGV5$useCallback)(()=>{\n setExpanded(!isExpanded);\n }, [\n setExpanded,\n isExpanded\n ]);\n return {\n isExpanded: isExpanded,\n setExpanded: setExpanded,\n expand: expand,\n collapse: collapse,\n toggle: toggle\n };\n}\n\n\nexport {$bf996d45f4a36925$export$3fcbf6e4407997e0 as useDisclosureState};\n//# sourceMappingURL=useDisclosureState.module.js.map\n","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 type RecipeVariantProps,\n} from \"@chakra-ui/react/styled-system\";\nimport { accordionSlotRecipe } from \"./accordion.recipe\";\n\nconst { withProvider, withContext } = createSlotRecipeContext({\n key: \"accordion\",\n});\n\nexport type AccordionRootSlotProps = HTMLChakraProps<\n \"div\",\n RecipeVariantProps<typeof accordionSlotRecipe>\n>;\n\nexport const AccordionRootSlot = withProvider<\n HTMLDivElement,\n AccordionRootSlotProps\n>(\"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\";\n\nexport const AccordionHeader = ({\n children,\n ref,\n ...props\n}: AccordionHeaderProps) => {\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 >\n <AccordionTriggerSlot ref={ref} slot=\"trigger\" asChild>\n <RaButton {...props}>\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\";\n\n// Create Content component\nexport const AccordionContent = ({\n children,\n ref,\n ...props\n}: AccordionContentProps) => {\n return (\n <AccordionPanelSlot ref={ref} asChild>\n <RaDisclosurePanel {...props}>{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\";\n\nexport const AccordionItem = ({\n children,\n value,\n ref,\n ...props\n}: AccordionItemProps) => {\n const disclosureProps = {\n ...props,\n id: value, // React Aria uses id for the key\n };\n\n return (\n <AccordionDisclosureSlot data-value={value} ref={ref} asChild>\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":["$5e910fae8e128ead$export$6e3e27031a30522f","props","state","ref","isDisabled","triggerId","$6wN6e$useId","panelId","supportsBeforeMatch","$6wN6e$useIsSSR","raf","$6wN6e$useRef","handleBeforeMatch","$6wN6e$useCallback","$6wN6e$flushSync","$6wN6e$useEvent","$6wN6e$useLayoutEffect","$6wN6e$useEffect","e","$bf996d45f4a36925$export$3fcbf6e4407997e0","isExpanded","setExpanded","$acGV5$useControlledState","expand","$acGV5$useCallback","collapse","toggle","$9385b3affbdec831$export$f36461af0ef4707d","allowsMultipleExpanded","expandedKeys","setExpandedKeys","$j4gLc$useControlledState","$j4gLc$useMemo","$j4gLc$useEffect","firstKey","key","keys","$28f4fd908f0de97f$export$1d40e3e0cc4d5de","$hI1OT$createContext","$28f4fd908f0de97f$export$944aceb4f8c89f10","$hI1OT$forwardRef","$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","$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":";;;;;;;;;;;;;;;AAmBA,SAASA,GAA0CC,GAAOC,GAAOC,GAAK;AAClE,MAAI,EAAE,YAAYC,EAAU,IAAKH,GAC7BI,IAAgBC,EAAY,GAC5BC,IAAcD,EAAY,GAE1BE,IAAsB,CADVC,EAAe,KACK,mBAAmB,SAAS,MAC5DC,IAAUC,EAAe,IAAI,GAC7BC,IAAwBC,EAAoB,MAAI;AAEhD,IAAAH,EAAI,UAAU,sBAAsB,MA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AA,MAEZ,UAAA;AAAA,QAAA,gBAAAX,EAACb,IAAA,EAAqB,KAAA7E,GAAU,MAAK,WAAU,SAAO,IACpD,UAAA,gBAAAoG,EAACE,GAAA,EAAU,GAAGxG,GACZ,UAAA;AAAA,UAAA,gBAAA4F,EAACa,GAAA,EAAmB;AAAA,UACpB,gBAAAb,EAACX,IAAA,EAAoB,UAAAe,EAAc,KAAA,CAAK;AAAA,QAAA,EAAA,CAC1C,EAAA,CACF;AAAA,QACCA,EAAc,aAAa,SAAS,KACnC,gBAAAJ,EAACV,GAAA,EACE,YAAc,aAAA,CACjB;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAIR,GClDawB,KAAmB,CAAC;AAAA,EAC/B,UAAAX;AAAA,EACA,KAAA7F;AAAA,EACA,GAAGF;AACL,MAEI,gBAAA4F,EAACZ,IAAA,EAAmB,KAAA9E,GAAU,SAAO,IACnC,4BAACyG,IAAA,EAAmB,GAAG3G,GAAQ,UAAA+F,EAAA,CAAS,EAAA,CAC1C,GCTSa,KAAgB,CAAC;AAAA,EAC5B,UAAAb;AAAA,EACA,OAAAc;AAAA,EACA,KAAA3G;AAAA,EACA,GAAGF;AACL,MAA0B;AACxB,QAAM8G,IAAkB;AAAA,IACtB,GAAG9G;AAAA,IACH,IAAI6G;AAAA;AAAA,EAAA;AAGN,SACE,gBAAAjB,EAACd,IAAA,EAAwB,cAAY+B,GAAO,KAAA3G,GAAU,SAAO,IAC3D,UAAA,gBAAA0F,EAACmB,IAAA,EAAc,GAAGD,GAAkB,UAAAf,EAAA,CAAS,GAC/C;AAEJ,GCbaiB,KAAY;AAAA,EACvB,MAAM7B;AAAA,EACN,MAAMyB;AAAA,EACN,QAAQd;AAAA,EACR,SAASY;AAAA,EACT,oBAAoBxB;AACtB;","x_google_ignoreList":[0,1,2,3]}
@@ -4,7 +4,7 @@ import { defineSlotRecipe as w, createSlotRecipeContext as R } from "@chakra-ui/
4
4
  import { B as I } from "./box-DuBoAZvq.es.js";
5
5
  import { S as y } from "./stack-CoNreM7B.es.js";
6
6
  import { CheckCircleOutline as E, WarningAmber as S, Info as $, ErrorOutline as M, Clear as k } from "@commercetools/nimbus-icons";
7
- import { I as j } from "./icon-button-CKidhzN0.es.js";
7
+ import { I as j } from "./icon-button-uSoUy0va.es.js";
8
8
  import { defineMessages as O, useIntl as W } from "react-intl";
9
9
  const z = /* @__PURE__ */ w({
10
10
  slots: ["root", "title", "description", "icon", "actions", "dismissButton"],
@@ -190,4 +190,4 @@ export {
190
190
  D as d,
191
191
  h as e
192
192
  };
193
- //# sourceMappingURL=alert-L8PXimjc.es.js.map
193
+ //# sourceMappingURL=alert-AElDV5sG.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"alert-L8PXimjc.es.js","sources":["../../src/components/alert/alert.recipe.tsx","../../src/components/alert/alert.slots.tsx","../../src/components/alert/components/alert.root.tsx","../../src/components/alert/components/alert.title.tsx","../../src/components/alert/components/alert.description.tsx","../../src/components/alert/components/alert.actions.tsx","../../src/components/alert/alert.i18n.ts","../../src/components/alert/components/alert.dismiss-button.tsx","../../src/components/alert/alert.tsx"],"sourcesContent":["import { defineSlotRecipe } from \"@chakra-ui/react/styled-system\";\n/**\n * Recipe configuration for the Alert component.\n * Defines the styling variants and base styles using Chakra UI's recipe system.\n */\nexport const alertRecipe = defineSlotRecipe({\n slots: [\"root\", \"title\", \"description\", \"icon\", \"actions\", \"dismissButton\"],\n // Unique class name prefix for the component\n className: \"nimbus-alert\",\n\n // Base styles applied to all instances of the component\n base: {\n root: {\n display: \"inline-flex\",\n flexDirection: \"row\",\n gap: \"200\",\n width: \"100%\",\n },\n icon: {\n marginTop: \"50\",\n \"& svg\": {\n width: \"500\",\n height: \"500\",\n color: \"colorPalette.11\",\n },\n },\n title: {\n color: \"colorPalette.11\",\n },\n description: {\n color: \"colorPalette.11\",\n },\n },\n\n variants: {\n tone: {\n critical: {\n root: { colorPalette: \"critical\" },\n },\n info: {\n root: { colorPalette: \"info\" },\n },\n warning: {\n root: { colorPalette: \"amber\" },\n },\n positive: {\n root: { colorPalette: \"positive\" },\n },\n },\n\n variant: {\n flat: {},\n outlined: {\n root: {\n border: \"solid-25\",\n borderColor: \"colorPalette.5\",\n backgroundColor: \"colorPalette.2\",\n padding: \"200\",\n borderRadius: \"200\",\n },\n },\n },\n },\n});\n","import { createSlotRecipeContext } from \"@chakra-ui/react/styled-system\";\nimport { alertRecipe } from \"./alert.recipe\";\nimport type {\n AlertActionsProps,\n AlertDescriptionProps,\n AlertDismissButtonProps,\n AlertIconProps,\n AlertRootProps,\n AlertTitleProps,\n} from \"./alert.types\";\n\nconst { withProvider, withContext } = createSlotRecipeContext({\n recipe: alertRecipe,\n});\n\nexport const AlertRoot = withProvider<HTMLDivElement, AlertRootProps>(\n \"div\",\n \"root\"\n);\n\nexport const AlertTitle = withContext<HTMLDivElement, AlertTitleProps>(\n \"div\",\n \"title\"\n);\n\nexport const AlertDescription = withContext<\n HTMLDivElement,\n AlertDescriptionProps\n>(\"div\", \"description\");\n\nexport const AlertIcon = withContext<HTMLDivElement, AlertIconProps>(\n \"div\",\n \"icon\"\n);\n\nexport const AlertActions = withContext<HTMLDivElement, AlertActionsProps>(\n \"div\",\n \"actions\"\n);\n\n// This is a div wrapper for layout placement - note that we expect it to receive `IconButton` props, but we use a `div`.\n// We then forward the consumer props to the interior `IconButton` component.\nexport const AlertDismissButton = withContext<\n HTMLDivElement,\n AlertDismissButtonProps\n>(\"div\", \"dismissButton\");\n","import { createContext, useMemo, useState, type ReactNode } from \"react\";\nimport { AlertRoot as AlertRootSlot, AlertIcon } from \"../alert.slots\";\nimport type { AlertProps, AlertRootComponent } from \"../alert.types\";\nimport { Box } from \"../../box\";\nimport { Stack } from \"../../stack\";\nimport {\n CheckCircleOutline,\n ErrorOutline,\n Info,\n WarningAmber,\n} from \"@commercetools/nimbus-icons\";\n\nconst getIconFromTone = (tone: AlertProps[\"tone\"]) => {\n switch (tone) {\n case \"critical\":\n return <ErrorOutline />;\n case \"info\":\n return <Info />;\n case \"warning\":\n return <WarningAmber />;\n case \"positive\":\n return <CheckCircleOutline />;\n default:\n return null;\n }\n};\n\ntype AlertContextValue = {\n setTitle: (title: ReactNode) => void;\n setDescription: (description: ReactNode) => void;\n setActions: (actions: ReactNode) => void;\n setDismiss: (dismiss: ReactNode) => void;\n};\n\nexport const AlertContext = createContext<AlertContextValue | undefined>(\n undefined\n);\n\n/**\n * # Alert\n *\n * Provides feedback to the user about the status of an action or system event\n *\n * @see {@link https://nimbus-documentation.vercel.app/components/feedback/alert}\n */\nexport const AlertRoot: AlertRootComponent = (props) => {\n const { ref, children, ...restProps } = props;\n const [titleNode, setTitle] = useState<ReactNode>(null);\n const [descriptionNode, setDescription] = useState<ReactNode>(null);\n const [actionsNode, setActions] = useState<ReactNode>(null);\n const [dismissNode, setDismiss] = useState<ReactNode>(null);\n\n // Memoize the context value so we don't cause unnecessary re-renders\n const contextValue = useMemo(\n () => ({\n setTitle,\n setDescription,\n setActions,\n setDismiss,\n }),\n [setTitle, setDescription, setActions, setDismiss]\n );\n\n return (\n <AlertContext.Provider value={contextValue}>\n <AlertRootSlot ref={ref} {...restProps} role=\"alert\">\n <AlertIcon alignItems=\"flex-start\">\n {getIconFromTone(restProps.tone)}\n </AlertIcon>\n <Stack flex=\"1\" gap=\"200\">\n <Box>\n {titleNode}\n {descriptionNode}\n </Box>\n {actionsNode}\n </Stack>\n {dismissNode}\n\n {children}\n </AlertRootSlot>\n </AlertContext.Provider>\n );\n};\n\nAlertRoot.displayName = \"Alert.Root\";\n","import { useContext, useEffect } from \"react\";\nimport { AlertTitle as AlertTitleSlot } from \"../alert.slots\";\nimport type { AlertTitleProps } from \"../alert.types\";\nimport { AlertContext } from \"./alert.root\";\n\nexport const AlertTitle = ({ children, ...props }: AlertTitleProps) => {\n const context = useContext(AlertContext);\n\n useEffect(() => {\n if (context) {\n const slotElement = (\n <AlertTitleSlot {...props} fontWeight=\"600\">\n {children}\n </AlertTitleSlot>\n );\n // Register it with the parent\n context.setTitle(slotElement);\n\n // On unmount, remove it\n return () => context.setTitle(null);\n }\n }, [children, props]);\n\n return null;\n};\n\nAlertTitle.displayName = \"Alert.Title\";\n","import { useContext, useEffect } from \"react\";\nimport { AlertDescription as AlertDescriptionSlot } from \"../alert.slots\";\nimport type { AlertDescriptionProps } from \"../alert.types\";\nimport { AlertContext } from \"./alert.root\";\n\nexport const AlertDescription = ({\n children,\n ...props\n}: AlertDescriptionProps) => {\n const context = useContext(AlertContext);\n\n useEffect(() => {\n if (context) {\n const slotElement = (\n <AlertDescriptionSlot {...props}>{children}</AlertDescriptionSlot>\n );\n // Register it with the parent\n context.setDescription(slotElement);\n\n // On unmount, remove it\n return () => context.setDescription(null);\n }\n }, [children, props]);\n\n return null;\n};\n\nAlertDescription.displayName = \"Alert.Description\";\n","import { useContext, useEffect } from \"react\";\nimport { AlertActions as AlertActionsSlot } from \"../alert.slots\";\nimport type { AlertActionsProps } from \"../alert.types\";\nimport { AlertContext } from \"./alert.root\";\n\nexport const AlertActions = ({ children, ...props }: AlertActionsProps) => {\n const context = useContext(AlertContext);\n\n useEffect(() => {\n if (context) {\n const slotElement = (\n <AlertActionsSlot {...props}>{children}</AlertActionsSlot>\n );\n // Register it with the parent\n context.setActions(slotElement);\n\n // On unmount, remove it\n return () => context.setActions(null);\n }\n }, [children, props]);\n\n return null;\n};\n\nAlertActions.displayName = \"Alert.Actions\";\n","import { defineMessages } from \"react-intl\";\n\nexport const messages = defineMessages({\n dismiss: {\n id: \"Nimbus.Alert.dismiss\",\n description: \"aria-label for dismiss button in alert\",\n defaultMessage: \"Dismiss\",\n },\n});\n","import { useContext, useEffect } from \"react\";\nimport { AlertDismissButton as AlertDismissButtonSlot } from \"../alert.slots\";\nimport type { AlertDismissButtonProps } from \"../alert.types\";\nimport { Clear } from \"@commercetools/nimbus-icons\";\nimport { IconButton } from \"../../icon-button\";\nimport { AlertContext } from \"./alert.root\";\nimport { useIntl } from \"react-intl\";\nimport { messages } from \"../alert.i18n\";\n\nexport const AlertDismissButton = ({\n children,\n ...props\n}: AlertDismissButtonProps) => {\n const context = useContext(AlertContext);\n const intl = useIntl();\n\n useEffect(() => {\n if (context) {\n const slotElement = (\n <AlertDismissButtonSlot>\n <IconButton\n aria-label={intl.formatMessage(messages.dismiss)}\n {...props}\n variant=\"ghost\"\n size=\"2xs\"\n >\n <Clear role=\"img\" />\n </IconButton>\n </AlertDismissButtonSlot>\n );\n // Register it with the parent\n context.setDismiss(slotElement);\n\n // On unmount, remove it\n return () => context.setDismiss(null);\n }\n }, [children, props]);\n\n return null;\n};\n\nAlertDismissButton.displayName = \"Alert.DismissButton\";\n","import { AlertTitle } from \"./components/alert.title\";\nimport { AlertDescription } from \"./components/alert.description\";\nimport { AlertActions } from \"./components/alert.actions\";\nimport { AlertDismissButton } from \"./components/alert.dismiss-button\";\nimport { AlertRoot } from \"./components/alert.root\";\n\n/**\n * Alert\n * ============================================================\n * Provides feedback to the user about the status of an action or system event\n */\nexport const Alert = {\n Root: AlertRoot,\n Title: AlertTitle,\n Description: AlertDescription,\n Actions: AlertActions,\n DismissButton: AlertDismissButton,\n};\n\n// exports for internal use by react-docgen\nexport {\n AlertRoot as _AlertRoot,\n AlertTitle as _AlertTitle,\n AlertDescription as _AlertDescription,\n AlertActions as _AlertActions,\n AlertDismissButton as _AlertDismissButton,\n};\n"],"names":["alertRecipe","defineSlotRecipe","withProvider","withContext","createSlotRecipeContext","AlertRoot","AlertTitle","AlertDescription","AlertIcon","AlertActions","AlertDismissButton","getIconFromTone","tone","ErrorOutline","Info","WarningAmber","CheckCircleOutline","AlertContext","createContext","props","ref","children","restProps","titleNode","setTitle","useState","descriptionNode","setDescription","actionsNode","setActions","dismissNode","setDismiss","contextValue","useMemo","jsx","jsxs","AlertRootSlot","Stack","Box","context","useContext","useEffect","slotElement","AlertTitleSlot","AlertDescriptionSlot","AlertActionsSlot","messages","defineMessages","intl","useIntl","AlertDismissButtonSlot","IconButton","Clear","Alert"],"mappings":";;;;;;;;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AA,IACtC;AAAA,EACF,GAAG,CAAClB,GAAUF,CAAK,CAAC,GAEb;AACT;AAEAV,EAAa,cAAc;ACtBpB,MAAMqC,IAAW,gBAAAC,EAAe;AAAA,EACrC,SAAS;AAAA,IACP,IAAI;AAAA,IACJ,aAAa;AAAA,IACb,gBAAgB;AAAA,EAAA;AAEpB,CAAC,GCCYrC,IAAqB,CAAC;AAAA,EACjC,UAAAW;AAAA,EACA,GAAGF;AACL,MAA+B;AAC7B,QAAMoB,IAAUC,EAAWvB,CAAY,GACjC+B,IAAOC,EAAA;AAEb,SAAAR,EAAU,MAAM;AACd,QAAIF,GAAS;AACX,YAAMG,sBACHQ,GAAA,EACC,UAAA,gBAAAhB;AAAA,QAACiB;AAAA,QAAA;AAAA,UACC,cAAYH,EAAK,cAAcF,EAAS,OAAO;AAAA,UAC9C,GAAG3B;AAAA,UACJ,SAAQ;AAAA,UACR,MAAK;AAAA,UAEL,UAAA,gBAAAe,EAACkB,GAAA,EAAM,MAAK,MAAA,CAAM;AAAA,QAAA;AAAA,MAAA,GAEtB;AAGF,aAAAb,EAAQ,WAAWG,CAAW,GAGvB,MAAMH,EAAQ,WAAW,IAAI;AAAA,IACtC;AAAA,EACF,GAAG,CAAClB,GAAUF,CAAK,CAAC,GAEb;AACT;AAEAT,EAAmB,cAAc;AC9B1B,MAAM2C,KAAQ;AAAA,EACnB,MAAMhD;AAAA,EACN,OAAOC;AAAA,EACP,aAAaC;AAAA,EACb,SAASE;AAAA,EACT,eAAeC;AACjB;"}
1
+ {"version":3,"file":"alert-AElDV5sG.es.js","sources":["../../src/components/alert/alert.recipe.tsx","../../src/components/alert/alert.slots.tsx","../../src/components/alert/components/alert.root.tsx","../../src/components/alert/components/alert.title.tsx","../../src/components/alert/components/alert.description.tsx","../../src/components/alert/components/alert.actions.tsx","../../src/components/alert/alert.i18n.ts","../../src/components/alert/components/alert.dismiss-button.tsx","../../src/components/alert/alert.tsx"],"sourcesContent":["import { defineSlotRecipe } from \"@chakra-ui/react/styled-system\";\n/**\n * Recipe configuration for the Alert component.\n * Defines the styling variants and base styles using Chakra UI's recipe system.\n */\nexport const alertRecipe = defineSlotRecipe({\n slots: [\"root\", \"title\", \"description\", \"icon\", \"actions\", \"dismissButton\"],\n // Unique class name prefix for the component\n className: \"nimbus-alert\",\n\n // Base styles applied to all instances of the component\n base: {\n root: {\n display: \"inline-flex\",\n flexDirection: \"row\",\n gap: \"200\",\n width: \"100%\",\n },\n icon: {\n marginTop: \"50\",\n \"& svg\": {\n width: \"500\",\n height: \"500\",\n color: \"colorPalette.11\",\n },\n },\n title: {\n color: \"colorPalette.11\",\n },\n description: {\n color: \"colorPalette.11\",\n },\n },\n\n variants: {\n tone: {\n critical: {\n root: { colorPalette: \"critical\" },\n },\n info: {\n root: { colorPalette: \"info\" },\n },\n warning: {\n root: { colorPalette: \"amber\" },\n },\n positive: {\n root: { colorPalette: \"positive\" },\n },\n },\n\n variant: {\n flat: {},\n outlined: {\n root: {\n border: \"solid-25\",\n borderColor: \"colorPalette.5\",\n backgroundColor: \"colorPalette.2\",\n padding: \"200\",\n borderRadius: \"200\",\n },\n },\n },\n },\n});\n","import { createSlotRecipeContext } from \"@chakra-ui/react/styled-system\";\nimport { alertRecipe } from \"./alert.recipe\";\nimport type {\n AlertActionsProps,\n AlertDescriptionProps,\n AlertDismissButtonProps,\n AlertIconProps,\n AlertRootProps,\n AlertTitleProps,\n} from \"./alert.types\";\n\nconst { withProvider, withContext } = createSlotRecipeContext({\n recipe: alertRecipe,\n});\n\nexport const AlertRoot = withProvider<HTMLDivElement, AlertRootProps>(\n \"div\",\n \"root\"\n);\n\nexport const AlertTitle = withContext<HTMLDivElement, AlertTitleProps>(\n \"div\",\n \"title\"\n);\n\nexport const AlertDescription = withContext<\n HTMLDivElement,\n AlertDescriptionProps\n>(\"div\", \"description\");\n\nexport const AlertIcon = withContext<HTMLDivElement, AlertIconProps>(\n \"div\",\n \"icon\"\n);\n\nexport const AlertActions = withContext<HTMLDivElement, AlertActionsProps>(\n \"div\",\n \"actions\"\n);\n\n// This is a div wrapper for layout placement - note that we expect it to receive `IconButton` props, but we use a `div`.\n// We then forward the consumer props to the interior `IconButton` component.\nexport const AlertDismissButton = withContext<\n HTMLDivElement,\n AlertDismissButtonProps\n>(\"div\", \"dismissButton\");\n","import { createContext, useMemo, useState, type ReactNode } from \"react\";\nimport { AlertRoot as AlertRootSlot, AlertIcon } from \"../alert.slots\";\nimport type { AlertProps, AlertRootComponent } from \"../alert.types\";\nimport { Box } from \"../../box\";\nimport { Stack } from \"../../stack\";\nimport {\n CheckCircleOutline,\n ErrorOutline,\n Info,\n WarningAmber,\n} from \"@commercetools/nimbus-icons\";\n\nconst getIconFromTone = (tone: AlertProps[\"tone\"]) => {\n switch (tone) {\n case \"critical\":\n return <ErrorOutline />;\n case \"info\":\n return <Info />;\n case \"warning\":\n return <WarningAmber />;\n case \"positive\":\n return <CheckCircleOutline />;\n default:\n return null;\n }\n};\n\ntype AlertContextValue = {\n setTitle: (title: ReactNode) => void;\n setDescription: (description: ReactNode) => void;\n setActions: (actions: ReactNode) => void;\n setDismiss: (dismiss: ReactNode) => void;\n};\n\nexport const AlertContext = createContext<AlertContextValue | undefined>(\n undefined\n);\n\n/**\n * # Alert\n *\n * Provides feedback to the user about the status of an action or system event\n *\n * @see {@link https://nimbus-documentation.vercel.app/components/feedback/alert}\n */\nexport const AlertRoot: AlertRootComponent = (props) => {\n const { ref, children, ...restProps } = props;\n const [titleNode, setTitle] = useState<ReactNode>(null);\n const [descriptionNode, setDescription] = useState<ReactNode>(null);\n const [actionsNode, setActions] = useState<ReactNode>(null);\n const [dismissNode, setDismiss] = useState<ReactNode>(null);\n\n // Memoize the context value so we don't cause unnecessary re-renders\n const contextValue = useMemo(\n () => ({\n setTitle,\n setDescription,\n setActions,\n setDismiss,\n }),\n [setTitle, setDescription, setActions, setDismiss]\n );\n\n return (\n <AlertContext.Provider value={contextValue}>\n <AlertRootSlot ref={ref} {...restProps} role=\"alert\">\n <AlertIcon alignItems=\"flex-start\">\n {getIconFromTone(restProps.tone)}\n </AlertIcon>\n <Stack flex=\"1\" gap=\"200\">\n <Box>\n {titleNode}\n {descriptionNode}\n </Box>\n {actionsNode}\n </Stack>\n {dismissNode}\n\n {children}\n </AlertRootSlot>\n </AlertContext.Provider>\n );\n};\n\nAlertRoot.displayName = \"Alert.Root\";\n","import { useContext, useEffect } from \"react\";\nimport { AlertTitle as AlertTitleSlot } from \"../alert.slots\";\nimport type { AlertTitleProps } from \"../alert.types\";\nimport { AlertContext } from \"./alert.root\";\n\nexport const AlertTitle = ({ children, ...props }: AlertTitleProps) => {\n const context = useContext(AlertContext);\n\n useEffect(() => {\n if (context) {\n const slotElement = (\n <AlertTitleSlot {...props} fontWeight=\"600\">\n {children}\n </AlertTitleSlot>\n );\n // Register it with the parent\n context.setTitle(slotElement);\n\n // On unmount, remove it\n return () => context.setTitle(null);\n }\n }, [children, props]);\n\n return null;\n};\n\nAlertTitle.displayName = \"Alert.Title\";\n","import { useContext, useEffect } from \"react\";\nimport { AlertDescription as AlertDescriptionSlot } from \"../alert.slots\";\nimport type { AlertDescriptionProps } from \"../alert.types\";\nimport { AlertContext } from \"./alert.root\";\n\nexport const AlertDescription = ({\n children,\n ...props\n}: AlertDescriptionProps) => {\n const context = useContext(AlertContext);\n\n useEffect(() => {\n if (context) {\n const slotElement = (\n <AlertDescriptionSlot {...props}>{children}</AlertDescriptionSlot>\n );\n // Register it with the parent\n context.setDescription(slotElement);\n\n // On unmount, remove it\n return () => context.setDescription(null);\n }\n }, [children, props]);\n\n return null;\n};\n\nAlertDescription.displayName = \"Alert.Description\";\n","import { useContext, useEffect } from \"react\";\nimport { AlertActions as AlertActionsSlot } from \"../alert.slots\";\nimport type { AlertActionsProps } from \"../alert.types\";\nimport { AlertContext } from \"./alert.root\";\n\nexport const AlertActions = ({ children, ...props }: AlertActionsProps) => {\n const context = useContext(AlertContext);\n\n useEffect(() => {\n if (context) {\n const slotElement = (\n <AlertActionsSlot {...props}>{children}</AlertActionsSlot>\n );\n // Register it with the parent\n context.setActions(slotElement);\n\n // On unmount, remove it\n return () => context.setActions(null);\n }\n }, [children, props]);\n\n return null;\n};\n\nAlertActions.displayName = \"Alert.Actions\";\n","import { defineMessages } from \"react-intl\";\n\nexport const messages = defineMessages({\n dismiss: {\n id: \"Nimbus.Alert.dismiss\",\n description: \"aria-label for dismiss button in alert\",\n defaultMessage: \"Dismiss\",\n },\n});\n","import { useContext, useEffect } from \"react\";\nimport { AlertDismissButton as AlertDismissButtonSlot } from \"../alert.slots\";\nimport type { AlertDismissButtonProps } from \"../alert.types\";\nimport { Clear } from \"@commercetools/nimbus-icons\";\nimport { IconButton } from \"../../icon-button\";\nimport { AlertContext } from \"./alert.root\";\nimport { useIntl } from \"react-intl\";\nimport { messages } from \"../alert.i18n\";\n\nexport const AlertDismissButton = ({\n children,\n ...props\n}: AlertDismissButtonProps) => {\n const context = useContext(AlertContext);\n const intl = useIntl();\n\n useEffect(() => {\n if (context) {\n const slotElement = (\n <AlertDismissButtonSlot>\n <IconButton\n aria-label={intl.formatMessage(messages.dismiss)}\n {...props}\n variant=\"ghost\"\n size=\"2xs\"\n >\n <Clear role=\"img\" />\n </IconButton>\n </AlertDismissButtonSlot>\n );\n // Register it with the parent\n context.setDismiss(slotElement);\n\n // On unmount, remove it\n return () => context.setDismiss(null);\n }\n }, [children, props]);\n\n return null;\n};\n\nAlertDismissButton.displayName = \"Alert.DismissButton\";\n","import { AlertTitle } from \"./components/alert.title\";\nimport { AlertDescription } from \"./components/alert.description\";\nimport { AlertActions } from \"./components/alert.actions\";\nimport { AlertDismissButton } from \"./components/alert.dismiss-button\";\nimport { AlertRoot } from \"./components/alert.root\";\n\n/**\n * Alert\n * ============================================================\n * Provides feedback to the user about the status of an action or system event\n */\nexport const Alert = {\n Root: AlertRoot,\n Title: AlertTitle,\n Description: AlertDescription,\n Actions: AlertActions,\n DismissButton: AlertDismissButton,\n};\n\n// exports for internal use by react-docgen\nexport {\n AlertRoot as _AlertRoot,\n AlertTitle as _AlertTitle,\n AlertDescription as _AlertDescription,\n AlertActions as _AlertActions,\n AlertDismissButton as _AlertDismissButton,\n};\n"],"names":["alertRecipe","defineSlotRecipe","withProvider","withContext","createSlotRecipeContext","AlertRoot","AlertTitle","AlertDescription","AlertIcon","AlertActions","AlertDismissButton","getIconFromTone","tone","ErrorOutline","Info","WarningAmber","CheckCircleOutline","AlertContext","createContext","props","ref","children","restProps","titleNode","setTitle","useState","descriptionNode","setDescription","actionsNode","setActions","dismissNode","setDismiss","contextValue","useMemo","jsx","jsxs","AlertRootSlot","Stack","Box","context","useContext","useEffect","slotElement","AlertTitleSlot","AlertDescriptionSlot","AlertActionsSlot","messages","defineMessages","intl","useIntl","AlertDismissButtonSlot","IconButton","Clear","Alert"],"mappings":";;;;;;;;AAKO,MAAMA,IAAc,gBAAAC,EAAiB;AAAA,EAC1C,OAAO,CAAC,QAAQ,SAAS,eAAe,QAAQ,WAAW,eAAe;AAAA;AAAA,EAE1E,WAAW;AAAA;AAAA,EAGX,MAAM;AAAA,IACJ,MAAM;AAAA,MACJ,SAAS;AAAA,MACT,eAAe;AAAA,MACf,KAAK;AAAA,MACL,OAAO;AAAA,IAAA;AAAA,IAET,MAAM;AAAA,MACJ,WAAW;AAAA,MACX,SAAS;AAAA,QACP,OAAO;AAAA,QACP,QAAQ;AAAA,QACR,OAAO;AAAA,MAAA;AAAA,IACT;AAAA,IAEF,OAAO;AAAA,MACL,OAAO;AAAA,IAAA;AAAA,IAET,aAAa;AAAA,MACX,OAAO;AAAA,IAAA;AAAA,EACT;AAAA,EAGF,UAAU;AAAA,IACR,MAAM;AAAA,MACJ,UAAU;AAAA,QACR,MAAM,EAAE,cAAc,WAAA;AAAA,MAAW;AAAA,MAEnC,MAAM;AAAA,QACJ,MAAM,EAAE,cAAc,OAAA;AAAA,MAAO;AAAA,MAE/B,SAAS;AAAA,QACP,MAAM,EAAE,cAAc,QAAA;AAAA,MAAQ;AAAA,MAEhC,U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;AAAA,IACtC;AAAA,EACF,GAAG,CAAClB,GAAUF,CAAK,CAAC,GAEb;AACT;AAEAT,EAAmB,cAAc;AC9B1B,MAAM2C,KAAQ;AAAA,EACnB,MAAMhD;AAAA,EACN,OAAOC;AAAA,EACP,aAAaC;AAAA,EACb,SAASE;AAAA,EACT,eAAeC;AACjB;"}
@@ -6,7 +6,7 @@ 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-BZioZQfA.es.js";
9
+ import { s as h } from "./index-B68rhcD_.es.js";
10
10
  import { $ as y } from "./useObjectRef-CaJ5pgjX.es.js";
11
11
  import { $ as B } from "./mergeProps-uJMZqSEt.es.js";
12
12
  import { $ as v } from "./useButton-CYfXo2Jm.es.js";
@@ -56,4 +56,4 @@ D.displayName = "Button";
56
56
  export {
57
57
  D as B
58
58
  };
59
- //# sourceMappingURL=button-BXR4T980.es.js.map
59
+ //# sourceMappingURL=button-BQ3kiG-V.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"button-BXR4T980.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
+ {"version":3,"file":"button-BQ3kiG-V.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":";;;;;;;;;;;;AA2B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
  import { c as D, d as z } from "./utils-CsKCu3xh.es.js";
7
7
  import { B as P } from "./box-DuBoAZvq.es.js";
8
8
  import { $ as R } from "./context-DHW7D0wv.es.js";
9
- import { I as h } from "./icon-button-CKidhzN0.es.js";
9
+ import { I as h } from "./icon-button-uSoUy0va.es.js";
10
10
  import { T as u } from "./text-Bi4Gre95.es.js";
11
11
  import { S as x } from "./stack-CoNreM7B.es.js";
12
12
  import { V as k } from "./visually-hidden-09RsVX6x.es.js";
13
13
  import { KeyboardArrowLeft as y, KeyboardArrowRight as C } from "@commercetools/nimbus-icons";
14
14
  import { Flex as V } from "@chakra-ui/react/flex";
15
- import { g as K } from "./index-BZioZQfA.es.js";
16
- import { e as W } from "./extractStyleProps-vXiS8lCp.es.js";
15
+ import { g as K } from "./index-B68rhcD_.es.js";
16
+ import { e as W } from "./extractStyleProps-tYFaIfUG.es.js";
17
17
  import { $ as g } from "./Button-BVaauB-c.es.js";
18
18
  import { $ as v } from "./Text-DOcU1ycg.es.js";
19
19
  const { withProvider: _, withContext: n } = /* @__PURE__ */ L({
@@ -183,4 +183,4 @@ const { withProvider: _, withContext: n } = /* @__PURE__ */ L({
183
183
  export {
184
184
  ge as C
185
185
  };
186
- //# sourceMappingURL=calendar-DBk-sVXs.es.js.map
186
+ //# sourceMappingURL=calendar-BK_QGKS0.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"calendar-DBk-sVXs.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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,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-BK_QGKS0.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","calendarSlotRec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AA,EAAU;AAG9B,SACE,gBAAAlC;AAAA,IAACoC;AAAAA,IAAA;AAAA,MACC,QAAQ;AAAA,QACN;AAAA,UACER;AAAAA,UACA;AAAA,YACE,GAAGD;AAAA,YACH,OAAO;AAAA,cACL,GAAIA,KACJ,OAAOA,KAAkB,YACzB,WAAWA,IACPA,EAAc,QACd,CAAA;AAAA,cACJ,GAAGI;AAAA,YAAA;AAAA,UACL;AAAA,QACF;AAAA,QAEF;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,7 +1,7 @@
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-vXiS8lCp.es.js";
4
+ import { e as T } from "./extractStyleProps-tYFaIfUG.es.js";
5
5
  import { $ as W } from "./RSPContexts-B4yvXuBR.es.js";
6
6
  import { $ as z, c as A, f as G, e as S, a as J } from "./utils-CsKCu3xh.es.js";
7
7
  import { $ as K } from "./Form-CXcEMuBf.es.js";
@@ -216,4 +216,4 @@ he.displayName = "Checkbox";
216
216
  export {
217
217
  he as C
218
218
  };
219
- //# sourceMappingURL=checkbox-Vo5d1nT3.es.js.map
219
+ //# sourceMappingURL=checkbox-BGAiCLIb.es.js.map