@gnist/design-system 3.12.0 → 3.12.1

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 (34) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/components/actions/selectionControls/radiobutton.css.cjs +15 -7
  3. package/dist/components/actions/selectionControls/radiobutton.css.d.ts +2 -2
  4. package/dist/components/actions/selectionControls/radiobutton.css.d.ts.map +1 -1
  5. package/dist/components/actions/selectionControls/radiobutton.css.js +15 -7
  6. package/dist/components/surfaces/accordion/Accordion.cjs +3 -3
  7. package/dist/components/surfaces/accordion/Accordion.d.ts +5 -2
  8. package/dist/components/surfaces/accordion/Accordion.d.ts.map +1 -1
  9. package/dist/components/surfaces/accordion/Accordion.js +4 -4
  10. package/dist/components/surfaces/cards/ActionCard.cjs +2 -2
  11. package/dist/components/surfaces/cards/ActionCard.d.ts +2 -2
  12. package/dist/components/surfaces/cards/ActionCard.d.ts.map +1 -1
  13. package/dist/components/surfaces/cards/ActionCard.js +3 -3
  14. package/dist/components/surfaces/cards/CheckboxCard.cjs +2 -3
  15. package/dist/components/surfaces/cards/CheckboxCard.d.ts +2 -2
  16. package/dist/components/surfaces/cards/CheckboxCard.d.ts.map +1 -1
  17. package/dist/components/surfaces/cards/CheckboxCard.js +2 -3
  18. package/dist/components/surfaces/cards/InfoCard.cjs +2 -3
  19. package/dist/components/surfaces/cards/InfoCard.d.ts +2 -2
  20. package/dist/components/surfaces/cards/InfoCard.d.ts.map +1 -1
  21. package/dist/components/surfaces/cards/InfoCard.js +2 -3
  22. package/dist/components/surfaces/cards/LinkCard.cjs +2 -2
  23. package/dist/components/surfaces/cards/LinkCard.d.ts +2 -2
  24. package/dist/components/surfaces/cards/LinkCard.d.ts.map +1 -1
  25. package/dist/components/surfaces/cards/LinkCard.js +3 -3
  26. package/dist/components/surfaces/cards/RadioCard.cjs +2 -3
  27. package/dist/components/surfaces/cards/RadioCard.d.ts +1 -1
  28. package/dist/components/surfaces/cards/RadioCard.d.ts.map +1 -1
  29. package/dist/components/surfaces/cards/RadioCard.js +2 -3
  30. package/dist/components/surfaces/modal/Modal.cjs +2 -20
  31. package/dist/components/surfaces/modal/Modal.d.ts +2 -1
  32. package/dist/components/surfaces/modal/Modal.d.ts.map +1 -1
  33. package/dist/components/surfaces/modal/Modal.js +2 -3
  34. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -3,6 +3,12 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [3.12.1](https://github.com/mollerdigital/design-system-design-system/compare/@gnist/design-system@3.12.0...@gnist/design-system@3.12.1) (2025-09-12)
7
+
8
+ ### Bug Fixes
9
+
10
+ * make unselected radioButton not appear as selected when error ([8a73d22](https://github.com/mollerdigital/design-system-design-system/commit/8a73d2212bd97885ffc325b96063356ed9f53e68))
11
+
6
12
  ## [3.12.0](https://github.com/mollerdigital/design-system-design-system/compare/@gnist/design-system@3.11.2...@gnist/design-system@3.12.0) (2025-09-12)
7
13
 
8
14
  ### Features
@@ -76,13 +76,10 @@ const CheckedCircleRecipe = recipes.recipe({
76
76
  success: {}
77
77
  },
78
78
  disabled: {
79
- true: [
80
- atoms_css_js.atoms({}),
81
- {
82
- backgroundColor: tokens_css_js.tokens.color["disabled"],
83
- cursor: "not-allowed"
84
- }
85
- ],
79
+ true: {
80
+ backgroundColor: tokens_css_js.tokens.color["disabled"],
81
+ cursor: "not-allowed"
82
+ },
86
83
  false: {}
87
84
  }
88
85
  },
@@ -97,6 +94,17 @@ const CheckedCircleRecipe = recipes.recipe({
97
94
  background: tokens_css_js.tokens.color["on-disabled"]
98
95
  }
99
96
  ]
97
+ },
98
+ {
99
+ variants: {
100
+ checked: false,
101
+ validity: "error"
102
+ },
103
+ style: [
104
+ {
105
+ background: "transparent"
106
+ }
107
+ ]
100
108
  }
101
109
  ]
102
110
  });
@@ -30,10 +30,10 @@ export declare const CheckedCircleRecipe: import("@vanilla-extract/recipes").Run
30
30
  success: {};
31
31
  };
32
32
  disabled: {
33
- true: (string | {
33
+ true: {
34
34
  backgroundColor: `var(--${string})`;
35
35
  cursor: "not-allowed";
36
- })[];
36
+ };
37
37
  false: {};
38
38
  };
39
39
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"radiobutton.css.d.ts","sourceRoot":"","sources":["../../../../src/components/actions/selectionControls/radiobutton.css.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;EAwC5B,CAAC;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;EAuD9B,CAAC"}
1
+ {"version":3,"file":"radiobutton.css.d.ts","sourceRoot":"","sources":["../../../../src/components/actions/selectionControls/radiobutton.css.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;EAwC5B,CAAC;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;EA8D9B,CAAC"}
@@ -74,13 +74,10 @@ const CheckedCircleRecipe = recipe({
74
74
  success: {}
75
75
  },
76
76
  disabled: {
77
- true: [
78
- atoms({}),
79
- {
80
- backgroundColor: tokens.color["disabled"],
81
- cursor: "not-allowed"
82
- }
83
- ],
77
+ true: {
78
+ backgroundColor: tokens.color["disabled"],
79
+ cursor: "not-allowed"
80
+ },
84
81
  false: {}
85
82
  }
86
83
  },
@@ -95,6 +92,17 @@ const CheckedCircleRecipe = recipe({
95
92
  background: tokens.color["on-disabled"]
96
93
  }
97
94
  ]
95
+ },
96
+ {
97
+ variants: {
98
+ checked: false,
99
+ validity: "error"
100
+ },
101
+ style: [
102
+ {
103
+ background: "transparent"
104
+ }
105
+ ]
98
106
  }
