@oneplatformdev/ui 0.0.1-beta.67 → 0.0.1-beta.68

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 (39) hide show
  1. package/Alert/Alert.mjs +7 -6
  2. package/AreaChart/AreaChart.mjs +5 -4
  3. package/Badge/Badge.mjs +7 -6
  4. package/Calendar/Calendar.mjs +1 -0
  5. package/Checkbox/Checkbox.d.ts +1 -1
  6. package/Checkbox/Checkbox.types.d.ts +3 -3
  7. package/Command/Command.mjs +3 -2
  8. package/DataTable/DataTable.mjs +16 -15
  9. package/Dropzone/Dropzone.mjs +1 -1
  10. package/Dropzone/DropzoneFilePreview.mjs +1 -1
  11. package/Dropzone/index.mjs +1 -1
  12. package/{DropzoneFilePreview-Dhtv8F4u.js → DropzoneFilePreview-C-SoCoO0.js} +16 -15
  13. package/Form/Form.mjs +5 -4
  14. package/Form/FormRenderControl.mjs +7 -6
  15. package/FormCheckbox/FormCheckbox.mjs +10 -9
  16. package/FormCombobox/FormCombobox.mjs +13 -12
  17. package/FormDatePicker/FormDatePicker.mjs +7 -6
  18. package/FormDropzone/FormDropzone.mjs +7 -6
  19. package/FormInput/FormInput.mjs +7 -6
  20. package/FormRadio/FormRadio.mjs +11 -10
  21. package/FormSelect/FormSelect.mjs +6 -5
  22. package/FormTextarea/FormTextarea.mjs +10 -9
  23. package/Header/Header.mjs +7 -6
  24. package/Label/Label.mjs +7 -6
  25. package/LoadingMask/LoadingMask.mjs +7 -6
  26. package/LoadingProgress/LoadingProgress.mjs +3 -2
  27. package/Radio/Radio.mjs +8 -7
  28. package/Skeleton/Skeleton.mjs +9 -8
  29. package/TablePagination/TablePagination.mjs +9 -8
  30. package/Textarea/Textarea.mjs +5 -72
  31. package/Textarea/index.mjs +2 -2
  32. package/Textarea/useAutosizeTextArea.mjs +65 -18
  33. package/Textarea-D1CCXy7E.js +149 -0
  34. package/Theme/ThemeProvider.mjs +14 -13
  35. package/Toast/Toast.mjs +3 -2
  36. package/ToggleGroup/ToggleGroup.mjs +7 -6
  37. package/Tooltip/Tooltip.mjs +3 -2
  38. package/index.mjs +2 -2
  39. package/package.json +1 -1
@@ -1,27 +1,28 @@
1
1
  import { jsx as r } from "react/jsx-runtime";
