@konstructio/ui 0.1.2-alpha.47 → 0.1.2-alpha.48
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/assets/icons/index.js +7 -0
- package/dist/components/Badge/Badge.js +36 -35
- package/dist/components/Counter/Counter.js +23 -23
- package/dist/components/ImageUpload/ImageUpload.js +8 -8
- package/dist/components/Input/Input.js +185 -118
- package/dist/components/Input/Input.variants.js +16 -20
- package/dist/components/MultiSelectDropdown/MultiSelectDropdown.js +19 -19
- package/dist/components/MultiSelectDropdown/MultiSelectDropdown.variants.js +11 -15
- package/dist/components/MultiSelectDropdown/components/Item/Item.js +18 -26
- package/dist/components/MultiSelectDropdown/components/Item/Item.variants.js +8 -8
- package/dist/components/MultiSelectDropdown/components/List/List.js +12 -19
- package/dist/components/MultiSelectDropdown/components/List/List.variants.js +6 -4
- package/dist/components/MultiSelectDropdown/components/Wrapper/Wrapper.js +79 -65
- package/dist/components/PhoneNumberInput/components/Wrapper.js +43 -36
- package/dist/components/RadioGroup/RadioGroup.js +9 -9
- package/dist/components/Select/components/Wrapper.js +1 -1
- package/dist/components/TimePicker/components/Wrapper/Wrapper.js +1 -1
- package/dist/components/Typography/Typography.variants.js +6 -1
- package/dist/components/VirtualizedTable/VirtualizedTable.js +14 -14
- package/dist/components/VirtualizedTable/components/Actions/Actions.js +20 -16
- package/dist/components/VirtualizedTable/components/DotPaginate/DotPaginate.js +60 -60
- package/dist/components/VirtualizedTable/components/DropdownPaginate/DropdownPaginate.js +8 -8
- package/dist/components/VirtualizedTable/components/FormPaginate/FormPaginate.js +32 -21
- package/dist/components/VirtualizedTable/components/Header/Header.js +15 -15
- package/dist/components/VirtualizedTable/components/Pagination/Pagination.js +8 -8
- package/dist/index.d.ts +10 -9
- package/dist/package.json +4 -4
- package/dist/styles.css +1 -1
- package/package.json +4 -4
|
@@ -1,207 +1,274 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import { cn as
|
|
1
|
+
import { jsxs as h, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import p, { forwardRef as y, useId as I, useRef as L, useState as W } from "react";
|
|
3
|
+
import { cn as i } from "../../utils/index.js";
|
|
4
4
|
import { inputVariants as $ } from "./Input.variants.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
5
|
+
import { Typography as u } from "../Typography/Typography.js";
|
|
6
|
+
import { SearchIcon as T } from "../../assets/icons/components/Search.js";
|
|
7
|
+
import { Warning as S } from "../../assets/icons/components/Warning.js";
|
|
8
|
+
import { P as l } from "../../index-BOE_3f_Z.js";
|
|
9
|
+
function g() {
|
|
10
|
+
return g = Object.assign || function(t) {
|
|
11
|
+
for (var r = 1; r < arguments.length; r++) {
|
|
12
|
+
var n = arguments[r];
|
|
13
|
+
for (var e in n)
|
|
14
|
+
Object.prototype.hasOwnProperty.call(n, e) && (t[e] = n[e]);
|
|
14
15
|
}
|
|
15
16
|
return t;
|
|
16
|
-
},
|
|
17
|
+
}, g.apply(this, arguments);
|
|
17
18
|
}
|
|
18
|
-
function
|
|
19
|
+
function C(t, r) {
|
|
19
20
|
if (t == null) return {};
|
|
20
|
-
var
|
|
21
|
+
var n = M(t, r), e, o;
|
|
21
22
|
if (Object.getOwnPropertySymbols) {
|
|
22
|
-
var
|
|
23
|
-
for (
|
|
24
|
-
e = o
|
|
23
|
+
var a = Object.getOwnPropertySymbols(t);
|
|
24
|
+
for (o = 0; o < a.length; o++)
|
|
25
|
+
e = a[o], !(r.indexOf(e) >= 0) && Object.prototype.propertyIsEnumerable.call(t, e) && (n[e] = t[e]);
|
|
25
26
|
}
|
|
26
|
-
return
|
|
27
|
+
return n;
|
|
27
28
|
}
|
|
28
|
-
function
|
|
29
|
+
function M(t, r) {
|
|
29
30
|
if (t == null) return {};
|
|
30
|
-
var
|
|
31
|
-
for (
|
|
32
|
-
|
|
33
|
-
return
|
|
31
|
+
var n = {}, e = Object.keys(t), o, a;
|
|
32
|
+
for (a = 0; a < e.length; a++)
|
|
33
|
+
o = e[a], !(r.indexOf(o) >= 0) && (n[o] = t[o]);
|
|
34
|
+
return n;
|
|
34
35
|
}
|
|
35
|
-
var
|
|
36
|
-
var
|
|
37
|
-
return /* @__PURE__ */
|
|
38
|
-
ref:
|
|
36
|
+
var x = y(function(t, r) {
|
|
37
|
+
var n = t.color, e = n === void 0 ? "currentColor" : n, o = t.size, a = o === void 0 ? 24 : o, c = C(t, ["color", "size"]);
|
|
38
|
+
return /* @__PURE__ */ p.createElement("svg", g({
|
|
39
|
+
ref: r,
|
|
39
40
|
xmlns: "http://www.w3.org/2000/svg",
|
|
40
|
-
width:
|
|
41
|
-
height:
|
|
41
|
+
width: a,
|
|
42
|
+
height: a,
|
|
42
43
|
viewBox: "0 0 24 24",
|
|
43
44
|
fill: "none",
|
|
44
45
|
stroke: e,
|
|
45
46
|
strokeWidth: "2",
|
|
46
47
|
strokeLinecap: "round",
|
|
47
48
|
strokeLinejoin: "round"
|
|
48
|
-
}, c), /* @__PURE__ */
|
|
49
|
+
}, c), /* @__PURE__ */ p.createElement("path", {
|
|
49
50
|
d: "M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24"
|
|
50
|
-
}), /* @__PURE__ */
|
|
51
|
+
}), /* @__PURE__ */ p.createElement("line", {
|
|
51
52
|
x1: "1",
|
|
52
53
|
y1: "1",
|
|
53
54
|
x2: "23",
|
|
54
55
|
y2: "23"
|
|
55
56
|
}));
|
|
56
57
|
});
|
|
57
|
-
|
|
58
|
-
color:
|
|
59
|
-
size:
|
|
58
|
+
x.propTypes = {
|
|
59
|
+
color: l.string,
|
|
60
|
+
size: l.oneOfType([l.string, l.number])
|
|
60
61
|
};
|
|
61
|
-
|
|
62
|
-
function
|
|
63
|
-
return
|
|
64
|
-
for (var
|
|
65
|
-
var
|
|
66
|
-
for (var e in
|
|
67
|
-
Object.prototype.hasOwnProperty.call(
|
|
62
|
+
x.displayName = "EyeOff";
|
|
63
|
+
function v() {
|
|
64
|
+
return v = Object.assign || function(t) {
|
|
65
|
+
for (var r = 1; r < arguments.length; r++) {
|
|
66
|
+
var n = arguments[r];
|
|
67
|
+
for (var e in n)
|
|
68
|
+
Object.prototype.hasOwnProperty.call(n, e) && (t[e] = n[e]);
|
|
68
69
|
}
|
|
69
70
|
return t;
|
|
70
|
-
},
|
|
71
|
+
}, v.apply(this, arguments);
|
|
71
72
|
}
|
|
72
|
-
function
|
|
73
|
+
function R(t, r) {
|
|
73
74
|
if (t == null) return {};
|
|
74
|
-
var
|
|
75
|
+
var n = A(t, r), e, o;
|
|
75
76
|
if (Object.getOwnPropertySymbols) {
|
|
76
|
-
var
|
|
77
|
-
for (
|
|
78
|
-
e = o
|
|
77
|
+
var a = Object.getOwnPropertySymbols(t);
|
|
78
|
+
for (o = 0; o < a.length; o++)
|
|
79
|
+
e = a[o], !(r.indexOf(e) >= 0) && Object.prototype.propertyIsEnumerable.call(t, e) && (n[e] = t[e]);
|
|
79
80
|
}
|
|
80
|
-
return
|
|
81
|
+
return n;
|
|
81
82
|
}
|
|
82
|
-
function
|
|
83
|
+
function A(t, r) {
|
|
83
84
|
if (t == null) return {};
|
|
84
|
-
var
|
|
85
|
-
for (
|
|
86
|
-
|
|
87
|
-
return
|
|
85
|
+
var n = {}, e = Object.keys(t), o, a;
|
|
86
|
+
for (a = 0; a < e.length; a++)
|
|
87
|
+
o = e[a], !(r.indexOf(o) >= 0) && (n[o] = t[o]);
|
|
88
|
+
return n;
|
|
88
89
|
}
|
|
89
|
-
var
|
|
90
|
-
var
|
|
91
|
-
return /* @__PURE__ */
|
|
92
|
-
ref:
|
|
90
|
+
var w = y(function(t, r) {
|
|
91
|
+
var n = t.color, e = n === void 0 ? "currentColor" : n, o = t.size, a = o === void 0 ? 24 : o, c = R(t, ["color", "size"]);
|
|
92
|
+
return /* @__PURE__ */ p.createElement("svg", v({
|
|
93
|
+
ref: r,
|
|
93
94
|
xmlns: "http://www.w3.org/2000/svg",
|
|
94
|
-
width:
|
|
95
|
-
height:
|
|
95
|
+
width: a,
|
|
96
|
+
height: a,
|
|
96
97
|
viewBox: "0 0 24 24",
|
|
97
98
|
fill: "none",
|
|
98
99
|
stroke: e,
|
|
99
100
|
strokeWidth: "2",
|
|
100
101
|
strokeLinecap: "round",
|
|
101
102
|
strokeLinejoin: "round"
|
|
102
|
-
}, c), /* @__PURE__ */
|
|
103
|
+
}, c), /* @__PURE__ */ p.createElement("path", {
|
|
103
104
|
d: "M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"
|
|
104
|
-
}), /* @__PURE__ */
|
|
105
|
+
}), /* @__PURE__ */ p.createElement("circle", {
|
|
105
106
|
cx: "12",
|
|
106
107
|
cy: "12",
|
|
107
108
|
r: "3"
|
|
108
109
|
}));
|
|
109
110
|
});
|
|
110
|
-
|
|
111
|
-
color:
|
|
112
|
-
size:
|
|
111
|
+
w.propTypes = {
|
|
112
|
+
color: l.string,
|
|
113
|
+
size: l.oneOfType([l.string, l.number])
|
|
113
114
|
};
|
|
114
|
-
|
|
115
|
-
const
|
|
115
|
+
w.displayName = "Eye";
|
|
116
|
+
const B = y(
|
|
116
117
|
({
|
|
117
118
|
className: t,
|
|
118
|
-
error:
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
119
|
+
error: r,
|
|
120
|
+
helperText: n,
|
|
121
|
+
helperTextClassName: e,
|
|
122
|
+
isRequired: o = !1,
|
|
123
|
+
isSearch: a = !1,
|
|
124
|
+
label: c,
|
|
125
|
+
labelClassName: O,
|
|
126
|
+
name: j,
|
|
127
|
+
theme: k,
|
|
125
128
|
type: f = "text",
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
r ? /* @__PURE__ */ m(
|
|
133
|
-
"label",
|
|
129
|
+
...N
|
|
130
|
+
}, P) => {
|
|
131
|
+
const b = I(), E = L(f === "password"), [d, z] = W(() => f !== "password"), m = typeof r == "string" && r.length >= 0, _ = d ? w : x;
|
|
132
|
+
return /* @__PURE__ */ h("div", { className: "flex flex-col gap-2 w-full relative", "data-theme": k, children: [
|
|
133
|
+
c ? /* @__PURE__ */ h(
|
|
134
|
+
u,
|
|
134
135
|
{
|
|
136
|
+
component: "label",
|
|
137
|
+
variant: "labelLarge",
|
|
135
138
|
htmlFor: b,
|
|
136
|
-
className:
|
|
137
|
-
"cursor-pointer
|
|
138
|
-
|
|
139
|
+
className: i(
|
|
140
|
+
"cursor-pointer",
|
|
141
|
+
"flex",
|
|
142
|
+
"gap-1",
|
|
143
|
+
"text-sm",
|
|
144
|
+
"font-medium",
|
|
145
|
+
O
|
|
139
146
|
),
|
|
140
147
|
children: [
|
|
141
|
-
|
|
148
|
+
c,
|
|
142
149
|
" ",
|
|
143
|
-
|
|
150
|
+
o && /* @__PURE__ */ s(
|
|
151
|
+
u,
|
|
152
|
+
{
|
|
153
|
+
component: "span",
|
|
154
|
+
className: i(
|
|
155
|
+
"text-red-600",
|
|
156
|
+
"dark:text-red-500",
|
|
157
|
+
"text-xs",
|
|
158
|
+
"mt-0.5"
|
|
159
|
+
),
|
|
160
|
+
children: "*"
|
|
161
|
+
}
|
|
162
|
+
)
|
|
144
163
|
]
|
|
145
164
|
}
|
|
146
165
|
) : null,
|
|
147
|
-
/* @__PURE__ */
|
|
148
|
-
|
|
166
|
+
/* @__PURE__ */ h("div", { className: "relative", children: [
|
|
167
|
+
a ? /* @__PURE__ */ s(
|
|
149
168
|
"i",
|
|
150
169
|
{
|
|
151
|
-
className:
|
|
152
|
-
"absolute
|
|
170
|
+
className: i(
|
|
171
|
+
"absolute",
|
|
172
|
+
"left-2.5",
|
|
173
|
+
"top-1/2",
|
|
174
|
+
"-translate-y-[50%]",
|
|
175
|
+
"text-slate-400",
|
|
176
|
+
"dark:text-metal-400",
|
|
153
177
|
{
|
|
154
|
-
"text-red-700":
|
|
178
|
+
"text-red-700": m
|
|
155
179
|
}
|
|
156
180
|
),
|
|
157
|
-
children: /* @__PURE__ */ s(
|
|
181
|
+
children: /* @__PURE__ */ s(T, { className: "w-5 h-5" })
|
|
158
182
|
}
|
|
159
183
|
) : null,
|
|
160
184
|
/* @__PURE__ */ s(
|
|
161
185
|
"input",
|
|
162
186
|
{
|
|
163
|
-
id:
|
|
164
|
-
ref:
|
|
165
|
-
name:
|
|
166
|
-
type: d ?
|
|
167
|
-
"data-error":
|
|
168
|
-
className:
|
|
187
|
+
id: c ? b : void 0,
|
|
188
|
+
ref: P,
|
|
189
|
+
name: j,
|
|
190
|
+
type: d ? E.current ? "text" : f : "password",
|
|
191
|
+
"data-error": m,
|
|
192
|
+
className: i(
|
|
169
193
|
$({
|
|
170
194
|
className: t,
|
|
171
|
-
variant:
|
|
195
|
+
variant: m ? "error" : "default"
|
|
172
196
|
}),
|
|
173
197
|
{
|
|
174
|
-
"pr-10": f === "password" ||
|
|
175
|
-
"pl-8":
|
|
198
|
+
"pr-10": f === "password" || m,
|
|
199
|
+
"pl-8": a
|
|
176
200
|
}
|
|
177
201
|
),
|
|
178
|
-
...
|
|
202
|
+
...N
|
|
179
203
|
}
|
|
180
204
|
),
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
z,
|
|
205
|
+
m ? /* @__PURE__ */ s(
|
|
206
|
+
"i",
|
|
184
207
|
{
|
|
185
|
-
className:
|
|
186
|
-
|
|
208
|
+
className: i(
|
|
209
|
+
"-translate-y-[50%]",
|
|
210
|
+
"absolute",
|
|
211
|
+
"right-3",
|
|
212
|
+
"text-red-700",
|
|
213
|
+
"top-1/2",
|
|
214
|
+
"dark:text-red-500"
|
|
215
|
+
),
|
|
216
|
+
children: /* @__PURE__ */ s(S, { className: "w-5 h-5" })
|
|
187
217
|
}
|
|
188
|
-
)
|
|
218
|
+
) : null,
|
|
219
|
+
f === "password" && !r ? /* @__PURE__ */ s(
|
|
220
|
+
"i",
|
|
221
|
+
{
|
|
222
|
+
className: i(
|
|
223
|
+
"-translate-y-[50%]",
|
|
224
|
+
"absolute",
|
|
225
|
+
"right-3",
|
|
226
|
+
"text-slate-400",
|
|
227
|
+
"top-1/2"
|
|
228
|
+
),
|
|
229
|
+
children: /* @__PURE__ */ s(
|
|
230
|
+
_,
|
|
231
|
+
{
|
|
232
|
+
className: "w-5 h-5 cursor-pointer",
|
|
233
|
+
onClick: () => z(!d)
|
|
234
|
+
}
|
|
235
|
+
)
|
|
236
|
+
}
|
|
237
|
+
) : null
|
|
189
238
|
] }),
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
239
|
+
r ? /* @__PURE__ */ s(
|
|
240
|
+
u,
|
|
241
|
+
{
|
|
242
|
+
component: "span",
|
|
243
|
+
className: i(
|
|
244
|
+
"text-xs",
|
|
245
|
+
"tracking-normal",
|
|
246
|
+
"text-red-700",
|
|
247
|
+
"dark:text-red-400"
|
|
248
|
+
),
|
|
249
|
+
children: r
|
|
250
|
+
}
|
|
251
|
+
) : null,
|
|
252
|
+
!r && n ? /* @__PURE__ */ s(
|
|
253
|
+
u,
|
|
193
254
|
{
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
255
|
+
component: "span",
|
|
256
|
+
variant: "body1",
|
|
257
|
+
className: i(
|
|
258
|
+
"text-xs",
|
|
259
|
+
"text-slate-600",
|
|
260
|
+
"dark:text-slate-200",
|
|
261
|
+
"select-none",
|
|
262
|
+
"tracking-normal",
|
|
263
|
+
e
|
|
197
264
|
),
|
|
198
|
-
children:
|
|
265
|
+
children: n
|
|
199
266
|
}
|
|
200
267
|
) : null
|
|
201
268
|
] });
|
|
202
269
|
}
|
|
203
270
|
);
|
|
204
|
-
|
|
271
|
+
B.displayName = "KonstructInput";
|
|
205
272
|
export {
|
|
206
|
-
|
|
273
|
+
B as Input
|
|
207
274
|
};
|
|
@@ -1,41 +1,38 @@
|
|
|
1
|
-
import { c as
|
|
2
|
-
const
|
|
1
|
+
import { c as e } from "../../index-D29mdTf5.js";
|
|
2
|
+
const r = e(
|
|
3
3
|
[
|
|
4
4
|
"bg-white",
|
|
5
|
-
"border-gray-300",
|
|
6
5
|
"border",
|
|
7
|
-
"
|
|
6
|
+
"border-gray-300",
|
|
7
|
+
"caret-text-slate-800",
|
|
8
8
|
"disabled:cursor-not-allowed",
|
|
9
9
|
"disabled:text-slate-500",
|
|
10
10
|
"flex",
|
|
11
|
+
"focus-visible:border-transparent",
|
|
11
12
|
"focus-visible:outline-none",
|
|
12
13
|
"focus-visible:ring-1",
|
|
13
14
|
"h-10",
|
|
14
|
-
"placeholder:text-zinc-400",
|
|
15
|
-
"dark:placeholder:text-metal-300",
|
|
16
15
|
"px-2.5",
|
|
17
16
|
"py-2",
|
|
18
17
|
"rounded",
|
|
19
18
|
"text-slate-800",
|
|
20
19
|
"text-sm",
|
|
21
|
-
"w-full",
|
|
22
20
|
"transition-all",
|
|
23
|
-
"
|
|
21
|
+
"w-full",
|
|
22
|
+
"disabled:bg-gray-50",
|
|
23
|
+
"placeholder:text-slate-400",
|
|
24
24
|
"data-[error=false]:dark:focus:ring-aurora-500",
|
|
25
25
|
"data-[error=false]:focus:ring-aurora-500",
|
|
26
|
-
"data-[error=false]:kubefirst:focus:ring-kubefirst-primary",
|
|
27
26
|
"dark:bg-metal-800",
|
|
28
27
|
"dark:border-metal-700",
|
|
29
|
-
"dark:
|
|
28
|
+
"dark:caret-text-metal-50",
|
|
29
|
+
"dark:disabled:bg-metal-900",
|
|
30
|
+
"dark:disabled:placeholder:text-metal-400",
|
|
31
|
+
"dark:disabled:text-metal-400",
|
|
30
32
|
"dark:disabled:text-slate-400",
|
|
33
|
+
"dark:placeholder:text-metal-300",
|
|
31
34
|
"dark:text-slate-50",
|
|
32
|
-
"dark:text-white"
|
|
33
|
-
"kubefirst-dark:bg-slate-800",
|
|
34
|
-
"kubefirst-dark:border-slate-600",
|
|
35
|
-
"kubefirst-dark:disabled:bg-slate-900",
|
|
36
|
-
"kubefirst-dark:disabled:text-slate-400",
|
|
37
|
-
"kubefirst-dark:text-slate-50",
|
|
38
|
-
"kubefirst-dark:text-white"
|
|
35
|
+
"dark:text-white"
|
|
39
36
|
],
|
|
40
37
|
{
|
|
41
38
|
variants: {
|
|
@@ -46,8 +43,7 @@ const a = r(
|
|
|
46
43
|
"border-red-600",
|
|
47
44
|
"focus-visible:border-red-600",
|
|
48
45
|
"focus-visible:ring-transparent",
|
|
49
|
-
"dark:border-red-500"
|
|
50
|
-
"kubefirst-dark:border-red-500"
|
|
46
|
+
"dark:border-red-500"
|
|
51
47
|
]
|
|
52
48
|
}
|
|
53
49
|
},
|
|
@@ -57,5 +53,5 @@ const a = r(
|
|
|
57
53
|
}
|
|
58
54
|
);
|
|
59
55
|
export {
|
|
60
|
-
|
|
56
|
+
r as inputVariants
|
|
61
57
|
};
|
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as n } from "react";
|
|
3
|
-
import { MultiSelectDropdownProvider as
|
|
4
|
-
import { Wrapper as
|
|
5
|
-
const
|
|
3
|
+
import { MultiSelectDropdownProvider as s } from "./contexts/MultiSelectDropdown.provider.js";
|
|
4
|
+
import { Wrapper as u } from "./components/Wrapper/Wrapper.js";
|
|
5
|
+
const a = n(
|
|
6
6
|
({
|
|
7
|
-
|
|
7
|
+
isLoading: t,
|
|
8
8
|
multiselect: e,
|
|
9
|
-
value: p,
|
|
10
|
-
onChange: i,
|
|
11
|
-
onBlur: l,
|
|
12
9
|
name: o,
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
noOptionsText: p,
|
|
11
|
+
options: i,
|
|
12
|
+
value: l,
|
|
13
|
+
onChange: d,
|
|
14
|
+
onBlur: m,
|
|
15
15
|
...f
|
|
16
16
|
}, c) => /* @__PURE__ */ r(
|
|
17
|
-
|
|
17
|
+
s,
|
|
18
18
|
{
|
|
19
|
-
defaultOptions:
|
|
19
|
+
defaultOptions: i,
|
|
20
20
|
multiselect: e,
|
|
21
|
-
value:
|
|
22
|
-
onChange:
|
|
23
|
-
onBlur:
|
|
21
|
+
value: l,
|
|
22
|
+
onChange: d,
|
|
23
|
+
onBlur: m,
|
|
24
24
|
name: o,
|
|
25
|
-
isLoading:
|
|
26
|
-
noOptionsText:
|
|
27
|
-
children: /* @__PURE__ */ r(
|
|
25
|
+
isLoading: t,
|
|
26
|
+
noOptionsText: p,
|
|
27
|
+
children: /* @__PURE__ */ r(u, { ref: c, name: o, ...f })
|
|
28
28
|
}
|
|
29
29
|
)
|
|
30
30
|
);
|
|
31
|
-
|
|
31
|
+
a.displayName = "KonstructMultiSelectDropdown";
|
|
32
32
|
export {
|
|
33
|
-
|
|
33
|
+
a as MultiSelectDropdown
|
|
34
34
|
};
|
|
@@ -1,18 +1,12 @@
|
|
|
1
|
-
import { c as
|
|
2
|
-
const
|
|
1
|
+
import { c as r } from "../../index-D29mdTf5.js";
|
|
2
|
+
const t = r([
|
|
3
3
|
"flex",
|
|
4
4
|
"flex-col",
|
|
5
5
|
"w-full",
|
|
6
6
|
"relative",
|
|
7
|
-
"
|
|
8
|
-
|
|
9
|
-
"
|
|
10
|
-
"text-sm",
|
|
11
|
-
"leading-5",
|
|
12
|
-
"tracking-[0.1px]",
|
|
13
|
-
"dark:text-slate-50"
|
|
14
|
-
]), a = t(["cursor-pointer", "mb-1"]), o = t([
|
|
15
|
-
"h-9",
|
|
7
|
+
"cursor-pointer"
|
|
8
|
+
]), o = r(["cursor-pointer", "mb-1", "select-none"]), a = r([
|
|
9
|
+
"min-h-9",
|
|
16
10
|
"border",
|
|
17
11
|
"cursor-pointer",
|
|
18
12
|
"duration-250",
|
|
@@ -25,10 +19,12 @@ const r = t([
|
|
|
25
19
|
"rounded-md",
|
|
26
20
|
"transition-all",
|
|
27
21
|
"w-full",
|
|
28
|
-
"border-gray-200"
|
|
22
|
+
"border-gray-200",
|
|
23
|
+
"dark:border-metal-700",
|
|
24
|
+
"dark:bg-metal-800"
|
|
29
25
|
]);
|
|
30
26
|
export {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
27
|
+
o as labelVariants,
|
|
28
|
+
a as multiSelectDropdownVariants,
|
|
29
|
+
t as wrapperVariants
|
|
34
30
|
};
|
|
@@ -1,38 +1,30 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
const
|
|
1
|
+
import { jsxs as i, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { Badge as l } from "../../../Badge/Badge.js";
|
|
3
|
+
import { Typography as n } from "../../../Typography/Typography.js";
|
|
4
|
+
import { cn as c } from "../../../../utils/index.js";
|
|
5
|
+
import { itemVariants as p } from "./Item.variants.js";
|
|
6
|
+
import { useMultiSelectDropdown as s } from "../../contexts/MultiSelectDropdown.hook.js";
|
|
7
|
+
const x = ({
|
|
8
8
|
option: r,
|
|
9
|
-
theme:
|
|
10
|
-
isSelected:
|
|
11
|
-
className:
|
|
9
|
+
theme: o,
|
|
10
|
+
isSelected: t,
|
|
11
|
+
className: m
|
|
12
12
|
}) => {
|
|
13
|
-
const { onSelectOption:
|
|
14
|
-
return /* @__PURE__ */
|
|
13
|
+
const { onSelectOption: a } = s();
|
|
14
|
+
return /* @__PURE__ */ i(
|
|
15
15
|
"li",
|
|
16
16
|
{
|
|
17
17
|
role: "option",
|
|
18
|
-
"data-theme":
|
|
19
|
-
className:
|
|
20
|
-
onClick: () =>
|
|
18
|
+
"data-theme": o,
|
|
19
|
+
className: c(p({ isSelected: t }), m),
|
|
20
|
+
onClick: () => a(r),
|
|
21
21
|
children: [
|
|
22
|
-
/* @__PURE__ */
|
|
23
|
-
r.
|
|
24
|
-
n,
|
|
25
|
-
{
|
|
26
|
-
id: r.id,
|
|
27
|
-
label: r.tagLabel,
|
|
28
|
-
color: r.tagColor,
|
|
29
|
-
isSelected: a
|
|
30
|
-
}
|
|
31
|
-
)
|
|
22
|
+
/* @__PURE__ */ e(n, { variant: "body2", children: r.label }),
|
|
23
|
+
r.badge && /* @__PURE__ */ e(l, { label: r.badge })
|
|
32
24
|
]
|
|
33
25
|
}
|
|
34
26
|
);
|
|
35
27
|
};
|
|
36
28
|
export {
|
|
37
|
-
|
|
29
|
+
x as Item
|
|
38
30
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c as e } from "../../../../index-D29mdTf5.js";
|
|
2
|
-
const
|
|
2
|
+
const t = e(
|
|
3
3
|
[
|
|
4
4
|
"cursor-pointer",
|
|
5
5
|
"py-1.5",
|
|
@@ -7,13 +7,13 @@ const r = e(
|
|
|
7
7
|
"last:pb-2",
|
|
8
8
|
"first:pt-2",
|
|
9
9
|
"h-full",
|
|
10
|
-
"hover:bg-gray-50",
|
|
11
|
-
"focus:bg-gray-50",
|
|
12
|
-
"dark:hover:bg-slate-700",
|
|
13
|
-
"dark:focus:bg-slate-700",
|
|
14
10
|
"flex",
|
|
15
11
|
"items-center",
|
|
16
|
-
"gap-
|
|
12
|
+
"gap-2",
|
|
13
|
+
"hover:bg-gray-50",
|
|
14
|
+
"focus:bg-gray-50",
|
|
15
|
+
"dark:hover:bg-metal-700",
|
|
16
|
+
"dark:focus:bg-metal-700"
|
|
17
17
|
],
|
|
18
18
|
{
|
|
19
19
|
variants: {
|
|
@@ -25,7 +25,7 @@ const r = e(
|
|
|
25
25
|
compoundVariants: [
|
|
26
26
|
{
|
|
27
27
|
isSelected: !0,
|
|
28
|
-
class: ["bg-slate-50"]
|
|
28
|
+
class: ["bg-slate-50", "dark:bg-metal-700"]
|
|
29
29
|
}
|
|
30
30
|
],
|
|
31
31
|
defaultVariants: {
|
|
@@ -34,5 +34,5 @@ const r = e(
|
|
|
34
34
|
}
|
|
35
35
|
);
|
|
36
36
|
export {
|
|
37
|
-
|
|
37
|
+
t as itemVariants
|
|
38
38
|
};
|