carbon-react 118.1.0 → 118.2.0
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/__internal__/input/input-presentation.style.js +1 -0
- package/esm/__internal__/input/input.style.js +1 -0
- package/esm/components/action-popover/action-popover.style.js +3 -0
- package/esm/components/advanced-color-picker/advanced-color-picker-cell.style.js +1 -0
- package/esm/components/advanced-color-picker/advanced-color-picker.style.js +1 -0
- package/esm/components/anchor-navigation/anchor-navigation-item/anchor-navigation-item.style.js +6 -2
- package/esm/components/badge/badge.style.js +1 -1
- package/esm/components/batch-selection/batch-selection.style.js +6 -0
- package/esm/components/box/box.component.d.ts +3 -0
- package/esm/components/box/box.component.js +4 -0
- package/esm/components/button/button.style.js +10 -9
- package/esm/components/button-bar/button-bar.style.js +19 -0
- package/esm/components/button-minor/button-minor.style.js +42 -40
- package/esm/components/button-toggle/button-toggle.component.js +2 -1
- package/esm/components/button-toggle/button-toggle.style.d.ts +1 -0
- package/esm/components/button-toggle/button-toggle.style.js +31 -13
- package/esm/components/button-toggle-group/button-toggle-group.style.js +21 -3
- package/esm/components/card/__internal__/card-context/index.d.ts +7 -0
- package/esm/components/card/__internal__/card-context/index.js +2 -0
- package/esm/components/card/card-footer/card-footer.component.js +9 -2
- package/esm/components/card/card-footer/card-footer.style.d.ts +2 -1
- package/esm/components/card/card-footer/card-footer.style.js +10 -1
- package/esm/components/card/card.component.d.ts +3 -2
- package/esm/components/card/card.component.js +10 -1
- package/esm/components/card/card.style.d.ts +2 -1
- package/esm/components/card/card.style.js +3 -1
- package/esm/components/carousel/carousel.component.js +1 -1
- package/esm/components/carousel/carousel.style.js +4 -2
- package/esm/components/carousel/slide/slide.style.js +2 -0
- package/esm/components/checkbox/checkbox.style.js +2 -0
- package/esm/components/date/__internal__/date-picker/day-picker.style.js +4 -0
- package/esm/components/date/__internal__/navbar/button.style.js +2 -0
- package/esm/components/dialog/dialog.style.js +5 -0
- package/esm/components/dismissible-box/dismissible-box.component.d.ts +1 -1
- package/esm/components/dismissible-box/dismissible-box.component.js +4 -1
- package/esm/components/drawer/drawer.style.js +1 -0
- package/esm/components/duelling-picklist/picklist-item/picklist-item.style.js +20 -0
- package/esm/components/flat-table/flat-table-row/flat-table-row.style.js +7 -0
- package/esm/components/flat-table/flat-table.component.js +56 -2
- package/esm/components/flat-table/flat-table.style.js +101 -1
- package/esm/components/flat-table/sort/sort.style.js +1 -0
- package/esm/components/icon-button/icon-button.style.js +1 -0
- package/esm/components/inline-inputs/inline-inputs.style.js +18 -0
- package/esm/components/link/link.style.js +1 -0
- package/esm/components/link-preview/__internal__/placeholder.component.d.ts +3 -1
- package/esm/components/link-preview/__internal__/placeholder.component.js +4 -1
- package/esm/components/link-preview/link-preview.style.js +1 -0
- package/esm/components/loader/loader-square.style.js +5 -0
- package/esm/components/loader-bar/loader-bar.style.js +1 -0
- package/esm/components/menu/__internal__/submenu/submenu.style.js +13 -0
- package/esm/components/menu/menu.style.js +13 -6
- package/esm/components/menu/scrollable-block/scrollable-block.style.js +15 -0
- package/esm/components/message/message.style.js +2 -0
- package/esm/components/multi-action-button/multi-action-button.style.js +4 -0
- package/esm/components/note/note.style.js +1 -0
- package/esm/components/numeral-date/numeral-date.component.js +2 -0
- package/esm/components/numeral-date/numeral-date.style.d.ts +1 -0
- package/esm/components/numeral-date/numeral-date.style.js +12 -0
- package/esm/components/pager/pager.component.js +5 -5
- package/esm/components/pager/pager.style.js +2 -0
- package/esm/components/pill/pill.component.d.ts +3 -1
- package/esm/components/pill/pill.component.js +1 -0
- package/esm/components/pill/pill.style.js +5 -15
- package/esm/components/pod/pod.style.js +6 -0
- package/esm/components/popover-container/popover-container.style.js +1 -0
- package/esm/components/portrait/portrait-gravatar.component.js +1 -1
- package/esm/components/portrait/portrait-initials.component.js +1 -1
- package/esm/components/portrait/portrait.component.js +1 -1
- package/esm/components/portrait/portrait.style.js +1 -3
- package/esm/components/profile/profile.component.js +1 -1
- package/esm/components/progress-tracker/progress-tracker.style.js +2 -2
- package/esm/components/radio-button/radio-button.style.js +1 -1
- package/esm/components/search/search-button.style.js +5 -0
- package/esm/components/search/search.style.js +7 -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-container.style.js +1 -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/split-button/split-button-children.style.d.ts +1 -0
- package/esm/components/split-button/split-button-children.style.js +28 -0
- package/esm/components/split-button/split-button-toggle.style.js +6 -1
- package/esm/components/split-button/split-button.style.js +5 -2
- package/esm/components/switch/__internal__/switch-slider.style.js +1 -2
- package/esm/components/tabs/__internal__/tab-title/tab-title.component.js +1 -0
- package/esm/components/tabs/__internal__/tab-title/tab-title.style.js +22 -2
- package/esm/components/tabs/__internal__/tabs-header/tabs-header.style.js +5 -0
- package/esm/components/text-editor/__internal__/toolbar/toolbar-button/toolbar-button.style.js +3 -0
- package/esm/components/text-editor/text-editor.style.js +3 -0
- package/esm/components/tile/tile.component.d.ts +3 -1
- package/esm/components/tile/tile.component.js +3 -1
- package/esm/components/tile/tile.style.d.ts +1 -1
- package/esm/components/tile/tile.style.js +4 -1
- package/esm/components/tile-select/tile-select.style.d.ts +1 -0
- package/esm/components/tile-select/tile-select.style.js +8 -0
- package/esm/components/tooltip/tooltip.style.js +1 -0
- package/esm/components/vertical-menu/vertical-menu.style.js +1 -0
- package/lib/__internal__/filter-object-properties/filter-object-properties.d.ts +1 -1
- package/lib/__internal__/input/input-presentation.style.js +1 -0
- package/lib/__internal__/input/input.style.js +1 -0
- package/lib/components/action-popover/action-popover.style.js +3 -0
- package/lib/components/advanced-color-picker/advanced-color-picker-cell.style.js +1 -0
- package/lib/components/advanced-color-picker/advanced-color-picker.style.js +1 -0
- package/lib/components/anchor-navigation/anchor-navigation-item/anchor-navigation-item.style.js +6 -2
- package/lib/components/badge/badge.style.js +1 -1
- package/lib/components/batch-selection/batch-selection.style.js +6 -0
- package/lib/components/box/box.component.d.ts +3 -0
- package/lib/components/box/box.component.js +4 -0
- package/lib/components/button/button.style.js +10 -9
- package/lib/components/button-bar/button-bar.style.js +19 -0
- package/lib/components/button-minor/button-minor.style.js +42 -40
- package/lib/components/button-toggle/button-toggle.component.js +2 -1
- package/lib/components/button-toggle/button-toggle.style.d.ts +1 -0
- package/lib/components/button-toggle/button-toggle.style.js +31 -13
- package/lib/components/button-toggle-group/button-toggle-group.style.js +21 -3
- package/lib/components/card/__internal__/card-context/index.d.ts +7 -0
- package/lib/components/card/__internal__/card-context/index.js +14 -0
- package/lib/components/card/__internal__/card-context/package.json +6 -0
- package/lib/components/card/card-footer/card-footer.component.js +14 -2
- package/lib/components/card/card-footer/card-footer.style.d.ts +2 -1
- package/lib/components/card/card-footer/card-footer.style.js +10 -1
- package/lib/components/card/card.component.d.ts +3 -2
- package/lib/components/card/card.component.js +11 -1
- package/lib/components/card/card.style.d.ts +2 -1
- package/lib/components/card/card.style.js +3 -1
- package/lib/components/carousel/carousel.component.js +1 -1
- package/lib/components/carousel/carousel.style.js +4 -2
- package/lib/components/carousel/slide/slide.style.js +2 -0
- package/lib/components/checkbox/checkbox.style.js +2 -0
- package/lib/components/date/__internal__/date-picker/day-picker.style.js +4 -0
- package/lib/components/date/__internal__/navbar/button.style.js +2 -0
- package/lib/components/dialog/dialog.style.js +5 -0
- package/lib/components/dismissible-box/dismissible-box.component.d.ts +1 -1
- package/lib/components/dismissible-box/dismissible-box.component.js +4 -1
- package/lib/components/drawer/drawer.style.js +1 -0
- package/lib/components/duelling-picklist/picklist-item/picklist-item.style.js +20 -0
- package/lib/components/flat-table/flat-table-row/flat-table-row.style.js +7 -0
- package/lib/components/flat-table/flat-table.component.js +60 -2
- package/lib/components/flat-table/flat-table.style.js +102 -1
- package/lib/components/flat-table/sort/sort.style.js +1 -0
- package/lib/components/icon-button/icon-button.style.js +1 -0
- package/lib/components/inline-inputs/inline-inputs.style.js +18 -0
- package/lib/components/link/link.style.js +1 -0
- package/lib/components/link-preview/__internal__/placeholder.component.d.ts +3 -1
- package/lib/components/link-preview/__internal__/placeholder.component.js +6 -1
- package/lib/components/link-preview/link-preview.style.js +1 -0
- package/lib/components/loader/loader-square.style.js +5 -0
- package/lib/components/loader-bar/loader-bar.style.js +1 -0
- package/lib/components/menu/__internal__/submenu/submenu.style.js +13 -0
- package/lib/components/menu/menu.style.js +13 -6
- package/lib/components/menu/scrollable-block/scrollable-block.style.js +18 -0
- package/lib/components/message/message.style.js +2 -0
- package/lib/components/multi-action-button/multi-action-button.style.js +5 -0
- package/lib/components/note/note.style.js +1 -0
- package/lib/components/numeral-date/numeral-date.component.js +2 -0
- package/lib/components/numeral-date/numeral-date.style.d.ts +1 -0
- package/lib/components/numeral-date/numeral-date.style.js +12 -0
- package/lib/components/pager/pager.component.js +5 -5
- package/lib/components/pager/pager.style.js +2 -0
- package/lib/components/pill/pill.component.d.ts +3 -1
- package/lib/components/pill/pill.component.js +1 -0
- package/lib/components/pill/pill.style.js +5 -15
- package/lib/components/pod/pod.style.js +6 -0
- package/lib/components/popover-container/popover-container.style.js +1 -0
- package/lib/components/portrait/portrait-gravatar.component.js +1 -1
- package/lib/components/portrait/portrait-initials.component.js +1 -1
- package/lib/components/portrait/portrait.component.js +1 -1
- package/lib/components/portrait/portrait.style.js +1 -3
- package/lib/components/profile/profile.component.js +1 -1
- package/lib/components/progress-tracker/progress-tracker.style.js +2 -2
- package/lib/components/radio-button/radio-button.style.js +1 -1
- package/lib/components/search/search-button.style.js +5 -0
- package/lib/components/search/search.style.js +7 -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-container.style.js +1 -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/split-button/split-button-children.style.d.ts +1 -0
- package/lib/components/split-button/split-button-children.style.js +30 -1
- package/lib/components/split-button/split-button-toggle.style.js +6 -1
- package/lib/components/split-button/split-button.style.js +5 -2
- package/lib/components/switch/__internal__/switch-slider.style.js +1 -2
- package/lib/components/tabs/__internal__/tab-title/tab-title.component.js +1 -0
- package/lib/components/tabs/__internal__/tab-title/tab-title.style.js +22 -2
- package/lib/components/tabs/__internal__/tabs-header/tabs-header.style.js +5 -0
- package/lib/components/text-editor/__internal__/toolbar/toolbar-button/toolbar-button.style.js +3 -0
- package/lib/components/text-editor/text-editor.style.js +3 -0
- package/lib/components/tile/tile.component.d.ts +3 -1
- package/lib/components/tile/tile.component.js +3 -1
- package/lib/components/tile/tile.style.d.ts +1 -1
- package/lib/components/tile/tile.style.js +4 -1
- package/lib/components/tile-select/tile-select.style.d.ts +1 -0
- package/lib/components/tile-select/tile-select.style.js +8 -0
- package/lib/components/tooltip/tooltip.style.js +1 -0
- package/lib/components/vertical-menu/vertical-menu.style.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
|
@@ -31,13 +31,13 @@ var _getNextIndexByKey = _interopRequireDefault(require("../utils/get-next-index
|
|
|
31
31
|
|
|
32
32
|
var _isNavigationKey = _interopRequireDefault(require("../utils/is-navigation-key"));
|
|
33
33
|
|
|
34
|
-
var _listActionButton = _interopRequireDefault(require("../list-action-button
|
|
34
|
+
var _listActionButton = _interopRequireDefault(require("../list-action-button"));
|
|
35
35
|
|
|
36
36
|
var _selectListContainer = _interopRequireDefault(require("./select-list-container.style"));
|
|
37
37
|
|
|
38
38
|
var _loader = _interopRequireDefault(require("../../loader"));
|
|
39
39
|
|
|
40
|
-
var _option = _interopRequireDefault(require("../option
|
|
40
|
+
var _option = _interopRequireDefault(require("../option"));
|
|
41
41
|
|
|
42
42
|
var _guid = _interopRequireDefault(require("../../../__internal__/utils/helpers/guid"));
|
|
43
43
|
|
|
@@ -53,7 +53,7 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
|
|
|
53
53
|
|
|
54
54
|
const TABLE_HEADER_HEIGHT = 48;
|
|
55
55
|
const SCROLL_OPTIONS = {
|
|
56
|
-
|
|
56
|
+
behavior: "auto",
|
|
57
57
|
align: "end"
|
|
58
58
|
};
|
|
59
59
|
|
|
@@ -88,9 +88,9 @@ const SelectList = /*#__PURE__*/_react.default.forwardRef(({
|
|
|
88
88
|
const [currentOptionsListIndex, setCurrentOptionsListIndex] = (0, _react.useState)(-1);
|
|
89
89
|
const [scrollbarWidth, setScrollbarWidth] = (0, _react.useState)(0);
|
|
90
90
|
const lastFilter = (0, _react.useRef)("");
|
|
91
|
-
const listRef = (0, _react.useRef)();
|
|
92
|
-
const tableRef = (0, _react.useRef)();
|
|
93
|
-
const listActionButtonRef = (0, _react.useRef)();
|
|
91
|
+
const listRef = (0, _react.useRef)(null);
|
|
92
|
+
const tableRef = (0, _react.useRef)(null);
|
|
93
|
+
const listActionButtonRef = (0, _react.useRef)(null);
|
|
94
94
|
const {
|
|
95
95
|
blockScroll,
|
|
96
96
|
allowScroll
|
|
@@ -121,11 +121,13 @@ const SelectList = /*#__PURE__*/_react.default.forwardRef(({
|
|
|
121
121
|
}, [allowScroll, blockScroll, isOpen]);
|
|
122
122
|
(0, _react.useLayoutEffect)(() => {
|
|
123
123
|
if (multiColumn) {
|
|
124
|
-
setScrollbarWidth(tableRef.current.offsetWidth - tableRef.current.clientWidth
|
|
124
|
+
setScrollbarWidth(tableRef.current ? tableRef.current.offsetWidth - tableRef.current.clientWidth :
|
|
125
|
+
/* istanbul ignore next */
|
|
126
|
+
0);
|
|
125
127
|
}
|
|
126
128
|
}, [multiColumn]);
|
|
127
129
|
const anchorRef = (0, _react.useMemo)(() => ({
|
|
128
|
-
current: anchorElement
|
|
130
|
+
current: anchorElement || null
|
|
129
131
|
}), [anchorElement]);
|
|
130
132
|
const handleSelect = (0, _react.useCallback)(optionData => {
|
|
131
133
|
onSelect({ ...optionData,
|
|
@@ -136,7 +138,9 @@ const SelectList = /*#__PURE__*/_react.default.forwardRef(({
|
|
|
136
138
|
// as that isn't absolutely guaranteed to never rerun when dependencies haven't changed.
|
|
137
139
|
|
|
138
140
|
const setChildIds = () => {
|
|
139
|
-
childIdsRef.current = _react.default.Children.map(children, () => (0, _guid.default)())
|
|
141
|
+
childIdsRef.current = _react.default.Children.map(children, () => (0, _guid.default)()) ||
|
|
142
|
+
/* istanbul ignore next */
|
|
143
|
+
null;
|
|
140
144
|
};
|
|
141
145
|
|
|
142
146
|
if (((_childIdsRef$current = childIdsRef.current) === null || _childIdsRef$current === void 0 ? void 0 : _childIdsRef$current.length) !== _react.default.Children.count(children)) {
|
|
@@ -145,7 +149,7 @@ const SelectList = /*#__PURE__*/_react.default.forwardRef(({
|
|
|
145
149
|
|
|
146
150
|
const childIds = childIdsRef.current;
|
|
147
151
|
const childrenList = (0, _react.useMemo)(() => _react.default.Children.toArray(children), [children]);
|
|
148
|
-
const optionChildrenList = (0, _react.useMemo)(() => childrenList.filter(child => child.type === _option.default || child.type === _optionRow.default), [childrenList]);
|
|
152
|
+
const optionChildrenList = (0, _react.useMemo)(() => childrenList.filter(child => /*#__PURE__*/_react.default.isValidElement(child) && (child.type === _option.default || child.type === _optionRow.default)), [childrenList]);
|
|
149
153
|
const {
|
|
150
154
|
measureElement
|
|
151
155
|
} = virtualizer;
|
|
@@ -164,7 +168,7 @@ const SelectList = /*#__PURE__*/_react.default.forwardRef(({
|
|
|
164
168
|
} = item;
|
|
165
169
|
const child = childrenList[index];
|
|
166
170
|
|
|
167
|
-
if (!child) {
|
|
171
|
+
if (! /*#__PURE__*/_react.default.isValidElement(child)) {
|
|
168
172
|
return child;
|
|
169
173
|
}
|
|
170
174
|
|
|
@@ -172,7 +176,9 @@ const SelectList = /*#__PURE__*/_react.default.forwardRef(({
|
|
|
172
176
|
const isOption = optionChildIndex > -1;
|
|
173
177
|
const newProps = {
|
|
174
178
|
index,
|
|
175
|
-
id: childIds[index]
|
|
179
|
+
id: childIds ? childIds[index] :
|
|
180
|
+
/* istanbul ignore next */
|
|
181
|
+
undefined,
|
|
176
182
|
onSelect: handleSelect,
|
|
177
183
|
hidden: isLoading && childrenList.length === 1,
|
|
178
184
|
// these need to be inline styles rather than implemented in styled-components to avoid it generating thousands of classes
|
|
@@ -187,20 +193,20 @@ const SelectList = /*#__PURE__*/_react.default.forwardRef(({
|
|
|
187
193
|
};
|
|
188
194
|
return /*#__PURE__*/_react.default.cloneElement(child, newProps);
|
|
189
195
|
});
|
|
190
|
-
const lastOptionIndex = (0, _findLastIndex.default)(childrenList, child => child.type === _option.default || child.type === _optionRow.default);
|
|
196
|
+
const lastOptionIndex = (0, _findLastIndex.default)(childrenList, child => /*#__PURE__*/_react.default.isValidElement(child) && (child.type === _option.default || child.type === _optionRow.default));
|
|
191
197
|
const getNextHighlightableItemIndex = (0, _react.useCallback)((key, indexOfHighlighted) => {
|
|
192
198
|
const lastIndex = lastOptionIndex;
|
|
193
199
|
let nextIndex = (0, _getNextIndexByKey.default)(key, indexOfHighlighted, lastIndex, isLoading);
|
|
194
200
|
const nextElement = childrenList[nextIndex];
|
|
195
201
|
|
|
196
|
-
if (nextElement && nextElement.type !== _option.default && nextElement.type !== _optionRow.default) {
|
|
197
|
-
nextIndex = getNextHighlightableItemIndex(key, nextIndex
|
|
202
|
+
if ( /*#__PURE__*/_react.default.isValidElement(nextElement) && nextElement.type !== _option.default && nextElement.type !== _optionRow.default) {
|
|
203
|
+
nextIndex = getNextHighlightableItemIndex(key, nextIndex);
|
|
198
204
|
}
|
|
199
205
|
|
|
200
206
|
return nextIndex;
|
|
201
207
|
}, [childrenList, lastOptionIndex, isLoading]);
|
|
202
208
|
const getIndexOfMatch = (0, _react.useCallback)(valueToMatch => {
|
|
203
|
-
return childrenList.findIndex(child => child.props.value === valueToMatch);
|
|
209
|
+
return childrenList.findIndex(child => /*#__PURE__*/_react.default.isValidElement(child) && child.props.value === valueToMatch);
|
|
204
210
|
}, [childrenList]);
|
|
205
211
|
const highlightNextItem = (0, _react.useCallback)(key => {
|
|
206
212
|
let currentIndex = currentOptionsListIndex;
|
|
@@ -224,7 +230,9 @@ const SelectList = /*#__PURE__*/_react.default.forwardRef(({
|
|
|
224
230
|
text,
|
|
225
231
|
value,
|
|
226
232
|
selectionType: "navigationKey",
|
|
227
|
-
id: childIds[nextIndex]
|
|
233
|
+
id: childIds ? childIds[nextIndex] :
|
|
234
|
+
/* istanbul ignore next */
|
|
235
|
+
undefined
|
|
228
236
|
});
|
|
229
237
|
}, [childrenList, currentOptionsListIndex, getIndexOfMatch, getNextHighlightableItemIndex, highlightedValue, onSelect, childIds]);
|
|
230
238
|
const handleActionButtonTab = (0, _react.useCallback)((event, isActionButtonFocused) => {
|
|
@@ -233,8 +241,10 @@ const SelectList = /*#__PURE__*/_react.default.forwardRef(({
|
|
|
233
241
|
selectionType: "tab"
|
|
234
242
|
});
|
|
235
243
|
} else {
|
|
244
|
+
var _listActionButtonRef$;
|
|
245
|
+
|
|
236
246
|
event.preventDefault();
|
|
237
|
-
listActionButtonRef.current
|
|
247
|
+
(_listActionButtonRef$ = listActionButtonRef.current) === null || _listActionButtonRef$ === void 0 ? void 0 : _listActionButtonRef$.focus();
|
|
238
248
|
}
|
|
239
249
|
}, [onSelect]);
|
|
240
250
|
const focusOnAnchor = (0, _react.useCallback)(() => {
|
|
@@ -260,7 +270,7 @@ const SelectList = /*#__PURE__*/_react.default.forwardRef(({
|
|
|
260
270
|
event.preventDefault();
|
|
261
271
|
const currentOption = childrenList[currentOptionsListIndex];
|
|
262
272
|
|
|
263
|
-
if (!currentOption) {
|
|
273
|
+
if (! /*#__PURE__*/_react.default.isValidElement(currentOption)) {
|
|
264
274
|
onSelectListClose();
|
|
265
275
|
return;
|
|
266
276
|
}
|
|
@@ -270,7 +280,9 @@ const SelectList = /*#__PURE__*/_react.default.forwardRef(({
|
|
|
270
280
|
value
|
|
271
281
|
} = currentOption.props;
|
|
272
282
|
onSelect({
|
|
273
|
-
id: childIds[currentOptionsListIndex]
|
|
283
|
+
id: childIds ? childIds[currentOptionsListIndex] :
|
|
284
|
+
/* istanbul ignore next */
|
|
285
|
+
undefined,
|
|
274
286
|
text,
|
|
275
287
|
value,
|
|
276
288
|
selectionType: "enterKey"
|
|
@@ -286,7 +298,7 @@ const SelectList = /*#__PURE__*/_react.default.forwardRef(({
|
|
|
286
298
|
}
|
|
287
299
|
}, [onSelectListClose]);
|
|
288
300
|
(0, _useModalManager.default)({
|
|
289
|
-
open: isOpen,
|
|
301
|
+
open: !!isOpen,
|
|
290
302
|
closeModal: handleEscapeKey,
|
|
291
303
|
modalRef: listRef,
|
|
292
304
|
triggerRefocusOnClose: false
|
|
@@ -303,15 +315,15 @@ const SelectList = /*#__PURE__*/_react.default.forwardRef(({
|
|
|
303
315
|
const keyboardEvent = "keydown";
|
|
304
316
|
const listElement = listContainerRef.current;
|
|
305
317
|
window.addEventListener(keyboardEvent, handleGlobalKeydown);
|
|
306
|
-
listElement.addEventListener("scroll", handleListScroll);
|
|
318
|
+
listElement === null || listElement === void 0 ? void 0 : listElement.addEventListener("scroll", handleListScroll);
|
|
307
319
|
return function cleanup() {
|
|
308
320
|
window.removeEventListener(keyboardEvent, handleGlobalKeydown);
|
|
309
|
-
listElement.removeEventListener("scroll", handleListScroll);
|
|
321
|
+
listElement === null || listElement === void 0 ? void 0 : listElement.removeEventListener("scroll", handleListScroll);
|
|
310
322
|
};
|
|
311
323
|
}, [handleGlobalKeydown, handleListScroll, listContainerRef]);
|
|
312
324
|
(0, _react.useEffect)(() => {
|
|
313
325
|
if (!filterText || filterText === lastFilter.current) {
|
|
314
|
-
lastFilter.current = filterText;
|
|
326
|
+
lastFilter.current = filterText || "";
|
|
315
327
|
return;
|
|
316
328
|
}
|
|
317
329
|
|
|
@@ -384,9 +396,9 @@ const SelectList = /*#__PURE__*/_react.default.forwardRef(({
|
|
|
384
396
|
};
|
|
385
397
|
(0, _react.useLayoutEffect)(() => {
|
|
386
398
|
if (listActionButton && isOpen) {
|
|
387
|
-
var _listActionButtonRef
|
|
399
|
+
var _listActionButtonRef$2, _listActionButtonRef$3;
|
|
388
400
|
|
|
389
|
-
actionButtonHeight.current = ((_listActionButtonRef$ = listActionButtonRef.current) === null || _listActionButtonRef$ === void 0 ? void 0 : (_listActionButtonRef$
|
|
401
|
+
actionButtonHeight.current = ((_listActionButtonRef$2 = listActionButtonRef.current) === null || _listActionButtonRef$2 === void 0 ? void 0 : (_listActionButtonRef$3 = _listActionButtonRef$2.parentElement) === null || _listActionButtonRef$3 === void 0 ? void 0 : _listActionButtonRef$3.offsetHeight) || 0;
|
|
390
402
|
}
|
|
391
403
|
}, [listActionButton, isOpen]);
|
|
392
404
|
|
|
@@ -423,7 +435,7 @@ const SelectList = /*#__PURE__*/_react.default.forwardRef(({
|
|
|
423
435
|
"data-element": "select-list"
|
|
424
436
|
}, multiColumn ? {} : listBoxProps, {
|
|
425
437
|
ref: listRef,
|
|
426
|
-
tabIndex:
|
|
438
|
+
tabIndex: -1,
|
|
427
439
|
listHeight: multiColumn ? undefined : listHeight
|
|
428
440
|
}), selectListContent), isLoading && loader(), listActionButton && /*#__PURE__*/_react.default.createElement(_listActionButton.default, {
|
|
429
441
|
ref: listActionButtonRef,
|
|
@@ -433,79 +445,36 @@ const SelectList = /*#__PURE__*/_react.default.forwardRef(({
|
|
|
433
445
|
});
|
|
434
446
|
|
|
435
447
|
SelectList.propTypes = {
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
children: _propTypes.default.node,
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
/** Maximum list height - defaults to 180 */
|
|
467
|
-
listMaxHeight: _propTypes.default.number,
|
|
468
|
-
|
|
469
|
-
/** A callback for when the Action Button is triggered */
|
|
470
|
-
onListAction: _propTypes.default.func,
|
|
471
|
-
|
|
472
|
-
/** If true the loader animation is displayed below the last option */
|
|
473
|
-
isLoading: _propTypes.default.bool,
|
|
474
|
-
|
|
475
|
-
/** A callback that is triggered when a user scrolls to the bottom of the list */
|
|
476
|
-
onListScrollBottom: _propTypes.default.func,
|
|
477
|
-
|
|
478
|
-
/** SelectList table header, should consist of multiple th elements. Works only in multiColumn mode */
|
|
479
|
-
tableHeader: _propTypes.default.node,
|
|
480
|
-
|
|
481
|
-
/** When true component will work in multi column mode, children should consist of OptionRow components in this mode */
|
|
482
|
-
multiColumn: _propTypes.default.bool,
|
|
483
|
-
|
|
484
|
-
/** Data role for loader component */
|
|
485
|
-
loaderDataRole: _propTypes.default.string,
|
|
486
|
-
|
|
487
|
-
/** Placement of the select list relative to the input element */
|
|
488
|
-
listPlacement: _propTypes.default.oneOf(["top", "bottom", "right", "left"]),
|
|
489
|
-
|
|
490
|
-
/** Use the opposite list placement if the set placement does not fit */
|
|
491
|
-
flipEnabled: _propTypes.default.bool,
|
|
492
|
-
|
|
493
|
-
/** @private @ignore
|
|
494
|
-
* Hides the list (with CSS display: none) if not set
|
|
495
|
-
*/
|
|
496
|
-
isOpen: _propTypes.default.bool,
|
|
497
|
-
|
|
498
|
-
/** array of selected values, if rendered as part of a MultiSelect */
|
|
499
|
-
multiselectValues: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.string), _propTypes.default.arrayOf(_propTypes.default.object)]),
|
|
500
|
-
|
|
501
|
-
/** Set this prop to enable a virtualised list of options. If it is not used then all options will be in the
|
|
502
|
-
* DOM at all times, which may cause performance problems on very large lists */
|
|
503
|
-
enableVirtualScroll: _propTypes.default.bool,
|
|
504
|
-
|
|
505
|
-
/** The number of options to render into the DOM at once, either side of the currently-visible ones.
|
|
506
|
-
* Higher values make for smoother scrolling but may impact performance.
|
|
507
|
-
* Only used if the `enableVirtualScroll` prop is set. */
|
|
508
|
-
virtualScrollOverscan: _propTypes.default.number
|
|
448
|
+
"anchorElement": function (props, propName) {
|
|
449
|
+
if (props[propName] == null) {
|
|
450
|
+
return null;
|
|
451
|
+
} else if (typeof props[propName] !== 'object' || props[propName].nodeType !== 1) {
|
|
452
|
+
return new Error("Expected prop '" + propName + "' to be of type Element");
|
|
453
|
+
}
|
|
454
|
+
},
|
|
455
|
+
"children": _propTypes.default.node,
|
|
456
|
+
"disablePortal": _propTypes.default.bool,
|
|
457
|
+
"enableVirtualScroll": _propTypes.default.bool,
|
|
458
|
+
"filterText": _propTypes.default.string,
|
|
459
|
+
"flipEnabled": _propTypes.default.bool,
|
|
460
|
+
"highlightedValue": _propTypes.default.oneOfType([_propTypes.default.object, _propTypes.default.string]),
|
|
461
|
+
"id": _propTypes.default.string,
|
|
462
|
+
"isLoading": _propTypes.default.bool,
|
|
463
|
+
"isOpen": _propTypes.default.bool,
|
|
464
|
+
"labelId": _propTypes.default.string,
|
|
465
|
+
"listActionButton": _propTypes.default.node,
|
|
466
|
+
"listMaxHeight": _propTypes.default.number,
|
|
467
|
+
"listPlacement": _propTypes.default.oneOf(["bottom", "left", "right", "top"]),
|
|
468
|
+
"loaderDataRole": _propTypes.default.string,
|
|
469
|
+
"multiColumn": _propTypes.default.bool,
|
|
470
|
+
"multiselectValues": _propTypes.default.arrayOf(_propTypes.default.string),
|
|
471
|
+
"onListAction": _propTypes.default.func,
|
|
472
|
+
"onListScrollBottom": _propTypes.default.func,
|
|
473
|
+
"onMouseDown": _propTypes.default.func,
|
|
474
|
+
"onSelect": _propTypes.default.func.isRequired,
|
|
475
|
+
"onSelectListClose": _propTypes.default.func.isRequired,
|
|
476
|
+
"tableHeader": _propTypes.default.node,
|
|
477
|
+
"virtualScrollOverscan": _propTypes.default.number
|
|
509
478
|
};
|
|
510
479
|
var _default = SelectList;
|
|
511
480
|
exports.default = _default;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
interface StyledSelectListProps {
|
|
2
|
+
listHeight?: number;
|
|
3
|
+
}
|
|
4
|
+
declare const StyledSelectList: import("styled-components").StyledComponent<"ul", any, StyledSelectListProps, never>;
|
|
5
|
+
declare const StyledSelectLoaderContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
6
|
+
declare const StyledSelectListTable: import("styled-components").StyledComponent<"table", any, {}, never>;
|
|
7
|
+
interface StyledSelectListTableHeaderProps {
|
|
8
|
+
scrollbarWidth: number;
|
|
9
|
+
}
|
|
10
|
+
declare const StyledSelectListTableHeader: import("styled-components").StyledComponent<"thead", any, StyledSelectListTableHeaderProps, never>;
|
|
11
|
+
declare const StyledSelectListTableBody: import("styled-components").StyledComponent<"tbody", any, StyledSelectListProps, never>;
|
|
12
|
+
export { StyledSelectList, StyledSelectLoaderContainer, StyledSelectListTable, StyledSelectListTableHeader, StyledSelectListTableBody, };
|
|
@@ -55,9 +55,9 @@ const StyledSelectListTable = _styledComponents.default.table`
|
|
|
55
55
|
width: 100%;
|
|
56
56
|
table-layout: fixed;
|
|
57
57
|
}
|
|
58
|
-
`;
|
|
59
|
-
|
|
58
|
+
`;
|
|
60
59
|
exports.StyledSelectListTable = StyledSelectListTable;
|
|
60
|
+
// TODO (design-tokens): to match current style for border bottom colorsUtilityMajor100
|
|
61
61
|
const StyledSelectListTableHeader = _styledComponents.default.thead`
|
|
62
62
|
border-bottom: 1px solid var(--colorsUtilityMajor050);
|
|
63
63
|
position: sticky;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export { default } from "./select-textbox";
|
|
1
|
+
export { default } from "./select-textbox.component";
|
|
2
|
+
export type { SelectTextboxProps, FormInputPropTypes, } from "./select-textbox.component";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "default", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _selectTextbox.default;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
var _selectTextbox = _interopRequireDefault(require("./select-textbox.component"));
|
|
14
|
+
|
|
15
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { CommonTextboxProps } from "../../textbox";
|
|
3
|
+
import { ValidationProps } from "../../../__internal__/validations";
|
|
4
|
+
export interface FormInputPropTypes extends ValidationProps, Omit<CommonTextboxProps, "onClick"> {
|
|
5
|
+
/** Breakpoint for adaptive label (inline labels change to top aligned). Enables the adaptive behaviour when set */
|
|
6
|
+
adaptiveLabelBreakpoint?: number;
|
|
7
|
+
/** Prop to specify the aria-label attribute of the component input */
|
|
8
|
+
ariaLabel?: string;
|
|
9
|
+
/** Prop to specify the aria-labeledby property of the component input */
|
|
10
|
+
ariaLabelledby?: string;
|
|
11
|
+
/** If true the Component will be focused when rendered */
|
|
12
|
+
autoFocus?: boolean;
|
|
13
|
+
/** If true, the component will be disabled */
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
/** Id attribute of the input element */
|
|
16
|
+
id?: string;
|
|
17
|
+
/** The width of the input as a percentage */
|
|
18
|
+
inputWidth?: number;
|
|
19
|
+
/** Label content */
|
|
20
|
+
label?: string;
|
|
21
|
+
/** A message that the Help component will display */
|
|
22
|
+
labelHelp?: React.ReactNode;
|
|
23
|
+
/** When true label is inline */
|
|
24
|
+
labelInline?: boolean;
|
|
25
|
+
/** Label width */
|
|
26
|
+
labelWidth?: number;
|
|
27
|
+
/** Name attribute of the input element */
|
|
28
|
+
name?: string;
|
|
29
|
+
/** Specify a callback triggered on blur */
|
|
30
|
+
onBlur?: (ev: React.FocusEvent<HTMLInputElement>) => void;
|
|
31
|
+
/** Specify a callback triggered on change */
|
|
32
|
+
onChange?: (ev: React.ChangeEvent<HTMLInputElement>) => void;
|
|
33
|
+
/** Specify a callback triggered on click */
|
|
34
|
+
onClick?: (ev: React.MouseEvent<HTMLInputElement>) => void;
|
|
35
|
+
/** Specify a callback triggered on focus */
|
|
36
|
+
onFocus?: (ev: React.FocusEvent<HTMLInputElement>) => void;
|
|
37
|
+
/** pecify a callback triggered on keuyDown */
|
|
38
|
+
onKeyDown?: (ev: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
39
|
+
/** Placeholder string to be displayed in input */
|
|
40
|
+
placeholder?: string;
|
|
41
|
+
/** Flag to configure component as mandatory */
|
|
42
|
+
required?: boolean;
|
|
43
|
+
/** If true, the component will be read-only */
|
|
44
|
+
readOnly?: boolean;
|
|
45
|
+
/** Size of an input */
|
|
46
|
+
size?: "small" | "medium" | "large";
|
|
47
|
+
/**
|
|
48
|
+
* Id of the element containing the currently displayed value
|
|
49
|
+
* to be read by voice readers
|
|
50
|
+
* @private
|
|
51
|
+
* @ignore
|
|
52
|
+
*/
|
|
53
|
+
accessibilityLabelId?: string;
|
|
54
|
+
/**
|
|
55
|
+
* Label id passed from Select component
|
|
56
|
+
* @private
|
|
57
|
+
* @ignore
|
|
58
|
+
*
|
|
59
|
+
*/
|
|
60
|
+
labelId?: string;
|
|
61
|
+
}
|
|
62
|
+
export interface SelectTextboxProps extends FormInputPropTypes {
|
|
63
|
+
/** Id attribute of the select list */
|
|
64
|
+
"aria-controls"?: string;
|
|
65
|
+
/** Value to be displayed in the Textbox */
|
|
66
|
+
formattedValue?: string;
|
|
67
|
+
/** If true, the input will be displayed */
|
|
68
|
+
hasTextCursor?: boolean;
|
|
69
|
+
/** If true, the list is displayed */
|
|
70
|
+
isOpen?: boolean;
|
|
71
|
+
/** Value of the Select Input */
|
|
72
|
+
selectedValue?: string | Record<string, unknown> | string[] | Record<string, unknown>[];
|
|
73
|
+
/** @private @ignore */
|
|
74
|
+
textboxRef?: HTMLInputElement | null;
|
|
75
|
+
/** @private @ignore */
|
|
76
|
+
transparent?: boolean;
|
|
77
|
+
/** @private @ignore */
|
|
78
|
+
activeDescendantId?: string;
|
|
79
|
+
}
|
|
80
|
+
declare const SelectTextbox: React.ForwardRefExoticComponent<SelectTextboxProps & React.RefAttributes<HTMLInputElement>>;
|
|
81
|
+
export default SelectTextbox;
|