@rikstv/shared-components 3.2.1-alpha.0 → 3.2.1-alpha.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 (84) hide show
  1. package/dist/components/accordion/Accordion-rewqLwCV.mjs +34 -0
  2. package/dist/components/alert/Alert-BVUcZip2.mjs +68 -0
  3. package/dist/components/breadcrumb/Breadcrumb-BJNLZ7iB.mjs +21 -0
  4. package/dist/components/button/{ArrowButton-DMr9aNBX.mjs → ArrowButton-DqViaPQ-.mjs} +11 -11
  5. package/dist/components/button/BaseButton-Bhxc5Zyj.mjs +46 -0
  6. package/dist/components/button/BaseButton.d.ts +2 -1
  7. package/dist/components/button/BaseDecoratedButton-5on1OJrJ.mjs +15 -0
  8. package/dist/components/button/BaseDecoratedButton.d.ts +1 -1
  9. package/dist/components/button/{BaseLinkButton-BsJ_29CO.mjs → BaseLinkButton-niQ474XP.mjs} +13 -13
  10. package/dist/components/button/BaseLinkButton.d.ts +1 -1
  11. package/dist/components/button/Button-DGXKZhwG.mjs +19 -0
  12. package/dist/components/button/DecoratedButton-D1hX-3Iw.mjs +26 -0
  13. package/dist/components/button/IconButton-DVEZ8K3d.mjs +18 -0
  14. package/dist/components/button/IconButton.d.ts +1 -1
  15. package/dist/components/checkbox/BaseCheckbox-BGkrjof6.mjs +41 -0
  16. package/dist/components/checkbox/Checkbox-Cl4PCYXu.mjs +22 -0
  17. package/dist/components/core/{Core-GV7d4sn7.mjs → Core-DVnHiJm2.mjs} +10 -10
  18. package/dist/components/core/LightMode-DPAa0Pv9.mjs +9 -0
  19. package/dist/components/core/RiksTV-CxHetJcp.mjs +6 -0
  20. package/dist/components/core/Strim-C1ajVDCm.mjs +6 -0
  21. package/dist/components/dropdown/Dropdown-CWVW7rKD.mjs +44 -0
  22. package/dist/components/dropdown/Dropdown.d.ts +3 -2
  23. package/dist/components/icons/{Arrow-DpNA_SD7.mjs → Arrow-DlptGprM.mjs} +2 -2
  24. package/dist/components/icons/{Chevron-D7z5f5Ni.mjs → Chevron-BBlkokQX.mjs} +2 -2
  25. package/dist/components/icons/{HeartToggle-Buv7f9yB.mjs → HeartToggle-Bwgo4FxH.mjs} +3 -3
  26. package/dist/components/icons/{Icons-D0X7KrxA.mjs → Icons-CVv5JxOX.mjs} +3 -3
  27. package/dist/components/list/CheckmarkListItem-D86vlUxv.mjs +9 -0
  28. package/dist/components/list/CrossmarkListItem-CXIrUTPd.mjs +9 -0
  29. package/dist/components/list/{List-DbnDS6C4.mjs → List-4jHnUXn_.mjs} +3 -3
  30. package/dist/components/list/ListItem-ClQsSisn.mjs +34 -0
  31. package/dist/components/list/ListItem.d.ts +2 -1
  32. package/dist/components/list/OrderedListItem-CphW2Aa0.mjs +5 -0
  33. package/dist/components/loader/Loader-gjL6yh1f.mjs +21 -0
  34. package/dist/components/loader/RawLoader-BpIpTIRJ.mjs +47 -0
  35. package/dist/components/notificationDot/{NotificationDot-pljIxRxJ.mjs → NotificationDot-C2_j4FdL.mjs} +6 -6
  36. package/dist/components/panel/Panel-CPz2fLQW.mjs +59 -0
  37. package/dist/components/progress/CircularProgress-CD_dLu6N.mjs +50 -0
  38. package/dist/components/progress/Progress-CjnegHvC.mjs +26 -0
  39. package/dist/components/spacing/Gutter-PXX_UdiX.mjs +5 -0
  40. package/dist/components/spacing/GutterPadding-Bd7tSm3F.mjs +5 -0
  41. package/dist/components/textfield/PasswordTextField-BfvT8zYj.mjs +22 -0
  42. package/dist/components/textfield/TextField-Ct-ceRzE.mjs +76 -0
  43. package/dist/components/toggle/FieldSet-BM_JN_UL.mjs +13 -0
  44. package/dist/components/toggle/RadioToggle-C_79eEFl.mjs +17 -0
  45. package/dist/components/toggleButton/ToggleButton-CGLyQll6.mjs +47 -0
  46. package/dist/components/toggleButton/ToggleButton.d.ts +2 -1
  47. package/dist/components/toggleInlineButton/ToggleInlineButton-Cnet1doK.mjs +40 -0
  48. package/dist/components/toggleLinkButton/ToggleLinkButton-W1wyWc93.mjs +37 -0
  49. package/dist/components/typography/{Typography-BDz_QfCz.mjs → Typography-CXNJ1SFo.mjs} +18 -18
  50. package/dist/shared-components.mjs +33 -33
  51. package/dist/style.css +1 -1
  52. package/package.json +1 -1
  53. package/dist/components/accordion/Accordion-C-Lu1AN3.mjs +0 -311
  54. package/dist/components/alert/Alert-C2ywNHz1.mjs +0 -68
  55. package/dist/components/breadcrumb/Breadcrumb-Dpi45ZU-.mjs +0 -21
  56. package/dist/components/button/BaseButton-BDwLDH8l.mjs +0 -46
  57. package/dist/components/button/BaseDecoratedButton-ChPN1ek7.mjs +0 -15
  58. package/dist/components/button/Button-ChxzP0BI.mjs +0 -19
  59. package/dist/components/button/DecoratedButton-BPD31Ccf.mjs +0 -26
  60. package/dist/components/button/IconButton-DYRG4f36.mjs +0 -18
  61. package/dist/components/checkbox/BaseCheckbox-Ds7EbRAQ.mjs +0 -41
  62. package/dist/components/checkbox/Checkbox-DqG1H_l_.mjs +0 -22
  63. package/dist/components/core/LightMode-QGX5KWDc.mjs +0 -9
  64. package/dist/components/core/RiksTV-CLsPQKYj.mjs +0 -6
  65. package/dist/components/core/Strim-D7gNGKkV.mjs +0 -6
  66. package/dist/components/dropdown/Dropdown-U7w2rrui.mjs +0 -44
  67. package/dist/components/list/CheckmarkListItem-DDP1qoW4.mjs +0 -9
  68. package/dist/components/list/CrossmarkListItem-CbzfzRC4.mjs +0 -9
  69. package/dist/components/list/ListItem-CQZq9GfN.mjs +0 -34
  70. package/dist/components/list/OrderedListItem-CjcJ5-Li.mjs +0 -5
  71. package/dist/components/loader/Loader-D_bteiXh.mjs +0 -21
  72. package/dist/components/loader/RawLoader-5VXTs9nJ.mjs +0 -47
  73. package/dist/components/panel/Panel-CrtDgKD_.mjs +0 -59
  74. package/dist/components/progress/CircularProgress-CopS-z4L.mjs +0 -50
  75. package/dist/components/progress/Progress-_FQvkoIg.mjs +0 -26
  76. package/dist/components/spacing/Gutter-BG0NTrtn.mjs +0 -5
  77. package/dist/components/spacing/GutterPadding-n99wy2ws.mjs +0 -5
  78. package/dist/components/textfield/PasswordTextField-OBI71D--.mjs +0 -22
  79. package/dist/components/textfield/TextField-BCS5Ve2N.mjs +0 -76
  80. package/dist/components/toggle/FieldSet-DOEdpTZk.mjs +0 -13
  81. package/dist/components/toggle/RadioToggle-EoTh0Vv6.mjs +0 -17
  82. package/dist/components/toggleButton/ToggleButton-BYIO805O.mjs +0 -47
  83. package/dist/components/toggleInlineButton/ToggleInlineButton-BgOpE9Ya.mjs +0 -40
  84. package/dist/components/toggleLinkButton/ToggleLinkButton-DuHYN8Qo.mjs +0 -37
