mimir-ui-kit 1.39.3 → 1.40.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/PromoSlider.css +1 -0
- package/dist/assets/SelectSearch.css +1 -1
- package/dist/assets/Tag.css +1 -1
- package/dist/assets/index.css +1 -1
- package/dist/components/Chip/Chip.d.ts +5 -1
- package/dist/components/Chip/index.d.ts +1 -1
- package/dist/components/PromoSlider/PromoSlider.d.ts +59 -0
- package/dist/components/PromoSlider/PromoSlider.js +320 -0
- package/dist/components/PromoSlider/index.d.ts +1 -0
- package/dist/components/PromoSlider/index.js +4 -0
- package/dist/components/SelectSearch/SelectSearch.js +74 -73
- package/dist/components/SelectSearch/constants.d.ts +1 -0
- package/dist/components/SelectSearch/constants.js +1 -1
- package/dist/components/SelectSearch/utils.js +10 -8
- package/dist/components/Slider/Slider.js +113 -2993
- package/dist/components/Tag/Tag.d.ts +1 -1
- package/dist/components/Tag/Tag.js +29 -28
- package/dist/components/Tag/constants.d.ts +1 -0
- package/dist/components/Tag/constants.js +2 -2
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +6 -4
- package/dist/index.js +43 -41
- package/dist/swiper-react-BvAw14a4.js +2901 -0
- package/package.json +1 -1
@@ -1,83 +1,84 @@
|
|
1
|
-
import { jsx as
|
2
|
-
import { c as
|
1
|
+
import { jsx as n, jsxs as h, Fragment as D } from "react/jsx-runtime";
|
2
|
+
import { c as i } from "../../index-DIxK0V-G.js";
|
3
3
|
import { forwardRef as U, useState as q, useMemo as W, useCallback as R, useEffect as $ } from "react";
|
4
|
-
import { ESelectSearchSize as
|
4
|
+
import { ESelectSearchSize as b } from "./constants.js";
|
5
5
|
import { mapSizeToInputSize as A, getDropdownArrowIcon as J } from "./utils.js";
|
6
6
|
import { Icon as O } from "../../icons/Icon.js";
|
7
7
|
import { Button as Q } from "../Button/Button.js";
|
8
8
|
import { I as B } from "../../Input-DAmc_HxO.js";
|
9
9
|
import { EInputVariant as X } from "../Input/constants.js";
|
10
10
|
import { H as Y, U as M, G as j, K as Z, W as ee } from "../../combobox-Dv6-ANkb.js";
|
11
|
-
import '../../assets/SelectSearch.css';const te = "
|
12
|
-
"select-search": "_select-
|
11
|
+
import '../../assets/SelectSearch.css';const te = "_disabled_lhab4_6", oe = "_container_lhab4_13", ae = "_full_lhab4_26", se = "_button_lhab4_38", ne = "_options_lhab4_52", le = "_top_lhab4_63", ie = "_bottom_lhab4_69", re = "_s_lhab4_2", ce = "_m_lhab4_110", de = "_l_lhab4_123", pe = "_option_lhab4_52", ue = "_clear_lhab4_175", e = {
|
12
|
+
"select-search": "_select-search_lhab4_2",
|
13
13
|
disabled: te,
|
14
14
|
container: oe,
|
15
|
-
"container-open": "_container-
|
16
|
-
full:
|
17
|
-
"selected-icon": "_selected-
|
18
|
-
"selector-icon-open": "_selector-icon-
|
15
|
+
"container-open": "_container-open_lhab4_22",
|
16
|
+
full: ae,
|
17
|
+
"selected-icon": "_selected-icon_lhab4_30",
|
18
|
+
"selector-icon-open": "_selector-icon-open_lhab4_34",
|
19
19
|
button: se,
|
20
|
-
"selector-icon": "_selector-
|
21
|
-
options:
|
22
|
-
top:
|
23
|
-
bottom:
|
24
|
-
"no-options": "_no-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
"select-input
|
29
|
-
|
30
|
-
|
31
|
-
"option-
|
32
|
-
"
|
33
|
-
"
|
34
|
-
|
35
|
-
|
20
|
+
"selector-icon": "_selector-icon_lhab4_34",
|
21
|
+
options: ne,
|
22
|
+
top: le,
|
23
|
+
bottom: ie,
|
24
|
+
"no-options": "_no-options_lhab4_75",
|
25
|
+
s: re,
|
26
|
+
m: ce,
|
27
|
+
l: de,
|
28
|
+
"select-input": "_select-input_lhab4_136",
|
29
|
+
"select-input-disabled": "_select-input-disabled_lhab4_139",
|
30
|
+
option: pe,
|
31
|
+
"option-active": "_option-active_lhab4_155",
|
32
|
+
"option-inner": "_option-inner_lhab4_158",
|
33
|
+
"right-slot": "_right-slot_lhab4_165",
|
34
|
+
"required-mark": "_required-mark_lhab4_170",
|
35
|
+
clear: ue,
|
36
|
+
"icon-button": "_icon-button_lhab4_184"
|
36
37
|
}, Ce = U(
|
37
38
|
(E, L) => {
|
38
39
|
const {
|
39
40
|
placeholder: w,
|
40
|
-
size: a =
|
41
|
-
value:
|
42
|
-
onChange:
|
41
|
+
size: a = b.L,
|
42
|
+
value: l,
|
43
|
+
onChange: s,
|
43
44
|
full: V,
|
44
|
-
showArrow:
|
45
|
+
showArrow: S = !0,
|
45
46
|
items: u = [],
|
46
47
|
classNameOption: F,
|
47
48
|
displayValue: G = "name",
|
48
|
-
filterOnSearch:
|
49
|
-
onSearch:
|
50
|
-
variant:
|
51
|
-
menuPlacement:
|
49
|
+
filterOnSearch: C = !0,
|
50
|
+
onSearch: f,
|
51
|
+
variant: I = X.DefaultGray,
|
52
|
+
menuPlacement: N = "bottom",
|
52
53
|
disabled: r = !1,
|
53
54
|
searchProps: y,
|
54
|
-
withClearButton:
|
55
|
+
withClearButton: v = !1,
|
55
56
|
disableInput: c = !1,
|
56
57
|
autocomplete: k = "on",
|
57
58
|
immediate: P = !1
|
58
|
-
} = E,
|
59
|
+
} = E, g = String((l == null ? void 0 : l[G]) || ""), [d, _] = q(g), [p, m] = q(l), x = W(() => C && d.trim().toLowerCase() ? u.filter(
|
59
60
|
(t) => t.name.toLowerCase().includes(d.toLowerCase())
|
60
|
-
) : u, [d, u,
|
61
|
-
t ? (
|
61
|
+
) : u, [d, u, C]), T = (t) => {
|
62
|
+
t ? (_(t.name), m(t), s == null || s(t)) : (_(""), m(null), s == null || s({ id: "", name: "" }));
|
62
63
|
}, z = R(
|
63
64
|
(t) => {
|
64
65
|
if (c) return;
|
65
66
|
const o = t.target.value;
|
66
|
-
|
67
|
+
_(o), f == null || f(o), p && o !== p.name && m(null), !o && l && (s == null || s({ id: "", name: "" }));
|
67
68
|
},
|
68
|
-
[c,
|
69
|
+
[c, s, f, l, p]
|
69
70
|
), H = () => {
|
70
|
-
|
71
|
+
_(""), m(null), s == null || s({ id: "", name: "" });
|
71
72
|
};
|
72
73
|
return $(() => {
|
73
|
-
const t = !
|
74
|
-
|
75
|
-
}, [
|
74
|
+
const t = !l || typeof l == "object" && !Object.keys(l).length;
|
75
|
+
_(t ? "" : g), m(t ? null : l);
|
76
|
+
}, [l, g]), /* @__PURE__ */ n(
|
76
77
|
Y,
|
77
78
|
{
|
78
79
|
as: "div",
|
79
80
|
value: p,
|
80
|
-
className:
|
81
|
+
className: i(e["select-search"], {
|
81
82
|
[e.full]: V,
|
82
83
|
[e.disabled]: r
|
83
84
|
}),
|
@@ -90,24 +91,24 @@ import '../../assets/SelectSearch.css';const te = "_disabled_1bph7_6", oe = "_co
|
|
90
91
|
/* @__PURE__ */ h(
|
91
92
|
"div",
|
92
93
|
{
|
93
|
-
className:
|
94
|
+
className: i(e.container, e[a], {
|
94
95
|
[e["container-open"]]: t
|
95
96
|
}),
|
96
97
|
children: [
|
97
98
|
c && /* @__PURE__ */ h("div", { style: { position: "relative", width: "100%" }, children: [
|
98
|
-
/* @__PURE__ */
|
99
|
+
/* @__PURE__ */ n(M, { disabled: r, style: { width: "100%" }, children: /* @__PURE__ */ n(
|
99
100
|
j,
|
100
101
|
{
|
101
102
|
as: B,
|
102
103
|
label: w,
|
103
104
|
size: A(a),
|
104
|
-
className:
|
105
|
-
[e["select-input-disabled"]]: c &&
|
105
|
+
className: i(e["select-input"], {
|
106
|
+
[e["select-input-disabled"]]: c && v
|
106
107
|
}),
|
107
108
|
onChange: z,
|
108
109
|
value: d,
|
109
110
|
disabled: r,
|
110
|
-
variant:
|
111
|
+
variant: I,
|
111
112
|
rightSlotClassName: e["right-slot"],
|
112
113
|
requiredMarkClassName: e["required-mark"],
|
113
114
|
"data-testid": "select-search-input",
|
@@ -122,11 +123,11 @@ import '../../assets/SelectSearch.css';const te = "_disabled_1bph7_6", oe = "_co
|
|
122
123
|
...y
|
123
124
|
}
|
124
125
|
) }),
|
125
|
-
|
126
|
+
v && d && /* @__PURE__ */ n(
|
126
127
|
Q,
|
127
128
|
{
|
128
129
|
tabIndex: -1,
|
129
|
-
className:
|
130
|
+
className: i(e.clear, {
|
130
131
|
[e.disabled]: r
|
131
132
|
}),
|
132
133
|
iconButtonClassName: e["icon-button"],
|
@@ -143,7 +144,7 @@ import '../../assets/SelectSearch.css';const te = "_disabled_1bph7_6", oe = "_co
|
|
143
144
|
}
|
144
145
|
)
|
145
146
|
] }),
|
146
|
-
!c && /* @__PURE__ */
|
147
|
+
!c && /* @__PURE__ */ n(
|
147
148
|
j,
|
148
149
|
{
|
149
150
|
as: B,
|
@@ -153,25 +154,25 @@ import '../../assets/SelectSearch.css';const te = "_disabled_1bph7_6", oe = "_co
|
|
153
154
|
onChange: z,
|
154
155
|
value: d,
|
155
156
|
disabled: r,
|
156
|
-
variant:
|
157
|
-
withClearButton:
|
157
|
+
variant: I,
|
158
|
+
withClearButton: v,
|
158
159
|
rightSlotClassName: e["right-slot"],
|
159
160
|
requiredMarkClassName: e["required-mark"],
|
160
161
|
"data-testid": "select-search-input",
|
161
|
-
rightAddon:
|
162
|
+
rightAddon: S ? {
|
162
163
|
addonType: "react-node",
|
163
|
-
addonContent:
|
164
|
+
addonContent: S && /* @__PURE__ */ n(
|
164
165
|
M,
|
165
166
|
{
|
166
|
-
className:
|
167
|
+
className: i(e.button, {
|
167
168
|
[e.disabled]: r
|
168
169
|
}),
|
169
170
|
disabled: r,
|
170
|
-
children: /* @__PURE__ */
|
171
|
+
children: /* @__PURE__ */ n(
|
171
172
|
O,
|
172
173
|
{
|
173
|
-
iconName: a ==
|
174
|
-
className:
|
174
|
+
iconName: a == b.M || a == b.S ? "DropdownArrowBottom16px" : "DropdownArrowDown24px",
|
175
|
+
className: i(e["selector-icon"], {
|
175
176
|
[e["selector-icon-open"]]: t
|
176
177
|
})
|
177
178
|
}
|
@@ -189,20 +190,20 @@ import '../../assets/SelectSearch.css';const te = "_disabled_1bph7_6", oe = "_co
|
|
189
190
|
]
|
190
191
|
}
|
191
192
|
),
|
192
|
-
t && /* @__PURE__ */
|
193
|
+
t && /* @__PURE__ */ n(D, { children: u.length ? x.length ? /* @__PURE__ */ n(
|
193
194
|
Z,
|
194
195
|
{
|
195
196
|
"data-testid": "select-search-options",
|
196
|
-
className:
|
197
|
+
className: i(
|
197
198
|
e.options,
|
198
199
|
e[a],
|
199
|
-
e[
|
200
|
+
e[N]
|
200
201
|
),
|
201
202
|
children: ({ option: o }) => /* @__PURE__ */ h(
|
202
203
|
ee,
|
203
204
|
{
|
204
205
|
value: o,
|
205
|
-
className: ({ focus: K }) =>
|
206
|
+
className: ({ focus: K }) => i(
|
206
207
|
e.option,
|
207
208
|
F,
|
208
209
|
a && e[a],
|
@@ -214,12 +215,12 @@ import '../../assets/SelectSearch.css';const te = "_disabled_1bph7_6", oe = "_co
|
|
214
215
|
children: [
|
215
216
|
/* @__PURE__ */ h("div", { className: e["option-inner"], children: [
|
216
217
|
o.name,
|
217
|
-
o.bottom && /* @__PURE__ */
|
218
|
+
o.bottom && /* @__PURE__ */ n("div", { children: o.bottom })
|
218
219
|
] }),
|
219
|
-
p && p.id === o.id && /* @__PURE__ */
|
220
|
+
p && p.id === o.id && /* @__PURE__ */ n(
|
220
221
|
O,
|
221
222
|
{
|
222
|
-
iconName: a ===
|
223
|
+
iconName: a === b.M || a === b.S ? "Done16px" : "Done24px",
|
223
224
|
className: e["selected-icon"]
|
224
225
|
}
|
225
226
|
)
|
@@ -228,26 +229,26 @@ import '../../assets/SelectSearch.css';const te = "_disabled_1bph7_6", oe = "_co
|
|
228
229
|
o.id
|
229
230
|
)
|
230
231
|
}
|
231
|
-
) : /* @__PURE__ */
|
232
|
+
) : /* @__PURE__ */ n(
|
232
233
|
"div",
|
233
234
|
{
|
234
|
-
className:
|
235
|
+
className: i(
|
235
236
|
e.options,
|
236
237
|
e[a],
|
237
238
|
e["no-options"],
|
238
|
-
e[
|
239
|
+
e[N]
|
239
240
|
),
|
240
241
|
"data-headlessui-state": t ? "open" : "closed",
|
241
242
|
children: "Ничего не найдено"
|
242
243
|
}
|
243
|
-
) : /* @__PURE__ */
|
244
|
+
) : /* @__PURE__ */ n(
|
244
245
|
"div",
|
245
246
|
{
|
246
|
-
className:
|
247
|
+
className: i(
|
247
248
|
e.options,
|
248
249
|
e[a],
|
249
250
|
e["no-options"],
|
250
|
-
e[
|
251
|
+
e[N]
|
251
252
|
),
|
252
253
|
"data-headlessui-state": t ? "open" : "closed",
|
253
254
|
children: "Нет данных"
|
@@ -1,17 +1,19 @@
|
|
1
1
|
import { ESelectSearchSize as r } from "./constants.js";
|
2
2
|
import "../../Input-DAmc_HxO.js";
|
3
|
-
import { EInputSize as
|
4
|
-
const c = (
|
5
|
-
switch (
|
3
|
+
import { EInputSize as o } from "../Input/constants.js";
|
4
|
+
const c = (t) => {
|
5
|
+
switch (t) {
|
6
|
+
case r.S:
|
7
|
+
return o.S;
|
6
8
|
case r.M:
|
7
|
-
return
|
9
|
+
return o.M;
|
8
10
|
case r.L:
|
9
|
-
return
|
11
|
+
return o.L;
|
10
12
|
default:
|
11
|
-
return
|
13
|
+
return o.M;
|
12
14
|
}
|
13
|
-
},
|
15
|
+
}, u = (t, e) => t ? e === r.L ? "DropdownArrowUp24px" : "DropdownArrowUp16px" : e === r.L ? "DropdownArrowDown24px" : "DropdownArrowBottom16px";
|
14
16
|
export {
|
15
|
-
|
17
|
+
u as getDropdownArrowIcon,
|
16
18
|
c as mapSizeToInputSize
|
17
19
|
};
|