@shmidko61/lc-ui-kit 0.12.0 → 0.15.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 (107) hide show
  1. package/README.md +65 -0
  2. package/dist/alert/alert.d.ts +5 -0
  3. package/dist/alert/helpers/alert.helpers.d.ts +27 -0
  4. package/dist/alert/helpers/index.d.ts +1 -0
  5. package/dist/alert/index.d.ts +2 -0
  6. package/dist/alert/types/alert.types.d.ts +25 -0
  7. package/dist/alert/types/index.d.ts +1 -0
  8. package/dist/alert-CTIWpkmD.js +128 -0
  9. package/dist/alert-DTc0Usg-.cjs +1 -0
  10. package/dist/alert.cjs +1 -0
  11. package/dist/alert.js +4 -0
  12. package/dist/box/box.d.ts +1 -1
  13. package/dist/box/box.types.d.ts +2 -2
  14. package/dist/box/helpers/box-animation.helpers.d.ts +8 -0
  15. package/dist/box/helpers/index.d.ts +1 -0
  16. package/dist/box/index.d.ts +1 -0
  17. package/dist/box/types/box-animation.types.d.ts +3 -0
  18. package/dist/box/types/index.d.ts +1 -0
  19. package/dist/box.cjs +1 -1
  20. package/dist/box.js +436 -312
  21. package/dist/button/button.helpers.d.ts +1 -1
  22. package/dist/button/index.d.ts +1 -0
  23. package/dist/button.cjs +1 -1
  24. package/dist/button.js +163 -156
  25. package/dist/flex/flex.d.ts +1 -1
  26. package/dist/flex/flex.types.d.ts +1 -1
  27. package/dist/flex/index.d.ts +1 -0
  28. package/dist/icons/icons.d.ts +8 -0
  29. package/dist/icons/index.d.ts +1 -0
  30. package/dist/icons.cjs +1 -1
  31. package/dist/icons.js +40 -36
  32. package/dist/index.cjs +1 -1
  33. package/dist/index.d.ts +8 -1
  34. package/dist/index.js +111 -92
  35. package/dist/input/input.types.d.ts +1 -1
  36. package/dist/loader/helpers/index.d.ts +1 -0
  37. package/dist/loader/helpers/loader.helpers.d.ts +2 -0
  38. package/dist/loader/index.d.ts +2 -0
  39. package/dist/loader/loader.d.ts +5 -0
  40. package/dist/loader/types/index.d.ts +1 -0
  41. package/dist/loader/types/loader.types.d.ts +28 -0
  42. package/dist/loader-Daam055i.js +104 -0
  43. package/dist/loader-ODTCTLKE.cjs +1 -0
  44. package/dist/loader.cjs +1 -0
  45. package/dist/loader.js +4 -0
  46. package/dist/media-gallery.cjs +1 -1
  47. package/dist/media-gallery.js +42 -30
  48. package/dist/notification-provider/helpers/index.d.ts +1 -0
  49. package/dist/notification-provider/helpers/notification-provider.helpers.d.ts +8 -0
  50. package/dist/notification-provider/hooks/index.d.ts +1 -0
  51. package/dist/notification-provider/hooks/notification-provider.hooks.d.ts +5 -0
  52. package/dist/notification-provider/index.d.ts +3 -0
  53. package/dist/notification-provider/notification-provider.d.ts +4 -0
  54. package/dist/notification-provider/types/index.d.ts +1 -0
  55. package/dist/notification-provider/types/notification-provider.types.d.ts +61 -0
  56. package/dist/notification-provider-C2ypXy2W.cjs +1 -0
  57. package/dist/notification-provider-WLUaZyMB.js +113 -0
  58. package/dist/notification-provider.cjs +1 -0
  59. package/dist/notification-provider.js +6 -0
  60. package/dist/progress-bar/helpers/index.d.ts +1 -0
  61. package/dist/progress-bar/helpers/progress-bar.helpers.d.ts +6 -0
  62. package/dist/progress-bar/index.d.ts +2 -0
  63. package/dist/progress-bar/progress-bar.d.ts +5 -0
  64. package/dist/progress-bar/types/index.d.ts +1 -0
  65. package/dist/progress-bar/types/progress-bar.types.d.ts +80 -0
  66. package/dist/progress-bar-D4CL9r42.js +236 -0
  67. package/dist/progress-bar-XIJDb_UM.cjs +1 -0
  68. package/dist/progress-bar.cjs +1 -0
  69. package/dist/progress-bar.js +4 -0
  70. package/dist/shared/responsive-style/index.d.ts +1 -0
  71. package/dist/shared/responsive-style/responsive-style.types.d.ts +1 -1
  72. package/dist/styles.css +1 -1
  73. package/dist/tabs/helpers/index.d.ts +1 -0
  74. package/dist/tabs/helpers/tabs.helpers.d.ts +7 -0
  75. package/dist/tabs/hooks/index.d.ts +1 -0
  76. package/dist/tabs/hooks/tabs.hooks.d.ts +5 -0
  77. package/dist/tabs/index.d.ts +2 -0
  78. package/dist/tabs/tabs.d.ts +4 -0
  79. package/dist/tabs/types/index.d.ts +1 -0
  80. package/dist/tabs/types/tabs.types.d.ts +95 -0
  81. package/dist/tabs-BNZDJRz_.cjs +1 -0
  82. package/dist/tabs-DIPSJX1z.js +264 -0
  83. package/dist/tabs.cjs +1 -0
  84. package/dist/tabs.js +5 -0
  85. package/dist/toast/index.d.ts +2 -0
  86. package/dist/toast/toast.d.ts +5 -0
  87. package/dist/toast/types/index.d.ts +1 -0
  88. package/dist/toast/types/toast.types.d.ts +10 -0
  89. package/dist/toast-CH8VqvLC.cjs +1 -0
  90. package/dist/toast-DpjugQ8H.js +49 -0
  91. package/dist/toast.cjs +1 -0
  92. package/dist/toast.js +4 -0
  93. package/dist/tooltip/helpers/index.d.ts +1 -0
  94. package/dist/tooltip/helpers/tooltip.helpers.d.ts +7 -0
  95. package/dist/tooltip/index.d.ts +2 -0
  96. package/dist/tooltip/tooltip.d.ts +5 -0
  97. package/dist/tooltip/types/index.d.ts +1 -0
  98. package/dist/tooltip/types/tooltip.types.d.ts +51 -0
  99. package/dist/tooltip-0RbTCYn_.cjs +1 -0
  100. package/dist/tooltip-CWnHAfbI.js +166 -0
  101. package/dist/tooltip.cjs +1 -0
  102. package/dist/tooltip.js +4 -0
  103. package/dist/types/animation.types.d.ts +35 -0
  104. package/dist/types/index.d.ts +1 -0
  105. package/dist/typography/index.d.ts +1 -0
  106. package/dist/typography/typography.helpers.d.ts +1 -1
  107. package/package.json +68 -4
