@startupjs-ui/text-input 0.1.13 → 0.1.19
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 +19 -0
- package/README.mdx +13 -6
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,25 @@
|
|
|
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.19](https://github.com/startupjs/startupjs-ui/compare/v0.1.18...v0.1.19) (2026-03-17)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **docs:** don't load all icons to keep bundle small ([#17](https://github.com/startupjs/startupjs-ui/issues/17)) ([d7eb70b](https://github.com/startupjs/startupjs-ui/commit/d7eb70bc11f5b15923f2e43b7ef1f86ea066494e))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## [0.1.16](https://github.com/startupjs/startupjs-ui/compare/v0.1.15...v0.1.16) (2026-02-10)
|
|
18
|
+
|
|
19
|
+
**Note:** Version bump only for package @startupjs-ui/text-input
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
6
25
|
## [0.1.13](https://github.com/startupjs/startupjs-ui/compare/v0.1.12...v0.1.13) (2026-02-03)
|
|
7
26
|
|
|
8
27
|
**Note:** Version bump only for package @startupjs-ui/text-input
|
package/README.mdx
CHANGED
|
@@ -2,13 +2,16 @@ import { useState } from 'react'
|
|
|
2
2
|
import TextInput, { _PropsJsonSchema as TextInputPropsJsonSchema } from './index'
|
|
3
3
|
import Div from '@startupjs-ui/div'
|
|
4
4
|
import Br from '@startupjs-ui/br'
|
|
5
|
-
import { faSearch
|
|
5
|
+
import { faSearch } from '@fortawesome/free-solid-svg-icons/faSearch'
|
|
6
|
+
import { faTimesCircle } from '@fortawesome/free-solid-svg-icons/faTimesCircle'
|
|
6
7
|
import { Sandbox } from '@startupjs-ui/docs'
|
|
7
8
|
import './index.mdx.cssx.styl'
|
|
8
9
|
|
|
9
10
|
# TextInput
|
|
10
11
|
|
|
11
|
-
TextInput lets user enter or edit text.
|
|
12
|
+
TextInput lets the user enter or edit text. Use the `value` prop for the current text and the `onChangeText` callback to handle changes.
|
|
13
|
+
|
|
14
|
+
The component also accepts `style` for the wrapper, `inputStyle` for the input element, `placeholder` for placeholder text, `ref` for imperative access, `testID` for testing, and `onFocus`/`onBlur` for focus events.
|
|
12
15
|
|
|
13
16
|
```jsx
|
|
14
17
|
import { TextInput } from 'startupjs-ui'
|
|
@@ -29,6 +32,8 @@ return (
|
|
|
29
32
|
|
|
30
33
|
## Disabled
|
|
31
34
|
|
|
35
|
+
When the `disabled` prop is set, the input becomes non-interactive.
|
|
36
|
+
|
|
32
37
|
```jsx example
|
|
33
38
|
return (
|
|
34
39
|
<TextInput
|
|
@@ -40,6 +45,8 @@ return (
|
|
|
40
45
|
|
|
41
46
|
## Readonly
|
|
42
47
|
|
|
48
|
+
When the `readonly` prop is set, the value is displayed as plain text.
|
|
49
|
+
|
|
43
50
|
```jsx example
|
|
44
51
|
return (
|
|
45
52
|
<TextInput
|
|
@@ -51,7 +58,7 @@ return (
|
|
|
51
58
|
|
|
52
59
|
## Sizes
|
|
53
60
|
|
|
54
|
-
|
|
61
|
+
The input size can be changed using the `size` prop. The default size is `'m'`.
|
|
55
62
|
|
|
56
63
|
```jsx example
|
|
57
64
|
const [valueL, setValueL] = useState()
|
|
@@ -82,7 +89,7 @@ return (
|
|
|
82
89
|
|
|
83
90
|
## Icons
|
|
84
91
|
|
|
85
|
-
|
|
92
|
+
An icon can be added using the `icon` prop, and a secondary icon using `secondaryIcon`. The primary icon's position is controlled by `iconPosition` (`'left'` by default), and the secondary icon is placed on the opposite side. Use `onIconPress` and `onSecondaryIconPress` to handle clicks on the icons. To customize icon styles, use the `iconStyle` and `secondaryIconStyle` props.
|
|
86
93
|
|
|
87
94
|
In `.styl` file
|
|
88
95
|
```stylus
|
|
@@ -117,7 +124,7 @@ return (
|
|
|
117
124
|
|
|
118
125
|
## Number of lines
|
|
119
126
|
|
|
120
|
-
Pass `numberOfLines
|
|
127
|
+
Pass `numberOfLines` to set the number of visible lines. This makes the input multiline.
|
|
121
128
|
|
|
122
129
|
```jsx example
|
|
123
130
|
const [value, setValue] = useState()
|
|
@@ -134,7 +141,7 @@ return (
|
|
|
134
141
|
|
|
135
142
|
## Dynamic number of lines
|
|
136
143
|
|
|
137
|
-
Pass `resize
|
|
144
|
+
Pass the `resize` prop to dynamically adjust the number of lines based on the content.
|
|
138
145
|
|
|
139
146
|
```jsx example
|
|
140
147
|
const [value, setValue] = useState()
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@startupjs-ui/text-input",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.19",
|
|
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/core": "^0.1.
|
|
12
|
-
"@startupjs-ui/div": "^0.1.
|
|
13
|
-
"@startupjs-ui/icon": "^0.1.
|
|
14
|
-
"@startupjs-ui/span": "^0.1.
|
|
11
|
+
"@startupjs-ui/core": "^0.1.19",
|
|
12
|
+
"@startupjs-ui/div": "^0.1.19",
|
|
13
|
+
"@startupjs-ui/icon": "^0.1.19",
|
|
14
|
+
"@startupjs-ui/span": "^0.1.19"
|
|
15
15
|
},
|
|
16
16
|
"peerDependencies": {
|
|
17
17
|
"react": "*",
|
|
18
18
|
"react-native": "*",
|
|
19
19
|
"startupjs": "*"
|
|
20
20
|
},
|
|
21
|
-
"gitHead": "
|
|
21
|
+
"gitHead": "bfcca786dc363f42a09b6eef4feb7ca8139302fc"
|
|
22
22
|
}
|