@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.
- package/dist/_commonjsHelpers-DaMA6jEr.js +8 -0
- package/dist/accordion/accordion-item.js +14 -15
- package/dist/alert/alert.js +19 -20
- package/dist/autocomplete/autocomplete.js +167 -169
- package/dist/autocomplete/use-autocomplete-controller.js +1 -1
- package/dist/browser-support/runtime.js +2 -3
- package/dist/button/button.js +11 -12
- package/dist/button-group/button-group.js +4 -5
- package/dist/card/card-next.js +122 -125
- package/dist/card/card.js +4 -5
- package/dist/checkbox/checkbox-group.js +3 -4
- package/dist/checkbox/checkbox.js +4 -5
- package/dist/chip/chip.js +11 -12
- package/dist/combo-box/dropdown-item.js +2 -3
- package/dist/cookie-banner/cookie-banner.js +6 -7
- package/dist/data-table/data-table-header.d.ts +0 -1
- package/dist/data-table/data-table-header.js +43 -60
- package/dist/data-table/editable-table-cell.js +3 -4
- package/dist/data-table/index.d.ts +7 -0
- package/dist/data-table/index.js +20 -0
- package/dist/data-table/tanstack/tanstack-helpers.d.ts +1 -0
- package/dist/data-table/tanstack/tanstack-helpers.js +31 -30
- package/dist/details/details.js +6 -7
- package/dist/drawer/drawer.js +18 -19
- package/dist/footer/footer.js +2 -3
- package/dist/forms/form-field/form-field.js +2 -3
- package/dist/header/components/header-menu.js +17 -18
- package/dist/header/header-legacy.js +2 -3
- package/dist/header/header-next/components/header-logo.js +3 -4
- package/dist/header/header-next/components/header-title.js +0 -1
- package/dist/header/header-next/components/menu/components/header-menu-item-button.js +4 -5
- package/dist/header/header-next/components/menu/components/header-menu-item-link.js +0 -1
- package/dist/header/header-next/components/menu/components/header-menu-item-separator.js +4 -5
- package/dist/header/header-next/components/menu/components/header-menu-item-slot.js +0 -1
- package/dist/header/header-next/components/menu/header-menu-context.js +9 -10
- package/dist/header/header-next/components/menu/header-primary-menu.js +4 -5
- package/dist/header/header-next/components/menu/header-secondary-menu.js +0 -1
- package/dist/header/header-next/header-context.js +4 -5
- package/dist/header/header-next/header-next.js +2 -3
- package/dist/hooks/use-breakpoint.js +7 -8
- package/dist/hooks/use-toggle-map.js +12 -13
- package/dist/i18n/config.d.ts +1 -1
- package/dist/i18n/config.js +14 -11
- package/dist/i18n/utility.js +1 -1
- package/dist/i18nInstance-D_96ADqd.js +48 -0
- package/dist/i18next-B_GQfCrJ.js +1362 -0
- package/dist/icon/icon.js +2 -3
- package/dist/icon-button/icon-button.js +4 -5
- package/dist/index.d.ts +1 -4
- package/dist/index.js +231 -220
- package/dist/input-checkbox/input-checkbox.js +36 -37
- package/dist/input-checkbox-group/input-checkbox-group.js +9 -10
- package/dist/input-password/input-password.js +0 -1
- package/dist/input-radio/input-radio.js +31 -34
- package/dist/input-radio-group/input-radio-group.js +8 -9
- package/dist/input-text/input-text.js +2 -3
- package/dist/{lodash-D1c5hFAM.js → lodash-LsP9-6SV.js} +1343 -1342
- package/dist/modal/modal.js +4 -5
- package/dist/pagination/pagination.js +713 -58
- package/dist/phase-banner/phase-banner.js +2 -3
- package/dist/popover/popover.js +2 -3
- package/dist/radio/radio-group.js +0 -1
- package/dist/radio/radio.js +0 -1
- package/dist/score-select/score-select.js +3 -4
- package/dist/select/select-menu.js +43 -41
- package/dist/select/select-next.js +190 -161
- package/dist/select/select.js +3 -4
- package/dist/side-nav/side-nav.js +9 -10
- package/dist/spinner/spinner.js +2 -3
- package/dist/stack/stack.js +20 -21
- package/dist/styles.css +1 -1
- package/dist/summary-list/summary-list-action.js +6 -7
- package/dist/summary-list/summary-list-context.js +4 -5
- package/dist/summary-list/summary-list-header.js +12 -13
- package/dist/summary-list/summary-list-row.js +17 -18
- package/dist/summary-list/summary-list-value.js +0 -1
- package/dist/summary-list/summary-list.js +4 -5
- package/dist/table/table-data.js +11 -12
- package/dist/table/table-header.js +2 -3
- package/dist/tabs/tab-item.d.ts +3 -2
- package/dist/tabs/tab-item.js +89 -67
- package/dist/tabs/tab-list.js +81 -66
- package/dist/tabs/tabs.d.ts +1 -1
- package/dist/tabs/tabs.js +12 -12
- package/dist/tabs/types.d.ts +9 -2
- package/dist/text-input/text-input.js +0 -1
- package/dist/textarea/textarea.js +12 -13
- package/dist/toast/ds-toast.js +10 -11
- package/dist/toast/toast.js +15 -16
- package/dist/tooltip/tooltip.js +12 -13
- package/dist/utilities.d.ts +4 -1
- package/dist/utilities.js +29 -16
- package/package.json +7 -6
- 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
|
|
7
|
-
children:
|
|
5
|
+
const e = ({
|
|
6
|
+
children: t,
|
|
8
7
|
...m
|
|
9
|
-
}) => (o(), /* @__PURE__ */ r(i, { ...m, children:
|
|
10
|
-
|
|
11
|
-
Object.defineProperty(
|
|
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
|
-
|
|
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
|
|
5
|
+
function m({ children: t }) {
|
|
7
6
|
return /* @__PURE__ */ e(r.Provider, { value: !0, children: t });
|
|
8
7
|
}
|
|
9
|
-
function
|
|
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
|
-
|
|
19
|
-
|
|
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
|
|
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
|
-
(
|
|
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:
|
|
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:
|
|
30
|
-
i ? /* @__PURE__ */ l("div", { className:
|
|
31
|
-
/* @__PURE__ */ e("span", { className:
|
|
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((
|
|
34
|
+
/* @__PURE__ */ e(f, { id: o, children: t.map((r, a) => /* @__PURE__ */ e(
|
|
36
35
|
"span",
|
|
37
36
|
{
|
|
38
|
-
className:
|
|
39
|
-
children:
|
|
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((
|
|
48
|
+
/* @__PURE__ */ e(f, { id: o, children: t.map((r, a) => /* @__PURE__ */ e(
|
|
50
49
|
"span",
|
|
51
50
|
{
|
|
52
|
-
className:
|
|
53
|
-
children:
|
|
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 "
|
|
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
|
|
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:
|
|
12
|
-
label:
|
|
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(
|
|
19
|
-
(
|
|
17
|
+
const n = g.toArray(l), m = n.filter(
|
|
18
|
+
(a) => p(a) === "SummaryListAction"
|
|
20
19
|
), o = n.find(
|
|
21
|
-
(
|
|
20
|
+
(a) => p(a) === "SummaryListValue"
|
|
22
21
|
), r = L(), c = `${r}-value`, d = `${r}-actions`;
|
|
23
|
-
return /* @__PURE__ */
|
|
22
|
+
return /* @__PURE__ */ s(
|
|
24
23
|
"tr",
|
|
25
24
|
{
|
|
26
25
|
...S,
|
|
27
|
-
className:
|
|
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:
|
|
35
|
-
o ? /* @__PURE__ */
|
|
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((
|
|
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:
|
|
43
|
-
children:
|
|
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:
|
|
51
|
-
/* @__PURE__ */ e("span", { id:
|
|
52
|
-
|
|
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,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
|
|
4
|
+
import { cn as y } from "../cn.js";
|
|
6
5
|
import { getSpecialComponentType as o } from "../utilities.js";
|
|
7
|
-
import { SummaryListProvider as
|
|
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(
|
|
18
|
+
return /* @__PURE__ */ r(p, { children: /* @__PURE__ */ r(
|
|
20
19
|
"div",
|
|
21
20
|
{
|
|
22
|
-
className:
|
|
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: [
|
package/dist/table/table-data.js
CHANGED
|
@@ -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
|
|
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
|
|
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],
|
|
25
|
-
return
|
|
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
|
-
|
|
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 }),
|
|
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
|
|
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
|
-
|
|
83
|
-
|
|
84
|
-
|
|
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
|
|
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
|
-
|
|
76
|
+
_ as TableHeader
|
|
78
77
|
};
|
package/dist/tabs/tab-item.d.ts
CHANGED
|
@@ -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:
|
|
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
|
-
|
|
11
|
+
className?: string;
|
|
12
|
+
} & import('react').RefAttributes<HTMLButtonElement | HTMLAnchorElement>>;
|
package/dist/tabs/tab-item.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import "
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { Button as
|
|
8
|
-
import { slugify as
|
|
9
|
-
const
|
|
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-
|
|
24
|
-
center: "gi-
|
|
25
|
-
end: "gi-
|
|
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
|
-
}),
|
|
32
|
-
|
|
33
|
-
value:
|
|
34
|
-
href:
|
|
35
|
-
checked:
|
|
36
|
-
children:
|
|
37
|
-
onTabClick:
|
|
38
|
-
onTabKeyDown:
|
|
39
|
-
size:
|
|
40
|
-
appearance:
|
|
41
|
-
labelAlignment:
|
|
42
|
-
stretch:
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}
|
|
50
|
-
|
|
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
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
},
|
|
56
|
-
|
|
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
|
-
|
|
86
|
-
|
|
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
|
-
|
|
89
|
-
|
|
110
|
+
R as InternalTabItem,
|
|
111
|
+
F as TabItem
|
|
90
112
|
};
|