99
107
  ]
100
108
  });
@@ -8,14 +8,14 @@ require("../../../foundation/iconography/IconVariantProvider.cjs");
8
8
  require("../../../foundation/iconography/icons.cjs");
9
9
  const Icon = require("../../../foundation/iconography/Icon.cjs");
10
10
  const index = require("../../../foundation/typography/index.cjs");
11
- const React = require("react");
11
+ require("react");
12
12
  require("classnames");
13
13
  require("../../../foundation/logos/Logo.css.cjs");
14
14
  const atoms_css_js = require("@gnist/themes/atoms.css.js");
15
15
  const accordion_css = require("./accordion.css.cjs");
16
- const AccordionElement = React.forwardRef(function AccordionElement2({ head, expanded, children, ...props }, ref) {
16
+ function AccordionElement({ head, expanded, children, ref, ...props }) {
17
17
  const headElement = typeof head === "string" ? jsxRuntime.jsx(index.Heading3Text, { className: atoms_css_js.atoms({ typography: "heading3-small" }), children: head }) : head;
18
18
  return jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsxs("details", { ...props, open: expanded, ref, children: [jsxRuntime.jsxs("summary", { className: accordion_css.head, children: [jsxRuntime.jsx("div", { className: accordion_css.headBackground }), headElement, jsxRuntime.jsx(Icon.Icon, { icon: "expand_more" })] }), jsxRuntime.jsx("div", { className: accordion_css.body, children })] }) });
19
- });
19
+ }
20
20
  const Accordion = componentUtils.component("Accordion", accordion_css.accordionRecipe, AccordionElement);
21
21
  exports.Accordion = Accordion;
