@sprinklrjs/spaceweb 11.0.0 → 12.14.4
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/allComponentsAndUtilities.d.ts +1 -0
- package/allComponentsAndUtilities.js +2 -1
- package/asyncSelect/asyncSelect.d.ts +4 -2
- package/asyncSelect/asyncSelect.js +43 -108
- package/asyncSelect/groupedAsyncSelect.d.ts +5 -0
- package/asyncSelect/groupedAsyncSelect.js +41 -0
- package/asyncSelect/helpers.d.ts +8 -2
- package/asyncSelect/helpers.js +35 -4
- package/asyncSelect/hooks/useAsyncOptionHandlers.d.ts +16 -11
- package/asyncSelect/hooks/useAsyncOptionHandlers.js +73 -26
- package/asyncSelect/hooks/useAsyncSelect.d.ts +10 -0
- package/asyncSelect/hooks/useAsyncSelect.js +182 -0
- package/asyncSelect/hooks/useResolveSelectedOptions.d.ts +10 -7
- package/asyncSelect/hooks/useResolveSelectedOptions.js +59 -47
- package/asyncSelect/index.d.ts +4 -1
- package/asyncSelect/index.js +8 -0
- package/asyncSelect/types.d.ts +61 -9
- package/avatar/avatar.js +12 -2
- package/avatar/styled-component.js +7 -22
- package/badge/styled-component.js +10 -8
- package/banner/banner.js +1 -1
- package/breadcrumb/breadcrumb-item.d.ts +7 -0
- package/breadcrumb/breadcrumb-item.js +41 -0
- package/breadcrumb/breadcrumb.d.ts +7 -0
- package/breadcrumb/breadcrumb.js +29 -0
- package/breadcrumb/index.d.ts +4 -0
- package/breadcrumb/index.js +17 -0
- package/breadcrumb/package.json +4 -0
- package/breadcrumb/styled-components.d.ts +7 -0
- package/breadcrumb/styled-components.js +19 -0
- package/breadcrumb/types.d.ts +38 -0
- package/breadcrumb/types.js +2 -0
- package/button/Button.d.ts +2 -0
- package/button/Button.js +13 -1
- package/button/IconButton/IconButton.d.ts +2 -4
- package/button/IconButton/IconButton.js +5 -2
- package/button/IconButton/types.d.ts +10 -1
- package/button/basewebAdapter.d.ts +3 -1
- package/button/styled-components.js +30 -25
- package/button/types.d.ts +3 -0
- package/button-group/ButtonGroup.d.ts +1 -0
- package/button-group/ButtonGroup.js +9 -5
- package/button-group/StatefulButtonGroup.d.ts +1 -0
- package/button-group/styled-components.d.ts +34 -0
- package/button-group/styled-components.js +57 -9
- package/button-group/types.d.ts +2 -0
- package/checkbox/basewebAdapters.js +6 -1
- package/color-picker/ColorPalette.d.ts +9 -0
- package/color-picker/ColorPalette.js +26 -0
- package/color-picker/ColorPicker.d.ts +3 -0
- package/color-picker/ColorPicker.js +35 -0
- package/color-picker/Swatch.d.ts +12 -0
- package/color-picker/Swatch.js +40 -0
- package/color-picker/colors.d.ts +1 -0
- package/color-picker/colors.js +109 -0
- package/color-picker/getContrastRatio.d.ts +1 -0
- package/color-picker/getContrastRatio.js +23 -0
- package/color-picker/index.d.ts +3 -0
- package/color-picker/index.js +7 -0
- package/color-picker/locale.d.ts +3 -0
- package/color-picker/locale.js +2 -0
- package/color-picker/package.json +4 -0
- package/color-picker/styled-component.d.ts +1 -0
- package/color-picker/styled-component.js +5 -0
- package/color-picker/types.d.ts +15 -0
- package/color-picker/types.js +2 -0
- package/currency/Currency.d.ts +3 -0
- package/currency/Currency.js +14 -0
- package/currency/constants.d.ts +3 -0
- package/currency/constants.js +8 -0
- package/currency/index.d.ts +5 -0
- package/currency/index.js +12 -0
- package/currency/package.json +4 -0
- package/currency/types.d.ts +7 -0
- package/currency/types.js +2 -0
- package/currency/useCurrency.d.ts +2 -0
- package/currency/useCurrency.js +12 -0
- package/currency/utils.d.ts +8 -0
- package/currency/utils.js +11 -0
- package/date-input/Before.d.ts +4 -2
- package/date-input/Before.js +4 -4
- package/date-input/CalendarIconButton.js +7 -1
- package/date-input/DateInput.d.ts +1 -1
- package/date-input/DateInput.js +46 -25
- package/date-input/styled-components.d.ts +2 -2
- package/date-input/styled-components.js +10 -8
- package/date-input/types.d.ts +4 -2
- package/date-picker/Calendar.js +5 -3
- package/date-picker/DateInput.js +16 -14
- package/date-picker/DatePickerContent.d.ts +9 -3
- package/date-picker/DatePickerContent.js +59 -8
- package/date-picker/DatePickerInput.js +9 -6
- package/date-picker/StatelessDatePicker.js +35 -16
- package/date-picker/locale.d.ts +2 -0
- package/date-picker/stateful-container.js +11 -8
- package/date-picker/styled-components.js +53 -3
- package/date-picker/types.d.ts +10 -1
- package/date-picker/utils.d.ts +3 -1
- package/date-picker/utils.js +8 -3
- package/date-time/DateTime.d.ts +3 -0
- package/date-time/DateTime.js +12 -0
- package/date-time/index.d.ts +3 -0
- package/date-time/index.js +9 -0
- package/date-time/package.json +4 -0
- package/date-time/types.d.ts +21 -0
- package/date-time/types.js +18 -0
- package/date-time/useDateTime.d.ts +2 -0
- package/date-time/useDateTime.js +13 -0
- package/date-time/variants.d.ts +4 -0
- package/date-time/variants.js +87 -0
- package/esm/allComponentsAndUtilities.d.ts +1 -0
- package/esm/allComponentsAndUtilities.js +2 -0
- package/esm/asyncSelect/asyncSelect.d.ts +4 -2
- package/esm/asyncSelect/asyncSelect.js +46 -111
- package/esm/asyncSelect/groupedAsyncSelect.d.ts +5 -0
- package/esm/asyncSelect/groupedAsyncSelect.js +37 -0
- package/esm/asyncSelect/helpers.d.ts +8 -2
- package/esm/asyncSelect/helpers.js +31 -3
- package/esm/asyncSelect/hooks/useAsyncOptionHandlers.d.ts +16 -11
- package/esm/asyncSelect/hooks/useAsyncOptionHandlers.js +76 -29
- package/esm/asyncSelect/hooks/useAsyncSelect.d.ts +10 -0
- package/esm/asyncSelect/hooks/useAsyncSelect.js +178 -0
- package/esm/asyncSelect/hooks/useResolveSelectedOptions.d.ts +10 -7
- package/esm/asyncSelect/hooks/useResolveSelectedOptions.js +62 -50
- package/esm/asyncSelect/index.d.ts +4 -1
- package/esm/asyncSelect/index.js +3 -0
- package/esm/asyncSelect/types.d.ts +61 -9
- package/esm/avatar/avatar.js +12 -2
- package/esm/avatar/styled-component.js +7 -22
- package/esm/badge/styled-component.js +10 -8
- package/esm/banner/banner.js +1 -1
- package/esm/breadcrumb/breadcrumb-item.d.ts +7 -0
- package/esm/breadcrumb/breadcrumb-item.js +39 -0
- package/esm/breadcrumb/breadcrumb.d.ts +7 -0
- package/esm/breadcrumb/breadcrumb.js +27 -0
- package/esm/breadcrumb/index.d.ts +4 -0
- package/esm/breadcrumb/index.js +3 -0
- package/esm/breadcrumb/styled-components.d.ts +7 -0
- package/esm/breadcrumb/styled-components.js +15 -0
- package/esm/breadcrumb/types.d.ts +38 -0
- package/esm/breadcrumb/types.js +1 -0
- package/esm/button/Button.d.ts +2 -0
- package/esm/button/Button.js +13 -1
- package/esm/button/IconButton/IconButton.d.ts +2 -4
- package/esm/button/IconButton/IconButton.js +5 -2
- package/esm/button/IconButton/types.d.ts +10 -1
- package/esm/button/basewebAdapter.d.ts +3 -1
- package/esm/button/styled-components.js +30 -25
- package/esm/button/types.d.ts +3 -0
- package/esm/button-group/ButtonGroup.d.ts +1 -0
- package/esm/button-group/ButtonGroup.js +9 -5
- package/esm/button-group/StatefulButtonGroup.d.ts +1 -0
- package/esm/button-group/styled-components.d.ts +34 -0
- package/esm/button-group/styled-components.js +55 -8
- package/esm/button-group/types.d.ts +2 -0
- package/esm/checkbox/basewebAdapters.js +6 -1
- package/esm/color-picker/ColorPalette.d.ts +9 -0
- package/esm/color-picker/ColorPalette.js +22 -0
- package/esm/color-picker/ColorPicker.d.ts +3 -0
- package/esm/color-picker/ColorPicker.js +31 -0
- package/esm/color-picker/Swatch.d.ts +12 -0
- package/esm/color-picker/Swatch.js +37 -0
- package/esm/color-picker/colors.d.ts +1 -0
- package/esm/color-picker/colors.js +106 -0
- package/esm/color-picker/getContrastRatio.d.ts +1 -0
- package/esm/color-picker/getContrastRatio.js +19 -0
- package/esm/color-picker/index.d.ts +3 -0
- package/esm/color-picker/index.js +2 -0
- package/esm/color-picker/locale.d.ts +3 -0
- package/esm/color-picker/locale.js +1 -0
- package/esm/color-picker/styled-component.d.ts +1 -0
- package/esm/color-picker/styled-component.js +2 -0
- package/esm/color-picker/types.d.ts +15 -0
- package/esm/color-picker/types.js +1 -0
- package/esm/currency/Currency.d.ts +3 -0
- package/esm/currency/Currency.js +10 -0
- package/esm/currency/constants.d.ts +3 -0
- package/esm/currency/constants.js +5 -0
- package/esm/currency/index.d.ts +5 -0
- package/esm/currency/index.js +5 -0
- package/esm/currency/types.d.ts +7 -0
- package/esm/currency/types.js +1 -0
- package/esm/currency/useCurrency.d.ts +2 -0
- package/esm/currency/useCurrency.js +8 -0
- package/esm/currency/utils.d.ts +8 -0
- package/esm/currency/utils.js +7 -0
- package/esm/date-input/Before.d.ts +4 -2
- package/esm/date-input/Before.js +4 -4
- package/esm/date-input/CalendarIconButton.js +7 -1
- package/esm/date-input/DateInput.d.ts +1 -1
- package/esm/date-input/DateInput.js +47 -26
- package/esm/date-input/styled-components.d.ts +2 -2
- package/esm/date-input/styled-components.js +10 -7
- package/esm/date-input/types.d.ts +4 -2
- package/esm/date-picker/Calendar.js +5 -3
- package/esm/date-picker/DateInput.js +17 -15
- package/esm/date-picker/DatePickerContent.d.ts +9 -3
- package/esm/date-picker/DatePickerContent.js +60 -9
- package/esm/date-picker/DatePickerInput.js +9 -6
- package/esm/date-picker/StatelessDatePicker.js +35 -16
- package/esm/date-picker/locale.d.ts +2 -0
- package/esm/date-picker/stateful-container.js +11 -8
- package/esm/date-picker/styled-components.js +53 -3
- package/esm/date-picker/types.d.ts +10 -1
- package/esm/date-picker/utils.d.ts +3 -1
- package/esm/date-picker/utils.js +9 -4
- package/esm/date-time/DateTime.d.ts +3 -0
- package/esm/date-time/DateTime.js +8 -0
- package/esm/date-time/index.d.ts +3 -0
- package/esm/date-time/index.js +3 -0
- package/esm/date-time/types.d.ts +21 -0
- package/esm/date-time/types.js +15 -0
- package/esm/date-time/useDateTime.d.ts +2 -0
- package/esm/date-time/useDateTime.js +9 -0
- package/esm/date-time/variants.d.ts +4 -0
- package/esm/date-time/variants.js +84 -0
- package/esm/form-control/form-control.d.ts +1 -1
- package/esm/form-control/form-control.js +17 -12
- package/esm/form-control/styled-component.js +17 -6
- package/esm/helpers/ClearIconButton.js +3 -1
- package/esm/helpers/StyledTombstone.d.ts +1 -0
- package/esm/helpers/StyledTombstone.js +17 -0
- package/esm/helpers/baseui/useConvertOverrides.js +6 -1
- package/esm/helpers/commonStyles.js +3 -6
- package/esm/helpers/index.d.ts +1 -0
- package/esm/helpers/index.js +8 -0
- package/esm/helpers/themeHelpers.d.ts +1 -0
- package/esm/helpers/themeHelpers.js +13 -0
- package/esm/hooks/useAutoFocus.js +6 -0
- package/esm/hooks/useMatchMedia.js +13 -2
- package/esm/icon/components/alert-solid.js +2 -0
- package/esm/icon/components/alert.js +2 -0
- package/esm/icon/components/calendar-solid.js +2 -0
- package/esm/icon/components/chevron-down.js +2 -0
- package/esm/icon/components/chevron-left.d.ts +3 -0
- package/esm/icon/components/chevron-left.js +8 -0
- package/esm/icon/components/chevron-right.d.ts +3 -0
- package/esm/icon/components/chevron-right.js +8 -0
- package/esm/icon/components/close.js +2 -0
- package/esm/icon/components/error-clr.js +2 -0
- package/esm/icon/components/error-solid.js +2 -0
- package/esm/icon/components/error.js +2 -0
- package/esm/icon/components/imagePreview.js +2 -0
- package/esm/icon/components/info.js +2 -0
- package/esm/icon/components/play-video.js +2 -0
- package/esm/icon/components/reset-color.d.ts +3 -0
- package/esm/icon/components/reset-color.js +8 -0
- package/esm/icon/components/search.js +2 -0
- package/esm/icon/components/tick.js +2 -0
- package/esm/icon/components/tickCircle-solid.js +2 -0
- package/esm/icon/components/user.js +2 -0
- package/esm/icon/components/video-non-playable.js +2 -0
- package/esm/index.d.ts +2 -0
- package/esm/index.js +2 -0
- package/esm/input/basewebAdapters.js +18 -3
- package/esm/input/styled-components.js +8 -6
- package/esm/input/types.d.ts +4 -1
- package/esm/layer/useLayersContextValue.js +3 -2
- package/esm/list/avatar-list-item.d.ts +12 -22
- package/esm/list/avatar-list-item.js +6 -4
- package/esm/list/index.d.ts +1 -1
- package/esm/list/index.js +1 -1
- package/esm/list/list-item.d.ts +3 -1
- package/esm/list/list-item.js +9 -6
- package/esm/list/styled-component.d.ts +1 -0
- package/esm/list/styled-component.js +23 -15
- package/esm/list/types.d.ts +3 -0
- package/esm/locale/en_US.js +26 -0
- package/esm/locale/types.d.ts +19 -0
- package/esm/menu/MenuContext.d.ts +2 -1
- package/esm/menu/MenuContext.js +1 -0
- package/esm/menu/menu-item.d.ts +4 -1
- package/esm/menu/menu-item.js +11 -11
- package/esm/menu/menu.d.ts +1 -0
- package/esm/menu/menu.js +11 -11
- package/esm/menu/types.d.ts +1 -0
- package/esm/menu/useKeyboardNavigation.d.ts +6 -3
- package/esm/menu/useKeyboardNavigation.js +21 -14
- package/esm/menu/useStatefulMenu.d.ts +5 -2
- package/esm/menu/useStatefulMenu.js +14 -8
- package/esm/modal/modal.js +3 -1
- package/esm/modal/overrides.d.ts +2 -2
- package/esm/modal/overrides.js +6 -7
- package/esm/modal/styled-components.js +7 -7
- package/esm/number/Number.d.ts +3 -0
- package/esm/number/Number.js +10 -0
- package/esm/number/constants.d.ts +2 -0
- package/esm/number/constants.js +4 -0
- package/esm/number/index.d.ts +5 -0
- package/esm/number/index.js +5 -0
- package/esm/number/types.d.ts +6 -0
- package/esm/number/types.js +1 -0
- package/esm/number/useNumber.d.ts +2 -0
- package/esm/number/useNumber.js +8 -0
- package/esm/overrides/index.d.ts +1 -1
- package/esm/overrides/index.js +1 -1
- package/esm/overrides/mergeOverrides.d.ts +3 -2
- package/esm/overrides/mergeOverrides.js +1 -1
- package/esm/payment-card/basewebAdapters.d.ts +2 -0
- package/esm/payment-card/basewebAdapters.js +23 -1
- package/esm/payment-card/styled-components.js +25 -6
- package/esm/phone-input/country-select-container.js +1 -1
- package/esm/phone-input/country-select.js +3 -3
- package/esm/phone-input/default-props.d.ts +5 -5
- package/esm/phone-input/default-props.js +7 -7
- package/esm/phone-input/flag-container.js +1 -1
- package/esm/phone-input/phone-input.d.ts +0 -4
- package/esm/phone-input/phone-input.js +20 -12
- package/esm/phone-input/stateful-phone-input-container.js +4 -3
- package/esm/phone-input/stateful-phone-input.d.ts +0 -4
- package/esm/phone-input/styled-components.d.ts +9 -1
- package/esm/phone-input/styled-components.js +21 -7
- package/esm/phone-input/types.d.ts +2 -1
- package/esm/phone-input/utils.d.ts +5 -1
- package/esm/phone-input/utils.js +6 -1
- package/esm/popover/adapter.d.ts +1 -0
- package/esm/popover/adapter.js +15 -0
- package/esm/popover/overrides.js +8 -19
- package/esm/popover/popover.d.ts +1 -0
- package/esm/popover/popover.js +9 -4
- package/esm/popover/stateful-popover.js +2 -2
- package/esm/popover/types.d.ts +3 -0
- package/esm/popover/utils.d.ts +12 -0
- package/esm/popover/utils.js +9 -0
- package/esm/progress/linear/styled-component.d.ts +1 -1
- package/esm/progress/linear/styled-component.js +5 -5
- package/esm/radio/styled-components.js +5 -5
- package/esm/search/index.d.ts +1 -0
- package/esm/search/index.js +1 -0
- package/esm/search/search.d.ts +1 -1
- package/esm/search/search.js +15 -6
- package/esm/search/stateful-search.d.ts +3 -0
- package/esm/search/stateful-search.js +15 -0
- package/esm/search/styled-components.d.ts +1 -10
- package/esm/search/styled-components.js +54 -24
- package/esm/search/types.d.ts +8 -2
- package/esm/select/base-select.d.ts +22 -5
- package/esm/select/base-select.js +174 -82
- package/esm/select/constants.d.ts +3 -0
- package/esm/select/constants.js +3 -1
- package/esm/select/default-props.d.ts +1 -0
- package/esm/select/default-props.js +3 -0
- package/esm/select/index.d.ts +2 -2
- package/esm/select/index.js +2 -2
- package/esm/select/locale.d.ts +4 -0
- package/esm/select/mobileSelect/MobileSheet.js +3 -1
- package/esm/select/multi-value.js +22 -12
- package/esm/select/overlaySelect/OverlaySelect.js +1 -0
- package/esm/select/overlaySelect/hooks/useOverlaySelectOverrides.d.ts +2 -1
- package/esm/select/overlaySelect/hooks/useOverlaySelectOverrides.js +13 -16
- package/esm/select/overrides.d.ts +3 -0
- package/esm/select/overrides.js +19 -6
- package/esm/select/select.d.ts +1 -0
- package/esm/select/select.js +9 -3
- package/esm/select/selectMenuAdapter/CollapsibleSelectMenu.d.ts +118 -0
- package/esm/select/selectMenuAdapter/CollapsibleSelectMenu.js +70 -0
- package/esm/select/selectMenuAdapter/SelectMenuAdapter.d.ts +2 -34
- package/esm/select/selectMenuAdapter/SelectMenuAdapter.js +3 -3
- package/esm/select/selectMenuAdapter/SelectMenuItem.d.ts +4 -1
- package/esm/select/selectMenuAdapter/hooks/useGetExpandedGroup.d.ts +6 -0
- package/esm/select/selectMenuAdapter/hooks/useGetExpandedGroup.js +16 -0
- package/esm/select/selectMenuAdapter/types.d.ts +42 -0
- package/esm/select/selectMenuAdapter/types.js +1 -0
- package/esm/select/stateful-select.d.ts +1 -0
- package/esm/select/styled-component.d.ts +10 -1
- package/esm/select/styled-component.js +39 -15
- package/esm/select/types.d.ts +23 -1
- package/esm/select/types.js +1 -0
- package/esm/select/utils/default-filter-options.d.ts +2 -1
- package/esm/select/utils/default-filter-options.js +5 -1
- package/esm/select/utils/hidden-element.d.ts +6 -0
- package/esm/select/utils/hidden-element.js +16 -0
- package/esm/select/utils/merge-options.d.ts +2 -0
- package/esm/select/utils/merge-options.js +18 -0
- package/esm/select/utils/test-utils.d.ts +1 -0
- package/esm/select/utils/test-utils.js +7 -0
- package/esm/slider/styled-components.js +4 -4
- package/esm/snackbar/Snackbar.js +12 -12
- package/esm/snackbar/styled-component.js +9 -6
- package/esm/spacewebProvider/SpacewebProvider.d.ts +2 -0
- package/esm/spacewebProvider/SpacewebProvider.js +9 -9
- package/esm/stack/stack.js +6 -13
- package/esm/style/_buildUtils.d.ts +1 -1
- package/esm/style/_buildUtils.js +3 -1
- package/esm/style/_parseStyle.js +7 -2
- package/esm/style/useMemoizedStyletron.js +6 -1
- package/esm/switch/styled-components.js +3 -3
- package/esm/tag/avatar-tag.js +23 -16
- package/esm/tag/styled-components.js +32 -27
- package/esm/tag/tag.js +20 -12
- package/esm/tag/types.d.ts +2 -2
- package/esm/tag/utils.d.ts +50 -0
- package/esm/tag/utils.js +64 -0
- package/esm/textarea/basewebAdapters.js +3 -3
- package/esm/textarea/textarea.js +3 -3
- package/esm/textarea/types.d.ts +2 -2
- package/esm/theme/Provider.d.ts +10 -0
- package/esm/theme/Provider.js +61 -0
- package/esm/theme/context.d.ts +1 -10
- package/esm/theme/context.js +1 -61
- package/esm/theme/index.d.ts +1 -0
- package/esm/theme/index.js +1 -0
- package/esm/time-picker/TimePicker.js +4 -1
- package/esm/time-range-picker/RangeSelectorContainer.js +1 -1
- package/esm/time-range-picker/TimeRangePicker.js +20 -12
- package/esm/time-range-picker/index.d.ts +1 -1
- package/esm/time-range-picker/index.js +1 -1
- package/esm/time-range-picker/types.d.ts +1 -2
- package/esm/time-range-picker/utils.d.ts +33 -4
- package/esm/time-range-picker/utils.js +49 -15
- package/esm/time-zone-picker/types.d.ts +2 -0
- package/esm/tooltip/overrides.js +0 -1
- package/esm/tooltip/stateful-tooltip.js +2 -2
- package/esm/tooltip/tooltip.d.ts +1 -1
- package/esm/tooltip/tooltip.js +5 -2
- package/esm/tooltip/types.d.ts +2 -0
- package/esm/types.d.ts +2 -1
- package/esm/typography/Typography.js +14 -1
- package/esm/typography/constants.d.ts +56 -0
- package/esm/typography/constants.js +56 -0
- package/esm/typography/index.d.ts +1 -0
- package/esm/typography/index.js +1 -0
- package/esm/typography/styled-components.js +12 -4
- package/esm/typography/types.d.ts +1 -1
- package/esm/utils/intlNumberFormatUtils/index.d.ts +7 -0
- package/esm/utils/intlNumberFormatUtils/index.js +36 -0
- package/esm/utils/intlNumberFormatUtils/types.d.ts +21 -0
- package/esm/utils/intlNumberFormatUtils/types.js +6 -0
- package/form-control/form-control.d.ts +1 -1
- package/form-control/form-control.js +16 -11
- package/form-control/styled-component.js +17 -6
- package/helpers/ClearIconButton.js +3 -1
- package/helpers/StyledTombstone.d.ts +1 -0
- package/helpers/StyledTombstone.js +21 -0
- package/helpers/baseui/useConvertOverrides.js +6 -1
- package/helpers/commonStyles.js +3 -6
- package/helpers/index.d.ts +1 -0
- package/helpers/index.js +10 -1
- package/helpers/themeHelpers.d.ts +1 -0
- package/helpers/themeHelpers.js +15 -1
- package/hooks/useAutoFocus.js +6 -0
- package/hooks/useMatchMedia.js +13 -2
- package/icon/components/alert-solid.js +2 -0
- package/icon/components/alert.js +2 -0
- package/icon/components/calendar-solid.js +2 -0
- package/icon/components/chevron-down.js +2 -0
- package/icon/components/chevron-left.d.ts +3 -0
- package/icon/components/chevron-left.js +11 -0
- package/icon/components/chevron-right.d.ts +3 -0
- package/icon/components/chevron-right.js +11 -0
- package/icon/components/close.js +2 -0
- package/icon/components/error-clr.js +2 -0
- package/icon/components/error-solid.js +2 -0
- package/icon/components/error.js +2 -0
- package/icon/components/imagePreview.js +2 -0
- package/icon/components/info.js +2 -0
- package/icon/components/play-video.js +2 -0
- package/icon/components/reset-color.d.ts +3 -0
- package/icon/components/reset-color.js +11 -0
- package/icon/components/search.js +2 -0
- package/icon/components/tick.js +2 -0
- package/icon/components/tickCircle-solid.js +2 -0
- package/icon/components/user.js +2 -0
- package/icon/components/video-non-playable.js +2 -0
- package/index.d.ts +2 -0
- package/index.js +3 -0
- package/input/basewebAdapters.js +18 -3
- package/input/styled-components.js +7 -5
- package/input/types.d.ts +4 -1
- package/layer/useLayersContextValue.js +2 -1
- package/list/avatar-list-item.d.ts +12 -22
- package/list/avatar-list-item.js +5 -3
- package/list/index.d.ts +1 -1
- package/list/index.js +2 -1
- package/list/list-item.d.ts +3 -1
- package/list/list-item.js +9 -6
- package/list/styled-component.d.ts +1 -0
- package/list/styled-component.js +24 -16
- package/list/types.d.ts +3 -0
- package/locale/en_US.js +26 -0
- package/locale/types.d.ts +19 -0
- package/menu/MenuContext.d.ts +2 -1
- package/menu/MenuContext.js +1 -0
- package/menu/menu-item.d.ts +4 -1
- package/menu/menu-item.js +11 -11
- package/menu/menu.d.ts +1 -0
- package/menu/menu.js +11 -11
- package/menu/types.d.ts +1 -0
- package/menu/useKeyboardNavigation.d.ts +6 -3
- package/menu/useKeyboardNavigation.js +21 -14
- package/menu/useStatefulMenu.d.ts +5 -2
- package/menu/useStatefulMenu.js +14 -8
- package/modal/modal.js +3 -1
- package/modal/overrides.d.ts +2 -2
- package/modal/overrides.js +6 -7
- package/modal/styled-components.js +7 -7
- package/number/Number.d.ts +3 -0
- package/number/Number.js +14 -0
- package/number/constants.d.ts +2 -0
- package/number/constants.js +7 -0
- package/number/index.d.ts +5 -0
- package/number/index.js +12 -0
- package/number/package.json +4 -0
- package/number/types.d.ts +6 -0
- package/number/types.js +2 -0
- package/number/useNumber.d.ts +2 -0
- package/number/useNumber.js +12 -0
- package/overrides/index.d.ts +1 -1
- package/overrides/index.js +2 -1
- package/overrides/mergeOverrides.d.ts +3 -2
- package/overrides/mergeOverrides.js +2 -1
- package/package.json +8 -5
- package/payment-card/basewebAdapters.d.ts +2 -0
- package/payment-card/basewebAdapters.js +23 -1
- package/payment-card/styled-components.js +24 -5
- package/phone-input/country-select-container.js +1 -1
- package/phone-input/country-select.js +3 -3
- package/phone-input/default-props.d.ts +5 -5
- package/phone-input/default-props.js +8 -7
- package/phone-input/flag-container.js +1 -1
- package/phone-input/phone-input.d.ts +0 -4
- package/phone-input/phone-input.js +19 -11
- package/phone-input/stateful-phone-input-container.js +4 -3
- package/phone-input/stateful-phone-input.d.ts +0 -4
- package/phone-input/styled-components.d.ts +9 -1
- package/phone-input/styled-components.js +22 -7
- package/phone-input/types.d.ts +2 -1
- package/phone-input/utils.d.ts +5 -1
- package/phone-input/utils.js +7 -1
- package/popover/adapter.d.ts +1 -0
- package/popover/adapter.js +16 -1
- package/popover/overrides.js +8 -19
- package/popover/popover.d.ts +1 -0
- package/popover/popover.js +8 -3
- package/popover/stateful-popover.js +2 -2
- package/popover/types.d.ts +3 -0
- package/popover/utils.d.ts +12 -0
- package/popover/utils.js +11 -1
- package/progress/linear/styled-component.d.ts +1 -1
- package/progress/linear/styled-component.js +5 -5
- package/radio/styled-components.js +5 -5
- package/search/index.d.ts +1 -0
- package/search/index.js +3 -1
- package/search/search.d.ts +1 -1
- package/search/search.js +14 -5
- package/search/stateful-search.d.ts +3 -0
- package/search/stateful-search.js +19 -0
- package/search/styled-components.d.ts +1 -10
- package/search/styled-components.js +56 -25
- package/search/types.d.ts +8 -2
- package/select/base-select.d.ts +22 -5
- package/select/base-select.js +172 -80
- package/select/constants.d.ts +3 -0
- package/select/constants.js +4 -2
- package/select/default-props.d.ts +1 -0
- package/select/default-props.js +3 -0
- package/select/index.d.ts +2 -2
- package/select/index.js +4 -1
- package/select/locale.d.ts +4 -0
- package/select/mobileSelect/MobileSheet.js +3 -1
- package/select/multi-value.js +21 -11
- package/select/overlaySelect/OverlaySelect.js +1 -0
- package/select/overlaySelect/hooks/useOverlaySelectOverrides.d.ts +2 -1
- package/select/overlaySelect/hooks/useOverlaySelectOverrides.js +13 -16
- package/select/overrides.d.ts +3 -0
- package/select/overrides.js +20 -6
- package/select/select.d.ts +1 -0
- package/select/select.js +9 -3
- package/select/selectMenuAdapter/CollapsibleSelectMenu.d.ts +118 -0
- package/select/selectMenuAdapter/CollapsibleSelectMenu.js +74 -0
- package/select/selectMenuAdapter/SelectMenuAdapter.d.ts +2 -34
- package/select/selectMenuAdapter/SelectMenuAdapter.js +3 -3
- package/select/selectMenuAdapter/SelectMenuItem.d.ts +4 -1
- package/select/selectMenuAdapter/hooks/useGetExpandedGroup.d.ts +6 -0
- package/select/selectMenuAdapter/hooks/useGetExpandedGroup.js +20 -0
- package/select/selectMenuAdapter/types.d.ts +42 -0
- package/select/selectMenuAdapter/types.js +2 -0
- package/select/stateful-select.d.ts +1 -0
- package/select/styled-component.d.ts +10 -1
- package/select/styled-component.js +38 -14
- package/select/types.d.ts +23 -1
- package/select/types.js +2 -1
- package/select/utils/default-filter-options.d.ts +2 -1
- package/select/utils/default-filter-options.js +6 -5
- package/select/utils/hidden-element.d.ts +6 -0
- package/select/utils/hidden-element.js +19 -0
- package/select/utils/merge-options.d.ts +2 -0
- package/select/utils/merge-options.js +22 -0
- package/select/utils/test-utils.d.ts +1 -0
- package/select/utils/test-utils.js +11 -0
- package/slider/styled-components.js +4 -4
- package/snackbar/Snackbar.js +12 -12
- package/snackbar/styled-component.js +9 -6
- package/spacewebProvider/SpacewebProvider.d.ts +2 -0
- package/spacewebProvider/SpacewebProvider.js +8 -8
- package/stack/stack.js +6 -13
- package/style/_buildUtils.d.ts +1 -1
- package/style/_buildUtils.js +3 -1
- package/style/_parseStyle.js +7 -2
- package/style/useMemoizedStyletron.js +6 -1
- package/switch/styled-components.js +3 -3
- package/tag/avatar-tag.js +23 -16
- package/tag/styled-components.js +32 -27
- package/tag/tag.js +19 -11
- package/tag/types.d.ts +2 -2
- package/tag/utils.d.ts +50 -0
- package/tag/utils.js +67 -1
- package/textarea/basewebAdapters.js +2 -2
- package/textarea/textarea.js +2 -2
- package/textarea/types.d.ts +2 -2
- package/theme/Provider.d.ts +10 -0
- package/theme/Provider.js +65 -0
- package/theme/context.d.ts +1 -10
- package/theme/context.js +1 -61
- package/theme/index.d.ts +1 -0
- package/theme/index.js +1 -0
- package/time-picker/TimePicker.js +4 -1
- package/time-range-picker/RangeSelectorContainer.js +1 -1
- package/time-range-picker/TimeRangePicker.js +19 -11
- package/time-range-picker/index.d.ts +1 -1
- package/time-range-picker/index.js +4 -1
- package/time-range-picker/types.d.ts +1 -2
- package/time-range-picker/utils.d.ts +33 -4
- package/time-range-picker/utils.js +53 -17
- package/time-zone-picker/types.d.ts +2 -0
- package/tooltip/overrides.js +0 -1
- package/tooltip/stateful-tooltip.js +2 -2
- package/tooltip/tooltip.d.ts +1 -1
- package/tooltip/tooltip.js +5 -2
- package/tooltip/types.d.ts +2 -0
- package/tsconfig.tsbuildinfo +1 -1
- package/types.d.ts +2 -1
- package/typography/Typography.js +14 -1
- package/typography/constants.d.ts +56 -0
- package/typography/constants.js +57 -1
- package/typography/index.d.ts +1 -0
- package/typography/index.js +3 -1
- package/typography/styled-components.js +11 -3
- package/typography/types.d.ts +1 -1
- package/utils/intlNumberFormatUtils/index.d.ts +7 -0
- package/utils/intlNumberFormatUtils/index.js +40 -0
- package/utils/intlNumberFormatUtils/types.d.ts +21 -0
- package/utils/intlNumberFormatUtils/types.js +9 -0
- package/utils/package.json +4 -0
- package/esm/icon/components/chevron-right-solid.d.ts +0 -3
- package/esm/icon/components/chevron-right-solid.js +0 -6
- package/icon/components/chevron-right-solid.d.ts +0 -3
- package/icon/components/chevron-right-solid.js +0 -9
package/esm/popover/adapter.js
CHANGED
|
@@ -23,3 +23,18 @@ export var placementMap = {
|
|
|
23
23
|
rightTop: PLACEMENT.rightTop,
|
|
24
24
|
rightBottom: PLACEMENT.rightBottom,
|
|
25
25
|
};
|
|
26
|
+
export var rtlPlacementMap = {
|
|
27
|
+
auto: PLACEMENT.auto,
|
|
28
|
+
bottom: PLACEMENT.bottom,
|
|
29
|
+
bottomLeft: PLACEMENT.bottomRight,
|
|
30
|
+
bottomRight: PLACEMENT.bottomLeft,
|
|
31
|
+
top: PLACEMENT.top,
|
|
32
|
+
topLeft: PLACEMENT.topRight,
|
|
33
|
+
topRight: PLACEMENT.topLeft,
|
|
34
|
+
left: PLACEMENT.right,
|
|
35
|
+
leftTop: PLACEMENT.rightTop,
|
|
36
|
+
leftBottom: PLACEMENT.rightBottom,
|
|
37
|
+
right: PLACEMENT.left,
|
|
38
|
+
rightTop: PLACEMENT.leftTop,
|
|
39
|
+
rightBottom: PLACEMENT.leftBottom,
|
|
40
|
+
};
|
package/esm/popover/overrides.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { __assign, __read, __rest } from "tslib";
|
|
2
2
|
import { getOppositePosition, splitPlacement } from './utils';
|
|
3
3
|
import { ARROW_WIDTH } from './constants';
|
|
4
|
+
import { borderRadius } from '../helpers/longHandHelpers';
|
|
4
5
|
var arrowPositionStyle = function (_a, _b) {
|
|
5
6
|
var theme = _a.theme;
|
|
6
7
|
var _c = _b.$placement, $placement = _c === void 0 ? 'bottom' : _c;
|
|
@@ -29,16 +30,7 @@ export var getPseudoElementPosition = function (placement, popoverMargin) {
|
|
|
29
30
|
export var getBodyStyles = function (_a, _b) {
|
|
30
31
|
var theme = _a.theme;
|
|
31
32
|
var _c = _b.$placement, $placement = _c === void 0 ? 'bottom' : _c, _d = _b.$popoverMargin, $popoverMargin = _d === void 0 ? 0 : _d, $showArrow = _b.$showArrow, rest = __rest(_b, ["$placement", "$popoverMargin", "$showArrow"]);
|
|
32
|
-
return ({
|
|
33
|
-
backgroundColor: theme.spr.popup,
|
|
34
|
-
color: theme.spr.text01,
|
|
35
|
-
boxShadow: 'none',
|
|
36
|
-
borderTopLeftRadius: theme.popover.borderRadius,
|
|
37
|
-
borderTopRightRadius: theme.popover.borderRadius,
|
|
38
|
-
borderBottomRightRadius: theme.popover.borderRadius,
|
|
39
|
-
borderBottomLeftRadius: theme.popover.borderRadius,
|
|
40
|
-
'::before': __assign({ content: '" "', position: 'absolute' }, getPseudoElementPosition($placement, $showArrow ? $popoverMargin + ARROW_WIDTH : $popoverMargin)),
|
|
41
|
-
});
|
|
33
|
+
return (__assign(__assign({ backgroundColor: theme.spr.popup, color: theme.spr.text01, boxShadow: 'none' }, borderRadius(theme.popover.borderRadius)), { '::before': __assign({ content: '" "', position: 'absolute' }, getPseudoElementPosition($placement, $showArrow ? $popoverMargin + ARROW_WIDTH : $popoverMargin)) }));
|
|
42
34
|
};
|
|
43
35
|
export var arrowStyles = [
|
|
44
36
|
function (utils) {
|
|
@@ -57,13 +49,10 @@ export var arrowStyles = [
|
|
|
57
49
|
},
|
|
58
50
|
arrowPositionStyle,
|
|
59
51
|
];
|
|
60
|
-
export var getInnerStyles = [
|
|
52
|
+
export var getInnerStyles = [
|
|
53
|
+
'border-solid border-1 spr-popup-border spr-shadow-02 spr-text-01 spr-popup',
|
|
54
|
+
function (_a) {
|
|
61
55
|
var theme = _a.theme;
|
|
62
|
-
return ({
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
borderBottomRightRadius: theme.popover.borderRadius,
|
|
66
|
-
borderBottomLeftRadius: theme.popover.borderRadius,
|
|
67
|
-
fontFamily: theme.fontFamily.sans,
|
|
68
|
-
});
|
|
69
|
-
}];
|
|
56
|
+
return (__assign(__assign({}, borderRadius(theme.popover.borderRadius)), { fontFamily: theme.fontFamily.sans }));
|
|
57
|
+
},
|
|
58
|
+
];
|
package/esm/popover/popover.d.ts
CHANGED
|
@@ -14,5 +14,6 @@ declare const Popover: React.ForwardRefExoticComponent<Omit<import("baseui/popov
|
|
|
14
14
|
triggerType?: import("./types").TriggerType | undefined;
|
|
15
15
|
placement?: "auto" | "bottom" | "left" | "right" | "top" | "topLeft" | "topRight" | "rightTop" | "rightBottom" | "bottomRight" | "bottomLeft" | "leftBottom" | "leftTop" | undefined;
|
|
16
16
|
innerRef?: React.Ref<HTMLElement> | undefined;
|
|
17
|
+
viewportAsBoundary?: boolean | undefined;
|
|
17
18
|
} & React.RefAttributes<HTMLElement>>;
|
|
18
19
|
export default Popover;
|
package/esm/popover/popover.js
CHANGED
|
@@ -2,21 +2,25 @@ import { __assign, __read, __rest } from "tslib";
|
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import { Popover as BasePopover } from 'baseui/popover';
|
|
4
4
|
import * as React from 'react';
|
|
5
|
+
import { useMemo } from 'react';
|
|
5
6
|
import { useOverrides } from '../overrides';
|
|
6
7
|
import { useContent, useFocusLock } from './hooks';
|
|
7
8
|
import useUniqueId from '../hooks/useUniqueId';
|
|
8
9
|
import { PopoverChildEnhancer } from './PopoverEnahncer';
|
|
9
10
|
import { useConvertOverrides } from '../helpers/baseui/useConvertOverrides';
|
|
10
11
|
import { LayersManager, Z_INDEX } from '../layer';
|
|
11
|
-
import { accessibilityMap, placementMap, triggerTypeMap } from './adapter';
|
|
12
|
+
import { accessibilityMap, placementMap, rtlPlacementMap, triggerTypeMap } from './adapter';
|
|
12
13
|
import { arrowStyles, getBodyStyles, getInnerStyles } from './overrides';
|
|
13
14
|
import { StyledArrowTriangle } from './styled-components';
|
|
14
15
|
import useCombinedRefs from '../hooks/useCombinedRef';
|
|
16
|
+
import { useStyle } from '../style';
|
|
17
|
+
import { getPopperOptions } from './utils';
|
|
15
18
|
// @ts-ignore
|
|
16
19
|
BasePopover.displayName = 'BaseUIPopover';
|
|
17
20
|
var Popover = React.forwardRef(function (_a, ref) {
|
|
18
|
-
var overrides = _a.overrides, children = _a.children, _b = _a.placement, placement = _b === void 0 ? 'auto' : _b, accessibilityType = _a.accessibilityType, _c = _a.triggerType, triggerType = _c === void 0 ? 'click' : _c, _d = _a.showArrow, showArrow = _d === void 0 ? false : _d, targetElement = _a.targetElement, isOpen = _a.isOpen, _e = _a.focusLock, focusLock = _e === void 0 ? false : _e, _f = _a.returnFocus, returnFocus = _f === void 0 ? triggerType === 'click' : _f, content = _a.content, restProps = __rest(_a, ["overrides", "children", "placement", "accessibilityType", "triggerType", "showArrow", "targetElement", "isOpen", "focusLock", "returnFocus", "content"]);
|
|
21
|
+
var overrides = _a.overrides, children = _a.children, _b = _a.placement, placement = _b === void 0 ? 'auto' : _b, accessibilityType = _a.accessibilityType, _c = _a.triggerType, triggerType = _c === void 0 ? 'click' : _c, _d = _a.showArrow, showArrow = _d === void 0 ? false : _d, targetElement = _a.targetElement, isOpen = _a.isOpen, _e = _a.focusLock, focusLock = _e === void 0 ? false : _e, _f = _a.returnFocus, returnFocus = _f === void 0 ? triggerType === 'click' : _f, content = _a.content, popperOptions = _a.popperOptions, ignoreBoundary = _a.ignoreBoundary, viewportAsBoundary = _a.viewportAsBoundary, restProps = __rest(_a, ["overrides", "children", "placement", "accessibilityType", "triggerType", "showArrow", "targetElement", "isOpen", "focusLock", "returnFocus", "content", "popperOptions", "ignoreBoundary", "viewportAsBoundary"]);
|
|
19
22
|
var _g = useContent({ content: content }), setContentHost = _g.setContentHost, wrappedContent = _g.wrappedContent;
|
|
23
|
+
var isRTL = useStyle().isRTL;
|
|
20
24
|
var focusLockProps = useFocusLock({ returnFocus: returnFocus, focusLock: focusLock });
|
|
21
25
|
var _h = __read(useOverrides(overrides === null || overrides === void 0 ? void 0 : overrides.ArrowTriangle, StyledArrowTriangle), 2), ArrowTriangle = _h[0], arrowTriangleProps = _h[1];
|
|
22
26
|
var _overrides = useConvertOverrides({
|
|
@@ -25,7 +29,7 @@ var Popover = React.forwardRef(function (_a, ref) {
|
|
|
25
29
|
Inner: { style: getInnerStyles, props: { ref: setContentHost } },
|
|
26
30
|
}, overrides, [overrides, setContentHost]);
|
|
27
31
|
var mappedProps = {
|
|
28
|
-
placement: placement && placementMap[placement],
|
|
32
|
+
placement: placement && isRTL ? rtlPlacementMap[placement] : placementMap[placement],
|
|
29
33
|
accessibilityType: accessibilityType && accessibilityMap[accessibilityType],
|
|
30
34
|
triggerType: triggerType && triggerTypeMap[triggerType],
|
|
31
35
|
};
|
|
@@ -35,7 +39,8 @@ var Popover = React.forwardRef(function (_a, ref) {
|
|
|
35
39
|
childNode = children({ isOpen: isOpen });
|
|
36
40
|
}
|
|
37
41
|
var id = useUniqueId();
|
|
38
|
-
|
|
42
|
+
var mergedPopperOptions = useMemo(function () { return (__assign(__assign({}, getPopperOptions({ ignoreBoundary: ignoreBoundary, viewportAsBoundary: viewportAsBoundary })), popperOptions)); }, [popperOptions, ignoreBoundary, viewportAsBoundary]);
|
|
43
|
+
return (_jsx(LayersManager, __assign({ zIndex: Z_INDEX.POPOVER }, { children: _jsx(BasePopover, __assign({ id: id }, restProps, mappedProps, { showArrow: showArrow, isOpen: isOpen, overrides: _overrides, innerRef: combinedRef, content: wrappedContent }, focusLockProps, { popperOptions: mergedPopperOptions }, { children: _jsx(PopoverChildEnhancer, __assign({ targetElement: targetElement }, { children: childNode }), void 0) }), void 0) }), void 0));
|
|
39
44
|
});
|
|
40
45
|
Popover.displayName = 'Popover';
|
|
41
46
|
export default Popover;
|
|
@@ -4,8 +4,8 @@ import { StatefulContainer } from 'baseui/popover';
|
|
|
4
4
|
import Popover from './popover';
|
|
5
5
|
import { ON_MOUSE_LEAVE_DELAY } from './constants';
|
|
6
6
|
function StatefulPopover(props) {
|
|
7
|
-
var children = props.children, _a = props.overrides, overrides = _a === void 0 ? {} : _a, restProps = __rest(props, ["children", "overrides"]);
|
|
8
|
-
return (_jsx(StatefulContainer, __assign({}, restProps, { children: function (popoverProps) { return (_jsx(Popover, __assign({}, popoverProps, { overrides: overrides }, { children: children }), void 0)); } }), void 0));
|
|
7
|
+
var children = props.children, _a = props.overrides, overrides = _a === void 0 ? {} : _a, targetElement = props.targetElement, viewportAsBoundary = props.viewportAsBoundary, restProps = __rest(props, ["children", "overrides", "targetElement", "viewportAsBoundary"]);
|
|
8
|
+
return (_jsx(StatefulContainer, __assign({}, restProps, { children: function (popoverProps) { return (_jsx(Popover, __assign({}, popoverProps, { overrides: overrides, targetElement: targetElement, viewportAsBoundary: viewportAsBoundary }, { children: children }), void 0)); } }), void 0));
|
|
9
9
|
}
|
|
10
10
|
StatefulPopover.defaultProps = {
|
|
11
11
|
accessibilityType: 'menu',
|
package/esm/popover/types.d.ts
CHANGED
|
@@ -15,6 +15,7 @@ export declare type PopoverProps = Omit<BasePopoverProps, 'overrides' | 'childre
|
|
|
15
15
|
triggerType?: TriggerType;
|
|
16
16
|
placement?: TetherPlacement;
|
|
17
17
|
innerRef?: React.Ref<HTMLElement>;
|
|
18
|
+
viewportAsBoundary?: boolean;
|
|
18
19
|
};
|
|
19
20
|
export declare type StatefulPopoverProps = Omit<BaseStatefulPopoverProps, 'overrides' | 'children'> & {
|
|
20
21
|
overrides?: {
|
|
@@ -23,6 +24,8 @@ export declare type StatefulPopoverProps = Omit<BaseStatefulPopoverProps, 'overr
|
|
|
23
24
|
children?: React.ReactNode | ((args: {
|
|
24
25
|
isOpen: boolean;
|
|
25
26
|
}) => React.ReactNode);
|
|
27
|
+
targetElement?: HTMLElement | null;
|
|
28
|
+
viewportAsBoundary?: boolean;
|
|
26
29
|
};
|
|
27
30
|
export declare type StatefulPopoverContainerProps = Omit<BaseStatefulPopoverContainerProps, 'overrides'> & {
|
|
28
31
|
overrides?: {
|
package/esm/popover/utils.d.ts
CHANGED
|
@@ -12,3 +12,15 @@ export declare function splitPlacement(placement: Placement): string[];
|
|
|
12
12
|
* left -> right
|
|
13
13
|
*/
|
|
14
14
|
export declare function getOppositePosition(position: string): string;
|
|
15
|
+
export declare const getPopperOptions: ({ ignoreBoundary, viewportAsBoundary, }: {
|
|
16
|
+
ignoreBoundary?: boolean | undefined;
|
|
17
|
+
viewportAsBoundary?: boolean | undefined;
|
|
18
|
+
}) => {
|
|
19
|
+
modifiers: {
|
|
20
|
+
preventOverflow: {
|
|
21
|
+
boundariesElement?: string | undefined;
|
|
22
|
+
enabled: boolean;
|
|
23
|
+
padding: number;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
};
|
package/esm/popover/utils.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { __assign } from "tslib";
|
|
1
2
|
/**
|
|
2
3
|
* Splits something like 'topLeft' to ['top', 'left'] for easier usage
|
|
3
4
|
* https://github.com/uber/baseweb/blob/master/src/popover/utils.js#L58
|
|
@@ -25,3 +26,11 @@ var OPPOSITE_POSITIONS = {
|
|
|
25
26
|
export function getOppositePosition(position) {
|
|
26
27
|
return OPPOSITE_POSITIONS[position];
|
|
27
28
|
}
|
|
29
|
+
export var getPopperOptions = function (_a) {
|
|
30
|
+
var ignoreBoundary = _a.ignoreBoundary, viewportAsBoundary = _a.viewportAsBoundary;
|
|
31
|
+
return ({
|
|
32
|
+
modifiers: {
|
|
33
|
+
preventOverflow: __assign({ enabled: !ignoreBoundary, padding: 0 }, (viewportAsBoundary && { boundariesElement: 'viewport' })),
|
|
34
|
+
},
|
|
35
|
+
});
|
|
36
|
+
};
|
|
@@ -8,7 +8,7 @@ export declare const StyledRoot: import("../../style/styled").StyledComponent;
|
|
|
8
8
|
export declare const StyledBar: import("../../style/styled").StyledComponent;
|
|
9
9
|
export declare const StyledProgress: import("../../style/styled").StyledComponent;
|
|
10
10
|
export declare const StyledLabel: import("../../style/styled").StyledComponent;
|
|
11
|
-
export declare const progressSegmentStyles: ({
|
|
11
|
+
export declare const progressSegmentStyles: ({ isRTL }: StyleUtils, { $first, $last }: {
|
|
12
12
|
$first: any;
|
|
13
13
|
$last: any;
|
|
14
14
|
}) => string[];
|
|
@@ -20,10 +20,10 @@ export var StyledBar = styled('div', 'w-full relative overflow-hidden flex', fun
|
|
|
20
20
|
});
|
|
21
21
|
export var StyledProgress = styled(BaseProgress, 'h-full', function (_a, _b) {
|
|
22
22
|
var _c, _d, _e;
|
|
23
|
-
var theme = _a.theme,
|
|
23
|
+
var theme = _a.theme, isRTL = _a.isRTL;
|
|
24
24
|
var $color = _b.$color, $intent = _b.$intent, $value = _b.$value, $infinite = _b.$infinite;
|
|
25
|
-
var progressStart =
|
|
26
|
-
var progressEnd =
|
|
25
|
+
var progressStart = isRTL ? 'right' : 'left';
|
|
26
|
+
var progressEnd = isRTL ? 'left' : 'right';
|
|
27
27
|
return __assign(__assign(__assign({ backgroundColor: $color || getIntentColor($intent, theme), willChange: 'width' }, borderRadius('3px')), { transitionProperty: 'width', transitionTimingFunction: 'ease', transitionDuration: '400ms' }), ($infinite && {
|
|
28
28
|
width: '100%',
|
|
29
29
|
position: 'absolute',
|
|
@@ -48,10 +48,10 @@ export var StyledProgress = styled(BaseProgress, 'h-full', function (_a, _b) {
|
|
|
48
48
|
});
|
|
49
49
|
export var StyledLabel = styled('div', 'spr-text-02 mt-3 typography-l2', { fontVariantNumeric: 'tabular-nums' });
|
|
50
50
|
export var progressSegmentStyles = function (_a, _b) {
|
|
51
|
-
var
|
|
51
|
+
var isRTL = _a.isRTL;
|
|
52
52
|
var $first = _b.$first, $last = _b.$last;
|
|
53
53
|
var style = [];
|
|
54
|
-
if (
|
|
54
|
+
if (isRTL) {
|
|
55
55
|
if (!$first)
|
|
56
56
|
style.push('rounded-r-0');
|
|
57
57
|
if (!$last)
|
|
@@ -71,7 +71,7 @@ export var getRadioMarkOuterStyles = function (utils, props) {
|
|
|
71
71
|
};
|
|
72
72
|
export var getRadioLabelStyles = function (_a, _b) {
|
|
73
73
|
var _c;
|
|
74
|
-
var
|
|
74
|
+
var px2rem = _a.px2rem;
|
|
75
75
|
var $labelPosition = _b.$labelPosition, $size = _b.$size;
|
|
76
76
|
var paddingDirection;
|
|
77
77
|
switch ($labelPosition) {
|
|
@@ -82,11 +82,11 @@ export var getRadioLabelStyles = function (_a, _b) {
|
|
|
82
82
|
paddingDirection = 'Top';
|
|
83
83
|
break;
|
|
84
84
|
case 'left':
|
|
85
|
-
paddingDirection =
|
|
85
|
+
paddingDirection = 'Right';
|
|
86
86
|
break;
|
|
87
87
|
default:
|
|
88
88
|
case 'right':
|
|
89
|
-
paddingDirection =
|
|
89
|
+
paddingDirection = 'Left';
|
|
90
90
|
break;
|
|
91
91
|
}
|
|
92
92
|
var styles = (_c = {
|
|
@@ -111,10 +111,10 @@ export var getRadioLabelStyles = function (_a, _b) {
|
|
|
111
111
|
};
|
|
112
112
|
export var getRootStyles = function (_a, _b) {
|
|
113
113
|
var _c;
|
|
114
|
-
var
|
|
114
|
+
var px2rem = _a.px2rem;
|
|
115
115
|
var $align = _b.$align, $hasDescription = _b.$hasDescription, $size = _b.$size;
|
|
116
116
|
var isHorizontal = $align === 'horizontal';
|
|
117
|
-
var directionMargin =
|
|
117
|
+
var directionMargin = 'Right';
|
|
118
118
|
var styles = (_c = {},
|
|
119
119
|
_c["margin".concat(directionMargin)] = isHorizontal ? px2rem(30) : undefined,
|
|
120
120
|
_c.marginTop = '0px',
|
package/esm/search/index.d.ts
CHANGED
package/esm/search/index.js
CHANGED
package/esm/search/search.d.ts
CHANGED
|
@@ -3,6 +3,6 @@ import { IconButtonProps } from '../button/IconButton';
|
|
|
3
3
|
import { SearchProps } from './types';
|
|
4
4
|
export declare const ClearIconButton: ({ overrides, ...props }: IconButtonProps) => ReactElement;
|
|
5
5
|
export declare const Search: {
|
|
6
|
-
({ size, debounceInterval, placeholder, overrides, className, style, variant, ...props }: SearchProps): ReactElement;
|
|
6
|
+
({ size: _size, debounceInterval, placeholder, overrides, className, style, variant, ...props }: SearchProps): ReactElement;
|
|
7
7
|
displayName: string;
|
|
8
8
|
};
|
package/esm/search/search.js
CHANGED
|
@@ -10,7 +10,10 @@ import ClearIcon from '../icon/components/close';
|
|
|
10
10
|
import DefaultSearchIcon from '../icon/components/search';
|
|
11
11
|
import { Input } from '../input';
|
|
12
12
|
import { mergeOverrides, useOverrides } from '../overrides';
|
|
13
|
-
import { getInputContainerStyles, getRootStyles,
|
|
13
|
+
import { getInputContainerStyles, getRootStyles, getSearchSizeTheme } from './styled-components';
|
|
14
|
+
import { useLocale } from '../locale';
|
|
15
|
+
import { useStyle } from '../style';
|
|
16
|
+
import { getDefaultSize } from '../helpers/themeHelpers';
|
|
14
17
|
var SearchIconContainer = function (_a) {
|
|
15
18
|
var _b;
|
|
16
19
|
var size = _a.size, marginX = _a.marginX, className = _a.className, overrides = _a.overrides, props = __rest(_a, ["size", "marginX", "className", "overrides"]);
|
|
@@ -37,8 +40,14 @@ export var ClearIconButton = function (_a) {
|
|
|
37
40
|
return (_jsx(IconButton, __assign({}, props, { overrides: mergedOverrides }, { children: _jsx(ClearIcon, { "data-testid": "search-clear", size: 10 }, void 0) }), void 0));
|
|
38
41
|
};
|
|
39
42
|
export var Search = function (_a) {
|
|
40
|
-
var
|
|
41
|
-
var
|
|
43
|
+
var _size = _a.size, _b = _a.debounceInterval, debounceInterval = _b === void 0 ? 200 : _b, placeholder = _a.placeholder, overrides = _a.overrides, className = _a.className, style = _a.style, _c = _a.variant, variant = _c === void 0 ? 'default' : _c, props = __rest(_a, ["size", "debounceInterval", "placeholder", "overrides", "className", "style", "variant"]);
|
|
44
|
+
var theme = useStyle().theme;
|
|
45
|
+
var size = _size !== null && _size !== void 0 ? _size : getDefaultSize(theme);
|
|
46
|
+
var searchIconMarginX = getSearchSizeTheme(theme, size, 'searchIconMarginX');
|
|
47
|
+
var searchIconSize = getSearchSizeTheme(theme, size, 'iconSize');
|
|
48
|
+
var fontSize = getSearchSizeTheme(theme, size, 'fontSize');
|
|
49
|
+
var lineHeight = getSearchSizeTheme(theme, size, 'lineHeight');
|
|
50
|
+
var locale = useLocale();
|
|
42
51
|
var mergedOverrides = React.useMemo(function () {
|
|
43
52
|
var sharedProps = add$props({ size: size, variant: variant });
|
|
44
53
|
return mergeOverrides({
|
|
@@ -51,7 +60,7 @@ export var Search = function (_a) {
|
|
|
51
60
|
props: sharedProps,
|
|
52
61
|
},
|
|
53
62
|
Input: {
|
|
54
|
-
style: ['px-0 py-0', { fontSize: fontSize, lineHeight:
|
|
63
|
+
style: ['px-0 py-0', { fontSize: fontSize, lineHeight: lineHeight !== null && lineHeight !== void 0 ? lineHeight : '18px' }],
|
|
55
64
|
props: sharedProps,
|
|
56
65
|
},
|
|
57
66
|
Before: {
|
|
@@ -60,7 +69,7 @@ export var Search = function (_a) {
|
|
|
60
69
|
},
|
|
61
70
|
ClearIcon: ClearIconButton,
|
|
62
71
|
}, overrides);
|
|
63
|
-
}, [overrides, size, className, style, variant, fontSize, searchIconSize, searchIconMarginX]);
|
|
64
|
-
return (_jsx(Input, __assign({ "data-spaceweb": "Search", placeholder: placeholder, overrides: mergedOverrides, debounceInterval: debounceInterval }, props), void 0));
|
|
72
|
+
}, [overrides, size, className, style, variant, fontSize, searchIconSize, searchIconMarginX, lineHeight]);
|
|
73
|
+
return (_jsx(Input, __assign({ "data-spaceweb": "Search", placeholder: placeholder !== null && placeholder !== void 0 ? placeholder : locale.search.searchPlaceholder, overrides: mergedOverrides, debounceInterval: debounceInterval }, props), void 0));
|
|
65
74
|
};
|
|
66
75
|
Search.displayName = 'Search';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { __assign, __read, __rest } from "tslib";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useCallback, useState } from 'react';
|
|
4
|
+
import { Search } from './search';
|
|
5
|
+
export var StatefulSearch = function (_a) {
|
|
6
|
+
var initialState = _a.initialState, onChange = _a.onChange, restProps = __rest(_a, ["initialState", "onChange"]);
|
|
7
|
+
var _b = __read(useState(initialState), 2), query = _b[0], setQuery = _b[1];
|
|
8
|
+
var handleChange = useCallback(function (e) {
|
|
9
|
+
setQuery(e.target.value);
|
|
10
|
+
if (onChange) {
|
|
11
|
+
onChange(e);
|
|
12
|
+
}
|
|
13
|
+
}, [onChange]);
|
|
14
|
+
return _jsx(Search, __assign({ value: query, onChange: handleChange }, restProps), void 0);
|
|
15
|
+
};
|
|
@@ -1,13 +1,4 @@
|
|
|
1
1
|
import { Styles } from '../types';
|
|
2
|
-
|
|
3
|
-
declare type SizeStyle = {
|
|
4
|
-
paddingX: string;
|
|
5
|
-
searchIconMarginX: string;
|
|
6
|
-
height: string;
|
|
7
|
-
fontSize: string;
|
|
8
|
-
iconSize: number;
|
|
9
|
-
};
|
|
10
|
-
export declare const SIZES_STYLES_MAP: Record<Size, SizeStyle>;
|
|
2
|
+
export declare const getSearchSizeTheme: (theme: any, size: any, prop: any) => any;
|
|
11
3
|
export declare const getInputContainerStyles: Styles;
|
|
12
4
|
export declare const getRootStyles: Styles;
|
|
13
|
-
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { __assign } from "tslib";
|
|
2
2
|
import { borderColor as borderColorLongHand, borderRadius, borderStyle, borderWidth } from '../helpers/longHandHelpers';
|
|
3
|
+
import { getComponentSizeTheme, getDefaultSize } from '../helpers/themeHelpers';
|
|
3
4
|
var VARIANTS_TOKENS_MAP = {
|
|
4
5
|
default: {
|
|
5
6
|
backgroundColor: 'ui02',
|
|
@@ -12,36 +13,66 @@ var VARIANTS_TOKENS_MAP = {
|
|
|
12
13
|
disabledBackgroundColor: 'ui02',
|
|
13
14
|
hoverBorderColor: 'border06',
|
|
14
15
|
focusBorderColor: 'interactive01',
|
|
16
|
+
borderColor: 'border03',
|
|
15
17
|
},
|
|
16
18
|
};
|
|
17
19
|
var getSearchComponentTokens = function (variant) { var _a; return (_a = VARIANTS_TOKENS_MAP[variant !== null && variant !== void 0 ? variant : 'default']) !== null && _a !== void 0 ? _a : {}; };
|
|
18
|
-
|
|
20
|
+
var SIZES_STYLES_MAP = {
|
|
21
|
+
xxxs: {
|
|
22
|
+
paddingX: '2px',
|
|
23
|
+
searchIconMarginX: '4px',
|
|
24
|
+
height: '24px',
|
|
25
|
+
fontSize: '13px',
|
|
26
|
+
iconSize: 10,
|
|
27
|
+
borderRadius: '5px',
|
|
28
|
+
lineHeight: '16px',
|
|
29
|
+
},
|
|
30
|
+
xxs: {
|
|
31
|
+
paddingX: '5px',
|
|
32
|
+
searchIconMarginX: '4px',
|
|
33
|
+
height: '28px',
|
|
34
|
+
fontSize: '14px',
|
|
35
|
+
iconSize: 10,
|
|
36
|
+
borderRadius: '6px',
|
|
37
|
+
},
|
|
38
|
+
xs: {
|
|
39
|
+
paddingX: '5px',
|
|
40
|
+
searchIconMarginX: '5px',
|
|
41
|
+
height: '32px',
|
|
42
|
+
fontSize: '14px',
|
|
43
|
+
iconSize: 12,
|
|
44
|
+
borderRadius: '7px',
|
|
45
|
+
},
|
|
19
46
|
sm: {
|
|
20
|
-
paddingX: '
|
|
21
|
-
searchIconMarginX: '
|
|
22
|
-
height: '
|
|
47
|
+
paddingX: '6px',
|
|
48
|
+
searchIconMarginX: '7px',
|
|
49
|
+
height: '36px',
|
|
23
50
|
fontSize: '14px',
|
|
24
|
-
iconSize:
|
|
51
|
+
iconSize: 12,
|
|
52
|
+
borderRadius: '8px',
|
|
25
53
|
},
|
|
26
54
|
md: {
|
|
27
|
-
paddingX: '
|
|
28
|
-
searchIconMarginX: '
|
|
55
|
+
paddingX: '6px',
|
|
56
|
+
searchIconMarginX: '7px',
|
|
29
57
|
height: '40px',
|
|
30
|
-
fontSize: '
|
|
31
|
-
iconSize:
|
|
58
|
+
fontSize: '14px',
|
|
59
|
+
iconSize: 12,
|
|
60
|
+
borderRadius: '8px',
|
|
32
61
|
},
|
|
33
62
|
lg: {
|
|
34
|
-
paddingX: '
|
|
35
|
-
searchIconMarginX: '
|
|
36
|
-
height: '
|
|
37
|
-
fontSize: '
|
|
38
|
-
iconSize:
|
|
63
|
+
paddingX: '6px',
|
|
64
|
+
searchIconMarginX: '7px',
|
|
65
|
+
height: '40px',
|
|
66
|
+
fontSize: '14px',
|
|
67
|
+
iconSize: 12,
|
|
68
|
+
borderRadius: '8px',
|
|
39
69
|
},
|
|
40
70
|
};
|
|
71
|
+
export var getSearchSizeTheme = function (theme, size, prop) { var _a; return ((_a = getComponentSizeTheme(theme, 'search', size, getDefaultSize(theme))) === null || _a === void 0 ? void 0 : _a[prop]) || SIZES_STYLES_MAP[size][prop]; };
|
|
41
72
|
var rootBackgroundColor = function (_a, _b) {
|
|
42
73
|
var theme = _a.theme;
|
|
43
74
|
var $isFocused = _b.$isFocused, $disabled = _b.$disabled, _c = _b.$variant, $variant = _c === void 0 ? 'default' : _c;
|
|
44
|
-
var _d = getSearchComponentTokens($variant), backgroundColor = _d.backgroundColor, disabledBackgroundColor = _d.disabledBackgroundColor;
|
|
75
|
+
var _d = getSearchComponentTokens($variant), backgroundColor = _d.backgroundColor, disabledBackgroundColor = _d.disabledBackgroundColor, borderColor = _d.borderColor;
|
|
45
76
|
return {
|
|
46
77
|
backgroundColor: $disabled ? theme.spr[disabledBackgroundColor] : theme.spr[backgroundColor],
|
|
47
78
|
};
|
|
@@ -49,14 +80,14 @@ var rootBackgroundColor = function (_a, _b) {
|
|
|
49
80
|
var rootBorderColor = function (utils, props) {
|
|
50
81
|
var theme = utils.theme;
|
|
51
82
|
var $isFocused = props.$isFocused, $disabled = props.$disabled, $variant = props.$variant;
|
|
52
|
-
var _a = getSearchComponentTokens($variant), hoverBorderColor = _a.hoverBorderColor, focusBorderColor = _a.focusBorderColor;
|
|
83
|
+
var _a = getSearchComponentTokens($variant), hoverBorderColor = _a.hoverBorderColor, focusBorderColor = _a.focusBorderColor, borderColor = _a.borderColor;
|
|
53
84
|
if ($disabled) {
|
|
54
85
|
return borderColorLongHand(theme.input.disabledBorderColor);
|
|
55
86
|
}
|
|
56
87
|
if ($isFocused) {
|
|
57
88
|
return borderColorLongHand(theme.spr[focusBorderColor]);
|
|
58
89
|
}
|
|
59
|
-
return __assign(__assign({}, borderColorLongHand('transparent')), { ':hover': borderColorLongHand(theme.spr[hoverBorderColor]) });
|
|
90
|
+
return __assign(__assign({}, borderColorLongHand(borderColor ? theme.spr[borderColor] : 'transparent')), { ':hover': borderColorLongHand(theme.spr[hoverBorderColor]) });
|
|
60
91
|
};
|
|
61
92
|
export var getInputContainerStyles = __assign(__assign(__assign(__assign({ outline: 'none', boxSizing: 'border-box' }, borderColorLongHand('transparent')), { backgroundColor: 'transparent', ':hover': { backgroundColor: 'transparent' } }), borderStyle('none')), borderRadius('0'));
|
|
62
93
|
export var getRootStyles = [
|
|
@@ -64,14 +95,13 @@ export var getRootStyles = [
|
|
|
64
95
|
borderWidth('1px'),
|
|
65
96
|
rootBorderColor,
|
|
66
97
|
rootBackgroundColor,
|
|
67
|
-
function (_a) {
|
|
98
|
+
function (_a, _b) {
|
|
68
99
|
var theme = _a.theme;
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
var
|
|
73
|
-
|
|
74
|
-
return { height: height, paddingLeft: paddingX, paddingRight: paddingX };
|
|
100
|
+
var $size = _b.$size;
|
|
101
|
+
var paddingX = getSearchSizeTheme(theme, $size, 'paddingX');
|
|
102
|
+
var height = getSearchSizeTheme(theme, $size, 'height');
|
|
103
|
+
var _borderRadius = getSearchSizeTheme(theme, $size, 'borderRadius');
|
|
104
|
+
return __assign({ height: height, paddingLeft: paddingX, paddingRight: paddingX }, borderRadius(_borderRadius));
|
|
75
105
|
},
|
|
76
106
|
{ outline: 'none', boxSizing: 'border-box' },
|
|
77
107
|
];
|
package/esm/search/types.d.ts
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { InputProps, SharedProps as InputSharedProps } from '../input/types';
|
|
2
2
|
import { Override } from '../overrides';
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* lg size is deprecated. Please use md.
|
|
5
|
+
*/
|
|
6
|
+
export declare type Size = 'xxxs' | 'xxs' | 'xs' | 'sm' | 'md' | 'lg';
|
|
4
7
|
export declare type Variant = 'default' | 'light';
|
|
5
|
-
export declare type SearchProps = Omit<InputProps, 'size | type' | 'required' | 'variant' | 'intent' | 'startEnhancer' | 'endEnhancer'> & {
|
|
8
|
+
export declare type SearchProps = Omit<InputProps, 'size' | 'type' | 'required' | 'variant' | 'intent' | 'startEnhancer' | 'endEnhancer'> & {
|
|
6
9
|
size?: Size;
|
|
7
10
|
bordered?: boolean;
|
|
8
11
|
debounceInterval?: number;
|
|
@@ -17,3 +20,6 @@ export declare type SharedProps = Omit<InputSharedProps, '$size'> & {
|
|
|
17
20
|
$bordered: boolean;
|
|
18
21
|
$variant: Variant;
|
|
19
22
|
};
|
|
23
|
+
export declare type StatefulSearchProps = Omit<SearchProps, 'value'> & {
|
|
24
|
+
initialState?: string;
|
|
25
|
+
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="lodash" />
|
|
1
2
|
import type { OnChangeParams as BaseOnChangeParams } from 'baseui/select';
|
|
2
3
|
import { Component } from 'react';
|
|
3
4
|
import * as React from 'react';
|
|
@@ -6,7 +7,7 @@ import { Overrides } from '../overrides';
|
|
|
6
7
|
import defaultProps from './default-props';
|
|
7
8
|
import { BaseSelectProps, Option, Options, Value } from './types';
|
|
8
9
|
declare class BaseSelect extends Component<BaseSelectProps & typeof defaultProps, {
|
|
9
|
-
|
|
10
|
+
isContainerFocused: boolean;
|
|
10
11
|
}> {
|
|
11
12
|
static defaultProps: {
|
|
12
13
|
autoFocus: boolean;
|
|
@@ -46,20 +47,36 @@ declare class BaseSelect extends Component<BaseSelectProps & typeof defaultProps
|
|
|
46
47
|
valueKey: string;
|
|
47
48
|
placement: "auto" | "bottom" | "left" | "right" | "top" | "topLeft" | "topRight" | "rightTop" | "rightBottom" | "bottomRight" | "bottomLeft" | "leftBottom" | "leftTop" | undefined;
|
|
48
49
|
virtual: boolean;
|
|
50
|
+
popoverMinWidth: string;
|
|
49
51
|
};
|
|
52
|
+
state: {
|
|
53
|
+
isContainerFocused: boolean;
|
|
54
|
+
};
|
|
55
|
+
lastSelectedValue: Value;
|
|
50
56
|
id: string;
|
|
51
57
|
menuId: string;
|
|
52
58
|
createdOptions: Options | undefined;
|
|
59
|
+
getMemoizedNormalizedOptions: (valueKey: string, options1?: Options, options2?: Options) => Value;
|
|
60
|
+
getValueByIdMap: (value: Value, valueKey: string) => import("lodash").Dictionary<Readonly<{
|
|
61
|
+
[x: string]: any;
|
|
62
|
+
id?: string | number | undefined;
|
|
63
|
+
label?: React.ReactNode;
|
|
64
|
+
disabled?: boolean | undefined;
|
|
65
|
+
clearableValue?: boolean | undefined;
|
|
66
|
+
isCreatable?: boolean | undefined;
|
|
67
|
+
__optgroup?: string | undefined;
|
|
68
|
+
}>>;
|
|
53
69
|
shouldDisplaySelectAll: () => boolean;
|
|
54
|
-
|
|
55
|
-
isSelectAllChecked: (value: Value, options?: Options) => boolean;
|
|
70
|
+
isSelectAllChecked: (value: Value, options?: Options) => boolean | undefined;
|
|
56
71
|
getSelectOverrides: () => Overrides<any>;
|
|
57
|
-
|
|
58
|
-
|
|
72
|
+
getOptions: (locale: Locale, createdOptions: Options | undefined, options?: Options, shouldPrependClearOption?: boolean | undefined) => Value;
|
|
73
|
+
defaultCreateOption: (label: String) => Options;
|
|
59
74
|
getCreatedOptions: (option: Option) => Promise<Options>;
|
|
60
75
|
getCreatedValues: (options: Options) => Options;
|
|
76
|
+
handleBlur: (e: React.FocusEvent | MouseEvent) => void;
|
|
61
77
|
handleChange: (params: BaseOnChangeParams) => Promise<void>;
|
|
62
78
|
handlePaste: (e: React.ClipboardEvent) => void;
|
|
79
|
+
handleInputChange: (e: React.ChangeEvent<HTMLInputElement>) => Promise<void>;
|
|
63
80
|
inputRef: React.RefObject<HTMLInputElement>;
|
|
64
81
|
render(): React.ReactElement;
|
|
65
82
|
}
|