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
|
@@ -63,6 +63,7 @@ const InputPresentationStyle = _styledComponents.default.div`
|
|
|
63
63
|
align-items: stretch;
|
|
64
64
|
background: var(--colorsUtilityYang100);
|
|
65
65
|
border: 1px solid var(--colorsUtilityMajor300);
|
|
66
|
+
border-radius: var(--borderRadius050);
|
|
66
67
|
box-sizing: border-box;
|
|
67
68
|
cursor: text;
|
|
68
69
|
display: flex;
|
|
@@ -14,6 +14,7 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj;
|
|
|
14
14
|
const StyledInput = _styledComponents.default.input`
|
|
15
15
|
background: transparent;
|
|
16
16
|
border: none;
|
|
17
|
+
border-radius: var(--borderRadius050);
|
|
17
18
|
color: var(--colorsUtilityYin090);
|
|
18
19
|
flex-grow: 1;
|
|
19
20
|
font-size: var(--fontSizes100);
|
|
@@ -31,6 +31,7 @@ const Menu = _styledComponents.default.div`
|
|
|
31
31
|
padding: var(--spacing100) 0;
|
|
32
32
|
box-shadow: var(--boxShadow100);
|
|
33
33
|
position: absolute;
|
|
34
|
+
border-radius: var(--borderRadius100);
|
|
34
35
|
background-color: var(--colorsUtilityYang100);
|
|
35
36
|
z-index: ${({
|
|
36
37
|
theme
|
|
@@ -61,6 +62,7 @@ const StyledMenuItem = _styledComponents.default.button`
|
|
|
61
62
|
&:focus {
|
|
62
63
|
outline: var(--borderWidth300) solid var(--colorsSemanticFocus500);
|
|
63
64
|
z-index: 1;
|
|
65
|
+
border-radius: var(--borderRadius000);
|
|
64
66
|
}
|
|
65
67
|
|
|
66
68
|
${({
|
|
@@ -117,6 +119,7 @@ exports.ButtonIcon = ButtonIcon;
|
|
|
117
119
|
const StyledButtonIcon = _styledComponents.default.div`
|
|
118
120
|
&:focus {
|
|
119
121
|
outline: var(--borderWidth300) solid var(--colorsSemanticFocus500);
|
|
122
|
+
border-radius: var(--borderRadius050);
|
|
120
123
|
}
|
|
121
124
|
`;
|
|
122
125
|
exports.StyledButtonIcon = StyledButtonIcon;
|
package/lib/components/anchor-navigation/anchor-navigation-item/anchor-navigation-item.style.js
CHANGED
|
@@ -23,15 +23,19 @@ const StyledNavigationItem = _styledComponents.default.li`
|
|
|
23
23
|
border-left: var(--sizing050) solid var(--colorsActionMinor100);
|
|
24
24
|
font-weight: 700;
|
|
25
25
|
padding: 12px 24px;
|
|
26
|
+
border-top-right-radius: var(--borderRadius100);
|
|
27
|
+
border-bottom-right-radius: var(--borderRadius100);
|
|
26
28
|
|
|
27
29
|
&:focus {
|
|
28
30
|
outline: var(--borderWidth300) solid var(--colorsSemanticFocus500);
|
|
29
31
|
}
|
|
30
32
|
|
|
31
33
|
&:hover {
|
|
32
|
-
|
|
34
|
+
${({
|
|
33
35
|
isSelected
|
|
34
|
-
}) => !isSelected &&
|
|
36
|
+
}) => !isSelected && (0, _styledComponents.css)`
|
|
37
|
+
background-color: var(--colorsActionMinor100);
|
|
38
|
+
`};
|
|
35
39
|
}
|
|
36
40
|
|
|
37
41
|
${({
|
|
@@ -25,6 +25,7 @@ const StyledBatchSelection = _styledComponents.default.div`
|
|
|
25
25
|
}) => (0, _styledComponents.css)`
|
|
26
26
|
align-items: center;
|
|
27
27
|
display: inline-flex;
|
|
28
|
+
border-radius: var(--borderRadius100);
|
|
28
29
|
|
|
29
30
|
${hidden && "opacity: 0;"}
|
|
30
31
|
|
|
@@ -58,12 +59,17 @@ const StyledBatchSelection = _styledComponents.default.div`
|
|
|
58
59
|
|
|
59
60
|
${_iconButton.default}:hover {
|
|
60
61
|
background-color: var(--colorsActionMajor500);
|
|
62
|
+
border-radius: var(--borderRadius100);
|
|
61
63
|
|
|
62
64
|
${_icon.default} {
|
|
63
65
|
color: var(--colorsActionMajorYang100);
|
|
64
66
|
}
|
|
65
67
|
}
|
|
66
68
|
|
|
69
|
+
${_iconButton.default}:focus {
|
|
70
|
+
border-radius: var(--borderRadius100);
|
|
71
|
+
}
|
|
72
|
+
|
|
67
73
|
${disabled && (0, _styledComponents.css)`
|
|
68
74
|
background: transparent;
|
|
69
75
|
color: var(--colorsUtilityYin030);
|
|
@@ -9,6 +9,7 @@ export declare type AllowedNumericalValues = typeof GAP_VALUES[number];
|
|
|
9
9
|
export declare type Gap = AllowedNumericalValues | string;
|
|
10
10
|
declare type DesignTokensType = keyof typeof DesignTokens;
|
|
11
11
|
declare type BoxShadowsType = Extract<DesignTokensType, `boxShadow${string}`>;
|
|
12
|
+
declare type BorderRadiusType = Extract<DesignTokensType, `borderRadius${string}`>;
|
|
12
13
|
export interface BoxProps extends SpaceProps, LayoutProps, FlexboxProps, ColorProps, Omit<PositionProps, "zIndex"> {
|
|
13
14
|
as?: keyof JSX.IntrinsicElements | React.ComponentType<any>;
|
|
14
15
|
/** String to set Box content break strategy. Note "anywhere" is not supported in Safari */
|
|
@@ -27,6 +28,8 @@ export interface BoxProps extends SpaceProps, LayoutProps, FlexboxProps, ColorPr
|
|
|
27
28
|
rowGap?: Gap;
|
|
28
29
|
/** Design Token for Box Shadow. Note: please check that the box shadow design token you are using is compatible with the Box component. */
|
|
29
30
|
boxShadow?: BoxShadowsType;
|
|
31
|
+
/** Design Token for Border Radius. Note: please check that the border radius design token you are using is compatible with the Box component. */
|
|
32
|
+
borderRadius?: BorderRadiusType;
|
|
30
33
|
}
|
|
31
34
|
export declare const Box: import("styled-components").StyledComponent<"div", any, BoxProps, never>;
|
|
32
35
|
export default Box;
|
|
@@ -56,14 +56,6 @@ function stylingForType({
|
|
|
56
56
|
destructive
|
|
57
57
|
}) {
|
|
58
58
|
return (0, _styledComponents.css)`
|
|
59
|
-
border: 2px solid transparent;
|
|
60
|
-
box-sizing: border-box;
|
|
61
|
-
font-weight: 600;
|
|
62
|
-
text-decoration: none;
|
|
63
|
-
&:focus {
|
|
64
|
-
outline: solid 3px var(--colorsSemanticFocus500);
|
|
65
|
-
}
|
|
66
|
-
|
|
67
59
|
${(0, _buttonTypes.default)(disabled, destructive)[buttonType]};
|
|
68
60
|
|
|
69
61
|
${size === "small" && (0, _styledComponents.css)`
|
|
@@ -94,11 +86,20 @@ const StyledButton = _styledComponents.default.button`
|
|
|
94
86
|
align-items: center;
|
|
95
87
|
cursor: ${disabled ? "not-allowed" : "pointer"};
|
|
96
88
|
display: inline-flex;
|
|
97
|
-
border-radius: 0;
|
|
98
89
|
${noWrap ? "white-space: nowrap;" : "flex-flow: wrap;"}
|
|
99
90
|
justify-content: center;
|
|
100
91
|
vertical-align: middle;
|
|
101
92
|
outline-offset: 0;
|
|
93
|
+
border: 2px solid transparent;
|
|
94
|
+
box-sizing: border-box;
|
|
95
|
+
font-weight: 600;
|
|
96
|
+
text-decoration: none;
|
|
97
|
+
border-radius: var(--borderRadius400);
|
|
98
|
+
|
|
99
|
+
&:focus {
|
|
100
|
+
outline: solid 3px var(--colorsSemanticFocus500);
|
|
101
|
+
}
|
|
102
|
+
|
|
102
103
|
${stylingForType}
|
|
103
104
|
`}
|
|
104
105
|
|
|
@@ -43,20 +43,38 @@ const StyledButtonBar = _styledComponents.default.div`
|
|
|
43
43
|
margin: 0;
|
|
44
44
|
border: 2px solid var(--colorsActionMajor500);
|
|
45
45
|
|
|
46
|
+
:not(:first-child):not(:last-child) {
|
|
47
|
+
border-radius: var(--borderRadius000);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
:first-child:not(:last-child) {
|
|
51
|
+
border-top-right-radius: var(--borderRadius000);
|
|
52
|
+
border-bottom-right-radius: var(--borderRadius000);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
:last-child:not(:first-child) {
|
|
56
|
+
border-top-left-radius: var(--borderRadius000);
|
|
57
|
+
border-bottom-left-radius: var(--borderRadius000);
|
|
58
|
+
}
|
|
59
|
+
|
|
46
60
|
&:not(:last-of-type) {
|
|
47
61
|
border-right-color: transparent;
|
|
48
62
|
}
|
|
63
|
+
|
|
49
64
|
&:not(:first-of-type) {
|
|
50
65
|
margin-left: -2px;
|
|
51
66
|
}
|
|
67
|
+
|
|
52
68
|
&:focus {
|
|
53
69
|
position: relative;
|
|
54
70
|
z-index: 2;
|
|
55
71
|
border-right-color: var(--colorsActionMajor500);
|
|
56
72
|
}
|
|
73
|
+
|
|
57
74
|
&:hover {
|
|
58
75
|
background-color: var(--colorsActionMajor600);
|
|
59
76
|
border-color: var(--colorsActionMajor600);
|
|
77
|
+
|
|
60
78
|
& + button {
|
|
61
79
|
border-left-color: var(--colorsActionMajor600);
|
|
62
80
|
}
|
|
@@ -64,6 +82,7 @@ const StyledButtonBar = _styledComponents.default.div`
|
|
|
64
82
|
color: white;
|
|
65
83
|
}
|
|
66
84
|
}
|
|
85
|
+
|
|
67
86
|
& ${_icon.default} {
|
|
68
87
|
color: var(--colorsActionMajor500);
|
|
69
88
|
}
|
|
@@ -21,17 +21,19 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj;
|
|
|
21
21
|
|
|
22
22
|
function makeColors(color) {
|
|
23
23
|
return `
|
|
24
|
-
color: ${color};
|
|
25
|
-
${_icon.default} {
|
|
26
24
|
color: ${color};
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
25
|
+
${_icon.default} {
|
|
26
|
+
color: ${color};
|
|
27
|
+
}
|
|
28
|
+
${_loaderSquare.default} {
|
|
29
|
+
background-color: ${color};
|
|
30
|
+
}
|
|
31
31
|
`;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
const StyledButtonMinor = (0, _styledComponents.default)(_button.default)`
|
|
35
|
+
border-radius: var(--borderRadius050);
|
|
36
|
+
|
|
35
37
|
${({
|
|
36
38
|
children
|
|
37
39
|
}) => !children && (0, _styledComponents.css)`
|
|
@@ -46,54 +48,54 @@ const StyledButtonMinor = (0, _styledComponents.default)(_button.default)`
|
|
|
46
48
|
disabled
|
|
47
49
|
}) => !destructive && !disabled && (0, _styledComponents.css)`
|
|
48
50
|
${buttonType === "primary" && `
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
51
|
+
background: var(--colorsActionMinor500);
|
|
52
|
+
border-color: var(--colorsActionMinorTransparent);
|
|
53
|
+
${makeColors("var(--colorsActionMinorYang100)")}
|
|
54
|
+
&:hover {
|
|
55
|
+
background: var(--colorsActionMinor600);
|
|
56
|
+
}
|
|
57
|
+
`}
|
|
56
58
|
|
|
57
59
|
${buttonType === "secondary" && `
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
60
|
+
background: transparent;
|
|
61
|
+
padding: var(--spacing100);
|
|
62
|
+
border-color: var(--colorsActionMinor500);
|
|
63
|
+
${makeColors("var(--colorsActionMinor500)")}
|
|
64
|
+
&:hover {
|
|
65
|
+
color: var(--colorsActionMinorYang100);
|
|
66
|
+
background: var(--colorsActionMinor600);
|
|
67
|
+
}
|
|
68
|
+
`}
|
|
67
69
|
|
|
68
70
|
${buttonType === "tertiary" && `
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
71
|
+
background: transparent;
|
|
72
|
+
padding: var(--spacing100);
|
|
73
|
+
${makeColors("var(--colorsActionMinor500)")}
|
|
74
|
+
&:hover {
|
|
75
|
+
color: var(--colorsActionMinorYang100);
|
|
76
|
+
background: var(--colorsActionMinor600);
|
|
77
|
+
}
|
|
78
|
+
`}
|
|
77
79
|
`}
|
|
78
80
|
|
|
79
81
|
${({
|
|
80
82
|
size
|
|
81
83
|
}) => (0, _styledComponents.css)`
|
|
82
84
|
${size === "small" && `
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
85
|
+
min-height: 32px;
|
|
86
|
+
padding: var(--spacing000) var(--spacing100) var(--spacing000)
|
|
87
|
+
var(--spacing100);
|
|
88
|
+
`}
|
|
87
89
|
|
|
88
90
|
${size === "medium" && `
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
91
|
+
padding-left: var(--spacing150);
|
|
92
|
+
padding-right: var(--spacing150);
|
|
93
|
+
`}
|
|
92
94
|
|
|
93
95
|
${size === "large" && `
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
96
|
+
padding-left: var(--spacing200);
|
|
97
|
+
padding-right: var(--spacing200);
|
|
98
|
+
`}
|
|
97
99
|
`}
|
|
98
100
|
`;
|
|
99
101
|
var _default = StyledButtonMinor;
|
|
@@ -106,7 +106,8 @@ const ButtonToggle = ({
|
|
|
106
106
|
htmlFor: inputGuid,
|
|
107
107
|
onMouseEnter: onMouseEnter,
|
|
108
108
|
onMouseLeave: onMouseLeave,
|
|
109
|
-
size: size
|
|
109
|
+
size: size,
|
|
110
|
+
grouped: grouped
|
|
110
111
|
}, /*#__PURE__*/_react.default.createElement(_buttonToggle.StyledButtonToggleContentWrapper, null, icon, children)));
|
|
111
112
|
};
|
|
112
113
|
|
|
@@ -10,6 +10,7 @@ export interface StyledButtonToggleLabelProps {
|
|
|
10
10
|
disabled?: boolean;
|
|
11
11
|
/** ButtonToggle size */
|
|
12
12
|
size: "small" | "medium" | "large";
|
|
13
|
+
grouped?: boolean;
|
|
13
14
|
}
|
|
14
15
|
declare const StyledButtonToggleLabel: import("styled-components").StyledComponent<"label", any, StyledButtonToggleLabelProps, never>;
|
|
15
16
|
export interface StyledButtonToggleIconProps {
|
|
@@ -54,6 +54,7 @@ const StyledButtonToggleLabel = _styledComponents.default.label`
|
|
|
54
54
|
position: relative;
|
|
55
55
|
box-sizing: border-box;
|
|
56
56
|
max-width: 100%;
|
|
57
|
+
|
|
57
58
|
${({
|
|
58
59
|
size
|
|
59
60
|
}) => (0, _styledComponents.css)`
|
|
@@ -63,19 +64,15 @@ const StyledButtonToggleLabel = _styledComponents.default.label`
|
|
|
63
64
|
`}
|
|
64
65
|
font-weight: 700;
|
|
65
66
|
cursor: pointer;
|
|
66
|
-
|
|
67
67
|
border: 1px solid var(--colorsActionMinor500);
|
|
68
|
-
|
|
69
68
|
${_icon.default} {
|
|
70
69
|
color: var(--colorsActionMinor500);
|
|
71
70
|
}
|
|
72
|
-
|
|
73
71
|
input:checked ~ && {
|
|
74
72
|
background-color: var(--colorsActionMinor300);
|
|
75
73
|
color: var(--colorsActionMinor600);
|
|
76
74
|
cursor: auto;
|
|
77
75
|
}
|
|
78
|
-
|
|
79
76
|
input:focus ~ & {
|
|
80
77
|
outline: 3px solid var(--colorsSemanticFocus500);
|
|
81
78
|
z-index: 100;
|
|
@@ -85,12 +82,10 @@ const StyledButtonToggleLabel = _styledComponents.default.label`
|
|
|
85
82
|
background-color: var(--colorsActionMinor200);
|
|
86
83
|
border-color: var(--colorsActionMinor500);
|
|
87
84
|
color: var(--colorsActionMinor500);
|
|
88
|
-
|
|
89
85
|
${_icon.default} {
|
|
90
86
|
color: var(--colorsActionMinor500);
|
|
91
87
|
}
|
|
92
88
|
}
|
|
93
|
-
|
|
94
89
|
${({
|
|
95
90
|
buttonIcon,
|
|
96
91
|
buttonIconSize,
|
|
@@ -98,19 +93,16 @@ const StyledButtonToggleLabel = _styledComponents.default.label`
|
|
|
98
93
|
}) => buttonIcon && buttonIconSize === "large" && (0, _styledComponents.css)`
|
|
99
94
|
height: ${heightLargeIconConfig[size]}px;
|
|
100
95
|
padding: 0 ${paddingLargeIconConfig[size]}px;
|
|
101
|
-
|
|
102
96
|
${StyledButtonToggleContentWrapper} {
|
|
103
97
|
flex-direction: column;
|
|
104
98
|
}
|
|
105
99
|
`}
|
|
106
|
-
|
|
107
100
|
${({
|
|
108
101
|
disabled
|
|
109
102
|
}) => disabled && (0, _styledComponents.css)`
|
|
110
103
|
& {
|
|
111
104
|
border-color: var(--colorsActionDisabled500);
|
|
112
105
|
color: var(--colorsActionMinorYin030);
|
|
113
|
-
|
|
114
106
|
${_icon.default} {
|
|
115
107
|
color: var(--colorsActionMinorYin030);
|
|
116
108
|
}
|
|
@@ -127,24 +119,20 @@ const StyledButtonToggleIcon = _styledComponents.default.div`
|
|
|
127
119
|
${({
|
|
128
120
|
hasContent
|
|
129
121
|
}) => hasContent && `margin-right: 8px;`}
|
|
130
|
-
|
|
131
122
|
${({
|
|
132
123
|
buttonIconSize
|
|
133
124
|
}) => buttonIconSize === "large" && (0, _styledComponents.css)`
|
|
134
125
|
margin-right: 0;
|
|
135
|
-
|
|
136
126
|
${_icon.default} {
|
|
137
127
|
margin-right: 0;
|
|
138
128
|
margin-bottom: 8px;
|
|
139
129
|
height: ${`${iconFontSizes.largeIcon}px`};
|
|
140
130
|
width: ${`${iconFontSizes.largeIcon}px`};
|
|
141
131
|
}
|
|
142
|
-
|
|
143
132
|
${_icon.default}::before {
|
|
144
133
|
font-size: ${`${iconFontSizes[`${buttonIconSize}Icon`]}px`};
|
|
145
134
|
line-height: ${`${iconFontSizes[`${buttonIconSize}Icon`]}px`};
|
|
146
135
|
}
|
|
147
|
-
|
|
148
136
|
.carbon-icon__svg--credit-card-slash {
|
|
149
137
|
margin-left: 6px;
|
|
150
138
|
}
|
|
@@ -155,6 +143,36 @@ const StyledButtonToggle = _styledComponents.default.div`
|
|
|
155
143
|
display: inline-block;
|
|
156
144
|
vertical-align: middle;
|
|
157
145
|
|
|
146
|
+
${({
|
|
147
|
+
grouped
|
|
148
|
+
}) => (0, _styledComponents.css)`
|
|
149
|
+
${!grouped && (0, _styledComponents.css)`
|
|
150
|
+
&&&& {
|
|
151
|
+
${StyledButtonToggleLabel} {
|
|
152
|
+
border-radius: var(--borderRadius400);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
`}
|
|
156
|
+
|
|
157
|
+
${grouped && (0, _styledComponents.css)`
|
|
158
|
+
&&&& {
|
|
159
|
+
:first-of-type {
|
|
160
|
+
${StyledButtonToggleLabel} {
|
|
161
|
+
border-top-left-radius: var(--borderRadius400);
|
|
162
|
+
border-bottom-left-radius: var(--borderRadius400);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
:last-of-type {
|
|
167
|
+
${StyledButtonToggleLabel} {
|
|
168
|
+
border-top-right-radius: var(--borderRadius400);
|
|
169
|
+
border-bottom-right-radius: var(--borderRadius400);
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
`}
|
|
174
|
+
`}
|
|
175
|
+
|
|
158
176
|
&:not(:first-of-type) {
|
|
159
177
|
margin-left: 8px;
|
|
160
178
|
}
|
|
@@ -20,6 +20,24 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj;
|
|
|
20
20
|
const StyledButtonToggleGroup = _styledComponents.default.div`
|
|
21
21
|
display: flex;
|
|
22
22
|
|
|
23
|
+
${_buttonToggle.StyledButtonToggleLabel}:not(:first-of-type):not(:last-of-type) {
|
|
24
|
+
border-radius: var(--borderRadius000);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
${_buttonToggle.StyledButtonToggle}:first-of-type ${_buttonToggle.StyledButtonToggleLabel} {
|
|
28
|
+
border-top-left-radius: var(--borderRadius400);
|
|
29
|
+
border-bottom-left-radius: var(--borderRadius400);
|
|
30
|
+
border-top-right-radius: var(--borderRadius000);
|
|
31
|
+
border-bottom-right-radius: var(--borderRadius000);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
${_buttonToggle.StyledButtonToggle}:last-of-type ${_buttonToggle.StyledButtonToggleLabel} {
|
|
35
|
+
border-top-left-radius: var(--borderRadius000);
|
|
36
|
+
border-bottom-left-radius: var(--borderRadius000);
|
|
37
|
+
border-top-right-radius: var(--borderRadius400);
|
|
38
|
+
border-bottom-right-radius: var(--borderRadius400);
|
|
39
|
+
}
|
|
40
|
+
|
|
23
41
|
${({
|
|
24
42
|
fullWidth
|
|
25
43
|
}) => fullWidth && (0, _styledComponents.css)`
|
|
@@ -29,20 +47,20 @@ const StyledButtonToggleGroup = _styledComponents.default.div`
|
|
|
29
47
|
${_buttonToggle.StyledButtonToggle} {
|
|
30
48
|
flex: auto;
|
|
31
49
|
}
|
|
32
|
-
`}
|
|
50
|
+
`}
|
|
33
51
|
|
|
34
52
|
${({
|
|
35
53
|
inputWidth
|
|
36
54
|
}) => inputWidth && (0, _styledComponents.css)`
|
|
37
55
|
width: ${`${inputWidth}%`};
|
|
38
|
-
`}
|
|
56
|
+
`}
|
|
39
57
|
|
|
40
58
|
${_buttonToggle.StyledButtonToggleLabel} {
|
|
41
59
|
${({
|
|
42
60
|
info
|
|
43
61
|
}) => info && (0, _styledComponents.css)`
|
|
44
62
|
border-color: var(--colorsSemanticInfo500);
|
|
45
|
-
`}
|
|
63
|
+
`}
|
|
46
64
|
${({
|
|
47
65
|
warning
|
|
48
66
|
}) => warning && (0, _styledComponents.css)`
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface CardContextProps {
|
|
3
|
+
/** Sets the level of roundness of the corners, "default" is 8px and "large" is 16px */
|
|
4
|
+
roundness?: "default" | "large";
|
|
5
|
+
}
|
|
6
|
+
declare const _default: React.Context<CardContextProps>;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
|
|
12
|
+
var _default = /*#__PURE__*/_react.default.createContext({});
|
|
13
|
+
|
|
14
|
+
exports.default = _default;
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
|
|
8
|
-
var _react =
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
9
|
|
|
10
10
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
11
|
|
|
@@ -13,8 +13,14 @@ var _utils = require("../../../style/utils");
|
|
|
13
13
|
|
|
14
14
|
var _cardFooter = _interopRequireDefault(require("./card-footer.style"));
|
|
15
15
|
|
|
16
|
+
var _cardContext = _interopRequireDefault(require("../__internal__/card-context"));
|
|
17
|
+
|
|
16
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
19
|
|
|
20
|
+
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
|
|
21
|
+
|
|
22
|
+
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
23
|
+
|
|
18
24
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
19
25
|
|
|
20
26
|
const CardFooter = ({
|
|
@@ -23,12 +29,17 @@ const CardFooter = ({
|
|
|
23
29
|
variant = "default",
|
|
24
30
|
...rest
|
|
25
31
|
}) => {
|
|
32
|
+
const {
|
|
33
|
+
roundness
|
|
34
|
+
} = (0, _react.useContext)(_cardContext.default);
|
|
26
35
|
return /*#__PURE__*/_react.default.createElement(_cardFooter.default, _extends({
|
|
27
36
|
key: "card-footer",
|
|
28
37
|
"data-element": "card-footer",
|
|
29
38
|
spacing: spacing,
|
|
30
39
|
variant: variant
|
|
31
|
-
}, (0, _utils.filterStyledSystemMarginProps)(rest), (0, _utils.filterStyledSystemPaddingProps)(rest)
|
|
40
|
+
}, (0, _utils.filterStyledSystemMarginProps)(rest), (0, _utils.filterStyledSystemPaddingProps)(rest), {
|
|
41
|
+
roundness: roundness
|
|
42
|
+
}), children);
|
|
32
43
|
};
|
|
33
44
|
|
|
34
45
|
CardFooter.propTypes = {
|
|
@@ -341,6 +352,7 @@ CardFooter.propTypes = {
|
|
|
341
352
|
"toString": _propTypes.default.func.isRequired,
|
|
342
353
|
"valueOf": _propTypes.default.func.isRequired
|
|
343
354
|
}), _propTypes.default.string]),
|
|
355
|
+
"roundness": _propTypes.default.oneOf(["default", "large"]),
|
|
344
356
|
"spacing": _propTypes.default.oneOf(["large", "medium", "small"]),
|
|
345
357
|
"variant": _propTypes.default.oneOf(["default", "transparent"])
|
|
346
358
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { SpaceProps } from "styled-system";
|
|
2
2
|
import { CardSpacing } from "../card.config";
|
|
3
|
-
|
|
3
|
+
import { CardContextProps } from "../__internal__/card-context";
|
|
4
|
+
export interface StyledCardFooterProps extends SpaceProps, CardContextProps {
|
|
4
5
|
/** Predefined size of CardFooter for applying padding. For more granular control, this prop can be over-ridden by the spacing props from styled-system */
|
|
5
6
|
spacing: CardSpacing;
|
|
6
7
|
/** Specify styling variant to render */
|
|
@@ -32,7 +32,8 @@ const StyledCardFooter = _styledComponents.default.div`
|
|
|
32
32
|
|
|
33
33
|
${({
|
|
34
34
|
spacing,
|
|
35
|
-
variant
|
|
35
|
+
variant,
|
|
36
|
+
roundness = "default"
|
|
36
37
|
}) => (0, _styledComponents.css)`
|
|
37
38
|
background-color: ${variant === "transparent" ? "transparent" : "var(--colorsUtilityMajor025)"};
|
|
38
39
|
border-top: var(--colorsUtilityMajor100);
|
|
@@ -42,6 +43,14 @@ const StyledCardFooter = _styledComponents.default.div`
|
|
|
42
43
|
font-weight: 700;
|
|
43
44
|
margin: ${marginSizes[spacing]};
|
|
44
45
|
display: flex;
|
|
46
|
+
${roundness === "default" && (0, _styledComponents.css)`
|
|
47
|
+
border-bottom-left-radius: var(--borderRadius100);
|
|
48
|
+
border-bottom-right-radius: var(--borderRadius100);
|
|
49
|
+
`}
|
|
50
|
+
${roundness === "large" && (0, _styledComponents.css)`
|
|
51
|
+
border-bottom-left-radius: var(--borderRadius200);
|
|
52
|
+
border-bottom-right-radius: var(--borderRadius200);
|
|
53
|
+
`}
|
|
45
54
|
|
|
46
55
|
${_cardColumn.default} {
|
|
47
56
|
margin: 0;
|