mimir-ui-kit 1.36.7 → 1.36.9
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/{Input-WnjLXNpw.js → Input-CbgqYgLo.js} +65 -63
- package/dist/assets/TextArea.css +1 -1
- package/dist/{combobox-CDU06zJj.js → combobox-BpYucpxz.js} +1121 -1080
- package/dist/components/Accordion/Accordion.js +15 -15
- package/dist/components/CheckboxMimir/CheckboxMimir.js +4 -4
- package/dist/components/DatePicker/DatePicker.js +1 -1
- package/dist/components/Input/Input.d.ts +4 -0
- package/dist/components/Input/Input.js +1 -1
- package/dist/components/Input/index.js +1 -1
- package/dist/components/InputPassword/InputPassword.js +1 -1
- package/dist/components/InputPhoneNumber/InputPhoneNumber.js +1 -1
- package/dist/components/MultiSelectSearch/MultiSelectSearch.d.ts +1 -0
- package/dist/components/MultiSelectSearch/MultiSelectSearch.js +108 -105
- package/dist/components/MultiSelectSearch/types.d.ts +2 -0
- package/dist/components/MultiSelectSearch/utils.js +1 -1
- package/dist/components/OtpInput/OtpInput.js +1 -1
- package/dist/components/RadioGroup/RadioGroup.js +3 -3
- package/dist/components/SelectSearch/SelectSearch.d.ts +1 -0
- package/dist/components/SelectSearch/SelectSearch.js +96 -92
- package/dist/components/SelectSearch/types.d.ts +2 -0
- package/dist/components/SelectSearch/utils.js +1 -1
- package/dist/components/Switcher/Switcher.js +4 -4
- package/dist/components/TabTrail/TabTrail.js +4 -4
- package/dist/components/TextArea/TextArea.js +39 -39
- package/dist/components/index.js +1 -1
- package/dist/{field-FJ34aSs4.js → field-C1kt7aNM.js} +2 -2
- package/dist/{focus-management-XwV-9qkO.js → focus-management-DOYCPyGg.js} +1 -1
- package/dist/{hidden-DbgtYPOH.js → hidden-PvGXrYUY.js} +1 -1
- package/dist/index.js +1 -1
- package/dist/{keyboard-B0lm_zyn.js → keyboard-mgWkd2Vh.js} +114 -111
- package/dist/{label-y3ANLTNC.js → label-D4GFpe5F.js} +2 -2
- package/dist/open-closed-D2VjDhAN.js +86 -0
- package/dist/{use-active-press-86hajhdd.js → use-active-press-CqLGIFz7.js} +1 -1
- package/package.json +1 -1
- package/dist/open-closed-CdldUPoq.js +0 -86
@@ -1,16 +1,16 @@
|
|
1
1
|
import { jsxs as x, Fragment as X, jsx as v } from "react/jsx-runtime";
|
2
2
|
import { c as D } from "../../index-DIxK0V-G.js";
|
3
|
-
import S, { createContext as F, useRef as oe, Fragment as ne, useReducer as de, useMemo as R, useId as re, useEffect as le, useState as se, useContext as
|
3
|
+
import S, { createContext as F, useRef as oe, Fragment as ne, useReducer as de, useMemo as R, useId as re, useEffect as le, useState as se, useContext as H, forwardRef as pe } from "react";
|
4
4
|
import { AccordionItem as me } from "./AccordionItem/AccordionItem.js";
|
5
5
|
import { EAccordionButtonType as w, EAccordionSize as O, EAccordionLinkIconSize as G, EAccordionButtonStyle as fe, EAccordionIconType as J, EAccordionButtonIconSize as Y } from "./constants.js";
|
6
6
|
import { useMediaQuery as _e } from "../../hooks/useMediaQuery/useMediaQuery.js";
|
7
7
|
import { EMediaQuery as Ee } from "../../hooks/useMediaQuery/constants.js";
|
8
8
|
import { Icon as ke } from "../../icons/Icon.js";
|
9
9
|
import { Link as Se } from "../AnchorLink/Link.js";
|
10
|
-
import { M as Z, W as K, y as U, T as Ie, o as $, a as q, H as j, I as ae, $ as be, b as ve, D as ee, u as he, c as N } from "../../keyboard-
|
11
|
-
import { w as ye } from "../../use-active-press-
|
10
|
+
import { M as Z, W as K, y as U, T as Ie, o as $, a as q, H as j, I as ae, $ as be, b as ve, D as ee, u as he, c as N } from "../../keyboard-mgWkd2Vh.js";
|
11
|
+
import { w as ye } from "../../use-active-press-CqLGIFz7.js";
|
12
12
|
import { e as De } from "../../use-resolve-button-type-DhFdPxnv.js";
|
13
|
-
import { c as $e, i as M, u as Pe,
|
13
|
+
import { c as $e, i as M, u as Pe, x as ge, R as Te, s as we } from "../../open-closed-D2VjDhAN.js";
|
14
14
|
import { r as Ne } from "../../bugs-diTMAGNw.js";
|
15
15
|
import '../../assets/Accordion.css';let Ce = F(() => {
|
16
16
|
});
|
@@ -33,7 +33,7 @@ let Re = { 0: (e) => ({ ...e, disclosureState: q(e.disclosureState, { 0: 1, 1: 0
|
|
33
33
|
} }, W = F(null);
|
34
34
|
W.displayName = "DisclosureContext";
|
35
35
|
function Q(e) {
|
36
|
-
let t =
|
36
|
+
let t = H(W);
|
37
37
|
if (t === null) {
|
38
38
|
let a = new Error(`<${e} /> is missing a parent <Disclosure /> component.`);
|
39
39
|
throw Error.captureStackTrace && Error.captureStackTrace(a, Q), a;
|
@@ -43,7 +43,7 @@ function Q(e) {
|
|
43
43
|
let V = F(null);
|
44
44
|
V.displayName = "DisclosureAPIContext";
|
45
45
|
function ce(e) {
|
46
|
-
let t =
|
46
|
+
let t = H(V);
|
47
47
|
if (t === null) {
|
48
48
|
let a = new Error(`<${e} /> is missing a parent <Disclosure /> component.`);
|
49
49
|
throw Error.captureStackTrace && Error.captureStackTrace(a, ce), a;
|
@@ -53,13 +53,13 @@ function ce(e) {
|
|
53
53
|
let z = F(null);
|
54
54
|
z.displayName = "DisclosurePanelContext";
|
55
55
|
function Me() {
|
56
|
-
return
|
56
|
+
return H(z);
|
57
57
|
}
|
58
58
|
function Fe(e, t) {
|
59
59
|
return q(t.type, Re, e, t);
|
60
60
|
}
|
61
|
-
let
|
62
|
-
function
|
61
|
+
let Le = ne;
|
62
|
+
function He(e, t) {
|
63
63
|
let { defaultOpen: a = !1, ...d } = e, n = oe(null), p = U(t, Ie((c) => {
|
64
64
|
n.current = c;
|
65
65
|
}, e.as === void 0 || e.as === ne)), m = de(Fe, { disclosureState: a ? 0 : 1, buttonElement: null, panelElement: null, buttonId: null, panelId: null }), [{ disclosureState: o, buttonId: r }, k] = m, l = $((c) => {
|
@@ -69,7 +69,7 @@ function Le(e, t) {
|
|
69
69
|
let u = c ? c instanceof HTMLElement ? c : c.current instanceof HTMLElement ? c.current : E.getElementById(r) : E.getElementById(r);
|
70
70
|
u == null || u.focus();
|
71
71
|
}), I = R(() => ({ close: l }), [l]), f = R(() => ({ open: o === 0, close: l }), [o, l]), _ = { ref: p };
|
72
|
-
return S.createElement(W.Provider, { value: m }, S.createElement(V.Provider, { value: I }, S.createElement(Be, { value: l }, S.createElement($e, { value: q(o, { 0: M.Open, 1: M.Closed }) }, j({ ourProps: _, theirProps: d, slot: f, defaultTag:
|
72
|
+
return S.createElement(W.Provider, { value: m }, S.createElement(V.Provider, { value: I }, S.createElement(Be, { value: l }, S.createElement($e, { value: q(o, { 0: M.Open, 1: M.Closed }) }, j({ ourProps: _, theirProps: d, slot: f, defaultTag: Le, name: "Disclosure" })))));
|
73
73
|
}
|
74
74
|
let Ke = "button";
|
75
75
|
function Ue(e, t) {
|
@@ -106,8 +106,8 @@ function Ue(e, t) {
|
|
106
106
|
}), u = $((s) => {
|
107
107
|
var T;
|
108
108
|
Ne(s.currentTarget) || n || (l ? (r({ type: 0 }), (T = o.buttonElement) == null || T.focus()) : r({ type: 0 }));
|
109
|
-
}), { isFocusVisible: h, focusProps: y } = be({ autoFocus: p }), { isHovered: b, hoverProps: P } = ve({ isDisabled: n }), { pressed: C, pressProps: B } = ye({ disabled: n }),
|
110
|
-
return j({ mergeRefs: _, ourProps: g, theirProps: m, slot:
|
109
|
+
}), { isFocusVisible: h, focusProps: y } = be({ autoFocus: p }), { isHovered: b, hoverProps: P } = ve({ isDisabled: n }), { pressed: C, pressProps: B } = ye({ disabled: n }), L = R(() => ({ open: o.disclosureState === 0, hover: b, active: C, disabled: n, focus: h, autofocus: p }), [o, b, C, h, n, p]), A = De(e, o.buttonElement), g = l ? ee({ ref: f, type: A, disabled: n || void 0, autoFocus: p, onKeyDown: c, onClick: u }, y, P, B) : ee({ ref: f, id: d, type: A, "aria-expanded": o.disclosureState === 0, "aria-controls": o.panelElement ? o.panelId : void 0, disabled: n || void 0, autoFocus: p, onKeyDown: c, onKeyUp: E, onClick: u }, y, P, B);
|
110
|
+
return j({ mergeRefs: _, ourProps: g, theirProps: m, slot: L, defaultTag: Ke, name: "Disclosure.Button" });
|
111
111
|
}
|
112
112
|
let qe = "div", je = Z.RenderStrategy | Z.Static;
|
113
113
|
function We(e, t) {
|
@@ -120,7 +120,7 @@ function We(e, t) {
|
|
120
120
|
let _ = Pe(), [c, E] = ge(n, l, _ !== null ? (_ & M.Open) === M.Open : m.disclosureState === 0), u = R(() => ({ open: m.disclosureState === 0, close: r }), [m.disclosureState, r]), h = { ref: f, id: d, ...Te(E) };
|
121
121
|
return S.createElement(we, null, S.createElement(z.Provider, { value: m.panelId }, j({ mergeRefs: k, ourProps: h, theirProps: p, slot: u, defaultTag: qe, features: je, visible: c, name: "Disclosure.Panel" })));
|
122
122
|
}
|
123
|
-
let Qe = K(
|
123
|
+
let Qe = K(He), ie = K(Ue), ue = K(We), Ve = Object.assign(Qe, { Button: ie, Panel: ue });
|
124
124
|
const ze = "_accordion_1k9to_2", Xe = "_header_1k9to_13", Ge = "_disabled_1k9to_25", Je = "_title_1k9to_29", Ye = "_icon_1k9to_36", Ze = "_circle_1k9to_46", et = "_square_1k9to_53", tt = "_panel_1k9to_73", ot = "_open_1k9to_80", nt = "_m_1k9to_106", rt = "_s_1k9to_53", i = {
|
125
125
|
accordion: ze,
|
126
126
|
"is-link": "_is-link_1k9to_9",
|
@@ -160,7 +160,7 @@ const ze = "_accordion_1k9to_2", Xe = "_header_1k9to_13", Ge = "_disabled_1k9to_
|
|
160
160
|
[i["is-link"]]: b
|
161
161
|
}, C = () => {
|
162
162
|
t || h((g) => !g);
|
163
|
-
}, B = n === O.S ? G.S : G.M,
|
163
|
+
}, B = n === O.S ? G.S : G.M, L = {
|
164
164
|
variant: "anchor",
|
165
165
|
size: y ? "s" : "l",
|
166
166
|
rightIcon: {
|
@@ -234,7 +234,7 @@ const ze = "_accordion_1k9to_2", Xe = "_header_1k9to_13", Ge = "_disabled_1k9to_
|
|
234
234
|
[i.header]: !b,
|
235
235
|
[i.disabled]: t
|
236
236
|
}),
|
237
|
-
...b ?
|
237
|
+
...b ? L : {},
|
238
238
|
children: A(u)
|
239
239
|
}
|
240
240
|
),
|
@@ -1,10 +1,10 @@
|
|
1
1
|
import { jsxs as O, jsx as x } from "react/jsx-runtime";
|
2
|
-
import { W as V, p as W, o as m, $ as X, b as q, D as z, H as J, c as y } from "../../keyboard-
|
2
|
+
import { W as V, p as W, o as m, $ as X, b as q, D as z, H as J, c as y } from "../../keyboard-mgWkd2Vh.js";
|
3
3
|
import $, { useId as Q, useState as F, useMemo as Y, useCallback as Z, forwardRef as ee, useEffect as ae } from "react";
|
4
|
-
import { w as re } from "../../use-active-press-
|
5
|
-
import { u as oe, a as te, b as ce, T as se, I as ne, G as ie, j as de, p as le, K as be } from "../../label-
|
4
|
+
import { w as re } from "../../use-active-press-CqLGIFz7.js";
|
5
|
+
import { u as oe, a as te, b as ce, T as se, I as ne, G as ie, j as de, p as le, K as be } from "../../label-D4GFpe5F.js";
|
6
6
|
import { r as ue } from "../../bugs-diTMAGNw.js";
|
7
|
-
import { H as fe } from "../../field-
|
7
|
+
import { H as fe } from "../../field-C1kt7aNM.js";
|
8
8
|
import { c as me } from "../../index-DIxK0V-G.js";
|
9
9
|
import { Icon as pe } from "../../icons/Icon.js";
|
10
10
|
import '../../assets/CheckboxMimir.css';let he = "span";
|
@@ -9,7 +9,7 @@ import { formatDatePart as Y } from "./utils.js";
|
|
9
9
|
import { YearPickerModal as et } from "./YearPickerModal.js";
|
10
10
|
import { useClickOutside as it } from "../../hooks/useClickOutside/useClickOutside.js";
|
11
11
|
import { formating as d } from "../../utils/index.js";
|
12
|
-
import { I as at } from "../../Input-
|
12
|
+
import { I as at } from "../../Input-CbgqYgLo.js";
|
13
13
|
import { EInputStatus as rt } from "../Input/constants.js";
|
14
14
|
const mt = {
|
15
15
|
days: tt,
|
@@ -62,6 +62,10 @@ export type TAdditionalProps = {
|
|
62
62
|
* Максимальная длина ввода
|
63
63
|
*/
|
64
64
|
maxLength?: number;
|
65
|
+
/**
|
66
|
+
* Управляет поведением автозаполнения браузера
|
67
|
+
*/
|
68
|
+
autocomplete?: 'on' | 'off';
|
65
69
|
};
|
66
70
|
export type TProps = TInputProps & TAdditionalProps;
|
67
71
|
export declare const Input: import('react').MemoExoticComponent<import('react').ForwardRefExoticComponent<TInputProps & TAdditionalProps & import('react').RefAttributes<HTMLInputElement>>>;
|
@@ -2,7 +2,7 @@ import "react/jsx-runtime";
|
|
2
2
|
import "../../index-DIxK0V-G.js";
|
3
3
|
import "react";
|
4
4
|
import "./constants.js";
|
5
|
-
import { I as f } from "../../Input-
|
5
|
+
import { I as f } from "../../Input-CbgqYgLo.js";
|
6
6
|
import "../../hooks/useMergeRefs/useMergeRefs.js";
|
7
7
|
import "../../icons/Icon.js";
|
8
8
|
import "../Button/Button.js";
|
@@ -3,7 +3,7 @@ import { c } from "../../index-DIxK0V-G.js";
|
|
3
3
|
import { memo as w, forwardRef as u, useState as m } from "react";
|
4
4
|
import { Icon as d } from "../../icons/Icon.js";
|
5
5
|
import { Button as _ } from "../Button/Button.js";
|
6
|
-
import { I as l } from "../../Input-
|
6
|
+
import { I as l } from "../../Input-CbgqYgLo.js";
|
7
7
|
import '../../assets/InputPassword.css';const b = "_input_7b9x2_2", x = "_wrapper_7b9x2_6", h = "_button_7b9x2_17", f = "_icon_7b9x2_33", N = "_show_7b9x2_38", t = {
|
8
8
|
input: b,
|
9
9
|
wrapper: x,
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { jsx as d } from "react/jsx-runtime";
|
2
2
|
import { memo as I, forwardRef as i, useState as c, useCallback as f, useImperativeHandle as P } from "react";
|
3
3
|
import { getMaskedInputPhoneValue as m, getUnmaskedInputValue as o } from "./utils.js";
|
4
|
-
import { I as b } from "../../Input-
|
4
|
+
import { I as b } from "../../Input-CbgqYgLo.js";
|
5
5
|
const h = I(
|
6
6
|
i(
|
7
7
|
({ value: s = "", onChange: e, ...p }, a) => {
|
@@ -19,4 +19,5 @@ export declare const MultiSelectSearch: import('react').ForwardRefExoticComponen
|
|
19
19
|
withChip?: boolean;
|
20
20
|
chipVariant?: import('../Chip').EChipVariant | `${import('../Chip').EChipVariant}`;
|
21
21
|
disableInput?: boolean;
|
22
|
+
autocomplete?: "on" | "off";
|
22
23
|
} & import('react').RefAttributes<HTMLElement>>;
|
@@ -1,138 +1,139 @@
|
|
1
|
-
import { jsxs as g, jsx as
|
1
|
+
import { jsxs as g, jsx as n, Fragment as B } from "react/jsx-runtime";
|
2
2
|
import { c as l } from "../../index-DIxK0V-G.js";
|
3
|
-
import { forwardRef as
|
3
|
+
import { forwardRef as ie, useRef as R, useState as S, useEffect as j, useMemo as le } from "react";
|
4
4
|
import { EMultiSelectSearchSize as M } from "./constants.js";
|
5
|
-
import { getInitialInputValue as E, mapSizeToInputSize as F, getDropdownArrowIcon as
|
6
|
-
import { Icon as
|
7
|
-
import { Button as
|
8
|
-
import { CheckboxMimir as
|
9
|
-
import { Chip as
|
10
|
-
import { I as
|
11
|
-
import { EInputVariant as
|
12
|
-
import { H as
|
13
|
-
import '../../assets/MultiSelectSearch.css';const
|
5
|
+
import { getInitialInputValue as E, mapSizeToInputSize as F, getDropdownArrowIcon as re, joinSelectedItems as P } from "./utils.js";
|
6
|
+
import { Icon as ce } from "../../icons/Icon.js";
|
7
|
+
import { Button as ae } from "../Button/Button.js";
|
8
|
+
import { CheckboxMimir as ue } from "../CheckboxMimir/CheckboxMimir.js";
|
9
|
+
import { Chip as de } from "../Chip/Chip.js";
|
10
|
+
import { I as G } from "../../Input-CbgqYgLo.js";
|
11
|
+
import { EInputVariant as pe } from "../Input/constants.js";
|
12
|
+
import { H as me, U as H, G as J, K as _e, j as he } from "../../combobox-BpYucpxz.js";
|
13
|
+
import '../../assets/MultiSelectSearch.css';const fe = "_disabled_17kql_5", ke = "_container_17kql_9", qe = "_full_17kql_27", ge = "_button_17kql_39", be = "_options_17kql_53", ve = "_top_17kql_64", Ne = "_bottom_17kql_69", Ie = "_m_17kql_2", we = "_l_17kql_111", Ce = "_focused_17kql_129", Se = "_option_17kql_53", Me = "_chip_17kql_158", xe = "_clear_17kql_183", e = {
|
14
14
|
"multi-select-search": "_multi-select-search_17kql_2",
|
15
|
-
disabled:
|
16
|
-
container:
|
15
|
+
disabled: fe,
|
16
|
+
container: ke,
|
17
17
|
"container-open": "_container-open_17kql_18",
|
18
18
|
"input-container": "_input-container_17kql_22",
|
19
|
-
full:
|
19
|
+
full: qe,
|
20
20
|
"selected-icon": "_selected-icon_17kql_31",
|
21
21
|
"selector-icon-open": "_selector-icon-open_17kql_35",
|
22
|
-
button:
|
22
|
+
button: ge,
|
23
23
|
"selector-icon": "_selector-icon_17kql_35",
|
24
|
-
options:
|
25
|
-
top:
|
26
|
-
bottom:
|
24
|
+
options: be,
|
25
|
+
top: ve,
|
26
|
+
bottom: Ne,
|
27
27
|
"no-options": "_no-options_17kql_90",
|
28
|
-
m:
|
29
|
-
l:
|
28
|
+
m: Ie,
|
29
|
+
l: we,
|
30
30
|
"multi-select-input-disabled": "_multi-select-input-disabled_17kql_126",
|
31
31
|
"multi-select-input": "_multi-select-input_17kql_126",
|
32
|
-
focused:
|
33
|
-
option:
|
32
|
+
focused: Ce,
|
33
|
+
option: Se,
|
34
34
|
"option-active": "_option-active_17kql_148",
|
35
35
|
"option-inner": "_option-inner_17kql_151",
|
36
|
-
chip:
|
36
|
+
chip: Me,
|
37
37
|
"chip-container": "_chip-container_17kql_163",
|
38
38
|
"chip-root": "_chip-root_17kql_169",
|
39
39
|
"right-slot": "_right-slot_17kql_173",
|
40
40
|
"required-mark": "_required-mark_17kql_178",
|
41
|
-
clear:
|
41
|
+
clear: xe,
|
42
42
|
"icon-button": "_icon-button_17kql_192"
|
43
|
-
}, Fe =
|
44
|
-
(
|
43
|
+
}, Fe = ie(
|
44
|
+
(K, U) => {
|
45
45
|
const {
|
46
46
|
placeholder: x,
|
47
47
|
size: i = M.L,
|
48
48
|
value: a,
|
49
49
|
onChange: s,
|
50
|
-
full:
|
51
|
-
showArrow:
|
50
|
+
full: W,
|
51
|
+
showArrow: Q = !0,
|
52
52
|
items: m = [],
|
53
|
-
classNameOption:
|
53
|
+
classNameOption: X,
|
54
54
|
displayValue: d = "name",
|
55
55
|
filterOnSearch: y = !0,
|
56
56
|
onSearch: v,
|
57
|
-
variant: D =
|
57
|
+
variant: D = pe.DefaultGray,
|
58
58
|
menuPlacement: N = "bottom",
|
59
59
|
disabled: r = !1,
|
60
60
|
searchProps: z,
|
61
61
|
withClearButton: I = !1,
|
62
|
-
withChip:
|
63
|
-
chipVariant:
|
64
|
-
disableInput: _ = !1
|
65
|
-
|
62
|
+
withChip: Y = !1,
|
63
|
+
chipVariant: Z = "sapphire",
|
64
|
+
disableInput: _ = !1,
|
65
|
+
autocomplete: O = "on"
|
66
|
+
} = K, w = R(null), p = R(null), [b, h] = S(!1), [f, k] = S(
|
66
67
|
() => E(a, d)
|
67
68
|
), [u, q] = S(
|
68
69
|
a || []
|
69
70
|
);
|
70
|
-
|
71
|
+
j(() => {
|
71
72
|
a && (q(a), JSON.stringify(a) !== JSON.stringify(u) && k(E(a, d)));
|
72
73
|
}, [a, d, u]);
|
73
|
-
const
|
74
|
-
var
|
74
|
+
const A = le(() => {
|
75
|
+
var o;
|
75
76
|
if (!y) return m;
|
76
|
-
const t = ((
|
77
|
+
const t = ((o = f.split(",").pop()) == null ? void 0 : o.trim().toLowerCase()) ?? "";
|
77
78
|
return m.filter(
|
78
79
|
(c) => c.name.toLowerCase().includes(t)
|
79
80
|
);
|
80
|
-
}, [y, m, f]),
|
81
|
+
}, [y, m, f]), $ = (t) => {
|
81
82
|
q(t), s == null || s(t);
|
82
|
-
const
|
83
|
-
k(
|
83
|
+
const o = P(t, d);
|
84
|
+
k(o), h(!0), setTimeout(() => {
|
84
85
|
if (p.current) {
|
85
86
|
p.current.focus(), p.current.scrollLeft = p.current.scrollWidth;
|
86
|
-
const c =
|
87
|
+
const c = o.length;
|
87
88
|
p.current.setSelectionRange(c, c);
|
88
89
|
}
|
89
90
|
}, 0);
|
90
|
-
},
|
91
|
+
}, L = (t) => {
|
91
92
|
if (_) return;
|
92
|
-
const
|
93
|
-
k(
|
94
|
-
const c =
|
93
|
+
const o = t.target.value;
|
94
|
+
k(o), v == null || v(o);
|
95
|
+
const c = o.split(",").map((C) => C.trim()).filter(Boolean), V = m.filter(
|
95
96
|
(C) => c.includes(C[d])
|
96
97
|
);
|
97
|
-
q(
|
98
|
-
},
|
99
|
-
const
|
98
|
+
q(V), s == null || s(V), h(!0);
|
99
|
+
}, ee = (t) => {
|
100
|
+
const o = u.filter(
|
100
101
|
(c) => c.id !== t.id
|
101
102
|
);
|
102
|
-
q(
|
103
|
-
},
|
103
|
+
q(o), s == null || s(o), k(P(o, d));
|
104
|
+
}, T = () => h((t) => !t), te = (t) => {
|
104
105
|
t.preventDefault(), t.currentTarget.focus();
|
105
|
-
const
|
106
|
-
t.currentTarget.setSelectionRange(
|
107
|
-
},
|
106
|
+
const o = t.currentTarget.value.length;
|
107
|
+
t.currentTarget.setSelectionRange(o, o);
|
108
|
+
}, oe = () => {
|
108
109
|
k(""), q([]), s == null || s([]);
|
109
110
|
}, ne = (t) => {
|
110
|
-
t.stopPropagation(),
|
111
|
-
},
|
111
|
+
t.stopPropagation(), oe();
|
112
|
+
}, se = (t) => {
|
112
113
|
_ && t.target.blur();
|
113
114
|
};
|
114
|
-
return
|
115
|
-
const t = (
|
116
|
-
w.current && !w.current.contains(
|
115
|
+
return j(() => {
|
116
|
+
const t = (o) => {
|
117
|
+
w.current && !w.current.contains(o.target) && !o.defaultPrevented && h(!1);
|
117
118
|
};
|
118
119
|
return document.addEventListener("mousedown", t), () => {
|
119
120
|
document.removeEventListener("mousedown", t);
|
120
121
|
};
|
121
122
|
}, []), /* @__PURE__ */ g("div", { ref: w, children: [
|
122
|
-
/* @__PURE__ */
|
123
|
-
|
123
|
+
/* @__PURE__ */ n(
|
124
|
+
me,
|
124
125
|
{
|
125
126
|
multiple: !0,
|
126
127
|
as: "div",
|
127
128
|
value: u,
|
128
129
|
className: l(e["multi-select-search"], {
|
129
|
-
[e.full]:
|
130
|
+
[e.full]: W,
|
130
131
|
[e.disabled]: r
|
131
132
|
}),
|
132
|
-
onChange:
|
133
|
-
ref:
|
133
|
+
onChange: $,
|
134
|
+
ref: U,
|
134
135
|
disabled: r,
|
135
|
-
virtual: { options:
|
136
|
+
virtual: { options: A },
|
136
137
|
children: /* @__PURE__ */ g(
|
137
138
|
"div",
|
138
139
|
{
|
@@ -141,40 +142,41 @@ import '../../assets/MultiSelectSearch.css';const he = "_disabled_17kql_5", fe =
|
|
141
142
|
}),
|
142
143
|
children: [
|
143
144
|
_ && /* @__PURE__ */ g("div", { className: e["input-container"], children: [
|
144
|
-
/* @__PURE__ */
|
145
|
-
|
145
|
+
/* @__PURE__ */ n(
|
146
|
+
H,
|
146
147
|
{
|
147
148
|
disabled: r,
|
148
149
|
style: { width: "100%" },
|
149
|
-
onClick:
|
150
|
-
children: /* @__PURE__ */
|
151
|
-
|
150
|
+
onClick: T,
|
151
|
+
children: /* @__PURE__ */ n(
|
152
|
+
J,
|
152
153
|
{
|
153
|
-
as:
|
154
|
+
as: G,
|
154
155
|
label: x,
|
155
156
|
size: F(i),
|
156
157
|
className: l(e["multi-select-input"], {
|
157
158
|
[e["multi-select-input-disabled"]]: _ && I
|
158
159
|
}),
|
159
|
-
onChange:
|
160
|
+
onChange: L,
|
160
161
|
value: f,
|
161
162
|
disabled: r,
|
162
163
|
variant: D,
|
163
164
|
rightSlotClassName: e["right-slot"],
|
164
165
|
requiredMarkClassName: e["required-mark"],
|
165
166
|
"data-testid": "select-search-input",
|
166
|
-
onFocus:
|
167
|
+
onFocus: se,
|
167
168
|
rightAddon: {
|
168
169
|
addonType: "icon",
|
169
|
-
addonContent:
|
170
|
+
addonContent: re(b, i)
|
170
171
|
},
|
172
|
+
autocomplete: O,
|
171
173
|
...z
|
172
174
|
}
|
173
175
|
)
|
174
176
|
}
|
175
177
|
),
|
176
|
-
I && f && /* @__PURE__ */
|
177
|
-
|
178
|
+
I && f && /* @__PURE__ */ n(
|
179
|
+
ae,
|
178
180
|
{
|
179
181
|
tabIndex: -1,
|
180
182
|
className: l(e.clear, {
|
@@ -192,10 +194,10 @@ import '../../assets/MultiSelectSearch.css';const he = "_disabled_17kql_5", fe =
|
|
192
194
|
}
|
193
195
|
)
|
194
196
|
] }),
|
195
|
-
!_ && /* @__PURE__ */
|
196
|
-
|
197
|
+
!_ && /* @__PURE__ */ n(
|
198
|
+
J,
|
197
199
|
{
|
198
|
-
as:
|
200
|
+
as: G,
|
199
201
|
label: x,
|
200
202
|
size: F(i),
|
201
203
|
className: e["multi-select-input"],
|
@@ -206,21 +208,21 @@ import '../../assets/MultiSelectSearch.css';const he = "_disabled_17kql_5", fe =
|
|
206
208
|
variant: D,
|
207
209
|
withClearButton: I,
|
208
210
|
onFocus: () => h(!0),
|
209
|
-
onMouseDown:
|
210
|
-
onChange:
|
211
|
+
onMouseDown: te,
|
212
|
+
onChange: L,
|
211
213
|
ref: p,
|
212
214
|
rightAddon: {
|
213
215
|
addonType: "react-node",
|
214
|
-
addonContent:
|
215
|
-
|
216
|
+
addonContent: Q && /* @__PURE__ */ n(
|
217
|
+
H,
|
216
218
|
{
|
217
219
|
className: l(e.button, {
|
218
220
|
[e.disabled]: r
|
219
221
|
}),
|
220
222
|
disabled: r,
|
221
|
-
onMouseDown:
|
222
|
-
children: /* @__PURE__ */
|
223
|
-
|
223
|
+
onMouseDown: T,
|
224
|
+
children: /* @__PURE__ */ n(
|
225
|
+
ce,
|
224
226
|
{
|
225
227
|
iconName: i == M.M ? "DropdownArrowBottom16px" : "DropdownArrowDown24px",
|
226
228
|
className: l(e["selector-icon"], {
|
@@ -232,11 +234,12 @@ import '../../assets/MultiSelectSearch.css';const he = "_disabled_17kql_5", fe =
|
|
232
234
|
)
|
233
235
|
},
|
234
236
|
"data-testid": "select-search-input",
|
237
|
+
autocomplete: O,
|
235
238
|
...z
|
236
239
|
}
|
237
240
|
),
|
238
|
-
b && /* @__PURE__ */
|
239
|
-
|
241
|
+
b && /* @__PURE__ */ n(B, { children: m.length ? A.length ? /* @__PURE__ */ n(
|
242
|
+
_e,
|
240
243
|
{
|
241
244
|
className: l(
|
242
245
|
e.options,
|
@@ -245,29 +248,29 @@ import '../../assets/MultiSelectSearch.css';const he = "_disabled_17kql_5", fe =
|
|
245
248
|
),
|
246
249
|
modal: !1,
|
247
250
|
static: !0,
|
248
|
-
children: ({ option: t }) => /* @__PURE__ */
|
249
|
-
|
251
|
+
children: ({ option: t }) => /* @__PURE__ */ n(
|
252
|
+
he,
|
250
253
|
{
|
251
254
|
value: t,
|
252
|
-
className: ({ focus:
|
255
|
+
className: ({ focus: o }) => l(
|
253
256
|
e.option,
|
254
|
-
|
257
|
+
X,
|
255
258
|
i && e[i],
|
256
259
|
{
|
257
|
-
[e["option-active"]]:
|
260
|
+
[e["option-active"]]: o
|
258
261
|
}
|
259
262
|
),
|
260
|
-
children: /* @__PURE__ */ g(
|
263
|
+
children: /* @__PURE__ */ g(B, { children: [
|
261
264
|
/* @__PURE__ */ g("div", { className: e["option-inner"], children: [
|
262
265
|
t.name,
|
263
|
-
t.bottom && /* @__PURE__ */
|
266
|
+
t.bottom && /* @__PURE__ */ n("div", { children: t.bottom })
|
264
267
|
] }),
|
265
|
-
/* @__PURE__ */
|
266
|
-
|
268
|
+
/* @__PURE__ */ n(
|
269
|
+
ue,
|
267
270
|
{
|
268
271
|
isInteractive: !1,
|
269
272
|
checked: u.some(
|
270
|
-
(
|
273
|
+
(o) => o.id === t.id
|
271
274
|
)
|
272
275
|
}
|
273
276
|
)
|
@@ -276,7 +279,7 @@ import '../../assets/MultiSelectSearch.css';const he = "_disabled_17kql_5", fe =
|
|
276
279
|
t.id
|
277
280
|
)
|
278
281
|
}
|
279
|
-
) : /* @__PURE__ */
|
282
|
+
) : /* @__PURE__ */ n(
|
280
283
|
"div",
|
281
284
|
{
|
282
285
|
className: l(
|
@@ -287,7 +290,7 @@ import '../../assets/MultiSelectSearch.css';const he = "_disabled_17kql_5", fe =
|
|
287
290
|
),
|
288
291
|
children: "Ничего не найдено"
|
289
292
|
}
|
290
|
-
) : /* @__PURE__ */
|
293
|
+
) : /* @__PURE__ */ n(
|
291
294
|
"div",
|
292
295
|
{
|
293
296
|
className: l(
|
@@ -304,15 +307,15 @@ import '../../assets/MultiSelectSearch.css';const he = "_disabled_17kql_5", fe =
|
|
304
307
|
)
|
305
308
|
}
|
306
309
|
),
|
307
|
-
|
308
|
-
|
310
|
+
Y && u.length > 0 && /* @__PURE__ */ n("div", { className: e["chip-container"], children: u.map((t) => /* @__PURE__ */ n(
|
311
|
+
de,
|
309
312
|
{
|
310
313
|
size: i === M.L ? "s" : "xs",
|
311
|
-
variant:
|
314
|
+
variant: Z,
|
312
315
|
className: e["chip-root"],
|
313
316
|
withAction: !0,
|
314
|
-
onClose: () =>
|
315
|
-
children: /* @__PURE__ */
|
317
|
+
onClose: () => ee(t),
|
318
|
+
children: /* @__PURE__ */ n("span", { className: e.chip, children: t.name })
|
316
319
|
},
|
317
320
|
t.id
|
318
321
|
)) })
|
@@ -57,4 +57,6 @@ export type TMultiSelectSearchProps = Pick<TInputProps, 'withClearButton' | 'var
|
|
57
57
|
chipVariant?: EChipVariant | `${EChipVariant}`;
|
58
58
|
/** Отключает инпут, но позволяет открывать меню*/
|
59
59
|
disableInput?: boolean;
|
60
|
+
/** Управляет поведением автозаполнения браузера */
|
61
|
+
autocomplete?: 'on' | 'off';
|
60
62
|
};
|
@@ -3,7 +3,7 @@ import { c as u } from "../../index-DIxK0V-G.js";
|
|
3
3
|
import { forwardRef as P, useImperativeHandle as R, Fragment as T } from "react";
|
4
4
|
import { ITEMS_PER_SEPARATOR as q, DEFAULT_VALUE_LENGTH as v } from "./constants.js";
|
5
5
|
import { useOTPInput as y } from "./hooks.js";
|
6
|
-
import { I as A } from "../../Input-
|
6
|
+
import { I as A } from "../../Input-CbgqYgLo.js";
|
7
7
|
import '../../assets/OtpInput.css';const C = "_otp_1shq3_3", F = "_input_1shq3_14", L = "_separator_1shq3_28", r = {
|
8
8
|
otp: C,
|
9
9
|
"input-wrapper": "_input-wrapper_1shq3_14",
|
@@ -1,10 +1,10 @@
|
|
1
1
|
import { jsxs as ee, jsx as L, Fragment as _e } from "react/jsx-runtime";
|
2
|
-
import { K as V, w as ye, a as oe, z as te, U as ie, b as ke, T as Oe, j as we, u as Pe, I as Ee, G as Te, p as De } from "../../label-
|
3
|
-
import { W, y as z, o as U, H as K, s as se, n as ne, $ as le, b as de, D as ue, a as Ce, u as Ge, c as N } from "../../keyboard-
|
2
|
+
import { K as V, w as ye, a as oe, z as te, U as ie, b as ke, T as Oe, j as we, u as Pe, I as Ee, G as Te, p as De } from "../../label-D4GFpe5F.js";
|
3
|
+
import { W, y as z, o as U, H as K, s as se, n as ne, $ as le, b as de, D as ue, a as Ce, u as Ge, c as N } from "../../keyboard-mgWkd2Vh.js";
|
4
4
|
import E, { createContext as ce, useId as q, useReducer as xe, useRef as B, useMemo as T, useCallback as Fe, useContext as pe, forwardRef as Ne } from "react";
|
5
5
|
import { u as Ae } from "../../use-by-comparator-CVuf9KBq.js";
|
6
6
|
import { r as fe } from "../../bugs-diTMAGNw.js";
|
7
|
-
import { P as re, F as H, T as ae, _ as Ie } from "../../focus-management-
|
7
|
+
import { P as re, F as H, T as ae, _ as Ie } from "../../focus-management-DOYCPyGg.js";
|
8
8
|
import { c as M } from "../../index-DIxK0V-G.js";
|
9
9
|
import '../../assets/RadioGroup.css';var Se = ((e) => (e[e.RegisterOption = 0] = "RegisterOption", e[e.UnregisterOption = 1] = "UnregisterOption", e))(Se || {});
|
10
10
|
let Le = { 0(e, r) {
|
@@ -17,4 +17,5 @@ export declare const SelectSearch: import('react').ForwardRefExoticComponent<Pic
|
|
17
17
|
disabled?: boolean;
|
18
18
|
searchProps?: Pick<import('../Input').TInputProps, "numbersOnly" | "maxLength" | "required">;
|
19
19
|
disableInput?: boolean;
|
20
|
+
autocomplete?: "on" | "off";
|
20
21
|
} & import('react').RefAttributes<HTMLElement>>;
|