@helsenorge/designsystem-react 7.0.0 → 7.1.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 (135) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/_virtual/_cloneBuffer.js +5 -0
  3. package/_virtual/_cloneBuffer.js.map +1 -0
  4. package/_virtual/_commonjs-dynamic-modules.js +7 -0
  5. package/_virtual/_commonjs-dynamic-modules.js.map +1 -0
  6. package/_virtual/_commonjsHelpers.js +9 -0
  7. package/_virtual/_commonjsHelpers.js.map +1 -0
  8. package/_virtual/_nodeUtil.js +5 -0
  9. package/_virtual/_nodeUtil.js.map +1 -0
  10. package/_virtual/assert.js +5 -0
  11. package/_virtual/assert.js.map +1 -0
  12. package/_virtual/ast.js +5 -0
  13. package/_virtual/ast.js.map +1 -0
  14. package/_virtual/code.js +5 -0
  15. package/_virtual/code.js.map +1 -0
  16. package/_virtual/doctrine.js +5 -0
  17. package/_virtual/doctrine.js.map +1 -0
  18. package/_virtual/errors.js +5 -0
  19. package/_virtual/errors.js.map +1 -0
  20. package/_virtual/index.js +5 -0
  21. package/_virtual/index.js.map +1 -0
  22. package/_virtual/index2.js +5 -0
  23. package/_virtual/index2.js.map +1 -0
  24. package/_virtual/index3.js +5 -0
  25. package/_virtual/index3.js.map +1 -0
  26. package/_virtual/inherits_browser.js +5 -0
  27. package/_virtual/inherits_browser.js.map +1 -0
  28. package/_virtual/isBuffer.js +5 -0
  29. package/_virtual/isBuffer.js.map +1 -0
  30. package/_virtual/keyword.js +5 -0
  31. package/_virtual/keyword.js.map +1 -0
  32. package/_virtual/memoizerific.js +5 -0
  33. package/_virtual/memoizerific.js.map +1 -0
  34. package/_virtual/typed.js +5 -0
  35. package/_virtual/typed.js.map +1 -0
  36. package/_virtual/types.js +5 -0
  37. package/_virtual/types.js.map +1 -0
  38. package/_virtual/util.js +5 -0
  39. package/_virtual/util.js.map +1 -0
  40. package/_virtual/utility.js +5 -0
  41. package/_virtual/utility.js.map +1 -0
  42. package/_virtual/utils.js +5 -0
  43. package/_virtual/utils.js.map +1 -0
  44. package/components/AnchorLink/AnchorLink.js +1 -1
  45. package/components/Avatar/Avatar.js +1 -1
  46. package/components/Badge/Badge.d.ts +1 -1
  47. package/components/Badge/Badge.js +14 -18
  48. package/components/Badge/Badge.js.map +1 -1
  49. package/components/Badge/Badge.stories.d.ts +2 -1
  50. package/components/Badge/styles.module.scss +6 -18
  51. package/components/Badge/styles.module.scss.d.ts +0 -4
  52. package/components/Button/Button.js +1 -1
  53. package/components/Button/Button.stories.d.ts +1 -0
  54. package/components/Checkbox/Checkbox.js +1 -1
  55. package/components/Close/Close.js +1 -1
  56. package/components/DictionaryTrigger/DictionaryTrigger.js +1 -1
  57. package/components/Dropdown/Dropdown.d.ts +7 -7
  58. package/components/Dropdown/Dropdown.js +46 -47
  59. package/components/Dropdown/Dropdown.js.map +1 -1
  60. package/components/Dropdown/Dropdown.stories.d.ts +4 -0
  61. package/components/Duolist/Duolist.js +1 -1
  62. package/components/EmptyState/EmptyState.js +1 -1
  63. package/components/EmptyState/NobodyHome.js +1 -1
  64. package/components/ErrorWrapper/ErrorWrapper.js +1 -1
  65. package/components/Expander/Expander.js +1 -1
  66. package/components/ExpanderHierarchy/Expander.js +1 -1
  67. package/components/ExpanderHierarchy/ExpanderButton.js +1 -1
  68. package/components/ExpanderHierarchy/ExpanderHierarchy.js +1 -1
  69. package/components/ExpanderList/ExpanderList.js +1 -1
  70. package/components/FormGroup/FormGroup.js +1 -1
  71. package/components/FormLayout/FormLayout.js +1 -1
  72. package/components/GridExample/GridExample.d.ts +5 -1
  73. package/components/GridExample/GridExample.js +7 -3
  74. package/components/GridExample/GridExample.js.map +1 -1
  75. package/components/HelpBubble/HelpBubble.js +1 -1
  76. package/components/HelpBubble/HelpBubble.stories.d.ts +4 -0
  77. package/components/HelpPanel/HelpPanel.js +1 -1
  78. package/components/HelpQuestion/HelpQuestion.js +1 -1
  79. package/components/HighlightBox/HighlightBox.js +1 -1
  80. package/components/HorizontalScroll/HorizontalScroll.js +1 -1
  81. package/components/Input/Input.js +1 -1
  82. package/components/Label/Label.js +1 -1
  83. package/components/Label/SubLabel.js +1 -1
  84. package/components/LinkList/LinkList.js +1 -1
  85. package/components/List/List.js +1 -1
  86. package/components/ListHeader/ListHeader.js +1 -1
  87. package/components/ListHeader/ListHeaderText/ListHeaderText.js +1 -1
  88. package/components/Loader/Loader.js +1 -1
  89. package/components/MaxCharacters/MaxCharacters.js +1 -1
  90. package/components/Modal/Modal.js +1 -1
  91. package/components/Modal/Modal.stories.d.ts +4 -0
  92. package/components/NotificationPanel/DetailButton/DetailButton.js +1 -1
  93. package/components/NotificationPanel/NotificationPanel.js +1 -1
  94. package/components/Panel/Panel.js +1 -1
  95. package/components/PanelList/PanelList.js +1 -1
  96. package/components/PopMenu/PopMenu.js +1 -1
  97. package/components/PopMenu/PopMenu.stories.d.ts +4 -0
  98. package/components/PopOver/PopOver.js +1 -1
  99. package/components/PopOver/PopOver.stories.d.ts +5 -0
  100. package/components/PromoPanel/PromoPanel.js +1 -1
  101. package/components/RadioButton/RadioButton.js +1 -1
  102. package/components/Select/Select.js +1 -1
  103. package/components/ServiceMessage/ServiceMessage.js +1 -1
  104. package/components/SharingStatus/SharingStatus.js +1 -1
  105. package/components/Slider/Slider.js +1 -1
  106. package/components/Spacer/Spacer.js +1 -1
  107. package/components/StatusDot/StatusDot.js +1 -1
  108. package/components/Step/Step.js +1 -1
  109. package/components/StepButtons/StepButtons.js +1 -1
  110. package/components/Stepper/Dot.js +1 -1
  111. package/components/Stepper/Stepper.js +1 -1
  112. package/components/Table/Table.js +1 -1
  113. package/components/Table/TableBody/TableBody.js +1 -1
  114. package/components/Table/TableCell/TableCell.js +1 -1
  115. package/components/Table/TableExpandedRow/TableExpandedRow.js +1 -1
  116. package/components/Table/TableExpanderCell/TableExpanderCell.js +1 -1
  117. package/components/Table/TableExpanderCell/TableExpanderCellMobile.js +1 -1
  118. package/components/Table/TableHead/TableHead.js +1 -1
  119. package/components/Table/TableHeadCell/TableHeadCell.js +1 -1
  120. package/components/Table/TableRow/TableRow.js +1 -1
  121. package/components/Table/utils.js +1 -1
  122. package/components/Tag/Tag.js +1 -1
  123. package/components/TagList/TagList.js +1 -1
  124. package/components/Textarea/Textarea.js +1 -1
  125. package/components/Tile/Tile.js +1 -1
  126. package/components/Title/Title.js +1 -1
  127. package/components/Tooltip/Tooltip.stories.d.ts +4 -0
  128. package/components/Tooltip/TooltipWord/TooltipWord.js +1 -1
  129. package/components/Trigger/Trigger.js +1 -1
  130. package/components/Validation/Validation.js +1 -1
  131. package/components/Validation/ValidationSummary.js +1 -1
  132. package/docs/index.d.ts +7 -0
  133. package/docs/index.js +9 -0
  134. package/docs/index.js.map +1 -0
  135. package/package.json +1 -1
