baseui 12.0.0 → 12.1.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/accordion/accordion.js +4 -2
- package/accordion/accordion.js.flow +1 -1
- package/accordion/panel.js +3 -2
- package/accordion/stateful-panel-container.js +1 -0
- package/accordion/styled-components.js +8 -1
- package/accordion/types.d.ts +2 -2
- package/app-nav-bar/app-nav-bar.js +4 -2
- package/app-nav-bar/mobile-menu.js +2 -1
- package/app-nav-bar/styled-components.js +19 -1
- package/app-nav-bar/types.d.ts +2 -2
- package/app-nav-bar/user-menu.js +1 -1
- package/aspect-ratio-box/aspect-ratio-box-body.d.ts +1 -1
- package/aspect-ratio-box/aspect-ratio-box.js +3 -1
- package/aspect-ratio-box/types.d.ts +1 -1
- package/avatar/styled-components.js +4 -1
- package/badge/styled-components.js +16 -11
- package/badge/styled-components.js.flow +4 -4
- package/badge/types.d.ts +2 -2
- package/banner/index.d.ts +1 -1
- package/banner/styled-components.js +25 -12
- package/banner/types.d.ts +15 -15
- package/banner/types.js.flow +13 -11
- package/block/block.js +3 -1
- package/block/styled-components.js +2 -1
- package/block/types.d.ts +3 -4
- package/breadcrumbs/styled-components.js +5 -1
- package/button/styled-components.js +7 -0
- package/button/styled-components.js.flow +2 -0
- package/button/types.d.ts +4 -5
- package/button-group/stateful-button-group.js +1 -0
- package/button-group/stateful-container.js +3 -1
- package/button-group/styled-components.js +2 -1
- package/button-group/types.d.ts +4 -5
- package/card/styled-components.js +11 -4
- package/checkbox/styled-components.js +10 -4
- package/checkbox/styled-components.js.flow +1 -1
- package/checkbox/types.d.ts +36 -37
- package/combobox/combobox.js +78 -71
- package/combobox/styled-components.js +5 -1
- package/combobox/types.d.ts +4 -5
- package/data-table/column-anchor.js +3 -0
- package/data-table/column-datetime.js +10 -4
- package/data-table/column-numerical.js +4 -4
- package/data-table/column-string.js +3 -0
- package/data-table/column.js +6 -1
- package/data-table/data-table.js +6 -3
- package/data-table/filter-menu.js +2 -1
- package/data-table/header-cell.js +43 -34
- package/data-table/locale.d.ts +4 -0
- package/data-table/locale.js +3 -1
- package/data-table/locale.js.flow +5 -0
- package/data-table/measure-column-widths.js +5 -4
- package/data-table/stateful-container.js +2 -1
- package/data-table/stateful-data-table.js +4 -4
- package/data-table/types.d.ts +4 -5
- package/datepicker/calendar-header.js +1 -0
- package/datepicker/calendar.js +2 -0
- package/datepicker/datepicker.js +2 -0
- package/datepicker/day.js +2 -1
- package/datepicker/index.d.ts +1 -1
- package/datepicker/index.js +7 -0
- package/datepicker/index.js.flow +1 -1
- package/datepicker/stateful-calendar.js +7 -3
- package/datepicker/stateful-container.js +2 -0
- package/datepicker/stateful-datepicker.js +9 -4
- package/datepicker/styled-components.js +27 -4
- package/datepicker/types.d.ts +2 -2
- package/datepicker/utils/date-helpers.js +2 -1
- package/datepicker/utils/index.js +2 -1
- package/divider/styled-components.js +4 -3
- package/divider/types.d.ts +1 -1
- package/dnd-list/stateful-list-container.js +1 -0
- package/dnd-list/styled-components.js +7 -0
- package/dnd-list/types.d.ts +2 -2
- package/drawer/constants.js +1 -0
- package/drawer/drawer.js +2 -3
- package/drawer/drawer.js.flow +1 -3
- package/drawer/styled-components.js +9 -2
- package/drawer/types.d.ts +2 -2
- package/es/accordion/accordion.js +3 -3
- package/es/accordion/panel.js +3 -2
- package/es/accordion/stateful-panel-container.js +1 -0
- package/es/accordion/styled-components.js +8 -1
- package/es/app-nav-bar/app-nav-bar.js +6 -2
- package/es/app-nav-bar/mobile-menu.js +4 -2
- package/es/app-nav-bar/styled-components.js +19 -1
- package/es/app-nav-bar/user-menu.js +1 -1
- package/es/aspect-ratio-box/aspect-ratio-box.js +3 -1
- package/es/avatar/styled-components.js +4 -1
- package/es/badge/styled-components.js +11 -6
- package/es/banner/styled-components.js +16 -3
- package/es/block/block.js +3 -1
- package/es/block/styled-components.js +2 -1
- package/es/breadcrumbs/styled-components.js +5 -1
- package/es/button/button.js +8 -0
- package/es/button/styled-components.js +7 -0
- package/es/button-group/stateful-button-group.js +1 -0
- package/es/button-group/stateful-container.js +3 -1
- package/es/button-group/styled-components.js +2 -1
- package/es/card/index.js +2 -1
- package/es/card/styled-components.js +12 -4
- package/es/checkbox/index.js +1 -0
- package/es/checkbox/stateful-checkbox-container.js +3 -0
- package/es/checkbox/styled-components.js +10 -4
- package/es/combobox/combobox.js +76 -69
- package/es/combobox/styled-components.js +5 -1
- package/es/data-table/column-anchor.js +3 -0
- package/es/data-table/column-datetime.js +12 -5
- package/es/data-table/column-numerical.js +5 -4
- package/es/data-table/column-string.js +3 -0
- package/es/data-table/column.js +4 -1
- package/es/data-table/data-table.js +6 -3
- package/es/data-table/filter-menu.js +2 -1
- package/es/data-table/header-cell.js +41 -34
- package/es/data-table/locale.js +3 -1
- package/es/data-table/measure-column-widths.js +5 -4
- package/es/data-table/stateful-container.js +2 -1
- package/es/data-table/stateful-data-table.js +4 -4
- package/es/datepicker/calendar-header.js +1 -0
- package/es/datepicker/calendar.js +2 -0
- package/es/datepicker/datepicker.js +3 -1
- package/es/datepicker/day.js +2 -1
- package/es/datepicker/index.js +1 -1
- package/es/datepicker/stateful-calendar.js +4 -1
- package/es/datepicker/stateful-container.js +2 -0
- package/es/datepicker/stateful-datepicker.js +5 -1
- package/es/datepicker/styled-components.js +26 -3
- package/es/datepicker/utils/date-helpers.js +2 -1
- package/es/datepicker/utils/index.js +2 -1
- package/es/divider/styled-components.js +3 -2
- package/es/dnd-list/stateful-list-container.js +1 -0
- package/es/dnd-list/styled-components.js +7 -0
- package/es/drawer/constants.js +1 -0
- package/es/drawer/drawer.js +2 -5
- package/es/drawer/styled-components.js +9 -2
- package/es/file-uploader/styled-components.js +6 -1
- package/es/flex-grid/flex-grid-item.js +5 -6
- package/es/flex-grid/flex-grid.js +4 -1
- package/es/form-control/styled-components.js +6 -1
- package/es/header-navigation/styled-components.js +4 -1
- package/es/helper/styled-components.js +3 -1
- package/es/helpers/overrides.js +9 -5
- package/es/icon/build-icons.js +0 -2
- package/es/icon/index.js +1 -1
- package/es/icon/omit-dollar-prefixed-keys.js +1 -0
- package/es/icon/styled-components.js +2 -1
- package/es/input/base-input.js +1 -0
- package/es/input/masked-input.js +9 -2
- package/es/input/stateful-container.js +1 -0
- package/es/input/styled-components.js +18 -7
- package/es/input/utils.js +2 -0
- package/es/layer/layer.js +24 -0
- package/es/layer/layers-manager.js +91 -1
- package/es/layout-grid/styled-components.js +3 -0
- package/es/link/index.js +2 -1
- package/es/link/styled-components.js +2 -1
- package/es/list/list-heading.js +21 -17
- package/es/list/list-item.js +2 -1
- package/es/list/styled-components.js +17 -1
- package/es/locale/es_AR.js +3 -1
- package/es/locale/index.js +2 -1
- package/es/locale/tr_TR.js +3 -1
- package/es/map-marker/constants.js +14 -0
- package/es/map-marker/fixed-marker.js +1 -0
- package/es/map-marker/index.js +2 -1
- package/es/map-marker/location-puck.js +142 -0
- package/es/map-marker/pin-head.js +1 -0
- package/es/map-marker/styled-components.js +86 -2
- package/es/menu/index.js +1 -1
- package/es/menu/menu.js +14 -4
- package/es/menu/option-profile.js +1 -0
- package/es/menu/stateful-container.js +10 -0
- package/es/menu/styled-components.js +32 -2
- package/es/message-card/constants.js +19 -0
- package/es/message-card/index.js +10 -0
- package/es/message-card/message-card.js +114 -0
- package/es/message-card/styled-components.js +108 -0
- package/es/message-card/types.js +1 -0
- package/es/message-card/utils.js +27 -0
- package/es/modal/modal.js +4 -6
- package/es/modal/styled-components.js +8 -1
- package/es/pagination/stateful-container.js +1 -0
- package/es/pagination/stateful-pagination.js +1 -0
- package/es/pagination/styled-components.js +4 -1
- package/es/payment-card/styled-components.js +2 -1
- package/es/phone-input/base-country-picker.js +3 -1
- package/es/phone-input/country-select-dropdown.js +1 -0
- package/es/phone-input/styled-components.js +15 -4
- package/es/pin-code/styled-components.js +4 -1
- package/es/popover/popover.js +9 -12
- package/es/popover/styled-components.js +9 -4
- package/es/progress-bar/progressbar-rounded.js +1 -0
- package/es/progress-bar/styled-components.js +14 -2
- package/es/progress-steps/progress-steps.js +2 -1
- package/es/progress-steps/styled-components.js +20 -12
- package/es/radio/stateful-radiogroup-container.js +3 -0
- package/es/radio/styled-components.js +10 -3
- package/es/rating/emoticon-rating.js +2 -1
- package/es/rating/star-rating.js +2 -1
- package/es/rating/styled-components.js +5 -1
- package/es/select/autosize-input.js +2 -3
- package/es/select/default-props.js +1 -1
- package/es/select/dropdown.js +2 -1
- package/es/select/multi-value.js +2 -1
- package/es/select/select-component.js +10 -10
- package/es/select/single-select.js +2 -2
- package/es/select/stateful-select-container.js +2 -0
- package/es/select/styled-components.js +33 -6
- package/es/select/value.js +3 -4
- package/es/side-navigation/index.js +2 -1
- package/es/side-navigation/nav-item.js +1 -0
- package/es/side-navigation/nav.js +1 -1
- package/es/side-navigation/stateful-container.js +1 -0
- package/es/side-navigation/styled-components.js +8 -2
- package/es/skeleton/styled-components.js +3 -1
- package/es/slider/slider.js +4 -2
- package/es/slider/stateful-slider-container.js +2 -0
- package/es/slider/styled-components.js +9 -0
- package/es/snackbar/snackbar-element.js +1 -0
- package/es/snackbar/styled-components.js +9 -1
- package/es/spinner/styled-components.js +2 -1
- package/es/styles/__mocks__/styled.js +8 -5
- package/es/styles/styled.js +7 -6
- package/es/table/index.js +2 -1
- package/es/table/styled-components.js +13 -1
- package/es/table-grid/styled-components.js +4 -1
- package/es/table-semantic/styled-components.js +20 -3
- package/es/tabs/stateful-tabs.js +1 -0
- package/es/tabs/styled-components.js +5 -1
- package/es/tabs/tabs.js +4 -2
- package/es/tabs-motion/styled-components.js +32 -2
- package/es/tabs-motion/tab.js +1 -0
- package/es/tabs-motion/tabs.js +31 -6
- package/es/tag/styled-components.js +32 -1
- package/es/tag/tag.js +6 -2
- package/es/textarea/styled-components.js +20 -12
- package/es/textarea/textarea.js +4 -2
- package/es/themes/move-theme/typography.js +36 -0
- package/es/themes/shared/borders.js +8 -3
- package/es/themes/shared/typography.js +10 -10
- package/es/timezonepicker/timezone-picker.js +5 -1
- package/es/timezonepicker/tzdata.js +1 -1
- package/es/toast/styled-components.js +5 -1
- package/es/toast/toaster.js +0 -2
- package/es/tokens/colors.js +24 -0
- package/es/tooltip/styled-components.js +4 -1
- package/es/tree-view/index.js +2 -1
- package/es/tree-view/styled-components.js +7 -1
- package/es/tree-view/tree-view.js +3 -1
- package/es/types/globals.d.js +12 -0
- package/es/utils/deep-merge.js +0 -5
- package/es/utils/deprecated-component.js +1 -0
- package/es/utils/focusVisible.js +4 -2
- package/esm/accordion/accordion.js +4 -4
- package/esm/accordion/panel.js +3 -2
- package/esm/accordion/stateful-panel-container.js +1 -0
- package/esm/accordion/styled-components.js +8 -1
- package/esm/app-nav-bar/app-nav-bar.js +4 -2
- package/esm/app-nav-bar/mobile-menu.js +4 -2
- package/esm/app-nav-bar/styled-components.js +19 -1
- package/esm/app-nav-bar/user-menu.js +1 -1
- package/esm/aspect-ratio-box/aspect-ratio-box.js +3 -1
- package/esm/avatar/styled-components.js +4 -1
- package/esm/badge/styled-components.js +11 -6
- package/esm/banner/styled-components.js +16 -3
- package/esm/block/block.js +3 -1
- package/esm/block/styled-components.js +2 -1
- package/esm/breadcrumbs/styled-components.js +5 -1
- package/esm/button/styled-components.js +7 -0
- package/esm/button-group/stateful-button-group.js +1 -0
- package/esm/button-group/stateful-container.js +3 -1
- package/esm/button-group/styled-components.js +2 -1
- package/esm/card/index.js +2 -1
- package/esm/card/styled-components.js +12 -4
- package/esm/checkbox/index.js +1 -0
- package/esm/checkbox/styled-components.js +10 -4
- package/esm/combobox/combobox.js +78 -71
- package/esm/combobox/styled-components.js +5 -1
- package/esm/data-table/column-anchor.js +3 -0
- package/esm/data-table/column-datetime.js +12 -5
- package/esm/data-table/column-numerical.js +4 -4
- package/esm/data-table/column-string.js +3 -0
- package/esm/data-table/column.js +5 -1
- package/esm/data-table/data-table.js +6 -3
- package/esm/data-table/filter-menu.js +2 -1
- package/esm/data-table/header-cell.js +42 -34
- package/esm/data-table/locale.js +3 -1
- package/esm/data-table/measure-column-widths.js +5 -4
- package/esm/data-table/stateful-container.js +2 -1
- package/esm/data-table/stateful-data-table.js +4 -4
- package/esm/datepicker/calendar-header.js +1 -0
- package/esm/datepicker/calendar.js +2 -0
- package/esm/datepicker/datepicker.js +3 -1
- package/esm/datepicker/day.js +2 -1
- package/esm/datepicker/index.js +1 -1
- package/esm/datepicker/stateful-calendar.js +7 -3
- package/esm/datepicker/stateful-container.js +2 -0
- package/esm/datepicker/stateful-datepicker.js +9 -4
- package/esm/datepicker/styled-components.js +26 -3
- package/esm/datepicker/utils/date-helpers.js +2 -1
- package/esm/datepicker/utils/index.js +2 -1
- package/esm/divider/styled-components.js +3 -2
- package/esm/dnd-list/stateful-list-container.js +1 -0
- package/esm/dnd-list/styled-components.js +7 -0
- package/esm/drawer/constants.js +1 -0
- package/esm/drawer/drawer.js +2 -5
- package/esm/drawer/styled-components.js +9 -2
- package/esm/file-uploader/styled-components.js +6 -1
- package/esm/flex-grid/flex-grid-item.js +4 -5
- package/esm/flex-grid/flex-grid.js +7 -3
- package/esm/form-control/styled-components.js +6 -1
- package/esm/header-navigation/styled-components.js +4 -1
- package/esm/helper/styled-components.js +3 -1
- package/esm/helpers/overrides.js +9 -5
- package/esm/icon/build-icons.js +0 -2
- package/esm/icon/index.js +1 -1
- package/esm/icon/omit-dollar-prefixed-keys.js +1 -0
- package/esm/icon/styled-components.js +2 -1
- package/esm/input/base-input.js +1 -0
- package/esm/input/masked-input.js +5 -2
- package/esm/input/stateful-container.js +1 -0
- package/esm/input/styled-components.js +18 -7
- package/esm/input/utils.js +2 -0
- package/esm/layer/layer.js +24 -0
- package/esm/layer/layers-manager.js +97 -1
- package/esm/layout-grid/styled-components.js +3 -0
- package/esm/link/index.js +2 -1
- package/esm/link/styled-components.js +2 -1
- package/esm/list/list-heading.js +21 -17
- package/esm/list/list-item.js +2 -1
- package/esm/list/styled-components.js +17 -1
- package/esm/locale/es_AR.js +3 -1
- package/esm/locale/index.js +4 -1
- package/esm/locale/tr_TR.js +3 -1
- package/esm/map-marker/constants.js +12 -2
- package/esm/map-marker/index.js +2 -1
- package/esm/map-marker/location-puck.js +199 -0
- package/esm/map-marker/styled-components.js +82 -2
- package/esm/menu/index.js +1 -1
- package/esm/menu/menu.js +16 -4
- package/esm/menu/option-profile.js +1 -0
- package/esm/menu/stateful-container.js +1 -0
- package/esm/menu/styled-components.js +38 -6
- package/esm/message-card/constants.js +20 -0
- package/esm/message-card/index.js +10 -0
- package/esm/message-card/message-card.js +168 -0
- package/esm/message-card/styled-components.js +116 -0
- package/esm/message-card/types.js +1 -0
- package/esm/message-card/utils.js +26 -0
- package/esm/modal/modal.js +4 -6
- package/esm/modal/styled-components.js +8 -1
- package/esm/pagination/stateful-container.js +1 -0
- package/esm/pagination/stateful-pagination.js +1 -0
- package/esm/pagination/styled-components.js +4 -1
- package/esm/payment-card/styled-components.js +2 -1
- package/esm/phone-input/base-country-picker.js +3 -1
- package/esm/phone-input/country-select-dropdown.js +1 -0
- package/esm/phone-input/styled-components.js +20 -8
- package/esm/pin-code/styled-components.js +4 -1
- package/esm/popover/popover.js +9 -12
- package/esm/popover/styled-components.js +9 -4
- package/esm/progress-bar/progressbar-rounded.js +1 -0
- package/esm/progress-bar/styled-components.js +14 -2
- package/esm/progress-steps/progress-steps.js +2 -1
- package/esm/progress-steps/styled-components.js +28 -19
- package/esm/radio/styled-components.js +10 -3
- package/esm/rating/emoticon-rating.js +2 -1
- package/esm/rating/star-rating.js +2 -1
- package/esm/rating/styled-components.js +5 -1
- package/esm/select/autosize-input.js +2 -3
- package/esm/select/default-props.js +1 -1
- package/esm/select/dropdown.js +2 -1
- package/esm/select/multi-value.js +2 -1
- package/esm/select/select-component.js +10 -10
- package/esm/select/single-select.js +2 -2
- package/esm/select/styled-components.js +33 -6
- package/esm/select/value.js +3 -4
- package/esm/side-navigation/index.js +2 -1
- package/esm/side-navigation/nav-item.js +1 -0
- package/esm/side-navigation/nav.js +1 -1
- package/esm/side-navigation/stateful-container.js +1 -0
- package/esm/side-navigation/styled-components.js +13 -6
- package/esm/skeleton/styled-components.js +3 -1
- package/esm/slider/slider.js +4 -2
- package/esm/slider/styled-components.js +9 -0
- package/esm/snackbar/snackbar-element.js +1 -0
- package/esm/snackbar/styled-components.js +9 -1
- package/esm/spinner/styled-components.js +2 -1
- package/esm/styles/__mocks__/styled.js +8 -5
- package/esm/styles/styled.js +7 -6
- package/esm/table/index.js +2 -1
- package/esm/table/styled-components.js +13 -1
- package/esm/table-grid/styled-components.js +4 -1
- package/esm/table-semantic/styled-components.js +20 -3
- package/esm/tabs/stateful-tabs.js +1 -0
- package/esm/tabs/styled-components.js +5 -1
- package/esm/tabs/tabs.js +4 -2
- package/esm/tabs-motion/styled-components.js +68 -40
- package/esm/tabs-motion/tab.js +1 -0
- package/esm/tabs-motion/tabs.js +87 -58
- package/esm/tag/styled-components.js +5 -1
- package/esm/tag/tag.js +4 -2
- package/esm/textarea/styled-components.js +11 -6
- package/esm/textarea/textarea.js +4 -2
- package/esm/themes/move-theme/typography.js +36 -0
- package/esm/themes/shared/borders.js +8 -3
- package/esm/themes/shared/typography.js +10 -10
- package/esm/timezonepicker/timezone-picker.js +6 -2
- package/esm/timezonepicker/tzdata.js +1 -1
- package/esm/toast/styled-components.js +5 -1
- package/esm/toast/toaster.js +0 -2
- package/esm/tokens/colors.js +24 -0
- package/esm/tooltip/styled-components.js +4 -1
- package/esm/tree-view/index.js +2 -1
- package/esm/tree-view/styled-components.js +7 -1
- package/esm/tree-view/tree-view.js +3 -1
- package/esm/types/globals.d.js +12 -0
- package/esm/utils/deep-merge.js +0 -5
- package/esm/utils/deprecated-component.js +1 -0
- package/esm/utils/focusVisible.js +4 -2
- package/file-uploader/styled-components.js +6 -1
- package/flex-grid/flex-grid-item.d.ts +1 -1
- package/flex-grid/flex-grid-item.js +6 -8
- package/flex-grid/flex-grid.js +7 -3
- package/flex-grid/types.d.ts +1 -1
- package/form-control/styled-components.js +6 -1
- package/form-control/types.d.ts +1 -1
- package/header-navigation/styled-components.js +4 -1
- package/heading/types.d.ts +1 -1
- package/helper/styled-components.js +3 -1
- package/helpers/overrides.js +8 -3
- package/helpers/overrides.js.flow +1 -1
- package/helpers/types.d.ts +1 -1
- package/icon/build-icons.js +0 -2
- package/icon/build-icons.js.flow +0 -1
- package/icon/index.d.ts +1 -1
- package/icon/index.js +8 -1
- package/icon/index.js.flow +1 -1
- package/icon/omit-dollar-prefixed-keys.js +1 -0
- package/icon/styled-components.js +2 -1
- package/icon/types.d.ts +1 -1
- package/input/masked-input.js +5 -2
- package/input/stateful-container.js +1 -0
- package/input/styled-components.js +18 -7
- package/input/styled-components.js.flow +9 -2
- package/input/types.d.ts +16 -14
- package/input/types.js.flow +3 -0
- package/input/utils.js +2 -0
- package/layer/layer.js +24 -0
- package/layer/layer.js.flow +25 -0
- package/layer/layers-manager.d.ts +8 -0
- package/layer/layers-manager.js +97 -1
- package/layer/layers-manager.js.flow +84 -1
- package/layer/types.d.ts +23 -2
- package/layer/types.js.flow +22 -1
- package/layout-grid/styled-components.js +3 -0
- package/layout-grid/types.d.ts +2 -2
- package/link/index.js +2 -1
- package/link/styled-components.js +2 -1
- package/list/list-heading.js +21 -17
- package/list/list-item.js +2 -1
- package/list/styled-components.js +17 -1
- package/list/types.d.ts +2 -2
- package/locale/en_US.d.ts +1 -1
- package/locale/es_AR.d.ts +1 -1
- package/locale/es_AR.js +3 -1
- package/locale/index.js +4 -1
- package/locale/tr_TR.d.ts +1 -1
- package/locale/tr_TR.js +3 -1
- package/map-marker/constants.d.ts +14 -0
- package/map-marker/constants.js +16 -3
- package/map-marker/constants.js.flow +17 -0
- package/map-marker/index.d.ts +2 -1
- package/map-marker/index.js +24 -1
- package/map-marker/index.js.flow +5 -3
- package/map-marker/location-puck.d.ts +4 -0
- package/map-marker/location-puck.js +211 -0
- package/map-marker/location-puck.js.flow +18 -0
- package/map-marker/styled-components.d.ts +17 -1
- package/map-marker/styled-components.js +88 -2
- package/map-marker/styled-components.js.flow +58 -0
- package/map-marker/types.d.ts +33 -5
- package/map-marker/types.js.flow +37 -3
- package/menu/index.d.ts +2 -3
- package/menu/index.js +8 -1
- package/menu/index.js.flow +1 -0
- package/menu/menu.js +15 -3
- package/menu/menu.js.flow +11 -1
- package/menu/option-profile.js +1 -0
- package/menu/stateful-container.js +1 -0
- package/menu/styled-components.d.ts +1 -0
- package/menu/styled-components.js +40 -7
- package/menu/styled-components.js.flow +13 -0
- package/menu/types.d.ts +13 -13
- package/menu/types.js.flow +1 -0
- package/message-card/constants.d.ts +12 -0
- package/message-card/constants.js +25 -0
- package/message-card/index.d.ts +4 -0
- package/message-card/index.js +60 -0
- package/message-card/index.js.flow +72 -0
- package/message-card/message-card.d.ts +4 -0
- package/message-card/message-card.js +184 -0
- package/message-card/package.json +4 -0
- package/message-card/styled-components.d.ts +14 -0
- package/message-card/styled-components.js +124 -0
- package/message-card/types.d.ts +27 -0
- package/message-card/types.js +5 -0
- package/message-card/utils.d.ts +1 -0
- package/message-card/utils.js +36 -0
- package/modal/modal.js +4 -4
- package/modal/modal.js.flow +1 -3
- package/modal/styled-components.js +8 -1
- package/modal/types.d.ts +2 -2
- package/package.json +9 -11
- package/pagination/stateful-container.js +1 -0
- package/pagination/stateful-pagination.js +1 -0
- package/pagination/styled-components.js +4 -1
- package/pagination/types.d.ts +2 -2
- package/payment-card/styled-components.js +2 -1
- package/phone-input/base-country-picker.js +3 -1
- package/phone-input/country-select-dropdown.js +1 -0
- package/phone-input/styled-components.js +21 -9
- package/phone-input/types.d.ts +5 -6
- package/pin-code/styled-components.js +4 -1
- package/pin-code/types.d.ts +2 -2
- package/popover/popover.js +9 -12
- package/popover/popover.js.flow +2 -12
- package/popover/styled-components.js +12 -9
- package/popover/types.d.ts +2 -2
- package/progress-bar/progressbar-rounded.js +1 -0
- package/progress-bar/styled-components.js +14 -2
- package/progress-bar/types.d.ts +2 -2
- package/progress-steps/progress-steps.js +2 -1
- package/progress-steps/styled-components.js +28 -19
- package/radio/styled-components.js +10 -3
- package/radio/types.d.ts +19 -20
- package/rating/emoticon-rating.js +2 -1
- package/rating/star-rating.js +2 -1
- package/rating/styled-components.js +5 -1
- package/select/autosize-input.js +2 -1
- package/select/autosize-input.js.flow +1 -1
- package/select/default-props.js +1 -1
- package/select/dropdown.js +2 -1
- package/select/multi-value.js +1 -0
- package/select/select-component.d.ts +1 -1
- package/select/select-component.js +9 -7
- package/select/select-component.js.flow +1 -1
- package/select/single-select.d.ts +2 -2
- package/select/single-select.js +2 -2
- package/select/styled-components.js +33 -6
- package/select/styled-components.js.flow +25 -5
- package/select/types.d.ts +5 -6
- package/select/value.js +2 -3
- package/side-navigation/nav-item.js +1 -0
- package/side-navigation/nav.js +1 -1
- package/side-navigation/stateful-container.js +1 -0
- package/side-navigation/styled-components.js +13 -6
- package/side-navigation/types.d.ts +1 -1
- package/skeleton/styled-components.js +3 -1
- package/slider/slider.js +4 -2
- package/slider/styled-components.js +9 -0
- package/slider/types.d.ts +1 -1
- package/snackbar/snackbar-element.js +1 -0
- package/snackbar/styled-components.js +9 -1
- package/snackbar/types.d.ts +3 -4
- package/spinner/styled-components.js +2 -1
- package/spinner/types.d.ts +1 -1
- package/styles/__mocks__/styled.js +8 -3
- package/styles/styled.d.ts +1 -1
- package/styles/styled.js +7 -6
- package/table/styled-components.js +13 -1
- package/table/types.d.ts +2 -2
- package/table-grid/styled-components.js +4 -1
- package/table-semantic/styled-components.js +20 -3
- package/table-semantic/types.d.ts +2 -2
- package/tabs/stateful-tabs.js +1 -0
- package/tabs/styled-components.js +5 -1
- package/tabs/tabs.js +4 -2
- package/tabs/types.d.ts +2 -2
- package/tabs-motion/styled-components.d.ts +5 -0
- package/tabs-motion/styled-components.js +71 -41
- package/tabs-motion/styled-components.js.flow +21 -0
- package/tabs-motion/tab.js +1 -0
- package/tabs-motion/tabs.d.ts +1 -1
- package/tabs-motion/tabs.js +87 -57
- package/tabs-motion/tabs.js.flow +69 -38
- package/tabs-motion/types.d.ts +5 -2
- package/tabs-motion/types.js.flow +3 -0
- package/tabs-motion/utils.d.ts +1 -1
- package/tag/styled-components.js +5 -1
- package/tag/tag.js +4 -2
- package/tag/types.d.ts +4 -5
- package/textarea/styled-components.js +11 -6
- package/textarea/textarea.js +4 -2
- package/textarea/types.d.ts +6 -5
- package/textarea/types.js.flow +3 -1
- package/themes/move-theme/typography.d.ts +36 -0
- package/themes/move-theme/typography.js +36 -0
- package/themes/move-theme/typography.js.flow +12 -0
- package/themes/shared/borders.js +8 -3
- package/themes/shared/borders.js.flow +7 -3
- package/themes/shared/typography.js +10 -10
- package/themes/shared/typography.js.flow +10 -10
- package/themes/types.d.ts +3 -0
- package/themes/types.js.flow +3 -0
- package/timezonepicker/timezone-picker.js +6 -2
- package/timezonepicker/types.d.ts +1 -0
- package/timezonepicker/types.js.flow +1 -0
- package/timezonepicker/tzdata.js +1 -1
- package/toast/styled-components.js +5 -1
- package/toast/toaster.js.flow +1 -1
- package/toast/types.d.ts +2 -2
- package/tokens/colors.js +24 -0
- package/tokens/colors.js.flow +27 -0
- package/tokens/types.d.ts +24 -0
- package/tokens/types.js.flow +27 -0
- package/tooltip/styled-components.js +4 -1
- package/tree-view/styled-components.js +7 -1
- package/tree-view/tree-view.js +3 -1
- package/tree-view/types.d.ts +3 -4
- package/types/globals.d.js +14 -1
- package/utils/deep-merge.js +0 -6
- package/utils/deprecated-component.js +1 -0
- package/utils/focusVisible.d.ts +1 -1
- package/utils/focusVisible.js +4 -2
- package/card/images.d.ts +0 -2
- package/card/images.js +0 -17
- package/card/images.js.flow +0 -18
- package/es/card/images.js +0 -8
- package/esm/card/images.js +0 -8
|
@@ -11,7 +11,7 @@ This source code is licensed under the MIT license found in the
|
|
|
11
11
|
LICENSE file in the root directory of this source tree.
|
|
12
12
|
*/
|
|
13
13
|
import { styled } from '../styles';
|
|
14
|
-
import { BADGE_ENHANCER_STYLES, FLOATING_MARKER_ANCHOR_POSITIONS, LABEL_SIZES } from './constants';
|
|
14
|
+
import { BADGE_ENHANCER_STYLES, FLOATING_MARKER_ANCHOR_POSITIONS, LABEL_SIZES, EARNER_LOCATION_PUCK_CORE_SCALES } from './constants';
|
|
15
15
|
export var getAnchorTransform = function getAnchorTransform(anchor, anchorSize) {
|
|
16
16
|
var _FLOATING_MARKER_ANCH;
|
|
17
17
|
|
|
@@ -33,6 +33,7 @@ export var StyledDragShadowContainer = styled('div', function (_ref) {
|
|
|
33
33
|
};
|
|
34
34
|
});
|
|
35
35
|
StyledDragShadowContainer.displayName = "StyledDragShadowContainer";
|
|
36
|
+
StyledDragShadowContainer.displayName = 'StyledDragShadowContainer';
|
|
36
37
|
export var StyledDragShadow = styled('div', function (_ref2) {
|
|
37
38
|
var $theme = _ref2.$theme,
|
|
38
39
|
$background = _ref2.$background,
|
|
@@ -47,6 +48,7 @@ export var StyledDragShadow = styled('div', function (_ref2) {
|
|
|
47
48
|
};
|
|
48
49
|
});
|
|
49
50
|
StyledDragShadow.displayName = "StyledDragShadow";
|
|
51
|
+
StyledDragShadow.displayName = 'StyledDragShadow';
|
|
50
52
|
export var StyledNeedle = styled('div', function (_ref3) {
|
|
51
53
|
var $theme = _ref3.$theme,
|
|
52
54
|
$background = _ref3.$background,
|
|
@@ -59,6 +61,7 @@ export var StyledNeedle = styled('div', function (_ref3) {
|
|
|
59
61
|
};
|
|
60
62
|
});
|
|
61
63
|
StyledNeedle.displayName = "StyledNeedle";
|
|
64
|
+
StyledNeedle.displayName = 'StyledNeedle';
|
|
62
65
|
export var StyledFloatingMarkerRoot = styled('div', function (_ref4) {
|
|
63
66
|
var $size = _ref4.$size;
|
|
64
67
|
return {
|
|
@@ -68,6 +71,7 @@ export var StyledFloatingMarkerRoot = styled('div', function (_ref4) {
|
|
|
68
71
|
};
|
|
69
72
|
});
|
|
70
73
|
StyledFloatingMarkerRoot.displayName = "StyledFloatingMarkerRoot";
|
|
74
|
+
StyledFloatingMarkerRoot.displayName = 'StyledFloatingMarkerRoot';
|
|
71
75
|
export var StyledFloatingMarkerPinHeadContainer = styled('div', function (_ref5) {
|
|
72
76
|
var $theme = _ref5.$theme,
|
|
73
77
|
$anchor = _ref5.$anchor,
|
|
@@ -79,12 +83,14 @@ export var StyledFloatingMarkerPinHeadContainer = styled('div', function (_ref5)
|
|
|
79
83
|
};
|
|
80
84
|
});
|
|
81
85
|
StyledFloatingMarkerPinHeadContainer.displayName = "StyledFloatingMarkerPinHeadContainer";
|
|
86
|
+
StyledFloatingMarkerPinHeadContainer.displayName = 'StyledFloatingMarkerPinHeadContainer';
|
|
82
87
|
export var StyledFloatingMarkerAnchorContainer = styled('div', function () {
|
|
83
88
|
return {
|
|
84
89
|
position: 'absolute'
|
|
85
90
|
};
|
|
86
91
|
});
|
|
87
92
|
StyledFloatingMarkerAnchorContainer.displayName = "StyledFloatingMarkerAnchorContainer";
|
|
93
|
+
StyledFloatingMarkerAnchorContainer.displayName = 'StyledFloatingMarkerAnchorContainer';
|
|
88
94
|
export var StyledFixedMarkerRoot = styled('div', function () {
|
|
89
95
|
return {
|
|
90
96
|
display: 'flex',
|
|
@@ -93,6 +99,7 @@ export var StyledFixedMarkerRoot = styled('div', function () {
|
|
|
93
99
|
};
|
|
94
100
|
});
|
|
95
101
|
StyledFixedMarkerRoot.displayName = "StyledFixedMarkerRoot";
|
|
102
|
+
StyledFixedMarkerRoot.displayName = 'StyledFixedMarkerRoot';
|
|
96
103
|
export var StyledFixedMarkerDragContainer = styled('div', function (_ref6) {
|
|
97
104
|
var $theme = _ref6.$theme,
|
|
98
105
|
$translateAmount = _ref6.$translateAmount,
|
|
@@ -106,6 +113,7 @@ export var StyledFixedMarkerDragContainer = styled('div', function (_ref6) {
|
|
|
106
113
|
};
|
|
107
114
|
});
|
|
108
115
|
StyledFixedMarkerDragContainer.displayName = "StyledFixedMarkerDragContainer";
|
|
116
|
+
StyledFixedMarkerDragContainer.displayName = 'StyledFixedMarkerDragContainer';
|
|
109
117
|
export var StyledOuterXXSmallAnchor = styled('div', function (_ref7) {
|
|
110
118
|
var $theme = _ref7.$theme,
|
|
111
119
|
$round = _ref7.$round,
|
|
@@ -123,6 +131,7 @@ export var StyledOuterXXSmallAnchor = styled('div', function (_ref7) {
|
|
|
123
131
|
};
|
|
124
132
|
});
|
|
125
133
|
StyledOuterXXSmallAnchor.displayName = "StyledOuterXXSmallAnchor";
|
|
134
|
+
StyledOuterXXSmallAnchor.displayName = 'StyledOuterXXSmallAnchor';
|
|
126
135
|
export var StyledInnerXXSmallAnchor = styled('div', function (_ref8) {
|
|
127
136
|
var $round = _ref8.$round,
|
|
128
137
|
$color = _ref8.$color,
|
|
@@ -135,6 +144,7 @@ export var StyledInnerXXSmallAnchor = styled('div', function (_ref8) {
|
|
|
135
144
|
};
|
|
136
145
|
});
|
|
137
146
|
StyledInnerXXSmallAnchor.displayName = "StyledInnerXXSmallAnchor";
|
|
147
|
+
StyledInnerXXSmallAnchor.displayName = 'StyledInnerXXSmallAnchor';
|
|
138
148
|
export var StyledOuterXSmallAnchor = styled('div', function (_ref9) {
|
|
139
149
|
var $theme = _ref9.$theme,
|
|
140
150
|
$round = _ref9.$round,
|
|
@@ -152,6 +162,7 @@ export var StyledOuterXSmallAnchor = styled('div', function (_ref9) {
|
|
|
152
162
|
};
|
|
153
163
|
});
|
|
154
164
|
StyledOuterXSmallAnchor.displayName = "StyledOuterXSmallAnchor";
|
|
165
|
+
StyledOuterXSmallAnchor.displayName = 'StyledOuterXSmallAnchor';
|
|
155
166
|
export var StyledInnerXSmallAnchor = styled('div', function (_ref10) {
|
|
156
167
|
var $round = _ref10.$round,
|
|
157
168
|
$color = _ref10.$color,
|
|
@@ -164,6 +175,7 @@ export var StyledInnerXSmallAnchor = styled('div', function (_ref10) {
|
|
|
164
175
|
};
|
|
165
176
|
});
|
|
166
177
|
StyledInnerXSmallAnchor.displayName = "StyledInnerXSmallAnchor";
|
|
178
|
+
StyledInnerXSmallAnchor.displayName = 'StyledInnerXSmallAnchor';
|
|
167
179
|
export var StyledPinHead = styled('div', function (_ref11) {
|
|
168
180
|
var $theme = _ref11.$theme,
|
|
169
181
|
$height = _ref11.$height,
|
|
@@ -196,6 +208,7 @@ export var StyledPinHead = styled('div', function (_ref11) {
|
|
|
196
208
|
});
|
|
197
209
|
});
|
|
198
210
|
StyledPinHead.displayName = "StyledPinHead";
|
|
211
|
+
StyledPinHead.displayName = 'StyledPinHead';
|
|
199
212
|
export var StyledStrokedLabelContainer = styled('div', function (_ref12) {
|
|
200
213
|
var $position = _ref12.$position,
|
|
201
214
|
$theme = _ref12.$theme,
|
|
@@ -240,6 +253,7 @@ export var StyledStrokedLabelContainer = styled('div', function (_ref12) {
|
|
|
240
253
|
}, positions[$position]);
|
|
241
254
|
});
|
|
242
255
|
StyledStrokedLabelContainer.displayName = "StyledStrokedLabelContainer";
|
|
256
|
+
StyledStrokedLabelContainer.displayName = 'StyledStrokedLabelContainer';
|
|
243
257
|
export var StyledStrokedLabel = styled('div', function (_ref13) {
|
|
244
258
|
var $theme = _ref13.$theme,
|
|
245
259
|
$size = _ref13.$size;
|
|
@@ -258,6 +272,7 @@ export var StyledStrokedLabel = styled('div', function (_ref13) {
|
|
|
258
272
|
});
|
|
259
273
|
});
|
|
260
274
|
StyledStrokedLabel.displayName = "StyledStrokedLabel";
|
|
275
|
+
StyledStrokedLabel.displayName = 'StyledStrokedLabel';
|
|
261
276
|
export var StyledBadgeEnhancerRoot = styled('div', function (_ref14) {
|
|
262
277
|
var $theme = _ref14.$theme,
|
|
263
278
|
$size = _ref14.$size,
|
|
@@ -276,12 +291,14 @@ export var StyledBadgeEnhancerRoot = styled('div', function (_ref14) {
|
|
|
276
291
|
}, BADGE_ENHANCER_STYLES[$size]);
|
|
277
292
|
});
|
|
278
293
|
StyledBadgeEnhancerRoot.displayName = "StyledBadgeEnhancerRoot";
|
|
294
|
+
StyledBadgeEnhancerRoot.displayName = 'StyledBadgeEnhancerRoot';
|
|
279
295
|
export var RelativeContainer = styled('div', function () {
|
|
280
296
|
return {
|
|
281
297
|
position: 'relative'
|
|
282
298
|
};
|
|
283
299
|
});
|
|
284
300
|
RelativeContainer.displayName = "RelativeContainer";
|
|
301
|
+
RelativeContainer.displayName = 'RelativeContainer';
|
|
285
302
|
export var StyledContentItem = styled('div', function (_ref15) {
|
|
286
303
|
var $theme = _ref15.$theme,
|
|
287
304
|
$color = _ref15.$color,
|
|
@@ -296,4 +313,67 @@ export var StyledContentItem = styled('div', function (_ref15) {
|
|
|
296
313
|
color: $color
|
|
297
314
|
});
|
|
298
315
|
});
|
|
299
|
-
StyledContentItem.displayName = "StyledContentItem";
|
|
316
|
+
StyledContentItem.displayName = "StyledContentItem";
|
|
317
|
+
StyledContentItem.displayName = 'StyledContentItem';
|
|
318
|
+
export var LocationPuckContainer = styled('div', function () {
|
|
319
|
+
return {
|
|
320
|
+
position: 'relative',
|
|
321
|
+
display: 'flex',
|
|
322
|
+
alignItems: 'center',
|
|
323
|
+
justifyContent: 'center'
|
|
324
|
+
};
|
|
325
|
+
});
|
|
326
|
+
LocationPuckContainer.displayName = "LocationPuckContainer";
|
|
327
|
+
LocationPuckContainer.displayName = 'LocationPuckContainer';
|
|
328
|
+
export var consumerLocationShadow = {
|
|
329
|
+
boxShadow: "0px 2px 4px 0px rgba(67, 76, 123, 0.2)"
|
|
330
|
+
};
|
|
331
|
+
export var earnerLocationShadow = {
|
|
332
|
+
boxShadow: "0px 3px 5px 0px rgba(67, 76, 123, 0.4)"
|
|
333
|
+
};
|
|
334
|
+
export var StyledConsumerLocationPuckCore = styled('div', function (_ref16) {
|
|
335
|
+
var $theme = _ref16.$theme;
|
|
336
|
+
return _objectSpread({
|
|
337
|
+
height: "".concat(12, "px"),
|
|
338
|
+
width: "".concat(12, "px"),
|
|
339
|
+
background: $theme.colors.contentAccent,
|
|
340
|
+
borderRadius: "".concat(100, "px "),
|
|
341
|
+
position: 'absolute'
|
|
342
|
+
}, consumerLocationShadow);
|
|
343
|
+
});
|
|
344
|
+
StyledConsumerLocationPuckCore.displayName = "StyledConsumerLocationPuckCore";
|
|
345
|
+
export var StyledLocationPuckApproximation = styled('div', function (_ref17) {
|
|
346
|
+
var $theme = _ref17.$theme,
|
|
347
|
+
$color = _ref17.$color,
|
|
348
|
+
$radius = _ref17.$radius;
|
|
349
|
+
return {
|
|
350
|
+
background: $color,
|
|
351
|
+
opacity: 0.12,
|
|
352
|
+
height: "".concat($radius / 2, "px"),
|
|
353
|
+
width: "".concat($radius / 2, "px"),
|
|
354
|
+
borderRadius: "".concat(10000, "px "),
|
|
355
|
+
position: 'absolute',
|
|
356
|
+
transition: "".concat($theme.animation.timing300, " ").concat($theme.animation.easeOutCurve, " all")
|
|
357
|
+
};
|
|
358
|
+
});
|
|
359
|
+
StyledLocationPuckApproximation.displayName = "StyledLocationPuckApproximation";
|
|
360
|
+
StyledLocationPuckApproximation.displayName = 'StyledLocationPuckApproximation';
|
|
361
|
+
export var StyledEarnerLocationPuckCore = styled('div', function (_ref18) {
|
|
362
|
+
var $theme = _ref18.$theme,
|
|
363
|
+
$color = _ref18.$color,
|
|
364
|
+
$size = _ref18.$size;
|
|
365
|
+
return _objectSpread(_objectSpread({
|
|
366
|
+
position: 'absolute',
|
|
367
|
+
transform: "scale(".concat(EARNER_LOCATION_PUCK_CORE_SCALES[$size], ")"),
|
|
368
|
+
transition: "".concat($theme.animation.timing300, " ").concat($theme.animation.easeOutCurve, " all")
|
|
369
|
+
}, earnerLocationShadow), {}, {
|
|
370
|
+
borderRadius: '50%',
|
|
371
|
+
height: "".concat(72, "px"),
|
|
372
|
+
width: "".concat(72, "px"),
|
|
373
|
+
background: $theme.colors.backgroundPrimary,
|
|
374
|
+
border: "".concat(6, "px solid ", $color),
|
|
375
|
+
boxSizing: 'border-box'
|
|
376
|
+
});
|
|
377
|
+
});
|
|
378
|
+
StyledEarnerLocationPuckCore.displayName = "StyledEarnerLocationPuckCore";
|
|
379
|
+
StyledEarnerLocationPuckCore.displayName = 'StyledEarnerLocationPuckCore';
|
package/esm/menu/index.js
CHANGED
|
@@ -13,6 +13,6 @@ export { default as NestedMenus, NestedMenuContext } from './nested-menus'; // C
|
|
|
13
13
|
|
|
14
14
|
export { KEY_STRINGS, STATE_CHANGE_TYPES } from './constants'; // Styled elements
|
|
15
15
|
|
|
16
|
-
export { StyledEmptyState, StyledList, StyledListItem, StyledListItemProfile, StyledProfileImgContainer, StyledProfileImg, StyledProfileLabelsContainer, StyledProfileTitle, StyledProfileSubtitle, StyledProfileBody } from './styled-components'; // Flow
|
|
16
|
+
export { StyledEmptyState, StyledList, StyledListItem, StyledListItemProfile, StyledProfileImgContainer, StyledProfileImg, StyledProfileLabelsContainer, StyledProfileTitle, StyledProfileSubtitle, StyledProfileBody, StyledMenuDivider } from './styled-components'; // Flow
|
|
17
17
|
|
|
18
18
|
export * from './types';
|
package/esm/menu/menu.js
CHANGED
|
@@ -27,7 +27,7 @@ LICENSE file in the root directory of this source tree.
|
|
|
27
27
|
import * as React from 'react';
|
|
28
28
|
import { LocaleContext } from '../locale'; // Components
|
|
29
29
|
|
|
30
|
-
import { StyledList, StyledEmptyState, StyledOptgroupHeader } from './styled-components';
|
|
30
|
+
import { StyledList, StyledEmptyState, StyledOptgroupHeader, StyledMenuDivider } from './styled-components';
|
|
31
31
|
import OptionList from './option-list';
|
|
32
32
|
import { getOverrides } from '../helpers/overrides'; // Types
|
|
33
33
|
|
|
@@ -59,7 +59,8 @@ export default function Menu(props) {
|
|
|
59
59
|
if (isFocusVisible(event)) {
|
|
60
60
|
setFocusVisible(true);
|
|
61
61
|
}
|
|
62
|
-
};
|
|
62
|
+
}; // eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
63
|
+
|
|
63
64
|
|
|
64
65
|
var handleBlur = function handleBlur(event) {
|
|
65
66
|
if (focusVisible !== false) {
|
|
@@ -87,6 +88,11 @@ export default function Menu(props) {
|
|
|
87
88
|
OptgroupHeader = _getOverrides8[0],
|
|
88
89
|
optgroupHeaderProps = _getOverrides8[1];
|
|
89
90
|
|
|
91
|
+
var _getOverrides9 = getOverrides(overrides.MenuDivider, StyledMenuDivider),
|
|
92
|
+
_getOverrides10 = _slicedToArray(_getOverrides9, 2),
|
|
93
|
+
MenuDivider = _getOverrides10[0],
|
|
94
|
+
menuDividerProps = _getOverrides10[1];
|
|
95
|
+
|
|
90
96
|
var groupedItems = Array.isArray(props.items) ? {
|
|
91
97
|
__ungrouped: props.items
|
|
92
98
|
} : props.items;
|
|
@@ -101,15 +107,21 @@ export default function Menu(props) {
|
|
|
101
107
|
els.push( /*#__PURE__*/React.createElement(OptgroupHeader, _extends({
|
|
102
108
|
key: optgroup
|
|
103
109
|
}, optgroupHeaderProps), optgroup));
|
|
104
|
-
}
|
|
110
|
+
} // eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
111
|
+
|
|
105
112
|
|
|
106
113
|
var groupItems = groupedItems[optgroup].map(function (item, index) {
|
|
107
|
-
itemIndex = itemIndex + 1;
|
|
114
|
+
itemIndex = itemIndex + 1; // eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
115
|
+
|
|
108
116
|
var _props$getRequiredIte = props.getRequiredItemProps,
|
|
109
117
|
getRequiredItemProps = _props$getRequiredIte === void 0 ? function (item, index) {
|
|
110
118
|
return {};
|
|
111
119
|
} : _props$getRequiredIte;
|
|
112
120
|
|
|
121
|
+
if (item.divider === true) {
|
|
122
|
+
return /*#__PURE__*/React.createElement(MenuDivider, menuDividerProps);
|
|
123
|
+
}
|
|
124
|
+
|
|
113
125
|
var _getRequiredItemProps = getRequiredItemProps(item, itemIndex),
|
|
114
126
|
disabled = _getRequiredItemProps.disabled,
|
|
115
127
|
isFocused = _getRequiredItemProps.isFocused,
|
|
@@ -30,6 +30,7 @@ import MaybeChildMenu from './maybe-child-menu';
|
|
|
30
30
|
import { StyledListItemProfile, StyledProfileImgContainer, StyledProfileImg, StyledProfileLabelsContainer, StyledProfileTitle, StyledProfileSubtitle, StyledProfileBody } from './styled-components';
|
|
31
31
|
import { getOverrides } from '../helpers/overrides'; // Types
|
|
32
32
|
|
|
33
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
33
34
|
function OptionProfile(props, ref) {
|
|
34
35
|
var item = props.item,
|
|
35
36
|
getChildMenu = props.getChildMenu,
|
|
@@ -468,6 +468,7 @@ var MenuStatefulContainerInner = /*#__PURE__*/function (_React$Component) {
|
|
|
468
468
|
handleMouseLeave: this.handleMouseLeave,
|
|
469
469
|
highlightedIndex: this.state.highlightedIndex,
|
|
470
470
|
isFocused: this.state.isFocused,
|
|
471
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
471
472
|
handleKeyDown: this.props.keyboardControlNode.current ? function (event) {} : this.onKeyDown,
|
|
472
473
|
focusMenu: this.focusMenu,
|
|
473
474
|
unfocusMenu: this.unfocusMenu
|
|
@@ -45,6 +45,7 @@ export var StyledList = styled('ul', function (_ref) {
|
|
|
45
45
|
};
|
|
46
46
|
});
|
|
47
47
|
StyledList.displayName = "StyledList";
|
|
48
|
+
StyledList.displayName = 'StyledList';
|
|
48
49
|
|
|
49
50
|
function getFontColor(props) {
|
|
50
51
|
if (props.$disabled) {
|
|
@@ -92,6 +93,7 @@ export var StyledEmptyState = styled('li', function (props) {
|
|
|
92
93
|
});
|
|
93
94
|
});
|
|
94
95
|
StyledEmptyState.displayName = "StyledEmptyState";
|
|
96
|
+
StyledEmptyState.displayName = 'StyledEmptyState';
|
|
95
97
|
export var StyledOptgroupHeader = styled('li', function (props) {
|
|
96
98
|
var paddingX = props.$theme.sizing.scale300;
|
|
97
99
|
var paddingY = props.$theme.sizing.scale200;
|
|
@@ -104,6 +106,7 @@ export var StyledOptgroupHeader = styled('li', function (props) {
|
|
|
104
106
|
});
|
|
105
107
|
});
|
|
106
108
|
StyledOptgroupHeader.displayName = "StyledOptgroupHeader";
|
|
109
|
+
StyledOptgroupHeader.displayName = 'StyledOptgroupHeader';
|
|
107
110
|
export var StyledListItemAnchor = styled('a', function (props) {
|
|
108
111
|
return {
|
|
109
112
|
display: 'block',
|
|
@@ -111,11 +114,13 @@ export var StyledListItemAnchor = styled('a', function (props) {
|
|
|
111
114
|
};
|
|
112
115
|
});
|
|
113
116
|
StyledListItemAnchor.displayName = "StyledListItemAnchor";
|
|
117
|
+
StyledListItemAnchor.displayName = 'StyledListItemAnchor';
|
|
114
118
|
export var StyledListItemElement = styled('li', function (props) {
|
|
115
119
|
var $disabled = props.$disabled,
|
|
116
120
|
$theme = props.$theme,
|
|
117
121
|
$size = props.$size;
|
|
118
122
|
return _objectSpread(_objectSpread({}, $size === OPTION_LIST_SIZE.compact ? $theme.typography.font100 : $theme.typography.font200), {}, {
|
|
123
|
+
boxSizing: 'border-box',
|
|
119
124
|
position: 'relative',
|
|
120
125
|
display: 'block',
|
|
121
126
|
color: getFontColor(props),
|
|
@@ -135,13 +140,16 @@ export var StyledListItemElement = styled('li', function (props) {
|
|
|
135
140
|
});
|
|
136
141
|
});
|
|
137
142
|
StyledListItemElement.displayName = "StyledListItemElement";
|
|
143
|
+
StyledListItemElement.displayName = 'StyledListItemElement';
|
|
138
144
|
export var StyledListItem = withWrapper(StyledListItemElement, function (Styled) {
|
|
139
|
-
return
|
|
140
|
-
|
|
141
|
-
|
|
145
|
+
return (// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
146
|
+
function StyledListItem(_ref2) {
|
|
147
|
+
var item = _ref2.item,
|
|
148
|
+
restProps = _objectWithoutProperties(_ref2, _excluded);
|
|
142
149
|
|
|
143
|
-
|
|
144
|
-
|
|
150
|
+
return /*#__PURE__*/React.createElement(Styled, restProps);
|
|
151
|
+
}
|
|
152
|
+
);
|
|
145
153
|
});
|
|
146
154
|
export var StyledListItemProfile = styled('li', function (_ref3) {
|
|
147
155
|
var $theme = _ref3.$theme;
|
|
@@ -163,6 +171,7 @@ export var StyledListItemProfile = styled('li', function (_ref3) {
|
|
|
163
171
|
};
|
|
164
172
|
});
|
|
165
173
|
StyledListItemProfile.displayName = "StyledListItemProfile";
|
|
174
|
+
StyledListItemProfile.displayName = 'StyledListItemProfile';
|
|
166
175
|
export var StyledProfileImgContainer = styled('div', {
|
|
167
176
|
width: '60px',
|
|
168
177
|
height: '60px',
|
|
@@ -171,6 +180,7 @@ export var StyledProfileImgContainer = styled('div', {
|
|
|
171
180
|
alignItems: 'center'
|
|
172
181
|
});
|
|
173
182
|
StyledProfileImgContainer.displayName = "StyledProfileImgContainer";
|
|
183
|
+
StyledProfileImgContainer.displayName = 'StyledProfileImgContainer';
|
|
174
184
|
export var StyledProfileImg = styled('img', {
|
|
175
185
|
width: '100%',
|
|
176
186
|
height: '100%',
|
|
@@ -180,6 +190,7 @@ export var StyledProfileImg = styled('img', {
|
|
|
180
190
|
borderBottomLeftRadius: '50%'
|
|
181
191
|
});
|
|
182
192
|
StyledProfileImg.displayName = "StyledProfileImg";
|
|
193
|
+
StyledProfileImg.displayName = 'StyledProfileImg';
|
|
183
194
|
export var StyledProfileLabelsContainer = styled('div', function (_ref4) {
|
|
184
195
|
var _ref4$$theme = _ref4.$theme,
|
|
185
196
|
direction = _ref4$$theme.direction,
|
|
@@ -195,6 +206,7 @@ export var StyledProfileLabelsContainer = styled('div', function (_ref4) {
|
|
|
195
206
|
});
|
|
196
207
|
});
|
|
197
208
|
StyledProfileLabelsContainer.displayName = "StyledProfileLabelsContainer";
|
|
209
|
+
StyledProfileLabelsContainer.displayName = 'StyledProfileLabelsContainer';
|
|
198
210
|
export var StyledProfileTitle = styled('h6', function (_ref5) {
|
|
199
211
|
var $theme = _ref5.$theme;
|
|
200
212
|
return _objectSpread(_objectSpread({}, $theme.typography.font350), {}, {
|
|
@@ -206,6 +218,7 @@ export var StyledProfileTitle = styled('h6', function (_ref5) {
|
|
|
206
218
|
});
|
|
207
219
|
});
|
|
208
220
|
StyledProfileTitle.displayName = "StyledProfileTitle";
|
|
221
|
+
StyledProfileTitle.displayName = 'StyledProfileTitle';
|
|
209
222
|
export var StyledProfileSubtitle = styled('p', function (_ref6) {
|
|
210
223
|
var $theme = _ref6.$theme;
|
|
211
224
|
return _objectSpread(_objectSpread({}, $theme.typography.font200), {}, {
|
|
@@ -217,6 +230,7 @@ export var StyledProfileSubtitle = styled('p', function (_ref6) {
|
|
|
217
230
|
});
|
|
218
231
|
});
|
|
219
232
|
StyledProfileSubtitle.displayName = "StyledProfileSubtitle";
|
|
233
|
+
StyledProfileSubtitle.displayName = 'StyledProfileSubtitle';
|
|
220
234
|
export var StyledProfileBody = styled('p', function (_ref7) {
|
|
221
235
|
var $theme = _ref7.$theme;
|
|
222
236
|
return _objectSpread(_objectSpread({}, $theme.typography.font100), {}, {
|
|
@@ -227,4 +241,22 @@ export var StyledProfileBody = styled('p', function (_ref7) {
|
|
|
227
241
|
marginRight: 0
|
|
228
242
|
});
|
|
229
243
|
});
|
|
230
|
-
StyledProfileBody.displayName = "StyledProfileBody";
|
|
244
|
+
StyledProfileBody.displayName = "StyledProfileBody";
|
|
245
|
+
StyledProfileBody.displayName = 'StyledProfileBody';
|
|
246
|
+
export var StyledMenuDivider = styled('li', function (_ref8) {
|
|
247
|
+
var $theme = _ref8.$theme;
|
|
248
|
+
return {
|
|
249
|
+
color: $theme.colors.contentPrimary,
|
|
250
|
+
borderBottomWidth: $theme.borders.border300.borderWidth,
|
|
251
|
+
borderBottomStyle: $theme.borders.border300.borderStyle,
|
|
252
|
+
borderBottomColor: $theme.borders.border300.borderColor,
|
|
253
|
+
marginTop: $theme.sizing.scale100,
|
|
254
|
+
marginBottom: $theme.sizing.scale100,
|
|
255
|
+
marginLeft: $theme.sizing.scale500,
|
|
256
|
+
marginRight: $theme.sizing.scale500,
|
|
257
|
+
listStyle: 'none',
|
|
258
|
+
height: 0
|
|
259
|
+
};
|
|
260
|
+
});
|
|
261
|
+
StyledMenuDivider.displayName = "StyledMenuDivider";
|
|
262
|
+
StyledProfileBody.displayName = 'StyledMenuDivider';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
var _Object$freeze;
|
|
2
|
+
|
|
3
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
4
|
+
|
|
5
|
+
/*
|
|
6
|
+
Copyright (c) Uber Technologies, Inc.
|
|
7
|
+
|
|
8
|
+
This source code is licensed under the MIT license found in the
|
|
9
|
+
LICENSE file in the root directory of this source tree.
|
|
10
|
+
*/
|
|
11
|
+
import { KIND } from '../button';
|
|
12
|
+
export var BACKGROUND_COLOR_TYPE = Object.freeze({
|
|
13
|
+
light: 'light',
|
|
14
|
+
dark: 'dark'
|
|
15
|
+
});
|
|
16
|
+
export var IMAGE_LAYOUT = Object.freeze({
|
|
17
|
+
top: 'top',
|
|
18
|
+
trailing: 'trailing'
|
|
19
|
+
});
|
|
20
|
+
export var BUTTON_KIND = Object.freeze((_Object$freeze = {}, _defineProperty(_Object$freeze, KIND.secondary, KIND.secondary), _defineProperty(_Object$freeze, KIND.tertiary, KIND.tertiary), _Object$freeze));
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright (c) Uber Technologies, Inc.
|
|
3
|
+
|
|
4
|
+
This source code is licensed under the MIT license found in the
|
|
5
|
+
LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
export { default as MessageCard } from './message-card';
|
|
8
|
+
export * from './constants';
|
|
9
|
+
export * from './styled-components';
|
|
10
|
+
export * from './types';
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
var _excluded = ["children"];
|
|
2
|
+
|
|
3
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
4
|
+
|
|
5
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
6
|
+
|
|
7
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
8
|
+
|
|
9
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
|
|
10
|
+
|
|
11
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
12
|
+
|
|
13
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
14
|
+
|
|
15
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
16
|
+
|
|
17
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
18
|
+
|
|
19
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
20
|
+
|
|
21
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
22
|
+
|
|
23
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
24
|
+
|
|
25
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
26
|
+
|
|
27
|
+
/*
|
|
28
|
+
Copyright (c) Uber Technologies, Inc.
|
|
29
|
+
|
|
30
|
+
This source code is licensed under the MIT license found in the
|
|
31
|
+
LICENSE file in the root directory of this source tree.
|
|
32
|
+
*/
|
|
33
|
+
import * as React from 'react';
|
|
34
|
+
import { StyledRoot, StyledImage, StyledContentContainer, StyledHeadingContainer, StyledParagraphContainer } from './styled-components';
|
|
35
|
+
import { Button as DefaultButton, SHAPE, SIZE } from '../button';
|
|
36
|
+
import { useStyletron } from '../styles/index';
|
|
37
|
+
import { ThemeProvider, LightTheme } from '../';
|
|
38
|
+
import { getBackgroundColorType } from './utils';
|
|
39
|
+
import { colors } from '../tokens';
|
|
40
|
+
import { getOverrides } from '../helpers/overrides';
|
|
41
|
+
import { IMAGE_LAYOUT, BACKGROUND_COLOR_TYPE, BUTTON_KIND } from './constants';
|
|
42
|
+
|
|
43
|
+
var ButtonAlwaysLightTheme = function ButtonAlwaysLightTheme(_ref) {
|
|
44
|
+
var children = _ref.children,
|
|
45
|
+
restProps = _objectWithoutProperties(_ref, _excluded);
|
|
46
|
+
|
|
47
|
+
return /*#__PURE__*/React.createElement(ThemeProvider, {
|
|
48
|
+
theme: LightTheme
|
|
49
|
+
}, /*#__PURE__*/React.createElement(DefaultButton, restProps, children));
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
var MessageCard = function MessageCard(_ref2) {
|
|
53
|
+
var _ref2$backgroundColor = _ref2.backgroundColor,
|
|
54
|
+
backgroundColor = _ref2$backgroundColor === void 0 ? colors.white : _ref2$backgroundColor,
|
|
55
|
+
backgroundColorTypeProp = _ref2.backgroundColorType,
|
|
56
|
+
_ref2$buttonKind = _ref2.buttonKind,
|
|
57
|
+
buttonKind = _ref2$buttonKind === void 0 ? BUTTON_KIND.secondary : _ref2$buttonKind,
|
|
58
|
+
buttonLabel = _ref2.buttonLabel,
|
|
59
|
+
heading = _ref2.heading,
|
|
60
|
+
image = _ref2.image,
|
|
61
|
+
onClick = _ref2.onClick,
|
|
62
|
+
_ref2$overrides = _ref2.overrides,
|
|
63
|
+
overrides = _ref2$overrides === void 0 ? {} : _ref2$overrides,
|
|
64
|
+
paragraph = _ref2.paragraph;
|
|
65
|
+
|
|
66
|
+
var _ref3 = image || {},
|
|
67
|
+
src = _ref3.src,
|
|
68
|
+
_ref3$layout = _ref3.layout,
|
|
69
|
+
layout = _ref3$layout === void 0 ? IMAGE_LAYOUT.top : _ref3$layout,
|
|
70
|
+
backgroundPosition = _ref3.backgroundPosition,
|
|
71
|
+
ariaLabel = _ref3.ariaLabel;
|
|
72
|
+
|
|
73
|
+
var _getOverrides = getOverrides(overrides.Root, StyledRoot),
|
|
74
|
+
_getOverrides2 = _slicedToArray(_getOverrides, 2),
|
|
75
|
+
Root = _getOverrides2[0],
|
|
76
|
+
RootProps = _getOverrides2[1];
|
|
77
|
+
|
|
78
|
+
var _getOverrides3 = getOverrides(overrides.ContentContainer, StyledContentContainer),
|
|
79
|
+
_getOverrides4 = _slicedToArray(_getOverrides3, 2),
|
|
80
|
+
ContentContainer = _getOverrides4[0],
|
|
81
|
+
ContentContainerProps = _getOverrides4[1];
|
|
82
|
+
|
|
83
|
+
var _getOverrides5 = getOverrides(overrides.HeadingContainer, StyledHeadingContainer),
|
|
84
|
+
_getOverrides6 = _slicedToArray(_getOverrides5, 2),
|
|
85
|
+
HeadingContainer = _getOverrides6[0],
|
|
86
|
+
HeadingContainerProps = _getOverrides6[1];
|
|
87
|
+
|
|
88
|
+
var _getOverrides7 = getOverrides(overrides.ParagraphContainer, StyledParagraphContainer),
|
|
89
|
+
_getOverrides8 = _slicedToArray(_getOverrides7, 2),
|
|
90
|
+
ParagraphContainer = _getOverrides8[0],
|
|
91
|
+
ParagraphContainerProps = _getOverrides8[1];
|
|
92
|
+
|
|
93
|
+
var _getOverrides9 = getOverrides(overrides.Image, StyledImage),
|
|
94
|
+
_getOverrides10 = _slicedToArray(_getOverrides9, 2),
|
|
95
|
+
Image = _getOverrides10[0],
|
|
96
|
+
ImageProps = _getOverrides10[1];
|
|
97
|
+
|
|
98
|
+
var _getOverrides11 = getOverrides(overrides.Button, ButtonAlwaysLightTheme),
|
|
99
|
+
_getOverrides12 = _slicedToArray(_getOverrides11, 2),
|
|
100
|
+
Button = _getOverrides12[0],
|
|
101
|
+
ButtonProps = _getOverrides12[1];
|
|
102
|
+
|
|
103
|
+
var _useStyletron = useStyletron(),
|
|
104
|
+
_useStyletron2 = _slicedToArray(_useStyletron, 2),
|
|
105
|
+
theme = _useStyletron2[1];
|
|
106
|
+
|
|
107
|
+
var backgroundColorType = backgroundColorTypeProp || getBackgroundColorType(backgroundColor);
|
|
108
|
+
|
|
109
|
+
if (!backgroundColorType) {
|
|
110
|
+
backgroundColorType = BACKGROUND_COLOR_TYPE.dark;
|
|
111
|
+
|
|
112
|
+
if (process.env.NODE_ENV !== "production") {
|
|
113
|
+
console.warn("The provided value for 'backgroundColor', ".concat(backgroundColor, ", is not recognized as a Base Web primitive color. Please use the 'backgroundColorType' prop to indicate whether this color is light or dark so the rest of the component can be styled accordingly."));
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
var buttonColors;
|
|
118
|
+
|
|
119
|
+
if (buttonKind === BUTTON_KIND.tertiary && backgroundColorType === BACKGROUND_COLOR_TYPE.dark) {
|
|
120
|
+
buttonColors = {
|
|
121
|
+
color: theme.colors.contentOnColor,
|
|
122
|
+
backgroundColor: theme.colors.buttonTertiaryFill
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
if (buttonKind !== BUTTON_KIND.tertiary && backgroundColor !== colors.white) {
|
|
127
|
+
buttonColors = {
|
|
128
|
+
color: theme.colors.contentOnColorInverse,
|
|
129
|
+
backgroundColor: theme.colors.backgroundAlwaysLight
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
return /*#__PURE__*/React.createElement(Root, _extends({
|
|
134
|
+
onClick: onClick,
|
|
135
|
+
$backgroundColor: backgroundColor,
|
|
136
|
+
$backgroundColorType: backgroundColorType,
|
|
137
|
+
$imageLayout: layout
|
|
138
|
+
}, RootProps), image && /*#__PURE__*/React.createElement(Image, _extends({
|
|
139
|
+
role: "img",
|
|
140
|
+
"aria-label": ariaLabel,
|
|
141
|
+
$src: src,
|
|
142
|
+
$imageLayout: layout,
|
|
143
|
+
$backgroundPosition: backgroundPosition
|
|
144
|
+
}, ImageProps)), /*#__PURE__*/React.createElement(ContentContainer, ContentContainerProps, heading && /*#__PURE__*/React.createElement(HeadingContainer, HeadingContainerProps, heading), paragraph && /*#__PURE__*/React.createElement(ParagraphContainer, ParagraphContainerProps, paragraph), buttonLabel && /*#__PURE__*/React.createElement(Button, _extends({
|
|
145
|
+
$as: "div",
|
|
146
|
+
kind: buttonKind,
|
|
147
|
+
shape: SHAPE.pill,
|
|
148
|
+
size: SIZE.compact,
|
|
149
|
+
role: "none",
|
|
150
|
+
tabIndex: -1,
|
|
151
|
+
colors: buttonColors,
|
|
152
|
+
overrides: {
|
|
153
|
+
BaseButton: {
|
|
154
|
+
style: _objectSpread({
|
|
155
|
+
textAlign: 'center',
|
|
156
|
+
pointerEvents: 'none'
|
|
157
|
+
}, buttonKind === BUTTON_KIND.tertiary ? {
|
|
158
|
+
marginTop: theme.sizing.scale100,
|
|
159
|
+
transform: theme.direction === 'rtl' ? "translateX(".concat(theme.sizing.scale500, ")") : "translateX(-".concat(theme.sizing.scale500, ")")
|
|
160
|
+
} : {
|
|
161
|
+
marginTop: theme.sizing.scale500
|
|
162
|
+
})
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}, ButtonProps), buttonLabel)));
|
|
166
|
+
};
|
|
167
|
+
|
|
168
|
+
export default MessageCard;
|