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