@atlaskit/radio 5.4.2 → 5.4.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 CHANGED
@@ -1,5 +1,17 @@
1
1
  # @atlaskit/radio
2
2
 
3
+ ## 5.4.4
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 5.4.3
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
3
15
  ## 5.4.2
4
16
 
5
17
  ### Patch Changes
package/dist/cjs/radio.js CHANGED
@@ -29,7 +29,7 @@ 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.2";
32
+ var packageVersion = "5.4.4";
33
33
  var fontFamily = (0, _constants.fontFamily)();
34
34
  var noop = _noop.default;
35
35
  var labelPaddingStyles = (0, _react2.css)({
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/radio",
3
- "version": "5.4.2",
3
+ "version": "5.4.4",
4
4
  "sideEffects": false
5
5
  }
@@ -10,7 +10,7 @@ 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.2";
13
+ const packageVersion = "5.4.4";
14
14
  const fontFamily = getFontFamily();
15
15
  const noop = __noop;
16
16
  const labelPaddingStyles = css({
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/radio",
3
- "version": "5.4.2",
3
+ "version": "5.4.4",
4
4
  "sideEffects": false
5
5
  }
package/dist/esm/radio.js CHANGED
@@ -12,7 +12,7 @@ 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.2";
15
+ var packageVersion = "5.4.4";
16
16
  var fontFamily = getFontFamily();
17
17
  var noop = __noop;
18
18
  var labelPaddingStyles = css({
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/radio",
3
- "version": "5.4.2",
3
+ "version": "5.4.4",
4
4
  "sideEffects": false
5
5
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/radio",
3
- "version": "5.4.2",
3
+ "version": "5.4.4",
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,14 +12,6 @@
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
- "dist/types-ts4.0/index.d.ts"
20
- ]
21
- }
22
- },
23
15
  "sideEffects": false,
24
16
  "atlaskit:src": "src/index.tsx",
25
17
  "atlassian": {
@@ -41,7 +33,7 @@
41
33
  "@atlaskit/analytics-next": "^8.0.0",
42
34
  "@atlaskit/ds-lib": "^2.1.0",
43
35
  "@atlaskit/theme": "^12.2.0",
44
- "@atlaskit/tokens": "^0.10.0",
36
+ "@atlaskit/tokens": "^0.12.0",
45
37
  "@babel/runtime": "^7.0.0",
46
38
  "@emotion/react": "^11.7.1"
47
39
  },
@@ -49,10 +41,10 @@
49
41
  "react": "^16.8.0"
50
42
  },
