@konstructio/ui 0.1.1-alpha.6 → 0.1.2-alpha.1
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-down-CVce9Mvh.js → chevron-down-BLZPftpV.js} +2 -2
- package/dist/components/Autocomplete/Autocomplete.js +46 -54
- package/dist/components/Autocomplete/Autocomplete.variants.js +29 -48
- package/dist/components/Autocomplete/components/List/List.js +37 -47
- package/dist/components/Autocomplete/components/List/List.variants.js +34 -69
- package/dist/components/Badge/Badge.js +2 -2
- package/dist/components/Button/Button.variants.js +110 -134
- package/dist/components/Checkbox/Checkbox.variants.js +5 -5
- package/dist/components/Datepicker/DatePicker.js +754 -705
- package/dist/components/Dropdown/Dropdown.variants.js +8 -8
- package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.js +1 -1
- package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.js +1 -1
- package/dist/components/Input/Input.js +47 -47
- package/dist/components/Input/Input.variants.js +10 -10
- package/dist/components/Loading/Loading.js +2 -2
- package/dist/components/Loading/Loading.variants.js +4 -4
- package/dist/components/Radio/Radio.variants.js +4 -4
- package/dist/components/Switch/Switch.js +90 -86
- package/dist/components/Switch/Switch.variants.js +16 -12
- package/dist/components/Tabs/Tabs.variants.js +2 -2
- package/dist/components/TimePicker/components/Wrapper/Wrapper.js +1 -1
- package/dist/{createLucideIcon-BpsAkT97.js → createLucideIcon-DbC6TvM5.js} +4 -4
- package/dist/index.d.ts +3 -4
- package/dist/package.json +17 -17
- package/dist/styles.css +1 -1
- package/dist/ui/civo-theme.css +204 -189
- package/dist/ui/kubefirst-theme.css +3 -1
- package/dist/ui/theme.css +2 -2
- package/package.json +17 -17
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { c as o } from "./createLucideIcon-
|
|
1
|
+
import { c as o } from "./createLucideIcon-DbC6TvM5.js";
|
|
2
2
|
/**
|
|
3
|
-
* @license lucide-react v0.
|
|
3
|
+
* @license lucide-react v0.544.0 - ISC
|
|
4
4
|
*
|
|
5
5
|
* This source code is licensed under the ISC license.
|
|
6
6
|
* See the LICENSE file in the root directory of this source tree.
|
|
@@ -1,83 +1,75 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { cn as
|
|
4
|
-
import { labelVariants as
|
|
5
|
-
import { useAutocomplete as
|
|
6
|
-
import { List as
|
|
7
|
-
const
|
|
1
|
+
import { jsxs as N, jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as b, useRef as i, useId as C, useImperativeHandle as R } from "react";
|
|
3
|
+
import { cn as m } from "../../utils/index.js";
|
|
4
|
+
import { labelVariants as A, autocompleteVariants as O } from "./Autocomplete.variants.js";
|
|
5
|
+
import { useAutocomplete as V } from "./hooks/useAutocomplete.js";
|
|
6
|
+
import { List as g } from "./components/List/List.js";
|
|
7
|
+
const j = b(
|
|
8
8
|
({
|
|
9
|
-
autoComplete:
|
|
10
|
-
className:
|
|
11
|
-
label:
|
|
12
|
-
labelClassName:
|
|
13
|
-
name:
|
|
14
|
-
options:
|
|
15
|
-
placeholder:
|
|
16
|
-
placeHolderEmptyValues:
|
|
17
|
-
placeHolderEmptyValuesClassName:
|
|
18
|
-
theme:
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
options: u,
|
|
9
|
+
autoComplete: d = "off",
|
|
10
|
+
className: s,
|
|
11
|
+
label: t,
|
|
12
|
+
labelClassName: p,
|
|
13
|
+
name: r,
|
|
14
|
+
options: c,
|
|
15
|
+
placeholder: u,
|
|
16
|
+
placeHolderEmptyValues: f = "No values...",
|
|
17
|
+
placeHolderEmptyValuesClassName: h,
|
|
18
|
+
theme: v,
|
|
19
|
+
onChange: w
|
|
20
|
+
}, x) => {
|
|
21
|
+
const a = i(null), o = i(null), n = C();
|
|
22
|
+
R(x, () => o.current, [o]);
|
|
23
|
+
const e = V({
|
|
24
|
+
options: c,
|
|
26
25
|
inputRef: o,
|
|
27
|
-
wrapperRef:
|
|
28
|
-
onChange:
|
|
26
|
+
wrapperRef: a,
|
|
27
|
+
onChange: w
|
|
29
28
|
});
|
|
30
|
-
return /* @__PURE__ */
|
|
29
|
+
return /* @__PURE__ */ N(
|
|
31
30
|
"div",
|
|
32
31
|
{
|
|
33
|
-
ref:
|
|
32
|
+
ref: a,
|
|
34
33
|
className: "relative flex flex-col",
|
|
35
|
-
"data-theme":
|
|
34
|
+
"data-theme": v,
|
|
36
35
|
children: [
|
|
37
|
-
|
|
36
|
+
t ? /* @__PURE__ */ l(
|
|
38
37
|
"label",
|
|
39
38
|
{
|
|
40
|
-
htmlFor:
|
|
41
|
-
className:
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
className: d
|
|
39
|
+
htmlFor: r ?? n,
|
|
40
|
+
className: m(
|
|
41
|
+
A({
|
|
42
|
+
className: p
|
|
45
43
|
})
|
|
46
44
|
),
|
|
47
|
-
children:
|
|
45
|
+
children: t
|
|
48
46
|
}
|
|
49
47
|
) : null,
|
|
50
48
|
/* @__PURE__ */ l(
|
|
51
49
|
"input",
|
|
52
50
|
{
|
|
53
51
|
ref: o,
|
|
54
|
-
id: t ??
|
|
52
|
+
id: t ? r ?? n : void 0,
|
|
55
53
|
type: "text",
|
|
56
|
-
name:
|
|
54
|
+
name: r,
|
|
57
55
|
role: "combobox",
|
|
58
|
-
autoComplete:
|
|
59
|
-
className:
|
|
60
|
-
V({
|
|
61
|
-
variant: r,
|
|
62
|
-
className: a
|
|
63
|
-
})
|
|
64
|
-
),
|
|
56
|
+
autoComplete: d,
|
|
57
|
+
className: m(O({ className: s })),
|
|
65
58
|
onChange: e.handleChange,
|
|
66
59
|
value: e.value,
|
|
67
|
-
placeholder:
|
|
60
|
+
placeholder: u,
|
|
68
61
|
"aria-expanded": e.showOptions ? "true" : "false"
|
|
69
62
|
}
|
|
70
63
|
),
|
|
71
64
|
e.showOptions && /* @__PURE__ */ l("div", { className: "absolute z-10 top-full w-full rounded-md mt-1 border shadow-sm border-zinc-200 overflow-hidden", children: /* @__PURE__ */ l(
|
|
72
|
-
|
|
65
|
+
g,
|
|
73
66
|
{
|
|
74
|
-
className:
|
|
67
|
+
className: s,
|
|
75
68
|
inputRef: o,
|
|
76
|
-
wrapperRef:
|
|
69
|
+
wrapperRef: a,
|
|
77
70
|
options: e.newOptions,
|
|
78
|
-
placeholder:
|
|
79
|
-
placeholderClassName:
|
|
80
|
-
variant: r,
|
|
71
|
+
placeholder: f,
|
|
72
|
+
placeholderClassName: h,
|
|
81
73
|
onClick: e.handleSelectValue
|
|
82
74
|
}
|
|
83
75
|
) })
|
|
@@ -86,7 +78,7 @@ const y = C(
|
|
|
86
78
|
);
|
|
87
79
|
}
|
|
88
80
|
);
|
|
89
|
-
|
|
81
|
+
j.displayName = "Autocomplete";
|
|
90
82
|
export {
|
|
91
|
-
|
|
83
|
+
j as Autocomplete
|
|
92
84
|
};
|
|
@@ -1,50 +1,31 @@
|
|
|
1
|
-
import { c as
|
|
2
|
-
const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
defaultVariants: {
|
|
31
|
-
variant: "default"
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
), e = a(
|
|
35
|
-
["pl-1", "mb-2", "text-base", "cursor-pointer"],
|
|
36
|
-
{
|
|
37
|
-
variants: {
|
|
38
|
-
variant: {
|
|
39
|
-
default: ""
|
|
40
|
-
}
|
|
41
|
-
},
|
|
42
|
-
defaultVariants: {
|
|
43
|
-
variant: "default"
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
);
|
|
1
|
+
import { c as r } from "../../index-D29mdTf5.js";
|
|
2
|
+
const e = r([
|
|
3
|
+
"flex",
|
|
4
|
+
"w-full",
|
|
5
|
+
"rounded-md",
|
|
6
|
+
"border",
|
|
7
|
+
"border-zinc-200",
|
|
8
|
+
"bg-transparent",
|
|
9
|
+
"text-zinc-700",
|
|
10
|
+
"transition-colors",
|
|
11
|
+
"placeholder:text-muted-foreground",
|
|
12
|
+
"focus-visible:outline-none",
|
|
13
|
+
"focus-visible:ring-1",
|
|
14
|
+
"focus-visible:ring-ring",
|
|
15
|
+
"disabled:cursor-not-allowed",
|
|
16
|
+
"disabled:opacity-50",
|
|
17
|
+
"shadow-2xs",
|
|
18
|
+
"py-1",
|
|
19
|
+
"px-2",
|
|
20
|
+
"focus:ring-aurora-500",
|
|
21
|
+
"kubefirst:focus:ring-kubefirst-primary"
|
|
22
|
+
]), i = r([
|
|
23
|
+
"pl-1",
|
|
24
|
+
"mb-2",
|
|
25
|
+
"text-base",
|
|
26
|
+
"cursor-pointer"
|
|
27
|
+
]);
|
|
47
28
|
export {
|
|
48
|
-
|
|
49
|
-
|
|
29
|
+
e as autocompleteVariants,
|
|
30
|
+
i as labelVariants
|
|
50
31
|
};
|
|
@@ -1,58 +1,48 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useRef as
|
|
3
|
-
import { cn as
|
|
4
|
-
import { emptyListVariants as
|
|
5
|
-
import { useNavigationUlList as
|
|
6
|
-
const
|
|
7
|
-
className:
|
|
8
|
-
inputRef:
|
|
9
|
-
options:
|
|
10
|
-
placeholder:
|
|
11
|
-
placeholderClassName:
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
onClick: f
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as f } from "react";
|
|
3
|
+
import { cn as r } from "../../../../utils/index.js";
|
|
4
|
+
import { emptyListVariants as p, buttonVariants as u, listItemVariants as b, listVariants as N } from "./List.variants.js";
|
|
5
|
+
import { useNavigationUlList as d } from "../../hooks/useNavigationList.js";
|
|
6
|
+
const y = ({
|
|
7
|
+
className: n,
|
|
8
|
+
inputRef: a,
|
|
9
|
+
options: s,
|
|
10
|
+
placeholder: l,
|
|
11
|
+
placeholderClassName: o,
|
|
12
|
+
wrapperRef: m,
|
|
13
|
+
onClick: c
|
|
15
14
|
}) => {
|
|
16
|
-
const
|
|
17
|
-
return
|
|
15
|
+
const i = f(null);
|
|
16
|
+
return d({ ulRef: i, inputRef: a, wrapperRef: m, options: s }), s.length === 0 ? /* @__PURE__ */ t(
|
|
18
17
|
"span",
|
|
19
18
|
{
|
|
20
|
-
className:
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
className: a
|
|
19
|
+
className: r(
|
|
20
|
+
p({
|
|
21
|
+
className: o
|
|
24
22
|
})
|
|
25
23
|
),
|
|
26
|
-
children:
|
|
24
|
+
children: l
|
|
27
25
|
}
|
|
28
|
-
) : /* @__PURE__ */ r(
|
|
29
|
-
"
|
|
26
|
+
) : /* @__PURE__ */ t("ul", { ref: i, role: "listbox", className: r(N({ className: n })), children: s.map(({ value: e }) => /* @__PURE__ */ t(
|
|
27
|
+
"li",
|
|
30
28
|
{
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
className:
|
|
34
|
-
children:
|
|
35
|
-
"
|
|
29
|
+
role: "option",
|
|
30
|
+
tabIndex: 0,
|
|
31
|
+
className: r(b()),
|
|
32
|
+
children: /* @__PURE__ */ t(
|
|
33
|
+
"button",
|
|
36
34
|
{
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
className:
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
children: l
|
|
48
|
-
}
|
|
49
|
-
)
|
|
50
|
-
},
|
|
51
|
-
l
|
|
52
|
-
))
|
|
53
|
-
}
|
|
54
|
-
);
|
|
35
|
+
type: "button",
|
|
36
|
+
role: "button",
|
|
37
|
+
className: r(u()),
|
|
38
|
+
onClick: () => c(e),
|
|
39
|
+
children: e
|
|
40
|
+
}
|
|
41
|
+
)
|
|
42
|
+
},
|
|
43
|
+
e
|
|
44
|
+
)) });
|
|
55
45
|
};
|
|
56
46
|
export {
|
|
57
|
-
|
|
47
|
+
y as List
|
|
58
48
|
};
|
|
@@ -1,71 +1,36 @@
|
|
|
1
|
-
import { c as
|
|
2
|
-
const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
],
|
|
32
|
-
{
|
|
33
|
-
variants: {
|
|
34
|
-
variant: {
|
|
35
|
-
default: ""
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
defaultVariants: {
|
|
39
|
-
variant: "default"
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
), n = t(
|
|
43
|
-
[
|
|
44
|
-
"cursor-pointer",
|
|
45
|
-
"focus-visible:outline-none",
|
|
46
|
-
"px-3",
|
|
47
|
-
"py-1.5",
|
|
48
|
-
"w-full",
|
|
49
|
-
"text-left",
|
|
50
|
-
"focus:bg-purple-100",
|
|
51
|
-
"hover:bg-purple-100",
|
|
52
|
-
"civo:focus:bg-blue-100",
|
|
53
|
-
"civo:hover:bg-blue-100"
|
|
54
|
-
],
|
|
55
|
-
{
|
|
56
|
-
variants: {
|
|
57
|
-
variant: {
|
|
58
|
-
default: ""
|
|
59
|
-
}
|
|
60
|
-
},
|
|
61
|
-
defaultVariants: {
|
|
62
|
-
variant: "default"
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
);
|
|
1
|
+
import { c as r } from "../../../../index-D29mdTf5.js";
|
|
2
|
+
const o = r([
|
|
3
|
+
"max-h-[250px]",
|
|
4
|
+
"overflow-y-auto",
|
|
5
|
+
"bg-white"
|
|
6
|
+
]), e = r([
|
|
7
|
+
"p-1",
|
|
8
|
+
"text-center",
|
|
9
|
+
"w-full",
|
|
10
|
+
"block",
|
|
11
|
+
"bg-white"
|
|
12
|
+
]), s = r([
|
|
13
|
+
"focus-visible:outline-none",
|
|
14
|
+
"kubefirst:focus:bg-purple-100",
|
|
15
|
+
"kubefirst:hover:bg-purple-100",
|
|
16
|
+
"border-transparent",
|
|
17
|
+
"focus:bg-aurora-50",
|
|
18
|
+
"hover:bg-aurora-50"
|
|
19
|
+
]), u = r([
|
|
20
|
+
"cursor-pointer",
|
|
21
|
+
"focus-visible:outline-none",
|
|
22
|
+
"px-3",
|
|
23
|
+
"py-1.5",
|
|
24
|
+
"w-full",
|
|
25
|
+
"text-left",
|
|
26
|
+
"focus:bg-aurora-50",
|
|
27
|
+
"hover:bg-aurora-50",
|
|
28
|
+
"kubefirst:focus:bg-purple-100",
|
|
29
|
+
"kubefirst:hover:bg-purple-100"
|
|
30
|
+
]);
|
|
66
31
|
export {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
32
|
+
u as buttonVariants,
|
|
33
|
+
e as emptyListVariants,
|
|
34
|
+
s as listItemVariants,
|
|
35
|
+
o as listVariants
|
|
71
36
|
};
|
|
@@ -2,9 +2,9 @@ import { jsxs as l, jsx as s } from "react/jsx-runtime";
|
|
|
2
2
|
import { useRef as f, useState as h, useCallback as g, useEffect as v } from "react";
|
|
3
3
|
import { cn as c } from "../../utils/index.js";
|
|
4
4
|
import { buttonDismissVariants as w, badgeVariants as x } from "./Badge.variants.js";
|
|
5
|
-
import { c as y } from "../../createLucideIcon-
|
|
5
|
+
import { c as y } from "../../createLucideIcon-DbC6TvM5.js";
|
|
6
6
|
/**
|
|
7
|
-
* @license lucide-react v0.
|
|
7
|
+
* @license lucide-react v0.544.0 - ISC
|
|
8
8
|
*
|
|
9
9
|
* This source code is licensed under the ISC license.
|
|
10
10
|
* See the LICENSE file in the root directory of this source tree.
|