@ogcio/design-system-react 1.31.0 → 1.32.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/Heading.d.ts +5 -0
- package/dist/Heading.js +22 -0
- package/dist/alert/alert.d.ts +3 -0
- package/dist/alert/alert.js +46 -61
- package/dist/atoms/{DsButton.d.ts → Button.d.ts} +3 -3
- package/dist/atoms/{DsButton.js → Button.js} +20 -35
- package/dist/atoms/heading/H1.d.ts +3 -0
- package/dist/atoms/heading/H1.js +20 -0
- package/dist/atoms/heading/H2.d.ts +3 -0
- package/dist/atoms/heading/H2.js +20 -0
- package/dist/atoms/heading/H3.d.ts +3 -0
- package/dist/atoms/heading/H3.js +20 -0
- package/dist/atoms/heading/H4.d.ts +3 -0
- package/dist/atoms/heading/H4.js +20 -0
- package/dist/atoms/heading/H5.d.ts +3 -0
- package/dist/atoms/heading/H5.js +20 -0
- package/dist/atoms/heading/H6.d.ts +3 -0
- package/dist/atoms/heading/H6.js +20 -0
- package/dist/atoms/heading/index.d.ts +9 -0
- package/dist/atoms/heading/index.js +18 -0
- package/dist/atoms/heading/styles.d.ts +65 -0
- package/dist/atoms/heading/styles.js +17 -0
- package/dist/atoms/heading/types.d.ts +15 -0
- package/dist/atoms/heading/types.js +11 -0
- package/dist/atoms/heading/utils.d.ts +2 -0
- package/dist/atoms/heading/utils.js +5 -0
- package/dist/atoms/icons/ArrowLeft.d.ts +3 -0
- package/dist/atoms/icons/ArrowLeft.js +23 -0
- package/dist/atoms/icons/ArrowRight.d.ts +3 -0
- package/dist/atoms/icons/ArrowRight.js +23 -0
- package/dist/atoms/icons/CheckCircle.d.ts +3 -0
- package/dist/atoms/icons/CheckCircle.js +23 -0
- package/dist/atoms/icons/Error.d.ts +3 -0
- package/dist/atoms/icons/Error.js +23 -0
- package/dist/atoms/icons/FirstPage.d.ts +3 -0
- package/dist/atoms/icons/FirstPage.js +23 -0
- package/dist/atoms/icons/Info.d.ts +3 -0
- package/dist/atoms/icons/Info.js +23 -0
- package/dist/atoms/icons/KeyboardArrowLeft.d.ts +3 -0
- package/dist/atoms/icons/KeyboardArrowLeft.js +23 -0
- package/dist/atoms/icons/KeyboardArrowRight.d.ts +3 -0
- package/dist/atoms/icons/KeyboardArrowRight.js +23 -0
- package/dist/atoms/icons/LastPage.d.ts +3 -0
- package/dist/atoms/icons/LastPage.js +23 -0
- package/dist/atoms/icons/Warning.d.ts +3 -0
- package/dist/atoms/icons/Warning.js +23 -0
- package/dist/atoms/icons/index.d.ts +12 -2
- package/dist/atoms/icons/index.js +30 -10
- package/dist/atoms/icons/logos/LogoBlack.js +1 -1
- package/dist/atoms/icons/logos/LogoGoldGreen.js +1 -1
- package/dist/atoms/icons/logos/LogoGoldWhite.js +8 -8
- package/dist/atoms/icons/logos/LogoHarpBlack.js +1 -1
- package/dist/atoms/icons/logos/LogoWhite.js +1 -1
- package/dist/atoms/index.d.ts +2 -1
- package/dist/atoms/index.js +48 -12
- package/dist/atoms/storybook/Heading.meta.d.ts +60 -0
- package/dist/atoms/storybook/Heading.meta.js +70 -0
- package/dist/atoms/storybook/Icons.meta.d.ts +51 -0
- package/dist/atoms/storybook/Icons.meta.js +130 -0
- package/dist/atoms/storybook/InsetText.meta.d.ts +52 -0
- package/dist/atoms/storybook/InsetText.meta.js +64 -0
- package/dist/atoms/storybook/Logos.meta.d.ts +35 -0
- package/dist/atoms/storybook/Logos.meta.js +54 -0
- package/dist/breadcrumbs/breadcrumbs.js +20 -19
- package/dist/header/components/header-menu.js +21 -21
- package/dist/header/components/header-search.js +4 -4
- package/dist/icon/icon.js +85 -63
- package/dist/icon/icons.d.ts +1 -1
- package/dist/icons/index.d.ts +1 -1
- package/dist/icons/index.js +19 -10
- package/dist/index-Bh2cTIps.js +33899 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/input-text/input-text.js +1 -1
- package/dist/input-text/type.d.ts +1 -1
- package/dist/modal/modal.d.ts +1 -1
- package/dist/modal/modal.js +1 -1
- package/dist/pagination/pagination.js +139 -135
- package/dist/paragraph/paragraph.d.ts +1 -1
- package/dist/paragraph/paragraph.js +13 -11
- package/dist/side-nav/side-nav.js +4 -4
- package/dist/side-nav/types.d.ts +1 -1
- package/dist/styles.css +1 -1
- package/dist/table/table-pagination.js +17 -13
- package/package.json +6 -5
- package/dist/heading/heading.d.ts +0 -150
- package/dist/heading/heading.js +0 -50
package/dist/index.d.ts
CHANGED
|
@@ -40,7 +40,7 @@ export { HeaderSearch, type HeaderSearchProps, } from './header/components/heade
|
|
|
40
40
|
export { Header } from './header/header.js';
|
|
41
41
|
export * from './header/header-next/index.js';
|
|
42
42
|
export type { HeaderItem, HeaderProps } from './header/types.js';
|
|
43
|
-
export { Heading, type HeadingProps } from './
|
|
43
|
+
export { default as Heading, type Props as HeadingProps } from './Heading.js';
|
|
44
44
|
export type { HintTextProps } from './hint-text/types.js';
|
|
45
45
|
export * from './i18n/config.js';
|
|
46
46
|
export { IconButton, type IconButtonProps } from './icon-button/icon-button.js';
|
package/dist/index.js
CHANGED
|
@@ -37,7 +37,7 @@ import { HeaderMenuItemButton as We } from "./header/header-next/components/menu
|
|
|
37
37
|
import { HeaderMenuItemLink as Ue } from "./header/header-next/components/menu/components/header-menu-item-link.js";
|
|
38
38
|
import { HeaderMenuItemSeparator as qe } from "./header/header-next/components/menu/components/header-menu-item-separator.js";
|
|
39
39
|
import { HeaderMenuItemSlot as Je } from "./header/header-next/components/menu/components/header-menu-item-slot.js";
|
|
40
|
-
import {
|
|
40
|
+
import { default as Oe } from "./Heading.js";
|
|
41
41
|
import { initI18n as Xe } from "./i18n/config.js";
|
|
42
42
|
import { IconButton as Ze } from "./icon-button/icon-button.js";
|
|
43
43
|
import { Icon as $e } from "./icon/icon.js";
|
package/dist/modal/modal.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { HeadingProps } from '../
|
|
2
|
+
import { Props as HeadingProps } from '../Heading.js';
|
|
3
3
|
import { ModalFooterProps, ModalProps, ModalWrapperProps } from './types.js';
|
|
4
4
|
export declare const ModalWrapper: ({ position, size, closeOnClick, closeOnOverlayClick, isOpen, onClose, closeButtonLabel, className, children, closeButtonSize, closeOnEscape, dataTestId, ...props }: ModalWrapperProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
export declare const ModalTitle: {
|
package/dist/modal/modal.js
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import { jsx as l, jsxs as y, Fragment as j } from "react/jsx-runtime";
|
|
3
3
|
import { isValidElement as K, cloneElement as T, useState as A, useRef as U, useMemo as W, Children as _, useId as z, useEffect as C } from "react";
|
|
4
4
|
import { createPortal as G } from "react-dom";
|
|
5
|
+
import J from "../Heading.js";
|
|
5
6
|
import { Button as E } from "../button/button.js";
|
|
6
7
|
import { cn as u } from "../cn.js";
|
|
7
|
-
import { Heading as J } from "../heading/heading.js";
|
|
8
8
|
import { useAriaHider as Q } from "../hooks/use-aria-hider.js";
|
|
9
9
|
import { useFocusTrap as X } from "../hooks/use-focus-trap.js";
|
|
10
10
|
import { Icon as Y } from "../icon/icon.js";
|
|
@@ -1,17 +1,21 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import J, { createElement as
|
|
2
|
+
import { jsxs as B, jsx as j } from "react/jsx-runtime";
|
|
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
|
+
import "../atoms/Button.js";
|
|
5
|
+
import "../atoms/heading/styles.js";
|
|
6
|
+
import be from "../atoms/icons/ArrowLeft.js";
|
|
7
|
+
import ve from "../atoms/icons/ArrowRight.js";
|
|
4
8
|
import { Button as U } from "../button/button.js";
|
|
5
|
-
import { useBreakpoint as
|
|
6
|
-
import { Icon as
|
|
7
|
-
import { getDisplayPages as
|
|
8
|
-
import { w as
|
|
9
|
-
import { k as
|
|
10
|
-
import { g as
|
|
11
|
-
import { g as
|
|
12
|
-
var
|
|
13
|
-
function
|
|
14
|
-
return
|
|
9
|
+
import { useBreakpoint as Ne, Breakpoint as ne } from "../hooks/use-breakpoint.js";
|
|
10
|
+
import { Icon as xe } from "../icon/icon.js";
|
|
11
|
+
import { getDisplayPages as re } from "../utils/utilities.js";
|
|
12
|
+
import { w as ie, i as _, a as X, b as S, I as Ae, u as Ee } from "../useTranslation-DiBQuy8S.js";
|
|
13
|
+
import { k as $e } from "../i18next-Bfi2-LyH.js";
|
|
14
|
+
import { g as Te } from "../_commonjsHelpers-DaMA6jEr.js";
|
|
15
|
+
import { g as oe, b as le, u as ke } from "../i18nInstance-AYICsHJu.js";
|
|
16
|
+
var Y, se;
|
|
17
|
+
function Ce() {
|
|
18
|
+
return se || (se = 1, Y = {
|
|
15
19
|
area: !0,
|
|
16
20
|
base: !0,
|
|
17
21
|
br: !0,
|
|
@@ -26,25 +30,25 @@ function Te() {
|
|
|
26
30
|
source: !0,
|
|
27
31
|
track: !0,
|
|
28
32
|
wbr: !0
|
|
29
|
-
}),
|
|
33
|
+
}), Y;
|
|
30
34
|
}
|
|
31
|
-
var
|
|
32
|
-
const
|
|
33
|
-
var
|
|
34
|
-
function
|
|
35
|
+
var Oe = Ce();
|
|
36
|
+
const Ve = /* @__PURE__ */ Te(Oe);
|
|
37
|
+
var je = /\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g;
|
|
38
|
+
function ae(e) {
|
|
35
39
|
var t = { type: "tag", name: "", voidElement: !1, attrs: {}, children: [] }, n = e.match(/<\/?([^\s]+?)[/\s>]/);
|
|
36
|
-
if (n && (t.name = n[1], (
|
|
40
|
+
if (n && (t.name = n[1], (Ve[n[1]] || e.charAt(e.length - 2) === "/") && (t.voidElement = !0), t.name.startsWith("!--"))) {
|
|
37
41
|
var r = e.indexOf("-->");
|
|
38
42
|
return { type: "comment", comment: r !== -1 ? e.slice(4, r) : "" };
|
|
39
43
|
}
|
|
40
|
-
for (var a = new RegExp(
|
|
44
|
+
for (var a = new RegExp(je), s = null; (s = a.exec(e)) !== null; ) if (s[0].trim()) if (s[1]) {
|
|
41
45
|
var o = s[1].trim(), c = [o, ""];
|
|
42
46
|
o.indexOf("=") > -1 && (c = o.split("=")), t.attrs[c[0]] = c[1], a.lastIndex--;
|
|
43
47
|
} else s[2] && (t.attrs[s[2]] = s[3].trim().substring(1, s[3].length - 1));
|
|
44
48
|
return t;
|
|
45
49
|
}
|
|
46
|
-
var
|
|
47
|
-
function
|
|
50
|
+
var Ie = /<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g, Se = /^\s*$/, Le = /* @__PURE__ */ Object.create(null);
|
|
51
|
+
function ce(e, t) {
|
|
48
52
|
switch (t.type) {
|
|
49
53
|
case "text":
|
|
50
54
|
return e + t.content;
|
|
@@ -53,37 +57,37 @@ function ue(e, t) {
|
|
|
53
57
|
var r = [];
|
|
54
58
|
for (var a in n) r.push(a + '="' + n[a] + '"');
|
|
55
59
|
return r.length ? " " + r.join(" ") : "";
|
|
56
|
-
})(t.attrs) : "") + (t.voidElement ? "/>" : ">"), t.voidElement ? e : e + t.children.reduce(
|
|
60
|
+
})(t.attrs) : "") + (t.voidElement ? "/>" : ">"), t.voidElement ? e : e + t.children.reduce(ce, "") + "</" + t.name + ">";
|
|
57
61
|
case "comment":
|
|
58
62
|
return e + "<!--" + t.comment + "-->";
|
|
59
63
|
}
|
|
60
64
|
}
|
|
61
65
|
var _e = { parse: function(e, t) {
|
|
62
|
-
t || (t = {}), t.components || (t.components =
|
|
66
|
+
t || (t = {}), t.components || (t.components = Le);
|
|
63
67
|
var n, r = [], a = [], s = -1, o = !1;
|
|
64
68
|
if (e.indexOf("<") !== 0) {
|
|
65
69
|
var c = e.indexOf("<");
|
|
66
70
|
r.push({ type: "text", content: c === -1 ? e : e.substring(0, c) });
|
|
67
71
|
}
|
|
68
|
-
return e.replace(
|
|
72
|
+
return e.replace(Ie, function(f, m) {
|
|
69
73
|
if (o) {
|
|
70
74
|
if (f !== "</" + n.name + ">") return;
|
|
71
75
|
o = !1;
|
|
72
76
|
}
|
|
73
77
|
var p, N = f.charAt(1) !== "/", $ = f.startsWith("<!--"), g = m + f.length, l = e.charAt(g);
|
|
74
78
|
if ($) {
|
|
75
|
-
var T =
|
|
79
|
+
var T = ae(f);
|
|
76
80
|
return s < 0 ? (r.push(T), r) : ((p = a[s]).children.push(T), r);
|
|
77
81
|
}
|
|
78
|
-
if (N && (s++, (n =
|
|
82
|
+
if (N && (s++, (n = ae(f)).type === "tag" && t.components[n.name] && (n.type = "component", o = !0), n.voidElement || o || !l || l === "<" || n.children.push({ type: "text", content: e.slice(g, e.indexOf("<", g)) }), s === 0 && r.push(n), (p = a[s - 1]) && p.children.push(n), a[s] = n), (!N || n.voidElement) && (s > -1 && (n.voidElement || n.name === f.slice(2, -1)) && (s--, n = s === -1 ? r : a[s]), !o && l !== "<" && l)) {
|
|
79
83
|
p = s === -1 ? r : a[s].children;
|
|
80
84
|
var h = e.indexOf("<", g), x = e.slice(g, h === -1 ? void 0 : h);
|
|
81
|
-
|
|
85
|
+
Se.test(x) && (x = " "), (h > -1 && s + p.length >= 0 || x !== " ") && p.push({ type: "text", content: x });
|
|
82
86
|
}
|
|
83
87
|
}), r;
|
|
84
88
|
}, stringify: function(e) {
|
|
85
89
|
return e.reduce(function(t, n) {
|
|
86
|
-
return t +
|
|
90
|
+
return t + ce("", n);
|
|
87
91
|
}, "");
|
|
88
92
|
} };
|
|
89
93
|
const G = (e, t) => {
|
|
@@ -95,27 +99,27 @@ const G = (e, t) => {
|
|
|
95
99
|
var n, r;
|
|
96
100
|
if (!e) return [];
|
|
97
101
|
const t = ((n = e.props) == null ? void 0 : n.children) ?? e.children;
|
|
98
|
-
return (r = e.props) != null && r.i18nIsDynamicList ?
|
|
99
|
-
},
|
|
102
|
+
return (r = e.props) != null && r.i18nIsDynamicList ? L(t) : t;
|
|
103
|
+
}, Fe = (e) => Array.isArray(e) && e.every(D), L = (e) => Array.isArray(e) ? e : [e], we = (e, t) => {
|
|
100
104
|
const n = {
|
|
101
105
|
...t
|
|
102
106
|
};
|
|
103
107
|
return n.props = Object.assign(e.props, t.props), n;
|
|
104
|
-
},
|
|
108
|
+
}, Re = (e) => {
|
|
105
109
|
const t = {};
|
|
106
110
|
if (!e) return t;
|
|
107
111
|
const n = (r) => {
|
|
108
|
-
|
|
109
|
-
|
|
112
|
+
L(r).forEach((s) => {
|
|
113
|
+
_(s) || (G(s) ? n(q(s)) : S(s) && !D(s) && Object.assign(t, s));
|
|
110
114
|
});
|
|
111
115
|
};
|
|
112
116
|
return n(e), t;
|
|
113
|
-
},
|
|
117
|
+
}, ue = (e, t, n, r) => {
|
|
114
118
|
if (!e) return "";
|
|
115
119
|
let a = "";
|
|
116
|
-
const s =
|
|
120
|
+
const s = L(e), o = t != null && t.transSupportBasicHtmlNodes ? t.transKeepBasicHtmlNodesFor ?? [] : [];
|
|
117
121
|
return s.forEach((c, f) => {
|
|
118
|
-
if (
|
|
122
|
+
if (_(c)) {
|
|
119
123
|
a += `${c}`;
|
|
120
124
|
return;
|
|
121
125
|
}
|
|
@@ -132,21 +136,21 @@ const G = (e, t) => {
|
|
|
132
136
|
a += `<${f}></${f}>`;
|
|
133
137
|
return;
|
|
134
138
|
}
|
|
135
|
-
if ($ && N === 1 &&
|
|
139
|
+
if ($ && N === 1 && _(g)) {
|
|
136
140
|
a += `<${p}>${g}</${p}>`;
|
|
137
141
|
return;
|
|
138
142
|
}
|
|
139
|
-
const l =
|
|
143
|
+
const l = ue(g, t, n, r);
|
|
140
144
|
a += `<${f}>${l}</${f}>`;
|
|
141
145
|
return;
|
|
142
146
|
}
|
|
143
147
|
if (c === null) {
|
|
144
|
-
|
|
148
|
+
X(n, "TRANS_NULL_VALUE", "Passed in a null value as child", {
|
|
145
149
|
i18nKey: r
|
|
146
150
|
});
|
|
147
151
|
return;
|
|
148
152
|
}
|
|
149
|
-
if (
|
|
153
|
+
if (S(c)) {
|
|
150
154
|
const {
|
|
151
155
|
format: m,
|
|
152
156
|
...p
|
|
@@ -156,18 +160,18 @@ const G = (e, t) => {
|
|
|
156
160
|
a += `{{${$}}}`;
|
|
157
161
|
return;
|
|
158
162
|
}
|
|
159
|
-
|
|
163
|
+
X(n, "TRANS_INVALID_OBJ", "Invalid child - Object should only have keys {{ value, format }} (format is optional).", {
|
|
160
164
|
i18nKey: r,
|
|
161
165
|
child: c
|
|
162
166
|
});
|
|
163
167
|
return;
|
|
164
168
|
}
|
|
165
|
-
|
|
169
|
+
X(n, "TRANS_INVALID_VAR", "Passed in a variable like {number} - pass variables for interpolation as full objects like {{number}}.", {
|
|
166
170
|
i18nKey: r,
|
|
167
171
|
child: c
|
|
168
172
|
});
|
|
169
173
|
}), a;
|
|
170
|
-
},
|
|
174
|
+
}, ze = (e, t = [], n = {}) => {
|
|
171
175
|
if (!e) return e;
|
|
172
176
|
const r = Object.keys(n), a = [...t, ...r];
|
|
173
177
|
let s = "", o = 0;
|
|
@@ -190,124 +194,124 @@ const G = (e, t) => {
|
|
|
190
194
|
} else
|
|
191
195
|
s += e[o], o += 1;
|
|
192
196
|
return s;
|
|
193
|
-
},
|
|
197
|
+
}, Be = (e, t, n, r, a, s, o) => {
|
|
194
198
|
if (n === "") return [];
|
|
195
199
|
const c = a.transKeepBasicHtmlNodesFor || [], f = n && new RegExp(c.map((u) => `<${u}`).join("|")).test(n);
|
|
196
200
|
if (!e && !t && !f && !o) return [n];
|
|
197
201
|
const m = t ?? {}, p = (u) => {
|
|
198
|
-
|
|
199
|
-
|
|
202
|
+
L(u).forEach((y) => {
|
|
203
|
+
_(y) || (G(y) ? p(q(y)) : S(y) && !D(y) && Object.assign(m, y));
|
|
200
204
|
});
|
|
201
205
|
};
|
|
202
206
|
p(e);
|
|
203
|
-
const N =
|
|
207
|
+
const N = ze(n, c, m), $ = _e.parse(`<0>${N}</0>`), g = {
|
|
204
208
|
...m,
|
|
205
209
|
...s
|
|
206
210
|
}, l = (u, A, y) => {
|
|
207
211
|
var d;
|
|
208
212
|
const E = q(u), I = h(E, A.children, y);
|
|
209
|
-
return
|
|
213
|
+
return Fe(E) && I.length === 0 || (d = u.props) != null && d.i18nIsDynamicList ? E : I;
|
|
210
214
|
}, T = (u, A, y, E, I) => {
|
|
211
|
-
u.dummy ? (u.children = A, y.push(
|
|
215
|
+
u.dummy ? (u.children = A, y.push(Q(u, {
|
|
212
216
|
key: E
|
|
213
|
-
}, I ? void 0 : A))) : y.push(...
|
|
217
|
+
}, I ? void 0 : A))) : y.push(...me.map([u], (d) => {
|
|
214
218
|
const i = "data-i18n-is-dynamic-list", O = {
|
|
215
219
|
key: E,
|
|
216
220
|
[i]: void 0
|
|
217
221
|
};
|
|
218
|
-
return d && d.props && Object.keys(d.props).forEach((
|
|
219
|
-
|
|
220
|
-
}),
|
|
222
|
+
return d && d.props && Object.keys(d.props).forEach((k) => {
|
|
223
|
+
k === "ref" || k === "children" || k === "i18nIsDynamicList" || k === i || (O[k] = d.props[k]);
|
|
224
|
+
}), Q(d, O, I ? null : A);
|
|
221
225
|
}));
|
|
222
226
|
}, h = (u, A, y) => {
|
|
223
|
-
const E =
|
|
224
|
-
return
|
|
227
|
+
const E = L(u);
|
|
228
|
+
return L(A).reduce((d, i, O) => {
|
|
225
229
|
var F, H;
|
|
226
|
-
const
|
|
230
|
+
const k = ((H = (F = i.children) == null ? void 0 : F[0]) == null ? void 0 : H.content) && r.services.interpolator.interpolate(i.children[0].content, g, r.language);
|
|
227
231
|
if (i.type === "tag") {
|
|
228
|
-
let
|
|
229
|
-
!
|
|
232
|
+
let C = E[parseInt(i.name, 10)];
|
|
233
|
+
!C && t && (C = t[i.name]), y.length === 1 && !C && (C = y[0][i.name]), C || (C = {});
|
|
230
234
|
const V = {
|
|
231
235
|
...i.attrs
|
|
232
236
|
};
|
|
233
|
-
o && Object.keys(V).forEach((
|
|
234
|
-
const
|
|
235
|
-
|
|
237
|
+
o && Object.keys(V).forEach((v) => {
|
|
238
|
+
const z = V[v];
|
|
239
|
+
_(z) && (V[v] = ke(z));
|
|
236
240
|
});
|
|
237
|
-
const
|
|
241
|
+
const b = Object.keys(V).length !== 0 ? we({
|
|
238
242
|
props: V
|
|
239
|
-
},
|
|
240
|
-
if (
|
|
241
|
-
const
|
|
242
|
-
d.push(
|
|
243
|
-
} else if (G(
|
|
244
|
-
const
|
|
245
|
-
T(
|
|
243
|
+
}, C) : C, w = D(b), M = w && G(i, !0) && !i.voidElement, W = f && S(b) && b.dummy && !w, Z = S(t) && Object.hasOwnProperty.call(t, i.name);
|
|
244
|
+
if (_(b)) {
|
|
245
|
+
const v = r.services.interpolator.interpolate(b, g, r.language);
|
|
246
|
+
d.push(v);
|
|
247
|
+
} else if (G(b) || M) {
|
|
248
|
+
const v = l(b, i, y);
|
|
249
|
+
T(b, v, d, O);
|
|
246
250
|
} else if (W) {
|
|
247
|
-
const
|
|
248
|
-
T(
|
|
251
|
+
const v = h(E, i.children, y);
|
|
252
|
+
T(b, v, d, O);
|
|
249
253
|
} else if (Number.isNaN(parseFloat(i.name)))
|
|
250
254
|
if (Z) {
|
|
251
|
-
const
|
|
252
|
-
T(
|
|
255
|
+
const v = l(b, i, y);
|
|
256
|
+
T(b, v, d, O, i.voidElement);
|
|
253
257
|
} else if (a.transSupportBasicHtmlNodes && c.indexOf(i.name) > -1)
|
|
254
258
|
if (i.voidElement)
|
|
255
|
-
d.push(
|
|
259
|
+
d.push(R(i.name, {
|
|
256
260
|
key: `${i.name}-${O}`
|
|
257
261
|
}));
|
|
258
262
|
else {
|
|
259
|
-
const
|
|
260
|
-
d.push(
|
|
263
|
+
const v = h(E, i.children, y);
|
|
264
|
+
d.push(R(i.name, {
|
|
261
265
|
key: `${i.name}-${O}`
|
|
262
|
-
},
|
|
266
|
+
}, v));
|
|
263
267
|
}
|
|
264
268
|
else if (i.voidElement)
|
|
265
269
|
d.push(`<${i.name} />`);
|
|
266
270
|
else {
|
|
267
|
-
const
|
|
268
|
-
d.push(`<${i.name}>${
|
|
271
|
+
const v = h(E, i.children, y);
|
|
272
|
+
d.push(`<${i.name}>${v}</${i.name}>`);
|
|
269
273
|
}
|
|
270
|
-
else if (
|
|
271
|
-
const
|
|
272
|
-
|
|
274
|
+
else if (S(b) && !w) {
|
|
275
|
+
const v = i.children[0] ? k : null;
|
|
276
|
+
v && d.push(v);
|
|
273
277
|
} else
|
|
274
|
-
T(
|
|
278
|
+
T(b, k, d, O, i.children.length !== 1 || !k);
|
|
275
279
|
} else if (i.type === "text") {
|
|
276
|
-
const
|
|
277
|
-
|
|
280
|
+
const C = a.transWrapTextNodes, V = typeof a.unescape == "function" ? a.unescape : le().unescape, b = o ? V(r.services.interpolator.interpolate(i.content, g, r.language)) : r.services.interpolator.interpolate(i.content, g, r.language);
|
|
281
|
+
C ? d.push(R(C, {
|
|
278
282
|
key: `${i.name}-${O}`
|
|
279
|
-
},
|
|
283
|
+
}, b)) : d.push(b);
|
|
280
284
|
}
|
|
281
285
|
return d;
|
|
282
286
|
}, []);
|
|
283
287
|
}, x = h([{
|
|
284
288
|
dummy: !0,
|
|
285
289
|
children: e || []
|
|
286
|
-
}], $,
|
|
290
|
+
}], $, L(e || []));
|
|
287
291
|
return q(x[0]);
|
|
288
|
-
},
|
|
289
|
-
const r = e.key || t, a =
|
|
292
|
+
}, pe = (e, t, n) => {
|
|
293
|
+
const r = e.key || t, a = Q(e, {
|
|
290
294
|
key: r
|
|
291
295
|
});
|
|
292
296
|
if (!a.props || !a.props.children || n.indexOf(`${t}/>`) < 0 && n.indexOf(`${t} />`) < 0)
|
|
293
297
|
return a;
|
|
294
298
|
function s() {
|
|
295
|
-
return
|
|
299
|
+
return R(de, null, a);
|
|
296
300
|
}
|
|
297
|
-
return
|
|
301
|
+
return R(s, {
|
|
298
302
|
key: r
|
|
299
303
|
});
|
|
300
|
-
},
|
|
304
|
+
}, De = (e, t) => e.map((n, r) => pe(n, r, t)), He = (e, t) => {
|
|
301
305
|
const n = {};
|
|
302
306
|
return Object.keys(e).forEach((r) => {
|
|
303
307
|
Object.assign(n, {
|
|
304
|
-
[r]:
|
|
308
|
+
[r]: pe(e[r], r, t)
|
|
305
309
|
});
|
|
306
310
|
}), n;
|
|
307
|
-
},
|
|
311
|
+
}, Me = (e, t, n, r) => e ? Array.isArray(e) ? De(e, t) : S(e) ? He(e, t) : (ie(n, "TRANS_INVALID_COMPONENTS", '<Trans /> "components" prop expects an object or array', {
|
|
308
312
|
i18nKey: r
|
|
309
|
-
}), null) : null,
|
|
310
|
-
function
|
|
313
|
+
}), null) : null, We = (e) => !S(e) || Array.isArray(e) ? !1 : Object.keys(e).reduce((t, n) => t && Number.isNaN(Number.parseFloat(n)), !0);
|
|
314
|
+
function Ze({
|
|
311
315
|
children: e,
|
|
312
316
|
count: t,
|
|
313
317
|
parent: n,
|
|
@@ -323,18 +327,18 @@ function Me({
|
|
|
323
327
|
shouldUnescape: $,
|
|
324
328
|
...g
|
|
325
329
|
}) {
|
|
326
|
-
var
|
|
327
|
-
const l = p ||
|
|
330
|
+
var v, z, K, P, ee, te;
|
|
331
|
+
const l = p || oe();
|
|
328
332
|
if (!l)
|
|
329
|
-
return
|
|
333
|
+
return ie(l, "NO_I18NEXT_INSTANCE", "Trans: You need to pass in an i18next instance using i18nextReactModule", {
|
|
330
334
|
i18nKey: r
|
|
331
335
|
}), e;
|
|
332
|
-
const T = N || l.t.bind(l) || ((
|
|
333
|
-
...
|
|
334
|
-
...(
|
|
336
|
+
const T = N || l.t.bind(l) || ((fe) => fe), h = {
|
|
337
|
+
...le(),
|
|
338
|
+
...(v = l.options) == null ? void 0 : v.react
|
|
335
339
|
};
|
|
336
|
-
let x = m || T.ns || ((
|
|
337
|
-
x =
|
|
340
|
+
let x = m || T.ns || ((z = l.options) == null ? void 0 : z.defaultNS);
|
|
341
|
+
x = _(x) ? [x] : x || ["translation"];
|
|
338
342
|
const {
|
|
339
343
|
transDefaultProps: u
|
|
340
344
|
} = h, A = u != null && u.tOptions ? {
|
|
@@ -346,24 +350,24 @@ function Me({
|
|
|
346
350
|
} : o, I = u != null && u.components ? {
|
|
347
351
|
...u.components,
|
|
348
352
|
...f
|
|
349
|
-
} : f, d =
|
|
353
|
+
} : f, d = ue(e, h, l, r), i = c || (A == null ? void 0 : A.defaultValue) || d || h.transEmptyNodeValue || (typeof r == "function" ? $e(r) : r), {
|
|
350
354
|
hashTransKey: O
|
|
351
|
-
} = h,
|
|
352
|
-
(
|
|
355
|
+
} = h, k = r || (O ? O(d || i) : d || i);
|
|
356
|
+
(P = (K = l.options) == null ? void 0 : K.interpolation) != null && P.defaultVariables ? o = E && Object.keys(E).length > 0 ? {
|
|
353
357
|
...E,
|
|
354
358
|
...l.options.interpolation.defaultVariables
|
|
355
359
|
} : {
|
|
356
360
|
...l.options.interpolation.defaultVariables
|
|
357
361
|
} : o = E;
|
|
358
|
-
const F =
|
|
362
|
+
const F = Re(e);
|
|
359
363
|
F && typeof F.count == "number" && t === void 0 && (t = F.count);
|
|
360
|
-
const H = o || t !== void 0 && !((
|
|
364
|
+
const H = o || t !== void 0 && !((te = (ee = l.options) == null ? void 0 : ee.interpolation) != null && te.alwaysFormat) || !e ? A.interpolation : {
|
|
361
365
|
interpolation: {
|
|
362
366
|
...A.interpolation,
|
|
363
367
|
prefix: "#$?",
|
|
364
368
|
suffix: "?$#"
|
|
365
369
|
}
|
|
366
|
-
},
|
|
370
|
+
}, C = {
|
|
367
371
|
...A,
|
|
368
372
|
context: a || A.context,
|
|
369
373
|
count: t,
|
|
@@ -372,15 +376,15 @@ function Me({
|
|
|
372
376
|
defaultValue: i,
|
|
373
377
|
ns: x
|
|
374
378
|
};
|
|
375
|
-
let V =
|
|
376
|
-
V ===
|
|
377
|
-
const
|
|
378
|
-
let w =
|
|
379
|
-
|
|
380
|
-
const W =
|
|
381
|
-
return Z ?
|
|
379
|
+
let V = k ? T(k, C) : i;
|
|
380
|
+
V === k && i && (V = i);
|
|
381
|
+
const b = Me(I, V, l, r);
|
|
382
|
+
let w = b || e, M = null;
|
|
383
|
+
We(b) && (M = b, w = e);
|
|
384
|
+
const W = Be(w, M, V, l, h, C, y), Z = n ?? h.defaultTransParent;
|
|
385
|
+
return Z ? R(Z, g, W) : W;
|
|
382
386
|
}
|
|
383
|
-
function
|
|
387
|
+
function Ge({
|
|
384
388
|
children: e,
|
|
385
389
|
count: t,
|
|
386
390
|
parent: n,
|
|
@@ -400,8 +404,8 @@ function We({
|
|
|
400
404
|
const {
|
|
401
405
|
i18n: l,
|
|
402
406
|
defaultNS: T
|
|
403
|
-
} =
|
|
404
|
-
return
|
|
407
|
+
} = he(Ae) || {}, h = p || l || oe(), x = N || (h == null ? void 0 : h.t.bind(h));
|
|
408
|
+
return Ze({
|
|
405
409
|
children: e,
|
|
406
410
|
count: t,
|
|
407
411
|
parent: n,
|
|
@@ -418,22 +422,22 @@ function We({
|
|
|
418
422
|
...g
|
|
419
423
|
});
|
|
420
424
|
}
|
|
421
|
-
const
|
|
425
|
+
const it = ({
|
|
422
426
|
currentPage: e,
|
|
423
427
|
totalPages: t,
|
|
424
428
|
onPageChange: n,
|
|
425
429
|
dataTestid: r
|
|
426
430
|
}) => {
|
|
427
|
-
const { t: a } =
|
|
431
|
+
const { t: a } = Ee();
|
|
428
432
|
if (t === 0)
|
|
429
433
|
return null;
|
|
430
|
-
const { breakpoint: s, width: o } =
|
|
431
|
-
|
|
434
|
+
const { breakpoint: s, width: o } = Ne(), [c, f] = ge(!1);
|
|
435
|
+
ye(() => {
|
|
432
436
|
f(!0);
|
|
433
437
|
}, []);
|
|
434
|
-
const m = c && s ===
|
|
438
|
+
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(
|
|
435
439
|
(l, T) => l === -1 || l === -2 ? /* @__PURE__ */ j(J.Fragment, { children: /* @__PURE__ */ j(
|
|
436
|
-
|
|
440
|
+
xe,
|
|
437
441
|
{
|
|
438
442
|
role: "presentation",
|
|
439
443
|
className: "gi-text-gray-700",
|
|
@@ -454,14 +458,14 @@ const et = ({
|
|
|
454
458
|
},
|
|
455
459
|
l
|
|
456
460
|
)
|
|
457
|
-
), $ = () => /* @__PURE__ */ j("span", { className: "gi-text-md gi-leading-6", "aria-live": "polite", children: /* @__PURE__ */
|
|
458
|
-
|
|
461
|
+
), $ = () => /* @__PURE__ */ j("span", { className: "gi-text-md gi-leading-6", "aria-live": "polite", children: /* @__PURE__ */ B(
|
|
462
|
+
Ge,
|
|
459
463
|
{
|
|
460
464
|
i18nKey: "pagination.page",
|
|
461
465
|
values: { currentPage: e, totalPages: t },
|
|
462
466
|
components: { bold: /* @__PURE__ */ j("span", { className: "gi-font-bold" }) },
|
|
463
467
|
children: [
|
|
464
|
-
/* @__PURE__ */
|
|
468
|
+
/* @__PURE__ */ B("span", { className: "gi-font-bold", children: [
|
|
465
469
|
"Page ",
|
|
466
470
|
e
|
|
467
471
|
] }),
|
|
@@ -470,7 +474,7 @@ const et = ({
|
|
|
470
474
|
]
|
|
471
475
|
}
|
|
472
476
|
) });
|
|
473
|
-
return /* @__PURE__ */
|
|
477
|
+
return /* @__PURE__ */ B(
|
|
474
478
|
"div",
|
|
475
479
|
{
|
|
476
480
|
className: "gi-pagination",
|
|
@@ -482,7 +486,7 @@ const et = ({
|
|
|
482
486
|
}),
|
|
483
487
|
"data-testid": r,
|
|
484
488
|
children: [
|
|
485
|
-
/* @__PURE__ */
|
|
489
|
+
/* @__PURE__ */ B(
|
|
486
490
|
U,
|
|
487
491
|
{
|
|
488
492
|
variant: "flat",
|
|
@@ -496,13 +500,13 @@ const et = ({
|
|
|
496
500
|
className: p ? "gi-icon-btn-large" : "",
|
|
497
501
|
dataTestid: "govie-pagination-prev-btn",
|
|
498
502
|
children: [
|
|
499
|
-
/* @__PURE__ */ j(J.Fragment, { children: /* @__PURE__ */ j(
|
|
503
|
+
/* @__PURE__ */ j(J.Fragment, { children: /* @__PURE__ */ j(be, { className: "gi-block gi-shrink-0" }) }, "previous-btn-pagination"),
|
|
500
504
|
!p && a("pagination.previous", { defaultValue: "Previous" })
|
|
501
505
|
]
|
|
502
506
|
}
|
|
503
507
|
),
|
|
504
508
|
m ? $() : N(),
|
|
505
|
-
/* @__PURE__ */
|
|
509
|
+
/* @__PURE__ */ B(
|
|
506
510
|
U,
|
|
507
511
|
{
|
|
508
512
|
disabled: e === t,
|
|
@@ -515,7 +519,7 @@ const et = ({
|
|
|
515
519
|
dataTestid: "govie-pagination-next-btn",
|
|
516
520
|
children: [
|
|
517
521
|
!p && a("pagination.next", { defaultValue: "Next" }),
|
|
518
|
-
/* @__PURE__ */ j(J.Fragment, { children: /* @__PURE__ */ j(
|
|
522
|
+
/* @__PURE__ */ j(J.Fragment, { children: /* @__PURE__ */ j(ve, { className: "gi-block gi-shrink-0" }) }, "next-btn-pagination")
|
|
519
523
|
]
|
|
520
524
|
}
|
|
521
525
|
)
|
|
@@ -524,5 +528,5 @@ const et = ({
|
|
|
524
528
|
);
|
|
525
529
|
};
|
|
526
530
|
export {
|
|
527
|
-
|
|
531
|
+
it as Pagination
|
|
528
532
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export type ParagraphAs = 'p' | 'span';
|
|
2
|
-
export type ParagraphSize = 'lg' | 'md' | 'sm';
|
|
2
|
+
export type ParagraphSize = 'xl' | 'lg' | 'md' | 'sm';
|
|
3
3
|
export type ParagraphAlign = 'start' | 'center' | 'end' | 'justify';
|
|
4
4
|
export type ParagraphWhitespace = 'normal' | 'pre' | 'pre-wrap' | 'break-spaces';
|
|
5
5
|
export type ParagraphProps = {
|