@spark-web/text-input 2.0.3 → 2.0.4
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 +311 -0
- package/README.md +2 -15
- package/dist/declarations/src/{childrenToAdornments.d.ts → children-to-adornments.d.ts} +1 -1
- package/dist/declarations/src/index.d.ts +6 -6
- package/dist/declarations/src/{InputAdornment.d.ts → input-adornment.d.ts} +0 -0
- package/dist/declarations/src/{InputContainer.d.ts → input-container.d.ts} +1 -1
- package/dist/declarations/src/{TextInput.d.ts → text-input.d.ts} +5 -3
- package/dist/spark-web-text-input.cjs.dev.js +3 -5
- package/dist/spark-web-text-input.cjs.prod.js +3 -5
- package/dist/spark-web-text-input.esm.js +3 -5
- package/package.json +18 -11
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
# @spark-web/text-input
|
|
2
|
+
|
|
3
|
+
## 2.0.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#246](https://github.com/brighte-labs/spark-web/pull/246)
|
|
8
|
+
[`de99b9c`](https://github.com/brighte-labs/spark-web/commit/de99b9c7f72373bd1902cf67f5cfec9a1e1db01c)
|
|
9
|
+
Thanks [@lukebennett88](https://github.com/lukebennett88)! - Remove
|
|
10
|
+
destructuring from theme object
|
|
11
|
+
|
|
12
|
+
- [#218](https://github.com/brighte-labs/spark-web/pull/218)
|
|
13
|
+
[`6fc8d1b`](https://github.com/brighte-labs/spark-web/commit/6fc8d1bc37e25d0cd622bc37f68a1d92eb5961b5)
|
|
14
|
+
Thanks [@nderkim](https://github.com/nderkim)! - Rename files to kebab case
|
|
15
|
+
|
|
16
|
+
- [#222](https://github.com/brighte-labs/spark-web/pull/222)
|
|
17
|
+
[`7f93c45`](https://github.com/brighte-labs/spark-web/commit/7f93c45bbae8c765e10df9d0dd7615473797749b)
|
|
18
|
+
Thanks [@lukebennett88](https://github.com/lukebennett88)! - Update
|
|
19
|
+
dependencies
|
|
20
|
+
|
|
21
|
+
- [#242](https://github.com/brighte-labs/spark-web/pull/242)
|
|
22
|
+
[`6df05f7`](https://github.com/brighte-labs/spark-web/commit/6df05f764e4181c140d6547d6b897d0210468f6a)
|
|
23
|
+
Thanks [@lukebennett88](https://github.com/lukebennett88)! - - Add homepage
|
|
24
|
+
and repository keys to package.json
|
|
25
|
+
- Add CHANGELOG and README to files key in package.json
|
|
26
|
+
- Updated dependencies
|
|
27
|
+
[[`adc5e9e`](https://github.com/brighte-labs/spark-web/commit/adc5e9e6c99acd117f3261edcefdb5573132441b),
|
|
28
|
+
[`de99b9c`](https://github.com/brighte-labs/spark-web/commit/de99b9c7f72373bd1902cf67f5cfec9a1e1db01c),
|
|
29
|
+
[`6fc8d1b`](https://github.com/brighte-labs/spark-web/commit/6fc8d1bc37e25d0cd622bc37f68a1d92eb5961b5),
|
|
30
|
+
[`7f93c45`](https://github.com/brighte-labs/spark-web/commit/7f93c45bbae8c765e10df9d0dd7615473797749b),
|
|
31
|
+
[`62f7de8`](https://github.com/brighte-labs/spark-web/commit/62f7de8a2e1df5ae088c093d3acdaa868d3f61fe),
|
|
32
|
+
[`6df05f7`](https://github.com/brighte-labs/spark-web/commit/6df05f764e4181c140d6547d6b897d0210468f6a)]:
|
|
33
|
+
- @spark-web/box@1.1.0
|
|
34
|
+
- @spark-web/field@3.0.6
|
|
35
|
+
- @spark-web/text@1.1.2
|
|
36
|
+
- @spark-web/a11y@1.3.2
|
|
37
|
+
- @spark-web/theme@3.1.0
|
|
38
|
+
- @spark-web/utils@1.2.3
|
|
39
|
+
|
|
40
|
+
## 2.0.3
|
|
41
|
+
|
|
42
|
+
### Patch Changes
|
|
43
|
+
|
|
44
|
+
- [#208](https://github.com/brighte-labs/spark-web/pull/208)
|
|
45
|
+
[`1ea26ef`](https://github.com/brighte-labs/spark-web/commit/1ea26ef04a3b45875ed0dd2326eeab1fbe1e4bc5)
|
|
46
|
+
Thanks [@lukebennett88](https://github.com/lukebennett88)! - Lower required
|
|
47
|
+
node version
|
|
48
|
+
|
|
49
|
+
- Updated dependencies
|
|
50
|
+
[[`1ea26ef`](https://github.com/brighte-labs/spark-web/commit/1ea26ef04a3b45875ed0dd2326eeab1fbe1e4bc5)]:
|
|
51
|
+
- @spark-web/a11y@1.3.1
|
|
52
|
+
- @spark-web/box@1.0.9
|
|
53
|
+
- @spark-web/field@3.0.5
|
|
54
|
+
- @spark-web/text@1.1.1
|
|
55
|
+
- @spark-web/theme@3.0.6
|
|
56
|
+
- @spark-web/utils@1.2.2
|
|
57
|
+
|
|
58
|
+
## 2.0.2
|
|
59
|
+
|
|
60
|
+
### Patch Changes
|
|
61
|
+
|
|
62
|
+
- [#197](https://github.com/brighte-labs/spark-web/pull/197)
|
|
63
|
+
[`94016d8`](https://github.com/brighte-labs/spark-web/commit/94016d84e26bbe55833bbcbab847a2cce6041538)
|
|
64
|
+
Thanks [@lukebennett88](https://github.com/lukebennett88)! - Update packages
|
|
65
|
+
|
|
66
|
+
- Updated dependencies
|
|
67
|
+
[[`51b6c7a`](https://github.com/brighte-labs/spark-web/commit/51b6c7a43f441e02b90403b13af9cfa11e5438ef),
|
|
68
|
+
[`9ff0c4b`](https://github.com/brighte-labs/spark-web/commit/9ff0c4b4cc83e0e1ab609d0bcdb01458b654263e),
|
|
69
|
+
[`94016d8`](https://github.com/brighte-labs/spark-web/commit/94016d84e26bbe55833bbcbab847a2cce6041538)]:
|
|
70
|
+
- @spark-web/a11y@1.3.0
|
|
71
|
+
- @spark-web/text@1.1.0
|
|
72
|
+
- @spark-web/box@1.0.8
|
|
73
|
+
- @spark-web/field@3.0.4
|
|
74
|
+
- @spark-web/theme@3.0.5
|
|
75
|
+
- @spark-web/utils@1.2.1
|
|
76
|
+
|
|
77
|
+
## 2.0.1
|
|
78
|
+
|
|
79
|
+
### Patch Changes
|
|
80
|
+
|
|
81
|
+
- [#173](https://github.com/brighte-labs/spark-web/pull/173)
|
|
82
|
+
[`90b7e9c`](https://github.com/brighte-labs/spark-web/commit/90b7e9cf4eb7e864d765c74b22c3dedf3d262e25)
|
|
83
|
+
Thanks [@lukebennett88](https://github.com/lukebennett88)! - Update babel
|
|
84
|
+
dependency
|
|
85
|
+
|
|
86
|
+
* [#178](https://github.com/brighte-labs/spark-web/pull/178)
|
|
87
|
+
[`c3867af`](https://github.com/brighte-labs/spark-web/commit/c3867af7b77dfae3580ab63a5d5c9e8452f2da62)
|
|
88
|
+
Thanks [@lukebennett88](https://github.com/lukebennett88)! - Switch from using
|
|
89
|
+
`:invalid` pseudo-class to using data-attribute for invalid styles of inputs
|
|
90
|
+
* Updated dependencies
|
|
91
|
+
[[`90b7e9c`](https://github.com/brighte-labs/spark-web/commit/90b7e9cf4eb7e864d765c74b22c3dedf3d262e25),
|
|
92
|
+
[`be99536`](https://github.com/brighte-labs/spark-web/commit/be99536abb56dd26e5c9a1703e6df9c7860b449b),
|
|
93
|
+
[`c3867af`](https://github.com/brighte-labs/spark-web/commit/c3867af7b77dfae3580ab63a5d5c9e8452f2da62)]:
|
|
94
|
+
- @spark-web/a11y@1.2.0
|
|
95
|
+
- @spark-web/box@1.0.7
|
|
96
|
+
- @spark-web/field@3.0.3
|
|
97
|
+
- @spark-web/text@1.0.7
|
|
98
|
+
- @spark-web/theme@3.0.3
|
|
99
|
+
- @spark-web/utils@1.2.0
|
|
100
|
+
|
|
101
|
+
## 2.0.0
|
|
102
|
+
|
|
103
|
+
### Major Changes
|
|
104
|
+
|
|
105
|
+
- [#158](https://github.com/brighte-labs/spark-web/pull/158)
|
|
106
|
+
[`550b4b0`](https://github.com/brighte-labs/spark-web/commit/550b4b0509aba1f37d20fa8205ae01b2383eec5e)
|
|
107
|
+
Thanks [@lukebennett88](https://github.com/lukebennett88)! - Rename useInput
|
|
108
|
+
to useInputStyles which now returns a tuple (boxProps and CSS object) and adds
|
|
109
|
+
box shadow
|
|
110
|
+
|
|
111
|
+
### Patch Changes
|
|
112
|
+
|
|
113
|
+
- [#148](https://github.com/brighte-labs/spark-web/pull/148)
|
|
114
|
+
[`ad02c82`](https://github.com/brighte-labs/spark-web/commit/ad02c8279d3813956d9372db5a69c361482b7f72)
|
|
115
|
+
Thanks [@lukebennett88](https://github.com/lukebennett88)! - Make Field a peer
|
|
116
|
+
dep to avoid context bug
|
|
117
|
+
|
|
118
|
+
* [#154](https://github.com/brighte-labs/spark-web/pull/154)
|
|
119
|
+
[`2ba486a`](https://github.com/brighte-labs/spark-web/commit/2ba486a504bd0704935aaad2b8442907dc1899ac)
|
|
120
|
+
Thanks [@lukebennett88](https://github.com/lukebennett88)! - Enable text
|
|
121
|
+
truncation when input value is too long
|
|
122
|
+
|
|
123
|
+
- [#167](https://github.com/brighte-labs/spark-web/pull/167)
|
|
124
|
+
[`4f79350`](https://github.com/brighte-labs/spark-web/commit/4f793508fdb43ddd452f0d59a3126101f9fa5459)
|
|
125
|
+
Thanks [@lukebennett88](https://github.com/lukebennett88)! - Update Babel
|
|
126
|
+
|
|
127
|
+
- Updated dependencies
|
|
128
|
+
[[`4f79350`](https://github.com/brighte-labs/spark-web/commit/4f793508fdb43ddd452f0d59a3126101f9fa5459),
|
|
129
|
+
[`f524009`](https://github.com/brighte-labs/spark-web/commit/f5240098cf731b0a2e351b7b585711e893a33736),
|
|
130
|
+
[`60f7281`](https://github.com/brighte-labs/spark-web/commit/60f7281c4a194d934a2ce561cad47e737b0fb48e)]:
|
|
131
|
+
- @spark-web/a11y@1.1.0
|
|
132
|
+
- @spark-web/box@1.0.6
|
|
133
|
+
- @spark-web/field@3.0.1
|
|
134
|
+
- @spark-web/text@1.0.6
|
|
135
|
+
- @spark-web/theme@3.0.2
|
|
136
|
+
- @spark-web/utils@1.1.5
|
|
137
|
+
|
|
138
|
+
## 1.2.1
|
|
139
|
+
|
|
140
|
+
### Patch Changes
|
|
141
|
+
|
|
142
|
+
- Updated dependencies
|
|
143
|
+
[[`3db131b`](https://github.com/brighte-labs/spark-web/commit/3db131bfadbc4149d05b7c74be1a3e68cdd5b18f)]:
|
|
144
|
+
- @spark-web/field@3.0.0
|
|
145
|
+
|
|
146
|
+
## 1.2.0
|
|
147
|
+
|
|
148
|
+
### Minor Changes
|
|
149
|
+
|
|
150
|
+
- [#101](https://github.com/brighte-labs/spark-web/pull/101)
|
|
151
|
+
[`08752c3`](https://github.com/brighte-labs/spark-web/commit/08752c350b53cde0657ec32f03f9932dec835e33)
|
|
152
|
+
Thanks [@lukebennett88](https://github.com/lukebennett88)! - Create
|
|
153
|
+
InputContainer component and update focus and disabled styles
|
|
154
|
+
|
|
155
|
+
### Patch Changes
|
|
156
|
+
|
|
157
|
+
- [#105](https://github.com/brighte-labs/spark-web/pull/105)
|
|
158
|
+
[`27bc235`](https://github.com/brighte-labs/spark-web/commit/27bc235168b09bf8c03710b5fcde6ea0fd70824c)
|
|
159
|
+
Thanks [@nderkim](https://github.com/nderkim)! - Fix TextInput type
|
|
160
|
+
|
|
161
|
+
* [#113](https://github.com/brighte-labs/spark-web/pull/113)
|
|
162
|
+
[`156236d`](https://github.com/brighte-labs/spark-web/commit/156236d2474aee66a0b8e2030635f9c08a5b78ba)
|
|
163
|
+
Thanks [@lukebennett88](https://github.com/lukebennett88)! - Update
|
|
164
|
+
dependencies
|
|
165
|
+
|
|
166
|
+
- [#108](https://github.com/brighte-labs/spark-web/pull/108)
|
|
167
|
+
[`efa263a`](https://github.com/brighte-labs/spark-web/commit/efa263aee2c33297edb19203ae1d82abd99d298d)
|
|
168
|
+
Thanks [@lukebennett88](https://github.com/lukebennett88)! - Refactor to work
|
|
169
|
+
with updated field context
|
|
170
|
+
|
|
171
|
+
- Updated dependencies
|
|
172
|
+
[[`08752c3`](https://github.com/brighte-labs/spark-web/commit/08752c350b53cde0657ec32f03f9932dec835e33),
|
|
173
|
+
[`efa263a`](https://github.com/brighte-labs/spark-web/commit/efa263aee2c33297edb19203ae1d82abd99d298d),
|
|
174
|
+
[`156236d`](https://github.com/brighte-labs/spark-web/commit/156236d2474aee66a0b8e2030635f9c08a5b78ba)]:
|
|
175
|
+
- @spark-web/a11y@1.0.5
|
|
176
|
+
- @spark-web/field@2.0.0
|
|
177
|
+
- @spark-web/box@1.0.5
|
|
178
|
+
- @spark-web/text@1.0.5
|
|
179
|
+
- @spark-web/theme@3.0.1
|
|
180
|
+
- @spark-web/utils@1.1.3
|
|
181
|
+
|
|
182
|
+
## 1.1.1
|
|
183
|
+
|
|
184
|
+
### Patch Changes
|
|
185
|
+
|
|
186
|
+
- [#94](https://github.com/brighte-labs/spark-web/pull/94)
|
|
187
|
+
[`4ad9817`](https://github.com/brighte-labs/spark-web/commit/4ad9817d1f7acdecd3c8bbb3be517f5c11fe8d4b)
|
|
188
|
+
Thanks [@lukebennett88](https://github.com/lukebennett88)! - Fix alignment of
|
|
189
|
+
icon adornments
|
|
190
|
+
|
|
191
|
+
* [#98](https://github.com/brighte-labs/spark-web/pull/98)
|
|
192
|
+
[`4750af7`](https://github.com/brighte-labs/spark-web/commit/4750af73f0e3a82ebde940cb13659a21c7e88007)
|
|
193
|
+
Thanks [@lukebennett88](https://github.com/lukebennett88)! - Add aria-invalid
|
|
194
|
+
attribute
|
|
195
|
+
|
|
196
|
+
- [#72](https://github.com/brighte-labs/spark-web/pull/72)
|
|
197
|
+
[`dc53688`](https://github.com/brighte-labs/spark-web/commit/dc53688cc271316f00ef25f101e94c3891f4f75d)
|
|
198
|
+
Thanks [@matildaPan](https://github.com/matildaPan)! - Add name and required
|
|
199
|
+
to valid TextInput props
|
|
200
|
+
|
|
201
|
+
## 1.1.0
|
|
202
|
+
|
|
203
|
+
### Minor Changes
|
|
204
|
+
|
|
205
|
+
- [#50](https://github.com/brighte-labs/spark-web/pull/50)
|
|
206
|
+
[`60372d0`](https://github.com/brighte-labs/spark-web/commit/60372d0538fe5e141c8dabc1b20c8e09d1f56c70)
|
|
207
|
+
Thanks [@justinfaynhan](https://github.com/justinfaynhan)! - Added new
|
|
208
|
+
currency input component. Some changes have been made to its underlying base
|
|
209
|
+
textinput component to provide functionality to accomodate the adornments, in
|
|
210
|
+
this case, a starting adornment currency symbol.
|
|
211
|
+
|
|
212
|
+
### Patch Changes
|
|
213
|
+
|
|
214
|
+
- [#87](https://github.com/brighte-labs/spark-web/pull/87)
|
|
215
|
+
[`5744b68`](https://github.com/brighte-labs/spark-web/commit/5744b6820f626b93a14e11e1fbd96bcbe1b12b27)
|
|
216
|
+
Thanks [@ChristopherMitchell242](https://github.com/ChristopherMitchell242)! -
|
|
217
|
+
Data attribute added to component props to allow consumers to attach
|
|
218
|
+
customattributes to components
|
|
219
|
+
|
|
220
|
+
* [#52](https://github.com/brighte-labs/spark-web/pull/52)
|
|
221
|
+
[`82ab744`](https://github.com/brighte-labs/spark-web/commit/82ab744f198466810f3386bc459b8ab4d57c820e)
|
|
222
|
+
Thanks [@lukebennett88](https://github.com/lukebennett88)! - Add files array
|
|
223
|
+
to package.json files
|
|
224
|
+
|
|
225
|
+
* Updated dependencies
|
|
226
|
+
[[`60372d0`](https://github.com/brighte-labs/spark-web/commit/60372d0538fe5e141c8dabc1b20c8e09d1f56c70),
|
|
227
|
+
[`1ef4f82`](https://github.com/brighte-labs/spark-web/commit/1ef4f82df999c487b79cd216c17ca5735e444fc5),
|
|
228
|
+
[`182a53a`](https://github.com/brighte-labs/spark-web/commit/182a53a484892df48754e89dd714459a7f69fcff),
|
|
229
|
+
[`5744b68`](https://github.com/brighte-labs/spark-web/commit/5744b6820f626b93a14e11e1fbd96bcbe1b12b27),
|
|
230
|
+
[`82ab744`](https://github.com/brighte-labs/spark-web/commit/82ab744f198466810f3386bc459b8ab4d57c820e),
|
|
231
|
+
[`df618d9`](https://github.com/brighte-labs/spark-web/commit/df618d92d534e06f06ecedc95ea6bdd51cdc906b)]:
|
|
232
|
+
- @spark-web/field@1.1.0
|
|
233
|
+
- @spark-web/text@1.0.4
|
|
234
|
+
- @spark-web/theme@3.0.0
|
|
235
|
+
- @spark-web/a11y@1.0.4
|
|
236
|
+
- @spark-web/box@1.0.4
|
|
237
|
+
- @spark-web/utils@1.1.2
|
|
238
|
+
|
|
239
|
+
## 1.0.3
|
|
240
|
+
|
|
241
|
+
### Patch Changes
|
|
242
|
+
|
|
243
|
+
- [#42](https://github.com/brighte-labs/spark-web/pull/42)
|
|
244
|
+
[`435779a`](https://github.com/brighte-labs/spark-web/commit/435779aa42bd635bbf43e1fd41724c666402caa2)
|
|
245
|
+
Thanks [@lukebennett88](https://github.com/lukebennett88)! - Prevent multiple
|
|
246
|
+
versions of React
|
|
247
|
+
|
|
248
|
+
- Updated dependencies
|
|
249
|
+
[[`435779a`](https://github.com/brighte-labs/spark-web/commit/435779aa42bd635bbf43e1fd41724c666402caa2)]:
|
|
250
|
+
- @spark-web/a11y@1.0.3
|
|
251
|
+
- @spark-web/box@1.0.3
|
|
252
|
+
- @spark-web/field@1.0.3
|
|
253
|
+
- @spark-web/text@1.0.3
|
|
254
|
+
- @spark-web/theme@2.0.2
|
|
255
|
+
- @spark-web/utils@1.1.1
|
|
256
|
+
|
|
257
|
+
## 1.0.2
|
|
258
|
+
|
|
259
|
+
### Patch Changes
|
|
260
|
+
|
|
261
|
+
- [#40](https://github.com/brighte-labs/spark-web/pull/40)
|
|
262
|
+
[`062c8ab`](https://github.com/brighte-labs/spark-web/commit/062c8ab8c7b4120f8d14c269b5f7801288c678ca)
|
|
263
|
+
Thanks [@lukebennett88](https://github.com/lukebennett88)! - Add
|
|
264
|
+
@babel/transform-runtime
|
|
265
|
+
|
|
266
|
+
- Updated dependencies
|
|
267
|
+
[[`062c8ab`](https://github.com/brighte-labs/spark-web/commit/062c8ab8c7b4120f8d14c269b5f7801288c678ca)]:
|
|
268
|
+
- @spark-web/a11y@1.0.2
|
|
269
|
+
- @spark-web/box@1.0.2
|
|
270
|
+
- @spark-web/field@1.0.2
|
|
271
|
+
- @spark-web/text@1.0.2
|
|
272
|
+
- @spark-web/theme@2.0.1
|
|
273
|
+
- @spark-web/utils@1.0.2
|
|
274
|
+
|
|
275
|
+
## 1.0.1
|
|
276
|
+
|
|
277
|
+
### Patch Changes
|
|
278
|
+
|
|
279
|
+
- [#36](https://github.com/brighte-labs/spark-web/pull/36)
|
|
280
|
+
[`8546f8f`](https://github.com/brighte-labs/spark-web/commit/8546f8f05daaa79ea3ff954c6c4928a7a2d0622d)
|
|
281
|
+
Thanks [@lukebennett88](https://github.com/lukebennett88)! - Update Babel
|
|
282
|
+
config
|
|
283
|
+
|
|
284
|
+
- Updated dependencies
|
|
285
|
+
[[`aebff30`](https://github.com/brighte-labs/spark-web/commit/aebff30c86cb0a9db22b545c46159ce0d1c14afb),
|
|
286
|
+
[`8546f8f`](https://github.com/brighte-labs/spark-web/commit/8546f8f05daaa79ea3ff954c6c4928a7a2d0622d)]:
|
|
287
|
+
- @spark-web/theme@2.0.0
|
|
288
|
+
- @spark-web/a11y@1.0.1
|
|
289
|
+
- @spark-web/box@1.0.1
|
|
290
|
+
- @spark-web/field@1.0.1
|
|
291
|
+
- @spark-web/text@1.0.1
|
|
292
|
+
- @spark-web/utils@1.0.1
|
|
293
|
+
|
|
294
|
+
## 1.0.0
|
|
295
|
+
|
|
296
|
+
### Major Changes
|
|
297
|
+
|
|
298
|
+
- [#27](https://github.com/brighte-labs/spark-web/pull/27)
|
|
299
|
+
[`4c8e398`](https://github.com/brighte-labs/spark-web/commit/4c8e3988f8a59d3dab60a6b67b1128b6ff2a5f2c)
|
|
300
|
+
Thanks [@JedWatson](https://github.com/JedWatson)! - Initial Version
|
|
301
|
+
|
|
302
|
+
### Patch Changes
|
|
303
|
+
|
|
304
|
+
- Updated dependencies
|
|
305
|
+
[[`4c8e398`](https://github.com/brighte-labs/spark-web/commit/4c8e3988f8a59d3dab60a6b67b1128b6ff2a5f2c)]:
|
|
306
|
+
- @spark-web/a11y@1.0.0
|
|
307
|
+
- @spark-web/box@1.0.0
|
|
308
|
+
- @spark-web/field@1.0.0
|
|
309
|
+
- @spark-web/text@1.0.0
|
|
310
|
+
- @spark-web/theme@1.0.0
|
|
311
|
+
- @spark-web/utils@1.0.0
|
package/README.md
CHANGED
|
@@ -100,17 +100,7 @@ slots to place the start and end adornments.
|
|
|
100
100
|
|
|
101
101
|
### TextInput
|
|
102
102
|
|
|
103
|
-
|
|
104
|
-
| ------------ | ----------------------------------------------------------------------------------- | ------- | -------------------------------------------------------------------------------------------- |
|
|
105
|
-
| data? | [DataAttributeMap][data-attribute-map] | | Sets data attributes for the component. |
|
|
106
|
-
| type? | 'text' \| 'password' \| 'email' \| 'search' \| 'number' \| 'tel' \| 'url' | 'text' | Sets the type attribute for the component. |
|
|
107
|
-
| mode? | 'none' \| 'text' \| 'tel' \| 'url' \| 'email' \| 'numeric' \| 'decimal' \| 'search' | | Sets the input mode attribute for the component. |
|
|
108
|
-
| onBlur? | React.FocusEventHandler\<HTMLInputElement\> | | Callback function when input field component loses focuses. |
|
|
109
|
-
| onFocus? | React.FocusEventHandler\<HTMLInputElement\> | | Callback function when the input field component is in focus. |
|
|
110
|
-
| onChange? | React.FormEventHandler\<HTMLInputElement\> | | Callback function when value of the input field has been changed. |
|
|
111
|
-
| placeholder? | string | | Specifies a short hint that describes the expected value (type of value) of the input field. |
|
|
112
|
-
| value? | string \| number \| readonly string[] | | Specifies the value of the input field. |
|
|
113
|
-
| children? | [AdornmentChildren][adornment-children] | | Allows setting of adornments at the start and/or end of the input component. |
|
|
103
|
+
<PropsTable displayName="TextInput" />
|
|
114
104
|
|
|
115
105
|
[data-attribute-map]:
|
|
116
106
|
https://github.com/brighte-labs/spark-web/blob/e7f6f4285b4cfd876312cc89fbdd094039aa239a/packages/utils/src/internal/buildDataAttributes.ts#L1
|
|
@@ -119,9 +109,6 @@ slots to place the start and end adornments.
|
|
|
119
109
|
|
|
120
110
|
### InputContainer
|
|
121
111
|
|
|
122
|
-
|
|
123
|
-
| --------------- | ----------------------------------- | ------- | ------------------------------- |
|
|
124
|
-
| startAdornment? | ReactElement\<InputAdornmentProps\> | | Slot to start render adornment. |
|
|
125
|
-
| endAdornment? | ReactElement\<InputAdornmentProps\> | | Slot to end render adornment. |
|
|
112
|
+
<PropsTable displayName="InputContainer" />
|
|
126
113
|
|
|
127
114
|
Extra props are passed into the underlying [`Box`](/package/box) component.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ReactElement } from 'react';
|
|
2
|
-
import type { InputAdornmentProps } from './
|
|
2
|
+
import type { InputAdornmentProps } from './input-adornment';
|
|
3
3
|
export declare type AdornmentChild = ReactElement<InputAdornmentProps> | null | undefined;
|
|
4
4
|
export declare type AdornmentsAsChildren = AdornmentChild | [AdornmentChild, AdornmentChild];
|
|
5
5
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { InputAdornment } from './
|
|
2
|
-
export { InputContainer } from './
|
|
3
|
-
export { TextInput, useInputStyles } from './
|
|
4
|
-
export type { AdornmentChild } from './
|
|
5
|
-
export type { InputContainerProps } from './
|
|
6
|
-
export type { TextInputProps, UseInputStylesProps } from './
|
|
1
|
+
export { InputAdornment } from './input-adornment';
|
|
2
|
+
export { InputContainer } from './input-container';
|
|
3
|
+
export { TextInput, useInputStyles } from './text-input';
|
|
4
|
+
export type { AdornmentChild } from './children-to-adornments';
|
|
5
|
+
export type { InputContainerProps } from './input-container';
|
|
6
|
+
export type { TextInputProps, UseInputStylesProps } from './text-input';
|
|
File without changes
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { BoxProps } from '@spark-web/box';
|
|
2
2
|
import type { ReactElement } from 'react';
|
|
3
|
-
import type { InputAdornmentProps } from './
|
|
3
|
+
import type { InputAdornmentProps } from './input-adornment';
|
|
4
4
|
export declare type InputContainerProps = {
|
|
5
5
|
/** Slot to start render adornment. */
|
|
6
6
|
startAdornment?: ReactElement<InputAdornmentProps> | null;
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import type { FieldState } from '@spark-web/field';
|
|
2
2
|
import type { DataAttributeMap } from '@spark-web/utils/internal';
|
|
3
3
|
import type { InputHTMLAttributes } from 'react';
|
|
4
|
-
import type { AdornmentsAsChildren } from './
|
|
4
|
+
import type { AdornmentsAsChildren } from './children-to-adornments';
|
|
5
5
|
declare type ValidTypes = 'text' | 'password' | 'email' | 'search' | 'number' | 'tel' | 'url';
|
|
6
6
|
declare type ValidModes = 'none' | 'text' | 'tel' | 'url' | 'email' | 'numeric' | 'decimal' | 'search';
|
|
7
7
|
declare type NativeInputProps = Pick<InputHTMLAttributes<HTMLInputElement>, 'name' | 'onBlur' | 'onChange' | 'onFocus' | 'placeholder' | 'value' | 'required'>;
|
|
8
8
|
export declare type TextInputProps = {
|
|
9
|
-
/**
|
|
9
|
+
/** Sets data attributes for the element. */
|
|
10
10
|
data?: DataAttributeMap;
|
|
11
11
|
/**
|
|
12
12
|
* How an input behaves varies considerably depending on the value of its type
|
|
13
13
|
* attribute. If this attribute is not specified, the default type "text".
|
|
14
14
|
*/
|
|
15
15
|
type?: ValidTypes;
|
|
16
|
+
/** Sets the input mode attribute for the component. */
|
|
16
17
|
inputMode?: ValidModes;
|
|
17
18
|
/**
|
|
18
19
|
* Adorn the input with ornamental element(s) to aid user input, or
|
|
@@ -24,13 +25,14 @@ export declare type TextInputProps = {
|
|
|
24
25
|
} & NativeInputProps;
|
|
25
26
|
/** Organize and emphasize information quickly and effectively in a list of text elements. */
|
|
26
27
|
export declare const TextInput: import("react").ForwardRefExoticComponent<{
|
|
27
|
-
/**
|
|
28
|
+
/** Sets data attributes for the element. */
|
|
28
29
|
data?: DataAttributeMap | undefined;
|
|
29
30
|
/**
|
|
30
31
|
* How an input behaves varies considerably depending on the value of its type
|
|
31
32
|
* attribute. If this attribute is not specified, the default type "text".
|
|
32
33
|
*/
|
|
33
34
|
type?: ValidTypes | undefined;
|
|
35
|
+
/** Sets the input mode attribute for the component. */
|
|
34
36
|
inputMode?: ValidModes | undefined;
|
|
35
37
|
/**
|
|
36
38
|
* Adorn the input with ornamental element(s) to aid user input, or
|
|
@@ -48,10 +48,7 @@ var InputAdornment = function InputAdornment(_ref) {
|
|
|
48
48
|
fieldLabel = _ref.fieldLabel,
|
|
49
49
|
placement = _ref.placement,
|
|
50
50
|
raw = _ref.raw;
|
|
51
|
-
|
|
52
|
-
var _useTheme = theme.useTheme(),
|
|
53
|
-
sizing = _useTheme.sizing;
|
|
54
|
-
|
|
51
|
+
var theme$1 = theme.useTheme();
|
|
55
52
|
var adornmentContext = react.useMemo(function () {
|
|
56
53
|
return {
|
|
57
54
|
placement: placement
|
|
@@ -71,7 +68,7 @@ var InputAdornment = function InputAdornment(_ref) {
|
|
|
71
68
|
alignItems: "center",
|
|
72
69
|
justifyContent: "center",
|
|
73
70
|
style: {
|
|
74
|
-
minWidth: sizing.xxsmall
|
|
71
|
+
minWidth: theme$1.sizing.xxsmall
|
|
75
72
|
},
|
|
76
73
|
children: children
|
|
77
74
|
})
|
|
@@ -126,6 +123,7 @@ var InputContainer = function InputContainer(_ref) {
|
|
|
126
123
|
invalid = _useFieldContext2$.invalid;
|
|
127
124
|
|
|
128
125
|
return /*#__PURE__*/jsxRuntime.jsxs(box.Box, _objectSpread(_objectSpread({
|
|
126
|
+
borderRadius: "small",
|
|
129
127
|
position: "relative",
|
|
130
128
|
background: disabled ? 'inputDisabled' : 'input'
|
|
131
129
|
}, boxProps), {}, {
|
|
@@ -48,10 +48,7 @@ var InputAdornment = function InputAdornment(_ref) {
|
|
|
48
48
|
fieldLabel = _ref.fieldLabel,
|
|
49
49
|
placement = _ref.placement,
|
|
50
50
|
raw = _ref.raw;
|
|
51
|
-
|
|
52
|
-
var _useTheme = theme.useTheme(),
|
|
53
|
-
sizing = _useTheme.sizing;
|
|
54
|
-
|
|
51
|
+
var theme$1 = theme.useTheme();
|
|
55
52
|
var adornmentContext = react.useMemo(function () {
|
|
56
53
|
return {
|
|
57
54
|
placement: placement
|
|
@@ -71,7 +68,7 @@ var InputAdornment = function InputAdornment(_ref) {
|
|
|
71
68
|
alignItems: "center",
|
|
72
69
|
justifyContent: "center",
|
|
73
70
|
style: {
|
|
74
|
-
minWidth: sizing.xxsmall
|
|
71
|
+
minWidth: theme$1.sizing.xxsmall
|
|
75
72
|
},
|
|
76
73
|
children: children
|
|
77
74
|
})
|
|
@@ -126,6 +123,7 @@ var InputContainer = function InputContainer(_ref) {
|
|
|
126
123
|
invalid = _useFieldContext2$.invalid;
|
|
127
124
|
|
|
128
125
|
return /*#__PURE__*/jsxRuntime.jsxs(box.Box, _objectSpread(_objectSpread({
|
|
126
|
+
borderRadius: "small",
|
|
129
127
|
position: "relative",
|
|
130
128
|
background: disabled ? 'inputDisabled' : 'input'
|
|
131
129
|
}, boxProps), {}, {
|
|
@@ -44,10 +44,7 @@ var InputAdornment = function InputAdornment(_ref) {
|
|
|
44
44
|
fieldLabel = _ref.fieldLabel,
|
|
45
45
|
placement = _ref.placement,
|
|
46
46
|
raw = _ref.raw;
|
|
47
|
-
|
|
48
|
-
var _useTheme = useTheme(),
|
|
49
|
-
sizing = _useTheme.sizing;
|
|
50
|
-
|
|
47
|
+
var theme = useTheme();
|
|
51
48
|
var adornmentContext = useMemo(function () {
|
|
52
49
|
return {
|
|
53
50
|
placement: placement
|
|
@@ -67,7 +64,7 @@ var InputAdornment = function InputAdornment(_ref) {
|
|
|
67
64
|
alignItems: "center",
|
|
68
65
|
justifyContent: "center",
|
|
69
66
|
style: {
|
|
70
|
-
minWidth: sizing.xxsmall
|
|
67
|
+
minWidth: theme.sizing.xxsmall
|
|
71
68
|
},
|
|
72
69
|
children: children
|
|
73
70
|
})
|
|
@@ -122,6 +119,7 @@ var InputContainer = function InputContainer(_ref) {
|
|
|
122
119
|
invalid = _useFieldContext2$.invalid;
|
|
123
120
|
|
|
124
121
|
return /*#__PURE__*/jsxs(Box, _objectSpread(_objectSpread({
|
|
122
|
+
borderRadius: "small",
|
|
125
123
|
position: "relative",
|
|
126
124
|
background: disabled ? 'inputDisabled' : 'input'
|
|
127
125
|
}, boxProps), {}, {
|
package/package.json
CHANGED
|
@@ -1,28 +1,35 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spark-web/text-input",
|
|
3
|
-
"version": "2.0.
|
|
4
|
-
"
|
|
3
|
+
"version": "2.0.4",
|
|
4
|
+
"homepage": "https://github.com/brighte-labs/spark-web#readme",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "https://github.com/brighte-labs/spark-web.git",
|
|
8
|
+
"directory": "packages/text-input"
|
|
9
|
+
},
|
|
5
10
|
"main": "dist/spark-web-text-input.cjs.js",
|
|
6
11
|
"module": "dist/spark-web-text-input.esm.js",
|
|
7
12
|
"files": [
|
|
8
|
-
"
|
|
13
|
+
"CHANGELOG.md",
|
|
14
|
+
"dist",
|
|
15
|
+
"README.md"
|
|
9
16
|
],
|
|
10
17
|
"dependencies": {
|
|
11
|
-
"@babel/runtime": "^7.
|
|
18
|
+
"@babel/runtime": "^7.19.0",
|
|
12
19
|
"@emotion/css": "^11.9.0",
|
|
13
|
-
"@spark-web/a11y": "^1.3.
|
|
14
|
-
"@spark-web/box": "^1.0
|
|
15
|
-
"@spark-web/text": "^1.1.
|
|
16
|
-
"@spark-web/theme": "^3.0
|
|
17
|
-
"@spark-web/utils": "^1.2.
|
|
20
|
+
"@spark-web/a11y": "^1.3.2",
|
|
21
|
+
"@spark-web/box": "^1.1.0",
|
|
22
|
+
"@spark-web/text": "^1.1.2",
|
|
23
|
+
"@spark-web/theme": "^3.1.0",
|
|
24
|
+
"@spark-web/utils": "^1.2.3"
|
|
18
25
|
},
|
|
19
26
|
"devDependencies": {
|
|
20
|
-
"@spark-web/field": "^3.0.
|
|
27
|
+
"@spark-web/field": "^3.0.6",
|
|
21
28
|
"@types/react": "^17.0.12",
|
|
22
29
|
"react": "^17.0.2"
|
|
23
30
|
},
|
|
24
31
|
"peerDependencies": {
|
|
25
|
-
"@spark-web/field": "^3.0.
|
|
32
|
+
"@spark-web/field": "^3.0.6",
|
|
26
33
|
"react": ">=17.0.2"
|
|
27
34
|
},
|
|
28
35
|
"engines": {
|