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
|
@@ -20,12 +20,16 @@ const StyledMenuWrapper = styled.ul`
|
|
|
20
20
|
display: inline-block;
|
|
21
21
|
vertical-align: bottom;
|
|
22
22
|
background-color: ${menuConfigVariants[menuType].background};
|
|
23
|
-
|
|
24
23
|
${menuType === "dark" && css`
|
|
25
|
-
|
|
24
|
+
display: inline-block;
|
|
25
|
+
vertical-align: bottom;
|
|
26
|
+
background-color: ${menuConfigVariants[menuType].background};
|
|
27
|
+
|
|
28
|
+
${menuType === "dark" && css`
|
|
29
|
+
color: ${menuConfigVariants[menuType].color};
|
|
30
|
+
`}
|
|
26
31
|
`}
|
|
27
32
|
`}
|
|
28
|
-
|
|
29
33
|
${StyledDivider} {
|
|
30
34
|
position: relative;
|
|
31
35
|
top: -1px;
|
|
@@ -35,7 +39,11 @@ const StyledMenuWrapper = styled.ul`
|
|
|
35
39
|
const StyledMenuItem = styled.li`
|
|
36
40
|
${layout}
|
|
37
41
|
${flexbox}
|
|
38
|
-
|
|
42
|
+
|
|
43
|
+
${StyledLink} a:focus, ${StyledLink} button:focus {
|
|
44
|
+
border-radius: var(--borderRadius000);
|
|
45
|
+
}
|
|
46
|
+
|
|
39
47
|
${({
|
|
40
48
|
inSubmenu
|
|
41
49
|
}) => css`
|
|
@@ -43,8 +51,7 @@ const StyledMenuItem = styled.li`
|
|
|
43
51
|
display: list-item;
|
|
44
52
|
`}
|
|
45
53
|
`}
|
|
46
|
-
|
|
47
|
-
${({
|
|
54
|
+
${({
|
|
48
55
|
inFullscreenView
|
|
49
56
|
}) => inFullscreenView && css`
|
|
50
57
|
padding-top: 16px;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import styled, { css } from "styled-components";
|
|
2
2
|
import StyledMenuItemWrapper from "../menu-item/menu-item.style";
|
|
3
3
|
import menuConfigVariants from "../menu.config";
|
|
4
|
+
import Box from "../../box/box.component";
|
|
5
|
+
import { StyledMenuItem } from "../menu.style";
|
|
6
|
+
import { StyledLink } from "../../link/link.style";
|
|
4
7
|
const StyledScrollableBlock = styled.li`
|
|
5
8
|
${({
|
|
6
9
|
menuType,
|
|
@@ -9,6 +12,18 @@ const StyledScrollableBlock = styled.li`
|
|
|
9
12
|
&& ${StyledMenuItemWrapper} {
|
|
10
13
|
background-color: ${variant === "default" ? menuConfigVariants[menuType].submenuItemBackground : menuConfigVariants[menuType].alternate};
|
|
11
14
|
}
|
|
15
|
+
|
|
16
|
+
${Box} {
|
|
17
|
+
border-radius: var(--borderRadius000);
|
|
18
|
+
border-bottom-left-radius: var(--borderRadius100);
|
|
19
|
+
|
|
20
|
+
${StyledMenuItem}:last-child ${StyledLink},
|
|
21
|
+
${StyledMenuItem}:last-child a,
|
|
22
|
+
${StyledMenuItem}:last-child button {
|
|
23
|
+
border-bottom-left-radius: var(--borderRadius100);
|
|
24
|
+
border-bottom-right-radius: var(--borderRadius000);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
12
27
|
`}
|
|
13
28
|
`;
|
|
14
29
|
export default StyledScrollableBlock;
|
|
@@ -4,6 +4,7 @@ import StyledButton from "../button/button.style";
|
|
|
4
4
|
import baseTheme from "../../style/themes/base";
|
|
5
5
|
import StyledIcon from "../icon/icon.style";
|
|
6
6
|
import computeWidth from "../../style/utils/width";
|
|
7
|
+
import { borderRadiusStyling } from "../split-button/split-button-children.style";
|
|
7
8
|
const StyledMultiActionButton = styled.div`
|
|
8
9
|
${margin}
|
|
9
10
|
|
|
@@ -71,12 +72,15 @@ const StyledButtonChildrenContainer = styled.div`
|
|
|
71
72
|
white-space: nowrap;
|
|
72
73
|
z-index: ${theme.zIndex.popover};
|
|
73
74
|
box-shadow: var(--boxShadow100);
|
|
75
|
+
border-radius: var(--borderRadius100);
|
|
74
76
|
|
|
75
77
|
${StyledIcon} {
|
|
76
78
|
margin-left: 0;
|
|
77
79
|
left: 8px;
|
|
78
80
|
}
|
|
79
81
|
|
|
82
|
+
${borderRadiusStyling}
|
|
83
|
+
|
|
80
84
|
${StyledButton} {
|
|
81
85
|
border: 1px solid var(--colorsActionMajorTransparent);
|
|
82
86
|
display: flex;
|
|
@@ -110,6 +110,7 @@ const StyledNote = styled.div`
|
|
|
110
110
|
}) => css`
|
|
111
111
|
background-color: var(--colorsUtilityYang100);
|
|
112
112
|
border: 1px solid var(--colorsUtilityMajor100);
|
|
113
|
+
border-radius: var(--borderRadius100);
|
|
113
114
|
display: flex;
|
|
114
115
|
flex-direction: column;
|
|
115
116
|
padding: 24px;
|
|
@@ -194,6 +194,7 @@ const NumeralDate = ({
|
|
|
194
194
|
onKeyPress: onKeyPress,
|
|
195
195
|
"data-component": "numeral-date"
|
|
196
196
|
}, dateFormat.map((datePart, index) => {
|
|
197
|
+
const isStart = index === 0;
|
|
197
198
|
const isEnd = index === dateFormat.length - 1;
|
|
198
199
|
const isMiddle = index === 1;
|
|
199
200
|
const validation = error || warning || info;
|
|
@@ -228,6 +229,7 @@ const NumeralDate = ({
|
|
|
228
229
|
}, /*#__PURE__*/React.createElement(StyledDateField, {
|
|
229
230
|
key: datePart,
|
|
230
231
|
isYearInput: datePart.length === 4,
|
|
232
|
+
isStart: isStart,
|
|
231
233
|
isMiddle: isMiddle,
|
|
232
234
|
isEnd: isEnd,
|
|
233
235
|
hasValidationIcon: hasValidationIcon
|
|
@@ -18,6 +18,7 @@ export const StyledNumeralDate = styled.div`
|
|
|
18
18
|
`;
|
|
19
19
|
export const StyledDateField = styled.div`
|
|
20
20
|
${({
|
|
21
|
+
isStart,
|
|
21
22
|
isYearInput,
|
|
22
23
|
isEnd,
|
|
23
24
|
hasValidationIcon,
|
|
@@ -29,6 +30,17 @@ export const StyledDateField = styled.div`
|
|
|
29
30
|
position: relative;
|
|
30
31
|
width: ${yearInputOrError ? "78px;" : "58px;"};
|
|
31
32
|
text-align: center;
|
|
33
|
+
border-radius: var(--borderRadius000);
|
|
34
|
+
|
|
35
|
+
${isStart && css`
|
|
36
|
+
border-top-left-radius: var(--borderRadius050);
|
|
37
|
+
border-bottom-left-radius: var(--borderRadius050);
|
|
38
|
+
`}
|
|
39
|
+
|
|
40
|
+
${isEnd && css`
|
|
41
|
+
border-top-right-radius: var(--borderRadius050);
|
|
42
|
+
border-bottom-right-radius: var(--borderRadius050);
|
|
43
|
+
`}
|
|
32
44
|
|
|
33
45
|
${(isMiddle || isEnd) && css`
|
|
34
46
|
margin-left: -1px;
|
|
@@ -101,12 +101,12 @@ const Pager = ({
|
|
|
101
101
|
onPrevious(e);
|
|
102
102
|
}
|
|
103
103
|
}, [page, onPrevious]);
|
|
104
|
-
const handleOnPagination = useCallback(
|
|
105
|
-
setValue(
|
|
106
|
-
setCurrentPageSize(+
|
|
107
|
-
onPagination(1, +
|
|
104
|
+
const handleOnPagination = useCallback(selectedValue => {
|
|
105
|
+
setValue(selectedValue);
|
|
106
|
+
setCurrentPageSize(+selectedValue);
|
|
107
|
+
onPagination(1, +selectedValue, "page-select");
|
|
108
108
|
}, [onPagination]);
|
|
109
|
-
const handleKeyDown = useCallback(e => Events.isEnterKey(e) && handleOnPagination(e), [handleOnPagination]);
|
|
109
|
+
const handleKeyDown = useCallback(e => Events.isEnterKey(e) && handleOnPagination(e.target.value), [handleOnPagination]);
|
|
110
110
|
|
|
111
111
|
const sizeSelector = () => {
|
|
112
112
|
return /*#__PURE__*/React.createElement(StyledSelectContainer, null, /*#__PURE__*/React.createElement(Select, {
|
|
@@ -30,6 +30,8 @@ const StyledPagerContainer = styled.div`
|
|
|
30
30
|
}) => css`
|
|
31
31
|
border-width: 1px 1px 1px 1px;
|
|
32
32
|
border-style: none solid solid solid;
|
|
33
|
+
border-bottom-left-radius: var(--borderRadius100);
|
|
34
|
+
border-bottom-right-radius: var(--borderRadius100);
|
|
33
35
|
border-color: var(--colorsUtilityMajor100);
|
|
34
36
|
background-color: ${variant === "alternate" ? "var(--colorsUtilityMajor040)" : "var(--colorsUtilityMajor010)"};
|
|
35
37
|
`}
|
|
@@ -14,11 +14,13 @@ export interface PillProps extends StyledPillProps {
|
|
|
14
14
|
/** Callback function for when the pill is clicked. */
|
|
15
15
|
onClick?: (ev: React.MouseEvent<HTMLSpanElement>) => void;
|
|
16
16
|
/** Callback function for when the remove icon is clicked. */
|
|
17
|
-
onDelete?: (ev
|
|
17
|
+
onDelete?: (ev?: React.KeyboardEvent<HTMLButtonElement> | React.MouseEvent<HTMLButtonElement>) => void;
|
|
18
18
|
/** Sets the type of pill in use. */
|
|
19
19
|
pillRole?: "tag" | "status";
|
|
20
20
|
/** Sets custom aria-label attribute on the remove button */
|
|
21
21
|
ariaLabelOfRemoveButton?: string;
|
|
22
|
+
/** @private @ignore title attribute passed down to underlying element */
|
|
23
|
+
title?: string;
|
|
22
24
|
}
|
|
23
25
|
export declare const Pill: ({ wrapText, borderColor, colorVariant, children, fill, maxWidth, onClick, onDelete, pillRole, size, ariaLabelOfRemoveButton, ...rest }: PillProps) => JSX.Element;
|
|
24
26
|
export default Pill;
|
|
@@ -60,7 +60,6 @@ const StyledPill = styled.span`
|
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
return css`
|
|
63
|
-
border-radius: 12px;
|
|
64
63
|
font-size: 10px;
|
|
65
64
|
letter-spacing: 0.7px;
|
|
66
65
|
font-weight: 600;
|
|
@@ -70,6 +69,7 @@ const StyledPill = styled.span`
|
|
|
70
69
|
align-items: center;
|
|
71
70
|
justify-content: center;
|
|
72
71
|
border: 2px solid ${pillColor};
|
|
72
|
+
border-radius: var(--borderRadius025);
|
|
73
73
|
height: auto;
|
|
74
74
|
${!wrapText && css`
|
|
75
75
|
white-space: nowrap;
|
|
@@ -115,7 +115,7 @@ const StyledPill = styled.span`
|
|
|
115
115
|
${isDeletable && css`
|
|
116
116
|
button {
|
|
117
117
|
-webkit-appearance: none;
|
|
118
|
-
border-radius:
|
|
118
|
+
border-radius: var(--borderRadius000);
|
|
119
119
|
border: none;
|
|
120
120
|
bottom: 0;
|
|
121
121
|
font-size: 100%;
|
|
@@ -130,6 +130,9 @@ const StyledPill = styled.span`
|
|
|
130
130
|
outline: none;
|
|
131
131
|
box-shadow: 0 0 0 3px var(--colorsSemanticFocus500);
|
|
132
132
|
background-color: ${buttonFocusColor};
|
|
133
|
+
border-radius: var(--borderRadius000) var(--borderRadius025)
|
|
134
|
+
var(--borderRadius025) var(--borderRadius000);
|
|
135
|
+
|
|
133
136
|
& {
|
|
134
137
|
color: ${contentColor};
|
|
135
138
|
}
|
|
@@ -175,7 +178,6 @@ const StyledPill = styled.span`
|
|
|
175
178
|
|
|
176
179
|
button {
|
|
177
180
|
padding: 0;
|
|
178
|
-
border-radius: 0 8px 8px 0;
|
|
179
181
|
line-height: 14px;
|
|
180
182
|
|
|
181
183
|
${addStyleToPillIcon("7px")}
|
|
@@ -184,12 +186,10 @@ const StyledPill = styled.span`
|
|
|
184
186
|
|
|
185
187
|
${size === "M" && css`
|
|
186
188
|
padding: 0 32px 0 11px;
|
|
187
|
-
border-radius: 12px;
|
|
188
189
|
|
|
189
190
|
button {
|
|
190
191
|
width: 24px;
|
|
191
192
|
padding: 0;
|
|
192
|
-
border-radius: 0 10px 10px 0;
|
|
193
193
|
line-height: 15px;
|
|
194
194
|
|
|
195
195
|
${addStyleToPillIcon("10px")}
|
|
@@ -198,12 +198,10 @@ const StyledPill = styled.span`
|
|
|
198
198
|
|
|
199
199
|
${size === "L" && css`
|
|
200
200
|
padding: 0 36px 0 15px;
|
|
201
|
-
border-radius: 13px;
|
|
202
201
|
|
|
203
202
|
button {
|
|
204
203
|
width: 28px;
|
|
205
204
|
padding: 0;
|
|
206
|
-
border-radius: 0 11px 11px 0;
|
|
207
205
|
line-height: 16px;
|
|
208
206
|
|
|
209
207
|
${addStyleToPillIcon("12px")}
|
|
@@ -212,12 +210,10 @@ const StyledPill = styled.span`
|
|
|
212
210
|
|
|
213
211
|
${size === "XL" && css`
|
|
214
212
|
padding: 0 41px 0 19px;
|
|
215
|
-
border-radius: 15px;
|
|
216
213
|
|
|
217
214
|
button {
|
|
218
215
|
width: 32px;
|
|
219
216
|
padding: 0;
|
|
220
|
-
border-radius: 0 12px 12px 0;
|
|
221
217
|
line-height: 18px;
|
|
222
218
|
|
|
223
219
|
${addStyleToPillIcon("13px")}
|
|
@@ -236,34 +232,28 @@ const StyledPill = styled.span`
|
|
|
236
232
|
|
|
237
233
|
${size === "M" && css`
|
|
238
234
|
padding: 0 11px;
|
|
239
|
-
border-radius: 12px;
|
|
240
235
|
|
|
241
236
|
button {
|
|
242
237
|
width: 24px;
|
|
243
238
|
padding: 0;
|
|
244
|
-
border-radius: 0 8px 8px 0;
|
|
245
239
|
}
|
|
246
240
|
`}
|
|
247
241
|
|
|
248
242
|
${size === "L" && css`
|
|
249
243
|
padding: 0 15px;
|
|
250
|
-
border-radius: 13px;
|
|
251
244
|
|
|
252
245
|
button {
|
|
253
246
|
width: 28px;
|
|
254
247
|
padding: 0;
|
|
255
|
-
border-radius: 0 10px 10px 0;
|
|
256
248
|
}
|
|
257
249
|
`}
|
|
258
250
|
|
|
259
251
|
${size === "XL" && css`
|
|
260
252
|
padding: 0 19px;
|
|
261
|
-
border-radius: 15px;
|
|
262
253
|
|
|
263
254
|
button {
|
|
264
255
|
width: 32px;
|
|
265
256
|
padding: 0;
|
|
266
|
-
border-radius: 0 12px 12px 0;
|
|
267
257
|
}
|
|
268
258
|
`}
|
|
269
259
|
`}
|
|
@@ -40,6 +40,7 @@ const StyledBlock = styled.div`
|
|
|
40
40
|
isFocused
|
|
41
41
|
}) => css`
|
|
42
42
|
box-sizing: border-box;
|
|
43
|
+
border-radius: var(--borderRadius100);
|
|
43
44
|
display: flex;
|
|
44
45
|
flex-direction: column;
|
|
45
46
|
background-color: ${blockBackgrounds[variant]};
|
|
@@ -113,6 +114,8 @@ const StyledFooter = styled.div`
|
|
|
113
114
|
softDelete
|
|
114
115
|
}) => css`
|
|
115
116
|
background-color: var(--colorsUtilityMajor025);
|
|
117
|
+
border-bottom-left-radius: var(--borderRadius100);
|
|
118
|
+
border-bottom-right-radius: var(--borderRadius100);
|
|
116
119
|
box-shadow: inset 0px 1px 1px 0 rgba(0, 0, 0, 0.1);
|
|
117
120
|
color: var(--colorsUtilityYin090);
|
|
118
121
|
padding: ${footerPaddings[size]};
|
|
@@ -171,6 +174,7 @@ const StyledEditAction = styled.a`
|
|
|
171
174
|
display: flex;
|
|
172
175
|
align-items: center;
|
|
173
176
|
justify-content: center;
|
|
177
|
+
border-radius: var(--borderRadius100);
|
|
174
178
|
|
|
175
179
|
${StyledIcon} {
|
|
176
180
|
top: -2px;
|
|
@@ -227,6 +231,7 @@ const StyledDeleteButton = styled(IconButton)`
|
|
|
227
231
|
box-sizing: border-box;
|
|
228
232
|
height: ${`${actionButtonSizes[size]}px`};
|
|
229
233
|
width: ${`${actionButtonSizes[size]}px`};
|
|
234
|
+
border-radius: var(--borderRadius100);
|
|
230
235
|
|
|
231
236
|
${StyledIcon} {
|
|
232
237
|
top: -2px;
|
|
@@ -274,6 +279,7 @@ const StyledUndoButton = styled(IconButton)`
|
|
|
274
279
|
box-sizing: border-box;
|
|
275
280
|
height: ${`${actionButtonSizes[size]}px`};
|
|
276
281
|
width: ${`${actionButtonSizes[size]}px`};
|
|
282
|
+
border-radius: var(--borderRadius100);
|
|
277
283
|
|
|
278
284
|
${StyledIcon} {
|
|
279
285
|
top: -2px;
|
|
@@ -29,7 +29,7 @@ function stylingForShape({
|
|
|
29
29
|
}) {
|
|
30
30
|
let cssString = "overflow: hidden;";
|
|
31
31
|
if (shape === "square") cssString += "border-radius: 0px;";
|
|
32
|
-
if (shape === "circle") cssString += "border-radius:
|
|
32
|
+
if (shape === "circle") cssString += "border-radius: var(--borderRadiusCircle);";
|
|
33
33
|
return css`
|
|
34
34
|
${cssString}
|
|
35
35
|
`;
|
|
@@ -51,7 +51,6 @@ function stylingForIcon({
|
|
|
51
51
|
return css`
|
|
52
52
|
background-color: ${backgroundColor};
|
|
53
53
|
color: ${color};
|
|
54
|
-
|
|
55
54
|
::before {
|
|
56
55
|
font-size: ${params === null || params === void 0 ? void 0 : params.iconDimensions}px;
|
|
57
56
|
}
|
|
@@ -71,7 +70,6 @@ export const StyledPortraitInitials = styled.div`
|
|
|
71
70
|
${stylingForSize}
|
|
72
71
|
${stylingForShape}
|
|
73
72
|
outline: 1px solid var(--colorsUtilityMajor200);
|
|
74
|
-
|
|
75
73
|
/* Styling for safari. This ensures that there is no outline on the component but that a border is still present
|
|
76
74
|
to achieve the same styling as Chrome and Firefox */
|
|
77
75
|
@media not all and (min-resolution: 0.001dpcm) {
|
|
@@ -57,7 +57,7 @@ const StyledProgressBar = styled.span`
|
|
|
57
57
|
progress,
|
|
58
58
|
error
|
|
59
59
|
})};
|
|
60
|
-
border-radius:
|
|
60
|
+
border-radius: var(--borderRadius400);
|
|
61
61
|
overflow-x: hidden;
|
|
62
62
|
height: ${getHeight(size)};
|
|
63
63
|
width: 100%;
|
|
@@ -104,7 +104,7 @@ const InnerBar = styled.span`
|
|
|
104
104
|
progress,
|
|
105
105
|
error
|
|
106
106
|
})};
|
|
107
|
-
border-radius:
|
|
107
|
+
border-radius: var(--borderRadius400);
|
|
108
108
|
width: calc(${length} * ${progress && progress / 100});
|
|
109
109
|
min-width: 2px;
|
|
110
110
|
height: ${getHeight(size)};
|
|
@@ -15,6 +15,11 @@ const StyledSearchButton = styled.div`
|
|
|
15
15
|
& ${StyledButton} {
|
|
16
16
|
background-color: var(--colorsActionMajor500);
|
|
17
17
|
border-color: var(--colorsActionMajorTransparent);
|
|
18
|
+
border-bottom-left-radius: var(--borderRadius000);
|
|
19
|
+
border-top-left-radius: var(--borderRadius000);
|
|
20
|
+
border-bottom-right-radius: var(--borderRadius050);
|
|
21
|
+
border-top-right-radius: var(--borderRadius050);
|
|
22
|
+
|
|
18
23
|
:hover {
|
|
19
24
|
background: var(--colorsActionMajor600);
|
|
20
25
|
border-color: var(--colorsActionMajorTransparent);
|
|
@@ -52,6 +52,7 @@ const StyledSearch = styled.div`
|
|
|
52
52
|
}
|
|
53
53
|
`}
|
|
54
54
|
|
|
55
|
+
|
|
55
56
|
${StyledInput} {
|
|
56
57
|
::-moz-placeholder {
|
|
57
58
|
color: var(--colorsUtilityYin055);
|
|
@@ -78,6 +79,12 @@ const StyledSearch = styled.div`
|
|
|
78
79
|
|
|
79
80
|
${StyledInputPresentation} {
|
|
80
81
|
background-color: ${searchHasValue || isFocused ? "var(--colorsUtilityYang100)" : "transparent"};
|
|
82
|
+
|
|
83
|
+
${showSearchButton && css`
|
|
84
|
+
border-top-right-radius: var(--borderRadius000);
|
|
85
|
+
border-bottom-right-radius: var(--borderRadius000);
|
|
86
|
+
`}
|
|
87
|
+
|
|
81
88
|
flex: 1;
|
|
82
89
|
font-size: 14px;
|
|
83
90
|
font-weight: 700;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
declare type SelectListContextProps = {
|
|
3
|
+
currentOptionsListIndex?: number;
|
|
4
|
+
multiselectValues?: (string | Record<string, unknown>)[];
|
|
5
|
+
};
|
|
6
|
+
declare const SelectListContext: React.Context<SelectListContextProps>;
|
|
7
|
+
export default SelectListContext;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./select-text.component";
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface SelectTextProps {
|
|
3
|
+
/** If true the Component will be disabled */
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
/** Value to be displayed */
|
|
6
|
+
formattedValue?: string;
|
|
7
|
+
/** Label id passed from Select component */
|
|
8
|
+
labelId?: string;
|
|
9
|
+
/** If true, the list is displayed */
|
|
10
|
+
isOpen?: boolean;
|
|
11
|
+
/** Callback function for when the Select Textbox loses it's focus. */
|
|
12
|
+
onBlur?: (ev: React.FocusEvent<HTMLElement>) => void;
|
|
13
|
+
/** Callback function for when the component is clicked. */
|
|
14
|
+
onClick?: (ev: React.MouseEvent<HTMLElement>) => void;
|
|
15
|
+
/** Callback function for when the Select Textbox is focused. */
|
|
16
|
+
onFocus?: (ev: React.FocusEvent<HTMLElement>) => void;
|
|
17
|
+
/** Callback function for when the key is pressed when focused on Select Text. */
|
|
18
|
+
onKeyDown?: (ev: React.KeyboardEvent<HTMLElement>) => void;
|
|
19
|
+
/** Callback function for when the left mouse key is pressed when focused on Select Text. */
|
|
20
|
+
onMouseDown?: (ev: React.MouseEvent<HTMLElement>) => void;
|
|
21
|
+
/** Placeholder string to be displayed when formattedValue is empty */
|
|
22
|
+
placeholder?: string;
|
|
23
|
+
/** If true the Component will be read-only */
|
|
24
|
+
readOnly?: boolean;
|
|
25
|
+
/** If true the component has no border and a transparent background */
|
|
26
|
+
transparent?: boolean;
|
|
27
|
+
/** Id of the Select Text element */
|
|
28
|
+
textId?: string;
|
|
29
|
+
/** Component size */
|
|
30
|
+
size?: "small" | "medium" | "large";
|
|
31
|
+
}
|
|
32
|
+
declare const SelectText: ({ disabled, formattedValue, onClick, onKeyDown, onMouseDown, placeholder, readOnly, textId, transparent, size, }: SelectTextProps) => JSX.Element;
|
|
33
|
+
export default SelectText;
|
|
@@ -15,57 +15,37 @@ const SelectText = ({
|
|
|
15
15
|
size = "medium"
|
|
16
16
|
}) => {
|
|
17
17
|
const hasPlaceholder = !disabled && !readOnly && !formattedValue;
|
|
18
|
-
|
|
19
|
-
function handleClick(event) {
|
|
20
|
-
onClick(event);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
18
|
return /*#__PURE__*/React.createElement(StyledSelectText, {
|
|
24
19
|
"aria-hidden": true,
|
|
25
20
|
"data-element": "select-text",
|
|
26
21
|
disabled: disabled,
|
|
27
22
|
hasPlaceholder: hasPlaceholder,
|
|
28
23
|
id: textId,
|
|
29
|
-
onClick:
|
|
24
|
+
onClick: onClick,
|
|
30
25
|
onKeyDown: onKeyDown,
|
|
31
26
|
onMouseDown: onMouseDown,
|
|
32
27
|
readOnly: readOnly,
|
|
33
28
|
role: "button",
|
|
34
|
-
tabIndex:
|
|
29
|
+
tabIndex: -1,
|
|
35
30
|
transparent: transparent,
|
|
36
31
|
size: size
|
|
37
32
|
}, hasPlaceholder ? placeholder : formattedValue);
|
|
38
33
|
};
|
|
39
34
|
|
|
40
35
|
SelectText.propTypes = {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
/** Placeholder string to be displayed when formattedValue is empty */
|
|
57
|
-
placeholder: PropTypes.string,
|
|
58
|
-
|
|
59
|
-
/** If true the Component will be read-only */
|
|
60
|
-
readOnly: PropTypes.bool,
|
|
61
|
-
|
|
62
|
-
/** If true the component has no border and a transparent background */
|
|
63
|
-
transparent: PropTypes.bool,
|
|
64
|
-
|
|
65
|
-
/** Id of the Select Text element */
|
|
66
|
-
textId: PropTypes.string,
|
|
67
|
-
|
|
68
|
-
/** Component size */
|
|
69
|
-
size: PropTypes.string
|
|
36
|
+
"disabled": PropTypes.bool,
|
|
37
|
+
"formattedValue": PropTypes.string,
|
|
38
|
+
"isOpen": PropTypes.bool,
|
|
39
|
+
"labelId": PropTypes.string,
|
|
40
|
+
"onBlur": PropTypes.func,
|
|
41
|
+
"onClick": PropTypes.func,
|
|
42
|
+
"onFocus": PropTypes.func,
|
|
43
|
+
"onKeyDown": PropTypes.func,
|
|
44
|
+
"onMouseDown": PropTypes.func,
|
|
45
|
+
"placeholder": PropTypes.string,
|
|
46
|
+
"readOnly": PropTypes.bool,
|
|
47
|
+
"size": PropTypes.oneOf(["large", "medium", "small"]),
|
|
48
|
+
"textId": PropTypes.string,
|
|
49
|
+
"transparent": PropTypes.bool
|
|
70
50
|
};
|
|
71
51
|
export default SelectText;
|
|
@@ -1,2 +1,7 @@
|
|
|
1
|
+
import { SelectTextProps } from ".";
|
|
2
|
+
interface StyledSelectTextProps extends Pick<SelectTextProps, "disabled" | "readOnly" | "transparent"> {
|
|
3
|
+
hasPlaceholder: boolean;
|
|
4
|
+
size: NonNullable<SelectTextProps["size"]>;
|
|
5
|
+
}
|
|
6
|
+
declare const StyledSelectText: import("styled-components").StyledComponent<"span", any, StyledSelectTextProps, never>;
|
|
1
7
|
export default StyledSelectText;
|
|
2
|
-
declare const StyledSelectText: import("styled-components").StyledComponent<"span", any, {}, never>;
|