@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
|
@@ -54,6 +54,56 @@ var getEdgeDayBeforeStyle = function (code, firstChild, peekNextMonth) {
|
|
|
54
54
|
'101010010000010': !peekNextMonth && firstChild ? { content: 'none' } : pseudoSelectedStyle,
|
|
55
55
|
}[code] || {});
|
|
56
56
|
};
|
|
57
|
+
function generateDayStyles(defaultCode, defaultStyle) {
|
|
58
|
+
var _a;
|
|
59
|
+
var codeForSM = "".concat(defaultCode.substr(0, 12), "1").concat(defaultCode.substr(12 + 1));
|
|
60
|
+
var codeForEM = "".concat(defaultCode.substr(0, 13), "1").concat(defaultCode.substr(13 + 1));
|
|
61
|
+
return _a = {},
|
|
62
|
+
_a[defaultCode] = defaultStyle,
|
|
63
|
+
_a[codeForSM] = defaultStyle,
|
|
64
|
+
_a[codeForEM] = defaultStyle,
|
|
65
|
+
_a;
|
|
66
|
+
}
|
|
67
|
+
var getTempRTLAdaptedStyles = function (code) {
|
|
68
|
+
var dayStyles = (0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)({}, generateDayStyles('100110100000000', {
|
|
69
|
+
':before': {
|
|
70
|
+
right: '0%',
|
|
71
|
+
left: '0%',
|
|
72
|
+
},
|
|
73
|
+
})), generateDayStyles('100100001001000', {
|
|
74
|
+
':before': {
|
|
75
|
+
right: '50%',
|
|
76
|
+
left: '0%',
|
|
77
|
+
},
|
|
78
|
+
})), generateDayStyles('101000001010000', {
|
|
79
|
+
':before': {
|
|
80
|
+
right: '50%',
|
|
81
|
+
left: '0%',
|
|
82
|
+
},
|
|
83
|
+
})), generateDayStyles('101110100000000', {
|
|
84
|
+
':before': {
|
|
85
|
+
right: '50%',
|
|
86
|
+
left: '0%',
|
|
87
|
+
},
|
|
88
|
+
})), generateDayStyles('101111000000000', {
|
|
89
|
+
':before': {
|
|
90
|
+
left: '50%',
|
|
91
|
+
},
|
|
92
|
+
})), generateDayStyles('100111000000000', {
|
|
93
|
+
':before': {
|
|
94
|
+
left: '50%',
|
|
95
|
+
},
|
|
96
|
+
})), generateDayStyles('101000001001000', {
|
|
97
|
+
':before': {
|
|
98
|
+
left: '50%',
|
|
99
|
+
},
|
|
100
|
+
})), generateDayStyles('100100001010000', {
|
|
101
|
+
':before': {
|
|
102
|
+
left: '50%',
|
|
103
|
+
},
|
|
104
|
+
}));
|
|
105
|
+
return dayStyles[code] || {};
|
|
106
|
+
};
|
|
57
107
|
var getDayStyles = function (todaySOD) { return [
|
|
58
108
|
'text-12 leading-8 w-9',
|
|
59
109
|
function (_a, props) {
|
|
@@ -76,7 +126,7 @@ var getDayStyles = function (todaySOD) { return [
|
|
|
76
126
|
!$isHovered &&
|
|
77
127
|
!$hasRangeHighlighted && {
|
|
78
128
|
backgroundColor: 'transparent',
|
|
79
|
-
})), { backgroundColor: backgroundColor, height: '100%', top: 0 }), ':before': (0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)({ borderTopWidth: '0px', borderBottomWidth: '0px', borderLeftWidth: '0px', borderRightWidth: '0px' }, ($outsideMonthWithinRange ? { content: '' } : {})), ($startOfMonth
|
|
129
|
+
})), { backgroundColor: backgroundColor, height: '100%', top: 0 }), ':before': (0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)({ borderTopWidth: '0px', borderBottomWidth: '0px', borderLeftWidth: '0px', borderRightWidth: '0px' }, ($outsideMonthWithinRange ? { content: '' } : {})), ($startOfMonth
|
|
80
130
|
? {
|
|
81
131
|
borderTopLeftRadius: '100%',
|
|
82
132
|
borderBottomLeftRadius: '100%',
|
|
@@ -86,7 +136,7 @@ var getDayStyles = function (todaySOD) { return [
|
|
|
86
136
|
borderTopRightRadius: '100%',
|
|
87
137
|
borderBottomRightRadius: '100%',
|
|
88
138
|
}
|
|
89
|
-
: {})), ($outsideMonth ? { backgroundColor: 'transparent' } : {})), ':first-child': (0, tslib_1.__assign)({}, ($range
|
|
139
|
+
: {})), ($outsideMonth ? { backgroundColor: 'transparent' } : {})), (getTempRTLAdaptedStyles(code)[':before'] || {})), ':first-child': (0, tslib_1.__assign)({}, ($range
|
|
90
140
|
? {
|
|
91
141
|
':before': (0, tslib_1.__assign)({}, getEdgeDayBeforeStyle(code, true, props.$peekNextMonth)),
|
|
92
142
|
}
|
|
@@ -97,7 +147,7 @@ var getDayStyles = function (todaySOD) { return [
|
|
|
97
147
|
: {})) }, (date_fns_adapter_1.default.isEqual($date, todaySOD) &&
|
|
98
148
|
!$selected && {
|
|
99
149
|
color: theme.spr.text04,
|
|
100
|
-
})), ($outsideMonth && { color: theme.spr.text03 }));
|
|
150
|
+
})), ($outsideMonth && { color: $selected ? theme.spr.text05 : theme.spr.text03 }));
|
|
101
151
|
},
|
|
102
152
|
]; };
|
|
103
153
|
exports.getDayStyles = getDayStyles;
|
package/date-picker/types.d.ts
CHANGED
|
@@ -19,6 +19,7 @@ export declare type DateTimeSelectSharedProps = {
|
|
|
19
19
|
export declare type DatepickerOverrides<T = SharedStyleProps> = {
|
|
20
20
|
CalendarContainer?: Override<T>;
|
|
21
21
|
CalendarHeader?: Override<T>;
|
|
22
|
+
Calendar?: Override<CalendarProps & Record<string, any>>;
|
|
22
23
|
Day?: Override<T>;
|
|
23
24
|
Input?: Override<T>;
|
|
24
25
|
InputWrapper?: Override<T>;
|
|
@@ -43,7 +44,11 @@ export declare type DatepickerOverrides<T = SharedStyleProps> = {
|
|
|
43
44
|
Footer?: Override<T>;
|
|
44
45
|
DateTimeSelect?: Override<DateTimeSelectSharedProps>;
|
|
45
46
|
};
|
|
47
|
+
export declare type Nullable<T> = T | null | undefined;
|
|
46
48
|
export declare type StatelessDatePickerProps = Omit<BaseDatepickerProps, 'timeSelectStart' | 'timeSelectEnd' | 'value' | 'onChange' | 'quickSelect' | 'quickSelectOptions' | 'size' | 'overrides' | 'onDayClick' | 'onDayMouseOver' | 'onDayMouseLeave' | 'onMonthChange' | 'onYearChange' | 'formatString' | 'peekNextMonth' | 'fixedHeight'> & {
|
|
49
|
+
id?: string;
|
|
50
|
+
showTimezone?: boolean;
|
|
51
|
+
timezone?: string;
|
|
47
52
|
intent?: Intent;
|
|
48
53
|
timeSelect?: boolean;
|
|
49
54
|
onBlur?: () => void;
|
|
@@ -53,7 +58,8 @@ export declare type StatelessDatePickerProps = Omit<BaseDatepickerProps, 'timeSe
|
|
|
53
58
|
variant?: InputVariant;
|
|
54
59
|
value: Date | Date[] | undefined;
|
|
55
60
|
onChange?: (data: {
|
|
56
|
-
value?:
|
|
61
|
+
value?: Nullable<Date>[] | Nullable<Date>;
|
|
62
|
+
timezone?: string;
|
|
57
63
|
}) => any;
|
|
58
64
|
size?: InputSize;
|
|
59
65
|
overrides?: DatepickerOverrides;
|
|
@@ -75,8 +81,11 @@ export declare type StatefulContainerProps = {
|
|
|
75
81
|
value?: Date;
|
|
76
82
|
onChange?: (data: {
|
|
77
83
|
value?: Date | undefined | null;
|
|
84
|
+
timezone?: string;
|
|
78
85
|
}) => any;
|
|
79
86
|
startOpen?: boolean;
|
|
87
|
+
showTimezone?: boolean;
|
|
88
|
+
timezone?: string;
|
|
80
89
|
};
|
|
81
90
|
export declare type DatePickerProps = Omit<StatelessDatePickerProps, 'value' | 'range'> & Omit<StatefulContainerProps, 'children'>;
|
|
82
91
|
export declare type DatePickerSharedProps = SharedStylePropsT;
|
package/date-picker/utils.d.ts
CHANGED
|
@@ -5,9 +5,11 @@ interface FormatDateParams {
|
|
|
5
5
|
formatString?: string;
|
|
6
6
|
locale: any;
|
|
7
7
|
dateHelpers?: DateHelpers<Date>;
|
|
8
|
+
timezone?: string;
|
|
9
|
+
showTimezone?: boolean;
|
|
8
10
|
}
|
|
9
11
|
export declare const normalizeDashes: (formatString: string) => string;
|
|
10
|
-
export declare const formatDate: (params: FormatDateParams) => string;
|
|
12
|
+
export declare const formatDate: ({ showTimezone, ...params }: FormatDateParams) => string;
|
|
11
13
|
export declare const getAriaLabel: (value: Date | Date[] | undefined, formatDisplayValue: (date?: Date | Date[] | undefined) => string, locale: Locale) => string;
|
|
12
14
|
export declare const prepareLocale: (locale?: globalThis.Locale, options?: {
|
|
13
15
|
weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | undefined;
|
package/date-picker/utils.js
CHANGED
|
@@ -10,7 +10,8 @@ var constants_1 = require("./constants");
|
|
|
10
10
|
// replacing both hyphens and em-dashes with en-dashes
|
|
11
11
|
var normalizeDashes = function (formatString) { return formatString.replace(/-/g, '–').replace(/—/g, '–'); };
|
|
12
12
|
exports.normalizeDashes = normalizeDashes;
|
|
13
|
-
var formatDate = function (
|
|
13
|
+
var formatDate = function (_a) {
|
|
14
|
+
var _b = _a.showTimezone, showTimezone = _b === void 0 ? false : _b, params = (0, tslib_1.__rest)(_a, ["showTimezone"]);
|
|
14
15
|
var date = params.date;
|
|
15
16
|
var formatString = params.formatString || (0, exports.normalizeDashes)(constants_1.DEFAULT_FORMAT_STRING);
|
|
16
17
|
var dateHelpers = params.dateHelpers || new date_helpers_1.default(date_fns_adapter_1.default);
|
|
@@ -22,10 +23,14 @@ var formatDate = function (params) {
|
|
|
22
23
|
if (Array.isArray(date) && !date[0] && !date[1]) {
|
|
23
24
|
return '';
|
|
24
25
|
}
|
|
26
|
+
var formattedDate;
|
|
25
27
|
if (Array.isArray(date)) {
|
|
26
|
-
|
|
28
|
+
formattedDate = date.map(function (day) { return format(day); }).join(' – ');
|
|
27
29
|
}
|
|
28
|
-
|
|
30
|
+
else {
|
|
31
|
+
formattedDate = format(date);
|
|
32
|
+
}
|
|
33
|
+
return "".concat(formattedDate).concat(params.timezone && showTimezone ? " | ".concat(params.timezone) : '');
|
|
29
34
|
};
|
|
30
35
|
exports.formatDate = formatDate;
|
|
31
36
|
var getAriaLabel = function (value, formatDisplayValue, locale) {
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DateTime = void 0;
|
|
4
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
//hooks
|
|
6
|
+
var useDateTime_1 = require("./useDateTime");
|
|
7
|
+
var DateTime = function (_a) {
|
|
8
|
+
var date = _a.date, variant = _a.variant, dateTimeOptions = _a.dateTimeOptions;
|
|
9
|
+
var formattedDate = (0, useDateTime_1.useDateTime)({ date: date, variant: variant, dateTimeOptions: dateTimeOptions });
|
|
10
|
+
return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: formattedDate }, void 0);
|
|
11
|
+
};
|
|
12
|
+
exports.DateTime = DateTime;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useDateTime = exports.DateTime = void 0;
|
|
4
|
+
var tslib_1 = require("tslib");
|
|
5
|
+
var DateTime_1 = require("./DateTime");
|
|
6
|
+
Object.defineProperty(exports, "DateTime", { enumerable: true, get: function () { return DateTime_1.DateTime; } });
|
|
7
|
+
var useDateTime_1 = require("./useDateTime");
|
|
8
|
+
Object.defineProperty(exports, "useDateTime", { enumerable: true, get: function () { return useDateTime_1.useDateTime; } });
|
|
9
|
+
(0, tslib_1.__exportStar)(require("./types"), exports);
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ValueOf } from '../utility-types';
|
|
2
|
+
export declare const DATE_TIME_VARIANTS: {
|
|
3
|
+
readonly SHORT_DATE: "shortDate";
|
|
4
|
+
readonly MEDIUM_DATE: "mediumDate";
|
|
5
|
+
readonly LONG_DATE: "longDate";
|
|
6
|
+
readonly FULL_DATE: "fullDate";
|
|
7
|
+
readonly SHORT_TIME: "shortTime";
|
|
8
|
+
readonly MEDIUM_TIME: "mediumTime";
|
|
9
|
+
readonly LONG_TIME: "longTime";
|
|
10
|
+
readonly FULL_TIME: "fullTime";
|
|
11
|
+
readonly SHORT_DATE_TIME: "shortDateTime";
|
|
12
|
+
readonly MEDIUM_DATE_TIME: "mediumDateTime";
|
|
13
|
+
readonly LONG_DATE_TIME: "longDateTime";
|
|
14
|
+
readonly FULL_DATE_TIME: "fullDateTime";
|
|
15
|
+
readonly CUSTOM: "custom";
|
|
16
|
+
};
|
|
17
|
+
export declare type DateTimeProps = {
|
|
18
|
+
date: Date | number;
|
|
19
|
+
variant: ValueOf<typeof DATE_TIME_VARIANTS>;
|
|
20
|
+
dateTimeOptions?: Intl.DateTimeFormatOptions;
|
|
21
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DATE_TIME_VARIANTS = void 0;
|
|
4
|
+
exports.DATE_TIME_VARIANTS = {
|
|
5
|
+
SHORT_DATE: 'shortDate',
|
|
6
|
+
MEDIUM_DATE: 'mediumDate',
|
|
7
|
+
LONG_DATE: 'longDate',
|
|
8
|
+
FULL_DATE: 'fullDate',
|
|
9
|
+
SHORT_TIME: 'shortTime',
|
|
10
|
+
MEDIUM_TIME: 'mediumTime',
|
|
11
|
+
LONG_TIME: 'longTime',
|
|
12
|
+
FULL_TIME: 'fullTime',
|
|
13
|
+
SHORT_DATE_TIME: 'shortDateTime',
|
|
14
|
+
MEDIUM_DATE_TIME: 'mediumDateTime',
|
|
15
|
+
LONG_DATE_TIME: 'longDateTime',
|
|
16
|
+
FULL_DATE_TIME: 'fullDateTime',
|
|
17
|
+
CUSTOM: 'custom',
|
|
18
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useDateTime = void 0;
|
|
4
|
+
var tslib_1 = require("tslib");
|
|
5
|
+
var locale_1 = require("../locale");
|
|
6
|
+
var variants_1 = require("./variants");
|
|
7
|
+
var useDateTime = function (_a) {
|
|
8
|
+
var date = _a.date, variant = _a.variant, dateTimeOptions = _a.dateTimeOptions;
|
|
9
|
+
var variantOptions = variants_1.VARIANTS_DATE_FORMAT_OPTIONS[variant];
|
|
10
|
+
var langCode = (0, locale_1.useLocale)().langCode;
|
|
11
|
+
return Intl.DateTimeFormat(langCode, (0, tslib_1.__assign)((0, tslib_1.__assign)({}, variantOptions), dateTimeOptions)).format(date);
|
|
12
|
+
};
|
|
13
|
+
exports.useDateTime = useDateTime;
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var _a;
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.VARIANTS_DATE_FORMAT_OPTIONS = exports.DEFAULT_VARIANT = void 0;
|
|
5
|
+
var types_1 = require("./types");
|
|
6
|
+
exports.DEFAULT_VARIANT = types_1.DATE_TIME_VARIANTS.SHORT_DATE; //dd/mm/yyyy in en_US
|
|
7
|
+
exports.VARIANTS_DATE_FORMAT_OPTIONS = (_a = {},
|
|
8
|
+
_a[types_1.DATE_TIME_VARIANTS.SHORT_DATE] = { year: 'numeric', month: 'numeric', day: 'numeric' },
|
|
9
|
+
_a[types_1.DATE_TIME_VARIANTS.MEDIUM_DATE] = {
|
|
10
|
+
year: 'numeric',
|
|
11
|
+
month: 'short',
|
|
12
|
+
day: 'numeric',
|
|
13
|
+
},
|
|
14
|
+
_a[types_1.DATE_TIME_VARIANTS.LONG_DATE] = {
|
|
15
|
+
year: 'numeric',
|
|
16
|
+
month: 'long',
|
|
17
|
+
day: 'numeric',
|
|
18
|
+
},
|
|
19
|
+
_a[types_1.DATE_TIME_VARIANTS.FULL_DATE] = {
|
|
20
|
+
year: 'numeric',
|
|
21
|
+
month: 'long',
|
|
22
|
+
day: 'numeric',
|
|
23
|
+
weekday: 'long',
|
|
24
|
+
},
|
|
25
|
+
_a[types_1.DATE_TIME_VARIANTS.SHORT_TIME] = {
|
|
26
|
+
hour: 'numeric',
|
|
27
|
+
minute: 'numeric',
|
|
28
|
+
hour12: true,
|
|
29
|
+
},
|
|
30
|
+
_a[types_1.DATE_TIME_VARIANTS.MEDIUM_TIME] = {
|
|
31
|
+
hour: 'numeric',
|
|
32
|
+
minute: 'numeric',
|
|
33
|
+
second: 'numeric',
|
|
34
|
+
hour12: true,
|
|
35
|
+
},
|
|
36
|
+
_a[types_1.DATE_TIME_VARIANTS.LONG_TIME] = {
|
|
37
|
+
hour: 'numeric',
|
|
38
|
+
minute: 'numeric',
|
|
39
|
+
second: 'numeric',
|
|
40
|
+
hour12: false,
|
|
41
|
+
timeZoneName: 'short',
|
|
42
|
+
},
|
|
43
|
+
_a[types_1.DATE_TIME_VARIANTS.FULL_TIME] = {
|
|
44
|
+
hour: 'numeric',
|
|
45
|
+
minute: 'numeric',
|
|
46
|
+
second: 'numeric',
|
|
47
|
+
hour12: false,
|
|
48
|
+
timeZoneName: 'long',
|
|
49
|
+
},
|
|
50
|
+
_a[types_1.DATE_TIME_VARIANTS.SHORT_DATE_TIME] = {
|
|
51
|
+
year: 'numeric',
|
|
52
|
+
month: 'numeric',
|
|
53
|
+
day: 'numeric',
|
|
54
|
+
hour: 'numeric',
|
|
55
|
+
minute: 'numeric',
|
|
56
|
+
hour12: true,
|
|
57
|
+
},
|
|
58
|
+
_a[types_1.DATE_TIME_VARIANTS.MEDIUM_DATE_TIME] = {
|
|
59
|
+
year: 'numeric',
|
|
60
|
+
month: 'short',
|
|
61
|
+
day: 'numeric',
|
|
62
|
+
hour: 'numeric',
|
|
63
|
+
minute: 'numeric',
|
|
64
|
+
hour12: true,
|
|
65
|
+
},
|
|
66
|
+
_a[types_1.DATE_TIME_VARIANTS.LONG_DATE_TIME] = {
|
|
67
|
+
year: 'numeric',
|
|
68
|
+
month: 'long',
|
|
69
|
+
day: 'numeric',
|
|
70
|
+
hour: 'numeric',
|
|
71
|
+
minute: 'numeric',
|
|
72
|
+
second: 'numeric',
|
|
73
|
+
hour12: true,
|
|
74
|
+
timeZoneName: 'short',
|
|
75
|
+
},
|
|
76
|
+
_a[types_1.DATE_TIME_VARIANTS.FULL_DATE_TIME] = {
|
|
77
|
+
year: 'numeric',
|
|
78
|
+
month: 'long',
|
|
79
|
+
day: 'numeric',
|
|
80
|
+
weekday: 'long',
|
|
81
|
+
hour: 'numeric',
|
|
82
|
+
minute: 'numeric',
|
|
83
|
+
second: 'numeric',
|
|
84
|
+
hour12: false,
|
|
85
|
+
timeZoneName: 'long',
|
|
86
|
+
},
|
|
87
|
+
_a);
|
|
@@ -102,3 +102,5 @@ import * as PhoneInput_1 from './phone-input';
|
|
|
102
102
|
export { PhoneInput_1 as PhoneInput };
|
|
103
103
|
import * as DateInput_1 from './date-input';
|
|
104
104
|
export { DateInput_1 as DateInput };
|
|
105
|
+
import * as Breadcrumb_1 from './breadcrumb';
|
|
106
|
+
export { Breadcrumb_1 as Breadcrumb };
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Created by Aneree on 03/11/20.
|
|
3
3
|
*/
|
|
4
|
-
import { ReactElement } from 'react';
|
|
4
|
+
import { ReactElement, ReactNode } from 'react';
|
|
5
5
|
import { AsyncSelectProps } from './types';
|
|
6
|
-
declare const AsyncSelect: (
|
|
6
|
+
declare const AsyncSelect: ({ loadOptions, initialOptions, resolveSelectedOptions, value, ...restProps }: AsyncSelectProps & {
|
|
7
|
+
children?: ReactNode;
|
|
8
|
+
}) => ReactElement;
|
|
7
9
|
export { AsyncSelect };
|
|
@@ -1,120 +1,55 @@
|
|
|
1
|
-
import { __assign, __read, __rest } from "tslib";
|
|
1
|
+
import { __assign, __awaiter, __generator, __read, __rest } from "tslib";
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
/**
|
|
4
4
|
* Created by Aneree on 03/11/20.
|
|
5
5
|
*/
|
|
6
|
-
import {
|
|
7
|
-
import _keyBy from 'lodash/keyBy';
|
|
8
|
-
//components
|
|
6
|
+
import { useCallback, useMemo } from 'react';
|
|
9
7
|
import { Select } from '../select';
|
|
10
|
-
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
var _h = __read(useState(initialOptions), 2), options = _h[0], setOptions = _h[1];
|
|
33
|
-
var _j = __read(useState(_keyBy(initialOptions, valueKey)), 2), allOptionsMap = _j[0], setAllOptionsMap = _j[1];
|
|
34
|
-
var _k = __read(useState(null), 2), inputElement = _k[0], setInputElement = _k[1];
|
|
35
|
-
var inputRef = useLatest(inputElement);
|
|
36
|
-
var combinedRef = useCombinedRefs(setInputElement, propsInputRef);
|
|
37
|
-
var _l = __read(useState(null), 2), rootRef = _l[0], setRootRef = _l[1];
|
|
38
|
-
var _m = __read(useState(null), 2), popoverRef = _m[0], setPopoverRef = _m[1];
|
|
39
|
-
useResolveSelectedOptions({
|
|
40
|
-
value: value,
|
|
41
|
-
valueKey: valueKey,
|
|
42
|
-
inputRef: inputRef,
|
|
43
|
-
allOptionsMap: allOptionsMap,
|
|
44
|
-
setOptions: setOptions,
|
|
45
|
-
setIsLoading: setIsLoading,
|
|
46
|
-
setAllOptionsMap: setAllOptionsMap,
|
|
47
|
-
resolveSelectedOptions: resolveSelectedOptions,
|
|
48
|
-
});
|
|
49
|
-
var _o = useAsyncOptionHandlers({
|
|
50
|
-
valueKey: valueKey,
|
|
51
|
-
isLoading: isLoading,
|
|
52
|
-
minimumInput: minimumInput,
|
|
53
|
-
paginationBuffer: paginationBuffer,
|
|
54
|
-
inputRef: inputRef,
|
|
55
|
-
setAllOptionsMap: setAllOptionsMap,
|
|
56
|
-
setIsLoading: setIsLoading,
|
|
57
|
-
setOptions: setOptions,
|
|
58
|
-
loadOptions: loadOptions,
|
|
59
|
-
createOption: propsCreateOption,
|
|
60
|
-
}), fetchOptions = _o.fetchOptions, onPaginate = _o.onPaginate, inputChangeHandlerToDebounce = _o.onInputChange, createOption = _o.createOption;
|
|
61
|
-
var _onInputChange = useInputChangeHandler({
|
|
62
|
-
inputElement: inputElement,
|
|
63
|
-
listenAllInputChanges: listenAllInputChanges,
|
|
64
|
-
onInputChange: onInputChange,
|
|
65
|
-
inputChangeHandlerToDebounce: inputChangeHandlerToDebounce,
|
|
66
|
-
debounceInterval: debounceInterval,
|
|
67
|
-
});
|
|
68
|
-
/************************************************ HANDLING FOCUS ****************************************************/
|
|
69
|
-
var handleFocus = useCallback(function (event) {
|
|
70
|
-
/**
|
|
71
|
-
* https://developer.mozilla.org/en-US/docs/Web/API/FocusEvent/relatedTarget
|
|
72
|
-
* event.relatedTarget points to last focused element
|
|
73
|
-
*/
|
|
74
|
-
var lastFocusedNode = event.relatedTarget;
|
|
75
|
-
if (loadOnFocus && !(rootRef === null || rootRef === void 0 ? void 0 : rootRef.contains(lastFocusedNode)) && !(popoverRef === null || popoverRef === void 0 ? void 0 : popoverRef.contains(lastFocusedNode))) {
|
|
76
|
-
inputChangeHandlerToDebounce();
|
|
77
|
-
}
|
|
78
|
-
}, [loadOnFocus, inputChangeHandlerToDebounce, rootRef, popoverRef]);
|
|
79
|
-
/******************************************* HANDLING FETCH ON MOUNT ************************************************/
|
|
80
|
-
useEffect(function () {
|
|
81
|
-
if (loadOnMountRef.current) {
|
|
82
|
-
fetchOptions(0);
|
|
83
|
-
}
|
|
84
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps -- only want to load the options on first mount
|
|
85
|
-
}, []);
|
|
86
|
-
/********************************************************************************************************************/
|
|
87
|
-
var selectedOptions = useMemo(function () {
|
|
88
|
-
return value === null || value === void 0 ? void 0 : value.map(function (valueOption) {
|
|
89
|
-
var _a;
|
|
90
|
-
var optionKey = valueOption[valueKeyRef.current];
|
|
91
|
-
//In case of unresolved values, till the value is being resolved, show the unresolved value to the user
|
|
92
|
-
return (_a = allOptionsMap[optionKey]) !== null && _a !== void 0 ? _a : valueOption;
|
|
8
|
+
import { useAsyncSelect } from './hooks/useAsyncSelect';
|
|
9
|
+
import { arrayToGroupedOptions } from './helpers';
|
|
10
|
+
import { UNGROUPED_ID } from '../select/constants';
|
|
11
|
+
var UNGROUP_GROUP_CONFIG = [{ id: UNGROUPED_ID, label: 'Ungrouped' }];
|
|
12
|
+
var AsyncSelect = function (_a) {
|
|
13
|
+
var loadOptions = _a.loadOptions, initialOptions = _a.initialOptions, resolveSelectedOptions = _a.resolveSelectedOptions, value = _a.value, restProps = __rest(_a, ["loadOptions", "initialOptions", "resolveSelectedOptions", "value"]);
|
|
14
|
+
var adaptedLoadOptions = useCallback(function (input, groupFilters) { return __awaiter(void 0, void 0, void 0, function () {
|
|
15
|
+
var _a, filter, _b, options, complete;
|
|
16
|
+
return __generator(this, function (_c) {
|
|
17
|
+
switch (_c.label) {
|
|
18
|
+
case 0:
|
|
19
|
+
_a = __read(groupFilters, 1), filter = _a[0];
|
|
20
|
+
if (!filter) {
|
|
21
|
+
return [2 /*return*/, { groups: [] }];
|
|
22
|
+
}
|
|
23
|
+
return [4 /*yield*/, loadOptions(input, filter.pageNumber)];
|
|
24
|
+
case 1:
|
|
25
|
+
_b = _c.sent(), options = _b.options, complete = _b.complete;
|
|
26
|
+
return [2 /*return*/, {
|
|
27
|
+
groups: [{ group: filter.group, options: options, complete: complete }],
|
|
28
|
+
}];
|
|
29
|
+
}
|
|
93
30
|
});
|
|
94
|
-
},
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
31
|
+
}); }, [loadOptions]);
|
|
32
|
+
var adaptedResolveSelectedOptions = useCallback(function (groupVsUnresolvedValueKeys) { return __awaiter(void 0, void 0, void 0, function () {
|
|
33
|
+
var resolvedOptions;
|
|
34
|
+
var _a;
|
|
35
|
+
return __generator(this, function (_b) {
|
|
36
|
+
switch (_b.label) {
|
|
37
|
+
case 0:
|
|
38
|
+
if (!resolveSelectedOptions) {
|
|
39
|
+
return [2 /*return*/, {}];
|
|
40
|
+
}
|
|
41
|
+
return [4 /*yield*/, resolveSelectedOptions(groupVsUnresolvedValueKeys[UNGROUPED_ID] || [])];
|
|
42
|
+
case 1:
|
|
43
|
+
resolvedOptions = _b.sent();
|
|
44
|
+
return [2 /*return*/, (_a = {}, _a[UNGROUPED_ID] = resolvedOptions, _a)];
|
|
104
45
|
}
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
}, [
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
noResultsMsg: noResultsMsg,
|
|
114
|
-
inputText: getInputValue(inputRef),
|
|
115
|
-
minimumInput: minimumInput,
|
|
116
|
-
searchingText: searchingText !== null && searchingText !== void 0 ? searchingText : locale.asyncSelect.searchingText,
|
|
117
|
-
emptyInputMsg: locale.asyncSelect.emptyInputMsg,
|
|
118
|
-
}), createOption: createOption }), void 0));
|
|
46
|
+
});
|
|
47
|
+
}); }, [resolveSelectedOptions]);
|
|
48
|
+
var adaptedValue = useMemo(function () {
|
|
49
|
+
var _a;
|
|
50
|
+
return (value ? (_a = {}, _a[UNGROUPED_ID] = value, _a) : value);
|
|
51
|
+
}, [value]);
|
|
52
|
+
var _b = useAsyncSelect(__assign(__assign({}, restProps), { initialOptions: useMemo(function () { return arrayToGroupedOptions(initialOptions || []); }, [initialOptions]), loadOptions: adaptedLoadOptions, groupConfig: UNGROUP_GROUP_CONFIG, resolveSelectedOptions: resolveSelectedOptions ? adaptedResolveSelectedOptions : undefined, value: adaptedValue })), resultCountMap = _b.resultCountMap, selectProps = __rest(_b, ["resultCountMap"]);
|
|
53
|
+
return _jsx(Select, __assign({}, selectProps, { hideSelectAll: true }), void 0);
|
|
119
54
|
};
|
|
120
55
|
export { AsyncSelect };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { GroupedAsyncSelectProps } from './types';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
export declare const GroupedAsyncSelect: ({ onChange, showSelectAll, selectAllSelected, selectOnTab, ...restProps }: GroupedAsyncSelectProps & {
|
|
4
|
+
children?: ReactNode;
|
|
5
|
+
}) => JSX.Element;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { __assign, __rest } from "tslib";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useAsyncSelect } from './hooks/useAsyncSelect';
|
|
4
|
+
import { Select } from '../select';
|
|
5
|
+
import { CollapsibleSelectMenu } from '../select/selectMenuAdapter/CollapsibleSelectMenu';
|
|
6
|
+
import { useCallback, useMemo } from 'react';
|
|
7
|
+
import { mergeOverrides } from '../overrides';
|
|
8
|
+
import { arrayToGroupedOptions } from './helpers';
|
|
9
|
+
import _reduce from 'lodash/reduce';
|
|
10
|
+
import _isObject from 'lodash/isObject';
|
|
11
|
+
import defaultProps from '../select/default-props';
|
|
12
|
+
export var GroupedAsyncSelect = function (_a) {
|
|
13
|
+
var onChange = _a.onChange, showSelectAll = _a.showSelectAll, selectAllSelected = _a.selectAllSelected, selectOnTab = _a.selectOnTab, restProps = __rest(_a, ["onChange", "showSelectAll", "selectAllSelected", "selectOnTab"]);
|
|
14
|
+
var adaptedOnChange = useCallback(function (params) {
|
|
15
|
+
var groupedValue = arrayToGroupedOptions(params.value);
|
|
16
|
+
return onChange === null || onChange === void 0 ? void 0 : onChange(__assign(__assign({}, params), { value: groupedValue, valueKeys: _reduce(groupedValue, function (acc, values, groupId) {
|
|
17
|
+
acc[groupId] = values === null || values === void 0 ? void 0 : values.map(function (valueObjOrId) {
|
|
18
|
+
return _isObject(valueObjOrId) ? valueObjOrId[restProps.valueKey || defaultProps.valueKey] : valueObjOrId;
|
|
19
|
+
});
|
|
20
|
+
return acc;
|
|
21
|
+
}, {}) }));
|
|
22
|
+
}, [onChange, restProps.valueKey]);
|
|
23
|
+
var _b = useAsyncSelect(__assign(__assign({}, restProps), { onChange: adaptedOnChange })), resultCountMap = _b.resultCountMap, selectProps = __rest(_b, ["resultCountMap"]);
|
|
24
|
+
var overrides = useMemo(function () {
|
|
25
|
+
return mergeOverrides({
|
|
26
|
+
StatefulMenu: {
|
|
27
|
+
component: CollapsibleSelectMenu,
|
|
28
|
+
props: {
|
|
29
|
+
groupConfig: restProps.groupConfig.map(function (group) { return (__assign(__assign({}, group), { count: resultCountMap[group.id] })); }),
|
|
30
|
+
clearAsOption: restProps.clearAsOption,
|
|
31
|
+
selectOnTab: selectOnTab,
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
}, selectProps.overrides);
|
|
35
|
+
}, [selectProps.overrides, restProps.groupConfig, resultCountMap, restProps.clearAsOption, selectOnTab]);
|
|
36
|
+
return (_jsx(Select, __assign({}, selectProps, { overrides: overrides, hideSelectAll: !showSelectAll, __selectAllShouldReturnAllOptions: showSelectAll, __selectAllSelected: selectAllSelected }, ((selectProps === null || selectProps === void 0 ? void 0 : selectProps.type) === 'overlay' ? { scrollContainer: 'menuContainer' } : {})), void 0));
|
|
37
|
+
};
|
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { RefObject } from 'react';
|
|
5
5
|
import * as React from 'react';
|
|
6
|
-
import { AllOptionsMap, Option } from './types';
|
|
6
|
+
import { AllOptionsMap, GroupConfig, GroupedOptions, Option } from './types';
|
|
7
|
+
import { normalizeOptions } from 'baseui/select/utils';
|
|
8
|
+
import { Value } from '../select/types';
|
|
7
9
|
export declare const getNoResultsMsg: ({ isLoading, minimumInput, inputText, noResultsMsg, searchingText, emptyInputMsg, }: {
|
|
8
10
|
isLoading: boolean;
|
|
9
11
|
minimumInput: number;
|
|
@@ -13,5 +15,9 @@ export declare const getNoResultsMsg: ({ isLoading, minimumInput, inputText, noR
|
|
|
13
15
|
emptyInputMsg: string;
|
|
14
16
|
}) => string | React.ReactNode | undefined;
|
|
15
17
|
export declare const shouldPaginate: (element: HTMLElement, paginationBuffer?: number) => boolean;
|
|
16
|
-
export declare const addOptionsInMap: (optionsMap: AllOptionsMap, options: Array<Option>, valueKey: string) => AllOptionsMap;
|
|
17
18
|
export declare const getInputValue: (inputRef: RefObject<HTMLInputElement>) => string;
|
|
19
|
+
export declare const arrayToGroupedOptions: (options: Array<Option> | GroupedOptions | Value) => GroupedOptions;
|
|
20
|
+
export declare const mergeOptions: (a: Array<Option> | GroupedOptions, b: Array<Option> | GroupedOptions) => GroupedOptions;
|
|
21
|
+
export declare const initGroupOptions: (groupConfig: GroupConfig) => GroupedOptions;
|
|
22
|
+
export declare const addOptionsInMap: (optionsMap: AllOptionsMap, options: Array<Option> | GroupedOptions, valueKey: string) => AllOptionsMap;
|
|
23
|
+
export { normalizeOptions };
|