baseui 0.0.0-alpha-3479e57 → 0.0.0-alpha-e79754d
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 +2 -4
- package/accordion/accordion.js.flow +1 -1
- package/accordion/panel.js +2 -3
- package/accordion/stateful-panel-container.js +0 -1
- package/accordion/styled-components.js +1 -8
- package/app-nav-bar/app-nav-bar.js +2 -4
- package/app-nav-bar/mobile-menu.js +1 -2
- package/app-nav-bar/styled-components.js +1 -19
- package/app-nav-bar/user-menu.js +1 -1
- package/aspect-ratio-box/aspect-ratio-box.js +1 -3
- package/avatar/styled-components.js +1 -4
- package/badge/styled-components.js +7 -12
- package/banner/styled-components.js +11 -21
- package/banner/types.d.ts +11 -12
- package/banner/types.js.flow +11 -13
- package/block/block.js +1 -3
- package/block/styled-components.js +1 -2
- package/breadcrumbs/styled-components.js +1 -5
- package/button/styled-components.js +0 -5
- package/button-group/stateful-button-group.js +0 -1
- package/button-group/stateful-container.js +1 -3
- package/button-group/styled-components.js +1 -2
- package/card/images.d.ts +1 -1
- package/card/styled-components.js +4 -11
- package/checkbox/styled-components.js +3 -9
- package/combobox/combobox.js +71 -78
- package/combobox/styled-components.js +1 -5
- package/data-table/column-anchor.js +0 -3
- package/data-table/column-datetime.js +4 -10
- package/data-table/column-numerical.js +4 -4
- package/data-table/column-string.js +0 -3
- package/data-table/column.js +1 -6
- package/data-table/data-table.js +6 -7
- package/data-table/filter-menu.js +1 -2
- package/data-table/header-cell.js +34 -43
- package/data-table/locale.d.ts +0 -4
- package/data-table/locale.js +1 -3
- package/data-table/locale.js.flow +0 -5
- package/data-table/measure-column-widths.js +1 -2
- package/data-table/stateful-container.js +1 -2
- package/data-table/stateful-data-table.js +4 -4
- package/datepicker/calendar-header.js +0 -1
- package/datepicker/calendar.js +0 -2
- package/datepicker/datepicker.js +0 -2
- package/datepicker/day.js +1 -2
- package/datepicker/stateful-calendar.js +3 -7
- package/datepicker/stateful-container.js +0 -2
- package/datepicker/stateful-datepicker.js +4 -9
- package/datepicker/styled-components.js +4 -27
- package/datepicker/utils/date-helpers.js +1 -2
- package/datepicker/utils/index.js +1 -2
- package/divider/styled-components.js +3 -4
- package/dnd-list/stateful-list-container.js +0 -1
- package/dnd-list/styled-components.js +0 -7
- package/drawer/constants.js +0 -1
- package/drawer/drawer.js +3 -2
- package/drawer/drawer.js.flow +3 -1
- package/drawer/styled-components.js +2 -9
- package/es/accordion/accordion.js +3 -3
- package/es/accordion/panel.js +2 -3
- package/es/accordion/stateful-panel-container.js +0 -1
- package/es/accordion/styled-components.js +1 -8
- package/es/app-nav-bar/app-nav-bar.js +2 -6
- package/es/app-nav-bar/mobile-menu.js +2 -4
- package/es/app-nav-bar/styled-components.js +1 -19
- package/es/app-nav-bar/user-menu.js +1 -1
- package/es/aspect-ratio-box/aspect-ratio-box.js +1 -3
- package/es/avatar/styled-components.js +1 -4
- package/es/badge/styled-components.js +2 -7
- package/es/banner/styled-components.js +2 -12
- package/es/block/block.js +1 -3
- package/es/block/styled-components.js +1 -2
- package/es/breadcrumbs/styled-components.js +1 -5
- package/es/button/button.js +0 -8
- package/es/button/styled-components.js +0 -5
- package/es/button-group/stateful-button-group.js +0 -1
- package/es/button-group/stateful-container.js +1 -3
- package/es/button-group/styled-components.js +1 -2
- package/es/card/index.js +1 -2
- package/es/card/styled-components.js +4 -12
- package/es/checkbox/index.js +0 -1
- package/es/checkbox/stateful-checkbox-container.js +0 -3
- package/es/checkbox/styled-components.js +3 -9
- package/es/combobox/combobox.js +69 -76
- package/es/combobox/styled-components.js +1 -5
- package/es/data-table/column-anchor.js +0 -3
- package/es/data-table/column-datetime.js +5 -12
- package/es/data-table/column-numerical.js +4 -5
- package/es/data-table/column-string.js +0 -3
- package/es/data-table/column.js +1 -4
- package/es/data-table/data-table.js +6 -7
- package/es/data-table/filter-menu.js +1 -2
- package/es/data-table/header-cell.js +34 -41
- package/es/data-table/locale.js +1 -3
- package/es/data-table/measure-column-widths.js +1 -2
- package/es/data-table/stateful-container.js +1 -2
- package/es/data-table/stateful-data-table.js +4 -4
- package/es/datepicker/calendar-header.js +0 -1
- package/es/datepicker/calendar.js +0 -2
- package/es/datepicker/datepicker.js +1 -3
- package/es/datepicker/day.js +1 -2
- package/es/datepicker/stateful-calendar.js +1 -4
- package/es/datepicker/stateful-container.js +0 -2
- package/es/datepicker/stateful-datepicker.js +1 -5
- package/es/datepicker/styled-components.js +3 -26
- package/es/datepicker/utils/date-helpers.js +1 -2
- package/es/datepicker/utils/index.js +1 -2
- package/es/divider/styled-components.js +2 -3
- package/es/dnd-list/stateful-list-container.js +0 -1
- package/es/dnd-list/styled-components.js +0 -7
- package/es/drawer/constants.js +0 -1
- package/es/drawer/drawer.js +5 -2
- package/es/drawer/styled-components.js +2 -9
- package/es/file-uploader/styled-components.js +1 -6
- package/es/flex-grid/flex-grid-item.js +6 -5
- package/es/flex-grid/flex-grid.js +1 -4
- package/es/form-control/styled-components.js +1 -6
- package/es/header-navigation/styled-components.js +1 -4
- package/es/helper/styled-components.js +1 -3
- package/es/helpers/overrides.js +5 -9
- package/es/icon/build-icons.js +2 -0
- package/es/icon/omit-dollar-prefixed-keys.js +0 -1
- package/es/icon/styled-components.js +1 -2
- package/es/input/base-input.js +0 -1
- package/es/input/masked-input.js +2 -9
- package/es/input/stateful-container.js +0 -1
- package/es/input/styled-components.js +5 -10
- package/es/layer/layer.js +0 -24
- package/es/layer/layers-manager.js +1 -91
- package/es/layout-grid/styled-components.js +0 -3
- package/es/link/index.js +1 -2
- package/es/link/styled-components.js +1 -2
- package/es/list/list-heading.js +17 -21
- package/es/list/list-item.js +1 -2
- package/es/list/styled-components.js +1 -15
- package/es/locale/es_AR.js +1 -3
- package/es/locale/index.js +1 -2
- package/es/locale/tr_TR.js +1 -3
- package/es/map-marker/constants.js +0 -14
- package/es/map-marker/fixed-marker.js +0 -1
- package/es/map-marker/index.js +1 -2
- package/es/map-marker/pin-head.js +0 -1
- package/es/map-marker/styled-components.js +2 -86
- package/es/menu/menu.js +3 -7
- package/es/menu/option-profile.js +0 -1
- package/es/menu/stateful-container.js +0 -10
- package/es/menu/styled-components.js +2 -15
- package/es/modal/modal.js +6 -4
- package/es/modal/styled-components.js +1 -8
- package/es/pagination/stateful-container.js +0 -1
- package/es/pagination/stateful-pagination.js +0 -1
- package/es/pagination/styled-components.js +1 -4
- package/es/payment-card/styled-components.js +1 -2
- package/es/phone-input/base-country-picker.js +1 -3
- package/es/phone-input/country-select-dropdown.js +0 -1
- package/es/phone-input/styled-components.js +4 -15
- package/es/pin-code/styled-components.js +1 -4
- package/es/popover/popover.js +12 -9
- package/es/popover/styled-components.js +4 -9
- package/es/progress-bar/progressbar-rounded.js +0 -1
- package/es/progress-bar/styled-components.js +2 -14
- package/es/progress-steps/progress-steps.js +1 -2
- package/es/progress-steps/styled-components.js +12 -20
- package/es/radio/stateful-radiogroup-container.js +0 -3
- package/es/radio/styled-components.js +3 -10
- package/es/rating/emoticon-rating.js +1 -2
- package/es/rating/star-rating.js +1 -2
- package/es/rating/styled-components.js +1 -5
- package/es/select/autosize-input.js +3 -2
- package/es/select/dropdown.js +1 -2
- package/es/select/multi-value.js +1 -2
- package/es/select/select-component.js +10 -10
- package/es/select/single-select.js +2 -2
- package/es/select/stateful-select-container.js +0 -2
- package/es/select/styled-components.js +1 -16
- package/es/select/value.js +4 -3
- package/es/side-navigation/index.js +1 -2
- package/es/side-navigation/nav-item.js +0 -1
- package/es/side-navigation/nav.js +1 -1
- package/es/side-navigation/stateful-container.js +0 -1
- package/es/side-navigation/styled-components.js +2 -8
- package/es/skeleton/styled-components.js +1 -3
- package/es/slider/slider.js +2 -4
- package/es/slider/stateful-slider-container.js +0 -2
- package/es/slider/styled-components.js +0 -9
- package/es/snackbar/snackbar-element.js +0 -1
- package/es/snackbar/styled-components.js +1 -9
- package/es/spinner/styled-components.js +1 -2
- package/es/styles/__mocks__/styled.js +5 -8
- package/es/styles/styled.js +6 -7
- package/es/table/index.js +1 -2
- package/es/table/styled-components.js +1 -13
- package/es/table-grid/styled-components.js +1 -4
- package/es/table-semantic/styled-components.js +2 -20
- package/es/tabs/stateful-tabs.js +0 -1
- package/es/tabs/styled-components.js +1 -5
- package/es/tabs/tabs.js +2 -4
- package/es/tabs-motion/styled-components.js +1 -9
- package/es/tabs-motion/tab.js +0 -1
- package/es/tabs-motion/tabs.js +1 -2
- package/es/tag/styled-components.js +1 -32
- package/es/tag/tag.js +2 -6
- package/es/textarea/styled-components.js +1 -4
- package/es/themes/shared/typography.js +10 -10
- package/es/toast/styled-components.js +1 -5
- package/es/toast/toaster.js +2 -0
- package/es/tokens/colors.js +0 -24
- package/es/tooltip/styled-components.js +1 -4
- package/es/tree-view/index.js +1 -2
- package/es/tree-view/styled-components.js +1 -7
- package/es/tree-view/tree-view.js +1 -3
- package/es/types/globals.d.js +0 -12
- package/es/utils/deep-merge.js +5 -0
- package/es/utils/deprecated-component.js +0 -1
- package/es/utils/focusVisible.js +2 -4
- package/esm/accordion/accordion.js +4 -4
- package/esm/accordion/panel.js +2 -3
- package/esm/accordion/stateful-panel-container.js +0 -1
- package/esm/accordion/styled-components.js +1 -8
- package/esm/app-nav-bar/app-nav-bar.js +2 -4
- package/esm/app-nav-bar/mobile-menu.js +2 -4
- package/esm/app-nav-bar/styled-components.js +1 -19
- package/esm/app-nav-bar/user-menu.js +1 -1
- package/esm/aspect-ratio-box/aspect-ratio-box.js +1 -3
- package/esm/avatar/styled-components.js +1 -4
- package/esm/badge/styled-components.js +2 -7
- package/esm/banner/styled-components.js +2 -12
- package/esm/block/block.js +1 -3
- package/esm/block/styled-components.js +1 -2
- package/esm/breadcrumbs/styled-components.js +1 -5
- package/esm/button/styled-components.js +0 -5
- package/esm/button-group/stateful-button-group.js +0 -1
- package/esm/button-group/stateful-container.js +1 -3
- package/esm/button-group/styled-components.js +1 -2
- package/esm/card/index.js +1 -2
- package/esm/card/styled-components.js +4 -12
- package/esm/checkbox/index.js +0 -1
- package/esm/checkbox/styled-components.js +3 -9
- package/esm/combobox/combobox.js +71 -78
- package/esm/combobox/styled-components.js +1 -5
- package/esm/data-table/column-anchor.js +0 -3
- package/esm/data-table/column-datetime.js +5 -12
- package/esm/data-table/column-numerical.js +4 -4
- package/esm/data-table/column-string.js +0 -3
- package/esm/data-table/column.js +1 -5
- package/esm/data-table/data-table.js +6 -7
- package/esm/data-table/filter-menu.js +1 -2
- package/esm/data-table/header-cell.js +34 -42
- package/esm/data-table/locale.js +1 -3
- package/esm/data-table/measure-column-widths.js +1 -2
- package/esm/data-table/stateful-container.js +1 -2
- package/esm/data-table/stateful-data-table.js +4 -4
- package/esm/datepicker/calendar-header.js +0 -1
- package/esm/datepicker/calendar.js +0 -2
- package/esm/datepicker/datepicker.js +1 -3
- package/esm/datepicker/day.js +1 -2
- package/esm/datepicker/stateful-calendar.js +3 -7
- package/esm/datepicker/stateful-container.js +0 -2
- package/esm/datepicker/stateful-datepicker.js +4 -9
- package/esm/datepicker/styled-components.js +3 -26
- package/esm/datepicker/utils/date-helpers.js +1 -2
- package/esm/datepicker/utils/index.js +1 -2
- package/esm/divider/styled-components.js +2 -3
- package/esm/dnd-list/stateful-list-container.js +0 -1
- package/esm/dnd-list/styled-components.js +0 -7
- package/esm/drawer/constants.js +0 -1
- package/esm/drawer/drawer.js +5 -2
- package/esm/drawer/styled-components.js +2 -9
- package/esm/file-uploader/styled-components.js +1 -6
- package/esm/flex-grid/flex-grid-item.js +5 -4
- package/esm/flex-grid/flex-grid.js +3 -7
- package/esm/form-control/styled-components.js +1 -6
- package/esm/header-navigation/styled-components.js +1 -4
- package/esm/helper/styled-components.js +1 -3
- package/esm/helpers/overrides.js +5 -9
- package/esm/icon/build-icons.js +2 -0
- package/esm/icon/omit-dollar-prefixed-keys.js +0 -1
- package/esm/icon/styled-components.js +1 -2
- package/esm/input/base-input.js +0 -1
- package/esm/input/masked-input.js +2 -5
- package/esm/input/stateful-container.js +0 -1
- package/esm/input/styled-components.js +5 -10
- package/esm/layer/layer.js +0 -24
- package/esm/layer/layers-manager.js +1 -97
- package/esm/layout-grid/styled-components.js +0 -3
- package/esm/link/index.js +1 -2
- package/esm/link/styled-components.js +1 -2
- package/esm/list/list-heading.js +17 -21
- package/esm/list/list-item.js +1 -2
- package/esm/list/styled-components.js +1 -15
- package/esm/locale/es_AR.js +1 -3
- package/esm/locale/index.js +1 -4
- package/esm/locale/tr_TR.js +1 -3
- package/esm/map-marker/constants.js +2 -12
- package/esm/map-marker/index.js +1 -2
- package/esm/map-marker/styled-components.js +2 -82
- package/esm/menu/menu.js +3 -6
- package/esm/menu/option-profile.js +0 -1
- package/esm/menu/stateful-container.js +0 -1
- package/esm/menu/styled-components.js +6 -20
- package/esm/modal/modal.js +6 -4
- package/esm/modal/styled-components.js +1 -8
- package/esm/pagination/stateful-container.js +0 -1
- package/esm/pagination/stateful-pagination.js +0 -1
- package/esm/pagination/styled-components.js +1 -4
- package/esm/payment-card/styled-components.js +1 -2
- package/esm/phone-input/base-country-picker.js +1 -3
- package/esm/phone-input/country-select-dropdown.js +0 -1
- package/esm/phone-input/styled-components.js +8 -20
- package/esm/pin-code/styled-components.js +1 -4
- package/esm/popover/popover.js +12 -9
- package/esm/popover/styled-components.js +4 -9
- package/esm/progress-bar/progressbar-rounded.js +0 -1
- package/esm/progress-bar/styled-components.js +2 -14
- package/esm/progress-steps/progress-steps.js +1 -2
- package/esm/progress-steps/styled-components.js +19 -28
- package/esm/radio/styled-components.js +3 -10
- package/esm/rating/emoticon-rating.js +1 -2
- package/esm/rating/star-rating.js +1 -2
- package/esm/rating/styled-components.js +1 -5
- package/esm/select/autosize-input.js +3 -2
- package/esm/select/dropdown.js +1 -2
- package/esm/select/multi-value.js +1 -2
- package/esm/select/select-component.js +10 -10
- package/esm/select/single-select.js +2 -2
- package/esm/select/styled-components.js +1 -16
- package/esm/select/value.js +4 -3
- package/esm/side-navigation/index.js +1 -2
- package/esm/side-navigation/nav-item.js +0 -1
- package/esm/side-navigation/nav.js +1 -1
- package/esm/side-navigation/stateful-container.js +0 -1
- package/esm/side-navigation/styled-components.js +6 -13
- package/esm/skeleton/styled-components.js +1 -3
- package/esm/slider/slider.js +2 -4
- package/esm/slider/styled-components.js +0 -9
- package/esm/snackbar/snackbar-element.js +0 -1
- package/esm/snackbar/styled-components.js +1 -9
- package/esm/spinner/styled-components.js +1 -2
- package/esm/styles/__mocks__/styled.js +5 -8
- package/esm/styles/styled.js +6 -7
- package/esm/table/index.js +1 -2
- package/esm/table/styled-components.js +1 -13
- package/esm/table-grid/styled-components.js +1 -4
- package/esm/table-semantic/styled-components.js +2 -20
- package/esm/tabs/stateful-tabs.js +0 -1
- package/esm/tabs/styled-components.js +1 -5
- package/esm/tabs/tabs.js +2 -4
- package/esm/tabs-motion/styled-components.js +1 -8
- package/esm/tabs-motion/tab.js +0 -1
- package/esm/tabs-motion/tabs.js +1 -2
- package/esm/tag/styled-components.js +1 -5
- package/esm/tag/tag.js +2 -4
- package/esm/textarea/styled-components.js +1 -4
- package/esm/themes/shared/typography.js +10 -10
- package/esm/toast/styled-components.js +1 -5
- package/esm/toast/toaster.js +2 -0
- package/esm/tokens/colors.js +0 -24
- package/esm/tooltip/styled-components.js +1 -4
- package/esm/tree-view/index.js +1 -2
- package/esm/tree-view/styled-components.js +1 -7
- package/esm/tree-view/tree-view.js +1 -3
- package/esm/types/globals.d.js +0 -12
- package/esm/utils/deep-merge.js +5 -0
- package/esm/utils/deprecated-component.js +0 -1
- package/esm/utils/focusVisible.js +2 -4
- package/file-uploader/styled-components.js +1 -6
- package/flex-grid/flex-grid-item.d.ts +1 -1
- package/flex-grid/flex-grid-item.js +8 -6
- package/flex-grid/flex-grid.js +3 -7
- package/form-control/styled-components.js +1 -6
- package/header-navigation/styled-components.js +1 -4
- package/helper/styled-components.js +1 -3
- package/helpers/overrides.js +3 -8
- package/helpers/overrides.js.flow +1 -1
- package/icon/build-icons.js +2 -0
- package/icon/build-icons.js.flow +1 -0
- package/icon/omit-dollar-prefixed-keys.js +0 -1
- package/icon/styled-components.js +1 -2
- package/input/masked-input.js +2 -5
- package/input/stateful-container.js +0 -1
- package/input/styled-components.js +5 -10
- package/layer/layer.js +0 -24
- package/layer/layer.js.flow +0 -25
- package/layer/layers-manager.d.ts +0 -8
- package/layer/layers-manager.js +1 -97
- package/layer/layers-manager.js.flow +1 -84
- package/layer/types.d.ts +0 -21
- package/layer/types.js.flow +1 -22
- package/layout-grid/styled-components.js +0 -3
- package/link/index.js +1 -2
- package/link/styled-components.js +1 -2
- package/list/list-heading.js +17 -21
- package/list/list-item.js +1 -2
- package/list/styled-components.js +1 -15
- package/locale/es_AR.js +1 -3
- package/locale/index.js +1 -4
- package/locale/tr_TR.js +1 -3
- package/map-marker/constants.d.ts +0 -14
- package/map-marker/constants.js +3 -16
- package/map-marker/constants.js.flow +0 -17
- package/map-marker/index.d.ts +1 -2
- package/map-marker/index.js +1 -24
- package/map-marker/index.js.flow +3 -5
- package/map-marker/styled-components.d.ts +1 -17
- package/map-marker/styled-components.js +2 -88
- package/map-marker/styled-components.js.flow +0 -58
- package/map-marker/types.d.ts +1 -29
- package/map-marker/types.js.flow +0 -34
- package/menu/menu.js +3 -6
- package/menu/option-profile.js +0 -1
- package/menu/stateful-container.js +0 -1
- package/menu/styled-components.js +6 -20
- package/modal/modal.js +4 -4
- package/modal/modal.js.flow +3 -1
- package/modal/styled-components.js +1 -8
- package/package.json +11 -9
- package/pagination/stateful-container.js +0 -1
- package/pagination/stateful-pagination.js +0 -1
- package/pagination/styled-components.js +1 -4
- package/payment-card/styled-components.js +1 -2
- package/phone-input/base-country-picker.js +1 -3
- package/phone-input/country-select-dropdown.js +0 -1
- package/phone-input/styled-components.js +9 -21
- package/pin-code/styled-components.js +1 -4
- package/popover/popover.js +12 -9
- package/popover/popover.js.flow +12 -2
- package/popover/styled-components.js +9 -12
- package/progress-bar/progressbar-rounded.js +0 -1
- package/progress-bar/styled-components.js +2 -14
- package/progress-steps/progress-steps.js +1 -2
- package/progress-steps/styled-components.js +19 -28
- package/radio/styled-components.js +3 -10
- package/rating/emoticon-rating.js +1 -2
- package/rating/star-rating.js +1 -2
- package/rating/styled-components.js +1 -5
- package/select/autosize-input.js +1 -2
- package/select/autosize-input.js.flow +1 -1
- package/select/dropdown.js +1 -2
- package/select/multi-value.js +0 -1
- package/select/select-component.d.ts +1 -1
- package/select/select-component.js +7 -9
- 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 +1 -16
- package/select/value.js +3 -2
- package/side-navigation/nav-item.js +0 -1
- package/side-navigation/nav.js +1 -1
- package/side-navigation/stateful-container.js +0 -1
- package/side-navigation/styled-components.js +6 -13
- package/skeleton/styled-components.js +1 -3
- package/slider/slider.js +2 -4
- package/slider/styled-components.js +0 -9
- package/snackbar/snackbar-element.js +0 -1
- package/snackbar/styled-components.js +1 -9
- package/spinner/styled-components.js +1 -2
- package/styles/__mocks__/styled.js +3 -8
- package/styles/styled.js +6 -7
- package/table/styled-components.js +1 -13
- package/table-grid/styled-components.js +1 -4
- package/table-semantic/styled-components.js +2 -20
- package/tabs/stateful-tabs.js +0 -1
- package/tabs/styled-components.js +1 -5
- package/tabs/tabs.js +2 -4
- package/tabs-motion/styled-components.js +1 -8
- package/tabs-motion/tab.js +0 -1
- package/tabs-motion/tabs.js +1 -2
- package/tag/styled-components.js +1 -5
- package/tag/tag.js +2 -4
- package/textarea/styled-components.js +1 -4
- package/themes/shared/typography.js +10 -10
- package/themes/shared/typography.js.flow +10 -10
- package/toast/styled-components.js +1 -5
- package/toast/toaster.js.flow +1 -1
- package/tokens/colors.js +0 -24
- package/tokens/colors.js.flow +0 -27
- package/tokens/types.d.ts +0 -24
- package/tokens/types.js.flow +0 -27
- package/tooltip/styled-components.js +1 -4
- package/tree-view/styled-components.js +1 -7
- package/tree-view/tree-view.js +1 -3
- package/types/globals.d.js +1 -14
- package/utils/deep-merge.js +6 -0
- package/utils/deprecated-component.js +0 -1
- package/utils/focusVisible.js +2 -4
- package/es/map-marker/location-puck.js +0 -142
- package/es/message-card/constants.js +0 -19
- package/es/message-card/index.js +0 -10
- package/es/message-card/message-card.js +0 -112
- package/es/message-card/styled-components.js +0 -108
- package/es/message-card/types.js +0 -1
- package/es/message-card/utils.js +0 -27
- package/esm/map-marker/location-puck.js +0 -199
- package/esm/message-card/constants.js +0 -20
- package/esm/message-card/index.js +0 -10
- package/esm/message-card/message-card.js +0 -166
- package/esm/message-card/styled-components.js +0 -116
- package/esm/message-card/types.js +0 -1
- package/esm/message-card/utils.js +0 -26
- package/map-marker/location-puck.d.ts +0 -4
- package/map-marker/location-puck.js +0 -211
- package/map-marker/location-puck.js.flow +0 -18
- package/message-card/constants.d.ts +0 -12
- package/message-card/constants.js +0 -25
- package/message-card/index.d.ts +0 -4
- package/message-card/index.js +0 -60
- package/message-card/index.js.flow +0 -72
- package/message-card/message-card.d.ts +0 -4
- package/message-card/message-card.js +0 -182
- package/message-card/package.json +0 -4
- package/message-card/styled-components.d.ts +0 -14
- package/message-card/styled-components.js +0 -124
- package/message-card/types.d.ts +0 -27
- package/message-card/types.js +0 -5
- package/message-card/utils.d.ts +0 -1
- package/message-card/utils.js +0 -36
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
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); }
|
|
2
|
-
|
|
3
|
-
/*
|
|
4
|
-
Copyright (c) Uber Technologies, Inc.
|
|
5
|
-
|
|
6
|
-
This source code is licensed under the MIT license found in the
|
|
7
|
-
LICENSE file in the root directory of this source tree.
|
|
8
|
-
*/
|
|
9
|
-
import * as React from 'react';
|
|
10
|
-
import { useStyletron } from '../styles';
|
|
11
|
-
import { getOverrides } from '../helpers/overrides';
|
|
12
|
-
import { LOCATION_PUCK_SIZES, LOCATION_PUCK_TYPES, EARNER_LOCATION_PUCK_CORE_SCALES } from './constants';
|
|
13
|
-
import { LocationPuckContainer, StyledConsumerLocationPuckCore, StyledLocationPuckApproximation, StyledEarnerLocationPuckCore } from './styled-components';
|
|
14
|
-
|
|
15
|
-
const ConsumerLocationPuckHeading = ({
|
|
16
|
-
heading
|
|
17
|
-
}) => {
|
|
18
|
-
const [css, theme] = useStyletron();
|
|
19
|
-
return /*#__PURE__*/React.createElement("svg", {
|
|
20
|
-
className: css({
|
|
21
|
-
height: `${6}px`,
|
|
22
|
-
width: `${11}px`,
|
|
23
|
-
position: 'absolute',
|
|
24
|
-
color: theme.colors.contentAccent,
|
|
25
|
-
transition: `${theme.animation.timing300} ${theme.animation.easeOutCurve} all`
|
|
26
|
-
}),
|
|
27
|
-
style: {
|
|
28
|
-
transform: `rotate(${heading}deg) translateY(-16px)`
|
|
29
|
-
},
|
|
30
|
-
width: "11",
|
|
31
|
-
height: "6",
|
|
32
|
-
viewBox: "0 0 11 6",
|
|
33
|
-
fill: "none",
|
|
34
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
35
|
-
}, /*#__PURE__*/React.createElement("path", {
|
|
36
|
-
fillRule: "evenodd",
|
|
37
|
-
clipRule: "evenodd",
|
|
38
|
-
d: "M5.5 0L0 6L5.5 5L11 6L5.5 0Z",
|
|
39
|
-
fill: "currentColor"
|
|
40
|
-
}));
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
const ConsumerLocationPuck = ({
|
|
44
|
-
heading,
|
|
45
|
-
showHeading,
|
|
46
|
-
confidenceRadius,
|
|
47
|
-
overrides
|
|
48
|
-
}) => {
|
|
49
|
-
const [, theme] = useStyletron();
|
|
50
|
-
const [Root, rootProps] = getOverrides(overrides.Root, LocationPuckContainer);
|
|
51
|
-
const [ConsumerLocationPuckCore, consumerLocationPuckCoreProps] = getOverrides(overrides.ConsumerLocationPuckCore, StyledConsumerLocationPuckCore);
|
|
52
|
-
const [LocationPuckApproximation, locationPuckApproximationProps] = getOverrides(overrides.LocationPuckApproximation, StyledLocationPuckApproximation);
|
|
53
|
-
return /*#__PURE__*/React.createElement(Root, rootProps, /*#__PURE__*/React.createElement(LocationPuckApproximation, _extends({
|
|
54
|
-
$color: theme.colors.contentAccent,
|
|
55
|
-
$radius: confidenceRadius
|
|
56
|
-
}, locationPuckApproximationProps)), /*#__PURE__*/React.createElement(ConsumerLocationPuckCore, consumerLocationPuckCoreProps), showHeading && /*#__PURE__*/React.createElement(ConsumerLocationPuckHeading, {
|
|
57
|
-
heading: heading
|
|
58
|
-
}));
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
const EarnerLocationPuckHeading = ({
|
|
62
|
-
size,
|
|
63
|
-
color,
|
|
64
|
-
heading
|
|
65
|
-
}) => {
|
|
66
|
-
const [css, theme] = useStyletron();
|
|
67
|
-
return /*#__PURE__*/React.createElement("svg", {
|
|
68
|
-
className: css({
|
|
69
|
-
position: 'absolute',
|
|
70
|
-
transition: `${theme.animation.timing300} ${theme.animation.easeOutCurve} all`
|
|
71
|
-
}),
|
|
72
|
-
style: {
|
|
73
|
-
transform: `rotate(${heading}deg) scale(${EARNER_LOCATION_PUCK_CORE_SCALES[size]})`
|
|
74
|
-
},
|
|
75
|
-
width: "72",
|
|
76
|
-
height: "72",
|
|
77
|
-
viewBox: "0 0 72 72",
|
|
78
|
-
fill: "none",
|
|
79
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
80
|
-
}, /*#__PURE__*/React.createElement("path", {
|
|
81
|
-
fillRule: "evenodd",
|
|
82
|
-
clipRule: "evenodd",
|
|
83
|
-
d: "M36 20L52 52L36 42.8571L20 52L36 20Z",
|
|
84
|
-
fill: color
|
|
85
|
-
}));
|
|
86
|
-
};
|
|
87
|
-
|
|
88
|
-
const EarnerLocationPuck = ({
|
|
89
|
-
heading,
|
|
90
|
-
confidenceRadius,
|
|
91
|
-
size,
|
|
92
|
-
overrides
|
|
93
|
-
}) => {
|
|
94
|
-
const [, theme] = useStyletron();
|
|
95
|
-
const color = theme.colors.contentPrimary;
|
|
96
|
-
const [Root, rootProps] = getOverrides(overrides.Root, LocationPuckContainer);
|
|
97
|
-
const [LocationPuckApproximation, locationPuckApproximationProps] = getOverrides(overrides.LocationPuckApproximation, StyledLocationPuckApproximation);
|
|
98
|
-
const [EarnerLocationPuckCore, earnerLocationPuckCoreProps] = getOverrides(overrides.EarnerLocationPuckCore, StyledEarnerLocationPuckCore);
|
|
99
|
-
return /*#__PURE__*/React.createElement(Root, rootProps, /*#__PURE__*/React.createElement(LocationPuckApproximation, _extends({
|
|
100
|
-
$color: color,
|
|
101
|
-
$radius: confidenceRadius
|
|
102
|
-
}, locationPuckApproximationProps)), /*#__PURE__*/React.createElement(EarnerLocationPuckCore, _extends({
|
|
103
|
-
$color: color,
|
|
104
|
-
$size: size
|
|
105
|
-
}, earnerLocationPuckCoreProps)), /*#__PURE__*/React.createElement(EarnerLocationPuckHeading, {
|
|
106
|
-
size: size,
|
|
107
|
-
color: color,
|
|
108
|
-
heading: heading
|
|
109
|
-
}));
|
|
110
|
-
};
|
|
111
|
-
|
|
112
|
-
const LocationPuck = ({
|
|
113
|
-
size = LOCATION_PUCK_SIZES.medium,
|
|
114
|
-
heading = 0,
|
|
115
|
-
showHeading = true,
|
|
116
|
-
confidenceRadius = 0,
|
|
117
|
-
type = LOCATION_PUCK_TYPES.consumer,
|
|
118
|
-
overrides = {}
|
|
119
|
-
}) => {
|
|
120
|
-
if (process.env.NODE_ENV !== "production") {
|
|
121
|
-
if (size !== LOCATION_PUCK_SIZES.medium && type === LOCATION_PUCK_TYPES.consumer) {
|
|
122
|
-
console.warn(`Location puck size can only be applied to type === LOCATION_PUCK_TYPES.earner`);
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
if (!showHeading && type === LOCATION_PUCK_TYPES.earner) {
|
|
126
|
-
console.warn(`Earner location puck must show the heading indicator`);
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
const sharedProps = {
|
|
131
|
-
heading,
|
|
132
|
-
confidenceRadius,
|
|
133
|
-
overrides
|
|
134
|
-
};
|
|
135
|
-
return type === LOCATION_PUCK_TYPES.consumer ? /*#__PURE__*/React.createElement(ConsumerLocationPuck, _extends({}, sharedProps, {
|
|
136
|
-
showHeading: showHeading
|
|
137
|
-
})) : /*#__PURE__*/React.createElement(EarnerLocationPuck, _extends({}, sharedProps, {
|
|
138
|
-
size: size
|
|
139
|
-
}));
|
|
140
|
-
};
|
|
141
|
-
|
|
142
|
-
export default LocationPuck;
|
|
@@ -1,19 +0,0 @@
|
|
|
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
|
-
import { KIND } from '../button';
|
|
8
|
-
export const BACKGROUND_COLOR_TYPE = Object.freeze({
|
|
9
|
-
light: 'light',
|
|
10
|
-
dark: 'dark'
|
|
11
|
-
});
|
|
12
|
-
export const IMAGE_LAYOUT = Object.freeze({
|
|
13
|
-
top: 'top',
|
|
14
|
-
trailing: 'trailing'
|
|
15
|
-
});
|
|
16
|
-
export const BUTTON_KIND = Object.freeze({
|
|
17
|
-
[KIND.secondary]: KIND.secondary,
|
|
18
|
-
[KIND.tertiary]: KIND.tertiary
|
|
19
|
-
});
|
package/es/message-card/index.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
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';
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
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); }
|
|
2
|
-
|
|
3
|
-
/*
|
|
4
|
-
Copyright (c) Uber Technologies, Inc.
|
|
5
|
-
|
|
6
|
-
This source code is licensed under the MIT license found in the
|
|
7
|
-
LICENSE file in the root directory of this source tree.
|
|
8
|
-
*/
|
|
9
|
-
import * as React from 'react';
|
|
10
|
-
import { StyledRoot, StyledImage, StyledContentContainer, StyledHeadingContainer, StyledParagraphContainer } from './styled-components';
|
|
11
|
-
import { Button as DefaultButton, SHAPE, SIZE } from '../button';
|
|
12
|
-
import { useStyletron } from '../styles/index.js';
|
|
13
|
-
import { ThemeProvider, LightTheme } from '../';
|
|
14
|
-
import { getBackgroundColorType } from './utils';
|
|
15
|
-
import { colors } from '../tokens';
|
|
16
|
-
import { getOverrides } from '../helpers/overrides';
|
|
17
|
-
import { IMAGE_LAYOUT, BACKGROUND_COLOR_TYPE, BUTTON_KIND } from './constants';
|
|
18
|
-
|
|
19
|
-
const ButtonAlwaysLightTheme = ({
|
|
20
|
-
children,
|
|
21
|
-
...restProps
|
|
22
|
-
}) => /*#__PURE__*/React.createElement(ThemeProvider, {
|
|
23
|
-
theme: LightTheme
|
|
24
|
-
}, /*#__PURE__*/React.createElement(DefaultButton, restProps, children));
|
|
25
|
-
|
|
26
|
-
const MessageCard = ({
|
|
27
|
-
backgroundColor = colors.white,
|
|
28
|
-
backgroundColorType: backgroundColorTypeProp,
|
|
29
|
-
buttonKind = BUTTON_KIND.secondary,
|
|
30
|
-
buttonLabel,
|
|
31
|
-
heading,
|
|
32
|
-
image,
|
|
33
|
-
onClick,
|
|
34
|
-
overrides = {},
|
|
35
|
-
paragraph
|
|
36
|
-
}) => {
|
|
37
|
-
const {
|
|
38
|
-
src,
|
|
39
|
-
layout = IMAGE_LAYOUT.top,
|
|
40
|
-
backgroundPosition,
|
|
41
|
-
ariaLabel
|
|
42
|
-
} = image || {};
|
|
43
|
-
const [Root, RootProps] = getOverrides(overrides.Root, StyledRoot);
|
|
44
|
-
const [ContentContainer, ContentContainerProps] = getOverrides(overrides.ContentContainer, StyledContentContainer);
|
|
45
|
-
const [HeadingContainer, HeadingContainerProps] = getOverrides(overrides.HeadingContainer, StyledHeadingContainer);
|
|
46
|
-
const [ParagraphContainer, ParagraphContainerProps] = getOverrides(overrides.ParagraphContainer, StyledParagraphContainer);
|
|
47
|
-
const [Image, ImageProps] = getOverrides(overrides.Image, StyledImage);
|
|
48
|
-
const [Button, ButtonProps] = getOverrides(overrides.Button, ButtonAlwaysLightTheme);
|
|
49
|
-
const [, theme] = useStyletron();
|
|
50
|
-
let backgroundColorType = backgroundColorTypeProp || getBackgroundColorType(backgroundColor);
|
|
51
|
-
|
|
52
|
-
if (!backgroundColorType) {
|
|
53
|
-
backgroundColorType = BACKGROUND_COLOR_TYPE.dark;
|
|
54
|
-
|
|
55
|
-
if (process.env.NODE_ENV !== "production") {
|
|
56
|
-
console.warn(`The provided value for 'backgroundColor', ${backgroundColor}, is not recognized as a \
|
|
57
|
-
Base Web primitive color. Please use the 'backgroundColorType' prop to indicate whether\
|
|
58
|
-
this color is light or dark so the rest of the component can be styled accordingly.`);
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
let buttonColors;
|
|
63
|
-
|
|
64
|
-
if (buttonKind === BUTTON_KIND.tertiary && backgroundColorType === BACKGROUND_COLOR_TYPE.dark) {
|
|
65
|
-
buttonColors = {
|
|
66
|
-
color: theme.colors.contentOnColor,
|
|
67
|
-
backgroundColor: theme.colors.buttonTertiaryFill
|
|
68
|
-
};
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
if (buttonKind !== BUTTON_KIND.tertiary && backgroundColor !== colors.white) {
|
|
72
|
-
buttonColors = {
|
|
73
|
-
color: theme.colors.contentOnColorInverse,
|
|
74
|
-
backgroundColor: theme.colors.backgroundAlwaysLight
|
|
75
|
-
};
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
return /*#__PURE__*/React.createElement(Root, _extends({
|
|
79
|
-
onClick: onClick,
|
|
80
|
-
$backgroundColor: backgroundColor,
|
|
81
|
-
$backgroundColorType: backgroundColorType,
|
|
82
|
-
$imageLayout: layout
|
|
83
|
-
}, RootProps), image && /*#__PURE__*/React.createElement(Image, _extends({
|
|
84
|
-
role: "img",
|
|
85
|
-
ariaLabel: ariaLabel,
|
|
86
|
-
$src: src,
|
|
87
|
-
$imageLayout: layout,
|
|
88
|
-
$backgroundPosition: backgroundPosition
|
|
89
|
-
}, 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({
|
|
90
|
-
kind: buttonKind,
|
|
91
|
-
shape: SHAPE.pill,
|
|
92
|
-
size: SIZE.compact,
|
|
93
|
-
role: "none",
|
|
94
|
-
tabIndex: -1,
|
|
95
|
-
colors: buttonColors,
|
|
96
|
-
overrides: {
|
|
97
|
-
BaseButton: {
|
|
98
|
-
style: {
|
|
99
|
-
pointerEvents: 'none',
|
|
100
|
-
...(buttonKind === BUTTON_KIND.tertiary ? {
|
|
101
|
-
marginTop: theme.sizing.scale100,
|
|
102
|
-
transform: theme.direction === 'rtl' ? `translateX(${theme.sizing.scale500})` : `translateX(-${theme.sizing.scale500})`
|
|
103
|
-
} : {
|
|
104
|
-
marginTop: theme.sizing.scale500
|
|
105
|
-
})
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
}, ButtonProps), buttonLabel)));
|
|
110
|
-
};
|
|
111
|
-
|
|
112
|
-
export default MessageCard;
|
|
@@ -1,108 +0,0 @@
|
|
|
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
|
-
import { styled } from '../styles';
|
|
8
|
-
import { IMAGE_LAYOUT, BACKGROUND_COLOR_TYPE } from './constants';
|
|
9
|
-
export const StyledRoot = styled('button', ({
|
|
10
|
-
$theme,
|
|
11
|
-
$backgroundColor,
|
|
12
|
-
$backgroundColorType,
|
|
13
|
-
$imageLayout = IMAGE_LAYOUT.top
|
|
14
|
-
}) => {
|
|
15
|
-
const lightBackgroundStyle = {
|
|
16
|
-
color: $theme.colors.contentOnColorInverse,
|
|
17
|
-
borderStyle: 'solid',
|
|
18
|
-
borderWidth: $theme.sizing.scale0,
|
|
19
|
-
borderColor: $theme.colors.borderOpaque
|
|
20
|
-
};
|
|
21
|
-
const darkBackgroundStyle = {
|
|
22
|
-
color: $theme.colors.contentOnColor,
|
|
23
|
-
border: 'none'
|
|
24
|
-
};
|
|
25
|
-
return {
|
|
26
|
-
alignItems: 'stretch',
|
|
27
|
-
backgroundColor: $backgroundColor,
|
|
28
|
-
borderRadius: $theme.borders.radius400,
|
|
29
|
-
cursor: 'pointer',
|
|
30
|
-
display: 'flex',
|
|
31
|
-
flexDirection: $imageLayout === IMAGE_LAYOUT.top ? 'column' : 'row',
|
|
32
|
-
overflow: 'hidden',
|
|
33
|
-
padding: '0',
|
|
34
|
-
position: 'relative',
|
|
35
|
-
textAlign: 'start',
|
|
36
|
-
width: '100%',
|
|
37
|
-
boxShadow: `inset 999px 999px 0px ${$theme.colors.backgroundOverlayArt}`,
|
|
38
|
-
...($backgroundColorType === BACKGROUND_COLOR_TYPE.light ? lightBackgroundStyle : darkBackgroundStyle),
|
|
39
|
-
':focus': {
|
|
40
|
-
outlineWidth: '3px',
|
|
41
|
-
outlineStyle: 'solid',
|
|
42
|
-
outlineColor: $theme.colors.borderAccent,
|
|
43
|
-
outlineOffset: '-3px'
|
|
44
|
-
},
|
|
45
|
-
':hover:after': {
|
|
46
|
-
content: '""',
|
|
47
|
-
width: '100%',
|
|
48
|
-
height: '100%',
|
|
49
|
-
zIndex: '1',
|
|
50
|
-
position: 'absolute',
|
|
51
|
-
top: '0',
|
|
52
|
-
left: '0',
|
|
53
|
-
backgroundColor: $backgroundColorType === BACKGROUND_COLOR_TYPE.light ? 'rgba(0, 0, 0, 0.04)' : 'rgba(255, 255, 255, 0.10)'
|
|
54
|
-
},
|
|
55
|
-
':active:after': {
|
|
56
|
-
content: '""',
|
|
57
|
-
width: '100%',
|
|
58
|
-
height: '100%',
|
|
59
|
-
zIndex: '1',
|
|
60
|
-
position: 'absolute',
|
|
61
|
-
top: '0',
|
|
62
|
-
left: '0',
|
|
63
|
-
backgroundColor: $backgroundColorType === BACKGROUND_COLOR_TYPE.light ? 'rgba(0, 0, 0, 0.08)' : 'rgba(255, 255, 255, 0.20)'
|
|
64
|
-
}
|
|
65
|
-
};
|
|
66
|
-
});
|
|
67
|
-
StyledRoot.displayName = "StyledRoot";
|
|
68
|
-
export const StyledImage = styled('div', ({
|
|
69
|
-
$imageLayout = IMAGE_LAYOUT.top,
|
|
70
|
-
$backgroundPosition = 'center',
|
|
71
|
-
$src
|
|
72
|
-
}) => {
|
|
73
|
-
return {
|
|
74
|
-
backgroundImage: `url(${$src})`,
|
|
75
|
-
backgroundSize: 'cover',
|
|
76
|
-
backgroundPosition: $backgroundPosition,
|
|
77
|
-
...($imageLayout === IMAGE_LAYOUT.top ? {
|
|
78
|
-
height: '132px',
|
|
79
|
-
width: '100%'
|
|
80
|
-
} : {
|
|
81
|
-
width: '112px',
|
|
82
|
-
order: '1'
|
|
83
|
-
})
|
|
84
|
-
};
|
|
85
|
-
});
|
|
86
|
-
StyledImage.displayName = "StyledImage";
|
|
87
|
-
export const StyledContentContainer = styled('div', ({
|
|
88
|
-
$theme
|
|
89
|
-
}) => ({
|
|
90
|
-
width: '100%',
|
|
91
|
-
boxSizing: 'border-box',
|
|
92
|
-
paddingTop: $theme.sizing.scale600,
|
|
93
|
-
paddingRight: $theme.sizing.scale300,
|
|
94
|
-
paddingBottom: $theme.sizing.scale600,
|
|
95
|
-
paddingLeft: $theme.sizing.scale600
|
|
96
|
-
}));
|
|
97
|
-
StyledContentContainer.displayName = "StyledContentContainer";
|
|
98
|
-
export const StyledHeadingContainer = styled('div', ({
|
|
99
|
-
$theme
|
|
100
|
-
}) => ({ ...$theme.typography.HeadingXSmall
|
|
101
|
-
}));
|
|
102
|
-
StyledHeadingContainer.displayName = "StyledHeadingContainer";
|
|
103
|
-
export const StyledParagraphContainer = styled('div', ({
|
|
104
|
-
$theme
|
|
105
|
-
}) => ({ ...$theme.typography.ParagraphSmall,
|
|
106
|
-
marginTop: $theme.sizing.scale100
|
|
107
|
-
}));
|
|
108
|
-
StyledParagraphContainer.displayName = "StyledParagraphContainer";
|
package/es/message-card/types.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/es/message-card/utils.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
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
|
-
import { colors } from '../tokens';
|
|
8
|
-
import { BACKGROUND_COLOR_TYPE } from './constants';
|
|
9
|
-
const LIGHT_COLORS = new Set([colors.red50, colors.red100, colors.red200, colors.red300, colors.green50, colors.green100, colors.green200, colors.green300, colors.teal50, colors.teal100, colors.teal200, colors.teal300, colors.blue50, colors.blue100, colors.blue200, colors.blue300, colors.cobalt50, colors.cobalt100, colors.cobalt200, colors.purple50, colors.purple100, colors.purple200, colors.purple300, colors.magenta50, colors.magenta100, colors.magenta200, colors.magenta300, colors.brown50, colors.brown100, colors.brown200, colors.brown300, colors.orange50, colors.orange100, colors.orange200, colors.orange300, colors.orange400, colors.lime50, colors.lime100, colors.lime200, colors.lime300, colors.lime400, colors.platinum50, colors.platinum100, colors.platinum200, colors.platinum300, colors.platinum400, colors.yellow50, colors.yellow100, colors.yellow200, colors.yellow300, colors.yellow400, colors.yellow500, colors.white, colors.gray50, colors.gray100, colors.gray200, colors.gray300, colors.gray400]);
|
|
10
|
-
const DARK_COLORS = new Set([colors.red400, colors.red500, colors.red600, colors.red700, colors.green400, colors.green500, colors.green600, colors.green700, colors.teal400, colors.teal500, colors.teal600, colors.teal700, colors.blue400, colors.blue500, colors.blue600, colors.blue700, colors.cobalt300, colors.cobalt400, colors.cobalt500, colors.cobalt600, colors.cobalt700, colors.purple400, colors.purple500, colors.purple600, colors.purple700, colors.magenta400, colors.magenta500, colors.magenta600, colors.magenta700, colors.brown400, colors.brown500, colors.brown600, colors.brown700, colors.orange500, colors.orange600, colors.orange700, colors.lime500, colors.lime600, colors.lime700, colors.platinum500, colors.platinum600, colors.platinum700, colors.platinum800, colors.yellow600, colors.yellow700, colors.gray500, colors.gray600, colors.gray700, colors.gray800, colors.gray900, colors.black]);
|
|
11
|
-
const POOR_CONTRAST_COLORS = new Set([colors.red300, colors.gray500, colors.yellow600]);
|
|
12
|
-
export function getBackgroundColorType(backgroundColor) {
|
|
13
|
-
if (process.env.NODE_ENV !== "production" && POOR_CONTRAST_COLORS.has(backgroundColor)) {
|
|
14
|
-
console.warn(`The provided value for backgroundColor, ${backgroundColor}, is not supported because \
|
|
15
|
-
it does not pass accessibility contrast tests for either white or black text.`);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
if (LIGHT_COLORS.has(backgroundColor)) {
|
|
19
|
-
return BACKGROUND_COLOR_TYPE.light;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
if (DARK_COLORS.has(backgroundColor)) {
|
|
23
|
-
return BACKGROUND_COLOR_TYPE.dark;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
return null;
|
|
27
|
-
}
|
|
@@ -1,199 +0,0 @@
|
|
|
1
|
-
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); }
|
|
2
|
-
|
|
3
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
4
|
-
|
|
5
|
-
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."); }
|
|
6
|
-
|
|
7
|
-
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); }
|
|
8
|
-
|
|
9
|
-
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; }
|
|
10
|
-
|
|
11
|
-
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; }
|
|
12
|
-
|
|
13
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
14
|
-
|
|
15
|
-
/*
|
|
16
|
-
Copyright (c) Uber Technologies, Inc.
|
|
17
|
-
|
|
18
|
-
This source code is licensed under the MIT license found in the
|
|
19
|
-
LICENSE file in the root directory of this source tree.
|
|
20
|
-
*/
|
|
21
|
-
import * as React from 'react';
|
|
22
|
-
import { useStyletron } from '../styles';
|
|
23
|
-
import { getOverrides } from '../helpers/overrides';
|
|
24
|
-
import { LOCATION_PUCK_SIZES, LOCATION_PUCK_TYPES, EARNER_LOCATION_PUCK_CORE_SCALES } from './constants';
|
|
25
|
-
import { LocationPuckContainer, StyledConsumerLocationPuckCore, StyledLocationPuckApproximation, StyledEarnerLocationPuckCore } from './styled-components';
|
|
26
|
-
|
|
27
|
-
var ConsumerLocationPuckHeading = function ConsumerLocationPuckHeading(_ref) {
|
|
28
|
-
var heading = _ref.heading;
|
|
29
|
-
|
|
30
|
-
var _useStyletron = useStyletron(),
|
|
31
|
-
_useStyletron2 = _slicedToArray(_useStyletron, 2),
|
|
32
|
-
css = _useStyletron2[0],
|
|
33
|
-
theme = _useStyletron2[1];
|
|
34
|
-
|
|
35
|
-
return /*#__PURE__*/React.createElement("svg", {
|
|
36
|
-
className: css({
|
|
37
|
-
height: "".concat(6, "px"),
|
|
38
|
-
width: "".concat(11, "px"),
|
|
39
|
-
position: 'absolute',
|
|
40
|
-
color: theme.colors.contentAccent,
|
|
41
|
-
transition: "".concat(theme.animation.timing300, " ").concat(theme.animation.easeOutCurve, " all")
|
|
42
|
-
}),
|
|
43
|
-
style: {
|
|
44
|
-
transform: "rotate(".concat(heading, "deg) translateY(-16px)")
|
|
45
|
-
},
|
|
46
|
-
width: "11",
|
|
47
|
-
height: "6",
|
|
48
|
-
viewBox: "0 0 11 6",
|
|
49
|
-
fill: "none",
|
|
50
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
51
|
-
}, /*#__PURE__*/React.createElement("path", {
|
|
52
|
-
fillRule: "evenodd",
|
|
53
|
-
clipRule: "evenodd",
|
|
54
|
-
d: "M5.5 0L0 6L5.5 5L11 6L5.5 0Z",
|
|
55
|
-
fill: "currentColor"
|
|
56
|
-
}));
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
var ConsumerLocationPuck = function ConsumerLocationPuck(_ref2) {
|
|
60
|
-
var heading = _ref2.heading,
|
|
61
|
-
showHeading = _ref2.showHeading,
|
|
62
|
-
confidenceRadius = _ref2.confidenceRadius,
|
|
63
|
-
overrides = _ref2.overrides;
|
|
64
|
-
|
|
65
|
-
var _useStyletron3 = useStyletron(),
|
|
66
|
-
_useStyletron4 = _slicedToArray(_useStyletron3, 2),
|
|
67
|
-
theme = _useStyletron4[1];
|
|
68
|
-
|
|
69
|
-
var _getOverrides = getOverrides(overrides.Root, LocationPuckContainer),
|
|
70
|
-
_getOverrides2 = _slicedToArray(_getOverrides, 2),
|
|
71
|
-
Root = _getOverrides2[0],
|
|
72
|
-
rootProps = _getOverrides2[1];
|
|
73
|
-
|
|
74
|
-
var _getOverrides3 = getOverrides(overrides.ConsumerLocationPuckCore, StyledConsumerLocationPuckCore),
|
|
75
|
-
_getOverrides4 = _slicedToArray(_getOverrides3, 2),
|
|
76
|
-
ConsumerLocationPuckCore = _getOverrides4[0],
|
|
77
|
-
consumerLocationPuckCoreProps = _getOverrides4[1];
|
|
78
|
-
|
|
79
|
-
var _getOverrides5 = getOverrides(overrides.LocationPuckApproximation, StyledLocationPuckApproximation),
|
|
80
|
-
_getOverrides6 = _slicedToArray(_getOverrides5, 2),
|
|
81
|
-
LocationPuckApproximation = _getOverrides6[0],
|
|
82
|
-
locationPuckApproximationProps = _getOverrides6[1];
|
|
83
|
-
|
|
84
|
-
return /*#__PURE__*/React.createElement(Root, rootProps, /*#__PURE__*/React.createElement(LocationPuckApproximation, _extends({
|
|
85
|
-
$color: theme.colors.contentAccent,
|
|
86
|
-
$radius: confidenceRadius
|
|
87
|
-
}, locationPuckApproximationProps)), /*#__PURE__*/React.createElement(ConsumerLocationPuckCore, consumerLocationPuckCoreProps), showHeading && /*#__PURE__*/React.createElement(ConsumerLocationPuckHeading, {
|
|
88
|
-
heading: heading
|
|
89
|
-
}));
|
|
90
|
-
};
|
|
91
|
-
|
|
92
|
-
var EarnerLocationPuckHeading = function EarnerLocationPuckHeading(_ref3) {
|
|
93
|
-
var size = _ref3.size,
|
|
94
|
-
color = _ref3.color,
|
|
95
|
-
heading = _ref3.heading;
|
|
96
|
-
|
|
97
|
-
var _useStyletron5 = useStyletron(),
|
|
98
|
-
_useStyletron6 = _slicedToArray(_useStyletron5, 2),
|
|
99
|
-
css = _useStyletron6[0],
|
|
100
|
-
theme = _useStyletron6[1];
|
|
101
|
-
|
|
102
|
-
return /*#__PURE__*/React.createElement("svg", {
|
|
103
|
-
className: css({
|
|
104
|
-
position: 'absolute',
|
|
105
|
-
transition: "".concat(theme.animation.timing300, " ").concat(theme.animation.easeOutCurve, " all")
|
|
106
|
-
}),
|
|
107
|
-
style: {
|
|
108
|
-
transform: "rotate(".concat(heading, "deg) scale(").concat(EARNER_LOCATION_PUCK_CORE_SCALES[size], ")")
|
|
109
|
-
},
|
|
110
|
-
width: "72",
|
|
111
|
-
height: "72",
|
|
112
|
-
viewBox: "0 0 72 72",
|
|
113
|
-
fill: "none",
|
|
114
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
115
|
-
}, /*#__PURE__*/React.createElement("path", {
|
|
116
|
-
fillRule: "evenodd",
|
|
117
|
-
clipRule: "evenodd",
|
|
118
|
-
d: "M36 20L52 52L36 42.8571L20 52L36 20Z",
|
|
119
|
-
fill: color
|
|
120
|
-
}));
|
|
121
|
-
};
|
|
122
|
-
|
|
123
|
-
var EarnerLocationPuck = function EarnerLocationPuck(_ref4) {
|
|
124
|
-
var heading = _ref4.heading,
|
|
125
|
-
confidenceRadius = _ref4.confidenceRadius,
|
|
126
|
-
size = _ref4.size,
|
|
127
|
-
overrides = _ref4.overrides;
|
|
128
|
-
|
|
129
|
-
var _useStyletron7 = useStyletron(),
|
|
130
|
-
_useStyletron8 = _slicedToArray(_useStyletron7, 2),
|
|
131
|
-
theme = _useStyletron8[1];
|
|
132
|
-
|
|
133
|
-
var color = theme.colors.contentPrimary;
|
|
134
|
-
|
|
135
|
-
var _getOverrides7 = getOverrides(overrides.Root, LocationPuckContainer),
|
|
136
|
-
_getOverrides8 = _slicedToArray(_getOverrides7, 2),
|
|
137
|
-
Root = _getOverrides8[0],
|
|
138
|
-
rootProps = _getOverrides8[1];
|
|
139
|
-
|
|
140
|
-
var _getOverrides9 = getOverrides(overrides.LocationPuckApproximation, StyledLocationPuckApproximation),
|
|
141
|
-
_getOverrides10 = _slicedToArray(_getOverrides9, 2),
|
|
142
|
-
LocationPuckApproximation = _getOverrides10[0],
|
|
143
|
-
locationPuckApproximationProps = _getOverrides10[1];
|
|
144
|
-
|
|
145
|
-
var _getOverrides11 = getOverrides(overrides.EarnerLocationPuckCore, StyledEarnerLocationPuckCore),
|
|
146
|
-
_getOverrides12 = _slicedToArray(_getOverrides11, 2),
|
|
147
|
-
EarnerLocationPuckCore = _getOverrides12[0],
|
|
148
|
-
earnerLocationPuckCoreProps = _getOverrides12[1];
|
|
149
|
-
|
|
150
|
-
return /*#__PURE__*/React.createElement(Root, rootProps, /*#__PURE__*/React.createElement(LocationPuckApproximation, _extends({
|
|
151
|
-
$color: color,
|
|
152
|
-
$radius: confidenceRadius
|
|
153
|
-
}, locationPuckApproximationProps)), /*#__PURE__*/React.createElement(EarnerLocationPuckCore, _extends({
|
|
154
|
-
$color: color,
|
|
155
|
-
$size: size
|
|
156
|
-
}, earnerLocationPuckCoreProps)), /*#__PURE__*/React.createElement(EarnerLocationPuckHeading, {
|
|
157
|
-
size: size,
|
|
158
|
-
color: color,
|
|
159
|
-
heading: heading
|
|
160
|
-
}));
|
|
161
|
-
};
|
|
162
|
-
|
|
163
|
-
var LocationPuck = function LocationPuck(_ref5) {
|
|
164
|
-
var _ref5$size = _ref5.size,
|
|
165
|
-
size = _ref5$size === void 0 ? LOCATION_PUCK_SIZES.medium : _ref5$size,
|
|
166
|
-
_ref5$heading = _ref5.heading,
|
|
167
|
-
heading = _ref5$heading === void 0 ? 0 : _ref5$heading,
|
|
168
|
-
_ref5$showHeading = _ref5.showHeading,
|
|
169
|
-
showHeading = _ref5$showHeading === void 0 ? true : _ref5$showHeading,
|
|
170
|
-
_ref5$confidenceRadiu = _ref5.confidenceRadius,
|
|
171
|
-
confidenceRadius = _ref5$confidenceRadiu === void 0 ? 0 : _ref5$confidenceRadiu,
|
|
172
|
-
_ref5$type = _ref5.type,
|
|
173
|
-
type = _ref5$type === void 0 ? LOCATION_PUCK_TYPES.consumer : _ref5$type,
|
|
174
|
-
_ref5$overrides = _ref5.overrides,
|
|
175
|
-
overrides = _ref5$overrides === void 0 ? {} : _ref5$overrides;
|
|
176
|
-
|
|
177
|
-
if (process.env.NODE_ENV !== "production") {
|
|
178
|
-
if (size !== LOCATION_PUCK_SIZES.medium && type === LOCATION_PUCK_TYPES.consumer) {
|
|
179
|
-
console.warn("Location puck size can only be applied to type === LOCATION_PUCK_TYPES.earner");
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
if (!showHeading && type === LOCATION_PUCK_TYPES.earner) {
|
|
183
|
-
console.warn("Earner location puck must show the heading indicator");
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
var sharedProps = {
|
|
188
|
-
heading: heading,
|
|
189
|
-
confidenceRadius: confidenceRadius,
|
|
190
|
-
overrides: overrides
|
|
191
|
-
};
|
|
192
|
-
return type === LOCATION_PUCK_TYPES.consumer ? /*#__PURE__*/React.createElement(ConsumerLocationPuck, _extends({}, sharedProps, {
|
|
193
|
-
showHeading: showHeading
|
|
194
|
-
})) : /*#__PURE__*/React.createElement(EarnerLocationPuck, _extends({}, sharedProps, {
|
|
195
|
-
size: size
|
|
196
|
-
}));
|
|
197
|
-
};
|
|
198
|
-
|
|
199
|
-
export default LocationPuck;
|
|
@@ -1,20 +0,0 @@
|
|
|
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));
|
|
@@ -1,10 +0,0 @@
|
|
|
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';
|