@konstructio/ui 0.0.12-alpha.2 → 0.0.12-alpha.21

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.
Files changed (93) hide show
  1. package/dist/{Modal-DZUwNzSW.js → Modal-B-E9uaA6.js} +354 -346
  2. package/dist/components/Alert/Alert.js +1 -1
  3. package/dist/components/AlertDialog/AlertDialog.js +1 -1
  4. package/dist/components/AlertDialog/components/AlertDialogTrigger.js +1 -1
  5. package/dist/components/AlertDialog/components/index.js +1 -1
  6. package/dist/components/Autocomplete/Autocomplete.variants.js +0 -1
  7. package/dist/components/Breadcrumb/Breadcrumb.variants.js +18 -15
  8. package/dist/components/Checkbox/Checkbox.js +1 -1
  9. package/dist/components/Command/Command.js +32 -0
  10. package/dist/components/Command/Command.variants.js +97 -0
  11. package/dist/components/Command/components/Command.js +8 -0
  12. package/dist/components/Command/components/CommandEmpty.js +15 -0
  13. package/dist/components/Command/components/CommandGroup.js +19 -0
  14. package/dist/components/Command/components/CommandInput.js +84 -0
  15. package/dist/components/Command/components/CommandItem.js +29 -0
  16. package/dist/components/Command/components/CommandList.js +16 -0
  17. package/dist/components/Command/components/CommandSeparator.js +16 -0
  18. package/dist/components/Command/components/CommandShortcut.js +19 -0
  19. package/dist/components/Command/components/DialogContent.js +31 -0
  20. package/dist/components/Command/components/DialogOverlay.js +19 -0
  21. package/dist/components/Command/components/index.js +20 -0
  22. package/dist/components/Command/contexts/Command.context.js +13 -0
  23. package/dist/components/Command/contexts/Command.provider.js +24 -0
  24. package/dist/components/Command/contexts/index.js +6 -0
  25. package/dist/components/Dropdown/Dropdown.js +6 -6
  26. package/dist/components/Dropdown/Dropdown.variants.js +22 -3
  27. package/dist/components/Dropdown/components/List/List.js +42 -16
  28. package/dist/components/Dropdown/components/List/List.variants.js +7 -5
  29. package/dist/components/Dropdown/components/ListItem/ListItem.js +26 -21
  30. package/dist/components/Dropdown/components/ListItem/ListItem.variants.js +6 -4
  31. package/dist/components/Dropdown/components/Wrapper.js +97 -63
  32. package/dist/components/Dropdown/contexts/dropdown.context.js +1 -1
  33. package/dist/components/Dropdown/contexts/dropdown.provider.js +9 -9
  34. package/dist/components/Input/Input.js +112 -67
  35. package/dist/components/Input/Input.variants.js +5 -6
  36. package/dist/components/Loading/Loading.js +102 -21
  37. package/dist/components/Loading/Loading.variants.js +13 -14
  38. package/dist/components/Modal/Modal.js +3 -3
  39. package/dist/components/Modal/components/Wrapper/Wrapper.js +3 -4
  40. package/dist/components/Modal/components/index.js +1 -1
  41. package/dist/components/NumberInput/NumberInput.js +88 -88
  42. package/dist/components/NumberInput/NumberInput.variants.js +23 -19
  43. package/dist/components/Range/Range.js +1 -1
  44. package/dist/components/Sidebar/Sidebar.variants.js +2 -1
  45. package/dist/components/Sidebar/components/Logo/Logo.variants.js +9 -17
  46. package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.variants.js +2 -2
  47. package/dist/components/Sidebar/components/NavigationOption/NavigationOption.variants.js +6 -5
  48. package/dist/components/Slider/Slider.js +1 -1
  49. package/dist/components/Switch/Switch.js +99 -101
  50. package/dist/components/Switch/Switch.variants.js +4 -4
  51. package/dist/components/Table/Table.js +31 -0
  52. package/dist/components/Table/Table.variants.js +78 -0
  53. package/dist/components/Table/components/Body.js +28 -0
  54. package/dist/components/Table/components/Filter.js +9 -0
  55. package/dist/components/Table/components/Head.js +28 -0
  56. package/dist/components/Table/components/Row.js +34 -0
  57. package/dist/components/Tag/Tag.js +17 -5
  58. package/dist/components/Tag/Tag.variants.js +11 -1
  59. package/dist/components/TagSelect/TagSelect.js +6 -71
  60. package/dist/components/TagSelect/TagSelect.variants.js +29 -50
  61. package/dist/components/TagSelect/components/Item/Item.js +23 -0
  62. package/dist/components/TagSelect/components/Item/Item.variants.js +31 -0
  63. package/dist/components/TagSelect/components/List/List.js +13 -0
  64. package/dist/components/TagSelect/components/List/List.variants.js +37 -0
  65. package/dist/components/TagSelect/components/Wrapper/Wrapper.js +88 -0
  66. package/dist/components/TagSelect/components/index.js +8 -0
  67. package/dist/components/TagSelect/contexts/TagSelect.context.js +19 -0
  68. package/dist/components/TagSelect/contexts/TagSelect.hook.js +11 -0
  69. package/dist/components/TagSelect/contexts/TagSelect.provider.js +69 -0
  70. package/dist/components/TagSelect/contexts/index.js +6 -0
  71. package/dist/components/TagSelect/hooks/useTagSelect.js +22 -27
  72. package/dist/components/TextArea/TextArea.js +28 -22
  73. package/dist/components/TextArea/TextArea.variants.js +0 -1
  74. package/dist/components/Toast/Toast.js +141 -128
  75. package/dist/components/Toast/Toast.variants.js +2 -3
  76. package/dist/components/Typography/Typography.js +23 -22
  77. package/dist/components/Typography/Typography.variants.js +49 -22
  78. package/dist/components/index.js +22 -20
  79. package/dist/{index-C6WtlN_F.js → index-BzaHYXkt.js} +1 -1
  80. package/dist/{index-Z1voPZOH.js → index-CbTU3cnP.js} +1 -1
  81. package/dist/index-CzSBQN5S.js +432 -0
  82. package/dist/index-D7QNmo_D.js +422 -0
  83. package/dist/index-DUA6Y_AE.js +126 -0
  84. package/dist/{index-B33at13_.js → index-D_76wh4w.js} +1 -1
  85. package/dist/index-DyKo5ZJT.js +446 -0
  86. package/dist/index.d.ts +85 -17
  87. package/dist/index.js +18 -16
  88. package/dist/package.json +26 -24
  89. package/dist/styles.css +1 -1
  90. package/dist/utils/index.js +320 -322
  91. package/package.json +26 -24
  92. package/dist/index-3jTPaVvh.js +0 -551
  93. package/dist/index-BTeAm7mx.js +0 -19133
