@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,79 +1,78 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import "
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { Input as
|
|
8
|
-
import { InputCheckboxSizeEnum as
|
|
2
|
+
import { jsxs as a, Fragment as g, jsx as t } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef as k, useId as f } from "react";
|
|
4
|
+
import { cn as m } from "../cn.js";
|
|
5
|
+
import { HintText as C } from "../hint-text/hint-text.js";
|
|
6
|
+
import { Label as I } from "../label/label.js";
|
|
7
|
+
import { Input as v } from "../primitives/input.js";
|
|
8
|
+
import { InputCheckboxSizeEnum as l } from "./types.js";
|
|
9
9
|
const N = (e) => {
|
|
10
10
|
switch (e) {
|
|
11
|
-
case
|
|
11
|
+
case l.Small:
|
|
12
12
|
return "gi-input-checkbox-small";
|
|
13
13
|
default:
|
|
14
14
|
return "gi-input-checkbox-medium";
|
|
15
15
|
}
|
|
16
|
-
},
|
|
16
|
+
}, S = (e) => e === l.Small ? "gi-w-6" : "gi-w-8", d = k(
|
|
17
17
|
({
|
|
18
18
|
id: e,
|
|
19
|
-
size:
|
|
19
|
+
size: i = l.Medium,
|
|
20
20
|
label: b,
|
|
21
21
|
children: r,
|
|
22
|
-
hint:
|
|
22
|
+
hint: s,
|
|
23
23
|
indeterminate: h = !1,
|
|
24
24
|
containerProps: p,
|
|
25
25
|
...u
|
|
26
26
|
}, x) => {
|
|
27
|
-
const
|
|
28
|
-
return /* @__PURE__ */
|
|
29
|
-
/* @__PURE__ */
|
|
27
|
+
const c = e || f(), n = !!r, o = r ?? b;
|
|
28
|
+
return /* @__PURE__ */ a(g, { children: [
|
|
29
|
+
/* @__PURE__ */ a(
|
|
30
30
|
"div",
|
|
31
31
|
{
|
|
32
|
-
className:
|
|
33
|
-
"!gi-items-start":
|
|
32
|
+
className: m("gi-input-checkbox-container", {
|
|
33
|
+
"!gi-items-start": n
|
|
34
34
|
}),
|
|
35
35
|
...p,
|
|
36
36
|
children: [
|
|
37
37
|
/* @__PURE__ */ t(
|
|
38
|
-
|
|
38
|
+
v,
|
|
39
39
|
{
|
|
40
40
|
type: "checkbox",
|
|
41
41
|
ref: x,
|
|
42
|
-
id:
|
|
43
|
-
className:
|
|
42
|
+
id: c,
|
|
43
|
+
className: m(N(i), {
|
|
44
44
|
"gi-checkbox-indeterminate": h
|
|
45
45
|
}),
|
|
46
|
-
"aria-labelledby":
|
|
46
|
+
"aria-labelledby": o ? `${c}-label` : void 0,
|
|
47
47
|
...u
|
|
48
48
|
}
|
|
49
49
|
),
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
o && /* @__PURE__ */ t(
|
|
51
|
+
I,
|
|
52
52
|
{
|
|
53
|
-
id: `${
|
|
54
|
-
htmlFor:
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
children: c
|
|
53
|
+
id: `${c}-label`,
|
|
54
|
+
htmlFor: n ? void 0 : c,
|
|
55
|
+
size: i,
|
|
56
|
+
className: n ? void 0 : "gi-cursor-pointer",
|
|
57
|
+
children: o
|
|
59
58
|
}
|
|
60
59
|
)
|
|
61
60
|
]
|
|
62
61
|
}
|
|
63
62
|
),
|
|
64
|
-
|
|
65
|
-
/* @__PURE__ */ t("div", { children: /* @__PURE__ */ t("div", { className:
|
|
66
|
-
/* @__PURE__ */ t(
|
|
63
|
+
s && /* @__PURE__ */ a("div", { className: "gi-input-checkbox-hint-container", children: [
|
|
64
|
+
/* @__PURE__ */ t("div", { children: /* @__PURE__ */ t("div", { className: S(i) }) }),
|
|
65
|
+
/* @__PURE__ */ t(C, { id: `${c}-hint`, text: s })
|
|
67
66
|
] })
|
|
68
67
|
] });
|
|
69
68
|
}
|
|
70
|
-
),
|
|
69
|
+
), w = ({
|
|
71
70
|
error: e,
|
|
72
|
-
...
|
|
71
|
+
...i
|
|
73
72
|
}) => /* @__PURE__ */ t(
|
|
74
73
|
d,
|
|
75
74
|
{
|
|
76
|
-
...
|
|
75
|
+
...i,
|
|
77
76
|
size: "sm",
|
|
78
77
|
containerProps: {
|
|
79
78
|
"data-table-cell": !0,
|
|
@@ -82,9 +81,9 @@ const N = (e) => {
|
|
|
82
81
|
}
|
|
83
82
|
);
|
|
84
83
|
d.displayName = "InputCheckbox";
|
|
85
|
-
|
|
84
|
+
w.displayName = "InputCheckboxTableCell";
|
|
86
85
|
export {
|
|
87
86
|
d as InputCheckbox,
|
|
88
|
-
|
|
89
|
-
|
|
87
|
+
w as InputCheckboxTableCell,
|
|
88
|
+
S as getCheckboxWidth
|
|
90
89
|
};
|
|
@@ -1,24 +1,23 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import "
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
const
|
|
6
|
-
const [l, s] = f(
|
|
2
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
3
|
+
import { useState as g, useEffect as m, Children as v, isValidElement as k, cloneElement as E } from "react";
|
|
4
|
+
const C = ({ size: p, groupId: e, inline: u, onChange: t, children: d, values: n }) => {
|
|
5
|
+
const [l, s] = g(
|
|
7
6
|
n || []
|
|
8
7
|
);
|
|
9
|
-
|
|
8
|
+
m(() => {
|
|
10
9
|
s(n || []);
|
|
11
10
|
}, [n]);
|
|
12
11
|
const o = n === void 0 ? l : n, a = (i) => {
|
|
13
|
-
let
|
|
14
|
-
|
|
12
|
+
let c = [];
|
|
13
|
+
c = o.includes(i) ? o.filter((f) => f !== i) : [...o, i], n === void 0 && s(c), t == null || t(c);
|
|
15
14
|
}, h = v.map(d, (i) => k(i) ? E(i, {
|
|
16
15
|
onChange: () => a(i.props.value),
|
|
17
16
|
checked: o.includes(i.props.value),
|
|
18
17
|
size: p,
|
|
19
18
|
name: e
|
|
20
19
|
}) : i);
|
|
21
|
-
return /* @__PURE__ */
|
|
20
|
+
return /* @__PURE__ */ r("div", { className: "gi-input-group-container", children: /* @__PURE__ */ r("div", { className: "gi-input-group-options-container", children: /* @__PURE__ */ r(
|
|
22
21
|
"div",
|
|
23
22
|
{
|
|
24
23
|
className: u ? "gi-input-group-options-inline" : "gi-input-group-options-stacked",
|
|
@@ -27,5 +26,5 @@ const I = ({ size: p, groupId: e, inline: u, onChange: t, children: d, values: n
|
|
|
27
26
|
) }) });
|
|
28
27
|
};
|
|
29
28
|
export {
|
|
30
|
-
|
|
29
|
+
C as InputCheckboxGroup
|
|
31
30
|
};
|
|
@@ -1,66 +1,63 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import "
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { InputText as v } from "../input-text/input-text.js";
|
|
2
|
+
import { jsxs as l, jsx as i } from "react/jsx-runtime";
|
|
3
|
+
import { useId as p } from "react";
|
|
4
|
+
import { cn as u } from "../cn.js";
|
|
5
|
+
import { HintText as v } from "../hint-text/hint-text.js";
|
|
6
|
+
import { InputText as h } from "../input-text/input-text.js";
|
|
8
7
|
import { Label as b } from "../label/label.js";
|
|
9
8
|
import { Input as x } from "../primitives/input.js";
|
|
10
9
|
import { InputRadioSizeEnum as g } from "./types.js";
|
|
11
|
-
const C = (
|
|
12
|
-
label:
|
|
13
|
-
children:
|
|
14
|
-
hint:
|
|
10
|
+
const C = (r) => r === g.Small ? "gi-input-radio-small" : "gi-input-radio-medium", T = (r) => r === g.Small ? "gi-w-6" : "gi-w-8", q = ({
|
|
11
|
+
label: r,
|
|
12
|
+
children: s,
|
|
13
|
+
hint: t,
|
|
15
14
|
id: f,
|
|
16
|
-
size:
|
|
15
|
+
size: a = "md",
|
|
17
16
|
conditionalInput: d,
|
|
18
17
|
checked: o,
|
|
19
18
|
...m
|
|
20
19
|
}) => {
|
|
21
|
-
const
|
|
22
|
-
return /* @__PURE__ */
|
|
20
|
+
const e = f ?? p(), n = s ?? r, c = !!s;
|
|
21
|
+
return /* @__PURE__ */ l("div", { className: "gi-input-radio-container", children: [
|
|
23
22
|
/* @__PURE__ */ i(
|
|
24
23
|
x,
|
|
25
24
|
{
|
|
26
25
|
type: "radio",
|
|
27
|
-
id:
|
|
26
|
+
id: e,
|
|
28
27
|
...o === void 0 ? { defaultChecked: m.defaultChecked } : { checked: o, onChange: m.onChange },
|
|
29
|
-
className: C(
|
|
30
|
-
"aria-describedby":
|
|
28
|
+
className: C(a),
|
|
29
|
+
"aria-describedby": t ? `${e}-hint` : void 0,
|
|
31
30
|
"aria-required": d ? "true" : "false",
|
|
32
|
-
"aria-labelledby":
|
|
31
|
+
"aria-labelledby": n ? `${e}-label` : void 0,
|
|
33
32
|
...m
|
|
34
33
|
}
|
|
35
34
|
),
|
|
36
|
-
/* @__PURE__ */
|
|
35
|
+
/* @__PURE__ */ l(
|
|
37
36
|
"div",
|
|
38
37
|
{
|
|
39
|
-
className:
|
|
40
|
-
"gi-mt-1":
|
|
38
|
+
className: u({
|
|
39
|
+
"gi-mt-1": a === "md"
|
|
41
40
|
}),
|
|
42
41
|
children: [
|
|
43
|
-
|
|
42
|
+
n && /* @__PURE__ */ i(
|
|
44
43
|
b,
|
|
45
44
|
{
|
|
46
|
-
id: `${
|
|
47
|
-
htmlFor:
|
|
48
|
-
size:
|
|
49
|
-
className:
|
|
50
|
-
|
|
51
|
-
}),
|
|
52
|
-
children: l
|
|
45
|
+
id: `${e}-label`,
|
|
46
|
+
htmlFor: c ? void 0 : e,
|
|
47
|
+
size: a,
|
|
48
|
+
className: c ? void 0 : "gi-cursor-pointer",
|
|
49
|
+
children: n
|
|
53
50
|
}
|
|
54
51
|
),
|
|
55
|
-
(
|
|
56
|
-
|
|
52
|
+
(t || d) && /* @__PURE__ */ i("div", { className: "gi-radio-conditional-divider-container", children: /* @__PURE__ */ l("div", { children: [
|
|
53
|
+
t && /* @__PURE__ */ i(v, { text: t, size: a }),
|
|
57
54
|
d && /* @__PURE__ */ i(
|
|
58
55
|
"div",
|
|
59
56
|
{
|
|
60
|
-
className:
|
|
57
|
+
className: u("gi-mt-3", {
|
|
61
58
|
"gi-hidden": !o
|
|
62
59
|
}),
|
|
63
|
-
children: /* @__PURE__ */ i(
|
|
60
|
+
children: /* @__PURE__ */ i(h, { ...d })
|
|
64
61
|
}
|
|
65
62
|
)
|
|
66
63
|
] }) })
|
|
@@ -70,6 +67,6 @@ const C = (e) => e === g.Small ? "gi-input-radio-small" : "gi-input-radio-medium
|
|
|
70
67
|
] });
|
|
71
68
|
};
|
|
72
69
|
export {
|
|
73
|
-
|
|
74
|
-
|
|
70
|
+
q as InputRadio,
|
|
71
|
+
T as getRadioWidth
|
|
75
72
|
};
|
|
@@ -1,13 +1,12 @@
|
|
|
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 { useState as a, useEffect as g, Children as m, isValidElement as v, cloneElement as f } from "react";
|
|
5
|
-
const
|
|
6
|
-
groupId:
|
|
7
|
-
inline:
|
|
4
|
+
const N = ({
|
|
5
|
+
groupId: s,
|
|
6
|
+
inline: c,
|
|
8
7
|
onChange: n,
|
|
9
8
|
value: o,
|
|
10
|
-
children:
|
|
9
|
+
children: p
|
|
11
10
|
}) => {
|
|
12
11
|
const [u, t] = a(
|
|
13
12
|
o || null
|
|
@@ -17,20 +16,20 @@ const k = ({
|
|
|
17
16
|
}, [o]);
|
|
18
17
|
const d = o === void 0 ? u : o, e = (i) => {
|
|
19
18
|
o === void 0 && t(i.target.value), n == null || n(i);
|
|
20
|
-
}, l = m.map(
|
|
19
|
+
}, l = m.map(p, (i) => v(i) ? f(i, {
|
|
21
20
|
onChange: e,
|
|
22
21
|
checked: d === i.props.value,
|
|
23
|
-
name:
|
|
22
|
+
name: s
|
|
24
23
|
}) : i);
|
|
25
24
|
return /* @__PURE__ */ r("div", { className: "gi-input-group-container", children: /* @__PURE__ */ r("div", { className: "gi-input-group-options-container", children: /* @__PURE__ */ r(
|
|
26
25
|
"div",
|
|
27
26
|
{
|
|
28
27
|
role: "radiogroup",
|
|
29
|
-
className:
|
|
28
|
+
className: c ? "gi-input-group-options-inline" : "gi-input-group-options-stacked",
|
|
30
29
|
children: l
|
|
31
30
|
}
|
|
32
31
|
) }) });
|
|
33
32
|
};
|
|
34
33
|
export {
|
|
35
|
-
|
|
34
|
+
N as InputRadioGroup
|
|
36
35
|
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import "@ogcio/design-system-react/browser-check";
|
|
3
2
|
import { jsx as n, jsxs as m } from "react/jsx-runtime";
|
|
4
3
|
import { forwardRef as d, useRef as W, useImperativeHandle as _, useMemo as j } from "react";
|
|
5
4
|
import { cn as u } from "../cn.js";
|
|
@@ -151,7 +150,7 @@ const H = d(
|
|
|
151
150
|
({ type: a = "text", clearButtonEnabled: e, ...r }, t) => e || a === "search" ? /* @__PURE__ */ n(H, { ref: t, type: a, ...r }) : /* @__PURE__ */ n(h, { ref: t, type: a, ...r })
|
|
152
151
|
);
|
|
153
152
|
I.displayName = "InputText";
|
|
154
|
-
const
|
|
153
|
+
const F = d(({ type: a = "text", error: e, ...r }, t) => /* @__PURE__ */ n(
|
|
155
154
|
I,
|
|
156
155
|
{
|
|
157
156
|
...r,
|
|
@@ -167,5 +166,5 @@ const G = d(({ type: a = "text", error: e, ...r }, t) => /* @__PURE__ */ n(
|
|
|
167
166
|
export {
|
|
168
167
|
p as InputActionButton,
|
|
169
168
|
I as InputText,
|
|
170
|
-
|
|
169
|
+
F as InputTextTableCell
|
|
171
170
|
};
|