@commercetools/nimbus 2.4.0 → 2.5.0

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 (73) hide show
  1. package/README.md +17 -12
  2. package/dist/chunks/accordion-6JxQb_15.cjs.js +2 -0
  3. package/dist/chunks/accordion-6JxQb_15.cjs.js.map +1 -0
  4. package/dist/chunks/accordion-KXi53sSd.es.js +84 -0
  5. package/dist/chunks/accordion-KXi53sSd.es.js.map +1 -0
  6. package/dist/chunks/accordion.content-DWXekiUB.cjs.js +2 -0
  7. package/dist/chunks/accordion.content-DWXekiUB.cjs.js.map +1 -0
  8. package/dist/chunks/accordion.content-I6FlZR6t.es.js +228 -0
  9. package/dist/chunks/accordion.content-I6FlZR6t.es.js.map +1 -0
  10. package/dist/chunks/alert-BYLSKkn9.cjs.js +2 -0
  11. package/dist/chunks/alert-BYLSKkn9.cjs.js.map +1 -0
  12. package/dist/chunks/alert-Npb00ttk.es.js +158 -0
  13. package/dist/chunks/alert-Npb00ttk.es.js.map +1 -0
  14. package/dist/chunks/{localized-field-rZG712BE.cjs.js → localized-field-CCpAn8pz.cjs.js} +2 -2
  15. package/dist/chunks/{localized-field-rZG712BE.cjs.js.map → localized-field-CCpAn8pz.cjs.js.map} +1 -1
  16. package/dist/chunks/{localized-field-y1Maik4X.es.js → localized-field-Dwq6C30C.es.js} +2 -2
  17. package/dist/chunks/{localized-field-y1Maik4X.es.js.map → localized-field-Dwq6C30C.es.js.map} +1 -1
  18. package/dist/chunks/{password-input-6omRqui-.cjs.js → password-input-BmIFKyL5.cjs.js} +2 -2
  19. package/dist/chunks/{password-input-6omRqui-.cjs.js.map → password-input-BmIFKyL5.cjs.js.map} +1 -1
  20. package/dist/chunks/{password-input-Bx-R47Zb.es.js → password-input-CThpVxA7.es.js} +2 -2
  21. package/dist/chunks/{password-input-Bx-R47Zb.es.js.map → password-input-CThpVxA7.es.js.map} +1 -1
  22. package/dist/chunks/{password-input-field-Buevk_ZR.cjs.js → password-input-field-BAHZJkVt.cjs.js} +2 -2
  23. package/dist/chunks/{password-input-field-Buevk_ZR.cjs.js.map → password-input-field-BAHZJkVt.cjs.js.map} +1 -1
  24. package/dist/chunks/{password-input-field-9j6mejHc.es.js → password-input-field-D-Nuq4vZ.es.js} +2 -2
  25. package/dist/chunks/{password-input-field-9j6mejHc.es.js.map → password-input-field-D-Nuq4vZ.es.js.map} +1 -1
  26. package/dist/chunks/{text-input-DMqogV2V.es.js → text-input-9W5v7FzD.es.js} +28 -28
  27. package/dist/chunks/{text-input-DMqogV2V.es.js.map → text-input-9W5v7FzD.es.js.map} +1 -1
  28. package/dist/chunks/text-input-B1upLZxw.cjs.js +2 -0
  29. package/dist/chunks/{text-input-BcnTka1I.cjs.js.map → text-input-B1upLZxw.cjs.js.map} +1 -1
  30. package/dist/chunks/{text-input-field-B9Ctttd2.es.js → text-input-field-BhKZgjWw.es.js} +2 -2
  31. package/dist/chunks/{text-input-field-B9Ctttd2.es.js.map → text-input-field-BhKZgjWw.es.js.map} +1 -1
  32. package/dist/chunks/{text-input-field-CcOUc96b.cjs.js → text-input-field-D_iawvje.cjs.js} +2 -2
  33. package/dist/chunks/{text-input-field-CcOUc96b.cjs.js.map → text-input-field-D_iawvje.cjs.js.map} +1 -1
  34. package/dist/components/accordion.cjs +1 -1
  35. package/dist/components/accordion.es.js +8 -7
  36. package/dist/components/accordion.es.js.map +1 -1
  37. package/dist/components/alert.cjs +1 -1
  38. package/dist/components/alert.es.js +4 -5
  39. package/dist/components/alert.es.js.map +1 -1
  40. package/dist/components/combobox/utils/test-utils.d.ts +19 -0
  41. package/dist/components/components.cjs +1 -1
  42. package/dist/components/components.es.js +6 -6
  43. package/dist/components/fields.cjs +1 -1
  44. package/dist/components/fields.es.js +2 -2
  45. package/dist/components/localized-field.cjs +1 -1
  46. package/dist/components/localized-field.es.js +1 -1
  47. package/dist/components/password-input-field.cjs +1 -1
  48. package/dist/components/password-input-field.es.js +1 -1
  49. package/dist/components/password-input.cjs +1 -1
  50. package/dist/components/password-input.es.js +1 -1
  51. package/dist/components/patterns.cjs +1 -1
  52. package/dist/components/patterns.es.js +2 -2
  53. package/dist/components/text-input-field.cjs +1 -1
  54. package/dist/components/text-input-field.es.js +1 -1
  55. package/dist/components/text-input.cjs +1 -1
  56. package/dist/components/text-input.es.js +1 -1
  57. package/dist/index.cjs +1 -1
  58. package/dist/index.cjs.map +1 -1
  59. package/dist/index.es.js +19 -19
  60. package/package.json +15 -15
  61. package/dist/chunks/accordion-BMvunDII.cjs.js +0 -2
  62. package/dist/chunks/accordion-BMvunDII.cjs.js.map +0 -1
  63. package/dist/chunks/accordion-CGL9rTeb.es.js +0 -308
  64. package/dist/chunks/accordion-CGL9rTeb.es.js.map +0 -1
  65. package/dist/chunks/alert-CGSkP1kI.cjs.js +0 -2
  66. package/dist/chunks/alert-CGSkP1kI.cjs.js.map +0 -1
  67. package/dist/chunks/alert-G0fQaS_Y.es.js +0 -85
  68. package/dist/chunks/alert-G0fQaS_Y.es.js.map +0 -1
  69. package/dist/chunks/alert.dismiss-button-B3btoWr3.cjs.js +0 -2
  70. package/dist/chunks/alert.dismiss-button-B3btoWr3.cjs.js.map +0 -1
  71. package/dist/chunks/alert.dismiss-button-BYbTqEqD.es.js +0 -77
  72. package/dist/chunks/alert.dismiss-button-BYbTqEqD.es.js.map +0 -1
  73. package/dist/chunks/text-input-BcnTka1I.cjs.js +0 -2
package/README.md CHANGED
@@ -12,6 +12,12 @@ To build:
12
12
  pnpm run build
