@rikstv/shared-components 3.2.1-4 → 3.2.1-alpha.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.
- package/dist/components/accordion/Accordion-C-Lu1AN3.mjs +311 -0
- package/dist/components/alert/Alert-C2ywNHz1.mjs +68 -0
- package/dist/components/breadcrumb/Breadcrumb-Dpi45ZU-.mjs +21 -0
- package/dist/components/button/{ArrowButton-DqViaPQ-.mjs → ArrowButton-DMr9aNBX.mjs} +11 -11
- package/dist/components/button/BaseButton-BDwLDH8l.mjs +46 -0
- package/dist/components/button/BaseButton.d.ts +1 -2
- package/dist/components/button/BaseDecoratedButton-ChPN1ek7.mjs +15 -0
- package/dist/components/button/BaseDecoratedButton.d.ts +1 -1
- package/dist/components/button/{BaseLinkButton-niQ474XP.mjs → BaseLinkButton-BsJ_29CO.mjs} +13 -13
- package/dist/components/button/BaseLinkButton.d.ts +1 -1
- package/dist/components/button/Button-ChxzP0BI.mjs +19 -0
- package/dist/components/button/DecoratedButton-BPD31Ccf.mjs +26 -0
- package/dist/components/button/IconButton-DYRG4f36.mjs +18 -0
- package/dist/components/button/IconButton.d.ts +1 -1
- package/dist/components/checkbox/BaseCheckbox-Ds7EbRAQ.mjs +41 -0
- package/dist/components/checkbox/Checkbox-DqG1H_l_.mjs +22 -0
- package/dist/components/core/{Core-DVnHiJm2.mjs → Core-GV7d4sn7.mjs} +10 -10
- package/dist/components/core/LightMode-QGX5KWDc.mjs +9 -0
- package/dist/components/core/RiksTV-CLsPQKYj.mjs +6 -0
- package/dist/components/core/Strim-D7gNGKkV.mjs +6 -0
- package/dist/components/dropdown/Dropdown-U7w2rrui.mjs +44 -0
- package/dist/components/dropdown/Dropdown.d.ts +2 -3
- package/dist/components/icons/{Arrow-DlptGprM.mjs → Arrow-DpNA_SD7.mjs} +2 -2
- package/dist/components/icons/{Chevron-BBlkokQX.mjs → Chevron-D7z5f5Ni.mjs} +2 -2
- package/dist/components/icons/{HeartToggle-Bwgo4FxH.mjs → HeartToggle-Buv7f9yB.mjs} +3 -3
- package/dist/components/icons/{Icons-CVv5JxOX.mjs → Icons-D0X7KrxA.mjs} +3 -3
- package/dist/components/list/CheckmarkListItem-DDP1qoW4.mjs +9 -0
- package/dist/components/list/CrossmarkListItem-CbzfzRC4.mjs +9 -0
- package/dist/components/list/{List-4jHnUXn_.mjs → List-DbnDS6C4.mjs} +3 -3
- package/dist/components/list/ListItem-CQZq9GfN.mjs +34 -0
- package/dist/components/list/ListItem.d.ts +1 -2
- package/dist/components/list/OrderedListItem-CjcJ5-Li.mjs +5 -0
- package/dist/components/loader/Loader-D_bteiXh.mjs +21 -0
- package/dist/components/loader/RawLoader-5VXTs9nJ.mjs +47 -0
- package/dist/components/notificationDot/{NotificationDot-C2_j4FdL.mjs → NotificationDot-pljIxRxJ.mjs} +6 -6
- package/dist/components/panel/Panel-CrtDgKD_.mjs +59 -0
- package/dist/components/progress/CircularProgress-CopS-z4L.mjs +50 -0
- package/dist/components/progress/Progress-_FQvkoIg.mjs +26 -0
- package/dist/components/spacing/Gutter-BG0NTrtn.mjs +5 -0
- package/dist/components/spacing/GutterPadding-n99wy2ws.mjs +5 -0
- package/dist/components/textfield/PasswordTextField-OBI71D--.mjs +22 -0
- package/dist/components/textfield/TextField-BCS5Ve2N.mjs +76 -0
- package/dist/components/toggle/FieldSet-DOEdpTZk.mjs +13 -0
- package/dist/components/toggle/RadioToggle-EoTh0Vv6.mjs +17 -0
- package/dist/components/toggleButton/ToggleButton-BYIO805O.mjs +47 -0
- package/dist/components/toggleButton/ToggleButton.d.ts +1 -2
- package/dist/components/toggleInlineButton/ToggleInlineButton-BgOpE9Ya.mjs +40 -0
- package/dist/components/toggleLinkButton/ToggleLinkButton-DuHYN8Qo.mjs +37 -0
- package/dist/components/typography/{Typography-CXNJ1SFo.mjs → Typography-BDz_QfCz.mjs} +18 -18
- package/dist/shared-components.mjs +33 -33
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/components/accordion/Accordion-rewqLwCV.mjs +0 -34
- package/dist/components/alert/Alert-pjg9sCaq.mjs +0 -68
- package/dist/components/breadcrumb/Breadcrumb-BJNLZ7iB.mjs +0 -21
- package/dist/components/button/BaseButton-Bhxc5Zyj.mjs +0 -46
- package/dist/components/button/BaseDecoratedButton-5on1OJrJ.mjs +0 -15
- package/dist/components/button/Button-DGXKZhwG.mjs +0 -19
- package/dist/components/button/DecoratedButton-D1hX-3Iw.mjs +0 -26
- package/dist/components/button/IconButton-DVEZ8K3d.mjs +0 -18
- package/dist/components/checkbox/BaseCheckbox-BGkrjof6.mjs +0 -41
- package/dist/components/checkbox/Checkbox-Cl4PCYXu.mjs +0 -22
- package/dist/components/core/LightMode-DPAa0Pv9.mjs +0 -9
- package/dist/components/core/RiksTV-CxHetJcp.mjs +0 -6
- package/dist/components/core/Strim-C1ajVDCm.mjs +0 -6
- package/dist/components/dropdown/Dropdown-CWVW7rKD.mjs +0 -44
- package/dist/components/list/CheckmarkListItem-D86vlUxv.mjs +0 -9
- package/dist/components/list/CrossmarkListItem-CXIrUTPd.mjs +0 -9
- package/dist/components/list/ListItem-ClQsSisn.mjs +0 -34
- package/dist/components/list/OrderedListItem-CphW2Aa0.mjs +0 -5
- package/dist/components/loader/Loader-gjL6yh1f.mjs +0 -21
- package/dist/components/loader/RawLoader-BpIpTIRJ.mjs +0 -47
- package/dist/components/panel/Panel-CPz2fLQW.mjs +0 -59
- package/dist/components/progress/CircularProgress-CD_dLu6N.mjs +0 -50
- package/dist/components/progress/Progress-CjnegHvC.mjs +0 -26
- package/dist/components/spacing/Gutter-PXX_UdiX.mjs +0 -5
- package/dist/components/spacing/GutterPadding-Bd7tSm3F.mjs +0 -5
- package/dist/components/textfield/PasswordTextField-BfvT8zYj.mjs +0 -22
- package/dist/components/textfield/TextField-Ct-ceRzE.mjs +0 -76
- package/dist/components/toggle/FieldSet-BM_JN_UL.mjs +0 -13
- package/dist/components/toggle/RadioToggle-C_79eEFl.mjs +0 -17
- package/dist/components/toggleButton/ToggleButton-CGLyQll6.mjs +0 -47
- package/dist/components/toggleInlineButton/ToggleInlineButton-Cnet1doK.mjs +0 -40
- package/dist/components/toggleLinkButton/ToggleLinkButton-W1wyWc93.mjs +0 -37
|
@@ -1,26 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
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,41 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,22 +0,0 @@
|
|
|
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,9 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,44 +0,0 @@
|
|
|
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,9 +0,0 @@
|
|
|
1
|
-
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import "react";
|
|
3
|
-
import "../icons/HeartToggle-Bwgo4FxH.mjs";
|
|
4
|
-
import { d as o } from "../icons/Icons-CVv5JxOX.mjs";
|
|
5
|
-
import { L as i } from "./ListItem-ClQsSisn.mjs";
|
|
6
|
-
const k = ({ children: r, ...m }) => /* @__PURE__ */ t(i, { testId: "rds-list-item--check", icon: /* @__PURE__ */ t(o, {}), ...m, children: r });
|
|
7
|
-
export {
|
|
8
|
-
k as C
|
|
9
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import "react";
|
|
3
|
-
import "../icons/HeartToggle-Bwgo4FxH.mjs";
|
|
4
|
-
import { S as o } from "../icons/Icons-CVv5JxOX.mjs";
|
|
5
|
-
import { L as m } from "./ListItem-ClQsSisn.mjs";
|
|
6
|
-
const f = ({ children: r, ...s }) => /* @__PURE__ */ t(m, { testId: "rds-list-item--cross", icon: /* @__PURE__ */ t(o, {}), ...s, children: r });
|
|
7
|
-
export {
|
|
8
|
-
f as C
|
|
9
|
-
};
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { jsxs as n, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
const m = (e) => {
|
|
3
|
-
switch (e) {
|
|
4
|
-
case "error":
|
|
5
|
-
return { "--mark-color": "var(--rds-feedback-error-dark)" };
|
|
6
|
-
case "success":
|
|
7
|
-
return { "--mark-color": "var(--rds-feedback-success)" };
|
|
8
|
-
case "faded":
|
|
9
|
-
return { "--mark-color": "var(--rds-foreground-secondary)" };
|
|
10
|
-
default:
|
|
11
|
-
return;
|
|
12
|
-
}
|
|
13
|
-
}, f = ({
|
|
14
|
-
className: e = "",
|
|
15
|
-
children: s,
|
|
16
|
-
innerClassName: a = "",
|
|
17
|
-
icon: c,
|
|
18
|
-
testId: t = "rds-list-item",
|
|
19
|
-
style: l,
|
|
20
|
-
color: o,
|
|
21
|
-
...d
|
|
22
|
-
}) => {
|
|
23
|
-
const i = {
|
|
24
|
-
...l,
|
|
25
|
-
...m(o)
|
|
26
|
-
};
|
|
27
|
-
return /* @__PURE__ */ n("li", { className: `rds-list__item ${e}`, "data-testid": t, style: i, ...d, children: [
|
|
28
|
-
/* @__PURE__ */ r("span", { className: "rds-list__item--svg-wrapper", children: c || /* @__PURE__ */ r("svg", { viewBox: "0 0 24 24", children: /* @__PURE__ */ r("circle", { cx: "12", cy: "12", r: "5", fill: "currentColor" }) }) }),
|
|
29
|
-
/* @__PURE__ */ r("span", { className: `${a}`, children: s })
|
|
30
|
-
] });
|
|
31
|
-
};
|
|
32
|
-
export {
|
|
33
|
-
f as L
|
|
34
|
-
};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
const a = ({ className: r = "", innerClassName: s = "", children: t, ...d }) => /* @__PURE__ */ e("li", { className: `rds-list__item__ordered ${r}`, "data-testid": "rds-ordered-list-item", ...d, children: /* @__PURE__ */ e("span", { className: `${s}`, children: t }) });
|
|
3
|
-
export {
|
|
4
|
-
a as O
|
|
5
|
-
};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as m, useState as u, useEffect as f } from "react";
|
|
3
|
-
import { R as a } from "./RawLoader-BpIpTIRJ.mjs";
|
|
4
|
-
const p = (r) => {
|
|
5
|
-
const [e, t] = u(r === 0);
|
|
6
|
-
return f(() => {
|
|
7
|
-
if (r === 0)
|
|
8
|
-
return;
|
|
9
|
-
const o = setTimeout(() => t(!0), r);
|
|
10
|
-
return () => {
|
|
11
|
-
clearTimeout(o);
|
|
12
|
-
};
|
|
13
|
-
}, [r]), [e];
|
|
14
|
-
}, s = m(({ delay: r = 200, ...e }, t) => {
|
|
15
|
-
const [o] = p(r);
|
|
16
|
-
return o ? /* @__PURE__ */ n(a, { ref: t, ...e }) : null;
|
|
17
|
-
});
|
|
18
|
-
s.displayName = "Loader";
|
|
19
|
-
export {
|
|
20
|
-
s as L
|
|
21
|
-
};
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { jsx as a, jsxs as t } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as o } from "react";
|
|
3
|
-
const l = o(
|
|
4
|
-
({ size: r = "small", className: n = "", lightBackground: e, label: s = "Laster", politeness: p = "polite", ...d }, i) => /* @__PURE__ */ a(
|
|
5
|
-
"div",
|
|
6
|
-
{
|
|
7
|
-
ref: i,
|
|
8
|
-
"aria-label": s,
|
|
9
|
-
"aria-busy": "true",
|
|
10
|
-
"aria-live": p,
|
|
11
|
-
role: "alert",
|
|
12
|
-
title: s,
|
|
13
|
-
className: `rds-loader-container ${e ? "rds-loader-container--light" : ""} ${n}`,
|
|
14
|
-
"data-testid": "rds-loader",
|
|
15
|
-
...d,
|
|
16
|
-
children: /* @__PURE__ */ t(
|
|
17
|
-
"div",
|
|
18
|
-
{
|
|
19
|
-
"data-testid": "rds-spinner",
|
|
20
|
-
className: `rds-loader-container__spinner rds-loader-container__spinner__${r}`,
|
|
21
|
-
children: [
|
|
22
|
-
/* @__PURE__ */ a("span", {}),
|
|
23
|
-
/* @__PURE__ */ a("span", {}),
|
|
24
|
-
/* @__PURE__ */ a("span", {}),
|
|
25
|
-
/* @__PURE__ */ a("span", {}),
|
|
26
|
-
/* @__PURE__ */ a("span", {}),
|
|
27
|
-
/* @__PURE__ */ a("span", {}),
|
|
28
|
-
/* @__PURE__ */ a("span", {}),
|
|
29
|
-
/* @__PURE__ */ a("span", {}),
|
|
30
|
-
/* @__PURE__ */ a("span", {}),
|
|
31
|
-
/* @__PURE__ */ a("span", {}),
|
|
32
|
-
/* @__PURE__ */ a("span", {}),
|
|
33
|
-
/* @__PURE__ */ a("span", {}),
|
|
34
|
-
/* @__PURE__ */ a("span", {}),
|
|
35
|
-
/* @__PURE__ */ a("span", {}),
|
|
36
|
-
/* @__PURE__ */ a("span", {}),
|
|
37
|
-
/* @__PURE__ */ a("span", {})
|
|
38
|
-
]
|
|
39
|
-
}
|
|
40
|
-
)
|
|
41
|
-
}
|
|
42
|
-
)
|
|
43
|
-
);
|
|
44
|
-
l.displayName = "RawLoader";
|
|
45
|
-
export {
|
|
46
|
-
l as R
|
|
47
|
-
};
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { jsxs as e, jsx as s } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as v } from "react";
|
|
3
|
-
import { S as N } from "../typography/Typography-CXNJ1SFo.mjs";
|
|
4
|
-
import "../icons/HeartToggle-Bwgo4FxH.mjs";
|
|
5
|
-
import { b as l, c as b, a as P } from "../icons/Icons-CVv5JxOX.mjs";
|
|
6
|
-
const y = "_rds-panel_297es_1", A = "_content-and-buttons_297es_34", S = "_content_297es_34", j = "_title_297es_60", k = "_icon_297es_68", x = "_buttons_297es_75", n = {
|
|
7
|
-
rdsPanel: y,
|
|
8
|
-
contentAndButtons: A,
|
|
9
|
-
content: S,
|
|
10
|
-
title: j,
|
|
11
|
-
icon: k,
|
|
12
|
-
buttons: x
|
|
13
|
-
}, B = {
|
|
14
|
-
error: {
|
|
15
|
-
title: "Feil",
|
|
16
|
-
icon: /* @__PURE__ */ s(l, {})
|
|
17
|
-
},
|
|
18
|
-
info: {
|
|
19
|
-
title: "Informasjon",
|
|
20
|
-
icon: /* @__PURE__ */ s(l, {})
|
|
21
|
-
},
|
|
22
|
-
success: {
|
|
23
|
-
title: "Vellykket",
|
|
24
|
-
icon: /* @__PURE__ */ s(b, {})
|
|
25
|
-
},
|
|
26
|
-
warning: {
|
|
27
|
-
title: "Advarsel",
|
|
28
|
-
icon: /* @__PURE__ */ s(P, {})
|
|
29
|
-
}
|
|
30
|
-
}, C = v(
|
|
31
|
-
({ className: r = "", intent: o = "info", heading: t, action: c, id: i, children: a, ..._ }, m) => {
|
|
32
|
-
const { title: p, icon: d } = B[o], f = typeof t == "string" ? t : (t == null ? void 0 : t.title) ?? p, u = typeof t == "string" ? "span" : (t == null ? void 0 : t.level) ?? "span";
|
|
33
|
-
return /* @__PURE__ */ e(
|
|
34
|
-
"div",
|
|
35
|
-
{
|
|
36
|
-
id: i,
|
|
37
|
-
className: `${n.rdsPanel} ${r}`,
|
|
38
|
-
"data-testid": "rds-panel",
|
|
39
|
-
"data-intent": o,
|
|
40
|
-
ref: m,
|
|
41
|
-
..._,
|
|
42
|
-
children: [
|
|
43
|
-
/* @__PURE__ */ s("span", { className: n.icon, children: d }),
|
|
44
|
-
/* @__PURE__ */ e("div", { className: n.contentAndButtons, children: [
|
|
45
|
-
/* @__PURE__ */ e("div", { className: n.content, children: [
|
|
46
|
-
/* @__PURE__ */ s(u, { className: `${n.title} rds-title-4`, children: f }),
|
|
47
|
-
/* @__PURE__ */ s(N, { children: a })
|
|
48
|
-
] }),
|
|
49
|
-
c && /* @__PURE__ */ s("div", { className: n.buttons, children: c })
|
|
50
|
-
] })
|
|
51
|
-
]
|
|
52
|
-
}
|
|
53
|
-
);
|
|
54
|
-
}
|
|
55
|
-
);
|
|
56
|
-
C.displayName = "Panel";
|
|
57
|
-
export {
|
|
58
|
-
C as P
|
|
59
|
-
};
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { jsxs as e, Fragment as u, jsx as s } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as m, useState as t, useEffect as f } from "react";
|
|
3
|
-
import { S as h } from "../typography/Typography-CXNJ1SFo.mjs";
|
|
4
|
-
const x = ({ progressRatio: r }) => (1 - r) * 100 * Math.PI, _ = m(
|
|
5
|
-
({ progressRatio: r, label: a, size: l = "small", className: c = "", children: d, ...o }, i) => {
|
|
6
|
-
const [n, p] = t(0), [g] = t(l === "small" ? "160px" : "260px");
|
|
7
|
-
return f(() => {
|
|
8
|
-
p(x({ progressRatio: r }));
|
|
9
|
-
}, [r]), /* @__PURE__ */ e(u, { children: [
|
|
10
|
-
/* @__PURE__ */ e("label", { className: "sr-only", "data-testid": "rds-progress__label", children: [
|
|
11
|
-
a,
|
|
12
|
-
/* @__PURE__ */ s("progress", { "data-testid": "rds-progress__progress", value: r, max: 1 })
|
|
13
|
-
] }),
|
|
14
|
-
/* @__PURE__ */ e(
|
|
15
|
-
"div",
|
|
16
|
-
{
|
|
17
|
-
ref: i,
|
|
18
|
-
"data-testid": "rds-progress",
|
|
19
|
-
className: `rds-progress--circular ${c}`,
|
|
20
|
-
style: { "--progress-circle-size": g },
|
|
21
|
-
...o,
|
|
22
|
-
children: [
|
|
23
|
-
/* @__PURE__ */ s("div", { className: "rds-progress--circular__outer", "data-testid": "rds-progress__content", children: d || /* @__PURE__ */ s(h, { "data-testid": "rds-progress__default-text", lookLike: "title-3", children: r === 1 ? "Du er i mål!" : `${r * 100} %` }) }),
|
|
24
|
-
/* @__PURE__ */ e(
|
|
25
|
-
"svg",
|
|
26
|
-
{
|
|
27
|
-
style: { "--calculated-progress": n, "--progress": `${r + 1}s` },
|
|
28
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
29
|
-
version: "1.1",
|
|
30
|
-
viewBox: "-10 0 120 100",
|
|
31
|
-
children: [
|
|
32
|
-
/* @__PURE__ */ s("defs", { children: /* @__PURE__ */ e("linearGradient", { id: "GradientColor", children: [
|
|
33
|
-
/* @__PURE__ */ s("stop", { offset: "0%", stopColor: "var(--rds-heading-accent)" }),
|
|
34
|
-
/* @__PURE__ */ s("stop", { offset: "100%", stopColor: "var(--rds-background-card)" })
|
|
35
|
-
] }) }),
|
|
36
|
-
/* @__PURE__ */ s("circle", { id: "path", cx: "50", cy: "50", r: "50", strokeLinecap: "round" }),
|
|
37
|
-
/* @__PURE__ */ s("circle", { id: "prog", cx: "50", cy: "50", r: "50", strokeLinecap: "round" })
|
|
38
|
-
]
|
|
39
|
-
}
|
|
40
|
-
)
|
|
41
|
-
]
|
|
42
|
-
}
|
|
43
|
-
)
|
|
44
|
-
] });
|
|
45
|
-
}
|
|
46
|
-
);
|
|
47
|
-
_.displayName = "CircularProgress";
|
|
48
|
-
export {
|
|
49
|
-
_ as C
|
|
50
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { jsxs as a, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as _ } from "react";
|
|
3
|
-
const i = _(
|
|
4
|
-
({ className: d = "", label: o, ratio: s, checkmarkOnDone: e = !1, animateIn: t = !1, ...p }, l) => {
|
|
5
|
-
const g = { "--progress": s };
|
|
6
|
-
return /* @__PURE__ */ a(
|
|
7
|
-
"div",
|
|
8
|
-
{
|
|
9
|
-
"data-testid": "rds-progress__wrapper",
|
|
10
|
-
className: `rds-progress ${t ? "rds-progress--animate" : ""} ${d}`,
|
|
11
|
-
children: [
|
|
12
|
-
/* @__PURE__ */ a("label", { "data-testid": "rds-progress__label", className: "sr-only", children: [
|
|
13
|
-
/* @__PURE__ */ r("progress", { "data-testid": "rds-progress__sr", max: 1, value: s, ref: l, ...p }),
|
|
14
|
-
o
|
|
15
|
-
] }),
|
|
16
|
-
s === 1 && e && /* @__PURE__ */ r("div", { "data-testid": "rds-progress__mark", className: "rds-progress--done" }),
|
|
17
|
-
(s !== 1 || !e) && /* @__PURE__ */ r("div", { className: "rds-progress__track", children: /* @__PURE__ */ r("div", { "data-testid": "rds-progress__bar", style: g, className: "rds-progress__progress" }) })
|
|
18
|
-
]
|
|
19
|
-
}
|
|
20
|
-
);
|
|
21
|
-
}
|
|
22
|
-
);
|
|
23
|
-
i.displayName = "Progress";
|
|
24
|
-
export {
|
|
25
|
-
i as P
|
|
26
|
-
};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { jsxs as d, jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as a, useState as i } from "react";
|
|
3
|
-
import { T as l } from "./TextField-Ct-ceRzE.mjs";
|
|
4
|
-
const n = a(({ ...o }, e) => {
|
|
5
|
-
const [s, r] = i(!1);
|
|
6
|
-
return /* @__PURE__ */ d("div", { style: { position: "relative", boxSizing: "content-box" }, children: [
|
|
7
|
-
/* @__PURE__ */ t(l, { type: s ? "text" : "password", ref: e, ...o }),
|
|
8
|
-
/* @__PURE__ */ t(
|
|
9
|
-
"button",
|
|
10
|
-
{
|
|
11
|
-
type: "button",
|
|
12
|
-
onClick: () => r(!s),
|
|
13
|
-
className: `rds-password-textfield-button ${s ? "rds-password-textfield-button--hide" : "rds-password-textfield-button--show"}`,
|
|
14
|
-
children: /* @__PURE__ */ t("span", { className: "sr-only", children: s ? "Skjul passord" : "Vis passord" })
|
|
15
|
-
}
|
|
16
|
-
)
|
|
17
|
-
] });
|
|
18
|
-
});
|
|
19
|
-
n.displayName = "PasswordTextField";
|
|
20
|
-
export {
|
|
21
|
-
n as P
|
|
22
|
-
};
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import { jsxs as p, jsx as i } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as $, useRef as v, useEffect as C } from "react";
|
|
3
|
-
import { g as x } from "../checkbox/BaseCheckbox-BGkrjof6.mjs";
|
|
4
|
-
const N = (a) => {
|
|
5
|
-
let e = a;
|
|
6
|
-
for (; e; ) {
|
|
7
|
-
const t = window.getComputedStyle(e);
|
|
8
|
-
if (t.backgroundColor !== "rgba(0, 0, 0, 0)" && t.backgroundColor !== "transparent")
|
|
9
|
-
return t.backgroundColor;
|
|
10
|
-
e = e.parentElement;
|
|
11
|
-
}
|
|
12
|
-
return "transparent";
|
|
13
|
-
}, g = $(
|
|
14
|
-
({
|
|
15
|
-
className: a = "",
|
|
16
|
-
id: e,
|
|
17
|
-
labelClass: t = "",
|
|
18
|
-
type: h = "text",
|
|
19
|
-
valid: n,
|
|
20
|
-
lightBackground: d = !1,
|
|
21
|
-
label: s,
|
|
22
|
-
errorMessage: r,
|
|
23
|
-
...b
|
|
24
|
-
}, w) => {
|
|
25
|
-
const o = x(), c = x(e), f = d === "white", u = !r && n, m = !!r || n === !1, l = v(null);
|
|
26
|
-
return C(() => {
|
|
27
|
-
l.current && (l.current.style.backgroundColor = N(l.current));
|
|
28
|
-
}, []), /* @__PURE__ */ p("div", { className: a, children: [
|
|
29
|
-
/* @__PURE__ */ i(
|
|
30
|
-
"div",
|
|
31
|
-
{
|
|
32
|
-
className: `rds-textfield
|
|
33
|
-
${d ? "rds-light" : ""}
|
|
34
|
-
${f ? "rds-white" : ""}`,
|
|
35
|
-
children: /* @__PURE__ */ p(
|
|
36
|
-
"label",
|
|
37
|
-
{
|
|
38
|
-
htmlFor: c,
|
|
39
|
-
className: `rds-textfield-label ${t} ${d ? "rds-light" : ""} ${f ? "rds-white" : ""}`,
|
|
40
|
-
"data-valid": u,
|
|
41
|
-
children: [
|
|
42
|
-
/* @__PURE__ */ i(
|
|
43
|
-
"input",
|
|
44
|
-
{
|
|
45
|
-
ref: w,
|
|
46
|
-
id: c,
|
|
47
|
-
className: `rds-textfield-input ${m ? "rds-textfield-input--error" : ""}`,
|
|
48
|
-
type: h,
|
|
49
|
-
placeholder: s,
|
|
50
|
-
"aria-invalid": m,
|
|
51
|
-
"aria-describedby": r ? o : void 0,
|
|
52
|
-
"data-valid": u,
|
|
53
|
-
...b
|
|
54
|
-
}
|
|
55
|
-
),
|
|
56
|
-
/* @__PURE__ */ i("span", { ref: l, className: "rds-textfield-label-text", children: s })
|
|
57
|
-
]
|
|
58
|
-
}
|
|
59
|
-
)
|
|
60
|
-
}
|
|
61
|
-
),
|
|
62
|
-
r && /* @__PURE__ */ i(
|
|
63
|
-
"span",
|
|
64
|
-
{
|
|
65
|
-
id: o,
|
|
66
|
-
className: `rds-textfield rds-textfield--error-text ${d ? "rds-light" : ""}`,
|
|
67
|
-
children: r
|
|
68
|
-
}
|
|
69
|
-
)
|
|
70
|
-
] });
|
|
71
|
-
}
|
|
72
|
-
);
|
|
73
|
-
g.displayName = "TextField";
|
|
74
|
-
export {
|
|
75
|
-
g as T
|
|
76
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { jsx as e, jsxs as o } from "react/jsx-runtime";
|
|
2
|
-
import { createContext as n, forwardRef as f } from "react";
|
|
3
|
-
const m = n({ radioName: "" }), c = f(
|
|
4
|
-
({ legend: d, children: s, name: r, className: t = "", showLegend: a = !1, ...i }, l) => /* @__PURE__ */ e(m.Provider, { value: { radioName: r }, children: /* @__PURE__ */ o("fieldset", { "data-testid": "fieldset", ...i, className: `rds-field-set ${t}`, ref: l, children: [
|
|
5
|
-
/* @__PURE__ */ e("legend", { className: `rds-field-set__legend ${a ? "" : "sr-only"}`, children: d }),
|
|
6
|
-
s
|
|
7
|
-
] }) })
|
|
8
|
-
);
|
|
9
|
-
c.displayName = "FieldSet";
|
|
10
|
-
export {
|
|
11
|
-
c as F,
|
|
12
|
-
m as R
|
|
13
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { jsxs as d, jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as l, useContext as m } from "react";
|
|
3
|
-
import { R as n } from "./FieldSet-BM_JN_UL.mjs";
|
|
4
|
-
import "../button/ArrowButton-DqViaPQ-.mjs";
|
|
5
|
-
const p = l(
|
|
6
|
-
({ label: a, name: e, className: r = "", ...t }, s) => {
|
|
7
|
-
const { radioName: i } = m(n);
|
|
8
|
-
return /* @__PURE__ */ d("label", { className: `rds-radio-toggle ${r}`, children: [
|
|
9
|
-
/* @__PURE__ */ o("input", { className: "rds-radio-toggle__input", ...t, ref: s, type: "radio", name: i || e }),
|
|
10
|
-
/* @__PURE__ */ o("span", { className: "rds-radio-toggle__label", children: a })
|
|
11
|
-
] });
|
|
12
|
-
}
|
|
13
|
-
);
|
|
14
|
-
p.displayName = "RadioToggleInput";
|
|
15
|
-
export {
|
|
16
|
-
p as R
|
|
17
|
-
};
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { jsx as t, jsxs as l, Fragment as C } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as N, useRef as T, useState as y } from "react";
|
|
3
|
-
import { B } from "../checkbox/BaseCheckbox-BGkrjof6.mjs";
|
|
4
|
-
const R = N(
|
|
5
|
-
({ children: a, className: h = "", defaultChecked: c, icons: e, iconClass: i = "", id: b, onChange: s, alwaysShowLabel: f = !1, ...m }, p) => {
|
|
6
|
-
const I = T(null), [n, g] = y(!!c), r = e && "checkedIcon" in e ? e.checkedIcon : null, d = e && "uncheckedIcon" in e ? e.uncheckedIcon : null, u = e && "toggleIcon" in e ? e.toggleIcon : null, o = p || I, k = (x) => {
|
|
7
|
-
var _;
|
|
8
|
-
typeof s == "function" && s(x), g(typeof o != "function" ? !!((_ = o.current) != null && _.checked) : !n);
|
|
9
|
-
};
|
|
10
|
-
return /* @__PURE__ */ t(
|
|
11
|
-
B,
|
|
12
|
-
{
|
|
13
|
-
id: b,
|
|
14
|
-
ref: o,
|
|
15
|
-
dataTestId: "toggle-button__label",
|
|
16
|
-
containerClassName: h + " rds-toggle-button-container",
|
|
17
|
-
inputClassName: "rds-toggle-button__input",
|
|
18
|
-
labelClassName: "rds-toggle-button",
|
|
19
|
-
onChange: k,
|
|
20
|
-
defaultChecked: c,
|
|
21
|
-
...m,
|
|
22
|
-
children: /* @__PURE__ */ l("span", { className: "rds-toggle-button__content", children: [
|
|
23
|
-
e && /* @__PURE__ */ l(C, { children: [
|
|
24
|
-
/* @__PURE__ */ l("span", { className: `rds-toggle-button__icon ${i}`, children: [
|
|
25
|
-
u && /* @__PURE__ */ t(u, { checked: n }),
|
|
26
|
-
r && n && /* @__PURE__ */ t(r, {}),
|
|
27
|
-
d && !n && /* @__PURE__ */ t(d, {})
|
|
28
|
-
] }),
|
|
29
|
-
/* @__PURE__ */ t(
|
|
30
|
-
"span",
|
|
31
|
-
{
|
|
32
|
-
"data-testid": "toggle-button__icon__label__text",
|
|
33
|
-
className: `label-text__icon ${f ? "always-show-label" : ""}`,
|
|
34
|
-
children: a
|
|
35
|
-
}
|
|
36
|
-
)
|
|
37
|
-
] }),
|
|
38
|
-
!e && /* @__PURE__ */ t("span", { "data-testid": "toggle-button__label__text", children: a })
|
|
39
|
-
] })
|
|
40
|
-
}
|
|
41
|
-
);
|
|
42
|
-
}
|
|
43
|
-
);
|
|
44
|
-
R.displayName = "ToggleButton";
|
|
45
|
-
export {
|
|
46
|
-
R as T
|
|
47
|
-
};
|