@ogcio/design-system-react 1.32.0 → 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 (42) 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 +2 -1
  7. package/dist/button/button.d.ts +2 -9
  8. package/dist/button/button.js +65 -32
  9. package/dist/button/helpers.d.ts +2 -1
  10. package/dist/button/types.d.ts +25 -8
  11. package/dist/button-group/button-group.js +43 -45
  12. package/dist/button-group/types.d.ts +5 -5
  13. package/dist/card/card-legacy.js +1 -1
  14. package/dist/card/types.d.ts +1 -1
  15. package/dist/combo-box/dropdown-item.js +1 -1
  16. package/dist/cookie-banner/cookie-banner.d.ts +1 -1
  17. package/dist/data-table/data-table-header.js +1 -1
  18. package/dist/drawer/drawer.d.ts +1 -1
  19. package/dist/drawer/drawer.js +17 -17
  20. package/dist/error-text/error-text.js +28 -27
  21. package/dist/forms/form-field/form-field.js +24 -25
  22. package/dist/header/components/header-search.js +2 -2
  23. package/dist/hint-text/hint-text.js +26 -20
  24. package/dist/icon-button/icon-button.d.ts +3 -5
  25. package/dist/index.d.ts +1 -1
  26. package/dist/label/label.d.ts +78 -30
  27. package/dist/label/label.js +29 -14
  28. package/dist/modal/modal.content.js +1 -1
  29. package/dist/modal/modal.js +38 -38
  30. package/dist/modal/types.d.ts +5 -4
  31. package/dist/pagination/pagination.js +27 -28
  32. package/dist/score-select/type.d.ts +2 -2
  33. package/dist/select/select-next.js +87 -87
  34. package/dist/side-nav/side-nav.js +1 -1
  35. package/dist/styles.css +1 -1
  36. package/dist/tabs/tab-item.js +53 -71
  37. package/dist/tabs/variants.d.ts +269 -0
  38. package/dist/tabs/variants.js +87 -0
  39. package/dist/tooltip/tooltip.js +27 -35
  40. package/dist/tooltip/variants.d.ts +115 -0
  41. package/dist/tooltip/variants.js +59 -0
  42. package/package.json +2 -2
@@ -3,52 +3,100 @@ export declare const LabelSize: {
3
3
  readonly Medium: "md";
4
4
  readonly Large: "lg";
5
5
  };
