@shmidko61/lc-ui-kit 0.9.0 → 0.12.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 +111 -0
- package/dist/box/box.d.ts +1 -1
- package/dist/box/box.types.d.ts +34 -1
- package/dist/box.cjs +1 -1
- package/dist/box.js +299 -190
- package/dist/button/button.helpers.d.ts +4 -1
- package/dist/button.cjs +1 -1
- package/dist/button.js +152 -141
- package/dist/flex.cjs +1 -1
- package/dist/flex.js +18 -18
- package/dist/grid.cjs +1 -1
- package/dist/grid.js +57 -57
- package/dist/icons/icons.d.ts +6 -0
- package/dist/icons.cjs +1 -1
- package/dist/icons.js +34 -33
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.js +64 -63
- package/dist/styles.css +1 -1
- package/package.json +9 -3
- package/dist/vite.config.d.ts +0 -2
package/dist/box.js
CHANGED
|
@@ -1,82 +1,183 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { a as
|
|
4
|
-
function
|
|
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
5
|
background: t,
|
|
6
6
|
backgroundColor: o,
|
|
7
7
|
bg: i,
|
|
8
|
-
bgSize:
|
|
9
|
-
bgRepeat:
|
|
10
|
-
bgPosition:
|
|
11
|
-
border:
|
|
12
|
-
boxShadow:
|
|
13
|
-
color:
|
|
14
|
-
cursor:
|
|
15
|
-
opacity:
|
|
16
|
-
overflow:
|
|
17
|
-
overflowX:
|
|
18
|
-
overflowY:
|
|
19
|
-
pointerEvents:
|
|
20
|
-
aspectRatio:
|
|
21
|
-
transform:
|
|
22
|
-
transformOrigin:
|
|
23
|
-
p:
|
|
24
|
-
m:
|
|
25
|
-
outlineColor:
|
|
26
|
-
outlineWidth:
|
|
27
|
-
outlineOffset:
|
|
28
|
-
outlineStyle:
|
|
29
|
-
listStyle:
|
|
30
|
-
display:
|
|
31
|
-
position:
|
|
32
|
-
width:
|
|
33
|
-
maxWidth:
|
|
34
|
-
minWidth:
|
|
35
|
-
height:
|
|
36
|
-
maxHeight:
|
|
37
|
-
minHeight:
|
|
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,
|
|
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,
|
|
36
|
+
maxHeight: O,
|
|
37
|
+
minHeight: E
|
|
38
38
|
}) {
|
|
39
39
|
const e = {};
|
|
40
|
-
return i !== void 0 ?
|
|
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
41
|
}
|
|
42
|
-
function
|
|
43
|
-
const o = [], i = {},
|
|
44
|
-
|
|
45
|
-
for (const
|
|
46
|
-
const
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
`${a}-`,
|
|
53
|
-
d
|
|
54
|
-
);
|
|
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
|
|
51
|
+
});
|
|
55
52
|
}
|
|
56
|
-
return {
|
|
53
|
+
return ho(t, o, i), {
|
|
57
54
|
className: o.join(" "),
|
|
58
55
|
style: Object.keys(i).length > 0 ? i : void 0
|
|
59
56
|
};
|
|
60
57
|
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
58
|
+
const X = [
|
|
59
|
+
{
|
|
60
|
+
prop: "hover",
|
|
61
|
+
name: "hover",
|
|
62
|
+
variant: "[@media(hover:hover)_and_(pointer:fine)]:[&:hover:not(:disabled):not([aria-disabled=true]):not([data-disabled=true])]"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
prop: "focusVisible",
|
|
66
|
+
name: "focus-visible",
|
|
67
|
+
variant: "[&:focus-visible:not(:disabled):not([aria-disabled=true]):not([data-disabled=true])]"
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
prop: "active",
|
|
71
|
+
name: "active",
|
|
72
|
+
variant: "[&:active:not(:disabled):not([aria-disabled=true]):not([data-disabled=true])]"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
prop: "disabledStyle",
|
|
76
|
+
name: "disabled",
|
|
77
|
+
variant: "[&:is(:disabled,[aria-disabled=true],[data-disabled=true]):is(:disabled,[aria-disabled=true],[data-disabled=true])]"
|
|
78
|
+
}
|
|
79
|
+
];
|
|
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]`);
|
|
92
|
+
}
|
|
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}]`
|
|
112
|
+
);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
}
|
|
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) : {};
|
|
120
|
+
}
|
|
121
|
+
function vo(t, o) {
|
|
122
|
+
const i = t === "color" ? "inherit" : "initial";
|
|
123
|
+
if (t !== "background" && t !== "backgroundColor" && t !== "color")
|
|
124
|
+
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;
|
|
141
|
+
}
|
|
142
|
+
if (o.borderRadius !== void 0) {
|
|
143
|
+
const [i, a = i] = String(o.borderRadius).split("/"), n = (c) => {
|
|
144
|
+
const r = c.trim().split(/\s+(?![^()]*\))/);
|
|
145
|
+
return [
|
|
146
|
+
r[0],
|
|
147
|
+
r[1] ?? r[0],
|
|
148
|
+
r[2] ?? r[0],
|
|
149
|
+
r[3] ?? r[1] ?? r[0]
|
|
150
|
+
];
|
|
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;
|
|
155
|
+
}
|
|
156
|
+
return o;
|
|
157
|
+
}
|
|
158
|
+
function K(t, o, i, {
|
|
159
|
+
classPrefix: a = "",
|
|
160
|
+
variablePrefix: n = "",
|
|
161
|
+
isGroupParent: s = !1
|
|
162
|
+
} = {}) {
|
|
163
|
+
const p = Z(t);
|
|
164
|
+
for (const [c, r] of Object.entries(p ?? {})) {
|
|
165
|
+
if (r == null)
|
|
65
166
|
continue;
|
|
66
|
-
const
|
|
67
|
-
if (
|
|
68
|
-
o.push(`${
|
|
167
|
+
const u = String(r), l = $o(c, u);
|
|
168
|
+
if (l) {
|
|
169
|
+
o.push(`${a}${l}`);
|
|
69
170
|
continue;
|
|
70
171
|
}
|
|
71
|
-
const
|
|
72
|
-
|
|
172
|
+
const d = `${n}${D(c)}`, v = Bo(c, d);
|
|
173
|
+
v && (i[`--${d}`] = u, o.push(`${a}${v}`));
|
|
73
174
|
}
|
|
74
175
|
if (t.bgGroup !== void 0) {
|
|
75
|
-
const
|
|
76
|
-
i[`--${
|
|
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})]`);
|
|
77
178
|
}
|
|
78
179
|
}
|
|
79
|
-
function
|
|
180
|
+
function $o(t, o) {
|
|
80
181
|
if (t === "display")
|
|
81
182
|
return o === "none" ? "hidden" : o;
|
|
82
183
|
if (t === "position")
|
|
@@ -119,7 +220,7 @@ function uo(t, o) {
|
|
|
119
220
|
if (t === "listStyleType")
|
|
120
221
|
return `list-${o}`;
|
|
121
222
|
}
|
|
122
|
-
function
|
|
223
|
+
function Bo(t, o) {
|
|
123
224
|
const i = `var(--${o})`;
|
|
124
225
|
return {
|
|
125
226
|
background: `[background:${i}]`,
|
|
@@ -172,80 +273,80 @@ function co(t, o) {
|
|
|
172
273
|
zIndex: `z-[${i}]`
|
|
173
274
|
}[t];
|
|
174
275
|
}
|
|
175
|
-
function
|
|
276
|
+
function D(t) {
|
|
176
277
|
return t.replace(/[A-Z]/g, (o) => `-${o.toLowerCase()}`);
|
|
177
278
|
}
|
|
178
|
-
function
|
|
279
|
+
function yo(t, o) {
|
|
179
280
|
if (o !== void 0) {
|
|
180
281
|
if (Array.isArray(o)) {
|
|
181
|
-
t.padding = o.map(
|
|
282
|
+
t.padding = o.map(f).join(" ");
|
|
182
283
|
return;
|
|
183
284
|
}
|
|
184
285
|
if (typeof o != "object") {
|
|
185
|
-
t.padding =
|
|
286
|
+
t.padding = f(o);
|
|
186
287
|
return;
|
|
187
288
|
}
|
|
188
|
-
"px" in o && o.px !== void 0 && (t.paddingLeft =
|
|
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));
|
|
189
290
|
}
|
|
190
291
|
}
|
|
191
|
-
function
|
|
292
|
+
function ko(t, o) {
|
|
192
293
|
if (o !== void 0) {
|
|
193
294
|
if (Array.isArray(o)) {
|
|
194
|
-
t.margin = o.map(
|
|
295
|
+
t.margin = o.map(f).join(" ");
|
|
195
296
|
return;
|
|
196
297
|
}
|
|
197
298
|
if (typeof o != "object") {
|
|
198
|
-
t.margin =
|
|
299
|
+
t.margin = f(o);
|
|
199
300
|
return;
|
|
200
301
|
}
|
|
201
|
-
"mx" in o && o.mx !== void 0 && (t.marginLeft =
|
|
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));
|
|
202
303
|
}
|
|
203
304
|
}
|
|
204
|
-
function
|
|
205
|
-
o && (o.radius !== void 0 &&
|
|
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));
|
|
206
307
|
}
|
|
207
|
-
function
|
|
208
|
-
if (
|
|
209
|
-
o.topLeft !== void 0 && (t.borderTopLeftRadius =
|
|
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));
|
|
210
311
|
return;
|
|
211
312
|
}
|
|
212
|
-
t.borderRadius =
|
|
313
|
+
t.borderRadius = T(o);
|
|
213
314
|
}
|
|
214
|
-
function
|
|
215
|
-
if (
|
|
216
|
-
o.top !== void 0 && (t.borderTopWidth =
|
|
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));
|
|
217
318
|
return;
|
|
218
319
|
}
|
|
219
|
-
t.borderWidth =
|
|
320
|
+
t.borderWidth = V(o);
|
|
220
321
|
}
|
|
221
|
-
function
|
|
322
|
+
function Wo(t) {
|
|
222
323
|
return typeof t == "object";
|
|
223
324
|
}
|
|
224
|
-
function
|
|
325
|
+
function Co(t) {
|
|
225
326
|
return typeof t == "object";
|
|
226
327
|
}
|
|
227
|
-
function
|
|
328
|
+
function T(t) {
|
|
228
329
|
return t.startsWith("--") ? `var(${t})` : t;
|
|
229
330
|
}
|
|
230
|
-
function
|
|
331
|
+
function V(t) {
|
|
231
332
|
return t.startsWith("--") ? `var(${t})` : t;
|
|
232
333
|
}
|
|
233
|
-
function
|
|
334
|
+
function zo(t) {
|
|
234
335
|
return t === "hidden" ? "none" : t;
|
|
235
336
|
}
|
|
236
|
-
function
|
|
337
|
+
function A(t) {
|
|
237
338
|
return typeof t == "number" ? `${t}px` : t;
|
|
238
339
|
}
|
|
239
|
-
function
|
|
340
|
+
function f(t) {
|
|
240
341
|
return typeof t == "number" ? `${t}px` : t;
|
|
241
342
|
}
|
|
242
|
-
function
|
|
343
|
+
function z(t) {
|
|
243
344
|
return typeof t == "number" ? `${t}px` : t;
|
|
244
345
|
}
|
|
245
|
-
function
|
|
346
|
+
function To(t) {
|
|
246
347
|
return typeof t == "number" ? `${t}px` : t;
|
|
247
348
|
}
|
|
248
|
-
function
|
|
349
|
+
function Vo(t) {
|
|
249
350
|
return {
|
|
250
351
|
"no-repeat": "no-repeat",
|
|
251
352
|
repeat: "repeat",
|
|
@@ -255,127 +356,135 @@ function yo(t) {
|
|
|
255
356
|
"repeat-y": "repeat-y"
|
|
256
357
|
}[t];
|
|
257
358
|
}
|
|
258
|
-
function
|
|
359
|
+
function Lo(t) {
|
|
259
360
|
return t.replace("-", " ");
|
|
260
361
|
}
|
|
261
|
-
function
|
|
262
|
-
return
|
|
362
|
+
function G(t) {
|
|
363
|
+
return $(t);
|
|
263
364
|
}
|
|
264
|
-
function
|
|
265
|
-
const i =
|
|
266
|
-
if (
|
|
365
|
+
function wo(t, o) {
|
|
366
|
+
const i = G(o);
|
|
367
|
+
if (Po(o)) {
|
|
267
368
|
t.background = i;
|
|
268
369
|
return;
|
|
269
370
|
}
|
|
270
371
|
t.backgroundColor = i;
|
|
271
372
|
}
|
|
272
|
-
function
|
|
373
|
+
function Po(t) {
|
|
273
374
|
const o = t.trim().toLowerCase();
|
|
274
375
|
return o.includes("url(") || o.includes("gradient(") || o.includes("image-set(") || o.includes("cross-fade(") || o.includes("element(") || o.includes("paint(");
|
|
275
376
|
}
|
|
276
|
-
function
|
|
377
|
+
function $(t) {
|
|
277
378
|
return t.startsWith("--") ? `var(${t})` : t;
|
|
278
379
|
}
|
|
279
|
-
function
|
|
380
|
+
function No(t, o) {
|
|
280
381
|
const {
|
|
281
382
|
as: i,
|
|
282
|
-
children:
|
|
283
|
-
className:
|
|
284
|
-
background:
|
|
285
|
-
backgroundColor:
|
|
286
|
-
bg:
|
|
287
|
-
bgSize:
|
|
288
|
-
bgRepeat:
|
|
289
|
-
bgGroup:
|
|
290
|
-
groupParent:
|
|
291
|
-
bgPosition:
|
|
292
|
-
border:
|
|
293
|
-
boxShadow:
|
|
294
|
-
color:
|
|
295
|
-
cursor:
|
|
296
|
-
opacity:
|
|
297
|
-
overflow:
|
|
298
|
-
overflowX:
|
|
299
|
-
overflowY:
|
|
300
|
-
pointerEvents:
|
|
301
|
-
aspectRatio:
|
|
302
|
-
transform:
|
|
303
|
-
transformOrigin:
|
|
304
|
-
p:
|
|
305
|
-
m
|
|
306
|
-
outlineColor:
|
|
307
|
-
outlineWidth:
|
|
308
|
-
outlineOffset:
|
|
309
|
-
outlineStyle:
|
|
310
|
-
listStyle:
|
|
311
|
-
display:
|
|
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,
|
|
393
|
+
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,
|
|
407
|
+
outlineColor: P,
|
|
408
|
+
outlineWidth: N,
|
|
409
|
+
outlineOffset: I,
|
|
410
|
+
outlineStyle: j,
|
|
411
|
+
listStyle: O,
|
|
412
|
+
display: E,
|
|
312
413
|
position: e,
|
|
313
|
-
width:
|
|
314
|
-
maxWidth:
|
|
315
|
-
minWidth:
|
|
316
|
-
height:
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
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,
|
|
442
|
+
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,
|
|
456
|
+
outlineColor: P,
|
|
457
|
+
outlineWidth: N,
|
|
458
|
+
outlineOffset: I,
|
|
459
|
+
outlineStyle: j,
|
|
460
|
+
listStyle: O,
|
|
461
|
+
display: E,
|
|
353
462
|
position: e,
|
|
354
|
-
width:
|
|
355
|
-
maxWidth:
|
|
356
|
-
minWidth:
|
|
357
|
-
height:
|
|
358
|
-
maxHeight:
|
|
359
|
-
minHeight:
|
|
360
|
-
md:
|
|
361
|
-
lg:
|
|
362
|
-
xl:
|
|
363
|
-
}),
|
|
364
|
-
...
|
|
365
|
-
...
|
|
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
|
+
..._
|
|
366
475
|
} : void 0;
|
|
367
|
-
return /* @__PURE__ */
|
|
368
|
-
|
|
476
|
+
return /* @__PURE__ */ bo(
|
|
477
|
+
uo,
|
|
369
478
|
{
|
|
370
|
-
className:
|
|
479
|
+
className: po(M.className, d && "group", n),
|
|
371
480
|
ref: o,
|
|
372
|
-
style:
|
|
373
|
-
...
|
|
374
|
-
children:
|
|
481
|
+
style: lo,
|
|
482
|
+
...co,
|
|
483
|
+
children: a
|
|
375
484
|
}
|
|
376
485
|
);
|
|
377
486
|
}
|
|
378
|
-
const
|
|
487
|
+
const Ao = mo(No);
|
|
379
488
|
export {
|
|
380
|
-
|
|
489
|
+
Ao as Box
|
|
381
490
|
};
|
|
@@ -12,7 +12,10 @@ export type ButtonColorBreakpointProps = {
|
|
|
12
12
|
bg?: ButtonColorValue;
|
|
13
13
|
/** Цвет текста и иконок кнопки поверх цвета из variant. */
|
|
14
14
|
color?: ButtonColorValue;
|
|
15
|
-
/**
|
|
15
|
+
/**
|
|
16
|
+
* Background кнопки при hover. Если не передан, при `bg` используется тот же цвет.
|
|
17
|
+
* @deprecated Используйте `hover={{ bg: value }}`; новый API имеет приоритет.
|
|
18
|
+
*/
|
|
16
19
|
hoverBg?: ButtonColorValue;
|
|
17
20
|
/** Background кнопки при active. Если не передан, при `bg` используется hover/base цвет. */
|
|
18
21
|
activeBg?: ButtonColorValue;
|