@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.
@@ -1,41 +1,38 @@
1
- import { R as _ } from "./components/core/RiksTV-ca623c12.mjs";
2
- import { S as U } from "./components/core/Strim-d2a5664c.mjs";
3
- import { L as z } from "./components/core/LightMode-2d123160.mjs";
4
- import { G as K } from "./components/spacing/Gutter-f31ec5ff.mjs";
5
- import { G as Y } from "./components/spacing/GutterPadding-eb4c4631.mjs";
6
- import { N as ee } from "./components/notificationDot/NotificationDot-630a5e23.mjs";
7
- import { A as te } from "./components/accordion/Accordion-b8669b7e.mjs";
8
- import { P as oe } from "./components/panel/Panel-aba8ed29.mjs";
9
- import { A as ie } from "./components/alert/Alert-cf8930d7.mjs";
10
- import { B as ce, a as ue } from "./components/breadcrumb/Breadcrumb-64b3a50e.mjs";
11
- import { P as de } from "./components/progress/Progress-c5ae3c43.mjs";
12
- import { L as le } from "./components/loader/Loader-ff2a99f4.mjs";
13
- import { C as pe } from "./components/progress/CircularProgress-64666695.mjs";
14
- import { D as ge } from "./components/dropdown/Dropdown-86ff9c1f.mjs";
15
- import { G as Te, P as ve, S as Be, T as we } from "./components/button/Button-0fc6c6f0.mjs";
16
- import { G as Ie, P as Ee, S as Me, T as Re } from "./components/button/ArrowButton-fb6c0b61.mjs";
17
- import { G as Pe, P as Ae, S as Se, T as Ce } from "./components/button/IconButton-59e46ff2.mjs";
18
- import { T as He } from "./components/toggleButton/ToggleButton-640707ba.mjs";
19
- import { T as De } from "./components/toggleInlineButton/ToggleInlineButton-abb231c4.mjs";
20
- import { T as ke } from "./components/toggleLinkButton/ToggleLinkButton-b0d2f3b6.mjs";
21
- import { C as Ne } from "./components/checkbox/Checkbox-33bf3bf6.mjs";
22
- import { R as Qe } from "./components/toggle/RadioToggle-33eef633.mjs";
23
- import { F as _e } from "./components/toggle/FieldSet-35743deb.mjs";
24
- import { T as Ue } from "./components/textfield/TextField-ea15493f.mjs";
25
- import { B as ze, d as Je, D as Ke, a as Xe, b as Ye, c as Ze, H as er, L as rr, M as tr, S as nr, e as or, T as sr } from "./components/typography/Typography-563b6318.mjs";
26
- import { L as ar } from "./components/list/List-d60c4585.mjs";
27
- import { C as ur } from "./components/list/CheckmarkListItem-fee95140.mjs";
28
- import { L as dr } from "./components/list/ListItem-72dbd18f.mjs";
29
- import { C as lr } from "./components/list/CrossmarkListItem-815e3296.mjs";
30
- import { O as pr } from "./components/list/OrderedListItem-6d493abc.mjs";
31
- import { useState as x, useEffect as d, useRef as c, useCallback as p, useLayoutEffect as g } from "react";
32
- import { I as gr } from "./components/icons/Icons-2b68875c.mjs";
33
- import { B as Tr } from "./components/button/BaseLinkButton-c574a1a3.mjs";
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 h = "(prefers-reduced-motion: reduce)", y = (e) => typeof window < "u" && window.matchMedia ? window.matchMedia(e).matches : !1, T = (e, t) => {
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(h));
50
- return d(() => {
51
- typeof window < "u" && window.matchMedia && T(window.matchMedia(h), (n) => {
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 k(e, t) {
53
+ function F(e, t) {
57
54
  const n = c(), s = c(), o = c(null), a = c(!0), { prefersReducedMotion: u } = v();
58
- function m(r) {
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 = p(() => {
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]), d(() => {
86
+ }, [e, f]), m(() => {
90
87
  const r = o.current;
91
- return r && r.addEventListener("transitionend", m), () => {
92
- r && r.removeEventListener("transitionend", m);
88
+ return r && r.addEventListener("transitionend", d), () => {
89
+ r && r.removeEventListener("transitionend", d);
93
90
  };
94
- }, [e]), d(() => {
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 V = ({ ref: e, callback: t, condition: n = !0 }) => {
102
- const s = p(
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
- d(() => (e && n && document && document.addEventListener("click", s), () => {
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 = p((r) => a(r), [a]), m = c(t), f = c(null);
117
- return d(() => {
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, m.current), r.observe(o)), () => {
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
- }, N = (e = { rootMargin: "150px" }, t = !0) => {
124
+ }, O = (e = { rootMargin: "150px" }, t = !0) => {
128
125
  const [n, s] = x(!1), [o] = L(
129
126
  (a) => {
130
- const u = a.some((m) => m.isIntersecting);
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", $ = (e, t, n) => {
135
+ }, I = () => typeof window < "u" && typeof MutationObserver < "u", k = (e, t, n) => {
139
136
  const s = c(n);
140
- d(() => {
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
- te as Accordion,
149
- ie as Alert,
150
- Tr as BaseLinkButton,
151
- ze as Body,
152
- Je as Bold,
153
- ce as Breadcrumb,
154
- ue as BreadcrumbCurrent,
155
- Ne as Checkbox,
156
- ur as CheckmarkListItem,
157
- pe as CircularProgress,
158
- lr as CrossmarkListItem,
159
- Ke as DisplayTitle,
160
- ge as Dropdown,
161
- _e as FieldSet,
162
- Ie as GhostArrowButton,
163
- Te as GhostButton,
164
- Pe as GhostIconButton,
165
- K as Gutter,
166
- Y as GutterPadding,
167
- Xe as H1,
168
- Ye as H2,
169
- Ze as H3,
170
- er as H4,
171
- gr as Icons,
172
- rr as Lead,
173
- z as LightMode,
174
- ar as List,
175
- dr as ListItem,
176
- le as Loader,
177
- tr as Meta,
178
- ee as NotificationDot,
179
- pr as OrderedListItem,
180
- oe as Panel,
181
- Ee as PrimaryArrowButton,
182
- ve as PrimaryButton,
183
- Ae as PrimaryIconButton,
184
- de as Progress,
185
- Qe as RadioToggleInput,
186
- _ as RiksTVProvider,
187
- Me as SecondaryArrowButton,
188
- Be as SecondaryButton,
189
- Se as SecondaryIconButton,
190
- nr as Span,
191
- U as StrimProvider,
192
- or as SubBody,
193
- sr as Tag,
194
- Re as TertiaryArrowButton,
195
- we as TertiaryButton,
196
- Ce as TertiaryIconButton,
197
- Ue as TextField,
198
- He as ToggleButton,
199
- De as ToggleInlineButton,
200
- ke as ToggleLinkButton,
201
- k as useAnimatedHeight,
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
- V as useClickOutsideListener,
204
- N as useElementVisible,
200
+ D as useClickOutsideListener,
201
+ O as useElementVisible,
205
202
  L as useIntersectionObserver,
206
- $ as useMutationObserver
203
+ k as useMutationObserver
207
204
  };