6
+ export declare const Label: import('react').ForwardRefExoticComponent<import('react').LabelHTMLAttributes<HTMLLabelElement> & {
7
+ text?: string | React.ReactElement;
8
+ size?: import('./types.js').LabelSizeType;
9
+ } & {
10
+ children?: import('react').ReactNode | undefined;
11
+ } & import('react').RefAttributes<HTMLLabelElement>>;
6
12
  export declare const styles: import('tailwind-variants').TVReturnType<{
7
13
  size: {
8
- sm: string;
9
- md: string;
10
- lg: string;
14
+ sm: {
15
+ base: string;
16
+ };
17
+ md: {
18
+ base: string;
19
+ };
20
+ lg: {
21
+ base: string;
22
+ };
11
23
  };
12
- }, undefined, "gi-label", import('tailwind-variants/dist/config.js').TVConfig<{
24
+ }, {
25
+ base: string;
26
+ }, undefined, import('tailwind-variants/dist/config.js').TVConfig<{
13
27
  size: {
14
- sm: string;
15
- md: string;
16
- lg: string;
28
+ sm: {
29
+ base: string;
30
+ };
31
+ md: {
32
+ base: string;
33
+ };
34
+ lg: {
35
+ base: string;
36
+ };
17
37
  };
18
38
  }, {
19
39
  size: {
20
- sm: string;
21
- md: string;
22
- lg: string;
40
+ sm: {
41
+ base: string;
42
+ };
43
+ md: {
44
+ base: string;
45
+ };
46
+ lg: {
47
+ base: string;
48
+ };
23
49
  };
24
50
  }>, {
25
51
  size: {
26
- sm: string;
27
- md: string;
28
- lg: string;
52
+ sm: {
53
+ base: string;
54
+ };
55
+ md: {
56
+ base: string;
57
+ };
58
+ lg: {
59
+ base: string;
60
+ };
29
61
  };
30
- }, undefined, import('tailwind-variants').TVReturnType<{
62
+ }, {
63
+ base: string;
64
+ }, import('tailwind-variants').TVReturnType<{
31
65
  size: {
32
- sm: string;
33
- md: string;
34
- lg: string;
66
+ sm: {
67
+ base: string;
68
+ };
69
+ md: {
70
+ base: string;
71
+ };
72
+ lg: {
73
+ base: string;
74
+ };
35
75
  };
36
- }, undefined, "gi-label", import('tailwind-variants/dist/config.js').TVConfig<{
76
+ }, {
77
+ base: string;
78
+ }, undefined, import('tailwind-variants/dist/config.js').TVConfig<{
37
79
  size: {
38
- sm: string;
39
- md: string;
40
- lg: string;
80
+ sm: {
81
+ base: string;
82
+ };
83
+ md: {
84
+ base: string;
85
+ };
86
+ lg: {
87
+ base: string;
88
+ };
41
89
  };
42
90
  }, {
43
91
  size: {
44
- sm: string;
45
- md: string;
46
- lg: string;
92
+ sm: {
93
+ base: string;
94
+ };
95
+ md: {
96
+ base: string;
97
+ };
98
+ lg: {
99
+ base: string;
100
+ };
47
101
  };
48
102
  }>, unknown, unknown, undefined>>;
49
- export declare const Label: import('react').ForwardRefExoticComponent<import('react').LabelHTMLAttributes<HTMLLabelElement> & {
50
- text?: string | React.ReactElement;
51
- size?: import('./types.js').LabelSizeType;
52
- } & {
53
- children?: import('react').ReactNode | undefined;
54
- } & import('react').RefAttributes<HTMLLabelElement>>;
@@ -1,28 +1,43 @@
1
- import { jsx as i } from "react/jsx-runtime";
2
- import { forwardRef as r } from "react";
3
- import { c as o } from "../index-CB-zPpNk.js";
4
- const d = {
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { forwardRef as o } from "react";
3
+ import { c as d } from "../index-CB-zPpNk.js";
4
+ const b = {
5
5
  Small: "sm",
6
6
  Medium: "md",
7
7
  Large: "lg"
8
- }, g = o({
9
- base: "gi-label",
8
+ }, c = o(
9
+ ({ text: e, size: t = b.Medium, className: s, children: a, ...l }, m) => {
10
+ const { base: i } = g({ size: t });
11
+ return /* @__PURE__ */ r(
12
+ "label",
13
+ {
14
+ className: i({ className: s }),
15
+ "data-testid": "label",
16
+ ref: m,
17
+ ...l,
18
+ children: a ?? e
19
+ }
20
+ );
21
+ }
22
+ );
23
+ c.displayName = "Label";
24
+ const g = d({
25
+ slots: {
26
+ base: "gi-block gi-text-color-text-system-neutral-default"
27
+ },
10
28
  variants: {
11
29
  size: {
12
- sm: "gi-text-sm",
13
- md: "gi-text-md",
14
- lg: "gi-text-lg"
30
+ sm: { base: "gi-text-sm" },
31
+ md: { base: "gi-text-md" },
32
+ lg: { base: "gi-text-lg" }
15
33
  }
16
34
  },
17
35
  defaultVariants: {
18
36
  size: "md"
19
37
  }
20
- }), c = r(
21
- ({ text: e, size: a = d.Medium, className: m, children: s, ...t }, l) => /* @__PURE__ */ i("label", { className: g({ size: a, className: m }), ref: l, ...t, children: s ?? e })
22
- );
23
- c.displayName = "Label";
38
+ });
24
39
  export {
25
40
  c as Label,
26
- d as LabelSize,
41
+ b as LabelSize,
27
42
  g as styles
28
43
  };
