@startupjs-ui/array-input 0.1.13 → 0.1.16
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/README.mdx +9 -4
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [0.1.16](https://github.com/startupjs/startupjs-ui/compare/v0.1.15...v0.1.16) (2026-02-10)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @startupjs-ui/array-input
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
## [0.1.13](https://github.com/startupjs/startupjs-ui/compare/v0.1.12...v0.1.13) (2026-02-03)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @startupjs-ui/array-input
|
package/README.mdx
CHANGED
|
@@ -4,11 +4,9 @@ import { Sandbox } from '@startupjs-ui/docs'
|
|
|
4
4
|
|
|
5
5
|
# ArrayInput
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
A dynamic list input that lets users add, edit, and remove items in an array. Each item is rendered using a declarative input descriptor, so you can build flexible repeating form fields with minimal code.
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
Possible types are: [array](/docs/forms/Array), [checkbox](/docs/forms/Checkbox), [date](/docs/forms/DateTimePicker), [datetime](/docs/forms/DateTimePicker), [multiselect](/docs/forms/Multiselect), [number](/docs/forms/NumberInput), [object](/docs/forms/ObjectInput), [password](/docs/forms/PasswordInput), [radio](/docs/forms/Radio), [select](/docs/forms/Select), [time](/docs/forms/DateTimePicker), [text](/docs/forms/TextInput).
|
|
9
|
+
The `items` prop accepts an input metadata object with a `type` key that specifies the kind of input to display for each array element. Supported types are: [array](/docs/forms/Array), [checkbox](/docs/forms/Checkbox), [date](/docs/forms/DateTimePicker), [datetime](/docs/forms/DateTimePicker), [multiselect](/docs/forms/Multiselect), [number](/docs/forms/NumberInput), [object](/docs/forms/ObjectInput), [password](/docs/forms/PasswordInput), [radio](/docs/forms/Radio), [select](/docs/forms/Select), [time](/docs/forms/DateTimePicker), [text](/docs/forms/TextInput).
|
|
12
10
|
|
|
13
11
|
```jsx
|
|
14
12
|
import { ArrayInput } from 'startupjs-ui'
|
|
@@ -16,6 +14,8 @@ import { ArrayInput } from 'startupjs-ui'
|
|
|
16
14
|
|
|
17
15
|
## Simple example
|
|
18
16
|
|
|
17
|
+
Bind the array data with `$value` (a two-way observable model) and describe each item's input type via `items`. An empty input row is automatically appended so users can add new entries. Each existing item has a remove button.
|
|
18
|
+
|
|
19
19
|
```jsx example
|
|
20
20
|
const $value = $(['Green', 'Blue'])
|
|
21
21
|
return (
|
|
@@ -26,6 +26,11 @@ return (
|
|
|
26
26
|
)
|
|
27
27
|
```
|
|
28
28
|
|
|
29
|
+
## Additional props
|
|
30
|
+
|
|
31
|
+
- `style` -- custom styles applied to the outer wrapper
|
|
32
|
+
- `inputStyle` -- custom styles applied to the inner input container
|
|
33
|
+
|
|
29
34
|
## Sandbox
|
|
30
35
|
|
|
31
36
|
export function SandboxWrapper () {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@startupjs-ui/array-input",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.16",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -8,15 +8,15 @@
|
|
|
8
8
|
"types": "index.d.ts",
|
|
9
9
|
"type": "module",
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@startupjs-ui/button": "^0.1.
|
|
11
|
+
"@startupjs-ui/button": "^0.1.16",
|
|
12
12
|
"@startupjs-ui/core": "^0.1.11",
|
|
13
|
-
"@startupjs-ui/div": "^0.1.
|
|
14
|
-
"@startupjs-ui/input": "^0.1.
|
|
13
|
+
"@startupjs-ui/div": "^0.1.16",
|
|
14
|
+
"@startupjs-ui/input": "^0.1.16"
|
|
15
15
|
},
|
|
16
16
|
"peerDependencies": {
|
|
17
17
|
"react": "*",
|
|
18
18
|
"react-native": "*",
|
|
19
19
|
"startupjs": "*"
|
|
20
20
|
},
|
|
21
|
-
"gitHead": "
|
|
21
|
+
"gitHead": "9943aa3566d5d80f5b404473906eb3c0611f9ee5"
|
|
22
22
|
}
|