mimir-ui-kit 1.37.6 → 1.37.8
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 +21 -21
- package/dist/components/CheckboxMimir/CheckboxMimir.js +4 -4
- package/dist/components/MultiSelectSearch/MultiSelectSearch.js +22 -22
- package/dist/components/MultiSelectSearch/utils.js +5 -5
- 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/TabButtons/TabButtons.d.ts +2 -0
- package/dist/components/TabTrail/TabButtons/TabButtons.js +20 -16
- package/dist/components/TabTrail/TabTrail.d.ts +5 -0
- package/dist/components/TabTrail/TabTrail.js +156 -153
- 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 B, Fragment as K, jsx as b } from "react/jsx-runtime";
|
2
|
-
import { c as
|
2
|
+
import { c as $ } from "../../index-DIxK0V-G.js";
|
3
3
|
import v, { createContext as M, useRef as ne, 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 T, EAccordionSize as x, EAccordionLinkIconSize as J, EAccordionButtonStyle as _e, EAccordionIconType as Y, EAccordionButtonIconSize as Z } from "./constants.js";
|
@@ -7,10 +7,10 @@ import { useMediaQuery as Ee } from "../../hooks/useMediaQuery/useMediaQuery.js"
|
|
7
7
|
import { EMediaQuery as Se } from "../../hooks/useMediaQuery/constants.js";
|
8
8
|
import { Icon as ke } from "../../icons/Icon.js";
|
9
9
|
import { Link as Ie } from "../AnchorLink/Link.js";
|
10
|
-
import { M as ee, W as q, y as j, T as be, o as P, a as W, H as Q, I as ce, $ as ve, b as ye, D as te, u as
|
11
|
-
import { w as
|
12
|
-
import { e as
|
13
|
-
import { c as Pe, i as R, u as ge,
|
10
|
+
import { M as ee, W as q, y as j, T as be, o as P, a as W, H as Q, I as ce, $ as ve, b as ye, D as te, u as he, c as w } from "../../keyboard-mgWkd2Vh.js";
|
11
|
+
import { w as De } from "../../use-active-press-CqLGIFz7.js";
|
12
|
+
import { e as $e } from "../../use-resolve-button-type-DhFdPxnv.js";
|
13
|
+
import { c as Pe, i as R, u as ge, x as Te, R as we, s as Ne } from "../../open-closed-D2VjDhAN.js";
|
14
14
|
import { r as Ce } from "../../bugs-diTMAGNw.js";
|
15
15
|
import '../../assets/Accordion.css';let Ae = M(() => {
|
16
16
|
});
|
@@ -64,7 +64,7 @@ function Ke(e, t) {
|
|
64
64
|
s.current = c;
|
65
65
|
}, e.as === void 0 || e.as === re)), a = pe(Le, { disclosureState: u ? 0 : 1, buttonElement: null, panelElement: null, buttonId: null, panelId: null }), [{ disclosureState: o, buttonId: r }, E] = a, l = P((c) => {
|
66
66
|
E({ type: 1 });
|
67
|
-
let f =
|
67
|
+
let f = he(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();
|
@@ -106,19 +106,19 @@ function qe(e, t) {
|
|
106
106
|
}), _ = P((i) => {
|
107
107
|
var n;
|
108
108
|
Ce(i.currentTarget) || s || (l ? (r({ type: 0 }), (n = o.buttonElement) == null || n.focus()) : r({ type: 0 }));
|
109
|
-
}), { isFocusVisible:
|
109
|
+
}), { isFocusVisible: h, focusProps: D } = ve({ autoFocus: m }), { isHovered: N, hoverProps: C } = ye({ isDisabled: s }), { pressed: I, pressProps: g } = De({ disabled: s }), F = O(() => ({ open: o.disclosureState === 0, hover: N, active: I, disabled: s, focus: h, autofocus: m }), [o, N, I, h, s, m]), A = $e(e, o.buttonElement), L = l ? te({ ref: S, type: A, disabled: s || void 0, autoFocus: m, onKeyDown: c, onClick: _ }, D, C, g) : te({ ref: S, id: p, type: A, "aria-expanded": o.disclosureState === 0, "aria-controls": o.panelElement ? o.panelId : void 0, disabled: s || void 0, autoFocus: m, onKeyDown: c, onKeyUp: f, onClick: _ }, D, C, g);
|
110
110
|
return Q({ mergeRefs: k, 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, o] = z("Disclosure.Panel"), { close: r } = ie("Disclosure.Panel"), E = ce(), [l, y] = ae(null), S = j(t, P((
|
115
|
-
xe(() => o({ type: 5, element:
|
114
|
+
let u = le(), { id: p = `headlessui-disclosure-panel-${u}`, transition: s = !1, ...m } = e, [a, o] = z("Disclosure.Panel"), { close: r } = ie("Disclosure.Panel"), E = ce(), [l, y] = ae(null), S = j(t, P((D) => {
|
115
|
+
xe(() => o({ type: 5, element: D }));
|
116
116
|
}), y);
|
117
117
|
se(() => (o({ type: 3, panelId: p }), () => {
|
118
118
|
o({ type: 3, panelId: null });
|
119
119
|
}), [p, o]);
|
120
|
-
let k = ge(), [c, f] = Te(s, l, k !== null ? (k & R.Open) === R.Open : a.disclosureState === 0), _ = O(() => ({ open: a.disclosureState === 0, close: r }), [a.disclosureState, r]),
|
121
|
-
return v.createElement(Ne, null, v.createElement(G.Provider, { value: a.panelId }, Q({ mergeRefs: E, ourProps:
|
120
|
+
let k = ge(), [c, f] = Te(s, l, k !== null ? (k & R.Open) === R.Open : a.disclosureState === 0), _ = O(() => ({ open: a.disclosureState === 0, close: r }), [a.disclosureState, r]), h = { ref: S, id: p, ...we(f) };
|
121
|
+
return v.createElement(Ne, null, v.createElement(G.Provider, { value: a.panelId }, Q({ mergeRefs: E, ourProps: h, 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 = "_accordion_1k9to_2", Ge = "_header_1k9to_13", Je = "_disabled_1k9to_25", Ye = "_title_1k9to_29", Ze = "_icon_1k9to_36", et = "_circle_1k9to_46", tt = "_square_1k9to_53", ot = "_panel_1k9to_73", nt = "_open_1k9to_80", rt = "_m_1k9to_106", lt = "_s_1k9to_53", d = {
|
@@ -157,8 +157,8 @@ const Xe = "_accordion_1k9to_2", Ge = "_header_1k9to_13", Je = "_disabled_1k9to_
|
|
157
157
|
subtitleNode: c,
|
158
158
|
onlyOpenSubtitleNode: f,
|
159
159
|
classNameSubtitleContainer: _
|
160
|
-
},
|
161
|
-
const [
|
160
|
+
}, h) => {
|
161
|
+
const [D, N] = ae(!1), C = Ee(Se.XS1), I = u === T.LINK, g = {
|
162
162
|
[d["is-link"]]: I
|
163
163
|
}, F = () => {
|
164
164
|
t || N((n) => !n);
|
@@ -167,7 +167,7 @@ const Xe = "_accordion_1k9to_2", Ge = "_header_1k9to_13", Je = "_disabled_1k9to_
|
|
167
167
|
size: C ? "s" : "l",
|
168
168
|
rightIcon: {
|
169
169
|
iconName: A,
|
170
|
-
className:
|
170
|
+
className: $({
|
171
171
|
[d["link-open"]]: n
|
172
172
|
})
|
173
173
|
}
|
@@ -181,7 +181,7 @@ const Xe = "_accordion_1k9to_2", Ge = "_header_1k9to_13", Je = "_disabled_1k9to_
|
|
181
181
|
/* @__PURE__ */ b(
|
182
182
|
"span",
|
183
183
|
{
|
184
|
-
className:
|
184
|
+
className: $(
|
185
185
|
d.title,
|
186
186
|
l,
|
187
187
|
o && d["title-uppercase"]
|
@@ -192,7 +192,7 @@ const Xe = "_accordion_1k9to_2", Ge = "_header_1k9to_13", Je = "_disabled_1k9to_
|
|
192
192
|
/* @__PURE__ */ b(
|
193
193
|
"div",
|
194
194
|
{
|
195
|
-
className:
|
195
|
+
className: $(
|
196
196
|
d["icon-container"],
|
197
197
|
n && d.open,
|
198
198
|
t && d.disabled,
|
@@ -219,20 +219,20 @@ const Xe = "_accordion_1k9to_2", Ge = "_header_1k9to_13", Je = "_disabled_1k9to_
|
|
219
219
|
/* @__PURE__ */ b(
|
220
220
|
"div",
|
221
221
|
{
|
222
|
-
className:
|
222
|
+
className: $(
|
223
223
|
d.accordion,
|
224
224
|
d[a],
|
225
225
|
g,
|
226
226
|
S
|
227
227
|
),
|
228
|
-
children: /* @__PURE__ */ b(ze, { ref:
|
228
|
+
children: /* @__PURE__ */ b(ze, { ref: h, children: ({ open: n, close: H }) => /* @__PURE__ */ B(K, { children: [
|
229
229
|
(!n || s) && /* @__PURE__ */ b(
|
230
230
|
ue,
|
231
231
|
{
|
232
232
|
disabled: t,
|
233
233
|
as: I ? Ie : T.BUTTON,
|
234
234
|
onClick: F,
|
235
|
-
className:
|
235
|
+
className: $({
|
236
236
|
[d.header]: !I,
|
237
237
|
[d.disabled]: t,
|
238
238
|
[m ?? ""]: I && m
|
@@ -245,7 +245,7 @@ const Xe = "_accordion_1k9to_2", Ge = "_header_1k9to_13", Je = "_disabled_1k9to_
|
|
245
245
|
de,
|
246
246
|
{
|
247
247
|
"data-testid": "accordion-panel",
|
248
|
-
className:
|
248
|
+
className: $(
|
249
249
|
d.panel,
|
250
250
|
y,
|
251
251
|
g
|
@@ -261,7 +261,7 @@ const Xe = "_accordion_1k9to_2", Ge = "_header_1k9to_13", Je = "_disabled_1k9to_
|
|
261
261
|
),
|
262
262
|
(c || f) && /* @__PURE__ */ B("div", { className: _, children: [
|
263
263
|
c,
|
264
|
-
|
264
|
+
D && f
|
265
265
|
] })
|
266
266
|
] });
|
267
267
|
}
|
@@ -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,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,7 +1,7 @@
|
|
1
1
|
import { EMultiSelectSearchSize as t } from "./constants.js";
|
2
2
|
import "../../Input-BYrIS5GU.js";
|
3
3
|
import { EInputSize as e } from "../Input/constants.js";
|
4
|
-
const
|
4
|
+
const c = (r) => {
|
5
5
|
switch (r) {
|
6
6
|
case t.M:
|
7
7
|
return e.M;
|
@@ -10,10 +10,10 @@ const w = (r) => {
|
|
10
10
|
default:
|
11
11
|
return e.M;
|
12
12
|
}
|
13
|
-
},
|
13
|
+
}, u = (r, o) => r ? o === t.L ? "DropdownArrowUp24px" : "DropdownArrowUp16px" : o === t.L ? "DropdownArrowDown24px" : "DropdownArrowBottom16px", m = (r, o) => r && r.length > 0 ? r.map((n) => n[o]).join(", ") + (r.length > 1 ? ", " : "") : "", d = (r, o) => r.map((n) => n[o]).join(", ") + (r.length > 1 ? ", " : "");
|
14
14
|
export {
|
15
|
-
|
15
|
+
u as getDropdownArrowIcon,
|
16
16
|
m as getInitialInputValue,
|
17
|
-
|
18
|
-
|
17
|
+
d as joinSelectedItems,
|
18
|
+
c as mapSizeToInputSize
|
19
19
|
};
|
@@ -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,13 +1,13 @@
|
|
1
1
|
import { jsx as s, jsxs as _, Fragment as z } from "react/jsx-runtime";
|
2
2
|
import { c as i } from "../../index-DIxK0V-G.js";
|
3
|
-
import { forwardRef as K, useState as D, useMemo as U, useCallback as
|
3
|
+
import { forwardRef as K, useState as D, useMemo as U, useCallback as R, useEffect as $ } from "react";
|
4
4
|
import { ESelectSearchSize as v } from "./constants.js";
|
5
|
-
import { mapSizeToInputSize as
|
6
|
-
import { Icon as
|
7
|
-
import { Button as
|
8
|
-
import { I as
|
9
|
-
import { EInputVariant as
|
10
|
-
import { H as X, U as
|
5
|
+
import { mapSizeToInputSize as j, getDropdownArrowIcon as J } from "./utils.js";
|
6
|
+
import { Icon as q } from "../../icons/Icon.js";
|
7
|
+
import { Button as Q } from "../Button/Button.js";
|
8
|
+
import { I as A } from "../../Input-BYrIS5GU.js";
|
9
|
+
import { EInputVariant as W } from "../Input/constants.js";
|
10
|
+
import { H as X, U as O, G as B, K as Y, j as Z } from "../../combobox-BpYucpxz.js";
|
11
11
|
import '../../assets/SelectSearch.css';const ee = "_disabled_rphak_5", te = "_container_rphak_9", oe = "_full_rphak_22", ae = "_button_rphak_34", ne = "_options_rphak_48", se = "_top_rphak_59", re = "_bottom_rphak_64", ie = "_m_rphak_91", le = "_l_rphak_106", ce = "_option_rphak_48", pe = "_clear_rphak_160", e = {
|
12
12
|
"select-search": "_select-search_rphak_2",
|
13
13
|
disabled: ee,
|
@@ -34,7 +34,7 @@ import '../../assets/SelectSearch.css';const ee = "_disabled_rphak_5", te = "_co
|
|
34
34
|
clear: pe,
|
35
35
|
"icon-button": "_icon-button_rphak_169"
|
36
36
|
}, ge = K(
|
37
|
-
(
|
37
|
+
(M, E) => {
|
38
38
|
const {
|
39
39
|
placeholder: g,
|
40
40
|
size: r = v.L,
|
@@ -47,18 +47,18 @@ import '../../assets/SelectSearch.css';const ee = "_disabled_rphak_5", te = "_co
|
|
47
47
|
displayValue: G = "name",
|
48
48
|
filterOnSearch: w = !0,
|
49
49
|
onSearch: m,
|
50
|
-
variant: C =
|
50
|
+
variant: C = W.DefaultGray,
|
51
51
|
menuPlacement: b = "bottom",
|
52
52
|
disabled: l = !1,
|
53
53
|
searchProps: I,
|
54
54
|
withClearButton: f = !1,
|
55
55
|
disableInput: c = !1,
|
56
56
|
autocomplete: S = "on"
|
57
|
-
} =
|
57
|
+
} = M, k = String((a == null ? void 0 : a[G]) || ""), [p, u] = D(k), [N, h] = D(a), y = U(() => !w || a && (a.id || a.name) ? d : p.trim().toLowerCase() ? d.filter(
|
58
58
|
(o) => o.name.toLowerCase().includes(p.toLowerCase())
|
59
59
|
) : d, [p, d, a, w]), P = (o) => {
|
60
60
|
o ? (u(o.name), h(o), n == null || n(o)) : (u(""), h(null), n == null || n({ id: "", name: "" }));
|
61
|
-
}, x =
|
61
|
+
}, x = R(
|
62
62
|
(o) => {
|
63
63
|
if (c) return;
|
64
64
|
const t = o.target.value;
|
@@ -68,7 +68,7 @@ import '../../assets/SelectSearch.css';const ee = "_disabled_rphak_5", te = "_co
|
|
68
68
|
), T = () => {
|
69
69
|
u(""), h(null), n == null || n({ id: "", name: "" });
|
70
70
|
};
|
71
|
-
return
|
71
|
+
return $(() => {
|
72
72
|
const o = !a || typeof a == "object" && !Object.keys(a).length;
|
73
73
|
u(o ? "" : k), h(o ? null : a);
|
74
74
|
}, [a, k]), /* @__PURE__ */ s(
|
@@ -93,12 +93,12 @@ import '../../assets/SelectSearch.css';const ee = "_disabled_rphak_5", te = "_co
|
|
93
93
|
}),
|
94
94
|
children: [
|
95
95
|
c && /* @__PURE__ */ _("div", { style: { position: "relative", width: "100%" }, children: [
|
96
|
-
/* @__PURE__ */ s(
|
97
|
-
|
96
|
+
/* @__PURE__ */ s(O, { disabled: l, style: { width: "100%" }, children: /* @__PURE__ */ s(
|
97
|
+
B,
|
98
98
|
{
|
99
|
-
as:
|
99
|
+
as: A,
|
100
100
|
label: g,
|
101
|
-
size:
|
101
|
+
size: j(r),
|
102
102
|
className: i(e["select-input"], {
|
103
103
|
[e["select-input-disabled"]]: c && f
|
104
104
|
}),
|
@@ -114,14 +114,14 @@ import '../../assets/SelectSearch.css';const ee = "_disabled_rphak_5", te = "_co
|
|
114
114
|
},
|
115
115
|
rightAddon: {
|
116
116
|
addonType: "icon",
|
117
|
-
addonContent:
|
117
|
+
addonContent: J(o, r)
|
118
118
|
},
|
119
119
|
autocomplete: S,
|
120
120
|
...I
|
121
121
|
}
|
122
122
|
) }),
|
123
123
|
f && p && /* @__PURE__ */ s(
|
124
|
-
|
124
|
+
Q,
|
125
125
|
{
|
126
126
|
tabIndex: -1,
|
127
127
|
className: i(e.clear, {
|
@@ -142,11 +142,11 @@ import '../../assets/SelectSearch.css';const ee = "_disabled_rphak_5", te = "_co
|
|
142
142
|
)
|
143
143
|
] }),
|
144
144
|
!c && /* @__PURE__ */ s(
|
145
|
-
|
145
|
+
B,
|
146
146
|
{
|
147
|
-
as:
|
147
|
+
as: A,
|
148
148
|
label: g,
|
149
|
-
size:
|
149
|
+
size: j(r),
|
150
150
|
className: e["select-input"],
|
151
151
|
onChange: x,
|
152
152
|
value: p,
|
@@ -159,14 +159,14 @@ import '../../assets/SelectSearch.css';const ee = "_disabled_rphak_5", te = "_co
|
|
159
159
|
rightAddon: {
|
160
160
|
addonType: "react-node",
|
161
161
|
addonContent: V && /* @__PURE__ */ s(
|
162
|
-
|
162
|
+
O,
|
163
163
|
{
|
164
164
|
className: i(e.button, {
|
165
165
|
[e.disabled]: l
|
166
166
|
}),
|
167
167
|
disabled: l,
|
168
168
|
children: /* @__PURE__ */ s(
|
169
|
-
|
169
|
+
q,
|
170
170
|
{
|
171
171
|
iconName: r == v.M ? "DropdownArrowBottom16px" : "DropdownArrowDown24px",
|
172
172
|
className: i(e["selector-icon"], {
|
@@ -215,7 +215,7 @@ import '../../assets/SelectSearch.css';const ee = "_disabled_rphak_5", te = "_co
|
|
215
215
|
t.bottom && /* @__PURE__ */ s("div", { children: t.bottom })
|
216
216
|
] }),
|
217
217
|
N && N.id === t.id && /* @__PURE__ */ s(
|
218
|
-
|
218
|
+
q,
|
219
219
|
{
|
220
220
|
iconName: r === v.M ? "Done16px" : "Done24px",
|
221
221
|
className: e["selected-icon"]
|
@@ -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";
|
@@ -1,8 +1,10 @@
|
|
1
1
|
import { FC } from 'react';
|
2
|
+
import { ETabTrailButtonVariant } from './constants';
|
2
3
|
|
3
4
|
type TProps = {
|
4
5
|
handleNextTab: () => void;
|
5
6
|
handlePrevTab: () => void;
|
7
|
+
buttonsVariant?: ETabTrailButtonVariant | `${ETabTrailButtonVariant}`;
|
6
8
|
};
|
7
9
|
export declare const TabButtons: FC<TProps>;
|
8
10
|
export {};
|
@@ -1,29 +1,33 @@
|
|
1
|
-
import { jsx as
|
2
|
-
import { memo as
|
3
|
-
import { ETabTrailIconName as
|
4
|
-
import { MergedButton as
|
5
|
-
const
|
6
|
-
({
|
7
|
-
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
2
|
+
import { memo as c, useMemo as e } from "react";
|
3
|
+
import { ETabTrailIconName as m, ETabTrailButtonVariant as u } from "./constants.js";
|
4
|
+
import { MergedButton as a } from "../../MergedButton/MergedButton.js";
|
5
|
+
const I = c(
|
6
|
+
({
|
7
|
+
handleNextTab: t,
|
8
|
+
handlePrevTab: r,
|
9
|
+
buttonsVariant: o = u.WHITE
|
10
|
+
}) => {
|
11
|
+
const i = e(
|
8
12
|
() => [
|
9
13
|
{
|
10
14
|
isIconButton: !0,
|
11
|
-
iconName:
|
12
|
-
variant:
|
13
|
-
onClick:
|
15
|
+
iconName: m.LEFT,
|
16
|
+
variant: o,
|
17
|
+
onClick: r
|
14
18
|
},
|
15
19
|
{
|
16
20
|
isIconButton: !0,
|
17
|
-
iconName:
|
18
|
-
variant:
|
19
|
-
onClick:
|
21
|
+
iconName: m.RIGHT,
|
22
|
+
variant: o,
|
23
|
+
onClick: t
|
20
24
|
}
|
21
25
|
],
|
22
|
-
[t, o]
|
26
|
+
[r, t, o]
|
23
27
|
);
|
24
|
-
return /* @__PURE__ */
|
28
|
+
return /* @__PURE__ */ n(a, { buttons: i });
|
25
29
|
}
|
26
30
|
);
|
27
31
|
export {
|
28
|
-
|
32
|
+
I as TabButtons
|
29
33
|
};
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import { ETabTrailSize } from './constants';
|
2
|
+
import { ETabTrailButtonVariant } from './TabButtons/constants';
|
2
3
|
|
3
4
|
export type TCategoryTab = {
|
4
5
|
/**
|
@@ -39,5 +40,9 @@ export type TTabTrailProps = {
|
|
39
40
|
* Функция обратного вызова при изменении выбранного таба.
|
40
41
|
*/
|
41
42
|
onTabChange?: (index: number) => void;
|
43
|
+
/**
|
44
|
+
* Вариант кнопок навигации
|
45
|
+
*/
|
46
|
+
buttonsVariant?: ETabTrailButtonVariant | `${ETabTrailButtonVariant}`;
|
42
47
|
};
|
43
48
|
export declare const TabTrail: import('react').ForwardRefExoticComponent<TTabTrailProps & import('react').RefAttributes<HTMLElement>>;
|