@ogcio/design-system-react 1.22.0 → 1.23.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 (94) hide show
  1. package/dist/_commonjsHelpers-DaMA6jEr.js +8 -0
  2. package/dist/accordion/accordion-item.js +14 -15
  3. package/dist/alert/alert.js +19 -20
  4. package/dist/autocomplete/autocomplete.js +167 -169
  5. package/dist/autocomplete/use-autocomplete-controller.js +1 -1
  6. package/dist/browser-support/runtime.js +2 -3
  7. package/dist/button/button.js +11 -12
  8. package/dist/button-group/button-group.js +4 -5
  9. package/dist/card/card-next.js +122 -125
  10. package/dist/card/card.js +4 -5
  11. package/dist/checkbox/checkbox-group.js +3 -4
  12. package/dist/checkbox/checkbox.js +4 -5
  13. package/dist/chip/chip.js +11 -12
  14. package/dist/combo-box/dropdown-item.js +2 -3
  15. package/dist/cookie-banner/cookie-banner.js +6 -7
  16. package/dist/data-table/data-table-header.d.ts +0 -1
  17. package/dist/data-table/data-table-header.js +43 -60
  18. package/dist/data-table/editable-table-cell.js +3 -4
  19. package/dist/data-table/index.d.ts +7 -0
  20. package/dist/data-table/index.js +20 -0
  21. package/dist/data-table/tanstack/tanstack-helpers.d.ts +1 -0
  22. package/dist/data-table/tanstack/tanstack-helpers.js +31 -30
  23. package/dist/details/details.js +6 -7
  24. package/dist/drawer/drawer.js +18 -19
  25. package/dist/footer/footer.js +2 -3
  26. package/dist/forms/form-field/form-field.js +2 -3
  27. package/dist/header/components/header-menu.js +17 -18
  28. package/dist/header/header-legacy.js +2 -3
  29. package/dist/header/header-next/components/header-logo.js +3 -4
  30. package/dist/header/header-next/components/header-title.js +0 -1
  31. package/dist/header/header-next/components/menu/components/header-menu-item-button.js +4 -5
  32. package/dist/header/header-next/components/menu/components/header-menu-item-link.js +0 -1
  33. package/dist/header/header-next/components/menu/components/header-menu-item-separator.js +4 -5
  34. package/dist/header/header-next/components/menu/components/header-menu-item-slot.js +0 -1
  35. package/dist/header/header-next/components/menu/header-menu-context.js +9 -10
  36. package/dist/header/header-next/components/menu/header-primary-menu.js +4 -5
  37. package/dist/header/header-next/components/menu/header-secondary-menu.js +0 -1
  38. package/dist/header/header-next/header-context.js +4 -5
  39. package/dist/header/header-next/header-next.js +2 -3
  40. package/dist/hooks/use-breakpoint.js +7 -8
  41. package/dist/hooks/use-toggle-map.js +12 -13
  42. package/dist/i18n/config.d.ts +1 -1
  43. package/dist/i18n/config.js +14 -11
  44. package/dist/i18n/utility.js +1 -1
  45. package/dist/i18nInstance-D_96ADqd.js +48 -0
  46. package/dist/i18next-B_GQfCrJ.js +1362 -0
  47. package/dist/icon/icon.js +2 -3
  48. package/dist/icon-button/icon-button.js +4 -5
  49. package/dist/index.d.ts +1 -4
  50. package/dist/index.js +231 -220
  51. package/dist/input-checkbox/input-checkbox.js +36 -37
  52. package/dist/input-checkbox-group/input-checkbox-group.js +9 -10
  53. package/dist/input-password/input-password.js +0 -1
  54. package/dist/input-radio/input-radio.js +31 -34
  55. package/dist/input-radio-group/input-radio-group.js +8 -9
  56. package/dist/input-text/input-text.js +2 -3
  57. package/dist/{lodash-D1c5hFAM.js → lodash-LsP9-6SV.js} +1343 -1342
  58. package/dist/modal/modal.js +4 -5
  59. package/dist/pagination/pagination.js +713 -58
  60. package/dist/phase-banner/phase-banner.js +2 -3
  61. package/dist/popover/popover.js +2 -3
  62. package/dist/radio/radio-group.js +0 -1
  63. package/dist/radio/radio.js +0 -1
  64. package/dist/score-select/score-select.js +3 -4
  65. package/dist/select/select-menu.js +43 -41
  66. package/dist/select/select-next.js +190 -161
  67. package/dist/select/select.js +3 -4
  68. package/dist/side-nav/side-nav.js +9 -10
  69. package/dist/spinner/spinner.js +2 -3
  70. package/dist/stack/stack.js +20 -21
  71. package/dist/styles.css +1 -1
  72. package/dist/summary-list/summary-list-action.js +6 -7
  73. package/dist/summary-list/summary-list-context.js +4 -5
  74. package/dist/summary-list/summary-list-header.js +12 -13
  75. package/dist/summary-list/summary-list-row.js +17 -18
  76. package/dist/summary-list/summary-list-value.js +0 -1
  77. package/dist/summary-list/summary-list.js +4 -5
  78. package/dist/table/table-data.js +11 -12
  79. package/dist/table/table-header.js +2 -3
  80. package/dist/tabs/tab-item.d.ts +3 -2
  81. package/dist/tabs/tab-item.js +89 -67
  82. package/dist/tabs/tab-list.js +81 -66
  83. package/dist/tabs/tabs.d.ts +1 -1
  84. package/dist/tabs/tabs.js +12 -12
  85. package/dist/tabs/types.d.ts +9 -2
  86. package/dist/text-input/text-input.js +0 -1
  87. package/dist/textarea/textarea.js +12 -13
  88. package/dist/toast/ds-toast.js +10 -11
  89. package/dist/toast/toast.js +15 -16
  90. package/dist/tooltip/tooltip.js +12 -13
  91. package/dist/utilities.d.ts +4 -1
  92. package/dist/utilities.js +29 -16
  93. package/package.json +7 -6
  94. 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
  };
