baseui 0.0.0-next-155c82a → 0.0.0-next-2aecb6f
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/a11y/a11y.js +1 -1
- package/a11y/a11y.js.flow +1 -1
- package/accordion/accordion.js +3 -2
- package/accordion/accordion.js.flow +4 -3
- package/accordion/panel.js +1 -1
- package/accordion/panel.js.flow +1 -1
- package/accordion/types.js.flow +2 -1
- package/app-nav-bar/mobile-menu.js +6 -12
- package/app-nav-bar/mobile-menu.js.flow +0 -6
- package/app-nav-bar/types.js.flow +3 -3
- package/app-nav-bar/user-menu.js +4 -8
- package/app-nav-bar/user-menu.js.flow +0 -4
- package/aspect-ratio-box/aspect-ratio-box-body.js.flow +1 -1
- package/aspect-ratio-box/aspect-ratio-box.js +2 -2
- package/aspect-ratio-box/aspect-ratio-box.js.flow +4 -3
- package/block/block.js +1 -1
- package/block/block.js.flow +1 -1
- package/block/styled-components.js.flow +3 -2
- package/block/types.js.flow +1 -0
- package/breadcrumbs/breadcrumbs.js +2 -5
- package/breadcrumbs/breadcrumbs.js.flow +3 -6
- package/button/button.js +2 -1
- package/button/button.js.flow +11 -10
- package/button/styled-components.js +1 -3
- package/button/styled-components.js.flow +12 -3
- package/button/types.js.flow +4 -2
- package/button/utils.js.flow +2 -2
- package/button-group/button-group.js.flow +1 -1
- package/button-group/stateful-button-group.js +5 -1
- package/button-group/stateful-button-group.js.flow +1 -0
- package/button-group/types.js.flow +0 -1
- package/checkbox/stateful-checkbox-container.js.flow +3 -3
- package/checkbox/stateful-checkbox.js.flow +5 -2
- package/checkbox/types.js.flow +22 -4
- package/combobox/combobox.js +4 -4
- package/combobox/combobox.js.flow +6 -10
- package/combobox/styled-components.js.flow +9 -2
- package/combobox/types.js.flow +3 -1
- package/data-table/column-custom.js +1 -0
- package/data-table/column-custom.js.flow +1 -0
- package/data-table/column-datetime.js +6 -6
- package/data-table/column-datetime.js.flow +7 -7
- package/data-table/data-table.js +4 -4
- package/data-table/data-table.js.flow +4 -4
- package/data-table/filter-menu.js.flow +2 -2
- package/data-table/types.js.flow +3 -3
- package/datepicker/calendar-header.js +4 -7
- package/datepicker/calendar-header.js.flow +8 -10
- package/datepicker/calendar.js +2 -1
- package/datepicker/calendar.js.flow +3 -3
- package/datepicker/datepicker.js +1 -1
- package/datepicker/datepicker.js.flow +1 -0
- package/datepicker/day.js.flow +1 -1
- package/datepicker/styled-components.js +2 -2
- package/datepicker/styled-components.js.flow +2 -2
- package/datepicker/types.js.flow +3 -3
- package/datepicker/utils/date-helpers.js.flow +9 -9
- package/datepicker/utils/index.js +1 -1
- package/datepicker/utils/index.js.flow +1 -1
- package/drawer/constants.js.flow +3 -2
- package/drawer/drawer.js +1 -1
- package/drawer/drawer.js.flow +1 -1
- package/drawer/types.js.flow +1 -1
- package/es/a11y/a11y.js +1 -1
- package/es/accordion/accordion.js +2 -1
- package/es/accordion/panel.js +1 -1
- package/es/app-nav-bar/mobile-menu.js +6 -12
- package/es/app-nav-bar/user-menu.js +4 -8
- package/es/aspect-ratio-box/aspect-ratio-box.js +2 -2
- package/es/block/block.js +1 -1
- package/es/breadcrumbs/breadcrumbs.js +3 -6
- package/es/button/button.js +2 -1
- package/es/button/styled-components.js +2 -3
- package/es/button-group/stateful-button-group.js +4 -1
- package/es/checkbox/stateful-checkbox-container.js +0 -3
- package/es/combobox/combobox.js +6 -8
- package/es/data-table/column-custom.js +1 -0
- package/es/data-table/column-datetime.js +6 -6
- package/es/data-table/data-table.js +4 -4
- package/es/datepicker/calendar-header.js +7 -10
- package/es/datepicker/calendar.js +3 -3
- package/es/datepicker/datepicker.js +1 -1
- package/es/datepicker/styled-components.js +2 -2
- package/es/datepicker/utils/index.js +1 -1
- package/es/drawer/drawer.js +1 -1
- package/es/flex-grid/flex-grid-item.js +6 -4
- package/es/flex-grid/flex-grid.js +7 -4
- package/es/form-control/form-control.js +4 -4
- package/es/heading/heading.js +1 -1
- package/es/helpers/overrides.js +13 -9
- package/es/icon/alert.js +18 -14
- package/es/icon/arrow-down.js +18 -14
- package/es/icon/arrow-left.js +18 -14
- package/es/icon/arrow-right.js +18 -14
- package/es/icon/arrow-up.js +18 -14
- package/es/icon/blank.js +14 -10
- package/es/icon/check-indeterminate.js +18 -14
- package/es/icon/check.js +18 -14
- package/es/icon/chevron-down.js +19 -15
- package/es/icon/chevron-left.js +18 -14
- package/es/icon/chevron-right.js +18 -14
- package/es/icon/chevron-up.js +19 -15
- package/es/icon/delete-alt.js +18 -14
- package/es/icon/delete.js +18 -14
- package/es/icon/filter.js +32 -28
- package/es/icon/grab.js +18 -14
- package/es/icon/hide.js +16 -12
- package/es/icon/menu.js +32 -28
- package/es/icon/omit-dollar-prefixed-keys.js +1 -1
- package/es/icon/overflow.js +26 -22
- package/es/icon/plus.js +18 -14
- package/es/icon/search.js +18 -14
- package/es/icon/show.js +16 -12
- package/es/icon/spinner.js +23 -19
- package/es/icon/triangle-down.js +16 -12
- package/es/icon/triangle-left.js +16 -12
- package/es/icon/triangle-right.js +16 -12
- package/es/icon/triangle-up.js +16 -12
- package/es/icon/upload.js +18 -14
- package/es/input/stateful-container.js +0 -1
- package/es/input/styled-components.js +3 -2
- package/es/layer/layer.js +4 -3
- package/es/list/list-heading.js +3 -3
- package/es/list/list-item.js +1 -1
- package/es/map-marker/fixed-marker.js +11 -5
- package/es/menu/maybe-child-menu.js +1 -2
- package/es/menu/option-profile.js +2 -0
- package/es/menu/stateful-container.js +3 -4
- package/es/menu/stateful-menu.js +4 -1
- package/es/menu/types.js +1 -1
- package/es/modal/modal-button.js +4 -1
- package/es/modal/modal.js +1 -3
- package/es/pagination/stateful-container.js +1 -0
- package/es/pagination/stateful-pagination.js +1 -0
- package/es/payment-card/payment-card.js +4 -1
- package/es/payment-card/styled-components.js +0 -1
- package/es/phone-input/base-country-picker.js +5 -8
- package/es/phone-input/country-picker.js +5 -8
- package/es/phone-input/country-select-dropdown.js +5 -4
- package/es/phone-input/country-select.js +5 -8
- package/es/phone-input/flag.js +2 -1
- package/es/phone-input/phone-input-lite.js +1 -2
- package/es/phone-input/phone-input-next.js +1 -2
- package/es/pin-code/pin-code.js +1 -2
- package/es/popover/popover.js +6 -7
- package/es/progress-bar/progressbar-rounded.js +25 -22
- package/es/progress-bar/progressbar.js +4 -1
- package/es/radio/radiogroup.js +1 -1
- package/es/rating/emoticon-rating.js +1 -1
- package/es/rating/star-rating.js +1 -1
- package/es/select/autosize-input.js +1 -2
- package/es/select/dropdown.js +2 -4
- package/es/select/multi-value.js +1 -1
- package/es/select/select-component.js +5 -4
- package/es/select/value.js +1 -1
- package/es/slider/slider.js +2 -2
- package/es/snackbar/snackbar-element.js +3 -3
- package/es/snackbar/styled-components.js +1 -1
- package/es/spinner/spinner.js +22 -18
- package/es/spinner/styled-components.js +3 -2
- package/es/styles/__mocks__/styled.js +1 -1
- package/es/styles/styled.js +7 -7
- package/es/table-semantic/styled-components.js +2 -1
- package/es/tabs/tabs.js +2 -2
- package/es/tag/styled-components.js +4 -8
- package/es/tag/tag.js +1 -1
- package/es/textarea/styled-components.js +9 -7
- package/es/textarea/textarea.js +2 -1
- package/es/timepicker/timepicker.js +2 -4
- package/es/timezonepicker/timezone-picker.js +2 -5
- package/es/toast/styled-components.js +30 -28
- package/es/toast/toaster.js +5 -7
- package/es/toast/types.js +0 -2
- package/es/tree-view/tree-label-interactable.js +8 -4
- package/es/tree-view/tree-label.js +5 -1
- package/es/tree-view/tree-node.js +1 -1
- package/es/tree-view/tree-view.js +6 -6
- package/es/typography/index.js +144 -36
- package/es/utils/deep-merge.js +2 -2
- package/es/utils/deprecated-component.js +5 -3
- package/esm/a11y/a11y.js +1 -1
- package/esm/accordion/accordion.js +3 -2
- package/esm/accordion/panel.js +1 -1
- package/esm/app-nav-bar/mobile-menu.js +6 -12
- package/esm/app-nav-bar/user-menu.js +4 -8
- package/esm/aspect-ratio-box/aspect-ratio-box.js +2 -2
- package/esm/block/block.js +1 -1
- package/esm/breadcrumbs/breadcrumbs.js +3 -6
- package/esm/button/button.js +2 -1
- package/esm/button/styled-components.js +1 -3
- package/esm/button-group/stateful-button-group.js +5 -1
- package/esm/combobox/combobox.js +4 -4
- package/esm/data-table/column-custom.js +1 -0
- package/esm/data-table/column-datetime.js +6 -6
- package/esm/data-table/data-table.js +4 -4
- package/esm/datepicker/calendar-header.js +7 -10
- package/esm/datepicker/calendar.js +2 -1
- package/esm/datepicker/datepicker.js +1 -1
- package/esm/datepicker/styled-components.js +2 -2
- package/esm/datepicker/utils/index.js +1 -1
- package/esm/drawer/drawer.js +1 -1
- package/esm/flex-grid/flex-grid-item.js +5 -3
- package/esm/flex-grid/flex-grid.js +14 -10
- package/esm/form-control/form-control.js +4 -4
- package/esm/heading/heading.js +1 -1
- package/esm/helpers/overrides.js +13 -9
- package/esm/icon/alert.js +18 -14
- package/esm/icon/arrow-down.js +18 -14
- package/esm/icon/arrow-left.js +18 -14
- package/esm/icon/arrow-right.js +18 -14
- package/esm/icon/arrow-up.js +18 -14
- package/esm/icon/blank.js +14 -10
- package/esm/icon/check-indeterminate.js +18 -14
- package/esm/icon/check.js +18 -14
- package/esm/icon/chevron-down.js +19 -15
- package/esm/icon/chevron-left.js +18 -14
- package/esm/icon/chevron-right.js +18 -14
- package/esm/icon/chevron-up.js +19 -15
- package/esm/icon/delete-alt.js +18 -14
- package/esm/icon/delete.js +18 -14
- package/esm/icon/filter.js +32 -28
- package/esm/icon/grab.js +18 -14
- package/esm/icon/hide.js +16 -12
- package/esm/icon/menu.js +32 -28
- package/esm/icon/omit-dollar-prefixed-keys.js +1 -1
- package/esm/icon/overflow.js +26 -22
- package/esm/icon/plus.js +18 -14
- package/esm/icon/search.js +18 -14
- package/esm/icon/show.js +16 -12
- package/esm/icon/spinner.js +23 -19
- package/esm/icon/triangle-down.js +16 -12
- package/esm/icon/triangle-left.js +16 -12
- package/esm/icon/triangle-right.js +16 -12
- package/esm/icon/triangle-up.js +16 -12
- package/esm/icon/upload.js +18 -14
- package/esm/input/stateful-container.js +0 -1
- package/esm/input/styled-components.js +6 -2
- package/esm/layer/layer.js +4 -3
- package/esm/list/list-heading.js +3 -3
- package/esm/list/list-item.js +1 -1
- package/esm/map-marker/fixed-marker.js +11 -5
- package/esm/menu/maybe-child-menu.js +1 -2
- package/esm/menu/option-profile.js +2 -0
- package/esm/menu/stateful-container.js +3 -4
- package/esm/menu/stateful-menu.js +9 -5
- package/esm/menu/types.js +1 -1
- package/esm/modal/modal-button.js +9 -5
- package/esm/modal/modal.js +1 -3
- package/esm/pagination/stateful-container.js +1 -0
- package/esm/pagination/stateful-pagination.js +1 -0
- package/esm/payment-card/payment-card.js +25 -21
- package/esm/phone-input/base-country-picker.js +5 -8
- package/esm/phone-input/country-picker.js +5 -8
- package/esm/phone-input/country-select-dropdown.js +5 -4
- package/esm/phone-input/country-select.js +5 -8
- package/esm/phone-input/flag.js +2 -1
- package/esm/phone-input/phone-input-lite.js +1 -2
- package/esm/phone-input/phone-input-next.js +1 -2
- package/esm/pin-code/pin-code.js +1 -2
- package/esm/popover/popover.js +6 -7
- package/esm/progress-bar/progressbar-rounded.js +25 -22
- package/esm/progress-bar/progressbar.js +7 -3
- package/esm/radio/radiogroup.js +1 -1
- package/esm/rating/emoticon-rating.js +1 -1
- package/esm/rating/star-rating.js +1 -1
- package/esm/select/autosize-input.js +1 -2
- package/esm/select/dropdown.js +1 -2
- package/esm/select/multi-value.js +1 -1
- package/esm/select/select-component.js +5 -4
- package/esm/select/value.js +1 -1
- package/esm/slider/slider.js +2 -2
- package/esm/snackbar/snackbar-element.js +3 -3
- package/esm/snackbar/styled-components.js +1 -1
- package/esm/spinner/spinner.js +22 -18
- package/esm/spinner/styled-components.js +0 -2
- package/esm/styles/__mocks__/styled.js +1 -1
- package/esm/styles/styled.js +7 -7
- package/esm/table-semantic/styled-components.js +2 -1
- package/esm/tabs/tabs.js +2 -2
- package/esm/tag/styled-components.js +4 -8
- package/esm/tag/tag.js +1 -1
- package/esm/textarea/styled-components.js +8 -7
- package/esm/textarea/textarea.js +2 -1
- package/esm/timepicker/timepicker.js +2 -4
- package/esm/timezonepicker/timezone-picker.js +2 -5
- package/esm/toast/styled-components.js +30 -19
- package/esm/toast/toaster.js +5 -7
- package/esm/toast/types.js +0 -2
- package/esm/tree-view/tree-label-interactable.js +12 -8
- package/esm/tree-view/tree-label.js +7 -3
- package/esm/tree-view/tree-node.js +1 -1
- package/esm/tree-view/tree-view.js +6 -6
- package/esm/typography/index.js +416 -272
- package/esm/utils/deep-merge.js +2 -2
- package/esm/utils/deprecated-component.js +5 -3
- package/file-uploader/types.js.flow +2 -2
- package/flex-grid/flex-grid-item.js +5 -3
- package/flex-grid/flex-grid-item.js.flow +7 -5
- package/flex-grid/flex-grid.js +14 -10
- package/flex-grid/flex-grid.js.flow +4 -3
- package/form-control/form-control.js +4 -4
- package/form-control/form-control.js.flow +4 -4
- package/heading/heading.js +1 -1
- package/heading/heading.js.flow +1 -0
- package/helpers/overrides.js +13 -9
- package/helpers/overrides.js.flow +23 -16
- package/helpers/react-helpers.js.flow +1 -1
- package/icon/alert.js +18 -14
- package/icon/alert.js.flow +1 -0
- package/icon/arrow-down.js +18 -14
- package/icon/arrow-down.js.flow +1 -0
- package/icon/arrow-left.js +18 -14
- package/icon/arrow-left.js.flow +1 -0
- package/icon/arrow-right.js +18 -14
- package/icon/arrow-right.js.flow +1 -0
- package/icon/arrow-up.js +18 -14
- package/icon/arrow-up.js.flow +1 -0
- package/icon/blank.js +14 -10
- package/icon/blank.js.flow +1 -0
- package/icon/check-indeterminate.js +18 -14
- package/icon/check-indeterminate.js.flow +1 -0
- package/icon/check.js +18 -14
- package/icon/check.js.flow +1 -0
- package/icon/chevron-down.js +19 -15
- package/icon/chevron-down.js.flow +1 -0
- package/icon/chevron-left.js +18 -14
- package/icon/chevron-left.js.flow +1 -0
- package/icon/chevron-right.js +18 -14
- package/icon/chevron-right.js.flow +1 -0
- package/icon/chevron-up.js +19 -15
- package/icon/chevron-up.js.flow +1 -0
- package/icon/delete-alt.js +18 -14
- package/icon/delete-alt.js.flow +1 -0
- package/icon/delete.js +18 -14
- package/icon/delete.js.flow +1 -0
- package/icon/filter.js +32 -28
- package/icon/filter.js.flow +1 -0
- package/icon/grab.js +18 -14
- package/icon/grab.js.flow +1 -0
- package/icon/hide.js +16 -12
- package/icon/hide.js.flow +1 -0
- package/icon/menu.js +32 -28
- package/icon/menu.js.flow +1 -0
- package/icon/omit-dollar-prefixed-keys.js +1 -1
- package/icon/omit-dollar-prefixed-keys.js.flow +1 -1
- package/icon/overflow.js +26 -22
- package/icon/overflow.js.flow +1 -0
- package/icon/plus.js +18 -14
- package/icon/plus.js.flow +1 -0
- package/icon/search.js +18 -14
- package/icon/search.js.flow +1 -0
- package/icon/show.js +16 -12
- package/icon/show.js.flow +1 -0
- package/icon/spinner.js +23 -19
- package/icon/spinner.js.flow +1 -0
- package/icon/styled-components.js.flow +10 -1
- package/icon/triangle-down.js +16 -12
- package/icon/triangle-down.js.flow +1 -0
- package/icon/triangle-left.js +16 -12
- package/icon/triangle-left.js.flow +1 -0
- package/icon/triangle-right.js +16 -12
- package/icon/triangle-right.js.flow +1 -0
- package/icon/triangle-up.js +16 -12
- package/icon/triangle-up.js.flow +1 -0
- package/icon/upload.js +18 -14
- package/icon/upload.js.flow +1 -0
- package/input/base-input.js.flow +1 -1
- package/input/stateful-container.js +0 -1
- package/input/stateful-container.js.flow +0 -1
- package/input/stateful-input.js.flow +2 -2
- package/input/styled-components.js +6 -2
- package/input/styled-components.js.flow +58 -10
- package/input/types.js.flow +15 -9
- package/input/utils.js.flow +7 -2
- package/layer/layer.js +4 -3
- package/layer/layer.js.flow +3 -3
- package/layer/layers-manager.js.flow +2 -2
- package/layer/types.js.flow +1 -1
- package/list/index.d.ts +4 -13
- package/list/list-heading.js +3 -3
- package/list/list-heading.js.flow +3 -3
- package/list/list-item.js +1 -1
- package/list/list-item.js.flow +1 -1
- package/list/types.js.flow +1 -1
- package/map-marker/fixed-marker.js +11 -5
- package/map-marker/fixed-marker.js.flow +8 -3
- package/menu/maybe-child-menu.js +1 -2
- package/menu/maybe-child-menu.js.flow +3 -3
- package/menu/option-list.js.flow +4 -1
- package/menu/option-profile.js +2 -0
- package/menu/option-profile.js.flow +3 -1
- package/menu/stateful-container.js +3 -4
- package/menu/stateful-container.js.flow +13 -9
- package/menu/stateful-menu.js +9 -5
- package/menu/stateful-menu.js.flow +1 -0
- package/menu/types.js.flow +8 -7
- package/modal/modal-button.js +9 -5
- package/modal/modal-button.js.flow +1 -0
- package/modal/modal.js +1 -3
- package/modal/modal.js.flow +1 -3
- package/modal/types.js.flow +1 -1
- package/package.json +3 -3
- package/pagination/stateful-container.js +1 -0
- package/pagination/stateful-container.js.flow +2 -2
- package/pagination/stateful-pagination.js +1 -0
- package/pagination/stateful-pagination.js.flow +2 -2
- package/pagination/types.js.flow +8 -4
- package/payment-card/payment-card.js +25 -21
- package/payment-card/payment-card.js.flow +1 -0
- package/payment-card/stateful-payment-card.js.flow +2 -1
- package/payment-card/styled-components.js.flow +4 -4
- package/phone-input/base-country-picker.js +5 -8
- package/phone-input/base-country-picker.js.flow +2 -5
- package/phone-input/country-picker.js +5 -8
- package/phone-input/country-picker.js.flow +11 -10
- package/phone-input/country-select-dropdown.js +4 -4
- package/phone-input/country-select-dropdown.js.flow +8 -5
- package/phone-input/country-select.js +5 -8
- package/phone-input/country-select.js.flow +2 -5
- package/phone-input/flag.js +2 -1
- package/phone-input/flag.js.flow +1 -0
- package/phone-input/phone-input-lite.js +1 -2
- package/phone-input/phone-input-lite.js.flow +0 -1
- package/phone-input/phone-input-next.js +1 -2
- package/phone-input/phone-input-next.js.flow +4 -3
- package/phone-input/styled-components.js.flow +10 -5
- package/phone-input/types.js.flow +4 -5
- package/pin-code/pin-code.js +1 -2
- package/pin-code/pin-code.js.flow +0 -1
- package/popover/popover.js +6 -3
- package/popover/popover.js.flow +20 -8
- package/popover/types.js.flow +3 -4
- package/progress-bar/progressbar-rounded.js +25 -22
- package/progress-bar/progressbar-rounded.js.flow +5 -1
- package/progress-bar/progressbar.js +7 -3
- package/progress-bar/progressbar.js.flow +2 -1
- package/radio/radio.js.flow +2 -2
- package/radio/radiogroup.js +1 -1
- package/radio/radiogroup.js.flow +4 -1
- package/radio/types.js.flow +2 -1
- package/rating/emoticon-rating.js +1 -1
- package/rating/emoticon-rating.js.flow +1 -1
- package/rating/star-rating.js +1 -1
- package/rating/star-rating.js.flow +1 -1
- package/select/autosize-input.js +1 -2
- package/select/autosize-input.js.flow +0 -1
- package/select/dropdown.js +1 -2
- package/select/dropdown.js.flow +1 -3
- package/select/multi-value.js +1 -1
- package/select/multi-value.js.flow +1 -1
- package/select/select-component.js +5 -5
- package/select/select-component.js.flow +11 -8
- package/select/types.js.flow +6 -5
- package/select/utils/index.js.flow +1 -5
- package/select/value.js +1 -1
- package/select/value.js.flow +1 -1
- package/side-navigation/stateful-container.js.flow +2 -2
- package/side-navigation/types.js.flow +4 -4
- package/slider/index.js.flow +1 -0
- package/slider/slider.js +2 -2
- package/slider/slider.js.flow +4 -2
- package/slider/types.js.flow +2 -2
- package/snackbar/snackbar-element.js +3 -3
- package/snackbar/snackbar-element.js.flow +2 -2
- package/snackbar/styled-components.js +1 -1
- package/snackbar/styled-components.js.flow +6 -5
- package/spinner/spinner.js +22 -18
- package/spinner/spinner.js.flow +2 -2
- package/spinner/styled-components.js +0 -2
- package/spinner/styled-components.js.flow +3 -2
- package/styles/as-primary-export-hoc.js.flow +1 -1
- package/styles/styled.js +7 -7
- package/styles/styled.js.flow +9 -9
- package/styles/util.js.flow +15 -2
- package/table-semantic/styled-components.js +2 -1
- package/table-semantic/styled-components.js.flow +6 -3
- package/tabs/tabs.js +2 -2
- package/tabs/tabs.js.flow +2 -2
- package/tabs/types.js.flow +1 -1
- package/tag/styled-components.js +4 -8
- package/tag/styled-components.js.flow +143 -137
- package/tag/tag.js +1 -1
- package/tag/tag.js.flow +1 -1
- package/textarea/styled-components.js +8 -7
- package/textarea/styled-components.js.flow +10 -10
- package/textarea/textarea.js +2 -1
- package/textarea/textarea.js.flow +1 -0
- package/textarea/types.js.flow +4 -2
- package/themes/types.js.flow +7 -2
- package/timepicker/timepicker.js +2 -4
- package/timepicker/timepicker.js.flow +0 -2
- package/timezonepicker/timezone-picker.js +2 -5
- package/timezonepicker/timezone-picker.js.flow +1 -4
- package/toast/styled-components.js +30 -19
- package/toast/styled-components.js.flow +88 -65
- package/toast/toaster.js +5 -7
- package/toast/toaster.js.flow +5 -10
- package/toast/types.js.flow +0 -1
- package/tree-view/tree-label-interactable.js +12 -8
- package/tree-view/tree-label-interactable.js.flow +1 -0
- package/tree-view/tree-label.js +7 -3
- package/tree-view/tree-label.js.flow +1 -0
- package/tree-view/tree-node.js +1 -1
- package/tree-view/tree-node.js.flow +1 -1
- package/tree-view/tree-view.js +6 -6
- package/tree-view/tree-view.js.flow +13 -11
- package/tree-view/types.js.flow +5 -3
- package/tree-view/utils.js.flow +1 -1
- package/typography/index.js +416 -272
- package/typography/index.js.flow +36 -0
- package/utils/deep-merge.js +2 -2
- package/utils/deep-merge.js.flow +2 -2
- package/utils/deprecated-component.js +5 -3
- package/utils/deprecated-component.js.flow +5 -3
- package/utils/focusVisible.js.flow +2 -2
package/a11y/a11y.js
CHANGED
package/a11y/a11y.js.flow
CHANGED
|
@@ -136,7 +136,7 @@ export default function A11y(props: {children: React.Node}) {
|
|
|
136
136
|
<span ref={child}>{props.children}</span>
|
|
137
137
|
<div>
|
|
138
138
|
{violationsByNode.map(([node, violations], index) => (
|
|
139
|
-
//
|
|
139
|
+
// flowlint-next-line unclear-type:off
|
|
140
140
|
<Violation target={node} violations={(violations: any)} key={index} />
|
|
141
141
|
))}
|
|
142
142
|
</div>
|
package/accordion/accordion.js
CHANGED
|
@@ -92,7 +92,8 @@ var Accordion = /*#__PURE__*/function (_React$Component) {
|
|
|
92
92
|
|
|
93
93
|
_createClass(Accordion, [{
|
|
94
94
|
key: "onPanelChange",
|
|
95
|
-
value:
|
|
95
|
+
value: //flowlint-next-line unclear-type:off
|
|
96
|
+
function onPanelChange(key, onChange) {
|
|
96
97
|
var activeKeys = this.state.expanded;
|
|
97
98
|
var accordion = this.props.accordion;
|
|
98
99
|
|
|
@@ -144,7 +145,7 @@ var Accordion = /*#__PURE__*/function (_React$Component) {
|
|
|
144
145
|
children = _this$props2.children,
|
|
145
146
|
renderPanelContent = _this$props2.renderPanelContent,
|
|
146
147
|
renderAll = _this$props2.renderAll,
|
|
147
|
-
overrides = _this$props2.overrides; //
|
|
148
|
+
overrides = _this$props2.overrides; // flowlint-next-line unclear-type:off
|
|
148
149
|
|
|
149
150
|
return React.Children.map(children, function (child, index) {
|
|
150
151
|
if (!child) return; // If there is no key provided use the panel order as a default key
|
|
@@ -38,7 +38,8 @@ export default class Accordion extends React.Component<
|
|
|
38
38
|
...this.props.initialState,
|
|
39
39
|
};
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
//flowlint-next-line unclear-type:off
|
|
42
|
+
onPanelChange(key: React.Key, onChange: () => {}, ...args: Array<any>) {
|
|
42
43
|
let activeKeys = this.state.expanded;
|
|
43
44
|
const {accordion} = this.props;
|
|
44
45
|
if (accordion) {
|
|
@@ -77,8 +78,8 @@ export default class Accordion extends React.Component<
|
|
|
77
78
|
renderAll,
|
|
78
79
|
overrides,
|
|
79
80
|
} = this.props;
|
|
80
|
-
//
|
|
81
|
-
return React.Children.map(children, (child:
|
|
81
|
+
// flowlint-next-line unclear-type:off
|
|
82
|
+
return React.Children.map(children, (child: any, index) => {
|
|
82
83
|
if (!child) return;
|
|
83
84
|
// If there is no key provided use the panel order as a default key
|
|
84
85
|
const key = child.key || String(index);
|
package/accordion/panel.js
CHANGED
|
@@ -116,7 +116,7 @@ var Panel = function Panel(_ref) {
|
|
|
116
116
|
}
|
|
117
117
|
|
|
118
118
|
typeof onKeyDown === 'function' && onKeyDown(e);
|
|
119
|
-
}, [expanded, disabled, onChange, onKeyDown]); //
|
|
119
|
+
}, [expanded, disabled, onChange, onKeyDown]); // flowlint-next-line unclear-type:off
|
|
120
120
|
|
|
121
121
|
var _animateRef = React.useRef(null);
|
|
122
122
|
|
package/accordion/panel.js.flow
CHANGED
package/accordion/types.js.flow
CHANGED
|
@@ -57,7 +57,8 @@ export type AccordionOnChangeHandlerT = ({
|
|
|
57
57
|
expanded: Array<React.Key>,
|
|
58
58
|
}) => mixed;
|
|
59
59
|
|
|
60
|
-
type
|
|
60
|
+
//flowlint-next-line unclear-type:off
|
|
61
|
+
type ChildrenT = React.ChildrenArray<React.Element<any>>;
|
|
61
62
|
|
|
62
63
|
export type AccordionPropsT = {
|
|
63
64
|
/** Determines how many panels may be expanded at a time. If set to
|
|
@@ -151,21 +151,18 @@ function MobileMenu(props) {
|
|
|
151
151
|
var _getOverrides3 = (0, _overrides.getOverrides)(overrides.SideMenuButton, _index.Button),
|
|
152
152
|
_getOverrides4 = _slicedToArray(_getOverrides3, 2),
|
|
153
153
|
SideMenuButton = _getOverrides4[0],
|
|
154
|
-
sideMenuButtonProps = _getOverrides4[1];
|
|
155
|
-
|
|
154
|
+
sideMenuButtonProps = _getOverrides4[1];
|
|
156
155
|
|
|
157
156
|
sideMenuButtonProps.overrides = (0, _overrides.mergeOverrides)({
|
|
158
157
|
BaseButton: {
|
|
159
158
|
component: _styledComponents.StyledSideMenuButton
|
|
160
159
|
}
|
|
161
|
-
},
|
|
162
|
-
sideMenuButtonProps.overrides);
|
|
160
|
+
}, sideMenuButtonProps.overrides);
|
|
163
161
|
|
|
164
162
|
var _getOverrides5 = (0, _overrides.getOverrides)(overrides.MobileDrawer, _index2.Drawer),
|
|
165
163
|
_getOverrides6 = _slicedToArray(_getOverrides5, 2),
|
|
166
164
|
MobileDrawer = _getOverrides6[0],
|
|
167
|
-
drawerProps = _getOverrides6[1];
|
|
168
|
-
|
|
165
|
+
drawerProps = _getOverrides6[1];
|
|
169
166
|
|
|
170
167
|
drawerProps.overrides = (0, _overrides.mergeOverrides)({
|
|
171
168
|
DrawerBody: {
|
|
@@ -183,14 +180,12 @@ function MobileMenu(props) {
|
|
|
183
180
|
Close: function Close() {
|
|
184
181
|
return null;
|
|
185
182
|
}
|
|
186
|
-
},
|
|
187
|
-
drawerProps.overrides);
|
|
183
|
+
}, drawerProps.overrides);
|
|
188
184
|
|
|
189
185
|
var _getOverrides7 = (0, _overrides.getOverrides)(overrides.MobileMenu, _index4.StatefulMenu),
|
|
190
186
|
_getOverrides8 = _slicedToArray(_getOverrides7, 2),
|
|
191
187
|
MobileMenu = _getOverrides8[0],
|
|
192
|
-
menuProps = _getOverrides8[1];
|
|
193
|
-
|
|
188
|
+
menuProps = _getOverrides8[1];
|
|
194
189
|
|
|
195
190
|
menuProps.overrides = (0, _overrides.mergeOverrides)({
|
|
196
191
|
List: {
|
|
@@ -210,8 +205,7 @@ function MobileMenu(props) {
|
|
|
210
205
|
overrides: overrides
|
|
211
206
|
}));
|
|
212
207
|
})
|
|
213
|
-
},
|
|
214
|
-
menuProps.overrides);
|
|
208
|
+
}, menuProps.overrides);
|
|
215
209
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(SideMenuButton, _extends({
|
|
216
210
|
onClick: toggleMenu
|
|
217
211
|
}, sideMenuButtonProps), /*#__PURE__*/React.createElement(_menu.default, {
|
|
@@ -119,10 +119,8 @@ export default function MobileMenu(props: AppNavBarPropsT) {
|
|
|
119
119
|
overrides.SideMenuButton,
|
|
120
120
|
Button,
|
|
121
121
|
);
|
|
122
|
-
// $FlowFixMe
|
|
123
122
|
sideMenuButtonProps.overrides = mergeOverrides(
|
|
124
123
|
{BaseButton: {component: StyledSideMenuButton}},
|
|
125
|
-
// $FlowFixMe
|
|
126
124
|
sideMenuButtonProps.overrides,
|
|
127
125
|
);
|
|
128
126
|
|
|
@@ -130,7 +128,6 @@ export default function MobileMenu(props: AppNavBarPropsT) {
|
|
|
130
128
|
overrides.MobileDrawer,
|
|
131
129
|
Drawer,
|
|
132
130
|
);
|
|
133
|
-
// $FlowFixMe
|
|
134
131
|
drawerProps.overrides = mergeOverrides(
|
|
135
132
|
{
|
|
136
133
|
DrawerBody: {
|
|
@@ -146,7 +143,6 @@ export default function MobileMenu(props: AppNavBarPropsT) {
|
|
|
146
143
|
// Removes the close icon from the drawer
|
|
147
144
|
Close: () => null,
|
|
148
145
|
},
|
|
149
|
-
// $FlowFixMe
|
|
150
146
|
drawerProps.overrides,
|
|
151
147
|
);
|
|
152
148
|
|
|
@@ -154,7 +150,6 @@ export default function MobileMenu(props: AppNavBarPropsT) {
|
|
|
154
150
|
overrides.MobileMenu,
|
|
155
151
|
StatefulMenu,
|
|
156
152
|
);
|
|
157
|
-
// $FlowFixMe
|
|
158
153
|
menuProps.overrides = mergeOverrides(
|
|
159
154
|
{
|
|
160
155
|
List: {
|
|
@@ -177,7 +172,6 @@ export default function MobileMenu(props: AppNavBarPropsT) {
|
|
|
177
172
|
);
|
|
178
173
|
}),
|
|
179
174
|
},
|
|
180
|
-
// $FlowFixMe
|
|
181
175
|
menuProps.overrides,
|
|
182
176
|
);
|
|
183
177
|
|
|
@@ -35,13 +35,13 @@ export type OverridesT = {|
|
|
|
35
35
|
|
|
36
36
|
export type NavItemT = {|
|
|
37
37
|
active?: boolean,
|
|
38
|
-
//
|
|
38
|
+
// flowlint-next-line unclear-type:off
|
|
39
39
|
icon?: React.AbstractComponent<any>,
|
|
40
|
-
//
|
|
40
|
+
// flowlint-next-line unclear-type:off
|
|
41
41
|
info?: any,
|
|
42
42
|
label: string,
|
|
43
43
|
children?: NavItemT[],
|
|
44
|
-
//
|
|
44
|
+
// flowlint-next-line unclear-type:off
|
|
45
45
|
navExitIcon?: React.AbstractComponent<any>,
|
|
46
46
|
navPosition?: {
|
|
47
47
|
desktop?: $Values<typeof POSITION>,
|
package/app-nav-bar/user-menu.js
CHANGED
|
@@ -98,21 +98,18 @@ function UserMenuComponent(props) {
|
|
|
98
98
|
var _getOverrides3 = (0, _overrides.getOverrides)(overrides.UserMenuButton, _index2.Button),
|
|
99
99
|
_getOverrides4 = _slicedToArray(_getOverrides3, 2),
|
|
100
100
|
UserMenuButton = _getOverrides4[0],
|
|
101
|
-
userMenuButtonProps = _getOverrides4[1];
|
|
102
|
-
|
|
101
|
+
userMenuButtonProps = _getOverrides4[1];
|
|
103
102
|
|
|
104
103
|
userMenuButtonProps.overrides = (0, _overrides.mergeOverrides)({
|
|
105
104
|
BaseButton: {
|
|
106
105
|
component: _styledComponents.StyledUserMenuButton
|
|
107
106
|
}
|
|
108
|
-
},
|
|
109
|
-
userMenuButtonProps.overrides);
|
|
107
|
+
}, userMenuButtonProps.overrides);
|
|
110
108
|
|
|
111
109
|
var _getOverrides5 = (0, _overrides.getOverrides)(overrides.UserMenu, _index4.StatefulMenu),
|
|
112
110
|
_getOverrides6 = _slicedToArray(_getOverrides5, 2),
|
|
113
111
|
UserMenu = _getOverrides6[0],
|
|
114
|
-
userMenuProps = _getOverrides6[1];
|
|
115
|
-
|
|
112
|
+
userMenuProps = _getOverrides6[1];
|
|
116
113
|
|
|
117
114
|
userMenuProps.overrides = (0, _overrides.mergeOverrides)({
|
|
118
115
|
List: {
|
|
@@ -142,8 +139,7 @@ function UserMenuComponent(props) {
|
|
|
142
139
|
mapItemToNode: props.mapItemToNode
|
|
143
140
|
}));
|
|
144
141
|
})
|
|
145
|
-
},
|
|
146
|
-
userMenuProps.overrides);
|
|
142
|
+
}, userMenuProps.overrides);
|
|
147
143
|
return /*#__PURE__*/React.createElement(_index5.StatefulPopover, {
|
|
148
144
|
content: function content(_ref3) {
|
|
149
145
|
var close = _ref3.close;
|
|
@@ -64,10 +64,8 @@ export default function UserMenuComponent(props: {|
|
|
|
64
64
|
overrides.UserMenuButton,
|
|
65
65
|
Button,
|
|
66
66
|
);
|
|
67
|
-
// $FlowFixMe
|
|
68
67
|
userMenuButtonProps.overrides = mergeOverrides(
|
|
69
68
|
{BaseButton: {component: StyledUserMenuButton}},
|
|
70
|
-
// $FlowFixMe
|
|
71
69
|
userMenuButtonProps.overrides,
|
|
72
70
|
);
|
|
73
71
|
|
|
@@ -75,7 +73,6 @@ export default function UserMenuComponent(props: {|
|
|
|
75
73
|
overrides.UserMenu,
|
|
76
74
|
StatefulMenu,
|
|
77
75
|
);
|
|
78
|
-
// $FlowFixMe
|
|
79
76
|
userMenuProps.overrides = mergeOverrides(
|
|
80
77
|
{
|
|
81
78
|
List: {
|
|
@@ -107,7 +104,6 @@ export default function UserMenuComponent(props: {|
|
|
|
107
104
|
);
|
|
108
105
|
}),
|
|
109
106
|
},
|
|
110
|
-
// $FlowFixMe
|
|
111
107
|
userMenuProps.overrides,
|
|
112
108
|
);
|
|
113
109
|
|
|
@@ -58,9 +58,9 @@ var AspectRatioBox = function AspectRatioBox(_ref2) {
|
|
|
58
58
|
}
|
|
59
59
|
};
|
|
60
60
|
var blockOverrides = (0, _overrides.mergeOverrides)(aspectRatioBoxOverrides, overrides);
|
|
61
|
-
return /*#__PURE__*/React.createElement(_index.Block // coerced to any because
|
|
61
|
+
return /*#__PURE__*/React.createElement(_index.Block // coerced to any because of how react components are typed.
|
|
62
62
|
// cannot guarantee an html element
|
|
63
|
-
//
|
|
63
|
+
// flowlint-next-line unclear-type:off
|
|
64
64
|
, _extends({
|
|
65
65
|
ref: forwardedRef,
|
|
66
66
|
overrides: blockOverrides,
|
|
@@ -35,7 +35,8 @@ const AspectRatioBox = ({
|
|
|
35
35
|
aspectRatio = 1,
|
|
36
36
|
overrides = {},
|
|
37
37
|
...restProps
|
|
38
|
-
}
|
|
38
|
+
}: // flowlint-next-line unclear-type:off
|
|
39
|
+
AspectRatioBoxPropsT & {forwardedRef: any}): React.Node => {
|
|
39
40
|
const aspectRatioBoxOverrides = {
|
|
40
41
|
Block: {
|
|
41
42
|
style: aspectRatioBoxStyle,
|
|
@@ -44,9 +45,9 @@ const AspectRatioBox = ({
|
|
|
44
45
|
const blockOverrides = mergeOverrides(aspectRatioBoxOverrides, overrides);
|
|
45
46
|
return (
|
|
46
47
|
<Block
|
|
47
|
-
// coerced to any because
|
|
48
|
+
// coerced to any because of how react components are typed.
|
|
48
49
|
// cannot guarantee an html element
|
|
49
|
-
//
|
|
50
|
+
// flowlint-next-line unclear-type:off
|
|
50
51
|
ref={(forwardedRef: any)}
|
|
51
52
|
overrides={blockOverrides}
|
|
52
53
|
$aspectRatio={aspectRatio}
|
package/block/block.js
CHANGED
|
@@ -116,7 +116,7 @@ function Block(_ref) {
|
|
|
116
116
|
|
|
117
117
|
return /*#__PURE__*/React.createElement(BaseBlock // coerced to any because because of how react components are typed.
|
|
118
118
|
// cannot guarantee an html element
|
|
119
|
-
//
|
|
119
|
+
// flowlint-next-line unclear-type:off
|
|
120
120
|
, _extends({
|
|
121
121
|
ref: forwardedRef,
|
|
122
122
|
$as: as,
|
package/block/block.js.flow
CHANGED
|
@@ -93,7 +93,7 @@ function Block({
|
|
|
93
93
|
<BaseBlock
|
|
94
94
|
// coerced to any because because of how react components are typed.
|
|
95
95
|
// cannot guarantee an html element
|
|
96
|
-
//
|
|
96
|
+
// flowlint-next-line unclear-type:off
|
|
97
97
|
ref={(forwardedRef: any)}
|
|
98
98
|
$as={as}
|
|
99
99
|
$color={color}
|
|
@@ -22,8 +22,9 @@ function constrainToNull(value) {
|
|
|
22
22
|
|
|
23
23
|
type ApplyParams = {
|
|
24
24
|
property: string,
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
// flowlint-next-line unclear-type:off
|
|
26
|
+
value?: any | Array<any>,
|
|
27
|
+
// flowlint-next-line unclear-type:off
|
|
27
28
|
transform?: Function,
|
|
28
29
|
};
|
|
29
30
|
|
package/block/types.js.flow
CHANGED
|
@@ -343,6 +343,7 @@ export type BlockPropsT = {
|
|
|
343
343
|
textOverflow?: ResponsiveT<string>,
|
|
344
344
|
/** available values: https://developer.mozilla.org/en-US/docs/Web/CSS/white-space */
|
|
345
345
|
whiteSpace?: ResponsiveT<WhiteSpaceT>,
|
|
346
|
+
src?: string,
|
|
346
347
|
};
|
|
347
348
|
|
|
348
349
|
export type StyledBlockPropsT = {
|
|
@@ -81,16 +81,13 @@ function Breadcrumbs(props) {
|
|
|
81
81
|
Separator = _getOverrides12[0],
|
|
82
82
|
baseSeparatorProps = _getOverrides12[1];
|
|
83
83
|
|
|
84
|
-
|
|
84
|
+
baseIconProps.overrides = (0, _overrides.mergeOverrides)({
|
|
85
85
|
Svg: {
|
|
86
86
|
style: {
|
|
87
87
|
verticalAlign: 'text-bottom'
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
|
-
},
|
|
91
|
-
baseIconProps && baseIconProps.overrides); // $FlowFixMe
|
|
92
|
-
|
|
93
|
-
baseIconProps.overrides = iconOverrides;
|
|
90
|
+
}, baseIconProps && baseIconProps.overrides);
|
|
94
91
|
childrenArray.forEach(function (child, index) {
|
|
95
92
|
childrenWithSeparators.push( /*#__PURE__*/_react.default.createElement(ListItem, _extends({
|
|
96
93
|
key: "breadcrumb-item-".concat(index),
|
|
@@ -15,10 +15,10 @@ import ChevronRight from '../icon/chevron-right.js';
|
|
|
15
15
|
import ChevronLeft from '../icon/chevron-left.js';
|
|
16
16
|
import type {BreadcrumbsPropsT} from './types.js';
|
|
17
17
|
import {
|
|
18
|
-
StyledRoot,
|
|
19
|
-
StyledSeparator,
|
|
20
18
|
StyledList,
|
|
21
19
|
StyledListItem,
|
|
20
|
+
StyledRoot,
|
|
21
|
+
StyledSeparator,
|
|
22
22
|
} from './styled-components.js';
|
|
23
23
|
import {getOverrides, mergeOverrides} from '../helpers/overrides.js';
|
|
24
24
|
|
|
@@ -40,13 +40,10 @@ export function Breadcrumbs(props: BreadcrumbsPropsT) {
|
|
|
40
40
|
StyledSeparator,
|
|
41
41
|
);
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
baseIconProps.overrides = mergeOverrides(
|
|
44
44
|
{Svg: {style: {verticalAlign: 'text-bottom'}}},
|
|
45
|
-
// $FlowFixMe
|
|
46
45
|
baseIconProps && baseIconProps.overrides,
|
|
47
46
|
);
|
|
48
|
-
// $FlowFixMe
|
|
49
|
-
baseIconProps.overrides = iconOverrides;
|
|
50
47
|
|
|
51
48
|
childrenArray.forEach((child, index) => {
|
|
52
49
|
childrenWithSeparators.push(
|
package/button/button.js
CHANGED
|
@@ -192,7 +192,8 @@ var Button = /*#__PURE__*/function (_React$Component) {
|
|
|
192
192
|
|
|
193
193
|
_defineProperty(Button, "defaultProps", _defaultProps.defaultProps);
|
|
194
194
|
|
|
195
|
-
var ForwardedButton = /*#__PURE__*/React.forwardRef(
|
|
195
|
+
var ForwardedButton = /*#__PURE__*/React.forwardRef( //$FlowFixMe
|
|
196
|
+
function (props, ref) {
|
|
196
197
|
return /*#__PURE__*/React.createElement(Button, _extends({
|
|
197
198
|
forwardedRef: ref
|
|
198
199
|
}, props));
|
package/button/button.js.flow
CHANGED
|
@@ -17,17 +17,16 @@ import {defaultProps} from './default-props.js';
|
|
|
17
17
|
import {getOverrides} from '../helpers/overrides.js';
|
|
18
18
|
import {isFocusVisible, forkFocus, forkBlur} from '../utils/focusVisible.js';
|
|
19
19
|
|
|
20
|
-
import type {ButtonPropsT} from './types.js';
|
|
20
|
+
import type {ButtonPropsT, SharedStylePropsT, ReactRefT} from './types.js';
|
|
21
21
|
|
|
22
22
|
class Button extends React.Component<
|
|
23
|
-
|
|
24
|
-
ButtonPropsT & {forwardedRef: any},
|
|
23
|
+
ButtonPropsT & {forwardedRef: ReactRefT<HTMLElement>},
|
|
25
24
|
{isFocusVisible: boolean},
|
|
26
25
|
> {
|
|
27
26
|
static defaultProps = defaultProps;
|
|
28
27
|
state = {isFocusVisible: false};
|
|
29
28
|
|
|
30
|
-
internalOnClick = (...args
|
|
29
|
+
internalOnClick = (...args) => {
|
|
31
30
|
const {isLoading, onClick} = this.props;
|
|
32
31
|
if (isLoading) {
|
|
33
32
|
args[0].preventDefault();
|
|
@@ -71,16 +70,17 @@ class Button extends React.Component<
|
|
|
71
70
|
overrides.BaseButton || overrides.Root,
|
|
72
71
|
StyledBaseButton,
|
|
73
72
|
);
|
|
74
|
-
const [LoadingSpinner, loadingSpinnerProps] =
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
73
|
+
const [LoadingSpinner, loadingSpinnerProps] =
|
|
74
|
+
getOverrides<SharedStylePropsT>(
|
|
75
|
+
overrides.LoadingSpinner,
|
|
76
|
+
StyledLoadingSpinner,
|
|
77
|
+
);
|
|
78
78
|
const [LoadingSpinnerContainer, loadingSpinnerContainerProps] =
|
|
79
|
-
getOverrides(
|
|
79
|
+
getOverrides<SharedStylePropsT>(
|
|
80
80
|
overrides.LoadingSpinnerContainer,
|
|
81
81
|
StyledLoadingSpinnerContainer,
|
|
82
82
|
);
|
|
83
|
-
const sharedProps = {
|
|
83
|
+
const sharedProps: SharedStylePropsT = {
|
|
84
84
|
...getSharedProps(this.props),
|
|
85
85
|
$isFocusVisible: this.state.isFocusVisible,
|
|
86
86
|
};
|
|
@@ -133,6 +133,7 @@ class Button extends React.Component<
|
|
|
133
133
|
}
|
|
134
134
|
|
|
135
135
|
const ForwardedButton = React.forwardRef<ButtonPropsT, HTMLButtonElement>(
|
|
136
|
+
//$FlowFixMe
|
|
136
137
|
(props: ButtonPropsT, ref) => <Button forwardedRef={ref} {...props} />,
|
|
137
138
|
);
|
|
138
139
|
ForwardedButton.displayName = 'Button';
|
|
@@ -78,7 +78,6 @@ var BaseButton = (0, _index.styled)('button', function (_ref) {
|
|
|
78
78
|
$isSelected: $isSelected,
|
|
79
79
|
$disabled: $disabled
|
|
80
80
|
})), getShapeStyles({
|
|
81
|
-
$theme: $theme,
|
|
82
81
|
$shape: $shape,
|
|
83
82
|
$size: $size
|
|
84
83
|
}));
|
|
@@ -455,8 +454,7 @@ function getColorStyles(_ref13) {
|
|
|
455
454
|
}
|
|
456
455
|
|
|
457
456
|
function getShapeStyles(_ref14) {
|
|
458
|
-
var $
|
|
459
|
-
$shape = _ref14.$shape,
|
|
457
|
+
var $shape = _ref14.$shape,
|
|
460
458
|
$size = _ref14.$size;
|
|
461
459
|
|
|
462
460
|
if ($shape === _constants.SHAPE.circle || $shape === _constants.SHAPE.square) {
|
|
@@ -8,6 +8,7 @@ LICENSE file in the root directory of this source tree.
|
|
|
8
8
|
import {styled} from '../styles/index.js';
|
|
9
9
|
import {KIND, SIZE, SHAPE} from './constants.js';
|
|
10
10
|
import type {SharedStylePropsT} from './types.js';
|
|
11
|
+
import type {FontT} from '../themes/types.js';
|
|
11
12
|
|
|
12
13
|
export const BaseButton = styled<SharedStylePropsT>(
|
|
13
14
|
'button',
|
|
@@ -21,6 +22,7 @@ export const BaseButton = styled<SharedStylePropsT>(
|
|
|
21
22
|
$isSelected,
|
|
22
23
|
$disabled,
|
|
23
24
|
$isFocusVisible,
|
|
25
|
+
//$FlowFixMe
|
|
24
26
|
}) => ({
|
|
25
27
|
display: 'inline-flex',
|
|
26
28
|
// need to maintain button width while showing loading spinner
|
|
@@ -64,7 +66,7 @@ export const BaseButton = styled<SharedStylePropsT>(
|
|
|
64
66
|
$isSelected,
|
|
65
67
|
$disabled,
|
|
66
68
|
}),
|
|
67
|
-
...getShapeStyles({$
|
|
69
|
+
...getShapeStyles({$shape, $size}),
|
|
68
70
|
}),
|
|
69
71
|
);
|
|
70
72
|
|
|
@@ -219,7 +221,7 @@ function getBorderRadiiStyles({$theme, $size, $shape}) {
|
|
|
219
221
|
};
|
|
220
222
|
}
|
|
221
223
|
|
|
222
|
-
function getFontStyles({$theme, $size}) {
|
|
224
|
+
function getFontStyles({$theme, $size}): FontT {
|
|
223
225
|
switch ($size) {
|
|
224
226
|
case SIZE.mini:
|
|
225
227
|
return $theme.typography.font150;
|
|
@@ -431,7 +433,14 @@ function getColorStyles({
|
|
|
431
433
|
}
|
|
432
434
|
}
|
|
433
435
|
|
|
434
|
-
function getShapeStyles({$
|
|
436
|
+
function getShapeStyles({$shape, $size}): {
|
|
437
|
+
height?: string,
|
|
438
|
+
width?: string,
|
|
439
|
+
paddingTop?: number,
|
|
440
|
+
paddingBottom?: number,
|
|
441
|
+
paddingLeft?: number,
|
|
442
|
+
paddingRight?: number,
|
|
443
|
+
} {
|
|
435
444
|
if ($shape === SHAPE.circle || $shape === SHAPE.square) {
|
|
436
445
|
let height, width;
|
|
437
446
|
switch ($size) {
|
package/button/types.js.flow
CHANGED
|
@@ -10,6 +10,8 @@ import * as React from 'react';
|
|
|
10
10
|
import {KIND, SIZE, SHAPE} from './constants.js';
|
|
11
11
|
import type {OverrideT} from '../helpers/overrides.js';
|
|
12
12
|
|
|
13
|
+
export type ReactRefT<T> = {|current: null | T|};
|
|
14
|
+
|
|
13
15
|
export type OverridesT = {
|
|
14
16
|
Root?: OverrideT,
|
|
15
17
|
BaseButton?: OverrideT,
|
|
@@ -29,7 +31,7 @@ export type ButtonPropsT = {
|
|
|
29
31
|
colors?: CustomColorsT,
|
|
30
32
|
disabled?: boolean,
|
|
31
33
|
/** A helper rendered at the end of the button. */
|
|
32
|
-
//
|
|
34
|
+
// flowlint-next-line unclear-type:off
|
|
33
35
|
endEnhancer?: React.Node | React.AbstractComponent<any>,
|
|
34
36
|
/** Show loading button style and spinner. */
|
|
35
37
|
isLoading?: boolean,
|
|
@@ -44,7 +46,7 @@ export type ButtonPropsT = {
|
|
|
44
46
|
/** Defines the size of the button */
|
|
45
47
|
size?: $Keys<typeof SIZE>,
|
|
46
48
|
/** A helper rendered at the start of the button. */
|
|
47
|
-
//
|
|
49
|
+
// flowlint-next-line unclear-type:off
|
|
48
50
|
startEnhancer?: React.Node | React.AbstractComponent<any>,
|
|
49
51
|
type?: 'submit' | 'reset' | 'button',
|
|
50
52
|
};
|
package/button/utils.js.flow
CHANGED
|
@@ -5,7 +5,7 @@ This source code is licensed under the MIT license found in the
|
|
|
5
5
|
LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
// @flow
|
|
8
|
-
import type {ButtonPropsT} from './types.js';
|
|
8
|
+
import type {ButtonPropsT, SharedStylePropsT} from './types.js';
|
|
9
9
|
|
|
10
10
|
export function getSharedProps({
|
|
11
11
|
colors,
|
|
@@ -15,7 +15,7 @@ export function getSharedProps({
|
|
|
15
15
|
kind,
|
|
16
16
|
shape,
|
|
17
17
|
size,
|
|
18
|
-
}: ButtonPropsT) {
|
|
18
|
+
}: ButtonPropsT): $Shape<SharedStylePropsT> {
|
|
19
19
|
return {
|
|
20
20
|
$colors: colors,
|
|
21
21
|
$disabled: disabled,
|
|
@@ -29,7 +29,7 @@ function isIndexSelected(selected, index) {
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
export default class ButtonGroup extends React.Component<PropsT> {
|
|
32
|
-
childRefs: //
|
|
32
|
+
childRefs: // flowlint-next-line unclear-type:off
|
|
33
33
|
{[key: number]: React.ElementRef<any>} = {};
|
|
34
34
|
static defaultProps = {
|
|
35
35
|
disabled: false,
|
|
@@ -35,6 +35,10 @@ function StatefulButtonGroup(props) {
|
|
|
35
35
|
}, restProps), function (_ref) {
|
|
36
36
|
var containerProps = _extends({}, _ref);
|
|
37
37
|
|
|
38
|
-
return
|
|
38
|
+
return (
|
|
39
|
+
/*#__PURE__*/
|
|
40
|
+
//$FlowFixMe
|
|
41
|
+
React.createElement(_buttonGroup.default, containerProps, props.children)
|
|
42
|
+
);
|
|
39
43
|
});
|
|
40
44
|
}
|
|
@@ -17,6 +17,7 @@ export default function StatefulButtonGroup(props: StatefulPropsT) {
|
|
|
17
17
|
return (
|
|
18
18
|
<StatefulContainer initialState={initialState} {...restProps}>
|
|
19
19
|
{({...containerProps}) => (
|
|
20
|
+
//$FlowFixMe
|
|
20
21
|
<ButtonGroup {...containerProps}>{props.children}</ButtonGroup>
|
|
21
22
|
)}
|
|
22
23
|
</StatefulContainer>
|
|
@@ -81,9 +81,9 @@ class StatefulCheckboxContainer extends React.Component<
|
|
|
81
81
|
|
|
82
82
|
render() {
|
|
83
83
|
const {
|
|
84
|
-
children = (childProps: {}) => null,
|
|
85
|
-
initialState,
|
|
86
|
-
stateReducer,
|
|
84
|
+
children = (childProps: {}) => null,
|
|
85
|
+
initialState,
|
|
86
|
+
stateReducer,
|
|
87
87
|
...restProps
|
|
88
88
|
} = this.props;
|
|
89
89
|
const {onChange, onMouseEnter, onMouseLeave, onFocus, onBlur} = this;
|