@kvell-group/ui 1.8.2 → 1.9.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.
Files changed (34) hide show
  1. package/README.md +0 -0
  2. package/dist/Text.module-R-XLggXY.js +8 -0
  3. package/dist/UnstyledButton-D2QHft3M.js +44 -0
  4. package/dist/assets/CardInput.css +1 -0
  5. package/dist/assets/Text.css +1 -0
  6. package/dist/components/Button/Button.js +251 -288
  7. package/dist/components/CardInput/CardInput.d.ts +145 -0
  8. package/dist/components/CardInput/CardInput.js +3924 -0
  9. package/dist/components/CardInput/index.d.ts +1 -0
  10. package/dist/components/CardInput/index.js +4 -0
  11. package/dist/components/CardInput/useCardLogo.d.ts +1 -0
  12. package/dist/components/CardInput/useCardLogo.js +47 -0
  13. package/dist/components/MainProvider/MantineProvider.js +31 -31
  14. package/dist/components/Text/Text.d.ts +9 -0
  15. package/dist/components/Text/Text.js +88 -0
  16. package/dist/components/Text/index.d.ts +1 -0
  17. package/dist/components/Text/index.js +4 -0
  18. package/dist/components/theme.js +40 -23
  19. package/dist/main.d.ts +3 -2
  20. package/dist/main.js +10 -8
  21. package/dist/{polymorphic-factory-DUeudAZR.js → polymorphic-factory-Bvt8Is5k.js} +3 -0
  22. package/dist/use-isomorphic-effect-TT0F1lfC.js +5 -0
  23. package/package.json +3 -1
  24. package/dist/Text-B8e4XllM.js +0 -80
  25. package/dist/assets/TypographyBodySMedium.css +0 -1
  26. package/dist/assets/TypographyCaptionLMedium.css +0 -1
  27. package/dist/components/Button/ExperimentalButtonWithSvg.d.ts +0 -1
  28. package/dist/components/Button/ExperimentalButtonWithSvg.js +0 -17
  29. package/dist/components/Typography/TypographyBodySMedium.d.ts +0 -2
  30. package/dist/components/Typography/TypographyBodySMedium.js +0 -14
  31. package/dist/components/Typography/TypographyCaptionLMedium.d.ts +0 -2
  32. package/dist/components/Typography/TypographyCaptionLMedium.js +0 -14
  33. package/dist/components/Typography/types.d.ts +0 -5
  34. package/dist/components/Typography/types.js +0 -1