@@ -12,7 +12,7 @@ import { Icon as W } from "../Icon/Icon.js";
12
12
  import X from "../Icons/VerticalDots.js";
13
13
  import I from "../LinkList/LinkList.js";
14
14
  import j from "../PopOver/PopOver.js";
15
- import r from "./styles.module.scss";
15
+ import r from "../PopMenu/styles.module.scss";
16
16
  var q = /* @__PURE__ */ ((n) => (n.onWhite = "on-white", n.onGray = "on-gray", n.onBlueberry = "on-blueberry", n))(q || {});
17
17
  const F = (n) => {
18
18
  const m = a(null), i = a(null), c = a(null), [s, l] = A(!1), {
@@ -9,6 +9,10 @@ declare const meta: {
9
9
  description: {
10
10
  component: string;
11
11
  };
12
+ story: {
13
+ inline: boolean;
14
+ iframeHeight: string;
15
+ };
12
16
  };
13
17
  };
14
18
  args: {
@@ -7,7 +7,7 @@ import { useIsVisible as j } from "../../hooks/useIsVisible.js";
7
7
  import { useLayoutEvent as k } from "../../hooks/useLayoutEvent.js";
8
8
  import { useSize as q } from "../../hooks/useSize.js";
9
9
  import { mergeRefs as D } from "../../utils/refs.js";
10
- import r from "./styles.module.scss";
10
+ import r from "../PopOver/styles.module.scss";
11
11
  var G = /* @__PURE__ */ ((e) => (e.positionautomatic = "positionautomatic", e.positionbelow = "positionbelow", e.positionabove = "positionabove", e))(G || {});
12
12
  const d = t.forwardRef((e, w) => {
13
13
  const {
@@ -9,6 +9,11 @@ declare const meta: {
9
9
  description: {
10
10
  component: string;
11
11
  };
12
+ page: () => React.JSX.Element;
13
+ story: {
14
+ inline: boolean;
15
+ height: string;
16
+ };
12
17
  };
13
18
  };
14
19
  args: {
@@ -9,7 +9,7 @@ import E from "../Icons/ArrowRight.js";
9
9
  import _ from "../Icons/ArrowUpRight.js";
10
10
  import v from "../LazyIllustration/LazyIllustration.js";
11
11
  import y from "../Title/Title.js";
12
- import n from "./styles.module.scss";
12
+ import n from "../PromoPanel/styles.module.scss";
13
13
  const I = (e) => e.linkComponent ? t.cloneElement(e.linkComponent, { children: e.children }) : e.linkHtmlMarkup === "button" ? /* @__PURE__ */ t.createElement("button", { type: "button", onClick: e.linkOnClick }, e.children) : /* @__PURE__ */ t.createElement("a", { href: e.href, target: e.target, onClick: e.linkOnClick }, e.children), N = (e) => {
14
14
  const { isHovered: c, hoverRef: u } = b(), { color: l = "neutral", titleHtmlMarkup: k = "h2", linkHtmlMarkup: f = "a" } = e, r = P(), s = h(
15
15
  n.promopanel,
@@ -6,7 +6,7 @@ import { useUuid as H } from "../../hooks/useUuid.js";
6
6
  import { isMutableRefObject as J, mergeRefs as K } from "../../utils/refs.js";
7
7
  import { uuid as Q } from "../../utils/uuid.js";
8
8
  import { getLabelText as V, renderLabelAsParent as X } from "../Label/Label.js";
9
- import e from "./styles.module.scss";
9
+ import e from "../RadioButton/styles.module.scss";
10
10
  const ie = (s, o, a, b) => {
11
11
  const n = o === "oninvalid", r = s === b;
12
12
  return l({
@@ -7,7 +7,7 @@ import M from "../ErrorWrapper/ErrorWrapper.js";
7
7
  import { Icon as U } from "../Icon/Icon.js";
8
8
  import V from "../Icons/ChevronDown.js";
9
9
  import { renderLabel as X } from "../Label/Label.js";
10
- import e from "./styles.module.scss";
10
+ import e from "../Select/styles.module.scss";
11
11
  const j = (o) => `calc(${o * H}px + 2rem)`, B = (o, t) => t ? y("neutral", 500) : y(o ? "cherry" : "blueberry", 600), G = r.forwardRef(function(t, c) {
12
12
  const {
13
13
  className: C,
@@ -18,7 +18,7 @@ import j from "../Icons/Forward.js";
18
18
  import B from "../Icons/InfoSignFill.js";
19
19
  import q from "../Icons/TriangleX.js";
20
20
  import D from "../Icons/X.js";
21
- import r from "./styles.module.scss";
21
+ import r from "../ServiceMessage/styles.module.scss";
22
22
  const G = ({ label: c, variant: l, id: m, hasExpander: s, isExpanded: i, dismissable: g, onExpand: v, onDismiss: f, closeBtnText: _ }) => {
23
23
  const d = w(), { isHovered: o, hoverRef: p } = h(), a = d < M.lg ? N.XSmall : N.Small, C = {
24
24
  info: /* @__PURE__ */ e.createElement(n, { svgIcon: B, color: t.blueberry700, hoverColor: t.blueberry700, size: a, isHovered: o }),
@@ -3,7 +3,7 @@ import a from "classnames";
3
3
  import { AnalyticsId as d, IconSize as h } from "../../constants.js";
4
4
  import { palette as _ } from "../../theme/palette.js";
5
5
  import { Icon as g } from "../Icon/Icon.js";
6
- import s from "./styles.module.scss";
6
+ import s from "../SharingStatus/styles.module.scss";
7
7
  const S = (r) => {
8
8
  const { color: e = "blueberry", icon: l, children: n, className: o, testId: c, wrapText: i } = r, m = a(s["sharing-status"], o), u = a(s["sharing-status__dot"], s[`sharing-status__dot--${e}`]), p = a(s["sharing-status__label"], s[`sharing-status__label--${e}`], {
9
9
  [s["sharing-status__label--wrap"]]: i
@@ -5,7 +5,7 @@ import { useSize as x } from "../../hooks/useSize.js";
5
5
  import { useUuid as C } from "../../hooks/useUuid.js";
6
6
  import { getAriaLabelAttributes as V } from "../../utils/accessibility.js";
7
7
  import ee from "../Title/Title.js";
8
- import n from "./styles.module.scss";
8
+ import n from "../Slider/styles.module.scss";
9
9
  const te = (s, k, f) => {
10
10
  const [_, o] = D(s), p = (r) => {
11
11
  r > f ? o(f) : r < k ? o(k) : o(r);
@@ -1,7 +1,7 @@
1
1
  import e from "react";
2
2
  import x from "classnames";
3
3
  import { AnalyticsId as o } from "../../constants.js";
4
- import s from "./styles.module.scss";
4
+ import s from "../Spacer/styles.module.scss";
5
5
  const m = e.forwardRef(function(r, c) {
6
6
  const { size: a = "s", className: p, testId: t } = r, l = x(
7
7
  s.spacer,
@@ -9,7 +9,7 @@ import E from "../Icons/Attachment.js";
9
9
  import X from "../Icons/Group.js";
10
10
  import v from "../Icons/NoAccess.js";
11
11
  import N from "../Icons/Undo.js";
12
- import s from "./styles.module.scss";
12
+ import s from "../StatusDot/styles.module.scss";
13
13
  var w = /* @__PURE__ */ ((e) => (e.onwhite = "onwhite", e.ondark = "ondark", e))(w || {}), z = /* @__PURE__ */ ((e) => (e.info = "info", e.warning = "warning", e.alert = "alert", e.cancelled = "cancelled", e.active = "active", e.transparent = "transparent", e.recurring = "recurring", e.group = "group", e.noaccess = "noaccess", e.attachment = "attachment", e))(z || {});
14
14
  const C = ({ variant: e }) => e === "recurring" ? /* @__PURE__ */ t.createElement(c, { size: r.XXSmall, svgIcon: N }) : e === "group" ? /* @__PURE__ */ t.createElement(c, { size: r.XXSmall, svgIcon: X }) : e === "noaccess" ? /* @__PURE__ */ t.createElement(c, { size: r.XXSmall, svgIcon: v, color: I("cherry", 600) }) : e === "attachment" ? /* @__PURE__ */ t.createElement(c, { size: r.XXSmall, svgIcon: E }) : null, k = (e) => {
15
15
  const { id: l, mode: m = "onwhite", variant: o = "info", text: i, className: d, testId: p } = e, a = o === "recurring" || o === "group" || o === "noaccess" || o === "attachment", u = o === "cancelled", f = n(s.statusdot, u && s["statusdot--cancelled"], d), g = n(s.statusdot__dot, a ? s["statusdot__dot--icon"] : s[`statusdot__dot--${o}`]), _ = n(
@@ -1,7 +1,7 @@
1
1
  import e from "react";
2
2
  import { AnalyticsId as n } from "../../constants.js";
3
3
  import d from "../StepButtons/StepButtons.js";
4
- import i from "./styles.module.scss";
4
+ import i from "../Step/styles.module.scss";
5
5
  const f = ({
6
6
  stepper: t,
7
7
  children: c,
@@ -1,7 +1,7 @@
1
1
  import e from "react";
2
2
  import n from "classnames";
3
3
  import { AnalyticsId as m } from "../../constants.js";
4
- import t from "./styles.module.scss";
4
+ import t from "../StepButtons/styles.module.scss";
5
5
  const p = (r) => {
6
6
  const { backButton: s, forwardButton: a, additionalButtons: o, cancelButton: l, sticky: u = !1, testId: i } = r, c = n(t.stepbuttons, u && t["stepbuttons--has-sticky-buttons"]);
7
7
  return s || a || o || l ? /* @__PURE__ */ e.createElement("div", { className: c, "data-testid": i, "data-analyticsid": m.StepButtons }, (s || a) && /* @__PURE__ */ e.createElement("div", { className: t.stepbuttons__buttons }, s && e.cloneElement(s, {
@@ -1,7 +1,7 @@
1
1
  import d from "react";
2
2
  import l from "classnames";
3
3
  import { STEPPER_PADDING_X_PX as m } from "./utils.js";
4
- import e from "./styles.module.scss";
4
+ import e from "../Stepper/styles.module.scss";
5
5
  const f = ({ index: o, completed: p, distanceBetweenDots: s, position: t }) => {
6
6
  const r = l(
7
7
  e.stepper__dot,
@@ -5,7 +5,7 @@ import { getAllowedValues as $, getMaximumDots as k, getDistanceBetweenDots as M
5
5
  import { AnalyticsId as S } from "../../constants.js";
6
6
  import { useSize as f } from "../../hooks/useSize.js";
7
7
  import { getAriaLabelAttributes as L } from "../../utils/accessibility.js";
8
- import s from "./styles.module.scss";
8
+ import s from "../Stepper/styles.module.scss";
9
9
  const R = ({ ariaLabelledById: g, ariaLabel: w, value: x, min: b = 0, max: h = 2, testId: D }) => {
10
10
  const n = d(null), i = d(null), { width: E = 0 } = f(n) || {}, { width: p = 0 } = f(i) || {}, { validatedValue: t, validatedMin: o, validatedMax: a } = N(x, b, h), r = $(o, a), v = r.indexOf(t), A = k(E), m = M(p, r.length), c = P(m, v), l = r.length <= A, _ = t === a, y = L({ label: w, id: g });
11
11
  return /* @__PURE__ */ e.createElement("div", { className: s["stepper-wrapper"], ref: n }, /* @__PURE__ */ e.createElement(
@@ -7,7 +7,7 @@ import { useIsVisible as P } from "../../hooks/useIsVisible.js";
7
7
  import { useLayoutEvent as j } from "../../hooks/useLayoutEvent.js";
8
8
  import { getAriaLabelAttributes as q } from "../../utils/accessibility.js";
9
9
  import D from "../HorizontalScroll/HorizontalScroll.js";
10
- import F from "./styles.module.scss";
10
+ import F from "../Table/styles.module.scss";
11
11
  var G = /* @__PURE__ */ ((e) => (e.none = "none", e.centeredoverflow = "centeredoverflow", e.horizontalscroll = "horizontalscroll", e.block = "block", e))(G || {}), J = /* @__PURE__ */ ((e) => (e.compact = "compact", e.normal = "normal", e))(J || {});
12
12
  const K = [
13
13
  {
@@ -1,6 +1,6 @@
1
1
  import e from "react";
2
2
  import s from "classnames";
3
- import n from "../styles.module.scss";
3
+ import n from "../../Table/styles.module.scss";
4
4
  import { ModeType as d } from "../Table.js";
5
5
  const b = ({ className: o, children: a, mode: l = d.normal, ...m }) => {
6
6
  const r = s(n["table-body"], o);
@@ -1,6 +1,6 @@
1
1
  import f from "react";
2
2
  import n from "classnames";
3
- import t from "../styles.module.scss";
3
+ import t from "../../Table/styles.module.scss";
4
4
  import { ModeType as a } from "../Table.js";
5
5
  var p = /* @__PURE__ */ ((e) => (e.left = "left", e.center = "center", e.right = "right", e))(p || {});
6
6
  const d = ({
@@ -3,7 +3,7 @@ import o from "classnames";
3
3
  import E from "../../Button/Button.js";
4
4
  import { Icon as x } from "../../Icon/Icon.js";
5
5
  import C from "../../Icons/ChevronUp.js";
6
- import t from "../styles.module.scss";
6
+ import t from "../../Table/styles.module.scss";
7
7
  import { ModeType as n } from "../Table.js";
8
8
  const w = ({
9
9
  numberOfColumns: m,
@@ -4,7 +4,7 @@ import f from "../../Button/Button.js";
4
4
  import { Icon as b } from "../../Icon/Icon.js";
5
5
  import _ from "../../Icons/ChevronDown.js";
6
6
  import d from "../../Icons/ChevronUp.js";
7
- import o from "../styles.module.scss";
7
+ import o from "../../Table/styles.module.scss";
8
8
  import { ModeType as r } from "../Table.js";
9
9
  const C = ({
10
10
  expandableRowId: a,
@@ -4,7 +4,7 @@ import s from "../../Button/Button.js";
4
4
  import { Icon as i } from "../../Icon/Icon.js";
5
5
  import b from "../../Icons/ChevronDown.js";
6
6
  import f from "../../Icons/ChevronUp.js";
7
- import l from "../styles.module.scss";
7
+ import l from "../../Table/styles.module.scss";
8
8
  import { ModeType as t } from "../Table.js";
9
9
  const _ = ({
10
10
  expanded: e,
@@ -1,6 +1,6 @@
1
1
  import t from "react";
2
2
  import b from "classnames";
3
- import e from "../styles.module.scss";
3
+ import e from "../../Table/styles.module.scss";
4
4
  import { ModeType as p } from "../Table.js";
5
5
  var _ = /* @__PURE__ */ ((a) => (a.normal = "normal", a.transparent = "transparent", a.sortable = "sortable", a))(_ || {});
6
6
  const d = ({ category: a = "normal", className: n, children: s, mode: l, ...m }) => {
@@ -4,7 +4,7 @@ import { Icon as _ } from "../../Icon/Icon.js";
4
4
  import { IconSize as E } from "../../../constants.js";
5
5
  import h from "../../Icons/ArrowDown.js";
6
6
  import w from "../../Icons/ArrowUp.js";
7
- import l from "../styles.module.scss";
7
+ import l from "../../Table/styles.module.scss";
8
8
  import { ModeType as d } from "../Table.js";
9
9
  var C = /* @__PURE__ */ ((e) => (e.asc = "asc", e.desc = "desc", e))(C || {});
10
10
  const N = ({
@@ -1,6 +1,6 @@
1
1
  import e from "react";
2
2
  import w from "classnames";
3
- import r from "../styles.module.scss";
3
+ import r from "../../Table/styles.module.scss";
4
4
  import { ModeType as E } from "../Table.js";
5
5
  import d from "../TableExpanderCell/TableExpanderCellMobile.js";
6
6
  const R = ({
@@ -1,7 +1,7 @@
1
1
  import { ResponsiveTableVariant as t } from "./Table.js";
2
2
  import { Breakpoint as l } from "../../hooks/useBreakpoint.js";
3
3
  import { isTouchDevice as k } from "../../utils/device.js";
4
- import v from "./styles.module.scss";
4
+ import v from "../Table/styles.module.scss";
5
5
  const p = (r) => r.variant === t.centeredoverflow || r.variant === t.block, b = (r) => r.variant === "centeredoverflow" || r.variant === "block" ? v[`table--${r.variant}-${r.breakpoint}`] : "", f = (r, a) => l[r.breakpoint] - l[a.breakpoint], s = (r, a) => l[r.breakpoint] >= a, u = (r, a) => {
6
6
  if (Array.isArray(r))
7
7
  return r.sort(f), r.find((n) => s(n, a));
@@ -7,7 +7,7 @@ import { Icon as v } from "../Icon/Icon.js";
7
7
  import h from "../Icons/Undo.js";
8
8
  import X from "../Icons/X.js";
9
9
  import b from "../LazyIcon/LazyIcon.js";
10
- import t from "./styles.module.scss";
10
+ import t from "../Tag/styles.module.scss";
11
11
  var z = /* @__PURE__ */ ((e) => (e.medium = "medium", e.large = "large", e))(z || {}), E = /* @__PURE__ */ ((e) => (e.remove = "remove", e.undo = "undo", e))(E || {}), N = /* @__PURE__ */ ((e) => (e.normal = "normal", e.oncolor = "oncolor", e.emphasised = "emphasised", e))(N || {});
12
12
  const _ = (e) => {
13
13
  const { children: s, size: c, color: a, variant: r, action: o, onClick: m, testId: l } = e, { hoverRef: i, isHovered: d } = I(), $ = p(
@@ -1,6 +1,6 @@
1
1
  import t from "react";
2
2
  import { AnalyticsId as l } from "../../constants.js";
3
- import a from "./styles.module.scss";
3
+ import a from "../TagList/styles.module.scss";
4
4
  const m = ({ children: e, testId: s }) => /* @__PURE__ */ t.createElement("ul", { className: a["tag-list"], "data-testid": s, "data-analyticsid": l.TagList }, t.Children.map(e, (i) => /* @__PURE__ */ t.createElement("li", { className: a["tag-list__item"] }, i))), d = m;
5
5
  export {
6
6
  d as default
@@ -6,7 +6,7 @@ import { uuid as ne } from "../../utils/uuid.js";
6
6
  import ie from "../ErrorWrapper/ErrorWrapper.js";
7
7
  import { renderLabel as se } from "../Label/Label.js";
8
8
  import ce from "../MaxCharacters/MaxCharacters.js";
9
- import t from "./styles.module.scss";
9
+ import t from "../Textarea/styles.module.scss";
10
10
  const de = (a) => `calc(${a * ae}px + 2rem + 16px + 4px)`, $ = o.forwardRef((a, x) => {
11
11
  const {
12
12
  maxCharacters: n,
@@ -3,7 +3,7 @@ import p from "classnames";
3
3
  import { AnalyticsId as C, IconSize as R } from "../../constants.js";
4
4
  import { useHover as k } from "../../hooks/useHover.js";
5
5
  import { mergeRefs as x } from "../../utils/refs.js";
6
- import e from "./styles.module.scss";
6
+ import e from "../Tile/styles.module.scss";
7
7
  const _ = t.forwardRef((s, r) => {
8
8
  const { children: a, className: c, htmlMarkup: o = "span", highlighted: m, compact: l } = s, n = p(
9
9
  e.tile__title,
@@ -1,7 +1,7 @@
1
1
  import a from "react";
2
2
  import T from "classnames";
3
3
  import { AnalyticsId as u } from "../../constants.js";
4
- import t from "./styles.module.scss";
4
+ import t from "../Title/styles.module.scss";
5
5
  const y = a.forwardRef(function(r, o) {
6
6
  const { id: n, children: m, className: s, htmlMarkup: c = "h1", appearance: e = "title1", margin: i = 0, testId: p } = r, d = T(
7
7
  t.title,
@@ -8,6 +8,10 @@ declare const meta: {
8
8
  description: {
9
9
  component: string;
10
10
  };
11
+ story: {
12
+ inline: boolean;
13
+ iframeHeight: string;
14
+ };
11
15
  };
12
16
  };
13
17
  args: {
@@ -1,6 +1,6 @@
1
1
  import a from "react";
2
2
  import { AnalyticsId as p } from "../../../constants.js";
3
- import c from "./styles.module.scss";
3
+ import c from "../../Tooltip/TooltipWord/styles.module.scss";
4
4
  const e = a.forwardRef(
5
5
  ({ children: r, onClick: d, onFocus: t, onBlur: o, onKeyDown: i, testId: s, ariaDescribedById: l }, m) => /* @__PURE__ */ a.createElement(
6
6
  "button",
@@ -7,7 +7,7 @@ import { getColor as u } from "../../theme/currys/color.js";
7
7
  import { getAriaLabelAttributes as E } from "../../utils/accessibility.js";
8
8
  import { mergeRefs as H } from "../../utils/refs.js";
9
9
  import { Icon as k } from "../Icon/Icon.js";
10
- import e from "./styles.module.scss";
10
+ import e from "../Trigger/styles.module.scss";
11
11
  const v = {
12
12
  help: R
13
13
  //info: InfoSignStroke, // @todo Support variant='info' in later version
@@ -4,7 +4,7 @@ import n from "./ValidationSummary.js";
4
4
  import { AnalyticsId as d } from "../../constants.js";
5
5
  import { isComponent as c } from "../../utils/component.js";
6
6
  import f from "../FormGroup/FormGroup.js";
7
- import t from "./styles.module.scss";
7
+ import t from "../Validation/styles.module.scss";
8
8
  const o = e.forwardRef((r, m) => {
9
9
  const i = r.errors || r.errorSummary ? t["form-group-wrapper--error-sibling"] : "", s = l(t["validation-errors"], r.errorSummary && t["validation-errors--visible"]);
10
10
  return /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("div", { "data-testid": r.testId, "data-analyticsid": d.Validation, className: r.className, ref: m }, e.Children.map(r.children, (a) => c(a, f) ? e.cloneElement(a, {
@@ -3,7 +3,7 @@ import m from "classnames";
3
3
  import o from "./ErrorList.js";
4
4
  import { useUuid as n } from "../../hooks/useUuid.js";
5
5
  import s from "../Title/Title.js";
6
- import a from "./styles.module.scss";
6
+ import a from "../Validation/styles.module.scss";
7
7
  const c = (e) => {
8
8
  const { errorTitleHtmlMarkup: l = "h2" } = e, t = n(), i = m(
9
9
  a["validation-summary"],
@@ -0,0 +1,7 @@
1
+ import * as React from 'react';
2
+ interface DocsProps<T> {
3
+ component: T;
4
+ }
5
+ export declare const isSupernova: () => boolean;
6
+ declare const Docs: <T>(props: DocsProps<T>) => React.JSX.Element;
7
+ export default Docs;
package/docs/index.js ADDED
@@ -0,0 +1,9 @@
1
+ import * as e from "react";
2
+ import "../node_modules/@storybook/addon-docs/dist/chunk-HLWAVYOI.js";
3
+ import { ArgTypes as n, Title as r, Subtitle as l, Description as o, Primary as a, Stories as i } from "../node_modules/@storybook/blocks/dist/index.js";
4
+ const c = () => window.parent.location.hostname === "frankenstein.helsenorge.design" || window.location.search.includes("isSupernova"), u = (t) => c() ? /* @__PURE__ */ e.createElement(n, { of: t.component }) : /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(r, null), /* @__PURE__ */ e.createElement(l, null), /* @__PURE__ */ e.createElement(o, null), /* @__PURE__ */ e.createElement(a, null), /* @__PURE__ */ e.createElement(n, { of: t.component }), /* @__PURE__ */ e.createElement(i, null));
5
+ export {
6
+ u as default,
7
+ c as isSupernova
8
+ };
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../src/docs/index.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { Title, Subtitle, Description, Primary, ArgTypes, Stories } from '@storybook/addon-docs';\n\ninterface DocsProps<T> {\n component: T;\n}\n\nexport const isSupernova = (): boolean =>\n window.parent.location.hostname === 'frankenstein.helsenorge.design' || window.location.search.includes('isSupernova');\n\nconst Docs = <T,>(props: DocsProps<T>): React.JSX.Element => {\n if (isSupernova()) {\n return <ArgTypes of={props.component} />;\n }\n\n return (\n <>\n <Title />\n <Subtitle />\n <Description />\n <Primary />\n <ArgTypes of={props.component} />\n <Stories />\n </>\n );\n};\n\nexport default Docs;\n"],"names":["isSupernova","Docs","props","React","ArgTypes","Title","Subtitle","Description","Primary","Stories"],"mappings":";;;AAQa,MAAAA,IAAc,MACzB,OAAO,OAAO,SAAS,aAAa,oCAAoC,OAAO,SAAS,OAAO,SAAS,aAAa,GAEjHC,IAAO,CAAKC,MACZF,MACM,gBAAAG,EAAA,cAAAC,GAAA,EAAS,IAAIF,EAAM,UAAW,CAAA,IAItC,gBAAAC,EAAA,cAAAA,EAAA,UAAA,sCACGE,GAAM,IAAA,mCACNC,GAAS,IAAA,mCACTC,GAAY,IAAA,mCACZC,GAAQ,IAAA,mCACRJ,GAAS,EAAA,IAAIF,EAAM,UAAW,CAAA,GAC9B,gBAAAC,EAAA,cAAAM,GAAA,IAAQ,CACX;"}
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": "7.0.0",
10
+ "version": "7.1.0",
11
11
  "author": "Helsenorge",
12
12
  "license": "MIT",
13
13
  "peerDependencies": {