@@ -1,27 +1,11 @@
1
1
  import { c as e } from "../../index-BNmRGtA6.js";
2
- const t = e(
3
- [
4
- "border",
5
- "cursor-pointer",
6
- "duration-250",
7
- "ease-in-out",
8
- "flex",
9
- "items-center",
10
- "justify-between",
11
- "px-3",
12
- "py-1",
13
- "rounded-md",
14
- "transition-all",
15
- "w-full"
16
- ],
2
+ const r = e(
3
+ ["flex", "flex-col", "w-full", "relative", "text-zinc-500"],
17
4
  {
18
5
  variants: {
19
6
  theme: {
20
- colony: ["aria-expanded:border-red-400", "aria-expanded:text-red-400"],
21
- kubefirst: [
22
- "aria-expanded:border-kubefirst-primary",
23
- "aria-expanded:text-kubefirst-secondary"
24
- ],
7
+ colony: "",
8
+ kubefirst: "",
25
9
  civo: ""
26
10
  }
27
11
  },
@@ -29,42 +13,37 @@ const t = e(
29
13
  theme: "kubefirst"
30
14
  }
31
15
  }
32
- ), a = e(
16
+ ), a = e(["my-2", "cursor-pointer"], {
17
+ variants: {
18
+ theme: {
19
+ colony: "",
20
+ kubefirst: "",
21
+ civo: ""
22
+ }
23
+ },
24
+ defaultVariants: {
25
+ theme: "kubefirst"
26
+ }
27
+ }), i = e(
33
28
  [
34
- "absolute",
35
- "bg-white",
36
29
  "border",
37
- "duration-100",
30
+ "cursor-pointer",
31
+ "duration-250",
38
32
  "ease-in-out",
39
33
  "flex",
40
- "flex-col",
41
- "mt-1",
42
- "rounded-md",
43
- "shadow-sm",
44
- "top-full",
34
+ "items-center",
35
+ "justify-between",
36
+ "px-2",
37
+ "py-1",
38
+ "rounded",
45
39
  "transition-all",
46
- "w-full",
47
- "z-10"
40
+ "w-full"
48
41
  ],
49
42
  {
50
43
  variants: {
51
44
  theme: {
52
- colony: ["border-red-400"],
53
- kubefirst: ["border-kubefirst-primary"],
54
- civo: ""
55
- }
56
- },
57
- defaultVariants: {
58
- theme: "kubefirst"
59
- }
60
- }
61
- ), i = e(
62
- ["cursor-pointer", "py-1", "px-2", "last:mb-2", "first:mt-2", "h-full"],
63
- {
64
- variants: {
65
- theme: {
66
- colony: "hover:bg-red-100",
67
- kubefirst: "hover:bg-purple-100",
45
+ colony: "",
46
+ kubefirst: "",
68
47
  civo: ""
69
48
  }
70
49
  },
@@ -74,7 +53,7 @@ const t = e(
74
53
  }
75
54
  );
76
55
  export {
77
- i as tagItemVariants,
78
- a as tagListVariants,
79
- t as tagSelectVariants
56
+ a as labelVariants,
57
+ i as tagSelectVariants,
58
+ r as wrapperVariants
80
59
  };
@@ -0,0 +1,23 @@
1
+ import { jsx as t } from "react/jsx-runtime";
2
+ import { Tag as i } from "../../../Tag/Tag.js";
3
+ import { cn as c } from "../../../../utils/index.js";
4
+ import { wrapperVariants as n } from "./Item.variants.js";
5
+ import { useTagSelect as s } from "../../contexts/TagSelect.hook.js";
6
+ import { useTheme as h } from "../../../../contexts/theme.hook.js";
7
+ const g = ({ option: e, theme: r }) => {
8
+ const { theme: m } = h(), { onSelectTag: o } = s();
9
+ return /* @__PURE__ */ t(
10
+ "li",
11
+ {
12
+ role: "option",
13
+ className: c(
14
+ n({ theme: r ?? m, isSelected: e.isSelected })
15
+ ),
16
+ onClick: () => o(e),
17
+ children: /* @__PURE__ */ t(i, { ...e })
18
+ }
19
+ );
20
+ };
21
+ export {
22
+ g as Item
23
+ };
@@ -0,0 +1,31 @@
1
+ import { c as e } from "../../../../index-BNmRGtA6.js";
2
+ const r = e(
3
+ ["cursor-pointer", "py-1.5", "px-2", "last:pb-2", "first:pt-2", "h-full"],
4
+ {
5
+ variants: {
6
+ theme: {
7
+ colony: "",
8
+ kubefirst: ["hover:bg-purple-100"],
9
+ civo: ""
10
+ },
11
+ isSelected: {
12
+ true: "",
13
+ false: ""
14
+ }
15
+ },
16
+ compoundVariants: [
17
+ {
18
+ theme: "kubefirst",
19
+ isSelected: !0,
20
+ class: ["bg-purple-100"]
21
+ }
22
+ ],
23
+ defaultVariants: {
24
+ theme: "kubefirst",
25
+ isSelected: !1
26
+ }
27
+ }
28
+ );
29
+ export {
30
+ r as wrapperVariants
31
+ };
@@ -0,0 +1,13 @@
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import { cn as i } from "../../../../utils/index.js";
3
+ import { Item as n } from "../Item/Item.js";
4
+ import { wrapperVariants as p } from "./List.variants.js";
5
+ import { useTagSelect as a } from "../../contexts/TagSelect.hook.js";
6
+ import { useTheme as c } from "../../../../contexts/theme.hook.js";
7
+ const d = ({ theme: m }) => {
8
+ const { tags: t } = a(), { theme: s } = c(), o = m ?? s;
9
+ return /* @__PURE__ */ e("ul", { role: "listbox", className: i(p({ theme: o })), children: t.length > 0 ? t.map((r) => /* @__PURE__ */ e(n, { theme: o, option: r }, r.id)) : /* @__PURE__ */ e("span", { className: "text-center text-sm px-4 py-2", children: "There is not options available" }) });
10
+ };
11
+ export {
12
+ d as List
13
+ };
@@ -0,0 +1,37 @@
1
+ import { c as e } from "../../../../index-BNmRGtA6.js";
2
+ const t = e(
3
+ [
4
+ "absolute",
5
+ "bg-white",
6
+ "border",
7
+ "duration-100",
8
+ "flex",
9
+ "flex-col",
10
+ "mt-0.5",
11
+ "rounded",
12
+ "shadow-sm",
13
+ "top-full",
14
+ "transition-all",
15
+ "w-full",
16
+ "z-10",
17
+ "animate-in",
18
+ "fade-in-60",
19
+ "zoom-in-95",
20
+ "overflow-hidden"
21
+ ],
22
+ {
23
+ variants: {
24
+ theme: {
25
+ colony: "",
26
+ kubefirst: "",
27
+ civo: ""
28
+ }
29
+ },
30
+ defaultVariants: {
31
+ theme: "kubefirst"
32
+ }
33
+ }
34
+ );
35
+ export {
36
+ t as wrapperVariants
37
+ };
@@ -0,0 +1,88 @@
1
+ import "../Item/Item.js";
2
+ import { List as w } from "../List/List.js";
3
+ import { jsxs as c, jsx as e } from "react/jsx-runtime";
4
+ import { forwardRef as C, useId as b, useImperativeHandle as S } from "react";
5
+ import { Tag as k } from "../../../Tag/Tag.js";
6
+ import { cn as a } from "../../../../utils/index.js";
7
+ import { useTagSelect as R } from "../../hooks/useTagSelect.js";
8
+ import { labelVariants as I, tagSelectVariants as O, wrapperVariants as V } from "../../TagSelect.variants.js";
9
+ import { X as j } from "../../../../x-DU-Zw-L_.js";
10
+ import { C as y } from "../../../../chevron-up-DgLBQCKD.js";
11
+ import { useTheme as F } from "../../../../contexts/theme.hook.js";
12
+ import { useTagSelect as H } from "../../contexts/TagSelect.hook.js";
13
+ const J = C(
14
+ ({
15
+ label: n,
16
+ labelClassName: p,
17
+ name: s,
18
+ placeholder: h = "Select a value...",
19
+ theme: d,
20
+ wrapperClassName: f
21
+ }, u) => {
22
+ const l = b(), { theme: x } = F(), { selectedTags: m, isOpen: o, onOpen: N, onRemoveTag: v, inputRef: i } = H(), { wrapperRef: T, handleOpen: g } = R(), t = d ?? x;
23
+ return S(u, () => i.current, [i]), /* @__PURE__ */ c(
24
+ "div",
25
+ {
26
+ ref: T,
27
+ className: a(
28
+ V({
29
+ theme: t,
30
+ className: f
31
+ })
32
+ ),
33
+ children: [
34
+ n ? /* @__PURE__ */ e(
35
+ "label",
36
+ {
37
+ htmlFor: s ?? l,
38
+ className: a(
39
+ I({
40
+ theme: t,
41
+ className: p
42
+ })
43
+ ),
44
+ onClick: () => N(!0),
45
+ children: n
46
+ }
47
+ ) : null,
48
+ /* @__PURE__ */ c(
49
+ "div",
50
+ {
51
+ id: s ?? l,
52
+ className: a(O({ theme: t })),
53
+ role: "combobox",
54
+ onClick: g,
55
+ "aria-expanded": o,
56
+ children: [
57
+ m.length === 0 ? /* @__PURE__ */ e("span", { className: "text-base text-inherit select-none", children: h }) : /* @__PURE__ */ e("div", { className: "flex flex-wrap gap-1.5", children: m.map((r) => /* @__PURE__ */ e(
58
+ k,
59
+ {
60
+ ...r,
61
+ className: "select-none",
62
+ rightIcon: /* @__PURE__ */ e(j, { className: "w-3 h-3", onClick: () => v(r) }),
63
+ "data-value": r.label
64
+ },
65
+ r.id
66
+ )) }),
67
+ /* @__PURE__ */ e(
68
+ y,
69
+ {
70
+ className: a(
71
+ "w-4 h-4 text-inherit transition-all duration-50 shrink-0",
72
+ o ? "rotate-0" : "rotate-180"
73
+ )
74
+ }
75
+ )
76
+ ]
77
+ }
78
+ ),
79
+ /* @__PURE__ */ e("input", { ref: i, type: "text", name: s, className: "hidden" }),
80
+ o ? /* @__PURE__ */ e(w, { theme: t }) : null
81
+ ]
82
+ }
83
+ );
84
+ }
85
+ );
86
+ export {
87
+ J as Wrapper
88
+ };
@@ -0,0 +1,8 @@
1
+ import { Item as e } from "./Item/Item.js";
2
+ import { List as t } from "./List/List.js";
3
+ import { Wrapper as f } from "./Wrapper/Wrapper.js";
4
+ export {
5
+ e as Item,
6
+ t as List,
7
+ f as Wrapper
8
+ };
@@ -0,0 +1,19 @@
1
+ import { createContext as e } from "react";
2
+ const t = {
3
+ tags: [],
4
+ selectedTags: [],
5
+ isOpen: !1,
6
+ inputRef: null,
7
+ onSelectTag() {
8
+ throw new Error("Function not implemented.");
9
+ },
10
+ onRemoveTag() {
11
+ throw new Error("Function not implemented.");
12
+ },
13
+ onOpen() {
14
+ throw new Error("Function not implemented.");
15
+ }
16
+ }, o = e(t);
17
+ export {
18
+ o as TagSelectContext
19
+ };
@@ -0,0 +1,11 @@
1
+ import { useContext as t } from "react";
2
+ import { TagSelectContext as o } from "./TagSelect.context.js";
3
+ const c = () => {
4
+ const e = t(o);
5
+ if (!e)
6
+ throw new Error("useTagSelect must be used within a TagSelectProvider");
7
+ return e;
8
+ };
9
+ export {
10
+ c as useTagSelect
11
+ };
@@ -0,0 +1,69 @@
1
+ import { jsx as I } from "react/jsx-runtime";
2
+ import { useRef as R, useState as T, useCallback as l } from "react";
3
+ import { TagSelectContext as x } from "./TagSelect.context.js";
4
+ import { useToggle as w } from "../../../hooks/useToggle.js";
5
+ const k = ({
6
+ children: m,
7
+ defaultOptions: n = [],
8
+ multiselect: d = !0
9
+ }) => {
10
+ const i = R(null), [p, a] = w(!1), [S, g] = T(n), [r, u] = T([]), o = l((t) => {
11
+ if (i.current) {
12
+ const s = t.map(({ id: c, label: e }) => ({
13
+ id: c,
14
+ value: e
15
+ }));
16
+ i.current.value = JSON.stringify(s);
17
+ }
18
+ }, []), f = l(
19
+ (t) => {
20
+ const s = [...d ? r : [], t];
21
+ u(s);
22
+ const c = s.map((e) => e.id);
23
+ g(() => d ? n.filter(
24
+ (e) => !c.includes(e.id)
25
+ ) : n.map((e) => ({
26
+ ...e,
27
+ isSelected: c.includes(e.id)
28
+ }))), o(s), a(!1);
29
+ },
30
+ [
31
+ n,
32
+ o,
33
+ d,
34
+ r,
35
+ a
36
+ ]
37
+ ), v = l(
38
+ (t) => {
39
+ const s = r.filter((e) => e.id !== t.id);
40
+ u(s);
41
+ const c = s.map((e) => e.id);
42
+ g(
43
+ () => n.filter((e) => !c.includes(e.id))
44
+ ), o(s);
45
+ },
46
+ [n, o, r]
47
+ ), h = l(
48
+ (t) => a(t),
49
+ [a]
50
+ );
51
+ return /* @__PURE__ */ I(
52
+ x.Provider,
53
+ {
54
+ value: {
55
+ tags: S,
56
+ selectedTags: r,
57
+ isOpen: p,
58
+ inputRef: i,
59
+ onSelectTag: f,
60
+ onRemoveTag: v,
61
+ onOpen: h
62
+ },
63
+ children: m
64
+ }
65
+ );
66
+ };
67
+ export {
68
+ k as TagSelectProvider
69
+ };
@@ -0,0 +1,6 @@
1
+ import { useTagSelect as o } from "./TagSelect.hook.js";
2
+ import { TagSelectProvider as a } from "./TagSelect.provider.js";
3
+ export {
4
+ a as TagSelectProvider,
5
+ o as useTagSelect
6
+ };
@@ -1,39 +1,34 @@
1
- import { useRef as b, useState as o, useEffect as k, useCallback as a } from "react";
2
- import { useToggle as w } from "../../../hooks/useToggle.js";
3
- const C = () => {
4
- const t = b(null), [r, e] = w(!1), [c, d] = o(null), [u, i] = o("");
5
- k(() => {
6
- const n = new AbortController(), p = (s) => {
1
+ import { useRef as c, useEffect as u, useCallback as i } from "react";
2
+ import { useTagSelect as d } from "../contexts/TagSelect.hook.js";
3
+ const g = () => {
4
+ const a = c(null), { onOpen: e } = d();
5
+ u(() => {
6
+ const t = new AbortController(), n = (s) => {
7
7
  s.key === "Escape" && e(!1);
8
- }, m = (s) => {
9
- var l;
10
- (l = t.current) != null && l.contains(s.target) || e(!1);
8
+ }, o = (s) => {
9
+ var r;
10
+ (r = a.current) != null && r.contains(s.target) || e(!1);
11
11
  };
12
- return document.addEventListener("keydown", p, {
13
- signal: n.signal
14
- }), document.addEventListener("mousedown", m, {
15
- signal: n.signal
12
+ return document.addEventListener("keydown", n, {
13
+ signal: t.signal
14
+ }), document.addEventListener("mousedown", o, {
15
+ signal: t.signal
16
16
  }), () => {
17
- n.abort();
17
+ t.abort();
18
18
  };
19
- }, [e, t]);
20
- const f = a(() => {
21
- e();
22
- }, [e]), g = a(
23
- (n) => {
24
- d(n), e(!1), i(n.label);
19
+ }, [e, a]);
20
+ const l = i(
21
+ (t) => {
22
+ const n = t.target;
23
+ (n == null ? void 0 : n.closest("[data-value]")) || e(!0);
25
24
  },
26
25
  [e]
27
26
  );
28
27
  return {
29
- isOpen: r,
30
- selectedTag: c,
31
- value: u,
32
- wrapperRef: t,
33
- handleClickTag: g,
34
- handleOpenDropdown: f
28
+ wrapperRef: a,
29
+ handleOpen: l
35
30
  };
36
31
  };
37
32
  export {
38
- C as useTagSelect
33
+ g as useTagSelect
39
34
  };
@@ -1,33 +1,39 @@
1
- import { jsxs as h, jsx as a } from "react/jsx-runtime";
2
- import { forwardRef as v, useId as N, useState as T, useCallback as j } from "react";
3
- import { cn as A } from "../../utils/index.js";
4
- import { textAreaVariants as I } from "./TextArea.variants.js";
5
- import { useTheme as V } from "../../contexts/theme.hook.js";
6
- const S = v(
7
- ({ initialValue: m, label: t, name: o, placeholder: l, rows: c = 3, theme: i, onChange: e }, u) => {
8
- const r = N(), { theme: d } = V(), s = o ? `${r}-name` : r, [f, n] = T(m ?? ""), x = j(
9
- (p) => {
10
- n(p.target.value), e == null || e();
11
- },
12
- [e]
13
- );
14
- return /* @__PURE__ */ h("div", { className: "flex flex-col gap-2", children: [
15
- t ? /* @__PURE__ */ a("label", { htmlFor: s, className: "cursor-pointer", children: t }) : null,
16
- /* @__PURE__ */ a(
1
+ import { jsxs as d, jsx as o } from "react/jsx-runtime";
2
+ import { forwardRef as h, useId as u } from "react";
3
+ import { cn as p } from "../../utils/index.js";
4
+ import { textAreaVariants as v } from "./TextArea.variants.js";
5
+ import { useTheme as N } from "../../contexts/theme.hook.js";
6
+ const w = h(
7
+ ({
8
+ initialValue: a,
9
+ label: e,
10
+ name: s,
11
+ placeholder: l,
12
+ rows: c = 3,
13
+ theme: n,
14
+ className: i,
15
+ ...r
16
+ }, f) => {
17
+ const t = u(), { theme: x } = N(), m = s ? `${t}-name` : t;
18
+ return /* @__PURE__ */ d("div", { className: "flex flex-col gap-2", children: [
19
+ e ? /* @__PURE__ */ o("label", { htmlFor: m, className: "cursor-pointer", children: e }) : null,
20
+ /* @__PURE__ */ o(
17
21
  "textarea",
18
22
  {
19
- id: s,
20
- ref: u,
21
- className: A(I({ theme: i ?? d })),
23
+ id: m,
24
+ ref: f,
25
+ className: p(
26
+ v({ className: i, theme: n ?? x })
27
+ ),
22
28
  rows: c,
23
29
  placeholder: l,
24
- value: f,
25
- onChange: x
30
+ value: a ?? r.value,
31
+ ...r
26
32
  }
27
33
  )
28
34
  ] });
29
35
  }
30
36
  );
31
37
  export {
32
- S as TextArea
38
+ w as TextArea
33
39
  };
@@ -13,7 +13,6 @@ const i = e(
13
13
  "resize-none",
14
14
  "rounded-md",
15
15
  "shadow-sm",
16
- "text-base",
17
16
  "w-full"
18
17
  ],
19
18
  {