@konstructio/ui 0.1.2-alpha.44 → 0.1.2-alpha.46
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/components/AlertDialog/AlertDialog.js +39 -37
- package/dist/components/AlertDialog/components/AlertDialogTrigger.js +1 -1
- package/dist/components/AlertDialog/components/index.js +1 -1
- package/dist/components/Badge/Badge.js +23 -26
- package/dist/components/Badge/Badge.variants.js +1 -1
- package/dist/components/Button/Button.variants.js +108 -98
- package/dist/components/Checkbox/Checkbox.js +104 -100
- package/dist/components/Checkbox/Checkbox.variants.js +30 -7
- package/dist/components/Filter/Filter.js +1 -1
- package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.js +9 -10
- package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.js +76 -43
- package/dist/components/Filter/components/ResetButton/ResetButton.js +21 -32
- package/dist/components/Filter/events/index.js +3 -3
- package/dist/components/ImageUpload/ImageUpload.js +221 -0
- package/dist/components/ImageUpload/ImageUpload.variants.js +109 -0
- package/dist/components/Input/Input.variants.js +10 -2
- package/dist/components/PhoneNumberInput/PhoneNumberInput.variants.js +4 -4
- package/dist/components/PhoneNumberInput/components/FlagContent/FlagContent.js +16 -7
- package/dist/components/PhoneNumberInput/components/FlagSelectorList/FlagSelectorList.js +92 -74
- package/dist/components/PhoneNumberInput/components/FlagSelectorWrapper/FlagSelectorWrapper.js +53 -29
- package/dist/components/PhoneNumberInput/components/Wrapper.js +139 -120
- package/dist/components/Select/Select.js +48 -0
- package/dist/components/{Dropdown/Dropdown.variants.js → Select/Select.variants.js} +3 -3
- package/dist/components/{Dropdown → Select}/components/List/List.js +48 -43
- package/dist/components/{Dropdown → Select}/components/List/List.variants.js +8 -5
- package/dist/components/{Dropdown → Select}/components/ListItem/ListItem.js +20 -20
- package/dist/components/{Dropdown → Select}/components/ListItem/ListItem.variants.js +3 -2
- package/dist/components/{Dropdown → Select}/components/Wrapper.js +70 -70
- package/dist/components/Select/contexts/index.js +6 -0
- package/dist/components/{Dropdown/contexts/dropdown.context.js → Select/contexts/select.context.js} +2 -2
- package/dist/components/Select/contexts/select.hook.js +11 -0
- package/dist/components/Select/contexts/select.provider.js +58 -0
- package/dist/components/{Dropdown → Select}/hooks/useNavigationList.js +3 -3
- package/dist/components/{Dropdown/hooks/useDropdown.js → Select/hooks/useSelect.js} +33 -33
- package/dist/components/Switch/Switch.js +153 -125
- package/dist/components/Switch/Switch.variants.js +15 -6
- package/dist/components/Typography/Typography.js +25 -27
- package/dist/components/Typography/Typography.variants.js +2 -2
- package/dist/components/VirtualizedTable/components/Actions/Actions.js +14 -14
- package/dist/components/VirtualizedTable/components/DropdownPaginate/DropdownPaginate.js +10 -10
- package/dist/components/VirtualizedTable/components/Skeleton/Skeleton.js +1 -1
- package/dist/components/index.js +77 -74
- package/dist/{index-CPU02rhe.js → index-D6KzX_ef.js} +13 -12
- package/dist/index.d.ts +106 -60
- package/dist/index.js +109 -106
- package/dist/package.json +4 -4
- package/dist/styles.css +1 -1
- package/dist/ui/civo-theme.css +6 -5
- package/dist/ui/theme.css +27 -0
- package/dist/x-BXShoIAM.js +8 -0
- package/package.json +4 -4
- package/dist/components/Dropdown/Dropdown.js +0 -48
- package/dist/components/Dropdown/contexts/dropdown.hook.js +0 -13
- package/dist/components/Dropdown/contexts/dropdown.provider.js +0 -58
- package/dist/components/Dropdown/contexts/index.js +0 -6
- /package/dist/components/{Dropdown → Select}/components/EmptyList.js +0 -0
- /package/dist/components/{Dropdown → Select}/components/index.js +0 -0
- /package/dist/components/{Dropdown → Select}/constants/index.js +0 -0
- /package/dist/components/{Dropdown → Select}/constants/pagination.js +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as u, jsxs as B, Fragment as U } from "react/jsx-runtime";
|
|
2
|
-
import * as
|
|
2
|
+
import * as m from "react";
|
|
3
3
|
import S, { forwardRef as z, useId as V, useCallback as X } from "react";
|
|
4
4
|
import { u as L } from "../../index-DLcqcWxM.js";
|
|
5
|
-
import { c as J, P as
|
|
5
|
+
import { c as J, P as R, a as Q, b as j } from "../../index-DKfEnhKr.js";
|
|
6
6
|
import { u as Y } from "../../index-BZPx6jYI.js";
|
|
7
7
|
import { u as Z } from "../../index-DtEcCIrM.js";
|
|
8
8
|
import { P as ee } from "../../index-AV6ZtGhy.js";
|
|
@@ -10,43 +10,43 @@ import { cn as T } from "../../utils/index.js";
|
|
|
10
10
|
import { checkboxVariants as te, labelVariants as re } from "./Checkbox.variants.js";
|
|
11
11
|
import { useToggle as oe } from "../../hooks/useToggle.js";
|
|
12
12
|
import { P as y } from "../../index-BOE_3f_Z.js";
|
|
13
|
-
function
|
|
14
|
-
return
|
|
15
|
-
for (var
|
|
16
|
-
var
|
|
17
|
-
for (var
|
|
18
|
-
Object.prototype.hasOwnProperty.call(
|
|
13
|
+
function E() {
|
|
14
|
+
return E = Object.assign || function(e) {
|
|
15
|
+
for (var c = 1; c < arguments.length; c++) {
|
|
16
|
+
var n = arguments[c];
|
|
17
|
+
for (var r in n)
|
|
18
|
+
Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
|
|
19
19
|
}
|
|
20
20
|
return e;
|
|
21
|
-
},
|
|
21
|
+
}, E.apply(this, arguments);
|
|
22
22
|
}
|
|
23
|
-
function ne(e,
|
|
23
|
+
function ne(e, c) {
|
|
24
24
|
if (e == null) return {};
|
|
25
|
-
var
|
|
25
|
+
var n = ce(e, c), r, o;
|
|
26
26
|
if (Object.getOwnPropertySymbols) {
|
|
27
27
|
var t = Object.getOwnPropertySymbols(e);
|
|
28
|
-
for (
|
|
29
|
-
|
|
28
|
+
for (o = 0; o < t.length; o++)
|
|
29
|
+
r = t[o], !(c.indexOf(r) >= 0) && Object.prototype.propertyIsEnumerable.call(e, r) && (n[r] = e[r]);
|
|
30
30
|
}
|
|
31
|
-
return
|
|
31
|
+
return n;
|
|
32
32
|
}
|
|
33
|
-
function
|
|
33
|
+
function ce(e, c) {
|
|
34
34
|
if (e == null) return {};
|
|
35
|
-
var
|
|
36
|
-
for (t = 0; t <
|
|
37
|
-
|
|
38
|
-
return
|
|
35
|
+
var n = {}, r = Object.keys(e), o, t;
|
|
36
|
+
for (t = 0; t < r.length; t++)
|
|
37
|
+
o = r[t], !(c.indexOf(o) >= 0) && (n[o] = e[o]);
|
|
38
|
+
return n;
|
|
39
39
|
}
|
|
40
|
-
var I = z(function(e,
|
|
41
|
-
var
|
|
42
|
-
return /* @__PURE__ */ S.createElement("svg",
|
|
43
|
-
ref:
|
|
40
|
+
var I = z(function(e, c) {
|
|
41
|
+
var n = e.color, r = n === void 0 ? "currentColor" : n, o = e.size, t = o === void 0 ? 24 : o, l = ne(e, ["color", "size"]);
|
|
42
|
+
return /* @__PURE__ */ S.createElement("svg", E({
|
|
43
|
+
ref: c,
|
|
44
44
|
xmlns: "http://www.w3.org/2000/svg",
|
|
45
45
|
width: t,
|
|
46
46
|
height: t,
|
|
47
47
|
viewBox: "0 0 24 24",
|
|
48
48
|
fill: "none",
|
|
49
|
-
stroke:
|
|
49
|
+
stroke: r,
|
|
50
50
|
strokeWidth: "2",
|
|
51
51
|
strokeLinecap: "round",
|
|
52
52
|
strokeLinejoin: "round"
|
|
@@ -59,13 +59,13 @@ I.propTypes = {
|
|
|
59
59
|
size: y.oneOfType([y.string, y.number])
|
|
60
60
|
};
|
|
61
61
|
I.displayName = "Check";
|
|
62
|
-
var P = "Checkbox", [
|
|
62
|
+
var P = "Checkbox", [ae, ye] = J(P), [se, N] = ae(P);
|
|
63
63
|
function ie(e) {
|
|
64
64
|
const {
|
|
65
|
-
__scopeCheckbox:
|
|
66
|
-
checked:
|
|
67
|
-
children:
|
|
68
|
-
defaultChecked:
|
|
65
|
+
__scopeCheckbox: c,
|
|
66
|
+
checked: n,
|
|
67
|
+
children: r,
|
|
68
|
+
defaultChecked: o,
|
|
69
69
|
disabled: t,
|
|
70
70
|
form: l,
|
|
71
71
|
name: f,
|
|
@@ -75,40 +75,40 @@ function ie(e) {
|
|
|
75
75
|
// @ts-expect-error
|
|
76
76
|
internal_do_not_use_render: i
|
|
77
77
|
} = e, [p, x] = Q({
|
|
78
|
-
prop:
|
|
79
|
-
defaultProp:
|
|
78
|
+
prop: n,
|
|
79
|
+
defaultProp: o ?? !1,
|
|
80
80
|
onChange: d,
|
|
81
81
|
caller: P
|
|
82
|
-
}), [
|
|
82
|
+
}), [h, C] = m.useState(null), [g, a] = m.useState(null), s = m.useRef(!1), _ = h ? !!l || !!h.closest("form") : (
|
|
83
83
|
// We set this to true by default so that events bubble to forms without JS (SSR)
|
|
84
84
|
!0
|
|
85
|
-
),
|
|
85
|
+
), w = {
|
|
86
86
|
checked: p,
|
|
87
87
|
disabled: t,
|
|
88
88
|
setChecked: x,
|
|
89
|
-
control:
|
|
89
|
+
control: h,
|
|
90
90
|
setControl: C,
|
|
91
91
|
name: f,
|
|
92
92
|
form: l,
|
|
93
93
|
value: k,
|
|
94
94
|
hasConsumerStoppedPropagationRef: s,
|
|
95
95
|
required: b,
|
|
96
|
-
defaultChecked: v(
|
|
96
|
+
defaultChecked: v(o) ? !1 : o,
|
|
97
97
|
isFormControl: _,
|
|
98
98
|
bubbleInput: g,
|
|
99
|
-
setBubbleInput:
|
|
99
|
+
setBubbleInput: a
|
|
100
100
|
};
|
|
101
101
|
return /* @__PURE__ */ u(
|
|
102
102
|
se,
|
|
103
103
|
{
|
|
104
|
-
scope:
|
|
105
|
-
...
|
|
106
|
-
children: le(i) ? i(
|
|
104
|
+
scope: c,
|
|
105
|
+
...w,
|
|
106
|
+
children: le(i) ? i(w) : r
|
|
107
107
|
}
|
|
108
108
|
);
|
|
109
109
|
}
|
|
110
|
-
var M = "CheckboxTrigger", q =
|
|
111
|
-
({ __scopeCheckbox: e, onKeyDown:
|
|
110
|
+
var M = "CheckboxTrigger", q = m.forwardRef(
|
|
111
|
+
({ __scopeCheckbox: e, onKeyDown: c, onClick: n, ...r }, o) => {
|
|
112
112
|
const {
|
|
113
113
|
control: t,
|
|
114
114
|
value: l,
|
|
@@ -119,16 +119,16 @@ var M = "CheckboxTrigger", q = h.forwardRef(
|
|
|
119
119
|
setChecked: i,
|
|
120
120
|
hasConsumerStoppedPropagationRef: p,
|
|
121
121
|
isFormControl: x,
|
|
122
|
-
bubbleInput:
|
|
123
|
-
} = N(M, e), C = L(
|
|
124
|
-
return
|
|
125
|
-
const
|
|
126
|
-
if (
|
|
122
|
+
bubbleInput: h
|
|
123
|
+
} = N(M, e), C = L(o, k), g = m.useRef(d);
|
|
124
|
+
return m.useEffect(() => {
|
|
125
|
+
const a = t?.form;
|
|
126
|
+
if (a) {
|
|
127
127
|
const s = () => i(g.current);
|
|
128
|
-
return
|
|
128
|
+
return a.addEventListener("reset", s), () => a.removeEventListener("reset", s);
|
|
129
129
|
}
|
|
130
130
|
}, [t, i]), /* @__PURE__ */ u(
|
|
131
|
-
|
|
131
|
+
R.button,
|
|
132
132
|
{
|
|
133
133
|
type: "button",
|
|
134
134
|
role: "checkbox",
|
|
@@ -138,25 +138,25 @@ var M = "CheckboxTrigger", q = h.forwardRef(
|
|
|
138
138
|
"data-disabled": f ? "" : void 0,
|
|
139
139
|
disabled: f,
|
|
140
140
|
value: l,
|
|
141
|
-
...
|
|
141
|
+
...r,
|
|
142
142
|
ref: C,
|
|
143
|
-
onKeyDown: j(
|
|
144
|
-
|
|
143
|
+
onKeyDown: j(c, (a) => {
|
|
144
|
+
a.key === "Enter" && a.preventDefault();
|
|
145
145
|
}),
|
|
146
|
-
onClick: j(
|
|
147
|
-
i((s) => v(s) ? !0 : !s),
|
|
146
|
+
onClick: j(n, (a) => {
|
|
147
|
+
i((s) => v(s) ? !0 : !s), h && x && (p.current = a.isPropagationStopped(), p.current || a.stopPropagation());
|
|
148
148
|
})
|
|
149
149
|
}
|
|
150
150
|
);
|
|
151
151
|
}
|
|
152
152
|
);
|
|
153
153
|
q.displayName = M;
|
|
154
|
-
var A =
|
|
155
|
-
(e,
|
|
154
|
+
var A = m.forwardRef(
|
|
155
|
+
(e, c) => {
|
|
156
156
|
const {
|
|
157
|
-
__scopeCheckbox:
|
|
158
|
-
name:
|
|
159
|
-
checked:
|
|
157
|
+
__scopeCheckbox: n,
|
|
158
|
+
name: r,
|
|
159
|
+
checked: o,
|
|
160
160
|
defaultChecked: t,
|
|
161
161
|
required: l,
|
|
162
162
|
disabled: f,
|
|
@@ -168,13 +168,13 @@ var A = h.forwardRef(
|
|
|
168
168
|
return /* @__PURE__ */ u(
|
|
169
169
|
ie,
|
|
170
170
|
{
|
|
171
|
-
__scopeCheckbox:
|
|
172
|
-
checked:
|
|
171
|
+
__scopeCheckbox: n,
|
|
172
|
+
checked: o,
|
|
173
173
|
defaultChecked: t,
|
|
174
174
|
disabled: f,
|
|
175
175
|
required: l,
|
|
176
176
|
onCheckedChange: b,
|
|
177
|
-
name:
|
|
177
|
+
name: r,
|
|
178
178
|
form: k,
|
|
179
179
|
value: d,
|
|
180
180
|
internal_do_not_use_render: ({ isFormControl: p }) => /* @__PURE__ */ B(U, { children: [
|
|
@@ -182,14 +182,14 @@ var A = h.forwardRef(
|
|
|
182
182
|
q,
|
|
183
183
|
{
|
|
184
184
|
...i,
|
|
185
|
-
ref:
|
|
186
|
-
__scopeCheckbox:
|
|
185
|
+
ref: c,
|
|
186
|
+
__scopeCheckbox: n
|
|
187
187
|
}
|
|
188
188
|
),
|
|
189
189
|
p && /* @__PURE__ */ u(
|
|
190
190
|
K,
|
|
191
191
|
{
|
|
192
|
-
__scopeCheckbox:
|
|
192
|
+
__scopeCheckbox: n
|
|
193
193
|
}
|
|
194
194
|
)
|
|
195
195
|
] })
|
|
@@ -198,20 +198,20 @@ var A = h.forwardRef(
|
|
|
198
198
|
}
|
|
199
199
|
);
|
|
200
200
|
A.displayName = P;
|
|
201
|
-
var F = "CheckboxIndicator", D =
|
|
202
|
-
(e,
|
|
203
|
-
const { __scopeCheckbox:
|
|
201
|
+
var F = "CheckboxIndicator", D = m.forwardRef(
|
|
202
|
+
(e, c) => {
|
|
203
|
+
const { __scopeCheckbox: n, forceMount: r, ...o } = e, t = N(F, n);
|
|
204
204
|
return /* @__PURE__ */ u(
|
|
205
205
|
ee,
|
|
206
206
|
{
|
|
207
|
-
present:
|
|
207
|
+
present: r || v(t.checked) || t.checked === !0,
|
|
208
208
|
children: /* @__PURE__ */ u(
|
|
209
|
-
|
|
209
|
+
R.span,
|
|
210
210
|
{
|
|
211
211
|
"data-state": W(t.checked),
|
|
212
212
|
"data-disabled": t.disabled ? "" : void 0,
|
|
213
|
-
...
|
|
214
|
-
ref:
|
|
213
|
+
...o,
|
|
214
|
+
ref: c,
|
|
215
215
|
style: { pointerEvents: "none", ...e.style }
|
|
216
216
|
}
|
|
217
217
|
)
|
|
@@ -220,11 +220,11 @@ var F = "CheckboxIndicator", D = h.forwardRef(
|
|
|
220
220
|
}
|
|
221
221
|
);
|
|
222
222
|
D.displayName = F;
|
|
223
|
-
var H = "CheckboxBubbleInput", K =
|
|
224
|
-
({ __scopeCheckbox: e, ...
|
|
223
|
+
var H = "CheckboxBubbleInput", K = m.forwardRef(
|
|
224
|
+
({ __scopeCheckbox: e, ...c }, n) => {
|
|
225
225
|
const {
|
|
226
|
-
control:
|
|
227
|
-
hasConsumerStoppedPropagationRef:
|
|
226
|
+
control: r,
|
|
227
|
+
hasConsumerStoppedPropagationRef: o,
|
|
228
228
|
checked: t,
|
|
229
229
|
defaultChecked: l,
|
|
230
230
|
required: f,
|
|
@@ -234,36 +234,36 @@ var H = "CheckboxBubbleInput", K = h.forwardRef(
|
|
|
234
234
|
form: i,
|
|
235
235
|
bubbleInput: p,
|
|
236
236
|
setBubbleInput: x
|
|
237
|
-
} = N(H, e),
|
|
238
|
-
|
|
237
|
+
} = N(H, e), h = L(n, x), C = Y(t), g = Z(r);
|
|
238
|
+
m.useEffect(() => {
|
|
239
239
|
const s = p;
|
|
240
240
|
if (!s) return;
|
|
241
241
|
const _ = window.HTMLInputElement.prototype, O = Object.getOwnPropertyDescriptor(
|
|
242
242
|
_,
|
|
243
243
|
"checked"
|
|
244
|
-
).set, $ = !
|
|
244
|
+
).set, $ = !o.current;
|
|
245
245
|
if (C !== t && O) {
|
|
246
246
|
const G = new Event("click", { bubbles: $ });
|
|
247
247
|
s.indeterminate = v(t), O.call(s, v(t) ? !1 : t), s.dispatchEvent(G);
|
|
248
248
|
}
|
|
249
|
-
}, [p, C, t,
|
|
250
|
-
const
|
|
249
|
+
}, [p, C, t, o]);
|
|
250
|
+
const a = m.useRef(v(t) ? !1 : t);
|
|
251
251
|
return /* @__PURE__ */ u(
|
|
252
|
-
|
|
252
|
+
R.input,
|
|
253
253
|
{
|
|
254
254
|
type: "checkbox",
|
|
255
255
|
"aria-hidden": !0,
|
|
256
|
-
defaultChecked: l ??
|
|
256
|
+
defaultChecked: l ?? a.current,
|
|
257
257
|
required: f,
|
|
258
258
|
disabled: d,
|
|
259
259
|
name: b,
|
|
260
260
|
value: k,
|
|
261
261
|
form: i,
|
|
262
|
-
...
|
|
262
|
+
...c,
|
|
263
263
|
tabIndex: -1,
|
|
264
|
-
ref:
|
|
264
|
+
ref: h,
|
|
265
265
|
style: {
|
|
266
|
-
...
|
|
266
|
+
...c.style,
|
|
267
267
|
...g,
|
|
268
268
|
position: "absolute",
|
|
269
269
|
pointerEvents: "none",
|
|
@@ -291,10 +291,10 @@ function W(e) {
|
|
|
291
291
|
const de = z(
|
|
292
292
|
({
|
|
293
293
|
ariaLabelledBy: e,
|
|
294
|
-
className:
|
|
295
|
-
defaultChecked:
|
|
296
|
-
disabled:
|
|
297
|
-
id:
|
|
294
|
+
className: c,
|
|
295
|
+
defaultChecked: n,
|
|
296
|
+
disabled: r,
|
|
297
|
+
id: o,
|
|
298
298
|
label: t,
|
|
299
299
|
labelClassName: l,
|
|
300
300
|
name: f,
|
|
@@ -304,44 +304,48 @@ const de = z(
|
|
|
304
304
|
onChange: i,
|
|
305
305
|
...p
|
|
306
306
|
}, x) => {
|
|
307
|
-
const [
|
|
307
|
+
const [h, C] = oe(n ?? !1), g = V(), a = X(
|
|
308
308
|
(s) => {
|
|
309
309
|
C(s), i?.(s);
|
|
310
310
|
},
|
|
311
311
|
[i, C]
|
|
312
312
|
);
|
|
313
|
-
return /* @__PURE__ */ B("div", { className: "flex items-center gap-
|
|
313
|
+
return /* @__PURE__ */ B("div", { className: "flex items-center gap-4", "data-theme": d, children: [
|
|
314
314
|
/* @__PURE__ */ u(
|
|
315
315
|
A,
|
|
316
316
|
{
|
|
317
|
-
id:
|
|
318
|
-
checked:
|
|
317
|
+
id: o ?? g,
|
|
318
|
+
checked: h,
|
|
319
319
|
ref: x,
|
|
320
320
|
name: f,
|
|
321
|
-
disabled:
|
|
321
|
+
disabled: r,
|
|
322
322
|
"aria-labelledby": e,
|
|
323
323
|
title: b,
|
|
324
324
|
className: T(
|
|
325
325
|
te({
|
|
326
|
-
className:
|
|
326
|
+
className: c,
|
|
327
327
|
variant: k,
|
|
328
|
-
checked:
|
|
328
|
+
checked: h
|
|
329
329
|
})
|
|
330
330
|
),
|
|
331
|
-
onCheckedChange:
|
|
331
|
+
onCheckedChange: a,
|
|
332
332
|
...p,
|
|
333
|
-
children: /* @__PURE__ */ u(D, { children: /* @__PURE__ */ u(I, { className: "w-4 h-4 stroke-2
|
|
333
|
+
children: /* @__PURE__ */ u(D, { children: /* @__PURE__ */ u(I, { className: "w-4 h-4 stroke-2" }) })
|
|
334
334
|
}
|
|
335
335
|
),
|
|
336
336
|
t ? /* @__PURE__ */ u(
|
|
337
337
|
"label",
|
|
338
338
|
{
|
|
339
|
-
htmlFor: f ??
|
|
339
|
+
htmlFor: f ?? o,
|
|
340
340
|
className: T(
|
|
341
341
|
re({
|
|
342
342
|
className: l
|
|
343
|
-
})
|
|
343
|
+
}),
|
|
344
|
+
{
|
|
345
|
+
"cursor-not-allowed": r
|
|
346
|
+
}
|
|
344
347
|
),
|
|
348
|
+
onClick: () => !r && a(!h),
|
|
345
349
|
children: t
|
|
346
350
|
}
|
|
347
351
|
) : null
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as
|
|
2
|
-
const
|
|
1
|
+
import { c as e } from "../../index-D29mdTf5.js";
|
|
2
|
+
const t = e(
|
|
3
3
|
[
|
|
4
4
|
"cursor-pointer",
|
|
5
5
|
"border",
|
|
@@ -12,8 +12,7 @@ const e = r(
|
|
|
12
12
|
"transition-all",
|
|
13
13
|
"text-slate-800",
|
|
14
14
|
"border-zinc-400",
|
|
15
|
-
"
|
|
16
|
-
"kubefirst:text-white"
|
|
15
|
+
"disabled:cursor-not-allowed"
|
|
17
16
|
],
|
|
18
17
|
{
|
|
19
18
|
variants: {
|
|
@@ -29,9 +28,31 @@ const e = r(
|
|
|
29
28
|
{
|
|
30
29
|
checked: !0,
|
|
31
30
|
class: [
|
|
31
|
+
"kubefirst:border-kubefirst-primary",
|
|
32
32
|
"kubefirst:bg-kubefirst-primary",
|
|
33
33
|
"bg-aurora-500",
|
|
34
|
-
"border-aurora-500"
|
|
34
|
+
"border-aurora-500",
|
|
35
|
+
"disabled:bg-zinc-300",
|
|
36
|
+
"disabled:border-transparent",
|
|
37
|
+
"*:text-metal-900",
|
|
38
|
+
"kubefirst:*:text-white",
|
|
39
|
+
"disabled:*:text-white",
|
|
40
|
+
"dark:disabled:*:text-metal-900",
|
|
41
|
+
"dark:disabled:bg-aurora-500/45"
|
|
42
|
+
]
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
checked: !1,
|
|
46
|
+
class: [
|
|
47
|
+
"kubefirst:border-kubefirst-primary",
|
|
48
|
+
"kubefirst:text-white",
|
|
49
|
+
"border-zinc-400",
|
|
50
|
+
"disabled:bg-zinc-50",
|
|
51
|
+
"disabled:border-zinc-300",
|
|
52
|
+
"dark:disabled:bg-metal-800",
|
|
53
|
+
"dark:disabled:border-metal-600",
|
|
54
|
+
"dark:border-metal-600",
|
|
55
|
+
"dark:bg-metal-800"
|
|
35
56
|
]
|
|
36
57
|
}
|
|
37
58
|
],
|
|
@@ -39,12 +60,14 @@ const e = r(
|
|
|
39
60
|
variant: "default"
|
|
40
61
|
}
|
|
41
62
|
}
|
|
42
|
-
), a =
|
|
63
|
+
), a = e([
|
|
64
|
+
"select-none",
|
|
43
65
|
"cursor-pointer",
|
|
66
|
+
"text-sm",
|
|
44
67
|
"text-slate-800",
|
|
45
68
|
"dark:text-slate-50"
|
|
46
69
|
]);
|
|
47
70
|
export {
|
|
48
|
-
|
|
71
|
+
t as checkboxVariants,
|
|
49
72
|
a as labelVariants
|
|
50
73
|
};
|
|
@@ -9,7 +9,7 @@ const t = ({
|
|
|
9
9
|
theme: o = "civo",
|
|
10
10
|
children: r
|
|
11
11
|
}) => /* @__PURE__ */ i("div", { className: m(a({ className: e })), "data-theme": o, children: r });
|
|
12
|
-
t.displayName = "
|
|
12
|
+
t.displayName = "KonstructFilter";
|
|
13
13
|
t.BadgeMultiSelect = l;
|
|
14
14
|
t.DateFilterDropdown = p;
|
|
15
15
|
t.ResetButton = s;
|
|
@@ -2,8 +2,8 @@ import { jsxs as t, jsx as e } from "react/jsx-runtime";
|
|
|
2
2
|
import { Badge as o } from "../../../Badge/Badge.js";
|
|
3
3
|
import { Button as m } from "../../../Button/Button.js";
|
|
4
4
|
import { Checkbox as k } from "../../../Checkbox/Checkbox.js";
|
|
5
|
-
import { cn as l } from "../../../../utils/index.js";
|
|
6
5
|
import { filterButtonIconVariants as C, filterButtonVariants as y } from "../../Filter.variants.js";
|
|
6
|
+
import { cn as r } from "../../../../utils/index.js";
|
|
7
7
|
import { useBadgeMultiSelect as N } from "./BadgeMultiSelect.hook.js";
|
|
8
8
|
import { C as B } from "../../../../chevron-down-DgT-uSF9.js";
|
|
9
9
|
const $ = ({
|
|
@@ -14,7 +14,7 @@ const $ = ({
|
|
|
14
14
|
}) => {
|
|
15
15
|
const {
|
|
16
16
|
wrapperRef: h,
|
|
17
|
-
isOpen:
|
|
17
|
+
isOpen: l,
|
|
18
18
|
selectedOptions: u,
|
|
19
19
|
selectedCount: c,
|
|
20
20
|
handleOpen: g,
|
|
@@ -26,8 +26,8 @@ const $ = ({
|
|
|
26
26
|
/* @__PURE__ */ t(
|
|
27
27
|
"button",
|
|
28
28
|
{
|
|
29
|
-
className:
|
|
30
|
-
"text-slate-700 dark:text-metal-50":
|
|
29
|
+
className: r(y(), {
|
|
30
|
+
"text-slate-700 dark:text-metal-50": l
|
|
31
31
|
}),
|
|
32
32
|
onClick: g,
|
|
33
33
|
children: [
|
|
@@ -36,19 +36,18 @@ const $ = ({
|
|
|
36
36
|
/* @__PURE__ */ e(
|
|
37
37
|
B,
|
|
38
38
|
{
|
|
39
|
-
className:
|
|
40
|
-
"rotate-180":
|
|
41
|
-
"text-blue-600 dark:text-aurora-500": r
|
|
39
|
+
className: r(C(), {
|
|
40
|
+
"rotate-180 text-blue-600 dark:text-aurora-500": l
|
|
42
41
|
})
|
|
43
42
|
}
|
|
44
43
|
)
|
|
45
44
|
]
|
|
46
45
|
}
|
|
47
46
|
),
|
|
48
|
-
|
|
47
|
+
l && /* @__PURE__ */ t(
|
|
49
48
|
"div",
|
|
50
49
|
{
|
|
51
|
-
className:
|
|
50
|
+
className: r(
|
|
52
51
|
"absolute",
|
|
53
52
|
"top-full",
|
|
54
53
|
"mt-1",
|
|
@@ -88,7 +87,7 @@ const $ = ({
|
|
|
88
87
|
/* @__PURE__ */ t(
|
|
89
88
|
"div",
|
|
90
89
|
{
|
|
91
|
-
className:
|
|
90
|
+
className: r(
|
|
92
91
|
"flex",
|
|
93
92
|
"justify-center",
|
|
94
93
|
"items-center",
|