@postenbring/hedwig-react 4.5.1 → 4.6.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 (70) hide show
  1. package/dist/alert/alert.js +82 -33
  2. package/dist/alert/alert.js.map +1 -1
  3. package/dist/alert/alert.mjs +3 -2
  4. package/dist/alert/index.js +82 -33
  5. package/dist/alert/index.js.map +1 -1
  6. package/dist/alert/index.mjs +3 -2
  7. package/dist/box/box.d.ts.map +1 -1
  8. package/dist/box/box.js +69 -20
  9. package/dist/box/box.js.map +1 -1
  10. package/dist/box/box.mjs +2 -1
  11. package/dist/box/index.js +69 -20
  12. package/dist/box/index.js.map +1 -1
  13. package/dist/box/index.mjs +2 -1
  14. package/dist/{chunk-ILN2L5NX.mjs → chunk-B2DZ6JJ4.mjs} +2 -2
  15. package/dist/{chunk-INDTHGWZ.mjs → chunk-KAVKFO2R.mjs} +2 -2
  16. package/dist/{chunk-DEABU7DB.mjs → chunk-P4AKOVM7.mjs} +9 -9
  17. package/dist/chunk-P4AKOVM7.mjs.map +1 -0
  18. package/dist/{chunk-NAXSP4VU.mjs → chunk-PKEPSKTZ.mjs} +2 -2
  19. package/dist/{chunk-YQT2TN3U.mjs → chunk-QQKPLLCE.mjs} +4 -3
  20. package/dist/chunk-QQKPLLCE.mjs.map +1 -0
  21. package/dist/{chunk-QDG2QLFV.mjs → chunk-UXZKGAZ2.mjs} +4 -4
  22. package/dist/{chunk-PZUJLRG4.mjs → chunk-WFIS2ZYQ.mjs} +2 -2
  23. package/dist/footer/footer.mjs +2 -2
  24. package/dist/footer/index.mjs +2 -2
  25. package/dist/form/error-summary/error-summary.js +104 -55
  26. package/dist/form/error-summary/error-summary.js.map +1 -1
  27. package/dist/form/error-summary/error-summary.mjs +3 -2
  28. package/dist/form/error-summary/index.js +104 -55
  29. package/dist/form/error-summary/index.js.map +1 -1
  30. package/dist/form/error-summary/index.mjs +3 -2
  31. package/dist/form/index.js +166 -117
  32. package/dist/form/index.js.map +1 -1
  33. package/dist/form/index.mjs +16 -15
  34. package/dist/help-text/help-text.js +79 -30
  35. package/dist/help-text/help-text.js.map +1 -1
  36. package/dist/help-text/help-text.mjs +3 -2
  37. package/dist/help-text/index.js +79 -30
  38. package/dist/help-text/index.js.map +1 -1
  39. package/dist/help-text/index.mjs +3 -2
  40. package/dist/index.js +104 -104
  41. package/dist/index.js.map +1 -1
  42. package/dist/index.mjs +42 -42
  43. package/dist/message/index.js +83 -34
  44. package/dist/message/index.js.map +1 -1
  45. package/dist/message/index.mjs +3 -2
  46. package/dist/message/message.js +83 -34
  47. package/dist/message/message.js.map +1 -1
  48. package/dist/message/message.mjs +3 -2
  49. package/dist/modal/index.js +95 -45
  50. package/dist/modal/index.js.map +1 -1
  51. package/dist/modal/index.mjs +3 -2
  52. package/dist/modal/modal.d.ts +5 -0
  53. package/dist/modal/modal.d.ts.map +1 -1
  54. package/dist/modal/modal.js +95 -45
  55. package/dist/modal/modal.js.map +1 -1
  56. package/dist/modal/modal.mjs +3 -2
  57. package/dist/navbar/icons.d.ts +2 -2
  58. package/dist/navbar/icons.d.ts.map +1 -1
  59. package/dist/navbar/navbar-expandable-menu.d.ts +1 -1
  60. package/dist/navbar/navbar-expandable-menu.d.ts.map +1 -1
  61. package/package.json +2 -2
  62. package/src/box/box.tsx +8 -8
  63. package/src/modal/modal.tsx +12 -1
  64. package/dist/chunk-DEABU7DB.mjs.map +0 -1
  65. package/dist/chunk-YQT2TN3U.mjs.map +0 -1
  66. /package/dist/{chunk-ILN2L5NX.mjs.map → chunk-B2DZ6JJ4.mjs.map} +0 -0
  67. /package/dist/{chunk-INDTHGWZ.mjs.map → chunk-KAVKFO2R.mjs.map} +0 -0
  68. /package/dist/{chunk-NAXSP4VU.mjs.map → chunk-PKEPSKTZ.mjs.map} +0 -0
  69. /package/dist/{chunk-QDG2QLFV.mjs.map → chunk-UXZKGAZ2.mjs.map} +0 -0
  70. /package/dist/{chunk-PZUJLRG4.mjs.map → chunk-WFIS2ZYQ.mjs.map} +0 -0
package/dist/box/box.js CHANGED
@@ -53,30 +53,79 @@ __export(box_exports, {
53
53
  BoxCloseButton: () => BoxCloseButton
54
54
  });
55
55
  module.exports = __toCommonJS(box_exports);
56
+ var import_react2 = require("react");
57
+ var import_typed_classname2 = require("@postenbring/hedwig-css/typed-classname");
58
+ var import_react_slot2 = require("@radix-ui/react-slot");
59
+
60
+ // src/button/button.tsx
56
61
  var import_react = require("react");
57
62
  var import_typed_classname = require("@postenbring/hedwig-css/typed-classname");
58
63
  var import_react_slot = require("@radix-ui/react-slot");
59
64
  var import_jsx_runtime = require("react/jsx-runtime");
65
+ var Button = (0, import_react.forwardRef)(
66
+ (_a, ref) => {
67
+ var _b = _a, {
68
+ asChild,
69
+ children,
70
+ variant = "primary",
71
+ size = "large",
72
+ fullWidth = false,
73
+ icon = false,
74
+ className
75
+ } = _b, rest = __objRest(_b, [
76
+ "asChild",
77
+ "children",
78
+ "variant",
79
+ "size",
80
+ "fullWidth",
81
+ "icon",
82
+ "className"
83
+ ]);
84
+ const Component = asChild ? import_react_slot.Slot : "button";
85
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
86
+ Component,
87
+ __spreadProps(__spreadValues({
88
+ className: (0, import_typed_classname.clsx)(
89
+ "hds-button",
90
+ `hds-button--${size}`,
91
+ `hds-button--${variant}`,
92
+ {
93
+ "hds-button--full": fullWidth === true,
94
+ "hds-button--mobile-full": fullWidth === "mobile",
95
+ "hds-button--only-icon": icon === true,
96
+ "hds-button--leading-icon": icon === "leading",
97
+ "hds-button--trailing-icon": icon === "trailing"
98
+ },
99
+ className
100
+ ),
101
+ ref
102
+ }, rest), {
103
+ children
104
+ })
105
+ );
106
+ }
107
+ );
108
+ Button.displayName = "Button";
109
+
110
+ // src/box/box.tsx
111
+ var import_jsx_runtime2 = require("react/jsx-runtime");
60
112
  function CloseIcon() {
61
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", { "aria-hidden": true, xmlns: "http://www.w3.org/2000/svg", width: 32, height: 32, viewBox: "0 0 32 32", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
62
- "path",
63
- {
64
- d: "M17.5469 16.3333L22.375 11.5521L23.3594 10.5677C23.5 10.4271 23.5 10.1927 23.3594 10.0052L22.3281 8.97394C22.1406 8.83331 21.9062 8.83331 21.7656 8.97394L16 14.7864L10.1875 8.97394C10.0469 8.83331 9.8125 8.83331 9.625 8.97394L8.59375 10.0052C8.45312 10.1927 8.45312 10.4271 8.59375 10.5677L14.4062 16.3333L8.59375 22.1458C8.45312 22.2864 8.45312 22.5208 8.59375 22.7083L9.625 23.7396C9.8125 23.8802 10.0469 23.8802 10.1875 23.7396L16 17.9271L20.7812 22.7552L21.7656 23.7396C21.9062 23.8802 22.1406 23.8802 22.3281 23.7396L23.3594 22.7083C23.5 22.5208 23.5 22.2864 23.3594 22.1458L17.5469 16.3333Z",
65
- fill: "currentColor"
66
- }
67
- ) });
113
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 640 640", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M183.1 137.4C170.6 124.9 150.3 124.9 137.8 137.4C125.3 149.9 125.3 170.2 137.8 182.7L275.2 320L137.9 457.4C125.4 469.9 125.4 490.2 137.9 502.7C150.4 515.2 170.7 515.2 183.2 502.7L320.5 365.3L457.9 502.6C470.4 515.1 490.7 515.1 503.2 502.6C515.7 490.1 515.7 469.8 503.2 457.3L365.8 320L503.1 182.6C515.6 170.1 515.6 149.8 503.1 137.3C490.6 124.8 470.3 124.8 457.8 137.3L320.5 274.7L183.1 137.4z" }) });
68
114
  }
69
- var BoxCloseButton = (0, import_react.forwardRef)(
115
+ var BoxCloseButton = (0, import_react2.forwardRef)(
70
116
  (_a, ref) => {
71
117
  var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
72
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
73
- "button",
118
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
119
+ Button,
74
120
  __spreadProps(__spreadValues({
75
- className: (0, import_typed_classname.clsx)("hds-box__close-button", className),
121
+ className: (0, import_typed_classname2.clsx)("hds-box__close-button", className),
122
+ variant: "tertiary",
123
+ size: "small",
124
+ icon: true,
76
125
  ref,
77
126
  type: "button"
78
127
  }, rest), {
79
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CloseIcon, {})
128
+ children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(CloseIcon, {})
80
129
  })
81
130
  );
82
131
  }