@@ -1,4 +1,4 @@
1
- import { ReactNode } from "react";
1
+ import { ReactNode, Ref } from "react";
2
2
  type AccordionProps = {
3
3
  /** Head is the top section of the accordion. It can be a string or a React node. */
4
4
  head: string | ReactNode;
@@ -12,7 +12,10 @@ type AccordionProps = {
12
12
  withBackground?: boolean;
13
13
  /** className is a string that can be used to add custom styling to the accordion. */
14
14
  className?: string;
15
+ /** ref to the underlying HTMLDetailsElement. */
16
+ ref?: Ref<HTMLDetailsElement>;
15
17
  };
18
+ declare function AccordionElement({ head, expanded, children, ref, ...props }: AccordionProps): import("react/jsx-runtime").JSX.Element;
16
19
  /**
17
20
  * The Accordion component is used to show and hide content.
18
21
  * It is typically used when there is a lot of content that should be hidden by default. It is built with the HTML details and summary elements.
@@ -23,7 +26,7 @@ type AccordionProps = {
23
26
  *
24
27
  * Documentation: [Accordion](https://gnist.moller.no/developers/components/latest/?path=/docs/components-surfaces-accordion--docs)
25
28
  */
26
- export declare const Accordion: import("@gnist/component-utils").VanillaRecipeComponent<import("react").ElementType, import("react").ForwardRefExoticComponent<AccordionProps & import("react").RefAttributes<HTMLDetailsElement>>, import("@gnist/component-utils").VariantSelection<{
29
+ export declare const Accordion: import("@gnist/component-utils").VanillaRecipeComponent<import("react").ElementType, typeof AccordionElement, import("@gnist/component-utils").VariantSelection<{
27
30
  withDivider: {
28
31
  true: {
29
32
  borderBottom: `var(--${string}) solid var(--${string})`;
@@ -1 +1 @@
1
- {"version":3,"file":"Accordion.d.ts","sourceRoot":"","sources":["../../../../src/components/surfaces/accordion/Accordion.tsx"],"names":[],"mappings":"AAGA,OAAO,EAA4B,SAAS,EAAE,MAAM,OAAO,CAAC;AAI5D,KAAK,cAAc,GAAG;IAClB,oFAAoF;IACpF,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;IACzB,oFAAoF;IACpF,QAAQ,EAAE,SAAS,CAAC;IACpB,4FAA4F;IAC5F,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,yJAAyJ;IACzJ,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,8GAA8G;IAC9G,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,qFAAqF;IACrF,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AA6BF;;;;;;;;;GASG;AACH,eAAO,MAAM,SAAS;;;;;;;;;;;;GAIrB,CAAC"}
1
+ {"version":3,"file":"Accordion.d.ts","sourceRoot":"","sources":["../../../../src/components/surfaces/accordion/Accordion.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAIvC,KAAK,cAAc,GAAG;IAClB,oFAAoF;IACpF,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;IACzB,oFAAoF;IACpF,QAAQ,EAAE,SAAS,CAAC;IACpB,4FAA4F;IAC5F,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,yJAAyJ;IACzJ,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,8GAA8G;IAC9G,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,qFAAqF;IACrF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gDAAgD;IAChD,GAAG,CAAC,EAAE,GAAG,CAAC,kBAAkB,CAAC,CAAC;CACjC,CAAC;AAEF,iBAAS,gBAAgB,CAAC,EACtB,IAAI,EACJ,QAAQ,EACR,QAAQ,EACR,GAAG,EACH,GAAG,KAAK,EACX,EAAE,cAAc,2CAsBhB;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,SAAS;;;;;;;;;;;;GAIrB,CAAC"}
@@ -6,15 +6,15 @@ import "../../../foundation/iconography/IconVariantProvider.js";
6
6
  import "../../../foundation/iconography/icons.js";
7
7
  import { Icon } from "../../../foundation/iconography/Icon.js";
8
8
  import { Heading3Text } from "../../../foundation/typography/index.js";
9
- import { forwardRef } from "react";
9
+ import "react";
10
10
  import "classnames";
11
11
  import "../../../foundation/logos/Logo.css.js";
12
12
  import { atoms } from "@gnist/themes/atoms.css.js";
13
- import { head, headBackground, body, accordionRecipe } from "./accordion.css.js";
14
- const AccordionElement = forwardRef(function AccordionElement2({ head: head$1, expanded, children, ...props }, ref) {
13
+ import { accordionRecipe, head, headBackground, body } from "./accordion.css.js";
14
+ function AccordionElement({ head: head$1, expanded, children, ref, ...props }) {
15
15
  const headElement = typeof head$1 === "string" ? jsx(Heading3Text, { className: atoms({ typography: "heading3-small" }), children: head$1 }) : head$1;
16
16
  return jsx(Fragment, { children: jsxs("details", { ...props, open: expanded, ref, children: [jsxs("summary", { className: head, children: [jsx("div", { className: headBackground }), headElement, jsx(Icon, { icon: "expand_more" })] }), jsx("div", { className: body, children })] }) });
17
- });
17
+ }
18
18
  const Accordion = component("Accordion", accordionRecipe, AccordionElement);
19
19
  export {
20
20
  Accordion
@@ -8,7 +8,7 @@ const cards_css = require("./cards.css.cjs");
8
8
  const SharedComponents = require("./SharedComponents.cjs");
9
9
  const _interopDefaultCompat = (e) => e && typeof e === "object" && "default" in e ? e : { default: e };
10
10
  const classNames__default = /* @__PURE__ */ _interopDefaultCompat(classNames);
11
- const ActionCard = React.forwardRef(function ActionCard2({ $as, as, children, isLoading, density, ...props }, ref) {
11
+ function ActionCard({ $as, as, children, isLoading, density, ref, ...props }) {
12
12
  const cardProps = {
13
13
  ref,
14
14
  ...props,
@@ -19,5 +19,5 @@ const ActionCard = React.forwardRef(function ActionCard2({ $as, as, children, is
19
19
  }), props.className)
20
20
  };
21
21
  return React.createElement($as ?? as ?? "button", cardProps, jsxRuntime.jsx(jsxRuntime.Fragment, { children: isLoading ? jsxRuntime.jsx(SharedComponents.LoadingSkeleton, {}) : children }));
22
- });
22
+ }
23
23
  exports.ActionCard = ActionCard;
@@ -1,4 +1,4 @@
1
- import { ElementType, ForwardRefExoticComponent } from "react";
1
+ import { ElementType } from "react";
2
2
  import { ActionCardProps } from "./CardProps.js";
3
3
  /** Cards that contain content and actions about a single subject that helps users make a decision. The card serves as an overview and an entry point for more detailed information about the subject. A card can stand alone, without relying on surrounding elements for context.
4
4
 
@@ -10,5 +10,5 @@ Card layouts can vary to support the types of content they contain. Imagery, ico
10
10
 
11
11
  Documentation: [ActionCard](https://gnist.moller.no/developers/components/latest/?path=/docs/components-surfaces-cards-actioncard--docs)
12
12
  */
13
- export declare const ActionCard: ForwardRefExoticComponent<ActionCardProps<ElementType>>;
13
+ export declare function ActionCard<AsElement extends ElementType = "button">({ $as, as, children, isLoading, density, ref, ...props }: ActionCardProps<AsElement>): import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
14
14
  //# sourceMappingURL=ActionCard.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ActionCard.d.ts","sourceRoot":"","sources":["../../../../src/components/surfaces/cards/ActionCard.tsx"],"names":[],"mappings":"AACA,OAAO,EAGH,WAAW,EAGX,yBAAyB,EAC5B,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAMjD;;;;;;;;;EASE;AACF,eAAO,MAAM,UAAU,EAAE,yBAAyB,CAC9C,eAAe,CAAC,WAAW,CAAC,CA6B9B,CAAC"}
1
+ {"version":3,"file":"ActionCard.d.ts","sourceRoot":"","sources":["../../../../src/components/surfaces/cards/ActionCard.tsx"],"names":[],"mappings":"AACA,OAAO,EAAwC,WAAW,EAAE,MAAM,OAAO,CAAC;AAC1E,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAMjD;;;;;;;;;EASE;AACF,wBAAgB,UAAU,CAAC,SAAS,SAAS,WAAW,GAAG,QAAQ,EAAE,EACjE,GAAG,EACH,EAAE,EACF,QAAQ,EACR,SAAS,EACT,OAAO,EACP,GAAG,EACH,GAAG,KAAK,EACX,EAAE,eAAe,CAAC,SAAS,CAAC,0FAkB5B"}
@@ -1,10 +1,10 @@
1
1
  "use client";
2
2
  import { jsx, Fragment } from "react/jsx-runtime";
3
3
  import classNames from "classnames";
4
- import { forwardRef, createElement } from "react";
4
+ import { createElement } from "react";
5
5
  import { cardsRecipe } from "./cards.css.js";
6
6
  import { LoadingSkeleton } from "./SharedComponents.js";
7
- const ActionCard = forwardRef(function ActionCard2({ $as, as, children, isLoading, density, ...props }, ref) {
7
+ function ActionCard({ $as, as, children, isLoading, density, ref, ...props }) {
8
8
  const cardProps = {
9
9
  ref,
10
10
  ...props,
@@ -15,7 +15,7 @@ const ActionCard = forwardRef(function ActionCard2({ $as, as, children, isLoadin
15
15
  }), props.className)
16
16
  };
17
17
  return createElement($as ?? as ?? "button", cardProps, jsx(Fragment, { children: isLoading ? jsx(LoadingSkeleton, {}) : children }));
18
- });
18
+ }
19
19
  export {
20
20
  ActionCard
21
21
  };
@@ -6,14 +6,13 @@ const Checkbox = require("../../actions/selectionControls/Checkbox.cjs");
6
6
  const SelectionCard = require("./internal/SelectionCard.cjs");
7
7
  const InfoCard = require("./InfoCard.cjs");
8
8
  const checkboxCard_css = require("./checkboxCard.css.cjs");
9
- const React = require("react");
10
9
  const classNames = require("classnames");
11
10
  const _interopDefaultCompat = (e) => e && typeof e === "object" && "default" in e ? e : { default: e };
12
11
  const classNames__default = /* @__PURE__ */ _interopDefaultCompat(classNames);
13
- const CheckboxCard = React.forwardRef(function CheckboxCard2({ label, description, value, id, onChange, children, isLoading, validity, checkboxProps, cardStyle, ...props }, ref) {
12
+ function CheckboxCard({ label, description, value, id, onChange, children, isLoading, validity, checkboxProps, cardStyle, ref, ...props }) {
14
13
  return jsxRuntime.jsx(InfoCard.InfoCard, { ref, ...props, className: classNames__default.default(checkboxCard_css.StyledCardRecipe({
15
14
  disabled: props.disabled,
16
15
  cardStyle: cardStyle ?? "elevation"
17
16
  }), props.className), children: isLoading ? jsxRuntime.jsx(SelectionCard.SelectionCardLoader, { type: "checkbox", density: props.density }) : jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Checkbox.Checkbox, { label, value, onChange, validity, id, disabled: props.disabled, ...checkboxProps }), jsxRuntime.jsx(SelectionCard.SelectionCardContent, { description, value, density: props.density, children })] }) });
18
- });
17
+ }
19
18
  exports.CheckboxCard = CheckboxCard;
@@ -8,7 +8,7 @@ interface CheckboxCardProps extends SelectionCardProps {
8
8
  /**
9
9
  * Props which will be passed to the checkbox
10
10
  */
11
- checkboxProps?: Omit<HtmlSelectionControlProps, "ref">;
11
+ checkboxProps?: HtmlSelectionControlProps;
12
12
  }
13
13
  /**
14
14
  Checkbox cards allow you to present an option and optionally provide additional information and supplementary actions.
@@ -19,6 +19,6 @@ The card serves to draw extra attention to a checkbox selection in the user inte
19
19
 
20
20
  Documentation: [CheckboxCard](https://gnist.moller.no/developers/components/latest/?path=/docs/components-surfaces-cards-checkboxcard--docs)
21
21
  */
22
- export declare const CheckboxCard: React.ForwardRefExoticComponent<Omit<CheckboxCardProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
22
+ export declare function CheckboxCard({ label, description, value, id, onChange, children, isLoading, validity, checkboxProps, cardStyle, ref, ...props }: CheckboxCardProps): import("react/jsx-runtime").JSX.Element;
23
23
  export {};
24
24
  //# sourceMappingURL=CheckboxCard.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CheckboxCard.d.ts","sourceRoot":"","sources":["../../../../src/components/surfaces/cards/CheckboxCard.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEH,aAAa,EAChB,MAAM,6CAA6C,CAAC;AACrD,OAAO,EACH,yBAAyB,EAGzB,kBAAkB,EACrB,MAAM,6BAA6B,CAAC;AAMrC,UAAU,iBAAkB,SAAQ,kBAAkB;IAClD;;OAEG;IACH,QAAQ,EAAE,aAAa,CAAC,UAAU,CAAC,CAAC;IACpC;;OAEG;IACH,aAAa,CAAC,EAAE,IAAI,CAAC,yBAAyB,EAAE,KAAK,CAAC,CAAC;CAC1D;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,yBAAyB,CACtD,IAAI,CAAC,iBAAiB,EAAE,KAAK,CAAC,GAAG,KAAK,CAAC,aAAa,CAAC,cAAc,CAAC,CAwDtE,CAAC"}
1
+ {"version":3,"file":"CheckboxCard.d.ts","sourceRoot":"","sources":["../../../../src/components/surfaces/cards/CheckboxCard.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEH,aAAa,EAChB,MAAM,6CAA6C,CAAC;AACrD,OAAO,EACH,yBAAyB,EAGzB,kBAAkB,EACrB,MAAM,6BAA6B,CAAC;AAKrC,UAAU,iBAAkB,SAAQ,kBAAkB;IAClD;;OAEG;IACH,QAAQ,EAAE,aAAa,CAAC,UAAU,CAAC,CAAC;IACpC;;OAEG;IACH,aAAa,CAAC,EAAE,yBAAyB,CAAC;CAC7C;AAED;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAAC,EACzB,KAAK,EACL,WAAW,EACX,KAAK,EACL,EAAE,EACF,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,aAAa,EACb,SAAS,EACT,GAAG,EACH,GAAG,KAAK,EACX,EAAE,iBAAiB,2CAwCnB"}
@@ -4,14 +4,13 @@ import { Checkbox } from "../../actions/selectionControls/Checkbox.js";
4
4
  import { SelectionCardLoader, SelectionCardContent } from "./internal/SelectionCard.js";
5
5
  import { InfoCard } from "./InfoCard.js";
6
6
  import { StyledCardRecipe } from "./checkboxCard.css.js";
7
- import { forwardRef } from "react";
8
7
  import classNames from "classnames";
9
- const CheckboxCard = forwardRef(function CheckboxCard2({ label, description, value, id, onChange, children, isLoading, validity, checkboxProps, cardStyle, ...props }, ref) {
8
+ function CheckboxCard({ label, description, value, id, onChange, children, isLoading, validity, checkboxProps, cardStyle, ref, ...props }) {
10
9
  return jsx(InfoCard, { ref, ...props, className: classNames(StyledCardRecipe({
11
10
  disabled: props.disabled,
12
11
  cardStyle: cardStyle ?? "elevation"
13
12
  }), props.className), children: isLoading ? jsx(SelectionCardLoader, { type: "checkbox", density: props.density }) : jsxs(Fragment, { children: [jsx(Checkbox, { label, value, onChange, validity, id, disabled: props.disabled, ...checkboxProps }), jsx(SelectionCardContent, { description, value, density: props.density, children })] }) });
14
- });
13
+ }
15
14
  export {
16
15
  CheckboxCard
17
16
  };
@@ -3,17 +3,16 @@
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
4
  const jsxRuntime = require("react/jsx-runtime");
5
5
  const classNames = require("classnames");
6
- const React = require("react");
7
6
  const cards_css = require("./cards.css.cjs");
8
7
  const SharedComponents = require("./SharedComponents.cjs");
9
8
  const _interopDefaultCompat = (e) => e && typeof e === "object" && "default" in e ? e : { default: e };
10
9
  const classNames__default = /* @__PURE__ */ _interopDefaultCompat(classNames);
11
- const InfoCard = React.forwardRef(function InfoCard2({ isLoading, transparent, density, ...props }, ref) {
10
+ function InfoCard({ isLoading, transparent, density, ref, ...props }) {
12
11
  return jsxRuntime.jsx("div", { ref, ...props, className: classNames__default.default(cards_css.cardsRecipe({
13
12
  type: "info",
14
13
  isLoading,
15
14
  transparent,
16
15
  density
17
16
  }), props.className), children: isLoading ? jsxRuntime.jsx(SharedComponents.LoadingSkeleton, {}) : props.children });
18
- });
17
+ }
19
18
  exports.InfoCard = InfoCard;
@@ -1,4 +1,4 @@
1
- import { ElementType, ForwardRefExoticComponent } from "react";
1
+ import { ElementType } from "react";
2
2
  import { InfoCardProps } from "./CardProps.js";
3
3
  /** Cards that contain content but is not clickable. A card can stand alone, without relying on surrounding elements for context.
4
4
 
@@ -8,5 +8,5 @@ Card layouts can vary to support the types of content they contain. Imagery, ico
8
8
 
9
9
  Documentation: [InfoCard](https://gnist.moller.no/developers/components/latest/?path=/docs/components-surfaces-cards-infocard--docs)
10
10
  */
11
- export declare const InfoCard: ForwardRefExoticComponent<InfoCardProps<ElementType>>;
11
+ export declare function InfoCard<AsElement extends ElementType = "div">({ isLoading, transparent, density, ref, ...props }: InfoCardProps<AsElement>): import("react/jsx-runtime").JSX.Element;
12
12
  //# sourceMappingURL=InfoCard.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"InfoCard.d.ts","sourceRoot":"","sources":["../../../../src/components/surfaces/cards/InfoCard.tsx"],"names":[],"mappings":"AACA,OAAO,EACH,WAAW,EAGX,yBAAyB,EAC5B,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAI/C;;;;;;;EAOE;AACF,eAAO,MAAM,QAAQ,EAAE,yBAAyB,CAAC,aAAa,CAAC,WAAW,CAAC,CAsBrE,CAAC"}
1
+ {"version":3,"file":"InfoCard.d.ts","sourceRoot":"","sources":["../../../../src/components/surfaces/cards/InfoCard.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAI/C;;;;;;;EAOE;AACF,wBAAgB,QAAQ,CAAC,SAAS,SAAS,WAAW,GAAG,KAAK,EAAE,EAC5D,SAAS,EACT,WAAW,EACX,OAAO,EACP,GAAG,EACH,GAAG,KAAK,EACX,EAAE,aAAa,CAAC,SAAS,CAAC,2CAkB1B"}
@@ -1,17 +1,16 @@
1
1
  "use client";
2
2
  import { jsx } from "react/jsx-runtime";
3
3
  import classNames from "classnames";
4
- import { forwardRef } from "react";
5
4
  import { cardsRecipe } from "./cards.css.js";
6
5
  import { LoadingSkeleton } from "./SharedComponents.js";
7
- const InfoCard = forwardRef(function InfoCard2({ isLoading, transparent, density, ...props }, ref) {
6
+ function InfoCard({ isLoading, transparent, density, ref, ...props }) {
8
7
  return jsx("div", { ref, ...props, className: classNames(cardsRecipe({
9
8
  type: "info",
10
9
  isLoading,
11
10
  transparent,
12
11
  density
13
12
  }), props.className), children: isLoading ? jsx(LoadingSkeleton, {}) : props.children });
14
- });
13
+ }
15
14
  export {
16
15
  InfoCard
17
16
  };
@@ -8,7 +8,7 @@ const cards_css = require("./cards.css.cjs");
8
8
  const SharedComponents = require("./SharedComponents.cjs");
9
9
  const _interopDefaultCompat = (e) => e && typeof e === "object" && "default" in e ? e : { default: e };
10
10
  const classNames__default = /* @__PURE__ */ _interopDefaultCompat(classNames);
11
- const LinkCard = React.forwardRef(function LinkCard2({ $as, as, children, isLoading, density, ...props }, ref) {
11
+ function LinkCard({ $as, as, children, isLoading, density, ref, ...props }) {
12
12
  const cardProps = {
13
13
  ...props,
14
14
  ref,
@@ -19,5 +19,5 @@ const LinkCard = React.forwardRef(function LinkCard2({ $as, as, children, isLoad
19
19
  }), props.className)
20
20
  };
21
21
  return React.createElement($as ?? as ?? "a", cardProps, jsxRuntime.jsx(jsxRuntime.Fragment, { children: isLoading ? jsxRuntime.jsx(SharedComponents.LoadingSkeleton, {}) : children }));
22
- });
22
+ }
23
23
  exports.LinkCard = LinkCard;
@@ -1,4 +1,4 @@
1
- import { ElementType, ForwardRefExoticComponent } from "react";
1
+ import { ElementType } from "react";
2
2
  import { LinkCardProps } from "./CardProps.js";
3
3
  /** Cards that contain content and actions about a single subject that helps users make a decision. The card serves as an overview and an entry point for more detailed information about the subject. A card can stand alone, without relying on surrounding elements for context.
4
4
 
@@ -10,5 +10,5 @@ Card layouts can vary to support the types of content they contain. Imagery, ico
10
10
 
11
11
  Documentation: [LinkCard](https://gnist.moller.no/developers/components/latest/?path=/docs/components-surfaces-cards-linkcard--docs)
12
12
  */
13
- export declare const LinkCard: ForwardRefExoticComponent<LinkCardProps<ElementType>>;
13
+ export declare function LinkCard<AsElement extends ElementType = "a">({ $as, as, children, isLoading, density, ref, ...props }: LinkCardProps<AsElement>): import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
14
14
  //# sourceMappingURL=LinkCard.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"LinkCard.d.ts","sourceRoot":"","sources":["../../../../src/components/surfaces/cards/LinkCard.tsx"],"names":[],"mappings":"AACA,OAAO,EAGH,WAAW,EAGX,yBAAyB,EAC5B,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAK/C;;;;;;;;;EASE;AAEF,eAAO,MAAM,QAAQ,EAAE,yBAAyB,CAAC,aAAa,CAAC,WAAW,CAAC,CA6BrE,CAAC"}
1
+ {"version":3,"file":"LinkCard.d.ts","sourceRoot":"","sources":["../../../../src/components/surfaces/cards/LinkCard.tsx"],"names":[],"mappings":"AACA,OAAO,EAAuC,WAAW,EAAE,MAAM,OAAO,CAAC;AACzE,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAK/C;;;;;;;;;EASE;AAEF,wBAAgB,QAAQ,CAAC,SAAS,SAAS,WAAW,GAAG,GAAG,EAAE,EAC1D,GAAG,EACH,EAAE,EACF,QAAQ,EACR,SAAS,EACT,OAAO,EACP,GAAG,EACH,GAAG,KAAK,EACX,EAAE,aAAa,CAAC,SAAS,CAAC,0FAkB1B"}
@@ -1,10 +1,10 @@
1
1
  "use client";
2
2
  import { jsx, Fragment } from "react/jsx-runtime";
3
3
  import classNames from "classnames";
4
- import { forwardRef, createElement } from "react";
4
+ import { createElement } from "react";
5
5
  import { cardsRecipe } from "./cards.css.js";
6
6
  import { LoadingSkeleton } from "./SharedComponents.js";
7
- const LinkCard = forwardRef(function LinkCard2({ $as, as, children, isLoading, density, ...props }, ref) {
7
+ function LinkCard({ $as, as, children, isLoading, density, ref, ...props }) {
8
8
  const cardProps = {
9
9
  ...props,
10
10
  ref,
@@ -15,7 +15,7 @@ const LinkCard = forwardRef(function LinkCard2({ $as, as, children, isLoading, d
15
15
  }), props.className)
16
16
  };
17
17
  return createElement($as ?? as ?? "a", cardProps, jsx(Fragment, { children: isLoading ? jsx(LoadingSkeleton, {}) : children }));
18
- });
18
+ }
19
19
  export {
20
20
  LinkCard
21
21
  };
@@ -5,15 +5,14 @@ const jsxRuntime = require("react/jsx-runtime");
5
5
  const RadioButton = require("../../actions/selectionControls/RadioButton.cjs");
6
6
  const SelectionCard = require("./internal/SelectionCard.cjs");
7
7
  const InfoCard = require("./InfoCard.cjs");
8
- const React = require("react");
9
8
  const checkboxCard_css = require("./checkboxCard.css.cjs");
10
9
  const classNames = require("classnames");
11
10
  const _interopDefaultCompat = (e) => e && typeof e === "object" && "default" in e ? e : { default: e };
12
11
  const classNames__default = /* @__PURE__ */ _interopDefaultCompat(classNames);
13
- const RadioCard = React.forwardRef(function RadioCard2({ label, description, value, id, name, onChange, children, isLoading, validity, cardStyle, ...props }, ref) {
12
+ function RadioCard({ label, description, value, id, name, onChange, children, isLoading, validity, cardStyle, ref, ...props }) {
14
13
  return jsxRuntime.jsx(InfoCard.InfoCard, { ref, ...props, className: classNames__default.default(checkboxCard_css.StyledCardRecipe({
15
14
  disabled: props.disabled,
16
15
  cardStyle: cardStyle ?? "elevation"
17
16
  }), props.className), children: isLoading ? jsxRuntime.jsx(SelectionCard.SelectionCardLoader, { type: "radio", density: props.density }) : jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(RadioButton.RadioButton, { label, value, onChange, disabled: props.disabled, validity, id, name }), jsxRuntime.jsx(SelectionCard.SelectionCardContent, { description, value, density: props.density, children })] }) });
18
- });
17
+ }
19
18
  exports.RadioCard = RadioCard;
@@ -23,6 +23,6 @@ The card serves to draw extra attention to a radio button selection in the user
23
23
 
24
24
  Documentation: [RadioCard](https://gnist.moller.no/developers/components/latest/?path=/docs/components-surfaces-cards-radiocard--docs)
25
25
  */
26
- export declare const RadioCard: React.ForwardRefExoticComponent<Omit<RadioCardProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
26
+ export declare function RadioCard({ label, description, value, id, name, onChange, children, isLoading, validity, cardStyle, ref, ...props }: RadioCardProps): import("react/jsx-runtime").JSX.Element;
27
27
  export {};
28
28
  //# sourceMappingURL=RadioCard.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"RadioCard.d.ts","sourceRoot":"","sources":["../../../../src/components/surfaces/cards/RadioCard.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEH,gBAAgB,EACnB,MAAM,gDAAgD,CAAC;AACxD,OAAO,EACH,yBAAyB,EAGzB,kBAAkB,EACrB,MAAM,6BAA6B,CAAC;AAMrC,UAAU,cAAe,SAAQ,kBAAkB;IAC/C;;OAEG;IACH,QAAQ,EAAE,gBAAgB,CAAC,UAAU,CAAC,CAAC;IACvC;;OAEG;IACH,IAAI,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAC;IAC/B;;OAEG;IACH,UAAU,CAAC,EAAE,yBAAyB,CAAC;CAC1C;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,yBAAyB,CACnD,IAAI,CAAC,cAAc,EAAE,KAAK,CAAC,GAAG,KAAK,CAAC,aAAa,CAAC,cAAc,CAAC,CAqDnE,CAAC"}
1
+ {"version":3,"file":"RadioCard.d.ts","sourceRoot":"","sources":["../../../../src/components/surfaces/cards/RadioCard.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEH,gBAAgB,EACnB,MAAM,gDAAgD,CAAC;AACxD,OAAO,EACH,yBAAyB,EAGzB,kBAAkB,EACrB,MAAM,6BAA6B,CAAC;AAKrC,UAAU,cAAe,SAAQ,kBAAkB;IAC/C;;OAEG;IACH,QAAQ,EAAE,gBAAgB,CAAC,UAAU,CAAC,CAAC;IACvC;;OAEG;IACH,IAAI,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAC;IAC/B;;OAEG;IACH,UAAU,CAAC,EAAE,yBAAyB,CAAC;CAC1C;AAED;;;;;;;;GAQG;AACH,wBAAgB,SAAS,CAAC,EACtB,KAAK,EACL,WAAW,EACX,KAAK,EACL,EAAE,EACF,IAAI,EACJ,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,SAAS,EACT,GAAG,EACH,GAAG,KAAK,EACX,EAAE,cAAc,2CAqChB"}
@@ -3,15 +3,14 @@ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
3
3
  import { RadioButton } from "../../actions/selectionControls/RadioButton.js";
4
4
  import { SelectionCardLoader, SelectionCardContent } from "./internal/SelectionCard.js";
5
5
  import { InfoCard } from "./InfoCard.js";
6
- import { forwardRef } from "react";
7
6
  import { StyledCardRecipe } from "./checkboxCard.css.js";
8
7
  import classNames from "classnames";
9
- const RadioCard = forwardRef(function RadioCard2({ label, description, value, id, name, onChange, children, isLoading, validity, cardStyle, ...props }, ref) {
8
+ function RadioCard({ label, description, value, id, name, onChange, children, isLoading, validity, cardStyle, ref, ...props }) {
10
9
  return jsx(InfoCard, { ref, ...props, className: classNames(StyledCardRecipe({
11
10
  disabled: props.disabled,
12
11
  cardStyle: cardStyle ?? "elevation"
13
12
  }), props.className), children: isLoading ? jsx(SelectionCardLoader, { type: "radio", density: props.density }) : jsxs(Fragment, { children: [jsx(RadioButton, { label, value, onChange, disabled: props.disabled, validity, id, name }), jsx(SelectionCardContent, { description, value, density: props.density, children })] }) });
14
- });
13
+ }
15
14
  export {
16
15
  RadioCard
17
16
  };
@@ -33,24 +33,6 @@ const index = require("../../../translations/index.cjs");
33
33
  const reactDom = require("react-dom");
34
34
  const modal_css = require("./modal.css.cjs");
35
35
  const _interopDefaultCompat = (e) => e && typeof e === "object" && "default" in e ? e : { default: e };
36
- function _interopNamespaceCompat(e) {
37
- if (e && typeof e === "object" && "default" in e) return e;
38
- const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
39
- if (e) {
40
- for (const k in e) {
41
- if (k !== "default") {
42
- const d = Object.getOwnPropertyDescriptor(e, k);
43
- Object.defineProperty(n, k, d.get ? d : {
44
- enumerable: true,
45
- get: () => e[k]
46
- });
47
- }
48
- }
49
- }
50
- n.default = e;
51
- return Object.freeze(n);
52
- }
53
- const React__namespace = /* @__PURE__ */ _interopNamespaceCompat(React);
54
36
  const classNames__default = /* @__PURE__ */ _interopDefaultCompat(classNames);
55
37
  const hasScroll = (size, height) => {
56
38
  switch (size) {
@@ -64,7 +46,7 @@ const hasScroll = (size, height) => {
64
46
  return height > 271;
65
47
  }
66
48
  };
67
- const Modal = React__namespace.forwardRef(function Modal2({ children, title, isOpen, handleClose, size = "medium", primaryAction, secondaryAction, action, backgroundColor = tokens_css_js.tokens.color.surface, className }, ref) {
49
+ function Modal({ children, title, isOpen, handleClose, size = "medium", primaryAction, secondaryAction, action, backgroundColor = tokens_css_js.tokens.color.surface, ref, className }) {
68
50
  const text = index.useTranslation((t) => t.components.surfaces.modal);
69
51
  const [contentHeight, setContentHeight] = React.useState(0);
70
52
  const [renderComponent, setRenderComponent] = React.useState(false);
@@ -118,5 +100,5 @@ const Modal = React__namespace.forwardRef(function Modal2({ children, title, isO
118
100
  size,
119
101
  hasScroll: hasScroll(size, contentHeight)
120
102
  }), style: { backgroundColor }, children: [primaryAction ? jsxRuntime.jsx(PrimaryButton.PrimaryButton, { ...primaryAction, children: primaryAction.label }) : null, secondaryAction ? jsxRuntime.jsx(TextButton.TextButton, { ...secondaryAction, disabled: primaryAction?.loading?.isLoading, children: secondaryAction.label }) : null, action ? action : null] }) : null] })] }), document.body);
