@ogcio/design-system-react 1.22.1 → 1.24.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 (95) hide show
  1. package/dist/_commonjsHelpers-DaMA6jEr.js +8 -0
  2. package/dist/accordion/accordion-item.d.ts +3 -5
  3. package/dist/accordion/accordion-item.js +32 -28
  4. package/dist/accordion/accordion.d.ts +3 -5
  5. package/dist/accordion/accordion.js +22 -33
  6. package/dist/alert/alert.js +19 -20
  7. package/dist/autocomplete/autocomplete.js +167 -169
  8. package/dist/autocomplete/use-autocomplete-controller.js +1 -1
  9. package/dist/browser-support/runtime.js +2 -3
  10. package/dist/button/button.js +11 -12
  11. package/dist/button-group/button-group.js +4 -5
  12. package/dist/card/card-next.js +122 -125
  13. package/dist/card/card.js +4 -5
  14. package/dist/checkbox/checkbox-group.js +3 -4
  15. package/dist/checkbox/checkbox.js +4 -5
  16. package/dist/chip/chip.js +11 -12
  17. package/dist/clsx-OuTLNxxd.js +16 -0
  18. package/dist/cn.js +4 -16
  19. package/dist/combo-box/dropdown-item.js +2 -3
  20. package/dist/cookie-banner/cookie-banner.js +6 -7
  21. package/dist/data-table/editable-table-cell.js +3 -4
  22. package/dist/data-table/index.d.ts +7 -0
  23. package/dist/data-table/index.js +20 -0
  24. package/dist/details/details.js +6 -7
  25. package/dist/drawer/drawer.js +18 -19
  26. package/dist/footer/footer.js +2 -3
  27. package/dist/forms/form-field/form-field.js +2 -3
  28. package/dist/header/components/header-menu.js +17 -18
  29. package/dist/header/header-legacy.js +2 -3
  30. package/dist/header/header-next/components/header-logo.js +3 -4
  31. package/dist/header/header-next/components/header-title.js +0 -1
  32. package/dist/header/header-next/components/menu/components/header-menu-item-button.js +4 -5
  33. package/dist/header/header-next/components/menu/components/header-menu-item-link.js +0 -1
  34. package/dist/header/header-next/components/menu/components/header-menu-item-separator.js +4 -5
  35. package/dist/header/header-next/components/menu/components/header-menu-item-slot.js +0 -1
  36. package/dist/header/header-next/components/menu/header-menu-context.js +9 -10
  37. package/dist/header/header-next/components/menu/header-primary-menu.js +4 -5
  38. package/dist/header/header-next/components/menu/header-secondary-menu.js +0 -1
  39. package/dist/header/header-next/header-context.js +4 -5
  40. package/dist/header/header-next/header-next.js +2 -3
  41. package/dist/hooks/use-breakpoint.js +7 -8
  42. package/dist/hooks/use-toggle-map.js +12 -13
  43. package/dist/i18n/config.d.ts +1 -1
  44. package/dist/i18n/config.js +14 -11
  45. package/dist/i18n/utility.js +1 -1
  46. package/dist/i18nInstance-D_96ADqd.js +48 -0
  47. package/dist/i18next-B_GQfCrJ.js +1362 -0
  48. package/dist/icon/icon.d.ts +16 -4
  49. package/dist/icon/icon.js +79 -167
  50. package/dist/icon-button/icon-button.js +4 -5
  51. package/dist/index.d.ts +2 -5
  52. package/dist/index.js +231 -220
  53. package/dist/input-checkbox/input-checkbox.js +15 -16
  54. package/dist/input-checkbox-group/input-checkbox-group.js +9 -10
  55. package/dist/input-password/input-password.js +0 -1
  56. package/dist/input-radio/input-radio.js +11 -12
  57. package/dist/input-radio-group/input-radio-group.js +8 -9
  58. package/dist/input-text/input-text.js +2 -3
  59. package/dist/{lodash-D1c5hFAM.js → lodash-LsP9-6SV.js} +1343 -1342
  60. package/dist/modal/modal.js +4 -5
  61. package/dist/pagination/pagination.js +713 -58
  62. package/dist/phase-banner/phase-banner.js +2 -3
  63. package/dist/popover/popover.js +2 -3
  64. package/dist/radio/radio-group.js +0 -1
  65. package/dist/radio/radio.js +0 -1
  66. package/dist/score-select/score-select.js +3 -4
  67. package/dist/select/select-menu.js +43 -41
  68. package/dist/select/select-next.js +193 -161
  69. package/dist/select/select.js +3 -4
  70. package/dist/side-nav/side-nav.js +9 -10
  71. package/dist/spinner/spinner.js +2 -3
  72. package/dist/stack/stack.js +20 -21
  73. package/dist/styles.css +1 -1
  74. package/dist/summary-list/summary-list-action.js +6 -7
  75. package/dist/summary-list/summary-list-context.js +4 -5
  76. package/dist/summary-list/summary-list-header.js +12 -13
  77. package/dist/summary-list/summary-list-row.js +17 -18
  78. package/dist/summary-list/summary-list-value.js +0 -1
  79. package/dist/summary-list/summary-list.js +4 -5
  80. package/dist/table/table-data.js +11 -12
  81. package/dist/table/table-header.js +2 -3
  82. package/dist/tabs/tab-item.d.ts +1 -1
  83. package/dist/tabs/tab-item.js +0 -1
  84. package/dist/tabs/tab-list.js +23 -24
  85. package/dist/tag/tag.d.ts +9 -3
  86. package/dist/tag/tag.js +35 -18
  87. package/dist/text-input/text-input.js +0 -1
  88. package/dist/textarea/textarea.js +12 -13
  89. package/dist/toast/ds-toast.js +10 -11
  90. package/dist/toast/toast.js +15 -16
  91. package/dist/tooltip/tooltip.js +12 -13
  92. package/dist/utilities.d.ts +4 -1
  93. package/dist/utilities.js +29 -16
  94. package/package.json +6 -5
  95. package/dist/i18next-DxWa09nx.js +0 -1395
