skillgrid 0.0.34-dev-40511-42085-40506-alert-placeholder-modal-fix.1210374 → 0.0.34-dev-40511-42085-40506-alert-placeholder-modal-fix.1213385
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/dist/components/Dialog/Dialog.type.d.ts +3 -1
- package/dist/index.cjs.js +11 -11
- package/dist/index.es.js +358 -357
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as Je from "react";
|
|
2
2
|
import be, { forwardRef as U, Fragment as Ht, useState as gt, useEffect as ut, useRef as Vt, useCallback as jt, useMemo as Qe, createContext as tr, useContext as er, useLayoutEffect as zr, useImperativeHandle as Br, useId as me } from "react";
|
|
3
|
-
import { clsx as
|
|
3
|
+
import { clsx as S } from "clsx";
|
|
4
4
|
import { useFloating as Ar, useTransitionStyles as Or, useDismiss as Pr, useRole as Dr, useInteractions as Fr, useMergeRefs as Wr, FloatingPortal as Hr, FloatingOverlay as Vr, FloatingFocusManager as qr } from "@floating-ui/react";
|
|
5
5
|
import Zr from "rc-tooltip";
|
|
6
6
|
import './index.css';function Xr(t) {
|
|
@@ -22,11 +22,11 @@ function Yr() {
|
|
|
22
22
|
Me = 1;
|
|
23
23
|
var t = be, r = Symbol.for("react.element"), n = Symbol.for("react.fragment"), s = Object.prototype.hasOwnProperty, i = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, a = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
24
24
|
function l(c, u, f) {
|
|
25
|
-
var d,
|
|
26
|
-
f !== void 0 && (
|
|
27
|
-
for (d in u) s.call(u, d) && !a.hasOwnProperty(d) && (
|
|
28
|
-
if (c && c.defaultProps) for (d in u = c.defaultProps, u)
|
|
29
|
-
return { $$typeof: r, type: c, key:
|
|
25
|
+
var d, g = {}, m = null, y = null;
|
|
26
|
+
f !== void 0 && (m = "" + f), u.key !== void 0 && (m = "" + u.key), u.ref !== void 0 && (y = u.ref);
|
|
27
|
+
for (d in u) s.call(u, d) && !a.hasOwnProperty(d) && (g[d] = u[d]);
|
|
28
|
+
if (c && c.defaultProps) for (d in u = c.defaultProps, u) g[d] === void 0 && (g[d] = u[d]);
|
|
29
|
+
return { $$typeof: r, type: c, key: m, ref: y, props: g, _owner: i.current };
|
|
30
30
|
}
|
|
31
31
|
return Dt.Fragment = n, Dt.jsx = l, Dt.jsxs = l, Dt;
|
|
32
32
|
}
|
|
@@ -43,14 +43,14 @@ var Ft = {};
|
|
|
43
43
|
var ze;
|
|
44
44
|
function Gr() {
|
|
45
45
|
return ze || (ze = 1, process.env.NODE_ENV !== "production" && function() {
|
|
46
|
-
var t = be, r = Symbol.for("react.element"), n = Symbol.for("react.portal"), s = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), a = Symbol.for("react.profiler"), l = Symbol.for("react.provider"), c = Symbol.for("react.context"), u = Symbol.for("react.forward_ref"), f = Symbol.for("react.suspense"), d = Symbol.for("react.suspense_list"),
|
|
47
|
-
function
|
|
46
|
+
var t = be, r = Symbol.for("react.element"), n = Symbol.for("react.portal"), s = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), a = Symbol.for("react.profiler"), l = Symbol.for("react.provider"), c = Symbol.for("react.context"), u = Symbol.for("react.forward_ref"), f = Symbol.for("react.suspense"), d = Symbol.for("react.suspense_list"), g = Symbol.for("react.memo"), m = Symbol.for("react.lazy"), y = Symbol.for("react.offscreen"), x = Symbol.iterator, w = "@@iterator";
|
|
47
|
+
function b(e) {
|
|
48
48
|
if (e === null || typeof e != "object")
|
|
49
49
|
return null;
|
|
50
|
-
var _ = x && e[x] || e[
|
|
50
|
+
var _ = x && e[x] || e[w];
|
|
51
51
|
return typeof _ == "function" ? _ : null;
|
|
52
52
|
}
|
|
53
|
-
var
|
|
53
|
+
var h = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
54
54
|
function p(e) {
|
|
55
55
|
{
|
|
56
56
|
for (var _ = arguments.length, v = new Array(_ > 1 ? _ - 1 : 0), j = 1; j < _; j++)
|
|
@@ -60,7 +60,7 @@ function Gr() {
|
|
|
60
60
|
}
|
|
61
61
|
function C(e, _, v) {
|
|
62
62
|
{
|
|
63
|
-
var j =
|
|
63
|
+
var j = h.ReactDebugCurrentFrame, A = j.getStackAddendum();
|
|
64
64
|
A !== "" && (_ += "%s", v = v.concat([A]));
|
|
65
65
|
var P = v.map(function(N) {
|
|
66
66
|
return String(N);
|
|
@@ -71,7 +71,7 @@ function Gr() {
|
|
|
71
71
|
var k = !1, T = !1, $ = !1, E = !1, z = !1, B;
|
|
72
72
|
B = Symbol.for("react.module.reference");
|
|
73
73
|
function F(e) {
|
|
74
|
-
return !!(typeof e == "string" || typeof e == "function" || e === s || e === a || z || e === i || e === f || e === d || E || e ===
|
|
74
|
+
return !!(typeof e == "string" || typeof e == "function" || e === s || e === a || z || e === i || e === f || e === d || E || e === y || k || T || $ || typeof e == "object" && e !== null && (e.$$typeof === m || e.$$typeof === g || e.$$typeof === l || e.$$typeof === c || e.$$typeof === u || // This needs to include all possible module reference object
|
|
75
75
|
// types supported by any Flight configuration anywhere since
|
|
76
76
|
// we don't know which Flight build this will end up being used
|
|
77
77
|
// with.
|
|
@@ -118,10 +118,10 @@ function Gr() {
|
|
|
118
118
|
return D(v._context) + ".Provider";
|
|
119
119
|
case u:
|
|
120
120
|
return q(e, e.render, "ForwardRef");
|
|
121
|
-
case
|
|
121
|
+
case g:
|
|
122
122
|
var j = e.displayName || null;
|
|
123
123
|
return j !== null ? j : L(e.type) || "Memo";
|
|
124
|
-
case
|
|
124
|
+
case m: {
|
|
125
125
|
var A = e, P = A._payload, N = A._init;
|
|
126
126
|
try {
|
|
127
127
|
return L(N(P));
|
|
@@ -194,7 +194,7 @@ function Gr() {
|
|
|
194
194
|
W < 0 && p("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
195
195
|
}
|
|
196
196
|
}
|
|
197
|
-
var it =
|
|
197
|
+
var it = h.ReactCurrentDispatcher, Tt;
|
|
198
198
|
function pt(e, _, v) {
|
|
199
199
|
{
|
|
200
200
|
if (Tt === void 0)
|
|
@@ -308,9 +308,9 @@ function Gr() {
|
|
|
308
308
|
switch (e.$$typeof) {
|
|
309
309
|
case u:
|
|
310
310
|
return re(e.render);
|
|
311
|
-
case
|
|
311
|
+
case g:
|
|
312
312
|
return Q(e.type, _, v);
|
|
313
|
-
case
|
|
313
|
+
case m: {
|
|
314
314
|
var j = e, A = j._payload, P = j._init;
|
|
315
315
|
try {
|
|
316
316
|
return Q(P(A), _, v);
|
|
@@ -320,7 +320,7 @@ function Gr() {
|
|
|
320
320
|
}
|
|
321
321
|
return "";
|
|
322
322
|
}
|
|
323
|
-
var tt = Object.prototype.hasOwnProperty, vt = {}, ve =
|
|
323
|
+
var tt = Object.prototype.hasOwnProperty, vt = {}, ve = h.ReactDebugCurrentFrame;
|
|
324
324
|
function Xt(e) {
|
|
325
325
|
if (e) {
|
|
326
326
|
var _ = e._owner, v = Q(e.type, e._source, _ ? _.type : null);
|
|
@@ -371,7 +371,7 @@ function Gr() {
|
|
|
371
371
|
if (hr(e))
|
|
372
372
|
return p("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", gr(e)), Ce(e);
|
|
373
373
|
}
|
|
374
|
-
var Se =
|
|
374
|
+
var Se = h.ReactCurrentOwner, br = {
|
|
375
375
|
key: !0,
|
|
376
376
|
ref: !0,
|
|
377
377
|
__self: !0,
|
|
@@ -465,7 +465,7 @@ function Gr() {
|
|
|
465
465
|
return wr(e, R, nt, A, j, Se.current, N);
|
|
466
466
|
}
|
|
467
467
|
}
|
|
468
|
-
var ae =
|
|
468
|
+
var ae = h.ReactCurrentOwner, je = h.ReactDebugCurrentFrame;
|
|
469
469
|
function Mt(e) {
|
|
470
470
|
if (e) {
|
|
471
471
|
var _ = e._owner, v = Q(e.type, e._source, _ ? _.type : null);
|
|
@@ -531,7 +531,7 @@ Check the top-level render call using <` + v + ">.");
|
|
|
531
531
|
else if (ie(e))
|
|
532
532
|
e._store && (e._store.validated = !0);
|
|
533
533
|
else if (e) {
|
|
534
|
-
var A =
|
|
534
|
+
var A = b(e);
|
|
535
535
|
if (typeof A == "function" && A !== e.entries)
|
|
536
536
|
for (var P = A.call(e), N; !(N = P.next()).done; )
|
|
537
537
|
ie(N.value) && Ee(N.value, _);
|
|
@@ -548,7 +548,7 @@ Check the top-level render call using <` + v + ">.");
|
|
|
548
548
|
v = _.propTypes;
|
|
549
549
|
else if (typeof _ == "object" && (_.$$typeof === u || // Note: Memo only checks outer props here.
|
|
550
550
|
// Inner props are checked in the reconciler.
|
|
551
|
-
_.$$typeof ===
|
|
551
|
+
_.$$typeof === g))
|
|
552
552
|
v = _.propTypes;
|
|
553
553
|
else
|
|
554
554
|
return;
|
|
@@ -911,27 +911,27 @@ const Et = /* @__PURE__ */ Xr(to), rr = U(
|
|
|
911
911
|
const c = !!(i && l && a === "l"), u = !!(!n && l && r), f = l && !!(c && !n && s || s && !c);
|
|
912
912
|
return /* @__PURE__ */ o.jsxs(Ht, { children: [
|
|
913
913
|
c && n && /* @__PURE__ */ o.jsxs(Ht, { children: [
|
|
914
|
-
/* @__PURE__ */ o.jsx("span", { "data-testid": "button-label", className:
|
|
914
|
+
/* @__PURE__ */ o.jsx("span", { "data-testid": "button-label", className: S(O.label, O.labelText), children: n }),
|
|
915
915
|
/* @__PURE__ */ o.jsx(
|
|
916
916
|
"span",
|
|
917
917
|
{
|
|
918
918
|
"data-testid": "button-subcaption",
|
|
919
|
-
className:
|
|
919
|
+
className: S(O.subcaption, G["typography-label-4-regular"]),
|
|
920
920
|
children: i
|
|
921
921
|
}
|
|
922
922
|
)
|
|
923
923
|
] }),
|
|
924
924
|
!c && n && /* @__PURE__ */ o.jsxs("span", { "data-testid": "button-label", className: O.label, children: [
|
|
925
925
|
r && /* @__PURE__ */ o.jsx("span", { "data-testid": "button-left-icon", className: O.icon, children: r }),
|
|
926
|
-
/* @__PURE__ */ o.jsx("span", { className:
|
|
927
|
-
!l && t && /* @__PURE__ */ o.jsx("span", { "data-testid": "button-icon", className:
|
|
926
|
+
/* @__PURE__ */ o.jsx("span", { className: S(O.labelText, { [O.isLink]: !l }), children: n }),
|
|
927
|
+
!l && t && /* @__PURE__ */ o.jsx("span", { "data-testid": "button-icon", className: S(O.icon, O.iconRight), children: t })
|
|
928
928
|
] }),
|
|
929
929
|
u && /* @__PURE__ */ o.jsx("span", { "data-testid": "button-icon", className: O.icon, children: l ? r : t }),
|
|
930
930
|
f && /* @__PURE__ */ o.jsx("div", { "data-testid": "button-right-group", className: O.rightGroup, children: /* @__PURE__ */ o.jsx(
|
|
931
931
|
"span",
|
|
932
932
|
{
|
|
933
933
|
"data-testid": "button-postfix",
|
|
934
|
-
className:
|
|
934
|
+
className: S(O.postfix, G["typography-subtitle-2-semibold"]),
|
|
935
935
|
children: s
|
|
936
936
|
}
|
|
937
937
|
) })
|
|
@@ -945,31 +945,31 @@ const Et = /* @__PURE__ */ Xr(to), rr = U(
|
|
|
945
945
|
className: l,
|
|
946
946
|
children: c,
|
|
947
947
|
tabIndex: u
|
|
948
|
-
} = t, f = n === "tertiary", d = Ae(t),
|
|
948
|
+
} = t, f = n === "tertiary", d = Ae(t), g = Qr(t), m = f && "paddings" in t ? t.paddings ?? !0 : !0, y = d ? t.subcaption : void 0, x = d ? t.postfix : void 0, w = d ? t.stretched : void 0, b = !(g && t.size === void 0), h = g && b ? t.iconLeft : void 0, p = g && b ? t.iconRight : void 0, C = !!(d && "loading" in t && t.loading), k = d ? a : a || C, T = !k && !C, $ = d ? t.iconLeft : void 0, E = !!(!c && (d && $ && !x || g && p)), z = typeof w == "object" ? w.justify === "space-between" : void 0, B = ao(s), F = G[B], q = g ? Dn(t.size ?? "m") : void 0, D = q ? G[q] : void 0, L = Fn(k, n, i), M = k || C ? -1 : u, W = S(
|
|
949
949
|
O.button,
|
|
950
950
|
O[s],
|
|
951
951
|
O[n],
|
|
952
952
|
O[i],
|
|
953
|
-
|
|
953
|
+
g && D,
|
|
954
954
|
d && F,
|
|
955
955
|
{
|
|
956
956
|
[O.disabled]: k,
|
|
957
957
|
[O.loading]: d && "loading" in t && t.loading,
|
|
958
|
-
[O.stretched]:
|
|
958
|
+
[O.stretched]: w,
|
|
959
959
|
[O.spaceBetween]: z,
|
|
960
|
-
[O.withSubcaption]: !!(
|
|
960
|
+
[O.withSubcaption]: !!(y && s === "l" && c),
|
|
961
961
|
[O.iconOnly]: E,
|
|
962
|
-
[O.link]:
|
|
963
|
-
[O.underline]:
|
|
964
|
-
[O.noPaddings]: f && d && !
|
|
962
|
+
[O.link]: g,
|
|
963
|
+
[O.underline]: g && "showUnderline" in t && t.showUnderline,
|
|
964
|
+
[O.noPaddings]: f && d && !m
|
|
965
965
|
},
|
|
966
966
|
l
|
|
967
967
|
), H = {
|
|
968
968
|
iconRight: p,
|
|
969
|
-
iconLeft: d ? $ :
|
|
969
|
+
iconLeft: d ? $ : h,
|
|
970
970
|
children: c,
|
|
971
971
|
postfix: x,
|
|
972
|
-
subcaption:
|
|
972
|
+
subcaption: y,
|
|
973
973
|
size: s,
|
|
974
974
|
isAsButton: d
|
|
975
975
|
};
|
|
@@ -1023,7 +1023,7 @@ const Et = /* @__PURE__ */ Xr(to), rr = U(
|
|
|
1023
1023
|
style: ot,
|
|
1024
1024
|
...at,
|
|
1025
1025
|
children: [
|
|
1026
|
-
/* @__PURE__ */ o.jsx("div", { className:
|
|
1026
|
+
/* @__PURE__ */ o.jsx("div", { className: S(O.content, { [O.contentHidden]: C }), children: /* @__PURE__ */ o.jsx(De, { ...H }) }),
|
|
1027
1027
|
C && /* @__PURE__ */ o.jsx("div", { className: O.loaderWrapper, children: /* @__PURE__ */ o.jsx(
|
|
1028
1028
|
nr,
|
|
1029
1029
|
{
|
|
@@ -1049,7 +1049,7 @@ const or = U(
|
|
|
1049
1049
|
buttonStyle: "neutral",
|
|
1050
1050
|
size: "m",
|
|
1051
1051
|
iconLeft: n ?? /* @__PURE__ */ o.jsx(no, {}),
|
|
1052
|
-
className:
|
|
1052
|
+
className: S(O.backButton, G["typography-subtitle-1-semibold"], s)
|
|
1053
1053
|
};
|
|
1054
1054
|
return /* @__PURE__ */ o.jsx(ye, { ref: r, ...l });
|
|
1055
1055
|
}
|
|
@@ -1155,19 +1155,19 @@ const wo = "data:image/svg+xml,%3csvg%20opacity='0.9'%20preserveAspectRatio='xMi
|
|
|
1155
1155
|
placeholderType: u = "neutral",
|
|
1156
1156
|
name: f,
|
|
1157
1157
|
imgSrc: d,
|
|
1158
|
-
imgAlt:
|
|
1159
|
-
icon:
|
|
1160
|
-
imgProps:
|
|
1158
|
+
imgAlt: g,
|
|
1159
|
+
icon: m,
|
|
1160
|
+
imgProps: y,
|
|
1161
1161
|
colorScheme: x,
|
|
1162
|
-
className:
|
|
1163
|
-
"data-testid":
|
|
1164
|
-
...
|
|
1165
|
-
} = t, { onClick: p, onPointerDown: C } =
|
|
1162
|
+
className: w,
|
|
1163
|
+
"data-testid": b,
|
|
1164
|
+
...h
|
|
1165
|
+
} = t, { onClick: p, onPointerDown: C } = h, T = !a && !i && (!!p || !!C), [$, E] = gt(!1);
|
|
1166
1166
|
ut(() => {
|
|
1167
1167
|
d && E(!1);
|
|
1168
1168
|
}, [d]);
|
|
1169
|
-
const z = d && !$ ? "image" :
|
|
1170
|
-
|
|
1169
|
+
const z = d && !$ ? "image" : m ? "icon" : f ? "name" : "placeholder", B = x || z === "name" && bo(f) || "gray", F = Co(s), q = xo(s, l), D = S(
|
|
1170
|
+
w,
|
|
1171
1171
|
Ct.avatar,
|
|
1172
1172
|
Ct[`variant-${c}`],
|
|
1173
1173
|
Ct[`color-${B}`],
|
|
@@ -1182,39 +1182,39 @@ const wo = "data:image/svg+xml,%3csvg%20opacity='0.9'%20preserveAspectRatio='xMi
|
|
|
1182
1182
|
"--avatar-border-radius": `${q}px`,
|
|
1183
1183
|
...n
|
|
1184
1184
|
}, M = {
|
|
1185
|
-
icon: () => /* @__PURE__ */ o.jsx("span", { "data-testid": "avatar-icon", title:
|
|
1185
|
+
icon: () => /* @__PURE__ */ o.jsx("span", { "data-testid": "avatar-icon", title: g || void 0, role: "img", className: Ct.icon, children: m == null ? void 0 : m({}) }),
|
|
1186
1186
|
name: () => /* @__PURE__ */ o.jsx(
|
|
1187
1187
|
"span",
|
|
1188
1188
|
{
|
|
1189
1189
|
role: "textbox",
|
|
1190
1190
|
"data-testid": "avatar-name",
|
|
1191
1191
|
className: Ct.name,
|
|
1192
|
-
title:
|
|
1192
|
+
title: g || void 0,
|
|
1193
1193
|
children: mo(f || "")
|
|
1194
1194
|
}
|
|
1195
1195
|
),
|
|
1196
1196
|
placeholder: () => /* @__PURE__ */ o.jsx(
|
|
1197
1197
|
"img",
|
|
1198
1198
|
{
|
|
1199
|
-
...
|
|
1199
|
+
...y,
|
|
1200
1200
|
"data-testid": "avatar-placeholder",
|
|
1201
1201
|
className: Ct.image,
|
|
1202
1202
|
src: jo[u],
|
|
1203
|
-
alt:
|
|
1203
|
+
alt: g || void 0
|
|
1204
1204
|
}
|
|
1205
1205
|
),
|
|
1206
1206
|
image: () => /* @__PURE__ */ o.jsx(
|
|
1207
1207
|
"img",
|
|
1208
1208
|
{
|
|
1209
1209
|
"data-testid": "avatar-image",
|
|
1210
|
-
...
|
|
1210
|
+
...y,
|
|
1211
1211
|
className: Ct.image,
|
|
1212
1212
|
src: d || void 0,
|
|
1213
|
-
alt:
|
|
1213
|
+
alt: g || void 0,
|
|
1214
1214
|
onLoad: () => E(!1),
|
|
1215
1215
|
onError: (H) => {
|
|
1216
1216
|
var Z;
|
|
1217
|
-
E(!0), (Z =
|
|
1217
|
+
E(!0), (Z = y == null ? void 0 : y.onError) == null || Z.call(y, H);
|
|
1218
1218
|
}
|
|
1219
1219
|
}
|
|
1220
1220
|
)
|
|
@@ -1228,7 +1228,7 @@ const wo = "data:image/svg+xml,%3csvg%20opacity='0.9'%20preserveAspectRatio='xMi
|
|
|
1228
1228
|
onClick: W,
|
|
1229
1229
|
className: D,
|
|
1230
1230
|
style: L,
|
|
1231
|
-
"data-testid":
|
|
1231
|
+
"data-testid": b,
|
|
1232
1232
|
"aria-disabled": a || i,
|
|
1233
1233
|
children: M[z](null)
|
|
1234
1234
|
}
|
|
@@ -1281,22 +1281,22 @@ const Mo = 2, zo = (t) => {
|
|
|
1281
1281
|
overflowCount: a = 0,
|
|
1282
1282
|
overflowProps: l,
|
|
1283
1283
|
cutoutBackground: c
|
|
1284
|
-
} = t, f = -(n * s) + Mo, { ref: d, bgColor:
|
|
1285
|
-
"--avatar-cutout-bg":
|
|
1284
|
+
} = t, f = -(n * s) + Mo, { ref: d, bgColor: g } = xe(), m = c || g || "#ffffff", y = Et(To.avatarGroup), x = {
|
|
1285
|
+
"--avatar-cutout-bg": m
|
|
1286
1286
|
};
|
|
1287
|
-
return r.length === 0 ? null : /* @__PURE__ */ o.jsxs("div", { className:
|
|
1288
|
-
r.map((
|
|
1289
|
-
if (
|
|
1290
|
-
const
|
|
1287
|
+
return r.length === 0 ? null : /* @__PURE__ */ o.jsxs("div", { className: y, ref: d, style: x, children: [
|
|
1288
|
+
r.map((w, b) => {
|
|
1289
|
+
if (w.wrapper) {
|
|
1290
|
+
const h = w.wrapper;
|
|
1291
1291
|
return /* @__PURE__ */ o.jsx(
|
|
1292
1292
|
"div",
|
|
1293
1293
|
{
|
|
1294
1294
|
style: {
|
|
1295
1295
|
marginRight: f
|
|
1296
1296
|
},
|
|
1297
|
-
children: /* @__PURE__ */ o.jsx(
|
|
1297
|
+
children: /* @__PURE__ */ o.jsx(h, { children: /* @__PURE__ */ o.jsx(Jt, { size: n, shape: i, ...w }) })
|
|
1298
1298
|
},
|
|
1299
|
-
te(
|
|
1299
|
+
te(w) + b
|
|
1300
1300
|
);
|
|
1301
1301
|
}
|
|
1302
1302
|
return /* @__PURE__ */ o.jsx(
|
|
@@ -1305,9 +1305,9 @@ const Mo = 2, zo = (t) => {
|
|
|
1305
1305
|
style: {
|
|
1306
1306
|
marginRight: f
|
|
1307
1307
|
},
|
|
1308
|
-
children: /* @__PURE__ */ o.jsx(Jt, { size: n, shape: i, ...
|
|
1308
|
+
children: /* @__PURE__ */ o.jsx(Jt, { size: n, shape: i, ...w })
|
|
1309
1309
|
},
|
|
1310
|
-
te(
|
|
1310
|
+
te(w) + b
|
|
1311
1311
|
);
|
|
1312
1312
|
}),
|
|
1313
1313
|
a > 0 && /* @__PURE__ */ o.jsx("div", { style: { marginRight: f }, children: /* @__PURE__ */ o.jsx(
|
|
@@ -1384,15 +1384,15 @@ function Fo({
|
|
|
1384
1384
|
disableEscapeKey: i = !1
|
|
1385
1385
|
}) {
|
|
1386
1386
|
const a = jt(
|
|
1387
|
-
(
|
|
1388
|
-
r == null || r(
|
|
1387
|
+
(w) => {
|
|
1388
|
+
r == null || r(w);
|
|
1389
1389
|
},
|
|
1390
1390
|
[r]
|
|
1391
1391
|
), l = Po(n), { context: c, refs: u } = Ar({
|
|
1392
1392
|
open: t,
|
|
1393
1393
|
onOpenChange: a,
|
|
1394
1394
|
placement: l
|
|
1395
|
-
}), f = Do(n), { isMounted: d, styles:
|
|
1395
|
+
}), f = Do(n), { isMounted: d, styles: g } = Or(c, {
|
|
1396
1396
|
duration: 200,
|
|
1397
1397
|
common: {
|
|
1398
1398
|
transitionProperty: "opacity, transform",
|
|
@@ -1402,17 +1402,17 @@ function Fo({
|
|
|
1402
1402
|
opacity: 0
|
|
1403
1403
|
},
|
|
1404
1404
|
...f
|
|
1405
|
-
}),
|
|
1405
|
+
}), m = Pr(c, {
|
|
1406
1406
|
outsidePress: !s,
|
|
1407
1407
|
outsidePressEvent: "mousedown",
|
|
1408
1408
|
escapeKey: !i
|
|
1409
|
-
}),
|
|
1409
|
+
}), y = Dr(c, { role: "dialog" }), { getFloatingProps: x } = Fr([m, y]);
|
|
1410
1410
|
return Qe(
|
|
1411
1411
|
() => ({
|
|
1412
1412
|
/** Состояние для условного рендеринга с поддержкой анимации закрытия. */
|
|
1413
1413
|
isMounted: d,
|
|
1414
1414
|
/** Стили для CSS-переходов (анимации). */
|
|
1415
|
-
transitionStyles:
|
|
1415
|
+
transitionStyles: g,
|
|
1416
1416
|
/** Контекст Floating UI. */
|
|
1417
1417
|
context: c,
|
|
1418
1418
|
/** Ссылки на элементы для Floating UI. */
|
|
@@ -1420,7 +1420,7 @@ function Fo({
|
|
|
1420
1420
|
/** Пропсы для плавающего элемента. */
|
|
1421
1421
|
getFloatingProps: x
|
|
1422
1422
|
}),
|
|
1423
|
-
[d,
|
|
1423
|
+
[d, g, c, u, x]
|
|
1424
1424
|
);
|
|
1425
1425
|
}
|
|
1426
1426
|
const ar = U((t, r) => {
|
|
@@ -1429,50 +1429,51 @@ const ar = U((t, r) => {
|
|
|
1429
1429
|
open: s,
|
|
1430
1430
|
onOpenChange: i,
|
|
1431
1431
|
overlayProps: a,
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1432
|
+
portalProps: l,
|
|
1433
|
+
children: c,
|
|
1434
|
+
disableOutsideClick: u = !1,
|
|
1435
|
+
disableEscapeKey: f = !1,
|
|
1436
|
+
disableOverlay: d = !1,
|
|
1437
|
+
className: g,
|
|
1438
|
+
style: m,
|
|
1439
|
+
"data-testid": y,
|
|
1440
|
+
...x
|
|
1440
1441
|
} = t;
|
|
1441
1442
|
s === void 0 && console.error(
|
|
1442
1443
|
"Dialog: компонент должен быть контролируемым. Используйте пропсы open и onOpenChange."
|
|
1443
1444
|
);
|
|
1444
|
-
const
|
|
1445
|
+
const w = Fo({
|
|
1445
1446
|
open: s,
|
|
1446
1447
|
onOpenChange: i,
|
|
1447
1448
|
placement: n,
|
|
1448
|
-
disableOutsideClick:
|
|
1449
|
-
disableEscapeKey:
|
|
1450
|
-
}), { isMounted:
|
|
1451
|
-
return
|
|
1452
|
-
!
|
|
1449
|
+
disableOutsideClick: u,
|
|
1450
|
+
disableEscapeKey: f
|
|
1451
|
+
}), { isMounted: b, transitionStyles: h } = w, p = Wr([r, w.refs.setFloating]);
|
|
1452
|
+
return b ? /* @__PURE__ */ o.jsxs(Hr, { ...l, children: [
|
|
1453
|
+
!d && /* @__PURE__ */ o.jsx(
|
|
1453
1454
|
Vr,
|
|
1454
1455
|
{
|
|
1455
1456
|
"data-testid": "dialog-overlay",
|
|
1456
|
-
className:
|
|
1457
|
+
className: S(de.overlay, a == null ? void 0 : a.className),
|
|
1457
1458
|
lockScroll: (a == null ? void 0 : a.lockScroll) ?? !0,
|
|
1458
1459
|
style: {
|
|
1459
|
-
opacity:
|
|
1460
|
-
transition:
|
|
1460
|
+
opacity: h == null ? void 0 : h.opacity,
|
|
1461
|
+
transition: h == null ? void 0 : h.transition,
|
|
1461
1462
|
...a == null ? void 0 : a.style
|
|
1462
1463
|
}
|
|
1463
1464
|
}
|
|
1464
1465
|
),
|
|
1465
|
-
/* @__PURE__ */ o.jsx(qr, { context:
|
|
1466
|
+
/* @__PURE__ */ o.jsx(qr, { context: w.context, children: /* @__PURE__ */ o.jsx(
|
|
1466
1467
|
"div",
|
|
1467
1468
|
{
|
|
1468
|
-
ref:
|
|
1469
|
+
ref: p,
|
|
1469
1470
|
"aria-modal": "true",
|
|
1470
1471
|
role: "dialog",
|
|
1471
|
-
className:
|
|
1472
|
-
style: { ...
|
|
1473
|
-
"data-testid":
|
|
1474
|
-
...
|
|
1475
|
-
children:
|
|
1472
|
+
className: S(g, de.container, de[`placement-${n}`]),
|
|
1473
|
+
style: { ...m, ...h },
|
|
1474
|
+
"data-testid": y,
|
|
1475
|
+
...w.getFloatingProps(x),
|
|
1476
|
+
children: c
|
|
1476
1477
|
}
|
|
1477
1478
|
) })
|
|
1478
1479
|
] }) : null;
|
|
@@ -1524,8 +1525,8 @@ const ar = U((t, r) => {
|
|
|
1524
1525
|
disabled: u = !1,
|
|
1525
1526
|
typographyStyle: f = "primary",
|
|
1526
1527
|
...d
|
|
1527
|
-
},
|
|
1528
|
-
const
|
|
1528
|
+
}, g) => {
|
|
1529
|
+
const m = l || ia[n], y = S(
|
|
1529
1530
|
Pt.typography,
|
|
1530
1531
|
G[`typography-${t}-${n}-${c}`],
|
|
1531
1532
|
Pt[f],
|
|
@@ -1534,7 +1535,7 @@ const ar = U((t, r) => {
|
|
|
1534
1535
|
},
|
|
1535
1536
|
i
|
|
1536
1537
|
);
|
|
1537
|
-
return s ? /* @__PURE__ */ o.jsx(
|
|
1538
|
+
return s ? /* @__PURE__ */ o.jsx(m, { ref: g, className: y, "data-testid": a, ...d, children: s }) : null;
|
|
1538
1539
|
}
|
|
1539
1540
|
);
|
|
1540
1541
|
return r.displayName = `Typography.${t === "title" ? "Title" : "Subtitle"}`, r;
|
|
@@ -1550,8 +1551,8 @@ const ar = U((t, r) => {
|
|
|
1550
1551
|
disabled: u = !1,
|
|
1551
1552
|
typographyStyle: f = "primary",
|
|
1552
1553
|
...d
|
|
1553
|
-
},
|
|
1554
|
-
const
|
|
1554
|
+
}, g) => {
|
|
1555
|
+
const m = l, y = S(
|
|
1555
1556
|
Pt.typography,
|
|
1556
1557
|
G[`typography-${t}-${n}-${c}`],
|
|
1557
1558
|
Pt[f],
|
|
@@ -1561,10 +1562,10 @@ const ar = U((t, r) => {
|
|
|
1561
1562
|
i
|
|
1562
1563
|
);
|
|
1563
1564
|
return s ? /* @__PURE__ */ o.jsx(
|
|
1564
|
-
|
|
1565
|
+
m,
|
|
1565
1566
|
{
|
|
1566
|
-
ref:
|
|
1567
|
-
className:
|
|
1567
|
+
ref: g,
|
|
1568
|
+
className: y,
|
|
1568
1569
|
"data-testid": a,
|
|
1569
1570
|
...d,
|
|
1570
1571
|
children: s
|
|
@@ -1603,13 +1604,13 @@ const ar = U((t, r) => {
|
|
|
1603
1604
|
title: u,
|
|
1604
1605
|
subTitle: f,
|
|
1605
1606
|
actions: d,
|
|
1606
|
-
children:
|
|
1607
|
-
footer:
|
|
1608
|
-
hideHeaderDivider:
|
|
1607
|
+
children: g,
|
|
1608
|
+
footer: m,
|
|
1609
|
+
hideHeaderDivider: y,
|
|
1609
1610
|
hideFooterDivider: x,
|
|
1610
|
-
className:
|
|
1611
|
-
classNames:
|
|
1612
|
-
styles:
|
|
1611
|
+
className: w,
|
|
1612
|
+
classNames: b,
|
|
1613
|
+
styles: h,
|
|
1613
1614
|
...p
|
|
1614
1615
|
} = t, C = da.includes(a), k = !!(u || f || d);
|
|
1615
1616
|
return /* @__PURE__ */ o.jsx(
|
|
@@ -1624,17 +1625,17 @@ const ar = U((t, r) => {
|
|
|
1624
1625
|
children: /* @__PURE__ */ o.jsxs(
|
|
1625
1626
|
"div",
|
|
1626
1627
|
{
|
|
1627
|
-
className:
|
|
1628
|
-
style: { width: i, ...
|
|
1628
|
+
className: S(bt.container, w, b == null ? void 0 : b.container),
|
|
1629
|
+
style: { width: i, ...h == null ? void 0 : h.container },
|
|
1629
1630
|
"data-testid": p["data-testid"] ? `${p["data-testid"]}-container` : void 0,
|
|
1630
1631
|
children: [
|
|
1631
|
-
k && /* @__PURE__ */ o.jsxs("div", { className:
|
|
1632
|
-
/* @__PURE__ */ o.jsx("div", { className:
|
|
1632
|
+
k && /* @__PURE__ */ o.jsxs("div", { className: S(bt.header, b == null ? void 0 : b.header), style: h == null ? void 0 : h.header, children: [
|
|
1633
|
+
/* @__PURE__ */ o.jsx("div", { className: S(bt.title, b == null ? void 0 : b.title), style: h == null ? void 0 : h.title, children: typeof u == "string" ? /* @__PURE__ */ o.jsx(ca, { size: 5, className: bt["title-text"], children: u }) : u }),
|
|
1633
1634
|
/* @__PURE__ */ o.jsxs("div", { className: bt.actions, children: [
|
|
1634
1635
|
d,
|
|
1635
1636
|
l && /* @__PURE__ */ o.jsx(ua, { closeButtonProps: c, onOpenChange: s })
|
|
1636
1637
|
] }),
|
|
1637
|
-
f && /* @__PURE__ */ o.jsx("div", { className:
|
|
1638
|
+
f && /* @__PURE__ */ o.jsx("div", { className: S(bt.subTitle, b == null ? void 0 : b.subTitle), style: h == null ? void 0 : h.subTitle, children: typeof f == "string" ? /* @__PURE__ */ o.jsx(
|
|
1638
1639
|
la,
|
|
1639
1640
|
{
|
|
1640
1641
|
size: 2,
|
|
@@ -1644,23 +1645,23 @@ const ar = U((t, r) => {
|
|
|
1644
1645
|
}
|
|
1645
1646
|
) : f })
|
|
1646
1647
|
] }),
|
|
1647
|
-
!
|
|
1648
|
+
!y && k && /* @__PURE__ */ o.jsx("hr", { className: bt.divider }),
|
|
1648
1649
|
/* @__PURE__ */ o.jsx(
|
|
1649
1650
|
"div",
|
|
1650
1651
|
{
|
|
1651
|
-
className:
|
|
1652
|
+
className: S(
|
|
1652
1653
|
C ? bt["content-for-side-drawer"] : bt.content,
|
|
1653
|
-
|
|
1654
|
+
b == null ? void 0 : b.content
|
|
1654
1655
|
),
|
|
1655
1656
|
style: {
|
|
1656
|
-
...
|
|
1657
|
+
...h == null ? void 0 : h.content
|
|
1657
1658
|
},
|
|
1658
1659
|
"data-testid": p["data-testid"] ? `${p["data-testid"]}-content` : void 0,
|
|
1659
|
-
children:
|
|
1660
|
+
children: g
|
|
1660
1661
|
}
|
|
1661
1662
|
),
|
|
1662
|
-
!x &&
|
|
1663
|
-
|
|
1663
|
+
!x && m && /* @__PURE__ */ o.jsx("hr", { className: bt.divider }),
|
|
1664
|
+
m && /* @__PURE__ */ o.jsx("div", { className: S(bt.footer, b == null ? void 0 : b.footer), style: h == null ? void 0 : h.footer, children: m })
|
|
1664
1665
|
]
|
|
1665
1666
|
}
|
|
1666
1667
|
)
|
|
@@ -1794,17 +1795,17 @@ const La = (t) => {
|
|
|
1794
1795
|
return /* @__PURE__ */ o.jsxs(
|
|
1795
1796
|
"div",
|
|
1796
1797
|
{
|
|
1797
|
-
className:
|
|
1798
|
+
className: S(Bt.container, a == null ? void 0 : a.container),
|
|
1798
1799
|
style: i == null ? void 0 : i.container,
|
|
1799
1800
|
"data-testid": c,
|
|
1800
1801
|
children: [
|
|
1801
|
-
r && /* @__PURE__ */ o.jsx("div", { style: i == null ? void 0 : i.iconSlot, className:
|
|
1802
|
-
(n || s) && /* @__PURE__ */ o.jsxs("div", { className:
|
|
1802
|
+
r && /* @__PURE__ */ o.jsx("div", { style: i == null ? void 0 : i.iconSlot, className: S(Bt.iconSlot, a == null ? void 0 : a.iconSlot), children: r }),
|
|
1803
|
+
(n || s) && /* @__PURE__ */ o.jsxs("div", { className: S(Bt.textBlock, a == null ? void 0 : a.textBlock), children: [
|
|
1803
1804
|
n && /* @__PURE__ */ o.jsx(
|
|
1804
1805
|
"p",
|
|
1805
1806
|
{
|
|
1806
1807
|
style: i == null ? void 0 : i.title,
|
|
1807
|
-
className:
|
|
1808
|
+
className: S(Bt.title, G[f.title], a == null ? void 0 : a.title),
|
|
1808
1809
|
children: n
|
|
1809
1810
|
}
|
|
1810
1811
|
),
|
|
@@ -1812,12 +1813,12 @@ const La = (t) => {
|
|
|
1812
1813
|
"p",
|
|
1813
1814
|
{
|
|
1814
1815
|
style: i == null ? void 0 : i.subTitle,
|
|
1815
|
-
className:
|
|
1816
|
+
className: S(Bt.subtitle, G[f.subtitle], a == null ? void 0 : a.subTitle),
|
|
1816
1817
|
children: s
|
|
1817
1818
|
}
|
|
1818
1819
|
)
|
|
1819
1820
|
] }),
|
|
1820
|
-
l && /* @__PURE__ */ o.jsx("div", { className:
|
|
1821
|
+
l && /* @__PURE__ */ o.jsx("div", { className: S(Bt.children, a == null ? void 0 : a.children), children: l })
|
|
1821
1822
|
]
|
|
1822
1823
|
}
|
|
1823
1824
|
);
|
|
@@ -1832,7 +1833,7 @@ const La = (t) => {
|
|
|
1832
1833
|
children: c,
|
|
1833
1834
|
variantAvatarProps: u,
|
|
1834
1835
|
"data-testid": f
|
|
1835
|
-
} = t, { icon: d, colorScheme:
|
|
1836
|
+
} = t, { icon: d, colorScheme: g } = (Gt == null ? void 0 : Gt[i]) || Gt.info, y = i === "avatar" ? {
|
|
1836
1837
|
size: 48,
|
|
1837
1838
|
colorScheme: "gray",
|
|
1838
1839
|
variant: "light",
|
|
@@ -1841,7 +1842,7 @@ const La = (t) => {
|
|
|
1841
1842
|
} : {
|
|
1842
1843
|
size: 48,
|
|
1843
1844
|
icon: d,
|
|
1844
|
-
colorScheme:
|
|
1845
|
+
colorScheme: g,
|
|
1845
1846
|
variant: "light",
|
|
1846
1847
|
style: { fontSize: 24, outline: "none" },
|
|
1847
1848
|
"data-testid": "alert-icon"
|
|
@@ -1860,7 +1861,7 @@ const La = (t) => {
|
|
|
1860
1861
|
title: a,
|
|
1861
1862
|
subTitle: l,
|
|
1862
1863
|
size: "m",
|
|
1863
|
-
iconSlot: /* @__PURE__ */ o.jsx(Bo, { ...
|
|
1864
|
+
iconSlot: /* @__PURE__ */ o.jsx(Bo, { ...y }),
|
|
1864
1865
|
children: c
|
|
1865
1866
|
}
|
|
1866
1867
|
)
|
|
@@ -1915,18 +1916,18 @@ const La = (t) => {
|
|
|
1915
1916
|
size: u = 20,
|
|
1916
1917
|
position: f = "top-right",
|
|
1917
1918
|
positionOffset: d = { x: 0, y: 0 },
|
|
1918
|
-
cutoutBackground:
|
|
1919
|
-
isDisabled:
|
|
1920
|
-
className:
|
|
1919
|
+
cutoutBackground: g,
|
|
1920
|
+
isDisabled: m,
|
|
1921
|
+
className: y,
|
|
1921
1922
|
"data-testid": x = "badge",
|
|
1922
|
-
...
|
|
1923
|
-
} = t, { onClick:
|
|
1924
|
-
|
|
1923
|
+
...w
|
|
1924
|
+
} = t, { onClick: b, onPointerDown: h } = w, { ref: p, bgColor: C } = xe(), k = g || C, $ = !m && (!!b || !!h), E = Et(St.badge__container, St[`position-${f}`]), z = Et(
|
|
1925
|
+
y,
|
|
1925
1926
|
St.badge__content,
|
|
1926
1927
|
St[`color-${c}`],
|
|
1927
1928
|
St[`variant-${i}`],
|
|
1928
1929
|
{
|
|
1929
|
-
[St.disabled]:
|
|
1930
|
+
[St.disabled]: m,
|
|
1930
1931
|
[St.icon]: !!n,
|
|
1931
1932
|
[St.interactive]: $
|
|
1932
1933
|
}
|
|
@@ -1937,7 +1938,7 @@ const La = (t) => {
|
|
|
1937
1938
|
...k && { "--badge-cutout-bg": k },
|
|
1938
1939
|
...i === "transparent" && { "--badge-cutout-bg": "transparent" }
|
|
1939
1940
|
}, F = (n == null ? void 0 : n({})) || a, q = (D) => {
|
|
1940
|
-
$ && (
|
|
1941
|
+
$ && (b == null || b(D));
|
|
1941
1942
|
};
|
|
1942
1943
|
return /* @__PURE__ */ o.jsxs("div", { className: St.wrapper, ref: p, "data-testid": x + "-wrapper", children: [
|
|
1943
1944
|
s,
|
|
@@ -1950,12 +1951,12 @@ const La = (t) => {
|
|
|
1950
1951
|
children: /* @__PURE__ */ o.jsx(
|
|
1951
1952
|
"span",
|
|
1952
1953
|
{
|
|
1953
|
-
...
|
|
1954
|
+
...w,
|
|
1954
1955
|
onClick: q,
|
|
1955
1956
|
className: z,
|
|
1956
1957
|
"data-testid": x + "-content",
|
|
1957
1958
|
ref: r,
|
|
1958
|
-
"aria-disabled":
|
|
1959
|
+
"aria-disabled": m,
|
|
1959
1960
|
children: F
|
|
1960
1961
|
}
|
|
1961
1962
|
)
|
|
@@ -1998,20 +1999,20 @@ const La = (t) => {
|
|
|
1998
1999
|
onError: u,
|
|
1999
2000
|
onLoad: f,
|
|
2000
2001
|
...d
|
|
2001
|
-
} = t, [
|
|
2002
|
+
} = t, [g, m] = gt("loading"), y = g === "error", x = (a || g === "loading") && !y, w = g === "loaded" && !a, b = Et(
|
|
2002
2003
|
ue.image,
|
|
2003
2004
|
{
|
|
2004
2005
|
[ue.loading]: x
|
|
2005
2006
|
},
|
|
2006
2007
|
l
|
|
2007
|
-
),
|
|
2008
|
+
), h = jt(
|
|
2008
2009
|
(k) => {
|
|
2009
|
-
|
|
2010
|
+
m("loaded"), f == null || f(k);
|
|
2010
2011
|
},
|
|
2011
2012
|
[f]
|
|
2012
2013
|
), p = jt(
|
|
2013
2014
|
(k) => {
|
|
2014
|
-
|
|
2015
|
+
m("error"), u == null || u(k);
|
|
2015
2016
|
},
|
|
2016
2017
|
[u]
|
|
2017
2018
|
), C = {
|
|
@@ -2022,7 +2023,7 @@ const La = (t) => {
|
|
|
2022
2023
|
{
|
|
2023
2024
|
alt: n,
|
|
2024
2025
|
src: i,
|
|
2025
|
-
onLoad:
|
|
2026
|
+
onLoad: h,
|
|
2026
2027
|
onError: p,
|
|
2027
2028
|
style: { display: "none" }
|
|
2028
2029
|
}
|
|
@@ -2037,20 +2038,20 @@ const La = (t) => {
|
|
|
2037
2038
|
"data-testid": c,
|
|
2038
2039
|
loading: s,
|
|
2039
2040
|
src: i,
|
|
2040
|
-
className:
|
|
2041
|
+
className: b
|
|
2041
2042
|
}
|
|
2042
2043
|
)
|
|
2043
2044
|
};
|
|
2044
2045
|
return ut(() => {
|
|
2045
2046
|
if (!i) {
|
|
2046
|
-
|
|
2047
|
+
m("error");
|
|
2047
2048
|
return;
|
|
2048
2049
|
}
|
|
2049
|
-
|
|
2050
|
+
m("loading");
|
|
2050
2051
|
}, [i]), /* @__PURE__ */ o.jsxs("div", { className: ue.container, "data-testid": `${c}-container`, ...d, children: [
|
|
2051
2052
|
x && C.loader,
|
|
2052
|
-
|
|
2053
|
-
|
|
2053
|
+
y && C.error,
|
|
2054
|
+
w && C.image
|
|
2054
2055
|
] });
|
|
2055
2056
|
}), Oa = {}, sr = tr({
|
|
2056
2057
|
locale: Oa
|
|
@@ -2102,7 +2103,7 @@ const La = (t) => {
|
|
|
2102
2103
|
"div",
|
|
2103
2104
|
{
|
|
2104
2105
|
"data-testid": "ConfigProvider-component",
|
|
2105
|
-
className:
|
|
2106
|
+
className: S(Da, Fa, Wa, Ha, Va, _s, G, s)
|
|
2106
2107
|
}
|
|
2107
2108
|
),
|
|
2108
2109
|
/* @__PURE__ */ o.jsx(sr.Provider, { value: { locale: t }, children: n })
|
|
@@ -2134,13 +2135,13 @@ const La = (t) => {
|
|
|
2134
2135
|
slotStart: u,
|
|
2135
2136
|
slotEnd: f,
|
|
2136
2137
|
slotStartWrapperProps: d = {},
|
|
2137
|
-
slotEndWrapperProps:
|
|
2138
|
-
"data-testid":
|
|
2139
|
-
} = t, { className:
|
|
2138
|
+
slotEndWrapperProps: g = {},
|
|
2139
|
+
"data-testid": m
|
|
2140
|
+
} = t, { className: y, ...x } = d, { className: w, ...b } = g;
|
|
2140
2141
|
return /* @__PURE__ */ o.jsxs(
|
|
2141
2142
|
"div",
|
|
2142
2143
|
{
|
|
2143
|
-
className:
|
|
2144
|
+
className: S(
|
|
2144
2145
|
It.tag,
|
|
2145
2146
|
It[a],
|
|
2146
2147
|
It[i],
|
|
@@ -2151,12 +2152,12 @@ const La = (t) => {
|
|
|
2151
2152
|
},
|
|
2152
2153
|
n
|
|
2153
2154
|
),
|
|
2154
|
-
"data-testid":
|
|
2155
|
+
"data-testid": m || "tag-component",
|
|
2155
2156
|
ref: r,
|
|
2156
2157
|
children: [
|
|
2157
|
-
u && /* @__PURE__ */ o.jsx("span", { className:
|
|
2158
|
-
c && /* @__PURE__ */ o.jsx("span", { className:
|
|
2159
|
-
f && /* @__PURE__ */ o.jsx("span", { className:
|
|
2158
|
+
u && /* @__PURE__ */ o.jsx("span", { className: S([It.iconWrapper, y]), ...x, children: u }),
|
|
2159
|
+
c && /* @__PURE__ */ o.jsx("span", { className: S([It.label]), children: s }),
|
|
2160
|
+
f && /* @__PURE__ */ o.jsx("span", { className: S([It.iconWrapper, w]), ...b, children: f })
|
|
2160
2161
|
]
|
|
2161
2162
|
}
|
|
2162
2163
|
);
|
|
@@ -2255,14 +2256,14 @@ const La = (t) => {
|
|
|
2255
2256
|
disabled: u = !1,
|
|
2256
2257
|
containerClassName: f,
|
|
2257
2258
|
className: d,
|
|
2258
|
-
containerStyle:
|
|
2259
|
-
style:
|
|
2260
|
-
children:
|
|
2259
|
+
containerStyle: g,
|
|
2260
|
+
style: m,
|
|
2261
|
+
children: y,
|
|
2261
2262
|
clickableLabel: x = !0,
|
|
2262
|
-
tabIndex:
|
|
2263
|
-
onChange:
|
|
2264
|
-
"data-testid":
|
|
2265
|
-
} = t, [p, C] = gt(!1), k = s ?? p, T = u || l, $ = !!c, E = k || a, z =
|
|
2263
|
+
tabIndex: w,
|
|
2264
|
+
onChange: b,
|
|
2265
|
+
"data-testid": h = "checkbox"
|
|
2266
|
+
} = t, [p, C] = gt(!1), k = s ?? p, T = u || l, $ = !!c, E = k || a, z = S(Lt.container, Lt[i], f), B = S(
|
|
2266
2267
|
Lt.checkbox,
|
|
2267
2268
|
Lt[i],
|
|
2268
2269
|
{
|
|
@@ -2270,12 +2271,12 @@ const La = (t) => {
|
|
|
2270
2271
|
},
|
|
2271
2272
|
d
|
|
2272
2273
|
), F = (M) => {
|
|
2273
|
-
T || (C(M.target.checked),
|
|
2274
|
+
T || (C(M.target.checked), b == null || b(M.target.checked, M));
|
|
2274
2275
|
}, q = (M) => {
|
|
2275
2276
|
if (M.key === "Enter" && !T) {
|
|
2276
2277
|
M.preventDefault();
|
|
2277
2278
|
const W = !E;
|
|
2278
|
-
C(W),
|
|
2279
|
+
C(W), b == null || b(W);
|
|
2279
2280
|
}
|
|
2280
2281
|
}, D = (M) => {
|
|
2281
2282
|
x || M.preventDefault();
|
|
@@ -2285,22 +2286,22 @@ const La = (t) => {
|
|
|
2285
2286
|
{
|
|
2286
2287
|
className: z,
|
|
2287
2288
|
htmlFor: n,
|
|
2288
|
-
style:
|
|
2289
|
-
"data-testid":
|
|
2289
|
+
style: g,
|
|
2290
|
+
"data-testid": h,
|
|
2290
2291
|
"data-clickable-label": x,
|
|
2291
2292
|
children: [
|
|
2292
2293
|
/* @__PURE__ */ o.jsx("div", { className: Lt.checkboxWrapper, children: /* @__PURE__ */ o.jsxs(
|
|
2293
2294
|
"div",
|
|
2294
2295
|
{
|
|
2295
|
-
tabIndex:
|
|
2296
|
+
tabIndex: w || 0,
|
|
2296
2297
|
className: B,
|
|
2297
|
-
style:
|
|
2298
|
+
style: m,
|
|
2298
2299
|
onKeyDown: q,
|
|
2299
2300
|
"aria-checked": E,
|
|
2300
2301
|
"aria-disabled": T,
|
|
2301
2302
|
"aria-invalid": $,
|
|
2302
2303
|
"aria-describedby": c ? `${n}-error` : void 0,
|
|
2303
|
-
"data-testid": `${
|
|
2304
|
+
"data-testid": `${h}-label`,
|
|
2304
2305
|
children: [
|
|
2305
2306
|
/* @__PURE__ */ o.jsx(
|
|
2306
2307
|
"input",
|
|
@@ -2317,7 +2318,7 @@ const La = (t) => {
|
|
|
2317
2318
|
"aria-checked": E,
|
|
2318
2319
|
"aria-invalid": $,
|
|
2319
2320
|
"aria-describedby": c ? `${n}-error` : void 0,
|
|
2320
|
-
"data-testid": `${
|
|
2321
|
+
"data-testid": `${h}-input`
|
|
2321
2322
|
}
|
|
2322
2323
|
),
|
|
2323
2324
|
/* @__PURE__ */ o.jsx(
|
|
@@ -2328,20 +2329,20 @@ const La = (t) => {
|
|
|
2328
2329
|
isChecked: E,
|
|
2329
2330
|
isDisabled: T,
|
|
2330
2331
|
indeterminate: a,
|
|
2331
|
-
dataTestId:
|
|
2332
|
+
dataTestId: h
|
|
2332
2333
|
}
|
|
2333
2334
|
)
|
|
2334
2335
|
]
|
|
2335
2336
|
}
|
|
2336
2337
|
) }),
|
|
2337
|
-
|
|
2338
|
+
y && /* @__PURE__ */ o.jsx(
|
|
2338
2339
|
"span",
|
|
2339
2340
|
{
|
|
2340
|
-
"data-testid": `${
|
|
2341
|
+
"data-testid": `${h}-label-text`,
|
|
2341
2342
|
"data-clickable-label": x,
|
|
2342
2343
|
className: Lt.label,
|
|
2343
2344
|
onClick: D,
|
|
2344
|
-
children:
|
|
2345
|
+
children: y
|
|
2345
2346
|
}
|
|
2346
2347
|
)
|
|
2347
2348
|
]
|
|
@@ -2494,8 +2495,8 @@ const La = (t) => {
|
|
|
2494
2495
|
a.preventDefault(), a.stopPropagation();
|
|
2495
2496
|
const l = a.currentTarget.closest(`.${I.wrapper}`);
|
|
2496
2497
|
if (!l) return;
|
|
2497
|
-
const c = a.clientY, u = l.clientHeight, f = (
|
|
2498
|
-
const
|
|
2498
|
+
const c = a.clientY, u = l.clientHeight, f = (g) => {
|
|
2499
|
+
const m = g.clientY - c, y = Math.min(100, u), x = Math.max(y, u + m);
|
|
2499
2500
|
l.style.height = `${x}px`;
|
|
2500
2501
|
}, d = () => {
|
|
2501
2502
|
document.removeEventListener("mousemove", f), document.removeEventListener("mouseup", d);
|
|
@@ -2516,13 +2517,13 @@ const La = (t) => {
|
|
|
2516
2517
|
onChange: u,
|
|
2517
2518
|
onKeyDown: f,
|
|
2518
2519
|
onKeyUp: d,
|
|
2519
|
-
maxLength:
|
|
2520
|
-
className:
|
|
2521
|
-
style:
|
|
2520
|
+
maxLength: g,
|
|
2521
|
+
className: m,
|
|
2522
|
+
style: y,
|
|
2522
2523
|
truncate: x = !1,
|
|
2523
|
-
shouldShowFloatingLabelClass:
|
|
2524
|
-
"aria-invalid":
|
|
2525
|
-
"aria-errormessage":
|
|
2524
|
+
shouldShowFloatingLabelClass: w = !1,
|
|
2525
|
+
"aria-invalid": b,
|
|
2526
|
+
"aria-errormessage": h,
|
|
2526
2527
|
id: p,
|
|
2527
2528
|
resize: C,
|
|
2528
2529
|
...k
|
|
@@ -2542,17 +2543,17 @@ const La = (t) => {
|
|
|
2542
2543
|
onChange: u,
|
|
2543
2544
|
onKeyDown: f,
|
|
2544
2545
|
onKeyUp: d,
|
|
2545
|
-
maxLength:
|
|
2546
|
-
className:
|
|
2546
|
+
maxLength: g,
|
|
2547
|
+
className: S(
|
|
2547
2548
|
I.textarea,
|
|
2548
2549
|
I[`size-${r}`],
|
|
2549
|
-
|
|
2550
|
-
|
|
2550
|
+
w && I["with-floating-label"],
|
|
2551
|
+
m
|
|
2551
2552
|
),
|
|
2552
|
-
style:
|
|
2553
|
-
"aria-invalid":
|
|
2554
|
-
"aria-errormessage":
|
|
2555
|
-
"aria-describedby":
|
|
2553
|
+
style: y,
|
|
2554
|
+
"aria-invalid": b,
|
|
2555
|
+
"aria-errormessage": h,
|
|
2556
|
+
"aria-describedby": h ? `${p}-error` : void 0,
|
|
2556
2557
|
tabIndex: 0,
|
|
2557
2558
|
"data-resize": C,
|
|
2558
2559
|
...k
|
|
@@ -2572,18 +2573,18 @@ const La = (t) => {
|
|
|
2572
2573
|
onChange: u,
|
|
2573
2574
|
onKeyDown: f,
|
|
2574
2575
|
onKeyUp: d,
|
|
2575
|
-
maxLength:
|
|
2576
|
-
className:
|
|
2576
|
+
maxLength: g,
|
|
2577
|
+
className: S(
|
|
2577
2578
|
I.input,
|
|
2578
2579
|
I[`size-${r}`],
|
|
2579
|
-
|
|
2580
|
+
w && I["with-floating-label"],
|
|
2580
2581
|
x && I.truncate,
|
|
2581
|
-
|
|
2582
|
+
m
|
|
2582
2583
|
),
|
|
2583
|
-
style:
|
|
2584
|
-
"aria-invalid":
|
|
2585
|
-
"aria-errormessage":
|
|
2586
|
-
"aria-describedby":
|
|
2584
|
+
style: y,
|
|
2585
|
+
"aria-invalid": b,
|
|
2586
|
+
"aria-errormessage": h,
|
|
2587
|
+
"aria-describedby": h ? `${p}-error` : void 0,
|
|
2587
2588
|
tabIndex: 0,
|
|
2588
2589
|
...k
|
|
2589
2590
|
}
|
|
@@ -2606,13 +2607,13 @@ const La = (t) => {
|
|
|
2606
2607
|
floatingLabelStyles: u,
|
|
2607
2608
|
prefixStyles: f,
|
|
2608
2609
|
suffixStyles: d,
|
|
2609
|
-
labelProps:
|
|
2610
|
-
helperProps:
|
|
2611
|
-
showLimit:
|
|
2610
|
+
labelProps: g,
|
|
2611
|
+
helperProps: m,
|
|
2612
|
+
showLimit: y = !1,
|
|
2612
2613
|
maxLength: x,
|
|
2613
|
-
hint:
|
|
2614
|
-
showHint:
|
|
2615
|
-
showHintOnEmpty:
|
|
2614
|
+
hint: w,
|
|
2615
|
+
showHint: b = !1,
|
|
2616
|
+
showHintOnEmpty: h = !1,
|
|
2616
2617
|
prefix: p,
|
|
2617
2618
|
suffix: C,
|
|
2618
2619
|
onSuffixClick: k,
|
|
@@ -2627,7 +2628,7 @@ const La = (t) => {
|
|
|
2627
2628
|
showGrip: L = !1,
|
|
2628
2629
|
...M
|
|
2629
2630
|
}, W) => {
|
|
2630
|
-
const H = me(), Z = F || H, K =
|
|
2631
|
+
const H = me(), Z = F || H, K = b && w && (z || h), ot = w && w.length > Xe ? w.substring(0, Xe) + "..." : w, rt = S(
|
|
2631
2632
|
I.wrapper,
|
|
2632
2633
|
I[`size-${r}`],
|
|
2633
2634
|
n && I.error,
|
|
@@ -2635,9 +2636,9 @@ const La = (t) => {
|
|
|
2635
2636
|
i && I.loading,
|
|
2636
2637
|
K && I["has-hint"],
|
|
2637
2638
|
C && I["has-suffix"],
|
|
2638
|
-
|
|
2639
|
+
y && I["has-limit"],
|
|
2639
2640
|
a
|
|
2640
|
-
), J =
|
|
2641
|
+
), J = S(
|
|
2641
2642
|
I.floatingLabel,
|
|
2642
2643
|
I[r],
|
|
2643
2644
|
z && I.filled,
|
|
@@ -2670,12 +2671,12 @@ const La = (t) => {
|
|
|
2670
2671
|
htmlFor: Z,
|
|
2671
2672
|
className: J,
|
|
2672
2673
|
style: u,
|
|
2673
|
-
...
|
|
2674
|
+
...g,
|
|
2674
2675
|
children: T
|
|
2675
2676
|
}
|
|
2676
2677
|
),
|
|
2677
2678
|
t,
|
|
2678
|
-
L && !
|
|
2679
|
+
L && !y && (D === "fixed" || !D) && /* @__PURE__ */ o.jsx(
|
|
2679
2680
|
"div",
|
|
2680
2681
|
{
|
|
2681
2682
|
className: I.gripHandle,
|
|
@@ -2689,12 +2690,12 @@ const La = (t) => {
|
|
|
2689
2690
|
K && /* @__PURE__ */ o.jsx(
|
|
2690
2691
|
"div",
|
|
2691
2692
|
{
|
|
2692
|
-
className:
|
|
2693
|
+
className: S(I.hint, z && I.truncate),
|
|
2693
2694
|
"data-disabled": s || i,
|
|
2694
2695
|
children: ot
|
|
2695
2696
|
}
|
|
2696
2697
|
),
|
|
2697
|
-
|
|
2698
|
+
y && x && /* @__PURE__ */ o.jsxs("div", { className: I.characterLimit, children: [
|
|
2698
2699
|
(q || "").length,
|
|
2699
2700
|
" из ",
|
|
2700
2701
|
x
|
|
@@ -2705,12 +2706,12 @@ const La = (t) => {
|
|
|
2705
2706
|
B && /* @__PURE__ */ o.jsx(
|
|
2706
2707
|
"div",
|
|
2707
2708
|
{
|
|
2708
|
-
className:
|
|
2709
|
+
className: S(
|
|
2709
2710
|
I.helper,
|
|
2710
2711
|
n && I.error,
|
|
2711
2712
|
(s || i) && I.disabled
|
|
2712
2713
|
),
|
|
2713
|
-
...
|
|
2714
|
+
...m,
|
|
2714
2715
|
id: n ? `${Z}-error` : void 0,
|
|
2715
2716
|
children: B
|
|
2716
2717
|
}
|
|
@@ -2734,13 +2735,13 @@ const Ye = Object.assign(Mi, {
|
|
|
2734
2735
|
labelClassName: u,
|
|
2735
2736
|
helper: f,
|
|
2736
2737
|
prefix: d,
|
|
2737
|
-
suffix:
|
|
2738
|
-
id:
|
|
2739
|
-
onFocus:
|
|
2738
|
+
suffix: g,
|
|
2739
|
+
id: m,
|
|
2740
|
+
onFocus: y,
|
|
2740
2741
|
onBlur: x,
|
|
2741
|
-
onKeyDown:
|
|
2742
|
-
onSuffixClick:
|
|
2743
|
-
onChange:
|
|
2742
|
+
onKeyDown: w,
|
|
2743
|
+
onSuffixClick: b,
|
|
2744
|
+
onChange: h,
|
|
2744
2745
|
value: p = "",
|
|
2745
2746
|
wrapperProps: C,
|
|
2746
2747
|
wrapperStyles: k,
|
|
@@ -2761,15 +2762,15 @@ const Ye = Object.assign(Mi, {
|
|
|
2761
2762
|
showGrip: ot = !1,
|
|
2762
2763
|
...rt
|
|
2763
2764
|
}, J) => {
|
|
2764
|
-
const at = me(), st =
|
|
2765
|
+
const at = me(), st = m || at, [wt, xt] = gt(p), it = p !== void 0 ? p : wt, Tt = (it || "").length > 0, pt = it || "", Nt = c && (r === "XL" || t === "textarea") && !d, ee = jt(
|
|
2765
2766
|
(Q) => {
|
|
2766
2767
|
var tt;
|
|
2767
|
-
i || a || (
|
|
2768
|
+
i || a || (y == null || y(), (tt = L == null ? void 0 : L.onFocus) == null || tt.call(
|
|
2768
2769
|
L,
|
|
2769
2770
|
Q
|
|
2770
2771
|
));
|
|
2771
2772
|
},
|
|
2772
|
-
[
|
|
2773
|
+
[y, L, i, a]
|
|
2773
2774
|
), Zt = jt(
|
|
2774
2775
|
(Q) => {
|
|
2775
2776
|
var tt;
|
|
@@ -2798,12 +2799,12 @@ const Ye = Object.assign(Mi, {
|
|
|
2798
2799
|
var vt;
|
|
2799
2800
|
if (i || a) return;
|
|
2800
2801
|
const tt = Q.target.value;
|
|
2801
|
-
xt(tt),
|
|
2802
|
+
xt(tt), h == null || h(tt, Q), (vt = L == null ? void 0 : L.onChange) == null || vt.call(
|
|
2802
2803
|
L,
|
|
2803
2804
|
Q
|
|
2804
2805
|
);
|
|
2805
2806
|
},
|
|
2806
|
-
[
|
|
2807
|
+
[h, L, i, a]
|
|
2807
2808
|
);
|
|
2808
2809
|
return ut(() => {
|
|
2809
2810
|
xt(p || "");
|
|
@@ -2815,7 +2816,7 @@ const Ye = Object.assign(Mi, {
|
|
|
2815
2816
|
error: s,
|
|
2816
2817
|
disabled: i || a,
|
|
2817
2818
|
loading: a,
|
|
2818
|
-
className:
|
|
2819
|
+
className: S(n, t === "textarea" && I["textarea-wrapper"]),
|
|
2819
2820
|
wrapperProps: C,
|
|
2820
2821
|
wrapperStyles: k,
|
|
2821
2822
|
floatingLabelStyles: T,
|
|
@@ -2829,8 +2830,8 @@ const Ye = Object.assign(Mi, {
|
|
|
2829
2830
|
showHint: W,
|
|
2830
2831
|
showHintOnEmpty: H,
|
|
2831
2832
|
prefix: d,
|
|
2832
|
-
suffix:
|
|
2833
|
-
onSuffixClick:
|
|
2833
|
+
suffix: g,
|
|
2834
|
+
onSuffixClick: b,
|
|
2834
2835
|
placeholder: l,
|
|
2835
2836
|
showLabel: c,
|
|
2836
2837
|
labelClassName: u,
|
|
@@ -2853,7 +2854,7 @@ const Ye = Object.assign(Mi, {
|
|
|
2853
2854
|
onFocus: ee,
|
|
2854
2855
|
onBlur: re,
|
|
2855
2856
|
onChange: ne,
|
|
2856
|
-
onKeyDown:
|
|
2857
|
+
onKeyDown: w,
|
|
2857
2858
|
onKeyUp: Zt,
|
|
2858
2859
|
maxLength: D,
|
|
2859
2860
|
truncate: Z,
|
|
@@ -3040,13 +3041,13 @@ const Ye = Object.assign(Mi, {
|
|
|
3040
3041
|
size: u = V.L,
|
|
3041
3042
|
inputProps: f,
|
|
3042
3043
|
error: d,
|
|
3043
|
-
disabled:
|
|
3044
|
-
loading:
|
|
3045
|
-
helper:
|
|
3044
|
+
disabled: g,
|
|
3045
|
+
loading: m,
|
|
3046
|
+
helper: y,
|
|
3046
3047
|
prefix: x,
|
|
3047
|
-
suffix:
|
|
3048
|
-
clearable:
|
|
3049
|
-
id:
|
|
3048
|
+
suffix: w,
|
|
3049
|
+
clearable: b = !1,
|
|
3050
|
+
id: h,
|
|
3050
3051
|
showLabel: p = !0,
|
|
3051
3052
|
onFocus: C,
|
|
3052
3053
|
onBlur: k,
|
|
@@ -3062,7 +3063,7 @@ const Ye = Object.assign(Mi, {
|
|
|
3062
3063
|
helperProps: M,
|
|
3063
3064
|
...W
|
|
3064
3065
|
}, H) => {
|
|
3065
|
-
const Z = (t || "").length > 0, K = u === V.XL, ot = !!x, rt = K && p && !x, J =
|
|
3066
|
+
const Z = (t || "").length > 0, K = u === V.XL, ot = !!x, rt = K && p && !x, J = b && Z && !(g || m), at = () => {
|
|
3066
3067
|
r == null || r(""), $ == null || $();
|
|
3067
3068
|
}, st = () => {
|
|
3068
3069
|
J && at(), T == null || T();
|
|
@@ -3074,7 +3075,7 @@ const Ye = Object.assign(Mi, {
|
|
|
3074
3075
|
style: { cursor: "pointer" },
|
|
3075
3076
|
"data-testid": "x-icon"
|
|
3076
3077
|
}
|
|
3077
|
-
) :
|
|
3078
|
+
) : w, xt = {
|
|
3078
3079
|
type: n,
|
|
3079
3080
|
minLength: a,
|
|
3080
3081
|
autoComplete: l,
|
|
@@ -3086,12 +3087,12 @@ const Ye = Object.assign(Mi, {
|
|
|
3086
3087
|
{
|
|
3087
3088
|
size: u,
|
|
3088
3089
|
error: d,
|
|
3089
|
-
disabled:
|
|
3090
|
-
loading:
|
|
3091
|
-
helper:
|
|
3090
|
+
disabled: g || m,
|
|
3091
|
+
loading: m,
|
|
3092
|
+
helper: y,
|
|
3092
3093
|
prefix: x,
|
|
3093
3094
|
suffix: wt,
|
|
3094
|
-
id:
|
|
3095
|
+
id: h,
|
|
3095
3096
|
showLabel: rt,
|
|
3096
3097
|
onFocus: C,
|
|
3097
3098
|
onBlur: k,
|
|
@@ -3253,13 +3254,13 @@ const Ye = Object.assign(Mi, {
|
|
|
3253
3254
|
error: u,
|
|
3254
3255
|
disabled: f,
|
|
3255
3256
|
loading: d,
|
|
3256
|
-
helper:
|
|
3257
|
-
suffix:
|
|
3258
|
-
clearable:
|
|
3257
|
+
helper: g,
|
|
3258
|
+
suffix: m,
|
|
3259
|
+
clearable: y = !1,
|
|
3259
3260
|
id: x,
|
|
3260
|
-
showLabel:
|
|
3261
|
-
onFocus:
|
|
3262
|
-
onBlur:
|
|
3261
|
+
showLabel: w = !0,
|
|
3262
|
+
onFocus: b,
|
|
3263
|
+
onBlur: h,
|
|
3263
3264
|
onClear: p,
|
|
3264
3265
|
onKeyDown: C,
|
|
3265
3266
|
className: k,
|
|
@@ -3273,7 +3274,7 @@ const Ye = Object.assign(Mi, {
|
|
|
3273
3274
|
resize: D,
|
|
3274
3275
|
...L
|
|
3275
3276
|
}, M) => {
|
|
3276
|
-
const W = (t || "").length > 0, H =
|
|
3277
|
+
const W = (t || "").length > 0, H = w && !!n && (l === ft.M || q !== 48), Z = y && W && !(f || d), K = () => {
|
|
3277
3278
|
r == null || r(""), p == null || p();
|
|
3278
3279
|
}, ot = () => {
|
|
3279
3280
|
Z && K();
|
|
@@ -3285,7 +3286,7 @@ const Ye = Object.assign(Mi, {
|
|
|
3285
3286
|
style: { cursor: "pointer" },
|
|
3286
3287
|
"data-testid": "x-icon"
|
|
3287
3288
|
}
|
|
3288
|
-
) :
|
|
3289
|
+
) : m, J = Ki(l, q, H && W, D), at = Yi(l, q), st = {
|
|
3289
3290
|
rows: T,
|
|
3290
3291
|
minLength: i,
|
|
3291
3292
|
autoFocus: a,
|
|
@@ -3302,12 +3303,12 @@ const Ye = Object.assign(Mi, {
|
|
|
3302
3303
|
disabled: f || d,
|
|
3303
3304
|
loading: d,
|
|
3304
3305
|
onSuffixClick: ot,
|
|
3305
|
-
helper:
|
|
3306
|
+
helper: g,
|
|
3306
3307
|
suffix: rt,
|
|
3307
3308
|
id: x,
|
|
3308
3309
|
showLabel: H,
|
|
3309
|
-
onFocus:
|
|
3310
|
-
onBlur:
|
|
3310
|
+
onFocus: b,
|
|
3311
|
+
onBlur: h,
|
|
3311
3312
|
onKeyDown: C,
|
|
3312
3313
|
onChange: r,
|
|
3313
3314
|
value: t || "",
|
|
@@ -3344,7 +3345,7 @@ const Ye = Object.assign(Mi, {
|
|
|
3344
3345
|
"aria-label": l,
|
|
3345
3346
|
"aria-describedby": c
|
|
3346
3347
|
}) => {
|
|
3347
|
-
const u = !!r, f =
|
|
3348
|
+
const u = !!r, f = S(
|
|
3348
3349
|
_e.helper,
|
|
3349
3350
|
u && _e["helper--error"],
|
|
3350
3351
|
i && _e["helper--disabled"],
|
|
@@ -3390,24 +3391,24 @@ const Ye = Object.assign(Mi, {
|
|
|
3390
3391
|
disabled: u = !1,
|
|
3391
3392
|
checked: f = !1,
|
|
3392
3393
|
containerClassName: d,
|
|
3393
|
-
className:
|
|
3394
|
-
children:
|
|
3395
|
-
clickable:
|
|
3394
|
+
className: g,
|
|
3395
|
+
children: m,
|
|
3396
|
+
clickable: y = "all",
|
|
3396
3397
|
mode: x = "default",
|
|
3397
|
-
tabIndex:
|
|
3398
|
-
style:
|
|
3399
|
-
containerStyle:
|
|
3398
|
+
tabIndex: w,
|
|
3399
|
+
style: b,
|
|
3400
|
+
containerStyle: h,
|
|
3400
3401
|
onChange: p,
|
|
3401
3402
|
"data-testid": C,
|
|
3402
3403
|
...k
|
|
3403
|
-
} = t, T = !!c, $ = u || l, E =
|
|
3404
|
+
} = t, T = !!c, $ = u || l, E = y === "all", z = x === "card", B = _t[`${a}Card`], F = s ?? n, q = (H) => {
|
|
3404
3405
|
$ || p == null || p(i, H);
|
|
3405
3406
|
}, D = (H) => {
|
|
3406
3407
|
H.key === "Enter" && !$ && (H.preventDefault(), p == null || p(i));
|
|
3407
3408
|
}, L = (H) => H.stopPropagation(), M = () => /* @__PURE__ */ o.jsxs(
|
|
3408
3409
|
"div",
|
|
3409
3410
|
{
|
|
3410
|
-
className:
|
|
3411
|
+
className: S(
|
|
3411
3412
|
_t.radio,
|
|
3412
3413
|
_t[a],
|
|
3413
3414
|
{
|
|
@@ -3415,10 +3416,10 @@ const Ye = Object.assign(Mi, {
|
|
|
3415
3416
|
[_t.disabled]: $,
|
|
3416
3417
|
[_t.error]: T && !$
|
|
3417
3418
|
},
|
|
3418
|
-
|
|
3419
|
+
g
|
|
3419
3420
|
),
|
|
3420
|
-
style:
|
|
3421
|
-
tabIndex:
|
|
3421
|
+
style: b,
|
|
3422
|
+
tabIndex: w || 1,
|
|
3422
3423
|
"data-testid": `${fl}${F}`,
|
|
3423
3424
|
children: [
|
|
3424
3425
|
/* @__PURE__ */ o.jsx(
|
|
@@ -3449,29 +3450,29 @@ const Ye = Object.assign(Mi, {
|
|
|
3449
3450
|
"aria-disabled": $,
|
|
3450
3451
|
"data-testid": E ? C : gl,
|
|
3451
3452
|
htmlFor: F,
|
|
3452
|
-
style:
|
|
3453
|
-
className:
|
|
3454
|
-
[
|
|
3453
|
+
style: h,
|
|
3454
|
+
className: S(_t.label, {
|
|
3455
|
+
[S(_t.container, _t[x], d)]: E,
|
|
3455
3456
|
[B]: E && z
|
|
3456
3457
|
}),
|
|
3457
3458
|
onKeyDown: D,
|
|
3458
3459
|
...k,
|
|
3459
3460
|
children: [
|
|
3460
3461
|
M(),
|
|
3461
|
-
E &&
|
|
3462
|
+
E && m
|
|
3462
3463
|
]
|
|
3463
3464
|
}
|
|
3464
3465
|
);
|
|
3465
3466
|
return E ? W() : /* @__PURE__ */ o.jsxs(
|
|
3466
3467
|
"div",
|
|
3467
3468
|
{
|
|
3468
|
-
className:
|
|
3469
|
+
className: S(_t.container, _t[x], d, {
|
|
3469
3470
|
[B]: z
|
|
3470
3471
|
}),
|
|
3471
3472
|
"data-testid": C,
|
|
3472
3473
|
children: [
|
|
3473
3474
|
W(),
|
|
3474
|
-
|
|
3475
|
+
m
|
|
3475
3476
|
]
|
|
3476
3477
|
}
|
|
3477
3478
|
);
|
|
@@ -3492,7 +3493,7 @@ const Ye = Object.assign(Mi, {
|
|
|
3492
3493
|
disabled: u = !1,
|
|
3493
3494
|
layout: f = "vertical",
|
|
3494
3495
|
"data-testid": d,
|
|
3495
|
-
...
|
|
3496
|
+
...g
|
|
3496
3497
|
} = t;
|
|
3497
3498
|
return /* @__PURE__ */ o.jsx(
|
|
3498
3499
|
"div",
|
|
@@ -3501,22 +3502,22 @@ const Ye = Object.assign(Mi, {
|
|
|
3501
3502
|
"data-testid": d ?? `radio-group-${s}`,
|
|
3502
3503
|
id: n,
|
|
3503
3504
|
ref: r,
|
|
3504
|
-
children: a.map(({ label:
|
|
3505
|
-
const
|
|
3505
|
+
children: a.map(({ label: m, value: y, disabled: x }) => {
|
|
3506
|
+
const w = `${s}-${String(y)}`, b = String(y) === String(i);
|
|
3506
3507
|
return /* @__PURE__ */ o.jsx(
|
|
3507
3508
|
dr,
|
|
3508
3509
|
{
|
|
3509
|
-
id:
|
|
3510
|
-
checked:
|
|
3511
|
-
"data-testid":
|
|
3510
|
+
id: w,
|
|
3511
|
+
checked: b,
|
|
3512
|
+
"data-testid": w,
|
|
3512
3513
|
disabled: u || x,
|
|
3513
3514
|
name: s,
|
|
3514
|
-
value:
|
|
3515
|
+
value: y,
|
|
3515
3516
|
className: c,
|
|
3516
|
-
...
|
|
3517
|
-
children:
|
|
3517
|
+
...g,
|
|
3518
|
+
children: m
|
|
3518
3519
|
},
|
|
3519
|
-
|
|
3520
|
+
w
|
|
3520
3521
|
);
|
|
3521
3522
|
})
|
|
3522
3523
|
}
|
|
@@ -3576,7 +3577,7 @@ const Ye = Object.assign(Mi, {
|
|
|
3576
3577
|
className: n,
|
|
3577
3578
|
size: s
|
|
3578
3579
|
}) => {
|
|
3579
|
-
const i = Vt(null), [a, l] = gt(!1), [c, u] = gt(!1), { ref: f, bgColor: d } = xe(),
|
|
3580
|
+
const i = Vt(null), [a, l] = gt(!1), [c, u] = gt(!1), { ref: f, bgColor: d } = xe(), g = f ?? { current: null }, m = d ?? Dl, y = r && a, x = r && c, w = ({ direction: p }) => /* @__PURE__ */ o.jsx(
|
|
3580
3581
|
"svg",
|
|
3581
3582
|
{
|
|
3582
3583
|
height: "12px",
|
|
@@ -3591,12 +3592,12 @@ const Ye = Object.assign(Mi, {
|
|
|
3591
3592
|
}
|
|
3592
3593
|
) })
|
|
3593
3594
|
}
|
|
3594
|
-
),
|
|
3595
|
+
), b = () => {
|
|
3595
3596
|
const p = i.current;
|
|
3596
3597
|
if (!p) return;
|
|
3597
3598
|
const C = Math.round(p.scrollLeft), k = Math.round(p.scrollLeft + p.clientWidth), T = Math.round(p.scrollWidth);
|
|
3598
3599
|
l(C > 0), u(k < T);
|
|
3599
|
-
},
|
|
3600
|
+
}, h = (p) => {
|
|
3600
3601
|
const C = i.current;
|
|
3601
3602
|
if (!C) return;
|
|
3602
3603
|
const k = C.clientWidth;
|
|
@@ -3610,41 +3611,41 @@ const Ye = Object.assign(Mi, {
|
|
|
3610
3611
|
};
|
|
3611
3612
|
return p.addEventListener("wheel", C, { passive: !1 }), () => p.removeEventListener("wheel", C);
|
|
3612
3613
|
}, []), ut(() => {
|
|
3613
|
-
|
|
3614
|
+
b();
|
|
3614
3615
|
const p = i.current;
|
|
3615
3616
|
if (p)
|
|
3616
|
-
return p.addEventListener("scroll",
|
|
3617
|
-
p.removeEventListener("scroll",
|
|
3617
|
+
return p.addEventListener("scroll", b, { passive: !0 }), window.addEventListener("resize", b), () => {
|
|
3618
|
+
p.removeEventListener("scroll", b), window.removeEventListener("resize", b);
|
|
3618
3619
|
};
|
|
3619
|
-
}, []), /* @__PURE__ */ o.jsxs("div", { ref:
|
|
3620
|
-
|
|
3620
|
+
}, []), /* @__PURE__ */ o.jsxs("div", { ref: g, className: S(ct.wrapper, n), children: [
|
|
3621
|
+
y && /* @__PURE__ */ o.jsx(
|
|
3621
3622
|
"div",
|
|
3622
3623
|
{
|
|
3623
|
-
className:
|
|
3624
|
+
className: S(ct.mask, ct.maskLeft, a && ct.visible),
|
|
3624
3625
|
style: {
|
|
3625
|
-
background: `linear-gradient(to right, ${
|
|
3626
|
+
background: `linear-gradient(to right, ${m} 17%, transparent 80%)`
|
|
3626
3627
|
}
|
|
3627
3628
|
}
|
|
3628
3629
|
),
|
|
3629
3630
|
x && /* @__PURE__ */ o.jsx(
|
|
3630
3631
|
"div",
|
|
3631
3632
|
{
|
|
3632
|
-
className:
|
|
3633
|
+
className: S(ct.mask, ct.maskRight, c && ct.visible),
|
|
3633
3634
|
style: {
|
|
3634
|
-
background: `linear-gradient(to left, ${
|
|
3635
|
+
background: `linear-gradient(to left, ${m} 17%, transparent 80%)`
|
|
3635
3636
|
}
|
|
3636
3637
|
}
|
|
3637
3638
|
),
|
|
3638
3639
|
/* @__PURE__ */ o.jsx("div", { ref: i, className: ct.viewport, children: t }),
|
|
3639
|
-
|
|
3640
|
+
y && /* @__PURE__ */ o.jsx(
|
|
3640
3641
|
"button",
|
|
3641
3642
|
{
|
|
3642
3643
|
type: "button",
|
|
3643
3644
|
tabIndex: -1,
|
|
3644
3645
|
"aria-hidden": "true",
|
|
3645
|
-
className:
|
|
3646
|
-
onClick: () =>
|
|
3647
|
-
children: /* @__PURE__ */ o.jsx(
|
|
3646
|
+
className: S(ct.control, ct.left, ct[s]),
|
|
3647
|
+
onClick: () => h("left"),
|
|
3648
|
+
children: /* @__PURE__ */ o.jsx(w, { direction: "left" })
|
|
3648
3649
|
}
|
|
3649
3650
|
),
|
|
3650
3651
|
x && /* @__PURE__ */ o.jsx(
|
|
@@ -3653,9 +3654,9 @@ const Ye = Object.assign(Mi, {
|
|
|
3653
3654
|
type: "button",
|
|
3654
3655
|
tabIndex: -1,
|
|
3655
3656
|
"aria-hidden": "true",
|
|
3656
|
-
className:
|
|
3657
|
-
onClick: () =>
|
|
3658
|
-
children: /* @__PURE__ */ o.jsx(
|
|
3657
|
+
className: S(ct.control, ct.right, ct[s]),
|
|
3658
|
+
onClick: () => h("right"),
|
|
3659
|
+
children: /* @__PURE__ */ o.jsx(w, { direction: "right" })
|
|
3659
3660
|
}
|
|
3660
3661
|
)
|
|
3661
3662
|
] });
|
|
@@ -3700,10 +3701,10 @@ const Ye = Object.assign(Mi, {
|
|
|
3700
3701
|
value: u,
|
|
3701
3702
|
label: f,
|
|
3702
3703
|
prefix: d,
|
|
3703
|
-
prefixWrapperProps:
|
|
3704
|
-
postfix:
|
|
3705
|
-
postfixWrapperProps:
|
|
3706
|
-
} = r, { className: x, ...
|
|
3704
|
+
prefixWrapperProps: g = {},
|
|
3705
|
+
postfix: m,
|
|
3706
|
+
postfixWrapperProps: y = {}
|
|
3707
|
+
} = r, { className: x, ...w } = g, { className: b, ...h } = y, p = {
|
|
3707
3708
|
primary: G["typography-label-3-medium"],
|
|
3708
3709
|
secondary: G["typography-label-3-regular"],
|
|
3709
3710
|
prefix: G["typography-label-3-medium"],
|
|
@@ -3712,10 +3713,10 @@ const Ye = Object.assign(Mi, {
|
|
|
3712
3713
|
size: r1,
|
|
3713
3714
|
position: n1,
|
|
3714
3715
|
...i
|
|
3715
|
-
}, k =
|
|
3716
|
+
}, k = S(et.tab, et[t], et[a], {
|
|
3716
3717
|
[et.selected]: n,
|
|
3717
3718
|
[et.disabled]: l
|
|
3718
|
-
}), T =
|
|
3719
|
+
}), T = S(
|
|
3719
3720
|
et.tabPrefix,
|
|
3720
3721
|
x,
|
|
3721
3722
|
et[t],
|
|
@@ -3724,16 +3725,16 @@ const Ye = Object.assign(Mi, {
|
|
|
3724
3725
|
[et.selected]: n,
|
|
3725
3726
|
[et.disabled]: l
|
|
3726
3727
|
}
|
|
3727
|
-
), $ =
|
|
3728
|
+
), $ = S(
|
|
3728
3729
|
et.tabPostfix,
|
|
3729
|
-
|
|
3730
|
+
b,
|
|
3730
3731
|
et[t],
|
|
3731
3732
|
p.postfix,
|
|
3732
3733
|
{
|
|
3733
3734
|
[et.selected]: n,
|
|
3734
3735
|
[et.disabled]: l
|
|
3735
3736
|
}
|
|
3736
|
-
), E =
|
|
3737
|
+
), E = S(et.tabLabel, et[t], p[t]), z = (F) => {
|
|
3737
3738
|
n || l || (c(u), F.currentTarget.scrollIntoView({ behavior: "smooth", inline: "center", block: "nearest" }));
|
|
3738
3739
|
}, B = /* @__PURE__ */ o.jsxs(
|
|
3739
3740
|
"button",
|
|
@@ -3751,19 +3752,19 @@ const Ye = Object.assign(Mi, {
|
|
|
3751
3752
|
"span",
|
|
3752
3753
|
{
|
|
3753
3754
|
className: T,
|
|
3754
|
-
...
|
|
3755
|
+
...w,
|
|
3755
3756
|
"data-testid": `tab-prefix-${u}`,
|
|
3756
3757
|
children: d
|
|
3757
3758
|
}
|
|
3758
3759
|
),
|
|
3759
3760
|
/* @__PURE__ */ o.jsx("span", { className: E, "data-testid": `tab-label-${u}`, children: f }),
|
|
3760
|
-
|
|
3761
|
+
m && /* @__PURE__ */ o.jsx(
|
|
3761
3762
|
"span",
|
|
3762
3763
|
{
|
|
3763
3764
|
className: $,
|
|
3764
|
-
...
|
|
3765
|
+
...h,
|
|
3765
3766
|
"data-testid": `tab-postfix-${u}`,
|
|
3766
|
-
children:
|
|
3767
|
+
children: m
|
|
3767
3768
|
}
|
|
3768
3769
|
)
|
|
3769
3770
|
]
|
|
@@ -3783,7 +3784,7 @@ const Ye = Object.assign(Mi, {
|
|
|
3783
3784
|
role: "tablist",
|
|
3784
3785
|
"data-testid": "tabs-bar",
|
|
3785
3786
|
"aria-orientation": "horizontal",
|
|
3786
|
-
className:
|
|
3787
|
+
className: S(et.tabBar, et[t]),
|
|
3787
3788
|
children: r.map((c) => /* @__PURE__ */ o.jsx(
|
|
3788
3789
|
a1,
|
|
3789
3790
|
{
|
|
@@ -4019,14 +4020,14 @@ const Ye = Object.assign(Mi, {
|
|
|
4019
4020
|
buttonProps: u,
|
|
4020
4021
|
showClose: f
|
|
4021
4022
|
}) => {
|
|
4022
|
-
const d = ["neutral", "accent"].includes(s) ? "contrast" : "primary",
|
|
4023
|
+
const d = ["neutral", "accent"].includes(s) ? "contrast" : "primary", g = i === "m", m = !!(r && g), y = !!(n && g), x = c && !!c.length, w = !!(f && g) || !f && g && !x, b = i === "xs" ? 4 : 3;
|
|
4023
4024
|
return /* @__PURE__ */ o.jsxs("div", { className: dt.content, children: [
|
|
4024
|
-
|
|
4025
|
+
y && /* @__PURE__ */ o.jsx("div", { className: S(dt.mediaWrapper, a.mediaWrapper), children: n }),
|
|
4025
4026
|
/* @__PURE__ */ o.jsxs("div", { className: a.textWrapper, children: [
|
|
4026
|
-
|
|
4027
|
+
m && /* @__PURE__ */ o.jsx(
|
|
4027
4028
|
he.Subtitle,
|
|
4028
4029
|
{
|
|
4029
|
-
className:
|
|
4030
|
+
className: S(dt.typography, dt.title, a.typography),
|
|
4030
4031
|
size: 1,
|
|
4031
4032
|
as: "h3",
|
|
4032
4033
|
typographyStyle: d,
|
|
@@ -4036,19 +4037,19 @@ const Ye = Object.assign(Mi, {
|
|
|
4036
4037
|
/* @__PURE__ */ o.jsx(
|
|
4037
4038
|
he.Label,
|
|
4038
4039
|
{
|
|
4039
|
-
className:
|
|
4040
|
+
className: S(dt.typography, dt.text, a.typography),
|
|
4040
4041
|
typographyStyle: d,
|
|
4041
|
-
size:
|
|
4042
|
+
size: b,
|
|
4042
4043
|
children: t
|
|
4043
4044
|
}
|
|
4044
4045
|
)
|
|
4045
4046
|
] }),
|
|
4046
|
-
|
|
4047
|
+
w && /* @__PURE__ */ o.jsx(
|
|
4047
4048
|
"button",
|
|
4048
4049
|
{
|
|
4049
4050
|
type: "button",
|
|
4050
|
-
className:
|
|
4051
|
-
[dt.hasMedia]:
|
|
4051
|
+
className: S(dt.closeButton, dt[s], a.closeButton, {
|
|
4052
|
+
[dt.hasMedia]: y
|
|
4052
4053
|
}),
|
|
4053
4054
|
onClick: l,
|
|
4054
4055
|
"aria-label": "Закрыть подсказку",
|
|
@@ -4056,8 +4057,8 @@ const Ye = Object.assign(Mi, {
|
|
|
4056
4057
|
children: /* @__PURE__ */ o.jsx(k1, {})
|
|
4057
4058
|
}
|
|
4058
4059
|
),
|
|
4059
|
-
|
|
4060
|
-
const C = R1(p, c.length, s), k = E1(
|
|
4060
|
+
g && x && /* @__PURE__ */ o.jsx("div", { className: dt.buttonStack, children: c.map((h, p) => {
|
|
4061
|
+
const C = R1(p, c.length, s), k = E1(h, C, u), { closeOnClick: T, ...$ } = k, E = (z) => {
|
|
4061
4062
|
var B;
|
|
4062
4063
|
(B = $.onClick) == null || B.call($, z), T && (l == null || l());
|
|
4063
4064
|
};
|
|
@@ -4076,35 +4077,35 @@ const Ye = Object.assign(Mi, {
|
|
|
4076
4077
|
trigger: u = "hover",
|
|
4077
4078
|
variant: f = "neutral",
|
|
4078
4079
|
size: d = "s",
|
|
4079
|
-
text:
|
|
4080
|
-
title:
|
|
4081
|
-
media:
|
|
4080
|
+
text: g,
|
|
4081
|
+
title: m,
|
|
4082
|
+
media: y,
|
|
4082
4083
|
buttons: x,
|
|
4083
|
-
buttonProps:
|
|
4084
|
-
onClose:
|
|
4085
|
-
...
|
|
4084
|
+
buttonProps: w,
|
|
4085
|
+
onClose: b,
|
|
4086
|
+
...h
|
|
4086
4087
|
}) => {
|
|
4087
4088
|
const [p, C] = gt(!1), [k, T] = gt(!1), $ = d === "m" ? j1 : $1, E = () => {
|
|
4088
|
-
C(!1),
|
|
4089
|
+
C(!1), b == null || b();
|
|
4089
4090
|
}, z = t || (d === "m" ? /* @__PURE__ */ o.jsx(
|
|
4090
4091
|
Ue,
|
|
4091
4092
|
{
|
|
4092
4093
|
classNames: s,
|
|
4093
|
-
text:
|
|
4094
|
+
text: g,
|
|
4094
4095
|
variant: f,
|
|
4095
4096
|
size: d,
|
|
4096
4097
|
onClose: E,
|
|
4097
|
-
title:
|
|
4098
|
-
media:
|
|
4098
|
+
title: m,
|
|
4099
|
+
media: y,
|
|
4099
4100
|
showClose: c,
|
|
4100
4101
|
buttons: x,
|
|
4101
|
-
buttonProps:
|
|
4102
|
+
buttonProps: w
|
|
4102
4103
|
}
|
|
4103
4104
|
) : /* @__PURE__ */ o.jsx(
|
|
4104
4105
|
Ue,
|
|
4105
4106
|
{
|
|
4106
4107
|
classNames: s,
|
|
4107
|
-
text:
|
|
4108
|
+
text: g,
|
|
4108
4109
|
variant: f,
|
|
4109
4110
|
size: d,
|
|
4110
4111
|
onClose: E
|
|
@@ -4122,8 +4123,8 @@ const Ye = Object.assign(Mi, {
|
|
|
4122
4123
|
visible: p,
|
|
4123
4124
|
onVisibleChange: C,
|
|
4124
4125
|
classNames: {
|
|
4125
|
-
root:
|
|
4126
|
-
...
|
|
4126
|
+
root: S(dt.root, dt[f], dt[d], k && dt.open),
|
|
4127
|
+
...h.classNames
|
|
4127
4128
|
},
|
|
4128
4129
|
placement: n,
|
|
4129
4130
|
overlay: () => z,
|
|
@@ -4137,7 +4138,7 @@ const Ye = Object.assign(Mi, {
|
|
|
4137
4138
|
className: `tooltipArrow tooltipArrow-${d}`
|
|
4138
4139
|
} : !1,
|
|
4139
4140
|
destroyTooltipOnHide: !0,
|
|
4140
|
-
...
|
|
4141
|
+
...h,
|
|
4141
4142
|
children: r
|
|
4142
4143
|
}
|
|
4143
4144
|
);
|
|
@@ -4166,28 +4167,28 @@ const Ye = Object.assign(Mi, {
|
|
|
4166
4167
|
stretched: l,
|
|
4167
4168
|
mode: c = "label",
|
|
4168
4169
|
onChange: u
|
|
4169
|
-
} = t, f = me(), [d,
|
|
4170
|
+
} = t, f = me(), [d, g] = gt(n || a[0].value), [m, y] = gt({ width: 0, left: 0 }), x = Vt(null);
|
|
4170
4171
|
ut(() => {
|
|
4171
|
-
s &&
|
|
4172
|
+
s && g(s);
|
|
4172
4173
|
}, [s]), ut(() => {
|
|
4173
|
-
|
|
4174
|
+
w();
|
|
4174
4175
|
}, [d, a, i, l, c]);
|
|
4175
|
-
const
|
|
4176
|
+
const w = () => {
|
|
4176
4177
|
if (!(x != null && x.current)) return;
|
|
4177
4178
|
const C = x.current.querySelector(
|
|
4178
4179
|
'[data-is-active-segment="true"]'
|
|
4179
4180
|
);
|
|
4180
|
-
C &&
|
|
4181
|
+
C && y({
|
|
4181
4182
|
width: C.offsetWidth,
|
|
4182
4183
|
left: C.offsetLeft
|
|
4183
4184
|
});
|
|
4184
|
-
},
|
|
4185
|
-
|
|
4185
|
+
}, b = (p = a.find((C) => C.value === d)) == null ? void 0 : p.label, h = (C) => {
|
|
4186
|
+
g(C), u == null || u(C);
|
|
4186
4187
|
};
|
|
4187
4188
|
return (a == null ? void 0 : a.length) === 0 ? null : /* @__PURE__ */ o.jsxs(
|
|
4188
4189
|
"div",
|
|
4189
4190
|
{
|
|
4190
|
-
className:
|
|
4191
|
+
className: S(
|
|
4191
4192
|
Ot.segmentedControl,
|
|
4192
4193
|
Ot[i],
|
|
4193
4194
|
Ot[c],
|
|
@@ -4200,7 +4201,7 @@ const Ye = Object.assign(Mi, {
|
|
|
4200
4201
|
ref: x,
|
|
4201
4202
|
children: [
|
|
4202
4203
|
a == null ? void 0 : a.map(({ label: C, value: k }, T) => {
|
|
4203
|
-
const $ = () =>
|
|
4204
|
+
const $ = () => h(k);
|
|
4204
4205
|
return /* @__PURE__ */ o.jsxs(Ht, { children: [
|
|
4205
4206
|
/* @__PURE__ */ o.jsx(
|
|
4206
4207
|
"input",
|
|
@@ -4216,7 +4217,7 @@ const Ye = Object.assign(Mi, {
|
|
|
4216
4217
|
"label",
|
|
4217
4218
|
{
|
|
4218
4219
|
"data-is-active-segment": d === k,
|
|
4219
|
-
className:
|
|
4220
|
+
className: S(Ot.segment, Ke[i]),
|
|
4220
4221
|
htmlFor: f + JSON.stringify(k),
|
|
4221
4222
|
"data-testid": "segmented-control-segment",
|
|
4222
4223
|
children: C
|
|
@@ -4227,13 +4228,13 @@ const Ye = Object.assign(Mi, {
|
|
|
4227
4228
|
/* @__PURE__ */ o.jsx(
|
|
4228
4229
|
"div",
|
|
4229
4230
|
{
|
|
4230
|
-
className:
|
|
4231
|
+
className: S(Ot.activeSegmentIndicator, Ke[i]),
|
|
4231
4232
|
"data-testid": "segmented-control-active-segment",
|
|
4232
4233
|
style: {
|
|
4233
|
-
width:
|
|
4234
|
-
left:
|
|
4234
|
+
width: m.width,
|
|
4235
|
+
left: m.left
|
|
4235
4236
|
},
|
|
4236
|
-
children:
|
|
4237
|
+
children: b
|
|
4237
4238
|
}
|
|
4238
4239
|
)
|
|
4239
4240
|
]
|