@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,103 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var tslib_1 = require("tslib");
|
|
4
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
var react_1 = require("react");
|
|
6
|
+
var date_helpers_1 = (0, tslib_1.__importDefault)(require("baseui/datepicker/utils/date-helpers"));
|
|
7
|
+
var classNames_1 = (0, tslib_1.__importDefault)(require("../classNames"));
|
|
8
|
+
var box_1 = require("../box");
|
|
9
|
+
var RangeSelector_1 = (0, tslib_1.__importDefault)(require("./RangeSelector"));
|
|
10
|
+
var typography_1 = require("../typography");
|
|
11
|
+
var button_1 = require("../button");
|
|
12
|
+
var styled_component_1 = require("./styled-component");
|
|
13
|
+
var stack_1 = require("../stack");
|
|
14
|
+
var TimezonePicker_1 = (0, tslib_1.__importDefault)(require("./TimezonePicker"));
|
|
15
|
+
var error_1 = (0, tslib_1.__importDefault)(require("../icon/components/error"));
|
|
16
|
+
var styled_components_1 = require("../date-picker/styled-components");
|
|
17
|
+
var locale_1 = require("../locale");
|
|
18
|
+
var utils_1 = require("./utils");
|
|
19
|
+
var utils_2 = require("../date-picker/utils");
|
|
20
|
+
var overrides_1 = require("../overrides");
|
|
21
|
+
var getPresetId = function (selectedPreset, selectedValue) {
|
|
22
|
+
if (selectedPreset) {
|
|
23
|
+
return selectedPreset;
|
|
24
|
+
}
|
|
25
|
+
if (Array.isArray(selectedValue)) {
|
|
26
|
+
return 'CUSTOM';
|
|
27
|
+
}
|
|
28
|
+
return selectedValue;
|
|
29
|
+
};
|
|
30
|
+
var RangeSelectorContainer = function (_a) {
|
|
31
|
+
var _b, _c, _d, _e, _f;
|
|
32
|
+
var adapter = _a.adapter, timeRangePresets = _a.timeRangePresets, onChange = _a.onChange, onSubmit = _a.onSubmit, selectedTimezone = _a.timezone, selectedValue = _a.value, selectedTimeRange = _a.timeRange, selectedPreset = _a.preset, minDate = _a.minDate, maxDate = _a.maxDate, monthsShown = _a.monthsShown, disableTimezone = _a.disableTimezone, props = (0, tslib_1.__rest)(_a, ["adapter", "timeRangePresets", "onChange", "onSubmit", "timezone", "value", "timeRange", "preset", "minDate", "maxDate", "monthsShown", "disableTimezone"]);
|
|
33
|
+
var dateHelpers = (0, react_1.useMemo)(function () { return new date_helpers_1.default(adapter); }, [adapter]);
|
|
34
|
+
var locale = (0, locale_1.useLocale)();
|
|
35
|
+
var _g = (0, tslib_1.__read)((0, react_1.useState)(selectedTimeRange), 2), timeRange = _g[0], setTimeRange = _g[1];
|
|
36
|
+
var _h = (0, tslib_1.__read)((0, react_1.useState)(getPresetId(selectedPreset, selectedValue)), 2), preset = _h[0], setPreset = _h[1];
|
|
37
|
+
var _j = (0, tslib_1.__read)((0, react_1.useState)(selectedTimezone), 2), timezone = _j[0], setTimezone = _j[1];
|
|
38
|
+
var _k = (0, tslib_1.__read)((0, react_1.useState)(false), 2), hasError = _k[0], setHasError = _k[1];
|
|
39
|
+
(0, react_1.useEffect)(function () {
|
|
40
|
+
setTimeRange(selectedTimeRange);
|
|
41
|
+
setPreset(getPresetId(selectedPreset, selectedValue));
|
|
42
|
+
}, [selectedTimeRange, selectedValue, selectedPreset]);
|
|
43
|
+
var _l = (0, tslib_1.__read)((0, overrides_1.useOverrides)((_b = props.overrides) === null || _b === void 0 ? void 0 : _b.Header, styled_component_1.StyledHeader), 2), Header = _l[0], headerProps = _l[1];
|
|
44
|
+
var _m = (0, tslib_1.__read)((0, overrides_1.useOverrides)((_c = props.overrides) === null || _c === void 0 ? void 0 : _c.HeaderBeforeEnhancer, typography_1.Typography), 2), HeaderBeforeEnhancer = _m[0], headerBeforeEnhancerProps = _m[1];
|
|
45
|
+
var _o = (0, tslib_1.__read)((0, overrides_1.useOverrides)((_d = props.overrides) === null || _d === void 0 ? void 0 : _d.Footer, styled_components_1.StyledFooter), 2), Footer = _o[0], footerProps = _o[1];
|
|
46
|
+
var _p = (0, tslib_1.__read)((0, overrides_1.useOverrides)((_e = props.overrides) === null || _e === void 0 ? void 0 : _e.FooterBeforeEnhancer, styled_components_1.StyledFooterBeforeEnhancer), 2), FooterBeforeEnhancer = _p[0], footerBeforeEnhancerProps = _p[1];
|
|
47
|
+
var _q = (0, tslib_1.__read)((0, overrides_1.useOverrides)((_f = props.overrides) === null || _f === void 0 ? void 0 : _f.TimezonePicker, TimezonePicker_1.default), 2), TimezonePicker = _q[0], timezonePickerProps = _q[1];
|
|
48
|
+
(0, react_1.useEffect)(function () {
|
|
49
|
+
if ((preset === 'CUSTOM' && timeRange.length !== 2) || typeof preset !== 'string') {
|
|
50
|
+
setHasError(true);
|
|
51
|
+
}
|
|
52
|
+
else if (!(0, utils_2.isTimeInRange)(timeRange, { minDate: minDate, maxDate: maxDate, dateHelpers: dateHelpers })) {
|
|
53
|
+
setHasError(true);
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
setHasError(false);
|
|
57
|
+
}
|
|
58
|
+
}, [preset, timeRange, minDate, maxDate, dateHelpers]);
|
|
59
|
+
var onDateChange = (0, react_1.useCallback)(function (_a) {
|
|
60
|
+
var _b, _c, _d;
|
|
61
|
+
var date = _a.date, preset = _a.preset;
|
|
62
|
+
// if preset is passed then we have to get the time range limits else date is array
|
|
63
|
+
if (preset) {
|
|
64
|
+
var nextDate = (_d = (_c = (_b = (0, utils_1.getSelectedTimeRange)(preset, timeRangePresets)) === null || _b === void 0 ? void 0 : _b.getTimeRangeLimits) === null || _c === void 0 ? void 0 : _c.call(_b)) !== null && _d !== void 0 ? _d : [];
|
|
65
|
+
/* Here we have to manually set 0 ms on startDate and 999ms on endDate, becuase baseui internally clamps day to start of the day.
|
|
66
|
+
But in this function they only set hours, minutes and seconds to 0 and ms remains as it is. So, isDayInRange check fails, where
|
|
67
|
+
they checks (startDate<=endDate). As milliseconds of end Date may be greater then start Date, it leads to failure of presets like
|
|
68
|
+
Last 1 Hour, Last 2 to 1 Hours, Last 12 Hours, etc...
|
|
69
|
+
*/
|
|
70
|
+
nextDate = (0, tslib_1.__spreadArray)((0, tslib_1.__spreadArray)([], (0, tslib_1.__read)((nextDate[0] ? [new Date(nextDate[0].setMilliseconds(0))] : [])), false), (0, tslib_1.__read)((nextDate[1] ? [new Date(nextDate[1].setMilliseconds(999))] : [])), false);
|
|
71
|
+
setPreset(preset);
|
|
72
|
+
setTimeRange(nextDate);
|
|
73
|
+
onChange === null || onChange === void 0 ? void 0 : onChange((0, tslib_1.__assign)({ value: preset, date: nextDate, preset: preset }, (disableTimezone ? {} : { timezone: timezone })));
|
|
74
|
+
}
|
|
75
|
+
else {
|
|
76
|
+
var nextDate = date;
|
|
77
|
+
if (nextDate.length === 2) {
|
|
78
|
+
// handles the case when user selects the end time which is less then start time
|
|
79
|
+
var _e = (0, tslib_1.__read)(nextDate, 2), start = _e[0], end = _e[1];
|
|
80
|
+
if (dateHelpers.isAfter(start, end)) {
|
|
81
|
+
nextDate = [start, start];
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
setTimeRange(nextDate);
|
|
85
|
+
setPreset('CUSTOM');
|
|
86
|
+
onChange === null || onChange === void 0 ? void 0 : onChange((0, tslib_1.__assign)({ value: nextDate, date: nextDate, preset: 'CUSTOM' }, (disableTimezone ? {} : { timezone: timezone })));
|
|
87
|
+
}
|
|
88
|
+
}, [setTimeRange, dateHelpers, timeRangePresets, onChange, timezone, disableTimezone]);
|
|
89
|
+
var handleSubmit = (0, react_1.useCallback)(function () {
|
|
90
|
+
return onSubmit((0, tslib_1.__assign)({ timeRange: timeRange, preset: preset }, (disableTimezone ? {} : { timezone: timezone })));
|
|
91
|
+
}, [timeRange, preset, timezone, onSubmit, disableTimezone]);
|
|
92
|
+
var errorEl = hasError ? ((0, jsx_runtime_1.jsxs)(stack_1.Stack, (0, tslib_1.__assign)({ direction: "horizontal", gap: 1, className: (0, classNames_1.default)('mr-1', { 'items-center': monthsShown !== 1 }), shrink: true }, { children: [(0, jsx_runtime_1.jsx)(error_1.default, { size: 14, className: [
|
|
93
|
+
function (_a) {
|
|
94
|
+
var theme = _a.theme;
|
|
95
|
+
return ({
|
|
96
|
+
fill: theme.spr.clrRed,
|
|
97
|
+
});
|
|
98
|
+
},
|
|
99
|
+
] }, void 0), (0, jsx_runtime_1.jsx)(typography_1.Typography, (0, tslib_1.__assign)({ className: "my-0", variant: "bs3" }, { children: locale.timeRangePicker.rangeErrorMsg }), void 0)] }), void 0)) : null;
|
|
100
|
+
return ((0, jsx_runtime_1.jsxs)(box_1.Box, (0, tslib_1.__assign)({ className: "spr-ui-01 rounded-8" }, { children: [(0, jsx_runtime_1.jsxs)(Header, (0, tslib_1.__assign)({ "$setTimezone": setTimezone, "$onClose": props.onClose }, headerProps, { children: [(0, jsx_runtime_1.jsx)(HeaderBeforeEnhancer, (0, tslib_1.__assign)({ variant: "bs1", "$as": "span", weight: "medium", className: "flex items-center" }, headerBeforeEnhancerProps, { children: locale.timeRangePicker.headerLabel }), void 0), disableTimezone ? null : ((0, jsx_runtime_1.jsx)(TimezonePicker, (0, tslib_1.__assign)({ setTimezone: setTimezone, timezone: timezone }, timezonePickerProps), void 0))] }), void 0), (0, jsx_runtime_1.jsx)(RangeSelector_1.default, { overrides: props.overrides, timeSelect: props.timeSelect, timeRangePresets: timeRangePresets, timezone: timezone, timeRange: timeRange, preset: preset, onChange: onDateChange, adapter: adapter, peekNextMonth: props.peekNextMonth, excludeDates: props.excludeDates, filterDate: props.filterDate, minDate: minDate, maxDate: maxDate, formatString: props.formatString, locale: props.locale, fixedHeight: props.fixedHeight, monthsShown: monthsShown }, void 0), (0, jsx_runtime_1.jsxs)(Footer, (0, tslib_1.__assign)({ "$hasError": hasError, "$onSubmit": handleSubmit, "$onClose": props.onClose }, footerProps, { className: "justify-between" }, { children: [(0, jsx_runtime_1.jsx)(FooterBeforeEnhancer, (0, tslib_1.__assign)({}, footerBeforeEnhancerProps), void 0), (0, jsx_runtime_1.jsxs)(stack_1.Stack, (0, tslib_1.__assign)({ direction: monthsShown === 1 ? 'vertical' : 'horizontal', gap: 3, className: [(0, classNames_1.default)({ 'items-center': monthsShown !== 1 }), { maxWidth: 'fit-content' }] }, { children: [monthsShown === 1 ? null : errorEl, (0, jsx_runtime_1.jsxs)(stack_1.StackItem, (0, tslib_1.__assign)({ className: "self-end" }, { children: [(0, jsx_runtime_1.jsx)(button_1.Button, (0, tslib_1.__assign)({ size: "sm", onClick: props.onClose, variant: "secondary", "data-testid": "cancel" }, { children: locale.timeRangePicker.cancelBtnLabel }), void 0), (0, jsx_runtime_1.jsx)(button_1.Button, (0, tslib_1.__assign)({ size: "sm", className: "ml-3", onClick: handleSubmit, disabled: hasError, "data-testid": "save" }, { children: locale.timeRangePicker.saveBtnLabel }), void 0)] }), void 0), monthsShown === 1 ? errorEl : null] }), void 0)] }), void 0)] }), void 0));
|
|
101
|
+
};
|
|
102
|
+
RangeSelectorContainer.displayName = 'RangeSelectorContainer';
|
|
103
|
+
exports.default = RangeSelectorContainer;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
import { TimeRangeListProps } from './types';
|
|
3
|
+
declare const _default: import("react").MemoExoticComponent<{
|
|
4
|
+
({ onChange, timeRange, preset, timeRangePresets, overrides, }: TimeRangeListProps): ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
|
5
|
+
displayName: string;
|
|
6
|
+
}>;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var tslib_1 = require("tslib");
|
|
4
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
var react_1 = require("react");
|
|
6
|
+
var menu_1 = require("../menu");
|
|
7
|
+
var box_1 = require("../box");
|
|
8
|
+
var overrides_1 = require("../overrides");
|
|
9
|
+
var locale_1 = require("../locale");
|
|
10
|
+
var TimeRangeList = function (_a) {
|
|
11
|
+
var onChange = _a.onChange, timeRange = _a.timeRange, preset = _a.preset, timeRangePresets = _a.timeRangePresets, overrides = _a.overrides;
|
|
12
|
+
var locale = (0, locale_1.useLocale)();
|
|
13
|
+
var onItemSelect = (0, react_1.useCallback)(function (timeRangePreset) {
|
|
14
|
+
if (timeRangePreset.id === 'CUSTOM') {
|
|
15
|
+
onChange({ date: timeRange });
|
|
16
|
+
}
|
|
17
|
+
else {
|
|
18
|
+
onChange({ preset: timeRangePreset.id });
|
|
19
|
+
}
|
|
20
|
+
}, [onChange, timeRange]);
|
|
21
|
+
var _b = (0, tslib_1.__read)((0, overrides_1.useOverrides)(overrides === null || overrides === void 0 ? void 0 : overrides.Menu, menu_1.Menu), 2), Menu = _b[0], menuProps = _b[1];
|
|
22
|
+
var _c = (0, tslib_1.__read)((0, overrides_1.useOverrides)(overrides === null || overrides === void 0 ? void 0 : overrides.MenuItem, menu_1.MenuItem), 2), MenuItem = _c[0], menuItemProps = _c[1];
|
|
23
|
+
return ((0, jsx_runtime_1.jsx)(box_1.Box, (0, tslib_1.__assign)({ className: "w-40 overflow-y-auto border-r-1 border-l-0 border-t-0 border-b-0 spr-border-01 border-solid" }, { children: (0, jsx_runtime_1.jsx)(Menu, (0, tslib_1.__assign)({ "aria-label": locale.timeRangePicker.presetMenuAriaLabel, disableNavigationOnMount: true, resetMenuHighlightOnMouseLeave: true, className: ['focus-visible:-outline-offset-2', menuProps === null || menuProps === void 0 ? void 0 : menuProps.className], role: "listbox" }, menuProps, { children: timeRangePresets.map(function (timeRangePreset) { return ((0, jsx_runtime_1.jsx)(MenuItem, (0, tslib_1.__assign)({ onClick: function () { return onItemSelect(timeRangePreset); }, selected: timeRangePreset.id === preset, className: [
|
|
24
|
+
'static',
|
|
25
|
+
function (_a, _b) {
|
|
26
|
+
var theme = _a.theme;
|
|
27
|
+
var $selected = _b.$selected;
|
|
28
|
+
return ({
|
|
29
|
+
color: $selected ? theme.spr.text01 : theme.spr.text02,
|
|
30
|
+
});
|
|
31
|
+
},
|
|
32
|
+
], "data-testid": timeRangePreset.id, role: "option" }, menuItemProps, { children: timeRangePreset.label }), timeRangePreset.id)); }) }), void 0) }), void 0));
|
|
33
|
+
};
|
|
34
|
+
exports.default = (0, react_1.memo)(TimeRangeList);
|
|
35
|
+
TimeRangeList.displayName = 'TimeRangeList';
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
import { TimeRangePickerProps } from './types';
|
|
3
|
+
export declare const TimeRangePicker: ({ adapter, onSubmit, timezone: _timezone, value, formatDisplayValue, timeRangePresets, overrides, timeSelect, peekNextMonth, excludeDates, filterDate, minDate, maxDate, placeholder, formatString, onClose, onChange, showTimezoneInSummary, clearable, onClear, showFullDateInSummary, autoSizeInput, preset, startOpen, fixedHeight, monthsShown, weekStartsOn, disableTimezone, displayVariant, ...props }: TimeRangePickerProps) => ReactElement;
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TimeRangePicker = void 0;
|
|
4
|
+
var tslib_1 = require("tslib");
|
|
5
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
+
var react_1 = require("react");
|
|
7
|
+
var date_fns_adapter_1 = (0, tslib_1.__importDefault)(require("baseui/datepicker/utils/date-fns-adapter"));
|
|
8
|
+
var date_helpers_1 = (0, tslib_1.__importDefault)(require("baseui/datepicker/utils/date-helpers"));
|
|
9
|
+
var RangeSelectorContainer_1 = (0, tslib_1.__importDefault)(require("./RangeSelectorContainer"));
|
|
10
|
+
var utils_1 = require("./utils");
|
|
11
|
+
var date_picker_1 = require("../date-picker");
|
|
12
|
+
var locale_1 = require("../locale");
|
|
13
|
+
var constants_1 = require("../date-picker/constants");
|
|
14
|
+
var overrides_1 = require("../overrides");
|
|
15
|
+
var utils_2 = require("../date-picker/utils");
|
|
16
|
+
var constants_2 = require("./constants");
|
|
17
|
+
var __DEV__ = process.env.NODE_ENV !== 'production';
|
|
18
|
+
var TimeRangePicker = function (_a) {
|
|
19
|
+
var _b = _a.adapter, adapter = _b === void 0 ? date_fns_adapter_1.default : _b, onSubmit = _a.onSubmit, _timezone = _a.timezone, value = _a.value, formatDisplayValue = _a.formatDisplayValue, timeRangePresets = _a.timeRangePresets, overrides = _a.overrides, timeSelect = _a.timeSelect, peekNextMonth = _a.peekNextMonth, excludeDates = _a.excludeDates, filterDate = _a.filterDate, minDate = _a.minDate, maxDate = _a.maxDate, _c = _a.placeholder, placeholder = _c === void 0 ? "".concat(constants_1.DEFAULT_FORMAT_STRING, "-").concat(constants_1.DEFAULT_FORMAT_STRING) : _c, _d = _a.formatString, formatString = _d === void 0 ? constants_1.DEFAULT_FORMAT_STRING : _d, onClose = _a.onClose, onChange = _a.onChange, showTimezoneInSummary = _a.showTimezoneInSummary, clearable = _a.clearable, onClear = _a.onClear, showFullDateInSummary = _a.showFullDateInSummary, autoSizeInput = _a.autoSizeInput, preset = _a.preset, _e = _a.startOpen, startOpen = _e === void 0 ? false : _e, fixedHeight = _a.fixedHeight, _f = _a.monthsShown, monthsShown = _f === void 0 ? 2 : _f, weekStartsOn = _a.weekStartsOn, _g = _a.disableTimezone, disableTimezone = _g === void 0 ? false : _g, _h = _a.displayVariant, displayVariant = _h === void 0 ? 'default' : _h, props = (0, tslib_1.__rest)(_a, ["adapter", "onSubmit", "timezone", "value", "formatDisplayValue", "timeRangePresets", "overrides", "timeSelect", "peekNextMonth", "excludeDates", "filterDate", "minDate", "maxDate", "placeholder", "formatString", "onClose", "onChange", "showTimezoneInSummary", "clearable", "onClear", "showFullDateInSummary", "autoSizeInput", "preset", "startOpen", "fixedHeight", "monthsShown", "weekStartsOn", "disableTimezone", "displayVariant"]);
|
|
20
|
+
if (__DEV__) {
|
|
21
|
+
if (disableTimezone && _timezone) {
|
|
22
|
+
console.warn('[spaceweb] timezone can not be passed to the TimeRangePicker when disableTimezone is true');
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
var timezone = (0, react_1.useMemo)(function () {
|
|
26
|
+
if (disableTimezone) {
|
|
27
|
+
return (0, utils_1.getSystemTzName)();
|
|
28
|
+
}
|
|
29
|
+
return _timezone !== null && _timezone !== void 0 ? _timezone : (0, utils_1.getSystemTzName)();
|
|
30
|
+
}, [_timezone, disableTimezone]);
|
|
31
|
+
var dateFnsLocale = (0, react_1.useMemo)(function () { return (0, utils_2.prepareLocale)(props.locale, { weekStartsOn: weekStartsOn }); }, [weekStartsOn, props.locale]);
|
|
32
|
+
var dateHelpers = (0, react_1.useMemo)(function () { return new date_helpers_1.default(adapter); }, [adapter]);
|
|
33
|
+
var locale = (0, locale_1.useLocale)();
|
|
34
|
+
var _j = (0, date_picker_1.useDatePickerState)({
|
|
35
|
+
onClose: onClose,
|
|
36
|
+
startOpen: startOpen,
|
|
37
|
+
}), isOpen = _j.isOpen, handleOpen = _j.handleOpen, handleClose = _j.handleClose, setIsOpen = _j.setIsOpen;
|
|
38
|
+
// Composing the time range presets. If user passes then use that else use default presets and at last add custom range.
|
|
39
|
+
var timeRangeList = (0, react_1.useMemo)(function () { return (0, tslib_1.__spreadArray)((0, tslib_1.__spreadArray)([], (0, tslib_1.__read)((timeRangePresets !== null && timeRangePresets !== void 0 ? timeRangePresets : (0, utils_1.getDefaultTimeRangePresets)(locale))), false), [
|
|
40
|
+
{
|
|
41
|
+
id: constants_2.CUSTOM_OPTION.id,
|
|
42
|
+
label: locale.timeRangePicker.customRange,
|
|
43
|
+
},
|
|
44
|
+
], false); }, [timeRangePresets, locale]);
|
|
45
|
+
var formatDate = (0, react_1.useCallback)(function (date, normalizedFormatString) {
|
|
46
|
+
if (normalizedFormatString === void 0) { normalizedFormatString = (0, utils_2.normalizeDashes)(formatString); }
|
|
47
|
+
var adaptedSystemTz = new Date((0, utils_1.switchEpochTimezone)(date, timezone, (0, utils_1.getSystemTzName)()));
|
|
48
|
+
return dateHelpers.formatDate(adaptedSystemTz, normalizedFormatString, dateFnsLocale);
|
|
49
|
+
}, [formatString, dateHelpers, timezone, dateFnsLocale]);
|
|
50
|
+
var defaultFormatDisplayValue = (0, react_1.useCallback)(function (date, normalizedFormatString) {
|
|
51
|
+
var _a, _b;
|
|
52
|
+
if (normalizedFormatString === void 0) { normalizedFormatString = (0, utils_2.normalizeDashes)(formatString); }
|
|
53
|
+
// case to handle a11y, where date is individually passed to format, else Date[] is passed as range is true.
|
|
54
|
+
if (!Array.isArray(date) && date) {
|
|
55
|
+
return formatDate(date);
|
|
56
|
+
}
|
|
57
|
+
if (formatDisplayValue) {
|
|
58
|
+
return formatDisplayValue(date, normalizedFormatString);
|
|
59
|
+
}
|
|
60
|
+
var timeRangePreset;
|
|
61
|
+
if (typeof preset === 'string') {
|
|
62
|
+
timeRangePreset = (0, utils_1.getSelectedTimeRange)(preset, timeRangeList);
|
|
63
|
+
}
|
|
64
|
+
else if (typeof value === 'string') {
|
|
65
|
+
timeRangePreset = (0, utils_1.getSelectedTimeRange)(value, timeRangeList);
|
|
66
|
+
}
|
|
67
|
+
return (0, utils_1.formatSummaryValue)({
|
|
68
|
+
date: date,
|
|
69
|
+
presetId: (_a = timeRangePreset === null || timeRangePreset === void 0 ? void 0 : timeRangePreset.id) !== null && _a !== void 0 ? _a : constants_2.CUSTOM_OPTION.id,
|
|
70
|
+
presetLabel: (_b = timeRangePreset === null || timeRangePreset === void 0 ? void 0 : timeRangePreset.label) !== null && _b !== void 0 ? _b : locale.timeRangePicker.customRange,
|
|
71
|
+
hidePresetLabel: timeRangeList.length === 1,
|
|
72
|
+
timezone: timezone,
|
|
73
|
+
formatString: formatString,
|
|
74
|
+
showTimezoneInSummary: showTimezoneInSummary,
|
|
75
|
+
showFullDateInSummary: showFullDateInSummary,
|
|
76
|
+
adapter: adapter,
|
|
77
|
+
locale: dateFnsLocale,
|
|
78
|
+
displayVariant: displayVariant,
|
|
79
|
+
});
|
|
80
|
+
}, [
|
|
81
|
+
timezone,
|
|
82
|
+
value,
|
|
83
|
+
timeRangeList,
|
|
84
|
+
formatDisplayValue,
|
|
85
|
+
showTimezoneInSummary,
|
|
86
|
+
formatString,
|
|
87
|
+
formatDate,
|
|
88
|
+
showFullDateInSummary,
|
|
89
|
+
adapter,
|
|
90
|
+
preset,
|
|
91
|
+
dateFnsLocale,
|
|
92
|
+
locale.timeRangePicker.customRange,
|
|
93
|
+
displayVariant,
|
|
94
|
+
]);
|
|
95
|
+
var handleSubmit = (0, react_1.useCallback)(
|
|
96
|
+
// eslint-disable-next-line no-shadow
|
|
97
|
+
function (_a) {
|
|
98
|
+
var _b, _c, _d;
|
|
99
|
+
var timeRange = _a.timeRange, preset = _a.preset, timezone = _a.timezone;
|
|
100
|
+
// value is returned only for backward compatibility will be removed in future version.
|
|
101
|
+
if (preset === 'CUSTOM') {
|
|
102
|
+
var startMillis = (0, utils_1.switchEpochTimezone)(timeRange[0], (0, utils_1.getSystemTzName)(), timezone);
|
|
103
|
+
var endMillis = (0, utils_1.switchEpochTimezone)(timeRange[1], (0, utils_1.getSystemTzName)(), timezone);
|
|
104
|
+
var dates = [new Date(startMillis), new Date(endMillis)];
|
|
105
|
+
onSubmit((0, tslib_1.__assign)({ value: dates, preset: preset, date: dates }, (disableTimezone ? {} : { timezone: timezone })));
|
|
106
|
+
}
|
|
107
|
+
else {
|
|
108
|
+
var timeRangeLimit = (_d = (_c = (_b = (0, utils_1.getSelectedTimeRange)(preset, timeRangeList)) === null || _b === void 0 ? void 0 : _b.getTimeRangeLimits) === null || _c === void 0 ? void 0 : _c.call(_b, timezone)) !== null && _d !== void 0 ? _d : [];
|
|
109
|
+
onSubmit((0, tslib_1.__assign)({ value: preset, preset: preset, date: timeRangeLimit }, (disableTimezone ? {} : { timezone: timezone })));
|
|
110
|
+
}
|
|
111
|
+
setIsOpen(false);
|
|
112
|
+
}, [setIsOpen, onSubmit, timeRangeList, disableTimezone]);
|
|
113
|
+
var timeRange = (0, react_1.useMemo)(function () {
|
|
114
|
+
var _a, _b, _c;
|
|
115
|
+
var dates;
|
|
116
|
+
if (Array.isArray(value)) {
|
|
117
|
+
dates = value;
|
|
118
|
+
}
|
|
119
|
+
else {
|
|
120
|
+
dates = (_c = (_b = (_a = (0, utils_1.getSelectedTimeRange)(preset !== null && preset !== void 0 ? preset : value, timeRangeList)) === null || _a === void 0 ? void 0 : _a.getTimeRangeLimits) === null || _b === void 0 ? void 0 : _b.call(_a, timezone)) !== null && _c !== void 0 ? _c : [];
|
|
121
|
+
}
|
|
122
|
+
return (0, tslib_1.__spreadArray)((0, tslib_1.__spreadArray)([], (0, tslib_1.__read)((dates[0] ? [(0, utils_1.adaptDateWithSystemTz)(dates[0], timezone)] : [])), false), (0, tslib_1.__read)((dates[1] ? [(0, utils_1.adaptDateWithSystemTz)(dates[1], timezone)] : [])), false);
|
|
123
|
+
}, [value, timeRangeList, timezone, preset]);
|
|
124
|
+
var mergedOverrides = (0, react_1.useMemo)(function () {
|
|
125
|
+
return (0, overrides_1.mergeOverrides)({
|
|
126
|
+
Input: {
|
|
127
|
+
props: {
|
|
128
|
+
overrides: (0, tslib_1.__assign)({}, (displayVariant === 'compact'
|
|
129
|
+
? {
|
|
130
|
+
Before: {
|
|
131
|
+
component: function () { return null; },
|
|
132
|
+
},
|
|
133
|
+
}
|
|
134
|
+
: {})),
|
|
135
|
+
},
|
|
136
|
+
},
|
|
137
|
+
InputWrapper: {
|
|
138
|
+
props: {
|
|
139
|
+
'data-testid': 'time-range',
|
|
140
|
+
},
|
|
141
|
+
},
|
|
142
|
+
Popover: {
|
|
143
|
+
props: {
|
|
144
|
+
overrides: {
|
|
145
|
+
Body: {
|
|
146
|
+
props: {
|
|
147
|
+
'aria-label': locale.timeRangePicker.popoverAriaLabel,
|
|
148
|
+
},
|
|
149
|
+
},
|
|
150
|
+
},
|
|
151
|
+
content: ((0, jsx_runtime_1.jsx)(RangeSelectorContainer_1.default, { onClose: handleClose, value: value, timeRange: timeRange, onSubmit: handleSubmit, adapter: adapter, timezone: timezone, timeSelect: timeSelect, overrides: overrides, timeRangePresets: timeRangeList, peekNextMonth: peekNextMonth, excludeDates: excludeDates, filterDate: filterDate, minDate: minDate, maxDate: maxDate, placeholder: placeholder, formatString: formatString, onChange: onChange, preset: preset, locale: dateFnsLocale, fixedHeight: fixedHeight, monthsShown: monthsShown, disableTimezone: disableTimezone }, void 0)),
|
|
152
|
+
},
|
|
153
|
+
},
|
|
154
|
+
}, overrides);
|
|
155
|
+
}, [
|
|
156
|
+
overrides,
|
|
157
|
+
handleClose,
|
|
158
|
+
value,
|
|
159
|
+
handleSubmit,
|
|
160
|
+
adapter,
|
|
161
|
+
timezone,
|
|
162
|
+
timeSelect,
|
|
163
|
+
peekNextMonth,
|
|
164
|
+
excludeDates,
|
|
165
|
+
filterDate,
|
|
166
|
+
minDate,
|
|
167
|
+
maxDate,
|
|
168
|
+
placeholder,
|
|
169
|
+
formatString,
|
|
170
|
+
timeRangeList,
|
|
171
|
+
onChange,
|
|
172
|
+
timeRange,
|
|
173
|
+
preset,
|
|
174
|
+
dateFnsLocale,
|
|
175
|
+
monthsShown,
|
|
176
|
+
fixedHeight,
|
|
177
|
+
disableTimezone,
|
|
178
|
+
locale.timeRangePicker.popoverAriaLabel,
|
|
179
|
+
displayVariant,
|
|
180
|
+
]);
|
|
181
|
+
var handleInputChange = (0, react_1.useCallback)(function (_a) {
|
|
182
|
+
var _b = _a.value, _value = _b === void 0 ? [] : _b;
|
|
183
|
+
// Both of these call will be in if condition once we add support to directly edit the input, as of now
|
|
184
|
+
// this function will be only called when user will press clear icon so directly calling these two functions.
|
|
185
|
+
onSubmit((0, tslib_1.__assign)({ value: _value, preset: 'CUSTOM', date: _value }, (disableTimezone ? {} : { timezone: timezone })));
|
|
186
|
+
onClear === null || onClear === void 0 ? void 0 : onClear();
|
|
187
|
+
}, [onSubmit, timezone, onClear, disableTimezone]);
|
|
188
|
+
return ((0, jsx_runtime_1.jsx)(date_picker_1.StatelessDatePicker, { value: timeRange, isOpen: isOpen, onFocus: handleOpen, onBlur: handleClose, formatDisplayValue: defaultFormatDisplayValue, trapTabbing: false, intent: props.intent, variant: props.variant, size: props.size, disabled: props.disabled, formatString: formatString, placeholder: placeholder, "aria-label": locale.timeRangePicker.ariaLabelRange, overrides: mergedOverrides, clearable: clearable, onChange: handleInputChange, autoSizeInput: autoSizeInput, locale: dateFnsLocale, mountNode: props.mountNode, minDate: minDate, maxDate: maxDate }, void 0));
|
|
189
|
+
};
|
|
190
|
+
exports.TimeRangePicker = TimeRangePicker;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
import { TimezonePickerProps } from './types';
|
|
3
|
+
export declare const TimezonePicker: ({ setTimezone, timezone, overrides }: TimezonePickerProps) => ReactElement;
|
|
4
|
+
declare const _default: import("react").MemoExoticComponent<({ setTimezone, timezone, overrides }: TimezonePickerProps) => ReactElement<any, string | import("react").JSXElementConstructor<any>>>;
|
|
5
|
+
export default _default;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TimezonePicker = void 0;
|
|
4
|
+
var tslib_1 = require("tslib");
|
|
5
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
+
var react_1 = require("react");
|
|
7
|
+
var typography_1 = require("../typography");
|
|
8
|
+
var chevron_down_1 = (0, tslib_1.__importDefault)(require("../icon/components/chevron-down"));
|
|
9
|
+
var stack_1 = require("../stack");
|
|
10
|
+
var base_button_1 = require("../base-button");
|
|
11
|
+
var time_zone_picker_1 = require("../time-zone-picker");
|
|
12
|
+
var locale_1 = require("../locale");
|
|
13
|
+
var overrides_1 = require("../overrides");
|
|
14
|
+
var TimezonePicker = function (_a) {
|
|
15
|
+
var setTimezone = _a.setTimezone, timezone = _a.timezone, overrides = _a.overrides;
|
|
16
|
+
var locale = (0, locale_1.useLocale)();
|
|
17
|
+
var mergedOverrides = (0, react_1.useMemo)(function () {
|
|
18
|
+
return (0, overrides_1.mergeOverrides)({
|
|
19
|
+
Select: {
|
|
20
|
+
props: {
|
|
21
|
+
type: 'overlay',
|
|
22
|
+
placeholder: locale.timeRangePicker.timezonePlaceholder,
|
|
23
|
+
children: ((0, jsx_runtime_1.jsx)(base_button_1.BaseButton, (0, tslib_1.__assign)({ "data-testid": "time-zone-picker", className: "focus:spr-text-04 hover:spr-text-04" }, { children: (0, jsx_runtime_1.jsxs)(stack_1.Stack, (0, tslib_1.__assign)({ direction: "horizontal", gap: 3, className: "items-center" }, { children: [(0, jsx_runtime_1.jsx)(typography_1.Typography, (0, tslib_1.__assign)({ variant: "l1" }, { children: timezone || locale.timeRangePicker.timezoneLabel }), void 0), (0, jsx_runtime_1.jsx)(chevron_down_1.default, { size: 8 }, void 0)] }), void 0) }), void 0)),
|
|
24
|
+
overrides: {
|
|
25
|
+
Popover: {
|
|
26
|
+
props: {
|
|
27
|
+
showArrow: false,
|
|
28
|
+
},
|
|
29
|
+
style: function () { return ({
|
|
30
|
+
marginTop: '0',
|
|
31
|
+
}); },
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
}, overrides);
|
|
37
|
+
}, [overrides, timezone, locale]);
|
|
38
|
+
var onChange = (0, react_1.useCallback)(function (_a) {
|
|
39
|
+
var id = _a.id;
|
|
40
|
+
setTimezone(id);
|
|
41
|
+
}, [setTimezone]);
|
|
42
|
+
return (0, jsx_runtime_1.jsx)(time_zone_picker_1.TimezonePicker, { value: timezone, onChange: onChange, overrides: mergedOverrides }, void 0);
|
|
43
|
+
};
|
|
44
|
+
exports.TimezonePicker = TimezonePicker;
|
|
45
|
+
exports.default = (0, react_1.memo)(exports.TimezonePicker);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TIME_SELECT_ROW_HEIGHT = exports.CALENDAR_HEIGHT = exports.CUSTOM_OPTION = void 0;
|
|
4
|
+
exports.CUSTOM_OPTION = {
|
|
5
|
+
id: 'CUSTOM',
|
|
6
|
+
};
|
|
7
|
+
exports.CALENDAR_HEIGHT = 373;
|
|
8
|
+
exports.TIME_SELECT_ROW_HEIGHT = 75;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { TimeRangePicker } from './TimeRangePicker';
|
|
2
|
+
export { getDefaultTimeRangePresets, formatSummaryValue } from './utils';
|
|
3
|
+
export type { TimeRangePickerLocale } from './locale';
|
|
4
|
+
export type { TimeRangePickerValue, TimeRangePickerProps, TimeRangePreset, TimeRangePickerOverrides, FormatString, } from './types';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.formatSummaryValue = exports.getDefaultTimeRangePresets = exports.TimeRangePicker = void 0;
|
|
4
|
+
var TimeRangePicker_1 = require("./TimeRangePicker");
|
|
5
|
+
Object.defineProperty(exports, "TimeRangePicker", { enumerable: true, get: function () { return TimeRangePicker_1.TimeRangePicker; } });
|
|
6
|
+
var utils_1 = require("./utils");
|
|
7
|
+
Object.defineProperty(exports, "getDefaultTimeRangePresets", { enumerable: true, get: function () { return utils_1.getDefaultTimeRangePresets; } });
|
|
8
|
+
Object.defineProperty(exports, "formatSummaryValue", { enumerable: true, get: function () { return utils_1.formatSummaryValue; } });
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export declare type TimeRangePickerLocale = {
|
|
2
|
+
headerLabel: string;
|
|
3
|
+
timezoneLabel: string;
|
|
4
|
+
today: string;
|
|
5
|
+
yesterday: string;
|
|
6
|
+
lastOneHour: string;
|
|
7
|
+
lastTwelveHour: string;
|
|
8
|
+
lastTwentyFourHour: string;
|
|
9
|
+
thisWeek: string;
|
|
10
|
+
lastWeek: string;
|
|
11
|
+
lastSevenDays: string;
|
|
12
|
+
thisMonth: string;
|
|
13
|
+
lastMonth: string;
|
|
14
|
+
lastTwentyEightDays: string;
|
|
15
|
+
lastThirtyDays: string;
|
|
16
|
+
lastSixtyDays: string;
|
|
17
|
+
lastNinetyDays: string;
|
|
18
|
+
lastOneTwentyDays: string;
|
|
19
|
+
lastOneEightyDays: string;
|
|
20
|
+
thisYear: string;
|
|
21
|
+
lastYear: string;
|
|
22
|
+
lastThreeSixtyFiveDays: string;
|
|
23
|
+
nextSevenDays: string;
|
|
24
|
+
nextFourteenDays: string;
|
|
25
|
+
nextMonth: string;
|
|
26
|
+
customRange: string;
|
|
27
|
+
cancelBtnLabel: string;
|
|
28
|
+
saveBtnLabel: string;
|
|
29
|
+
timeSelectStartLabel: string;
|
|
30
|
+
timeSelectEndLabel: string;
|
|
31
|
+
screenReaderMessageInput: string;
|
|
32
|
+
ariaLabelRange: string;
|
|
33
|
+
ariaLabel: string;
|
|
34
|
+
selectedDate: string;
|
|
35
|
+
selectedDateRange: string;
|
|
36
|
+
selectSecondDatePrompt: string;
|
|
37
|
+
timezonePlaceholder: string;
|
|
38
|
+
rangeErrorMsg: string;
|
|
39
|
+
presetMenuAriaLabel: string;
|
|
40
|
+
popoverAriaLabel: string;
|
|
41
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const StyledHeader: import("../style/styled").StyledComponent;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.StyledHeader = void 0;
|
|
4
|
+
var tslib_1 = require("tslib");
|
|
5
|
+
var styled_1 = (0, tslib_1.__importDefault)(require("../style/styled"));
|
|
6
|
+
exports.StyledHeader = (0, styled_1.default)('div', 'flex justify-between items-center h-10 px-5');
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { DatepickerOverrides, FormatString, StatelessDatePickerProps } from '../date-picker';
|
|
3
|
+
import { Override } from '../overrides';
|
|
4
|
+
import { Option } from 'baseui/select';
|
|
5
|
+
import { BaseSelectProps } from '../select/types';
|
|
6
|
+
export type { FormatString } from '../date-picker';
|
|
7
|
+
export declare type TimeRangePreset = {
|
|
8
|
+
id: string;
|
|
9
|
+
label: string;
|
|
10
|
+
getTimeRangeLimits?: (timezone?: string) => [Date, Date] | [];
|
|
11
|
+
};
|
|
12
|
+
export declare type TimezonePickerProps = {
|
|
13
|
+
setTimezone: React.Dispatch<string>;
|
|
14
|
+
timezone: string;
|
|
15
|
+
overrides?: BaseSelectProps['overrides'];
|
|
16
|
+
};
|
|
17
|
+
export declare type TimeRangeListProps = {
|
|
18
|
+
timeRangePresets: TimeRangePreset[];
|
|
19
|
+
onChange: ({ date, preset }: any) => void;
|
|
20
|
+
timeRange?: Date[];
|
|
21
|
+
preset: string | undefined;
|
|
22
|
+
overrides?: {
|
|
23
|
+
Menu?: Override<any>;
|
|
24
|
+
MenuItem?: Override<any>;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
export declare type TimeRangePickerOverrides = DatepickerOverrides<Record<string, any>> & {
|
|
28
|
+
TimeRangeList?: Override<TimeRangeListProps & Record<string, any>>;
|
|
29
|
+
Header?: Override<Record<string, any>>;
|
|
30
|
+
HeaderBeforeEnhancer?: Override<Record<string, any>>;
|
|
31
|
+
FooterBeforeEnhancer?: Override<Record<string, any>>;
|
|
32
|
+
TimezonePicker?: Override<Record<string, any>>;
|
|
33
|
+
};
|
|
34
|
+
export declare type TimeRangePickerValue = {
|
|
35
|
+
value: Date[] | string;
|
|
36
|
+
date: Date[];
|
|
37
|
+
preset: string;
|
|
38
|
+
timezone?: string;
|
|
39
|
+
};
|
|
40
|
+
declare type Preset = string;
|
|
41
|
+
export declare type SizeVariant = 'default' | 'compact';
|
|
42
|
+
export declare type TimeRangePickerProps = Omit<StatelessDatePickerProps, 'value' | 'overrides' | 'onChange' | 'isOpen' | 'onFocus' | 'onBlur' | 'range'> & {
|
|
43
|
+
/**
|
|
44
|
+
* @deprecated Please prevent passing preset to value. Instead, pass it in the prop `preset`.
|
|
45
|
+
* This will be removed in future major releases.
|
|
46
|
+
*/
|
|
47
|
+
value?: Preset | Date[];
|
|
48
|
+
preset?: Preset;
|
|
49
|
+
timezone?: string;
|
|
50
|
+
timeRangePresets?: TimeRangePreset[];
|
|
51
|
+
onSubmit: (timeRangePickerValue: TimeRangePickerValue) => void;
|
|
52
|
+
overrides?: TimeRangePickerOverrides;
|
|
53
|
+
mapLabels?: (args: Option) => React.ReactNode;
|
|
54
|
+
onChange?: (timeRangePickerValue: TimeRangePickerValue) => any;
|
|
55
|
+
showTimezoneInSummary?: boolean;
|
|
56
|
+
onClear?: () => void;
|
|
57
|
+
showFullDateInSummary?: boolean;
|
|
58
|
+
startOpen?: boolean;
|
|
59
|
+
disableTimezone?: boolean;
|
|
60
|
+
displayVariant?: SizeVariant;
|
|
61
|
+
};
|
|
62
|
+
export declare type RangeSelectorContainerProps = Omit<TimeRangePickerProps, 'onFocus' | 'onBlur' | 'timeRangePresets' | 'onSubmit' | 'formatDisplayValue' | 'onClear' | 'timezone'> & {
|
|
63
|
+
timeRangePresets: TimeRangePreset[];
|
|
64
|
+
onSubmit: ({ timeRange, preset, timezone }: {
|
|
65
|
+
timeRange: Date[];
|
|
66
|
+
preset?: string;
|
|
67
|
+
timezone?: string;
|
|
68
|
+
}) => void;
|
|
69
|
+
onClose: () => void;
|
|
70
|
+
timeRange: Date[];
|
|
71
|
+
timezone: string;
|
|
72
|
+
formatString: FormatString;
|
|
73
|
+
};
|
|
74
|
+
export declare type RangeSelectorProps = Omit<RangeSelectorContainerProps, 'onSubmit' | 'onClose' | 'onChage' | 'formatDate' | 'formatDisplayValue'> & {
|
|
75
|
+
timeRange?: Date[];
|
|
76
|
+
onChange: ({ date, preset }: any) => void;
|
|
77
|
+
preset: string | undefined;
|
|
78
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Locale } from '../locale';
|
|
2
|
+
import { SizeVariant, TimeRangePreset } from './types';
|
|
3
|
+
export declare const getSelectedTimeRange: (selectedTimeRange: string | undefined, timeRangeOptions: Array<TimeRangePreset>) => TimeRangePreset | undefined;
|
|
4
|
+
export declare const getSystemTzName: () => string;
|
|
5
|
+
/**
|
|
6
|
+
* returns milliseconds offset from timezone name
|
|
7
|
+
*/
|
|
8
|
+
export declare const getTzOffset: (timezone: string, date?: number | Date | undefined) => number;
|
|
9
|
+
/**
|
|
10
|
+
* convert epoch from one timezone to another
|
|
11
|
+
*/
|
|
12
|
+
export declare const switchEpochTimezone: (date: Date | number, tzFrom?: string, tzTo?: string) => number;
|
|
13
|
+
/**
|
|
14
|
+
* adapts date with the system timezone
|
|
15
|
+
*/
|
|
16
|
+
export declare const adaptDateWithSystemTz: (date: Date, selectedTimezone: string) => Date;
|
|
17
|
+
/**
|
|
18
|
+
* Adds or subtract the offset according to timezone passed so that we can get correct start date and end date in that timezone.
|
|
19
|
+
* ex. Lets say we are in Asia/Kolakata timezone on 19th Feb and time is 12:30 AM, and selected Asia/Kabul timezone and preset as Today.
|
|
20
|
+
* Now in Asia/Kolkata timezone today implies 19th Feb. But for Asia/Kabul which is one hour behind Asia/Kolkata Today still implies 18th Feb.
|
|
21
|
+
* So, this function will subtract that offset of 1 hour from current date so new time 11:30PM, with this time we can get correct value
|
|
22
|
+
* of today, this week, etc preset.
|
|
23
|
+
*/
|
|
24
|
+
export declare const getDateForGivenTimezone: (timezone?: string | undefined) => Date;
|
|
25
|
+
export declare const getDefaultTimeRangePresets: (locale: Locale) => TimeRangePreset[];
|
|
26
|
+
export declare const formatSummaryValue: ({ date, presetId, presetLabel, timezone, formatString, showFullDateInSummary, showTimezoneInSummary, adapter, locale, hidePresetLabel, displayVariant, }: {
|
|
27
|
+
date: Date[];
|
|
28
|
+
presetId: string;
|
|
29
|
+
presetLabel: string;
|
|
30
|
+
timezone?: string | undefined;
|
|
31
|
+
formatString?: string | undefined;
|
|
32
|
+
showFullDateInSummary?: boolean | undefined;
|
|
33
|
+
showTimezoneInSummary?: boolean | undefined;
|
|
34
|
+
adapter?: any;
|
|
35
|
+
locale?: any;
|
|
36
|
+
hidePresetLabel?: boolean | undefined;
|
|
37
|
+
displayVariant?: SizeVariant | undefined;
|
|
38
|
+
}) => string;
|
|
39
|
+
export declare const getHeight: ({ monthsShown, timeSelect }: {
|
|
40
|
+
monthsShown?: number | undefined;
|
|
41
|
+
timeSelect?: boolean | undefined;
|
|
42
|
+
}) => number;
|