rk-designsystem 1.1.21 → 1.1.26
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/LICENSE +21 -21
- package/README.md +249 -249
- package/dist/componentlibrary.es.js +274 -271
- package/dist/componentlibrary.umd.js +4 -4
- package/dist/index.d.ts +9 -2
- package/dist/logo-red-cross.svg +10 -10
- package/dist/rk-designsystem.css +1 -1
- package/package.json +116 -116
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import ye, { forwardRef as
|
|
2
|
-
import { Alert as Ne, Avatar as Se, Badge as $e, BadgePosition as De, Breadcrumbs as Me, BreadcrumbsList as Ae, BreadcrumbsItem as Oe, BreadcrumbsLink as We, Button as de, Card as
|
|
3
|
-
import { startOfMonth as
|
|
4
|
-
var
|
|
1
|
+
import ye, { forwardRef as Z, useState as _e, useEffect as Ce, useMemo as se, useCallback as Y, useRef as Te } from "react";
|
|
2
|
+
import { Alert as Ne, Avatar as Se, Badge as $e, BadgePosition as De, Breadcrumbs as Me, BreadcrumbsList as Ae, BreadcrumbsItem as Oe, BreadcrumbsLink as We, Button as de, Card as Le, CardBlock as Be, Checkbox as Ie, Fieldset as xe, useCheckboxGroup as Fe, Chip as Ye, Details as Ve, Dialog as He, Divider as ze, Dropdown as Ge, ErrorSummary as qe, FieldDescription as Ke, FieldCounter as Xe, Field as Je, Input as Ue, Label as Qe, Link as Ze, List as et, Pagination as tt, usePagination as rt, Popover as at, Radio as nt, useRadioGroup as ot, Search as st, Select as it, Skeleton as lt, SkipLink as ct, Spinner as ut, Switch as dt, Table as mt, Tabs as ft, Tag as ht, Textarea as pt, Textfield as bt, ToggleGroup as vt, Tooltip as gt } from "@digdir/designsystemet-react";
|
|
3
|
+
import { startOfMonth as I, isValid as ce, isSameMonth as me, startOfWeek as we, format as K, addDays as Pe, subMonths as kt, addMonths as yt, isSameDay as _t, isToday as Ct, eachDayOfInterval as xt } from "date-fns";
|
|
4
|
+
var ie = { exports: {} }, X = {};
|
|
5
5
|
/**
|
|
6
6
|
* @license React
|
|
7
7
|
* react-jsx-runtime.production.js
|
|
@@ -12,11 +12,11 @@ var se = { exports: {} }, X = {};
|
|
|
12
12
|
* LICENSE file in the root directory of this source tree.
|
|
13
13
|
*/
|
|
14
14
|
var fe;
|
|
15
|
-
function
|
|
15
|
+
function wt() {
|
|
16
16
|
if (fe) return X;
|
|
17
17
|
fe = 1;
|
|
18
|
-
var e = Symbol.for("react.transitional.element"),
|
|
19
|
-
function
|
|
18
|
+
var e = Symbol.for("react.transitional.element"), r = Symbol.for("react.fragment");
|
|
19
|
+
function a(o, s, d) {
|
|
20
20
|
var u = null;
|
|
21
21
|
if (d !== void 0 && (u = "" + d), s.key !== void 0 && (u = "" + s.key), "key" in s) {
|
|
22
22
|
d = {};
|
|
@@ -31,7 +31,7 @@ function Ct() {
|
|
|
31
31
|
props: d
|
|
32
32
|
};
|
|
33
33
|
}
|
|
34
|
-
return X.Fragment =
|
|
34
|
+
return X.Fragment = r, X.jsx = a, X.jsxs = a, X;
|
|
35
35
|
}
|
|
36
36
|
var J = {};
|
|
37
37
|
/**
|
|
@@ -44,12 +44,12 @@ var J = {};
|
|
|
44
44
|
* LICENSE file in the root directory of this source tree.
|
|
45
45
|
*/
|
|
46
46
|
var he;
|
|
47
|
-
function
|
|
47
|
+
function Pt() {
|
|
48
48
|
return he || (he = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
49
49
|
function e(t) {
|
|
50
50
|
if (t == null) return null;
|
|
51
51
|
if (typeof t == "function")
|
|
52
|
-
return t.$$typeof ===
|
|
52
|
+
return t.$$typeof === L ? null : t.displayName || t.name || null;
|
|
53
53
|
if (typeof t == "string") return t;
|
|
54
54
|
switch (t) {
|
|
55
55
|
case S:
|
|
@@ -60,7 +60,7 @@ function xt() {
|
|
|
60
60
|
return "StrictMode";
|
|
61
61
|
case W:
|
|
62
62
|
return "Suspense";
|
|
63
|
-
case
|
|
63
|
+
case ee:
|
|
64
64
|
return "SuspenseList";
|
|
65
65
|
case le:
|
|
66
66
|
return "Activity";
|
|
@@ -89,12 +89,12 @@ function xt() {
|
|
|
89
89
|
}
|
|
90
90
|
return null;
|
|
91
91
|
}
|
|
92
|
-
function
|
|
92
|
+
function r(t) {
|
|
93
93
|
return "" + t;
|
|
94
94
|
}
|
|
95
|
-
function
|
|
95
|
+
function a(t) {
|
|
96
96
|
try {
|
|
97
|
-
|
|
97
|
+
r(t);
|
|
98
98
|
var n = !1;
|
|
99
99
|
} catch {
|
|
100
100
|
n = !0;
|
|
@@ -106,7 +106,7 @@ function xt() {
|
|
|
106
106
|
n,
|
|
107
107
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
108
108
|
f
|
|
109
|
-
),
|
|
109
|
+
), r(t);
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
112
|
function o(t) {
|
|
@@ -136,7 +136,7 @@ function xt() {
|
|
|
136
136
|
}
|
|
137
137
|
function m(t, n) {
|
|
138
138
|
function c() {
|
|
139
|
-
|
|
139
|
+
te || (te = !0, console.error(
|
|
140
140
|
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
141
141
|
n
|
|
142
142
|
));
|
|
@@ -148,13 +148,13 @@ function xt() {
|
|
|
148
148
|
}
|
|
149
149
|
function y() {
|
|
150
150
|
var t = e(this.type);
|
|
151
|
-
return
|
|
151
|
+
return re[t] || (re[t] = !0, console.error(
|
|
152
152
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
153
153
|
)), t = this.props.ref, t !== void 0 ? t : null;
|
|
154
154
|
}
|
|
155
155
|
function _(t, n, c, f, h, b, A, G) {
|
|
156
156
|
return c = b.ref, t = {
|
|
157
|
-
$$typeof:
|
|
157
|
+
$$typeof: x,
|
|
158
158
|
type: t,
|
|
159
159
|
key: n,
|
|
160
160
|
props: b,
|
|
@@ -184,7 +184,7 @@ function xt() {
|
|
|
184
184
|
value: G
|
|
185
185
|
}), Object.freeze && (Object.freeze(t.props), Object.freeze(t)), t;
|
|
186
186
|
}
|
|
187
|
-
function
|
|
187
|
+
function C(t, n, c, f, h, b, A, G) {
|
|
188
188
|
var p = n.children;
|
|
189
189
|
if (p !== void 0)
|
|
190
190
|
if (f)
|
|
@@ -202,7 +202,7 @@ function xt() {
|
|
|
202
202
|
var E = Object.keys(n).filter(function(R) {
|
|
203
203
|
return R !== "key";
|
|
204
204
|
});
|
|
205
|
-
f = 0 < E.length ? "{key: someKey, " + E.join(": ..., ") + ": ...}" : "{key: someKey}",
|
|
205
|
+
f = 0 < E.length ? "{key: someKey, " + E.join(": ..., ") + ": ...}" : "{key: someKey}", oe[p + f] || (E = 0 < E.length ? "{" + E.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
206
206
|
`A props object containing a "key" prop is being spread into JSX:
|
|
207
207
|
let props = %s;
|
|
208
208
|
<%s {...props} />
|
|
@@ -213,12 +213,12 @@ React keys must be passed directly to JSX without using spread:
|
|
|
213
213
|
p,
|
|
214
214
|
E,
|
|
215
215
|
p
|
|
216
|
-
),
|
|
216
|
+
), oe[p + f] = !0);
|
|
217
217
|
}
|
|
218
|
-
if (p = null, c !== void 0 && (
|
|
218
|
+
if (p = null, c !== void 0 && (a(c), p = "" + c), u(n) && (a(n.key), p = "" + n.key), "key" in n) {
|
|
219
219
|
c = {};
|
|
220
|
-
for (var
|
|
221
|
-
|
|
220
|
+
for (var w in n)
|
|
221
|
+
w !== "key" && (c[w] = n[w]);
|
|
222
222
|
} else c = n;
|
|
223
223
|
return p && m(
|
|
224
224
|
c,
|
|
@@ -235,9 +235,9 @@ React keys must be passed directly to JSX without using spread:
|
|
|
235
235
|
);
|
|
236
236
|
}
|
|
237
237
|
function v(t) {
|
|
238
|
-
typeof t == "object" && t !== null && t.$$typeof ===
|
|
238
|
+
typeof t == "object" && t !== null && t.$$typeof === x && t._store && (t._store.validated = 1);
|
|
239
239
|
}
|
|
240
|
-
var j = ye,
|
|
240
|
+
var j = ye, x = Symbol.for("react.transitional.element"), V = Symbol.for("react.portal"), S = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), T = Symbol.for("react.profiler"), P = Symbol.for("react.consumer"), $ = Symbol.for("react.context"), H = Symbol.for("react.forward_ref"), W = Symbol.for("react.suspense"), ee = Symbol.for("react.suspense_list"), z = Symbol.for("react.memo"), N = Symbol.for("react.lazy"), le = Symbol.for("react.activity"), L = Symbol.for("react.client.reference"), g = j.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, D = Object.prototype.hasOwnProperty, M = Array.isArray, B = console.createTask ? console.createTask : function() {
|
|
241
241
|
return null;
|
|
242
242
|
};
|
|
243
243
|
j = {
|
|
@@ -245,118 +245,118 @@ React keys must be passed directly to JSX without using spread:
|
|
|
245
245
|
return t();
|
|
246
246
|
}
|
|
247
247
|
};
|
|
248
|
-
var
|
|
248
|
+
var te, re = {}, ae = j.react_stack_bottom_frame.bind(
|
|
249
249
|
j,
|
|
250
250
|
d
|
|
251
|
-
)(),
|
|
251
|
+
)(), ne = B(o(d)), oe = {};
|
|
252
252
|
J.Fragment = S, J.jsx = function(t, n, c, f, h) {
|
|
253
253
|
var b = 1e4 > g.recentlyCreatedOwnerStacks++;
|
|
254
|
-
return
|
|
254
|
+
return C(
|
|
255
255
|
t,
|
|
256
256
|
n,
|
|
257
257
|
c,
|
|
258
258
|
!1,
|
|
259
259
|
f,
|
|
260
260
|
h,
|
|
261
|
-
b ? Error("react-stack-top-frame") :
|
|
262
|
-
b ?
|
|
261
|
+
b ? Error("react-stack-top-frame") : ae,
|
|
262
|
+
b ? B(o(t)) : ne
|
|
263
263
|
);
|
|
264
264
|
}, J.jsxs = function(t, n, c, f, h) {
|
|
265
265
|
var b = 1e4 > g.recentlyCreatedOwnerStacks++;
|
|
266
|
-
return
|
|
266
|
+
return C(
|
|
267
267
|
t,
|
|
268
268
|
n,
|
|
269
269
|
c,
|
|
270
270
|
!0,
|
|
271
271
|
f,
|
|
272
272
|
h,
|
|
273
|
-
b ? Error("react-stack-top-frame") :
|
|
274
|
-
b ?
|
|
273
|
+
b ? Error("react-stack-top-frame") : ae,
|
|
274
|
+
b ? B(o(t)) : ne
|
|
275
275
|
);
|
|
276
276
|
};
|
|
277
277
|
})()), J;
|
|
278
278
|
}
|
|
279
279
|
var pe;
|
|
280
|
-
function
|
|
281
|
-
return pe || (pe = 1, process.env.NODE_ENV === "production" ?
|
|
280
|
+
function Et() {
|
|
281
|
+
return pe || (pe = 1, process.env.NODE_ENV === "production" ? ie.exports = wt() : ie.exports = Pt()), ie.exports;
|
|
282
282
|
}
|
|
283
|
-
var l =
|
|
284
|
-
const
|
|
285
|
-
|
|
286
|
-
const
|
|
287
|
-
|
|
288
|
-
const
|
|
289
|
-
|
|
290
|
-
const
|
|
291
|
-
|
|
292
|
-
const
|
|
293
|
-
|
|
294
|
-
const
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
const
|
|
283
|
+
var l = Et();
|
|
284
|
+
const Rt = Z((e, r) => /* @__PURE__ */ l.jsx(Ne, { ref: r, ...e }));
|
|
285
|
+
Rt.displayName = "Alert";
|
|
286
|
+
const jt = Z((e, r) => /* @__PURE__ */ l.jsx(Se, { ref: r, ...e }));
|
|
287
|
+
jt.displayName = "Avatar";
|
|
288
|
+
const Tt = Z((e, r) => /* @__PURE__ */ l.jsx($e, { ref: r, ...e }));
|
|
289
|
+
Tt.displayName = "Badge";
|
|
290
|
+
const Wr = De, Lr = Me, Br = Ae, Ir = Oe, Fr = We, Nt = de;
|
|
291
|
+
Nt.displayName = "Button";
|
|
292
|
+
const St = Le, Yr = Be;
|
|
293
|
+
St.displayName = "Card";
|
|
294
|
+
const $t = Ie, Dt = xe, Vr = Fe;
|
|
295
|
+
$t.displayName = "Checkbox";
|
|
296
|
+
Dt.displayName = "Fieldset";
|
|
297
|
+
const Hr = Ye;
|
|
298
298
|
function ue(e) {
|
|
299
|
-
return (
|
|
300
|
-
const
|
|
301
|
-
return e.formats[
|
|
299
|
+
return (r = {}) => {
|
|
300
|
+
const a = r.width ? String(r.width) : e.defaultWidth;
|
|
301
|
+
return e.formats[a] || e.formats[e.defaultWidth];
|
|
302
302
|
};
|
|
303
303
|
}
|
|
304
304
|
function U(e) {
|
|
305
|
-
return (
|
|
306
|
-
const o =
|
|
305
|
+
return (r, a) => {
|
|
306
|
+
const o = a != null && a.context ? String(a.context) : "standalone";
|
|
307
307
|
let s;
|
|
308
308
|
if (o === "formatting" && e.formattingValues) {
|
|
309
|
-
const u = e.defaultFormattingWidth || e.defaultWidth, m =
|
|
309
|
+
const u = e.defaultFormattingWidth || e.defaultWidth, m = a != null && a.width ? String(a.width) : u;
|
|
310
310
|
s = e.formattingValues[m] || e.formattingValues[u];
|
|
311
311
|
} else {
|
|
312
|
-
const u = e.defaultWidth, m =
|
|
312
|
+
const u = e.defaultWidth, m = a != null && a.width ? String(a.width) : e.defaultWidth;
|
|
313
313
|
s = e.values[m] || e.values[u];
|
|
314
314
|
}
|
|
315
|
-
const d = e.argumentCallback ? e.argumentCallback(
|
|
315
|
+
const d = e.argumentCallback ? e.argumentCallback(r) : r;
|
|
316
316
|
return s[d];
|
|
317
317
|
};
|
|
318
318
|
}
|
|
319
319
|
function Q(e) {
|
|
320
|
-
return (
|
|
321
|
-
const o =
|
|
320
|
+
return (r, a = {}) => {
|
|
321
|
+
const o = a.width, s = o && e.matchPatterns[o] || e.matchPatterns[e.defaultMatchWidth], d = r.match(s);
|
|
322
322
|
if (!d)
|
|
323
323
|
return null;
|
|
324
|
-
const u = d[0], m = o && e.parsePatterns[o] || e.parsePatterns[e.defaultParseWidth], y = Array.isArray(m) ?
|
|
324
|
+
const u = d[0], m = o && e.parsePatterns[o] || e.parsePatterns[e.defaultParseWidth], y = Array.isArray(m) ? At(m, (v) => v.test(u)) : (
|
|
325
325
|
// [TODO] -- I challenge you to fix the type
|
|
326
|
-
|
|
326
|
+
Mt(m, (v) => v.test(u))
|
|
327
327
|
);
|
|
328
328
|
let _;
|
|
329
|
-
_ = e.valueCallback ? e.valueCallback(y) : y, _ =
|
|
329
|
+
_ = e.valueCallback ? e.valueCallback(y) : y, _ = a.valueCallback ? (
|
|
330
330
|
// [TODO] -- I challenge you to fix the type
|
|
331
|
-
|
|
331
|
+
a.valueCallback(_)
|
|
332
332
|
) : _;
|
|
333
|
-
const
|
|
334
|
-
return { value: _, rest:
|
|
333
|
+
const C = r.slice(u.length);
|
|
334
|
+
return { value: _, rest: C };
|
|
335
335
|
};
|
|
336
336
|
}
|
|
337
|
-
function
|
|
338
|
-
for (const
|
|
339
|
-
if (Object.prototype.hasOwnProperty.call(e,
|
|
340
|
-
return
|
|
337
|
+
function Mt(e, r) {
|
|
338
|
+
for (const a in e)
|
|
339
|
+
if (Object.prototype.hasOwnProperty.call(e, a) && r(e[a]))
|
|
340
|
+
return a;
|
|
341
341
|
}
|
|
342
|
-
function
|
|
343
|
-
for (let
|
|
344
|
-
if (
|
|
345
|
-
return
|
|
342
|
+
function At(e, r) {
|
|
343
|
+
for (let a = 0; a < e.length; a++)
|
|
344
|
+
if (r(e[a]))
|
|
345
|
+
return a;
|
|
346
346
|
}
|
|
347
|
-
function
|
|
348
|
-
return (
|
|
349
|
-
const o =
|
|
347
|
+
function Ot(e) {
|
|
348
|
+
return (r, a = {}) => {
|
|
349
|
+
const o = r.match(e.matchPattern);
|
|
350
350
|
if (!o) return null;
|
|
351
|
-
const s = o[0], d =
|
|
351
|
+
const s = o[0], d = r.match(e.parsePattern);
|
|
352
352
|
if (!d) return null;
|
|
353
353
|
let u = e.valueCallback ? e.valueCallback(d[0]) : d[0];
|
|
354
|
-
u =
|
|
355
|
-
const m =
|
|
354
|
+
u = a.valueCallback ? a.valueCallback(u) : u;
|
|
355
|
+
const m = r.slice(s.length);
|
|
356
356
|
return { value: u, rest: m };
|
|
357
357
|
};
|
|
358
358
|
}
|
|
359
|
-
const
|
|
359
|
+
const Wt = {
|
|
360
360
|
lessThanXSeconds: {
|
|
361
361
|
one: "mindre enn ett sekund",
|
|
362
362
|
other: "mindre enn {{count}} sekunder"
|
|
@@ -418,10 +418,10 @@ const Ot = {
|
|
|
418
418
|
one: "nesten ett år",
|
|
419
419
|
other: "nesten {{count}} år"
|
|
420
420
|
}
|
|
421
|
-
},
|
|
421
|
+
}, Lt = (e, r, a) => {
|
|
422
422
|
let o;
|
|
423
|
-
const s =
|
|
424
|
-
return typeof s == "string" ? o = s :
|
|
423
|
+
const s = Wt[e];
|
|
424
|
+
return typeof s == "string" ? o = s : r === 1 ? o = s.one : o = s.other.replace("{{count}}", String(r)), a != null && a.addSuffix ? a.comparison && a.comparison > 0 ? "om " + o : o + " siden" : o;
|
|
425
425
|
}, Bt = {
|
|
426
426
|
full: "EEEE d. MMMM y",
|
|
427
427
|
long: "d. MMMM y",
|
|
@@ -437,7 +437,7 @@ const Ot = {
|
|
|
437
437
|
long: "{{date}} 'kl.' {{time}}",
|
|
438
438
|
medium: "{{date}} {{time}}",
|
|
439
439
|
short: "{{date}} {{time}}"
|
|
440
|
-
},
|
|
440
|
+
}, Yt = {
|
|
441
441
|
date: ue({
|
|
442
442
|
formats: Bt,
|
|
443
443
|
defaultWidth: "full"
|
|
@@ -450,22 +450,22 @@ const Ot = {
|
|
|
450
450
|
formats: Ft,
|
|
451
451
|
defaultWidth: "full"
|
|
452
452
|
})
|
|
453
|
-
},
|
|
453
|
+
}, Vt = {
|
|
454
454
|
lastWeek: "'forrige' eeee 'kl.' p",
|
|
455
455
|
yesterday: "'i går kl.' p",
|
|
456
456
|
today: "'i dag kl.' p",
|
|
457
457
|
tomorrow: "'i morgen kl.' p",
|
|
458
458
|
nextWeek: "EEEE 'kl.' p",
|
|
459
459
|
other: "P"
|
|
460
|
-
},
|
|
460
|
+
}, Ht = (e, r, a, o) => Vt[e], zt = {
|
|
461
461
|
narrow: ["f.Kr.", "e.Kr."],
|
|
462
462
|
abbreviated: ["f.Kr.", "e.Kr."],
|
|
463
463
|
wide: ["før Kristus", "etter Kristus"]
|
|
464
|
-
},
|
|
464
|
+
}, Gt = {
|
|
465
465
|
narrow: ["1", "2", "3", "4"],
|
|
466
466
|
abbreviated: ["Q1", "Q2", "Q3", "Q4"],
|
|
467
467
|
wide: ["1. kvartal", "2. kvartal", "3. kvartal", "4. kvartal"]
|
|
468
|
-
},
|
|
468
|
+
}, qt = {
|
|
469
469
|
narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
|
|
470
470
|
abbreviated: [
|
|
471
471
|
"jan.",
|
|
@@ -495,7 +495,7 @@ const Ot = {
|
|
|
495
495
|
"november",
|
|
496
496
|
"desember"
|
|
497
497
|
]
|
|
498
|
-
},
|
|
498
|
+
}, Kt = {
|
|
499
499
|
narrow: ["S", "M", "T", "O", "T", "F", "L"],
|
|
500
500
|
short: ["sø", "ma", "ti", "on", "to", "fr", "lø"],
|
|
501
501
|
abbreviated: ["søn", "man", "tir", "ons", "tor", "fre", "lør"],
|
|
@@ -508,7 +508,7 @@ const Ot = {
|
|
|
508
508
|
"fredag",
|
|
509
509
|
"lørdag"
|
|
510
510
|
]
|
|
511
|
-
},
|
|
511
|
+
}, Xt = {
|
|
512
512
|
narrow: {
|
|
513
513
|
am: "a",
|
|
514
514
|
pm: "p",
|
|
@@ -539,46 +539,46 @@ const Ot = {
|
|
|
539
539
|
evening: "på kvelden",
|
|
540
540
|
night: "på natten"
|
|
541
541
|
}
|
|
542
|
-
},
|
|
543
|
-
ordinalNumber:
|
|
542
|
+
}, Jt = (e, r) => Number(e) + ".", Ut = {
|
|
543
|
+
ordinalNumber: Jt,
|
|
544
544
|
era: U({
|
|
545
|
-
values:
|
|
545
|
+
values: zt,
|
|
546
546
|
defaultWidth: "wide"
|
|
547
547
|
}),
|
|
548
548
|
quarter: U({
|
|
549
|
-
values:
|
|
549
|
+
values: Gt,
|
|
550
550
|
defaultWidth: "wide",
|
|
551
551
|
argumentCallback: (e) => e - 1
|
|
552
552
|
}),
|
|
553
553
|
month: U({
|
|
554
|
-
values:
|
|
554
|
+
values: qt,
|
|
555
555
|
defaultWidth: "wide"
|
|
556
556
|
}),
|
|
557
557
|
day: U({
|
|
558
|
-
values:
|
|
558
|
+
values: Kt,
|
|
559
559
|
defaultWidth: "wide"
|
|
560
560
|
}),
|
|
561
561
|
dayPeriod: U({
|
|
562
|
-
values:
|
|
562
|
+
values: Xt,
|
|
563
563
|
defaultWidth: "wide"
|
|
564
564
|
})
|
|
565
|
-
},
|
|
565
|
+
}, Qt = /^(\d+)\.?/i, Zt = /\d+/i, er = {
|
|
566
566
|
narrow: /^(f\.? ?Kr\.?|fvt\.?|e\.? ?Kr\.?|evt\.?)/i,
|
|
567
567
|
abbreviated: /^(f\.? ?Kr\.?|fvt\.?|e\.? ?Kr\.?|evt\.?)/i,
|
|
568
568
|
wide: /^(før Kristus|før vår tid|etter Kristus|vår tid)/i
|
|
569
|
-
}, er = {
|
|
570
|
-
any: [/^f/i, /^e/i]
|
|
571
569
|
}, tr = {
|
|
570
|
+
any: [/^f/i, /^e/i]
|
|
571
|
+
}, rr = {
|
|
572
572
|
narrow: /^[1234]/i,
|
|
573
573
|
abbreviated: /^q[1234]/i,
|
|
574
574
|
wide: /^[1234](\.)? kvartal/i
|
|
575
|
-
}, rr = {
|
|
576
|
-
any: [/1/i, /2/i, /3/i, /4/i]
|
|
577
575
|
}, ar = {
|
|
576
|
+
any: [/1/i, /2/i, /3/i, /4/i]
|
|
577
|
+
}, nr = {
|
|
578
578
|
narrow: /^[jfmasond]/i,
|
|
579
579
|
abbreviated: /^(jan|feb|mars?|apr|mai|juni?|juli?|aug|sep|okt|nov|des)\.?/i,
|
|
580
580
|
wide: /^(januar|februar|mars|april|mai|juni|juli|august|september|oktober|november|desember)/i
|
|
581
|
-
},
|
|
581
|
+
}, or = {
|
|
582
582
|
narrow: [
|
|
583
583
|
/^j/i,
|
|
584
584
|
/^f/i,
|
|
@@ -607,17 +607,17 @@ const Ot = {
|
|
|
607
607
|
/^n/i,
|
|
608
608
|
/^d/i
|
|
609
609
|
]
|
|
610
|
-
},
|
|
610
|
+
}, sr = {
|
|
611
611
|
narrow: /^[smtofl]/i,
|
|
612
612
|
short: /^(sø|ma|ti|on|to|fr|lø)/i,
|
|
613
613
|
abbreviated: /^(søn|man|tir|ons|tor|fre|lør)/i,
|
|
614
614
|
wide: /^(søndag|mandag|tirsdag|onsdag|torsdag|fredag|lørdag)/i
|
|
615
|
-
}, sr = {
|
|
616
|
-
any: [/^s/i, /^m/i, /^ti/i, /^o/i, /^to/i, /^f/i, /^l/i]
|
|
617
615
|
}, ir = {
|
|
616
|
+
any: [/^s/i, /^m/i, /^ti/i, /^o/i, /^to/i, /^f/i, /^l/i]
|
|
617
|
+
}, lr = {
|
|
618
618
|
narrow: /^(midnatt|middag|(på) (morgenen|ettermiddagen|kvelden|natten)|[ap])/i,
|
|
619
619
|
any: /^([ap]\.?\s?m\.?|midnatt|middag|(på) (morgenen|ettermiddagen|kvelden|natten))/i
|
|
620
|
-
},
|
|
620
|
+
}, cr = {
|
|
621
621
|
any: {
|
|
622
622
|
am: /^a(\.?\s?m\.?)?$/i,
|
|
623
623
|
pm: /^p(\.?\s?m\.?)?$/i,
|
|
@@ -628,55 +628,55 @@ const Ot = {
|
|
|
628
628
|
evening: /kveld/i,
|
|
629
629
|
night: /natt/i
|
|
630
630
|
}
|
|
631
|
-
},
|
|
632
|
-
ordinalNumber:
|
|
633
|
-
matchPattern:
|
|
634
|
-
parsePattern:
|
|
631
|
+
}, ur = {
|
|
632
|
+
ordinalNumber: Ot({
|
|
633
|
+
matchPattern: Qt,
|
|
634
|
+
parsePattern: Zt,
|
|
635
635
|
valueCallback: (e) => parseInt(e, 10)
|
|
636
636
|
}),
|
|
637
637
|
era: Q({
|
|
638
|
-
matchPatterns:
|
|
638
|
+
matchPatterns: er,
|
|
639
639
|
defaultMatchWidth: "wide",
|
|
640
|
-
parsePatterns:
|
|
640
|
+
parsePatterns: tr,
|
|
641
641
|
defaultParseWidth: "any"
|
|
642
642
|
}),
|
|
643
643
|
quarter: Q({
|
|
644
|
-
matchPatterns:
|
|
644
|
+
matchPatterns: rr,
|
|
645
645
|
defaultMatchWidth: "wide",
|
|
646
|
-
parsePatterns:
|
|
646
|
+
parsePatterns: ar,
|
|
647
647
|
defaultParseWidth: "any",
|
|
648
648
|
valueCallback: (e) => e + 1
|
|
649
649
|
}),
|
|
650
650
|
month: Q({
|
|
651
|
-
matchPatterns:
|
|
651
|
+
matchPatterns: nr,
|
|
652
652
|
defaultMatchWidth: "wide",
|
|
653
|
-
parsePatterns:
|
|
653
|
+
parsePatterns: or,
|
|
654
654
|
defaultParseWidth: "any"
|
|
655
655
|
}),
|
|
656
656
|
day: Q({
|
|
657
|
-
matchPatterns:
|
|
657
|
+
matchPatterns: sr,
|
|
658
658
|
defaultMatchWidth: "wide",
|
|
659
|
-
parsePatterns:
|
|
659
|
+
parsePatterns: ir,
|
|
660
660
|
defaultParseWidth: "any"
|
|
661
661
|
}),
|
|
662
662
|
dayPeriod: Q({
|
|
663
|
-
matchPatterns:
|
|
663
|
+
matchPatterns: lr,
|
|
664
664
|
defaultMatchWidth: "any",
|
|
665
|
-
parsePatterns:
|
|
665
|
+
parsePatterns: cr,
|
|
666
666
|
defaultParseWidth: "any"
|
|
667
667
|
})
|
|
668
|
-
},
|
|
668
|
+
}, F = {
|
|
669
669
|
code: "nb",
|
|
670
|
-
formatDistance:
|
|
671
|
-
formatLong:
|
|
672
|
-
formatRelative:
|
|
673
|
-
localize:
|
|
674
|
-
match:
|
|
670
|
+
formatDistance: Lt,
|
|
671
|
+
formatLong: Yt,
|
|
672
|
+
formatRelative: Ht,
|
|
673
|
+
localize: Ut,
|
|
674
|
+
match: ur,
|
|
675
675
|
options: {
|
|
676
676
|
weekStartsOn: 1,
|
|
677
677
|
firstWeekContainsDate: 4
|
|
678
678
|
}
|
|
679
|
-
}, Ee = ({ title: e, ...
|
|
679
|
+
}, Ee = ({ title: e, ...r }) => /* @__PURE__ */ l.jsxs(
|
|
680
680
|
"svg",
|
|
681
681
|
{
|
|
682
682
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -686,7 +686,7 @@ const Ot = {
|
|
|
686
686
|
fill: "none",
|
|
687
687
|
"aria-hidden": e ? void 0 : !0,
|
|
688
688
|
focusable: "false",
|
|
689
|
-
...
|
|
689
|
+
...r,
|
|
690
690
|
children: [
|
|
691
691
|
e && /* @__PURE__ */ l.jsx("title", { children: e }),
|
|
692
692
|
/* @__PURE__ */ l.jsx(
|
|
@@ -702,7 +702,7 @@ const Ot = {
|
|
|
702
702
|
}
|
|
703
703
|
);
|
|
704
704
|
Ee.displayName = "ChevronLeftIcon";
|
|
705
|
-
const Re = ({ title: e, ...
|
|
705
|
+
const Re = ({ title: e, ...r }) => /* @__PURE__ */ l.jsxs(
|
|
706
706
|
"svg",
|
|
707
707
|
{
|
|
708
708
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -712,7 +712,7 @@ const Re = ({ title: e, ...a }) => /* @__PURE__ */ l.jsxs(
|
|
|
712
712
|
fill: "none",
|
|
713
713
|
"aria-hidden": e ? void 0 : !0,
|
|
714
714
|
focusable: "false",
|
|
715
|
-
...
|
|
715
|
+
...r,
|
|
716
716
|
children: [
|
|
717
717
|
e && /* @__PURE__ */ l.jsx("title", { children: e }),
|
|
718
718
|
/* @__PURE__ */ l.jsx(
|
|
@@ -728,60 +728,60 @@ const Re = ({ title: e, ...a }) => /* @__PURE__ */ l.jsxs(
|
|
|
728
728
|
}
|
|
729
729
|
);
|
|
730
730
|
Re.displayName = "ChevronRightIcon";
|
|
731
|
-
const
|
|
732
|
-
calendarContainer:
|
|
733
|
-
calendarHeader:
|
|
734
|
-
monthYear:
|
|
735
|
-
navigationButtons:
|
|
736
|
-
grid:
|
|
737
|
-
dayNameCell:
|
|
738
|
-
dateCell:
|
|
739
|
-
dateNumberContainer:
|
|
740
|
-
otherMonth:
|
|
741
|
-
selectedDate:
|
|
742
|
-
},
|
|
743
|
-
const
|
|
744
|
-
return
|
|
745
|
-
}, be = (e) => e && e.charAt(0).toUpperCase() + e.slice(1),
|
|
731
|
+
const dr = "_calendarContainer_mtooc_5", mr = "_calendarHeader_mtooc_33", fr = "_monthYear_mtooc_47", hr = "_navigationButtons_mtooc_71", pr = "_grid_mtooc_89", br = "_dayNameCell_mtooc_105", vr = "_dateCell_mtooc_143", gr = "_dateNumberContainer_mtooc_213", kr = "_otherMonth_mtooc_249", yr = "_selectedDate_mtooc_313", k = {
|
|
732
|
+
calendarContainer: dr,
|
|
733
|
+
calendarHeader: mr,
|
|
734
|
+
monthYear: fr,
|
|
735
|
+
navigationButtons: hr,
|
|
736
|
+
grid: pr,
|
|
737
|
+
dayNameCell: br,
|
|
738
|
+
dateCell: vr,
|
|
739
|
+
dateNumberContainer: gr,
|
|
740
|
+
otherMonth: kr,
|
|
741
|
+
selectedDate: yr
|
|
742
|
+
}, _r = (e) => {
|
|
743
|
+
const r = I(e), a = we(r, { locale: F }), o = Pe(a, 41);
|
|
744
|
+
return xt({ start: a, end: o });
|
|
745
|
+
}, be = (e) => e && e.charAt(0).toUpperCase() + e.slice(1), Cr = ({
|
|
746
746
|
initialDate: e = /* @__PURE__ */ new Date(),
|
|
747
|
-
selectedDate:
|
|
747
|
+
selectedDate: r = null,
|
|
748
748
|
// Prop for selected date
|
|
749
|
-
onDateSelect:
|
|
749
|
+
onDateSelect: a
|
|
750
750
|
}) => {
|
|
751
751
|
const [o, s] = _e(
|
|
752
752
|
// Initialize with selectedDate's month if valid, otherwise initialDate's month
|
|
753
|
-
|
|
753
|
+
I(r && ce(r) ? r : e)
|
|
754
754
|
);
|
|
755
|
-
|
|
756
|
-
if (
|
|
757
|
-
const i =
|
|
755
|
+
Ce(() => {
|
|
756
|
+
if (r && ce(r)) {
|
|
757
|
+
const i = I(r);
|
|
758
758
|
me(i, o) || s(i);
|
|
759
759
|
}
|
|
760
|
-
}, [
|
|
761
|
-
const d =
|
|
762
|
-
() =>
|
|
760
|
+
}, [r]);
|
|
761
|
+
const d = se(() => I(/* @__PURE__ */ new Date()), []), u = se(() => !1, [o, d]), m = se(
|
|
762
|
+
() => _r(o),
|
|
763
763
|
[o]
|
|
764
|
-
), y =
|
|
765
|
-
const i =
|
|
764
|
+
), y = se(() => {
|
|
765
|
+
const i = we(/* @__PURE__ */ new Date(), { locale: F });
|
|
766
766
|
return Array.from({ length: 7 }).map((T, P) => {
|
|
767
|
-
const $ = K(Pe(i, P), "EEEEEE", { locale:
|
|
767
|
+
const $ = K(Pe(i, P), "EEEEEE", { locale: F });
|
|
768
768
|
return be($);
|
|
769
769
|
});
|
|
770
770
|
}, []), _ = Y(() => {
|
|
771
|
-
u || s((i) =>
|
|
772
|
-
}, [u]),
|
|
773
|
-
s((i) =>
|
|
771
|
+
u || s((i) => I(kt(i, 1)));
|
|
772
|
+
}, [u]), C = Y(() => {
|
|
773
|
+
s((i) => I(yt(i, 1)));
|
|
774
774
|
}, []), v = Y(
|
|
775
775
|
(i) => {
|
|
776
|
-
|
|
776
|
+
a && a(i);
|
|
777
777
|
},
|
|
778
|
-
[
|
|
778
|
+
[a]
|
|
779
779
|
), j = Y(
|
|
780
780
|
(i, T) => {
|
|
781
781
|
(i.key === "Enter" || i.key === " ") && (i.preventDefault(), v(T));
|
|
782
782
|
},
|
|
783
783
|
[v]
|
|
784
|
-
),
|
|
784
|
+
), x = K(o, "MMMM", { locale: F }), V = K(o, "yyyy", { locale: F }), S = `${be(x)} ${V}`;
|
|
785
785
|
return /* @__PURE__ */ l.jsxs("div", { className: k.calendarContainer, children: [
|
|
786
786
|
/* @__PURE__ */ l.jsxs("div", { className: k.calendarHeader, children: [
|
|
787
787
|
/* @__PURE__ */ l.jsx("span", { className: k.monthYear, children: S }),
|
|
@@ -802,7 +802,7 @@ const ur = "_calendarContainer_160wn_3", dr = "_calendarHeader_160wn_17", mr = "
|
|
|
802
802
|
{
|
|
803
803
|
variant: "tertiary",
|
|
804
804
|
icon: !0,
|
|
805
|
-
onClick:
|
|
805
|
+
onClick: C,
|
|
806
806
|
"aria-label": "Neste måned",
|
|
807
807
|
children: /* @__PURE__ */ l.jsx(Re, {})
|
|
808
808
|
}
|
|
@@ -811,7 +811,7 @@ const ur = "_calendarContainer_160wn_3", dr = "_calendarHeader_160wn_17", mr = "
|
|
|
811
811
|
] }),
|
|
812
812
|
/* @__PURE__ */ l.jsx("div", { className: k.grid, children: y.map((i) => /* @__PURE__ */ l.jsx("div", { className: k.dayNameCell, children: i }, i)) }),
|
|
813
813
|
/* @__PURE__ */ l.jsx("div", { className: k.grid, children: m.map((i) => {
|
|
814
|
-
const T = me(i, o), P =
|
|
814
|
+
const T = me(i, o), P = r && ce(r) && _t(i, r), $ = Ct(i), H = [
|
|
815
815
|
k.dateCell,
|
|
816
816
|
T ? "" : k.otherMonth,
|
|
817
817
|
P ? k.selectedDate : "",
|
|
@@ -827,7 +827,7 @@ const ur = "_calendarContainer_160wn_3", dr = "_calendarHeader_160wn_17", mr = "
|
|
|
827
827
|
role: "button",
|
|
828
828
|
tabIndex: 0,
|
|
829
829
|
"aria-pressed": P ?? !1,
|
|
830
|
-
"aria-label": K(i, "PPP", { locale:
|
|
830
|
+
"aria-label": K(i, "PPP", { locale: F }),
|
|
831
831
|
children: /* @__PURE__ */ l.jsx("span", { className: k.dateNumberContainer, children: K(i, "d") })
|
|
832
832
|
},
|
|
833
833
|
i.toISOString()
|
|
@@ -835,33 +835,33 @@ const ur = "_calendarContainer_160wn_3", dr = "_calendarHeader_160wn_17", mr = "
|
|
|
835
835
|
}) })
|
|
836
836
|
] });
|
|
837
837
|
};
|
|
838
|
-
|
|
839
|
-
const
|
|
840
|
-
fieldset:
|
|
841
|
-
description:
|
|
842
|
-
error:
|
|
843
|
-
inputWrapper:
|
|
844
|
-
inputWrapperError:
|
|
845
|
-
suffixButton:
|
|
846
|
-
suffixButtonInteractive:
|
|
838
|
+
Cr.displayName = "DatePicker";
|
|
839
|
+
const xr = "_fieldset_s5r8s_7", wr = "_description_s5r8s_29", Pr = "_error_s5r8s_43", Er = "_inputWrapper_s5r8s_59", Rr = "_inputWrapperError_s5r8s_83", jr = "_suffixButton_s5r8s_199", Tr = "_suffixButtonInteractive_s5r8s_239", O = {
|
|
840
|
+
fieldset: xr,
|
|
841
|
+
description: wr,
|
|
842
|
+
error: Pr,
|
|
843
|
+
inputWrapper: Er,
|
|
844
|
+
inputWrapperError: Rr,
|
|
845
|
+
suffixButton: jr,
|
|
846
|
+
suffixButtonInteractive: Tr
|
|
847
847
|
}, ve = (e) => {
|
|
848
|
-
const
|
|
849
|
-
return e.length > 4 ? `${
|
|
848
|
+
const r = e.slice(0, 2), a = e.slice(2, 4), o = e.slice(4, 8);
|
|
849
|
+
return e.length > 4 ? `${r}.${a}.${o}` : e.length > 2 ? `${r}.${a}` : e.length > 0 ? r : "";
|
|
850
850
|
}, ge = (e) => (e || "").replace(/\D/g, ""), ke = (e) => {
|
|
851
|
-
let
|
|
852
|
-
if (
|
|
853
|
-
const
|
|
854
|
-
!isNaN(
|
|
851
|
+
let r = e;
|
|
852
|
+
if (r.length >= 2) {
|
|
853
|
+
const a = parseInt(r.substring(0, 2), 10);
|
|
854
|
+
!isNaN(a) && a > 31 && (r = "31" + r.substring(2));
|
|
855
855
|
}
|
|
856
|
-
if (
|
|
857
|
-
const
|
|
858
|
-
!isNaN(
|
|
856
|
+
if (r.length >= 4) {
|
|
857
|
+
const a = parseInt(r.substring(2, 4), 10);
|
|
858
|
+
!isNaN(a) && a > 12 && (r = r.substring(0, 2) + "12" + r.substring(4));
|
|
859
859
|
}
|
|
860
|
-
return
|
|
861
|
-
},
|
|
862
|
-
(e,
|
|
860
|
+
return r.slice(0, 8);
|
|
861
|
+
}, Nr = Z(
|
|
862
|
+
(e, r) => {
|
|
863
863
|
const {
|
|
864
|
-
label:
|
|
864
|
+
label: a,
|
|
865
865
|
suffixIcon: o,
|
|
866
866
|
onSuffixClick: s,
|
|
867
867
|
className: d,
|
|
@@ -872,10 +872,10 @@ const wr = "_fieldset_17wt1_4", Cr = "_description_17wt1_15", xr = "_error_17wt1
|
|
|
872
872
|
// For the actual input element
|
|
873
873
|
value: y,
|
|
874
874
|
defaultValue: _,
|
|
875
|
-
onChange:
|
|
875
|
+
onChange: C,
|
|
876
876
|
readOnly: v,
|
|
877
877
|
placeholder: j = "dd.mm.åååå",
|
|
878
|
-
id:
|
|
878
|
+
id: x,
|
|
879
879
|
name: V,
|
|
880
880
|
required: S,
|
|
881
881
|
disabled: i,
|
|
@@ -886,14 +886,14 @@ const wr = "_fieldset_17wt1_4", Cr = "_description_17wt1_15", xr = "_error_17wt1
|
|
|
886
886
|
// Pass external onBlur
|
|
887
887
|
autoComplete: H = "off",
|
|
888
888
|
"aria-label": W,
|
|
889
|
-
"aria-labelledby":
|
|
889
|
+
"aria-labelledby": ee,
|
|
890
890
|
description: z,
|
|
891
891
|
error: N,
|
|
892
892
|
// Use error prop for styling
|
|
893
893
|
...le
|
|
894
|
-
} = e,
|
|
894
|
+
} = e, L = y !== void 0, g = Te(null);
|
|
895
895
|
ye.useImperativeHandle(
|
|
896
|
-
|
|
896
|
+
r,
|
|
897
897
|
() => g.current
|
|
898
898
|
);
|
|
899
899
|
const D = Y(
|
|
@@ -902,33 +902,33 @@ const wr = "_fieldset_17wt1_4", Cr = "_description_17wt1_15", xr = "_error_17wt1
|
|
|
902
902
|
return ve(A);
|
|
903
903
|
},
|
|
904
904
|
[]
|
|
905
|
-
), [M,
|
|
905
|
+
), [M, B] = _e(
|
|
906
906
|
() => D(y ?? _)
|
|
907
907
|
);
|
|
908
|
-
|
|
909
|
-
if (
|
|
908
|
+
Ce(() => {
|
|
909
|
+
if (L) {
|
|
910
910
|
const h = D(y);
|
|
911
|
-
h !== M && (
|
|
911
|
+
h !== M && (B(h), g.current && g.current.value !== h && (g.current.value = h));
|
|
912
912
|
}
|
|
913
|
-
}, [y,
|
|
914
|
-
const
|
|
913
|
+
}, [y, L, M, D]);
|
|
914
|
+
const te = Y(
|
|
915
915
|
(h) => {
|
|
916
|
-
const b = h.target, A = b.value, G = M, p = ge(A).slice(0, 8), E = ke(p),
|
|
916
|
+
const b = h.target, A = b.value, G = M, p = ge(A).slice(0, 8), E = ke(p), w = ve(E);
|
|
917
917
|
let R = 0;
|
|
918
918
|
const q = E.length;
|
|
919
|
-
q <= 2 ? R = q : q <= 4 ? R = q + 1 : R = q + 2, R = Math.min(R,
|
|
920
|
-
if (g.current && (
|
|
919
|
+
q <= 2 ? R = q : q <= 4 ? R = q + 1 : R = q + 2, R = Math.min(R, w.length), requestAnimationFrame(() => {
|
|
920
|
+
if (g.current && (B(w), g.current.value = w, g.current.setSelectionRange(R, R), (w !== G || L) && C)) {
|
|
921
921
|
const je = {
|
|
922
922
|
...h,
|
|
923
|
-
target: { ...b, value:
|
|
923
|
+
target: { ...b, value: w }
|
|
924
924
|
};
|
|
925
|
-
|
|
925
|
+
C(je, w);
|
|
926
926
|
}
|
|
927
927
|
});
|
|
928
928
|
},
|
|
929
|
-
[M,
|
|
929
|
+
[M, L, C, D]
|
|
930
930
|
// Added isControlled and getFormattedValue
|
|
931
|
-
),
|
|
931
|
+
), re = [O.fieldset, d].filter(Boolean).join(" "), ae = [
|
|
932
932
|
O.inputWrapper,
|
|
933
933
|
// Base style from InputField CSS
|
|
934
934
|
u,
|
|
@@ -937,11 +937,11 @@ const wr = "_fieldset_17wt1_4", Cr = "_description_17wt1_15", xr = "_error_17wt1
|
|
|
937
937
|
// Apply error class based on prop
|
|
938
938
|
// Add disabled class if your CSS defines one for the wrapper
|
|
939
939
|
// disabled ? styles.inputWrapperDisabled : '',
|
|
940
|
-
].filter(Boolean).join(" "),
|
|
940
|
+
].filter(Boolean).join(" "), ne = [
|
|
941
941
|
// styles.input, // This class might not exist in InputField/styles.module.css
|
|
942
942
|
m
|
|
943
943
|
// Allow external override/extension
|
|
944
|
-
].filter(Boolean).join(" "),
|
|
944
|
+
].filter(Boolean).join(" "), oe = [
|
|
945
945
|
O.suffixButton,
|
|
946
946
|
// Base style from InputField CSS
|
|
947
947
|
s ? O.suffixButtonInteractive : ""
|
|
@@ -949,17 +949,17 @@ const wr = "_fieldset_17wt1_4", Cr = "_description_17wt1_15", xr = "_error_17wt1
|
|
|
949
949
|
// Add disabled class if your CSS defines one for the button
|
|
950
950
|
// disabled ? styles.suffixButtonDisabled : '',
|
|
951
951
|
].filter(Boolean).join(" ");
|
|
952
|
-
!
|
|
953
|
-
const t =
|
|
952
|
+
!a && !W && !ee && console.warn("Warning: DateInput component should have a label, aria-label, or aria-labelledby for accessibility.");
|
|
953
|
+
const t = a && typeof a == "string" ? ee || `${x}-label` : void 0, n = z ? `${x}-desc` : void 0, c = N ? `${x}-err` : void 0, f = [n, c].filter(Boolean).join(" ") || void 0;
|
|
954
954
|
return (
|
|
955
955
|
// Use the fieldset structure and classes from InputField CSS
|
|
956
|
-
/* @__PURE__ */ l.jsxs("div", { className:
|
|
957
|
-
|
|
956
|
+
/* @__PURE__ */ l.jsxs("div", { className: re, children: [
|
|
957
|
+
a && typeof a == "string" ? /* @__PURE__ */ l.jsx("label", { id: t, htmlFor: x, children: a }) : a,
|
|
958
958
|
z && /* @__PURE__ */ l.jsxs("p", { id: n, className: O.description, children: [
|
|
959
959
|
" ",
|
|
960
960
|
z
|
|
961
961
|
] }),
|
|
962
|
-
/* @__PURE__ */ l.jsxs("div", { className:
|
|
962
|
+
/* @__PURE__ */ l.jsxs("div", { className: ae, children: [
|
|
963
963
|
/* @__PURE__ */ l.jsx(
|
|
964
964
|
"input",
|
|
965
965
|
{
|
|
@@ -971,12 +971,12 @@ const wr = "_fieldset_17wt1_4", Cr = "_description_17wt1_15", xr = "_error_17wt1
|
|
|
971
971
|
value: M,
|
|
972
972
|
readOnly: v,
|
|
973
973
|
placeholder: j,
|
|
974
|
-
id:
|
|
974
|
+
id: x,
|
|
975
975
|
name: V,
|
|
976
976
|
required: S,
|
|
977
977
|
disabled: i,
|
|
978
978
|
onClick: T,
|
|
979
|
-
onChange:
|
|
979
|
+
onChange: te,
|
|
980
980
|
onFocus: P,
|
|
981
981
|
onBlur: $,
|
|
982
982
|
autoComplete: H,
|
|
@@ -984,7 +984,7 @@ const wr = "_fieldset_17wt1_4", Cr = "_description_17wt1_15", xr = "_error_17wt1
|
|
|
984
984
|
"aria-labelledby": t,
|
|
985
985
|
"aria-describedby": f,
|
|
986
986
|
"aria-invalid": !!N,
|
|
987
|
-
className:
|
|
987
|
+
className: ne,
|
|
988
988
|
...le
|
|
989
989
|
}
|
|
990
990
|
),
|
|
@@ -992,7 +992,7 @@ const wr = "_fieldset_17wt1_4", Cr = "_description_17wt1_15", xr = "_error_17wt1
|
|
|
992
992
|
"button",
|
|
993
993
|
{
|
|
994
994
|
type: "button",
|
|
995
|
-
className:
|
|
995
|
+
className: oe,
|
|
996
996
|
onClick: i ? void 0 : s,
|
|
997
997
|
tabIndex: s && !i ? 0 : -1,
|
|
998
998
|
"aria-hidden": !s,
|
|
@@ -1007,56 +1007,59 @@ const wr = "_fieldset_17wt1_4", Cr = "_description_17wt1_15", xr = "_error_17wt1
|
|
|
1007
1007
|
);
|
|
1008
1008
|
}
|
|
1009
1009
|
);
|
|
1010
|
-
|
|
1011
|
-
const
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
const
|
|
1010
|
+
Nr.displayName = "DateInput";
|
|
1011
|
+
const zr = Ve, Gr = He, qr = ze, Kr = Ge, Xr = qe, Jr = Je, Sr = Ke, $r = Xe;
|
|
1012
|
+
Sr.displayName = "Field.Description";
|
|
1013
|
+
$r.displayName = "Field.Counter";
|
|
1014
|
+
const Ur = xe, Qr = Ue, Dr = Z((e, r) => /* @__PURE__ */ l.jsx(Qe, { ref: r, ...e }));
|
|
1015
|
+
Dr.displayName = "Label";
|
|
1016
|
+
const Zr = Ze, ea = et, ta = tt, ra = rt, aa = at, na = nt, oa = ot, sa = st, ia = it, la = lt, ca = ct, ua = ut, da = dt, ma = mt, fa = ft, ha = ht, pa = pt, ba = bt, va = vt, ga = gt;
|
|
1015
1017
|
export {
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
ta as
|
|
1045
|
-
|
|
1046
|
-
na as
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1018
|
+
Rt as Alert,
|
|
1019
|
+
jt as Avatar,
|
|
1020
|
+
Tt as Badge,
|
|
1021
|
+
Wr as BadgePosition,
|
|
1022
|
+
Lr as Breadcrumbs,
|
|
1023
|
+
Ir as BreadcrumbsItem,
|
|
1024
|
+
Fr as BreadcrumbsLink,
|
|
1025
|
+
Br as BreadcrumbsList,
|
|
1026
|
+
Nt as Button,
|
|
1027
|
+
St as Card,
|
|
1028
|
+
Yr as CardBlock,
|
|
1029
|
+
$t as Checkbox,
|
|
1030
|
+
Hr as Chip,
|
|
1031
|
+
Nr as DateInput,
|
|
1032
|
+
Cr as DatePicker,
|
|
1033
|
+
zr as Details,
|
|
1034
|
+
Gr as Dialog,
|
|
1035
|
+
qr as Divider,
|
|
1036
|
+
Kr as Dropdown,
|
|
1037
|
+
Xr as ErrorSummary,
|
|
1038
|
+
Jr as Field,
|
|
1039
|
+
$r as FieldCounter,
|
|
1040
|
+
Sr as FieldDescription,
|
|
1041
|
+
Ur as Fieldset,
|
|
1042
|
+
Qr as Input,
|
|
1043
|
+
Dr as Label,
|
|
1044
|
+
Zr as Link,
|
|
1045
|
+
ea as List,
|
|
1046
|
+
ta as Pagination,
|
|
1047
|
+
aa as Popover,
|
|
1048
|
+
na as Radio,
|
|
1049
|
+
sa as Search,
|
|
1050
|
+
ia as Select,
|
|
1051
|
+
la as SkeletonLoader,
|
|
1052
|
+
ca as SkipLink,
|
|
1053
|
+
ua as Spinner,
|
|
1054
|
+
da as Switch,
|
|
1055
|
+
ma as Table,
|
|
1056
|
+
fa as Tabs,
|
|
1057
|
+
ha as Tag,
|
|
1058
|
+
pa as Textarea,
|
|
1059
|
+
ba as Textfield,
|
|
1060
|
+
va as ToggleGroup,
|
|
1061
|
+
ga as Tooltip,
|
|
1062
|
+
Vr as useCheckboxGroup,
|
|
1063
|
+
ra as usePagination,
|
|
1064
|
+
oa as useRadioGroup
|
|
1062
1065
|
};
|