@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
|
@@ -16,20 +16,20 @@ const a = r(
|
|
|
16
16
|
"outline-none",
|
|
17
17
|
"h-9",
|
|
18
18
|
"border-gray-200",
|
|
19
|
-
"aria-expanded:border-kubefirst-primary",
|
|
20
|
-
"aria-expanded:text-kubefirst-secondary",
|
|
21
19
|
"focus-visible:bg-zinc-50",
|
|
22
|
-
"
|
|
23
|
-
"
|
|
20
|
+
"aria-expanded:border-aurora-500",
|
|
21
|
+
"aria-expanded:text-aurora-500",
|
|
22
|
+
"kubefirst:aria-expanded:border-kubefirst-primary",
|
|
23
|
+
"kubefirst:aria-expanded:text-kubefirst-secondary"
|
|
24
24
|
],
|
|
25
25
|
{
|
|
26
26
|
variants: {
|
|
27
27
|
hasError: {
|
|
28
28
|
true: [
|
|
29
|
-
"border-red-600",
|
|
30
|
-
"text-red-600",
|
|
31
|
-
"
|
|
32
|
-
"
|
|
29
|
+
"aria-expanded:border-red-600",
|
|
30
|
+
"aria-expanded:text-red-600",
|
|
31
|
+
"kubefirst:border-red-600",
|
|
32
|
+
"kubefirst:text-red-600"
|
|
33
33
|
],
|
|
34
34
|
false: ""
|
|
35
35
|
}
|
|
@@ -5,7 +5,7 @@ import { Checkbox as C } from "../../../Checkbox/Checkbox.js";
|
|
|
5
5
|
import { cn as n } from "../../../../utils/index.js";
|
|
6
6
|
import { filterButtonIconVariants as y, filterButtonVariants as N } from "../../Filter.variants.js";
|
|
7
7
|
import { useBadgeMultiSelect as B } from "./BadgeMultiSelect.hook.js";
|
|
8
|
-
import { C as O } from "../../../../chevron-down-
|
|
8
|
+
import { C as O } from "../../../../chevron-down-BLZPftpV.js";
|
|
9
9
|
const $ = ({
|
|
10
10
|
options: i,
|
|
11
11
|
label: p,
|
|
@@ -5,7 +5,7 @@ import { DatePicker as w } from "../../../Datepicker/DatePicker.js";
|
|
|
5
5
|
import { cn as o } from "../../../../utils/index.js";
|
|
6
6
|
import { filterButtonIconVariants as x, filterButtonVariants as y } from "../../Filter.variants.js";
|
|
7
7
|
import { useDateFilterDropdown as D } from "./DateFilterDropdown.hook.js";
|
|
8
|
-
import { C as N } from "../../../../chevron-down-
|
|
8
|
+
import { C as N } from "../../../../chevron-down-BLZPftpV.js";
|
|
9
9
|
const R = ({
|
|
10
10
|
label: s,
|
|
11
11
|
position: l = "left",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as m, jsx as s } from "react/jsx-runtime";
|
|
2
|
-
import l, { forwardRef as
|
|
2
|
+
import l, { forwardRef as x, useId as _, useRef as I, useState as W } from "react";
|
|
3
3
|
import { cn as u } from "../../utils/index.js";
|
|
4
4
|
import { inputVariants as $ } from "./Input.variants.js";
|
|
5
5
|
import { SearchIcon as L } from "../../assets/icons/components/Search.js";
|
|
@@ -8,37 +8,37 @@ import { P as i } from "../../index-h-Ul0anl.js";
|
|
|
8
8
|
function h() {
|
|
9
9
|
return h = Object.assign || function(t) {
|
|
10
10
|
for (var n = 1; n < arguments.length; n++) {
|
|
11
|
-
var
|
|
12
|
-
for (var e in
|
|
13
|
-
Object.prototype.hasOwnProperty.call(
|
|
11
|
+
var a = arguments[n];
|
|
12
|
+
for (var e in a)
|
|
13
|
+
Object.prototype.hasOwnProperty.call(a, e) && (t[e] = a[e]);
|
|
14
14
|
}
|
|
15
15
|
return t;
|
|
16
16
|
}, h.apply(this, arguments);
|
|
17
17
|
}
|
|
18
18
|
function S(t, n) {
|
|
19
19
|
if (t == null) return {};
|
|
20
|
-
var
|
|
20
|
+
var a = C(t, n), e, r;
|
|
21
21
|
if (Object.getOwnPropertySymbols) {
|
|
22
|
-
var
|
|
23
|
-
for (r = 0; r <
|
|
24
|
-
e =
|
|
22
|
+
var o = Object.getOwnPropertySymbols(t);
|
|
23
|
+
for (r = 0; r < o.length; r++)
|
|
24
|
+
e = o[r], !(n.indexOf(e) >= 0) && Object.prototype.propertyIsEnumerable.call(t, e) && (a[e] = t[e]);
|
|
25
25
|
}
|
|
26
|
-
return
|
|
26
|
+
return a;
|
|
27
27
|
}
|
|
28
28
|
function C(t, n) {
|
|
29
29
|
if (t == null) return {};
|
|
30
|
-
var
|
|
31
|
-
for (
|
|
32
|
-
r = e[
|
|
33
|
-
return
|
|
30
|
+
var a = {}, e = Object.keys(t), r, o;
|
|
31
|
+
for (o = 0; o < e.length; o++)
|
|
32
|
+
r = e[o], !(n.indexOf(r) >= 0) && (a[r] = t[r]);
|
|
33
|
+
return a;
|
|
34
34
|
}
|
|
35
|
-
var
|
|
36
|
-
var
|
|
35
|
+
var v = x(function(t, n) {
|
|
36
|
+
var a = t.color, e = a === void 0 ? "currentColor" : a, r = t.size, o = r === void 0 ? 24 : r, c = S(t, ["color", "size"]);
|
|
37
37
|
return /* @__PURE__ */ l.createElement("svg", h({
|
|
38
38
|
ref: n,
|
|
39
39
|
xmlns: "http://www.w3.org/2000/svg",
|
|
40
|
-
width:
|
|
41
|
-
height:
|
|
40
|
+
width: o,
|
|
41
|
+
height: o,
|
|
42
42
|
viewBox: "0 0 24 24",
|
|
43
43
|
fill: "none",
|
|
44
44
|
stroke: e,
|
|
@@ -54,45 +54,45 @@ var x = g(function(t, n) {
|
|
|
54
54
|
y2: "23"
|
|
55
55
|
}));
|
|
56
56
|
});
|
|
57
|
-
|
|
57
|
+
v.propTypes = {
|
|
58
58
|
color: i.string,
|
|
59
59
|
size: i.oneOfType([i.string, i.number])
|
|
60
60
|
};
|
|
61
|
-
|
|
62
|
-
function
|
|
63
|
-
return
|
|
61
|
+
v.displayName = "EyeOff";
|
|
62
|
+
function g() {
|
|
63
|
+
return g = Object.assign || function(t) {
|
|
64
64
|
for (var n = 1; n < arguments.length; n++) {
|
|
65
|
-
var
|
|
66
|
-
for (var e in
|
|
67
|
-
Object.prototype.hasOwnProperty.call(
|
|
65
|
+
var a = arguments[n];
|
|
66
|
+
for (var e in a)
|
|
67
|
+
Object.prototype.hasOwnProperty.call(a, e) && (t[e] = a[e]);
|
|
68
68
|
}
|
|
69
69
|
return t;
|
|
70
|
-
},
|
|
70
|
+
}, g.apply(this, arguments);
|
|
71
71
|
}
|
|
72
72
|
function M(t, n) {
|
|
73
73
|
if (t == null) return {};
|
|
74
|
-
var
|
|
74
|
+
var a = R(t, n), e, r;
|
|
75
75
|
if (Object.getOwnPropertySymbols) {
|
|
76
|
-
var
|
|
77
|
-
for (r = 0; r <
|
|
78
|
-
e =
|
|
76
|
+
var o = Object.getOwnPropertySymbols(t);
|
|
77
|
+
for (r = 0; r < o.length; r++)
|
|
78
|
+
e = o[r], !(n.indexOf(e) >= 0) && Object.prototype.propertyIsEnumerable.call(t, e) && (a[e] = t[e]);
|
|
79
79
|
}
|
|
80
|
-
return
|
|
80
|
+
return a;
|
|
81
81
|
}
|
|
82
82
|
function R(t, n) {
|
|
83
83
|
if (t == null) return {};
|
|
84
|
-
var
|
|
85
|
-
for (
|
|
86
|
-
r = e[
|
|
87
|
-
return
|
|
84
|
+
var a = {}, e = Object.keys(t), r, o;
|
|
85
|
+
for (o = 0; o < e.length; o++)
|
|
86
|
+
r = e[o], !(n.indexOf(r) >= 0) && (a[r] = t[r]);
|
|
87
|
+
return a;
|
|
88
88
|
}
|
|
89
|
-
var y =
|
|
90
|
-
var
|
|
91
|
-
return /* @__PURE__ */ l.createElement("svg",
|
|
89
|
+
var y = x(function(t, n) {
|
|
90
|
+
var a = t.color, e = a === void 0 ? "currentColor" : a, r = t.size, o = r === void 0 ? 24 : r, c = M(t, ["color", "size"]);
|
|
91
|
+
return /* @__PURE__ */ l.createElement("svg", g({
|
|
92
92
|
ref: n,
|
|
93
93
|
xmlns: "http://www.w3.org/2000/svg",
|
|
94
|
-
width:
|
|
95
|
-
height:
|
|
94
|
+
width: o,
|
|
95
|
+
height: o,
|
|
96
96
|
viewBox: "0 0 24 24",
|
|
97
97
|
fill: "none",
|
|
98
98
|
stroke: e,
|
|
@@ -112,14 +112,14 @@ y.propTypes = {
|
|
|
112
112
|
size: i.oneOfType([i.string, i.number])
|
|
113
113
|
};
|
|
114
114
|
y.displayName = "Eye";
|
|
115
|
-
const A =
|
|
115
|
+
const A = x(
|
|
116
116
|
({
|
|
117
117
|
className: t,
|
|
118
118
|
error: n,
|
|
119
|
-
isRequired:
|
|
119
|
+
isRequired: a = !1,
|
|
120
120
|
isSearch: e = !1,
|
|
121
121
|
label: r,
|
|
122
|
-
labelClassName:
|
|
122
|
+
labelClassName: o,
|
|
123
123
|
name: c,
|
|
124
124
|
theme: O,
|
|
125
125
|
type: f = "text",
|
|
@@ -127,20 +127,20 @@ const A = g(
|
|
|
127
127
|
helperTextClassName: j,
|
|
128
128
|
...k
|
|
129
129
|
}, N) => {
|
|
130
|
-
const b = _(), P = I(f === "password"), [d, E] = W(() => f !== "password"), p = typeof n == "string" && n.length >= 0, z = d ? y :
|
|
130
|
+
const b = _(), P = I(f === "password"), [d, E] = W(() => f !== "password"), p = typeof n == "string" && n.length >= 0, z = d ? y : v;
|
|
131
131
|
return /* @__PURE__ */ m("div", { className: "flex flex-col gap-2 w-full relative", "data-theme": O, children: [
|
|
132
132
|
r ? /* @__PURE__ */ m(
|
|
133
133
|
"label",
|
|
134
134
|
{
|
|
135
135
|
htmlFor: b,
|
|
136
136
|
className: u(
|
|
137
|
-
"cursor-pointer text-slate-500 flex gap-1 text-sm font-medium
|
|
138
|
-
|
|
137
|
+
"cursor-pointer text-slate-500 flex gap-1 text-sm font-medium dark:text-slate-50 kubefirst-dark:text-slate-50",
|
|
138
|
+
o
|
|
139
139
|
),
|
|
140
140
|
children: [
|
|
141
141
|
r,
|
|
142
142
|
" ",
|
|
143
|
-
|
|
143
|
+
a && /* @__PURE__ */ s("span", { className: "text-red-600 text-xs mt-0.5", children: "*" })
|
|
144
144
|
]
|
|
145
145
|
}
|
|
146
146
|
) : null,
|
|
@@ -192,7 +192,7 @@ const A = g(
|
|
|
192
192
|
"span",
|
|
193
193
|
{
|
|
194
194
|
className: u(
|
|
195
|
-
"text-xs text-slate-600
|
|
195
|
+
"text-xs text-slate-600 dark:text-slate-200 kubefirst-dark:text-slate-200",
|
|
196
196
|
j
|
|
197
197
|
),
|
|
198
198
|
children: w
|
|
@@ -19,15 +19,15 @@ const a = r(
|
|
|
19
19
|
"text-sm",
|
|
20
20
|
"w-full",
|
|
21
21
|
"transition-all",
|
|
22
|
-
"data-[error=false]:
|
|
23
|
-
"data-[error=false]:
|
|
24
|
-
"data-[error=false]:focus:ring-kubefirst-primary",
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
22
|
+
"data-[error=false]:dark:focus:ring-aurora-500",
|
|
23
|
+
"data-[error=false]:focus:ring-aurora-500",
|
|
24
|
+
"data-[error=false]:kubefirst:focus:ring-kubefirst-primary",
|
|
25
|
+
"dark:bg-slate-800",
|
|
26
|
+
"dark:border-slate-600",
|
|
27
|
+
"dark:disabled:bg-slate-900",
|
|
28
|
+
"dark:disabled:text-slate-400",
|
|
29
|
+
"dark:text-slate-50",
|
|
30
|
+
"dark:text-white",
|
|
31
31
|
"kubefirst-dark:bg-slate-800",
|
|
32
32
|
"kubefirst-dark:border-slate-600",
|
|
33
33
|
"kubefirst-dark:disabled:bg-slate-900",
|
|
@@ -39,7 +39,7 @@ const a = r(
|
|
|
39
39
|
variants: {
|
|
40
40
|
variant: {
|
|
41
41
|
default: "",
|
|
42
|
-
error: "border-red-600 kubefirst-dark:border-red-500
|
|
42
|
+
error: "border-red-600 kubefirst-dark:border-red-500 dark:border-red-500 dark:border-red-500 pr-8 focus-visible:ring-transparent"
|
|
43
43
|
}
|
|
44
44
|
},
|
|
45
45
|
defaultVariants: {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { cn as c } from "../../utils/index.js";
|
|
3
3
|
import { loadingVariants as i } from "./Loading.variants.js";
|
|
4
|
-
import { c as t } from "../../createLucideIcon-
|
|
4
|
+
import { c as t } from "../../createLucideIcon-DbC6TvM5.js";
|
|
5
5
|
/**
|
|
6
|
-
* @license lucide-react v0.
|
|
6
|
+
* @license lucide-react v0.544.0 - ISC
|
|
7
7
|
*
|
|
8
8
|
* This source code is licensed under the ISC license.
|
|
9
9
|
* See the LICENSE file in the root directory of this source tree.
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { c as t } from "../../index-D29mdTf5.js";
|
|
2
|
-
const
|
|
2
|
+
const a = t([
|
|
3
3
|
"h-8",
|
|
4
4
|
"w-8",
|
|
5
5
|
"animate-spin",
|
|
6
6
|
"text-inherit",
|
|
7
|
-
"text-kubefirst-primary",
|
|
8
|
-
"
|
|
7
|
+
"kubefirst:text-kubefirst-primary",
|
|
8
|
+
"text-aurora-500"
|
|
9
9
|
]);
|
|
10
10
|
export {
|
|
11
|
-
|
|
11
|
+
a as loadingVariants
|
|
12
12
|
};
|
|
@@ -51,10 +51,10 @@ const a = e(
|
|
|
51
51
|
disabled: !1,
|
|
52
52
|
checked: [!0, !1],
|
|
53
53
|
class: [
|
|
54
|
-
"peer-checked:border-kubefirst-primary",
|
|
55
|
-
"peer-checked:before:bg-kubefirst-primary",
|
|
56
|
-
"
|
|
57
|
-
"
|
|
54
|
+
"kubefirst:peer-checked:border-kubefirst-primary",
|
|
55
|
+
"kubefirst:peer-checked:before:bg-kubefirst-primary",
|
|
56
|
+
"peer-checked:border-aurora-500",
|
|
57
|
+
"peer-checked:before:bg-aurora-500"
|
|
58
58
|
]
|
|
59
59
|
},
|
|
60
60
|
{
|
|
@@ -1,112 +1,112 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import * as
|
|
1
|
+
import { jsxs as C, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import * as h from "react";
|
|
3
3
|
import { forwardRef as H, useRef as M, useId as $, useImperativeHandle as j, useEffect as z } from "react";
|
|
4
4
|
import { a as A, c as U, b as q } from "../../index-BfXxHr_2.js";
|
|
5
|
-
import { u as
|
|
5
|
+
import { u as N } from "../../index-DQH6odE9.js";
|
|
6
6
|
import { u as F, a as L } from "../../index-CZnD2QxM.js";
|
|
7
|
-
import { P
|
|
7
|
+
import { P } from "../../index-C9T9HQaa.js";
|
|
8
8
|
import { cn as R } from "../../utils/index.js";
|
|
9
9
|
import { thumbVariants as O, switchVariants as V } from "./Switch.variants.js";
|
|
10
|
-
var b = "Switch", [D, se] = U(b), [W, X] = D(b),
|
|
11
|
-
(
|
|
10
|
+
var b = "Switch", [D, se] = U(b), [W, X] = D(b), y = h.forwardRef(
|
|
11
|
+
(e, l) => {
|
|
12
12
|
const {
|
|
13
|
-
__scopeSwitch:
|
|
13
|
+
__scopeSwitch: t,
|
|
14
14
|
name: s,
|
|
15
15
|
checked: o,
|
|
16
16
|
defaultChecked: d,
|
|
17
17
|
required: u,
|
|
18
|
-
disabled:
|
|
19
|
-
value:
|
|
18
|
+
disabled: r,
|
|
19
|
+
value: c = "on",
|
|
20
20
|
onCheckedChange: m,
|
|
21
|
-
form:
|
|
22
|
-
...
|
|
23
|
-
} =
|
|
21
|
+
form: n,
|
|
22
|
+
...a
|
|
23
|
+
} = e, [p, f] = h.useState(null), w = N(l, (v) => f(v)), x = h.useRef(!1), k = p ? n || !!p.closest("form") : !0, [S, B] = A({
|
|
24
24
|
prop: o,
|
|
25
25
|
defaultProp: d ?? !1,
|
|
26
26
|
onChange: m,
|
|
27
27
|
caller: b
|
|
28
28
|
});
|
|
29
|
-
return /* @__PURE__ */
|
|
30
|
-
/* @__PURE__ */
|
|
31
|
-
|
|
29
|
+
return /* @__PURE__ */ C(W, { scope: t, checked: S, disabled: r, children: [
|
|
30
|
+
/* @__PURE__ */ i(
|
|
31
|
+
P.button,
|
|
32
32
|
{
|
|
33
33
|
type: "button",
|
|
34
34
|
role: "switch",
|
|
35
|
-
"aria-checked":
|
|
35
|
+
"aria-checked": S,
|
|
36
36
|
"aria-required": u,
|
|
37
|
-
"data-state": I(
|
|
38
|
-
"data-disabled":
|
|
39
|
-
disabled:
|
|
40
|
-
value:
|
|
41
|
-
...
|
|
42
|
-
ref:
|
|
43
|
-
onClick: q(
|
|
44
|
-
B((T) => !T), k && (
|
|
37
|
+
"data-state": I(S),
|
|
38
|
+
"data-disabled": r ? "" : void 0,
|
|
39
|
+
disabled: r,
|
|
40
|
+
value: c,
|
|
41
|
+
...a,
|
|
42
|
+
ref: w,
|
|
43
|
+
onClick: q(e.onClick, (v) => {
|
|
44
|
+
B((T) => !T), k && (x.current = v.isPropagationStopped(), x.current || v.stopPropagation());
|
|
45
45
|
})
|
|
46
46
|
}
|
|
47
47
|
),
|
|
48
|
-
k && /* @__PURE__ */
|
|
48
|
+
k && /* @__PURE__ */ i(
|
|
49
49
|
_,
|
|
50
50
|
{
|
|
51
|
-
control:
|
|
52
|
-
bubbles: !
|
|
51
|
+
control: p,
|
|
52
|
+
bubbles: !x.current,
|
|
53
53
|
name: s,
|
|
54
|
-
value:
|
|
55
|
-
checked:
|
|
54
|
+
value: c,
|
|
55
|
+
checked: S,
|
|
56
56
|
required: u,
|
|
57
|
-
disabled:
|
|
58
|
-
form:
|
|
57
|
+
disabled: r,
|
|
58
|
+
form: n,
|
|
59
59
|
style: { transform: "translateX(-100%)" }
|
|
60
60
|
}
|
|
61
61
|
)
|
|
62
62
|
] });
|
|
63
63
|
}
|
|
64
64
|
);
|
|
65
|
-
|
|
66
|
-
var g = "SwitchThumb", E =
|
|
67
|
-
(
|
|
68
|
-
const { __scopeSwitch:
|
|
69
|
-
return /* @__PURE__ */
|
|
70
|
-
|
|
65
|
+
y.displayName = b;
|
|
66
|
+
var g = "SwitchThumb", E = h.forwardRef(
|
|
67
|
+
(e, l) => {
|
|
68
|
+
const { __scopeSwitch: t, ...s } = e, o = X(g, t);
|
|
69
|
+
return /* @__PURE__ */ i(
|
|
70
|
+
P.span,
|
|
71
71
|
{
|
|
72
72
|
"data-state": I(o.checked),
|
|
73
73
|
"data-disabled": o.disabled ? "" : void 0,
|
|
74
74
|
...s,
|
|
75
|
-
ref:
|
|
75
|
+
ref: l
|
|
76
76
|
}
|
|
77
77
|
);
|
|
78
78
|
}
|
|
79
79
|
);
|
|
80
80
|
E.displayName = g;
|
|
81
|
-
var G = "SwitchBubbleInput", _ =
|
|
81
|
+
var G = "SwitchBubbleInput", _ = h.forwardRef(
|
|
82
82
|
({
|
|
83
|
-
__scopeSwitch:
|
|
84
|
-
control:
|
|
85
|
-
checked:
|
|
83
|
+
__scopeSwitch: e,
|
|
84
|
+
control: l,
|
|
85
|
+
checked: t,
|
|
86
86
|
bubbles: s = !0,
|
|
87
87
|
...o
|
|
88
88
|
}, d) => {
|
|
89
|
-
const u =
|
|
90
|
-
return
|
|
91
|
-
const
|
|
92
|
-
if (!
|
|
93
|
-
const
|
|
94
|
-
|
|
89
|
+
const u = h.useRef(null), r = N(u, d), c = F(t), m = L(l);
|
|
90
|
+
return h.useEffect(() => {
|
|
91
|
+
const n = u.current;
|
|
92
|
+
if (!n) return;
|
|
93
|
+
const a = window.HTMLInputElement.prototype, f = Object.getOwnPropertyDescriptor(
|
|
94
|
+
a,
|
|
95
95
|
"checked"
|
|
96
96
|
).set;
|
|
97
|
-
if (
|
|
98
|
-
const
|
|
99
|
-
|
|
97
|
+
if (c !== t && f) {
|
|
98
|
+
const w = new Event("click", { bubbles: s });
|
|
99
|
+
f.call(n, t), n.dispatchEvent(w);
|
|
100
100
|
}
|
|
101
|
-
}, [
|
|
101
|
+
}, [c, t, s]), /* @__PURE__ */ i(
|
|
102
102
|
"input",
|
|
103
103
|
{
|
|
104
104
|
type: "checkbox",
|
|
105
105
|
"aria-hidden": !0,
|
|
106
|
-
defaultChecked:
|
|
106
|
+
defaultChecked: t,
|
|
107
107
|
...o,
|
|
108
108
|
tabIndex: -1,
|
|
109
|
-
ref:
|
|
109
|
+
ref: r,
|
|
110
110
|
style: {
|
|
111
111
|
...o.style,
|
|
112
112
|
...m,
|
|
@@ -120,53 +120,45 @@ var G = "SwitchBubbleInput", _ = p.forwardRef(
|
|
|
120
120
|
}
|
|
121
121
|
);
|
|
122
122
|
_.displayName = G;
|
|
123
|
-
function I(
|
|
124
|
-
return
|
|
123
|
+
function I(e) {
|
|
124
|
+
return e ? "checked" : "unchecked";
|
|
125
125
|
}
|
|
126
|
-
var J =
|
|
126
|
+
var J = y, K = E;
|
|
127
127
|
const ce = H(
|
|
128
128
|
({
|
|
129
|
-
name:
|
|
130
|
-
alignment:
|
|
131
|
-
theme:
|
|
129
|
+
name: e,
|
|
130
|
+
alignment: l = "horizontal",
|
|
131
|
+
theme: t,
|
|
132
132
|
thumbClassName: s,
|
|
133
133
|
className: o,
|
|
134
134
|
label: d,
|
|
135
135
|
defaultChecked: u,
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
136
|
+
value: r,
|
|
137
|
+
helperText: c,
|
|
138
|
+
onChange: m
|
|
139
|
+
}, n) => {
|
|
140
|
+
const a = M(null), p = $(), f = e ? `${p}-${e}` : p;
|
|
141
|
+
return j(n, () => a.current, [a]), z(() => {
|
|
142
|
+
a.current && (a.current.value = `${r}`);
|
|
143
|
+
}, [r]), /* @__PURE__ */ C(
|
|
143
144
|
"div",
|
|
144
145
|
{
|
|
145
146
|
className: R(
|
|
146
147
|
"w-full flex gap-3",
|
|
147
|
-
|
|
148
|
+
l === "vertical" ? "flex-col" : "flex-row"
|
|
148
149
|
),
|
|
149
|
-
"data-theme":
|
|
150
|
+
"data-theme": t,
|
|
150
151
|
children: [
|
|
151
|
-
|
|
152
|
-
"label",
|
|
153
|
-
{
|
|
154
|
-
className: "text-base",
|
|
155
|
-
htmlFor: l,
|
|
156
|
-
style: { paddingRight: 15 },
|
|
157
|
-
children: d
|
|
158
|
-
}
|
|
159
|
-
) : null,
|
|
160
|
-
/* @__PURE__ */ n(
|
|
152
|
+
/* @__PURE__ */ i(
|
|
161
153
|
J,
|
|
162
154
|
{
|
|
163
|
-
id:
|
|
155
|
+
id: f,
|
|
164
156
|
defaultChecked: u,
|
|
165
|
-
checked:
|
|
166
|
-
onCheckedChange: (
|
|
157
|
+
checked: r,
|
|
158
|
+
onCheckedChange: (w) => m?.(w),
|
|
167
159
|
className: R(V({ className: o })),
|
|
168
160
|
"aria-label": d,
|
|
169
|
-
children: /* @__PURE__ */
|
|
161
|
+
children: /* @__PURE__ */ i(
|
|
170
162
|
K,
|
|
171
163
|
{
|
|
172
164
|
className: O({
|
|
@@ -176,11 +168,23 @@ const ce = H(
|
|
|
176
168
|
)
|
|
177
169
|
}
|
|
178
170
|
),
|
|
179
|
-
/* @__PURE__ */
|
|
171
|
+
d ? /* @__PURE__ */ C(
|
|
172
|
+
"label",
|
|
173
|
+
{
|
|
174
|
+
className: "flex flex-col text-slate-800 dark:text-white text-sm",
|
|
175
|
+
htmlFor: f,
|
|
176
|
+
style: { paddingRight: 15 },
|
|
177
|
+
children: [
|
|
178
|
+
d,
|
|
179
|
+
c ? /* @__PURE__ */ i("span", { className: "text-slate-600 dark:text-slate-400 text-xs", children: c }) : null
|
|
180
|
+
]
|
|
181
|
+
}
|
|
182
|
+
) : null,
|
|
183
|
+
/* @__PURE__ */ i(
|
|
180
184
|
"input",
|
|
181
185
|
{
|
|
182
|
-
ref:
|
|
183
|
-
name:
|
|
186
|
+
ref: a,
|
|
187
|
+
name: e,
|
|
184
188
|
type: "text",
|
|
185
189
|
className: "hidden",
|
|
186
190
|
"aria-hidden": "true"
|
|
@@ -1,32 +1,36 @@
|
|
|
1
|
-
import { c as
|
|
2
|
-
const
|
|
3
|
-
"w-[
|
|
4
|
-
"h-[
|
|
1
|
+
import { c as a } from "../../index-D29mdTf5.js";
|
|
2
|
+
const r = a([
|
|
3
|
+
"w-[40px]",
|
|
4
|
+
"h-[20px]",
|
|
5
5
|
"flex",
|
|
6
6
|
"items-center",
|
|
7
7
|
"rounded-full",
|
|
8
8
|
"shadow",
|
|
9
9
|
"focus:shadow-md",
|
|
10
|
-
"data-[state=unchecked]:bg-
|
|
10
|
+
"data-[state=unchecked]:bg-gray-300",
|
|
11
|
+
"dark:data-[state=unchecked]:bg-gray-600",
|
|
11
12
|
"transition-all",
|
|
12
13
|
"delay-10",
|
|
13
14
|
"duration-250",
|
|
14
15
|
"cursor-pointer",
|
|
15
|
-
"bg-
|
|
16
|
-
|
|
16
|
+
"bg-aurora-500",
|
|
17
|
+
"kubefirst:bg-kubefirst-primary"
|
|
18
|
+
]), e = a([
|
|
17
19
|
"block",
|
|
18
|
-
"w-[
|
|
19
|
-
"h-[
|
|
20
|
+
"w-[16px]",
|
|
21
|
+
"h-[16px]",
|
|
20
22
|
"bg-white",
|
|
23
|
+
"dark:bg-gray-400",
|
|
24
|
+
"dark:data-[state=checked]:bg-white",
|
|
21
25
|
"rounded-full",
|
|
22
26
|
"shadow-md",
|
|
23
27
|
"transition-all",
|
|
24
28
|
"translate-x-1",
|
|
25
|
-
"data-[state=checked]:translate-x-5
|
|
29
|
+
"data-[state=checked]:translate-x-5",
|
|
26
30
|
"delay-10",
|
|
27
31
|
"duration-300"
|
|
28
32
|
]);
|
|
29
33
|
export {
|
|
30
|
-
|
|
31
|
-
|
|
34
|
+
r as switchVariants,
|
|
35
|
+
e as thumbVariants
|
|
32
36
|
};
|
|
@@ -3,7 +3,7 @@ import { useId as N, useState as y, useRef as E, useCallback as O, useEffect as
|
|
|
3
3
|
import { cn as m } from "../../../../utils/index.js";
|
|
4
4
|
import { timePickerVariants as L } from "../../TimePicker.variants.js";
|
|
5
5
|
import { WrapperList as j } from "../WrapperList/WrapperList.js";
|
|
6
|
-
import { C as P } from "../../../../chevron-down-
|
|
6
|
+
import { C as P } from "../../../../chevron-down-BLZPftpV.js";
|
|
7
7
|
import { useTimePickerContext as R } from "../../contexts/time-picker.hook.js";
|
|
8
8
|
const V = ({
|
|
9
9
|
name: d,
|