carbon-react 110.8.0 → 110.9.1
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/esm/components/confirm/confirm.d.ts +1 -1
- package/esm/components/select/filterable-select/filterable-select.component.js +5 -0
- package/esm/components/select/filterable-select/filterable-select.d.ts +2 -0
- package/esm/components/select/multi-select/multi-select.component.js +5 -0
- package/esm/components/select/multi-select/multi-select.d.ts +2 -0
- package/esm/components/select/select-list/select-list-container.style.js +1 -3
- package/esm/components/select/select-list/select-list.component.js +6 -2
- package/esm/components/select/select-list/select-list.style.js +1 -1
- package/esm/components/select/simple-select/simple-select.component.js +5 -0
- package/esm/components/select/simple-select/simple-select.d.ts +2 -0
- package/lib/components/confirm/confirm.d.ts +1 -1
- package/lib/components/select/filterable-select/filterable-select.component.js +5 -0
- package/lib/components/select/filterable-select/filterable-select.d.ts +2 -0
- package/lib/components/select/multi-select/multi-select.component.js +5 -0
- package/lib/components/select/multi-select/multi-select.d.ts +2 -0
- package/lib/components/select/select-list/select-list-container.style.js +1 -3
- package/lib/components/select/select-list/select-list.component.js +6 -2
- package/lib/components/select/select-list/select-list.style.js +1 -1
- package/lib/components/select/simple-select/simple-select.component.js +5 -0
- package/lib/components/select/simple-select/simple-select.d.ts +2 -0
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IconType } from "components/icon/icon-type";
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
import { DialogProps } from "../dialog
|
|
3
|
+
import { DialogProps } from "../dialog";
|
|
4
4
|
|
|
5
5
|
export interface ConfirmProps extends DialogProps {
|
|
6
6
|
/** Color variants for new business themes: "primary" | "secondary" | "tertiary" | "dashed" | "darkBackground" */
|
|
@@ -30,6 +30,7 @@ const FilterableSelect = /*#__PURE__*/React.forwardRef(({
|
|
|
30
30
|
noResultsMessage,
|
|
31
31
|
disablePortal,
|
|
32
32
|
listActionButton,
|
|
33
|
+
listMaxHeight,
|
|
33
34
|
onListAction,
|
|
34
35
|
isLoading,
|
|
35
36
|
disabled,
|
|
@@ -401,6 +402,7 @@ const FilterableSelect = /*#__PURE__*/React.forwardRef(({
|
|
|
401
402
|
noResultsMessage: noResultsMessage,
|
|
402
403
|
disablePortal: disablePortal,
|
|
403
404
|
listActionButton: listActionButton,
|
|
405
|
+
listMaxHeight: listMaxHeight,
|
|
404
406
|
onListAction: handleOnListAction,
|
|
405
407
|
isLoading: isLoading,
|
|
406
408
|
readOnly: readOnly,
|
|
@@ -490,6 +492,9 @@ FilterableSelect.propTypes = { ...formInputPropTypes,
|
|
|
490
492
|
/** Overrides the default tooltip position */
|
|
491
493
|
tooltipPosition: PropTypes.oneOf(["top", "bottom", "left", "right"]),
|
|
492
494
|
|
|
495
|
+
/** Maximum list height - defaults to 180 */
|
|
496
|
+
listMaxHeight: PropTypes.number,
|
|
497
|
+
|
|
493
498
|
/** Placement of the select list in relation to the input element */
|
|
494
499
|
listPlacement: PropTypes.oneOf(["auto", "auto-start", "auto-end", "top", "top-start", "top-end", "bottom", "bottom-start", "bottom-end", "right", "right-start", "right-end", "left", "left-start", "left-end"]),
|
|
495
500
|
|
|
@@ -44,6 +44,8 @@ export interface FilterableSelectProps
|
|
|
44
44
|
value?: string | Record<string, unknown>;
|
|
45
45
|
/** Overrides the default tooltip position */
|
|
46
46
|
tooltipPosition?: "top" | "bottom" | "left" | "right";
|
|
47
|
+
/** Maximum list height - defaults to 180 */
|
|
48
|
+
listMaxHeight?: number;
|
|
47
49
|
/** Placement of the select list in relation to the input element */
|
|
48
50
|
listPlacement?:
|
|
49
51
|
| "auto"
|
|
@@ -42,6 +42,7 @@ const MultiSelect = /*#__PURE__*/React.forwardRef(({
|
|
|
42
42
|
"data-element": dataElement,
|
|
43
43
|
"data-role": dataRole,
|
|
44
44
|
listPlacement = "bottom-start",
|
|
45
|
+
listMaxHeight,
|
|
45
46
|
flipEnabled = true,
|
|
46
47
|
wrapPillText = true,
|
|
47
48
|
...textboxProps
|
|
@@ -423,6 +424,7 @@ const MultiSelect = /*#__PURE__*/React.forwardRef(({
|
|
|
423
424
|
tableHeader: tableHeader,
|
|
424
425
|
multiColumn: multiColumn,
|
|
425
426
|
listPlacement: listPlacement,
|
|
427
|
+
listMaxHeight: listMaxHeight,
|
|
426
428
|
flipEnabled: flipEnabled,
|
|
427
429
|
loaderDataRole: "multi-select-list-loader",
|
|
428
430
|
multiselectValues: actualValue,
|
|
@@ -501,6 +503,9 @@ MultiSelect.propTypes = { ...formInputPropTypes,
|
|
|
501
503
|
/** Overrides the default tooltip position */
|
|
502
504
|
tooltipPosition: PropTypes.oneOf(["top", "bottom", "left", "right"]),
|
|
503
505
|
|
|
506
|
+
/** Maximum list height - defaults to 180 */
|
|
507
|
+
listMaxHeight: PropTypes.number,
|
|
508
|
+
|
|
504
509
|
/** Placement of the select list in relation to the input element */
|
|
505
510
|
listPlacement: PropTypes.oneOf(["auto", "auto-start", "auto-end", "top", "top-start", "top-end", "bottom", "bottom-start", "bottom-end", "right", "right-start", "right-end", "left", "left-start", "left-end"]),
|
|
506
511
|
|
|
@@ -39,6 +39,8 @@ export interface MultiSelectProps
|
|
|
39
39
|
value?: string[] | Record<string, unknown>[];
|
|
40
40
|
/** Overrides the default tooltip position */
|
|
41
41
|
tooltipPosition?: "top" | "bottom" | "left" | "right";
|
|
42
|
+
/** Maximum list height - defaults to 180 */
|
|
43
|
+
listMaxHeight?: number;
|
|
42
44
|
/** Placement of the select list in relation to the input element */
|
|
43
45
|
listPlacement?:
|
|
44
46
|
| "auto"
|
|
@@ -28,6 +28,7 @@ const fixedPopoverModifiers = [{
|
|
|
28
28
|
}
|
|
29
29
|
}];
|
|
30
30
|
const SelectList = /*#__PURE__*/React.forwardRef(({
|
|
31
|
+
listMaxHeight = 180,
|
|
31
32
|
listActionButton,
|
|
32
33
|
id,
|
|
33
34
|
labelId,
|
|
@@ -337,7 +338,6 @@ const SelectList = /*#__PURE__*/React.forwardRef(({
|
|
|
337
338
|
}
|
|
338
339
|
}, /*#__PURE__*/React.createElement(StyledSelectListContainer, _extends({
|
|
339
340
|
"data-element": "select-list-wrapper",
|
|
340
|
-
height: listHeight,
|
|
341
341
|
placement: placement.current
|
|
342
342
|
}, listProps), /*#__PURE__*/React.createElement(StyledSelectList, {
|
|
343
343
|
id: id,
|
|
@@ -348,7 +348,8 @@ const SelectList = /*#__PURE__*/React.forwardRef(({
|
|
|
348
348
|
ref: listCallbackRef,
|
|
349
349
|
tabIndex: "-1",
|
|
350
350
|
isLoading: isLoading,
|
|
351
|
-
multiColumn: multiColumn
|
|
351
|
+
multiColumn: multiColumn,
|
|
352
|
+
maxHeight: listMaxHeight
|
|
352
353
|
}, selectListContent, isLoading && loader()), listActionButton && /*#__PURE__*/React.createElement(ListActionButton, {
|
|
353
354
|
ref: listActionButtonRef,
|
|
354
355
|
listActionButton: listActionButton,
|
|
@@ -386,6 +387,9 @@ SelectList.propTypes = {
|
|
|
386
387
|
/** True for default text button or a Button Component to be rendered */
|
|
387
388
|
listActionButton: PropTypes.oneOfType([PropTypes.bool, PropTypes.element]),
|
|
388
389
|
|
|
390
|
+
/** Maximum list height - defaults to 180 */
|
|
391
|
+
listMaxHeight: PropTypes.number,
|
|
392
|
+
|
|
389
393
|
/** A callback for when the Action Button is triggered */
|
|
390
394
|
onListAction: PropTypes.func,
|
|
391
395
|
|
|
@@ -30,6 +30,7 @@ const SimpleSelect = /*#__PURE__*/React.forwardRef(({
|
|
|
30
30
|
onBlur,
|
|
31
31
|
disablePortal,
|
|
32
32
|
isLoading,
|
|
33
|
+
listMaxHeight,
|
|
33
34
|
onListScrollBottom,
|
|
34
35
|
tableHeader,
|
|
35
36
|
multiColumn,
|
|
@@ -325,6 +326,7 @@ const SimpleSelect = /*#__PURE__*/React.forwardRef(({
|
|
|
325
326
|
onSelectListClose: onSelectListClose,
|
|
326
327
|
highlightedValue: selectedValue,
|
|
327
328
|
disablePortal: disablePortal,
|
|
329
|
+
listMaxHeight: listMaxHeight,
|
|
328
330
|
isLoading: isLoading,
|
|
329
331
|
onListScrollBottom: onListScrollBottom,
|
|
330
332
|
tableHeader: tableHeader,
|
|
@@ -404,6 +406,9 @@ SimpleSelect.propTypes = {
|
|
|
404
406
|
/** Overrides the default tooltip position */
|
|
405
407
|
tooltipPosition: PropTypes.oneOf(["top", "bottom", "left", "right"]),
|
|
406
408
|
|
|
409
|
+
/** Maximum list height - defaults to 180 */
|
|
410
|
+
listMaxHeight: PropTypes.number,
|
|
411
|
+
|
|
407
412
|
/** Placement of the select list in relation to the input element */
|
|
408
413
|
listPlacement: PropTypes.oneOf(["auto", "auto-start", "auto-end", "top", "top-start", "top-end", "bottom", "bottom-start", "bottom-end", "right", "right-start", "right-end", "left", "left-start", "left-end"]),
|
|
409
414
|
|
|
@@ -37,6 +37,8 @@ export interface SimpleSelectProps
|
|
|
37
37
|
value?: string | Record<string, unknown>;
|
|
38
38
|
/** Overrides the default tooltip position */
|
|
39
39
|
tooltipPosition?: "top" | "bottom" | "left" | "right";
|
|
40
|
+
/** Maximum list height - defaults to 180 */
|
|
41
|
+
listMaxHeight?: number;
|
|
40
42
|
/** Placement of the select list in relation to the input element */
|
|
41
43
|
listPlacement?:
|
|
42
44
|
| "auto"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IconType } from "components/icon/icon-type";
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
import { DialogProps } from "../dialog
|
|
3
|
+
import { DialogProps } from "../dialog";
|
|
4
4
|
|
|
5
5
|
export interface ConfirmProps extends DialogProps {
|
|
6
6
|
/** Color variants for new business themes: "primary" | "secondary" | "tertiary" | "dashed" | "darkBackground" */
|
|
@@ -55,6 +55,7 @@ const FilterableSelect = /*#__PURE__*/_react.default.forwardRef(({
|
|
|
55
55
|
noResultsMessage,
|
|
56
56
|
disablePortal,
|
|
57
57
|
listActionButton,
|
|
58
|
+
listMaxHeight,
|
|
58
59
|
onListAction,
|
|
59
60
|
isLoading,
|
|
60
61
|
disabled,
|
|
@@ -426,6 +427,7 @@ const FilterableSelect = /*#__PURE__*/_react.default.forwardRef(({
|
|
|
426
427
|
noResultsMessage: noResultsMessage,
|
|
427
428
|
disablePortal: disablePortal,
|
|
428
429
|
listActionButton: listActionButton,
|
|
430
|
+
listMaxHeight: listMaxHeight,
|
|
429
431
|
onListAction: handleOnListAction,
|
|
430
432
|
isLoading: isLoading,
|
|
431
433
|
readOnly: readOnly,
|
|
@@ -517,6 +519,9 @@ FilterableSelect.propTypes = { ..._selectTextbox.formInputPropTypes,
|
|
|
517
519
|
/** Overrides the default tooltip position */
|
|
518
520
|
tooltipPosition: _propTypes.default.oneOf(["top", "bottom", "left", "right"]),
|
|
519
521
|
|
|
522
|
+
/** Maximum list height - defaults to 180 */
|
|
523
|
+
listMaxHeight: _propTypes.default.number,
|
|
524
|
+
|
|
520
525
|
/** Placement of the select list in relation to the input element */
|
|
521
526
|
listPlacement: _propTypes.default.oneOf(["auto", "auto-start", "auto-end", "top", "top-start", "top-end", "bottom", "bottom-start", "bottom-end", "right", "right-start", "right-end", "left", "left-start", "left-end"]),
|
|
522
527
|
|
|
@@ -44,6 +44,8 @@ export interface FilterableSelectProps
|
|
|
44
44
|
value?: string | Record<string, unknown>;
|
|
45
45
|
/** Overrides the default tooltip position */
|
|
46
46
|
tooltipPosition?: "top" | "bottom" | "left" | "right";
|
|
47
|
+
/** Maximum list height - defaults to 180 */
|
|
48
|
+
listMaxHeight?: number;
|
|
47
49
|
/** Placement of the select list in relation to the input element */
|
|
48
50
|
listPlacement?:
|
|
49
51
|
| "auto"
|
|
@@ -69,6 +69,7 @@ const MultiSelect = /*#__PURE__*/_react.default.forwardRef(({
|
|
|
69
69
|
"data-element": dataElement,
|
|
70
70
|
"data-role": dataRole,
|
|
71
71
|
listPlacement = "bottom-start",
|
|
72
|
+
listMaxHeight,
|
|
72
73
|
flipEnabled = true,
|
|
73
74
|
wrapPillText = true,
|
|
74
75
|
...textboxProps
|
|
@@ -451,6 +452,7 @@ const MultiSelect = /*#__PURE__*/_react.default.forwardRef(({
|
|
|
451
452
|
tableHeader: tableHeader,
|
|
452
453
|
multiColumn: multiColumn,
|
|
453
454
|
listPlacement: listPlacement,
|
|
455
|
+
listMaxHeight: listMaxHeight,
|
|
454
456
|
flipEnabled: flipEnabled,
|
|
455
457
|
loaderDataRole: "multi-select-list-loader",
|
|
456
458
|
multiselectValues: actualValue,
|
|
@@ -531,6 +533,9 @@ MultiSelect.propTypes = { ..._selectTextbox.formInputPropTypes,
|
|
|
531
533
|
/** Overrides the default tooltip position */
|
|
532
534
|
tooltipPosition: _propTypes.default.oneOf(["top", "bottom", "left", "right"]),
|
|
533
535
|
|
|
536
|
+
/** Maximum list height - defaults to 180 */
|
|
537
|
+
listMaxHeight: _propTypes.default.number,
|
|
538
|
+
|
|
534
539
|
/** Placement of the select list in relation to the input element */
|
|
535
540
|
listPlacement: _propTypes.default.oneOf(["auto", "auto-start", "auto-end", "top", "top-start", "top-end", "bottom", "bottom-start", "bottom-end", "right", "right-start", "right-end", "left", "left-start", "left-end"]),
|
|
536
541
|
|
|
@@ -39,6 +39,8 @@ export interface MultiSelectProps
|
|
|
39
39
|
value?: string[] | Record<string, unknown>[];
|
|
40
40
|
/** Overrides the default tooltip position */
|
|
41
41
|
tooltipPosition?: "top" | "bottom" | "left" | "right";
|
|
42
|
+
/** Maximum list height - defaults to 180 */
|
|
43
|
+
listMaxHeight?: number;
|
|
42
44
|
/** Placement of the select list in relation to the input element */
|
|
43
45
|
listPlacement?:
|
|
44
46
|
| "auto"
|
|
@@ -18,9 +18,7 @@ const StyledSelectListContainer = _styledComponents.default.div`
|
|
|
18
18
|
}) => placement === "top-start" && "bottom: 0"};
|
|
19
19
|
min-width: 100%;
|
|
20
20
|
max-width: 870px;
|
|
21
|
-
height:
|
|
22
|
-
height
|
|
23
|
-
}) => height};
|
|
21
|
+
height: 100%;
|
|
24
22
|
overflow: hidden;
|
|
25
23
|
animation: fadeIn 250ms ease-out;
|
|
26
24
|
|
|
@@ -58,6 +58,7 @@ const fixedPopoverModifiers = [{
|
|
|
58
58
|
}];
|
|
59
59
|
|
|
60
60
|
const SelectList = /*#__PURE__*/_react.default.forwardRef(({
|
|
61
|
+
listMaxHeight = 180,
|
|
61
62
|
listActionButton,
|
|
62
63
|
id,
|
|
63
64
|
labelId,
|
|
@@ -367,7 +368,6 @@ const SelectList = /*#__PURE__*/_react.default.forwardRef(({
|
|
|
367
368
|
}
|
|
368
369
|
}, /*#__PURE__*/_react.default.createElement(_selectListContainer.default, _extends({
|
|
369
370
|
"data-element": "select-list-wrapper",
|
|
370
|
-
height: listHeight,
|
|
371
371
|
placement: placement.current
|
|
372
372
|
}, listProps), /*#__PURE__*/_react.default.createElement(_selectList.StyledSelectList, {
|
|
373
373
|
id: id,
|
|
@@ -378,7 +378,8 @@ const SelectList = /*#__PURE__*/_react.default.forwardRef(({
|
|
|
378
378
|
ref: listCallbackRef,
|
|
379
379
|
tabIndex: "-1",
|
|
380
380
|
isLoading: isLoading,
|
|
381
|
-
multiColumn: multiColumn
|
|
381
|
+
multiColumn: multiColumn,
|
|
382
|
+
maxHeight: listMaxHeight
|
|
382
383
|
}, selectListContent, isLoading && loader()), listActionButton && /*#__PURE__*/_react.default.createElement(_listActionButton.default, {
|
|
383
384
|
ref: listActionButtonRef,
|
|
384
385
|
listActionButton: listActionButton,
|
|
@@ -417,6 +418,9 @@ SelectList.propTypes = {
|
|
|
417
418
|
/** True for default text button or a Button Component to be rendered */
|
|
418
419
|
listActionButton: _propTypes.default.oneOfType([_propTypes.default.bool, _propTypes.default.element]),
|
|
419
420
|
|
|
421
|
+
/** Maximum list height - defaults to 180 */
|
|
422
|
+
listMaxHeight: _propTypes.default.number,
|
|
423
|
+
|
|
420
424
|
/** A callback for when the Action Button is triggered */
|
|
421
425
|
onListAction: _propTypes.default.func,
|
|
422
426
|
|
|
@@ -55,6 +55,7 @@ const SimpleSelect = /*#__PURE__*/_react.default.forwardRef(({
|
|
|
55
55
|
onBlur,
|
|
56
56
|
disablePortal,
|
|
57
57
|
isLoading,
|
|
58
|
+
listMaxHeight,
|
|
58
59
|
onListScrollBottom,
|
|
59
60
|
tableHeader,
|
|
60
61
|
multiColumn,
|
|
@@ -350,6 +351,7 @@ const SimpleSelect = /*#__PURE__*/_react.default.forwardRef(({
|
|
|
350
351
|
onSelectListClose: onSelectListClose,
|
|
351
352
|
highlightedValue: selectedValue,
|
|
352
353
|
disablePortal: disablePortal,
|
|
354
|
+
listMaxHeight: listMaxHeight,
|
|
353
355
|
isLoading: isLoading,
|
|
354
356
|
onListScrollBottom: onListScrollBottom,
|
|
355
357
|
tableHeader: tableHeader,
|
|
@@ -431,6 +433,9 @@ SimpleSelect.propTypes = {
|
|
|
431
433
|
/** Overrides the default tooltip position */
|
|
432
434
|
tooltipPosition: _propTypes.default.oneOf(["top", "bottom", "left", "right"]),
|
|
433
435
|
|
|
436
|
+
/** Maximum list height - defaults to 180 */
|
|
437
|
+
listMaxHeight: _propTypes.default.number,
|
|
438
|
+
|
|
434
439
|
/** Placement of the select list in relation to the input element */
|
|
435
440
|
listPlacement: _propTypes.default.oneOf(["auto", "auto-start", "auto-end", "top", "top-start", "top-end", "bottom", "bottom-start", "bottom-end", "right", "right-start", "right-end", "left", "left-start", "left-end"]),
|
|
436
441
|
|
|
@@ -37,6 +37,8 @@ export interface SimpleSelectProps
|
|
|
37
37
|
value?: string | Record<string, unknown>;
|
|
38
38
|
/** Overrides the default tooltip position */
|
|
39
39
|
tooltipPosition?: "top" | "bottom" | "left" | "right";
|
|
40
|
+
/** Maximum list height - defaults to 180 */
|
|
41
|
+
listMaxHeight?: number;
|
|
40
42
|
/** Placement of the select list in relation to the input element */
|
|
41
43
|
listPlacement?:
|
|
42
44
|
| "auto"
|