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

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 (38) hide show
  1. package/Alert/Alert.mjs +6 -7
  2. package/AreaChart/AreaChart.mjs +4 -5
  3. package/Badge/Badge.mjs +6 -7
  4. package/Calendar/Calendar.mjs +0 -1
  5. package/Checkbox/Checkbox.d.ts +1 -1
  6. package/Command/Command.mjs +2 -3
  7. package/DataTable/DataTable.mjs +15 -16
  8. package/Dropzone/Dropzone.mjs +1 -1
  9. package/Dropzone/DropzoneFilePreview.mjs +1 -1
  10. package/Dropzone/index.mjs +1 -1
  11. package/{DropzoneFilePreview-C-SoCoO0.js → DropzoneFilePreview-Dhtv8F4u.js} +15 -16
  12. package/Form/Form.mjs +4 -5
  13. package/Form/FormRenderControl.mjs +6 -7
  14. package/FormCheckbox/FormCheckbox.mjs +9 -10
  15. package/FormCombobox/FormCombobox.mjs +12 -13
  16. package/FormDatePicker/FormDatePicker.mjs +6 -7
  17. package/FormDropzone/FormDropzone.mjs +6 -7
  18. package/FormInput/FormInput.mjs +6 -7
  19. package/FormRadio/FormRadio.mjs +10 -11
  20. package/FormSelect/FormSelect.mjs +5 -6
  21. package/FormTextarea/FormTextarea.mjs +9 -10
  22. package/Header/Header.mjs +6 -7
  23. package/Label/Label.mjs +6 -7
  24. package/LoadingMask/LoadingMask.mjs +6 -7
  25. package/LoadingProgress/LoadingProgress.mjs +2 -3
  26. package/Radio/Radio.mjs +7 -8
  27. package/Skeleton/Skeleton.mjs +8 -9
  28. package/TablePagination/TablePagination.mjs +8 -9
  29. package/Textarea/Textarea.mjs +72 -5
  30. package/Textarea/index.mjs +2 -2
  31. package/Textarea/useAutosizeTextArea.mjs +18 -65
  32. package/Theme/ThemeProvider.mjs +13 -14
  33. package/Toast/Toast.mjs +2 -3
  34. package/ToggleGroup/ToggleGroup.mjs +6 -7
  35. package/Tooltip/Tooltip.mjs +2 -3
  36. package/index.mjs +2 -2
  37. package/package.json +1 -1
  38. package/Textarea-D1CCXy7E.js +0 -149
@@ -1,149 +0,0 @@
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
- };