@ogcio/design-system-react 1.32.0 → 1.34.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 (79) hide show
  1. package/dist/accordion/accordion-item.js +62 -57
  2. package/dist/alert/alert.js +37 -39
  3. package/dist/alert/variants.d.ts +49 -52
  4. package/dist/alert/variants.js +17 -18
  5. package/dist/atoms/Button.d.ts +2 -2
  6. package/dist/atoms/Button.js +3 -2
  7. package/dist/atoms/heading/styles.js +1 -1
  8. package/dist/atoms/storybook/Heading.meta.d.ts +1 -1
  9. package/dist/atoms/storybook/Heading.meta.js +4 -4
  10. package/dist/atoms/storybook/Icons.meta.d.ts +1 -1
  11. package/dist/atoms/storybook/Icons.meta.js +7 -7
  12. package/dist/atoms/storybook/InsetText.meta.d.ts +1 -1
  13. package/dist/atoms/storybook/InsetText.meta.js +1 -1
  14. package/dist/atoms/storybook/Logos.meta.d.ts +1 -1
  15. package/dist/atoms/storybook/Logos.meta.js +1 -1
  16. package/dist/autocomplete/autocomplete.js +1 -1
  17. package/dist/autocomplete/use-autocomplete-controller.js +2 -2
  18. package/dist/browser-support/browser-support.js +202 -30
  19. package/dist/button/button.d.ts +2 -9
  20. package/dist/button/button.js +65 -32
  21. package/dist/button/helpers.d.ts +2 -1
  22. package/dist/button/types.d.ts +25 -8
  23. package/dist/button-group/button-group.js +43 -45
  24. package/dist/button-group/types.d.ts +5 -5
  25. package/dist/card/card-legacy.js +1 -1
  26. package/dist/card/types.d.ts +1 -1
  27. package/dist/chip/chip.js +1 -1
  28. package/dist/combo-box/dropdown-item.js +1 -1
  29. package/dist/cookie-banner/cookie-banner.d.ts +1 -1
  30. package/dist/data-table/data-table-footer.js +2 -2
  31. package/dist/data-table/data-table-header.js +2 -2
  32. package/dist/data-table/data-table-selected-rows.js +1 -1
  33. package/dist/data-table/editable-table-cell.js +1 -1
  34. package/dist/details/details.js +13 -16
  35. package/dist/drawer/drawer.d.ts +1 -1
  36. package/dist/drawer/drawer.js +18 -18
  37. package/dist/error-text/error-text.js +28 -27
  38. package/dist/forms/form-field/form-field.js +24 -25
  39. package/dist/header/components/header-search.js +2 -2
  40. package/dist/header/header-legacy.js +6 -6
  41. package/dist/header/header-next/header-next.js +3 -3
  42. package/dist/header/variants.js +1 -1
  43. package/dist/hint-text/hint-text.js +26 -20
  44. package/dist/i18n/config.js +2 -2
  45. package/dist/i18n/utility.js +1 -1
  46. package/dist/{i18nInstance-AYICsHJu.js → i18nInstance-DiZ0lVPL.js} +2 -2
  47. package/dist/i18next-zBkzxGW1.js +1388 -0
  48. package/dist/icon-button/icon-button.d.ts +3 -5
  49. package/dist/{index-CB-zPpNk.js → index-C7W4ssMN.js} +1 -1
  50. package/dist/index-DqBV2TCd.js +23108 -0
  51. package/dist/index.d.ts +1 -1
  52. package/dist/index.js +1 -1
  53. package/dist/label/label.d.ts +78 -30
  54. package/dist/label/label.js +29 -14
  55. package/dist/{lodash-82PmXrjJ.js → lodash-DTZaBYO8.js} +289 -272
  56. package/dist/modal/modal.content.js +2 -2
  57. package/dist/modal/modal.js +38 -38
  58. package/dist/modal/types.d.ts +5 -4
  59. package/dist/pagination/pagination.js +82 -80
  60. package/dist/progress-stepper/progress-stepper.js +1 -1
  61. package/dist/score-select/type.d.ts +2 -2
  62. package/dist/select/select-native.js +1 -1
  63. package/dist/select/select-next.js +87 -87
  64. package/dist/side-nav/side-nav.js +1 -1
  65. package/dist/spinner/spinner.js +1 -1
  66. package/dist/stack/stack.js +2 -2
  67. package/dist/styles.css +1 -1
  68. package/dist/table/table.js +1 -1
  69. package/dist/tabs/tab-item.js +53 -71
  70. package/dist/tabs/variants.d.ts +269 -0
  71. package/dist/tabs/variants.js +87 -0
  72. package/dist/toast/ds-toast.js +1 -1
  73. package/dist/tooltip/tooltip.js +27 -35
  74. package/dist/tooltip/variants.d.ts +115 -0
  75. package/dist/tooltip/variants.js +59 -0
  76. package/dist/{useTranslation-DiBQuy8S.js → useTranslation-CRbS3UeG.js} +94 -85
  77. package/package.json +14 -7
  78. package/dist/i18next-Bfi2-LyH.js +0 -1370
  79. package/dist/index-Bh2cTIps.js +0 -33899
