@annatarhe/lake-ui 0.0.21 → 0.0.23
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/form/input-field.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { jsxs as r, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { Loader2 as u } from "lucide-react";
|
|
3
3
|
import { cn as s } from "../utils/cn.js";
|
|
4
|
-
function h(
|
|
4
|
+
function h(o) {
|
|
5
5
|
const {
|
|
6
|
-
label:
|
|
7
|
-
loading:
|
|
6
|
+
label: c,
|
|
7
|
+
loading: i = !1,
|
|
8
8
|
value: t,
|
|
9
9
|
onChange: d,
|
|
10
10
|
children: f,
|
|
11
11
|
disabled: a,
|
|
12
12
|
error: l,
|
|
13
|
-
description:
|
|
14
|
-
} =
|
|
13
|
+
description: n
|
|
14
|
+
} = o;
|
|
15
15
|
return /* @__PURE__ */ r("div", { className: "w-full", children: [
|
|
16
16
|
/* @__PURE__ */ r("div", { className: "flex items-center justify-between", children: [
|
|
17
17
|
/* @__PURE__ */ r("div", { className: "flex flex-col", children: [
|
|
@@ -22,10 +22,10 @@ function h(c) {
|
|
|
22
22
|
"text-sm font-medium transition-colors text-gray-700 dark:text-gray-300",
|
|
23
23
|
a && "opacity-60"
|
|
24
24
|
),
|
|
25
|
-
children:
|
|
25
|
+
children: c
|
|
26
26
|
}
|
|
27
27
|
),
|
|
28
|
-
|
|
28
|
+
n && /* @__PURE__ */ e("p", { className: "text-xs mt-0.5 text-gray-500 dark:text-gray-400", children: n })
|
|
29
29
|
] }),
|
|
30
30
|
/* @__PURE__ */ r("div", { className: "flex items-center gap-3", children: [
|
|
31
31
|
/* @__PURE__ */ r(
|
|
@@ -42,12 +42,11 @@ function h(c) {
|
|
|
42
42
|
l && "ring-2 ring-red-400 dark:ring-red-500"
|
|
43
43
|
),
|
|
44
44
|
role: "switch",
|
|
45
|
-
disabled: a ||
|
|
45
|
+
disabled: a || i,
|
|
46
46
|
onClick: () => {
|
|
47
47
|
d(!t);
|
|
48
48
|
},
|
|
49
49
|
"aria-checked": t,
|
|
50
|
-
"aria-label": i,
|
|
51
50
|
children: [
|
|
52
51
|
/* @__PURE__ */ e(
|
|
53
52
|
"span",
|
|
@@ -58,7 +57,7 @@ function h(c) {
|
|
|
58
57
|
)
|
|
59
58
|
}
|
|
60
59
|
),
|
|
61
|
-
|
|
60
|
+
i && /* @__PURE__ */ e("div", { className: "absolute left-0 top-0 z-10 flex h-full w-full items-center justify-center rounded-full bg-slate-300/55 dark:bg-slate-500/55 backdrop-blur-md", children: /* @__PURE__ */ e(u, { className: "h-3 w-3 animate-spin text-white" }) })
|
|
62
61
|
]
|
|
63
62
|
}
|
|
64
63
|
),
|