@atlaskit/radio 5.4.1 → 5.4.3
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 +12 -0
- package/dist/cjs/radio.js +4 -3
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/radio.js +4 -3
- package/dist/es2019/version.json +1 -1
- package/dist/esm/radio.js +4 -3
- package/dist/esm/version.json +1 -1
- package/package.json +7 -13
- package/report.api.md +351 -349
- package/dist/types-ts4.0/index.d.ts +0 -2
- package/dist/types-ts4.0/radio-group.d.ts +0 -50
- package/dist/types-ts4.0/radio.d.ts +0 -45
- package/dist/types-ts4.0/styles.d.ts +0 -18
- package/dist/types-ts4.0/types.d.ts +0 -118
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/radio
|
|
2
2
|
|
|
3
|
+
## 5.4.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 5.4.2
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`9827dcb82b8`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9827dcb82b8) - No-op change to introduce spacing tokens to design system components.
|
|
14
|
+
|
|
3
15
|
## 5.4.1
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/dist/cjs/radio.js
CHANGED
|
@@ -29,11 +29,11 @@ var _styles = _interopRequireDefault(require("./styles"));
|
|
|
29
29
|
|
|
30
30
|
var _excluded = ["ariaLabel", "isDisabled", "isRequired", "isInvalid", "isChecked", "label", "mode", "name", "onChange", "value", "testId", "analyticsContext"];
|
|
31
31
|
var packageName = "@atlaskit/radio";
|
|
32
|
-
var packageVersion = "5.4.
|
|
32
|
+
var packageVersion = "5.4.3";
|
|
33
33
|
var fontFamily = (0, _constants.fontFamily)();
|
|
34
34
|
var noop = _noop.default;
|
|
35
35
|
var labelPaddingStyles = (0, _react2.css)({
|
|
36
|
-
padding:
|
|
36
|
+
padding: "var(--ds-scale-025, 2px)".concat(" ", "var(--ds-scale-050, 4px)")
|
|
37
37
|
});
|
|
38
38
|
var labelStyles = (0, _react2.css)({
|
|
39
39
|
display: 'flex',
|
|
@@ -65,7 +65,8 @@ var radioStyles = (0, _react2.css)({
|
|
|
65
65
|
*/
|
|
66
66
|
width: '24px',
|
|
67
67
|
height: '24px',
|
|
68
|
-
|
|
68
|
+
// TODO Delete this comment after verifying spacing token -> previous value `0`
|
|
69
|
+
margin: "var(--ds-scale-0, 0px)",
|
|
69
70
|
position: 'relative',
|
|
70
71
|
alignItems: 'center',
|
|
71
72
|
justifyContent: 'center',
|
package/dist/cjs/version.json
CHANGED
package/dist/es2019/radio.js
CHANGED
|
@@ -10,11 +10,11 @@ import GlobalTheme from '@atlaskit/theme/components';
|
|
|
10
10
|
import { fontFamily as getFontFamily } from '@atlaskit/theme/constants';
|
|
11
11
|
import getRadioCustomProperties from './styles';
|
|
12
12
|
const packageName = "@atlaskit/radio";
|
|
13
|
-
const packageVersion = "5.4.
|
|
13
|
+
const packageVersion = "5.4.3";
|
|
14
14
|
const fontFamily = getFontFamily();
|
|
15
15
|
const noop = __noop;
|
|
16
16
|
const labelPaddingStyles = css({
|
|
17
|
-
padding:
|
|
17
|
+
padding: `${"var(--ds-scale-025, 2px)"} ${"var(--ds-scale-050, 4px)"}`
|
|
18
18
|
});
|
|
19
19
|
const labelStyles = css({
|
|
20
20
|
display: 'flex',
|
|
@@ -46,7 +46,8 @@ const radioStyles = css({
|
|
|
46
46
|
*/
|
|
47
47
|
width: '24px',
|
|
48
48
|
height: '24px',
|
|
49
|
-
|
|
49
|
+
// TODO Delete this comment after verifying spacing token -> previous value `0`
|
|
50
|
+
margin: "var(--ds-scale-0, 0px)",
|
|
50
51
|
position: 'relative',
|
|
51
52
|
alignItems: 'center',
|
|
52
53
|
justifyContent: 'center',
|
package/dist/es2019/version.json
CHANGED
package/dist/esm/radio.js
CHANGED
|
@@ -12,11 +12,11 @@ import GlobalTheme from '@atlaskit/theme/components';
|
|
|
12
12
|
import { fontFamily as getFontFamily } from '@atlaskit/theme/constants';
|
|
13
13
|
import getRadioCustomProperties from './styles';
|
|
14
14
|
var packageName = "@atlaskit/radio";
|
|
15
|
-
var packageVersion = "5.4.
|
|
15
|
+
var packageVersion = "5.4.3";
|
|
16
16
|
var fontFamily = getFontFamily();
|
|
17
17
|
var noop = __noop;
|
|
18
18
|
var labelPaddingStyles = css({
|
|
19
|
-
padding:
|
|
19
|
+
padding: "var(--ds-scale-025, 2px)".concat(" ", "var(--ds-scale-050, 4px)")
|
|
20
20
|
});
|
|
21
21
|
var labelStyles = css({
|
|
22
22
|
display: 'flex',
|
|
@@ -48,7 +48,8 @@ var radioStyles = css({
|
|
|
48
48
|
*/
|
|
49
49
|
width: '24px',
|
|
50
50
|
height: '24px',
|
|
51
|
-
|
|
51
|
+
// TODO Delete this comment after verifying spacing token -> previous value `0`
|
|
52
|
+
margin: "var(--ds-scale-0, 0px)",
|
|
52
53
|
position: 'relative',
|
|
53
54
|
alignItems: 'center',
|
|
54
55
|
justifyContent: 'center',
|
package/dist/esm/version.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/radio",
|
|
3
|
-
"version": "5.4.
|
|
3
|
+
"version": "5.4.3",
|
|
4
4
|
"description": "A radio input allows users to select only one option from a number of choices. Radio is generally displayed in a radio group.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -12,16 +12,10 @@
|
|
|
12
12
|
"module": "dist/esm/index.js",
|
|
13
13
|
"module:es2019": "dist/es2019/index.js",
|
|
14
14
|
"types": "dist/types/index.d.ts",
|
|
15
|
-
"typesVersions": {
|
|
16
|
-
">=4.0 <4.5": {
|
|
17
|
-
"*": [
|
|
18
|
-
"dist/types-ts4.0/*"
|
|
19
|
-
]
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
15
|
"sideEffects": false,
|
|
23
16
|
"atlaskit:src": "src/index.tsx",
|
|
24
17
|
"atlassian": {
|
|
18
|
+
"disableProductCI": true,
|
|
25
19
|
"team": "Design System Team",
|
|
26
20
|
"releaseModel": "scheduled",
|
|
27
21
|
"website": {
|
|
@@ -39,7 +33,7 @@
|
|
|
39
33
|
"@atlaskit/analytics-next": "^8.0.0",
|
|
40
34
|
"@atlaskit/ds-lib": "^2.1.0",
|
|
41
35
|
"@atlaskit/theme": "^12.2.0",
|
|
42
|
-
"@atlaskit/tokens": "^0.
|
|
36
|
+
"@atlaskit/tokens": "^0.11.0",
|
|
43
37
|
"@babel/runtime": "^7.0.0",
|
|
44
38
|
"@emotion/react": "^11.7.1"
|
|
45
39
|
},
|
|
@@ -47,11 +41,11 @@
|
|
|
47
41
|
"react": "^16.8.0"
|
|
48
42
|
},
|
|
49
43
|
"devDependencies": {
|
|
50
|
-
"@atlaskit/button": "^16.
|
|
51
|
-
"@atlaskit/checkbox": "^12.
|
|
44
|
+
"@atlaskit/button": "^16.4.0",
|
|
45
|
+
"@atlaskit/checkbox": "^12.4.0",
|
|
52
46
|
"@atlaskit/docs": "^9.0.0",
|
|
53
|
-
"@atlaskit/form": "^8.
|
|
54
|
-
"@atlaskit/section-message": "^6.
|
|
47
|
+
"@atlaskit/form": "^8.7.0",
|
|
48
|
+
"@atlaskit/section-message": "^6.3.0",
|
|
55
49
|
"@atlaskit/ssr": "*",
|
|
56
50
|
"@atlaskit/visual-regression": "*",
|
|
57
51
|
"@atlaskit/webdriver-runner": "*",
|
package/report.api.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
4
|
|
|
5
|
+
<!--
|
|
6
|
+
Generated API Report version: 2.0
|
|
7
|
+
-->
|
|
8
|
+
|
|
9
|
+
[Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
|
|
10
|
+
|
|
5
11
|
```ts
|
|
6
12
|
/// <reference types="react" />
|
|
7
13
|
|
|
@@ -16,7 +22,8 @@ import { SyntheticEvent } from 'react';
|
|
|
16
22
|
import { UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
17
23
|
import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
18
24
|
|
|
19
|
-
|
|
25
|
+
// @public (undocumented)
|
|
26
|
+
type OptionPropType = {
|
|
20
27
|
isDisabled?: boolean;
|
|
21
28
|
label?: ReactNode;
|
|
22
29
|
name?: string;
|
|
@@ -24,16 +31,36 @@ declare type OptionPropType = {
|
|
|
24
31
|
testId?: string;
|
|
25
32
|
};
|
|
26
33
|
|
|
27
|
-
|
|
34
|
+
// @public (undocumented)
|
|
35
|
+
type OptionsPropType = Array<OptionPropType>;
|
|
28
36
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
37
|
+
// @public
|
|
38
|
+
export const Radio: MemoExoticComponent<
|
|
39
|
+
ForwardRefExoticComponent<
|
|
40
|
+
Pick<
|
|
32
41
|
Omit<
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
42
|
+
Omit<
|
|
43
|
+
InputHTMLAttributes<HTMLInputElement>,
|
|
44
|
+
'aria-label' | 'disabled' | 'required' | 'checked' | 'value'
|
|
45
|
+
>,
|
|
46
|
+
keyof {
|
|
47
|
+
ariaLabel?: string | undefined;
|
|
48
|
+
isDisabled?: boolean | undefined;
|
|
49
|
+
isRequired?: boolean | undefined;
|
|
50
|
+
isInvalid?: boolean | undefined;
|
|
51
|
+
isChecked?: boolean | undefined;
|
|
52
|
+
label?: ReactNode;
|
|
53
|
+
onChange?:
|
|
54
|
+
| ((
|
|
55
|
+
e: ChangeEvent<HTMLInputElement>,
|
|
56
|
+
analyticsEvent: UIAnalyticsEvent,
|
|
57
|
+
) => void)
|
|
58
|
+
| undefined;
|
|
59
|
+
value?: string | undefined;
|
|
60
|
+
testId?: string | undefined;
|
|
61
|
+
analyticsContext?: Record<string, any> | undefined;
|
|
62
|
+
}
|
|
63
|
+
> & {
|
|
37
64
|
ariaLabel?: string | undefined;
|
|
38
65
|
isDisabled?: boolean | undefined;
|
|
39
66
|
isRequired?: boolean | undefined;
|
|
@@ -49,356 +76,331 @@ export declare const Radio: MemoExoticComponent<ForwardRefExoticComponent<
|
|
|
49
76
|
value?: string | undefined;
|
|
50
77
|
testId?: string | undefined;
|
|
51
78
|
analyticsContext?: Record<string, any> | undefined;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
isInvalid?: boolean | undefined;
|
|
354
|
-
isChecked?: boolean | undefined;
|
|
355
|
-
label?: ReactNode;
|
|
356
|
-
onChange?:
|
|
357
|
-
| ((
|
|
358
|
-
e: ChangeEvent<HTMLInputElement>,
|
|
359
|
-
analyticsEvent: UIAnalyticsEvent,
|
|
360
|
-
) => void)
|
|
361
|
-
| undefined;
|
|
362
|
-
value?: string | undefined;
|
|
363
|
-
testId?: string | undefined;
|
|
364
|
-
analyticsContext?: Record<string, any> | undefined;
|
|
365
|
-
}
|
|
366
|
-
| 'createAnalyticsEvent'
|
|
367
|
-
> &
|
|
368
|
-
RefAttributes<HTMLInputElement>
|
|
369
|
-
>>;
|
|
79
|
+
} & WithAnalyticsEventsProps,
|
|
80
|
+
| 'accept'
|
|
81
|
+
| 'alt'
|
|
82
|
+
| 'autoComplete'
|
|
83
|
+
| 'autoFocus'
|
|
84
|
+
| 'capture'
|
|
85
|
+
| 'crossOrigin'
|
|
86
|
+
| 'form'
|
|
87
|
+
| 'formAction'
|
|
88
|
+
| 'formEncType'
|
|
89
|
+
| 'formMethod'
|
|
90
|
+
| 'formNoValidate'
|
|
91
|
+
| 'formTarget'
|
|
92
|
+
| 'height'
|
|
93
|
+
| 'list'
|
|
94
|
+
| 'max'
|
|
95
|
+
| 'maxLength'
|
|
96
|
+
| 'min'
|
|
97
|
+
| 'minLength'
|
|
98
|
+
| 'multiple'
|
|
99
|
+
| 'name'
|
|
100
|
+
| 'pattern'
|
|
101
|
+
| 'placeholder'
|
|
102
|
+
| 'readOnly'
|
|
103
|
+
| 'size'
|
|
104
|
+
| 'src'
|
|
105
|
+
| 'step'
|
|
106
|
+
| 'type'
|
|
107
|
+
| 'width'
|
|
108
|
+
| 'defaultChecked'
|
|
109
|
+
| 'defaultValue'
|
|
110
|
+
| 'suppressContentEditableWarning'
|
|
111
|
+
| 'suppressHydrationWarning'
|
|
112
|
+
| 'accessKey'
|
|
113
|
+
| 'className'
|
|
114
|
+
| 'contentEditable'
|
|
115
|
+
| 'contextMenu'
|
|
116
|
+
| 'dir'
|
|
117
|
+
| 'draggable'
|
|
118
|
+
| 'hidden'
|
|
119
|
+
| 'id'
|
|
120
|
+
| 'lang'
|
|
121
|
+
| 'slot'
|
|
122
|
+
| 'spellCheck'
|
|
123
|
+
| 'style'
|
|
124
|
+
| 'tabIndex'
|
|
125
|
+
| 'title'
|
|
126
|
+
| 'inputMode'
|
|
127
|
+
| 'is'
|
|
128
|
+
| 'radioGroup'
|
|
129
|
+
| 'role'
|
|
130
|
+
| 'about'
|
|
131
|
+
| 'datatype'
|
|
132
|
+
| 'inlist'
|
|
133
|
+
| 'prefix'
|
|
134
|
+
| 'property'
|
|
135
|
+
| 'resource'
|
|
136
|
+
| 'typeof'
|
|
137
|
+
| 'vocab'
|
|
138
|
+
| 'autoCapitalize'
|
|
139
|
+
| 'autoCorrect'
|
|
140
|
+
| 'autoSave'
|
|
141
|
+
| 'color'
|
|
142
|
+
| 'itemProp'
|
|
143
|
+
| 'itemScope'
|
|
144
|
+
| 'itemType'
|
|
145
|
+
| 'itemID'
|
|
146
|
+
| 'itemRef'
|
|
147
|
+
| 'results'
|
|
148
|
+
| 'security'
|
|
149
|
+
| 'unselectable'
|
|
150
|
+
| 'aria-activedescendant'
|
|
151
|
+
| 'aria-atomic'
|
|
152
|
+
| 'aria-autocomplete'
|
|
153
|
+
| 'aria-busy'
|
|
154
|
+
| 'aria-checked'
|
|
155
|
+
| 'aria-colcount'
|
|
156
|
+
| 'aria-colindex'
|
|
157
|
+
| 'aria-colspan'
|
|
158
|
+
| 'aria-controls'
|
|
159
|
+
| 'aria-current'
|
|
160
|
+
| 'aria-describedby'
|
|
161
|
+
| 'aria-details'
|
|
162
|
+
| 'aria-disabled'
|
|
163
|
+
| 'aria-dropeffect'
|
|
164
|
+
| 'aria-errormessage'
|
|
165
|
+
| 'aria-expanded'
|
|
166
|
+
| 'aria-flowto'
|
|
167
|
+
| 'aria-grabbed'
|
|
168
|
+
| 'aria-haspopup'
|
|
169
|
+
| 'aria-hidden'
|
|
170
|
+
| 'aria-invalid'
|
|
171
|
+
| 'aria-keyshortcuts'
|
|
172
|
+
| 'aria-labelledby'
|
|
173
|
+
| 'aria-level'
|
|
174
|
+
| 'aria-live'
|
|
175
|
+
| 'aria-modal'
|
|
176
|
+
| 'aria-multiline'
|
|
177
|
+
| 'aria-multiselectable'
|
|
178
|
+
| 'aria-orientation'
|
|
179
|
+
| 'aria-owns'
|
|
180
|
+
| 'aria-placeholder'
|
|
181
|
+
| 'aria-posinset'
|
|
182
|
+
| 'aria-pressed'
|
|
183
|
+
| 'aria-readonly'
|
|
184
|
+
| 'aria-relevant'
|
|
185
|
+
| 'aria-required'
|
|
186
|
+
| 'aria-roledescription'
|
|
187
|
+
| 'aria-rowcount'
|
|
188
|
+
| 'aria-rowindex'
|
|
189
|
+
| 'aria-rowspan'
|
|
190
|
+
| 'aria-selected'
|
|
191
|
+
| 'aria-setsize'
|
|
192
|
+
| 'aria-sort'
|
|
193
|
+
| 'aria-valuemax'
|
|
194
|
+
| 'aria-valuemin'
|
|
195
|
+
| 'aria-valuenow'
|
|
196
|
+
| 'aria-valuetext'
|
|
197
|
+
| 'children'
|
|
198
|
+
| 'dangerouslySetInnerHTML'
|
|
199
|
+
| 'onCopy'
|
|
200
|
+
| 'onCopyCapture'
|
|
201
|
+
| 'onCut'
|
|
202
|
+
| 'onCutCapture'
|
|
203
|
+
| 'onPaste'
|
|
204
|
+
| 'onPasteCapture'
|
|
205
|
+
| 'onCompositionEnd'
|
|
206
|
+
| 'onCompositionEndCapture'
|
|
207
|
+
| 'onCompositionStart'
|
|
208
|
+
| 'onCompositionStartCapture'
|
|
209
|
+
| 'onCompositionUpdate'
|
|
210
|
+
| 'onCompositionUpdateCapture'
|
|
211
|
+
| 'onFocus'
|
|
212
|
+
| 'onFocusCapture'
|
|
213
|
+
| 'onBlur'
|
|
214
|
+
| 'onBlurCapture'
|
|
215
|
+
| 'onChangeCapture'
|
|
216
|
+
| 'onBeforeInput'
|
|
217
|
+
| 'onBeforeInputCapture'
|
|
218
|
+
| 'onInput'
|
|
219
|
+
| 'onInputCapture'
|
|
220
|
+
| 'onReset'
|
|
221
|
+
| 'onResetCapture'
|
|
222
|
+
| 'onSubmit'
|
|
223
|
+
| 'onSubmitCapture'
|
|
224
|
+
| 'onInvalid'
|
|
225
|
+
| 'onInvalidCapture'
|
|
226
|
+
| 'onLoad'
|
|
227
|
+
| 'onLoadCapture'
|
|
228
|
+
| 'onError'
|
|
229
|
+
| 'onErrorCapture'
|
|
230
|
+
| 'onKeyDown'
|
|
231
|
+
| 'onKeyDownCapture'
|
|
232
|
+
| 'onKeyPress'
|
|
233
|
+
| 'onKeyPressCapture'
|
|
234
|
+
| 'onKeyUp'
|
|
235
|
+
| 'onKeyUpCapture'
|
|
236
|
+
| 'onAbort'
|
|
237
|
+
| 'onAbortCapture'
|
|
238
|
+
| 'onCanPlay'
|
|
239
|
+
| 'onCanPlayCapture'
|
|
240
|
+
| 'onCanPlayThrough'
|
|
241
|
+
| 'onCanPlayThroughCapture'
|
|
242
|
+
| 'onDurationChange'
|
|
243
|
+
| 'onDurationChangeCapture'
|
|
244
|
+
| 'onEmptied'
|
|
245
|
+
| 'onEmptiedCapture'
|
|
246
|
+
| 'onEncrypted'
|
|
247
|
+
| 'onEncryptedCapture'
|
|
248
|
+
| 'onEnded'
|
|
249
|
+
| 'onEndedCapture'
|
|
250
|
+
| 'onLoadedData'
|
|
251
|
+
| 'onLoadedDataCapture'
|
|
252
|
+
| 'onLoadedMetadata'
|
|
253
|
+
| 'onLoadedMetadataCapture'
|
|
254
|
+
| 'onLoadStart'
|
|
255
|
+
| 'onLoadStartCapture'
|
|
256
|
+
| 'onPause'
|
|
257
|
+
| 'onPauseCapture'
|
|
258
|
+
| 'onPlay'
|
|
259
|
+
| 'onPlayCapture'
|
|
260
|
+
| 'onPlaying'
|
|
261
|
+
| 'onPlayingCapture'
|
|
262
|
+
| 'onProgress'
|
|
263
|
+
| 'onProgressCapture'
|
|
264
|
+
| 'onRateChange'
|
|
265
|
+
| 'onRateChangeCapture'
|
|
266
|
+
| 'onSeeked'
|
|
267
|
+
| 'onSeekedCapture'
|
|
268
|
+
| 'onSeeking'
|
|
269
|
+
| 'onSeekingCapture'
|
|
270
|
+
| 'onStalled'
|
|
271
|
+
| 'onStalledCapture'
|
|
272
|
+
| 'onSuspend'
|
|
273
|
+
| 'onSuspendCapture'
|
|
274
|
+
| 'onTimeUpdate'
|
|
275
|
+
| 'onTimeUpdateCapture'
|
|
276
|
+
| 'onVolumeChange'
|
|
277
|
+
| 'onVolumeChangeCapture'
|
|
278
|
+
| 'onWaiting'
|
|
279
|
+
| 'onWaitingCapture'
|
|
280
|
+
| 'onAuxClick'
|
|
281
|
+
| 'onAuxClickCapture'
|
|
282
|
+
| 'onClick'
|
|
283
|
+
| 'onClickCapture'
|
|
284
|
+
| 'onContextMenu'
|
|
285
|
+
| 'onContextMenuCapture'
|
|
286
|
+
| 'onDoubleClick'
|
|
287
|
+
| 'onDoubleClickCapture'
|
|
288
|
+
| 'onDrag'
|
|
289
|
+
| 'onDragCapture'
|
|
290
|
+
| 'onDragEnd'
|
|
291
|
+
| 'onDragEndCapture'
|
|
292
|
+
| 'onDragEnter'
|
|
293
|
+
| 'onDragEnterCapture'
|
|
294
|
+
| 'onDragExit'
|
|
295
|
+
| 'onDragExitCapture'
|
|
296
|
+
| 'onDragLeave'
|
|
297
|
+
| 'onDragLeaveCapture'
|
|
298
|
+
| 'onDragOver'
|
|
299
|
+
| 'onDragOverCapture'
|
|
300
|
+
| 'onDragStart'
|
|
301
|
+
| 'onDragStartCapture'
|
|
302
|
+
| 'onDrop'
|
|
303
|
+
| 'onDropCapture'
|
|
304
|
+
| 'onMouseDown'
|
|
305
|
+
| 'onMouseDownCapture'
|
|
306
|
+
| 'onMouseEnter'
|
|
307
|
+
| 'onMouseLeave'
|
|
308
|
+
| 'onMouseMove'
|
|
309
|
+
| 'onMouseMoveCapture'
|
|
310
|
+
| 'onMouseOut'
|
|
311
|
+
| 'onMouseOutCapture'
|
|
312
|
+
| 'onMouseOver'
|
|
313
|
+
| 'onMouseOverCapture'
|
|
314
|
+
| 'onMouseUp'
|
|
315
|
+
| 'onMouseUpCapture'
|
|
316
|
+
| 'onSelect'
|
|
317
|
+
| 'onSelectCapture'
|
|
318
|
+
| 'onTouchCancel'
|
|
319
|
+
| 'onTouchCancelCapture'
|
|
320
|
+
| 'onTouchEnd'
|
|
321
|
+
| 'onTouchEndCapture'
|
|
322
|
+
| 'onTouchMove'
|
|
323
|
+
| 'onTouchMoveCapture'
|
|
324
|
+
| 'onTouchStart'
|
|
325
|
+
| 'onTouchStartCapture'
|
|
326
|
+
| 'onPointerDown'
|
|
327
|
+
| 'onPointerDownCapture'
|
|
328
|
+
| 'onPointerMove'
|
|
329
|
+
| 'onPointerMoveCapture'
|
|
330
|
+
| 'onPointerUp'
|
|
331
|
+
| 'onPointerUpCapture'
|
|
332
|
+
| 'onPointerCancel'
|
|
333
|
+
| 'onPointerCancelCapture'
|
|
334
|
+
| 'onPointerEnter'
|
|
335
|
+
| 'onPointerEnterCapture'
|
|
336
|
+
| 'onPointerLeave'
|
|
337
|
+
| 'onPointerLeaveCapture'
|
|
338
|
+
| 'onPointerOver'
|
|
339
|
+
| 'onPointerOverCapture'
|
|
340
|
+
| 'onPointerOut'
|
|
341
|
+
| 'onPointerOutCapture'
|
|
342
|
+
| 'onGotPointerCapture'
|
|
343
|
+
| 'onGotPointerCaptureCapture'
|
|
344
|
+
| 'onLostPointerCapture'
|
|
345
|
+
| 'onLostPointerCaptureCapture'
|
|
346
|
+
| 'onScroll'
|
|
347
|
+
| 'onScrollCapture'
|
|
348
|
+
| 'onWheel'
|
|
349
|
+
| 'onWheelCapture'
|
|
350
|
+
| 'onAnimationStart'
|
|
351
|
+
| 'onAnimationStartCapture'
|
|
352
|
+
| 'onAnimationEnd'
|
|
353
|
+
| 'onAnimationEndCapture'
|
|
354
|
+
| 'onAnimationIteration'
|
|
355
|
+
| 'onAnimationIterationCapture'
|
|
356
|
+
| 'onTransitionEnd'
|
|
357
|
+
| 'onTransitionEndCapture'
|
|
358
|
+
| keyof {
|
|
359
|
+
ariaLabel?: string | undefined;
|
|
360
|
+
isDisabled?: boolean | undefined;
|
|
361
|
+
isRequired?: boolean | undefined;
|
|
362
|
+
isInvalid?: boolean | undefined;
|
|
363
|
+
isChecked?: boolean | undefined;
|
|
364
|
+
label?: ReactNode;
|
|
365
|
+
onChange?:
|
|
366
|
+
| ((
|
|
367
|
+
e: ChangeEvent<HTMLInputElement>,
|
|
368
|
+
analyticsEvent: UIAnalyticsEvent,
|
|
369
|
+
) => void)
|
|
370
|
+
| undefined;
|
|
371
|
+
value?: string | undefined;
|
|
372
|
+
testId?: string | undefined;
|
|
373
|
+
analyticsContext?: Record<string, any> | undefined;
|
|
374
|
+
}
|
|
375
|
+
| 'createAnalyticsEvent'
|
|
376
|
+
> &
|
|
377
|
+
RefAttributes<HTMLInputElement>
|
|
378
|
+
>
|
|
379
|
+
>;
|
|
370
380
|
|
|
371
|
-
|
|
381
|
+
// @public (undocumented)
|
|
382
|
+
export function RadioGroup(props: RadioGroupProps): JSX.Element;
|
|
372
383
|
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
384
|
+
// @public (undocumented)
|
|
385
|
+
interface RadioGroupProps {
|
|
386
|
+
'aria-labelledby'?: string;
|
|
387
|
+
analyticsContext?: Record<string, any>;
|
|
377
388
|
defaultValue?: RadioValue | null;
|
|
378
|
-
/** Sets the disabled state of all `Radio` elements in the group. Overrides the `isDisabled` setting of all child `Radio` items. */
|
|
379
389
|
isDisabled?: boolean;
|
|
380
|
-
/** Sets the required state of all `Radio` elements in the group */
|
|
381
|
-
isRequired?: boolean;
|
|
382
|
-
/** Sets the invalid state of all `Radio` elements in the group */
|
|
383
390
|
isInvalid?: boolean;
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
/** Function that gets fired after each invalid event */
|
|
387
|
-
onInvalid?: (event: SyntheticEvent<any>) => void;
|
|
388
|
-
/** Function that gets after each change event */
|
|
391
|
+
isRequired?: boolean;
|
|
392
|
+
name?: string;
|
|
389
393
|
onChange?: (
|
|
390
394
|
e: React_2.ChangeEvent<HTMLInputElement>,
|
|
391
395
|
analyticsEvent: UIAnalyticsEvent,
|
|
392
396
|
) => void;
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
analyticsContext?: Record<string, any>;
|
|
397
|
-
/** The id of the element that links to this radiogroup. */
|
|
398
|
-
'aria-labelledby'?: string;
|
|
397
|
+
onInvalid?: (event: SyntheticEvent<any>) => void;
|
|
398
|
+
options: OptionsPropType;
|
|
399
|
+
value?: RadioValue | null;
|
|
399
400
|
}
|
|
400
401
|
|
|
401
|
-
|
|
402
|
+
// @public (undocumented)
|
|
403
|
+
type RadioValue = string;
|
|
402
404
|
|
|
403
|
-
|
|
405
|
+
// (No @packageDocumentation comment for this package)
|
|
404
406
|
```
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import React, { SyntheticEvent } from 'react';
|
|
2
|
-
import { UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
3
|
-
import { OptionsPropType, RadioValue } from './types';
|
|
4
|
-
export interface RadioGroupProps {
|
|
5
|
-
/**
|
|
6
|
-
* Once set, controls the selected value on the `RadioGroup`
|
|
7
|
-
*/
|
|
8
|
-
value?: RadioValue | null;
|
|
9
|
-
/**
|
|
10
|
-
* Sets the initial selected value on the `RadioGroup`
|
|
11
|
-
*/
|
|
12
|
-
defaultValue?: RadioValue | null;
|
|
13
|
-
/**
|
|
14
|
-
* Sets the disabled state of all `Radio` elements in the group. Overrides the `isDisabled` setting of all child `Radio` items.
|
|
15
|
-
*/
|
|
16
|
-
isDisabled?: boolean;
|
|
17
|
-
/**
|
|
18
|
-
* Sets the required state of all `Radio` elements in the group
|
|
19
|
-
*/
|
|
20
|
-
isRequired?: boolean;
|
|
21
|
-
/**
|
|
22
|
-
* Sets the invalid state of all `Radio` elements in the group
|
|
23
|
-
*/
|
|
24
|
-
isInvalid?: boolean;
|
|
25
|
-
/**
|
|
26
|
-
* An array of objects, each object is mapped onto a `Radio` element within the group. Name must be unique to the group.
|
|
27
|
-
*/
|
|
28
|
-
options: OptionsPropType;
|
|
29
|
-
/**
|
|
30
|
-
* Function that gets fired after each invalid event
|
|
31
|
-
*/
|
|
32
|
-
onInvalid?: (event: SyntheticEvent<any>) => void;
|
|
33
|
-
/**
|
|
34
|
-
* Function that gets after each change event
|
|
35
|
-
*/
|
|
36
|
-
onChange?: (e: React.ChangeEvent<HTMLInputElement>, analyticsEvent: UIAnalyticsEvent) => void;
|
|
37
|
-
/**
|
|
38
|
-
* Sets the `name` prop on each of the `Radio` elements in the group
|
|
39
|
-
*/
|
|
40
|
-
name?: string;
|
|
41
|
-
/**
|
|
42
|
-
* Additional information to be included in the `context` of analytics events that come from radio
|
|
43
|
-
*/
|
|
44
|
-
analyticsContext?: Record<string, any>;
|
|
45
|
-
/**
|
|
46
|
-
* The id of the element that links to this radiogroup.
|
|
47
|
-
*/
|
|
48
|
-
'aria-labelledby'?: string;
|
|
49
|
-
}
|
|
50
|
-
export default function RadioGroup(props: RadioGroupProps): JSX.Element;
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
/**
|
|
3
|
-
* __Radio__
|
|
4
|
-
*
|
|
5
|
-
* A radio input allows users to select only one option from a number of choices. Radio is generally displayed in a radio group.
|
|
6
|
-
*
|
|
7
|
-
* - [Examples](https://atlassian.design/components/radio/examples)
|
|
8
|
-
* - [Code](https://atlassian.design/components/radio/code)
|
|
9
|
-
* - [Usage](https://atlassian.design/components/radio/usage)
|
|
10
|
-
*/
|
|
11
|
-
declare const Radio: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<Pick<Omit<Omit<import("react").InputHTMLAttributes<HTMLInputElement>, "aria-label" | "disabled" | "required" | "checked" | "value">, keyof {
|
|
12
|
-
ariaLabel?: string | undefined;
|
|
13
|
-
isDisabled?: boolean | undefined;
|
|
14
|
-
isRequired?: boolean | undefined;
|
|
15
|
-
isInvalid?: boolean | undefined;
|
|
16
|
-
isChecked?: boolean | undefined;
|
|
17
|
-
label?: import("react").ReactNode;
|
|
18
|
-
onChange?: ((e: import("react").ChangeEvent<HTMLInputElement>, analyticsEvent: import("@atlaskit/analytics-next").UIAnalyticsEvent) => void) | undefined;
|
|
19
|
-
value?: string | undefined;
|
|
20
|
-
testId?: string | undefined;
|
|
21
|
-
analyticsContext?: Record<string, any> | undefined;
|
|
22
|
-
}> & {
|
|
23
|
-
ariaLabel?: string | undefined;
|
|
24
|
-
isDisabled?: boolean | undefined;
|
|
25
|
-
isRequired?: boolean | undefined;
|
|
26
|
-
isInvalid?: boolean | undefined;
|
|
27
|
-
isChecked?: boolean | undefined;
|
|
28
|
-
label?: import("react").ReactNode;
|
|
29
|
-
onChange?: ((e: import("react").ChangeEvent<HTMLInputElement>, analyticsEvent: import("@atlaskit/analytics-next").UIAnalyticsEvent) => void) | undefined;
|
|
30
|
-
value?: string | undefined;
|
|
31
|
-
testId?: string | undefined;
|
|
32
|
-
analyticsContext?: Record<string, any> | undefined;
|
|
33
|
-
} & import("@atlaskit/analytics-next").WithAnalyticsEventsProps, "accept" | "alt" | "autoComplete" | "autoFocus" | "capture" | "crossOrigin" | "form" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "height" | "list" | "max" | "maxLength" | "min" | "minLength" | "multiple" | "name" | "pattern" | "placeholder" | "readOnly" | "size" | "src" | "step" | "type" | "width" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "inputMode" | "is" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | keyof {
|
|
34
|
-
ariaLabel?: string | undefined;
|
|
35
|
-
isDisabled?: boolean | undefined;
|
|
36
|
-
isRequired?: boolean | undefined;
|
|
37
|
-
isInvalid?: boolean | undefined;
|
|
38
|
-
isChecked?: boolean | undefined;
|
|
39
|
-
label?: import("react").ReactNode;
|
|
40
|
-
onChange?: ((e: import("react").ChangeEvent<HTMLInputElement>, analyticsEvent: import("@atlaskit/analytics-next").UIAnalyticsEvent) => void) | undefined;
|
|
41
|
-
value?: string | undefined;
|
|
42
|
-
testId?: string | undefined;
|
|
43
|
-
analyticsContext?: Record<string, any> | undefined;
|
|
44
|
-
} | "createAnalyticsEvent"> & import("react").RefAttributes<HTMLInputElement>>>;
|
|
45
|
-
export default Radio;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { ThemeModes } from '@atlaskit/theme/types';
|
|
2
|
-
export default function getRadioCustomProperties(mode: ThemeModes): {
|
|
3
|
-
'--local-background': "var(--ds-background-input)";
|
|
4
|
-
'--local-background-active': "var(--ds-background-input-pressed)";
|
|
5
|
-
'--local-background-checked': "var(--ds-background-brand-bold)";
|
|
6
|
-
'--local-background-checked-active': "var(--ds-background-brand-bold-pressed)";
|
|
7
|
-
'--local-background-checked-hover': "var(--ds-background-brand-bold-hovered)";
|
|
8
|
-
'--local-background-disabled': "var(--ds-background-input)";
|
|
9
|
-
'--local-background-hover': "var(--ds-background-input-hovered)";
|
|
10
|
-
'--local-border': "var(--ds-border-input)";
|
|
11
|
-
'--local-border-disabled': "var(--ds-background-disabled)";
|
|
12
|
-
'--local-border-hover': "var(--ds-border-input)";
|
|
13
|
-
'--local-border-focus': "var(--ds-border-focused)";
|
|
14
|
-
'--local-dot-active': "var(--ds-text-inverse)";
|
|
15
|
-
'--local-dot-checked': "var(--ds-text-inverse)";
|
|
16
|
-
'--local-dot-disabled': "var(--ds-text-disabled)";
|
|
17
|
-
'--local-invalid': "var(--ds-icon-danger)";
|
|
18
|
-
};
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
import { ReactNode, SyntheticEvent } from 'react';
|
|
2
|
-
import { UIAnalyticsEvent, WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
3
|
-
export declare type OptionPropType = {
|
|
4
|
-
isDisabled?: boolean;
|
|
5
|
-
label?: ReactNode;
|
|
6
|
-
name?: string;
|
|
7
|
-
value?: RadioValue;
|
|
8
|
-
testId?: string;
|
|
9
|
-
};
|
|
10
|
-
export declare type OptionsPropType = Array<OptionPropType>;
|
|
11
|
-
export declare type RadioValue = string;
|
|
12
|
-
declare type OwnProps = {
|
|
13
|
-
/**
|
|
14
|
-
* the aria-label attribute associated with the radio element
|
|
15
|
-
*/
|
|
16
|
-
ariaLabel?: string;
|
|
17
|
-
/**
|
|
18
|
-
* Makes a `Radio` field unselectable when true. Overridden by `isDisabled` prop of `RadioGroup`.
|
|
19
|
-
*/
|
|
20
|
-
isDisabled?: boolean;
|
|
21
|
-
/**
|
|
22
|
-
* Marks this as a required field
|
|
23
|
-
*/
|
|
24
|
-
isRequired?: boolean;
|
|
25
|
-
/**
|
|
26
|
-
* Field is invalid
|
|
27
|
-
*/
|
|
28
|
-
isInvalid?: boolean;
|
|
29
|
-
/**
|
|
30
|
-
* Set the field as checked
|
|
31
|
-
*/
|
|
32
|
-
isChecked?: boolean;
|
|
33
|
-
/**
|
|
34
|
-
* The label value for the input rendered to the dom
|
|
35
|
-
*/
|
|
36
|
-
label?: ReactNode;
|
|
37
|
-
/**
|
|
38
|
-
* onChange event handler, passed into the props of each `Radio` Component instantiated within `RadioGroup`
|
|
39
|
-
*/
|
|
40
|
-
onChange?: (e: React.ChangeEvent<HTMLInputElement>, analyticsEvent: UIAnalyticsEvent) => void;
|
|
41
|
-
/**
|
|
42
|
-
* Field value
|
|
43
|
-
*/
|
|
44
|
-
value?: RadioValue;
|
|
45
|
-
/**
|
|
46
|
-
* A `testId` prop is provided for specified elements, which is a unique string that appears as a data attribute `data-testid` in the rendered code, serving as a hook for automated tests
|
|
47
|
-
* we have 2 different testid generated based on the one you pass to the Radio component:
|
|
48
|
-
* - `{testId}--radio-input` to check if it got changed to checked/unchecked.
|
|
49
|
-
* - `{testId}--radio-label` to click the input
|
|
50
|
-
*/
|
|
51
|
-
testId?: string;
|
|
52
|
-
/**
|
|
53
|
-
* Additional information to be included in the `context` of analytics events that come from radio
|
|
54
|
-
*/
|
|
55
|
-
analyticsContext?: Record<string, any>;
|
|
56
|
-
};
|
|
57
|
-
declare type Combine<First, Second> = Omit<First, keyof Second> & Second;
|
|
58
|
-
export declare type RadioProps = Combine<Omit<React.InputHTMLAttributes<HTMLInputElement>, 'aria-label' | 'disabled' | 'required' | 'checked' | 'value'>, OwnProps> & WithAnalyticsEventsProps;
|
|
59
|
-
export interface ExtractReactTypeProps extends WithAnalyticsEventsProps {
|
|
60
|
-
/**
|
|
61
|
-
* the aria-label attribute associated with the radio element
|
|
62
|
-
*/
|
|
63
|
-
ariaLabel?: string;
|
|
64
|
-
/**
|
|
65
|
-
* Field disabled
|
|
66
|
-
*/
|
|
67
|
-
isDisabled?: boolean;
|
|
68
|
-
/**
|
|
69
|
-
* Marks this as a required field
|
|
70
|
-
*/
|
|
71
|
-
isRequired?: boolean;
|
|
72
|
-
/**
|
|
73
|
-
* Field is invalid
|
|
74
|
-
*/
|
|
75
|
-
isInvalid?: boolean;
|
|
76
|
-
/**
|
|
77
|
-
* Set the field as checked
|
|
78
|
-
*/
|
|
79
|
-
isChecked?: boolean;
|
|
80
|
-
/**
|
|
81
|
-
* The label value for the input rendered to the dom
|
|
82
|
-
*/
|
|
83
|
-
label?: ReactNode;
|
|
84
|
-
/**
|
|
85
|
-
* Field name, must be unique to the radio group
|
|
86
|
-
*/
|
|
87
|
-
name?: string;
|
|
88
|
-
/**
|
|
89
|
-
* `onChange` event handler, passed into the props of each `Radio` Component instantiated within RadioGroup
|
|
90
|
-
*/
|
|
91
|
-
onChange?: (e: React.ChangeEvent<HTMLInputElement>, analyticsEvent: UIAnalyticsEvent) => void;
|
|
92
|
-
onBlur?: React.FocusEventHandler<HTMLInputElement>;
|
|
93
|
-
onFocus?: React.FocusEventHandler<HTMLInputElement>;
|
|
94
|
-
onMouseDown?: React.MouseEventHandler;
|
|
95
|
-
onMouseUp?: React.MouseEventHandler;
|
|
96
|
-
onMouseEnter?: React.MouseEventHandler;
|
|
97
|
-
onMouseLeave?: React.MouseEventHandler;
|
|
98
|
-
/**
|
|
99
|
-
* `onInvalid` event handler, passed into the props of each `Radio` component instantiated within `RadioGroup`
|
|
100
|
-
*/
|
|
101
|
-
onInvalid?: (e: SyntheticEvent<any>) => void;
|
|
102
|
-
/**
|
|
103
|
-
* Field value
|
|
104
|
-
*/
|
|
105
|
-
value?: RadioValue;
|
|
106
|
-
/**
|
|
107
|
-
* A `testId` prop is provided for specified elements, which is a unique string that appears as a data attribute `data-testid` in the rendered code, serving as a hook for automated tests
|
|
108
|
-
* we have two different `testId`s generated based on the one you pass to the Radio component:
|
|
109
|
-
* - `{testId}--radio-input` to check if it got changed to checked/unchecked.
|
|
110
|
-
* - `{testId}--radio-label` to click the input
|
|
111
|
-
*/
|
|
112
|
-
testId?: string;
|
|
113
|
-
/**
|
|
114
|
-
* Additional information to be included in the `context` of analytics events that come from radio
|
|
115
|
-
*/
|
|
116
|
-
analyticsContext?: Record<string, any>;
|
|
117
|
-
}
|
|
118
|
-
export {};
|