@leabankab/component-library 8.0.0 → 8.1.1
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/CHANGELOG.md +107 -0
- package/dist/component-library.es.js +1496 -1231
- package/dist/component-library.es.js.map +1 -1
- package/dist/component-library.umd.js +2 -2
- package/dist/component-library.umd.js.map +1 -1
- package/dist/components/data-display/card.d.ts +25 -2
- package/dist/components/form/combo-field.d.ts +9 -1
- package/dist/components/form/email-input.d.ts +9 -1
- package/dist/components/form/field-parts.d.ts +16 -2
- package/dist/components/form/input.d.ts +7 -1
- package/dist/components/form/number-input-unit.d.ts +28 -0
- package/dist/components/form/number-input.d.ts +27 -5
- package/dist/components/form/phone-number-input/phone-number-input.d.ts +20 -1
- package/dist/cookie-consent-core-fntGUdFt.cjs +2 -0
- package/dist/cookie-consent-core-fntGUdFt.cjs.map +1 -0
- package/dist/{cookie-consent-core-mwVmy5nZ.mjs → cookie-consent-core-lX0QAEAo.mjs} +2 -1
- package/dist/cookie-consent-core-lX0QAEAo.mjs.map +1 -0
- package/dist/cookie-consent-react.cjs +1 -1
- package/dist/cookie-consent-react.mjs +1 -1
- package/dist/cookie-consent.cjs +1 -1
- package/dist/cookie-consent.css +1 -1
- package/dist/cookie-consent.mjs +1 -1
- package/dist/dev-panel/dev-panel.d.ts +52 -1
- package/dist/dev-panel/parts.d.ts +1 -1
- package/dist/dev-panel/use-dev-panel-labels.d.ts +1 -1
- package/dist/dev-panel.cjs +2 -2
- package/dist/dev-panel.cjs.map +1 -1
- package/dist/dev-panel.css +1 -1
- package/dist/dev-panel.mjs +384 -283
- package/dist/dev-panel.mjs.map +1 -1
- package/dist/index.css +1 -1
- package/dist/validation/email.d.ts +18 -0
- package/dist/validation/mobile-patterns.d.ts +10 -0
- package/dist/validation/national-id.d.ts +26 -0
- package/dist/validation/phone.d.ts +30 -0
- package/package.json +4 -2
- package/dist/cookie-consent-core-C4MP7GlV.cjs +0 -2
- package/dist/cookie-consent-core-C4MP7GlV.cjs.map +0 -1
- package/dist/cookie-consent-core-mwVmy5nZ.mjs.map +0 -1
|
@@ -1,38 +1,38 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { AnimatePresence as e, animate as t, motion as n, useMotionValue as r, useReducedMotion as i } from "motion/react";
|
|
3
3
|
import { Children as a, Fragment as o, createContext as s, isValidElement as c, useCallback as l, useContext as u, useEffect as d, useId as f, useLayoutEffect as p, useMemo as m, useRef as h, useState as g } from "react";
|
|
4
|
-
import { ArrowLeft as _, ArrowRight as v, Check as y, ChevronDown as b, CircleAlert as x, CircleCheck as S, CircleX as C, Info as w, InfoIcon as T, Minus as E, Plus as
|
|
5
|
-
import { Fragment as
|
|
6
|
-
import { Button as
|
|
7
|
-
import { useRender as
|
|
8
|
-
import { Popover as
|
|
9
|
-
import { Tooltip as
|
|
10
|
-
import { Dialog as
|
|
11
|
-
import { Drawer as
|
|
12
|
-
import { Field as
|
|
13
|
-
import { NumberField as
|
|
14
|
-
import { Slider as
|
|
15
|
-
import { Combobox as
|
|
16
|
-
import { Checkbox as
|
|
17
|
-
import { Autocomplete as
|
|
18
|
-
import { AsYouType as
|
|
19
|
-
import { Input as
|
|
20
|
-
import { Select as
|
|
21
|
-
import { Radio as
|
|
22
|
-
import { RadioGroup as
|
|
23
|
-
import { Switch as
|
|
24
|
-
import { Progress as
|
|
25
|
-
import { Tabs as
|
|
26
|
-
import { Accordion as
|
|
4
|
+
import { ArrowLeft as _, ArrowRight as v, Check as y, ChevronDown as b, CircleAlert as x, CircleCheck as S, CircleX as C, Info as w, InfoIcon as T, Minus as E, Plus as D, Search as O, TriangleAlert as ee, X as k } from "lucide-react";
|
|
5
|
+
import { Fragment as A, jsx as j, jsxs as M } from "react/jsx-runtime";
|
|
6
|
+
import { Button as te } from "@base-ui/react/button";
|
|
7
|
+
import { useRender as N } from "@base-ui/react/use-render";
|
|
8
|
+
import { Popover as P } from "@base-ui/react/popover";
|
|
9
|
+
import { Tooltip as F } from "@base-ui/react/tooltip";
|
|
10
|
+
import { Dialog as I } from "@base-ui/react/dialog";
|
|
11
|
+
import { Drawer as L } from "@base-ui/react/drawer";
|
|
12
|
+
import { Field as ne } from "@base-ui/react/field";
|
|
13
|
+
import { NumberField as R } from "@base-ui/react/number-field";
|
|
14
|
+
import { Slider as z } from "@base-ui/react/slider";
|
|
15
|
+
import { Combobox as B } from "@base-ui/react/combobox";
|
|
16
|
+
import { Checkbox as re } from "@base-ui/react/checkbox";
|
|
17
|
+
import { Autocomplete as ie } from "@base-ui/react/autocomplete";
|
|
18
|
+
import { AsYouType as ae, getCountries as V, getCountryCallingCode as oe, parsePhoneNumberFromString as se } from "libphonenumber-js";
|
|
19
|
+
import { Input as ce } from "@base-ui/react/input";
|
|
20
|
+
import { Select as H } from "@base-ui/react/select";
|
|
21
|
+
import { Radio as le } from "@base-ui/react/radio";
|
|
22
|
+
import { RadioGroup as ue } from "@base-ui/react/radio-group";
|
|
23
|
+
import { Switch as de } from "@base-ui/react/switch";
|
|
24
|
+
import { Progress as fe } from "@base-ui/react/progress";
|
|
25
|
+
import { Tabs as pe } from "@base-ui/react/tabs";
|
|
26
|
+
import { Accordion as me } from "@base-ui/react/accordion";
|
|
27
27
|
import './index.css';//#region \0rolldown/runtime.js
|
|
28
|
-
var
|
|
28
|
+
var he = Object.defineProperty, ge = (e, t) => {
|
|
29
29
|
let n = {};
|
|
30
|
-
for (var r in e)
|
|
30
|
+
for (var r in e) he(n, r, {
|
|
31
31
|
get: e[r],
|
|
32
32
|
enumerable: !0
|
|
33
33
|
});
|
|
34
|
-
return t ||
|
|
35
|
-
},
|
|
34
|
+
return t || he(n, Symbol.toStringTag, { value: "Module" }), n;
|
|
35
|
+
}, U = {
|
|
36
36
|
StatusIcon: "_StatusIcon_n5xwv_1",
|
|
37
37
|
Check: "_Check_n5xwv_2",
|
|
38
38
|
Pulse: "_Pulse_n5xwv_3",
|
|
@@ -53,7 +53,7 @@ var ye = Object.defineProperty, be = (e, t) => {
|
|
|
53
53
|
Status: "_Status_n5xwv_1",
|
|
54
54
|
Layer: "_Layer_n5xwv_166",
|
|
55
55
|
SrOnly: "_SrOnly_n5xwv_174"
|
|
56
|
-
},
|
|
56
|
+
}, _e = ({ count: e, burst: t, distanceAt: n, dotSizeAt: r, colourAt: i, withSpin: a = !1 }) => Array.from({ length: e }, (o, s) => {
|
|
57
57
|
let c = s / e * Math.PI * 2, l = t * n(s);
|
|
58
58
|
return {
|
|
59
59
|
id: s,
|
|
@@ -64,7 +64,7 @@ var ye = Object.defineProperty, be = (e, t) => {
|
|
|
64
64
|
...i ? { colour: i(s) } : {},
|
|
65
65
|
...a ? { spin: (s % 2 == 0 ? 1 : -1) * 120 } : {}
|
|
66
66
|
};
|
|
67
|
-
}),
|
|
67
|
+
}), ve = ({ particles: e, variant: t = "illustration", delay: r = t === "illustration" ? .18 : .1, duration: i = t === "illustration" ? 1.1 : .8, useCurrentColor: a = t === "icon" }) => e.map((e) => /* @__PURE__ */ j(n.span, {
|
|
68
68
|
initial: {
|
|
69
69
|
x: 0,
|
|
70
70
|
y: 0,
|
|
@@ -125,51 +125,51 @@ var ye = Object.defineProperty, be = (e, t) => {
|
|
|
125
125
|
backgroundColor: a ? "currentColor" : e.colour,
|
|
126
126
|
pointerEvents: "none"
|
|
127
127
|
}
|
|
128
|
-
}, e.id)),
|
|
129
|
-
className: [
|
|
128
|
+
}, e.id)), ye = ({ size: e, iconSize: t, className: n, children: r }) => /* @__PURE__ */ j("span", {
|
|
129
|
+
className: [U.Badge, n].filter(Boolean).join(" "),
|
|
130
130
|
style: {
|
|
131
131
|
width: e,
|
|
132
132
|
height: e
|
|
133
133
|
},
|
|
134
|
-
children: r ?? /* @__PURE__ */
|
|
134
|
+
children: r ?? /* @__PURE__ */ j(y, {
|
|
135
135
|
size: t,
|
|
136
136
|
strokeWidth: 3,
|
|
137
137
|
"aria-hidden": !0
|
|
138
138
|
})
|
|
139
|
-
}),
|
|
139
|
+
}), be = 44, xe = ({ size: e, thickness: t = 3.6, label: n, className: r }) => /* @__PURE__ */ j("span", {
|
|
140
140
|
...n == null ? { "aria-hidden": !0 } : {
|
|
141
141
|
role: "progressbar",
|
|
142
142
|
"aria-label": n
|
|
143
143
|
},
|
|
144
|
-
className: [
|
|
144
|
+
className: [U.Spinner, r].filter(Boolean).join(" "),
|
|
145
145
|
style: {
|
|
146
146
|
width: e,
|
|
147
147
|
height: e
|
|
148
148
|
},
|
|
149
|
-
children: /* @__PURE__ */
|
|
150
|
-
className:
|
|
151
|
-
viewBox: `${
|
|
152
|
-
children: /* @__PURE__ */
|
|
153
|
-
cx:
|
|
154
|
-
cy:
|
|
155
|
-
r: (
|
|
149
|
+
children: /* @__PURE__ */ j("svg", {
|
|
150
|
+
className: U.SpinnerSvg,
|
|
151
|
+
viewBox: `${be / 2} ${be / 2} ${be} ${be}`,
|
|
152
|
+
children: /* @__PURE__ */ j("circle", {
|
|
153
|
+
cx: be,
|
|
154
|
+
cy: be,
|
|
155
|
+
r: (be - t) / 2,
|
|
156
156
|
fill: "none",
|
|
157
157
|
stroke: "currentColor",
|
|
158
158
|
strokeWidth: t,
|
|
159
159
|
strokeDasharray: "80 200"
|
|
160
160
|
})
|
|
161
161
|
})
|
|
162
|
-
}),
|
|
162
|
+
}), Se = [
|
|
163
163
|
"no",
|
|
164
164
|
"se",
|
|
165
165
|
"fi",
|
|
166
166
|
"es"
|
|
167
|
-
],
|
|
167
|
+
], Ce = "no", we = s("no"), Te = () => u(we);
|
|
168
168
|
//#endregion
|
|
169
169
|
//#region src/i18n/create-translation.ts
|
|
170
|
-
function
|
|
170
|
+
function W(e) {
|
|
171
171
|
return function() {
|
|
172
|
-
let t =
|
|
172
|
+
let t = Te(), n = {};
|
|
173
173
|
return Object.keys(e).forEach((r) => {
|
|
174
174
|
let i = e[r];
|
|
175
175
|
n[r] = i[t] ?? i.no;
|
|
@@ -178,7 +178,7 @@ function B(e) {
|
|
|
178
178
|
}
|
|
179
179
|
//#endregion
|
|
180
180
|
//#region src/components/animations/use-animation-labels.ts
|
|
181
|
-
var
|
|
181
|
+
var Ee = W({
|
|
182
182
|
pending: {
|
|
183
183
|
no: "Venter",
|
|
184
184
|
se: "Väntar",
|
|
@@ -203,54 +203,54 @@ var Ae = B({
|
|
|
203
203
|
fi: "Vahvistettu",
|
|
204
204
|
es: "Confirmado"
|
|
205
205
|
}
|
|
206
|
-
}),
|
|
207
|
-
let s = i(), c =
|
|
208
|
-
count:
|
|
206
|
+
}), De = 8, Oe = ({ status: t, size: r = 24, color: a = "primary", label: o }) => {
|
|
207
|
+
let s = i(), c = Ee(), l = Math.max(2, Math.round(r * .09)), u = l * 44 / r, d = Math.round(r * .6), f = r, p = m(() => _e({
|
|
208
|
+
count: De,
|
|
209
209
|
burst: f,
|
|
210
210
|
distanceAt: (e) => .7 + e % 2 * .25,
|
|
211
211
|
dotSizeAt: (e) => Math.max(2, Math.round(r * .1)) + e % 2
|
|
212
212
|
}), [f, r]), h = s ? 0 : .2;
|
|
213
|
-
return /* @__PURE__ */
|
|
213
|
+
return /* @__PURE__ */ M("span", {
|
|
214
214
|
role: "img",
|
|
215
215
|
"aria-label": o ?? c[t],
|
|
216
|
-
className:
|
|
216
|
+
className: U.StatusIcon,
|
|
217
217
|
"data-color": a,
|
|
218
218
|
style: {
|
|
219
219
|
width: r,
|
|
220
220
|
height: r
|
|
221
221
|
},
|
|
222
|
-
children: [/* @__PURE__ */
|
|
222
|
+
children: [/* @__PURE__ */ M(e, {
|
|
223
223
|
mode: "wait",
|
|
224
224
|
children: [
|
|
225
|
-
t === "pending" && /* @__PURE__ */
|
|
225
|
+
t === "pending" && /* @__PURE__ */ j(n.span, {
|
|
226
226
|
initial: { opacity: 0 },
|
|
227
227
|
animate: { opacity: 1 },
|
|
228
228
|
exit: { opacity: 0 },
|
|
229
229
|
transition: { duration: h },
|
|
230
|
-
className:
|
|
231
|
-
children: /* @__PURE__ */
|
|
232
|
-
className:
|
|
230
|
+
className: U.State,
|
|
231
|
+
children: /* @__PURE__ */ j("span", {
|
|
232
|
+
className: U.Ring,
|
|
233
233
|
style: { borderWidth: l }
|
|
234
234
|
})
|
|
235
235
|
}, "pending"),
|
|
236
|
-
t === "loading" && /* @__PURE__ */
|
|
236
|
+
t === "loading" && /* @__PURE__ */ j(n.span, {
|
|
237
237
|
initial: { opacity: 0 },
|
|
238
238
|
animate: { opacity: 1 },
|
|
239
239
|
exit: { opacity: 0 },
|
|
240
240
|
transition: { duration: h },
|
|
241
|
-
className:
|
|
242
|
-
children: /* @__PURE__ */
|
|
241
|
+
className: U.State,
|
|
242
|
+
children: /* @__PURE__ */ j(xe, {
|
|
243
243
|
size: r,
|
|
244
244
|
thickness: u
|
|
245
245
|
})
|
|
246
246
|
}, "loading"),
|
|
247
|
-
t === "done" && /* @__PURE__ */
|
|
247
|
+
t === "done" && /* @__PURE__ */ j(n.span, {
|
|
248
248
|
initial: { opacity: 0 },
|
|
249
249
|
animate: { opacity: 1 },
|
|
250
250
|
exit: { opacity: 0 },
|
|
251
251
|
transition: { duration: h },
|
|
252
|
-
className:
|
|
253
|
-
children: /* @__PURE__ */
|
|
252
|
+
className: U.State,
|
|
253
|
+
children: /* @__PURE__ */ j(n.span, {
|
|
254
254
|
initial: !s && { scale: 0 },
|
|
255
255
|
animate: s ? {} : { scale: [
|
|
256
256
|
0,
|
|
@@ -267,19 +267,19 @@ var Ae = B({
|
|
|
267
267
|
]
|
|
268
268
|
},
|
|
269
269
|
style: { display: "flex" },
|
|
270
|
-
children: /* @__PURE__ */
|
|
270
|
+
children: /* @__PURE__ */ j(ye, {
|
|
271
271
|
size: r,
|
|
272
272
|
iconSize: d
|
|
273
273
|
})
|
|
274
274
|
})
|
|
275
275
|
}, "done")
|
|
276
276
|
]
|
|
277
|
-
}), !s && t === "done" && /* @__PURE__ */
|
|
277
|
+
}), !s && t === "done" && /* @__PURE__ */ j(ve, {
|
|
278
278
|
particles: p,
|
|
279
279
|
variant: "icon"
|
|
280
280
|
})]
|
|
281
281
|
});
|
|
282
|
-
},
|
|
282
|
+
}, ke = {
|
|
283
283
|
purple: {
|
|
284
284
|
50: "#FAF7FB",
|
|
285
285
|
100: "#E2D8E4",
|
|
@@ -386,13 +386,13 @@ var Ae = B({
|
|
|
386
386
|
},
|
|
387
387
|
white: "#FFFFFF",
|
|
388
388
|
black: "#0F1010"
|
|
389
|
-
}, { purple:
|
|
389
|
+
}, { purple: Ae, teal: je, blue: Me, amber: Ne, red: Pe, neutral: G, white: Fe, beige: Ie } = ke, Le = {
|
|
390
390
|
bg: {
|
|
391
|
-
base:
|
|
392
|
-
subtle:
|
|
393
|
-
muted:
|
|
394
|
-
contrast:
|
|
395
|
-
accent:
|
|
391
|
+
base: Fe,
|
|
392
|
+
subtle: G[50],
|
|
393
|
+
muted: Ie[100],
|
|
394
|
+
contrast: G[950],
|
|
395
|
+
accent: Ae[100],
|
|
396
396
|
overlay: ((e, t) => {
|
|
397
397
|
let [n, r, i] = [
|
|
398
398
|
1,
|
|
@@ -400,59 +400,59 @@ var Ae = B({
|
|
|
400
400
|
5
|
|
401
401
|
].map((t) => parseInt(e.slice(t, t + 2), 16));
|
|
402
402
|
return `rgba(${n}, ${r}, ${i}, ${t})`;
|
|
403
|
-
})(
|
|
403
|
+
})(G[950], .5)
|
|
404
404
|
},
|
|
405
405
|
text: {
|
|
406
|
-
base:
|
|
407
|
-
subtle:
|
|
408
|
-
muted:
|
|
409
|
-
accent:
|
|
410
|
-
contrast:
|
|
406
|
+
base: G[950],
|
|
407
|
+
subtle: G[500],
|
|
408
|
+
muted: G[400],
|
|
409
|
+
accent: Ae[600],
|
|
410
|
+
contrast: Fe
|
|
411
411
|
},
|
|
412
412
|
border: {
|
|
413
|
-
base:
|
|
414
|
-
subtle:
|
|
415
|
-
strong:
|
|
416
|
-
accent:
|
|
417
|
-
contrast:
|
|
413
|
+
base: G[200],
|
|
414
|
+
subtle: G[100],
|
|
415
|
+
strong: G[950],
|
|
416
|
+
accent: Ae[600],
|
|
417
|
+
contrast: Fe
|
|
418
418
|
},
|
|
419
419
|
primary: {
|
|
420
|
-
base:
|
|
421
|
-
hover:
|
|
422
|
-
subtle:
|
|
423
|
-
contrast:
|
|
420
|
+
base: Ae[600],
|
|
421
|
+
hover: Ae[700],
|
|
422
|
+
subtle: Ae[100],
|
|
423
|
+
contrast: Fe
|
|
424
424
|
},
|
|
425
425
|
secondary: {
|
|
426
|
-
base:
|
|
427
|
-
hover:
|
|
428
|
-
subtle:
|
|
429
|
-
contrast:
|
|
426
|
+
base: G[950],
|
|
427
|
+
hover: G[800],
|
|
428
|
+
subtle: G[100],
|
|
429
|
+
contrast: Fe
|
|
430
430
|
},
|
|
431
431
|
tertiary: {
|
|
432
|
-
base:
|
|
433
|
-
hover:
|
|
434
|
-
subtle:
|
|
435
|
-
contrast:
|
|
432
|
+
base: je[300],
|
|
433
|
+
hover: je[400],
|
|
434
|
+
subtle: je[100],
|
|
435
|
+
contrast: Fe
|
|
436
436
|
},
|
|
437
437
|
status: {
|
|
438
438
|
error: {
|
|
439
|
-
base:
|
|
440
|
-
subtle:
|
|
439
|
+
base: Pe[500],
|
|
440
|
+
subtle: Pe[100]
|
|
441
441
|
},
|
|
442
442
|
warning: {
|
|
443
|
-
base:
|
|
444
|
-
subtle:
|
|
443
|
+
base: Ne[400],
|
|
444
|
+
subtle: Ne[100]
|
|
445
445
|
},
|
|
446
446
|
info: {
|
|
447
|
-
base:
|
|
448
|
-
subtle:
|
|
447
|
+
base: Me[400],
|
|
448
|
+
subtle: Me[100]
|
|
449
449
|
},
|
|
450
450
|
success: {
|
|
451
|
-
base:
|
|
452
|
-
subtle:
|
|
451
|
+
base: je[400],
|
|
452
|
+
subtle: je[100]
|
|
453
453
|
}
|
|
454
454
|
}
|
|
455
|
-
},
|
|
455
|
+
}, Re = {
|
|
456
456
|
sm: {
|
|
457
457
|
box: 90,
|
|
458
458
|
badge: 60,
|
|
@@ -465,42 +465,42 @@ var Ae = B({
|
|
|
465
465
|
icon: 50,
|
|
466
466
|
burst: 100
|
|
467
467
|
}
|
|
468
|
-
},
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
],
|
|
474
|
-
let a = i(), o =
|
|
475
|
-
count:
|
|
468
|
+
}, ze = 14, Be = [
|
|
469
|
+
Le.primary.base,
|
|
470
|
+
Le.tertiary.base,
|
|
471
|
+
ke.blue[400],
|
|
472
|
+
ke.orange[400]
|
|
473
|
+
], Ve = ({ size: e = "lg", color: t = "primary", label: r }) => {
|
|
474
|
+
let a = i(), o = Ee(), { box: s, badge: c, icon: l, burst: u } = Re[e], d = m(() => _e({
|
|
475
|
+
count: ze,
|
|
476
476
|
burst: u,
|
|
477
477
|
distanceAt: (e) => .6 + e % 3 * .15,
|
|
478
478
|
dotSizeAt: (e) => 5 + e % 3 * 2,
|
|
479
|
-
colourAt: (e) =>
|
|
479
|
+
colourAt: (e) => Be[e % Be.length],
|
|
480
480
|
withSpin: !0
|
|
481
481
|
}), [u]);
|
|
482
|
-
return /* @__PURE__ */
|
|
482
|
+
return /* @__PURE__ */ M("div", {
|
|
483
483
|
role: "img",
|
|
484
484
|
"aria-label": r ?? o.confirmed,
|
|
485
|
-
className:
|
|
485
|
+
className: U.Check,
|
|
486
486
|
"data-color": t,
|
|
487
487
|
style: {
|
|
488
488
|
width: s,
|
|
489
489
|
height: s
|
|
490
490
|
},
|
|
491
491
|
children: [
|
|
492
|
-
/* @__PURE__ */
|
|
493
|
-
className:
|
|
492
|
+
/* @__PURE__ */ j("span", {
|
|
493
|
+
className: U.Halo,
|
|
494
494
|
style: {
|
|
495
495
|
width: c,
|
|
496
496
|
height: c
|
|
497
497
|
}
|
|
498
498
|
}),
|
|
499
|
-
!a && /* @__PURE__ */
|
|
499
|
+
!a && /* @__PURE__ */ j(ve, {
|
|
500
500
|
particles: d,
|
|
501
501
|
variant: "illustration"
|
|
502
502
|
}),
|
|
503
|
-
/* @__PURE__ */
|
|
503
|
+
/* @__PURE__ */ j(n.div, {
|
|
504
504
|
initial: !a && {
|
|
505
505
|
scale: 0,
|
|
506
506
|
rotate: -25
|
|
@@ -523,15 +523,15 @@ var Ae = B({
|
|
|
523
523
|
]
|
|
524
524
|
},
|
|
525
525
|
style: { display: "flex" },
|
|
526
|
-
children: /* @__PURE__ */
|
|
526
|
+
children: /* @__PURE__ */ j(ye, {
|
|
527
527
|
size: c,
|
|
528
528
|
iconSize: l,
|
|
529
|
-
className:
|
|
529
|
+
className: U.CheckBadge
|
|
530
530
|
})
|
|
531
531
|
})
|
|
532
532
|
]
|
|
533
533
|
});
|
|
534
|
-
},
|
|
534
|
+
}, He = {
|
|
535
535
|
sm: {
|
|
536
536
|
container: 90,
|
|
537
537
|
circle: 60,
|
|
@@ -542,45 +542,45 @@ var Ae = B({
|
|
|
542
542
|
circle: 100,
|
|
543
543
|
spinner: 48
|
|
544
544
|
}
|
|
545
|
-
},
|
|
546
|
-
let { container: n, circle: r, spinner: i } =
|
|
545
|
+
}, Ue = ({ size: e = "lg", label: t }) => {
|
|
546
|
+
let { container: n, circle: r, spinner: i } = He[e], a = Ee(), o = {
|
|
547
547
|
width: r,
|
|
548
548
|
height: r
|
|
549
549
|
};
|
|
550
|
-
return /* @__PURE__ */
|
|
551
|
-
className:
|
|
550
|
+
return /* @__PURE__ */ M("div", {
|
|
551
|
+
className: U.Pulse,
|
|
552
552
|
style: {
|
|
553
553
|
width: n,
|
|
554
554
|
height: n
|
|
555
555
|
},
|
|
556
556
|
children: [
|
|
557
|
-
/* @__PURE__ */
|
|
558
|
-
className:
|
|
557
|
+
/* @__PURE__ */ j("span", {
|
|
558
|
+
className: U.PulseRing,
|
|
559
559
|
style: o
|
|
560
560
|
}),
|
|
561
|
-
/* @__PURE__ */
|
|
562
|
-
className:
|
|
561
|
+
/* @__PURE__ */ j("span", {
|
|
562
|
+
className: U.PulseRing,
|
|
563
563
|
style: {
|
|
564
564
|
...o,
|
|
565
565
|
animationDelay: "0.4s"
|
|
566
566
|
}
|
|
567
567
|
}),
|
|
568
|
-
/* @__PURE__ */
|
|
569
|
-
className:
|
|
568
|
+
/* @__PURE__ */ j("span", {
|
|
569
|
+
className: U.PulseCentre,
|
|
570
570
|
style: o
|
|
571
571
|
}),
|
|
572
|
-
/* @__PURE__ */
|
|
572
|
+
/* @__PURE__ */ j(xe, {
|
|
573
573
|
size: i,
|
|
574
574
|
label: t ?? a.loading,
|
|
575
|
-
className:
|
|
575
|
+
className: U.PulseSpinner
|
|
576
576
|
})
|
|
577
577
|
]
|
|
578
578
|
});
|
|
579
|
-
},
|
|
579
|
+
}, We = {
|
|
580
580
|
sm: 90,
|
|
581
581
|
lg: 150
|
|
582
|
-
},
|
|
583
|
-
let l = i(), u =
|
|
582
|
+
}, Ge = ({ loading: t, size: r = "lg", color: a = "primary", minLoadingMs: o = 0, loadingLabel: s, doneLabel: c }) => {
|
|
583
|
+
let l = i(), u = Ee(), [f, p] = g(!t), m = h(t ? Date.now() : null);
|
|
584
584
|
d(() => {
|
|
585
585
|
if (t) {
|
|
586
586
|
m.current = Date.now(), p(!1);
|
|
@@ -594,58 +594,58 @@ var Ae = B({
|
|
|
594
594
|
let r = window.setTimeout(() => p(!0), n);
|
|
595
595
|
return () => window.clearTimeout(r);
|
|
596
596
|
}, [t, o]);
|
|
597
|
-
let _ =
|
|
598
|
-
return /* @__PURE__ */
|
|
597
|
+
let _ = We[r], v = l ? 0 : .35;
|
|
598
|
+
return /* @__PURE__ */ M("div", {
|
|
599
599
|
role: "status",
|
|
600
600
|
"aria-live": "polite",
|
|
601
|
-
className:
|
|
601
|
+
className: U.Status,
|
|
602
602
|
style: {
|
|
603
603
|
width: _,
|
|
604
604
|
height: _
|
|
605
605
|
},
|
|
606
|
-
children: [/* @__PURE__ */
|
|
606
|
+
children: [/* @__PURE__ */ j(e, {
|
|
607
607
|
mode: "sync",
|
|
608
|
-
children: f ? /* @__PURE__ */
|
|
608
|
+
children: f ? /* @__PURE__ */ j(n.div, {
|
|
609
609
|
"aria-hidden": !0,
|
|
610
610
|
initial: { opacity: 0 },
|
|
611
611
|
animate: { opacity: 1 },
|
|
612
612
|
exit: { opacity: 0 },
|
|
613
613
|
transition: { duration: v },
|
|
614
|
-
className:
|
|
615
|
-
children: /* @__PURE__ */
|
|
614
|
+
className: U.Layer,
|
|
615
|
+
children: /* @__PURE__ */ j(Ve, {
|
|
616
616
|
size: r,
|
|
617
617
|
color: a
|
|
618
618
|
})
|
|
619
|
-
}, "check") : /* @__PURE__ */
|
|
619
|
+
}, "check") : /* @__PURE__ */ j(n.div, {
|
|
620
620
|
"aria-hidden": !0,
|
|
621
621
|
initial: { opacity: 0 },
|
|
622
622
|
animate: { opacity: 1 },
|
|
623
623
|
exit: { opacity: 0 },
|
|
624
624
|
transition: { duration: v },
|
|
625
|
-
className:
|
|
626
|
-
children: /* @__PURE__ */
|
|
625
|
+
className: U.Layer,
|
|
626
|
+
children: /* @__PURE__ */ j(Ue, { size: r })
|
|
627
627
|
}, "pulse")
|
|
628
|
-
}), /* @__PURE__ */
|
|
629
|
-
className:
|
|
628
|
+
}), /* @__PURE__ */ j("span", {
|
|
629
|
+
className: U.SrOnly,
|
|
630
630
|
children: f ? c ?? u.done : s ?? u.loading
|
|
631
631
|
})]
|
|
632
632
|
});
|
|
633
|
-
},
|
|
633
|
+
}, K = (e, t) => (n) => [e, typeof t == "function" ? t(n) : t].filter(Boolean).join(" "), Ke = {
|
|
634
634
|
ActionButton: "_ActionButton_14we5_1",
|
|
635
635
|
Arrow: "_Arrow_14we5_40"
|
|
636
|
-
},
|
|
636
|
+
}, qe = {
|
|
637
637
|
Button: "_Button_1d72q_1",
|
|
638
638
|
IconButton: "_IconButton_1d72q_125",
|
|
639
639
|
Spinner: "_Spinner_1d72q_150",
|
|
640
640
|
"button-spin": "_button-spin_1d72q_1",
|
|
641
641
|
SrOnly: "_SrOnly_1d72q_168"
|
|
642
|
-
},
|
|
643
|
-
function
|
|
644
|
-
let c = !!(t || e), l =
|
|
642
|
+
}, Je = (e) => c(e) && (e.props.href != null || e.props.to != null), Ye = (e) => e.preventDefault();
|
|
643
|
+
function Xe({ loading: e = !1, disabled: t, className: n, render: r, nativeButton: i, focusableWhenDisabled: a, ref: o, ...s }) {
|
|
644
|
+
let c = !!(t || e), l = Je(r), u = {
|
|
645
645
|
"aria-busy": e || void 0,
|
|
646
646
|
"data-loading": e || void 0
|
|
647
647
|
};
|
|
648
|
-
return
|
|
648
|
+
return N({
|
|
649
649
|
enabled: l,
|
|
650
650
|
render: l ? r : void 0,
|
|
651
651
|
ref: o,
|
|
@@ -656,9 +656,9 @@ function et({ loading: e = !1, disabled: t, className: n, render: r, nativeButto
|
|
|
656
656
|
"aria-disabled": c || void 0,
|
|
657
657
|
"data-disabled": c ? "" : void 0,
|
|
658
658
|
className: typeof n == "function" ? n({ disabled: c }) : n,
|
|
659
|
-
onClick: c ?
|
|
659
|
+
onClick: c ? Ye : s.onClick
|
|
660
660
|
}
|
|
661
|
-
}) || /* @__PURE__ */
|
|
661
|
+
}) || /* @__PURE__ */ j(te, {
|
|
662
662
|
...s,
|
|
663
663
|
...u,
|
|
664
664
|
ref: o,
|
|
@@ -669,52 +669,52 @@ function et({ loading: e = !1, disabled: t, className: n, render: r, nativeButto
|
|
|
669
669
|
className: n
|
|
670
670
|
});
|
|
671
671
|
}
|
|
672
|
-
function
|
|
673
|
-
return /* @__PURE__ */
|
|
672
|
+
function Ze({ variant: e = "solid", color: t = "primary", size: n = "md", className: r, ...i }) {
|
|
673
|
+
return /* @__PURE__ */ j(Xe, {
|
|
674
674
|
...i,
|
|
675
675
|
"data-variant": e,
|
|
676
676
|
"data-color": t,
|
|
677
677
|
"data-size": n,
|
|
678
|
-
className:
|
|
678
|
+
className: K(qe.Button, r)
|
|
679
679
|
});
|
|
680
680
|
}
|
|
681
681
|
//#endregion
|
|
682
682
|
//#region src/components/buttons/action-button.tsx
|
|
683
|
-
function
|
|
684
|
-
return /* @__PURE__ */
|
|
683
|
+
function Qe({ children: e, className: t, ...n }) {
|
|
684
|
+
return /* @__PURE__ */ M(Xe, {
|
|
685
685
|
...n,
|
|
686
|
-
className:
|
|
687
|
-
children: [e, /* @__PURE__ */
|
|
686
|
+
className: K(Ke.ActionButton, t),
|
|
687
|
+
children: [e, /* @__PURE__ */ j(v, {
|
|
688
688
|
"aria-hidden": !0,
|
|
689
|
-
className:
|
|
689
|
+
className: Ke.Arrow
|
|
690
690
|
})]
|
|
691
691
|
});
|
|
692
692
|
}
|
|
693
693
|
//#endregion
|
|
694
694
|
//#region src/components/buttons/button.tsx
|
|
695
|
-
function
|
|
696
|
-
return /* @__PURE__ */
|
|
695
|
+
function $e({ startIcon: e, endIcon: t, loading: n = !1, loadingLabel: r, children: i, ...a }) {
|
|
696
|
+
return /* @__PURE__ */ M(A, { children: [/* @__PURE__ */ M(Ze, {
|
|
697
697
|
...a,
|
|
698
698
|
loading: n,
|
|
699
699
|
"data-start-icon": n || e != null || void 0,
|
|
700
700
|
"data-end-icon": t != null || void 0,
|
|
701
701
|
children: [
|
|
702
|
-
n ? /* @__PURE__ */
|
|
703
|
-
className:
|
|
702
|
+
n ? /* @__PURE__ */ j("span", {
|
|
703
|
+
className: qe.Spinner,
|
|
704
704
|
"aria-hidden": !0
|
|
705
705
|
}) : e,
|
|
706
706
|
i,
|
|
707
707
|
t
|
|
708
708
|
]
|
|
709
|
-
}), r != null && /* @__PURE__ */
|
|
709
|
+
}), r != null && /* @__PURE__ */ j("span", {
|
|
710
710
|
role: "status",
|
|
711
|
-
className:
|
|
711
|
+
className: qe.SrOnly,
|
|
712
712
|
children: n ? r : null
|
|
713
713
|
})] });
|
|
714
714
|
}
|
|
715
715
|
//#endregion
|
|
716
716
|
//#region src/components/feedback/use-close-label.ts
|
|
717
|
-
var
|
|
717
|
+
var et = W({ close: {
|
|
718
718
|
no: "Lukk",
|
|
719
719
|
se: "Stäng",
|
|
720
720
|
fi: "Sulje",
|
|
@@ -722,77 +722,77 @@ var it = B({ close: {
|
|
|
722
722
|
} });
|
|
723
723
|
//#endregion
|
|
724
724
|
//#region src/components/buttons/icon-button.tsx
|
|
725
|
-
function
|
|
726
|
-
return /* @__PURE__ */
|
|
725
|
+
function tt({ loading: e = !1, className: t, children: n, ...r }) {
|
|
726
|
+
return /* @__PURE__ */ j(Ze, {
|
|
727
727
|
...r,
|
|
728
728
|
loading: e,
|
|
729
|
-
className:
|
|
730
|
-
children: e ? /* @__PURE__ */
|
|
731
|
-
className:
|
|
729
|
+
className: K(qe.IconButton, t),
|
|
730
|
+
children: e ? /* @__PURE__ */ j("span", {
|
|
731
|
+
className: qe.Spinner,
|
|
732
732
|
"aria-hidden": !0
|
|
733
733
|
}) : n
|
|
734
734
|
});
|
|
735
735
|
}
|
|
736
736
|
//#endregion
|
|
737
737
|
//#region src/components/buttons/close-button.tsx
|
|
738
|
-
function
|
|
739
|
-
let i =
|
|
740
|
-
return /* @__PURE__ */
|
|
738
|
+
function nt({ label: e, variant: t = "ghost", color: n = "secondary", ...r }) {
|
|
739
|
+
let i = et();
|
|
740
|
+
return /* @__PURE__ */ j(tt, {
|
|
741
741
|
...r,
|
|
742
742
|
variant: t,
|
|
743
743
|
color: n,
|
|
744
744
|
"aria-label": e ?? i.close,
|
|
745
|
-
children: /* @__PURE__ */
|
|
745
|
+
children: /* @__PURE__ */ j(k, { "aria-hidden": !0 })
|
|
746
746
|
});
|
|
747
747
|
}
|
|
748
748
|
//#endregion
|
|
749
749
|
//#region src/utils/downloadFile.ts
|
|
750
|
-
async function
|
|
750
|
+
async function rt(e) {
|
|
751
751
|
return typeof e == "function" ? e() : e;
|
|
752
752
|
}
|
|
753
|
-
function
|
|
753
|
+
function it(e, t, n) {
|
|
754
754
|
let r = e instanceof Blob ? e : new Blob([e], n ? { type: n } : void 0), i = URL.createObjectURL(r), a = document.createElement("a");
|
|
755
755
|
a.href = i, a.download = t, a.rel = "noopener", a.click(), URL.revokeObjectURL(i);
|
|
756
756
|
}
|
|
757
757
|
//#endregion
|
|
758
758
|
//#region src/components/buttons/use-download-labels.ts
|
|
759
|
-
var
|
|
759
|
+
var at = W({ download: {
|
|
760
760
|
no: "Last ned",
|
|
761
761
|
se: "Ladda ner",
|
|
762
762
|
fi: "Lataa",
|
|
763
763
|
es: "Descargar"
|
|
764
|
-
} }),
|
|
765
|
-
let c =
|
|
764
|
+
} }), ot = ({ data: e, fileName: t, mimeType: n, onDownload: r, onDownloadError: i, loading: a, children: o, ...s }) => {
|
|
765
|
+
let c = at(), [l, u] = g(!1), d = a ?? l, f = async () => {
|
|
766
766
|
u(!0);
|
|
767
767
|
try {
|
|
768
|
-
|
|
768
|
+
it(await rt(e), t, n), r?.();
|
|
769
769
|
} catch (e) {
|
|
770
770
|
i?.(e);
|
|
771
771
|
} finally {
|
|
772
772
|
u(!1);
|
|
773
773
|
}
|
|
774
774
|
};
|
|
775
|
-
return /* @__PURE__ */
|
|
775
|
+
return /* @__PURE__ */ j($e, {
|
|
776
776
|
...s,
|
|
777
777
|
loading: d,
|
|
778
778
|
onClick: f,
|
|
779
779
|
children: o ?? c.download
|
|
780
780
|
});
|
|
781
|
-
},
|
|
781
|
+
}, st = { SkipLink: "_SkipLink_1f71c_1" };
|
|
782
782
|
//#endregion
|
|
783
783
|
//#region src/components/buttons/skip-link.tsx
|
|
784
|
-
function
|
|
785
|
-
return /* @__PURE__ */
|
|
786
|
-
render: /* @__PURE__ */
|
|
784
|
+
function ct({ href: e, children: t, className: n, style: r }) {
|
|
785
|
+
return /* @__PURE__ */ j(Ze, {
|
|
786
|
+
render: /* @__PURE__ */ j("a", { href: e }),
|
|
787
787
|
color: "secondary",
|
|
788
|
-
className:
|
|
788
|
+
className: K(st.SkipLink, n),
|
|
789
789
|
style: r,
|
|
790
790
|
children: t
|
|
791
791
|
});
|
|
792
792
|
}
|
|
793
793
|
//#endregion
|
|
794
794
|
//#region src/theme/tokens/font-sizes.ts
|
|
795
|
-
var
|
|
795
|
+
var lt = {
|
|
796
796
|
xs: "0.75rem",
|
|
797
797
|
sm: "0.875rem",
|
|
798
798
|
md: "1rem",
|
|
@@ -803,9 +803,9 @@ var pt = {
|
|
|
803
803
|
"4xl": "3rem",
|
|
804
804
|
"5xl": "3.5rem",
|
|
805
805
|
"6xl": "4rem"
|
|
806
|
-
},
|
|
807
|
-
function
|
|
808
|
-
return
|
|
806
|
+
}, ut = { Text: "_Text_k2hu7_9" }, dt = (e) => `var(--lea-palette-${e.replaceAll(".", "-")})`;
|
|
807
|
+
function ft({ textStyle: e, fontWeight: t, color: n, align: r, fontSize: i, render: a, ref: o, className: s, style: c, ...l }) {
|
|
808
|
+
return N({
|
|
809
809
|
render: a,
|
|
810
810
|
ref: o,
|
|
811
811
|
defaultTagName: "p",
|
|
@@ -815,70 +815,72 @@ function gt({ textStyle: e, fontWeight: t, color: n, align: r, fontSize: i, rend
|
|
|
815
815
|
"data-font-weight": t,
|
|
816
816
|
"data-align": r,
|
|
817
817
|
"data-color": n === "inherit" ? n : void 0,
|
|
818
|
-
className:
|
|
818
|
+
className: K(ut.Text, s)({}),
|
|
819
819
|
style: {
|
|
820
|
-
...n != null && n !== "inherit" ? { color:
|
|
821
|
-
...i == null ? void 0 : { fontSize:
|
|
820
|
+
...n != null && n !== "inherit" ? { color: dt(n) } : void 0,
|
|
821
|
+
...i == null ? void 0 : { fontSize: lt[i] },
|
|
822
822
|
...c
|
|
823
823
|
}
|
|
824
824
|
}
|
|
825
825
|
});
|
|
826
826
|
}
|
|
827
|
-
var
|
|
827
|
+
var pt = {
|
|
828
828
|
DataField: "_DataField_14g0w_1",
|
|
829
829
|
Label: "_Label_14g0w_16",
|
|
830
830
|
Value: "_Value_14g0w_21"
|
|
831
|
-
},
|
|
831
|
+
}, mt = (e) => typeof e == "string" || typeof e == "number", ht = ({ label: e, value: t, divider: n = !0, className: r, ...i }) => /* @__PURE__ */ M("div", {
|
|
832
832
|
...i,
|
|
833
|
-
className: [
|
|
833
|
+
className: [pt.DataField, r].filter(Boolean).join(" "),
|
|
834
834
|
"data-divider": n || void 0,
|
|
835
|
-
children: [/* @__PURE__ */
|
|
836
|
-
className:
|
|
837
|
-
children:
|
|
838
|
-
render: /* @__PURE__ */
|
|
835
|
+
children: [/* @__PURE__ */ j("div", {
|
|
836
|
+
className: pt.Label,
|
|
837
|
+
children: mt(e) ? /* @__PURE__ */ j(ft, {
|
|
838
|
+
render: /* @__PURE__ */ j("span", {}),
|
|
839
839
|
color: "text.subtle",
|
|
840
840
|
children: e
|
|
841
841
|
}) : e
|
|
842
|
-
}), /* @__PURE__ */
|
|
843
|
-
className:
|
|
844
|
-
children:
|
|
845
|
-
render: /* @__PURE__ */
|
|
842
|
+
}), /* @__PURE__ */ j("div", {
|
|
843
|
+
className: pt.Value,
|
|
844
|
+
children: mt(t) ? /* @__PURE__ */ j(ft, {
|
|
845
|
+
render: /* @__PURE__ */ j("span", {}),
|
|
846
846
|
fontWeight: "medium",
|
|
847
847
|
children: t
|
|
848
848
|
}) : t
|
|
849
849
|
})]
|
|
850
|
-
}),
|
|
851
|
-
Card: "
|
|
852
|
-
Content: "
|
|
850
|
+
}), gt = {
|
|
851
|
+
Card: "_Card_6b69s_5",
|
|
852
|
+
Content: "_Content_6b69s_57"
|
|
853
853
|
};
|
|
854
854
|
//#endregion
|
|
855
855
|
//#region src/components/data-display/card.tsx
|
|
856
|
-
function
|
|
857
|
-
return
|
|
856
|
+
function _t({ render: e, ref: t, className: n, color: r, variant: i = "outlined", ...a }) {
|
|
857
|
+
return N({
|
|
858
858
|
render: e,
|
|
859
859
|
ref: t,
|
|
860
860
|
props: {
|
|
861
|
-
...
|
|
862
|
-
|
|
861
|
+
...a,
|
|
862
|
+
"data-color": r,
|
|
863
|
+
"data-variant": i,
|
|
864
|
+
className: K(gt.Card, n)({})
|
|
863
865
|
}
|
|
864
866
|
});
|
|
865
867
|
}
|
|
866
|
-
function
|
|
867
|
-
return
|
|
868
|
+
function vt({ render: e, ref: t, className: n, ...r }) {
|
|
869
|
+
return N({
|
|
868
870
|
render: e,
|
|
869
871
|
ref: t,
|
|
870
872
|
props: {
|
|
871
873
|
...r,
|
|
872
|
-
className:
|
|
874
|
+
className: K(gt.Content, n)({})
|
|
873
875
|
}
|
|
874
876
|
});
|
|
875
877
|
}
|
|
876
|
-
var
|
|
878
|
+
var yt = {
|
|
877
879
|
Chip: "_Chip_7cco8_1",
|
|
878
880
|
Label: "_Label_7cco8_100",
|
|
879
881
|
Icon: "_Icon_7cco8_107",
|
|
880
882
|
Delete: "_Delete_7cco8_111"
|
|
881
|
-
},
|
|
883
|
+
}, bt = W({ remove: {
|
|
882
884
|
no: "Fjern",
|
|
883
885
|
se: "Ta bort",
|
|
884
886
|
fi: "Poista",
|
|
@@ -886,92 +888,92 @@ var Ct = {
|
|
|
886
888
|
} });
|
|
887
889
|
//#endregion
|
|
888
890
|
//#region src/components/data-display/chip.tsx
|
|
889
|
-
function
|
|
890
|
-
let d =
|
|
891
|
-
return /* @__PURE__ */
|
|
891
|
+
function xt({ label: e, color: t = "primary", variant: n = "filled", size: r = "md", icon: i, onDelete: a, deleteLabel: o, disabled: s = !1, className: c, tabIndex: l, ...u }) {
|
|
892
|
+
let d = bt(), f = o ?? (typeof e == "string" ? `${d.remove} ${e}` : d.remove);
|
|
893
|
+
return /* @__PURE__ */ M("span", {
|
|
892
894
|
...u,
|
|
893
895
|
tabIndex: l,
|
|
894
|
-
className: [
|
|
896
|
+
className: [yt.Chip, c].filter(Boolean).join(" "),
|
|
895
897
|
"data-color": t,
|
|
896
898
|
"data-variant": n,
|
|
897
899
|
"data-size": r,
|
|
898
900
|
"data-disabled": s ? "" : void 0,
|
|
899
901
|
children: [
|
|
900
|
-
i != null && /* @__PURE__ */
|
|
901
|
-
className:
|
|
902
|
+
i != null && /* @__PURE__ */ j("span", {
|
|
903
|
+
className: yt.Icon,
|
|
902
904
|
children: i
|
|
903
905
|
}),
|
|
904
|
-
/* @__PURE__ */
|
|
905
|
-
className:
|
|
906
|
+
/* @__PURE__ */ j("span", {
|
|
907
|
+
className: yt.Label,
|
|
906
908
|
children: e
|
|
907
909
|
}),
|
|
908
|
-
a && /* @__PURE__ */
|
|
910
|
+
a && /* @__PURE__ */ j("button", {
|
|
909
911
|
type: "button",
|
|
910
912
|
"aria-label": f,
|
|
911
|
-
className:
|
|
913
|
+
className: yt.Delete,
|
|
912
914
|
disabled: s,
|
|
913
915
|
tabIndex: l === -1 ? -1 : void 0,
|
|
914
916
|
onClick: a,
|
|
915
|
-
children: /* @__PURE__ */
|
|
917
|
+
children: /* @__PURE__ */ j(C, { "aria-hidden": !0 })
|
|
916
918
|
})
|
|
917
919
|
]
|
|
918
920
|
});
|
|
919
921
|
}
|
|
920
|
-
var
|
|
922
|
+
var St = {
|
|
921
923
|
Positioner: "_Positioner_a46fy_1",
|
|
922
924
|
Popup: "_Popup_a46fy_5",
|
|
923
925
|
Arrow: "_Arrow_a46fy_39",
|
|
924
926
|
TriggerBox: "_TriggerBox_a46fy_64",
|
|
925
927
|
Trigger: "_Trigger_a46fy_64",
|
|
926
928
|
Mark: "_Mark_a46fy_118"
|
|
927
|
-
},
|
|
929
|
+
}, Ct = (e) => e == null || e === !1 || e === "", wt = (e) => {
|
|
928
930
|
let [t, n = "center"] = e.split("-");
|
|
929
931
|
return {
|
|
930
932
|
side: t,
|
|
931
933
|
align: n,
|
|
932
|
-
sideOffset:
|
|
934
|
+
sideOffset: Et
|
|
933
935
|
};
|
|
934
|
-
},
|
|
935
|
-
function
|
|
936
|
-
let [u, d] = g(!1), p = f(), m = f(), h = /* @__PURE__ */
|
|
936
|
+
}, Tt = "a[href], button:not([disabled]), input, select, textarea, [tabindex]:not([tabindex=\"-1\"])", Et = 14, Dt = 100;
|
|
937
|
+
function Ot({ title: e, openOn: t, placement: n = "top", surfaceVariant: r = "light", children: i, ariaLabel: a, triggerIcon: o, triggerVariant: s = "icon", className: c, style: l }) {
|
|
938
|
+
let [u, d] = g(!1), p = f(), m = f(), h = /* @__PURE__ */ j("button", {
|
|
937
939
|
type: "button",
|
|
938
940
|
"aria-label": a,
|
|
939
|
-
className: [
|
|
941
|
+
className: [St.Trigger, c].filter(Boolean).join(" "),
|
|
940
942
|
style: l,
|
|
941
943
|
"data-variant": s,
|
|
942
|
-
children: o ?? /* @__PURE__ */
|
|
944
|
+
children: o ?? /* @__PURE__ */ j("span", {
|
|
943
945
|
"aria-hidden": !0,
|
|
944
|
-
className:
|
|
946
|
+
className: St.Mark
|
|
945
947
|
})
|
|
946
|
-
}), _ = i ?? h, v = (e) => i ? e : /* @__PURE__ */
|
|
947
|
-
className:
|
|
948
|
+
}), _ = i ?? h, v = (e) => i ? e : /* @__PURE__ */ j("span", {
|
|
949
|
+
className: St.TriggerBox,
|
|
948
950
|
children: e
|
|
949
951
|
});
|
|
950
|
-
if (
|
|
952
|
+
if (Ct(e)) return v(_);
|
|
951
953
|
if ((t ?? (i ? "hover" : "click")) === "click") {
|
|
952
954
|
let t = i?.props.id ?? p, a = (e) => {
|
|
953
955
|
if (e.key !== "Tab" || e.shiftKey) return;
|
|
954
|
-
let t = e.currentTarget.querySelectorAll(
|
|
956
|
+
let t = e.currentTarget.querySelectorAll(Tt), n = t[t.length - 1];
|
|
955
957
|
(n == null || e.target === n) && (e.preventDefault(), d(!1));
|
|
956
958
|
};
|
|
957
|
-
return /* @__PURE__ */
|
|
959
|
+
return /* @__PURE__ */ M(P.Root, {
|
|
958
960
|
open: u,
|
|
959
961
|
onOpenChange: d,
|
|
960
|
-
children: [v(/* @__PURE__ */
|
|
962
|
+
children: [v(/* @__PURE__ */ j(P.Trigger, {
|
|
961
963
|
render: _,
|
|
962
964
|
id: t,
|
|
963
965
|
openOnHover: !0,
|
|
964
|
-
delay:
|
|
965
|
-
})), /* @__PURE__ */
|
|
966
|
-
...
|
|
967
|
-
className:
|
|
968
|
-
children: /* @__PURE__ */
|
|
966
|
+
delay: Dt
|
|
967
|
+
})), /* @__PURE__ */ j(P.Portal, { children: /* @__PURE__ */ j(P.Positioner, {
|
|
968
|
+
...wt(n),
|
|
969
|
+
className: St.Positioner,
|
|
970
|
+
children: /* @__PURE__ */ M(P.Popup, {
|
|
969
971
|
"aria-labelledby": t,
|
|
970
972
|
onKeyDown: a,
|
|
971
|
-
className:
|
|
973
|
+
className: St.Popup,
|
|
972
974
|
"data-surface": r,
|
|
973
|
-
children: [/* @__PURE__ */
|
|
974
|
-
render: /* @__PURE__ */
|
|
975
|
+
children: [/* @__PURE__ */ j(P.Arrow, { className: St.Arrow }), /* @__PURE__ */ j(P.Description, {
|
|
976
|
+
render: /* @__PURE__ */ j("div", {}),
|
|
975
977
|
children: e
|
|
976
978
|
})]
|
|
977
979
|
})
|
|
@@ -979,27 +981,27 @@ function jt({ title: e, openOn: t, placement: n = "top", surfaceVariant: r = "li
|
|
|
979
981
|
});
|
|
980
982
|
}
|
|
981
983
|
let y = [i?.props["aria-describedby"], u && m].filter(Boolean).join(" ") || void 0;
|
|
982
|
-
return /* @__PURE__ */
|
|
984
|
+
return /* @__PURE__ */ M(F.Root, {
|
|
983
985
|
open: u,
|
|
984
986
|
onOpenChange: d,
|
|
985
|
-
children: [v(/* @__PURE__ */
|
|
987
|
+
children: [v(/* @__PURE__ */ j(F.Trigger, {
|
|
986
988
|
render: _,
|
|
987
|
-
delay:
|
|
989
|
+
delay: Dt,
|
|
988
990
|
"aria-describedby": y
|
|
989
|
-
})), /* @__PURE__ */
|
|
990
|
-
...
|
|
991
|
-
className:
|
|
992
|
-
children: /* @__PURE__ */
|
|
991
|
+
})), /* @__PURE__ */ j(F.Portal, { children: /* @__PURE__ */ j(F.Positioner, {
|
|
992
|
+
...wt(n),
|
|
993
|
+
className: St.Positioner,
|
|
994
|
+
children: /* @__PURE__ */ M(F.Popup, {
|
|
993
995
|
id: m,
|
|
994
996
|
role: "tooltip",
|
|
995
|
-
className:
|
|
997
|
+
className: St.Popup,
|
|
996
998
|
"data-surface": r,
|
|
997
|
-
children: [/* @__PURE__ */
|
|
999
|
+
children: [/* @__PURE__ */ j(F.Arrow, { className: St.Arrow }), e]
|
|
998
1000
|
})
|
|
999
1001
|
}) })]
|
|
1000
1002
|
});
|
|
1001
1003
|
}
|
|
1002
|
-
var
|
|
1004
|
+
var kt = {
|
|
1003
1005
|
Alert: "_Alert_q79pt_9",
|
|
1004
1006
|
Layout: "_Layout_q79pt_31",
|
|
1005
1007
|
Icon: "_Icon_q79pt_37",
|
|
@@ -1007,50 +1009,50 @@ var W = {
|
|
|
1007
1009
|
Title: "_Title_q79pt_58",
|
|
1008
1010
|
Action: "_Action_q79pt_62",
|
|
1009
1011
|
Close: "_Close_q79pt_110"
|
|
1010
|
-
},
|
|
1011
|
-
success: /* @__PURE__ */
|
|
1012
|
+
}, At = ["primary", "neutral"], jt = {
|
|
1013
|
+
success: /* @__PURE__ */ j(S, {
|
|
1012
1014
|
size: "1em",
|
|
1013
1015
|
"aria-hidden": !0
|
|
1014
1016
|
}),
|
|
1015
|
-
info: /* @__PURE__ */
|
|
1017
|
+
info: /* @__PURE__ */ j(w, {
|
|
1016
1018
|
size: "1em",
|
|
1017
1019
|
"aria-hidden": !0
|
|
1018
1020
|
}),
|
|
1019
|
-
warning: /* @__PURE__ */
|
|
1021
|
+
warning: /* @__PURE__ */ j(ee, {
|
|
1020
1022
|
size: "1em",
|
|
1021
1023
|
"aria-hidden": !0
|
|
1022
1024
|
}),
|
|
1023
|
-
error: /* @__PURE__ */
|
|
1025
|
+
error: /* @__PURE__ */ j(x, {
|
|
1024
1026
|
size: "1em",
|
|
1025
1027
|
"aria-hidden": !0
|
|
1026
1028
|
})
|
|
1027
1029
|
};
|
|
1028
|
-
function
|
|
1029
|
-
let d = e ?? (t &&
|
|
1030
|
+
function Mt({ severity: e, color: t, variant: n = "standard", size: r = "lg", icon: i, action: a, onClose: o, closeLabel: s, role: c, children: l, ...u }) {
|
|
1031
|
+
let d = e ?? (t && At.includes(t) ? "info" : "success"), f = {
|
|
1030
1032
|
...u,
|
|
1031
1033
|
role: c ?? (d === "error" || d === "warning" ? "alert" : "status"),
|
|
1032
1034
|
"data-color": t ?? d,
|
|
1033
1035
|
"data-variant": n,
|
|
1034
1036
|
"data-size": r
|
|
1035
|
-
}, p = i === void 0 ?
|
|
1037
|
+
}, p = i === void 0 ? jt[d] : i, m = a ?? (o && /* @__PURE__ */ j(nt, {
|
|
1036
1038
|
size: "sm",
|
|
1037
1039
|
label: s,
|
|
1038
1040
|
onClick: o,
|
|
1039
|
-
className:
|
|
1041
|
+
className: kt.Close
|
|
1040
1042
|
}));
|
|
1041
1043
|
return {
|
|
1042
1044
|
rootProps: f,
|
|
1043
|
-
content: /* @__PURE__ */
|
|
1044
|
-
p !== !1 && p != null && /* @__PURE__ */
|
|
1045
|
-
className:
|
|
1045
|
+
content: /* @__PURE__ */ M(A, { children: [
|
|
1046
|
+
p !== !1 && p != null && /* @__PURE__ */ j("div", {
|
|
1047
|
+
className: kt.Icon,
|
|
1046
1048
|
children: p
|
|
1047
1049
|
}),
|
|
1048
|
-
/* @__PURE__ */
|
|
1049
|
-
className:
|
|
1050
|
+
/* @__PURE__ */ j("div", {
|
|
1051
|
+
className: kt.Message,
|
|
1050
1052
|
children: l
|
|
1051
1053
|
}),
|
|
1052
|
-
m && /* @__PURE__ */
|
|
1053
|
-
className:
|
|
1054
|
+
m && /* @__PURE__ */ j("div", {
|
|
1055
|
+
className: kt.Action,
|
|
1054
1056
|
children: m
|
|
1055
1057
|
})
|
|
1056
1058
|
] })
|
|
@@ -1058,25 +1060,25 @@ function Pt({ severity: e, color: t, variant: n = "standard", size: r = "lg", ic
|
|
|
1058
1060
|
}
|
|
1059
1061
|
//#endregion
|
|
1060
1062
|
//#region src/components/feedback/alert.tsx
|
|
1061
|
-
function
|
|
1062
|
-
let { rootProps: n, content: r } =
|
|
1063
|
-
return /* @__PURE__ */
|
|
1063
|
+
function Nt({ className: e, ...t }) {
|
|
1064
|
+
let { rootProps: n, content: r } = Mt(t);
|
|
1065
|
+
return /* @__PURE__ */ j("div", {
|
|
1064
1066
|
...n,
|
|
1065
1067
|
className: [
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
+
kt.Alert,
|
|
1069
|
+
kt.Layout,
|
|
1068
1070
|
e
|
|
1069
1071
|
].filter(Boolean).join(" "),
|
|
1070
1072
|
children: r
|
|
1071
1073
|
});
|
|
1072
1074
|
}
|
|
1073
|
-
function
|
|
1074
|
-
return /* @__PURE__ */
|
|
1075
|
+
function Pt({ className: e, ...t }) {
|
|
1076
|
+
return /* @__PURE__ */ j("div", {
|
|
1075
1077
|
...t,
|
|
1076
|
-
className: [
|
|
1078
|
+
className: [kt.Title, e].filter(Boolean).join(" ")
|
|
1077
1079
|
});
|
|
1078
1080
|
}
|
|
1079
|
-
var
|
|
1081
|
+
var Ft = {
|
|
1080
1082
|
Backdrop: "_Backdrop_1mady_8",
|
|
1081
1083
|
Viewport: "_Viewport_1mady_22",
|
|
1082
1084
|
Popup: "_Popup_1mady_38",
|
|
@@ -1086,85 +1088,85 @@ var G = {
|
|
|
1086
1088
|
Content: "_Content_1mady_111",
|
|
1087
1089
|
Footer: "_Footer_1mady_119",
|
|
1088
1090
|
CloseButton: "_CloseButton_1mady_135"
|
|
1089
|
-
},
|
|
1090
|
-
Backdrop: () =>
|
|
1091
|
-
Close: () =>
|
|
1092
|
-
CloseButton: () =>
|
|
1093
|
-
Content: () =>
|
|
1094
|
-
Description: () =>
|
|
1095
|
-
Footer: () =>
|
|
1096
|
-
Header: () =>
|
|
1097
|
-
Popup: () =>
|
|
1098
|
-
Portal: () =>
|
|
1099
|
-
Root: () =>
|
|
1100
|
-
Title: () =>
|
|
1101
|
-
Trigger: () =>
|
|
1102
|
-
Viewport: () =>
|
|
1103
|
-
}),
|
|
1104
|
-
function
|
|
1105
|
-
return /* @__PURE__ */
|
|
1091
|
+
}, It = /* @__PURE__ */ ge({
|
|
1092
|
+
Backdrop: () => Bt,
|
|
1093
|
+
Close: () => Jt,
|
|
1094
|
+
CloseButton: () => Yt,
|
|
1095
|
+
Content: () => Kt,
|
|
1096
|
+
Description: () => Gt,
|
|
1097
|
+
Footer: () => qt,
|
|
1098
|
+
Header: () => Ut,
|
|
1099
|
+
Popup: () => Ht,
|
|
1100
|
+
Portal: () => zt,
|
|
1101
|
+
Root: () => Lt,
|
|
1102
|
+
Title: () => Wt,
|
|
1103
|
+
Trigger: () => Rt,
|
|
1104
|
+
Viewport: () => Vt
|
|
1105
|
+
}), Lt = I.Root, Rt = I.Trigger, zt = I.Portal;
|
|
1106
|
+
function Bt({ className: e, ...t }) {
|
|
1107
|
+
return /* @__PURE__ */ j(I.Backdrop, {
|
|
1106
1108
|
...t,
|
|
1107
|
-
className:
|
|
1109
|
+
className: K(Ft.Backdrop, e)
|
|
1108
1110
|
});
|
|
1109
1111
|
}
|
|
1110
|
-
function
|
|
1111
|
-
return /* @__PURE__ */
|
|
1112
|
+
function Vt({ className: e, ...t }) {
|
|
1113
|
+
return /* @__PURE__ */ j(I.Viewport, {
|
|
1112
1114
|
...t,
|
|
1113
|
-
className:
|
|
1115
|
+
className: K(Ft.Viewport, e)
|
|
1114
1116
|
});
|
|
1115
1117
|
}
|
|
1116
|
-
function
|
|
1117
|
-
return /* @__PURE__ */
|
|
1118
|
+
function Ht({ size: e = "sm", fullScreenOnMobile: t, className: n, ...r }) {
|
|
1119
|
+
return /* @__PURE__ */ j(I.Popup, {
|
|
1118
1120
|
...r,
|
|
1119
1121
|
"data-size": e,
|
|
1120
1122
|
"data-full-screen-on-mobile": t || void 0,
|
|
1121
|
-
className:
|
|
1123
|
+
className: K(Ft.Popup, n)
|
|
1124
|
+
});
|
|
1125
|
+
}
|
|
1126
|
+
function Ut({ className: e, ...t }) {
|
|
1127
|
+
return /* @__PURE__ */ j("div", {
|
|
1128
|
+
...t,
|
|
1129
|
+
className: [Ft.Header, e].filter(Boolean).join(" ")
|
|
1122
1130
|
});
|
|
1123
1131
|
}
|
|
1124
1132
|
function Wt({ className: e, ...t }) {
|
|
1125
|
-
return /* @__PURE__ */
|
|
1133
|
+
return /* @__PURE__ */ j(I.Title, {
|
|
1126
1134
|
...t,
|
|
1127
|
-
className:
|
|
1135
|
+
className: K(Ft.Title, e)
|
|
1128
1136
|
});
|
|
1129
1137
|
}
|
|
1130
1138
|
function Gt({ className: e, ...t }) {
|
|
1131
|
-
return /* @__PURE__ */
|
|
1139
|
+
return /* @__PURE__ */ j(I.Description, {
|
|
1132
1140
|
...t,
|
|
1133
|
-
className:
|
|
1141
|
+
className: K(Ft.Description, e)
|
|
1134
1142
|
});
|
|
1135
1143
|
}
|
|
1136
1144
|
function Kt({ className: e, ...t }) {
|
|
1137
|
-
return /* @__PURE__ */
|
|
1145
|
+
return /* @__PURE__ */ j("div", {
|
|
1138
1146
|
...t,
|
|
1139
|
-
className:
|
|
1147
|
+
className: [Ft.Content, e].filter(Boolean).join(" ")
|
|
1140
1148
|
});
|
|
1141
1149
|
}
|
|
1142
1150
|
function qt({ className: e, ...t }) {
|
|
1143
|
-
return /* @__PURE__ */
|
|
1144
|
-
...t,
|
|
1145
|
-
className: [G.Content, e].filter(Boolean).join(" ")
|
|
1146
|
-
});
|
|
1147
|
-
}
|
|
1148
|
-
function Jt({ className: e, ...t }) {
|
|
1149
|
-
return /* @__PURE__ */ O("div", {
|
|
1151
|
+
return /* @__PURE__ */ j("div", {
|
|
1150
1152
|
...t,
|
|
1151
|
-
className: [
|
|
1153
|
+
className: [Ft.Footer, e].filter(Boolean).join(" ")
|
|
1152
1154
|
});
|
|
1153
1155
|
}
|
|
1154
|
-
var
|
|
1155
|
-
function
|
|
1156
|
-
let r =
|
|
1157
|
-
return /* @__PURE__ */
|
|
1156
|
+
var Jt = I.Close;
|
|
1157
|
+
function Yt({ label: e, className: t, ...n }) {
|
|
1158
|
+
let r = et();
|
|
1159
|
+
return /* @__PURE__ */ j(I.Close, {
|
|
1158
1160
|
...n,
|
|
1159
1161
|
"aria-label": e ?? r.close,
|
|
1160
|
-
className:
|
|
1161
|
-
children: /* @__PURE__ */
|
|
1162
|
+
className: K(Ft.CloseButton, t),
|
|
1163
|
+
children: /* @__PURE__ */ j(k, {
|
|
1162
1164
|
size: 20,
|
|
1163
1165
|
"aria-hidden": !0
|
|
1164
1166
|
})
|
|
1165
1167
|
});
|
|
1166
1168
|
}
|
|
1167
|
-
var
|
|
1169
|
+
var Xt = {
|
|
1168
1170
|
Backdrop: "_Backdrop_rjjxr_12",
|
|
1169
1171
|
Viewport: "_Viewport_rjjxr_27",
|
|
1170
1172
|
Popup: "_Popup_rjjxr_35",
|
|
@@ -1174,7 +1176,7 @@ var K = {
|
|
|
1174
1176
|
Description: "_Description_rjjxr_153",
|
|
1175
1177
|
Content: "_Content_rjjxr_167",
|
|
1176
1178
|
CloseButton: "_CloseButton_rjjxr_174"
|
|
1177
|
-
}, Zt = /* @__PURE__ */
|
|
1179
|
+
}, Zt = /* @__PURE__ */ ge({
|
|
1178
1180
|
Backdrop: () => nn,
|
|
1179
1181
|
Close: () => dn,
|
|
1180
1182
|
CloseButton: () => fn,
|
|
@@ -1195,69 +1197,69 @@ var K = {
|
|
|
1195
1197
|
bottom: "down"
|
|
1196
1198
|
};
|
|
1197
1199
|
function $t({ side: e = "right", ...t }) {
|
|
1198
|
-
return /* @__PURE__ */
|
|
1200
|
+
return /* @__PURE__ */ j(L.Root, {
|
|
1199
1201
|
...t,
|
|
1200
1202
|
swipeDirection: Qt[e]
|
|
1201
1203
|
});
|
|
1202
1204
|
}
|
|
1203
|
-
var en =
|
|
1205
|
+
var en = L.Trigger, tn = L.Portal;
|
|
1204
1206
|
function nn({ className: e, ...t }) {
|
|
1205
|
-
return /* @__PURE__ */
|
|
1207
|
+
return /* @__PURE__ */ j(L.Backdrop, {
|
|
1206
1208
|
...t,
|
|
1207
|
-
className:
|
|
1209
|
+
className: K(Xt.Backdrop, e)
|
|
1208
1210
|
});
|
|
1209
1211
|
}
|
|
1210
1212
|
function rn({ className: e, ...t }) {
|
|
1211
|
-
return /* @__PURE__ */
|
|
1213
|
+
return /* @__PURE__ */ j(L.Viewport, {
|
|
1212
1214
|
...t,
|
|
1213
|
-
className:
|
|
1215
|
+
className: K(Xt.Viewport, e)
|
|
1214
1216
|
});
|
|
1215
1217
|
}
|
|
1216
1218
|
function an({ className: e, ...t }) {
|
|
1217
|
-
return /* @__PURE__ */
|
|
1219
|
+
return /* @__PURE__ */ j(L.Popup, {
|
|
1218
1220
|
...t,
|
|
1219
|
-
className:
|
|
1221
|
+
className: K(Xt.Popup, e)
|
|
1220
1222
|
});
|
|
1221
1223
|
}
|
|
1222
1224
|
function on({ className: e, ...t }) {
|
|
1223
|
-
return /* @__PURE__ */
|
|
1225
|
+
return /* @__PURE__ */ j("div", {
|
|
1224
1226
|
...t,
|
|
1225
1227
|
"aria-hidden": !0,
|
|
1226
|
-
className: [
|
|
1228
|
+
className: [Xt.Handle, e].filter(Boolean).join(" ")
|
|
1227
1229
|
});
|
|
1228
1230
|
}
|
|
1229
1231
|
function sn({ className: e, ...t }) {
|
|
1230
|
-
return /* @__PURE__ */
|
|
1232
|
+
return /* @__PURE__ */ j("div", {
|
|
1231
1233
|
...t,
|
|
1232
|
-
className: [
|
|
1234
|
+
className: [Xt.Header, e].filter(Boolean).join(" ")
|
|
1233
1235
|
});
|
|
1234
1236
|
}
|
|
1235
1237
|
function cn({ className: e, ...t }) {
|
|
1236
|
-
return /* @__PURE__ */
|
|
1238
|
+
return /* @__PURE__ */ j(L.Title, {
|
|
1237
1239
|
...t,
|
|
1238
|
-
className:
|
|
1240
|
+
className: K(Xt.Title, e)
|
|
1239
1241
|
});
|
|
1240
1242
|
}
|
|
1241
1243
|
function ln({ className: e, ...t }) {
|
|
1242
|
-
return /* @__PURE__ */
|
|
1244
|
+
return /* @__PURE__ */ j(L.Description, {
|
|
1243
1245
|
...t,
|
|
1244
|
-
className:
|
|
1246
|
+
className: K(Xt.Description, e)
|
|
1245
1247
|
});
|
|
1246
1248
|
}
|
|
1247
1249
|
function un({ className: e, ...t }) {
|
|
1248
|
-
return /* @__PURE__ */
|
|
1250
|
+
return /* @__PURE__ */ j(L.Content, {
|
|
1249
1251
|
...t,
|
|
1250
|
-
className:
|
|
1252
|
+
className: K(Xt.Content, e)
|
|
1251
1253
|
});
|
|
1252
1254
|
}
|
|
1253
|
-
var dn =
|
|
1255
|
+
var dn = L.Close;
|
|
1254
1256
|
function fn({ label: e, className: t, ...n }) {
|
|
1255
|
-
let r =
|
|
1256
|
-
return /* @__PURE__ */
|
|
1257
|
+
let r = et();
|
|
1258
|
+
return /* @__PURE__ */ j(L.Close, {
|
|
1257
1259
|
...n,
|
|
1258
1260
|
"aria-label": e ?? r.close,
|
|
1259
|
-
className:
|
|
1260
|
-
children: /* @__PURE__ */
|
|
1261
|
+
className: K(Xt.CloseButton, t),
|
|
1262
|
+
children: /* @__PURE__ */ j(k, {
|
|
1261
1263
|
size: 20,
|
|
1262
1264
|
"aria-hidden": !0
|
|
1263
1265
|
})
|
|
@@ -1267,25 +1269,25 @@ var pn = { Container: "_Container_15dwv_1" };
|
|
|
1267
1269
|
//#endregion
|
|
1268
1270
|
//#region src/components/layout/container.tsx
|
|
1269
1271
|
function mn({ size: e = "lg", render: t, className: n, ...r }) {
|
|
1270
|
-
return
|
|
1272
|
+
return N({
|
|
1271
1273
|
render: t,
|
|
1272
1274
|
props: {
|
|
1273
1275
|
...r,
|
|
1274
1276
|
"data-size": e,
|
|
1275
|
-
className:
|
|
1277
|
+
className: K(pn.Container, n)({})
|
|
1276
1278
|
}
|
|
1277
1279
|
});
|
|
1278
1280
|
}
|
|
1279
1281
|
//#endregion
|
|
1280
1282
|
//#region src/components/feedback/global-alert.tsx
|
|
1281
1283
|
function hn({ fluid: e = !1, className: t, ...n }) {
|
|
1282
|
-
let { rootProps: r, content: i } =
|
|
1283
|
-
return /* @__PURE__ */
|
|
1284
|
+
let { rootProps: r, content: i } = Mt(n);
|
|
1285
|
+
return /* @__PURE__ */ j("div", {
|
|
1284
1286
|
...r,
|
|
1285
1287
|
"data-global": "",
|
|
1286
|
-
className: [
|
|
1287
|
-
children: /* @__PURE__ */
|
|
1288
|
-
className:
|
|
1288
|
+
className: [kt.Alert, t].filter(Boolean).join(" "),
|
|
1289
|
+
children: /* @__PURE__ */ j(mn, {
|
|
1290
|
+
className: kt.Layout,
|
|
1289
1291
|
"data-fluid": e || void 0,
|
|
1290
1292
|
children: i
|
|
1291
1293
|
})
|
|
@@ -1294,12 +1296,12 @@ function hn({ fluid: e = !1, className: t, ...n }) {
|
|
|
1294
1296
|
//#endregion
|
|
1295
1297
|
//#region src/components/feedback/simple-dialog.tsx
|
|
1296
1298
|
function gn({ title: e, description: t, children: n, closeLabel: r, size: i, fullScreenOnMobile: a, hideCloseButton: o, ...s }) {
|
|
1297
|
-
return /* @__PURE__ */
|
|
1299
|
+
return /* @__PURE__ */ j(Lt, {
|
|
1298
1300
|
...s,
|
|
1299
|
-
children: /* @__PURE__ */
|
|
1301
|
+
children: /* @__PURE__ */ M(zt, { children: [/* @__PURE__ */ j(Bt, {}), /* @__PURE__ */ j(Vt, { children: /* @__PURE__ */ M(Ht, {
|
|
1300
1302
|
size: i,
|
|
1301
1303
|
fullScreenOnMobile: a,
|
|
1302
|
-
children: [/* @__PURE__ */
|
|
1304
|
+
children: [/* @__PURE__ */ M(Ut, { children: [/* @__PURE__ */ j(Wt, { children: e }), !o && /* @__PURE__ */ j(Yt, { label: r })] }), /* @__PURE__ */ M(Kt, { children: [t != null && /* @__PURE__ */ j(Gt, {
|
|
1303
1305
|
"data-last": n == null || void 0,
|
|
1304
1306
|
children: t
|
|
1305
1307
|
}), n] })]
|
|
@@ -1309,25 +1311,25 @@ function gn({ title: e, description: t, children: n, closeLabel: r, size: i, ful
|
|
|
1309
1311
|
//#endregion
|
|
1310
1312
|
//#region src/components/feedback/simple-drawer.tsx
|
|
1311
1313
|
function _n({ title: e, description: t, children: n, closeLabel: r, side: i = "right", ...a }) {
|
|
1312
|
-
return /* @__PURE__ */
|
|
1314
|
+
return /* @__PURE__ */ j($t, {
|
|
1313
1315
|
...a,
|
|
1314
1316
|
side: i,
|
|
1315
|
-
children: /* @__PURE__ */
|
|
1316
|
-
i === "bottom" && /* @__PURE__ */
|
|
1317
|
-
/* @__PURE__ */
|
|
1318
|
-
/* @__PURE__ */
|
|
1317
|
+
children: /* @__PURE__ */ M(tn, { children: [/* @__PURE__ */ j(nn, {}), /* @__PURE__ */ j(rn, { children: /* @__PURE__ */ M(an, { children: [
|
|
1318
|
+
i === "bottom" && /* @__PURE__ */ j(on, {}),
|
|
1319
|
+
/* @__PURE__ */ M(sn, { children: [/* @__PURE__ */ j(cn, { children: e }), /* @__PURE__ */ j(fn, { label: r })] }),
|
|
1320
|
+
/* @__PURE__ */ M(un, { children: [t != null && /* @__PURE__ */ j(ln, {
|
|
1319
1321
|
"data-last": n == null || void 0,
|
|
1320
1322
|
children: t
|
|
1321
1323
|
}), n] }),
|
|
1322
|
-
i === "top" && /* @__PURE__ */
|
|
1324
|
+
i === "top" && /* @__PURE__ */ j(on, {})
|
|
1323
1325
|
] }) })] })
|
|
1324
1326
|
});
|
|
1325
1327
|
}
|
|
1326
1328
|
var vn = {
|
|
1327
|
-
AmountSlider: "
|
|
1328
|
-
Label: "
|
|
1329
|
-
Input: "
|
|
1330
|
-
Slider: "
|
|
1329
|
+
AmountSlider: "_AmountSlider_1ccju_10",
|
|
1330
|
+
Label: "_Label_1ccju_21",
|
|
1331
|
+
Input: "_Input_1ccju_31",
|
|
1332
|
+
Slider: "_Slider_1ccju_83"
|
|
1331
1333
|
}, yn = {
|
|
1332
1334
|
Control: "_Control_qg3r1_7",
|
|
1333
1335
|
Track: "_Track_qg3r1_51",
|
|
@@ -1335,13 +1337,13 @@ var vn = {
|
|
|
1335
1337
|
Thumb: "_Thumb_qg3r1_87",
|
|
1336
1338
|
Range: "_Range_qg3r1_119",
|
|
1337
1339
|
HelperText: "_HelperText_qg3r1_131"
|
|
1338
|
-
}, bn = (e) => /* @__PURE__ */
|
|
1340
|
+
}, bn = (e) => /* @__PURE__ */ j(A, { children: e.children });
|
|
1339
1341
|
function xn({ "aria-label": e, "aria-describedby": t }) {
|
|
1340
|
-
return /* @__PURE__ */
|
|
1342
|
+
return /* @__PURE__ */ j(z.Control, {
|
|
1341
1343
|
className: yn.Control,
|
|
1342
|
-
children: /* @__PURE__ */
|
|
1344
|
+
children: /* @__PURE__ */ M(z.Track, {
|
|
1343
1345
|
className: yn.Track,
|
|
1344
|
-
children: [/* @__PURE__ */
|
|
1346
|
+
children: [/* @__PURE__ */ j(z.Indicator, { className: yn.Indicator }), /* @__PURE__ */ j(z.Thumb, {
|
|
1345
1347
|
className: yn.Thumb,
|
|
1346
1348
|
"aria-label": e,
|
|
1347
1349
|
"aria-describedby": t
|
|
@@ -1351,14 +1353,14 @@ function xn({ "aria-label": e, "aria-describedby": t }) {
|
|
|
1351
1353
|
}
|
|
1352
1354
|
function Sn({ min: e, max: t, format: n, locale: r }) {
|
|
1353
1355
|
let i = m(() => new Intl.NumberFormat(r, n), [r, n]);
|
|
1354
|
-
return /* @__PURE__ */
|
|
1356
|
+
return /* @__PURE__ */ M("div", {
|
|
1355
1357
|
className: yn.Range,
|
|
1356
1358
|
"aria-hidden": !0,
|
|
1357
|
-
children: [/* @__PURE__ */
|
|
1359
|
+
children: [/* @__PURE__ */ j("span", { children: i.format(e) }), /* @__PURE__ */ j("span", { children: i.format(t) })]
|
|
1358
1360
|
});
|
|
1359
1361
|
}
|
|
1360
1362
|
function Cn({ id: e, error: t, children: n }) {
|
|
1361
|
-
return /* @__PURE__ */
|
|
1363
|
+
return /* @__PURE__ */ j("p", {
|
|
1362
1364
|
id: e,
|
|
1363
1365
|
className: yn.HelperText,
|
|
1364
1366
|
"data-invalid": t ? "" : void 0,
|
|
@@ -1372,17 +1374,17 @@ function wn({ label: e, min: t, max: n, step: r = 1, value: i, defaultValue: a,
|
|
|
1372
1374
|
let _ = f(), v = f(), y = f(), b = d == null ? void 0 : y, [x, S] = g(a ?? t), C = i ?? x, [w, T] = g(), E = (e) => {
|
|
1373
1375
|
T(void 0), i === void 0 && S(e), e !== C && o?.(e);
|
|
1374
1376
|
};
|
|
1375
|
-
return /* @__PURE__ */
|
|
1377
|
+
return /* @__PURE__ */ M("div", {
|
|
1376
1378
|
...h,
|
|
1377
1379
|
className: [vn.AmountSlider, m].filter(Boolean).join(" "),
|
|
1378
1380
|
children: [
|
|
1379
|
-
/* @__PURE__ */
|
|
1381
|
+
/* @__PURE__ */ j("label", {
|
|
1380
1382
|
id: _,
|
|
1381
1383
|
htmlFor: v,
|
|
1382
1384
|
className: vn.Label,
|
|
1383
1385
|
children: e
|
|
1384
1386
|
}),
|
|
1385
|
-
/* @__PURE__ */
|
|
1387
|
+
/* @__PURE__ */ j(R.Root, {
|
|
1386
1388
|
id: v,
|
|
1387
1389
|
name: l,
|
|
1388
1390
|
value: w === void 0 ? C : w,
|
|
@@ -1399,17 +1401,17 @@ function wn({ label: e, min: t, max: n, step: r = 1, value: i, defaultValue: a,
|
|
|
1399
1401
|
format: s,
|
|
1400
1402
|
locale: c,
|
|
1401
1403
|
disabled: u,
|
|
1402
|
-
children: /* @__PURE__ */
|
|
1404
|
+
children: /* @__PURE__ */ j(R.Input, {
|
|
1403
1405
|
className: vn.Input,
|
|
1404
1406
|
"aria-describedby": b,
|
|
1405
1407
|
"aria-invalid": p || void 0,
|
|
1406
1408
|
"data-invalid": p ? "" : void 0
|
|
1407
1409
|
})
|
|
1408
1410
|
}),
|
|
1409
|
-
/* @__PURE__ */
|
|
1411
|
+
/* @__PURE__ */ j(ne.Root, {
|
|
1410
1412
|
invalid: p,
|
|
1411
1413
|
render: bn,
|
|
1412
|
-
children: /* @__PURE__ */
|
|
1414
|
+
children: /* @__PURE__ */ M(z.Root, {
|
|
1413
1415
|
value: C,
|
|
1414
1416
|
onValueChange: E,
|
|
1415
1417
|
min: t,
|
|
@@ -1420,7 +1422,7 @@ function wn({ label: e, min: t, max: n, step: r = 1, value: i, defaultValue: a,
|
|
|
1420
1422
|
disabled: u,
|
|
1421
1423
|
"aria-labelledby": _,
|
|
1422
1424
|
className: vn.Slider,
|
|
1423
|
-
children: [/* @__PURE__ */
|
|
1425
|
+
children: [/* @__PURE__ */ j(xn, { "aria-describedby": b }), /* @__PURE__ */ j(Sn, {
|
|
1424
1426
|
min: t,
|
|
1425
1427
|
max: n,
|
|
1426
1428
|
format: s,
|
|
@@ -1428,7 +1430,7 @@ function wn({ label: e, min: t, max: n, step: r = 1, value: i, defaultValue: a,
|
|
|
1428
1430
|
})]
|
|
1429
1431
|
})
|
|
1430
1432
|
}),
|
|
1431
|
-
d != null && /* @__PURE__ */
|
|
1433
|
+
d != null && /* @__PURE__ */ j(Cn, {
|
|
1432
1434
|
id: y,
|
|
1433
1435
|
error: p,
|
|
1434
1436
|
children: d
|
|
@@ -1450,44 +1452,52 @@ var q = {
|
|
|
1450
1452
|
ChipInput: "_ChipInput_ghj8z_124",
|
|
1451
1453
|
Popup: "_Popup_ghj8z_161"
|
|
1452
1454
|
}, Tn = {
|
|
1453
|
-
GroupLabel: "
|
|
1454
|
-
HelperText: "
|
|
1455
|
-
}, En =
|
|
1455
|
+
GroupLabel: "_GroupLabel_kcgec_11",
|
|
1456
|
+
HelperText: "_HelperText_kcgec_33"
|
|
1457
|
+
}, En = W({ moreInformation: {
|
|
1456
1458
|
no: "Mer informasjon",
|
|
1457
1459
|
se: "Mer information",
|
|
1458
1460
|
fi: "Lisätietoja",
|
|
1459
1461
|
es: "Más información"
|
|
1460
|
-
} }), Dn = ({ className: e }) => /* @__PURE__ */
|
|
1462
|
+
} }), Dn = ({ className: e }) => /* @__PURE__ */ j("span", {
|
|
1461
1463
|
"aria-hidden": !0,
|
|
1462
1464
|
className: e,
|
|
1463
1465
|
children: " *"
|
|
1464
1466
|
});
|
|
1465
|
-
function On({ id: e, error: t,
|
|
1466
|
-
return /* @__PURE__ */
|
|
1467
|
+
function On({ id: e, error: t, warning: n = !1, children: r }) {
|
|
1468
|
+
return /* @__PURE__ */ j("p", {
|
|
1467
1469
|
id: e,
|
|
1468
1470
|
className: Tn.HelperText,
|
|
1469
1471
|
"data-invalid": t ? "" : void 0,
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
+
"data-warning": n && !t ? "" : void 0,
|
|
1473
|
+
role: t ? "alert" : n ? "status" : void 0,
|
|
1474
|
+
children: r
|
|
1472
1475
|
});
|
|
1473
1476
|
}
|
|
1474
|
-
function kn(
|
|
1477
|
+
function kn(e, t, n) {
|
|
1478
|
+
let r = !n && t != null && t !== !1 && t !== "";
|
|
1479
|
+
return {
|
|
1480
|
+
content: r ? t : e,
|
|
1481
|
+
warning: r
|
|
1482
|
+
};
|
|
1483
|
+
}
|
|
1484
|
+
function An({ id: e, htmlFor: t, tooltip: n, required: r, error: i, disabled: a, children: o }) {
|
|
1475
1485
|
let s = En(), c = n != null && n !== !1;
|
|
1476
|
-
return /* @__PURE__ */
|
|
1486
|
+
return /* @__PURE__ */ M("div", {
|
|
1477
1487
|
className: Tn.GroupLabel,
|
|
1478
1488
|
"data-invalid": i ? "" : void 0,
|
|
1479
1489
|
"data-disabled": a ? "" : void 0,
|
|
1480
|
-
children: [/* @__PURE__ */
|
|
1490
|
+
children: [/* @__PURE__ */ M("span", { children: [t == null ? /* @__PURE__ */ j("span", {
|
|
1481
1491
|
id: e,
|
|
1482
1492
|
children: o
|
|
1483
|
-
}) : /* @__PURE__ */
|
|
1493
|
+
}) : /* @__PURE__ */ j("label", {
|
|
1484
1494
|
id: e,
|
|
1485
1495
|
htmlFor: t,
|
|
1486
1496
|
children: o
|
|
1487
|
-
}), r && /* @__PURE__ */
|
|
1497
|
+
}), r && /* @__PURE__ */ j(Dn, {})] }), c && /* @__PURE__ */ j(Ot, {
|
|
1488
1498
|
title: n,
|
|
1489
1499
|
ariaLabel: s.moreInformation,
|
|
1490
|
-
triggerIcon: /* @__PURE__ */
|
|
1500
|
+
triggerIcon: /* @__PURE__ */ j(T, {
|
|
1491
1501
|
size: 16,
|
|
1492
1502
|
"aria-hidden": !0
|
|
1493
1503
|
}),
|
|
@@ -1509,7 +1519,7 @@ var J = {
|
|
|
1509
1519
|
Item: "_Item_1lvwd_61",
|
|
1510
1520
|
ItemText: "_ItemText_1lvwd_80",
|
|
1511
1521
|
Empty: "_Empty_1lvwd_56"
|
|
1512
|
-
},
|
|
1522
|
+
}, jn = W({
|
|
1513
1523
|
noOptions: {
|
|
1514
1524
|
no: "Ingen alternativer",
|
|
1515
1525
|
se: "Inga alternativ",
|
|
@@ -1543,7 +1553,7 @@ var J = {
|
|
|
1543
1553
|
});
|
|
1544
1554
|
//#endregion
|
|
1545
1555
|
//#region src/components/form/use-blur-outside.ts
|
|
1546
|
-
function
|
|
1556
|
+
function Mn(e, t) {
|
|
1547
1557
|
return (n) => {
|
|
1548
1558
|
e && window.setTimeout(() => {
|
|
1549
1559
|
let r = document.activeElement;
|
|
@@ -1553,165 +1563,170 @@ function jn(e, t) {
|
|
|
1553
1563
|
}
|
|
1554
1564
|
//#endregion
|
|
1555
1565
|
//#region src/components/form/combo-field.tsx
|
|
1556
|
-
var
|
|
1557
|
-
function
|
|
1558
|
-
let
|
|
1559
|
-
...
|
|
1560
|
-
ref:
|
|
1561
|
-
id:
|
|
1562
|
-
disabled:
|
|
1563
|
-
required:
|
|
1564
|
-
placeholder:
|
|
1565
|
-
"aria-label":
|
|
1566
|
-
"aria-labelledby":
|
|
1566
|
+
var Nn = (...e) => e.filter(Boolean).join(" ") || void 0;
|
|
1567
|
+
function Pn({ label: e, helperText: t, error: n = !1, warning: r, required: i = !1, disabled: a = !1, placeholder: o, onBlur: s, id: c, "aria-label": l, "aria-labelledby": u, "aria-describedby": d, className: p, style: m, ref: _, renderRoot: v, inputProps: y, chips: x, filled: S = !1, clearable: C = !1, trigger: w = !1, selectTextOnClick: T = !1, children: E, afterHelperText: D }) {
|
|
1568
|
+
let O = jn(), ee = f(), te = c ?? ee, N = f(), P = f(), F = e != null, I = kn(t, r, n), L = I.content != null, ne = x !== void 0, R = h(null), z = h(null), re = Mn(s, [R, z]), [ie, ae] = g(!1), V = h(!1), oe = /* @__PURE__ */ j(B.Input, {
|
|
1569
|
+
...y,
|
|
1570
|
+
ref: _,
|
|
1571
|
+
id: te,
|
|
1572
|
+
disabled: a,
|
|
1573
|
+
required: i,
|
|
1574
|
+
placeholder: o || " ",
|
|
1575
|
+
"aria-label": l,
|
|
1576
|
+
"aria-labelledby": u ?? (F ? N : void 0),
|
|
1567
1577
|
"aria-invalid": n || void 0,
|
|
1568
|
-
"aria-describedby":
|
|
1569
|
-
className:
|
|
1578
|
+
"aria-describedby": Nn(L && P, d),
|
|
1579
|
+
className: ne ? q.ChipInput : Nn(J.Control, q.Control),
|
|
1570
1580
|
onFocus: () => {
|
|
1571
|
-
|
|
1581
|
+
V.current = !0;
|
|
1572
1582
|
},
|
|
1573
1583
|
onClick: (e) => {
|
|
1574
1584
|
let t = e.currentTarget;
|
|
1575
|
-
|
|
1585
|
+
T && V.current && t.selectionStart === t.selectionEnd && t.select(), V.current = !1;
|
|
1576
1586
|
},
|
|
1577
1587
|
onKeyDown: (e) => {
|
|
1578
1588
|
e.key === "Escape" && e.currentTarget.getAttribute("aria-expanded") !== "true" && e.preventBaseUIHandler();
|
|
1579
1589
|
}
|
|
1580
1590
|
});
|
|
1581
|
-
return /* @__PURE__ */
|
|
1582
|
-
className:
|
|
1583
|
-
style:
|
|
1584
|
-
children: [
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1591
|
+
return /* @__PURE__ */ M("div", {
|
|
1592
|
+
className: Nn(J.Field, q.Field, p),
|
|
1593
|
+
style: m,
|
|
1594
|
+
children: [
|
|
1595
|
+
v(/* @__PURE__ */ M(A, { children: [/* @__PURE__ */ M(B.InputGroup, {
|
|
1596
|
+
ref: R,
|
|
1597
|
+
className: Nn(J.Box, q.Box),
|
|
1598
|
+
"data-invalid": n ? "" : void 0,
|
|
1599
|
+
"data-has-label": F ? "" : void 0,
|
|
1600
|
+
"data-filled": S ? "" : void 0,
|
|
1601
|
+
onBlur: re,
|
|
1602
|
+
onKeyDownCapture: () => ae(!0),
|
|
1603
|
+
onPointerDownCapture: () => ae(!1),
|
|
1604
|
+
children: [/* @__PURE__ */ M("div", {
|
|
1605
|
+
className: Nn(J.Inner, q.Inner),
|
|
1606
|
+
children: [F && /* @__PURE__ */ M("label", {
|
|
1607
|
+
id: N,
|
|
1608
|
+
htmlFor: te,
|
|
1609
|
+
className: Nn(J.Label, q.Label),
|
|
1610
|
+
children: [e, i && /* @__PURE__ */ j(Dn, {})]
|
|
1611
|
+
}), ne ? /* @__PURE__ */ M(B.Chips, {
|
|
1612
|
+
className: q.Chips,
|
|
1613
|
+
children: [x, oe]
|
|
1614
|
+
}) : oe]
|
|
1615
|
+
}), (C || w) && /* @__PURE__ */ M("div", {
|
|
1616
|
+
className: q.Buttons,
|
|
1617
|
+
children: [C && /* @__PURE__ */ j(B.Clear, {
|
|
1618
|
+
className: Nn(q.Button, q.Clear),
|
|
1619
|
+
"aria-label": O.clear,
|
|
1620
|
+
tabIndex: -1,
|
|
1621
|
+
children: /* @__PURE__ */ j(k, { "aria-hidden": !0 })
|
|
1622
|
+
}), w && /* @__PURE__ */ j(B.Trigger, {
|
|
1623
|
+
className: Nn(q.Button, q.Trigger),
|
|
1624
|
+
tabIndex: -1,
|
|
1625
|
+
render: (e, t) => /* @__PURE__ */ j("button", {
|
|
1626
|
+
...e,
|
|
1627
|
+
role: void 0,
|
|
1628
|
+
"aria-haspopup": "listbox",
|
|
1629
|
+
"aria-required": void 0,
|
|
1630
|
+
"aria-label": t.open ? O.close : O.open
|
|
1631
|
+
}),
|
|
1632
|
+
children: /* @__PURE__ */ j(b, { "aria-hidden": !0 })
|
|
1633
|
+
})]
|
|
1622
1634
|
})]
|
|
1623
|
-
})
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
})
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1635
|
+
}), /* @__PURE__ */ j(B.Portal, { children: /* @__PURE__ */ j(B.Positioner, {
|
|
1636
|
+
anchor: R,
|
|
1637
|
+
side: "bottom",
|
|
1638
|
+
align: "start",
|
|
1639
|
+
sideOffset: 0,
|
|
1640
|
+
className: Y.Positioner,
|
|
1641
|
+
children: /* @__PURE__ */ j(B.Popup, {
|
|
1642
|
+
ref: z,
|
|
1643
|
+
className: Nn(Y.Popup, q.Popup),
|
|
1644
|
+
"data-keyboard": ie ? "" : void 0,
|
|
1645
|
+
onBlur: re,
|
|
1646
|
+
onPointerDownCapture: () => ae(!1),
|
|
1647
|
+
children: E
|
|
1648
|
+
})
|
|
1649
|
+
}) })] })),
|
|
1650
|
+
L && /* @__PURE__ */ j(On, {
|
|
1651
|
+
id: P,
|
|
1652
|
+
error: n,
|
|
1653
|
+
warning: I.warning,
|
|
1654
|
+
children: I.content
|
|
1655
|
+
}),
|
|
1656
|
+
D
|
|
1657
|
+
]
|
|
1643
1658
|
});
|
|
1644
1659
|
}
|
|
1645
1660
|
//#endregion
|
|
1646
1661
|
//#region src/components/form/autocomplete.tsx
|
|
1647
|
-
var
|
|
1648
|
-
function
|
|
1649
|
-
let r =
|
|
1650
|
-
return /* @__PURE__ */
|
|
1662
|
+
var Fn = (e, t) => e.value === t.value;
|
|
1663
|
+
function In({ noOptionsText: e, loading: t, isDisabled: n }) {
|
|
1664
|
+
let r = jn();
|
|
1665
|
+
return /* @__PURE__ */ M(A, { children: [/* @__PURE__ */ j(B.Empty, {
|
|
1651
1666
|
className: Y.Empty,
|
|
1652
1667
|
children: t ? r.loading : e ?? r.noOptions
|
|
1653
|
-
}), /* @__PURE__ */
|
|
1668
|
+
}), /* @__PURE__ */ j(B.List, {
|
|
1654
1669
|
className: Y.List,
|
|
1655
|
-
children: (e) => /* @__PURE__ */
|
|
1670
|
+
children: (e) => /* @__PURE__ */ j(B.Item, {
|
|
1656
1671
|
value: e,
|
|
1657
1672
|
disabled: e.disabled || n?.(e),
|
|
1658
1673
|
className: Y.Item,
|
|
1659
|
-
children: /* @__PURE__ */
|
|
1674
|
+
children: /* @__PURE__ */ j("span", {
|
|
1660
1675
|
className: Y.ItemText,
|
|
1661
1676
|
children: e.label
|
|
1662
1677
|
})
|
|
1663
1678
|
}, e.value)
|
|
1664
1679
|
})] });
|
|
1665
1680
|
}
|
|
1666
|
-
function
|
|
1681
|
+
function Ln({ options: e, value: t, defaultValue: n = "", onValueChange: r, noOptionsText: i, loading: a, name: o, ...s }) {
|
|
1667
1682
|
let c = t !== void 0, [l, u] = g(n), d = c ? t : l, f = e.find((e) => e.value === d) ?? null;
|
|
1668
|
-
return /* @__PURE__ */
|
|
1683
|
+
return /* @__PURE__ */ j(Pn, {
|
|
1669
1684
|
...s,
|
|
1670
1685
|
clearable: !0,
|
|
1671
1686
|
trigger: !0,
|
|
1672
1687
|
selectTextOnClick: !0,
|
|
1673
|
-
renderRoot: (t) => /* @__PURE__ */
|
|
1688
|
+
renderRoot: (t) => /* @__PURE__ */ j(B.Root, {
|
|
1674
1689
|
items: e,
|
|
1675
1690
|
value: f,
|
|
1676
1691
|
onValueChange: (e) => {
|
|
1677
1692
|
let t = e?.value ?? "";
|
|
1678
1693
|
t !== d && (c || u(t), r?.(t));
|
|
1679
1694
|
},
|
|
1680
|
-
isItemEqualToValue:
|
|
1695
|
+
isItemEqualToValue: Fn,
|
|
1681
1696
|
name: o,
|
|
1682
1697
|
disabled: s.disabled,
|
|
1683
1698
|
required: s.required,
|
|
1684
1699
|
highlightItemOnHover: !1,
|
|
1685
1700
|
children: t
|
|
1686
1701
|
}),
|
|
1687
|
-
children: /* @__PURE__ */
|
|
1702
|
+
children: /* @__PURE__ */ j(In, {
|
|
1688
1703
|
noOptionsText: i,
|
|
1689
1704
|
loading: a
|
|
1690
1705
|
})
|
|
1691
1706
|
});
|
|
1692
1707
|
}
|
|
1693
|
-
function
|
|
1694
|
-
let d =
|
|
1695
|
-
return /* @__PURE__ */
|
|
1708
|
+
function Rn({ options: e, value: t, defaultValue: n = [], onValueChange: r, min: i = 1, max: a, noOptionsText: o, loading: s, name: c, multiple: l, ...u }) {
|
|
1709
|
+
let d = bt(), f = t !== void 0, [p, m] = g(n), h = f ? t : p, [_, v] = g(""), y = h.map((t) => e.find((e) => e.value === t)).filter((e) => e !== void 0), b = a !== void 0 && h.length >= a, x = h.length <= i, S = !u.disabled && !x;
|
|
1710
|
+
return /* @__PURE__ */ j(Pn, {
|
|
1696
1711
|
...u,
|
|
1697
1712
|
clearable: i <= 0,
|
|
1698
1713
|
trigger: !0,
|
|
1699
1714
|
filled: y.length > 0,
|
|
1700
|
-
chips: y.map((e) => /* @__PURE__ */
|
|
1701
|
-
className:
|
|
1715
|
+
chips: y.map((e) => /* @__PURE__ */ M(B.Chip, {
|
|
1716
|
+
className: yt.Chip,
|
|
1702
1717
|
"data-color": "primary",
|
|
1703
1718
|
"data-variant": "filled",
|
|
1704
1719
|
"data-size": "sm",
|
|
1705
|
-
children: [/* @__PURE__ */
|
|
1706
|
-
className:
|
|
1720
|
+
children: [/* @__PURE__ */ j("span", {
|
|
1721
|
+
className: yt.Label,
|
|
1707
1722
|
children: e.label
|
|
1708
|
-
}), S && /* @__PURE__ */
|
|
1709
|
-
className:
|
|
1723
|
+
}), S && /* @__PURE__ */ j(B.ChipRemove, {
|
|
1724
|
+
className: yt.Delete,
|
|
1710
1725
|
"aria-label": `${d.remove} ${e.label}`,
|
|
1711
|
-
children: /* @__PURE__ */
|
|
1726
|
+
children: /* @__PURE__ */ j(C, { "aria-hidden": !0 })
|
|
1712
1727
|
})]
|
|
1713
1728
|
}, e.value)),
|
|
1714
|
-
renderRoot: (t) => /* @__PURE__ */
|
|
1729
|
+
renderRoot: (t) => /* @__PURE__ */ j(B.Root, {
|
|
1715
1730
|
multiple: !0,
|
|
1716
1731
|
items: e,
|
|
1717
1732
|
value: y,
|
|
@@ -1725,14 +1740,14 @@ function Ln({ options: e, value: t, defaultValue: n = [], onValueChange: r, min:
|
|
|
1725
1740
|
let n = e.map((e) => e.value);
|
|
1726
1741
|
n.length < i && n.length < h.length || a !== void 0 && n.length > a && n.length > h.length || (f || m(n), r?.(n));
|
|
1727
1742
|
},
|
|
1728
|
-
isItemEqualToValue:
|
|
1743
|
+
isItemEqualToValue: Fn,
|
|
1729
1744
|
name: c,
|
|
1730
1745
|
disabled: u.disabled,
|
|
1731
1746
|
required: u.required,
|
|
1732
1747
|
highlightItemOnHover: !1,
|
|
1733
1748
|
children: t
|
|
1734
1749
|
}),
|
|
1735
|
-
children: /* @__PURE__ */
|
|
1750
|
+
children: /* @__PURE__ */ j(In, {
|
|
1736
1751
|
noOptionsText: o,
|
|
1737
1752
|
loading: s,
|
|
1738
1753
|
isDisabled: (e) => {
|
|
@@ -1742,18 +1757,18 @@ function Ln({ options: e, value: t, defaultValue: n = [], onValueChange: r, min:
|
|
|
1742
1757
|
})
|
|
1743
1758
|
});
|
|
1744
1759
|
}
|
|
1745
|
-
function
|
|
1746
|
-
return e.multiple ? /* @__PURE__ */
|
|
1760
|
+
function zn(e) {
|
|
1761
|
+
return e.multiple ? /* @__PURE__ */ j(Rn, { ...e }) : /* @__PURE__ */ j(Ln, { ...e });
|
|
1747
1762
|
}
|
|
1748
|
-
var
|
|
1763
|
+
var Bn = {
|
|
1749
1764
|
Checkbox: "_Checkbox_1vdzh_7",
|
|
1750
1765
|
Box: "_Box_1vdzh_13",
|
|
1751
1766
|
Tick: "_Tick_1vdzh_55"
|
|
1752
|
-
},
|
|
1753
|
-
className:
|
|
1767
|
+
}, Vn = /* @__PURE__ */ j("svg", {
|
|
1768
|
+
className: Bn.Tick,
|
|
1754
1769
|
viewBox: "0 0 24 24",
|
|
1755
1770
|
"aria-hidden": !0,
|
|
1756
|
-
children: /* @__PURE__ */
|
|
1771
|
+
children: /* @__PURE__ */ j("path", {
|
|
1757
1772
|
d: "M5 12.5l4.5 4.5L19 7",
|
|
1758
1773
|
fill: "none",
|
|
1759
1774
|
stroke: "currentColor",
|
|
@@ -1762,20 +1777,20 @@ var zn = {
|
|
|
1762
1777
|
strokeLinejoin: "round",
|
|
1763
1778
|
pathLength: 1
|
|
1764
1779
|
})
|
|
1765
|
-
}),
|
|
1766
|
-
className:
|
|
1780
|
+
}), Hn = ({ checked: e }) => /* @__PURE__ */ j("span", {
|
|
1781
|
+
className: Bn.Box,
|
|
1767
1782
|
"data-checked": e ? "" : void 0,
|
|
1768
1783
|
"aria-hidden": !0,
|
|
1769
|
-
children:
|
|
1770
|
-
}),
|
|
1784
|
+
children: Vn
|
|
1785
|
+
}), Un = {
|
|
1771
1786
|
Row: "_Row_1uv3x_10",
|
|
1772
1787
|
Asterisk: "_Asterisk_1uv3x_31",
|
|
1773
1788
|
Text: "_Text_1uv3x_35"
|
|
1774
|
-
},
|
|
1775
|
-
function
|
|
1776
|
-
let b = f(), x = e != null, S = t != null, C = !x && !S, w = /* @__PURE__ */
|
|
1789
|
+
}, Wn = (...e) => e.filter(Boolean).join(" ") || void 0;
|
|
1790
|
+
function Gn({ label: e, helperText: t, error: n = !1, checked: r, defaultChecked: i, onCheckedChange: a, name: o, value: s, disabled: c = !1, required: l = !1, id: u, onBlur: d, onFocus: p, "aria-label": m, "aria-labelledby": h, "aria-describedby": g, className: _, style: v, ref: y }) {
|
|
1791
|
+
let b = f(), x = e != null, S = t != null, C = !x && !S, w = /* @__PURE__ */ j(re.Root, {
|
|
1777
1792
|
nativeButton: !0,
|
|
1778
|
-
render: /* @__PURE__ */
|
|
1793
|
+
render: /* @__PURE__ */ j("button", { type: "button" }),
|
|
1779
1794
|
id: u,
|
|
1780
1795
|
inputRef: y,
|
|
1781
1796
|
checked: r,
|
|
@@ -1789,23 +1804,23 @@ function Wn({ label: e, helperText: t, error: n = !1, checked: r, defaultChecked
|
|
|
1789
1804
|
onFocus: p,
|
|
1790
1805
|
"aria-label": m,
|
|
1791
1806
|
"aria-labelledby": h,
|
|
1792
|
-
"aria-describedby":
|
|
1807
|
+
"aria-describedby": Wn(S && b, g),
|
|
1793
1808
|
"aria-invalid": n ? !0 : void 0,
|
|
1794
|
-
className: C ?
|
|
1809
|
+
className: C ? Wn(Bn.Box, _) : Bn.Box,
|
|
1795
1810
|
style: C ? v : void 0,
|
|
1796
|
-
children:
|
|
1811
|
+
children: Vn
|
|
1797
1812
|
});
|
|
1798
|
-
return C ? w : /* @__PURE__ */
|
|
1799
|
-
className:
|
|
1813
|
+
return C ? w : /* @__PURE__ */ M("div", {
|
|
1814
|
+
className: Wn(Bn.Checkbox, _),
|
|
1800
1815
|
style: v,
|
|
1801
|
-
children: [x ? /* @__PURE__ */
|
|
1802
|
-
className:
|
|
1816
|
+
children: [x ? /* @__PURE__ */ M("label", {
|
|
1817
|
+
className: Un.Row,
|
|
1803
1818
|
"data-invalid": n ? "" : void 0,
|
|
1804
|
-
children: [w, /* @__PURE__ */
|
|
1805
|
-
className:
|
|
1806
|
-
children: [e, l && /* @__PURE__ */
|
|
1819
|
+
children: [w, /* @__PURE__ */ M("span", {
|
|
1820
|
+
className: Un.Text,
|
|
1821
|
+
children: [e, l && /* @__PURE__ */ j(Dn, { className: Un.Asterisk })]
|
|
1807
1822
|
})]
|
|
1808
|
-
}) : w, S && /* @__PURE__ */
|
|
1823
|
+
}) : w, S && /* @__PURE__ */ j(On, {
|
|
1809
1824
|
id: b,
|
|
1810
1825
|
error: n,
|
|
1811
1826
|
children: t
|
|
@@ -1820,7 +1835,7 @@ var X = () => ({ valid: !1 }), Z = (e) => ({
|
|
|
1820
1835
|
});
|
|
1821
1836
|
//#endregion
|
|
1822
1837
|
//#region src/validation/national-id.ts
|
|
1823
|
-
function
|
|
1838
|
+
function Kn(e) {
|
|
1824
1839
|
let t = 0, n = e.length % 2 == 0;
|
|
1825
1840
|
for (let r of e) {
|
|
1826
1841
|
let e = Number(r);
|
|
@@ -1828,14 +1843,14 @@ function Gn(e) {
|
|
|
1828
1843
|
}
|
|
1829
1844
|
return t % 10 == 0;
|
|
1830
1845
|
}
|
|
1831
|
-
function
|
|
1846
|
+
function qn(e) {
|
|
1832
1847
|
let t = e.replace(/\D/g, "");
|
|
1833
1848
|
if (t.length === 12 && (t = t.slice(2)), t.length !== 10) return !1;
|
|
1834
1849
|
let n = Number(t.slice(2, 4)), r = Number(t.slice(4, 6));
|
|
1835
|
-
return n < 1 || n > 12 || r < 1 || r > 31 ? !1 :
|
|
1850
|
+
return n < 1 || n > 12 || r < 1 || r > 31 ? !1 : Kn(t);
|
|
1836
1851
|
}
|
|
1837
|
-
var
|
|
1838
|
-
function
|
|
1852
|
+
var Jn = "0123456789ABCDEFHJKLMNPRSTUVWXY";
|
|
1853
|
+
function Yn(e) {
|
|
1839
1854
|
let t = e.replace(/\s/g, "").toUpperCase();
|
|
1840
1855
|
if (!/^\d{6}[+\-A]\d{3}[0-9A-Y]$/.test(t)) return !1;
|
|
1841
1856
|
let n = Number(t.slice(0, 2)), r = Number(t.slice(2, 4)), i = Number(t.slice(4, 6)), a = t[6], o = a === "+" ? 1800 : a === "-" ? 1900 : a === "A" ? 2e3 : null;
|
|
@@ -1843,9 +1858,9 @@ function Jn(e) {
|
|
|
1843
1858
|
let s = o + i, c = new Date(s, r - 1, n);
|
|
1844
1859
|
if (c.getFullYear() !== s || c.getMonth() !== r - 1 || c.getDate() !== n) return !1;
|
|
1845
1860
|
let l = Number(`${t.slice(0, 6)}${t.slice(7, 10)}`);
|
|
1846
|
-
return t[10] ===
|
|
1861
|
+
return t[10] === Jn[l % 31];
|
|
1847
1862
|
}
|
|
1848
|
-
var
|
|
1863
|
+
var Xn = [
|
|
1849
1864
|
3,
|
|
1850
1865
|
7,
|
|
1851
1866
|
6,
|
|
@@ -1855,7 +1870,7 @@ var Yn = [
|
|
|
1855
1870
|
4,
|
|
1856
1871
|
5,
|
|
1857
1872
|
2
|
|
1858
|
-
],
|
|
1873
|
+
], Zn = [
|
|
1859
1874
|
5,
|
|
1860
1875
|
4,
|
|
1861
1876
|
3,
|
|
@@ -1867,78 +1882,118 @@ var Yn = [
|
|
|
1867
1882
|
3,
|
|
1868
1883
|
2
|
|
1869
1884
|
];
|
|
1870
|
-
function
|
|
1885
|
+
function Qn(e, t) {
|
|
1871
1886
|
let n = t.reduce((t, n, r) => t + n * e[r], 0) % 11;
|
|
1872
1887
|
return n === 0 ? 0 : 11 - n;
|
|
1873
1888
|
}
|
|
1874
|
-
function
|
|
1889
|
+
function $n(e) {
|
|
1875
1890
|
let t = e.replace(/\D/g, "");
|
|
1876
1891
|
if (t.length !== 11) return !1;
|
|
1877
1892
|
let n = t.split("").map(Number), r = Number(t.slice(0, 2)), i = Number(t.slice(2, 4)), a = r > 40 ? r - 40 : r, o = i > 40 ? i - 40 : i;
|
|
1878
1893
|
if (o < 1 || o > 12 || a < 1 || a > 31) return !1;
|
|
1879
|
-
let s =
|
|
1894
|
+
let s = Qn(n.slice(0, 9), Xn);
|
|
1880
1895
|
if (s === 11 || s !== n[9]) return !1;
|
|
1881
|
-
let c =
|
|
1896
|
+
let c = Qn(n.slice(0, 10), Zn);
|
|
1882
1897
|
return c !== 11 && c === n[10];
|
|
1883
1898
|
}
|
|
1884
|
-
var
|
|
1899
|
+
var er = "TRWAGMYFPDXBNJZSQVHLCKE", tr = {
|
|
1885
1900
|
X: "0",
|
|
1886
1901
|
Y: "1",
|
|
1887
1902
|
Z: "2"
|
|
1888
1903
|
};
|
|
1889
|
-
function
|
|
1904
|
+
function nr(e) {
|
|
1890
1905
|
let t = e.replace(/[\s-]/g, "").toUpperCase();
|
|
1891
1906
|
if (!/^[XYZ]?\d{7,8}[A-Z]$/.test(t)) return !1;
|
|
1892
1907
|
let n = t.slice(-1), r = t.slice(0, -1), i = r[0];
|
|
1893
|
-
return i in
|
|
1908
|
+
return i in tr && (r = tr[i] + r.slice(1)), r.length === 8 && er[Number(r) % 23] === n;
|
|
1894
1909
|
}
|
|
1895
|
-
var
|
|
1896
|
-
SE:
|
|
1897
|
-
FI:
|
|
1898
|
-
NO:
|
|
1899
|
-
ES:
|
|
1910
|
+
var rr = {
|
|
1911
|
+
SE: qn,
|
|
1912
|
+
FI: Yn,
|
|
1913
|
+
NO: $n,
|
|
1914
|
+
ES: nr
|
|
1900
1915
|
};
|
|
1901
|
-
function rr(e, t) {
|
|
1902
|
-
return nr[e](t);
|
|
1903
|
-
}
|
|
1904
1916
|
function ir(e, t) {
|
|
1905
|
-
return rr
|
|
1917
|
+
return rr[e](t);
|
|
1918
|
+
}
|
|
1919
|
+
function ar(e, t) {
|
|
1920
|
+
return ir(e, t) ? Z(t.replace(/[\s-]/g, "").toUpperCase()) : X();
|
|
1921
|
+
}
|
|
1922
|
+
var or = {
|
|
1923
|
+
SE: 12,
|
|
1924
|
+
FI: 11,
|
|
1925
|
+
NO: 11,
|
|
1926
|
+
ES: 9
|
|
1927
|
+
}, sr = /[‐-―−]/g, cr = {
|
|
1928
|
+
SE: (e) => e.replace(/\D/g, ""),
|
|
1929
|
+
FI: (e) => e.replace(sr, "-").toUpperCase().replace(/[^0-9A-Z+-]/g, ""),
|
|
1930
|
+
NO: (e) => e.replace(/\D/g, ""),
|
|
1931
|
+
ES: (e) => e.toUpperCase().replace(/[^0-9A-Z]/g, "")
|
|
1932
|
+
};
|
|
1933
|
+
function lr(e, t) {
|
|
1934
|
+
return cr[e](t);
|
|
1935
|
+
}
|
|
1936
|
+
function ur(e, t, n) {
|
|
1937
|
+
let r = lr(e, t ?? ""), i = lr(e, n ?? "");
|
|
1938
|
+
return r !== "" && r === i && ir(e, r);
|
|
1906
1939
|
}
|
|
1907
1940
|
//#endregion
|
|
1941
|
+
//#region src/validation/mobile-patterns.ts
|
|
1942
|
+
var dr = {
|
|
1943
|
+
SE: "7[023689]\\d{7}",
|
|
1944
|
+
FI: "4946\\d{2,6}|(?:4[0-8]|50)\\d{4,8}",
|
|
1945
|
+
NO: "(?:4[015-9]|9\\d)\\d{6}",
|
|
1946
|
+
ES: "96906(?:09|10)\\d\\d|(?:590(?:10[0-2]|600)|97390\\d)\\d{3}|(?:6\\d|7[1-48])\\d{7}"
|
|
1947
|
+
};
|
|
1948
|
+
//#endregion
|
|
1908
1949
|
//#region src/validation/phone.ts
|
|
1909
|
-
function
|
|
1950
|
+
function fr(e, t) {
|
|
1910
1951
|
let n = t.replace(/\s/g, "");
|
|
1911
1952
|
if (n === "") return X();
|
|
1912
|
-
let r =
|
|
1953
|
+
let r = se(n, e);
|
|
1913
1954
|
return !r || !r.isValid() ? X() : Z(r.number);
|
|
1914
1955
|
}
|
|
1915
|
-
function
|
|
1916
|
-
return
|
|
1956
|
+
function pr(e, t) {
|
|
1957
|
+
return fr(e, t).valid;
|
|
1958
|
+
}
|
|
1959
|
+
var mr = Object.fromEntries(Object.entries(dr).map(([e, t]) => [e, RegExp(`^(?:${t})$`)]));
|
|
1960
|
+
function hr(e) {
|
|
1961
|
+
return Object.prototype.hasOwnProperty.call(dr, e);
|
|
1962
|
+
}
|
|
1963
|
+
function gr(e, t) {
|
|
1964
|
+
let n = t.replace(/\s/g, "");
|
|
1965
|
+
if (n === "") return X();
|
|
1966
|
+
let r = se(n, e);
|
|
1967
|
+
return !r || !r.isValid() || r.country !== e || !mr[e].test(r.nationalNumber) ? X() : Z(r.number);
|
|
1968
|
+
}
|
|
1969
|
+
function _r(e, t, n) {
|
|
1970
|
+
let r = fr(e, t ?? ""), i = fr(e, n ?? "");
|
|
1971
|
+
return r.valid && i.valid && r.normalized === i.normalized;
|
|
1917
1972
|
}
|
|
1918
1973
|
//#endregion
|
|
1919
1974
|
//#region src/validation/modulo-97.ts
|
|
1920
|
-
var
|
|
1975
|
+
var vr = (e) => {
|
|
1921
1976
|
let t = 0;
|
|
1922
1977
|
for (let n of e) t = (t * 10 + Number(n)) % 97;
|
|
1923
1978
|
return t;
|
|
1924
|
-
},
|
|
1979
|
+
}, yr = (e) => e.replace(/[A-Z]/g, (e) => String(e.charCodeAt(0) - 55)), br = {
|
|
1925
1980
|
SE: 24,
|
|
1926
1981
|
FI: 18,
|
|
1927
1982
|
NO: 15,
|
|
1928
1983
|
ES: 24
|
|
1929
1984
|
};
|
|
1930
|
-
function
|
|
1985
|
+
function xr(e) {
|
|
1931
1986
|
return e.replace(/[\s-]/g, "").toUpperCase();
|
|
1932
1987
|
}
|
|
1933
|
-
function
|
|
1934
|
-
let n =
|
|
1988
|
+
function Sr(e, t) {
|
|
1989
|
+
let n = xr(e);
|
|
1935
1990
|
if (!/^[A-Z]{2}\d{2}[A-Z0-9]+$/.test(n)) return !1;
|
|
1936
1991
|
let r = n.slice(0, 2);
|
|
1937
1992
|
if (t && r !== t) return !1;
|
|
1938
|
-
let i =
|
|
1939
|
-
return i && n.length !== i ? !1 :
|
|
1993
|
+
let i = br[r];
|
|
1994
|
+
return i && n.length !== i ? !1 : vr(yr(n.slice(4) + n.slice(0, 4))) === 1;
|
|
1940
1995
|
}
|
|
1941
|
-
var
|
|
1996
|
+
var Cr = [
|
|
1942
1997
|
5,
|
|
1943
1998
|
4,
|
|
1944
1999
|
3,
|
|
@@ -1950,33 +2005,33 @@ var fr = [
|
|
|
1950
2005
|
3,
|
|
1951
2006
|
2
|
|
1952
2007
|
];
|
|
1953
|
-
function
|
|
2008
|
+
function wr(e) {
|
|
1954
2009
|
let t = e.replace(/\D/g, "");
|
|
1955
2010
|
if (t.length !== 11) return !1;
|
|
1956
|
-
let n = t.split("").map(Number), r =
|
|
2011
|
+
let n = t.split("").map(Number), r = Cr.reduce((e, t, r) => e + t * n[r], 0) % 11, i = r === 0 ? 0 : 11 - r;
|
|
1957
2012
|
return i < 10 && i === n[10];
|
|
1958
2013
|
}
|
|
1959
|
-
function
|
|
2014
|
+
function Tr(e) {
|
|
1960
2015
|
let t = e.replace(/\D/g, "");
|
|
1961
2016
|
return t.length >= 10 && t.length <= 15;
|
|
1962
2017
|
}
|
|
1963
|
-
function
|
|
1964
|
-
let n =
|
|
2018
|
+
function Er(e, t) {
|
|
2019
|
+
let n = xr(t), r = /^[A-Z]{2}\d{2}/.test(n);
|
|
1965
2020
|
switch (e) {
|
|
1966
2021
|
case "FI":
|
|
1967
|
-
case "ES": return
|
|
1968
|
-
case "NO": return r ?
|
|
1969
|
-
case "SE": return r ?
|
|
2022
|
+
case "ES": return Sr(n, e) ? Z(n) : X();
|
|
2023
|
+
case "NO": return r ? Sr(n, "NO") ? Z(n) : X() : wr(n) ? Z(n.replace(/\D/g, "")) : X();
|
|
2024
|
+
case "SE": return r ? Sr(n, "SE") ? Z(n) : X() : Tr(n) ? Z(n.replace(/\D/g, "")) : X();
|
|
1970
2025
|
}
|
|
1971
2026
|
}
|
|
1972
|
-
function
|
|
1973
|
-
return
|
|
2027
|
+
function Dr(e, t) {
|
|
2028
|
+
return Er(e, t).valid;
|
|
1974
2029
|
}
|
|
1975
2030
|
//#endregion
|
|
1976
2031
|
//#region src/validation/reference-number.ts
|
|
1977
|
-
var
|
|
1978
|
-
function
|
|
1979
|
-
let t =
|
|
2032
|
+
var Or = (e) => e.replace(/\s/g, "").toUpperCase();
|
|
2033
|
+
function kr(e) {
|
|
2034
|
+
let t = Or(e);
|
|
1980
2035
|
if (!/^[1-9]\d{3,19}$/.test(t)) return !1;
|
|
1981
2036
|
let n = t.slice(0, -1), r = Number(t.at(-1)), i = [
|
|
1982
2037
|
7,
|
|
@@ -1986,20 +2041,20 @@ function vr(e) {
|
|
|
1986
2041
|
for (let e = n.length - 1, t = 0; e >= 0; e--) a += Number(n[e]) * i[t % i.length], t++;
|
|
1987
2042
|
return (10 - a % 10) % 10 === r;
|
|
1988
2043
|
}
|
|
1989
|
-
function
|
|
1990
|
-
let t =
|
|
1991
|
-
return /^RF\d{2}[1-9]\d{3,19}$/.test(t) ?
|
|
2044
|
+
function Ar(e) {
|
|
2045
|
+
let t = Or(e);
|
|
2046
|
+
return /^RF\d{2}[1-9]\d{3,19}$/.test(t) ? vr(`${t.slice(4)}2715${t.slice(2, 4)}`) === 1 : !1;
|
|
1992
2047
|
}
|
|
1993
|
-
function
|
|
1994
|
-
let t =
|
|
1995
|
-
return
|
|
2048
|
+
function jr(e) {
|
|
2049
|
+
let t = Or(e);
|
|
2050
|
+
return kr(t) || Ar(t) ? Z(t) : X();
|
|
1996
2051
|
}
|
|
1997
|
-
function
|
|
1998
|
-
return
|
|
2052
|
+
function Mr(e) {
|
|
2053
|
+
return jr(e).valid;
|
|
1999
2054
|
}
|
|
2000
2055
|
//#endregion
|
|
2001
2056
|
//#region src/validation/email.ts
|
|
2002
|
-
var
|
|
2057
|
+
var Nr = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+$/, Pr = [
|
|
2003
2058
|
"gmail.com",
|
|
2004
2059
|
"outlook.com",
|
|
2005
2060
|
"hotmail.com",
|
|
@@ -2016,61 +2071,221 @@ var Sr = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-z
|
|
|
2016
2071
|
"elisanet.fi",
|
|
2017
2072
|
"suomi24.fi",
|
|
2018
2073
|
"telia.se",
|
|
2019
|
-
"comhem.se"
|
|
2074
|
+
"comhem.se",
|
|
2075
|
+
"kolumbus.fi",
|
|
2076
|
+
"pp.inet.fi",
|
|
2077
|
+
"luukku.com",
|
|
2078
|
+
"me.com",
|
|
2079
|
+
"msn.com",
|
|
2080
|
+
"gmx.com",
|
|
2081
|
+
"yahoo.se",
|
|
2082
|
+
"yahoo.no"
|
|
2020
2083
|
];
|
|
2021
|
-
function
|
|
2084
|
+
function Fr(e) {
|
|
2022
2085
|
let t = e.trim();
|
|
2023
|
-
if (!
|
|
2086
|
+
if (!Nr.test(t)) return X();
|
|
2024
2087
|
let n = t.lastIndexOf("@");
|
|
2025
2088
|
return n >= 0 && t.slice(n + 1).toLowerCase().endsWith(".con") ? X() : Z(t.toLowerCase());
|
|
2026
2089
|
}
|
|
2027
|
-
function
|
|
2028
|
-
return
|
|
2090
|
+
function Ir(e) {
|
|
2091
|
+
return Fr(e).valid;
|
|
2029
2092
|
}
|
|
2030
|
-
function
|
|
2093
|
+
function Lr(e, t = Pr) {
|
|
2031
2094
|
let n = e.indexOf("@");
|
|
2032
2095
|
if (n < 1) return [];
|
|
2033
2096
|
let r = e.slice(0, n), i = e.slice(n + 1).toLowerCase();
|
|
2034
2097
|
return i.includes(".") && t.includes(i) ? [] : t.filter((e) => e.startsWith(i)).map((e) => `${r}@${e}`);
|
|
2035
2098
|
}
|
|
2099
|
+
function Rr(e, t) {
|
|
2100
|
+
let n = (e ?? "").trim().toLowerCase(), r = (t ?? "").trim().toLowerCase();
|
|
2101
|
+
return n !== "" && n === r;
|
|
2102
|
+
}
|
|
2103
|
+
var zr = [
|
|
2104
|
+
"mail.com",
|
|
2105
|
+
"email.com",
|
|
2106
|
+
"ymail.com",
|
|
2107
|
+
"googlemail.com",
|
|
2108
|
+
"gmx.net",
|
|
2109
|
+
"gmx.de",
|
|
2110
|
+
"gmx.se",
|
|
2111
|
+
"aol.com",
|
|
2112
|
+
"mac.com",
|
|
2113
|
+
"live.dk",
|
|
2114
|
+
"live.fi",
|
|
2115
|
+
"hotmail.dk",
|
|
2116
|
+
"hotmail.fi",
|
|
2117
|
+
"hotmail.es",
|
|
2118
|
+
"outlook.es",
|
|
2119
|
+
"yahoo.es",
|
|
2120
|
+
"yahoo.dk",
|
|
2121
|
+
"tele2.se",
|
|
2122
|
+
"telenor.se",
|
|
2123
|
+
"telenor.com",
|
|
2124
|
+
"spray.se",
|
|
2125
|
+
"bredband.net"
|
|
2126
|
+
], Br = /* @__PURE__ */ "com,net,org,se,no,fi,es,nu,dk,is,ax,fo,gl,de,eu,uk,co.uk,fr,it,nl,be,at,ch,pl,ee,lv,lt,pt,ie,us,ca,info,biz,edu,gov,io,me,app,dev".split(",");
|
|
2127
|
+
function Vr(e, t) {
|
|
2128
|
+
let n = Array.from({ length: e.length + 1 }, (e, n) => Array.from({ length: t.length + 1 }, (e, t) => n === 0 ? t : t === 0 ? n : 0));
|
|
2129
|
+
for (let r = 1; r <= e.length; r++) for (let i = 1; i <= t.length; i++) {
|
|
2130
|
+
let a = e[r - 1] === t[i - 1] ? 0 : 1;
|
|
2131
|
+
n[r][i] = Math.min(n[r - 1][i] + 1, n[r][i - 1] + 1, n[r - 1][i - 1] + a), r > 1 && i > 1 && e[r - 1] === t[i - 2] && e[r - 2] === t[i - 1] && (n[r][i] = Math.min(n[r][i], n[r - 2][i - 2] + 1));
|
|
2132
|
+
}
|
|
2133
|
+
return n[e.length][t.length];
|
|
2134
|
+
}
|
|
2135
|
+
function Hr(e, t, n) {
|
|
2136
|
+
let r, i = n + 1, a = !1;
|
|
2137
|
+
for (let n of t) {
|
|
2138
|
+
let t = Vr(e, n);
|
|
2139
|
+
t < i ? [r, i, a] = [
|
|
2140
|
+
n,
|
|
2141
|
+
t,
|
|
2142
|
+
!1
|
|
2143
|
+
] : t === i && n !== r && (a = !0);
|
|
2144
|
+
}
|
|
2145
|
+
return a ? void 0 : r;
|
|
2146
|
+
}
|
|
2147
|
+
function Ur(e, t = Pr) {
|
|
2148
|
+
let n = e.trim(), r = n.lastIndexOf("@");
|
|
2149
|
+
if (r < 1) return;
|
|
2150
|
+
let i = n.slice(0, r), a = n.slice(r + 1).toLowerCase().replace(/\.+$/, "");
|
|
2151
|
+
if (!/^[a-z0-9-]+(\.[a-z0-9-]+)*$/.test(a)) return;
|
|
2152
|
+
let o = [...t, ...zr];
|
|
2153
|
+
if (o.includes(a)) return;
|
|
2154
|
+
let s = (e) => e && e !== a && !zr.includes(e) ? `${i}@${e}` : void 0, c = (e) => e.slice(0, e.indexOf(".")), l = (e) => e.slice(e.indexOf(".") + 1), u = a.indexOf(".");
|
|
2155
|
+
if (u < 0) {
|
|
2156
|
+
let e = Hr(a, [...new Set(t.map(c))], a.length >= 6 ? 2 : 1);
|
|
2157
|
+
return s(t.find((t) => c(t) === e));
|
|
2158
|
+
}
|
|
2159
|
+
let d = a.slice(0, u), f = a.slice(u + 1);
|
|
2160
|
+
if (Br.includes(f)) return s(Hr(a, o.filter((e) => l(e) === f), 1));
|
|
2161
|
+
let p = Hr(a, o, a.length >= 9 ? 2 : 1);
|
|
2162
|
+
if (p) return s(p);
|
|
2163
|
+
let m = Hr(f, Br, 1);
|
|
2164
|
+
return m ? s(`${d}.${m}`) : void 0;
|
|
2165
|
+
}
|
|
2166
|
+
var Wr = { Link: "_Link_qe3el_7" };
|
|
2167
|
+
//#endregion
|
|
2168
|
+
//#region src/components/typography/link.tsx
|
|
2169
|
+
function Gr({ color: e = "secondary", render: t, ref: n, className: r, ...i }) {
|
|
2170
|
+
return N({
|
|
2171
|
+
render: t,
|
|
2172
|
+
ref: n,
|
|
2173
|
+
defaultTagName: "a",
|
|
2174
|
+
props: {
|
|
2175
|
+
...i,
|
|
2176
|
+
"data-color": e,
|
|
2177
|
+
className: K(Wr.Link, r)({})
|
|
2178
|
+
}
|
|
2179
|
+
});
|
|
2180
|
+
}
|
|
2181
|
+
var Kr = {
|
|
2182
|
+
Root: "_Root_1vl2r_9",
|
|
2183
|
+
Item: "_Item_1vl2r_19",
|
|
2184
|
+
Marker: "_Marker_1vl2r_28",
|
|
2185
|
+
Content: "_Content_1vl2r_60"
|
|
2186
|
+
}, qr = /* @__PURE__ */ ge({
|
|
2187
|
+
Item: () => Qr,
|
|
2188
|
+
Root: () => Zr
|
|
2189
|
+
}), Jr = s(null), Yr = () => {
|
|
2190
|
+
let e = u(Jr);
|
|
2191
|
+
if (!e) throw Error("List parts must be used within <List.Root>");
|
|
2192
|
+
return e;
|
|
2193
|
+
}, Xr = (...e) => e.filter(Boolean).join(" "), Zr = ({ variant: e = "ul", gap: t = 1.5, className: n, style: r, children: i, ...a }) => {
|
|
2194
|
+
let o = e;
|
|
2195
|
+
return /* @__PURE__ */ j(Jr.Provider, {
|
|
2196
|
+
value: { variant: e },
|
|
2197
|
+
children: /* @__PURE__ */ j(o, {
|
|
2198
|
+
...a,
|
|
2199
|
+
className: Xr(Kr.Root, n),
|
|
2200
|
+
style: {
|
|
2201
|
+
"--_gap": t,
|
|
2202
|
+
...r
|
|
2203
|
+
},
|
|
2204
|
+
children: i
|
|
2205
|
+
})
|
|
2206
|
+
});
|
|
2207
|
+
}, Qr = ({ icon: e, gap: t = 1.5, className: n, style: r, children: i, ...a }) => {
|
|
2208
|
+
let { variant: o } = Yr(), s = e ? "icon" : o === "ol" ? "number" : "dot";
|
|
2209
|
+
return /* @__PURE__ */ M("li", {
|
|
2210
|
+
...a,
|
|
2211
|
+
className: Xr(Kr.Item, n),
|
|
2212
|
+
style: {
|
|
2213
|
+
"--_gap": e ? t : 0,
|
|
2214
|
+
...r
|
|
2215
|
+
},
|
|
2216
|
+
children: [/* @__PURE__ */ j("span", {
|
|
2217
|
+
className: Kr.Marker,
|
|
2218
|
+
"data-marker": s,
|
|
2219
|
+
children: e
|
|
2220
|
+
}), /* @__PURE__ */ j("div", {
|
|
2221
|
+
className: Kr.Content,
|
|
2222
|
+
children: typeof i == "string" ? /* @__PURE__ */ j(ft, { children: i }) : i
|
|
2223
|
+
})]
|
|
2224
|
+
});
|
|
2225
|
+
}, $r = { Suggestion: "_Suggestion_1nncz_7" };
|
|
2036
2226
|
//#endregion
|
|
2037
2227
|
//#region src/components/form/email-input.tsx
|
|
2038
|
-
function
|
|
2039
|
-
let
|
|
2040
|
-
|
|
2228
|
+
function ei({ value: e, defaultValue: t = "", onValueChange: n, domains: r = Pr, maxSuggestions: i = 6, autoComplete: a = "email", suggestCorrection: o = !0, name: s, onBlur: c, ref: l, ...u }) {
|
|
2229
|
+
let d = ti(), f = e !== void 0, [p, _] = g(t), v = f ? e : p, y = h(null), b = (e) => {
|
|
2230
|
+
if (y.current = e, typeof l == "function") return l(e);
|
|
2231
|
+
l && (l.current = e);
|
|
2232
|
+
}, [x, S] = g(), C = o && !u.disabled ? x : void 0, w = (e) => {
|
|
2233
|
+
f || _(e), S(void 0), n?.(e);
|
|
2234
|
+
}, T = () => {
|
|
2235
|
+
x != null && (w(x), y.current?.focus());
|
|
2236
|
+
}, [E, D] = g(!1), O = m(() => Lr(v, r).slice(0, i), [
|
|
2237
|
+
v,
|
|
2041
2238
|
r,
|
|
2042
2239
|
i
|
|
2043
2240
|
]);
|
|
2044
|
-
return /* @__PURE__ */
|
|
2045
|
-
...
|
|
2241
|
+
return /* @__PURE__ */ j(Pn, {
|
|
2242
|
+
...u,
|
|
2243
|
+
ref: b,
|
|
2244
|
+
onBlur: (e) => {
|
|
2245
|
+
o && S(Ur(v, r)), c?.(e);
|
|
2246
|
+
},
|
|
2247
|
+
afterHelperText: o && /* @__PURE__ */ j("div", {
|
|
2248
|
+
role: "status",
|
|
2249
|
+
className: $r.Suggestion,
|
|
2250
|
+
children: C != null && /* @__PURE__ */ M("p", { children: [
|
|
2251
|
+
d.didYouMean,
|
|
2252
|
+
" ",
|
|
2253
|
+
/* @__PURE__ */ j(Gr, {
|
|
2254
|
+
render: /* @__PURE__ */ j("button", { type: "button" }),
|
|
2255
|
+
color: "primary",
|
|
2256
|
+
"aria-label": `${d.use} ${C}`,
|
|
2257
|
+
onClick: T,
|
|
2258
|
+
children: C
|
|
2259
|
+
}),
|
|
2260
|
+
"?"
|
|
2261
|
+
] })
|
|
2262
|
+
}),
|
|
2046
2263
|
clearable: !0,
|
|
2047
2264
|
inputProps: {
|
|
2048
2265
|
type: "email",
|
|
2049
|
-
name:
|
|
2266
|
+
name: s,
|
|
2050
2267
|
autoComplete: a,
|
|
2051
2268
|
autoCapitalize: "none",
|
|
2052
2269
|
spellCheck: !1
|
|
2053
2270
|
},
|
|
2054
|
-
renderRoot: (e) => /* @__PURE__ */
|
|
2055
|
-
items:
|
|
2271
|
+
renderRoot: (e) => /* @__PURE__ */ j(ie.Root, {
|
|
2272
|
+
items: O,
|
|
2056
2273
|
filter: null,
|
|
2057
|
-
open:
|
|
2058
|
-
onOpenChange:
|
|
2059
|
-
value:
|
|
2060
|
-
onValueChange:
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
disabled: s.disabled,
|
|
2064
|
-
required: s.required,
|
|
2274
|
+
open: E && O.length > 0,
|
|
2275
|
+
onOpenChange: D,
|
|
2276
|
+
value: v,
|
|
2277
|
+
onValueChange: w,
|
|
2278
|
+
disabled: u.disabled,
|
|
2279
|
+
required: u.required,
|
|
2065
2280
|
highlightItemOnHover: !1,
|
|
2066
2281
|
children: e
|
|
2067
2282
|
}),
|
|
2068
|
-
children: /* @__PURE__ */
|
|
2283
|
+
children: /* @__PURE__ */ j(ie.List, {
|
|
2069
2284
|
className: Y.List,
|
|
2070
|
-
children: (e) => /* @__PURE__ */
|
|
2285
|
+
children: (e) => /* @__PURE__ */ j(ie.Item, {
|
|
2071
2286
|
value: e,
|
|
2072
2287
|
className: Y.Item,
|
|
2073
|
-
children: /* @__PURE__ */
|
|
2288
|
+
children: /* @__PURE__ */ j("span", {
|
|
2074
2289
|
className: Y.ItemText,
|
|
2075
2290
|
children: e
|
|
2076
2291
|
})
|
|
@@ -2078,10 +2293,21 @@ function Dr({ value: e, defaultValue: t = "", onValueChange: n, domains: r = Cr,
|
|
|
2078
2293
|
})
|
|
2079
2294
|
});
|
|
2080
2295
|
}
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2296
|
+
var ti = W({
|
|
2297
|
+
didYouMean: {
|
|
2298
|
+
no: "Mente du",
|
|
2299
|
+
se: "Menade du",
|
|
2300
|
+
fi: "Tarkoititko",
|
|
2301
|
+
es: "¿Quisiste decir"
|
|
2302
|
+
},
|
|
2303
|
+
use: {
|
|
2304
|
+
no: "Bruk",
|
|
2305
|
+
se: "Använd",
|
|
2306
|
+
fi: "Käytä",
|
|
2307
|
+
es: "Usar"
|
|
2308
|
+
}
|
|
2309
|
+
}), ni = (...e) => e.filter(Boolean).join(" ") || void 0, ri = typeof document > "u" ? d : p;
|
|
2310
|
+
function ii(e, t) {
|
|
2085
2311
|
let n = h(null), r = () => {
|
|
2086
2312
|
let e = n.current;
|
|
2087
2313
|
if (!e) return;
|
|
@@ -2089,7 +2315,7 @@ function Ar(e, t) {
|
|
|
2089
2315
|
let r = getComputedStyle(e), i = t == null ? Infinity : parseFloat(r.lineHeight) * t + parseFloat(r.paddingTop) + parseFloat(r.paddingBottom), a = e.scrollHeight;
|
|
2090
2316
|
e.style.height = `${Math.min(a, i)}px`, e.style.overflowY = a > i ? "auto" : "hidden";
|
|
2091
2317
|
};
|
|
2092
|
-
return
|
|
2318
|
+
return ri(() => {
|
|
2093
2319
|
e && r();
|
|
2094
2320
|
}), d(() => {
|
|
2095
2321
|
let t = n.current;
|
|
@@ -2101,60 +2327,61 @@ function Ar(e, t) {
|
|
|
2101
2327
|
};
|
|
2102
2328
|
}, [e, t]), n;
|
|
2103
2329
|
}
|
|
2104
|
-
function
|
|
2105
|
-
let
|
|
2106
|
-
if (ee.current = e, typeof
|
|
2107
|
-
|
|
2330
|
+
function ai({ label: e, helperText: t, error: n = !1, warning: r, value: i, defaultValue: a, onValueChange: o, startAdornment: s, endAdornment: c, multiline: l = !1, rows: u, minRows: d, maxRows: p, className: m, style: h, ref: g, id: _, disabled: v = !1, required: y = !1, placeholder: b, "aria-describedby": x, ...S }) {
|
|
2331
|
+
let C = f(), w = _ ?? C, T = f(), E = e != null, D = kn(t, r, n), O = D.content != null, ee = ii(l && u == null, p), k = (e) => {
|
|
2332
|
+
if (ee.current = e, typeof g == "function") return g(e);
|
|
2333
|
+
g && (g.current = e);
|
|
2108
2334
|
};
|
|
2109
|
-
return /* @__PURE__ */
|
|
2110
|
-
className:
|
|
2111
|
-
style:
|
|
2112
|
-
children: [/* @__PURE__ */
|
|
2335
|
+
return /* @__PURE__ */ M("div", {
|
|
2336
|
+
className: ni(J.Field, m),
|
|
2337
|
+
style: h,
|
|
2338
|
+
children: [/* @__PURE__ */ M("div", {
|
|
2113
2339
|
className: J.Box,
|
|
2114
2340
|
"data-invalid": n ? "" : void 0,
|
|
2115
|
-
"data-disabled":
|
|
2116
|
-
"data-has-label":
|
|
2341
|
+
"data-disabled": v ? "" : void 0,
|
|
2342
|
+
"data-has-label": E ? "" : void 0,
|
|
2117
2343
|
onClick: (e) => {
|
|
2118
2344
|
e.target.closest("button, a, input, textarea, select, [tabindex]") || e.currentTarget.querySelector("input, textarea")?.focus();
|
|
2119
2345
|
},
|
|
2120
2346
|
children: [
|
|
2121
|
-
|
|
2347
|
+
s != null && /* @__PURE__ */ j("span", {
|
|
2122
2348
|
className: J.Adornment,
|
|
2123
2349
|
"data-position": "start",
|
|
2124
|
-
children:
|
|
2350
|
+
children: s
|
|
2125
2351
|
}),
|
|
2126
|
-
/* @__PURE__ */
|
|
2352
|
+
/* @__PURE__ */ M("div", {
|
|
2127
2353
|
className: J.Inner,
|
|
2128
|
-
children: [
|
|
2129
|
-
htmlFor:
|
|
2354
|
+
children: [E && /* @__PURE__ */ M("label", {
|
|
2355
|
+
htmlFor: w,
|
|
2130
2356
|
className: J.Label,
|
|
2131
|
-
children: [e,
|
|
2132
|
-
}), /* @__PURE__ */
|
|
2133
|
-
...
|
|
2134
|
-
ref:
|
|
2135
|
-
id:
|
|
2136
|
-
value:
|
|
2137
|
-
defaultValue:
|
|
2138
|
-
onValueChange: (e) =>
|
|
2139
|
-
disabled:
|
|
2140
|
-
required:
|
|
2141
|
-
placeholder:
|
|
2357
|
+
children: [e, y && /* @__PURE__ */ j(Dn, {})]
|
|
2358
|
+
}), /* @__PURE__ */ j(ce, {
|
|
2359
|
+
...S,
|
|
2360
|
+
ref: k,
|
|
2361
|
+
id: w,
|
|
2362
|
+
value: i,
|
|
2363
|
+
defaultValue: a,
|
|
2364
|
+
onValueChange: (e) => o?.(e),
|
|
2365
|
+
disabled: v,
|
|
2366
|
+
required: y,
|
|
2367
|
+
placeholder: b || " ",
|
|
2142
2368
|
"aria-invalid": n,
|
|
2143
|
-
"aria-describedby":
|
|
2369
|
+
"aria-describedby": ni(O && T, x),
|
|
2144
2370
|
className: J.Control,
|
|
2145
|
-
render:
|
|
2371
|
+
render: l ? /* @__PURE__ */ j("textarea", { rows: u ?? d ?? 1 }) : void 0
|
|
2146
2372
|
})]
|
|
2147
2373
|
}),
|
|
2148
|
-
|
|
2374
|
+
c != null && /* @__PURE__ */ j("span", {
|
|
2149
2375
|
className: J.Adornment,
|
|
2150
2376
|
"data-position": "end",
|
|
2151
|
-
children:
|
|
2377
|
+
children: c
|
|
2152
2378
|
})
|
|
2153
2379
|
]
|
|
2154
|
-
}),
|
|
2155
|
-
id:
|
|
2380
|
+
}), O && /* @__PURE__ */ j(On, {
|
|
2381
|
+
id: T,
|
|
2156
2382
|
error: n,
|
|
2157
|
-
|
|
2383
|
+
warning: D.warning,
|
|
2384
|
+
children: D.content
|
|
2158
2385
|
})]
|
|
2159
2386
|
});
|
|
2160
2387
|
}
|
|
@@ -2172,122 +2399,122 @@ var Q = {
|
|
|
2172
2399
|
Chips: "_Chips_13rno_178",
|
|
2173
2400
|
ChipRow: "_ChipRow_13rno_184",
|
|
2174
2401
|
ChipMeasure: "_ChipMeasure_13rno_195"
|
|
2175
|
-
},
|
|
2176
|
-
function
|
|
2402
|
+
}, oi = (...e) => e.filter(Boolean).join(" ") || void 0;
|
|
2403
|
+
function si({ side: e, onSideChange: t, ...n }) {
|
|
2177
2404
|
return d(() => {
|
|
2178
2405
|
t(e === "top" ? "top" : "bottom");
|
|
2179
|
-
}, [e, t]), /* @__PURE__ */
|
|
2406
|
+
}, [e, t]), /* @__PURE__ */ j("div", { ...n });
|
|
2180
2407
|
}
|
|
2181
|
-
function
|
|
2182
|
-
let
|
|
2183
|
-
return /* @__PURE__ */
|
|
2184
|
-
className:
|
|
2408
|
+
function ci({ label: e, helperText: t, error: n = !1, required: r = !1, disabled: i = !1, placeholder: a, startAdornment: o, endAdornment: s, open: c, onOpenChange: l, onBlur: u, name: d, id: p, "aria-label": m, "aria-labelledby": _, "aria-describedby": v, className: y, style: x, ref: S, multiple: C, value: w, onValueChange: T, filled: E, display: D, displayHidden: O = !1, valueText: ee, children: k }) {
|
|
2409
|
+
let A = f(), te = p ?? A, N = f(), P = f(), F = e != null, I = t != null, [L, ne] = g(!1), R = c ?? L, [z, B] = g("bottom"), re = h(null), ie = h(null), ae = Mn(u, [re, ie]);
|
|
2410
|
+
return /* @__PURE__ */ M("div", {
|
|
2411
|
+
className: oi(J.Field, Q.Field, y),
|
|
2185
2412
|
style: x,
|
|
2186
|
-
children: [/* @__PURE__ */
|
|
2187
|
-
id:
|
|
2413
|
+
children: [/* @__PURE__ */ M(H.Root, {
|
|
2414
|
+
id: te,
|
|
2188
2415
|
name: d,
|
|
2189
2416
|
multiple: C,
|
|
2190
2417
|
value: w,
|
|
2191
2418
|
onValueChange: T,
|
|
2192
|
-
open:
|
|
2419
|
+
open: R,
|
|
2193
2420
|
onOpenChange: (e) => {
|
|
2194
|
-
c === void 0 &&
|
|
2421
|
+
c === void 0 && ne(e), l?.(e);
|
|
2195
2422
|
},
|
|
2196
2423
|
disabled: i,
|
|
2197
2424
|
required: r,
|
|
2198
2425
|
highlightItemOnHover: !1,
|
|
2199
|
-
children: [/* @__PURE__ */
|
|
2200
|
-
ref:
|
|
2201
|
-
className:
|
|
2426
|
+
children: [/* @__PURE__ */ M("div", {
|
|
2427
|
+
ref: re,
|
|
2428
|
+
className: oi(J.Box, Q.Box),
|
|
2202
2429
|
"data-invalid": n ? "" : void 0,
|
|
2203
2430
|
"data-disabled": i ? "" : void 0,
|
|
2204
|
-
"data-has-label":
|
|
2431
|
+
"data-has-label": F ? "" : void 0,
|
|
2205
2432
|
"data-has-placeholder": a ? "" : void 0,
|
|
2206
2433
|
"data-filled": E ? "" : void 0,
|
|
2207
|
-
"data-open":
|
|
2208
|
-
"data-popup-side":
|
|
2209
|
-
onBlur:
|
|
2434
|
+
"data-open": R ? "" : void 0,
|
|
2435
|
+
"data-popup-side": R ? z : void 0,
|
|
2436
|
+
onBlur: ae,
|
|
2210
2437
|
children: [
|
|
2211
|
-
/* @__PURE__ */
|
|
2438
|
+
/* @__PURE__ */ j(H.Trigger, {
|
|
2212
2439
|
ref: S,
|
|
2213
2440
|
nativeButton: !1,
|
|
2214
|
-
render: /* @__PURE__ */
|
|
2441
|
+
render: /* @__PURE__ */ j("div", {}),
|
|
2215
2442
|
"aria-label": m,
|
|
2216
|
-
"aria-labelledby": _ ?? (
|
|
2217
|
-
"aria-describedby":
|
|
2443
|
+
"aria-labelledby": _ ?? (F ? N : void 0),
|
|
2444
|
+
"aria-describedby": oi(I && P, v),
|
|
2218
2445
|
"aria-invalid": n || void 0,
|
|
2219
2446
|
"aria-required": r || void 0,
|
|
2220
2447
|
className: Q.Trigger,
|
|
2221
|
-
children: /* @__PURE__ */
|
|
2448
|
+
children: /* @__PURE__ */ j("span", {
|
|
2222
2449
|
className: Q.SrOnly,
|
|
2223
|
-
children:
|
|
2450
|
+
children: ee
|
|
2224
2451
|
})
|
|
2225
2452
|
}),
|
|
2226
|
-
o != null && /* @__PURE__ */
|
|
2453
|
+
o != null && /* @__PURE__ */ j("span", {
|
|
2227
2454
|
className: J.Adornment,
|
|
2228
2455
|
"data-position": "start",
|
|
2229
2456
|
children: o
|
|
2230
2457
|
}),
|
|
2231
|
-
/* @__PURE__ */
|
|
2232
|
-
className:
|
|
2233
|
-
children: [
|
|
2234
|
-
id:
|
|
2458
|
+
/* @__PURE__ */ M("div", {
|
|
2459
|
+
className: oi(J.Inner, Q.Inner),
|
|
2460
|
+
children: [F && /* @__PURE__ */ M("span", {
|
|
2461
|
+
id: N,
|
|
2235
2462
|
className: Q.Label,
|
|
2236
|
-
children: [e, r && /* @__PURE__ */
|
|
2237
|
-
}), /* @__PURE__ */
|
|
2463
|
+
children: [e, r && /* @__PURE__ */ j(Dn, {})]
|
|
2464
|
+
}), /* @__PURE__ */ j("div", {
|
|
2238
2465
|
className: Q.Display,
|
|
2239
|
-
"aria-hidden":
|
|
2240
|
-
children: E ?
|
|
2466
|
+
"aria-hidden": O || void 0,
|
|
2467
|
+
children: E ? D : a && /* @__PURE__ */ j("span", {
|
|
2241
2468
|
className: Q.Placeholder,
|
|
2242
2469
|
"aria-hidden": !0,
|
|
2243
2470
|
children: a
|
|
2244
2471
|
})
|
|
2245
2472
|
})]
|
|
2246
2473
|
}),
|
|
2247
|
-
s != null && /* @__PURE__ */
|
|
2474
|
+
s != null && /* @__PURE__ */ j("span", {
|
|
2248
2475
|
className: Q.EndAdornment,
|
|
2249
2476
|
children: s
|
|
2250
2477
|
}),
|
|
2251
|
-
/* @__PURE__ */
|
|
2478
|
+
/* @__PURE__ */ j(b, {
|
|
2252
2479
|
className: Q.Icon,
|
|
2253
2480
|
"aria-hidden": !0
|
|
2254
2481
|
})
|
|
2255
2482
|
]
|
|
2256
|
-
}), /* @__PURE__ */
|
|
2483
|
+
}), /* @__PURE__ */ j(H.Portal, { children: /* @__PURE__ */ j(H.Positioner, {
|
|
2257
2484
|
side: "bottom",
|
|
2258
2485
|
align: "start",
|
|
2259
2486
|
sideOffset: 0,
|
|
2260
2487
|
alignItemWithTrigger: !1,
|
|
2261
2488
|
className: Y.Positioner,
|
|
2262
|
-
render: (e, t) => /* @__PURE__ */
|
|
2489
|
+
render: (e, t) => /* @__PURE__ */ j(si, {
|
|
2263
2490
|
...e,
|
|
2264
2491
|
side: t.side,
|
|
2265
|
-
onSideChange:
|
|
2492
|
+
onSideChange: B
|
|
2266
2493
|
}),
|
|
2267
|
-
children: /* @__PURE__ */
|
|
2268
|
-
ref:
|
|
2494
|
+
children: /* @__PURE__ */ j(H.Popup, {
|
|
2495
|
+
ref: ie,
|
|
2269
2496
|
className: Y.Popup,
|
|
2270
|
-
onBlur:
|
|
2271
|
-
children: /* @__PURE__ */
|
|
2497
|
+
onBlur: ae,
|
|
2498
|
+
children: /* @__PURE__ */ j(H.List, {
|
|
2272
2499
|
className: Y.List,
|
|
2273
|
-
children:
|
|
2500
|
+
children: k
|
|
2274
2501
|
})
|
|
2275
2502
|
})
|
|
2276
2503
|
}) })]
|
|
2277
|
-
}),
|
|
2278
|
-
id:
|
|
2504
|
+
}), I && /* @__PURE__ */ j(On, {
|
|
2505
|
+
id: P,
|
|
2279
2506
|
error: n,
|
|
2280
2507
|
children: t
|
|
2281
2508
|
})]
|
|
2282
2509
|
});
|
|
2283
2510
|
}
|
|
2284
|
-
function
|
|
2285
|
-
return /* @__PURE__ */
|
|
2511
|
+
function li({ option: e, disabled: t, children: n }) {
|
|
2512
|
+
return /* @__PURE__ */ M(H.Item, {
|
|
2286
2513
|
value: e.value,
|
|
2287
2514
|
label: e.label,
|
|
2288
2515
|
disabled: t ?? e.disabled,
|
|
2289
2516
|
className: Y.Item,
|
|
2290
|
-
children: [n, /* @__PURE__ */
|
|
2517
|
+
children: [n, /* @__PURE__ */ j(H.ItemText, {
|
|
2291
2518
|
className: Y.ItemText,
|
|
2292
2519
|
children: e.label
|
|
2293
2520
|
})]
|
|
@@ -2295,25 +2522,25 @@ function Fr({ option: e, disabled: t, children: n }) {
|
|
|
2295
2522
|
}
|
|
2296
2523
|
//#endregion
|
|
2297
2524
|
//#region src/components/form/multi-select.tsx
|
|
2298
|
-
var
|
|
2299
|
-
function
|
|
2525
|
+
var ui = 4, di = typeof document > "u" ? d : p;
|
|
2526
|
+
function fi({ items: e, canDelete: t, onDelete: n }) {
|
|
2300
2527
|
let r = h(null), i = h(null), [a, o] = g(e.length), s = l(() => {
|
|
2301
2528
|
let t = r.current, n = i.current;
|
|
2302
2529
|
if (!t || !n) return;
|
|
2303
|
-
let a = t.clientWidth, s = Array.from(n.children), c = s[s.length - 1], l = s.slice(0, -1), u = c ? c.offsetWidth +
|
|
2304
|
-
if (l.reduce((e, t, n) => e + t.offsetWidth + (n > 0 ?
|
|
2530
|
+
let a = t.clientWidth, s = Array.from(n.children), c = s[s.length - 1], l = s.slice(0, -1), u = c ? c.offsetWidth + ui : 0;
|
|
2531
|
+
if (l.reduce((e, t, n) => e + t.offsetWidth + (n > 0 ? ui : 0), 0) <= a) {
|
|
2305
2532
|
o(e.length);
|
|
2306
2533
|
return;
|
|
2307
2534
|
}
|
|
2308
2535
|
let d = 0, f = 0;
|
|
2309
2536
|
for (let e = 0; e < l.length; e++) {
|
|
2310
|
-
let t = l[e].offsetWidth + (e > 0 ?
|
|
2537
|
+
let t = l[e].offsetWidth + (e > 0 ? ui : 0);
|
|
2311
2538
|
if (d + t + u <= a) d += t, f += 1;
|
|
2312
2539
|
else break;
|
|
2313
2540
|
}
|
|
2314
2541
|
o(f);
|
|
2315
2542
|
}, [e.length]);
|
|
2316
|
-
|
|
2543
|
+
di(() => {
|
|
2317
2544
|
s();
|
|
2318
2545
|
}, [
|
|
2319
2546
|
s,
|
|
@@ -2325,7 +2552,7 @@ function Rr({ items: e, canDelete: t, onDelete: n }) {
|
|
|
2325
2552
|
let t = new ResizeObserver(() => s());
|
|
2326
2553
|
return t.observe(e), () => t.disconnect();
|
|
2327
2554
|
}, [s]);
|
|
2328
|
-
let c = Math.max(e.length - a, 0), u = (e) => /* @__PURE__ */
|
|
2555
|
+
let c = Math.max(e.length - a, 0), u = (e) => /* @__PURE__ */ j(xt, {
|
|
2329
2556
|
size: "sm",
|
|
2330
2557
|
label: e.label,
|
|
2331
2558
|
style: {
|
|
@@ -2333,27 +2560,27 @@ function Rr({ items: e, canDelete: t, onDelete: n }) {
|
|
|
2333
2560
|
maxWidth: "100%"
|
|
2334
2561
|
},
|
|
2335
2562
|
onDelete: t ? () => n(e.value) : void 0
|
|
2336
|
-
}, e.value), f = (e) => /* @__PURE__ */
|
|
2563
|
+
}, e.value), f = (e) => /* @__PURE__ */ j(xt, {
|
|
2337
2564
|
color: "neutral",
|
|
2338
2565
|
size: "sm",
|
|
2339
2566
|
label: `+${e}`,
|
|
2340
2567
|
style: { flexShrink: 0 }
|
|
2341
2568
|
});
|
|
2342
|
-
return /* @__PURE__ */
|
|
2569
|
+
return /* @__PURE__ */ M("div", {
|
|
2343
2570
|
className: Q.Chips,
|
|
2344
|
-
children: [/* @__PURE__ */
|
|
2571
|
+
children: [/* @__PURE__ */ M("div", {
|
|
2345
2572
|
ref: i,
|
|
2346
2573
|
"aria-hidden": !0,
|
|
2347
2574
|
className: Q.ChipMeasure,
|
|
2348
2575
|
children: [e.map((e) => u(e)), f(e.length)]
|
|
2349
|
-
}), /* @__PURE__ */
|
|
2576
|
+
}), /* @__PURE__ */ M("div", {
|
|
2350
2577
|
ref: r,
|
|
2351
2578
|
className: Q.ChipRow,
|
|
2352
2579
|
children: [e.slice(0, a).map((e) => u(e)), c > 0 && f(c)]
|
|
2353
2580
|
})]
|
|
2354
2581
|
});
|
|
2355
2582
|
}
|
|
2356
|
-
function
|
|
2583
|
+
function pi({ options: e, value: t, defaultValue: n = [], onValueChange: r, renderValue: i, min: a = 1, max: o, disabled: s = !1, ref: c, ...l }) {
|
|
2357
2584
|
let u = t !== void 0, [d, f] = g(n), p = u ? t : d, m = h(null), _ = (e) => {
|
|
2358
2585
|
if (m.current = e, typeof c == "function") return c(e);
|
|
2359
2586
|
c && (c.current = e);
|
|
@@ -2367,7 +2594,7 @@ function zr({ options: e, value: t, defaultValue: n = [], onValueChange: r, rend
|
|
|
2367
2594
|
value: t,
|
|
2368
2595
|
label: t
|
|
2369
2596
|
});
|
|
2370
|
-
return /* @__PURE__ */
|
|
2597
|
+
return /* @__PURE__ */ j(ci, {
|
|
2371
2598
|
...l,
|
|
2372
2599
|
ref: _,
|
|
2373
2600
|
disabled: s,
|
|
@@ -2375,7 +2602,7 @@ function zr({ options: e, value: t, defaultValue: n = [], onValueChange: r, rend
|
|
|
2375
2602
|
value: p,
|
|
2376
2603
|
onValueChange: (e) => x(e ?? []),
|
|
2377
2604
|
filled: p.length > 0,
|
|
2378
|
-
display: i ? i(p) : /* @__PURE__ */
|
|
2605
|
+
display: i ? i(p) : /* @__PURE__ */ j(fi, {
|
|
2379
2606
|
items: w,
|
|
2380
2607
|
canDelete: C,
|
|
2381
2608
|
onDelete: S
|
|
@@ -2383,87 +2610,136 @@ function zr({ options: e, value: t, defaultValue: n = [], onValueChange: r, rend
|
|
|
2383
2610
|
valueText: w.map((e) => e.label).join(", "),
|
|
2384
2611
|
children: e.map((e) => {
|
|
2385
2612
|
let t = p.includes(e.value);
|
|
2386
|
-
return /* @__PURE__ */
|
|
2613
|
+
return /* @__PURE__ */ j(li, {
|
|
2387
2614
|
option: e,
|
|
2388
2615
|
disabled: v && !t || y && t || e.disabled,
|
|
2389
|
-
children: /* @__PURE__ */
|
|
2616
|
+
children: /* @__PURE__ */ j(Hn, { checked: t })
|
|
2390
2617
|
}, e.value);
|
|
2391
2618
|
})
|
|
2392
2619
|
});
|
|
2393
2620
|
}
|
|
2394
|
-
|
|
2621
|
+
//#endregion
|
|
2622
|
+
//#region src/hooks/country/countries.ts
|
|
2623
|
+
var mi = {
|
|
2624
|
+
NO: {
|
|
2625
|
+
country: "NO",
|
|
2626
|
+
locale: "nb-NO",
|
|
2627
|
+
currency: "NOK"
|
|
2628
|
+
},
|
|
2629
|
+
SE: {
|
|
2630
|
+
country: "SE",
|
|
2631
|
+
locale: "sv-SE",
|
|
2632
|
+
currency: "SEK"
|
|
2633
|
+
},
|
|
2634
|
+
FI: {
|
|
2635
|
+
country: "FI",
|
|
2636
|
+
locale: "fi-FI",
|
|
2637
|
+
currency: "EUR"
|
|
2638
|
+
},
|
|
2639
|
+
ES: {
|
|
2640
|
+
country: "ES",
|
|
2641
|
+
locale: "es-ES",
|
|
2642
|
+
currency: "EUR"
|
|
2643
|
+
}
|
|
2644
|
+
}, hi = {
|
|
2645
|
+
no: "NO",
|
|
2646
|
+
se: "SE",
|
|
2647
|
+
fi: "FI",
|
|
2648
|
+
es: "ES"
|
|
2649
|
+
};
|
|
2650
|
+
function gi(e) {
|
|
2651
|
+
return typeof e == "object" && !!e && !c(e) && "type" in e && (e.type === "years" || e.type === "currency");
|
|
2652
|
+
}
|
|
2653
|
+
function _i(e, t, n) {
|
|
2654
|
+
let { locale: r, currency: i } = mi[hi[t]], a = e.type === "years" ? {
|
|
2655
|
+
style: "unit",
|
|
2656
|
+
unit: "year",
|
|
2657
|
+
unitDisplay: "long"
|
|
2658
|
+
} : {
|
|
2659
|
+
style: "currency",
|
|
2660
|
+
currency: e.currency ?? i,
|
|
2661
|
+
currencyDisplay: "narrowSymbol"
|
|
2662
|
+
};
|
|
2663
|
+
return new Intl.NumberFormat(r, a).formatToParts(e.type === "years" ? n ?? 0 : 0).find((t) => t.type === (e.type === "years" ? "unit" : "currency"))?.value ?? "";
|
|
2664
|
+
}
|
|
2665
|
+
var vi = {
|
|
2395
2666
|
Box: "_Box_1nhal_11",
|
|
2396
2667
|
Unit: "_Unit_1nhal_18",
|
|
2397
2668
|
Steppers: "_Steppers_1nhal_36",
|
|
2398
2669
|
Stepper: "_Stepper_1nhal_36"
|
|
2399
|
-
},
|
|
2400
|
-
function
|
|
2401
|
-
let
|
|
2670
|
+
}, yi = (...e) => e.filter(Boolean).join(" ") || void 0;
|
|
2671
|
+
function bi({ label: e, labelPlacement: t = "inside", tooltip: n, helperText: r, error: i = !1, warning: a, required: o = !1, disabled: s = !1, id: c, placeholder: l, startIcon: u, unit: d, showSteppers: p = !0, className: m, style: h, ref: _, value: v, defaultValue: y, onValueChange: b, ...x }) {
|
|
2672
|
+
let S = Te(), [C, w] = g(y ?? null), T = v === void 0 ? C : v, O = gi(d) ? _i(d, S, T) : d, ee = f(), k = c ?? ee, A = f(), te = f(), N = f(), P = xi(), F = e != null, I = F && t === "outside", L = kn(r, a, i), ne = L.content != null, z = yi(ne && te, O != null && O !== "" && N), B = (e) => {
|
|
2402
2673
|
e.target.closest("button, a, input, [tabindex]") || e.currentTarget.querySelector("input")?.focus();
|
|
2403
2674
|
};
|
|
2404
|
-
return /* @__PURE__ */
|
|
2405
|
-
...
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2675
|
+
return /* @__PURE__ */ M(R.Root, {
|
|
2676
|
+
...x,
|
|
2677
|
+
value: v,
|
|
2678
|
+
defaultValue: y,
|
|
2679
|
+
onValueChange: (e, t) => {
|
|
2680
|
+
w(e), b?.(e, t);
|
|
2681
|
+
},
|
|
2682
|
+
id: k,
|
|
2683
|
+
disabled: s,
|
|
2684
|
+
required: o,
|
|
2685
|
+
className: yi(J.Field, m),
|
|
2686
|
+
style: h,
|
|
2411
2687
|
children: [
|
|
2412
|
-
|
|
2413
|
-
id:
|
|
2414
|
-
htmlFor:
|
|
2688
|
+
I && /* @__PURE__ */ j(An, {
|
|
2689
|
+
id: A,
|
|
2690
|
+
htmlFor: k,
|
|
2415
2691
|
tooltip: n,
|
|
2416
|
-
required:
|
|
2692
|
+
required: o,
|
|
2417
2693
|
error: i,
|
|
2418
|
-
disabled:
|
|
2694
|
+
disabled: s,
|
|
2419
2695
|
children: e
|
|
2420
2696
|
}),
|
|
2421
|
-
/* @__PURE__ */
|
|
2422
|
-
className:
|
|
2697
|
+
/* @__PURE__ */ M("div", {
|
|
2698
|
+
className: yi(J.Box, vi.Box),
|
|
2423
2699
|
"data-invalid": i ? "" : void 0,
|
|
2424
|
-
"data-disabled":
|
|
2425
|
-
"data-has-label":
|
|
2426
|
-
"data-label-outside":
|
|
2427
|
-
onClick:
|
|
2700
|
+
"data-disabled": s ? "" : void 0,
|
|
2701
|
+
"data-has-label": F && !I ? "" : void 0,
|
|
2702
|
+
"data-label-outside": I ? "" : void 0,
|
|
2703
|
+
onClick: B,
|
|
2428
2704
|
children: [
|
|
2429
|
-
|
|
2705
|
+
u != null && /* @__PURE__ */ j("span", {
|
|
2430
2706
|
className: J.Adornment,
|
|
2431
2707
|
"data-position": "start",
|
|
2432
2708
|
"aria-hidden": !0,
|
|
2433
|
-
children:
|
|
2709
|
+
children: u
|
|
2434
2710
|
}),
|
|
2435
|
-
/* @__PURE__ */
|
|
2711
|
+
/* @__PURE__ */ M("div", {
|
|
2436
2712
|
className: J.Inner,
|
|
2437
|
-
children: [
|
|
2438
|
-
htmlFor:
|
|
2713
|
+
children: [F && !I && /* @__PURE__ */ M("label", {
|
|
2714
|
+
htmlFor: k,
|
|
2439
2715
|
className: J.Label,
|
|
2440
|
-
children: [e,
|
|
2441
|
-
}), /* @__PURE__ */
|
|
2442
|
-
ref:
|
|
2443
|
-
placeholder:
|
|
2716
|
+
children: [e, o && /* @__PURE__ */ j(Dn, {})]
|
|
2717
|
+
}), /* @__PURE__ */ j(R.Input, {
|
|
2718
|
+
ref: _,
|
|
2719
|
+
placeholder: l || " ",
|
|
2444
2720
|
"aria-invalid": i || void 0,
|
|
2445
|
-
"aria-describedby":
|
|
2721
|
+
"aria-describedby": z,
|
|
2446
2722
|
className: J.Control
|
|
2447
2723
|
})]
|
|
2448
2724
|
}),
|
|
2449
|
-
|
|
2450
|
-
id:
|
|
2451
|
-
className:
|
|
2452
|
-
children:
|
|
2725
|
+
O != null && O !== "" && /* @__PURE__ */ j("span", {
|
|
2726
|
+
id: N,
|
|
2727
|
+
className: vi.Unit,
|
|
2728
|
+
children: O
|
|
2453
2729
|
}),
|
|
2454
|
-
|
|
2455
|
-
className:
|
|
2456
|
-
children: [/* @__PURE__ */
|
|
2457
|
-
"aria-label":
|
|
2458
|
-
className:
|
|
2459
|
-
children: /* @__PURE__ */
|
|
2730
|
+
p && /* @__PURE__ */ M("span", {
|
|
2731
|
+
className: vi.Steppers,
|
|
2732
|
+
children: [/* @__PURE__ */ j(R.Decrement, {
|
|
2733
|
+
"aria-label": P.decrease,
|
|
2734
|
+
className: vi.Stepper,
|
|
2735
|
+
children: /* @__PURE__ */ j(E, {
|
|
2460
2736
|
size: 16,
|
|
2461
2737
|
"aria-hidden": !0
|
|
2462
2738
|
})
|
|
2463
|
-
}), /* @__PURE__ */
|
|
2464
|
-
"aria-label":
|
|
2465
|
-
className:
|
|
2466
|
-
children: /* @__PURE__ */
|
|
2739
|
+
}), /* @__PURE__ */ j(R.Increment, {
|
|
2740
|
+
"aria-label": P.increase,
|
|
2741
|
+
className: vi.Stepper,
|
|
2742
|
+
children: /* @__PURE__ */ j(D, {
|
|
2467
2743
|
size: 16,
|
|
2468
2744
|
"aria-hidden": !0
|
|
2469
2745
|
})
|
|
@@ -2471,15 +2747,16 @@ function Hr({ label: e, labelPlacement: t = "inside", tooltip: n, helperText: r,
|
|
|
2471
2747
|
})
|
|
2472
2748
|
]
|
|
2473
2749
|
}),
|
|
2474
|
-
|
|
2475
|
-
id:
|
|
2750
|
+
ne && /* @__PURE__ */ j(On, {
|
|
2751
|
+
id: te,
|
|
2476
2752
|
error: i,
|
|
2477
|
-
|
|
2753
|
+
warning: L.warning,
|
|
2754
|
+
children: L.content
|
|
2478
2755
|
})
|
|
2479
2756
|
]
|
|
2480
2757
|
});
|
|
2481
2758
|
}
|
|
2482
|
-
var
|
|
2759
|
+
var xi = W({
|
|
2483
2760
|
increase: {
|
|
2484
2761
|
no: "Øk",
|
|
2485
2762
|
se: "Öka",
|
|
@@ -2492,54 +2769,55 @@ var Ur = B({
|
|
|
2492
2769
|
fi: "Vähennä",
|
|
2493
2770
|
es: "Disminuir"
|
|
2494
2771
|
}
|
|
2495
|
-
}),
|
|
2772
|
+
}), Si = [
|
|
2496
2773
|
"FI",
|
|
2497
2774
|
"SE",
|
|
2498
2775
|
"NO",
|
|
2499
2776
|
"ES"
|
|
2500
2777
|
];
|
|
2501
|
-
function
|
|
2778
|
+
function Ci(e) {
|
|
2502
2779
|
return e.toUpperCase().replace(/[A-Z]/g, (e) => String.fromCodePoint(127397 + e.charCodeAt(0)));
|
|
2503
2780
|
}
|
|
2504
|
-
function
|
|
2505
|
-
let t = new Intl.DisplayNames([e], { type: "region" }), n =
|
|
2781
|
+
function wi(e) {
|
|
2782
|
+
let t = new Intl.DisplayNames([e], { type: "region" }), n = V(), r = (e, n) => ({
|
|
2506
2783
|
code: e,
|
|
2507
|
-
dialCode:
|
|
2784
|
+
dialCode: oe(e),
|
|
2508
2785
|
name: t.of(e) ?? e,
|
|
2509
|
-
flag:
|
|
2786
|
+
flag: Ci(e),
|
|
2510
2787
|
pinned: n
|
|
2511
|
-
}), i =
|
|
2788
|
+
}), i = Si.filter((e) => n.includes(e)).map((e) => r(e, !0)), a = n.filter((e) => !Si.includes(e)).map((e) => r(e, !1)).sort((t, n) => t.name.localeCompare(n.name, e));
|
|
2512
2789
|
return [...i, ...a];
|
|
2513
2790
|
}
|
|
2514
2791
|
var $ = {
|
|
2515
|
-
Field: "
|
|
2516
|
-
Box: "
|
|
2517
|
-
Label: "
|
|
2518
|
-
Inner: "
|
|
2519
|
-
Trigger: "
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2792
|
+
Field: "_Field_gcp2o_12",
|
|
2793
|
+
Box: "_Box_gcp2o_17",
|
|
2794
|
+
Label: "_Label_gcp2o_26",
|
|
2795
|
+
Inner: "_Inner_gcp2o_34",
|
|
2796
|
+
Trigger: "_Trigger_gcp2o_39",
|
|
2797
|
+
DialCode: "_DialCode_gcp2o_75",
|
|
2798
|
+
Flag: "_Flag_gcp2o_102",
|
|
2799
|
+
Dial: "_Dial_gcp2o_75",
|
|
2800
|
+
Chevron: "_Chevron_gcp2o_113",
|
|
2801
|
+
Popup: "_Popup_gcp2o_121",
|
|
2802
|
+
Search: "_Search_gcp2o_147",
|
|
2803
|
+
SearchInput: "_SearchInput_gcp2o_163",
|
|
2804
|
+
List: "_List_gcp2o_190",
|
|
2805
|
+
Country: "_Country_gcp2o_195",
|
|
2806
|
+
CountryName: "_CountryName_gcp2o_199",
|
|
2807
|
+
CountryDial: "_CountryDial_gcp2o_212",
|
|
2808
|
+
Separator: "_Separator_gcp2o_221"
|
|
2809
|
+
}, Ti = {
|
|
2532
2810
|
no: "NO",
|
|
2533
2811
|
se: "SE",
|
|
2534
2812
|
fi: "FI",
|
|
2535
2813
|
es: "ES"
|
|
2536
|
-
},
|
|
2814
|
+
}, Ei = {
|
|
2537
2815
|
no: "nb-NO",
|
|
2538
2816
|
se: "sv-SE",
|
|
2539
2817
|
fi: "fi-FI",
|
|
2540
2818
|
es: "es-ES"
|
|
2541
2819
|
};
|
|
2542
|
-
function
|
|
2820
|
+
function Di(e, t) {
|
|
2543
2821
|
if (e === "NO") {
|
|
2544
2822
|
let e = t.replace(/\D/g, "").slice(0, 8);
|
|
2545
2823
|
return [
|
|
@@ -2548,9 +2826,41 @@ function Yr(e, t) {
|
|
|
2548
2826
|
e.slice(5, 8)
|
|
2549
2827
|
].filter(Boolean).join(" ");
|
|
2550
2828
|
}
|
|
2551
|
-
return new
|
|
2829
|
+
return new ae(e).input(t);
|
|
2830
|
+
}
|
|
2831
|
+
function Oi(e, t) {
|
|
2832
|
+
if (e === "NO") return Di(e, t);
|
|
2833
|
+
let n = oe(e);
|
|
2834
|
+
return new ae(e).input(`+${n}${t}`).replace(`+${n}`, "").trim();
|
|
2835
|
+
}
|
|
2836
|
+
function ki(e, t) {
|
|
2837
|
+
return /^\s*[+0]/.test(t) ? new ae(e).input(t) : Oi(e, t.replace(/\D/g, ""));
|
|
2838
|
+
}
|
|
2839
|
+
function Ai(e, t) {
|
|
2840
|
+
let n = se(t.replace(/[\s-]/g, ""), e);
|
|
2841
|
+
return n && n.countryCallingCode === oe(e) ? Oi(e, n.nationalNumber) : ki(e, t);
|
|
2842
|
+
}
|
|
2843
|
+
function ji(e, t, { sameCountry: n, mobileOnly: r }) {
|
|
2844
|
+
let i = () => {
|
|
2845
|
+
let n = se(t.replace(/\s/g, ""), e);
|
|
2846
|
+
return n?.isValid() && n.country === e ? Z(n.number) : X();
|
|
2847
|
+
};
|
|
2848
|
+
if (r && hr(e)) {
|
|
2849
|
+
let n = gr(e, t);
|
|
2850
|
+
return n.valid ? {
|
|
2851
|
+
...n,
|
|
2852
|
+
landline: !1
|
|
2853
|
+
} : {
|
|
2854
|
+
valid: !1,
|
|
2855
|
+
landline: i().valid
|
|
2856
|
+
};
|
|
2857
|
+
}
|
|
2858
|
+
return {
|
|
2859
|
+
...n ? i() : fr(e, t),
|
|
2860
|
+
landline: !1
|
|
2861
|
+
};
|
|
2552
2862
|
}
|
|
2553
|
-
var
|
|
2863
|
+
var Mi = W({
|
|
2554
2864
|
countryLabel: {
|
|
2555
2865
|
no: "Landskode",
|
|
2556
2866
|
se: "Landskod",
|
|
@@ -2574,11 +2884,17 @@ var Xr = B({
|
|
|
2574
2884
|
se: "Ogiltigt telefonnummer",
|
|
2575
2885
|
fi: "Virheellinen puhelinnumero",
|
|
2576
2886
|
es: "Número de teléfono no válido"
|
|
2887
|
+
},
|
|
2888
|
+
notMobile: {
|
|
2889
|
+
no: "Skriv inn et mobilnummer",
|
|
2890
|
+
se: "Ange ett mobilnummer",
|
|
2891
|
+
fi: "Anna matkapuhelinnumero",
|
|
2892
|
+
es: "Introduce un número de móvil"
|
|
2577
2893
|
}
|
|
2578
|
-
}),
|
|
2579
|
-
function
|
|
2580
|
-
let { contains: d } =
|
|
2581
|
-
return /* @__PURE__ */
|
|
2894
|
+
}), Ni = (...e) => e.filter(Boolean).join(" ") || void 0, Pi = (e) => `${e.name} ${e.code} ${e.dialCode} +${e.dialCode}`, Fi = (e, t) => e.code === t.code;
|
|
2895
|
+
function Ii({ options: e, value: t, onChange: n, ariaLabel: r, searchLabel: i, noOptionsText: a, disabled: s, open: c, onOpenChange: l, anchorRef: u }) {
|
|
2896
|
+
let { contains: d } = B.useFilter({ sensitivity: "base" }), [f, p] = g(""), [m, h] = g(!1), _ = e.find((e) => e.code === t) ?? null, v = e.filter((e) => e.pinned).length;
|
|
2897
|
+
return /* @__PURE__ */ M(B.Root, {
|
|
2582
2898
|
items: e,
|
|
2583
2899
|
value: _,
|
|
2584
2900
|
onValueChange: (e) => {
|
|
@@ -2588,70 +2904,70 @@ function ei({ options: e, value: t, onChange: n, ariaLabel: r, searchLabel: i, n
|
|
|
2588
2904
|
onInputValueChange: p,
|
|
2589
2905
|
open: c,
|
|
2590
2906
|
onOpenChange: l,
|
|
2591
|
-
filter: (e, t) => d(
|
|
2907
|
+
filter: (e, t) => d(Pi(e), t),
|
|
2592
2908
|
itemToStringLabel: (e) => e.name,
|
|
2593
2909
|
itemToStringValue: (e) => e.code,
|
|
2594
|
-
isItemEqualToValue:
|
|
2910
|
+
isItemEqualToValue: Fi,
|
|
2595
2911
|
disabled: s,
|
|
2596
2912
|
highlightItemOnHover: !1,
|
|
2597
|
-
children: [/* @__PURE__ */
|
|
2913
|
+
children: [/* @__PURE__ */ M(B.Trigger, {
|
|
2598
2914
|
className: $.Trigger,
|
|
2599
2915
|
"aria-label": _ ? `${r}, ${_.name}` : r,
|
|
2600
|
-
children: [_ && /* @__PURE__ */
|
|
2916
|
+
children: [_ && /* @__PURE__ */ M(A, { children: [/* @__PURE__ */ j("span", {
|
|
2601
2917
|
"aria-hidden": !0,
|
|
2602
2918
|
className: $.Flag,
|
|
2603
2919
|
children: _.flag
|
|
2604
|
-
}), /* @__PURE__ */
|
|
2920
|
+
}), /* @__PURE__ */ M("span", {
|
|
2605
2921
|
className: $.Dial,
|
|
2606
2922
|
children: ["+", _.dialCode]
|
|
2607
|
-
})] }), /* @__PURE__ */
|
|
2923
|
+
})] }), /* @__PURE__ */ j(b, {
|
|
2608
2924
|
"aria-hidden": !0,
|
|
2609
2925
|
className: $.Chevron
|
|
2610
2926
|
})]
|
|
2611
|
-
}), /* @__PURE__ */
|
|
2927
|
+
}), /* @__PURE__ */ j(B.Portal, { children: /* @__PURE__ */ j(B.Positioner, {
|
|
2612
2928
|
anchor: u,
|
|
2613
2929
|
side: "bottom",
|
|
2614
2930
|
align: "start",
|
|
2615
2931
|
sideOffset: 4,
|
|
2616
2932
|
className: Y.Positioner,
|
|
2617
|
-
children: /* @__PURE__ */
|
|
2933
|
+
children: /* @__PURE__ */ M(B.Popup, {
|
|
2618
2934
|
className: $.Popup,
|
|
2619
2935
|
"aria-label": r,
|
|
2620
2936
|
"data-keyboard": m ? "" : void 0,
|
|
2621
2937
|
onKeyDownCapture: () => h(!0),
|
|
2622
2938
|
onPointerDownCapture: () => h(!1),
|
|
2623
2939
|
children: [
|
|
2624
|
-
/* @__PURE__ */
|
|
2940
|
+
/* @__PURE__ */ M("div", {
|
|
2625
2941
|
className: $.Search,
|
|
2626
|
-
children: [/* @__PURE__ */ O
|
|
2942
|
+
children: [/* @__PURE__ */ j(O, { "aria-hidden": !0 }), /* @__PURE__ */ j(B.Input, {
|
|
2627
2943
|
className: $.SearchInput,
|
|
2628
2944
|
placeholder: i,
|
|
2629
2945
|
"aria-label": i
|
|
2630
2946
|
})]
|
|
2631
2947
|
}),
|
|
2632
|
-
/* @__PURE__ */
|
|
2948
|
+
/* @__PURE__ */ j(B.Empty, {
|
|
2633
2949
|
className: Y.Empty,
|
|
2634
2950
|
children: a
|
|
2635
2951
|
}),
|
|
2636
|
-
/* @__PURE__ */
|
|
2637
|
-
className:
|
|
2638
|
-
children: (e, t) => /* @__PURE__ */
|
|
2952
|
+
/* @__PURE__ */ j(B.List, {
|
|
2953
|
+
className: Ni(Y.List, $.List),
|
|
2954
|
+
children: (e, t) => /* @__PURE__ */ M(o, { children: [f === "" && v > 0 && t === v && /* @__PURE__ */ j("div", {
|
|
2639
2955
|
role: "presentation",
|
|
2640
2956
|
className: $.Separator
|
|
2641
|
-
}), /* @__PURE__ */
|
|
2957
|
+
}), /* @__PURE__ */ M(B.Item, {
|
|
2642
2958
|
value: e,
|
|
2643
|
-
className:
|
|
2959
|
+
className: Ni(Y.Item, $.Country),
|
|
2644
2960
|
children: [
|
|
2645
|
-
/* @__PURE__ */
|
|
2961
|
+
/* @__PURE__ */ j("span", {
|
|
2646
2962
|
"aria-hidden": !0,
|
|
2647
2963
|
className: $.Flag,
|
|
2648
2964
|
children: e.flag
|
|
2649
2965
|
}),
|
|
2650
|
-
/* @__PURE__ */
|
|
2966
|
+
/* @__PURE__ */ j("span", {
|
|
2651
2967
|
className: $.CountryName,
|
|
2652
2968
|
children: e.name
|
|
2653
2969
|
}),
|
|
2654
|
-
/* @__PURE__ */
|
|
2970
|
+
/* @__PURE__ */ M("span", {
|
|
2655
2971
|
className: $.CountryDial,
|
|
2656
2972
|
children: ["+", e.dialCode]
|
|
2657
2973
|
})
|
|
@@ -2663,108 +2979,137 @@ function ei({ options: e, value: t, onChange: n, ariaLabel: r, searchLabel: i, n
|
|
|
2663
2979
|
}) })]
|
|
2664
2980
|
});
|
|
2665
2981
|
}
|
|
2666
|
-
function
|
|
2667
|
-
let
|
|
2668
|
-
let e =
|
|
2669
|
-
return
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
|
|
2675
|
-
|
|
2982
|
+
function Li({ label: e, helperText: t, error: n, required: r = !1, disabled: i = !1, id: a, country: o, defaultCountry: s, onCountryChange: c, value: l, defaultValue: u, onValueChange: d, onBlur: p, countries: _, mobileOnly: v = !1, validateOnBlur: y = !0, className: b, style: x, ref: S, "aria-describedby": C, ...w }) {
|
|
2983
|
+
let T = Te(), E = Mi(), D = f(), O = a ?? D, ee = f(), k = f(), A = h(null), [te, N] = g(!1), P = _ != null && _.length > 0 ? _ : null, F = P?.length === 1, I = P?.join(","), L = m(() => {
|
|
2984
|
+
let e = wi(Ei[T]), t = I?.split(",");
|
|
2985
|
+
return t ? e.filter((e) => t.includes(e.code)) : e;
|
|
2986
|
+
}, [T, I]), ne = s ?? Ti[T], [R, z] = g(P && !P.includes(ne) ? P[0] : ne), B = o ?? R, re = {
|
|
2987
|
+
sameCountry: P != null,
|
|
2988
|
+
mobileOnly: v
|
|
2989
|
+
}, [ie, ae] = g(u ?? ""), V = l ?? ie, [oe, ce] = g(!1), H = ji(B, V, re), le = {
|
|
2990
|
+
country: B,
|
|
2991
|
+
e164: H.normalized,
|
|
2992
|
+
isValid: H.valid
|
|
2993
|
+
}, ue = y && oe && V.trim() !== "" && !le.isValid, de = n ?? ue, fe = t ?? (ue ? H.landline ? E.notMobile : E.invalid : void 0), pe = fe != null, me = (e, t) => {
|
|
2994
|
+
let n = ji(t, e, re);
|
|
2676
2995
|
d?.(e, {
|
|
2677
2996
|
country: t,
|
|
2678
2997
|
e164: n.normalized,
|
|
2679
2998
|
isValid: n.valid
|
|
2680
2999
|
});
|
|
2681
|
-
},
|
|
2682
|
-
|
|
2683
|
-
},
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
|
|
3000
|
+
}, he = (e, t) => {
|
|
3001
|
+
l === void 0 && ae(e), t !== B && (o === void 0 && z(t), c?.(t)), me(e, t);
|
|
3002
|
+
}, ge = (e) => {
|
|
3003
|
+
o === void 0 && z(e), c?.(e), me(V, e);
|
|
3004
|
+
}, U = (e) => {
|
|
3005
|
+
let t = e.target.value;
|
|
3006
|
+
if (!P) {
|
|
3007
|
+
he(Di(B, t), B);
|
|
3008
|
+
return;
|
|
3009
|
+
}
|
|
3010
|
+
if (t.length - V.length > 1) {
|
|
3011
|
+
let e = se(t.replace(/[\s-]/g, ""), B), n = e?.country && P.includes(e.country) ? e.country : B;
|
|
3012
|
+
he(Ai(n, t), n);
|
|
3013
|
+
return;
|
|
3014
|
+
}
|
|
3015
|
+
he(ki(B, t), B);
|
|
3016
|
+
}, _e = (e) => {
|
|
3017
|
+
if (ce(!0), P) {
|
|
3018
|
+
let e = Ai(B, V);
|
|
3019
|
+
e !== V && he(e, B);
|
|
3020
|
+
}
|
|
3021
|
+
p?.(e);
|
|
3022
|
+
}, ve = F ? L.find((e) => e.code === B) : void 0;
|
|
3023
|
+
return /* @__PURE__ */ M("div", {
|
|
3024
|
+
className: Ni(J.Field, $.Field, b),
|
|
3025
|
+
style: x,
|
|
3026
|
+
children: [/* @__PURE__ */ M("div", {
|
|
3027
|
+
ref: A,
|
|
3028
|
+
className: Ni(J.Box, $.Box),
|
|
3029
|
+
"data-invalid": de ? "" : void 0,
|
|
2696
3030
|
"data-disabled": i ? "" : void 0,
|
|
2697
3031
|
"data-country-open": te ? "" : void 0,
|
|
2698
3032
|
onClick: (e) => {
|
|
2699
3033
|
let t = e.target;
|
|
2700
3034
|
e.currentTarget.contains(t) && (t.closest("button, input") || e.currentTarget.querySelector("input[type=\"tel\"]")?.focus());
|
|
2701
3035
|
},
|
|
2702
|
-
children: [/* @__PURE__ */
|
|
2703
|
-
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
|
|
2708
|
-
|
|
3036
|
+
children: [F ? ve && /* @__PURE__ */ M("span", {
|
|
3037
|
+
className: $.DialCode,
|
|
3038
|
+
children: [/* @__PURE__ */ j("span", {
|
|
3039
|
+
"aria-hidden": !0,
|
|
3040
|
+
className: $.Flag,
|
|
3041
|
+
children: ve.flag
|
|
3042
|
+
}), /* @__PURE__ */ M("span", {
|
|
3043
|
+
id: k,
|
|
3044
|
+
className: $.Dial,
|
|
3045
|
+
children: ["+", ve.dialCode]
|
|
3046
|
+
})]
|
|
3047
|
+
}) : /* @__PURE__ */ j(Ii, {
|
|
3048
|
+
options: L,
|
|
3049
|
+
value: B,
|
|
3050
|
+
onChange: ge,
|
|
3051
|
+
ariaLabel: E.countryLabel,
|
|
3052
|
+
searchLabel: E.searchCountry,
|
|
3053
|
+
noOptionsText: E.noCountries,
|
|
2709
3054
|
disabled: i,
|
|
2710
3055
|
open: te,
|
|
2711
|
-
onOpenChange:
|
|
2712
|
-
anchorRef:
|
|
2713
|
-
}), /* @__PURE__ */
|
|
2714
|
-
className:
|
|
2715
|
-
children: [e != null && /* @__PURE__ */
|
|
2716
|
-
htmlFor:
|
|
2717
|
-
className:
|
|
2718
|
-
children: [e, r && /* @__PURE__ */
|
|
2719
|
-
}), /* @__PURE__ */
|
|
3056
|
+
onOpenChange: N,
|
|
3057
|
+
anchorRef: A
|
|
3058
|
+
}), /* @__PURE__ */ M("div", {
|
|
3059
|
+
className: Ni(J.Inner, $.Inner),
|
|
3060
|
+
children: [e != null && /* @__PURE__ */ M("label", {
|
|
3061
|
+
htmlFor: O,
|
|
3062
|
+
className: Ni(J.Label, $.Label),
|
|
3063
|
+
children: [e, r && /* @__PURE__ */ j(Dn, {})]
|
|
3064
|
+
}), /* @__PURE__ */ j("input", {
|
|
2720
3065
|
inputMode: "tel",
|
|
2721
3066
|
autoComplete: "tel-national",
|
|
2722
|
-
...
|
|
2723
|
-
ref:
|
|
2724
|
-
id:
|
|
3067
|
+
...w,
|
|
3068
|
+
ref: S,
|
|
3069
|
+
id: O,
|
|
2725
3070
|
type: "tel",
|
|
2726
|
-
value:
|
|
2727
|
-
onChange:
|
|
2728
|
-
onBlur:
|
|
3071
|
+
value: V,
|
|
3072
|
+
onChange: U,
|
|
3073
|
+
onBlur: _e,
|
|
2729
3074
|
disabled: i,
|
|
2730
3075
|
required: r,
|
|
2731
|
-
"aria-invalid":
|
|
2732
|
-
"aria-describedby":
|
|
3076
|
+
"aria-invalid": de,
|
|
3077
|
+
"aria-describedby": Ni(ve && k, pe && ee, C),
|
|
2733
3078
|
className: J.Control
|
|
2734
3079
|
})]
|
|
2735
3080
|
})]
|
|
2736
|
-
}),
|
|
3081
|
+
}), pe && /* @__PURE__ */ j(On, {
|
|
2737
3082
|
id: ee,
|
|
2738
|
-
error:
|
|
2739
|
-
children:
|
|
3083
|
+
error: de,
|
|
3084
|
+
children: fe
|
|
2740
3085
|
})]
|
|
2741
3086
|
});
|
|
2742
3087
|
}
|
|
2743
|
-
var
|
|
3088
|
+
var Ri = {
|
|
2744
3089
|
Options: "_Options_hhfuh_8",
|
|
2745
3090
|
Circle: "_Circle_hhfuh_19",
|
|
2746
3091
|
Dot: "_Dot_hhfuh_67"
|
|
2747
|
-
},
|
|
3092
|
+
}, zi = Ri.Circle, Bi = Ri.Dot, Vi = ({ checked: e = !1, size: t = "md", className: n }) => /* @__PURE__ */ j("span", {
|
|
2748
3093
|
"aria-hidden": !0,
|
|
2749
|
-
className: [
|
|
3094
|
+
className: [Ri.Circle, n].filter(Boolean).join(" "),
|
|
2750
3095
|
"data-size": t,
|
|
2751
3096
|
"data-checked": e ? "" : void 0,
|
|
2752
|
-
children: /* @__PURE__ */
|
|
2753
|
-
}),
|
|
2754
|
-
let t = u(
|
|
3097
|
+
children: /* @__PURE__ */ j("span", { className: Ri.Dot })
|
|
3098
|
+
}), Hi = { Group: "_Group_2xgbn_8" }, Ui = s(null), Wi = (e) => {
|
|
3099
|
+
let t = u(Ui);
|
|
2755
3100
|
if (!t) throw Error(`<${e}> must be rendered inside a <RadioGroup.Root> or <RadioCard.Group>.`);
|
|
2756
3101
|
return t;
|
|
2757
|
-
},
|
|
2758
|
-
function
|
|
2759
|
-
let E = f(),
|
|
3102
|
+
}, Gi = (...e) => e.filter(Boolean).join(" ") || void 0;
|
|
3103
|
+
function Ki({ label: e, tooltip: t, helperText: n, error: r = !1, value: i, defaultValue: a, onValueChange: o, name: s, disabled: c = !1, required: l = !1, onBlur: u, id: d, "aria-label": p, "aria-labelledby": h, "aria-describedby": g, className: _, style: v, ref: y, size: b, cardSize: x, optionsClassName: S, optionsStyle: C, optionsDataColumns: w, children: T }) {
|
|
3104
|
+
let E = f(), D = f(), O = e != null, ee = n != null, k = m(() => ({
|
|
2760
3105
|
size: b,
|
|
2761
3106
|
cardSize: x
|
|
2762
3107
|
}), [b, x]);
|
|
2763
|
-
return /* @__PURE__ */
|
|
2764
|
-
className:
|
|
3108
|
+
return /* @__PURE__ */ M("div", {
|
|
3109
|
+
className: Gi(Hi.Group, _),
|
|
2765
3110
|
style: v,
|
|
2766
3111
|
children: [
|
|
2767
|
-
|
|
3112
|
+
O && /* @__PURE__ */ j(An, {
|
|
2768
3113
|
id: E,
|
|
2769
3114
|
tooltip: t,
|
|
2770
3115
|
required: l,
|
|
@@ -2772,9 +3117,9 @@ function ui({ label: e, tooltip: t, helperText: n, error: r = !1, value: i, defa
|
|
|
2772
3117
|
disabled: c,
|
|
2773
3118
|
children: e
|
|
2774
3119
|
}),
|
|
2775
|
-
/* @__PURE__ */
|
|
2776
|
-
value:
|
|
2777
|
-
children: /* @__PURE__ */
|
|
3120
|
+
/* @__PURE__ */ j(Ui.Provider, {
|
|
3121
|
+
value: k,
|
|
3122
|
+
children: /* @__PURE__ */ j(ue, {
|
|
2778
3123
|
id: d,
|
|
2779
3124
|
inputRef: y,
|
|
2780
3125
|
name: s,
|
|
@@ -2784,8 +3129,8 @@ function ui({ label: e, tooltip: t, helperText: n, error: r = !1, value: i, defa
|
|
|
2784
3129
|
disabled: c,
|
|
2785
3130
|
required: l,
|
|
2786
3131
|
"aria-label": p,
|
|
2787
|
-
"aria-labelledby":
|
|
2788
|
-
"aria-describedby":
|
|
3132
|
+
"aria-labelledby": O ? E : h,
|
|
3133
|
+
"aria-describedby": Gi(ee && D, g),
|
|
2789
3134
|
"aria-invalid": r ? !0 : void 0,
|
|
2790
3135
|
onBlur: (e) => {
|
|
2791
3136
|
e.currentTarget.contains(e.relatedTarget) || u?.(e);
|
|
@@ -2796,8 +3141,8 @@ function ui({ label: e, tooltip: t, helperText: n, error: r = !1, value: i, defa
|
|
|
2796
3141
|
children: T
|
|
2797
3142
|
})
|
|
2798
3143
|
}),
|
|
2799
|
-
|
|
2800
|
-
id:
|
|
3144
|
+
ee && /* @__PURE__ */ j(On, {
|
|
3145
|
+
id: D,
|
|
2801
3146
|
error: r,
|
|
2802
3147
|
children: n
|
|
2803
3148
|
})
|
|
@@ -2806,48 +3151,48 @@ function ui({ label: e, tooltip: t, helperText: n, error: r = !1, value: i, defa
|
|
|
2806
3151
|
}
|
|
2807
3152
|
//#endregion
|
|
2808
3153
|
//#region src/components/form/radio.tsx
|
|
2809
|
-
var
|
|
2810
|
-
Item: () =>
|
|
2811
|
-
Root: () =>
|
|
2812
|
-
}),
|
|
2813
|
-
function
|
|
2814
|
-
let l =
|
|
3154
|
+
var qi = /* @__PURE__ */ ge({
|
|
3155
|
+
Item: () => Yi,
|
|
3156
|
+
Root: () => Xi
|
|
3157
|
+
}), Ji = (...e) => e.filter(Boolean).join(" ") || void 0;
|
|
3158
|
+
function Yi({ value: e, label: t, disabled: n = !1, size: r, id: i, "aria-label": a, className: o, style: s, ref: c }) {
|
|
3159
|
+
let l = Wi("RadioGroup.Item"), u = t == null, d = /* @__PURE__ */ j(le.Root, {
|
|
2815
3160
|
nativeButton: !0,
|
|
2816
|
-
render: /* @__PURE__ */
|
|
3161
|
+
render: /* @__PURE__ */ j("button", { type: "button" }),
|
|
2817
3162
|
id: i,
|
|
2818
3163
|
inputRef: c,
|
|
2819
3164
|
value: e,
|
|
2820
3165
|
disabled: n,
|
|
2821
3166
|
"aria-label": a,
|
|
2822
3167
|
"data-size": r ?? l.size ?? "md",
|
|
2823
|
-
className: u ?
|
|
3168
|
+
className: u ? Ji(zi, o) : zi,
|
|
2824
3169
|
style: u ? s : void 0,
|
|
2825
|
-
children: /* @__PURE__ */
|
|
3170
|
+
children: /* @__PURE__ */ j(le.Indicator, {
|
|
2826
3171
|
keepMounted: !0,
|
|
2827
|
-
className:
|
|
3172
|
+
className: Bi
|
|
2828
3173
|
})
|
|
2829
3174
|
});
|
|
2830
|
-
return u ? d : /* @__PURE__ */
|
|
2831
|
-
className:
|
|
3175
|
+
return u ? d : /* @__PURE__ */ M("label", {
|
|
3176
|
+
className: Ji(Un.Row, o),
|
|
2832
3177
|
style: s,
|
|
2833
|
-
children: [d, /* @__PURE__ */
|
|
2834
|
-
className:
|
|
3178
|
+
children: [d, /* @__PURE__ */ j("span", {
|
|
3179
|
+
className: Un.Text,
|
|
2835
3180
|
children: t
|
|
2836
3181
|
})]
|
|
2837
3182
|
});
|
|
2838
3183
|
}
|
|
2839
|
-
function
|
|
2840
|
-
return /* @__PURE__ */
|
|
3184
|
+
function Xi({ options: e, children: t, ...n }) {
|
|
3185
|
+
return /* @__PURE__ */ M(Ki, {
|
|
2841
3186
|
...n,
|
|
2842
|
-
optionsClassName:
|
|
2843
|
-
children: [e?.map((e) => /* @__PURE__ */
|
|
3187
|
+
optionsClassName: Ri.Options,
|
|
3188
|
+
children: [e?.map((e) => /* @__PURE__ */ j(Yi, {
|
|
2844
3189
|
value: e.value,
|
|
2845
3190
|
label: e.label,
|
|
2846
3191
|
disabled: e.disabled
|
|
2847
3192
|
}, String(e.value))), t]
|
|
2848
3193
|
});
|
|
2849
3194
|
}
|
|
2850
|
-
var
|
|
3195
|
+
var Zi = {
|
|
2851
3196
|
Options: "_Options_1myxj_8",
|
|
2852
3197
|
Card: "_Card_1myxj_19",
|
|
2853
3198
|
Radio: "_Radio_1myxj_61",
|
|
@@ -2856,69 +3201,69 @@ var hi = {
|
|
|
2856
3201
|
Content: "_Content_1myxj_116",
|
|
2857
3202
|
Label: "_Label_1myxj_133",
|
|
2858
3203
|
Description: "_Description_1myxj_142"
|
|
2859
|
-
},
|
|
2860
|
-
Content: () =>
|
|
2861
|
-
Description: () =>
|
|
2862
|
-
Group: () =>
|
|
2863
|
-
Icon: () =>
|
|
2864
|
-
Indicator: () =>
|
|
2865
|
-
Label: () =>
|
|
2866
|
-
Root: () =>
|
|
2867
|
-
}),
|
|
2868
|
-
function
|
|
2869
|
-
let c =
|
|
2870
|
-
return /* @__PURE__ */
|
|
3204
|
+
}, Qi = /* @__PURE__ */ ge({
|
|
3205
|
+
Content: () => ra,
|
|
3206
|
+
Description: () => aa,
|
|
3207
|
+
Group: () => oa,
|
|
3208
|
+
Icon: () => na,
|
|
3209
|
+
Indicator: () => ta,
|
|
3210
|
+
Label: () => ia,
|
|
3211
|
+
Root: () => ea
|
|
3212
|
+
}), $i = (...e) => e.filter(Boolean).join(" ") || void 0;
|
|
3213
|
+
function ea({ value: e, orientation: t = "horizontal", disabled: n = !1, size: r, className: i, style: a, ref: o, children: s }) {
|
|
3214
|
+
let c = Wi("RadioCard.Root");
|
|
3215
|
+
return /* @__PURE__ */ M("label", {
|
|
2871
3216
|
ref: o,
|
|
2872
|
-
className:
|
|
3217
|
+
className: $i(Zi.Card, i),
|
|
2873
3218
|
style: a,
|
|
2874
3219
|
"data-orientation": t,
|
|
2875
3220
|
"data-size": r ?? c.cardSize ?? "lg",
|
|
2876
|
-
children: [/* @__PURE__ */
|
|
3221
|
+
children: [/* @__PURE__ */ j(le.Root, {
|
|
2877
3222
|
nativeButton: !0,
|
|
2878
|
-
render: /* @__PURE__ */
|
|
3223
|
+
render: /* @__PURE__ */ j("button", { type: "button" }),
|
|
2879
3224
|
value: e,
|
|
2880
3225
|
disabled: n,
|
|
2881
|
-
className:
|
|
3226
|
+
className: Zi.Radio
|
|
2882
3227
|
}), s]
|
|
2883
3228
|
});
|
|
2884
3229
|
}
|
|
2885
|
-
var
|
|
3230
|
+
var ta = ({ size: e }) => /* @__PURE__ */ j(Vi, {
|
|
2886
3231
|
size: e,
|
|
2887
|
-
className:
|
|
2888
|
-
}),
|
|
3232
|
+
className: Zi.Indicator
|
|
3233
|
+
}), na = ({ size: e = 24, icon: t }) => /* @__PURE__ */ j(t, {
|
|
2889
3234
|
size: e,
|
|
2890
3235
|
"aria-hidden": !0,
|
|
2891
|
-
className:
|
|
2892
|
-
}),
|
|
2893
|
-
className:
|
|
3236
|
+
className: Zi.Icon
|
|
3237
|
+
}), ra = ({ children: e, className: t, style: n }) => /* @__PURE__ */ j("span", {
|
|
3238
|
+
className: $i(Zi.Content, t),
|
|
2894
3239
|
style: n,
|
|
2895
3240
|
children: e
|
|
2896
|
-
}),
|
|
2897
|
-
className:
|
|
3241
|
+
}), ia = ({ children: e }) => /* @__PURE__ */ j("span", {
|
|
3242
|
+
className: Zi.Label,
|
|
2898
3243
|
children: e
|
|
2899
|
-
}),
|
|
2900
|
-
className:
|
|
3244
|
+
}), aa = ({ children: e }) => /* @__PURE__ */ j("span", {
|
|
3245
|
+
className: Zi.Description,
|
|
2901
3246
|
children: e
|
|
2902
3247
|
});
|
|
2903
|
-
function
|
|
2904
|
-
return /* @__PURE__ */
|
|
3248
|
+
function oa({ options: e, columns: t = 1, size: n, children: r, ...i }) {
|
|
3249
|
+
return /* @__PURE__ */ M(Ki, {
|
|
2905
3250
|
...i,
|
|
2906
3251
|
cardSize: n,
|
|
2907
|
-
optionsClassName:
|
|
3252
|
+
optionsClassName: Zi.Options,
|
|
2908
3253
|
optionsStyle: { "--radio-card-columns": t },
|
|
2909
3254
|
optionsDataColumns: t > 1 ? "many" : void 0,
|
|
2910
|
-
children: [e?.map((e) => /* @__PURE__ */
|
|
3255
|
+
children: [e?.map((e) => /* @__PURE__ */ M(ea, {
|
|
2911
3256
|
value: e.value,
|
|
2912
3257
|
disabled: e.disabled,
|
|
2913
|
-
children: [/* @__PURE__ */
|
|
3258
|
+
children: [/* @__PURE__ */ j(ta, {}), e.label]
|
|
2914
3259
|
}, String(e.value))), r]
|
|
2915
3260
|
});
|
|
2916
3261
|
}
|
|
2917
3262
|
//#endregion
|
|
2918
3263
|
//#region src/components/form/select.tsx
|
|
2919
|
-
function
|
|
3264
|
+
function sa({ options: e, value: t, defaultValue: n = "", onValueChange: r, ...i }) {
|
|
2920
3265
|
let a = t !== void 0, [o, s] = g(n), c = a ? t : o, l = e.find((e) => e.value === c);
|
|
2921
|
-
return /* @__PURE__ */
|
|
3266
|
+
return /* @__PURE__ */ j(ci, {
|
|
2922
3267
|
...i,
|
|
2923
3268
|
multiple: !1,
|
|
2924
3269
|
value: l ? l.value : null,
|
|
@@ -2930,10 +3275,10 @@ function Ti({ options: e, value: t, defaultValue: n = "", onValueChange: r, ...i
|
|
|
2930
3275
|
display: l?.label,
|
|
2931
3276
|
displayHidden: !0,
|
|
2932
3277
|
valueText: l?.label ?? "",
|
|
2933
|
-
children: e.map((e) => /* @__PURE__ */
|
|
3278
|
+
children: e.map((e) => /* @__PURE__ */ j(li, { option: e }, e.value))
|
|
2934
3279
|
});
|
|
2935
3280
|
}
|
|
2936
|
-
var
|
|
3281
|
+
var ca = {
|
|
2937
3282
|
Slider: "_Slider_tm1hu_10",
|
|
2938
3283
|
Header: "_Header_tm1hu_21",
|
|
2939
3284
|
Label: "_Label_tm1hu_28",
|
|
@@ -2941,39 +3286,39 @@ var Ei = {
|
|
|
2941
3286
|
};
|
|
2942
3287
|
//#endregion
|
|
2943
3288
|
//#region src/components/form/slider.tsx
|
|
2944
|
-
function
|
|
3289
|
+
function la({ label: e, "aria-label": t, helperText: n, error: r = !1, min: i = 0, max: a = 100, format: o, locale: s, className: c, ...l }) {
|
|
2945
3290
|
let u = f(), d = f();
|
|
2946
|
-
return /* @__PURE__ */
|
|
3291
|
+
return /* @__PURE__ */ j(ne.Root, {
|
|
2947
3292
|
invalid: r,
|
|
2948
3293
|
render: bn,
|
|
2949
|
-
children: /* @__PURE__ */
|
|
3294
|
+
children: /* @__PURE__ */ M(z.Root, {
|
|
2950
3295
|
...l,
|
|
2951
3296
|
min: i,
|
|
2952
3297
|
max: a,
|
|
2953
3298
|
format: o,
|
|
2954
3299
|
locale: s,
|
|
2955
3300
|
"aria-labelledby": e == null ? void 0 : u,
|
|
2956
|
-
className:
|
|
3301
|
+
className: K(ca.Slider, c),
|
|
2957
3302
|
children: [
|
|
2958
|
-
/* @__PURE__ */
|
|
2959
|
-
className:
|
|
2960
|
-
children: [e != null && /* @__PURE__ */
|
|
3303
|
+
/* @__PURE__ */ M("div", {
|
|
3304
|
+
className: ca.Header,
|
|
3305
|
+
children: [e != null && /* @__PURE__ */ j("div", {
|
|
2961
3306
|
id: u,
|
|
2962
|
-
className:
|
|
3307
|
+
className: ca.Label,
|
|
2963
3308
|
children: e
|
|
2964
|
-
}), /* @__PURE__ */
|
|
3309
|
+
}), /* @__PURE__ */ j(z.Value, { className: ca.Value })]
|
|
2965
3310
|
}),
|
|
2966
|
-
/* @__PURE__ */
|
|
3311
|
+
/* @__PURE__ */ j(xn, {
|
|
2967
3312
|
"aria-label": t,
|
|
2968
3313
|
"aria-describedby": n == null ? void 0 : d
|
|
2969
3314
|
}),
|
|
2970
|
-
/* @__PURE__ */
|
|
3315
|
+
/* @__PURE__ */ j(Sn, {
|
|
2971
3316
|
min: i,
|
|
2972
3317
|
max: a,
|
|
2973
3318
|
format: o,
|
|
2974
3319
|
locale: s
|
|
2975
3320
|
}),
|
|
2976
|
-
n != null && /* @__PURE__ */
|
|
3321
|
+
n != null && /* @__PURE__ */ j(Cn, {
|
|
2977
3322
|
id: d,
|
|
2978
3323
|
error: r,
|
|
2979
3324
|
children: n
|
|
@@ -2982,86 +3327,86 @@ function Di({ label: e, "aria-label": t, helperText: n, error: r = !1, min: i =
|
|
|
2982
3327
|
})
|
|
2983
3328
|
});
|
|
2984
3329
|
}
|
|
2985
|
-
var
|
|
3330
|
+
var ua = {
|
|
2986
3331
|
Switch: "_Switch_9c9ji_7",
|
|
2987
3332
|
Thumb: "_Thumb_9c9ji_36"
|
|
2988
3333
|
};
|
|
2989
3334
|
//#endregion
|
|
2990
3335
|
//#region src/components/form/switch.tsx
|
|
2991
|
-
function
|
|
2992
|
-
return /* @__PURE__ */
|
|
3336
|
+
function da({ className: e, ...t }) {
|
|
3337
|
+
return /* @__PURE__ */ j(de.Root, {
|
|
2993
3338
|
...t,
|
|
2994
|
-
className:
|
|
2995
|
-
children: /* @__PURE__ */
|
|
3339
|
+
className: K(ua.Switch, e),
|
|
3340
|
+
children: /* @__PURE__ */ j(de.Thumb, { className: ua.Thumb })
|
|
2996
3341
|
});
|
|
2997
3342
|
}
|
|
2998
|
-
var
|
|
3343
|
+
var fa = {
|
|
2999
3344
|
Grid: "_Grid_kczso_6",
|
|
3000
3345
|
GridItem: "_GridItem_kczso_17"
|
|
3001
|
-
},
|
|
3002
|
-
function
|
|
3346
|
+
}, pa = (e) => typeof e == "object" && !!e;
|
|
3347
|
+
function ma(e, t, n = String) {
|
|
3003
3348
|
if (t === void 0) return {};
|
|
3004
|
-
let r =
|
|
3349
|
+
let r = pa(t) ? Object.entries(t) : [["base", t]], i = {};
|
|
3005
3350
|
for (let [t, a] of r) a !== void 0 && (i[`--_${e}-${t}`] = n(a));
|
|
3006
3351
|
return i;
|
|
3007
3352
|
}
|
|
3008
3353
|
//#endregion
|
|
3009
3354
|
//#region src/components/layout/grid.tsx
|
|
3010
|
-
function
|
|
3011
|
-
return
|
|
3355
|
+
function ha({ columns: e, gap: t, render: n, className: r, style: i, ...a }) {
|
|
3356
|
+
return N({
|
|
3012
3357
|
render: n,
|
|
3013
3358
|
props: {
|
|
3014
3359
|
...a,
|
|
3015
|
-
className:
|
|
3360
|
+
className: K(fa.Grid, r)({}),
|
|
3016
3361
|
style: {
|
|
3017
|
-
...
|
|
3018
|
-
...
|
|
3362
|
+
...ma("columns", e),
|
|
3363
|
+
...ma("gap", t),
|
|
3019
3364
|
...i
|
|
3020
3365
|
}
|
|
3021
3366
|
}
|
|
3022
3367
|
});
|
|
3023
3368
|
}
|
|
3024
|
-
var
|
|
3025
|
-
function
|
|
3026
|
-
return
|
|
3369
|
+
var ga = (e) => e === "full" ? "1 / -1" : `span ${e} / span ${e}`;
|
|
3370
|
+
function _a({ span: e, render: t, className: n, style: r, ...i }) {
|
|
3371
|
+
return N({
|
|
3027
3372
|
render: t,
|
|
3028
3373
|
props: {
|
|
3029
3374
|
...i,
|
|
3030
|
-
className:
|
|
3375
|
+
className: K(fa.GridItem, n)({}),
|
|
3031
3376
|
style: {
|
|
3032
|
-
...
|
|
3377
|
+
...ma("span", e, ga),
|
|
3033
3378
|
...r
|
|
3034
3379
|
}
|
|
3035
3380
|
}
|
|
3036
3381
|
});
|
|
3037
3382
|
}
|
|
3038
|
-
var
|
|
3383
|
+
var va = { Stack: "_Stack_19zb4_6" };
|
|
3039
3384
|
//#endregion
|
|
3040
3385
|
//#region src/components/layout/stack.tsx
|
|
3041
|
-
function
|
|
3042
|
-
return
|
|
3386
|
+
function ya({ direction: e, gap: t, align: n, justify: r, wrap: i = !1, render: a, className: o, style: s, ...c }) {
|
|
3387
|
+
return N({
|
|
3043
3388
|
render: a,
|
|
3044
3389
|
props: {
|
|
3045
3390
|
...c,
|
|
3046
3391
|
"data-align": n,
|
|
3047
3392
|
"data-justify": r,
|
|
3048
3393
|
"data-wrap": i || void 0,
|
|
3049
|
-
className:
|
|
3394
|
+
className: K(va.Stack, o)({}),
|
|
3050
3395
|
style: {
|
|
3051
|
-
...
|
|
3052
|
-
...
|
|
3396
|
+
...ma("direction", e),
|
|
3397
|
+
...ma("gap", t),
|
|
3053
3398
|
...s
|
|
3054
3399
|
}
|
|
3055
3400
|
}
|
|
3056
3401
|
});
|
|
3057
3402
|
}
|
|
3058
|
-
function
|
|
3059
|
-
return /* @__PURE__ */
|
|
3403
|
+
function ba(e) {
|
|
3404
|
+
return /* @__PURE__ */ j(ya, {
|
|
3060
3405
|
...e,
|
|
3061
3406
|
direction: "row"
|
|
3062
3407
|
});
|
|
3063
3408
|
}
|
|
3064
|
-
var
|
|
3409
|
+
var xa = {
|
|
3065
3410
|
Header: "_Header_1p9o4_7",
|
|
3066
3411
|
Lead: "_Lead_1p9o4_15",
|
|
3067
3412
|
Titles: "_Titles_1p9o4_21",
|
|
@@ -3069,12 +3414,12 @@ var zi = {
|
|
|
3069
3414
|
Next: "_Next_1p9o4_42",
|
|
3070
3415
|
Divider: "_Divider_1p9o4_51",
|
|
3071
3416
|
SrOnly: "_SrOnly_1p9o4_58"
|
|
3072
|
-
},
|
|
3417
|
+
}, Sa = {
|
|
3073
3418
|
ProgressCircle: "_ProgressCircle_a7wgh_11",
|
|
3074
3419
|
Svg: "_Svg_a7wgh_23",
|
|
3075
3420
|
Track: "_Track_a7wgh_31",
|
|
3076
3421
|
Value: "_Value_a7wgh_35"
|
|
3077
|
-
},
|
|
3422
|
+
}, Ca = [
|
|
3078
3423
|
.69,
|
|
3079
3424
|
.33,
|
|
3080
3425
|
.61,
|
|
@@ -3085,10 +3430,10 @@ var zi = {
|
|
|
3085
3430
|
.54,
|
|
3086
3431
|
.62,
|
|
3087
3432
|
.64
|
|
3088
|
-
],
|
|
3089
|
-
let n = Array.from(e).reduce((e, t) => e + (t === "/" ?
|
|
3090
|
-
return Math.max(t - 4, 0) / Math.hypot(n,
|
|
3091
|
-
},
|
|
3433
|
+
], wa = .43, Ta = .69, Ea = (e, t) => {
|
|
3434
|
+
let n = Array.from(e).reduce((e, t) => e + (t === "/" ? wa : Ca[Number(t)] ?? .69), 0);
|
|
3435
|
+
return Math.max(t - 4, 0) / Math.hypot(n, Ta);
|
|
3436
|
+
}, Da = ({ value: e, max: a, color: o = "primary", size: s = 48, strokeWidth: c = 4, showValue: l = !0, label: u }) => {
|
|
3092
3437
|
let f = i(), p = (s - c) / 2, m = 2 * Math.PI * p, h = a > 0 ? Math.min(Math.max(e / a, 0), 1) : 0, g = (e) => m * (1 - e), _ = r(g(0));
|
|
3093
3438
|
d(() => {
|
|
3094
3439
|
let e = g(h);
|
|
@@ -3107,8 +3452,8 @@ var zi = {
|
|
|
3107
3452
|
f,
|
|
3108
3453
|
_
|
|
3109
3454
|
]);
|
|
3110
|
-
let v = `${e}/${a}`, y =
|
|
3111
|
-
return /* @__PURE__ */
|
|
3455
|
+
let v = `${e}/${a}`, y = Ea(v, s - 2 * c);
|
|
3456
|
+
return /* @__PURE__ */ M("div", {
|
|
3112
3457
|
...u ? {
|
|
3113
3458
|
role: "progressbar",
|
|
3114
3459
|
"aria-label": u,
|
|
@@ -3116,27 +3461,27 @@ var zi = {
|
|
|
3116
3461
|
"aria-valuemax": a,
|
|
3117
3462
|
"aria-valuenow": e
|
|
3118
3463
|
} : { "aria-hidden": !0 },
|
|
3119
|
-
className:
|
|
3464
|
+
className: Sa.ProgressCircle,
|
|
3120
3465
|
"data-color": o,
|
|
3121
3466
|
style: {
|
|
3122
3467
|
width: s,
|
|
3123
3468
|
height: s,
|
|
3124
3469
|
"--_label-fit": `${y.toFixed(2)}px`
|
|
3125
3470
|
},
|
|
3126
|
-
children: [/* @__PURE__ */
|
|
3127
|
-
className:
|
|
3471
|
+
children: [/* @__PURE__ */ M("svg", {
|
|
3472
|
+
className: Sa.Svg,
|
|
3128
3473
|
width: s,
|
|
3129
3474
|
height: s,
|
|
3130
3475
|
viewBox: `0 0 ${s} ${s}`,
|
|
3131
|
-
children: [/* @__PURE__ */
|
|
3132
|
-
className:
|
|
3476
|
+
children: [/* @__PURE__ */ j("circle", {
|
|
3477
|
+
className: Sa.Track,
|
|
3133
3478
|
cx: s / 2,
|
|
3134
3479
|
cy: s / 2,
|
|
3135
3480
|
r: p,
|
|
3136
3481
|
fill: "none",
|
|
3137
3482
|
stroke: "currentColor",
|
|
3138
3483
|
strokeWidth: c
|
|
3139
|
-
}), /* @__PURE__ */
|
|
3484
|
+
}), /* @__PURE__ */ j(n.circle, {
|
|
3140
3485
|
cx: s / 2,
|
|
3141
3486
|
cy: s / 2,
|
|
3142
3487
|
r: p,
|
|
@@ -3147,12 +3492,12 @@ var zi = {
|
|
|
3147
3492
|
strokeDasharray: m,
|
|
3148
3493
|
style: { strokeDashoffset: _ }
|
|
3149
3494
|
})]
|
|
3150
|
-
}), l && /* @__PURE__ */
|
|
3151
|
-
className:
|
|
3495
|
+
}), l && /* @__PURE__ */ j("span", {
|
|
3496
|
+
className: Sa.Value,
|
|
3152
3497
|
children: v
|
|
3153
3498
|
})]
|
|
3154
3499
|
});
|
|
3155
|
-
},
|
|
3500
|
+
}, Oa = W({
|
|
3156
3501
|
back: {
|
|
3157
3502
|
no: "Tilbake",
|
|
3158
3503
|
se: "Tillbaka",
|
|
@@ -3177,34 +3522,34 @@ var zi = {
|
|
|
3177
3522
|
fi: "/",
|
|
3178
3523
|
es: "de"
|
|
3179
3524
|
}
|
|
3180
|
-
}),
|
|
3525
|
+
}), ka = ({ currentStep: e, totalSteps: t, title: n, nextStep: r, onBack: i, color: a = "primary", titleAs: o = "heading", headingLevel: s = "h1", titleId: c, labels: l, showDivider: u = !0 }) => {
|
|
3181
3526
|
let d = {
|
|
3182
|
-
...
|
|
3527
|
+
...Oa(),
|
|
3183
3528
|
...l
|
|
3184
3529
|
}, p = f(), m = c ?? p, h = o === "heading" ? s : "p", g = `, ${d.step} ${e} ${d.of} ${t}`;
|
|
3185
|
-
return /* @__PURE__ */
|
|
3186
|
-
className:
|
|
3187
|
-
children: [/* @__PURE__ */
|
|
3188
|
-
className:
|
|
3189
|
-
children: [i && /* @__PURE__ */
|
|
3530
|
+
return /* @__PURE__ */ M(A, { children: [/* @__PURE__ */ M("div", {
|
|
3531
|
+
className: xa.Header,
|
|
3532
|
+
children: [/* @__PURE__ */ M("div", {
|
|
3533
|
+
className: xa.Lead,
|
|
3534
|
+
children: [i && /* @__PURE__ */ j(tt, {
|
|
3190
3535
|
"aria-label": d.back,
|
|
3191
3536
|
onClick: i,
|
|
3192
3537
|
variant: "outline",
|
|
3193
3538
|
color: "secondary",
|
|
3194
|
-
children: /* @__PURE__ */
|
|
3195
|
-
}), /* @__PURE__ */
|
|
3196
|
-
className:
|
|
3197
|
-
children: [/* @__PURE__ */
|
|
3539
|
+
children: /* @__PURE__ */ j(_, { "aria-hidden": !0 })
|
|
3540
|
+
}), /* @__PURE__ */ M("div", {
|
|
3541
|
+
className: xa.Titles,
|
|
3542
|
+
children: [/* @__PURE__ */ M(h, {
|
|
3198
3543
|
id: m,
|
|
3199
3544
|
tabIndex: -1,
|
|
3200
|
-
className:
|
|
3545
|
+
className: xa.Title,
|
|
3201
3546
|
"data-title-as": o,
|
|
3202
|
-
children: [n, /* @__PURE__ */
|
|
3203
|
-
className:
|
|
3547
|
+
children: [n, /* @__PURE__ */ j("span", {
|
|
3548
|
+
className: xa.SrOnly,
|
|
3204
3549
|
children: g
|
|
3205
3550
|
})]
|
|
3206
|
-
}), r != null && /* @__PURE__ */
|
|
3207
|
-
className:
|
|
3551
|
+
}), r != null && /* @__PURE__ */ M("p", {
|
|
3552
|
+
className: xa.Next,
|
|
3208
3553
|
children: [
|
|
3209
3554
|
d.next,
|
|
3210
3555
|
": ",
|
|
@@ -3212,13 +3557,13 @@ var zi = {
|
|
|
3212
3557
|
]
|
|
3213
3558
|
})]
|
|
3214
3559
|
})]
|
|
3215
|
-
}), /* @__PURE__ */
|
|
3560
|
+
}), /* @__PURE__ */ j(Da, {
|
|
3216
3561
|
value: e,
|
|
3217
3562
|
max: t,
|
|
3218
3563
|
color: a
|
|
3219
3564
|
})]
|
|
3220
|
-
}), u && /* @__PURE__ */
|
|
3221
|
-
},
|
|
3565
|
+
}), u && /* @__PURE__ */ j("hr", { className: xa.Divider })] });
|
|
3566
|
+
}, Aa = {
|
|
3222
3567
|
LinearFormStepper: "_LinearFormStepper_160tf_7",
|
|
3223
3568
|
Progress: "_Progress_160tf_22",
|
|
3224
3569
|
Track: "_Track_160tf_26",
|
|
@@ -3227,54 +3572,54 @@ var zi = {
|
|
|
3227
3572
|
Title: "_Title_160tf_47",
|
|
3228
3573
|
TitleText: "_TitleText_160tf_57",
|
|
3229
3574
|
"stepper-title-in": "_stepper-title-in_160tf_1"
|
|
3230
|
-
},
|
|
3575
|
+
}, ja = ({ currentStep: e, totalSteps: t, title: n, onBack: r, color: i = "primary", headingLevel: a = "h1", titleId: o, labels: s }) => {
|
|
3231
3576
|
let c = {
|
|
3232
|
-
...
|
|
3577
|
+
...Oa(),
|
|
3233
3578
|
...s
|
|
3234
3579
|
}, l = f(), u = o ?? l;
|
|
3235
|
-
return /* @__PURE__ */
|
|
3236
|
-
className:
|
|
3580
|
+
return /* @__PURE__ */ M("div", {
|
|
3581
|
+
className: Aa.LinearFormStepper,
|
|
3237
3582
|
"data-color": i,
|
|
3238
|
-
children: [/* @__PURE__ */
|
|
3239
|
-
className:
|
|
3583
|
+
children: [/* @__PURE__ */ j(fe.Root, {
|
|
3584
|
+
className: Aa.Progress,
|
|
3240
3585
|
value: e,
|
|
3241
3586
|
max: t,
|
|
3242
3587
|
"aria-labelledby": u,
|
|
3243
3588
|
getAriaValueText: () => `${c.step} ${e} ${c.of} ${t}`,
|
|
3244
|
-
children: /* @__PURE__ */
|
|
3245
|
-
className:
|
|
3246
|
-
children: /* @__PURE__ */
|
|
3589
|
+
children: /* @__PURE__ */ j(fe.Track, {
|
|
3590
|
+
className: Aa.Track,
|
|
3591
|
+
children: /* @__PURE__ */ j(fe.Indicator, { className: Aa.Indicator })
|
|
3247
3592
|
})
|
|
3248
|
-
}), /* @__PURE__ */
|
|
3249
|
-
className:
|
|
3250
|
-
children: [r && /* @__PURE__ */
|
|
3593
|
+
}), /* @__PURE__ */ M("div", {
|
|
3594
|
+
className: Aa.Header,
|
|
3595
|
+
children: [r && /* @__PURE__ */ j(tt, {
|
|
3251
3596
|
"aria-label": c.back,
|
|
3252
3597
|
onClick: r,
|
|
3253
3598
|
variant: "outline",
|
|
3254
3599
|
color: "secondary",
|
|
3255
|
-
children: /* @__PURE__ */
|
|
3256
|
-
}), /* @__PURE__ */
|
|
3600
|
+
children: /* @__PURE__ */ j(_, { "aria-hidden": !0 })
|
|
3601
|
+
}), /* @__PURE__ */ j(a, {
|
|
3257
3602
|
id: u,
|
|
3258
3603
|
tabIndex: -1,
|
|
3259
|
-
className:
|
|
3260
|
-
children: /* @__PURE__ */
|
|
3261
|
-
className:
|
|
3604
|
+
className: Aa.Title,
|
|
3605
|
+
children: /* @__PURE__ */ j("span", {
|
|
3606
|
+
className: Aa.TitleText,
|
|
3262
3607
|
children: n
|
|
3263
3608
|
}, e)
|
|
3264
3609
|
})]
|
|
3265
3610
|
})]
|
|
3266
3611
|
});
|
|
3267
|
-
},
|
|
3612
|
+
}, Ma = s(null), Na = s(null), Pa = ({ children: e, initialProgress: t }) => {
|
|
3268
3613
|
let [n, r] = g(t ?? null);
|
|
3269
|
-
return /* @__PURE__ */
|
|
3614
|
+
return /* @__PURE__ */ j(Na.Provider, {
|
|
3270
3615
|
value: r,
|
|
3271
|
-
children: /* @__PURE__ */
|
|
3616
|
+
children: /* @__PURE__ */ j(Ma.Provider, {
|
|
3272
3617
|
value: n,
|
|
3273
3618
|
children: e
|
|
3274
3619
|
})
|
|
3275
3620
|
});
|
|
3276
|
-
},
|
|
3277
|
-
let t = u(
|
|
3621
|
+
}, Fa = () => u(Ma), Ia = (e) => {
|
|
3622
|
+
let t = u(Na), n = e?.currentStep, r = e?.totalSteps, i = e?.title;
|
|
3278
3623
|
d(() => {
|
|
3279
3624
|
!t || n === void 0 || r === void 0 || i === void 0 || t({
|
|
3280
3625
|
currentStep: n,
|
|
@@ -3287,58 +3632,58 @@ var zi = {
|
|
|
3287
3632
|
r,
|
|
3288
3633
|
i
|
|
3289
3634
|
]);
|
|
3290
|
-
},
|
|
3291
|
-
let t =
|
|
3292
|
-
return t ? /* @__PURE__ */
|
|
3635
|
+
}, La = (e) => {
|
|
3636
|
+
let t = Fa();
|
|
3637
|
+
return t ? /* @__PURE__ */ j(ja, {
|
|
3293
3638
|
...e,
|
|
3294
3639
|
...t
|
|
3295
3640
|
}) : null;
|
|
3296
|
-
},
|
|
3641
|
+
}, Ra = {
|
|
3297
3642
|
Tabs: "_Tabs_y4jai_7",
|
|
3298
3643
|
List: "_List_y4jai_28",
|
|
3299
3644
|
Tab: "_Tab_y4jai_7",
|
|
3300
3645
|
Panel: "_Panel_y4jai_95",
|
|
3301
3646
|
Indicator: "_Indicator_y4jai_104"
|
|
3302
|
-
},
|
|
3303
|
-
Indicator: () =>
|
|
3304
|
-
List: () =>
|
|
3305
|
-
Panel: () =>
|
|
3306
|
-
Root: () =>
|
|
3307
|
-
Tab: () =>
|
|
3647
|
+
}, za = /* @__PURE__ */ ge({
|
|
3648
|
+
Indicator: () => Ua,
|
|
3649
|
+
List: () => Va,
|
|
3650
|
+
Panel: () => Wa,
|
|
3651
|
+
Root: () => Ba,
|
|
3652
|
+
Tab: () => Ha
|
|
3308
3653
|
});
|
|
3309
|
-
function
|
|
3310
|
-
return /* @__PURE__ */
|
|
3654
|
+
function Ba({ color: e = "primary", className: t, ...n }) {
|
|
3655
|
+
return /* @__PURE__ */ j(pe.Root, {
|
|
3311
3656
|
...n,
|
|
3312
3657
|
"data-color": e,
|
|
3313
|
-
className:
|
|
3658
|
+
className: K(Ra.Tabs, t)
|
|
3314
3659
|
});
|
|
3315
3660
|
}
|
|
3316
|
-
function
|
|
3317
|
-
return /* @__PURE__ */
|
|
3661
|
+
function Va({ children: e, className: t, ...n }) {
|
|
3662
|
+
return /* @__PURE__ */ M(pe.List, {
|
|
3318
3663
|
...n,
|
|
3319
|
-
className:
|
|
3320
|
-
children: [e, /* @__PURE__ */
|
|
3664
|
+
className: K(Ra.List, t),
|
|
3665
|
+
children: [e, /* @__PURE__ */ j(Ua, {})]
|
|
3321
3666
|
});
|
|
3322
3667
|
}
|
|
3323
|
-
function
|
|
3324
|
-
return /* @__PURE__ */
|
|
3668
|
+
function Ha({ className: e, ...t }) {
|
|
3669
|
+
return /* @__PURE__ */ j(pe.Tab, {
|
|
3325
3670
|
...t,
|
|
3326
|
-
className:
|
|
3671
|
+
className: K(Ra.Tab, e)
|
|
3327
3672
|
});
|
|
3328
3673
|
}
|
|
3329
|
-
function
|
|
3330
|
-
return /* @__PURE__ */
|
|
3674
|
+
function Ua({ className: e, ...t }) {
|
|
3675
|
+
return /* @__PURE__ */ j(pe.Indicator, {
|
|
3331
3676
|
...t,
|
|
3332
|
-
className:
|
|
3677
|
+
className: K(Ra.Indicator, e)
|
|
3333
3678
|
});
|
|
3334
3679
|
}
|
|
3335
|
-
function
|
|
3336
|
-
return /* @__PURE__ */
|
|
3680
|
+
function Wa({ className: e, ...t }) {
|
|
3681
|
+
return /* @__PURE__ */ j(pe.Panel, {
|
|
3337
3682
|
...t,
|
|
3338
|
-
className:
|
|
3683
|
+
className: K(Ra.Panel, e)
|
|
3339
3684
|
});
|
|
3340
3685
|
}
|
|
3341
|
-
var
|
|
3686
|
+
var Ga = {
|
|
3342
3687
|
Root: "_Root_18gqk_13",
|
|
3343
3688
|
Item: "_Item_18gqk_10",
|
|
3344
3689
|
Header: "_Header_18gqk_10",
|
|
@@ -3347,212 +3692,132 @@ var la = {
|
|
|
3347
3692
|
Icon: "_Icon_18gqk_140",
|
|
3348
3693
|
Panel: "_Panel_18gqk_158",
|
|
3349
3694
|
Content: "_Content_18gqk_169"
|
|
3350
|
-
},
|
|
3351
|
-
Header: () =>
|
|
3352
|
-
Item: () =>
|
|
3353
|
-
Panel: () =>
|
|
3354
|
-
Root: () =>
|
|
3355
|
-
Trigger: () =>
|
|
3695
|
+
}, Ka = /* @__PURE__ */ ge({
|
|
3696
|
+
Header: () => Ya,
|
|
3697
|
+
Item: () => Ja,
|
|
3698
|
+
Panel: () => Za,
|
|
3699
|
+
Root: () => qa,
|
|
3700
|
+
Trigger: () => Xa
|
|
3356
3701
|
});
|
|
3357
|
-
function
|
|
3358
|
-
return /* @__PURE__ */
|
|
3702
|
+
function qa({ variant: e = "outline", iconPosition: t = "end", className: n, ...r }) {
|
|
3703
|
+
return /* @__PURE__ */ j(me.Root, {
|
|
3359
3704
|
...r,
|
|
3360
3705
|
"data-variant": e,
|
|
3361
3706
|
"data-icon-position": t,
|
|
3362
|
-
className:
|
|
3707
|
+
className: K(Ga.Root, n)
|
|
3363
3708
|
});
|
|
3364
3709
|
}
|
|
3365
|
-
function
|
|
3366
|
-
return /* @__PURE__ */
|
|
3710
|
+
function Ja({ className: e, ...t }) {
|
|
3711
|
+
return /* @__PURE__ */ j(me.Item, {
|
|
3367
3712
|
...t,
|
|
3368
|
-
className:
|
|
3713
|
+
className: K(Ga.Item, e)
|
|
3369
3714
|
});
|
|
3370
3715
|
}
|
|
3371
|
-
function
|
|
3372
|
-
return /* @__PURE__ */
|
|
3716
|
+
function Ya({ className: e, ...t }) {
|
|
3717
|
+
return /* @__PURE__ */ j(me.Header, {
|
|
3373
3718
|
...t,
|
|
3374
|
-
className:
|
|
3719
|
+
className: K(Ga.Header, e)
|
|
3375
3720
|
});
|
|
3376
3721
|
}
|
|
3377
|
-
function
|
|
3378
|
-
return /* @__PURE__ */
|
|
3722
|
+
function Xa({ children: e, className: t, ...n }) {
|
|
3723
|
+
return /* @__PURE__ */ M(me.Trigger, {
|
|
3379
3724
|
...n,
|
|
3380
|
-
className:
|
|
3381
|
-
children: [/* @__PURE__ */
|
|
3382
|
-
className:
|
|
3725
|
+
className: K(Ga.Trigger, t),
|
|
3726
|
+
children: [/* @__PURE__ */ j("span", {
|
|
3727
|
+
className: Ga.Label,
|
|
3383
3728
|
children: e
|
|
3384
|
-
}), /* @__PURE__ */
|
|
3385
|
-
className:
|
|
3729
|
+
}), /* @__PURE__ */ j(b, {
|
|
3730
|
+
className: Ga.Icon,
|
|
3386
3731
|
size: 20,
|
|
3387
3732
|
"aria-hidden": !0
|
|
3388
3733
|
})]
|
|
3389
3734
|
});
|
|
3390
3735
|
}
|
|
3391
|
-
function
|
|
3392
|
-
return /* @__PURE__ */
|
|
3736
|
+
function Za({ children: e, className: t, ...n }) {
|
|
3737
|
+
return /* @__PURE__ */ j(me.Panel, {
|
|
3393
3738
|
...n,
|
|
3394
|
-
className:
|
|
3395
|
-
children: /* @__PURE__ */
|
|
3396
|
-
className:
|
|
3739
|
+
className: K(Ga.Panel, t),
|
|
3740
|
+
children: /* @__PURE__ */ j("div", {
|
|
3741
|
+
className: Ga.Content,
|
|
3397
3742
|
children: e
|
|
3398
3743
|
})
|
|
3399
3744
|
});
|
|
3400
3745
|
}
|
|
3401
3746
|
//#endregion
|
|
3402
3747
|
//#region src/components/surfaces/simple-accordion.tsx
|
|
3403
|
-
function
|
|
3748
|
+
function Qa({ items: e, title: t, content: n, action: r, ...i }) {
|
|
3404
3749
|
let a = e ?? [{
|
|
3405
3750
|
title: t,
|
|
3406
3751
|
content: n,
|
|
3407
3752
|
action: r
|
|
3408
3753
|
}];
|
|
3409
|
-
return /* @__PURE__ */
|
|
3754
|
+
return /* @__PURE__ */ j(qa, {
|
|
3410
3755
|
...i,
|
|
3411
3756
|
children: a.map((e, t) => {
|
|
3412
3757
|
let n = e.value ?? String(t);
|
|
3413
|
-
return /* @__PURE__ */
|
|
3758
|
+
return /* @__PURE__ */ M(Ja, {
|
|
3414
3759
|
value: n,
|
|
3415
3760
|
disabled: e.disabled,
|
|
3416
|
-
children: [/* @__PURE__ */
|
|
3761
|
+
children: [/* @__PURE__ */ M(Ya, { children: [/* @__PURE__ */ j(Xa, { children: e.title }), e.action] }), /* @__PURE__ */ j(Za, { children: e.content })]
|
|
3417
3762
|
}, n);
|
|
3418
3763
|
})
|
|
3419
3764
|
});
|
|
3420
3765
|
}
|
|
3421
|
-
var
|
|
3422
|
-
//#endregion
|
|
3423
|
-
//#region src/components/typography/link.tsx
|
|
3424
|
-
function va({ color: e = "secondary", render: t, ref: n, className: r, ...i }) {
|
|
3425
|
-
return A({
|
|
3426
|
-
render: t,
|
|
3427
|
-
ref: n,
|
|
3428
|
-
defaultTagName: "a",
|
|
3429
|
-
props: {
|
|
3430
|
-
...i,
|
|
3431
|
-
"data-color": e,
|
|
3432
|
-
className: H(_a.Link, r)({})
|
|
3433
|
-
}
|
|
3434
|
-
});
|
|
3435
|
-
}
|
|
3436
|
-
var ya = {
|
|
3437
|
-
Root: "_Root_1vl2r_9",
|
|
3438
|
-
Item: "_Item_1vl2r_19",
|
|
3439
|
-
Marker: "_Marker_1vl2r_28",
|
|
3440
|
-
Content: "_Content_1vl2r_60"
|
|
3441
|
-
}, ba = /* @__PURE__ */ be({
|
|
3442
|
-
Item: () => Ta,
|
|
3443
|
-
Root: () => wa
|
|
3444
|
-
}), xa = s(null), Sa = () => {
|
|
3445
|
-
let e = u(xa);
|
|
3446
|
-
if (!e) throw Error("List parts must be used within <List.Root>");
|
|
3447
|
-
return e;
|
|
3448
|
-
}, Ca = (...e) => e.filter(Boolean).join(" "), wa = ({ variant: e = "ul", gap: t = 1.5, className: n, style: r, children: i, ...a }) => {
|
|
3449
|
-
let o = e;
|
|
3450
|
-
return /* @__PURE__ */ O(xa.Provider, {
|
|
3451
|
-
value: { variant: e },
|
|
3452
|
-
children: /* @__PURE__ */ O(o, {
|
|
3453
|
-
...a,
|
|
3454
|
-
className: Ca(ya.Root, n),
|
|
3455
|
-
style: {
|
|
3456
|
-
"--_gap": t,
|
|
3457
|
-
...r
|
|
3458
|
-
},
|
|
3459
|
-
children: i
|
|
3460
|
-
})
|
|
3461
|
-
});
|
|
3462
|
-
}, Ta = ({ icon: e, gap: t = 1.5, className: n, style: r, children: i, ...a }) => {
|
|
3463
|
-
let { variant: o } = Sa(), s = e ? "icon" : o === "ol" ? "number" : "dot";
|
|
3464
|
-
return /* @__PURE__ */ k("li", {
|
|
3465
|
-
...a,
|
|
3466
|
-
className: Ca(ya.Item, n),
|
|
3467
|
-
style: {
|
|
3468
|
-
"--_gap": e ? t : 0,
|
|
3469
|
-
...r
|
|
3470
|
-
},
|
|
3471
|
-
children: [/* @__PURE__ */ O("span", {
|
|
3472
|
-
className: ya.Marker,
|
|
3473
|
-
"data-marker": s,
|
|
3474
|
-
children: e
|
|
3475
|
-
}), /* @__PURE__ */ O("div", {
|
|
3476
|
-
className: ya.Content,
|
|
3477
|
-
children: typeof i == "string" ? /* @__PURE__ */ O(gt, { children: i }) : i
|
|
3478
|
-
})]
|
|
3479
|
-
});
|
|
3480
|
-
}, Ea = { BrandDivider: "_BrandDivider_10exs_6" }, Da = ({ size: e = "sm" }) => /* @__PURE__ */ O("div", {
|
|
3766
|
+
var $a = { BrandDivider: "_BrandDivider_10exs_6" }, eo = ({ size: e = "sm" }) => /* @__PURE__ */ j("div", {
|
|
3481
3767
|
"aria-hidden": "true",
|
|
3482
|
-
className:
|
|
3768
|
+
className: $a.BrandDivider,
|
|
3483
3769
|
"data-size": e
|
|
3484
|
-
}),
|
|
3770
|
+
}), to = {
|
|
3485
3771
|
AppHeader: "_AppHeader_1s0uj_1",
|
|
3486
3772
|
AppHeaderContent: "_AppHeaderContent_1s0uj_11",
|
|
3487
3773
|
AppHeaderLogo: "_AppHeaderLogo_1s0uj_28",
|
|
3488
3774
|
AppHeaderActions: "_AppHeaderActions_1s0uj_33"
|
|
3489
|
-
},
|
|
3775
|
+
}, no = ({ brandDivider: e = !0, fluid: t = !1, children: n, logo: r, className: i }) => {
|
|
3490
3776
|
let o = a.toArray(n).length > 0;
|
|
3491
|
-
return /* @__PURE__ */
|
|
3492
|
-
className: [
|
|
3777
|
+
return /* @__PURE__ */ M("header", {
|
|
3778
|
+
className: [to.AppHeader, i].filter(Boolean).join(" "),
|
|
3493
3779
|
"data-brand-divider": e || void 0,
|
|
3494
3780
|
"data-has-children": o || void 0,
|
|
3495
|
-
children: [/* @__PURE__ */
|
|
3496
|
-
className:
|
|
3781
|
+
children: [/* @__PURE__ */ M(mn, {
|
|
3782
|
+
className: to.AppHeaderContent,
|
|
3497
3783
|
"data-fluid": t || void 0,
|
|
3498
|
-
children: [/* @__PURE__ */
|
|
3499
|
-
className:
|
|
3500
|
-
children: r || /* @__PURE__ */
|
|
3784
|
+
children: [/* @__PURE__ */ j("div", {
|
|
3785
|
+
className: to.AppHeaderLogo,
|
|
3786
|
+
children: r || /* @__PURE__ */ j("img", {
|
|
3501
3787
|
src: "/leabank-logo.png",
|
|
3502
3788
|
alt: "Logo",
|
|
3503
3789
|
width: 100
|
|
3504
3790
|
})
|
|
3505
|
-
}), o && /* @__PURE__ */
|
|
3506
|
-
className:
|
|
3791
|
+
}), o && /* @__PURE__ */ j("div", {
|
|
3792
|
+
className: to.AppHeaderActions,
|
|
3507
3793
|
children: n
|
|
3508
3794
|
})]
|
|
3509
|
-
}), e && /* @__PURE__ */
|
|
3795
|
+
}), e && /* @__PURE__ */ j(eo, { size: "sm" })]
|
|
3510
3796
|
});
|
|
3511
|
-
},
|
|
3512
|
-
|
|
3513
|
-
country: "NO",
|
|
3514
|
-
locale: "nb-NO",
|
|
3515
|
-
currency: "NOK"
|
|
3516
|
-
},
|
|
3517
|
-
SE: {
|
|
3518
|
-
country: "SE",
|
|
3519
|
-
locale: "sv-SE",
|
|
3520
|
-
currency: "SEK"
|
|
3521
|
-
},
|
|
3522
|
-
FI: {
|
|
3523
|
-
country: "FI",
|
|
3524
|
-
locale: "fi-FI",
|
|
3525
|
-
currency: "EUR"
|
|
3526
|
-
},
|
|
3527
|
-
ES: {
|
|
3528
|
-
country: "ES",
|
|
3529
|
-
locale: "es-ES",
|
|
3530
|
-
currency: "EUR"
|
|
3531
|
-
}
|
|
3532
|
-
}, ja = s(null);
|
|
3533
|
-
function Ma({ country: e, children: t }) {
|
|
3797
|
+
}, ro = s(null);
|
|
3798
|
+
function io({ country: e, children: t }) {
|
|
3534
3799
|
let n = m(() => {
|
|
3535
|
-
let t =
|
|
3800
|
+
let t = mi[e];
|
|
3536
3801
|
return {
|
|
3537
3802
|
country: t.country,
|
|
3538
3803
|
locale: t.locale,
|
|
3539
3804
|
currency: t.currency
|
|
3540
3805
|
};
|
|
3541
3806
|
}, [e]);
|
|
3542
|
-
return /* @__PURE__ */
|
|
3807
|
+
return /* @__PURE__ */ j(ro.Provider, {
|
|
3543
3808
|
value: n,
|
|
3544
3809
|
children: t
|
|
3545
3810
|
});
|
|
3546
3811
|
}
|
|
3547
|
-
function
|
|
3548
|
-
let e = u(
|
|
3812
|
+
function ao() {
|
|
3813
|
+
let e = u(ro);
|
|
3549
3814
|
if (!e) throw Error("Country hooks must be used within a <CountryProvider>.");
|
|
3550
3815
|
return e;
|
|
3551
3816
|
}
|
|
3552
3817
|
//#endregion
|
|
3553
3818
|
//#region src/hooks/use-format-currency.ts
|
|
3554
|
-
function
|
|
3555
|
-
let { locale: e, currency: t } =
|
|
3819
|
+
function oo() {
|
|
3820
|
+
let { locale: e, currency: t } = ao(), n = m(() => new Intl.NumberFormat(e, {
|
|
3556
3821
|
style: "currency",
|
|
3557
3822
|
currency: t
|
|
3558
3823
|
}), [e, t]);
|
|
@@ -3571,29 +3836,29 @@ function Pa() {
|
|
|
3571
3836
|
}
|
|
3572
3837
|
//#endregion
|
|
3573
3838
|
//#region src/hooks/use-format-date.ts
|
|
3574
|
-
var
|
|
3839
|
+
var so = {
|
|
3575
3840
|
year: "numeric",
|
|
3576
3841
|
month: "short",
|
|
3577
3842
|
day: "numeric"
|
|
3578
3843
|
};
|
|
3579
|
-
function
|
|
3844
|
+
function co(e) {
|
|
3580
3845
|
return e instanceof Date ? e : new Date(e);
|
|
3581
3846
|
}
|
|
3582
|
-
function
|
|
3583
|
-
let { locale: e } =
|
|
3847
|
+
function lo() {
|
|
3848
|
+
let { locale: e } = ao(), t = m(() => new Intl.DateTimeFormat(e, so), [e]);
|
|
3584
3849
|
return l((n, r) => {
|
|
3585
|
-
let i =
|
|
3850
|
+
let i = co(n);
|
|
3586
3851
|
return r ? new Intl.DateTimeFormat(e, r).format(i) : t.format(i);
|
|
3587
3852
|
}, [t, e]);
|
|
3588
3853
|
}
|
|
3589
3854
|
//#endregion
|
|
3590
3855
|
//#region src/hooks/use-format-number.ts
|
|
3591
|
-
function
|
|
3592
|
-
let { locale: e } =
|
|
3856
|
+
function uo() {
|
|
3857
|
+
let { locale: e } = ao(), t = m(() => new Intl.NumberFormat(e), [e]);
|
|
3593
3858
|
return l((n, r) => r ? new Intl.NumberFormat(e, r).format(n) : t.format(n), [t, e]);
|
|
3594
3859
|
}
|
|
3595
|
-
function
|
|
3596
|
-
let { locale: e } =
|
|
3860
|
+
function fo() {
|
|
3861
|
+
let { locale: e } = ao(), t = m(() => new Intl.NumberFormat(e, {
|
|
3597
3862
|
style: "percent",
|
|
3598
3863
|
minimumFractionDigits: 2,
|
|
3599
3864
|
maximumFractionDigits: 2
|
|
@@ -3605,53 +3870,53 @@ function za() {
|
|
|
3605
3870
|
}
|
|
3606
3871
|
//#endregion
|
|
3607
3872
|
//#region src/hooks/validation/use-validation.ts
|
|
3608
|
-
function
|
|
3609
|
-
let { country: e } =
|
|
3873
|
+
function po() {
|
|
3874
|
+
let { country: e } = ao(), t = l((t) => ir(e, t), [e]), n = l((t) => ar(e, t), [e]);
|
|
3610
3875
|
return Object.assign(t, { validate: n });
|
|
3611
3876
|
}
|
|
3612
|
-
function
|
|
3613
|
-
let { country: e } =
|
|
3877
|
+
function mo() {
|
|
3878
|
+
let { country: e } = ao(), t = l((t) => pr(e, t), [e]), n = l((t) => fr(e, t), [e]);
|
|
3614
3879
|
return Object.assign(t, { validate: n });
|
|
3615
3880
|
}
|
|
3616
|
-
function
|
|
3617
|
-
let { country: e } =
|
|
3881
|
+
function ho() {
|
|
3882
|
+
let { country: e } = ao(), t = l((t) => Dr(e, t), [e]), n = l((t) => Er(e, t), [e]);
|
|
3618
3883
|
return Object.assign(t, { validate: n });
|
|
3619
3884
|
}
|
|
3620
3885
|
//#endregion
|
|
3621
3886
|
//#region src/provider/lea-provider.tsx
|
|
3622
|
-
function
|
|
3623
|
-
return /* @__PURE__ */
|
|
3887
|
+
function go({ language: e = "no", children: t }) {
|
|
3888
|
+
return /* @__PURE__ */ j(we.Provider, {
|
|
3624
3889
|
value: e,
|
|
3625
3890
|
children: t
|
|
3626
3891
|
});
|
|
3627
3892
|
}
|
|
3628
3893
|
//#endregion
|
|
3629
3894
|
//#region src/theme/tokens/breakpoints.ts
|
|
3630
|
-
var
|
|
3895
|
+
var _o = {
|
|
3631
3896
|
xs: 0,
|
|
3632
3897
|
sm: 600,
|
|
3633
3898
|
md: 900,
|
|
3634
3899
|
lg: 1200,
|
|
3635
3900
|
xl: 1536
|
|
3636
|
-
},
|
|
3901
|
+
}, vo = ({ value: e, decimalPlaces: t = 2 }) => Number(Math.round(parseFloat(e + "e" + t)) + "e-" + t), yo = ({ value: e, decimalPlaces: t = 2 }) => vo({
|
|
3637
3902
|
value: e,
|
|
3638
3903
|
decimalPlaces: t
|
|
3639
|
-
}).toFixed(t),
|
|
3904
|
+
}).toFixed(t), bo = ({ value: e, decimalPlaces: t = 2 }) => vo({
|
|
3640
3905
|
value: e,
|
|
3641
3906
|
decimalPlaces: t
|
|
3642
|
-
}) % 1 == 0 ?
|
|
3907
|
+
}) % 1 == 0 ? yo({
|
|
3643
3908
|
value: e,
|
|
3644
3909
|
decimalPlaces: 0
|
|
3645
|
-
}).replace(".", ",") :
|
|
3910
|
+
}).replace(".", ",") : yo({
|
|
3646
3911
|
value: e,
|
|
3647
3912
|
decimalPlaces: t
|
|
3648
|
-
}).replace(".", ","),
|
|
3913
|
+
}).replace(".", ","), xo = (e, t = 2) => bo({
|
|
3649
3914
|
value: e,
|
|
3650
3915
|
decimalPlaces: t
|
|
3651
3916
|
}) + "%";
|
|
3652
3917
|
//#endregion
|
|
3653
3918
|
//#region src/utils/parseExpirationDate.ts
|
|
3654
|
-
function
|
|
3919
|
+
function So(e) {
|
|
3655
3920
|
let t = e.match(/^([0-9]{2})([0-9]{2})$/);
|
|
3656
3921
|
return t ? {
|
|
3657
3922
|
month: t[1],
|
|
@@ -3662,6 +3927,6 @@ function Ya(e) {
|
|
|
3662
3927
|
};
|
|
3663
3928
|
}
|
|
3664
3929
|
//#endregion
|
|
3665
|
-
export {
|
|
3930
|
+
export { Ka as Accordion, Qe as ActionButton, Nt as Alert, Pt as AlertTitle, wn as AmountSlider, no as AppHeader, zn as Autocomplete, eo as BrandDivider, $e as Button, Pr as COMMON_EMAIL_DOMAINS, mi as COUNTRIES, _t as Card, vt as CardContent, Ve as CheckAnimation, Gn as Checkbox, xt as Chip, nt as CloseButton, mn as Container, io as CountryProvider, Ce as DEFAULT_LANGUAGE, ht as DataField, It as Dialog, ot as DownloadTrigger, Zt as Drawer, ei as EmailInput, ka as FormStepper, hn as GlobalAlert, ha as Grid, _a as GridItem, ba as HStack, tt as IconButton, ai as Input, Se as LANGUAGES, we as LanguageContext, go as LeaProvider, ja as LinearFormStepper, Gr as Link, qr as List, pi as MultiSelect, or as NATIONAL_ID_LENGTH, bi as NumberInput, Si as PINNED_COUNTRIES, Li as PhoneNumberInput, Da as ProgressCircle, Ue as PulseAnimation, Qi as RadioCard, qi as RadioGroup, sa as Select, Qa as SimpleAccordion, gn as SimpleDialog, _n as SimpleDrawer, ct as SkipLink, la as Slider, ya as Stack, Ge as StatusAnimation, Oe as StatusIcon, La as StepProgressHeader, Pa as StepProgressProvider, da as Switch, za as Tabs, ft as Text, Ot as Tooltip, _o as breakpoints, W as createTranslation, it as downloadFile, vo as fixDecimals, yo as fixDecimalsToString, Ci as flagEmoji, bo as formatDecimalString, xo as formatPercentage, wi as getCountryOptions, Lr as getEmailDomainSuggestions, X as invalid, hr as isMobileCountry, Rr as isSameEmail, ur as isSameNationalId, _r as isSamePhone, Dr as isValidBankAccount, Ir as isValidEmail, kr as isValidFinnishDomesticReference, Yn as isValidFinnishNationalId, Mr as isValidFinnishReference, Ar as isValidFinnishRfReference, Sr as isValidIban, ir as isValidNationalId, wr as isValidNorwegianAccount, $n as isValidNorwegianNationalId, pr as isValidPhoneNumber, nr as isValidSpanishNationalId, Tr as isValidSwedishAccount, qn as isValidSwedishNationalId, lr as normalizeNationalId, So as parseExpirationDate, rt as resolveDownloadData, Ur as suggestEmailCorrection, ao as useCountry, oo as useFormatCurrency, lo as useFormatDate, uo as useFormatNumber, fo as useFormatPercentage, Te as useLanguage, Ia as useReportStepProgress, Fa as useStepProgress, Oa as useStepperLabels, ho as useValidateBankAccount, po as useValidateNationalId, mo as useValidatePhoneNumber, Z as valid, Er as validateBankAccount, Fr as validateEmail, jr as validateFinnishReference, gr as validateMobileNumber, ar as validateNationalId, fr as validatePhoneNumber };
|
|
3666
3931
|
|
|
3667
3932
|
//# sourceMappingURL=component-library.es.js.map
|