@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.
- package/Alert/Alert.mjs +6 -7
- package/AreaChart/AreaChart.mjs +4 -5
- package/Badge/Badge.mjs +6 -7
- package/Calendar/Calendar.mjs +0 -1
- package/Checkbox/Checkbox.d.ts +1 -1
- package/Command/Command.mjs +2 -3
- package/DataTable/DataTable.mjs +15 -16
- package/Dropzone/Dropzone.mjs +1 -1
- package/Dropzone/DropzoneFilePreview.mjs +1 -1
- package/Dropzone/index.mjs +1 -1
- package/{DropzoneFilePreview-C-SoCoO0.js → DropzoneFilePreview-Dhtv8F4u.js} +15 -16
- package/Form/Form.mjs +4 -5
- package/Form/FormRenderControl.mjs +6 -7
- package/FormCheckbox/FormCheckbox.mjs +9 -10
- package/FormCombobox/FormCombobox.mjs +12 -13
- package/FormDatePicker/FormDatePicker.mjs +6 -7
- package/FormDropzone/FormDropzone.mjs +6 -7
- package/FormInput/FormInput.mjs +6 -7
- package/FormRadio/FormRadio.mjs +10 -11
- package/FormSelect/FormSelect.mjs +5 -6
- package/FormTextarea/FormTextarea.mjs +9 -10
- package/Header/Header.mjs +6 -7
- package/Label/Label.mjs +6 -7
- package/LoadingMask/LoadingMask.mjs +6 -7
- package/LoadingProgress/LoadingProgress.mjs +2 -3
- package/Radio/Radio.mjs +7 -8
- package/Skeleton/Skeleton.mjs +8 -9
- package/TablePagination/TablePagination.mjs +8 -9
- package/Textarea/Textarea.mjs +72 -5
- package/Textarea/index.mjs +2 -2
- package/Textarea/useAutosizeTextArea.mjs +18 -65
- package/Theme/ThemeProvider.mjs +13 -14
- package/Toast/Toast.mjs +2 -3
- package/ToggleGroup/ToggleGroup.mjs +6 -7
- package/Tooltip/Tooltip.mjs +2 -3
- package/index.mjs +2 -2
- package/package.json +1 -1
- package/Textarea-D1CCXy7E.js +0 -149
package/Textarea-D1CCXy7E.js
DELETED
@@ -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
|
-
};
|