@rikstv/shared-components 3.0.30 → 3.0.31

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 CHANGED
@@ -1,5 +1,10 @@
1
1
  # 📖 Changelog
2
2
 
3
+ ## 3.0.31
4
+
5
+ - Export `<SubTitle2>` and `<SubTitle3>` in build-bundle (forgotten when implemented)
6
+ - Fix types for `<Accordion>`, was `HTMLDivElement` instead of `HTMLDetailsElement`
7
+
3
8
  ## 3.0.30
4
9
 
5
10
  - Avoid that alert captures other animationEnd-events and just disappears.
@@ -1,6 +1,6 @@
1
- import { DetailedHTMLProps, FC, HTMLAttributes, ReactNode } from 'react';
1
+ import { DetailedHTMLProps, FC, DetailsHTMLAttributes, ReactNode } from 'react';
2
2
 
3
- interface Props extends DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement> {
3
+ interface Props extends DetailedHTMLProps<DetailsHTMLAttributes<HTMLDetailsElement>, HTMLDetailsElement> {
4
4
  heading: ReactNode;
5
5
  initialOpen?: boolean;
6
6
  lightBackground?: boolean | "white";
@@ -1,6 +1,6 @@
1
1
  import { j as s } from "../accordion/Accordion-CrPiD_81.mjs";
2
2
  import { forwardRef as w, useState as a } from "react";
3
- import { H as y, B } from "../typography/Typography-DzdoqysL.mjs";
3
+ import { H as y, B } from "../typography/Typography-C79Sp-ja.mjs";
4
4
  import "../icons/HeartToggle-BHSYQIN4.mjs";
5
5
  import { S as F, a as T, b as o, c as b } from "../icons/Icons-p9ZleYOo.mjs";
6
6
  const O = "_rds-alert--icon_m8jce_67", R = "_rds-alert--content-title_m8jce_79", E = "_rds-alert--content_m8jce_79", H = "_rds-alert--dismiss_m8jce_109", D = "_dismissed_m8jce_138", M = "_dismiss-fade-out_m8jce_1", e = {
@@ -1,6 +1,6 @@
1
1
  import { j as r } from "../accordion/Accordion-CrPiD_81.mjs";
2
2
  import { forwardRef as u } from "react";
3
- import { S as d } from "../typography/Typography-DzdoqysL.mjs";
3
+ import { S as d } from "../typography/Typography-C79Sp-ja.mjs";
4
4
  const b = u(({ className: a = "", crumbs: s, render: c, ...m }, i) => /* @__PURE__ */ r.jsx("nav", { className: `rds-breadcrumb ${a}`, ref: i, ...m, children: /* @__PURE__ */ r.jsx(d, { children: /* @__PURE__ */ r.jsx("ol", { className: "rds-breadcrumb__list", children: s.map(({ name: e, href: l }, n) => {
5
5
  const t = n === s.length - 1;
6
6
  return /* @__PURE__ */ r.jsx(
@@ -22,7 +22,7 @@ export { Checkbox } from './checkbox/Checkbox';
22
22
  export { RadioToggleInput } from './toggle/RadioToggle';
23
23
  export { FieldSet } from './toggle/FieldSet';
24
24
  export { TextField } from './textfield/TextField';
25
- export { DisplayTitle, H1, H2, H3, H4, Lead, Body, Bold, SubBody, Tag, Meta, Span } from './typography/Typography';
25
+ export { DisplayTitle, H1, H2, H3, H4, Lead, Body, Bold, SubBody, Tag, Meta, Span, SubTitle2, SubTitle3, } from './typography/Typography';
26
26
  export { List } from './list/List';
27
27
  export { CheckmarkListItem } from './list/CheckmarkListItem';
28
28
  export { ListItem } from './list/ListItem';
@@ -1,6 +1,6 @@
1
1
  import { j as t } from "../accordion/Accordion-CrPiD_81.mjs";
2
2
  import { forwardRef as f } from "react";
3
- import { S as j } from "../typography/Typography-DzdoqysL.mjs";
3
+ import { S as j } from "../typography/Typography-C79Sp-ja.mjs";
4
4
  import "../icons/HeartToggle-BHSYQIN4.mjs";
5
5
  import { b as c, c as u, a as v } from "../icons/Icons-p9ZleYOo.mjs";
6
6
  const N = "_rds-panel_1xnhs_1", b = "_content-and-buttons_1xnhs_33", P = "_content_1xnhs_33", y = "_title_1xnhs_59", A = "_icon_1xnhs_67", S = "_buttons_1xnhs_74", n = {
@@ -1,6 +1,6 @@
1
1
  import { j as s } from "../accordion/Accordion-CrPiD_81.mjs";
2
2
  import { forwardRef as x, useState as e, useEffect as g } from "react";
3
- import { S as u } from "../typography/Typography-DzdoqysL.mjs";
3
+ import { S as u } from "../typography/Typography-C79Sp-ja.mjs";
4
4
  const m = ({ progressRatio: r }) => (1 - r) * 100 * Math.PI, j = x(
5
5
  ({ progressRatio: r, label: t, size: a = "small", className: l = "", children: c, ...d }, o) => {
6
6
  const [i, n] = e(0), [p] = e(a === "small" ? "160px" : "260px");
@@ -38,23 +38,25 @@ const h = e({ semanticElement: "p", lookLike: "sub-body" });
38
38
  h.displayName = "sub-body";
39
39
  const g = e({ semanticElement: "span", lookLike: "tag" });
40
40
  g.displayName = "tag";
41
- const H = e({ semanticElement: "strong", lookLike: "bold" });
42
- H.displayName = "bold";
43
- const S = e({ semanticElement: "span", lookLike: "meta" });
44
- S.displayName = "meta";
45
- const T = e({ semanticElement: "span", lookLike: "span" });
46
- T.displayName = "span";
41
+ const f = e({ semanticElement: "strong", lookLike: "bold" });
42
+ f.displayName = "bold";
43
+ const H = e({ semanticElement: "span", lookLike: "meta" });
44
+ H.displayName = "meta";
45
+ const S = e({ semanticElement: "span", lookLike: "span" });
46
+ S.displayName = "span";
47
47
  export {
48
48
  u as B,
49
49
  p as D,
50
50
  N as H,
51
51
  r as L,
52
- S as M,
53
- T as S,
52
+ H as M,
53
+ S,
54
54
  g as T,
55
55
  k as a,
56
56
  y as b,
57
57
  E as c,
58
- H as d,
59
- h as e
58
+ f as d,
59
+ h as e,
60
+ b as f,
61
+ L as g
60
62
  };
@@ -5,50 +5,50 @@ import { G as k } from "./components/spacing/Gutter-CZQOVELR.mjs";
5
5
  import { G as N } from "./components/spacing/GutterPadding-Dm0Wv0tj.mjs";
6
6
  import { N as Q } from "./components/notificationDot/NotificationDot-C24-oy5e.mjs";
7
7
  import { A as _ } from "./components/accordion/Accordion-CrPiD_81.mjs";
8
- import { P as U } from "./components/panel/Panel-CWXQsCIE.mjs";
9
- import { A as z } from "./components/alert/Alert-B6_xaqjR.mjs";
10
- import { B as K, a as X } from "./components/breadcrumb/Breadcrumb-C-iHHmag.mjs";
8
+ import { P as U } from "./components/panel/Panel-DeeNKZdu.mjs";
9
+ import { A as z } from "./components/alert/Alert-BdZa6EHq.mjs";
10
+ import { B as K, a as X } from "./components/breadcrumb/Breadcrumb-DqvEwkQ6.mjs";
11
11
  import { P as Z } from "./components/progress/Progress-ZSILwF-g.mjs";
12
12
  import { L as re } from "./components/loader/Loader-Bk0JZ1M5.mjs";
13
- import { C as ne } from "./components/progress/CircularProgress-CZBV47Pb.mjs";
13
+ import { C as ne } from "./components/progress/CircularProgress-BfXMNsNM.mjs";
14
14
  import { D as se } from "./components/dropdown/Dropdown-iW7aS3jx.mjs";
15
15
  import { G as ae, P as ce, S as ue, T as de } from "./components/button/Button-Bs_Tl8uJ.mjs";
16
- import { G as fe, P as le, S as xe, T as he } from "./components/button/ArrowButton-C0WywcBN.mjs";
16
+ import { G as fe, P as le, S as xe, T as ge } from "./components/button/ArrowButton-C0WywcBN.mjs";
17
17
  import { G as ye, P as Te, S as ve, T as Be } from "./components/button/IconButton-3TUWI6Mc.mjs";
18
18
  import { T as we } from "./components/toggleButton/ToggleButton-Cnjgoc3g.mjs";
19
19
  import { T as Ie } from "./components/toggleInlineButton/ToggleInlineButton-BR5pxqVE.mjs";
20
- import { T as Me } from "./components/toggleLinkButton/ToggleLinkButton-Ck1NEr07.mjs";
21
- import { C as be } from "./components/checkbox/Checkbox-D6f5jfzl.mjs";
22
- import { R as Ae } from "./components/toggle/RadioToggle-BICr1hFE.mjs";
20
+ import { T as be } from "./components/toggleLinkButton/ToggleLinkButton-Ck1NEr07.mjs";
21
+ import { C as Re } from "./components/checkbox/Checkbox-D6f5jfzl.mjs";
22
+ import { R as Pe } from "./components/toggle/RadioToggle-BICr1hFE.mjs";
23
23
  import { F as Ce } from "./components/toggle/FieldSet-Bq2lhIzg.mjs";
24
24
  import { T as He } from "./components/textfield/TextField-Cada_h0q.mjs";
25
- import { B as De, d as Oe, D as ke, a as Ve, b as Ne, c as $e, H as Qe, L as We, M as _e, S as qe, e as Ue, T as je } from "./components/typography/Typography-DzdoqysL.mjs";
26
- import { L as Je } from "./components/list/List-CpfjceLN.mjs";
27
- import { C as Xe } from "./components/list/CheckmarkListItem-Dew6gW7B.mjs";
28
- import { L as Ze } from "./components/list/ListItem-JIUBy2_m.mjs";
29
- import { C as rr } from "./components/list/CrossmarkListItem-CxKgvELN.mjs";
30
- import { O as nr } from "./components/list/OrderedListItem-CmneHG3P.mjs";
31
- import { useState as x, useEffect as m, useRef as c, useCallback as h, useLayoutEffect as y } from "react";
32
- import { I as sr } from "./components/icons/Icons-p9ZleYOo.mjs";
33
- import { B as ar } from "./components/button/BaseLinkButton-CquLmqew.mjs";
34
- const g = "(prefers-reduced-motion: reduce)", T = (e) => typeof window < "u" && window.matchMedia ? window.matchMedia(e).matches : !1, v = (e, t) => {
25
+ import { B as De, d as Oe, D as ke, a as Ve, b as Ne, c as $e, H as Qe, L as We, M as _e, S as qe, e as Ue, f as je, g as ze, T as Je } from "./components/typography/Typography-C79Sp-ja.mjs";
26
+ import { L as Xe } from "./components/list/List-CpfjceLN.mjs";
27
+ import { C as Ze } from "./components/list/CheckmarkListItem-Dew6gW7B.mjs";
28
+ import { L as rr } from "./components/list/ListItem-JIUBy2_m.mjs";
29
+ import { C as nr } from "./components/list/CrossmarkListItem-CxKgvELN.mjs";
30
+ import { O as sr } from "./components/list/OrderedListItem-CmneHG3P.mjs";
31
+ import { useState as x, useEffect as m, useRef as c, useCallback as g, useLayoutEffect as y } from "react";
32
+ import { I as ar } from "./components/icons/Icons-p9ZleYOo.mjs";
33
+ import { B as ur } from "./components/button/BaseLinkButton-CquLmqew.mjs";
34
+ const h = "(prefers-reduced-motion: reduce)", T = (e) => typeof window < "u" && window.matchMedia ? window.matchMedia(e).matches : !1, v = (e, t) => {
35
35
  typeof e.addEventListener < "u" && e.addEventListener("change", t);
36
36
  }, B = () => {
37
- const [e, t] = x(T(g));
37
+ const [e, t] = x(T(h));
38
38
  return m(() => {
39
- typeof window < "u" && window.matchMedia && v(window.matchMedia(g), (n) => {
39
+ typeof window < "u" && window.matchMedia && v(window.matchMedia(h), (n) => {
40
40
  t(n.matches);
41
41
  });
42
42
  }, []), { prefersReducedMotion: e };
43
43
  };
44
- function M(e, t) {
44
+ function b(e, t) {
45
45
  const n = c(), s = c(), o = c(null), a = c(!0), { prefersReducedMotion: u } = B();
46
46
  function d(r) {
47
47
  var l;
48
48
  const i = o.current;
49
49
  i && r.target === i && (i.removeAttribute("style"), (l = t == null ? void 0 : t.onTransitionEnd) == null || l.call(t, e));
50
50
  }
51
- const f = h(() => {
51
+ const f = g(() => {
52
52
  var i, l;
53
53
  if (a.current)
54
54
  return;
@@ -86,8 +86,8 @@ function M(e, t) {
86
86
  };
87
87
  }, [n, s]), [o, f];
88
88
  }
89
- const R = ({ ref: e, callback: t, condition: n = !0 }) => {
90
- const s = h(
89
+ const M = ({ ref: e, callback: t, condition: n = !0 }) => {
90
+ const s = g(
91
91
  (o) => {
92
92
  e != null && e.current && !e.current.contains(o.target) && t(o);
93
93
  },
@@ -101,7 +101,7 @@ const R = ({ ref: e, callback: t, condition: n = !0 }) => {
101
101
  return "IntersectionObserver" in globalThis && e && "isIntersecting" in e.prototype;
102
102
  })(), w = () => {
103
103
  }, L = (e, t = {}, n = w, s = !0) => {
104
- const [o, a] = x(null), u = h((r) => a(r), [a]), d = c(t), f = c(null);
104
+ const [o, a] = x(null), u = g((r) => a(r), [a]), d = c(t), f = c(null);
105
105
  return m(() => {
106
106
  if (!p) {
107
107
  n == null || n();
@@ -112,7 +112,7 @@ const R = ({ ref: e, callback: t, condition: n = !0 }) => {
112
112
  r == null || r.disconnect();
113
113
  };
114
114
  }, [o, e, n, s]), [u];
115
- }, b = (e = { rootMargin: "150px" }, t = !0) => {
115
+ }, R = (e = { rootMargin: "150px" }, t = !0) => {
116
116
  const [n, s] = x(!1), [o] = L(
117
117
  (a) => {
118
118
  const u = a.some((d) => d.isIntersecting);
@@ -123,7 +123,7 @@ const R = ({ ref: e, callback: t, condition: n = !0 }) => {
123
123
  t
124
124
  );
125
125
  return [o, n];
126
- }, I = () => typeof window < "u" && typeof MutationObserver < "u", P = (e, t, n) => {
126
+ }, I = () => typeof window < "u" && typeof MutationObserver < "u", S = (e, t, n) => {
127
127
  const s = c(n);
128
128
  m(() => {
129
129
  if (I() && e) {
@@ -135,15 +135,15 @@ const R = ({ ref: e, callback: t, condition: n = !0 }) => {
135
135
  export {
136
136
  _ as Accordion,
137
137
  z as Alert,
138
- ar as BaseLinkButton,
138
+ ur as BaseLinkButton,
139
139
  De as Body,
140
140
  Oe as Bold,
141
141
  K as Breadcrumb,
142
142
  X as BreadcrumbCurrent,
143
- be as Checkbox,
144
- Xe as CheckmarkListItem,
143
+ Re as Checkbox,
144
+ Ze as CheckmarkListItem,
145
145
  ne as CircularProgress,
146
- rr as CrossmarkListItem,
146
+ nr as CrossmarkListItem,
147
147
  ke as DisplayTitle,
148
148
  se as Dropdown,
149
149
  Ce as FieldSet,
@@ -156,21 +156,21 @@ export {
156
156
  Ne as H2,
157
157
  $e as H3,
158
158
  Qe as H4,
159
- sr as Icons,
159
+ ar as Icons,
160
160
  We as Lead,
161
161
  D as LightMode,
162
- Je as List,
163
- Ze as ListItem,
162
+ Xe as List,
163
+ rr as ListItem,
164
164
  re as Loader,
165
165
  _e as Meta,
166
166
  Q as NotificationDot,
167
- nr as OrderedListItem,
167
+ sr as OrderedListItem,
168
168
  U as Panel,
169
169
  le as PrimaryArrowButton,
170
170
  ce as PrimaryButton,
171
171
  Te as PrimaryIconButton,
172
172
  Z as Progress,
173
- Ae as RadioToggleInput,
173
+ Pe as RadioToggleInput,
174
174
  C as RiksTVProvider,
175
175
  xe as SecondaryArrowButton,
176
176
  ue as SecondaryButton,
@@ -178,18 +178,20 @@ export {
178
178
  qe as Span,
179
179
  H as StrimProvider,
180
180
  Ue as SubBody,
181
- je as Tag,
182
- he as TertiaryArrowButton,
181
+ je as SubTitle2,
182
+ ze as SubTitle3,
183
+ Je as Tag,
184
+ ge as TertiaryArrowButton,
183
185
  de as TertiaryButton,
184
186
  Be as TertiaryIconButton,
185
187
  He as TextField,
186
188
  we as ToggleButton,
187
189
  Ie as ToggleInlineButton,
188
- Me as ToggleLinkButton,
189
- M as useAnimatedHeight,
190
+ be as ToggleLinkButton,
191
+ b as useAnimatedHeight,
190
192
  B as useBrowserPreferences,
191
- R as useClickOutsideListener,
192
- b as useElementVisible,
193
+ M as useClickOutsideListener,
194
+ R as useElementVisible,
193
195
  L as useIntersectionObserver,
194
- P as useMutationObserver
196
+ S as useMutationObserver
195
197
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rikstv/shared-components",
3
- "version": "3.0.30",
3
+ "version": "3.0.31",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },