mimir-ui-kit 1.35.4 → 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/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.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
@@ -0,0 +1,5 @@
|
|
1
|
+
import { ESelectSearchSize } from './constants';
|
2
|
+
import { EInputSize } from '../Input';
|
3
|
+
|
4
|
+
export declare const mapSizeToInputSize: (size: ESelectSearchSize) => EInputSize;
|
5
|
+
export declare const getDropdownArrowIcon: (isOpen: boolean, size: ESelectSearchSize) => "DropdownArrowBottom16px" | "DropdownArrowUp24px" | "DropdownArrowDown24px" | "DropdownArrowUp16px";
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import { ESelectSearchSize as r } from "./constants.js";
|
2
|
+
import "../../Input-DlGNMuUD.js";
|
3
|
+
import { EInputSize as t } from "../Input/constants.js";
|
4
|
+
const c = (o) => {
|
5
|
+
switch (o) {
|
6
|
+
case r.M:
|
7
|
+
return t.M;
|
8
|
+
case r.L:
|
9
|
+
return t.L;
|
10
|
+
default:
|
11
|
+
return t.M;
|
12
|
+
}
|
13
|
+
}, i = (o, p) => o ? p === r.L ? "DropdownArrowUp24px" : "DropdownArrowUp16px" : p === r.L ? "DropdownArrowDown24px" : "DropdownArrowBottom16px";
|
14
|
+
export {
|
15
|
+
i as getDropdownArrowIcon,
|
16
|
+
c as mapSizeToInputSize
|
17
|
+
};
|
@@ -1,56 +1,56 @@
|
|
1
|
-
import { jsxs as
|
2
|
-
import { H as
|
3
|
-
import { K as
|
4
|
-
import { W as
|
5
|
-
import u, { createContext as
|
6
|
-
import { w as
|
7
|
-
import {
|
8
|
-
import { r as
|
9
|
-
import { c as
|
10
|
-
import { ELabelPositions as
|
11
|
-
import '../../assets/Switcher.css';let
|
12
|
-
|
13
|
-
let
|
14
|
-
function
|
1
|
+
import { jsxs as L, jsx as N } from "react/jsx-runtime";
|
2
|
+
import { H as te } from "../../field-FJ34aSs4.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-y3ANLTNC.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-B0lm_zyn.js";
|
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-86hajhdd.js";
|
7
|
+
import { e as De } from "../../use-resolve-button-type-DhFdPxnv.js";
|
8
|
+
import { r as Fe } from "../../bugs-diTMAGNw.js";
|
9
|
+
import { c as g } from "../../index-DIxK0V-G.js";
|
10
|
+
import { ELabelPositions as Ee } from "./constants.js";
|
11
|
+
import '../../assets/Switcher.css';let y = $e(null);
|
12
|
+
y.displayName = "GroupContext";
|
13
|
+
let Se = ye;
|
14
|
+
function Te(s) {
|
15
15
|
var l;
|
16
|
-
let [e, n] =
|
16
|
+
let [e, n] = x(null), [h, m] = se(), [d, t] = ae(), a = G(() => ({ switch: e, setSwitch: n }), [e, n]), c = {}, p = s;
|
17
17
|
return u.createElement(t, { name: "Switch.Description", value: d }, u.createElement(m, { name: "Switch.Label", value: h, props: { htmlFor: (l = a.switch) == null ? void 0 : l.id, onClick(o) {
|
18
18
|
e && (o.currentTarget instanceof HTMLLabelElement && o.preventDefault(), e.click(), e.focus({ preventScroll: !0 }));
|
19
|
-
} } }, u.createElement(
|
19
|
+
} } }, u.createElement(y.Provider, { value: a }, j({ ourProps: c, theirProps: p, slot: {}, defaultTag: Se, name: "Switch.Group" }))));
|
20
20
|
}
|
21
|
-
let
|
22
|
-
function
|
21
|
+
let Le = "button";
|
22
|
+
function Ne(s, l) {
|
23
23
|
var e;
|
24
|
-
let n =
|
25
|
-
|
26
|
-
|
24
|
+
let n = ge(), h = ce(), m = le(), { id: d = h || `headlessui-switch-${n}`, disabled: t = m || !1, checked: a, defaultChecked: c, onChange: p, name: o, value: v, form: k, autoFocus: _ = !1, ...K } = s, P = ve(y), [R, M] = x(null), U = ke(null), O = pe(U, l, P === null ? null : P.setSwitch, M), f = oe(c), [b, w] = ie(a, p, f ?? !1), V = fe(), [C, D] = x(!1), F = $(() => {
|
25
|
+
D(!0), w == null || w(!b), V.nextFrame(() => {
|
26
|
+
D(!1);
|
27
27
|
});
|
28
|
-
}),
|
29
|
-
if (
|
30
|
-
r.preventDefault(),
|
31
|
-
}),
|
32
|
-
r.key ===
|
33
|
-
}),
|
28
|
+
}), W = $((r) => {
|
29
|
+
if (Fe(r.currentTarget)) return r.preventDefault();
|
30
|
+
r.preventDefault(), F();
|
31
|
+
}), q = $((r) => {
|
32
|
+
r.key === H.Space ? (r.preventDefault(), F()) : r.key === H.Enter && me(r.currentTarget);
|
33
|
+
}), z = $((r) => r.preventDefault()), A = ne(), B = ue(), { isFocusVisible: E, focusProps: J } = be({ autoFocus: _ }), { isHovered: S, hoverProps: Q } = we({ isDisabled: t }), { pressed: T, pressProps: X } = Ce({ disabled: t }), Y = G(() => ({ checked: b, disabled: t, hover: S, focus: E, active: T, autofocus: _, changing: C }), [b, S, E, T, t, C, _]), Z = _e({ id: d, ref: O, role: "switch", type: De(s, R), tabIndex: s.tabIndex === -1 ? 0 : (e = s.tabIndex) != null ? e : 0, "aria-checked": b, "aria-labelledby": A, "aria-describedby": B, disabled: t || void 0, autoFocus: _, onClick: W, onKeyUp: q, onKeyPress: z }, J, Q, X), ee = xe(() => {
|
34
34
|
if (f !== void 0) return w == null ? void 0 : w(f);
|
35
35
|
}, [w, f]);
|
36
|
-
return u.createElement(u.Fragment, null, o != null && u.createElement(
|
36
|
+
return u.createElement(u.Fragment, null, o != null && u.createElement(he, { disabled: t, data: { [o]: v || "on" }, overrides: { type: "checkbox", checked: b }, form: k, onReset: ee }), j({ ourProps: Z, theirProps: K, slot: Y, defaultTag: Le, name: "Switch" }));
|
37
37
|
}
|
38
|
-
let
|
39
|
-
const
|
38
|
+
let He = de(Ne), Ie = Te, je = I, Ge = re, Ke = Object.assign(He, { Group: Ie, Label: je, Description: Ge });
|
39
|
+
const Re = "_left_gu0m2_14", Me = "_right_gu0m2_17", Ue = "_label_gu0m2_21", Oe = "_switcher_gu0m2_2", i = {
|
40
40
|
"switcher-wrapper": "_switcher-wrapper_gu0m2_2",
|
41
|
-
left:
|
42
|
-
right:
|
43
|
-
label:
|
44
|
-
switcher:
|
41
|
+
left: Re,
|
42
|
+
right: Me,
|
43
|
+
label: Ue,
|
44
|
+
switcher: Oe,
|
45
45
|
"switcher-checked": "_switcher-checked_gu0m2_45",
|
46
46
|
"switcher-thumb": "_switcher-thumb_gu0m2_55",
|
47
47
|
"switcher-checked-thumb": "_switcher-checked-thumb_gu0m2_65"
|
48
|
-
},
|
48
|
+
}, Ze = Pe(
|
49
49
|
({
|
50
50
|
id: s,
|
51
51
|
label: l,
|
52
52
|
hasLabel: e = !1,
|
53
|
-
labelPosition: n =
|
53
|
+
labelPosition: n = Ee.LEFT,
|
54
54
|
className: h,
|
55
55
|
labelClassName: m,
|
56
56
|
switcherThumbClassName: d,
|
@@ -59,33 +59,33 @@ const Ge = "_left_gu0m2_14", Ke = "_right_gu0m2_17", Re = "_label_gu0m2_21", Me
|
|
59
59
|
checked: c,
|
60
60
|
...p
|
61
61
|
}, o) => {
|
62
|
-
const
|
63
|
-
return /* @__PURE__ */
|
64
|
-
|
62
|
+
const v = (k) => typeof a == "function" ? a({ ...k, checked: c }) : a;
|
63
|
+
return /* @__PURE__ */ L(
|
64
|
+
te,
|
65
65
|
{
|
66
|
-
className:
|
66
|
+
className: g(
|
67
67
|
i["switcher-wrapper"],
|
68
68
|
t,
|
69
69
|
i[n]
|
70
70
|
),
|
71
71
|
children: [
|
72
|
-
l && e && /* @__PURE__ */
|
73
|
-
/* @__PURE__ */
|
74
|
-
|
72
|
+
l && e && /* @__PURE__ */ N(I, { className: g(i.label, m), htmlFor: s, children: l }),
|
73
|
+
/* @__PURE__ */ L(
|
74
|
+
Ke,
|
75
75
|
{
|
76
76
|
...p,
|
77
77
|
id: s,
|
78
78
|
ref: o,
|
79
|
-
className:
|
79
|
+
className: g(i.switcher, h, {
|
80
80
|
[i["switcher-checked"]]: c
|
81
81
|
}),
|
82
82
|
children: [
|
83
|
-
|
84
|
-
/* @__PURE__ */
|
83
|
+
v({ checked: c }),
|
84
|
+
/* @__PURE__ */ N(
|
85
85
|
"span",
|
86
86
|
{
|
87
87
|
"aria-hidden": "true",
|
88
|
-
className:
|
88
|
+
className: g(
|
89
89
|
i["switcher-thumb"],
|
90
90
|
d,
|
91
91
|
{
|
@@ -103,5 +103,5 @@ const Ge = "_left_gu0m2_14", Ke = "_right_gu0m2_17", Re = "_label_gu0m2_21", Me
|
|
103
103
|
}
|
104
104
|
);
|
105
105
|
export {
|
106
|
-
|
106
|
+
Ze as Switcher
|
107
107
|
};
|