mimir-ui-kit 1.37.1 → 1.37.3
Sign up to get free protection for your applications and to get access to all the features.
- 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 +112 -107
- package/dist/components/MultiSelectSearch/MultiSelectSearch.js +22 -22
- package/dist/components/RadioGroup/RadioGroup.js +3 -3
- package/dist/components/SelectSearch/SelectSearch.js +24 -24
- package/dist/components/Switcher/Switcher.js +4 -4
- package/dist/components/TabTrail/TabTrail.js +4 -4
- package/dist/components/UniversalUploader/UniversalUploader.d.ts +2 -0
- package/dist/components/UniversalUploader/UniversalUploader.js +54 -51
- package/dist/components/UniversalUploader/types.d.ts +2 -0
- 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/{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";
|
@@ -1,149 +1,154 @@
|
|
1
|
-
import { jsxs as B, jsx as
|
2
|
-
import { c as
|
3
|
-
import { memo as V, forwardRef as tt, useState as
|
4
|
-
import { MAX_DAY as st, MAX_MONTH as et, DATE_LENGTH as
|
5
|
-
import { DatePickerModal as
|
6
|
-
import { MonthPickerModal as
|
1
|
+
import { jsxs as B, jsx as m } from "react/jsx-runtime";
|
2
|
+
import { c as b } from "../../index-DIxK0V-G.js";
|
3
|
+
import { memo as V, forwardRef as tt, useState as w, useEffect as T } from "react";
|
4
|
+
import { MAX_DAY as st, MAX_MONTH as et, DATE_LENGTH as it } from "./constants.js";
|
5
|
+
import { DatePickerModal as ot } from "./DatePickerModal.js";
|
6
|
+
import { MonthPickerModal as rt } from "./MonthPickerModal.js";
|
7
7
|
import { c as o } from "../../styles.module-B3xL6-zc.js";
|
8
|
-
import { formatDatePart as
|
9
|
-
import { YearPickerModal as
|
8
|
+
import { formatDatePart as L } from "./utils.js";
|
9
|
+
import { YearPickerModal as at } from "./YearPickerModal.js";
|
10
10
|
import { useClickOutside as ct } from "../../hooks/useClickOutside/useClickOutside.js";
|
11
|
-
import { Icon as
|
12
|
-
import { formating as
|
11
|
+
import { Icon as R } from "../../icons/Icon.js";
|
12
|
+
import { formating as y } from "../../utils/index.js";
|
13
13
|
import { I as mt } from "../../Input-BYrIS5GU.js";
|
14
|
-
import { EInputStatus as pt, EInputSize as
|
14
|
+
import { EInputStatus as pt, EInputSize as U } from "../Input/constants.js";
|
15
15
|
const dt = {
|
16
|
-
days:
|
17
|
-
months:
|
18
|
-
years:
|
19
|
-
},
|
16
|
+
days: ot,
|
17
|
+
months: rt,
|
18
|
+
years: at
|
19
|
+
}, ft = V(
|
20
20
|
tt(
|
21
21
|
({
|
22
|
-
size:
|
23
|
-
value:
|
24
|
-
onChangeValue:
|
25
|
-
name:
|
26
|
-
before:
|
27
|
-
type:
|
28
|
-
error:
|
29
|
-
onError:
|
30
|
-
onBlur:
|
31
|
-
validateImmediately:
|
32
|
-
variant:
|
33
|
-
disabled:
|
34
|
-
editable:
|
35
|
-
openOnInput:
|
36
|
-
...
|
37
|
-
},
|
38
|
-
const [
|
39
|
-
() =>
|
40
|
-
), [
|
41
|
-
|
42
|
-
|
43
|
-
}, [
|
44
|
-
|
45
|
-
|
22
|
+
size: P,
|
23
|
+
value: e,
|
24
|
+
onChangeValue: s,
|
25
|
+
name: a,
|
26
|
+
before: M,
|
27
|
+
type: p = "days",
|
28
|
+
error: v,
|
29
|
+
onError: d,
|
30
|
+
onBlur: i,
|
31
|
+
validateImmediately: h,
|
32
|
+
variant: X,
|
33
|
+
disabled: x = !1,
|
34
|
+
editable: D = !1,
|
35
|
+
openOnInput: j = !0,
|
36
|
+
...u
|
37
|
+
}, F) => {
|
38
|
+
const [N, c] = w(!1), [S, f] = w(p), [r, l] = w(
|
39
|
+
() => e && !isNaN(new Date(e).getTime()) ? new Date(e) : void 0
|
40
|
+
), [_, g] = w(v), [G, k] = w("");
|
41
|
+
T(() => {
|
42
|
+
g(v);
|
43
|
+
}, [v]), T(() => {
|
44
|
+
l(
|
45
|
+
e && !isNaN(new Date(e).getTime()) ? new Date(e) : void 0
|
46
46
|
);
|
47
|
-
}, [
|
48
|
-
|
49
|
-
}, [
|
50
|
-
const
|
51
|
-
|
52
|
-
|
53
|
-
}, [
|
54
|
-
isActive:
|
47
|
+
}, [e]), T(() => {
|
48
|
+
r && typeof r != "string" && !isNaN(r == null ? void 0 : r.getTime()) ? k(y.Date(r, "dd/mm/yyyy")) : k("");
|
49
|
+
}, [r]);
|
50
|
+
const O = e && new Date(e).getTime;
|
51
|
+
T(() => {
|
52
|
+
h && (O ? (g(!1), d == null || d({ name: a, active: !1 })) : (g(!0), d == null || d({ name: a, active: !0 })));
|
53
|
+
}, [h, a, O]), ct({
|
54
|
+
isActive: N,
|
55
55
|
setActive: (t) => {
|
56
|
-
|
56
|
+
c(t), f(p);
|
57
57
|
},
|
58
58
|
className: o["calendar-block"]
|
59
59
|
});
|
60
|
-
const
|
61
|
-
!
|
62
|
-
}, K = (t) => {
|
63
|
-
isNaN(t.getTime()) || (D(t), e == null || e({
|
64
|
-
value: f.Date(t, "yyyy-mm-dd"),
|
65
|
-
name: c
|
66
|
-
})), g === "years" && (m === "years" ? (a(!1), n(m)) : n("months")), g === "months" && (m === "months" ? (a(!1), n(m)) : n("days")), D(t), e == null || e({
|
67
|
-
value: f.Date(t, "yyyy-mm-dd"),
|
68
|
-
name: c
|
69
|
-
}), d == null || d(f.Date(t, "yyyy-mm-dd"));
|
60
|
+
const K = () => {
|
61
|
+
!x && (j || !D) && c(!0);
|
70
62
|
}, W = (t) => {
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
63
|
+
isNaN(t.getTime()) || (l(t), s == null || s({
|
64
|
+
value: y.Date(t, "yyyy-mm-dd"),
|
65
|
+
name: a
|
66
|
+
})), S === "years" && (p === "years" ? (c(!1), f(p)) : f("months")), S === "months" && (p === "months" ? (c(!1), f(p)) : f("days")), l(t), s == null || s({
|
67
|
+
value: y.Date(t, "yyyy-mm-dd"),
|
68
|
+
name: a
|
69
|
+
}), i == null || i(y.Date(t, "yyyy-mm-dd"));
|
70
|
+
}, q = (t) => {
|
71
|
+
if (D) {
|
72
|
+
const n = t.target.value.replace(/[^\d]/g, "");
|
73
|
+
if (n.length === 0)
|
74
|
+
k(""), s == null || s({ value: "", name: a }), i == null || i("");
|
75
|
+
else {
|
76
|
+
const [A, Y, $] = [
|
77
|
+
L(n.substring(0, 2), st),
|
78
|
+
L(n.substring(2, 4), et),
|
79
|
+
n.substring(4, 8)
|
80
|
+
], H = [A, Y, $].filter(Boolean).join("/");
|
81
|
+
if (k(H), H.length === it) {
|
82
|
+
const C = parseInt($), I = /* @__PURE__ */ new Date(
|
83
|
+
`${C}-${Y.padStart(2, "0")}-${A.padStart(2, "0")}`
|
84
|
+
);
|
85
|
+
isNaN(I.getTime()) || (l(I), s == null || s({
|
86
|
+
value: y.Date(I, "yyyy-mm-dd"),
|
87
|
+
name: a
|
88
|
+
}), i == null || i(y.Date(I, "yyyy-mm-dd")));
|
89
|
+
}
|
85
90
|
}
|
86
91
|
}
|
87
|
-
},
|
88
|
-
onChangeValue:
|
89
|
-
date:
|
90
|
-
before: typeof
|
91
|
-
onChangeType:
|
92
|
-
setIsActive:
|
93
|
-
},
|
94
|
-
|
95
|
-
}, className: o["icon-button"], children: t ? /* @__PURE__ */
|
96
|
-
|
92
|
+
}, E = b(o.wrapper, N && o.active), J = b(o.input, o.inputBorderControl), Q = {
|
93
|
+
onChangeValue: W,
|
94
|
+
date: r || /* @__PURE__ */ new Date(),
|
95
|
+
before: typeof M == "string" ? new Date(M) : M,
|
96
|
+
onChangeType: f,
|
97
|
+
setIsActive: c
|
98
|
+
}, Z = dt[S], z = ({ isActive: t }) => /* @__PURE__ */ m("button", { onClick: (A) => {
|
99
|
+
A.stopPropagation(), x || c(!t);
|
100
|
+
}, className: o["icon-button"], children: t ? /* @__PURE__ */ m(
|
101
|
+
R,
|
97
102
|
{
|
98
|
-
iconName:
|
103
|
+
iconName: P === U.S ? "DropdownArrowUp16px" : "DropdownArrowUp24px"
|
99
104
|
}
|
100
|
-
) : /* @__PURE__ */
|
101
|
-
|
105
|
+
) : /* @__PURE__ */ m(
|
106
|
+
R,
|
102
107
|
{
|
103
|
-
iconName:
|
108
|
+
iconName: P === U.S ? "DropdownArrowBottom16px" : "DropdownArrowDown24px"
|
104
109
|
}
|
105
110
|
) });
|
106
|
-
return /* @__PURE__ */ B("div", { className:
|
107
|
-
/* @__PURE__ */
|
111
|
+
return /* @__PURE__ */ B("div", { className: E, "data-disabled": x, children: [
|
112
|
+
/* @__PURE__ */ m(
|
108
113
|
"div",
|
109
114
|
{
|
110
115
|
role: "button",
|
111
|
-
"data-error":
|
112
|
-
className:
|
113
|
-
[o.editable]:
|
116
|
+
"data-error": _,
|
117
|
+
className: b(o["date-wrapper"], {
|
118
|
+
[o.editable]: D
|
114
119
|
}),
|
115
|
-
onClick:
|
116
|
-
children: /* @__PURE__ */
|
120
|
+
onClick: K,
|
121
|
+
children: /* @__PURE__ */ m(
|
117
122
|
mt,
|
118
123
|
{
|
119
|
-
ref:
|
120
|
-
className:
|
124
|
+
ref: F,
|
125
|
+
className: J,
|
121
126
|
wrapperClassName: o["input-wrapper"],
|
122
|
-
size:
|
127
|
+
size: P,
|
123
128
|
type: "text",
|
124
|
-
variant:
|
125
|
-
status:
|
126
|
-
value:
|
127
|
-
onChange:
|
129
|
+
variant: X,
|
130
|
+
status: _ ? pt.Error : void 0,
|
131
|
+
value: G,
|
132
|
+
onChange: q,
|
128
133
|
rightAddon: {
|
129
134
|
addonType: "react-node",
|
130
|
-
addonContent: /* @__PURE__ */
|
135
|
+
addonContent: /* @__PURE__ */ m(z, { isActive: N })
|
131
136
|
},
|
132
137
|
onFocus: () => {
|
133
|
-
|
138
|
+
j && !D && c(!0);
|
134
139
|
},
|
135
|
-
"data-error":
|
136
|
-
...
|
140
|
+
"data-error": _,
|
141
|
+
...u
|
137
142
|
}
|
138
143
|
)
|
139
144
|
}
|
140
145
|
),
|
141
|
-
|
146
|
+
N && /* @__PURE__ */ m(Z, { ...Q })
|
142
147
|
] });
|
143
148
|
}
|
144
149
|
)
|
145
150
|
);
|
146
|
-
|
151
|
+
ft.displayName = "DatePicker";
|
147
152
|
export {
|
148
|
-
|
153
|
+
ft as DatePicker
|
149
154
|
};
|
@@ -1,15 +1,15 @@
|
|
1
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 ie, useRef as R, useState as S, useEffect 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
|
5
|
+
import { getInitialInputValue as E, mapSizeToInputSize as F, getDropdownArrowIcon as re, joinSelectedItems as P } from "./utils.js";
|
6
6
|
import { Icon as ce } from "../../icons/Icon.js";
|
7
7
|
import { Button as ae } from "../Button/Button.js";
|
8
8
|
import { CheckboxMimir as ue } from "../CheckboxMimir/CheckboxMimir.js";
|
9
9
|
import { Chip as de } from "../Chip/Chip.js";
|
10
10
|
import { I as G } from "../../Input-BYrIS5GU.js";
|
11
11
|
import { EInputVariant as pe } from "../Input/constants.js";
|
12
|
-
import { H as me, U as
|
12
|
+
import { H as me, U as H, G as J, K as _e, j as he } from "../../combobox-BpYucpxz.js";
|
13
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
15
|
disabled: fe,
|
@@ -40,14 +40,14 @@ import '../../assets/MultiSelectSearch.css';const fe = "_disabled_17kql_5", ke =
|
|
40
40
|
"required-mark": "_required-mark_17kql_178",
|
41
41
|
clear: xe,
|
42
42
|
"icon-button": "_icon-button_17kql_192"
|
43
|
-
},
|
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:
|
50
|
+
full: W,
|
51
51
|
showArrow: Q = !0,
|
52
52
|
items: m = [],
|
53
53
|
classNameOption: X,
|
@@ -63,13 +63,13 @@ import '../../assets/MultiSelectSearch.css';const fe = "_disabled_17kql_5", ke =
|
|
63
63
|
chipVariant: Z = "sapphire",
|
64
64
|
disableInput: _ = !1,
|
65
65
|
autocomplete: O = "on"
|
66
|
-
} =
|
67
|
-
() =>
|
66
|
+
} = K, w = R(null), p = R(null), [b, h] = S(!1), [f, k] = S(
|
67
|
+
() => E(a, d)
|
68
68
|
), [u, q] = S(
|
69
69
|
a || []
|
70
70
|
);
|
71
|
-
|
72
|
-
a && (q(a), JSON.stringify(a) !== JSON.stringify(u) && k(
|
71
|
+
j(() => {
|
72
|
+
a && (q(a), JSON.stringify(a) !== JSON.stringify(u) && k(E(a, d)));
|
73
73
|
}, [a, d, u]);
|
74
74
|
const A = le(() => {
|
75
75
|
var o;
|
@@ -80,7 +80,7 @@ import '../../assets/MultiSelectSearch.css';const fe = "_disabled_17kql_5", ke =
|
|
80
80
|
);
|
81
81
|
}, [y, m, f]), $ = (t) => {
|
82
82
|
q(t), s == null || s(t);
|
83
|
-
const o =
|
83
|
+
const o = P(t, d);
|
84
84
|
k(o), h(!0), setTimeout(() => {
|
85
85
|
if (p.current) {
|
86
86
|
p.current.focus(), p.current.scrollLeft = p.current.scrollWidth;
|
@@ -100,7 +100,7 @@ import '../../assets/MultiSelectSearch.css';const fe = "_disabled_17kql_5", ke =
|
|
100
100
|
const o = u.filter(
|
101
101
|
(c) => c.id !== t.id
|
102
102
|
);
|
103
|
-
q(o), s == null || s(o), k(
|
103
|
+
q(o), s == null || s(o), k(P(o, d));
|
104
104
|
}, T = () => h((t) => !t), te = (t) => {
|
105
105
|
t.preventDefault(), t.currentTarget.focus();
|
106
106
|
const o = t.currentTarget.value.length;
|
@@ -112,7 +112,7 @@ import '../../assets/MultiSelectSearch.css';const fe = "_disabled_17kql_5", ke =
|
|
112
112
|
}, se = (t) => {
|
113
113
|
_ && t.target.blur();
|
114
114
|
};
|
115
|
-
return
|
115
|
+
return j(() => {
|
116
116
|
const t = (o) => {
|
117
117
|
w.current && !w.current.contains(o.target) && !o.defaultPrevented && h(!1);
|
118
118
|
};
|
@@ -127,11 +127,11 @@ import '../../assets/MultiSelectSearch.css';const fe = "_disabled_17kql_5", ke =
|
|
127
127
|
as: "div",
|
128
128
|
value: u,
|
129
129
|
className: l(e["multi-select-search"], {
|
130
|
-
[e.full]:
|
130
|
+
[e.full]: W,
|
131
131
|
[e.disabled]: r
|
132
132
|
}),
|
133
133
|
onChange: $,
|
134
|
-
ref:
|
134
|
+
ref: U,
|
135
135
|
disabled: r,
|
136
136
|
virtual: { options: A },
|
137
137
|
children: /* @__PURE__ */ g(
|
@@ -143,17 +143,17 @@ import '../../assets/MultiSelectSearch.css';const fe = "_disabled_17kql_5", ke =
|
|
143
143
|
children: [
|
144
144
|
_ && /* @__PURE__ */ g("div", { className: e["input-container"], children: [
|
145
145
|
/* @__PURE__ */ n(
|
146
|
-
|
146
|
+
H,
|
147
147
|
{
|
148
148
|
disabled: r,
|
149
149
|
style: { width: "100%" },
|
150
150
|
onClick: T,
|
151
151
|
children: /* @__PURE__ */ n(
|
152
|
-
|
152
|
+
J,
|
153
153
|
{
|
154
154
|
as: G,
|
155
155
|
label: x,
|
156
|
-
size:
|
156
|
+
size: F(i),
|
157
157
|
className: l(e["multi-select-input"], {
|
158
158
|
[e["multi-select-input-disabled"]]: _ && I
|
159
159
|
}),
|
@@ -195,11 +195,11 @@ import '../../assets/MultiSelectSearch.css';const fe = "_disabled_17kql_5", ke =
|
|
195
195
|
)
|
196
196
|
] }),
|
197
197
|
!_ && /* @__PURE__ */ n(
|
198
|
-
|
198
|
+
J,
|
199
199
|
{
|
200
200
|
as: G,
|
201
201
|
label: x,
|
202
|
-
size:
|
202
|
+
size: F(i),
|
203
203
|
className: e["multi-select-input"],
|
204
204
|
rightSlotClassName: e["right-slot"],
|
205
205
|
requiredMarkClassName: e["required-mark"],
|
@@ -214,7 +214,7 @@ import '../../assets/MultiSelectSearch.css';const fe = "_disabled_17kql_5", ke =
|
|
214
214
|
rightAddon: {
|
215
215
|
addonType: "react-node",
|
216
216
|
addonContent: Q && /* @__PURE__ */ n(
|
217
|
-
|
217
|
+
H,
|
218
218
|
{
|
219
219
|
className: l(e.button, {
|
220
220
|
[e.disabled]: r
|
@@ -323,5 +323,5 @@ import '../../assets/MultiSelectSearch.css';const fe = "_disabled_17kql_5", ke =
|
|
323
323
|
}
|
324
324
|
);
|
325
325
|
export {
|
326
|
-
|
326
|
+
Fe as MultiSelectSearch
|
327
327
|
};
|
@@ -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) {
|