mimir-ui-kit 1.35.4 → 1.36.1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/{Input-B-gKQ9FT.js → Input-DlGNMuUD.js} +67 -64
- package/dist/assets/Input.css +1 -1
- package/dist/assets/ListPhotos.css +1 -1
- package/dist/assets/MultiSelectSearch.css +1 -0
- package/dist/assets/SelectSearch.css +1 -1
- package/dist/combobox-CDU06zJj.js +2855 -0
- package/dist/components/Accordion/Accordion.js +168 -166
- package/dist/components/Button/Button.d.ts +36 -0
- package/dist/components/Button/Button.js +44 -43
- package/dist/components/CheckboxMimir/CheckboxMimir.d.ts +2 -0
- package/dist/components/CheckboxMimir/CheckboxMimir.js +37 -30
- package/dist/components/Chip/Chip.d.ts +5 -1
- package/dist/components/Chip/Chip.js +23 -22
- package/dist/components/DatePicker/DatePicker.js +1 -1
- package/dist/components/Input/Input.js +1 -1
- package/dist/components/Input/index.js +1 -1
- package/dist/components/InputPassword/InputPassword.js +1 -1
- package/dist/components/InputPhoneNumber/InputPhoneNumber.js +1 -1
- package/dist/components/ListPhotos/ListPhotos.js +4 -4
- package/dist/components/MultiSelectSearch/MultiSelectSearch.d.ts +22 -0
- package/dist/components/MultiSelectSearch/MultiSelectSearch.js +318 -0
- package/dist/components/MultiSelectSearch/constants.d.ts +4 -0
- package/dist/components/MultiSelectSearch/constants.js +4 -0
- package/dist/components/MultiSelectSearch/index.d.ts +3 -0
- package/dist/components/MultiSelectSearch/index.js +6 -0
- package/dist/components/MultiSelectSearch/types.d.ts +60 -0
- package/dist/components/MultiSelectSearch/utils.d.ts +8 -0
- package/dist/components/MultiSelectSearch/utils.js +19 -0
- package/dist/components/OtpInput/OtpInput.js +1 -1
- package/dist/components/SelectSearch/SelectSearch.js +172 -3017
- package/dist/components/SelectSearch/utils.d.ts +5 -0
- package/dist/components/SelectSearch/utils.js +17 -0
- package/dist/components/Switcher/Switcher.js +48 -48
- package/dist/components/TabTrail/TabTrail.js +171 -171
- package/dist/components/TextArea/TextArea.js +1 -1
- package/dist/components/index.d.ts +3 -0
- package/dist/components/index.js +48 -44
- package/dist/index.js +50 -46
- package/dist/open-closed-CdldUPoq.js +86 -0
- package/dist/use-resolve-button-type-DhFdPxnv.js +12 -0
- package/package.json +3 -2
- package/dist/open-closed-Cy6VDfYc.js +0 -93
- package/dist/use-resolve-button-type-BAxjHhds.js +0 -19
@@ -1,239 +1,239 @@
|
|
1
|
-
import { jsxs as
|
2
|
-
import { c as
|
3
|
-
import * as
|
4
|
-
import
|
5
|
-
import { ETabTrailSize as
|
6
|
-
import { TabButtons as
|
1
|
+
import { jsxs as Y, jsx as k } from "react/jsx-runtime";
|
2
|
+
import { c as ye } from "../../index-DIxK0V-G.js";
|
3
|
+
import * as R from "react";
|
4
|
+
import N, { useRef as U, useState as Q, createContext as oe, useReducer as ke, useMemo as A, useId as ue, useContext as ie, forwardRef as Ee, useEffect as le } from "react";
|
5
|
+
import { ETabTrailSize as Ae } from "./constants.js";
|
6
|
+
import { TabButtons as Se } from "./TabButtons/TabButtons.js";
|
7
7
|
import { NotificationBadge as Fe } from "../NotificationBadge/NotificationBadge.js";
|
8
|
-
import { n as
|
9
|
-
import { w as
|
10
|
-
import {
|
11
|
-
import { T as
|
12
|
-
import { _ as
|
13
|
-
import '../../assets/TabTrail.css';function
|
14
|
-
let e =
|
15
|
-
return
|
8
|
+
import { n as W, M as se, W as q, s as H, y as z, o as E, H as V, $ as ce, b as De, D as de, a as B, u as Ne, c as h, t as Re } from "../../keyboard-B0lm_zyn.js";
|
9
|
+
import { w as Me } from "../../use-active-press-86hajhdd.js";
|
10
|
+
import { e as Ce } from "../../use-resolve-button-type-DhFdPxnv.js";
|
11
|
+
import { T as pe, s as Le } from "../../hidden-DbgtYPOH.js";
|
12
|
+
import { _ as G, T as J, P as D, F as T } from "../../focus-management-XwV-9qkO.js";
|
13
|
+
import '../../assets/TabTrail.css';function Oe() {
|
14
|
+
let e = U(!1);
|
15
|
+
return W(() => (e.current = !0, () => {
|
16
16
|
e.current = !1;
|
17
17
|
}), []), e;
|
18
18
|
}
|
19
|
-
function
|
20
|
-
let [t, n] =
|
21
|
-
return t ?
|
22
|
-
|
23
|
-
let
|
24
|
-
function
|
19
|
+
function Ge({ onFocus: e }) {
|
20
|
+
let [t, n] = Q(!0), r = Oe();
|
21
|
+
return t ? N.createElement(pe, { as: "button", type: "button", features: Le.Focusable, onFocus: (l) => {
|
22
|
+
l.preventDefault();
|
23
|
+
let s, o = 50;
|
24
|
+
function u() {
|
25
25
|
if (o-- <= 0) {
|
26
|
-
|
26
|
+
s && cancelAnimationFrame(s);
|
27
27
|
return;
|
28
28
|
}
|
29
29
|
if (e()) {
|
30
|
-
if (cancelAnimationFrame(
|
30
|
+
if (cancelAnimationFrame(s), !r.current) return;
|
31
31
|
n(!1);
|
32
32
|
return;
|
33
33
|
}
|
34
|
-
|
34
|
+
s = requestAnimationFrame(u);
|
35
35
|
}
|
36
|
-
|
36
|
+
s = requestAnimationFrame(u);
|
37
37
|
} }) : null;
|
38
38
|
}
|
39
|
-
const fe =
|
40
|
-
function
|
39
|
+
const fe = R.createContext(null);
|
40
|
+
function Be() {
|
41
41
|
return { groups: /* @__PURE__ */ new Map(), get(e, t) {
|
42
42
|
var n;
|
43
43
|
let r = this.groups.get(e);
|
44
44
|
r || (r = /* @__PURE__ */ new Map(), this.groups.set(e, r));
|
45
|
-
let
|
46
|
-
r.set(t,
|
47
|
-
let
|
45
|
+
let l = (n = r.get(t)) != null ? n : 0;
|
46
|
+
r.set(t, l + 1);
|
47
|
+
let s = Array.from(r.keys()).indexOf(t);
|
48
48
|
function o() {
|
49
|
-
let
|
50
|
-
|
49
|
+
let u = r.get(t);
|
50
|
+
u > 1 ? r.set(t, u - 1) : r.delete(t);
|
51
51
|
}
|
52
|
-
return [
|
52
|
+
return [s, o];
|
53
53
|
} };
|
54
54
|
}
|
55
|
-
function
|
56
|
-
let t =
|
57
|
-
return
|
55
|
+
function Ue({ children: e }) {
|
56
|
+
let t = R.useRef(Be());
|
57
|
+
return R.createElement(fe.Provider, { value: t }, e);
|
58
58
|
}
|
59
|
-
function
|
60
|
-
let t =
|
59
|
+
function be(e) {
|
60
|
+
let t = R.useContext(fe);
|
61
61
|
if (!t) throw new Error("You must wrap your component in a <StableCollection>");
|
62
|
-
let n =
|
63
|
-
return
|
62
|
+
let n = R.useId(), [r, l] = t.current.get(e, n);
|
63
|
+
return R.useEffect(() => l, []), r;
|
64
64
|
}
|
65
|
-
var
|
66
|
-
let
|
65
|
+
var We = ((e) => (e[e.Forwards = 0] = "Forwards", e[e.Backwards = 1] = "Backwards", e))(We || {}), qe = ((e) => (e[e.Less = -1] = "Less", e[e.Equal = 0] = "Equal", e[e.Greater = 1] = "Greater", e))(qe || {}), ze = ((e) => (e[e.SetSelectedIndex = 0] = "SetSelectedIndex", e[e.RegisterTab = 1] = "RegisterTab", e[e.UnregisterTab = 2] = "UnregisterTab", e[e.RegisterPanel = 3] = "RegisterPanel", e[e.UnregisterPanel = 4] = "UnregisterPanel", e))(ze || {});
|
66
|
+
let Ve = { 0(e, t) {
|
67
67
|
var n;
|
68
|
-
let r =
|
69
|
-
var
|
70
|
-
return !((
|
71
|
-
}), o = { ...e, tabs: r, panels:
|
68
|
+
let r = G(e.tabs, (c) => c.current), l = G(e.panels, (c) => c.current), s = r.filter((c) => {
|
69
|
+
var m;
|
70
|
+
return !((m = c.current) != null && m.hasAttribute("disabled"));
|
71
|
+
}), o = { ...e, tabs: r, panels: l };
|
72
72
|
if (t.index < 0 || t.index > r.length - 1) {
|
73
|
-
let c =
|
74
|
-
if (
|
75
|
-
let
|
76
|
-
return { ...o, selectedIndex:
|
73
|
+
let c = B(Math.sign(t.index - e.selectedIndex), { [-1]: () => 1, 0: () => B(Math.sign(t.index), { [-1]: () => 0, 0: () => 0, 1: () => 1 }), 1: () => 0 });
|
74
|
+
if (s.length === 0) return o;
|
75
|
+
let m = B(c, { 0: () => r.indexOf(s[0]), 1: () => r.indexOf(s[s.length - 1]) });
|
76
|
+
return { ...o, selectedIndex: m === -1 ? e.selectedIndex : m };
|
77
77
|
}
|
78
|
-
let
|
79
|
-
if (!
|
80
|
-
let
|
81
|
-
return
|
78
|
+
let u = r.slice(0, t.index), x = [...r.slice(t.index), ...u].find((c) => s.includes(c));
|
79
|
+
if (!x) return o;
|
80
|
+
let f = (n = r.indexOf(x)) != null ? n : e.selectedIndex;
|
81
|
+
return f === -1 && (f = e.selectedIndex), { ...o, selectedIndex: f };
|
82
82
|
}, 1(e, t) {
|
83
83
|
if (e.tabs.includes(t.tab)) return e;
|
84
|
-
let n = e.tabs[e.selectedIndex], r =
|
85
|
-
return e.info.current.isControlled || (
|
84
|
+
let n = e.tabs[e.selectedIndex], r = G([...e.tabs, t.tab], (s) => s.current), l = e.selectedIndex;
|
85
|
+
return e.info.current.isControlled || (l = r.indexOf(n), l === -1 && (l = e.selectedIndex)), { ...e, tabs: r, selectedIndex: l };
|
86
86
|
}, 2(e, t) {
|
87
87
|
return { ...e, tabs: e.tabs.filter((n) => n !== t.tab) };
|
88
88
|
}, 3(e, t) {
|
89
|
-
return e.panels.includes(t.panel) ? e : { ...e, panels:
|
89
|
+
return e.panels.includes(t.panel) ? e : { ...e, panels: G([...e.panels, t.panel], (n) => n.current) };
|
90
90
|
}, 4(e, t) {
|
91
91
|
return { ...e, panels: e.panels.filter((n) => n !== t.panel) };
|
92
|
-
} },
|
93
|
-
|
94
|
-
function
|
95
|
-
let t = ie(
|
92
|
+
} }, X = oe(null);
|
93
|
+
X.displayName = "TabsDataContext";
|
94
|
+
function M(e) {
|
95
|
+
let t = ie(X);
|
96
96
|
if (t === null) {
|
97
97
|
let n = new Error(`<${e} /> is missing a parent <Tab.Group /> component.`);
|
98
|
-
throw Error.captureStackTrace && Error.captureStackTrace(n,
|
98
|
+
throw Error.captureStackTrace && Error.captureStackTrace(n, M), n;
|
99
99
|
}
|
100
100
|
return t;
|
101
101
|
}
|
102
|
-
let
|
103
|
-
|
104
|
-
function
|
105
|
-
let t = ie(
|
102
|
+
let Z = oe(null);
|
103
|
+
Z.displayName = "TabsActionsContext";
|
104
|
+
function ee(e) {
|
105
|
+
let t = ie(Z);
|
106
106
|
if (t === null) {
|
107
107
|
let n = new Error(`<${e} /> is missing a parent <Tab.Group /> component.`);
|
108
|
-
throw Error.captureStackTrace && Error.captureStackTrace(n,
|
108
|
+
throw Error.captureStackTrace && Error.captureStackTrace(n, ee), n;
|
109
109
|
}
|
110
110
|
return t;
|
111
111
|
}
|
112
|
-
function
|
113
|
-
return
|
112
|
+
function je(e, t) {
|
113
|
+
return B(t.type, Ve, e, t);
|
114
114
|
}
|
115
|
-
let
|
116
|
-
function
|
117
|
-
let { defaultIndex: n = 0, vertical: r = !1, manual:
|
118
|
-
const
|
119
|
-
let c = o !== null,
|
120
|
-
})),
|
121
|
-
|
122
|
-
}),
|
123
|
-
|
124
|
-
|
125
|
-
}, [o]),
|
126
|
-
if (
|
127
|
-
let
|
128
|
-
|
115
|
+
let He = "div";
|
116
|
+
function Je(e, t) {
|
117
|
+
let { defaultIndex: n = 0, vertical: r = !1, manual: l = !1, onChange: s, selectedIndex: o = null, ...u } = e;
|
118
|
+
const x = r ? "vertical" : "horizontal", f = l ? "manual" : "auto";
|
119
|
+
let c = o !== null, m = H({ isControlled: c }), _ = z(t), [a, i] = ke(je, { info: m, selectedIndex: o ?? n, tabs: [], panels: [] }), $ = A(() => ({ selectedIndex: a.selectedIndex }), [a.selectedIndex]), C = H(s || (() => {
|
120
|
+
})), w = H(a.tabs), b = A(() => ({ orientation: x, activation: f, ...a }), [x, f, a]), S = E((p) => (i({ type: 1, tab: p }), () => i({ type: 2, tab: p }))), L = E((p) => (i({ type: 3, panel: p }), () => i({ type: 4, panel: p }))), v = E((p) => {
|
121
|
+
g.current !== p && C.current(p), c || i({ type: 0, index: p });
|
122
|
+
}), g = H(c ? e.selectedIndex : a.selectedIndex), O = A(() => ({ registerTab: S, registerPanel: L, change: v }), []);
|
123
|
+
W(() => {
|
124
|
+
i({ type: 0, index: o ?? n });
|
125
|
+
}, [o]), W(() => {
|
126
|
+
if (g.current === void 0 || a.tabs.length <= 0) return;
|
127
|
+
let p = G(a.tabs, (y) => y.current);
|
128
|
+
p.some((y, F) => a.tabs[F] !== y) && v(p.indexOf(a.tabs[g.current]));
|
129
129
|
});
|
130
|
-
let
|
131
|
-
return
|
132
|
-
var
|
133
|
-
for (let
|
130
|
+
let K = { ref: _ };
|
131
|
+
return N.createElement(Ue, null, N.createElement(Z.Provider, { value: O }, N.createElement(X.Provider, { value: b }, b.tabs.length <= 0 && N.createElement(Ge, { onFocus: () => {
|
132
|
+
var p, y;
|
133
|
+
for (let F of w.current) if (((p = F.current) == null ? void 0 : p.tabIndex) === 0) return (y = F.current) == null || y.focus(), !0;
|
134
134
|
return !1;
|
135
|
-
} }),
|
135
|
+
} }), V({ ourProps: K, theirProps: u, slot: $, defaultTag: He, name: "Tabs" }))));
|
136
136
|
}
|
137
|
-
let
|
138
|
-
function
|
139
|
-
let { orientation: n, selectedIndex: r } =
|
140
|
-
return
|
137
|
+
let Ke = "div";
|
138
|
+
function Ye(e, t) {
|
139
|
+
let { orientation: n, selectedIndex: r } = M("Tab.List"), l = z(t), s = A(() => ({ selectedIndex: r }), [r]);
|
140
|
+
return V({ ourProps: { ref: l, role: "tablist", "aria-orientation": n }, theirProps: e, slot: s, defaultTag: Ke, name: "Tabs.List" });
|
141
141
|
}
|
142
|
-
let
|
143
|
-
function
|
142
|
+
let Qe = "button";
|
143
|
+
function Xe(e, t) {
|
144
144
|
var n, r;
|
145
|
-
let
|
146
|
-
|
147
|
-
let
|
148
|
-
v === -1 && (v =
|
149
|
-
let
|
150
|
-
var
|
151
|
-
let
|
152
|
-
if (
|
153
|
-
let
|
154
|
-
|
145
|
+
let l = ue(), { id: s = `headlessui-tabs-tab-${l}`, disabled: o = !1, autoFocus: u = !1, ...x } = e, { orientation: f, activation: c, selectedIndex: m, tabs: _, panels: a } = M("Tab"), i = ee("Tab"), $ = M("Tab"), [C, w] = Q(null), b = U(null), S = z(b, t, w);
|
146
|
+
W(() => i.registerTab(b), [i, b]);
|
147
|
+
let L = be("tabs"), v = _.indexOf(b);
|
148
|
+
v === -1 && (v = L);
|
149
|
+
let g = v === m, O = E((d) => {
|
150
|
+
var P;
|
151
|
+
let j = d();
|
152
|
+
if (j === J.Success && c === "auto") {
|
153
|
+
let $e = (P = Ne(b)) == null ? void 0 : P.activeElement, ae = $.tabs.findIndex((we) => we.current === $e);
|
154
|
+
ae !== -1 && i.change(ae);
|
155
155
|
}
|
156
|
-
return
|
157
|
-
}),
|
158
|
-
let
|
156
|
+
return j;
|
157
|
+
}), K = E((d) => {
|
158
|
+
let P = _.map((j) => j.current).filter(Boolean);
|
159
159
|
if (d.key === h.Space || d.key === h.Enter) {
|
160
|
-
d.preventDefault(), d.stopPropagation(),
|
160
|
+
d.preventDefault(), d.stopPropagation(), i.change(v);
|
161
161
|
return;
|
162
162
|
}
|
163
163
|
switch (d.key) {
|
164
164
|
case h.Home:
|
165
165
|
case h.PageUp:
|
166
|
-
return d.preventDefault(), d.stopPropagation(),
|
166
|
+
return d.preventDefault(), d.stopPropagation(), O(() => D(P, T.First));
|
167
167
|
case h.End:
|
168
168
|
case h.PageDown:
|
169
|
-
return d.preventDefault(), d.stopPropagation(),
|
169
|
+
return d.preventDefault(), d.stopPropagation(), O(() => D(P, T.Last));
|
170
170
|
}
|
171
|
-
if (
|
172
|
-
return d.key === h.ArrowUp ? D(
|
171
|
+
if (O(() => B(f, { vertical() {
|
172
|
+
return d.key === h.ArrowUp ? D(P, T.Previous | T.WrapAround) : d.key === h.ArrowDown ? D(P, T.Next | T.WrapAround) : J.Error;
|
173
173
|
}, horizontal() {
|
174
|
-
return d.key === h.ArrowLeft ? D(
|
174
|
+
return d.key === h.ArrowLeft ? D(P, T.Previous | T.WrapAround) : d.key === h.ArrowRight ? D(P, T.Next | T.WrapAround) : J.Error;
|
175
175
|
} })) === J.Success) return d.preventDefault();
|
176
|
-
}),
|
176
|
+
}), p = U(!1), y = E(() => {
|
177
177
|
var d;
|
178
|
-
|
179
|
-
|
178
|
+
p.current || (p.current = !0, (d = b.current) == null || d.focus({ preventScroll: !0 }), i.change(v), Re(() => {
|
179
|
+
p.current = !1;
|
180
180
|
}));
|
181
|
-
}),
|
181
|
+
}), F = E((d) => {
|
182
182
|
d.preventDefault();
|
183
|
-
}), { isFocusVisible:
|
184
|
-
return
|
183
|
+
}), { isFocusVisible: te, focusProps: he } = ce({ autoFocus: u }), { isHovered: re, hoverProps: Te } = De({ isDisabled: o }), { pressed: ne, pressProps: Ie } = Me({ disabled: o }), Pe = A(() => ({ selected: g, hover: re, active: ne, focus: te, autofocus: u, disabled: o }), [g, re, te, ne, u, o]), _e = de({ ref: S, onKeyDown: K, onMouseDown: F, onClick: y, id: s, role: "tab", type: Ce(e, C), "aria-controls": (r = (n = a[v]) == null ? void 0 : n.current) == null ? void 0 : r.id, "aria-selected": g, tabIndex: g ? 0 : -1, disabled: o || void 0, autoFocus: u }, he, Te, Ie);
|
184
|
+
return V({ ourProps: _e, theirProps: x, slot: Pe, defaultTag: Qe, name: "Tabs.Tab" });
|
185
185
|
}
|
186
|
-
let
|
187
|
-
function
|
188
|
-
let { selectedIndex: n } =
|
189
|
-
return
|
186
|
+
let Ze = "div";
|
187
|
+
function et(e, t) {
|
188
|
+
let { selectedIndex: n } = M("Tab.Panels"), r = z(t), l = A(() => ({ selectedIndex: n }), [n]);
|
189
|
+
return V({ ourProps: { ref: r }, theirProps: e, slot: l, defaultTag: Ze, name: "Tabs.Panels" });
|
190
190
|
}
|
191
|
-
let
|
192
|
-
function
|
193
|
-
var n, r,
|
194
|
-
let o =
|
195
|
-
|
196
|
-
let
|
197
|
-
|
198
|
-
let
|
199
|
-
return !
|
191
|
+
let tt = "div", rt = se.RenderStrategy | se.Static;
|
192
|
+
function nt(e, t) {
|
193
|
+
var n, r, l, s;
|
194
|
+
let o = ue(), { id: u = `headlessui-tabs-panel-${o}`, tabIndex: x = 0, ...f } = e, { selectedIndex: c, tabs: m, panels: _ } = M("Tab.Panel"), a = ee("Tab.Panel"), i = U(null), $ = z(i, t);
|
195
|
+
W(() => a.registerPanel(i), [a, i]);
|
196
|
+
let C = be("panels"), w = _.indexOf(i);
|
197
|
+
w === -1 && (w = C);
|
198
|
+
let b = w === c, { isFocusVisible: S, focusProps: L } = ce(), v = A(() => ({ selected: b, focus: S }), [b, S]), g = de({ ref: $, id: u, role: "tabpanel", "aria-labelledby": (r = (n = m[w]) == null ? void 0 : n.current) == null ? void 0 : r.id, tabIndex: b ? x : -1 }, L);
|
199
|
+
return !b && ((l = f.unmount) == null || l) && !((s = f.static) != null && s) ? N.createElement(pe, { "aria-hidden": "true", ...g }) : V({ ourProps: g, theirProps: f, slot: v, defaultTag: tt, features: rt, visible: b, name: "Tabs.Panel" });
|
200
200
|
}
|
201
|
-
let
|
202
|
-
const
|
203
|
-
container:
|
204
|
-
group:
|
201
|
+
let at = q(Xe), me = q(Je), xe = q(Ye), ve = q(et), ge = q(nt), lt = Object.assign(at, { Group: me, List: xe, Panels: ve, Panel: ge });
|
202
|
+
const st = "_container_rlke5_2", ot = "_group_rlke5_6", ut = "_tab_rlke5_16", it = "_list_rlke5_51", ct = "_tabs_rlke5_62", dt = "_buttons_rlke5_68", pt = "_m_rlke5_75", ft = "_s_rlke5_83", I = {
|
203
|
+
container: st,
|
204
|
+
group: ot,
|
205
205
|
"group-inner": "_group-inner_rlke5_9",
|
206
|
-
tab:
|
207
|
-
list:
|
208
|
-
tabs:
|
209
|
-
buttons:
|
210
|
-
m:
|
211
|
-
s:
|
212
|
-
},
|
206
|
+
tab: ut,
|
207
|
+
list: it,
|
208
|
+
tabs: ct,
|
209
|
+
buttons: dt,
|
210
|
+
m: pt,
|
211
|
+
s: ft
|
212
|
+
}, wt = Ee(
|
213
213
|
({
|
214
214
|
categories: e,
|
215
|
-
size: t =
|
215
|
+
size: t = Ae.M,
|
216
216
|
showButtons: n = !0,
|
217
217
|
className: r,
|
218
|
-
selectedTabIndex:
|
219
|
-
onTabChange:
|
218
|
+
selectedTabIndex: l,
|
219
|
+
onTabChange: s
|
220
220
|
}, o) => {
|
221
|
-
const [
|
222
|
-
|
223
|
-
|
224
|
-
}, [
|
221
|
+
const [u, x] = Q(l || 0), f = U(null);
|
222
|
+
le(() => {
|
223
|
+
l !== void 0 && l !== u && x(l);
|
224
|
+
}, [u, l]);
|
225
225
|
const c = (a) => {
|
226
|
-
|
227
|
-
},
|
228
|
-
const a = (
|
226
|
+
x(a), s == null || s(a);
|
227
|
+
}, m = () => {
|
228
|
+
const a = (u + 1) % e.length;
|
229
229
|
c(a);
|
230
230
|
}, _ = () => {
|
231
|
-
const a = (
|
231
|
+
const a = (u - 1 + e.length) % e.length;
|
232
232
|
c(a);
|
233
233
|
};
|
234
|
-
return
|
235
|
-
var
|
236
|
-
const a = (
|
234
|
+
return le(() => {
|
235
|
+
var i;
|
236
|
+
const a = (i = f.current) == null ? void 0 : i.querySelector(
|
237
237
|
`.${I.tab}[data-active="true"]`
|
238
238
|
);
|
239
239
|
a && typeof a.scrollIntoView == "function" && a.scrollIntoView({
|
@@ -241,41 +241,41 @@ const at = "_container_rlke5_2", st = "_group_rlke5_6", lt = "_tab_rlke5_16", ot
|
|
241
241
|
block: "nearest",
|
242
242
|
inline: "center"
|
243
243
|
});
|
244
|
-
}, [
|
245
|
-
|
244
|
+
}, [u]), /* @__PURE__ */ Y(
|
245
|
+
me,
|
246
246
|
{
|
247
247
|
ref: o,
|
248
|
-
className:
|
249
|
-
selectedIndex:
|
248
|
+
className: ye(I.group, I[t], r),
|
249
|
+
selectedIndex: u,
|
250
250
|
onChange: c,
|
251
251
|
children: [
|
252
|
-
/* @__PURE__ */
|
253
|
-
/* @__PURE__ */
|
254
|
-
|
252
|
+
/* @__PURE__ */ Y("div", { className: I["group-inner"], children: [
|
253
|
+
/* @__PURE__ */ k(xe, { ref: f, className: I.list, children: /* @__PURE__ */ k("div", { className: I.tabs, children: e.map(({ name: a, notificationCount: i }, $) => /* @__PURE__ */ Y(
|
254
|
+
lt,
|
255
255
|
{
|
256
|
-
className: `${I.tab} ${
|
257
|
-
"data-active":
|
256
|
+
className: `${I.tab} ${u === $ ? 'data-active="true"' : ""}`,
|
257
|
+
"data-active": u === $,
|
258
258
|
children: [
|
259
259
|
a,
|
260
|
-
|
260
|
+
i && /* @__PURE__ */ k(Fe, { count: i, size: "m" })
|
261
261
|
]
|
262
262
|
},
|
263
263
|
a
|
264
264
|
)) }) }),
|
265
|
-
n && /* @__PURE__ */
|
266
|
-
|
265
|
+
n && /* @__PURE__ */ k("div", { className: I.buttons, children: /* @__PURE__ */ k(
|
266
|
+
Se,
|
267
267
|
{
|
268
268
|
handlePrevTab: _,
|
269
|
-
handleNextTab:
|
269
|
+
handleNextTab: m
|
270
270
|
}
|
271
271
|
) })
|
272
272
|
] }),
|
273
|
-
/* @__PURE__ */
|
273
|
+
/* @__PURE__ */ k(ve, { className: I.panels, children: e.map(({ name: a, content: i }) => /* @__PURE__ */ k(ge, { className: I.panel, children: i }, a)) })
|
274
274
|
]
|
275
275
|
}
|
276
276
|
);
|
277
277
|
}
|
278
278
|
);
|
279
279
|
export {
|
280
|
-
|
280
|
+
wt as TabTrail
|
281
281
|
};
|
@@ -5,7 +5,7 @@ import { useAutoResizeTextArea as Y } from "./hooks.js";
|
|
5
5
|
import { useMergeRefs as Z } from "../../hooks/useMergeRefs/useMergeRefs.js";
|
6
6
|
import { Icon as $ } from "../../icons/Icon.js";
|
7
7
|
import { Button as ee } from "../Button/Button.js";
|
8
|
-
import { c as e } from "../../Input-
|
8
|
+
import { c as e } from "../../Input-DlGNMuUD.js";
|
9
9
|
import { EInputVariant as ae } from "../Input/constants.js";
|
10
10
|
import '../../assets/TextArea.css';const te = "_textarea_1n8kz_2", se = "_label_1n8kz_22", re = "_s_1n8kz_54", le = "_m_1n8kz_62", ne = "_l_1n8kz_22", a = {
|
11
11
|
"textarea-wrapper": "_textarea-wrapper_1n8kz_2",
|
@@ -58,3 +58,6 @@ export { TwinSwitcher } from './TwinSwitcher';
|
|
58
58
|
export { ESkeletonVariant, SkeletonBrick, SkeletonCircle, SkeletonText } from './Skeleton';
|
59
59
|
export { Avatar, EAvatarSize } from './Avatar';
|
60
60
|
export type { TAvatarProps, TAvatarSize } from './Avatar';
|
61
|
+
export { MultiSelectSearch } from './MultiSelectSearch';
|
62
|
+
export type { TMultiSelectSearchProps, TMultiSelectOption } from './MultiSelectSearch';
|
63
|
+
export { EMultiSelectSearchSize } from './MultiSelectSearch';
|