@@ -1,88 +1,51 @@
1
- import { jsx as c, Fragment as J, jsxs as X } from "react/jsx-runtime";
2
- import { u as lt, j as pt, g as dt, r as z } from "../../MantineThemeProvider-kHsOfZUW.js";
3
- import { useState as V, useRef as Y, useEffect as D, forwardRef as j } from "react";
4
- import { p as tt, u as P, a as $, B as y, d as I, f as M, c as E, e as L, h as ot, b as k } from "../../polymorphic-factory-DUeudAZR.js";
5
- import ut from "react-dom";
6
- import '../../assets/Button.css';function ft(t, o) {
1
+ import { jsx as i, Fragment as Q, jsxs as F } from "react/jsx-runtime";
2
+ import { u as it, j as ct, g as mt, r as q } from "../../MantineThemeProvider-kHsOfZUW.js";
3
+ import { useState as j, useRef as L, useEffect as X, forwardRef as I } from "react";
4
+ import { B as g, d as M, f as W, u as N, a as k, c as E, e as _, h as z, b as D, p as pt } from "../../polymorphic-factory-Bvt8Is5k.js";
5
+ import lt from "react-dom";
6
+ import { U as dt } from "../../UnstyledButton-D2QHft3M.js";
7
+ import '../../assets/Button.css';function ut(t, o) {
7
8
  try {
8
9
  return t.addEventListener("change", o), () => t.removeEventListener("change", o);
9
10
  } catch {
10
11
  return t.addListener(o), () => t.removeListener(o);
11
12
  }
12
13
  }
13
- function yt(t, o) {
14
+ function ft(t, o) {
14
15
  return typeof window < "u" && "matchMedia" in window ? window.matchMedia(t).matches : !1;
15
16
  }
16
- function gt(t, o, { getInitialValueInEffect: n } = {
17
+ function yt(t, o, { getInitialValueInEffect: r } = {
17
18
  getInitialValueInEffect: !0
18
19
  }) {
19
- const [s, r] = V(
20
- n ? o : yt(t)
21
- ), e = Y(null);
22
- return D(() => {
20
+ const [s, e] = j(
21
+ r ? o : ft(t)
22
+ ), n = L(null);
23
+ return X(() => {
23
24
  if ("matchMedia" in window)
24
- return e.current = window.matchMedia(t), r(e.current.matches), ft(e.current, (a) => r(a.matches));
25
+ return n.current = window.matchMedia(t), e(n.current.matches), ut(n.current, (a) => e(a.matches));
25
26
  }, [t]), s;
26
27
  }
27
- function bt(t, o) {
28
- const n = Y(!1);
29
- D(
28
+ function gt(t, o) {
29
+ const r = L(!1);
30
+ X(
30
31
  () => () => {
31
- n.current = !1;
32
+ r.current = !1;
32
33
  },
33
34
  []
34
- ), D(() => {
35
- if (n.current)
35
+ ), X(() => {
36
+ if (r.current)
36
37
  return t();
37
- n.current = !0;
38
+ r.current = !0;
38
39
  }, o);
39
40
  }
40
- function ht(t, o) {
41
- return gt("(prefers-reduced-motion: reduce)", t, o);
41
+ function bt(t, o) {
42
+ return yt("(prefers-reduced-motion: reduce)", t, o);
42
43
  }
43
- var nt = { root: "m_87cf2631" };
44
- const vt = {
45
- __staticSelector: "UnstyledButton"
46
- }, W = tt(
47
- (t, o) => {
48
- const n = P("UnstyledButton", vt, t), {
49
- className: s,
50
- component: r = "button",
51
- __staticSelector: e,
52
- unstyled: a,
53
- classNames: i,
54
- styles: m,
55
- style: p,
56
- ...u
57
- } = n, f = $({
58
- name: e,
59
- props: n,
60
- classes: nt,
61
- className: s,
62
- style: p,
63
- classNames: i,
64
- styles: m,
65
- unstyled: a
66
- });
67
- return /* @__PURE__ */ c(
68
- y,
69
- {
70
- ...f("root", { focusable: !0 }),
71
- component: r,
72
- ref: o,
73
- type: r === "button" ? "button" : void 0,
74
- ...u
75
- }
76
- );
77
- }
78
- );
79
- W.classes = nt;
80
- W.displayName = "@mantine/core/UnstyledButton";
81
- const T = (t) => ({
44
+ const Y = (t) => ({
82
45
  in: { opacity: 1, transform: "scale(1)" },
83
46
  out: { opacity: 0, transform: `scale(.9) translateY(${t === "bottom" ? 10 : -10}px)` },
84
47
  transitionProperty: "transform, opacity"
85
- }), F = {
48
+ }), C = {
86
49
  fade: {
87
50
  in: { opacity: 1 },
88
51
  out: { opacity: 0 },
@@ -175,26 +138,26 @@ const T = (t) => ({
175
138
  transitionProperty: "transform, opacity"
176
139
  },
177
140
  pop: {
178
- ...T("bottom"),
141
+ ...Y("bottom"),
179
142
  common: { transformOrigin: "center center" }
180
143
  },
181
144
  "pop-bottom-left": {
182
- ...T("bottom"),
145
+ ...Y("bottom"),
183
146
  common: { transformOrigin: "bottom left" }
184
147
  },
185
148
  "pop-bottom-right": {
186
- ...T("bottom"),
149
+ ...Y("bottom"),
187
150
  common: { transformOrigin: "bottom right" }
188
151
  },
189
152
  "pop-top-left": {
190
- ...T("top"),
153
+ ...Y("top"),
191
154
  common: { transformOrigin: "top left" }
192
155
  },
193
156
  "pop-top-right": {
194
- ...T("top"),
157
+ ...Y("top"),
195
158
  common: { transformOrigin: "top right" }
196
159
  }
197
- }, K = {
160
+ }, J = {
198
161
  entering: "in",
199
162
  entered: "in",
200
163
  exiting: "out",
@@ -202,396 +165,396 @@ const T = (t) => ({
202
165
  "pre-exiting": "out",
203
166
  "pre-entering": "out"
204
167
  };
205
- function wt({
168
+ function ht({
206
169
  transition: t,
207
170
  state: o,
208
- duration: n,
171
+ duration: r,
209
172
  timingFunction: s
210
173
  }) {
211
- const r = {
174
+ const e = {
212
175
  WebkitBackfaceVisibility: "hidden",
213
176
  willChange: "transform, opacity",
214
- transitionDuration: `${n}ms`,
177
+ transitionDuration: `${r}ms`,
215
178
  transitionTimingFunction: s
216
179
  };
217
- return typeof t == "string" ? t in F ? {
218
- transitionProperty: F[t].transitionProperty,
219
- ...r,
220
- ...F[t].common,
221
- ...F[t][K[o]]
180
+ return typeof t == "string" ? t in C ? {
181
+ transitionProperty: C[t].transitionProperty,
182
+ ...e,
183
+ ...C[t].common,
184
+ ...C[t][J[o]]
222
185
  } : {} : {
223
186
  transitionProperty: t.transitionProperty,
224
- ...r,
187
+ ...e,
225
188
  ...t.common,
226
- ...t[K[o]]
189
+ ...t[J[o]]
227
190
  };
228
191
  }
229
- function St({
192
+ function vt({
230
193
  duration: t,
231
194
  exitDuration: o,
232
- timingFunction: n,
195
+ timingFunction: r,
233
196
  mounted: s,
234
- onEnter: r,
235
- onExit: e,
197
+ onEnter: e,
198
+ onExit: n,
236
199
  onEntered: a,
237
- onExited: i,
200
+ onExited: c,
238
201
  enterDelay: m,
239
- exitDelay: p
202
+ exitDelay: l
240
203
  }) {
241
- const u = lt(), f = ht(), g = u.respectReducedMotion ? f : !1, [v, l] = V(g ? 0 : t), [S, w] = V(s ? "entered" : "exited"), _ = Y(-1), C = Y(-1), x = Y(-1), R = (d) => {
242
- const N = d ? r : e, b = d ? a : i;
243
- window.clearTimeout(_.current);
244
- const O = g ? 0 : d ? t : o;
245
- l(O), O === 0 ? (typeof N == "function" && N(), typeof b == "function" && b(), w(d ? "entered" : "exited")) : x.current = requestAnimationFrame(() => {
246
- ut.flushSync(() => {
204
+ const u = it(), h = bt(), f = u.respectReducedMotion ? h : !1, [v, p] = j(f ? 0 : t), [S, w] = j(s ? "entered" : "exited"), B = L(-1), $ = L(-1), x = L(-1), O = (d) => {
205
+ const P = d ? e : n, y = d ? a : c;
206
+ window.clearTimeout(B.current);
207
+ const T = f ? 0 : d ? t : o;
208
+ p(T), T === 0 ? (typeof P == "function" && P(), typeof y == "function" && y(), w(d ? "entered" : "exited")) : x.current = requestAnimationFrame(() => {
209
+ lt.flushSync(() => {
247
210
  w(d ? "pre-entering" : "pre-exiting");
248
211
  }), x.current = requestAnimationFrame(() => {
249
- typeof N == "function" && N(), w(d ? "entering" : "exiting"), _.current = window.setTimeout(() => {
250
- typeof b == "function" && b(), w(d ? "entered" : "exited");
251
- }, O);
212
+ typeof P == "function" && P(), w(d ? "entering" : "exiting"), B.current = window.setTimeout(() => {
213
+ typeof y == "function" && y(), w(d ? "entered" : "exited");
214
+ }, T);
252
215
  });
253
216
  });
254
- }, Q = (d) => {
255
- if (window.clearTimeout(C.current), typeof (d ? m : p) != "number") {
256
- R(d);
217
+ }, H = (d) => {
218
+ if (window.clearTimeout($.current), typeof (d ? m : l) != "number") {
219
+ O(d);
257
220
  return;
258
221
  }
259
- C.current = window.setTimeout(
222
+ $.current = window.setTimeout(
260
223
  () => {
261
- R(d);
224
+ O(d);
262
225
  },
263
- d ? m : p
226
+ d ? m : l
264
227
  );
265
228
  };
266
- return bt(() => {
267
- Q(s);
268
- }, [s]), D(
229
+ return gt(() => {
230
+ H(s);
231
+ }, [s]), X(
269
232
  () => () => {
270
- window.clearTimeout(_.current), cancelAnimationFrame(x.current);
233
+ window.clearTimeout(B.current), cancelAnimationFrame(x.current);
271
234
  },
272
235
  []
273
236
  ), {
274
237
  transitionDuration: v,
275
238
  transitionStatus: S,
276
- transitionTimingFunction: n || "ease"
239
+ transitionTimingFunction: r || "ease"
277
240
  };
278
241
  }
279
- function rt({
242
+ function tt({
280
243
  keepMounted: t,
281
244
  transition: o = "fade",
282
- duration: n = 250,
283
- exitDuration: s = n,
284
- mounted: r,
285
- children: e,
245
+ duration: r = 250,
246
+ exitDuration: s = r,
247
+ mounted: e,
248
+ children: n,
286
249
  timingFunction: a = "ease",
287
- onExit: i,
250
+ onExit: c,
288
251
  onEntered: m,
289
- onEnter: p,
252
+ onEnter: l,
290
253
  onExited: u,
291
- enterDelay: f,
292
- exitDelay: g
254
+ enterDelay: h,
255
+ exitDelay: f
293
256
  }) {
294
- const v = pt(), { transitionDuration: l, transitionStatus: S, transitionTimingFunction: w } = St({
295
- mounted: r,
257
+ const v = ct(), { transitionDuration: p, transitionStatus: S, transitionTimingFunction: w } = vt({
258
+ mounted: e,
296
259
  exitDuration: s,
297
- duration: n,
260
+ duration: r,
298
261
  timingFunction: a,
299
- onExit: i,
262
+ onExit: c,
300
263
  onEntered: m,
301
- onEnter: p,
264
+ onEnter: l,
302
265
  onExited: u,
303
- enterDelay: f,
304
- exitDelay: g
266
+ enterDelay: h,
267
+ exitDelay: f
305
268
  });
306
- return l === 0 || v === "test" ? r ? /* @__PURE__ */ c(J, { children: e({}) }) : t ? e({ display: "none" }) : null : S === "exited" ? t ? e({ display: "none" }) : null : /* @__PURE__ */ c(J, { children: e(
307
- wt({
269
+ return p === 0 || v === "test" ? e ? /* @__PURE__ */ i(Q, { children: n({}) }) : t ? n({ display: "none" }) : null : S === "exited" ? t ? n({ display: "none" }) : null : /* @__PURE__ */ i(Q, { children: n(
270
+ ht({
308
271
  transition: o,
309
- duration: l,
272
+ duration: p,
310
273
  state: S,
311
274
  timingFunction: w
312
275
  })
313
276
  ) });
314
277
  }
315
- rt.displayName = "@mantine/core/Transition";
316
- var h = { root: "m_5ae2e3c", barsLoader: "m_7a2bd4cd", bar: "m_870bb79", "bars-loader-animation": "m_5d2b3b9d", dotsLoader: "m_4e3f22d7", dot: "m_870c4af", "loader-dots-animation": "m_aac34a1", ovalLoader: "m_b34414df", "oval-loader-animation": "m_f8e89c4b" };
317
- const et = j(({ className: t, ...o }, n) => /* @__PURE__ */ X(y, { component: "span", className: I(h.barsLoader, t), ...o, ref: n, children: [
318
- /* @__PURE__ */ c("span", { className: h.bar }),
319
- /* @__PURE__ */ c("span", { className: h.bar }),
320
- /* @__PURE__ */ c("span", { className: h.bar })
278
+ tt.displayName = "@mantine/core/Transition";
279
+ var b = { root: "m_5ae2e3c", barsLoader: "m_7a2bd4cd", bar: "m_870bb79", "bars-loader-animation": "m_5d2b3b9d", dotsLoader: "m_4e3f22d7", dot: "m_870c4af", "loader-dots-animation": "m_aac34a1", ovalLoader: "m_b34414df", "oval-loader-animation": "m_f8e89c4b" };
280
+ const ot = I(({ className: t, ...o }, r) => /* @__PURE__ */ F(g, { component: "span", className: M(b.barsLoader, t), ...o, ref: r, children: [
281
+ /* @__PURE__ */ i("span", { className: b.bar }),
282
+ /* @__PURE__ */ i("span", { className: b.bar }),
283
+ /* @__PURE__ */ i("span", { className: b.bar })
321
284
  ] }));
322
- et.displayName = "@mantine/core/Bars";
323
- const at = j(({ className: t, ...o }, n) => /* @__PURE__ */ X(y, { component: "span", className: I(h.dotsLoader, t), ...o, ref: n, children: [
324
- /* @__PURE__ */ c("span", { className: h.dot }),
325
- /* @__PURE__ */ c("span", { className: h.dot }),
326
- /* @__PURE__ */ c("span", { className: h.dot })
285
+ ot.displayName = "@mantine/core/Bars";
286
+ const rt = I(({ className: t, ...o }, r) => /* @__PURE__ */ F(g, { component: "span", className: M(b.dotsLoader, t), ...o, ref: r, children: [
287
+ /* @__PURE__ */ i("span", { className: b.dot }),
288
+ /* @__PURE__ */ i("span", { className: b.dot }),
289
+ /* @__PURE__ */ i("span", { className: b.dot })
327
290
  ] }));
328
- at.displayName = "@mantine/core/Dots";
329
- const st = j(({ className: t, ...o }, n) => /* @__PURE__ */ c(y, { component: "span", className: I(h.ovalLoader, t), ...o, ref: n }));
330
- st.displayName = "@mantine/core/Oval";
331
- const it = {
332
- bars: et,
333
- oval: st,
334
- dots: at
335
- }, Nt = {
336
- loaders: it,
291
+ rt.displayName = "@mantine/core/Dots";
292
+ const nt = I(({ className: t, ...o }, r) => /* @__PURE__ */ i(g, { component: "span", className: M(b.ovalLoader, t), ...o, ref: r }));
293
+ nt.displayName = "@mantine/core/Oval";
294
+ const et = {
295
+ bars: ot,
296
+ oval: nt,
297
+ dots: rt
298
+ }, wt = {
299
+ loaders: et,
337
300
  type: "oval"
338
- }, Pt = E((t, { size: o, color: n }) => ({
301
+ }, St = E((t, { size: o, color: r }) => ({
339
302
  root: {
340
- "--loader-size": L(o, "loader-size"),
341
- "--loader-color": n ? dt(n, t) : void 0
303
+ "--loader-size": _(o, "loader-size"),
304
+ "--loader-color": r ? mt(r, t) : void 0
342
305
  }
343
- })), U = M((t, o) => {
344
- const n = P("Loader", Nt, t), {
306
+ })), V = W((t, o) => {
307
+ const r = N("Loader", wt, t), {
345
308
  size: s,
346
- color: r,
347
- type: e,
309
+ color: e,
310
+ type: n,
348
311
  vars: a,
349
- className: i,
312
+ className: c,
350
313
  style: m,
351
- classNames: p,
314
+ classNames: l,
352
315
  styles: u,
353
- unstyled: f,
354
- loaders: g,
316
+ unstyled: h,
317
+ loaders: f,
355
318
  variant: v,
356
- children: l,
319
+ children: p,
357
320
  ...S
358
- } = n, w = $({
321
+ } = r, w = k({
359
322
  name: "Loader",
360
- props: n,
361
- classes: h,
362
- className: i,
323
+ props: r,
324
+ classes: b,
325
+ className: c,
363
326
  style: m,
364
- classNames: p,
327
+ classNames: l,
365
328
  styles: u,
366
- unstyled: f,
329
+ unstyled: h,
367
330
  vars: a,
368
- varsResolver: Pt
331
+ varsResolver: St
369
332
  });
370
- return l ? /* @__PURE__ */ c(y, { ...w("root"), ref: o, ...S, children: l }) : /* @__PURE__ */ c(
371
- y,
333
+ return p ? /* @__PURE__ */ i(g, { ...w("root"), ref: o, ...S, children: p }) : /* @__PURE__ */ i(
334
+ g,
372
335
  {
373
336
  ...w("root"),
374
337
  ref: o,
375
- component: g[e],
338
+ component: f[n],
376
339
  variant: v,
377
340
  size: s,
378
341
  ...S
379
342
  }
380
343
  );
381
344
  });
382
- U.defaultLoaders = it;
383
- U.classes = h;
384
- U.displayName = "@mantine/core/Loader";
385
- var B = { root: "m_77c9d27d", inner: "m_80f1301b", label: "m_811560b9", section: "m_a74036a", loader: "m_a25b86ee", group: "m_80d6d844", groupSection: "m_70be2a01" };
386
- const Z = {
345
+ V.defaultLoaders = et;
346
+ V.classes = b;
347
+ V.displayName = "@mantine/core/Loader";
348
+ var R = { root: "m_77c9d27d", inner: "m_80f1301b", label: "m_811560b9", section: "m_a74036a", loader: "m_a25b86ee", group: "m_80d6d844", groupSection: "m_70be2a01" };
349
+ const K = {
387
350
  orientation: "horizontal"
388
- }, xt = E((t, { borderWidth: o }) => ({
389
- group: { "--button-border-width": z(o) }
390
- })), A = M((t, o) => {
391
- const n = P("ButtonGroup", Z, t), {
351
+ }, Pt = E((t, { borderWidth: o }) => ({
352
+ group: { "--button-border-width": q(o) }
353
+ })), A = W((t, o) => {
354
+ const r = N("ButtonGroup", K, t), {
392
355
  className: s,
393
- style: r,
394
- classNames: e,
356
+ style: e,
357
+ classNames: n,
395
358
  styles: a,
396
- unstyled: i,
359
+ unstyled: c,
397
360
  orientation: m,
398
- vars: p,
361
+ vars: l,
399
362
  borderWidth: u,
400
- variant: f,
401
- mod: g,
363
+ variant: h,
364
+ mod: f,
402
365
  ...v
403
- } = P("ButtonGroup", Z, t), l = $({
366
+ } = N("ButtonGroup", K, t), p = k({
404
367
  name: "ButtonGroup",
405
- props: n,
406
- classes: B,
368
+ props: r,
369
+ classes: R,
407
370
  className: s,
408
- style: r,
409
- classNames: e,
371
+ style: e,
372
+ classNames: n,
410
373
  styles: a,
411
- unstyled: i,
412
- vars: p,
413
- varsResolver: xt,
374
+ unstyled: c,
375
+ vars: l,
376
+ varsResolver: Pt,
414
377
  rootSelector: "group"
415
378
  });
416
- return /* @__PURE__ */ c(
417
- y,
379
+ return /* @__PURE__ */ i(
380
+ g,
418
381
  {
419
- ...l("group"),
382
+ ...p("group"),
420
383
  ref: o,
421
- variant: f,
422
- mod: [{ "data-orientation": m }, g],
384
+ variant: h,
385
+ mod: [{ "data-orientation": m }, f],
423
386
  role: "group",
424
387
  ...v
425
388
  }
426
389
  );
427
390
  });
428
- A.classes = B;
391
+ A.classes = R;
429
392
  A.displayName = "@mantine/core/ButtonGroup";
430
- const q = {}, Bt = E(
431
- (t, { radius: o, color: n, gradient: s, variant: r, autoContrast: e, size: a }) => {
432
- const i = t.variantColorResolver({
433
- color: n || t.primaryColor,
393
+ const Z = {}, xt = E(
394
+ (t, { radius: o, color: r, gradient: s, variant: e, autoContrast: n, size: a }) => {
395
+ const c = t.variantColorResolver({
396
+ color: r || t.primaryColor,
434
397
  theme: t,
435
398
  gradient: s,
436
- variant: r || "filled",
437
- autoContrast: e
399
+ variant: e || "filled",
400
+ autoContrast: n
438
401
  });
439
402
  return {
440
403
  groupSection: {
441
- "--section-height": L(a, "section-height"),
442
- "--section-padding-x": L(a, "section-padding-x"),
443
- "--section-fz": a != null && a.includes("compact") ? k(a.replace("compact-", "")) : k(a),
444
- "--section-radius": o === void 0 ? void 0 : ot(o),
445
- "--section-bg": n || r ? i.background : void 0,
446
- "--section-color": i.color,
447
- "--section-bd": n || r ? i.border : void 0
404
+ "--section-height": _(a, "section-height"),
405
+ "--section-padding-x": _(a, "section-padding-x"),
406
+ "--section-fz": a != null && a.includes("compact") ? D(a.replace("compact-", "")) : D(a),
407
+ "--section-radius": o === void 0 ? void 0 : z(o),
408
+ "--section-bg": r || e ? c.background : void 0,
409
+ "--section-color": c.color,
410
+ "--section-bd": r || e ? c.border : void 0
448
411
  }
449
412
  };
450
413
  }
451
- ), H = M((t, o) => {
452
- const n = P("ButtonGroupSection", q, t), {
414
+ ), U = W((t, o) => {
415
+ const r = N("ButtonGroupSection", Z, t), {
453
416
  className: s,
454
- style: r,
455
- classNames: e,
417
+ style: e,
418
+ classNames: n,
456
419
  styles: a,
457
- unstyled: i,
420
+ unstyled: c,
458
421
  vars: m,
459
- variant: p,
422
+ variant: l,
460
423
  gradient: u,
461
- radius: f,
462
- autoContrast: g,
424
+ radius: h,
425
+ autoContrast: f,
463
426
  ...v
464
- } = P("ButtonGroupSection", q, t), l = $({
427
+ } = N("ButtonGroupSection", Z, t), p = k({
465
428
  name: "ButtonGroupSection",
466
- props: n,
467
- classes: B,
429
+ props: r,
430
+ classes: R,
468
431
  className: s,
469
- style: r,
470
- classNames: e,
432
+ style: e,
433
+ classNames: n,
471
434
  styles: a,
472
- unstyled: i,
435
+ unstyled: c,
473
436
  vars: m,
474
- varsResolver: Bt,
437
+ varsResolver: xt,
475
438
  rootSelector: "groupSection"
476
439
  });
477
- return /* @__PURE__ */ c(y, { ...l("groupSection"), ref: o, variant: p, ...v });
440
+ return /* @__PURE__ */ i(g, { ...p("groupSection"), ref: o, variant: l, ...v });
478
441
  });
479
- H.classes = B;
480
- H.displayName = "@mantine/core/ButtonGroupSection";
481
- const _t = {
482
- in: { opacity: 1, transform: `translate(-50%, calc(-50% + ${z(1)}))` },
442
+ U.classes = R;
443
+ U.displayName = "@mantine/core/ButtonGroupSection";
444
+ const Nt = {
445
+ in: { opacity: 1, transform: `translate(-50%, calc(-50% + ${q(1)}))` },
483
446
  out: { opacity: 0, transform: "translate(-50%, -200%)" },
484
447
  common: { transformOrigin: "center" },
485
448
  transitionProperty: "transform, opacity"
486
- }, Rt = {}, Ot = E(
487
- (t, { radius: o, color: n, gradient: s, variant: r, size: e, justify: a, autoContrast: i }) => {
449
+ }, Rt = {}, Bt = E(
450
+ (t, { radius: o, color: r, gradient: s, variant: e, size: n, justify: a, autoContrast: c }) => {
488
451
  const m = t.variantColorResolver({
489
- color: n || t.primaryColor,
452
+ color: r || t.primaryColor,
490
453
  theme: t,
491
454
  gradient: s,
492
- variant: r || "filled",
493
- autoContrast: i
455
+ variant: e || "filled",
456
+ autoContrast: c
494
457
  });
495
458
  return {
496
459
  root: {
497
460
  "--button-justify": a,
498
- "--button-height": L(e, "button-height"),
499
- "--button-padding-x": L(e, "button-padding-x"),
500
- "--button-fz": e != null && e.includes("compact") ? k(e.replace("compact-", "")) : k(e),
501
- "--button-radius": o === void 0 ? void 0 : ot(o),
502
- "--button-bg": n || r ? m.background : void 0,
503
- "--button-hover": n || r ? m.hover : void 0,
461
+ "--button-height": _(n, "button-height"),
462
+ "--button-padding-x": _(n, "button-padding-x"),
463
+ "--button-fz": n != null && n.includes("compact") ? D(n.replace("compact-", "")) : D(n),
464
+ "--button-radius": o === void 0 ? void 0 : z(o),
465
+ "--button-bg": r || e ? m.background : void 0,
466
+ "--button-hover": r || e ? m.hover : void 0,
504
467
  "--button-color": m.color,
505
- "--button-bd": n || r ? m.border : void 0,
506
- "--button-hover-color": n || r ? m.hoverColor : void 0
468
+ "--button-bd": r || e ? m.border : void 0,
469
+ "--button-hover-color": r || e ? m.hoverColor : void 0
507
470
  }
508
471
  };
509
472
  }
510
- ), G = tt((t, o) => {
511
- const n = P("Button", Rt, t), {
473
+ ), G = pt((t, o) => {
474
+ const r = N("Button", Rt, t), {
512
475
  style: s,
513
- vars: r,
514
- className: e,
476
+ vars: e,
477
+ className: n,
515
478
  color: a,
516
- disabled: i,
479
+ disabled: c,
517
480
  children: m,
518
- leftSection: p,
481
+ leftSection: l,
519
482
  rightSection: u,
520
- fullWidth: f,
521
- variant: g,
483
+ fullWidth: h,
484
+ variant: f,
522
485
  radius: v,
523
- loading: l,
486
+ loading: p,
524
487
  loaderProps: S,
525
488
  gradient: w,
526
- classNames: _,
527
- styles: C,
489
+ classNames: B,
490
+ styles: $,
528
491
  unstyled: x,
529
- "data-disabled": R,
530
- autoContrast: Q,
492
+ "data-disabled": O,
493
+ autoContrast: H,
531
494
  mod: d,
532
- ...N
533
- } = n, b = $({
495
+ ...P
496
+ } = r, y = k({
534
497
  name: "Button",
535
- props: n,
536
- classes: B,
537
- className: e,
498
+ props: r,
499
+ classes: R,
500
+ className: n,
538
501
  style: s,
539
- classNames: _,
540
- styles: C,
502
+ classNames: B,
503
+ styles: $,
541
504
  unstyled: x,
542
- vars: r,
543
- varsResolver: Ot
544
- }), O = !!p, ct = !!u;
545
- return /* @__PURE__ */ X(
546
- W,
505
+ vars: e,
506
+ varsResolver: Bt
507
+ }), T = !!l, at = !!u;
508
+ return /* @__PURE__ */ F(
509
+ dt,
547
510
  {
548
511
  ref: o,
549
- ...b("root", { active: !i && !l && !R }),
512
+ ...y("root", { active: !c && !p && !O }),
550
513
  unstyled: x,
551
- variant: g,
552
- disabled: i || l,
514
+ variant: f,
515
+ disabled: c || p,
553
516
  mod: [
554
517
  {
555
- disabled: i || R,
556
- loading: l,
557
- block: f,
558
- "with-left-section": O,
559
- "with-right-section": ct
518
+ disabled: c || O,
519
+ loading: p,
520
+ block: h,
521
+ "with-left-section": T,
522
+ "with-right-section": at
560
523
  },
561
524
  d
562
525
  ],
563
- ...N,
526
+ ...P,
564
527
  children: [
565
- /* @__PURE__ */ c(rt, { mounted: !!l, transition: _t, duration: 150, children: (mt) => /* @__PURE__ */ c(y, { component: "span", ...b("loader", { style: mt }), "aria-hidden": !0, children: /* @__PURE__ */ c(
566
- U,
528
+ /* @__PURE__ */ i(tt, { mounted: !!p, transition: Nt, duration: 150, children: (st) => /* @__PURE__ */ i(g, { component: "span", ...y("loader", { style: st }), "aria-hidden": !0, children: /* @__PURE__ */ i(
529
+ V,
567
530
  {
568
531
  color: "var(--button-color)",
569
532
  size: "calc(var(--button-height) / 1.8)",
570
533
  ...S
571
534
  }
572
535
  ) }) }),
573
- /* @__PURE__ */ X("span", { ...b("inner"), children: [
574
- p && /* @__PURE__ */ c(y, { component: "span", ...b("section"), mod: { position: "left" }, children: p }),
575
- /* @__PURE__ */ c(y, { component: "span", mod: { loading: l }, ...b("label"), children: m }),
576
- u && /* @__PURE__ */ c(y, { component: "span", ...b("section"), mod: { position: "right" }, children: u })
536
+ /* @__PURE__ */ F("span", { ...y("inner"), children: [
537
+ l && /* @__PURE__ */ i(g, { component: "span", ...y("section"), mod: { position: "left" }, children: l }),
538
+ /* @__PURE__ */ i(g, { component: "span", mod: { loading: p }, ...y("label"), children: m }),
539
+ u && /* @__PURE__ */ i(g, { component: "span", ...y("section"), mod: { position: "right" }, children: u })
577
540
  ] })
578
541
  ]
579
542
  }
580
543
  );
581
544
  });
582
- G.classes = B;
545
+ G.classes = R;
583
546
  G.displayName = "@mantine/core/Button";
584
547
  G.Group = A;
585
- G.GroupSection = H;
586
- const Tt = "_root_arz1h_1", Yt = {
587
- root: Tt
588
- }, Xt = (t) => /* @__PURE__ */ c(
548
+ G.GroupSection = U;
549
+ const Ot = "_root_arz1h_1", Tt = {
550
+ root: Ot
551
+ }, Ft = (t) => /* @__PURE__ */ i(
589
552
  G,
590
553
  {
591
554
  ...t,
592
- classNames: Yt
555
+ classNames: Tt
593
556
  }
594
557
  );
595
558
  export {
596
- Xt as Button
559
+ Ft as Button
597
560
  };