@rikstv/shared-components 3.3.15-alpha.1 → 3.3.15-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +5 -0
- package/dist/components/alert/Alert-CX6wPqur.mjs +70 -0
- package/dist/components/core/Core-DVnHiJm2.mjs +46 -0
- package/dist/components/core/{RiksTV-D1wr-aYp.mjs → RiksTV-CxHetJcp.mjs} +1 -1
- package/dist/components/core/{Strim-1ocLRXTP.mjs → Strim-C1ajVDCm.mjs} +1 -1
- package/dist/components/dropdown/{Dropdown-c9wdxVoJ.mjs → Dropdown-CWVW7rKD.mjs} +19 -18
- package/dist/components/icons/{Icons-CgcqUFmH.mjs → Icons-knwkK_Mh.mjs} +2 -2
- package/dist/components/index.d.ts +1 -1
- package/dist/components/list/{CheckmarkListItem-DE0v1Zhg.mjs → CheckmarkListItem-DokxieXU.mjs} +1 -1
- package/dist/components/list/{CrossmarkListItem-DFXTjZR6.mjs → CrossmarkListItem-CRelk7jn.mjs} +1 -1
- package/dist/components/panel/Panel-BaTG2zyz.mjs +63 -0
- package/dist/components/toggleButton/{ToggleButton-Dhxp8g2g.mjs → ToggleButton-CGLyQll6.mjs} +18 -17
- package/dist/components/toggleInlineButton/ToggleInlineButton-Cnet1doK.mjs +40 -0
- package/dist/components/toggleLinkButton/ToggleLinkButton-DRGFajD0.mjs +34 -0
- package/dist/components/toggleLinkButton/ToggleLinkButton.d.ts +11 -3
- package/dist/components/toggleLinkButton/toggleLinkButton.scss +17 -14
- package/dist/shared-components.mjs +161 -159
- package/dist/style.css +1 -1
- package/package.json +2 -2
- package/dist/components/alert/Alert-BvwcxnzO.mjs +0 -70
- package/dist/components/core/Core-BdJiu9y4.mjs +0 -46
- package/dist/components/panel/Panel-D2Nkdd54.mjs +0 -63
- package/dist/components/toggleInlineButton/ToggleInlineButton-9ZcLN5Lf.mjs +0 -39
- package/dist/components/toggleLinkButton/ToggleLinkButton-B01oBGAX.mjs +0 -36
|
@@ -1,197 +1,199 @@
|
|
|
1
|
-
import { R as
|
|
2
|
-
import { S as
|
|
3
|
-
import { L as
|
|
4
|
-
import { G as
|
|
5
|
-
import { G as
|
|
6
|
-
import { N as
|
|
7
|
-
import { A as
|
|
8
|
-
import { P as
|
|
9
|
-
import { A as
|
|
10
|
-
import { B as
|
|
11
|
-
import { P as
|
|
12
|
-
import { L as
|
|
13
|
-
import { C as
|
|
14
|
-
import { D as
|
|
15
|
-
import { G as
|
|
16
|
-
import { G as fe, P as
|
|
17
|
-
import { G as
|
|
18
|
-
import { T as
|
|
19
|
-
import { T as
|
|
20
|
-
import { T as
|
|
21
|
-
import { C as
|
|
22
|
-
import { R as
|
|
23
|
-
import { F as
|
|
24
|
-
import { T as
|
|
25
|
-
import { P as
|
|
26
|
-
import { B as
|
|
27
|
-
import { L as
|
|
28
|
-
import { C as
|
|
29
|
-
import { L as
|
|
30
|
-
import { C as
|
|
31
|
-
import { O as
|
|
32
|
-
import { useState as
|
|
33
|
-
import { I as
|
|
34
|
-
import { B as
|
|
35
|
-
const
|
|
36
|
-
typeof e.addEventListener < "u" && e.addEventListener("change",
|
|
37
|
-
},
|
|
38
|
-
const [e,
|
|
39
|
-
return
|
|
40
|
-
typeof window < "u" && window.matchMedia &&
|
|
41
|
-
|
|
1
|
+
import { R as C } from "./components/core/RiksTV-CxHetJcp.mjs";
|
|
2
|
+
import { S as F } from "./components/core/Strim-C1ajVDCm.mjs";
|
|
3
|
+
import { L as D } from "./components/core/LightMode-DPAa0Pv9.mjs";
|
|
4
|
+
import { G as k } from "./components/spacing/Gutter-PXX_UdiX.mjs";
|
|
5
|
+
import { G as N } from "./components/spacing/GutterPadding-Bd7tSm3F.mjs";
|
|
6
|
+
import { N as Q } from "./components/notificationDot/NotificationDot-C2_j4FdL.mjs";
|
|
7
|
+
import { A as _ } from "./components/accordion/Accordion-rewqLwCV.mjs";
|
|
8
|
+
import { P as U } from "./components/panel/Panel-BaTG2zyz.mjs";
|
|
9
|
+
import { A as z } from "./components/alert/Alert-CX6wPqur.mjs";
|
|
10
|
+
import { B as K, a as X } from "./components/breadcrumb/Breadcrumb-BJNLZ7iB.mjs";
|
|
11
|
+
import { P as Z } from "./components/progress/Progress-CjnegHvC.mjs";
|
|
12
|
+
import { L as re } from "./components/loader/Loader-gjL6yh1f.mjs";
|
|
13
|
+
import { C as ne } from "./components/progress/CircularProgress-BKmJjWRu.mjs";
|
|
14
|
+
import { D as se } from "./components/dropdown/Dropdown-CWVW7rKD.mjs";
|
|
15
|
+
import { G as ae, P as ce, S as ue, T as de } from "./components/button/Button-DGXKZhwG.mjs";
|
|
16
|
+
import { G as fe, P as le, S as xe, T as ge } from "./components/button/ArrowButton-DqViaPQ-.mjs";
|
|
17
|
+
import { G as ye, P as Te, S as ve, T as Be } from "./components/button/IconButton-DVEZ8K3d.mjs";
|
|
18
|
+
import { T as we } from "./components/toggleButton/ToggleButton-CGLyQll6.mjs";
|
|
19
|
+
import { T as Ie } from "./components/toggleInlineButton/ToggleInlineButton-Cnet1doK.mjs";
|
|
20
|
+
import { T as be } from "./components/toggleLinkButton/ToggleLinkButton-DRGFajD0.mjs";
|
|
21
|
+
import { C as Pe } from "./components/checkbox/Checkbox-Cl4PCYXu.mjs";
|
|
22
|
+
import { R as Se } from "./components/toggle/RadioToggle-C_79eEFl.mjs";
|
|
23
|
+
import { F as Ce } from "./components/toggle/FieldSet-BM_JN_UL.mjs";
|
|
24
|
+
import { T as Fe } from "./components/textfield/TextField-Ct-ceRzE.mjs";
|
|
25
|
+
import { P as De } from "./components/textfield/PasswordTextField-BfvT8zYj.mjs";
|
|
26
|
+
import { B as ke, d as Ve, D as Ne, a as $e, b as Qe, c as We, H as _e, L as qe, M as Ue, S as je, e as ze, f as Je, g as Ke, T as Xe } from "./components/typography/Typography-CXNJ1SFo.mjs";
|
|
27
|
+
import { L as Ze } from "./components/list/List-4jHnUXn_.mjs";
|
|
28
|
+
import { C as rr } from "./components/list/CheckmarkListItem-DokxieXU.mjs";
|
|
29
|
+
import { L as nr } from "./components/list/ListItem-ClQsSisn.mjs";
|
|
30
|
+
import { C as sr } from "./components/list/CrossmarkListItem-CRelk7jn.mjs";
|
|
31
|
+
import { O as ar } from "./components/list/OrderedListItem-CphW2Aa0.mjs";
|
|
32
|
+
import { useState as x, useEffect as m, useRef as c, useCallback as g, useLayoutEffect as y } from "react";
|
|
33
|
+
import { I as ur } from "./components/icons/Icons-knwkK_Mh.mjs";
|
|
34
|
+
import { B as mr } from "./components/button/BaseLinkButton-niQ474XP.mjs";
|
|
35
|
+
const h = "(prefers-reduced-motion: reduce)", T = (e) => typeof window < "u" && window.matchMedia ? window.matchMedia(e).matches : !1, v = (e, t) => {
|
|
36
|
+
typeof e.addEventListener < "u" && e.addEventListener("change", t);
|
|
37
|
+
}, B = () => {
|
|
38
|
+
const [e, t] = x(T(h));
|
|
39
|
+
return m(() => {
|
|
40
|
+
typeof window < "u" && window.matchMedia && v(window.matchMedia(h), (n) => {
|
|
41
|
+
t(n.matches);
|
|
42
42
|
});
|
|
43
43
|
}, []), { prefersReducedMotion: e };
|
|
44
44
|
};
|
|
45
|
-
function
|
|
46
|
-
const n =
|
|
47
|
-
function
|
|
48
|
-
|
|
49
|
-
|
|
45
|
+
function b(e, t) {
|
|
46
|
+
const n = c(null), s = c(null), o = c(null), a = c(!0), { prefersReducedMotion: u } = B();
|
|
47
|
+
function d(r) {
|
|
48
|
+
var l;
|
|
49
|
+
const i = o.current;
|
|
50
|
+
i && r.target === i && (i.removeAttribute("style"), (l = t == null ? void 0 : t.onTransitionEnd) == null || l.call(t, e));
|
|
50
51
|
}
|
|
51
|
-
const
|
|
52
|
-
|
|
52
|
+
const f = g(() => {
|
|
53
|
+
var i, l;
|
|
54
|
+
if (a.current)
|
|
53
55
|
return;
|
|
54
|
-
if (
|
|
55
|
-
|
|
56
|
+
if ((i = t == null ? void 0 : t.onTransitionStart) == null || i.call(t, e), u) {
|
|
57
|
+
(l = t == null ? void 0 : t.onTransitionEnd) == null || l.call(t, e);
|
|
56
58
|
return;
|
|
57
59
|
}
|
|
58
|
-
const
|
|
59
|
-
if (
|
|
60
|
-
if (
|
|
61
|
-
|
|
60
|
+
const r = o.current;
|
|
61
|
+
if (r)
|
|
62
|
+
if (r.style.display = "block", r.style.overflow = "hidden", e)
|
|
63
|
+
r.style.height = "0", r.style.height = `${r.scrollHeight}px`;
|
|
62
64
|
else {
|
|
63
|
-
if (
|
|
64
|
-
|
|
65
|
+
if (r.scrollHeight === 0) {
|
|
66
|
+
r.removeAttribute("style");
|
|
65
67
|
return;
|
|
66
68
|
}
|
|
67
|
-
|
|
69
|
+
r.style.height = `${r.scrollHeight}px`, n.current = requestAnimationFrame(() => {
|
|
68
70
|
s.current = requestAnimationFrame(() => {
|
|
69
|
-
|
|
71
|
+
r.style.height = "0px";
|
|
70
72
|
});
|
|
71
73
|
});
|
|
72
74
|
}
|
|
73
|
-
}, [e,
|
|
74
|
-
return
|
|
75
|
-
|
|
76
|
-
}, [e,
|
|
77
|
-
const
|
|
78
|
-
return
|
|
79
|
-
|
|
75
|
+
}, [e, t, u]);
|
|
76
|
+
return y(() => {
|
|
77
|
+
f();
|
|
78
|
+
}, [e, f]), m(() => {
|
|
79
|
+
const r = o.current;
|
|
80
|
+
return r && r.addEventListener("transitionend", d), () => {
|
|
81
|
+
r && r.removeEventListener("transitionend", d);
|
|
80
82
|
};
|
|
81
|
-
}, [e]),
|
|
82
|
-
const
|
|
83
|
-
return
|
|
84
|
-
|
|
83
|
+
}, [e]), m(() => {
|
|
84
|
+
const r = n.current, i = s.current;
|
|
85
|
+
return a.current = !1, () => {
|
|
86
|
+
r && cancelAnimationFrame(r), i && cancelAnimationFrame(i);
|
|
85
87
|
};
|
|
86
|
-
}, [n, s]), [o,
|
|
88
|
+
}, [n, s]), [o, f];
|
|
87
89
|
}
|
|
88
|
-
const
|
|
89
|
-
const s =
|
|
90
|
+
const M = ({ ref: e, callback: t, condition: n = !0 }) => {
|
|
91
|
+
const s = g(
|
|
90
92
|
(o) => {
|
|
91
|
-
e
|
|
93
|
+
e != null && e.current && !e.current.contains(o.target) && t(o);
|
|
92
94
|
},
|
|
93
|
-
[
|
|
95
|
+
[t, e]
|
|
94
96
|
);
|
|
95
|
-
|
|
97
|
+
m(() => (e && n && document && document.addEventListener("click", s), () => {
|
|
96
98
|
document && document.removeEventListener("click", s);
|
|
97
99
|
}), [e, n, s]);
|
|
98
|
-
},
|
|
100
|
+
}, p = (() => {
|
|
99
101
|
const e = globalThis.IntersectionObserverEntry;
|
|
100
102
|
return "IntersectionObserver" in globalThis && e && "isIntersecting" in e.prototype;
|
|
101
|
-
})(),
|
|
102
|
-
},
|
|
103
|
-
const [o,
|
|
104
|
-
return
|
|
105
|
-
if (!
|
|
106
|
-
n
|
|
103
|
+
})(), w = () => {
|
|
104
|
+
}, L = (e, t = {}, n = w, s = !0) => {
|
|
105
|
+
const [o, a] = x(null), u = g((r) => a(r), [a]), d = c(t), f = c(null);
|
|
106
|
+
return m(() => {
|
|
107
|
+
if (!p) {
|
|
108
|
+
n == null || n();
|
|
107
109
|
return;
|
|
108
110
|
}
|
|
109
|
-
let
|
|
110
|
-
return
|
|
111
|
-
|
|
111
|
+
let r = f.current;
|
|
112
|
+
return r == null || r.disconnect(), o && s && (r = new IntersectionObserver(e, d.current), r.observe(o)), () => {
|
|
113
|
+
r == null || r.disconnect();
|
|
112
114
|
};
|
|
113
|
-
}, [o, e, n, s]), [
|
|
114
|
-
},
|
|
115
|
-
const [n, s] =
|
|
116
|
-
(
|
|
117
|
-
const
|
|
118
|
-
s(
|
|
115
|
+
}, [o, e, n, s]), [u];
|
|
116
|
+
}, P = (e = { rootMargin: "150px" }, t = !0) => {
|
|
117
|
+
const [n, s] = x(!1), [o] = L(
|
|
118
|
+
(a) => {
|
|
119
|
+
const u = a.some((d) => d.isIntersecting);
|
|
120
|
+
s(u);
|
|
119
121
|
},
|
|
120
122
|
e,
|
|
121
123
|
void 0,
|
|
122
|
-
|
|
124
|
+
t
|
|
123
125
|
);
|
|
124
126
|
return [o, n];
|
|
125
|
-
},
|
|
126
|
-
const s =
|
|
127
|
-
|
|
128
|
-
if (
|
|
129
|
-
const o = new MutationObserver(
|
|
127
|
+
}, I = () => typeof window < "u" && typeof MutationObserver < "u", R = (e, t, n) => {
|
|
128
|
+
const s = c(n);
|
|
129
|
+
m(() => {
|
|
130
|
+
if (I() && e) {
|
|
131
|
+
const o = new MutationObserver(t);
|
|
130
132
|
return "current" in e ? e.current && o.observe(e.current, s.current) : o.observe(e, s.current), () => o.disconnect();
|
|
131
133
|
}
|
|
132
|
-
}, [e,
|
|
134
|
+
}, [e, t]);
|
|
133
135
|
};
|
|
134
136
|
export {
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
137
|
+
_ as Accordion,
|
|
138
|
+
z as Alert,
|
|
139
|
+
mr as BaseLinkButton,
|
|
140
|
+
ke as Body,
|
|
141
|
+
Ve as Bold,
|
|
142
|
+
K as Breadcrumb,
|
|
143
|
+
X as BreadcrumbCurrent,
|
|
144
|
+
Pe as Checkbox,
|
|
145
|
+
rr as CheckmarkListItem,
|
|
146
|
+
ne as CircularProgress,
|
|
147
|
+
sr as CrossmarkListItem,
|
|
148
|
+
Ne as DisplayTitle,
|
|
149
|
+
se as Dropdown,
|
|
150
|
+
Ce as FieldSet,
|
|
149
151
|
fe as GhostArrowButton,
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
152
|
+
ae as GhostButton,
|
|
153
|
+
ye as GhostIconButton,
|
|
154
|
+
k as Gutter,
|
|
155
|
+
N as GutterPadding,
|
|
156
|
+
$e as H1,
|
|
157
|
+
Qe as H2,
|
|
158
|
+
We as H3,
|
|
159
|
+
_e as H4,
|
|
160
|
+
ur as Icons,
|
|
161
|
+
qe as Lead,
|
|
162
|
+
D as LightMode,
|
|
163
|
+
Ze as List,
|
|
164
|
+
nr as ListItem,
|
|
165
|
+
re as Loader,
|
|
166
|
+
Ue as Meta,
|
|
167
|
+
Q as NotificationDot,
|
|
168
|
+
ar as OrderedListItem,
|
|
169
|
+
U as Panel,
|
|
170
|
+
De as PasswordTextField,
|
|
171
|
+
le as PrimaryArrowButton,
|
|
172
|
+
ce as PrimaryButton,
|
|
173
|
+
Te as PrimaryIconButton,
|
|
174
|
+
Z as Progress,
|
|
175
|
+
Se as RadioToggleInput,
|
|
176
|
+
C as RiksTVProvider,
|
|
177
|
+
xe as SecondaryArrowButton,
|
|
178
|
+
ue as SecondaryButton,
|
|
179
|
+
ve as SecondaryIconButton,
|
|
180
|
+
je as Span,
|
|
181
|
+
F as StrimProvider,
|
|
182
|
+
ze as SubBody,
|
|
183
|
+
Je as SubTitle2,
|
|
184
|
+
Ke as SubTitle3,
|
|
185
|
+
Xe as Tag,
|
|
186
|
+
ge as TertiaryArrowButton,
|
|
187
|
+
de as TertiaryButton,
|
|
188
|
+
Be as TertiaryIconButton,
|
|
189
|
+
Fe as TextField,
|
|
190
|
+
we as ToggleButton,
|
|
191
|
+
Ie as ToggleInlineButton,
|
|
192
|
+
be as ToggleLinkButton,
|
|
193
|
+
b as useAnimatedHeight,
|
|
194
|
+
B as useBrowserPreferences,
|
|
195
|
+
M as useClickOutsideListener,
|
|
196
|
+
P as useElementVisible,
|
|
197
|
+
L as useIntersectionObserver,
|
|
198
|
+
R as useMutationObserver
|
|
197
199
|
};
|