@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,10 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import "@ogcio/design-system-react/browser-check";
|
|
3
2
|
import { jsx as n, jsxs as d } from "react/jsx-runtime";
|
|
4
3
|
import { Container as r } from "../container/container.js";
|
|
5
4
|
import { useBreakpoint as c } from "../hooks/use-breakpoint.js";
|
|
6
5
|
import { Tag as l } from "../tag/tag.js";
|
|
7
|
-
function
|
|
6
|
+
function h({
|
|
8
7
|
level: s,
|
|
9
8
|
children: a,
|
|
10
9
|
wrap: i = "none",
|
|
@@ -30,5 +29,5 @@ function b({
|
|
|
30
29
|
return i === "container" ? /* @__PURE__ */ n(r, { children: e }) : i === "container-full-width" ? /* @__PURE__ */ n(r, { fullWidth: !0, children: e }) : e;
|
|
31
30
|
}
|
|
32
31
|
export {
|
|
33
|
-
|
|
32
|
+
h as PhaseBanner
|
|
34
33
|
};
|
package/dist/popover/popover.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import "@ogcio/design-system-react/browser-check";
|
|
3
2
|
import { jsx as dt } from "react/jsx-runtime";
|
|
4
3
|
import { useRef as Ee, useEffect as Ae } from "react";
|
|
5
4
|
import { cn as mt } from "../cn.js";
|
|
@@ -905,7 +904,7 @@ function br(e) {
|
|
|
905
904
|
var wr = [Xt, sr, Ft, kt, or, er, ur, Wt, rr], xr = /* @__PURE__ */ br({
|
|
906
905
|
defaultModifiers: wr
|
|
907
906
|
});
|
|
908
|
-
const
|
|
907
|
+
const Dr = ({
|
|
909
908
|
triggerRef: e,
|
|
910
909
|
children: t,
|
|
911
910
|
className: r,
|
|
@@ -1002,5 +1001,5 @@ const Br = ({
|
|
|
1002
1001
|
) : null;
|
|
1003
1002
|
};
|
|
1004
1003
|
export {
|
|
1005
|
-
|
|
1004
|
+
Dr as Popover
|
|
1006
1005
|
};
|
package/dist/radio/radio.js
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import "@ogcio/design-system-react/browser-check";
|
|
3
2
|
import { jsxs as a, jsx as s, Fragment as F } from "react/jsx-runtime";
|
|
4
3
|
import { useId as G } from "react";
|
|
5
4
|
import { ButtonGroup as j, ButtonGroupItem as w } from "../button-group/button-group.js";
|
|
6
5
|
import { cn as o } from "../cn.js";
|
|
7
6
|
import { FormField as O, FormFieldLabel as V, FormFieldHint as E } from "../forms/form-field/form-field.js";
|
|
8
7
|
import { useBreakpoint as H, Breakpoint as $ } from "../hooks/use-breakpoint.js";
|
|
9
|
-
const
|
|
8
|
+
const K = ({
|
|
10
9
|
name: B,
|
|
11
10
|
size: x = "medium",
|
|
12
11
|
orientation: t = "horizontal",
|
|
@@ -19,7 +18,7 @@ const P = ({
|
|
|
19
18
|
onChange: v,
|
|
20
19
|
type: f
|
|
21
20
|
}) => {
|
|
22
|
-
const
|
|
21
|
+
const h = G(), b = `${h}-label`, n = d ? `${h}-hint` : void 0, { breakpoint: p } = H(), g = p === $.ExtraSmall || p === $.Small;
|
|
23
22
|
let l = [];
|
|
24
23
|
switch (f) {
|
|
25
24
|
case "1-5": {
|
|
@@ -157,5 +156,5 @@ const P = ({
|
|
|
157
156
|
] });
|
|
158
157
|
};
|
|
159
158
|
export {
|
|
160
|
-
|
|
159
|
+
K as ScoreSelect
|
|
161
160
|
};
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import "@ogcio/design-system-react/browser-check";
|
|
3
2
|
import { jsxs as v, jsx as r } from "react/jsx-runtime";
|
|
4
|
-
import { forwardRef as F, useState as $, useEffect as R, Children as z, isValidElement as A, cloneElement as
|
|
3
|
+
import { forwardRef as F, useState as $, useEffect as R, Children as z, isValidElement as A, cloneElement as b } from "react";
|
|
5
4
|
import { cn as P } from "../cn.js";
|
|
6
5
|
import { translate as K } from "../i18n/utility.js";
|
|
7
6
|
import { Icon as q } from "../icon/icon.js";
|
|
8
|
-
import { InputText as
|
|
9
|
-
import { Label as
|
|
10
|
-
import { Spinner as
|
|
11
|
-
const
|
|
12
|
-
({ children: o, className: i, onChange: l, enableSearch: n, isLoading: c, showNoData:
|
|
13
|
-
const [s,
|
|
7
|
+
import { InputText as J } from "../input-text/input-text.js";
|
|
8
|
+
import { Label as Q } from "../label/label.js";
|
|
9
|
+
import { Spinner as U } from "../spinner/spinner.js";
|
|
10
|
+
const ne = F(
|
|
11
|
+
({ children: o, className: i, onChange: l, enableSearch: n, isLoading: c, showNoData: g }, O) => {
|
|
12
|
+
const [s, S] = $(""), [m, w] = $([]);
|
|
14
13
|
R(() => {
|
|
15
14
|
const u = z.toArray(o).filter(
|
|
16
15
|
(a) => A(a)
|
|
@@ -23,7 +22,7 @@ const ie = F(
|
|
|
23
22
|
if (typeof e.props.value == "string") {
|
|
24
23
|
const D = ((I = (M = (L = e == null ? void 0 : e.props) == null ? void 0 : L.children) == null ? void 0 : M.toString()) == null ? void 0 : I.toLowerCase()) || "", E = (k = (T = e == null ? void 0 : e.props) == null ? void 0 : T.value) == null ? void 0 : k.toLowerCase();
|
|
25
24
|
if (D.includes(x) || E.includes(x))
|
|
26
|
-
return
|
|
25
|
+
return b(e, {
|
|
27
26
|
onChange: l,
|
|
28
27
|
enableSearch: n
|
|
29
28
|
});
|
|
@@ -35,15 +34,15 @@ const ie = F(
|
|
|
35
34
|
e.props.children
|
|
36
35
|
).filter((t) => A(t)).map((t) => {
|
|
37
36
|
var p;
|
|
38
|
-
return ((p = t == null ? void 0 : t.type) == null ? void 0 : p.componentType) === "SelectMenuOption" ?
|
|
37
|
+
return ((p = t == null ? void 0 : t.type) == null ? void 0 : p.componentType) === "SelectMenuOption" ? b(t, { onChange: l }) : null;
|
|
39
38
|
}).filter(
|
|
40
39
|
(t) => t !== null
|
|
41
40
|
).filter((t) => {
|
|
42
|
-
var j,
|
|
43
|
-
const p = ((
|
|
41
|
+
var j, V, C;
|
|
42
|
+
const p = ((V = (j = t.props.children) == null ? void 0 : j.toString()) == null ? void 0 : V.toLowerCase()) || "", f = ((C = t.props.value) == null ? void 0 : C.toLowerCase()) || "";
|
|
44
43
|
return (p == null ? void 0 : p.includes(s.toLowerCase())) || (f == null ? void 0 : f.includes(s.toLowerCase()));
|
|
45
44
|
});
|
|
46
|
-
return G.length > 0 || s === "" ?
|
|
45
|
+
return G.length > 0 || s === "" ? b(e, {
|
|
47
46
|
children: G
|
|
48
47
|
}) : null;
|
|
49
48
|
}
|
|
@@ -53,42 +52,44 @@ const ie = F(
|
|
|
53
52
|
}).filter(Boolean);
|
|
54
53
|
w(u);
|
|
55
54
|
}, [o, s, l]);
|
|
56
|
-
const y = (
|
|
57
|
-
|
|
58
|
-
},
|
|
55
|
+
const y = (d) => {
|
|
56
|
+
S(d.target.value);
|
|
57
|
+
}, h = () => c ? /* @__PURE__ */ r("div", { className: "gi-select-menu-loading", children: /* @__PURE__ */ r(U, { size: "md" }) }) : g ? /* @__PURE__ */ r("div", { className: "gi-select-menu-option-not-found", children: K("autocomplete.noData", {
|
|
59
58
|
defaultValue: "No data found."
|
|
60
|
-
}) }) : /* @__PURE__ */ r("ul", { "aria-label": "options", role: "listbox", children:
|
|
61
|
-
return /* @__PURE__ */ v("div", { ref:
|
|
59
|
+
}) }) : /* @__PURE__ */ r("ul", { "aria-label": "options", role: "listbox", children: m });
|
|
60
|
+
return /* @__PURE__ */ v("div", { ref: O, className: P("gi-select-menu-container", i), children: [
|
|
62
61
|
n && /* @__PURE__ */ r("div", { className: "gi-select-menu-input-container", children: /* @__PURE__ */ r(
|
|
63
|
-
|
|
62
|
+
J,
|
|
64
63
|
{
|
|
65
64
|
tabIndex: 0,
|
|
66
|
-
placeholder: K("input.search"
|
|
65
|
+
placeholder: K("input.search", {
|
|
66
|
+
defaultValue: "Search"
|
|
67
|
+
}),
|
|
67
68
|
iconEnd: "search",
|
|
68
69
|
onChange: y,
|
|
69
70
|
value: s
|
|
70
71
|
}
|
|
71
72
|
) }),
|
|
72
|
-
/* @__PURE__ */ r("div", { className: "gi-select-menu-option-container", children:
|
|
73
|
+
/* @__PURE__ */ r("div", { className: "gi-select-menu-option-container", children: h() })
|
|
73
74
|
] });
|
|
74
75
|
}
|
|
75
|
-
),
|
|
76
|
+
), W = ({
|
|
76
77
|
children: o,
|
|
77
78
|
value: i,
|
|
78
79
|
selected: l,
|
|
79
80
|
onChange: n,
|
|
80
81
|
disabled: c,
|
|
81
|
-
dataTestid:
|
|
82
|
-
className:
|
|
82
|
+
dataTestid: g,
|
|
83
|
+
className: O,
|
|
83
84
|
hidden: s,
|
|
84
|
-
enableSearch:
|
|
85
|
-
isHighlighted:
|
|
85
|
+
enableSearch: S,
|
|
86
|
+
isHighlighted: m,
|
|
86
87
|
index: w,
|
|
87
88
|
...y
|
|
88
89
|
}) => {
|
|
89
|
-
const
|
|
90
|
+
const h = (u) => {
|
|
90
91
|
(u.key === "Enter" || u.key === " ") && (u.preventDefault(), n == null || n(i));
|
|
91
|
-
},
|
|
92
|
+
}, d = () => {
|
|
92
93
|
c || n == null || n(i);
|
|
93
94
|
};
|
|
94
95
|
return s ? null : /* @__PURE__ */ v(
|
|
@@ -100,18 +101,19 @@ const ie = F(
|
|
|
100
101
|
"aria-selected": l,
|
|
101
102
|
"aria-label": o == null ? void 0 : o.toString(),
|
|
102
103
|
"aria-disabled": c,
|
|
103
|
-
onKeyDown:
|
|
104
|
-
onClick:
|
|
104
|
+
onKeyDown: h,
|
|
105
|
+
onClick: d,
|
|
105
106
|
className: P(
|
|
106
107
|
"gi-select-option-item",
|
|
107
108
|
{
|
|
108
109
|
"gi-select-option-item-disabled": c,
|
|
109
|
-
"gi-select-option-item-highlighted":
|
|
110
|
+
"gi-select-option-item-highlighted": m
|
|
110
111
|
},
|
|
111
|
-
|
|
112
|
+
O
|
|
112
113
|
),
|
|
113
|
-
"data-
|
|
114
|
-
"data-
|
|
114
|
+
"data-highlighted": m,
|
|
115
|
+
"data-search-enabled": S,
|
|
116
|
+
"data-testid": g || `option-${i}`,
|
|
115
117
|
...y,
|
|
116
118
|
children: [
|
|
117
119
|
/* @__PURE__ */ r("span", { className: "gi-text-sm", children: o }),
|
|
@@ -121,26 +123,26 @@ const ie = F(
|
|
|
121
123
|
`${o}-${i}`
|
|
122
124
|
);
|
|
123
125
|
};
|
|
124
|
-
Object.defineProperty(
|
|
126
|
+
Object.defineProperty(W, "componentType", {
|
|
125
127
|
value: "SelectMenuOption",
|
|
126
128
|
writable: !1,
|
|
127
129
|
enumerable: !1
|
|
128
130
|
});
|
|
129
|
-
const
|
|
131
|
+
const X = ({
|
|
130
132
|
children: o,
|
|
131
133
|
label: i,
|
|
132
134
|
...l
|
|
133
135
|
}) => /* @__PURE__ */ v("div", { ...l, role: "group", className: "gi-px-3", children: [
|
|
134
|
-
/* @__PURE__ */ r(
|
|
136
|
+
/* @__PURE__ */ r(Q, { text: i, size: "sm", className: "gi-font-bold gi-pb-1" }),
|
|
135
137
|
o
|
|
136
138
|
] });
|
|
137
|
-
Object.defineProperty(
|
|
139
|
+
Object.defineProperty(X, "componentType", {
|
|
138
140
|
value: "SelectMenuGroupItem",
|
|
139
141
|
writable: !1,
|
|
140
142
|
enumerable: !1
|
|
141
143
|
});
|
|
142
144
|
export {
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
145
|
+
ne as SelectMenu,
|
|
146
|
+
X as SelectMenuGroupItem,
|
|
147
|
+
W as SelectMenuOption
|
|
146
148
|
};
|