@kvell-group/ui 1.6.12 → 1.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
Binary file
@@ -1 +1 @@
1
- ._root_gdr8x_1{background-color:green;border-radius:12px;width:200px}._inner_gdr8x_7{background-color:red}._label_gdr8x_11{color:#ff0}
1
+ .m_87cf2631{background-color:transparent;cursor:pointer;border:0;padding:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;font-size:var(--mantine-font-size-md);text-align:left;text-decoration:none;color:inherit;touch-action:manipulation;-webkit-tap-highlight-color:transparent}:where([dir=rtl]) .m_87cf2631{text-align:right}.m_77c9d27d{--button-height-xs: 30px;--button-height-sm: 36px;--button-height-md: 42px;--button-height-lg: 50px;--button-height-xl: 60px;--button-height-compact-xs: 22px;--button-height-compact-sm: 26px;--button-height-compact-md: 30px;--button-height-compact-lg: 34px;--button-height-compact-xl: 40px;--button-padding-x-xs: 14px;--button-padding-x-sm: 18px;--button-padding-x-md: 22px;--button-padding-x-lg: 26px;--button-padding-x-xl: 32px;--button-padding-x-compact-xs: 7px;--button-padding-x-compact-sm: 8px;--button-padding-x-compact-md: 10px;--button-padding-x-compact-lg: 12px;--button-padding-x-compact-xl: 14px;--button-height: var(--button-height-sm);--button-padding-x: var(--button-padding-x-sm);--button-color: var(--mantine-color-white);-webkit-user-select:none;-moz-user-select:none;user-select:none;font-weight:600;position:relative;line-height:1;text-align:center;overflow:hidden;width:auto;cursor:pointer;display:inline-block;border-radius:var(--button-radius, var(--mantine-radius-default));font-size:var(--button-fz, var(--mantine-font-size-sm));background:var(--button-bg, var(--mantine-primary-color-filled));border:var(--button-bd, calc(.0625rem * var(--mantine-scale)) solid transparent);color:var(--button-color, var(--mantine-color-white));height:var(--button-height, var(--button-height-sm));padding-inline:var(--button-padding-x, var(--button-padding-x-sm));vertical-align:middle}.m_77c9d27d:where([data-block]){display:block;width:100%}.m_77c9d27d:where([data-with-left-section]){padding-inline-start:calc(var(--button-padding-x) / 1.5)}.m_77c9d27d:where([data-with-right-section]){padding-inline-end:calc(var(--button-padding-x) / 1.5)}.m_77c9d27d:where(:disabled:not([data-loading]),[data-disabled]:not([data-loading])){cursor:not-allowed;border:1px solid transparent;transform:none}:where([data-mantine-color-scheme=light]) .m_77c9d27d:where(:disabled:not([data-loading]),[data-disabled]:not([data-loading])){color:var(--mantine-color-gray-5);background:var(--mantine-color-gray-1)}:where([data-mantine-color-scheme=dark]) .m_77c9d27d:where(:disabled:not([data-loading]),[data-disabled]:not([data-loading])){color:var(--mantine-color-dark-3);background:var(--mantine-color-dark-6)}.m_77c9d27d:before{content:"";pointer-events:none;position:absolute;top:-1px;right:-1px;bottom:-1px;left:-1px;border-radius:var(--button-radius, var(--mantine-radius-default));transform:translateY(-100%);opacity:0;filter:blur(12px);transition:transform .15s ease,opacity .1s ease}:where([data-mantine-color-scheme=light]) .m_77c9d27d:before{background-color:#ffffff26}:where([data-mantine-color-scheme=dark]) .m_77c9d27d:before{background-color:#00000026}.m_77c9d27d:where([data-loading]){cursor:not-allowed;transform:none}.m_77c9d27d:where([data-loading]):before{transform:translateY(0);opacity:1}.m_77c9d27d:where([data-loading]) .m_80f1301b{opacity:0;transform:translateY(100%)}@media (hover: hover){.m_77c9d27d:hover:where(:not([data-loading],:disabled,[data-disabled])){background-color:var(--button-hover, var(--mantine-primary-color-filled-hover));color:var(--button-hover-color, var(--button-color))}}@media (hover: none){.m_77c9d27d:active:where(:not([data-loading],:disabled,[data-disabled])){background-color:var(--button-hover, var(--mantine-primary-color-filled-hover));color:var(--button-hover-color, var(--button-color))}}.m_80f1301b{display:flex;align-items:center;justify-content:var(--button-justify, center);height:100%;overflow:visible;transition:transform .15s ease,opacity .1s ease}.m_811560b9{white-space:nowrap;height:100%;overflow:hidden;display:flex;align-items:center;opacity:1}.m_811560b9:where([data-loading]){opacity:.2}.m_a74036a{display:flex;align-items:center}.m_a74036a:where([data-position=left]){margin-inline-end:var(--mantine-spacing-xs)}.m_a74036a:where([data-position=right]){margin-inline-start:var(--mantine-spacing-xs)}.m_a25b86ee{position:absolute;left:50%;top:50%}.m_80d6d844{--button-border-width: 1px;display:flex}.m_80d6d844 :where(.m_77c9d27d):focus{position:relative;z-index:1}.m_80d6d844[data-orientation=horizontal]{flex-direction:row}.m_80d6d844[data-orientation=horizontal] .m_77c9d27d:not(:only-child):first-child,.m_80d6d844[data-orientation=horizontal] .m_70be2a01:not(:only-child):first-child{border-end-end-radius:0;border-start-end-radius:0;border-inline-end-width:calc(var(--button-border-width) / 2)}.m_80d6d844[data-orientation=horizontal] .m_77c9d27d:not(:only-child):last-child,.m_80d6d844[data-orientation=horizontal] .m_70be2a01:not(:only-child):last-child{border-end-start-radius:0;border-start-start-radius:0;border-inline-start-width:calc(var(--button-border-width) / 2)}.m_80d6d844[data-orientation=horizontal] .m_77c9d27d:not(:only-child):not(:first-child):not(:last-child),.m_80d6d844[data-orientation=horizontal] .m_70be2a01:not(:only-child):not(:first-child):not(:last-child){border-radius:0;border-inline-width:calc(var(--button-border-width) / 2)}.m_80d6d844[data-orientation=vertical]{flex-direction:column}.m_80d6d844[data-orientation=vertical] .m_77c9d27d:not(:only-child):first-child,.m_80d6d844[data-orientation=vertical] .m_70be2a01:not(:only-child):first-child{border-end-start-radius:0;border-end-end-radius:0;border-bottom-width:calc(var(--button-border-width) / 2)}.m_80d6d844[data-orientation=vertical] .m_77c9d27d:not(:only-child):last-child,.m_80d6d844[data-orientation=vertical] .m_70be2a01:not(:only-child):last-child{border-start-start-radius:0;border-start-end-radius:0;border-top-width:calc(var(--button-border-width) / 2)}.m_80d6d844[data-orientation=vertical] .m_77c9d27d:not(:only-child):not(:first-child):not(:last-child),.m_80d6d844[data-orientation=vertical] .m_70be2a01:not(:only-child):not(:first-child):not(:last-child){border-radius:0;border-bottom-width:calc(var(--button-border-width) / 2);border-top-width:calc(var(--button-border-width) / 2)}.m_70be2a01{--section-height-xs: 30px;--section-height-sm: 36px;--section-height-md: 42px;--section-height-lg: 50px;--section-height-xl: 60px;--section-height-compact-xs: 22px;--section-height-compact-sm: 26px;--section-height-compact-md: 30px;--section-height-compact-lg: 34px;--section-height-compact-xl: 40px;--section-padding-x-xs: 14px;--section-padding-x-sm: 18px;--section-padding-x-md: 22px;--section-padding-x-lg: 26px;--section-padding-x-xl: 32px;--section-padding-x-compact-xs: 7px;--section-padding-x-compact-sm: 8px;--section-padding-x-compact-md: 10px;--section-padding-x-compact-lg: 12px;--section-padding-x-compact-xl: 14px;--section-height: var(--section-height-sm);--section-padding-x: var(--section-padding-x-sm);--section-color: var(--mantine-color-white);font-weight:600;width:auto;border-radius:var(--section-radius, var(--mantine-radius-default));font-size:var(--section-fz, var(--mantine-font-size-sm));background:var(--section-bg, var(--mantine-primary-color-filled));border:var(--section-bd, calc(.0625rem * var(--mantine-scale)) solid transparent);color:var(--section-color, var(--mantine-color-white));height:var(--section-height, var(--section-height-sm));padding-inline:var(--section-padding-x, var(--section-padding-x-sm));vertical-align:middle;line-height:1;display:inline-flex;align-items:center;justify-content:center}._root_1w9zb_1{background-color:var(--mantine-color-primary-0);border-radius:12px;color:var(--mantine-color-white);height:3rem;font-weight:500}
@@ -1,6 +1,6 @@
1
- import { jsx as f, jsxs as k, Fragment as q } from "react/jsx-runtime";
2
- import { r as P, u as F, h as er, i as or, j as ar, l as ir, k as tt, a as sr, p as dt, m as cr, n as pr, o as mr } from "../../MantineThemeProvider-CyD9KzqB.js";
3
- import { useState as Q, useRef as j, useEffect as z, useId as ur, forwardRef as R } from "react";
1
+ import { jsx as f, jsxs as j, Fragment as q } from "react/jsx-runtime";
2
+ import { r as R, u as k, h as er, i as or, j as ar, l as ir, k as tt, a as sr, p as dt, m as cr, n as pr, o as mr } from "../../MantineThemeProvider-CyD9KzqB.js";
3
+ import { useState as Q, useRef as M, useEffect as W, useId as ur, forwardRef as P } from "react";
4
4
  import lr from "react-dom";
5
5
  import '../../assets/Button.css';function fr(t) {
6
6
  return t.replace(/[A-Z]/g, (r) => `-${r.toLowerCase()}`);
@@ -21,7 +21,7 @@ function yt(t) {
21
21
  }
22
22
  function A(t, r = "size", n = !0) {
23
23
  if (t !== void 0)
24
- return yt(t) ? n ? P(t) : t : `var(--${r}-${t})`;
24
+ return yt(t) ? n ? R(t) : t : `var(--${r}-${t})`;
25
25
  }
26
26
  function gt(t) {
27
27
  return t === void 0 ? "var(--mantine-radius-default)" : A(t, "mantine-radius");
@@ -44,39 +44,39 @@ function gr(t, r, { getInitialValueInEffect: n } = {
44
44
  }) {
45
45
  const [e, o] = Q(
46
46
  n ? r : yr(t)
47
- ), a = j(null);
48
- return z(() => {
47
+ ), a = M(null);
48
+ return W(() => {
49
49
  if ("matchMedia" in window)
50
50
  return a.current = window.matchMedia(t), o(a.current.matches), dr(a.current, (i) => o(i.matches));
51
51
  }, [t]), e;
52
52
  }
53
- function hr(t, r) {
54
- const n = j(!1);
55
- z(
53
+ function br(t, r) {
54
+ const n = M(!1);
55
+ W(
56
56
  () => () => {
57
57
  n.current = !1;
58
58
  },
59
59
  []
60
- ), z(() => {
60
+ ), W(() => {
61
61
  if (n.current)
62
62
  return t();
63
63
  n.current = !0;
64
64
  }, r);
65
65
  }
66
- function br(t, r) {
66
+ function hr(t, r) {
67
67
  return gr("(prefers-reduced-motion: reduce)", t, r);
68
68
  }
69
- function ht(t) {
69
+ function bt(t) {
70
70
  var r, n, e = "";
71
71
  if (typeof t == "string" || typeof t == "number") e += t;
72
72
  else if (typeof t == "object") if (Array.isArray(t)) {
73
73
  var o = t.length;
74
- for (r = 0; r < o; r++) t[r] && (n = ht(t[r])) && (e && (e += " "), e += n);
74
+ for (r = 0; r < o; r++) t[r] && (n = bt(t[r])) && (e && (e += " "), e += n);
75
75
  } else for (n in t) t[n] && (e && (e += " "), e += n);
76
76
  return e;
77
77
  }
78
78
  function L() {
79
- for (var t, r, n = 0, e = "", o = arguments.length; n < o; n++) (t = arguments[n]) && (r = ht(t)) && (e && (e += " "), e += r);
79
+ for (var t, r, n = 0, e = "", o = arguments.length; n < o; n++) (t = arguments[n]) && (r = bt(t)) && (e && (e += " "), e += r);
80
80
  return e;
81
81
  }
82
82
  const Sr = {};
@@ -102,13 +102,13 @@ const Nr = {
102
102
  auto: "mantine-focus-auto",
103
103
  never: "mantine-focus-never"
104
104
  };
105
- function xr({ theme: t, options: r, unstyled: n }) {
105
+ function wr({ theme: t, options: r, unstyled: n }) {
106
106
  return L(
107
107
  (r == null ? void 0 : r.focusable) && !n && (t.focusClassName || Nr[t.focusRing]),
108
108
  (r == null ? void 0 : r.active) && !n && t.activeClassName
109
109
  );
110
110
  }
111
- function wr({
111
+ function xr({
112
112
  selector: t,
113
113
  stylesCtx: r,
114
114
  options: n,
@@ -145,7 +145,7 @@ function Tr({
145
145
  }) {
146
146
  return e === !1 ? [] : t.map((o) => `${r}-${o}-${n}`);
147
147
  }
148
- function Pr({
148
+ function Rr({
149
149
  themeName: t,
150
150
  theme: r,
151
151
  selector: n,
@@ -164,7 +164,7 @@ function Pr({
164
164
  }
165
165
  );
166
166
  }
167
- function Rr({
167
+ function Pr({
168
168
  options: t,
169
169
  classes: r,
170
170
  selector: n,
@@ -190,12 +190,12 @@ function Cr({
190
190
  transformedStyles: d
191
191
  }) {
192
192
  return L(
193
- xr({ theme: t, options: r, unstyled: s || g }),
194
- Pr({ theme: t, themeName: n, selector: e, props: m, stylesCtx: u }),
195
- Rr({ options: r, classes: i, selector: e, unstyled: s }),
193
+ wr({ theme: t, options: r, unstyled: s || g }),
194
+ Rr({ theme: t, themeName: n, selector: e, props: m, stylesCtx: u }),
195
+ Pr({ options: r, classes: i, selector: e, unstyled: s }),
196
196
  ct({ selector: e, stylesCtx: u, theme: t, classNames: a, props: m }),
197
197
  ct({ selector: e, stylesCtx: u, theme: t, classNames: d, props: m }),
198
- wr({ selector: e, stylesCtx: u, options: r, props: m, theme: t }),
198
+ xr({ selector: e, stylesCtx: u, options: r, props: m, theme: t }),
199
199
  $r({ rootSelector: c, selector: e, className: p }),
200
200
  _r({ selector: e, classes: i, unstyled: s || g }),
201
201
  l && !g && Tr({
@@ -283,7 +283,7 @@ function Lr({
283
283
  }
284
284
  function Yr({ props: t, stylesCtx: r, themeName: n }) {
285
285
  var i;
286
- const e = F(), o = (i = er()) == null ? void 0 : i();
286
+ const e = k(), o = (i = er()) == null ? void 0 : i();
287
287
  return {
288
288
  getTransformedStyles: (s) => o ? [
289
289
  ...s.map(
@@ -299,7 +299,7 @@ function Yr({ props: t, stylesCtx: r, themeName: n }) {
299
299
  withStylesTransform: !!o
300
300
  };
301
301
  }
302
- function I({
302
+ function z({
303
303
  name: t,
304
304
  classes: r,
305
305
  props: n,
@@ -313,16 +313,16 @@ function I({
313
313
  vars: m,
314
314
  varsResolver: u
315
315
  }) {
316
- const l = F(), g = or(), d = ar(), b = ir(), h = (Array.isArray(t) ? t : [t]).filter((S) => S), { withStylesTransform: x, getTransformedStyles: T } = Yr({
316
+ const l = k(), g = or(), d = ar(), h = ir(), b = (Array.isArray(t) ? t : [t]).filter((S) => S), { withStylesTransform: w, getTransformedStyles: T } = Yr({
317
317
  props: n,
318
318
  stylesCtx: e,
319
- themeName: h
319
+ themeName: b
320
320
  });
321
321
  return (S, N) => ({
322
322
  className: Cr({
323
323
  theme: l,
324
324
  options: N,
325
- themeName: h,
325
+ themeName: b,
326
326
  selector: S,
327
327
  classNamesPrefix: g,
328
328
  classNames: p,
@@ -333,12 +333,12 @@ function I({
333
333
  props: n,
334
334
  stylesCtx: e,
335
335
  withStaticClasses: d,
336
- headless: b,
336
+ headless: h,
337
337
  transformedStyles: T([N == null ? void 0 : N.styles, c])
338
338
  }),
339
339
  style: Lr({
340
340
  theme: l,
341
- themeName: h,
341
+ themeName: b,
342
342
  selector: S,
343
343
  options: N,
344
344
  props: n,
@@ -348,14 +348,14 @@ function I({
348
348
  style: a,
349
349
  vars: m,
350
350
  varsResolver: u,
351
- headless: b,
352
- withStylesTransform: x
351
+ headless: h,
352
+ withStylesTransform: w
353
353
  })
354
354
  });
355
355
  }
356
356
  function O(t, r, n) {
357
357
  var i;
358
- const e = F(), o = (i = e.components[t]) == null ? void 0 : i.defaultProps, a = typeof o == "function" ? o(e) : o;
358
+ const e = k(), o = (i = e.components[t]) == null ? void 0 : i.defaultProps, a = typeof o == "function" ? o(e) : o;
359
359
  return { ...r, ...a, ...rt(n) };
360
360
  }
361
361
  function X(t) {
@@ -397,15 +397,15 @@ function jr(t) {
397
397
  py: l,
398
398
  pt: g,
399
399
  pb: d,
400
- pl: b,
401
- pr: h,
402
- pe: x,
400
+ pl: h,
401
+ pr: b,
402
+ pe: w,
403
403
  ps: T,
404
404
  bd: S,
405
405
  bg: N,
406
406
  c: C,
407
407
  opacity: y,
408
- ff: w,
408
+ ff: x,
409
409
  fz: v,
410
410
  fw: B,
411
411
  lts: H,
@@ -420,10 +420,10 @@ function jr(t) {
420
420
  h: Mt,
421
421
  mih: jt,
422
422
  mah: kt,
423
- bgsz: Ft,
424
- bgp: It,
425
- bgr: Wt,
426
- bga: zt,
423
+ bgsz: zt,
424
+ bgp: Ft,
425
+ bgr: It,
426
+ bga: Wt,
427
427
  pos: Gt,
428
428
  top: Dt,
429
429
  left: Ht,
@@ -454,15 +454,15 @@ function jr(t) {
454
454
  py: l,
455
455
  pt: g,
456
456
  pb: d,
457
- pl: b,
458
- pr: h,
459
- pe: x,
457
+ pl: h,
458
+ pr: b,
459
+ pe: w,
460
460
  ps: T,
461
461
  bd: S,
462
462
  bg: N,
463
463
  c: C,
464
464
  opacity: y,
465
- ff: w,
465
+ ff: x,
466
466
  fz: v,
467
467
  fw: B,
468
468
  lts: H,
@@ -477,10 +477,10 @@ function jr(t) {
477
477
  h: Mt,
478
478
  mih: jt,
479
479
  mah: kt,
480
- bgsz: Ft,
481
- bgp: It,
482
- bgr: Wt,
483
- bga: zt,
480
+ bgsz: zt,
481
+ bgp: Ft,
482
+ bgr: It,
483
+ bga: Wt,
484
484
  pos: Gt,
485
485
  top: Dt,
486
486
  left: Ht,
@@ -551,16 +551,16 @@ function et(t, r) {
551
551
  const n = dt({ color: t, theme: r });
552
552
  return n.color === "dimmed" ? "var(--mantine-color-dimmed)" : n.color === "bright" ? "var(--mantine-color-bright)" : n.variable ? `var(${n.variable})` : n.color;
553
553
  }
554
- function Fr(t, r) {
554
+ function zr(t, r) {
555
555
  const n = dt({ color: t, theme: r });
556
556
  return n.isThemeColor && n.shade === void 0 ? `var(--mantine-color-${n.color}-text)` : et(t, r);
557
557
  }
558
- function Ir(t, r) {
558
+ function Fr(t, r) {
559
559
  if (typeof t == "number")
560
- return P(t);
560
+ return R(t);
561
561
  if (typeof t == "string") {
562
562
  const [n, e, ...o] = t.split(" ").filter((i) => i.trim() !== "");
563
- let a = `${P(n)}`;
563
+ let a = `${R(n)}`;
564
564
  return e && (a += ` ${e}`), o.length > 0 && (a += ` ${et(o.join(" "), r)}`), a.trim();
565
565
  }
566
566
  return t;
@@ -572,12 +572,12 @@ const pt = {
572
572
  heading: "var(--mantine-font-family-headings)",
573
573
  headings: "var(--mantine-font-family-headings)"
574
574
  };
575
- function Wr(t) {
575
+ function Ir(t) {
576
576
  return typeof t == "string" && t in pt ? pt[t] : t;
577
577
  }
578
- const zr = ["h1", "h2", "h3", "h4", "h5", "h6"];
578
+ const Wr = ["h1", "h2", "h3", "h4", "h5", "h6"];
579
579
  function Gr(t, r) {
580
- return typeof t == "string" && t in r.fontSizes ? `var(--mantine-font-size-${t})` : typeof t == "string" && zr.includes(t) ? `var(--mantine-${t}-font-size)` : typeof t == "number" ? P(t) : typeof t == "string" ? P(t) : t;
580
+ return typeof t == "string" && t in r.fontSizes ? `var(--mantine-font-size-${t})` : typeof t == "string" && Wr.includes(t) ? `var(--mantine-${t}-font-size)` : typeof t == "number" ? R(t) : typeof t == "string" ? R(t) : t;
581
581
  }
582
582
  function Dr(t) {
583
583
  return t;
@@ -587,15 +587,15 @@ function Vr(t, r) {
587
587
  return typeof t == "string" && t in r.lineHeights ? `var(--mantine-line-height-${t})` : typeof t == "string" && Hr.includes(t) ? `var(--mantine-${t}-line-height)` : t;
588
588
  }
589
589
  function Xr(t) {
590
- return typeof t == "number" ? P(t) : t;
590
+ return typeof t == "number" ? R(t) : t;
591
591
  }
592
592
  function Ur(t, r) {
593
593
  if (typeof t == "number")
594
- return P(t);
594
+ return R(t);
595
595
  if (typeof t == "string") {
596
596
  const n = t.replace("-", "");
597
597
  if (!(n in r.spacing))
598
- return P(t);
598
+ return R(t);
599
599
  const e = `--mantine-spacing-${n}`;
600
600
  return t.startsWith("-") ? `calc(var(${e}) * -1)` : `var(${e})`;
601
601
  }
@@ -603,14 +603,14 @@ function Ur(t, r) {
603
603
  }
604
604
  const U = {
605
605
  color: et,
606
- textColor: Fr,
606
+ textColor: zr,
607
607
  fontSize: Gr,
608
608
  spacing: Ur,
609
609
  identity: Dr,
610
610
  size: Xr,
611
611
  lineHeight: Vr,
612
- fontFamily: Wr,
613
- border: Ir
612
+ fontFamily: Ir,
613
+ border: Fr
614
614
  };
615
615
  function mt(t) {
616
616
  return t.replace("(min-width: ", "").replace("em)", "");
@@ -679,17 +679,17 @@ function tn({
679
679
  function rn() {
680
680
  return `__m__-${ur().replace(/:/g, "")}`;
681
681
  }
682
- function bt(t) {
682
+ function ht(t) {
683
683
  return t.startsWith("data-") ? t : `data-${t}`;
684
684
  }
685
685
  function nn(t) {
686
686
  return Object.keys(t).reduce((r, n) => {
687
687
  const e = t[n];
688
- return e === void 0 || e === "" || e === !1 || e === null || (r[bt(n)] = t[n]), r;
688
+ return e === void 0 || e === "" || e === !1 || e === null || (r[ht(n)] = t[n]), r;
689
689
  }, {});
690
690
  }
691
691
  function St(t) {
692
- return t ? typeof t == "string" ? { [bt(t)]: !0 } : Array.isArray(t) ? [...t].reduce(
692
+ return t ? typeof t == "string" ? { [ht(t)]: !0 } : Array.isArray(t) ? [...t].reduce(
693
693
  (r, n) => ({ ...r, ...St(n) }),
694
694
  {}
695
695
  ) : nn(t) : null;
@@ -709,7 +709,7 @@ function en({
709
709
  const o = J(r, t), a = J(n, t);
710
710
  return { ...o, ...a, ...e };
711
711
  }
712
- const vt = R(
712
+ const vt = P(
713
713
  ({
714
714
  component: t,
715
715
  style: r,
@@ -727,14 +727,14 @@ const vt = R(
727
727
  ...g
728
728
  }, d) => {
729
729
  var v;
730
- const b = F(), h = t || "div", { styleProps: x, rest: T } = jr(g), S = cr(), N = (v = S == null ? void 0 : S()) == null ? void 0 : v(x.sx), C = rn(), y = tn({
731
- styleProps: x,
732
- theme: b,
730
+ const h = k(), b = t || "div", { styleProps: w, rest: T } = jr(g), S = cr(), N = (v = S == null ? void 0 : S()) == null ? void 0 : v(w.sx), C = rn(), y = tn({
731
+ styleProps: w,
732
+ theme: h,
733
733
  data: kr
734
- }), w = {
734
+ }), x = {
735
735
  ref: d,
736
736
  style: en({
737
- theme: b,
737
+ theme: h,
738
738
  style: r,
739
739
  vars: n,
740
740
  styleProps: y.inlineStyles
@@ -752,7 +752,7 @@ const vt = R(
752
752
  ...St(a),
753
753
  ...T
754
754
  };
755
- return /* @__PURE__ */ k(q, { children: [
755
+ return /* @__PURE__ */ j(q, { children: [
756
756
  y.hasResponsiveStyles && /* @__PURE__ */ f(
757
757
  Mr,
758
758
  {
@@ -761,7 +761,7 @@ const vt = R(
761
761
  media: y.media
762
762
  }
763
763
  ),
764
- typeof u == "function" ? u(w) : /* @__PURE__ */ f(h, { ...w })
764
+ typeof u == "function" ? u(x) : /* @__PURE__ */ f(b, { ...x })
765
765
  ] });
766
766
  }
767
767
  );
@@ -771,23 +771,23 @@ function Nt(t) {
771
771
  return t;
772
772
  }
773
773
  function ot(t) {
774
- const r = R(t);
774
+ const r = P(t);
775
775
  return r.extend = Nt, r.withProps = (n) => {
776
- const e = R((o, a) => /* @__PURE__ */ f(r, { ...n, ...o, ref: a }));
776
+ const e = P((o, a) => /* @__PURE__ */ f(r, { ...n, ...o, ref: a }));
777
777
  return e.extend = r.extend, e.displayName = `WithProps(${r.displayName})`, e;
778
778
  }, r;
779
779
  }
780
- function xt(t) {
781
- const r = R(t);
780
+ function wt(t) {
781
+ const r = P(t);
782
782
  return r.withProps = (n) => {
783
- const e = R((o, a) => /* @__PURE__ */ f(r, { ...n, ...o, ref: a }));
783
+ const e = P((o, a) => /* @__PURE__ */ f(r, { ...n, ...o, ref: a }));
784
784
  return e.extend = r.extend, e.displayName = `WithProps(${r.displayName})`, e;
785
785
  }, r.extend = Nt, r;
786
786
  }
787
- var wt = { root: "m_87cf2631" };
787
+ var xt = { root: "m_87cf2631" };
788
788
  const on = {
789
789
  __staticSelector: "UnstyledButton"
790
- }, at = xt(
790
+ }, at = wt(
791
791
  (t, r) => {
792
792
  const n = O("UnstyledButton", on, t), {
793
793
  className: e,
@@ -798,10 +798,10 @@ const on = {
798
798
  styles: p,
799
799
  style: c,
800
800
  ...m
801
- } = n, u = I({
801
+ } = n, u = z({
802
802
  name: a,
803
803
  props: n,
804
- classes: wt,
804
+ classes: xt,
805
805
  className: e,
806
806
  style: c,
807
807
  classNames: s,
@@ -820,13 +820,13 @@ const on = {
820
820
  );
821
821
  }
822
822
  );
823
- at.classes = wt;
823
+ at.classes = xt;
824
824
  at.displayName = "@mantine/core/UnstyledButton";
825
- const M = (t) => ({
825
+ const E = (t) => ({
826
826
  in: { opacity: 1, transform: "scale(1)" },
827
827
  out: { opacity: 0, transform: `scale(.9) translateY(${t === "bottom" ? 10 : -10}px)` },
828
828
  transitionProperty: "transform, opacity"
829
- }), W = {
829
+ }), I = {
830
830
  fade: {
831
831
  in: { opacity: 1 },
832
832
  out: { opacity: 0 },
@@ -919,23 +919,23 @@ const M = (t) => ({
919
919
  transitionProperty: "transform, opacity"
920
920
  },
921
921
  pop: {
922
- ...M("bottom"),
922
+ ...E("bottom"),
923
923
  common: { transformOrigin: "center center" }
924
924
  },
925
925
  "pop-bottom-left": {
926
- ...M("bottom"),
926
+ ...E("bottom"),
927
927
  common: { transformOrigin: "bottom left" }
928
928
  },
929
929
  "pop-bottom-right": {
930
- ...M("bottom"),
930
+ ...E("bottom"),
931
931
  common: { transformOrigin: "bottom right" }
932
932
  },
933
933
  "pop-top-left": {
934
- ...M("top"),
934
+ ...E("top"),
935
935
  common: { transformOrigin: "top left" }
936
936
  },
937
937
  "pop-top-right": {
938
- ...M("top"),
938
+ ...E("top"),
939
939
  common: { transformOrigin: "top right" }
940
940
  }
941
941
  }, ut = {
@@ -958,11 +958,11 @@ function an({
958
958
  transitionDuration: `${n}ms`,
959
959
  transitionTimingFunction: e
960
960
  };
961
- return typeof t == "string" ? t in W ? {
962
- transitionProperty: W[t].transitionProperty,
961
+ return typeof t == "string" ? t in I ? {
962
+ transitionProperty: I[t].transitionProperty,
963
963
  ...o,
964
- ...W[t].common,
965
- ...W[t][ut[r]]
964
+ ...I[t].common,
965
+ ...I[t][ut[r]]
966
966
  } : {} : {
967
967
  transitionProperty: t.transitionProperty,
968
968
  ...o,
@@ -982,16 +982,16 @@ function sn({
982
982
  enterDelay: p,
983
983
  exitDelay: c
984
984
  }) {
985
- const m = F(), u = br(), l = m.respectReducedMotion ? u : !1, [g, d] = Q(l ? 0 : t), [b, h] = Q(e ? "entered" : "exited"), x = j(-1), T = j(-1), S = j(-1), N = (y) => {
986
- const w = y ? o : a, v = y ? i : s;
987
- window.clearTimeout(x.current);
985
+ const m = k(), u = hr(), l = m.respectReducedMotion ? u : !1, [g, d] = Q(l ? 0 : t), [h, b] = Q(e ? "entered" : "exited"), w = M(-1), T = M(-1), S = M(-1), N = (y) => {
986
+ const x = y ? o : a, v = y ? i : s;
987
+ window.clearTimeout(w.current);
988
988
  const B = l ? 0 : y ? t : r;
989
- d(B), B === 0 ? (typeof w == "function" && w(), typeof v == "function" && v(), h(y ? "entered" : "exited")) : S.current = requestAnimationFrame(() => {
989
+ d(B), B === 0 ? (typeof x == "function" && x(), typeof v == "function" && v(), b(y ? "entered" : "exited")) : S.current = requestAnimationFrame(() => {
990
990
  lr.flushSync(() => {
991
- h(y ? "pre-entering" : "pre-exiting");
991
+ b(y ? "pre-entering" : "pre-exiting");
992
992
  }), S.current = requestAnimationFrame(() => {
993
- typeof w == "function" && w(), h(y ? "entering" : "exiting"), x.current = window.setTimeout(() => {
994
- typeof v == "function" && v(), h(y ? "entered" : "exited");
993
+ typeof x == "function" && x(), b(y ? "entering" : "exiting"), w.current = window.setTimeout(() => {
994
+ typeof v == "function" && v(), b(y ? "entered" : "exited");
995
995
  }, B);
996
996
  });
997
997
  });
@@ -1007,16 +1007,16 @@ function sn({
1007
1007
  y ? p : c
1008
1008
  );
1009
1009
  };
1010
- return hr(() => {
1010
+ return br(() => {
1011
1011
  C(e);
1012
- }, [e]), z(
1012
+ }, [e]), W(
1013
1013
  () => () => {
1014
- window.clearTimeout(x.current), cancelAnimationFrame(S.current);
1014
+ window.clearTimeout(w.current), cancelAnimationFrame(S.current);
1015
1015
  },
1016
1016
  []
1017
1017
  ), {
1018
1018
  transitionDuration: g,
1019
- transitionStatus: b,
1019
+ transitionStatus: h,
1020
1020
  transitionTimingFunction: n || "ease"
1021
1021
  };
1022
1022
  }
@@ -1035,7 +1035,7 @@ function $t({
1035
1035
  enterDelay: u,
1036
1036
  exitDelay: l
1037
1037
  }) {
1038
- const g = pr(), { transitionDuration: d, transitionStatus: b, transitionTimingFunction: h } = sn({
1038
+ const g = pr(), { transitionDuration: d, transitionStatus: h, transitionTimingFunction: b } = sn({
1039
1039
  mounted: o,
1040
1040
  exitDuration: e,
1041
1041
  duration: n,
@@ -1047,37 +1047,37 @@ function $t({
1047
1047
  enterDelay: u,
1048
1048
  exitDelay: l
1049
1049
  });
1050
- return d === 0 || g === "test" ? o ? /* @__PURE__ */ f(q, { children: a({}) }) : t ? a({ display: "none" }) : null : b === "exited" ? t ? a({ display: "none" }) : null : /* @__PURE__ */ f(q, { children: a(
1050
+ return d === 0 || g === "test" ? o ? /* @__PURE__ */ f(q, { children: a({}) }) : t ? a({ display: "none" }) : null : h === "exited" ? t ? a({ display: "none" }) : null : /* @__PURE__ */ f(q, { children: a(
1051
1051
  an({
1052
1052
  transition: r,
1053
1053
  duration: d,
1054
- state: b,
1055
- timingFunction: h
1054
+ state: h,
1055
+ timingFunction: b
1056
1056
  })
1057
1057
  ) });
1058
1058
  }
1059
1059
  $t.displayName = "@mantine/core/Transition";
1060
1060
  var _ = { 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" };
1061
- const _t = R(({ className: t, ...r }, n) => /* @__PURE__ */ k($, { component: "span", className: L(_.barsLoader, t), ...r, ref: n, children: [
1061
+ const _t = P(({ className: t, ...r }, n) => /* @__PURE__ */ j($, { component: "span", className: L(_.barsLoader, t), ...r, ref: n, children: [
1062
1062
  /* @__PURE__ */ f("span", { className: _.bar }),
1063
1063
  /* @__PURE__ */ f("span", { className: _.bar }),
1064
1064
  /* @__PURE__ */ f("span", { className: _.bar })
1065
1065
  ] }));
1066
1066
  _t.displayName = "@mantine/core/Bars";
1067
- const Tt = R(({ className: t, ...r }, n) => /* @__PURE__ */ k($, { component: "span", className: L(_.dotsLoader, t), ...r, ref: n, children: [
1067
+ const Tt = P(({ className: t, ...r }, n) => /* @__PURE__ */ j($, { component: "span", className: L(_.dotsLoader, t), ...r, ref: n, children: [
1068
1068
  /* @__PURE__ */ f("span", { className: _.dot }),
1069
1069
  /* @__PURE__ */ f("span", { className: _.dot }),
1070
1070
  /* @__PURE__ */ f("span", { className: _.dot })
1071
1071
  ] }));
1072
1072
  Tt.displayName = "@mantine/core/Dots";
1073
- const Pt = R(({ className: t, ...r }, n) => /* @__PURE__ */ f($, { component: "span", className: L(_.ovalLoader, t), ...r, ref: n }));
1074
- Pt.displayName = "@mantine/core/Oval";
1075
- const Rt = {
1073
+ const Rt = P(({ className: t, ...r }, n) => /* @__PURE__ */ f($, { component: "span", className: L(_.ovalLoader, t), ...r, ref: n }));
1074
+ Rt.displayName = "@mantine/core/Oval";
1075
+ const Pt = {
1076
1076
  bars: _t,
1077
- oval: Pt,
1077
+ oval: Rt,
1078
1078
  dots: Tt
1079
1079
  }, cn = {
1080
- loaders: Rt,
1080
+ loaders: Pt,
1081
1081
  type: "oval"
1082
1082
  }, pn = (t, { size: r, color: n }) => ({
1083
1083
  root: {
@@ -1098,8 +1098,8 @@ const Rt = {
1098
1098
  loaders: l,
1099
1099
  variant: g,
1100
1100
  children: d,
1101
- ...b
1102
- } = n, h = I({
1101
+ ...h
1102
+ } = n, b = z({
1103
1103
  name: "Loader",
1104
1104
  props: n,
1105
1105
  classes: _,
@@ -1111,26 +1111,26 @@ const Rt = {
1111
1111
  vars: i,
1112
1112
  varsResolver: pn
1113
1113
  });
1114
- return d ? /* @__PURE__ */ f($, { ...h("root"), ref: r, ...b, children: d }) : /* @__PURE__ */ f(
1114
+ return d ? /* @__PURE__ */ f($, { ...b("root"), ref: r, ...h, children: d }) : /* @__PURE__ */ f(
1115
1115
  $,
1116
1116
  {
1117
- ...h("root"),
1117
+ ...b("root"),
1118
1118
  ref: r,
1119
1119
  component: l[a],
1120
1120
  variant: g,
1121
1121
  size: e,
1122
- ...b
1122
+ ...h
1123
1123
  }
1124
1124
  );
1125
1125
  });
1126
- D.defaultLoaders = Rt;
1126
+ D.defaultLoaders = Pt;
1127
1127
  D.classes = _;
1128
1128
  D.displayName = "@mantine/core/Loader";
1129
1129
  var Y = { root: "m_77c9d27d", inner: "m_80f1301b", label: "m_811560b9", section: "m_a74036a", loader: "m_a25b86ee", group: "m_80d6d844", groupSection: "m_70be2a01" };
1130
1130
  const lt = {
1131
1131
  orientation: "horizontal"
1132
1132
  }, mn = (t, { borderWidth: r }) => ({
1133
- group: { "--button-border-width": P(r) }
1133
+ group: { "--button-border-width": R(r) }
1134
1134
  }), it = ot((t, r) => {
1135
1135
  const n = O("ButtonGroup", lt, t), {
1136
1136
  className: e,
@@ -1144,7 +1144,7 @@ const lt = {
1144
1144
  variant: u,
1145
1145
  mod: l,
1146
1146
  ...g
1147
- } = O("ButtonGroup", lt, t), d = I({
1147
+ } = O("ButtonGroup", lt, t), d = z({
1148
1148
  name: "ButtonGroup",
1149
1149
  props: n,
1150
1150
  classes: Y,
@@ -1203,7 +1203,7 @@ const ft = {}, un = (t, { radius: r, color: n, gradient: e, variant: o, autoCont
1203
1203
  radius: u,
1204
1204
  autoContrast: l,
1205
1205
  ...g
1206
- } = O("ButtonGroupSection", ft, t), d = I({
1206
+ } = O("ButtonGroupSection", ft, t), d = z({
1207
1207
  name: "ButtonGroupSection",
1208
1208
  props: n,
1209
1209
  classes: Y,
@@ -1221,7 +1221,7 @@ const ft = {}, un = (t, { radius: r, color: n, gradient: e, variant: o, autoCont
1221
1221
  st.classes = Y;
1222
1222
  st.displayName = "@mantine/core/ButtonGroupSection";
1223
1223
  const ln = {
1224
- in: { opacity: 1, transform: `translate(-50%, calc(-50% + ${P(1)}))` },
1224
+ in: { opacity: 1, transform: `translate(-50%, calc(-50% + ${R(1)}))` },
1225
1225
  out: { opacity: 0, transform: "translate(-50%, -200%)" },
1226
1226
  common: { transformOrigin: "center" },
1227
1227
  transitionProperty: "transform, opacity"
@@ -1247,7 +1247,7 @@ const ln = {
1247
1247
  "--button-hover-color": n || o ? p.hoverColor : void 0
1248
1248
  }
1249
1249
  };
1250
- }, E = xt((t, r) => {
1250
+ }, F = wt((t, r) => {
1251
1251
  const n = O("Button", fn, t), {
1252
1252
  style: e,
1253
1253
  vars: o,
@@ -1261,28 +1261,28 @@ const ln = {
1261
1261
  variant: l,
1262
1262
  radius: g,
1263
1263
  loading: d,
1264
- loaderProps: b,
1265
- gradient: h,
1266
- classNames: x,
1264
+ loaderProps: h,
1265
+ gradient: b,
1266
+ classNames: w,
1267
1267
  styles: T,
1268
1268
  unstyled: S,
1269
1269
  "data-disabled": N,
1270
1270
  autoContrast: C,
1271
1271
  mod: y,
1272
- ...w
1273
- } = n, v = I({
1272
+ ...x
1273
+ } = n, v = z({
1274
1274
  name: "Button",
1275
1275
  props: n,
1276
1276
  classes: Y,
1277
1277
  className: a,
1278
1278
  style: e,
1279
- classNames: x,
1279
+ classNames: w,
1280
1280
  styles: T,
1281
1281
  unstyled: S,
1282
1282
  vars: o,
1283
1283
  varsResolver: dn
1284
1284
  }), B = !!c, H = !!m;
1285
- return /* @__PURE__ */ k(
1285
+ return /* @__PURE__ */ j(
1286
1286
  at,
1287
1287
  {
1288
1288
  ref: r,
@@ -1300,17 +1300,17 @@ const ln = {
1300
1300
  },
1301
1301
  y
1302
1302
  ],
1303
- ...w,
1303
+ ...x,
1304
1304
  children: [
1305
1305
  /* @__PURE__ */ f($t, { mounted: !!d, transition: ln, duration: 150, children: (V) => /* @__PURE__ */ f($, { component: "span", ...v("loader", { style: V }), "aria-hidden": !0, children: /* @__PURE__ */ f(
1306
1306
  D,
1307
1307
  {
1308
1308
  color: "var(--button-color)",
1309
1309
  size: "calc(var(--button-height) / 1.8)",
1310
- ...b
1310
+ ...h
1311
1311
  }
1312
1312
  ) }) }),
1313
- /* @__PURE__ */ k("span", { ...v("inner"), children: [
1313
+ /* @__PURE__ */ j("span", { ...v("inner"), children: [
1314
1314
  c && /* @__PURE__ */ f($, { component: "span", ...v("section"), mod: { position: "left" }, children: c }),
1315
1315
  /* @__PURE__ */ f($, { component: "span", mod: { loading: d }, ...v("label"), children: p }),
1316
1316
  m && /* @__PURE__ */ f($, { component: "span", ...v("section"), mod: { position: "right" }, children: m })
@@ -1319,21 +1319,19 @@ const ln = {
1319
1319
  }
1320
1320
  );
1321
1321
  });
1322
- E.classes = Y;
1323
- E.displayName = "@mantine/core/Button";
1324
- E.Group = it;
1325
- E.GroupSection = st;
1326
- const yn = "_root_gdr8x_1", gn = "_inner_gdr8x_7", hn = "_label_gdr8x_11", bn = {
1322
+ F.classes = Y;
1323
+ F.displayName = "@mantine/core/Button";
1324
+ F.Group = it;
1325
+ F.GroupSection = st;
1326
+ const yn = "_root_1w9zb_1", gn = "_inner_1w9zb_9", bn = "_label_1w9zb_13", hn = {
1327
1327
  root: yn,
1328
1328
  inner: gn,
1329
- label: hn
1330
- };
1331
- E.withProps({});
1332
- const $n = (t) => /* @__PURE__ */ f(
1333
- E,
1329
+ label: bn
1330
+ }, $n = (t) => /* @__PURE__ */ f(
1331
+ F,
1334
1332
  {
1335
1333
  ...t,
1336
- classNames: bn
1334
+ classNames: hn
1337
1335
  }
1338
1336
  );
1339
1337
  export {
@@ -1,21 +1,85 @@
1
- function o(r) {
1
+ function e(r) {
2
2
  return Array.isArray(r) ? r : Array(10).fill(r);
3
3
  }
4
- const e = {
4
+ const a = {
5
+ focusRing: "never",
6
+ scale: 1,
7
+ //default value
8
+ fontSmoothing: !0,
9
+ //default value
10
+ // white: 'ffffff',
11
+ black: "#14151a",
5
12
  colors: {
6
- primary: o("#14151A")
7
- }
8
- /* shadows: {
9
- md: '1px 1px 3px rgba(0, 0, 0, .25)',
10
- xl: '5px 5px 3px rgba(0, 0, 0, .25)',
11
- }, */
13
+ primary: e("#14151a"),
14
+ white: e("#ffffff")
15
+ },
16
+ primaryShade: 6,
17
+ // { light: 6, dark: 8 } by theme
18
+ primaryColor: "primary",
19
+ /* variantColorResolver: ({ color, variant, gradient, theme }) => {
20
+ if (variant === 'primary') {
21
+ return {
22
+ background: 'var(--mantine-color-red-9)',
23
+ hover: 'var(--mantine-color-red-8)',
24
+ color: 'var(--mantine-color-white)',
25
+ border: 'none',
26
+ }
27
+ }
28
+
29
+ return {
30
+ background: 'var(--mantine-color-red-9)',
31
+ hover: 'var(--mantine-color-red-8)',
32
+ color: 'var(--mantine-color-white)',
33
+ border: 'none',
34
+ }
35
+ }, //color by variant */
36
+ autoContrast: !1,
37
+ //default value
38
+ luminanceThreshold: 0.3,
39
+ //default value
40
+ fontFamily: "Inter, sans-serif",
12
41
  /* headings: {
13
- fontFamily: 'Roboto, sans-serif',
42
+ fontFamily: 'Inter',
43
+ fontWeight: '600',
44
+ textWrap: 'wrap', // 'nowrap', 'balance', 'pretty', 'stable',
14
45
  sizes: {
15
- h1: { fontSize: rem(36) },
46
+ h1: { fontSize: '24px', fontWeight: '600', lineHeight: '1.3' }, //{ fontSize: string; fontWeight?: string; lineHeight: string; }
47
+ //..
16
48
  },
17
49
  }, */
50
+ radius: { xs: "6px", sm: "8px", md: "12px", lg: "16px", xl: "18px" },
51
+ //!!!TODO sync with blank
52
+ defaultRadius: "sm",
53
+ // spacing: { xs: '6px', sm: '8px', md: '12px', lg: '16px', xl: '18px' }, //for example
54
+ // fontSizes: { xs: '6px', sm: '8px', md: '12px', lg: '16px', xl: '18px' }, //for example
55
+ // lineHeights: { xs: '6px', sm: '8px', md: '12px', lg: '16px', xl: '18px' }, //for example
56
+ // breakpoints: { xs: '6px', sm: '8px', md: '12px', lg: '16px', xl: '18px' }, //for example
57
+ /* shadows: {
58
+ xs: '1px 1px 3px rgba(0, 0, 0, .25)',
59
+ sm: '1px 1px 3px rgba(0, 0, 0, .25)',
60
+ md: '1px 1px 3px rgba(0, 0, 0, .25)',
61
+ lg: '1px 1px 3px rgba(0, 0, 0, .25)',
62
+ xl: '1px 1px 3px rgba(0, 0, 0, .25)',
63
+ }, //for example */
64
+ respectReducedMotion: !1,
65
+ //default
66
+ cursorType: "default",
67
+ defaultGradient: { from: "black", to: "yellow", deg: 25 },
68
+ //for example
69
+ // activeClassName: 'class-name', //for example
70
+ // focusClassName: 'class-name', //for example
71
+ /* components: {
72
+ Title: Title.extend({
73
+ classNames: { root: 'classnames' },
74
+ styles: {},
75
+ vars: { order: 5 },
76
+ defaultProps: {},
77
+ }), //for example
78
+ }, */
79
+ other: {
80
+ // any additional vars
81
+ }
18
82
  };
19
83
  export {
20
- e as theme
84
+ a as theme
21
85
  };
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@kvell-group/ui",
3
3
  "author": "Kvell Group",
4
4
  "private": false,
5
- "version": "1.6.12",
5
+ "version": "1.7.0",
6
6
  "type": "module",
7
7
  "files": [
8
8
  "dist",