@@ -94,7 +143,7 @@ var convertVariantToColor = (variant) => {
94
143
  return "neutral";
95
144
  }
96
145
  };
97
- var Box = (0, import_react.forwardRef)(
146
+ var Box = (0, import_react2.forwardRef)(
98
147
  (_a, ref) => {
99
148
  var _b = _a, {
100
149
  "data-color": color = "",
@@ -117,8 +166,8 @@ var Box = (0, import_react.forwardRef)(
117
166
  "children",
118
167
  "className"
119
168
  ]);
120
- const [closedState, setClosedState] = (0, import_react.useState)(false);
121
- const onClose = (0, import_react.useCallback)(() => {
169
+ const [closedState, setClosedState] = (0, import_react2.useState)(false);
170
+ const onClose = (0, import_react2.useCallback)(() => {
122
171
  if (onCloseProp) {
123
172
  const result = onCloseProp();
124
173
  if (result === true) {
@@ -129,13 +178,13 @@ var Box = (0, import_react.forwardRef)(
129
178
  }
130
179
  }, []);
131
180
  const closed = closedProp != null ? closedProp : closedState;
132
- const Component = asChild ? import_react_slot.Slot : "div";
181
+ const Component = asChild ? import_react_slot2.Slot : "div";
133
182
  const resolvedColor = color && color !== "" ? color : convertVariantToColor(variant);
134
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
183
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
135
184
  Component,
136
185
  __spreadProps(__spreadValues({
137
186
  "data-color": resolvedColor,
138
- className: (0, import_typed_classname.clsx)(
187
+ className: (0, import_typed_classname2.clsx)(
139
188
  "hds-box",
140
189
  { "hds-box--lighter": variant === "lighter" },
141
190
  { "hds-box--white": variant === "white" },
@@ -145,8 +194,8 @@ var Box = (0, import_react.forwardRef)(
145
194
  ref
146
195
  }, rest), {
147
196
  children: [
148
- closeable ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BoxCloseButton, __spreadValues({ onClick: onClose }, closeButtonProps)) : null,
149
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_slot.Slottable, { children })
197
+ closeable ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(BoxCloseButton, __spreadValues({ onClick: onClose }, closeButtonProps)) : null,
198
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_slot2.Slottable, { children })
150
199
  ]
151
200
  })
152
201
  );
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/box/box.tsx"],"sourcesContent":["import { forwardRef, useCallback, useState } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { Slot, Slottable } from \"@radix-ui/react-slot\";\n\nfunction CloseIcon() {\n return (\n <svg aria-hidden xmlns=\"http://www.w3.org/2000/svg\" width={32} height={32} viewBox=\"0 0 32 32\">\n <path\n d=\"M17.5469 16.3333L22.375 11.5521L23.3594 10.5677C23.5 10.4271 23.5 10.1927 23.3594 10.0052L22.3281 8.97394C22.1406 8.83331 21.9062 8.83331 21.7656 8.97394L16 14.7864L10.1875 8.97394C10.0469 8.83331 9.8125 8.83331 9.625 8.97394L8.59375 10.0052C8.45312 10.1927 8.45312 10.4271 8.59375 10.5677L14.4062 16.3333L8.59375 22.1458C8.45312 22.2864 8.45312 22.5208 8.59375 22.7083L9.625 23.7396C9.8125 23.8802 10.0469 23.8802 10.1875 23.7396L16 17.9271L20.7812 22.7552L21.7656 23.7396C21.9062 23.8802 22.1406 23.8802 22.3281 23.7396L23.3594 22.7083C23.5 22.5208 23.5 22.2864 23.3594 22.1458L17.5469 16.3333Z\"\n fill=\"currentColor\"\n />\n </svg>\n );\n}\n\nexport type BoxCloseButtonProps = Omit<React.HTMLAttributes<HTMLButtonElement>, \"children\">;\nexport const BoxCloseButton = forwardRef<HTMLButtonElement, BoxCloseButtonProps>(\n ({ className, ...rest }, ref) => {\n return (\n <button\n className={clsx(\"hds-box__close-button\", className as undefined)}\n ref={ref}\n type=\"button\"\n {...rest}\n >\n <CloseIcon />\n </button>\n );\n },\n);\nBoxCloseButton.displayName = \"Box.CloseButton\";\n\nexport interface BoxProps extends React.HTMLAttributes<HTMLDivElement> {\n children?: React.ReactNode;\n\n /**\n * Posten/Bring-spesific variant of the box. NB: warning variant is deprecated, use data-color=\"warning\" instead.\n *\n * @default \"light-grey\"\n */\n variant?:\n | \"light-grey\"\n | \"lighter\"\n | \"white\"\n /** @deprecated use data-color=\"warning\" instead */\n | \"warning\";\n\n /**\n * Color variant of the box\n *\n */\n\n \"data-color\"?: \"neutral\" | \"info\" | \"success\" | \"warning\" | \"error\";\n\n /**\n * If `true`, a close button will be shown.\n * Use when you want to control the close button using the BoxCloseButton component.\n *\n * @default false\n */\n closeable?: boolean;\n\n /**\n * Callback fired when the component requests to be closed.\n * If not set, the component will be closed without any user interaction.\n *\n * If set, and the handler returns non-true value, the component will not be closed.\n * Use this if you want to control the closing of the component, using the `closed` prop\n *\n * If set, and the handler returns the true, the component will be closed.\n * Use this with `window.confirm()` to ask the user to confirm closing the component.\n */\n // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents -- It's fine, I want to have the boolean in the type\n onClose?: () => boolean | unknown;\n\n /**\n * If `true`, the box will be closed and hidden from view\n */\n closed?: boolean;\n\n /**\n * Props applied to the close button element.\n */\n closeButtonProps?: BoxCloseButtonProps;\n\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n}\n\nconst convertVariantToColor = (variant: BoxProps[\"variant\"] | \"\") => {\n switch (variant) {\n case \"lighter\":\n return \"\";\n case \"white\":\n return \"\";\n case \"warning\":\n return \"warning\";\n default:\n return \"neutral\";\n }\n};\n\nexport const Box = forwardRef<HTMLDivElement, BoxProps>(\n (\n {\n \"data-color\": color = \"\",\n asChild,\n variant,\n closeable = false,\n onClose: onCloseProp,\n closed: closedProp,\n closeButtonProps,\n children,\n className,\n ...rest\n },\n ref,\n ) => {\n const [closedState, setClosedState] = useState(false);\n const onClose = useCallback(() => {\n if (onCloseProp) {\n const result = onCloseProp();\n if (result === true) {\n setClosedState(true);\n }\n } else {\n setClosedState(true);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps -- I know better\n }, []);\n const closed = closedProp ?? closedState;\n const Component = asChild ? Slot : \"div\";\n\n const resolvedColor = color && color !== \"\" ? color : convertVariantToColor(variant);\n\n return (\n <Component\n data-color={resolvedColor}\n className={clsx(\n \"hds-box\",\n { \"hds-box--lighter\": variant === \"lighter\" },\n { \"hds-box--white\": variant === \"white\" },\n { \"hds-box--closed\": closed },\n className as undefined,\n )}\n ref={ref}\n {...rest}\n >\n {closeable ? <BoxCloseButton onClick={onClose} {...closeButtonProps} /> : null}\n <Slottable>{children}</Slottable>\n </Component>\n );\n },\n) as BoxType;\nBox.displayName = \"Box\";\n\nBox.CloseButton = BoxCloseButton;\n\ntype BoxType = ReturnType<typeof forwardRef<HTMLDivElement, BoxProps>> & {\n CloseButton: typeof BoxCloseButton;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkD;AAClD,6BAAqB;AACrB,wBAAgC;AAK1B;AAHN,SAAS,YAAY;AACnB,SACE,4CAAC,SAAI,eAAW,MAAC,OAAM,8BAA6B,OAAO,IAAI,QAAQ,IAAI,SAAQ,aACjF;AAAA,IAAC;AAAA;AAAA,MACC,GAAE;AAAA,MACF,MAAK;AAAA;AAAA,EACP,GACF;AAEJ;AAGO,IAAM,qBAAiB;AAAA,EAC5B,CAAC,IAAwB,QAAQ;AAAhC,iBAAE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UAC5C,EAAE,kBAAkB,YAAY,QAAQ;AAAA,UACxC,EAAE,mBAAmB,OAAO;AAAA,UAC5B;AAAA,QACF;AAAA,QACA;AAAA,SACI,OAVL;AAAA,QAYE;AAAA,sBAAY,4CAAC,iCAAe,SAAS,WAAa,iBAAkB,IAAK;AAAA,UAC1E,4CAAC,+BAAW,UAAS;AAAA;AAAA;AAAA,IACvB;AAAA,EAEJ;AACF;AACA,IAAI,cAAc;AAElB,IAAI,cAAc;","names":[]}
1
+ {"version":3,"sources":["../../src/box/box.tsx","../../src/button/button.tsx"],"sourcesContent":["import { forwardRef, useCallback, useState } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { Slot, Slottable } from \"@radix-ui/react-slot\";\nimport { Button } from \"../button/button\";\n\nfunction CloseIcon() {\n return (\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 640 640\">\n <path d=\"M183.1 137.4C170.6 124.9 150.3 124.9 137.8 137.4C125.3 149.9 125.3 170.2 137.8 182.7L275.2 320L137.9 457.4C125.4 469.9 125.4 490.2 137.9 502.7C150.4 515.2 170.7 515.2 183.2 502.7L320.5 365.3L457.9 502.6C470.4 515.1 490.7 515.1 503.2 502.6C515.7 490.1 515.7 469.8 503.2 457.3L365.8 320L503.1 182.6C515.6 170.1 515.6 149.8 503.1 137.3C490.6 124.8 470.3 124.8 457.8 137.3L320.5 274.7L183.1 137.4z\" />\n </svg>\n );\n}\nexport type BoxCloseButtonProps = Omit<React.HTMLAttributes<HTMLButtonElement>, \"children\">;\nexport const BoxCloseButton = forwardRef<HTMLButtonElement, BoxCloseButtonProps>(\n ({ className, ...rest }, ref) => {\n return (\n <Button\n className={clsx(\"hds-box__close-button\", className as undefined)}\n variant=\"tertiary\"\n size=\"small\"\n icon\n ref={ref}\n type=\"button\"\n {...rest}\n >\n <CloseIcon />\n </Button>\n );\n },\n);\nBoxCloseButton.displayName = \"Box.CloseButton\";\n\nexport interface BoxProps extends React.HTMLAttributes<HTMLDivElement> {\n children?: React.ReactNode;\n\n /**\n * Posten/Bring-spesific variant of the box. NB: warning variant is deprecated, use data-color=\"warning\" instead.\n *\n * @default \"light-grey\"\n */\n variant?:\n | \"light-grey\"\n | \"lighter\"\n | \"white\"\n /** @deprecated use data-color=\"warning\" instead */\n | \"warning\";\n\n /**\n * Color variant of the box\n *\n */\n\n \"data-color\"?: \"neutral\" | \"info\" | \"success\" | \"warning\" | \"error\";\n\n /**\n * If `true`, a close button will be shown.\n * Use when you want to control the close button using the BoxCloseButton component.\n *\n * @default false\n */\n closeable?: boolean;\n\n /**\n * Callback fired when the component requests to be closed.\n * If not set, the component will be closed without any user interaction.\n *\n * If set, and the handler returns non-true value, the component will not be closed.\n * Use this if you want to control the closing of the component, using the `closed` prop\n *\n * If set, and the handler returns the true, the component will be closed.\n * Use this with `window.confirm()` to ask the user to confirm closing the component.\n */\n // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents -- It's fine, I want to have the boolean in the type\n onClose?: () => boolean | unknown;\n\n /**\n * If `true`, the box will be closed and hidden from view\n */\n closed?: boolean;\n\n /**\n * Props applied to the close button element.\n */\n closeButtonProps?: BoxCloseButtonProps;\n\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n}\n\nconst convertVariantToColor = (variant: BoxProps[\"variant\"] | \"\") => {\n switch (variant) {\n case \"lighter\":\n return \"\";\n case \"white\":\n return \"\";\n case \"warning\":\n return \"warning\";\n default:\n return \"neutral\";\n }\n};\n\nexport const Box = forwardRef<HTMLDivElement, BoxProps>(\n (\n {\n \"data-color\": color = \"\",\n asChild,\n variant,\n closeable = false,\n onClose: onCloseProp,\n closed: closedProp,\n closeButtonProps,\n children,\n className,\n ...rest\n },\n ref,\n ) => {\n const [closedState, setClosedState] = useState(false);\n const onClose = useCallback(() => {\n if (onCloseProp) {\n const result = onCloseProp();\n if (result === true) {\n setClosedState(true);\n }\n } else {\n setClosedState(true);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps -- I know better\n }, []);\n const closed = closedProp ?? closedState;\n const Component = asChild ? Slot : \"div\";\n\n const resolvedColor = color && color !== \"\" ? color : convertVariantToColor(variant);\n\n return (\n <Component\n data-color={resolvedColor}\n className={clsx(\n \"hds-box\",\n { \"hds-box--lighter\": variant === \"lighter\" },\n { \"hds-box--white\": variant === \"white\" },\n { \"hds-box--closed\": closed },\n className as undefined,\n )}\n ref={ref}\n {...rest}\n >\n {closeable ? <BoxCloseButton onClick={onClose} {...closeButtonProps} /> : null}\n <Slottable>{children}</Slottable>\n </Component>\n );\n },\n) as BoxType;\nBox.displayName = \"Box\";\n\nBox.CloseButton = BoxCloseButton;\n\ntype BoxType = ReturnType<typeof forwardRef<HTMLDivElement, BoxProps>> & {\n CloseButton: typeof BoxCloseButton;\n};\n","import { forwardRef } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { Slot } from \"@radix-ui/react-slot\";\n\n/**\n * @deprecated The \"inverted\" variant is deprecated. Use \"primary\", \"secondary\", or \"tertiary\" instead.\n */\nexport type DeprecatedVariant = \"inverted\";\n\nexport interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n /**\n * The height, font size and padding of the button\n *\n * @default \"large\"\n */\n size?: \"small\" | \"large\";\n\n /**\n * The background and fill of the button\n *\n * @default \"primary\"\n */\n variant?: \"primary\" | \"secondary\" | \"tertiary\" | DeprecatedVariant;\n\n /**\n * Make the button use 100% width available.\n * Using the \"mobile\" it only stretch to full width on smaller screens\n */\n fullWidth?: boolean | \"mobile\";\n\n /**\n * Specify that there is an icon in the button.\n * `icon`: There is only an icon in the button.\n * `icon=\"leading\"`: There is an icon before the text.\n * `icon=\"trailing\"`: There is an icon after the text.\n *\n * @default false\n */\n icon?: boolean | \"leading\" | \"trailing\";\n\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n}\n\n/**\n * Button component\n *\n * @example\n * <Button variant=\"primary\">Primary</Button>\n * <Button variant=\"secondary\" size=\"large\">Secondary</Button>\n * <Button variant=\"tertiary\" fullWidth=\"mobile\">Tertiary</Button>\n * <Button icon=\"leading\"><LeadingIcon />Leading icon</Button>\n *\n * @example\n * // If used for navigation use the `asChild` prop with a anchor element as a child.\n * <Button asChild><a href=\"/home\">Home</a></Button>\n */\nexport const Button = forwardRef<HTMLButtonElement, ButtonProps>(\n (\n {\n asChild,\n children,\n variant = \"primary\",\n size = \"large\",\n fullWidth = false,\n icon = false,\n className,\n ...rest\n },\n ref,\n ) => {\n const Component = asChild ? Slot : \"button\";\n\n return (\n <Component\n className={clsx(\n \"hds-button\",\n `hds-button--${size}`,\n `hds-button--${variant}`,\n {\n \"hds-button--full\": fullWidth === true,\n \"hds-button--mobile-full\": fullWidth === \"mobile\",\n \"hds-button--only-icon\": icon === true,\n \"hds-button--leading-icon\": icon === \"leading\",\n \"hds-button--trailing-icon\": icon === \"trailing\",\n },\n className as undefined,\n )}\n ref={ref}\n {...rest}\n >\n {children}\n </Component>\n );\n },\n);\nButton.displayName = \"Button\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAAA,gBAAkD;AAClD,IAAAC,0BAAqB;AACrB,IAAAC,qBAAgC;;;ACFhC,mBAA2B;AAC3B,6BAAqB;AACrB,wBAAqB;AA4Ef;AAjBC,IAAM,aAAS;AAAA,EACpB,CACE,IAUA,QACG;AAXH,iBACE;AAAA;AAAA,MACA;AAAA,MACA,UAAU;AAAA,MACV,OAAO;AAAA,MACP,YAAY;AAAA,MACZ,OAAO;AAAA,MACP;AAAA,IAtEN,IA+DI,IAQK,iBARL,IAQK;AAAA,MAPH;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA;AAKF,UAAM,YAAY,UAAU,yBAAO;AAEnC,WACE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4GI,IAUK,iBAVL,IAUK;AAAA,MATH;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA;AAKF,UAAM,CAAC,aAAa,cAAc,QAAI,wBAAS,KAAK;AACpD,UAAM,cAAU,2BAAY,MAAM;AAChC,UAAI,aAAa;AACf,cAAM,SAAS,YAAY;AAC3B,YAAI,WAAW,MAAM;AACnB,yBAAe,IAAI;AAAA,QACrB;AAAA,MACF,OAAO;AACL,uBAAe,IAAI;AAAA,MACrB;AAAA,IAEF,GAAG,CAAC,CAAC;AACL,UAAM,SAAS,kCAAc;AAC7B,UAAM,YAAY,UAAU,0BAAO;AAEnC,UAAM,gBAAgB,SAAS,UAAU,KAAK,QAAQ,sBAAsB,OAAO;AAEnF,WACE;AAAA,MAAC;AAAA;AAAA,QACC,cAAY;AAAA,QACZ,eAAW;AAAA,UACT;AAAA,UACA,EAAE,oBAAoB,YAAY,UAAU;AAAA,UAC5C,EAAE,kBAAkB,YAAY,QAAQ;AAAA,UACxC,EAAE,mBAAmB,OAAO;AAAA,UAC5B;AAAA,QACF;AAAA,QACA;AAAA,SACI,OAVL;AAAA,QAYE;AAAA,sBAAY,6CAAC,iCAAe,SAAS,WAAa,iBAAkB,IAAK;AAAA,UAC1E,6CAAC,gCAAW,UAAS;AAAA;AAAA;AAAA,IACvB;AAAA,EAEJ;AACF;AACA,IAAI,cAAc;AAElB,IAAI,cAAc;","names":["import_react","import_typed_classname","import_react_slot","import_jsx_runtime"]}
package/dist/box/box.mjs CHANGED
@@ -1,7 +1,8 @@
1
1
  import {
2
2
  Box,
3
3
  BoxCloseButton
4
- } from "../chunk-DEABU7DB.mjs";
4
+ } from "../chunk-P4AKOVM7.mjs";
5
+ import "../chunk-45Q2TCH6.mjs";
5
6
  import "../chunk-YOSPWY5K.mjs";
6
7
  export {
7
8
  Box,
package/dist/box/index.js CHANGED
@@ -55,30 +55,79 @@ __export(box_exports, {
55
55
  module.exports = __toCommonJS(box_exports);
56
56
 
57
57
  // src/box/box.tsx
58
+ var import_react2 = require("react");
59
+ var import_typed_classname2 = require("@postenbring/hedwig-css/typed-classname");
60
+ var import_react_slot2 = require("@radix-ui/react-slot");
61
+
62
+ // src/button/button.tsx
58
63
  var import_react = require("react");
59
64
  var import_typed_classname = require("@postenbring/hedwig-css/typed-classname");
60
65
  var import_react_slot = require("@radix-ui/react-slot");
61
66
  var import_jsx_runtime = require("react/jsx-runtime");
67
+ var Button = (0, import_react.forwardRef)(
68
+ (_a, ref) => {
69
+ var _b = _a, {
70
+ asChild,
71
+ children,
72
+ variant = "primary",
73
+ size = "large",
74
+ fullWidth = false,
75
+ icon = false,
76
+ className
77
+ } = _b, rest = __objRest(_b, [
78
+ "asChild",
79
+ "children",
80
+ "variant",
81
+ "size",
82
+ "fullWidth",
83
+ "icon",
84
+ "className"
85
+ ]);
86
+ const Component = asChild ? import_react_slot.Slot : "button";
87
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
88
+ Component,
89
+ __spreadProps(__spreadValues({
90
+ className: (0, import_typed_classname.clsx)(
91
+ "hds-button",
92
+ `hds-button--${size}`,
93
+ `hds-button--${variant}`,
94
+ {
95
+ "hds-button--full": fullWidth === true,
96
+ "hds-button--mobile-full": fullWidth === "mobile",
97
+ "hds-button--only-icon": icon === true,
98
+ "hds-button--leading-icon": icon === "leading",
99
+ "hds-button--trailing-icon": icon === "trailing"
100
+ },
101
+ className
102
+ ),
103
+ ref
104
+ }, rest), {
105
+ children
106
+ })
107
+ );
108
+ }
109
+ );
110
+ Button.displayName = "Button";
111
+
112
+ // src/box/box.tsx
113
+ var import_jsx_runtime2 = require("react/jsx-runtime");
62
114
  function CloseIcon() {
63
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", { "aria-hidden": true, xmlns: "http://www.w3.org/2000/svg", width: 32, height: 32, viewBox: "0 0 32 32", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
64
- "path",
65
- {
66
- d: "M17.5469 16.3333L22.375 11.5521L23.3594 10.5677C23.5 10.4271 23.5 10.1927 23.3594 10.0052L22.3281 8.97394C22.1406 8.83331 21.9062 8.83331 21.7656 8.97394L16 14.7864L10.1875 8.97394C10.0469 8.83331 9.8125 8.83331 9.625 8.97394L8.59375 10.0052C8.45312 10.1927 8.45312 10.4271 8.59375 10.5677L14.4062 16.3333L8.59375 22.1458C8.45312 22.2864 8.45312 22.5208 8.59375 22.7083L9.625 23.7396C9.8125 23.8802 10.0469 23.8802 10.1875 23.7396L16 17.9271L20.7812 22.7552L21.7656 23.7396C21.9062 23.8802 22.1406 23.8802 22.3281 23.7396L23.3594 22.7083C23.5 22.5208 23.5 22.2864 23.3594 22.1458L17.5469 16.3333Z",
67
- fill: "currentColor"
68
- }
69
- ) });
115
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 640 640", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M183.1 137.4C170.6 124.9 150.3 124.9 137.8 137.4C125.3 149.9 125.3 170.2 137.8 182.7L275.2 320L137.9 457.4C125.4 469.9 125.4 490.2 137.9 502.7C150.4 515.2 170.7 515.2 183.2 502.7L320.5 365.3L457.9 502.6C470.4 515.1 490.7 515.1 503.2 502.6C515.7 490.1 515.7 469.8 503.2 457.3L365.8 320L503.1 182.6C515.6 170.1 515.6 149.8 503.1 137.3C490.6 124.8 470.3 124.8 457.8 137.3L320.5 274.7L183.1 137.4z" }) });
70
116
  }