51
43
  "devDependencies": {
52
- "@atlaskit/button": "^16.3.0",
44
+ "@atlaskit/button": "^16.5.0",
53
45
  "@atlaskit/checkbox": "^12.4.0",
54
46
  "@atlaskit/docs": "^9.0.0",
55
- "@atlaskit/form": "^8.6.0",
47
+ "@atlaskit/form": "^8.8.0",
56
48
  "@atlaskit/section-message": "^6.3.0",
57
49
  "@atlaskit/ssr": "*",
58
50
  "@atlaskit/visual-regression": "*",
package/report.api.md CHANGED
@@ -1,8 +1,17 @@
1
- ## API Report File for "@atlaskit/radio".
1
+ <!-- API Report Version: 2.2 -->
2
2
 
3
- > Do not edit this file. This report is auto-generated by [API Extractor](https://api-extractor.com/).
3
+ ## API Report File for "@atlaskit/radio"
4
4
 
5
- [Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
5
+ > Do not edit this file. This report is auto-generated using [API Extractor](https://api-extractor.com/).
6
+ > [Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
7
+
8
+ ### Table of contents
9
+
10
+ - [Main Entry Types](#main-entry-types)
11
+
12
+ ### Main Entry Types
13
+
14
+ <!--SECTION START: Main Entry Types-->
6
15
 
7
16
  ```ts
8
17
  /// <reference types="react" />
@@ -18,7 +27,8 @@ import { SyntheticEvent } from 'react';
18
27
  import { UIAnalyticsEvent } from '@atlaskit/analytics-next';
19
28
  import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
20
29
 
21
- declare type OptionPropType = {
30
+ // @public (undocumented)
31
+ type OptionPropType = {
22
32
  isDisabled?: boolean;
23
33
  label?: ReactNode;
24
34
  name?: string;
@@ -26,23 +36,16 @@ declare type OptionPropType = {
26
36
  testId?: string;
27
37
  };
28
38
 
29
- declare type OptionsPropType = Array<OptionPropType>;
39
+ // @public (undocumented)
40
+ type OptionsPropType = Array<OptionPropType>;
30
41
 
31
- /**
32
- * __Radio__
33
- *
34
- * A radio input allows users to select only one option from a number of choices. Radio is generally displayed in a radio group.
35
- *
36
- * - [Examples](https://atlassian.design/components/radio/examples)
37
- * - [Code](https://atlassian.design/components/radio/code)
38
- * - [Usage](https://atlassian.design/components/radio/usage)
39
- */
40
- export declare const Radio: MemoExoticComponent<ForwardRefExoticComponent<
41
- Pick<
42
- Omit<
42
+ // @public
43
+ export const Radio: MemoExoticComponent<
44
+ ForwardRefExoticComponent<
45
+ Pick<
43
46
  Omit<
44
47
  InputHTMLAttributes<HTMLInputElement>,
45
- 'aria-label' | 'disabled' | 'required' | 'checked' | 'value'
48
+ 'aria-label' | 'checked' | 'disabled' | 'required' | 'value'
46
49
  >,
47
50
  keyof {
48
51
  ariaLabel?: string | undefined;
@@ -78,76 +81,10 @@ export declare const Radio: MemoExoticComponent<ForwardRefExoticComponent<
78
81
  testId?: string | undefined;
79
82
  analyticsContext?: Record<string, any> | undefined;
80
83
  } & WithAnalyticsEventsProps,
84
+ | 'about'
81
85
  | 'accept'
82
- | 'alt'
83
- | 'autoComplete'
84
- | 'autoFocus'
85
- | 'capture'
86
- | 'crossOrigin'
87
- | 'form'
88
- | 'formAction'
89
- | 'formEncType'
90
- | 'formMethod'
91
- | 'formNoValidate'
92
- | 'formTarget'
93
- | 'height'
94
- | 'list'
95
- | 'max'
96
- | 'maxLength'
97
- | 'min'
98
- | 'minLength'
99
- | 'multiple'
100
- | 'name'
101
- | 'pattern'
102
- | 'placeholder'
103
- | 'readOnly'
104
- | 'size'
105
- | 'src'
106
- | 'step'
107
- | 'type'
108
- | 'width'
109
- | 'defaultChecked'
110
- | 'defaultValue'
111
- | 'suppressContentEditableWarning'
112
- | 'suppressHydrationWarning'
113
86
  | 'accessKey'
114
- | 'className'
115
- | 'contentEditable'
116
- | 'contextMenu'
117
- | 'dir'
118
- | 'draggable'
119
- | 'hidden'
120
- | 'id'
121
- | 'lang'
122
- | 'slot'
123
- | 'spellCheck'
124
- | 'style'
125
- | 'tabIndex'
126
- | 'title'
127
- | 'inputMode'
128
- | 'is'
129
- | 'radioGroup'
130
- | 'role'
131
- | 'about'
132
- | 'datatype'
133
- | 'inlist'
134
- | 'prefix'
135
- | 'property'
136
- | 'resource'
137
- | 'typeof'
138
- | 'vocab'
139
- | 'autoCapitalize'
140
- | 'autoCorrect'
141
- | 'autoSave'
142
- | 'color'
143
- | 'itemProp'
144
- | 'itemScope'
145
- | 'itemType'
146
- | 'itemID'
147
- | 'itemRef'
148
- | 'results'
149
- | 'security'
150
- | 'unselectable'
87
+ | 'alt'
151
88
  | 'aria-activedescendant'
152
89
  | 'aria-atomic'
153
90
  | 'aria-autocomplete'
@@ -195,95 +132,83 @@ export declare const Radio: MemoExoticComponent<ForwardRefExoticComponent<
195
132
  | 'aria-valuemin'
196
133
  | 'aria-valuenow'
197
134
  | 'aria-valuetext'
135
+ | 'autoCapitalize'
136
+ | 'autoComplete'
137
+ | 'autoCorrect'
138
+ | 'autoFocus'
139
+ | 'autoSave'
140
+ | 'capture'
198
141
  | 'children'
142
+ | 'className'
143
+ | 'color'
144
+ | 'contentEditable'
145
+ | 'contextMenu'
146
+ | 'createAnalyticsEvent'
147
+ | 'crossOrigin'
199
148
  | 'dangerouslySetInnerHTML'
200
- | 'onCopy'
201
- | 'onCopyCapture'
202
- | 'onCut'
203
- | 'onCutCapture'
204
- | 'onPaste'
205
- | 'onPasteCapture'
206
- | 'onCompositionEnd'
207
- | 'onCompositionEndCapture'
208
- | 'onCompositionStart'
209
- | 'onCompositionStartCapture'
210
- | 'onCompositionUpdate'
211
- | 'onCompositionUpdateCapture'
212
- | 'onFocus'
213
- | 'onFocusCapture'
214
- | 'onBlur'
215
- | 'onBlurCapture'
216
- | 'onChangeCapture'
217
- | 'onBeforeInput'
218
- | 'onBeforeInputCapture'
219
- | 'onInput'
220
- | 'onInputCapture'
221
- | 'onReset'
222
- | 'onResetCapture'
223
- | 'onSubmit'
224
- | 'onSubmitCapture'
225
- | 'onInvalid'
226
- | 'onInvalidCapture'
227
- | 'onLoad'
228
- | 'onLoadCapture'
229
- | 'onError'
230
- | 'onErrorCapture'
231
- | 'onKeyDown'
232
- | 'onKeyDownCapture'
233
- | 'onKeyPress'
234
- | 'onKeyPressCapture'
235
- | 'onKeyUp'
236
- | 'onKeyUpCapture'
149
+ | 'datatype'
150
+ | 'defaultChecked'
151
+ | 'defaultValue'
152
+ | 'dir'
153
+ | 'draggable'
154
+ | 'form'
155
+ | 'formAction'
156
+ | 'formEncType'
157
+ | 'formMethod'
158
+ | 'formNoValidate'
159
+ | 'formTarget'
160
+ | 'height'
161
+ | 'hidden'
162
+ | 'id'
163
+ | 'inlist'
164
+ | 'inputMode'
165
+ | 'is'
166
+ | 'itemID'
167
+ | 'itemProp'
168
+ | 'itemRef'
169
+ | 'itemScope'
170
+ | 'itemType'
171
+ | 'lang'
172
+ | 'list'
173
+ | 'max'
174
+ | 'maxLength'
175
+ | 'min'
176
+ | 'minLength'
177
+ | 'multiple'
178
+ | 'name'
237
179
  | 'onAbort'
238
180
  | 'onAbortCapture'
181
+ | 'onAnimationEnd'
182
+ | 'onAnimationEndCapture'
183
+ | 'onAnimationIteration'
184
+ | 'onAnimationIterationCapture'
185
+ | 'onAnimationStart'
186
+ | 'onAnimationStartCapture'
187
+ | 'onAuxClick'
188
+ | 'onAuxClickCapture'
189
+ | 'onBeforeInput'
190
+ | 'onBeforeInputCapture'
191
+ | 'onBlur'
192
+ | 'onBlurCapture'
239
193
  | 'onCanPlay'
240
194
  | 'onCanPlayCapture'
241
195
  | 'onCanPlayThrough'
242
196
  | 'onCanPlayThroughCapture'
243
- | 'onDurationChange'
244
- | 'onDurationChangeCapture'
245
- | 'onEmptied'
246
- | 'onEmptiedCapture'
247
- | 'onEncrypted'
248
- | 'onEncryptedCapture'
249
- | 'onEnded'
250
- | 'onEndedCapture'
251
- | 'onLoadedData'
252
- | 'onLoadedDataCapture'
253
- | 'onLoadedMetadata'
254
- | 'onLoadedMetadataCapture'
255
- | 'onLoadStart'
256
- | 'onLoadStartCapture'
257
- | 'onPause'
258
- | 'onPauseCapture'
259
- | 'onPlay'
260
- | 'onPlayCapture'
261
- | 'onPlaying'
262
- | 'onPlayingCapture'
263
- | 'onProgress'
264
- | 'onProgressCapture'
265
- | 'onRateChange'
266
- | 'onRateChangeCapture'
267
- | 'onSeeked'
268
- | 'onSeekedCapture'
269
- | 'onSeeking'
270
- | 'onSeekingCapture'
271
- | 'onStalled'
272
- | 'onStalledCapture'
273
- | 'onSuspend'
274
- | 'onSuspendCapture'
275
- | 'onTimeUpdate'
276
- | 'onTimeUpdateCapture'
277
- | 'onVolumeChange'
278
- | 'onVolumeChangeCapture'
279
- | 'onWaiting'
280
- | 'onWaitingCapture'
281
- | 'onAuxClick'
282
- | 'onAuxClickCapture'
197
+ | 'onChangeCapture'
283
198
  | 'onClick'
284
199
  | 'onClickCapture'
200
+ | 'onCompositionEnd'
201
+ | 'onCompositionEndCapture'
202
+ | 'onCompositionStart'
203
+ | 'onCompositionStartCapture'
204
+ | 'onCompositionUpdate'
205
+ | 'onCompositionUpdateCapture'
285
206
  | 'onContextMenu'
286
207
  | 'onContextMenuCapture'
208
+ | 'onCopy'
209
+ | 'onCopyCapture'
210
+ | 'onCut'
211
+ | 'onCutCapture'
287
212
  | 'onDoubleClick'
288
213
  | 'onDoubleClickCapture'
289
214
  | 'onDrag'
@@ -302,6 +227,40 @@ export declare const Radio: MemoExoticComponent<ForwardRefExoticComponent<
302
227
  | 'onDragStartCapture'
303
228
  | 'onDrop'
304
229
  | 'onDropCapture'
230
+ | 'onDurationChange'
231
+ | 'onDurationChangeCapture'
232
+ | 'onEmptied'
233
+ | 'onEmptiedCapture'
234
+ | 'onEncrypted'
235
+ | 'onEncryptedCapture'
236
+ | 'onEnded'
237
+ | 'onEndedCapture'
238
+ | 'onError'
239
+ | 'onErrorCapture'
240
+ | 'onFocus'
241
+ | 'onFocusCapture'
242
+ | 'onGotPointerCapture'
243
+ | 'onGotPointerCaptureCapture'
244
+ | 'onInput'
245
+ | 'onInputCapture'
246
+ | 'onInvalid'
247
+ | 'onInvalidCapture'
248
+ | 'onKeyDown'
249
+ | 'onKeyDownCapture'
250
+ | 'onKeyPress'
251
+ | 'onKeyPressCapture'
252
+ | 'onKeyUp'
253
+ | 'onKeyUpCapture'
254
+ | 'onLoad'
255
+ | 'onLoadCapture'
256
+ | 'onLoadStart'
257
+ | 'onLoadStartCapture'
258
+ | 'onLoadedData'
259
+ | 'onLoadedDataCapture'
260
+ | 'onLoadedMetadata'
261
+ | 'onLoadedMetadataCapture'
262
+ | 'onLostPointerCapture'
263
+ | 'onLostPointerCaptureCapture'
305
264
  | 'onMouseDown'
306
265
  | 'onMouseDownCapture'
307
266
  | 'onMouseEnter'
@@ -314,48 +273,93 @@ export declare const Radio: MemoExoticComponent<ForwardRefExoticComponent<
314
273
  | 'onMouseOverCapture'
315
274
  | 'onMouseUp'
316
275
  | 'onMouseUpCapture'
317
- | 'onSelect'
318
- | 'onSelectCapture'
319
- | 'onTouchCancel'
320
- | 'onTouchCancelCapture'
321
- | 'onTouchEnd'
322
- | 'onTouchEndCapture'
323
- | 'onTouchMove'
324
- | 'onTouchMoveCapture'
325
- | 'onTouchStart'
326
- | 'onTouchStartCapture'
327
- | 'onPointerDown'
328
- | 'onPointerDownCapture'
329
- | 'onPointerMove'
330
- | 'onPointerMoveCapture'
331
- | 'onPointerUp'
332
- | 'onPointerUpCapture'
276
+ | 'onPaste'
277
+ | 'onPasteCapture'
278
+ | 'onPause'
279
+ | 'onPauseCapture'
280
+ | 'onPlay'
281
+ | 'onPlayCapture'
282
+ | 'onPlaying'
283
+ | 'onPlayingCapture'
333
284
  | 'onPointerCancel'
334
285
  | 'onPointerCancelCapture'
286
+ | 'onPointerDown'
287
+ | 'onPointerDownCapture'
335
288
  | 'onPointerEnter'
336
289
  | 'onPointerEnterCapture'
337
290
  | 'onPointerLeave'
338
291
  | 'onPointerLeaveCapture'
339
- | 'onPointerOver'
340
- | 'onPointerOverCapture'
292
+ | 'onPointerMove'
293
+ | 'onPointerMoveCapture'
341
294
  | 'onPointerOut'
342
295
  | 'onPointerOutCapture'
343
- | 'onGotPointerCapture'
344
- | 'onGotPointerCaptureCapture'
345
- | 'onLostPointerCapture'
346
- | 'onLostPointerCaptureCapture'
296
+ | 'onPointerOver'
297
+ | 'onPointerOverCapture'
298
+ | 'onPointerUp'
299
+ | 'onPointerUpCapture'
300
+ | 'onProgress'
301
+ | 'onProgressCapture'
302
+ | 'onRateChange'
303
+ | 'onRateChangeCapture'
304
+ | 'onReset'
305
+ | 'onResetCapture'
347
306
  | 'onScroll'
348
307
  | 'onScrollCapture'
349
- | 'onWheel'
350
- | 'onWheelCapture'
351
- | 'onAnimationStart'
352
- | 'onAnimationStartCapture'
353
- | 'onAnimationEnd'
354
- | 'onAnimationEndCapture'
355
- | 'onAnimationIteration'
356
- | 'onAnimationIterationCapture'
308
+ | 'onSeeked'
309
+ | 'onSeekedCapture'
310
+ | 'onSeeking'
311
+ | 'onSeekingCapture'
312
+ | 'onSelect'
313
+ | 'onSelectCapture'
314
+ | 'onStalled'
315
+ | 'onStalledCapture'
316
+ | 'onSubmit'
317
+ | 'onSubmitCapture'
318
+ | 'onSuspend'
319
+ | 'onSuspendCapture'
320
+ | 'onTimeUpdate'
321
+ | 'onTimeUpdateCapture'
322
+ | 'onTouchCancel'
323
+ | 'onTouchCancelCapture'
324
+ | 'onTouchEnd'
325
+ | 'onTouchEndCapture'
326
+ | 'onTouchMove'
327
+ | 'onTouchMoveCapture'
328
+ | 'onTouchStart'
329
+ | 'onTouchStartCapture'
357
330
  | 'onTransitionEnd'
358
331
  | 'onTransitionEndCapture'
332
+ | 'onVolumeChange'
333
+ | 'onVolumeChangeCapture'
334
+ | 'onWaiting'
335
+ | 'onWaitingCapture'
336
+ | 'onWheel'
337
+ | 'onWheelCapture'
338
+ | 'pattern'
339
+ | 'placeholder'
340
+ | 'prefix'
341
+ | 'property'
342
+ | 'radioGroup'
343
+ | 'readOnly'
344
+ | 'resource'
345
+ | 'results'
346
+ | 'role'
347
+ | 'security'
348
+ | 'size'
349
+ | 'slot'
350
+ | 'spellCheck'
351
+ | 'src'
352
+ | 'step'
353
+ | 'style'
354
+ | 'suppressContentEditableWarning'
355
+ | 'suppressHydrationWarning'
356
+ | 'tabIndex'
357
+ | 'title'
358
+ | 'type'
359
+ | 'typeof'
360
+ | 'unselectable'
361
+ | 'vocab'
362
+ | 'width'
359
363
  | keyof {
360
364
  ariaLabel?: string | undefined;
361
365
  isDisabled?: boolean | undefined;
@@ -373,64 +377,35 @@ export declare const Radio: MemoExoticComponent<ForwardRefExoticComponent<
373
377
  testId?: string | undefined;
374
378
  analyticsContext?: Record<string, any> | undefined;
375
379
  }
376
- | 'createAnalyticsEvent'
377
380
  > &
378
381
  RefAttributes<HTMLInputElement>
379
382
  >>;
380
383
 
381
- export declare function RadioGroup(props: RadioGroupProps): JSX.Element;
384
+ // @public (undocumented)
385
+ export function RadioGroup(props: RadioGroupProps): JSX.Element;
382
386
 
383
- declare interface RadioGroupProps {
384
- /**
385
- * Once set, controls the selected value on the `RadioGroup`
386
- */
387
- value?: RadioValue | null;
388
- /**
389
- * Sets the initial selected value on the `RadioGroup`
390
- */
387
+ // @public (undocumented)
388
+ interface RadioGroupProps {
389
+ 'aria-labelledby'?: string;
390
+ analyticsContext?: Record<string, any>;
391
391
  defaultValue?: RadioValue | null;
392
- /**
393
- * Sets the disabled state of all `Radio` elements in the group. Overrides the `isDisabled` setting of all child `Radio` items.
394
- */
395
392
  isDisabled?: boolean;
396
- /**
397
- * Sets the required state of all `Radio` elements in the group
398
- */
399
- isRequired?: boolean;
400
- /**
401
- * Sets the invalid state of all `Radio` elements in the group
402
- */
403
393
  isInvalid?: boolean;
404
- /**
405
- * An array of objects, each object is mapped onto a `Radio` element within the group. Name must be unique to the group.
406
- */
407
- options: OptionsPropType;
408
- /**
409
- * Function that gets fired after each invalid event
410
- */
411
- onInvalid?: (event: SyntheticEvent<any>) => void;
412
- /**
413
- * Function that gets after each change event
414
- */
394
+ isRequired?: boolean;
395
+ name?: string;
415
396
  onChange?: (
416
397
  e: React_2.ChangeEvent<HTMLInputElement>,
417
398
  analyticsEvent: UIAnalyticsEvent,
418
399
  ) => void;
419
- /**
420
- * Sets the `name` prop on each of the `Radio` elements in the group
421
- */
422
- name?: string;
423
- /**
424
- * Additional information to be included in the `context` of analytics events that come from radio
425
- */
426
- analyticsContext?: Record<string, any>;
427
- /**
428
- * The id of the element that links to this radiogroup.
429
- */
430
- 'aria-labelledby'?: string;
400
+ onInvalid?: (event: SyntheticEvent<any>) => void;
401
+ options: OptionsPropType;
402
+ value?: RadioValue | null;
431
403
  }
432
404
 
433
- declare type RadioValue = string;
405
+ // @public (undocumented)
406
+ type RadioValue = string;
434
407
 
435
- export {};
408
+ // (No @packageDocumentation comment for this package)
436
409
  ```
410
+
411
+ <!--SECTION END: Main Entry Types-->
@@ -1,2 +0,0 @@
1
- export { default as RadioGroup } from './radio-group';
2
- export { default as Radio } from './radio';
@@ -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 {};