121
- });
103
+ }
122
104
  exports.Modal = Modal;
@@ -24,6 +24,7 @@ export interface ModalProps {
24
24
  /** Background color of the modal. */
25
25
  backgroundColor?: string;
26
26
  className?: string;
27
+ ref?: React.Ref<HTMLDivElement>;
27
28
  }
28
29
  /**
29
30
  *
@@ -37,6 +38,6 @@ export interface ModalProps {
37
38
  *
38
39
  * Documentation: [Modal](https://gnist.moller.no/developers/components/latest/?path=/docs/components-surfaces-modal--docs)
39
40
  */
40
- export declare const Modal: React.ForwardRefExoticComponent<ModalProps & React.RefAttributes<HTMLDivElement>>;
41
+ export declare function Modal({ children, title, isOpen, handleClose, size, primaryAction, secondaryAction, action, backgroundColor, ref, className, }: ModalProps): React.ReactPortal | null;
41
42
  export {};
42
43
  //# sourceMappingURL=Modal.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../../../../src/components/surfaces/modal/Modal.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,gBAAgB,EAAE,4CAAsE;AAKjG,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAKH,UAAU,EAIb,uBAAmD;AAEpD,UAAU,MAAO,SAAQ,gBAAgB,CAAC,QAAQ,CAAC;IAC/C,KAAK,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,UAAU;IACvB,uCAAuC;IACvC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,8CAA8C;IAC9C,MAAM,EAAE,OAAO,CAAC;IAChB,kCAAkC;IAClC,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,6BAA6B;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,6GAA6G;IAC7G,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,uFAAuF;IACvF,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,+GAA+G;IAC/G,eAAe,CAAC,EAAE,IAAI,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IAC1C,4BAA4B;IAC5B,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,qCAAqC;IACrC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAeD;;;;;;;;;;;GAWG;AAEH,eAAO,MAAM,KAAK,mFAiJhB,CAAC"}
