@rikstv/shared-components 1.1.97 → 2.0.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.
- package/dist/components/accordion/Accordion-4b8edd28.mjs +669 -0
- package/dist/components/breadcrumb/Breadcrumb-1b579cc3.mjs +21 -0
- package/dist/components/button/ArrowButton-af5de307.mjs +48 -0
- package/dist/components/button/BaseButton-4f6e9dd4.mjs +46 -0
- package/dist/components/button/BaseButton.d.ts +2 -2
- package/dist/components/button/BaseDecoratedButton-c5799b0f.mjs +15 -0
- package/dist/components/button/BaseLinkButton-348be18c.mjs +42 -0
- package/dist/components/button/BaseLinkButton.d.ts +2 -2
- package/dist/components/button/Button-4e09c58d.mjs +17 -0
- package/dist/components/button/DecoratedButton-ab90a6bd.mjs +21 -0
- package/dist/components/button/IconButton-dd3478ff.mjs +15 -0
- package/dist/components/button/LinkButton-85fc759b.mjs +8 -0
- package/dist/components/button/LinkButton.d.ts +1 -1
- package/dist/components/checkbox/BaseCheckbox-6fed1663.mjs +41 -0
- package/dist/components/checkbox/Checkbox-cc58a275.mjs +22 -0
- package/dist/components/core/Core-ba0340f6.mjs +46 -0
- package/dist/components/core/LightMode-b458f91d.mjs +9 -0
- package/dist/components/core/RiksTV-698a6154.mjs +6 -0
- package/dist/components/core/Strim-51ea8e08.mjs +6 -0
- package/dist/components/core/hooks/useBrowserPreferences.d.ts +1 -1
- package/dist/components/icons/{Arrow.js → Arrow-feb3e25e.mjs} +9 -10
- package/dist/components/icons/{Chevron.js → Chevron-ef147695.mjs} +9 -12
- package/dist/components/list/CheckmarkListItem-f9df7013.mjs +38 -0
- package/dist/components/list/CrossmarkListItem-348c226a.mjs +28 -0
- package/dist/components/list/List-86ad4810.mjs +27 -0
- package/dist/components/list/ListItem-4e47bb2e.mjs +5 -0
- package/dist/components/list/OrderedListItem-a70598a1.mjs +5 -0
- package/dist/components/loader/Loader-7ab4a8f0.mjs +21 -0
- package/dist/components/loader/RawLoader-7e00f143.mjs +47 -0
- package/dist/components/notificationDot/NotificationDot-b03fa811.mjs +26 -0
- package/dist/components/panel/{Info.js → Info-7fe85f53.mjs} +20 -12
- package/dist/components/panel/Panel-5cd1bda7.mjs +50 -0
- package/dist/components/panel/{Success.js → Success-c116cc05.mjs} +75 -23
- package/dist/components/panel/Warning-fa1839e3.mjs +11 -0
- package/dist/components/progress/CircularProgress-e4622fd6.mjs +52 -0
- package/dist/components/progress/Progress-ef42810b.mjs +26 -0
- package/dist/components/spacing/Gutter-32112716.mjs +5 -0
- package/dist/components/spacing/GutterPadding-6be6c9d9.mjs +5 -0
- package/dist/components/textfield/TextField-765a87bf.mjs +70 -0
- package/dist/components/toggle/FieldSet-4bdc4b7e.mjs +13 -0
- package/dist/components/toggle/RadioToggle-1528c002.mjs +17 -0
- package/dist/components/toggleButton/ToggleButton-a2d4302f.mjs +47 -0
- package/dist/components/toggleInlineButton/ToggleInlineButton-1e480eaa.mjs +40 -0
- package/dist/components/toggleLinkButton/ToggleLinkButton-08c60e4d.mjs +45 -0
- package/dist/components/typography/Typography-91af1c48.mjs +33 -0
- package/dist/components/typography/Typography.d.ts +2 -2
- package/dist/shared-components.mjs +199 -0
- package/dist/style.css +1 -1
- package/package.json +2 -4
- package/dist/components/accordion/Accordion.js +0 -34
- package/dist/components/breadcrumb/Breadcrumb.js +0 -39
- package/dist/components/button/ArrowButton.js +0 -44
- package/dist/components/button/BaseButton.js +0 -42
- package/dist/components/button/BaseDecoratedButton.js +0 -32
- package/dist/components/button/BaseLinkButton.js +0 -44
- package/dist/components/button/Button.js +0 -29
- package/dist/components/button/DecoratedButton.js +0 -23
- package/dist/components/button/IconButton.js +0 -24
- package/dist/components/button/LinkButton.js +0 -10
- package/dist/components/checkbox/BaseCheckbox.js +0 -35
- package/dist/components/checkbox/Checkbox.js +0 -26
- package/dist/components/core/Core.js +0 -76
- package/dist/components/core/LightMode.js +0 -14
- package/dist/components/core/RiksTV.js +0 -43
- package/dist/components/core/Strim.js +0 -10
- package/dist/components/list/CheckmarkListItem.js +0 -36
- package/dist/components/list/CrossmarkListItem.js +0 -27
- package/dist/components/list/List.js +0 -28
- package/dist/components/list/ListItem.js +0 -19
- package/dist/components/list/OrderedListItem.js +0 -19
- package/dist/components/loader/Loader.js +0 -31
- package/dist/components/loader/RawLoader.js +0 -30
- package/dist/components/notificationDot/NotificationDot.js +0 -22
- package/dist/components/panel/Panel.js +0 -55
- package/dist/components/panel/Warning.js +0 -14
- package/dist/components/progress/CircularProgress.js +0 -87
- package/dist/components/progress/Progress.js +0 -42
- package/dist/components/spacing/Gutter.js +0 -13
- package/dist/components/spacing/GutterPadding.js +0 -13
- package/dist/components/textfield/TextField.js +0 -63
- package/dist/components/toggle/FieldSet.js +0 -29
- package/dist/components/toggle/RadioToggle.js +0 -30
- package/dist/components/toggleButton/ToggleButton.js +0 -64
- package/dist/components/toggleInlineButton/ToggleInlineButton.js +0 -48
- package/dist/components/toggleLinkButton/ToggleLinkButton.js +0 -55
- package/dist/components/typography/Typography.js +0 -67
- package/dist/shared-components.es.js +0 -213
|
@@ -1,25 +1,33 @@
|
|
|
1
|
-
import {
|
|
2
|
-
const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
7
|
-
children: [/* @__PURE__ */ jsx("path", {
|
|
1
|
+
import { j as l } from "../accordion/Accordion-4b8edd28.mjs";
|
|
2
|
+
const C = () => /* @__PURE__ */ l.jsxs("svg", { viewBox: "0 0 18 18", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
3
|
+
/* @__PURE__ */ l.jsx(
|
|
4
|
+
"path",
|
|
5
|
+
{
|
|
8
6
|
fillRule: "evenodd",
|
|
9
7
|
clipRule: "evenodd",
|
|
10
8
|
d: "M7.3125 7.875C7.3125 7.56434 7.56434 7.3125 7.875 7.3125H8.4375C9.05882 7.3125 9.5625 7.81618 9.5625 8.4375V11.25C9.5625 11.5607 9.81434 11.8125 10.125 11.8125H10.6875C10.9982 11.8125 11.25 12.0643 11.25 12.375C11.25 12.6857 10.9982 12.9375 10.6875 12.9375H10.125C9.19302 12.9375 8.4375 12.182 8.4375 11.25V8.4375H7.875C7.56434 8.4375 7.3125 8.18566 7.3125 7.875Z",
|
|
11
9
|
fill: "currentColor"
|
|
12
|
-
}
|
|
10
|
+
}
|
|
11
|
+
),
|
|
12
|
+
/* @__PURE__ */ l.jsx(
|
|
13
|
+
"path",
|
|
14
|
+
{
|
|
13
15
|
fillRule: "evenodd",
|
|
14
16
|
clipRule: "evenodd",
|
|
15
17
|
d: "M7.875 5.34375C7.875 4.87776 8.25276 4.5 8.71875 4.5C9.18474 4.5 9.5625 4.87776 9.5625 5.34375C9.5625 5.80974 9.18474 6.1875 8.71875 6.1875C8.25276 6.1875 7.875 5.80974 7.875 5.34375Z",
|
|
16
18
|
fill: "currentColor"
|
|
17
|
-
}
|
|
19
|
+
}
|
|
20
|
+
),
|
|
21
|
+
/* @__PURE__ */ l.jsx(
|
|
22
|
+
"path",
|
|
23
|
+
{
|
|
18
24
|
fillRule: "evenodd",
|
|
19
25
|
clipRule: "evenodd",
|
|
20
26
|
d: "M0 9C0 4.02944 4.02944 0 9 0C13.9706 0 18 4.02944 18 9C18 13.9706 13.9706 18 9 18C4.02944 18 0 13.9706 0 9ZM9 1.125C4.65076 1.125 1.125 4.65076 1.125 9C1.125 13.3492 4.65076 16.875 9 16.875C13.3492 16.875 16.875 13.3492 16.875 9C16.875 4.65076 13.3492 1.125 9 1.125Z",
|
|
21
27
|
fill: "currentColor"
|
|
22
|
-
}
|
|
23
|
-
|
|
28
|
+
}
|
|
29
|
+
)
|
|
30
|
+
] });
|
|
31
|
+
export {
|
|
32
|
+
C as I
|
|
24
33
|
};
|
|
25
|
-
export { Info as I };
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { j as s } from "../accordion/Accordion-4b8edd28.mjs";
|
|
2
|
+
import { forwardRef as m } from "react";
|
|
3
|
+
import { S as x } from "../typography/Typography-91af1c48.mjs";
|
|
4
|
+
import { S as j } from "./Success-c116cc05.mjs";
|
|
5
|
+
import { W as f } from "./Warning-fa1839e3.mjs";
|
|
6
|
+
import { I as l } from "./Info-7fe85f53.mjs";
|
|
7
|
+
const h = m(
|
|
8
|
+
({
|
|
9
|
+
className: c = "",
|
|
10
|
+
variant: e = "info",
|
|
11
|
+
heading: n,
|
|
12
|
+
action: a,
|
|
13
|
+
lightBackground: o = !1,
|
|
14
|
+
id: _,
|
|
15
|
+
children: t,
|
|
16
|
+
icon: r = "success",
|
|
17
|
+
...d
|
|
18
|
+
}, i) => {
|
|
19
|
+
const p = (n == null ? void 0 : n.level) || "span";
|
|
20
|
+
return /* @__PURE__ */ s.jsxs(
|
|
21
|
+
"div",
|
|
22
|
+
{
|
|
23
|
+
"data-testid": "rds-panel__container",
|
|
24
|
+
id: _,
|
|
25
|
+
className: `rds-panel rds-panel--${e} ${o ? "rds-light" : ""} ${c}`,
|
|
26
|
+
ref: i,
|
|
27
|
+
...d,
|
|
28
|
+
children: [
|
|
29
|
+
/* @__PURE__ */ s.jsxs("div", { className: "rds-panel__content", children: [
|
|
30
|
+
n && /* @__PURE__ */ s.jsxs("div", { className: "rds-panel__content__heading", children: [
|
|
31
|
+
e === "warning" && /* @__PURE__ */ s.jsx("span", { className: "rds-panel__content__heading__icon", children: /* @__PURE__ */ s.jsx(f, {}) }),
|
|
32
|
+
e === "info" && /* @__PURE__ */ s.jsxs("span", { className: "rds-panel__content__heading__icon", children: [
|
|
33
|
+
r === "success" && /* @__PURE__ */ s.jsx(j, {}),
|
|
34
|
+
r === "info" && /* @__PURE__ */ s.jsx(l, {})
|
|
35
|
+
] }),
|
|
36
|
+
e === "error" && /* @__PURE__ */ s.jsx("span", { className: "rds-panel__content__heading__icon", children: /* @__PURE__ */ s.jsx(l, {}) }),
|
|
37
|
+
/* @__PURE__ */ s.jsx(p, { className: "rds-panel__heading rds-title-3", children: /* @__PURE__ */ s.jsx("span", { children: n.text }) })
|
|
38
|
+
] }),
|
|
39
|
+
/* @__PURE__ */ s.jsx(x, { children: t })
|
|
40
|
+
] }),
|
|
41
|
+
a && /* @__PURE__ */ s.jsx("div", { className: "rds-panel__action", children: a })
|
|
42
|
+
]
|
|
43
|
+
}
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
);
|
|
47
|
+
h.displayName = "Panel";
|
|
48
|
+
export {
|
|
49
|
+
h as P
|
|
50
|
+
};
|
|
@@ -1,80 +1,132 @@
|
|
|
1
|
-
import {
|
|
2
|
-
const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
viewBox: "0 0 18 18",
|
|
7
|
-
children: [/* @__PURE__ */ jsx("path", {
|
|
1
|
+
import { j as l } from "../accordion/Accordion-4b8edd28.mjs";
|
|
2
|
+
const d = () => /* @__PURE__ */ l.jsxs("svg", { fill: "none", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 18 18", children: [
|
|
3
|
+
/* @__PURE__ */ l.jsx(
|
|
4
|
+
"path",
|
|
5
|
+
{
|
|
8
6
|
fillRule: "evenodd",
|
|
9
7
|
clipRule: "evenodd",
|
|
10
8
|
d: "M6.23 8.19c.22.66.7 1.44 1.42 2.16.72.72 1.5 1.2 2.16 1.42.7.23 1.07.12 1.22-.03.16-.15.27-.53.04-1.23a5.83 5.83 0 0 0-1.43-2.15A5.83 5.83 0 0 0 7.5 6.93c-.7-.23-1.08-.12-1.23.04-.15.15-.26.53-.03 1.22Zm-1.07.36c-.27-.82-.31-1.76.3-2.38.62-.62 1.56-.58 2.38-.3.86.28 1.78.87 2.6 1.7a6.94 6.94 0 0 1 1.7 2.59c.27.82.3 1.76-.31 2.37-.62.62-1.56.58-2.38.3a6.94 6.94 0 0 1-2.6-1.69 6.94 6.94 0 0 1-1.69-2.6Z",
|
|
11
9
|
fill: "currentColor"
|
|
12
|
-
}
|
|
10
|
+
}
|
|
11
|
+
),
|
|
12
|
+
/* @__PURE__ */ l.jsx(
|
|
13
|
+
"path",
|
|
14
|
+
{
|
|
13
15
|
fillRule: "evenodd",
|
|
14
16
|
clipRule: "evenodd",
|
|
15
17
|
d: "M5.83 6.79c.27.15.36.5.2.76L1.18 16.1a.56.56 0 0 0 .74.74l8.54-4.86a.56.56 0 1 1 .55.97l-8.56 4.88a1.69 1.69 0 0 1-2.26-2.26L5.06 7c.16-.27.5-.37.77-.21ZM11.43 5.38a.56.56 0 0 1 .8 0 .84.84 0 0 1 0 1.2.56.56 0 0 1-.93-.6.56.56 0 0 1 .13-.6Z",
|
|
16
18
|
fill: "currentColor"
|
|
17
|
-
}
|
|
19
|
+
}
|
|
20
|
+
),
|
|
21
|
+
/* @__PURE__ */ l.jsx(
|
|
22
|
+
"path",
|
|
23
|
+
{
|
|
18
24
|
fillRule: "evenodd",
|
|
19
25
|
clipRule: "evenodd",
|
|
20
26
|
d: "M11.63 6.3a.56.56 0 0 0 .6-.92.84.84 0 0 0-1.2 0 .56.56 0 0 0 .6.92Z",
|
|
21
27
|
fill: "currentColor"
|
|
22
|
-
}
|
|
28
|
+
}
|
|
29
|
+
),
|
|
30
|
+
/* @__PURE__ */ l.jsx(
|
|
31
|
+
"path",
|
|
32
|
+
{
|
|
23
33
|
fillRule: "evenodd",
|
|
24
34
|
clipRule: "evenodd",
|
|
25
35
|
d: "M11.96 5.97a.56.56 0 0 0-.93-.6.85.85 0 0 0 0 1.2.56.56 0 0 0 .93-.6Z",
|
|
26
36
|
fill: "currentColor"
|
|
27
|
-
}
|
|
37
|
+
}
|
|
38
|
+
),
|
|
39
|
+
/* @__PURE__ */ l.jsx(
|
|
40
|
+
"path",
|
|
41
|
+
{
|
|
28
42
|
fillRule: "evenodd",
|
|
29
43
|
clipRule: "evenodd",
|
|
30
44
|
d: "M11.63 5.64a.56.56 0 0 0-.6.93.84.84 0 0 0 1.2 0 .56.56 0 0 0-.6-.93ZM14.61 2.2a.56.56 0 0 1 .8 0 .84.84 0 0 1 0 1.19.56.56 0 0 1-.92-.6.56.56 0 0 1 .12-.6Z",
|
|
31
45
|
fill: "currentColor"
|
|
32
|
-
}
|
|
46
|
+
}
|
|
47
|
+
),
|
|
48
|
+
/* @__PURE__ */ l.jsx(
|
|
49
|
+
"path",
|
|
50
|
+
{
|
|
33
51
|
fillRule: "evenodd",
|
|
34
52
|
clipRule: "evenodd",
|
|
35
53
|
d: "M14.81 3.12a.56.56 0 0 0 .6-.93.84.84 0 0 0-1.2 0 .56.56 0 0 0 .6.93Z",
|
|
36
54
|
fill: "currentColor"
|
|
37
|
-
}
|
|
55
|
+
}
|
|
56
|
+
),
|
|
57
|
+
/* @__PURE__ */ l.jsx(
|
|
58
|
+
"path",
|
|
59
|
+
{
|
|
38
60
|
fillRule: "evenodd",
|
|
39
61
|
clipRule: "evenodd",
|
|
40
62
|
d: "M15.14 2.79a.56.56 0 0 0-.92-.6.84.84 0 0 0 0 1.2.56.56 0 0 0 .92-.6Z",
|
|
41
63
|
fill: "currentColor"
|
|
42
|
-
}
|
|
64
|
+
}
|
|
65
|
+
),
|
|
66
|
+
/* @__PURE__ */ l.jsx(
|
|
67
|
+
"path",
|
|
68
|
+
{
|
|
43
69
|
fillRule: "evenodd",
|
|
44
70
|
clipRule: "evenodd",
|
|
45
71
|
d: "M14.81 2.46a.56.56 0 0 0-.6.93.84.84 0 0 0 1.2 0 .56.56 0 0 0-.6-.93ZM14.61 10.15a.56.56 0 0 1 .8 0 .84.84 0 0 1 0 1.2.56.56 0 0 1-.92-.6.56.56 0 0 1 .12-.6Z",
|
|
46
72
|
fill: "currentColor"
|
|
47
|
-
}
|
|
73
|
+
}
|
|
74
|
+
),
|
|
75
|
+
/* @__PURE__ */ l.jsx(
|
|
76
|
+
"path",
|
|
77
|
+
{
|
|
48
78
|
fillRule: "evenodd",
|
|
49
79
|
clipRule: "evenodd",
|
|
50
80
|
d: "M14.81 11.07a.56.56 0 0 0 .6-.92.84.84 0 0 0-1.2 0 .56.56 0 0 0 .6.92Z",
|
|
51
81
|
fill: "currentColor"
|
|
52
|
-
}
|
|
82
|
+
}
|
|
83
|
+
),
|
|
84
|
+
/* @__PURE__ */ l.jsx(
|
|
85
|
+
"path",
|
|
86
|
+
{
|
|
53
87
|
fillRule: "evenodd",
|
|
54
88
|
clipRule: "evenodd",
|
|
55
89
|
d: "M15.14 10.74a.56.56 0 0 0-.92-.6.84.84 0 0 0 0 1.2.56.56 0 0 0 .92-.6Z",
|
|
56
90
|
fill: "currentColor"
|
|
57
|
-
}
|
|
91
|
+
}
|
|
92
|
+
),
|
|
93
|
+
/* @__PURE__ */ l.jsx(
|
|
94
|
+
"path",
|
|
95
|
+
{
|
|
58
96
|
fillRule: "evenodd",
|
|
59
97
|
clipRule: "evenodd",
|
|
60
98
|
d: "M14.81 10.42a.56.56 0 0 0-.6.92.84.84 0 0 0 1.2 0 .56.56 0 0 0-.6-.92ZM5.87 2.99a.56.56 0 0 1 .8 0 .85.85 0 0 1 0 1.19.56.56 0 0 1-.93-.6.56.56 0 0 1 .13-.6Z",
|
|
61
99
|
fill: "currentColor"
|
|
62
|
-
}
|
|
100
|
+
}
|
|
101
|
+
),
|
|
102
|
+
/* @__PURE__ */ l.jsx(
|
|
103
|
+
"path",
|
|
104
|
+
{
|
|
63
105
|
fillRule: "evenodd",
|
|
64
106
|
clipRule: "evenodd",
|
|
65
107
|
d: "M6.06 3.91a.56.56 0 0 0 .6-.92.84.84 0 0 0-1.2 0 .56.56 0 0 0 .6.92Z",
|
|
66
108
|
fill: "currentColor"
|
|
67
|
-
}
|
|
109
|
+
}
|
|
110
|
+
),
|
|
111
|
+
/* @__PURE__ */ l.jsx(
|
|
112
|
+
"path",
|
|
113
|
+
{
|
|
68
114
|
fillRule: "evenodd",
|
|
69
115
|
clipRule: "evenodd",
|
|
70
116
|
d: "M6.4 3.58a.56.56 0 0 0-.93-.6.84.84 0 0 0 0 1.2.56.56 0 0 0 .92-.6Z",
|
|
71
117
|
fill: "currentColor"
|
|
72
|
-
}
|
|
118
|
+
}
|
|
119
|
+
),
|
|
120
|
+
/* @__PURE__ */ l.jsx(
|
|
121
|
+
"path",
|
|
122
|
+
{
|
|
73
123
|
fillRule: "evenodd",
|
|
74
124
|
clipRule: "evenodd",
|
|
75
125
|
d: "M6.06 3.26a.56.56 0 0 0-.6.92.84.84 0 0 0 1.2 0 .56.56 0 0 0-.6-.92ZM9.58 0c.3-.03.59.2.62.5.17 1.5.03 3-.42 4.44a.56.56 0 1 1-1.07-.33c.4-1.29.52-2.64.37-3.99a.56.56 0 0 1 .5-.62ZM12.54 1.04c.3.07.5.36.44.67l-.4 1.98a.56.56 0 1 1-1.1-.22l.4-1.98c.06-.3.35-.5.66-.45ZM13.06 8.22c1.43-.45 2.95-.59 4.44-.42a.56.56 0 1 1-.12 1.12 9.81 9.81 0 0 0-4 .37.56.56 0 0 1-.32-1.07ZM16.96 5.46c.06.3-.14.6-.45.66l-1.98.4a.56.56 0 1 1-.22-1.1l1.98-.4c.3-.06.6.14.67.44Z",
|
|
76
126
|
fill: "currentColor"
|
|
77
|
-
}
|
|
78
|
-
|
|
127
|
+
}
|
|
128
|
+
)
|
|
129
|
+
] });
|
|
130
|
+
export {
|
|
131
|
+
d as S
|
|
79
132
|
};
|
|
80
|
-
export { Success as S };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { j as r } from "../accordion/Accordion-4b8edd28.mjs";
|
|
2
|
+
const t = () => /* @__PURE__ */ r.jsx("svg", { width: "100%", fill: "none", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 18 18", children: /* @__PURE__ */ r.jsx(
|
|
3
|
+
"path",
|
|
4
|
+
{
|
|
5
|
+
d: "M17.6 14.94 10.59 1.55a1.5 1.5 0 0 0-2.66 0l-7 13.4a1.5 1.5 0 0 0 1.32 2.19h14.02a1.5 1.5 0 0 0 1.33-2.2ZM8.51 6.26a.75.75 0 1 1 1.5 0v4.5a.75.75 0 1 1-1.5 0v-4.5Zm.79 8.63h-.02a1.15 1.15 0 0 1-1.07-1.53 1.1 1.1 0 0 1 1.01-.72h.02a1.15 1.15 0 0 1 1.08 1.53 1.1 1.1 0 0 1-1.02.72Z",
|
|
6
|
+
fill: "currentColor"
|
|
7
|
+
}
|
|
8
|
+
) });
|
|
9
|
+
export {
|
|
10
|
+
t as W
|
|
11
|
+
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { j as s } from "../accordion/Accordion-4b8edd28.mjs";
|
|
2
|
+
import { forwardRef as x, useState as e, useEffect as g } from "react";
|
|
3
|
+
import { S as u } from "../typography/Typography-91af1c48.mjs";
|
|
4
|
+
const m = ({ progressRatio: r }) => (1 - r) * 100 * Math.PI, h = x(
|
|
5
|
+
({ progressRatio: r, label: t, size: a = "small", className: c = "", children: l, ...o }, d) => {
|
|
6
|
+
const [i, n] = e(0), [p] = e(a === "small" ? "160px" : "260px");
|
|
7
|
+
return g(() => {
|
|
8
|
+
n(m({ progressRatio: r }));
|
|
9
|
+
}, [r]), /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
10
|
+
/* @__PURE__ */ s.jsxs("label", { className: "sr-only", "data-testid": "rds-progress__label", children: [
|
|
11
|
+
t,
|
|
12
|
+
/* @__PURE__ */ s.jsx("progress", { "data-testid": "rds-progress__progress", value: r, max: 1 })
|
|
13
|
+
] }),
|
|
14
|
+
/* @__PURE__ */ s.jsxs(
|
|
15
|
+
"div",
|
|
16
|
+
{
|
|
17
|
+
ref: d,
|
|
18
|
+
"data-testid": "rds-progress",
|
|
19
|
+
className: `rds-progress--circular ${c}`,
|
|
20
|
+
style: { "--progress-circle-size": p },
|
|
21
|
+
...o,
|
|
22
|
+
children: [
|
|
23
|
+
/* @__PURE__ */ s.jsx("div", { className: "rds-progress--circular__outer", "data-testid": "rds-progress__content", children: l || /* @__PURE__ */ s.jsx(u, { "data-testid": "rds-progress__default-text", lookLike: "title-3", children: r === 1 ? "Du er i mål!" : `${r * 100} %` }) }),
|
|
24
|
+
/* @__PURE__ */ s.jsxs(
|
|
25
|
+
"svg",
|
|
26
|
+
{
|
|
27
|
+
style: { "--calculated-progress": i, "--progress": `${r + 1}s` },
|
|
28
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
29
|
+
version: "1.1",
|
|
30
|
+
width: "var(--progress-circle-size)",
|
|
31
|
+
height: "var(--progress-circle-size)",
|
|
32
|
+
viewBox: "-10 0 120 100",
|
|
33
|
+
children: [
|
|
34
|
+
/* @__PURE__ */ s.jsx("defs", { children: /* @__PURE__ */ s.jsxs("linearGradient", { id: "GradientColor", children: [
|
|
35
|
+
/* @__PURE__ */ s.jsx("stop", { offset: "0%", stopColor: "var(--rds-heading-accent)" }),
|
|
36
|
+
/* @__PURE__ */ s.jsx("stop", { offset: "100%", stopColor: "var(--rds-background-card)" })
|
|
37
|
+
] }) }),
|
|
38
|
+
/* @__PURE__ */ s.jsx("circle", { id: "path", cx: "50", cy: "50", r: "50", strokeLinecap: "round" }),
|
|
39
|
+
/* @__PURE__ */ s.jsx("circle", { id: "prog", cx: "50", cy: "50", r: "50", strokeLinecap: "round" })
|
|
40
|
+
]
|
|
41
|
+
}
|
|
42
|
+
)
|
|
43
|
+
]
|
|
44
|
+
}
|
|
45
|
+
)
|
|
46
|
+
] });
|
|
47
|
+
}
|
|
48
|
+
);
|
|
49
|
+
h.displayName = "CircularProgress";
|
|
50
|
+
export {
|
|
51
|
+
h as C
|
|
52
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { j as s } from "../accordion/Accordion-4b8edd28.mjs";
|
|
2
|
+
import { forwardRef as g } from "react";
|
|
3
|
+
const i = g(
|
|
4
|
+
({ className: a = "", label: d, ratio: r, checkmarkOnDone: e = !1, animateIn: o = !1, ...t }, p) => {
|
|
5
|
+
const l = { "--progress": r };
|
|
6
|
+
return /* @__PURE__ */ s.jsxs(
|
|
7
|
+
"div",
|
|
8
|
+
{
|
|
9
|
+
"data-testid": "rds-progress__wrapper",
|
|
10
|
+
className: `rds-progress ${o ? "rds-progress--animate" : ""} ${a}`,
|
|
11
|
+
children: [
|
|
12
|
+
/* @__PURE__ */ s.jsxs("label", { "data-testid": "rds-progress__label", className: "sr-only", children: [
|
|
13
|
+
/* @__PURE__ */ s.jsx("progress", { "data-testid": "rds-progress__sr", max: 1, value: r, ref: p, ...t }),
|
|
14
|
+
d
|
|
15
|
+
] }),
|
|
16
|
+
r === 1 && e && /* @__PURE__ */ s.jsx("div", { "data-testid": "rds-progress__mark", className: "rds-progress--done" }),
|
|
17
|
+
(r !== 1 || !e) && /* @__PURE__ */ s.jsx("div", { className: "rds-progress__track", children: /* @__PURE__ */ s.jsx("div", { "data-testid": "rds-progress__bar", style: l, className: "rds-progress__progress" }) })
|
|
18
|
+
]
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
);
|
|
23
|
+
i.displayName = "Progress";
|
|
24
|
+
export {
|
|
25
|
+
i as P
|
|
26
|
+
};
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { j as t } from "../accordion/Accordion-4b8edd28.mjs";
|
|
2
|
+
import { forwardRef as w } from "react";
|
|
3
|
+
import { g as f } from "../checkbox/BaseCheckbox-6fed1663.mjs";
|
|
4
|
+
const v = w(
|
|
5
|
+
({
|
|
6
|
+
className: c = "",
|
|
7
|
+
id: o,
|
|
8
|
+
labelClass: m = "",
|
|
9
|
+
type: h = "text",
|
|
10
|
+
fullWidth: p = !1,
|
|
11
|
+
valid: i,
|
|
12
|
+
lightBackground: d = !1,
|
|
13
|
+
label: s,
|
|
14
|
+
errorMessage: e,
|
|
15
|
+
...$
|
|
16
|
+
}, j) => {
|
|
17
|
+
const l = f(), r = f(o), a = d === "white", n = !e && i, x = !!e || i === !1;
|
|
18
|
+
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
19
|
+
/* @__PURE__ */ t.jsx(
|
|
20
|
+
"div",
|
|
21
|
+
{
|
|
22
|
+
className: `rds-textfield
|
|
23
|
+
${d ? "rds-light" : ""}
|
|
24
|
+
${a ? "rds-white" : ""}
|
|
25
|
+
${p ? "rds-textfield--full-width" : ""}
|
|
26
|
+
${c}`,
|
|
27
|
+
children: /* @__PURE__ */ t.jsxs(
|
|
28
|
+
"label",
|
|
29
|
+
{
|
|
30
|
+
htmlFor: r,
|
|
31
|
+
className: `rds-textfield-label ${m} ${d ? "rds-light" : ""} ${a ? "rds-white" : ""}`,
|
|
32
|
+
"data-valid": n,
|
|
33
|
+
children: [
|
|
34
|
+
/* @__PURE__ */ t.jsx(
|
|
35
|
+
"input",
|
|
36
|
+
{
|
|
37
|
+
ref: j,
|
|
38
|
+
id: r,
|
|
39
|
+
className: `
|
|
40
|
+
rds-textfield-input ${x ? "rds-textfield-input--error" : ""}
|
|
41
|
+
`,
|
|
42
|
+
type: h,
|
|
43
|
+
placeholder: s,
|
|
44
|
+
"aria-invalid": x,
|
|
45
|
+
"aria-describedby": e ? l : void 0,
|
|
46
|
+
"data-valid": n,
|
|
47
|
+
...$
|
|
48
|
+
}
|
|
49
|
+
),
|
|
50
|
+
/* @__PURE__ */ t.jsx("span", { children: s })
|
|
51
|
+
]
|
|
52
|
+
}
|
|
53
|
+
)
|
|
54
|
+
}
|
|
55
|
+
),
|
|
56
|
+
e && /* @__PURE__ */ t.jsx(
|
|
57
|
+
"span",
|
|
58
|
+
{
|
|
59
|
+
id: l,
|
|
60
|
+
className: `rds-textfield rds-textfield--error-text ${d ? "rds-light" : ""}`,
|
|
61
|
+
children: e
|
|
62
|
+
}
|
|
63
|
+
)
|
|
64
|
+
] });
|
|
65
|
+
}
|
|
66
|
+
);
|
|
67
|
+
v.displayName = "TextField";
|
|
68
|
+
export {
|
|
69
|
+
v as T
|
|
70
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { j as e } from "../accordion/Accordion-4b8edd28.mjs";
|
|
2
|
+
import { createContext as o, forwardRef as n } from "react";
|
|
3
|
+
const m = o({ radioName: "" }), f = n(
|
|
4
|
+
({ legend: s, children: t, name: d, className: r = "", showLegend: a = !1, ...i }, l) => /* @__PURE__ */ e.jsx(m.Provider, { value: { radioName: d }, children: /* @__PURE__ */ e.jsxs("fieldset", { "data-testid": "fieldset", ...i, className: `rds-field-set ${r}`, ref: l, children: [
|
|
5
|
+
/* @__PURE__ */ e.jsx("legend", { className: `rds-field-set__legend ${a ? "" : "sr-only"}`, children: s }),
|
|
6
|
+
t
|
|
7
|
+
] }) })
|
|
8
|
+
);
|
|
9
|
+
f.displayName = "FieldSet";
|
|
10
|
+
export {
|
|
11
|
+
f as F,
|
|
12
|
+
m as R
|
|
13
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { j as o } from "../accordion/Accordion-4b8edd28.mjs";
|
|
2
|
+
import { forwardRef as d, useContext as l } from "react";
|
|
3
|
+
import { R as n } from "./FieldSet-4bdc4b7e.mjs";
|
|
4
|
+
import "../button/ArrowButton-af5de307.mjs";
|
|
5
|
+
const m = d(
|
|
6
|
+
({ label: a, name: e, className: r = "", ...s }, t) => {
|
|
7
|
+
const { radioName: i } = l(n);
|
|
8
|
+
return /* @__PURE__ */ o.jsxs("label", { className: `rds-radio-toggle ${r}`, children: [
|
|
9
|
+
/* @__PURE__ */ o.jsx("input", { className: "rds-radio-toggle__input", ...s, ref: t, type: "radio", name: i || e }),
|
|
10
|
+
/* @__PURE__ */ o.jsx("span", { className: "rds-radio-toggle__label", children: a })
|
|
11
|
+
] });
|
|
12
|
+
}
|
|
13
|
+
);
|
|
14
|
+
m.displayName = "RadioToggleInput";
|
|
15
|
+
export {
|
|
16
|
+
m as R
|
|
17
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { j as t } from "../accordion/Accordion-4b8edd28.mjs";
|
|
2
|
+
import { forwardRef as I, useRef as k, useState as C } from "react";
|
|
3
|
+
import { B as N } from "../checkbox/BaseCheckbox-6fed1663.mjs";
|
|
4
|
+
const B = I(
|
|
5
|
+
({ children: s, className: _ = "", defaultChecked: l, icons: e, iconClass: h = "", id: i, onChange: a, alwaysShowLabel: x = !1, ...f }, m) => {
|
|
6
|
+
const p = k(null), [n, c] = C(!!l), g = e && "checkedIcon" in e ? e.checkedIcon : null, r = e && "uncheckedIcon" in e ? e.uncheckedIcon : null, u = e && "toggleIcon" in e ? e.toggleIcon : null, o = m || p, b = (j) => {
|
|
7
|
+
var d;
|
|
8
|
+
typeof a == "function" && a(j), c(typeof o != "function" ? !!((d = o.current) != null && d.checked) : !n);
|
|
9
|
+
};
|
|
10
|
+
return /* @__PURE__ */ t.jsx(
|
|
11
|
+
N,
|
|
12
|
+
{
|
|
13
|
+
id: i,
|
|
14
|
+
ref: o,
|
|
15
|
+
dataTestId: "toggle-button__label",
|
|
16
|
+
containerClassName: _,
|
|
17
|
+
inputClassName: "rds-toggle-button__input",
|
|
18
|
+
labelClassName: "rds-toggle-button",
|
|
19
|
+
onChange: b,
|
|
20
|
+
defaultChecked: l,
|
|
21
|
+
...f,
|
|
22
|
+
children: /* @__PURE__ */ t.jsxs("span", { className: "rds-toggle-button__content", children: [
|
|
23
|
+
e && /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
24
|
+
/* @__PURE__ */ t.jsxs("span", { className: `rds-toggle-button__icon ${h}`, children: [
|
|
25
|
+
u && /* @__PURE__ */ t.jsx(u, { checked: n }),
|
|
26
|
+
g && n && /* @__PURE__ */ t.jsx(g, {}),
|
|
27
|
+
r && !n && /* @__PURE__ */ t.jsx(r, {})
|
|
28
|
+
] }),
|
|
29
|
+
/* @__PURE__ */ t.jsx(
|
|
30
|
+
"span",
|
|
31
|
+
{
|
|
32
|
+
"data-testid": "toggle-button__icon__label__text",
|
|
33
|
+
className: `label-text__icon ${x ? "always-show-label" : ""}`,
|
|
34
|
+
children: s
|
|
35
|
+
}
|
|
36
|
+
)
|
|
37
|
+
] }),
|
|
38
|
+
!e && /* @__PURE__ */ t.jsx("span", { "data-testid": "toggle-button__label__text", children: s })
|
|
39
|
+
] })
|
|
40
|
+
}
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
);
|
|
44
|
+
B.displayName = "ToggleButton";
|
|
45
|
+
export {
|
|
46
|
+
B as T
|
|
47
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { j as l } from "../accordion/Accordion-4b8edd28.mjs";
|
|
2
|
+
import { forwardRef as h, useRef as x, useState as C } from "react";
|
|
3
|
+
import { B as k } from "../checkbox/BaseCheckbox-6fed1663.mjs";
|
|
4
|
+
const B = h(
|
|
5
|
+
({
|
|
6
|
+
defaultChecked: i,
|
|
7
|
+
lightBackground: a,
|
|
8
|
+
children: r,
|
|
9
|
+
onChange: t,
|
|
10
|
+
id: c,
|
|
11
|
+
className: u = "",
|
|
12
|
+
inputClassName: g = "",
|
|
13
|
+
labelClassName: d = "",
|
|
14
|
+
...f
|
|
15
|
+
}, m) => {
|
|
16
|
+
const p = x(null), [n, o] = C(!!i), e = m || p, _ = (b) => {
|
|
17
|
+
var s;
|
|
18
|
+
typeof t == "function" && t(b), o(typeof e != "function" ? !!((s = e.current) != null && s.checked) : !n);
|
|
19
|
+
};
|
|
20
|
+
return /* @__PURE__ */ l.jsx(
|
|
21
|
+
k,
|
|
22
|
+
{
|
|
23
|
+
id: c,
|
|
24
|
+
ref: e,
|
|
25
|
+
onChange: _,
|
|
26
|
+
checked: n,
|
|
27
|
+
dataTestId: "toggle-inline-button__label",
|
|
28
|
+
containerClassName: `rds-toggle-inline-button ${u}`,
|
|
29
|
+
inputClassName: `rds-toggle-inline-button__input ${g}`,
|
|
30
|
+
labelClassName: `${a ? "rds-light" : ""} ${d}`,
|
|
31
|
+
...f,
|
|
32
|
+
children: /* @__PURE__ */ l.jsx("span", { "data-testid": "toggle-inline-button__label__text", className: "rds-toggle-inline-button__content", children: r })
|
|
33
|
+
}
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
);
|
|
37
|
+
B.displayName = "ToggleInlineButton";
|
|
38
|
+
export {
|
|
39
|
+
B as T
|
|
40
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { j as t } from "../accordion/Accordion-4b8edd28.mjs";
|
|
2
|
+
import { forwardRef as b, useRef as h, useState as x } from "react";
|
|
3
|
+
import { B as C } from "../checkbox/BaseCheckbox-6fed1663.mjs";
|
|
4
|
+
import { C as j } from "../icons/Chevron-ef147695.mjs";
|
|
5
|
+
const N = b(
|
|
6
|
+
({
|
|
7
|
+
defaultChecked: a,
|
|
8
|
+
toggledContentId: i,
|
|
9
|
+
iconClass: r = "",
|
|
10
|
+
lightBackground: c,
|
|
11
|
+
children: g,
|
|
12
|
+
onChange: n,
|
|
13
|
+
id: u,
|
|
14
|
+
className: d = "",
|
|
15
|
+
..._
|
|
16
|
+
}, f) => {
|
|
17
|
+
const k = h(null), [o, s] = x(!!a), e = f || k, m = (p) => {
|
|
18
|
+
var l;
|
|
19
|
+
typeof n == "function" && n(p), s(typeof e != "function" ? !!((l = e.current) != null && l.checked) : !o);
|
|
20
|
+
};
|
|
21
|
+
return /* @__PURE__ */ t.jsx(
|
|
22
|
+
C,
|
|
23
|
+
{
|
|
24
|
+
id: u,
|
|
25
|
+
ref: e,
|
|
26
|
+
onChange: m,
|
|
27
|
+
checked: o,
|
|
28
|
+
"aria-controls": i,
|
|
29
|
+
dataTestId: "toggle-link-button__label",
|
|
30
|
+
containerClassName: "rds-toggle-link-button",
|
|
31
|
+
inputClassName: "rds-toggle-link-button__input",
|
|
32
|
+
labelClassName: `rds-toggle-link-button__label ${c ? "rds-light" : ""} ${d}`,
|
|
33
|
+
..._,
|
|
34
|
+
children: /* @__PURE__ */ t.jsxs("span", { className: "rds-toggle-link-button__label__content", children: [
|
|
35
|
+
/* @__PURE__ */ t.jsx("span", { "data-testid": "toggle-link-button__label__text", children: g }),
|
|
36
|
+
/* @__PURE__ */ t.jsx("span", { className: `rds-toggle-link-button__label__chevron ${r}`, children: /* @__PURE__ */ t.jsx(j, {}) })
|
|
37
|
+
] })
|
|
38
|
+
}
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
);
|
|
42
|
+
N.displayName = "ToggleLinkButton";
|
|
43
|
+
export {
|
|
44
|
+
N as T
|
|
45
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { j as c } from "../accordion/Accordion-4b8edd28.mjs";
|
|
2
|
+
import { forwardRef as k } from "react";
|
|
3
|
+
const e = (t) => (
|
|
4
|
+
// eslint-disable-next-line react/display-name
|
|
5
|
+
k(
|
|
6
|
+
({ children: o, lookLike: s = t.lookLike, className: n = "", lightBackground: a = !1, ...l }, i) => {
|
|
7
|
+
const m = t.semanticElement;
|
|
8
|
+
return /* @__PURE__ */ c.jsx(
|
|
9
|
+
m,
|
|
10
|
+
{
|
|
11
|
+
className: `rds-${s} ${a ? `rds-${s}--light` : ""} ${n}`,
|
|
12
|
+
...l,
|
|
13
|
+
ref: i,
|
|
14
|
+
children: o
|
|
15
|
+
}
|
|
16
|
+
);
|
|
17
|
+
}
|
|
18
|
+
)
|
|
19
|
+
), E = e({ semanticElement: "h1", lookLike: "display-title" }), L = e({ semanticElement: "h1", lookLike: "title-1" }), d = e({ semanticElement: "h2", lookLike: "title-2" }), y = e({ semanticElement: "h3", lookLike: "title-3" }), h = e({ semanticElement: "h4", lookLike: "title-4" }), b = e({ semanticElement: "p", lookLike: "lead" }), g = e({ semanticElement: "p", lookLike: "body" }), H = e({ semanticElement: "p", lookLike: "sub-body" }), f = e({ semanticElement: "span", lookLike: "tag" }), u = e({ semanticElement: "strong", lookLike: "bold" }), x = e({ semanticElement: "span", lookLike: "meta" }), B = e({ semanticElement: "span", lookLike: "span" });
|
|
20
|
+
export {
|
|
21
|
+
g as B,
|
|
22
|
+
E as D,
|
|
23
|
+
L as H,
|
|
24
|
+
b as L,
|
|
25
|
+
x as M,
|
|
26
|
+
B as S,
|
|
27
|
+
f as T,
|
|
28
|
+
d as a,
|
|
29
|
+
y as b,
|
|
30
|
+
h as c,
|
|
31
|
+
u as d,
|
|
32
|
+
H as e
|
|
33
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ForwardRefExoticComponent, HTMLAttributes } from "react";
|
|
2
2
|
import "./typography.scss";
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
type HeadingLevels = 1 | 2 | 3 | 4;
|
|
4
|
+
type AcceptedHTMLElements = HTMLSpanElement | HTMLHeadingElement | HTMLParagraphElement;
|
|
5
5
|
interface Props<T extends AcceptedHTMLElements> extends HTMLAttributes<T> {
|
|
6
6
|
lookLike?: `title-${HeadingLevels}` | "sub-title-2" | "display-title" | "lead" | "body" | "sub-body" | "tag" | "bold" | "meta" | "span";
|
|
7
7
|
className?: string;
|