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
|
@@ -0,0 +1,72 @@
|
|
|
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
|
+
// @flow
|
|
8
|
+
import * as React from 'react';
|
|
9
|
+
import type { OverrideT } from '../helpers/overrides.js';
|
|
10
|
+
import { type StyletronComponent } from 'styletron-react';
|
|
11
|
+
|
|
12
|
+
declare export var BACKGROUND_COLOR_TYPE: {
|
|
13
|
+
light: 'light',
|
|
14
|
+
dark: 'dark',
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
declare export var IMAGE_LAYOUT: {
|
|
18
|
+
top: 'top',
|
|
19
|
+
trailing: 'trailing',
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
declare export var BUTTON_KIND: {
|
|
23
|
+
secondary: 'secondary',
|
|
24
|
+
tertiary: 'tertiary',
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export type MessageCardOverridesT = {
|
|
28
|
+
Root?: OverrideT,
|
|
29
|
+
ContentContainer?: OverrideT,
|
|
30
|
+
HeadingContainer?: OverrideT,
|
|
31
|
+
ParagraphContainer?: OverrideT,
|
|
32
|
+
Button?: OverrideT,
|
|
33
|
+
Image?: OverrideT,
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export type MessageCardPropsT = {
|
|
37
|
+
onClick: (SyntheticEvent<HTMLButtonElement>) => mixed,
|
|
38
|
+
heading?: string,
|
|
39
|
+
paragraph?: string,
|
|
40
|
+
buttonLabel?: string,
|
|
41
|
+
buttonKind?: $Values<typeof BUTTON_KIND>,
|
|
42
|
+
backgroundColor?: string,
|
|
43
|
+
backgroundColorType?: $Values<typeof BACKGROUND_COLOR_TYPE>,
|
|
44
|
+
image?: {
|
|
45
|
+
src: string,
|
|
46
|
+
layout?: $Values<typeof IMAGE_LAYOUT>,
|
|
47
|
+
backgroundPosition?: string,
|
|
48
|
+
},
|
|
49
|
+
overrides?: MessageCardOverridesT,
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
declare export var StyledRoot: StyletronComponent<
|
|
53
|
+
'button',
|
|
54
|
+
{
|
|
55
|
+
$backgroundColor: string,
|
|
56
|
+
$backgroundColorType: ?$Values<typeof BACKGROUND_COLOR_TYPE>,
|
|
57
|
+
$imageLayout: $Values<typeof IMAGE_LAYOUT>,
|
|
58
|
+
}
|
|
59
|
+
>;
|
|
60
|
+
declare export var StyledImage: StyletronComponent<
|
|
61
|
+
'img',
|
|
62
|
+
{ $src: string, $imageLayout: $Values<typeof IMAGE_LAYOUT>, $backgroundPosition: string }
|
|
63
|
+
>;
|
|
64
|
+
declare export var StyledContentContainer: StyletronComponent<'div', {}>;
|
|
65
|
+
declare export var StyledHeadingContainer: StyletronComponent<'div', {}>;
|
|
66
|
+
declare export var StyledParagraphContainer: StyletronComponent<'div', {}>;
|
|
67
|
+
|
|
68
|
+
declare export var MessageCard: React.ComponentType<MessageCardPropsT>;
|
|
69
|
+
|
|
70
|
+
declare var __DEV__: boolean;
|
|
71
|
+
declare var __NODE__: boolean;
|
|
72
|
+
declare var __BROWSER__: boolean;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { MessageCardProps } from './types';
|
|
3
|
+
declare const MessageCard: ({ backgroundColor, backgroundColorType: backgroundColorTypeProp, buttonKind, buttonLabel, heading, image, onClick, overrides, paragraph, }: MessageCardProps) => JSX.Element;
|
|
4
|
+
export default MessageCard;
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = void 0;
|
|
9
|
+
|
|
10
|
+
var React = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
12
|
+
var _styledComponents = require("./styled-components");
|
|
13
|
+
|
|
14
|
+
var _button = require("../button");
|
|
15
|
+
|
|
16
|
+
var _index = require("../styles/index");
|
|
17
|
+
|
|
18
|
+
var _ = require("../");
|
|
19
|
+
|
|
20
|
+
var _utils = require("./utils");
|
|
21
|
+
|
|
22
|
+
var _tokens = require("../tokens");
|
|
23
|
+
|
|
24
|
+
var _overrides = require("../helpers/overrides");
|
|
25
|
+
|
|
26
|
+
var _constants = require("./constants");
|
|
27
|
+
|
|
28
|
+
var _excluded = ["children"];
|
|
29
|
+
|
|
30
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
31
|
+
|
|
32
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && 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; }
|
|
33
|
+
|
|
34
|
+
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; }
|
|
35
|
+
|
|
36
|
+
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; }
|
|
37
|
+
|
|
38
|
+
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; }
|
|
39
|
+
|
|
40
|
+
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); }
|
|
41
|
+
|
|
42
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
43
|
+
|
|
44
|
+
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."); }
|
|
45
|
+
|
|
46
|
+
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); }
|
|
47
|
+
|
|
48
|
+
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; }
|
|
49
|
+
|
|
50
|
+
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; }
|
|
51
|
+
|
|
52
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
53
|
+
|
|
54
|
+
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; }
|
|
55
|
+
|
|
56
|
+
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; }
|
|
57
|
+
|
|
58
|
+
var ButtonAlwaysLightTheme = function ButtonAlwaysLightTheme(_ref) {
|
|
59
|
+
var children = _ref.children,
|
|
60
|
+
restProps = _objectWithoutProperties(_ref, _excluded);
|
|
61
|
+
|
|
62
|
+
return /*#__PURE__*/React.createElement(_.ThemeProvider, {
|
|
63
|
+
theme: _.LightTheme
|
|
64
|
+
}, /*#__PURE__*/React.createElement(_button.Button, restProps, children));
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
var MessageCard = function MessageCard(_ref2) {
|
|
68
|
+
var _ref2$backgroundColor = _ref2.backgroundColor,
|
|
69
|
+
backgroundColor = _ref2$backgroundColor === void 0 ? _tokens.colors.white : _ref2$backgroundColor,
|
|
70
|
+
backgroundColorTypeProp = _ref2.backgroundColorType,
|
|
71
|
+
_ref2$buttonKind = _ref2.buttonKind,
|
|
72
|
+
buttonKind = _ref2$buttonKind === void 0 ? _constants.BUTTON_KIND.secondary : _ref2$buttonKind,
|
|
73
|
+
buttonLabel = _ref2.buttonLabel,
|
|
74
|
+
heading = _ref2.heading,
|
|
75
|
+
image = _ref2.image,
|
|
76
|
+
onClick = _ref2.onClick,
|
|
77
|
+
_ref2$overrides = _ref2.overrides,
|
|
78
|
+
overrides = _ref2$overrides === void 0 ? {} : _ref2$overrides,
|
|
79
|
+
paragraph = _ref2.paragraph;
|
|
80
|
+
|
|
81
|
+
var _ref3 = image || {},
|
|
82
|
+
src = _ref3.src,
|
|
83
|
+
_ref3$layout = _ref3.layout,
|
|
84
|
+
layout = _ref3$layout === void 0 ? _constants.IMAGE_LAYOUT.top : _ref3$layout,
|
|
85
|
+
backgroundPosition = _ref3.backgroundPosition,
|
|
86
|
+
ariaLabel = _ref3.ariaLabel;
|
|
87
|
+
|
|
88
|
+
var _getOverrides = (0, _overrides.getOverrides)(overrides.Root, _styledComponents.StyledRoot),
|
|
89
|
+
_getOverrides2 = _slicedToArray(_getOverrides, 2),
|
|
90
|
+
Root = _getOverrides2[0],
|
|
91
|
+
RootProps = _getOverrides2[1];
|
|
92
|
+
|
|
93
|
+
var _getOverrides3 = (0, _overrides.getOverrides)(overrides.ContentContainer, _styledComponents.StyledContentContainer),
|
|
94
|
+
_getOverrides4 = _slicedToArray(_getOverrides3, 2),
|
|
95
|
+
ContentContainer = _getOverrides4[0],
|
|
96
|
+
ContentContainerProps = _getOverrides4[1];
|
|
97
|
+
|
|
98
|
+
var _getOverrides5 = (0, _overrides.getOverrides)(overrides.HeadingContainer, _styledComponents.StyledHeadingContainer),
|
|
99
|
+
_getOverrides6 = _slicedToArray(_getOverrides5, 2),
|
|
100
|
+
HeadingContainer = _getOverrides6[0],
|
|
101
|
+
HeadingContainerProps = _getOverrides6[1];
|
|
102
|
+
|
|
103
|
+
var _getOverrides7 = (0, _overrides.getOverrides)(overrides.ParagraphContainer, _styledComponents.StyledParagraphContainer),
|
|
104
|
+
_getOverrides8 = _slicedToArray(_getOverrides7, 2),
|
|
105
|
+
ParagraphContainer = _getOverrides8[0],
|
|
106
|
+
ParagraphContainerProps = _getOverrides8[1];
|
|
107
|
+
|
|
108
|
+
var _getOverrides9 = (0, _overrides.getOverrides)(overrides.Image, _styledComponents.StyledImage),
|
|
109
|
+
_getOverrides10 = _slicedToArray(_getOverrides9, 2),
|
|
110
|
+
Image = _getOverrides10[0],
|
|
111
|
+
ImageProps = _getOverrides10[1];
|
|
112
|
+
|
|
113
|
+
var _getOverrides11 = (0, _overrides.getOverrides)(overrides.Button, ButtonAlwaysLightTheme),
|
|
114
|
+
_getOverrides12 = _slicedToArray(_getOverrides11, 2),
|
|
115
|
+
Button = _getOverrides12[0],
|
|
116
|
+
ButtonProps = _getOverrides12[1];
|
|
117
|
+
|
|
118
|
+
var _useStyletron = (0, _index.useStyletron)(),
|
|
119
|
+
_useStyletron2 = _slicedToArray(_useStyletron, 2),
|
|
120
|
+
theme = _useStyletron2[1];
|
|
121
|
+
|
|
122
|
+
var backgroundColorType = backgroundColorTypeProp || (0, _utils.getBackgroundColorType)(backgroundColor);
|
|
123
|
+
|
|
124
|
+
if (!backgroundColorType) {
|
|
125
|
+
backgroundColorType = _constants.BACKGROUND_COLOR_TYPE.dark;
|
|
126
|
+
|
|
127
|
+
if (process.env.NODE_ENV !== "production") {
|
|
128
|
+
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."));
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
var buttonColors;
|
|
133
|
+
|
|
134
|
+
if (buttonKind === _constants.BUTTON_KIND.tertiary && backgroundColorType === _constants.BACKGROUND_COLOR_TYPE.dark) {
|
|
135
|
+
buttonColors = {
|
|
136
|
+
color: theme.colors.contentOnColor,
|
|
137
|
+
backgroundColor: theme.colors.buttonTertiaryFill
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
if (buttonKind !== _constants.BUTTON_KIND.tertiary && backgroundColor !== _tokens.colors.white) {
|
|
142
|
+
buttonColors = {
|
|
143
|
+
color: theme.colors.contentOnColorInverse,
|
|
144
|
+
backgroundColor: theme.colors.backgroundAlwaysLight
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
return /*#__PURE__*/React.createElement(Root, _extends({
|
|
149
|
+
onClick: onClick,
|
|
150
|
+
$backgroundColor: backgroundColor,
|
|
151
|
+
$backgroundColorType: backgroundColorType,
|
|
152
|
+
$imageLayout: layout
|
|
153
|
+
}, RootProps), image && /*#__PURE__*/React.createElement(Image, _extends({
|
|
154
|
+
role: "img",
|
|
155
|
+
"aria-label": ariaLabel,
|
|
156
|
+
$src: src,
|
|
157
|
+
$imageLayout: layout,
|
|
158
|
+
$backgroundPosition: backgroundPosition
|
|
159
|
+
}, 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({
|
|
160
|
+
$as: "div",
|
|
161
|
+
kind: buttonKind,
|
|
162
|
+
shape: _button.SHAPE.pill,
|
|
163
|
+
size: _button.SIZE.compact,
|
|
164
|
+
role: "none",
|
|
165
|
+
tabIndex: -1,
|
|
166
|
+
colors: buttonColors,
|
|
167
|
+
overrides: {
|
|
168
|
+
BaseButton: {
|
|
169
|
+
style: _objectSpread({
|
|
170
|
+
textAlign: 'center',
|
|
171
|
+
pointerEvents: 'none'
|
|
172
|
+
}, buttonKind === _constants.BUTTON_KIND.tertiary ? {
|
|
173
|
+
marginTop: theme.sizing.scale100,
|
|
174
|
+
transform: theme.direction === 'rtl' ? "translateX(".concat(theme.sizing.scale500, ")") : "translateX(-".concat(theme.sizing.scale500, ")")
|
|
175
|
+
} : {
|
|
176
|
+
marginTop: theme.sizing.scale500
|
|
177
|
+
})
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}, ButtonProps), buttonLabel)));
|
|
181
|
+
};
|
|
182
|
+
|
|
183
|
+
var _default = MessageCard;
|
|
184
|
+
exports.default = _default;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { IMAGE_LAYOUT, BACKGROUND_COLOR_TYPE } from './constants';
|
|
2
|
+
export declare const StyledRoot: import("styletron-react").StyletronComponent<"button", {
|
|
3
|
+
$backgroundColor: string;
|
|
4
|
+
$backgroundColorType: keyof typeof BACKGROUND_COLOR_TYPE;
|
|
5
|
+
$imageLayout: keyof typeof IMAGE_LAYOUT | undefined;
|
|
6
|
+
}>;
|
|
7
|
+
export declare const StyledImage: import("styletron-react").StyletronComponent<"div", {
|
|
8
|
+
$src: string;
|
|
9
|
+
$imageLayout: keyof typeof IMAGE_LAYOUT;
|
|
10
|
+
$backgroundPosition: string;
|
|
11
|
+
}>;
|
|
12
|
+
export declare const StyledContentContainer: import("styletron-react").StyletronComponent<"div", {}>;
|
|
13
|
+
export declare const StyledHeadingContainer: import("styletron-react").StyletronComponent<"div", {}>;
|
|
14
|
+
export declare const StyledParagraphContainer: import("styletron-react").StyletronComponent<"div", {}>;
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.StyledRoot = exports.StyledParagraphContainer = exports.StyledImage = exports.StyledHeadingContainer = exports.StyledContentContainer = void 0;
|
|
7
|
+
|
|
8
|
+
var _styles = require("../styles");
|
|
9
|
+
|
|
10
|
+
var _constants = require("./constants");
|
|
11
|
+
|
|
12
|
+
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; }
|
|
13
|
+
|
|
14
|
+
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; }
|
|
15
|
+
|
|
16
|
+
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; }
|
|
17
|
+
|
|
18
|
+
var StyledRoot = (0, _styles.styled)('button', function (_ref) {
|
|
19
|
+
var $theme = _ref.$theme,
|
|
20
|
+
$backgroundColor = _ref.$backgroundColor,
|
|
21
|
+
$backgroundColorType = _ref.$backgroundColorType,
|
|
22
|
+
_ref$$imageLayout = _ref.$imageLayout,
|
|
23
|
+
$imageLayout = _ref$$imageLayout === void 0 ? _constants.IMAGE_LAYOUT.top : _ref$$imageLayout;
|
|
24
|
+
var lightBackgroundStyle = {
|
|
25
|
+
color: $theme.colors.contentOnColorInverse,
|
|
26
|
+
borderStyle: 'solid',
|
|
27
|
+
borderWidth: $theme.sizing.scale0,
|
|
28
|
+
borderColor: $theme.colors.borderOpaque
|
|
29
|
+
};
|
|
30
|
+
var darkBackgroundStyle = {
|
|
31
|
+
color: $theme.colors.contentOnColor,
|
|
32
|
+
border: 'none'
|
|
33
|
+
};
|
|
34
|
+
return _objectSpread(_objectSpread({
|
|
35
|
+
alignItems: 'stretch',
|
|
36
|
+
backgroundColor: $backgroundColor,
|
|
37
|
+
borderRadius: $theme.borders.radius400,
|
|
38
|
+
cursor: 'pointer',
|
|
39
|
+
display: 'flex',
|
|
40
|
+
flexDirection: $imageLayout === _constants.IMAGE_LAYOUT.top ? 'column' : 'row',
|
|
41
|
+
overflow: 'hidden',
|
|
42
|
+
padding: '0',
|
|
43
|
+
position: 'relative',
|
|
44
|
+
textAlign: 'start',
|
|
45
|
+
width: '100%',
|
|
46
|
+
boxShadow: "inset 999px 999px 0px ".concat($theme.colors.backgroundOverlayArt)
|
|
47
|
+
}, $backgroundColorType === _constants.BACKGROUND_COLOR_TYPE.light ? lightBackgroundStyle : darkBackgroundStyle), {}, {
|
|
48
|
+
':focus': {
|
|
49
|
+
outlineWidth: '3px',
|
|
50
|
+
outlineStyle: 'solid',
|
|
51
|
+
outlineColor: $theme.colors.borderAccent,
|
|
52
|
+
outlineOffset: '-3px'
|
|
53
|
+
},
|
|
54
|
+
':hover:after': {
|
|
55
|
+
content: '""',
|
|
56
|
+
width: '100%',
|
|
57
|
+
height: '100%',
|
|
58
|
+
zIndex: '1',
|
|
59
|
+
position: 'absolute',
|
|
60
|
+
top: '0',
|
|
61
|
+
left: '0',
|
|
62
|
+
backgroundColor: $backgroundColorType === _constants.BACKGROUND_COLOR_TYPE.light ? 'rgba(0, 0, 0, 0.04)' : 'rgba(255, 255, 255, 0.10)'
|
|
63
|
+
},
|
|
64
|
+
':active:after': {
|
|
65
|
+
content: '""',
|
|
66
|
+
width: '100%',
|
|
67
|
+
height: '100%',
|
|
68
|
+
zIndex: '1',
|
|
69
|
+
position: 'absolute',
|
|
70
|
+
top: '0',
|
|
71
|
+
left: '0',
|
|
72
|
+
backgroundColor: $backgroundColorType === _constants.BACKGROUND_COLOR_TYPE.light ? 'rgba(0, 0, 0, 0.08)' : 'rgba(255, 255, 255, 0.20)'
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
});
|
|
76
|
+
exports.StyledRoot = StyledRoot;
|
|
77
|
+
StyledRoot.displayName = "StyledRoot";
|
|
78
|
+
var StyledImage = (0, _styles.styled)('div', function (_ref2) {
|
|
79
|
+
var _ref2$$imageLayout = _ref2.$imageLayout,
|
|
80
|
+
$imageLayout = _ref2$$imageLayout === void 0 ? _constants.IMAGE_LAYOUT.top : _ref2$$imageLayout,
|
|
81
|
+
_ref2$$backgroundPosi = _ref2.$backgroundPosition,
|
|
82
|
+
$backgroundPosition = _ref2$$backgroundPosi === void 0 ? 'center' : _ref2$$backgroundPosi,
|
|
83
|
+
$src = _ref2.$src;
|
|
84
|
+
return _objectSpread({
|
|
85
|
+
backgroundImage: "url(".concat($src, ")"),
|
|
86
|
+
backgroundSize: 'cover',
|
|
87
|
+
backgroundPosition: $backgroundPosition
|
|
88
|
+
}, $imageLayout === _constants.IMAGE_LAYOUT.top ? {
|
|
89
|
+
height: '132px',
|
|
90
|
+
width: '100%'
|
|
91
|
+
} : {
|
|
92
|
+
width: '112px',
|
|
93
|
+
order: '1'
|
|
94
|
+
});
|
|
95
|
+
});
|
|
96
|
+
exports.StyledImage = StyledImage;
|
|
97
|
+
StyledImage.displayName = "StyledImage";
|
|
98
|
+
var StyledContentContainer = (0, _styles.styled)('div', function (_ref3) {
|
|
99
|
+
var $theme = _ref3.$theme;
|
|
100
|
+
return {
|
|
101
|
+
width: '100%',
|
|
102
|
+
boxSizing: 'border-box',
|
|
103
|
+
paddingTop: $theme.sizing.scale600,
|
|
104
|
+
paddingRight: $theme.sizing.scale300,
|
|
105
|
+
paddingBottom: $theme.sizing.scale600,
|
|
106
|
+
paddingLeft: $theme.sizing.scale600
|
|
107
|
+
};
|
|
108
|
+
});
|
|
109
|
+
exports.StyledContentContainer = StyledContentContainer;
|
|
110
|
+
StyledContentContainer.displayName = "StyledContentContainer";
|
|
111
|
+
var StyledHeadingContainer = (0, _styles.styled)('div', function (_ref4) {
|
|
112
|
+
var $theme = _ref4.$theme;
|
|
113
|
+
return _objectSpread({}, $theme.typography.HeadingXSmall);
|
|
114
|
+
});
|
|
115
|
+
exports.StyledHeadingContainer = StyledHeadingContainer;
|
|
116
|
+
StyledHeadingContainer.displayName = "StyledHeadingContainer";
|
|
117
|
+
var StyledParagraphContainer = (0, _styles.styled)('div', function (_ref5) {
|
|
118
|
+
var $theme = _ref5.$theme;
|
|
119
|
+
return _objectSpread(_objectSpread({}, $theme.typography.ParagraphSmall), {}, {
|
|
120
|
+
marginTop: $theme.sizing.scale100
|
|
121
|
+
});
|
|
122
|
+
});
|
|
123
|
+
exports.StyledParagraphContainer = StyledParagraphContainer;
|
|
124
|
+
StyledParagraphContainer.displayName = "StyledParagraphContainer";
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { SyntheticEvent } from 'react';
|
|
2
|
+
import type { Override } from '../helpers/overrides';
|
|
3
|
+
import type { BACKGROUND_COLOR_TYPE, IMAGE_LAYOUT, BUTTON_KIND } from './constants';
|
|
4
|
+
export declare type MessageCardOverrides = {
|
|
5
|
+
Root?: Override;
|
|
6
|
+
ContentContainer?: Override;
|
|
7
|
+
HeadingContainer?: Override;
|
|
8
|
+
ParagraphContainer?: Override;
|
|
9
|
+
Button?: Override;
|
|
10
|
+
Image?: Override;
|
|
11
|
+
};
|
|
12
|
+
export interface MessageCardProps {
|
|
13
|
+
onClick: (a: SyntheticEvent<HTMLButtonElement>) => unknown;
|
|
14
|
+
heading?: React.ReactNode;
|
|
15
|
+
paragraph?: React.ReactNode;
|
|
16
|
+
buttonLabel?: React.ReactNode;
|
|
17
|
+
buttonKind?: keyof typeof BUTTON_KIND;
|
|
18
|
+
backgroundColor?: string;
|
|
19
|
+
backgroundColorType?: keyof typeof BACKGROUND_COLOR_TYPE;
|
|
20
|
+
image?: {
|
|
21
|
+
src: string;
|
|
22
|
+
layout?: keyof typeof IMAGE_LAYOUT;
|
|
23
|
+
backgroundPosition?: string;
|
|
24
|
+
ariaLabel: string;
|
|
25
|
+
};
|
|
26
|
+
overrides?: MessageCardOverrides;
|
|
27
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getBackgroundColorType(backgroundColor: string): "dark" | "light";
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getBackgroundColorType = getBackgroundColorType;
|
|
7
|
+
|
|
8
|
+
var _tokens = require("../tokens");
|
|
9
|
+
|
|
10
|
+
var _constants = require("./constants");
|
|
11
|
+
|
|
12
|
+
/*
|
|
13
|
+
Copyright (c) Uber Technologies, Inc.
|
|
14
|
+
|
|
15
|
+
This source code is licensed under the MIT license found in the
|
|
16
|
+
LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/
|
|
18
|
+
var LIGHT_COLORS = new Set([_tokens.colors.red50, _tokens.colors.red100, _tokens.colors.red200, _tokens.colors.red300, _tokens.colors.green50, _tokens.colors.green100, _tokens.colors.green200, _tokens.colors.green300, _tokens.colors.teal50, _tokens.colors.teal100, _tokens.colors.teal200, _tokens.colors.teal300, _tokens.colors.blue50, _tokens.colors.blue100, _tokens.colors.blue200, _tokens.colors.blue300, _tokens.colors.cobalt50, _tokens.colors.cobalt100, _tokens.colors.cobalt200, _tokens.colors.purple50, _tokens.colors.purple100, _tokens.colors.purple200, _tokens.colors.purple300, _tokens.colors.magenta50, _tokens.colors.magenta100, _tokens.colors.magenta200, _tokens.colors.magenta300, _tokens.colors.brown50, _tokens.colors.brown100, _tokens.colors.brown200, _tokens.colors.brown300, _tokens.colors.orange50, _tokens.colors.orange100, _tokens.colors.orange200, _tokens.colors.orange300, _tokens.colors.orange400, _tokens.colors.lime50, _tokens.colors.lime100, _tokens.colors.lime200, _tokens.colors.lime300, _tokens.colors.lime400, _tokens.colors.platinum50, _tokens.colors.platinum100, _tokens.colors.platinum200, _tokens.colors.platinum300, _tokens.colors.platinum400, _tokens.colors.yellow50, _tokens.colors.yellow100, _tokens.colors.yellow200, _tokens.colors.yellow300, _tokens.colors.yellow400, _tokens.colors.yellow500, _tokens.colors.white, _tokens.colors.gray50, _tokens.colors.gray100, _tokens.colors.gray200, _tokens.colors.gray300, _tokens.colors.gray400]);
|
|
19
|
+
var DARK_COLORS = new Set([_tokens.colors.red400, _tokens.colors.red500, _tokens.colors.red600, _tokens.colors.red700, _tokens.colors.green400, _tokens.colors.green500, _tokens.colors.green600, _tokens.colors.green700, _tokens.colors.teal400, _tokens.colors.teal500, _tokens.colors.teal600, _tokens.colors.teal700, _tokens.colors.blue400, _tokens.colors.blue500, _tokens.colors.blue600, _tokens.colors.blue700, _tokens.colors.cobalt300, _tokens.colors.cobalt400, _tokens.colors.cobalt500, _tokens.colors.cobalt600, _tokens.colors.cobalt700, _tokens.colors.purple400, _tokens.colors.purple500, _tokens.colors.purple600, _tokens.colors.purple700, _tokens.colors.magenta400, _tokens.colors.magenta500, _tokens.colors.magenta600, _tokens.colors.magenta700, _tokens.colors.brown400, _tokens.colors.brown500, _tokens.colors.brown600, _tokens.colors.brown700, _tokens.colors.orange500, _tokens.colors.orange600, _tokens.colors.orange700, _tokens.colors.lime500, _tokens.colors.lime600, _tokens.colors.lime700, _tokens.colors.platinum500, _tokens.colors.platinum600, _tokens.colors.platinum700, _tokens.colors.platinum800, _tokens.colors.yellow600, _tokens.colors.yellow700, _tokens.colors.gray500, _tokens.colors.gray600, _tokens.colors.gray700, _tokens.colors.gray800, _tokens.colors.gray900, _tokens.colors.black]);
|
|
20
|
+
var POOR_CONTRAST_COLORS = new Set([_tokens.colors.red300, _tokens.colors.gray500, _tokens.colors.yellow600]);
|
|
21
|
+
|
|
22
|
+
function getBackgroundColorType(backgroundColor) {
|
|
23
|
+
if (process.env.NODE_ENV !== "production" && POOR_CONTRAST_COLORS.has(backgroundColor)) {
|
|
24
|
+
console.warn("The provided value for backgroundColor, ".concat(backgroundColor, ", is not supported because it does not pass accessibility contrast tests for either white or black text."));
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
if (LIGHT_COLORS.has(backgroundColor)) {
|
|
28
|
+
return _constants.BACKGROUND_COLOR_TYPE.light;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
if (DARK_COLORS.has(backgroundColor)) {
|
|
32
|
+
return _constants.BACKGROUND_COLOR_TYPE.dark;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
return null;
|
|
36
|
+
}
|
package/modal/modal.js
CHANGED
|
@@ -217,7 +217,6 @@ var Modal = /*#__PURE__*/function (_React$Component) {
|
|
|
217
217
|
}
|
|
218
218
|
|
|
219
219
|
if (this.animateStartTimer) {
|
|
220
|
-
// eslint-disable-next-line cup/no-undef
|
|
221
220
|
cancelAnimationFrame(this.animateStartTimer);
|
|
222
221
|
}
|
|
223
222
|
}
|
|
@@ -236,8 +235,7 @@ var Modal = /*#__PURE__*/function (_React$Component) {
|
|
|
236
235
|
|
|
237
236
|
|
|
238
237
|
this.clearTimers();
|
|
239
|
-
this.disableMountNodeScroll();
|
|
240
|
-
|
|
238
|
+
this.disableMountNodeScroll();
|
|
241
239
|
this.animateStartTimer = requestAnimationFrame(function () {
|
|
242
240
|
_this2.setState({
|
|
243
241
|
isVisible: true
|
|
@@ -287,6 +285,7 @@ var Modal = /*#__PURE__*/function (_React$Component) {
|
|
|
287
285
|
if (mountNode) {
|
|
288
286
|
return mountNode;
|
|
289
287
|
} // Flow thinks body could be null (cast through any)
|
|
288
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
290
289
|
|
|
291
290
|
|
|
292
291
|
return document.body;
|
|
@@ -347,7 +346,8 @@ var Modal = /*#__PURE__*/function (_React$Component) {
|
|
|
347
346
|
}, /*#__PURE__*/React.createElement(Root, _extends({
|
|
348
347
|
"data-baseweb": "modal",
|
|
349
348
|
ref: _this3.rootRef
|
|
350
|
-
}, sharedProps, rootProps), /*#__PURE__*/React.createElement(DialogContainer
|
|
349
|
+
}, sharedProps, rootProps), /*#__PURE__*/React.createElement(DialogContainer // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
350
|
+
, _extends({
|
|
351
351
|
ref: _this3.dialogContainerRef
|
|
352
352
|
}, sharedProps, dialogContainerProps), /*#__PURE__*/React.createElement(Dialog, _extends({
|
|
353
353
|
tabIndex: -1,
|
package/modal/modal.js.flow
CHANGED
|
@@ -6,7 +6,7 @@ LICENSE file in the root directory of this source tree.
|
|
|
6
6
|
*/
|
|
7
7
|
// @flow
|
|
8
8
|
/* global document */
|
|
9
|
-
|
|
9
|
+
|
|
10
10
|
import * as React from 'react';
|
|
11
11
|
import FocusLock from 'react-focus-lock';
|
|
12
12
|
|
|
@@ -148,7 +148,6 @@ class Modal extends React.Component<ModalPropsT, ModalStateT> {
|
|
|
148
148
|
clearTimeout(this.animateOutTimer);
|
|
149
149
|
}
|
|
150
150
|
if (this.animateStartTimer) {
|
|
151
|
-
// eslint-disable-next-line cup/no-undef
|
|
152
151
|
cancelAnimationFrame(this.animateStartTimer);
|
|
153
152
|
}
|
|
154
153
|
}
|
|
@@ -166,7 +165,6 @@ class Modal extends React.Component<ModalPropsT, ModalStateT> {
|
|
|
166
165
|
|
|
167
166
|
this.disableMountNodeScroll();
|
|
168
167
|
|
|
169
|
-
// eslint-disable-next-line cup/no-undef
|
|
170
168
|
this.animateStartTimer = requestAnimationFrame(() => {
|
|
171
169
|
this.setState({ isVisible: true });
|
|
172
170
|
});
|
|
@@ -50,6 +50,7 @@ var Root = (0, _styles.styled)('div', function (props) {
|
|
|
50
50
|
});
|
|
51
51
|
exports.Root = Root;
|
|
52
52
|
Root.displayName = "Root";
|
|
53
|
+
Root.displayName = 'Root';
|
|
53
54
|
var DialogContainer = (0, _styles.styled)('div', function (props) {
|
|
54
55
|
var $animate = props.$animate,
|
|
55
56
|
$isOpen = props.$isOpen,
|
|
@@ -76,6 +77,7 @@ var DialogContainer = (0, _styles.styled)('div', function (props) {
|
|
|
76
77
|
});
|
|
77
78
|
exports.DialogContainer = DialogContainer;
|
|
78
79
|
DialogContainer.displayName = "DialogContainer";
|
|
80
|
+
DialogContainer.displayName = 'DialogContainer';
|
|
79
81
|
var Dialog = (0, _styles.styled)('div', function (props) {
|
|
80
82
|
var $animate = props.$animate,
|
|
81
83
|
$isOpen = props.$isOpen,
|
|
@@ -113,6 +115,7 @@ var Dialog = (0, _styles.styled)('div', function (props) {
|
|
|
113
115
|
});
|
|
114
116
|
exports.Dialog = Dialog;
|
|
115
117
|
Dialog.displayName = "Dialog";
|
|
118
|
+
Dialog.displayName = 'Dialog';
|
|
116
119
|
var Close = (0, _styles.styled)('button', function (props) {
|
|
117
120
|
var _ref;
|
|
118
121
|
|
|
@@ -156,6 +159,7 @@ var Close = (0, _styles.styled)('button', function (props) {
|
|
|
156
159
|
});
|
|
157
160
|
exports.Close = Close;
|
|
158
161
|
Close.displayName = "Close";
|
|
162
|
+
Close.displayName = 'Close';
|
|
159
163
|
var ModalHeader = (0, _styles.styled)('div', function (_ref2) {
|
|
160
164
|
var _objectSpread2;
|
|
161
165
|
|
|
@@ -170,6 +174,7 @@ var ModalHeader = (0, _styles.styled)('div', function (_ref2) {
|
|
|
170
174
|
});
|
|
171
175
|
exports.ModalHeader = ModalHeader;
|
|
172
176
|
ModalHeader.displayName = "ModalHeader";
|
|
177
|
+
ModalHeader.displayName = 'ModalHeader';
|
|
173
178
|
var ModalBody = (0, _styles.styled)('div', function (_ref3) {
|
|
174
179
|
var $theme = _ref3.$theme;
|
|
175
180
|
return _objectSpread(_objectSpread({}, $theme.typography.font200), {}, {
|
|
@@ -182,6 +187,7 @@ var ModalBody = (0, _styles.styled)('div', function (_ref3) {
|
|
|
182
187
|
});
|
|
183
188
|
exports.ModalBody = ModalBody;
|
|
184
189
|
ModalBody.displayName = "ModalBody";
|
|
190
|
+
ModalBody.displayName = 'ModalBody';
|
|
185
191
|
var ModalFooter = (0, _styles.styled)('div', function (_ref4) {
|
|
186
192
|
var $theme = _ref4.$theme;
|
|
187
193
|
return _objectSpread(_objectSpread({}, $theme.typography.font200), {}, {
|
|
@@ -194,4 +200,5 @@ var ModalFooter = (0, _styles.styled)('div', function (_ref4) {
|
|
|
194
200
|
});
|
|
195
201
|
});
|
|
196
202
|
exports.ModalFooter = ModalFooter;
|
|
197
|
-
ModalFooter.displayName = "ModalFooter";
|
|
203
|
+
ModalFooter.displayName = "ModalFooter";
|
|
204
|
+
ModalFooter.displayName = 'ModalFooter';
|
package/modal/types.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
1
|
+
import type * as React from 'react';
|
|
2
2
|
import type { Override } from '../helpers/overrides';
|
|
3
|
-
import { SIZE, ROLE, CLOSE_SOURCE } from './constants';
|
|
3
|
+
import type { SIZE, ROLE, CLOSE_SOURCE } from './constants';
|
|
4
4
|
export declare type Size = keyof typeof SIZE;
|
|
5
5
|
export declare type SizeProp = Size | number | string;
|
|
6
6
|
export declare type Role = keyof typeof ROLE;
|