baseui 12.0.0 → 12.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/accordion/accordion.js +4 -2
- package/accordion/accordion.js.flow +1 -1
- package/accordion/panel.js +3 -2
- package/accordion/stateful-panel-container.js +1 -0
- package/accordion/styled-components.js +8 -1
- package/accordion/types.d.ts +2 -2
- package/app-nav-bar/app-nav-bar.js +4 -2
- package/app-nav-bar/mobile-menu.js +2 -1
- package/app-nav-bar/styled-components.js +19 -1
- package/app-nav-bar/types.d.ts +2 -2
- package/app-nav-bar/user-menu.js +1 -1
- package/aspect-ratio-box/aspect-ratio-box-body.d.ts +1 -1
- package/aspect-ratio-box/aspect-ratio-box.js +3 -1
- package/aspect-ratio-box/types.d.ts +1 -1
- package/avatar/styled-components.js +4 -1
- package/badge/styled-components.js +16 -11
- package/badge/styled-components.js.flow +4 -4
- package/badge/types.d.ts +2 -2
- package/banner/index.d.ts +1 -1
- package/banner/styled-components.js +25 -12
- package/banner/types.d.ts +15 -15
- package/banner/types.js.flow +13 -11
- package/block/block.js +3 -1
- package/block/styled-components.js +2 -1
- package/block/types.d.ts +3 -4
- package/breadcrumbs/styled-components.js +5 -1
- package/button/styled-components.js +7 -0
- package/button/styled-components.js.flow +2 -0
- package/button/types.d.ts +4 -5
- package/button-group/stateful-button-group.js +1 -0
- package/button-group/stateful-container.js +3 -1
- package/button-group/styled-components.js +2 -1
- package/button-group/types.d.ts +4 -5
- package/card/styled-components.js +11 -4
- package/checkbox/styled-components.js +10 -4
- package/checkbox/styled-components.js.flow +1 -1
- package/checkbox/types.d.ts +36 -37
- package/combobox/combobox.js +78 -71
- package/combobox/styled-components.js +5 -1
- package/combobox/types.d.ts +4 -5
- package/data-table/column-anchor.js +3 -0
- package/data-table/column-datetime.js +10 -4
- package/data-table/column-numerical.js +4 -4
- package/data-table/column-string.js +3 -0
- package/data-table/column.js +6 -1
- package/data-table/data-table.js +6 -3
- package/data-table/filter-menu.js +2 -1
- package/data-table/header-cell.js +43 -34
- package/data-table/locale.d.ts +4 -0
- package/data-table/locale.js +3 -1
- package/data-table/locale.js.flow +5 -0
- package/data-table/measure-column-widths.js +5 -4
- package/data-table/stateful-container.js +2 -1
- package/data-table/stateful-data-table.js +4 -4
- package/data-table/types.d.ts +4 -5
- package/datepicker/calendar-header.js +1 -0
- package/datepicker/calendar.js +2 -0
- package/datepicker/datepicker.js +2 -0
- package/datepicker/day.js +2 -1
- package/datepicker/index.d.ts +1 -1
- package/datepicker/index.js +7 -0
- package/datepicker/index.js.flow +1 -1
- package/datepicker/stateful-calendar.js +7 -3
- package/datepicker/stateful-container.js +2 -0
- package/datepicker/stateful-datepicker.js +9 -4
- package/datepicker/styled-components.js +27 -4
- package/datepicker/types.d.ts +2 -2
- package/datepicker/utils/date-helpers.js +2 -1
- package/datepicker/utils/index.js +2 -1
- package/divider/styled-components.js +4 -3
- package/divider/types.d.ts +1 -1
- package/dnd-list/stateful-list-container.js +1 -0
- package/dnd-list/styled-components.js +7 -0
- package/dnd-list/types.d.ts +2 -2
- package/drawer/constants.js +1 -0
- package/drawer/drawer.js +2 -3
- package/drawer/drawer.js.flow +1 -3
- package/drawer/styled-components.js +9 -2
- package/drawer/types.d.ts +2 -2
- package/es/accordion/accordion.js +3 -3
- package/es/accordion/panel.js +3 -2
- package/es/accordion/stateful-panel-container.js +1 -0
- package/es/accordion/styled-components.js +8 -1
- package/es/app-nav-bar/app-nav-bar.js +6 -2
- package/es/app-nav-bar/mobile-menu.js +4 -2
- package/es/app-nav-bar/styled-components.js +19 -1
- package/es/app-nav-bar/user-menu.js +1 -1
- package/es/aspect-ratio-box/aspect-ratio-box.js +3 -1
- package/es/avatar/styled-components.js +4 -1
- package/es/badge/styled-components.js +11 -6
- package/es/banner/styled-components.js +16 -3
- package/es/block/block.js +3 -1
- package/es/block/styled-components.js +2 -1
- package/es/breadcrumbs/styled-components.js +5 -1
- package/es/button/button.js +8 -0
- package/es/button/styled-components.js +7 -0
- package/es/button-group/stateful-button-group.js +1 -0
- package/es/button-group/stateful-container.js +3 -1
- package/es/button-group/styled-components.js +2 -1
- package/es/card/index.js +2 -1
- package/es/card/styled-components.js +12 -4
- package/es/checkbox/index.js +1 -0
- package/es/checkbox/stateful-checkbox-container.js +3 -0
- package/es/checkbox/styled-components.js +10 -4
- package/es/combobox/combobox.js +76 -69
- package/es/combobox/styled-components.js +5 -1
- package/es/data-table/column-anchor.js +3 -0
- package/es/data-table/column-datetime.js +12 -5
- package/es/data-table/column-numerical.js +5 -4
- package/es/data-table/column-string.js +3 -0
- package/es/data-table/column.js +4 -1
- package/es/data-table/data-table.js +6 -3
- package/es/data-table/filter-menu.js +2 -1
- package/es/data-table/header-cell.js +41 -34
- package/es/data-table/locale.js +3 -1
- package/es/data-table/measure-column-widths.js +5 -4
- package/es/data-table/stateful-container.js +2 -1
- package/es/data-table/stateful-data-table.js +4 -4
- package/es/datepicker/calendar-header.js +1 -0
- package/es/datepicker/calendar.js +2 -0
- package/es/datepicker/datepicker.js +3 -1
- package/es/datepicker/day.js +2 -1
- package/es/datepicker/index.js +1 -1
- package/es/datepicker/stateful-calendar.js +4 -1
- package/es/datepicker/stateful-container.js +2 -0
- package/es/datepicker/stateful-datepicker.js +5 -1
- package/es/datepicker/styled-components.js +26 -3
- package/es/datepicker/utils/date-helpers.js +2 -1
- package/es/datepicker/utils/index.js +2 -1
- package/es/divider/styled-components.js +3 -2
- package/es/dnd-list/stateful-list-container.js +1 -0
- package/es/dnd-list/styled-components.js +7 -0
- package/es/drawer/constants.js +1 -0
- package/es/drawer/drawer.js +2 -5
- package/es/drawer/styled-components.js +9 -2
- package/es/file-uploader/styled-components.js +6 -1
- package/es/flex-grid/flex-grid-item.js +5 -6
- package/es/flex-grid/flex-grid.js +4 -1
- package/es/form-control/styled-components.js +6 -1
- package/es/header-navigation/styled-components.js +4 -1
- package/es/helper/styled-components.js +3 -1
- package/es/helpers/overrides.js +9 -5
- package/es/icon/build-icons.js +0 -2
- package/es/icon/index.js +1 -1
- package/es/icon/omit-dollar-prefixed-keys.js +1 -0
- package/es/icon/styled-components.js +2 -1
- package/es/input/base-input.js +1 -0
- package/es/input/masked-input.js +9 -2
- package/es/input/stateful-container.js +1 -0
- package/es/input/styled-components.js +18 -7
- package/es/input/utils.js +2 -0
- package/es/layer/layer.js +24 -0
- package/es/layer/layers-manager.js +91 -1
- package/es/layout-grid/styled-components.js +3 -0
- package/es/link/index.js +2 -1
- package/es/link/styled-components.js +2 -1
- package/es/list/list-heading.js +21 -17
- package/es/list/list-item.js +2 -1
- package/es/list/styled-components.js +17 -1
- package/es/locale/es_AR.js +3 -1
- package/es/locale/index.js +2 -1
- package/es/locale/tr_TR.js +3 -1
- package/es/map-marker/constants.js +14 -0
- package/es/map-marker/fixed-marker.js +1 -0
- package/es/map-marker/index.js +2 -1
- package/es/map-marker/location-puck.js +142 -0
- package/es/map-marker/pin-head.js +1 -0
- package/es/map-marker/styled-components.js +86 -2
- package/es/menu/index.js +1 -1
- package/es/menu/menu.js +14 -4
- package/es/menu/option-profile.js +1 -0
- package/es/menu/stateful-container.js +10 -0
- package/es/menu/styled-components.js +32 -2
- package/es/message-card/constants.js +19 -0
- package/es/message-card/index.js +10 -0
- package/es/message-card/message-card.js +114 -0
- package/es/message-card/styled-components.js +108 -0
- package/es/message-card/types.js +1 -0
- package/es/message-card/utils.js +27 -0
- package/es/modal/modal.js +4 -6
- package/es/modal/styled-components.js +8 -1
- package/es/pagination/stateful-container.js +1 -0
- package/es/pagination/stateful-pagination.js +1 -0
- package/es/pagination/styled-components.js +4 -1
- package/es/payment-card/styled-components.js +2 -1
- package/es/phone-input/base-country-picker.js +3 -1
- package/es/phone-input/country-select-dropdown.js +1 -0
- package/es/phone-input/styled-components.js +15 -4
- package/es/pin-code/styled-components.js +4 -1
- package/es/popover/popover.js +9 -12
- package/es/popover/styled-components.js +9 -4
- package/es/progress-bar/progressbar-rounded.js +1 -0
- package/es/progress-bar/styled-components.js +14 -2
- package/es/progress-steps/progress-steps.js +2 -1
- package/es/progress-steps/styled-components.js +20 -12
- package/es/radio/stateful-radiogroup-container.js +3 -0
- package/es/radio/styled-components.js +10 -3
- package/es/rating/emoticon-rating.js +2 -1
- package/es/rating/star-rating.js +2 -1
- package/es/rating/styled-components.js +5 -1
- package/es/select/autosize-input.js +2 -3
- package/es/select/default-props.js +1 -1
- package/es/select/dropdown.js +2 -1
- package/es/select/multi-value.js +2 -1
- package/es/select/select-component.js +10 -10
- package/es/select/single-select.js +2 -2
- package/es/select/stateful-select-container.js +2 -0
- package/es/select/styled-components.js +33 -6
- package/es/select/value.js +3 -4
- package/es/side-navigation/index.js +2 -1
- package/es/side-navigation/nav-item.js +1 -0
- package/es/side-navigation/nav.js +1 -1
- package/es/side-navigation/stateful-container.js +1 -0
- package/es/side-navigation/styled-components.js +8 -2
- package/es/skeleton/styled-components.js +3 -1
- package/es/slider/slider.js +4 -2
- package/es/slider/stateful-slider-container.js +2 -0
- package/es/slider/styled-components.js +9 -0
- package/es/snackbar/snackbar-element.js +1 -0
- package/es/snackbar/styled-components.js +9 -1
- package/es/spinner/styled-components.js +2 -1
- package/es/styles/__mocks__/styled.js +8 -5
- package/es/styles/styled.js +7 -6
- package/es/table/index.js +2 -1
- package/es/table/styled-components.js +13 -1
- package/es/table-grid/styled-components.js +4 -1
- package/es/table-semantic/styled-components.js +20 -3
- package/es/tabs/stateful-tabs.js +1 -0
- package/es/tabs/styled-components.js +5 -1
- package/es/tabs/tabs.js +4 -2
- package/es/tabs-motion/styled-components.js +32 -2
- package/es/tabs-motion/tab.js +1 -0
- package/es/tabs-motion/tabs.js +31 -6
- package/es/tag/styled-components.js +32 -1
- package/es/tag/tag.js +6 -2
- package/es/textarea/styled-components.js +20 -12
- package/es/textarea/textarea.js +4 -2
- package/es/themes/move-theme/typography.js +36 -0
- package/es/themes/shared/borders.js +8 -3
- package/es/themes/shared/typography.js +10 -10
- package/es/timezonepicker/timezone-picker.js +5 -1
- package/es/timezonepicker/tzdata.js +1 -1
- package/es/toast/styled-components.js +5 -1
- package/es/toast/toaster.js +0 -2
- package/es/tokens/colors.js +24 -0
- package/es/tooltip/styled-components.js +4 -1
- package/es/tree-view/index.js +2 -1
- package/es/tree-view/styled-components.js +7 -1
- package/es/tree-view/tree-view.js +3 -1
- package/es/types/globals.d.js +12 -0
- package/es/utils/deep-merge.js +0 -5
- package/es/utils/deprecated-component.js +1 -0
- package/es/utils/focusVisible.js +4 -2
- package/esm/accordion/accordion.js +4 -4
- package/esm/accordion/panel.js +3 -2
- package/esm/accordion/stateful-panel-container.js +1 -0
- package/esm/accordion/styled-components.js +8 -1
- package/esm/app-nav-bar/app-nav-bar.js +4 -2
- package/esm/app-nav-bar/mobile-menu.js +4 -2
- package/esm/app-nav-bar/styled-components.js +19 -1
- package/esm/app-nav-bar/user-menu.js +1 -1
- package/esm/aspect-ratio-box/aspect-ratio-box.js +3 -1
- package/esm/avatar/styled-components.js +4 -1
- package/esm/badge/styled-components.js +11 -6
- package/esm/banner/styled-components.js +16 -3
- package/esm/block/block.js +3 -1
- package/esm/block/styled-components.js +2 -1
- package/esm/breadcrumbs/styled-components.js +5 -1
- package/esm/button/styled-components.js +7 -0
- package/esm/button-group/stateful-button-group.js +1 -0
- package/esm/button-group/stateful-container.js +3 -1
- package/esm/button-group/styled-components.js +2 -1
- package/esm/card/index.js +2 -1
- package/esm/card/styled-components.js +12 -4
- package/esm/checkbox/index.js +1 -0
- package/esm/checkbox/styled-components.js +10 -4
- package/esm/combobox/combobox.js +78 -71
- package/esm/combobox/styled-components.js +5 -1
- package/esm/data-table/column-anchor.js +3 -0
- package/esm/data-table/column-datetime.js +12 -5
- package/esm/data-table/column-numerical.js +4 -4
- package/esm/data-table/column-string.js +3 -0
- package/esm/data-table/column.js +5 -1
- package/esm/data-table/data-table.js +6 -3
- package/esm/data-table/filter-menu.js +2 -1
- package/esm/data-table/header-cell.js +42 -34
- package/esm/data-table/locale.js +3 -1
- package/esm/data-table/measure-column-widths.js +5 -4
- package/esm/data-table/stateful-container.js +2 -1
- package/esm/data-table/stateful-data-table.js +4 -4
- package/esm/datepicker/calendar-header.js +1 -0
- package/esm/datepicker/calendar.js +2 -0
- package/esm/datepicker/datepicker.js +3 -1
- package/esm/datepicker/day.js +2 -1
- package/esm/datepicker/index.js +1 -1
- package/esm/datepicker/stateful-calendar.js +7 -3
- package/esm/datepicker/stateful-container.js +2 -0
- package/esm/datepicker/stateful-datepicker.js +9 -4
- package/esm/datepicker/styled-components.js +26 -3
- package/esm/datepicker/utils/date-helpers.js +2 -1
- package/esm/datepicker/utils/index.js +2 -1
- package/esm/divider/styled-components.js +3 -2
- package/esm/dnd-list/stateful-list-container.js +1 -0
- package/esm/dnd-list/styled-components.js +7 -0
- package/esm/drawer/constants.js +1 -0
- package/esm/drawer/drawer.js +2 -5
- package/esm/drawer/styled-components.js +9 -2
- package/esm/file-uploader/styled-components.js +6 -1
- package/esm/flex-grid/flex-grid-item.js +4 -5
- package/esm/flex-grid/flex-grid.js +7 -3
- package/esm/form-control/styled-components.js +6 -1
- package/esm/header-navigation/styled-components.js +4 -1
- package/esm/helper/styled-components.js +3 -1
- package/esm/helpers/overrides.js +9 -5
- package/esm/icon/build-icons.js +0 -2
- package/esm/icon/index.js +1 -1
- package/esm/icon/omit-dollar-prefixed-keys.js +1 -0
- package/esm/icon/styled-components.js +2 -1
- package/esm/input/base-input.js +1 -0
- package/esm/input/masked-input.js +5 -2
- package/esm/input/stateful-container.js +1 -0
- package/esm/input/styled-components.js +18 -7
- package/esm/input/utils.js +2 -0
- package/esm/layer/layer.js +24 -0
- package/esm/layer/layers-manager.js +97 -1
- package/esm/layout-grid/styled-components.js +3 -0
- package/esm/link/index.js +2 -1
- package/esm/link/styled-components.js +2 -1
- package/esm/list/list-heading.js +21 -17
- package/esm/list/list-item.js +2 -1
- package/esm/list/styled-components.js +17 -1
- package/esm/locale/es_AR.js +3 -1
- package/esm/locale/index.js +4 -1
- package/esm/locale/tr_TR.js +3 -1
- package/esm/map-marker/constants.js +12 -2
- package/esm/map-marker/index.js +2 -1
- package/esm/map-marker/location-puck.js +199 -0
- package/esm/map-marker/styled-components.js +82 -2
- package/esm/menu/index.js +1 -1
- package/esm/menu/menu.js +16 -4
- package/esm/menu/option-profile.js +1 -0
- package/esm/menu/stateful-container.js +1 -0
- package/esm/menu/styled-components.js +38 -6
- package/esm/message-card/constants.js +20 -0
- package/esm/message-card/index.js +10 -0
- package/esm/message-card/message-card.js +168 -0
- package/esm/message-card/styled-components.js +116 -0
- package/esm/message-card/types.js +1 -0
- package/esm/message-card/utils.js +26 -0
- package/esm/modal/modal.js +4 -6
- package/esm/modal/styled-components.js +8 -1
- package/esm/pagination/stateful-container.js +1 -0
- package/esm/pagination/stateful-pagination.js +1 -0
- package/esm/pagination/styled-components.js +4 -1
- package/esm/payment-card/styled-components.js +2 -1
- package/esm/phone-input/base-country-picker.js +3 -1
- package/esm/phone-input/country-select-dropdown.js +1 -0
- package/esm/phone-input/styled-components.js +20 -8
- package/esm/pin-code/styled-components.js +4 -1
- package/esm/popover/popover.js +9 -12
- package/esm/popover/styled-components.js +9 -4
- package/esm/progress-bar/progressbar-rounded.js +1 -0
- package/esm/progress-bar/styled-components.js +14 -2
- package/esm/progress-steps/progress-steps.js +2 -1
- package/esm/progress-steps/styled-components.js +28 -19
- package/esm/radio/styled-components.js +10 -3
- package/esm/rating/emoticon-rating.js +2 -1
- package/esm/rating/star-rating.js +2 -1
- package/esm/rating/styled-components.js +5 -1
- package/esm/select/autosize-input.js +2 -3
- package/esm/select/default-props.js +1 -1
- package/esm/select/dropdown.js +2 -1
- package/esm/select/multi-value.js +2 -1
- package/esm/select/select-component.js +10 -10
- package/esm/select/single-select.js +2 -2
- package/esm/select/styled-components.js +33 -6
- package/esm/select/value.js +3 -4
- package/esm/side-navigation/index.js +2 -1
- package/esm/side-navigation/nav-item.js +1 -0
- package/esm/side-navigation/nav.js +1 -1
- package/esm/side-navigation/stateful-container.js +1 -0
- package/esm/side-navigation/styled-components.js +13 -6
- package/esm/skeleton/styled-components.js +3 -1
- package/esm/slider/slider.js +4 -2
- package/esm/slider/styled-components.js +9 -0
- package/esm/snackbar/snackbar-element.js +1 -0
- package/esm/snackbar/styled-components.js +9 -1
- package/esm/spinner/styled-components.js +2 -1
- package/esm/styles/__mocks__/styled.js +8 -5
- package/esm/styles/styled.js +7 -6
- package/esm/table/index.js +2 -1
- package/esm/table/styled-components.js +13 -1
- package/esm/table-grid/styled-components.js +4 -1
- package/esm/table-semantic/styled-components.js +20 -3
- package/esm/tabs/stateful-tabs.js +1 -0
- package/esm/tabs/styled-components.js +5 -1
- package/esm/tabs/tabs.js +4 -2
- package/esm/tabs-motion/styled-components.js +68 -40
- package/esm/tabs-motion/tab.js +1 -0
- package/esm/tabs-motion/tabs.js +87 -58
- package/esm/tag/styled-components.js +5 -1
- package/esm/tag/tag.js +4 -2
- package/esm/textarea/styled-components.js +11 -6
- package/esm/textarea/textarea.js +4 -2
- package/esm/themes/move-theme/typography.js +36 -0
- package/esm/themes/shared/borders.js +8 -3
- package/esm/themes/shared/typography.js +10 -10
- package/esm/timezonepicker/timezone-picker.js +6 -2
- package/esm/timezonepicker/tzdata.js +1 -1
- package/esm/toast/styled-components.js +5 -1
- package/esm/toast/toaster.js +0 -2
- package/esm/tokens/colors.js +24 -0
- package/esm/tooltip/styled-components.js +4 -1
- package/esm/tree-view/index.js +2 -1
- package/esm/tree-view/styled-components.js +7 -1
- package/esm/tree-view/tree-view.js +3 -1
- package/esm/types/globals.d.js +12 -0
- package/esm/utils/deep-merge.js +0 -5
- package/esm/utils/deprecated-component.js +1 -0
- package/esm/utils/focusVisible.js +4 -2
- package/file-uploader/styled-components.js +6 -1
- package/flex-grid/flex-grid-item.d.ts +1 -1
- package/flex-grid/flex-grid-item.js +6 -8
- package/flex-grid/flex-grid.js +7 -3
- package/flex-grid/types.d.ts +1 -1
- package/form-control/styled-components.js +6 -1
- package/form-control/types.d.ts +1 -1
- package/header-navigation/styled-components.js +4 -1
- package/heading/types.d.ts +1 -1
- package/helper/styled-components.js +3 -1
- package/helpers/overrides.js +8 -3
- package/helpers/overrides.js.flow +1 -1
- package/helpers/types.d.ts +1 -1
- package/icon/build-icons.js +0 -2
- package/icon/build-icons.js.flow +0 -1
- package/icon/index.d.ts +1 -1
- package/icon/index.js +8 -1
- package/icon/index.js.flow +1 -1
- package/icon/omit-dollar-prefixed-keys.js +1 -0
- package/icon/styled-components.js +2 -1
- package/icon/types.d.ts +1 -1
- package/input/masked-input.js +5 -2
- package/input/stateful-container.js +1 -0
- package/input/styled-components.js +18 -7
- package/input/styled-components.js.flow +9 -2
- package/input/types.d.ts +16 -14
- package/input/types.js.flow +3 -0
- package/input/utils.js +2 -0
- package/layer/layer.js +24 -0
- package/layer/layer.js.flow +25 -0
- package/layer/layers-manager.d.ts +8 -0
- package/layer/layers-manager.js +97 -1
- package/layer/layers-manager.js.flow +84 -1
- package/layer/types.d.ts +23 -2
- package/layer/types.js.flow +22 -1
- package/layout-grid/styled-components.js +3 -0
- package/layout-grid/types.d.ts +2 -2
- package/link/index.js +2 -1
- package/link/styled-components.js +2 -1
- package/list/list-heading.js +21 -17
- package/list/list-item.js +2 -1
- package/list/styled-components.js +17 -1
- package/list/types.d.ts +2 -2
- package/locale/en_US.d.ts +1 -1
- package/locale/es_AR.d.ts +1 -1
- package/locale/es_AR.js +3 -1
- package/locale/index.js +4 -1
- package/locale/tr_TR.d.ts +1 -1
- package/locale/tr_TR.js +3 -1
- package/map-marker/constants.d.ts +14 -0
- package/map-marker/constants.js +16 -3
- package/map-marker/constants.js.flow +17 -0
- package/map-marker/index.d.ts +2 -1
- package/map-marker/index.js +24 -1
- package/map-marker/index.js.flow +5 -3
- package/map-marker/location-puck.d.ts +4 -0
- package/map-marker/location-puck.js +211 -0
- package/map-marker/location-puck.js.flow +18 -0
- package/map-marker/styled-components.d.ts +17 -1
- package/map-marker/styled-components.js +88 -2
- package/map-marker/styled-components.js.flow +58 -0
- package/map-marker/types.d.ts +33 -5
- package/map-marker/types.js.flow +37 -3
- package/menu/index.d.ts +2 -3
- package/menu/index.js +8 -1
- package/menu/index.js.flow +1 -0
- package/menu/menu.js +15 -3
- package/menu/menu.js.flow +11 -1
- package/menu/option-profile.js +1 -0
- package/menu/stateful-container.js +1 -0
- package/menu/styled-components.d.ts +1 -0
- package/menu/styled-components.js +40 -7
- package/menu/styled-components.js.flow +13 -0
- package/menu/types.d.ts +13 -13
- package/menu/types.js.flow +1 -0
- package/message-card/constants.d.ts +12 -0
- package/message-card/constants.js +25 -0
- package/message-card/index.d.ts +4 -0
- package/message-card/index.js +60 -0
- package/message-card/index.js.flow +72 -0
- package/message-card/message-card.d.ts +4 -0
- package/message-card/message-card.js +184 -0
- package/message-card/package.json +4 -0
- package/message-card/styled-components.d.ts +14 -0
- package/message-card/styled-components.js +124 -0
- package/message-card/types.d.ts +27 -0
- package/message-card/types.js +5 -0
- package/message-card/utils.d.ts +1 -0
- package/message-card/utils.js +36 -0
- package/modal/modal.js +4 -4
- package/modal/modal.js.flow +1 -3
- package/modal/styled-components.js +8 -1
- package/modal/types.d.ts +2 -2
- package/package.json +9 -11
- package/pagination/stateful-container.js +1 -0
- package/pagination/stateful-pagination.js +1 -0
- package/pagination/styled-components.js +4 -1
- package/pagination/types.d.ts +2 -2
- package/payment-card/styled-components.js +2 -1
- package/phone-input/base-country-picker.js +3 -1
- package/phone-input/country-select-dropdown.js +1 -0
- package/phone-input/styled-components.js +21 -9
- package/phone-input/types.d.ts +5 -6
- package/pin-code/styled-components.js +4 -1
- package/pin-code/types.d.ts +2 -2
- package/popover/popover.js +9 -12
- package/popover/popover.js.flow +2 -12
- package/popover/styled-components.js +12 -9
- package/popover/types.d.ts +2 -2
- package/progress-bar/progressbar-rounded.js +1 -0
- package/progress-bar/styled-components.js +14 -2
- package/progress-bar/types.d.ts +2 -2
- package/progress-steps/progress-steps.js +2 -1
- package/progress-steps/styled-components.js +28 -19
- package/radio/styled-components.js +10 -3
- package/radio/types.d.ts +19 -20
- package/rating/emoticon-rating.js +2 -1
- package/rating/star-rating.js +2 -1
- package/rating/styled-components.js +5 -1
- package/select/autosize-input.js +2 -1
- package/select/autosize-input.js.flow +1 -1
- package/select/default-props.js +1 -1
- package/select/dropdown.js +2 -1
- package/select/multi-value.js +1 -0
- package/select/select-component.d.ts +1 -1
- package/select/select-component.js +9 -7
- package/select/select-component.js.flow +1 -1
- package/select/single-select.d.ts +2 -2
- package/select/single-select.js +2 -2
- package/select/styled-components.js +33 -6
- package/select/styled-components.js.flow +25 -5
- package/select/types.d.ts +5 -6
- package/select/value.js +2 -3
- package/side-navigation/nav-item.js +1 -0
- package/side-navigation/nav.js +1 -1
- package/side-navigation/stateful-container.js +1 -0
- package/side-navigation/styled-components.js +13 -6
- package/side-navigation/types.d.ts +1 -1
- package/skeleton/styled-components.js +3 -1
- package/slider/slider.js +4 -2
- package/slider/styled-components.js +9 -0
- package/slider/types.d.ts +1 -1
- package/snackbar/snackbar-element.js +1 -0
- package/snackbar/styled-components.js +9 -1
- package/snackbar/types.d.ts +3 -4
- package/spinner/styled-components.js +2 -1
- package/spinner/types.d.ts +1 -1
- package/styles/__mocks__/styled.js +8 -3
- package/styles/styled.d.ts +1 -1
- package/styles/styled.js +7 -6
- package/table/styled-components.js +13 -1
- package/table/types.d.ts +2 -2
- package/table-grid/styled-components.js +4 -1
- package/table-semantic/styled-components.js +20 -3
- package/table-semantic/types.d.ts +2 -2
- package/tabs/stateful-tabs.js +1 -0
- package/tabs/styled-components.js +5 -1
- package/tabs/tabs.js +4 -2
- package/tabs/types.d.ts +2 -2
- package/tabs-motion/styled-components.d.ts +5 -0
- package/tabs-motion/styled-components.js +71 -41
- package/tabs-motion/styled-components.js.flow +21 -0
- package/tabs-motion/tab.js +1 -0
- package/tabs-motion/tabs.d.ts +1 -1
- package/tabs-motion/tabs.js +87 -57
- package/tabs-motion/tabs.js.flow +69 -38
- package/tabs-motion/types.d.ts +5 -2
- package/tabs-motion/types.js.flow +3 -0
- package/tabs-motion/utils.d.ts +1 -1
- package/tag/styled-components.js +5 -1
- package/tag/tag.js +4 -2
- package/tag/types.d.ts +4 -5
- package/textarea/styled-components.js +11 -6
- package/textarea/textarea.js +4 -2
- package/textarea/types.d.ts +6 -5
- package/textarea/types.js.flow +3 -1
- package/themes/move-theme/typography.d.ts +36 -0
- package/themes/move-theme/typography.js +36 -0
- package/themes/move-theme/typography.js.flow +12 -0
- package/themes/shared/borders.js +8 -3
- package/themes/shared/borders.js.flow +7 -3
- package/themes/shared/typography.js +10 -10
- package/themes/shared/typography.js.flow +10 -10
- package/themes/types.d.ts +3 -0
- package/themes/types.js.flow +3 -0
- package/timezonepicker/timezone-picker.js +6 -2
- package/timezonepicker/types.d.ts +1 -0
- package/timezonepicker/types.js.flow +1 -0
- package/timezonepicker/tzdata.js +1 -1
- package/toast/styled-components.js +5 -1
- package/toast/toaster.js.flow +1 -1
- package/toast/types.d.ts +2 -2
- package/tokens/colors.js +24 -0
- package/tokens/colors.js.flow +27 -0
- package/tokens/types.d.ts +24 -0
- package/tokens/types.js.flow +27 -0
- package/tooltip/styled-components.js +4 -1
- package/tree-view/styled-components.js +7 -1
- package/tree-view/tree-view.js +3 -1
- package/tree-view/types.d.ts +3 -4
- package/types/globals.d.js +14 -1
- package/utils/deep-merge.js +0 -6
- package/utils/deprecated-component.js +1 -0
- package/utils/focusVisible.d.ts +1 -1
- package/utils/focusVisible.js +4 -2
- package/card/images.d.ts +0 -2
- package/card/images.js +0 -17
- package/card/images.js.flow +0 -18
- package/es/card/images.js +0 -8
- package/esm/card/images.js +0 -8
package/combobox/combobox.js
CHANGED
|
@@ -215,6 +215,7 @@ function Combobox(props) {
|
|
|
215
215
|
if (listboxRef.current && event.relatedTarget && // NOTE(chase): Contains method expects a Node type, but relatedTarget is
|
|
216
216
|
// EventTarget which is a super type of Node. Passing an EventTarget seems
|
|
217
217
|
// to work fine, assuming the flow type is too strict.
|
|
218
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
218
219
|
listboxRef.current.contains(event.relatedTarget)) {
|
|
219
220
|
return;
|
|
220
221
|
}
|
|
@@ -307,78 +308,84 @@ function Combobox(props) {
|
|
|
307
308
|
popoverOverrides = _getOverrides12$$over === void 0 ? {} : _getOverrides12$$over,
|
|
308
309
|
restPopoverProps = _objectWithoutProperties(_getOverrides12$, _excluded2);
|
|
309
310
|
|
|
310
|
-
return
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
autoFocus
|
|
317
|
-
|
|
318
|
-
overrides: popoverOverrides,
|
|
319
|
-
placement: _popover.PLACEMENT.bottomLeft,
|
|
320
|
-
onClick: handleInputClick,
|
|
321
|
-
content: /*#__PURE__*/React.createElement(ListBox // TabIndex attribute exists to exclude option clicks from triggering onBlur event actions.
|
|
311
|
+
return (
|
|
312
|
+
/*#__PURE__*/
|
|
313
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
314
|
+
React.createElement(Root, _extends({
|
|
315
|
+
ref: rootRef
|
|
316
|
+
}, 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
|
|
317
|
+
// the ListBox, but we can just disable autoFocus (as ListBox / ListItem should not be focusable) (and input is also not autoFocused).
|
|
318
|
+
// Select Component does the same thing
|
|
322
319
|
, _extends({
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
320
|
+
autoFocus: false,
|
|
321
|
+
isOpen: isOpen,
|
|
322
|
+
overrides: popoverOverrides,
|
|
323
|
+
placement: _popover.PLACEMENT.bottomLeft,
|
|
324
|
+
onClick: handleInputClick,
|
|
325
|
+
content: /*#__PURE__*/React.createElement(ListBox // TabIndex attribute exists to exclude option clicks from triggering onBlur event actions.
|
|
326
|
+
, _extends({
|
|
327
|
+
tabIndex: "-1",
|
|
328
|
+
id: listboxId // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
329
|
+
,
|
|
330
|
+
ref: listboxRef,
|
|
331
|
+
role: "listbox",
|
|
332
|
+
"aria-label": listBoxLabel,
|
|
333
|
+
$width: listboxWidth
|
|
334
|
+
}, listBoxProps), options.map(function (option, index) {
|
|
335
|
+
var isSelected = selectionIndex === index;
|
|
336
|
+
var ReplacementNode = mapOptionToNode;
|
|
337
|
+
return (
|
|
338
|
+
/*#__PURE__*/
|
|
339
|
+
// List items are not focusable, therefore will never trigger a key event from it.
|
|
340
|
+
// Secondly, key events are handled from the input element.
|
|
341
|
+
// eslint-disable-next-line jsx-a11y/click-events-have-key-events
|
|
342
|
+
React.createElement(ListItem, _extends({
|
|
343
|
+
"aria-selected": isSelected,
|
|
344
|
+
id: isSelected ? activeDescendantId : null,
|
|
345
|
+
key: index,
|
|
346
|
+
onClick: function onClick() {
|
|
347
|
+
return handleOptionClick(index);
|
|
348
|
+
} // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
349
|
+
,
|
|
350
|
+
ref: isSelected ? selectedOptionRef : null,
|
|
351
|
+
role: "option",
|
|
352
|
+
$isSelected: isSelected,
|
|
353
|
+
$size: size
|
|
354
|
+
}, listItemProps), ReplacementNode ? /*#__PURE__*/React.createElement(ReplacementNode, {
|
|
355
|
+
isSelected: isSelected,
|
|
356
|
+
option: option
|
|
357
|
+
}) : mapOptionToString(option))
|
|
358
|
+
);
|
|
359
|
+
}))
|
|
360
|
+
}, restPopoverProps), /*#__PURE__*/React.createElement(InputContainer, _extends({
|
|
361
|
+
"aria-expanded": isOpen,
|
|
362
|
+
"aria-haspopup": "listbox",
|
|
363
|
+
"aria-owns": listboxId // a11y linter implements the older 1.0 spec, suppressing to use updated 1.1
|
|
364
|
+
// https://github.com/A11yance/aria-query/issues/43
|
|
365
|
+
// https://github.com/evcohen/eslint-plugin-jsx-a11y/issues/442
|
|
366
|
+
// eslint-disable-next-line jsx-a11y/role-has-required-aria-props
|
|
367
|
+
,
|
|
368
|
+
role: "combobox"
|
|
369
|
+
}, inputContainerProps), /*#__PURE__*/React.createElement(OverriddenInput, _extends({
|
|
370
|
+
inputRef: handleInputRef,
|
|
371
|
+
"aria-activedescendant": isOpen && selectionIndex >= 0 ? activeDescendantId : undefined,
|
|
372
|
+
"aria-autocomplete": "list",
|
|
373
|
+
disabled: disabled,
|
|
374
|
+
error: error,
|
|
375
|
+
name: name,
|
|
376
|
+
id: id,
|
|
377
|
+
onBlur: handleBlur,
|
|
378
|
+
onChange: handleInputChange,
|
|
379
|
+
onFocus: handleFocus,
|
|
380
|
+
onKeyDown: handleKeyDown,
|
|
381
|
+
overrides: inputOverrides,
|
|
382
|
+
positive: positive,
|
|
383
|
+
size: size,
|
|
384
|
+
value: tempValue ? tempValue : value
|
|
385
|
+
}, isOpen ? {
|
|
386
|
+
'aria-controls': listboxId
|
|
387
|
+
} : {}, restInputProps)))))
|
|
388
|
+
);
|
|
382
389
|
}
|
|
383
390
|
|
|
384
391
|
var _default = Combobox;
|
|
@@ -18,9 +18,11 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
18
18
|
var StyledRoot = (0, _styles.styled)('div', {});
|
|
19
19
|
exports.StyledRoot = StyledRoot;
|
|
20
20
|
StyledRoot.displayName = "StyledRoot";
|
|
21
|
+
StyledRoot.displayName = 'StyledRoot';
|
|
21
22
|
var StyledInputContainer = (0, _styles.styled)('div', {});
|
|
22
23
|
exports.StyledInputContainer = StyledInputContainer;
|
|
23
24
|
StyledInputContainer.displayName = "StyledInputContainer";
|
|
25
|
+
StyledInputContainer.displayName = 'StyledInputContainer';
|
|
24
26
|
var StyledListBox = (0, _styles.styled)('ul', function (_ref) {
|
|
25
27
|
var $theme = _ref.$theme,
|
|
26
28
|
$width = _ref.$width;
|
|
@@ -37,6 +39,7 @@ var StyledListBox = (0, _styles.styled)('ul', function (_ref) {
|
|
|
37
39
|
});
|
|
38
40
|
exports.StyledListBox = StyledListBox;
|
|
39
41
|
StyledListBox.displayName = "StyledListBox";
|
|
42
|
+
StyledListBox.displayName = 'StyledListBox';
|
|
40
43
|
|
|
41
44
|
function buildStylesForSize(size, theme) {
|
|
42
45
|
var paddingDir = theme.direction === 'rtl' ? 'paddingRight' : 'paddingLeft';
|
|
@@ -81,4 +84,5 @@ var StyledListItem = (0, _styles.styled)('li', function (_ref2) {
|
|
|
81
84
|
});
|
|
82
85
|
});
|
|
83
86
|
exports.StyledListItem = StyledListItem;
|
|
84
|
-
StyledListItem.displayName = "StyledListItem";
|
|
87
|
+
StyledListItem.displayName = "StyledListItem";
|
|
88
|
+
StyledListItem.displayName = 'StyledListItem';
|
package/combobox/types.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
1
|
+
import type * as React from 'react';
|
|
2
2
|
import type { Override } from '../helpers/overrides';
|
|
3
|
-
import { SIZE } from '../input';
|
|
4
|
-
import type { ChangeEvent } from 'react';
|
|
3
|
+
import type { SIZE } from '../input';
|
|
5
4
|
export declare type ComboboxOverrides = {
|
|
6
5
|
Root?: Override;
|
|
7
6
|
InputContainer?: Override;
|
|
@@ -23,9 +22,9 @@ export declare type ComboboxProps<Option = unknown> = {
|
|
|
23
22
|
id?: string;
|
|
24
23
|
name?: string;
|
|
25
24
|
inputRef?: React.Ref<HTMLElement>;
|
|
26
|
-
onBlur?: (a: ChangeEvent<HTMLInputElement>) => unknown;
|
|
25
|
+
onBlur?: (a: React.ChangeEvent<HTMLInputElement>) => unknown;
|
|
27
26
|
onChange: (b: string, a: Option | null) => unknown;
|
|
28
|
-
onFocus?: (a: ChangeEvent<HTMLInputElement>) => unknown;
|
|
27
|
+
onFocus?: (a: React.ChangeEvent<HTMLInputElement>) => unknown;
|
|
29
28
|
onSubmit?: (a: {
|
|
30
29
|
closeListbox: () => void;
|
|
31
30
|
value: string;
|
|
@@ -37,6 +37,7 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
37
37
|
|
|
38
38
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
39
39
|
|
|
40
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
40
41
|
function AnchorFilter(props) {
|
|
41
42
|
return /*#__PURE__*/React.createElement("div", null, "not implemented for anchor column");
|
|
42
43
|
}
|
|
@@ -62,7 +63,9 @@ function AnchorCell(props) {
|
|
|
62
63
|
function AnchorColumn(options) {
|
|
63
64
|
return (0, _column.default)({
|
|
64
65
|
kind: _constants.COLUMNS.ANCHOR,
|
|
66
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
65
67
|
buildFilter: function buildFilter(params) {
|
|
68
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
66
69
|
return function (data) {
|
|
67
70
|
return true;
|
|
68
71
|
};
|
|
@@ -264,7 +264,8 @@ function DatetimeFilter(props) {
|
|
|
264
264
|
var _React$useState7 = React.useState([initialState.categoricalOperator]),
|
|
265
265
|
_React$useState8 = _slicedToArray(_React$useState7, 2),
|
|
266
266
|
categoricalOperator = _React$useState8[0],
|
|
267
|
-
setCategoricalOperator = _React$useState8[1];
|
|
267
|
+
setCategoricalOperator = _React$useState8[1]; // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
268
|
+
|
|
268
269
|
|
|
269
270
|
var _React$useState9 = React.useState(initialState.rangeDates.length ? initialState.rangeDates : [new Date(datesSorted[0]), new Date(datesSorted[datesSorted.length - 1])]),
|
|
270
271
|
_React$useState10 = _slicedToArray(_React$useState9, 2),
|
|
@@ -305,6 +306,7 @@ function DatetimeFilter(props) {
|
|
|
305
306
|
},
|
|
306
307
|
onApply: function onApply() {
|
|
307
308
|
if (isRange) {
|
|
309
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
308
310
|
var op = rangeOperator[0].id;
|
|
309
311
|
var description = '';
|
|
310
312
|
|
|
@@ -336,6 +338,7 @@ function DatetimeFilter(props) {
|
|
|
336
338
|
}
|
|
337
339
|
|
|
338
340
|
if (isCategorical) {
|
|
341
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
339
342
|
var _op = categoricalOperator[0].id;
|
|
340
343
|
var selection = [];
|
|
341
344
|
var operatorLocaleLabelKey = '';
|
|
@@ -428,7 +431,8 @@ function DatetimeFilter(props) {
|
|
|
428
431
|
value: rangeOperator,
|
|
429
432
|
onChange: function onChange(params) {
|
|
430
433
|
return setRangeOperator(params.value);
|
|
431
|
-
}
|
|
434
|
+
} // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
435
|
+
,
|
|
432
436
|
mountNode: mountNode.current,
|
|
433
437
|
options: RANGE_OPERATIONS.map(function (op) {
|
|
434
438
|
return {
|
|
@@ -442,7 +446,8 @@ function DatetimeFilter(props) {
|
|
|
442
446
|
className: css({
|
|
443
447
|
paddingTop: theme.sizing.scale600
|
|
444
448
|
})
|
|
445
|
-
}, (rangeOperator[0].id === _constants.DATETIME_OPERATIONS.RANGE_DATETIME || rangeOperator[0].id === _constants.DATETIME_OPERATIONS.RANGE_DATE) && /*#__PURE__*/React.createElement(_datepicker.Datepicker
|
|
449
|
+
}, (rangeOperator[0].id === _constants.DATETIME_OPERATIONS.RANGE_DATETIME || rangeOperator[0].id === _constants.DATETIME_OPERATIONS.RANGE_DATE) && /*#__PURE__*/React.createElement(_datepicker.Datepicker // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
450
|
+
, {
|
|
446
451
|
mountNode: mountNode.current,
|
|
447
452
|
value: rangeDates,
|
|
448
453
|
onChange: function onChange(_ref2) {
|
|
@@ -513,7 +518,8 @@ function DatetimeFilter(props) {
|
|
|
513
518
|
label: locale.datatable[op.localeLabelKey],
|
|
514
519
|
id: op.id
|
|
515
520
|
};
|
|
516
|
-
})
|
|
521
|
+
}) // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
522
|
+
,
|
|
517
523
|
mountNode: mountNode.current,
|
|
518
524
|
size: "compact",
|
|
519
525
|
clearable: false
|
|
@@ -103,6 +103,7 @@ function validateInput(input) {
|
|
|
103
103
|
var bisect = (0, _d2.bisector)(function (d) {
|
|
104
104
|
return d.x0;
|
|
105
105
|
});
|
|
106
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
106
107
|
var Histogram = /*#__PURE__*/React.memo(function Histogram(_ref) {
|
|
107
108
|
var data = _ref.data,
|
|
108
109
|
lower = _ref.lower,
|
|
@@ -411,6 +412,7 @@ function NumericalFilter(props) {
|
|
|
411
412
|
$thumbIndex = _ref4.$thumbIndex;
|
|
412
413
|
return /*#__PURE__*/React.createElement(React.Fragment, null, $value[$thumbIndex]);
|
|
413
414
|
},
|
|
415
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
414
416
|
TickBar: function TickBar(_ref5) {
|
|
415
417
|
var $min = _ref5.$min,
|
|
416
418
|
$max = _ref5.$max;
|
|
@@ -430,9 +432,7 @@ function NumericalFilter(props) {
|
|
|
430
432
|
}
|
|
431
433
|
},
|
|
432
434
|
InnerTrack: {
|
|
433
|
-
style: function style(
|
|
434
|
-
var $theme = _ref6.$theme;
|
|
435
|
-
|
|
435
|
+
style: function style() {
|
|
436
436
|
if (!isRange) {
|
|
437
437
|
return {
|
|
438
438
|
// For range selection we use the color as is, but when selecting the single value,
|
|
@@ -542,7 +542,7 @@ var defaultOptions = {
|
|
|
542
542
|
sortable: true,
|
|
543
543
|
filterable: true,
|
|
544
544
|
format: _constants.NUMERICAL_FORMATS.DEFAULT,
|
|
545
|
-
highlight: function (
|
|
545
|
+
highlight: function () {
|
|
546
546
|
return false;
|
|
547
547
|
},
|
|
548
548
|
precision: 0
|
|
@@ -37,6 +37,7 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
37
37
|
|
|
38
38
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
39
39
|
|
|
40
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
40
41
|
function StringFilter(props) {
|
|
41
42
|
return /*#__PURE__*/React.createElement("div", null, "not implemented for string column");
|
|
42
43
|
}
|
|
@@ -63,7 +64,9 @@ function StringColumn(options) {
|
|
|
63
64
|
return (0, _column.default)({
|
|
64
65
|
kind: _constants.COLUMNS.STRING,
|
|
65
66
|
cellBlockAlign: options.cellBlockAlign,
|
|
67
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
66
68
|
buildFilter: function buildFilter(params) {
|
|
69
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
67
70
|
return function (data) {
|
|
68
71
|
return true;
|
|
69
72
|
};
|
package/data-table/column.js
CHANGED
|
@@ -11,6 +11,8 @@ var React = _interopRequireWildcard(require("react"));
|
|
|
11
11
|
|
|
12
12
|
var _checkbox = require("../checkbox");
|
|
13
13
|
|
|
14
|
+
var _locale = require("../locale");
|
|
15
|
+
|
|
14
16
|
var _styles = require("../styles");
|
|
15
17
|
|
|
16
18
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
@@ -50,8 +52,10 @@ function Column(options) {
|
|
|
50
52
|
maxWidth: options.maxWidth,
|
|
51
53
|
minWidth: options.minWidth,
|
|
52
54
|
// todo(flow->ts) add proper type annotation
|
|
53
|
-
// eslint-disable-next-line react/display-name
|
|
55
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any,react/display-name
|
|
54
56
|
renderCell: /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
57
|
+
var locale = React.useContext(_locale.LocaleContext);
|
|
58
|
+
|
|
55
59
|
var _useStyletron = (0, _styles.useStyletron)(),
|
|
56
60
|
_useStyletron2 = _slicedToArray(_useStyletron, 2),
|
|
57
61
|
css = _useStyletron2[0],
|
|
@@ -90,6 +94,7 @@ function Column(options) {
|
|
|
90
94
|
paddingRight: theme.sizing.scale300
|
|
91
95
|
})
|
|
92
96
|
}, /*#__PURE__*/React.createElement(_checkbox.Checkbox, {
|
|
97
|
+
"aria-label": locale.datatable.selectRow,
|
|
93
98
|
onChange: props.onSelect,
|
|
94
99
|
checked: props.isSelected,
|
|
95
100
|
overrides: {
|
package/data-table/data-table.js
CHANGED
|
@@ -197,7 +197,8 @@ function Header(props) {
|
|
|
197
197
|
var _React$useState3 = React.useState(0),
|
|
198
198
|
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
199
199
|
endResizePos = _React$useState4[0],
|
|
200
|
-
setEndResizePos = _React$useState4[1];
|
|
200
|
+
setEndResizePos = _React$useState4[1]; // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
201
|
+
|
|
201
202
|
|
|
202
203
|
var headerCellRef = React.useRef(null);
|
|
203
204
|
var RULER_OFFSET = 2;
|
|
@@ -241,7 +242,8 @@ function Header(props) {
|
|
|
241
242
|
}
|
|
242
243
|
}
|
|
243
244
|
}
|
|
244
|
-
}
|
|
245
|
+
} // eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
246
|
+
|
|
245
247
|
|
|
246
248
|
function handleMouseUp(event) {
|
|
247
249
|
props.onResize(props.index, endResizePos - startResizePos);
|
|
@@ -958,7 +960,8 @@ function DataTable(_ref2) {
|
|
|
958
960
|
tableHeight: height,
|
|
959
961
|
widths: normalizedWidths
|
|
960
962
|
}
|
|
961
|
-
}, /*#__PURE__*/React.createElement(_reactWindow.VariableSizeGrid
|
|
963
|
+
}, /*#__PURE__*/React.createElement(_reactWindow.VariableSizeGrid // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
964
|
+
, {
|
|
962
965
|
ref: setGridRef,
|
|
963
966
|
overscanRowCount: 10,
|
|
964
967
|
overscanColumnCount: 5,
|
|
@@ -98,7 +98,8 @@ function Options(props) {
|
|
|
98
98
|
if ((0, _focusVisible.isFocusVisible)(event)) {
|
|
99
99
|
setFocusVisible(true);
|
|
100
100
|
}
|
|
101
|
-
};
|
|
101
|
+
}; // eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
102
|
+
|
|
102
103
|
|
|
103
104
|
var handleBlur = function handleBlur(event) {
|
|
104
105
|
if (focusVisible !== false) {
|
|
@@ -11,6 +11,8 @@ var React = _interopRequireWildcard(require("react"));
|
|
|
11
11
|
|
|
12
12
|
var _checkbox = require("../checkbox");
|
|
13
13
|
|
|
14
|
+
var _locale = require("../locale");
|
|
15
|
+
|
|
14
16
|
var _styles = require("../styles");
|
|
15
17
|
|
|
16
18
|
var _chevronDown = _interopRequireDefault(require("../icon/chevron-down"));
|
|
@@ -46,6 +48,8 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
46
48
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
47
49
|
|
|
48
50
|
var HeaderCell = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
51
|
+
var locale = React.useContext(_locale.LocaleContext);
|
|
52
|
+
|
|
49
53
|
var _useStyletron = (0, _styles.useStyletron)(),
|
|
50
54
|
_useStyletron2 = _slicedToArray(_useStyletron, 2),
|
|
51
55
|
css = _useStyletron2[0],
|
|
@@ -64,7 +68,7 @@ var HeaderCell = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
64
68
|
}
|
|
65
69
|
};
|
|
66
70
|
|
|
67
|
-
var handleBlur = function handleBlur(
|
|
71
|
+
var handleBlur = function handleBlur() {
|
|
68
72
|
if (focusVisible !== false) {
|
|
69
73
|
setFocusVisible(false);
|
|
70
74
|
}
|
|
@@ -73,59 +77,64 @@ var HeaderCell = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
73
77
|
var backgroundColor = props.isHovered ? theme.colors.backgroundSecondary : theme.colors.backgroundPrimary;
|
|
74
78
|
return /*#__PURE__*/React.createElement("div", {
|
|
75
79
|
ref: ref,
|
|
76
|
-
role: "button",
|
|
77
|
-
tabIndex: 0,
|
|
78
80
|
className: css(_objectSpread(_objectSpread({}, theme.typography.font350), {}, {
|
|
79
81
|
alignItems: 'center',
|
|
80
82
|
backgroundColor: backgroundColor,
|
|
81
|
-
boxSizing: 'border-box',
|
|
82
83
|
color: theme.colors.contentPrimary,
|
|
83
|
-
cursor: props.sortable ? 'pointer' : null,
|
|
84
84
|
display: props.isMeasured ? 'inline-flex' : 'flex',
|
|
85
85
|
flexGrow: 1,
|
|
86
86
|
height: '100%',
|
|
87
|
-
paddingLeft: theme.sizing.scale500
|
|
88
|
-
|
|
89
|
-
flexWrap: 'nowrap',
|
|
90
|
-
whiteSpace: 'nowrap',
|
|
91
|
-
outline: focusVisible ? "3px solid ".concat(theme.colors.accent) : 'none',
|
|
92
|
-
outlineOffset: '-3px'
|
|
93
|
-
})),
|
|
94
|
-
onMouseEnter: props.onMouseEnter,
|
|
95
|
-
onMouseLeave: props.onMouseLeave,
|
|
96
|
-
onKeyUp: function onKeyUp(event) {
|
|
97
|
-
if (event.key === 'Enter') {
|
|
98
|
-
props.onSort(props.index);
|
|
99
|
-
}
|
|
100
|
-
},
|
|
101
|
-
onClick: function onClick(event) {
|
|
102
|
-
// Avoid column sort if select-all checkbox click.
|
|
103
|
-
if (checkboxRef.current && checkboxRef.current.contains(event.target)) {
|
|
104
|
-
return;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
if (props.sortable) {
|
|
108
|
-
props.onSort(props.index);
|
|
109
|
-
}
|
|
110
|
-
},
|
|
111
|
-
onFocus: handleFocus,
|
|
112
|
-
onBlur: handleBlur
|
|
87
|
+
paddingLeft: theme.sizing.scale500
|
|
88
|
+
}))
|
|
113
89
|
}, props.isSelectable && /*#__PURE__*/React.createElement("span", {
|
|
114
90
|
className: css({
|
|
115
91
|
paddingRight: theme.sizing.scale300
|
|
116
92
|
}),
|
|
117
93
|
ref: checkboxRef
|
|
118
94
|
}, /*#__PURE__*/React.createElement(_checkbox.Checkbox, {
|
|
119
|
-
onChange: function onChange(
|
|
95
|
+
onChange: function onChange() {
|
|
120
96
|
if (props.isSelectedAll || props.isSelectedIndeterminate) {
|
|
121
97
|
props.onSelectNone();
|
|
122
98
|
} else {
|
|
123
99
|
props.onSelectAll();
|
|
124
100
|
}
|
|
125
101
|
},
|
|
102
|
+
"aria-label": locale.datatable.selectAllRows,
|
|
126
103
|
checked: props.isSelectedAll || props.isSelectedIndeterminate,
|
|
127
104
|
isIndeterminate: props.isSelectedIndeterminate
|
|
128
|
-
})),
|
|
105
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
106
|
+
className: css({
|
|
107
|
+
alignItems: 'center',
|
|
108
|
+
backgroundColor: 'transparent',
|
|
109
|
+
border: 'none',
|
|
110
|
+
boxSizing: 'border-box',
|
|
111
|
+
cursor: props.sortable ? 'pointer' : null,
|
|
112
|
+
display: 'flex',
|
|
113
|
+
flexGrow: 1,
|
|
114
|
+
height: '100%',
|
|
115
|
+
outline: focusVisible ? "3px solid ".concat(theme.colors.accent) : 'none',
|
|
116
|
+
outlineOffset: '-3px',
|
|
117
|
+
// paddingLeft: theme.sizing.scale500,
|
|
118
|
+
paddingRight: theme.sizing.scale500,
|
|
119
|
+
whiteSpace: 'nowrap'
|
|
120
|
+
}),
|
|
121
|
+
onMouseEnter: props.onMouseEnter,
|
|
122
|
+
onMouseLeave: props.onMouseLeave,
|
|
123
|
+
onKeyUp: function onKeyUp(event) {
|
|
124
|
+
if (event.key === 'Enter') {
|
|
125
|
+
props.onSort(props.index);
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
onClick: function onClick() {
|
|
129
|
+
if (props.sortable) {
|
|
130
|
+
props.onSort(props.index);
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
onFocus: handleFocus,
|
|
134
|
+
onBlur: handleBlur,
|
|
135
|
+
role: "button",
|
|
136
|
+
tabIndex: 0
|
|
137
|
+
}, props.title, /*#__PURE__*/React.createElement("div", {
|
|
129
138
|
className: css({
|
|
130
139
|
position: 'relative',
|
|
131
140
|
width: '100%',
|
|
@@ -144,7 +153,7 @@ var HeaderCell = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
144
153
|
color: props.sortDirection ? theme.colors.contentPrimary : theme.colors.contentSecondary
|
|
145
154
|
}), (props.sortDirection === _constants.SORT_DIRECTIONS.ASC || !props.sortDirection) && /*#__PURE__*/React.createElement(_chevronUp.default, {
|
|
146
155
|
color: props.sortDirection ? theme.colors.contentPrimary : theme.colors.contentSecondary
|
|
147
|
-
}))));
|
|
156
|
+
})))));
|
|
148
157
|
});
|
|
149
158
|
HeaderCell.displayName = 'HeaderCell';
|
|
150
159
|
var _default = HeaderCell;
|
package/data-table/locale.d.ts
CHANGED
|
@@ -32,6 +32,8 @@ export declare type DataTableLocale = {
|
|
|
32
32
|
booleanFilterFalse: string;
|
|
33
33
|
booleanColumnTrueShort: string;
|
|
34
34
|
booleanColumnFalseShort: string;
|
|
35
|
+
selectRow: string;
|
|
36
|
+
selectAllRows: string;
|
|
35
37
|
};
|
|
36
38
|
declare const locale: {
|
|
37
39
|
emptyState: string;
|
|
@@ -67,5 +69,7 @@ declare const locale: {
|
|
|
67
69
|
booleanFilterFalse: string;
|
|
68
70
|
booleanColumnTrueShort: string;
|
|
69
71
|
booleanColumnFalseShort: string;
|
|
72
|
+
selectRow: string;
|
|
73
|
+
selectAllRows: string;
|
|
70
74
|
};
|
|
71
75
|
export default locale;
|
package/data-table/locale.js
CHANGED
|
@@ -44,7 +44,9 @@ var locale = {
|
|
|
44
44
|
booleanFilterTrue: 'true',
|
|
45
45
|
booleanFilterFalse: 'false',
|
|
46
46
|
booleanColumnTrueShort: 'T',
|
|
47
|
-
booleanColumnFalseShort: 'F'
|
|
47
|
+
booleanColumnFalseShort: 'F',
|
|
48
|
+
selectRow: 'Select row',
|
|
49
|
+
selectAllRows: 'Select all rows'
|
|
48
50
|
};
|
|
49
51
|
var _default = locale;
|
|
50
52
|
exports.default = _default;
|
|
@@ -40,6 +40,8 @@ export type DataTableLocaleT = {|
|
|
|
40
40
|
booleanFilterFalse: string,
|
|
41
41
|
booleanColumnTrueShort: string,
|
|
42
42
|
booleanColumnFalseShort: string,
|
|
43
|
+
selectRow: string,
|
|
44
|
+
selectAllRows: string,
|
|
43
45
|
|};
|
|
44
46
|
|
|
45
47
|
const locale = {
|
|
@@ -77,6 +79,9 @@ const locale = {
|
|
|
77
79
|
booleanFilterFalse: 'false',
|
|
78
80
|
booleanColumnTrueShort: 'T',
|
|
79
81
|
booleanColumnFalseShort: 'F',
|
|
82
|
+
selectRow: 'Select row',
|
|
83
|
+
selectAllRows: 'Select all rows',
|
|
84
|
+
|
|
80
85
|
};
|
|
81
86
|
|
|
82
87
|
export default locale;
|
|
@@ -51,7 +51,7 @@ function MeasureColumn(_ref) {
|
|
|
51
51
|
onLayout(columnIndex, ref.current.getBoundingClientRect());
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
-
}, []);
|
|
54
|
+
}, [onLayout]);
|
|
55
55
|
return /*#__PURE__*/React.createElement("div", {
|
|
56
56
|
ref: ref,
|
|
57
57
|
className: css({
|
|
@@ -68,7 +68,8 @@ function MeasureColumn(_ref) {
|
|
|
68
68
|
onMouseEnter: function onMouseEnter() {},
|
|
69
69
|
onMouseLeave: function onMouseLeave() {},
|
|
70
70
|
onSelectAll: function onSelectAll() {},
|
|
71
|
-
onSelectNone: function onSelectNone() {}
|
|
71
|
+
onSelectNone: function onSelectNone() {} // eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
72
|
+
,
|
|
72
73
|
onSort: function onSort(i) {},
|
|
73
74
|
sortable: column.sortable,
|
|
74
75
|
sortDirection: null,
|
|
@@ -132,7 +133,7 @@ function MeasureColumnWidths(_ref2) {
|
|
|
132
133
|
|
|
133
134
|
var widthMap = React.useMemo(function () {
|
|
134
135
|
return new Map();
|
|
135
|
-
}, []);
|
|
136
|
+
}, [rows]);
|
|
136
137
|
var sampleSize = rows.length < MAX_SAMPLE_SIZE ? rows.length : MAX_SAMPLE_SIZE;
|
|
137
138
|
var finishedMeasurementCount = (sampleSize + 1) * columns.length;
|
|
138
139
|
var sampleIndexes = React.useMemo(function () {
|
|
@@ -151,7 +152,7 @@ function MeasureColumnWidths(_ref2) {
|
|
|
151
152
|
widthMap.size === Math.floor(columns.length / 4)) {
|
|
152
153
|
onWidthsChange(Array.from(widthMap.values()));
|
|
153
154
|
}
|
|
154
|
-
}, [columns, finishedMeasurementCount, onWidthsChange]);
|
|
155
|
+
}, [columns, rows, finishedMeasurementCount, onWidthsChange]);
|
|
155
156
|
var hiddenStyle = css({
|
|
156
157
|
position: 'absolute',
|
|
157
158
|
overflow: 'hidden',
|
|
@@ -182,7 +182,8 @@ var StatefulContainer = function StatefulContainer(props) {
|
|
|
182
182
|
selectedRowIds: selectedRowIds,
|
|
183
183
|
sortIndex: sortIndex,
|
|
184
184
|
sortDirection: sortDirection,
|
|
185
|
-
textQuery: textQuery
|
|
185
|
+
textQuery: textQuery // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
186
|
+
|
|
186
187
|
});
|
|
187
188
|
};
|
|
188
189
|
|
|
@@ -277,12 +277,12 @@ function StatefulDataTable(props) {
|
|
|
277
277
|
title: title
|
|
278
278
|
});
|
|
279
279
|
}))), Boolean(selectedRowIds.size) && props.batchActions && /*#__PURE__*/React.createElement("div", {
|
|
280
|
-
|
|
280
|
+
className: css({
|
|
281
281
|
display: 'flex',
|
|
282
282
|
alignItems: 'center',
|
|
283
|
-
paddingTop: theme.sizing.
|
|
284
|
-
paddingBottom: theme.sizing.
|
|
285
|
-
}
|
|
283
|
+
paddingTop: theme.sizing.scale300,
|
|
284
|
+
paddingBottom: theme.sizing.scale300
|
|
285
|
+
})
|
|
286
286
|
}, props.batchActions.map(function (action) {
|
|
287
287
|
function onClick(event) {
|
|
288
288
|
action.onClick({
|