mimir-ui-kit 1.37.12 → 1.37.14
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/Accordion.css +1 -1
- package/dist/assets/SelectSearch.css +1 -1
- package/dist/{combobox-BpYucpxz.js → combobox-CDU06zJj.js} +1080 -1121
- package/dist/components/Accordion/Accordion.js +116 -116
- package/dist/components/CheckboxMimir/CheckboxMimir.js +46 -50
- package/dist/components/Drawer/Drawer.d.ts +9 -1
- package/dist/components/Drawer/Drawer.js +49 -47
- package/dist/components/MultiSelectSearch/MultiSelectSearch.js +18 -18
- package/dist/components/RadioGroup/RadioGroup.js +3 -3
- package/dist/components/SelectSearch/SelectSearch.js +131 -131
- package/dist/components/Switcher/Switcher.js +4 -4
- package/dist/components/TabTrail/TabTrail.js +4 -4
- package/dist/{field-C1kt7aNM.js → field-FJ34aSs4.js} +2 -2
- package/dist/{focus-management-DOYCPyGg.js → focus-management-XwV-9qkO.js} +1 -1
- package/dist/{hidden-PvGXrYUY.js → hidden-DbgtYPOH.js} +1 -1
- package/dist/hooks/useMediaQuery/useMediaQuery.d.ts +1 -1
- package/dist/{keyboard-mgWkd2Vh.js → keyboard-B0lm_zyn.js} +111 -114
- package/dist/{label-D4GFpe5F.js → label-y3ANLTNC.js} +2 -2
- package/dist/open-closed-CdldUPoq.js +86 -0
- package/dist/{use-active-press-CqLGIFz7.js → use-active-press-86hajhdd.js} +1 -1
- package/package.json +1 -1
- package/dist/open-closed-D2VjDhAN.js +0 -86
@@ -1,37 +1,37 @@
|
|
1
|
-
import { jsxs as m, jsx as t, Fragment as
|
1
|
+
import { jsxs as m, jsx as t, Fragment as P } from "react/jsx-runtime";
|
2
2
|
import { c as s } from "../../index-DIxK0V-G.js";
|
3
|
-
import { useState as N, useRef as
|
3
|
+
import { useState as N, useRef as Q, useCallback as u, useEffect as F } from "react";
|
4
4
|
import { EDrawerPosition as w } from "./constants.js";
|
5
|
-
import { useMediaQuery as
|
6
|
-
import { EMediaQuery as
|
7
|
-
import { useLockBodyScroll as
|
8
|
-
import { useResizeObserver as
|
5
|
+
import { useMediaQuery as G } from "../../hooks/useMediaQuery/useMediaQuery.js";
|
6
|
+
import { EMediaQuery as H } from "../../hooks/useMediaQuery/constants.js";
|
7
|
+
import { useLockBodyScroll as K } from "../../hooks/useLockBodyScroll/useLockBodyScroll.js";
|
8
|
+
import { useResizeObserver as V } from "../../hooks/useResizeObserver/useResizeObserver.js";
|
9
9
|
import { Button as k } from "../Button/Button.js";
|
10
|
-
import { EButtonVariantDefault as
|
11
|
-
import { Loader as
|
12
|
-
import { Portal as
|
13
|
-
import '../../assets/Drawer.css';const
|
14
|
-
drawer:
|
15
|
-
content:
|
10
|
+
import { EButtonVariantDefault as W, EButtonSize as n } from "../Button/constants.js";
|
11
|
+
import { Loader as Y } from "../Loader/Loader.js";
|
12
|
+
import { Portal as q } from "../Portal/Portal.js";
|
13
|
+
import '../../assets/Drawer.css';const J = "_drawer_1xs4d_3", U = "_content_1xs4d_27", Z = "_header_1xs4d_45", $ = "_title_1xs4d_59", O = "_space_1xs4d_73", ee = "_inner_1xs4d_84", te = "_button_1xs4d_87", oe = "_footer_1xs4d_92", se = "_left_1xs4d_105", re = "_right_1xs4d_109", ne = "_full_1xs4d_113", ae = "_bottom_1xs4d_123", ie = "_opened_1xs4d_140", le = "_overlay_1xs4d_196", ce = "_unmount_1xs4d_212", e = {
|
14
|
+
drawer: J,
|
15
|
+
content: U,
|
16
16
|
"is-loading": "_is-loading_1xs4d_41",
|
17
|
-
header:
|
17
|
+
header: Z,
|
18
18
|
"sticky-header": "_sticky-header_1xs4d_53",
|
19
|
-
title:
|
20
|
-
space:
|
21
|
-
inner:
|
22
|
-
button:
|
23
|
-
footer:
|
19
|
+
title: $,
|
20
|
+
space: O,
|
21
|
+
inner: ee,
|
22
|
+
button: te,
|
23
|
+
footer: oe,
|
24
24
|
"footer-button": "_footer-button_1xs4d_101",
|
25
|
-
left:
|
26
|
-
right:
|
27
|
-
full:
|
28
|
-
bottom:
|
25
|
+
left: se,
|
26
|
+
right: re,
|
27
|
+
full: ne,
|
28
|
+
bottom: ae,
|
29
29
|
"full-bottom-height": "_full-bottom-height_1xs4d_134",
|
30
|
-
opened:
|
30
|
+
opened: ie,
|
31
31
|
"is-closing": "_is-closing_1xs4d_159",
|
32
|
-
overlay:
|
33
|
-
unmount:
|
34
|
-
},
|
32
|
+
overlay: le,
|
33
|
+
unmount: ce
|
34
|
+
}, de = 300, we = ({
|
35
35
|
isOpen: r,
|
36
36
|
onClose: a,
|
37
37
|
title: E,
|
@@ -44,40 +44,42 @@ import '../../assets/Drawer.css';const Y = "_drawer_1xs4d_3", q = "_content_1xs4
|
|
44
44
|
paddingRight: S = 8,
|
45
45
|
footer: c,
|
46
46
|
children: T,
|
47
|
-
|
48
|
-
|
47
|
+
classNameTitle: C,
|
48
|
+
classNameHeader: D,
|
49
|
+
classNameInner: z,
|
50
|
+
classNameFooter: L,
|
49
51
|
closeOnClickOutside: h = !0,
|
50
52
|
showCloseButton: x = !0
|
51
53
|
}) => {
|
52
|
-
const [p, y] = N(!1), [
|
54
|
+
const [p, y] = N(!1), [R, b] = N(!1), g = Q(), d = G(H.XS1), { ref: A } = V({
|
53
55
|
enabled: l === w.BOTTOM
|
54
56
|
});
|
55
|
-
|
57
|
+
K({
|
56
58
|
on: r && !p,
|
57
59
|
paddingRight: S
|
58
60
|
});
|
59
61
|
const o = u(() => {
|
60
62
|
a && (y(!0), g.current = setTimeout(() => {
|
61
63
|
a(), y(!1);
|
62
|
-
},
|
63
|
-
}, [a]),
|
64
|
+
}, de));
|
65
|
+
}, [a]), X = u(() => {
|
64
66
|
h && o();
|
65
67
|
}, [h, o]), _ = u(
|
66
|
-
(
|
67
|
-
|
68
|
+
(j) => {
|
69
|
+
j.key === "Escape" && o();
|
68
70
|
},
|
69
71
|
[o]
|
70
72
|
);
|
71
|
-
|
73
|
+
F(() => (r && (b(!0), window.addEventListener("keydown", _)), () => {
|
72
74
|
b(!1), clearTimeout(g.current), window.removeEventListener("keydown", _);
|
73
75
|
}), [r, _]);
|
74
76
|
const v = {
|
75
|
-
[e.opened]:
|
77
|
+
[e.opened]: R,
|
76
78
|
[e["is-closing"]]: p,
|
77
79
|
[e["full-bottom-height"]]: I,
|
78
80
|
[e["is-loading"]]: i
|
79
81
|
};
|
80
|
-
return !r && f ? null : /* @__PURE__ */ m(
|
82
|
+
return !r && f ? null : /* @__PURE__ */ m(q, { children: [
|
81
83
|
/* @__PURE__ */ t(
|
82
84
|
"div",
|
83
85
|
{
|
@@ -87,23 +89,23 @@ import '../../assets/Drawer.css';const Y = "_drawer_1xs4d_3", q = "_content_1xs4
|
|
87
89
|
children: /* @__PURE__ */ t(
|
88
90
|
"section",
|
89
91
|
{
|
90
|
-
ref:
|
92
|
+
ref: A,
|
91
93
|
className: s(e.content, e[l], {
|
92
94
|
[e["is-loading"]]: !!i
|
93
95
|
}),
|
94
|
-
children: i ? /* @__PURE__ */ t(
|
96
|
+
children: i ? /* @__PURE__ */ t(Y, {}) : /* @__PURE__ */ m(P, { children: [
|
95
97
|
/* @__PURE__ */ m(
|
96
98
|
"header",
|
97
99
|
{
|
98
|
-
className: s(e.header, {
|
100
|
+
className: s(e.header, D, {
|
99
101
|
[e["sticky-header"]]: B
|
100
102
|
}),
|
101
103
|
children: [
|
102
|
-
/* @__PURE__ */ t("h2", { className: e.title, children: E }),
|
104
|
+
/* @__PURE__ */ t("h2", { className: s(e.title, C), children: E }),
|
103
105
|
/* @__PURE__ */ t("div", { className: e.space, children: x && /* @__PURE__ */ t(
|
104
106
|
k,
|
105
107
|
{
|
106
|
-
variant:
|
108
|
+
variant: W.SecondaryWhite,
|
107
109
|
isIconButton: !0,
|
108
110
|
size: d ? n.S : n.M,
|
109
111
|
iconName: "Close16px",
|
@@ -114,8 +116,8 @@ import '../../assets/Drawer.css';const Y = "_drawer_1xs4d_3", q = "_content_1xs4
|
|
114
116
|
]
|
115
117
|
}
|
116
118
|
),
|
117
|
-
/* @__PURE__ */ t("div", { className: s(e.inner,
|
118
|
-
/* @__PURE__ */ t("footer", { className: s(e.footer,
|
119
|
+
/* @__PURE__ */ t("div", { className: s(e.inner, z), children: T }),
|
120
|
+
/* @__PURE__ */ t("footer", { className: s(e.footer, L), children: typeof c == "function" ? c({ handleClose: o }) : c || x && /* @__PURE__ */ t(
|
119
121
|
k,
|
120
122
|
{
|
121
123
|
size: d ? n.M : n.XXL,
|
@@ -141,12 +143,12 @@ import '../../assets/Drawer.css';const Y = "_drawer_1xs4d_3", q = "_content_1xs4
|
|
141
143
|
v
|
142
144
|
),
|
143
145
|
"data-testid": "drawer-overlay",
|
144
|
-
onClick:
|
146
|
+
onClick: X
|
145
147
|
}
|
146
148
|
)
|
147
149
|
] });
|
148
150
|
};
|
149
151
|
export {
|
150
|
-
|
151
|
-
|
152
|
+
de as ANIMATION_DELAY,
|
153
|
+
we as Drawer
|
152
154
|
};
|
@@ -1,15 +1,15 @@
|
|
1
|
-
import { jsxs as b, jsx as o, Fragment as
|
1
|
+
import { jsxs as b, jsx as o, Fragment as P } from "react/jsx-runtime";
|
2
2
|
import { c as r } from "../../index-DIxK0V-G.js";
|
3
|
-
import { forwardRef as ce, useRef as
|
3
|
+
import { forwardRef as ce, useRef as F, useState as E, useEffect as L, useMemo as ae } from "react";
|
4
4
|
import { EMultiSelectSearchSize as O } from "./constants.js";
|
5
|
-
import { getInitialInputValue as
|
5
|
+
import { getInitialInputValue as j, MULTISELECT_OPEN_EVENT as G, mapSizeToInputSize as U, getDropdownArrowIcon as ue, dispatchMultiselectOpen as I, joinSelectedItems as W } from "./utils.js";
|
6
6
|
import { Icon as de } from "../../icons/Icon.js";
|
7
7
|
import { Button as pe } from "../Button/Button.js";
|
8
8
|
import { CheckboxMimir as me } from "../CheckboxMimir/CheckboxMimir.js";
|
9
9
|
import { Chip as _e } from "../Chip/Chip.js";
|
10
|
-
import { I as
|
10
|
+
import { I as H } from "../../Input-BYrIS5GU.js";
|
11
11
|
import { EInputVariant as he } from "../Input/constants.js";
|
12
|
-
import { H as fe, U as
|
12
|
+
import { H as fe, U as J, G as K, K as ke, W as qe } from "../../combobox-CDU06zJj.js";
|
13
13
|
import '../../assets/MultiSelectSearch.css';const ge = "_disabled_17kql_5", ve = "_container_17kql_9", be = "_full_17kql_27", Ie = "_button_17kql_39", we = "_options_17kql_53", Ne = "_top_17kql_64", Ce = "_bottom_17kql_69", Se = "_m_17kql_2", Me = "_l_17kql_111", Ee = "_focused_17kql_129", Le = "_option_17kql_53", Oe = "_chip_17kql_158", Te = "_clear_17kql_183", t = {
|
14
14
|
"multi-select-search": "_multi-select-search_17kql_2",
|
15
15
|
disabled: ge,
|
@@ -64,13 +64,13 @@ import '../../assets/MultiSelectSearch.css';const ge = "_disabled_17kql_5", ve =
|
|
64
64
|
disableInput: f = !1,
|
65
65
|
autocomplete: z = "on",
|
66
66
|
id: m = `multiselect-${Math.random().toString(36).slice(2, 11)}`
|
67
|
-
} = $, S =
|
68
|
-
() =>
|
67
|
+
} = $, S = F(null), _ = F(null), [k, h] = E(!1), [q, g] = E(
|
68
|
+
() => j(u, p)
|
69
69
|
), [l, v] = E(
|
70
70
|
u || []
|
71
71
|
);
|
72
72
|
L(() => {
|
73
|
-
u && (v(u), JSON.stringify(u) !== JSON.stringify(l) && g(
|
73
|
+
u && (v(u), JSON.stringify(u) !== JSON.stringify(l) && g(j(u, p)));
|
74
74
|
}, [u, p, l]);
|
75
75
|
const V = ae(() => {
|
76
76
|
var n;
|
@@ -81,7 +81,7 @@ import '../../assets/MultiSelectSearch.css';const ge = "_disabled_17kql_5", ve =
|
|
81
81
|
);
|
82
82
|
}, [x, d, q, l]), ne = (e) => {
|
83
83
|
v(e), s == null || s(e);
|
84
|
-
const n =
|
84
|
+
const n = W(e, p);
|
85
85
|
g(n), h(!0), I(m), setTimeout(() => {
|
86
86
|
if (_.current) {
|
87
87
|
_.current.focus(), _.current.scrollLeft = _.current.scrollWidth;
|
@@ -101,7 +101,7 @@ import '../../assets/MultiSelectSearch.css';const ge = "_disabled_17kql_5", ve =
|
|
101
101
|
const n = l.filter(
|
102
102
|
(a) => a.id !== e.id
|
103
103
|
);
|
104
|
-
v(n), s == null || s(n), g(
|
104
|
+
v(n), s == null || s(n), g(W(n, p));
|
105
105
|
}, B = () => {
|
106
106
|
const e = !k;
|
107
107
|
h(e), e && I(m);
|
@@ -160,15 +160,15 @@ import '../../assets/MultiSelectSearch.css';const ge = "_disabled_17kql_5", ve =
|
|
160
160
|
children: [
|
161
161
|
f && /* @__PURE__ */ b("div", { className: t["input-container"], children: [
|
162
162
|
/* @__PURE__ */ o(
|
163
|
-
|
163
|
+
J,
|
164
164
|
{
|
165
165
|
disabled: c,
|
166
166
|
style: { width: "100%" },
|
167
167
|
onClick: B,
|
168
168
|
children: /* @__PURE__ */ o(
|
169
|
-
|
169
|
+
K,
|
170
170
|
{
|
171
|
-
as:
|
171
|
+
as: H,
|
172
172
|
label: T,
|
173
173
|
size: U(i),
|
174
174
|
className: r(t["multi-select-input"], {
|
@@ -212,9 +212,9 @@ import '../../assets/MultiSelectSearch.css';const ge = "_disabled_17kql_5", ve =
|
|
212
212
|
)
|
213
213
|
] }),
|
214
214
|
!f && /* @__PURE__ */ o(
|
215
|
-
|
215
|
+
K,
|
216
216
|
{
|
217
|
-
as:
|
217
|
+
as: H,
|
218
218
|
label: T,
|
219
219
|
size: U(i),
|
220
220
|
className: t["multi-select-input"],
|
@@ -233,7 +233,7 @@ import '../../assets/MultiSelectSearch.css';const ge = "_disabled_17kql_5", ve =
|
|
233
233
|
rightAddon: {
|
234
234
|
addonType: "react-node",
|
235
235
|
addonContent: Y && /* @__PURE__ */ o(
|
236
|
-
|
236
|
+
J,
|
237
237
|
{
|
238
238
|
className: r(t.button, {
|
239
239
|
[t.disabled]: c
|
@@ -257,7 +257,7 @@ import '../../assets/MultiSelectSearch.css';const ge = "_disabled_17kql_5", ve =
|
|
257
257
|
...D
|
258
258
|
}
|
259
259
|
),
|
260
|
-
k && /* @__PURE__ */ o(
|
260
|
+
k && /* @__PURE__ */ o(P, { children: d.length ? V.length ? /* @__PURE__ */ o(
|
261
261
|
ke,
|
262
262
|
{
|
263
263
|
className: r(
|
@@ -279,7 +279,7 @@ import '../../assets/MultiSelectSearch.css';const ge = "_disabled_17kql_5", ve =
|
|
279
279
|
[t["option-active"]]: n
|
280
280
|
}
|
281
281
|
),
|
282
|
-
children: /* @__PURE__ */ b(
|
282
|
+
children: /* @__PURE__ */ b(P, { children: [
|
283
283
|
/* @__PURE__ */ b("div", { className: t["option-inner"], children: [
|
284
284
|
e.name,
|
285
285
|
e.bottom && /* @__PURE__ */ o("div", { children: e.bottom })
|
@@ -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-y3ANLTNC.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-B0lm_zyn.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-XwV-9qkO.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) {
|