@ogcio/design-system-react 1.22.1 → 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/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.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 +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 +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.js +0 -1
- package/dist/tabs/tab-list.js +23 -24
- 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,166 +1,192 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import "
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { translate as
|
|
8
|
-
import { InputText as
|
|
9
|
-
import { Popover as
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
|
|
2
|
+
import { jsx as l, jsxs as _ } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef as B, useRef as w, useState as k, useImperativeHandle as ee, Children as R, isValidElement as G, useEffect as O, useCallback as te } from "react";
|
|
4
|
+
import { cn as H } from "../cn.js";
|
|
5
|
+
import { useDomId as re } from "../hooks/use-dom-id.js";
|
|
6
|
+
import { useScrollHighlightedItem as ne } from "../hooks/use-scroll-highlighted-item.js";
|
|
7
|
+
import { translate as F } from "../i18n/utility.js";
|
|
8
|
+
import { InputText as oe } from "../input-text/input-text.js";
|
|
9
|
+
import { Popover as se } from "../popover/popover.js";
|
|
10
|
+
import { cycleEnabledIndex as ae } from "../utilities.js";
|
|
11
|
+
import { SelectMenu as le, SelectMenuOption as J, SelectMenuGroupItem as ce } from "./select-menu.js";
|
|
12
|
+
import { SelectSearch as ie } from "./select-search.js";
|
|
13
|
+
const pe = B(
|
|
13
14
|
({
|
|
14
|
-
children:
|
|
15
|
-
value:
|
|
16
|
-
defaultValue:
|
|
17
|
-
onChange:
|
|
18
|
-
onMenuClose:
|
|
19
|
-
enableSearch:
|
|
20
|
-
disabled:
|
|
15
|
+
children: x,
|
|
16
|
+
value: u,
|
|
17
|
+
defaultValue: E = "",
|
|
18
|
+
onChange: I,
|
|
19
|
+
onMenuClose: f,
|
|
20
|
+
enableSearch: y,
|
|
21
|
+
disabled: s,
|
|
21
22
|
name: i,
|
|
22
|
-
onBlur:
|
|
23
|
-
placeholder:
|
|
24
|
-
...
|
|
23
|
+
onBlur: m,
|
|
24
|
+
placeholder: P,
|
|
25
|
+
...v
|
|
25
26
|
}, Q) => {
|
|
26
|
-
const c =
|
|
27
|
-
|
|
28
|
-
), [
|
|
29
|
-
|
|
30
|
-
const
|
|
27
|
+
const c = w(null), D = w(null), A = w(null), $ = w(!1), [a, j] = k(
|
|
28
|
+
E || u
|
|
29
|
+
), [N, p] = k(!1), [W, K] = k(""), [b, V] = k(-1);
|
|
30
|
+
ee(Q, () => c.current), ne(A, b);
|
|
31
|
+
const h = R.toArray(x).filter(
|
|
31
32
|
(e) => G(e)
|
|
32
33
|
);
|
|
33
|
-
|
|
34
|
-
var
|
|
34
|
+
O(() => {
|
|
35
|
+
var r, t;
|
|
35
36
|
let e;
|
|
36
|
-
for (const
|
|
37
|
-
const
|
|
38
|
-
if (
|
|
39
|
-
const
|
|
40
|
-
if (
|
|
41
|
-
e =
|
|
37
|
+
for (const n of h) {
|
|
38
|
+
const o = (r = n.type) == null ? void 0 : r.componentType;
|
|
39
|
+
if (o === "SelectItemNext") {
|
|
40
|
+
const g = n;
|
|
41
|
+
if (g.props.value === a) {
|
|
42
|
+
e = g;
|
|
42
43
|
break;
|
|
43
44
|
}
|
|
44
45
|
}
|
|
45
|
-
if (
|
|
46
|
-
const
|
|
47
|
-
(
|
|
48
|
-
var
|
|
49
|
-
return ((
|
|
46
|
+
if (o === "SelectGroupItemNext") {
|
|
47
|
+
const g = n, d = R.toArray(g.props.children).find(
|
|
48
|
+
(S) => {
|
|
49
|
+
var z;
|
|
50
|
+
return ((z = S == null ? void 0 : S.type) == null ? void 0 : z.componentType) === "SelectItemNext" && S.props.value === a;
|
|
50
51
|
}
|
|
51
52
|
);
|
|
52
|
-
if (
|
|
53
|
-
e =
|
|
53
|
+
if (d && G(d)) {
|
|
54
|
+
e = d;
|
|
54
55
|
break;
|
|
55
56
|
}
|
|
56
57
|
}
|
|
57
58
|
}
|
|
58
59
|
if (e) {
|
|
59
|
-
const
|
|
60
|
-
K(
|
|
60
|
+
const n = ((t = e.props.children) == null ? void 0 : t.toString()) || "";
|
|
61
|
+
K(n);
|
|
61
62
|
} else
|
|
62
63
|
K(""), c.current && (c.current.value = "");
|
|
63
|
-
}, [
|
|
64
|
-
|
|
65
|
-
}, [
|
|
66
|
-
|
|
64
|
+
}, [a, h]), O(() => {
|
|
65
|
+
N || V(-1);
|
|
66
|
+
}, [N]), O(() => {
|
|
67
|
+
u !== void 0 && j(u);
|
|
68
|
+
}, [u]);
|
|
69
|
+
const L = () => {
|
|
67
70
|
var e;
|
|
68
|
-
|
|
69
|
-
},
|
|
70
|
-
|
|
71
|
-
},
|
|
72
|
-
if (
|
|
71
|
+
s || (p(!0), (e = c.current) == null || e.focus());
|
|
72
|
+
}, X = (e) => {
|
|
73
|
+
p(e), e || f == null || f();
|
|
74
|
+
}, U = (e) => {
|
|
75
|
+
if (p(!1), j(e), I && (I({
|
|
73
76
|
target: { name: i, value: e },
|
|
74
77
|
currentTarget: { name: i, value: e },
|
|
75
78
|
type: "change",
|
|
76
79
|
bubbles: !0
|
|
77
|
-
}),
|
|
78
|
-
const
|
|
80
|
+
}), m)) {
|
|
81
|
+
const t = {
|
|
79
82
|
target: { name: i, value: e },
|
|
80
83
|
currentTarget: { name: i, value: e },
|
|
81
84
|
type: "blur",
|
|
82
85
|
bubbles: !0
|
|
83
86
|
};
|
|
84
|
-
|
|
87
|
+
m == null || m(t);
|
|
85
88
|
}
|
|
86
|
-
},
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
89
|
+
}, Y = te((e) => {
|
|
90
|
+
var r;
|
|
91
|
+
if (!s)
|
|
92
|
+
switch (e.key) {
|
|
93
|
+
case "ArrowDown":
|
|
94
|
+
case "ArrowUp": {
|
|
95
|
+
e.preventDefault();
|
|
96
|
+
const t = e.key === "ArrowDown" ? 1 : -1;
|
|
97
|
+
V((n) => ae(h, n === -1 ? t === -1 ? 0 : -1 : n, t)), p(!0);
|
|
98
|
+
break;
|
|
99
|
+
}
|
|
100
|
+
case "Enter":
|
|
101
|
+
case "NumpadEnter": {
|
|
102
|
+
if (e.preventDefault(), N && b != -1 && h[b]) {
|
|
103
|
+
const t = h[b];
|
|
104
|
+
(r = t.props) != null && r.disabled || U(t.props.value);
|
|
105
|
+
} else
|
|
106
|
+
p(!0);
|
|
107
|
+
break;
|
|
108
|
+
}
|
|
109
|
+
case "Tab": {
|
|
110
|
+
p(!1);
|
|
111
|
+
break;
|
|
112
|
+
}
|
|
113
|
+
case "Escape": {
|
|
114
|
+
e.preventDefault(), p(!1);
|
|
115
|
+
break;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}, []), Z = (e) => {
|
|
119
|
+
var t, n;
|
|
120
|
+
const r = e.relatedTarget;
|
|
121
|
+
if (r && ((t = A.current) != null && t.contains(r) || (n = D.current) != null && n.contains(r)) || $.current) {
|
|
122
|
+
setTimeout(() => $.current = !1, 0);
|
|
93
123
|
return;
|
|
94
124
|
}
|
|
95
|
-
if (
|
|
96
|
-
const
|
|
97
|
-
|
|
98
|
-
target: { name: i, value:
|
|
99
|
-
currentTarget: { name: i, value:
|
|
125
|
+
if (m) {
|
|
126
|
+
const o = u ?? a ?? "";
|
|
127
|
+
m({
|
|
128
|
+
target: { name: i, value: o },
|
|
129
|
+
currentTarget: { name: i, value: o },
|
|
100
130
|
type: "blur",
|
|
101
131
|
bubbles: !0
|
|
102
132
|
});
|
|
103
133
|
}
|
|
104
|
-
},
|
|
105
|
-
return
|
|
106
|
-
c.current && c.current.setAttribute("aria-labelledby",
|
|
107
|
-
}, [
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
}
|
|
122
|
-
)
|
|
123
|
-
] }) : /* @__PURE__ */ q(
|
|
134
|
+
}, C = re(), q = v["aria-label"] ?? F("select.next.placeholder", { defaultValue: "Select" });
|
|
135
|
+
return O(() => {
|
|
136
|
+
c.current && c.current.setAttribute("aria-labelledby", C);
|
|
137
|
+
}, [C, y]), y ? /* @__PURE__ */ l("div", { className: H("gi-select-next", v.className), children: /* @__PURE__ */ l(
|
|
138
|
+
ie,
|
|
139
|
+
{
|
|
140
|
+
...v,
|
|
141
|
+
value: a,
|
|
142
|
+
onChange: I,
|
|
143
|
+
disabled: s,
|
|
144
|
+
ref: c,
|
|
145
|
+
onBlur: m,
|
|
146
|
+
name: i,
|
|
147
|
+
placeholder: P,
|
|
148
|
+
children: x
|
|
149
|
+
}
|
|
150
|
+
) }) : /* @__PURE__ */ _(
|
|
124
151
|
"div",
|
|
125
152
|
{
|
|
126
|
-
"aria-disabled":
|
|
127
|
-
className:
|
|
153
|
+
"aria-disabled": s,
|
|
154
|
+
className: H("gi-select-next", v.className),
|
|
128
155
|
children: [
|
|
129
|
-
/* @__PURE__ */
|
|
130
|
-
/* @__PURE__ */
|
|
131
|
-
|
|
156
|
+
/* @__PURE__ */ l("span", { id: C, className: "gi-sr-only", children: q }),
|
|
157
|
+
/* @__PURE__ */ l(
|
|
158
|
+
oe,
|
|
132
159
|
{
|
|
133
|
-
...
|
|
160
|
+
...v,
|
|
134
161
|
autoComplete: "off",
|
|
135
|
-
"aria-label":
|
|
136
|
-
"aria-disabled":
|
|
137
|
-
disabled:
|
|
138
|
-
placeholder:
|
|
162
|
+
"aria-label": q,
|
|
163
|
+
"aria-disabled": s,
|
|
164
|
+
disabled: s,
|
|
165
|
+
placeholder: P ?? F("select.next.placeholder", { defaultValue: "Search" }),
|
|
139
166
|
readOnly: !0,
|
|
140
167
|
inputClassName: "gi-cursor-pointer",
|
|
141
|
-
iconEndClassName:
|
|
142
|
-
"gi-cursor-pointer": !
|
|
143
|
-
"gi-cursor-not-allowed":
|
|
144
|
-
"gi-pointer-events-none": r
|
|
168
|
+
iconEndClassName: H({
|
|
169
|
+
"gi-cursor-pointer": !s,
|
|
170
|
+
"gi-cursor-not-allowed gi-pointer-events-none": s
|
|
145
171
|
}),
|
|
146
|
-
iconEnd:
|
|
147
|
-
onIconEndClick:
|
|
172
|
+
iconEnd: N ? "keyboard_arrow_up" : "keyboard_arrow_down",
|
|
173
|
+
onIconEndClick: L,
|
|
148
174
|
ref: c,
|
|
149
|
-
iconEndRef:
|
|
150
|
-
value:
|
|
151
|
-
onClick:
|
|
152
|
-
onKeyDown:
|
|
153
|
-
onBlur:
|
|
175
|
+
iconEndRef: D,
|
|
176
|
+
value: W,
|
|
177
|
+
onClick: L,
|
|
178
|
+
onKeyDown: Y,
|
|
179
|
+
onBlur: Z,
|
|
154
180
|
name: i
|
|
155
181
|
}
|
|
156
182
|
),
|
|
157
|
-
/* @__PURE__ */
|
|
158
|
-
|
|
183
|
+
/* @__PURE__ */ l(
|
|
184
|
+
se,
|
|
159
185
|
{
|
|
160
186
|
triggerRef: c,
|
|
161
|
-
extraRefs: [
|
|
162
|
-
onOpenChange:
|
|
163
|
-
open:
|
|
187
|
+
extraRefs: [D],
|
|
188
|
+
onOpenChange: X,
|
|
189
|
+
open: N,
|
|
164
190
|
maxHeight: 304,
|
|
165
191
|
options: {
|
|
166
192
|
placement: "bottom-start",
|
|
@@ -170,47 +196,50 @@ const se = Z(
|
|
|
170
196
|
{ name: "flip", options: { fallbackPlacements: ["top"] } }
|
|
171
197
|
]
|
|
172
198
|
},
|
|
173
|
-
children: /* @__PURE__ */
|
|
174
|
-
|
|
199
|
+
children: /* @__PURE__ */ l(
|
|
200
|
+
le,
|
|
175
201
|
{
|
|
176
|
-
ref:
|
|
177
|
-
onChange:
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
202
|
+
ref: A,
|
|
203
|
+
onChange: (e) => {
|
|
204
|
+
p(!1), U(e);
|
|
205
|
+
},
|
|
206
|
+
enableSearch: y,
|
|
207
|
+
children: h.map((e, r) => {
|
|
208
|
+
var n;
|
|
209
|
+
const t = (n = e == null ? void 0 : e.type) == null ? void 0 : n.componentType;
|
|
210
|
+
if (t === "SelectItemNext") {
|
|
211
|
+
const o = e;
|
|
212
|
+
return /* @__PURE__ */ l(
|
|
213
|
+
J,
|
|
186
214
|
{
|
|
187
|
-
...
|
|
188
|
-
|
|
189
|
-
|
|
215
|
+
...o.props,
|
|
216
|
+
isHighlighted: b === r,
|
|
217
|
+
selected: (a == null ? void 0 : a.toString()) === o.props.value.toString(),
|
|
218
|
+
index: r
|
|
190
219
|
},
|
|
191
|
-
`SelectItemNext-${
|
|
220
|
+
`SelectItemNext-${o.props.value.toString()}`
|
|
192
221
|
);
|
|
193
|
-
} else if (
|
|
194
|
-
const
|
|
195
|
-
const
|
|
196
|
-
return /* @__PURE__ */
|
|
197
|
-
|
|
222
|
+
} else if (t === "SelectGroupItemNext") {
|
|
223
|
+
const o = e, g = R.toArray(o.props.children).filter((d) => G(d)).map((d, S) => {
|
|
224
|
+
const T = d.props;
|
|
225
|
+
return /* @__PURE__ */ l(
|
|
226
|
+
J,
|
|
198
227
|
{
|
|
199
|
-
...
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
index:
|
|
228
|
+
...T,
|
|
229
|
+
isHighlighted: b === r,
|
|
230
|
+
selected: (a == null ? void 0 : a.toString()) === T.value.toString(),
|
|
231
|
+
index: S
|
|
203
232
|
},
|
|
204
|
-
`SelectGroupItemNext-SelectItemNext-${
|
|
233
|
+
`SelectGroupItemNext-SelectItemNext-${T.value.toString()}`
|
|
205
234
|
);
|
|
206
235
|
});
|
|
207
|
-
return /* @__PURE__ */
|
|
208
|
-
|
|
236
|
+
return /* @__PURE__ */ l(
|
|
237
|
+
ce,
|
|
209
238
|
{
|
|
210
|
-
label:
|
|
211
|
-
children:
|
|
239
|
+
label: o.props.label,
|
|
240
|
+
children: g
|
|
212
241
|
},
|
|
213
|
-
`option-group-${
|
|
242
|
+
`option-group-${r}`
|
|
214
243
|
);
|
|
215
244
|
}
|
|
216
245
|
return null;
|
|
@@ -223,35 +252,35 @@ const se = Z(
|
|
|
223
252
|
}
|
|
224
253
|
);
|
|
225
254
|
}
|
|
226
|
-
),
|
|
227
|
-
Object.defineProperty(
|
|
255
|
+
), M = () => null;
|
|
256
|
+
Object.defineProperty(M, "componentType", {
|
|
228
257
|
value: "SelectItemNext",
|
|
229
258
|
writable: !1,
|
|
230
259
|
enumerable: !1
|
|
231
260
|
});
|
|
232
|
-
const
|
|
233
|
-
Object.defineProperty(
|
|
261
|
+
const ue = () => null;
|
|
262
|
+
Object.defineProperty(ue, "componentType", {
|
|
234
263
|
value: "SelectGroupItemNext",
|
|
235
264
|
writable: !1,
|
|
236
265
|
enumerable: !1
|
|
237
266
|
});
|
|
238
|
-
const
|
|
239
|
-
const { options:
|
|
240
|
-
return /* @__PURE__ */
|
|
241
|
-
|
|
267
|
+
const Ne = (x) => {
|
|
268
|
+
const { options: u, defaultValue: E, onChange: I, error: f } = x;
|
|
269
|
+
return /* @__PURE__ */ l(
|
|
270
|
+
pe,
|
|
242
271
|
{
|
|
243
|
-
...
|
|
244
|
-
defaultValue:
|
|
245
|
-
onChange:
|
|
272
|
+
...x,
|
|
273
|
+
defaultValue: E,
|
|
274
|
+
onChange: I,
|
|
246
275
|
"data-table-cell": "true",
|
|
247
|
-
"data-table-cell-error-state":
|
|
248
|
-
children:
|
|
276
|
+
"data-table-cell-error-state": f == null ? void 0 : f.toString(),
|
|
277
|
+
children: u.map(({ value: y, label: s }) => /* @__PURE__ */ l(M, { value: y, children: s }, `${y}-${s}`))
|
|
249
278
|
}
|
|
250
279
|
);
|
|
251
280
|
};
|
|
252
281
|
export {
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
282
|
+
ue as SelectGroupItemNext,
|
|
283
|
+
M as SelectItemNext,
|
|
284
|
+
pe as SelectNext,
|
|
285
|
+
Ne as SelectNextTableCell
|
|
257
286
|
};
|
package/dist/select/select.js
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import "@ogcio/design-system-react/browser-check";
|
|
3
2
|
import { SelectNative as e } from "./select-native.js";
|
|
4
|
-
import { SelectGroupItem as
|
|
3
|
+
import { SelectGroupItem as m, SelectItem as r, SelectTableCell as S } from "./select-native.js";
|
|
5
4
|
const t = e;
|
|
6
5
|
t.displayName = "Select";
|
|
7
6
|
export {
|
|
8
7
|
t as Select,
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
m as SelectGroupItem,
|
|
9
|
+
r as SelectItem,
|
|
11
10
|
S as SelectTableCell
|
|
12
11
|
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import "@ogcio/design-system-react/browser-check";
|
|
3
2
|
import { jsxs as w, Fragment as V, jsx as s } from "react/jsx-runtime";
|
|
4
3
|
import f, { memo as B, useEffect as q, useCallback as v, useState as _ } from "react";
|
|
5
4
|
import { Button as A } from "../button/button.js";
|
|
@@ -46,18 +45,18 @@ const j = f.createContext(
|
|
|
46
45
|
throw new Error("SideNavItem must be used within a SideNav");
|
|
47
46
|
const {
|
|
48
47
|
openItemIds: o,
|
|
49
|
-
selectedItemId:
|
|
50
|
-
setOpenItemIds:
|
|
48
|
+
selectedItemId: S,
|
|
49
|
+
setOpenItemIds: p,
|
|
51
50
|
setSelectedItemId: C,
|
|
52
51
|
navId: P
|
|
53
|
-
} = l, I = o.includes(t), x =
|
|
52
|
+
} = l, I = o.includes(t), x = S === t;
|
|
54
53
|
q(() => {
|
|
55
|
-
r &&
|
|
56
|
-
}, [r,
|
|
54
|
+
r && p((d) => d.includes(t) ? d : [...d, t]);
|
|
55
|
+
}, [r, p, t]);
|
|
57
56
|
const h = v(() => {
|
|
58
57
|
const d = I ? o.filter((R) => R !== t) : [...o, t];
|
|
59
|
-
|
|
60
|
-
}, [I, o,
|
|
58
|
+
p(d);
|
|
59
|
+
}, [I, o, p, t]), k = v(() => {
|
|
61
60
|
C(t);
|
|
62
61
|
}, [C, t]), E = `${P}-${t}`, O = i && e, b = m !== void 0, D = v(() => {
|
|
63
62
|
i && e && h(), k();
|
|
@@ -140,8 +139,8 @@ const j = f.createContext(
|
|
|
140
139
|
const [t, u] = _([]), [m, g] = _(
|
|
141
140
|
a
|
|
142
141
|
), r = f.useId(), l = v(
|
|
143
|
-
(
|
|
144
|
-
g(
|
|
142
|
+
(S) => {
|
|
143
|
+
g(S), e == null || e(S);
|
|
145
144
|
},
|
|
146
145
|
[e]
|
|
147
146
|
), o = f.useMemo(
|
package/dist/spinner/spinner.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import "@ogcio/design-system-react/browser-check";
|
|
3
2
|
import { jsx as e, jsxs as i } from "react/jsx-runtime";
|
|
4
3
|
import { c as o } from "../index-CB-zPpNk.js";
|
|
5
4
|
import { cn as l } from "../cn.js";
|
|
@@ -13,7 +12,7 @@ const c = {
|
|
|
13
12
|
size: c
|
|
14
13
|
}
|
|
15
14
|
});
|
|
16
|
-
function
|
|
15
|
+
function g({
|
|
17
16
|
size: t = "md",
|
|
18
17
|
inline: s = !1,
|
|
19
18
|
dataTestid: r
|
|
@@ -80,6 +79,6 @@ function f({
|
|
|
80
79
|
);
|
|
81
80
|
}
|
|
82
81
|
export {
|
|
83
|
-
|
|
82
|
+
g as Spinner,
|
|
84
83
|
c as spinnerSizeVariants
|
|
85
84
|
};
|
package/dist/stack/stack.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import "@ogcio/design-system-react/browser-check";
|
|
3
2
|
import { jsx as C, jsxs as h } from "react/jsx-runtime";
|
|
4
3
|
import { Children as R, Fragment as y, cloneElement as d, isValidElement as X } from "react";
|
|
5
|
-
import { cn as
|
|
6
|
-
const
|
|
4
|
+
import { cn as c } from "../cn.js";
|
|
5
|
+
const p = (l) => typeof l == "string" ? {} : {
|
|
7
6
|
isBaseColumn: l.base === "column",
|
|
8
7
|
isBaseRow: l.base === "row",
|
|
9
8
|
isXsColumn: l.xs === "column",
|
|
@@ -28,8 +27,8 @@ const c = (l) => typeof l == "string" ? {} : {
|
|
|
28
27
|
isBaseColumn: s,
|
|
29
28
|
isBaseRow: g,
|
|
30
29
|
isXsColumn: e,
|
|
31
|
-
isXsRow:
|
|
32
|
-
isSmColumn:
|
|
30
|
+
isXsRow: u,
|
|
31
|
+
isSmColumn: r,
|
|
33
32
|
isSmRow: m,
|
|
34
33
|
isMdColumn: x,
|
|
35
34
|
isMdRow: t,
|
|
@@ -39,14 +38,14 @@ const c = (l) => typeof l == "string" ? {} : {
|
|
|
39
38
|
isXlRow: n,
|
|
40
39
|
is2xlColumn: o,
|
|
41
40
|
is2xlRow: i
|
|
42
|
-
} =
|
|
41
|
+
} = p(l);
|
|
43
42
|
return {
|
|
44
43
|
"gi-flex-row": g,
|
|
45
44
|
"gi-flex-col": s,
|
|
46
|
-
"xs:gi-flex-row":
|
|
45
|
+
"xs:gi-flex-row": u,
|
|
47
46
|
"xs:gi-flex-col": e,
|
|
48
47
|
"sm:gi-flex-row": m,
|
|
49
|
-
"sm:gi-flex-col":
|
|
48
|
+
"sm:gi-flex-col": r,
|
|
50
49
|
"md:gi-flex-row": t,
|
|
51
50
|
"md:gi-flex-col": x,
|
|
52
51
|
"lg:gi-flex-row": f,
|
|
@@ -68,8 +67,8 @@ const c = (l) => typeof l == "string" ? {} : {
|
|
|
68
67
|
isBaseColumn: s,
|
|
69
68
|
isBaseRow: g,
|
|
70
69
|
isXsColumn: e,
|
|
71
|
-
isXsRow:
|
|
72
|
-
isSmColumn:
|
|
70
|
+
isXsRow: u,
|
|
71
|
+
isSmColumn: r,
|
|
73
72
|
isSmRow: m,
|
|
74
73
|
isMdColumn: x,
|
|
75
74
|
isMdRow: t,
|
|
@@ -79,7 +78,7 @@ const c = (l) => typeof l == "string" ? {} : {
|
|
|
79
78
|
isXlRow: n,
|
|
80
79
|
is2xlColumn: o,
|
|
81
80
|
is2xlRow: i
|
|
82
|
-
} =
|
|
81
|
+
} = p(l);
|
|
83
82
|
return {
|
|
84
83
|
"gi-w-full": s,
|
|
85
84
|
"gi-h-[1px]": s,
|
|
@@ -87,10 +86,10 @@ const c = (l) => typeof l == "string" ? {} : {
|
|
|
87
86
|
"gi-w-[1px]": g,
|
|
88
87
|
"xs:gi-w-full": e,
|
|
89
88
|
"xs:gi-h-[1px]": e,
|
|
90
|
-
"xs:gi-h-full":
|
|
91
|
-
"xs:gi-w-[1px]":
|
|
92
|
-
"sm:gi-w-full":
|
|
93
|
-
"sm:gi-h-[1px]":
|
|
89
|
+
"xs:gi-h-full": u,
|
|
90
|
+
"xs:gi-w-[1px]": u,
|
|
91
|
+
"sm:gi-w-full": r,
|
|
92
|
+
"sm:gi-h-[1px]": r,
|
|
94
93
|
"sm:gi-h-full": m,
|
|
95
94
|
"sm:gi-w-[1px]": m,
|
|
96
95
|
"md:gi-w-full": x,
|
|
@@ -133,7 +132,7 @@ const c = (l) => typeof l == "string" ? {} : {
|
|
|
133
132
|
return /* @__PURE__ */ C(
|
|
134
133
|
"div",
|
|
135
134
|
{
|
|
136
|
-
className: `${
|
|
135
|
+
className: `${c(s)} gi-bg-gray-400`,
|
|
137
136
|
"aria-hidden": "true"
|
|
138
137
|
}
|
|
139
138
|
);
|
|
@@ -142,19 +141,19 @@ const c = (l) => typeof l == "string" ? {} : {
|
|
|
142
141
|
direction: s = "column",
|
|
143
142
|
fixedHeight: g = "100%",
|
|
144
143
|
gap: e = 0,
|
|
145
|
-
hasDivider:
|
|
146
|
-
itemsAlignment:
|
|
144
|
+
hasDivider: u,
|
|
145
|
+
itemsAlignment: r = "start",
|
|
147
146
|
itemsDistribution: m = "start",
|
|
148
147
|
wrap: x = !1,
|
|
149
148
|
className: t,
|
|
150
149
|
...w
|
|
151
150
|
}) => {
|
|
152
|
-
const f =
|
|
151
|
+
const f = c(
|
|
153
152
|
t,
|
|
154
153
|
"gi-flex",
|
|
155
154
|
"gi-w-full",
|
|
156
155
|
B(m),
|
|
157
|
-
v(
|
|
156
|
+
v(r),
|
|
158
157
|
j(s),
|
|
159
158
|
L(e),
|
|
160
159
|
$(x)
|
|
@@ -168,7 +167,7 @@ const c = (l) => typeof l == "string" ? {} : {
|
|
|
168
167
|
"data-testid": `govie-stack-item-${i}`
|
|
169
168
|
}
|
|
170
169
|
) : o,
|
|
171
|
-
|
|
170
|
+
u && i < n.length - 1 && /* @__PURE__ */ C(M, { direction: s })
|
|
172
171
|
] }, `item_${i}`));
|
|
173
172
|
})() });
|
|
174
173
|
};
|