71
- var BoxCloseButton = (0, import_react.forwardRef)(
117
+ var BoxCloseButton = (0, import_react2.forwardRef)(
72
118
  (_a, ref) => {
73
119
  var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
74
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
75
- "button",
120
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
121
+ Button,
76
122
  __spreadProps(__spreadValues({
77
- className: (0, import_typed_classname.clsx)("hds-box__close-button", className),
123
+ className: (0, import_typed_classname2.clsx)("hds-box__close-button", className),
124
+ variant: "tertiary",
125
+ size: "small",
126
+ icon: true,
78
127
  ref,
79
128
  type: "button"
80
129
  }, rest), {
81
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CloseIcon, {})
130
+ children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(CloseIcon, {})
82
131
  })
83
132
  );
84
133
  }
@@ -96,7 +145,7 @@ var convertVariantToColor = (variant) => {
96
145
  return "neutral";
97
146
  }
98
147
  };
99
- var Box = (0, import_react.forwardRef)(
148
+ var Box = (0, import_react2.forwardRef)(
100
149
  (_a, ref) => {
101
150
  var _b = _a, {
102
151
  "data-color": color = "",
@@ -119,8 +168,8 @@ var Box = (0, import_react.forwardRef)(
119
168
  "children",
120
169
  "className"
121
170
  ]);
122
- const [closedState, setClosedState] = (0, import_react.useState)(false);
123
- const onClose = (0, import_react.useCallback)(() => {
171
+ const [closedState, setClosedState] = (0, import_react2.useState)(false);
172
+ const onClose = (0, import_react2.useCallback)(() => {
124
173
  if (onCloseProp) {
125
174
  const result = onCloseProp();
126
175
  if (result === true) {
@@ -131,13 +180,13 @@ var Box = (0, import_react.forwardRef)(
131
180
  }
132
181
  }, []);
133
182
  const closed = closedProp != null ? closedProp : closedState;
134
- const Component = asChild ? import_react_slot.Slot : "div";
183
+ const Component = asChild ? import_react_slot2.Slot : "div";
135
184
  const resolvedColor = color && color !== "" ? color : convertVariantToColor(variant);
136
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
185
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
137
186
  Component,
138
187
  __spreadProps(__spreadValues({
139
188
  "data-color": resolvedColor,
140
- className: (0, import_typed_classname.clsx)(
189
+ className: (0, import_typed_classname2.clsx)(
141
190
  "hds-box",
142
191
  { "hds-box--lighter": variant === "lighter" },
143
192
  { "hds-box--white": variant === "white" },
@@ -147,8 +196,8 @@ var Box = (0, import_react.forwardRef)(
147
196
  ref
148
197
  }, rest), {
149
198
  children: [
150
- closeable ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BoxCloseButton, __spreadValues({ onClick: onClose }, closeButtonProps)) : null,
151
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_slot.Slottable, { children })
199
+ closeable ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(BoxCloseButton, __spreadValues({ onClick: onClose }, closeButtonProps)) : null,
200
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_slot2.Slottable, { children })
152
201
  ]
153
202
  })
154
203
  );
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/box/index.tsx","../../src/box/box.tsx"],"sourcesContent":["export { Box, BoxCloseButton } from \"./box\";\n\nexport type * from \"./box\";\n","import { forwardRef, useCallback, useState } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { Slot, Slottable } from \"@radix-ui/react-slot\";\n\nfunction CloseIcon() {\n return (\n <svg aria-hidden xmlns=\"http://www.w3.org/2000/svg\" width={32} height={32} viewBox=\"0 0 32 32\">\n <path\n d=\"M17.5469 16.3333L22.375 11.5521L23.3594 10.5677C23.5 10.4271 23.5 10.1927 23.3594 10.0052L22.3281 8.97394C22.1406 8.83331 21.9062 8.83331 21.7656 8.97394L16 14.7864L10.1875 8.97394C10.0469 8.83331 9.8125 8.83331 9.625 8.97394L8.59375 10.0052C8.45312 10.1927 8.45312 10.4271 8.59375 10.5677L14.4062 16.3333L8.59375 22.1458C8.45312 22.2864 8.45312 22.5208 8.59375 22.7083L9.625 23.7396C9.8125 23.8802 10.0469 23.8802 10.1875 23.7396L16 17.9271L20.7812 22.7552L21.7656 23.7396C21.9062 23.8802 22.1406 23.8802 22.3281 23.7396L23.3594 22.7083C23.5 22.5208 23.5 22.2864 23.3594 22.1458L17.5469 16.3333Z\"\n fill=\"currentColor\"\n />\n </svg>\n );\n}\n\nexport type BoxCloseButtonProps = Omit<React.HTMLAttributes<HTMLButtonElement>, \"children\">;\nexport const BoxCloseButton = forwardRef<HTMLButtonElement, BoxCloseButtonProps>(\n ({ className, ...rest }, ref) => {\n return (\n <button\n className={clsx(\"hds-box__close-button\", className as undefined)}\n ref={ref}\n type=\"button\"\n {...rest}\n >\n <CloseIcon />\n </button>\n );\n },\n);\nBoxCloseButton.displayName = \"Box.CloseButton\";\n\nexport interface BoxProps extends React.HTMLAttributes<HTMLDivElement> {\n children?: React.ReactNode;\n\n /**\n * Posten/Bring-spesific variant of the box. NB: warning variant is deprecated, use data-color=\"warning\" instead.\n *\n * @default \"light-grey\"\n */\n variant?:\n | \"light-grey\"\n | \"lighter\"\n | \"white\"\n /** @deprecated use data-color=\"warning\" instead */\n | \"warning\";\n\n /**\n * Color variant of the box\n *\n */\n\n \"data-color\"?: \"neutral\" | \"info\" | \"success\" | \"warning\" | \"error\";\n\n /**\n * If `true`, a close button will be shown.\n * Use when you want to control the close button using the BoxCloseButton component.\n *\n * @default false\n */\n closeable?: boolean;\n\n /**\n * Callback fired when the component requests to be closed.\n * If not set, the component will be closed without any user interaction.\n *\n * If set, and the handler returns non-true value, the component will not be closed.\n * Use this if you want to control the closing of the component, using the `closed` prop\n *\n * If set, and the handler returns the true, the component will be closed.\n * Use this with `window.confirm()` to ask the user to confirm closing the component.\n */\n // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents -- It's fine, I want to have the boolean in the type\n onClose?: () => boolean | unknown;\n\n /**\n * If `true`, the box will be closed and hidden from view\n */\n closed?: boolean;\n\n /**\n * Props applied to the close button element.\n */\n closeButtonProps?: BoxCloseButtonProps;\n\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n}\n\nconst convertVariantToColor = (variant: BoxProps[\"variant\"] | \"\") => {\n switch (variant) {\n case \"lighter\":\n return \"\";\n case \"white\":\n return \"\";\n case \"warning\":\n return \"warning\";\n default:\n return \"neutral\";\n }\n};\n\nexport const Box = forwardRef<HTMLDivElement, BoxProps>(\n (\n {\n \"data-color\": color = \"\",\n asChild,\n variant,\n closeable = false,\n onClose: onCloseProp,\n closed: closedProp,\n closeButtonProps,\n children,\n className,\n ...rest\n },\n ref,\n ) => {\n const [closedState, setClosedState] = useState(false);\n const onClose = useCallback(() => {\n if (onCloseProp) {\n const result = onCloseProp();\n if (result === true) {\n setClosedState(true);\n }\n } else {\n setClosedState(true);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps -- I know better\n }, []);\n const closed = closedProp ?? closedState;\n const Component = asChild ? Slot : \"div\";\n\n const resolvedColor = color && color !== \"\" ? color : convertVariantToColor(variant);\n\n return (\n <Component\n data-color={resolvedColor}\n className={clsx(\n \"hds-box\",\n { \"hds-box--lighter\": variant === \"lighter\" },\n { \"hds-box--white\": variant === \"white\" },\n { \"hds-box--closed\": closed },\n className as undefined,\n )}\n ref={ref}\n {...rest}\n >\n {closeable ? <BoxCloseButton onClick={onClose} {...closeButtonProps} /> : null}\n <Slottable>{children}</Slottable>\n </Component>\n );\n },\n) as BoxType;\nBox.displayName = \"Box\";\n\nBox.CloseButton = BoxCloseButton;\n\ntype BoxType = ReturnType<typeof forwardRef<HTMLDivElement, BoxProps>> & {\n CloseButton: typeof BoxCloseButton;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,mBAAkD;AAClD,6BAAqB;AACrB,wBAAgC;AAK1B;AAHN,SAAS,YAAY;AACnB,SACE,4CAAC,SAAI,eAAW,MAAC,OAAM,8BAA6B,OAAO,IAAI,QAAQ,IAAI,SAAQ,aACjF;AAAA,IAAC;AAAA;AAAA,MACC,GAAE;AAAA,MACF,MAAK;AAAA;AAAA,EACP,GACF;AAEJ;AAGO,IAAM,qBAAiB;AAAA,EAC5B,CAAC,IAAwB,QAAQ;AAAhC,iBAAE,YAjBL,IAiBG,IAAgB,iBAAhB,IAA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AAAA,UACxC,EAAE,mBAAmB,OAAO;AAAA,UAC5B;AAAA,QACF;AAAA,QACA;AAAA,SACI,OAVL;AAAA,QAYE;AAAA,sBAAY,4CAAC,iCAAe,SAAS,WAAa,iBAAkB,IAAK;AAAA,UAC1E,4CAAC,+BAAW,UAAS;AAAA;AAAA;AAAA,IACvB;AAAA,EAEJ;AACF;AACA,IAAI,cAAc;AAElB,IAAI,cAAc;","names":[]}
1
+ {"version":3,"sources":["../../src/box/index.tsx","../../src/box/box.tsx","../../src/button/button.tsx"],"sourcesContent":["export { Box, BoxCloseButton } from \"./box\";\n\nexport type * from \"./box\";\n","import { forwardRef, useCallback, useState } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { Slot, Slottable } from \"@radix-ui/react-slot\";\nimport { Button } from \"../button/button\";\n\nfunction CloseIcon() {\n return (\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 640 640\">\n <path d=\"M183.1 137.4C170.6 124.9 150.3 124.9 137.8 137.4C125.3 149.9 125.3 170.2 137.8 182.7L275.2 320L137.9 457.4C125.4 469.9 125.4 490.2 137.9 502.7C150.4 515.2 170.7 515.2 183.2 502.7L320.5 365.3L457.9 502.6C470.4 515.1 490.7 515.1 503.2 502.6C515.7 490.1 515.7 469.8 503.2 457.3L365.8 320L503.1 182.6C515.6 170.1 515.6 149.8 503.1 137.3C490.6 124.8 470.3 124.8 457.8 137.3L320.5 274.7L183.1 137.4z\" />\n </svg>\n );\n}\nexport type BoxCloseButtonProps = Omit<React.HTMLAttributes<HTMLButtonElement>, \"children\">;\nexport const BoxCloseButton = forwardRef<HTMLButtonElement, BoxCloseButtonProps>(\n ({ className, ...rest }, ref) => {\n return (\n <Button\n className={clsx(\"hds-box__close-button\", className as undefined)}\n variant=\"tertiary\"\n size=\"small\"\n icon\n ref={ref}\n type=\"button\"\n {...rest}\n >\n <CloseIcon />\n </Button>\n );\n },\n);\nBoxCloseButton.displayName = \"Box.CloseButton\";\n\nexport interface BoxProps extends React.HTMLAttributes<HTMLDivElement> {\n children?: React.ReactNode;\n\n /**\n * Posten/Bring-spesific variant of the box. NB: warning variant is deprecated, use data-color=\"warning\" instead.\n *\n * @default \"light-grey\"\n */\n variant?:\n | \"light-grey\"\n | \"lighter\"\n | \"white\"\n /** @deprecated use data-color=\"warning\" instead */\n | \"warning\";\n\n /**\n * Color variant of the box\n *\n */\n\n \"data-color\"?: \"neutral\" | \"info\" | \"success\" | \"warning\" | \"error\";\n\n /**\n * If `true`, a close button will be shown.\n * Use when you want to control the close button using the BoxCloseButton component.\n *\n * @default false\n */\n closeable?: boolean;\n\n /**\n * Callback fired when the component requests to be closed.\n * If not set, the component will be closed without any user interaction.\n *\n * If set, and the handler returns non-true value, the component will not be closed.\n * Use this if you want to control the closing of the component, using the `closed` prop\n *\n * If set, and the handler returns the true, the component will be closed.\n * Use this with `window.confirm()` to ask the user to confirm closing the component.\n */\n // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents -- It's fine, I want to have the boolean in the type\n onClose?: () => boolean | unknown;\n\n /**\n * If `true`, the box will be closed and hidden from view\n */\n closed?: boolean;\n\n /**\n * Props applied to the close button element.\n */\n closeButtonProps?: BoxCloseButtonProps;\n\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n}\n\nconst convertVariantToColor = (variant: BoxProps[\"variant\"] | \"\") => {\n switch (variant) {\n case \"lighter\":\n return \"\";\n case \"white\":\n return \"\";\n case \"warning\":\n return \"warning\";\n default:\n return \"neutral\";\n }\n};\n\nexport const Box = forwardRef<HTMLDivElement, BoxProps>(\n (\n {\n \"data-color\": color = \"\",\n asChild,\n variant,\n closeable = false,\n onClose: onCloseProp,\n closed: closedProp,\n closeButtonProps,\n children,\n className,\n ...rest\n },\n ref,\n ) => {\n const [closedState, setClosedState] = useState(false);\n const onClose = useCallback(() => {\n if (onCloseProp) {\n const result = onCloseProp();\n if (result === true) {\n setClosedState(true);\n }\n } else {\n setClosedState(true);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps -- I know better\n }, []);\n const closed = closedProp ?? closedState;\n const Component = asChild ? Slot : \"div\";\n\n const resolvedColor = color && color !== \"\" ? color : convertVariantToColor(variant);\n\n return (\n <Component\n data-color={resolvedColor}\n className={clsx(\n \"hds-box\",\n { \"hds-box--lighter\": variant === \"lighter\" },\n { \"hds-box--white\": variant === \"white\" },\n { \"hds-box--closed\": closed },\n className as undefined,\n )}\n ref={ref}\n {...rest}\n >\n {closeable ? <BoxCloseButton onClick={onClose} {...closeButtonProps} /> : null}\n <Slottable>{children}</Slottable>\n </Component>\n );\n },\n) as BoxType;\nBox.displayName = \"Box\";\n\nBox.CloseButton = BoxCloseButton;\n\ntype BoxType = ReturnType<typeof forwardRef<HTMLDivElement, BoxProps>> & {\n CloseButton: typeof BoxCloseButton;\n};\n","import { forwardRef } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { Slot } from \"@radix-ui/react-slot\";\n\n/**\n * @deprecated The \"inverted\" variant is deprecated. Use \"primary\", \"secondary\", or \"tertiary\" instead.\n */\nexport type DeprecatedVariant = \"inverted\";\n\nexport interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n /**\n * The height, font size and padding of the button\n *\n * @default \"large\"\n */\n size?: \"small\" | \"large\";\n\n /**\n * The background and fill of the button\n *\n * @default \"primary\"\n */\n variant?: \"primary\" | \"secondary\" | \"tertiary\" | DeprecatedVariant;\n\n /**\n * Make the button use 100% width available.\n * Using the \"mobile\" it only stretch to full width on smaller screens\n */\n fullWidth?: boolean | \"mobile\";\n\n /**\n * Specify that there is an icon in the button.\n * `icon`: There is only an icon in the button.\n * `icon=\"leading\"`: There is an icon before the text.\n * `icon=\"trailing\"`: There is an icon after the text.\n *\n * @default false\n */\n icon?: boolean | \"leading\" | \"trailing\";\n\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n}\n\n/**\n * Button component\n *\n * @example\n * <Button variant=\"primary\">Primary</Button>\n * <Button variant=\"secondary\" size=\"large\">Secondary</Button>\n * <Button variant=\"tertiary\" fullWidth=\"mobile\">Tertiary</Button>\n * <Button icon=\"leading\"><LeadingIcon />Leading icon</Button>\n *\n * @example\n * // If used for navigation use the `asChild` prop with a anchor element as a child.\n * <Button asChild><a href=\"/home\">Home</a></Button>\n */\nexport const Button = forwardRef<HTMLButtonElement, ButtonProps>(\n (\n {\n asChild,\n children,\n variant = \"primary\",\n size = \"large\",\n fullWidth = false,\n icon = false,\n className,\n ...rest\n },\n ref,\n ) => {\n const Component = asChild ? Slot : \"button\";\n\n return (\n <Component\n className={clsx(\n \"hds-button\",\n `hds-button--${size}`,\n `hds-button--${variant}`,\n {\n \"hds-button--full\": fullWidth === true,\n \"hds-button--mobile-full\": fullWidth === \"mobile\",\n \"hds-button--only-icon\": icon === true,\n \"hds-button--leading-icon\": icon === \"leading\",\n \"hds-button--trailing-icon\": icon === \"trailing\",\n },\n className as undefined,\n )}\n ref={ref}\n {...rest}\n >\n {children}\n </Component>\n );\n },\n);\nButton.displayName = \"Button\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,gBAAkD;AAClD,IAAAC,0BAAqB;AACrB,IAAAC,qBAAgC;;;ACFhC,mBAA2B;AAC3B,6BAAqB;AACrB,wBAAqB;AA4Ef;AAjBC,IAAM,aAAS;AAAA,EACpB,CACE,IAUA,QACG;AAXH,iBACE;AAAA;AAAA,MACA;AAAA,MACA,UAAU;AAAA,MACV,OAAO;AAAA,MACP,YAAY;AAAA,MACZ,OAAO;AAAA,MACP;AAAA,IAtEN,IA+DI,IAQK,iBARL,IAQK;AAAA,MAPH;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA;AAKF,UAAM,Y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ACA;AAAA,MACA;AAAA,IArHN,IA4GI,IAUK,iBAVL,IAUK;AAAA,MATH;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA;AAKF,UAAM,CAAC,aAAa,cAAc,QAAI,wBAAS,KAAK;AACpD,UAAM,cAAU,2BAAY,MAAM;AAChC,UAAI,aAAa;AACf,cAAM,SAAS,YAAY;AAC3B,YAAI,WAAW,MAAM;AACnB,yBAAe,IAAI;AAAA,QACrB;AAAA,MACF,OAAO;AACL,uBAAe,IAAI;AAAA,MACrB;AAAA,IAEF,GAAG,CAAC,CAAC;AACL,UAAM,SAAS,kCAAc;AAC7B,UAAM,YAAY,UAAU,0BAAO;AAEnC,UAAM,gBAAgB,SAAS,UAAU,KAAK,QAAQ,sBAAsB,OAAO;AAEnF,WACE;AAAA,MAAC;AAAA;AAAA,QACC,cAAY;AAAA,QACZ,eAAW;AAAA,UACT;AAAA,UACA,EAAE,oBAAoB,YAAY,UAAU;AAAA,UAC5C,EAAE,kBAAkB,YAAY,QAAQ;AAAA,UACxC,EAAE,mBAAmB,OAAO;AAAA,UAC5B;AAAA,QACF;AAAA,QACA;AAAA,SACI,OAVL;AAAA,QAYE;AAAA,sBAAY,6CAAC,iCAAe,SAAS,WAAa,iBAAkB,IAAK;AAAA,UAC1E,6CAAC,gCAAW,UAAS;AAAA;AAAA;AAAA,IACvB;AAAA,EAEJ;AACF;AACA,IAAI,cAAc;AAElB,IAAI,cAAc;","names":["import_react","import_typed_classname","import_react_slot","import_jsx_runtime"]}
@@ -2,7 +2,8 @@ import "../chunk-BCFV6VOE.mjs";
2
2
  import {
3
3
  Box,
4
4
  BoxCloseButton
5
- } from "../chunk-DEABU7DB.mjs";
5
+ } from "../chunk-P4AKOVM7.mjs";
6
+ import "../chunk-45Q2TCH6.mjs";
6
7
  import "../chunk-YOSPWY5K.mjs";
7
8
  export {
8
9
  Box,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Box
3
- } from "./chunk-DEABU7DB.mjs";
3
+ } from "./chunk-P4AKOVM7.mjs";
4
4
  import {
5
5
  __objRest,
6
6
  __spreadProps,
@@ -66,4 +66,4 @@ export {
66
66
  MessageDescription,
67
67
  Message
68
68
  };
69
- //# sourceMappingURL=chunk-ILN2L5NX.mjs.map
69
+ //# sourceMappingURL=chunk-B2DZ6JJ4.mjs.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Box
3
- } from "./chunk-DEABU7DB.mjs";
3
+ } from "./chunk-P4AKOVM7.mjs";
4
4
  import {
5
5
  __objRest,
6
6
  __spreadProps,
@@ -51,4 +51,4 @@ HelpText.displayName = "HelpText";
51
51
  export {
52
52
  HelpText
53
53
  };
54
- //# sourceMappingURL=chunk-INDTHGWZ.mjs.map
54
+ //# sourceMappingURL=chunk-KAVKFO2R.mjs.map
@@ -1,3 +1,6 @@
1
+ import {
2
+ Button
3
+ } from "./chunk-45Q2TCH6.mjs";
1
4
  import {
2
5
  __objRest,
3
6
  __spreadProps,
@@ -10,21 +13,18 @@ import { clsx } from "@postenbring/hedwig-css/typed-classname";
10
13
  import { Slot, Slottable } from "@radix-ui/react-slot";
11
14
  import { jsx, jsxs } from "react/jsx-runtime";
12
15
  function CloseIcon() {
13
- return /* @__PURE__ */ jsx("svg", { "aria-hidden": true, xmlns: "http://www.w3.org/2000/svg", width: 32, height: 32, viewBox: "0 0 32 32", children: /* @__PURE__ */ jsx(
14
- "path",
15
- {
16
- d: "M17.5469 16.3333L22.375 11.5521L23.3594 10.5677C23.5 10.4271 23.5 10.1927 23.3594 10.0052L22.3281 8.97394C22.1406 8.83331 21.9062 8.83331 21.7656 8.97394L16 14.7864L10.1875 8.97394C10.0469 8.83331 9.8125 8.83331 9.625 8.97394L8.59375 10.0052C8.45312 10.1927 8.45312 10.4271 8.59375 10.5677L14.4062 16.3333L8.59375 22.1458C8.45312 22.2864 8.45312 22.5208 8.59375 22.7083L9.625 23.7396C9.8125 23.8802 10.0469 23.8802 10.1875 23.7396L16 17.9271L20.7812 22.7552L21.7656 23.7396C21.9062 23.8802 22.1406 23.8802 22.3281 23.7396L23.3594 22.7083C23.5 22.5208 23.5 22.2864 23.3594 22.1458L17.5469 16.3333Z",
17
- fill: "currentColor"
18
- }
19
- ) });
16
+ return /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 640 640", children: /* @__PURE__ */ jsx("path", { d: "M183.1 137.4C170.6 124.9 150.3 124.9 137.8 137.4C125.3 149.9 125.3 170.2 137.8 182.7L275.2 320L137.9 457.4C125.4 469.9 125.4 490.2 137.9 502.7C150.4 515.2 170.7 515.2 183.2 502.7L320.5 365.3L457.9 502.6C470.4 515.1 490.7 515.1 503.2 502.6C515.7 490.1 515.7 469.8 503.2 457.3L365.8 320L503.1 182.6C515.6 170.1 515.6 149.8 503.1 137.3C490.6 124.8 470.3 124.8 457.8 137.3L320.5 274.7L183.1 137.4z" }) });
20
17
  }
21
18
  var BoxCloseButton = forwardRef(
22
19
  (_a, ref) => {
23
20
  var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
24
21
  return /* @__PURE__ */ jsx(
25
- "button",
22
+ Button,
26
23
  __spreadProps(__spreadValues({
27
24
  className: clsx("hds-box__close-button", className),
25
+ variant: "tertiary",
26
+ size: "small",
27
+ icon: true,
28
28
  ref,
29
29
  type: "button"
30
30
  }, rest), {
@@ -111,4 +111,4 @@ export {
111
111
  BoxCloseButton,
112
112
  Box
113
113
  };
114
- //# sourceMappingURL=chunk-DEABU7DB.mjs.map
114
+ //# sourceMappingURL=chunk-P4AKOVM7.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/box/box.tsx"],"sourcesContent":["import { forwardRef, useCallback, useState } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { Slot, Slottable } from \"@radix-ui/react-slot\";\nimport { Button } from \"../button/button\";\n\nfunction CloseIcon() {\n return (\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 640 640\">\n <path d=\"M183.1 137.4C170.6 124.9 150.3 124.9 137.8 137.4C125.3 149.9 125.3 170.2 137.8 182.7L275.2 320L137.9 457.4C125.4 469.9 125.4 490.2 137.9 502.7C150.4 515.2 170.7 515.2 183.2 502.7L320.5 365.3L457.9 502.6C470.4 515.1 490.7 515.1 503.2 502.6C515.7 490.1 515.7 469.8 503.2 457.3L365.8 320L503.1 182.6C515.6 170.1 515.6 149.8 503.1 137.3C490.6 124.8 470.3 124.8 457.8 137.3L320.5 274.7L183.1 137.4z\" />\n </svg>\n );\n}\nexport type BoxCloseButtonProps = Omit<React.HTMLAttributes<HTMLButtonElement>, \"children\">;\nexport const BoxCloseButton = forwardRef<HTMLButtonElement, BoxCloseButtonProps>(\n ({ className, ...rest }, ref) => {\n return (\n <Button\n className={clsx(\"hds-box__close-button\", className as undefined)}\n variant=\"tertiary\"\n size=\"small\"\n icon\n ref={ref}\n type=\"button\"\n {...rest}\n >\n <CloseIcon />\n </Button>\n );\n },\n);\nBoxCloseButton.displayName = \"Box.CloseButton\";\n\nexport interface BoxProps extends React.HTMLAttributes<HTMLDivElement> {\n children?: React.ReactNode;\n\n /**\n * Posten/Bring-spesific variant of the box. NB: warning variant is deprecated, use data-color=\"warning\" instead.\n *\n * @default \"light-grey\"\n */\n variant?:\n | \"light-grey\"\n | \"lighter\"\n | \"white\"\n /** @deprecated use data-color=\"warning\" instead */\n | \"warning\";\n\n /**\n * Color variant of the box\n *\n */\n\n \"data-color\"?: \"neutral\" | \"info\" | \"success\" | \"warning\" | \"error\";\n\n /**\n * If `true`, a close button will be shown.\n * Use when you want to control the close button using the BoxCloseButton component.\n *\n * @default false\n */\n closeable?: boolean;\n\n /**\n * Callback fired when the component requests to be closed.\n * If not set, the component will be closed without any user interaction.\n *\n * If set, and the handler returns non-true value, the component will not be closed.\n * Use this if you want to control the closing of the component, using the `closed` prop\n *\n * If set, and the handler returns the true, the component will be closed.\n * Use this with `window.confirm()` to ask the user to confirm closing the component.\n */\n // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents -- It's fine, I want to have the boolean in the type\n onClose?: () => boolean | unknown;\n\n /**\n * If `true`, the box will be closed and hidden from view\n */\n closed?: boolean;\n\n /**\n * Props applied to the close button element.\n */\n closeButtonProps?: BoxCloseButtonProps;\n\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n}\n\nconst convertVariantToColor = (variant: BoxProps[\"variant\"] | \"\") => {\n switch (variant) {\n case \"lighter\":\n return \"\";\n case \"white\":\n return \"\";\n case \"warning\":\n return \"warning\";\n default:\n return \"neutral\";\n }\n};\n\nexport const Box = forwardRef<HTMLDivElement, BoxProps>(\n (\n {\n \"data-color\": color = \"\",\n asChild,\n variant,\n closeable = false,\n onClose: onCloseProp,\n closed: closedProp,\n closeButtonProps,\n children,\n className,\n ...rest\n },\n ref,\n ) => {\n const [closedState, setClosedState] = useState(false);\n const onClose = useCallback(() => {\n if (onCloseProp) {\n const result = onCloseProp();\n if (result === true) {\n setClosedState(true);\n }\n } else {\n setClosedState(true);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps -- I know better\n }, []);\n const closed = closedProp ?? closedState;\n const Component = asChild ? Slot : \"div\";\n\n const resolvedColor = color && color !== \"\" ? color : convertVariantToColor(variant);\n\n return (\n <Component\n data-color={resolvedColor}\n className={clsx(\n \"hds-box\",\n { \"hds-box--lighter\": variant === \"lighter\" },\n { \"hds-box--white\": variant === \"white\" },\n { \"hds-box--closed\": closed },\n className as undefined,\n )}\n ref={ref}\n {...rest}\n >\n {closeable ? <BoxCloseButton onClick={onClose} {...closeButtonProps} /> : null}\n <Slottable>{children}</Slottable>\n </Component>\n );\n },\n) as BoxType;\nBox.displayName = \"Box\";\n\nBox.CloseButton = BoxCloseButton;\n\ntype BoxType = ReturnType<typeof forwardRef<HTMLDivElement, BoxProps>> & {\n CloseButton: typeof BoxCloseButton;\n};\n"],"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B,yBAAe,IAAI;AAAA,QACrB;AAAA,MACF,OAAO;AACL,uBAAe,IAAI;AAAA,MACrB;AAAA,IAEF,GAAG,CAAC,CAAC;AACL,UAAM,SAAS,kCAAc;AAC7B,UAAM,YAAY,UAAU,OAAO;AAEnC,UAAM,gBAAgB,SAAS,UAAU,KAAK,QAAQ,sBAAsB,OAAO;AAEnF,WACE;AAAA,MAAC;AAAA;AAAA,QACC,cAAY;AAAA,QACZ,WAAW;AAAA,UACT;AAAA,UACA,EAAE,oBAAoB,YAAY,UAAU;AAAA,UAC5C,EAAE,kBAAkB,YAAY,QAAQ;AAAA,UACxC,EAAE,mBAAmB,OAAO;AAAA,UAC5B;AAAA,QACF;AAAA,QACA;AAAA,SACI,OAVL;AAAA,QAYE;AAAA,sBAAY,oBAAC,iCAAe,SAAS,WAAa,iBAAkB,IAAK;AAAA,UAC1E,oBAAC,aAAW,UAAS;AAAA;AAAA;AAAA,IACvB;AAAA,EAEJ;AACF;AACA,IAAI,cAAc;AAElB,IAAI,cAAc;","names":[]}
@@ -12,7 +12,7 @@ import {
12
12
  } from "./chunk-3V4GFS46.mjs";
13
13
  import {
14
14
  Box
15
- } from "./chunk-DEABU7DB.mjs";
15
+ } from "./chunk-P4AKOVM7.mjs";
16
16
  import {
17
17
  __objRest,
18
18
  __spreadProps,
@@ -86,4 +86,4 @@ export {
86
86
  ErrorSummaryItem,
87
87
  ErrorSummary
88
88
  };
89
- //# sourceMappingURL=chunk-NAXSP4VU.mjs.map
89
+ //# sourceMappingURL=chunk-PKEPSKTZ.mjs.map
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-3V4GFS46.mjs";
4
4
  import {
5
5
  Box
6
- } from "./chunk-DEABU7DB.mjs";
6
+ } from "./chunk-P4AKOVM7.mjs";
7
7
  import {
8
8
  __objRest,
9
9
  __spreadProps,
@@ -59,7 +59,7 @@ var ModalFooter = forwardRef(
59
59
  ModalFooter.displayName = "Modal.Footer";
60
60
  var Modal = forwardRef(
61
61
  (_a, ref) => {
62
- var _b = _a, { children, className, open, closeOnBackdropClick, onClick } = _b, rest = __objRest(_b, ["children", "className", "open", "closeOnBackdropClick", "onClick"]);
62
+ var _b = _a, { children, className, open, closeOnBackdropClick, closeButtonProps, onClick } = _b, rest = __objRest(_b, ["children", "className", "open", "closeOnBackdropClick", "closeButtonProps", "onClick"]);
63
63
  const modalRef = useRef(null);
64
64
  const mergedRef = useMergeRefs([modalRef, ref]);
65
65
  function onCloseButtonClick() {
@@ -92,6 +92,7 @@ var Modal = forwardRef(
92
92
  onClick: onDialogClick,
93
93
  onClose: onCloseButtonClick,
94
94
  variant: "white",
95
+ closeButtonProps,
95
96
  children: /* @__PURE__ */ jsx("dialog", __spreadProps(__spreadValues({ ref: mergedRef }, rest), { children }))
96
97
  }
97
98
  );
@@ -127,4 +128,4 @@ export {
127
128
  ModalFooter,
128
129
  Modal
129
130
  };
130
- //# sourceMappingURL=chunk-YQT2TN3U.mjs.map
131
+ //# sourceMappingURL=chunk-QQKPLLCE.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/modal/modal.tsx"],"sourcesContent":["import { forwardRef, useEffect, useRef } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { Box } from \"../box/box\";\nimport { useMergeRefs } from \"../utils/utils\";\n\ninterface ModalHeaderProps extends React.HTMLAttributes<HTMLHeadingElement> {\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n}\nexport const ModalHeader = forwardRef<HTMLHeadingElement, ModalHeaderProps>(\n ({ asChild, className, ...rest }, ref) => {\n const Component = asChild ? Slot : \"h1\";\n return (\n <Component\n className={clsx(\"hds-modal__header\", className as undefined)}\n ref={ref}\n {...rest}\n />\n );\n },\n);\nModalHeader.displayName = \"Modal.Header\";\n\ninterface ModalContentProps extends React.HTMLAttributes<HTMLDivElement> {\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n}\nexport const ModalContent = forwardRef<HTMLDivElement, ModalContentProps>(\n ({ asChild, className, ...rest }, ref) => {\n const Component = asChild ? Slot : \"div\";\n return (\n <Component\n className={clsx(\"hds-modal__content\", className as undefined)}\n ref={ref}\n {...rest}\n />\n );\n },\n);\nModalContent.displayName = \"Modal.Content\";\n\ninterface ModalFooterProps extends React.HTMLAttributes<HTMLDivElement> {\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n}\nexport const ModalFooter = forwardRef<HTMLDivElement, ModalFooterProps>(\n ({ asChild, className, ...rest }, ref) => {\n const Component = asChild ? Slot : \"footer\";\n return (\n <Component\n className={clsx(\"hds-modal__footer\", className as undefined)}\n ref={ref}\n {...rest}\n />\n );\n },\n);\nModalFooter.displayName = \"Modal.Footer\";\n\nexport type CloseButtonProps = Omit<React.HTMLAttributes<HTMLButtonElement>, \"children\">;\n\nexport interface ModalProps extends React.HTMLAttributes<HTMLDialogElement> {\n children: React.ReactNode;\n\n /**\n * Controls the open state of the modal\n */\n open?: boolean;\n\n /**\n * Whether to close when clicking on the backdrop.\n */\n closeOnBackdropClick?: boolean;\n\n /**\n * Props applied to the close button element.\n */\n closeButtonProps?: CloseButtonProps;\n}\n\n/**\n * A modal dialog is a window that forces the user to interact with it before they can return to other parts of the application.\n *\n * Uses the native [`dialog`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dialog) element.\n *\n * @example\n * ```tsx\n * const modalRef = useRef<HTMLDialogElement>(null);\n * const onClose = () => modalRef.current?.close();\n *\n * return (\n * <>\n * <Button onClick={() => modalRef.current?.showModal()}>Open Modal</Button>\n * <Modal ref={modalRef}>\n * <Modal.Header>Dialog header</Modal.Header>\n * <Modal.Content>\n * <p>\n * Dialog header Dialog description - a description of what is about to happen and maybe\n * something about the consequences.\n * </p>\n * </Modal.Content>\n * <Modal.Footer>\n * <HStack gap=\"16\" wrap>\n * <Button onClick={onMainAction}>Main action</Button>\n * <Button variant=\"secondary\" onClick={onClose}>\n * Cancel\n * </Button>\n * </HStack>\n * </Modal.Footer>\n * </Modal>\n * </>\n * );\n * ```\n */\nexport const Modal = forwardRef<HTMLDialogElement, ModalProps>(\n (\n { children, className, open, closeOnBackdropClick, closeButtonProps, onClick, ...rest },\n ref,\n ) => {\n const modalRef = useRef<HTMLDialogElement>(null);\n const mergedRef = useMergeRefs([modalRef, ref]);\n\n // The X close button that comes from the `Box` component\n function onCloseButtonClick() {\n modalRef.current?.close();\n return false;\n }\n\n // No scroll when modal is open\n useScrollLock(modalRef, \"hds-modal-scroll-lock\");\n\n // `open` prop\n useEffect(() => {\n if (modalRef.current && open !== undefined) {\n if (open && !modalRef.current.open) {\n modalRef.current.showModal();\n } else if (!open && modalRef.current.open) {\n modalRef.current.close();\n }\n }\n }, [modalRef, open]);\n\n function onDialogClick(e: React.MouseEvent<HTMLElement>) {\n if (closeOnBackdropClick && e.target === modalRef.current) {\n modalRef.current.close();\n }\n onClick?.(e as React.MouseEvent<HTMLDialogElement>);\n }\n\n return (\n <Box\n asChild\n className={clsx(\"hds-modal\", className as undefined)}\n closeable\n onClick={onDialogClick}\n onClose={onCloseButtonClick}\n variant=\"white\"\n closeButtonProps={closeButtonProps}\n >\n <dialog ref={mergedRef} {...rest}>\n {children}\n </dialog>\n </Box>\n );\n },\n) as ModalType;\nModal.displayName = \"Modal\";\n\ntype ModalType = ReturnType<typeof forwardRef<HTMLDialogElement, ModalProps>> & {\n Header: typeof ModalHeader;\n Content: typeof ModalContent;\n Footer: typeof ModalFooter;\n};\n\nModal.Header = ModalHeader;\nModal.Content = ModalContent;\nModal.Footer = ModalFooter;\n\nfunction useScrollLock(modalRef: React.RefObject<HTMLDialogElement>, bodyClass: string) {\n useEffect(() => {\n if (!modalRef.current) return;\n if (modalRef.current.open) document.body.classList.add(bodyClass);\n\n const observer = new MutationObserver(() => {\n if (modalRef.current?.open) document.body.classList.add(bodyClass);\n else document.body.classList.remove(bodyClass);\n });\n observer.observe(modalRef.current, {\n attributes: true,\n attributeFilter: [\"open\"],\n });\n return () => {\n observer.disconnect();\n document.body.classList.remove(bodyClass);\n };\n }, [bodyClass, modalRef]);\n}\n"],"mappings":";;;;;;;;;;;;;AAAA,SAAS,YAAY,WAAW,cAAc;AAC9C,SAAS,YAAY;AACrB,SAAS,YAAY;AAgBf;AAJC,IAAM,cAAc;AAAA,EACzB,CAAC,IAAiC,QAAQ;AAAzC,iBAAE,WAAS,UAfd,IAeG,IAAyB,iBAAzB,IAAyB,CAAvB,WAAS;AACV,UAAM,YAAY,UAAU,OAAO;AACnC,WACE;AAAA,MAAC;AAAA;AAAA,QACC,WAAW,KAAK,qBAAqB,SAAsB;AAAA,QAC3D;AAAA,SACI;AAAA,IACN;AAAA,EAEJ;AACF;AACA,YAAY,cAAc;AAUnB,IAAM,eAAe;AAAA,EAC1B,CAAC,IAAiC,QAAQ;AAAzC,iBAAE,WAAS,UArCd,IAqCG,IAAyB,iBAAzB,IAAyB,CAAvB,WAAS;AACV,UAAM,YAAY,UAAU,OAAO;AACnC,WACE;AAAA,MAAC;AAAA;AAAA,QACC,WAAW,KAAK,sBAAsB,SAAsB;AAAA,QAC5D;AAAA,SACI;AAAA,IACN;AAAA,EAEJ;AACF;AACA,aAAa,cAAc;AAUpB,IAAM,cAAc;AAAA,EACzB,CAAC,IAAiC,QAAQ;AAAzC,iBAAE,WAAS,UA3Dd,IA2DG,IAAyB,iBAAzB,IAAyB,CAAvB,WAAS;AACV,UAAM,YAAY,UAAU,OAAO;AACnC,WACE;AAAA,MAAC;AAAA;AAAA,QACC,WAAW,KAAK,qBAAqB,SAAsB;AAAA,QAC3D;AAAA,SACI;AAAA,IACN;AAAA,EAEJ;AACF;AACA,YAAY,cAAc;AAyDnB,IAAM,QAAQ;AAAA,EACnB,CACE,IACA,QACG;AAFH,iBAAE,YAAU,WAAW,MAAM,sBAAsB,kBAAkB,QAjIzE,IAiII,IAAiF,i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,KAAK,UAAU,IAAI,SAAS;AAAA,UAC5D,UAAS,KAAK,UAAU,OAAO,SAAS;AAAA,IAC/C,CAAC;AACD,aAAS,QAAQ,SAAS,SAAS;AAAA,MACjC,YAAY;AAAA,MACZ,iBAAiB,CAAC,MAAM;AAAA,IAC1B,CAAC;AACD,WAAO,MAAM;AACX,eAAS,WAAW;AACpB,eAAS,KAAK,UAAU,OAAO,SAAS;AAAA,IAC1C;AAAA,EACF,GAAG,CAAC,WAAW,QAAQ,CAAC;AAC1B;","names":["_a"]}
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  LinkList
3
3
  } from "./chunk-OS24UCTD.mjs";
4
- import {
5
- Button
6
- } from "./chunk-45Q2TCH6.mjs";
7
4
  import {
8
5
  Accordion
9
6
  } from "./chunk-O55OTMJ5.mjs";
7
+ import {
8
+ Button
9
+ } from "./chunk-45Q2TCH6.mjs";
10
10
  import {
11
11
  __objRest,
12
12
  __spreadProps,
@@ -107,4 +107,4 @@ export {
107
107
  FooterLinkSection,
108
108
  Footer
109
109
  };
110
- //# sourceMappingURL=chunk-QDG2QLFV.mjs.map
110
+ //# sourceMappingURL=chunk-UXZKGAZ2.mjs.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Box
3
- } from "./chunk-DEABU7DB.mjs";
3
+ } from "./chunk-P4AKOVM7.mjs";
4
4
  import {
5
5
  __objRest,
6
6
  __spreadProps,
@@ -68,4 +68,4 @@ export {
68
68
  AlertDescription,
69
69
  Alert
70
70
  };
71
- //# sourceMappingURL=chunk-PZUJLRG4.mjs.map
71
+ //# sourceMappingURL=chunk-WFIS2ZYQ.mjs.map
@@ -4,11 +4,10 @@ import {
4
4
  FooterLinkSection,
5
5
  FooterLinkSections,
6
6
  FooterLogo
7
- } from "../chunk-QDG2QLFV.mjs";
7
+ } from "../chunk-UXZKGAZ2.mjs";
8
8
  import "../chunk-OS24UCTD.mjs";
9
9
  import "../chunk-3QHKPEXO.mjs";
10
10
  import "../chunk-HT2EIJAD.mjs";
11
- import "../chunk-45Q2TCH6.mjs";
12
11
  import "../chunk-ZKMFJZSH.mjs";
13
12
  import "../chunk-O55OTMJ5.mjs";
14
13
  import "../chunk-SO7TS4TS.mjs";
@@ -18,6 +17,7 @@ import "../chunk-3V4GFS46.mjs";
18
17
  import "../chunk-MYVC3HMO.mjs";
19
18
  import "../chunk-EZVEYJOX.mjs";
20
19
  import "../chunk-YQFL5UN4.mjs";
20
+ import "../chunk-45Q2TCH6.mjs";
21
21
  import "../chunk-YOSPWY5K.mjs";
22
22
  export {
23
23
  Footer,
@@ -5,11 +5,10 @@ import {
5
5
  FooterLinkSection,
6
6
  FooterLinkSections,
7
7
  FooterLogo
8
- } from "../chunk-QDG2QLFV.mjs";
8
+ } from "../chunk-UXZKGAZ2.mjs";
9
9
  import "../chunk-OS24UCTD.mjs";
10
10
  import "../chunk-3QHKPEXO.mjs";
11
11
  import "../chunk-HT2EIJAD.mjs";
12
- import "../chunk-45Q2TCH6.mjs";
13
12
  import "../chunk-ZKMFJZSH.mjs";
14
13
  import "../chunk-O55OTMJ5.mjs";
15
14
  import "../chunk-SO7TS4TS.mjs";
@@ -19,6 +18,7 @@ import "../chunk-3V4GFS46.mjs";
19
18
  import "../chunk-MYVC3HMO.mjs";
20
19
  import "../chunk-EZVEYJOX.mjs";
21
20
  import "../chunk-YQFL5UN4.mjs";
21
+ import "../chunk-45Q2TCH6.mjs";
22
22
  import "../chunk-YOSPWY5K.mjs";
23
23
  export {
24
24
  Footer,