@@ -1,5 +1,5 @@
1
1
  import { jsxs as i, jsx as t, Fragment as r } from "react/jsx-runtime";
2
- import { Button as o } from "../button/button.js";
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,15 +1,14 @@
1
1
  "use client";
2
2
  import { jsxs as B, jsx as j } 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
6
  import be from "../atoms/icons/ArrowLeft.js";
7
7
  import ve from "../atoms/icons/ArrowRight.js";
8
- import { Button as U } from "../button/button.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";
11
+ import { w as ie, i as _, a as X, b as L, I as Ae, u as Ee } from "../useTranslation-DiBQuy8S.js";
13
12
  import { k as $e } from "../i18next-Bfi2-LyH.js";
14
13
  import { g as Te } from "../_commonjsHelpers-DaMA6jEr.js";
15
14
  import { g as oe, b as le, u as ke } from "../i18nInstance-AYICsHJu.js";
@@ -47,7 +46,7 @@ function ae(e) {
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 Ie = /<[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,7 +62,7 @@ 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("<");
@@ -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,8 +98,8 @@ 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
  };
@@ -109,15 +108,15 @@ const G = (e, t) => {
109
108
  const t = {};
110
109
  if (!e) return t;
111
110
  const n = (r) => {
112
- L(r).forEach((s) => {
113
- _(s) || (G(s) ? n(q(s)) : S(s) && !D(s) && Object.assign(t, s));
111
+ S(r).forEach((s) => {
112
+ _(s) || (G(s) ? n(q(s)) : L(s) && !D(s) && Object.assign(t, s));
114
113
  });
115
114
  };
116
115
  return n(e), t;
117
116
  }, ue = (e, t, n, r) => {
118
117
  if (!e) return "";
119
118
  let a = "";
120
- const s = L(e), o = t != null && t.transSupportBasicHtmlNodes ? t.transKeepBasicHtmlNodesFor ?? [] : [];
119
+ const s = S(e), o = t != null && t.transSupportBasicHtmlNodes ? t.transKeepBasicHtmlNodesFor ?? [] : [];
121
120
  return s.forEach((c, f) => {
122
121
  if (_(c)) {
123
122
  a += `${c}`;
@@ -150,7 +149,7 @@ const G = (e, t) => {
150
149
  });
151
150
  return;
152
151
  }
153
- if (S(c)) {
152
+ if (L(c)) {
154
153
  const {
155
154
  format: m,
156
155
  ...p
@@ -199,8 +198,8 @@ const G = (e, t) => {
199
198
  const c = a.transKeepBasicHtmlNodesFor || [], f = n && new RegExp(c.map((u) => `<${u}`).join("|")).test(n);
200
199
  if (!e && !t && !f && !o) return [n];
201
200
  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));
201
+ S(u).forEach((y) => {
202
+ _(y) || (G(y) ? p(q(y)) : L(y) && !D(y) && Object.assign(m, y));
204
203
  });
205
204
  };
206
205
  p(e);
@@ -224,8 +223,8 @@ const G = (e, t) => {
224
223
  }), Q(d, O, I ? null : A);
225
224
  }));
226
225
  }, h = (u, A, y) => {
227
- const E = L(u);
228
- return L(A).reduce((d, i, O) => {
226
+ const E = S(u);
227
+ return S(A).reduce((d, i, O) => {
229
228
  var F, H;
230
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);
231
230
  if (i.type === "tag") {
@@ -240,7 +239,7 @@ const G = (e, t) => {
240
239
  });
241
240
  const b = Object.keys(V).length !== 0 ? we({
242
241
  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);
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);
244
243
  if (_(b)) {
245
244
  const v = r.services.interpolator.interpolate(b, g, r.language);
246
245
  d.push(v);
@@ -271,7 +270,7 @@ const G = (e, t) => {
271
270
  const v = h(E, i.children, y);
272
271
  d.push(`<${i.name}>${v}</${i.name}>`);
273
272
  }
274
- else if (S(b) && !w) {
273
+ else if (L(b) && !w) {
275
274
  const v = i.children[0] ? k : null;
276
275
  v && d.push(v);
277
276
  } else
@@ -287,7 +286,7 @@ const G = (e, t) => {
287
286
  }, x = h([{
288
287
  dummy: !0,
289
288
  children: e || []
290
- }], $, L(e || []));
289
+ }], $, S(e || []));
291
290
  return q(x[0]);
292
291
  }, pe = (e, t, n) => {
293
292
  const r = e.key || t, a = Q(e, {
@@ -308,9 +307,9 @@ const G = (e, t) => {
308
307
  [r]: pe(e[r], r, t)
309
308
  });
310
309
  }), 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', {
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', {
312
311
  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);
312
+ }), null) : null, We = (e) => !L(e) || Array.isArray(e) ? !1 : Object.keys(e).reduce((t, n) => t && Number.isNaN(Number.parseFloat(n)), !0);
314
313
  function Ze({
315
314
  children: e,
316
315
  count: t,
@@ -422,7 +421,7 @@ function Ge({
422
421
  ...g
423
422
  });
424
423
  }
425
- const it = ({
424
+ const at = ({
426
425
  currentPage: e,
427
426
  totalPages: t,
428
427
  onPageChange: n,
@@ -450,7 +449,7 @@ const it = ({
450
449
  size: "large",
451
450
  appearance: "dark",
452
451
  onClick: () => n(l),
453
- "aria-label": a("pagination.goToPage", {
452
+ ariaLabel: a("pagination.goToPage", {
454
453
  page: l,
455
454
  defaultValue: `Go to page ${l}`
456
455
  }),
@@ -494,11 +493,11 @@ const it = ({
494
493
  appearance: "dark",
495
494
  disabled: e === 1,
496
495
  onClick: () => n(e - 1),
497
- "aria-label": a("pagination.goToPrevious", {
496
+ ariaLabel: a("pagination.goToPrevious", {
498
497
  defaultValue: "Go to previous"
499
498
  }),
500
499
  className: p ? "gi-icon-btn-large" : "",
501
- dataTestid: "govie-pagination-prev-btn",
500
+ dataTestId: "govie-pagination-prev-btn",
502
501
  children: [
503
502
  /* @__PURE__ */ j(J.Fragment, { children: /* @__PURE__ */ j(be, { className: "gi-block gi-shrink-0" }) }, "previous-btn-pagination"),
504
503
  !p && a("pagination.previous", { defaultValue: "Previous" })
@@ -514,9 +513,9 @@ const it = ({
514
513
  size: "large",
515
514
  appearance: "dark",
516
515
  onClick: () => n(e + 1),
517
- "aria-label": a("pagination.goToNext", { defaultValue: "Go to next" }),
516
+ ariaLabel: a("pagination.goToNext", { defaultValue: "Go to next" }),
518
517
  className: p ? "gi-icon-btn-large" : "",
519
- dataTestid: "govie-pagination-next-btn",
518
+ dataTestId: "govie-pagination-next-btn",
520
519
  children: [
521
520
  !p && a("pagination.next", { defaultValue: "Next" }),
522
521
  /* @__PURE__ */ j(J.Fragment, { children: /* @__PURE__ */ j(ve, { className: "gi-block gi-shrink-0" }) }, "next-btn-pagination")
@@ -528,5 +527,5 @@ const it = ({
528
527
  );
529
528
  };
530
529
  export {
531
- it as Pagination
530
+ at as Pagination
532
531
  };
@@ -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;