@@ -1,5 +1,5 @@
1
- import { jsxs as i, jsx as t, Fragment as r } from "react/jsx-runtime";
2
- import { Button as o } from "../button/button.js";
1
+ import { jsxs as i, Fragment as r, jsx as t } from "react/jsx-runtime";
2
+ import o from "../atoms/Button.js";
3
3
  import { ModalTitle as e, ModalBody as a, ModalFooter as n } from "./modal.js";
4
4
  const c = /* @__PURE__ */ i(r, { children: [
5
5
  /* @__PURE__ */ t(e, { children: "Modal Title" }),
@@ -1,16 +1,16 @@
1
1
  "use client";
2
- import { jsx as l, jsxs as y, Fragment as j } from "react/jsx-runtime";
3
- import { isValidElement as K, cloneElement as T, useState as A, useRef as U, useMemo as W, Children as _, useId as z, useEffect as C } from "react";
2
+ import { jsx as l, jsxs as y, Fragment as P } from "react/jsx-runtime";
3
+ import { isValidElement as K, cloneElement as T, useState as j, useRef as U, useMemo as W, Children as _, useId as z, useEffect as C } from "react";
4
4
  import { createPortal as G } from "react-dom";
5
5
  import J from "../Heading.js";
6
- import { Button as E } from "../button/button.js";
6
+ import A from "../atoms/Button.js";
7
7
  import { cn as u } from "../cn.js";
8
8
  import { useAriaHider as Q } from "../hooks/use-aria-hider.js";
9
9
  import { useFocusTrap as X } from "../hooks/use-focus-trap.js";
10
10
  import { Icon as Y } from "../icon/icon.js";
11
11
  import { IconButton as Z } from "../icon-button/icon-button.js";
12
12
  import { splitAriaProps as O, isSpecialComponent as ee, getSpecialComponentType as te } from "../utils/utilities.js";
13
- const I = {
13
+ const B = {
14
14
  flat: 0,
15
15
  secondary: 1,
16
16
  primary: 2
@@ -21,16 +21,16 @@ const I = {
21
21
  }) => {
22
22
  let n = "sm";
23
23
  return (o === "large" || o === "medium") && (n = "md"), e ? /* @__PURE__ */ l(
24
- E,
24
+ A,
25
25
  {
26
26
  onClick: t.onClick,
27
27
  variant: "flat",
28
28
  size: o,
29
29
  appearance: "dark",
30
30
  className: "gi-modal-icon",
31
- "aria-label": e,
31
+ ariaLabel: e,
32
32
  ...t,
33
- children: /* @__PURE__ */ y(j, { children: [
33
+ children: /* @__PURE__ */ y(P, { children: [
34
34
  e,
35
35
  /* @__PURE__ */ l(Y, { icon: "close", size: n })
36
36
  ] })
@@ -72,25 +72,25 @@ const I = {
72
72
  closeOnOverlayClick: n = !0,
73
73
  isOpen: a,
74
74
  onClose: d,
75
- closeButtonLabel: h,
75
+ closeButtonLabel: v,
76
76
  className: s,
77
77
  children: f,
78
78
  closeButtonSize: r,
79
79
  closeOnEscape: i,
80
80
  dataTestId: c,
81
- ...v
81
+ ...h
82
82
  }) => {
83
- var w;
83
+ var I;
84
84
  const M = U(null);
85
85
  Q(M, a);
86
- const [D, R] = W(
87
- () => O(v),
88
- [v]
86
+ const [D, L] = W(
87
+ () => O(h),
88
+ [h]
89
89
  ), F = _.toArray(f), N = (m) => F.find(
90
90
  (p) => te(p) === m
91
- ), g = N("ModalTitle"), b = N("ModalFooter") || N("DrawerFooter"), S = z(), L = ((w = g == null ? void 0 : g.props) == null ? void 0 : w.id) || `gi-modal-title-${S}`, H = g ? T(g, {
91
+ ), g = N("ModalTitle"), b = N("ModalFooter") || N("DrawerFooter"), R = z(), S = ((I = g == null ? void 0 : g.props) == null ? void 0 : I.id) || `gi-modal-title-${R}`, H = g ? T(g, {
92
92
  as: o === "sm" ? "h5" : "h4",
93
- id: L
93
+ id: S
94
94
  }) : null, $ = b ? T(b, {
95
95
  dataModalSize: o
96
96
  }) : null, V = F.filter(
@@ -109,18 +109,18 @@ const I = {
109
109
  if (!a || !t || !n)
110
110
  return;
111
111
  const m = (p) => {
112
- var B;
113
- const k = (B = M.current) == null ? void 0 : B.querySelector(
112
+ var k;
113
+ const w = (k = M.current) == null ? void 0 : k.querySelector(
114
114
  ".gi-modal-container-control"
115
115
  );
116
- k && (k.contains(p.target) || d());
116
+ w && (w.contains(p.target) || d());
117
117
  };
118
118
  return document.addEventListener("pointerdown", m, !0), () => document.removeEventListener("pointerdown", m, !0);
119
119
  }, [a, t, n, d]);
120
120
  const q = /* @__PURE__ */ l(
121
121
  "div",
122
122
  {
123
- ...R,
123
+ ...L,
124
124
  ref: M,
125
125
  className: u("gi-modal", {
126
126
  "gi-modal-open": a,
@@ -153,7 +153,7 @@ const I = {
153
153
  /* @__PURE__ */ l(
154
154
  ae,
155
155
  {
156
- closeButtonLabel: h,
156
+ closeButtonLabel: v,
157
157
  modalTitle: H,
158
158
  closeOnClick: t,
159
159
  onClose: d,
@@ -170,14 +170,14 @@ const I = {
170
170
  }
171
171
  );
172
172
  return /* @__PURE__ */ l(ne, { modalRef: M, isOpen: a, children: q });
173
- }, P = ({ children: e, as: o = "h4", ...t }) => /* @__PURE__ */ l("div", { className: "gi-flex-1", id: t.id, "aria-label": e == null ? void 0 : e.toString(), children: /* @__PURE__ */ l(J, { as: o, ...t, children: e }) });
174
- Object.defineProperty(P, "componentType", {
173
+ }, E = ({ children: e, as: o = "h4", ...t }) => /* @__PURE__ */ l("div", { className: "gi-flex-1", id: t.id, "aria-label": e == null ? void 0 : e.toString(), children: /* @__PURE__ */ l(J, { as: o, ...t, children: e }) });
174
+ Object.defineProperty(E, "componentType", {
175
175
  value: "ModalTitle",
176
176
  writable: !1,
177
177
  enumerable: !1
178
178
  });
179
- P.displayName = "ModalTitle";
180
- const he = ({
179
+ E.displayName = "ModalTitle";
180
+ const ve = ({
181
181
  children: e,
182
182
  className: o,
183
183
  includeModalClass: t = !0
@@ -199,10 +199,10 @@ const he = ({
199
199
  }) => {
200
200
  const s = (Array.isArray(o) ? o : [o]).filter((r) => {
201
201
  var i, c;
202
- return K(r) && (r.type === E || ((i = r.type) == null ? void 0 : i.displayName) === "Button" || ((c = r.props) == null ? void 0 : c["data-button"]));
202
+ return K(r) && (r.type === A || ((i = r.type) == null ? void 0 : i.displayName) === "Button" || ((c = r.props) == null ? void 0 : c["data-button"]));
203
203
  }).sort((r, i) => {
204
- const c = r.props.variant ?? "primary", v = i.props.variant ?? "primary";
205
- return (I[c] || 0) - (I[v] || 0);
204
+ const c = r.props.variant ?? "primary", h = i.props.variant ?? "primary";
205
+ return (B[c] || 0) - (B[h] || 0);
206
206
  }), f = u({
207
207
  "gi-justify-center sm:gi-justify-start": !t && n !== "sm" && !a,
208
208
  "gi-justify-center": t === "vertical" || n === "sm" || a,
@@ -225,7 +225,7 @@ const he = ({
225
225
  (r, i) => {
226
226
  var c;
227
227
  return T(r, {
228
- key: r.key || r.props.id || r.props.dataTestid || `modal-footer-button-${i}`,
228
+ key: r.key || r.props.id || r.props.dataTestId || `modal-footer-button-${i}`,
229
229
  id: r.props.id || `modal-footer-button-${i}`,
230
230
  className: u((c = r == null ? void 0 : r.props) == null ? void 0 : c.className, f)
231
231
  });
@@ -247,22 +247,22 @@ const ne = ({
247
247
  modalRef: o,
248
248
  isOpen: t
249
249
  }) => {
250
- const [n, a] = A(!1);
250
+ const [n, a] = j(!1);
251
251
  return C(() => {
252
252
  a(!0);
253
253
  }, []), X(o, t && n), n ? G(e, document.body) : null;
254
- }, ve = ({
254
+ }, he = ({
255
255
  children: e,
256
256
  triggerButton: o,
257
257
  startsOpen: t,
258
258
  ...n
259
259
  }) => {
260
- const [a, d] = A(!!t), h = () => d(!0), s = () => d(!1), f = T(o, {
261
- "data-testid": "modal-trigger-button-container",
262
- "aria-haspopup": "dialog",
263
- onClick: h
260
+ const [a, d] = j(!!t), v = () => d(!0), s = () => d(!1), f = T(o, {
261
+ dataTestId: "modal-trigger-button-container",
262
+ ariaHasPopup: "dialog",
263
+ onClick: v
264
264
  });
265
- return /* @__PURE__ */ y(j, { children: [
265
+ return /* @__PURE__ */ y(P, { children: [
266
266
  f,
267
267
  /* @__PURE__ */ l(
268
268
  re,
@@ -277,9 +277,9 @@ const ne = ({
277
277
  ] });
278
278
  };
279
279
  export {
280
- ve as Modal,
281
- he as ModalBody,
280
+ he as Modal,
281
+ ve as ModalBody,
282
282
  x as ModalFooter,
283
- P as ModalTitle,
283
+ E as ModalTitle,
284
284
  re as ModalWrapper
285
285
  };
@@ -1,5 +1,5 @@
1
1
  import { ComponentPropsWithoutRef, ReactElement } from 'react';
2
- import { ButtonProps, ButtonSize, ButtonVariant } from '../button/types.js';
2
+ import { Props as ButtonProps } from '../atoms/Button';
3
3
  import { IconButtonProps } from '../icon-button/icon-button.js';
4
4
  import { ModalBody, ModalFooter, ModalTitle } from './modal.js';
5
5
  export type ModalPositions = 'center' | 'left' | 'right' | 'bottom';
@@ -10,7 +10,7 @@ type ModalWrapperOwnProps = {
10
10
  isOpen: boolean;
11
11
  onClose: () => void;
12
12
  position?: ModalPositions;
13
- closeButtonSize?: ButtonSize;
13
+ closeButtonSize?: ButtonProps['size'];
14
14
  };
15
15
  export type ModalWrapperProps = ModalWrapperOwnProps & Omit<ComponentPropsWithoutRef<'div'>, 'role'> & Omit<ModalProps, 'triggerButton'>;
16
16
  export type ModalSize = 'sm' | 'md' | 'lg';
@@ -27,10 +27,11 @@ export type ModalProps = React.AriaAttributes & {
27
27
  };
28
28
  export type ModalCloseButtonProps = {
29
29
  label?: string;
30
- } & Omit<IconButtonProps, 'className' | 'icon' | 'variant' | 'appearance'>;
30
+ size?: ButtonProps['size'];
31
+ } & Omit<IconButtonProps, 'className' | 'icon' | 'variant' | 'appearance' | 'size'>;
31
32
  export type ModalFooterButton = {
32
33
  label: string;
33
- variant: ButtonVariant;
34
+ variant: ButtonProps['variant'];
34
35
  } & ButtonProps;
35
36
  export type ModalFooterProps = {
36
37
  className?: string;
@@ -1,18 +1,17 @@
1
1
  "use client";
2
- import { jsxs as B, jsx as j } from "react/jsx-runtime";
2
+ import { jsxs as B, jsx as I } from "react/jsx-runtime";
3
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 "../atoms/Button.js";
4
+ import U from "../atoms/Button.js";
5
5
  import "../atoms/heading/styles.js";
6
- import be from "../atoms/icons/ArrowLeft.js";
7
- import ve from "../atoms/icons/ArrowRight.js";
8
- import { Button as U } from "../button/button.js";
6
+ import ve from "../atoms/icons/ArrowLeft.js";
7
+ import be from "../atoms/icons/ArrowRight.js";
9
8
  import { useBreakpoint as Ne, Breakpoint as ne } from "../hooks/use-breakpoint.js";
10
9
  import { Icon as xe } from "../icon/icon.js";
11
10
  import { getDisplayPages as re } from "../utils/utilities.js";
12
- import { w as ie, i as _, a as X, b as S, I as Ae, u as Ee } from "../useTranslation-DiBQuy8S.js";
13
- import { k as $e } from "../i18next-Bfi2-LyH.js";
11
+ import { w as ie, i as _, a as X, b as L, I as Ae, u as Ee } from "../useTranslation-CRbS3UeG.js";
12
+ import { k as $e } from "../i18next-zBkzxGW1.js";
14
13
  import { g as Te } from "../_commonjsHelpers-DaMA6jEr.js";
15
- import { g as oe, b as le, u as ke } from "../i18nInstance-AYICsHJu.js";
14
+ import { g as oe, b as le, u as ke } from "../i18nInstance-DiZ0lVPL.js";
16
15
  var Y, se;
17
16
  function Ce() {
18
17
  return se || (se = 1, Y = {
@@ -34,20 +33,20 @@ function Ce() {
34
33
  }
35
34
  var Oe = Ce();
36
35
  const Ve = /* @__PURE__ */ Te(Oe);
37
- var je = /\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g;
36
+ var Ie = /\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g;
38
37
  function ae(e) {
39
38
  var t = { type: "tag", name: "", voidElement: !1, attrs: {}, children: [] }, n = e.match(/<\/?([^\s]+?)[/\s>]/);
40
39
  if (n && (t.name = n[1], (Ve[n[1]] || e.charAt(e.length - 2) === "/") && (t.voidElement = !0), t.name.startsWith("!--"))) {
41
40
  var r = e.indexOf("-->");
42
41
  return { type: "comment", comment: r !== -1 ? e.slice(4, r) : "" };
43
42
  }
44
- for (var a = new RegExp(je), s = null; (s = a.exec(e)) !== null; ) if (s[0].trim()) if (s[1]) {
43
+ for (var a = new RegExp(Ie), s = null; (s = a.exec(e)) !== null; ) if (s[0].trim()) if (s[1]) {
45
44
  var o = s[1].trim(), c = [o, ""];
46
45
  o.indexOf("=") > -1 && (c = o.split("=")), t.attrs[c[0]] = c[1], a.lastIndex--;
47
46
  } else s[2] && (t.attrs[s[2]] = s[3].trim().substring(1, s[3].length - 1));
48
47
  return t;
49
48
  }
50
- var Ie = /<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g, Se = /^\s*$/, Le = /* @__PURE__ */ Object.create(null);
49
+ var je = /<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g, Le = /^\s*$/, Se = /* @__PURE__ */ Object.create(null);
51
50
  function ce(e, t) {
52
51
  switch (t.type) {
53
52
  case "text":
@@ -63,13 +62,13 @@ function ce(e, t) {
63
62
  }
64
63
  }
65
64
  var _e = { parse: function(e, t) {
66
- t || (t = {}), t.components || (t.components = Le);
65
+ t || (t = {}), t.components || (t.components = Se);
67
66
  var n, r = [], a = [], s = -1, o = !1;
68
67
  if (e.indexOf("<") !== 0) {
69
68
  var c = e.indexOf("<");
70
69
  r.push({ type: "text", content: c === -1 ? e : e.substring(0, c) });
71
70
  }
72
- return e.replace(Ie, function(f, m) {
71
+ return e.replace(je, function(f, m) {
73
72
  if (o) {
74
73
  if (f !== "</" + n.name + ">") return;
75
74
  o = !1;
@@ -82,7 +81,7 @@ var _e = { parse: function(e, t) {
82
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)) {
83
82
  p = s === -1 ? r : a[s].children;
84
83
  var h = e.indexOf("<", g), x = e.slice(g, h === -1 ? void 0 : h);
85
- Se.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 });
86
85
  }
87
86
  }), r;
88
87
  }, stringify: function(e) {
@@ -99,25 +98,28 @@ const G = (e, t) => {
99
98
  var n, r;
100
99
  if (!e) return [];
101
100
  const t = ((n = e.props) == null ? void 0 : n.children) ?? e.children;
102
- return (r = e.props) != null && r.i18nIsDynamicList ? L(t) : t;
103
- }, Fe = (e) => Array.isArray(e) && e.every(D), L = (e) => Array.isArray(e) ? e : [e], we = (e, t) => {
101
+ return (r = e.props) != null && r.i18nIsDynamicList ? S(t) : t;
102
+ }, Fe = (e) => Array.isArray(e) && e.every(D), S = (e) => Array.isArray(e) ? e : [e], we = (e, t) => {
104
103
  const n = {
105
104
  ...t
106
105
  };
107
- return n.props = Object.assign(e.props, t.props), n;
106
+ return n.props = {
107
+ ...t.props,
108
+ ...e.props
109
+ }, n;
108
110
  }, Re = (e) => {
109
111
  const t = {};
110
112
  if (!e) return t;
111
113
  const n = (r) => {
112
- L(r).forEach((s) => {
113
- _(s) || (G(s) ? n(q(s)) : S(s) && !D(s) && Object.assign(t, s));
114
+ S(r).forEach((s) => {
115
+ _(s) || (G(s) ? n(q(s)) : L(s) && !D(s) && Object.assign(t, s));
114
116
  });
115
117
  };
116
118
  return n(e), t;
117
119
  }, ue = (e, t, n, r) => {
118
120
  if (!e) return "";
119
121
  let a = "";
120
- const s = L(e), o = t != null && t.transSupportBasicHtmlNodes ? t.transKeepBasicHtmlNodesFor ?? [] : [];
122
+ const s = S(e), o = t != null && t.transSupportBasicHtmlNodes ? t.transKeepBasicHtmlNodesFor ?? [] : [];
121
123
  return s.forEach((c, f) => {
122
124
  if (_(c)) {
123
125
  a += `${c}`;
@@ -150,7 +152,7 @@ const G = (e, t) => {
150
152
  });
151
153
  return;
152
154
  }
153
- if (S(c)) {
155
+ if (L(c)) {
154
156
  const {
155
157
  format: m,
156
158
  ...p
@@ -199,8 +201,8 @@ const G = (e, t) => {
199
201
  const c = a.transKeepBasicHtmlNodesFor || [], f = n && new RegExp(c.map((u) => `<${u}`).join("|")).test(n);
200
202
  if (!e && !t && !f && !o) return [n];
201
203
  const m = t ?? {}, p = (u) => {
202
- L(u).forEach((y) => {
203
- _(y) || (G(y) ? p(q(y)) : S(y) && !D(y) && Object.assign(m, y));
204
+ S(u).forEach((y) => {
205
+ _(y) || (G(y) ? p(q(y)) : L(y) && !D(y) && Object.assign(m, y));
204
206
  });
205
207
  };
206
208
  p(e);
@@ -209,23 +211,23 @@ const G = (e, t) => {
209
211
  ...s
210
212
  }, l = (u, A, y) => {
211
213
  var d;
212
- const E = q(u), I = h(E, A.children, y);
213
- return Fe(E) && I.length === 0 || (d = u.props) != null && d.i18nIsDynamicList ? E : I;
214
- }, T = (u, A, y, E, I) => {
214
+ const E = q(u), j = h(E, A.children, y);
215
+ return Fe(E) && j.length === 0 || (d = u.props) != null && d.i18nIsDynamicList ? E : j;
216
+ }, T = (u, A, y, E, j) => {
215
217
  u.dummy ? (u.children = A, y.push(Q(u, {
216
218
  key: E
217
- }, I ? void 0 : A))) : y.push(...me.map([u], (d) => {
219
+ }, j ? void 0 : A))) : y.push(...me.map([u], (d) => {
218
220
  const i = "data-i18n-is-dynamic-list", O = {
219
221
  key: E,
220
222
  [i]: void 0
221
223
  };
222
224
  return d && d.props && Object.keys(d.props).forEach((k) => {
223
225
  k === "ref" || k === "children" || k === "i18nIsDynamicList" || k === i || (O[k] = d.props[k]);
224
- }), Q(d, O, I ? null : A);
226
+ }), Q(d, O, j ? null : A);
225
227
  }));
226
228
  }, h = (u, A, y) => {
227
- const E = L(u);
228
- return L(A).reduce((d, i, O) => {
229
+ const E = S(u);
230
+ return S(A).reduce((d, i, O) => {
229
231
  var F, H;
230
232
  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);
231
233
  if (i.type === "tag") {
@@ -234,60 +236,60 @@ const G = (e, t) => {
234
236
  const V = {
235
237
  ...i.attrs
236
238
  };
237
- o && Object.keys(V).forEach((v) => {
238
- const z = V[v];
239
- _(z) && (V[v] = ke(z));
239
+ o && Object.keys(V).forEach((b) => {
240
+ const z = V[b];
241
+ _(z) && (V[b] = ke(z));
240
242
  });
241
- const b = Object.keys(V).length !== 0 ? we({
243
+ const v = Object.keys(V).length !== 0 ? we({
242
244
  props: V
243
- }, C) : C, w = D(b), M = w && G(i, !0) && !i.voidElement, W = f && S(b) && b.dummy && !w, Z = S(t) && Object.hasOwnProperty.call(t, i.name);
244
- if (_(b)) {
245
- const v = r.services.interpolator.interpolate(b, g, r.language);
246
- d.push(v);
247
- } else if (G(b) || M) {
248
- const v = l(b, i, y);
249
- T(b, v, d, O);
245
+ }, C) : C, w = D(v), M = w && G(i, !0) && !i.voidElement, W = f && L(v) && v.dummy && !w, Z = L(t) && Object.hasOwnProperty.call(t, i.name);
246
+ if (_(v)) {
247
+ const b = r.services.interpolator.interpolate(v, g, r.language);
248
+ d.push(b);
249
+ } else if (G(v) || M) {
250
+ const b = l(v, i, y);
251
+ T(v, b, d, O);
250
252
  } else if (W) {
251
- const v = h(E, i.children, y);
252
- T(b, v, d, O);
253
+ const b = h(E, i.children, y);
254
+ T(v, b, d, O);
253
255
  } else if (Number.isNaN(parseFloat(i.name)))
254
256
  if (Z) {
255
- const v = l(b, i, y);
256
- T(b, v, d, O, i.voidElement);
257
+ const b = l(v, i, y);
258
+ T(v, b, d, O, i.voidElement);
257
259
  } else if (a.transSupportBasicHtmlNodes && c.indexOf(i.name) > -1)
258
260
  if (i.voidElement)
259
261
  d.push(R(i.name, {
260
262
  key: `${i.name}-${O}`
261
263
  }));
262
264
  else {
263
- const v = h(E, i.children, y);
265
+ const b = h(E, i.children, y);
264
266
  d.push(R(i.name, {
265
267
  key: `${i.name}-${O}`
266
- }, v));
268
+ }, b));
267
269
  }
268
270
  else if (i.voidElement)
269
271
  d.push(`<${i.name} />`);
270
272
  else {
271
- const v = h(E, i.children, y);
272
- d.push(`<${i.name}>${v}</${i.name}>`);
273
+ const b = h(E, i.children, y);
274
+ d.push(`<${i.name}>${b}</${i.name}>`);
273
275
  }
274
- else if (S(b) && !w) {
275
- const v = i.children[0] ? k : null;
276
- v && d.push(v);
276
+ else if (L(v) && !w) {
277
+ const b = i.children[0] ? k : null;
278
+ b && d.push(b);
277
279
  } else
278
- T(b, k, d, O, i.children.length !== 1 || !k);
280
+ T(v, k, d, O, i.children.length !== 1 || !k);
279
281
  } else if (i.type === "text") {
280
- 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);
282
+ const C = a.transWrapTextNodes, V = typeof a.unescape == "function" ? a.unescape : oe().unescape, v = o ? V(r.services.interpolator.interpolate(i.content, g, r.language)) : r.services.interpolator.interpolate(i.content, g, r.language);
281
283
  C ? d.push(R(C, {
282
284
  key: `${i.name}-${O}`
283
- }, b)) : d.push(b);
285
+ }, v)) : d.push(v);
284
286
  }
285
287
  return d;
286
288
  }, []);
287
289
  }, x = h([{
288
290
  dummy: !0,
289
291
  children: e || []
290
- }], $, L(e || []));
292
+ }], $, S(e || []));
291
293
  return q(x[0]);
292
294
  }, pe = (e, t, n) => {
293
295
  const r = e.key || t, a = Q(e, {
@@ -308,9 +310,9 @@ const G = (e, t) => {
308
310
  [r]: pe(e[r], r, t)
309
311
  });
310
312
  }), n;
311
- }, Me = (e, t, n, r) => e ? Array.isArray(e) ? De(e, t) : S(e) ? He(e, t) : (ie(n, "TRANS_INVALID_COMPONENTS", '<Trans /> "components" prop expects an object or array', {
313
+ }, 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', {
312
314
  i18nKey: r
313
- }), null) : null, We = (e) => !S(e) || Array.isArray(e) ? !1 : Object.keys(e).reduce((t, n) => t && Number.isNaN(Number.parseFloat(n)), !0);
315
+ }), null) : null, We = (e) => !L(e) || Array.isArray(e) ? !1 : Object.keys(e).reduce((t, n) => t && Number.isNaN(Number.parseFloat(n)), !0);
314
316
  function Ze({
315
317
  children: e,
316
318
  count: t,
@@ -327,15 +329,15 @@ function Ze({
327
329
  shouldUnescape: $,
328
330
  ...g
329
331
  }) {
330
- var v, z, K, P, ee, te;
331
- const l = p || oe();
332
+ var b, z, K, P, ee, te;
333
+ const l = p || le();
332
334
  if (!l)
333
335
  return ie(l, "NO_I18NEXT_INSTANCE", "Trans: You need to pass in an i18next instance using i18nextReactModule", {
334
336
  i18nKey: r
335
337
  }), e;
336
338
  const T = N || l.t.bind(l) || ((fe) => fe), h = {
337
- ...le(),
338
- ...(v = l.options) == null ? void 0 : v.react
339
+ ...oe(),
340
+ ...(b = l.options) == null ? void 0 : b.react
339
341
  };
340
342
  let x = m || T.ns || ((z = l.options) == null ? void 0 : z.defaultNS);
341
343
  x = _(x) ? [x] : x || ["translation"];
@@ -347,7 +349,7 @@ function Ze({
347
349
  } : s, y = $ ?? (u == null ? void 0 : u.shouldUnescape), E = u != null && u.values ? {
348
350
  ...u.values,
349
351
  ...o
350
- } : o, I = u != null && u.components ? {
352
+ } : o, j = u != null && u.components ? {
351
353
  ...u.components,
352
354
  ...f
353
355
  } : f, d = ue(e, h, l, r), i = c || (A == null ? void 0 : A.defaultValue) || d || h.transEmptyNodeValue || (typeof r == "function" ? $e(r) : r), {
@@ -378,9 +380,9 @@ function Ze({
378
380
  };
379
381
  let V = k ? T(k, C) : i;
380
382
  V === k && i && (V = i);
381
- const b = Me(I, V, l, r);
382
- let w = b || e, M = null;
383
- We(b) && (M = b, w = e);
383
+ const v = Me(j, V, l, r);
384
+ let w = v || e, M = null;
385
+ We(v) && (M = v, w = e);
384
386
  const W = Be(w, M, V, l, h, C, y), Z = n ?? h.defaultTransParent;
385
387
  return Z ? R(Z, g, W) : W;
386
388
  }
@@ -404,7 +406,7 @@ function Ge({
404
406
  const {
405
407
  i18n: l,
406
408
  defaultNS: T
407
- } = he(Ae) || {}, h = p || l || oe(), x = N || (h == null ? void 0 : h.t.bind(h));
409
+ } = he(Ae) || {}, h = p || l || le(), x = N || (h == null ? void 0 : h.t.bind(h));
408
410
  return Ze({
409
411
  children: e,
410
412
  count: t,
@@ -422,7 +424,7 @@ function Ge({
422
424
  ...g
423
425
  });
424
426
  }
425
- const it = ({
427
+ const at = ({
426
428
  currentPage: e,
427
429
  totalPages: t,
428
430
  onPageChange: n,
@@ -436,21 +438,21 @@ const it = ({
436
438
  f(!0);
437
439
  }, []);
438
440
  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(
439
- (l, T) => l === -1 || l === -2 ? /* @__PURE__ */ j(J.Fragment, { children: /* @__PURE__ */ j(
441
+ (l, T) => l === -1 || l === -2 ? /* @__PURE__ */ I(J.Fragment, { children: /* @__PURE__ */ I(
440
442
  xe,
441
443
  {
442
444
  role: "presentation",
443
445
  className: "gi-text-gray-700",
444
446
  icon: "more_horiz"
445
447
  }
446
- ) }, `ellipsis-${T}`) : /* @__PURE__ */ j(
448
+ ) }, `ellipsis-${T}`) : /* @__PURE__ */ I(
447
449
  U,
448
450
  {
449
451
  variant: l === e ? "primary" : "flat",
450
452
  size: "large",
451
453
  appearance: "dark",
452
454
  onClick: () => n(l),
453
- "aria-label": a("pagination.goToPage", {
455
+ ariaLabel: a("pagination.goToPage", {
454
456
  page: l,
455
457
  defaultValue: `Go to page ${l}`
456
458
  }),
@@ -458,12 +460,12 @@ const it = ({
458
460
  },
459
461
  l
460
462
  )
461
- ), $ = () => /* @__PURE__ */ j("span", { className: "gi-text-md gi-leading-6", "aria-live": "polite", children: /* @__PURE__ */ B(
463
+ ), $ = () => /* @__PURE__ */ I("span", { className: "gi-text-md gi-leading-6", "aria-live": "polite", children: /* @__PURE__ */ B(
462
464
  Ge,
463
465
  {
464
466
  i18nKey: "pagination.page",
465
467
  values: { currentPage: e, totalPages: t },
466
- components: { bold: /* @__PURE__ */ j("span", { className: "gi-font-bold" }) },
468
+ components: { bold: /* @__PURE__ */ I("span", { className: "gi-font-bold" }) },
467
469
  children: [
468
470
  /* @__PURE__ */ B("span", { className: "gi-font-bold", children: [
469
471
  "Page ",
@@ -494,13 +496,13 @@ const it = ({
494
496
  appearance: "dark",
495
497
  disabled: e === 1,
496
498
  onClick: () => n(e - 1),
497
- "aria-label": a("pagination.goToPrevious", {
499
+ ariaLabel: a("pagination.goToPrevious", {
498
500
  defaultValue: "Go to previous"
499
501
  }),
500
502
  className: p ? "gi-icon-btn-large" : "",
501
- dataTestid: "govie-pagination-prev-btn",
503
+ dataTestId: "govie-pagination-prev-btn",
502
504
  children: [
503
- /* @__PURE__ */ j(J.Fragment, { children: /* @__PURE__ */ j(be, { className: "gi-block gi-shrink-0" }) }, "previous-btn-pagination"),
505
+ /* @__PURE__ */ I(J.Fragment, { children: /* @__PURE__ */ I(ve, { className: "gi-block gi-shrink-0" }) }, "previous-btn-pagination"),
504
506
  !p && a("pagination.previous", { defaultValue: "Previous" })
505
507
  ]
506
508
  }
@@ -514,12 +516,12 @@ const it = ({
514
516
  size: "large",
515
517
  appearance: "dark",
516
518
  onClick: () => n(e + 1),
517
- "aria-label": a("pagination.goToNext", { defaultValue: "Go to next" }),
519
+ ariaLabel: a("pagination.goToNext", { defaultValue: "Go to next" }),
518
520
  className: p ? "gi-icon-btn-large" : "",
519
- dataTestid: "govie-pagination-next-btn",
521
+ dataTestId: "govie-pagination-next-btn",
520
522
  children: [
521
523
  !p && a("pagination.next", { defaultValue: "Next" }),
522
- /* @__PURE__ */ j(J.Fragment, { children: /* @__PURE__ */ j(ve, { className: "gi-block gi-shrink-0" }) }, "next-btn-pagination")
524
+ /* @__PURE__ */ I(J.Fragment, { children: /* @__PURE__ */ I(be, { className: "gi-block gi-shrink-0" }) }, "next-btn-pagination")
523
525
  ]
524
526
  }
525
527
  )
@@ -528,5 +530,5 @@ const it = ({
528
530
  );
529
531
  };
530
532
  export {
531
- it as Pagination
533
+ at as Pagination
532
534
  };
@@ -2,7 +2,7 @@ import { jsxs as u, jsx as r } from "react/jsx-runtime";
2
2
  import { Children as V } from "react";
3
3
  import { cn as L } from "../cn.js";
4
4
  import { Icon as j } from "../icon/icon.js";
5
- import { ProgressStepperIndicator as b, StepStatus as y } from "./types.js";
5
+ import { StepStatus as y, ProgressStepperIndicator as b } from "./types.js";
6
6
  const B = (t) => `calc(100% + ${t * 4 - 36}px)`, D = ({
7
7
  isNextStep: t,
8
8
  orientation: a = "horizontal",
@@ -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;
@@ -1,4 +1,4 @@
1
- import { jsx as a, jsxs as d } from "react/jsx-runtime";
1
+ import { jsxs as d, jsx as a } from "react/jsx-runtime";
2
2
  import { cn as o } from "../cn.js";
3
3
  import { Icon as m } from "../icon/icon.js";
4
4
  const b = ({