prime-ui-kit 0.7.9 → 0.7.11
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/dist/components/index.css +15 -13
- package/dist/components/index.css.map +2 -2
- package/dist/components/index.js.map +2 -2
- package/dist/components/textarea/examples/features.d.ts.map +1 -1
- package/dist/index.css +15 -13
- package/dist/index.css.map +2 -2
- package/dist/index.js.map +2 -2
- package/package.json +1 -1
- package/src/components/textarea/COMPONENT.md +1 -0
- package/src/components/textarea/examples/features.tsx +4 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "prime-ui-kit",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.11",
|
|
4
4
|
"description": "React 19 UI kit: CSS Modules, semantic design tokens (--prime-sys-*), composable components — forms, modals, selects, tables, navigation, overlays. TypeScript, ESM, a11y-oriented.",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -71,6 +71,7 @@ Live demos use **`playground/snippets/textarea/*.tsx`** (see **`playground/secti
|
|
|
71
71
|
|
|
72
72
|
- **Controlled vs uncontrolled:** pass **`value`** with **`onChange`** / **`onInput`** as needed for controlled text; omit **`value`** and optionally set **`defaultValue`** for uncontrolled usage.
|
|
73
73
|
- **`autoResize`** defaults to **`true`**: input events update a wrapper `data-value` mirror; set **`autoResize={false}`** to rely on fixed height / native resize behavior.
|
|
74
|
+
- **Min height:** design tokens define the **minimum inner** height (`token − 2×padding` on the `::after` mirror); the bordered shell height follows padding + that inner block. The mirror uses the **same** `font-size` / `line-height` as the native `textarea` so row height matches wrapped text (no growing empty band below the last line). The shell does **not** duplicate `min-height` with `flex-grow` on inner stacks — that used to stretch the field below the mirrored content.
|
|
74
75
|
- **`variant="error"`** or mounting **`Textarea.Error`** sets invalid styling; **`aria-invalid`** defaults from that unless overridden.
|
|
75
76
|
- **`aria-describedby`** you pass is **merged** with auto-added hint and error ids (your ids first, then hint and error when those parts mount).
|
|
76
77
|
- **`disabled`** / **`readOnly`** on `Root` flow to the native textarea; **`Textarea.Hint`** switches to a disabled visual variant when either is true.
|
|
@@ -18,7 +18,10 @@ export default function TextareaFeaturesExample() {
|
|
|
18
18
|
return (
|
|
19
19
|
<>
|
|
20
20
|
<Textarea.Root placeholder="Multiple lines — height grows with content (autoResize default)">
|
|
21
|
-
<Textarea.Hint>
|
|
21
|
+
<Textarea.Hint>
|
|
22
|
+
Height follows content via wrapper `data-value`; min height matches the shell token
|
|
23
|
+
without double-counting padding.
|
|
24
|
+
</Textarea.Hint>
|
|
22
25
|
</Textarea.Root>
|
|
23
26
|
<div className={styles.blockSpacer}>
|
|
24
27
|
<Textarea.Root autoResize={false} placeholder="Fixed height; native resize handle">
|