@oneplatformdev/ui 0.1.99-beta.33 → 0.1.99-beta.34
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/CHANGELOG.md +8 -0
- package/Textarea/Textarea.js +17 -17
- package/Textarea/Textarea.js.map +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
## 0.1.99-beta.34 (2026-01-13)
|
|
2
|
+
|
|
3
|
+
### 🧱 Updated Dependencies
|
|
4
|
+
|
|
5
|
+
- Updated @oneplatformdev/utils to 0.1.99-beta.34
|
|
6
|
+
- Updated @oneplatformdev/hooks to 0.1.99-beta.34
|
|
7
|
+
- Updated @oneplatformdev/tokens to 0.1.99-beta.34
|
|
8
|
+
|
|
1
9
|
## 0.1.99-beta.33 (2026-01-13)
|
|
2
10
|
|
|
3
11
|
### 🧱 Updated Dependencies
|
package/Textarea/Textarea.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as n, Fragment as p, jsx as b } from "react/jsx-runtime";
|
|
2
2
|
import * as h from "react";
|
|
3
3
|
import { useId as A, useRef as v, useState as w, useImperativeHandle as z, useEffect as F } from "react";
|
|
4
4
|
import { cn as d } from "@oneplatformdev/utils";
|
|
@@ -8,31 +8,31 @@ const y = h.forwardRef(
|
|
|
8
8
|
const {
|
|
9
9
|
className: c,
|
|
10
10
|
value: t = "",
|
|
11
|
-
maxHeight:
|
|
12
|
-
minHeight:
|
|
13
|
-
resizeble: f = !
|
|
11
|
+
maxHeight: i = Number.MAX_SAFE_INTEGER,
|
|
12
|
+
minHeight: o = 40,
|
|
13
|
+
resizeble: f = !1,
|
|
14
14
|
counter: s = !1,
|
|
15
|
-
id:
|
|
15
|
+
id: a = "",
|
|
16
16
|
...r
|
|
17
|
-
} = u,
|
|
17
|
+
} = u, l = A(), e = v(null), [x, g] = w("");
|
|
18
18
|
return N({
|
|
19
19
|
textAreaRef: e,
|
|
20
20
|
triggerAutoSize: x,
|
|
21
|
-
maxHeight:
|
|
22
|
-
minHeight:
|
|
21
|
+
maxHeight: i,
|
|
22
|
+
minHeight: o
|
|
23
23
|
}), z(m, () => ({
|
|
24
24
|
...e.current ?? {},
|
|
25
25
|
textArea: e.current,
|
|
26
26
|
focus: () => e?.current?.focus(),
|
|
27
|
-
maxHeight:
|
|
28
|
-
minHeight:
|
|
27
|
+
maxHeight: i,
|
|
28
|
+
minHeight: o
|
|
29
29
|
})), F(() => {
|
|
30
30
|
g(t);
|
|
31
|
-
}, [r?.defaultValue, t]), /* @__PURE__ */
|
|
31
|
+
}, [r?.defaultValue, t]), /* @__PURE__ */ n(p, { children: [
|
|
32
32
|
/* @__PURE__ */ b(
|
|
33
33
|
"textarea",
|
|
34
34
|
{
|
|
35
|
-
id:
|
|
35
|
+
id: a || l,
|
|
36
36
|
...r,
|
|
37
37
|
ref: e,
|
|
38
38
|
value: t,
|
|
@@ -42,19 +42,19 @@ const y = h.forwardRef(
|
|
|
42
42
|
"placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",
|
|
43
43
|
"focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring",
|
|
44
44
|
f ? "resize" : "resize-none overflow-hidden!",
|
|
45
|
-
s && "pb-
|
|
45
|
+
s && "pb-1",
|
|
46
46
|
c
|
|
47
47
|
)
|
|
48
48
|
}
|
|
49
49
|
),
|
|
50
|
-
s && /* @__PURE__ */
|
|
50
|
+
s && /* @__PURE__ */ n(
|
|
51
51
|
"label",
|
|
52
52
|
{
|
|
53
|
-
htmlFor:
|
|
53
|
+
htmlFor: a || l,
|
|
54
54
|
className: d(
|
|
55
55
|
"w-full text-right inline-flex items-center justify-end",
|
|
56
|
-
"text-
|
|
57
|
-
"
|
|
56
|
+
"text-xs font-medium leading-[1.2] text-muted-foreground",
|
|
57
|
+
"peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
|
|
58
58
|
),
|
|
59
59
|
children: [
|
|
60
60
|
String(t || "").length,
|
package/Textarea/Textarea.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Textarea.js","sources":["../../src/Textarea/Textarea.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useEffect, useId, useImperativeHandle, useRef, useState } from 'react';\nimport { cn } from '@oneplatformdev/utils';\n\nimport { TextareaProps } from './Textarea.types';\nimport { useAutosizeTextArea } from './useAutosizeTextArea';\n\nconst Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(\n (textareaProps, ref) => {\n const {\n className,\n value = '',\n maxHeight = Number.MAX_SAFE_INTEGER,\n minHeight = 40,\n resizeble =
|
|
1
|
+
{"version":3,"file":"Textarea.js","sources":["../../src/Textarea/Textarea.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useEffect, useId, useImperativeHandle, useRef, useState } from 'react';\nimport { cn } from '@oneplatformdev/utils';\n\nimport { TextareaProps } from './Textarea.types';\nimport { useAutosizeTextArea } from './useAutosizeTextArea';\n\nconst Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(\n (textareaProps, ref) => {\n const {\n className,\n value = '',\n maxHeight = Number.MAX_SAFE_INTEGER,\n minHeight = 40,\n resizeble = false,\n counter = false,\n id: customId = '',\n ...props\n } = textareaProps;\n const id = useId();\n const textAreaRef = useRef<HTMLTextAreaElement | null>(null);\n const [triggerAutoSize, setTriggerAutoSize] = useState('');\n\n useAutosizeTextArea({\n textAreaRef,\n triggerAutoSize: triggerAutoSize,\n maxHeight,\n minHeight,\n });\n\n useImperativeHandle(ref, () => ({\n ...((textAreaRef.current ?? {}) as HTMLTextAreaElement),\n textArea: textAreaRef.current as HTMLTextAreaElement,\n focus: () => textAreaRef?.current?.focus(),\n maxHeight,\n minHeight,\n }));\n\n useEffect(() => {\n setTriggerAutoSize(value as string);\n }, [props?.defaultValue, value]);\n\n return (\n <>\n <textarea\n id={customId || id}\n {...props}\n ref={textAreaRef}\n value={value}\n className={cn(\n 'flex min-h-10 w-full px-3 py-2 text-base relative md:text-sm',\n 'rounded-lg border border-input bg-[#FCFCFC] shadow-none',\n 'placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50',\n 'focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring',\n resizeble ? 'resize' : 'resize-none overflow-hidden!',\n counter && 'pb-1',\n className\n )}\n />\n {counter && (\n <label\n htmlFor={customId || id}\n className={cn(\n 'w-full text-right inline-flex items-center justify-end',\n 'text-xs font-medium leading-[1.2] text-muted-foreground',\n 'peer-disabled:cursor-not-allowed peer-disabled:opacity-70'\n )}\n >\n {String(value || '').length} / {props?.maxLength}\n </label>\n )}\n </>\n );\n }\n);\nTextarea.displayName = 'Textarea';\n\nexport { Textarea };\n"],"names":["Textarea","React","textareaProps","ref","className","value","maxHeight","minHeight","resizeble","counter","customId","props","id","useId","textAreaRef","useRef","triggerAutoSize","setTriggerAutoSize","useState","useAutosizeTextArea","useImperativeHandle","useEffect","jsxs","Fragment","jsx","cn"],"mappings":";;;;;AAOA,MAAMA,IAAWC,EAAM;AAAA,EACrB,CAACC,GAAeC,MAAQ;AACtB,UAAM;AAAA,MACJ,WAAAC;AAAA,MACA,OAAAC,IAAQ;AAAA,MACR,WAAAC,IAAY,OAAO;AAAA,MACnB,WAAAC,IAAY;AAAA,MACZ,WAAAC,IAAY;AAAA,MACZ,SAAAC,IAAU;AAAA,MACV,IAAIC,IAAW;AAAA,MACf,GAAGC;AAAA,IAAA,IACDT,GACEU,IAAKC,EAAA,GACLC,IAAcC,EAAmC,IAAI,GACrD,CAACC,GAAiBC,CAAkB,IAAIC,EAAS,EAAE;AAEzD,WAAAC,EAAoB;AAAA,MAClB,aAAAL;AAAA,MACA,iBAAAE;AAAA,MACA,WAAAV;AAAA,MACA,WAAAC;AAAA,IAAA,CACD,GAEDa,EAAoBjB,GAAK,OAAO;AAAA,MAC9B,GAAKW,EAAY,WAAW,CAAA;AAAA,MAC5B,UAAUA,EAAY;AAAA,MACtB,OAAO,MAAMA,GAAa,SAAS,MAAA;AAAA,MACnC,WAAAR;AAAA,MACA,WAAAC;AAAA,IAAA,EACA,GAEFc,EAAU,MAAM;AACd,MAAAJ,EAAmBZ,CAAe;AAAA,IACpC,GAAG,CAACM,GAAO,cAAcN,CAAK,CAAC,GAG7B,gBAAAiB,EAAAC,GAAA,EACE,UAAA;AAAA,MAAA,gBAAAC;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,IAAId,KAAYE;AAAA,UACf,GAAGD;AAAA,UACJ,KAAKG;AAAA,UACL,OAAAT;AAAA,UACA,WAAWoB;AAAA,YACT;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACAjB,IAAY,WAAW;AAAA,YACvBC,KAAW;AAAA,YACXL;AAAA,UAAA;AAAA,QACF;AAAA,MAAA;AAAA,MAEDK,KACC,gBAAAa;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,SAASZ,KAAYE;AAAA,UACrB,WAAWa;AAAA,YACT;AAAA,YACA;AAAA,YACA;AAAA,UAAA;AAAA,UAGD,UAAA;AAAA,YAAA,OAAOpB,KAAS,EAAE,EAAE;AAAA,YAAO;AAAA,YAAIM,GAAO;AAAA,UAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IACzC,GAEJ;AAAA,EAEJ;AACF;AACAX,EAAS,cAAc;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oneplatformdev/ui",
|
|
3
|
-
"version": "0.1.99-beta.
|
|
3
|
+
"version": "0.1.99-beta.34",
|
|
4
4
|
"description": "UI component library for OnePlatform",
|
|
5
5
|
"author": "One Platform Development Team",
|
|
6
6
|
"keywords": [
|
|
@@ -105,9 +105,9 @@
|
|
|
105
105
|
"recharts": "^3.2.0",
|
|
106
106
|
"sonner": "^2.0.7",
|
|
107
107
|
"vaul": "^1.1.2",
|
|
108
|
-
"@oneplatformdev/
|
|
109
|
-
"@oneplatformdev/utils": "^0.1.99-beta.
|
|
110
|
-
"@oneplatformdev/
|
|
108
|
+
"@oneplatformdev/hooks": "^0.1.99-beta.34",
|
|
109
|
+
"@oneplatformdev/utils": "^0.1.99-beta.34",
|
|
110
|
+
"@oneplatformdev/tokens": "^0.1.99-beta.34"
|
|
111
111
|
},
|
|
112
112
|
"scripts": {
|
|
113
113
|
"chromatic": "chromatic"
|