1
+ {"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../../../../src/components/surfaces/modal/Modal.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,gBAAgB,EAAE,4CAAsE;AAKjG,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAKH,UAAU,EAIb,uBAAmD;AAEpD,UAAU,MAAO,SAAQ,gBAAgB,CAAC,QAAQ,CAAC;IAC/C,KAAK,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,UAAU;IACvB,uCAAuC;IACvC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,8CAA8C;IAC9C,MAAM,EAAE,OAAO,CAAC;IAChB,kCAAkC;IAClC,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,6BAA6B;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,6GAA6G;IAC7G,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,uFAAuF;IACvF,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,+GAA+G;IAC/G,eAAe,CAAC,EAAE,IAAI,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IAC1C,4BAA4B;IAC5B,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,qCAAqC;IACrC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;CACnC;AAeD;;;;;;;;;;;GAWG;AAEH,wBAAgB,KAAK,CAAC,EAClB,QAAQ,EACR,KAAK,EACL,MAAM,EACN,WAAW,EACX,IAAe,EACf,aAAa,EACb,eAAe,EACf,MAAM,EACN,eAAsC,EACtC,GAAG,EACH,SAAS,GACZ,EAAE,UAAU,4BAmIZ"}
@@ -6,7 +6,6 @@ import "../../../foundation/iconography/IconVariantProvider.js";
6
6
  import "../../../foundation/iconography/icons.js";