@@ -2,10 +2,11 @@ import { FC } from 'react';
2
2
  import { TabItemProps } from './types.js';
3
3
  export declare const TabItem: FC<TabItemProps>;
4
4
  export declare const InternalTabItem: import('react').ForwardRefExoticComponent<TabItemProps & {
5
- onTabKeyDown?: (event: React.KeyboardEvent<HTMLButtonElement>) => void;
5
+ onTabKeyDown?: (event: import('./types.js').TabKeyboardEvent) => void;
6
6
  index: number;
7
7
  appearance?: "default" | "dark";
8
8
  size?: "md" | "sm";
9
9
  stretch?: boolean;
10
10
  labelAlignment?: "center" | "end" | "start";
11
- } & import('react').RefAttributes<HTMLButtonElement>>;
11
+ className?: string;
12
+ } & import('react').RefAttributes<HTMLButtonElement | HTMLAnchorElement>>;
@@ -1,12 +1,12 @@
1
1
  "use client";
2
- import "@ogcio/design-system-react/browser-check";
3
- import { jsx as i, jsxs as I, Fragment as N } from "react/jsx-runtime";
4
- import { forwardRef as v, useRef as d, useEffect as R } from "react";
5
- import { c as j } from "../index-CB-zPpNk.js";
6
- import { cn as z } from "../cn.js";
7
- import { Button as B } from "../primitives/button.js";
8
- import { slugify as T } from "../utilities.js";
9
- const V = j({
2
+ import { jsxs as j, Fragment as v, jsx as a } from "react/jsx-runtime";
3
+ import { forwardRef as k } from "react";
4
+ import { c as z } from "../index-CB-zPpNk.js";
5
+ import { cn as s } from "../cn.js";
6
+ import { Icon as A } from "../icon/icon.js";
7
+ import { Button as V } from "../primitives/button.js";
8
+ import { slugify as $ } from "../utilities.js";
9
+ const B = z({
10
10
  base: "gi-tab-item",
11
11
  variants: {
12
12
  size: {
@@ -20,71 +20,93 @@ const V = j({
20
20
  true: "gi-flex-1"
21
21
  },
22
22
  labelAlignment: {
23
- start: "gi-text-start",
24
- center: "gi-text-center",
25
- end: "gi-text-end"
23
+ start: "gi-justify-start",
24
+ center: "gi-justify-center",
25
+ end: "gi-justify-end"
26
26
  }
27
27
  },
28
28
  defaultVariants: {
29
29
  size: "md"
30
30
  }
31
- }), $ = () => null, w = v(
32
- ({
33
- value: g,
34
- href: s,
35
- checked: e = !1,
36
- children: n,
37
- onTabClick: o,
38
- onTabKeyDown: l,
39
- size: b = "md",
40
- appearance: m = "default",
41
- labelAlignment: p = "center",
42
- stretch: x,
43
- ...y
44
- }, r) => {
45
- const c = T(g), a = d(null), u = d(!1);
46
- return R(() => {
47
- var t;
48
- e && !u.current && ((t = a.current) == null || t.click());
49
- }, [e]), /* @__PURE__ */ i(
50
- B,
31
+ }), F = () => null, R = k((b, n) => {
32
+ const {
33
+ value: h,
34
+ href: c,
35
+ checked: r = !1,
36
+ children: x,
37
+ onTabClick: t,
38
+ onTabKeyDown: i,
39
+ size: y = "md",
40
+ appearance: l = "default",
41
+ labelAlignment: I = "center",
42
+ stretch: N,
43
+ icon: m,
44
+ className: o,
45
+ ...d
46
+ } = b, g = $(h), f = {
47
+ role: "tab",
48
+ "aria-selected": r,
49
+ "aria-controls": `tab-panel-${g}`,
50
+ id: `tab-${g}`,
51
+ tabIndex: r ? 0 : -1
52
+ }, u = B({ size: y, checked: r, stretch: N, labelAlignment: I }), p = /* @__PURE__ */ j(v, { children: [
53
+ m && /* @__PURE__ */ a(A, { icon: m }),
54
+ x,
55
+ /* @__PURE__ */ a(
56
+ "div",
51
57
  {
52
- id: `tab-${c}`,
53
- ref: (t) => {
54
- a.current = t, typeof r == "function" ? r(t) : r && (r.current = t);
55
- },
56
- ...y,
57
- role: "tab",
58
- "aria-roledescription": "tab",
59
- "aria-selected": e ? "true" : "false",
60
- "aria-controls": `tab-panel-${c}`,
61
- className: V({ size: b, checked: e, stretch: x, labelAlignment: p }),
62
- onClick: (t) => {
63
- var f;
64
- u.current = !0, o && o(t), (f = a.current) == null || f.blur();
65
- },
66
- onKeyDown: (t) => {
67
- l && l(t);
68
- },
69
- children: s ? /* @__PURE__ */ i("a", { href: s, className: "gi-decoration-xs", children: n }) : /* @__PURE__ */ I(N, { children: [
70
- n,
71
- /* @__PURE__ */ i(
72
- "div",
73
- {
74
- className: z("gi-tab-item-border", {
75
- "gi-bg-color-text-system-neutral-interactive-default": e && m === "dark",
76
- "gi-bg-color-border-tone-primary-accent-selected": e && m === "default"
77
- })
78
- }
79
- )
80
- ] })
58
+ className: s("gi-tab-item-border", {
59
+ "gi-bg-color-text-system-neutral-interactive-default": r && l === "dark",
60
+ "gi-bg-color-border-tone-primary-accent-selected": r && l === "default"
61
+ }),
62
+ "aria-hidden": "true"
81
63
  }
82
- );
83
- }
84
- );
85
- w.displayName = "InternalTabItem";
86
- $.displayName = "TabItem";
64
+ )
65
+ ] });
66
+ return c ? /* @__PURE__ */ a(
67
+ "a",
68
+ {
69
+ href: c,
70
+ ...f,
71
+ ...d,
72
+ className: s(
73
+ u,
74
+ "gi-inline-flex gi-items-center gi-gap-2 gi-decoration-xs",
75
+ o
76
+ ),
77
+ onClick: (e) => {
78
+ t == null || t(e);
79
+ },
80
+ onKeyDown: (e) => {
81
+ i == null || i(e);
82
+ },
83
+ ref: n,
84
+ children: p
85
+ }
86
+ ) : /* @__PURE__ */ a(
87
+ V,
88
+ {
89
+ ...f,
90
+ ...d,
91
+ ref: n,
92
+ className: s(
93
+ u,
94
+ "gi-inline-flex gi-items-center gi-gap-2",
95
+ o
96
+ ),
97
+ onClick: (e) => {
98
+ t == null || t(e);
99
+ },
100
+ onKeyDown: (e) => {
101
+ i == null || i(e);
102
+ },
103
+ children: p
104
+ }
105
+ );
106
+ });
107
+ R.displayName = "InternalTabItem";
108
+ F.displayName = "TabItem";
87
109
  export {
88
- w as InternalTabItem,
89
- $ as TabItem
110
+ R as InternalTabItem,
111
+ F as TabItem
90
112
  };