@helsenorge/designsystem-react 6.6.0 → 6.6.2

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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,19 @@
1
+ ## [6.6.1](https://github.com/helsenorge/designsystem/branchCompare?baseVersion=GTv6.6.0&targetVersion=GTv6.6.1) (2024-03-19)
2
+
3
+ ### Bug Fixes
4
+
5
+ - reactdaypicker styling eksporterer riktig
6
+ ([45352f0](https://github.com/helsenorge/designsystem/commit/45352f099804e22af77d6ee5c8e903865151ed2d)), closes
7
+ [#322222](https://github.com/helsenorge/designsystem/issues/322222)
8
+
9
+ ## [6.6.0](https://github.com/helsenorge/designsystem/branchCompare?baseVersion=GTv6.5.0&targetVersion=GTv6.6.0) (2024-03-15)
10
+
11
+ ### Features
12
+
13
+ - zindex med prop lagt til i datepicker dropdown expander og popover
14
+ ([915fabc](https://github.com/helsenorge/designsystem/commit/915fabcb890fe3d339d874a74701fbadb606dcc9)), closes
15
+ [#309420](https://github.com/helsenorge/designsystem/issues/309420)
16
+
1
17
  ## [6.5.0](https://github.com/helsenorge/designsystem/branchCompare?baseVersion=GTv6.4.0&targetVersion=GTv6.5.0) (2024-03-07)
2
18
 
3
19
  ### Features
@@ -7,10 +7,6 @@
7
7
  .expander {
8
8
  $item: &;
9
9
 
10
- @media (prefers-reduced-motion: no-preference) {
11
- animation: fade-in 150ms linear forwards;
12
- }
13
-
14
10
  &:first-of-type {
15
11
  border-top: 1px solid $neutral500;
16
12
  }
@@ -141,19 +137,3 @@
141
137
  }
142
138
  }
143
139
  }
144
-
145
- @keyframes fade-in {
146
- 0% {
147
- opacity: 0;
148
- max-height: 0;
149
- }
150
-
151
- 99% {
152
- max-height: 24rem;
153
- }
154
-
155
- 100% {
156
- opacity: 1;
157
- max-height: none;
158
- }
159
- }
@@ -17,7 +17,6 @@ export type Styles = {
17
17
  'expander__title--4-and-lower': string;
18
18
  'expander__title--expanded': string;
19
19
  'expander__title--print': string;
20
- 'fade-in': string;
21
20
  };
22
21
 
23
22
  export type ClassNames = keyof Styles;
@@ -1,5 +1,7 @@
1
1
  import React from 'react';
2
2
  import { StoryObj } from '@storybook/react';
3
+ import LazyIcon from '../LazyIcon';
4
+ import Icon from '.';
3
5
  declare const meta: {
4
6
  title: string;
5
7
  component: React.ForwardRefExoticComponent<import("./Icon").IconProps & React.RefAttributes<SVGSVGElement>>;
@@ -28,8 +30,9 @@ declare const meta: {
28
30
  };
29
31
  };
30
32
  export default meta;
31
- type Story = StoryObj<typeof meta>;
33
+ type Story = StoryObj<typeof Icon>;
32
34
  export declare const Default: Story;
33
35
  export declare const Accessibility: Story;
34
- export declare const IconWall: Story;
36
+ type LazyIconStory = StoryObj<typeof LazyIcon>;
37
+ export declare const IconWall: LazyIconStory;
35
38
  //# sourceMappingURL=Icon.stories.d.ts.map
@@ -1,77 +1,89 @@
1
- import t, { useRef as s, useState as g } from "react";
2
- import a from "classnames";
3
- import { IconSize as I, AnalyticsId as w } from "../../constants.js";
4
- import { useBreakpoint as H } from "../../hooks/useBreakpoint.js";
5
- import { useHover as z } from "../../hooks/useHover.js";
6
- import { useOutsideEvent as A } from "../../hooks/useOutsideEvent.js";
7
- import { getColor as M } from "../../theme/currys/color.js";
8
- import { breakpoints as P } from "../../theme/grid.js";
9
- import { isComponent as T } from "../../utils/component.js";
10
- import $ from "../Close/Close.js";
11
- import { Icon as x } from "../Icon/Icon.js";
12
- import D from "../Icons/VerticalDots.js";
13
- import G from "../LinkList/LinkList.js";
14
- import W from "../PopOver/PopOver.js";
1
+ import o, { useRef as a, useState as A } from "react";
2
+ import p from "classnames";
3
+ import { IconSize as k, AnalyticsId as M } from "../../constants.js";
4
+ import { useBreakpoint as P } from "../../hooks/useBreakpoint.js";
5
+ import { useHover as T } from "../../hooks/useHover.js";
6
+ import { useOutsideEvent as $ } from "../../hooks/useOutsideEvent.js";
7
+ import { getColor as x } from "../../theme/currys/color.js";
8
+ import { breakpoints as D } from "../../theme/grid.js";
9
+ import { isComponent as v } from "../../utils/component.js";
10
+ import G from "../Close/Close.js";
11
+ import { Icon as W } from "../Icon/Icon.js";
12
+ import X from "../Icons/VerticalDots.js";
13
+ import I from "../LinkList/LinkList.js";
14
+ import j from "../PopOver/PopOver.js";
15
15
  import r from "./styles.module.scss";
16
- var X = /* @__PURE__ */ ((e) => (e.onWhite = "on-white", e.onGray = "on-gray", e.onBlueberry = "on-blueberry", e))(X || {});
17
- const j = (e) => {
18
- const l = s(null), m = s(null), p = s(null), [n, i] = g(!1), {
19
- children: c,
20
- popOverClassName: C,
21
- popMenuClassName: k,
22
- openButtonTestId: B,
23
- closeButtonTestId: N,
24
- popOverTestId: y,
25
- popMenuVariant: u = "on-white",
26
- openButtonAriaLabel: O,
27
- closeButtonAriaLabel: h
28
- } = e, f = a(r["pop-menu-button"], {
29
- [r[`pop-menu-button--${u}`]]: u
30
- }), d = H() < P.md;
31
- A(p, () => i(!n));
32
- const { isHovered: E } = z(m), R = d ? I.XSmall : I.Small, S = () => {
33
- if (T(c, G))
34
- return /* @__PURE__ */ t.createElement(
35
- W,
16
+ var q = /* @__PURE__ */ ((n) => (n.onWhite = "on-white", n.onGray = "on-gray", n.onBlueberry = "on-blueberry", n))(q || {});
17
+ const F = (n) => {
18
+ const m = a(null), i = a(null), c = a(null), [s, l] = A(!1), {
19
+ children: u,
20
+ popOverClassName: B,
21
+ popMenuClassName: N,
22
+ openButtonTestId: y,
23
+ closeButtonTestId: E,
24
+ popOverTestId: O,
25
+ popMenuVariant: f = "on-white",
26
+ openButtonAriaLabel: h,
27
+ closeButtonAriaLabel: L
28
+ } = n, d = p(r["pop-menu-button"], {
29
+ [r[`pop-menu-button--${f}`]]: f
30
+ }), b = P() < D.md;
31
+ $(c, () => l(!s));
32
+ const { isHovered: R } = T(i), S = b ? k.XSmall : k.Small, _ = (e) => {
33
+ l(!1), e && e();
34
+ }, g = () => {
35
+ if (v(u, I))
36
+ return /* @__PURE__ */ o.createElement(
37
+ j,
36
38
  {
37
- testId: y,
38
- className: a(r["pop-menu__pop-over"], C),
39
+ testId: O,
40
+ className: p(r["pop-menu__pop-over"], B),
39
41
  arrowClassName: r["pop-menu__pop-over-arrow"],
40
- controllerRef: l,
41
- popOverRef: p
42
+ controllerRef: m,
43
+ popOverRef: c
42
44
  },
43
- c
45
+ o.Children.map(
46
+ u,
47
+ (e) => o.cloneElement(e, {
48
+ children: o.Children.map(
49
+ e.props.children,
50
+ (t) => v(t, I.Link) ? o.cloneElement(t, {
51
+ onClick: (z) => _(() => t.props.onClick && t.props.onClick(z))
52
+ }) : t
53
+ )
54
+ })
55
+ )
44
56
  );
45
- }, b = (o, v) => {
46
- v && v.stopPropagation(), i(o);
47
- }, _ = /* @__PURE__ */ t.createElement(
57
+ }, C = (e, t) => {
58
+ t && t.stopPropagation(), l(e);
59
+ }, w = /* @__PURE__ */ o.createElement(
48
60
  "button",
49
61
  {
50
- ref: m,
51
- "data-testid": B,
52
- className: f,
53
- "aria-label": O || "Se mer",
54
- onClick: (o) => b(!0, o),
62
+ ref: i,
63
+ "data-testid": y,
64
+ className: d,
65
+ "aria-label": h || "Se mer",
66
+ onClick: (e) => C(!0, e),
55
67
  type: "button"
56
68
  },
57
- /* @__PURE__ */ t.createElement(x, { svgIcon: D, className: "test", color: M("black"), size: R, isHovered: E })
58
- ), L = /* @__PURE__ */ t.createElement(
59
- $,
69
+ /* @__PURE__ */ o.createElement(W, { svgIcon: X, className: "test", color: x("black"), size: S, isHovered: R })
70
+ ), H = /* @__PURE__ */ o.createElement(
71
+ G,
60
72
  {
61
- ariaLabel: h,
73
+ ariaLabel: L,
62
74
  color: "black",
63
- className: f,
64
- testId: N,
65
- ref: l,
66
- onClick: (o) => b(!1, o),
67
- small: d
75
+ className: d,
76
+ testId: E,
77
+ ref: m,
78
+ onClick: (e) => C(!1, e),
79
+ small: b
68
80
  }
69
81
  );
70
- return /* @__PURE__ */ t.createElement("div", { className: a(r["pop-menu-button"], k), "data-analyticsid": w.PopMenu }, n ? L : _, n && S());
71
- }, le = j;
82
+ return /* @__PURE__ */ o.createElement("div", { className: p(r["pop-menu-button"], N), "data-analyticsid": M.PopMenu }, s ? H : w, s && g());
83
+ }, me = F;
72
84
  export {
73
- j as PopMenu,
74
- X as PopMenuVariant,
75
- le as default
85
+ F as PopMenu,
86
+ q as PopMenuVariant,
87
+ me as default
76
88
  };
77
89
  //# sourceMappingURL=PopMenu.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PopMenu.js","sources":["../../../src/components/PopMenu/PopMenu.tsx"],"sourcesContent":["import React, { useRef, useState } from 'react';\n\nimport classNames from 'classnames';\n\nimport { AnalyticsId, IconSize } from '../../constants';\nimport { useBreakpoint } from '../../hooks/useBreakpoint';\nimport { useHover } from '../../hooks/useHover';\nimport { useOutsideEvent } from '../../hooks/useOutsideEvent';\nimport { getColor } from '../../theme/currys';\nimport { breakpoints } from '../../theme/grid';\nimport { isComponent } from '../../utils/component';\nimport Close from '../Close';\nimport Icon from '../Icon';\nimport VerticalDots from '../Icons/VerticalDots';\nimport LinkList, { LinkListProps } from '../LinkList';\nimport PopOver from '../PopOver';\n\nimport styles from './styles.module.scss';\n\nexport enum PopMenuVariant {\n onWhite = 'on-white',\n onGray = 'on-gray',\n onBlueberry = 'on-blueberry',\n}\n\nexport interface PopMenuProps {\n /** Content shown inside PopOver. Can only be a LinkList */\n children: React.ReactElement<LinkListProps>;\n /** Adds custom classes to the popover element. */\n popOverClassName?: string;\n /** Adds custom classes to the element. */\n popMenuClassName?: string;\n /** Changes responsive design for the trigger buttons. */\n popMenuVariant?: PopMenuVariant;\n /** Sets the data-testid attribute for the button that opens. */\n openButtonTestId?: string;\n /** Sets the data-testid attribute for the button that closes. */\n closeButtonTestId?: string;\n /** Sets the data-testid attribute for the popover. */\n popOverTestId?: string;\n /** Sets the arial-label attribute for the openButton. */\n openButtonAriaLabel?: string;\n /** Sets the arial-label attribute for the closeButton. */\n closeButtonAriaLabel?: string;\n}\n\nexport const PopMenu: React.FC<PopMenuProps> = (props: PopMenuProps) => {\n const closeRef = useRef<HTMLButtonElement>(null);\n const openRef = useRef<HTMLButtonElement>(null);\n const popOverRef = useRef<HTMLDivElement>(null);\n const [isOpen, setIsOpen] = useState(false);\n const {\n children,\n popOverClassName,\n popMenuClassName,\n openButtonTestId,\n closeButtonTestId,\n popOverTestId,\n popMenuVariant = PopMenuVariant.onWhite,\n openButtonAriaLabel,\n closeButtonAriaLabel,\n } = props;\n const buttonClasses = classNames(styles['pop-menu-button'], {\n [styles[`pop-menu-button--${popMenuVariant}`]]: popMenuVariant,\n });\n const breakpoint = useBreakpoint();\n const mobile = breakpoint < breakpoints.md;\n useOutsideEvent(popOverRef, () => setIsOpen(!isOpen));\n const { isHovered: openButtonIsHovered } = useHover(openRef);\n const mobileIconSize = mobile ? IconSize.XSmall : IconSize.Small;\n\n const renderChildren = () => {\n if (isComponent<LinkListProps>(children, LinkList)) {\n return (\n <PopOver\n testId={popOverTestId}\n className={classNames(styles['pop-menu__pop-over'], popOverClassName)}\n arrowClassName={styles['pop-menu__pop-over-arrow']}\n controllerRef={closeRef}\n popOverRef={popOverRef}\n >\n {children}\n </PopOver>\n );\n }\n };\n\n const handleOnClick = (isOpen: boolean, e?: React.MouseEvent<HTMLElement, MouseEvent>): void => {\n e && e.stopPropagation();\n setIsOpen(isOpen);\n };\n\n const openButton = (\n <button\n ref={openRef}\n data-testid={openButtonTestId}\n className={buttonClasses}\n aria-label={openButtonAriaLabel || 'Se mer'}\n onClick={(e?: React.MouseEvent<HTMLElement, MouseEvent>) => handleOnClick(true, e)}\n type=\"button\"\n >\n <Icon svgIcon={VerticalDots} className=\"test\" color={getColor('black')} size={mobileIconSize} isHovered={openButtonIsHovered} />\n </button>\n );\n\n const closeButton = (\n <Close\n ariaLabel={closeButtonAriaLabel}\n color=\"black\"\n className={buttonClasses}\n testId={closeButtonTestId}\n ref={closeRef}\n onClick={(e?: React.MouseEvent<HTMLElement, MouseEvent>) => handleOnClick(false, e)}\n small={mobile}\n />\n );\n\n return (\n <div className={classNames(styles['pop-menu-button'], popMenuClassName)} data-analyticsid={AnalyticsId.PopMenu}>\n {!isOpen ? openButton : closeButton}\n {isOpen && renderChildren()}\n </div>\n );\n};\n\nexport default PopMenu;\n"],"names":["PopMenuVariant","PopMenu","props","closeRef","useRef","openRef","popOverRef","isOpen","setIsOpen","useState","children","popOverClassName","popMenuClassName","openButtonTestId","closeButtonTestId","popOverTestId","popMenuVariant","openButtonAriaLabel","closeButtonAriaLabel","buttonClasses","classNames","styles","mobile","useBreakpoint","breakpoints","useOutsideEvent","openButtonIsHovered","useHover","mobileIconSize","IconSize","renderChildren","isComponent","LinkList","React","PopOver","handleOnClick","e","openButton","Icon","VerticalDots","getColor","closeButton","Close","AnalyticsId","PopMenu$1"],"mappings":";;;;;;;;;;;;;;;AAmBY,IAAAA,sBAAAA,OACVA,EAAA,UAAU,YACVA,EAAA,SAAS,WACTA,EAAA,cAAc,gBAHJA,IAAAA,KAAA,CAAA,CAAA;AA2BC,MAAAC,IAAkC,CAACC,MAAwB;AAChE,QAAAC,IAAWC,EAA0B,IAAI,GACzCC,IAAUD,EAA0B,IAAI,GACxCE,IAAaF,EAAuB,IAAI,GACxC,CAACG,GAAQC,CAAS,IAAIC,EAAS,EAAK,GACpC;AAAA,IACJ,UAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,eAAAC;AAAA,IACA,gBAAAC,IAAiB;AAAA,IACjB,qBAAAC;AAAA,IACA,sBAAAC;AAAA,EACE,IAAAhB,GACEiB,IAAgBC,EAAWC,EAAO,iBAAiB,GAAG;AAAA,IAC1D,CAACA,EAAO,oBAAoBL,CAAc,EAAE,CAAC,GAAGA;AAAA,EAAA,CACjD,GAEKM,IADaC,MACSC,EAAY;AACxC,EAAAC,EAAgBnB,GAAY,MAAME,EAAU,CAACD,CAAM,CAAC;AACpD,QAAM,EAAE,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,KAAe3C;"}
1
+ {"version":3,"file":"PopMenu.js","sources":["../../../src/components/PopMenu/PopMenu.tsx"],"sourcesContent":["import React, { useRef, useState } from 'react';\n\nimport classNames from 'classnames';\n\nimport { AnalyticsId, IconSize } from '../../constants';\nimport { useBreakpoint } from '../../hooks/useBreakpoint';\nimport { useHover } from '../../hooks/useHover';\nimport { useOutsideEvent } from '../../hooks/useOutsideEvent';\nimport { getColor } from '../../theme/currys';\nimport { breakpoints } from '../../theme/grid';\nimport { isComponent } from '../../utils/component';\nimport Close from '../Close';\nimport Icon from '../Icon';\nimport VerticalDots from '../Icons/VerticalDots';\nimport LinkList, { LinkListProps, LinkProps } from '../LinkList';\nimport PopOver from '../PopOver';\n\nimport styles from './styles.module.scss';\n\nexport enum PopMenuVariant {\n onWhite = 'on-white',\n onGray = 'on-gray',\n onBlueberry = 'on-blueberry',\n}\n\nexport interface PopMenuProps {\n /** Content shown inside PopOver. Can only be a LinkList */\n children: React.ReactElement<LinkListProps>;\n /** Adds custom classes to the popover element. */\n popOverClassName?: string;\n /** Adds custom classes to the element. */\n popMenuClassName?: string;\n /** Changes responsive design for the trigger buttons. */\n popMenuVariant?: PopMenuVariant;\n /** Sets the data-testid attribute for the button that opens. */\n openButtonTestId?: string;\n /** Sets the data-testid attribute for the button that closes. */\n closeButtonTestId?: string;\n /** Sets the data-testid attribute for the popover. */\n popOverTestId?: string;\n /** Sets the arial-label attribute for the openButton. */\n openButtonAriaLabel?: string;\n /** Sets the arial-label attribute for the closeButton. */\n closeButtonAriaLabel?: string;\n}\n\nexport const PopMenu: React.FC<PopMenuProps> = (props: PopMenuProps) => {\n const closeRef = useRef<HTMLButtonElement>(null);\n const openRef = useRef<HTMLButtonElement>(null);\n const popOverRef = useRef<HTMLDivElement>(null);\n const [isOpen, setIsOpen] = useState(false);\n const {\n children,\n popOverClassName,\n popMenuClassName,\n openButtonTestId,\n closeButtonTestId,\n popOverTestId,\n popMenuVariant = PopMenuVariant.onWhite,\n openButtonAriaLabel,\n closeButtonAriaLabel,\n } = props;\n const buttonClasses = classNames(styles['pop-menu-button'], {\n [styles[`pop-menu-button--${popMenuVariant}`]]: popMenuVariant,\n });\n const breakpoint = useBreakpoint();\n const mobile = breakpoint < breakpoints.md;\n useOutsideEvent(popOverRef, () => setIsOpen(!isOpen));\n const { isHovered: openButtonIsHovered } = useHover(openRef);\n const mobileIconSize = mobile ? IconSize.XSmall : IconSize.Small;\n\n const handleClick = (cb?: () => void): void => {\n setIsOpen(false);\n cb && cb();\n };\n\n const renderChildren = () => {\n if (isComponent<LinkListProps>(children, LinkList)) {\n return (\n <PopOver\n testId={popOverTestId}\n className={classNames(styles['pop-menu__pop-over'], popOverClassName)}\n arrowClassName={styles['pop-menu__pop-over-arrow']}\n controllerRef={closeRef}\n popOverRef={popOverRef}\n >\n {React.Children.map(children, child =>\n React.cloneElement(child, {\n children: React.Children.map(child.props.children, child =>\n isComponent<LinkProps>(child, LinkList.Link)\n ? React.cloneElement(child, {\n onClick: (event: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement>) =>\n handleClick(() => child.props.onClick && child.props.onClick(event)),\n })\n : child\n ),\n })\n )}\n </PopOver>\n );\n }\n };\n\n const handleOnClick = (isOpen: boolean, e?: React.MouseEvent<HTMLElement, MouseEvent>): void => {\n e && e.stopPropagation();\n setIsOpen(isOpen);\n };\n\n const openButton = (\n <button\n ref={openRef}\n data-testid={openButtonTestId}\n className={buttonClasses}\n aria-label={openButtonAriaLabel || 'Se mer'}\n onClick={(e): void => handleOnClick(true, e)}\n type=\"button\"\n >\n <Icon svgIcon={VerticalDots} className=\"test\" color={getColor('black')} size={mobileIconSize} isHovered={openButtonIsHovered} />\n </button>\n );\n\n const closeButton = (\n <Close\n ariaLabel={closeButtonAriaLabel}\n color=\"black\"\n className={buttonClasses}\n testId={closeButtonTestId}\n ref={closeRef}\n onClick={(e): void => handleOnClick(false, e)}\n small={mobile}\n />\n );\n\n return (\n <div className={classNames(styles['pop-menu-button'], popMenuClassName)} data-analyticsid={AnalyticsId.PopMenu}>\n {!isOpen ? openButton : closeButton}\n {isOpen && renderChildren()}\n </div>\n );\n};\n\nexport default PopMenu;\n"],"names":["PopMenuVariant","PopMenu","props","closeRef","useRef","openRef","popOverRef","isOpen","setIsOpen","useState","children","popOverClassName","popMenuClassName","openButtonTestId","closeButtonTestId","popOverTestId","popMenuVariant","openButtonAriaLabel","closeButtonAriaLabel","buttonClasses","classNames","styles","mobile","useBreakpoint","breakpoints","useOutsideEvent","openButtonIsHovered","useHover","mobileIconSize","IconSize","handleClick","cb","renderChildren","isComponent","LinkList","React","PopOver","child","event","handleOnClick","e","openButton","Icon","VerticalDots","getColor","closeButton","Close","AnalyticsId","PopMenu$1"],"mappings":";;;;;;;;;;;;;;;AAmBY,IAAAA,sBAAAA,OACVA,EAAA,UAAU,YACVA,EAAA,SAAS,WACTA,EAAA,cAAc,gBAHJA,IAAAA,KAAA,CAAA,CAAA;AA2BC,MAAAC,IAAkC,CAACC,MAAwB;AAChE,QAAAC,IAAWC,EAA0B,IAAI,GACzCC,IAAUD,EAA0B,IAAI,GACxCE,IAAaF,EAAuB,IAAI,GACxC,CAACG,GAAQC,CAAS,IAAIC,EAAS,EAAK,GACpC;AAAA,IACJ,UAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,eAAAC;AAAA,IACA,gBAAAC,IAAiB;AAAA,IACjB,qBAAAC;AAAA,IACA,sBAAAC;AAAA,EACE,IAAAhB,GACEiB,IAAgBC,EAAWC,EAAO,iBAAiB,GAAG;AAAA,IAC1D,CAACA,EAAO,oBAAoBL,CAAc,EAAE,CAAC,GAAGA;AAAA,EAAA,CACjD,GAEKM,IADaC,MACSC,EAAY;AACxC,EAAAC,EAAgBnB,GAAY,MAAME,EAAU,CAACD,CAAM,CAAC;AACpD,QAAM,EAAE,WAAWmB,EAAoB,IAAIC,EAAStB,CAAO,GACrDuB,IAAiBN,IAAS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AAAA,EAAA,GAI5HmB,IACJV,gBAAAA,EAAA;AAAA,IAACW;AAAA,IAAA;AAAA,MACC,WAAW5B;AAAA,MACX,OAAM;AAAA,MACN,WAAWC;AAAA,MACX,QAAQL;AAAA,MACR,KAAKX;AAAA,MACL,SAAS,CAAC,MAAYoC,EAAc,IAAO,CAAC;AAAA,MAC5C,OAAOjB;AAAA,IAAA;AAAA,EAAA;AAIX,yCACG,OAAI,EAAA,WAAWF,EAAWC,EAAO,iBAAiB,GAAGT,CAAgB,GAAG,oBAAkBmC,EAAY,WACnGxC,IAAsBsC,IAAbJ,GACVlC,KAAUyB,GACb;AAEJ,GAEAgB,KAAe/C;"}
package/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  "url": "git+https://github.com/helsenorge/designsystem.git"
8
8
  },
9
9
  "homepage": "https://helsenorge.design",
10
- "version": "6.6.0",
10
+ "version": "6.6.2",
11
11
  "author": "Helsenorge",
12
12
  "license": "MIT",
13
13
  "peerDependencies": {