@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.
- package/dist/_commonjsHelpers-DaMA6jEr.js +8 -0
- package/dist/accordion/accordion-item.d.ts +3 -5
- package/dist/accordion/accordion-item.js +32 -28
- package/dist/accordion/accordion.d.ts +3 -5
- package/dist/accordion/accordion.js +22 -33
- 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/clsx-OuTLNxxd.js +16 -0
- package/dist/cn.js +4 -16
- package/dist/combo-box/dropdown-item.js +2 -3
- package/dist/cookie-banner/cookie-banner.js +6 -7
- 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/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.d.ts +16 -4
- package/dist/icon/icon.js +79 -167
- package/dist/icon-button/icon-button.js +4 -5
- package/dist/index.d.ts +2 -5
- package/dist/index.js +231 -220
- package/dist/input-checkbox/input-checkbox.js +15 -16
- 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 +11 -12
- 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 +193 -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 +1 -1
- package/dist/tabs/tab-item.js +0 -1
- package/dist/tabs/tab-list.js +23 -24
- package/dist/tag/tag.d.ts +9 -3
- package/dist/tag/tag.js +35 -18
- 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 +6 -5
- 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
|
@@ -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<
|
|
12
|
+
} & import('react').RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
package/dist/tabs/tab-item.js
CHANGED
package/dist/tabs/tab-list.js
CHANGED
|
@@ -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
|
|
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,
|
|
20
|
-
b.forEach(l, (
|
|
21
|
-
m(
|
|
22
|
-
}), f(t ?
|
|
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
|
|
29
|
-
if (!
|
|
27
|
+
const e = w();
|
|
28
|
+
if (!e)
|
|
30
29
|
return;
|
|
31
|
-
const
|
|
32
|
-
for (const i of
|
|
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
|
-
...
|
|
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 =
|
|
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,
|
|
53
|
-
f(t),
|
|
51
|
+
const k = (t, e) => (r) => {
|
|
52
|
+
f(t), e && e(r);
|
|
54
53
|
}, P = (t) => {
|
|
55
|
-
let
|
|
56
|
-
if (t.key === "ArrowLeft" ?
|
|
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) +
|
|
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
|
|
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,
|
|
79
|
-
var
|
|
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:
|
|
89
|
-
checked: u ===
|
|
87
|
+
index: e,
|
|
88
|
+
checked: u === e,
|
|
90
89
|
onTabKeyDown: P,
|
|
91
|
-
onTabClick: k(
|
|
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
|
-
|
|
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
|
-
|
|
15
|
-
}
|
|
20
|
+
size?: TagSize;
|
|
21
|
+
} & Omit<ComponentPropsWithoutRef<'strong'>, 'children'>;
|
|
16
22
|
export declare const Tag: {
|
|
17
|
-
({ text, type,
|
|
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
|
|
2
|
-
|
|
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
|
-
},
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
[
|
|
15
|
-
[
|
|
16
|
-
[
|
|
17
|
-
[
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
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
|
-
|
|
26
|
-
|
|
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 { 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:
|
|
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
|
|
24
|
+
const n = A(null), [f, I] = v(
|
|
26
25
|
t
|
|
27
26
|
);
|
|
28
|
-
H(V, () =>
|
|
29
|
-
const [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 ||
|
|
34
|
+
s || m(y), a && a(o);
|
|
36
35
|
}, w = () => {
|
|
37
|
-
|
|
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
|
-
}),
|
|
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
|
-
|
|
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:
|
|
62
|
-
"data-icon-start": !!
|
|
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:
|
|
92
|
-
defaultValue: `You have ${
|
|
90
|
+
remainingChars: f,
|
|
91
|
+
defaultValue: `You have ${f} characters remaining`
|
|
93
92
|
})
|
|
94
93
|
}
|
|
95
94
|
) })
|
package/dist/toast/ds-toast.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import "
|
|
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
|
|
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:
|
|
68
|
+
slotAction: n
|
|
70
69
|
}) {
|
|
71
|
-
const { base:
|
|
70
|
+
const { base: g, heading: m, container: b, innerContainer: d, dismiss: f, baseDismissible: h } = N({
|
|
72
71
|
variant: r
|
|
73
72
|
});
|
|
74
|
-
return /* @__PURE__ */
|
|
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__ */
|
|
84
|
-
/* @__PURE__ */
|
|
85
|
-
/* @__PURE__ */ i("p", { className:
|
|
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 ||
|
|
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
|
-
|
|
103
|
+
y as Toast,
|
|
105
104
|
N as toastVariants
|
|
106
105
|
};
|