13
13
  ```
14
14
 
15
+ > **Important:** This package includes generated i18n files (`*.messages.ts` and
16
+ > `intl/*.ts`) that are **not tracked in git**. After cloning or switching
17
+ > branches, you must run `pnpm build` or `pnpm extract-intl` from the repository
18
+ > root to generate these files. Without them, TypeScript compilation and
19
+ > Storybook will fail.
20
+
15
21
  ## Internationalization (i18n) Development
16
22
 
17
23
  ### Workflow
@@ -29,11 +35,11 @@ pnpm run build
29
35
  - Import the compiled message strings and the hook:
30
36
  ```typescript
31
37
  import { useLocalizedStringFormatter } from "@/hooks";
32
- import { componentMessagesStrings } from "./component.messages";
38
+ import { {componentName}MessagesStrings } from "./{component-name}.messages";
33
39
  ```
34
40
  - Use the hook in your component:
35
41
  ```typescript
36
- const msg = useLocalizedStringFormatter(componentMessagesStrings);
42
+ const msg = useLocalizedStringFormatter({componentName}MessagesStrings);
37
43
  ```
38
44
  - Call `msg.format("key")` for simple strings
39
45
  - Call `msg.format("key", { variableName: value })` for variable messages
@@ -56,17 +62,13 @@ pnpm run build
56
62
 
57
63
  ### Dependencies
58
64
 
59
- **`react-intl` is a dev dependency only** - it is not required at runtime:
65
+ **Message extraction and runtime:**
60
66
 
61
- - **In `devDependencies`**: Needed for `.i18n.ts` source files which use
62
- `defineMessages` from `react-intl`. The `@formatjs/cli extract` tool expects
63
- this format to extract messages.
64
- - **Not in `peerDependencies`**: Consumers do not need to install `react-intl`.
65
- Components use compiled `.messages.ts` dictionaries at runtime, not the
66
- `.i18n.ts` source files.
67
- - **Runtime**: Components use `LocalizedStringDictionary` from
68
- `@internationalized/string` and `react-aria-components` for message retrieval,
69
- not `react-intl`.
67
+ - **Extraction**: `.i18n.ts` source files are plain TypeScript objects extracted
68
+ by a custom script (`packages/i18n/scripts/extract-messages.ts`).
69
+ - **Runtime**: Components use compiled `.messages.ts` dictionaries with
70
+ `LocalizedStringDictionary` from `@internationalized/string` and
71
+ `react-aria-components` for message retrieval.
70
72
 
71
73
  ### Quick Reference
72
74
 
@@ -91,6 +93,9 @@ pnpm run build
91
93
 
92
94
  **Troubleshooting:**
93
95
 
96
+ - **Module not found errors after clone/branch switch?** Generated i18n files
97
+ are not tracked in git. Run `pnpm build` or `pnpm extract-intl` from the
98
+ repository root to regenerate them.
94
99
  - **Empty string returned?** Check that message key matches the ID (not the
95
100
  object key from `.i18n.ts`)
96
101
  - Example: `id: "Nimbus.Alert.dismiss"` → use `msg.format("dismiss")`, not the
@@ -0,0 +1,2 @@
1
+ "use strict";const o=require("./accordion.content-DWXekiUB.cjs.js"),c={Root:o.AccordionRoot,Item:o.AccordionItem,Header:o.AccordionHeader,Content:o.AccordionContent,HeaderRightContent:o.AccordionHeaderRightContent};exports.Accordion=c;
2
+ //# sourceMappingURL=accordion-6JxQb_15.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"accordion-6JxQb_15.cjs.js","sources":["../../src/components/accordion/accordion.tsx"],"sourcesContent":["import {\n AccordionRoot,\n AccordionHeader,\n AccordionContent,\n AccordionItem,\n AccordionHeaderRightContent,\n} from \"./components\";\n\n/**\n * # Accordion\n *\n * An interactive component that allows users to show and hide sections of content.\n * Supports single or multiple item expansion, and provides keyboard navigation and WCAG 2.1 AA accessibility.\n *\n * @see {@link https://nimbus-documentation.vercel.app/components/navigation/accordion}\n *\n * @example\n * ```tsx\n * <Accordion.Root>\n * <Accordion.Item value=\"item-1\">\n * <Accordion.Header>First Section</Accordion.Header>\n * <Accordion.Content>Content for first section</Accordion.Content>\n * </Accordion.Item>\n * <Accordion.Item value=\"item-2\">\n * <Accordion.Header>Second Section</Accordion.Header>\n * <Accordion.Content>Content for second section</Accordion.Content>\n * </Accordion.Item>\n * </Accordion.Root>\n * ```\n */\nexport const Accordion = {\n /**\n * # Accordion.Root\n *\n * The root container for the accordion component.\n * Provides context and configuration for all accordion items.\n *\n * @example\n * ```tsx\n * <Accordion.Root>\n * <Accordion.Item>\n * <Accordion.Header>Title</Accordion.Header>\n * <Accordion.Content>Content</Accordion.Content>\n * </Accordion.Item>\n * </Accordion.Root>\n * ```\n */\n Root: AccordionRoot,\n\n /**\n * # Accordion.Item\n *\n * An individual accordion item containing a header and collapsible content.\n * Multiple items can be placed within an Accordion.Root.\n *\n * @example\n * ```tsx\n * <Accordion.Item value=\"item-1\">\n * <Accordion.Header>Title</Accordion.Header>\n * <Accordion.Content>Content</Accordion.Content>\n * </Accordion.Item>\n * ```\n */\n Item: AccordionItem,\n\n /**\n * # Accordion.Header\n *\n * The clickable header that expands/collapses the accordion content.\n * Handles keyboard and mouse interactions for accordion activation.\n *\n * @example\n * ```tsx\n * <Accordion.Header>\n * Click to expand\n * </Accordion.Header>\n * ```\n */\n Header: AccordionHeader,\n\n /**\n * # Accordion.Content\n *\n * The collapsible content area that is shown/hidden when the header is activated.\n * Contains the main content of the accordion item.\n *\n * @example\n * ```tsx\n * <Accordion.Content>\n * <p>This content will be shown when expanded.</p>\n * </Accordion.Content>\n * ```\n */\n Content: AccordionContent,\n\n /**\n * # Accordion.HeaderRightContent\n *\n * Optional content that appears on the right side of the accordion header.\n * Useful for adding actions, badges, or additional information.\n *\n * @example\n * ```tsx\n * <Accordion.Header>\n * Title\n * <Accordion.HeaderRightContent>\n * <Button>Action</Button>\n * </Accordion.HeaderRightContent>\n * </Accordion.Header>\n * ```\n */\n HeaderRightContent: AccordionHeaderRightContent,\n};\n\nexport {\n AccordionRoot as _AccordionRoot,\n AccordionItem as _AccordionItem,\n AccordionHeader as _AccordionHeader,\n AccordionContent as _AccordionContent,\n AccordionHeaderRightContent as _AccordionHeaderRightContent,\n};\n"],"names":["Accordion","AccordionRoot","AccordionItem","AccordionHeader","AccordionContent","AccordionHeaderRightContent"],"mappings":"oEA8BaA,EAAY,CAiBvB,KAAMC,EAAAA,cAgBN,KAAMC,EAAAA,cAeN,OAAQC,EAAAA,gBAeR,QAASC,EAAAA,iBAkBT,mBAAoBC,EAAAA,2BACtB"}
@@ -0,0 +1,84 @@
1
+ import { b as o, A as t, a as e, c as n, d as c } from "./accordion.content-I6FlZR6t.es.js";
2
+ const a = {
3
+ /**
4
+ * # Accordion.Root
5
+ *
6
+ * The root container for the accordion component.
7
+ * Provides context and configuration for all accordion items.
8
+ *
9
+ * @example
10
+ * ```tsx
11
+ * <Accordion.Root>
12
+ * <Accordion.Item>
13
+ * <Accordion.Header>Title</Accordion.Header>
14
+ * <Accordion.Content>Content</Accordion.Content>
15
+ * </Accordion.Item>
16
+ * </Accordion.Root>
17
+ * ```
18
+ */
19
+ Root: c,
20
+ /**
21
+ * # Accordion.Item
22
+ *
23
+ * An individual accordion item containing a header and collapsible content.
24
+ * Multiple items can be placed within an Accordion.Root.
25
+ *
26
+ * @example
27
+ * ```tsx
28
+ * <Accordion.Item value="item-1">
29
+ * <Accordion.Header>Title</Accordion.Header>
30
+ * <Accordion.Content>Content</Accordion.Content>
31
+ * </Accordion.Item>
32
+ * ```
33
+ */
34
+ Item: n,
35
+ /**
36
+ * # Accordion.Header
37
+ *
38
+ * The clickable header that expands/collapses the accordion content.
39
+ * Handles keyboard and mouse interactions for accordion activation.
40
+ *
41
+ * @example
42
+ * ```tsx
43
+ * <Accordion.Header>
44
+ * Click to expand
45
+ * </Accordion.Header>
46
+ * ```
47
+ */
48
+ Header: e,
49
+ /**
50
+ * # Accordion.Content
51
+ *
52
+ * The collapsible content area that is shown/hidden when the header is activated.
53
+ * Contains the main content of the accordion item.
54
+ *
55
+ * @example
56
+ * ```tsx
57
+ * <Accordion.Content>
58
+ * <p>This content will be shown when expanded.</p>
59
+ * </Accordion.Content>
60
+ * ```
61
+ */
62
+ Content: t,
63
+ /**
64
+ * # Accordion.HeaderRightContent
65
+ *
66
+ * Optional content that appears on the right side of the accordion header.
67
+ * Useful for adding actions, badges, or additional information.
68
+ *
69
+ * @example
70
+ * ```tsx
71
+ * <Accordion.Header>
72
+ * Title
73
+ * <Accordion.HeaderRightContent>
74
+ * <Button>Action</Button>
75
+ * </Accordion.HeaderRightContent>
76
+ * </Accordion.Header>
77
+ * ```
78
+ */
79
+ HeaderRightContent: o
80
+ };
81
+ export {
82
+ a as A
83
+ };
84
+ //# sourceMappingURL=accordion-KXi53sSd.es.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"accordion-KXi53sSd.es.js","sources":["../../src/components/accordion/accordion.tsx"],"sourcesContent":["import {\n AccordionRoot,\n AccordionHeader,\n AccordionContent,\n AccordionItem,\n AccordionHeaderRightContent,\n} from \"./components\";\n\n/**\n * # Accordion\n *\n * An interactive component that allows users to show and hide sections of content.\n * Supports single or multiple item expansion, and provides keyboard navigation and WCAG 2.1 AA accessibility.\n *\n * @see {@link https://nimbus-documentation.vercel.app/components/navigation/accordion}\n *\n * @example\n * ```tsx\n * <Accordion.Root>\n * <Accordion.Item value=\"item-1\">\n * <Accordion.Header>First Section</Accordion.Header>\n * <Accordion.Content>Content for first section</Accordion.Content>\n * </Accordion.Item>\n * <Accordion.Item value=\"item-2\">\n * <Accordion.Header>Second Section</Accordion.Header>\n * <Accordion.Content>Content for second section</Accordion.Content>\n * </Accordion.Item>\n * </Accordion.Root>\n * ```\n */\nexport const Accordion = {\n /**\n * # Accordion.Root\n *\n * The root container for the accordion component.\n * Provides context and configuration for all accordion items.\n *\n * @example\n * ```tsx\n * <Accordion.Root>\n * <Accordion.Item>\n * <Accordion.Header>Title</Accordion.Header>\n * <Accordion.Content>Content</Accordion.Content>\n * </Accordion.Item>\n * </Accordion.Root>\n * ```\n */\n Root: AccordionRoot,\n\n /**\n * # Accordion.Item\n *\n * An individual accordion item containing a header and collapsible content.\n * Multiple items can be placed within an Accordion.Root.\n *\n * @example\n * ```tsx\n * <Accordion.Item value=\"item-1\">\n * <Accordion.Header>Title</Accordion.Header>\n * <Accordion.Content>Content</Accordion.Content>\n * </Accordion.Item>\n * ```\n */\n Item: AccordionItem,\n\n /**\n * # Accordion.Header\n *\n * The clickable header that expands/collapses the accordion content.\n * Handles keyboard and mouse interactions for accordion activation.\n *\n * @example\n * ```tsx\n * <Accordion.Header>\n * Click to expand\n * </Accordion.Header>\n * ```\n */\n Header: AccordionHeader,\n\n /**\n * # Accordion.Content\n *\n * The collapsible content area that is shown/hidden when the header is activated.\n * Contains the main content of the accordion item.\n *\n * @example\n * ```tsx\n * <Accordion.Content>\n * <p>This content will be shown when expanded.</p>\n * </Accordion.Content>\n * ```\n */\n Content: AccordionContent,\n\n /**\n * # Accordion.HeaderRightContent\n *\n * Optional content that appears on the right side of the accordion header.\n * Useful for adding actions, badges, or additional information.\n *\n * @example\n * ```tsx\n * <Accordion.Header>\n * Title\n * <Accordion.HeaderRightContent>\n * <Button>Action</Button>\n * </Accordion.HeaderRightContent>\n * </Accordion.Header>\n * ```\n */\n HeaderRightContent: AccordionHeaderRightContent,\n};\n\nexport {\n AccordionRoot as _AccordionRoot,\n AccordionItem as _AccordionItem,\n AccordionHeader as _AccordionHeader,\n AccordionContent as _AccordionContent,\n AccordionHeaderRightContent as _AccordionHeaderRightContent,\n};\n"],"names":["Accordion","AccordionRoot","AccordionItem","AccordionHeader","AccordionContent","AccordionHeaderRightContent"],"mappings":";AA8BO,MAAMA,IAAY;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAiBvB,MAAMC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAgBN,MAAMC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAeN,QAAQC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAeR,SAASC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAkBT,oBAAoBC;AACtB;"}
@@ -0,0 +1,2 @@
1
+ "use strict";const c=require("react/jsx-runtime"),H=require("@chakra-ui/react/styled-system"),x=require("./extract-style-props-DVhOcGEi.cjs.js"),n=require("react"),I=require("@commercetools/nimbus-icons"),C=require("./Button-C92vyQPT.cjs.js"),W=require("./flex-DwGL6TCj.cjs.js"),T=require("@chakra-ui/react"),f=require("./utils-BNYGVv6l.cjs.js"),h=require("./mergeProps-DD8aR8go.cjs.js"),g=require("./filterDOMProps-AbzzCIX-.cjs.js"),A=require("./useFocusRing-DScmIOhv.cjs.js"),v=require("./useDisclosureState-DXwEPD8Y.cjs.js"),B=require("./useControlledState-DLAEsTLd.cjs.js");function G(o){let{allowsMultipleExpanded:e=!1,isDisabled:r=!1}=o,[t,s]=B.$458b0a5536c1a7cf$export$40bfa8c7b0832715(n.useMemo(()=>o.expandedKeys?new Set(o.expandedKeys):void 0,[o.expandedKeys]),n.useMemo(()=>o.defaultExpandedKeys?new Set(o.defaultExpandedKeys):new Set,[o.defaultExpandedKeys]),o.onExpandedChange);return n.useEffect(()=>{if(!e&&t.size>1){let d=t.values().next().value;d!=null&&s(new Set([d]))}}),{allowsMultipleExpanded:e,isDisabled:r,expandedKeys:t,setExpandedKeys:s,toggleKey(d){let a;e?(a=new Set(t),a.has(d)?a.delete(d):a.add(d)):a=new Set(t.has(d)?[]:[d]),s(a)}}}const R=n.createContext(null),O=n.forwardRef(function(e,r){let t=G(e),s=f.$64fa3d84918910a7$export$4d86445c2cf5e3({...e,defaultClassName:"react-aria-DisclosureGroup",values:{isDisabled:t.isDisabled,state:t}}),d=g.$65484d02dcb7eb3e$export$457c3d6518dd4c6f(e,{global:!0});return n.createElement("div",{...d,...s,ref:r,"data-disabled":e.isDisabled||void 0},n.createElement(R.Provider,{value:t},s.children))}),_=n.createContext(null),z=n.createContext(null),S=n.createContext(null),J=n.forwardRef(function(e,r){[e,r]=f.$64fa3d84918910a7$export$29f1550f4b0d4415(e,r,_);let t=n.useContext(R),{id:s,...d}=e,a=h.$bdb11010cef70236$export$f680877a34711e37();s||(s=a);let l=t?t.expandedKeys.has(s):e.isExpanded,i=v.$bf996d45f4a36925$export$3fcbf6e4407997e0({...e,isExpanded:l,onExpandedChange(V){var b;t&&t.toggleKey(s),(b=e.onExpandedChange)===null||b===void 0||b.call(e,V)}}),$=n.useRef(null),p=e.isDisabled||t?.isDisabled||!1,{buttonProps:q,panelProps:F}=v.$5e910fae8e128ead$export$6e3e27031a30522f({...e,isExpanded:l,isDisabled:p},i,$),{isFocusVisible:y,focusProps:M}=A.$f7dceffc5ad7768b$export$4e328f61c538687f({within:!0}),E=f.$64fa3d84918910a7$export$4d86445c2cf5e3({...e,id:void 0,defaultClassName:"react-aria-Disclosure",values:{isExpanded:i.isExpanded,isDisabled:p,isFocusVisibleWithin:y,state:i}}),N=g.$65484d02dcb7eb3e$export$457c3d6518dd4c6f(d,{global:!0});return n.createElement(f.$64fa3d84918910a7$export$2881499e37b75b9a,{values:[[C.$d2b4bc8c273e7be6$export$24d547caef80ccd1,{slots:{[f.$64fa3d84918910a7$export$c62b8e45d58ddad9]:{},trigger:q}}],[S,{panelProps:F,panelRef:$}],[z,i]]},n.createElement("div",{...h.$3ef42575df84b30b$export$9d1611c77c2fe928(N,E,M),ref:r,"data-expanded":i.isExpanded||void 0,"data-disabled":p||void 0,"data-focus-visible-within":y||void 0},E.children))}),L=n.forwardRef(function(e,r){let{role:t="group"}=e,{panelProps:s,panelRef:d}=n.useContext(S),{isFocusVisible:a,focusProps:l}=A.$f7dceffc5ad7768b$export$4e328f61c538687f({within:!0}),i=f.$64fa3d84918910a7$export$4d86445c2cf5e3({...e,defaultClassName:"react-aria-DisclosurePanel",values:{isFocusVisibleWithin:a}}),$=g.$65484d02dcb7eb3e$export$457c3d6518dd4c6f(e,{global:!0,labelable:!0});return n.createElement("div",{...h.$3ef42575df84b30b$export$9d1611c77c2fe928($,i,s,l),ref:f.$5dc95899b306f630$export$c9058316764c140e(r,d),role:t,"data-focus-visible-within":a||void 0},n.createElement(f.$64fa3d84918910a7$export$2881499e37b75b9a,{values:[[C.$d2b4bc8c273e7be6$export$24d547caef80ccd1,null]]},e.children))}),{withProvider:Q,withContext:u}=T.createSlotRecipeContext({key:"nimbusAccordion"}),U=Q("div","root"),X=u("div","disclosure"),Y=u("button","trigger"),Z=u("div","panel"),k=u("div","accordionTitle"),P=u("div","headerContentRight"),D=o=>{const{ref:e,...r}=o,t=H.useSlotRecipe({key:"nimbusAccordion"}),[s,d]=t.splitVariantProps(r),[a,l]=x.extractStyleProps(d);return c.jsx(U,{ref:e,...s,...a,asChild:!0,children:c.jsx(O,{...l})})};D.displayName="Accordion.Root";const w=({children:o,value:e,ref:r,...t})=>{const[s,d]=x.extractStyleProps(t),a={...d,id:e};return c.jsx(X,{"data-value":e,ref:r,...s,asChild:!0,children:c.jsx(J,{...a,children:o})})};w.displayName="Accordion.Item";const m=({children:o,ref:e,...r})=>c.jsx(P,{ref:e,...r,children:o});m.displayName="Accordion.HeaderRightContent";const j=({children:o,ref:e,...r})=>{const[t,s]=x.extractStyleProps(r),d=n.useMemo(()=>{const a=[],l=[];return n.Children.forEach(o,i=>{n.isValidElement(i)&&(i.type===m||i.type===P)?l.push(i):a.push(i)}),{main:a,rightContent:l}},[o]);return c.jsxs(W.Flex,{justifyContent:"space-between",alignItems:"center",borderBottom:"solid-25",borderColor:"neutral.4",...t,children:[c.jsx(Y,{ref:e,slot:"trigger",asChild:!0,children:c.jsxs(C.$d2b4bc8c273e7be6$export$353f5b6fc5456de1,{...s,children:[c.jsx(I.KeyboardArrowRight,{}),c.jsx(k,{children:d.main})]})}),d.rightContent.length>0&&c.jsx(P,{children:d.rightContent})]})};j.displayName="Accordion.Header";const K=({children:o,ref:e,...r})=>{const[t,s]=x.extractStyleProps(r);return c.jsx(Z,{ref:e,...t,asChild:!0,children:c.jsx(L,{...s,children:o})})};K.displayName="Accordion.Content";exports.AccordionContent=K;exports.AccordionHeader=j;exports.AccordionHeaderRightContent=m;exports.AccordionItem=w;exports.AccordionRoot=D;
2
+ //# sourceMappingURL=accordion.content-DWXekiUB.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"accordion.content-DWXekiUB.cjs.js","sources":["../../../../node_modules/.pnpm/@react-stately+disclosure@3.0.9_react@19.2.0/node_modules/@react-stately/disclosure/dist/useDisclosureGroupState.mjs","../../../../node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.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.item.tsx","../../src/components/accordion/components/accordion.header-right-content.tsx","../../src/components/accordion/components/accordion.header.tsx","../../src/components/accordion/components/accordion.content.tsx"],"sourcesContent":["import {useControlledState as $j4gLc$useControlledState} from \"@react-stately/utils\";\nimport {useMemo as $j4gLc$useMemo, useEffect as $j4gLc$useEffect} from \"react\";\n\n/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\nfunction $9385b3affbdec831$export$f36461af0ef4707d(props) {\n let { allowsMultipleExpanded: allowsMultipleExpanded = false, isDisabled: isDisabled = false } = props;\n let [expandedKeys, setExpandedKeys] = (0, $j4gLc$useControlledState)((0, $j4gLc$useMemo)(()=>props.expandedKeys ? new Set(props.expandedKeys) : undefined, [\n props.expandedKeys\n ]), (0, $j4gLc$useMemo)(()=>props.defaultExpandedKeys ? new Set(props.defaultExpandedKeys) : new Set(), [\n props.defaultExpandedKeys\n ]), props.onExpandedChange);\n (0, $j4gLc$useEffect)(()=>{\n // Ensure only one item is expanded if allowsMultipleExpanded is false.\n if (!allowsMultipleExpanded && expandedKeys.size > 1) {\n let firstKey = expandedKeys.values().next().value;\n if (firstKey != null) setExpandedKeys(new Set([\n firstKey\n ]));\n }\n });\n return {\n allowsMultipleExpanded: allowsMultipleExpanded,\n isDisabled: isDisabled,\n expandedKeys: expandedKeys,\n setExpandedKeys: setExpandedKeys,\n toggleKey (key) {\n let keys;\n if (allowsMultipleExpanded) {\n keys = new Set(expandedKeys);\n if (keys.has(key)) keys.delete(key);\n else keys.add(key);\n } else keys = new Set(expandedKeys.has(key) ? [] : [\n key\n ]);\n setExpandedKeys(keys);\n }\n };\n}\n\n\nexport {$9385b3affbdec831$export$f36461af0ef4707d as useDisclosureGroupState};\n//# sourceMappingURL=useDisclosureGroupState.module.js.map\n","import {ButtonContext as $d2b4bc8c273e7be6$export$24d547caef80ccd1} from \"./Button.mjs\";\nimport {DEFAULT_SLOT as $64fa3d84918910a7$export$c62b8e45d58ddad9, Provider as $64fa3d84918910a7$export$2881499e37b75b9a, useContextProps as $64fa3d84918910a7$export$29f1550f4b0d4415, useRenderProps as $64fa3d84918910a7$export$4d86445c2cf5e3} from \"./utils.mjs\";\nimport {useDisclosure as $hI1OT$useDisclosure, useFocusRing as $hI1OT$useFocusRing} from \"react-aria\";\nimport {useDisclosureGroupState as $hI1OT$useDisclosureGroupState, useDisclosureState as $hI1OT$useDisclosureState} from \"react-stately\";\nimport {filterDOMProps as $hI1OT$filterDOMProps, useId as $hI1OT$useId, mergeProps as $hI1OT$mergeProps, mergeRefs as $hI1OT$mergeRefs} from \"@react-aria/utils\";\nimport $hI1OT$react, {createContext as $hI1OT$createContext, forwardRef as $hI1OT$forwardRef, useContext as $hI1OT$useContext} from \"react\";\n\n/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\n\n\n\n\nconst $28f4fd908f0de97f$export$1d40e3e0cc4d5de = /*#__PURE__*/ (0, $hI1OT$createContext)(null);\nconst $28f4fd908f0de97f$export$944aceb4f8c89f10 = /*#__PURE__*/ (0, $hI1OT$forwardRef)(function DisclosureGroup(props, ref) {\n let state = (0, $hI1OT$useDisclosureGroupState)(props);\n let renderProps = (0, $64fa3d84918910a7$export$4d86445c2cf5e3)({\n ...props,\n defaultClassName: 'react-aria-DisclosureGroup',\n values: {\n isDisabled: state.isDisabled,\n state: state\n }\n });\n let domProps = (0, $hI1OT$filterDOMProps)(props, {\n global: true\n });\n return /*#__PURE__*/ (0, $hI1OT$react).createElement(\"div\", {\n ...domProps,\n ...renderProps,\n ref: ref,\n \"data-disabled\": props.isDisabled || undefined\n }, /*#__PURE__*/ (0, $hI1OT$react).createElement($28f4fd908f0de97f$export$1d40e3e0cc4d5de.Provider, {\n value: state\n }, renderProps.children));\n});\nconst $28f4fd908f0de97f$export$d665dd135a51b28a = /*#__PURE__*/ (0, $hI1OT$createContext)(null);\nconst $28f4fd908f0de97f$export$dab3ea4a6ef094da = /*#__PURE__*/ (0, $hI1OT$createContext)(null);\nconst $28f4fd908f0de97f$var$InternalDisclosureContext = /*#__PURE__*/ (0, $hI1OT$createContext)(null);\nconst $28f4fd908f0de97f$export$74a362b31437ec83 = /*#__PURE__*/ (0, $hI1OT$forwardRef)(function Disclosure(props, ref) {\n [props, ref] = (0, $64fa3d84918910a7$export$29f1550f4b0d4415)(props, ref, $28f4fd908f0de97f$export$d665dd135a51b28a);\n let groupState = (0, $hI1OT$useContext)($28f4fd908f0de97f$export$1d40e3e0cc4d5de);\n let { id: id, ...otherProps } = props;\n // Generate an id if one wasn't provided.\n // (can't pass id into useId since it can also be a number)\n let defaultId = (0, $hI1OT$useId)();\n id || (id = defaultId);\n let isExpanded = groupState ? groupState.expandedKeys.has(id) : props.isExpanded;\n let state = (0, $hI1OT$useDisclosureState)({\n ...props,\n isExpanded: isExpanded,\n onExpandedChange (isExpanded) {\n var _props_onExpandedChange;\n if (groupState) groupState.toggleKey(id);\n (_props_onExpandedChange = props.onExpandedChange) === null || _props_onExpandedChange === void 0 ? void 0 : _props_onExpandedChange.call(props, isExpanded);\n }\n });\n let panelRef = (0, $hI1OT$react).useRef(null);\n let isDisabled = props.isDisabled || (groupState === null || groupState === void 0 ? void 0 : groupState.isDisabled) || false;\n let { buttonProps: buttonProps, panelProps: panelProps } = (0, $hI1OT$useDisclosure)({\n ...props,\n isExpanded: isExpanded,\n isDisabled: isDisabled\n }, state, panelRef);\n let { isFocusVisible: isFocusVisibleWithin, focusProps: focusWithinProps } = (0, $hI1OT$useFocusRing)({\n within: true\n });\n let renderProps = (0, $64fa3d84918910a7$export$4d86445c2cf5e3)({\n ...props,\n id: undefined,\n defaultClassName: 'react-aria-Disclosure',\n values: {\n isExpanded: state.isExpanded,\n isDisabled: isDisabled,\n isFocusVisibleWithin: isFocusVisibleWithin,\n state: state\n }\n });\n let domProps = (0, $hI1OT$filterDOMProps)(otherProps, {\n global: true\n });\n return /*#__PURE__*/ (0, $hI1OT$react).createElement((0, $64fa3d84918910a7$export$2881499e37b75b9a), {\n values: [\n [\n (0, $d2b4bc8c273e7be6$export$24d547caef80ccd1),\n {\n slots: {\n [(0, $64fa3d84918910a7$export$c62b8e45d58ddad9)]: {},\n trigger: buttonProps\n }\n }\n ],\n [\n $28f4fd908f0de97f$var$InternalDisclosureContext,\n {\n panelProps: panelProps,\n panelRef: panelRef\n }\n ],\n [\n $28f4fd908f0de97f$export$dab3ea4a6ef094da,\n state\n ]\n ]\n }, /*#__PURE__*/ (0, $hI1OT$react).createElement(\"div\", {\n ...(0, $hI1OT$mergeProps)(domProps, renderProps, focusWithinProps),\n ref: ref,\n \"data-expanded\": state.isExpanded || undefined,\n \"data-disabled\": isDisabled || undefined,\n \"data-focus-visible-within\": isFocusVisibleWithin || undefined\n }, renderProps.children));\n});\nconst $28f4fd908f0de97f$export$feabaa331e1d464c = /*#__PURE__*/ (0, $hI1OT$forwardRef)(function DisclosurePanel(props, ref) {\n let { role: role = 'group' } = props;\n let { panelProps: panelProps, panelRef: panelRef } = (0, $hI1OT$useContext)($28f4fd908f0de97f$var$InternalDisclosureContext);\n let { isFocusVisible: isFocusVisibleWithin, focusProps: focusWithinProps } = (0, $hI1OT$useFocusRing)({\n within: true\n });\n let renderProps = (0, $64fa3d84918910a7$export$4d86445c2cf5e3)({\n ...props,\n defaultClassName: 'react-aria-DisclosurePanel',\n values: {\n isFocusVisibleWithin: isFocusVisibleWithin\n }\n });\n let DOMProps = (0, $hI1OT$filterDOMProps)(props, {\n global: true,\n labelable: true\n });\n return /*#__PURE__*/ (0, $hI1OT$react).createElement(\"div\", {\n ...(0, $hI1OT$mergeProps)(DOMProps, renderProps, panelProps, focusWithinProps),\n ref: (0, $hI1OT$mergeRefs)(ref, panelRef),\n role: role,\n \"data-focus-visible-within\": isFocusVisibleWithin || undefined\n }, /*#__PURE__*/ (0, $hI1OT$react).createElement((0, $64fa3d84918910a7$export$2881499e37b75b9a), {\n values: [\n [\n (0, $d2b4bc8c273e7be6$export$24d547caef80ccd1),\n null\n ]\n ]\n }, props.children));\n});\n\n\nexport {$28f4fd908f0de97f$export$1d40e3e0cc4d5de as DisclosureGroupStateContext, $28f4fd908f0de97f$export$944aceb4f8c89f10 as DisclosureGroup, $28f4fd908f0de97f$export$d665dd135a51b28a as DisclosureContext, $28f4fd908f0de97f$export$dab3ea4a6ef094da as DisclosureStateContext, $28f4fd908f0de97f$export$74a362b31437ec83 as Disclosure, $28f4fd908f0de97f$export$feabaa331e1d464c as DisclosurePanel};\n//# sourceMappingURL=Disclosure.module.js.map\n","import {\n createSlotRecipeContext,\n type HTMLChakraProps,\n} from \"@chakra-ui/react\";\nimport type { SlotComponent } from \"@/type-utils\";\nimport type { AccordionRootSlotProps } from \"./accordion.types\";\n\nconst { withProvider, withContext } = createSlotRecipeContext({\n key: \"nimbusAccordion\",\n});\n\nexport const AccordionRootSlot: SlotComponent<\n HTMLDivElement,\n AccordionRootSlotProps\n> = withProvider<HTMLDivElement, AccordionRootSlotProps>(\"div\", \"root\");\n\nexport const AccordionDisclosureSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"disclosure\");\n\nexport const AccordionTriggerSlot = withContext<\n HTMLButtonElement,\n HTMLChakraProps<\"button\">\n>(\"button\", \"trigger\");\n\nexport const AccordionPanelSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"panel\");\n\nexport const AccordionTitleSlot = withContext<\n HTMLButtonElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"accordionTitle\");\n\nexport const AccordionHeaderRightContentSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"headerContentRight\");\n","import { AccordionRootSlot } from \"../accordion.slots\";\nimport { useSlotRecipe } from \"@chakra-ui/react/styled-system\";\nimport { DisclosureGroup as RaDisclosureGroup } from \"react-aria-components\";\nimport type { AccordionRootProps } from \"../accordion.types\";\nimport { extractStyleProps } from \"@/utils\";\n\n/**\n * Accordion.Root\n *\n * Provides context and configuration for all accordion items.\n *\n * @supportsStyleProps\n */\nexport const AccordionRoot = (props: AccordionRootProps) => {\n const { ref, ...restProps } = props;\n const recipe = useSlotRecipe({ key: \"nimbusAccordion\" });\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\nAccordionRoot.displayName = \"Accordion.Root\";\n","import { AccordionDisclosureSlot } from \"../accordion.slots\";\nimport { Disclosure as RaDisclosure } from \"react-aria-components\";\nimport type { AccordionItemProps } from \"../accordion.types\";\nimport { extractStyleProps } from \"@/utils\";\n\n/**\n * Accordion.Item - An individual accordion item\n *\n * Contains a header and collapsible content.\n * Multiple items can be placed within an Accordion.Root.\n *\n * @supportsStyleProps\n */\nexport const AccordionItem = ({\n children,\n value,\n ref,\n ...props\n}: AccordionItemProps) => {\n const [styleProps, restProps] = extractStyleProps(props);\n const disclosureProps = {\n ...restProps,\n id: value, // React Aria uses id for the key\n };\n\n return (\n <AccordionDisclosureSlot\n data-value={value}\n ref={ref}\n {...styleProps}\n asChild\n >\n <RaDisclosure {...disclosureProps}>{children}</RaDisclosure>\n </AccordionDisclosureSlot>\n );\n};\n\nAccordionItem.displayName = \"Accordion.Item\";\n","import { AccordionHeaderRightContentSlot } from \"../accordion.slots\";\nimport type { AccordionHeaderRightContentProps } from \"../accordion.types\";\n\n/**\n * Accordion.HeaderRightContent - Content displayed on the right side of the accordion header\n *\n * Used to add actions, badges, or additional information to the header.\n * Positioned to the right of the header title.\n *\n * @supportsStyleProps\n */\nexport const AccordionHeaderRightContent = ({\n children,\n ref,\n ...props\n}: AccordionHeaderRightContentProps) => {\n return (\n <AccordionHeaderRightContentSlot ref={ref} {...props}>\n {children}\n </AccordionHeaderRightContentSlot>\n );\n};\n\nAccordionHeaderRightContent.displayName = \"Accordion.HeaderRightContent\";\n","import React, { useMemo } from \"react\";\nimport {\n AccordionTriggerSlot,\n AccordionTitleSlot,\n AccordionHeaderRightContentSlot,\n} from \"../accordion.slots\";\nimport { Flex } from \"@/components\";\nimport { KeyboardArrowRight } from \"@commercetools/nimbus-icons\";\nimport { Button as RaButton } from \"react-aria-components\";\nimport type { AccordionHeaderProps } from \"../accordion.types\";\nimport { extractStyleProps } from \"@/utils\";\nimport { AccordionHeaderRightContent } from \"./accordion.header-right-content\";\n\n/**\n * Accordion.Header - The clickable header for accordion items\n *\n * Expands/collapses the accordion content when activated.\n * Handles keyboard and mouse interactions.\n *\n * @supportsStyleProps\n */\nexport const AccordionHeader = ({\n children,\n ref,\n ...props\n}: AccordionHeaderProps) => {\n const [styleProps, restProps] = extractStyleProps(props);\n // Extract HeaderRightContent if present\n const headerContent = useMemo(() => {\n const main: React.ReactNode[] = [];\n const rightContent: React.ReactNode[] = [];\n\n React.Children.forEach(children, (child) => {\n if (\n React.isValidElement(child) &&\n (child.type === AccordionHeaderRightContent ||\n child.type === AccordionHeaderRightContentSlot)\n ) {\n rightContent.push(child);\n } else {\n main.push(child);\n }\n });\n\n return { main, rightContent };\n }, [children]);\n\n return (\n <Flex\n justifyContent=\"space-between\"\n alignItems=\"center\"\n borderBottom=\"solid-25\"\n borderColor=\"neutral.4\"\n {...styleProps}\n >\n <AccordionTriggerSlot ref={ref} slot=\"trigger\" asChild>\n <RaButton {...restProps}>\n <KeyboardArrowRight />\n <AccordionTitleSlot>{headerContent.main}</AccordionTitleSlot>\n </RaButton>\n </AccordionTriggerSlot>\n {headerContent.rightContent.length > 0 && (\n <AccordionHeaderRightContentSlot>\n {headerContent.rightContent}\n </AccordionHeaderRightContentSlot>\n )}\n </Flex>\n );\n};\n\nAccordionHeader.displayName = \"Accordion.Header\";\n","import { AccordionPanelSlot } from \"../accordion.slots\";\nimport { DisclosurePanel as RaDisclosurePanel } from \"react-aria-components\";\nimport type { AccordionContentProps } from \"../accordion.types\";\nimport { extractStyleProps } from \"@/utils\";\n\n/**\n * Accordion.Content - The collapsible content area\n *\n * Contains the main content that is shown/hidden when the header is activated.\n *\n * @supportsStyleProps\n */\nexport const AccordionContent = ({\n children,\n ref,\n ...props\n}: AccordionContentProps) => {\n const [styleProps, restProps] = extractStyleProps(props);\n\n return (\n <AccordionPanelSlot ref={ref} {...styleProps} asChild>\n <RaDisclosurePanel {...restProps}>{children}</RaDisclosurePanel>\n </AccordionPanelSlot>\n );\n};\n\nAccordionContent.displayName = \"Accordion.Content\";\n"],"names":["$9385b3affbdec831$export$f36461af0ef4707d","props","allowsMultipleExpanded","isDisabled","expandedKeys","setExpandedKeys","$j4gLc$useControlledState","$j4gLc$useMemo","$j4gLc$useEffect","firstKey","key","keys","$28f4fd908f0de97f$export$1d40e3e0cc4d5de","$hI1OT$createContext","$28f4fd908f0de97f$export$944aceb4f8c89f10","$hI1OT$forwardRef","ref","state","$hI1OT$useDisclosureGroupState","renderProps","$64fa3d84918910a7$export$4d86445c2cf5e3","domProps","$hI1OT$filterDOMProps","$hI1OT$react","$28f4fd908f0de97f$export$d665dd135a51b28a","$28f4fd908f0de97f$export$dab3ea4a6ef094da","$28f4fd908f0de97f$var$InternalDisclosureContext","$28f4fd908f0de97f$export$74a362b31437ec83","$64fa3d84918910a7$export$29f1550f4b0d4415","groupState","$hI1OT$useContext","id","otherProps","defaultId","$hI1OT$useId","isExpanded","$hI1OT$useDisclosureState","_props_onExpandedChange","panelRef","buttonProps","panelProps","$hI1OT$useDisclosure","isFocusVisibleWithin","focusWithinProps","$hI1OT$useFocusRing","$64fa3d84918910a7$export$2881499e37b75b9a","$d2b4bc8c273e7be6$export$24d547caef80ccd1","$64fa3d84918910a7$export$c62b8e45d58ddad9","$hI1OT$mergeProps","$28f4fd908f0de97f$export$feabaa331e1d464c","role","DOMProps","$hI1OT$mergeRefs","withProvider","withContext","createSlotRecipeContext","AccordionRootSlot","AccordionDisclosureSlot","AccordionTriggerSlot","AccordionPanelSlot","AccordionTitleSlot","AccordionHeaderRightContentSlot","AccordionRoot","restProps","recipe","useSlotRecipe","recipeProps","restRecipeProps","styleProps","raProps","extractStyleProps","jsx","RaDisclosureGroup","AccordionItem","children","value","disclosureProps","RaDisclosure","AccordionHeaderRightContent","AccordionHeader","headerContent","useMemo","main","rightContent","React","child","jsxs","Flex","RaButton","KeyboardArrowRight","AccordionContent","RaDisclosurePanel"],"mappings":"kkBAeA,SAASA,EAA0CC,EAAO,CACtD,GAAI,CAAE,uBAAwBC,EAAyB,GAAO,WAAYC,EAAa,EAAK,EAAKF,EAC7F,CAACG,EAAcC,CAAe,EAAQC,EAAAA,0CAA+BC,EAAAA,QAAgB,IAAIN,EAAM,aAAe,IAAI,IAAIA,EAAM,YAAY,EAAI,OAAW,CACvJA,EAAM,YACd,CAAK,EAAOM,EAAAA,QAAgB,IAAIN,EAAM,oBAAsB,IAAI,IAAIA,EAAM,mBAAmB,EAAI,IAAI,IAAO,CACpGA,EAAM,mBACd,CAAK,EAAGA,EAAM,gBAAgB,EAC1B,OAAIO,EAAAA,UAAkB,IAAI,CAEtB,GAAI,CAACN,GAA0BE,EAAa,KAAO,EAAG,CAClD,IAAIK,EAAWL,EAAa,OAAM,EAAG,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BsB,EAAa,KAAKE,CAAK,EAEvBH,EAAK,KAAKG,CAAK,CAEnB,CAAC,EAEM,CAAE,KAAAH,EAAM,aAAAC,CAAA,CACjB,EAAG,CAACT,CAAQ,CAAC,EAEb,OACEY,EAAAA,KAACC,EAAAA,KAAA,CACC,eAAe,gBACf,WAAW,SACX,aAAa,WACb,YAAY,YACX,GAAGnB,EAEJ,SAAA,CAAAG,EAAAA,IAACb,EAAA,CAAqB,IAAA1C,EAAU,KAAK,UAAU,QAAO,GACpD,SAAAsE,EAAAA,KAACE,EAAAA,0CAAA,CAAU,GAAGzB,EACZ,SAAA,CAAAQ,EAAAA,IAACkB,EAAAA,mBAAA,EAAmB,EACpBlB,EAAAA,IAACX,EAAA,CAAoB,SAAAoB,EAAc,IAAA,CAAK,CAAA,CAAA,CAC1C,CAAA,CACF,EACCA,EAAc,aAAa,OAAS,GACnCT,EAAAA,IAACV,EAAA,CACE,WAAc,YAAA,CACjB,CAAA,CAAA,CAAA,CAIR,EAEAkB,EAAgB,YAAc,mBC1DvB,MAAMW,EAAmB,CAAC,CAC/B,SAAAhB,EACA,IAAA1D,EACA,GAAGf,CACL,IAA6B,CAC3B,KAAM,CAACmE,EAAYL,CAAS,EAAIO,EAAAA,kBAAkBrE,CAAK,EAEvD,OACEsE,EAAAA,IAACZ,EAAA,CAAmB,IAAA3C,EAAW,GAAGoD,EAAY,QAAO,GACnD,SAAAG,EAAAA,IAACoB,EAAA,CAAmB,GAAG5B,EAAY,SAAAW,CAAA,CAAS,EAC9C,CAEJ,EAEAgB,EAAiB,YAAc","x_google_ignoreList":[0,1]}
@@ -0,0 +1,228 @@
1
+ import { jsx as i, jsxs as v } from "react/jsx-runtime";
2
+ import { useSlotRecipe as _ } from "@chakra-ui/react/styled-system";
3
+ import { e as p } from "./extract-style-props-CMyV-es-.es.js";
4
+ import c, { useMemo as m, useEffect as j, forwardRef as P, useContext as A, createContext as $ } from "react";
5
+ import { KeyboardArrowRight as T } from "@commercetools/nimbus-icons";
6
+ import { $ as D, a as G } from "./Button-C9AKe3Kt.es.js";
7
+ import { F as z } from "./flex-BqxAMF-7.es.js";
8
+ import { createSlotRecipeContext as B } from "@chakra-ui/react";
9
+ import { a as g, d as O, e as w, $ as q, g as J } from "./utils-CrjF8U_E.es.js";
10
+ import { $ as R, a as L } from "./mergeProps-B-cqsBhL.es.js";
11
+ import { $ as C } from "./filterDOMProps-Cxz9cAAv.es.js";
12
+ import { $ as S } from "./useFocusRing-CZQUsztf.es.js";
13
+ import { $ as Q, a as U } from "./useDisclosureState-CPUsvP5-.es.js";
14
+ import { $ as X } from "./useControlledState-3TGZUXux.es.js";
15
+ function Y(o) {
16
+ let { allowsMultipleExpanded: e = !1, isDisabled: s = !1 } = o, [t, a] = X(m(() => o.expandedKeys ? new Set(o.expandedKeys) : void 0, [
17
+ o.expandedKeys
18
+ ]), m(() => o.defaultExpandedKeys ? new Set(o.defaultExpandedKeys) : /* @__PURE__ */ new Set(), [
19
+ o.defaultExpandedKeys
20
+ ]), o.onExpandedChange);
21
+ return j(() => {
22
+ if (!e && t.size > 1) {
23
+ let d = t.values().next().value;
24
+ d != null && a(/* @__PURE__ */ new Set([
25
+ d
26
+ ]));
27
+ }
28
+ }), {
29
+ allowsMultipleExpanded: e,
30
+ isDisabled: s,
31
+ expandedKeys: t,
32
+ setExpandedKeys: a,
33
+ toggleKey(d) {
34
+ let n;
35
+ e ? (n = new Set(t), n.has(d) ? n.delete(d) : n.add(d)) : n = new Set(t.has(d) ? [] : [
36
+ d
37
+ ]), a(n);
38
+ }
39
+ };
40
+ }
41
+ const K = /* @__PURE__ */ $(null), Z = /* @__PURE__ */ P(function(e, s) {
42
+ let t = Y(e), a = g({
43
+ ...e,
44
+ defaultClassName: "react-aria-DisclosureGroup",
45
+ values: {
46
+ isDisabled: t.isDisabled,
47
+ state: t
48
+ }
49
+ }), d = C(e, {
50
+ global: !0
51
+ });
52
+ return /* @__PURE__ */ c.createElement("div", {
53
+ ...d,
54
+ ...a,
55
+ ref: s,
56
+ "data-disabled": e.isDisabled || void 0
57
+ }, /* @__PURE__ */ c.createElement(K.Provider, {
58
+ value: t
59
+ }, a.children));
60
+ }), k = /* @__PURE__ */ $(null), ee = /* @__PURE__ */ $(null), F = /* @__PURE__ */ $(null), te = /* @__PURE__ */ P(function(e, s) {
61
+ [e, s] = q(e, s, k);
62
+ let t = A(K), { id: a, ...d } = e, n = L();
63
+ a || (a = n);
64
+ let l = t ? t.expandedKeys.has(a) : e.isExpanded, r = Q({
65
+ ...e,
66
+ isExpanded: l,
67
+ onExpandedChange(M) {
68
+ var x;
69
+ t && t.toggleKey(a), (x = e.onExpandedChange) === null || x === void 0 || x.call(e, M);
70
+ }
71
+ }), u = c.useRef(null), b = e.isDisabled || t?.isDisabled || !1, { buttonProps: V, panelProps: W } = U({
72
+ ...e,
73
+ isExpanded: l,
74
+ isDisabled: b
75
+ }, r, u), { isFocusVisible: E, focusProps: H } = S({
76
+ within: !0
77
+ }), y = g({
78
+ ...e,
79
+ id: void 0,
80
+ defaultClassName: "react-aria-Disclosure",
81
+ values: {
82
+ isExpanded: r.isExpanded,
83
+ isDisabled: b,
84
+ isFocusVisibleWithin: E,
85
+ state: r
86
+ }
87
+ }), I = C(d, {
88
+ global: !0
89
+ });
90
+ return /* @__PURE__ */ c.createElement(w, {
91
+ values: [
92
+ [
93
+ D,
94
+ {
95
+ slots: {
96
+ [J]: {},
97
+ trigger: V
98
+ }
99
+ }
100
+ ],
101
+ [
102
+ F,
103
+ {
104
+ panelProps: W,
105
+ panelRef: u
106
+ }
107
+ ],
108
+ [
109
+ ee,
110
+ r
111
+ ]
112
+ ]
113
+ }, /* @__PURE__ */ c.createElement("div", {
114
+ ...R(I, y, H),
115
+ ref: s,
116
+ "data-expanded": r.isExpanded || void 0,
117
+ "data-disabled": b || void 0,
118
+ "data-focus-visible-within": E || void 0
119
+ }, y.children));
120
+ }), oe = /* @__PURE__ */ P(function(e, s) {
121
+ let { role: t = "group" } = e, { panelProps: a, panelRef: d } = A(F), { isFocusVisible: n, focusProps: l } = S({
122
+ within: !0
123
+ }), r = g({
124
+ ...e,
125
+ defaultClassName: "react-aria-DisclosurePanel",
126
+ values: {
127
+ isFocusVisibleWithin: n
128
+ }
129
+ }), u = C(e, {
130
+ global: !0,
131
+ labelable: !0
132
+ });
133
+ return /* @__PURE__ */ c.createElement("div", {
134
+ ...R(u, r, a, l),
135
+ ref: O(s, d),
136
+ role: t,
137
+ "data-focus-visible-within": n || void 0
138
+ }, /* @__PURE__ */ c.createElement(w, {
139
+ values: [
140
+ [
141
+ D,
142
+ null
143
+ ]
144
+ ]
145
+ }, e.children));
146
+ }), { withProvider: de, withContext: f } = /* @__PURE__ */ B({
147
+ key: "nimbusAccordion"
148
+ }), ae = /* @__PURE__ */ de("div", "root"), se = /* @__PURE__ */ f("div", "disclosure"), ne = /* @__PURE__ */ f("button", "trigger"), re = /* @__PURE__ */ f("div", "panel"), ie = /* @__PURE__ */ f("div", "accordionTitle"), h = /* @__PURE__ */ f("div", "headerContentRight"), le = (o) => {
149
+ const { ref: e, ...s } = o, t = _({ key: "nimbusAccordion" }), [a, d] = t.splitVariantProps(s), [n, l] = p(d);
150
+ return /* @__PURE__ */ i(ae, { ref: e, ...a, ...n, asChild: !0, children: /* @__PURE__ */ i(Z, { ...l }) });
151
+ };
152
+ le.displayName = "Accordion.Root";
153
+ const ce = ({
154
+ children: o,
155
+ value: e,
156
+ ref: s,
157
+ ...t
158
+ }) => {
159
+ const [a, d] = p(t), n = {
160
+ ...d,
161
+ id: e
162
+ // React Aria uses id for the key
163
+ };
164
+ return /* @__PURE__ */ i(
165
+ se,
166
+ {
167
+ "data-value": e,
168
+ ref: s,
169
+ ...a,
170
+ asChild: !0,
171
+ children: /* @__PURE__ */ i(te, { ...n, children: o })
172
+ }
173
+ );
174
+ };
175
+ ce.displayName = "Accordion.Item";
176
+ const N = ({
177
+ children: o,
178
+ ref: e,
179
+ ...s
180
+ }) => /* @__PURE__ */ i(h, { ref: e, ...s, children: o });
181
+ N.displayName = "Accordion.HeaderRightContent";
182
+ const fe = ({
183
+ children: o,
184
+ ref: e,
185
+ ...s
186
+ }) => {
187
+ const [t, a] = p(s), d = m(() => {
188
+ const n = [], l = [];
189
+ return c.Children.forEach(o, (r) => {
190
+ c.isValidElement(r) && (r.type === N || r.type === h) ? l.push(r) : n.push(r);
191
+ }), { main: n, rightContent: l };
192
+ }, [o]);
193
+ return /* @__PURE__ */ v(
194
+ z,
195
+ {
196
+ justifyContent: "space-between",
197
+ alignItems: "center",
198
+ borderBottom: "solid-25",
199
+ borderColor: "neutral.4",
200
+ ...t,
201
+ children: [
202
+ /* @__PURE__ */ i(ne, { ref: e, slot: "trigger", asChild: !0, children: /* @__PURE__ */ v(G, { ...a, children: [
203
+ /* @__PURE__ */ i(T, {}),
204
+ /* @__PURE__ */ i(ie, { children: d.main })
205
+ ] }) }),
206
+ d.rightContent.length > 0 && /* @__PURE__ */ i(h, { children: d.rightContent })
207
+ ]
208
+ }
209
+ );
210
+ };
211
+ fe.displayName = "Accordion.Header";
212
+ const ue = ({
213
+ children: o,
214
+ ref: e,
215
+ ...s
216
+ }) => {
217
+ const [t, a] = p(s);
218
+ return /* @__PURE__ */ i(re, { ref: e, ...t, asChild: !0, children: /* @__PURE__ */ i(oe, { ...a, children: o }) });
219
+ };
220
+ ue.displayName = "Accordion.Content";
221
+ export {
222
+ ue as A,
223
+ fe as a,
224
+ N as b,
225
+ ce as c,
226
+ le as d
227
+ };
228
+ //# sourceMappingURL=accordion.content-I6FlZR6t.es.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"accordion.content-I6FlZR6t.es.js","sources":["../../../../node_modules/.pnpm/@react-stately+disclosure@3.0.9_react@19.2.0/node_modules/@react-stately/disclosure/dist/useDisclosureGroupState.mjs","../../../../node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.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.item.tsx","../../src/components/accordion/components/accordion.header-right-content.tsx","../../src/components/accordion/components/accordion.header.tsx","../../src/components/accordion/components/accordion.content.tsx"],"sourcesContent":["import {useControlledState as $j4gLc$useControlledState} from \"@react-stately/utils\";\nimport {useMemo as $j4gLc$useMemo, useEffect as $j4gLc$useEffect} from \"react\";\n\n/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\nfunction $9385b3affbdec831$export$f36461af0ef4707d(props) {\n let { allowsMultipleExpanded: allowsMultipleExpanded = false, isDisabled: isDisabled = false } = props;\n let [expandedKeys, setExpandedKeys] = (0, $j4gLc$useControlledState)((0, $j4gLc$useMemo)(()=>props.expandedKeys ? new Set(props.expandedKeys) : undefined, [\n props.expandedKeys\n ]), (0, $j4gLc$useMemo)(()=>props.defaultExpandedKeys ? new Set(props.defaultExpandedKeys) : new Set(), [\n props.defaultExpandedKeys\n ]), props.onExpandedChange);\n (0, $j4gLc$useEffect)(()=>{\n // Ensure only one item is expanded if allowsMultipleExpanded is false.\n if (!allowsMultipleExpanded && expandedKeys.size > 1) {\n let firstKey = expandedKeys.values().next().value;\n if (firstKey != null) setExpandedKeys(new Set([\n firstKey\n ]));\n }\n });\n return {\n allowsMultipleExpanded: allowsMultipleExpanded,\n isDisabled: isDisabled,\n expandedKeys: expandedKeys,\n setExpandedKeys: setExpandedKeys,\n toggleKey (key) {\n let keys;\n if (allowsMultipleExpanded) {\n keys = new Set(expandedKeys);\n if (keys.has(key)) keys.delete(key);\n else keys.add(key);\n } else keys = new Set(expandedKeys.has(key) ? [] : [\n key\n ]);\n setExpandedKeys(keys);\n }\n };\n}\n\n\nexport {$9385b3affbdec831$export$f36461af0ef4707d as useDisclosureGroupState};\n//# sourceMappingURL=useDisclosureGroupState.module.js.map\n","import {ButtonContext as $d2b4bc8c273e7be6$export$24d547caef80ccd1} from \"./Button.mjs\";\nimport {DEFAULT_SLOT as $64fa3d84918910a7$export$c62b8e45d58ddad9, Provider as $64fa3d84918910a7$export$2881499e37b75b9a, useContextProps as $64fa3d84918910a7$export$29f1550f4b0d4415, useRenderProps as $64fa3d84918910a7$export$4d86445c2cf5e3} from \"./utils.mjs\";\nimport {useDisclosure as $hI1OT$useDisclosure, useFocusRing as $hI1OT$useFocusRing} from \"react-aria\";\nimport {useDisclosureGroupState as $hI1OT$useDisclosureGroupState, useDisclosureState as $hI1OT$useDisclosureState} from \"react-stately\";\nimport {filterDOMProps as $hI1OT$filterDOMProps, useId as $hI1OT$useId, mergeProps as $hI1OT$mergeProps, mergeRefs as $hI1OT$mergeRefs} from \"@react-aria/utils\";\nimport $hI1OT$react, {createContext as $hI1OT$createContext, forwardRef as $hI1OT$forwardRef, useContext as $hI1OT$useContext} from \"react\";\n\n/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\n\n\n\n\nconst $28f4fd908f0de97f$export$1d40e3e0cc4d5de = /*#__PURE__*/ (0, $hI1OT$createContext)(null);\nconst $28f4fd908f0de97f$export$944aceb4f8c89f10 = /*#__PURE__*/ (0, $hI1OT$forwardRef)(function DisclosureGroup(props, ref) {\n let state = (0, $hI1OT$useDisclosureGroupState)(props);\n let renderProps = (0, $64fa3d84918910a7$export$4d86445c2cf5e3)({\n ...props,\n defaultClassName: 'react-aria-DisclosureGroup',\n values: {\n isDisabled: state.isDisabled,\n state: state\n }\n });\n let domProps = (0, $hI1OT$filterDOMProps)(props, {\n global: true\n });\n return /*#__PURE__*/ (0, $hI1OT$react).createElement(\"div\", {\n ...domProps,\n ...renderProps,\n ref: ref,\n \"data-disabled\": props.isDisabled || undefined\n }, /*#__PURE__*/ (0, $hI1OT$react).createElement($28f4fd908f0de97f$export$1d40e3e0cc4d5de.Provider, {\n value: state\n }, renderProps.children));\n});\nconst $28f4fd908f0de97f$export$d665dd135a51b28a = /*#__PURE__*/ (0, $hI1OT$createContext)(null);\nconst $28f4fd908f0de97f$export$dab3ea4a6ef094da = /*#__PURE__*/ (0, $hI1OT$createContext)(null);\nconst $28f4fd908f0de97f$var$InternalDisclosureContext = /*#__PURE__*/ (0, $hI1OT$createContext)(null);\nconst $28f4fd908f0de97f$export$74a362b31437ec83 = /*#__PURE__*/ (0, $hI1OT$forwardRef)(function Disclosure(props, ref) {\n [props, ref] = (0, $64fa3d84918910a7$export$29f1550f4b0d4415)(props, ref, $28f4fd908f0de97f$export$d665dd135a51b28a);\n let groupState = (0, $hI1OT$useContext)($28f4fd908f0de97f$export$1d40e3e0cc4d5de);\n let { id: id, ...otherProps } = props;\n // Generate an id if one wasn't provided.\n // (can't pass id into useId since it can also be a number)\n let defaultId = (0, $hI1OT$useId)();\n id || (id = defaultId);\n let isExpanded = groupState ? groupState.expandedKeys.has(id) : props.isExpanded;\n let state = (0, $hI1OT$useDisclosureState)({\n ...props,\n isExpanded: isExpanded,\n onExpandedChange (isExpanded) {\n var _props_onExpandedChange;\n if (groupState) groupState.toggleKey(id);\n (_props_onExpandedChange = props.onExpandedChange) === null || _props_onExpandedChange === void 0 ? void 0 : _props_onExpandedChange.call(props, isExpanded);\n }\n });\n let panelRef = (0, $hI1OT$react).useRef(null);\n let isDisabled = props.isDisabled || (groupState === null || groupState === void 0 ? void 0 : groupState.isDisabled) || false;\n let { buttonProps: buttonProps, panelProps: panelProps } = (0, $hI1OT$useDisclosure)({\n ...props,\n isExpanded: isExpanded,\n isDisabled: isDisabled\n }, state, panelRef);\n let { isFocusVisible: isFocusVisibleWithin, focusProps: focusWithinProps } = (0, $hI1OT$useFocusRing)({\n within: true\n });\n let renderProps = (0, $64fa3d84918910a7$export$4d86445c2cf5e3)({\n ...props,\n id: undefined,\n defaultClassName: 'react-aria-Disclosure',\n values: {\n isExpanded: state.isExpanded,\n isDisabled: isDisabled,\n isFocusVisibleWithin: isFocusVisibleWithin,\n state: state\n }\n });\n let domProps = (0, $hI1OT$filterDOMProps)(otherProps, {\n global: true\n });\n return /*#__PURE__*/ (0, $hI1OT$react).createElement((0, $64fa3d84918910a7$export$2881499e37b75b9a), {\n values: [\n [\n (0, $d2b4bc8c273e7be6$export$24d547caef80ccd1),\n {\n slots: {\n [(0, $64fa3d84918910a7$export$c62b8e45d58ddad9)]: {},\n trigger: buttonProps\n }\n }\n ],\n [\n $28f4fd908f0de97f$var$InternalDisclosureContext,\n {\n panelProps: panelProps,\n panelRef: panelRef\n }\n ],\n [\n $28f4fd908f0de97f$export$dab3ea4a6ef094da,\n state\n ]\n ]\n }, /*#__PURE__*/ (0, $hI1OT$react).createElement(\"div\", {\n ...(0, $hI1OT$mergeProps)(domProps, renderProps, focusWithinProps),\n ref: ref,\n \"data-expanded\": state.isExpanded || undefined,\n \"data-disabled\": isDisabled || undefined,\n \"data-focus-visible-within\": isFocusVisibleWithin || undefined\n }, renderProps.children));\n});\nconst $28f4fd908f0de97f$export$feabaa331e1d464c = /*#__PURE__*/ (0, $hI1OT$forwardRef)(function DisclosurePanel(props, ref) {\n let { role: role = 'group' } = props;\n let { panelProps: panelProps, panelRef: panelRef } = (0, $hI1OT$useContext)($28f4fd908f0de97f$var$InternalDisclosureContext);\n let { isFocusVisible: isFocusVisibleWithin, focusProps: focusWithinProps } = (0, $hI1OT$useFocusRing)({\n within: true\n });\n let renderProps = (0, $64fa3d84918910a7$export$4d86445c2cf5e3)({\n ...props,\n defaultClassName: 'react-aria-DisclosurePanel',\n values: {\n isFocusVisibleWithin: isFocusVisibleWithin\n }\n });\n let DOMProps = (0, $hI1OT$filterDOMProps)(props, {\n global: true,\n labelable: true\n });\n return /*#__PURE__*/ (0, $hI1OT$react).createElement(\"div\", {\n ...(0, $hI1OT$mergeProps)(DOMProps, renderProps, panelProps, focusWithinProps),\n ref: (0, $hI1OT$mergeRefs)(ref, panelRef),\n role: role,\n \"data-focus-visible-within\": isFocusVisibleWithin || undefined\n }, /*#__PURE__*/ (0, $hI1OT$react).createElement((0, $64fa3d84918910a7$export$2881499e37b75b9a), {\n values: [\n [\n (0, $d2b4bc8c273e7be6$export$24d547caef80ccd1),\n null\n ]\n ]\n }, props.children));\n});\n\n\nexport {$28f4fd908f0de97f$export$1d40e3e0cc4d5de as DisclosureGroupStateContext, $28f4fd908f0de97f$export$944aceb4f8c89f10 as DisclosureGroup, $28f4fd908f0de97f$export$d665dd135a51b28a as DisclosureContext, $28f4fd908f0de97f$export$dab3ea4a6ef094da as DisclosureStateContext, $28f4fd908f0de97f$export$74a362b31437ec83 as Disclosure, $28f4fd908f0de97f$export$feabaa331e1d464c as DisclosurePanel};\n//# sourceMappingURL=Disclosure.module.js.map\n","import {\n createSlotRecipeContext,\n type HTMLChakraProps,\n} from \"@chakra-ui/react\";\nimport type { SlotComponent } from \"@/type-utils\";\nimport type { AccordionRootSlotProps } from \"./accordion.types\";\n\nconst { withProvider, withContext } = createSlotRecipeContext({\n key: \"nimbusAccordion\",\n});\n\nexport const AccordionRootSlot: SlotComponent<\n HTMLDivElement,\n AccordionRootSlotProps\n> = withProvider<HTMLDivElement, AccordionRootSlotProps>(\"div\", \"root\");\n\nexport const AccordionDisclosureSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"disclosure\");\n\nexport const AccordionTriggerSlot = withContext<\n HTMLButtonElement,\n HTMLChakraProps<\"button\">\n>(\"button\", \"trigger\");\n\nexport const AccordionPanelSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"panel\");\n\nexport const AccordionTitleSlot = withContext<\n HTMLButtonElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"accordionTitle\");\n\nexport const AccordionHeaderRightContentSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"headerContentRight\");\n","import { AccordionRootSlot } from \"../accordion.slots\";\nimport { useSlotRecipe } from \"@chakra-ui/react/styled-system\";\nimport { DisclosureGroup as RaDisclosureGroup } from \"react-aria-components\";\nimport type { AccordionRootProps } from \"../accordion.types\";\nimport { extractStyleProps } from \"@/utils\";\n\n/**\n * Accordion.Root\n *\n * Provides context and configuration for all accordion items.\n *\n * @supportsStyleProps\n */\nexport const AccordionRoot = (props: AccordionRootProps) => {\n const { ref, ...restProps } = props;\n const recipe = useSlotRecipe({ key: \"nimbusAccordion\" });\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\nAccordionRoot.displayName = \"Accordion.Root\";\n","import { AccordionDisclosureSlot } from \"../accordion.slots\";\nimport { Disclosure as RaDisclosure } from \"react-aria-components\";\nimport type { AccordionItemProps } from \"../accordion.types\";\nimport { extractStyleProps } from \"@/utils\";\n\n/**\n * Accordion.Item - An individual accordion item\n *\n * Contains a header and collapsible content.\n * Multiple items can be placed within an Accordion.Root.\n *\n * @supportsStyleProps\n */\nexport const AccordionItem = ({\n children,\n value,\n ref,\n ...props\n}: AccordionItemProps) => {\n const [styleProps, restProps] = extractStyleProps(props);\n const disclosureProps = {\n ...restProps,\n id: value, // React Aria uses id for the key\n };\n\n return (\n <AccordionDisclosureSlot\n data-value={value}\n ref={ref}\n {...styleProps}\n asChild\n >\n <RaDisclosure {...disclosureProps}>{children}</RaDisclosure>\n </AccordionDisclosureSlot>\n );\n};\n\nAccordionItem.displayName = \"Accordion.Item\";\n","import { AccordionHeaderRightContentSlot } from \"../accordion.slots\";\nimport type { AccordionHeaderRightContentProps } from \"../accordion.types\";\n\n/**\n * Accordion.HeaderRightContent - Content displayed on the right side of the accordion header\n *\n * Used to add actions, badges, or additional information to the header.\n * Positioned to the right of the header title.\n *\n * @supportsStyleProps\n */\nexport const AccordionHeaderRightContent = ({\n children,\n ref,\n ...props\n}: AccordionHeaderRightContentProps) => {\n return (\n <AccordionHeaderRightContentSlot ref={ref} {...props}>\n {children}\n </AccordionHeaderRightContentSlot>\n );\n};\n\nAccordionHeaderRightContent.displayName = \"Accordion.HeaderRightContent\";\n","import React, { useMemo } from \"react\";\nimport {\n AccordionTriggerSlot,\n AccordionTitleSlot,\n AccordionHeaderRightContentSlot,\n} from \"../accordion.slots\";\nimport { Flex } from \"@/components\";\nimport { KeyboardArrowRight } from \"@commercetools/nimbus-icons\";\nimport { Button as RaButton } from \"react-aria-components\";\nimport type { AccordionHeaderProps } from \"../accordion.types\";\nimport { extractStyleProps } from \"@/utils\";\nimport { AccordionHeaderRightContent } from \"./accordion.header-right-content\";\n\n/**\n * Accordion.Header - The clickable header for accordion items\n *\n * Expands/collapses the accordion content when activated.\n * Handles keyboard and mouse interactions.\n *\n * @supportsStyleProps\n */\nexport const AccordionHeader = ({\n children,\n ref,\n ...props\n}: AccordionHeaderProps) => {\n const [styleProps, restProps] = extractStyleProps(props);\n // Extract HeaderRightContent if present\n const headerContent = useMemo(() => {\n const main: React.ReactNode[] = [];\n const rightContent: React.ReactNode[] = [];\n\n React.Children.forEach(children, (child) => {\n if (\n React.isValidElement(child) &&\n (child.type === AccordionHeaderRightContent ||\n child.type === AccordionHeaderRightContentSlot)\n ) {\n rightContent.push(child);\n } else {\n main.push(child);\n }\n });\n\n return { main, rightContent };\n }, [children]);\n\n return (\n <Flex\n justifyContent=\"space-between\"\n alignItems=\"center\"\n borderBottom=\"solid-25\"\n borderColor=\"neutral.4\"\n {...styleProps}\n >\n <AccordionTriggerSlot ref={ref} slot=\"trigger\" asChild>\n <RaButton {...restProps}>\n <KeyboardArrowRight />\n <AccordionTitleSlot>{headerContent.main}</AccordionTitleSlot>\n </RaButton>\n </AccordionTriggerSlot>\n {headerContent.rightContent.length > 0 && (\n <AccordionHeaderRightContentSlot>\n {headerContent.rightContent}\n </AccordionHeaderRightContentSlot>\n )}\n </Flex>\n );\n};\n\nAccordionHeader.displayName = \"Accordion.Header\";\n","import { AccordionPanelSlot } from \"../accordion.slots\";\nimport { DisclosurePanel as RaDisclosurePanel } from \"react-aria-components\";\nimport type { AccordionContentProps } from \"../accordion.types\";\nimport { extractStyleProps } from \"@/utils\";\n\n/**\n * Accordion.Content - The collapsible content area\n *\n * Contains the main content that is shown/hidden when the header is activated.\n *\n * @supportsStyleProps\n */\nexport const AccordionContent = ({\n children,\n ref,\n ...props\n}: AccordionContentProps) => {\n const [styleProps, restProps] = extractStyleProps(props);\n\n return (\n <AccordionPanelSlot ref={ref} {...styleProps} asChild>\n <RaDisclosurePanel {...restProps}>{children}</RaDisclosurePanel>\n </AccordionPanelSlot>\n );\n};\n\nAccordionContent.displayName = \"Accordion.Content\";\n"],"names":["$9385b3affbdec831$export$f36461af0ef4707d","props","allowsMultipleExpanded","isDisabled","expandedKeys","setExpandedKeys","$j4gLc$useControlledState","$j4gLc$useMemo","$j4gLc$useEffect","firstKey","key","keys","$28f4fd908f0de97f$export$1d40e3e0cc4d5de","$hI1OT$createContext","$28f4fd908f0de97f$export$944aceb4f8c89f10","$hI1OT$forwardRef","ref","state","$hI1OT$useDisclosureGroupState","renderProps","$64fa3d84918910a7$export$4d86445c2cf5e3","domProps","$hI1OT$filterDOMProps","$hI1OT$react","$28f4fd908f0de97f$export$d665dd135a51b28a","$28f4fd908f0de97f$export$dab3ea4a6ef094da","$28f4fd908f0de97f$var$InternalDisclosureContext","$28f4fd908f0de97f$export$74a362b31437ec83","$64fa3d84918910a7$export$29f1550f4b0d4415","groupState","$hI1OT$useContext","id","otherProps","defaultId","$hI1OT$useId","isExpanded","$hI1OT$useDisclosureState","_props_onExpandedChange","panelRef","buttonProps","panelProps","$hI1OT$useDisclosure","isFocusVisibleWithin","focusWithinProps","$hI1OT$useFocusRing","$64fa3d84918910a7$export$2881499e37b75b9a","$d2b4bc8c273e7be6$export$24d547caef80ccd1","$64fa3d84918910a7$export$c62b8e45d58ddad9","$hI1OT$mergeProps","$28f4fd908f0de97f$export$feabaa331e1d464c","role","DOMProps","$hI1OT$mergeRefs","withProvider","withContext","createSlotRecipeContext","AccordionRootSlot","AccordionDisclosureSlot","AccordionTriggerSlot","AccordionPanelSlot","AccordionTitleSlot","AccordionHeaderRightContentSlot","AccordionRoot","restProps","recipe","useSlotRecipe","recipeProps","restRecipeProps","styleProps","raProps","extractStyleProps","jsx","RaDisclosureGroup","AccordionItem","children","value","disclosureProps","RaDisclosure","AccordionHeaderRightContent","AccordionHeader","headerContent","useMemo","main","rightContent","React","child","jsxs","Flex","RaButton","KeyboardArrowRight","AccordionContent","RaDisclosurePanel"],"mappings":";;;;;;;;;;;;;;AAeA,SAASA,EAA0CC,GAAO;AACtD,MAAI,EAAE,wBAAwBC,IAAyB,IAAO,YAAYC,IAAa,GAAK,IAAKF,GAC7F,CAACG,GAAcC,CAAe,IAAQC,EAA+BC,EAAgB,MAAIN,EAAM,eAAe,IAAI,IAAIA,EAAM,YAAY,IAAI,QAAW;AAAA,IACvJA,EAAM;AAAA,EACd,CAAK,GAAOM,EAAgB,MAAIN,EAAM,sBAAsB,IAAI,IAAIA,EAAM,mBAAmB,IAAI,oBAAI,IAAG,GAAI;AAAA,IACpGA,EAAM;AAAA,EACd,CAAK,GAAGA,EAAM,gBAAgB;AAC1B,SAAIO,EAAkB,MAAI;AAEtB,QAAI,CAACN,KAA0BE,EAAa,OAAO,GAAG;AAClD,UAAIK,IAAWL,EAAa,OAAM,EA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A,EAAmB;AAAA,UACpB,gBAAAlB,EAACX,IAAA,EAAoB,UAAAoB,EAAc,KAAA,CAAK;AAAA,QAAA,EAAA,CAC1C,EAAA,CACF;AAAA,QACCA,EAAc,aAAa,SAAS,KACnC,gBAAAT,EAACV,GAAA,EACE,YAAc,aAAA,CACjB;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAIR;AAEAkB,GAAgB,cAAc;AC1DvB,MAAMW,KAAmB,CAAC;AAAA,EAC/B,UAAAhB;AAAA,EACA,KAAA1D;AAAA,EACA,GAAGf;AACL,MAA6B;AAC3B,QAAM,CAACmE,GAAYL,CAAS,IAAIO,EAAkBrE,CAAK;AAEvD,SACE,gBAAAsE,EAACZ,IAAA,EAAmB,KAAA3C,GAAW,GAAGoD,GAAY,SAAO,IACnD,UAAA,gBAAAG,EAACoB,IAAA,EAAmB,GAAG5B,GAAY,UAAAW,EAAA,CAAS,GAC9C;AAEJ;AAEAgB,GAAiB,cAAc;","x_google_ignoreList":[0,1]}
@@ -0,0 +1,2 @@
1
+ "use strict";const s=require("react/jsx-runtime"),d=require("@chakra-ui/react"),i=require("@commercetools/nimbus-icons"),g=require("./icon-button-CVdz2C9L.cjs.js"),r=require("./normalize-messages-DtVffO09.cjs.js"),{withProvider:p,withContext:n}=d.createSlotRecipeContext({key:"nimbusAlert"}),x=p("div","root"),j=n("div","title"),D=n("div","description"),h=n("div","icon"),M=n("div","actions"),f=n("div","dismissButton"),v=e=>{switch(e){case"critical":return s.jsx(i.ErrorOutline,{});case"info":return s.jsx(i.Info,{});case"warning":return s.jsx(i.WarningAmber,{});case"positive":return s.jsx(i.CheckCircleOutline,{});default:return null}},o=e=>{const{ref:t,children:A,...u}=e;return s.jsxs(x,{ref:t,...u,role:"alert",children:[s.jsx(h,{alignItems:"flex-start",children:v(u.colorPalette)}),A]})};o.displayName="Alert.Root";const l=({children:e,...t})=>s.jsx(j,{...t,fontWeight:"600",children:e});l.displayName="Alert.Title";const c=({children:e,...t})=>s.jsx(D,{...t,children:e});c.displayName="Alert.Description";const a=({children:e,...t})=>s.jsx(M,{...t,children:e});a.displayName="Alert.Actions";const B={dismiss:"Dismiss"},R={dismiss:"Verwerfen"},z={dismiss:"Desechar"},y={dismiss:"Fermer"},C={dismiss:"Dispensar"},I={en:r.normalizeMessages(B),de:r.normalizeMessages(R),es:r.normalizeMessages(z),"fr-FR":r.normalizeMessages(y),"pt-BR":r.normalizeMessages(C)},m=({...e})=>{const t=r.useLocalizedStringFormatter(I);return s.jsx(f,{children:s.jsx(g.IconButton,{"aria-label":t.format("dismiss"),...e,variant:"ghost",size:"2xs",children:s.jsx(i.Clear,{role:"img"})})})};m.displayName="Alert.DismissButton";const q={Root:o,Title:l,Description:c,Actions:a,DismissButton:m};exports.Alert=q;exports.AlertActions=a;exports.AlertDescription=c;exports.AlertDismissButton=m;exports.AlertRoot=o;exports.AlertTitle=l;
2
+ //# sourceMappingURL=alert-BYLSKkn9.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"alert-BYLSKkn9.cjs.js","sources":["../../src/components/alert/alert.slots.tsx","../../src/components/alert/components/alert.root.tsx","../../src/components/alert/components/alert.title.tsx","../../src/components/alert/components/alert.description.tsx","../../src/components/alert/components/alert.actions.tsx","../../src/components/alert/intl/en.ts","../../src/components/alert/intl/de.ts","../../src/components/alert/intl/es.ts","../../src/components/alert/intl/fr-FR.ts","../../src/components/alert/intl/pt-BR.ts","../../src/components/alert/alert.messages.ts","../../src/components/alert/components/alert.dismiss-button.tsx","../../src/components/alert/alert.tsx"],"sourcesContent":["import { createSlotRecipeContext } from \"@chakra-ui/react\";\nimport type {\n AlertActionsSlotProps,\n AlertDescriptionProps,\n AlertDismissButtonProps,\n AlertIconSlotProps,\n AlertRootSlotProps,\n AlertTitleProps,\n} from \"./alert.types\";\n\nconst { withProvider, withContext } = createSlotRecipeContext({\n key: \"nimbusAlert\",\n});\n\nexport const AlertRoot = withProvider<HTMLDivElement, AlertRootSlotProps>(\n \"div\",\n \"root\"\n);\n\nexport const AlertTitle = withContext<HTMLDivElement, AlertTitleProps>(\n \"div\",\n \"title\"\n);\n\nexport const AlertDescription = withContext<\n HTMLDivElement,\n AlertDescriptionProps\n>(\"div\", \"description\");\n\nexport const AlertIcon = withContext<HTMLDivElement, AlertIconSlotProps>(\n \"div\",\n \"icon\"\n);\n\nexport const AlertActions = withContext<HTMLDivElement, AlertActionsSlotProps>(\n \"div\",\n \"actions\"\n);\n\n// This is a div wrapper for layout placement - note that we expect it to receive `IconButton` props, but we use a `div`.\n// We then forward the consumer props to the interior `IconButton` component.\nexport const AlertDismissButton = withContext<\n HTMLDivElement,\n AlertDismissButtonProps\n>(\"div\", \"dismissButton\");\n","import { AlertRoot as AlertRootSlot, AlertIcon } from \"../alert.slots\";\nimport type { AlertProps, AlertRootComponent } from \"../alert.types\";\nimport {\n CheckCircleOutline,\n ErrorOutline,\n Info,\n WarningAmber,\n} from \"@commercetools/nimbus-icons\";\n\nconst getIconFromColorPalette = (colorPalette: AlertProps[\"colorPalette\"]) => {\n switch (colorPalette) {\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\n/**\n * Alert.Root - Provides feedback to the user about the status of an action or system event\n *\n * @supportsStyleProps\n */\nexport const AlertRoot: AlertRootComponent = (props) => {\n const { ref, children, ...restProps } = props;\n\n return (\n <AlertRootSlot ref={ref} {...restProps} role=\"alert\">\n <AlertIcon alignItems=\"flex-start\">\n {getIconFromColorPalette(restProps.colorPalette)}\n </AlertIcon>\n {children}\n </AlertRootSlot>\n );\n};\n\nAlertRoot.displayName = \"Alert.Root\";\n","import { AlertTitle as AlertTitleSlot } from \"../alert.slots\";\nimport type { AlertTitleProps } from \"../alert.types\";\n\n/**\n * Alert.Title - Displays the title text for the alert\n *\n * @supportsStyleProps\n */\nexport const AlertTitle = ({ children, ...props }: AlertTitleProps) => {\n return (\n <AlertTitleSlot {...props} fontWeight=\"600\">\n {children}\n </AlertTitleSlot>\n );\n};\n\nAlertTitle.displayName = \"Alert.Title\";\n","import { AlertDescription as AlertDescriptionSlot } from \"../alert.slots\";\nimport type { AlertDescriptionProps } from \"../alert.types\";\n\n/**\n * Alert.Description - Displays the description text for the alert\n *\n * @supportsStyleProps\n */\nexport const AlertDescription = ({\n children,\n ...props\n}: AlertDescriptionProps) => {\n return <AlertDescriptionSlot {...props}>{children}</AlertDescriptionSlot>;\n};\n\nAlertDescription.displayName = \"Alert.Description\";\n","import { AlertActions as AlertActionsSlot } from \"../alert.slots\";\nimport type { AlertActionsProps } from \"../alert.types\";\n\n/**\n * Alert.Actions - Container for action buttons within the alert\n *\n * @supportsStyleProps\n */\nexport const AlertActions = ({ children, ...props }: AlertActionsProps) => {\n return <AlertActionsSlot {...props}>{children}</AlertActionsSlot>;\n};\n\nAlertActions.displayName = \"Alert.Actions\";\n","/**\n * Pre-compiled en messages for Alert\n * Generated by @internationalized/string-compiler\n * DO NOT EDIT MANUALLY\n */\n\nexport default { dismiss: `Dismiss` };\n","/**\n * Pre-compiled de messages for Alert\n * Generated by @internationalized/string-compiler\n * DO NOT EDIT MANUALLY\n */\n\nexport default { dismiss: `Verwerfen` };\n","/**\n * Pre-compiled es messages for Alert\n * Generated by @internationalized/string-compiler\n * DO NOT EDIT MANUALLY\n */\n\nexport default { dismiss: `Desechar` };\n","/**\n * Pre-compiled fr-FR messages for Alert\n * Generated by @internationalized/string-compiler\n * DO NOT EDIT MANUALLY\n */\n\nexport default { dismiss: `Fermer` };\n","/**\n * Pre-compiled pt-BR messages for Alert\n * Generated by @internationalized/string-compiler\n * DO NOT EDIT MANUALLY\n */\n\nexport default { dismiss: `Dispensar` };\n","/**\n * Pre-compiled localized messages for Alert component\n *\n * Generated by scripts/generate-dictionaries.ts\n * DO NOT EDIT MANUALLY\n *\n * @see https://react-spectrum.adobe.com/react-aria/internationalization.html\n */\n\nimport {\n type LocalizedString,\n type LocalizedStrings,\n} from \"@internationalized/string\";\nimport { normalizeMessages } from \"../../utils/normalize-messages\";\n\n// Pre-compiled message functions\nimport alertMessages_en from \"./intl/en\";\nimport alertMessages_de from \"./intl/de\";\nimport alertMessages_es from \"./intl/es\";\nimport alertMessages_fr from \"./intl/fr-FR\";\nimport alertMessages_pt from \"./intl/pt-BR\";\n\n// Raw LocalizedStrings object for use with useLocalizedStringFormatter hook\nexport const alertMessagesStrings: LocalizedStrings<string, LocalizedString> = {\n en: normalizeMessages(alertMessages_en),\n de: normalizeMessages(alertMessages_de),\n es: normalizeMessages(alertMessages_es),\n \"fr-FR\": normalizeMessages(alertMessages_fr),\n \"pt-BR\": normalizeMessages(alertMessages_pt),\n} as LocalizedStrings<string, LocalizedString>;\n\n/**\n * Available message keys for Alert component\n */\nexport type AlertMessageKey = \"dismiss\";\n","import { AlertDismissButton as AlertDismissButtonSlot } from \"../alert.slots\";\nimport type { AlertDismissButtonProps } from \"../alert.types\";\nimport { Clear } from \"@commercetools/nimbus-icons\";\nimport { IconButton } from \"../../icon-button\";\nimport { useLocalizedStringFormatter } from \"@/hooks\";\nimport { alertMessagesStrings } from \"../alert.messages\";\n\n/**\n * Alert.DismissButton - Button to dismiss or close the alert\n *\n * @supportsStyleProps\n */\nexport const AlertDismissButton = ({ ...props }: AlertDismissButtonProps) => {\n const msg = useLocalizedStringFormatter(alertMessagesStrings);\n\n return (\n <AlertDismissButtonSlot>\n <IconButton\n aria-label={msg.format(\"dismiss\")}\n {...props}\n variant=\"ghost\"\n size=\"2xs\"\n >\n <Clear role=\"img\" />\n </IconButton>\n </AlertDismissButtonSlot>\n );\n};\n\nAlertDismissButton.displayName = \"Alert.DismissButton\";\n","import {\n AlertTitle,\n AlertDescription,\n AlertActions,\n AlertDismissButton,\n AlertRoot,\n} from \"./components\";\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 *\n * @example\n * ```tsx\n * <Alert.Root tone=\"info\" variant=\"outlined\">\n * <Alert.Title>Information</Alert.Title>\n * <Alert.Description>This is an informational alert message.</Alert.Description>\n * </Alert.Root>\n * ```\n */\nexport const Alert = {\n /**\n * # Alert.Root\n *\n * The root component that provides context and configuration for the alert.\n * Must wrap all alert parts (Title, Description, Actions, DismissButton) to coordinate their behavior.\n *\n * @example\n * ```tsx\n * <Alert.Root tone=\"info\" variant=\"outlined\">\n * <Alert.Title>Title</Alert.Title>\n * <Alert.Description>Description</Alert.Description>\n * </Alert.Root>\n * ```\n */\n Root: AlertRoot,\n /**\n * # Alert.Title\n *\n * Displays the title text for the alert.\n * Typically shown in bold to provide a clear heading for the alert message.\n *\n * @example\n * ```tsx\n * <Alert.Root tone=\"critical\">\n * <Alert.Title>Error Occurred</Alert.Title>\n * </Alert.Root>\n * ```\n */\n Title: AlertTitle,\n /**\n * # Alert.Description\n *\n * Displays the descriptive text for the alert.\n * Provides detailed information about the alert's purpose or the action required.\n *\n * @example\n * ```tsx\n * <Alert.Root tone=\"warning\">\n * <Alert.Title>Warning</Alert.Title>\n * <Alert.Description>Please review the following items before proceeding.</Alert.Description>\n * </Alert.Root>\n * ```\n */\n Description: AlertDescription,\n /**\n * # Alert.Actions\n *\n * Container for action buttons within the alert.\n * Allows users to take actions directly from the alert message.\n *\n * @example\n * ```tsx\n * <Alert.Root tone=\"positive\">\n * <Alert.Title>Success</Alert.Title>\n * <Alert.Description>Your changes have been saved.</Alert.Description>\n * <Alert.Actions>\n * <Button>View Details</Button>\n * </Alert.Actions>\n * </Alert.Root>\n * ```\n */\n Actions: AlertActions,\n /**\n * # Alert.DismissButton\n *\n * Button to dismiss or close the alert.\n * Provides users with the ability to manually remove the alert from view.\n *\n * @example\n * ```tsx\n * <Alert.Root tone=\"info\">\n * <Alert.Title>Notification</Alert.Title>\n * <Alert.Description>You have new messages.</Alert.Description>\n * <Alert.DismissButton onClick={() => console.log('Dismissed')} />\n * </Alert.Root>\n * ```\n */\n DismissButton: AlertDismissButton,\n};\n\n// exports for internal use by react-docgen\nexport {\n AlertRoot as _AlertRoot,\n AlertTitle as _AlertTitle,\n AlertDescription as _AlertDescription,\n AlertActions as _AlertActions,\n AlertDismissButton as _AlertDismissButton,\n};\n"],"names":["withProvider","withContext","createSlotRecipeContext","AlertRoot","AlertTitle","AlertDescription","AlertIcon","AlertActions","AlertDismissButton","getIconFromColorPalette","colorPalette","ErrorOutline","Info","WarningAmber","CheckCircleOutline","props","ref","children","restProps","AlertRootSlot","jsx","AlertTitleSlot","AlertDescriptionSlot","AlertActionsSlot","alertMessages_en","alertMessages_de","alertMessages_es","alertMessages_fr","alertMessages_pt","alertMessagesStrings","normalizeMessages","msg","useLocalizedStringFormatter","AlertDismissButtonSlot","IconButton","Clear","Alert"],"mappings":"sNAUM,CAAE,aAAAA,EAAc,YAAAC,CAAA,EAAgBC,0BAAwB,CAC5D,IAAK,aACP,CAAC,EAEYC,EAAYH,EACvB,MACA,MACF,EAEaI,EAAaH,EACxB,MACA,OACF,EAEaI,EAAmBJ,EAG9B,MAAO,aAAa,EAETK,EAAYL,EACvB,MACA,MACF,EAEaM,EAAeN,EAC1B,MACA,SACF,EAIaO,EAAqBP,EAGhC,MAAO,eAAe,ECnClBQ,EAA2BC,GAA6C,CAC5E,OAAQA,EAAA,CACN,IAAK,WACH,aAAQC,EAAAA,aAAA,EAAa,EACvB,IAAK,OACH,aAAQC,EAAAA,KAAA,EAAK,EACf,IAAK,UACH,aAAQC,EAAAA,aAAA,EAAa,EACvB,IAAK,WACH,aAAQC,EAAAA,mBAAA,EAAmB,EAC7B,QACE,OAAO,IAAA,CAEb,EAOaX,EAAiCY,GAAU,CACtD,KAAM,CAAE,IAAAC,EAAK,SAAAC,EAAU,GAAGC,GAAcH,EAExC,cACGI,EAAA,CAAc,IAAAH,EAAW,GAAGE,EAAW,KAAK,QAC3C,SAAA,CAAAE,MAACd,GAAU,WAAW,aACnB,SAAAG,EAAwBS,EAAU,YAAY,EACjD,EACCD,CA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