mimir-ui-kit 1.35.3 → 1.36.0
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/Accordion.css +1 -1
- 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 +180 -174
- 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.js +1 -1
- package/dist/index.js +1 -1
- 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,93 +0,0 @@
|
|
1
|
-
import h, { useState as y, useCallback as f, useRef as C, createContext as x, useContext as L } from "react";
|
2
|
-
import { p as O, n as T, d as E } from "./keyboard-B0lm_zyn.js";
|
3
|
-
function A(e) {
|
4
|
-
let n = { called: !1 };
|
5
|
-
return (...t) => {
|
6
|
-
if (!n.called) return n.called = !0, e(...t);
|
7
|
-
};
|
8
|
-
}
|
9
|
-
function D(e = 0) {
|
10
|
-
let [n, t] = y(e), a = f((r) => t(r), [n]), c = f((r) => t((i) => i | r), [n]), o = f((r) => (n & r) === r, [n]), d = f((r) => t((i) => i & ~r), [t]), u = f((r) => t((i) => i ^ r), [t]);
|
11
|
-
return { flags: n, setFlag: a, addFlag: c, hasFlag: o, removeFlag: d, toggleFlag: u };
|
12
|
-
}
|
13
|
-
var N = ((e) => (e[e.None = 0] = "None", e[e.Closed = 1] = "Closed", e[e.Enter = 2] = "Enter", e[e.Leave = 4] = "Leave", e))(N || {});
|
14
|
-
function k(e) {
|
15
|
-
let n = {};
|
16
|
-
for (let t in e) e[t] === !0 && (n[`data-${t}`] = "");
|
17
|
-
return n;
|
18
|
-
}
|
19
|
-
function B(e, n, t, a) {
|
20
|
-
let [c, o] = y(t), { hasFlag: d, addFlag: u, removeFlag: r } = D(e && c ? 3 : 0), i = C(!1), l = C(!1), s = O();
|
21
|
-
return T(function g() {
|
22
|
-
var p;
|
23
|
-
if (!e) return;
|
24
|
-
t && o(!0);
|
25
|
-
let v = n.current;
|
26
|
-
return v ? ((p = void 0) == null || p.call(a, t), R(v, { inFlight: i, prepare() {
|
27
|
-
l.current ? l.current = !1 : l.current = i.current, i.current = !0, !l.current && (t ? (u(3), r(4)) : (u(4), r(2)));
|
28
|
-
}, run() {
|
29
|
-
l.current ? t ? (r(3), u(4)) : (r(4), u(3)) : t ? r(1) : u(1);
|
30
|
-
}, done() {
|
31
|
-
var F;
|
32
|
-
l.current && typeof v.getAnimations == "function" && v.getAnimations().length > 0 || (i.current = !1, r(7), t || o(!1), (F = void 0) == null || F.call(a, t));
|
33
|
-
} })) : t ? (u(3), s.nextFrame(() => g())) : void 0;
|
34
|
-
}, [e, t, n, s]), e ? [c, { closed: d(1), enter: d(2), leave: d(4), transition: d(2) || d(4) }] : [t, { closed: void 0, enter: void 0, leave: void 0, transition: void 0 }];
|
35
|
-
}
|
36
|
-
function R(e, { prepare: n, run: t, done: a, inFlight: c }) {
|
37
|
-
let o = E();
|
38
|
-
return P(e, { prepare: n, inFlight: c }), o.nextFrame(() => {
|
39
|
-
o.add($(e, a)), t();
|
40
|
-
}), o.dispose;
|
41
|
-
}
|
42
|
-
function $(e, n) {
|
43
|
-
let t = A(n), a = E();
|
44
|
-
if (!e) return a.dispose;
|
45
|
-
let { transitionDuration: c, transitionDelay: o } = getComputedStyle(e), [d, u] = [c, o].map((i) => {
|
46
|
-
let [l = 0] = i.split(",").filter(Boolean).map((s) => s.includes("ms") ? parseFloat(s) : parseFloat(s) * 1e3).sort((s, g) => g - s);
|
47
|
-
return l;
|
48
|
-
}), r = d + u;
|
49
|
-
if (r !== 0) {
|
50
|
-
let i = a.group((l) => {
|
51
|
-
let s = l.setTimeout(() => {
|
52
|
-
t(), l.dispose();
|
53
|
-
}, r);
|
54
|
-
l.addEventListener(e, "transitionrun", (g) => {
|
55
|
-
g.target === g.currentTarget && (s(), l.addEventListener(e, "transitioncancel", (p) => {
|
56
|
-
p.target === p.currentTarget && (t(), i());
|
57
|
-
}));
|
58
|
-
});
|
59
|
-
});
|
60
|
-
a.addEventListener(e, "transitionend", (l) => {
|
61
|
-
l.target === l.currentTarget && (t(), a.dispose());
|
62
|
-
});
|
63
|
-
} else t();
|
64
|
-
return a.dispose;
|
65
|
-
}
|
66
|
-
function P(e, { inFlight: n, prepare: t }) {
|
67
|
-
if (n != null && n.current) {
|
68
|
-
t();
|
69
|
-
return;
|
70
|
-
}
|
71
|
-
let a = e.style.transition;
|
72
|
-
e.style.transition = "none", t(), e.offsetHeight, e.style.transition = a;
|
73
|
-
}
|
74
|
-
let m = x(null);
|
75
|
-
m.displayName = "OpenClosedContext";
|
76
|
-
var S = ((e) => (e[e.Open = 1] = "Open", e[e.Closed = 2] = "Closed", e[e.Closing = 4] = "Closing", e[e.Opening = 8] = "Opening", e))(S || {});
|
77
|
-
function H() {
|
78
|
-
return L(m);
|
79
|
-
}
|
80
|
-
function M({ value: e, children: n }) {
|
81
|
-
return h.createElement(m.Provider, { value: e }, n);
|
82
|
-
}
|
83
|
-
function V({ children: e }) {
|
84
|
-
return h.createElement(m.Provider, { value: null }, e);
|
85
|
-
}
|
86
|
-
export {
|
87
|
-
k as A,
|
88
|
-
B as V,
|
89
|
-
M as c,
|
90
|
-
S as i,
|
91
|
-
V as s,
|
92
|
-
H as u
|
93
|
-
};
|
@@ -1,19 +0,0 @@
|
|
1
|
-
import { useState as i } from "react";
|
2
|
-
import { n as u } from "./keyboard-B0lm_zyn.js";
|
3
|
-
function o(t) {
|
4
|
-
var n;
|
5
|
-
if (t.type) return t.type;
|
6
|
-
let r = (n = t.as) != null ? n : "button";
|
7
|
-
if (typeof r == "string" && r.toLowerCase() === "button") return "button";
|
8
|
-
}
|
9
|
-
function a(t, n) {
|
10
|
-
let [r, e] = i(() => o(t));
|
11
|
-
return u(() => {
|
12
|
-
e(o(t));
|
13
|
-
}, [t.type, t.as]), u(() => {
|
14
|
-
r || n.current && n.current instanceof HTMLButtonElement && !n.current.hasAttribute("type") && e("button");
|
15
|
-
}, [r, n]), r;
|
16
|
-
}
|
17
|
-
export {
|
18
|
-
a as T
|
19
|
-
};
|