7
7
  import "../../../foundation/iconography/Icon.js";
8
8
  import { LeadText } from "../../../foundation/typography/index.js";
9
- import * as React from "react";
10
9
  import { useState, useRef, useEffect } from "react";
11
10
  import classNames from "classnames";
12
11
  import "../../../foundation/logos/Logo.css.js";
@@ -43,7 +42,7 @@ const hasScroll = (size, height) => {
43
42
  return height > 271;
44
43
  }
45
44
  };
46
- const Modal = React.forwardRef(function Modal2({ children, title, isOpen, handleClose, size = "medium", primaryAction, secondaryAction, action, backgroundColor = tokens.color.surface, className }, ref) {
45
+ function Modal({ children, title, isOpen, handleClose, size = "medium", primaryAction, secondaryAction, action, backgroundColor = tokens.color.surface, ref, className }) {
47
46
  const text = useTranslation((t) => t.components.surfaces.modal);
48
47
  const [contentHeight, setContentHeight] = useState(0);
49
48
  const [renderComponent, setRenderComponent] = useState(false);
@@ -97,7 +96,7 @@ const Modal = React.forwardRef(function Modal2({ children, title, isOpen, handle
97
96
  size,
98
97
  hasScroll: hasScroll(size, contentHeight)
99
98
  }), style: { backgroundColor }, children: [primaryAction ? jsx(PrimaryButton, { ...primaryAction, children: primaryAction.label }) : null, secondaryAction ? jsx(TextButton, { ...secondaryAction, disabled: primaryAction?.loading?.isLoading, children: secondaryAction.label }) : null, action ? action : null] }) : null] })] }), document.body);
100
- });
99
+ }
101
100
  export {
102
101
  Modal
103
102
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gnist/design-system",
3
- "version": "3.12.0",
3
+ "version": "3.12.1",
4
4
  "license": "UNLICENSED",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",
@@ -102,5 +102,5 @@
102
102
  "optional": true
103
103
  }
104
104
  },
105
- "gitHead": "4922d841043fcd2bee5c90bb8afa56f65df62a68"
105
+ "gitHead": "0991cca0228700718ae27f309495a2afe3b67634"
106
106
  }