@rikstv/shared-components 3.0.18 → 3.0.20
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 +14 -0
- package/dist/components/alert/{Alert-cf8930d7.mjs → Alert-dcf856ca.mjs} +15 -15
- package/dist/components/breadcrumb/breadcrumb.scss +3 -1
- package/dist/components/core/core.scss +129 -0
- package/dist/components/core/mixin/breakpoints.scss +44 -0
- package/dist/components/core/rtv.scss +4 -5
- package/dist/components/core/strm.scss +4 -5
- package/dist/components/panel/Panel-c66c5b49.mjs +59 -0
- package/dist/components/panel/Panel.d.ts +6 -6
- package/dist/components/toggleButton/toggleButton.scss +2 -1
- package/dist/shared-components.mjs +111 -114
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/components/panel/Info-b3cd3030.mjs +0 -33
- package/dist/components/panel/Info.d.ts +0 -2
- package/dist/components/panel/Panel-aba8ed29.mjs +0 -51
- package/dist/components/panel/Success-599aaf42.mjs +0 -132
- package/dist/components/panel/Success.d.ts +0 -2
- package/dist/components/panel/Warning-f3b9ee98.mjs +0 -11
- package/dist/components/panel/Warning.d.ts +0 -2
- package/dist/components/panel/panel.scss +0 -102
|
@@ -1,41 +1,38 @@
|
|
|
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
|
|
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 { B as
|
|
26
|
-
import { L as
|
|
27
|
-
import { C as
|
|
28
|
-
import { L as
|
|
29
|
-
import { C as
|
|
30
|
-
import { O as
|
|
31
|
-
import { useState as x, useEffect as
|
|
32
|
-
import { I as
|
|
33
|
-
import { B as
|
|
1
|
+
import { R as $ } from "./components/core/RiksTV-ca623c12.mjs";
|
|
2
|
+
import { S as W } from "./components/core/Strim-d2a5664c.mjs";
|
|
3
|
+
import { L as q } from "./components/core/LightMode-2d123160.mjs";
|
|
4
|
+
import { G as j } from "./components/spacing/Gutter-f31ec5ff.mjs";
|
|
5
|
+
import { G as J } from "./components/spacing/GutterPadding-eb4c4631.mjs";
|
|
6
|
+
import { N as X } from "./components/notificationDot/NotificationDot-630a5e23.mjs";
|
|
7
|
+
import { A as Z } from "./components/accordion/Accordion-b8669b7e.mjs";
|
|
8
|
+
import { P as re } from "./components/panel/Panel-c66c5b49.mjs";
|
|
9
|
+
import { A as ne } from "./components/alert/Alert-dcf856ca.mjs";
|
|
10
|
+
import { B as se, a as ie } from "./components/breadcrumb/Breadcrumb-64b3a50e.mjs";
|
|
11
|
+
import { P as ce } from "./components/progress/Progress-c5ae3c43.mjs";
|
|
12
|
+
import { L as de } from "./components/loader/Loader-ff2a99f4.mjs";
|
|
13
|
+
import { C as fe } from "./components/progress/CircularProgress-64666695.mjs";
|
|
14
|
+
import { D as xe } from "./components/dropdown/Dropdown-86ff9c1f.mjs";
|
|
15
|
+
import { G as pe, P as ge, S as ye, T as Te } from "./components/button/Button-0fc6c6f0.mjs";
|
|
16
|
+
import { G as Be, P as we, S as Le, T as Ie } from "./components/button/ArrowButton-fb6c0b61.mjs";
|
|
17
|
+
import { G as Me, P as Re, S as be, T as Pe } from "./components/button/IconButton-59e46ff2.mjs";
|
|
18
|
+
import { T as Se } from "./components/toggleButton/ToggleButton-640707ba.mjs";
|
|
19
|
+
import { T as Ge } from "./components/toggleInlineButton/ToggleInlineButton-abb231c4.mjs";
|
|
20
|
+
import { T as Fe } from "./components/toggleLinkButton/ToggleLinkButton-b0d2f3b6.mjs";
|
|
21
|
+
import { C as Oe } from "./components/checkbox/Checkbox-33bf3bf6.mjs";
|
|
22
|
+
import { R as Ve } from "./components/toggle/RadioToggle-33eef633.mjs";
|
|
23
|
+
import { F as $e } from "./components/toggle/FieldSet-35743deb.mjs";
|
|
24
|
+
import { T as We } from "./components/textfield/TextField-ea15493f.mjs";
|
|
25
|
+
import { B as qe, d as Ue, D as je, a as ze, b as Je, c as Ke, H as Xe, L as Ye, M as Ze, S as er, e as rr, T as tr } from "./components/typography/Typography-563b6318.mjs";
|
|
26
|
+
import { L as or } from "./components/list/List-d60c4585.mjs";
|
|
27
|
+
import { C as ir } from "./components/list/CheckmarkListItem-fee95140.mjs";
|
|
28
|
+
import { L as cr } from "./components/list/ListItem-72dbd18f.mjs";
|
|
29
|
+
import { C as dr } from "./components/list/CrossmarkListItem-815e3296.mjs";
|
|
30
|
+
import { O as fr } from "./components/list/OrderedListItem-6d493abc.mjs";
|
|
31
|
+
import { useState as x, useEffect as m, useRef as c, useCallback as h, useLayoutEffect as g } from "react";
|
|
32
|
+
import { I as xr } from "./components/icons/Icons-2b68875c.mjs";
|
|
33
|
+
import { B as pr } from "./components/button/BaseLinkButton-c574a1a3.mjs";
|
|
34
34
|
import "./components/core/Core-b450ba6c.mjs";
|
|
35
35
|
import "./components/icons/Chevron-84c4ced9.mjs";
|
|
36
|
-
import "./components/panel/Success-599aaf42.mjs";
|
|
37
|
-
import "./components/panel/Warning-f3b9ee98.mjs";
|
|
38
|
-
import "./components/panel/Info-b3cd3030.mjs";
|
|
39
36
|
import "./components/icons/HeartToggle-54bb18c7.mjs";
|
|
40
37
|
import "./components/loader/RawLoader-864bb620.mjs";
|
|
41
38
|
import "./components/button/BaseButton-a5548ee7.mjs";
|
|
@@ -43,24 +40,24 @@ import "./components/button/DecoratedButton-d1dbe30e.mjs";
|
|
|
43
40
|
import "./components/button/BaseDecoratedButton-ffa6f719.mjs";
|
|
44
41
|
import "./components/icons/Arrow-ff62ab24.mjs";
|
|
45
42
|
import "./components/checkbox/BaseCheckbox-50df3aeb.mjs";
|
|
46
|
-
const
|
|
43
|
+
const p = "(prefers-reduced-motion: reduce)", y = (e) => typeof window < "u" && window.matchMedia ? window.matchMedia(e).matches : !1, T = (e, t) => {
|
|
47
44
|
typeof e.addEventListener < "u" && e.addEventListener("change", t);
|
|
48
45
|
}, v = () => {
|
|
49
|
-
const [e, t] = x(y(
|
|
50
|
-
return
|
|
51
|
-
typeof window < "u" && window.matchMedia && T(window.matchMedia(
|
|
46
|
+
const [e, t] = x(y(p));
|
|
47
|
+
return m(() => {
|
|
48
|
+
typeof window < "u" && window.matchMedia && T(window.matchMedia(p), (n) => {
|
|
52
49
|
t(n.matches);
|
|
53
50
|
});
|
|
54
51
|
}, []), { prefersReducedMotion: e };
|
|
55
52
|
};
|
|
56
|
-
function
|
|
53
|
+
function F(e, t) {
|
|
57
54
|
const n = c(), s = c(), o = c(null), a = c(!0), { prefersReducedMotion: u } = v();
|
|
58
|
-
function
|
|
55
|
+
function d(r) {
|
|
59
56
|
var l;
|
|
60
57
|
const i = o.current;
|
|
61
58
|
i && r.target === i && (i.removeAttribute("style"), (l = t == null ? void 0 : t.onTransitionEnd) == null || l.call(t, e));
|
|
62
59
|
}
|
|
63
|
-
const f =
|
|
60
|
+
const f = h(() => {
|
|
64
61
|
var i, l;
|
|
65
62
|
if (a.current)
|
|
66
63
|
return;
|
|
@@ -86,26 +83,26 @@ function k(e, t) {
|
|
|
86
83
|
}, [e, t, u]);
|
|
87
84
|
return g(() => {
|
|
88
85
|
f();
|
|
89
|
-
}, [e, f]),
|
|
86
|
+
}, [e, f]), m(() => {
|
|
90
87
|
const r = o.current;
|
|
91
|
-
return r && r.addEventListener("transitionend",
|
|
92
|
-
r && r.removeEventListener("transitionend",
|
|
88
|
+
return r && r.addEventListener("transitionend", d), () => {
|
|
89
|
+
r && r.removeEventListener("transitionend", d);
|
|
93
90
|
};
|
|
94
|
-
}, [e]),
|
|
91
|
+
}, [e]), m(() => {
|
|
95
92
|
const r = n.current, i = s.current;
|
|
96
93
|
return a.current = !1, () => {
|
|
97
94
|
r && cancelAnimationFrame(r), i && cancelAnimationFrame(i);
|
|
98
95
|
};
|
|
99
96
|
}, [n, s]), [o, f];
|
|
100
97
|
}
|
|
101
|
-
const
|
|
102
|
-
const s =
|
|
98
|
+
const D = ({ ref: e, callback: t, condition: n = !0 }) => {
|
|
99
|
+
const s = h(
|
|
103
100
|
(o) => {
|
|
104
101
|
e != null && e.current && !e.current.contains(o.target) && t(o);
|
|
105
102
|
},
|
|
106
103
|
[t, e]
|
|
107
104
|
);
|
|
108
|
-
|
|
105
|
+
m(() => (e && n && document && document.addEventListener("click", s), () => {
|
|
109
106
|
document && document.removeEventListener("click", s);
|
|
110
107
|
}), [e, n, s]);
|
|
111
108
|
}, B = (() => {
|
|
@@ -113,21 +110,21 @@ const V = ({ ref: e, callback: t, condition: n = !0 }) => {
|
|
|
113
110
|
return "IntersectionObserver" in globalThis && e && "isIntersecting" in e.prototype;
|
|
114
111
|
})(), w = () => {
|
|
115
112
|
}, L = (e, t = {}, n = w, s = !0) => {
|
|
116
|
-
const [o, a] = x(null), u =
|
|
117
|
-
return
|
|
113
|
+
const [o, a] = x(null), u = h((r) => a(r), [a]), d = c(t), f = c(null);
|
|
114
|
+
return m(() => {
|
|
118
115
|
if (!B) {
|
|
119
116
|
n == null || n();
|
|
120
117
|
return;
|
|
121
118
|
}
|
|
122
119
|
let r = f.current;
|
|
123
|
-
return r == null || r.disconnect(), o && s && (r = new IntersectionObserver(e,
|
|
120
|
+
return r == null || r.disconnect(), o && s && (r = new IntersectionObserver(e, d.current), r.observe(o)), () => {
|
|
124
121
|
r == null || r.disconnect();
|
|
125
122
|
};
|
|
126
123
|
}, [o, e, n, s]), [u];
|
|
127
|
-
},
|
|
124
|
+
}, O = (e = { rootMargin: "150px" }, t = !0) => {
|
|
128
125
|
const [n, s] = x(!1), [o] = L(
|
|
129
126
|
(a) => {
|
|
130
|
-
const u = a.some((
|
|
127
|
+
const u = a.some((d) => d.isIntersecting);
|
|
131
128
|
s(u);
|
|
132
129
|
},
|
|
133
130
|
e,
|
|
@@ -135,9 +132,9 @@ const V = ({ ref: e, callback: t, condition: n = !0 }) => {
|
|
|
135
132
|
t
|
|
136
133
|
);
|
|
137
134
|
return [o, n];
|
|
138
|
-
}, I = () => typeof window < "u" && typeof MutationObserver < "u",
|
|
135
|
+
}, I = () => typeof window < "u" && typeof MutationObserver < "u", k = (e, t, n) => {
|
|
139
136
|
const s = c(n);
|
|
140
|
-
|
|
137
|
+
m(() => {
|
|
141
138
|
if (I() && e) {
|
|
142
139
|
const o = new MutationObserver(t);
|
|
143
140
|
return "current" in e ? e.current && o.observe(e.current, s.current) : o.observe(e, s.current), () => o.disconnect();
|
|
@@ -145,63 +142,63 @@ const V = ({ ref: e, callback: t, condition: n = !0 }) => {
|
|
|
145
142
|
}, [e, t]);
|
|
146
143
|
};
|
|
147
144
|
export {
|
|
148
|
-
|
|
149
|
-
|
|
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
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
145
|
+
Z as Accordion,
|
|
146
|
+
ne as Alert,
|
|
147
|
+
pr as BaseLinkButton,
|
|
148
|
+
qe as Body,
|
|
149
|
+
Ue as Bold,
|
|
150
|
+
se as Breadcrumb,
|
|
151
|
+
ie as BreadcrumbCurrent,
|
|
152
|
+
Oe as Checkbox,
|
|
153
|
+
ir as CheckmarkListItem,
|
|
154
|
+
fe as CircularProgress,
|
|
155
|
+
dr as CrossmarkListItem,
|
|
156
|
+
je as DisplayTitle,
|
|
157
|
+
xe as Dropdown,
|
|
158
|
+
$e as FieldSet,
|
|
159
|
+
Be as GhostArrowButton,
|
|
160
|
+
pe as GhostButton,
|
|
161
|
+
Me as GhostIconButton,
|
|
162
|
+
j as Gutter,
|
|
163
|
+
J as GutterPadding,
|
|
164
|
+
ze as H1,
|
|
165
|
+
Je as H2,
|
|
166
|
+
Ke as H3,
|
|
167
|
+
Xe as H4,
|
|
168
|
+
xr as Icons,
|
|
169
|
+
Ye as Lead,
|
|
170
|
+
q as LightMode,
|
|
171
|
+
or as List,
|
|
172
|
+
cr as ListItem,
|
|
173
|
+
de as Loader,
|
|
174
|
+
Ze as Meta,
|
|
175
|
+
X as NotificationDot,
|
|
176
|
+
fr as OrderedListItem,
|
|
177
|
+
re as Panel,
|
|
178
|
+
we as PrimaryArrowButton,
|
|
179
|
+
ge as PrimaryButton,
|
|
180
|
+
Re as PrimaryIconButton,
|
|
181
|
+
ce as Progress,
|
|
182
|
+
Ve as RadioToggleInput,
|
|
183
|
+
$ as RiksTVProvider,
|
|
184
|
+
Le as SecondaryArrowButton,
|
|
185
|
+
ye as SecondaryButton,
|
|
186
|
+
be as SecondaryIconButton,
|
|
187
|
+
er as Span,
|
|
188
|
+
W as StrimProvider,
|
|
189
|
+
rr as SubBody,
|
|
190
|
+
tr as Tag,
|
|
191
|
+
Ie as TertiaryArrowButton,
|
|
192
|
+
Te as TertiaryButton,
|
|
193
|
+
Pe as TertiaryIconButton,
|
|
194
|
+
We as TextField,
|
|
195
|
+
Se as ToggleButton,
|
|
196
|
+
Ge as ToggleInlineButton,
|
|
197
|
+
Fe as ToggleLinkButton,
|
|
198
|
+
F as useAnimatedHeight,
|
|
202
199
|
v as useBrowserPreferences,
|
|
203
|
-
|
|
204
|
-
|
|
200
|
+
D as useClickOutsideListener,
|
|
201
|
+
O as useElementVisible,
|
|
205
202
|
L as useIntersectionObserver,
|
|
206
|
-
|
|
203
|
+
k as useMutationObserver
|
|
207
204
|
};
|