@atlaskit/textfield 5.6.7 → 5.6.8
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 +53 -47
- package/codemods/migrations/utils.tsx +2 -1
- package/dist/cjs/styles.js +1 -3
- package/dist/cjs/text-field.js +35 -23
- package/dist/es2019/styles.js +1 -3
- package/dist/es2019/text-field.js +32 -20
- package/dist/esm/styles.js +1 -3
- package/dist/esm/text-field.js +35 -23
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,52 +1,58 @@
|
|
|
1
1
|
# @atlaskit/textfield
|
|
2
2
|
|
|
3
|
+
## 5.6.8
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#40987](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/40987) [`3039d60a810`](https://bitbucket.org/atlassian/atlassian-frontend/commits/3039d60a810) - Make spread props present in types explicit.
|
|
8
|
+
|
|
3
9
|
## 5.6.7
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
6
12
|
|
|
7
|
-
- [`6900f89eb0e`](https://bitbucket.org/atlassian/atlassian-frontend/commits/6900f89eb0e) - Internal changes to use space tokens. There is no expected visual or behaviour change.
|
|
13
|
+
- [#39787](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/39787) [`6900f89eb0e`](https://bitbucket.org/atlassian/atlassian-frontend/commits/6900f89eb0e) - Internal changes to use space tokens. There is no expected visual or behaviour change.
|
|
8
14
|
|
|
9
15
|
## 5.6.6
|
|
10
16
|
|
|
11
17
|
### Patch Changes
|
|
12
18
|
|
|
13
|
-
- [`29941aaea33`](https://bitbucket.org/atlassian/atlassian-frontend/commits/29941aaea33) - update focused fallback color to meet contrast requirement
|
|
19
|
+
- [#37613](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/37613) [`29941aaea33`](https://bitbucket.org/atlassian/atlassian-frontend/commits/29941aaea33) - update focused fallback color to meet contrast requirement
|
|
14
20
|
|
|
15
21
|
## 5.6.5
|
|
16
22
|
|
|
17
23
|
### Patch Changes
|
|
18
24
|
|
|
19
|
-
- [`3c114ea4257`](https://bitbucket.org/atlassian/atlassian-frontend/commits/3c114ea4257) - Update type definitions to conform to inherited changes from `@types/react@16.14.15`.
|
|
25
|
+
- [#39128](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/39128) [`3c114ea4257`](https://bitbucket.org/atlassian/atlassian-frontend/commits/3c114ea4257) - Update type definitions to conform to inherited changes from `@types/react@16.14.15`.
|
|
20
26
|
|
|
21
27
|
## 5.6.4
|
|
22
28
|
|
|
23
29
|
### Patch Changes
|
|
24
30
|
|
|
25
|
-
- [`356d6ebed05`](https://bitbucket.org/atlassian/atlassian-frontend/commits/356d6ebed05) - This package is now onboarded onto the product push model.
|
|
31
|
+
- [#38201](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/38201) [`356d6ebed05`](https://bitbucket.org/atlassian/atlassian-frontend/commits/356d6ebed05) - This package is now onboarded onto the product push model.
|
|
26
32
|
|
|
27
33
|
## 5.6.3
|
|
28
34
|
|
|
29
35
|
### Patch Changes
|
|
30
36
|
|
|
31
|
-
- [`4ae083a7e66`](https://bitbucket.org/atlassian/atlassian-frontend/commits/4ae083a7e66) - Use `@af/accessibility-testing` for default jest-axe config and jest-axe import in accessibility testing.
|
|
37
|
+
- [#36754](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/36754) [`4ae083a7e66`](https://bitbucket.org/atlassian/atlassian-frontend/commits/4ae083a7e66) - Use `@af/accessibility-testing` for default jest-axe config and jest-axe import in accessibility testing.
|
|
32
38
|
|
|
33
39
|
## 5.6.2
|
|
34
40
|
|
|
35
41
|
### Patch Changes
|
|
36
42
|
|
|
37
|
-
- [`a01cf0168b8`](https://bitbucket.org/atlassian/atlassian-frontend/commits/a01cf0168b8) - update border width with border spacing token
|
|
43
|
+
- [#36661](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/36661) [`a01cf0168b8`](https://bitbucket.org/atlassian/atlassian-frontend/commits/a01cf0168b8) - update border width with border spacing token
|
|
38
44
|
|
|
39
45
|
## 5.6.1
|
|
40
46
|
|
|
41
47
|
### Patch Changes
|
|
42
48
|
|
|
43
|
-
- [`3a8d6f61240`](https://bitbucket.org/atlassian/atlassian-frontend/commits/3a8d6f61240) - [ux] Adds `text-overflow: ellipsis` to placeholder text.
|
|
49
|
+
- [#36066](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/36066) [`3a8d6f61240`](https://bitbucket.org/atlassian/atlassian-frontend/commits/3a8d6f61240) - [ux] Adds `text-overflow: ellipsis` to placeholder text.
|
|
44
50
|
|
|
45
51
|
## 5.6.0
|
|
46
52
|
|
|
47
53
|
### Minor Changes
|
|
48
54
|
|
|
49
|
-
- [`a90730ddb33`](https://bitbucket.org/atlassian/atlassian-frontend/commits/a90730ddb33) - Disallow use of unused prop `disabled`. Disabled textfields should use
|
|
55
|
+
- [#35766](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/35766) [`a90730ddb33`](https://bitbucket.org/atlassian/atlassian-frontend/commits/a90730ddb33) - Disallow use of unused prop `disabled`. Disabled textfields should use
|
|
50
56
|
`isDisabled`. This change includes a codemod for transitioning existing code
|
|
51
57
|
over to the proper usage.
|
|
52
58
|
|
|
@@ -54,43 +60,43 @@
|
|
|
54
60
|
|
|
55
61
|
### Patch Changes
|
|
56
62
|
|
|
57
|
-
- [`8f436f0c301`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8f436f0c301) - extend border contrast feature flag to support confluence
|
|
63
|
+
- [#35111](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/35111) [`8f436f0c301`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8f436f0c301) - extend border contrast feature flag to support confluence
|
|
58
64
|
|
|
59
65
|
## 5.5.1
|
|
60
66
|
|
|
61
67
|
### Patch Changes
|
|
62
68
|
|
|
63
|
-
- [`774ed69ecef`](https://bitbucket.org/atlassian/atlassian-frontend/commits/774ed69ecef) - Internal changes to use space tokens for spacing values. There is no visual change.
|
|
69
|
+
- [#34881](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/34881) [`774ed69ecef`](https://bitbucket.org/atlassian/atlassian-frontend/commits/774ed69ecef) - Internal changes to use space tokens for spacing values. There is no visual change.
|
|
64
70
|
|
|
65
71
|
## 5.5.0
|
|
66
72
|
|
|
67
73
|
### Minor Changes
|
|
68
74
|
|
|
69
|
-
- [`c9c3a3f43af`](https://bitbucket.org/atlassian/atlassian-frontend/commits/c9c3a3f43af) - [ux] reduce border width to 1px and update fallback color of border
|
|
75
|
+
- [#33167](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33167) [`c9c3a3f43af`](https://bitbucket.org/atlassian/atlassian-frontend/commits/c9c3a3f43af) - [ux] reduce border width to 1px and update fallback color of border
|
|
70
76
|
|
|
71
77
|
## 5.4.3
|
|
72
78
|
|
|
73
79
|
### Patch Changes
|
|
74
80
|
|
|
75
|
-
- [`49b08bfdf5f`](https://bitbucket.org/atlassian/atlassian-frontend/commits/49b08bfdf5f) - Migrated use of `gridSize` to space tokens where possible. There is no expected visual or behaviour change.
|
|
81
|
+
- [#34051](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/34051) [`49b08bfdf5f`](https://bitbucket.org/atlassian/atlassian-frontend/commits/49b08bfdf5f) - Migrated use of `gridSize` to space tokens where possible. There is no expected visual or behaviour change.
|
|
76
82
|
|
|
77
83
|
## 5.4.2
|
|
78
84
|
|
|
79
85
|
### Patch Changes
|
|
80
86
|
|
|
81
|
-
- [`9d00501a414`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9d00501a414) - Ensure legacy types are published for TS 4.5-4.8
|
|
87
|
+
- [#33793](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33793) [`9d00501a414`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9d00501a414) - Ensure legacy types are published for TS 4.5-4.8
|
|
82
88
|
|
|
83
89
|
## 5.4.1
|
|
84
90
|
|
|
85
91
|
### Patch Changes
|
|
86
92
|
|
|
87
|
-
- [`41fae2c6f68`](https://bitbucket.org/atlassian/atlassian-frontend/commits/41fae2c6f68) - Upgrade Typescript from `4.5.5` to `4.9.5`
|
|
93
|
+
- [#33649](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33649) [`41fae2c6f68`](https://bitbucket.org/atlassian/atlassian-frontend/commits/41fae2c6f68) - Upgrade Typescript from `4.5.5` to `4.9.5`
|
|
88
94
|
|
|
89
95
|
## 5.4.0
|
|
90
96
|
|
|
91
97
|
### Minor Changes
|
|
92
98
|
|
|
93
|
-
- [`56507598609`](https://bitbucket.org/atlassian/atlassian-frontend/commits/56507598609) - Skip minor dependency bump
|
|
99
|
+
- [#33258](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33258) [`56507598609`](https://bitbucket.org/atlassian/atlassian-frontend/commits/56507598609) - Skip minor dependency bump
|
|
94
100
|
|
|
95
101
|
### Patch Changes
|
|
96
102
|
|
|
@@ -100,7 +106,7 @@
|
|
|
100
106
|
|
|
101
107
|
### Patch Changes
|
|
102
108
|
|
|
103
|
-
- [`e028bee17df`](https://bitbucket.org/atlassian/atlassian-frontend/commits/e028bee17df) - [ux] fix(style): update fallback color of placeholder to meet contrast requirement
|
|
109
|
+
- [#33004](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33004) [`e028bee17df`](https://bitbucket.org/atlassian/atlassian-frontend/commits/e028bee17df) - [ux] fix(style): update fallback color of placeholder to meet contrast requirement
|
|
104
110
|
|
|
105
111
|
## 5.3.6
|
|
106
112
|
|
|
@@ -136,31 +142,31 @@
|
|
|
136
142
|
|
|
137
143
|
### Patch Changes
|
|
138
144
|
|
|
139
|
-
- [`9827dcb82b8`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9827dcb82b8) - No-op change to introduce spacing tokens to design system components.
|
|
145
|
+
- [#26303](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/26303) [`9827dcb82b8`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9827dcb82b8) - No-op change to introduce spacing tokens to design system components.
|
|
140
146
|
|
|
141
147
|
## 5.3.0
|
|
142
148
|
|
|
143
149
|
### Minor Changes
|
|
144
150
|
|
|
145
|
-
- [`b8841384da6`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b8841384da6) - Disabled background and border styles should not be applied to components that have either no background or transparent background to begin with. Textfield and textarea variants that do not have backgrounds (sublte or none) have no backgrounds or borders applied when disabled. As such, any comopnents that consume these will also be affected.
|
|
151
|
+
- [#24968](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/24968) [`b8841384da6`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b8841384da6) - Disabled background and border styles should not be applied to components that have either no background or transparent background to begin with. Textfield and textarea variants that do not have backgrounds (sublte or none) have no backgrounds or borders applied when disabled. As such, any comopnents that consume these will also be affected.
|
|
146
152
|
|
|
147
153
|
## 5.2.2
|
|
148
154
|
|
|
149
155
|
### Patch Changes
|
|
150
156
|
|
|
151
|
-
- [`bedbdec0e82`](https://bitbucket.org/atlassian/atlassian-frontend/commits/bedbdec0e82) - Update hover state appearance of subtle Textarea, Textfield and Select components to match the hover states of their default counterparts.
|
|
157
|
+
- [#25314](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/25314) [`bedbdec0e82`](https://bitbucket.org/atlassian/atlassian-frontend/commits/bedbdec0e82) - Update hover state appearance of subtle Textarea, Textfield and Select components to match the hover states of their default counterparts.
|
|
152
158
|
|
|
153
159
|
## 5.2.1
|
|
154
160
|
|
|
155
161
|
### Patch Changes
|
|
156
162
|
|
|
157
|
-
- [`8cc2f888c83`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8cc2f888c83) - Upgrade Typescript from `4.3.5` to `4.5.5`
|
|
163
|
+
- [#24874](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/24874) [`8cc2f888c83`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8cc2f888c83) - Upgrade Typescript from `4.3.5` to `4.5.5`
|
|
158
164
|
|
|
159
165
|
## 5.2.0
|
|
160
166
|
|
|
161
167
|
### Minor Changes
|
|
162
168
|
|
|
163
|
-
- [`acf974e717c`](https://bitbucket.org/atlassian/atlassian-frontend/commits/acf974e717c) - Updates `@emotion/core` to `@emotion/react`; v10 to v11. There is no expected behavior change.
|
|
169
|
+
- [#24004](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/24004) [`acf974e717c`](https://bitbucket.org/atlassian/atlassian-frontend/commits/acf974e717c) - Updates `@emotion/core` to `@emotion/react`; v10 to v11. There is no expected behavior change.
|
|
164
170
|
|
|
165
171
|
### Patch Changes
|
|
166
172
|
|
|
@@ -170,13 +176,13 @@
|
|
|
170
176
|
|
|
171
177
|
### Patch Changes
|
|
172
178
|
|
|
173
|
-
- [`8d4228767b0`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8d4228767b0) - Upgrade Typescript from `4.2.4` to `4.3.5`.
|
|
179
|
+
- [#24492](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/24492) [`8d4228767b0`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8d4228767b0) - Upgrade Typescript from `4.2.4` to `4.3.5`.
|
|
174
180
|
|
|
175
181
|
## 5.1.12
|
|
176
182
|
|
|
177
183
|
### Patch Changes
|
|
178
184
|
|
|
179
|
-
- [`7c14ea36248`](https://bitbucket.org/atlassian/atlassian-frontend/commits/7c14ea36248) - [ux] Updated input tokens within `@atlaskit/textfield`.
|
|
185
|
+
- [#21570](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/21570) [`7c14ea36248`](https://bitbucket.org/atlassian/atlassian-frontend/commits/7c14ea36248) - [ux] Updated input tokens within `@atlaskit/textfield`.
|
|
180
186
|
|
|
181
187
|
## 5.1.11
|
|
182
188
|
|
|
@@ -188,7 +194,7 @@
|
|
|
188
194
|
|
|
189
195
|
### Patch Changes
|
|
190
196
|
|
|
191
|
-
- [`cb2392f6d33`](https://bitbucket.org/atlassian/atlassian-frontend/commits/cb2392f6d33) - Upgrade to TypeScript 4.2.4
|
|
197
|
+
- [#20650](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/20650) [`cb2392f6d33`](https://bitbucket.org/atlassian/atlassian-frontend/commits/cb2392f6d33) - Upgrade to TypeScript 4.2.4
|
|
192
198
|
|
|
193
199
|
## 5.1.9
|
|
194
200
|
|
|
@@ -200,7 +206,7 @@
|
|
|
200
206
|
|
|
201
207
|
### Patch Changes
|
|
202
208
|
|
|
203
|
-
- [`62edf20ab1e`](https://bitbucket.org/atlassian/atlassian-frontend/commits/62edf20ab1e) - Migrates all usage of brand tokens to either selected or information tokens. This change is purely for semantic reasons, there are no visual or behavioural changes.
|
|
209
|
+
- [#19618](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/19618) [`62edf20ab1e`](https://bitbucket.org/atlassian/atlassian-frontend/commits/62edf20ab1e) - Migrates all usage of brand tokens to either selected or information tokens. This change is purely for semantic reasons, there are no visual or behavioural changes.
|
|
204
210
|
- Updated dependencies
|
|
205
211
|
|
|
206
212
|
## 5.1.7
|
|
@@ -213,7 +219,7 @@
|
|
|
213
219
|
|
|
214
220
|
### Patch Changes
|
|
215
221
|
|
|
216
|
-
- [`19d72473dfb`](https://bitbucket.org/atlassian/atlassian-frontend/commits/19d72473dfb) - The no-unsafe-design-token-usage eslint rule now respects the new token naming conventions when auto-fixing by correctly formatting token ids.
|
|
222
|
+
- [#16752](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/16752) [`19d72473dfb`](https://bitbucket.org/atlassian/atlassian-frontend/commits/19d72473dfb) - The no-unsafe-design-token-usage eslint rule now respects the new token naming conventions when auto-fixing by correctly formatting token ids.
|
|
217
223
|
- Updated dependencies
|
|
218
224
|
|
|
219
225
|
## 5.1.5
|
|
@@ -226,7 +232,7 @@
|
|
|
226
232
|
|
|
227
233
|
### Patch Changes
|
|
228
234
|
|
|
229
|
-
- [`f460cc7c411`](https://bitbucket.org/atlassian/atlassian-frontend/commits/f460cc7c411) - Builds for this package now pass through a tokens babel plugin, removing runtime invocations of the tokens() function and improving bundle size.
|
|
235
|
+
- [#15998](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/15998) [`f460cc7c411`](https://bitbucket.org/atlassian/atlassian-frontend/commits/f460cc7c411) - Builds for this package now pass through a tokens babel plugin, removing runtime invocations of the tokens() function and improving bundle size.
|
|
230
236
|
- Updated dependencies
|
|
231
237
|
|
|
232
238
|
## 5.1.3
|
|
@@ -251,7 +257,7 @@
|
|
|
251
257
|
|
|
252
258
|
### Minor Changes
|
|
253
259
|
|
|
254
|
-
- [`78ba9e045b8`](https://bitbucket.org/atlassian/atlassian-frontend/commits/78ba9e045b8) - Internal refactor to align to the design system techstack.
|
|
260
|
+
- [#13302](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/13302) [`78ba9e045b8`](https://bitbucket.org/atlassian/atlassian-frontend/commits/78ba9e045b8) - Internal refactor to align to the design system techstack.
|
|
255
261
|
- [`4d34d35270e`](https://bitbucket.org/atlassian/atlassian-frontend/commits/4d34d35270e) - Instrumented text field with the new theming package, `@atlaskit/tokens`.
|
|
256
262
|
|
|
257
263
|
New tokens will be visible only in applications configured to use the new Tokens API (currently in alpha).
|
|
@@ -268,38 +274,38 @@
|
|
|
268
274
|
|
|
269
275
|
### Patch Changes
|
|
270
276
|
|
|
271
|
-
- [`378d1cef00f`](https://bitbucket.org/atlassian/atlassian-frontend/commits/378d1cef00f) - Bump `@atlaskit/theme` to version `^11.3.0`.
|
|
277
|
+
- [#12880](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/12880) [`378d1cef00f`](https://bitbucket.org/atlassian/atlassian-frontend/commits/378d1cef00f) - Bump `@atlaskit/theme` to version `^11.3.0`.
|
|
272
278
|
|
|
273
279
|
## 5.0.4
|
|
274
280
|
|
|
275
281
|
### Patch Changes
|
|
276
282
|
|
|
277
|
-
- [`a7d1415e5e6`](https://bitbucket.org/atlassian/atlassian-frontend/commits/a7d1415e5e6) - [ux] add high contrast mode supporting for Textfield
|
|
283
|
+
- [#12328](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/12328) [`a7d1415e5e6`](https://bitbucket.org/atlassian/atlassian-frontend/commits/a7d1415e5e6) - [ux] add high contrast mode supporting for Textfield
|
|
278
284
|
- Updated dependencies
|
|
279
285
|
|
|
280
286
|
## 5.0.3
|
|
281
287
|
|
|
282
288
|
### Patch Changes
|
|
283
289
|
|
|
284
|
-
- [`6f0bbf09744`](https://bitbucket.org/atlassian/atlassian-frontend/commits/6f0bbf09744) - [ux] Fix disabled TextField text contrast on Safari/WebKit browsers
|
|
290
|
+
- [#11649](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/11649) [`6f0bbf09744`](https://bitbucket.org/atlassian/atlassian-frontend/commits/6f0bbf09744) - [ux] Fix disabled TextField text contrast on Safari/WebKit browsers
|
|
285
291
|
|
|
286
292
|
## 5.0.2
|
|
287
293
|
|
|
288
294
|
### Patch Changes
|
|
289
295
|
|
|
290
|
-
- [`d6f7ff383cf`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d6f7ff383cf) - Updates to development dependency `storybook-addon-performance`
|
|
296
|
+
- [#12167](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/12167) [`d6f7ff383cf`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d6f7ff383cf) - Updates to development dependency `storybook-addon-performance`
|
|
291
297
|
|
|
292
298
|
## 5.0.1
|
|
293
299
|
|
|
294
300
|
### Patch Changes
|
|
295
301
|
|
|
296
|
-
- [`79c23df6340`](https://bitbucket.org/atlassian/atlassian-frontend/commits/79c23df6340) - Use injected package name and version for analytics instead of version.json.
|
|
302
|
+
- [#8644](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/8644) [`79c23df6340`](https://bitbucket.org/atlassian/atlassian-frontend/commits/79c23df6340) - Use injected package name and version for analytics instead of version.json.
|
|
297
303
|
|
|
298
304
|
## 5.0.0
|
|
299
305
|
|
|
300
306
|
### Major Changes
|
|
301
307
|
|
|
302
|
-
- [`9d0f54a809`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9d0f54a809)
|
|
308
|
+
- [#7170](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/7170) [`9d0f54a809`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9d0f54a809)
|
|
303
309
|
|
|
304
310
|
**Summary**
|
|
305
311
|
|
|
@@ -399,13 +405,13 @@
|
|
|
399
405
|
|
|
400
406
|
### Patch Changes
|
|
401
407
|
|
|
402
|
-
- [`d3265f19be`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d3265f19be) - Transpile packages using babel rather than tsc
|
|
408
|
+
- [#5857](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/5857) [`d3265f19be`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d3265f19be) - Transpile packages using babel rather than tsc
|
|
403
409
|
|
|
404
410
|
## 4.0.9
|
|
405
411
|
|
|
406
412
|
### Patch Changes
|
|
407
413
|
|
|
408
|
-
- [`5f58283e1f`](https://bitbucket.org/atlassian/atlassian-frontend/commits/5f58283e1f) - Export types using Typescript's new "export type" syntax to satisfy Typescript's --isolatedModules compiler option.
|
|
414
|
+
- [#5497](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/5497) [`5f58283e1f`](https://bitbucket.org/atlassian/atlassian-frontend/commits/5f58283e1f) - Export types using Typescript's new "export type" syntax to satisfy Typescript's --isolatedModules compiler option.
|
|
409
415
|
This requires version 3.8 of Typescript, read more about how we handle Typescript versions here: https://atlaskit.atlassian.com/get-started
|
|
410
416
|
Also add `typescript` to `devDependencies` to denote version that the package was built with.
|
|
411
417
|
|
|
@@ -419,26 +425,26 @@
|
|
|
419
425
|
|
|
420
426
|
### Patch Changes
|
|
421
427
|
|
|
422
|
-
- [`2ac834240e`](https://bitbucket.org/atlassian/atlassian-frontend/commits/2ac834240e) - Undo analytics-next file restructure to allow external ts definitions to continue working
|
|
428
|
+
- [#5164](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/5164) [`2ac834240e`](https://bitbucket.org/atlassian/atlassian-frontend/commits/2ac834240e) - Undo analytics-next file restructure to allow external ts definitions to continue working
|
|
423
429
|
|
|
424
430
|
## 4.0.6
|
|
425
431
|
|
|
426
432
|
### Patch Changes
|
|
427
433
|
|
|
428
|
-
- [`6529a49064`](https://bitbucket.org/atlassian/atlassian-frontend/commits/6529a49064) - Removed IE11 and outdated browser-prefixed styles targeting the placeholder attribute
|
|
434
|
+
- [#4749](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/4749) [`6529a49064`](https://bitbucket.org/atlassian/atlassian-frontend/commits/6529a49064) - Removed IE11 and outdated browser-prefixed styles targeting the placeholder attribute
|
|
429
435
|
- Updated dependencies
|
|
430
436
|
|
|
431
437
|
## 4.0.5
|
|
432
438
|
|
|
433
439
|
### Patch Changes
|
|
434
440
|
|
|
435
|
-
- [`6360c46009`](https://bitbucket.org/atlassian/atlassian-frontend/commits/6360c46009) - Reenable integration tests for Edge browser
|
|
441
|
+
- [#4707](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/4707) [`6360c46009`](https://bitbucket.org/atlassian/atlassian-frontend/commits/6360c46009) - Reenable integration tests for Edge browser
|
|
436
442
|
|
|
437
443
|
## 4.0.4
|
|
438
444
|
|
|
439
445
|
### Patch Changes
|
|
440
446
|
|
|
441
|
-
- [`6c525a8229`](https://bitbucket.org/atlassian/atlassian-frontend/commits/6c525a8229) - Upgraded to TypeScript 3.9.6 and tslib to 2.0.0
|
|
447
|
+
- [#3885](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/3885) [`6c525a8229`](https://bitbucket.org/atlassian/atlassian-frontend/commits/6c525a8229) - Upgraded to TypeScript 3.9.6 and tslib to 2.0.0
|
|
442
448
|
|
|
443
449
|
Since tslib is a dependency for all our packages we recommend that products also follow this tslib upgrade
|
|
444
450
|
to prevent duplicates of tslib being bundled.
|
|
@@ -447,25 +453,25 @@
|
|
|
447
453
|
|
|
448
454
|
### Patch Changes
|
|
449
455
|
|
|
450
|
-
- [`76165ad82f`](https://bitbucket.org/atlassian/atlassian-frontend/commits/76165ad82f) - Bump required because of conflicts on wadmal release
|
|
456
|
+
- [#4393](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/4393) [`76165ad82f`](https://bitbucket.org/atlassian/atlassian-frontend/commits/76165ad82f) - Bump required because of conflicts on wadmal release
|
|
451
457
|
|
|
452
458
|
## 4.0.2
|
|
453
459
|
|
|
454
460
|
### Patch Changes
|
|
455
461
|
|
|
456
|
-
- [`e99262c6f0`](https://bitbucket.org/atlassian/atlassian-frontend/commits/e99262c6f0) - All form elements now have a default font explicitly set
|
|
462
|
+
- [#3823](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/3823) [`e99262c6f0`](https://bitbucket.org/atlassian/atlassian-frontend/commits/e99262c6f0) - All form elements now have a default font explicitly set
|
|
457
463
|
|
|
458
464
|
## 4.0.1
|
|
459
465
|
|
|
460
466
|
### Patch Changes
|
|
461
467
|
|
|
462
|
-
- [`954cc87b62`](https://bitbucket.org/atlassian/atlassian-frontend/commits/954cc87b62) - The readme and package information has been updated to point to the new design system website.
|
|
468
|
+
- [#3293](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/3293) [`954cc87b62`](https://bitbucket.org/atlassian/atlassian-frontend/commits/954cc87b62) - The readme and package information has been updated to point to the new design system website.
|
|
463
469
|
|
|
464
470
|
## 4.0.0
|
|
465
471
|
|
|
466
472
|
### Major Changes
|
|
467
473
|
|
|
468
|
-
- [`87f4720f27`](https://bitbucket.org/atlassian/atlassian-frontend/commits/87f4720f27) - Officially dropping IE11 support, from this version onwards there are no warranties of the package working in IE11.
|
|
474
|
+
- [#3335](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/3335) [`87f4720f27`](https://bitbucket.org/atlassian/atlassian-frontend/commits/87f4720f27) - Officially dropping IE11 support, from this version onwards there are no warranties of the package working in IE11.
|
|
469
475
|
For more information see: https://community.developer.atlassian.com/t/atlaskit-to-drop-support-for-internet-explorer-11-from-1st-july-2020/39534
|
|
470
476
|
|
|
471
477
|
### Patch Changes
|
|
@@ -476,13 +482,13 @@
|
|
|
476
482
|
|
|
477
483
|
### Patch Changes
|
|
478
484
|
|
|
479
|
-
- [`088c636cbd`](https://bitbucket.org/atlassian/atlassian-frontend/commits/088c636cbd) - Updated disabled state border-color to match the ADG spec. It now appears as if there is no border on a disabled textfield.
|
|
485
|
+
- [#2763](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/2763) [`088c636cbd`](https://bitbucket.org/atlassian/atlassian-frontend/commits/088c636cbd) - Updated disabled state border-color to match the ADG spec. It now appears as if there is no border on a disabled textfield.
|
|
480
486
|
|
|
481
487
|
## 3.1.12
|
|
482
488
|
|
|
483
489
|
### Patch Changes
|
|
484
490
|
|
|
485
|
-
- [`54a9514fcf`](https://bitbucket.org/atlassian/atlassian-frontend/commits/54a9514fcf) - Build and supporting files will no longer be published to npm
|
|
491
|
+
- [#2866](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/2866) [`54a9514fcf`](https://bitbucket.org/atlassian/atlassian-frontend/commits/54a9514fcf) - Build and supporting files will no longer be published to npm
|
|
486
492
|
|
|
487
493
|
## 3.1.11
|
|
488
494
|
|
|
@@ -494,7 +500,7 @@
|
|
|
494
500
|
|
|
495
501
|
### Patch Changes
|
|
496
502
|
|
|
497
|
-
- [`83f4f94df3`](https://bitbucket.org/atlassian/atlassian-frontend/commits/83f4f94df3) - Change imports to comply with Atlassian conventions- Updated dependencies
|
|
503
|
+
- [#1868](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/1868) [`83f4f94df3`](https://bitbucket.org/atlassian/atlassian-frontend/commits/83f4f94df3) - Change imports to comply with Atlassian conventions- Updated dependencies
|
|
498
504
|
|
|
499
505
|
## 3.1.9
|
|
500
506
|
|
|
@@ -5,6 +5,7 @@ import core, {
|
|
|
5
5
|
Identifier,
|
|
6
6
|
ImportDeclaration,
|
|
7
7
|
ImportSpecifier,
|
|
8
|
+
JSXAttribute,
|
|
8
9
|
Options,
|
|
9
10
|
Program,
|
|
10
11
|
} from 'jscodeshift';
|
|
@@ -58,7 +59,7 @@ export function getJSXAttributesByName(
|
|
|
58
59
|
j: core.JSCodeshift,
|
|
59
60
|
element: ASTPath<any>,
|
|
60
61
|
attributeName: string,
|
|
61
|
-
) {
|
|
62
|
+
): Collection<JSXAttribute> {
|
|
62
63
|
return j(element)
|
|
63
64
|
.find(j.JSXOpeningElement)
|
|
64
65
|
.find(j.JSXAttribute)
|
package/dist/cjs/styles.js
CHANGED
|
@@ -141,9 +141,7 @@ var containerStyles = function containerStyles(appearance, mode, width) {
|
|
|
141
141
|
}, getContainerTextBgAndBorderColor(appearance, mode)), {}, {
|
|
142
142
|
borderRadius: 3,
|
|
143
143
|
borderWidth: (0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.border-checkbox_nyoiu') ? "var(--ds-border-width, 1px)" : 2
|
|
144
|
-
}, (0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.border-checkbox_nyoiu') && appearance !== 'none' ?
|
|
145
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
146
|
-
{
|
|
144
|
+
}, (0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.border-checkbox_nyoiu') && appearance !== 'none' ? {
|
|
147
145
|
padding: "var(--ds-border-width, 1px)".concat(" 0")
|
|
148
146
|
} : {}), {}, {
|
|
149
147
|
borderStyle: appearance === 'none' ? 'none' : 'solid',
|
package/dist/cjs/text-field.js
CHANGED
|
@@ -15,7 +15,7 @@ var _react2 = require("@emotion/react");
|
|
|
15
15
|
var _analyticsNext = require("@atlaskit/analytics-next");
|
|
16
16
|
var _components = require("@atlaskit/theme/components");
|
|
17
17
|
var _styles = require("./styles");
|
|
18
|
-
var _excluded = ["appearance", "isCompact", "isDisabled", "isInvalid", "
|
|
18
|
+
var _excluded = ["appearance", "className", "elemAfterInput", "elemBeforeInput", "isCompact", "isDisabled", "isInvalid", "isMonospaced", "isReadOnly", "isRequired", "name", "onBlur", "onChange", "onFocus", "onMouseDown", "placeholder", "testId", "width"];
|
|
19
19
|
/** @jsx jsx */
|
|
20
20
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
21
21
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof3(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -24,31 +24,34 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
24
24
|
var analyticsParams = {
|
|
25
25
|
componentName: 'textField',
|
|
26
26
|
packageName: "@atlaskit/textfield",
|
|
27
|
-
packageVersion: "5.6.
|
|
27
|
+
packageVersion: "5.6.8"
|
|
28
28
|
};
|
|
29
29
|
var Textfield = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
30
30
|
var _props$appearance = props.appearance,
|
|
31
31
|
appearance = _props$appearance === void 0 ? 'standard' : _props$appearance,
|
|
32
|
+
className = props.className,
|
|
33
|
+
elemAfterInput = props.elemAfterInput,
|
|
34
|
+
elemBeforeInput = props.elemBeforeInput,
|
|
32
35
|
_props$isCompact = props.isCompact,
|
|
33
36
|
isCompact = _props$isCompact === void 0 ? false : _props$isCompact,
|
|
34
37
|
_props$isDisabled = props.isDisabled,
|
|
35
38
|
isDisabled = _props$isDisabled === void 0 ? false : _props$isDisabled,
|
|
36
39
|
_props$isInvalid = props.isInvalid,
|
|
37
40
|
isInvalid = _props$isInvalid === void 0 ? false : _props$isInvalid,
|
|
38
|
-
_props$isRequired = props.isRequired,
|
|
39
|
-
isRequired = _props$isRequired === void 0 ? false : _props$isRequired,
|
|
40
|
-
_props$isReadOnly = props.isReadOnly,
|
|
41
|
-
isReadOnly = _props$isReadOnly === void 0 ? false : _props$isReadOnly,
|
|
42
41
|
_props$isMonospaced = props.isMonospaced,
|
|
43
42
|
isMonospaced = _props$isMonospaced === void 0 ? false : _props$isMonospaced,
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
43
|
+
_props$isReadOnly = props.isReadOnly,
|
|
44
|
+
isReadOnly = _props$isReadOnly === void 0 ? false : _props$isReadOnly,
|
|
45
|
+
_props$isRequired = props.isRequired,
|
|
46
|
+
isRequired = _props$isRequired === void 0 ? false : _props$isRequired,
|
|
47
|
+
name = props.name,
|
|
49
48
|
onBlur = props.onBlur,
|
|
49
|
+
onChange = props.onChange,
|
|
50
|
+
onFocus = props.onFocus,
|
|
50
51
|
onMouseDown = props.onMouseDown,
|
|
51
|
-
|
|
52
|
+
placeholder = props.placeholder,
|
|
53
|
+
testId = props.testId,
|
|
54
|
+
width = props.width,
|
|
52
55
|
spreadProps = (0, _objectWithoutProperties2.default)(props, _excluded);
|
|
53
56
|
var inputRef = (0, _react.useRef)(null);
|
|
54
57
|
var _useGlobalTheme = (0, _components.useGlobalTheme)(),
|
|
@@ -96,9 +99,15 @@ var Textfield = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
96
99
|
return (0, _styles.inputStyles)(mode);
|
|
97
100
|
}, [mode]);
|
|
98
101
|
return (
|
|
99
|
-
|
|
100
|
-
|
|
102
|
+
/**
|
|
103
|
+
* It is not normally acceptable to add click and key handlers to
|
|
104
|
+
* non-interactive elements as this is an accessibility anti-pattern.
|
|
105
|
+
* However, because this instance is to handle events on all children that
|
|
106
|
+
* should be associated with the input, we can add role="presentation" so
|
|
107
|
+
* that there are no negative impacts to assistive technologies.
|
|
108
|
+
*/
|
|
101
109
|
(0, _react2.jsx)("div", {
|
|
110
|
+
role: "presentation",
|
|
102
111
|
"data-disabled": isDisabled ? isDisabled : undefined,
|
|
103
112
|
"data-invalid": isInvalid ? isInvalid : undefined,
|
|
104
113
|
"data-ds--text-field--container": true,
|
|
@@ -110,21 +119,24 @@ var Textfield = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
110
119
|
css: containerStyles,
|
|
111
120
|
className: className
|
|
112
121
|
}, elemBeforeInput, (0, _react2.jsx)("input", (0, _extends2.default)({}, spreadProps, {
|
|
122
|
+
"aria-invalid": isInvalid ? isInvalid : undefined
|
|
123
|
+
// TODO: When removing legacy theming fix this.
|
|
124
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
125
|
+
,
|
|
126
|
+
css: inputStyle,
|
|
113
127
|
"data-compact": isCompact ? isCompact : undefined,
|
|
114
|
-
"data-monospaced": isMonospaced ? isMonospaced : undefined,
|
|
115
128
|
"data-ds--text-field--input": true,
|
|
129
|
+
"data-monospaced": isMonospaced ? isMonospaced : undefined,
|
|
116
130
|
"data-testid": testId,
|
|
117
|
-
"aria-invalid": isInvalid ? isInvalid : undefined,
|
|
118
131
|
disabled: isDisabled,
|
|
119
|
-
|
|
120
|
-
required: isRequired,
|
|
132
|
+
name: name,
|
|
121
133
|
onBlur: handleOnBlur,
|
|
134
|
+
onChange: onChange,
|
|
122
135
|
onFocus: handleOnFocus,
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
css: inputStyle
|
|
136
|
+
placeholder: placeholder,
|
|
137
|
+
readOnly: isReadOnly,
|
|
138
|
+
ref: setInputRef,
|
|
139
|
+
required: isRequired
|
|
128
140
|
})), elemAfterInput)
|
|
129
141
|
);
|
|
130
142
|
});
|
package/dist/es2019/styles.js
CHANGED
|
@@ -129,9 +129,7 @@ export const containerStyles = (appearance, mode, width) => ({
|
|
|
129
129
|
borderRadius: 3,
|
|
130
130
|
borderWidth: getBooleanFF('platform.design-system-team.border-checkbox_nyoiu') ? "var(--ds-border-width, 1px)" : 2,
|
|
131
131
|
// add 1px padding on both top and bottom to keep the same overall height after border reduced from 2px to 1px under feature flag
|
|
132
|
-
...(getBooleanFF('platform.design-system-team.border-checkbox_nyoiu') && appearance !== 'none' ?
|
|
133
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
134
|
-
{
|
|
132
|
+
...(getBooleanFF('platform.design-system-team.border-checkbox_nyoiu') && appearance !== 'none' ? {
|
|
135
133
|
padding: `${"var(--ds-border-width, 1px)"} 0`
|
|
136
134
|
} : {}),
|
|
137
135
|
borderStyle: appearance === 'none' ? 'none' : 'solid',
|
|
@@ -8,25 +8,28 @@ import { containerStyles as getContainerStyles, inputStyles as getInputStyles }
|
|
|
8
8
|
const analyticsParams = {
|
|
9
9
|
componentName: 'textField',
|
|
10
10
|
packageName: "@atlaskit/textfield",
|
|
11
|
-
packageVersion: "5.6.
|
|
11
|
+
packageVersion: "5.6.8"
|
|
12
12
|
};
|
|
13
13
|
const Textfield = /*#__PURE__*/forwardRef((props, ref) => {
|
|
14
14
|
const {
|
|
15
15
|
appearance = 'standard',
|
|
16
|
+
className,
|
|
17
|
+
elemAfterInput,
|
|
18
|
+
elemBeforeInput,
|
|
16
19
|
isCompact = false,
|
|
17
20
|
isDisabled = false,
|
|
18
21
|
isInvalid = false,
|
|
19
|
-
isRequired = false,
|
|
20
|
-
isReadOnly = false,
|
|
21
22
|
isMonospaced = false,
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
testId,
|
|
26
|
-
onFocus,
|
|
23
|
+
isReadOnly = false,
|
|
24
|
+
isRequired = false,
|
|
25
|
+
name,
|
|
27
26
|
onBlur,
|
|
27
|
+
onChange,
|
|
28
|
+
onFocus,
|
|
28
29
|
onMouseDown,
|
|
29
|
-
|
|
30
|
+
placeholder,
|
|
31
|
+
testId,
|
|
32
|
+
width,
|
|
30
33
|
...spreadProps
|
|
31
34
|
} = props;
|
|
32
35
|
const inputRef = useRef(null);
|
|
@@ -74,9 +77,15 @@ const Textfield = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
74
77
|
const containerStyles = useMemo(() => getContainerStyles(appearance, mode, width), [appearance, mode, width]);
|
|
75
78
|
const inputStyle = useMemo(() => getInputStyles(mode), [mode]);
|
|
76
79
|
return (
|
|
77
|
-
|
|
78
|
-
|
|
80
|
+
/**
|
|
81
|
+
* It is not normally acceptable to add click and key handlers to
|
|
82
|
+
* non-interactive elements as this is an accessibility anti-pattern.
|
|
83
|
+
* However, because this instance is to handle events on all children that
|
|
84
|
+
* should be associated with the input, we can add role="presentation" so
|
|
85
|
+
* that there are no negative impacts to assistive technologies.
|
|
86
|
+
*/
|
|
79
87
|
jsx("div", {
|
|
88
|
+
role: "presentation",
|
|
80
89
|
"data-disabled": isDisabled ? isDisabled : undefined,
|
|
81
90
|
"data-invalid": isInvalid ? isInvalid : undefined,
|
|
82
91
|
"data-ds--text-field--container": true,
|
|
@@ -88,21 +97,24 @@ const Textfield = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
88
97
|
css: containerStyles,
|
|
89
98
|
className: className
|
|
90
99
|
}, elemBeforeInput, jsx("input", _extends({}, spreadProps, {
|
|
100
|
+
"aria-invalid": isInvalid ? isInvalid : undefined
|
|
101
|
+
// TODO: When removing legacy theming fix this.
|
|
102
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
103
|
+
,
|
|
104
|
+
css: inputStyle,
|
|
91
105
|
"data-compact": isCompact ? isCompact : undefined,
|
|
92
|
-
"data-monospaced": isMonospaced ? isMonospaced : undefined,
|
|
93
106
|
"data-ds--text-field--input": true,
|
|
107
|
+
"data-monospaced": isMonospaced ? isMonospaced : undefined,
|
|
94
108
|
"data-testid": testId,
|
|
95
|
-
"aria-invalid": isInvalid ? isInvalid : undefined,
|
|
96
109
|
disabled: isDisabled,
|
|
97
|
-
|
|
98
|
-
required: isRequired,
|
|
110
|
+
name: name,
|
|
99
111
|
onBlur: handleOnBlur,
|
|
112
|
+
onChange: onChange,
|
|
100
113
|
onFocus: handleOnFocus,
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
css: inputStyle
|
|
114
|
+
placeholder: placeholder,
|
|
115
|
+
readOnly: isReadOnly,
|
|
116
|
+
ref: setInputRef,
|
|
117
|
+
required: isRequired
|
|
106
118
|
})), elemAfterInput)
|
|
107
119
|
);
|
|
108
120
|
});
|
package/dist/esm/styles.js
CHANGED
|
@@ -133,9 +133,7 @@ export var containerStyles = function containerStyles(appearance, mode, width) {
|
|
|
133
133
|
}, getContainerTextBgAndBorderColor(appearance, mode)), {}, {
|
|
134
134
|
borderRadius: 3,
|
|
135
135
|
borderWidth: getBooleanFF('platform.design-system-team.border-checkbox_nyoiu') ? "var(--ds-border-width, 1px)" : 2
|
|
136
|
-
}, getBooleanFF('platform.design-system-team.border-checkbox_nyoiu') && appearance !== 'none' ?
|
|
137
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
138
|
-
{
|
|
136
|
+
}, getBooleanFF('platform.design-system-team.border-checkbox_nyoiu') && appearance !== 'none' ? {
|
|
139
137
|
padding: "var(--ds-border-width, 1px)".concat(" 0")
|
|
140
138
|
} : {}), {}, {
|
|
141
139
|
borderStyle: appearance === 'none' ? 'none' : 'solid',
|
package/dist/esm/text-field.js
CHANGED
|
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import _typeof from "@babel/runtime/helpers/typeof";
|
|
3
3
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
4
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
5
|
-
var _excluded = ["appearance", "isCompact", "isDisabled", "isInvalid", "
|
|
5
|
+
var _excluded = ["appearance", "className", "elemAfterInput", "elemBeforeInput", "isCompact", "isDisabled", "isInvalid", "isMonospaced", "isReadOnly", "isRequired", "name", "onBlur", "onChange", "onFocus", "onMouseDown", "placeholder", "testId", "width"];
|
|
6
6
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7
7
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
8
8
|
/** @jsx jsx */
|
|
@@ -14,31 +14,34 @@ import { containerStyles as getContainerStyles, inputStyles as getInputStyles }
|
|
|
14
14
|
var analyticsParams = {
|
|
15
15
|
componentName: 'textField',
|
|
16
16
|
packageName: "@atlaskit/textfield",
|
|
17
|
-
packageVersion: "5.6.
|
|
17
|
+
packageVersion: "5.6.8"
|
|
18
18
|
};
|
|
19
19
|
var Textfield = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
20
20
|
var _props$appearance = props.appearance,
|
|
21
21
|
appearance = _props$appearance === void 0 ? 'standard' : _props$appearance,
|
|
22
|
+
className = props.className,
|
|
23
|
+
elemAfterInput = props.elemAfterInput,
|
|
24
|
+
elemBeforeInput = props.elemBeforeInput,
|
|
22
25
|
_props$isCompact = props.isCompact,
|
|
23
26
|
isCompact = _props$isCompact === void 0 ? false : _props$isCompact,
|
|
24
27
|
_props$isDisabled = props.isDisabled,
|
|
25
28
|
isDisabled = _props$isDisabled === void 0 ? false : _props$isDisabled,
|
|
26
29
|
_props$isInvalid = props.isInvalid,
|
|
27
30
|
isInvalid = _props$isInvalid === void 0 ? false : _props$isInvalid,
|
|
28
|
-
_props$isRequired = props.isRequired,
|
|
29
|
-
isRequired = _props$isRequired === void 0 ? false : _props$isRequired,
|
|
30
|
-
_props$isReadOnly = props.isReadOnly,
|
|
31
|
-
isReadOnly = _props$isReadOnly === void 0 ? false : _props$isReadOnly,
|
|
32
31
|
_props$isMonospaced = props.isMonospaced,
|
|
33
32
|
isMonospaced = _props$isMonospaced === void 0 ? false : _props$isMonospaced,
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
33
|
+
_props$isReadOnly = props.isReadOnly,
|
|
34
|
+
isReadOnly = _props$isReadOnly === void 0 ? false : _props$isReadOnly,
|
|
35
|
+
_props$isRequired = props.isRequired,
|
|
36
|
+
isRequired = _props$isRequired === void 0 ? false : _props$isRequired,
|
|
37
|
+
name = props.name,
|
|
39
38
|
onBlur = props.onBlur,
|
|
39
|
+
onChange = props.onChange,
|
|
40
|
+
onFocus = props.onFocus,
|
|
40
41
|
onMouseDown = props.onMouseDown,
|
|
41
|
-
|
|
42
|
+
placeholder = props.placeholder,
|
|
43
|
+
testId = props.testId,
|
|
44
|
+
width = props.width,
|
|
42
45
|
spreadProps = _objectWithoutProperties(props, _excluded);
|
|
43
46
|
var inputRef = useRef(null);
|
|
44
47
|
var _useGlobalTheme = useGlobalTheme(),
|
|
@@ -86,9 +89,15 @@ var Textfield = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
86
89
|
return getInputStyles(mode);
|
|
87
90
|
}, [mode]);
|
|
88
91
|
return (
|
|
89
|
-
|
|
90
|
-
|
|
92
|
+
/**
|
|
93
|
+
* It is not normally acceptable to add click and key handlers to
|
|
94
|
+
* non-interactive elements as this is an accessibility anti-pattern.
|
|
95
|
+
* However, because this instance is to handle events on all children that
|
|
96
|
+
* should be associated with the input, we can add role="presentation" so
|
|
97
|
+
* that there are no negative impacts to assistive technologies.
|
|
98
|
+
*/
|
|
91
99
|
jsx("div", {
|
|
100
|
+
role: "presentation",
|
|
92
101
|
"data-disabled": isDisabled ? isDisabled : undefined,
|
|
93
102
|
"data-invalid": isInvalid ? isInvalid : undefined,
|
|
94
103
|
"data-ds--text-field--container": true,
|
|
@@ -100,21 +109,24 @@ var Textfield = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
100
109
|
css: containerStyles,
|
|
101
110
|
className: className
|
|
102
111
|
}, elemBeforeInput, jsx("input", _extends({}, spreadProps, {
|
|
112
|
+
"aria-invalid": isInvalid ? isInvalid : undefined
|
|
113
|
+
// TODO: When removing legacy theming fix this.
|
|
114
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
115
|
+
,
|
|
116
|
+
css: inputStyle,
|
|
103
117
|
"data-compact": isCompact ? isCompact : undefined,
|
|
104
|
-
"data-monospaced": isMonospaced ? isMonospaced : undefined,
|
|
105
118
|
"data-ds--text-field--input": true,
|
|
119
|
+
"data-monospaced": isMonospaced ? isMonospaced : undefined,
|
|
106
120
|
"data-testid": testId,
|
|
107
|
-
"aria-invalid": isInvalid ? isInvalid : undefined,
|
|
108
121
|
disabled: isDisabled,
|
|
109
|
-
|
|
110
|
-
required: isRequired,
|
|
122
|
+
name: name,
|
|
111
123
|
onBlur: handleOnBlur,
|
|
124
|
+
onChange: onChange,
|
|
112
125
|
onFocus: handleOnFocus,
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
css: inputStyle
|
|
126
|
+
placeholder: placeholder,
|
|
127
|
+
readOnly: isReadOnly,
|
|
128
|
+
ref: setInputRef,
|
|
129
|
+
required: isRequired
|
|
118
130
|
})), elemAfterInput)
|
|
119
131
|
);
|
|
120
132
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/textfield",
|
|
3
|
-
"version": "5.6.
|
|
3
|
+
"version": "5.6.8",
|
|
4
4
|
"description": "A text field is an input that allows a user to write or edit text.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"@atlaskit/analytics-next": "^9.1.0",
|
|
30
30
|
"@atlaskit/platform-feature-flags": "^0.2.0",
|
|
31
31
|
"@atlaskit/theme": "^12.6.0",
|
|
32
|
-
"@atlaskit/tokens": "^1.
|
|
32
|
+
"@atlaskit/tokens": "^1.25.0",
|
|
33
33
|
"@babel/runtime": "^7.0.0",
|
|
34
34
|
"@emotion/react": "^11.7.1"
|
|
35
35
|
},
|