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
|
@@ -155,7 +155,6 @@ export const Root = styled('label', props => {
|
|
|
155
155
|
};
|
|
156
156
|
});
|
|
157
157
|
Root.displayName = "Root";
|
|
158
|
-
Root.displayName = 'Root';
|
|
159
158
|
export const Checkmark = styled('span', props => {
|
|
160
159
|
const {
|
|
161
160
|
$checked,
|
|
@@ -223,7 +222,6 @@ export const Checkmark = styled('span', props => {
|
|
|
223
222
|
};
|
|
224
223
|
});
|
|
225
224
|
Checkmark.displayName = "Checkmark";
|
|
226
|
-
Checkmark.displayName = 'Checkmark';
|
|
227
225
|
export const Label = styled('div', props => {
|
|
228
226
|
const {
|
|
229
227
|
$theme
|
|
@@ -238,10 +236,9 @@ export const Label = styled('div', props => {
|
|
|
238
236
|
...typography.LabelMedium,
|
|
239
237
|
lineHeight: '24px'
|
|
240
238
|
};
|
|
241
|
-
});
|
|
242
|
-
Label.displayName = "Label";
|
|
243
|
-
Label.displayName = 'Label'; // tricky style for focus event cause display: none doesn't work
|
|
239
|
+
}); // tricky style for focus event cause display: none doesn't work
|
|
244
240
|
|
|
241
|
+
Label.displayName = "Label";
|
|
245
242
|
export const Input = styled('input', {
|
|
246
243
|
opacity: 0,
|
|
247
244
|
width: 0,
|
|
@@ -252,7 +249,6 @@ export const Input = styled('input', {
|
|
|
252
249
|
position: 'absolute'
|
|
253
250
|
});
|
|
254
251
|
Input.displayName = "Input";
|
|
255
|
-
Input.displayName = 'Input';
|
|
256
252
|
export const Toggle = styled('div', props => {
|
|
257
253
|
let backgroundColor = props.$theme.colors.toggleFill;
|
|
258
254
|
|
|
@@ -279,7 +275,6 @@ export const Toggle = styled('div', props => {
|
|
|
279
275
|
};
|
|
280
276
|
});
|
|
281
277
|
Toggle.displayName = "Toggle";
|
|
282
|
-
Toggle.displayName = 'Toggle';
|
|
283
278
|
export const ToggleTrack = styled('div', props => {
|
|
284
279
|
let backgroundColor = props.$theme.colors.toggleTrackFill;
|
|
285
280
|
|
|
@@ -305,5 +300,4 @@ export const ToggleTrack = styled('div', props => {
|
|
|
305
300
|
width: props.$theme.sizing.scale1000
|
|
306
301
|
};
|
|
307
302
|
});
|
|
308
|
-
ToggleTrack.displayName = "ToggleTrack";
|
|
309
|
-
ToggleTrack.displayName = 'ToggleTrack';
|
|
303
|
+
ToggleTrack.displayName = "ToggleTrack";
|
package/es/combobox/combobox.js
CHANGED
|
@@ -163,7 +163,6 @@ function Combobox(props) {
|
|
|
163
163
|
if (listboxRef.current && event.relatedTarget && // NOTE(chase): Contains method expects a Node type, but relatedTarget is
|
|
164
164
|
// EventTarget which is a super type of Node. Passing an EventTarget seems
|
|
165
165
|
// to work fine, assuming the flow type is too strict.
|
|
166
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
167
166
|
listboxRef.current.contains(event.relatedTarget)) {
|
|
168
167
|
return;
|
|
169
168
|
}
|
|
@@ -232,82 +231,76 @@ function Combobox(props) {
|
|
|
232
231
|
overrides: popoverOverrides = {},
|
|
233
232
|
...restPopoverProps
|
|
234
233
|
}] = getOverrides(overrides.Popover, Popover);
|
|
235
|
-
return (
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
234
|
+
return /*#__PURE__*/React.createElement(Root, _extends({
|
|
235
|
+
ref: rootRef
|
|
236
|
+
}, rootProps), /*#__PURE__*/React.createElement(OverriddenPopover // React-focus-lock used in Popover used to skip non-tabbable elements (`tabIndex=-1`) elements for focus, we had ListBox with tabIndex to disable focus on
|
|
237
|
+
// the ListBox, but we can just disable autoFocus (as ListBox / ListItem should not be focusable) (and input is also not autoFocused).
|
|
238
|
+
// Select Component does the same thing
|
|
239
|
+
, _extends({
|
|
240
|
+
autoFocus: false,
|
|
241
|
+
isOpen: isOpen,
|
|
242
|
+
overrides: popoverOverrides,
|
|
243
|
+
placement: PLACEMENT.bottomLeft,
|
|
244
|
+
onClick: handleInputClick,
|
|
245
|
+
content: /*#__PURE__*/React.createElement(ListBox // TabIndex attribute exists to exclude option clicks from triggering onBlur event actions.
|
|
243
246
|
, _extends({
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
onFocus: handleFocus,
|
|
302
|
-
onKeyDown: handleKeyDown,
|
|
303
|
-
overrides: inputOverrides,
|
|
304
|
-
positive: positive,
|
|
305
|
-
size: size,
|
|
306
|
-
value: tempValue ? tempValue : value
|
|
307
|
-
}, isOpen ? {
|
|
308
|
-
'aria-controls': listboxId
|
|
309
|
-
} : {}, restInputProps)))))
|
|
310
|
-
);
|
|
247
|
+
tabIndex: "-1",
|
|
248
|
+
id: listboxId,
|
|
249
|
+
ref: listboxRef,
|
|
250
|
+
role: "listbox",
|
|
251
|
+
"aria-label": listBoxLabel,
|
|
252
|
+
$width: listboxWidth
|
|
253
|
+
}, listBoxProps), options.map((option, index) => {
|
|
254
|
+
const isSelected = selectionIndex === index;
|
|
255
|
+
const ReplacementNode = mapOptionToNode;
|
|
256
|
+
return (
|
|
257
|
+
/*#__PURE__*/
|
|
258
|
+
// List items are not focusable, therefore will never trigger a key event from it.
|
|
259
|
+
// Secondly, key events are handled from the input element.
|
|
260
|
+
// eslint-disable-next-line jsx-a11y/click-events-have-key-events
|
|
261
|
+
React.createElement(ListItem, _extends({
|
|
262
|
+
"aria-selected": isSelected,
|
|
263
|
+
id: isSelected ? activeDescendantId : null,
|
|
264
|
+
key: index,
|
|
265
|
+
onClick: () => handleOptionClick(index),
|
|
266
|
+
ref: isSelected ? selectedOptionRef : null,
|
|
267
|
+
role: "option",
|
|
268
|
+
$isSelected: isSelected,
|
|
269
|
+
$size: size
|
|
270
|
+
}, listItemProps), ReplacementNode ? /*#__PURE__*/React.createElement(ReplacementNode, {
|
|
271
|
+
isSelected: isSelected,
|
|
272
|
+
option: option
|
|
273
|
+
}) : mapOptionToString(option))
|
|
274
|
+
);
|
|
275
|
+
}))
|
|
276
|
+
}, restPopoverProps), /*#__PURE__*/React.createElement(InputContainer, _extends({
|
|
277
|
+
"aria-expanded": isOpen,
|
|
278
|
+
"aria-haspopup": "listbox",
|
|
279
|
+
"aria-owns": listboxId // a11y linter implements the older 1.0 spec, suppressing to use updated 1.1
|
|
280
|
+
// https://github.com/A11yance/aria-query/issues/43
|
|
281
|
+
// https://github.com/evcohen/eslint-plugin-jsx-a11y/issues/442
|
|
282
|
+
// eslint-disable-next-line jsx-a11y/role-has-required-aria-props
|
|
283
|
+
,
|
|
284
|
+
role: "combobox"
|
|
285
|
+
}, inputContainerProps), /*#__PURE__*/React.createElement(OverriddenInput, _extends({
|
|
286
|
+
inputRef: handleInputRef,
|
|
287
|
+
"aria-activedescendant": isOpen && selectionIndex >= 0 ? activeDescendantId : undefined,
|
|
288
|
+
"aria-autocomplete": "list",
|
|
289
|
+
disabled: disabled,
|
|
290
|
+
error: error,
|
|
291
|
+
name: name,
|
|
292
|
+
id: id,
|
|
293
|
+
onBlur: handleBlur,
|
|
294
|
+
onChange: handleInputChange,
|
|
295
|
+
onFocus: handleFocus,
|
|
296
|
+
onKeyDown: handleKeyDown,
|
|
297
|
+
overrides: inputOverrides,
|
|
298
|
+
positive: positive,
|
|
299
|
+
size: size,
|
|
300
|
+
value: tempValue ? tempValue : value
|
|
301
|
+
}, isOpen ? {
|
|
302
|
+
'aria-controls': listboxId
|
|
303
|
+
} : {}, restInputProps)))));
|
|
311
304
|
}
|
|
312
305
|
|
|
313
306
|
export default Combobox;
|
|
@@ -8,10 +8,8 @@ import { SIZE } from '../input';
|
|
|
8
8
|
import { styled } from '../styles';
|
|
9
9
|
export const StyledRoot = styled('div', {});
|
|
10
10
|
StyledRoot.displayName = "StyledRoot";
|
|
11
|
-
StyledRoot.displayName = 'StyledRoot';
|
|
12
11
|
export const StyledInputContainer = styled('div', {});
|
|
13
12
|
StyledInputContainer.displayName = "StyledInputContainer";
|
|
14
|
-
StyledInputContainer.displayName = 'StyledInputContainer';
|
|
15
13
|
export const StyledListBox = styled('ul', ({
|
|
16
14
|
$theme,
|
|
17
15
|
$width
|
|
@@ -28,7 +26,6 @@ export const StyledListBox = styled('ul', ({
|
|
|
28
26
|
};
|
|
29
27
|
});
|
|
30
28
|
StyledListBox.displayName = "StyledListBox";
|
|
31
|
-
StyledListBox.displayName = 'StyledListBox';
|
|
32
29
|
|
|
33
30
|
function buildStylesForSize(size, theme) {
|
|
34
31
|
const paddingDir = theme.direction === 'rtl' ? 'paddingRight' : 'paddingLeft';
|
|
@@ -77,5 +74,4 @@ export const StyledListItem = styled('li', ({
|
|
|
77
74
|
}
|
|
78
75
|
};
|
|
79
76
|
});
|
|
80
|
-
StyledListItem.displayName = "StyledListItem";
|
|
81
|
-
StyledListItem.displayName = 'StyledListItem';
|
|
77
|
+
StyledListItem.displayName = "StyledListItem";
|
|
@@ -12,7 +12,6 @@ import { useStyletron } from '../styles';
|
|
|
12
12
|
import Column from './column';
|
|
13
13
|
import { COLUMNS } from './constants';
|
|
14
14
|
|
|
15
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
16
15
|
function AnchorFilter(props) {
|
|
17
16
|
return /*#__PURE__*/React.createElement("div", null, "not implemented for anchor column");
|
|
18
17
|
}
|
|
@@ -35,9 +34,7 @@ function AnchorCell(props) {
|
|
|
35
34
|
function AnchorColumn(options) {
|
|
36
35
|
return Column({
|
|
37
36
|
kind: COLUMNS.ANCHOR,
|
|
38
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
39
37
|
buildFilter: function (params) {
|
|
40
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
41
38
|
return function (data) {
|
|
42
39
|
return true;
|
|
43
40
|
};
|
|
@@ -27,8 +27,7 @@ import { Select } from '../select';
|
|
|
27
27
|
import Column from './column';
|
|
28
28
|
import { COLUMNS, DATETIME_OPERATIONS } from './constants';
|
|
29
29
|
import FilterShell from './filter-shell';
|
|
30
|
-
import { LocaleContext } from '../locale';
|
|
31
|
-
|
|
30
|
+
import { LocaleContext } from '../locale';
|
|
32
31
|
const DATE_FORMAT = 'MM-dd-yyyy';
|
|
33
32
|
const MASK = '99-99-9999 - 99-99-9999';
|
|
34
33
|
const TIME_FORMAT = 'HH:mm ss:SS';
|
|
@@ -176,8 +175,7 @@ function DatetimeFilter(props) {
|
|
|
176
175
|
const [exclude, setExclude] = React.useState(initialState.exclude);
|
|
177
176
|
const [comparatorIndex, setComparatorIndex] = React.useState(initialState.comparatorIndex);
|
|
178
177
|
const [rangeOperator, setRangeOperator] = React.useState([initialState.rangeOperator]);
|
|
179
|
-
const [categoricalOperator, setCategoricalOperator] = React.useState([initialState.categoricalOperator]);
|
|
180
|
-
|
|
178
|
+
const [categoricalOperator, setCategoricalOperator] = React.useState([initialState.categoricalOperator]);
|
|
181
179
|
const [rangeDates, setRangeDates] = React.useState(initialState.rangeDates.length ? initialState.rangeDates : [new Date(datesSorted[0]), new Date(datesSorted[datesSorted.length - 1])]);
|
|
182
180
|
const [years, setYears] = React.useState(initialState.years);
|
|
183
181
|
const [halves, setHalves] = React.useState(initialState.halves);
|
|
@@ -191,7 +189,6 @@ function DatetimeFilter(props) {
|
|
|
191
189
|
onExcludeChange: () => setExclude(!exclude),
|
|
192
190
|
onApply: () => {
|
|
193
191
|
if (isRange) {
|
|
194
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
195
192
|
const op = rangeOperator[0].id;
|
|
196
193
|
let description = '';
|
|
197
194
|
|
|
@@ -219,7 +216,6 @@ function DatetimeFilter(props) {
|
|
|
219
216
|
}
|
|
220
217
|
|
|
221
218
|
if (isCategorical) {
|
|
222
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
223
219
|
const op = categoricalOperator[0].id;
|
|
224
220
|
let selection = [];
|
|
225
221
|
let operatorLocaleLabelKey = '';
|
|
@@ -301,8 +297,7 @@ function DatetimeFilter(props) {
|
|
|
301
297
|
}
|
|
302
298
|
}, locale.datatable.datetimeFilterCategorical)), isRange && /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Select, {
|
|
303
299
|
value: rangeOperator,
|
|
304
|
-
onChange: params => setRangeOperator(params.value)
|
|
305
|
-
,
|
|
300
|
+
onChange: params => setRangeOperator(params.value),
|
|
306
301
|
mountNode: mountNode.current,
|
|
307
302
|
options: RANGE_OPERATIONS.map(op => ({
|
|
308
303
|
label: locale.datatable[op.localeLabelKey],
|
|
@@ -314,8 +309,7 @@ function DatetimeFilter(props) {
|
|
|
314
309
|
className: css({
|
|
315
310
|
paddingTop: theme.sizing.scale600
|
|
316
311
|
})
|
|
317
|
-
}, (rangeOperator[0].id === DATETIME_OPERATIONS.RANGE_DATETIME || rangeOperator[0].id === DATETIME_OPERATIONS.RANGE_DATE) && /*#__PURE__*/React.createElement(Datepicker
|
|
318
|
-
, {
|
|
312
|
+
}, (rangeOperator[0].id === DATETIME_OPERATIONS.RANGE_DATETIME || rangeOperator[0].id === DATETIME_OPERATIONS.RANGE_DATE) && /*#__PURE__*/React.createElement(Datepicker, {
|
|
319
313
|
mountNode: mountNode.current,
|
|
320
314
|
value: rangeDates,
|
|
321
315
|
onChange: ({
|
|
@@ -376,8 +370,7 @@ function DatetimeFilter(props) {
|
|
|
376
370
|
options: CATEGORICAL_OPERATIONS.map(op => ({
|
|
377
371
|
label: locale.datatable[op.localeLabelKey],
|
|
378
372
|
id: op.id
|
|
379
|
-
}))
|
|
380
|
-
,
|
|
373
|
+
})),
|
|
381
374
|
mountNode: mountNode.current,
|
|
382
375
|
size: "compact",
|
|
383
376
|
clearable: false
|
|
@@ -64,14 +64,12 @@ function validateInput(input) {
|
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
const bisect = bisector(d => d.x0);
|
|
67
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
68
67
|
const Histogram = /*#__PURE__*/React.memo(function Histogram({
|
|
69
68
|
data,
|
|
70
69
|
lower,
|
|
71
70
|
upper,
|
|
72
71
|
isRange,
|
|
73
72
|
exclude,
|
|
74
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
75
73
|
precision
|
|
76
74
|
}) {
|
|
77
75
|
const [css, theme] = useStyletron();
|
|
@@ -311,7 +309,6 @@ function NumericalFilter(props) {
|
|
|
311
309
|
}) {
|
|
312
310
|
return /*#__PURE__*/React.createElement(React.Fragment, null, $value[$thumbIndex]);
|
|
313
311
|
},
|
|
314
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
315
312
|
TickBar: ({
|
|
316
313
|
$min,
|
|
317
314
|
$max
|
|
@@ -326,7 +323,9 @@ function NumericalFilter(props) {
|
|
|
326
323
|
})
|
|
327
324
|
},
|
|
328
325
|
InnerTrack: {
|
|
329
|
-
style: (
|
|
326
|
+
style: ({
|
|
327
|
+
$theme
|
|
328
|
+
}) => {
|
|
330
329
|
if (!isRange) {
|
|
331
330
|
return {
|
|
332
331
|
// For range selection we use the color as is, but when selecting the single value,
|
|
@@ -422,7 +421,7 @@ const defaultOptions = {
|
|
|
422
421
|
sortable: true,
|
|
423
422
|
filterable: true,
|
|
424
423
|
format: NUMERICAL_FORMATS.DEFAULT,
|
|
425
|
-
highlight:
|
|
424
|
+
highlight: n => false,
|
|
426
425
|
precision: 0
|
|
427
426
|
};
|
|
428
427
|
|
|
@@ -12,7 +12,6 @@ import Column from './column';
|
|
|
12
12
|
import { COLUMNS } from './constants';
|
|
13
13
|
import { HighlightCellText } from './text-search';
|
|
14
14
|
|
|
15
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
16
15
|
function StringFilter(props) {
|
|
17
16
|
return /*#__PURE__*/React.createElement("div", null, "not implemented for string column");
|
|
18
17
|
}
|
|
@@ -36,9 +35,7 @@ function StringColumn(options) {
|
|
|
36
35
|
return Column({
|
|
37
36
|
kind: COLUMNS.STRING,
|
|
38
37
|
cellBlockAlign: options.cellBlockAlign,
|
|
39
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
40
38
|
buildFilter: function (params) {
|
|
41
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
42
39
|
return function (data) {
|
|
43
40
|
return true;
|
|
44
41
|
};
|
package/es/data-table/column.js
CHANGED
|
@@ -6,7 +6,6 @@ LICENSE file in the root directory of this source tree.
|
|
|
6
6
|
*/
|
|
7
7
|
import * as React from 'react';
|
|
8
8
|
import { Checkbox } from '../checkbox';
|
|
9
|
-
import { LocaleContext } from '../locale';
|
|
10
9
|
import { useStyletron } from '../styles';
|
|
11
10
|
|
|
12
11
|
function Column(options) {
|
|
@@ -20,9 +19,8 @@ function Column(options) {
|
|
|
20
19
|
maxWidth: options.maxWidth,
|
|
21
20
|
minWidth: options.minWidth,
|
|
22
21
|
// todo(flow->ts) add proper type annotation
|
|
23
|
-
// eslint-disable-next-line
|
|
22
|
+
// eslint-disable-next-line react/display-name
|
|
24
23
|
renderCell: /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
25
|
-
const locale = React.useContext(LocaleContext);
|
|
26
24
|
const [css, theme] = useStyletron();
|
|
27
25
|
const ProvidedCell = options.renderCell;
|
|
28
26
|
let cellBlockAlign = 'flex-start';
|
|
@@ -57,7 +55,6 @@ function Column(options) {
|
|
|
57
55
|
paddingRight: theme.sizing.scale300
|
|
58
56
|
})
|
|
59
57
|
}, /*#__PURE__*/React.createElement(Checkbox, {
|
|
60
|
-
"aria-label": locale.datatable.selectRow,
|
|
61
58
|
onChange: props.onSelect,
|
|
62
59
|
checked: props.isSelected,
|
|
63
60
|
overrides: {
|
|
@@ -129,8 +129,7 @@ HeaderContext.displayName = 'HeaderContext';
|
|
|
129
129
|
function Header(props) {
|
|
130
130
|
const [css, theme] = useStyletron();
|
|
131
131
|
const [startResizePos, setStartResizePos] = React.useState(0);
|
|
132
|
-
const [endResizePos, setEndResizePos] = React.useState(0);
|
|
133
|
-
|
|
132
|
+
const [endResizePos, setEndResizePos] = React.useState(0);
|
|
134
133
|
const headerCellRef = React.useRef(null);
|
|
135
134
|
const RULER_OFFSET = 2;
|
|
136
135
|
const isResizingThisColumn = props.resizeIndex === props.index;
|
|
@@ -173,8 +172,7 @@ function Header(props) {
|
|
|
173
172
|
}
|
|
174
173
|
}
|
|
175
174
|
}
|
|
176
|
-
}
|
|
177
|
-
|
|
175
|
+
}
|
|
178
176
|
|
|
179
177
|
function handleMouseUp(event) {
|
|
180
178
|
props.onResize(props.index, endResizePos - startResizePos);
|
|
@@ -635,13 +633,15 @@ export function DataTable({
|
|
|
635
633
|
}
|
|
636
634
|
|
|
637
635
|
result.push(gridProps.width - sum(result) - scrollbarWidth);
|
|
638
|
-
resetAfterColumnIndex(0);
|
|
639
636
|
return result;
|
|
640
637
|
}
|
|
641
638
|
}
|
|
642
639
|
|
|
643
640
|
return resizedWidths;
|
|
644
641
|
}, [gridRef, measuredWidths, resizeDeltas, browserScrollbarWidth, rows.length, columns]);
|
|
642
|
+
React.useEffect(() => {
|
|
643
|
+
resetAfterColumnIndex(0);
|
|
644
|
+
}, [normalizedWidths]);
|
|
645
645
|
const isSelectable = batchActions ? !!batchActions.length : false;
|
|
646
646
|
const isSelectedAll = React.useMemo(() => {
|
|
647
647
|
if (!selectedRowIds) {
|
|
@@ -779,8 +779,7 @@ export function DataTable({
|
|
|
779
779
|
tableHeight: height,
|
|
780
780
|
widths: normalizedWidths
|
|
781
781
|
}
|
|
782
|
-
}, /*#__PURE__*/React.createElement(VariableSizeGrid
|
|
783
|
-
, {
|
|
782
|
+
}, /*#__PURE__*/React.createElement(VariableSizeGrid, {
|
|
784
783
|
ref: setGridRef,
|
|
785
784
|
overscanRowCount: 10,
|
|
786
785
|
overscanColumnCount: 5,
|
|
@@ -6,14 +6,12 @@ LICENSE file in the root directory of this source tree.
|
|
|
6
6
|
*/
|
|
7
7
|
import * as React from 'react';
|
|
8
8
|
import { Checkbox } from '../checkbox';
|
|
9
|
-
import { LocaleContext } from '../locale';
|
|
10
9
|
import { useStyletron } from '../styles';
|
|
11
10
|
import ChevronDown from '../icon/chevron-down';
|
|
12
11
|
import ChevronUp from '../icon/chevron-up';
|
|
13
12
|
import { SORT_DIRECTIONS } from './constants';
|
|
14
13
|
import { isFocusVisible } from '../utils/focusVisible';
|
|
15
14
|
const HeaderCell = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
16
|
-
const locale = React.useContext(LocaleContext);
|
|
17
15
|
const [css, theme] = useStyletron();
|
|
18
16
|
const [focusVisible, setFocusVisible] = React.useState(false);
|
|
19
17
|
const checkboxRef = React.useRef(null);
|
|
@@ -24,7 +22,7 @@ const HeaderCell = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
24
22
|
}
|
|
25
23
|
};
|
|
26
24
|
|
|
27
|
-
const handleBlur =
|
|
25
|
+
const handleBlur = event => {
|
|
28
26
|
if (focusVisible !== false) {
|
|
29
27
|
setFocusVisible(false);
|
|
30
28
|
}
|
|
@@ -33,46 +31,23 @@ const HeaderCell = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
33
31
|
const backgroundColor = props.isHovered ? theme.colors.backgroundSecondary : theme.colors.backgroundPrimary;
|
|
34
32
|
return /*#__PURE__*/React.createElement("div", {
|
|
35
33
|
ref: ref,
|
|
34
|
+
role: "button",
|
|
35
|
+
tabIndex: 0,
|
|
36
36
|
className: css({ ...theme.typography.font350,
|
|
37
37
|
alignItems: 'center',
|
|
38
38
|
backgroundColor,
|
|
39
|
-
color: theme.colors.contentPrimary,
|
|
40
|
-
display: props.isMeasured ? 'inline-flex' : 'flex',
|
|
41
|
-
flexGrow: 1,
|
|
42
|
-
height: '100%',
|
|
43
|
-
paddingLeft: theme.sizing.scale500
|
|
44
|
-
})
|
|
45
|
-
}, props.isSelectable && /*#__PURE__*/React.createElement("span", {
|
|
46
|
-
className: css({
|
|
47
|
-
paddingRight: theme.sizing.scale300
|
|
48
|
-
}),
|
|
49
|
-
ref: checkboxRef
|
|
50
|
-
}, /*#__PURE__*/React.createElement(Checkbox, {
|
|
51
|
-
onChange: () => {
|
|
52
|
-
if (props.isSelectedAll || props.isSelectedIndeterminate) {
|
|
53
|
-
props.onSelectNone();
|
|
54
|
-
} else {
|
|
55
|
-
props.onSelectAll();
|
|
56
|
-
}
|
|
57
|
-
},
|
|
58
|
-
"aria-label": locale.datatable.selectAllRows,
|
|
59
|
-
checked: props.isSelectedAll || props.isSelectedIndeterminate,
|
|
60
|
-
isIndeterminate: props.isSelectedIndeterminate
|
|
61
|
-
})), /*#__PURE__*/React.createElement("div", {
|
|
62
|
-
className: css({
|
|
63
|
-
alignItems: 'center',
|
|
64
|
-
backgroundColor: 'transparent',
|
|
65
|
-
border: 'none',
|
|
66
39
|
boxSizing: 'border-box',
|
|
40
|
+
color: theme.colors.contentPrimary,
|
|
67
41
|
cursor: props.sortable ? 'pointer' : null,
|
|
68
|
-
display: 'flex',
|
|
42
|
+
display: props.isMeasured ? 'inline-flex' : 'flex',
|
|
69
43
|
flexGrow: 1,
|
|
70
44
|
height: '100%',
|
|
71
|
-
|
|
72
|
-
outlineOffset: '-3px',
|
|
73
|
-
// paddingLeft: theme.sizing.scale500,
|
|
45
|
+
paddingLeft: theme.sizing.scale500,
|
|
74
46
|
paddingRight: theme.sizing.scale500,
|
|
75
|
-
|
|
47
|
+
flexWrap: 'nowrap',
|
|
48
|
+
whiteSpace: 'nowrap',
|
|
49
|
+
outline: focusVisible ? `3px solid ${theme.colors.accent}` : 'none',
|
|
50
|
+
outlineOffset: '-3px'
|
|
76
51
|
}),
|
|
77
52
|
onMouseEnter: props.onMouseEnter,
|
|
78
53
|
onMouseLeave: props.onMouseLeave,
|
|
@@ -81,16 +56,34 @@ const HeaderCell = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
81
56
|
props.onSort(props.index);
|
|
82
57
|
}
|
|
83
58
|
},
|
|
84
|
-
onClick:
|
|
59
|
+
onClick: event => {
|
|
60
|
+
// Avoid column sort if select-all checkbox click.
|
|
61
|
+
if (checkboxRef.current && checkboxRef.current.contains(event.target)) {
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
|
|
85
65
|
if (props.sortable) {
|
|
86
66
|
props.onSort(props.index);
|
|
87
67
|
}
|
|
88
68
|
},
|
|
89
69
|
onFocus: handleFocus,
|
|
90
|
-
onBlur: handleBlur
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
70
|
+
onBlur: handleBlur
|
|
71
|
+
}, props.isSelectable && /*#__PURE__*/React.createElement("span", {
|
|
72
|
+
className: css({
|
|
73
|
+
paddingRight: theme.sizing.scale300
|
|
74
|
+
}),
|
|
75
|
+
ref: checkboxRef
|
|
76
|
+
}, /*#__PURE__*/React.createElement(Checkbox, {
|
|
77
|
+
onChange: e => {
|
|
78
|
+
if (props.isSelectedAll || props.isSelectedIndeterminate) {
|
|
79
|
+
props.onSelectNone();
|
|
80
|
+
} else {
|
|
81
|
+
props.onSelectAll();
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
checked: props.isSelectedAll || props.isSelectedIndeterminate,
|
|
85
|
+
isIndeterminate: props.isSelectedIndeterminate
|
|
86
|
+
})), props.title, /*#__PURE__*/React.createElement("div", {
|
|
94
87
|
className: css({
|
|
95
88
|
position: 'relative',
|
|
96
89
|
width: '100%',
|
|
@@ -109,7 +102,7 @@ const HeaderCell = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
109
102
|
color: props.sortDirection ? theme.colors.contentPrimary : theme.colors.contentSecondary
|
|
110
103
|
}), (props.sortDirection === SORT_DIRECTIONS.ASC || !props.sortDirection) && /*#__PURE__*/React.createElement(ChevronUp, {
|
|
111
104
|
color: props.sortDirection ? theme.colors.contentPrimary : theme.colors.contentSecondary
|
|
112
|
-
}))))
|
|
105
|
+
}))));
|
|
113
106
|
});
|
|
114
107
|
HeaderCell.displayName = 'HeaderCell';
|
|
115
108
|
export default HeaderCell;
|
package/es/data-table/locale.js
CHANGED
|
@@ -37,8 +37,6 @@ const locale = {
|
|
|
37
37
|
booleanFilterTrue: 'true',
|
|
38
38
|
booleanFilterFalse: 'false',
|
|
39
39
|
booleanColumnTrueShort: 'T',
|
|
40
|
-
booleanColumnFalseShort: 'F'
|
|
41
|
-
selectRow: 'Select row',
|
|
42
|
-
selectAllRows: 'Select all rows'
|
|
40
|
+
booleanColumnFalseShort: 'F'
|
|
43
41
|
};
|
|
44
42
|
export default locale;
|
|
@@ -42,8 +42,7 @@ function MeasureColumn({
|
|
|
42
42
|
onMouseEnter: () => {},
|
|
43
43
|
onMouseLeave: () => {},
|
|
44
44
|
onSelectAll: () => {},
|
|
45
|
-
onSelectNone: () => {}
|
|
46
|
-
,
|
|
45
|
+
onSelectNone: () => {},
|
|
47
46
|
onSort: i => {},
|
|
48
47
|
sortable: column.sortable,
|
|
49
48
|
sortDirection: null,
|
|
@@ -190,12 +190,12 @@ export function StatefulDataTable(props) {
|
|
|
190
190
|
rows: props.rows,
|
|
191
191
|
title: title
|
|
192
192
|
})))), Boolean(selectedRowIds.size) && props.batchActions && /*#__PURE__*/React.createElement("div", {
|
|
193
|
-
|
|
193
|
+
style: {
|
|
194
194
|
display: 'flex',
|
|
195
195
|
alignItems: 'center',
|
|
196
|
-
paddingTop: theme.sizing.
|
|
197
|
-
paddingBottom: theme.sizing.
|
|
198
|
-
}
|
|
196
|
+
paddingTop: theme.sizing.scale400,
|
|
197
|
+
paddingBottom: theme.sizing.scale400
|
|
198
|
+
}
|
|
199
199
|
}, props.batchActions.map(action => {
|
|
200
200
|
function onClick(event) {
|
|
201
201
|
action.onClick({
|
|
@@ -24,7 +24,6 @@ import { DENSITY, ORIENTATION, WEEKDAYS } from './constants';
|
|
|
24
24
|
import { getOverrides, mergeOverrides } from '../helpers/overrides';
|
|
25
25
|
import { forkBlur, forkFocus, isFocusVisible } from '../utils/focusVisible';
|
|
26
26
|
|
|
27
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
28
27
|
const navBtnStyle = ({
|
|
29
28
|
$theme
|
|
30
29
|
}) => ({
|