@ogcio/design-system-react 1.31.1 → 1.33.0

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.
Files changed (114) hide show
  1. package/dist/Heading.d.ts +5 -0
  2. package/dist/Heading.js +22 -0
  3. package/dist/accordion/accordion-item.js +62 -57
  4. package/dist/alert/alert.d.ts +3 -0
  5. package/dist/alert/alert.js +40 -57
  6. package/dist/alert/variants.d.ts +49 -52
  7. package/dist/alert/variants.js +17 -18
  8. package/dist/atoms/{DsButton.d.ts → Button.d.ts} +5 -5
  9. package/dist/atoms/{DsButton.js → Button.js} +22 -36
  10. package/dist/atoms/heading/H1.d.ts +3 -0
  11. package/dist/atoms/heading/H1.js +20 -0
  12. package/dist/atoms/heading/H2.d.ts +3 -0
  13. package/dist/atoms/heading/H2.js +20 -0
  14. package/dist/atoms/heading/H3.d.ts +3 -0
  15. package/dist/atoms/heading/H3.js +20 -0
  16. package/dist/atoms/heading/H4.d.ts +3 -0
  17. package/dist/atoms/heading/H4.js +20 -0
  18. package/dist/atoms/heading/H5.d.ts +3 -0
  19. package/dist/atoms/heading/H5.js +20 -0
  20. package/dist/atoms/heading/H6.d.ts +3 -0
  21. package/dist/atoms/heading/H6.js +20 -0
  22. package/dist/atoms/heading/index.d.ts +9 -0
  23. package/dist/atoms/heading/index.js +18 -0
  24. package/dist/atoms/heading/styles.d.ts +65 -0
  25. package/dist/atoms/heading/styles.js +17 -0
  26. package/dist/atoms/heading/types.d.ts +15 -0
  27. package/dist/atoms/heading/types.js +11 -0
  28. package/dist/atoms/heading/utils.d.ts +2 -0
  29. package/dist/atoms/heading/utils.js +5 -0
  30. package/dist/atoms/icons/ArrowLeft.d.ts +3 -0
  31. package/dist/atoms/icons/ArrowLeft.js +23 -0
  32. package/dist/atoms/icons/ArrowRight.d.ts +3 -0
  33. package/dist/atoms/icons/ArrowRight.js +23 -0
  34. package/dist/atoms/icons/CheckCircle.d.ts +3 -0
  35. package/dist/atoms/icons/CheckCircle.js +23 -0
  36. package/dist/atoms/icons/Error.d.ts +3 -0
  37. package/dist/atoms/icons/Error.js +23 -0
  38. package/dist/atoms/icons/FirstPage.d.ts +3 -0
  39. package/dist/atoms/icons/FirstPage.js +23 -0
  40. package/dist/atoms/icons/Info.d.ts +3 -0
  41. package/dist/atoms/icons/Info.js +23 -0
  42. package/dist/atoms/icons/KeyboardArrowLeft.d.ts +3 -0
  43. package/dist/atoms/icons/KeyboardArrowLeft.js +23 -0
  44. package/dist/atoms/icons/KeyboardArrowRight.d.ts +3 -0
  45. package/dist/atoms/icons/KeyboardArrowRight.js +23 -0
  46. package/dist/atoms/icons/LastPage.d.ts +3 -0
  47. package/dist/atoms/icons/LastPage.js +23 -0
  48. package/dist/atoms/icons/Warning.d.ts +3 -0
  49. package/dist/atoms/icons/Warning.js +23 -0
  50. package/dist/atoms/icons/index.d.ts +12 -2
  51. package/dist/atoms/icons/index.js +30 -10
  52. package/dist/atoms/index.d.ts +2 -1
  53. package/dist/atoms/index.js +48 -12
  54. package/dist/atoms/storybook/Heading.meta.d.ts +60 -0
  55. package/dist/atoms/storybook/Heading.meta.js +70 -0
  56. package/dist/atoms/storybook/Icons.meta.d.ts +51 -0
  57. package/dist/atoms/storybook/Icons.meta.js +130 -0
  58. package/dist/atoms/storybook/InsetText.meta.d.ts +52 -0
  59. package/dist/atoms/storybook/InsetText.meta.js +64 -0
  60. package/dist/atoms/storybook/Logos.meta.d.ts +35 -0
  61. package/dist/atoms/storybook/Logos.meta.js +54 -0
  62. package/dist/breadcrumbs/breadcrumbs.js +20 -19
  63. package/dist/button/button.d.ts +2 -9
  64. package/dist/button/button.js +65 -32
  65. package/dist/button/helpers.d.ts +2 -1
  66. package/dist/button/types.d.ts +25 -8
  67. package/dist/button-group/button-group.js +43 -45
  68. package/dist/button-group/types.d.ts +5 -5
  69. package/dist/card/card-legacy.js +1 -1
  70. package/dist/card/types.d.ts +1 -1
  71. package/dist/combo-box/dropdown-item.js +1 -1
  72. package/dist/cookie-banner/cookie-banner.d.ts +1 -1
  73. package/dist/data-table/data-table-header.js +1 -1
  74. package/dist/drawer/drawer.d.ts +1 -1
  75. package/dist/drawer/drawer.js +17 -17
  76. package/dist/error-text/error-text.js +28 -27
  77. package/dist/forms/form-field/form-field.js +24 -25
  78. package/dist/header/components/header-menu.js +21 -21
  79. package/dist/header/components/header-search.js +5 -5
  80. package/dist/hint-text/hint-text.js +26 -20
  81. package/dist/icon/icon.js +85 -63
  82. package/dist/icon/icons.d.ts +1 -1
  83. package/dist/icon-button/icon-button.d.ts +3 -5
  84. package/dist/icons/index.d.ts +1 -1
  85. package/dist/icons/index.js +19 -10
  86. package/dist/index-Bh2cTIps.js +33899 -0
  87. package/dist/index.d.ts +2 -2
  88. package/dist/index.js +1 -1
  89. package/dist/input-text/input-text.js +1 -1
  90. package/dist/input-text/type.d.ts +1 -1
  91. package/dist/label/label.d.ts +78 -30
  92. package/dist/label/label.js +29 -14
  93. package/dist/modal/modal.content.js +1 -1
  94. package/dist/modal/modal.d.ts +1 -1
  95. package/dist/modal/modal.js +39 -39
  96. package/dist/modal/types.d.ts +5 -4
  97. package/dist/pagination/pagination.js +137 -134
  98. package/dist/paragraph/paragraph.d.ts +1 -1
  99. package/dist/paragraph/paragraph.js +13 -11
  100. package/dist/score-select/type.d.ts +2 -2
  101. package/dist/select/select-next.js +87 -87
  102. package/dist/side-nav/side-nav.js +4 -4
  103. package/dist/side-nav/types.d.ts +1 -1
  104. package/dist/styles.css +1 -1
  105. package/dist/table/table-pagination.js +17 -13
  106. package/dist/tabs/tab-item.js +53 -71
  107. package/dist/tabs/variants.d.ts +269 -0
  108. package/dist/tabs/variants.js +87 -0
  109. package/dist/tooltip/tooltip.js +27 -35
  110. package/dist/tooltip/variants.d.ts +115 -0
  111. package/dist/tooltip/variants.js +59 -0
  112. package/package.json +7 -6
  113. package/dist/heading/heading.d.ts +0 -150
  114. package/dist/heading/heading.js +0 -50
