@datavac/ui-kit 1.7.1 → 1.8.0-data-table.1
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/DataTable/DataTable.d.ts +2 -0
- package/dist/components/DataTable/DataTableRow.d.ts +18 -0
- package/dist/components/DataTable/index.d.ts +2 -0
- package/dist/components/DataTable/types.d.ts +77 -0
- package/dist/components/SortControl/SortControl.d.ts +10 -0
- package/dist/components/SortControl/index.d.ts +2 -0
- package/dist/icons/index.d.ts +1 -0
- package/dist/index.css +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.js +932 -696
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -131,19 +131,19 @@ var y = (e, t) => {
|
|
|
131
131
|
e in n ? n[e] = t : i(e, t);
|
|
132
132
|
}
|
|
133
133
|
};
|
|
134
|
-
},
|
|
134
|
+
}, L = "!", te = ":", ne = [], R = (e, t, n, r, i) => ({
|
|
135
135
|
modifiers: e,
|
|
136
136
|
hasImportantModifier: t,
|
|
137
137
|
baseClassName: n,
|
|
138
138
|
maybePostfixModifierPosition: r,
|
|
139
139
|
isExternal: i
|
|
140
|
-
}),
|
|
140
|
+
}), z = (e) => {
|
|
141
141
|
let { prefix: t, experimentalParseClassName: n } = e, r = (e) => {
|
|
142
142
|
let t = [], n = 0, r = 0, i = 0, a, o = e.length;
|
|
143
143
|
for (let s = 0; s < o; s++) {
|
|
144
144
|
let o = e[s];
|
|
145
145
|
if (n === 0 && r === 0) {
|
|
146
|
-
if (o ===
|
|
146
|
+
if (o === te) {
|
|
147
147
|
t.push(e.slice(i, s)), i = s + 1;
|
|
148
148
|
continue;
|
|
149
149
|
}
|
|
@@ -155,13 +155,13 @@ var y = (e, t) => {
|
|
|
155
155
|
o === "[" ? n++ : o === "]" ? n-- : o === "(" ? r++ : o === ")" && r--;
|
|
156
156
|
}
|
|
157
157
|
let s = t.length === 0 ? e : e.slice(i), c = s, l = !1;
|
|
158
|
-
s.endsWith(
|
|
158
|
+
s.endsWith(L) ? (c = s.slice(0, -1), l = !0) : s.startsWith(L) && (c = s.slice(1), l = !0);
|
|
159
159
|
let u = a && a > i ? a - i : void 0;
|
|
160
|
-
return
|
|
160
|
+
return R(t, l, c, u);
|
|
161
161
|
};
|
|
162
162
|
if (t) {
|
|
163
|
-
let e = t +
|
|
164
|
-
r = (t) => t.startsWith(e) ? n(t.slice(e.length)) :
|
|
163
|
+
let e = t + te, n = r;
|
|
164
|
+
r = (t) => t.startsWith(e) ? n(t.slice(e.length)) : R(ne, !1, t, void 0, !0);
|
|
165
165
|
}
|
|
166
166
|
if (n) {
|
|
167
167
|
let e = r;
|
|
@@ -171,7 +171,7 @@ var y = (e, t) => {
|
|
|
171
171
|
});
|
|
172
172
|
}
|
|
173
173
|
return r;
|
|
174
|
-
},
|
|
174
|
+
}, re = (e) => {
|
|
175
175
|
let t = /* @__PURE__ */ new Map();
|
|
176
176
|
return e.orderSensitiveModifiers.forEach((e, n) => {
|
|
177
177
|
t.set(e, 1e6 + n);
|
|
@@ -185,8 +185,8 @@ var y = (e, t) => {
|
|
|
185
185
|
};
|
|
186
186
|
}, ie = (e) => ({
|
|
187
187
|
cache: ee(e.cacheSize),
|
|
188
|
-
parseClassName:
|
|
189
|
-
sortModifiers:
|
|
188
|
+
parseClassName: z(e),
|
|
189
|
+
sortModifiers: re(e),
|
|
190
190
|
...T(e)
|
|
191
191
|
}), B = /\s+/, ae = (e, t) => {
|
|
192
192
|
let { parseClassName: n, getClassGroupId: r, getConflictingClassGroupIds: i, sortModifiers: a } = t, o = [], s = e.trim().split(B), c = "";
|
|
@@ -208,7 +208,7 @@ var y = (e, t) => {
|
|
|
208
208
|
}
|
|
209
209
|
m = !1;
|
|
210
210
|
}
|
|
211
|
-
let g = u.length === 0 ? "" : u.length === 1 ? u[0] : a(u).join(":"), _ = d ? g +
|
|
211
|
+
let g = u.length === 0 ? "" : u.length === 1 ? u[0] : a(u).join(":"), _ = d ? g + L : g, v = _ + h;
|
|
212
212
|
if (o.indexOf(v) > -1) continue;
|
|
213
213
|
o.push(v);
|
|
214
214
|
let y = i(h, m);
|
|
@@ -385,36 +385,36 @@ var y = (e, t) => {
|
|
|
385
385
|
Le,
|
|
386
386
|
Me,
|
|
387
387
|
{ position: [G, W] }
|
|
388
|
-
],
|
|
388
|
+
], L = () => ["no-repeat", { repeat: [
|
|
389
389
|
"",
|
|
390
390
|
"x",
|
|
391
391
|
"y",
|
|
392
392
|
"space",
|
|
393
393
|
"round"
|
|
394
|
-
] }],
|
|
394
|
+
] }], te = () => [
|
|
395
395
|
"auto",
|
|
396
396
|
"cover",
|
|
397
397
|
"contain",
|
|
398
398
|
Re,
|
|
399
399
|
De,
|
|
400
400
|
{ size: [G, W] }
|
|
401
|
-
],
|
|
401
|
+
], ne = () => [
|
|
402
402
|
ye,
|
|
403
403
|
Fe,
|
|
404
404
|
Oe
|
|
405
|
-
],
|
|
405
|
+
], R = () => [
|
|
406
406
|
"",
|
|
407
407
|
"none",
|
|
408
408
|
"full",
|
|
409
409
|
l,
|
|
410
410
|
G,
|
|
411
411
|
W
|
|
412
|
-
],
|
|
412
|
+
], z = () => [
|
|
413
413
|
"",
|
|
414
414
|
U,
|
|
415
415
|
Fe,
|
|
416
416
|
Oe
|
|
417
|
-
],
|
|
417
|
+
], re = () => [
|
|
418
418
|
"solid",
|
|
419
419
|
"dashed",
|
|
420
420
|
"dotted",
|
|
@@ -870,7 +870,7 @@ var y = (e, t) => {
|
|
|
870
870
|
"line-through",
|
|
871
871
|
"no-underline"
|
|
872
872
|
],
|
|
873
|
-
"text-decoration-style": [{ decoration: [...
|
|
873
|
+
"text-decoration-style": [{ decoration: [...re(), "wavy"] }],
|
|
874
874
|
"text-decoration-thickness": [{ decoration: [
|
|
875
875
|
U,
|
|
876
876
|
"from-font",
|
|
@@ -961,8 +961,8 @@ var y = (e, t) => {
|
|
|
961
961
|
"content"
|
|
962
962
|
] }],
|
|
963
963
|
"bg-position": [{ bg: ee() }],
|
|
964
|
-
"bg-repeat": [{ bg:
|
|
965
|
-
"bg-size": [{ bg:
|
|
964
|
+
"bg-repeat": [{ bg: L() }],
|
|
965
|
+
"bg-size": [{ bg: te() }],
|
|
966
966
|
"bg-image": [{ bg: [
|
|
967
967
|
"none",
|
|
968
968
|
{
|
|
@@ -996,49 +996,49 @@ var y = (e, t) => {
|
|
|
996
996
|
Ne
|
|
997
997
|
] }],
|
|
998
998
|
"bg-color": [{ bg: I() }],
|
|
999
|
-
"gradient-from-pos": [{ from:
|
|
1000
|
-
"gradient-via-pos": [{ via:
|
|
1001
|
-
"gradient-to-pos": [{ to:
|
|
999
|
+
"gradient-from-pos": [{ from: ne() }],
|
|
1000
|
+
"gradient-via-pos": [{ via: ne() }],
|
|
1001
|
+
"gradient-to-pos": [{ to: ne() }],
|
|
1002
1002
|
"gradient-from": [{ from: I() }],
|
|
1003
1003
|
"gradient-via": [{ via: I() }],
|
|
1004
1004
|
"gradient-to": [{ to: I() }],
|
|
1005
|
-
rounded: [{ rounded:
|
|
1006
|
-
"rounded-s": [{ "rounded-s":
|
|
1007
|
-
"rounded-e": [{ "rounded-e":
|
|
1008
|
-
"rounded-t": [{ "rounded-t":
|
|
1009
|
-
"rounded-r": [{ "rounded-r":
|
|
1010
|
-
"rounded-b": [{ "rounded-b":
|
|
1011
|
-
"rounded-l": [{ "rounded-l":
|
|
1012
|
-
"rounded-ss": [{ "rounded-ss":
|
|
1013
|
-
"rounded-se": [{ "rounded-se":
|
|
1014
|
-
"rounded-ee": [{ "rounded-ee":
|
|
1015
|
-
"rounded-es": [{ "rounded-es":
|
|
1016
|
-
"rounded-tl": [{ "rounded-tl":
|
|
1017
|
-
"rounded-tr": [{ "rounded-tr":
|
|
1018
|
-
"rounded-br": [{ "rounded-br":
|
|
1019
|
-
"rounded-bl": [{ "rounded-bl":
|
|
1020
|
-
"border-w": [{ border:
|
|
1021
|
-
"border-w-x": [{ "border-x":
|
|
1022
|
-
"border-w-y": [{ "border-y":
|
|
1023
|
-
"border-w-s": [{ "border-s":
|
|
1024
|
-
"border-w-e": [{ "border-e":
|
|
1025
|
-
"border-w-bs": [{ "border-bs":
|
|
1026
|
-
"border-w-be": [{ "border-be":
|
|
1027
|
-
"border-w-t": [{ "border-t":
|
|
1028
|
-
"border-w-r": [{ "border-r":
|
|
1029
|
-
"border-w-b": [{ "border-b":
|
|
1030
|
-
"border-w-l": [{ "border-l":
|
|
1031
|
-
"divide-x": [{ "divide-x":
|
|
1005
|
+
rounded: [{ rounded: R() }],
|
|
1006
|
+
"rounded-s": [{ "rounded-s": R() }],
|
|
1007
|
+
"rounded-e": [{ "rounded-e": R() }],
|
|
1008
|
+
"rounded-t": [{ "rounded-t": R() }],
|
|
1009
|
+
"rounded-r": [{ "rounded-r": R() }],
|
|
1010
|
+
"rounded-b": [{ "rounded-b": R() }],
|
|
1011
|
+
"rounded-l": [{ "rounded-l": R() }],
|
|
1012
|
+
"rounded-ss": [{ "rounded-ss": R() }],
|
|
1013
|
+
"rounded-se": [{ "rounded-se": R() }],
|
|
1014
|
+
"rounded-ee": [{ "rounded-ee": R() }],
|
|
1015
|
+
"rounded-es": [{ "rounded-es": R() }],
|
|
1016
|
+
"rounded-tl": [{ "rounded-tl": R() }],
|
|
1017
|
+
"rounded-tr": [{ "rounded-tr": R() }],
|
|
1018
|
+
"rounded-br": [{ "rounded-br": R() }],
|
|
1019
|
+
"rounded-bl": [{ "rounded-bl": R() }],
|
|
1020
|
+
"border-w": [{ border: z() }],
|
|
1021
|
+
"border-w-x": [{ "border-x": z() }],
|
|
1022
|
+
"border-w-y": [{ "border-y": z() }],
|
|
1023
|
+
"border-w-s": [{ "border-s": z() }],
|
|
1024
|
+
"border-w-e": [{ "border-e": z() }],
|
|
1025
|
+
"border-w-bs": [{ "border-bs": z() }],
|
|
1026
|
+
"border-w-be": [{ "border-be": z() }],
|
|
1027
|
+
"border-w-t": [{ "border-t": z() }],
|
|
1028
|
+
"border-w-r": [{ "border-r": z() }],
|
|
1029
|
+
"border-w-b": [{ "border-b": z() }],
|
|
1030
|
+
"border-w-l": [{ "border-l": z() }],
|
|
1031
|
+
"divide-x": [{ "divide-x": z() }],
|
|
1032
1032
|
"divide-x-reverse": ["divide-x-reverse"],
|
|
1033
|
-
"divide-y": [{ "divide-y":
|
|
1033
|
+
"divide-y": [{ "divide-y": z() }],
|
|
1034
1034
|
"divide-y-reverse": ["divide-y-reverse"],
|
|
1035
1035
|
"border-style": [{ border: [
|
|
1036
|
-
...
|
|
1036
|
+
...re(),
|
|
1037
1037
|
"hidden",
|
|
1038
1038
|
"none"
|
|
1039
1039
|
] }],
|
|
1040
1040
|
"divide-style": [{ divide: [
|
|
1041
|
-
...
|
|
1041
|
+
...re(),
|
|
1042
1042
|
"hidden",
|
|
1043
1043
|
"none"
|
|
1044
1044
|
] }],
|
|
@@ -1055,7 +1055,7 @@ var y = (e, t) => {
|
|
|
1055
1055
|
"border-color-l": [{ "border-l": I() }],
|
|
1056
1056
|
"divide-color": [{ divide: I() }],
|
|
1057
1057
|
"outline-style": [{ outline: [
|
|
1058
|
-
...
|
|
1058
|
+
...re(),
|
|
1059
1059
|
"none",
|
|
1060
1060
|
"hidden"
|
|
1061
1061
|
] }],
|
|
@@ -1086,12 +1086,12 @@ var y = (e, t) => {
|
|
|
1086
1086
|
Pe
|
|
1087
1087
|
] }],
|
|
1088
1088
|
"inset-shadow-color": [{ "inset-shadow": I() }],
|
|
1089
|
-
"ring-w": [{ ring:
|
|
1089
|
+
"ring-w": [{ ring: z() }],
|
|
1090
1090
|
"ring-w-inset": ["ring-inset"],
|
|
1091
1091
|
"ring-color": [{ ring: I() }],
|
|
1092
1092
|
"ring-offset-w": [{ "ring-offset": [U, Oe] }],
|
|
1093
1093
|
"ring-offset-color": [{ "ring-offset": I() }],
|
|
1094
|
-
"inset-ring-w": [{ "inset-ring":
|
|
1094
|
+
"inset-ring-w": [{ "inset-ring": z() }],
|
|
1095
1095
|
"inset-ring-color": [{ "inset-ring": I() }],
|
|
1096
1096
|
"text-shadow": [{ "text-shadow": [
|
|
1097
1097
|
"none",
|
|
@@ -1184,8 +1184,8 @@ var y = (e, t) => {
|
|
|
1184
1184
|
"view"
|
|
1185
1185
|
] }],
|
|
1186
1186
|
"mask-position": [{ mask: ee() }],
|
|
1187
|
-
"mask-repeat": [{ mask:
|
|
1188
|
-
"mask-size": [{ mask:
|
|
1187
|
+
"mask-repeat": [{ mask: L() }],
|
|
1188
|
+
"mask-size": [{ mask: te() }],
|
|
1189
1189
|
"mask-type": [{ "mask-type": ["alpha", "luminance"] }],
|
|
1190
1190
|
"mask-image": [{ mask: [
|
|
1191
1191
|
"none",
|
|
@@ -3581,11 +3581,11 @@ var Ui = "PopperContent", [Wi, Gi] = Ii(Ui), Ki = e.forwardRef((t, n) => {
|
|
|
3581
3581
|
...j
|
|
3582
3582
|
})
|
|
3583
3583
|
]
|
|
3584
|
-
}), [ee,
|
|
3584
|
+
}), [ee, L] = Qi(P), te = Ft(g);
|
|
3585
3585
|
X(() => {
|
|
3586
|
-
F &&
|
|
3587
|
-
}, [F,
|
|
3588
|
-
let
|
|
3586
|
+
F && te?.();
|
|
3587
|
+
}, [F, te]);
|
|
3588
|
+
let ne = I.arrow?.x, R = I.arrow?.y, z = I.arrow?.centerOffset !== 0, [re, ie] = e.useState();
|
|
3589
3589
|
return X(() => {
|
|
3590
3590
|
y && ie(window.getComputedStyle(y).zIndex);
|
|
3591
3591
|
}, [y]), /* @__PURE__ */ p("div", {
|
|
@@ -3595,7 +3595,7 @@ var Ui = "PopperContent", [Wi, Gi] = Ii(Ui), Ki = e.forwardRef((t, n) => {
|
|
|
3595
3595
|
...N,
|
|
3596
3596
|
transform: F ? N.transform : "translate(0, -200%)",
|
|
3597
3597
|
minWidth: "max-content",
|
|
3598
|
-
zIndex:
|
|
3598
|
+
zIndex: re,
|
|
3599
3599
|
"--radix-popper-transform-origin": [I.transformOrigin?.x, I.transformOrigin?.y].join(" "),
|
|
3600
3600
|
...I.hide?.referenceHidden && {
|
|
3601
3601
|
visibility: "hidden",
|
|
@@ -3607,12 +3607,12 @@ var Ui = "PopperContent", [Wi, Gi] = Ii(Ui), Ki = e.forwardRef((t, n) => {
|
|
|
3607
3607
|
scope: r,
|
|
3608
3608
|
placedSide: ee,
|
|
3609
3609
|
onArrowChange: C,
|
|
3610
|
-
arrowX:
|
|
3611
|
-
arrowY:
|
|
3612
|
-
shouldHideArrow:
|
|
3610
|
+
arrowX: ne,
|
|
3611
|
+
arrowY: R,
|
|
3612
|
+
shouldHideArrow: z,
|
|
3613
3613
|
children: /* @__PURE__ */ p(Y.div, {
|
|
3614
3614
|
"data-side": ee,
|
|
3615
|
-
"data-align":
|
|
3615
|
+
"data-align": L,
|
|
3616
3616
|
..._,
|
|
3617
3617
|
ref: x,
|
|
3618
3618
|
style: {
|
|
@@ -4760,7 +4760,21 @@ function Ss({ width: e = 24, height: t = 24, ...n }) {
|
|
|
4760
4760
|
})
|
|
4761
4761
|
});
|
|
4762
4762
|
}
|
|
4763
|
-
function Cs({ width: e =
|
|
4763
|
+
function Cs({ width: e = 16, height: t = 16, ...n }) {
|
|
4764
|
+
return /* @__PURE__ */ p("svg", {
|
|
4765
|
+
viewBox: "0 0 16 16",
|
|
4766
|
+
width: e,
|
|
4767
|
+
height: t,
|
|
4768
|
+
fill: "none",
|
|
4769
|
+
"aria-hidden": "true",
|
|
4770
|
+
...n,
|
|
4771
|
+
children: /* @__PURE__ */ p("path", {
|
|
4772
|
+
d: "M7.99996 2.5C7.99996 2.22386 8.22382 2 8.49996 2C8.7761 2 8.99996 2.22386 8.99996 2.5V12.293L12.1464 9.14648C12.3417 8.95122 12.6582 8.95122 12.8535 9.14648C13.0487 9.34175 13.0487 9.65825 12.8535 9.85352L8.85348 13.8535C8.65822 14.0488 8.34171 14.0488 8.14645 13.8535L4.14645 9.85352C3.95118 9.65825 3.95118 9.34175 4.14645 9.14648C4.34171 8.95122 4.65822 8.95122 4.85348 9.14648L7.99996 12.293V4.89648V2.5Z",
|
|
4773
|
+
fill: "currentColor"
|
|
4774
|
+
})
|
|
4775
|
+
});
|
|
4776
|
+
}
|
|
4777
|
+
function ws({ width: e = 12, height: t = 12, ...n }) {
|
|
4764
4778
|
return /* @__PURE__ */ p("svg", {
|
|
4765
4779
|
viewBox: "0 0 12 12",
|
|
4766
4780
|
width: e,
|
|
@@ -4776,7 +4790,7 @@ function Cs({ width: e = 12, height: t = 12, ...n }) {
|
|
|
4776
4790
|
})
|
|
4777
4791
|
});
|
|
4778
4792
|
}
|
|
4779
|
-
function
|
|
4793
|
+
function Ts({ width: e = 24, height: t = 24, ...n }) {
|
|
4780
4794
|
return /* @__PURE__ */ p("svg", {
|
|
4781
4795
|
viewBox: "0 0 24 24",
|
|
4782
4796
|
width: e,
|
|
@@ -4792,7 +4806,7 @@ function ws({ width: e = 24, height: t = 24, ...n }) {
|
|
|
4792
4806
|
})
|
|
4793
4807
|
});
|
|
4794
4808
|
}
|
|
4795
|
-
function
|
|
4809
|
+
function Es({ width: e = 24, height: t = 24, ...n }) {
|
|
4796
4810
|
return /* @__PURE__ */ p("svg", {
|
|
4797
4811
|
viewBox: "0 0 24 24",
|
|
4798
4812
|
width: e,
|
|
@@ -4808,7 +4822,7 @@ function Ts({ width: e = 24, height: t = 24, ...n }) {
|
|
|
4808
4822
|
})
|
|
4809
4823
|
});
|
|
4810
4824
|
}
|
|
4811
|
-
function
|
|
4825
|
+
function Ds({ width: e = 24, height: t = 24, ...n }) {
|
|
4812
4826
|
return /* @__PURE__ */ p("svg", {
|
|
4813
4827
|
viewBox: "0 0 24 24",
|
|
4814
4828
|
width: e,
|
|
@@ -4824,7 +4838,7 @@ function Es({ width: e = 24, height: t = 24, ...n }) {
|
|
|
4824
4838
|
})
|
|
4825
4839
|
});
|
|
4826
4840
|
}
|
|
4827
|
-
function
|
|
4841
|
+
function Os({ width: e = 24, height: t = 24, ...n }) {
|
|
4828
4842
|
return /* @__PURE__ */ p("svg", {
|
|
4829
4843
|
viewBox: "0 0 24 24",
|
|
4830
4844
|
width: e,
|
|
@@ -4840,7 +4854,7 @@ function Ds({ width: e = 24, height: t = 24, ...n }) {
|
|
|
4840
4854
|
})
|
|
4841
4855
|
});
|
|
4842
4856
|
}
|
|
4843
|
-
function
|
|
4857
|
+
function ks({ width: e = 24, height: t = 24, ...n }) {
|
|
4844
4858
|
return /* @__PURE__ */ p("svg", {
|
|
4845
4859
|
viewBox: "0 0 24 24",
|
|
4846
4860
|
width: e,
|
|
@@ -4856,7 +4870,7 @@ function Os({ width: e = 24, height: t = 24, ...n }) {
|
|
|
4856
4870
|
})
|
|
4857
4871
|
});
|
|
4858
4872
|
}
|
|
4859
|
-
function
|
|
4873
|
+
function As({ width: e = 24, height: t = 24, ...n }) {
|
|
4860
4874
|
return /* @__PURE__ */ p("svg", {
|
|
4861
4875
|
viewBox: "0 0 24 24",
|
|
4862
4876
|
width: e,
|
|
@@ -4872,7 +4886,7 @@ function ks({ width: e = 24, height: t = 24, ...n }) {
|
|
|
4872
4886
|
})
|
|
4873
4887
|
});
|
|
4874
4888
|
}
|
|
4875
|
-
function
|
|
4889
|
+
function js({ width: e = 24, height: t = 24, ...n }) {
|
|
4876
4890
|
return /* @__PURE__ */ p("svg", {
|
|
4877
4891
|
viewBox: "0 0 24 24",
|
|
4878
4892
|
width: e,
|
|
@@ -4888,7 +4902,7 @@ function As({ width: e = 24, height: t = 24, ...n }) {
|
|
|
4888
4902
|
})
|
|
4889
4903
|
});
|
|
4890
4904
|
}
|
|
4891
|
-
function
|
|
4905
|
+
function Ms({ width: e = 24, height: t = 24, ...n }) {
|
|
4892
4906
|
return /* @__PURE__ */ p("svg", {
|
|
4893
4907
|
viewBox: "0 0 24 24",
|
|
4894
4908
|
width: e,
|
|
@@ -4904,7 +4918,7 @@ function js({ width: e = 24, height: t = 24, ...n }) {
|
|
|
4904
4918
|
})
|
|
4905
4919
|
});
|
|
4906
4920
|
}
|
|
4907
|
-
function
|
|
4921
|
+
function Ns({ width: e = 24, height: t = 24, ...n }) {
|
|
4908
4922
|
return /* @__PURE__ */ p("svg", {
|
|
4909
4923
|
viewBox: "0 0 24 24",
|
|
4910
4924
|
width: e,
|
|
@@ -4920,7 +4934,7 @@ function Ms({ width: e = 24, height: t = 24, ...n }) {
|
|
|
4920
4934
|
})
|
|
4921
4935
|
});
|
|
4922
4936
|
}
|
|
4923
|
-
function
|
|
4937
|
+
function Ps({ width: e = 20, height: t = 20, ...n }) {
|
|
4924
4938
|
return /* @__PURE__ */ p("svg", {
|
|
4925
4939
|
viewBox: "0 0 20 20",
|
|
4926
4940
|
width: e,
|
|
@@ -4936,7 +4950,7 @@ function Ns({ width: e = 20, height: t = 20, ...n }) {
|
|
|
4936
4950
|
})
|
|
4937
4951
|
});
|
|
4938
4952
|
}
|
|
4939
|
-
function
|
|
4953
|
+
function Fs({ width: e = 14, height: t = 10, ...n }) {
|
|
4940
4954
|
return /* @__PURE__ */ m("svg", {
|
|
4941
4955
|
viewBox: "0 0 14 10",
|
|
4942
4956
|
width: e,
|
|
@@ -4968,7 +4982,7 @@ function Ps({ width: e = 14, height: t = 10, ...n }) {
|
|
|
4968
4982
|
]
|
|
4969
4983
|
});
|
|
4970
4984
|
}
|
|
4971
|
-
function
|
|
4985
|
+
function Is({ width: e = 24, height: t = 24, ...n }) {
|
|
4972
4986
|
return /* @__PURE__ */ p("svg", {
|
|
4973
4987
|
viewBox: "0 0 24 24",
|
|
4974
4988
|
width: e,
|
|
@@ -4984,7 +4998,7 @@ function Fs({ width: e = 24, height: t = 24, ...n }) {
|
|
|
4984
4998
|
})
|
|
4985
4999
|
});
|
|
4986
5000
|
}
|
|
4987
|
-
function
|
|
5001
|
+
function Ls({ width: e = 24, height: t = 24, ...n }) {
|
|
4988
5002
|
return /* @__PURE__ */ p("svg", {
|
|
4989
5003
|
viewBox: "0 0 24 24",
|
|
4990
5004
|
width: e,
|
|
@@ -5000,7 +5014,7 @@ function Is({ width: e = 24, height: t = 24, ...n }) {
|
|
|
5000
5014
|
})
|
|
5001
5015
|
});
|
|
5002
5016
|
}
|
|
5003
|
-
function
|
|
5017
|
+
function Rs({ width: e = 24, height: t = 24, ...n }) {
|
|
5004
5018
|
return /* @__PURE__ */ p("svg", {
|
|
5005
5019
|
viewBox: "0 0 24 24",
|
|
5006
5020
|
width: e,
|
|
@@ -5016,7 +5030,7 @@ function Ls({ width: e = 24, height: t = 24, ...n }) {
|
|
|
5016
5030
|
})
|
|
5017
5031
|
});
|
|
5018
5032
|
}
|
|
5019
|
-
function
|
|
5033
|
+
function zs({ width: e = 24, height: t = 24, ...n }) {
|
|
5020
5034
|
return /* @__PURE__ */ p("svg", {
|
|
5021
5035
|
viewBox: "0 0 24 24",
|
|
5022
5036
|
width: e,
|
|
@@ -5032,7 +5046,7 @@ function Rs({ width: e = 24, height: t = 24, ...n }) {
|
|
|
5032
5046
|
})
|
|
5033
5047
|
});
|
|
5034
5048
|
}
|
|
5035
|
-
function
|
|
5049
|
+
function Bs({ width: e = 24, height: t = 24, ...n }) {
|
|
5036
5050
|
return /* @__PURE__ */ p("svg", {
|
|
5037
5051
|
viewBox: "0 0 24 24",
|
|
5038
5052
|
width: e,
|
|
@@ -5048,7 +5062,7 @@ function zs({ width: e = 24, height: t = 24, ...n }) {
|
|
|
5048
5062
|
})
|
|
5049
5063
|
});
|
|
5050
5064
|
}
|
|
5051
|
-
function
|
|
5065
|
+
function Vs({ width: e = 12, height: t = 12, ...n }) {
|
|
5052
5066
|
return /* @__PURE__ */ m("svg", {
|
|
5053
5067
|
viewBox: "0 0 12 12",
|
|
5054
5068
|
width: e,
|
|
@@ -5074,7 +5088,7 @@ function Bs({ width: e = 12, height: t = 12, ...n }) {
|
|
|
5074
5088
|
}) })]
|
|
5075
5089
|
});
|
|
5076
5090
|
}
|
|
5077
|
-
function
|
|
5091
|
+
function Hs({ width: e = 24, height: t = 24, ...n }) {
|
|
5078
5092
|
return /* @__PURE__ */ p("svg", {
|
|
5079
5093
|
viewBox: "0 0 24 24",
|
|
5080
5094
|
width: e,
|
|
@@ -5090,7 +5104,7 @@ function Vs({ width: e = 24, height: t = 24, ...n }) {
|
|
|
5090
5104
|
})
|
|
5091
5105
|
});
|
|
5092
5106
|
}
|
|
5093
|
-
function
|
|
5107
|
+
function Us({ width: e = 24, height: t = 24, ...n }) {
|
|
5094
5108
|
return /* @__PURE__ */ p("svg", {
|
|
5095
5109
|
viewBox: "0 0 24 24",
|
|
5096
5110
|
width: e,
|
|
@@ -5106,7 +5120,7 @@ function Hs({ width: e = 24, height: t = 24, ...n }) {
|
|
|
5106
5120
|
})
|
|
5107
5121
|
});
|
|
5108
5122
|
}
|
|
5109
|
-
function
|
|
5123
|
+
function Ws({ width: e = 24, height: t = 24, ...n }) {
|
|
5110
5124
|
return /* @__PURE__ */ p("svg", {
|
|
5111
5125
|
viewBox: "0 0 24 24",
|
|
5112
5126
|
width: e,
|
|
@@ -5122,7 +5136,7 @@ function Us({ width: e = 24, height: t = 24, ...n }) {
|
|
|
5122
5136
|
})
|
|
5123
5137
|
});
|
|
5124
5138
|
}
|
|
5125
|
-
function
|
|
5139
|
+
function Gs({ width: e = 24, height: t = 24, ...n }) {
|
|
5126
5140
|
return /* @__PURE__ */ p("svg", {
|
|
5127
5141
|
viewBox: "0 0 24 24",
|
|
5128
5142
|
width: e,
|
|
@@ -5138,7 +5152,7 @@ function Ws({ width: e = 24, height: t = 24, ...n }) {
|
|
|
5138
5152
|
})
|
|
5139
5153
|
});
|
|
5140
5154
|
}
|
|
5141
|
-
function
|
|
5155
|
+
function Ks({ width: e = 24, height: t = 24, ...n }) {
|
|
5142
5156
|
return /* @__PURE__ */ p("svg", {
|
|
5143
5157
|
viewBox: "0 0 24 24",
|
|
5144
5158
|
width: e,
|
|
@@ -5154,7 +5168,7 @@ function Gs({ width: e = 24, height: t = 24, ...n }) {
|
|
|
5154
5168
|
})
|
|
5155
5169
|
});
|
|
5156
5170
|
}
|
|
5157
|
-
function
|
|
5171
|
+
function qs({ width: e = 24, height: t = 24, ...n }) {
|
|
5158
5172
|
return /* @__PURE__ */ p("svg", {
|
|
5159
5173
|
viewBox: "0 0 24 24",
|
|
5160
5174
|
width: e,
|
|
@@ -5172,22 +5186,22 @@ function Ks({ width: e = 24, height: t = 24, ...n }) {
|
|
|
5172
5186
|
}
|
|
5173
5187
|
//#endregion
|
|
5174
5188
|
//#region src/components/SearchBar/SearchBar.tsx
|
|
5175
|
-
var
|
|
5176
|
-
function
|
|
5189
|
+
var Js = 1;
|
|
5190
|
+
function Ys(e, t) {
|
|
5177
5191
|
let n = t.trim().toLocaleLowerCase("ru");
|
|
5178
|
-
return n.length <
|
|
5192
|
+
return n.length < Js ? [] : e.map((e) => ({
|
|
5179
5193
|
...e,
|
|
5180
5194
|
items: e.items.filter((e) => e.label.toLocaleLowerCase("ru").includes(n))
|
|
5181
5195
|
})).filter((e) => e.items.length > 0);
|
|
5182
5196
|
}
|
|
5183
|
-
function
|
|
5184
|
-
let [_, v] = d(f), [y, b] = d(!g && f.trim().length >=
|
|
5197
|
+
function Xs({ results: e = [], onSearch: t, onSelect: n, onSubmit: r, isLoading: a = !1, placeholder: c = "Для поиска введите название вакцины, противопоказания, инфекции", defaultValue: f = "", className: h, forceClose: g = !1 }) {
|
|
5198
|
+
let [_, v] = d(f), [y, b] = d(!g && f.trim().length >= Js), x = u(null), S = u(null), C = s(), w = l(() => Ys(e, _), [e, _]);
|
|
5185
5199
|
o(() => () => {
|
|
5186
5200
|
x.current && clearTimeout(x.current);
|
|
5187
5201
|
}, []);
|
|
5188
5202
|
let T = i((e) => {
|
|
5189
5203
|
let n = e.target.value;
|
|
5190
|
-
v(n), g || b(n.trim().length >=
|
|
5204
|
+
v(n), g || b(n.trim().length >= Js), x.current && clearTimeout(x.current), x.current = setTimeout(() => t?.(n), 300);
|
|
5191
5205
|
}, [t, g]), E = i(() => {
|
|
5192
5206
|
v(""), b(!1), x.current && clearTimeout(x.current), t?.(""), S.current?.focus();
|
|
5193
5207
|
}, [t]), D = i(() => {
|
|
@@ -5209,7 +5223,7 @@ function Ys({ results: e = [], onSearch: t, onSelect: n, onSubmit: r, isLoading:
|
|
|
5209
5223
|
/* @__PURE__ */ p("span", {
|
|
5210
5224
|
className: "shrink-0 text-fg-muted group-hover:text-fg group-focus-within:text-fg",
|
|
5211
5225
|
"aria-hidden": "true",
|
|
5212
|
-
children: /* @__PURE__ */ p(
|
|
5226
|
+
children: /* @__PURE__ */ p(zs, {
|
|
5213
5227
|
width: 24,
|
|
5214
5228
|
height: 24
|
|
5215
5229
|
})
|
|
@@ -5221,7 +5235,7 @@ function Ys({ results: e = [], onSearch: t, onSelect: n, onSubmit: r, isLoading:
|
|
|
5221
5235
|
onChange: T,
|
|
5222
5236
|
onKeyDown: O,
|
|
5223
5237
|
onFocus: () => {
|
|
5224
|
-
!g && _.trim().length >=
|
|
5238
|
+
!g && _.trim().length >= Js && b(!0);
|
|
5225
5239
|
},
|
|
5226
5240
|
placeholder: c,
|
|
5227
5241
|
"aria-label": "Поиск вакцин, инфекций, противопоказаний",
|
|
@@ -5235,7 +5249,7 @@ function Ys({ results: e = [], onSearch: t, onSelect: n, onSubmit: r, isLoading:
|
|
|
5235
5249
|
"aria-label": "Очистить поиск",
|
|
5236
5250
|
onClick: E,
|
|
5237
5251
|
className: "group shrink-0 inline-flex h-8 w-8 items-center justify-center rounded-full transition-colors hover:bg-subtle",
|
|
5238
|
-
children: /* @__PURE__ */ p(
|
|
5252
|
+
children: /* @__PURE__ */ p(qs, {
|
|
5239
5253
|
width: 24,
|
|
5240
5254
|
height: 24,
|
|
5241
5255
|
className: "text-fg-muted group-hover:text-accent transition-colors"
|
|
@@ -5268,15 +5282,15 @@ function Ys({ results: e = [], onSearch: t, onSelect: n, onSubmit: r, isLoading:
|
|
|
5268
5282
|
}
|
|
5269
5283
|
//#endregion
|
|
5270
5284
|
//#region node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-slot/dist/index.mjs
|
|
5271
|
-
var
|
|
5285
|
+
var Zs = Symbol("radix.slottable");
|
|
5272
5286
|
/* @__NO_SIDE_EFFECTS__ */
|
|
5273
|
-
function
|
|
5287
|
+
function Qs(e) {
|
|
5274
5288
|
let t = ({ children: e }) => /* @__PURE__ */ p(f, { children: e });
|
|
5275
|
-
return t.displayName = `${e}.Slottable`, t.__radixId =
|
|
5289
|
+
return t.displayName = `${e}.Slottable`, t.__radixId = Zs, t;
|
|
5276
5290
|
}
|
|
5277
5291
|
//#endregion
|
|
5278
5292
|
//#region node_modules/@radix-ui/react-visually-hidden/dist/index.mjs
|
|
5279
|
-
var
|
|
5293
|
+
var $s = Object.freeze({
|
|
5280
5294
|
position: "absolute",
|
|
5281
5295
|
border: 0,
|
|
5282
5296
|
width: 1,
|
|
@@ -5287,21 +5301,21 @@ var Qs = Object.freeze({
|
|
|
5287
5301
|
clip: "rect(0, 0, 0, 0)",
|
|
5288
5302
|
whiteSpace: "nowrap",
|
|
5289
5303
|
wordWrap: "normal"
|
|
5290
|
-
}),
|
|
5304
|
+
}), ec = "VisuallyHidden", tc = e.forwardRef((e, t) => /* @__PURE__ */ p(Y.span, {
|
|
5291
5305
|
...e,
|
|
5292
5306
|
ref: t,
|
|
5293
5307
|
style: {
|
|
5294
|
-
|
|
5308
|
+
...$s,
|
|
5295
5309
|
...e.style
|
|
5296
5310
|
}
|
|
5297
5311
|
}));
|
|
5298
|
-
|
|
5299
|
-
var
|
|
5300
|
-
let { __scopeTooltip: n, delayDuration: r =
|
|
5312
|
+
tc.displayName = ec;
|
|
5313
|
+
var nc = tc, [rc, ic] = Et("Tooltip", [Li]), ac = Li(), oc = "TooltipProvider", sc = 700, cc = "tooltip.open", [lc, uc] = rc(oc), dc = (t) => {
|
|
5314
|
+
let { __scopeTooltip: n, delayDuration: r = sc, skipDelayDuration: i = 300, disableHoverableContent: a = !1, children: o } = t, s = e.useRef(!0), c = e.useRef(!1), l = e.useRef(0);
|
|
5301
5315
|
return e.useEffect(() => {
|
|
5302
5316
|
let e = l.current;
|
|
5303
5317
|
return () => window.clearTimeout(e);
|
|
5304
|
-
}, []), /* @__PURE__ */ p(
|
|
5318
|
+
}, []), /* @__PURE__ */ p(lc, {
|
|
5305
5319
|
scope: n,
|
|
5306
5320
|
isOpenDelayedRef: s,
|
|
5307
5321
|
delayDuration: r,
|
|
@@ -5319,15 +5333,15 @@ var tc = ec, [nc, rc] = Et("Tooltip", [Li]), ic = Li(), ac = "TooltipProvider",
|
|
|
5319
5333
|
children: o
|
|
5320
5334
|
});
|
|
5321
5335
|
};
|
|
5322
|
-
|
|
5323
|
-
var
|
|
5324
|
-
let { __scopeTooltip: n, children: r, open: i, defaultOpen: a, onOpenChange: o, disableHoverableContent: s, delayDuration: c } = t, l =
|
|
5336
|
+
dc.displayName = oc;
|
|
5337
|
+
var fc = "Tooltip", [pc, mc] = rc(fc), hc = (t) => {
|
|
5338
|
+
let { __scopeTooltip: n, children: r, open: i, defaultOpen: a, onOpenChange: o, disableHoverableContent: s, delayDuration: c } = t, l = uc(fc, t.__scopeTooltip), u = ac(n), [d, f] = e.useState(null), m = vn(), h = e.useRef(0), g = s ?? l.disableHoverableContent, _ = c ?? l.delayDuration, v = e.useRef(!1), [y, b] = _a({
|
|
5325
5339
|
prop: i,
|
|
5326
5340
|
defaultProp: a ?? !1,
|
|
5327
5341
|
onChange: (e) => {
|
|
5328
|
-
e ? (l.onOpen(), document.dispatchEvent(new CustomEvent(
|
|
5342
|
+
e ? (l.onOpen(), document.dispatchEvent(new CustomEvent(cc))) : l.onClose(), o?.(e);
|
|
5329
5343
|
},
|
|
5330
|
-
caller:
|
|
5344
|
+
caller: fc
|
|
5331
5345
|
}), x = e.useMemo(() => y ? v.current ? "delayed-open" : "instant-open" : "closed", [y]), S = e.useCallback(() => {
|
|
5332
5346
|
window.clearTimeout(h.current), h.current = 0, v.current = !1, b(!0);
|
|
5333
5347
|
}, [b]), C = e.useCallback(() => {
|
|
@@ -5341,7 +5355,7 @@ var dc = "Tooltip", [fc, pc] = nc(dc), mc = (t) => {
|
|
|
5341
5355
|
h.current &&= (window.clearTimeout(h.current), 0);
|
|
5342
5356
|
}, []), /* @__PURE__ */ p($i, {
|
|
5343
5357
|
...u,
|
|
5344
|
-
children: /* @__PURE__ */ p(
|
|
5358
|
+
children: /* @__PURE__ */ p(pc, {
|
|
5345
5359
|
scope: n,
|
|
5346
5360
|
contentId: m,
|
|
5347
5361
|
open: y,
|
|
@@ -5365,9 +5379,9 @@ var dc = "Tooltip", [fc, pc] = nc(dc), mc = (t) => {
|
|
|
5365
5379
|
})
|
|
5366
5380
|
});
|
|
5367
5381
|
};
|
|
5368
|
-
|
|
5369
|
-
var
|
|
5370
|
-
let { __scopeTooltip: r, ...i } = t, a =
|
|
5382
|
+
hc.displayName = fc;
|
|
5383
|
+
var gc = "TooltipTrigger", _c = e.forwardRef((t, n) => {
|
|
5384
|
+
let { __scopeTooltip: r, ...i } = t, a = mc(gc, r), o = uc(gc, r), s = ac(r), c = q(n, e.useRef(null), a.onTriggerChange), l = e.useRef(!1), u = e.useRef(!1), d = e.useCallback(() => l.current = !1, []);
|
|
5371
5385
|
return e.useEffect(() => () => document.removeEventListener("pointerup", d), [d]), /* @__PURE__ */ p(ea, {
|
|
5372
5386
|
asChild: !0,
|
|
5373
5387
|
...s,
|
|
@@ -5393,10 +5407,10 @@ var hc = "TooltipTrigger", gc = e.forwardRef((t, n) => {
|
|
|
5393
5407
|
})
|
|
5394
5408
|
});
|
|
5395
5409
|
});
|
|
5396
|
-
|
|
5397
|
-
var
|
|
5398
|
-
let { __scopeTooltip: t, forceMount: n, children: r, container: i } = e, a =
|
|
5399
|
-
return /* @__PURE__ */ p(
|
|
5410
|
+
_c.displayName = gc;
|
|
5411
|
+
var vc = "TooltipPortal", [yc, bc] = rc(vc, { forceMount: void 0 }), xc = (e) => {
|
|
5412
|
+
let { __scopeTooltip: t, forceMount: n, children: r, container: i } = e, a = mc(vc, t);
|
|
5413
|
+
return /* @__PURE__ */ p(yc, {
|
|
5400
5414
|
scope: t,
|
|
5401
5415
|
forceMount: n,
|
|
5402
5416
|
children: /* @__PURE__ */ p(oa, {
|
|
@@ -5409,30 +5423,30 @@ var _c = "TooltipPortal", [vc, yc] = nc(_c, { forceMount: void 0 }), bc = (e) =>
|
|
|
5409
5423
|
})
|
|
5410
5424
|
});
|
|
5411
5425
|
};
|
|
5412
|
-
|
|
5413
|
-
var
|
|
5414
|
-
let n =
|
|
5426
|
+
xc.displayName = vc;
|
|
5427
|
+
var Sc = "TooltipContent", Cc = e.forwardRef((e, t) => {
|
|
5428
|
+
let n = bc(Sc, e.__scopeTooltip), { forceMount: r = n.forceMount, side: i = "top", ...a } = e, o = mc(Sc, e.__scopeTooltip);
|
|
5415
5429
|
return /* @__PURE__ */ p(oa, {
|
|
5416
5430
|
present: r || o.open,
|
|
5417
|
-
children: o.disableHoverableContent ? /* @__PURE__ */ p(
|
|
5431
|
+
children: o.disableHoverableContent ? /* @__PURE__ */ p(Oc, {
|
|
5418
5432
|
side: i,
|
|
5419
5433
|
...a,
|
|
5420
5434
|
ref: t
|
|
5421
|
-
}) : /* @__PURE__ */ p(
|
|
5435
|
+
}) : /* @__PURE__ */ p(wc, {
|
|
5422
5436
|
side: i,
|
|
5423
5437
|
...a,
|
|
5424
5438
|
ref: t
|
|
5425
5439
|
})
|
|
5426
5440
|
});
|
|
5427
|
-
}),
|
|
5428
|
-
let r =
|
|
5441
|
+
}), wc = e.forwardRef((t, n) => {
|
|
5442
|
+
let r = mc(Sc, t.__scopeTooltip), i = uc(Sc, t.__scopeTooltip), a = e.useRef(null), o = q(n, a), [s, c] = e.useState(null), { trigger: l, onClose: u } = r, d = a.current, { onPointerInTransitChange: f } = i, m = e.useCallback(() => {
|
|
5429
5443
|
c(null), f(!1);
|
|
5430
5444
|
}, [f]), h = e.useCallback((e, t) => {
|
|
5431
5445
|
let n = e.currentTarget, r = {
|
|
5432
5446
|
x: e.clientX,
|
|
5433
5447
|
y: e.clientY
|
|
5434
|
-
}, i =
|
|
5435
|
-
c(
|
|
5448
|
+
}, i = Mc(r, jc(r, n.getBoundingClientRect())), a = Nc(t.getBoundingClientRect());
|
|
5449
|
+
c(Fc([...i, ...a])), f(!0);
|
|
5436
5450
|
}, [f]);
|
|
5437
5451
|
return e.useEffect(() => () => m(), [m]), e.useEffect(() => {
|
|
5438
5452
|
if (l && d) {
|
|
@@ -5452,7 +5466,7 @@ var xc = "TooltipContent", Sc = e.forwardRef((e, t) => {
|
|
|
5452
5466
|
let t = e.target, n = {
|
|
5453
5467
|
x: e.clientX,
|
|
5454
5468
|
y: e.clientY
|
|
5455
|
-
}, r = l?.contains(t) || d?.contains(t), i = !
|
|
5469
|
+
}, r = l?.contains(t) || d?.contains(t), i = !Pc(n, s);
|
|
5456
5470
|
r ? m() : i && (m(), u());
|
|
5457
5471
|
};
|
|
5458
5472
|
return document.addEventListener("pointermove", e), () => document.removeEventListener("pointermove", e);
|
|
@@ -5463,13 +5477,13 @@ var xc = "TooltipContent", Sc = e.forwardRef((e, t) => {
|
|
|
5463
5477
|
s,
|
|
5464
5478
|
u,
|
|
5465
5479
|
m
|
|
5466
|
-
]), /* @__PURE__ */ p(
|
|
5480
|
+
]), /* @__PURE__ */ p(Oc, {
|
|
5467
5481
|
...t,
|
|
5468
5482
|
ref: o
|
|
5469
5483
|
});
|
|
5470
|
-
}), [
|
|
5471
|
-
let { __scopeTooltip: r, children: i, "aria-label": a, onEscapeKeyDown: o, onPointerDownOutside: s, ...c } = t, l =
|
|
5472
|
-
return e.useEffect(() => (document.addEventListener(
|
|
5484
|
+
}), [Tc, Ec] = rc(fc, { isInside: !1 }), Dc = /* @__PURE__ */ Qs("TooltipContent"), Oc = e.forwardRef((t, n) => {
|
|
5485
|
+
let { __scopeTooltip: r, children: i, "aria-label": a, onEscapeKeyDown: o, onPointerDownOutside: s, ...c } = t, l = mc(Sc, r), u = ac(r), { onClose: d } = l;
|
|
5486
|
+
return e.useEffect(() => (document.addEventListener(cc, d), () => document.removeEventListener(cc, d)), [d]), e.useEffect(() => {
|
|
5473
5487
|
if (l.trigger) {
|
|
5474
5488
|
let e = (e) => {
|
|
5475
5489
|
e.target?.contains(l.trigger) && d();
|
|
@@ -5496,10 +5510,10 @@ var xc = "TooltipContent", Sc = e.forwardRef((e, t) => {
|
|
|
5496
5510
|
"--radix-tooltip-trigger-width": "var(--radix-popper-anchor-width)",
|
|
5497
5511
|
"--radix-tooltip-trigger-height": "var(--radix-popper-anchor-height)"
|
|
5498
5512
|
},
|
|
5499
|
-
children: [/* @__PURE__ */ p(
|
|
5513
|
+
children: [/* @__PURE__ */ p(Dc, { children: i }), /* @__PURE__ */ p(Tc, {
|
|
5500
5514
|
scope: r,
|
|
5501
5515
|
isInside: !0,
|
|
5502
|
-
children: /* @__PURE__ */ p(
|
|
5516
|
+
children: /* @__PURE__ */ p(nc, {
|
|
5503
5517
|
id: l.contentId,
|
|
5504
5518
|
role: "tooltip",
|
|
5505
5519
|
children: a || i
|
|
@@ -5508,17 +5522,17 @@ var xc = "TooltipContent", Sc = e.forwardRef((e, t) => {
|
|
|
5508
5522
|
})
|
|
5509
5523
|
});
|
|
5510
5524
|
});
|
|
5511
|
-
|
|
5512
|
-
var
|
|
5513
|
-
let { __scopeTooltip: n, ...r } = e, i =
|
|
5514
|
-
return
|
|
5525
|
+
Cc.displayName = Sc;
|
|
5526
|
+
var kc = "TooltipArrow", Ac = e.forwardRef((e, t) => {
|
|
5527
|
+
let { __scopeTooltip: n, ...r } = e, i = ac(n);
|
|
5528
|
+
return Ec(kc, n).isInside ? null : /* @__PURE__ */ p(na, {
|
|
5515
5529
|
...i,
|
|
5516
5530
|
...r,
|
|
5517
5531
|
ref: t
|
|
5518
5532
|
});
|
|
5519
5533
|
});
|
|
5520
|
-
|
|
5521
|
-
function
|
|
5534
|
+
Ac.displayName = kc;
|
|
5535
|
+
function jc(e, t) {
|
|
5522
5536
|
let n = Math.abs(t.top - e.y), r = Math.abs(t.bottom - e.y), i = Math.abs(t.right - e.x), a = Math.abs(t.left - e.x);
|
|
5523
5537
|
switch (Math.min(n, r, i, a)) {
|
|
5524
5538
|
case a: return "left";
|
|
@@ -5528,7 +5542,7 @@ function Ac(e, t) {
|
|
|
5528
5542
|
default: throw Error("unreachable");
|
|
5529
5543
|
}
|
|
5530
5544
|
}
|
|
5531
|
-
function
|
|
5545
|
+
function Mc(e, t, n = 5) {
|
|
5532
5546
|
let r = [];
|
|
5533
5547
|
switch (t) {
|
|
5534
5548
|
case "top":
|
|
@@ -5570,7 +5584,7 @@ function jc(e, t, n = 5) {
|
|
|
5570
5584
|
}
|
|
5571
5585
|
return r;
|
|
5572
5586
|
}
|
|
5573
|
-
function
|
|
5587
|
+
function Nc(e) {
|
|
5574
5588
|
let { top: t, right: n, bottom: r, left: i } = e;
|
|
5575
5589
|
return [
|
|
5576
5590
|
{
|
|
@@ -5591,7 +5605,7 @@ function Mc(e) {
|
|
|
5591
5605
|
}
|
|
5592
5606
|
];
|
|
5593
5607
|
}
|
|
5594
|
-
function
|
|
5608
|
+
function Pc(e, t) {
|
|
5595
5609
|
let { x: n, y: r } = e, i = !1;
|
|
5596
5610
|
for (let e = 0, a = t.length - 1; e < t.length; a = e++) {
|
|
5597
5611
|
let o = t[e], s = t[a], c = o.x, l = o.y, u = s.x, d = s.y;
|
|
@@ -5599,11 +5613,11 @@ function Nc(e, t) {
|
|
|
5599
5613
|
}
|
|
5600
5614
|
return i;
|
|
5601
5615
|
}
|
|
5602
|
-
function
|
|
5616
|
+
function Fc(e) {
|
|
5603
5617
|
let t = e.slice();
|
|
5604
|
-
return t.sort((e, t) => e.x < t.x ? -1 : e.x > t.x ? 1 : e.y < t.y ? -1 : +(e.y > t.y)),
|
|
5618
|
+
return t.sort((e, t) => e.x < t.x ? -1 : e.x > t.x ? 1 : e.y < t.y ? -1 : +(e.y > t.y)), Ic(t);
|
|
5605
5619
|
}
|
|
5606
|
-
function
|
|
5620
|
+
function Ic(e) {
|
|
5607
5621
|
if (e.length <= 1) return e.slice();
|
|
5608
5622
|
let t = [];
|
|
5609
5623
|
for (let n = 0; n < e.length; n++) {
|
|
@@ -5628,28 +5642,28 @@ function Fc(e) {
|
|
|
5628
5642
|
}
|
|
5629
5643
|
return n.pop(), t.length === 1 && n.length === 1 && t[0].x === n[0].x && t[0].y === n[0].y ? t : t.concat(n);
|
|
5630
5644
|
}
|
|
5631
|
-
var
|
|
5645
|
+
var Lc = dc, Rc = hc, zc = _c, Bc = xc, Vc = Cc, Hc = Ac;
|
|
5632
5646
|
//#endregion
|
|
5633
5647
|
//#region src/components/Tooltip/Tooltip.tsx
|
|
5634
|
-
function
|
|
5635
|
-
return /* @__PURE__ */ p(
|
|
5648
|
+
function Uc({ content: e, children: t, className: n }) {
|
|
5649
|
+
return /* @__PURE__ */ p(Lc, {
|
|
5636
5650
|
delayDuration: 200,
|
|
5637
|
-
children: /* @__PURE__ */ m(
|
|
5651
|
+
children: /* @__PURE__ */ m(Rc, { children: [/* @__PURE__ */ p(zc, {
|
|
5638
5652
|
asChild: !0,
|
|
5639
5653
|
children: t
|
|
5640
|
-
}), /* @__PURE__ */ p(
|
|
5654
|
+
}), /* @__PURE__ */ p(Bc, { children: /* @__PURE__ */ m(Vc, {
|
|
5641
5655
|
className: K("z-50 px-3 py-2 rounded-tooltip text-xs text-white bg-neutral", "animate-in fade-in-0 zoom-in-95", n),
|
|
5642
5656
|
sideOffset: 4,
|
|
5643
|
-
children: [e, /* @__PURE__ */ p(
|
|
5657
|
+
children: [e, /* @__PURE__ */ p(Hc, { className: "fill-neutral" })]
|
|
5644
5658
|
}) })] })
|
|
5645
5659
|
});
|
|
5646
5660
|
}
|
|
5647
5661
|
//#endregion
|
|
5648
5662
|
//#region node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-slot/dist/index.mjs
|
|
5649
5663
|
/* @__NO_SIDE_EFFECTS__ */
|
|
5650
|
-
function
|
|
5651
|
-
let n = /* @__PURE__ */
|
|
5652
|
-
let { children: i, ...a } = t, o = e.Children.toArray(i), s = o.find(
|
|
5664
|
+
function Wc(t) {
|
|
5665
|
+
let n = /* @__PURE__ */ Gc(t), r = e.forwardRef((t, r) => {
|
|
5666
|
+
let { children: i, ...a } = t, o = e.Children.toArray(i), s = o.find(qc);
|
|
5653
5667
|
if (s) {
|
|
5654
5668
|
let t = s.props.children, i = o.map((n) => n === s ? e.Children.count(t) > 1 ? e.Children.only(null) : e.isValidElement(t) ? t.props.children : null : n);
|
|
5655
5669
|
return /* @__PURE__ */ p(n, {
|
|
@@ -5667,22 +5681,22 @@ function Uc(t) {
|
|
|
5667
5681
|
return r.displayName = `${t}.Slot`, r;
|
|
5668
5682
|
}
|
|
5669
5683
|
/* @__NO_SIDE_EFFECTS__ */
|
|
5670
|
-
function
|
|
5684
|
+
function Gc(t) {
|
|
5671
5685
|
let n = e.forwardRef((t, n) => {
|
|
5672
5686
|
let { children: r, ...i } = t;
|
|
5673
5687
|
if (e.isValidElement(r)) {
|
|
5674
|
-
let t =
|
|
5688
|
+
let t = Yc(r), a = Jc(i, r.props);
|
|
5675
5689
|
return r.type !== e.Fragment && (a.ref = n ? it(n, t) : t), e.cloneElement(r, a);
|
|
5676
5690
|
}
|
|
5677
5691
|
return e.Children.count(r) > 1 ? e.Children.only(null) : null;
|
|
5678
5692
|
});
|
|
5679
5693
|
return n.displayName = `${t}.SlotClone`, n;
|
|
5680
5694
|
}
|
|
5681
|
-
var
|
|
5682
|
-
function
|
|
5683
|
-
return e.isValidElement(t) && typeof t.type == "function" && "__radixId" in t.type && t.type.__radixId ===
|
|
5695
|
+
var Kc = Symbol("radix.slottable");
|
|
5696
|
+
function qc(t) {
|
|
5697
|
+
return e.isValidElement(t) && typeof t.type == "function" && "__radixId" in t.type && t.type.__radixId === Kc;
|
|
5684
5698
|
}
|
|
5685
|
-
function
|
|
5699
|
+
function Jc(e, t) {
|
|
5686
5700
|
let n = { ...t };
|
|
5687
5701
|
for (let r in t) {
|
|
5688
5702
|
let i = e[r], a = t[r];
|
|
@@ -5699,20 +5713,20 @@ function qc(e, t) {
|
|
|
5699
5713
|
...n
|
|
5700
5714
|
};
|
|
5701
5715
|
}
|
|
5702
|
-
function
|
|
5716
|
+
function Yc(e) {
|
|
5703
5717
|
let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning;
|
|
5704
5718
|
return n ? e.ref : (t = Object.getOwnPropertyDescriptor(e, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
5705
5719
|
}
|
|
5706
5720
|
//#endregion
|
|
5707
5721
|
//#region node_modules/@radix-ui/react-dialog/dist/index.mjs
|
|
5708
|
-
var
|
|
5722
|
+
var Xc = "Dialog", [Zc, Qc] = Et(Xc), [$c, el] = Zc(Xc), tl = (t) => {
|
|
5709
5723
|
let { __scopeDialog: n, children: r, open: i, defaultOpen: a, onOpenChange: o, modal: s = !0 } = t, c = e.useRef(null), l = e.useRef(null), [u, d] = _a({
|
|
5710
5724
|
prop: i,
|
|
5711
5725
|
defaultProp: a ?? !1,
|
|
5712
5726
|
onChange: o,
|
|
5713
|
-
caller:
|
|
5727
|
+
caller: Xc
|
|
5714
5728
|
});
|
|
5715
|
-
return /* @__PURE__ */ p(
|
|
5729
|
+
return /* @__PURE__ */ p($c, {
|
|
5716
5730
|
scope: n,
|
|
5717
5731
|
triggerRef: c,
|
|
5718
5732
|
contentRef: l,
|
|
@@ -5726,24 +5740,24 @@ var Yc = "Dialog", [Xc, Zc] = Et(Yc), [Qc, $c] = Xc(Yc), el = (t) => {
|
|
|
5726
5740
|
children: r
|
|
5727
5741
|
});
|
|
5728
5742
|
};
|
|
5729
|
-
|
|
5730
|
-
var
|
|
5731
|
-
let { __scopeDialog: n, ...r } = e, i =
|
|
5743
|
+
tl.displayName = Xc;
|
|
5744
|
+
var nl = "DialogTrigger", rl = e.forwardRef((e, t) => {
|
|
5745
|
+
let { __scopeDialog: n, ...r } = e, i = el(nl, n), a = q(t, i.triggerRef);
|
|
5732
5746
|
return /* @__PURE__ */ p(Y.button, {
|
|
5733
5747
|
type: "button",
|
|
5734
5748
|
"aria-haspopup": "dialog",
|
|
5735
5749
|
"aria-expanded": i.open,
|
|
5736
5750
|
"aria-controls": i.contentId,
|
|
5737
|
-
"data-state":
|
|
5751
|
+
"data-state": Cl(i.open),
|
|
5738
5752
|
...r,
|
|
5739
5753
|
ref: a,
|
|
5740
5754
|
onClick: J(e.onClick, i.onOpenToggle)
|
|
5741
5755
|
});
|
|
5742
5756
|
});
|
|
5743
|
-
|
|
5744
|
-
var
|
|
5745
|
-
let { __scopeDialog: n, forceMount: r, children: i, container: a } = t, o =
|
|
5746
|
-
return /* @__PURE__ */ p(
|
|
5757
|
+
rl.displayName = nl;
|
|
5758
|
+
var il = "DialogPortal", [al, ol] = Zc(il, { forceMount: void 0 }), sl = (t) => {
|
|
5759
|
+
let { __scopeDialog: n, forceMount: r, children: i, container: a } = t, o = el(il, n);
|
|
5760
|
+
return /* @__PURE__ */ p(al, {
|
|
5747
5761
|
scope: n,
|
|
5748
5762
|
forceMount: r,
|
|
5749
5763
|
children: e.Children.map(i, (e) => /* @__PURE__ */ p(oa, {
|
|
@@ -5756,26 +5770,26 @@ var rl = "DialogPortal", [il, al] = Xc(rl, { forceMount: void 0 }), ol = (t) =>
|
|
|
5756
5770
|
}))
|
|
5757
5771
|
});
|
|
5758
5772
|
};
|
|
5759
|
-
|
|
5760
|
-
var
|
|
5761
|
-
let n =
|
|
5773
|
+
sl.displayName = il;
|
|
5774
|
+
var cl = "DialogOverlay", ll = e.forwardRef((e, t) => {
|
|
5775
|
+
let n = ol(cl, e.__scopeDialog), { forceMount: r = n.forceMount, ...i } = e, a = el(cl, e.__scopeDialog);
|
|
5762
5776
|
return a.modal ? /* @__PURE__ */ p(oa, {
|
|
5763
5777
|
present: r || a.open,
|
|
5764
|
-
children: /* @__PURE__ */ p(
|
|
5778
|
+
children: /* @__PURE__ */ p(dl, {
|
|
5765
5779
|
...i,
|
|
5766
5780
|
ref: t
|
|
5767
5781
|
})
|
|
5768
5782
|
}) : null;
|
|
5769
5783
|
});
|
|
5770
|
-
|
|
5771
|
-
var
|
|
5772
|
-
let { __scopeDialog: n, ...r } = e, i =
|
|
5784
|
+
ll.displayName = cl;
|
|
5785
|
+
var ul = /* @__PURE__ */ Wc("DialogOverlay.RemoveScroll"), dl = e.forwardRef((e, t) => {
|
|
5786
|
+
let { __scopeDialog: n, ...r } = e, i = el(cl, n);
|
|
5773
5787
|
return /* @__PURE__ */ p(Ro, {
|
|
5774
|
-
as:
|
|
5788
|
+
as: ul,
|
|
5775
5789
|
allowPinchZoom: !0,
|
|
5776
5790
|
shards: [i.contentRef],
|
|
5777
5791
|
children: /* @__PURE__ */ p(Y.div, {
|
|
5778
|
-
"data-state":
|
|
5792
|
+
"data-state": Cl(i.open),
|
|
5779
5793
|
...r,
|
|
5780
5794
|
ref: t,
|
|
5781
5795
|
style: {
|
|
@@ -5784,26 +5798,26 @@ var ll = /* @__PURE__ */ Uc("DialogOverlay.RemoveScroll"), ul = e.forwardRef((e,
|
|
|
5784
5798
|
}
|
|
5785
5799
|
})
|
|
5786
5800
|
});
|
|
5787
|
-
}),
|
|
5788
|
-
let n =
|
|
5801
|
+
}), fl = "DialogContent", pl = e.forwardRef((e, t) => {
|
|
5802
|
+
let n = ol(fl, e.__scopeDialog), { forceMount: r = n.forceMount, ...i } = e, a = el(fl, e.__scopeDialog);
|
|
5789
5803
|
return /* @__PURE__ */ p(oa, {
|
|
5790
5804
|
present: r || a.open,
|
|
5791
|
-
children: a.modal ? /* @__PURE__ */ p(
|
|
5805
|
+
children: a.modal ? /* @__PURE__ */ p(ml, {
|
|
5792
5806
|
...i,
|
|
5793
5807
|
ref: t
|
|
5794
|
-
}) : /* @__PURE__ */ p(
|
|
5808
|
+
}) : /* @__PURE__ */ p(hl, {
|
|
5795
5809
|
...i,
|
|
5796
5810
|
ref: t
|
|
5797
5811
|
})
|
|
5798
5812
|
});
|
|
5799
5813
|
});
|
|
5800
|
-
|
|
5801
|
-
var
|
|
5802
|
-
let r =
|
|
5814
|
+
pl.displayName = fl;
|
|
5815
|
+
var ml = e.forwardRef((t, n) => {
|
|
5816
|
+
let r = el(fl, t.__scopeDialog), i = e.useRef(null), a = q(n, r.contentRef, i);
|
|
5803
5817
|
return e.useEffect(() => {
|
|
5804
5818
|
let e = i.current;
|
|
5805
5819
|
if (e) return Oa(e);
|
|
5806
|
-
}, []), /* @__PURE__ */ p(
|
|
5820
|
+
}, []), /* @__PURE__ */ p(gl, {
|
|
5807
5821
|
...t,
|
|
5808
5822
|
ref: a,
|
|
5809
5823
|
trapFocus: r.open,
|
|
@@ -5817,9 +5831,9 @@ var pl = e.forwardRef((t, n) => {
|
|
|
5817
5831
|
}),
|
|
5818
5832
|
onFocusOutside: J(t.onFocusOutside, (e) => e.preventDefault())
|
|
5819
5833
|
});
|
|
5820
|
-
}),
|
|
5821
|
-
let r =
|
|
5822
|
-
return /* @__PURE__ */ p(
|
|
5834
|
+
}), hl = e.forwardRef((t, n) => {
|
|
5835
|
+
let r = el(fl, t.__scopeDialog), i = e.useRef(!1), a = e.useRef(!1);
|
|
5836
|
+
return /* @__PURE__ */ p(gl, {
|
|
5823
5837
|
...t,
|
|
5824
5838
|
ref: n,
|
|
5825
5839
|
trapFocus: !1,
|
|
@@ -5833,8 +5847,8 @@ var pl = e.forwardRef((t, n) => {
|
|
|
5833
5847
|
r.triggerRef.current?.contains(n) && e.preventDefault(), e.detail.originalEvent.type === "focusin" && a.current && e.preventDefault();
|
|
5834
5848
|
}
|
|
5835
5849
|
});
|
|
5836
|
-
}),
|
|
5837
|
-
let { __scopeDialog: r, trapFocus: i, onOpenAutoFocus: a, onCloseAutoFocus: o, ...s } = t, c =
|
|
5850
|
+
}), gl = e.forwardRef((t, n) => {
|
|
5851
|
+
let { __scopeDialog: r, trapFocus: i, onOpenAutoFocus: a, onCloseAutoFocus: o, ...s } = t, c = el(fl, r), l = e.useRef(null), u = q(n, l);
|
|
5838
5852
|
return Zt(), /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(rn, {
|
|
5839
5853
|
asChild: !0,
|
|
5840
5854
|
loop: !0,
|
|
@@ -5846,35 +5860,35 @@ var pl = e.forwardRef((t, n) => {
|
|
|
5846
5860
|
id: c.contentId,
|
|
5847
5861
|
"aria-describedby": c.descriptionId,
|
|
5848
5862
|
"aria-labelledby": c.titleId,
|
|
5849
|
-
"data-state":
|
|
5863
|
+
"data-state": Cl(c.open),
|
|
5850
5864
|
...s,
|
|
5851
5865
|
ref: u,
|
|
5852
5866
|
onDismiss: () => c.onOpenChange(!1)
|
|
5853
5867
|
})
|
|
5854
|
-
}), /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(
|
|
5868
|
+
}), /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(Dl, { titleId: c.titleId }), /* @__PURE__ */ p(kl, {
|
|
5855
5869
|
contentRef: l,
|
|
5856
5870
|
descriptionId: c.descriptionId
|
|
5857
5871
|
})] })] });
|
|
5858
|
-
}),
|
|
5859
|
-
let { __scopeDialog: n, ...r } = e, i =
|
|
5872
|
+
}), _l = "DialogTitle", vl = e.forwardRef((e, t) => {
|
|
5873
|
+
let { __scopeDialog: n, ...r } = e, i = el(_l, n);
|
|
5860
5874
|
return /* @__PURE__ */ p(Y.h2, {
|
|
5861
5875
|
id: i.titleId,
|
|
5862
5876
|
...r,
|
|
5863
5877
|
ref: t
|
|
5864
5878
|
});
|
|
5865
5879
|
});
|
|
5866
|
-
|
|
5867
|
-
var
|
|
5868
|
-
let { __scopeDialog: n, ...r } = e, i =
|
|
5880
|
+
vl.displayName = _l;
|
|
5881
|
+
var yl = "DialogDescription", bl = e.forwardRef((e, t) => {
|
|
5882
|
+
let { __scopeDialog: n, ...r } = e, i = el(yl, n);
|
|
5869
5883
|
return /* @__PURE__ */ p(Y.p, {
|
|
5870
5884
|
id: i.descriptionId,
|
|
5871
5885
|
...r,
|
|
5872
5886
|
ref: t
|
|
5873
5887
|
});
|
|
5874
5888
|
});
|
|
5875
|
-
|
|
5876
|
-
var
|
|
5877
|
-
let { __scopeDialog: n, ...r } = e, i =
|
|
5889
|
+
bl.displayName = yl;
|
|
5890
|
+
var xl = "DialogClose", Sl = e.forwardRef((e, t) => {
|
|
5891
|
+
let { __scopeDialog: n, ...r } = e, i = el(xl, n);
|
|
5878
5892
|
return /* @__PURE__ */ p(Y.button, {
|
|
5879
5893
|
type: "button",
|
|
5880
5894
|
...r,
|
|
@@ -5882,16 +5896,16 @@ var bl = "DialogClose", xl = e.forwardRef((e, t) => {
|
|
|
5882
5896
|
onClick: J(e.onClick, () => i.onOpenChange(!1))
|
|
5883
5897
|
});
|
|
5884
5898
|
});
|
|
5885
|
-
|
|
5886
|
-
function
|
|
5899
|
+
Sl.displayName = xl;
|
|
5900
|
+
function Cl(e) {
|
|
5887
5901
|
return e ? "open" : "closed";
|
|
5888
5902
|
}
|
|
5889
|
-
var
|
|
5890
|
-
contentName:
|
|
5891
|
-
titleName:
|
|
5903
|
+
var wl = "DialogTitleWarning", [Tl, El] = Tt(wl, {
|
|
5904
|
+
contentName: fl,
|
|
5905
|
+
titleName: _l,
|
|
5892
5906
|
docsSlug: "dialog"
|
|
5893
|
-
}),
|
|
5894
|
-
let n =
|
|
5907
|
+
}), Dl = ({ titleId: t }) => {
|
|
5908
|
+
let n = El(wl), r = `\`${n.contentName}\` requires a \`${n.titleName}\` for the component to be accessible for screen reader users.
|
|
5895
5909
|
|
|
5896
5910
|
If you want to hide the \`${n.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
5897
5911
|
|
|
@@ -5899,8 +5913,8 @@ For more information, see https://radix-ui.com/primitives/docs/components/${n.do
|
|
|
5899
5913
|
return e.useEffect(() => {
|
|
5900
5914
|
t && (document.getElementById(t) || console.error(r));
|
|
5901
5915
|
}, [r, t]), null;
|
|
5902
|
-
},
|
|
5903
|
-
let r = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${
|
|
5916
|
+
}, Ol = "DialogDescriptionWarning", kl = ({ contentRef: t, descriptionId: n }) => {
|
|
5917
|
+
let r = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${El(Ol).contentName}}.`;
|
|
5904
5918
|
return e.useEffect(() => {
|
|
5905
5919
|
let e = t.current?.getAttribute("aria-describedby");
|
|
5906
5920
|
n && e && (document.getElementById(n) || console.warn(r));
|
|
@@ -5909,15 +5923,15 @@ For more information, see https://radix-ui.com/primitives/docs/components/${n.do
|
|
|
5909
5923
|
t,
|
|
5910
5924
|
n
|
|
5911
5925
|
]), null;
|
|
5912
|
-
},
|
|
5926
|
+
}, Al = tl, jl = rl, Ml = sl, Nl = ll, Pl = pl, Fl = vl, Il = bl, Ll = Sl;
|
|
5913
5927
|
//#endregion
|
|
5914
5928
|
//#region node_modules/vaul/dist/index.mjs
|
|
5915
|
-
function
|
|
5929
|
+
function Rl(e) {
|
|
5916
5930
|
if (!e || typeof document > "u") return;
|
|
5917
5931
|
let t = document.head || document.getElementsByTagName("head")[0], n = document.createElement("style");
|
|
5918
5932
|
n.type = "text/css", t.appendChild(n), n.styleSheet ? n.styleSheet.cssText = e : n.appendChild(document.createTextNode(e));
|
|
5919
5933
|
}
|
|
5920
|
-
var
|
|
5934
|
+
var zl = t.createContext({
|
|
5921
5935
|
drawerRef: { current: null },
|
|
5922
5936
|
overlayRef: { current: null },
|
|
5923
5937
|
onPress: () => {},
|
|
@@ -5947,50 +5961,50 @@ var Rl = t.createContext({
|
|
|
5947
5961
|
noBodyStyles: !1,
|
|
5948
5962
|
container: null,
|
|
5949
5963
|
autoFocus: !1
|
|
5950
|
-
}),
|
|
5951
|
-
let e = t.useContext(
|
|
5964
|
+
}), Bl = () => {
|
|
5965
|
+
let e = t.useContext(zl);
|
|
5952
5966
|
if (!e) throw Error("useDrawerContext must be used within a Drawer.Root");
|
|
5953
5967
|
return e;
|
|
5954
5968
|
};
|
|
5955
|
-
|
|
5956
|
-
function
|
|
5969
|
+
Rl("[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1);animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--initial-transform,100%),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--initial-transform,100%),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-animate=false]{animation:none!important}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true])::after{content:'';position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not(\n[data-state=closed]\n){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:active,[data-vaul-handle]:hover{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover:hover) and (pointer:fine){[data-vaul-drawer]{user-select:none}}@media (pointer:fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{from{transform:translate3d(0,var(--initial-transform,100%),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToBottom{to{transform:translate3d(0,var(--initial-transform,100%),0)}}@keyframes slideFromTop{from{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToTop{to{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}}@keyframes slideFromLeft{from{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToLeft{to{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}}@keyframes slideFromRight{from{transform:translate3d(var(--initial-transform,100%),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToRight{to{transform:translate3d(var(--initial-transform,100%),0,0)}}");
|
|
5970
|
+
function Vl() {
|
|
5957
5971
|
let e = navigator.userAgent;
|
|
5958
5972
|
return typeof window < "u" && (/Firefox/.test(e) && /Mobile/.test(e) || /FxiOS/.test(e));
|
|
5959
5973
|
}
|
|
5960
|
-
function Vl() {
|
|
5961
|
-
return Kl(/^Mac/);
|
|
5962
|
-
}
|
|
5963
5974
|
function Hl() {
|
|
5964
|
-
return
|
|
5975
|
+
return ql(/^Mac/);
|
|
5965
5976
|
}
|
|
5966
5977
|
function Ul() {
|
|
5967
|
-
return /^
|
|
5978
|
+
return ql(/^iPhone/);
|
|
5968
5979
|
}
|
|
5969
5980
|
function Wl() {
|
|
5970
|
-
return
|
|
5981
|
+
return /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
|
|
5971
5982
|
}
|
|
5972
5983
|
function Gl() {
|
|
5973
|
-
return
|
|
5984
|
+
return ql(/^iPad/) || Hl() && navigator.maxTouchPoints > 1;
|
|
5985
|
+
}
|
|
5986
|
+
function Kl() {
|
|
5987
|
+
return Ul() || Gl();
|
|
5974
5988
|
}
|
|
5975
|
-
function
|
|
5989
|
+
function ql(e) {
|
|
5976
5990
|
return typeof window < "u" && window.navigator != null ? e.test(window.navigator.platform) : void 0;
|
|
5977
5991
|
}
|
|
5978
|
-
var
|
|
5979
|
-
function
|
|
5992
|
+
var Jl = 24, Yl = typeof window < "u" ? c : o;
|
|
5993
|
+
function Xl(...e) {
|
|
5980
5994
|
return (...t) => {
|
|
5981
5995
|
for (let n of e) typeof n == "function" && n(...t);
|
|
5982
5996
|
};
|
|
5983
5997
|
}
|
|
5984
|
-
var
|
|
5985
|
-
function
|
|
5998
|
+
var Zl = typeof document < "u" && window.visualViewport;
|
|
5999
|
+
function Ql(e) {
|
|
5986
6000
|
let t = window.getComputedStyle(e);
|
|
5987
6001
|
return /(auto|scroll)/.test(t.overflow + t.overflowX + t.overflowY);
|
|
5988
6002
|
}
|
|
5989
|
-
function
|
|
5990
|
-
for (
|
|
6003
|
+
function $l(e) {
|
|
6004
|
+
for (Ql(e) && (e = e.parentElement); e && !Ql(e);) e = e.parentElement;
|
|
5991
6005
|
return e || document.scrollingElement || document.documentElement;
|
|
5992
6006
|
}
|
|
5993
|
-
var
|
|
6007
|
+
var eu = new Set([
|
|
5994
6008
|
"checkbox",
|
|
5995
6009
|
"radio",
|
|
5996
6010
|
"range",
|
|
@@ -6000,18 +6014,18 @@ var $l = new Set([
|
|
|
6000
6014
|
"button",
|
|
6001
6015
|
"submit",
|
|
6002
6016
|
"reset"
|
|
6003
|
-
]),
|
|
6004
|
-
function
|
|
6017
|
+
]), tu = 0, nu;
|
|
6018
|
+
function ru(e = {}) {
|
|
6005
6019
|
let { isDisabled: t } = e;
|
|
6006
|
-
|
|
6007
|
-
if (!t) return
|
|
6008
|
-
|
|
6020
|
+
Yl(() => {
|
|
6021
|
+
if (!t) return tu++, tu === 1 && Kl() && (nu = iu()), () => {
|
|
6022
|
+
tu--, tu === 0 && nu?.();
|
|
6009
6023
|
};
|
|
6010
6024
|
}, [t]);
|
|
6011
6025
|
}
|
|
6012
|
-
function
|
|
6026
|
+
function iu() {
|
|
6013
6027
|
let e, t = 0, n = (n) => {
|
|
6014
|
-
e =
|
|
6028
|
+
e = $l(n.target), !(e === document.documentElement && e === document.body) && (t = n.changedTouches[0].pageY);
|
|
6015
6029
|
}, r = (n) => {
|
|
6016
6030
|
if (!e || e === document.documentElement || e === document.body) {
|
|
6017
6031
|
n.preventDefault();
|
|
@@ -6021,69 +6035,69 @@ function ru() {
|
|
|
6021
6035
|
a !== 0 && ((i <= 0 && r > t || i >= a && r < t) && n.preventDefault(), t = r);
|
|
6022
6036
|
}, i = (e) => {
|
|
6023
6037
|
let t = e.target;
|
|
6024
|
-
|
|
6038
|
+
cu(t) && t !== document.activeElement && (e.preventDefault(), t.style.transform = "translateY(-2000px)", t.focus(), requestAnimationFrame(() => {
|
|
6025
6039
|
t.style.transform = "";
|
|
6026
6040
|
}));
|
|
6027
6041
|
}, a = (e) => {
|
|
6028
6042
|
let t = e.target;
|
|
6029
|
-
|
|
6030
|
-
t.style.transform = "",
|
|
6031
|
-
|
|
6032
|
-
}) :
|
|
6043
|
+
cu(t) && (t.style.transform = "translateY(-2000px)", requestAnimationFrame(() => {
|
|
6044
|
+
t.style.transform = "", Zl && (Zl.height < window.innerHeight ? requestAnimationFrame(() => {
|
|
6045
|
+
su(t);
|
|
6046
|
+
}) : Zl.addEventListener("resize", () => su(t), { once: !0 }));
|
|
6033
6047
|
}));
|
|
6034
6048
|
}, o = () => {
|
|
6035
6049
|
window.scrollTo(0, 0);
|
|
6036
|
-
}, s = window.pageXOffset, c = window.pageYOffset, l =
|
|
6050
|
+
}, s = window.pageXOffset, c = window.pageYOffset, l = Xl(au(document.documentElement, "paddingRight", `${window.innerWidth - document.documentElement.clientWidth}px`));
|
|
6037
6051
|
window.scrollTo(0, 0);
|
|
6038
|
-
let u =
|
|
6052
|
+
let u = Xl(ou(document, "touchstart", n, {
|
|
6039
6053
|
passive: !1,
|
|
6040
6054
|
capture: !0
|
|
6041
|
-
}),
|
|
6055
|
+
}), ou(document, "touchmove", r, {
|
|
6042
6056
|
passive: !1,
|
|
6043
6057
|
capture: !0
|
|
6044
|
-
}),
|
|
6058
|
+
}), ou(document, "touchend", i, {
|
|
6045
6059
|
passive: !1,
|
|
6046
6060
|
capture: !0
|
|
6047
|
-
}),
|
|
6061
|
+
}), ou(document, "focus", a, !0), ou(window, "scroll", o));
|
|
6048
6062
|
return () => {
|
|
6049
6063
|
l(), u(), window.scrollTo(s, c);
|
|
6050
6064
|
};
|
|
6051
6065
|
}
|
|
6052
|
-
function
|
|
6066
|
+
function au(e, t, n) {
|
|
6053
6067
|
let r = e.style[t];
|
|
6054
6068
|
return e.style[t] = n, () => {
|
|
6055
6069
|
e.style[t] = r;
|
|
6056
6070
|
};
|
|
6057
6071
|
}
|
|
6058
|
-
function
|
|
6072
|
+
function ou(e, t, n, r) {
|
|
6059
6073
|
return e.addEventListener(t, n, r), () => {
|
|
6060
6074
|
e.removeEventListener(t, n, r);
|
|
6061
6075
|
};
|
|
6062
6076
|
}
|
|
6063
|
-
function
|
|
6077
|
+
function su(e) {
|
|
6064
6078
|
let t = document.scrollingElement || document.documentElement;
|
|
6065
6079
|
for (; e && e !== t;) {
|
|
6066
|
-
let t =
|
|
6080
|
+
let t = $l(e);
|
|
6067
6081
|
if (t !== document.documentElement && t !== document.body && t !== e) {
|
|
6068
6082
|
let n = t.getBoundingClientRect().top, r = e.getBoundingClientRect().top;
|
|
6069
|
-
e.getBoundingClientRect().bottom > t.getBoundingClientRect().bottom +
|
|
6083
|
+
e.getBoundingClientRect().bottom > t.getBoundingClientRect().bottom + Jl && (t.scrollTop += r - n);
|
|
6070
6084
|
}
|
|
6071
6085
|
e = t.parentElement;
|
|
6072
6086
|
}
|
|
6073
6087
|
}
|
|
6074
|
-
function
|
|
6075
|
-
return e instanceof HTMLInputElement &&
|
|
6088
|
+
function cu(e) {
|
|
6089
|
+
return e instanceof HTMLInputElement && !eu.has(e.type) || e instanceof HTMLTextAreaElement || e instanceof HTMLElement && e.isContentEditable;
|
|
6076
6090
|
}
|
|
6077
|
-
function
|
|
6091
|
+
function lu(e, t) {
|
|
6078
6092
|
typeof e == "function" ? e(t) : e != null && (e.current = t);
|
|
6079
6093
|
}
|
|
6080
|
-
function
|
|
6081
|
-
return (t) => e.forEach((e) =>
|
|
6094
|
+
function uu(...e) {
|
|
6095
|
+
return (t) => e.forEach((e) => lu(e, t));
|
|
6082
6096
|
}
|
|
6083
|
-
function
|
|
6084
|
-
return e.useCallback(
|
|
6097
|
+
function du(...t) {
|
|
6098
|
+
return e.useCallback(uu(...t), t);
|
|
6085
6099
|
}
|
|
6086
|
-
var
|
|
6100
|
+
var fu = /* @__PURE__ */ new WeakMap();
|
|
6087
6101
|
function Z(e, t, n = !1) {
|
|
6088
6102
|
if (!e || !(e instanceof HTMLElement)) return;
|
|
6089
6103
|
let r = {};
|
|
@@ -6093,11 +6107,11 @@ function Z(e, t, n = !1) {
|
|
|
6093
6107
|
return;
|
|
6094
6108
|
}
|
|
6095
6109
|
r[t] = e.style[t], e.style[t] = n;
|
|
6096
|
-
}), !n &&
|
|
6110
|
+
}), !n && fu.set(e, r);
|
|
6097
6111
|
}
|
|
6098
|
-
function
|
|
6112
|
+
function pu(e, t) {
|
|
6099
6113
|
if (!e || !(e instanceof HTMLElement)) return;
|
|
6100
|
-
let n =
|
|
6114
|
+
let n = fu.get(e);
|
|
6101
6115
|
n && (e.style[t] = n[t]);
|
|
6102
6116
|
}
|
|
6103
6117
|
var Q = (e) => {
|
|
@@ -6109,15 +6123,15 @@ var Q = (e) => {
|
|
|
6109
6123
|
default: return e;
|
|
6110
6124
|
}
|
|
6111
6125
|
};
|
|
6112
|
-
function
|
|
6126
|
+
function mu(e, t) {
|
|
6113
6127
|
if (!e) return null;
|
|
6114
6128
|
let n = window.getComputedStyle(e), r = n.transform || n.webkitTransform || n.mozTransform, i = r.match(/^matrix3d\((.+)\)$/);
|
|
6115
6129
|
return i ? parseFloat(i[1].split(", ")[Q(t) ? 13 : 12]) : (i = r.match(/^matrix\((.+)\)$/), i ? parseFloat(i[1].split(", ")[Q(t) ? 5 : 4]) : null);
|
|
6116
6130
|
}
|
|
6117
|
-
function
|
|
6131
|
+
function hu(e) {
|
|
6118
6132
|
return 8 * (Math.log(e + 1) - 2);
|
|
6119
6133
|
}
|
|
6120
|
-
function
|
|
6134
|
+
function gu(e, t) {
|
|
6121
6135
|
if (!e) return () => {};
|
|
6122
6136
|
let n = e.style.cssText;
|
|
6123
6137
|
return Object.assign(e.style, t), () => {
|
|
@@ -6132,15 +6146,15 @@ var $ = {
|
|
|
6132
6146
|
0,
|
|
6133
6147
|
1
|
|
6134
6148
|
]
|
|
6135
|
-
},
|
|
6136
|
-
function
|
|
6149
|
+
}, _u = .4, vu = .25, yu = 100, bu = 8, xu = 16, Su = 26, Cu = "vaul-dragging";
|
|
6150
|
+
function wu(e) {
|
|
6137
6151
|
let n = t.useRef(e);
|
|
6138
6152
|
return t.useEffect(() => {
|
|
6139
6153
|
n.current = e;
|
|
6140
6154
|
}), t.useMemo(() => (...e) => n.current == null ? void 0 : n.current.call(n, ...e), []);
|
|
6141
6155
|
}
|
|
6142
|
-
function
|
|
6143
|
-
let r = t.useState(e), [i] = r, a = t.useRef(i), o =
|
|
6156
|
+
function Tu({ defaultProp: e, onChange: n }) {
|
|
6157
|
+
let r = t.useState(e), [i] = r, a = t.useRef(i), o = wu(n);
|
|
6144
6158
|
return t.useEffect(() => {
|
|
6145
6159
|
a.current !== i && (o(i), a.current = i);
|
|
6146
6160
|
}, [
|
|
@@ -6149,11 +6163,11 @@ function wu({ defaultProp: e, onChange: n }) {
|
|
|
6149
6163
|
o
|
|
6150
6164
|
]), r;
|
|
6151
6165
|
}
|
|
6152
|
-
function
|
|
6153
|
-
let [i, a] =
|
|
6166
|
+
function Eu({ prop: e, defaultProp: n, onChange: r = () => {} }) {
|
|
6167
|
+
let [i, a] = Tu({
|
|
6154
6168
|
defaultProp: n,
|
|
6155
6169
|
onChange: r
|
|
6156
|
-
}), o = e !== void 0, s = o ? e : i, c =
|
|
6170
|
+
}), o = e !== void 0, s = o ? e : i, c = wu(r);
|
|
6157
6171
|
return [s, t.useCallback((t) => {
|
|
6158
6172
|
if (o) {
|
|
6159
6173
|
let n = typeof t == "function" ? t(e) : t;
|
|
@@ -6166,8 +6180,8 @@ function Tu({ prop: e, defaultProp: n, onChange: r = () => {} }) {
|
|
|
6166
6180
|
c
|
|
6167
6181
|
])];
|
|
6168
6182
|
}
|
|
6169
|
-
function
|
|
6170
|
-
let [d, f] =
|
|
6183
|
+
function Du({ activeSnapPointProp: e, setActiveSnapPointProp: n, snapPoints: r, drawerRef: i, overlayRef: a, fadeFromIndex: o, onSnapPointChange: s, direction: c = "bottom", container: l, snapToSequentialPoint: u }) {
|
|
6184
|
+
let [d, f] = Eu({
|
|
6171
6185
|
prop: e,
|
|
6172
6186
|
defaultProp: r?.[0],
|
|
6173
6187
|
onChange: n
|
|
@@ -6252,7 +6266,7 @@ function Eu({ activeSnapPointProp: e, setActiveSnapPointProp: n, snapPoints: r,
|
|
|
6252
6266
|
return;
|
|
6253
6267
|
}
|
|
6254
6268
|
let p = v?.reduce((e, t) => typeof e != "number" || typeof t != "number" ? e : Math.abs(t - s) < Math.abs(e - s) ? t : e), m = Q(c) ? window.innerHeight : window.innerWidth;
|
|
6255
|
-
if (n >
|
|
6269
|
+
if (n > _u && Math.abs(e) < m * .4) {
|
|
6256
6270
|
let e = f ? 1 : -1;
|
|
6257
6271
|
if (e > 0 && h && r) {
|
|
6258
6272
|
b(v[r.length - 1]);
|
|
@@ -6290,24 +6304,24 @@ function Eu({ activeSnapPointProp: e, setActiveSnapPointProp: n, snapPoints: r,
|
|
|
6290
6304
|
snapPointsOffset: v
|
|
6291
6305
|
};
|
|
6292
6306
|
}
|
|
6293
|
-
function
|
|
6294
|
-
let { direction: e, isOpen: n, shouldScaleBackground: r, setBackgroundColorOnScale: i, noBodyStyles: a } =
|
|
6307
|
+
function Ou() {
|
|
6308
|
+
let { direction: e, isOpen: n, shouldScaleBackground: r, setBackgroundColorOnScale: i, noBodyStyles: a } = Bl(), o = t.useRef(null), s = l(() => document.body.style.backgroundColor, []);
|
|
6295
6309
|
function c() {
|
|
6296
|
-
return (window.innerWidth -
|
|
6310
|
+
return (window.innerWidth - Su) / window.innerWidth;
|
|
6297
6311
|
}
|
|
6298
6312
|
t.useEffect(() => {
|
|
6299
6313
|
if (n && r) {
|
|
6300
6314
|
o.current && clearTimeout(o.current);
|
|
6301
6315
|
let t = document.querySelector("[data-vaul-drawer-wrapper]") || document.querySelector("[vaul-drawer-wrapper]");
|
|
6302
6316
|
if (!t) return;
|
|
6303
|
-
i && !a &&
|
|
6317
|
+
i && !a && gu(document.body, { background: "black" }), gu(t, {
|
|
6304
6318
|
transformOrigin: Q(e) ? "top" : "left",
|
|
6305
6319
|
transitionProperty: "transform, border-radius",
|
|
6306
6320
|
transitionDuration: `${$.DURATION}s`,
|
|
6307
6321
|
transitionTimingFunction: `cubic-bezier(${$.EASE.join(",")})`
|
|
6308
6322
|
});
|
|
6309
|
-
let n =
|
|
6310
|
-
borderRadius: `${
|
|
6323
|
+
let n = gu(t, {
|
|
6324
|
+
borderRadius: `${bu}px`,
|
|
6311
6325
|
overflow: "hidden",
|
|
6312
6326
|
...Q(e) ? { transform: `scale(${c()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)` } : { transform: `scale(${c()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)` }
|
|
6313
6327
|
});
|
|
@@ -6323,11 +6337,11 @@ function Du() {
|
|
|
6323
6337
|
s
|
|
6324
6338
|
]);
|
|
6325
6339
|
}
|
|
6326
|
-
var
|
|
6327
|
-
function
|
|
6340
|
+
var ku = null;
|
|
6341
|
+
function Au({ isOpen: e, modal: n, nested: r, hasBeenOpened: i, preventScrollRestoration: a, noBodyStyles: o }) {
|
|
6328
6342
|
let [s, c] = t.useState(() => typeof window < "u" ? window.location.href : ""), l = t.useRef(0), u = t.useCallback(() => {
|
|
6329
|
-
if (
|
|
6330
|
-
|
|
6343
|
+
if (Wl() && ku === null && e && !o) {
|
|
6344
|
+
ku = {
|
|
6331
6345
|
position: document.body.style.position,
|
|
6332
6346
|
top: document.body.style.top,
|
|
6333
6347
|
left: document.body.style.left,
|
|
@@ -6346,15 +6360,15 @@ function ku({ isOpen: e, modal: n, nested: r, hasBeenOpened: i, preventScrollRes
|
|
|
6346
6360
|
}), 300);
|
|
6347
6361
|
}
|
|
6348
6362
|
}, [e]), d = t.useCallback(() => {
|
|
6349
|
-
if (
|
|
6363
|
+
if (Wl() && ku !== null && !o) {
|
|
6350
6364
|
let e = -parseInt(document.body.style.top, 10), t = -parseInt(document.body.style.left, 10);
|
|
6351
|
-
Object.assign(document.body.style,
|
|
6365
|
+
Object.assign(document.body.style, ku), window.requestAnimationFrame(() => {
|
|
6352
6366
|
if (a && s !== window.location.href) {
|
|
6353
6367
|
c(window.location.href);
|
|
6354
6368
|
return;
|
|
6355
6369
|
}
|
|
6356
6370
|
window.scrollTo(t, e);
|
|
6357
|
-
}),
|
|
6371
|
+
}), ku = null;
|
|
6358
6372
|
}
|
|
6359
6373
|
}, [s]);
|
|
6360
6374
|
return t.useEffect(() => {
|
|
@@ -6382,8 +6396,8 @@ function ku({ isOpen: e, modal: n, nested: r, hasBeenOpened: i, preventScrollRes
|
|
|
6382
6396
|
d
|
|
6383
6397
|
]), { restorePositionSetting: d };
|
|
6384
6398
|
}
|
|
6385
|
-
function
|
|
6386
|
-
let [A = !1, j] =
|
|
6399
|
+
function ju({ open: e, onOpenChange: n, children: r, onDrag: i, onRelease: a, snapPoints: o, shouldScaleBackground: s = !1, setBackgroundColorOnScale: c = !0, closeThreshold: l = vu, scrollLockTimeout: u = yu, dismissible: d = !0, handleOnly: f = !1, fadeFromIndex: p = o && o.length - 1, activeSnapPoint: m, setActiveSnapPoint: h, fixed: g, modal: _ = !0, onClose: v, nested: y, noBodyStyles: b = !1, direction: x = "bottom", defaultOpen: S = !1, disablePreventScroll: C = !0, snapToSequentialPoint: w = !1, preventScrollRestoration: T = !1, repositionInputs: E = !0, onAnimationEnd: D, container: O, autoFocus: k = !1 }) {
|
|
6400
|
+
let [A = !1, j] = Eu({
|
|
6387
6401
|
defaultProp: S,
|
|
6388
6402
|
prop: e,
|
|
6389
6403
|
onChange: (e) => {
|
|
@@ -6393,22 +6407,22 @@ function Au({ open: e, onOpenChange: n, children: r, onDrag: i, onRelease: a, sn
|
|
|
6393
6407
|
document.body.style.pointerEvents = "auto";
|
|
6394
6408
|
}), e || (document.body.style.pointerEvents = "auto");
|
|
6395
6409
|
}
|
|
6396
|
-
}), [M, N] = t.useState(!1), [P, F] = t.useState(!1), [I, ee] = t.useState(!1),
|
|
6410
|
+
}), [M, N] = t.useState(!1), [P, F] = t.useState(!1), [I, ee] = t.useState(!1), L = t.useRef(null), te = t.useRef(null), ne = t.useRef(null), R = t.useRef(null), z = t.useRef(null), re = t.useRef(!1), ie = t.useRef(null), B = t.useRef(0), ae = t.useRef(!1), oe = t.useRef(!S), se = t.useRef(0), V = t.useRef(null), ce = t.useRef(V.current?.getBoundingClientRect().height || 0), H = t.useRef(V.current?.getBoundingClientRect().width || 0), le = t.useRef(0), { activeSnapPoint: ue, activeSnapPointIndex: de, setActiveSnapPoint: fe, onRelease: pe, snapPointsOffset: me, onDrag: he, shouldFade: ge, getPercentageDragged: _e } = Du({
|
|
6397
6411
|
snapPoints: o,
|
|
6398
6412
|
activeSnapPointProp: m,
|
|
6399
6413
|
setActiveSnapPointProp: h,
|
|
6400
6414
|
drawerRef: V,
|
|
6401
6415
|
fadeFromIndex: p,
|
|
6402
|
-
overlayRef:
|
|
6416
|
+
overlayRef: L,
|
|
6403
6417
|
onSnapPointChange: t.useCallback((e) => {
|
|
6404
|
-
o && e === me.length - 1 && (
|
|
6418
|
+
o && e === me.length - 1 && (te.current = /* @__PURE__ */ new Date());
|
|
6405
6419
|
}, []),
|
|
6406
6420
|
direction: x,
|
|
6407
6421
|
container: O,
|
|
6408
6422
|
snapToSequentialPoint: w
|
|
6409
6423
|
});
|
|
6410
|
-
|
|
6411
|
-
let { restorePositionSetting: U } =
|
|
6424
|
+
ru({ isDisabled: !A || P || !_ || I || !M || !E || !C });
|
|
6425
|
+
let { restorePositionSetting: U } = Au({
|
|
6412
6426
|
isOpen: A,
|
|
6413
6427
|
modal: _,
|
|
6414
6428
|
nested: y ?? !1,
|
|
@@ -6417,22 +6431,22 @@ function Au({ open: e, onOpenChange: n, children: r, onDrag: i, onRelease: a, sn
|
|
|
6417
6431
|
noBodyStyles: b
|
|
6418
6432
|
});
|
|
6419
6433
|
function ve() {
|
|
6420
|
-
return (window.innerWidth -
|
|
6434
|
+
return (window.innerWidth - Su) / window.innerWidth;
|
|
6421
6435
|
}
|
|
6422
6436
|
function ye(e) {
|
|
6423
|
-
!d && !o || V.current && !V.current.contains(e.target) || (ce.current = V.current?.getBoundingClientRect().height || 0, H.current = V.current?.getBoundingClientRect().width || 0, F(!0),
|
|
6437
|
+
!d && !o || V.current && !V.current.contains(e.target) || (ce.current = V.current?.getBoundingClientRect().height || 0, H.current = V.current?.getBoundingClientRect().width || 0, F(!0), ne.current = /* @__PURE__ */ new Date(), Kl() && window.addEventListener("touchend", () => re.current = !1, { once: !0 }), e.target.setPointerCapture(e.pointerId), B.current = Q(x) ? e.pageY : e.pageX);
|
|
6424
6438
|
}
|
|
6425
6439
|
function be(e, t) {
|
|
6426
|
-
let n = e, r = window.getSelection()?.toString(), i = V.current ?
|
|
6440
|
+
let n = e, r = window.getSelection()?.toString(), i = V.current ? mu(V.current, x) : null, a = /* @__PURE__ */ new Date();
|
|
6427
6441
|
if (n.tagName === "SELECT" || n.hasAttribute("data-vaul-no-drag") || n.closest("[data-vaul-no-drag]")) return !1;
|
|
6428
6442
|
if (x === "right" || x === "left") return !0;
|
|
6429
|
-
if (
|
|
6443
|
+
if (te.current && a.getTime() - te.current.getTime() < 500) return !1;
|
|
6430
6444
|
if (i !== null && (x === "bottom" ? i > 0 : i < 0)) return !0;
|
|
6431
6445
|
if (r && r.length > 0) return !1;
|
|
6432
|
-
if (
|
|
6446
|
+
if (z.current && a.getTime() - z.current.getTime() < u && i === 0 || t) return z.current = a, !1;
|
|
6433
6447
|
for (; n;) {
|
|
6434
6448
|
if (n.scrollHeight > n.clientHeight) {
|
|
6435
|
-
if (n.scrollTop !== 0) return
|
|
6449
|
+
if (n.scrollTop !== 0) return z.current = /* @__PURE__ */ new Date(), !1;
|
|
6436
6450
|
if (n.getAttribute("role") === "dialog") return !0;
|
|
6437
6451
|
}
|
|
6438
6452
|
n = n.parentNode;
|
|
@@ -6444,17 +6458,17 @@ function Au({ open: e, onOpenChange: n, children: r, onDrag: i, onRelease: a, sn
|
|
|
6444
6458
|
let t = x === "bottom" || x === "right" ? 1 : -1, n = (B.current - (Q(x) ? e.pageY : e.pageX)) * t, r = n > 0, a = o && !d && !r;
|
|
6445
6459
|
if (a && de === 0) return;
|
|
6446
6460
|
let c = Math.abs(n), l = document.querySelector("[data-vaul-drawer-wrapper]"), u = c / (x === "bottom" || x === "top" ? ce.current : H.current), f = _e(c, r);
|
|
6447
|
-
if (f !== null && (u = f), a && u >= 1 || !
|
|
6448
|
-
if (V.current.classList.add(
|
|
6449
|
-
let e =
|
|
6461
|
+
if (f !== null && (u = f), a && u >= 1 || !re.current && !be(e.target, r)) return;
|
|
6462
|
+
if (V.current.classList.add(Cu), re.current = !0, Z(V.current, { transition: "none" }), Z(L.current, { transition: "none" }), o && he({ draggedDistance: n }), r && !o) {
|
|
6463
|
+
let e = hu(n), r = Math.min(e * -1, 0) * t;
|
|
6450
6464
|
Z(V.current, { transform: Q(x) ? `translate3d(0, ${r}px, 0)` : `translate3d(${r}px, 0, 0)` });
|
|
6451
6465
|
return;
|
|
6452
6466
|
}
|
|
6453
6467
|
let m = 1 - u;
|
|
6454
|
-
if ((ge || p && de === p - 1) && (i?.(e, u), Z(
|
|
6468
|
+
if ((ge || p && de === p - 1) && (i?.(e, u), Z(L.current, {
|
|
6455
6469
|
opacity: `${m}`,
|
|
6456
6470
|
transition: "none"
|
|
6457
|
-
}, !0)), l &&
|
|
6471
|
+
}, !0)), l && L.current && s) {
|
|
6458
6472
|
let e = Math.min(ve() + u * (1 - ve()), 1), t = 8 - u * 8, n = Math.max(0, 14 - u * 14);
|
|
6459
6473
|
Z(l, {
|
|
6460
6474
|
borderRadius: `${t}px`,
|
|
@@ -6477,7 +6491,7 @@ function Au({ open: e, onOpenChange: n, children: r, onDrag: i, onRelease: a, sn
|
|
|
6477
6491
|
function t() {
|
|
6478
6492
|
if (!V.current || !E) return;
|
|
6479
6493
|
let e = document.activeElement;
|
|
6480
|
-
if (
|
|
6494
|
+
if (cu(e) || ae.current) {
|
|
6481
6495
|
let e = window.visualViewport?.height || 0, t = window.innerHeight, n = t - e, r = V.current.getBoundingClientRect().height || 0, i = r > t * .8;
|
|
6482
6496
|
le.current ||= r;
|
|
6483
6497
|
let a = V.current.getBoundingClientRect().top;
|
|
@@ -6487,8 +6501,8 @@ function Au({ open: e, onOpenChange: n, children: r, onDrag: i, onRelease: a, sn
|
|
|
6487
6501
|
}
|
|
6488
6502
|
if (se.current = n, r > e || ae.current) {
|
|
6489
6503
|
let t = V.current.getBoundingClientRect().height, r = t;
|
|
6490
|
-
t > e && (r = e - (i ? a :
|
|
6491
|
-
} else
|
|
6504
|
+
t > e && (r = e - (i ? a : Su)), g ? V.current.style.height = `${t - Math.max(n, 0)}px` : V.current.style.height = `${Math.max(r, e - a)}px`;
|
|
6505
|
+
} else Vl() || (V.current.style.height = `${le.current}px`);
|
|
6492
6506
|
o && o.length > 0 && !ae.current ? V.current.style.bottom = "0px" : V.current.style.bottom = `${Math.max(n, 0)}px`;
|
|
6493
6507
|
}
|
|
6494
6508
|
}
|
|
@@ -6505,15 +6519,15 @@ function Au({ open: e, onOpenChange: n, children: r, onDrag: i, onRelease: a, sn
|
|
|
6505
6519
|
}
|
|
6506
6520
|
function Ce() {
|
|
6507
6521
|
if (!V.current) return;
|
|
6508
|
-
let e = document.querySelector("[data-vaul-drawer-wrapper]"), t =
|
|
6522
|
+
let e = document.querySelector("[data-vaul-drawer-wrapper]"), t = mu(V.current, x);
|
|
6509
6523
|
Z(V.current, {
|
|
6510
6524
|
transform: "translate3d(0, 0, 0)",
|
|
6511
6525
|
transition: `transform ${$.DURATION}s cubic-bezier(${$.EASE.join(",")})`
|
|
6512
|
-
}), Z(
|
|
6526
|
+
}), Z(L.current, {
|
|
6513
6527
|
transition: `opacity ${$.DURATION}s cubic-bezier(${$.EASE.join(",")})`,
|
|
6514
6528
|
opacity: "1"
|
|
6515
6529
|
}), s && t && t > 0 && A && Z(e, {
|
|
6516
|
-
borderRadius: `${
|
|
6530
|
+
borderRadius: `${bu}px`,
|
|
6517
6531
|
overflow: "hidden",
|
|
6518
6532
|
...Q(x) ? {
|
|
6519
6533
|
transform: `scale(${ve()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,
|
|
@@ -6528,14 +6542,14 @@ function Au({ open: e, onOpenChange: n, children: r, onDrag: i, onRelease: a, sn
|
|
|
6528
6542
|
}, !0);
|
|
6529
6543
|
}
|
|
6530
6544
|
function we() {
|
|
6531
|
-
!P || !V.current || (V.current.classList.remove(
|
|
6545
|
+
!P || !V.current || (V.current.classList.remove(Cu), re.current = !1, F(!1), R.current = /* @__PURE__ */ new Date());
|
|
6532
6546
|
}
|
|
6533
6547
|
function Te(e) {
|
|
6534
6548
|
if (!P || !V.current) return;
|
|
6535
|
-
V.current.classList.remove(
|
|
6536
|
-
let t =
|
|
6537
|
-
if (!e || !be(e.target, !1) || !t || Number.isNaN(t) ||
|
|
6538
|
-
let n =
|
|
6549
|
+
V.current.classList.remove(Cu), re.current = !1, F(!1), R.current = /* @__PURE__ */ new Date();
|
|
6550
|
+
let t = mu(V.current, x);
|
|
6551
|
+
if (!e || !be(e.target, !1) || !t || Number.isNaN(t) || ne.current === null) return;
|
|
6552
|
+
let n = R.current.getTime() - ne.current.getTime(), r = B.current - (Q(x) ? e.pageY : e.pageX), i = Math.abs(r) / n;
|
|
6539
6553
|
if (i > .05 && (ee(!0), setTimeout(() => {
|
|
6540
6554
|
ee(!1);
|
|
6541
6555
|
}, 200)), o) {
|
|
@@ -6551,7 +6565,7 @@ function Au({ open: e, onOpenChange: n, children: r, onDrag: i, onRelease: a, sn
|
|
|
6551
6565
|
Ce(), a?.(e, !0);
|
|
6552
6566
|
return;
|
|
6553
6567
|
}
|
|
6554
|
-
if (i >
|
|
6568
|
+
if (i > _u) {
|
|
6555
6569
|
Se(), a?.(e, !1);
|
|
6556
6570
|
return;
|
|
6557
6571
|
}
|
|
@@ -6562,16 +6576,16 @@ function Au({ open: e, onOpenChange: n, children: r, onDrag: i, onRelease: a, sn
|
|
|
6562
6576
|
}
|
|
6563
6577
|
a?.(e, !0), Ce();
|
|
6564
6578
|
}
|
|
6565
|
-
t.useEffect(() => (A && (Z(document.documentElement, { scrollBehavior: "auto" }),
|
|
6566
|
-
|
|
6579
|
+
t.useEffect(() => (A && (Z(document.documentElement, { scrollBehavior: "auto" }), te.current = /* @__PURE__ */ new Date()), () => {
|
|
6580
|
+
pu(document.documentElement, "scrollBehavior");
|
|
6567
6581
|
}), [A]);
|
|
6568
6582
|
function Ee(e) {
|
|
6569
|
-
let t = e ? (window.innerWidth -
|
|
6583
|
+
let t = e ? (window.innerWidth - xu) / window.innerWidth : 1, n = e ? -xu : 0;
|
|
6570
6584
|
ie.current && window.clearTimeout(ie.current), Z(V.current, {
|
|
6571
6585
|
transition: `transform ${$.DURATION}s cubic-bezier(${$.EASE.join(",")})`,
|
|
6572
6586
|
transform: Q(x) ? `scale(${t}) translate3d(0, ${n}px, 0)` : `scale(${t}) translate3d(${n}px, 0, 0)`
|
|
6573
6587
|
}), !e && V.current && (ie.current = setTimeout(() => {
|
|
6574
|
-
let e =
|
|
6588
|
+
let e = mu(V.current, x);
|
|
6575
6589
|
Z(V.current, {
|
|
6576
6590
|
transition: "none",
|
|
6577
6591
|
transform: Q(x) ? `translate3d(0, ${e}px, 0)` : `translate3d(${e}px, 0, 0)`
|
|
@@ -6580,14 +6594,14 @@ function Au({ open: e, onOpenChange: n, children: r, onDrag: i, onRelease: a, sn
|
|
|
6580
6594
|
}
|
|
6581
6595
|
function De(e, t) {
|
|
6582
6596
|
if (t < 0) return;
|
|
6583
|
-
let n = (window.innerWidth -
|
|
6597
|
+
let n = (window.innerWidth - xu) / window.innerWidth, r = n + t * (1 - n), i = -xu + t * xu;
|
|
6584
6598
|
Z(V.current, {
|
|
6585
6599
|
transform: Q(x) ? `scale(${r}) translate3d(0, ${i}px, 0)` : `scale(${r}) translate3d(${i}px, 0, 0)`,
|
|
6586
6600
|
transition: "none"
|
|
6587
6601
|
});
|
|
6588
6602
|
}
|
|
6589
6603
|
function W(e, t) {
|
|
6590
|
-
let n = Q(x) ? window.innerHeight : window.innerWidth, r = t ? (n -
|
|
6604
|
+
let n = Q(x) ? window.innerHeight : window.innerWidth, r = t ? (n - xu) / n : 1, i = t ? -xu : 0;
|
|
6591
6605
|
t && Z(V.current, {
|
|
6592
6606
|
transition: `transform ${$.DURATION}s cubic-bezier(${$.EASE.join(",")})`,
|
|
6593
6607
|
transform: Q(x) ? `scale(${r}) translate3d(0, ${i}px, 0)` : `scale(${r}) translate3d(${i}px, 0, 0)`
|
|
@@ -6597,18 +6611,18 @@ function Au({ open: e, onOpenChange: n, children: r, onDrag: i, onRelease: a, sn
|
|
|
6597
6611
|
_ || window.requestAnimationFrame(() => {
|
|
6598
6612
|
document.body.style.pointerEvents = "auto";
|
|
6599
6613
|
});
|
|
6600
|
-
}, [_]), /* @__PURE__ */ t.createElement(
|
|
6614
|
+
}, [_]), /* @__PURE__ */ t.createElement(Al, {
|
|
6601
6615
|
defaultOpen: S,
|
|
6602
6616
|
onOpenChange: (e) => {
|
|
6603
6617
|
!d && !e || (e ? N(!0) : Se(!0), j(e));
|
|
6604
6618
|
},
|
|
6605
6619
|
open: A
|
|
6606
|
-
}, /* @__PURE__ */ t.createElement(
|
|
6620
|
+
}, /* @__PURE__ */ t.createElement(zl.Provider, { value: {
|
|
6607
6621
|
activeSnapPoint: ue,
|
|
6608
6622
|
snapPoints: o,
|
|
6609
6623
|
setActiveSnapPoint: fe,
|
|
6610
6624
|
drawerRef: V,
|
|
6611
|
-
overlayRef:
|
|
6625
|
+
overlayRef: L,
|
|
6612
6626
|
onOpenChange: n,
|
|
6613
6627
|
onPress: ye,
|
|
6614
6628
|
onRelease: Te,
|
|
@@ -6635,11 +6649,11 @@ function Au({ open: e, onOpenChange: n, children: r, onDrag: i, onRelease: a, sn
|
|
|
6635
6649
|
autoFocus: k
|
|
6636
6650
|
} }, r));
|
|
6637
6651
|
}
|
|
6638
|
-
var
|
|
6639
|
-
let { overlayRef: r, snapPoints: i, onRelease: a, shouldFade: o, isOpen: s, modal: c, shouldAnimate: l } =
|
|
6652
|
+
var Mu = /* @__PURE__ */ t.forwardRef(function({ ...e }, n) {
|
|
6653
|
+
let { overlayRef: r, snapPoints: i, onRelease: a, shouldFade: o, isOpen: s, modal: c, shouldAnimate: l } = Bl(), u = du(n, r), d = i && i.length > 0;
|
|
6640
6654
|
if (!c) return null;
|
|
6641
6655
|
let f = t.useCallback((e) => a(e), [a]);
|
|
6642
|
-
return /* @__PURE__ */ t.createElement(
|
|
6656
|
+
return /* @__PURE__ */ t.createElement(Nl, {
|
|
6643
6657
|
onMouseUp: f,
|
|
6644
6658
|
ref: u,
|
|
6645
6659
|
"data-vaul-overlay": "",
|
|
@@ -6649,10 +6663,10 @@ var ju = /* @__PURE__ */ t.forwardRef(function({ ...e }, n) {
|
|
|
6649
6663
|
...e
|
|
6650
6664
|
});
|
|
6651
6665
|
});
|
|
6652
|
-
|
|
6653
|
-
var
|
|
6654
|
-
let { drawerRef: o, onPress: s, onRelease: c, onDrag: l, keyboardIsOpen: u, snapPointsOffset: d, activeSnapPointIndex: f, modal: p, isOpen: m, direction: h, snapPoints: g, container: _, handleOnly: v, shouldAnimate: y, autoFocus: b } =
|
|
6655
|
-
|
|
6666
|
+
Mu.displayName = "Drawer.Overlay";
|
|
6667
|
+
var Nu = /* @__PURE__ */ t.forwardRef(function({ onPointerDownOutside: e, style: n, onOpenAutoFocus: r, ...i }, a) {
|
|
6668
|
+
let { drawerRef: o, onPress: s, onRelease: c, onDrag: l, keyboardIsOpen: u, snapPointsOffset: d, activeSnapPointIndex: f, modal: p, isOpen: m, direction: h, snapPoints: g, container: _, handleOnly: v, shouldAnimate: y, autoFocus: b } = Bl(), [x, S] = t.useState(!1), C = du(a, o), w = t.useRef(null), T = t.useRef(null), E = t.useRef(!1), D = g && g.length > 0;
|
|
6669
|
+
Ou();
|
|
6656
6670
|
let O = (e, t, n = 0) => {
|
|
6657
6671
|
if (E.current) return !0;
|
|
6658
6672
|
let r = Math.abs(e.y), i = Math.abs(e.x), a = i > r, o = ["bottom", "right"].includes(t) ? 1 : -1;
|
|
@@ -6669,7 +6683,7 @@ var Mu = /* @__PURE__ */ t.forwardRef(function({ onPointerDownOutside: e, style:
|
|
|
6669
6683
|
function k(e) {
|
|
6670
6684
|
w.current = null, E.current = !1, c(e);
|
|
6671
6685
|
}
|
|
6672
|
-
return /* @__PURE__ */ t.createElement(
|
|
6686
|
+
return /* @__PURE__ */ t.createElement(Pl, {
|
|
6673
6687
|
"data-vaul-drawer-direction": h,
|
|
6674
6688
|
"data-vaul-drawer": "",
|
|
6675
6689
|
"data-vaul-delayed-snap-points": x ? "true" : "false",
|
|
@@ -6723,9 +6737,9 @@ var Mu = /* @__PURE__ */ t.forwardRef(function({ onPointerDownOutside: e, style:
|
|
|
6723
6737
|
}
|
|
6724
6738
|
});
|
|
6725
6739
|
});
|
|
6726
|
-
|
|
6727
|
-
var
|
|
6728
|
-
let { closeDrawer: a, isDragging: o, snapPoints: s, activeSnapPoint: c, setActiveSnapPoint: l, dismissible: u, handleOnly: d, isOpen: f, onPress: p, onDrag: m } =
|
|
6740
|
+
Nu.displayName = "Drawer.Content";
|
|
6741
|
+
var Pu = 250, Fu = 120, Iu = /* @__PURE__ */ t.forwardRef(function({ preventCycle: e = !1, children: n, ...r }, i) {
|
|
6742
|
+
let { closeDrawer: a, isDragging: o, snapPoints: s, activeSnapPoint: c, setActiveSnapPoint: l, dismissible: u, handleOnly: d, isOpen: f, onPress: p, onDrag: m } = Bl(), h = t.useRef(null), g = t.useRef(!1);
|
|
6729
6743
|
function _() {
|
|
6730
6744
|
if (g.current) {
|
|
6731
6745
|
b();
|
|
@@ -6733,7 +6747,7 @@ var Nu = 250, Pu = 120, Fu = /* @__PURE__ */ t.forwardRef(function({ preventCycl
|
|
|
6733
6747
|
}
|
|
6734
6748
|
window.setTimeout(() => {
|
|
6735
6749
|
v();
|
|
6736
|
-
},
|
|
6750
|
+
}, Fu);
|
|
6737
6751
|
}
|
|
6738
6752
|
function v() {
|
|
6739
6753
|
if (o || e || g.current) {
|
|
@@ -6756,7 +6770,7 @@ var Nu = 250, Pu = 120, Fu = /* @__PURE__ */ t.forwardRef(function({ preventCycl
|
|
|
6756
6770
|
function y() {
|
|
6757
6771
|
h.current = window.setTimeout(() => {
|
|
6758
6772
|
g.current = !0;
|
|
6759
|
-
},
|
|
6773
|
+
}, Pu);
|
|
6760
6774
|
}
|
|
6761
6775
|
function b() {
|
|
6762
6776
|
h.current && window.clearTimeout(h.current), g.current = !1;
|
|
@@ -6780,11 +6794,11 @@ var Nu = 250, Pu = 120, Fu = /* @__PURE__ */ t.forwardRef(function({ preventCycl
|
|
|
6780
6794
|
"aria-hidden": "true"
|
|
6781
6795
|
}, n));
|
|
6782
6796
|
});
|
|
6783
|
-
|
|
6784
|
-
function
|
|
6785
|
-
let { onNestedDrag: a, onNestedOpenChange: o, onNestedRelease: s } =
|
|
6797
|
+
Iu.displayName = "Drawer.Handle";
|
|
6798
|
+
function Lu({ onDrag: e, onOpenChange: n, open: r, ...i }) {
|
|
6799
|
+
let { onNestedDrag: a, onNestedOpenChange: o, onNestedRelease: s } = Bl();
|
|
6786
6800
|
if (!a) throw Error("Drawer.NestedRoot must be placed in another drawer");
|
|
6787
|
-
return /* @__PURE__ */ t.createElement(
|
|
6801
|
+
return /* @__PURE__ */ t.createElement(ju, {
|
|
6788
6802
|
nested: !0,
|
|
6789
6803
|
open: r,
|
|
6790
6804
|
onClose: () => {
|
|
@@ -6800,37 +6814,37 @@ function Iu({ onDrag: e, onOpenChange: n, open: r, ...i }) {
|
|
|
6800
6814
|
...i
|
|
6801
6815
|
});
|
|
6802
6816
|
}
|
|
6803
|
-
function
|
|
6804
|
-
let n =
|
|
6805
|
-
return /* @__PURE__ */ t.createElement(
|
|
6817
|
+
function Ru(e) {
|
|
6818
|
+
let n = Bl(), { container: r = n.container, ...i } = e;
|
|
6819
|
+
return /* @__PURE__ */ t.createElement(Ml, {
|
|
6806
6820
|
container: r,
|
|
6807
6821
|
...i
|
|
6808
6822
|
});
|
|
6809
6823
|
}
|
|
6810
|
-
var
|
|
6811
|
-
Root:
|
|
6812
|
-
NestedRoot:
|
|
6813
|
-
Content:
|
|
6814
|
-
Overlay:
|
|
6815
|
-
Trigger:
|
|
6816
|
-
Portal:
|
|
6817
|
-
Handle:
|
|
6818
|
-
Close:
|
|
6819
|
-
Title:
|
|
6820
|
-
Description:
|
|
6824
|
+
var zu = {
|
|
6825
|
+
Root: ju,
|
|
6826
|
+
NestedRoot: Lu,
|
|
6827
|
+
Content: Nu,
|
|
6828
|
+
Overlay: Mu,
|
|
6829
|
+
Trigger: jl,
|
|
6830
|
+
Portal: Ru,
|
|
6831
|
+
Handle: Iu,
|
|
6832
|
+
Close: Ll,
|
|
6833
|
+
Title: Fl,
|
|
6834
|
+
Description: Il
|
|
6821
6835
|
};
|
|
6822
6836
|
//#endregion
|
|
6823
6837
|
//#region src/components/Drawer/Drawer.tsx
|
|
6824
|
-
function
|
|
6825
|
-
return /* @__PURE__ */ m(
|
|
6838
|
+
function Bu({ trigger: e, title: t, children: n, className: r }) {
|
|
6839
|
+
return /* @__PURE__ */ m(zu.Root, {
|
|
6826
6840
|
direction: "right",
|
|
6827
|
-
children: [/* @__PURE__ */ p(
|
|
6841
|
+
children: [/* @__PURE__ */ p(zu.Trigger, {
|
|
6828
6842
|
asChild: !0,
|
|
6829
6843
|
children: e
|
|
6830
|
-
}), /* @__PURE__ */ m(
|
|
6844
|
+
}), /* @__PURE__ */ m(zu.Portal, { children: [/* @__PURE__ */ p(zu.Overlay, { className: "fixed inset-0 bg-overlay backdrop-blur-sm z-40" }), /* @__PURE__ */ m(zu.Content, {
|
|
6831
6845
|
className: K("fixed right-0 top-0 bottom-0 z-50 flex flex-col bg-card w-[464px] pt-16 pb-10 px-8 overflow-y-auto overflow-x-hidden", r),
|
|
6832
6846
|
children: [
|
|
6833
|
-
/* @__PURE__ */ p(
|
|
6847
|
+
/* @__PURE__ */ p(zu.Title, {
|
|
6834
6848
|
className: "font-semibold text-lg text-fg font-sans mb-5",
|
|
6835
6849
|
children: t
|
|
6836
6850
|
}),
|
|
@@ -6838,7 +6852,7 @@ function zu({ trigger: e, title: t, children: n, className: r }) {
|
|
|
6838
6852
|
className: "font-sans text-base text-fg leading-5 flex-1",
|
|
6839
6853
|
children: n
|
|
6840
6854
|
}),
|
|
6841
|
-
/* @__PURE__ */ p(
|
|
6855
|
+
/* @__PURE__ */ p(zu.Close, {
|
|
6842
6856
|
"aria-label": "Закрыть",
|
|
6843
6857
|
className: "absolute top-4 right-4 w-10 h-10 flex items-center justify-center rounded-full bg-accent hover:bg-accent-hover transition-colors text-white",
|
|
6844
6858
|
children: /* @__PURE__ */ p("svg", {
|
|
@@ -6860,9 +6874,9 @@ function zu({ trigger: e, title: t, children: n, className: r }) {
|
|
|
6860
6874
|
//#endregion
|
|
6861
6875
|
//#region node_modules/@radix-ui/react-collection/node_modules/@radix-ui/react-slot/dist/index.mjs
|
|
6862
6876
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6863
|
-
function
|
|
6864
|
-
let n = /* @__PURE__ */
|
|
6865
|
-
let { children: i, ...a } = t, o = e.Children.toArray(i), s = o.find(
|
|
6877
|
+
function Vu(t) {
|
|
6878
|
+
let n = /* @__PURE__ */ Hu(t), r = e.forwardRef((t, r) => {
|
|
6879
|
+
let { children: i, ...a } = t, o = e.Children.toArray(i), s = o.find(Wu);
|
|
6866
6880
|
if (s) {
|
|
6867
6881
|
let t = s.props.children, i = o.map((n) => n === s ? e.Children.count(t) > 1 ? e.Children.only(null) : e.isValidElement(t) ? t.props.children : null : n);
|
|
6868
6882
|
return /* @__PURE__ */ p(n, {
|
|
@@ -6880,22 +6894,22 @@ function Bu(t) {
|
|
|
6880
6894
|
return r.displayName = `${t}.Slot`, r;
|
|
6881
6895
|
}
|
|
6882
6896
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6883
|
-
function
|
|
6897
|
+
function Hu(t) {
|
|
6884
6898
|
let n = e.forwardRef((t, n) => {
|
|
6885
6899
|
let { children: r, ...i } = t;
|
|
6886
6900
|
if (e.isValidElement(r)) {
|
|
6887
|
-
let t =
|
|
6901
|
+
let t = Ku(r), a = Gu(i, r.props);
|
|
6888
6902
|
return r.type !== e.Fragment && (a.ref = n ? it(n, t) : t), e.cloneElement(r, a);
|
|
6889
6903
|
}
|
|
6890
6904
|
return e.Children.count(r) > 1 ? e.Children.only(null) : null;
|
|
6891
6905
|
});
|
|
6892
6906
|
return n.displayName = `${t}.SlotClone`, n;
|
|
6893
6907
|
}
|
|
6894
|
-
var
|
|
6895
|
-
function
|
|
6896
|
-
return e.isValidElement(t) && typeof t.type == "function" && "__radixId" in t.type && t.type.__radixId ===
|
|
6908
|
+
var Uu = Symbol("radix.slottable");
|
|
6909
|
+
function Wu(t) {
|
|
6910
|
+
return e.isValidElement(t) && typeof t.type == "function" && "__radixId" in t.type && t.type.__radixId === Uu;
|
|
6897
6911
|
}
|
|
6898
|
-
function
|
|
6912
|
+
function Gu(e, t) {
|
|
6899
6913
|
let n = { ...t };
|
|
6900
6914
|
for (let r in t) {
|
|
6901
6915
|
let i = e[r], a = t[r];
|
|
@@ -6912,13 +6926,13 @@ function Wu(e, t) {
|
|
|
6912
6926
|
...n
|
|
6913
6927
|
};
|
|
6914
6928
|
}
|
|
6915
|
-
function
|
|
6929
|
+
function Ku(e) {
|
|
6916
6930
|
let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning;
|
|
6917
6931
|
return n ? e.ref : (t = Object.getOwnPropertyDescriptor(e, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
6918
6932
|
}
|
|
6919
6933
|
//#endregion
|
|
6920
6934
|
//#region node_modules/@radix-ui/react-collection/dist/index.mjs
|
|
6921
|
-
function
|
|
6935
|
+
function qu(e) {
|
|
6922
6936
|
let n = e + "CollectionProvider", [r, i] = Et(n), [a, o] = r(n, {
|
|
6923
6937
|
collectionRef: { current: null },
|
|
6924
6938
|
itemMap: /* @__PURE__ */ new Map()
|
|
@@ -6932,7 +6946,7 @@ function Ku(e) {
|
|
|
6932
6946
|
});
|
|
6933
6947
|
};
|
|
6934
6948
|
s.displayName = n;
|
|
6935
|
-
let c = e + "CollectionSlot", l = /* @__PURE__ */
|
|
6949
|
+
let c = e + "CollectionSlot", l = /* @__PURE__ */ Vu(c), u = t.forwardRef((e, t) => {
|
|
6936
6950
|
let { scope: n, children: r } = e;
|
|
6937
6951
|
return /* @__PURE__ */ p(l, {
|
|
6938
6952
|
ref: q(t, o(c, n).collectionRef),
|
|
@@ -6940,7 +6954,7 @@ function Ku(e) {
|
|
|
6940
6954
|
});
|
|
6941
6955
|
});
|
|
6942
6956
|
u.displayName = c;
|
|
6943
|
-
let d = e + "CollectionItemSlot", f = "data-radix-collection-item", m = /* @__PURE__ */
|
|
6957
|
+
let d = e + "CollectionItemSlot", f = "data-radix-collection-item", m = /* @__PURE__ */ Vu(d), h = t.forwardRef((e, n) => {
|
|
6944
6958
|
let { scope: r, children: i, ...a } = e, s = t.useRef(null), c = q(n, s), l = o(d, r);
|
|
6945
6959
|
return t.useEffect(() => (l.itemMap.set(s, {
|
|
6946
6960
|
ref: s,
|
|
@@ -6973,35 +6987,35 @@ function Ku(e) {
|
|
|
6973
6987
|
}
|
|
6974
6988
|
//#endregion
|
|
6975
6989
|
//#region node_modules/@radix-ui/react-collapsible/dist/index.mjs
|
|
6976
|
-
var
|
|
6990
|
+
var Ju = "Collapsible", [Yu, Xu] = Et(Ju), [Zu, Qu] = Yu(Ju), $u = e.forwardRef((t, n) => {
|
|
6977
6991
|
let { __scopeCollapsible: r, open: i, defaultOpen: a, disabled: o, onOpenChange: s, ...c } = t, [l, u] = _a({
|
|
6978
6992
|
prop: i,
|
|
6979
6993
|
defaultProp: a ?? !1,
|
|
6980
6994
|
onChange: s,
|
|
6981
|
-
caller:
|
|
6995
|
+
caller: Ju
|
|
6982
6996
|
});
|
|
6983
|
-
return /* @__PURE__ */ p(
|
|
6997
|
+
return /* @__PURE__ */ p(Zu, {
|
|
6984
6998
|
scope: r,
|
|
6985
6999
|
disabled: o,
|
|
6986
7000
|
contentId: vn(),
|
|
6987
7001
|
open: l,
|
|
6988
7002
|
onOpenToggle: e.useCallback(() => u((e) => !e), [u]),
|
|
6989
7003
|
children: /* @__PURE__ */ p(Y.div, {
|
|
6990
|
-
"data-state":
|
|
7004
|
+
"data-state": ad(l),
|
|
6991
7005
|
"data-disabled": o ? "" : void 0,
|
|
6992
7006
|
...c,
|
|
6993
7007
|
ref: n
|
|
6994
7008
|
})
|
|
6995
7009
|
});
|
|
6996
7010
|
});
|
|
6997
|
-
|
|
6998
|
-
var
|
|
6999
|
-
let { __scopeCollapsible: n, ...r } = e, i =
|
|
7011
|
+
$u.displayName = Ju;
|
|
7012
|
+
var ed = "CollapsibleTrigger", td = e.forwardRef((e, t) => {
|
|
7013
|
+
let { __scopeCollapsible: n, ...r } = e, i = Qu(ed, n);
|
|
7000
7014
|
return /* @__PURE__ */ p(Y.button, {
|
|
7001
7015
|
type: "button",
|
|
7002
7016
|
"aria-controls": i.contentId,
|
|
7003
7017
|
"aria-expanded": i.open || !1,
|
|
7004
|
-
"data-state":
|
|
7018
|
+
"data-state": ad(i.open),
|
|
7005
7019
|
"data-disabled": i.disabled ? "" : void 0,
|
|
7006
7020
|
disabled: i.disabled,
|
|
7007
7021
|
...r,
|
|
@@ -7009,21 +7023,21 @@ var $u = "CollapsibleTrigger", ed = e.forwardRef((e, t) => {
|
|
|
7009
7023
|
onClick: J(e.onClick, i.onOpenToggle)
|
|
7010
7024
|
});
|
|
7011
7025
|
});
|
|
7012
|
-
|
|
7013
|
-
var
|
|
7014
|
-
let { forceMount: n, ...r } = e, i =
|
|
7026
|
+
td.displayName = ed;
|
|
7027
|
+
var nd = "CollapsibleContent", rd = e.forwardRef((e, t) => {
|
|
7028
|
+
let { forceMount: n, ...r } = e, i = Qu(nd, e.__scopeCollapsible);
|
|
7015
7029
|
return /* @__PURE__ */ p(oa, {
|
|
7016
7030
|
present: n || i.open,
|
|
7017
|
-
children: ({ present: e }) => /* @__PURE__ */ p(
|
|
7031
|
+
children: ({ present: e }) => /* @__PURE__ */ p(id, {
|
|
7018
7032
|
...r,
|
|
7019
7033
|
ref: t,
|
|
7020
7034
|
present: e
|
|
7021
7035
|
})
|
|
7022
7036
|
});
|
|
7023
7037
|
});
|
|
7024
|
-
|
|
7025
|
-
var
|
|
7026
|
-
let { __scopeCollapsible: r, present: i, children: a, ...o } = t, s =
|
|
7038
|
+
rd.displayName = nd;
|
|
7039
|
+
var id = e.forwardRef((t, n) => {
|
|
7040
|
+
let { __scopeCollapsible: r, present: i, children: a, ...o } = t, s = Qu(nd, r), [c, l] = e.useState(i), u = e.useRef(null), d = q(n, u), f = e.useRef(0), m = f.current, h = e.useRef(0), g = h.current, _ = s.open || c, v = e.useRef(_), y = e.useRef(void 0);
|
|
7027
7041
|
return e.useEffect(() => {
|
|
7028
7042
|
let e = requestAnimationFrame(() => v.current = !1);
|
|
7029
7043
|
return () => cancelAnimationFrame(e);
|
|
@@ -7038,7 +7052,7 @@ var rd = e.forwardRef((t, n) => {
|
|
|
7038
7052
|
f.current = t.height, h.current = t.width, v.current || (e.style.transitionDuration = y.current.transitionDuration, e.style.animationName = y.current.animationName), l(i);
|
|
7039
7053
|
}
|
|
7040
7054
|
}, [s.open, i]), /* @__PURE__ */ p(Y.div, {
|
|
7041
|
-
"data-state":
|
|
7055
|
+
"data-state": ad(s.open),
|
|
7042
7056
|
"data-disabled": s.disabled ? "" : void 0,
|
|
7043
7057
|
id: s.contentId,
|
|
7044
7058
|
hidden: !_,
|
|
@@ -7052,82 +7066,82 @@ var rd = e.forwardRef((t, n) => {
|
|
|
7052
7066
|
children: _ && a
|
|
7053
7067
|
});
|
|
7054
7068
|
});
|
|
7055
|
-
function
|
|
7069
|
+
function ad(e) {
|
|
7056
7070
|
return e ? "open" : "closed";
|
|
7057
7071
|
}
|
|
7058
|
-
var
|
|
7059
|
-
function
|
|
7060
|
-
let n = e.useContext(
|
|
7072
|
+
var od = $u, sd = td, cd = rd, ld = e.createContext(void 0);
|
|
7073
|
+
function ud(t) {
|
|
7074
|
+
let n = e.useContext(ld);
|
|
7061
7075
|
return t || n || "ltr";
|
|
7062
7076
|
}
|
|
7063
7077
|
//#endregion
|
|
7064
7078
|
//#region node_modules/@radix-ui/react-accordion/dist/index.mjs
|
|
7065
|
-
var
|
|
7079
|
+
var dd = "Accordion", fd = [
|
|
7066
7080
|
"Home",
|
|
7067
7081
|
"End",
|
|
7068
7082
|
"ArrowDown",
|
|
7069
7083
|
"ArrowUp",
|
|
7070
7084
|
"ArrowLeft",
|
|
7071
7085
|
"ArrowRight"
|
|
7072
|
-
], [
|
|
7086
|
+
], [pd, md, hd] = qu(dd), [gd, _d] = Et(dd, [hd, Xu]), vd = Xu(), yd = t.forwardRef((e, t) => {
|
|
7073
7087
|
let { type: n, ...r } = e, i = r, a = r;
|
|
7074
|
-
return /* @__PURE__ */ p(
|
|
7088
|
+
return /* @__PURE__ */ p(pd.Provider, {
|
|
7075
7089
|
scope: e.__scopeAccordion,
|
|
7076
|
-
children: n === "multiple" ? /* @__PURE__ */ p(
|
|
7090
|
+
children: n === "multiple" ? /* @__PURE__ */ p(Td, {
|
|
7077
7091
|
...a,
|
|
7078
7092
|
ref: t
|
|
7079
|
-
}) : /* @__PURE__ */ p(
|
|
7093
|
+
}) : /* @__PURE__ */ p(wd, {
|
|
7080
7094
|
...i,
|
|
7081
7095
|
ref: t
|
|
7082
7096
|
})
|
|
7083
7097
|
});
|
|
7084
7098
|
});
|
|
7085
|
-
|
|
7086
|
-
var [
|
|
7099
|
+
yd.displayName = dd;
|
|
7100
|
+
var [bd, xd] = gd(dd), [Sd, Cd] = gd(dd, { collapsible: !1 }), wd = t.forwardRef((e, n) => {
|
|
7087
7101
|
let { value: r, defaultValue: i, onValueChange: a = () => {}, collapsible: o = !1, ...s } = e, [c, l] = _a({
|
|
7088
7102
|
prop: r,
|
|
7089
7103
|
defaultProp: i ?? "",
|
|
7090
7104
|
onChange: a,
|
|
7091
|
-
caller:
|
|
7105
|
+
caller: dd
|
|
7092
7106
|
});
|
|
7093
|
-
return /* @__PURE__ */ p(
|
|
7107
|
+
return /* @__PURE__ */ p(bd, {
|
|
7094
7108
|
scope: e.__scopeAccordion,
|
|
7095
7109
|
value: t.useMemo(() => c ? [c] : [], [c]),
|
|
7096
7110
|
onItemOpen: l,
|
|
7097
7111
|
onItemClose: t.useCallback(() => o && l(""), [o, l]),
|
|
7098
|
-
children: /* @__PURE__ */ p(
|
|
7112
|
+
children: /* @__PURE__ */ p(Sd, {
|
|
7099
7113
|
scope: e.__scopeAccordion,
|
|
7100
7114
|
collapsible: o,
|
|
7101
|
-
children: /* @__PURE__ */ p(
|
|
7115
|
+
children: /* @__PURE__ */ p(Od, {
|
|
7102
7116
|
...s,
|
|
7103
7117
|
ref: n
|
|
7104
7118
|
})
|
|
7105
7119
|
})
|
|
7106
7120
|
});
|
|
7107
|
-
}),
|
|
7121
|
+
}), Td = t.forwardRef((e, n) => {
|
|
7108
7122
|
let { value: r, defaultValue: i, onValueChange: a = () => {}, ...o } = e, [s, c] = _a({
|
|
7109
7123
|
prop: r,
|
|
7110
7124
|
defaultProp: i ?? [],
|
|
7111
7125
|
onChange: a,
|
|
7112
|
-
caller:
|
|
7126
|
+
caller: dd
|
|
7113
7127
|
}), l = t.useCallback((e) => c((t = []) => [...t, e]), [c]), u = t.useCallback((e) => c((t = []) => t.filter((t) => t !== e)), [c]);
|
|
7114
|
-
return /* @__PURE__ */ p(
|
|
7128
|
+
return /* @__PURE__ */ p(bd, {
|
|
7115
7129
|
scope: e.__scopeAccordion,
|
|
7116
7130
|
value: s,
|
|
7117
7131
|
onItemOpen: l,
|
|
7118
7132
|
onItemClose: u,
|
|
7119
|
-
children: /* @__PURE__ */ p(
|
|
7133
|
+
children: /* @__PURE__ */ p(Sd, {
|
|
7120
7134
|
scope: e.__scopeAccordion,
|
|
7121
7135
|
collapsible: !0,
|
|
7122
|
-
children: /* @__PURE__ */ p(
|
|
7136
|
+
children: /* @__PURE__ */ p(Od, {
|
|
7123
7137
|
...o,
|
|
7124
7138
|
ref: n
|
|
7125
7139
|
})
|
|
7126
7140
|
})
|
|
7127
7141
|
});
|
|
7128
|
-
}), [
|
|
7129
|
-
let { __scopeAccordion: r, disabled: i, dir: a, orientation: o = "vertical", ...s } = e, c = q(t.useRef(null), n), l =
|
|
7130
|
-
if (!
|
|
7142
|
+
}), [Ed, Dd] = gd(dd), Od = t.forwardRef((e, n) => {
|
|
7143
|
+
let { __scopeAccordion: r, disabled: i, dir: a, orientation: o = "vertical", ...s } = e, c = q(t.useRef(null), n), l = md(r), u = ud(a) === "ltr", d = J(e.onKeyDown, (e) => {
|
|
7144
|
+
if (!fd.includes(e.key)) return;
|
|
7131
7145
|
let t = e.target, n = l().filter((e) => !e.ref.current?.disabled), r = n.findIndex((e) => e.ref.current === t), i = n.length;
|
|
7132
7146
|
if (r === -1) return;
|
|
7133
7147
|
e.preventDefault();
|
|
@@ -7158,12 +7172,12 @@ var [yd, bd] = hd(ud), [xd, Sd] = hd(ud, { collapsible: !1 }), Cd = t.forwardRef
|
|
|
7158
7172
|
}
|
|
7159
7173
|
n[a % i].ref.current?.focus();
|
|
7160
7174
|
});
|
|
7161
|
-
return /* @__PURE__ */ p(
|
|
7175
|
+
return /* @__PURE__ */ p(Ed, {
|
|
7162
7176
|
scope: r,
|
|
7163
7177
|
disabled: i,
|
|
7164
7178
|
direction: a,
|
|
7165
7179
|
orientation: o,
|
|
7166
|
-
children: /* @__PURE__ */ p(
|
|
7180
|
+
children: /* @__PURE__ */ p(pd.Slot, {
|
|
7167
7181
|
scope: r,
|
|
7168
7182
|
children: /* @__PURE__ */ p(Y.div, {
|
|
7169
7183
|
...s,
|
|
@@ -7173,16 +7187,16 @@ var [yd, bd] = hd(ud), [xd, Sd] = hd(ud, { collapsible: !1 }), Cd = t.forwardRef
|
|
|
7173
7187
|
})
|
|
7174
7188
|
})
|
|
7175
7189
|
});
|
|
7176
|
-
}),
|
|
7177
|
-
let { __scopeAccordion: n, value: r, ...i } = e, a =
|
|
7178
|
-
return /* @__PURE__ */ p(
|
|
7190
|
+
}), kd = "AccordionItem", [Ad, jd] = gd(kd), Md = t.forwardRef((e, t) => {
|
|
7191
|
+
let { __scopeAccordion: n, value: r, ...i } = e, a = Dd(kd, n), o = xd(kd, n), s = vd(n), c = vn(), l = r && o.value.includes(r) || !1, u = a.disabled || e.disabled;
|
|
7192
|
+
return /* @__PURE__ */ p(Ad, {
|
|
7179
7193
|
scope: n,
|
|
7180
7194
|
open: l,
|
|
7181
7195
|
disabled: u,
|
|
7182
7196
|
triggerId: c,
|
|
7183
|
-
children: /* @__PURE__ */ p(
|
|
7197
|
+
children: /* @__PURE__ */ p(od, {
|
|
7184
7198
|
"data-orientation": a.orientation,
|
|
7185
|
-
"data-state":
|
|
7199
|
+
"data-state": zd(l),
|
|
7186
7200
|
...s,
|
|
7187
7201
|
...i,
|
|
7188
7202
|
ref: t,
|
|
@@ -7194,23 +7208,23 @@ var [yd, bd] = hd(ud), [xd, Sd] = hd(ud, { collapsible: !1 }), Cd = t.forwardRef
|
|
|
7194
7208
|
})
|
|
7195
7209
|
});
|
|
7196
7210
|
});
|
|
7197
|
-
|
|
7198
|
-
var
|
|
7199
|
-
let { __scopeAccordion: n, ...r } = e, i =
|
|
7211
|
+
Md.displayName = kd;
|
|
7212
|
+
var Nd = "AccordionHeader", Pd = t.forwardRef((e, t) => {
|
|
7213
|
+
let { __scopeAccordion: n, ...r } = e, i = Dd(dd, n), a = jd(Nd, n);
|
|
7200
7214
|
return /* @__PURE__ */ p(Y.h3, {
|
|
7201
7215
|
"data-orientation": i.orientation,
|
|
7202
|
-
"data-state":
|
|
7216
|
+
"data-state": zd(a.open),
|
|
7203
7217
|
"data-disabled": a.disabled ? "" : void 0,
|
|
7204
7218
|
...r,
|
|
7205
7219
|
ref: t
|
|
7206
7220
|
});
|
|
7207
7221
|
});
|
|
7208
|
-
|
|
7209
|
-
var
|
|
7210
|
-
let { __scopeAccordion: n, ...r } = e, i =
|
|
7211
|
-
return /* @__PURE__ */ p(
|
|
7222
|
+
Pd.displayName = Nd;
|
|
7223
|
+
var Fd = "AccordionTrigger", Id = t.forwardRef((e, t) => {
|
|
7224
|
+
let { __scopeAccordion: n, ...r } = e, i = Dd(dd, n), a = jd(Fd, n), o = Cd(Fd, n), s = vd(n);
|
|
7225
|
+
return /* @__PURE__ */ p(pd.ItemSlot, {
|
|
7212
7226
|
scope: n,
|
|
7213
|
-
children: /* @__PURE__ */ p(
|
|
7227
|
+
children: /* @__PURE__ */ p(sd, {
|
|
7214
7228
|
"aria-disabled": a.open && !o.collapsible || void 0,
|
|
7215
7229
|
"data-orientation": i.orientation,
|
|
7216
7230
|
id: a.triggerId,
|
|
@@ -7220,10 +7234,10 @@ var Pd = "AccordionTrigger", Fd = t.forwardRef((e, t) => {
|
|
|
7220
7234
|
})
|
|
7221
7235
|
});
|
|
7222
7236
|
});
|
|
7223
|
-
|
|
7224
|
-
var
|
|
7225
|
-
let { __scopeAccordion: n, ...r } = e, i =
|
|
7226
|
-
return /* @__PURE__ */ p(
|
|
7237
|
+
Id.displayName = Fd;
|
|
7238
|
+
var Ld = "AccordionContent", Rd = t.forwardRef((e, t) => {
|
|
7239
|
+
let { __scopeAccordion: n, ...r } = e, i = Dd(dd, n), a = jd(Ld, n), o = vd(n);
|
|
7240
|
+
return /* @__PURE__ */ p(cd, {
|
|
7227
7241
|
role: "region",
|
|
7228
7242
|
"aria-labelledby": a.triggerId,
|
|
7229
7243
|
"data-orientation": i.orientation,
|
|
@@ -7237,30 +7251,30 @@ var Id = "AccordionContent", Ld = t.forwardRef((e, t) => {
|
|
|
7237
7251
|
}
|
|
7238
7252
|
});
|
|
7239
7253
|
});
|
|
7240
|
-
|
|
7241
|
-
function
|
|
7254
|
+
Rd.displayName = Ld;
|
|
7255
|
+
function zd(e) {
|
|
7242
7256
|
return e ? "open" : "closed";
|
|
7243
7257
|
}
|
|
7244
|
-
var
|
|
7258
|
+
var Bd = yd, Vd = Md, Hd = Pd, Ud = Id, Wd = Rd;
|
|
7245
7259
|
//#endregion
|
|
7246
7260
|
//#region src/components/Accordion/Accordion.tsx
|
|
7247
|
-
function
|
|
7248
|
-
return /* @__PURE__ */ p(
|
|
7261
|
+
function Gd({ children: e, className: t }) {
|
|
7262
|
+
return /* @__PURE__ */ p(Bd, {
|
|
7249
7263
|
type: "multiple",
|
|
7250
7264
|
className: K("flex flex-col gap-3", t),
|
|
7251
7265
|
children: e
|
|
7252
7266
|
});
|
|
7253
7267
|
}
|
|
7254
|
-
function
|
|
7255
|
-
return /* @__PURE__ */ m(
|
|
7268
|
+
function Kd({ title: e, children: t, value: n }) {
|
|
7269
|
+
return /* @__PURE__ */ m(Vd, {
|
|
7256
7270
|
value: n ?? e,
|
|
7257
|
-
children: [/* @__PURE__ */ p(
|
|
7271
|
+
children: [/* @__PURE__ */ p(Hd, { children: /* @__PURE__ */ m(Ud, {
|
|
7258
7272
|
className: "flex w-full items-center justify-between gap-3 py-1 font-semibold text-base text-fg font-sans group",
|
|
7259
7273
|
children: [/* @__PURE__ */ p("span", { children: e }), /* @__PURE__ */ m("span", {
|
|
7260
7274
|
className: "relative flex-shrink-0 w-4 h-4 text-fg-secondary",
|
|
7261
7275
|
children: [/* @__PURE__ */ p("span", { className: "absolute top-1/2 left-0 w-full h-[1.5px] -translate-y-1/2 bg-current rounded-full" }), /* @__PURE__ */ p("span", { className: "absolute top-1/2 left-1/2 w-full h-[1.5px] -translate-x-1/2 -translate-y-1/2 bg-current rounded-full origin-center transition-transform duration-300 rotate-90 group-data-[state=open]:rotate-0" })]
|
|
7262
7276
|
})]
|
|
7263
|
-
}) }), /* @__PURE__ */ p(
|
|
7277
|
+
}) }), /* @__PURE__ */ p(Wd, {
|
|
7264
7278
|
className: "overflow-hidden data-[state=open]:animate-accordion-down data-[state=closed]:animate-accordion-up",
|
|
7265
7279
|
children: /* @__PURE__ */ p("div", {
|
|
7266
7280
|
className: "pt-2 pb-1 font-sans text-base text-fg leading-5",
|
|
@@ -7271,21 +7285,21 @@ function Gd({ title: e, children: t, value: n }) {
|
|
|
7271
7285
|
}
|
|
7272
7286
|
//#endregion
|
|
7273
7287
|
//#region src/components/Card/Card.tsx
|
|
7274
|
-
var
|
|
7288
|
+
var qd = {
|
|
7275
7289
|
none: "",
|
|
7276
7290
|
sm: "p-4",
|
|
7277
7291
|
md: "p-5",
|
|
7278
7292
|
lg: "px-8 py-6"
|
|
7279
|
-
},
|
|
7293
|
+
}, Jd = r(({ className: e, padding: t = "md", shadow: n = !0, children: r, ...i }, a) => /* @__PURE__ */ p("div", {
|
|
7280
7294
|
ref: a,
|
|
7281
|
-
className: K("bg-card rounded-card text-fg", n && "shadow-[0_4px_50px_rgba(0,0,0,0.03)]",
|
|
7295
|
+
className: K("bg-card rounded-card text-fg", n && "shadow-[0_4px_50px_rgba(0,0,0,0.03)]", qd[t], e),
|
|
7282
7296
|
...i,
|
|
7283
7297
|
children: r
|
|
7284
7298
|
}));
|
|
7285
|
-
|
|
7299
|
+
Jd.displayName = "Card";
|
|
7286
7300
|
//#endregion
|
|
7287
7301
|
//#region src/components/States/States.tsx
|
|
7288
|
-
function
|
|
7302
|
+
function Yd({ message: e = "Ничего не найдено", className: t }) {
|
|
7289
7303
|
return /* @__PURE__ */ p("div", {
|
|
7290
7304
|
className: K("flex flex-col items-center justify-center py-16 text-center", t),
|
|
7291
7305
|
children: /* @__PURE__ */ p("p", {
|
|
@@ -7294,7 +7308,7 @@ function Jd({ message: e = "Ничего не найдено", className: t }) {
|
|
|
7294
7308
|
})
|
|
7295
7309
|
});
|
|
7296
7310
|
}
|
|
7297
|
-
function
|
|
7311
|
+
function Xd({ message: e = "Произошла ошибка", className: t }) {
|
|
7298
7312
|
return /* @__PURE__ */ p("div", {
|
|
7299
7313
|
className: K("flex flex-col items-center justify-center py-16 text-center", t),
|
|
7300
7314
|
children: /* @__PURE__ */ p("p", {
|
|
@@ -7305,31 +7319,31 @@ function Yd({ message: e = "Произошла ошибка", className: t }) {
|
|
|
7305
7319
|
}
|
|
7306
7320
|
//#endregion
|
|
7307
7321
|
//#region node_modules/@radix-ui/react-roving-focus/dist/index.mjs
|
|
7308
|
-
var
|
|
7322
|
+
var Zd = "rovingFocusGroup.onEntryFocus", Qd = {
|
|
7309
7323
|
bubbles: !1,
|
|
7310
7324
|
cancelable: !0
|
|
7311
|
-
},
|
|
7325
|
+
}, $d = "RovingFocusGroup", [ef, tf, nf] = qu($d), [rf, af] = Et($d, [nf]), [of, sf] = rf($d), cf = e.forwardRef((e, t) => /* @__PURE__ */ p(ef.Provider, {
|
|
7312
7326
|
scope: e.__scopeRovingFocusGroup,
|
|
7313
|
-
children: /* @__PURE__ */ p(
|
|
7327
|
+
children: /* @__PURE__ */ p(ef.Slot, {
|
|
7314
7328
|
scope: e.__scopeRovingFocusGroup,
|
|
7315
|
-
children: /* @__PURE__ */ p(
|
|
7329
|
+
children: /* @__PURE__ */ p(lf, {
|
|
7316
7330
|
...e,
|
|
7317
7331
|
ref: t
|
|
7318
7332
|
})
|
|
7319
7333
|
})
|
|
7320
7334
|
}));
|
|
7321
|
-
|
|
7322
|
-
var
|
|
7323
|
-
let { __scopeRovingFocusGroup: r, orientation: i, loop: a = !1, dir: o, currentTabStopId: s, defaultCurrentTabStopId: c, onCurrentTabStopIdChange: l, onEntryFocus: u, preventScrollOnEntryFocus: d = !1, ...f } = t, m = e.useRef(null), h = q(n, m), g =
|
|
7335
|
+
cf.displayName = $d;
|
|
7336
|
+
var lf = e.forwardRef((t, n) => {
|
|
7337
|
+
let { __scopeRovingFocusGroup: r, orientation: i, loop: a = !1, dir: o, currentTabStopId: s, defaultCurrentTabStopId: c, onCurrentTabStopIdChange: l, onEntryFocus: u, preventScrollOnEntryFocus: d = !1, ...f } = t, m = e.useRef(null), h = q(n, m), g = ud(o), [_, v] = _a({
|
|
7324
7338
|
prop: s,
|
|
7325
7339
|
defaultProp: c ?? null,
|
|
7326
7340
|
onChange: l,
|
|
7327
|
-
caller:
|
|
7328
|
-
}), [y, b] = e.useState(!1), x = Ft(u), S =
|
|
7341
|
+
caller: $d
|
|
7342
|
+
}), [y, b] = e.useState(!1), x = Ft(u), S = tf(r), C = e.useRef(!1), [w, T] = e.useState(0);
|
|
7329
7343
|
return e.useEffect(() => {
|
|
7330
7344
|
let e = m.current;
|
|
7331
|
-
if (e) return e.addEventListener(
|
|
7332
|
-
}, [x]), /* @__PURE__ */ p(
|
|
7345
|
+
if (e) return e.addEventListener(Zd, x), () => e.removeEventListener(Zd, x);
|
|
7346
|
+
}, [x]), /* @__PURE__ */ p(of, {
|
|
7333
7347
|
scope: r,
|
|
7334
7348
|
orientation: i,
|
|
7335
7349
|
dir: g,
|
|
@@ -7354,10 +7368,10 @@ var cf = e.forwardRef((t, n) => {
|
|
|
7354
7368
|
onFocus: J(t.onFocus, (e) => {
|
|
7355
7369
|
let t = !C.current;
|
|
7356
7370
|
if (e.target === e.currentTarget && t && !y) {
|
|
7357
|
-
let t = new CustomEvent(
|
|
7371
|
+
let t = new CustomEvent(Zd, Qd);
|
|
7358
7372
|
if (e.currentTarget.dispatchEvent(t), !t.defaultPrevented) {
|
|
7359
7373
|
let e = S().filter((e) => e.focusable);
|
|
7360
|
-
|
|
7374
|
+
hf([
|
|
7361
7375
|
e.find((e) => e.active),
|
|
7362
7376
|
e.find((e) => e.id === _),
|
|
7363
7377
|
...e
|
|
@@ -7369,15 +7383,15 @@ var cf = e.forwardRef((t, n) => {
|
|
|
7369
7383
|
onBlur: J(t.onBlur, () => b(!1))
|
|
7370
7384
|
})
|
|
7371
7385
|
});
|
|
7372
|
-
}),
|
|
7373
|
-
let { __scopeRovingFocusGroup: r, focusable: i = !0, active: a = !1, tabStopId: o, children: s, ...c } = t, l = vn(), u = o || l, d =
|
|
7386
|
+
}), uf = "RovingFocusGroupItem", df = e.forwardRef((t, n) => {
|
|
7387
|
+
let { __scopeRovingFocusGroup: r, focusable: i = !0, active: a = !1, tabStopId: o, children: s, ...c } = t, l = vn(), u = o || l, d = sf(uf, r), f = d.currentTabStopId === u, m = tf(r), { onFocusableItemAdd: h, onFocusableItemRemove: g, currentTabStopId: _ } = d;
|
|
7374
7388
|
return e.useEffect(() => {
|
|
7375
7389
|
if (i) return h(), () => g();
|
|
7376
7390
|
}, [
|
|
7377
7391
|
i,
|
|
7378
7392
|
h,
|
|
7379
7393
|
g
|
|
7380
|
-
]), /* @__PURE__ */ p(
|
|
7394
|
+
]), /* @__PURE__ */ p(ef.ItemSlot, {
|
|
7381
7395
|
scope: r,
|
|
7382
7396
|
id: u,
|
|
7383
7397
|
focusable: i,
|
|
@@ -7397,7 +7411,7 @@ var cf = e.forwardRef((t, n) => {
|
|
|
7397
7411
|
return;
|
|
7398
7412
|
}
|
|
7399
7413
|
if (e.target !== e.currentTarget) return;
|
|
7400
|
-
let t =
|
|
7414
|
+
let t = mf(e, d.orientation, d.dir);
|
|
7401
7415
|
if (t !== void 0) {
|
|
7402
7416
|
if (e.metaKey || e.ctrlKey || e.altKey || e.shiftKey) return;
|
|
7403
7417
|
e.preventDefault();
|
|
@@ -7406,9 +7420,9 @@ var cf = e.forwardRef((t, n) => {
|
|
|
7406
7420
|
else if (t === "prev" || t === "next") {
|
|
7407
7421
|
t === "prev" && n.reverse();
|
|
7408
7422
|
let r = n.indexOf(e.currentTarget);
|
|
7409
|
-
n = d.loop ?
|
|
7423
|
+
n = d.loop ? gf(n, r + 1) : n.slice(r + 1);
|
|
7410
7424
|
}
|
|
7411
|
-
setTimeout(() =>
|
|
7425
|
+
setTimeout(() => hf(n));
|
|
7412
7426
|
}
|
|
7413
7427
|
}),
|
|
7414
7428
|
children: typeof s == "function" ? s({
|
|
@@ -7418,8 +7432,8 @@ var cf = e.forwardRef((t, n) => {
|
|
|
7418
7432
|
})
|
|
7419
7433
|
});
|
|
7420
7434
|
});
|
|
7421
|
-
|
|
7422
|
-
var
|
|
7435
|
+
df.displayName = uf;
|
|
7436
|
+
var ff = {
|
|
7423
7437
|
ArrowLeft: "prev",
|
|
7424
7438
|
ArrowUp: "prev",
|
|
7425
7439
|
ArrowRight: "next",
|
|
@@ -7429,28 +7443,28 @@ var df = {
|
|
|
7429
7443
|
PageDown: "last",
|
|
7430
7444
|
End: "last"
|
|
7431
7445
|
};
|
|
7432
|
-
function
|
|
7446
|
+
function pf(e, t) {
|
|
7433
7447
|
return t === "rtl" ? e === "ArrowLeft" ? "ArrowRight" : e === "ArrowRight" ? "ArrowLeft" : e : e;
|
|
7434
7448
|
}
|
|
7435
|
-
function
|
|
7436
|
-
let r =
|
|
7437
|
-
if (!(t === "vertical" && ["ArrowLeft", "ArrowRight"].includes(r)) && !(t === "horizontal" && ["ArrowUp", "ArrowDown"].includes(r))) return
|
|
7449
|
+
function mf(e, t, n) {
|
|
7450
|
+
let r = pf(e.key, n);
|
|
7451
|
+
if (!(t === "vertical" && ["ArrowLeft", "ArrowRight"].includes(r)) && !(t === "horizontal" && ["ArrowUp", "ArrowDown"].includes(r))) return ff[r];
|
|
7438
7452
|
}
|
|
7439
|
-
function
|
|
7453
|
+
function hf(e, t = !1) {
|
|
7440
7454
|
let n = document.activeElement;
|
|
7441
7455
|
for (let r of e) if (r === n || (r.focus({ preventScroll: t }), document.activeElement !== n)) return;
|
|
7442
7456
|
}
|
|
7443
|
-
function
|
|
7457
|
+
function gf(e, t) {
|
|
7444
7458
|
return e.map((n, r) => e[(t + r) % e.length]);
|
|
7445
7459
|
}
|
|
7446
|
-
var
|
|
7447
|
-
let { __scopeTabs: n, value: r, onValueChange: i, defaultValue: a, orientation: o = "horizontal", dir: s, activationMode: c = "automatic", ...l } = e, u =
|
|
7460
|
+
var _f = cf, vf = df, yf = "Tabs", [bf, xf] = Et(yf, [af]), Sf = af(), [Cf, wf] = bf(yf), Tf = e.forwardRef((e, t) => {
|
|
7461
|
+
let { __scopeTabs: n, value: r, onValueChange: i, defaultValue: a, orientation: o = "horizontal", dir: s, activationMode: c = "automatic", ...l } = e, u = ud(s), [d, f] = _a({
|
|
7448
7462
|
prop: r,
|
|
7449
7463
|
onChange: i,
|
|
7450
7464
|
defaultProp: a ?? "",
|
|
7451
|
-
caller:
|
|
7465
|
+
caller: yf
|
|
7452
7466
|
});
|
|
7453
|
-
return /* @__PURE__ */ p(
|
|
7467
|
+
return /* @__PURE__ */ p(Cf, {
|
|
7454
7468
|
scope: n,
|
|
7455
7469
|
baseId: vn(),
|
|
7456
7470
|
value: d,
|
|
@@ -7466,12 +7480,12 @@ var gf = sf, _f = uf, vf = "Tabs", [yf, bf] = Et(vf, [rf]), xf = rf(), [Sf, Cf]
|
|
|
7466
7480
|
})
|
|
7467
7481
|
});
|
|
7468
7482
|
});
|
|
7469
|
-
|
|
7470
|
-
var
|
|
7471
|
-
let { __scopeTabs: n, loop: r = !0, ...i } = e, a =
|
|
7472
|
-
return /* @__PURE__ */ p(
|
|
7483
|
+
Tf.displayName = yf;
|
|
7484
|
+
var Ef = "TabsList", Df = e.forwardRef((e, t) => {
|
|
7485
|
+
let { __scopeTabs: n, loop: r = !0, ...i } = e, a = wf(Ef, n);
|
|
7486
|
+
return /* @__PURE__ */ p(_f, {
|
|
7473
7487
|
asChild: !0,
|
|
7474
|
-
...
|
|
7488
|
+
...Sf(n),
|
|
7475
7489
|
orientation: a.orientation,
|
|
7476
7490
|
dir: a.dir,
|
|
7477
7491
|
loop: r,
|
|
@@ -7483,10 +7497,10 @@ var Tf = "TabsList", Ef = e.forwardRef((e, t) => {
|
|
|
7483
7497
|
})
|
|
7484
7498
|
});
|
|
7485
7499
|
});
|
|
7486
|
-
|
|
7487
|
-
var
|
|
7488
|
-
let { __scopeTabs: n, value: r, disabled: i = !1, ...a } = e, o =
|
|
7489
|
-
return /* @__PURE__ */ p(
|
|
7500
|
+
Df.displayName = Ef;
|
|
7501
|
+
var Of = "TabsTrigger", kf = e.forwardRef((e, t) => {
|
|
7502
|
+
let { __scopeTabs: n, value: r, disabled: i = !1, ...a } = e, o = wf(Of, n), s = Sf(n), c = Mf(o.baseId, r), l = Nf(o.baseId, r), u = r === o.value;
|
|
7503
|
+
return /* @__PURE__ */ p(vf, {
|
|
7490
7504
|
asChild: !0,
|
|
7491
7505
|
...s,
|
|
7492
7506
|
focusable: !i,
|
|
@@ -7515,9 +7529,9 @@ var Df = "TabsTrigger", Of = e.forwardRef((e, t) => {
|
|
|
7515
7529
|
})
|
|
7516
7530
|
});
|
|
7517
7531
|
});
|
|
7518
|
-
|
|
7519
|
-
var
|
|
7520
|
-
let { __scopeTabs: r, value: i, forceMount: a, children: o, ...s } = t, c =
|
|
7532
|
+
kf.displayName = Of;
|
|
7533
|
+
var Af = "TabsContent", jf = e.forwardRef((t, n) => {
|
|
7534
|
+
let { __scopeTabs: r, value: i, forceMount: a, children: o, ...s } = t, c = wf(Af, r), l = Mf(c.baseId, i), u = Nf(c.baseId, i), d = i === c.value, f = e.useRef(d);
|
|
7521
7535
|
return e.useEffect(() => {
|
|
7522
7536
|
let e = requestAnimationFrame(() => f.current = !1);
|
|
7523
7537
|
return () => cancelAnimationFrame(e);
|
|
@@ -7541,29 +7555,29 @@ var kf = "TabsContent", Af = e.forwardRef((t, n) => {
|
|
|
7541
7555
|
})
|
|
7542
7556
|
});
|
|
7543
7557
|
});
|
|
7544
|
-
|
|
7545
|
-
function
|
|
7558
|
+
jf.displayName = Af;
|
|
7559
|
+
function Mf(e, t) {
|
|
7546
7560
|
return `${e}-trigger-${t}`;
|
|
7547
7561
|
}
|
|
7548
|
-
function
|
|
7562
|
+
function Nf(e, t) {
|
|
7549
7563
|
return `${e}-content-${t}`;
|
|
7550
7564
|
}
|
|
7551
|
-
var
|
|
7565
|
+
var Pf = Tf, Ff = Df, If = kf, Lf = jf;
|
|
7552
7566
|
//#endregion
|
|
7553
7567
|
//#region src/components/Tabs/Tabs.tsx
|
|
7554
|
-
function
|
|
7555
|
-
return /* @__PURE__ */ m(
|
|
7568
|
+
function Rf({ tabs: e, activeId: t, onChange: n, className: r, tabClassName: i, listClassName: a, contentClassName: o }) {
|
|
7569
|
+
return /* @__PURE__ */ m(Pf, {
|
|
7556
7570
|
value: t,
|
|
7557
7571
|
onValueChange: n,
|
|
7558
7572
|
className: K("flex flex-col gap-4", r),
|
|
7559
|
-
children: [/* @__PURE__ */ p(
|
|
7573
|
+
children: [/* @__PURE__ */ p(Ff, {
|
|
7560
7574
|
className: K("flex flex-wrap", a),
|
|
7561
|
-
children: e.map((e) => /* @__PURE__ */ p(
|
|
7575
|
+
children: e.map((e) => /* @__PURE__ */ p(If, {
|
|
7562
7576
|
value: e.id,
|
|
7563
7577
|
className: K("transition-all", i),
|
|
7564
7578
|
children: e.label
|
|
7565
7579
|
}, e.id))
|
|
7566
|
-
}), e.map((e) => /* @__PURE__ */ p(
|
|
7580
|
+
}), e.map((e) => /* @__PURE__ */ p(Lf, {
|
|
7567
7581
|
value: e.id,
|
|
7568
7582
|
className: K("outline-none", o),
|
|
7569
7583
|
children: e.content
|
|
@@ -7572,7 +7586,7 @@ function Lf({ tabs: e, activeId: t, onChange: n, className: r, tabClassName: i,
|
|
|
7572
7586
|
}
|
|
7573
7587
|
//#endregion
|
|
7574
7588
|
//#region src/components/AdministrationIcon/assets/cutaneously_method.svg?react
|
|
7575
|
-
var
|
|
7589
|
+
var zf = (e) => /* @__PURE__ */ m("svg", {
|
|
7576
7590
|
width: 40,
|
|
7577
7591
|
height: 40,
|
|
7578
7592
|
viewBox: "0 0 40 40",
|
|
@@ -7599,7 +7613,7 @@ var Rf = (e) => /* @__PURE__ */ m("svg", {
|
|
|
7599
7613
|
fill: "#E30C5C"
|
|
7600
7614
|
})
|
|
7601
7615
|
]
|
|
7602
|
-
}),
|
|
7616
|
+
}), Bf = (e) => /* @__PURE__ */ m("svg", {
|
|
7603
7617
|
width: 40,
|
|
7604
7618
|
height: 40,
|
|
7605
7619
|
viewBox: "0 0 40 40",
|
|
@@ -7626,7 +7640,7 @@ var Rf = (e) => /* @__PURE__ */ m("svg", {
|
|
|
7626
7640
|
fill: "#E30C5C"
|
|
7627
7641
|
})
|
|
7628
7642
|
]
|
|
7629
|
-
}),
|
|
7643
|
+
}), Vf = (e) => /* @__PURE__ */ m("svg", {
|
|
7630
7644
|
width: 43,
|
|
7631
7645
|
height: 43,
|
|
7632
7646
|
viewBox: "0 0 43 43",
|
|
@@ -7649,7 +7663,7 @@ var Rf = (e) => /* @__PURE__ */ m("svg", {
|
|
|
7649
7663
|
fill: "#E30C5C"
|
|
7650
7664
|
})
|
|
7651
7665
|
]
|
|
7652
|
-
}),
|
|
7666
|
+
}), Hf = (e) => /* @__PURE__ */ m("svg", {
|
|
7653
7667
|
width: 43,
|
|
7654
7668
|
height: 43,
|
|
7655
7669
|
viewBox: "0 0 43 43",
|
|
@@ -7672,7 +7686,7 @@ var Rf = (e) => /* @__PURE__ */ m("svg", {
|
|
|
7672
7686
|
fill: "#E30C5C"
|
|
7673
7687
|
})
|
|
7674
7688
|
]
|
|
7675
|
-
}),
|
|
7689
|
+
}), Uf = (e) => /* @__PURE__ */ m("svg", {
|
|
7676
7690
|
width: 40,
|
|
7677
7691
|
height: 40,
|
|
7678
7692
|
viewBox: "0 0 40 40",
|
|
@@ -7747,7 +7761,7 @@ var Rf = (e) => /* @__PURE__ */ m("svg", {
|
|
|
7747
7761
|
mask: "url(#path-2-outside-1_36_545)"
|
|
7748
7762
|
})
|
|
7749
7763
|
]
|
|
7750
|
-
}),
|
|
7764
|
+
}), Wf = (e) => /* @__PURE__ */ m("svg", {
|
|
7751
7765
|
width: 40,
|
|
7752
7766
|
height: 40,
|
|
7753
7767
|
viewBox: "0 0 40 40",
|
|
@@ -7763,7 +7777,7 @@ var Rf = (e) => /* @__PURE__ */ m("svg", {
|
|
|
7763
7777
|
stroke: "#E30C5C",
|
|
7764
7778
|
strokeWidth: .2
|
|
7765
7779
|
})]
|
|
7766
|
-
}),
|
|
7780
|
+
}), Gf = (e) => /* @__PURE__ */ m("svg", {
|
|
7767
7781
|
width: 40,
|
|
7768
7782
|
height: 40,
|
|
7769
7783
|
viewBox: "0 0 40 40",
|
|
@@ -7801,7 +7815,7 @@ var Rf = (e) => /* @__PURE__ */ m("svg", {
|
|
|
7801
7815
|
mask: "url(#path-2-outside-1_36_550)"
|
|
7802
7816
|
})
|
|
7803
7817
|
]
|
|
7804
|
-
}),
|
|
7818
|
+
}), Kf = {
|
|
7805
7819
|
cutaneously: "Накожно",
|
|
7806
7820
|
intramuscularly: "Внутримышечно",
|
|
7807
7821
|
subcutaneously: "Подкожно",
|
|
@@ -7809,17 +7823,17 @@ var Rf = (e) => /* @__PURE__ */ m("svg", {
|
|
|
7809
7823
|
drops: "Перорально: капли",
|
|
7810
7824
|
pills: "Перорально: таблетки",
|
|
7811
7825
|
intranasally: "Интраназально"
|
|
7812
|
-
},
|
|
7813
|
-
cutaneously:
|
|
7814
|
-
intramuscularly:
|
|
7815
|
-
subcutaneously:
|
|
7816
|
-
intradermally:
|
|
7817
|
-
drops:
|
|
7818
|
-
pills:
|
|
7819
|
-
intranasally:
|
|
7826
|
+
}, qf = {
|
|
7827
|
+
cutaneously: zf,
|
|
7828
|
+
intramuscularly: Hf,
|
|
7829
|
+
subcutaneously: Gf,
|
|
7830
|
+
intradermally: Vf,
|
|
7831
|
+
drops: Bf,
|
|
7832
|
+
pills: Wf,
|
|
7833
|
+
intranasally: Uf
|
|
7820
7834
|
};
|
|
7821
|
-
function
|
|
7822
|
-
let i =
|
|
7835
|
+
function Jf({ method: e, className: t, disabled: n, ...r }) {
|
|
7836
|
+
let i = qf[e], a = Kf[e], o = /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ m(tt, {
|
|
7823
7837
|
className: "text-white font-semibold",
|
|
7824
7838
|
children: [a, "."]
|
|
7825
7839
|
}), /* @__PURE__ */ p(tt, {
|
|
@@ -7837,10 +7851,10 @@ function qf({ method: e, className: t, disabled: n, ...r }) {
|
|
|
7837
7851
|
}), /* @__PURE__ */ p("span", {
|
|
7838
7852
|
"aria-hidden": "true",
|
|
7839
7853
|
className: "absolute -top-1 -right-1 text-fg-muted group-hover:text-accent transition-colors pointer-events-none",
|
|
7840
|
-
children: /* @__PURE__ */ p(
|
|
7854
|
+
children: /* @__PURE__ */ p(Ps, { className: "w-3 h-3" })
|
|
7841
7855
|
})]
|
|
7842
7856
|
});
|
|
7843
|
-
return n ? s : /* @__PURE__ */ p(
|
|
7857
|
+
return n ? s : /* @__PURE__ */ p(Uc, {
|
|
7844
7858
|
content: o,
|
|
7845
7859
|
className: "max-w-[180px]",
|
|
7846
7860
|
children: s
|
|
@@ -7848,7 +7862,7 @@ function qf({ method: e, className: t, disabled: n, ...r }) {
|
|
|
7848
7862
|
}
|
|
7849
7863
|
//#endregion
|
|
7850
7864
|
//#region src/components/Switch/Switch.tsx
|
|
7851
|
-
var
|
|
7865
|
+
var Yf = {
|
|
7852
7866
|
sm: {
|
|
7853
7867
|
track: "w-8 h-5",
|
|
7854
7868
|
thumb: "top-0.5 w-4 h-4",
|
|
@@ -7862,8 +7876,8 @@ var Jf = {
|
|
|
7862
7876
|
off: "left-[3px]"
|
|
7863
7877
|
}
|
|
7864
7878
|
};
|
|
7865
|
-
function
|
|
7866
|
-
let { track: u, thumb: d, on: f, off: h } =
|
|
7879
|
+
function Xf({ checked: e, onChange: t, size: n = "md", trackClassName: r, thumbClassName: i, id: a, disabled: o, className: s, "aria-label": c, "aria-labelledby": l }) {
|
|
7880
|
+
let { track: u, thumb: d, on: f, off: h } = Yf[n];
|
|
7867
7881
|
return /* @__PURE__ */ m("label", {
|
|
7868
7882
|
className: K("inline-flex items-center cursor-pointer", o && "opacity-40 cursor-not-allowed", s),
|
|
7869
7883
|
children: [/* @__PURE__ */ p("input", {
|
|
@@ -7882,7 +7896,7 @@ function Yf({ checked: e, onChange: t, size: n = "md", trackClassName: r, thumbC
|
|
|
7882
7896
|
})]
|
|
7883
7897
|
});
|
|
7884
7898
|
}
|
|
7885
|
-
var
|
|
7899
|
+
var Zf = {
|
|
7886
7900
|
colors: {
|
|
7887
7901
|
accent: "#E30C5C",
|
|
7888
7902
|
accentHover: "#B40A49",
|
|
@@ -7908,7 +7922,7 @@ var Xf = {
|
|
|
7908
7922
|
button: "40px"
|
|
7909
7923
|
},
|
|
7910
7924
|
font: { sans: "'Inter Tight', sans-serif" }
|
|
7911
|
-
},
|
|
7925
|
+
}, Qf = {
|
|
7912
7926
|
colors: {
|
|
7913
7927
|
accent: "#F31667",
|
|
7914
7928
|
accentHover: "#B40A49",
|
|
@@ -7934,7 +7948,7 @@ var Xf = {
|
|
|
7934
7948
|
button: "40px"
|
|
7935
7949
|
},
|
|
7936
7950
|
font: { sans: "'Inter Tight', sans-serif" }
|
|
7937
|
-
},
|
|
7951
|
+
}, $f = [
|
|
7938
7952
|
{
|
|
7939
7953
|
path: "colors.accent",
|
|
7940
7954
|
cssVar: "--color-accent"
|
|
@@ -8019,39 +8033,39 @@ var Xf = {
|
|
|
8019
8033
|
path: "font.sans",
|
|
8020
8034
|
cssVar: "--font-sans"
|
|
8021
8035
|
}
|
|
8022
|
-
],
|
|
8023
|
-
light:
|
|
8024
|
-
dark:
|
|
8036
|
+
], ep = {
|
|
8037
|
+
light: Zf,
|
|
8038
|
+
dark: Qf
|
|
8025
8039
|
};
|
|
8026
|
-
function
|
|
8040
|
+
function tp(e, t) {
|
|
8027
8041
|
return t.split(".").reduce((e, t) => e[t], e);
|
|
8028
8042
|
}
|
|
8029
|
-
function
|
|
8030
|
-
return Object.fromEntries(
|
|
8043
|
+
function np(e) {
|
|
8044
|
+
return Object.fromEntries($f.map(({ path: t, cssVar: n }) => [n, tp(e, t)]));
|
|
8031
8045
|
}
|
|
8032
8046
|
//#endregion
|
|
8033
8047
|
//#region src/components/ThemeProvider/ThemeProvider.tsx
|
|
8034
|
-
var
|
|
8035
|
-
function
|
|
8048
|
+
var rp = n(null);
|
|
8049
|
+
function ip() {
|
|
8036
8050
|
return typeof window > "u" ? "light" : window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
8037
8051
|
}
|
|
8038
|
-
function ip(e) {
|
|
8039
|
-
return e === "system" ? rp() : e;
|
|
8040
|
-
}
|
|
8041
8052
|
function ap(e) {
|
|
8053
|
+
return e === "system" ? ip() : e;
|
|
8054
|
+
}
|
|
8055
|
+
function op(e) {
|
|
8042
8056
|
if (e) return e;
|
|
8043
8057
|
if (typeof window > "u") return "system";
|
|
8044
8058
|
let t = localStorage.getItem("datavac-theme");
|
|
8045
8059
|
return t && (t === "light" || t === "dark" || t === "system") ? t : "system";
|
|
8046
8060
|
}
|
|
8047
|
-
function
|
|
8061
|
+
function sp({ children: e, defaultTheme: t, customThemes: n, applyToRoot: r = !0 }) {
|
|
8048
8062
|
let a = l(() => ({
|
|
8049
|
-
|
|
8063
|
+
...ep,
|
|
8050
8064
|
...n
|
|
8051
|
-
}), [n]), [s, c] = d(() =>
|
|
8065
|
+
}), [n]), [s, c] = d(() => op(t)), [u, f] = d(() => ip()), m = s === "system" ? u : s, h = a[m] ?? Zf;
|
|
8052
8066
|
o(() => {
|
|
8053
8067
|
if (s !== "system") return;
|
|
8054
|
-
let e = window.matchMedia("(prefers-color-scheme: dark)"), t = () => f(
|
|
8068
|
+
let e = window.matchMedia("(prefers-color-scheme: dark)"), t = () => f(ip());
|
|
8055
8069
|
return e.addEventListener("change", t), () => e.removeEventListener("change", t);
|
|
8056
8070
|
}, [s]), o(() => {
|
|
8057
8071
|
(r ? document.documentElement.classList : document.body.classList).toggle("dark", m === "dark"), localStorage.setItem("datavac-theme", s);
|
|
@@ -8063,9 +8077,9 @@ function op({ children: e, defaultTheme: t, customThemes: n, applyToRoot: r = !0
|
|
|
8063
8077
|
let g = i((e) => {
|
|
8064
8078
|
(e === "system" || a[e]) && c(e);
|
|
8065
8079
|
}, [a]), _ = i(() => {
|
|
8066
|
-
c((e) =>
|
|
8080
|
+
c((e) => ap(e) === "dark" ? "light" : "dark");
|
|
8067
8081
|
}, []);
|
|
8068
|
-
return /* @__PURE__ */ p(
|
|
8082
|
+
return /* @__PURE__ */ p(rp.Provider, {
|
|
8069
8083
|
value: {
|
|
8070
8084
|
themeName: s,
|
|
8071
8085
|
resolvedTheme: m,
|
|
@@ -8076,15 +8090,15 @@ function op({ children: e, defaultTheme: t, customThemes: n, applyToRoot: r = !0
|
|
|
8076
8090
|
children: e
|
|
8077
8091
|
});
|
|
8078
8092
|
}
|
|
8079
|
-
function
|
|
8080
|
-
let e = a(
|
|
8093
|
+
function cp() {
|
|
8094
|
+
let e = a(rp);
|
|
8081
8095
|
if (!e) throw Error("useTheme must be used within <ThemeProvider>");
|
|
8082
8096
|
return e;
|
|
8083
8097
|
}
|
|
8084
8098
|
//#endregion
|
|
8085
8099
|
//#region src/components/ThemeToggle/ThemeToggle.tsx
|
|
8086
|
-
function
|
|
8087
|
-
let { themeName: t, resolvedTheme: n, setTheme: r, toggleTheme: i } =
|
|
8100
|
+
function lp({ className: e }) {
|
|
8101
|
+
let { themeName: t, resolvedTheme: n, setTheme: r, toggleTheme: i } = cp(), a = n === "dark", s = t === "system", [c, l] = d(!1);
|
|
8088
8102
|
if (o(() => {
|
|
8089
8103
|
l(!0);
|
|
8090
8104
|
}, []), !c) return null;
|
|
@@ -8098,7 +8112,7 @@ function cp({ className: e }) {
|
|
|
8098
8112
|
className: K("text-xs font-sans", a ? "text-fg-muted" : "text-fg"),
|
|
8099
8113
|
children: "День"
|
|
8100
8114
|
}),
|
|
8101
|
-
/* @__PURE__ */ p(
|
|
8115
|
+
/* @__PURE__ */ p(Xf, {
|
|
8102
8116
|
checked: a,
|
|
8103
8117
|
onChange: () => u(),
|
|
8104
8118
|
size: "sm",
|
|
@@ -8121,22 +8135,22 @@ function cp({ className: e }) {
|
|
|
8121
8135
|
/* @__PURE__ */ p("span", { className: K("absolute top-[3px] w-[26px] h-[26px] bg-white rounded-full shadow transition-all duration-200", a ? "left-[29px]" : "left-[3px]") }),
|
|
8122
8136
|
/* @__PURE__ */ p("span", {
|
|
8123
8137
|
className: K("absolute left-1 top-1/2 -translate-y-1/2 pointer-events-none", a ? "text-white" : "text-black"),
|
|
8124
|
-
children: /* @__PURE__ */ p(
|
|
8138
|
+
children: /* @__PURE__ */ p(Hs, {})
|
|
8125
8139
|
}),
|
|
8126
8140
|
/* @__PURE__ */ p("span", {
|
|
8127
8141
|
className: K("absolute right-1 top-1/2 -translate-y-1/2 pointer-events-none", a ? "text-black" : "text-white"),
|
|
8128
|
-
children: /* @__PURE__ */ p(
|
|
8142
|
+
children: /* @__PURE__ */ p(Ls, {})
|
|
8129
8143
|
})
|
|
8130
8144
|
]
|
|
8131
8145
|
})] });
|
|
8132
8146
|
}
|
|
8133
8147
|
//#endregion
|
|
8134
8148
|
//#region src/components/TagFilter/TagFilter.tsx
|
|
8135
|
-
var
|
|
8149
|
+
var up = (e, t, n) => {
|
|
8136
8150
|
let r = e === t, i = n?.includes(t) ?? !1;
|
|
8137
8151
|
return r ? "bg-[#4F5153] text-white" : i ? "bg-white text-[#E30C5C]" : "bg-white text-[#323335]";
|
|
8138
8152
|
};
|
|
8139
|
-
function
|
|
8153
|
+
function dp({ tags: e, active: t, onChange: n, className: r, highlighted: i = [] }) {
|
|
8140
8154
|
let a = (e) => {
|
|
8141
8155
|
n(t === e ? null : e);
|
|
8142
8156
|
};
|
|
@@ -8145,22 +8159,22 @@ function up({ tags: e, active: t, onChange: n, className: r, highlighted: i = []
|
|
|
8145
8159
|
children: e.map((e) => /* @__PURE__ */ p(xt, {
|
|
8146
8160
|
onClick: () => a(e),
|
|
8147
8161
|
"aria-pressed": t === e,
|
|
8148
|
-
className:
|
|
8162
|
+
className: up(t, e, i),
|
|
8149
8163
|
children: e
|
|
8150
8164
|
}, e))
|
|
8151
8165
|
});
|
|
8152
8166
|
}
|
|
8153
8167
|
//#endregion
|
|
8154
8168
|
//#region node_modules/@radix-ui/number/dist/index.mjs
|
|
8155
|
-
function
|
|
8169
|
+
function fp(e, [t, n]) {
|
|
8156
8170
|
return Math.min(n, Math.max(t, e));
|
|
8157
8171
|
}
|
|
8158
8172
|
//#endregion
|
|
8159
8173
|
//#region node_modules/@radix-ui/react-select/node_modules/@radix-ui/react-slot/dist/index.mjs
|
|
8160
8174
|
/* @__NO_SIDE_EFFECTS__ */
|
|
8161
|
-
function
|
|
8162
|
-
let n = /* @__PURE__ */
|
|
8163
|
-
let { children: i, ...a } = t, o = e.Children.toArray(i), s = o.find(
|
|
8175
|
+
function pp(t) {
|
|
8176
|
+
let n = /* @__PURE__ */ mp(t), r = e.forwardRef((t, r) => {
|
|
8177
|
+
let { children: i, ...a } = t, o = e.Children.toArray(i), s = o.find(gp);
|
|
8164
8178
|
if (s) {
|
|
8165
8179
|
let t = s.props.children, i = o.map((n) => n === s ? e.Children.count(t) > 1 ? e.Children.only(null) : e.isValidElement(t) ? t.props.children : null : n);
|
|
8166
8180
|
return /* @__PURE__ */ p(n, {
|
|
@@ -8178,22 +8192,22 @@ function fp(t) {
|
|
|
8178
8192
|
return r.displayName = `${t}.Slot`, r;
|
|
8179
8193
|
}
|
|
8180
8194
|
/* @__NO_SIDE_EFFECTS__ */
|
|
8181
|
-
function
|
|
8195
|
+
function mp(t) {
|
|
8182
8196
|
let n = e.forwardRef((t, n) => {
|
|
8183
8197
|
let { children: r, ...i } = t;
|
|
8184
8198
|
if (e.isValidElement(r)) {
|
|
8185
|
-
let t =
|
|
8199
|
+
let t = vp(r), a = _p(i, r.props);
|
|
8186
8200
|
return r.type !== e.Fragment && (a.ref = n ? it(n, t) : t), e.cloneElement(r, a);
|
|
8187
8201
|
}
|
|
8188
8202
|
return e.Children.count(r) > 1 ? e.Children.only(null) : null;
|
|
8189
8203
|
});
|
|
8190
8204
|
return n.displayName = `${t}.SlotClone`, n;
|
|
8191
8205
|
}
|
|
8192
|
-
var
|
|
8193
|
-
function
|
|
8194
|
-
return e.isValidElement(t) && typeof t.type == "function" && "__radixId" in t.type && t.type.__radixId ===
|
|
8206
|
+
var hp = Symbol("radix.slottable");
|
|
8207
|
+
function gp(t) {
|
|
8208
|
+
return e.isValidElement(t) && typeof t.type == "function" && "__radixId" in t.type && t.type.__radixId === hp;
|
|
8195
8209
|
}
|
|
8196
|
-
function
|
|
8210
|
+
function _p(e, t) {
|
|
8197
8211
|
let n = { ...t };
|
|
8198
8212
|
for (let r in t) {
|
|
8199
8213
|
let i = e[r], a = t[r];
|
|
@@ -8210,13 +8224,13 @@ function gp(e, t) {
|
|
|
8210
8224
|
...n
|
|
8211
8225
|
};
|
|
8212
8226
|
}
|
|
8213
|
-
function
|
|
8227
|
+
function vp(e) {
|
|
8214
8228
|
let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning;
|
|
8215
8229
|
return n ? e.ref : (t = Object.getOwnPropertyDescriptor(e, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
8216
8230
|
}
|
|
8217
8231
|
//#endregion
|
|
8218
8232
|
//#region node_modules/@radix-ui/react-use-previous/dist/index.mjs
|
|
8219
|
-
function
|
|
8233
|
+
function yp(t) {
|
|
8220
8234
|
let n = e.useRef({
|
|
8221
8235
|
value: t,
|
|
8222
8236
|
previous: t
|
|
@@ -8225,26 +8239,26 @@ function vp(t) {
|
|
|
8225
8239
|
}
|
|
8226
8240
|
//#endregion
|
|
8227
8241
|
//#region node_modules/@radix-ui/react-select/dist/index.mjs
|
|
8228
|
-
var
|
|
8242
|
+
var bp = [
|
|
8229
8243
|
" ",
|
|
8230
8244
|
"Enter",
|
|
8231
8245
|
"ArrowUp",
|
|
8232
8246
|
"ArrowDown"
|
|
8233
|
-
],
|
|
8234
|
-
let { __scopeSelect: n, children: r, open: i, defaultOpen: a, onOpenChange: o, value: s, defaultValue: c, onValueChange: l, dir: u, name: d, autoComplete: f, disabled: h, required: g, form: _ } = t, v =
|
|
8247
|
+
], xp = [" ", "Enter"], Sp = "Select", [Cp, wp, Tp] = qu(Sp), [Ep, Dp] = Et(Sp, [Tp, Li]), Op = Li(), [kp, Ap] = Ep(Sp), [jp, Mp] = Ep(Sp), Np = (t) => {
|
|
8248
|
+
let { __scopeSelect: n, children: r, open: i, defaultOpen: a, onOpenChange: o, value: s, defaultValue: c, onValueChange: l, dir: u, name: d, autoComplete: f, disabled: h, required: g, form: _ } = t, v = Op(n), [y, b] = e.useState(null), [x, S] = e.useState(null), [C, w] = e.useState(!1), T = ud(u), [E, D] = _a({
|
|
8235
8249
|
prop: i,
|
|
8236
8250
|
defaultProp: a ?? !1,
|
|
8237
8251
|
onChange: o,
|
|
8238
|
-
caller:
|
|
8252
|
+
caller: Sp
|
|
8239
8253
|
}), [O, k] = _a({
|
|
8240
8254
|
prop: s,
|
|
8241
8255
|
defaultProp: c,
|
|
8242
8256
|
onChange: l,
|
|
8243
|
-
caller:
|
|
8257
|
+
caller: Sp
|
|
8244
8258
|
}), A = e.useRef(null), j = y ? _ || !!y.closest("form") : !0, [M, N] = e.useState(/* @__PURE__ */ new Set()), P = Array.from(M).map((e) => e.props.value).join(";");
|
|
8245
8259
|
return /* @__PURE__ */ p($i, {
|
|
8246
8260
|
...v,
|
|
8247
|
-
children: /* @__PURE__ */ m(
|
|
8261
|
+
children: /* @__PURE__ */ m(kp, {
|
|
8248
8262
|
required: g,
|
|
8249
8263
|
scope: n,
|
|
8250
8264
|
trigger: y,
|
|
@@ -8261,9 +8275,9 @@ var yp = [
|
|
|
8261
8275
|
dir: T,
|
|
8262
8276
|
triggerPointerDownPosRef: A,
|
|
8263
8277
|
disabled: h,
|
|
8264
|
-
children: [/* @__PURE__ */ p(
|
|
8278
|
+
children: [/* @__PURE__ */ p(Cp.Provider, {
|
|
8265
8279
|
scope: n,
|
|
8266
|
-
children: /* @__PURE__ */ p(
|
|
8280
|
+
children: /* @__PURE__ */ p(jp, {
|
|
8267
8281
|
scope: t.__scopeSelect,
|
|
8268
8282
|
onNativeOptionAdd: e.useCallback((e) => {
|
|
8269
8283
|
N((t) => new Set(t).add(e));
|
|
@@ -8276,7 +8290,7 @@ var yp = [
|
|
|
8276
8290
|
}, []),
|
|
8277
8291
|
children: r
|
|
8278
8292
|
})
|
|
8279
|
-
}), j ? /* @__PURE__ */ m(
|
|
8293
|
+
}), j ? /* @__PURE__ */ m(Om, {
|
|
8280
8294
|
"aria-hidden": !0,
|
|
8281
8295
|
required: g,
|
|
8282
8296
|
tabIndex: -1,
|
|
@@ -8291,10 +8305,10 @@ var yp = [
|
|
|
8291
8305
|
})
|
|
8292
8306
|
});
|
|
8293
8307
|
};
|
|
8294
|
-
|
|
8295
|
-
var
|
|
8296
|
-
let { __scopeSelect: r, disabled: i = !1, ...a } = t, o =
|
|
8297
|
-
let t = u().filter((e) => !e.disabled), n =
|
|
8308
|
+
Np.displayName = Sp;
|
|
8309
|
+
var Pp = "SelectTrigger", Fp = e.forwardRef((t, n) => {
|
|
8310
|
+
let { __scopeSelect: r, disabled: i = !1, ...a } = t, o = Op(r), s = Ap(Pp, r), c = s.disabled || i, l = q(n, s.onTriggerChange), u = wp(r), d = e.useRef("touch"), [f, m, h] = Am((e) => {
|
|
8311
|
+
let t = u().filter((e) => !e.disabled), n = jm(t, e, t.find((e) => e.value === s.value));
|
|
8298
8312
|
n !== void 0 && s.onValueChange(n.value);
|
|
8299
8313
|
}), g = (e) => {
|
|
8300
8314
|
c || (s.onOpenChange(!0), h()), e && (s.triggerPointerDownPosRef.current = {
|
|
@@ -8316,7 +8330,7 @@ var Np = "SelectTrigger", Pp = e.forwardRef((t, n) => {
|
|
|
8316
8330
|
"data-state": s.open ? "open" : "closed",
|
|
8317
8331
|
disabled: c,
|
|
8318
8332
|
"data-disabled": c ? "" : void 0,
|
|
8319
|
-
"data-placeholder":
|
|
8333
|
+
"data-placeholder": km(s.value) ? "" : void 0,
|
|
8320
8334
|
...a,
|
|
8321
8335
|
ref: l,
|
|
8322
8336
|
onClick: J(a.onClick, (e) => {
|
|
@@ -8329,25 +8343,25 @@ var Np = "SelectTrigger", Pp = e.forwardRef((t, n) => {
|
|
|
8329
8343
|
}),
|
|
8330
8344
|
onKeyDown: J(a.onKeyDown, (e) => {
|
|
8331
8345
|
let t = f.current !== "";
|
|
8332
|
-
!(e.ctrlKey || e.altKey || e.metaKey) && e.key.length === 1 && m(e.key), !(t && e.key === " ") &&
|
|
8346
|
+
!(e.ctrlKey || e.altKey || e.metaKey) && e.key.length === 1 && m(e.key), !(t && e.key === " ") && bp.includes(e.key) && (g(), e.preventDefault());
|
|
8333
8347
|
})
|
|
8334
8348
|
})
|
|
8335
8349
|
});
|
|
8336
8350
|
});
|
|
8337
|
-
|
|
8338
|
-
var
|
|
8339
|
-
let { __scopeSelect: n, className: r, style: i, children: a, placeholder: o = "", ...s } = e, c =
|
|
8351
|
+
Fp.displayName = Pp;
|
|
8352
|
+
var Ip = "SelectValue", Lp = e.forwardRef((e, t) => {
|
|
8353
|
+
let { __scopeSelect: n, className: r, style: i, children: a, placeholder: o = "", ...s } = e, c = Ap(Ip, n), { onValueNodeHasChildrenChange: l } = c, u = a !== void 0, d = q(t, c.onValueNodeChange);
|
|
8340
8354
|
return X(() => {
|
|
8341
8355
|
l(u);
|
|
8342
8356
|
}, [l, u]), /* @__PURE__ */ p(Y.span, {
|
|
8343
8357
|
...s,
|
|
8344
8358
|
ref: d,
|
|
8345
8359
|
style: { pointerEvents: "none" },
|
|
8346
|
-
children:
|
|
8360
|
+
children: km(c.value) ? /* @__PURE__ */ p(f, { children: o }) : a
|
|
8347
8361
|
});
|
|
8348
8362
|
});
|
|
8349
|
-
|
|
8350
|
-
var
|
|
8363
|
+
Lp.displayName = Ip;
|
|
8364
|
+
var Rp = "SelectIcon", zp = e.forwardRef((e, t) => {
|
|
8351
8365
|
let { __scopeSelect: n, children: r, ...i } = e;
|
|
8352
8366
|
return /* @__PURE__ */ p(Y.span, {
|
|
8353
8367
|
"aria-hidden": !0,
|
|
@@ -8356,34 +8370,34 @@ var Lp = "SelectIcon", Rp = e.forwardRef((e, t) => {
|
|
|
8356
8370
|
children: r || "▼"
|
|
8357
8371
|
});
|
|
8358
8372
|
});
|
|
8359
|
-
|
|
8360
|
-
var
|
|
8373
|
+
zp.displayName = Rp;
|
|
8374
|
+
var Bp = "SelectPortal", Vp = (e) => /* @__PURE__ */ p(ia, {
|
|
8361
8375
|
asChild: !0,
|
|
8362
8376
|
...e
|
|
8363
8377
|
});
|
|
8364
|
-
|
|
8365
|
-
var
|
|
8366
|
-
let r =
|
|
8378
|
+
Vp.displayName = Bp;
|
|
8379
|
+
var Hp = "SelectContent", Up = e.forwardRef((t, n) => {
|
|
8380
|
+
let r = Ap(Hp, t.__scopeSelect), [i, a] = e.useState();
|
|
8367
8381
|
if (X(() => {
|
|
8368
8382
|
a(new DocumentFragment());
|
|
8369
8383
|
}, []), !r.open) {
|
|
8370
8384
|
let e = i;
|
|
8371
|
-
return e ? h.createPortal(/* @__PURE__ */ p(
|
|
8385
|
+
return e ? h.createPortal(/* @__PURE__ */ p(Gp, {
|
|
8372
8386
|
scope: t.__scopeSelect,
|
|
8373
|
-
children: /* @__PURE__ */ p(
|
|
8387
|
+
children: /* @__PURE__ */ p(Cp.Slot, {
|
|
8374
8388
|
scope: t.__scopeSelect,
|
|
8375
8389
|
children: /* @__PURE__ */ p("div", { children: t.children })
|
|
8376
8390
|
})
|
|
8377
8391
|
}), e) : null;
|
|
8378
8392
|
}
|
|
8379
|
-
return /* @__PURE__ */ p(
|
|
8393
|
+
return /* @__PURE__ */ p(Yp, {
|
|
8380
8394
|
...t,
|
|
8381
8395
|
ref: n
|
|
8382
8396
|
});
|
|
8383
8397
|
});
|
|
8384
|
-
|
|
8385
|
-
var
|
|
8386
|
-
let { __scopeSelect: r, position: i = "item-aligned", onCloseAutoFocus: a, onEscapeKeyDown: o, onPointerDownOutside: s, side: c, sideOffset: l, align: u, alignOffset: d, arrowPadding: f, collisionBoundary: m, collisionPadding: h, sticky: g, hideWhenDetached: _, avoidCollisions: v, ...y } = t, b =
|
|
8398
|
+
Up.displayName = Hp;
|
|
8399
|
+
var Wp = 10, [Gp, Kp] = Ep(Hp), qp = "SelectContentImpl", Jp = /* @__PURE__ */ pp("SelectContent.RemoveScroll"), Yp = e.forwardRef((t, n) => {
|
|
8400
|
+
let { __scopeSelect: r, position: i = "item-aligned", onCloseAutoFocus: a, onEscapeKeyDown: o, onPointerDownOutside: s, side: c, sideOffset: l, align: u, alignOffset: d, arrowPadding: f, collisionBoundary: m, collisionPadding: h, sticky: g, hideWhenDetached: _, avoidCollisions: v, ...y } = t, b = Ap(Hp, r), [x, S] = e.useState(null), [C, w] = e.useState(null), T = q(n, (e) => S(e)), [E, D] = e.useState(null), [O, k] = e.useState(null), A = wp(r), [j, M] = e.useState(!1), N = e.useRef(!1);
|
|
8387
8401
|
e.useEffect(() => {
|
|
8388
8402
|
if (x) return Oa(x);
|
|
8389
8403
|
}, [x]), Zt();
|
|
@@ -8429,16 +8443,16 @@ var Up = 10, [Wp, Gp] = Tp(Vp), Kp = "SelectContentImpl", qp = /* @__PURE__ */ f
|
|
|
8429
8443
|
window.removeEventListener("blur", e), window.removeEventListener("resize", e);
|
|
8430
8444
|
};
|
|
8431
8445
|
}, [I]);
|
|
8432
|
-
let [
|
|
8433
|
-
let t = A().filter((e) => !e.disabled), n =
|
|
8446
|
+
let [L, te] = Am((e) => {
|
|
8447
|
+
let t = A().filter((e) => !e.disabled), n = jm(t, e, t.find((e) => e.ref.current === document.activeElement));
|
|
8434
8448
|
n && setTimeout(() => n.ref.current.focus());
|
|
8435
|
-
}),
|
|
8449
|
+
}), ne = e.useCallback((e, t, n) => {
|
|
8436
8450
|
let r = !N.current && !n;
|
|
8437
8451
|
(b.value !== void 0 && b.value === t || r) && (D(e), r && (N.current = !0));
|
|
8438
|
-
}, [b.value]),
|
|
8452
|
+
}, [b.value]), R = e.useCallback(() => x?.focus(), [x]), z = e.useCallback((e, t, n) => {
|
|
8439
8453
|
let r = !N.current && !n;
|
|
8440
8454
|
(b.value !== void 0 && b.value === t || r) && k(e);
|
|
8441
|
-
}, [b.value]),
|
|
8455
|
+
}, [b.value]), re = i === "popper" ? $p : Zp, ie = re === $p ? {
|
|
8442
8456
|
side: c,
|
|
8443
8457
|
sideOffset: l,
|
|
8444
8458
|
align: u,
|
|
@@ -8450,22 +8464,22 @@ var Up = 10, [Wp, Gp] = Tp(Vp), Kp = "SelectContentImpl", qp = /* @__PURE__ */ f
|
|
|
8450
8464
|
hideWhenDetached: _,
|
|
8451
8465
|
avoidCollisions: v
|
|
8452
8466
|
} : {};
|
|
8453
|
-
return /* @__PURE__ */ p(
|
|
8467
|
+
return /* @__PURE__ */ p(Gp, {
|
|
8454
8468
|
scope: r,
|
|
8455
8469
|
content: x,
|
|
8456
8470
|
viewport: C,
|
|
8457
8471
|
onViewportChange: w,
|
|
8458
|
-
itemRefCallback:
|
|
8472
|
+
itemRefCallback: ne,
|
|
8459
8473
|
selectedItem: E,
|
|
8460
|
-
onItemLeave:
|
|
8461
|
-
itemTextRefCallback:
|
|
8474
|
+
onItemLeave: R,
|
|
8475
|
+
itemTextRefCallback: z,
|
|
8462
8476
|
focusSelectedItem: F,
|
|
8463
8477
|
selectedItemText: O,
|
|
8464
8478
|
position: i,
|
|
8465
8479
|
isPositioned: j,
|
|
8466
|
-
searchRef:
|
|
8480
|
+
searchRef: L,
|
|
8467
8481
|
children: /* @__PURE__ */ p(Ro, {
|
|
8468
|
-
as:
|
|
8482
|
+
as: Jp,
|
|
8469
8483
|
allowPinchZoom: !0,
|
|
8470
8484
|
children: /* @__PURE__ */ p(rn, {
|
|
8471
8485
|
asChild: !0,
|
|
@@ -8483,7 +8497,7 @@ var Up = 10, [Wp, Gp] = Tp(Vp), Kp = "SelectContentImpl", qp = /* @__PURE__ */ f
|
|
|
8483
8497
|
onPointerDownOutside: s,
|
|
8484
8498
|
onFocusOutside: (e) => e.preventDefault(),
|
|
8485
8499
|
onDismiss: () => b.onOpenChange(!1),
|
|
8486
|
-
children: /* @__PURE__ */ p(
|
|
8500
|
+
children: /* @__PURE__ */ p(re, {
|
|
8487
8501
|
role: "listbox",
|
|
8488
8502
|
id: b.contentId,
|
|
8489
8503
|
"data-state": b.open ? "open" : "closed",
|
|
@@ -8501,7 +8515,7 @@ var Up = 10, [Wp, Gp] = Tp(Vp), Kp = "SelectContentImpl", qp = /* @__PURE__ */ f
|
|
|
8501
8515
|
},
|
|
8502
8516
|
onKeyDown: J(y.onKeyDown, (e) => {
|
|
8503
8517
|
let t = e.ctrlKey || e.altKey || e.metaKey;
|
|
8504
|
-
if (e.key === "Tab" && e.preventDefault(), !t && e.key.length === 1 &&
|
|
8518
|
+
if (e.key === "Tab" && e.preventDefault(), !t && e.key.length === 1 && te(e.key), [
|
|
8505
8519
|
"ArrowUp",
|
|
8506
8520
|
"ArrowDown",
|
|
8507
8521
|
"Home",
|
|
@@ -8521,19 +8535,19 @@ var Up = 10, [Wp, Gp] = Tp(Vp), Kp = "SelectContentImpl", qp = /* @__PURE__ */ f
|
|
|
8521
8535
|
})
|
|
8522
8536
|
});
|
|
8523
8537
|
});
|
|
8524
|
-
|
|
8525
|
-
var
|
|
8526
|
-
let { __scopeSelect: r, onPlaced: i, ...a } = t, o =
|
|
8538
|
+
Yp.displayName = qp;
|
|
8539
|
+
var Xp = "SelectItemAlignedPosition", Zp = e.forwardRef((t, n) => {
|
|
8540
|
+
let { __scopeSelect: r, onPlaced: i, ...a } = t, o = Ap(Hp, r), s = Kp(Hp, r), [c, l] = e.useState(null), [u, d] = e.useState(null), f = q(n, (e) => d(e)), m = wp(r), h = e.useRef(!1), g = e.useRef(!0), { viewport: _, selectedItem: v, selectedItemText: y, focusSelectedItem: b } = s, x = e.useCallback(() => {
|
|
8527
8541
|
if (o.trigger && o.valueNode && c && u && _ && v && y) {
|
|
8528
8542
|
let e = o.trigger.getBoundingClientRect(), t = u.getBoundingClientRect(), n = o.valueNode.getBoundingClientRect(), r = y.getBoundingClientRect();
|
|
8529
8543
|
if (o.dir !== "rtl") {
|
|
8530
|
-
let i = r.left - t.left, a = n.left - i, o = e.left - a, s = e.width + o, l = Math.max(s, t.width), u = window.innerWidth -
|
|
8544
|
+
let i = r.left - t.left, a = n.left - i, o = e.left - a, s = e.width + o, l = Math.max(s, t.width), u = window.innerWidth - Wp, d = fp(a, [Wp, Math.max(Wp, u - l)]);
|
|
8531
8545
|
c.style.minWidth = s + "px", c.style.left = d + "px";
|
|
8532
8546
|
} else {
|
|
8533
|
-
let i = t.right - r.right, a = window.innerWidth - n.right - i, o = window.innerWidth - e.right - a, s = e.width + o, l = Math.max(s, t.width), u = window.innerWidth -
|
|
8547
|
+
let i = t.right - r.right, a = window.innerWidth - n.right - i, o = window.innerWidth - e.right - a, s = e.width + o, l = Math.max(s, t.width), u = window.innerWidth - Wp, d = fp(a, [Wp, Math.max(Wp, u - l)]);
|
|
8534
8548
|
c.style.minWidth = s + "px", c.style.right = d + "px";
|
|
8535
8549
|
}
|
|
8536
|
-
let a = m(), s = window.innerHeight -
|
|
8550
|
+
let a = m(), s = window.innerHeight - Wp * 2, l = _.scrollHeight, d = window.getComputedStyle(u), f = parseInt(d.borderTopWidth, 10), p = parseInt(d.paddingTop, 10), g = parseInt(d.borderBottomWidth, 10), b = parseInt(d.paddingBottom, 10), x = f + p + l + b + g, S = Math.min(v.offsetHeight * 5, x), C = window.getComputedStyle(_), w = parseInt(C.paddingTop, 10), T = parseInt(C.paddingBottom, 10), E = e.top + e.height / 2 - Wp, D = s - E, O = v.offsetHeight / 2, k = v.offsetTop + O, A = f + p + k, j = x - A;
|
|
8537
8551
|
if (A <= E) {
|
|
8538
8552
|
let e = a.length > 0 && v === a[a.length - 1].ref.current;
|
|
8539
8553
|
c.style.bottom = "0px";
|
|
@@ -8545,7 +8559,7 @@ var Yp = "SelectItemAlignedPosition", Xp = e.forwardRef((t, n) => {
|
|
|
8545
8559
|
let t = Math.max(E, f + _.offsetTop + (e ? w : 0) + O) + j;
|
|
8546
8560
|
c.style.height = t + "px", _.scrollTop = A - E + _.offsetTop;
|
|
8547
8561
|
}
|
|
8548
|
-
c.style.margin = `${
|
|
8562
|
+
c.style.margin = `${Wp}px 0`, c.style.minHeight = S + "px", c.style.maxHeight = s + "px", i?.(), requestAnimationFrame(() => h.current = !0);
|
|
8549
8563
|
}
|
|
8550
8564
|
}, [
|
|
8551
8565
|
m,
|
|
@@ -8563,7 +8577,7 @@ var Yp = "SelectItemAlignedPosition", Xp = e.forwardRef((t, n) => {
|
|
|
8563
8577
|
let [S, C] = e.useState();
|
|
8564
8578
|
return X(() => {
|
|
8565
8579
|
u && C(window.getComputedStyle(u).zIndex);
|
|
8566
|
-
}, [u]), /* @__PURE__ */ p(
|
|
8580
|
+
}, [u]), /* @__PURE__ */ p(em, {
|
|
8567
8581
|
scope: r,
|
|
8568
8582
|
contentWrapper: c,
|
|
8569
8583
|
shouldExpandOnScrollRef: h,
|
|
@@ -8590,11 +8604,11 @@ var Yp = "SelectItemAlignedPosition", Xp = e.forwardRef((t, n) => {
|
|
|
8590
8604
|
})
|
|
8591
8605
|
});
|
|
8592
8606
|
});
|
|
8593
|
-
|
|
8594
|
-
var
|
|
8595
|
-
let { __scopeSelect: n, align: r = "start", collisionPadding: i =
|
|
8607
|
+
Zp.displayName = Xp;
|
|
8608
|
+
var Qp = "SelectPopperPosition", $p = e.forwardRef((e, t) => {
|
|
8609
|
+
let { __scopeSelect: n, align: r = "start", collisionPadding: i = Wp, ...a } = e;
|
|
8596
8610
|
return /* @__PURE__ */ p(ta, {
|
|
8597
|
-
...
|
|
8611
|
+
...Op(n),
|
|
8598
8612
|
...a,
|
|
8599
8613
|
ref: t,
|
|
8600
8614
|
align: r,
|
|
@@ -8610,13 +8624,13 @@ var Zp = "SelectPopperPosition", Qp = e.forwardRef((e, t) => {
|
|
|
8610
8624
|
}
|
|
8611
8625
|
});
|
|
8612
8626
|
});
|
|
8613
|
-
|
|
8614
|
-
var [
|
|
8615
|
-
let { __scopeSelect: r, nonce: i, ...a } = t, o =
|
|
8627
|
+
$p.displayName = Qp;
|
|
8628
|
+
var [em, tm] = Ep(Hp, {}), nm = "SelectViewport", rm = e.forwardRef((t, n) => {
|
|
8629
|
+
let { __scopeSelect: r, nonce: i, ...a } = t, o = Kp(nm, r), s = tm(nm, r), c = q(n, o.onViewportChange), l = e.useRef(0);
|
|
8616
8630
|
return /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("style", {
|
|
8617
8631
|
dangerouslySetInnerHTML: { __html: "[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}" },
|
|
8618
8632
|
nonce: i
|
|
8619
|
-
}), /* @__PURE__ */ p(
|
|
8633
|
+
}), /* @__PURE__ */ p(Cp.Slot, {
|
|
8620
8634
|
scope: r,
|
|
8621
8635
|
children: /* @__PURE__ */ p(Y.div, {
|
|
8622
8636
|
"data-radix-select-viewport": "",
|
|
@@ -8634,7 +8648,7 @@ var [$p, em] = Tp(Vp, {}), tm = "SelectViewport", nm = e.forwardRef((t, n) => {
|
|
|
8634
8648
|
if (r?.current && n) {
|
|
8635
8649
|
let e = Math.abs(l.current - t.scrollTop);
|
|
8636
8650
|
if (e > 0) {
|
|
8637
|
-
let r = window.innerHeight -
|
|
8651
|
+
let r = window.innerHeight - Wp * 2, i = parseFloat(n.style.minHeight), a = parseFloat(n.style.height), o = Math.max(i, a);
|
|
8638
8652
|
if (o < r) {
|
|
8639
8653
|
let i = o + e, a = Math.min(r, i), s = i - a;
|
|
8640
8654
|
n.style.height = a + "px", n.style.bottom === "0px" && (t.scrollTop = s > 0 ? s : 0, n.style.justifyContent = "flex-end");
|
|
@@ -8646,10 +8660,10 @@ var [$p, em] = Tp(Vp, {}), tm = "SelectViewport", nm = e.forwardRef((t, n) => {
|
|
|
8646
8660
|
})
|
|
8647
8661
|
})] });
|
|
8648
8662
|
});
|
|
8649
|
-
|
|
8650
|
-
var
|
|
8663
|
+
rm.displayName = nm;
|
|
8664
|
+
var im = "SelectGroup", [am, om] = Ep(im), sm = e.forwardRef((e, t) => {
|
|
8651
8665
|
let { __scopeSelect: n, ...r } = e, i = vn();
|
|
8652
|
-
return /* @__PURE__ */ p(
|
|
8666
|
+
return /* @__PURE__ */ p(am, {
|
|
8653
8667
|
scope: n,
|
|
8654
8668
|
id: i,
|
|
8655
8669
|
children: /* @__PURE__ */ p(Y.div, {
|
|
@@ -8660,22 +8674,22 @@ var rm = "SelectGroup", [im, am] = Tp(rm), om = e.forwardRef((e, t) => {
|
|
|
8660
8674
|
})
|
|
8661
8675
|
});
|
|
8662
8676
|
});
|
|
8663
|
-
|
|
8664
|
-
var
|
|
8665
|
-
let { __scopeSelect: n, ...r } = e, i =
|
|
8677
|
+
sm.displayName = im;
|
|
8678
|
+
var cm = "SelectLabel", lm = e.forwardRef((e, t) => {
|
|
8679
|
+
let { __scopeSelect: n, ...r } = e, i = om(cm, n);
|
|
8666
8680
|
return /* @__PURE__ */ p(Y.div, {
|
|
8667
8681
|
id: i.id,
|
|
8668
8682
|
...r,
|
|
8669
8683
|
ref: t
|
|
8670
8684
|
});
|
|
8671
8685
|
});
|
|
8672
|
-
|
|
8673
|
-
var
|
|
8674
|
-
let { __scopeSelect: r, value: i, disabled: a = !1, textValue: o, ...s } = t, c =
|
|
8686
|
+
lm.displayName = cm;
|
|
8687
|
+
var um = "SelectItem", [dm, fm] = Ep(um), pm = e.forwardRef((t, n) => {
|
|
8688
|
+
let { __scopeSelect: r, value: i, disabled: a = !1, textValue: o, ...s } = t, c = Ap(um, r), l = Kp(um, r), u = c.value === i, [d, f] = e.useState(o ?? ""), [m, h] = e.useState(!1), g = q(n, (e) => l.itemRefCallback?.(e, i, a)), _ = vn(), v = e.useRef("touch"), y = () => {
|
|
8675
8689
|
a || (c.onValueChange(i), c.onOpenChange(!1));
|
|
8676
8690
|
};
|
|
8677
8691
|
if (i === "") throw Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");
|
|
8678
|
-
return /* @__PURE__ */ p(
|
|
8692
|
+
return /* @__PURE__ */ p(dm, {
|
|
8679
8693
|
scope: r,
|
|
8680
8694
|
value: i,
|
|
8681
8695
|
disabled: a,
|
|
@@ -8684,7 +8698,7 @@ var lm = "SelectItem", [um, dm] = Tp(lm), fm = e.forwardRef((t, n) => {
|
|
|
8684
8698
|
onItemTextChange: e.useCallback((e) => {
|
|
8685
8699
|
f((t) => t || (e?.textContent ?? "").trim());
|
|
8686
8700
|
}, []),
|
|
8687
|
-
children: /* @__PURE__ */ p(
|
|
8701
|
+
children: /* @__PURE__ */ p(Cp.ItemSlot, {
|
|
8688
8702
|
scope: r,
|
|
8689
8703
|
value: i,
|
|
8690
8704
|
disabled: a,
|
|
@@ -8718,15 +8732,15 @@ var lm = "SelectItem", [um, dm] = Tp(lm), fm = e.forwardRef((t, n) => {
|
|
|
8718
8732
|
e.currentTarget === document.activeElement && l.onItemLeave?.();
|
|
8719
8733
|
}),
|
|
8720
8734
|
onKeyDown: J(s.onKeyDown, (e) => {
|
|
8721
|
-
l.searchRef?.current !== "" && e.key === " " || (
|
|
8735
|
+
l.searchRef?.current !== "" && e.key === " " || (xp.includes(e.key) && y(), e.key === " " && e.preventDefault());
|
|
8722
8736
|
})
|
|
8723
8737
|
})
|
|
8724
8738
|
})
|
|
8725
8739
|
});
|
|
8726
8740
|
});
|
|
8727
|
-
|
|
8728
|
-
var
|
|
8729
|
-
let { __scopeSelect: r, className: i, style: a, ...o } = t, s =
|
|
8741
|
+
pm.displayName = um;
|
|
8742
|
+
var mm = "SelectItemText", hm = e.forwardRef((t, n) => {
|
|
8743
|
+
let { __scopeSelect: r, className: i, style: a, ...o } = t, s = Ap(mm, r), c = Kp(mm, r), l = fm(mm, r), u = Mp(mm, r), [d, g] = e.useState(null), _ = q(n, (e) => g(e), l.onItemTextChange, (e) => c.itemTextRefCallback?.(e, l.value, l.disabled)), v = d?.textContent, y = e.useMemo(() => /* @__PURE__ */ p("option", {
|
|
8730
8744
|
value: l.value,
|
|
8731
8745
|
disabled: l.disabled,
|
|
8732
8746
|
children: v
|
|
@@ -8745,18 +8759,18 @@ var pm = "SelectItemText", mm = e.forwardRef((t, n) => {
|
|
|
8745
8759
|
ref: _
|
|
8746
8760
|
}), l.isSelected && s.valueNode && !s.valueNodeHasChildren ? h.createPortal(o.children, s.valueNode) : null] });
|
|
8747
8761
|
});
|
|
8748
|
-
|
|
8749
|
-
var
|
|
8762
|
+
hm.displayName = mm;
|
|
8763
|
+
var gm = "SelectItemIndicator", _m = e.forwardRef((e, t) => {
|
|
8750
8764
|
let { __scopeSelect: n, ...r } = e;
|
|
8751
|
-
return
|
|
8765
|
+
return fm(gm, n).isSelected ? /* @__PURE__ */ p(Y.span, {
|
|
8752
8766
|
"aria-hidden": !0,
|
|
8753
8767
|
...r,
|
|
8754
8768
|
ref: t
|
|
8755
8769
|
}) : null;
|
|
8756
8770
|
});
|
|
8757
|
-
|
|
8758
|
-
var
|
|
8759
|
-
let r =
|
|
8771
|
+
_m.displayName = gm;
|
|
8772
|
+
var vm = "SelectScrollUpButton", ym = e.forwardRef((t, n) => {
|
|
8773
|
+
let r = Kp(vm, t.__scopeSelect), i = tm(vm, t.__scopeSelect), [a, o] = e.useState(!1), s = q(n, i.onScrollButtonChange);
|
|
8760
8774
|
return X(() => {
|
|
8761
8775
|
if (r.viewport && r.isPositioned) {
|
|
8762
8776
|
let e = function() {
|
|
@@ -8764,7 +8778,7 @@ var _m = "SelectScrollUpButton", vm = e.forwardRef((t, n) => {
|
|
|
8764
8778
|
}, t = r.viewport;
|
|
8765
8779
|
return e(), t.addEventListener("scroll", e), () => t.removeEventListener("scroll", e);
|
|
8766
8780
|
}
|
|
8767
|
-
}, [r.viewport, r.isPositioned]), a ? /* @__PURE__ */ p(
|
|
8781
|
+
}, [r.viewport, r.isPositioned]), a ? /* @__PURE__ */ p(Sm, {
|
|
8768
8782
|
...t,
|
|
8769
8783
|
ref: s,
|
|
8770
8784
|
onAutoScroll: () => {
|
|
@@ -8773,9 +8787,9 @@ var _m = "SelectScrollUpButton", vm = e.forwardRef((t, n) => {
|
|
|
8773
8787
|
}
|
|
8774
8788
|
}) : null;
|
|
8775
8789
|
});
|
|
8776
|
-
|
|
8777
|
-
var
|
|
8778
|
-
let r =
|
|
8790
|
+
ym.displayName = vm;
|
|
8791
|
+
var bm = "SelectScrollDownButton", xm = e.forwardRef((t, n) => {
|
|
8792
|
+
let r = Kp(bm, t.__scopeSelect), i = tm(bm, t.__scopeSelect), [a, o] = e.useState(!1), s = q(n, i.onScrollButtonChange);
|
|
8779
8793
|
return X(() => {
|
|
8780
8794
|
if (r.viewport && r.isPositioned) {
|
|
8781
8795
|
let e = function() {
|
|
@@ -8784,7 +8798,7 @@ var ym = "SelectScrollDownButton", bm = e.forwardRef((t, n) => {
|
|
|
8784
8798
|
}, t = r.viewport;
|
|
8785
8799
|
return e(), t.addEventListener("scroll", e), () => t.removeEventListener("scroll", e);
|
|
8786
8800
|
}
|
|
8787
|
-
}, [r.viewport, r.isPositioned]), a ? /* @__PURE__ */ p(
|
|
8801
|
+
}, [r.viewport, r.isPositioned]), a ? /* @__PURE__ */ p(Sm, {
|
|
8788
8802
|
...t,
|
|
8789
8803
|
ref: s,
|
|
8790
8804
|
onAutoScroll: () => {
|
|
@@ -8793,9 +8807,9 @@ var ym = "SelectScrollDownButton", bm = e.forwardRef((t, n) => {
|
|
|
8793
8807
|
}
|
|
8794
8808
|
}) : null;
|
|
8795
8809
|
});
|
|
8796
|
-
|
|
8797
|
-
var
|
|
8798
|
-
let { __scopeSelect: r, onAutoScroll: i, ...a } = t, o =
|
|
8810
|
+
xm.displayName = bm;
|
|
8811
|
+
var Sm = e.forwardRef((t, n) => {
|
|
8812
|
+
let { __scopeSelect: r, onAutoScroll: i, ...a } = t, o = Kp("SelectScrollButton", r), s = e.useRef(null), c = wp(r), l = e.useCallback(() => {
|
|
8799
8813
|
s.current !== null && (window.clearInterval(s.current), s.current = null);
|
|
8800
8814
|
}, []);
|
|
8801
8815
|
return e.useEffect(() => () => l(), [l]), X(() => {
|
|
@@ -8818,7 +8832,7 @@ var xm = e.forwardRef((t, n) => {
|
|
|
8818
8832
|
l();
|
|
8819
8833
|
})
|
|
8820
8834
|
});
|
|
8821
|
-
}),
|
|
8835
|
+
}), Cm = "SelectSeparator", wm = e.forwardRef((e, t) => {
|
|
8822
8836
|
let { __scopeSelect: n, ...r } = e;
|
|
8823
8837
|
return /* @__PURE__ */ p(Y.div, {
|
|
8824
8838
|
"aria-hidden": !0,
|
|
@@ -8826,18 +8840,18 @@ var xm = e.forwardRef((t, n) => {
|
|
|
8826
8840
|
ref: t
|
|
8827
8841
|
});
|
|
8828
8842
|
});
|
|
8829
|
-
|
|
8830
|
-
var
|
|
8831
|
-
let { __scopeSelect: n, ...r } = e, i =
|
|
8843
|
+
wm.displayName = Cm;
|
|
8844
|
+
var Tm = "SelectArrow", Em = e.forwardRef((e, t) => {
|
|
8845
|
+
let { __scopeSelect: n, ...r } = e, i = Op(n), a = Ap(Tm, n), o = Kp(Tm, n);
|
|
8832
8846
|
return a.open && o.position === "popper" ? /* @__PURE__ */ p(na, {
|
|
8833
8847
|
...i,
|
|
8834
8848
|
...r,
|
|
8835
8849
|
ref: t
|
|
8836
8850
|
}) : null;
|
|
8837
8851
|
});
|
|
8838
|
-
|
|
8839
|
-
var
|
|
8840
|
-
let a = e.useRef(null), o = q(i, a), s =
|
|
8852
|
+
Em.displayName = Tm;
|
|
8853
|
+
var Dm = "SelectBubbleInput", Om = e.forwardRef(({ __scopeSelect: t, value: n, ...r }, i) => {
|
|
8854
|
+
let a = e.useRef(null), o = q(i, a), s = yp(n);
|
|
8841
8855
|
return e.useEffect(() => {
|
|
8842
8856
|
let e = a.current;
|
|
8843
8857
|
if (!e) return;
|
|
@@ -8849,18 +8863,18 @@ var Em = "SelectBubbleInput", Dm = e.forwardRef(({ __scopeSelect: t, value: n, .
|
|
|
8849
8863
|
}, [s, n]), /* @__PURE__ */ p(Y.select, {
|
|
8850
8864
|
...r,
|
|
8851
8865
|
style: {
|
|
8852
|
-
|
|
8866
|
+
...$s,
|
|
8853
8867
|
...r.style
|
|
8854
8868
|
},
|
|
8855
8869
|
ref: o,
|
|
8856
8870
|
defaultValue: n
|
|
8857
8871
|
});
|
|
8858
8872
|
});
|
|
8859
|
-
|
|
8860
|
-
function
|
|
8873
|
+
Om.displayName = Dm;
|
|
8874
|
+
function km(e) {
|
|
8861
8875
|
return e === "" || e === void 0;
|
|
8862
8876
|
}
|
|
8863
|
-
function
|
|
8877
|
+
function Am(t) {
|
|
8864
8878
|
let n = Ft(t), r = e.useRef(""), i = e.useRef(0), a = e.useCallback((e) => {
|
|
8865
8879
|
let t = r.current + e;
|
|
8866
8880
|
n(t), (function e(t) {
|
|
@@ -8875,23 +8889,23 @@ function km(t) {
|
|
|
8875
8889
|
o
|
|
8876
8890
|
];
|
|
8877
8891
|
}
|
|
8878
|
-
function
|
|
8879
|
-
let r = t.length > 1 && Array.from(t).every((e) => e === t[0]) ? t[0] : t, i = n ? e.indexOf(n) : -1, a =
|
|
8892
|
+
function jm(e, t, n) {
|
|
8893
|
+
let r = t.length > 1 && Array.from(t).every((e) => e === t[0]) ? t[0] : t, i = n ? e.indexOf(n) : -1, a = Mm(e, Math.max(i, 0));
|
|
8880
8894
|
r.length === 1 && (a = a.filter((e) => e !== n));
|
|
8881
8895
|
let o = a.find((e) => e.textValue.toLowerCase().startsWith(r.toLowerCase()));
|
|
8882
8896
|
return o === n ? void 0 : o;
|
|
8883
8897
|
}
|
|
8884
|
-
function
|
|
8898
|
+
function Mm(e, t) {
|
|
8885
8899
|
return e.map((n, r) => e[(t + r) % e.length]);
|
|
8886
8900
|
}
|
|
8887
|
-
var
|
|
8901
|
+
var Nm = Np, Pm = Fp, Fm = Lp, Im = zp, Lm = Vp, Rm = Up, zm = rm, Bm = pm, Vm = hm;
|
|
8888
8902
|
//#endregion
|
|
8889
8903
|
//#region src/components/Select/Select.tsx
|
|
8890
|
-
function
|
|
8891
|
-
return /* @__PURE__ */ m(
|
|
8904
|
+
function Hm({ options: e, value: t, onChange: n, placeholder: r, icon: i, triggerClassName: a, contentClassName: o, viewportClassName: s, itemClassName: c }) {
|
|
8905
|
+
return /* @__PURE__ */ m(Nm, {
|
|
8892
8906
|
value: t,
|
|
8893
8907
|
onValueChange: n,
|
|
8894
|
-
children: [/* @__PURE__ */ m(
|
|
8908
|
+
children: [/* @__PURE__ */ m(Pm, {
|
|
8895
8909
|
className: K("flex gap-2 items-center px-4 py-3 group bg-card rounded-input w-82 text-fg text-[14px] leading-[1.3] focus-visible:outline-accent-hover focus-visible:outline-1", a),
|
|
8896
8910
|
children: [
|
|
8897
8911
|
i && /* @__PURE__ */ p("span", {
|
|
@@ -8900,24 +8914,246 @@ function Vm({ options: e, value: t, onChange: n, placeholder: r, icon: i, trigge
|
|
|
8900
8914
|
}),
|
|
8901
8915
|
/* @__PURE__ */ p("div", {
|
|
8902
8916
|
className: "flex-1 min-w-0 text-start",
|
|
8903
|
-
children: /* @__PURE__ */ p(
|
|
8917
|
+
children: /* @__PURE__ */ p(Fm, { placeholder: r })
|
|
8904
8918
|
}),
|
|
8905
|
-
/* @__PURE__ */ p(
|
|
8919
|
+
/* @__PURE__ */ p(Im, { children: /* @__PURE__ */ p(Es, { className: "transition-transform duration-500 group-data-[state=open]:rotate-180 shrink-0" }) })
|
|
8906
8920
|
]
|
|
8907
|
-
}), /* @__PURE__ */ p(
|
|
8921
|
+
}), /* @__PURE__ */ p(Lm, { children: /* @__PURE__ */ p(Rm, {
|
|
8908
8922
|
position: "popper",
|
|
8909
8923
|
sideOffset: 4,
|
|
8910
8924
|
className: K("p-2 w-82 text-fg bg-card rounded-input shadow-[0px_2px_12px_rgb(0_0_0/0.08)]", o),
|
|
8911
|
-
children: /* @__PURE__ */ p(
|
|
8925
|
+
children: /* @__PURE__ */ p(zm, {
|
|
8912
8926
|
className: K("flex flex-col gap-1", s),
|
|
8913
|
-
children: e.map((e) => /* @__PURE__ */ p(
|
|
8927
|
+
children: e.map((e) => /* @__PURE__ */ p(Bm, {
|
|
8914
8928
|
value: e.value,
|
|
8915
8929
|
className: K("px-2 py-2.25 text-[14px] leading-[1.3] rounded-sm data-[state=checked]:bg-page data-[highlighted]:outline-1 data-[highlighted]:outline-accent-hover data-[highlighted]:outline-offset-[-1px]", c),
|
|
8916
|
-
children: /* @__PURE__ */ p(
|
|
8930
|
+
children: /* @__PURE__ */ p(Vm, { children: e.label })
|
|
8917
8931
|
}, e.value))
|
|
8918
8932
|
})
|
|
8919
8933
|
}) })]
|
|
8920
8934
|
});
|
|
8921
8935
|
}
|
|
8922
8936
|
//#endregion
|
|
8923
|
-
|
|
8937
|
+
//#region src/components/SortControl/SortControl.tsx
|
|
8938
|
+
function Um({ label: e, field: t, active: n, direction: r, onChange: i, className: a }) {
|
|
8939
|
+
return /* @__PURE__ */ m("button", {
|
|
8940
|
+
type: "button",
|
|
8941
|
+
onClick: () => {
|
|
8942
|
+
n ? i(t, r === "asc" ? "desc" : "asc") : i(t, "asc");
|
|
8943
|
+
},
|
|
8944
|
+
className: K("flex items-center gap-1 text-base transition-colors cursor-pointer select-none", "dark:text-fg-secondary", n ? "text-fg" : "text-fg-muted hover:text-fg-secondary", a),
|
|
8945
|
+
children: [/* @__PURE__ */ p("span", { children: e }), /* @__PURE__ */ p(Cs, {
|
|
8946
|
+
width: 16,
|
|
8947
|
+
height: 16,
|
|
8948
|
+
className: K("shrink-0 transition-transform duration-200", n && r === "asc" ? "rotate-180" : "rotate-0")
|
|
8949
|
+
})]
|
|
8950
|
+
});
|
|
8951
|
+
}
|
|
8952
|
+
//#endregion
|
|
8953
|
+
//#region src/components/DataTable/DataTableRow.tsx
|
|
8954
|
+
var Wm = {
|
|
8955
|
+
md: {
|
|
8956
|
+
desktop: "hidden md:flex",
|
|
8957
|
+
tablet: "hidden min-[480px]:flex md:hidden"
|
|
8958
|
+
},
|
|
8959
|
+
lg: {
|
|
8960
|
+
desktop: "hidden lg:flex",
|
|
8961
|
+
tablet: "hidden min-[480px]:flex lg:hidden"
|
|
8962
|
+
}
|
|
8963
|
+
};
|
|
8964
|
+
function Gm(e, t) {
|
|
8965
|
+
let n = [];
|
|
8966
|
+
for (let r = 0; r < e.length; r += t) n.push(e.slice(r, r + t));
|
|
8967
|
+
return n;
|
|
8968
|
+
}
|
|
8969
|
+
function Km(e) {
|
|
8970
|
+
return {
|
|
8971
|
+
width: e.width == null ? void 0 : typeof e.width == "number" ? `${e.width}px` : e.width,
|
|
8972
|
+
flex: e.flex,
|
|
8973
|
+
minWidth: 0
|
|
8974
|
+
};
|
|
8975
|
+
}
|
|
8976
|
+
function qm(e, t, n) {
|
|
8977
|
+
if (e.render) return e.render(t, n);
|
|
8978
|
+
let r = t[e.key];
|
|
8979
|
+
return r == null ? "" : typeof r == "string" ? r : JSON.stringify(r);
|
|
8980
|
+
}
|
|
8981
|
+
function Jm({ row: e, index: t, columns: n, isDisabled: r = !1, hasAction: i = !1, mobileActionLabel: a = "Подробнее", mobileDisabledLabel: o = "Нет сведений", tabletColumns: s = 3, desktopBreakpoint: c = "md", onClick: l }) {
|
|
8982
|
+
let u = !!l && !r, d = u ? {
|
|
8983
|
+
role: "button",
|
|
8984
|
+
tabIndex: 0,
|
|
8985
|
+
onClick: () => {
|
|
8986
|
+
u && l();
|
|
8987
|
+
},
|
|
8988
|
+
onKeyDown: (e) => {
|
|
8989
|
+
u && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), l());
|
|
8990
|
+
}
|
|
8991
|
+
} : {}, h = K("bg-card rounded-xl transition-colors", r ? "text-fg-muted" : "text-fg", !r && u ? "cursor-pointer hover:brightness-[0.97]" : ""), g = r ? "py-[11px]" : "py-4", _ = n.filter((e) => !e.desktopOnly), v = Gm(_, s), { desktop: y, tablet: b } = Wm[c], x = i && /* @__PURE__ */ p("div", {
|
|
8992
|
+
className: "shrink-0 flex items-center justify-center size-5 rounded-full bg-subtle",
|
|
8993
|
+
children: r ? /* @__PURE__ */ p(Is, {
|
|
8994
|
+
width: 12,
|
|
8995
|
+
height: 12,
|
|
8996
|
+
className: "text-fg-muted"
|
|
8997
|
+
}) : /* @__PURE__ */ p(ws, { className: "text-fg" })
|
|
8998
|
+
}), S = i && /* @__PURE__ */ p("span", {
|
|
8999
|
+
className: "shrink-0 px-2 py-0.5 bg-subtle rounded-full text-xs text-neutral whitespace-nowrap",
|
|
9000
|
+
children: r ? o : a
|
|
9001
|
+
});
|
|
9002
|
+
return /* @__PURE__ */ m(f, { children: [
|
|
9003
|
+
/* @__PURE__ */ m("div", {
|
|
9004
|
+
className: K(y, "items-center px-3 gap-5", g, h),
|
|
9005
|
+
"aria-disabled": r || void 0,
|
|
9006
|
+
...d,
|
|
9007
|
+
children: [n.map((n) => /* @__PURE__ */ p("div", {
|
|
9008
|
+
className: "shrink-0 text-base overflow-hidden text-ellipsis",
|
|
9009
|
+
style: Km(n),
|
|
9010
|
+
children: qm(n, e, t)
|
|
9011
|
+
}, n.key)), i && /* @__PURE__ */ p("div", {
|
|
9012
|
+
className: "ml-auto",
|
|
9013
|
+
children: x
|
|
9014
|
+
})]
|
|
9015
|
+
}),
|
|
9016
|
+
/* @__PURE__ */ m("div", {
|
|
9017
|
+
className: K(b, "items-start gap-[10px] p-3", h),
|
|
9018
|
+
"aria-disabled": r || void 0,
|
|
9019
|
+
...d,
|
|
9020
|
+
children: [/* @__PURE__ */ p("div", {
|
|
9021
|
+
className: "flex-1 flex flex-col gap-[10px] min-w-0",
|
|
9022
|
+
children: v.map((n, r) => /* @__PURE__ */ p("div", {
|
|
9023
|
+
className: "flex gap-3 w-full",
|
|
9024
|
+
children: n.map((n) => /* @__PURE__ */ m("div", {
|
|
9025
|
+
className: "flex-1 flex flex-col gap-1 min-w-0",
|
|
9026
|
+
children: [/* @__PURE__ */ p("span", {
|
|
9027
|
+
className: "text-xs text-fg-secondary",
|
|
9028
|
+
children: n.label
|
|
9029
|
+
}), /* @__PURE__ */ p("div", {
|
|
9030
|
+
className: "text-sm",
|
|
9031
|
+
children: qm(n, e, t)
|
|
9032
|
+
})]
|
|
9033
|
+
}, n.key))
|
|
9034
|
+
}, r))
|
|
9035
|
+
}), x]
|
|
9036
|
+
}),
|
|
9037
|
+
/* @__PURE__ */ p("div", {
|
|
9038
|
+
className: K("min-[480px]:hidden flex flex-col gap-[10px] px-3 py-4", h),
|
|
9039
|
+
"aria-disabled": r || void 0,
|
|
9040
|
+
...d,
|
|
9041
|
+
children: _.map((n, r) => /* @__PURE__ */ m("div", {
|
|
9042
|
+
className: "flex flex-col gap-1",
|
|
9043
|
+
children: [/* @__PURE__ */ m("div", {
|
|
9044
|
+
className: "flex items-center justify-between gap-2",
|
|
9045
|
+
children: [/* @__PURE__ */ p("span", {
|
|
9046
|
+
className: "text-xs text-fg-secondary",
|
|
9047
|
+
children: n.label
|
|
9048
|
+
}), r === 0 && S]
|
|
9049
|
+
}), /* @__PURE__ */ p("div", {
|
|
9050
|
+
className: "text-sm",
|
|
9051
|
+
children: qm(n, e, t)
|
|
9052
|
+
})]
|
|
9053
|
+
}, n.key))
|
|
9054
|
+
})
|
|
9055
|
+
] });
|
|
9056
|
+
}
|
|
9057
|
+
//#endregion
|
|
9058
|
+
//#region src/components/DataTable/DataTable.tsx
|
|
9059
|
+
var Ym = {
|
|
9060
|
+
md: {
|
|
9061
|
+
show: "hidden md:flex",
|
|
9062
|
+
hide: "md:hidden"
|
|
9063
|
+
},
|
|
9064
|
+
lg: {
|
|
9065
|
+
show: "hidden lg:flex",
|
|
9066
|
+
hide: "lg:hidden"
|
|
9067
|
+
}
|
|
9068
|
+
};
|
|
9069
|
+
function Xm({ columns: e, rows: t, isRowDisabled: n, onRowClick: r, getRowKey: i, sortField: a, sortDirection: o = "asc", onSortChange: s, mobileActionLabel: c = "Подробнее", mobileDisabledLabel: l = "Нет сведений", tabletColumns: u = 3, desktopBreakpoint: d = "md", className: f }) {
|
|
9070
|
+
let h = e.filter((e) => e.sortable), g = h.length > 0 && !!s, _ = h.flatMap((e) => [{
|
|
9071
|
+
value: `${e.key}::asc`,
|
|
9072
|
+
label: `По ${e.label} А – Я`
|
|
9073
|
+
}, {
|
|
9074
|
+
value: `${e.key}::desc`,
|
|
9075
|
+
label: `По ${e.label} Я – А`
|
|
9076
|
+
}]), v = a && o ? `${a}::${o}` : _[0]?.value ?? "", y = (e) => {
|
|
9077
|
+
let t = e.lastIndexOf("::");
|
|
9078
|
+
t === -1 || !s || s(e.slice(0, t), e.slice(t + 2));
|
|
9079
|
+
}, b = !!r, { show: x, hide: S } = Ym[d];
|
|
9080
|
+
return /* @__PURE__ */ m("div", {
|
|
9081
|
+
className: K("flex flex-col gap-3", f),
|
|
9082
|
+
children: [
|
|
9083
|
+
g && /* @__PURE__ */ p("div", {
|
|
9084
|
+
className: K(S, "flex"),
|
|
9085
|
+
children: /* @__PURE__ */ p(Hm, {
|
|
9086
|
+
options: _,
|
|
9087
|
+
value: v,
|
|
9088
|
+
onChange: y,
|
|
9089
|
+
icon: /* @__PURE__ */ p(bs, {
|
|
9090
|
+
width: 16,
|
|
9091
|
+
height: 16,
|
|
9092
|
+
className: "text-accent"
|
|
9093
|
+
}),
|
|
9094
|
+
triggerClassName: "flex-1 min-w-0",
|
|
9095
|
+
contentClassName: "w-full"
|
|
9096
|
+
})
|
|
9097
|
+
}),
|
|
9098
|
+
/* @__PURE__ */ m("div", {
|
|
9099
|
+
className: K(x, "items-center px-3 gap-5"),
|
|
9100
|
+
children: [e.map((e) => /* @__PURE__ */ p("div", {
|
|
9101
|
+
className: "shrink-0 text-base text-fg-muted dark:text-fg-secondary",
|
|
9102
|
+
style: {
|
|
9103
|
+
width: e.width == null ? void 0 : typeof e.width == "number" ? `${e.width}px` : e.width,
|
|
9104
|
+
flex: e.flex,
|
|
9105
|
+
minWidth: 0
|
|
9106
|
+
},
|
|
9107
|
+
children: e.sortable && s ? /* @__PURE__ */ m("span", {
|
|
9108
|
+
className: "flex items-center gap-1",
|
|
9109
|
+
children: [/* @__PURE__ */ p(Um, {
|
|
9110
|
+
label: e.label,
|
|
9111
|
+
field: e.key,
|
|
9112
|
+
active: a === e.key,
|
|
9113
|
+
direction: a === e.key ? o : "asc",
|
|
9114
|
+
onChange: s
|
|
9115
|
+
}), e.tooltip && /* @__PURE__ */ p(Uc, {
|
|
9116
|
+
content: e.tooltip,
|
|
9117
|
+
children: /* @__PURE__ */ p("span", {
|
|
9118
|
+
className: "flex items-center cursor-help text-fg-secondary hover:text-accent transition-colors",
|
|
9119
|
+
children: /* @__PURE__ */ p(Ps, {
|
|
9120
|
+
width: 12,
|
|
9121
|
+
height: 12
|
|
9122
|
+
})
|
|
9123
|
+
})
|
|
9124
|
+
})]
|
|
9125
|
+
}) : e.tooltip ? /* @__PURE__ */ p(Uc, {
|
|
9126
|
+
content: e.tooltip,
|
|
9127
|
+
children: /* @__PURE__ */ m("span", {
|
|
9128
|
+
className: "flex items-center gap-1 cursor-help group",
|
|
9129
|
+
children: [e.label, /* @__PURE__ */ p("span", {
|
|
9130
|
+
className: "flex items-center text-fg-secondary group-hover:text-accent transition-colors",
|
|
9131
|
+
children: /* @__PURE__ */ p(Ps, {
|
|
9132
|
+
width: 12,
|
|
9133
|
+
height: 12
|
|
9134
|
+
})
|
|
9135
|
+
})]
|
|
9136
|
+
})
|
|
9137
|
+
}) : /* @__PURE__ */ p("span", { children: e.label })
|
|
9138
|
+
}, e.key)), b && /* @__PURE__ */ p("div", { className: "ml-auto shrink-0 size-5" })]
|
|
9139
|
+
}),
|
|
9140
|
+
/* @__PURE__ */ p("div", {
|
|
9141
|
+
className: "flex flex-col gap-1",
|
|
9142
|
+
children: t.map((t, a) => /* @__PURE__ */ p(Jm, {
|
|
9143
|
+
row: t,
|
|
9144
|
+
index: a,
|
|
9145
|
+
columns: e,
|
|
9146
|
+
isDisabled: n?.(t),
|
|
9147
|
+
hasAction: b,
|
|
9148
|
+
mobileActionLabel: c,
|
|
9149
|
+
mobileDisabledLabel: l,
|
|
9150
|
+
tabletColumns: u,
|
|
9151
|
+
desktopBreakpoint: d,
|
|
9152
|
+
onClick: r ? () => r(t) : void 0
|
|
9153
|
+
}, i ? i(t, a) : String(a)))
|
|
9154
|
+
})
|
|
9155
|
+
]
|
|
9156
|
+
});
|
|
9157
|
+
}
|
|
9158
|
+
//#endregion
|
|
9159
|
+
export { Gd as Accordion, Kd as AccordionItem, Jf as AdministrationIcon, bs as ArrowDownArrowUpIcon, xs as ArrowDownToBracketIcon, Cs as ArrowIcon, Ss as ArrowUpRightFromSquareIcon, ws as ArrowsIcon, bt as Badge, Ts as BottleIcon, yt as Button, nt as Caption, Jd as Card, Es as ChevronDownIcon, xt as Chip, Ds as CircleAttentionIcon, Os as CircleMinusIcon, ks as CirclePlusIcon, As as CircleXmarkIcon, js as CopyIcon, St as Counter, Xm as DataTable, Ms as DnaIcon, Bu as Drawer, Yd as EmptyState, Xd as ErrorState, Ns as FileArrowDownIcon, $e as Heading, Ps as InfoCircleIcon, Ct as Input, tt as Label, Fs as MenuIcon, Is as MinusIcon, Ls as MoonStarsIcon, Rs as PlusIcon, Xs as SearchBar, ys as SearchDropdown, zs as SearchIcon, Bs as SearchListIcon, Hm as Select, _s as Skeleton, Um as SortControl, gs as Spinner, Hs as SunIcon, Vs as SunMiniIcon, Xf as Switch, Rf as Tabs, dp as TagFilter, Us as TestTubeIcon, et as Text, sp as ThemeProvider, lp as ThemeToggle, Ws as ThermometerIcon, Uc as Tooltip, Gs as VirusIcon, qs as XmarkIcon, Ks as XmarkLargeIcon, K as cn, Qf as darkTheme, Zf as defaultTheme, ep as themes, np as tokensToCssVars, cp as useTheme };
|