carbon-react 118.0.0 → 118.1.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/__internal__/filter-object-properties/filter-object-properties.d.ts +1 -1
- package/esm/components/button-minor/button-minor.style.js +8 -0
- package/esm/components/pager/pager.component.js +5 -5
- package/esm/components/pill/pill.component.d.ts +3 -1
- package/esm/components/pill/pill.component.js +1 -0
- package/esm/components/select/__internal__/select-list-context.d.ts +7 -0
- package/esm/components/select/__internal__/select-text/index.d.ts +2 -0
- package/esm/components/select/__internal__/select-text/index.js +1 -0
- package/esm/components/select/__internal__/select-text/select-text.component.d.ts +33 -0
- package/esm/components/select/__internal__/select-text/select-text.component.js +16 -36
- package/esm/components/select/__internal__/select-text/select-text.style.d.ts +6 -1
- package/esm/components/select/filterable-select/filterable-select.component.d.ts +65 -0
- package/esm/components/select/filterable-select/filterable-select.component.js +568 -102
- package/esm/components/select/filterable-select/index.d.ts +2 -1
- package/esm/components/select/filterable-select/index.js +1 -0
- package/esm/components/select/index.d.ts +6 -0
- package/esm/components/select/index.js +6 -6
- package/esm/components/select/list-action-button/index.d.ts +2 -0
- package/esm/components/select/list-action-button/index.js +1 -0
- package/esm/components/select/list-action-button/list-action-button.component.d.ts +7 -0
- package/esm/components/select/list-action-button/list-action-button.component.js +9 -6
- package/esm/components/select/list-action-button/list-action-button.style.d.ts +2 -0
- package/esm/components/select/multi-select/index.d.ts +2 -1
- package/esm/components/select/multi-select/index.js +1 -0
- package/esm/components/select/multi-select/multi-select.component.d.ts +62 -0
- package/esm/components/select/multi-select/multi-select.component.js +575 -104
- package/esm/components/select/multi-select/multi-select.style.d.ts +4 -0
- package/esm/components/select/multi-select/multi-select.style.js +1 -0
- package/esm/components/select/option/index.d.ts +2 -25
- package/esm/components/select/option/index.js +1 -0
- package/esm/components/select/option/option.component.d.ts +34 -0
- package/esm/components/select/option/option.component.js +399 -62
- package/esm/components/select/option/option.style.d.ts +6 -0
- package/esm/components/select/option/option.style.js +0 -5
- package/esm/components/select/option-group-header/index.d.ts +2 -10
- package/esm/components/select/option-group-header/index.js +1 -0
- package/esm/components/select/option-group-header/option-group-header.component.d.ts +16 -0
- package/esm/components/select/option-group-header/option-group-header.component.js +4 -15
- package/esm/components/select/option-group-header/option-group-header.style.d.ts +2 -0
- package/esm/components/select/option-row/index.d.ts +2 -16
- package/esm/components/select/option-row/index.js +1 -0
- package/esm/components/select/option-row/option-row.component.d.ts +42 -0
- package/esm/components/select/option-row/option-row.component.js +10 -40
- package/esm/components/select/option-row/option-row.style.d.ts +6 -0
- package/esm/components/select/select-list/index.d.ts +2 -0
- package/esm/components/select/select-list/index.js +1 -0
- package/esm/components/select/select-list/select-list-container.style.d.ts +6 -0
- package/esm/components/select/select-list/select-list.component.d.ts +64 -0
- package/esm/components/select/select-list/select-list.component.js +69 -100
- package/esm/components/select/select-list/select-list.style.d.ts +12 -0
- package/esm/components/select/select-list/select-list.style.js +2 -2
- package/esm/components/select/select-textbox/index.d.ts +2 -1
- package/esm/components/select/select-textbox/index.js +1 -0
- package/esm/components/select/select-textbox/select-textbox.component.d.ts +81 -0
- package/esm/components/select/select-textbox/select-textbox.component.js +567 -142
- package/esm/components/select/select.style.d.ts +8 -0
- package/esm/components/select/simple-select/index.d.ts +2 -1
- package/esm/components/select/simple-select/index.js +1 -0
- package/esm/components/select/simple-select/simple-select.component.d.ts +58 -0
- package/esm/components/select/simple-select/simple-select.component.js +578 -111
- package/esm/components/select/utils/get-next-child-by-text.d.ts +5 -0
- package/esm/components/select/utils/get-next-child-by-text.js +20 -17
- package/esm/components/select/utils/get-next-index-by-key.d.ts +2 -0
- package/esm/components/select/utils/highlight-part-of-text.d.ts +2 -0
- package/esm/components/select/utils/highlight-part-of-text.js +10 -3
- package/esm/components/select/utils/is-expected-option.d.ts +2 -0
- package/esm/components/select/utils/is-expected-option.js +1 -1
- package/esm/components/select/utils/is-expected-value.d.ts +1 -0
- package/esm/components/select/utils/is-expected-value.js +1 -1
- package/esm/components/select/utils/is-navigation-key.d.ts +1 -0
- package/esm/components/select/utils/matching-text.style.d.ts +2 -0
- package/esm/components/select/utils/with-filter.hoc.d.ts +14 -0
- package/esm/components/select/utils/with-filter.hoc.js +59 -41
- package/esm/components/tabs/__internal__/tab-title/tab-title.component.js +1 -0
- package/lib/__internal__/filter-object-properties/filter-object-properties.d.ts +1 -1
- package/lib/components/button-minor/button-minor.style.js +8 -0
- package/lib/components/pager/pager.component.js +5 -5
- package/lib/components/pill/pill.component.d.ts +3 -1
- package/lib/components/pill/pill.component.js +1 -0
- package/lib/components/select/__internal__/select-list-context.d.ts +7 -0
- package/lib/components/select/__internal__/select-text/index.d.ts +2 -0
- package/lib/components/select/__internal__/select-text/index.js +15 -0
- package/lib/components/select/__internal__/select-text/package.json +6 -0
- package/lib/components/select/__internal__/select-text/select-text.component.d.ts +33 -0
- package/lib/components/select/__internal__/select-text/select-text.component.js +16 -36
- package/lib/components/select/__internal__/select-text/select-text.style.d.ts +6 -1
- package/lib/components/select/filterable-select/filterable-select.component.d.ts +65 -0
- package/lib/components/select/filterable-select/filterable-select.component.js +569 -103
- package/lib/components/select/filterable-select/index.d.ts +2 -1
- package/lib/components/select/filterable-select/index.js +15 -0
- package/lib/components/select/filterable-select/package.json +6 -0
- package/lib/components/select/index.d.ts +6 -0
- package/lib/components/select/index.js +6 -6
- package/lib/components/select/list-action-button/index.d.ts +2 -0
- package/lib/components/select/list-action-button/index.js +15 -0
- package/lib/components/select/list-action-button/list-action-button.component.d.ts +7 -0
- package/lib/components/select/list-action-button/list-action-button.component.js +9 -6
- package/lib/components/select/list-action-button/list-action-button.style.d.ts +2 -0
- package/lib/components/select/list-action-button/package.json +6 -0
- package/lib/components/select/multi-select/index.d.ts +2 -1
- package/lib/components/select/multi-select/index.js +15 -0
- package/lib/components/select/multi-select/multi-select.component.d.ts +62 -0
- package/lib/components/select/multi-select/multi-select.component.js +576 -105
- package/lib/components/select/multi-select/multi-select.style.d.ts +4 -0
- package/lib/components/select/multi-select/multi-select.style.js +1 -0
- package/lib/components/select/multi-select/package.json +6 -0
- package/lib/components/select/option/index.d.ts +2 -25
- package/lib/components/select/option/index.js +15 -0
- package/lib/components/select/option/option.component.d.ts +34 -0
- package/lib/components/select/option/option.component.js +399 -62
- package/lib/components/select/option/option.style.d.ts +6 -0
- package/lib/components/select/option/option.style.js +0 -8
- package/lib/components/select/option/package.json +6 -0
- package/lib/components/select/option-group-header/index.d.ts +2 -10
- package/lib/components/select/option-group-header/index.js +15 -0
- package/lib/components/select/option-group-header/option-group-header.component.d.ts +16 -0
- package/lib/components/select/option-group-header/option-group-header.component.js +4 -15
- package/lib/components/select/option-group-header/option-group-header.style.d.ts +2 -0
- package/lib/components/select/option-group-header/package.json +6 -0
- package/lib/components/select/option-row/index.d.ts +2 -16
- package/lib/components/select/option-row/index.js +15 -0
- package/lib/components/select/option-row/option-row.component.d.ts +42 -0
- package/lib/components/select/option-row/option-row.component.js +10 -40
- package/lib/components/select/option-row/option-row.style.d.ts +6 -0
- package/lib/components/select/option-row/package.json +6 -0
- package/lib/components/select/select-list/index.d.ts +2 -0
- package/lib/components/select/select-list/index.js +15 -0
- package/lib/components/select/select-list/package.json +6 -0
- package/lib/components/select/select-list/select-list-container.style.d.ts +6 -0
- package/lib/components/select/select-list/select-list.component.d.ts +64 -0
- package/lib/components/select/select-list/select-list.component.js +69 -100
- package/lib/components/select/select-list/select-list.style.d.ts +12 -0
- package/lib/components/select/select-list/select-list.style.js +2 -2
- package/lib/components/select/select-textbox/index.d.ts +2 -1
- package/lib/components/select/select-textbox/index.js +15 -0
- package/lib/components/select/select-textbox/package.json +6 -0
- package/lib/components/select/select-textbox/select-textbox.component.d.ts +81 -0
- package/lib/components/select/select-textbox/select-textbox.component.js +567 -142
- package/lib/components/select/select.style.d.ts +8 -0
- package/lib/components/select/simple-select/index.d.ts +2 -1
- package/lib/components/select/simple-select/index.js +15 -0
- package/lib/components/select/simple-select/package.json +6 -0
- package/lib/components/select/simple-select/simple-select.component.d.ts +58 -0
- package/lib/components/select/simple-select/simple-select.component.js +579 -113
- package/lib/components/select/utils/get-next-child-by-text.d.ts +5 -0
- package/lib/components/select/utils/get-next-child-by-text.js +20 -17
- package/lib/components/select/utils/get-next-index-by-key.d.ts +2 -0
- package/lib/components/select/utils/highlight-part-of-text.d.ts +2 -0
- package/lib/components/select/utils/highlight-part-of-text.js +10 -3
- package/lib/components/select/utils/is-expected-option.d.ts +2 -0
- package/lib/components/select/utils/is-expected-option.js +1 -1
- package/lib/components/select/utils/is-expected-value.d.ts +1 -0
- package/lib/components/select/utils/is-expected-value.js +1 -1
- package/lib/components/select/utils/is-navigation-key.d.ts +1 -0
- package/lib/components/select/utils/matching-text.style.d.ts +2 -0
- package/lib/components/select/utils/with-filter.hoc.d.ts +14 -0
- package/lib/components/select/utils/with-filter.hoc.js +59 -42
- package/lib/components/tabs/__internal__/tab-title/tab-title.component.js +1 -0
- package/package.json +1 -1
- package/esm/components/select/__internal__/select-text/select-text.d.ts +0 -36
- package/esm/components/select/filterable-select/filterable-select.d.ts +0 -71
- package/esm/components/select/multi-select/multi-select.d.ts +0 -68
- package/esm/components/select/select-textbox/select-textbox.d.ts +0 -72
- package/esm/components/select/simple-select/simple-select.d.ts +0 -64
- package/lib/components/select/__internal__/select-text/select-text.d.ts +0 -36
- package/lib/components/select/filterable-select/filterable-select.d.ts +0 -71
- package/lib/components/select/multi-select/multi-select.d.ts +0 -68
- package/lib/components/select/select-textbox/select-textbox.d.ts +0 -72
- package/lib/components/select/simple-select/simple-select.d.ts +0 -64
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
|
|
3
|
-
export interface SelectTextProps {
|
|
4
|
-
/** If true the Component will be disabled */
|
|
5
|
-
disabled?: boolean;
|
|
6
|
-
/** Value to be displayed */
|
|
7
|
-
formattedValue?: string;
|
|
8
|
-
/** Label id passed from Select component */
|
|
9
|
-
labelId?: string;
|
|
10
|
-
/** If true, the list is displayed */
|
|
11
|
-
isOpen?: boolean;
|
|
12
|
-
/** Callback function for when the Select Textbox loses it's focus. */
|
|
13
|
-
onBlur?: (ev: React.FocusEvent<HTMLElement>) => void;
|
|
14
|
-
/** Callback function for when the component is clicked. */
|
|
15
|
-
onClick?: (ev: React.MouseEvent<HTMLElement>) => void;
|
|
16
|
-
/** Callback function for when the Select Textbox is focused. */
|
|
17
|
-
onFocus?: (ev: React.FocusEvent<HTMLElement>) => void;
|
|
18
|
-
/** Callback function for when the key is pressed when focused on Select Text. */
|
|
19
|
-
onKeyDown?: (ev: React.KeyboardEvent<HTMLElement>) => void;
|
|
20
|
-
/** Callback function for when the left mouse key is pressed when focused on Select Text. */
|
|
21
|
-
onMouseDown?: (ev: React.MouseEvent<HTMLElement>) => void;
|
|
22
|
-
/** Placeholder string to be displayed when formattedValue is empty */
|
|
23
|
-
placeholder?: string;
|
|
24
|
-
/** If true the Component will be read-only */
|
|
25
|
-
readOnly?: boolean;
|
|
26
|
-
/** If true the component has no border and a transparent background */
|
|
27
|
-
transparent?: boolean;
|
|
28
|
-
/** Id of the Select Text element */
|
|
29
|
-
textId?: string;
|
|
30
|
-
/** Component size */
|
|
31
|
-
size?: string;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
declare function SelectText(props: SelectTextProps): JSX.Element;
|
|
35
|
-
|
|
36
|
-
export default SelectText;
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { Side } from "@floating-ui/dom";
|
|
3
|
-
import Button from "../../button";
|
|
4
|
-
import { FormInputPropTypes } from "../select-textbox/select-textbox";
|
|
5
|
-
|
|
6
|
-
export interface FilterableSelectProps
|
|
7
|
-
extends Omit<FormInputPropTypes, "defaultValue" | "value"> {
|
|
8
|
-
/** Prop to specify the aria-label attribute of the component input */
|
|
9
|
-
"aria-label"?: string;
|
|
10
|
-
/** Prop to specify the aria-labeledby property of the component input */
|
|
11
|
-
"aria-labelledby"?: string;
|
|
12
|
-
/** Identifier used for testing purposes, applied to the root element of the component. */
|
|
13
|
-
"data-component"?: string;
|
|
14
|
-
/** Identifier used for testing purposes, applied to the root element of the component. */
|
|
15
|
-
"data-element"?: string;
|
|
16
|
-
/** Identifier used for testing purposes, applied to the root element of the component. */
|
|
17
|
-
"data-role"?: string;
|
|
18
|
-
/** Child components (such as Option or OptionRow) for the SelectList */
|
|
19
|
-
children: React.ReactNode;
|
|
20
|
-
/** The default selected value(s), when the component is operating in uncontrolled mode */
|
|
21
|
-
defaultValue?: string | Record<string, unknown>;
|
|
22
|
-
/** Boolean to toggle where SelectList is rendered in relation to the Select Input */
|
|
23
|
-
disablePortal?: boolean;
|
|
24
|
-
/** If true the loader animation is displayed in the option list */
|
|
25
|
-
isLoading?: boolean;
|
|
26
|
-
/** True for default text button or a Button Component to be rendered */
|
|
27
|
-
listActionButton?: boolean | typeof Button;
|
|
28
|
-
/** When true component will work in multi column mode.
|
|
29
|
-
* Children should consist of OptionRow components in this mode
|
|
30
|
-
*/
|
|
31
|
-
multiColumn?: boolean;
|
|
32
|
-
/** A custom message to be displayed when any option does not match the filter text */
|
|
33
|
-
noResultsMessage?: string;
|
|
34
|
-
/** A custom callback for when the input text changes */
|
|
35
|
-
onFilterChange?: (filterText: string) => void;
|
|
36
|
-
/** A custom callback for when the dropdown menu opens */
|
|
37
|
-
onOpen?: () => void;
|
|
38
|
-
/** A callback for when the Action Button is triggered */
|
|
39
|
-
onListAction?: () => void;
|
|
40
|
-
/** A callback that is triggered when a user scrolls to the bottom of the list */
|
|
41
|
-
onListScrollBottom?: () => void;
|
|
42
|
-
/** If true the Component opens on focus */
|
|
43
|
-
openOnFocus?: boolean;
|
|
44
|
-
/** SelectList table header, should consist of multiple th elements.
|
|
45
|
-
* Works only in multiColumn mode
|
|
46
|
-
*/
|
|
47
|
-
tableHeader?: React.ReactNode;
|
|
48
|
-
/** The selected value(s), when the component is operating in controlled mode */
|
|
49
|
-
value?: string | Record<string, unknown>;
|
|
50
|
-
/** Overrides the default tooltip position */
|
|
51
|
-
tooltipPosition?: "top" | "bottom" | "left" | "right";
|
|
52
|
-
/** Maximum list height - defaults to 180 */
|
|
53
|
-
listMaxHeight?: number;
|
|
54
|
-
/** Placement of the select list in relation to the input element */
|
|
55
|
-
listPlacement?: Side;
|
|
56
|
-
/** Use the opposite list placement if the set placement does not fit */
|
|
57
|
-
flipEnabled?: boolean;
|
|
58
|
-
/** Set this prop to enable a virtualised list of options. If it is not used then all options will be in the
|
|
59
|
-
* DOM at all times, which may cause performance problems on very large lists */
|
|
60
|
-
enableVirtualScroll?: boolean;
|
|
61
|
-
/** The number of options to render into the DOM at once, either side of the currently-visible ones.
|
|
62
|
-
* Higher values make for smoother scrolling but may impact performance.
|
|
63
|
-
* Only used if the `enableVirtualScroll` prop is set. */
|
|
64
|
-
virtualScrollOverscan?: number;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
declare function FilterableSelect(
|
|
68
|
-
props: FilterableSelectProps & React.RefAttributes<HTMLInputElement>
|
|
69
|
-
): JSX.Element;
|
|
70
|
-
|
|
71
|
-
export default FilterableSelect;
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { Side } from "@floating-ui/dom";
|
|
3
|
-
import { FormInputPropTypes } from "../select-textbox/select-textbox";
|
|
4
|
-
|
|
5
|
-
export interface MultiSelectProps
|
|
6
|
-
extends Omit<FormInputPropTypes, "defaultValue" | "value"> {
|
|
7
|
-
/** Prop to specify the aria-label attribute of the component input */
|
|
8
|
-
"aria-label"?: string;
|
|
9
|
-
/** Prop to specify the aria-labeledby property of the component input */
|
|
10
|
-
"aria-labelledby"?: string;
|
|
11
|
-
/** Identifier used for testing purposes, applied to the root element of the component. */
|
|
12
|
-
"data-component"?: string;
|
|
13
|
-
/** Identifier used for testing purposes, applied to the root element of the component. */
|
|
14
|
-
"data-element"?: string;
|
|
15
|
-
/** Identifier used for testing purposes, applied to the root element of the component. */
|
|
16
|
-
"data-role"?: string;
|
|
17
|
-
/** Size of an input */
|
|
18
|
-
size?: "small" | "medium" | "large";
|
|
19
|
-
/** Child components (such as Option or OptionRow) for the SelectList */
|
|
20
|
-
children: React.ReactNode;
|
|
21
|
-
/** The default selected value(s), when the component is operating in uncontrolled mode */
|
|
22
|
-
defaultValue?: string[] | Record<string, unknown>[];
|
|
23
|
-
/** Boolean to toggle where SelectList is rendered in relation to the Select Input */
|
|
24
|
-
disablePortal?: boolean;
|
|
25
|
-
/** If true the loader animation is displayed in the option list */
|
|
26
|
-
isLoading?: boolean;
|
|
27
|
-
/** When true component will work in multi column mode.
|
|
28
|
-
* Children should consist of OptionRow components in this mode
|
|
29
|
-
*/
|
|
30
|
-
multiColumn?: boolean;
|
|
31
|
-
/** A custom message to be displayed when any option does not match the filter text */
|
|
32
|
-
noResultsMessage?: string;
|
|
33
|
-
/** A custom callback for when the input text changes */
|
|
34
|
-
onFilterChange?: (filterText: string) => void;
|
|
35
|
-
/** A custom callback for when the dropdown menu opens */
|
|
36
|
-
onOpen?: () => void;
|
|
37
|
-
/** If true the Component opens on focus */
|
|
38
|
-
openOnFocus?: boolean;
|
|
39
|
-
/** SelectList table header, should consist of multiple th elements.
|
|
40
|
-
* Works only in multiColumn mode
|
|
41
|
-
*/
|
|
42
|
-
tableHeader?: React.ReactNode;
|
|
43
|
-
/** The selected value(s), when the component is operating in controlled mode */
|
|
44
|
-
value?: string[] | Record<string, unknown>[];
|
|
45
|
-
/** Overrides the default tooltip position */
|
|
46
|
-
tooltipPosition?: "top" | "bottom" | "left" | "right";
|
|
47
|
-
/** Maximum list height - defaults to 180 */
|
|
48
|
-
listMaxHeight?: number;
|
|
49
|
-
/** Placement of the select list in relation to the input element */
|
|
50
|
-
listPlacement?: Side;
|
|
51
|
-
/** Use the opposite list placement if the set placement does not fit */
|
|
52
|
-
flipEnabled?: boolean;
|
|
53
|
-
/** Wraps the pill text when it would overflow the input width */
|
|
54
|
-
wrapPillText?: boolean;
|
|
55
|
-
/** Set this prop to enable a virtualised list of options. If it is not used then all options will be in the
|
|
56
|
-
* DOM at all times, which may cause performance problems on very large lists */
|
|
57
|
-
enableVirtualScroll?: boolean;
|
|
58
|
-
/** The number of options to render into the DOM at once, either side of the currently-visible ones.
|
|
59
|
-
* Higher values make for smoother scrolling but may impact performance.
|
|
60
|
-
* Only used if the `enableVirtualScroll` prop is set. */
|
|
61
|
-
virtualScrollOverscan?: number;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
declare function MultiSelect(
|
|
65
|
-
props: MultiSelectProps & React.RefAttributes<HTMLInputElement>
|
|
66
|
-
): JSX.Element;
|
|
67
|
-
|
|
68
|
-
export default MultiSelect;
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
|
|
3
|
-
import { CommonTextboxProps } from "../../textbox";
|
|
4
|
-
import { ValidationProps } from "../../../__internal__/validations";
|
|
5
|
-
|
|
6
|
-
export interface FormInputPropTypes
|
|
7
|
-
extends ValidationProps,
|
|
8
|
-
Omit<CommonTextboxProps, "onClick"> {
|
|
9
|
-
/** Breakpoint for adaptive label (inline labels change to top aligned). Enables the adaptive behaviour when set */
|
|
10
|
-
adaptiveLabelBreakpoint?: number;
|
|
11
|
-
/** Prop to specify the aria-label attribute of the component input */
|
|
12
|
-
ariaLabel?: string;
|
|
13
|
-
/** Prop to specify the aria-labeledby property of the component input */
|
|
14
|
-
ariaLabelledBy?: string;
|
|
15
|
-
/** If true the Component will be focused when rendered */
|
|
16
|
-
autoFocus?: boolean;
|
|
17
|
-
/** If true, the component will be disabled */
|
|
18
|
-
disabled?: boolean;
|
|
19
|
-
/** Id attribute of the input element */
|
|
20
|
-
id?: string;
|
|
21
|
-
/** The width of the input as a percentage */
|
|
22
|
-
inputWidth?: number;
|
|
23
|
-
/** Label content */
|
|
24
|
-
label?: string;
|
|
25
|
-
/** A message that the Help component will display */
|
|
26
|
-
labelHelp?: React.ReactNode;
|
|
27
|
-
/** When true label is inline */
|
|
28
|
-
labelInline?: boolean;
|
|
29
|
-
/** Label width */
|
|
30
|
-
labelWidth?: number;
|
|
31
|
-
/** Name attribute of the input element */
|
|
32
|
-
name?: string;
|
|
33
|
-
/** Specify a callback triggered on blur */
|
|
34
|
-
onBlur?: (ev: React.FocusEvent<HTMLInputElement>) => void;
|
|
35
|
-
/** Specify a callback triggered on change */
|
|
36
|
-
onChange?: (ev: React.ChangeEvent<HTMLInputElement>) => void;
|
|
37
|
-
/** pecify a callback triggered on click */
|
|
38
|
-
onClick?: (ev: React.MouseEvent<HTMLInputElement>) => void;
|
|
39
|
-
/** Specify a callback triggered on focus */
|
|
40
|
-
onFocus?: (ev: React.FocusEvent<HTMLInputElement>) => void;
|
|
41
|
-
/** pecify a callback triggered on keuyDown */
|
|
42
|
-
onKeyDown?: (ev: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
43
|
-
/** Placeholder string to be displayed in input */
|
|
44
|
-
placeholder?: string;
|
|
45
|
-
/** Flag to configure component as mandatory */
|
|
46
|
-
required?: boolean;
|
|
47
|
-
/** If true, the component will be read-only */
|
|
48
|
-
readOnly?: boolean;
|
|
49
|
-
/** Size of an input */
|
|
50
|
-
size?: "small" | "medium" | "large";
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
export interface SelectTextboxProps extends FormInputPropTypes {
|
|
54
|
-
/** Id attribute of the select list */
|
|
55
|
-
"aria-controls"?: string;
|
|
56
|
-
/** Value to be displayed in the Textbox */
|
|
57
|
-
formattedValue?: string;
|
|
58
|
-
/** If true, the input will be displayed */
|
|
59
|
-
hasTextCursor?: boolean;
|
|
60
|
-
/** If true, the list is displayed */
|
|
61
|
-
isOpen?: boolean;
|
|
62
|
-
/** Value of the Select Input */
|
|
63
|
-
selectedValue?:
|
|
64
|
-
| string
|
|
65
|
-
| Record<string, unknown>
|
|
66
|
-
| string[]
|
|
67
|
-
| Record<string, unknown>[];
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
declare function SelectTextbox(props: SelectTextboxProps): JSX.Element;
|
|
71
|
-
|
|
72
|
-
export default SelectTextbox;
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { Side } from "@floating-ui/dom";
|
|
3
|
-
import { FormInputPropTypes } from "../select-textbox/select-textbox";
|
|
4
|
-
|
|
5
|
-
export interface SimpleSelectProps
|
|
6
|
-
extends Omit<FormInputPropTypes, "defaultValue" | "value"> {
|
|
7
|
-
/** Prop to specify the aria-label attribute of the component input */
|
|
8
|
-
"aria-label"?: string;
|
|
9
|
-
/** Prop to specify the aria-labeledby property of the component input */
|
|
10
|
-
"aria-labelledby"?: string;
|
|
11
|
-
/** Identifier used for testing purposes, applied to the root element of the component. */
|
|
12
|
-
"data-component"?: string;
|
|
13
|
-
/** Identifier used for testing purposes, applied to the root element of the component. */
|
|
14
|
-
"data-element"?: string;
|
|
15
|
-
/** Identifier used for testing purposes, applied to the root element of the component. */
|
|
16
|
-
"data-role"?: string;
|
|
17
|
-
/** Child components (such as Option or OptionRow) for the SelectList */
|
|
18
|
-
children: React.ReactNode;
|
|
19
|
-
/** The default selected value(s), when the component is operating in uncontrolled mode */
|
|
20
|
-
defaultValue?: string | Record<string, unknown>;
|
|
21
|
-
/** Boolean to toggle where SelectList is rendered in relation to the Select Input */
|
|
22
|
-
disablePortal?: boolean;
|
|
23
|
-
/** If true the loader animation is displayed in the option list */
|
|
24
|
-
isLoading?: boolean;
|
|
25
|
-
/** When true component will work in multi column mode.
|
|
26
|
-
* Children should consist of OptionRow components in this mode
|
|
27
|
-
*/
|
|
28
|
-
multiColumn?: boolean;
|
|
29
|
-
/** A callback that is triggered when a user scrolls to the bottom of the list */
|
|
30
|
-
onListScrollBottom?: () => void;
|
|
31
|
-
/** A custom callback for when the dropdown menu opens */
|
|
32
|
-
onOpen?: () => void;
|
|
33
|
-
/** If true the Component opens on focus */
|
|
34
|
-
openOnFocus?: boolean;
|
|
35
|
-
/** SelectList table header, should consist of multiple th elements.
|
|
36
|
-
* Works only in multiColumn mode
|
|
37
|
-
*/
|
|
38
|
-
tableHeader?: React.ReactNode;
|
|
39
|
-
/** If true the component input has no border and is transparent */
|
|
40
|
-
transparent?: boolean;
|
|
41
|
-
/** The selected value(s), when the component is operating in controlled mode */
|
|
42
|
-
value?: string | Record<string, unknown>;
|
|
43
|
-
/** Overrides the default tooltip position */
|
|
44
|
-
tooltipPosition?: "top" | "bottom" | "left" | "right";
|
|
45
|
-
/** Maximum list height - defaults to 180 */
|
|
46
|
-
listMaxHeight?: number;
|
|
47
|
-
/** Placement of the select list in relation to the input element */
|
|
48
|
-
listPlacement?: Side;
|
|
49
|
-
/** Use the opposite list placement if the set placement does not fit */
|
|
50
|
-
flipEnabled?: boolean;
|
|
51
|
-
/** Set this prop to enable a virtualised list of options. If it is not used then all options will be in the
|
|
52
|
-
* DOM at all times, which may cause performance problems on very large lists */
|
|
53
|
-
enableVirtualScroll?: boolean;
|
|
54
|
-
/** The number of options to render into the DOM at once, either side of the currently-visible ones.
|
|
55
|
-
* Higher values make for smoother scrolling but may impact performance.
|
|
56
|
-
* Only used if the `enableVirtualScroll` prop is set. */
|
|
57
|
-
virtualScrollOverscan?: number;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
declare function SimpleSelect(
|
|
61
|
-
props: SimpleSelectProps & React.RefAttributes<HTMLInputElement>
|
|
62
|
-
): JSX.Element;
|
|
63
|
-
|
|
64
|
-
export default SimpleSelect;
|