@kvell-group/ui 1.7.1 → 1.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,767 @@
1
+ import { r as g, u as T, l as zt, m as Tt, n as Rt, o as jt, k as H, b as Mt, p as F, q as Et } from "./MantineThemeProvider-kHsOfZUW.js";
2
+ import { useId as _t, forwardRef as v } from "react";
3
+ import { jsx as A, jsxs as Bt, Fragment as Ht } from "react/jsx-runtime";
4
+ function kt(t) {
5
+ return t.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`);
6
+ }
7
+ function k(t) {
8
+ return Object.keys(t).reduce((e, r) => (t[r] !== void 0 && (e[r] = t[r]), e), {});
9
+ }
10
+ function V(t) {
11
+ if (typeof t == "number")
12
+ return !0;
13
+ if (typeof t == "string") {
14
+ if (t.startsWith("calc(") || t.startsWith("var(") || t.includes(" ") && t.trim() !== "")
15
+ return !0;
16
+ const e = /^[+-]?[0-9]+(\.[0-9]+)?(px|em|rem|ex|ch|lh|rlh|vw|vh|vmin|vmax|vb|vi|svw|svh|lvw|lvh|dvw|dvh|cm|mm|in|pt|pc|q|cqw|cqh|cqi|cqb|cqmin|cqmax|%)?$/;
17
+ return t.trim().split(/\s+/).every((n) => e.test(n));
18
+ }
19
+ return !1;
20
+ }
21
+ function P(t, e = "size", r = !0) {
22
+ if (t !== void 0)
23
+ return V(t) ? r ? g(t) : t : `var(--${e}-${t})`;
24
+ }
25
+ function we(t) {
26
+ return t === void 0 ? "var(--mantine-radius-default)" : P(t, "mantine-radius");
27
+ }
28
+ function ze(t) {
29
+ return P(t, "mantine-font-size");
30
+ }
31
+ function Te(t) {
32
+ return P(t, "mantine-line-height", !1);
33
+ }
34
+ function Re(t) {
35
+ return t;
36
+ }
37
+ function D(t) {
38
+ var e, r, n = "";
39
+ if (typeof t == "string" || typeof t == "number") n += t;
40
+ else if (typeof t == "object") if (Array.isArray(t)) {
41
+ var i = t.length;
42
+ for (e = 0; e < i; e++) t[e] && (r = D(t[e])) && (n && (n += " "), n += r);
43
+ } else for (r in t) t[r] && (n && (n += " "), n += r);
44
+ return n;
45
+ }
46
+ function R() {
47
+ for (var t, e, r = 0, n = "", i = arguments.length; r < i; r++) (t = arguments[r]) && (e = D(t)) && (n && (n += " "), n += e);
48
+ return n;
49
+ }
50
+ const Pt = {};
51
+ function It(t) {
52
+ const e = {};
53
+ return t.forEach((r) => {
54
+ Object.entries(r).forEach(([n, i]) => {
55
+ e[n] ? e[n] = R(e[n], i) : e[n] = i;
56
+ });
57
+ }), e;
58
+ }
59
+ function I({ theme: t, classNames: e, props: r, stylesCtx: n }) {
60
+ const a = (Array.isArray(e) ? e : [e]).map(
61
+ (s) => typeof s == "function" ? s(t, r, n) : s || Pt
62
+ );
63
+ return It(a);
64
+ }
65
+ function E({ theme: t, styles: e, props: r, stylesCtx: n }) {
66
+ return (Array.isArray(e) ? e : [e]).reduce((a, s) => typeof s == "function" ? { ...a, ...s(t, r, n) } : { ...a, ...s }, {});
67
+ }
68
+ const Ot = {
69
+ always: "mantine-focus-always",
70
+ auto: "mantine-focus-auto",
71
+ never: "mantine-focus-never"
72
+ };
73
+ function Wt({ theme: t, options: e, unstyled: r }) {
74
+ return R(
75
+ (e == null ? void 0 : e.focusable) && !r && (t.focusClassName || Ot[t.focusRing]),
76
+ (e == null ? void 0 : e.active) && !r && t.activeClassName
77
+ );
78
+ }
79
+ function qt({
80
+ selector: t,
81
+ stylesCtx: e,
82
+ options: r,
83
+ props: n,
84
+ theme: i
85
+ }) {
86
+ return I({
87
+ theme: i,
88
+ classNames: r == null ? void 0 : r.classNames,
89
+ props: (r == null ? void 0 : r.props) || n,
90
+ stylesCtx: e
91
+ })[t];
92
+ }
93
+ function W({
94
+ selector: t,
95
+ stylesCtx: e,
96
+ theme: r,
97
+ classNames: n,
98
+ props: i
99
+ }) {
100
+ return I({ theme: r, classNames: n, props: i, stylesCtx: e })[t];
101
+ }
102
+ function Lt({ rootSelector: t, selector: e, className: r }) {
103
+ return t === e ? r : void 0;
104
+ }
105
+ function Ft({ selector: t, classes: e, unstyled: r }) {
106
+ return r ? void 0 : e[t];
107
+ }
108
+ function Vt({
109
+ themeName: t,
110
+ classNamesPrefix: e,
111
+ selector: r,
112
+ withStaticClass: n
113
+ }) {
114
+ return n === !1 ? [] : t.map((i) => `${e}-${i}-${r}`);
115
+ }
116
+ function Dt({
117
+ themeName: t,
118
+ theme: e,
119
+ selector: r,
120
+ props: n,
121
+ stylesCtx: i
122
+ }) {
123
+ return t.map(
124
+ (a) => {
125
+ var s, o;
126
+ return (o = I({
127
+ theme: e,
128
+ classNames: (s = e.components[a]) == null ? void 0 : s.classNames,
129
+ props: n,
130
+ stylesCtx: i
131
+ })) == null ? void 0 : o[r];
132
+ }
133
+ );
134
+ }
135
+ function Kt({
136
+ options: t,
137
+ classes: e,
138
+ selector: r,
139
+ unstyled: n
140
+ }) {
141
+ return t != null && t.variant && !n ? e[`${r}--${t.variant}`] : void 0;
142
+ }
143
+ function Qt({
144
+ theme: t,
145
+ options: e,
146
+ themeName: r,
147
+ selector: n,
148
+ classNamesPrefix: i,
149
+ classNames: a,
150
+ classes: s,
151
+ unstyled: o,
152
+ className: y,
153
+ rootSelector: p,
154
+ props: c,
155
+ stylesCtx: f,
156
+ withStaticClasses: u,
157
+ headless: d,
158
+ transformedStyles: h
159
+ }) {
160
+ return R(
161
+ Wt({ theme: t, options: e, unstyled: o || d }),
162
+ Dt({ theme: t, themeName: r, selector: n, props: c, stylesCtx: f }),
163
+ Kt({ options: e, classes: s, selector: n, unstyled: o }),
164
+ W({ selector: n, stylesCtx: f, theme: t, classNames: a, props: c }),
165
+ W({ selector: n, stylesCtx: f, theme: t, classNames: h, props: c }),
166
+ qt({ selector: n, stylesCtx: f, options: e, props: c, theme: t }),
167
+ Lt({ rootSelector: p, selector: n, className: y }),
168
+ Ft({ selector: n, classes: s, unstyled: o || d }),
169
+ u && !d && Vt({
170
+ themeName: r,
171
+ classNamesPrefix: i,
172
+ selector: n,
173
+ withStaticClass: e == null ? void 0 : e.withStaticClass
174
+ }),
175
+ e == null ? void 0 : e.className
176
+ );
177
+ }
178
+ function Ut({
179
+ theme: t,
180
+ themeName: e,
181
+ props: r,
182
+ stylesCtx: n,
183
+ selector: i
184
+ }) {
185
+ return e.map(
186
+ (a) => {
187
+ var s;
188
+ return E({
189
+ theme: t,
190
+ styles: (s = t.components[a]) == null ? void 0 : s.styles,
191
+ props: r,
192
+ stylesCtx: n
193
+ })[i];
194
+ }
195
+ ).reduce((a, s) => ({ ...a, ...s }), {});
196
+ }
197
+ function _({ style: t, theme: e }) {
198
+ return Array.isArray(t) ? [...t].reduce(
199
+ (r, n) => ({ ...r, ..._({ style: n, theme: e }) }),
200
+ {}
201
+ ) : typeof t == "function" ? t(e) : t ?? {};
202
+ }
203
+ function Yt(t) {
204
+ return t.reduce((e, r) => (r && Object.keys(r).forEach((n) => {
205
+ e[n] = { ...e[n], ...k(r[n]) };
206
+ }), e), {});
207
+ }
208
+ function Gt({
209
+ vars: t,
210
+ varsResolver: e,
211
+ theme: r,
212
+ props: n,
213
+ stylesCtx: i,
214
+ selector: a,
215
+ themeName: s,
216
+ headless: o
217
+ }) {
218
+ var y;
219
+ return (y = Yt([
220
+ o ? {} : e == null ? void 0 : e(r, n, i),
221
+ ...s.map((p) => {
222
+ var c, f, u;
223
+ return (u = (f = (c = r.components) == null ? void 0 : c[p]) == null ? void 0 : f.vars) == null ? void 0 : u.call(f, r, n, i);
224
+ }),
225
+ t == null ? void 0 : t(r, n, i)
226
+ ])) == null ? void 0 : y[a];
227
+ }
228
+ function Zt({
229
+ theme: t,
230
+ themeName: e,
231
+ selector: r,
232
+ options: n,
233
+ props: i,
234
+ stylesCtx: a,
235
+ rootSelector: s,
236
+ styles: o,
237
+ style: y,
238
+ vars: p,
239
+ varsResolver: c,
240
+ headless: f,
241
+ withStylesTransform: u
242
+ }) {
243
+ return {
244
+ ...!u && Ut({ theme: t, themeName: e, props: i, stylesCtx: a, selector: r }),
245
+ ...!u && E({ theme: t, styles: o, props: i, stylesCtx: a })[r],
246
+ ...!u && E({ theme: t, styles: n == null ? void 0 : n.styles, props: (n == null ? void 0 : n.props) || i, stylesCtx: a })[r],
247
+ ...Gt({ theme: t, props: i, stylesCtx: a, vars: p, varsResolver: c, selector: r, themeName: e, headless: f }),
248
+ ...s === r ? _({ style: y, theme: t }) : null,
249
+ ..._({ style: n == null ? void 0 : n.style, theme: t })
250
+ };
251
+ }
252
+ function Jt({ props: t, stylesCtx: e, themeName: r }) {
253
+ var s;
254
+ const n = T(), i = (s = zt()) == null ? void 0 : s();
255
+ return {
256
+ getTransformedStyles: (o) => i ? [
257
+ ...o.map(
258
+ (p) => i(p, { props: t, theme: n, ctx: e })
259
+ ),
260
+ ...r.map(
261
+ (p) => {
262
+ var c;
263
+ return i((c = n.components[p]) == null ? void 0 : c.styles, { props: t, theme: n, ctx: e });
264
+ }
265
+ )
266
+ ].filter(Boolean) : [],
267
+ withStylesTransform: !!i
268
+ };
269
+ }
270
+ function je({
271
+ name: t,
272
+ classes: e,
273
+ props: r,
274
+ stylesCtx: n,
275
+ className: i,
276
+ style: a,
277
+ rootSelector: s = "root",
278
+ unstyled: o,
279
+ classNames: y,
280
+ styles: p,
281
+ vars: c,
282
+ varsResolver: f
283
+ }) {
284
+ const u = T(), d = Tt(), h = Rt(), b = jt(), S = (Array.isArray(t) ? t : [t]).filter((m) => m), { withStylesTransform: x, getTransformedStyles: N } = Jt({
285
+ props: r,
286
+ stylesCtx: n,
287
+ themeName: S
288
+ });
289
+ return (m, l) => ({
290
+ className: Qt({
291
+ theme: u,
292
+ options: l,
293
+ themeName: S,
294
+ selector: m,
295
+ classNamesPrefix: d,
296
+ classNames: y,
297
+ classes: e,
298
+ unstyled: o,
299
+ className: i,
300
+ rootSelector: s,
301
+ props: r,
302
+ stylesCtx: n,
303
+ withStaticClasses: h,
304
+ headless: b,
305
+ transformedStyles: N([l == null ? void 0 : l.styles, p])
306
+ }),
307
+ style: Zt({
308
+ theme: u,
309
+ themeName: S,
310
+ selector: m,
311
+ options: l,
312
+ props: r,
313
+ stylesCtx: n,
314
+ rootSelector: s,
315
+ styles: p,
316
+ style: a,
317
+ vars: c,
318
+ varsResolver: f,
319
+ headless: b,
320
+ withStylesTransform: x
321
+ })
322
+ });
323
+ }
324
+ function Me(t, e, r) {
325
+ var s;
326
+ const n = T(), i = (s = n.components[t]) == null ? void 0 : s.defaultProps, a = typeof i == "function" ? i(n) : i;
327
+ return { ...e, ...a, ...k(r) };
328
+ }
329
+ function j(t) {
330
+ return H(t).reduce(
331
+ (e, r) => t[r] !== void 0 ? `${e}${kt(r)}:${t[r]};` : e,
332
+ ""
333
+ ).trim();
334
+ }
335
+ function Xt({ selector: t, styles: e, media: r, container: n }) {
336
+ const i = e ? j(e) : "", a = Array.isArray(r) ? r.map((o) => `@media${o.query}{${t}{${j(o.styles)}}}`) : [], s = Array.isArray(n) ? n.map(
337
+ (o) => `@container ${o.query}{${t}{${j(o.styles)}}}`
338
+ ) : [];
339
+ return `${i ? `${t}{${i}}` : ""}${a.join("")}${s.join("")}`.trim();
340
+ }
341
+ function te(t) {
342
+ const e = Mt();
343
+ return /* @__PURE__ */ A(
344
+ "style",
345
+ {
346
+ "data-mantine-styles": "inline",
347
+ nonce: e == null ? void 0 : e(),
348
+ dangerouslySetInnerHTML: { __html: Xt(t) }
349
+ }
350
+ );
351
+ }
352
+ function ee(t) {
353
+ const {
354
+ m: e,
355
+ mx: r,
356
+ my: n,
357
+ mt: i,
358
+ mb: a,
359
+ ml: s,
360
+ mr: o,
361
+ me: y,
362
+ ms: p,
363
+ p: c,
364
+ px: f,
365
+ py: u,
366
+ pt: d,
367
+ pb: h,
368
+ pl: b,
369
+ pr: S,
370
+ pe: x,
371
+ ps: N,
372
+ bd: m,
373
+ bg: l,
374
+ c: C,
375
+ opacity: $,
376
+ ff: w,
377
+ fz: z,
378
+ fw: G,
379
+ lts: Z,
380
+ ta: J,
381
+ lh: X,
382
+ fs: tt,
383
+ tt: et,
384
+ td: rt,
385
+ w: nt,
386
+ miw: it,
387
+ maw: at,
388
+ h: st,
389
+ mih: ot,
390
+ mah: pt,
391
+ bgsz: ct,
392
+ bgp: ft,
393
+ bgr: yt,
394
+ bga: ut,
395
+ pos: mt,
396
+ top: dt,
397
+ left: lt,
398
+ bottom: gt,
399
+ right: ht,
400
+ inset: bt,
401
+ display: St,
402
+ flex: $t,
403
+ hiddenFrom: xt,
404
+ visibleFrom: Nt,
405
+ lightHidden: vt,
406
+ darkHidden: At,
407
+ sx: Ct,
408
+ ...wt
409
+ } = t;
410
+ return { styleProps: k({
411
+ m: e,
412
+ mx: r,
413
+ my: n,
414
+ mt: i,
415
+ mb: a,
416
+ ml: s,
417
+ mr: o,
418
+ me: y,
419
+ ms: p,
420
+ p: c,
421
+ px: f,
422
+ py: u,
423
+ pt: d,
424
+ pb: h,
425
+ pl: b,
426
+ pr: S,
427
+ pe: x,
428
+ ps: N,
429
+ bd: m,
430
+ bg: l,
431
+ c: C,
432
+ opacity: $,
433
+ ff: w,
434
+ fz: z,
435
+ fw: G,
436
+ lts: Z,
437
+ ta: J,
438
+ lh: X,
439
+ fs: tt,
440
+ tt: et,
441
+ td: rt,
442
+ w: nt,
443
+ miw: it,
444
+ maw: at,
445
+ h: st,
446
+ mih: ot,
447
+ mah: pt,
448
+ bgsz: ct,
449
+ bgp: ft,
450
+ bgr: yt,
451
+ bga: ut,
452
+ pos: mt,
453
+ top: dt,
454
+ left: lt,
455
+ bottom: gt,
456
+ right: ht,
457
+ inset: bt,
458
+ display: St,
459
+ flex: $t,
460
+ hiddenFrom: xt,
461
+ visibleFrom: Nt,
462
+ lightHidden: vt,
463
+ darkHidden: At,
464
+ sx: Ct
465
+ }), rest: wt };
466
+ }
467
+ const re = {
468
+ m: { type: "spacing", property: "margin" },
469
+ mt: { type: "spacing", property: "marginTop" },
470
+ mb: { type: "spacing", property: "marginBottom" },
471
+ ml: { type: "spacing", property: "marginLeft" },
472
+ mr: { type: "spacing", property: "marginRight" },
473
+ ms: { type: "spacing", property: "marginInlineStart" },
474
+ me: { type: "spacing", property: "marginInlineEnd" },
475
+ mx: { type: "spacing", property: "marginInline" },
476
+ my: { type: "spacing", property: "marginBlock" },
477
+ p: { type: "spacing", property: "padding" },
478
+ pt: { type: "spacing", property: "paddingTop" },
479
+ pb: { type: "spacing", property: "paddingBottom" },
480
+ pl: { type: "spacing", property: "paddingLeft" },
481
+ pr: { type: "spacing", property: "paddingRight" },
482
+ ps: { type: "spacing", property: "paddingInlineStart" },
483
+ pe: { type: "spacing", property: "paddingInlineEnd" },
484
+ px: { type: "spacing", property: "paddingInline" },
485
+ py: { type: "spacing", property: "paddingBlock" },
486
+ bd: { type: "border", property: "border" },
487
+ bg: { type: "color", property: "background" },
488
+ c: { type: "textColor", property: "color" },
489
+ opacity: { type: "identity", property: "opacity" },
490
+ ff: { type: "fontFamily", property: "fontFamily" },
491
+ fz: { type: "fontSize", property: "fontSize" },
492
+ fw: { type: "identity", property: "fontWeight" },
493
+ lts: { type: "size", property: "letterSpacing" },
494
+ ta: { type: "identity", property: "textAlign" },
495
+ lh: { type: "lineHeight", property: "lineHeight" },
496
+ fs: { type: "identity", property: "fontStyle" },
497
+ tt: { type: "identity", property: "textTransform" },
498
+ td: { type: "identity", property: "textDecoration" },
499
+ w: { type: "spacing", property: "width" },
500
+ miw: { type: "spacing", property: "minWidth" },
501
+ maw: { type: "spacing", property: "maxWidth" },
502
+ h: { type: "spacing", property: "height" },
503
+ mih: { type: "spacing", property: "minHeight" },
504
+ mah: { type: "spacing", property: "maxHeight" },
505
+ bgsz: { type: "size", property: "backgroundSize" },
506
+ bgp: { type: "identity", property: "backgroundPosition" },
507
+ bgr: { type: "identity", property: "backgroundRepeat" },
508
+ bga: { type: "identity", property: "backgroundAttachment" },
509
+ pos: { type: "identity", property: "position" },
510
+ top: { type: "size", property: "top" },
511
+ left: { type: "size", property: "left" },
512
+ bottom: { type: "size", property: "bottom" },
513
+ right: { type: "size", property: "right" },
514
+ inset: { type: "size", property: "inset" },
515
+ display: { type: "identity", property: "display" },
516
+ flex: { type: "identity", property: "flex" }
517
+ };
518
+ function O(t, e) {
519
+ const r = F({ color: t, theme: e });
520
+ return r.color === "dimmed" ? "var(--mantine-color-dimmed)" : r.color === "bright" ? "var(--mantine-color-bright)" : r.variable ? `var(${r.variable})` : r.color;
521
+ }
522
+ function ne(t, e) {
523
+ const r = F({ color: t, theme: e });
524
+ return r.isThemeColor && r.shade === void 0 ? `var(--mantine-color-${r.color}-text)` : O(t, e);
525
+ }
526
+ function ie(t, e) {
527
+ if (typeof t == "number")
528
+ return g(t);
529
+ if (typeof t == "string") {
530
+ const [r, n, ...i] = t.split(" ").filter((s) => s.trim() !== "");
531
+ let a = `${g(r)}`;
532
+ return n && (a += ` ${n}`), i.length > 0 && (a += ` ${O(i.join(" "), e)}`), a.trim();
533
+ }
534
+ return t;
535
+ }
536
+ const q = {
537
+ text: "var(--mantine-font-family)",
538
+ mono: "var(--mantine-font-family-monospace)",
539
+ monospace: "var(--mantine-font-family-monospace)",
540
+ heading: "var(--mantine-font-family-headings)",
541
+ headings: "var(--mantine-font-family-headings)"
542
+ };
543
+ function ae(t) {
544
+ return typeof t == "string" && t in q ? q[t] : t;
545
+ }
546
+ const se = ["h1", "h2", "h3", "h4", "h5", "h6"];
547
+ function oe(t, e) {
548
+ return typeof t == "string" && t in e.fontSizes ? `var(--mantine-font-size-${t})` : typeof t == "string" && se.includes(t) ? `var(--mantine-${t}-font-size)` : typeof t == "number" ? g(t) : typeof t == "string" ? g(t) : t;
549
+ }
550
+ function pe(t) {
551
+ return t;
552
+ }
553
+ const ce = ["h1", "h2", "h3", "h4", "h5", "h6"];
554
+ function fe(t, e) {
555
+ return typeof t == "string" && t in e.lineHeights ? `var(--mantine-line-height-${t})` : typeof t == "string" && ce.includes(t) ? `var(--mantine-${t}-line-height)` : t;
556
+ }
557
+ function ye(t) {
558
+ return typeof t == "number" ? g(t) : t;
559
+ }
560
+ function ue(t, e) {
561
+ if (typeof t == "number")
562
+ return g(t);
563
+ if (typeof t == "string") {
564
+ const r = t.replace("-", "");
565
+ if (!(r in e.spacing))
566
+ return g(t);
567
+ const n = `--mantine-spacing-${r}`;
568
+ return t.startsWith("-") ? `calc(var(${n}) * -1)` : `var(${n})`;
569
+ }
570
+ return t;
571
+ }
572
+ const M = {
573
+ color: O,
574
+ textColor: ne,
575
+ fontSize: oe,
576
+ spacing: ue,
577
+ identity: pe,
578
+ size: ye,
579
+ lineHeight: fe,
580
+ fontFamily: ae,
581
+ border: ie
582
+ };
583
+ function L(t) {
584
+ return t.replace("(min-width: ", "").replace("em)", "");
585
+ }
586
+ function me({
587
+ media: t,
588
+ ...e
589
+ }) {
590
+ const n = Object.keys(t).sort((i, a) => Number(L(i)) - Number(L(a))).map((i) => ({ query: i, styles: t[i] }));
591
+ return { ...e, media: n };
592
+ }
593
+ function de(t) {
594
+ if (typeof t != "object" || t === null)
595
+ return !1;
596
+ const e = Object.keys(t);
597
+ return !(e.length === 1 && e[0] === "base");
598
+ }
599
+ function le(t) {
600
+ return typeof t == "object" && t !== null ? "base" in t ? t.base : void 0 : t;
601
+ }
602
+ function ge(t) {
603
+ return typeof t == "object" && t !== null ? H(t).filter((e) => e !== "base") : [];
604
+ }
605
+ function he(t, e) {
606
+ return typeof t == "object" && t !== null && e in t ? t[e] : t;
607
+ }
608
+ function be({
609
+ styleProps: t,
610
+ data: e,
611
+ theme: r
612
+ }) {
613
+ return me(
614
+ H(t).reduce(
615
+ (n, i) => {
616
+ if (i === "hiddenFrom" || i === "visibleFrom" || i === "sx")
617
+ return n;
618
+ const a = e[i], s = Array.isArray(a.property) ? a.property : [a.property], o = le(t[i]);
619
+ if (!de(t[i]))
620
+ return s.forEach((p) => {
621
+ n.inlineStyles[p] = M[a.type](o, r);
622
+ }), n;
623
+ n.hasResponsiveStyles = !0;
624
+ const y = ge(t[i]);
625
+ return s.forEach((p) => {
626
+ o && (n.styles[p] = M[a.type](o, r)), y.forEach((c) => {
627
+ const f = `(min-width: ${r.breakpoints[c]})`;
628
+ n.media[f] = {
629
+ ...n.media[f],
630
+ [p]: M[a.type](
631
+ he(t[i], c),
632
+ r
633
+ )
634
+ };
635
+ });
636
+ }), n;
637
+ },
638
+ {
639
+ hasResponsiveStyles: !1,
640
+ styles: {},
641
+ inlineStyles: {},
642
+ media: {}
643
+ }
644
+ )
645
+ );
646
+ }
647
+ function Se() {
648
+ return `__m__-${_t().replace(/:/g, "")}`;
649
+ }
650
+ function K(t) {
651
+ return t.startsWith("data-") ? t : `data-${t}`;
652
+ }
653
+ function $e(t) {
654
+ return Object.keys(t).reduce((e, r) => {
655
+ const n = t[r];
656
+ return n === void 0 || n === "" || n === !1 || n === null || (e[K(r)] = t[r]), e;
657
+ }, {});
658
+ }
659
+ function Q(t) {
660
+ return t ? typeof t == "string" ? { [K(t)]: !0 } : Array.isArray(t) ? [...t].reduce(
661
+ (e, r) => ({ ...e, ...Q(r) }),
662
+ {}
663
+ ) : $e(t) : null;
664
+ }
665
+ function B(t, e) {
666
+ return Array.isArray(t) ? [...t].reduce(
667
+ (r, n) => ({ ...r, ...B(n, e) }),
668
+ {}
669
+ ) : typeof t == "function" ? t(e) : t ?? {};
670
+ }
671
+ function xe({
672
+ theme: t,
673
+ style: e,
674
+ vars: r,
675
+ styleProps: n
676
+ }) {
677
+ const i = B(e, t), a = B(r, t);
678
+ return { ...i, ...a, ...n };
679
+ }
680
+ const U = v(
681
+ ({
682
+ component: t,
683
+ style: e,
684
+ __vars: r,
685
+ className: n,
686
+ variant: i,
687
+ mod: a,
688
+ size: s,
689
+ hiddenFrom: o,
690
+ visibleFrom: y,
691
+ lightHidden: p,
692
+ darkHidden: c,
693
+ renderRoot: f,
694
+ __size: u,
695
+ ...d
696
+ }, h) => {
697
+ var z;
698
+ const b = T(), S = t || "div", { styleProps: x, rest: N } = ee(d), m = Et(), l = (z = m == null ? void 0 : m()) == null ? void 0 : z(x.sx), C = Se(), $ = be({
699
+ styleProps: x,
700
+ theme: b,
701
+ data: re
702
+ }), w = {
703
+ ref: h,
704
+ style: xe({
705
+ theme: b,
706
+ style: e,
707
+ vars: r,
708
+ styleProps: $.inlineStyles
709
+ }),
710
+ className: R(n, l, {
711
+ [C]: $.hasResponsiveStyles,
712
+ "mantine-light-hidden": p,
713
+ "mantine-dark-hidden": c,
714
+ [`mantine-hidden-from-${o}`]: o,
715
+ [`mantine-visible-from-${y}`]: y
716
+ }),
717
+ "data-variant": i,
718
+ "data-size": V(s) ? void 0 : s || void 0,
719
+ size: u,
720
+ ...Q(a),
721
+ ...N
722
+ };
723
+ return /* @__PURE__ */ Bt(Ht, { children: [
724
+ $.hasResponsiveStyles && /* @__PURE__ */ A(
725
+ te,
726
+ {
727
+ selector: `.${C}`,
728
+ styles: $.styles,
729
+ media: $.media
730
+ }
731
+ ),
732
+ typeof f == "function" ? f(w) : /* @__PURE__ */ A(S, { ...w })
733
+ ] });
734
+ }
735
+ );
736
+ U.displayName = "@mantine/core/Box";
737
+ const Ee = U;
738
+ function Y(t) {
739
+ return t;
740
+ }
741
+ function _e(t) {
742
+ const e = v(t);
743
+ return e.extend = Y, e.withProps = (r) => {
744
+ const n = v((i, a) => /* @__PURE__ */ A(e, { ...r, ...i, ref: a }));
745
+ return n.extend = e.extend, n.displayName = `WithProps(${e.displayName})`, n;
746
+ }, e;
747
+ }
748
+ function Be(t) {
749
+ const e = v(t);
750
+ return e.withProps = (r) => {
751
+ const n = v((i, a) => /* @__PURE__ */ A(e, { ...r, ...i, ref: a }));
752
+ return n.extend = e.extend, n.displayName = `WithProps(${e.displayName})`, n;
753
+ }, e.extend = Y, e;
754
+ }
755
+ export {
756
+ Ee as B,
757
+ je as a,
758
+ ze as b,
759
+ Re as c,
760
+ R as d,
761
+ P as e,
762
+ _e as f,
763
+ Te as g,
764
+ we as h,
765
+ Be as p,
766
+ Me as u
767
+ };