@ogcio/design-system-react 1.27.0 → 1.28.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/autocomplete/use-autocomplete-controller.js +1 -1
- package/dist/browser-support/browser-support.js +1 -1
- package/dist/character-count/character-count.d.ts +6 -0
- package/dist/character-count/character-count.js +23 -0
- package/dist/character-count/types.d.ts +10 -0
- package/dist/character-count/types.js +1 -0
- package/dist/data-table/editable-table-cell.js +1 -1
- package/dist/forms/form-field/form-field.js +1 -1
- package/dist/forms/form-field-with-tag/form-field-with-tag.js +1 -1
- package/dist/header/header-next/components/menu/components/header-menu-item-button.js +1 -1
- package/dist/header/header-next/components/menu/components/header-menu-item-link.js +1 -1
- package/dist/hooks/use-focus-trap.js +574 -416
- package/dist/i18n/config.js +2 -2
- package/dist/i18n/utility.js +1 -1
- package/dist/{i18nInstance-D_96ADqd.js → i18nInstance-AYICsHJu.js} +8 -6
- package/dist/{i18next-B_GQfCrJ.js → i18next-Bfi2-LyH.js} +125 -117
- package/dist/index-D_wwt4P0.js +87 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +230 -228
- package/dist/link/link.js +33 -33
- package/dist/{lodash-LsP9-6SV.js → lodash-82PmXrjJ.js} +16 -16
- package/dist/pagination/pagination.js +249 -221
- package/dist/primitives/anchor.js +1 -1
- package/dist/styles.css +1 -1
- package/dist/textarea/textarea.d.ts +6 -0
- package/dist/textarea/textarea.js +33 -33
- package/dist/useTranslation-DiBQuy8S.js +268 -0
- package/package.json +2 -2
- package/dist/index-2sRBqKFV.js +0 -78
- package/dist/useTranslation-BmIU4GBA.js +0 -272
|
@@ -4,6 +4,12 @@ export type TextAreaProps = React.DetailedHTMLProps<TextareaHTMLAttributes<HTMLT
|
|
|
4
4
|
rows?: number;
|
|
5
5
|
cols?: number;
|
|
6
6
|
autoComplete?: string;
|
|
7
|
+
/**
|
|
8
|
+
* @deprecated Use the `maxLength` + `CharacterCount` component instead for displaying remaining characters.
|
|
9
|
+
* `maxChars` works correctly in controlled mode (when passing `value`), but in uncontrolled mode
|
|
10
|
+
* (e.g., with React Hook Form), the character count may not update correctly after `reset()`.
|
|
11
|
+
* For uncontrolled usage, use `CharacterCount` with `watch()` or state to track the current value length.
|
|
12
|
+
*/
|
|
7
13
|
maxChars?: number;
|
|
8
14
|
halfFluid?: boolean;
|
|
9
15
|
iconStart?: IconId;
|
|
@@ -1,41 +1,41 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs as g, Fragment as j, jsx as e } from "react/jsx-runtime";
|
|
3
|
-
import { forwardRef as z, useRef as A, useState as
|
|
4
|
-
import { cn as
|
|
3
|
+
import { forwardRef as z, useRef as A, useState as h, useImperativeHandle as H, useEffect as O } from "react";
|
|
4
|
+
import { cn as v } from "../cn.js";
|
|
5
5
|
import { HintText as F } from "../hint-text/hint-text.js";
|
|
6
6
|
import { translate as L } from "../i18n/utility.js";
|
|
7
|
-
import { Icon as
|
|
8
|
-
import { IconButton as
|
|
9
|
-
const
|
|
7
|
+
import { Icon as S } from "../icon/icon.js";
|
|
8
|
+
import { IconButton as Y } from "../icon-button/icon-button.js";
|
|
9
|
+
const $ = z(
|
|
10
10
|
({
|
|
11
|
-
value:
|
|
11
|
+
value: r,
|
|
12
12
|
rows: p = 4,
|
|
13
13
|
cols: x = 100,
|
|
14
14
|
autoComplete: b = "on",
|
|
15
15
|
maxChars: t,
|
|
16
16
|
halfFluid: N = !1,
|
|
17
|
-
iconStart:
|
|
17
|
+
iconStart: l,
|
|
18
18
|
className: R,
|
|
19
|
-
clearButtonEnabled:
|
|
19
|
+
clearButtonEnabled: d,
|
|
20
20
|
onChange: a,
|
|
21
|
-
name:
|
|
22
|
-
...
|
|
21
|
+
name: s,
|
|
22
|
+
...c
|
|
23
23
|
}, V) => {
|
|
24
|
-
const n = A(null), [
|
|
24
|
+
const n = A(null), [u, I] = h(
|
|
25
25
|
t
|
|
26
26
|
);
|
|
27
27
|
H(V, () => n.current);
|
|
28
|
-
const [T,
|
|
28
|
+
const [T, f] = h(""), i = r !== void 0, m = i ? String(r) : T;
|
|
29
29
|
O(() => {
|
|
30
|
-
t !== void 0 && I(t -
|
|
31
|
-
}, [
|
|
30
|
+
t !== void 0 && I(t - m.length);
|
|
31
|
+
}, [m, t]);
|
|
32
32
|
const k = (o) => {
|
|
33
33
|
const y = o.target.value;
|
|
34
|
-
|
|
34
|
+
i || f(y), a && a(o);
|
|
35
35
|
}, w = () => {
|
|
36
|
-
n.current && (
|
|
37
|
-
target: { name:
|
|
38
|
-
currentTarget: { name:
|
|
36
|
+
n.current && (i || f(""), a && a({
|
|
37
|
+
target: { name: s, value: "" },
|
|
38
|
+
currentTarget: { name: s, value: "" },
|
|
39
39
|
type: "change",
|
|
40
40
|
bubbles: !0
|
|
41
41
|
}), n.current.focus());
|
|
@@ -44,33 +44,33 @@ const q = z(
|
|
|
44
44
|
/* @__PURE__ */ e("div", { className: "gi-textarea-container", children: /* @__PURE__ */ g(
|
|
45
45
|
"div",
|
|
46
46
|
{
|
|
47
|
-
className:
|
|
47
|
+
className: v("gi-textarea-inner", {
|
|
48
48
|
"gi-input-half-width": N
|
|
49
49
|
}),
|
|
50
50
|
children: [
|
|
51
|
-
|
|
51
|
+
l && /* @__PURE__ */ e("div", { className: "gi-text-area-icon-start", children: /* @__PURE__ */ e(S, { icon: l, size: "md", disabled: c.disabled }) }),
|
|
52
52
|
/* @__PURE__ */ e(
|
|
53
53
|
"textarea",
|
|
54
54
|
{
|
|
55
|
-
name:
|
|
55
|
+
name: s,
|
|
56
56
|
rows: p,
|
|
57
57
|
cols: x,
|
|
58
58
|
autoComplete: b,
|
|
59
|
-
className:
|
|
59
|
+
className: v(R, "gi-textarea"),
|
|
60
60
|
ref: n,
|
|
61
|
-
"data-icon-start": !!
|
|
62
|
-
"data-clear-enabled":
|
|
61
|
+
"data-icon-start": !!l,
|
|
62
|
+
"data-clear-enabled": d,
|
|
63
63
|
maxLength: t,
|
|
64
|
-
value:
|
|
64
|
+
...i ? { value: String(r) } : {},
|
|
65
65
|
onChange: k,
|
|
66
|
-
...
|
|
66
|
+
...c
|
|
67
67
|
}
|
|
68
68
|
),
|
|
69
|
-
|
|
70
|
-
|
|
69
|
+
d ? /* @__PURE__ */ e("div", { className: "gi-text-area-end-element", children: /* @__PURE__ */ e(
|
|
70
|
+
Y,
|
|
71
71
|
{
|
|
72
72
|
type: "button",
|
|
73
|
-
disabled:
|
|
73
|
+
disabled: c.disabled,
|
|
74
74
|
icon: {
|
|
75
75
|
icon: "close"
|
|
76
76
|
},
|
|
@@ -87,15 +87,15 @@ const q = z(
|
|
|
87
87
|
F,
|
|
88
88
|
{
|
|
89
89
|
text: L("textarea.remainingChars", {
|
|
90
|
-
remainingChars:
|
|
91
|
-
defaultValue: `You have ${
|
|
90
|
+
remainingChars: u,
|
|
91
|
+
defaultValue: `You have ${u} characters remaining`
|
|
92
92
|
})
|
|
93
93
|
}
|
|
94
94
|
) })
|
|
95
95
|
] });
|
|
96
96
|
}
|
|
97
97
|
);
|
|
98
|
-
|
|
98
|
+
$.displayName = "TextArea";
|
|
99
99
|
export {
|
|
100
|
-
|
|
100
|
+
$ as TextArea
|
|
101
101
|
};
|
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
import W, { createContext as J, useContext as Q, useMemo as A, useRef as C, useCallback as q, useState as Z, useEffect as ee } from "react";
|
|
2
|
+
import { g as te, b as ne } from "./i18nInstance-AYICsHJu.js";
|
|
3
|
+
const re = (e, n, r, g) => {
|
|
4
|
+
var t, S, h, _;
|
|
5
|
+
const c = [r, {
|
|
6
|
+
code: n,
|
|
7
|
+
...g || {}
|
|
8
|
+
}];
|
|
9
|
+
if ((S = (t = e == null ? void 0 : e.services) == null ? void 0 : t.logger) != null && S.forward)
|
|
10
|
+
return e.services.logger.forward(c, "warn", "react-i18next::", !0);
|
|
11
|
+
w(c[0]) && (c[0] = `react-i18next:: ${c[0]}`), (_ = (h = e == null ? void 0 : e.services) == null ? void 0 : h.logger) != null && _.warn ? e.services.logger.warn(...c) : console != null && console.warn && console.warn(...c);
|
|
12
|
+
}, z = {}, $ = (e, n, r, g) => {
|
|
13
|
+
w(r) && z[r] || (w(r) && (z[r] = /* @__PURE__ */ new Date()), re(e, n, r, g));
|
|
14
|
+
}, F = (e, n) => () => {
|
|
15
|
+
if (e.isInitialized)
|
|
16
|
+
n();
|
|
17
|
+
else {
|
|
18
|
+
const r = () => {
|
|
19
|
+
setTimeout(() => {
|
|
20
|
+
e.off("initialized", r);
|
|
21
|
+
}, 0), n();
|
|
22
|
+
};
|
|
23
|
+
e.on("initialized", r);
|
|
24
|
+
}
|
|
25
|
+
}, D = (e, n, r) => {
|
|
26
|
+
e.loadNamespaces(n, F(e, r));
|
|
27
|
+
}, B = (e, n, r, g) => {
|
|
28
|
+
if (w(r) && (r = [r]), e.options.preload && e.options.preload.indexOf(n) > -1) return D(e, r, g);
|
|
29
|
+
r.forEach((c) => {
|
|
30
|
+
e.options.ns.indexOf(c) < 0 && e.options.ns.push(c);
|
|
31
|
+
}), e.loadLanguages(n, F(e, g));
|
|
32
|
+
}, ae = (e, n, r = {}) => !n.languages || !n.languages.length ? ($(n, "NO_LANGUAGES", "i18n.languages were undefined or empty", {
|
|
33
|
+
languages: n.languages
|
|
34
|
+
}), !0) : n.hasLoadedNamespace(e, {
|
|
35
|
+
lng: r.lng,
|
|
36
|
+
precheck: (g, c) => {
|
|
37
|
+
if (r.bindI18n && r.bindI18n.indexOf("languageChanging") > -1 && g.services.backendConnector.backend && g.isLanguageChangingTo && !c(g.isLanguageChangingTo, e)) return !1;
|
|
38
|
+
}
|
|
39
|
+
}), w = (e) => typeof e == "string", oe = (e) => typeof e == "object" && e !== null, se = J();
|
|
40
|
+
class ce {
|
|
41
|
+
constructor() {
|
|
42
|
+
this.usedNamespaces = {};
|
|
43
|
+
}
|
|
44
|
+
addUsedNamespaces(n) {
|
|
45
|
+
n.forEach((r) => {
|
|
46
|
+
this.usedNamespaces[r] || (this.usedNamespaces[r] = !0);
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
getUsedNamespaces() {
|
|
50
|
+
return Object.keys(this.usedNamespaces);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
var R = { exports: {} }, j = {};
|
|
54
|
+
/**
|
|
55
|
+
* @license React
|
|
56
|
+
* use-sync-external-store-shim.production.js
|
|
57
|
+
*
|
|
58
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
59
|
+
*
|
|
60
|
+
* This source code is licensed under the MIT license found in the
|
|
61
|
+
* LICENSE file in the root directory of this source tree.
|
|
62
|
+
*/
|
|
63
|
+
var H;
|
|
64
|
+
function ue() {
|
|
65
|
+
if (H) return j;
|
|
66
|
+
H = 1;
|
|
67
|
+
var e = W;
|
|
68
|
+
function n(a, d) {
|
|
69
|
+
return a === d && (a !== 0 || 1 / a === 1 / d) || a !== a && d !== d;
|
|
70
|
+
}
|
|
71
|
+
var r = typeof Object.is == "function" ? Object.is : n, g = e.useState, c = e.useEffect, t = e.useLayoutEffect, S = e.useDebugValue;
|
|
72
|
+
function h(a, d) {
|
|
73
|
+
var o = d(), u = g({ inst: { value: o, getSnapshot: d } }), l = u[0].inst, y = u[1];
|
|
74
|
+
return t(
|
|
75
|
+
function() {
|
|
76
|
+
l.value = o, l.getSnapshot = d, _(l) && y({ inst: l });
|
|
77
|
+
},
|
|
78
|
+
[a, o, d]
|
|
79
|
+
), c(
|
|
80
|
+
function() {
|
|
81
|
+
return _(l) && y({ inst: l }), a(function() {
|
|
82
|
+
_(l) && y({ inst: l });
|
|
83
|
+
});
|
|
84
|
+
},
|
|
85
|
+
[a]
|
|
86
|
+
), S(o), o;
|
|
87
|
+
}
|
|
88
|
+
function _(a) {
|
|
89
|
+
var d = a.getSnapshot;
|
|
90
|
+
a = a.value;
|
|
91
|
+
try {
|
|
92
|
+
var o = d();
|
|
93
|
+
return !r(a, o);
|
|
94
|
+
} catch {
|
|
95
|
+
return !0;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
function O(a, d) {
|
|
99
|
+
return d();
|
|
100
|
+
}
|
|
101
|
+
var m = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? O : h;
|
|
102
|
+
return j.useSyncExternalStore = e.useSyncExternalStore !== void 0 ? e.useSyncExternalStore : m, j;
|
|
103
|
+
}
|
|
104
|
+
var U = {};
|
|
105
|
+
/**
|
|
106
|
+
* @license React
|
|
107
|
+
* use-sync-external-store-shim.development.js
|
|
108
|
+
*
|
|
109
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
110
|
+
*
|
|
111
|
+
* This source code is licensed under the MIT license found in the
|
|
112
|
+
* LICENSE file in the root directory of this source tree.
|
|
113
|
+
*/
|
|
114
|
+
var K;
|
|
115
|
+
function ie() {
|
|
116
|
+
return K || (K = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
117
|
+
function e(o, u) {
|
|
118
|
+
return o === u && (o !== 0 || 1 / o === 1 / u) || o !== o && u !== u;
|
|
119
|
+
}
|
|
120
|
+
function n(o, u) {
|
|
121
|
+
m || c.startTransition === void 0 || (m = !0, console.error(
|
|
122
|
+
"You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."
|
|
123
|
+
));
|
|
124
|
+
var l = u();
|
|
125
|
+
if (!a) {
|
|
126
|
+
var y = u();
|
|
127
|
+
t(l, y) || (console.error(
|
|
128
|
+
"The result of getSnapshot should be cached to avoid an infinite loop"
|
|
129
|
+
), a = !0);
|
|
130
|
+
}
|
|
131
|
+
y = S({
|
|
132
|
+
inst: { value: l, getSnapshot: u }
|
|
133
|
+
});
|
|
134
|
+
var E = y[0].inst, v = y[1];
|
|
135
|
+
return _(
|
|
136
|
+
function() {
|
|
137
|
+
E.value = l, E.getSnapshot = u, r(E) && v({ inst: E });
|
|
138
|
+
},
|
|
139
|
+
[o, l, u]
|
|
140
|
+
), h(
|
|
141
|
+
function() {
|
|
142
|
+
return r(E) && v({ inst: E }), o(function() {
|
|
143
|
+
r(E) && v({ inst: E });
|
|
144
|
+
});
|
|
145
|
+
},
|
|
146
|
+
[o]
|
|
147
|
+
), O(l), l;
|
|
148
|
+
}
|
|
149
|
+
function r(o) {
|
|
150
|
+
var u = o.getSnapshot;
|
|
151
|
+
o = o.value;
|
|
152
|
+
try {
|
|
153
|
+
var l = u();
|
|
154
|
+
return !t(o, l);
|
|
155
|
+
} catch {
|
|
156
|
+
return !0;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
function g(o, u) {
|
|
160
|
+
return u();
|
|
161
|
+
}
|
|
162
|
+
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
163
|
+
var c = W, t = typeof Object.is == "function" ? Object.is : e, S = c.useState, h = c.useEffect, _ = c.useLayoutEffect, O = c.useDebugValue, m = !1, a = !1, d = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? g : n;
|
|
164
|
+
U.useSyncExternalStore = c.useSyncExternalStore !== void 0 ? c.useSyncExternalStore : d, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
165
|
+
})()), U;
|
|
166
|
+
}
|
|
167
|
+
var M;
|
|
168
|
+
function le() {
|
|
169
|
+
return M || (M = 1, process.env.NODE_ENV === "production" ? R.exports = ue() : R.exports = ie()), R.exports;
|
|
170
|
+
}
|
|
171
|
+
var fe = le();
|
|
172
|
+
const de = (e, n) => w(n) ? n : oe(n) && w(n.defaultValue) ? n.defaultValue : Array.isArray(e) ? e[e.length - 1] : e, pe = {
|
|
173
|
+
t: de,
|
|
174
|
+
ready: !1
|
|
175
|
+
}, ge = () => () => {
|
|
176
|
+
}, ye = (e, n = {}) => {
|
|
177
|
+
var k, N, P;
|
|
178
|
+
const {
|
|
179
|
+
i18n: r
|
|
180
|
+
} = n, {
|
|
181
|
+
i18n: g,
|
|
182
|
+
defaultNS: c
|
|
183
|
+
} = Q(se) || {}, t = r || g || te();
|
|
184
|
+
t && !t.reportNamespaces && (t.reportNamespaces = new ce()), t || $(t, "NO_I18NEXT_INSTANCE", "useTranslation: You will need to pass in an i18next instance by using initReactI18next");
|
|
185
|
+
const S = A(() => {
|
|
186
|
+
var s;
|
|
187
|
+
return {
|
|
188
|
+
...ne(),
|
|
189
|
+
...(s = t == null ? void 0 : t.options) == null ? void 0 : s.react,
|
|
190
|
+
...n
|
|
191
|
+
};
|
|
192
|
+
}, [t, n]), {
|
|
193
|
+
useSuspense: h,
|
|
194
|
+
keyPrefix: _
|
|
195
|
+
} = S, O = c || ((k = t == null ? void 0 : t.options) == null ? void 0 : k.defaultNS), m = w(O) ? [O] : O || ["translation"], a = A(() => m, m);
|
|
196
|
+
(P = (N = t == null ? void 0 : t.reportNamespaces) == null ? void 0 : N.addUsedNamespaces) == null || P.call(N, a);
|
|
197
|
+
const d = C(0), o = q((s) => {
|
|
198
|
+
if (!t) return ge;
|
|
199
|
+
const {
|
|
200
|
+
bindI18n: i,
|
|
201
|
+
bindI18nStore: f
|
|
202
|
+
} = S, p = () => {
|
|
203
|
+
d.current += 1, s();
|
|
204
|
+
};
|
|
205
|
+
return i && t.on(i, p), f && t.store.on(f, p), () => {
|
|
206
|
+
i && i.split(" ").forEach((T) => t.off(T, p)), f && f.split(" ").forEach((T) => t.store.off(T, p));
|
|
207
|
+
};
|
|
208
|
+
}, [t, S]), u = C(), l = q(() => {
|
|
209
|
+
if (!t)
|
|
210
|
+
return pe;
|
|
211
|
+
const s = !!(t.isInitialized || t.initializedStoreOnce) && a.every((X) => ae(X, t, S)), i = n.lng || t.language, f = d.current, p = u.current;
|
|
212
|
+
if (p && p.ready === s && p.lng === i && p.keyPrefix === _ && p.revision === f)
|
|
213
|
+
return p;
|
|
214
|
+
const V = {
|
|
215
|
+
t: t.getFixedT(i, S.nsMode === "fallback" ? a : a[0], _),
|
|
216
|
+
ready: s,
|
|
217
|
+
lng: i,
|
|
218
|
+
keyPrefix: _,
|
|
219
|
+
revision: f
|
|
220
|
+
};
|
|
221
|
+
return u.current = V, V;
|
|
222
|
+
}, [t, a, _, S, n.lng]), [y, E] = Z(0), {
|
|
223
|
+
t: v,
|
|
224
|
+
ready: L
|
|
225
|
+
} = fe.useSyncExternalStore(o, l, l);
|
|
226
|
+
ee(() => {
|
|
227
|
+
if (t && !L && !h) {
|
|
228
|
+
const s = () => E((i) => i + 1);
|
|
229
|
+
n.lng ? B(t, n.lng, a, s) : D(t, a, s);
|
|
230
|
+
}
|
|
231
|
+
}, [t, n.lng, a, L, h, y]);
|
|
232
|
+
const x = t || {}, b = C(null), I = C(), G = (s) => {
|
|
233
|
+
const i = Object.getOwnPropertyDescriptors(s);
|
|
234
|
+
i.__original && delete i.__original;
|
|
235
|
+
const f = Object.create(Object.getPrototypeOf(s), i);
|
|
236
|
+
if (!Object.prototype.hasOwnProperty.call(f, "__original"))
|
|
237
|
+
try {
|
|
238
|
+
Object.defineProperty(f, "__original", {
|
|
239
|
+
value: s,
|
|
240
|
+
writable: !1,
|
|
241
|
+
enumerable: !1,
|
|
242
|
+
configurable: !1
|
|
243
|
+
});
|
|
244
|
+
} catch {
|
|
245
|
+
}
|
|
246
|
+
return f;
|
|
247
|
+
}, Y = A(() => {
|
|
248
|
+
const s = x, i = s == null ? void 0 : s.language;
|
|
249
|
+
let f = s;
|
|
250
|
+
s && (b.current && b.current.__original === s ? I.current !== i ? (f = G(s), b.current = f, I.current = i) : f = b.current : (f = G(s), b.current = f, I.current = i));
|
|
251
|
+
const p = [v, f, L];
|
|
252
|
+
return p.t = v, p.i18n = f, p.ready = L, p;
|
|
253
|
+
}, [v, x, L, x.resolvedLanguage, x.language, x.languages]);
|
|
254
|
+
if (t && h && !L)
|
|
255
|
+
throw new Promise((s) => {
|
|
256
|
+
const i = () => s();
|
|
257
|
+
n.lng ? B(t, n.lng, a, i) : D(t, a, i);
|
|
258
|
+
});
|
|
259
|
+
return Y;
|
|
260
|
+
};
|
|
261
|
+
export {
|
|
262
|
+
se as I,
|
|
263
|
+
re as a,
|
|
264
|
+
oe as b,
|
|
265
|
+
w as i,
|
|
266
|
+
ye as u,
|
|
267
|
+
$ as w
|
|
268
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ogcio/design-system-react",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.28.0",
|
|
4
4
|
"description": "The Government of Ireland Design System React components.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"@ogcio/design-system-prettier-config": "1.1.0",
|
|
56
56
|
"@ogcio/design-system-tailwind": "1.21.2",
|
|
57
57
|
"@ogcio/theme-doete": "1.0.0",
|
|
58
|
-
"@ogcio/theme-govie": "1.21.
|
|
58
|
+
"@ogcio/theme-govie": "1.21.2"
|
|
59
59
|
},
|
|
60
60
|
"scripts": {
|
|
61
61
|
"format": "prettier 'src/**/*.{ts,tsx}' --write",
|
package/dist/index-2sRBqKFV.js
DELETED
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import * as i from "react";
|
|
2
|
-
import { jsx as f, Fragment as S } from "react/jsx-runtime";
|
|
3
|
-
function d(t, e) {
|
|
4
|
-
if (typeof t == "function")
|
|
5
|
-
return t(e);
|
|
6
|
-
t != null && (t.current = e);
|
|
7
|
-
}
|
|
8
|
-
function g(...t) {
|
|
9
|
-
return (e) => {
|
|
10
|
-
let r = !1;
|
|
11
|
-
const o = t.map((n) => {
|
|
12
|
-
const l = d(n, e);
|
|
13
|
-
return !r && typeof l == "function" && (r = !0), l;
|
|
14
|
-
});
|
|
15
|
-
if (r)
|
|
16
|
-
return () => {
|
|
17
|
-
for (let n = 0; n < o.length; n++) {
|
|
18
|
-
const l = o[n];
|
|
19
|
-
typeof l == "function" ? l() : d(t[n], null);
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
// @__NO_SIDE_EFFECTS__
|
|
25
|
-
function b(t) {
|
|
26
|
-
const e = /* @__PURE__ */ C(t), r = i.forwardRef((o, n) => {
|
|
27
|
-
const { children: l, ...a } = o, s = i.Children.toArray(l), c = s.find(h);
|
|
28
|
-
if (c) {
|
|
29
|
-
const u = c.props.children, m = s.map((p) => p === c ? i.Children.count(u) > 1 ? i.Children.only(null) : i.isValidElement(u) ? u.props.children : null : p);
|
|
30
|
-
return /* @__PURE__ */ f(e, { ...a, ref: n, children: i.isValidElement(u) ? i.cloneElement(u, void 0, m) : null });
|
|
31
|
-
}
|
|
32
|
-
return /* @__PURE__ */ f(e, { ...a, ref: n, children: l });
|
|
33
|
-
});
|
|
34
|
-
return r.displayName = `${t}.Slot`, r;
|
|
35
|
-
}
|
|
36
|
-
var I = /* @__PURE__ */ b("Slot");
|
|
37
|
-
// @__NO_SIDE_EFFECTS__
|
|
38
|
-
function C(t) {
|
|
39
|
-
const e = i.forwardRef((r, o) => {
|
|
40
|
-
const { children: n, ...l } = r;
|
|
41
|
-
if (i.isValidElement(n)) {
|
|
42
|
-
const a = _(n), s = R(l, n.props);
|
|
43
|
-
return n.type !== i.Fragment && (s.ref = o ? g(o, a) : a), i.cloneElement(n, s);
|
|
44
|
-
}
|
|
45
|
-
return i.Children.count(n) > 1 ? i.Children.only(null) : null;
|
|
46
|
-
});
|
|
47
|
-
return e.displayName = `${t}.SlotClone`, e;
|
|
48
|
-
}
|
|
49
|
-
var y = Symbol("radix.slottable");
|
|
50
|
-
// @__NO_SIDE_EFFECTS__
|
|
51
|
-
function E(t) {
|
|
52
|
-
const e = ({ children: r }) => /* @__PURE__ */ f(S, { children: r });
|
|
53
|
-
return e.displayName = `${t}.Slottable`, e.__radixId = y, e;
|
|
54
|
-
}
|
|
55
|
-
var V = /* @__PURE__ */ E("Slottable");
|
|
56
|
-
function h(t) {
|
|
57
|
-
return i.isValidElement(t) && typeof t.type == "function" && "__radixId" in t.type && t.type.__radixId === y;
|
|
58
|
-
}
|
|
59
|
-
function R(t, e) {
|
|
60
|
-
const r = { ...e };
|
|
61
|
-
for (const o in e) {
|
|
62
|
-
const n = t[o], l = e[o];
|
|
63
|
-
/^on[A-Z]/.test(o) ? n && l ? r[o] = (...s) => {
|
|
64
|
-
const c = l(...s);
|
|
65
|
-
return n(...s), c;
|
|
66
|
-
} : n && (r[o] = n) : o === "style" ? r[o] = { ...n, ...l } : o === "className" && (r[o] = [n, l].filter(Boolean).join(" "));
|
|
67
|
-
}
|
|
68
|
-
return { ...t, ...r };
|
|
69
|
-
}
|
|
70
|
-
function _(t) {
|
|
71
|
-
var o, n;
|
|
72
|
-
let e = (o = Object.getOwnPropertyDescriptor(t.props, "ref")) == null ? void 0 : o.get, r = e && "isReactWarning" in e && e.isReactWarning;
|
|
73
|
-
return r ? t.ref : (e = (n = Object.getOwnPropertyDescriptor(t, "ref")) == null ? void 0 : n.get, r = e && "isReactWarning" in e && e.isReactWarning, r ? t.props.ref : t.props.ref || t.ref);
|
|
74
|
-
}
|
|
75
|
-
export {
|
|
76
|
-
V as S,
|
|
77
|
-
I as a
|
|
78
|
-
};
|