@@ -1,17 +1,20 @@
1
1
  "use client";
2
- import { jsxs as R, jsx as j } from "react/jsx-runtime";
3
- import J, { createElement as z, isValidElement as D, cloneElement as K, Children as de, Fragment as he, useContext as ge, useState as ye, useEffect as ve } from "react";
4
- import { Button as U } from "../button/button.js";
5
- import { useBreakpoint as be, Breakpoint as re } from "../hooks/use-breakpoint.js";
6
- import { Icon as X } from "../icon/icon.js";
7
- import { getDisplayPages as se } from "../utils/utilities.js";
8
- import { w as oe, i as L, a as Y, b as _, I as Ne, u as xe } from "../useTranslation-DiBQuy8S.js";
9
- import { k as Ae } from "../i18next-Bfi2-LyH.js";
10
- import { g as Ee } from "../_commonjsHelpers-DaMA6jEr.js";
11
- import { g as le, b as ce, u as $e } from "../i18nInstance-AYICsHJu.js";
12
- var Q, ae;
13
- function Te() {
14
- return ae || (ae = 1, Q = {
2
+ import { jsxs as B, jsx as j } from "react/jsx-runtime";
3
+ import J, { createElement as R, isValidElement as D, cloneElement as Q, Children as me, Fragment as de, useContext as he, useState as ge, useEffect as ye } from "react";
4
+ import U from "../atoms/Button.js";
5
+ import "../atoms/heading/styles.js";
6
+ import be from "../atoms/icons/ArrowLeft.js";
7
+ import ve from "../atoms/icons/ArrowRight.js";
8
+ import { useBreakpoint as Ne, Breakpoint as ne } from "../hooks/use-breakpoint.js";
9
+ import { Icon as xe } from "../icon/icon.js";
10
+ import { getDisplayPages as re } from "../utils/utilities.js";
11
+ import { w as ie, i as _, a as X, b as L, I as Ae, u as Ee } from "../useTranslation-DiBQuy8S.js";
12
+ import { k as $e } from "../i18next-Bfi2-LyH.js";
13
+ import { g as Te } from "../_commonjsHelpers-DaMA6jEr.js";
14
+ import { g as oe, b as le, u as ke } from "../i18nInstance-AYICsHJu.js";
15
+ var Y, se;
16
+ function Ce() {
17
+ return se || (se = 1, Y = {
15
18
  area: !0,
16
19
  base: !0,
17
20
  br: !0,
@@ -26,25 +29,25 @@ function Te() {
26
29
  source: !0,
27
30
  track: !0,
28
31
  wbr: !0
29
- }), Q;
32
+ }), Y;
30
33
  }
31
- var Ce = Te();
32
- const ke = /* @__PURE__ */ Ee(Ce);
33
- var Oe = /\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g;
34
- function ie(e) {
34
+ var Oe = Ce();
35
+ const Ve = /* @__PURE__ */ Te(Oe);
36
+ var je = /\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g;
37
+ function ae(e) {
35
38
  var t = { type: "tag", name: "", voidElement: !1, attrs: {}, children: [] }, n = e.match(/<\/?([^\s]+?)[/\s>]/);
36
- if (n && (t.name = n[1], (ke[n[1]] || e.charAt(e.length - 2) === "/") && (t.voidElement = !0), t.name.startsWith("!--"))) {
39
+ if (n && (t.name = n[1], (Ve[n[1]] || e.charAt(e.length - 2) === "/") && (t.voidElement = !0), t.name.startsWith("!--"))) {
37
40
  var r = e.indexOf("-->");
38
41
  return { type: "comment", comment: r !== -1 ? e.slice(4, r) : "" };
39
42
  }
40
- for (var a = new RegExp(Oe), s = null; (s = a.exec(e)) !== null; ) if (s[0].trim()) if (s[1]) {
43
+ for (var a = new RegExp(je), s = null; (s = a.exec(e)) !== null; ) if (s[0].trim()) if (s[1]) {
41
44
  var o = s[1].trim(), c = [o, ""];
42
45
  o.indexOf("=") > -1 && (c = o.split("=")), t.attrs[c[0]] = c[1], a.lastIndex--;
43
46
  } else s[2] && (t.attrs[s[2]] = s[3].trim().substring(1, s[3].length - 1));
44
47
  return t;
45
48
  }
46
- var Ve = /<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g, je = /^\s*$/, Ie = /* @__PURE__ */ Object.create(null);
47
- function ue(e, t) {
49
+ var Ie = /<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g, Le = /^\s*$/, Se = /* @__PURE__ */ Object.create(null);
50
+ function ce(e, t) {
48
51
  switch (t.type) {
49
52
  case "text":
50
53
  return e + t.content;
@@ -53,37 +56,37 @@ function ue(e, t) {
53
56
  var r = [];
54
57
  for (var a in n) r.push(a + '="' + n[a] + '"');
55
58
  return r.length ? " " + r.join(" ") : "";
56
- })(t.attrs) : "") + (t.voidElement ? "/>" : ">"), t.voidElement ? e : e + t.children.reduce(ue, "") + "</" + t.name + ">";
59
+ })(t.attrs) : "") + (t.voidElement ? "/>" : ">"), t.voidElement ? e : e + t.children.reduce(ce, "") + "</" + t.name + ">";
57
60
  case "comment":
58
61
  return e + "<!--" + t.comment + "-->";
59
62
  }
60
63
  }
61
64
  var _e = { parse: function(e, t) {
62
- t || (t = {}), t.components || (t.components = Ie);
65
+ t || (t = {}), t.components || (t.components = Se);
63
66
  var n, r = [], a = [], s = -1, o = !1;
64
67
  if (e.indexOf("<") !== 0) {
65
68
  var c = e.indexOf("<");
66
69
  r.push({ type: "text", content: c === -1 ? e : e.substring(0, c) });
67
70
  }
68
- return e.replace(Ve, function(f, m) {
71
+ return e.replace(Ie, function(f, m) {
69
72
  if (o) {
70
73
  if (f !== "</" + n.name + ">") return;
71
74
  o = !1;
72
75
  }
73
76
  var p, N = f.charAt(1) !== "/", $ = f.startsWith("<!--"), g = m + f.length, l = e.charAt(g);
74
77
  if ($) {
75
- var T = ie(f);
78
+ var T = ae(f);
76
79
  return s < 0 ? (r.push(T), r) : ((p = a[s]).children.push(T), r);
77
80
  }
78
- if (N && (s++, (n = ie(f)).type === "tag" && t.components[n.name] && (n.type = "component", o = !0), n.voidElement || o || !l || l === "<" || n.children.push({ type: "text", content: e.slice(g, e.indexOf("<", g)) }), s === 0 && r.push(n), (p = a[s - 1]) && p.children.push(n), a[s] = n), (!N || n.voidElement) && (s > -1 && (n.voidElement || n.name === f.slice(2, -1)) && (s--, n = s === -1 ? r : a[s]), !o && l !== "<" && l)) {
81
+ if (N && (s++, (n = ae(f)).type === "tag" && t.components[n.name] && (n.type = "component", o = !0), n.voidElement || o || !l || l === "<" || n.children.push({ type: "text", content: e.slice(g, e.indexOf("<", g)) }), s === 0 && r.push(n), (p = a[s - 1]) && p.children.push(n), a[s] = n), (!N || n.voidElement) && (s > -1 && (n.voidElement || n.name === f.slice(2, -1)) && (s--, n = s === -1 ? r : a[s]), !o && l !== "<" && l)) {
79
82
  p = s === -1 ? r : a[s].children;
80
83
  var h = e.indexOf("<", g), x = e.slice(g, h === -1 ? void 0 : h);
81
- je.test(x) && (x = " "), (h > -1 && s + p.length >= 0 || x !== " ") && p.push({ type: "text", content: x });
84
+ Le.test(x) && (x = " "), (h > -1 && s + p.length >= 0 || x !== " ") && p.push({ type: "text", content: x });
82
85
  }
83
86
  }), r;
84
87
  }, stringify: function(e) {
85
88
  return e.reduce(function(t, n) {
86
- return t + ue("", n);
89
+ return t + ce("", n);
87
90
  }, "");
88
91
  } };
89
92
  const G = (e, t) => {
@@ -96,26 +99,26 @@ const G = (e, t) => {
96
99
  if (!e) return [];
97
100
  const t = ((n = e.props) == null ? void 0 : n.children) ?? e.children;
98
101
  return (r = e.props) != null && r.i18nIsDynamicList ? S(t) : t;
99
- }, Se = (e) => Array.isArray(e) && e.every(D), S = (e) => Array.isArray(e) ? e : [e], Le = (e, t) => {
102
+ }, Fe = (e) => Array.isArray(e) && e.every(D), S = (e) => Array.isArray(e) ? e : [e], we = (e, t) => {
100
103
  const n = {
101
104
  ...t
102
105
  };
103
106
  return n.props = Object.assign(e.props, t.props), n;
104
- }, Fe = (e) => {
107
+ }, Re = (e) => {
105
108
  const t = {};
106
109
  if (!e) return t;
107
110
  const n = (r) => {
108
111
  S(r).forEach((s) => {
109
- L(s) || (G(s) ? n(q(s)) : _(s) && !D(s) && Object.assign(t, s));
112
+ _(s) || (G(s) ? n(q(s)) : L(s) && !D(s) && Object.assign(t, s));
110
113
  });
111
114
  };
112
115
  return n(e), t;
113
- }, pe = (e, t, n, r) => {
116
+ }, ue = (e, t, n, r) => {
114
117
  if (!e) return "";
115
118
  let a = "";
116
119
  const s = S(e), o = t != null && t.transSupportBasicHtmlNodes ? t.transKeepBasicHtmlNodesFor ?? [] : [];
117
120
  return s.forEach((c, f) => {
118
- if (L(c)) {
121
+ if (_(c)) {
119
122
  a += `${c}`;
120
123
  return;
121
124
  }
@@ -132,21 +135,21 @@ const G = (e, t) => {
132
135
  a += `<${f}></${f}>`;
133
136
  return;
134
137
  }
135
- if ($ && N === 1 && L(g)) {
138
+ if ($ && N === 1 && _(g)) {
136
139
  a += `<${p}>${g}</${p}>`;
137
140
  return;
138
141
  }
139
- const l = pe(g, t, n, r);
142
+ const l = ue(g, t, n, r);
140
143
  a += `<${f}>${l}</${f}>`;
141
144
  return;
142
145
  }
143
146
  if (c === null) {
144
- Y(n, "TRANS_NULL_VALUE", "Passed in a null value as child", {
147
+ X(n, "TRANS_NULL_VALUE", "Passed in a null value as child", {
145
148
  i18nKey: r
146
149
  });
147
150
  return;
148
151
  }
149
- if (_(c)) {
152
+ if (L(c)) {
150
153
  const {
151
154
  format: m,
152
155
  ...p
@@ -156,18 +159,18 @@ const G = (e, t) => {
156
159
  a += `{{${$}}}`;
157
160
  return;
158
161
  }
159
- Y(n, "TRANS_INVALID_OBJ", "Invalid child - Object should only have keys {{ value, format }} (format is optional).", {
162
+ X(n, "TRANS_INVALID_OBJ", "Invalid child - Object should only have keys {{ value, format }} (format is optional).", {
160
163
  i18nKey: r,
161
164
  child: c
162
165
  });
163
166
  return;
164
167
  }
165
- Y(n, "TRANS_INVALID_VAR", "Passed in a variable like {number} - pass variables for interpolation as full objects like {{number}}.", {
168
+ X(n, "TRANS_INVALID_VAR", "Passed in a variable like {number} - pass variables for interpolation as full objects like {{number}}.", {
166
169
  i18nKey: r,
167
170
  child: c
168
171
  });
169
172
  }), a;
170
- }, we = (e, t = [], n = {}) => {
173
+ }, ze = (e, t = [], n = {}) => {
171
174
  if (!e) return e;
172
175
  const r = Object.keys(n), a = [...t, ...r];
173
176
  let s = "", o = 0;
@@ -190,93 +193,93 @@ const G = (e, t) => {
190
193
  } else
191
194
  s += e[o], o += 1;
192
195
  return s;
193
- }, ze = (e, t, n, r, a, s, o) => {
196
+ }, Be = (e, t, n, r, a, s, o) => {
194
197
  if (n === "") return [];
195
198
  const c = a.transKeepBasicHtmlNodesFor || [], f = n && new RegExp(c.map((u) => `<${u}`).join("|")).test(n);
196
199
  if (!e && !t && !f && !o) return [n];
197
200
  const m = t ?? {}, p = (u) => {
198
201
  S(u).forEach((y) => {
199
- L(y) || (G(y) ? p(q(y)) : _(y) && !D(y) && Object.assign(m, y));
202
+ _(y) || (G(y) ? p(q(y)) : L(y) && !D(y) && Object.assign(m, y));
200
203
  });
201
204
  };
202
205
  p(e);
203
- const N = we(n, c, m), $ = _e.parse(`<0>${N}</0>`), g = {
206
+ const N = ze(n, c, m), $ = _e.parse(`<0>${N}</0>`), g = {
204
207
  ...m,
205
208
  ...s
206
209
  }, l = (u, A, y) => {
207
210
  var d;
208
211
  const E = q(u), I = h(E, A.children, y);
209
- return Se(E) && I.length === 0 || (d = u.props) != null && d.i18nIsDynamicList ? E : I;
212
+ return Fe(E) && I.length === 0 || (d = u.props) != null && d.i18nIsDynamicList ? E : I;
210
213
  }, T = (u, A, y, E, I) => {
211
- u.dummy ? (u.children = A, y.push(K(u, {
214
+ u.dummy ? (u.children = A, y.push(Q(u, {
212
215
  key: E
213
- }, I ? void 0 : A))) : y.push(...de.map([u], (d) => {
216
+ }, I ? void 0 : A))) : y.push(...me.map([u], (d) => {
214
217
  const i = "data-i18n-is-dynamic-list", O = {
215
218
  key: E,
216
219
  [i]: void 0
217
220
  };
218
- return d && d.props && Object.keys(d.props).forEach((C) => {
219
- C === "ref" || C === "children" || C === "i18nIsDynamicList" || C === i || (O[C] = d.props[C]);
220
- }), K(d, O, I ? null : A);
221
+ return d && d.props && Object.keys(d.props).forEach((k) => {
222
+ k === "ref" || k === "children" || k === "i18nIsDynamicList" || k === i || (O[k] = d.props[k]);
223
+ }), Q(d, O, I ? null : A);
221
224
  }));
222
225
  }, h = (u, A, y) => {
223
226
  const E = S(u);
224
227
  return S(A).reduce((d, i, O) => {
225
228
  var F, H;
226
- const C = ((H = (F = i.children) == null ? void 0 : F[0]) == null ? void 0 : H.content) && r.services.interpolator.interpolate(i.children[0].content, g, r.language);
229
+ const k = ((H = (F = i.children) == null ? void 0 : F[0]) == null ? void 0 : H.content) && r.services.interpolator.interpolate(i.children[0].content, g, r.language);
227
230
  if (i.type === "tag") {
228
- let k = E[parseInt(i.name, 10)];
229
- !k && t && (k = t[i.name]), y.length === 1 && !k && (k = y[0][i.name]), k || (k = {});
231
+ let C = E[parseInt(i.name, 10)];
232
+ !C && t && (C = t[i.name]), y.length === 1 && !C && (C = y[0][i.name]), C || (C = {});
230
233
  const V = {
231
234
  ...i.attrs
232
235
  };
233
- o && Object.keys(V).forEach((b) => {
234
- const B = V[b];
235
- L(B) && (V[b] = $e(B));
236
+ o && Object.keys(V).forEach((v) => {
237
+ const z = V[v];
238
+ _(z) && (V[v] = ke(z));
236
239
  });
237
- const v = Object.keys(V).length !== 0 ? Le({
240
+ const b = Object.keys(V).length !== 0 ? we({
238
241
  props: V
239
- }, k) : k, w = D(v), M = w && G(i, !0) && !i.voidElement, W = f && _(v) && v.dummy && !w, Z = _(t) && Object.hasOwnProperty.call(t, i.name);
240
- if (L(v)) {
241
- const b = r.services.interpolator.interpolate(v, g, r.language);
242
- d.push(b);
243
- } else if (G(v) || M) {
244
- const b = l(v, i, y);
245
- T(v, b, d, O);
242
+ }, C) : C, w = D(b), M = w && G(i, !0) && !i.voidElement, W = f && L(b) && b.dummy && !w, Z = L(t) && Object.hasOwnProperty.call(t, i.name);
243
+ if (_(b)) {
244
+ const v = r.services.interpolator.interpolate(b, g, r.language);
245
+ d.push(v);
246
+ } else if (G(b) || M) {
247
+ const v = l(b, i, y);
248
+ T(b, v, d, O);
246
249
  } else if (W) {
247
- const b = h(E, i.children, y);
248
- T(v, b, d, O);
250
+ const v = h(E, i.children, y);
251
+ T(b, v, d, O);
249
252
  } else if (Number.isNaN(parseFloat(i.name)))
250
253
  if (Z) {
251
- const b = l(v, i, y);
252
- T(v, b, d, O, i.voidElement);
254
+ const v = l(b, i, y);
255
+ T(b, v, d, O, i.voidElement);
253
256
  } else if (a.transSupportBasicHtmlNodes && c.indexOf(i.name) > -1)
254
257
  if (i.voidElement)
255
- d.push(z(i.name, {
258
+ d.push(R(i.name, {
256
259
  key: `${i.name}-${O}`
257
260
  }));
258
261
  else {
259
- const b = h(E, i.children, y);
260
- d.push(z(i.name, {
262
+ const v = h(E, i.children, y);
263
+ d.push(R(i.name, {
261
264
  key: `${i.name}-${O}`
262
- }, b));
265
+ }, v));
263
266
  }
264
267
  else if (i.voidElement)
265
268
  d.push(`<${i.name} />`);
266
269
  else {
267
- const b = h(E, i.children, y);
268
- d.push(`<${i.name}>${b}</${i.name}>`);
270
+ const v = h(E, i.children, y);
271
+ d.push(`<${i.name}>${v}</${i.name}>`);
269
272
  }
270
- else if (_(v) && !w) {
271
- const b = i.children[0] ? C : null;
272
- b && d.push(b);
273
+ else if (L(b) && !w) {
274
+ const v = i.children[0] ? k : null;
275
+ v && d.push(v);
273
276
  } else
274
- T(v, C, d, O, i.children.length !== 1 || !C);
277
+ T(b, k, d, O, i.children.length !== 1 || !k);
275
278
  } else if (i.type === "text") {
276
- const k = a.transWrapTextNodes, V = typeof a.unescape == "function" ? a.unescape : ce().unescape, v = o ? V(r.services.interpolator.interpolate(i.content, g, r.language)) : r.services.interpolator.interpolate(i.content, g, r.language);
277
- k ? d.push(z(k, {
279
+ const C = a.transWrapTextNodes, V = typeof a.unescape == "function" ? a.unescape : le().unescape, b = o ? V(r.services.interpolator.interpolate(i.content, g, r.language)) : r.services.interpolator.interpolate(i.content, g, r.language);
280
+ C ? d.push(R(C, {
278
281
  key: `${i.name}-${O}`
279
- }, v)) : d.push(v);
282
+ }, b)) : d.push(b);
280
283
  }
281
284
  return d;
282
285
  }, []);
@@ -285,29 +288,29 @@ const G = (e, t) => {
285
288
  children: e || []
286
289
  }], $, S(e || []));
287
290
  return q(x[0]);
288
- }, fe = (e, t, n) => {
289
- const r = e.key || t, a = K(e, {
291
+ }, pe = (e, t, n) => {
292
+ const r = e.key || t, a = Q(e, {
290
293
  key: r
291
294
  });
292
295
  if (!a.props || !a.props.children || n.indexOf(`${t}/>`) < 0 && n.indexOf(`${t} />`) < 0)
293
296
  return a;
294
297
  function s() {
295
- return z(he, null, a);
298
+ return R(de, null, a);
296
299
  }
297
- return z(s, {
300
+ return R(s, {
298
301
  key: r
299
302
  });
300
- }, Be = (e, t) => e.map((n, r) => fe(n, r, t)), Re = (e, t) => {
303
+ }, De = (e, t) => e.map((n, r) => pe(n, r, t)), He = (e, t) => {
301
304
  const n = {};
302
305
  return Object.keys(e).forEach((r) => {
303
306
  Object.assign(n, {
304
- [r]: fe(e[r], r, t)
307
+ [r]: pe(e[r], r, t)
305
308
  });
306
309
  }), n;
307
- }, De = (e, t, n, r) => e ? Array.isArray(e) ? Be(e, t) : _(e) ? Re(e, t) : (oe(n, "TRANS_INVALID_COMPONENTS", '<Trans /> "components" prop expects an object or array', {
310
+ }, Me = (e, t, n, r) => e ? Array.isArray(e) ? De(e, t) : L(e) ? He(e, t) : (ie(n, "TRANS_INVALID_COMPONENTS", '<Trans /> "components" prop expects an object or array', {
308
311
  i18nKey: r
309
- }), null) : null, He = (e) => !_(e) || Array.isArray(e) ? !1 : Object.keys(e).reduce((t, n) => t && Number.isNaN(Number.parseFloat(n)), !0);
310
- function Me({
312
+ }), null) : null, We = (e) => !L(e) || Array.isArray(e) ? !1 : Object.keys(e).reduce((t, n) => t && Number.isNaN(Number.parseFloat(n)), !0);
313
+ function Ze({
311
314
  children: e,
312
315
  count: t,
313
316
  parent: n,
@@ -323,18 +326,18 @@ function Me({
323
326
  shouldUnescape: $,
324
327
  ...g
325
328
  }) {
326
- var b, B, P, ee, te, ne;
327
- const l = p || le();
329
+ var v, z, K, P, ee, te;
330
+ const l = p || oe();
328
331
  if (!l)
329
- return oe(l, "NO_I18NEXT_INSTANCE", "Trans: You need to pass in an i18next instance using i18nextReactModule", {
332
+ return ie(l, "NO_I18NEXT_INSTANCE", "Trans: You need to pass in an i18next instance using i18nextReactModule", {
330
333
  i18nKey: r
331
334
  }), e;
332
- const T = N || l.t.bind(l) || ((me) => me), h = {
333
- ...ce(),
334
- ...(b = l.options) == null ? void 0 : b.react
335
+ const T = N || l.t.bind(l) || ((fe) => fe), h = {
336
+ ...le(),
337
+ ...(v = l.options) == null ? void 0 : v.react
335
338
  };
336
- let x = m || T.ns || ((B = l.options) == null ? void 0 : B.defaultNS);
337
- x = L(x) ? [x] : x || ["translation"];
339
+ let x = m || T.ns || ((z = l.options) == null ? void 0 : z.defaultNS);
340
+ x = _(x) ? [x] : x || ["translation"];
338
341
  const {
339
342
  transDefaultProps: u
340
343
  } = h, A = u != null && u.tOptions ? {
@@ -346,24 +349,24 @@ function Me({
346
349
  } : o, I = u != null && u.components ? {
347
350
  ...u.components,
348
351
  ...f
349
- } : f, d = pe(e, h, l, r), i = c || (A == null ? void 0 : A.defaultValue) || d || h.transEmptyNodeValue || (typeof r == "function" ? Ae(r) : r), {
352
+ } : f, d = ue(e, h, l, r), i = c || (A == null ? void 0 : A.defaultValue) || d || h.transEmptyNodeValue || (typeof r == "function" ? $e(r) : r), {
350
353
  hashTransKey: O
351
- } = h, C = r || (O ? O(d || i) : d || i);
352
- (ee = (P = l.options) == null ? void 0 : P.interpolation) != null && ee.defaultVariables ? o = E && Object.keys(E).length > 0 ? {
354
+ } = h, k = r || (O ? O(d || i) : d || i);
355
+ (P = (K = l.options) == null ? void 0 : K.interpolation) != null && P.defaultVariables ? o = E && Object.keys(E).length > 0 ? {
353
356
  ...E,
354
357
  ...l.options.interpolation.defaultVariables
355
358
  } : {
356
359
  ...l.options.interpolation.defaultVariables
357
360
  } : o = E;
358
- const F = Fe(e);
361
+ const F = Re(e);
359
362
  F && typeof F.count == "number" && t === void 0 && (t = F.count);
360
- const H = o || t !== void 0 && !((ne = (te = l.options) == null ? void 0 : te.interpolation) != null && ne.alwaysFormat) || !e ? A.interpolation : {
363
+ const H = o || t !== void 0 && !((te = (ee = l.options) == null ? void 0 : ee.interpolation) != null && te.alwaysFormat) || !e ? A.interpolation : {
361
364
  interpolation: {
362
365
  ...A.interpolation,
363
366
  prefix: "#$?",
364
367
  suffix: "?$#"
365
368
  }
366
- }, k = {
369
+ }, C = {
367
370
  ...A,
368
371
  context: a || A.context,
369
372
  count: t,
@@ -372,15 +375,15 @@ function Me({
372
375
  defaultValue: i,
373
376
  ns: x
374
377
  };
375
- let V = C ? T(C, k) : i;
376
- V === C && i && (V = i);
377
- const v = De(I, V, l, r);
378
- let w = v || e, M = null;
379
- He(v) && (M = v, w = e);
380
- const W = ze(w, M, V, l, h, k, y), Z = n ?? h.defaultTransParent;
381
- return Z ? z(Z, g, W) : W;
378
+ let V = k ? T(k, C) : i;
379
+ V === k && i && (V = i);
380
+ const b = Me(I, V, l, r);
381
+ let w = b || e, M = null;
382
+ We(b) && (M = b, w = e);
383
+ const W = Be(w, M, V, l, h, C, y), Z = n ?? h.defaultTransParent;
384
+ return Z ? R(Z, g, W) : W;
382
385
  }
383
- function We({
386
+ function Ge({
384
387
  children: e,
385
388
  count: t,
386
389
  parent: n,
@@ -400,8 +403,8 @@ function We({
400
403
  const {
401
404
  i18n: l,
402
405
  defaultNS: T
403
- } = ge(Ne) || {}, h = p || l || le(), x = N || (h == null ? void 0 : h.t.bind(h));
404
- return Me({
406
+ } = he(Ae) || {}, h = p || l || oe(), x = N || (h == null ? void 0 : h.t.bind(h));
407
+ return Ze({
405
408
  children: e,
406
409
  count: t,
407
410
  parent: n,
@@ -418,22 +421,22 @@ function We({
418
421
  ...g
419
422
  });
420
423
  }
421
- const et = ({
424
+ const at = ({
422
425
  currentPage: e,
423
426
  totalPages: t,
424
427
  onPageChange: n,
425
428
  dataTestid: r
426
429
  }) => {
427
- const { t: a } = xe();
430
+ const { t: a } = Ee();
428
431
  if (t === 0)
429
432
  return null;
430
- const { breakpoint: s, width: o } = be(), [c, f] = ye(!1);
431
- ve(() => {
433
+ const { breakpoint: s, width: o } = Ne(), [c, f] = ge(!1);
434
+ ye(() => {
432
435
  f(!0);
433
436
  }, []);
434
- const m = c && s === re.ExtraSmall, p = c && o !== null && o < 639, N = () => (c && s ? se(e, t, s) : se(e, t, re.Large)).map(
437
+ const m = c && s === ne.ExtraSmall, p = c && o !== null && o < 639, N = () => (c && s ? re(e, t, s) : re(e, t, ne.Large)).map(
435
438
  (l, T) => l === -1 || l === -2 ? /* @__PURE__ */ j(J.Fragment, { children: /* @__PURE__ */ j(
436
- X,
439
+ xe,
437
440
  {
438
441
  role: "presentation",
439
442
  className: "gi-text-gray-700",
@@ -446,7 +449,7 @@ const et = ({
446
449
  size: "large",
447
450
  appearance: "dark",
448
451
  onClick: () => n(l),
449
- "aria-label": a("pagination.goToPage", {
452
+ ariaLabel: a("pagination.goToPage", {
450
453
  page: l,
451
454
  defaultValue: `Go to page ${l}`
452
455
  }),
@@ -454,14 +457,14 @@ const et = ({
454
457
  },
455
458
  l
456
459
  )
457
- ), $ = () => /* @__PURE__ */ j("span", { className: "gi-text-md gi-leading-6", "aria-live": "polite", children: /* @__PURE__ */ R(
458
- We,
460
+ ), $ = () => /* @__PURE__ */ j("span", { className: "gi-text-md gi-leading-6", "aria-live": "polite", children: /* @__PURE__ */ B(
461
+ Ge,
459
462
  {
460
463
  i18nKey: "pagination.page",
461
464
  values: { currentPage: e, totalPages: t },
462
465
  components: { bold: /* @__PURE__ */ j("span", { className: "gi-font-bold" }) },
463
466
  children: [
464
- /* @__PURE__ */ R("span", { className: "gi-font-bold", children: [
467
+ /* @__PURE__ */ B("span", { className: "gi-font-bold", children: [
465
468
  "Page ",
466
469
  e
467
470
  ] }),
@@ -470,7 +473,7 @@ const et = ({
470
473
  ]
471
474
  }
472
475
  ) });
473
- return /* @__PURE__ */ R(
476
+ return /* @__PURE__ */ B(
474
477
  "div",
475
478
  {
476
479
  className: "gi-pagination",
@@ -482,7 +485,7 @@ const et = ({
482
485
  }),
483
486
  "data-testid": r,
484
487
  children: [
485
- /* @__PURE__ */ R(
488
+ /* @__PURE__ */ B(
486
489
  U,
487
490
  {
488
491
  variant: "flat",
@@ -490,19 +493,19 @@ const et = ({
490
493
  appearance: "dark",
491
494
  disabled: e === 1,
492
495
  onClick: () => n(e - 1),
493
- "aria-label": a("pagination.goToPrevious", {
496
+ ariaLabel: a("pagination.goToPrevious", {
494
497
  defaultValue: "Go to previous"
495
498
  }),
496
499
  className: p ? "gi-icon-btn-large" : "",
497
- dataTestid: "govie-pagination-prev-btn",
500
+ dataTestId: "govie-pagination-prev-btn",
498
501
  children: [
499
- /* @__PURE__ */ j(J.Fragment, { children: /* @__PURE__ */ j(X, { icon: "arrow_left_alt" }) }, "previous-btn-pagination"),
502
+ /* @__PURE__ */ j(J.Fragment, { children: /* @__PURE__ */ j(be, { className: "gi-block gi-shrink-0" }) }, "previous-btn-pagination"),
500
503
  !p && a("pagination.previous", { defaultValue: "Previous" })
501
504
  ]
502
505
  }
503
506
  ),
504
507
  m ? $() : N(),
505
- /* @__PURE__ */ R(
508
+ /* @__PURE__ */ B(
506
509
  U,
507
510
  {
508
511
  disabled: e === t,
@@ -510,12 +513,12 @@ const et = ({
510
513
  size: "large",
511
514
  appearance: "dark",
512
515
  onClick: () => n(e + 1),
513
- "aria-label": a("pagination.goToNext", { defaultValue: "Go to next" }),
516
+ ariaLabel: a("pagination.goToNext", { defaultValue: "Go to next" }),
514
517
  className: p ? "gi-icon-btn-large" : "",
515
- dataTestid: "govie-pagination-next-btn",
518
+ dataTestId: "govie-pagination-next-btn",
516
519
  children: [
517
520
  !p && a("pagination.next", { defaultValue: "Next" }),
518
- /* @__PURE__ */ j(J.Fragment, { children: /* @__PURE__ */ j(X, { icon: "arrow_right_alt" }) }, "next-btn-pagination")
521
+ /* @__PURE__ */ j(J.Fragment, { children: /* @__PURE__ */ j(ve, { className: "gi-block gi-shrink-0" }) }, "next-btn-pagination")
519
522
  ]
520
523
  }
521
524
  )
@@ -524,5 +527,5 @@ const et = ({
524
527
  );
525
528
  };
526
529
  export {
527
- et as Pagination
530
+ at as Pagination
528
531
  };
@@ -1,5 +1,5 @@
1
1
  export type ParagraphAs = 'p' | 'span';
2
- export type ParagraphSize = 'lg' | 'md' | 'sm';
2
+ export type ParagraphSize = 'xl' | 'lg' | 'md' | 'sm';
3
3
  export type ParagraphAlign = 'start' | 'center' | 'end' | 'justify';
4
4
  export type ParagraphWhitespace = 'normal' | 'pre' | 'pre-wrap' | 'break-spaces';
5
5
  export type ParagraphProps = {
@@ -1,24 +1,26 @@
1
1
  import { jsx as m } from "react/jsx-runtime";
2
2
  function w({
3
- as: e = "p",
4
- size: a = "md",
3
+ as: a = "p",
4
+ size: e = "md",
5
5
  align: r = "start",
6
6
  whitespace: t = "normal",
7
7
  children: s,
8
- style: i,
9
- className: p,
8
+ style: p,
9
+ className: i,
10
10
  id: n,
11
11
  ariaLabel: c,
12
12
  dataTestid: g
13
13
  }) {
14
14
  const u = (() => {
15
- switch (a) {
15
+ switch (e) {
16
+ case "xl":
17
+ return a === "p" ? "gi-paragraph-xl" : "gi-span-xl";
16
18
  case "lg":
17
- return e === "p" ? "gi-paragraph-lg" : "gi-span-lg";
19
+ return a === "p" ? "gi-paragraph-lg" : "gi-span-lg";
18
20
  case "sm":
19
- return e === "p" ? "gi-paragraph-sm" : "gi-span-sm";
21
+ return a === "p" ? "gi-paragraph-sm" : "gi-span-sm";
20
22
  default:
21
- return e === "p" ? "gi-paragraph-md" : "gi-span-md";
23
+ return a === "p" ? "gi-paragraph-md" : "gi-span-md";
22
24
  }
23
25
  })(), l = (() => {
24
26
  switch (r) {
@@ -44,11 +46,11 @@ function w({
44
46
  }
45
47
  })();
46
48
  return /* @__PURE__ */ m(
47
- e,
49
+ a,
48
50
  {
49
- className: `${u} ${l} ${h} ${p || ""}`,
51
+ className: `${u} ${l} ${h} ${i || ""}`,
50
52
  "aria-label": c,
51
- style: i,
53
+ style: p,
52
54
  id: n,
53
55
  "data-testid": g,
54
56
  children: s
@@ -1,9 +1,9 @@
1
- import { ButtonSize } from '../button/types.js';
1
+ import { Props as ButtonProps } from '../atoms/Button';
2
2
  type ScoreSelectType = '1-5' | '1-7' | '0-10';
3
3
  export type ScoreSelectProps = {
4
4
  name: string;
5
5
  value?: string;
6
- size?: ButtonSize;
6
+ size?: ButtonProps['size'];
7
7
  label: string;
8
8
  hint?: string;
9
9
  leftLabel?: string;