@atlaskit/select 15.7.4 → 15.7.5
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 +7 -0
- package/dist/cjs/Select.js +1 -1
- package/dist/cjs/createSelect.js +4 -2
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/Select.js +1 -1
- package/dist/es2019/createSelect.js +4 -2
- package/dist/es2019/version.json +1 -1
- package/dist/esm/Select.js +1 -1
- package/dist/esm/createSelect.js +4 -2
- package/dist/esm/version.json +1 -1
- package/dist/types/AsyncCreatableSelect.d.ts +0 -1
- package/dist/types/AsyncSelect.d.ts +0 -1
- package/dist/types/CreatableSelect.d.ts +0 -1
- package/dist/types/Select.d.ts +0 -2
- package/dist/types/createSelect.d.ts +0 -1
- package/dist/types-ts4.0/AsyncCreatableSelect.d.ts +0 -1
- package/dist/types-ts4.0/AsyncSelect.d.ts +0 -1
- package/dist/types-ts4.0/CreatableSelect.d.ts +0 -1
- package/dist/types-ts4.0/Select.d.ts +0 -2
- package/dist/types-ts4.0/createSelect.d.ts +0 -1
- package/package.json +5 -5
- package/report.api.md +187 -145
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @atlaskit/select
|
|
2
2
|
|
|
3
|
+
## 15.7.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`a0bf7e532ff`](https://bitbucket.org/atlassian/atlassian-frontend/commits/a0bf7e532ff) - Fix validationState taking precedent over isInvalid
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
|
|
3
10
|
## 15.7.4
|
|
4
11
|
|
|
5
12
|
### Patch Changes
|
package/dist/cjs/Select.js
CHANGED
|
@@ -14,7 +14,7 @@ var _analyticsNext = require("@atlaskit/analytics-next");
|
|
|
14
14
|
var _createSelect = _interopRequireDefault(require("./createSelect"));
|
|
15
15
|
|
|
16
16
|
var packageName = "@atlaskit/select";
|
|
17
|
-
var packageVersion = "15.7.
|
|
17
|
+
var packageVersion = "15.7.5";
|
|
18
18
|
var SelectWithoutAnalytics = (0, _createSelect.default)(_reactSelect.default);
|
|
19
19
|
exports.SelectWithoutAnalytics = SelectWithoutAnalytics;
|
|
20
20
|
var createAndFireEventOnAtlaskit = (0, _analyticsNext.createAndFireEvent)('atlaskit');
|
package/dist/cjs/createSelect.js
CHANGED
|
@@ -130,14 +130,16 @@ function createSelect(WrappedComponent) {
|
|
|
130
130
|
"aria-live": "assertive"
|
|
131
131
|
}, props, {
|
|
132
132
|
components: this.components,
|
|
133
|
-
styles: (0, _reactSelect.mergeStyles)((0, _styles.default)(
|
|
133
|
+
styles: (0, _reactSelect.mergeStyles)((0, _styles.default)( // This will cover both props for invalid state while giving priority to isInvalid. When cleaning up validationState, we can just keep the inner condition.
|
|
134
|
+
typeof isInvalid !== 'undefined' ? isInvalid ? 'error' : 'default' : validationState, isCompact, this.props.appearance || 'default'), styles)
|
|
134
135
|
}));
|
|
135
136
|
}
|
|
136
137
|
}]);
|
|
137
138
|
return AtlaskitSelect;
|
|
138
139
|
}(_react.Component), (0, _defineProperty2.default)(_class, "defaultProps", {
|
|
139
140
|
validationState: 'default',
|
|
140
|
-
|
|
141
|
+
// TODO: uncomment the next line when cleaning up validationState prop so it has a default value
|
|
142
|
+
// isInvalid: false,
|
|
141
143
|
spacing: 'default',
|
|
142
144
|
onClickPreventDefault: true,
|
|
143
145
|
tabSelectsValue: false,
|
package/dist/cjs/version.json
CHANGED
package/dist/es2019/Select.js
CHANGED
|
@@ -2,7 +2,7 @@ import Select from 'react-select';
|
|
|
2
2
|
import { withAnalyticsEvents, withAnalyticsContext, createAndFireEvent } from '@atlaskit/analytics-next';
|
|
3
3
|
import createSelect from './createSelect';
|
|
4
4
|
const packageName = "@atlaskit/select";
|
|
5
|
-
const packageVersion = "15.7.
|
|
5
|
+
const packageVersion = "15.7.5";
|
|
6
6
|
export const SelectWithoutAnalytics = createSelect(Select);
|
|
7
7
|
const createAndFireEventOnAtlaskit = createAndFireEvent('atlaskit');
|
|
8
8
|
export default withAnalyticsContext({
|
|
@@ -76,13 +76,15 @@ export default function createSelect(WrappedComponent) {
|
|
|
76
76
|
"aria-live": "assertive"
|
|
77
77
|
}, props, {
|
|
78
78
|
components: this.components,
|
|
79
|
-
styles: mergeStyles(baseStyles(
|
|
79
|
+
styles: mergeStyles(baseStyles( // This will cover both props for invalid state while giving priority to isInvalid. When cleaning up validationState, we can just keep the inner condition.
|
|
80
|
+
typeof isInvalid !== 'undefined' ? isInvalid ? 'error' : 'default' : validationState, isCompact, this.props.appearance || 'default'), styles)
|
|
80
81
|
}));
|
|
81
82
|
}
|
|
82
83
|
|
|
83
84
|
}, _defineProperty(_class, "defaultProps", {
|
|
84
85
|
validationState: 'default',
|
|
85
|
-
|
|
86
|
+
// TODO: uncomment the next line when cleaning up validationState prop so it has a default value
|
|
87
|
+
// isInvalid: false,
|
|
86
88
|
spacing: 'default',
|
|
87
89
|
onClickPreventDefault: true,
|
|
88
90
|
tabSelectsValue: false,
|
package/dist/es2019/version.json
CHANGED
package/dist/esm/Select.js
CHANGED
|
@@ -2,7 +2,7 @@ import Select from 'react-select';
|
|
|
2
2
|
import { withAnalyticsEvents, withAnalyticsContext, createAndFireEvent } from '@atlaskit/analytics-next';
|
|
3
3
|
import createSelect from './createSelect';
|
|
4
4
|
var packageName = "@atlaskit/select";
|
|
5
|
-
var packageVersion = "15.7.
|
|
5
|
+
var packageVersion = "15.7.5";
|
|
6
6
|
export var SelectWithoutAnalytics = createSelect(Select);
|
|
7
7
|
var createAndFireEventOnAtlaskit = createAndFireEvent('atlaskit');
|
|
8
8
|
export default withAnalyticsContext({
|
package/dist/esm/createSelect.js
CHANGED
|
@@ -106,7 +106,8 @@ export default function createSelect(WrappedComponent) {
|
|
|
106
106
|
"aria-live": "assertive"
|
|
107
107
|
}, props, {
|
|
108
108
|
components: this.components,
|
|
109
|
-
styles: mergeStyles(baseStyles(
|
|
109
|
+
styles: mergeStyles(baseStyles( // This will cover both props for invalid state while giving priority to isInvalid. When cleaning up validationState, we can just keep the inner condition.
|
|
110
|
+
typeof isInvalid !== 'undefined' ? isInvalid ? 'error' : 'default' : validationState, isCompact, this.props.appearance || 'default'), styles)
|
|
110
111
|
}));
|
|
111
112
|
}
|
|
112
113
|
}]);
|
|
@@ -114,7 +115,8 @@ export default function createSelect(WrappedComponent) {
|
|
|
114
115
|
return AtlaskitSelect;
|
|
115
116
|
}(Component), _defineProperty(_class, "defaultProps", {
|
|
116
117
|
validationState: 'default',
|
|
117
|
-
|
|
118
|
+
// TODO: uncomment the next line when cleaning up validationState prop so it has a default value
|
|
119
|
+
// isInvalid: false,
|
|
118
120
|
spacing: 'default',
|
|
119
121
|
onClickPreventDefault: true,
|
|
120
122
|
tabSelectsValue: false,
|
package/dist/esm/version.json
CHANGED
package/dist/types/Select.d.ts
CHANGED
|
@@ -34,7 +34,6 @@ export declare const SelectWithoutAnalytics: {
|
|
|
34
34
|
};
|
|
35
35
|
defaultProps: {
|
|
36
36
|
validationState: string;
|
|
37
|
-
isInvalid: boolean;
|
|
38
37
|
spacing: string;
|
|
39
38
|
onClickPreventDefault: boolean;
|
|
40
39
|
tabSelectsValue: boolean;
|
|
@@ -77,7 +76,6 @@ declare const _default: {
|
|
|
77
76
|
};
|
|
78
77
|
defaultProps: {
|
|
79
78
|
validationState: string;
|
|
80
|
-
isInvalid: boolean;
|
|
81
79
|
spacing: string;
|
|
82
80
|
onClickPreventDefault: boolean;
|
|
83
81
|
tabSelectsValue: boolean;
|
|
@@ -34,7 +34,6 @@ export declare const SelectWithoutAnalytics: {
|
|
|
34
34
|
};
|
|
35
35
|
defaultProps: {
|
|
36
36
|
validationState: string;
|
|
37
|
-
isInvalid: boolean;
|
|
38
37
|
spacing: string;
|
|
39
38
|
onClickPreventDefault: boolean;
|
|
40
39
|
tabSelectsValue: boolean;
|
|
@@ -77,7 +76,6 @@ declare const _default: {
|
|
|
77
76
|
};
|
|
78
77
|
defaultProps: {
|
|
79
78
|
validationState: string;
|
|
80
|
-
isInvalid: boolean;
|
|
81
79
|
spacing: string;
|
|
82
80
|
onClickPreventDefault: boolean;
|
|
83
81
|
tabSelectsValue: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/select",
|
|
3
|
-
"version": "15.7.
|
|
3
|
+
"version": "15.7.5",
|
|
4
4
|
"description": "Select allows users to make a single selection or multiple selections from a list of options.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@atlaskit/analytics-next": "^8.2.0",
|
|
37
37
|
"@atlaskit/icon": "^21.11.0",
|
|
38
|
-
"@atlaskit/spinner": "^15.
|
|
38
|
+
"@atlaskit/spinner": "^15.2.0",
|
|
39
39
|
"@atlaskit/theme": "^12.2.0",
|
|
40
40
|
"@atlaskit/tokens": "^0.10.0",
|
|
41
41
|
"@atlaskit/visually-hidden": "^1.1.0",
|
|
@@ -58,11 +58,11 @@
|
|
|
58
58
|
"react-dom": "^16.8.0"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
|
-
"@atlaskit/button": "^16.
|
|
61
|
+
"@atlaskit/button": "^16.4.0",
|
|
62
62
|
"@atlaskit/checkbox": "^12.4.0",
|
|
63
63
|
"@atlaskit/docs": "*",
|
|
64
|
-
"@atlaskit/drawer": "^7.
|
|
65
|
-
"@atlaskit/form": "^8.
|
|
64
|
+
"@atlaskit/drawer": "^7.4.0",
|
|
65
|
+
"@atlaskit/form": "^8.7.0",
|
|
66
66
|
"@atlaskit/logo": "^13.10.0",
|
|
67
67
|
"@atlaskit/modal-dialog": "^12.4.0",
|
|
68
68
|
"@atlaskit/radio": "^5.4.0",
|
package/report.api.md
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
## API Report File for "@atlaskit/select"
|
|
1
|
+
## API Report File for "@atlaskit/select"
|
|
2
2
|
|
|
3
|
-
> Do not edit this file.
|
|
3
|
+
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
+
|
|
5
|
+
<!--
|
|
6
|
+
Generated API Report version: 2.0
|
|
7
|
+
-->
|
|
4
8
|
|
|
5
9
|
[Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
|
|
6
10
|
|
|
@@ -46,9 +50,11 @@ import { ValueContainerProps as ValueContainerProps_2 } from 'react-select';
|
|
|
46
50
|
import { ValueType as ValueType_2 } from 'react-select';
|
|
47
51
|
import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
48
52
|
|
|
49
|
-
|
|
53
|
+
// @public (undocumented)
|
|
54
|
+
export type ActionMeta<Option = OptionType> = ActionMeta_2<Option>;
|
|
50
55
|
|
|
51
|
-
|
|
56
|
+
// @public (undocumented)
|
|
57
|
+
export const AsyncCreatableSelect: {
|
|
52
58
|
new <Option = OptionType, IsMulti extends boolean = false>(
|
|
53
59
|
props: SelectProps<Option, IsMulti>,
|
|
54
60
|
): {
|
|
@@ -143,7 +149,8 @@ export declare const AsyncCreatableSelect: {
|
|
|
143
149
|
contextType?: Context<any> | undefined;
|
|
144
150
|
};
|
|
145
151
|
|
|
146
|
-
|
|
152
|
+
// @public (undocumented)
|
|
153
|
+
export const AsyncSelect: {
|
|
147
154
|
new <Option = OptionType, IsMulti extends boolean = false>(
|
|
148
155
|
props: SelectProps<Option, IsMulti>,
|
|
149
156
|
): {
|
|
@@ -238,35 +245,45 @@ export declare const AsyncSelect: {
|
|
|
238
245
|
contextType?: Context<any> | undefined;
|
|
239
246
|
};
|
|
240
247
|
|
|
241
|
-
|
|
248
|
+
// @public (undocumented)
|
|
249
|
+
export const CheckboxOption: FC<OptionProps<OptionType, true>>;
|
|
242
250
|
|
|
243
|
-
|
|
251
|
+
// @public (undocumented)
|
|
252
|
+
export const CheckboxSelect: ({
|
|
244
253
|
components,
|
|
245
254
|
...props
|
|
246
255
|
}: SelectProps<OptionType, true>) => JSX.Element;
|
|
247
256
|
|
|
248
257
|
export { components };
|
|
249
258
|
|
|
250
|
-
|
|
259
|
+
// @public (undocumented)
|
|
260
|
+
export type ControlProps<
|
|
251
261
|
OptionType,
|
|
252
262
|
IsMulti extends boolean = false
|
|
253
263
|
> = ControlProps_2<OptionType, IsMulti>;
|
|
254
264
|
|
|
255
|
-
|
|
265
|
+
// @public (undocumented)
|
|
266
|
+
type Country = typeof groupedCountries[number]['options'][number];
|
|
256
267
|
|
|
257
|
-
|
|
268
|
+
// @public (undocumented)
|
|
269
|
+
interface Country_2 {
|
|
270
|
+
// (undocumented)
|
|
258
271
|
abbr: string;
|
|
272
|
+
// (undocumented)
|
|
259
273
|
code: string;
|
|
274
|
+
// (undocumented)
|
|
260
275
|
icon: string;
|
|
276
|
+
// (undocumented)
|
|
261
277
|
name: string;
|
|
278
|
+
// (undocumented)
|
|
262
279
|
suggested?: boolean;
|
|
263
280
|
}
|
|
264
281
|
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
) => jsx.JSX.Element;
|
|
282
|
+
// @public (undocumented)
|
|
283
|
+
export const CountrySelect: (props: SelectProps<Country>) => jsx.JSX.Element;
|
|
268
284
|
|
|
269
|
-
|
|
285
|
+
// @public (undocumented)
|
|
286
|
+
export const CreatableSelect: {
|
|
270
287
|
new <Option = OptionType, IsMulti extends boolean = false>(
|
|
271
288
|
props: SelectProps<Option, IsMulti>,
|
|
272
289
|
): {
|
|
@@ -363,7 +380,8 @@ export declare const CreatableSelect: {
|
|
|
363
380
|
|
|
364
381
|
export { createFilter };
|
|
365
382
|
|
|
366
|
-
|
|
383
|
+
// @public (undocumented)
|
|
384
|
+
const _default: {
|
|
367
385
|
new <Option = OptionType, IsMulti extends boolean = false>(
|
|
368
386
|
props: SelectProps<Option, IsMulti>,
|
|
369
387
|
): {
|
|
@@ -459,14 +477,17 @@ declare const _default: {
|
|
|
459
477
|
};
|
|
460
478
|
export default _default;
|
|
461
479
|
|
|
462
|
-
|
|
480
|
+
// @public (undocumented)
|
|
481
|
+
type defaultModifiers = 'offset' | 'preventOverflow';
|
|
463
482
|
|
|
464
|
-
|
|
483
|
+
// @public (undocumented)
|
|
484
|
+
export type FormatOptionLabelMeta<
|
|
465
485
|
OptionType,
|
|
466
486
|
IsMulti extends boolean = false
|
|
467
487
|
> = FormatOptionLabelMeta_2<OptionType, IsMulti>;
|
|
468
488
|
|
|
469
|
-
|
|
489
|
+
// @public (undocumented)
|
|
490
|
+
const groupedCountries: readonly [
|
|
470
491
|
{
|
|
471
492
|
readonly label: 'Suggested';
|
|
472
493
|
readonly options: Country_2[];
|
|
@@ -481,17 +502,20 @@ export { GroupedOptionsType };
|
|
|
481
502
|
|
|
482
503
|
export { GroupType };
|
|
483
504
|
|
|
484
|
-
|
|
505
|
+
// @public (undocumented)
|
|
506
|
+
export type IndicatorComponentType<
|
|
485
507
|
OptionType,
|
|
486
508
|
IsMulti extends boolean = false
|
|
487
509
|
> = IndicatorComponentType_2<OptionType, IsMulti>;
|
|
488
510
|
|
|
489
|
-
|
|
511
|
+
// @public (undocumented)
|
|
512
|
+
export type IndicatorProps<
|
|
490
513
|
OptionType,
|
|
491
514
|
IsMulti extends boolean = false
|
|
492
515
|
> = IndicatorProps_2<OptionType, IsMulti>;
|
|
493
516
|
|
|
494
|
-
|
|
517
|
+
// @public (undocumented)
|
|
518
|
+
export type InputActionMeta = InputActionMeta_2;
|
|
495
519
|
|
|
496
520
|
export { InputProps };
|
|
497
521
|
|
|
@@ -499,19 +523,22 @@ export { makeAsyncSelect };
|
|
|
499
523
|
|
|
500
524
|
export { makeCreatableSelect };
|
|
501
525
|
|
|
502
|
-
|
|
526
|
+
// @public (undocumented)
|
|
527
|
+
export type MenuListComponentProps<
|
|
503
528
|
OptionType,
|
|
504
529
|
IsMulti extends boolean = false
|
|
505
530
|
> = MenuListComponentProps_2<OptionType, IsMulti>;
|
|
506
531
|
|
|
507
|
-
|
|
532
|
+
// @public (undocumented)
|
|
533
|
+
export type MenuProps<
|
|
508
534
|
OptionType,
|
|
509
535
|
IsMulti extends boolean = false
|
|
510
536
|
> = MenuProps_2<OptionType, IsMulti>;
|
|
511
537
|
|
|
512
538
|
export { mergeStyles };
|
|
513
539
|
|
|
514
|
-
|
|
540
|
+
// @public (undocumented)
|
|
541
|
+
type ModifierList =
|
|
515
542
|
| 'offset'
|
|
516
543
|
| 'computeStyles'
|
|
517
544
|
| 'preventOverflow'
|
|
@@ -522,11 +549,14 @@ declare type ModifierList =
|
|
|
522
549
|
| 'hide'
|
|
523
550
|
| string;
|
|
524
551
|
|
|
525
|
-
|
|
552
|
+
// @public (undocumented)
|
|
553
|
+
export interface OptionProps<
|
|
526
554
|
Option = OptionType,
|
|
527
555
|
IsMulti extends boolean = false
|
|
528
556
|
> extends OptionProps_2<Option, IsMulti> {
|
|
557
|
+
// (undocumented)
|
|
529
558
|
[key: string]: any;
|
|
559
|
+
// (undocumented)
|
|
530
560
|
Icon?: React.ComponentType<{
|
|
531
561
|
label: string;
|
|
532
562
|
size?: 'small' | 'medium' | 'large' | 'xlarge';
|
|
@@ -534,50 +564,54 @@ export declare interface OptionProps<
|
|
|
534
564
|
primaryColor?: string;
|
|
535
565
|
secondaryColor?: string;
|
|
536
566
|
}>;
|
|
567
|
+
// (undocumented)
|
|
537
568
|
isDisabled: boolean;
|
|
569
|
+
// (undocumented)
|
|
538
570
|
isFocused: boolean;
|
|
571
|
+
// (undocumented)
|
|
539
572
|
isSelected: boolean;
|
|
540
573
|
}
|
|
541
574
|
|
|
542
|
-
|
|
575
|
+
// @public (undocumented)
|
|
576
|
+
export type OptionsType<Option = OptionType> = OptionsType_2<Option>;
|
|
543
577
|
|
|
544
|
-
|
|
578
|
+
// @public (undocumented)
|
|
579
|
+
export interface OptionType {
|
|
580
|
+
// (undocumented)
|
|
545
581
|
[key: string]: any;
|
|
582
|
+
// (undocumented)
|
|
546
583
|
label: string;
|
|
584
|
+
// (undocumented)
|
|
547
585
|
value: string | number;
|
|
548
586
|
}
|
|
549
587
|
|
|
550
|
-
|
|
588
|
+
// @public (undocumented)
|
|
589
|
+
type PopperPropsNoChildren<Modifiers> = Omit<
|
|
551
590
|
PopperProps<Modifiers>,
|
|
552
591
|
'children'
|
|
553
592
|
>;
|
|
554
593
|
|
|
555
|
-
|
|
594
|
+
// @public (undocumented)
|
|
595
|
+
export class PopupSelect<
|
|
556
596
|
Option = OptionType,
|
|
557
597
|
IsMulti extends boolean = false
|
|
558
598
|
> extends PureComponent<PopupSelectProps<Option, IsMulti>, State> {
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
599
|
+
close: (
|
|
600
|
+
options?:
|
|
601
|
+
| {
|
|
602
|
+
controlOverride?: boolean | undefined;
|
|
603
|
+
}
|
|
604
|
+
| undefined,
|
|
605
|
+
) => void;
|
|
606
|
+
// (undocumented)
|
|
607
|
+
componentDidMount(): void;
|
|
608
|
+
// (undocumented)
|
|
609
|
+
componentDidUpdate(prevProps: PopupSelectProps<Option, IsMulti>): void;
|
|
610
|
+
// (undocumented)
|
|
611
|
+
componentWillUnmount(): void;
|
|
612
|
+
// (undocumented)
|
|
566
613
|
defaultOpenState: boolean | undefined;
|
|
567
|
-
|
|
568
|
-
isOpen: boolean;
|
|
569
|
-
mergedComponents: {
|
|
570
|
-
Control: React_2.FC<ControlProps<OptionType, boolean>>;
|
|
571
|
-
DropdownIndicator: () => jsx;
|
|
572
|
-
Menu: ({
|
|
573
|
-
children,
|
|
574
|
-
innerProps,
|
|
575
|
-
...props
|
|
576
|
-
}: MenuProps<OptionType, boolean>) => jsx;
|
|
577
|
-
};
|
|
578
|
-
mergedPopperProps: PopperPropsNoChildren<string>;
|
|
579
|
-
};
|
|
580
|
-
popperWrapperId: string;
|
|
614
|
+
// (undocumented)
|
|
581
615
|
static defaultProps: {
|
|
582
616
|
closeMenuOnSelect: boolean;
|
|
583
617
|
components: {};
|
|
@@ -590,24 +624,32 @@ export declare class PopupSelect<
|
|
|
590
624
|
styles: {};
|
|
591
625
|
options: never[];
|
|
592
626
|
};
|
|
627
|
+
// (undocumented)
|
|
628
|
+
defaultStyles: StylesConfig<Option, IsMulti>;
|
|
629
|
+
// (undocumented)
|
|
593
630
|
static getDerivedStateFromProps(
|
|
594
631
|
props: PopupSelectProps<OptionType>,
|
|
595
632
|
state: State,
|
|
596
633
|
): Partial<State<string>> | null;
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
634
|
+
// (undocumented)
|
|
635
|
+
getItemCount: () => number;
|
|
636
|
+
// (undocumented)
|
|
637
|
+
getMaxHeight: () => number | undefined;
|
|
638
|
+
// (undocumented)
|
|
639
|
+
getSelectRef: (ref: Select<Option, IsMulti>) => void;
|
|
640
|
+
// (undocumented)
|
|
601
641
|
handleClick: ({ target }: MouseEvent) => void;
|
|
642
|
+
// (undocumented)
|
|
643
|
+
handleKeyDown: (event: KeyboardEvent) => void;
|
|
644
|
+
// (undocumented)
|
|
602
645
|
handleSelectChange: (
|
|
603
646
|
value: ValueType<Option, IsMulti>,
|
|
604
647
|
actionMeta: ActionMeta<Option>,
|
|
605
648
|
) => void;
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
*/
|
|
649
|
+
// (undocumented)
|
|
650
|
+
isOpenControlled: boolean;
|
|
651
|
+
// (undocumented)
|
|
652
|
+
menuRef: HTMLElement | null;
|
|
611
653
|
open: (
|
|
612
654
|
options?:
|
|
613
655
|
| {
|
|
@@ -615,127 +657,119 @@ export declare class PopupSelect<
|
|
|
615
657
|
}
|
|
616
658
|
| undefined,
|
|
617
659
|
) => void;
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
controlOverride?: boolean | undefined;
|
|
627
|
-
}
|
|
628
|
-
| undefined,
|
|
629
|
-
) => void;
|
|
630
|
-
resolveTargetRef: (
|
|
660
|
+
// (undocumented)
|
|
661
|
+
popperWrapperId: string;
|
|
662
|
+
// (undocumented)
|
|
663
|
+
render(): JSX.Element;
|
|
664
|
+
// (undocumented)
|
|
665
|
+
renderSelect: () => JSX.Element | null;
|
|
666
|
+
// (undocumented)
|
|
667
|
+
resolveMenuRef: (
|
|
631
668
|
popperRef: React_2.Ref<HTMLElement>,
|
|
632
669
|
) => (ref: HTMLElement) => void;
|
|
633
|
-
|
|
670
|
+
// (undocumented)
|
|
671
|
+
resolveTargetRef: (
|
|
634
672
|
popperRef: React_2.Ref<HTMLElement>,
|
|
635
673
|
) => (ref: HTMLElement) => void;
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
674
|
+
// (undocumented)
|
|
675
|
+
selectRef: Select<Option, IsMulti> | null;
|
|
676
|
+
// (undocumented)
|
|
639
677
|
showSearchControl: () => boolean | undefined;
|
|
640
|
-
|
|
641
|
-
|
|
678
|
+
// (undocumented)
|
|
679
|
+
state: {
|
|
680
|
+
isOpen: boolean;
|
|
681
|
+
mergedComponents: {
|
|
682
|
+
Control: React_2.FC<ControlProps<OptionType, boolean>>;
|
|
683
|
+
DropdownIndicator: () => jsx;
|
|
684
|
+
Menu: ({
|
|
685
|
+
children,
|
|
686
|
+
innerProps,
|
|
687
|
+
...props
|
|
688
|
+
}: MenuProps<OptionType, boolean>) => jsx;
|
|
689
|
+
};
|
|
690
|
+
mergedPopperProps: PopperPropsNoChildren<string>;
|
|
691
|
+
};
|
|
692
|
+
// (undocumented)
|
|
693
|
+
targetRef: HTMLElement | null;
|
|
694
|
+
// (undocumented)
|
|
695
|
+
unbindWindowClick: UnbindFn | null;
|
|
696
|
+
// (undocumented)
|
|
697
|
+
unbindWindowKeydown: UnbindFn | null;
|
|
642
698
|
}
|
|
643
699
|
|
|
644
|
-
|
|
700
|
+
// @public (undocumented)
|
|
701
|
+
export interface PopupSelectProps<
|
|
645
702
|
Option = OptionType,
|
|
646
703
|
IsMulti extends boolean = false,
|
|
647
704
|
Modifiers = ModifierList
|
|
648
705
|
> extends Props<Option, IsMulti> {
|
|
649
|
-
/**
|
|
650
|
-
* Defines whether the menu should close when selected. Defaults to "true"
|
|
651
|
-
*/
|
|
652
706
|
closeMenuOnSelect?: boolean;
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
*/
|
|
707
|
+
// (undocumented)
|
|
708
|
+
defaultIsOpen?: boolean;
|
|
656
709
|
footer?: ReactNode;
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
For more information, see the [React Popper documentation](https://popper.js.org/react-popper/v2/render-props).
|
|
662
|
-
|
|
663
|
-
*/
|
|
664
|
-
popperProps?: PopperPropsNoChildren<Modifiers>;
|
|
665
|
-
/**
|
|
666
|
-
* The maximum number of options the select can contain without rendering the search field. Defaults to 5.
|
|
667
|
-
*/
|
|
668
|
-
searchThreshold?: number;
|
|
669
|
-
/**
|
|
670
|
-
* If false, renders a select with no search field. If true, renders a search field in the select when the
|
|
671
|
-
* number of options exceeds the `searchThreshold`. Defaults to true.
|
|
672
|
-
*/
|
|
710
|
+
// (undocumented)
|
|
711
|
+
isInvalid?: boolean;
|
|
712
|
+
// (undocumented)
|
|
713
|
+
isOpen?: boolean;
|
|
673
714
|
isSearchable?: boolean;
|
|
674
|
-
/**
|
|
675
|
-
* The maximum width for the popup menu. Can be a number, representing width in pixels,
|
|
676
|
-
* or a string containing a CSS length datatype.
|
|
677
|
-
*/
|
|
678
715
|
maxMenuWidth?: number | string;
|
|
679
|
-
/**
|
|
680
|
-
* The maximum width for the popup menu. Can be a number, representing width in pixels,
|
|
681
|
-
* or a string containing a CSS length datatype.
|
|
682
|
-
*/
|
|
683
716
|
minMenuWidth?: number | string;
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
The provided render props in `options` are detailed below:
|
|
690
|
-
- `isOpen`: The current state of the popup.
|
|
691
|
-
Use this to change the appearance of your target based on the state of your component
|
|
692
|
-
- `ref`: Pass this ref to the element the Popup should be attached to
|
|
693
|
-
- `aria-haspopup`, `aria-expanded`, `aria-controls`: Spread these onto a target element to
|
|
694
|
-
ensure your experience is accessible
|
|
695
|
-
*/
|
|
717
|
+
popperProps?: PopperPropsNoChildren<Modifiers>;
|
|
718
|
+
searchThreshold?: number;
|
|
719
|
+
// (undocumented)
|
|
720
|
+
spacing?: string;
|
|
696
721
|
target?: (
|
|
697
722
|
options: PopupSelectTriggerProps & {
|
|
698
723
|
isOpen: boolean;
|
|
699
724
|
},
|
|
700
725
|
) => ReactNode;
|
|
701
|
-
|
|
702
|
-
defaultIsOpen?: boolean;
|
|
703
|
-
spacing?: string;
|
|
726
|
+
// (undocumented)
|
|
704
727
|
validationState?: ValidationState;
|
|
705
|
-
isInvalid?: boolean;
|
|
706
728
|
}
|
|
707
729
|
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
'aria-expanded': boolean;
|
|
730
|
+
// @public (undocumented)
|
|
731
|
+
interface PopupSelectTriggerProps {
|
|
732
|
+
// (undocumented)
|
|
712
733
|
'aria-controls'?: string;
|
|
734
|
+
// (undocumented)
|
|
735
|
+
'aria-expanded': boolean;
|
|
736
|
+
// (undocumented)
|
|
737
|
+
'aria-haspopup': 'true';
|
|
738
|
+
// (undocumented)
|
|
739
|
+
ref: any;
|
|
713
740
|
}
|
|
714
741
|
|
|
715
|
-
|
|
742
|
+
// @public (undocumented)
|
|
743
|
+
export const RadioOption: FC<OptionProps>;
|
|
716
744
|
|
|
717
|
-
|
|
745
|
+
// @public (undocumented)
|
|
746
|
+
export const RadioSelect: ({
|
|
718
747
|
components,
|
|
719
748
|
...props
|
|
720
749
|
}: SelectProps<OptionType>) => JSX.Element;
|
|
721
750
|
|
|
722
|
-
|
|
751
|
+
// @public (undocumented)
|
|
752
|
+
export type SelectComponentsConfig<
|
|
723
753
|
OptionType,
|
|
724
754
|
IsMulti extends boolean = false
|
|
725
755
|
> = SelectComponentsConfig_2<OptionType, IsMulti>;
|
|
726
756
|
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
> extends Props<OptionType, IsMulti>,
|
|
757
|
+
// @public (undocumented)
|
|
758
|
+
export interface SelectProps<OptionType, IsMulti extends boolean = false>
|
|
759
|
+
extends Props<OptionType, IsMulti>,
|
|
731
760
|
WithAnalyticsEventsProps {
|
|
732
|
-
|
|
733
|
-
validationState?: ValidationState;
|
|
761
|
+
// (undocumented)
|
|
734
762
|
appearance?: 'default' | 'subtle' | 'none';
|
|
763
|
+
// (undocumented)
|
|
735
764
|
isInvalid?: boolean;
|
|
765
|
+
// (undocumented)
|
|
766
|
+
spacing?: 'compact' | 'default';
|
|
767
|
+
// (undocumented)
|
|
768
|
+
validationState?: ValidationState;
|
|
736
769
|
}
|
|
737
770
|
|
|
738
|
-
|
|
771
|
+
// @public (undocumented)
|
|
772
|
+
export const SelectWithoutAnalytics: {
|
|
739
773
|
new <Option = OptionType, IsMulti extends boolean = false>(
|
|
740
774
|
props: SelectProps<Option, IsMulti>,
|
|
741
775
|
): {
|
|
@@ -830,28 +864,36 @@ export declare const SelectWithoutAnalytics: {
|
|
|
830
864
|
contextType?: Context<any> | undefined;
|
|
831
865
|
};
|
|
832
866
|
|
|
833
|
-
|
|
867
|
+
// @public (undocumented)
|
|
868
|
+
interface State<Modifiers = string> {
|
|
869
|
+
// (undocumented)
|
|
834
870
|
isOpen: boolean;
|
|
871
|
+
// (undocumented)
|
|
835
872
|
mergedComponents: Object;
|
|
873
|
+
// (undocumented)
|
|
836
874
|
mergedPopperProps: PopperPropsNoChildren<defaultModifiers | Modifiers>;
|
|
837
875
|
}
|
|
838
876
|
|
|
839
|
-
|
|
877
|
+
// @public (undocumented)
|
|
878
|
+
export type StylesConfig<
|
|
840
879
|
Option = OptionType,
|
|
841
880
|
IsMulti extends boolean = false
|
|
842
881
|
> = StylesConfig_2<Option, IsMulti>;
|
|
843
882
|
|
|
844
|
-
|
|
883
|
+
// @public (undocumented)
|
|
884
|
+
type ValidationState = 'default' | 'error' | 'success';
|
|
845
885
|
|
|
846
|
-
|
|
886
|
+
// @public (undocumented)
|
|
887
|
+
export type ValueContainerProps<
|
|
847
888
|
OptionType,
|
|
848
889
|
IsMulti extends boolean = false
|
|
849
890
|
> = ValueContainerProps_2<OptionType, IsMulti>;
|
|
850
891
|
|
|
851
|
-
|
|
892
|
+
// @public (undocumented)
|
|
893
|
+
export type ValueType<
|
|
852
894
|
OptionType,
|
|
853
895
|
IsMulti extends boolean = false
|
|
854
896
|
> = ValueType_2<OptionType, IsMulti>;
|
|
855
897
|
|
|
856
|
-
|
|
898
|
+
// (No @packageDocumentation comment for this package)
|
|
857
899
|
```
|