@sprinklrjs/spaceweb 10.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/allComponentsAndUtilities.d.ts +55 -0
- package/allComponentsAndUtilities.js +59 -0
- package/asyncSelect/asyncSelect.d.ts +7 -0
- package/asyncSelect/asyncSelect.js +123 -0
- package/asyncSelect/helpers.d.ts +17 -0
- package/asyncSelect/helpers.js +38 -0
- package/asyncSelect/hooks/useAsyncOptionHandlers.d.ts +28 -0
- package/asyncSelect/hooks/useAsyncOptionHandlers.js +102 -0
- package/asyncSelect/hooks/useInputChangeHandler.d.ts +13 -0
- package/asyncSelect/hooks/useInputChangeHandler.js +40 -0
- package/asyncSelect/hooks/useResolveSelectedOptions.d.ts +18 -0
- package/asyncSelect/hooks/useResolveSelectedOptions.js +64 -0
- package/asyncSelect/index.d.ts +3 -0
- package/asyncSelect/index.js +5 -0
- package/asyncSelect/locale.d.ts +7 -0
- package/asyncSelect/locale.js +2 -0
- package/asyncSelect/package.json +4 -0
- package/asyncSelect/types.d.ts +29 -0
- package/asyncSelect/types.js +2 -0
- package/avatar/avatar-group.d.ts +4 -0
- package/avatar/avatar-group.js +53 -0
- package/avatar/avatar.d.ts +4 -0
- package/avatar/avatar.js +68 -0
- package/avatar/constants.d.ts +1 -0
- package/avatar/constants.js +61 -0
- package/avatar/index.d.ts +5 -0
- package/avatar/index.js +14 -0
- package/avatar/package.json +4 -0
- package/avatar/styled-component.d.ts +36 -0
- package/avatar/styled-component.js +50 -0
- package/avatar/types.d.ts +50 -0
- package/avatar/types.js +2 -0
- package/avatar/useAvatarColor.d.ts +1 -0
- package/avatar/useAvatarColor.js +27 -0
- package/avatar/utils/cleanupDisplayName.d.ts +1 -0
- package/avatar/utils/cleanupDisplayName.js +20 -0
- package/badge/badge.d.ts +4 -0
- package/badge/badge.js +21 -0
- package/badge/index.d.ts +3 -0
- package/badge/index.js +11 -0
- package/badge/package.json +4 -0
- package/badge/styled-component.d.ts +2 -0
- package/badge/styled-component.js +59 -0
- package/badge/types.d.ts +25 -0
- package/badge/types.js +2 -0
- package/base-button/BaseButton.d.ts +6 -0
- package/base-button/BaseButton.js +29 -0
- package/base-button/index.d.ts +3 -0
- package/base-button/index.js +8 -0
- package/base-button/package.json +4 -0
- package/base-button/styled-components.d.ts +3 -0
- package/base-button/styled-components.js +13 -0
- package/base-button/types.d.ts +2 -0
- package/base-button/types.js +2 -0
- package/box/Box.d.ts +13 -0
- package/box/Box.js +15 -0
- package/box/index.d.ts +2 -0
- package/box/index.js +7 -0
- package/box/package.json +4 -0
- package/box/types.d.ts +7 -0
- package/box/types.js +2 -0
- package/button/Button.d.ts +32 -0
- package/button/Button.js +50 -0
- package/button/IconButton/IconButton.d.ts +6 -0
- package/button/IconButton/IconButton.js +22 -0
- package/button/IconButton/index.d.ts +3 -0
- package/button/IconButton/index.js +6 -0
- package/button/IconButton/styled-components.d.ts +5 -0
- package/button/IconButton/styled-components.js +78 -0
- package/button/IconButton/types.d.ts +10 -0
- package/button/IconButton/types.js +2 -0
- package/button/IconTextButton/IconTextButton.d.ts +7 -0
- package/button/IconTextButton/IconTextButton.js +26 -0
- package/button/IconTextButton/index.d.ts +3 -0
- package/button/IconTextButton/index.js +6 -0
- package/button/IconTextButton/styled-components.d.ts +3 -0
- package/button/IconTextButton/styled-components.js +49 -0
- package/button/IconTextButton/types.d.ts +13 -0
- package/button/IconTextButton/types.js +2 -0
- package/button/basewebAdapter.d.ts +29 -0
- package/button/basewebAdapter.js +12 -0
- package/button/index.d.ts +5 -0
- package/button/index.js +17 -0
- package/button/package.json +4 -0
- package/button/styled-components.d.ts +20 -0
- package/button/styled-components.js +226 -0
- package/button/types.d.ts +49 -0
- package/button/types.js +2 -0
- package/button-group/ButtonGroup.d.ts +22 -0
- package/button-group/ButtonGroup.js +25 -0
- package/button-group/StatefulButtonGroup.d.ts +24 -0
- package/button-group/StatefulButtonGroup.js +41 -0
- package/button-group/index.d.ts +4 -0
- package/button-group/index.js +14 -0
- package/button-group/package.json +4 -0
- package/button-group/styled-components.d.ts +31 -0
- package/button-group/styled-components.js +100 -0
- package/button-group/types.d.ts +40 -0
- package/button-group/types.js +2 -0
- package/checkbox/basewebAdapters.d.ts +4 -0
- package/checkbox/basewebAdapters.js +34 -0
- package/checkbox/checkbox.d.ts +10 -0
- package/checkbox/checkbox.js +22 -0
- package/checkbox/index.d.ts +5 -0
- package/checkbox/index.js +20 -0
- package/checkbox/package.json +4 -0
- package/checkbox/styled-components.d.ts +5 -0
- package/checkbox/styled-components.js +98 -0
- package/checkbox/types.d.ts +28 -0
- package/checkbox/types.js +2 -0
- package/classNames/index.d.ts +1 -0
- package/classNames/index.js +8 -0
- package/classNames/package.json +4 -0
- package/col/index.d.ts +2 -0
- package/col/index.js +5 -0
- package/col/package.json +4 -0
- package/container/ContainerProps.d.ts +6 -0
- package/container/ContainerProps.js +2 -0
- package/container/package.json +4 -0
- package/date-input/Before.d.ts +17 -0
- package/date-input/Before.js +27 -0
- package/date-input/CalendarIconButton.d.ts +3 -0
- package/date-input/CalendarIconButton.js +10 -0
- package/date-input/DateInput.d.ts +3 -0
- package/date-input/DateInput.js +96 -0
- package/date-input/index.d.ts +2 -0
- package/date-input/index.js +7 -0
- package/date-input/package.json +4 -0
- package/date-input/styled-components.d.ts +4 -0
- package/date-input/styled-components.js +16 -0
- package/date-input/types.d.ts +15 -0
- package/date-input/types.js +2 -0
- package/date-picker/Calendar.d.ts +9 -0
- package/date-picker/Calendar.js +223 -0
- package/date-picker/DateInput.d.ts +13 -0
- package/date-picker/DateInput.js +220 -0
- package/date-picker/DatePicker.d.ts +3 -0
- package/date-picker/DatePicker.js +9 -0
- package/date-picker/DatePickerContent.d.ts +9 -0
- package/date-picker/DatePickerContent.js +45 -0
- package/date-picker/DatePickerInput.d.ts +8 -0
- package/date-picker/DatePickerInput.js +111 -0
- package/date-picker/DateTimeContainer.d.ts +18 -0
- package/date-picker/DateTimeContainer.js +124 -0
- package/date-picker/StatelessDatePicker.d.ts +3 -0
- package/date-picker/StatelessDatePicker.js +141 -0
- package/date-picker/TimeInput.d.ts +12 -0
- package/date-picker/TimeInput.js +73 -0
- package/date-picker/constants.d.ts +1 -0
- package/date-picker/constants.js +4 -0
- package/date-picker/index.d.ts +10 -0
- package/date-picker/index.js +32 -0
- package/date-picker/locale.d.ts +3 -0
- package/date-picker/locale.js +2 -0
- package/date-picker/package.json +4 -0
- package/date-picker/stateful-container.d.ts +9 -0
- package/date-picker/stateful-container.js +28 -0
- package/date-picker/styled-components.d.ts +8 -0
- package/date-picker/styled-components.js +138 -0
- package/date-picker/types.d.ts +104 -0
- package/date-picker/types.js +2 -0
- package/date-picker/useDatePickerState.d.ts +13 -0
- package/date-picker/useDatePickerState.js +24 -0
- package/date-picker/utils.d.ts +24 -0
- package/date-picker/utils.js +83 -0
- package/esm/allComponentsAndUtilities.d.ts +55 -0
- package/esm/allComponentsAndUtilities.js +104 -0
- package/esm/asyncSelect/asyncSelect.d.ts +7 -0
- package/esm/asyncSelect/asyncSelect.js +120 -0
- package/esm/asyncSelect/helpers.d.ts +17 -0
- package/esm/asyncSelect/helpers.js +31 -0
- package/esm/asyncSelect/hooks/useAsyncOptionHandlers.d.ts +28 -0
- package/esm/asyncSelect/hooks/useAsyncOptionHandlers.js +99 -0
- package/esm/asyncSelect/hooks/useInputChangeHandler.d.ts +13 -0
- package/esm/asyncSelect/hooks/useInputChangeHandler.js +37 -0
- package/esm/asyncSelect/hooks/useResolveSelectedOptions.d.ts +18 -0
- package/esm/asyncSelect/hooks/useResolveSelectedOptions.js +61 -0
- package/esm/asyncSelect/index.d.ts +3 -0
- package/esm/asyncSelect/index.js +2 -0
- package/esm/asyncSelect/locale.d.ts +7 -0
- package/esm/asyncSelect/locale.js +1 -0
- package/esm/asyncSelect/types.d.ts +29 -0
- package/esm/asyncSelect/types.js +1 -0
- package/esm/avatar/avatar-group.d.ts +4 -0
- package/esm/avatar/avatar-group.js +50 -0
- package/esm/avatar/avatar.d.ts +4 -0
- package/esm/avatar/avatar.js +65 -0
- package/esm/avatar/constants.d.ts +1 -0
- package/esm/avatar/constants.js +58 -0
- package/esm/avatar/index.d.ts +5 -0
- package/esm/avatar/index.js +4 -0
- package/esm/avatar/styled-component.d.ts +36 -0
- package/esm/avatar/styled-component.js +47 -0
- package/esm/avatar/types.d.ts +50 -0
- package/esm/avatar/types.js +1 -0
- package/esm/avatar/useAvatarColor.d.ts +1 -0
- package/esm/avatar/useAvatarColor.js +23 -0
- package/esm/avatar/utils/cleanupDisplayName.d.ts +1 -0
- package/esm/avatar/utils/cleanupDisplayName.js +16 -0
- package/esm/badge/badge.d.ts +4 -0
- package/esm/badge/badge.js +19 -0
- package/esm/badge/index.d.ts +3 -0
- package/esm/badge/index.js +2 -0
- package/esm/badge/styled-component.d.ts +2 -0
- package/esm/badge/styled-component.js +56 -0
- package/esm/badge/types.d.ts +25 -0
- package/esm/badge/types.js +1 -0
- package/esm/base-button/BaseButton.d.ts +6 -0
- package/esm/base-button/BaseButton.js +26 -0
- package/esm/base-button/index.d.ts +3 -0
- package/esm/base-button/index.js +2 -0
- package/esm/base-button/styled-components.d.ts +3 -0
- package/esm/base-button/styled-components.js +10 -0
- package/esm/base-button/types.d.ts +2 -0
- package/esm/base-button/types.js +1 -0
- package/esm/box/Box.d.ts +13 -0
- package/esm/box/Box.js +13 -0
- package/esm/box/index.d.ts +2 -0
- package/esm/box/index.js +2 -0
- package/esm/box/types.d.ts +7 -0
- package/esm/box/types.js +1 -0
- package/esm/button/Button.d.ts +32 -0
- package/esm/button/Button.js +48 -0
- package/esm/button/IconButton/IconButton.d.ts +6 -0
- package/esm/button/IconButton/IconButton.js +20 -0
- package/esm/button/IconButton/index.d.ts +3 -0
- package/esm/button/IconButton/index.js +3 -0
- package/esm/button/IconButton/styled-components.d.ts +5 -0
- package/esm/button/IconButton/styled-components.js +73 -0
- package/esm/button/IconButton/types.d.ts +10 -0
- package/esm/button/IconButton/types.js +1 -0
- package/esm/button/IconTextButton/IconTextButton.d.ts +7 -0
- package/esm/button/IconTextButton/IconTextButton.js +24 -0
- package/esm/button/IconTextButton/index.d.ts +3 -0
- package/esm/button/IconTextButton/index.js +3 -0
- package/esm/button/IconTextButton/styled-components.d.ts +3 -0
- package/esm/button/IconTextButton/styled-components.js +46 -0
- package/esm/button/IconTextButton/types.d.ts +13 -0
- package/esm/button/IconTextButton/types.js +1 -0
- package/esm/button/basewebAdapter.d.ts +29 -0
- package/esm/button/basewebAdapter.js +10 -0
- package/esm/button/index.d.ts +5 -0
- package/esm/button/index.js +4 -0
- package/esm/button/styled-components.d.ts +20 -0
- package/esm/button/styled-components.js +222 -0
- package/esm/button/types.d.ts +49 -0
- package/esm/button/types.js +1 -0
- package/esm/button-group/ButtonGroup.d.ts +22 -0
- package/esm/button-group/ButtonGroup.js +23 -0
- package/esm/button-group/StatefulButtonGroup.d.ts +24 -0
- package/esm/button-group/StatefulButtonGroup.js +39 -0
- package/esm/button-group/index.d.ts +4 -0
- package/esm/button-group/index.js +3 -0
- package/esm/button-group/styled-components.d.ts +31 -0
- package/esm/button-group/styled-components.js +95 -0
- package/esm/button-group/types.d.ts +40 -0
- package/esm/button-group/types.js +1 -0
- package/esm/checkbox/basewebAdapters.d.ts +4 -0
- package/esm/checkbox/basewebAdapters.js +31 -0
- package/esm/checkbox/checkbox.d.ts +10 -0
- package/esm/checkbox/checkbox.js +17 -0
- package/esm/checkbox/index.d.ts +5 -0
- package/esm/checkbox/index.js +4 -0
- package/esm/checkbox/styled-components.d.ts +5 -0
- package/esm/checkbox/styled-components.js +92 -0
- package/esm/checkbox/types.d.ts +28 -0
- package/esm/checkbox/types.js +1 -0
- package/esm/classNames/index.d.ts +1 -0
- package/esm/classNames/index.js +1 -0
- package/esm/col/index.d.ts +2 -0
- package/esm/col/index.js +2 -0
- package/esm/container/ContainerProps.d.ts +6 -0
- package/esm/container/ContainerProps.js +1 -0
- package/esm/date-input/Before.d.ts +17 -0
- package/esm/date-input/Before.js +23 -0
- package/esm/date-input/CalendarIconButton.d.ts +3 -0
- package/esm/date-input/CalendarIconButton.js +6 -0
- package/esm/date-input/DateInput.d.ts +3 -0
- package/esm/date-input/DateInput.js +92 -0
- package/esm/date-input/index.d.ts +2 -0
- package/esm/date-input/index.js +2 -0
- package/esm/date-input/styled-components.d.ts +4 -0
- package/esm/date-input/styled-components.js +12 -0
- package/esm/date-input/types.d.ts +15 -0
- package/esm/date-input/types.js +1 -0
- package/esm/date-picker/Calendar.d.ts +9 -0
- package/esm/date-picker/Calendar.js +221 -0
- package/esm/date-picker/DateInput.d.ts +13 -0
- package/esm/date-picker/DateInput.js +216 -0
- package/esm/date-picker/DatePicker.d.ts +3 -0
- package/esm/date-picker/DatePicker.js +5 -0
- package/esm/date-picker/DatePickerContent.d.ts +9 -0
- package/esm/date-picker/DatePickerContent.js +41 -0
- package/esm/date-picker/DatePickerInput.d.ts +8 -0
- package/esm/date-picker/DatePickerInput.js +109 -0
- package/esm/date-picker/DateTimeContainer.d.ts +18 -0
- package/esm/date-picker/DateTimeContainer.js +121 -0
- package/esm/date-picker/StatelessDatePicker.d.ts +3 -0
- package/esm/date-picker/StatelessDatePicker.js +137 -0
- package/esm/date-picker/TimeInput.d.ts +12 -0
- package/esm/date-picker/TimeInput.js +69 -0
- package/esm/date-picker/constants.d.ts +1 -0
- package/esm/date-picker/constants.js +1 -0
- package/esm/date-picker/index.d.ts +10 -0
- package/esm/date-picker/index.js +10 -0
- package/esm/date-picker/locale.d.ts +3 -0
- package/esm/date-picker/locale.js +1 -0
- package/esm/date-picker/stateful-container.d.ts +9 -0
- package/esm/date-picker/stateful-container.js +26 -0
- package/esm/date-picker/styled-components.d.ts +8 -0
- package/esm/date-picker/styled-components.js +133 -0
- package/esm/date-picker/types.d.ts +104 -0
- package/esm/date-picker/types.js +1 -0
- package/esm/date-picker/useDatePickerState.d.ts +13 -0
- package/esm/date-picker/useDatePickerState.js +20 -0
- package/esm/date-picker/utils.d.ts +24 -0
- package/esm/date-picker/utils.js +74 -0
- package/esm/form-control/context.d.ts +22 -0
- package/esm/form-control/context.js +18 -0
- package/esm/form-control/form-control.d.ts +4 -0
- package/esm/form-control/form-control.js +54 -0
- package/esm/form-control/index.d.ts +3 -0
- package/esm/form-control/index.js +2 -0
- package/esm/form-control/styled-component.d.ts +8 -0
- package/esm/form-control/styled-component.js +33 -0
- package/esm/form-control/types.d.ts +46 -0
- package/esm/form-control/types.js +1 -0
- package/esm/grid/Col.d.ts +10 -0
- package/esm/grid/Col.js +44 -0
- package/esm/grid/Grid.d.ts +22 -0
- package/esm/grid/Grid.js +59 -0
- package/esm/grid/index.d.ts +6 -0
- package/esm/grid/index.js +4 -0
- package/esm/grid/types.d.ts +32 -0
- package/esm/grid/types.js +1 -0
- package/esm/grid/utils.d.ts +1 -0
- package/esm/grid/utils.js +27 -0
- package/esm/helpers/ClearIconButton.d.ts +5 -0
- package/esm/helpers/ClearIconButton.js +20 -0
- package/esm/helpers/baseui/useConvertOverrides.d.ts +15 -0
- package/esm/helpers/baseui/useConvertOverrides.js +30 -0
- package/esm/helpers/baseui/withThemeOverride.d.ts +9 -0
- package/esm/helpers/baseui/withThemeOverride.js +21 -0
- package/esm/helpers/commonStyles.d.ts +17 -0
- package/esm/helpers/commonStyles.js +48 -0
- package/esm/helpers/index.d.ts +25 -0
- package/esm/helpers/index.js +65 -0
- package/esm/helpers/intentHelper.d.ts +5 -0
- package/esm/helpers/intentHelper.js +17 -0
- package/esm/helpers/longHandHelpers.d.ts +7 -0
- package/esm/helpers/longHandHelpers.js +36 -0
- package/esm/helpers/styletron.d.ts +12 -0
- package/esm/helpers/styletron.js +13 -0
- package/esm/helpers/themeHelpers.d.ts +4 -0
- package/esm/helpers/themeHelpers.js +19 -0
- package/esm/helpers/typography.d.ts +2 -0
- package/esm/helpers/typography.js +5 -0
- package/esm/hooks/useAutoFocus.d.ts +9 -0
- package/esm/hooks/useAutoFocus.js +58 -0
- package/esm/hooks/useCombinedHandler.d.ts +6 -0
- package/esm/hooks/useCombinedHandler.js +20 -0
- package/esm/hooks/useCombinedRef.d.ts +6 -0
- package/esm/hooks/useCombinedRef.js +33 -0
- package/esm/hooks/useDebouncedEventHandler.d.ts +6 -0
- package/esm/hooks/useDebouncedEventHandler.js +35 -0
- package/esm/hooks/useFirstMountState.d.ts +2 -0
- package/esm/hooks/useFirstMountState.js +13 -0
- package/esm/hooks/useFocusVisible.d.ts +5 -0
- package/esm/hooks/useFocusVisible.js +22 -0
- package/esm/hooks/useIsomorphicLayoutEffect.d.ts +2 -0
- package/esm/hooks/useIsomorphicLayoutEffect.js +3 -0
- package/esm/hooks/useLatest.d.ts +4 -0
- package/esm/hooks/useLatest.js +10 -0
- package/esm/hooks/useMeasure.d.ts +6 -0
- package/esm/hooks/useMeasure.js +40 -0
- package/esm/hooks/usePrevious.d.ts +2 -0
- package/esm/hooks/usePrevious.js +11 -0
- package/esm/hooks/useScrollCapture.d.ts +5 -0
- package/esm/hooks/useScrollCapture.js +67 -0
- package/esm/hooks/useStickyElement.d.ts +5 -0
- package/esm/hooks/useStickyElement.js +32 -0
- package/esm/hooks/useTabsKeyboardNavigation.d.ts +14 -0
- package/esm/hooks/useTabsKeyboardNavigation.js +99 -0
- package/esm/hooks/useUniqueId.d.ts +3 -0
- package/esm/hooks/useUniqueId.js +6 -0
- package/esm/hooks/useUpdateEffect.d.ts +3 -0
- package/esm/hooks/useUpdateEffect.js +12 -0
- package/esm/icon/components/alert-solid.d.ts +3 -0
- package/esm/icon/components/alert-solid.js +6 -0
- package/esm/icon/components/alert.d.ts +3 -0
- package/esm/icon/components/alert.js +6 -0
- package/esm/icon/components/calendar-solid.d.ts +3 -0
- package/esm/icon/components/calendar-solid.js +6 -0
- package/esm/icon/components/chevron-down.d.ts +3 -0
- package/esm/icon/components/chevron-down.js +6 -0
- package/esm/icon/components/chevron-right-solid.d.ts +3 -0
- package/esm/icon/components/chevron-right-solid.js +6 -0
- package/esm/icon/components/close.d.ts +3 -0
- package/esm/icon/components/close.js +6 -0
- package/esm/icon/components/error-clr.d.ts +3 -0
- package/esm/icon/components/error-clr.js +6 -0
- package/esm/icon/components/error-solid.d.ts +3 -0
- package/esm/icon/components/error-solid.js +6 -0
- package/esm/icon/components/error.d.ts +3 -0
- package/esm/icon/components/error.js +6 -0
- package/esm/icon/components/imagePreview.d.ts +3 -0
- package/esm/icon/components/imagePreview.js +6 -0
- package/esm/icon/components/info.d.ts +3 -0
- package/esm/icon/components/info.js +6 -0
- package/esm/icon/components/play-video.d.ts +3 -0
- package/esm/icon/components/play-video.js +6 -0
- package/esm/icon/components/search.d.ts +3 -0
- package/esm/icon/components/search.js +6 -0
- package/esm/icon/components/tick.d.ts +3 -0
- package/esm/icon/components/tick.js +6 -0
- package/esm/icon/components/tickCircle-solid.d.ts +3 -0
- package/esm/icon/components/tickCircle-solid.js +6 -0
- package/esm/icon/components/user.d.ts +3 -0
- package/esm/icon/components/user.js +6 -0
- package/esm/icon/components/video-non-playable.d.ts +3 -0
- package/esm/icon/components/video-non-playable.js +6 -0
- package/esm/icon/icon.d.ts +4 -0
- package/esm/icon/icon.js +16 -0
- package/esm/icon/index.d.ts +2 -0
- package/esm/icon/index.js +2 -0
- package/esm/icon/styled-components.d.ts +1 -0
- package/esm/icon/styled-components.js +10 -0
- package/esm/icon/types.d.ts +10 -0
- package/esm/icon/types.js +1 -0
- package/esm/image/Image.d.ts +15 -0
- package/esm/image/Image.js +28 -0
- package/esm/image/defaultFallbackImg.d.ts +4 -0
- package/esm/image/defaultFallbackImg.js +13 -0
- package/esm/image/index.d.ts +2 -0
- package/esm/image/index.js +1 -0
- package/esm/image/types.d.ts +27 -0
- package/esm/image/types.js +1 -0
- package/esm/index.d.ts +3 -0
- package/esm/index.js +3 -0
- package/esm/input/basewebAdapters.d.ts +7 -0
- package/esm/input/basewebAdapters.js +45 -0
- package/esm/input/index.d.ts +4 -0
- package/esm/input/index.js +3 -0
- package/esm/input/input.d.ts +14 -0
- package/esm/input/input.js +28 -0
- package/esm/input/styled-components.d.ts +6 -0
- package/esm/input/styled-components.js +129 -0
- package/esm/input/types.d.ts +39 -0
- package/esm/input/types.js +1 -0
- package/esm/layer/LayersManager.d.ts +8 -0
- package/esm/layer/LayersManager.js +20 -0
- package/esm/layer/constants.d.ts +6 -0
- package/esm/layer/constants.js +7 -0
- package/esm/layer/index.d.ts +2 -0
- package/esm/layer/index.js +2 -0
- package/esm/layer/useLayersContextValue.d.ts +3 -0
- package/esm/layer/useLayersContextValue.js +54 -0
- package/esm/link/index.d.ts +2 -0
- package/esm/link/index.js +2 -0
- package/esm/link/link.d.ts +11 -0
- package/esm/link/link.js +12 -0
- package/esm/link/styled-components.d.ts +3 -0
- package/esm/link/styled-components.js +18 -0
- package/esm/link/types.d.ts +4 -0
- package/esm/link/types.js +1 -0
- package/esm/list/avatar-list-item.d.ts +33 -0
- package/esm/list/avatar-list-item.js +18 -0
- package/esm/list/divider.d.ts +13 -0
- package/esm/list/divider.js +15 -0
- package/esm/list/index.d.ts +7 -0
- package/esm/list/index.js +6 -0
- package/esm/list/list-item-text.d.ts +4 -0
- package/esm/list/list-item-text.js +12 -0
- package/esm/list/list-item.d.ts +25 -0
- package/esm/list/list-item.js +51 -0
- package/esm/list/list.d.ts +12 -0
- package/esm/list/list.js +12 -0
- package/esm/list/styled-component.d.ts +9 -0
- package/esm/list/styled-component.js +75 -0
- package/esm/list/types.d.ts +57 -0
- package/esm/list/types.js +1 -0
- package/esm/loader/index.d.ts +3 -0
- package/esm/loader/index.js +2 -0
- package/esm/loader/loader.d.ts +6 -0
- package/esm/loader/loader.js +38 -0
- package/esm/loader/styled-component.d.ts +4 -0
- package/esm/loader/styled-component.js +58 -0
- package/esm/loader/types.d.ts +23 -0
- package/esm/loader/types.js +1 -0
- package/esm/locale/context.d.ts +16 -0
- package/esm/locale/context.js +17 -0
- package/esm/locale/en_US.d.ts +2 -0
- package/esm/locale/en_US.js +68 -0
- package/esm/locale/index.d.ts +3 -0
- package/esm/locale/index.js +2 -0
- package/esm/locale/types.d.ts +21 -0
- package/esm/locale/types.js +1 -0
- package/esm/menu/MenuContext.d.ts +11 -0
- package/esm/menu/MenuContext.js +10 -0
- package/esm/menu/helpers.d.ts +12 -0
- package/esm/menu/helpers.js +77 -0
- package/esm/menu/index.d.ts +4 -0
- package/esm/menu/index.js +3 -0
- package/esm/menu/menu-item.d.ts +45 -0
- package/esm/menu/menu-item.js +80 -0
- package/esm/menu/menu.d.ts +25 -0
- package/esm/menu/menu.js +56 -0
- package/esm/menu/nested-menu-context.d.ts +23 -0
- package/esm/menu/nested-menu-context.js +68 -0
- package/esm/menu/types.d.ts +72 -0
- package/esm/menu/types.js +1 -0
- package/esm/menu/useItemContainerEventHandlers.d.ts +13 -0
- package/esm/menu/useItemContainerEventHandlers.js +32 -0
- package/esm/menu/useKeyboardNavigation.d.ts +23 -0
- package/esm/menu/useKeyboardNavigation.js +125 -0
- package/esm/menu/useStatefulMenu.d.ts +20 -0
- package/esm/menu/useStatefulMenu.js +66 -0
- package/esm/modal/adapter.d.ts +6 -0
- package/esm/modal/adapter.js +18 -0
- package/esm/modal/index.d.ts +7 -0
- package/esm/modal/index.js +6 -0
- package/esm/modal/modal-footer.d.ts +7 -0
- package/esm/modal/modal-footer.js +10 -0
- package/esm/modal/modal-header.d.ts +7 -0
- package/esm/modal/modal-header.js +11 -0
- package/esm/modal/modal.d.ts +7 -0
- package/esm/modal/modal.js +34 -0
- package/esm/modal/overrides.d.ts +9 -0
- package/esm/modal/overrides.js +67 -0
- package/esm/modal/styled-components.d.ts +7 -0
- package/esm/modal/styled-components.js +31 -0
- package/esm/modal/types.d.ts +24 -0
- package/esm/modal/types.js +1 -0
- package/esm/overrides/index.d.ts +3 -0
- package/esm/overrides/index.js +3 -0
- package/esm/overrides/mergeOverrides.d.ts +3 -0
- package/esm/overrides/mergeOverrides.js +42 -0
- package/esm/overrides/types.d.ts +22 -0
- package/esm/overrides/types.js +4 -0
- package/esm/overrides/useOverrides.d.ts +8 -0
- package/esm/overrides/useOverrides.js +14 -0
- package/esm/payment-card/basewebAdapters.d.ts +7 -0
- package/esm/payment-card/basewebAdapters.js +22 -0
- package/esm/payment-card/index.d.ts +3 -0
- package/esm/payment-card/index.js +3 -0
- package/esm/payment-card/paymentCard.d.ts +10 -0
- package/esm/payment-card/paymentCard.js +21 -0
- package/esm/payment-card/styled-components.d.ts +3 -0
- package/esm/payment-card/styled-components.js +12 -0
- package/esm/payment-card/types.d.ts +17 -0
- package/esm/payment-card/types.js +1 -0
- package/esm/phone-input/constants.d.ts +2299 -0
- package/esm/phone-input/constants.js +327 -0
- package/esm/phone-input/country-select-container.d.ts +6 -0
- package/esm/phone-input/country-select-container.js +15 -0
- package/esm/phone-input/country-select.d.ts +8 -0
- package/esm/phone-input/country-select.js +91 -0
- package/esm/phone-input/default-props.d.ts +23 -0
- package/esm/phone-input/default-props.js +25 -0
- package/esm/phone-input/dial-code.d.ts +4 -0
- package/esm/phone-input/dial-code.js +12 -0
- package/esm/phone-input/flag-container.d.ts +5 -0
- package/esm/phone-input/flag-container.js +18 -0
- package/esm/phone-input/index.d.ts +6 -0
- package/esm/phone-input/index.js +5 -0
- package/esm/phone-input/locale.d.ts +5 -0
- package/esm/phone-input/locale.js +1 -0
- package/esm/phone-input/phone-input.d.ts +25 -0
- package/esm/phone-input/phone-input.js +57 -0
- package/esm/phone-input/stateful-phone-input-container.d.ts +4 -0
- package/esm/phone-input/stateful-phone-input-container.js +19 -0
- package/esm/phone-input/stateful-phone-input.d.ts +25 -0
- package/esm/phone-input/stateful-phone-input.js +11 -0
- package/esm/phone-input/styled-components.d.ts +13 -0
- package/esm/phone-input/styled-components.js +35 -0
- package/esm/phone-input/types.d.ts +63 -0
- package/esm/phone-input/types.js +1 -0
- package/esm/phone-input/utils.d.ts +6 -0
- package/esm/phone-input/utils.js +27 -0
- package/esm/phone-input/virtualized-country-select-dropdown.d.ts +31 -0
- package/esm/phone-input/virtualized-country-select-dropdown.js +33 -0
- package/esm/popover/PopoverEnahncer.d.ts +15 -0
- package/esm/popover/PopoverEnahncer.js +57 -0
- package/esm/popover/adapter.d.ts +6 -0
- package/esm/popover/adapter.js +25 -0
- package/esm/popover/constants.d.ts +3 -0
- package/esm/popover/constants.js +8 -0
- package/esm/popover/hooks.d.ts +14 -0
- package/esm/popover/hooks.js +25 -0
- package/esm/popover/index.d.ts +6 -0
- package/esm/popover/index.js +5 -0
- package/esm/popover/overrides.d.ts +8 -0
- package/esm/popover/overrides.js +69 -0
- package/esm/popover/popover.d.ts +16 -0
- package/esm/popover/popover.js +39 -0
- package/esm/popover/stateful-popover.d.ts +7 -0
- package/esm/popover/stateful-popover.js +23 -0
- package/esm/popover/styled-components.d.ts +2 -0
- package/esm/popover/styled-components.js +15 -0
- package/esm/popover/types.d.ts +32 -0
- package/esm/popover/types.js +1 -0
- package/esm/popover/useFoucsLock.d.ts +6 -0
- package/esm/popover/useFoucsLock.js +9 -0
- package/esm/popover/utils.d.ts +14 -0
- package/esm/popover/utils.js +27 -0
- package/esm/progress/circular/CircularProgress.d.ts +4 -0
- package/esm/progress/circular/CircularProgress.js +19 -0
- package/esm/progress/circular/index.d.ts +3 -0
- package/esm/progress/circular/index.js +2 -0
- package/esm/progress/circular/styled-component.d.ts +15 -0
- package/esm/progress/circular/styled-component.js +98 -0
- package/esm/progress/circular/types.d.ts +22 -0
- package/esm/progress/circular/types.js +1 -0
- package/esm/progress/helper.d.ts +3 -0
- package/esm/progress/helper.js +13 -0
- package/esm/progress/index.d.ts +6 -0
- package/esm/progress/index.js +6 -0
- package/esm/progress/linear/LinearProgress.d.ts +4 -0
- package/esm/progress/linear/LinearProgress.js +15 -0
- package/esm/progress/linear/ProgressSegment.d.ts +9 -0
- package/esm/progress/linear/ProgressSegment.js +14 -0
- package/esm/progress/linear/index.d.ts +4 -0
- package/esm/progress/linear/index.js +4 -0
- package/esm/progress/linear/styled-component.d.ts +14 -0
- package/esm/progress/linear/styled-component.js +67 -0
- package/esm/progress/linear/types.d.ts +20 -0
- package/esm/progress/linear/types.js +1 -0
- package/esm/progress/types.d.ts +18 -0
- package/esm/progress/types.js +1 -0
- package/esm/radio/basewebAdapters.d.ts +16 -0
- package/esm/radio/basewebAdapters.js +46 -0
- package/esm/radio/index.d.ts +3 -0
- package/esm/radio/index.js +3 -0
- package/esm/radio/radio.d.ts +10 -0
- package/esm/radio/radio.js +23 -0
- package/esm/radio/styled-components.d.ts +7 -0
- package/esm/radio/styled-components.js +138 -0
- package/esm/radio/types.d.ts +37 -0
- package/esm/radio/types.js +1 -0
- package/esm/search/index.d.ts +2 -0
- package/esm/search/index.js +2 -0
- package/esm/search/search.d.ts +8 -0
- package/esm/search/search.js +66 -0
- package/esm/search/styled-components.d.ts +13 -0
- package/esm/search/styled-components.js +77 -0
- package/esm/search/types.d.ts +19 -0
- package/esm/search/types.js +1 -0
- package/esm/select/adaptor.d.ts +4 -0
- package/esm/select/adaptor.js +5 -0
- package/esm/select/base-select.d.ts +63 -0
- package/esm/select/base-select.js +256 -0
- package/esm/select/constants.d.ts +7 -0
- package/esm/select/constants.js +4 -0
- package/esm/select/default-props.d.ts +38 -0
- package/esm/select/default-props.js +39 -0
- package/esm/select/index.d.ts +15 -0
- package/esm/select/index.js +14 -0
- package/esm/select/locale.d.ts +4 -0
- package/esm/select/locale.js +1 -0
- package/esm/select/mobileSelect/AdaptedCSSTransition/AdaptedCSSTransition.d.ts +8 -0
- package/esm/select/mobileSelect/AdaptedCSSTransition/AdaptedCSSTransition.js +11 -0
- package/esm/select/mobileSelect/AdaptedCSSTransition/constants.d.ts +8 -0
- package/esm/select/mobileSelect/AdaptedCSSTransition/constants.js +8 -0
- package/esm/select/mobileSelect/AdaptedCSSTransition/index.d.ts +1 -0
- package/esm/select/mobileSelect/AdaptedCSSTransition/index.js +1 -0
- package/esm/select/mobileSelect/AdaptedCSSTransition/types.d.ts +2 -0
- package/esm/select/mobileSelect/AdaptedCSSTransition/types.js +1 -0
- package/esm/select/mobileSelect/Backdrop.d.ts +6 -0
- package/esm/select/mobileSelect/Backdrop.js +10 -0
- package/esm/select/mobileSelect/MobileSelect.d.ts +3 -0
- package/esm/select/mobileSelect/MobileSelect.js +20 -0
- package/esm/select/mobileSelect/MobileSheet.d.ts +21 -0
- package/esm/select/mobileSelect/MobileSheet.js +47 -0
- package/esm/select/mobileSelect/SwipeableTargetArea.d.ts +6 -0
- package/esm/select/mobileSelect/SwipeableTargetArea.js +10 -0
- package/esm/select/mobileSelect/hooks/useKeyboardViewportShiftOffset.d.ts +4 -0
- package/esm/select/mobileSelect/hooks/useKeyboardViewportShiftOffset.js +20 -0
- package/esm/select/mobileSelect/hooks/usePauseBodyScrollEffect.d.ts +5 -0
- package/esm/select/mobileSelect/hooks/usePauseBodyScrollEffect.js +14 -0
- package/esm/select/mobileSelect/hooks/useSwipeableSheetStyles.d.ts +13 -0
- package/esm/select/mobileSelect/hooks/useSwipeableSheetStyles.js +53 -0
- package/esm/select/mobileSelect/hooks/useTransitionStyles.d.ts +2 -0
- package/esm/select/mobileSelect/hooks/useTransitionStyles.js +24 -0
- package/esm/select/mobileSelect/index.d.ts +2 -0
- package/esm/select/mobileSelect/index.js +2 -0
- package/esm/select/mobileSelect/overrides.d.ts +9 -0
- package/esm/select/mobileSelect/overrides.js +71 -0
- package/esm/select/multi-value.d.ts +3 -0
- package/esm/select/multi-value.js +26 -0
- package/esm/select/overlaySelect/OverlaySelect.d.ts +3 -0
- package/esm/select/overlaySelect/OverlaySelect.js +62 -0
- package/esm/select/overlaySelect/index.d.ts +1 -0
- package/esm/select/overlaySelect/index.js +1 -0
- package/esm/select/overlaySelect/useOverlaySelectOverrides.d.ts +14 -0
- package/esm/select/overlaySelect/useOverlaySelectOverrides.js +204 -0
- package/esm/select/overlaySelect/usePopover.d.ts +8 -0
- package/esm/select/overlaySelect/usePopover.js +27 -0
- package/esm/select/overrides.d.ts +56 -0
- package/esm/select/overrides.js +125 -0
- package/esm/select/select-variants.d.ts +4 -0
- package/esm/select/select-variants.js +9 -0
- package/esm/select/select.d.ts +42 -0
- package/esm/select/select.js +20 -0
- package/esm/select/selectMenuAdapter/SelectMenuAdapter.d.ts +34 -0
- package/esm/select/selectMenuAdapter/SelectMenuAdapter.js +72 -0
- package/esm/select/selectMenuAdapter/SelectMenuItem.d.ts +57 -0
- package/esm/select/selectMenuAdapter/SelectMenuItem.js +37 -0
- package/esm/select/selectMenuAdapter/index.d.ts +2 -0
- package/esm/select/selectMenuAdapter/index.js +2 -0
- package/esm/select/stateful-select.d.ts +42 -0
- package/esm/select/stateful-select.js +14 -0
- package/esm/select/styled-component.d.ts +18 -0
- package/esm/select/styled-component.js +53 -0
- package/esm/select/types.d.ts +91 -0
- package/esm/select/types.js +1 -0
- package/esm/select/utils/default-filter-options.d.ts +1 -0
- package/esm/select/utils/default-filter-options.js +2 -0
- package/esm/setupTests.d.ts +1 -0
- package/esm/setupTests.js +21 -0
- package/esm/slider/index.d.ts +4 -0
- package/esm/slider/index.js +4 -0
- package/esm/slider/mark.d.ts +21 -0
- package/esm/slider/mark.js +11 -0
- package/esm/slider/slider.d.ts +7 -0
- package/esm/slider/slider.js +73 -0
- package/esm/slider/stateful-slider-container.d.ts +7 -0
- package/esm/slider/stateful-slider-container.js +11 -0
- package/esm/slider/stateful-slider.d.ts +7 -0
- package/esm/slider/stateful-slider.js +7 -0
- package/esm/slider/styled-components.d.ts +7 -0
- package/esm/slider/styled-components.js +90 -0
- package/esm/slider/types.d.ts +39 -0
- package/esm/slider/types.js +1 -0
- package/esm/snackbar/Snackbar.d.ts +4 -0
- package/esm/snackbar/Snackbar.js +57 -0
- package/esm/snackbar/constants.d.ts +6 -0
- package/esm/snackbar/constants.js +14 -0
- package/esm/snackbar/index.d.ts +2 -0
- package/esm/snackbar/index.js +2 -0
- package/esm/snackbar/styled-component.d.ts +8 -0
- package/esm/snackbar/styled-component.js +80 -0
- package/esm/snackbar/types.d.ts +37 -0
- package/esm/snackbar/types.js +1 -0
- package/esm/snackbar/useSnackbar.d.ts +24 -0
- package/esm/snackbar/useSnackbar.js +89 -0
- package/esm/spaceConsumer/SpaceConsumer.d.ts +10 -0
- package/esm/spaceConsumer/SpaceConsumer.js +9 -0
- package/esm/spaceConsumer/index.d.ts +1 -0
- package/esm/spaceConsumer/index.js +1 -0
- package/esm/spacewebProvider/CustomBaseProvider.d.ts +17 -0
- package/esm/spacewebProvider/CustomBaseProvider.js +14 -0
- package/esm/spacewebProvider/DocumentProvider.d.ts +9 -0
- package/esm/spacewebProvider/DocumentProvider.js +17 -0
- package/esm/spacewebProvider/SpacewebProvider.d.ts +22 -0
- package/esm/spacewebProvider/SpacewebProvider.js +34 -0
- package/esm/spacewebProvider/index.d.ts +2 -0
- package/esm/spacewebProvider/index.js +2 -0
- package/esm/spacewebProvider/utils.d.ts +1 -0
- package/esm/spacewebProvider/utils.js +2 -0
- package/esm/stack/context.d.ts +20 -0
- package/esm/stack/context.js +6 -0
- package/esm/stack/index.d.ts +3 -0
- package/esm/stack/index.js +3 -0
- package/esm/stack/stack-item.d.ts +12 -0
- package/esm/stack/stack-item.js +23 -0
- package/esm/stack/stack.d.ts +32 -0
- package/esm/stack/stack.js +58 -0
- package/esm/stack/types.d.ts +22 -0
- package/esm/stack/types.js +1 -0
- package/esm/style/__fixtures__/utilities-dark.fixture.d.ts +4407 -0
- package/esm/style/__fixtures__/utilities-dark.fixture.js +4409 -0
- package/esm/style/__mocks__/CSS.mock.d.ts +10 -0
- package/esm/style/__mocks__/CSS.mock.js +9 -0
- package/esm/style/__mocks__/UseStyle.mock.d.ts +10 -0
- package/esm/style/__mocks__/UseStyle.mock.js +8 -0
- package/esm/style/_buildUtils.d.ts +4 -0
- package/esm/style/_buildUtils.js +10 -0
- package/esm/style/_css.d.ts +6 -0
- package/esm/style/_css.js +18 -0
- package/esm/style/_escapeClassName.d.ts +6 -0
- package/esm/style/_escapeClassName.js +6 -0
- package/esm/style/_getStyle.d.ts +6 -0
- package/esm/style/_getStyle.js +15 -0
- package/esm/style/_getStyleWithProps.d.ts +6 -0
- package/esm/style/_getStyleWithProps.js +15 -0
- package/esm/style/_parseStyle.d.ts +19 -0
- package/esm/style/_parseStyle.js +68 -0
- package/esm/style/_px2rem.d.ts +9 -0
- package/esm/style/_px2rem.js +14 -0
- package/esm/style/index.d.ts +5 -0
- package/esm/style/index.js +5 -0
- package/esm/style/styled.d.ts +11 -0
- package/esm/style/styled.js +40 -0
- package/esm/style/useMemoizedStyletron.d.ts +5 -0
- package/esm/style/useMemoizedStyletron.js +14 -0
- package/esm/style/useStyle.d.ts +6 -0
- package/esm/style/useStyle.js +14 -0
- package/esm/styleEngine/index.d.ts +1 -0
- package/esm/styleEngine/index.js +1 -0
- package/esm/styleEngine/styleEngine.d.ts +19 -0
- package/esm/styleEngine/styleEngine.js +94 -0
- package/esm/styleEngine/utils.d.ts +0 -0
- package/esm/styleEngine/utils.js +0 -0
- package/esm/switch/__test__/switch.spec.d.ts +1 -0
- package/esm/switch/__test__/switch.spec.js +94 -0
- package/esm/switch/basewebAdapter.d.ts +5 -0
- package/esm/switch/basewebAdapter.js +18 -0
- package/esm/switch/index.d.ts +3 -0
- package/esm/switch/index.js +3 -0
- package/esm/switch/styled-components.d.ts +5 -0
- package/esm/switch/styled-components.js +82 -0
- package/esm/switch/switch.d.ts +10 -0
- package/esm/switch/switch.js +15 -0
- package/esm/switch/types.d.ts +28 -0
- package/esm/switch/types.js +1 -0
- package/esm/tabs/contexts.d.ts +12 -0
- package/esm/tabs/contexts.js +11 -0
- package/esm/tabs/helpers.d.ts +5 -0
- package/esm/tabs/helpers.js +6 -0
- package/esm/tabs/index.d.ts +5 -0
- package/esm/tabs/index.js +5 -0
- package/esm/tabs/stateful-tabs.d.ts +8 -0
- package/esm/tabs/stateful-tabs.js +20 -0
- package/esm/tabs/styled-components.d.ts +10 -0
- package/esm/tabs/styled-components.js +43 -0
- package/esm/tabs/tab-list.d.ts +7 -0
- package/esm/tabs/tab-list.js +43 -0
- package/esm/tabs/tab.d.ts +7 -0
- package/esm/tabs/tab.js +36 -0
- package/esm/tabs/tabs-panel.d.ts +7 -0
- package/esm/tabs/tabs-panel.js +18 -0
- package/esm/tabs/types.d.ts +52 -0
- package/esm/tabs/types.js +1 -0
- package/esm/tag/avatar-tag.d.ts +4 -0
- package/esm/tag/avatar-tag.js +24 -0
- package/esm/tag/index.d.ts +4 -0
- package/esm/tag/index.js +3 -0
- package/esm/tag/intentStyles.d.ts +4 -0
- package/esm/tag/intentStyles.js +85 -0
- package/esm/tag/styled-components.d.ts +4 -0
- package/esm/tag/styled-components.js +46 -0
- package/esm/tag/tag.d.ts +4 -0
- package/esm/tag/tag.js +55 -0
- package/esm/tag/types.d.ts +53 -0
- package/esm/tag/types.js +1 -0
- package/esm/tag/utils.d.ts +2 -0
- package/esm/tag/utils.js +19 -0
- package/esm/test-utils/test-provider/TestProvider.d.ts +6 -0
- package/esm/test-utils/test-provider/TestProvider.js +14 -0
- package/esm/test-utils/test-provider/helpers.d.ts +27 -0
- package/esm/test-utils/test-provider/helpers.js +55 -0
- package/esm/test-utils/test-provider/index.d.ts +2 -0
- package/esm/test-utils/test-provider/index.js +2 -0
- package/esm/test-utils/test-provider/testableThemes.d.ts +5 -0
- package/esm/test-utils/test-provider/testableThemes.js +9 -0
- package/esm/textarea/basewebAdapters.d.ts +3 -0
- package/esm/textarea/basewebAdapters.js +32 -0
- package/esm/textarea/index.d.ts +3 -0
- package/esm/textarea/index.js +3 -0
- package/esm/textarea/styled-components.d.ts +11 -0
- package/esm/textarea/styled-components.js +14 -0
- package/esm/textarea/textarea.d.ts +10 -0
- package/esm/textarea/textarea.js +33 -0
- package/esm/textarea/types.d.ts +27 -0
- package/esm/textarea/types.js +1 -0
- package/esm/textarea/useAutoSizeTextarea.d.ts +8 -0
- package/esm/textarea/useAutoSizeTextarea.js +14 -0
- package/esm/theme/context.d.ts +14 -0
- package/esm/theme/context.js +65 -0
- package/esm/theme/index.d.ts +2 -0
- package/esm/theme/index.js +2 -0
- package/esm/theme/types.d.ts +6 -0
- package/esm/theme/types.js +1 -0
- package/esm/themes/dark-theme.d.ts +6 -0
- package/esm/themes/dark-theme.js +9 -0
- package/esm/themes/index.d.ts +10 -0
- package/esm/themes/index.js +18 -0
- package/esm/themes/light-theme.d.ts +6 -0
- package/esm/themes/light-theme.js +9 -0
- package/esm/themes/responsive-theme.d.ts +20 -0
- package/esm/themes/responsive-theme.js +19 -0
- package/esm/themes/shared.d.ts +4 -0
- package/esm/themes/shared.js +4 -0
- package/esm/time-picker/TimePicker.d.ts +8 -0
- package/esm/time-picker/TimePicker.js +28 -0
- package/esm/time-picker/index.d.ts +2 -0
- package/esm/time-picker/index.js +1 -0
- package/esm/time-picker/types.d.ts +15 -0
- package/esm/time-picker/types.js +1 -0
- package/esm/time-range-picker/RangeSelector.d.ts +7 -0
- package/esm/time-range-picker/RangeSelector.js +25 -0
- package/esm/time-range-picker/RangeSelectorContainer.d.ts +7 -0
- package/esm/time-range-picker/RangeSelectorContainer.js +101 -0
- package/esm/time-range-picker/TimeRangeList.d.ts +7 -0
- package/esm/time-range-picker/TimeRangeList.js +33 -0
- package/esm/time-range-picker/TimeRangePicker.d.ts +3 -0
- package/esm/time-range-picker/TimeRangePicker.js +186 -0
- package/esm/time-range-picker/TimezonePicker.d.ts +5 -0
- package/esm/time-range-picker/TimezonePicker.js +41 -0
- package/esm/time-range-picker/constants.d.ts +5 -0
- package/esm/time-range-picker/constants.js +5 -0
- package/esm/time-range-picker/index.d.ts +4 -0
- package/esm/time-range-picker/index.js +2 -0
- package/esm/time-range-picker/locale.d.ts +41 -0
- package/esm/time-range-picker/locale.js +1 -0
- package/esm/time-range-picker/styled-component.d.ts +1 -0
- package/esm/time-range-picker/styled-component.js +2 -0
- package/esm/time-range-picker/types.d.ts +78 -0
- package/esm/time-range-picker/types.js +1 -0
- package/esm/time-range-picker/utils.d.ts +42 -0
- package/esm/time-range-picker/utils.js +411 -0
- package/esm/time-zone-picker/TimezonePicker.d.ts +8 -0
- package/esm/time-zone-picker/TimezonePicker.js +52 -0
- package/esm/time-zone-picker/index.d.ts +2 -0
- package/esm/time-zone-picker/index.js +2 -0
- package/esm/time-zone-picker/types.d.ts +25 -0
- package/esm/time-zone-picker/types.js +1 -0
- package/esm/time-zone-picker/utils.d.ts +2 -0
- package/esm/time-zone-picker/utils.js +38 -0
- package/esm/tooltip/disabled-tooltip-container.d.ts +8 -0
- package/esm/tooltip/disabled-tooltip-container.js +63 -0
- package/esm/tooltip/index.d.ts +6 -0
- package/esm/tooltip/index.js +5 -0
- package/esm/tooltip/overrides.d.ts +5 -0
- package/esm/tooltip/overrides.js +54 -0
- package/esm/tooltip/stateful-tooltip-container.d.ts +8 -0
- package/esm/tooltip/stateful-tooltip-container.js +8 -0
- package/esm/tooltip/stateful-tooltip.d.ts +8 -0
- package/esm/tooltip/stateful-tooltip.js +14 -0
- package/esm/tooltip/styled-component.d.ts +2 -0
- package/esm/tooltip/styled-component.js +3 -0
- package/esm/tooltip/tooltip.d.ts +7 -0
- package/esm/tooltip/tooltip.js +46 -0
- package/esm/tooltip/types.d.ts +51 -0
- package/esm/tooltip/types.js +1 -0
- package/esm/types.d.ts +98 -0
- package/esm/types.js +2 -0
- package/esm/typography/Typography.d.ts +12 -0
- package/esm/typography/Typography.js +27 -0
- package/esm/typography/constants.d.ts +6 -0
- package/esm/typography/constants.js +6 -0
- package/esm/typography/index.d.ts +2 -0
- package/esm/typography/index.js +1 -0
- package/esm/typography/styled-components.d.ts +1 -0
- package/esm/typography/styled-components.js +10 -0
- package/esm/typography/types.d.ts +9 -0
- package/esm/typography/types.js +1 -0
- package/esm/utility-types/index.d.ts +1 -0
- package/esm/utility-types/index.js +1 -0
- package/esm/video/Video.d.ts +15 -0
- package/esm/video/Video.js +38 -0
- package/esm/video/index.d.ts +2 -0
- package/esm/video/index.js +1 -0
- package/esm/video/types.d.ts +17 -0
- package/esm/video/types.js +1 -0
- package/form-control/context.d.ts +22 -0
- package/form-control/context.js +23 -0
- package/form-control/form-control.d.ts +4 -0
- package/form-control/form-control.js +57 -0
- package/form-control/index.d.ts +3 -0
- package/form-control/index.js +14 -0
- package/form-control/package.json +4 -0
- package/form-control/styled-component.d.ts +8 -0
- package/form-control/styled-component.js +36 -0
- package/form-control/types.d.ts +46 -0
- package/form-control/types.js +2 -0
- package/grid/Col.d.ts +10 -0
- package/grid/Col.js +48 -0
- package/grid/Grid.d.ts +22 -0
- package/grid/Grid.js +62 -0
- package/grid/index.d.ts +6 -0
- package/grid/index.js +8 -0
- package/grid/package.json +4 -0
- package/grid/types.d.ts +32 -0
- package/grid/types.js +2 -0
- package/grid/utils.d.ts +1 -0
- package/grid/utils.js +31 -0
- package/helpers/ClearIconButton.d.ts +5 -0
- package/helpers/ClearIconButton.js +22 -0
- package/helpers/baseui/useConvertOverrides.d.ts +15 -0
- package/helpers/baseui/useConvertOverrides.js +35 -0
- package/helpers/baseui/withThemeOverride.d.ts +9 -0
- package/helpers/baseui/withThemeOverride.js +23 -0
- package/helpers/commonStyles.d.ts +17 -0
- package/helpers/commonStyles.js +54 -0
- package/helpers/index.d.ts +25 -0
- package/helpers/index.js +72 -0
- package/helpers/intentHelper.d.ts +5 -0
- package/helpers/intentHelper.js +21 -0
- package/helpers/longHandHelpers.d.ts +7 -0
- package/helpers/longHandHelpers.js +45 -0
- package/helpers/package.json +4 -0
- package/helpers/styletron.d.ts +12 -0
- package/helpers/styletron.js +16 -0
- package/helpers/themeHelpers.d.ts +4 -0
- package/helpers/themeHelpers.js +24 -0
- package/helpers/typography.d.ts +2 -0
- package/helpers/typography.js +10 -0
- package/hooks/package.json +4 -0
- package/hooks/useAutoFocus.d.ts +9 -0
- package/hooks/useAutoFocus.js +61 -0
- package/hooks/useCombinedHandler.d.ts +6 -0
- package/hooks/useCombinedHandler.js +22 -0
- package/hooks/useCombinedRef.d.ts +6 -0
- package/hooks/useCombinedRef.js +37 -0
- package/hooks/useDebouncedEventHandler.d.ts +6 -0
- package/hooks/useDebouncedEventHandler.js +38 -0
- package/hooks/useFirstMountState.d.ts +2 -0
- package/hooks/useFirstMountState.js +16 -0
- package/hooks/useFocusVisible.d.ts +5 -0
- package/hooks/useFocusVisible.js +26 -0
- package/hooks/useIsomorphicLayoutEffect.d.ts +2 -0
- package/hooks/useIsomorphicLayoutEffect.js +6 -0
- package/hooks/useLatest.d.ts +4 -0
- package/hooks/useLatest.js +13 -0
- package/hooks/useMeasure.d.ts +6 -0
- package/hooks/useMeasure.js +43 -0
- package/hooks/usePrevious.d.ts +2 -0
- package/hooks/usePrevious.js +13 -0
- package/hooks/useScrollCapture.d.ts +5 -0
- package/hooks/useScrollCapture.js +69 -0
- package/hooks/useStickyElement.d.ts +5 -0
- package/hooks/useStickyElement.js +34 -0
- package/hooks/useTabsKeyboardNavigation.d.ts +14 -0
- package/hooks/useTabsKeyboardNavigation.js +103 -0
- package/hooks/useUniqueId.d.ts +3 -0
- package/hooks/useUniqueId.js +11 -0
- package/hooks/useUpdateEffect.d.ts +3 -0
- package/hooks/useUpdateEffect.js +14 -0
- package/icon/components/alert-solid.d.ts +3 -0
- package/icon/components/alert-solid.js +9 -0
- package/icon/components/alert.d.ts +3 -0
- package/icon/components/alert.js +9 -0
- package/icon/components/calendar-solid.d.ts +3 -0
- package/icon/components/calendar-solid.js +9 -0
- package/icon/components/chevron-down.d.ts +3 -0
- package/icon/components/chevron-down.js +9 -0
- package/icon/components/chevron-right-solid.d.ts +3 -0
- package/icon/components/chevron-right-solid.js +9 -0
- package/icon/components/close.d.ts +3 -0
- package/icon/components/close.js +9 -0
- package/icon/components/error-clr.d.ts +3 -0
- package/icon/components/error-clr.js +9 -0
- package/icon/components/error-solid.d.ts +3 -0
- package/icon/components/error-solid.js +9 -0
- package/icon/components/error.d.ts +3 -0
- package/icon/components/error.js +9 -0
- package/icon/components/imagePreview.d.ts +3 -0
- package/icon/components/imagePreview.js +9 -0
- package/icon/components/info.d.ts +3 -0
- package/icon/components/info.js +9 -0
- package/icon/components/play-video.d.ts +3 -0
- package/icon/components/play-video.js +9 -0
- package/icon/components/search.d.ts +3 -0
- package/icon/components/search.js +9 -0
- package/icon/components/tick.d.ts +3 -0
- package/icon/components/tick.js +9 -0
- package/icon/components/tickCircle-solid.d.ts +3 -0
- package/icon/components/tickCircle-solid.js +9 -0
- package/icon/components/user.d.ts +3 -0
- package/icon/components/user.js +9 -0
- package/icon/components/video-non-playable.d.ts +3 -0
- package/icon/components/video-non-playable.js +9 -0
- package/icon/icon.d.ts +4 -0
- package/icon/icon.js +18 -0
- package/icon/index.d.ts +2 -0
- package/icon/index.js +7 -0
- package/icon/package.json +4 -0
- package/icon/styled-components.d.ts +1 -0
- package/icon/styled-components.js +13 -0
- package/icon/types.d.ts +10 -0
- package/icon/types.js +2 -0
- package/image/Image.d.ts +15 -0
- package/image/Image.js +30 -0
- package/image/defaultFallbackImg.d.ts +4 -0
- package/image/defaultFallbackImg.js +15 -0
- package/image/index.d.ts +2 -0
- package/image/index.js +8 -0
- package/image/package.json +4 -0
- package/image/types.d.ts +27 -0
- package/image/types.js +2 -0
- package/index.d.ts +3 -0
- package/index.js +6 -0
- package/input/basewebAdapters.d.ts +7 -0
- package/input/basewebAdapters.js +47 -0
- package/input/index.d.ts +4 -0
- package/input/index.js +20 -0
- package/input/input.d.ts +14 -0
- package/input/input.js +34 -0
- package/input/package.json +4 -0
- package/input/styled-components.d.ts +6 -0
- package/input/styled-components.js +134 -0
- package/input/types.d.ts +39 -0
- package/input/types.js +2 -0
- package/layer/LayersManager.d.ts +8 -0
- package/layer/LayersManager.js +22 -0
- package/layer/constants.d.ts +6 -0
- package/layer/constants.js +10 -0
- package/layer/index.d.ts +2 -0
- package/layer/index.js +11 -0
- package/layer/package.json +4 -0
- package/layer/useLayersContextValue.d.ts +3 -0
- package/layer/useLayersContextValue.js +56 -0
- package/link/index.d.ts +2 -0
- package/link/index.js +7 -0
- package/link/link.d.ts +11 -0
- package/link/link.js +14 -0
- package/link/package.json +4 -0
- package/link/styled-components.d.ts +3 -0
- package/link/styled-components.js +22 -0
- package/link/types.d.ts +4 -0
- package/link/types.js +2 -0
- package/list/avatar-list-item.d.ts +33 -0
- package/list/avatar-list-item.js +20 -0
- package/list/divider.d.ts +13 -0
- package/list/divider.js +17 -0
- package/list/index.d.ts +7 -0
- package/list/index.js +22 -0
- package/list/list-item-text.d.ts +4 -0
- package/list/list-item-text.js +14 -0
- package/list/list-item.d.ts +25 -0
- package/list/list-item.js +53 -0
- package/list/list.d.ts +12 -0
- package/list/list.js +14 -0
- package/list/package.json +4 -0
- package/list/styled-component.d.ts +9 -0
- package/list/styled-component.js +78 -0
- package/list/types.d.ts +57 -0
- package/list/types.js +2 -0
- package/loader/index.d.ts +3 -0
- package/loader/index.js +12 -0
- package/loader/loader.d.ts +6 -0
- package/loader/loader.js +41 -0
- package/loader/package.json +4 -0
- package/loader/styled-component.d.ts +4 -0
- package/loader/styled-component.js +61 -0
- package/loader/types.d.ts +23 -0
- package/loader/types.js +2 -0
- package/locale/context.d.ts +16 -0
- package/locale/context.js +22 -0
- package/locale/en_US.d.ts +2 -0
- package/locale/en_US.js +71 -0
- package/locale/index.d.ts +3 -0
- package/locale/index.js +9 -0
- package/locale/package.json +4 -0
- package/locale/types.d.ts +21 -0
- package/locale/types.js +2 -0
- package/menu/MenuContext.d.ts +11 -0
- package/menu/MenuContext.js +14 -0
- package/menu/helpers.d.ts +12 -0
- package/menu/helpers.js +83 -0
- package/menu/index.d.ts +4 -0
- package/menu/index.js +12 -0
- package/menu/menu-item.d.ts +45 -0
- package/menu/menu-item.js +82 -0
- package/menu/menu.d.ts +25 -0
- package/menu/menu.js +58 -0
- package/menu/nested-menu-context.d.ts +23 -0
- package/menu/nested-menu-context.js +72 -0
- package/menu/package.json +4 -0
- package/menu/types.d.ts +72 -0
- package/menu/types.js +2 -0
- package/menu/useItemContainerEventHandlers.d.ts +13 -0
- package/menu/useItemContainerEventHandlers.js +35 -0
- package/menu/useKeyboardNavigation.d.ts +23 -0
- package/menu/useKeyboardNavigation.js +127 -0
- package/menu/useStatefulMenu.d.ts +20 -0
- package/menu/useStatefulMenu.js +69 -0
- package/modal/adapter.d.ts +6 -0
- package/modal/adapter.js +22 -0
- package/modal/index.d.ts +7 -0
- package/modal/index.js +24 -0
- package/modal/modal-footer.d.ts +7 -0
- package/modal/modal-footer.js +12 -0
- package/modal/modal-header.d.ts +7 -0
- package/modal/modal-header.js +13 -0
- package/modal/modal.d.ts +7 -0
- package/modal/modal.js +36 -0
- package/modal/overrides.d.ts +9 -0
- package/modal/overrides.js +71 -0
- package/modal/package.json +4 -0
- package/modal/styled-components.d.ts +7 -0
- package/modal/styled-components.js +40 -0
- package/modal/types.d.ts +24 -0
- package/modal/types.js +5 -0
- package/overrides/index.d.ts +3 -0
- package/overrides/index.js +10 -0
- package/overrides/mergeOverrides.d.ts +3 -0
- package/overrides/mergeOverrides.js +45 -0
- package/overrides/package.json +4 -0
- package/overrides/types.d.ts +22 -0
- package/overrides/types.js +5 -0
- package/overrides/useOverrides.d.ts +8 -0
- package/overrides/useOverrides.js +18 -0
- package/package.json +102 -0
- package/payment-card/basewebAdapters.d.ts +7 -0
- package/payment-card/basewebAdapters.js +24 -0
- package/payment-card/index.d.ts +3 -0
- package/payment-card/index.js +11 -0
- package/payment-card/package.json +4 -0
- package/payment-card/paymentCard.d.ts +10 -0
- package/payment-card/paymentCard.js +26 -0
- package/payment-card/styled-components.d.ts +3 -0
- package/payment-card/styled-components.js +16 -0
- package/payment-card/types.d.ts +17 -0
- package/payment-card/types.js +2 -0
- package/phone-input/constants.d.ts +2299 -0
- package/phone-input/constants.js +330 -0
- package/phone-input/country-select-container.d.ts +6 -0
- package/phone-input/country-select-container.js +17 -0
- package/phone-input/country-select.d.ts +8 -0
- package/phone-input/country-select.js +93 -0
- package/phone-input/default-props.d.ts +23 -0
- package/phone-input/default-props.js +27 -0
- package/phone-input/dial-code.d.ts +4 -0
- package/phone-input/dial-code.js +14 -0
- package/phone-input/flag-container.d.ts +5 -0
- package/phone-input/flag-container.js +20 -0
- package/phone-input/index.d.ts +6 -0
- package/phone-input/index.js +12 -0
- package/phone-input/locale.d.ts +5 -0
- package/phone-input/locale.js +2 -0
- package/phone-input/package.json +4 -0
- package/phone-input/phone-input.d.ts +25 -0
- package/phone-input/phone-input.js +59 -0
- package/phone-input/stateful-phone-input-container.d.ts +4 -0
- package/phone-input/stateful-phone-input-container.js +21 -0
- package/phone-input/stateful-phone-input.d.ts +25 -0
- package/phone-input/stateful-phone-input.js +13 -0
- package/phone-input/styled-components.d.ts +13 -0
- package/phone-input/styled-components.js +39 -0
- package/phone-input/types.d.ts +63 -0
- package/phone-input/types.js +2 -0
- package/phone-input/utils.d.ts +6 -0
- package/phone-input/utils.js +34 -0
- package/phone-input/virtualized-country-select-dropdown.d.ts +31 -0
- package/phone-input/virtualized-country-select-dropdown.js +35 -0
- package/popover/PopoverEnahncer.d.ts +15 -0
- package/popover/PopoverEnahncer.js +60 -0
- package/popover/adapter.d.ts +6 -0
- package/popover/adapter.js +28 -0
- package/popover/constants.d.ts +3 -0
- package/popover/constants.js +11 -0
- package/popover/hooks.d.ts +14 -0
- package/popover/hooks.js +30 -0
- package/popover/index.d.ts +6 -0
- package/popover/index.js +21 -0
- package/popover/overrides.d.ts +8 -0
- package/popover/overrides.js +74 -0
- package/popover/package.json +4 -0
- package/popover/popover.d.ts +16 -0
- package/popover/popover.js +41 -0
- package/popover/stateful-popover.d.ts +7 -0
- package/popover/stateful-popover.js +25 -0
- package/popover/styled-components.d.ts +2 -0
- package/popover/styled-components.js +23 -0
- package/popover/types.d.ts +32 -0
- package/popover/types.js +10 -0
- package/popover/useFoucsLock.d.ts +6 -0
- package/popover/useFoucsLock.js +13 -0
- package/popover/utils.d.ts +14 -0
- package/popover/utils.js +32 -0
- package/progress/circular/CircularProgress.d.ts +4 -0
- package/progress/circular/CircularProgress.js +21 -0
- package/progress/circular/index.d.ts +3 -0
- package/progress/circular/index.js +5 -0
- package/progress/circular/styled-component.d.ts +15 -0
- package/progress/circular/styled-component.js +102 -0
- package/progress/circular/types.d.ts +22 -0
- package/progress/circular/types.js +2 -0
- package/progress/helper.d.ts +3 -0
- package/progress/helper.js +17 -0
- package/progress/index.d.ts +6 -0
- package/progress/index.js +13 -0
- package/progress/linear/LinearProgress.d.ts +4 -0
- package/progress/linear/LinearProgress.js +17 -0
- package/progress/linear/ProgressSegment.d.ts +9 -0
- package/progress/linear/ProgressSegment.js +16 -0
- package/progress/linear/index.d.ts +4 -0
- package/progress/linear/index.js +9 -0
- package/progress/linear/styled-component.d.ts +14 -0
- package/progress/linear/styled-component.js +72 -0
- package/progress/linear/types.d.ts +20 -0
- package/progress/linear/types.js +2 -0
- package/progress/package.json +4 -0
- package/progress/types.d.ts +18 -0
- package/progress/types.js +2 -0
- package/radio/basewebAdapters.d.ts +16 -0
- package/radio/basewebAdapters.js +51 -0
- package/radio/index.d.ts +3 -0
- package/radio/index.js +19 -0
- package/radio/package.json +4 -0
- package/radio/radio.d.ts +10 -0
- package/radio/radio.js +28 -0
- package/radio/styled-components.d.ts +7 -0
- package/radio/styled-components.js +145 -0
- package/radio/types.d.ts +37 -0
- package/radio/types.js +2 -0
- package/search/index.d.ts +2 -0
- package/search/index.js +7 -0
- package/search/package.json +4 -0
- package/search/search.d.ts +8 -0
- package/search/search.js +71 -0
- package/search/styled-components.d.ts +13 -0
- package/search/styled-components.js +80 -0
- package/search/types.d.ts +19 -0
- package/search/types.js +2 -0
- package/select/adaptor.d.ts +4 -0
- package/select/adaptor.js +8 -0
- package/select/base-select.d.ts +63 -0
- package/select/base-select.js +258 -0
- package/select/constants.d.ts +7 -0
- package/select/constants.js +7 -0
- package/select/default-props.d.ts +38 -0
- package/select/default-props.js +42 -0
- package/select/index.d.ts +15 -0
- package/select/index.js +47 -0
- package/select/locale.d.ts +4 -0
- package/select/locale.js +2 -0
- package/select/mobileSelect/AdaptedCSSTransition/AdaptedCSSTransition.d.ts +8 -0
- package/select/mobileSelect/AdaptedCSSTransition/AdaptedCSSTransition.js +14 -0
- package/select/mobileSelect/AdaptedCSSTransition/constants.d.ts +8 -0
- package/select/mobileSelect/AdaptedCSSTransition/constants.js +11 -0
- package/select/mobileSelect/AdaptedCSSTransition/index.d.ts +1 -0
- package/select/mobileSelect/AdaptedCSSTransition/index.js +5 -0
- package/select/mobileSelect/AdaptedCSSTransition/types.d.ts +2 -0
- package/select/mobileSelect/AdaptedCSSTransition/types.js +2 -0
- package/select/mobileSelect/Backdrop.d.ts +6 -0
- package/select/mobileSelect/Backdrop.js +13 -0
- package/select/mobileSelect/MobileSelect.d.ts +3 -0
- package/select/mobileSelect/MobileSelect.js +23 -0
- package/select/mobileSelect/MobileSheet.d.ts +21 -0
- package/select/mobileSelect/MobileSheet.js +51 -0
- package/select/mobileSelect/SwipeableTargetArea.d.ts +6 -0
- package/select/mobileSelect/SwipeableTargetArea.js +14 -0
- package/select/mobileSelect/hooks/useKeyboardViewportShiftOffset.d.ts +4 -0
- package/select/mobileSelect/hooks/useKeyboardViewportShiftOffset.js +24 -0
- package/select/mobileSelect/hooks/usePauseBodyScrollEffect.d.ts +5 -0
- package/select/mobileSelect/hooks/usePauseBodyScrollEffect.js +19 -0
- package/select/mobileSelect/hooks/useSwipeableSheetStyles.d.ts +13 -0
- package/select/mobileSelect/hooks/useSwipeableSheetStyles.js +57 -0
- package/select/mobileSelect/hooks/useTransitionStyles.d.ts +2 -0
- package/select/mobileSelect/hooks/useTransitionStyles.js +29 -0
- package/select/mobileSelect/index.d.ts +2 -0
- package/select/mobileSelect/index.js +7 -0
- package/select/mobileSelect/overrides.d.ts +9 -0
- package/select/mobileSelect/overrides.js +75 -0
- package/select/multi-value.d.ts +3 -0
- package/select/multi-value.js +29 -0
- package/select/overlaySelect/OverlaySelect.d.ts +3 -0
- package/select/overlaySelect/OverlaySelect.js +64 -0
- package/select/overlaySelect/index.d.ts +1 -0
- package/select/overlaySelect/index.js +8 -0
- package/select/overlaySelect/useOverlaySelectOverrides.d.ts +14 -0
- package/select/overlaySelect/useOverlaySelectOverrides.js +206 -0
- package/select/overlaySelect/usePopover.d.ts +8 -0
- package/select/overlaySelect/usePopover.js +29 -0
- package/select/overrides.d.ts +56 -0
- package/select/overrides.js +133 -0
- package/select/package.json +4 -0
- package/select/select-variants.d.ts +4 -0
- package/select/select-variants.js +14 -0
- package/select/select.d.ts +42 -0
- package/select/select.js +22 -0
- package/select/selectMenuAdapter/SelectMenuAdapter.d.ts +34 -0
- package/select/selectMenuAdapter/SelectMenuAdapter.js +74 -0
- package/select/selectMenuAdapter/SelectMenuItem.d.ts +57 -0
- package/select/selectMenuAdapter/SelectMenuItem.js +39 -0
- package/select/selectMenuAdapter/index.d.ts +2 -0
- package/select/selectMenuAdapter/index.js +5 -0
- package/select/stateful-select.d.ts +42 -0
- package/select/stateful-select.js +16 -0
- package/select/styled-component.d.ts +18 -0
- package/select/styled-component.js +74 -0
- package/select/types.d.ts +91 -0
- package/select/types.js +4 -0
- package/select/utils/default-filter-options.d.ts +1 -0
- package/select/utils/default-filter-options.js +9 -0
- package/setupTests.d.ts +1 -0
- package/setupTests.js +24 -0
- package/slider/index.d.ts +4 -0
- package/slider/index.js +11 -0
- package/slider/mark.d.ts +21 -0
- package/slider/mark.js +13 -0
- package/slider/package.json +4 -0
- package/slider/slider.d.ts +7 -0
- package/slider/slider.js +75 -0
- package/slider/stateful-slider-container.d.ts +7 -0
- package/slider/stateful-slider-container.js +13 -0
- package/slider/stateful-slider.d.ts +7 -0
- package/slider/stateful-slider.js +9 -0
- package/slider/styled-components.d.ts +7 -0
- package/slider/styled-components.js +93 -0
- package/slider/types.d.ts +39 -0
- package/slider/types.js +2 -0
- package/snackbar/Snackbar.d.ts +4 -0
- package/snackbar/Snackbar.js +59 -0
- package/snackbar/constants.d.ts +6 -0
- package/snackbar/constants.js +18 -0
- package/snackbar/index.d.ts +2 -0
- package/snackbar/index.js +7 -0
- package/snackbar/package.json +4 -0
- package/snackbar/styled-component.d.ts +8 -0
- package/snackbar/styled-component.js +84 -0
- package/snackbar/types.d.ts +37 -0
- package/snackbar/types.js +2 -0
- package/snackbar/useSnackbar.d.ts +24 -0
- package/snackbar/useSnackbar.js +91 -0
- package/spaceConsumer/SpaceConsumer.d.ts +10 -0
- package/spaceConsumer/SpaceConsumer.js +12 -0
- package/spaceConsumer/index.d.ts +1 -0
- package/spaceConsumer/index.js +8 -0
- package/spaceConsumer/package.json +4 -0
- package/spacewebProvider/CustomBaseProvider.d.ts +17 -0
- package/spacewebProvider/CustomBaseProvider.js +16 -0
- package/spacewebProvider/DocumentProvider.d.ts +9 -0
- package/spacewebProvider/DocumentProvider.js +22 -0
- package/spacewebProvider/SpacewebProvider.d.ts +22 -0
- package/spacewebProvider/SpacewebProvider.js +36 -0
- package/spacewebProvider/index.d.ts +2 -0
- package/spacewebProvider/index.js +7 -0
- package/spacewebProvider/package.json +4 -0
- package/spacewebProvider/utils.d.ts +1 -0
- package/spacewebProvider/utils.js +5 -0
- package/stack/context.d.ts +20 -0
- package/stack/context.js +10 -0
- package/stack/index.d.ts +3 -0
- package/stack/index.js +9 -0
- package/stack/package.json +4 -0
- package/stack/stack-item.d.ts +12 -0
- package/stack/stack-item.js +25 -0
- package/stack/stack.d.ts +32 -0
- package/stack/stack.js +60 -0
- package/stack/types.d.ts +22 -0
- package/stack/types.js +2 -0
- package/style/__fixtures__/utilities-dark.fixture.d.ts +4407 -0
- package/style/__fixtures__/utilities-dark.fixture.js +4409 -0
- package/style/__mocks__/CSS.mock.d.ts +10 -0
- package/style/__mocks__/CSS.mock.js +11 -0
- package/style/__mocks__/UseStyle.mock.d.ts +10 -0
- package/style/__mocks__/UseStyle.mock.js +11 -0
- package/style/_buildUtils.d.ts +4 -0
- package/style/_buildUtils.js +12 -0
- package/style/_css.d.ts +6 -0
- package/style/_css.js +20 -0
- package/style/_escapeClassName.d.ts +6 -0
- package/style/_escapeClassName.js +9 -0
- package/style/_getStyle.d.ts +6 -0
- package/style/_getStyle.js +17 -0
- package/style/_getStyleWithProps.d.ts +6 -0
- package/style/_getStyleWithProps.js +17 -0
- package/style/_parseStyle.d.ts +19 -0
- package/style/_parseStyle.js +71 -0
- package/style/_px2rem.d.ts +9 -0
- package/style/_px2rem.js +16 -0
- package/style/index.d.ts +5 -0
- package/style/index.js +13 -0
- package/style/package.json +4 -0
- package/style/styled.d.ts +11 -0
- package/style/styled.js +42 -0
- package/style/useMemoizedStyletron.d.ts +5 -0
- package/style/useMemoizedStyletron.js +16 -0
- package/style/useStyle.d.ts +6 -0
- package/style/useStyle.js +16 -0
- package/styleEngine/index.d.ts +1 -0
- package/styleEngine/index.js +4 -0
- package/styleEngine/package.json +4 -0
- package/styleEngine/styleEngine.d.ts +19 -0
- package/styleEngine/styleEngine.js +103 -0
- package/styleEngine/utils.d.ts +0 -0
- package/styleEngine/utils.js +0 -0
- package/switch/__test__/switch.spec.d.ts +1 -0
- package/switch/__test__/switch.spec.js +96 -0
- package/switch/basewebAdapter.d.ts +5 -0
- package/switch/basewebAdapter.js +22 -0
- package/switch/index.d.ts +3 -0
- package/switch/index.js +15 -0
- package/switch/package.json +4 -0
- package/switch/styled-components.d.ts +5 -0
- package/switch/styled-components.js +88 -0
- package/switch/switch.d.ts +10 -0
- package/switch/switch.js +20 -0
- package/switch/types.d.ts +28 -0
- package/switch/types.js +2 -0
- package/tabs/contexts.d.ts +12 -0
- package/tabs/contexts.js +17 -0
- package/tabs/helpers.d.ts +5 -0
- package/tabs/helpers.js +11 -0
- package/tabs/index.d.ts +5 -0
- package/tabs/index.js +13 -0
- package/tabs/package.json +4 -0
- package/tabs/stateful-tabs.d.ts +8 -0
- package/tabs/stateful-tabs.js +22 -0
- package/tabs/styled-components.d.ts +10 -0
- package/tabs/styled-components.js +49 -0
- package/tabs/tab-list.d.ts +7 -0
- package/tabs/tab-list.js +47 -0
- package/tabs/tab.d.ts +7 -0
- package/tabs/tab.js +38 -0
- package/tabs/tabs-panel.d.ts +7 -0
- package/tabs/tabs-panel.js +20 -0
- package/tabs/types.d.ts +52 -0
- package/tabs/types.js +2 -0
- package/tag/avatar-tag.d.ts +4 -0
- package/tag/avatar-tag.js +26 -0
- package/tag/index.d.ts +4 -0
- package/tag/index.js +15 -0
- package/tag/intentStyles.d.ts +4 -0
- package/tag/intentStyles.js +89 -0
- package/tag/package.json +4 -0
- package/tag/styled-components.d.ts +4 -0
- package/tag/styled-components.js +49 -0
- package/tag/tag.d.ts +4 -0
- package/tag/tag.js +57 -0
- package/tag/types.d.ts +53 -0
- package/tag/types.js +2 -0
- package/tag/utils.d.ts +2 -0
- package/tag/utils.js +24 -0
- package/test-utils/package.json +4 -0
- package/test-utils/test-provider/TestProvider.d.ts +6 -0
- package/test-utils/test-provider/TestProvider.js +16 -0
- package/test-utils/test-provider/helpers.d.ts +27 -0
- package/test-utils/test-provider/helpers.js +66 -0
- package/test-utils/test-provider/index.d.ts +2 -0
- package/test-utils/test-provider/index.js +16 -0
- package/test-utils/test-provider/testableThemes.d.ts +5 -0
- package/test-utils/test-provider/testableThemes.js +13 -0
- package/textarea/basewebAdapters.d.ts +3 -0
- package/textarea/basewebAdapters.js +34 -0
- package/textarea/index.d.ts +3 -0
- package/textarea/index.js +13 -0
- package/textarea/package.json +4 -0
- package/textarea/styled-components.d.ts +11 -0
- package/textarea/styled-components.js +17 -0
- package/textarea/textarea.d.ts +10 -0
- package/textarea/textarea.js +38 -0
- package/textarea/types.d.ts +27 -0
- package/textarea/types.js +2 -0
- package/textarea/useAutoSizeTextarea.d.ts +8 -0
- package/textarea/useAutoSizeTextarea.js +16 -0
- package/theme/context.d.ts +14 -0
- package/theme/context.js +70 -0
- package/theme/index.d.ts +2 -0
- package/theme/index.js +5 -0
- package/theme/package.json +4 -0
- package/theme/types.d.ts +6 -0
- package/theme/types.js +2 -0
- package/themes/dark-theme.d.ts +6 -0
- package/themes/dark-theme.js +12 -0
- package/themes/index.d.ts +10 -0
- package/themes/index.js +23 -0
- package/themes/light-theme.d.ts +6 -0
- package/themes/light-theme.js +12 -0
- package/themes/package.json +4 -0
- package/themes/responsive-theme.d.ts +20 -0
- package/themes/responsive-theme.js +23 -0
- package/themes/shared.d.ts +4 -0
- package/themes/shared.js +7 -0
- package/time-picker/TimePicker.d.ts +8 -0
- package/time-picker/TimePicker.js +32 -0
- package/time-picker/index.d.ts +2 -0
- package/time-picker/index.js +5 -0
- package/time-picker/package.json +4 -0
- package/time-picker/types.d.ts +15 -0
- package/time-picker/types.js +2 -0
- package/time-range-picker/RangeSelector.d.ts +7 -0
- package/time-range-picker/RangeSelector.js +27 -0
- package/time-range-picker/RangeSelectorContainer.d.ts +7 -0
- package/time-range-picker/RangeSelectorContainer.js +103 -0
- package/time-range-picker/TimeRangeList.d.ts +7 -0
- package/time-range-picker/TimeRangeList.js +35 -0
- package/time-range-picker/TimeRangePicker.d.ts +3 -0
- package/time-range-picker/TimeRangePicker.js +190 -0
- package/time-range-picker/TimezonePicker.d.ts +5 -0
- package/time-range-picker/TimezonePicker.js +45 -0
- package/time-range-picker/constants.d.ts +5 -0
- package/time-range-picker/constants.js +8 -0
- package/time-range-picker/index.d.ts +4 -0
- package/time-range-picker/index.js +8 -0
- package/time-range-picker/locale.d.ts +41 -0
- package/time-range-picker/locale.js +2 -0
- package/time-range-picker/package.json +4 -0
- package/time-range-picker/styled-component.d.ts +1 -0
- package/time-range-picker/styled-component.js +6 -0
- package/time-range-picker/types.d.ts +78 -0
- package/time-range-picker/types.js +2 -0
- package/time-range-picker/utils.d.ts +42 -0
- package/time-range-picker/utils.js +424 -0
- package/time-zone-picker/TimezonePicker.d.ts +8 -0
- package/time-zone-picker/TimezonePicker.js +56 -0
- package/time-zone-picker/index.d.ts +2 -0
- package/time-zone-picker/index.js +7 -0
- package/time-zone-picker/package.json +4 -0
- package/time-zone-picker/types.d.ts +25 -0
- package/time-zone-picker/types.js +2 -0
- package/time-zone-picker/utils.d.ts +2 -0
- package/time-zone-picker/utils.js +42 -0
- package/tooltip/disabled-tooltip-container.d.ts +8 -0
- package/tooltip/disabled-tooltip-container.js +65 -0
- package/tooltip/index.d.ts +6 -0
- package/tooltip/index.js +18 -0
- package/tooltip/overrides.d.ts +5 -0
- package/tooltip/overrides.js +59 -0
- package/tooltip/package.json +4 -0
- package/tooltip/stateful-tooltip-container.d.ts +8 -0
- package/tooltip/stateful-tooltip-container.js +10 -0
- package/tooltip/stateful-tooltip.d.ts +8 -0
- package/tooltip/stateful-tooltip.js +16 -0
- package/tooltip/styled-component.d.ts +2 -0
- package/tooltip/styled-component.js +10 -0
- package/tooltip/tooltip.d.ts +7 -0
- package/tooltip/tooltip.js +48 -0
- package/tooltip/types.d.ts +51 -0
- package/tooltip/types.js +2 -0
- package/tsconfig.tsbuildinfo +1 -0
- package/types.d.ts +98 -0
- package/types.js +3 -0
- package/typography/Typography.d.ts +12 -0
- package/typography/Typography.js +29 -0
- package/typography/constants.d.ts +6 -0
- package/typography/constants.js +9 -0
- package/typography/index.d.ts +2 -0
- package/typography/index.js +8 -0
- package/typography/package.json +4 -0
- package/typography/styled-components.d.ts +1 -0
- package/typography/styled-components.js +13 -0
- package/typography/types.d.ts +9 -0
- package/typography/types.js +2 -0
- package/utility-types/index.d.ts +1 -0
- package/utility-types/index.js +2 -0
- package/utility-types/package.json +4 -0
- package/video/Video.d.ts +15 -0
- package/video/Video.js +40 -0
- package/video/index.d.ts +2 -0
- package/video/index.js +8 -0
- package/video/package.json +4 -0
- package/video/types.d.ts +17 -0
- package/video/types.js +2 -0
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
NOTE: This file is only for size tooling.
|
|
3
|
+
Do not import anything from this module!
|
|
4
|
+
**/
|
|
5
|
+
export * from './index';
|
|
6
|
+
export * as Avatar from './avatar';
|
|
7
|
+
export * as Badge from './badge';
|
|
8
|
+
export * as BaseButton from './base-button';
|
|
9
|
+
export * as Box from './box';
|
|
10
|
+
export * as Button from './button';
|
|
11
|
+
export * as ButtonGroup from './button-group';
|
|
12
|
+
export * as Checkbox from './checkbox';
|
|
13
|
+
export * as ClassNames from './classNames';
|
|
14
|
+
export * as Col from './col';
|
|
15
|
+
export * as DatePicker from './date-picker';
|
|
16
|
+
export * as FormControl from './form-control';
|
|
17
|
+
export * as Grid from './grid';
|
|
18
|
+
export * as Helpers from './helpers';
|
|
19
|
+
export * as useCombinedHandler from './hooks/useCombinedHandler';
|
|
20
|
+
export * as useCombinedRef from './hooks/useCombinedRef';
|
|
21
|
+
export * from './hooks/useFocusVisible';
|
|
22
|
+
export * as Icons from './icon';
|
|
23
|
+
export * as Image from './image';
|
|
24
|
+
export * as Input from './input';
|
|
25
|
+
export * as Link from './link';
|
|
26
|
+
export * as List from './list';
|
|
27
|
+
export * as Loader from './loader';
|
|
28
|
+
export * as Menu from './menu';
|
|
29
|
+
export * as Modal from './modal';
|
|
30
|
+
export * as Overrides from './overrides';
|
|
31
|
+
export * as Popover from './popover';
|
|
32
|
+
export * as Radio from './radio';
|
|
33
|
+
export * as Search from './search';
|
|
34
|
+
export * as Select from './select';
|
|
35
|
+
export * as Slider from './slider';
|
|
36
|
+
export * as Snackbar from './snackbar';
|
|
37
|
+
export * as SpaceConsumer from './spaceConsumer';
|
|
38
|
+
export * as SpacewebProvider from './spacewebProvider';
|
|
39
|
+
export * as Stack from './stack';
|
|
40
|
+
export * as Style from './style';
|
|
41
|
+
export * as StyleEngine from './styleEngine';
|
|
42
|
+
export * as Switch from './switch';
|
|
43
|
+
export * as Tabs from './tabs';
|
|
44
|
+
export * as Tag from './tag';
|
|
45
|
+
export * as TextArea from './textarea';
|
|
46
|
+
export * as Themes from './themes';
|
|
47
|
+
export * as TimePicker from './time-picker';
|
|
48
|
+
export * as TimeRangePicker from './time-range-picker';
|
|
49
|
+
export * as TimeZonePicker from './time-zone-picker';
|
|
50
|
+
export * as Tooltip from './tooltip';
|
|
51
|
+
export * as Typography from './typography';
|
|
52
|
+
export * as Video from './video';
|
|
53
|
+
export * as PaymentCard from './payment-card';
|
|
54
|
+
export * as PhoneInput from './phone-input';
|
|
55
|
+
export * as DateInput from './date-input';
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
NOTE: This file is only for size tooling.
|
|
4
|
+
Do not import anything from this module!
|
|
5
|
+
**/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.DateInput = exports.PhoneInput = exports.PaymentCard = exports.Video = exports.Typography = exports.Tooltip = exports.TimeZonePicker = exports.TimeRangePicker = exports.TimePicker = exports.Themes = exports.TextArea = exports.Tag = exports.Tabs = exports.Switch = exports.StyleEngine = exports.Style = exports.Stack = exports.SpacewebProvider = exports.SpaceConsumer = exports.Snackbar = exports.Slider = exports.Select = exports.Search = exports.Radio = exports.Popover = exports.Overrides = exports.Modal = exports.Menu = exports.Loader = exports.List = exports.Link = exports.Input = exports.Image = exports.Icons = exports.useCombinedRef = exports.useCombinedHandler = exports.Helpers = exports.Grid = exports.FormControl = exports.DatePicker = exports.Col = exports.ClassNames = exports.Checkbox = exports.ButtonGroup = exports.Button = exports.Box = exports.BaseButton = exports.Badge = exports.Avatar = void 0;
|
|
8
|
+
var tslib_1 = require("tslib");
|
|
9
|
+
(0, tslib_1.__exportStar)(require("./index"), exports);
|
|
10
|
+
exports.Avatar = (0, tslib_1.__importStar)(require("./avatar"));
|
|
11
|
+
exports.Badge = (0, tslib_1.__importStar)(require("./badge"));
|
|
12
|
+
exports.BaseButton = (0, tslib_1.__importStar)(require("./base-button"));
|
|
13
|
+
exports.Box = (0, tslib_1.__importStar)(require("./box"));
|
|
14
|
+
exports.Button = (0, tslib_1.__importStar)(require("./button"));
|
|
15
|
+
exports.ButtonGroup = (0, tslib_1.__importStar)(require("./button-group"));
|
|
16
|
+
exports.Checkbox = (0, tslib_1.__importStar)(require("./checkbox"));
|
|
17
|
+
exports.ClassNames = (0, tslib_1.__importStar)(require("./classNames"));
|
|
18
|
+
exports.Col = (0, tslib_1.__importStar)(require("./col"));
|
|
19
|
+
exports.DatePicker = (0, tslib_1.__importStar)(require("./date-picker"));
|
|
20
|
+
exports.FormControl = (0, tslib_1.__importStar)(require("./form-control"));
|
|
21
|
+
exports.Grid = (0, tslib_1.__importStar)(require("./grid"));
|
|
22
|
+
exports.Helpers = (0, tslib_1.__importStar)(require("./helpers"));
|
|
23
|
+
exports.useCombinedHandler = (0, tslib_1.__importStar)(require("./hooks/useCombinedHandler"));
|
|
24
|
+
exports.useCombinedRef = (0, tslib_1.__importStar)(require("./hooks/useCombinedRef"));
|
|
25
|
+
(0, tslib_1.__exportStar)(require("./hooks/useFocusVisible"), exports);
|
|
26
|
+
exports.Icons = (0, tslib_1.__importStar)(require("./icon"));
|
|
27
|
+
exports.Image = (0, tslib_1.__importStar)(require("./image"));
|
|
28
|
+
exports.Input = (0, tslib_1.__importStar)(require("./input"));
|
|
29
|
+
exports.Link = (0, tslib_1.__importStar)(require("./link"));
|
|
30
|
+
exports.List = (0, tslib_1.__importStar)(require("./list"));
|
|
31
|
+
exports.Loader = (0, tslib_1.__importStar)(require("./loader"));
|
|
32
|
+
exports.Menu = (0, tslib_1.__importStar)(require("./menu"));
|
|
33
|
+
exports.Modal = (0, tslib_1.__importStar)(require("./modal"));
|
|
34
|
+
exports.Overrides = (0, tslib_1.__importStar)(require("./overrides"));
|
|
35
|
+
exports.Popover = (0, tslib_1.__importStar)(require("./popover"));
|
|
36
|
+
exports.Radio = (0, tslib_1.__importStar)(require("./radio"));
|
|
37
|
+
exports.Search = (0, tslib_1.__importStar)(require("./search"));
|
|
38
|
+
exports.Select = (0, tslib_1.__importStar)(require("./select"));
|
|
39
|
+
exports.Slider = (0, tslib_1.__importStar)(require("./slider"));
|
|
40
|
+
exports.Snackbar = (0, tslib_1.__importStar)(require("./snackbar"));
|
|
41
|
+
exports.SpaceConsumer = (0, tslib_1.__importStar)(require("./spaceConsumer"));
|
|
42
|
+
exports.SpacewebProvider = (0, tslib_1.__importStar)(require("./spacewebProvider"));
|
|
43
|
+
exports.Stack = (0, tslib_1.__importStar)(require("./stack"));
|
|
44
|
+
exports.Style = (0, tslib_1.__importStar)(require("./style"));
|
|
45
|
+
exports.StyleEngine = (0, tslib_1.__importStar)(require("./styleEngine"));
|
|
46
|
+
exports.Switch = (0, tslib_1.__importStar)(require("./switch"));
|
|
47
|
+
exports.Tabs = (0, tslib_1.__importStar)(require("./tabs"));
|
|
48
|
+
exports.Tag = (0, tslib_1.__importStar)(require("./tag"));
|
|
49
|
+
exports.TextArea = (0, tslib_1.__importStar)(require("./textarea"));
|
|
50
|
+
exports.Themes = (0, tslib_1.__importStar)(require("./themes"));
|
|
51
|
+
exports.TimePicker = (0, tslib_1.__importStar)(require("./time-picker"));
|
|
52
|
+
exports.TimeRangePicker = (0, tslib_1.__importStar)(require("./time-range-picker"));
|
|
53
|
+
exports.TimeZonePicker = (0, tslib_1.__importStar)(require("./time-zone-picker"));
|
|
54
|
+
exports.Tooltip = (0, tslib_1.__importStar)(require("./tooltip"));
|
|
55
|
+
exports.Typography = (0, tslib_1.__importStar)(require("./typography"));
|
|
56
|
+
exports.Video = (0, tslib_1.__importStar)(require("./video"));
|
|
57
|
+
exports.PaymentCard = (0, tslib_1.__importStar)(require("./payment-card"));
|
|
58
|
+
exports.PhoneInput = (0, tslib_1.__importStar)(require("./phone-input"));
|
|
59
|
+
exports.DateInput = (0, tslib_1.__importStar)(require("./date-input"));
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AsyncSelect = void 0;
|
|
4
|
+
var tslib_1 = require("tslib");
|
|
5
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
+
/**
|
|
7
|
+
* Created by Aneree on 03/11/20.
|
|
8
|
+
*/
|
|
9
|
+
var react_1 = require("react");
|
|
10
|
+
var keyBy_1 = (0, tslib_1.__importDefault)(require("lodash/keyBy"));
|
|
11
|
+
//components
|
|
12
|
+
var select_1 = require("../select");
|
|
13
|
+
//hooks
|
|
14
|
+
var locale_1 = require("../locale");
|
|
15
|
+
var useLatest_1 = require("../hooks/useLatest");
|
|
16
|
+
var useCombinedRef_1 = (0, tslib_1.__importDefault)(require("../hooks/useCombinedRef"));
|
|
17
|
+
var useInputChangeHandler_1 = require("./hooks/useInputChangeHandler");
|
|
18
|
+
var useAsyncOptionHandlers_1 = require("./hooks/useAsyncOptionHandlers");
|
|
19
|
+
var useResolveSelectedOptions_1 = require("./hooks/useResolveSelectedOptions");
|
|
20
|
+
//helpers
|
|
21
|
+
var helpers_1 = require("./helpers");
|
|
22
|
+
//utils
|
|
23
|
+
var overrides_1 = require("../overrides");
|
|
24
|
+
var EMPTY_ARRAY = [];
|
|
25
|
+
// eslint-disable-next-line max-statements
|
|
26
|
+
var AsyncSelect = function (props) {
|
|
27
|
+
var loadOptions = props.loadOptions, searchingText = props.searchingText, paginationBuffer = props.paginationBuffer, debounceInterval = props.debounceInterval, resolveSelectedOptions = props.resolveSelectedOptions, _a = props.minimumInput, minimumInput = _a === void 0 ? 0 : _a, _b = props.loadOnMount, loadOnMount = _b === void 0 ? false : _b, _c = props.loadOnFocus, loadOnFocus = _c === void 0 ? false : _c, _d = props.initialOptions, initialOptions = _d === void 0 ? EMPTY_ARRAY : _d, _e = props.listenAllInputChanges, listenAllInputChanges = _e === void 0 ? true : _e,
|
|
28
|
+
//selectProps
|
|
29
|
+
onInputChange = props.onInputChange, noResultsMsg = props.noResultsMsg, overrides = props.overrides, value = props.value, _f = props.controlRef, controlRef = _f === void 0 ? null : _f, propsCreateOption = props.createOption, restSelectProps = (0, tslib_1.__rest)(props, ["loadOptions", "searchingText", "paginationBuffer", "debounceInterval", "resolveSelectedOptions", "minimumInput", "loadOnMount", "loadOnFocus", "initialOptions", "listenAllInputChanges", "onInputChange", "noResultsMsg", "overrides", "value", "controlRef", "createOption"]);
|
|
30
|
+
var _g = restSelectProps.valueKey, valueKey = _g === void 0 ? 'id' : _g;
|
|
31
|
+
var locale = (0, locale_1.useLocale)();
|
|
32
|
+
var valueKeyRef = (0, useLatest_1.useLatest)(valueKey);
|
|
33
|
+
var loadOnMountRef = (0, useLatest_1.useLatest)(loadOnMount);
|
|
34
|
+
var _h = (0, tslib_1.__read)((0, react_1.useState)(loadOnMount), 2), isLoading = _h[0], setIsLoading = _h[1];
|
|
35
|
+
var _j = (0, tslib_1.__read)((0, react_1.useState)(initialOptions), 2), options = _j[0], setOptions = _j[1];
|
|
36
|
+
var _k = (0, tslib_1.__read)((0, react_1.useState)((0, keyBy_1.default)(initialOptions, valueKey)), 2), allOptionsMap = _k[0], setAllOptionsMap = _k[1];
|
|
37
|
+
var _l = (0, tslib_1.__read)((0, react_1.useState)(null), 2), inputElement = _l[0], setInputElement = _l[1];
|
|
38
|
+
var inputRef = (0, useLatest_1.useLatest)(inputElement);
|
|
39
|
+
var combinedRef = (0, useCombinedRef_1.default)(setInputElement, controlRef);
|
|
40
|
+
var _m = (0, tslib_1.__read)((0, react_1.useState)(null), 2), rootRef = _m[0], setRootRef = _m[1];
|
|
41
|
+
var _o = (0, tslib_1.__read)((0, react_1.useState)(null), 2), popoverRef = _o[0], setPopoverRef = _o[1];
|
|
42
|
+
(0, useResolveSelectedOptions_1.useResolveSelectedOptions)({
|
|
43
|
+
value: value,
|
|
44
|
+
valueKey: valueKey,
|
|
45
|
+
inputRef: inputRef,
|
|
46
|
+
allOptionsMap: allOptionsMap,
|
|
47
|
+
setOptions: setOptions,
|
|
48
|
+
setIsLoading: setIsLoading,
|
|
49
|
+
setAllOptionsMap: setAllOptionsMap,
|
|
50
|
+
resolveSelectedOptions: resolveSelectedOptions,
|
|
51
|
+
});
|
|
52
|
+
var _p = (0, useAsyncOptionHandlers_1.useAsyncOptionHandlers)({
|
|
53
|
+
valueKey: valueKey,
|
|
54
|
+
isLoading: isLoading,
|
|
55
|
+
minimumInput: minimumInput,
|
|
56
|
+
paginationBuffer: paginationBuffer,
|
|
57
|
+
inputRef: inputRef,
|
|
58
|
+
setAllOptionsMap: setAllOptionsMap,
|
|
59
|
+
setIsLoading: setIsLoading,
|
|
60
|
+
setOptions: setOptions,
|
|
61
|
+
loadOptions: loadOptions,
|
|
62
|
+
createOption: propsCreateOption,
|
|
63
|
+
}), fetchOptions = _p.fetchOptions, onPaginate = _p.onPaginate, inputChangeHandlerToDebounce = _p.onInputChange, createOption = _p.createOption;
|
|
64
|
+
var _onInputChange = (0, useInputChangeHandler_1.useInputChangeHandler)({
|
|
65
|
+
inputElement: inputElement,
|
|
66
|
+
listenAllInputChanges: listenAllInputChanges,
|
|
67
|
+
onInputChange: onInputChange,
|
|
68
|
+
inputChangeHandlerToDebounce: inputChangeHandlerToDebounce,
|
|
69
|
+
debounceInterval: debounceInterval,
|
|
70
|
+
});
|
|
71
|
+
/************************************************ HANDLING FOCUS ****************************************************/
|
|
72
|
+
var handleFocus = (0, react_1.useCallback)(function (event) {
|
|
73
|
+
/**
|
|
74
|
+
* https://developer.mozilla.org/en-US/docs/Web/API/FocusEvent/relatedTarget
|
|
75
|
+
* event.relatedTarget points to last focused element
|
|
76
|
+
*/
|
|
77
|
+
var lastFocusedNode = event.relatedTarget;
|
|
78
|
+
if (loadOnFocus && !(rootRef === null || rootRef === void 0 ? void 0 : rootRef.contains(lastFocusedNode)) && !(popoverRef === null || popoverRef === void 0 ? void 0 : popoverRef.contains(lastFocusedNode))) {
|
|
79
|
+
inputChangeHandlerToDebounce();
|
|
80
|
+
}
|
|
81
|
+
}, [loadOnFocus, inputChangeHandlerToDebounce, rootRef, popoverRef]);
|
|
82
|
+
/******************************************* HANDLING FETCH ON MOUNT ************************************************/
|
|
83
|
+
(0, react_1.useEffect)(function () {
|
|
84
|
+
if (loadOnMountRef.current) {
|
|
85
|
+
fetchOptions(0);
|
|
86
|
+
}
|
|
87
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps -- only want to load the options on first mount
|
|
88
|
+
}, []);
|
|
89
|
+
/********************************************************************************************************************/
|
|
90
|
+
var selectedOptions = (0, react_1.useMemo)(function () {
|
|
91
|
+
return value === null || value === void 0 ? void 0 : value.map(function (valueOption) {
|
|
92
|
+
var _a;
|
|
93
|
+
var optionKey = valueOption[valueKeyRef.current];
|
|
94
|
+
//In case of unresolved values, till the value is being resolved, show the unresolved value to the user
|
|
95
|
+
return (_a = allOptionsMap[optionKey]) !== null && _a !== void 0 ? _a : valueOption;
|
|
96
|
+
});
|
|
97
|
+
},
|
|
98
|
+
// All options map needs to be present in the dependency list so that the values get recomputed when
|
|
99
|
+
// the resolved options have been fetched
|
|
100
|
+
[value, allOptionsMap, valueKeyRef]);
|
|
101
|
+
var mergedOverrides = (0, react_1.useMemo)(function () {
|
|
102
|
+
return (0, overrides_1.mergeOverrides)((0, tslib_1.__assign)({ Root: { props: { ref: setRootRef, onFocus: handleFocus } }, Popover: { props: { overrides: { Inner: { props: { ref: setPopoverRef } } } } } }, (props.type === 'overlay'
|
|
103
|
+
? {
|
|
104
|
+
// In overlaySelect, overflow property is on OverlayContentContainer
|
|
105
|
+
OverlayContentContainer: { props: { onScroll: onPaginate } },
|
|
106
|
+
Menu: { props: { $onPaginate: onPaginate } },
|
|
107
|
+
}
|
|
108
|
+
: {
|
|
109
|
+
//Overriding DropdownContainer and not StatefulMenu so that async select remains functional even when
|
|
110
|
+
//user overrides StatefulMenu in favour of rendering virtualized menu
|
|
111
|
+
Menu: { props: { onScroll: onPaginate } },
|
|
112
|
+
})), overrides);
|
|
113
|
+
}, [handleFocus, props.type, onPaginate, overrides]);
|
|
114
|
+
return ((0, jsx_runtime_1.jsx)(select_1.Select, (0, tslib_1.__assign)({}, restSelectProps, { hideSelectAll: true, options: options, isLoading: isLoading, value: selectedOptions, controlRef: combinedRef, overrides: mergedOverrides, onInputChange: _onInputChange, noResultsMsg: (0, helpers_1.getNoResultsMsg)({
|
|
115
|
+
isLoading: isLoading,
|
|
116
|
+
noResultsMsg: noResultsMsg,
|
|
117
|
+
inputText: (0, helpers_1.getInputValue)(inputRef),
|
|
118
|
+
minimumInput: minimumInput,
|
|
119
|
+
searchingText: searchingText !== null && searchingText !== void 0 ? searchingText : locale.asyncSelect.searchingText,
|
|
120
|
+
emptyInputMsg: locale.asyncSelect.emptyInputMsg,
|
|
121
|
+
}), createOption: createOption }), void 0));
|
|
122
|
+
};
|
|
123
|
+
exports.AsyncSelect = AsyncSelect;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Created by Aneree on 10/12/20.
|
|
3
|
+
*/
|
|
4
|
+
import { RefObject } from 'react';
|
|
5
|
+
import * as React from 'react';
|
|
6
|
+
import { AllOptionsMap, Option } from './types';
|
|
7
|
+
export declare const getNoResultsMsg: ({ isLoading, minimumInput, inputText, noResultsMsg, searchingText, emptyInputMsg, }: {
|
|
8
|
+
isLoading: boolean;
|
|
9
|
+
minimumInput: number;
|
|
10
|
+
inputText: string;
|
|
11
|
+
noResultsMsg?: React.ReactNode;
|
|
12
|
+
searchingText: string;
|
|
13
|
+
emptyInputMsg: string;
|
|
14
|
+
}) => string | React.ReactNode | undefined;
|
|
15
|
+
export declare const shouldPaginate: (element: HTMLElement, paginationBuffer?: number) => boolean;
|
|
16
|
+
export declare const addOptionsInMap: (optionsMap: AllOptionsMap, options: Array<Option>, valueKey: string) => AllOptionsMap;
|
|
17
|
+
export declare const getInputValue: (inputRef: RefObject<HTMLInputElement>) => string;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getInputValue = exports.addOptionsInMap = exports.shouldPaginate = exports.getNoResultsMsg = void 0;
|
|
4
|
+
var tslib_1 = require("tslib");
|
|
5
|
+
var getNoResultsMsg = function (_a) {
|
|
6
|
+
var isLoading = _a.isLoading, minimumInput = _a.minimumInput, inputText = _a.inputText, noResultsMsg = _a.noResultsMsg, searchingText = _a.searchingText, emptyInputMsg = _a.emptyInputMsg;
|
|
7
|
+
if (isLoading) {
|
|
8
|
+
return searchingText;
|
|
9
|
+
}
|
|
10
|
+
//todo: Add locale support
|
|
11
|
+
if (minimumInput > 0 && inputText.length < minimumInput) {
|
|
12
|
+
return "Type at least ".concat(minimumInput, " characters to search");
|
|
13
|
+
}
|
|
14
|
+
return inputText ? noResultsMsg : emptyInputMsg;
|
|
15
|
+
};
|
|
16
|
+
exports.getNoResultsMsg = getNoResultsMsg;
|
|
17
|
+
var shouldPaginate = function (element, paginationBuffer) {
|
|
18
|
+
if (paginationBuffer === void 0) { paginationBuffer = 50; }
|
|
19
|
+
return element.scrollHeight > element.clientHeight &&
|
|
20
|
+
element.scrollTop >= element.scrollHeight - element.clientHeight - paginationBuffer;
|
|
21
|
+
};
|
|
22
|
+
exports.shouldPaginate = shouldPaginate;
|
|
23
|
+
var addOptionsInMap = function (optionsMap, options, valueKey) {
|
|
24
|
+
var newOptions = options.filter(function (option) { return !optionsMap[option[valueKey]]; });
|
|
25
|
+
//Not creating a new map (reference) if there are no new options to be added
|
|
26
|
+
if (newOptions.length) {
|
|
27
|
+
var newOptionsMap_1 = (0, tslib_1.__assign)({}, optionsMap);
|
|
28
|
+
//Not re-setting options that are already present in the map to prevent their reference from changing
|
|
29
|
+
newOptions.forEach(function (option) {
|
|
30
|
+
newOptionsMap_1[option[valueKey]] = option;
|
|
31
|
+
});
|
|
32
|
+
return newOptionsMap_1;
|
|
33
|
+
}
|
|
34
|
+
return optionsMap;
|
|
35
|
+
};
|
|
36
|
+
exports.addOptionsInMap = addOptionsInMap;
|
|
37
|
+
var getInputValue = function (inputRef) { var _a; return ((_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.value) || ''; };
|
|
38
|
+
exports.getInputValue = getInputValue;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Created by Aneree on 15/01/21.
|
|
3
|
+
*/
|
|
4
|
+
import { MutableRefObject } from 'react';
|
|
5
|
+
import { Option, OptionsT } from '../../select';
|
|
6
|
+
import { SetStateFunc, AllOptionsMap, AsyncSelectProps } from '../types';
|
|
7
|
+
interface UseAsyncOptionHandlersArgs {
|
|
8
|
+
valueKey: string;
|
|
9
|
+
isLoading: boolean;
|
|
10
|
+
minimumInput: number;
|
|
11
|
+
paginationBuffer?: number;
|
|
12
|
+
inputRef: MutableRefObject<HTMLInputElement | null>;
|
|
13
|
+
setIsLoading: SetStateFunc<boolean>;
|
|
14
|
+
setOptions: SetStateFunc<Array<Option>>;
|
|
15
|
+
setAllOptionsMap: SetStateFunc<AllOptionsMap>;
|
|
16
|
+
loadOptions: (input: string, page: number) => Promise<{
|
|
17
|
+
options: Array<Option>;
|
|
18
|
+
complete: boolean;
|
|
19
|
+
}>;
|
|
20
|
+
createOption: AsyncSelectProps['createOption'];
|
|
21
|
+
}
|
|
22
|
+
declare const useAsyncOptionHandlers: ({ inputRef, valueKey, isLoading, setOptions, loadOptions, minimumInput, setIsLoading, paginationBuffer, setAllOptionsMap, createOption: propsCreateOption, }: UseAsyncOptionHandlersArgs) => {
|
|
23
|
+
onPaginate: (event: any) => void;
|
|
24
|
+
onInputChange: () => void;
|
|
25
|
+
fetchOptions: (pageNumber: number) => Promise<void>;
|
|
26
|
+
createOption: ((label: string) => Promise<OptionsT>) | undefined;
|
|
27
|
+
};
|
|
28
|
+
export { useAsyncOptionHandlers };
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useAsyncOptionHandlers = void 0;
|
|
4
|
+
var tslib_1 = require("tslib");
|
|
5
|
+
/**
|
|
6
|
+
* Created by Aneree on 15/01/21.
|
|
7
|
+
*/
|
|
8
|
+
var react_1 = require("react");
|
|
9
|
+
//hooks
|
|
10
|
+
var useLatest_1 = require("../../hooks/useLatest");
|
|
11
|
+
//helpers
|
|
12
|
+
var helpers_1 = require("../helpers");
|
|
13
|
+
var useAsyncOptionHandlers = function (_a) {
|
|
14
|
+
var inputRef = _a.inputRef, valueKey = _a.valueKey, isLoading = _a.isLoading, setOptions = _a.setOptions, loadOptions = _a.loadOptions, minimumInput = _a.minimumInput, setIsLoading = _a.setIsLoading, paginationBuffer = _a.paginationBuffer, setAllOptionsMap = _a.setAllOptionsMap, propsCreateOption = _a.createOption;
|
|
15
|
+
var pageRef = (0, react_1.useRef)(0);
|
|
16
|
+
var completeRef = (0, react_1.useRef)(false);
|
|
17
|
+
var isPaginatingRef = (0, react_1.useRef)(false);
|
|
18
|
+
var valueKeyRef = (0, useLatest_1.useLatest)(valueKey);
|
|
19
|
+
var loadOptionsRef = (0, useLatest_1.useLatest)(loadOptions);
|
|
20
|
+
var minimumInputRef = (0, useLatest_1.useLatest)(minimumInput);
|
|
21
|
+
var paginationBufferRef = (0, useLatest_1.useLatest)(paginationBuffer);
|
|
22
|
+
var fetchOptions = (0, react_1.useCallback)(function (pageNumber) { return (0, tslib_1.__awaiter)(void 0, void 0, void 0, function () {
|
|
23
|
+
var timeoutId, _a, options_1, complete;
|
|
24
|
+
return (0, tslib_1.__generator)(this, function (_b) {
|
|
25
|
+
switch (_b.label) {
|
|
26
|
+
case 0:
|
|
27
|
+
timeoutId = setTimeout(function () { return setIsLoading(true); }, 500);
|
|
28
|
+
_b.label = 1;
|
|
29
|
+
case 1:
|
|
30
|
+
_b.trys.push([1, , 3, 4]);
|
|
31
|
+
return [4 /*yield*/, loadOptionsRef.current((0, helpers_1.getInputValue)(inputRef), pageNumber)];
|
|
32
|
+
case 2:
|
|
33
|
+
_a = _b.sent(), options_1 = _a.options, complete = _a.complete;
|
|
34
|
+
setAllOptionsMap(function (prevOptions) { return (0, helpers_1.addOptionsInMap)(prevOptions, options_1, valueKeyRef.current); });
|
|
35
|
+
//Merge options when it's not the first page
|
|
36
|
+
setOptions(function (prevOptions) { return (pageNumber ? (0, tslib_1.__spreadArray)((0, tslib_1.__spreadArray)([], (0, tslib_1.__read)(prevOptions), false), (0, tslib_1.__read)(options_1), false) : options_1); });
|
|
37
|
+
completeRef.current = complete;
|
|
38
|
+
pageRef.current = pageNumber;
|
|
39
|
+
isPaginatingRef.current = false;
|
|
40
|
+
return [3 /*break*/, 4];
|
|
41
|
+
case 3:
|
|
42
|
+
clearTimeout(timeoutId);
|
|
43
|
+
setIsLoading(false);
|
|
44
|
+
return [7 /*endfinally*/];
|
|
45
|
+
case 4: return [2 /*return*/];
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
}); }, []);
|
|
49
|
+
var onPaginate = (0, react_1.useCallback)(function (event) {
|
|
50
|
+
if (!isLoading &&
|
|
51
|
+
!isPaginatingRef.current &&
|
|
52
|
+
!completeRef.current &&
|
|
53
|
+
(0, helpers_1.shouldPaginate)(event.target, paginationBufferRef.current)) {
|
|
54
|
+
isPaginatingRef.current = true;
|
|
55
|
+
fetchOptions(pageRef.current + 1);
|
|
56
|
+
}
|
|
57
|
+
}, [fetchOptions, isLoading]);
|
|
58
|
+
var onInputChange = (0, react_1.useCallback)(function () {
|
|
59
|
+
if ((0, helpers_1.getInputValue)(inputRef).length < minimumInputRef.current) {
|
|
60
|
+
//reset state
|
|
61
|
+
setIsLoading(false);
|
|
62
|
+
setOptions([]);
|
|
63
|
+
pageRef.current = 0;
|
|
64
|
+
completeRef.current = false;
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
fetchOptions(0);
|
|
68
|
+
}, [fetchOptions]);
|
|
69
|
+
var createOption = (0, react_1.useCallback)(function (label) { return (0, tslib_1.__awaiter)(void 0, void 0, void 0, function () {
|
|
70
|
+
var createdOptions, err_1;
|
|
71
|
+
return (0, tslib_1.__generator)(this, function (_a) {
|
|
72
|
+
switch (_a.label) {
|
|
73
|
+
case 0:
|
|
74
|
+
if (!propsCreateOption) {
|
|
75
|
+
throw 'Spaceweb: [AsyncSelect] `createOption` is not defined';
|
|
76
|
+
}
|
|
77
|
+
_a.label = 1;
|
|
78
|
+
case 1:
|
|
79
|
+
_a.trys.push([1, 3, 4, 5]);
|
|
80
|
+
setIsLoading(true);
|
|
81
|
+
return [4 /*yield*/, propsCreateOption(label)];
|
|
82
|
+
case 2:
|
|
83
|
+
createdOptions = _a.sent();
|
|
84
|
+
return [2 /*return*/, createdOptions];
|
|
85
|
+
case 3:
|
|
86
|
+
err_1 = _a.sent();
|
|
87
|
+
throw err_1;
|
|
88
|
+
case 4:
|
|
89
|
+
setIsLoading(false);
|
|
90
|
+
return [7 /*endfinally*/];
|
|
91
|
+
case 5: return [2 /*return*/];
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
}); }, [propsCreateOption, setIsLoading]);
|
|
95
|
+
return {
|
|
96
|
+
onPaginate: onPaginate,
|
|
97
|
+
onInputChange: onInputChange,
|
|
98
|
+
fetchOptions: fetchOptions,
|
|
99
|
+
createOption: propsCreateOption ? createOption : undefined,
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
exports.useAsyncOptionHandlers = useAsyncOptionHandlers;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { AsyncSelectProps } from '../types';
|
|
3
|
+
declare type InputEventHandler = React.FormEventHandler<HTMLInputElement>;
|
|
4
|
+
declare type OnInputChange = AsyncSelectProps['onInputChange'];
|
|
5
|
+
interface UseInputChangeHandlerArgs {
|
|
6
|
+
inputElement: HTMLInputElement | null;
|
|
7
|
+
listenAllInputChanges: boolean;
|
|
8
|
+
debounceInterval?: number;
|
|
9
|
+
onInputChange: OnInputChange;
|
|
10
|
+
inputChangeHandlerToDebounce: InputEventHandler;
|
|
11
|
+
}
|
|
12
|
+
declare const useInputChangeHandler: ({ inputElement, listenAllInputChanges, onInputChange, inputChangeHandlerToDebounce, debounceInterval, }: UseInputChangeHandlerArgs) => OnInputChange;
|
|
13
|
+
export { useInputChangeHandler };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useInputChangeHandler = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Created by Aneree on 22/04/21.
|
|
6
|
+
*/
|
|
7
|
+
var react_1 = require("react");
|
|
8
|
+
//hooks
|
|
9
|
+
var useLatest_1 = require("../../hooks/useLatest");
|
|
10
|
+
var useDebouncedEventHandler_1 = require("../../hooks/useDebouncedEventHandler");
|
|
11
|
+
var EMPTY_OBJECT = {};
|
|
12
|
+
var useInputChangeHandler = function (_a) {
|
|
13
|
+
// When listenAllInputChanges is true, we want to listen to all the setStates of input value
|
|
14
|
+
// triggered within baseweb/select (achieved using mutation observer). In such a scenario, we don't want to trigger
|
|
15
|
+
// onInputChange received from props on input value changes that are not made by user.
|
|
16
|
+
// When listenAllInputChanges is false, we just want to intercept the input changes made by user and also propagate
|
|
17
|
+
// the same to consumers of AsyncSelect by invoking onInputChange from props
|
|
18
|
+
var inputElement = _a.inputElement, listenAllInputChanges = _a.listenAllInputChanges, onInputChange = _a.onInputChange, inputChangeHandlerToDebounce = _a.inputChangeHandlerToDebounce, debounceInterval = _a.debounceInterval;
|
|
19
|
+
var onDebouncedInputChange = (0, useDebouncedEventHandler_1.useDebouncedEventHandler)(inputChangeHandlerToDebounce, listenAllInputChanges ? undefined : onInputChange, debounceInterval);
|
|
20
|
+
var onDebouncedInputChangeRef = (0, useLatest_1.useLatest)(onDebouncedInputChange);
|
|
21
|
+
(0, react_1.useEffect)(function () {
|
|
22
|
+
if (listenAllInputChanges && inputElement) {
|
|
23
|
+
var observer_1 = new MutationObserver(function (mutations) {
|
|
24
|
+
mutations.forEach(function (mutation) {
|
|
25
|
+
if (mutation.type === 'attributes') {
|
|
26
|
+
onDebouncedInputChangeRef.current(EMPTY_OBJECT);
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
observer_1.observe(inputElement, {
|
|
31
|
+
attributeFilter: ['value'],
|
|
32
|
+
});
|
|
33
|
+
return function () {
|
|
34
|
+
observer_1.disconnect();
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
}, [inputElement, listenAllInputChanges]);
|
|
38
|
+
return listenAllInputChanges ? onInputChange : onDebouncedInputChange;
|
|
39
|
+
};
|
|
40
|
+
exports.useInputChangeHandler = useInputChangeHandler;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Created by Aneree on 15/01/21.
|
|
3
|
+
*/
|
|
4
|
+
import { MutableRefObject } from 'react';
|
|
5
|
+
import { Option, Value } from '../../select';
|
|
6
|
+
import { SetStateFunc, AllOptionsMap } from '../types';
|
|
7
|
+
interface UseResolveSelectedOptionsArgs {
|
|
8
|
+
value?: Value;
|
|
9
|
+
valueKey: string;
|
|
10
|
+
allOptionsMap: AllOptionsMap;
|
|
11
|
+
resolveSelectedOptions?: (unresolvedValueKeys: Array<string | number>) => Promise<Array<Option>>;
|
|
12
|
+
inputRef: MutableRefObject<HTMLInputElement | null>;
|
|
13
|
+
setIsLoading: SetStateFunc<boolean>;
|
|
14
|
+
setOptions: SetStateFunc<Array<Option>>;
|
|
15
|
+
setAllOptionsMap: SetStateFunc<AllOptionsMap>;
|
|
16
|
+
}
|
|
17
|
+
declare const useResolveSelectedOptions: ({ value, valueKey, allOptionsMap, resolveSelectedOptions, inputRef, setIsLoading, setOptions, setAllOptionsMap, }: UseResolveSelectedOptionsArgs) => void;
|
|
18
|
+
export { useResolveSelectedOptions };
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useResolveSelectedOptions = void 0;
|
|
4
|
+
var tslib_1 = require("tslib");
|
|
5
|
+
/**
|
|
6
|
+
* Created by Aneree on 15/01/21.
|
|
7
|
+
*/
|
|
8
|
+
var react_1 = require("react");
|
|
9
|
+
var uniqBy_1 = (0, tslib_1.__importDefault)(require("lodash/uniqBy"));
|
|
10
|
+
//hooks
|
|
11
|
+
var useLatest_1 = require("../../hooks/useLatest");
|
|
12
|
+
//helpers
|
|
13
|
+
var helpers_1 = require("../helpers");
|
|
14
|
+
var useResolveSelectedOptions = function (_a) {
|
|
15
|
+
var value = _a.value, valueKey = _a.valueKey, allOptionsMap = _a.allOptionsMap, resolveSelectedOptions = _a.resolveSelectedOptions, inputRef = _a.inputRef, setIsLoading = _a.setIsLoading, setOptions = _a.setOptions, setAllOptionsMap = _a.setAllOptionsMap;
|
|
16
|
+
var valueRef = (0, useLatest_1.useLatest)(value);
|
|
17
|
+
var valueKeyRef = (0, useLatest_1.useLatest)(valueKey);
|
|
18
|
+
var resolveSelectedOptionsRef = (0, useLatest_1.useLatest)(resolveSelectedOptions);
|
|
19
|
+
var allOptionsMapRef = (0, react_1.useRef)(allOptionsMap);
|
|
20
|
+
var fetchUnresolvedValueKeys = (0, react_1.useCallback)(function (unresolvedValueKeys) { return (0, tslib_1.__awaiter)(void 0, void 0, void 0, function () {
|
|
21
|
+
var options_1, e_1;
|
|
22
|
+
return (0, tslib_1.__generator)(this, function (_a) {
|
|
23
|
+
switch (_a.label) {
|
|
24
|
+
case 0:
|
|
25
|
+
setIsLoading(true);
|
|
26
|
+
_a.label = 1;
|
|
27
|
+
case 1:
|
|
28
|
+
_a.trys.push([1, 3, , 4]);
|
|
29
|
+
return [4 /*yield*/, resolveSelectedOptionsRef.current(unresolvedValueKeys)];
|
|
30
|
+
case 2:
|
|
31
|
+
options_1 = _a.sent();
|
|
32
|
+
setAllOptionsMap(function (prevOptions) { return (0, helpers_1.addOptionsInMap)(prevOptions, options_1, valueKeyRef.current); });
|
|
33
|
+
//Inject the resolved selected options into the options state
|
|
34
|
+
// 1. Only if currently shown options are not filtered i.e. user input text is empty (All options need to be shown)
|
|
35
|
+
if (!(0, helpers_1.getInputValue)(inputRef)) {
|
|
36
|
+
setOptions(function (prevOptions) {
|
|
37
|
+
// 2. Only if they are not already present in the state
|
|
38
|
+
var combinedOptions = (0, tslib_1.__spreadArray)((0, tslib_1.__spreadArray)([], (0, tslib_1.__read)(prevOptions), false), (0, tslib_1.__read)(options_1), false), uniqueOptions = (0, uniqBy_1.default)(combinedOptions, valueKeyRef.current);
|
|
39
|
+
return prevOptions.length === uniqueOptions.length ? prevOptions : uniqueOptions;
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
setIsLoading(false);
|
|
43
|
+
return [3 /*break*/, 4];
|
|
44
|
+
case 3:
|
|
45
|
+
e_1 = _a.sent();
|
|
46
|
+
setIsLoading(false);
|
|
47
|
+
throw e_1;
|
|
48
|
+
case 4: return [2 /*return*/];
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
}); }, []);
|
|
52
|
+
(0, react_1.useEffect)(function () {
|
|
53
|
+
var _a, _b;
|
|
54
|
+
//Check on mount if there are any unresolved values
|
|
55
|
+
if (((_a = valueRef.current) === null || _a === void 0 ? void 0 : _a.length) && resolveSelectedOptionsRef.current) {
|
|
56
|
+
var _valueKey_1 = valueKeyRef.current;
|
|
57
|
+
var unresolvedValueKeys = (_b = valueRef.current) === null || _b === void 0 ? void 0 : _b.filter(function (valueOption) { return !allOptionsMapRef.current[valueOption[_valueKey_1]]; }).map(function (valueOption) { return valueOption[_valueKey_1]; });
|
|
58
|
+
if (unresolvedValueKeys.length) {
|
|
59
|
+
fetchUnresolvedValueKeys(unresolvedValueKeys);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}, []);
|
|
63
|
+
};
|
|
64
|
+
exports.useResolveSelectedOptions = useResolveSelectedOptions;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Created by Aneree on 03/11/20.
|
|
3
|
+
*/
|
|
4
|
+
import { Dispatch, MutableRefObject, RefCallback, SetStateAction } from 'react';
|
|
5
|
+
import { SelectProps, Option, Value } from '../select/types';
|
|
6
|
+
export declare type SetStateFunc<S> = Dispatch<SetStateAction<S>>;
|
|
7
|
+
export declare type AllOptionsMap = Record<string | number, Option>;
|
|
8
|
+
/**
|
|
9
|
+
* NOTE:
|
|
10
|
+
* AsyncSelect does not support select all option
|
|
11
|
+
* removed the support of these props in AsyncSelect
|
|
12
|
+
*/
|
|
13
|
+
export declare type AsyncSelectProps = Omit<SelectProps, 'isLoading' | 'options' | 'hideSelectAll' | 'controlRef'> & {
|
|
14
|
+
loadOptions: (input: string, page: number) => Promise<{
|
|
15
|
+
options: Array<Option>;
|
|
16
|
+
complete: boolean;
|
|
17
|
+
}>;
|
|
18
|
+
paginationBuffer?: number;
|
|
19
|
+
searchingText?: string;
|
|
20
|
+
minimumInput?: number;
|
|
21
|
+
debounceInterval?: number;
|
|
22
|
+
initialOptions?: Array<Option>;
|
|
23
|
+
resolveSelectedOptions?: (unresolvedValueKeys: Array<string | number>) => Promise<Array<Option>>;
|
|
24
|
+
loadOnFocus?: boolean;
|
|
25
|
+
loadOnMount?: boolean;
|
|
26
|
+
controlRef?: MutableRefObject<HTMLInputElement> | RefCallback<HTMLInputElement> | null;
|
|
27
|
+
listenAllInputChanges?: boolean;
|
|
28
|
+
};
|
|
29
|
+
export type { Value, Option };
|