@ogcio/design-system-react 1.33.0 → 1.34.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/accordion/accordion-item.js +1 -1
- package/dist/alert/alert.js +1 -1
- package/dist/alert/variants.js +1 -1
- package/dist/atoms/Button.js +1 -1
- package/dist/atoms/heading/styles.js +1 -1
- package/dist/atoms/storybook/Heading.meta.d.ts +1 -1
- package/dist/atoms/storybook/Heading.meta.js +4 -4
- package/dist/atoms/storybook/Icons.meta.d.ts +1 -1
- package/dist/atoms/storybook/Icons.meta.js +7 -7
- package/dist/atoms/storybook/InsetText.meta.d.ts +1 -1
- package/dist/atoms/storybook/InsetText.meta.js +1 -1
- package/dist/atoms/storybook/Logos.meta.d.ts +1 -1
- package/dist/atoms/storybook/Logos.meta.js +1 -1
- package/dist/autocomplete/autocomplete.js +1 -1
- package/dist/autocomplete/use-autocomplete-controller.js +2 -2
- package/dist/browser-support/browser-support.js +202 -30
- package/dist/chip/chip.js +1 -1
- package/dist/data-table/data-table-footer.js +2 -2
- package/dist/data-table/data-table-header.js +1 -1
- package/dist/data-table/data-table-selected-rows.js +1 -1
- package/dist/data-table/editable-table-cell.js +1 -1
- package/dist/details/details.js +13 -16
- package/dist/drawer/drawer.js +1 -1
- package/dist/error-text/error-text.js +1 -1
- package/dist/header/header-legacy.js +6 -6
- package/dist/header/header-next/header-next.js +3 -3
- package/dist/header/variants.js +1 -1
- package/dist/hint-text/hint-text.js +1 -1
- package/dist/i18n/config.js +2 -2
- package/dist/i18n/utility.js +1 -1
- package/dist/{i18nInstance-AYICsHJu.js → i18nInstance-DiZ0lVPL.js} +2 -2
- package/dist/i18next-zBkzxGW1.js +1388 -0
- package/dist/{index-CB-zPpNk.js → index-C7W4ssMN.js} +1 -1
- package/dist/index-DqBV2TCd.js +23108 -0
- package/dist/index.js +1 -1
- package/dist/label/label.js +1 -1
- package/dist/{lodash-82PmXrjJ.js → lodash-DTZaBYO8.js} +289 -272
- package/dist/modal/modal.content.js +1 -1
- package/dist/pagination/pagination.js +59 -56
- package/dist/progress-stepper/progress-stepper.js +1 -1
- package/dist/select/select-native.js +1 -1
- package/dist/spinner/spinner.js +1 -1
- package/dist/stack/stack.js +2 -2
- package/dist/styles.css +1 -1
- package/dist/table/table.js +1 -1
- package/dist/tabs/variants.js +1 -1
- package/dist/toast/ds-toast.js +1 -1
- package/dist/tooltip/variants.js +1 -1
- package/dist/{useTranslation-DiBQuy8S.js → useTranslation-CRbS3UeG.js} +94 -85
- package/package.json +14 -7
- package/dist/i18next-Bfi2-LyH.js +0 -1370
- package/dist/index-Bh2cTIps.js +0 -33899
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsxs as i,
|
|
1
|
+
import { jsxs as i, Fragment as r, jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import o from "../atoms/Button.js";
|
|
3
3
|
import { ModalTitle as e, ModalBody as a, ModalFooter as n } from "./modal.js";
|
|
4
4
|
const c = /* @__PURE__ */ i(r, { children: [
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as B, jsx as
|
|
2
|
+
import { jsxs as B, jsx as I } from "react/jsx-runtime";
|
|
3
3
|
import J, { createElement as R, isValidElement as D, cloneElement as Q, Children as me, Fragment as de, useContext as he, useState as ge, useEffect as ye } from "react";
|
|
4
4
|
import U from "../atoms/Button.js";
|
|
5
5
|
import "../atoms/heading/styles.js";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
6
|
+
import ve from "../atoms/icons/ArrowLeft.js";
|
|
7
|
+
import be from "../atoms/icons/ArrowRight.js";
|
|
8
8
|
import { useBreakpoint as Ne, Breakpoint as ne } from "../hooks/use-breakpoint.js";
|
|
9
9
|
import { Icon as xe } from "../icon/icon.js";
|
|
10
10
|
import { getDisplayPages as re } from "../utils/utilities.js";
|
|
11
|
-
import { w as ie, i as _, a as X, b as L, I as Ae, u as Ee } from "../useTranslation-
|
|
12
|
-
import { k as $e } from "../i18next-
|
|
11
|
+
import { w as ie, i as _, a as X, b as L, I as Ae, u as Ee } from "../useTranslation-CRbS3UeG.js";
|
|
12
|
+
import { k as $e } from "../i18next-zBkzxGW1.js";
|
|
13
13
|
import { g as Te } from "../_commonjsHelpers-DaMA6jEr.js";
|
|
14
|
-
import { g as oe, b as le, u as ke } from "../i18nInstance-
|
|
14
|
+
import { g as oe, b as le, u as ke } from "../i18nInstance-DiZ0lVPL.js";
|
|
15
15
|
var Y, se;
|
|
16
16
|
function Ce() {
|
|
17
17
|
return se || (se = 1, Y = {
|
|
@@ -33,20 +33,20 @@ function Ce() {
|
|
|
33
33
|
}
|
|
34
34
|
var Oe = Ce();
|
|
35
35
|
const Ve = /* @__PURE__ */ Te(Oe);
|
|
36
|
-
var
|
|
36
|
+
var Ie = /\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g;
|
|
37
37
|
function ae(e) {
|
|
38
38
|
var t = { type: "tag", name: "", voidElement: !1, attrs: {}, children: [] }, n = e.match(/<\/?([^\s]+?)[/\s>]/);
|
|
39
39
|
if (n && (t.name = n[1], (Ve[n[1]] || e.charAt(e.length - 2) === "/") && (t.voidElement = !0), t.name.startsWith("!--"))) {
|
|
40
40
|
var r = e.indexOf("-->");
|
|
41
41
|
return { type: "comment", comment: r !== -1 ? e.slice(4, r) : "" };
|
|
42
42
|
}
|
|
43
|
-
for (var a = new RegExp(
|
|
43
|
+
for (var a = new RegExp(Ie), s = null; (s = a.exec(e)) !== null; ) if (s[0].trim()) if (s[1]) {
|
|
44
44
|
var o = s[1].trim(), c = [o, ""];
|
|
45
45
|
o.indexOf("=") > -1 && (c = o.split("=")), t.attrs[c[0]] = c[1], a.lastIndex--;
|
|
46
46
|
} else s[2] && (t.attrs[s[2]] = s[3].trim().substring(1, s[3].length - 1));
|
|
47
47
|
return t;
|
|
48
48
|
}
|
|
49
|
-
var
|
|
49
|
+
var je = /<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g, Le = /^\s*$/, Se = /* @__PURE__ */ Object.create(null);
|
|
50
50
|
function ce(e, t) {
|
|
51
51
|
switch (t.type) {
|
|
52
52
|
case "text":
|
|
@@ -68,7 +68,7 @@ var _e = { parse: function(e, t) {
|
|
|
68
68
|
var c = e.indexOf("<");
|
|
69
69
|
r.push({ type: "text", content: c === -1 ? e : e.substring(0, c) });
|
|
70
70
|
}
|
|
71
|
-
return e.replace(
|
|
71
|
+
return e.replace(je, function(f, m) {
|
|
72
72
|
if (o) {
|
|
73
73
|
if (f !== "</" + n.name + ">") return;
|
|
74
74
|
o = !1;
|
|
@@ -103,7 +103,10 @@ const G = (e, t) => {
|
|
|
103
103
|
const n = {
|
|
104
104
|
...t
|
|
105
105
|
};
|
|
106
|
-
return n.props =
|
|
106
|
+
return n.props = {
|
|
107
|
+
...t.props,
|
|
108
|
+
...e.props
|
|
109
|
+
}, n;
|
|
107
110
|
}, Re = (e) => {
|
|
108
111
|
const t = {};
|
|
109
112
|
if (!e) return t;
|
|
@@ -208,19 +211,19 @@ const G = (e, t) => {
|
|
|
208
211
|
...s
|
|
209
212
|
}, l = (u, A, y) => {
|
|
210
213
|
var d;
|
|
211
|
-
const E = q(u),
|
|
212
|
-
return Fe(E) &&
|
|
213
|
-
}, T = (u, A, y, E,
|
|
214
|
+
const E = q(u), j = h(E, A.children, y);
|
|
215
|
+
return Fe(E) && j.length === 0 || (d = u.props) != null && d.i18nIsDynamicList ? E : j;
|
|
216
|
+
}, T = (u, A, y, E, j) => {
|
|
214
217
|
u.dummy ? (u.children = A, y.push(Q(u, {
|
|
215
218
|
key: E
|
|
216
|
-
},
|
|
219
|
+
}, j ? void 0 : A))) : y.push(...me.map([u], (d) => {
|
|
217
220
|
const i = "data-i18n-is-dynamic-list", O = {
|
|
218
221
|
key: E,
|
|
219
222
|
[i]: void 0
|
|
220
223
|
};
|
|
221
224
|
return d && d.props && Object.keys(d.props).forEach((k) => {
|
|
222
225
|
k === "ref" || k === "children" || k === "i18nIsDynamicList" || k === i || (O[k] = d.props[k]);
|
|
223
|
-
}), Q(d, O,
|
|
226
|
+
}), Q(d, O, j ? null : A);
|
|
224
227
|
}));
|
|
225
228
|
}, h = (u, A, y) => {
|
|
226
229
|
const E = S(u);
|
|
@@ -233,53 +236,53 @@ const G = (e, t) => {
|
|
|
233
236
|
const V = {
|
|
234
237
|
...i.attrs
|
|
235
238
|
};
|
|
236
|
-
o && Object.keys(V).forEach((
|
|
237
|
-
const z = V[
|
|
238
|
-
_(z) && (V[
|
|
239
|
+
o && Object.keys(V).forEach((b) => {
|
|
240
|
+
const z = V[b];
|
|
241
|
+
_(z) && (V[b] = ke(z));
|
|
239
242
|
});
|
|
240
|
-
const
|
|
243
|
+
const v = Object.keys(V).length !== 0 ? we({
|
|
241
244
|
props: V
|
|
242
|
-
}, C) : C, w = D(
|
|
243
|
-
if (_(
|
|
244
|
-
const
|
|
245
|
-
d.push(
|
|
246
|
-
} else if (G(
|
|
247
|
-
const
|
|
248
|
-
T(
|
|
245
|
+
}, C) : C, w = D(v), M = w && G(i, !0) && !i.voidElement, W = f && L(v) && v.dummy && !w, Z = L(t) && Object.hasOwnProperty.call(t, i.name);
|
|
246
|
+
if (_(v)) {
|
|
247
|
+
const b = r.services.interpolator.interpolate(v, g, r.language);
|
|
248
|
+
d.push(b);
|
|
249
|
+
} else if (G(v) || M) {
|
|
250
|
+
const b = l(v, i, y);
|
|
251
|
+
T(v, b, d, O);
|
|
249
252
|
} else if (W) {
|
|
250
|
-
const
|
|
251
|
-
T(
|
|
253
|
+
const b = h(E, i.children, y);
|
|
254
|
+
T(v, b, d, O);
|
|
252
255
|
} else if (Number.isNaN(parseFloat(i.name)))
|
|
253
256
|
if (Z) {
|
|
254
|
-
const
|
|
255
|
-
T(
|
|
257
|
+
const b = l(v, i, y);
|
|
258
|
+
T(v, b, d, O, i.voidElement);
|
|
256
259
|
} else if (a.transSupportBasicHtmlNodes && c.indexOf(i.name) > -1)
|
|
257
260
|
if (i.voidElement)
|
|
258
261
|
d.push(R(i.name, {
|
|
259
262
|
key: `${i.name}-${O}`
|
|
260
263
|
}));
|
|
261
264
|
else {
|
|
262
|
-
const
|
|
265
|
+
const b = h(E, i.children, y);
|
|
263
266
|
d.push(R(i.name, {
|
|
264
267
|
key: `${i.name}-${O}`
|
|
265
|
-
},
|
|
268
|
+
}, b));
|
|
266
269
|
}
|
|
267
270
|
else if (i.voidElement)
|
|
268
271
|
d.push(`<${i.name} />`);
|
|
269
272
|
else {
|
|
270
|
-
const
|
|
271
|
-
d.push(`<${i.name}>${
|
|
273
|
+
const b = h(E, i.children, y);
|
|
274
|
+
d.push(`<${i.name}>${b}</${i.name}>`);
|
|
272
275
|
}
|
|
273
|
-
else if (L(
|
|
274
|
-
const
|
|
275
|
-
|
|
276
|
+
else if (L(v) && !w) {
|
|
277
|
+
const b = i.children[0] ? k : null;
|
|
278
|
+
b && d.push(b);
|
|
276
279
|
} else
|
|
277
|
-
T(
|
|
280
|
+
T(v, k, d, O, i.children.length !== 1 || !k);
|
|
278
281
|
} else if (i.type === "text") {
|
|
279
|
-
const C = a.transWrapTextNodes, V = typeof a.unescape == "function" ? a.unescape :
|
|
282
|
+
const C = a.transWrapTextNodes, V = typeof a.unescape == "function" ? a.unescape : oe().unescape, v = o ? V(r.services.interpolator.interpolate(i.content, g, r.language)) : r.services.interpolator.interpolate(i.content, g, r.language);
|
|
280
283
|
C ? d.push(R(C, {
|
|
281
284
|
key: `${i.name}-${O}`
|
|
282
|
-
},
|
|
285
|
+
}, v)) : d.push(v);
|
|
283
286
|
}
|
|
284
287
|
return d;
|
|
285
288
|
}, []);
|
|
@@ -326,15 +329,15 @@ function Ze({
|
|
|
326
329
|
shouldUnescape: $,
|
|
327
330
|
...g
|
|
328
331
|
}) {
|
|
329
|
-
var
|
|
330
|
-
const l = p ||
|
|
332
|
+
var b, z, K, P, ee, te;
|
|
333
|
+
const l = p || le();
|
|
331
334
|
if (!l)
|
|
332
335
|
return ie(l, "NO_I18NEXT_INSTANCE", "Trans: You need to pass in an i18next instance using i18nextReactModule", {
|
|
333
336
|
i18nKey: r
|
|
334
337
|
}), e;
|
|
335
338
|
const T = N || l.t.bind(l) || ((fe) => fe), h = {
|
|
336
|
-
...
|
|
337
|
-
...(
|
|
339
|
+
...oe(),
|
|
340
|
+
...(b = l.options) == null ? void 0 : b.react
|
|
338
341
|
};
|
|
339
342
|
let x = m || T.ns || ((z = l.options) == null ? void 0 : z.defaultNS);
|
|
340
343
|
x = _(x) ? [x] : x || ["translation"];
|
|
@@ -346,7 +349,7 @@ function Ze({
|
|
|
346
349
|
} : s, y = $ ?? (u == null ? void 0 : u.shouldUnescape), E = u != null && u.values ? {
|
|
347
350
|
...u.values,
|
|
348
351
|
...o
|
|
349
|
-
} : o,
|
|
352
|
+
} : o, j = u != null && u.components ? {
|
|
350
353
|
...u.components,
|
|
351
354
|
...f
|
|
352
355
|
} : f, d = ue(e, h, l, r), i = c || (A == null ? void 0 : A.defaultValue) || d || h.transEmptyNodeValue || (typeof r == "function" ? $e(r) : r), {
|
|
@@ -377,9 +380,9 @@ function Ze({
|
|
|
377
380
|
};
|
|
378
381
|
let V = k ? T(k, C) : i;
|
|
379
382
|
V === k && i && (V = i);
|
|
380
|
-
const
|
|
381
|
-
let w =
|
|
382
|
-
We(
|
|
383
|
+
const v = Me(j, V, l, r);
|
|
384
|
+
let w = v || e, M = null;
|
|
385
|
+
We(v) && (M = v, w = e);
|
|
383
386
|
const W = Be(w, M, V, l, h, C, y), Z = n ?? h.defaultTransParent;
|
|
384
387
|
return Z ? R(Z, g, W) : W;
|
|
385
388
|
}
|
|
@@ -403,7 +406,7 @@ function Ge({
|
|
|
403
406
|
const {
|
|
404
407
|
i18n: l,
|
|
405
408
|
defaultNS: T
|
|
406
|
-
} = he(Ae) || {}, h = p || l ||
|
|
409
|
+
} = he(Ae) || {}, h = p || l || le(), x = N || (h == null ? void 0 : h.t.bind(h));
|
|
407
410
|
return Ze({
|
|
408
411
|
children: e,
|
|
409
412
|
count: t,
|
|
@@ -435,14 +438,14 @@ const at = ({
|
|
|
435
438
|
f(!0);
|
|
436
439
|
}, []);
|
|
437
440
|
const m = c && s === ne.ExtraSmall, p = c && o !== null && o < 639, N = () => (c && s ? re(e, t, s) : re(e, t, ne.Large)).map(
|
|
438
|
-
(l, T) => l === -1 || l === -2 ? /* @__PURE__ */
|
|
441
|
+
(l, T) => l === -1 || l === -2 ? /* @__PURE__ */ I(J.Fragment, { children: /* @__PURE__ */ I(
|
|
439
442
|
xe,
|
|
440
443
|
{
|
|
441
444
|
role: "presentation",
|
|
442
445
|
className: "gi-text-gray-700",
|
|
443
446
|
icon: "more_horiz"
|
|
444
447
|
}
|
|
445
|
-
) }, `ellipsis-${T}`) : /* @__PURE__ */
|
|
448
|
+
) }, `ellipsis-${T}`) : /* @__PURE__ */ I(
|
|
446
449
|
U,
|
|
447
450
|
{
|
|
448
451
|
variant: l === e ? "primary" : "flat",
|
|
@@ -457,12 +460,12 @@ const at = ({
|
|
|
457
460
|
},
|
|
458
461
|
l
|
|
459
462
|
)
|
|
460
|
-
), $ = () => /* @__PURE__ */
|
|
463
|
+
), $ = () => /* @__PURE__ */ I("span", { className: "gi-text-md gi-leading-6", "aria-live": "polite", children: /* @__PURE__ */ B(
|
|
461
464
|
Ge,
|
|
462
465
|
{
|
|
463
466
|
i18nKey: "pagination.page",
|
|
464
467
|
values: { currentPage: e, totalPages: t },
|
|
465
|
-
components: { bold: /* @__PURE__ */
|
|
468
|
+
components: { bold: /* @__PURE__ */ I("span", { className: "gi-font-bold" }) },
|
|
466
469
|
children: [
|
|
467
470
|
/* @__PURE__ */ B("span", { className: "gi-font-bold", children: [
|
|
468
471
|
"Page ",
|
|
@@ -499,7 +502,7 @@ const at = ({
|
|
|
499
502
|
className: p ? "gi-icon-btn-large" : "",
|
|
500
503
|
dataTestId: "govie-pagination-prev-btn",
|
|
501
504
|
children: [
|
|
502
|
-
/* @__PURE__ */
|
|
505
|
+
/* @__PURE__ */ I(J.Fragment, { children: /* @__PURE__ */ I(ve, { className: "gi-block gi-shrink-0" }) }, "previous-btn-pagination"),
|
|
503
506
|
!p && a("pagination.previous", { defaultValue: "Previous" })
|
|
504
507
|
]
|
|
505
508
|
}
|
|
@@ -518,7 +521,7 @@ const at = ({
|
|
|
518
521
|
dataTestId: "govie-pagination-next-btn",
|
|
519
522
|
children: [
|
|
520
523
|
!p && a("pagination.next", { defaultValue: "Next" }),
|
|
521
|
-
/* @__PURE__ */
|
|
524
|
+
/* @__PURE__ */ I(J.Fragment, { children: /* @__PURE__ */ I(be, { className: "gi-block gi-shrink-0" }) }, "next-btn-pagination")
|
|
522
525
|
]
|
|
523
526
|
}
|
|
524
527
|
)
|
|
@@ -2,7 +2,7 @@ import { jsxs as u, jsx as r } from "react/jsx-runtime";
|
|
|
2
2
|
import { Children as V } from "react";
|
|
3
3
|
import { cn as L } from "../cn.js";
|
|
4
4
|
import { Icon as j } from "../icon/icon.js";
|
|
5
|
-
import {
|
|
5
|
+
import { StepStatus as y, ProgressStepperIndicator as b } from "./types.js";
|
|
6
6
|
const B = (t) => `calc(100% + ${t * 4 - 36}px)`, D = ({
|
|
7
7
|
isNextStep: t,
|
|
8
8
|
orientation: a = "horizontal",
|
package/dist/spinner/spinner.js
CHANGED
package/dist/stack/stack.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as C, jsxs as h } from "react/jsx-runtime";
|
|
3
|
-
import { Children as R, Fragment as y,
|
|
3
|
+
import { Children as R, Fragment as y, isValidElement as d, cloneElement as X } from "react";
|
|
4
4
|
import { cn as c } from "../cn.js";
|
|
5
5
|
const p = (l) => typeof l == "string" ? {} : {
|
|
6
6
|
isBaseColumn: l.base === "column",
|
|
@@ -161,7 +161,7 @@ const p = (l) => typeof l == "string" ? {} : {
|
|
|
161
161
|
return /* @__PURE__ */ C("div", { className: f, style: { height: g }, ...w, children: (() => {
|
|
162
162
|
const n = R.toArray(l);
|
|
163
163
|
return n.map((o, i) => /* @__PURE__ */ h(y, { children: [
|
|
164
|
-
|
|
164
|
+
d(o) ? X(
|
|
165
165
|
o,
|
|
166
166
|
{
|
|
167
167
|
"data-testid": `govie-stack-item-${i}`
|