mimir-ui-kit 1.37.14 → 1.37.15
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/assets/SelectSearch.css +1 -1
- package/dist/{combobox-CDU06zJj.js → combobox-BpYucpxz.js} +1121 -1080
- package/dist/components/Accordion/Accordion.js +24 -24
- package/dist/components/CheckboxMimir/CheckboxMimir.js +4 -4
- package/dist/components/MultiSelectSearch/MultiSelectSearch.js +18 -18
- package/dist/components/RadioGroup/RadioGroup.js +3 -3
- package/dist/components/SelectSearch/SelectSearch.js +81 -81
- package/dist/components/Switcher/Switcher.js +4 -4
- package/dist/components/TabTrail/TabTrail.js +4 -4
- 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,5 +1,5 @@
|
|
1
1
|
import { jsxs as A, Fragment as K, jsx as I } from "react/jsx-runtime";
|
2
|
-
import { c as
|
2
|
+
import { c as D } from "../../index-DIxK0V-G.js";
|
3
3
|
import b, { createContext as M, useRef as oe, Fragment as re, useReducer as pe, useMemo as O, useId as le, useEffect as se, useState as ae, useContext as U, forwardRef as me } from "react";
|
4
4
|
import { AccordionItem as fe } from "./AccordionItem/AccordionItem.js";
|
5
5
|
import { EAccordionButtonType as g, EAccordionSize as B, EAccordionLinkIconSize as J, EAccordionButtonStyle as _e, EAccordionIconType as Y, EAccordionButtonIconSize as Z } from "./constants.js";
|
@@ -7,10 +7,10 @@ import { useMediaQuery as ye } from "../../hooks/useMediaQuery/useMediaQuery.js"
|
|
7
7
|
import { EMediaQuery as Ee } from "../../hooks/useMediaQuery/constants.js";
|
8
8
|
import { Icon as Se } from "../../icons/Icon.js";
|
9
9
|
import { Link as ke } from "../AnchorLink/Link.js";
|
10
|
-
import { M as ee, W as q, y as j, T as Ie, o as
|
11
|
-
import { w as he } from "../../use-active-press-
|
12
|
-
import { e as
|
13
|
-
import { c as
|
10
|
+
import { M as ee, W as q, y as j, T as Ie, o as $, a as W, H as Q, I as ce, $ as be, b as ve, D as te, u as xe, c as T } from "../../keyboard-mgWkd2Vh.js";
|
11
|
+
import { w as he } from "../../use-active-press-CqLGIFz7.js";
|
12
|
+
import { e as De } from "../../use-resolve-button-type-DhFdPxnv.js";
|
13
|
+
import { c as $e, i as R, 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 = M(() => {
|
16
16
|
});
|
@@ -62,18 +62,18 @@ let He = re;
|
|
62
62
|
function Ke(e, t) {
|
63
63
|
let { defaultOpen: u = !1, ...p } = e, s = oe(null), m = j(t, Ie((c) => {
|
64
64
|
s.current = c;
|
65
|
-
}, e.as === void 0 || e.as === re)), a = pe(Le, { disclosureState: u ? 0 : 1, buttonElement: null, panelElement: null, buttonId: null, panelId: null }), [{ disclosureState: n, buttonId: r }, y] = a, l =
|
65
|
+
}, e.as === void 0 || e.as === re)), a = pe(Le, { disclosureState: u ? 0 : 1, buttonElement: null, panelElement: null, buttonId: null, panelId: null }), [{ disclosureState: n, buttonId: r }, y] = a, l = $((c) => {
|
66
66
|
y({ type: 1 });
|
67
|
-
let f =
|
67
|
+
let f = xe(s);
|
68
68
|
if (!f || !r) return;
|
69
69
|
let _ = c ? c instanceof HTMLElement ? c : c.current instanceof HTMLElement ? c.current : f.getElementById(r) : f.getElementById(r);
|
70
70
|
_ == null || _.focus();
|
71
71
|
}), v = O(() => ({ close: l }), [l]), E = O(() => ({ open: n === 0, close: l }), [n, l]), S = { ref: m };
|
72
|
-
return b.createElement(V.Provider, { value: a }, b.createElement(X.Provider, { value: v }, b.createElement(Ae, { value: l }, b.createElement(
|
72
|
+
return b.createElement(V.Provider, { value: a }, b.createElement(X.Provider, { value: v }, b.createElement(Ae, { value: l }, b.createElement($e, { value: W(n, { 0: R.Open, 1: R.Closed }) }, Q({ ourProps: S, theirProps: p, slot: E, defaultTag: He, name: "Disclosure" })))));
|
73
73
|
}
|
74
74
|
let Ue = "button";
|
75
75
|
function qe(e, t) {
|
76
|
-
let u = le(), { id: p = `headlessui-disclosure-button-${u}`, disabled: s = !1, autoFocus: m = !1, ...a } = e, [n, r] = z("Disclosure.Button"), y = Fe(), l = y === null ? !1 : y === n.panelId, v = oe(null), E = j(v, t,
|
76
|
+
let u = le(), { id: p = `headlessui-disclosure-button-${u}`, disabled: s = !1, autoFocus: m = !1, ...a } = e, [n, r] = z("Disclosure.Button"), y = Fe(), l = y === null ? !1 : y === n.panelId, v = oe(null), E = j(v, t, $((i) => {
|
77
77
|
if (!l) return r({ type: 4, element: i });
|
78
78
|
})), S = ce();
|
79
79
|
se(() => {
|
@@ -81,7 +81,7 @@ function qe(e, t) {
|
|
81
81
|
r({ type: 2, buttonId: null });
|
82
82
|
};
|
83
83
|
}, [p, r, l]);
|
84
|
-
let c =
|
84
|
+
let c = $((i) => {
|
85
85
|
var o;
|
86
86
|
if (l) {
|
87
87
|
if (n.disclosureState === 1) return;
|
@@ -97,28 +97,28 @@ function qe(e, t) {
|
|
97
97
|
i.preventDefault(), i.stopPropagation(), r({ type: 0 });
|
98
98
|
break;
|
99
99
|
}
|
100
|
-
}), f =
|
100
|
+
}), f = $((i) => {
|
101
101
|
switch (i.key) {
|
102
102
|
case T.Space:
|
103
103
|
i.preventDefault();
|
104
104
|
break;
|
105
105
|
}
|
106
|
-
}), _ =
|
106
|
+
}), _ = $((i) => {
|
107
107
|
var o;
|
108
108
|
Ne(i.currentTarget) || s || (l ? (r({ type: 0 }), (o = n.buttonElement) == null || o.focus()) : r({ type: 0 }));
|
109
|
-
}), { isFocusVisible:
|
109
|
+
}), { isFocusVisible: x, focusProps: h } = be({ autoFocus: m }), { isHovered: w, hoverProps: N } = ve({ isDisabled: s }), { pressed: k, pressProps: P } = he({ disabled: s }), F = O(() => ({ open: n.disclosureState === 0, hover: w, active: k, disabled: s, focus: x, autofocus: m }), [n, w, k, x, s, m]), C = De(e, n.buttonElement), L = l ? te({ ref: E, type: C, disabled: s || void 0, autoFocus: m, onKeyDown: c, onClick: _ }, h, N, P) : te({ ref: E, id: p, type: C, "aria-expanded": n.disclosureState === 0, "aria-controls": n.panelElement ? n.panelId : void 0, disabled: s || void 0, autoFocus: m, onKeyDown: c, onKeyUp: f, onClick: _ }, h, N, P);
|
110
110
|
return Q({ mergeRefs: S, ourProps: L, theirProps: a, slot: F, defaultTag: Ue, name: "Disclosure.Button" });
|
111
111
|
}
|
112
112
|
let je = "div", We = ee.RenderStrategy | ee.Static;
|
113
113
|
function Qe(e, t) {
|
114
|
-
let u = le(), { id: p = `headlessui-disclosure-panel-${u}`, transition: s = !1, ...m } = e, [a, n] = z("Disclosure.Panel"), { close: r } = ie("Disclosure.Panel"), y = ce(), [l, v] = ae(null), E = j(t,
|
114
|
+
let u = le(), { id: p = `headlessui-disclosure-panel-${u}`, transition: s = !1, ...m } = e, [a, n] = z("Disclosure.Panel"), { close: r } = ie("Disclosure.Panel"), y = ce(), [l, v] = ae(null), E = j(t, $((h) => {
|
115
115
|
Be(() => n({ type: 5, element: h }));
|
116
116
|
}), v);
|
117
117
|
se(() => (n({ type: 3, panelId: p }), () => {
|
118
118
|
n({ type: 3, panelId: null });
|
119
119
|
}), [p, n]);
|
120
|
-
let S = Pe(), [c, f] = ge(s, l, S !== null ? (S & R.Open) === R.Open : a.disclosureState === 0), _ = O(() => ({ open: a.disclosureState === 0, close: r }), [a.disclosureState, r]),
|
121
|
-
return b.createElement(we, null, b.createElement(G.Provider, { value: a.panelId }, Q({ mergeRefs: y, ourProps:
|
120
|
+
let S = Pe(), [c, f] = ge(s, l, S !== null ? (S & R.Open) === R.Open : a.disclosureState === 0), _ = O(() => ({ open: a.disclosureState === 0, close: r }), [a.disclosureState, r]), x = { ref: E, id: p, ...Te(f) };
|
121
|
+
return b.createElement(we, null, b.createElement(G.Provider, { value: a.panelId }, Q({ mergeRefs: y, ourProps: x, theirProps: m, slot: _, defaultTag: je, features: We, visible: c, name: "Disclosure.Panel" })));
|
122
122
|
}
|
123
123
|
let Ve = q(Ke), ue = q(qe), de = q(Qe), ze = Object.assign(Ve, { Button: ue, Panel: de });
|
124
124
|
const Xe = "_icon_1yk0x_2", Ge = "_open_1yk0x_15", Je = "_square_1yk0x_19", Ye = "_circle_1yk0x_23", Ze = "_disabled_1yk0x_23", et = "_accordion_1yk0x_37", tt = "_header_1yk0x_45", nt = "_title_1yk0x_61", ot = "_panel_1yk0x_88", rt = "_m_1yk0x_112", lt = "_s_1yk0x_19", d = {
|
@@ -157,7 +157,7 @@ const Xe = "_icon_1yk0x_2", Ge = "_open_1yk0x_15", Je = "_square_1yk0x_19", Ye =
|
|
157
157
|
subtitleNode: c,
|
158
158
|
onlyOpenSubtitleNode: f,
|
159
159
|
classNameSubtitleContainer: _
|
160
|
-
},
|
160
|
+
}, x) => {
|
161
161
|
const [h, w] = ae(!1), N = ye(Ee.XS1), k = u === g.LINK, P = {
|
162
162
|
[d["is-link"]]: k
|
163
163
|
}, F = () => {
|
@@ -167,7 +167,7 @@ const Xe = "_icon_1yk0x_2", Ge = "_open_1yk0x_15", Je = "_square_1yk0x_19", Ye =
|
|
167
167
|
size: N ? "s" : "l",
|
168
168
|
rightIcon: {
|
169
169
|
iconName: C,
|
170
|
-
className:
|
170
|
+
className: D({
|
171
171
|
[d["link-open"]]: o
|
172
172
|
})
|
173
173
|
}
|
@@ -181,7 +181,7 @@ const Xe = "_icon_1yk0x_2", Ge = "_open_1yk0x_15", Je = "_square_1yk0x_19", Ye =
|
|
181
181
|
/* @__PURE__ */ I(
|
182
182
|
"span",
|
183
183
|
{
|
184
|
-
className:
|
184
|
+
className: D(
|
185
185
|
d.title,
|
186
186
|
l,
|
187
187
|
n && d["title-uppercase"]
|
@@ -192,7 +192,7 @@ const Xe = "_icon_1yk0x_2", Ge = "_open_1yk0x_15", Je = "_square_1yk0x_19", Ye =
|
|
192
192
|
/* @__PURE__ */ I(
|
193
193
|
"div",
|
194
194
|
{
|
195
|
-
className:
|
195
|
+
className: D(
|
196
196
|
d["icon-container"],
|
197
197
|
o && d.open,
|
198
198
|
t && d.disabled,
|
@@ -219,20 +219,20 @@ const Xe = "_icon_1yk0x_2", Ge = "_open_1yk0x_15", Je = "_square_1yk0x_19", Ye =
|
|
219
219
|
/* @__PURE__ */ I(
|
220
220
|
"div",
|
221
221
|
{
|
222
|
-
className:
|
222
|
+
className: D(
|
223
223
|
d.accordion,
|
224
224
|
d[a],
|
225
225
|
P,
|
226
226
|
E
|
227
227
|
),
|
228
|
-
children: /* @__PURE__ */ I(ze, { ref:
|
228
|
+
children: /* @__PURE__ */ I(ze, { ref: x, children: ({ open: o, close: H }) => /* @__PURE__ */ A(K, { children: [
|
229
229
|
(!o || s) && /* @__PURE__ */ I(
|
230
230
|
ue,
|
231
231
|
{
|
232
232
|
disabled: t,
|
233
233
|
as: k ? ke : g.BUTTON,
|
234
234
|
onClick: F,
|
235
|
-
className:
|
235
|
+
className: D({
|
236
236
|
[d.header]: !k,
|
237
237
|
[d.disabled]: t,
|
238
238
|
[m ?? ""]: k && m
|
@@ -245,7 +245,7 @@ const Xe = "_icon_1yk0x_2", Ge = "_open_1yk0x_15", Je = "_square_1yk0x_19", Ye =
|
|
245
245
|
de,
|
246
246
|
{
|
247
247
|
"data-testid": "accordion-panel",
|
248
|
-
className:
|
248
|
+
className: D(
|
249
249
|
d.panel,
|
250
250
|
v,
|
251
251
|
P
|
@@ -1,10 +1,10 @@
|
|
1
1
|
import { jsxs as L, jsx as p } from "react/jsx-runtime";
|
2
|
-
import { W as O, p as V, o as d, $ as W, b as X, D as q, H as z, c as D } from "../../keyboard-
|
2
|
+
import { W as O, p as V, o as d, $ as W, b as X, D as q, H as z, c as D } from "../../keyboard-mgWkd2Vh.js";
|
3
3
|
import h, { useId as J, useState as Q, useMemo as Y, useCallback as Z, forwardRef as ee } from "react";
|
4
|
-
import { w as re } from "../../use-active-press-
|
5
|
-
import { u as ae, a as oe, b as te, T as ce, I as ne, G as se, j as ie, p as le, K as de } from "../../label-
|
4
|
+
import { w as re } from "../../use-active-press-CqLGIFz7.js";
|
5
|
+
import { u as ae, a as oe, b as te, T as ce, I as ne, G as se, j as ie, p as le, K as de } from "../../label-D4GFpe5F.js";
|
6
6
|
import { r as be } from "../../bugs-diTMAGNw.js";
|
7
|
-
import { H as ue } from "../../field-
|
7
|
+
import { H as ue } from "../../field-C1kt7aNM.js";
|
8
8
|
import { c as me } from "../../index-DIxK0V-G.js";
|
9
9
|
import { Icon as fe } from "../../icons/Icon.js";
|
10
10
|
import '../../assets/CheckboxMimir.css';let pe = "span";
|
@@ -1,15 +1,15 @@
|
|
1
|
-
import { jsxs as b, jsx as o, Fragment as
|
1
|
+
import { jsxs as b, jsx as o, Fragment as j } 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 P, 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 F, MULTISELECT_OPEN_EVENT as G, mapSizeToInputSize as U, getDropdownArrowIcon as ue, dispatchMultiselectOpen as I, joinSelectedItems as H } 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 J } 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 K, G as W, K as ke, j as qe } from "../../combobox-BpYucpxz.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 = P(null), _ = P(null), [k, h] = E(!1), [q, g] = E(
|
68
|
+
() => F(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(F(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 = H(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(H(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
|
+
K,
|
164
164
|
{
|
165
165
|
disabled: c,
|
166
166
|
style: { width: "100%" },
|
167
167
|
onClick: B,
|
168
168
|
children: /* @__PURE__ */ o(
|
169
|
-
|
169
|
+
W,
|
170
170
|
{
|
171
|
-
as:
|
171
|
+
as: J,
|
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
|
+
W,
|
216
216
|
{
|
217
|
-
as:
|
217
|
+
as: J,
|
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
|
+
K,
|
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(j, { 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(j, { 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-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) {
|
@@ -1,82 +1,82 @@
|
|
1
|
-
import { jsx as a, jsxs as
|
1
|
+
import { jsx as a, jsxs as u, Fragment as D } from "react/jsx-runtime";
|
2
2
|
import { c as l } from "../../index-DIxK0V-G.js";
|
3
|
-
import { forwardRef as U, useState as
|
4
|
-
import { ESelectSearchSize as
|
5
|
-
import { mapSizeToInputSize as
|
6
|
-
import { Icon as
|
7
|
-
import { Button as
|
8
|
-
import { I as
|
3
|
+
import { forwardRef as U, useState as j, useMemo as R, useCallback as $, useEffect as J } from "react";
|
4
|
+
import { ESelectSearchSize as v } from "./constants.js";
|
5
|
+
import { mapSizeToInputSize as q, getDropdownArrowIcon as Q } from "./utils.js";
|
6
|
+
import { Icon as A } from "../../icons/Icon.js";
|
7
|
+
import { Button as W } from "../Button/Button.js";
|
8
|
+
import { I as O } from "../../Input-BYrIS5GU.js";
|
9
9
|
import { EInputVariant as X } from "../Input/constants.js";
|
10
|
-
import { H as Y, U as
|
11
|
-
import '../../assets/SelectSearch.css';const te = "
|
12
|
-
"select-search": "_select-
|
10
|
+
import { H as Y, U as B, G as M, K as Z, j as ee } from "../../combobox-BpYucpxz.js";
|
11
|
+
import '../../assets/SelectSearch.css';const te = "_disabled_1y27d_5", oe = "_container_1y27d_9", ne = "_full_1y27d_24", se = "_button_1y27d_36", ae = "_options_1y27d_50", ie = "_top_1y27d_61", le = "_bottom_1y27d_67", re = "_m_1y27d_94", ce = "_l_1y27d_109", de = "_option_1y27d_50", pe = "_clear_1y27d_163", e = {
|
12
|
+
"select-search": "_select-search_1y27d_2",
|
13
13
|
disabled: te,
|
14
14
|
container: oe,
|
15
|
-
"container-open": "_container-
|
15
|
+
"container-open": "_container-open_1y27d_20",
|
16
16
|
full: ne,
|
17
|
-
"selected-icon": "_selected-
|
18
|
-
"selector-icon-open": "_selector-icon-
|
17
|
+
"selected-icon": "_selected-icon_1y27d_28",
|
18
|
+
"selector-icon-open": "_selector-icon-open_1y27d_32",
|
19
19
|
button: se,
|
20
|
-
"selector-icon": "_selector-
|
20
|
+
"selector-icon": "_selector-icon_1y27d_32",
|
21
21
|
options: ae,
|
22
22
|
top: ie,
|
23
23
|
bottom: le,
|
24
|
-
"no-options": "_no-
|
24
|
+
"no-options": "_no-options_1y27d_73",
|
25
25
|
m: re,
|
26
26
|
l: ce,
|
27
|
-
"select-input": "_select-
|
28
|
-
"select-input-disabled": "_select-input-
|
27
|
+
"select-input": "_select-input_1y27d_124",
|
28
|
+
"select-input-disabled": "_select-input-disabled_1y27d_127",
|
29
29
|
option: de,
|
30
|
-
"option-active": "_option-
|
31
|
-
"option-inner": "_option-
|
32
|
-
"right-slot": "_right-
|
33
|
-
"required-mark": "_required-
|
34
|
-
clear:
|
35
|
-
"icon-button": "_icon-
|
36
|
-
},
|
30
|
+
"option-active": "_option-active_1y27d_143",
|
31
|
+
"option-inner": "_option-inner_1y27d_146",
|
32
|
+
"right-slot": "_right-slot_1y27d_153",
|
33
|
+
"required-mark": "_required-mark_1y27d_158",
|
34
|
+
clear: pe,
|
35
|
+
"icon-button": "_icon-button_1y27d_172"
|
36
|
+
}, we = U(
|
37
37
|
(E, L) => {
|
38
38
|
const {
|
39
|
-
placeholder:
|
40
|
-
size: i =
|
39
|
+
placeholder: g,
|
40
|
+
size: i = v.L,
|
41
41
|
value: n,
|
42
42
|
onChange: s,
|
43
43
|
full: V,
|
44
|
-
showArrow:
|
45
|
-
items:
|
44
|
+
showArrow: w = !0,
|
45
|
+
items: p = [],
|
46
46
|
classNameOption: F,
|
47
47
|
displayValue: G = "name",
|
48
|
-
filterOnSearch:
|
49
|
-
onSearch:
|
50
|
-
variant:
|
51
|
-
menuPlacement:
|
48
|
+
filterOnSearch: C = !0,
|
49
|
+
onSearch: _,
|
50
|
+
variant: I = X.DefaultGray,
|
51
|
+
menuPlacement: y = "bottom",
|
52
52
|
disabled: r = !1,
|
53
|
-
searchProps:
|
54
|
-
withClearButton:
|
53
|
+
searchProps: S,
|
54
|
+
withClearButton: f = !1,
|
55
55
|
disableInput: c = !1,
|
56
56
|
autocomplete: k = "on",
|
57
57
|
immediate: P = !1
|
58
|
-
} = E,
|
58
|
+
} = E, b = String((n == null ? void 0 : n[G]) || ""), [d, m] = j(b), [N, h] = j(n), x = R(() => !C || n && (n.id || n.name) ? p : d.trim().toLowerCase() ? p.filter(
|
59
59
|
(o) => o.name.toLowerCase().includes(d.toLowerCase())
|
60
|
-
) :
|
61
|
-
o ? (
|
62
|
-
}, z =
|
60
|
+
) : p, [d, p, n, C]), T = (o) => {
|
61
|
+
o ? (m(o.name), h(o), s == null || s(o)) : (m(""), h(null), s == null || s({ id: "", name: "" }));
|
62
|
+
}, z = $(
|
63
63
|
(o) => {
|
64
64
|
if (c) return;
|
65
65
|
const t = o.target.value;
|
66
|
-
|
66
|
+
m(t), _ == null || _(t), !t && n && (s == null || s({ id: "", name: "" }));
|
67
67
|
},
|
68
|
-
[c, s,
|
68
|
+
[c, s, _, n]
|
69
69
|
), H = () => {
|
70
|
-
|
70
|
+
m(""), h(null), s == null || s({ id: "", name: "" });
|
71
71
|
};
|
72
|
-
return
|
72
|
+
return J(() => {
|
73
73
|
const o = !n || typeof n == "object" && !Object.keys(n).length;
|
74
|
-
|
75
|
-
}, [n,
|
74
|
+
m(o ? "" : b), h(o ? null : n);
|
75
|
+
}, [n, b]), /* @__PURE__ */ a(
|
76
76
|
Y,
|
77
77
|
{
|
78
78
|
as: "div",
|
79
|
-
value:
|
79
|
+
value: N,
|
80
80
|
className: l(e["select-search"], {
|
81
81
|
[e.full]: V,
|
82
82
|
[e.disabled]: r
|
@@ -86,28 +86,28 @@ import '../../assets/SelectSearch.css';const te = "_disabled_1f5f7_5", oe = "_co
|
|
86
86
|
disabled: r,
|
87
87
|
virtual: { options: x },
|
88
88
|
immediate: P,
|
89
|
-
children: ({ open: o }) => /* @__PURE__ */
|
90
|
-
/* @__PURE__ */
|
89
|
+
children: ({ open: o }) => /* @__PURE__ */ u(D, { children: [
|
90
|
+
/* @__PURE__ */ u(
|
91
91
|
"div",
|
92
92
|
{
|
93
93
|
className: l(e.container, e[i], {
|
94
94
|
[e["container-open"]]: o
|
95
95
|
}),
|
96
96
|
children: [
|
97
|
-
c && /* @__PURE__ */
|
98
|
-
/* @__PURE__ */ a(
|
99
|
-
|
97
|
+
c && /* @__PURE__ */ u("div", { style: { position: "relative", width: "100%" }, children: [
|
98
|
+
/* @__PURE__ */ a(B, { disabled: r, style: { width: "100%" }, children: /* @__PURE__ */ a(
|
99
|
+
M,
|
100
100
|
{
|
101
|
-
as:
|
102
|
-
label:
|
103
|
-
size:
|
101
|
+
as: O,
|
102
|
+
label: g,
|
103
|
+
size: q(i),
|
104
104
|
className: l(e["select-input"], {
|
105
|
-
[e["select-input-disabled"]]: c &&
|
105
|
+
[e["select-input-disabled"]]: c && f
|
106
106
|
}),
|
107
107
|
onChange: z,
|
108
108
|
value: d,
|
109
109
|
disabled: r,
|
110
|
-
variant:
|
110
|
+
variant: I,
|
111
111
|
rightSlotClassName: e["right-slot"],
|
112
112
|
requiredMarkClassName: e["required-mark"],
|
113
113
|
"data-testid": "select-search-input",
|
@@ -116,14 +116,14 @@ import '../../assets/SelectSearch.css';const te = "_disabled_1f5f7_5", oe = "_co
|
|
116
116
|
},
|
117
117
|
rightAddon: {
|
118
118
|
addonType: "icon",
|
119
|
-
addonContent:
|
119
|
+
addonContent: Q(o, i)
|
120
120
|
},
|
121
121
|
autocomplete: k,
|
122
|
-
...
|
122
|
+
...S
|
123
123
|
}
|
124
124
|
) }),
|
125
|
-
|
126
|
-
|
125
|
+
f && d && /* @__PURE__ */ a(
|
126
|
+
W,
|
127
127
|
{
|
128
128
|
tabIndex: -1,
|
129
129
|
className: l(e.clear, {
|
@@ -144,33 +144,33 @@ import '../../assets/SelectSearch.css';const te = "_disabled_1f5f7_5", oe = "_co
|
|
144
144
|
)
|
145
145
|
] }),
|
146
146
|
!c && /* @__PURE__ */ a(
|
147
|
-
|
147
|
+
M,
|
148
148
|
{
|
149
|
-
as:
|
150
|
-
label:
|
151
|
-
size:
|
149
|
+
as: O,
|
150
|
+
label: g,
|
151
|
+
size: q(i),
|
152
152
|
className: e["select-input"],
|
153
153
|
onChange: z,
|
154
154
|
value: d,
|
155
155
|
disabled: r,
|
156
|
-
variant:
|
157
|
-
withClearButton:
|
156
|
+
variant: I,
|
157
|
+
withClearButton: f,
|
158
158
|
rightSlotClassName: e["right-slot"],
|
159
159
|
requiredMarkClassName: e["required-mark"],
|
160
160
|
"data-testid": "select-search-input",
|
161
|
-
rightAddon:
|
161
|
+
rightAddon: w ? {
|
162
162
|
addonType: "react-node",
|
163
|
-
addonContent:
|
164
|
-
|
163
|
+
addonContent: w && /* @__PURE__ */ a(
|
164
|
+
B,
|
165
165
|
{
|
166
166
|
className: l(e.button, {
|
167
167
|
[e.disabled]: r
|
168
168
|
}),
|
169
169
|
disabled: r,
|
170
170
|
children: /* @__PURE__ */ a(
|
171
|
-
|
171
|
+
A,
|
172
172
|
{
|
173
|
-
iconName: i ==
|
173
|
+
iconName: i == v.M ? "DropdownArrowBottom16px" : "DropdownArrowDown24px",
|
174
174
|
className: l(e["selector-icon"], {
|
175
175
|
[e["selector-icon-open"]]: o
|
176
176
|
})
|
@@ -183,22 +183,22 @@ import '../../assets/SelectSearch.css';const te = "_disabled_1f5f7_5", oe = "_co
|
|
183
183
|
c && t.target.blur();
|
184
184
|
},
|
185
185
|
autocomplete: k,
|
186
|
-
...
|
186
|
+
...S
|
187
187
|
}
|
188
188
|
)
|
189
189
|
]
|
190
190
|
}
|
191
191
|
),
|
192
|
-
o && /* @__PURE__ */ a(D, { children:
|
192
|
+
o && /* @__PURE__ */ a(D, { children: p.length ? x.length ? /* @__PURE__ */ a(
|
193
193
|
Z,
|
194
194
|
{
|
195
195
|
"data-testid": "select-search-options",
|
196
196
|
className: l(
|
197
197
|
e.options,
|
198
198
|
e[i],
|
199
|
-
e[
|
199
|
+
e[y]
|
200
200
|
),
|
201
|
-
children: ({ option: t }) => /* @__PURE__ */
|
201
|
+
children: ({ option: t }) => /* @__PURE__ */ u(
|
202
202
|
ee,
|
203
203
|
{
|
204
204
|
value: t,
|
@@ -212,14 +212,14 @@ import '../../assets/SelectSearch.css';const te = "_disabled_1f5f7_5", oe = "_co
|
|
212
212
|
),
|
213
213
|
"data-testid": `select-search-option-${t.id}`,
|
214
214
|
children: [
|
215
|
-
/* @__PURE__ */
|
215
|
+
/* @__PURE__ */ u("div", { className: e["option-inner"], children: [
|
216
216
|
t.name,
|
217
217
|
t.bottom && /* @__PURE__ */ a("div", { children: t.bottom })
|
218
218
|
] }),
|
219
|
-
|
220
|
-
|
219
|
+
N && N.id === t.id && /* @__PURE__ */ a(
|
220
|
+
A,
|
221
221
|
{
|
222
|
-
iconName: i ===
|
222
|
+
iconName: i === v.M ? "Done16px" : "Done24px",
|
223
223
|
className: e["selected-icon"]
|
224
224
|
}
|
225
225
|
)
|
@@ -235,7 +235,7 @@ import '../../assets/SelectSearch.css';const te = "_disabled_1f5f7_5", oe = "_co
|
|
235
235
|
e.options,
|
236
236
|
e[i],
|
237
237
|
e["no-options"],
|
238
|
-
e[
|
238
|
+
e[y]
|
239
239
|
),
|
240
240
|
children: "Ничего не найдено"
|
241
241
|
}
|
@@ -246,7 +246,7 @@ import '../../assets/SelectSearch.css';const te = "_disabled_1f5f7_5", oe = "_co
|
|
246
246
|
e.options,
|
247
247
|
e[i],
|
248
248
|
e["no-options"],
|
249
|
-
e[
|
249
|
+
e[y]
|
250
250
|
),
|
251
251
|
children: "Нет данных"
|
252
252
|
}
|
@@ -257,5 +257,5 @@ import '../../assets/SelectSearch.css';const te = "_disabled_1f5f7_5", oe = "_co
|
|
257
257
|
}
|
258
258
|
);
|
259
259
|
export {
|
260
|
-
|
260
|
+
we as SelectSearch
|
261
261
|
};
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import { jsxs as L, jsx as N } from "react/jsx-runtime";
|
2
|
-
import { H as te } from "../../field-
|
3
|
-
import { K as I, w as re, z as se, U as ae, u as ce, a as le, b as oe, T as ie, I as ne, G as ue, j as he, p as me } from "../../label-
|
4
|
-
import { W as de, H as j, y as pe, p as fe, o as $, $ as be, b as we, D as _e, c as H } from "../../keyboard-
|
2
|
+
import { H as te } from "../../field-C1kt7aNM.js";
|
3
|
+
import { K as I, w as re, z as se, U as ae, u as ce, a as le, b as oe, T as ie, I as ne, G as ue, j as he, p as me } from "../../label-D4GFpe5F.js";
|
4
|
+
import { W as de, H as j, y as pe, p as fe, o as $, $ as be, b as we, D as _e, c as H } from "../../keyboard-mgWkd2Vh.js";
|
5
5
|
import u, { createContext as $e, useState as x, useMemo as G, useId as ge, useContext as ve, useRef as ke, useCallback as xe, Fragment as ye, forwardRef as Pe } from "react";
|
6
|
-
import { w as Ce } from "../../use-active-press-
|
6
|
+
import { w as Ce } from "../../use-active-press-CqLGIFz7.js";
|
7
7
|
import { e as De } from "../../use-resolve-button-type-DhFdPxnv.js";
|
8
8
|
import { r as Fe } from "../../bugs-diTMAGNw.js";
|
9
9
|
import { c as g } from "../../index-DIxK0V-G.js";
|
@@ -6,11 +6,11 @@ import { ETabTrailSize as Ae } from "./constants.js";
|
|
6
6
|
import { TabButtons as Se } from "./TabButtons/TabButtons.js";
|
7
7
|
import { ETabTrailButtonVariant as Fe } from "./TabButtons/constants.js";
|
8
8
|
import { NotificationBadge as De } from "../NotificationBadge/NotificationBadge.js";
|
9
|
-
import { n as W, M as se, W as V, s as j, y as q, o as A, H as z, $ as ce, b as Ne, D as de, a as G, u as Re, c as T, t as Me } from "../../keyboard-
|
10
|
-
import { w as Ce } from "../../use-active-press-
|
9
|
+
import { n as W, M as se, W as V, s as j, y as q, o as A, H as z, $ as ce, b as Ne, D as de, a as G, u as Re, c as T, t as Me } from "../../keyboard-mgWkd2Vh.js";
|
10
|
+
import { w as Ce } from "../../use-active-press-CqLGIFz7.js";
|
11
11
|
import { e as Le } from "../../use-resolve-button-type-DhFdPxnv.js";
|
12
|
-
import { T as pe, s as Oe } from "../../hidden-
|
13
|
-
import { _ as B, T as J, P as N, F as I } from "../../focus-management-
|
12
|
+
import { T as pe, s as Oe } from "../../hidden-PvGXrYUY.js";
|
13
|
+
import { _ as B, T as J, P as N, F as I } from "../../focus-management-DOYCPyGg.js";
|
14
14
|
import '../../assets/TabTrail.css';function Be() {
|
15
15
|
let e = U(!1);
|
16
16
|
return W(() => (e.current = !0, () => {
|