package/dist/box.js CHANGED
@@ -1,61 +1,98 @@
1
- import { jsx as bo } from "react/jsx-runtime";
2
- import { forwardRef as mo } from "react";
3
- import { a as H, c as po } from "./responsive-style.config-DFuATrIM.js";
4
- function Z({
5
- background: t,
6
- backgroundColor: o,
1
+ import { jsx as ht } from "react/jsx-runtime";
2
+ import { forwardRef as $t, useMemo as yt } from "react";
3
+ import { a as x, r as Bt, c as xt } from "./responsive-style.config-DFuATrIM.js";
4
+ function ot({
5
+ background: o,
6
+ backgroundColor: t,
7
7
  bg: i,
8
- bgSize: a,
9
- bgRepeat: n,
10
- bgPosition: s,
11
- border: p,
12
- boxShadow: c,
13
- color: r,
14
- cursor: u,
15
- opacity: l,
16
- overflow: d,
17
- overflowX: v,
8
+ bgSize: e,
9
+ bgRepeat: s,
10
+ bgPosition: a,
11
+ border: c,
12
+ boxShadow: d,
13
+ color: n,
14
+ cursor: l,
15
+ opacity: b,
16
+ overflow: f,
17
+ overflowX: h,
18
18
  overflowY: y,
19
- pointerEvents: B,
20
- aspectRatio: h,
21
- transform: g,
22
- transformOrigin: b,
23
- p: S,
24
- m: x,
25
- outlineColor: k,
26
- outlineWidth: R,
27
- outlineOffset: W,
28
- outlineStyle: L,
29
- listStyle: C,
30
- display: w,
31
- position: m,
32
- width: P,
33
- maxWidth: N,
34
- minWidth: I,
35
- height: j,
19
+ pointerEvents: p,
20
+ aspectRatio: u,
21
+ transform: $,
22
+ transformOrigin: g,
23
+ p: C,
24
+ m: W,
25
+ outlineColor: S,
26
+ outlineWidth: k,
27
+ outlineOffset: R,
28
+ outlineStyle: T,
29
+ listStyle: w,
30
+ display: I,
31
+ position: v,
32
+ width: V,
33
+ maxWidth: P,
34
+ minWidth: j,
35
+ height: M,
36
36
  maxHeight: O,
37
- minHeight: E
37
+ minHeight: A
38
38
  }) {
39
- const e = {};
40
- return i !== void 0 ? wo(e, i) : t !== void 0 && (e.background = G(t)), o !== void 0 && (e.backgroundColor = G(o)), a !== void 0 && (e.backgroundSize = To(a)), n !== void 0 && (e.backgroundRepeat = Vo(n)), s !== void 0 && (e.backgroundPosition = Lo(s)), Ro(e, p), c !== void 0 && (e.boxShadow = $(c)), r !== void 0 && (e.color = $(r)), u !== void 0 && (e.cursor = u), l !== void 0 && (e.opacity = typeof l == "number" ? l : $(l)), d !== void 0 && (e.overflowX = d, e.overflowY = d), v !== void 0 && (e.overflowX = v), y !== void 0 && (e.overflowY = y), B !== void 0 && (e.pointerEvents = B), h !== void 0 && (e.aspectRatio = typeof h == "number" ? String(h) : $(h)), g !== void 0 && (e.transform = $(g)), b !== void 0 && (e.transformOrigin = $(b)), yo(e, S), ko(e, x), k !== void 0 && (e.outlineColor = $(k)), R !== void 0 && (e.outlineWidth = R), W !== void 0 && (e.outlineOffset = W), L !== void 0 && (e.outlineStyle = L), C?.position !== void 0 && (e.listStylePosition = C.position), C?.type !== void 0 && (e.listStyleType = C.type), w !== void 0 && (e.display = zo(w)), m?.type !== void 0 && (e.position = m.type), m?.top !== void 0 && (e.top = A(m.top)), m?.left !== void 0 && (e.left = A(m.left)), m?.right !== void 0 && (e.right = A(m.right)), m?.bottom !== void 0 && (e.bottom = A(m.bottom)), m?.zIndex !== void 0 && (e.zIndex = m.zIndex), P !== void 0 && (e.width = z(P)), N !== void 0 && (e.maxWidth = z(N)), I !== void 0 && (e.minWidth = z(I)), j !== void 0 && (e.height = z(j)), O !== void 0 && (e.maxHeight = z(O)), E !== void 0 && (e.minHeight = z(E)), Object.keys(e).length > 0 ? e : void 0;
41
- }
42
- function go(t) {
43
- const o = [], i = {}, a = t.groupParent === !0;
44
- K(t, o, i, { isGroupParent: a });
45
- for (const n of H) {
46
- const s = t[n];
47
- s && K(s, o, i, {
48
- classPrefix: `${n}:`,
49
- variablePrefix: `${n}-`,
50
- isGroupParent: a
39
+ const r = {};
40
+ return i !== void 0 ? Et(r, i) : o !== void 0 && (r.background = D(o)), t !== void 0 && (r.backgroundColor = D(t)), e !== void 0 && (r.backgroundSize = Mt(e)), s !== void 0 && (r.backgroundRepeat = Ot(s)), a !== void 0 && (r.backgroundPosition = At(a)), Nt(r, c), d !== void 0 && (r.boxShadow = B(d)), n !== void 0 && (r.color = B(n)), l !== void 0 && (r.cursor = l), b !== void 0 && (r.opacity = typeof b == "number" ? b : B(b)), f !== void 0 && (r.overflowX = f, r.overflowY = f), h !== void 0 && (r.overflowX = h), y !== void 0 && (r.overflowY = y), p !== void 0 && (r.pointerEvents = p), u !== void 0 && (r.aspectRatio = typeof u == "number" ? String(u) : B(u)), $ !== void 0 && (r.transform = B($)), g !== void 0 && (r.transformOrigin = B(g)), zt(r, C), Lt(r, W), S !== void 0 && (r.outlineColor = B(S)), k !== void 0 && (r.outlineWidth = k), R !== void 0 && (r.outlineOffset = R), T !== void 0 && (r.outlineStyle = T), w?.position !== void 0 && (r.listStylePosition = w.position), w?.type !== void 0 && (r.listStyleType = w.type), I !== void 0 && (r.display = jt(I)), v?.type !== void 0 && (r.position = v.type), v?.top !== void 0 && (r.top = F(v.top)), v?.left !== void 0 && (r.left = F(v.left)), v?.right !== void 0 && (r.right = F(v.right)), v?.bottom !== void 0 && (r.bottom = F(v.bottom)), v?.zIndex !== void 0 && (r.zIndex = v.zIndex), V !== void 0 && (r.width = z(V)), P !== void 0 && (r.maxWidth = z(P)), j !== void 0 && (r.minWidth = z(j)), M !== void 0 && (r.height = z(M)), O !== void 0 && (r.maxHeight = z(O)), A !== void 0 && (r.minHeight = z(A)), Object.keys(r).length > 0 ? r : void 0;
41
+ }
42
+ function St(o) {
43
+ const t = [], i = {}, e = o.groupParent === !0;
44
+ Q(o, t, i, { isGroupParent: e });
45
+ for (const s of x) {
46
+ const a = o[s];
47
+ a && Q(a, t, i, {
48
+ classPrefix: `${s}:`,
49
+ variablePrefix: `${s}-`,
50
+ isGroupParent: e
51
51
  });
52
52
  }
53
- return ho(t, o, i), {
54
- className: o.join(" "),
53
+ return kt(o, t, i), Rt(o, t, i), {
54
+ className: t.join(" "),
55
55
  style: Object.keys(i).length > 0 ? i : void 0
56
56
  };
57
57
  }
58
- const X = [
58
+ function kt(o, t, i) {
59
+ let e = {};
60
+ const s = [
61
+ { value: o.animation, prefix: "", variable: "" },
62
+ ...x.map((a) => ({
63
+ value: o[a]?.animation,
64
+ prefix: a + ":",
65
+ variable: a + "-"
66
+ }))
67
+ ];
68
+ for (const a of s)
69
+ if (a.value !== void 0) {
70
+ if (a.value === "none")
71
+ e = {}, i[`--${a.variable}animation`] = "none";
72
+ else {
73
+ const c = a.value === "spin" ? { preset: "spin", keyframes: null } : a.value;
74
+ e = {
75
+ ...e,
76
+ ...c,
77
+ ...c.easing !== void 0 ? { timingFunction: c.easing } : {},
78
+ ...c.iterations !== void 0 ? { iterationCount: c.iterations === 1 / 0 ? "infinite" : c.iterations } : {}
79
+ };
80
+ const d = e.keyframes || e.preset === "spin" ? "none" : e.preset ?? "none";
81
+ i[`--${a.variable}animation`] = [
82
+ d,
83
+ typeof e.duration == "number" ? e.duration + "ms" : e.duration ?? "1s",
84
+ e.timingFunction ?? "linear",
85
+ typeof e.delay == "number" ? e.delay + "ms" : e.delay ?? "0ms",
86
+ e.iterationCount ?? "infinite",
87
+ e.direction ?? "normal",
88
+ e.fillMode ?? "none",
89
+ e.playState ?? "running"
90
+ ].join(" ");
91
+ }
92
+ t.push(`${a.prefix}[animation:var(--${a.variable}animation)]`);
93
+ }
94
+ }
95
+ const q = [
59
96
  {
60
97
  prop: "hover",
61
98
  name: "hover",
@@ -77,114 +114,114 @@ const X = [
77
114
  variant: "[&:is(:disabled,[aria-disabled=true],[data-disabled=true]):is(:disabled,[aria-disabled=true],[data-disabled=true])]"
78
115
  }
79
116
  ];
80
- function ho(t, o, i) {
81
- const a = [t, ...H.map((r) => t[r] ?? {})], n = /* @__PURE__ */ new Set();
82
- for (const r of X)
83
- for (const u of a)
84
- Object.keys(F(u, r.prop)).forEach(
85
- (l) => n.add(l)
86
- ), r.prop === "hover" && u.hover === null && n.add("backgroundColor");
87
- if (n.size === 0) return;
88
- for (const r of n) {
89
- const u = D(r);
90
- for (const l of X)
91
- o.push(`[--ui-state-${l.name}-${u}:initial]`);
117
+ function Rt(o, t, i) {
118
+ const e = [o, ...x.map((n) => o[n] ?? {})], s = /* @__PURE__ */ new Set();
119
+ for (const n of q)
120
+ for (const l of e)
121
+ Object.keys(Z(l, n.prop)).forEach(
122
+ (b) => s.add(b)
123
+ ), n.prop === "hover" && l.hover === null && s.add("backgroundColor");
124
+ if (s.size === 0) return;
125
+ for (const n of s) {
126
+ const l = X(n);
127
+ for (const b of q)
128
+ t.push(`[--ui-state-${b.name}-${l}:initial]`);
92
129
  }
93
- let s = {};
94
- const p = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map();
95
- a.forEach((r, u) => {
96
- s = { ...s, ...Y(r) };
97
- const l = u === 0 ? "" : `${H[u - 1]}:`;
98
- for (const d of X) {
99
- const v = p.get(d.name) ?? {}, y = F(r, d.prop), B = r[d.prop] === null ? {} : { ...v, ...y }, h = c.get(d.name) ?? /* @__PURE__ */ new Set();
100
- Object.keys(y).forEach((g) => h.add(g)), d.prop === "hover" && r.hover === null && h.add("backgroundColor"), p.set(d.name, B), c.set(d.name, h);
101
- for (const g of h) {
102
- const b = D(g), S = s[g] ?? vo(g, u), x = `--ui-state-normal-${u}-${b}`;
103
- i[x] = String(S);
104
- const k = `--${d.name}-${u}-${b}`;
105
- i[k] = String(B[g] ?? S);
106
- const R = `--ui-state-value-${d.name}-${u}-${b}`;
107
- i[R] = B[g] === void 0 ? "initial" : `var(${k})`;
108
- const W = `var(--ui-state-disabled-${b},var(--ui-state-active-${b},var(--ui-state-focus-visible-${b},var(--ui-state-hover-${b},var(${x})))))`;
109
- o.push(
110
- `${l}${d.variant}:[--ui-state-${d.name}-${b}:var(${R})]`,
111
- `${l}${d.variant}:[${b}:${W}]`
130
+ let a = {};
131
+ const c = /* @__PURE__ */ new Map(), d = /* @__PURE__ */ new Map();
132
+ e.forEach((n, l) => {
133
+ a = { ...a, ...K(n) };
134
+ const b = l === 0 ? "" : `${x[l - 1]}:`;
135
+ for (const f of q) {
136
+ const h = c.get(f.name) ?? {}, y = Z(n, f.prop), p = n[f.prop] === null ? {} : { ...h, ...y }, u = d.get(f.name) ?? /* @__PURE__ */ new Set();
137
+ Object.keys(y).forEach(($) => u.add($)), f.prop === "hover" && n.hover === null && u.add("backgroundColor"), c.set(f.name, p), d.set(f.name, u);
138
+ for (const $ of u) {
139
+ const g = X($), C = a[$] ?? Ct($, l), W = `--ui-state-normal-${l}-${g}`;
140
+ i[W] = String(C);
141
+ const S = `--${f.name}-${l}-${g}`;
142
+ i[S] = String(p[$] ?? C);
143
+ const k = `--ui-state-value-${f.name}-${l}-${g}`;
144
+ i[k] = p[$] === void 0 ? "initial" : `var(${S})`;
145
+ const R = `var(--ui-state-disabled-${g},var(--ui-state-active-${g},var(--ui-state-focus-visible-${g},var(--ui-state-hover-${g},var(${W})))))`;
146
+ t.push(
147
+ `${b}${f.variant}:[--ui-state-${f.name}-${g}:var(${k})]`,
148
+ `${b}${f.variant}:[${g}:${R}]`
112
149
  );
113
150
  }
114
151
  }
115
152
  });
116
153
  }
117
- function F(t, o) {
118
- const i = t[o];
119
- return i ? o !== "hover" && "outlineWidth" in i && i.outlineStyle === void 0 ? Y({ ...i, outlineStyle: "solid" }) : Y(i) : {};
154
+ function Z(o, t) {
155
+ const i = o[t];
156
+ return i ? t !== "hover" && "outlineWidth" in i && i.outlineStyle === void 0 ? K({ ...i, outlineStyle: "solid" }) : K(i) : {};
120
157
  }
121
- function vo(t, o) {
122
- const i = t === "color" ? "inherit" : "initial";
123
- if (t !== "background" && t !== "backgroundColor" && t !== "color")
158
+ function Ct(o, t) {
159
+ const i = o === "color" ? "inherit" : "initial";
160
+ if (o !== "background" && o !== "backgroundColor" && o !== "color")
124
161
  return i;
125
- const a = t === "color" ? "color" : "bg";
126
- let n = `var(--button-${a},${i})`;
127
- for (let s = 0; s < o; s += 1)
128
- n = `var(--${H[s]}-button-${a},${n})`;
129
- return n;
130
- }
131
- function Y(t) {
132
- const o = { ...Z(t) };
133
- if (o.borderWidth !== void 0) {
134
- const i = String(o.borderWidth).split(/\s+(?![^()]*\))/), a = i[0], n = i[1] ?? a, s = i[2] ?? a, p = i[3] ?? n;
135
- Object.assign(o, {
136
- borderTopWidth: a,
137
- borderRightWidth: n,
138
- borderBottomWidth: s,
139
- borderLeftWidth: p
140
- }), delete o.borderWidth;
162
+ const e = o === "color" ? "color" : "bg";
163
+ let s = `var(--button-${e},${i})`;
164
+ for (let a = 0; a < t; a += 1)
165
+ s = `var(--${x[a]}-button-${e},${s})`;
166
+ return s;
167
+ }
168
+ function K(o) {
169
+ const t = { ...ot(o) };
170
+ if (t.borderWidth !== void 0) {
171
+ const i = String(t.borderWidth).split(/\s+(?![^()]*\))/), e = i[0], s = i[1] ?? e, a = i[2] ?? e, c = i[3] ?? s;
172
+ Object.assign(t, {
173
+ borderTopWidth: e,
174
+ borderRightWidth: s,
175
+ borderBottomWidth: a,
176
+ borderLeftWidth: c
177
+ }), delete t.borderWidth;
141
178
  }
142
- if (o.borderRadius !== void 0) {
143
- const [i, a = i] = String(o.borderRadius).split("/"), n = (c) => {
144
- const r = c.trim().split(/\s+(?![^()]*\))/);
179
+ if (t.borderRadius !== void 0) {
180
+ const [i, e = i] = String(t.borderRadius).split("/"), s = (d) => {
181
+ const n = d.trim().split(/\s+(?![^()]*\))/);
145
182
  return [
146
- r[0],
147
- r[1] ?? r[0],
148
- r[2] ?? r[0],
149
- r[3] ?? r[1] ?? r[0]
183
+ n[0],
184
+ n[1] ?? n[0],
185
+ n[2] ?? n[0],
186
+ n[3] ?? n[1] ?? n[0]
150
187
  ];
151
- }, s = n(i), p = n(a);
152
- ["TopLeft", "TopRight", "BottomRight", "BottomLeft"].forEach((c, r) => {
153
- o[`border${c}Radius`] = `${s[r]} ${p[r]}`;
154
- }), delete o.borderRadius;
188
+ }, a = s(i), c = s(e);
189
+ ["TopLeft", "TopRight", "BottomRight", "BottomLeft"].forEach((d, n) => {
190
+ t[`border${d}Radius`] = `${a[n]} ${c[n]}`;
191
+ }), delete t.borderRadius;
155
192
  }
156
- return o;
193
+ return t;
157
194
  }
158
- function K(t, o, i, {
159
- classPrefix: a = "",
160
- variablePrefix: n = "",
161
- isGroupParent: s = !1
195
+ function Q(o, t, i, {
196
+ classPrefix: e = "",
197
+ variablePrefix: s = "",
198
+ isGroupParent: a = !1
162
199
  } = {}) {
163
- const p = Z(t);
164
- for (const [c, r] of Object.entries(p ?? {})) {
165
- if (r == null)
200
+ const c = ot(o);
201
+ for (const [d, n] of Object.entries(c ?? {})) {
202
+ if (n == null)
166
203
  continue;
167
- const u = String(r), l = $o(c, u);
168
- if (l) {
169
- o.push(`${a}${l}`);
204
+ const l = String(n), b = Wt(d, l);
205
+ if (b) {
206
+ t.push(`${e}${b}`);
170
207
  continue;
171
208
  }
172
- const d = `${n}${D(c)}`, v = Bo(c, d);
173
- v && (i[`--${d}`] = u, o.push(`${a}${v}`));
209
+ const f = `${s}${X(d)}`, h = wt(d, f);
210
+ h && (i[`--${f}`] = l, t.push(`${e}${h}`));
174
211
  }
175
- if (t.bgGroup !== void 0) {
176
- const c = `${n}group-background`;
177
- i[`--${c}`] = G(t.bgGroup), o.push(`${a}group-hover:[background:var(--${c})]`), s && o.push(`${a}hover:[background:var(--${c})]`);
212
+ if (o.bgGroup !== void 0) {
213
+ const d = `${s}group-background`;
214
+ i[`--${d}`] = D(o.bgGroup), t.push(`${e}group-hover:[background:var(--${d})]`), a && t.push(`${e}hover:[background:var(--${d})]`);
178
215
  }
179
216
  }
180
- function $o(t, o) {
181
- if (t === "display")
182
- return o === "none" ? "hidden" : o;
183
- if (t === "position")
184
- return o === "inherit" ? "[position:inherit]" : o;
185
- if (t === "cursor")
186
- return `cursor-${o}`;
187
- if (t === "backgroundRepeat")
217
+ function Wt(o, t) {
218
+ if (o === "display")
219
+ return t === "none" ? "hidden" : t;
220
+ if (o === "position")
221
+ return t === "inherit" ? "[position:inherit]" : t;
222
+ if (o === "cursor")
223
+ return `cursor-${t}`;
224
+ if (o === "backgroundRepeat")
188
225
  return {
189
226
  "no-repeat": "bg-no-repeat",
190
227
  repeat: "bg-repeat",
@@ -192,14 +229,14 @@ function $o(t, o) {
192
229
  space: "bg-repeat-space",
193
230
  "repeat-x": "bg-repeat-x",
194
231
  "repeat-y": "bg-repeat-y"
195
- }[o];
196
- if (t === "backgroundSize")
232
+ }[t];
233
+ if (o === "backgroundSize")
197
234
  return {
198
235
  auto: "bg-auto",
199
236
  contain: "bg-contain",
200
237
  cover: "bg-cover"
201
- }[o];
202
- if (t === "backgroundPosition")
238
+ }[t];
239
+ if (o === "backgroundPosition")
203
240
  return {
204
241
  bottom: "bg-bottom",
205
242
  center: "bg-center",
@@ -210,18 +247,18 @@ function $o(t, o) {
210
247
  "right bottom": "bg-right-bottom",
211
248
  "right top": "bg-right-top",
212
249
  top: "bg-top"
213
- }[o];
214
- if (t === "borderStyle")
215
- return o === "none" ? "border-none" : `border-${o}`;
216
- if (t === "outlineStyle")
217
- return o === "none" ? "outline-none" : `outline-${o}`;
218
- if (t === "listStylePosition")
219
- return `list-${o}`;
220
- if (t === "listStyleType")
221
- return `list-${o}`;
222
- }
223
- function Bo(t, o) {
224
- const i = `var(--${o})`;
250
+ }[t];
251
+ if (o === "borderStyle")
252
+ return t === "none" ? "border-none" : `border-${t}`;
253
+ if (o === "outlineStyle")
254
+ return t === "none" ? "outline-none" : `outline-${t}`;
255
+ if (o === "listStylePosition")
256
+ return `list-${t}`;
257
+ if (o === "listStyleType")
258
+ return `list-${t}`;
259
+ }
260
+ function wt(o, t) {
261
+ const i = `var(--${t})`;
225
262
  return {
226
263
  background: `[background:${i}]`,
227
264
  backgroundColor: `bg-[${i}]`,
@@ -271,82 +308,82 @@ function Bo(t, o) {
271
308
  transformOrigin: `[transform-origin:${i}]`,
272
309
  width: `w-[${i}]`,
273
310
  zIndex: `z-[${i}]`
274
- }[t];
311
+ }[o];
275
312
  }
276
- function D(t) {
277
- return t.replace(/[A-Z]/g, (o) => `-${o.toLowerCase()}`);
313
+ function X(o) {
314
+ return o.replace(/[A-Z]/g, (t) => `-${t.toLowerCase()}`);
278
315
  }
279
- function yo(t, o) {
280
- if (o !== void 0) {
281
- if (Array.isArray(o)) {
282
- t.padding = o.map(f).join(" ");
316
+ function zt(o, t) {
317
+ if (t !== void 0) {
318
+ if (Array.isArray(t)) {
319
+ o.padding = t.map(m).join(" ");
283
320
  return;
284
321
  }
285
- if (typeof o != "object") {
286
- t.padding = f(o);
322
+ if (typeof t != "object") {
323
+ o.padding = m(t);
287
324
  return;
288
325
  }
289
- "px" in o && o.px !== void 0 && (t.paddingLeft = f(o.px), t.paddingRight = f(o.px)), "py" in o && o.py !== void 0 && (t.paddingTop = f(o.py), t.paddingBottom = f(o.py)), "pt" in o && o.pt !== void 0 && (t.paddingTop = f(o.pt)), "pb" in o && o.pb !== void 0 && (t.paddingBottom = f(o.pb)), "pl" in o && o.pl !== void 0 && (t.paddingLeft = f(o.pl)), "pr" in o && o.pr !== void 0 && (t.paddingRight = f(o.pr));
326
+ "px" in t && t.px !== void 0 && (o.paddingLeft = m(t.px), o.paddingRight = m(t.px)), "py" in t && t.py !== void 0 && (o.paddingTop = m(t.py), o.paddingBottom = m(t.py)), "pt" in t && t.pt !== void 0 && (o.paddingTop = m(t.pt)), "pb" in t && t.pb !== void 0 && (o.paddingBottom = m(t.pb)), "pl" in t && t.pl !== void 0 && (o.paddingLeft = m(t.pl)), "pr" in t && t.pr !== void 0 && (o.paddingRight = m(t.pr));
290
327
  }
291
328
  }
292
- function ko(t, o) {
293
- if (o !== void 0) {
294
- if (Array.isArray(o)) {
295
- t.margin = o.map(f).join(" ");
329
+ function Lt(o, t) {
330
+ if (t !== void 0) {
331
+ if (Array.isArray(t)) {
332
+ o.margin = t.map(m).join(" ");
296
333
  return;
297
334
  }
298
- if (typeof o != "object") {
299
- t.margin = f(o);
335
+ if (typeof t != "object") {
336
+ o.margin = m(t);
300
337
  return;
301
338
  }
302
- "mx" in o && o.mx !== void 0 && (t.marginLeft = f(o.mx), t.marginRight = f(o.mx)), "my" in o && o.my !== void 0 && (t.marginTop = f(o.my), t.marginBottom = f(o.my)), "mt" in o && o.mt !== void 0 && (t.marginTop = f(o.mt)), "mb" in o && o.mb !== void 0 && (t.marginBottom = f(o.mb)), "ml" in o && o.ml !== void 0 && (t.marginLeft = f(o.ml)), "mr" in o && o.mr !== void 0 && (t.marginRight = f(o.mr));
339
+ "mx" in t && t.mx !== void 0 && (o.marginLeft = m(t.mx), o.marginRight = m(t.mx)), "my" in t && t.my !== void 0 && (o.marginTop = m(t.my), o.marginBottom = m(t.my)), "mt" in t && t.mt !== void 0 && (o.marginTop = m(t.mt)), "mb" in t && t.mb !== void 0 && (o.marginBottom = m(t.mb)), "ml" in t && t.ml !== void 0 && (o.marginLeft = m(t.ml)), "mr" in t && t.mr !== void 0 && (o.marginRight = m(t.mr));
303
340
  }
304
341
  }
305
- function Ro(t, o) {
306
- o && (o.radius !== void 0 && So(t, o.radius), o.color !== void 0 && (t.borderColor = $(o.color)), o.width !== void 0 && xo(t, o.width), o.style !== void 0 && (t.borderStyle = o.style));
342
+ function Nt(o, t) {
343
+ t && (t.radius !== void 0 && Tt(o, t.radius), t.color !== void 0 && (o.borderColor = B(t.color)), t.width !== void 0 && It(o, t.width), t.style !== void 0 && (o.borderStyle = t.style));
307
344
  }
308
- function So(t, o) {
309
- if (Wo(o)) {
310
- o.topLeft !== void 0 && (t.borderTopLeftRadius = T(o.topLeft)), o.topRight !== void 0 && (t.borderTopRightRadius = T(o.topRight)), o.bottomLeft !== void 0 && (t.borderBottomLeftRadius = T(o.bottomLeft)), o.bottomRight !== void 0 && (t.borderBottomRightRadius = T(o.bottomRight));
345
+ function Tt(o, t) {
346
+ if (Vt(t)) {
347
+ t.topLeft !== void 0 && (o.borderTopLeftRadius = L(t.topLeft)), t.topRight !== void 0 && (o.borderTopRightRadius = L(t.topRight)), t.bottomLeft !== void 0 && (o.borderBottomLeftRadius = L(t.bottomLeft)), t.bottomRight !== void 0 && (o.borderBottomRightRadius = L(t.bottomRight));
311
348
  return;
312
349
  }
313
- t.borderRadius = T(o);
350
+ o.borderRadius = L(t);
314
351
  }
315
- function xo(t, o) {
316
- if (Co(o)) {
317
- o.top !== void 0 && (t.borderTopWidth = V(o.top)), o.bottom !== void 0 && (t.borderBottomWidth = V(o.bottom)), o.left !== void 0 && (t.borderLeftWidth = V(o.left)), o.right !== void 0 && (t.borderRightWidth = V(o.right));
352
+ function It(o, t) {
353
+ if (Pt(t)) {
354
+ t.top !== void 0 && (o.borderTopWidth = N(t.top)), t.bottom !== void 0 && (o.borderBottomWidth = N(t.bottom)), t.left !== void 0 && (o.borderLeftWidth = N(t.left)), t.right !== void 0 && (o.borderRightWidth = N(t.right));
318
355
  return;
319
356
  }
320
- t.borderWidth = V(o);
357
+ o.borderWidth = N(t);
321
358
  }
322
- function Wo(t) {
323
- return typeof t == "object";
359
+ function Vt(o) {
360
+ return typeof o == "object";
324
361
  }
325
- function Co(t) {
326
- return typeof t == "object";
362
+ function Pt(o) {
363
+ return typeof o == "object";
327
364
  }
328
- function T(t) {
329
- return t.startsWith("--") ? `var(${t})` : t;
365
+ function L(o) {
366
+ return o.startsWith("--") ? `var(${o})` : o;
330
367
  }
331
- function V(t) {
332
- return t.startsWith("--") ? `var(${t})` : t;
368
+ function N(o) {
369
+ return o.startsWith("--") ? `var(${o})` : o;
333
370
  }
334
- function zo(t) {
335
- return t === "hidden" ? "none" : t;
371
+ function jt(o) {
372
+ return o === "hidden" ? "none" : o;
336
373
  }
337
- function A(t) {
338
- return typeof t == "number" ? `${t}px` : t;
374
+ function F(o) {
375
+ return typeof o == "number" ? `${o}px` : o;
339
376
  }
340
- function f(t) {
341
- return typeof t == "number" ? `${t}px` : t;
377
+ function m(o) {
378
+ return typeof o == "number" ? `${o}px` : o;
342
379
  }
343
- function z(t) {
344
- return typeof t == "number" ? `${t}px` : t;
380
+ function z(o) {
381
+ return typeof o == "number" ? `${o}px` : o;
345
382
  }
346
- function To(t) {
347
- return typeof t == "number" ? `${t}px` : t;
383
+ function Mt(o) {
384
+ return typeof o == "number" ? `${o}px` : o;
348
385
  }
349
- function Vo(t) {
386
+ function Ot(o) {
350
387
  return {
351
388
  "no-repeat": "no-repeat",
352
389
  repeat: "repeat",
@@ -354,137 +391,224 @@ function Vo(t) {
354
391
  "repeat-space": "space",
355
392
  "repeat-x": "repeat-x",
356
393
  "repeat-y": "repeat-y"
357
- }[t];
394
+ }[o];
358
395
  }
359
- function Lo(t) {
360
- return t.replace("-", " ");
396
+ function At(o) {
397
+ return o.replace("-", " ");
361
398
  }
362
- function G(t) {
363
- return $(t);
399
+ function D(o) {
400
+ return B(o);
364
401
  }
365
- function wo(t, o) {
366
- const i = G(o);
367
- if (Po(o)) {
368
- t.background = i;
402
+ function Et(o, t) {
403
+ const i = D(t);
404
+ if (Ft(t)) {
405
+ o.background = i;
369
406
  return;
370
407
  }
371
- t.backgroundColor = i;
408
+ o.backgroundColor = i;
372
409
  }
373
- function Po(t) {
374
- const o = t.trim().toLowerCase();
375
- return o.includes("url(") || o.includes("gradient(") || o.includes("image-set(") || o.includes("cross-fade(") || o.includes("element(") || o.includes("paint(");
410
+ function Ft(o) {
411
+ const t = o.trim().toLowerCase();
412
+ return t.includes("url(") || t.includes("gradient(") || t.includes("image-set(") || t.includes("cross-fade(") || t.includes("element(") || t.includes("paint(");
376
413
  }
377
- function $(t) {
378
- return t.startsWith("--") ? `var(${t})` : t;
414
+ function B(o) {
415
+ return o.startsWith("--") ? `var(${o})` : o;
416
+ }
417
+ function Dt(o) {
418
+ return [o.animation, ...x.map((t) => o[t]?.animation)].some(
419
+ (t) => t === "spin" || typeof t == "object" && t !== null && (Array.isArray(t.keyframes) || t.preset === "spin")
420
+ );
421
+ }
422
+ function U(o, t) {
423
+ if (typeof o == "number") return Number.isFinite(o) ? o : t;
424
+ if (o === void 0) return t;
425
+ const i = /^\s*(-?(?:\d+(?:\.\d*)?|\.\d+))(ms|s)\s*$/.exec(o);
426
+ return i ? Number(i[1]) * (i[2] === "s" ? 1e3 : 1) : t;
427
+ }
428
+ function tt(o, t, i) {
429
+ const e = x.map(
430
+ (n) => window.matchMedia("(min-width: " + Bt[n] + ")")
431
+ ), s = window.matchMedia("(prefers-reduced-motion: reduce)");
432
+ let a, c = "";
433
+ const d = () => {
434
+ let n = {};
435
+ const l = [
436
+ t.animation,
437
+ ...x.map(
438
+ (p, u) => e[u].matches ? t[p]?.animation : void 0
439
+ )
440
+ ];
441
+ for (const p of l)
442
+ if (p !== void 0)
443
+ if (p === "none") n = {};
444
+ else {
445
+ const u = p === "spin" ? { preset: "spin", keyframes: null } : p;
446
+ n = {
447
+ ...n,
448
+ ...u,
449
+ ...u.easing !== void 0 ? { timingFunction: u.easing } : {},
450
+ ...u.iterations !== void 0 ? { iterationCount: u.iterations === 1 / 0 ? "infinite" : u.iterations } : {}
451
+ };
452
+ }
453
+ const b = n.keyframes ?? (n.preset === "spin" ? [{ transform: "rotate(0deg)" }, { transform: "rotate(360deg)" }] : void 0), f = i?.animation !== void 0 || i?.animationName !== void 0 || s.matches && n.reducedMotion !== "keep", h = b?.map(
454
+ (p) => Object.fromEntries(
455
+ Object.entries(p).filter(
456
+ ([u]) => u === "offset" || u === "easing" || u === "composite" || !(u in (i ?? {}))
457
+ )
458
+ )
459
+ ), y = JSON.stringify([h, n, f]);
460
+ c !== y && (c = y, a?.cancel(), a = void 0, !(!h?.length || f || typeof o.animate != "function") && (a = o.animate(h, {
461
+ duration: Math.max(0, U(i?.animationDuration ?? n.duration, 1e3)),
462
+ delay: U(i?.animationDelay ?? n.delay, 0),
463
+ easing: i?.animationTimingFunction ?? n.timingFunction ?? "linear",
464
+ iterations: i?.animationIterationCount !== void 0 ? i.animationIterationCount === "infinite" ? 1 / 0 : Math.max(0, Number(i.animationIterationCount)) : n.iterationCount === "infinite" || n.iterationCount === void 0 ? 1 / 0 : Math.max(0, n.iterationCount),
465
+ direction: i?.animationDirection ?? n.direction ?? "normal",
466
+ fill: i?.animationFillMode ?? n.fillMode ?? "none"
467
+ }), (i?.animationPlayState ?? n.playState) === "paused" && a.pause()));
468
+ };
469
+ for (const n of [...e, s]) n.addEventListener("change", d);
470
+ return d(), () => {
471
+ for (const n of [...e, s]) n.removeEventListener("change", d);
472
+ a?.cancel();
473
+ };
474
+ }
475
+ function Ht(o, t, i) {
476
+ return (e) => {
477
+ if (typeof o == "function") {
478
+ const a = o(e);
479
+ if (!e) return;
480
+ const c = tt(e, t, i);
481
+ return () => {
482
+ c(), typeof a == "function" ? a() : o(null);
483
+ };
484
+ }
485
+ if (o && (o.current = e), !e) return;
486
+ const s = tt(e, t, i);
487
+ return () => {
488
+ s(), o && (o.current = null);
489
+ };
490
+ };
379
491
  }
380
- function No(t, o) {
492
+ function Gt(o, t) {
381
493
  const {
382
494
  as: i,
383
- children: a,
384
- className: n,
385
- background: s,
386
- backgroundColor: p,
387
- bg: c,
388
- bgSize: r,
389
- bgRepeat: u,
390
- bgGroup: l,
391
- groupParent: d,
392
- bgPosition: v,
495
+ children: e,
496
+ className: s,
497
+ background: a,
498
+ backgroundColor: c,
499
+ bg: d,
500
+ bgSize: n,
501
+ bgRepeat: l,
502
+ bgGroup: b,
503
+ groupParent: f,
504
+ bgPosition: h,
393
505
  border: y,
394
- boxShadow: B,
395
- color: h,
396
- cursor: g,
397
- opacity: b,
398
- overflow: S,
399
- overflowX: x,
400
- overflowY: k,
401
- pointerEvents: R,
402
- aspectRatio: W,
403
- transform: L,
404
- transformOrigin: C,
405
- p: w,
406
- m,
506
+ boxShadow: p,
507
+ color: u,
508
+ cursor: $,
509
+ opacity: g,
510
+ overflow: C,
511
+ overflowX: W,
512
+ overflowY: S,
513
+ pointerEvents: k,
514
+ animation: R,
515
+ aspectRatio: T,
516
+ transform: w,
517
+ transformOrigin: I,
518
+ p: v,
519
+ m: V,
407
520
  outlineColor: P,
408
- outlineWidth: N,
409
- outlineOffset: I,
410
- outlineStyle: j,
411
- listStyle: O,
412
- display: E,
413
- position: e,
414
- width: q,
415
- maxWidth: J,
416
- minWidth: Q,
417
- height: U,
418
- hover: oo,
419
- focusVisible: to,
420
- active: io,
421
- disabledStyle: eo,
422
- maxHeight: ro,
423
- minHeight: no,
424
- md: ao,
425
- lg: so,
426
- xl: fo,
427
- style: _,
428
- ...co
429
- } = t, uo = i ?? "div", M = go({
430
- hover: oo,
431
- focusVisible: to,
432
- active: io,
433
- disabledStyle: eo,
434
- background: s,
435
- backgroundColor: p,
436
- bg: c,
437
- bgSize: r,
438
- bgRepeat: u,
439
- bgGroup: l,
440
- groupParent: d,
441
- bgPosition: v,
521
+ outlineWidth: j,
522
+ outlineOffset: M,
523
+ outlineStyle: O,
524
+ listStyle: A,
525
+ display: r,
526
+ position: it,
527
+ width: nt,
528
+ maxWidth: et,
529
+ minWidth: rt,
530
+ height: at,
531
+ hover: st,
532
+ focusVisible: dt,
533
+ active: ft,
534
+ disabledStyle: ut,
535
+ maxHeight: ct,
536
+ minHeight: lt,
537
+ md: Y,
538
+ lg: J,
539
+ xl: _,
540
+ style: E,
541
+ ...mt
542
+ } = o, bt = i ?? "div", H = {
543
+ hover: st,
544
+ focusVisible: dt,
545
+ active: ft,
546
+ disabledStyle: ut,
547
+ background: a,
548
+ backgroundColor: c,
549
+ bg: d,
550
+ bgSize: n,
551
+ bgRepeat: l,
552
+ bgGroup: b,
553
+ groupParent: f,
554
+ bgPosition: h,
442
555
  border: y,
443
- boxShadow: B,
444
- color: h,
445
- cursor: g,
446
- opacity: b,
447
- overflow: S,
448
- overflowX: x,
449
- overflowY: k,
450
- pointerEvents: R,
451
- aspectRatio: W,
452
- transform: L,
453
- transformOrigin: C,
454
- p: w,
455
- m,
556
+ boxShadow: p,
557
+ color: u,
558
+ cursor: $,
559
+ opacity: g,
560
+ overflow: C,
561
+ overflowX: W,
562
+ overflowY: S,
563
+ pointerEvents: k,
564
+ animation: R,
565
+ aspectRatio: T,
566
+ transform: w,
567
+ transformOrigin: I,
568
+ p: v,
569
+ m: V,
456
570
  outlineColor: P,
457
- outlineWidth: N,
458
- outlineOffset: I,
459
- outlineStyle: j,
460
- listStyle: O,
461
- display: E,
462
- position: e,
463
- width: q,
464
- maxWidth: J,
465
- minWidth: Q,
466
- height: U,
467
- maxHeight: ro,
468
- minHeight: no,
469
- md: ao,
470
- lg: so,
471
- xl: fo
472
- }), lo = M.style || _ ? {
473
- ...M.style,
474
- ..._
571
+ outlineWidth: j,
572
+ outlineOffset: M,
573
+ outlineStyle: O,
574
+ listStyle: A,
575
+ display: r,
576
+ position: it,
577
+ width: nt,
578
+ maxWidth: et,
579
+ minWidth: rt,
580
+ height: at,
581
+ maxHeight: ct,
582
+ minHeight: lt,
583
+ md: Y,
584
+ lg: J,
585
+ xl: _
586
+ }, pt = JSON.stringify([
587
+ R,
588
+ Y?.animation,
589
+ J?.animation,
590
+ _?.animation,
591
+ E
592
+ ]), gt = yt(
593
+ () => Ht(t, H, E),
594
+ // Значения захваченных настроек представлены стабильным ключом.
595
+ [t, pt]
596
+ ), G = St(H), vt = G.style || E ? {
597
+ ...G.style,
598
+ ...E
475
599
  } : void 0;
476
- return /* @__PURE__ */ bo(
477
- uo,
600
+ return /* @__PURE__ */ ht(
601
+ bt,
478
602
  {
479
- className: po(M.className, d && "group", n),
480
- ref: o,
481
- style: lo,
482
- ...co,
483
- children: a
603
+ className: xt(G.className, f && "group", s),
604
+ ref: Dt(H) ? gt : t,
605
+ style: vt,
606
+ ...mt,
607
+ children: e
484
608
  }
485
609
  );
486
610
  }
487
- const Ao = mo(No);
611
+ const Yt = $t(Gt);
488
612
  export {
489
- Ao as Box
613
+ Yt as Box
490
614
  };