@oneplatformdev/ui 0.1.99-beta.225 → 0.1.99-beta.227
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
CHANGED
|
@@ -1,3 +1,36 @@
|
|
|
1
|
+
## 0.1.99-beta.227 (2026-02-23)
|
|
2
|
+
|
|
3
|
+
### 🚀 Features
|
|
4
|
+
|
|
5
|
+
- **FormTextarea:** add `counter` prop support with conditional rendering based on field state ([5b7ca3d](https://github.com/oneplatformdev/core-web/commit/5b7ca3d))
|
|
6
|
+
|
|
7
|
+
### 🧱 Updated Dependencies
|
|
8
|
+
|
|
9
|
+
- Updated @oneplatformdev/utils to 0.1.99-beta.227
|
|
10
|
+
- Updated @oneplatformdev/hooks to 0.1.99-beta.227
|
|
11
|
+
- Updated @oneplatformdev/tokens to 0.1.99-beta.227
|
|
12
|
+
|
|
13
|
+
### ❤️ Thank You
|
|
14
|
+
|
|
15
|
+
- Bohdan Radchenko
|
|
16
|
+
|
|
17
|
+
## 0.1.99-beta.226 (2026-02-23)
|
|
18
|
+
|
|
19
|
+
### 🚀 Features
|
|
20
|
+
|
|
21
|
+
- **Combobox:** add explicit type annotations for `onMount` callbacks and enforce await behavior ([22f68b2](https://github.com/oneplatformdev/core-web/commit/22f68b2))
|
|
22
|
+
- **FormCombobox:** introduce `FormComboboxConditionProps` and refine type separation for single/multi-use scenarios ([c1a6779](https://github.com/oneplatformdev/core-web/commit/c1a6779))
|
|
23
|
+
|
|
24
|
+
### 🧱 Updated Dependencies
|
|
25
|
+
|
|
26
|
+
- Updated @oneplatformdev/utils to 0.1.99-beta.226
|
|
27
|
+
- Updated @oneplatformdev/hooks to 0.1.99-beta.226
|
|
28
|
+
- Updated @oneplatformdev/tokens to 0.1.99-beta.226
|
|
29
|
+
|
|
30
|
+
### ❤️ Thank You
|
|
31
|
+
|
|
32
|
+
- Bohdan Radchenko
|
|
33
|
+
|
|
1
34
|
## 0.1.99-beta.225 (2026-02-22)
|
|
2
35
|
|
|
3
36
|
### 🚀 Features
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormTextarea.d.ts","sourceRoot":"","sources":["../../src/FormTextarea/FormTextarea.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAI9C,eAAO,MAAM,YAAY,GAAI,IAAI,SAAS,WAAW,EACnD,OAAO,iBAAiB,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"FormTextarea.d.ts","sourceRoot":"","sources":["../../src/FormTextarea/FormTextarea.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAI9C,eAAO,MAAM,YAAY,GAAI,IAAI,SAAS,WAAW,EACnD,OAAO,iBAAiB,CAAC,IAAI,CAAC,4CAuB/B,CAAC"}
|
|
@@ -1,30 +1,31 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { FormControl as
|
|
3
|
-
import { FormRenderControl as
|
|
4
|
-
import { Textarea as
|
|
5
|
-
const
|
|
6
|
-
const { form:
|
|
2
|
+
import { FormControl as f } from "../Form/Form.js";
|
|
3
|
+
import { FormRenderControl as u } from "../Form/FormRenderControl.js";
|
|
4
|
+
import { Textarea as x } from "../Textarea/Textarea.js";
|
|
5
|
+
const P = (e) => {
|
|
6
|
+
const { form: t, label: m, tooltip: n, tooltipProps: a, name: l, containerProps: p, counter: i, ...s } = e;
|
|
7
7
|
return /* @__PURE__ */ r(
|
|
8
|
-
|
|
8
|
+
u,
|
|
9
9
|
{
|
|
10
|
-
form:
|
|
10
|
+
form: t,
|
|
11
11
|
tooltip: n,
|
|
12
12
|
tooltipProps: a,
|
|
13
|
-
name:
|
|
13
|
+
name: l,
|
|
14
14
|
label: m,
|
|
15
|
-
containerProps:
|
|
16
|
-
render: ({ field: o }) => /* @__PURE__ */ r(
|
|
17
|
-
|
|
15
|
+
containerProps: p,
|
|
16
|
+
render: ({ field: o, fieldState: c }) => /* @__PURE__ */ r(f, { children: /* @__PURE__ */ r(
|
|
17
|
+
x,
|
|
18
18
|
{
|
|
19
19
|
...o,
|
|
20
20
|
value: o.value || "",
|
|
21
|
-
...
|
|
21
|
+
...s,
|
|
22
|
+
counter: c.error ? !1 : i
|
|
22
23
|
}
|
|
23
24
|
) })
|
|
24
25
|
}
|
|
25
26
|
);
|
|
26
27
|
};
|
|
27
28
|
export {
|
|
28
|
-
|
|
29
|
+
P as FormTextarea
|
|
29
30
|
};
|
|
30
31
|
//# sourceMappingURL=FormTextarea.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormTextarea.js","sources":["../../src/FormTextarea/FormTextarea.tsx"],"sourcesContent":["import { FormControl, FormRenderControl } from '../Form';\nimport { FormTextareaProps } from './FormTextarea.types';\nimport { FieldValues } from 'react-hook-form';\nimport { Textarea } from '../Textarea';\n\n// TODO: add description\nexport const FormTextarea = <Data extends FieldValues>(\n props: FormTextareaProps<Data>\n) => {\
|
|
1
|
+
{"version":3,"file":"FormTextarea.js","sources":["../../src/FormTextarea/FormTextarea.tsx"],"sourcesContent":["import { FormControl, FormRenderControl } from '../Form';\nimport { FormTextareaProps } from './FormTextarea.types';\nimport { FieldValues } from 'react-hook-form';\nimport { Textarea } from '../Textarea';\n\n// TODO: add description\nexport const FormTextarea = <Data extends FieldValues>(\n props: FormTextareaProps<Data>\n) => {\n const { form, label, tooltip, tooltipProps, name, containerProps, counter, ...rest } = props;\n return (\n <FormRenderControl\n form={form}\n tooltip={tooltip}\n tooltipProps={tooltipProps}\n name={name}\n label={label}\n containerProps={containerProps}\n render={({ field, fieldState }) => (\n <FormControl>\n <Textarea\n {...field}\n value={field.value || ''}\n {...rest}\n counter={!!fieldState.error ? false : counter}\n />\n </FormControl>\n )}\n />\n )\n};\n"],"names":["FormTextarea","props","form","label","tooltip","tooltipProps","name","containerProps","counter","rest","jsx","FormRenderControl","field","fieldState","FormControl","Textarea"],"mappings":";;;;AAMO,MAAMA,IAAe,CAC1BC,MACG;AACH,QAAM,EAAE,MAAAC,GAAM,OAAAC,GAAO,SAAAC,GAAS,cAAAC,GAAc,MAAAC,GAAM,gBAAAC,GAAgB,SAAAC,GAAS,GAAGC,EAAA,IAASR;AACvF,SACE,gBAAAS;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,MAAAT;AAAA,MACA,SAAAE;AAAA,MACA,cAAAC;AAAA,MACA,MAAAC;AAAA,MACA,OAAAH;AAAA,MACA,gBAAAI;AAAA,MACA,QAAQ,CAAC,EAAE,OAAAK,GAAO,YAAAC,EAAA,wBACfC,GAAA,EACC,UAAA,gBAAAJ;AAAA,QAACK;AAAA,QAAA;AAAA,UACE,GAAGH;AAAA,UACJ,OAAOA,EAAM,SAAS;AAAA,UACrB,GAAGH;AAAA,UACJ,SAAWI,EAAW,QAAQ,KAAQL;AAAA,QAAA;AAAA,MAAA,EACxC,CACF;AAAA,IAAA;AAAA,EAAA;AAIR;"}
|
package/Textarea/Textarea.js
CHANGED
|
@@ -8,10 +8,10 @@ const R = w.forwardRef(
|
|
|
8
8
|
const {
|
|
9
9
|
className: g,
|
|
10
10
|
value: r = "",
|
|
11
|
-
maxHeight:
|
|
12
|
-
minHeight:
|
|
11
|
+
maxHeight: i = Number.MAX_SAFE_INTEGER,
|
|
12
|
+
minHeight: a = 40,
|
|
13
13
|
resizeble: x = !1,
|
|
14
|
-
counter: s = !
|
|
14
|
+
counter: s = !0,
|
|
15
15
|
id: n = "",
|
|
16
16
|
onChange: p,
|
|
17
17
|
onTransform: l,
|
|
@@ -20,14 +20,14 @@ const R = w.forwardRef(
|
|
|
20
20
|
return C({
|
|
21
21
|
textAreaRef: t,
|
|
22
22
|
triggerAutoSize: b,
|
|
23
|
-
maxHeight:
|
|
24
|
-
minHeight:
|
|
23
|
+
maxHeight: i,
|
|
24
|
+
minHeight: a
|
|
25
25
|
}), N(c, () => ({
|
|
26
26
|
...t.current ?? {},
|
|
27
27
|
textArea: t.current,
|
|
28
28
|
focus: () => t?.current?.focus(),
|
|
29
|
-
maxHeight:
|
|
30
|
-
minHeight:
|
|
29
|
+
maxHeight: i,
|
|
30
|
+
minHeight: a
|
|
31
31
|
})), T(() => {
|
|
32
32
|
h(r);
|
|
33
33
|
}, [o?.defaultValue, r]), /* @__PURE__ */ d(v, { children: [
|
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 = false,\n counter =
|
|
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 = true,\n id: customId = '',\n onChange,\n onTransform,\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 onChange={(e) => {\n if (typeof onTransform?.(e.target.value, e) === 'string') {\n e.target.value = onTransform(e.target.value, e);\n }\n onChange?.(e);\n }}\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","onChange","onTransform","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,M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A,UACrB,WAAWa;AAAA,YACT;AAAA,YACA;AAAA,YACA;AAAA,UAAA;AAAA,UAGD,UAAA;AAAA,YAAA,OAAOtB,KAAS,EAAE,EAAE;AAAA,YAAO;AAAA,YAAIQ,GAAO;AAAA,UAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IACzC,GAEJ;AAAA,EAEJ;AACF;AACAb,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.227",
|
|
4
4
|
"description": "UI component library for OnePlatform",
|
|
5
5
|
"author": "One Platform Development Team",
|
|
6
6
|
"keywords": [
|
|
@@ -106,9 +106,9 @@
|
|
|
106
106
|
"recharts": "^3.2.0",
|
|
107
107
|
"sonner": "^2.0.7",
|
|
108
108
|
"vaul": "^1.1.2",
|
|
109
|
-
"@oneplatformdev/tokens": "^0.1.99-beta.
|
|
110
|
-
"@oneplatformdev/utils": "^0.1.99-beta.
|
|
111
|
-
"@oneplatformdev/hooks": "^0.1.99-beta.
|
|
109
|
+
"@oneplatformdev/tokens": "^0.1.99-beta.227",
|
|
110
|
+
"@oneplatformdev/utils": "^0.1.99-beta.227",
|
|
111
|
+
"@oneplatformdev/hooks": "^0.1.99-beta.227"
|
|
112
112
|
},
|
|
113
113
|
"scripts": {
|
|
114
114
|
"chromatic": "chromatic"
|