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