@@ -0,0 +1,34 @@
1
+ import { jsxs as a, jsx as d } from "react/jsx-runtime";
2
+ import { useRef as n, useEffect as m } from "react";
3
+ import { C as l } from "../icons/Chevron-BBlkokQX.mjs";
4
+ const _ = ({
5
+ initialOpen: s = !0,
6
+ children: c,
7
+ heading: o,
8
+ className: t = "",
9
+ lightBackground: e = !1,
10
+ ...i
11
+ }) => {
12
+ const r = n(null);
13
+ return m(() => {
14
+ r.current && (r.current.open = s);
15
+ }, [s]), /* @__PURE__ */ a(
16
+ "details",
17
+ {
18
+ ref: r,
19
+ "data-testid": "rds-accordion",
20
+ className: `rds-accordion-details ${e ? "rds-accordion-details--light" : ""} ${e === "white" ? "rds-accordion-details--white" : ""} ${t}`,
21
+ ...i,
22
+ children: [
23
+ /* @__PURE__ */ a("summary", { "data-testid": "rds-accordion-summary", className: "rds-accordion-details__summary", children: [
24
+ /* @__PURE__ */ d(l, {}),
25
+ /* @__PURE__ */ d("div", { className: "rds-accordion-details__summary__content", children: o })
26
+ ] }),
27
+ c
28
+ ]
29
+ }
30
+ );
31
+ };
32
+ export {
33
+ _ as A
34
+ };
@@ -0,0 +1,68 @@
1
+ import { jsxs as a, jsx as s } from "react/jsx-runtime";
2
+ import { forwardRef as B, useState as o } from "react";
3
+ import { H as F, B as T } from "../typography/Typography-CXNJ1SFo.mjs";
4
+ import "../icons/HeartToggle-Bwgo4FxH.mjs";
5
+ import { S as b, a as x, b as d, c as O } from "../icons/Icons-CVv5JxOX.mjs";
6
+ const H = "_rds-alert--icon_m8jce_67", R = "_rds-alert--content-title_m8jce_79", D = "_rds-alert--content_m8jce_79", E = "_rds-alert--dismiss_m8jce_109", M = "_dismissed_m8jce_138", V = "_dismiss-fade-out_m8jce_1", e = {
7
+ rdsAlertIcon: H,
8
+ rdsAlertContentTitle: R,
9
+ rdsAlertContent: D,
10
+ rdsAlertDismiss: E,
11
+ dismissed: M,
12
+ dismissFadeOut: V
13
+ }, q = {
14
+ warning: { title: "Advarsel", Icon: x },
15
+ error: { title: "Feil", Icon: d },
16
+ info: { title: "Informasjon", Icon: d },
17
+ success: { title: "Vellykket", Icon: O }
18
+ }, z = B(
19
+ ({
20
+ className: c,
21
+ intent: r = "warning",
22
+ variant: i = "filled",
23
+ testId: m = "rds-alert",
24
+ heading: A,
25
+ children: f,
26
+ dismissible: _ = !0,
27
+ lightBackground: v,
28
+ onDismissed: t,
29
+ LinkToDetails: u,
30
+ ...C
31
+ }, j) => {
32
+ const [p, l] = o(!1), [I, n] = o(!1), g = ["rds-alert", v ? "rds-light" : "", p ? e.dismissed : "", c].filter(Boolean).join(" ");
33
+ if (I)
34
+ return null;
35
+ const h = () => {
36
+ l(!1), n(!1);
37
+ }, { title: N, Icon: S } = q[r], k = (y) => {
38
+ y.animationName === e.dismissFadeOut && (n(!0), t == null || t(h));
39
+ }, w = _ && i !== "inline";
40
+ return /* @__PURE__ */ a(
41
+ "div",
42
+ {
43
+ role: "alert",
44
+ "aria-live": "polite",
45
+ ref: j,
46
+ className: g,
47
+ "data-testid": m,
48
+ "data-intent": r,
49
+ "data-variant": i,
50
+ onAnimationEnd: k,
51
+ ...C,
52
+ children: [
53
+ /* @__PURE__ */ s(S, { className: e.rdsAlertIcon }),
54
+ /* @__PURE__ */ a("div", { className: e.rdsAlertContent, children: [
55
+ /* @__PURE__ */ s(F, { className: e.rdsAlertContentTitle, as: "span", children: A || N }),
56
+ /* @__PURE__ */ s(T, { as: "div", children: f }),
57
+ u
58
+ ] }),
59
+ w && /* @__PURE__ */ s("div", { className: e.rdsAlertDismiss, children: /* @__PURE__ */ s("button", { "aria-label": "Avvis varsel", onClick: () => l(!0), children: /* @__PURE__ */ s(b, {}) }) })
60
+ ]
61
+ }
62
+ );
63
+ }
64
+ );
65
+ z.displayName = "Alert";
66
+ export {
67
+ z as A
68
+ };
@@ -0,0 +1,21 @@
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { forwardRef as b } from "react";
3
+ import { S as d } from "../typography/Typography-CXNJ1SFo.mjs";
4
+ const u = b(({ className: a = "", crumbs: e, render: c, ...m }, i) => /* @__PURE__ */ r("nav", { className: `rds-breadcrumb ${a}`, ref: i, ...m, children: /* @__PURE__ */ r(d, { children: /* @__PURE__ */ r("ol", { className: "rds-breadcrumb__list", children: e.map(({ name: s, href: l }, n) => {
5
+ const t = n === e.length - 1;
6
+ return /* @__PURE__ */ r(
7
+ "li",
8
+ {
9
+ className: `rds-breadcrumb__list-item ${e.length >= 4 ? "rds-breadcrumb__list-item--truncate" : ""}`,
10
+ "data-testid": `rds-breadcrumb-${s}`,
11
+ "aria-current": t ? "page" : "false",
12
+ children: c(s, l, t)
13
+ },
14
+ s
15
+ );
16
+ }) }) }) })), f = ({ children: a }) => /* @__PURE__ */ r(d, { className: "rds-breadcrumb__current", children: a });
17
+ u.displayName = "Breadcrumb";
18
+ export {
19
+ u as B,
20
+ f as a
21
+ };
@@ -1,10 +1,10 @@
1
- import { j as s } from "../accordion/Accordion-C-Lu1AN3.mjs";
1
+ import { jsx as s } from "react/jsx-runtime";
2
2
  import { forwardRef as n } from "react";