@@ -1,18 +1,17 @@
1
1
  "use client";
2
- import "@ogcio/design-system-react/browser-check";
3
2
  import { jsx as r } from "react/jsx-runtime";
4
3
  import { Link as i } from "../link/link.js";
5
4
  import { useSummaryListContext as o } from "./summary-list-context.js";
6
- const t = ({
7
- children: e,
5
+ const e = ({
6
+ children: t,
8
7
  ...m
9
- }) => (o(), /* @__PURE__ */ r(i, { ...m, children: e }));
10
- t.displayName = "SummaryListAction";
11
- Object.defineProperty(t, "componentType", {
8
+ }) => (o(), /* @__PURE__ */ r(i, { ...m, children: t }));
9
+ e.displayName = "SummaryListAction";
10
+ Object.defineProperty(e, "componentType", {
12
11
  value: "SummaryListAction",
13
12
  writable: !1,
14
13
  enumerable: !1
15
14
  });
16
15
  export {
17
- t as SummaryListAction
16
+ e as SummaryListAction
18
17
  };
@@ -1,12 +1,11 @@
1
1
  "use client";
2
- import "@ogcio/design-system-react/browser-check";
3
2
  import { jsx as e } from "react/jsx-runtime";
4
3
  import { createContext as o, useContext as n } from "react";
5
4
  const r = o(null);
6
- function s({ children: t }) {
5
+ function m({ children: t }) {
7
6
  return /* @__PURE__ */ e(r.Provider, { value: !0, children: t });
8
7
  }
9
- function x() {
8
+ function s() {
10
9
  const t = n(r);
11
10
  if (!t)
12
11
  throw new Error(
@@ -15,6 +14,6 @@ function x() {
15
14
  return t;
16
15
  }
17
16
  export {
18
- s as SummaryListProvider,
19
- x as useSummaryListContext
17
+ m as SummaryListProvider,
18
+ s as useSummaryListContext
20
19
  };
@@ -1,8 +1,7 @@
1
1
  "use client";
2
- import "@ogcio/design-system-react/browser-check";
3
2
  import { jsxs as l, jsx as e } from "react/jsx-runtime";
4
3
  import { Children as S } from "react";
5
- import { cn as r } from "../cn.js";
4
+ import { cn as s } from "../cn.js";
6
5
  import { useBreakpoint as A } from "../hooks/use-breakpoint.js";
7
6
  import { useDomId as C } from "../hooks/use-dom-id.js";
8
7
  import { translate as h } from "../i18n/utility.js";
@@ -20,23 +19,23 @@ const y = ({
20
19
  }) => {
21
20
  j();
22
21
  const { width: m } = A(), p = C(), t = S.toArray(g).filter(
23
- (s) => b(s) === "SummaryListAction"
22
+ (r) => b(r) === "SummaryListAction"
24
23
  ), i = m != null && m <= 765, d = c ? { maxWidth: c } : void 0, u = {
25
24
  "gi-truncate gi-block": w === "truncate"
26
25
  };
27
- return /* @__PURE__ */ l("tr", { ...L, className: r("gi-h-14", N), children: [
26
+ return /* @__PURE__ */ l("tr", { ...L, className: s("gi-h-14", N), children: [
28
27
  /* @__PURE__ */ l("th", { scope: "col", className: "gi-text-center gi-align-middle", children: [
29
- !i && /* @__PURE__ */ e("span", { className: r(u), style: d, children: n }),
30
- i ? /* @__PURE__ */ l("div", { className: r("gi-flex gi-justify-between"), children: [
31
- /* @__PURE__ */ e("span", { className: r(u), style: d, children: n }),
28
+ !i && /* @__PURE__ */ e("span", { className: s(u), style: d, children: n }),
29
+ i ? /* @__PURE__ */ l("div", { className: s("gi-flex gi-justify-between"), children: [
30
+ /* @__PURE__ */ e("span", { className: s(u), style: d, children: n }),
32
31
  /* @__PURE__ */ e("span", { className: "gi-sr-only", children: h("header.actions", {
33
32
  defaultValue: "Actions"
34
33
  }) }),
35
- /* @__PURE__ */ e(f, { id: o, children: t.map((s, a) => /* @__PURE__ */ e(
34
+ /* @__PURE__ */ e(f, { id: o, children: t.map((r, a) => /* @__PURE__ */ e(
36
35
  "span",
37
36
  {
38
- className: r({ "gi-ml-4": a > 0 }),
39
- children: s
37
+ className: s({ "gi-ml-4": a > 0 }),
38
+ children: r
40
39
  },
41
40
  `${p}-a${a}`
42
41
  )) })
@@ -46,11 +45,11 @@ const y = ({
46
45
  /* @__PURE__ */ e("span", { className: "gi-sr-only", children: h("header.actions", {
47
46
  defaultValue: "Actions"
48
47
  }) }),
49
- /* @__PURE__ */ e(f, { id: o, children: t.map((s, a) => /* @__PURE__ */ e(
48
+ /* @__PURE__ */ e(f, { id: o, children: t.map((r, a) => /* @__PURE__ */ e(
50
49
  "span",
51
50
  {
52
- className: r({ "gi-ml-4": a > 0 }),
53
- children: s
51
+ className: s({ "gi-ml-4": a > 0 }),
52
+ children: r
54
53
  },
55
54
  `${p}-a${a}`
56
55
  )) })
@@ -1,55 +1,54 @@
1
1
  "use client";
2
- import "@ogcio/design-system-react/browser-check";
3
- import { jsxs as i, jsx as e } from "react/jsx-runtime";
2
+ import { jsxs as s, jsx as e } from "react/jsx-runtime";
4
3
  import { Children as g } from "react";
5
- import { cn as s } from "../cn.js";
4
+ import { cn as i } from "../cn.js";
6
5
  import { useDomId as L } from "../hooks/use-dom-id.js";
7
6
  import { translate as y } from "../i18n/utility.js";
8
7
  import { getSpecialComponentType as p } from "../utilities.js";
9
8
  import { useSummaryListContext as $ } from "./summary-list-context.js";
10
9
  const f = ({
11
- children: a,
12
- label: l,
10
+ children: l,
11
+ label: t,
13
12
  withBorder: h,
14
13
  className: b,
15
14
  ...S
16
15
  }) => {
17
16
  $();
18
- const n = g.toArray(a), m = n.filter(
19
- (t) => p(t) === "SummaryListAction"
17
+ const n = g.toArray(l), m = n.filter(
18
+ (a) => p(a) === "SummaryListAction"
20
19
  ), o = n.find(
21
- (t) => p(t) === "SummaryListValue"
20
+ (a) => p(a) === "SummaryListValue"
22
21
  ), r = L(), c = `${r}-value`, d = `${r}-actions`;
23
- return /* @__PURE__ */ i(
22
+ return /* @__PURE__ */ s(
24
23
  "tr",
25
24
  {
26
25
  ...S,
27
- className: s(
26
+ className: i(
28
27
  {
29
28
  "gi-border-b gi-border-color-border-system-neutral-muted": h
30
29
  },
31
30
  b
32
31
  ),
33
32
  children: [
34
- /* @__PURE__ */ e("th", { id: r, scope: "row", children: l }),
35
- o ? /* @__PURE__ */ i("td", { ...o.props, "aria-labelledby": `${r} ${c}`, children: [
33
+ /* @__PURE__ */ e("th", { id: r, scope: "row", children: t }),
34
+ o ? /* @__PURE__ */ s("td", { ...o.props, "aria-labelledby": `${r} ${c}`, children: [
36
35
  /* @__PURE__ */ e("span", { id: c, className: "gi-sr-only", children: y("summaryList.col.value", { defaultValue: "Value" }) }),
37
36
  o.props.children
38
37
  ] }) : null,
39
- m.length > 0 ? /* @__PURE__ */ e("td", { "aria-labelledby": `${r} ${d}`, children: /* @__PURE__ */ e(v, { id: d, children: m.map((t, u) => /* @__PURE__ */ e(
38
+ m.length > 0 ? /* @__PURE__ */ e("td", { "aria-labelledby": `${r} ${d}`, children: /* @__PURE__ */ e(v, { id: d, children: m.map((a, u) => /* @__PURE__ */ e(
40
39
  "span",
41
40
  {
42
- className: s({ "gi-ml-4": u > 0 }),
43
- children: t
41
+ className: i({ "gi-ml-4": u > 0 }),
42
+ children: a
44
43
  },
45
44
  `${r}-a${u}`
46
45
  )) }) }) : null
47
46
  ]
48
47
  }
49
48
  );
50
- }, v = ({ id: a, children: l }) => /* @__PURE__ */ i("div", { className: s("gi-summary-list-action"), children: [
51
- /* @__PURE__ */ e("span", { id: a, className: "gi-sr-only", children: y("summaryList.col.actions", { defaultValue: "Actions" }) }),
52
- l
49
+ }, v = ({ id: l, children: t }) => /* @__PURE__ */ s("div", { className: i("gi-summary-list-action"), children: [
50
+ /* @__PURE__ */ e("span", { id: l, className: "gi-sr-only", children: y("summaryList.col.actions", { defaultValue: "Actions" }) }),
51
+ t
53
52
  ] });
54
53
  f.displayName = "SummaryRow";
55
54
  Object.defineProperty(f, "componentType", {
@@ -1,5 +1,4 @@
1
1
  "use client";
2
- import "@ogcio/design-system-react/browser-check";
3
2
  import { jsx as r } from "react/jsx-runtime";
4
3
  import { useSummaryListContext as a } from "./summary-list-context.js";
5
4
  const e = ({
@@ -1,10 +1,9 @@
1
1
  "use client";
2
- import "@ogcio/design-system-react/browser-check";
3
2
  import { jsx as r, jsxs as c } from "react/jsx-runtime";
4
3
  import { Children as u } from "react";
5
- import { cn as p } from "../cn.js";
4
+ import { cn as y } from "../cn.js";
6
5
  import { getSpecialComponentType as o } from "../utilities.js";
7
- import { SummaryListProvider as y } from "./summary-list-context.js";
6
+ import { SummaryListProvider as p } from "./summary-list-context.js";
8
7
  const l = ({
9
8
  children: a,
10
9
  className: s,
@@ -16,10 +15,10 @@ const l = ({
16
15
  ), m = t.filter(
17
16
  (e) => o(e) === "SummaryListRow"
18
17
  );
19
- return /* @__PURE__ */ r(y, { children: /* @__PURE__ */ r(
18
+ return /* @__PURE__ */ r(p, { children: /* @__PURE__ */ r(
20
19
  "div",
21
20
  {
22
- className: p("gi-summary-list", {
21
+ className: y("gi-summary-list", {
23
22
  "gi-border gi-border-color-border-system-neutral-muted": n
24
23
  }),
25
24
  children: /* @__PURE__ */ c("table", { className: s, role: "table", ...d, children: [
@@ -1,10 +1,9 @@
1
1
  "use client";
2
- import "@ogcio/design-system-react/browser-check";
3
2
  import { jsx as n } from "react/jsx-runtime";
4
- import { useRef as g, useState as u, useEffect as p } from "react";
3
+ import { useRef as g, useState as u, useEffect as f } from "react";
5
4
  import { cn as m } from "../cn.js";
6
5
  import { IconButton as v } from "../icon-button/icon-button.js";
7
- function k({
6
+ function S({
8
7
  align: t = "left",
9
8
  valign: e = "middle",
10
9
  size: l,
@@ -21,8 +20,8 @@ function k({
21
20
  top: "gi-align-top",
22
21
  middle: "gi-align-middle",
23
22
  bottom: "gi-align-bottom"
24
- }[e], f = l ? `gi-table-td-${l}` : void 0, c = g(null), [b, w] = u(!1);
25
- return p(() => {
23
+ }[e], p = l ? `gi-table-td-${l}` : void 0, c = g(null), [b, w] = u(!1);
24
+ return f(() => {
26
25
  if (!c.current)
27
26
  return;
28
27
  const x = c.current.querySelectorAll("input, select, button");
@@ -33,7 +32,7 @@ function k({
33
32
  ref: c,
34
33
  className: m(
35
34
  "gi-table-td",
36
- f,
35
+ p,
37
36
  r,
38
37
  i,
39
38
  s
@@ -43,12 +42,12 @@ function k({
43
42
  }
44
43
  );
45
44
  }
46
- const z = ({ children: t, className: e }) => /* @__PURE__ */ n("div", { className: m("gi-table-data-cell", e), children: t }), T = ({
45
+ const z = ({ children: t, className: e }) => /* @__PURE__ */ n("div", { className: m("gi-table-data-cell", e), children: t }), k = ({
47
46
  expanded: t,
48
47
  onClick: e
49
48
  }) => {
50
49
  const [l, s] = u("md"), o = g(null);
51
- return p(() => {
50
+ return f(() => {
52
51
  var i;
53
52
  const a = (i = o.current) == null ? void 0 : i.closest(".gi-table"), r = a == null ? void 0 : a.getAttribute("data-row-size");
54
53
  r && s(r);
@@ -72,14 +71,14 @@ const z = ({ children: t, className: e }) => /* @__PURE__ */ n("div", { classNam
72
71
  }
73
72
  }
74
73
  ) });
75
- }, _ = ({
74
+ }, T = ({
76
75
  children: t,
77
76
  className: e,
78
77
  ...l
79
78
  }) => /* @__PURE__ */ n("td", { className: "gi-table-td", ...l, children: /* @__PURE__ */ n("div", { className: m("gi-table-data-slot-container", e), children: t }) });
80
79
  export {
81
80
  z as TableCell,
82
- k as TableData,
83
- _ as TableDataSlot,
84
- T as TableExpandIcon
81
+ S as TableData,
82
+ T as TableDataSlot,
83
+ k as TableExpandIcon
85
84
  };
@@ -1,5 +1,4 @@
1
1
  "use client";
2
- import "@ogcio/design-system-react/browser-check";
3
2
  import { jsx as o, jsxs as b } from "react/jsx-runtime";
4
3
  import { Children as C } from "react";
5
4
  import { cn as m } from "../cn.js";
@@ -12,7 +11,7 @@ const j = (e, r) => e ? r ? /* @__PURE__ */ o(
12
11
  size: "sm"
13
12
  }
14
13
  ) : /* @__PURE__ */ o(u, { inline: !0, icon: "swap_vert", size: "sm" }) : null;
15
- function k({
14
+ function _({
16
15
  align: e = "left",
17
16
  valign: r = "middle",
18
17
  className: h,
@@ -74,5 +73,5 @@ function k({
74
73
  );
75
74
  }
76
75
  export {
77
- k as TableHeader
76
+ _ as TableHeader
78
77
  };
@@ -9,4 +9,4 @@ export declare const InternalTabItem: import('react').ForwardRefExoticComponent<
9
9
  stretch?: boolean;
10
10
  labelAlignment?: "center" | "end" | "start";
11
11
  className?: string;
12
- } & import('react').RefAttributes<HTMLButtonElement | HTMLAnchorElement>>;
12
+ } & import('react').RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
@@ -1,5 +1,4 @@
1
1
  "use client";
2
- import "@ogcio/design-system-react/browser-check";
3
2
  import { jsxs as j, Fragment as v, jsx as a } from "react/jsx-runtime";
4
3
  import { forwardRef as k } from "react";
5
4
  import { c as z } from "../index-CB-zPpNk.js";
@@ -1,10 +1,9 @@
1
1
  "use client";
2
- import "@ogcio/design-system-react/browser-check";
3
2
  import { jsx as A } from "react/jsx-runtime";
4
3
  import { useState as $, Children as b, useEffect as g, isValidElement as m } from "react";
5
4
  import { cn as D } from "../cn.js";
6
5
  import { InternalTabItem as K } from "./tab-item.js";
7
- const z = ({
6
+ const v = ({
8
7
  children: l,
9
8
  tabName: p,
10
9
  appearance: C,
@@ -16,23 +15,23 @@ const z = ({
16
15
  }) => {
17
16
  const [u, f] = $(null), h = b.count(l);
18
17
  g(() => {
19
- let t = !1, r = 0;
20
- b.forEach(l, (e, n) => {
21
- m(e) && "checked" in e.props && e.props.checked === !0 && (r = n, t = !0);
22
- }), f(t ? r : 0);
18
+ let t = !1, e = 0;
19
+ b.forEach(l, (r, n) => {
20
+ m(r) && "checked" in r.props && r.props.checked === !0 && (e = n, t = !0);
21
+ }), f(t ? e : 0);
23
22
  }, []);
24
23
  const w = () => {
25
24
  const t = document.querySelector(`#${p}`);
26
25
  return t || null;
27
26
  }, E = (t) => {
28
- const r = w();
29
- if (!r)
27
+ const e = w();
28
+ if (!e)
30
29
  return;
31
- const e = r.querySelectorAll('[role="tabpanel"]');
32
- for (const i of e)
30
+ const r = e.querySelectorAll('[role="tabpanel"]');
31
+ for (const i of r)
33
32
  i.style.display = "none", i.setAttribute("aria-hidden", "true");
34
33
  const d = [
35
- ...r.querySelectorAll('[role="tab"]')
34
+ ...e.querySelectorAll('[role="tab"]')
36
35
  ].find((i) => {
37
36
  const o = i.dataset.index ?? i.getAttribute("index");
38
37
  if (o !== null)
@@ -43,19 +42,19 @@ const z = ({
43
42
  const a = d.getAttribute("aria-controls");
44
43
  if (!a)
45
44
  return;
46
- const s = r.querySelector(`#${a}`);
45
+ const s = e.querySelector(`#${a}`);
47
46
  s && (s.style.display = "block", s.setAttribute("aria-hidden", "false"));
48
47
  };
49
48
  g(() => {
50
49
  E(u ?? 0);
51
50
  }, [u]);
52
- const k = (t, r) => (e) => {
53
- f(t), r && r(e);
51
+ const k = (t, e) => (r) => {
52
+ f(t), e && e(r);
54
53
  }, P = (t) => {
55
- let r = 0;
56
- if (t.key === "ArrowLeft" ? r = -1 : t.key === "ArrowRight" && (r = 1), r === 0)
54
+ let e = 0;
55
+ if (t.key === "ArrowLeft" ? e = -1 : t.key === "ArrowRight" && (e = 1), e === 0)
57
56
  return;
58
- let n = (u ?? 0) + r;
57
+ let n = (u ?? 0) + e;
59
58
  n < 0 && (n = 0), n >= h && (n = h - 1);
60
59
  const a = b.toArray(l)[n];
61
60
  if (!a)
@@ -73,10 +72,10 @@ const z = ({
73
72
  };
74
73
  k(n, () => {
75
74
  var o, c;
76
- return r === -1 ? (c = (o = a.props) == null ? void 0 : o.onTabClick) == null ? void 0 : c.call(o, t) : t;
75
+ return e === -1 ? (c = (o = a.props) == null ? void 0 : o.onTabClick) == null ? void 0 : c.call(o, t) : t;
77
76
  })(s), t.stopPropagation(), t.preventDefault();
78
- }, q = b.map(l, (t, r) => {
79
- var e;
77
+ }, q = b.map(l, (t, e) => {
78
+ var r;
80
79
  return m(t) ? /* @__PURE__ */ A(
81
80
  K,
82
81
  {
@@ -85,10 +84,10 @@ const z = ({
85
84
  stretch: y,
86
85
  labelAlignment: S,
87
86
  size: x,
88
- index: r,
89
- checked: u === r,
87
+ index: e,
88
+ checked: u === e,
90
89
  onTabKeyDown: P,
91
- onTabClick: k(r, (e = t == null ? void 0 : t.props) == null ? void 0 : e.onTabClick)
90
+ onTabClick: k(e, (r = t == null ? void 0 : t.props) == null ? void 0 : r.onTabClick)
92
91
  }
93
92
  ) : null;
94
93
  });
@@ -109,5 +108,5 @@ const z = ({
109
108
  );
110
109
  };
111
110
  export {
112
- z as TabList
111
+ v as TabList
113
112
  };
package/dist/tag/tag.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { ComponentPropsWithoutRef } from 'react';
1
2
  export declare const TagTypeEnum: {
2
3
  readonly Default: "default";
3
4
  readonly Info: "info";
@@ -7,13 +8,18 @@ export declare const TagTypeEnum: {
7
8
  readonly Counter: "counter";
8
9
  readonly CounterWarning: "counterWarning";
9
10
  };
11
+ export declare const TagSizeEnum: {
12
+ readonly Default: "default";
13
+ readonly Small: "small";
14
+ };
10
15
  export type TagType = (typeof TagTypeEnum)[keyof typeof TagTypeEnum];
16
+ export type TagSize = (typeof TagSizeEnum)[keyof typeof TagSizeEnum];
11
17
  export type TagProps = {
12
18
  text: string;
13
19
  type?: TagType;
14
- dataTestid?: string;
15
- };
20
+ size?: TagSize;
21
+ } & Omit<ComponentPropsWithoutRef<'strong'>, 'children'>;
16
22
  export declare const Tag: {
17
- ({ text, type, dataTestid, }: TagProps): import("react/jsx-runtime").JSX.Element;
23
+ ({ text, type, size, className, ...props }: TagProps): import("react/jsx-runtime").JSX.Element;
18
24
  displayName: string;
19
25
  };
package/dist/tag/tag.js CHANGED
@@ -1,5 +1,6 @@
1
- import { jsx as g } from "react/jsx-runtime";
2
- const n = {
1
+ import { jsx as i } from "react/jsx-runtime";
2
+ import { c as o } from "../clsx-OuTLNxxd.js";
3
+ const a = {
3
4
  Default: "default",
4
5
  Info: "info",
5
6
  Success: "success",
@@ -7,21 +8,37 @@ const n = {
7
8
  Error: "error",
8
9
  Counter: "counter",
9
10
  CounterWarning: "counterWarning"
10
- }, e = {
11
- [n.Default]: "gi-tag-default",
12
- [n.Info]: "gi-tag-info",
13
- [n.Success]: "gi-tag-success",
14
- [n.Warning]: "gi-tag-warning",
15
- [n.Error]: "gi-tag-error",
16
- [n.Counter]: "gi-tag-counter",
17
- [n.CounterWarning]: "gi-tag-counter-warning"
18
- }, o = ({
19
- text: r,
20
- type: a = n.Default,
21
- dataTestid: t
22
- }) => /* @__PURE__ */ g("strong", { className: `gi-tag ${e[a]}`, "data-testid": t, children: r });
23
- o.displayName = "Tag";
11
+ }, t = {
12
+ Default: "default",
13
+ Small: "small"
14
+ }, l = {
15
+ [a.Default]: "gi-tag-default",
16
+ [a.Info]: "gi-tag-info",
17
+ [a.Success]: "gi-tag-success",
18
+ [a.Warning]: "gi-tag-warning",
19
+ [a.Error]: "gi-tag-error",
20
+ [a.Counter]: "gi-tag-counter",
21
+ [a.CounterWarning]: "gi-tag-counter-warning"
22
+ }, u = {
23
+ [t.Default]: "gi-tag-size-default",
24
+ [t.Small]: "gi-tag-size-small"
25
+ }, c = ({
26
+ text: n,
27
+ type: g = a.Default,
28
+ size: r = t.Default,
29
+ className: e,
30
+ ...s
31
+ }) => /* @__PURE__ */ i(
32
+ "strong",
33
+ {
34
+ ...s,
35
+ className: o("gi-tag", l[g], u[r], e),
36
+ children: n
37
+ }
38
+ );
39
+ c.displayName = "Tag";
24
40
  export {
25
- o as Tag,
26
- n as TagTypeEnum
41
+ c as Tag,
42
+ t as TagSizeEnum,
43
+ a as TagTypeEnum
27
44
  };
@@ -1,5 +1,4 @@
1
1
  "use client";
2
- import "@ogcio/design-system-react/browser-check";
3
2
  import { InputText as t } from "../input-text/input-text.js";
4
3
  const e = t;
5
4
  e.displayName = "TextInput";
@@ -1,5 +1,4 @@
1
1
  "use client";
2
- import "@ogcio/design-system-react/browser-check";
3
2
  import { jsxs as g, Fragment as j, jsx as e } from "react/jsx-runtime";
4
3
  import { forwardRef as z, useRef as A, useState as v, useImperativeHandle as H, useEffect as O } from "react";
5
4
  import { cn as h } from "../cn.js";
@@ -15,31 +14,31 @@ const q = z(
15
14
  autoComplete: b = "on",
16
15
  maxChars: t,
17
16
  halfFluid: N = !1,
18
- iconStart: n,
17
+ iconStart: i,
19
18
  className: R,
20
19
  clearButtonEnabled: u,
21
20
  onChange: a,
22
21
  name: r,
23
22
  ...l
24
23
  }, V) => {
25
- const i = A(null), [m, I] = v(
24
+ const n = A(null), [f, I] = v(
26
25
  t
27
26
  );
28
- H(V, () => i.current);
29
- const [T, f] = v(""), s = d !== void 0, c = s ? String(d) : T;
27
+ H(V, () => n.current);
28
+ const [T, m] = v(""), s = d !== void 0, c = s ? String(d) : T;
30
29
  O(() => {
31
30
  t !== void 0 && I(t - c.length);
32
31
  }, [c, t]);
33
32
  const k = (o) => {
34
33
  const y = o.target.value;
35
- s || f(y), a && a(o);
34
+ s || m(y), a && a(o);
36
35
  }, w = () => {
37
- i.current && (s || f(""), a && a({
36
+ n.current && (s || m(""), a && a({
38
37
  target: { name: r, value: "" },
39
38
  currentTarget: { name: r, value: "" },
40
39
  type: "change",
41
40
  bubbles: !0
42
- }), i.current.focus());
41
+ }), n.current.focus());
43
42
  };
44
43
  return /* @__PURE__ */ g(j, { children: [
45
44
  /* @__PURE__ */ e("div", { className: "gi-textarea-container", children: /* @__PURE__ */ g(
@@ -49,7 +48,7 @@ const q = z(
49
48
  "gi-input-half-width": N
50
49
  }),
51
50
  children: [
52
- n && /* @__PURE__ */ e("div", { className: "gi-text-area-icon-start", children: /* @__PURE__ */ e(Y, { icon: n, size: "md", disabled: l.disabled }) }),
51
+ i && /* @__PURE__ */ e("div", { className: "gi-text-area-icon-start", children: /* @__PURE__ */ e(Y, { icon: i, size: "md", disabled: l.disabled }) }),
53
52
  /* @__PURE__ */ e(
54
53
  "textarea",
55
54
  {
@@ -58,8 +57,8 @@ const q = z(
58
57
  cols: x,
59
58
  autoComplete: b,
60
59
  className: h(R, "gi-textarea"),
61
- ref: i,
62
- "data-icon-start": !!n,
60
+ ref: n,
61
+ "data-icon-start": !!i,
63
62
  "data-clear-enabled": u,
64
63
  maxLength: t,
65
64
  value: c,
@@ -88,8 +87,8 @@ const q = z(
88
87
  F,
89
88
  {
90
89
  text: L("textarea.remainingChars", {
91
- remainingChars: m,
92
- defaultValue: `You have ${m} characters remaining`
90
+ remainingChars: f,
91
+ defaultValue: `You have ${f} characters remaining`
93
92
  })
94
93
  }
95
94
  ) })
@@ -1,6 +1,5 @@
1
1
  "use client";
2
- import "@ogcio/design-system-react/browser-check";
3
- import { jsxs as n, jsx as i } from "react/jsx-runtime";
2
+ import { jsxs as t, jsx as i } from "react/jsx-runtime";
4
3
  import { c as u } from "../index-CB-zPpNk.js";
5
4
  import { Icon as p } from "../icon/icon.js";
6
5
  import { IconButton as v } from "../icon-button/icon-button.js";
@@ -58,7 +57,7 @@ const N = u({
58
57
  }
59
58
  return s;
60
59
  };
61
- function B({
60
+ function y({
62
61
  title: e,
63
62
  description: s,
64
63
  action: a,
@@ -66,12 +65,12 @@ function B({
66
65
  showIcon: l = !0,
67
66
  dismissible: o,
68
67
  onClose: c,
69
- slotAction: t
68
+ slotAction: n
70
69
  }) {
71
- const { base: m, heading: g, container: b, innerContainer: d, dismiss: f, baseDismissible: h } = N({
70
+ const { base: g, heading: m, container: b, innerContainer: d, dismiss: f, baseDismissible: h } = N({
72
71
  variant: r
73
72
  });
74
- return /* @__PURE__ */ n("div", { className: (o ? h : m)(), children: [
73
+ return /* @__PURE__ */ t("div", { className: (o ? h : g)(), children: [
75
74
  l ? /* @__PURE__ */ i(
76
75
  p,
77
76
  {
@@ -80,9 +79,9 @@ function B({
80
79
  "data-variant": r
81
80
  }
82
81
  ) : null,
83
- /* @__PURE__ */ n("div", { className: b(), children: [
84
- /* @__PURE__ */ n("div", { className: d(), children: [
85
- /* @__PURE__ */ i("p", { className: g(), children: e }),
82
+ /* @__PURE__ */ t("div", { className: b(), children: [
83
+ /* @__PURE__ */ t("div", { className: d(), children: [
84
+ /* @__PURE__ */ i("p", { className: m(), children: e }),
86
85
  o && /* @__PURE__ */ i("div", { className: f(), children: /* @__PURE__ */ i(
87
86
  v,
88
87
  {
@@ -96,11 +95,11 @@ function B({
96
95
  ) })
97
96
  ] }),
98
97
  /* @__PURE__ */ i(k, { ariaLabel: s, children: s }),
99
- (a || t) && /* @__PURE__ */ i("div", { className: "gi-toast-action", children: /* @__PURE__ */ i(w, { href: a == null ? void 0 : a.href, noColor: !0, size: "md", asChild: !!t, children: t || (a == null ? void 0 : a.label) }) })
98
+ (a || n) && /* @__PURE__ */ i("div", { className: "gi-toast-action", children: /* @__PURE__ */ i(w, { href: a == null ? void 0 : a.href, noColor: !0, size: "md", asChild: !!n, children: n || (a == null ? void 0 : a.label) }) })
100
99
  ] })
101
100
  ] });
102
101
  }
103
102
  export {
104
- B as Toast,
103
+ y as Toast,
105
104
  N as toastVariants
106
105
  };