2
- import { FormControl as p } from "../Form/Form.mjs";
3
- import { FormRenderControl as i } from "../Form/FormRenderControl.mjs";
4
- import { Textarea as s } from "../Textarea/Textarea.mjs";
5
- const F = (e) => {
6
- const { form: t, label: m, name: n, containerProps: a, ...l } = e;
2
+ import { FormControl as i } from "../Form/Form.mjs";
3
+ import { FormRenderControl as l } from "../Form/FormRenderControl.mjs";
4
+ import "react-hook-form";
5
+ import { T as s } from "../Textarea-D1CCXy7E.js";
6
+ const T = (e) => {
7
+ const { form: t, label: m, name: n, containerProps: a, ...p } = e;
7
8
  return /* @__PURE__ */ r(
8
- i,
9
+ l,
9
10
  {
10
11
  form: t,
11
12
  name: n,
12
13
  label: m,
13
14
  containerProps: a,
14
- render: ({ field: o }) => /* @__PURE__ */ r(p, { children: /* @__PURE__ */ r(
15
+ render: ({ field: o }) => /* @__PURE__ */ r(i, { children: /* @__PURE__ */ r(
15
16
  s,
16
17
  {
17
18
  ...o,
18
19
  value: o.value || "",
19
- ...l
20
+ ...p
20
21
  }
21
22
  ) })
22
23
  }
23
24
  );
24
25
  };
25
26
  export {
26
- F as FormTextarea
27
+ T as FormTextarea
27
28
  };
package/Header/Header.mjs CHANGED
@@ -1,18 +1,19 @@
1
1
  import { jsxs as i, jsx as e } from "react/jsx-runtime";
2
- import { SidebarTrigger as t } from "../Sidebar/Sidebar.mjs";
2
+ import "react";
3
+ import { SidebarTrigger as s } from "../Sidebar/Sidebar.mjs";
3
4
  import { Separator as l } from "../Separator/Separator.mjs";
4
- const m = (s) => {
5
+ const h = (t) => {
5
6
  const {
6
7
  children: r,
7
8
  hideTrigger: a = !1
8
- } = s;
9
+ } = t;
9
10
  return /* @__PURE__ */ i(
10
11
  "header",
11
12
  {
12
13
  className: "flex h-16 shrink-0 items-center justify-between gap-2 transition-[width,height] ease-linear group-has-[[data-collapsible=icon]]/sidebar-wrapper:h-12",
13
14
  children: [
14
15
  !a && /* @__PURE__ */ i("div", { className: "flex items-center gap-2", children: [
15
- /* @__PURE__ */ e(t, { className: "ml-1" }),
16
+ /* @__PURE__ */ e(s, { className: "ml-1" }),
16
17
  /* @__PURE__ */ e(l, { orientation: "vertical", className: "mr-2 h-4" })
17
18
  ] }),
18
19
  a ? r : /* @__PURE__ */ e("div", { className: "flex-1 text-right pr-6", children: r })
@@ -21,6 +22,6 @@ const m = (s) => {
21
22
  );
22
23
  };
23
24
  export {
24
- m as Header,
25
- m as default
25
+ h as Header,
26
+ h as default
26
27
  };
package/Label/Label.mjs CHANGED
@@ -1,17 +1,18 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
2
  import * as i from "react";
3
3
  import * as o from "@radix-ui/react-label";
4
+ import "class-variance-authority";
4
5
  import { cn as e } from "@oneplatformdev/utils";
5
- import { labelVariants as s } from "./labelVariants.mjs";
6
- const p = i.forwardRef(({ className: a, ...r }, m) => /* @__PURE__ */ t(
6
+ import { labelVariants as p } from "./labelVariants.mjs";
7
+ const s = i.forwardRef(({ className: r, ...a }, m) => /* @__PURE__ */ t(
7
8
  o.Root,
8
9
  {
9
10
  ref: m,
10
- className: e(s(), a),
11
- ...r
11
+ className: e(p(), r),
12
+ ...a
12
13
  }
13
14
  ));
14
- p.displayName = o.Root.displayName;
15
+ s.displayName = o.Root.displayName;
15
16
  export {
16
- p as Label
17
+ s as Label
17
18
  };
@@ -1,13 +1,14 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
+ import "react";
2
3
  import { RenderLoadingMask as r } from "./RenderLoadingMask.mjs";
3
- import { cn as o } from "@oneplatformdev/utils";
4
- const f = (t) => {
5
- const { fullWidth: s = !1, className: i, ...n } = t;
4
+ import { cn as n } from "@oneplatformdev/utils";
5
+ const l = (t) => {
6
+ const { fullWidth: s = !1, className: i, ...o } = t;
6
7
  return s ? /* @__PURE__ */ e(
7
8
  "div",
8
9
  {
9
- ...n,
10
- className: o(
10
+ ...o,
11
+ className: n(
11
12
  "absolute inset-0",
12
13
  "flex items-center justify-center",
13
14
  i
@@ -17,5 +18,5 @@ const f = (t) => {
17
18
  ) : /* @__PURE__ */ e(r, {});
18
19
  };
19
20
  export {
20
- f as LoadingMask
21
+ l as LoadingMask
21
22
  };
@@ -1,7 +1,8 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
+ import "react";
2
3
  import { cn as r } from "@oneplatformdev/utils";
3
4
  import { loadingProgressVariants as a } from "./loadingProgressVariants.mjs";
4
- const f = (e) => {
5
+ const h = (e) => {
5
6
  const { className: s, fullWidth: t = !1, size: i, color: l, wrapClassName: n } = e;
6
7
  return /* @__PURE__ */ o(
7
8
  "div",
@@ -33,5 +34,5 @@ const f = (e) => {
33
34
  );
34
35
  };
35
36
  export {
36
- f as LoadingProgress
37
+ h as LoadingProgress
37
38
  };
package/Radio/Radio.mjs CHANGED
@@ -1,12 +1,13 @@
1
1
  import { jsx as a } from "react/jsx-runtime";
2
- import { RadioGroup as c, RadioGroupLabel as u } from "../RadioGroup/RadioGroup.mjs";
3
- const l = (e) => {
4
- const { options: f = [], renderOption: r, ...s } = e;
5
- return /* @__PURE__ */ a(c, { ...s, children: f.map((t) => {
6
- const o = /* @__PURE__ */ a(u, { ...t }, t.value);
7
- return !r || typeof r != "function" || !(r != null && r(t, u)) ? o : r == null ? void 0 : r(t, u);
2
+ import "react";
3
+ import { RadioGroup as s, RadioGroupLabel as o } from "../RadioGroup/RadioGroup.mjs";
4
+ const R = (e) => {
5
+ const { options: f = [], renderOption: r, ...m } = e;
6
+ return /* @__PURE__ */ a(s, { ...m, children: f.map((t) => {
7
+ const u = /* @__PURE__ */ a(o, { ...t }, t.value);
8
+ return !r || typeof r != "function" || !(r != null && r(t, o)) ? u : r == null ? void 0 : r(t, o);
8
9
  }) });
9
10
  };
10
11
  export {
11
- l as Radio
12
+ R as Radio
12
13
  };
@@ -1,17 +1,18 @@
1
- import { jsx as m } from "react/jsx-runtime";
2
- import { cn as o } from "@oneplatformdev/utils";
3
- function i({
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import { cn as e } from "@oneplatformdev/utils";
3
+ import "react";
4
+ function p({
4
5
  className: r,
5
- ...e
6
+ ...m
6
7
  }) {
7
- return /* @__PURE__ */ m(
8
+ return /* @__PURE__ */ o(
8
9
  "div",
9
10
  {
10
- className: o("animate-pulse rounded-md bg-primary/10", r),
11
- ...e
11
+ className: e("animate-pulse rounded-md bg-primary/10", r),
12
+ ...m
12
13
  }
13
14
  );
14
15
  }
15
16
  export {
16
- i as Skeleton
17
+ p as Skeleton
17
18
  };
@@ -1,9 +1,10 @@
1
- import { jsxs as c, jsx as n } from "react/jsx-runtime";
1
+ import { jsxs as r, jsx as n } from "react/jsx-runtime";
2
2
  import { Button as i } from "../Button/Button.mjs";
3
3
  import "../Button/buttonVariants.mjs";
4
4
  import "../Select/SelectRoot.mjs";
5
5
  import { Select as P } from "../Select/Select.mjs";
6
- const y = ({
6
+ import "react";
7
+ const z = ({
7
8
  offset: l,
8
9
  limit: a,
9
10
  totalRows: s,
@@ -15,7 +16,7 @@ const y = ({
15
16
  tNext: v = "Next",
16
17
  tOf: h = "Of"
17
18
  }) => {
18
- const r = Math.ceil(l / a) + 1, o = Math.ceil(s / a), m = r === o, b = (e) => {
19
+ const c = Math.ceil(l / a) + 1, o = Math.ceil(s / a), m = c === o, b = (e) => {
19
20
  t(0), p(parseInt(e));
20
21
  }, g = () => {
21
22
  let e = l - a;
@@ -24,8 +25,8 @@ const y = ({
24
25
  let e = l + a;
25
26
  e > s && (e = s - a), t(e);
26
27
  };
27
- return /* @__PURE__ */ c("div", { className: "flex items-center justify-end space-x-2 py-4", children: [
28
- /* @__PURE__ */ c("div", { className: "flex items-center space-x-2", children: [
28
+ return /* @__PURE__ */ r("div", { className: "flex items-center justify-end space-x-2 py-4", children: [
29
+ /* @__PURE__ */ r("div", { className: "flex items-center space-x-2", children: [
29
30
  /* @__PURE__ */ n("span", { className: "text-sm text-nowrap", children: d }),
30
31
  /* @__PURE__ */ n(
31
32
  P,
@@ -44,7 +45,7 @@ const y = ({
44
45
  }
45
46
  )
46
47
  ] }),
47
- /* @__PURE__ */ c("div", { className: "space-x-2", children: [
48
+ /* @__PURE__ */ r("div", { className: "space-x-2", children: [
48
49
  /* @__PURE__ */ n(
49
50
  i,
50
51
  {
@@ -55,7 +56,7 @@ const y = ({
55
56
  children: u
56
57
  }
57
58
  ),
58
- /* @__PURE__ */ n("span", { className: "text-sm", children: `${x} ${r} ${h} ${o}` }),
59
+ /* @__PURE__ */ n("span", { className: "text-sm", children: `${x} ${c} ${h} ${o}` }),
59
60
  /* @__PURE__ */ n(
60
61
  i,
61
62
  {
@@ -70,5 +71,5 @@ const y = ({
70
71
  ] });
71
72
  };
72
73
  export {
73
- y as TablePagination
74
+ z as TablePagination
74
75
  };
@@ -1,74 +1,7 @@
1
- import { jsxs as u, Fragment as h, jsx as p } from "react/jsx-runtime";
2
- import * as v from "react";
3
- import { useId as w, useRef as z, useState as A, useImperativeHandle as N, useEffect as y } from "react";
4
- import { cn as d } from "@oneplatformdev/utils";
5
- import { useAutosizeTextArea as S } from "./useAutosizeTextArea.mjs";
6
- const T = v.forwardRef(
7
- (m, c) => {
8
- const {
9
- className: f,
10
- value: r = "",
11
- maxHeight: i = Number.MAX_SAFE_INTEGER,
12
- minHeight: o = 0,
13
- resizeble: g = !0,
14
- counter: s = !1,
15
- id: n = "",
16
- ...e
17
- } = m, a = w(), t = z(null), [x, b] = A("");
18
- return S({
19
- textAreaRef: t,
20
- triggerAutoSize: x,
21
- maxHeight: i,
22
- minHeight: o
23
- }), N(c, () => ({
24
- ...t.current ?? {},
25
- textArea: t.current,
26
- focus: () => {
27
- var l;
28
- return (l = t == null ? void 0 : t.current) == null ? void 0 : l.focus();
29
- },
30
- maxHeight: i,
31
- minHeight: o
32
- })), y(() => {
33
- b(r);
34
- }, [e == null ? void 0 : e.defaultValue, r]), /* @__PURE__ */ u(h, { children: [
35
- /* @__PURE__ */ p(
36
- "textarea",
37
- {
38
- id: n || a,
39
- ...e,
40
- ref: t,
41
- value: r,
42
- className: d(
43
- "flex min-h-10 w-full px-3 py-2 text-base relative",
44
- "rounded-md border border-input bg-transparent shadow-sm",
45
- "placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
46
- g ? "resize" : "resize-none !overflow-hidden",
47
- s && "pb-2",
48
- f
49
- )
50
- }
51
- ),
52
- s && /* @__PURE__ */ u(
53
- "label",
54
- {
55
- htmlFor: n || a,
56
- className: d(
57
- "w-full text-right inline-flex items-center justify-end",
58
- "text-sm font-normal text-muted-foreground",
59
- "leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
60
- ),
61
- children: [
62
- String(r || "").length,
63
- " / ",
64
- e == null ? void 0 : e.maxLength
65
- ]
66
- }
67
- )
68
- ] });
69
- }
70
- );
71
- T.displayName = "Textarea";
1
+ import "react/jsx-runtime";
2
+ import "react";
3
+ import "@oneplatformdev/utils";
4
+ import { T as a } from "../Textarea-D1CCXy7E.js";
72
5
  export {
73
- T as Textarea
6
+ a as Textarea
74
7
  };
@@ -1,4 +1,4 @@
1
- import { Textarea as a } from "./Textarea.mjs";
1
+ import { T as r } from "../Textarea-D1CCXy7E.js";
2
2
  export {
3
- a as Textarea
3
+ r as Textarea
4
4
  };
@@ -1,20 +1,67 @@
1
- import * as f from "react";
2
- const u = ({
3
- textAreaRef: r,
4
- triggerAutoSize: l,
5
- maxHeight: t = Number.MAX_SAFE_INTEGER,
6
- minHeight: s = 0
7
- }) => {
8
- const [c, i] = f.useState(!0);
9
- f.useEffect(() => {
10
- const e = r.current;
11
- if (e) {
12
- c && (e.style.minHeight = `${s + 0}px`, t > s && (e.style.maxHeight = `${t}px`), i(!1)), e.style.height = `${s + 0}px`;
13
- const o = e.scrollHeight;
14
- o > t ? e.style.height = `${t}px` : e.style.height = `${o + 0}px`;
15
- }
16
- }, [r.current, l]);
17
- };
1
+ import "react";
2
+ import "../Accordion/Accordion.mjs";
3
+ import "../Alert/Alert.mjs";
4
+ import "../AlertDialog/AlertDialogRoot.mjs";
5
+ import "react/jsx-runtime";
6
+ import "@oneplatformdev/utils";
7
+ import "recharts";
8
+ import "../Chart/Chart.mjs";
9
+ import "../Sidebar/Sidebar.mjs";
10
+ import "@radix-ui/react-aspect-ratio";
11
+ import "../Avatar/Avatar.mjs";
12
+ import "../Badge/badgeVariants.mjs";
13
+ import "../Breadcrumb/Breadcrumb.mjs";
14
+ import "../Button/Button.mjs";
15
+ import "../Button/buttonVariants.mjs";
16
+ import "../ButtonIcon/ButtonIcon.mjs";
17
+ import "../ButtonIcon/buttonIconVariants.mjs";
18
+ import "../Calendar/Calendar.mjs";
19
+ import "../Card/Card.mjs";
20
+ import "../Carousel/Carousel.mjs";
21
+ import "../Checkbox/Checkbox.mjs";
22
+ import "@radix-ui/react-collapsible";
23
+ import "../Combobox/Combobox.mjs";
24
+ import "../Command/Command.mjs";
25
+ import "../DropdownMenu/DropdownMenu.mjs";
26
+ import "../Table/Table.mjs";
27
+ import "@tanstack/react-table";
28
+ import "lucide-react";
29
+ import "../DatePicker/DatePicker.mjs";
30
+ import "../Dialog/Dialog.mjs";
31
+ import "../Drawer/Drawer.mjs";
32
+ import "../Form/Form.mjs";
33
+ import "react-hook-form";
34
+ import "../Input/Input.mjs";
35
+ import "../Select/SelectRoot.mjs";
36
+ import { u as Ao } from "../Textarea-D1CCXy7E.js";
37
+ import "../Separator/Separator.mjs";
38
+ import "../HoverCard/HoverCard.mjs";
39
+ import "../InputOTP/InputOTP.mjs";
40
+ import "../Label/Label.mjs";
41
+ import "../Label/labelVariants.mjs";
42
+ import "../LoadingMask/RenderLoadingMask.mjs";
43
+ import "../LoadingProgress/loadingProgressVariants.mjs";
44
+ import "../Menubar/Menubar.mjs";
45
+ import "../NavigationMenu/NavigationMenu.mjs";
46
+ import "../NavigationMenu/navigationMenuVariants.mjs";
47
+ import "../Pagination/Pagination.mjs";
48
+ import "../Popover/Popover.mjs";
49
+ import "../Progress/Progress.mjs";
50
+ import "../RadioGroup/RadioGroup.mjs";
51
+ import "react-resizable-panels";
52
+ import "../ScrollArea/ScrollArea.mjs";
53
+ import "@oneplatformdev/hooks";
54
+ import "../Sheet/Sheet.mjs";
55
+ import "../Slider/Slider.mjs";
56
+ import "next-themes";
57
+ import "sonner";
58
+ import "../Switch/Switch.mjs";
59
+ import "../Tabs/TabsRoot.mjs";
60
+ import "../Toast/Toast.mjs";
61
+ import "../Toggle/Toggle.mjs";
62
+ import "../ToggleGroup/ToggleGroup.mjs";
63
+ import "../Tooltip/TooltipRoot.mjs";
64
+ import "../Dropzone/Dropzone.mjs";
18
65
  export {
19
- u as useAutosizeTextArea
66
+ Ao as useAutosizeTextArea
20
67
  };
@@ -0,0 +1,149 @@
1
+ import { jsxs as f, Fragment as b, jsx as y } from "react/jsx-runtime";
2
+ import * as a from "react";
3
+ import { useId as E, useRef as A, useState as N, useImperativeHandle as v, useEffect as w } from "react";
4
+ import { cn as x } from "@oneplatformdev/utils";
5
+ import "./Accordion/Accordion.mjs";
6
+ import "./Alert/Alert.mjs";
7
+ import "./AlertDialog/AlertDialogRoot.mjs";
8
+ import "recharts";
9
+ import "./Chart/Chart.mjs";
10
+ import "./Sidebar/Sidebar.mjs";
11
+ import "@radix-ui/react-aspect-ratio";
12
+ import "./Avatar/Avatar.mjs";
13
+ import "./Badge/badgeVariants.mjs";
14
+ import "./Breadcrumb/Breadcrumb.mjs";
15
+ import "./Button/Button.mjs";
16
+ import "./Button/buttonVariants.mjs";
17
+ import "./ButtonIcon/ButtonIcon.mjs";
18
+ import "./ButtonIcon/buttonIconVariants.mjs";
19
+ import "./Calendar/Calendar.mjs";
20
+ import "./Card/Card.mjs";
21
+ import "./Carousel/Carousel.mjs";
22
+ import "./Checkbox/Checkbox.mjs";
23
+ import "@radix-ui/react-collapsible";
24
+ import "./Combobox/Combobox.mjs";
25
+ import "./Command/Command.mjs";
26
+ import "./DropdownMenu/DropdownMenu.mjs";
27
+ import "./Table/Table.mjs";
28
+ import "@tanstack/react-table";
29
+ import "lucide-react";
30
+ import "./DatePicker/DatePicker.mjs";
31
+ import "./Dialog/Dialog.mjs";
32
+ import "./Drawer/Drawer.mjs";
33
+ import "./Form/Form.mjs";
34
+ import "react-hook-form";
35
+ import "./Input/Input.mjs";
36
+ import "./Select/SelectRoot.mjs";
37
+ import "./Separator/Separator.mjs";
38
+ import "./HoverCard/HoverCard.mjs";
39
+ import "./InputOTP/InputOTP.mjs";
40
+ import "./Label/Label.mjs";
41
+ import "./Label/labelVariants.mjs";
42
+ import "./LoadingMask/RenderLoadingMask.mjs";
43
+ import "./LoadingProgress/loadingProgressVariants.mjs";
44
+ import "./Menubar/Menubar.mjs";
45
+ import "./NavigationMenu/NavigationMenu.mjs";
46
+ import "./NavigationMenu/navigationMenuVariants.mjs";
47
+ import "./Pagination/Pagination.mjs";
48
+ import "./Popover/Popover.mjs";
49
+ import "./Progress/Progress.mjs";
50
+ import "./RadioGroup/RadioGroup.mjs";
51
+ import "react-resizable-panels";
52
+ import "./ScrollArea/ScrollArea.mjs";
53
+ import "@oneplatformdev/hooks";
54
+ import "./Sheet/Sheet.mjs";
55
+ import "./Slider/Slider.mjs";
56
+ import "next-themes";
57
+ import "sonner";
58
+ import "./Switch/Switch.mjs";
59
+ import "./Tabs/TabsRoot.mjs";
60
+ import "./Toast/Toast.mjs";
61
+ import "./Toggle/Toggle.mjs";
62
+ import "./ToggleGroup/ToggleGroup.mjs";
63
+ import "./Tooltip/TooltipRoot.mjs";
64
+ import "./Dropzone/Dropzone.mjs";
65
+ const S = ({
66
+ textAreaRef: p,
67
+ triggerAutoSize: l,
68
+ maxHeight: i = Number.MAX_SAFE_INTEGER,
69
+ minHeight: r = 0
70
+ }) => {
71
+ const [s, n] = a.useState(!0);
72
+ a.useEffect(() => {
73
+ const t = p.current;
74
+ if (t) {
75
+ s && (t.style.minHeight = `${r + 0}px`, i > r && (t.style.maxHeight = `${i}px`), n(!1)), t.style.height = `${r + 0}px`;
76
+ const m = t.scrollHeight;
77
+ m > i ? t.style.height = `${i}px` : t.style.height = `${m + 0}px`;
78
+ }
79
+ }, [p.current, l]);
80
+ }, T = a.forwardRef(
81
+ (p, l) => {
82
+ const {
83
+ className: i,
84
+ value: r = "",
85
+ maxHeight: s = Number.MAX_SAFE_INTEGER,
86
+ minHeight: n = 0,
87
+ resizeble: u = !0,
88
+ counter: t = !1,
89
+ id: m = "",
90
+ ...e
91
+ } = p, d = E(), o = A(null), [g, h] = N("");
92
+ return S({
93
+ textAreaRef: o,
94
+ triggerAutoSize: g,
95
+ maxHeight: s,
96
+ minHeight: n
97
+ }), v(l, () => ({
98
+ ...o.current ?? {},
99
+ textArea: o.current,
100
+ focus: () => {
101
+ var c;
102
+ return (c = o == null ? void 0 : o.current) == null ? void 0 : c.focus();
103
+ },
104
+ maxHeight: s,
105
+ minHeight: n
106
+ })), w(() => {
107
+ h(r);
108
+ }, [e == null ? void 0 : e.defaultValue, r]), /* @__PURE__ */ f(b, { children: [
109
+ /* @__PURE__ */ y(
110
+ "textarea",
111
+ {
112
+ id: m || d,
113
+ ...e,
114
+ ref: o,
115
+ value: r,
116
+ className: x(
117
+ "flex min-h-10 w-full px-3 py-2 text-base relative",
118
+ "rounded-md border border-input bg-transparent shadow-sm",
119
+ "placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
120
+ u ? "resize" : "resize-none !overflow-hidden",
121
+ t && "pb-2",
122
+ i
123
+ )
124
+ }
125
+ ),
126
+ t && /* @__PURE__ */ f(
127
+ "label",
128
+ {
129
+ htmlFor: m || d,
130
+ className: x(
131
+ "w-full text-right inline-flex items-center justify-end",
132
+ "text-sm font-normal text-muted-foreground",
133
+ "leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
134
+ ),
135
+ children: [
136
+ String(r || "").length,
137
+ " / ",
138
+ e == null ? void 0 : e.maxLength
139
+ ]
140
+ }
141
+ )
142
+ ] });
143
+ }
144
+ );
145
+ T.displayName = "Textarea";
146
+ export {
147
+ T,
148
+ S as u
149
+ };
@@ -1,27 +1,28 @@
1
- import { jsx as m } from "react/jsx-runtime";
1
+ import { jsx as a } from "react/jsx-runtime";
2
+ import "react";
2
3
  import { ThemeProvider as n } from "next-themes";
3
- function h(e) {
4
+ function l(e) {
4
5
  const {
5
6
  children: r,
6
7
  attribute: t = "class",
7
- defaultTheme: s = "system",
8
- enableSystem: i = !0,
9
- disableTransitionOnChange: o = !0,
10
- ...a
8
+ defaultTheme: i = "system",
9
+ enableSystem: o = !0,
10
+ disableTransitionOnChange: s = !0,
11
+ ...m
11
12
  } = e;
12
- return /* @__PURE__ */ m(
13
+ return /* @__PURE__ */ a(
13
14
  n,
14
15
  {
15
16
  attribute: t,
16
- defaultTheme: s,
17
- enableSystem: i,
18
- disableTransitionOnChange: o,
19
- ...a,
17
+ defaultTheme: i,
18
+ enableSystem: o,
19
+ disableTransitionOnChange: s,
20
+ ...m,
20
21
  children: r
21
22
  }
22
23
  );
23
24
  }
24
25
  export {
25
- h as ThemeProvider,
26
- h as default
26
+ l as ThemeProvider,
27
+ l as default
27
28
  };
package/Toast/Toast.mjs CHANGED
@@ -1,10 +1,11 @@
1
1
  import { jsx as s } from "react/jsx-runtime";
2
2
  import * as i from "react";
3
3
  import * as e from "@radix-ui/react-toast";
4
+ import "class-variance-authority";
4
5
  import { X as c } from "lucide-react";
5
6
  import { cn as a } from "@oneplatformdev/utils";
6
7
  import { toastVariants as n } from "./toastVariants.mjs";
7
- const h = e.Provider, m = i.forwardRef(({ className: o, ...t }, r) => /* @__PURE__ */ s(
8
+ const w = e.Provider, m = i.forwardRef(({ className: o, ...t }, r) => /* @__PURE__ */ s(
8
9
  e.Viewport,
9
10
  {
10
11
  ref: r,
@@ -74,7 +75,7 @@ export {
74
75
  u as ToastAction,
75
76
  l as ToastClose,
76
77
  v as ToastDescription,
77
- h as ToastProvider,
78
+ w as ToastProvider,
78
79
  f as ToastTitle,
79
80
  m as ToastViewport
80
81
  };