3
- import { P as e, S as u, T as d, G as b } from "./DecoratedButton-BPD31Ccf.mjs";
4
- import { A as c } from "../icons/Arrow-DpNA_SD7.mjs";
5
- const w = () => /* @__PURE__ */ s.jsx(c, {}), m = n(
6
- ({ forwards: r = !0, className: o = "", ...t }, a) => /* @__PURE__ */ s.jsx(
7
- e,
3
+ import { P as d, S as e, T as u, G as b } from "./DecoratedButton-D1hX-3Iw.mjs";
4
+ import { A as c } from "../icons/Arrow-DlptGprM.mjs";
5
+ const w = () => /* @__PURE__ */ s(c, {}), m = n(
6
+ ({ forwards: r = !0, className: o = "", ...t }, a) => /* @__PURE__ */ s(
7
+ d,
8
8
  {
9
9
  className: `${o} ${r ? "rds-arrow-button--forwards" : "rds-arrow-button--backwards"}`,
10
10
  arrow: w,
@@ -16,8 +16,8 @@ const w = () => /* @__PURE__ */ s.jsx(c, {}), m = n(
16
16
  );
17
17
  m.displayName = "PrimaryArrowButton";
18
18
  const y = n(
19
- ({ forwards: r = !0, className: o = "", ...t }, a) => /* @__PURE__ */ s.jsx(
20
- u,
19
+ ({ forwards: r = !0, className: o = "", ...t }, a) => /* @__PURE__ */ s(
20
+ e,
21
21
  {
22
22
  className: `${o} ${r ? "rds-arrow-button--forwards" : "rds-arrow-button--backwards"}`,
23
23
  arrow: w,
@@ -29,8 +29,8 @@ const y = n(
29
29
  );
30
30
  y.displayName = "SecondaryArrowButton";
31
31
  const i = n(
32
- ({ forwards: r = !0, className: o = "", ...t }, a) => /* @__PURE__ */ s.jsx(
33
- d,
32
+ ({ forwards: r = !0, className: o = "", ...t }, a) => /* @__PURE__ */ s(
33
+ u,
34
34
  {
35
35
  className: `${o} ${r ? "rds-arrow-button--forwards" : "rds-arrow-button--backwards"}`,
36
36
  arrow: w,
@@ -42,7 +42,7 @@ const i = n(
42
42
  );
43
43
  i.displayName = "TertiaryArrowButton";
44
44
  const p = n(
45
- ({ forwards: r = !0, className: o = "", ...t }, a) => /* @__PURE__ */ s.jsx(
45
+ ({ forwards: r = !0, className: o = "", ...t }, a) => /* @__PURE__ */ s(
46
46
  b,
47
47
  {
48
48
  className: `${o} ${r ? "rds-arrow-button--forwards" : "rds-arrow-button--backwards"}`,
@@ -0,0 +1,46 @@
1
+ import { jsx as t, jsxs as c, Fragment as f } from "react/jsx-runtime";
2
+ import { forwardRef as h } from "react";
3
+ const p = h(
4
+ ({
5
+ children: d,
6
+ buttonType: n,
7
+ buttonStyle: r,
8
+ type: o = "button",
9
+ isLoading: s = !1,
10
+ lightBackground: a = !1,
11
+ transparent: i = !1,
12
+ disabled: b,
13
+ className: l = "",
14
+ "aria-busy": u,
15
+ icon: e,
16
+ iconClass: $ = "",
17
+ ...m
18
+ }, _) => /* @__PURE__ */ t(
19
+ "button",
20
+ {
21
+ type: o,
22
+ ...m,
23
+ ref: _,
24
+ disabled: s || b,
25
+ "aria-busy": s || u,
26
+ className: `
27
+ ${n}
28
+ rds-button__shared
29
+ rds-button__shared--${r}
30
+ rds-button--${r}
31
+ ${s ? "rds-button--loading" : ""}
32
+ ${a ? "rds-light" : ""}
33
+ ${a === "white" ? "rds-white" : ""}
34
+ ${i ? "rds-transparent" : ""}
35
+ ${l}`,
36
+ children: /* @__PURE__ */ c(f, { children: [
37
+ e && /* @__PURE__ */ t("span", { "data-testid": "rds-button__icon", className: `rds-button__icon ${$}`, children: /* @__PURE__ */ t(e, {}) }),
38
+ d
39
+ ] })
40
+ }
41
+ )
42
+ );
43
+ p.displayName = "BaseButton";
44
+ export {
45
+ p as B
46
+ };
@@ -1,4 +1,5 @@
1
- import { ButtonHTMLAttributes, JSX } from 'react';
1
+ import { ButtonHTMLAttributes } from 'react';
2
+ import { JSX } from 'react/jsx-runtime';
2
3
 
3
4
  export type ButtonStyles = "primary" | "secondary" | "tertiary" | "ghost";
4
5
  export type ButtonBackgroundStyles = boolean | "white";
@@ -0,0 +1,15 @@
1
+ import { jsx as t, jsxs as c, Fragment as m } from "react/jsx-runtime";
2
+ import { forwardRef as _ } from "react";
3
+ import { B as l } from "./BaseButton-Bhxc5Zyj.mjs";
4
+ const u = _(
5
+ ({ children: n, buttonType: r, postfix: a, icon: s, arrow: o, iconClass: e = "", ...d }, i) => /* @__PURE__ */ t(l, { buttonType: r, ref: i, ...d, children: /* @__PURE__ */ c(m, { children: [
6
+ s && /* @__PURE__ */ t("span", { "data-testid": "rds-button__icon", className: `rds-button__icon ${e}`, children: /* @__PURE__ */ t(s, {}) }),
7
+ o && /* @__PURE__ */ t("span", { "data-testid": "rds-button__arrow", className: `rds-button__arrow ${e}`, children: /* @__PURE__ */ t(o, {}) }),
8
+ n,
9
+ !!a && r !== "rds-icon-button" && /* @__PURE__ */ t("span", { className: "rds-button__postfix", children: a })
10
+ ] }) })
11
+ );
12
+ u.displayName = "BaseDecoratedButton";
13
+ export {
14
+ u as B
15
+ };
@@ -1,5 +1,5 @@
1
1
  import { BaseButtonProps, ButtonProps } from './BaseButton';
2
- import { JSX } from 'react';
2
+ import { JSX } from 'react/jsx-runtime';
3
3
 
4
4
  export interface DecoratedButtonProps extends ButtonProps {
5
5
  postfix?: string;
@@ -1,12 +1,12 @@
1
- import { j as r } from "../accordion/Accordion-C-Lu1AN3.mjs";
2
- import { forwardRef as c } from "react";
3
- import "./ArrowButton-DMr9aNBX.mjs";
4
- import { A as l } from "../icons/Arrow-DpNA_SD7.mjs";
5
- const p = () => /* @__PURE__ */ r.jsx(l, {}), u = c(
1
+ import { jsx as r, jsxs as c, Fragment as l } from "react/jsx-runtime";
2
+ import { forwardRef as p } from "react";
3
+ import "./ArrowButton-DqViaPQ-.mjs";
4
+ import { A as u } from "../icons/Arrow-DlptGprM.mjs";
5
+ const $ = () => /* @__PURE__ */ r(u, {}), w = p(
6
6
  ({
7
- element: o,
7
+ element: d,
8
8
  buttonStyle: s = "primary",
9
- className: d = "",
9
+ className: o = "",
10
10
  withArrow: t,
11
11
  arrowBackward: n,
12
12
  iconClass: e = "",
@@ -14,8 +14,8 @@ const p = () => /* @__PURE__ */ r.jsx(l, {}), u = c(
14
14
  lightBackground: a,
15
15
  transparent: m,
16
16
  ...h
17
- }, b) => /* @__PURE__ */ r.jsx("div", { className: `rds-baselink-button ${d}`, children: /* @__PURE__ */ r.jsx(
18
- o,
17
+ }, b) => /* @__PURE__ */ r("div", { className: `rds-baselink-button ${o}`, children: /* @__PURE__ */ r(
18
+ d,
19
19
  {
20
20
  className: `
21
21
  rds-button rds-button__shared
@@ -28,14 +28,14 @@ const p = () => /* @__PURE__ */ r.jsx(l, {}), u = c(
28
28
  `,
29
29
  ref: b,
30
30
  ...h,
31
- children: /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
32
- t && /* @__PURE__ */ r.jsx("span", { "data-testid": "rds-button__arrow", className: `rds-button__arrow ${e}`, children: /* @__PURE__ */ r.jsx(p, {}) }),
31
+ children: /* @__PURE__ */ c(l, { children: [
32
+ t && /* @__PURE__ */ r("span", { "data-testid": "rds-button__arrow", className: `rds-button__arrow ${e}`, children: /* @__PURE__ */ r($, {}) }),
33
33
  i
34
34
  ] })
35
35
  }
36
36
  ) })
37
37
  );
38
- u.displayName = "BaseLinkButton";
38
+ w.displayName = "BaseLinkButton";
39
39
  export {
40
- u as B
40
+ w as B
41
41
  };
@@ -1,5 +1,5 @@
1
1
  import { ButtonBackgroundStyles, ButtonStyles } from './BaseButton';
2
- import { JSX } from 'react';
2
+ import { JSX } from 'react/jsx-runtime';
3
3
 
4
4
  export type LinkButtonStyles = ButtonStyles | "highlighted";
5
5
  interface BaseLinkButtonPropsWithElement<ElementProps> {
@@ -0,0 +1,19 @@
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { forwardRef as n } from "react";
3
+ import { B as a } from "./BaseButton-Bhxc5Zyj.mjs";
4
+ import "./ArrowButton-DqViaPQ-.mjs";
5
+ import "./BaseLinkButton-niQ474XP.mjs";
6
+ const s = n((t, o) => /* @__PURE__ */ r(a, { buttonType: "rds-button", buttonStyle: "primary", ref: o, ...t }));
7
+ s.displayName = "PrimaryButton";
8
+ const e = n((t, o) => /* @__PURE__ */ r(a, { buttonType: "rds-button", buttonStyle: "secondary", ref: o, ...t }));
9
+ e.displayName = "SecondaryButton";
10
+ const u = n((t, o) => /* @__PURE__ */ r(a, { buttonType: "rds-button", buttonStyle: "tertiary", ref: o, ...t }));
11
+ u.displayName = "TertiaryButton";
12
+ const y = n((t, o) => /* @__PURE__ */ r(a, { buttonType: "rds-button", buttonStyle: "ghost", ref: o, ...t }));
13
+ y.displayName = "GhostButton";
14
+ export {
15
+ y as G,
16
+ s as P,
17
+ e as S,
18
+ u as T
19
+ };
@@ -0,0 +1,26 @@
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import { forwardRef as r } from "react";
3
+ import { B as a } from "./BaseDecoratedButton-5on1OJrJ.mjs";
4
+ import "./ArrowButton-DqViaPQ-.mjs";
5
+ const n = r(
6
+ (t, o) => /* @__PURE__ */ e(a, { buttonStyle: "primary", ref: o, ...t })
7
+ );
8
+ n.displayName = "PrimaryDecoratedButton";
9
+ const s = r(
10
+ (t, o) => /* @__PURE__ */ e(a, { buttonStyle: "secondary", ref: o, ...t })
11
+ );
12
+ s.displayName = "SecondaryDecoratedButton";
13
+ const d = r(
14
+ (t, o) => /* @__PURE__ */ e(a, { buttonStyle: "tertiary", ref: o, ...t })
15
+ );
16
+ d.displayName = "TertiaryDecoratedButton";
17
+ const y = r(
18
+ (t, o) => /* @__PURE__ */ e(a, { buttonStyle: "ghost", ref: o, ...t })
19
+ );
20
+ y.displayName = "GhostDecoratedButton";
21
+ export {
22
+ y as G,
23
+ n as P,
24
+ s as S,
25
+ d as T
26
+ };
@@ -0,0 +1,18 @@
1
+ import { jsx as n } from "react/jsx-runtime";
2
+ import { forwardRef as r } from "react";
3
+ import { P as a, S as e, T as s, G as c } from "./DecoratedButton-D1hX-3Iw.mjs";
4
+ import "./ArrowButton-DqViaPQ-.mjs";
5
+ const u = r((t, o) => /* @__PURE__ */ n(a, { buttonType: "rds-icon-button", ref: o, ...t }));
6
+ u.displayName = "PrimaryIconButton";
7
+ const i = r((t, o) => /* @__PURE__ */ n(e, { buttonType: "rds-icon-button", ref: o, ...t }));
8
+ i.displayName = "SecondaryIconButton";
9
+ const y = r((t, o) => /* @__PURE__ */ n(s, { buttonType: "rds-icon-button", ref: o, ...t }));
10
+ y.displayName = "TertiaryIconButton";
11
+ const d = r((t, o) => /* @__PURE__ */ n(c, { buttonType: "rds-icon-button", ref: o, ...t }));
12
+ d.displayName = "GhostIconButton";
13
+ export {
14
+ d as G,
15
+ u as P,
16
+ i as S,
17
+ y as T
18
+ };
@@ -1,5 +1,5 @@
1
1
  import { DecoratedButtonProps } from './BaseDecoratedButton';
2
- import { JSX } from 'react';
2
+ import { JSX } from 'react/jsx-runtime';
3
3
 
4
4
  interface IconButtonProps extends Omit<DecoratedButtonProps, "icon"> {
5
5
  icon: () => JSX.Element;
@@ -0,0 +1,41 @@
1
+ import { jsxs as b, jsx as t } from "react/jsx-runtime";
2
+ import { forwardRef as h } from "react";
3
+ const x = (e) => {
4
+ if (e)
5
+ return e;
6
+ const a = (Math.random() + 1).toString(36).substring(7);
7
+ return `${(/* @__PURE__ */ new Date()).valueOf()}-${a}`;
8
+ }, f = h(
9
+ ({
10
+ containerClassName: e = "",
11
+ inputClassName: a = "",
12
+ labelClassName: s = "",
13
+ dataTestId: n = "rds-checkbox__label",
14
+ id: o,
15
+ hasError: c,
16
+ style: i,
17
+ children: l,
18
+ ...d
19
+ }, m) => {
20
+ const r = x(o);
21
+ return /* @__PURE__ */ b("div", { style: i, className: e, children: [
22
+ /* @__PURE__ */ t(
23
+ "input",
24
+ {
25
+ ref: m,
26
+ className: a,
27
+ id: r,
28
+ type: "checkbox",
29
+ "aria-invalid": c,
30
+ ...d
31
+ }
32
+ ),
33
+ /* @__PURE__ */ t("label", { "data-testid": n, htmlFor: r, className: s, children: l })
34
+ ] });
35
+ }
36
+ );
37
+ f.displayName = "BaseCheckbox";
38
+ export {
39
+ f as B,
40
+ x as g
41
+ };
@@ -0,0 +1,22 @@
1
+ import { jsx as t } from "react/jsx-runtime";
2
+ import { forwardRef as x } from "react";
3
+ import { B as l } from "./BaseCheckbox-BGkrjof6.mjs";
4
+ const p = x(
5
+ ({ className: r = "", id: o, lightBackground: e, hasError: s, style: a, children: m, ...c }, b) => /* @__PURE__ */ t(
6
+ l,
7
+ {
8
+ style: a,
9
+ id: o,
10
+ ref: b,
11
+ containerClassName: `rds-form-group-box ${r} ${s ? "rds-form-group-box--error" : ""}`,
12
+ inputClassName: `rds-checkbox rds-checkbox__input ${e ? "rds-light" : ""}`,
13
+ labelClassName: "rds-checkbox__label",
14
+ ...c,
15
+ children: m
16
+ }
17
+ )
18
+ );
19
+ p.displayName = "Checkbox";
20
+ export {
21
+ p as C
22
+ };
@@ -1,36 +1,36 @@
1
- import { j as i } from "../accordion/Accordion-C-Lu1AN3.mjs";
1
+ import { jsx as i } from "react/jsx-runtime";
2
2
  let a = !1, n = !1, u = !1;
3
- const s = {
3
+ const r = {
4
4
  mousedown: c,
5
5
  keydown: d,
6
6
  touchstart: f
7
7
  };
8
- function r() {
9
- Object.keys(s).forEach((t) => {
10
- document.removeEventListener(t, s[t]);
8
+ function s() {
9
+ Object.keys(r).forEach((t) => {
10
+ document.removeEventListener(t, r[t]);
11
11
  });
12
12
  }
13
13
  function e(t) {
14
- document.addEventListener(t, s[t]);
14
+ document.addEventListener(t, r[t]);
15
15
  }
16
16
  function c() {
17
17
  if (!a && !u) {
18
18
  a = !0, n = !1;
19
19
  const t = document.querySelector("html");
20
- t == null || t.setAttribute("data-mousenavigation", "true"), t == null || t.removeAttribute("data-touchnavigation"), r(), e("touchstart"), e("keydown");
20
+ t == null || t.setAttribute("data-mousenavigation", "true"), t == null || t.removeAttribute("data-touchnavigation"), s(), e("touchstart"), e("keydown");
21
21
  }
22
22
  }
23
23
  function d(t) {
24
24
  if (t.key === "Tab") {
25
25
  const o = document.querySelector("html");
26
- r(), o == null || o.removeAttribute("data-mousenavigation"), o == null || o.removeAttribute("data-touchnavigation"), a = !1, n = !1, e("touchstart"), e("mousedown");
26
+ s(), o == null || o.removeAttribute("data-mousenavigation"), o == null || o.removeAttribute("data-touchnavigation"), a = !1, n = !1, e("touchstart"), e("mousedown");
27
27
  }
28
28
  }
29
29
  function f() {
30
30
  if (!n) {
31
31
  a = !1, n = !0;
32
32
  const t = document.querySelector("html");
33
- t == null || t.setAttribute("data-touchnavigation", "true"), t == null || t.removeAttribute("data-mousenavigation"), r(), e("touchstart"), e("keydown"), e("mousedown");
33
+ t == null || t.setAttribute("data-touchnavigation", "true"), t == null || t.removeAttribute("data-mousenavigation"), s(), e("touchstart"), e("keydown"), e("mousedown");
34
34
  }
35
35
  u = !0, setTimeout(() => {
36
36
  u = !1;
@@ -40,7 +40,7 @@ function v() {
40
40
  typeof document < "u" && (e("touchstart"), e("mousedown"));
41
41
  }
42
42
  v();
43
- const m = ({ brand: t, children: o }) => /* @__PURE__ */ i.jsx("div", { "data-testid": "core-entry", className: t, children: o });
43
+ const m = ({ brand: t, children: o }) => /* @__PURE__ */ i("div", { "data-testid": "core-entry", className: t, children: o });
44
44
  export {
45
45
  m as C
46
46
  };
@@ -0,0 +1,9 @@
1
+ import { jsx as t } from "react/jsx-runtime";
2
+ import { forwardRef as a } from "react";
3
+ const d = a(
4
+ ({ children: o, className: r = "", ...i }, s) => /* @__PURE__ */ t("div", { ref: s, className: `rds-light ${r}`, ...i, children: o })
5
+ );
6
+ d.displayName = "LightMode";
7
+ export {
8
+ d as L
9
+ };
@@ -0,0 +1,6 @@
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import { C as s } from "./Core-DVnHiJm2.mjs";
3
+ const m = ({ children: r }) => /* @__PURE__ */ o(s, { brand: "rtv", children: r });
4
+ export {
5
+ m as R
6
+ };
@@ -0,0 +1,6 @@
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import { C as m } from "./Core-DVnHiJm2.mjs";
3
+ const i = ({ children: r }) => /* @__PURE__ */ o(m, { brand: "strm", children: r });
4
+ export {
5
+ i as S
6
+ };
@@ -0,0 +1,44 @@
1
+ import { jsxs as n, jsx as l } from "react/jsx-runtime";
2
+ const f = ({
3
+ label: a,
4
+ id: s,
5
+ options: r,
6
+ onChange: t,
7
+ className: o = "",
8
+ defaultValue: h,
9
+ rightIcon: m,
10
+ leftIcon: c,
11
+ innerRef: v,
12
+ ...u
13
+ }) => {
14
+ var i;
15
+ const p = `dropdown-styling ${c ? "menu-with-left-icon" : ""} ${o}`;
16
+ return /* @__PURE__ */ n("span", { className: p, children: [
17
+ /* @__PURE__ */ l("label", { htmlFor: s, children: a }),
18
+ /* @__PURE__ */ n("div", { className: "select-wrapper", children: [
19
+ /* @__PURE__ */ l(
20
+ "select",
21
+ {
22
+ defaultValue: h,
23
+ value: (i = r.find((e) => e.selected)) == null ? void 0 : i.value,
24
+ id: s,
25
+ ref: v,
26
+ onChange: ({ target: e }) => {
27
+ const d = r.find((w) => w.value === e.value) ?? r[0];
28
+ t(d);
29
+ },
30
+ ...u,
31
+ children: r.map((e, d) => /* @__PURE__ */ l("option", { value: e.value, children: e.title }, `dropdown-${a}-${e.title}-${d}`))
32
+ }
33
+ ),
34
+ /* @__PURE__ */ n("div", { children: [
35
+ /* @__PURE__ */ l("div", { className: "left-icon", children: c }),
36
+ /* @__PURE__ */ l("div", { className: "right-icon", children: m })
37
+ ] })
38
+ ] })
39
+ ] });
40
+ };
41
+ f.displayName = "Dropdown";
42
+ export {
43
+ f as D
44
+ };
@@ -1,4 +1,5 @@
1
- import { RefObject, JSX } from 'react';
1
+ import { RefObject } from 'react';
2
+ import { JSX } from 'react/jsx-runtime';
2
3
 
3
4
  interface BaseDropdownOption {
4
5
  title: string;
@@ -18,7 +19,7 @@ interface DropdownProps<T extends BaseDropdownOption> {
18
19
  innerRef?: RefObject<HTMLSelectElement | null>;
19
20
  }
20
21
  export declare const Dropdown: {
21
- <T extends BaseDropdownOption>({ label, id, options, onChange, className, defaultValue, rightIcon, leftIcon, innerRef, ...rest }: DropdownProps<T>): import("react/jsx-runtime").JSX.Element;
22
+ <T extends BaseDropdownOption>({ label, id, options, onChange, className, defaultValue, rightIcon, leftIcon, innerRef, ...rest }: DropdownProps<T>): JSX.Element;
22
23
  displayName: string;
23
24
  };
24
25
  export {};
@@ -1,5 +1,5 @@
1
- import { j as l } from "../accordion/Accordion-C-Lu1AN3.mjs";
2
- const o = () => /* @__PURE__ */ l.jsx("svg", { "aria-label": "Pil", viewBox: "0 0 32 32", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ l.jsx(
1
+ import { jsx as l } from "react/jsx-runtime";
2
+ const o = () => /* @__PURE__ */ l("svg", { "aria-label": "Pil", viewBox: "0 0 32 32", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ l(
3
3
  "path",
4
4
  {
5
5
  fill: "currentColor",
@@ -1,5 +1,5 @@
1
- import { j as l } from "../accordion/Accordion-C-Lu1AN3.mjs";
2
- const o = () => /* @__PURE__ */ l.jsx("svg", { "aria-label": "Vertikal pil", width: "100%", viewBox: "0 0 24 25", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ l.jsx(
1
+ import { jsx as l } from "react/jsx-runtime";
2
+ const o = () => /* @__PURE__ */ l("svg", { "aria-label": "Vertikal pil", width: "100%", viewBox: "0 0 24 25", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ l(
3
3
  "path",
4
4
  {
5
5
  fillRule: "evenodd",
@@ -1,12 +1,12 @@
1
- import { j as C } from "../accordion/Accordion-C-Lu1AN3.mjs";
1
+ import { jsx as C } from "react/jsx-runtime";
2
2
  import * as t from "react";
3
- const a = (e) => /* @__PURE__ */ t.createElement("svg", { "aria-label": "Hjerte", "data-testid": "heart-svg", width: "100%", viewBox: "0 0 18 17", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ t.createElement("path", { fill: "currentColor", d: "M17.475 3.55698C17.1223 2.87016 16.6134 2.27565 15.9893 1.8212C15.3651 1.36675 14.643 1.06504 13.8811 0.940313C13.1192 0.815585 12.3386 0.871315 11.6021 1.10303C10.8656 1.33474 10.1938 1.73597 9.64048 2.27448L8.99998 2.86023L8.37973 2.29548C7.82775 1.74653 7.15272 1.33726 6.41074 1.10168C5.66877 0.86609 4.88128 0.811 4.11373 0.940982C3.35063 1.05996 2.62693 1.35931 2.00276 1.81416C1.37859 2.26902 0.871968 2.86625 0.52498 3.55623C0.0611608 4.46517 -0.100918 5.49827 0.0622681 6.50558C0.225455 7.51288 0.705414 8.44197 1.43248 9.15798L8.46223 16.4C8.53213 16.4719 8.61573 16.529 8.70809 16.568C8.80046 16.6071 8.89971 16.6272 8.99998 16.6272C9.10025 16.6272 9.1995 16.6071 9.29187 16.568C9.38423 16.529 9.46783 16.4719 9.53773 16.4L16.5577 9.17148C17.2878 8.45478 17.7703 7.52401 17.9352 6.51435C18.1002 5.5047 17.939 4.46875 17.475 3.55698Z" })), r = (e) => /* @__PURE__ */ t.createElement("svg", { "aria-label": "Omriss av et hjerte", "data-testid": "unheart-svg", width: "100%", viewBox: "0 0 20 17", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ t.createElement("path", { fill: "currentColor", fillRule: "evenodd", clipRule: "evenodd", d: "M7.49023 0.851471C6.70898 0.603418 5.87985 0.545278 5.07165 0.681868C4.2679 0.807458 3.50567 1.12289 2.84821 1.60201C2.1905 2.08131 1.65661 2.71058 1.29086 3.43759C0.801947 4.39607 0.631125 5.4854 0.803195 6.54754C0.975147 7.60895 1.48058 8.58802 2.24621 9.3429L9.27407 16.583C9.36843 16.68 9.48129 16.7572 9.60598 16.8098C9.73067 16.8625 9.86466 16.8897 10 16.8897C10.1354 16.8897 10.2694 16.8625 10.3941 16.8098C10.5188 16.7572 10.6317 16.6799 10.7261 16.5829L17.7439 9.35657C18.5125 8.60106 19.0206 7.62037 19.1944 6.55667C19.3683 5.49192 19.1983 4.39944 18.709 3.43792L18.7085 3.43706C18.3371 2.71372 17.8012 2.08759 17.1438 1.60898C16.4865 1.13036 15.726 0.81261 14.9236 0.681249C14.1211 0.549888 13.299 0.608582 12.5234 0.852614C11.749 1.09623 11.0425 1.51778 10.4604 2.08347L9.99964 2.50486L9.56073 2.10522C8.97989 1.52889 8.27016 1.09911 7.49023 0.851471ZM5.34545 2.30899C5.89528 2.21588 6.45939 2.25534 6.9909 2.4241C7.52241 2.59286 8.00597 2.88605 8.40138 3.27928L8.42305 3.30083L10.0021 4.73857L11.5899 3.28665L11.6083 3.26875C12.0061 2.8816 12.4891 2.59314 13.0186 2.42656C13.548 2.25997 14.1092 2.21991 14.657 2.30958C15.2048 2.39925 15.7239 2.61615 16.1726 2.94287C16.6206 3.26907 16.986 3.69565 17.2395 4.18843C17.5689 4.83669 17.6832 5.57299 17.566 6.29063C17.4486 7.00907 17.1052 7.67138 16.5858 8.18136L16.5761 8.1907L10.0001 14.962L3.41934 8.18242L3.4061 8.16937C2.8892 7.66033 2.54798 6.99981 2.43196 6.28368C2.31595 5.56755 2.43119 4.83309 2.76094 4.18689L2.76461 4.1796C3.01241 3.68684 3.37422 3.26033 3.81997 2.93549C4.26572 2.61066 4.78255 2.39688 5.32753 2.31191L5.3348 2.3108L5.34545 2.30899Z" })), s = ({ checked: e }) => /* @__PURE__ */ C.jsx(
3
+ const a = (e) => /* @__PURE__ */ t.createElement("svg", { "aria-label": "Hjerte", "data-testid": "heart-svg", width: "100%", viewBox: "0 0 18 17", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ t.createElement("path", { fill: "currentColor", d: "M17.475 3.55698C17.1223 2.87016 16.6134 2.27565 15.9893 1.8212C15.3651 1.36675 14.643 1.06504 13.8811 0.940313C13.1192 0.815585 12.3386 0.871315 11.6021 1.10303C10.8656 1.33474 10.1938 1.73597 9.64048 2.27448L8.99998 2.86023L8.37973 2.29548C7.82775 1.74653 7.15272 1.33726 6.41074 1.10168C5.66877 0.86609 4.88128 0.811 4.11373 0.940982C3.35063 1.05996 2.62693 1.35931 2.00276 1.81416C1.37859 2.26902 0.871968 2.86625 0.52498 3.55623C0.0611608 4.46517 -0.100918 5.49827 0.0622681 6.50558C0.225455 7.51288 0.705414 8.44197 1.43248 9.15798L8.46223 16.4C8.53213 16.4719 8.61573 16.529 8.70809 16.568C8.80046 16.6071 8.89971 16.6272 8.99998 16.6272C9.10025 16.6272 9.1995 16.6071 9.29187 16.568C9.38423 16.529 9.46783 16.4719 9.53773 16.4L16.5577 9.17148C17.2878 8.45478 17.7703 7.52401 17.9352 6.51435C18.1002 5.5047 17.939 4.46875 17.475 3.55698Z" })), r = (e) => /* @__PURE__ */ t.createElement("svg", { "aria-label": "Omriss av et hjerte", "data-testid": "unheart-svg", width: "100%", viewBox: "0 0 20 17", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ t.createElement("path", { fill: "currentColor", fillRule: "evenodd", clipRule: "evenodd", d: "M7.49023 0.851471C6.70898 0.603418 5.87985 0.545278 5.07165 0.681868C4.2679 0.807458 3.50567 1.12289 2.84821 1.60201C2.1905 2.08131 1.65661 2.71058 1.29086 3.43759C0.801947 4.39607 0.631125 5.4854 0.803195 6.54754C0.975147 7.60895 1.48058 8.58802 2.24621 9.3429L9.27407 16.583C9.36843 16.68 9.48129 16.7572 9.60598 16.8098C9.73067 16.8625 9.86466 16.8897 10 16.8897C10.1354 16.8897 10.2694 16.8625 10.3941 16.8098C10.5188 16.7572 10.6317 16.6799 10.7261 16.5829L17.7439 9.35657C18.5125 8.60106 19.0206 7.62037 19.1944 6.55667C19.3683 5.49192 19.1983 4.39944 18.709 3.43792L18.7085 3.43706C18.3371 2.71372 17.8012 2.08759 17.1438 1.60898C16.4865 1.13036 15.726 0.81261 14.9236 0.681249C14.1211 0.549888 13.299 0.608582 12.5234 0.852614C11.749 1.09623 11.0425 1.51778 10.4604 2.08347L9.99964 2.50486L9.56073 2.10522C8.97989 1.52889 8.27016 1.09911 7.49023 0.851471ZM5.34545 2.30899C5.89528 2.21588 6.45939 2.25534 6.9909 2.4241C7.52241 2.59286 8.00597 2.88605 8.40138 3.27928L8.42305 3.30083L10.0021 4.73857L11.5899 3.28665L11.6083 3.26875C12.0061 2.8816 12.4891 2.59314 13.0186 2.42656C13.548 2.25997 14.1092 2.21991 14.657 2.30958C15.2048 2.39925 15.7239 2.61615 16.1726 2.94287C16.6206 3.26907 16.986 3.69565 17.2395 4.18843C17.5689 4.83669 17.6832 5.57299 17.566 6.29063C17.4486 7.00907 17.1052 7.67138 16.5858 8.18136L16.5761 8.1907L10.0001 14.962L3.41934 8.18242L3.4061 8.16937C2.8892 7.66033 2.54798 6.99981 2.43196 6.28368C2.31595 5.56755 2.43119 4.83309 2.76094 4.18689L2.76461 4.1796C3.01241 3.68684 3.37422 3.26033 3.81997 2.93549C4.26572 2.61066 4.78255 2.39688 5.32753 2.31191L5.3348 2.3108L5.34545 2.30899Z" })), s = ({ checked: e }) => /* @__PURE__ */ C(
4
4
  "span",
5
5
  {
6
6
  className: `rds-icon__heart-toggle ${e ? "rds-icon__heart-toggle--checked" : ""}`,
7
7
  "data-testid": e ? "heart" : "unheart",
8
8
  "aria-label": e ? "Markert" : "Ikke markert",
9
- children: e ? /* @__PURE__ */ C.jsx(a, {}) : /* @__PURE__ */ C.jsx(r, {})
9
+ children: e ? /* @__PURE__ */ C(a, {}) : /* @__PURE__ */ C(r, {})
10
10
  }
11
11
  );
12
12
  export {