@konstructio/ui 0.1.2-alpha.37 → 0.1.2-alpha.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chevron-up-CRyLc5Ml.js +54 -0
- package/dist/components/Dropdown/components/Wrapper.js +71 -66
- package/dist/components/MultiSelectDropdown/MultiSelectDropdown.js +21 -0
- package/dist/components/MultiSelectDropdown/MultiSelectDropdown.variants.js +34 -0
- package/dist/components/MultiSelectDropdown/components/Item/Item.js +33 -0
- package/dist/components/MultiSelectDropdown/components/Item/Item.variants.js +38 -0
- package/dist/components/MultiSelectDropdown/components/List/List.js +29 -0
- package/dist/components/MultiSelectDropdown/components/List/List.variants.js +23 -0
- package/dist/components/MultiSelectDropdown/components/Wrapper/Wrapper.js +96 -0
- package/dist/components/MultiSelectDropdown/components/index.js +8 -0
- package/dist/components/MultiSelectDropdown/contexts/MultiSelectDropdown.context.js +19 -0
- package/dist/components/MultiSelectDropdown/contexts/MultiSelectDropdown.hook.js +13 -0
- package/dist/components/MultiSelectDropdown/contexts/MultiSelectDropdown.provider.js +119 -0
- package/dist/components/MultiSelectDropdown/contexts/index.js +6 -0
- package/dist/components/MultiSelectDropdown/hooks/useMultiSelectDropdown.js +32 -0
- package/dist/components/Tag/Tag.variants.js +1 -0
- package/dist/components/TagSelect/components/Wrapper/Wrapper.js +49 -98
- package/dist/components/index.js +84 -82
- package/dist/index.d.ts +35 -1
- package/dist/index.js +92 -90
- package/dist/package.json +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { jsx as P } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as V, useState as R, useEffect as b, useCallback as p } from "react";
|
|
3
|
+
import { MultiSelectDropdownContext as k } from "./MultiSelectDropdown.context.js";
|
|
4
|
+
import { useToggle as y } from "../../../hooks/useToggle.js";
|
|
5
|
+
const T = ({
|
|
6
|
+
children: x,
|
|
7
|
+
defaultOptions: o = [],
|
|
8
|
+
multiselect: c = !0,
|
|
9
|
+
value: a,
|
|
10
|
+
onChange: f,
|
|
11
|
+
onBlur: S,
|
|
12
|
+
name: I
|
|
13
|
+
}) => {
|
|
14
|
+
const m = V(null), [u, h] = y(!1), [g, O] = R(o), [i, v] = R([]), r = a !== void 0;
|
|
15
|
+
b(() => {
|
|
16
|
+
if (r) {
|
|
17
|
+
const t = a || [];
|
|
18
|
+
v(t);
|
|
19
|
+
const n = new Set(t.map((s) => s.id));
|
|
20
|
+
O(
|
|
21
|
+
c ? o.filter((s) => !n.has(s.id)) : o.map((s) => ({
|
|
22
|
+
...s,
|
|
23
|
+
isSelected: n.has(s.id)
|
|
24
|
+
}))
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
}, [a, r, o, c]);
|
|
28
|
+
const d = p(
|
|
29
|
+
(t) => {
|
|
30
|
+
const n = t.map(({ id: e, value: w, label: M }) => ({
|
|
31
|
+
id: e,
|
|
32
|
+
value: w ?? M
|
|
33
|
+
})), s = JSON.stringify(n);
|
|
34
|
+
m.current && (m.current.value = s), f && f({
|
|
35
|
+
target: {
|
|
36
|
+
value: t,
|
|
37
|
+
name: I ?? ""
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
},
|
|
41
|
+
[f, I]
|
|
42
|
+
), l = p(
|
|
43
|
+
(t) => {
|
|
44
|
+
const n = u;
|
|
45
|
+
h(t), n && t === !1 && S && S();
|
|
46
|
+
},
|
|
47
|
+
[u, h, S]
|
|
48
|
+
), j = p(
|
|
49
|
+
(t) => {
|
|
50
|
+
if (r) {
|
|
51
|
+
const e = [
|
|
52
|
+
...c ? i : [],
|
|
53
|
+
t
|
|
54
|
+
];
|
|
55
|
+
d(e), l(!1);
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
const n = [
|
|
59
|
+
...c ? i : [],
|
|
60
|
+
t
|
|
61
|
+
];
|
|
62
|
+
v(n);
|
|
63
|
+
const s = n.map((e) => e.id);
|
|
64
|
+
O(() => c ? o.filter(
|
|
65
|
+
(e) => !s.includes(e.id)
|
|
66
|
+
) : o.map((e) => ({
|
|
67
|
+
...e,
|
|
68
|
+
isSelected: s.includes(e.id)
|
|
69
|
+
}))), d(n), l(!1);
|
|
70
|
+
},
|
|
71
|
+
[
|
|
72
|
+
o,
|
|
73
|
+
d,
|
|
74
|
+
c,
|
|
75
|
+
i,
|
|
76
|
+
l,
|
|
77
|
+
r
|
|
78
|
+
]
|
|
79
|
+
), D = p(
|
|
80
|
+
(t) => {
|
|
81
|
+
if (r) {
|
|
82
|
+
const e = i.filter(
|
|
83
|
+
(w) => w.id !== t.id
|
|
84
|
+
);
|
|
85
|
+
d(e);
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
const n = i.filter(
|
|
89
|
+
(e) => e.id !== t.id
|
|
90
|
+
);
|
|
91
|
+
v(n);
|
|
92
|
+
const s = n.map((e) => e.id);
|
|
93
|
+
O(
|
|
94
|
+
() => o.filter(
|
|
95
|
+
(e) => !s.includes(e.id)
|
|
96
|
+
)
|
|
97
|
+
), d(n);
|
|
98
|
+
},
|
|
99
|
+
[o, d, i, r]
|
|
100
|
+
);
|
|
101
|
+
return /* @__PURE__ */ P(
|
|
102
|
+
k.Provider,
|
|
103
|
+
{
|
|
104
|
+
value: {
|
|
105
|
+
options: g,
|
|
106
|
+
selectedOptions: i,
|
|
107
|
+
isOpen: u,
|
|
108
|
+
inputRef: m,
|
|
109
|
+
onSelectOption: j,
|
|
110
|
+
onRemoveOption: D,
|
|
111
|
+
onOpen: l
|
|
112
|
+
},
|
|
113
|
+
children: x
|
|
114
|
+
}
|
|
115
|
+
);
|
|
116
|
+
};
|
|
117
|
+
export {
|
|
118
|
+
T as MultiSelectDropdownProvider
|
|
119
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { useRef as l, useEffect as c, useCallback as u } from "react";
|
|
2
|
+
import { useMultiSelectDropdown as i } from "../contexts/MultiSelectDropdown.hook.js";
|
|
3
|
+
const f = () => {
|
|
4
|
+
const n = l(null), { onOpen: e } = i();
|
|
5
|
+
c(() => {
|
|
6
|
+
const t = new AbortController(), a = (o) => {
|
|
7
|
+
o.key === "Escape" && e(!1);
|
|
8
|
+
}, r = (o) => {
|
|
9
|
+
n.current?.contains(o.target) || e(!1);
|
|
10
|
+
};
|
|
11
|
+
return document.addEventListener("keydown", a, {
|
|
12
|
+
signal: t.signal
|
|
13
|
+
}), document.addEventListener("mousedown", r, {
|
|
14
|
+
signal: t.signal
|
|
15
|
+
}), () => {
|
|
16
|
+
t.abort();
|
|
17
|
+
};
|
|
18
|
+
}, [e, n]);
|
|
19
|
+
const s = u(
|
|
20
|
+
(t) => {
|
|
21
|
+
t.target?.closest("[data-value]") || e(!0);
|
|
22
|
+
},
|
|
23
|
+
[e]
|
|
24
|
+
);
|
|
25
|
+
return {
|
|
26
|
+
wrapperRef: n,
|
|
27
|
+
handleOpen: s
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
export {
|
|
31
|
+
f as useMultiSelectDropdown
|
|
32
|
+
};
|
|
@@ -15,6 +15,7 @@ const f = e(
|
|
|
15
15
|
variants: {
|
|
16
16
|
color: {
|
|
17
17
|
gray: ["bg-[#f4f4f5]", "text-[#71717a]"],
|
|
18
|
+
"gray-800": ["bg-gray-100", "text-gray-800"],
|
|
18
19
|
cyan: ["bg-[#ecfeff]", "text-[#0e7490]"],
|
|
19
20
|
gold: ["bg-[#fef9c3]", "text-[#a16207]"],
|
|
20
21
|
green: ["bg-[#dcfce7]", "text-[#15803d]"],
|
|
@@ -1,135 +1,86 @@
|
|
|
1
1
|
import "../Item/Item.js";
|
|
2
|
-
import { List as
|
|
3
|
-
import { jsxs as
|
|
4
|
-
import
|
|
5
|
-
import { Tag as
|
|
6
|
-
import { cn as
|
|
7
|
-
import { useTagSelect as
|
|
8
|
-
import { labelVariants as
|
|
9
|
-
import { X as
|
|
10
|
-
import {
|
|
11
|
-
import { useTagSelect as
|
|
12
|
-
|
|
13
|
-
return u = Object.assign || function(e) {
|
|
14
|
-
for (var o = 1; o < arguments.length; o++) {
|
|
15
|
-
var t = arguments[o];
|
|
16
|
-
for (var r in t)
|
|
17
|
-
Object.prototype.hasOwnProperty.call(t, r) && (e[r] = t[r]);
|
|
18
|
-
}
|
|
19
|
-
return e;
|
|
20
|
-
}, u.apply(this, arguments);
|
|
21
|
-
}
|
|
22
|
-
function L(e, o) {
|
|
23
|
-
if (e == null) return {};
|
|
24
|
-
var t = W(e, o), r, n;
|
|
25
|
-
if (Object.getOwnPropertySymbols) {
|
|
26
|
-
var a = Object.getOwnPropertySymbols(e);
|
|
27
|
-
for (n = 0; n < a.length; n++)
|
|
28
|
-
r = a[n], !(o.indexOf(r) >= 0) && Object.prototype.propertyIsEnumerable.call(e, r) && (t[r] = e[r]);
|
|
29
|
-
}
|
|
30
|
-
return t;
|
|
31
|
-
}
|
|
32
|
-
function W(e, o) {
|
|
33
|
-
if (e == null) return {};
|
|
34
|
-
var t = {}, r = Object.keys(e), n, a;
|
|
35
|
-
for (a = 0; a < r.length; a++)
|
|
36
|
-
n = r[a], !(o.indexOf(n) >= 0) && (t[n] = e[n]);
|
|
37
|
-
return t;
|
|
38
|
-
}
|
|
39
|
-
var d = w(function(e, o) {
|
|
40
|
-
var t = e.color, r = t === void 0 ? "currentColor" : t, n = e.size, a = n === void 0 ? 24 : n, c = L(e, ["color", "size"]);
|
|
41
|
-
return /* @__PURE__ */ b.createElement("svg", u({
|
|
42
|
-
ref: o,
|
|
43
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
44
|
-
width: a,
|
|
45
|
-
height: a,
|
|
46
|
-
viewBox: "0 0 24 24",
|
|
47
|
-
fill: "none",
|
|
48
|
-
stroke: r,
|
|
49
|
-
strokeWidth: "2",
|
|
50
|
-
strokeLinecap: "round",
|
|
51
|
-
strokeLinejoin: "round"
|
|
52
|
-
}, c), /* @__PURE__ */ b.createElement("polyline", {
|
|
53
|
-
points: "18 15 12 9 6 15"
|
|
54
|
-
}));
|
|
55
|
-
});
|
|
56
|
-
d.propTypes = {
|
|
57
|
-
color: p.string,
|
|
58
|
-
size: p.oneOfType([p.string, p.number])
|
|
59
|
-
};
|
|
60
|
-
d.displayName = "ChevronUp";
|
|
61
|
-
const G = w(
|
|
2
|
+
import { List as g } from "../List/List.js";
|
|
3
|
+
import { jsxs as m, jsx as e } from "react/jsx-runtime";
|
|
4
|
+
import { forwardRef as w, useId as T, useImperativeHandle as b } from "react";
|
|
5
|
+
import { Tag as C } from "../../../Tag/Tag.js";
|
|
6
|
+
import { cn as r } from "../../../../utils/index.js";
|
|
7
|
+
import { useTagSelect as S } from "../../hooks/useTagSelect.js";
|
|
8
|
+
import { labelVariants as k, tagSelectVariants as R, wrapperVariants as I } from "../../TagSelect.variants.js";
|
|
9
|
+
import { X as O } from "../../../../x-DPU9OdYH.js";
|
|
10
|
+
import { C as V } from "../../../../chevron-up-CRyLc5Ml.js";
|
|
11
|
+
import { useTagSelect as j } from "../../contexts/TagSelect.hook.js";
|
|
12
|
+
const B = w(
|
|
62
13
|
({
|
|
63
|
-
label:
|
|
64
|
-
labelClassName:
|
|
14
|
+
label: o,
|
|
15
|
+
labelClassName: c,
|
|
65
16
|
name: t,
|
|
66
|
-
placeholder:
|
|
67
|
-
theme:
|
|
68
|
-
wrapperClassName:
|
|
69
|
-
},
|
|
70
|
-
const
|
|
71
|
-
return
|
|
17
|
+
placeholder: p = "Select a value...",
|
|
18
|
+
theme: d,
|
|
19
|
+
wrapperClassName: f
|
|
20
|
+
}, h) => {
|
|
21
|
+
const i = T(), { selectedTags: n, isOpen: s, onOpen: u, onRemoveTag: x, inputRef: l } = j(), { wrapperRef: N, handleOpen: v } = S();
|
|
22
|
+
return b(h, () => l.current, [l]), /* @__PURE__ */ m(
|
|
72
23
|
"div",
|
|
73
24
|
{
|
|
74
|
-
ref:
|
|
75
|
-
className:
|
|
76
|
-
|
|
77
|
-
className:
|
|
25
|
+
ref: N,
|
|
26
|
+
className: r(
|
|
27
|
+
I({
|
|
28
|
+
className: f
|
|
78
29
|
})
|
|
79
30
|
),
|
|
80
|
-
"data-theme":
|
|
31
|
+
"data-theme": d,
|
|
81
32
|
children: [
|
|
82
|
-
|
|
33
|
+
o ? /* @__PURE__ */ e(
|
|
83
34
|
"label",
|
|
84
35
|
{
|
|
85
|
-
htmlFor: t ??
|
|
86
|
-
className:
|
|
87
|
-
|
|
88
|
-
className:
|
|
36
|
+
htmlFor: t ?? i,
|
|
37
|
+
className: r(
|
|
38
|
+
k({
|
|
39
|
+
className: c
|
|
89
40
|
})
|
|
90
41
|
),
|
|
91
|
-
onClick: () =>
|
|
92
|
-
children:
|
|
42
|
+
onClick: () => u(!0),
|
|
43
|
+
children: o
|
|
93
44
|
}
|
|
94
45
|
) : null,
|
|
95
|
-
/* @__PURE__ */
|
|
46
|
+
/* @__PURE__ */ m(
|
|
96
47
|
"div",
|
|
97
48
|
{
|
|
98
|
-
id: t ??
|
|
99
|
-
className:
|
|
49
|
+
id: t ?? i,
|
|
50
|
+
className: r(R()),
|
|
100
51
|
role: "combobox",
|
|
101
|
-
onClick:
|
|
102
|
-
"aria-expanded":
|
|
52
|
+
onClick: v,
|
|
53
|
+
"aria-expanded": s,
|
|
103
54
|
children: [
|
|
104
|
-
|
|
105
|
-
|
|
55
|
+
n.length === 0 ? /* @__PURE__ */ e("span", { className: "text-base text-inherit select-none", children: p }) : /* @__PURE__ */ e("div", { className: "flex flex-wrap gap-1.5", children: n.map((a) => /* @__PURE__ */ e(
|
|
56
|
+
C,
|
|
106
57
|
{
|
|
107
|
-
...
|
|
58
|
+
...a,
|
|
108
59
|
className: "select-none",
|
|
109
|
-
rightIcon: /* @__PURE__ */
|
|
110
|
-
"data-value":
|
|
60
|
+
rightIcon: /* @__PURE__ */ e(O, { className: "w-3 h-3", onClick: () => x(a) }),
|
|
61
|
+
"data-value": a.label
|
|
111
62
|
},
|
|
112
|
-
|
|
63
|
+
a.id
|
|
113
64
|
)) }),
|
|
114
|
-
/* @__PURE__ */
|
|
115
|
-
|
|
65
|
+
/* @__PURE__ */ e(
|
|
66
|
+
V,
|
|
116
67
|
{
|
|
117
|
-
className:
|
|
68
|
+
className: r(
|
|
118
69
|
"w-4 h-4 text-inherit transition-all duration-50 shrink-0",
|
|
119
|
-
|
|
70
|
+
s ? "rotate-0" : "rotate-180"
|
|
120
71
|
)
|
|
121
72
|
}
|
|
122
73
|
)
|
|
123
74
|
]
|
|
124
75
|
}
|
|
125
76
|
),
|
|
126
|
-
/* @__PURE__ */
|
|
127
|
-
|
|
77
|
+
/* @__PURE__ */ e("input", { ref: l, type: "text", name: t, className: "hidden" }),
|
|
78
|
+
s ? /* @__PURE__ */ e(g, {}) : null
|
|
128
79
|
]
|
|
129
80
|
}
|
|
130
81
|
);
|
|
131
82
|
}
|
|
132
83
|
);
|
|
133
84
|
export {
|
|
134
|
-
|
|
85
|
+
B as Wrapper
|
|
135
86
|
};
|
package/dist/components/index.js
CHANGED
|
@@ -3,100 +3,102 @@ import { AlertDialog as p } from "./AlertDialog/AlertDialog.js";
|
|
|
3
3
|
import { Autocomplete as x } from "./Autocomplete/Autocomplete.js";
|
|
4
4
|
import { Badge as a } from "./Badge/Badge.js";
|
|
5
5
|
import { Breadcrumb as d } from "./Breadcrumb/Breadcrumb.js";
|
|
6
|
-
import { Button as
|
|
6
|
+
import { Button as l } from "./Button/Button.js";
|
|
7
7
|
import { Card as u } from "./Card/Card.js";
|
|
8
8
|
import { Checkbox as c } from "./Checkbox/Checkbox.js";
|
|
9
9
|
import { DatePicker as D } from "./Datepicker/DatePicker.js";
|
|
10
|
-
import { Divider as
|
|
11
|
-
import { Dropdown as
|
|
10
|
+
import { Divider as s } from "./Divider/Divider.js";
|
|
11
|
+
import { Dropdown as C } from "./Dropdown/Dropdown.js";
|
|
12
12
|
import { DropdownButton as h } from "./DropdownButton/DropdownButton.js";
|
|
13
|
-
import { Filter as
|
|
14
|
-
import { Input as
|
|
15
|
-
import { Loading as
|
|
16
|
-
import { M as
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
13
|
+
import { Filter as w } from "./Filter/Filter.js";
|
|
14
|
+
import { Input as R } from "./Input/Input.js";
|
|
15
|
+
import { Loading as M } from "./Loading/Loading.js";
|
|
16
|
+
import { M as F } from "../Modal-CtAG97Ts.js";
|
|
17
|
+
import { MultiSelectDropdown as I } from "./MultiSelectDropdown/MultiSelectDropdown.js";
|
|
18
|
+
import { NumberInput as y } from "./NumberInput/NumberInput.js";
|
|
19
|
+
import { PhoneNumberInput as O } from "./PhoneNumberInput/PhoneNumberInput.js";
|
|
20
|
+
import { PieChart as j } from "./PieChart/PieChart.js";
|
|
21
|
+
import { ProgressBar as E } from "./ProgressBar/ProgressBar.js";
|
|
22
|
+
import { Radio as J } from "./Radio/Radio.js";
|
|
23
|
+
import { RadioCard as Q } from "./RadioCard/RadioCard.js";
|
|
24
|
+
import { RadioCardGroup as W } from "./RadioCardGroup/RadioCardGroup.js";
|
|
25
|
+
import { RadioGroup as Y } from "./RadioGroup/RadioGroup.js";
|
|
26
|
+
import { Range as _ } from "./Range/Range.js";
|
|
27
|
+
import { Sidebar as oo } from "./Sidebar/Sidebar.js";
|
|
28
|
+
import { Slider as eo } from "./Slider/Slider.js";
|
|
29
|
+
import { Switch as po } from "./Switch/Switch.js";
|
|
30
|
+
import { Table as xo } from "./Table/Table.js";
|
|
31
|
+
import { Tabs as ao } from "./Tabs/Tabs.js";
|
|
32
|
+
import { Tag as no } from "./Tag/Tag.js";
|
|
33
|
+
import { TagSelect as go } from "./TagSelect/TagSelect.js";
|
|
34
|
+
import { TextArea as To } from "./TextArea/TextArea.js";
|
|
35
|
+
import { TimePicker as bo } from "./TimePicker/TimePicker.js";
|
|
36
|
+
import { Toast as So } from "./Toast/Toast.js";
|
|
37
|
+
import { Tooltip as Bo } from "./Tooltip/Tooltip.js";
|
|
38
|
+
import { Typography as No } from "./Typography/Typography.js";
|
|
39
|
+
import { VirtualizedTable as vo } from "./VirtualizedTable/VirtualizedTable.js";
|
|
40
|
+
import { BadgeMultiSelect as Po } from "./Filter/components/BadgeDropdown/BadgeMultiSelect.js";
|
|
41
|
+
import { DateFilterDropdown as Ao } from "./Filter/components/DateFilterDropdown/DateFilterDropdown.js";
|
|
42
|
+
import { Footer as ko } from "./Sidebar/components/Footer/Footer.js";
|
|
43
|
+
import { Logo as Go } from "./Sidebar/components/Logo/Logo.js";
|
|
44
|
+
import { Navigation as Lo } from "./Sidebar/components/Navigation/Navigation.js";
|
|
45
|
+
import { NavigationGroup as zo } from "./Sidebar/components/NavigationGroup/NavigationGroup.js";
|
|
46
|
+
import { NavigationOption as Vo } from "./Sidebar/components/NavigationOption/NavigationOption.js";
|
|
47
|
+
import { NavigationSeparator as qo } from "./Sidebar/components/NavigationSeparator/NavigationSeparator.js";
|
|
48
|
+
import { Content as Ho } from "./Tabs/components/Content.js";
|
|
49
|
+
import { List as Ko } from "./Tabs/components/List.js";
|
|
50
|
+
import { Trigger as Uo } from "./Tabs/components/Trigger.js";
|
|
51
|
+
import { TruncateText as Xo } from "./VirtualizedTable/components/TruncateText/TruncateText.js";
|
|
51
52
|
export {
|
|
52
53
|
e as Alert,
|
|
53
54
|
p as AlertDialog,
|
|
54
55
|
x as Autocomplete,
|
|
55
56
|
a as Badge,
|
|
56
|
-
|
|
57
|
+
Po as BadgeMultiSelect,
|
|
57
58
|
d as Breadcrumb,
|
|
58
|
-
|
|
59
|
+
l as Button,
|
|
59
60
|
u as Card,
|
|
60
61
|
c as Checkbox,
|
|
61
|
-
|
|
62
|
-
|
|
62
|
+
Ho as Content,
|
|
63
|
+
Ao as DateFilterDropdown,
|
|
63
64
|
D as DatePicker,
|
|
64
|
-
|
|
65
|
-
|
|
65
|
+
s as Divider,
|
|
66
|
+
C as Dropdown,
|
|
66
67
|
h as DropdownButton,
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
zo as
|
|
77
|
-
Vo as
|
|
78
|
-
|
|
79
|
-
y as
|
|
80
|
-
O as
|
|
81
|
-
j as
|
|
82
|
-
E as
|
|
83
|
-
J as
|
|
84
|
-
Q as
|
|
85
|
-
W as
|
|
86
|
-
Y as
|
|
87
|
-
_ as
|
|
88
|
-
oo as
|
|
89
|
-
eo as
|
|
90
|
-
po as
|
|
91
|
-
xo as
|
|
92
|
-
ao as
|
|
93
|
-
no as
|
|
94
|
-
|
|
95
|
-
To as
|
|
96
|
-
bo as
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
Uo as
|
|
100
|
-
|
|
101
|
-
|
|
68
|
+
w as Filter,
|
|
69
|
+
ko as Footer,
|
|
70
|
+
R as Input,
|
|
71
|
+
Ko as List,
|
|
72
|
+
M as Loading,
|
|
73
|
+
Go as Logo,
|
|
74
|
+
F as Modal,
|
|
75
|
+
I as MultiSelectDropdown,
|
|
76
|
+
Lo as Navigation,
|
|
77
|
+
zo as NavigationGroup,
|
|
78
|
+
Vo as NavigationOption,
|
|
79
|
+
qo as NavigationSeparator,
|
|
80
|
+
y as NumberInput,
|
|
81
|
+
O as PhoneNumberInput,
|
|
82
|
+
j as PieChart,
|
|
83
|
+
E as ProgressBar,
|
|
84
|
+
J as Radio,
|
|
85
|
+
Q as RadioCard,
|
|
86
|
+
W as RadioCardGroup,
|
|
87
|
+
Y as RadioGroup,
|
|
88
|
+
_ as Range,
|
|
89
|
+
oo as Sidebar,
|
|
90
|
+
eo as Slider,
|
|
91
|
+
po as Switch,
|
|
92
|
+
xo as Table,
|
|
93
|
+
ao as Tabs,
|
|
94
|
+
no as Tag,
|
|
95
|
+
go as TagSelect,
|
|
96
|
+
To as TextArea,
|
|
97
|
+
bo as TimePicker,
|
|
98
|
+
So as Toast,
|
|
99
|
+
Bo as Tooltip,
|
|
100
|
+
Uo as Trigger,
|
|
101
|
+
Xo as TruncateText,
|
|
102
|
+
No as Typography,
|
|
103
|
+
vo as VirtualizedTable
|
|
102
104
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -373,6 +373,31 @@ declare interface ModalProps extends PropsWithChildren, VariantProps<typeof moda
|
|
|
373
373
|
|
|
374
374
|
declare const modalVariants: (props?: ClassProp | undefined) => string;
|
|
375
375
|
|
|
376
|
+
export declare const MultiSelectDropdown: FC<MultiSelectDropdownProps>;
|
|
377
|
+
|
|
378
|
+
declare type MultiSelectDropdownOption = {
|
|
379
|
+
id: string | number;
|
|
380
|
+
label: string;
|
|
381
|
+
tagLabel: string;
|
|
382
|
+
tagColor?: TagProps['color'];
|
|
383
|
+
value?: string;
|
|
384
|
+
};
|
|
385
|
+
|
|
386
|
+
declare interface MultiSelectDropdownProps extends VariantProps<typeof multiSelectDropdownVariants>, Omit<InputHTMLAttributes<HTMLInputElement>, 'value' | 'onChange' | 'onBlur'> {
|
|
387
|
+
label?: string;
|
|
388
|
+
options: MultiSelectDropdownOption[];
|
|
389
|
+
name?: string;
|
|
390
|
+
placeholder?: string;
|
|
391
|
+
labelClassName?: string;
|
|
392
|
+
wrapperClassName?: string;
|
|
393
|
+
multiselect?: boolean;
|
|
394
|
+
value?: MultiSelectDropdownOption[];
|
|
395
|
+
onChange?: OnChangeFn_2;
|
|
396
|
+
onBlur?: VoidFunction;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
declare const multiSelectDropdownVariants: (props?: ClassProp | undefined) => string;
|
|
400
|
+
|
|
376
401
|
declare type MultiSelectFilter = {
|
|
377
402
|
key: string;
|
|
378
403
|
label: string;
|
|
@@ -468,6 +493,13 @@ declare type OnChangeFn = (params: {
|
|
|
468
493
|
};
|
|
469
494
|
}) => void;
|
|
470
495
|
|
|
496
|
+
declare type OnChangeFn_2 = (params: {
|
|
497
|
+
target: {
|
|
498
|
+
value: MultiSelectDropdownOption[];
|
|
499
|
+
name: string;
|
|
500
|
+
};
|
|
501
|
+
}) => void;
|
|
502
|
+
|
|
471
503
|
declare type Option_2 = {
|
|
472
504
|
value: string;
|
|
473
505
|
};
|
|
@@ -477,8 +509,10 @@ declare type Option_3 = {
|
|
|
477
509
|
subLabel?: string | ReactNode;
|
|
478
510
|
leftIcon?: ReactNode | string;
|
|
479
511
|
leftIconClassName?: string;
|
|
512
|
+
showRightComponentOnselectedValue?: boolean;
|
|
480
513
|
rightComponent?: ReactNode | string;
|
|
481
514
|
rightComponentClassName?: string;
|
|
515
|
+
wrapperClassNameOnSelectedValue?: string;
|
|
482
516
|
value: string;
|
|
483
517
|
};
|
|
484
518
|
|
|
@@ -860,7 +894,7 @@ declare interface TabsProps extends ReactTabs.TabsProps, PropsWithChildren {
|
|
|
860
894
|
export declare const Tag: FC<TagProps>;
|
|
861
895
|
|
|
862
896
|
declare type TagProps = {
|
|
863
|
-
color?: 'gray' | 'cyan' | 'gold' | 'green' | 'light blue' | 'lime' | 'pink' | 'purple' | 'emerald' | 'fuscia' | 'indigo' | 'light-orange' | 'dark-sky-blue' | 'mistery';
|
|
897
|
+
color?: 'gray' | 'gray-800' | 'cyan' | 'gold' | 'green' | 'light blue' | 'lime' | 'pink' | 'purple' | 'emerald' | 'fuscia' | 'indigo' | 'light-orange' | 'dark-sky-blue' | 'mistery';
|
|
864
898
|
id: string | number;
|
|
865
899
|
label: string;
|
|
866
900
|
rightIcon?: ReactNode;
|