@sprinklrjs/spaceweb 10.1.0 → 12.14.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/allComponentsAndUtilities.d.ts +1 -0
- package/allComponentsAndUtilities.js +2 -1
- package/asyncSelect/asyncSelect.d.ts +4 -2
- package/asyncSelect/asyncSelect.js +43 -108
- package/asyncSelect/groupedAsyncSelect.d.ts +5 -0
- package/asyncSelect/groupedAsyncSelect.js +41 -0
- package/asyncSelect/helpers.d.ts +9 -3
- package/asyncSelect/helpers.js +35 -4
- package/asyncSelect/hooks/useAsyncOptionHandlers.d.ts +17 -12
- package/asyncSelect/hooks/useAsyncOptionHandlers.js +73 -26
- package/asyncSelect/hooks/useAsyncSelect.d.ts +10 -0
- package/asyncSelect/hooks/useAsyncSelect.js +182 -0
- package/asyncSelect/hooks/useResolveSelectedOptions.d.ts +10 -7
- package/asyncSelect/hooks/useResolveSelectedOptions.js +59 -47
- package/asyncSelect/index.d.ts +4 -1
- package/asyncSelect/index.js +8 -0
- package/asyncSelect/types.d.ts +63 -12
- package/avatar/avatar.js +12 -2
- package/avatar/index.d.ts +1 -1
- package/avatar/styled-component.js +7 -22
- package/avatar/types.d.ts +1 -1
- package/badge/styled-component.js +10 -8
- package/banner/banner-item.d.ts +12 -0
- package/banner/banner-item.js +14 -0
- package/banner/banner.d.ts +19 -0
- package/banner/banner.js +56 -0
- package/banner/index.d.ts +5 -0
- package/banner/index.js +14 -0
- package/banner/locale.d.ts +6 -0
- package/banner/locale.js +2 -0
- package/banner/package.json +4 -0
- package/banner/styled-component.d.ts +6 -0
- package/banner/styled-component.js +39 -0
- package/banner/types.d.ts +26 -0
- package/banner/types.js +2 -0
- package/breadcrumb/breadcrumb-item.d.ts +7 -0
- package/breadcrumb/breadcrumb-item.js +41 -0
- package/breadcrumb/breadcrumb.d.ts +7 -0
- package/breadcrumb/breadcrumb.js +29 -0
- package/breadcrumb/index.d.ts +4 -0
- package/breadcrumb/index.js +17 -0
- package/breadcrumb/package.json +4 -0
- package/breadcrumb/styled-components.d.ts +7 -0
- package/breadcrumb/styled-components.js +19 -0
- package/breadcrumb/types.d.ts +38 -0
- package/breadcrumb/types.js +2 -0
- package/button/Button.d.ts +3 -3
- package/button/Button.js +14 -2
- package/button/IconButton/IconButton.d.ts +2 -4
- package/button/IconButton/IconButton.js +5 -2
- package/button/IconButton/types.d.ts +10 -1
- package/button/basewebAdapter.d.ts +9 -6
- package/button/basewebAdapter.js +1 -1
- package/button/styled-components.js +30 -25
- package/button/types.d.ts +4 -1
- package/button-group/ButtonGroup.d.ts +1 -0
- package/button-group/ButtonGroup.js +9 -5
- package/button-group/StatefulButtonGroup.d.ts +1 -0
- package/button-group/index.d.ts +1 -2
- package/button-group/index.js +1 -5
- package/button-group/styled-components.d.ts +34 -0
- package/button-group/styled-components.js +60 -12
- package/button-group/types.d.ts +3 -0
- package/checkbox/basewebAdapters.d.ts +5 -2
- package/checkbox/basewebAdapters.js +9 -2
- package/checkbox/index.d.ts +1 -1
- package/checkbox/index.js +1 -2
- package/checkbox/styled-components.js +1 -1
- package/checkbox/types.d.ts +15 -8
- package/color-picker/ColorPalette.d.ts +9 -0
- package/color-picker/ColorPalette.js +26 -0
- package/color-picker/ColorPicker.d.ts +3 -0
- package/color-picker/ColorPicker.js +35 -0
- package/color-picker/Swatch.d.ts +12 -0
- package/color-picker/Swatch.js +40 -0
- package/color-picker/colors.d.ts +1 -0
- package/color-picker/colors.js +109 -0
- package/color-picker/getContrastRatio.d.ts +1 -0
- package/color-picker/getContrastRatio.js +23 -0
- package/color-picker/index.d.ts +3 -0
- package/color-picker/index.js +7 -0
- package/color-picker/locale.d.ts +3 -0
- package/color-picker/locale.js +2 -0
- package/color-picker/package.json +4 -0
- package/color-picker/styled-component.d.ts +1 -0
- package/color-picker/styled-component.js +5 -0
- package/color-picker/types.d.ts +15 -0
- package/color-picker/types.js +2 -0
- package/currency/Currency.d.ts +3 -0
- package/currency/Currency.js +14 -0
- package/currency/constants.d.ts +3 -0
- package/currency/constants.js +8 -0
- package/currency/index.d.ts +5 -0
- package/currency/index.js +12 -0
- package/currency/package.json +4 -0
- package/currency/types.d.ts +7 -0
- package/currency/types.js +2 -0
- package/currency/useCurrency.d.ts +2 -0
- package/currency/useCurrency.js +12 -0
- package/currency/utils.d.ts +8 -0
- package/currency/utils.js +11 -0
- package/date-input/Before.d.ts +4 -2
- package/date-input/Before.js +4 -4
- package/date-input/CalendarIconButton.js +7 -1
- package/date-input/DateInput.d.ts +1 -1
- package/date-input/DateInput.js +47 -26
- package/date-input/styled-components.d.ts +2 -2
- package/date-input/styled-components.js +10 -8
- package/date-input/types.d.ts +4 -2
- package/date-picker/Calendar.d.ts +1 -1
- package/date-picker/Calendar.js +16 -6
- package/date-picker/DateInput.d.ts +3 -2
- package/date-picker/DateInput.js +19 -17
- package/date-picker/DatePickerContent.d.ts +9 -3
- package/date-picker/DatePickerContent.js +59 -8
- package/date-picker/DatePickerInput.js +13 -16
- package/date-picker/DateTimeContainer.d.ts +4 -2
- package/date-picker/DateTimeContainer.js +5 -5
- package/date-picker/StatelessDatePicker.d.ts +1 -1
- package/date-picker/StatelessDatePicker.js +40 -20
- package/date-picker/TimeInput.d.ts +5 -2
- package/date-picker/TimeInput.js +4 -2
- package/date-picker/index.d.ts +1 -0
- package/date-picker/index.js +3 -1
- package/date-picker/locale.d.ts +2 -0
- package/date-picker/stateful-container.d.ts +1 -1
- package/date-picker/stateful-container.js +11 -8
- package/date-picker/styled-components.d.ts +0 -1
- package/date-picker/styled-components.js +54 -27
- package/date-picker/types.d.ts +10 -1
- package/date-picker/utils.d.ts +10 -7
- package/date-picker/utils.js +12 -4
- package/date-time/DateTime.d.ts +3 -0
- package/date-time/DateTime.js +12 -0
- package/date-time/index.d.ts +3 -0
- package/date-time/index.js +9 -0
- package/date-time/package.json +4 -0
- package/date-time/types.d.ts +21 -0
- package/date-time/types.js +18 -0
- package/date-time/useDateTime.d.ts +2 -0
- package/date-time/useDateTime.js +13 -0
- package/date-time/variants.d.ts +4 -0
- package/date-time/variants.js +87 -0
- package/esm/allComponentsAndUtilities.d.ts +1 -0
- package/esm/allComponentsAndUtilities.js +2 -0
- package/esm/asyncSelect/asyncSelect.d.ts +4 -2
- package/esm/asyncSelect/asyncSelect.js +46 -111
- package/esm/asyncSelect/groupedAsyncSelect.d.ts +5 -0
- package/esm/asyncSelect/groupedAsyncSelect.js +37 -0
- package/esm/asyncSelect/helpers.d.ts +9 -3
- package/esm/asyncSelect/helpers.js +31 -3
- package/esm/asyncSelect/hooks/useAsyncOptionHandlers.d.ts +17 -12
- package/esm/asyncSelect/hooks/useAsyncOptionHandlers.js +76 -29
- package/esm/asyncSelect/hooks/useAsyncSelect.d.ts +10 -0
- package/esm/asyncSelect/hooks/useAsyncSelect.js +178 -0
- package/esm/asyncSelect/hooks/useResolveSelectedOptions.d.ts +10 -7
- package/esm/asyncSelect/hooks/useResolveSelectedOptions.js +62 -50
- package/esm/asyncSelect/index.d.ts +4 -1
- package/esm/asyncSelect/index.js +3 -0
- package/esm/asyncSelect/types.d.ts +63 -12
- package/esm/avatar/avatar.js +12 -2
- package/esm/avatar/index.d.ts +1 -1
- package/esm/avatar/styled-component.js +7 -22
- package/esm/avatar/types.d.ts +1 -1
- package/esm/badge/styled-component.js +10 -8
- package/esm/banner/banner-item.d.ts +12 -0
- package/esm/banner/banner-item.js +12 -0
- package/esm/banner/banner.d.ts +19 -0
- package/esm/banner/banner.js +54 -0
- package/esm/banner/index.d.ts +5 -0
- package/esm/banner/index.js +3 -0
- package/esm/banner/locale.d.ts +6 -0
- package/esm/banner/locale.js +1 -0
- package/esm/banner/styled-component.d.ts +6 -0
- package/esm/banner/styled-component.js +35 -0
- package/esm/banner/types.d.ts +26 -0
- package/esm/banner/types.js +1 -0
- package/esm/breadcrumb/breadcrumb-item.d.ts +7 -0
- package/esm/breadcrumb/breadcrumb-item.js +39 -0
- package/esm/breadcrumb/breadcrumb.d.ts +7 -0
- package/esm/breadcrumb/breadcrumb.js +27 -0
- package/esm/breadcrumb/index.d.ts +4 -0
- package/esm/breadcrumb/index.js +3 -0
- package/esm/breadcrumb/styled-components.d.ts +7 -0
- package/esm/breadcrumb/styled-components.js +15 -0
- package/esm/breadcrumb/types.d.ts +38 -0
- package/esm/breadcrumb/types.js +1 -0
- package/esm/button/Button.d.ts +3 -3
- package/esm/button/Button.js +14 -2
- package/esm/button/IconButton/IconButton.d.ts +2 -4
- package/esm/button/IconButton/IconButton.js +5 -2
- package/esm/button/IconButton/types.d.ts +10 -1
- package/esm/button/basewebAdapter.d.ts +9 -6
- package/esm/button/basewebAdapter.js +1 -1
- package/esm/button/styled-components.js +30 -25
- package/esm/button/types.d.ts +4 -1
- package/esm/button-group/ButtonGroup.d.ts +1 -0
- package/esm/button-group/ButtonGroup.js +9 -5
- package/esm/button-group/StatefulButtonGroup.d.ts +1 -0
- package/esm/button-group/index.d.ts +1 -2
- package/esm/button-group/index.js +0 -1
- package/esm/button-group/styled-components.d.ts +34 -0
- package/esm/button-group/styled-components.js +58 -11
- package/esm/button-group/types.d.ts +3 -0
- package/esm/checkbox/basewebAdapters.d.ts +5 -2
- package/esm/checkbox/basewebAdapters.js +9 -2
- package/esm/checkbox/index.d.ts +1 -1
- package/esm/checkbox/index.js +1 -1
- package/esm/checkbox/styled-components.js +1 -1
- package/esm/checkbox/types.d.ts +15 -8
- package/esm/color-picker/ColorPalette.d.ts +9 -0
- package/esm/color-picker/ColorPalette.js +22 -0
- package/esm/color-picker/ColorPicker.d.ts +3 -0
- package/esm/color-picker/ColorPicker.js +31 -0
- package/esm/color-picker/Swatch.d.ts +12 -0
- package/esm/color-picker/Swatch.js +37 -0
- package/esm/color-picker/colors.d.ts +1 -0
- package/esm/color-picker/colors.js +106 -0
- package/esm/color-picker/getContrastRatio.d.ts +1 -0
- package/esm/color-picker/getContrastRatio.js +19 -0
- package/esm/color-picker/index.d.ts +3 -0
- package/esm/color-picker/index.js +2 -0
- package/esm/color-picker/locale.d.ts +3 -0
- package/esm/color-picker/locale.js +1 -0
- package/esm/color-picker/styled-component.d.ts +1 -0
- package/esm/color-picker/styled-component.js +2 -0
- package/esm/color-picker/types.d.ts +15 -0
- package/esm/color-picker/types.js +1 -0
- package/esm/currency/Currency.d.ts +3 -0
- package/esm/currency/Currency.js +10 -0
- package/esm/currency/constants.d.ts +3 -0
- package/esm/currency/constants.js +5 -0
- package/esm/currency/index.d.ts +5 -0
- package/esm/currency/index.js +5 -0
- package/esm/currency/types.d.ts +7 -0
- package/esm/currency/types.js +1 -0
- package/esm/currency/useCurrency.d.ts +2 -0
- package/esm/currency/useCurrency.js +8 -0
- package/esm/currency/utils.d.ts +8 -0
- package/esm/currency/utils.js +7 -0
- package/esm/date-input/Before.d.ts +4 -2
- package/esm/date-input/Before.js +4 -4
- package/esm/date-input/CalendarIconButton.js +7 -1
- package/esm/date-input/DateInput.d.ts +1 -1
- package/esm/date-input/DateInput.js +48 -27
- package/esm/date-input/styled-components.d.ts +2 -2
- package/esm/date-input/styled-components.js +10 -7
- package/esm/date-input/types.d.ts +4 -2
- package/esm/date-picker/Calendar.d.ts +1 -1
- package/esm/date-picker/Calendar.js +17 -7
- package/esm/date-picker/DateInput.d.ts +3 -2
- package/esm/date-picker/DateInput.js +20 -18
- package/esm/date-picker/DatePickerContent.d.ts +9 -3
- package/esm/date-picker/DatePickerContent.js +60 -9
- package/esm/date-picker/DatePickerInput.js +13 -16
- package/esm/date-picker/DateTimeContainer.d.ts +4 -2
- package/esm/date-picker/DateTimeContainer.js +5 -5
- package/esm/date-picker/StatelessDatePicker.d.ts +1 -1
- package/esm/date-picker/StatelessDatePicker.js +40 -20
- package/esm/date-picker/TimeInput.d.ts +5 -2
- package/esm/date-picker/TimeInput.js +4 -2
- package/esm/date-picker/index.d.ts +1 -0
- package/esm/date-picker/index.js +1 -0
- package/esm/date-picker/locale.d.ts +2 -0
- package/esm/date-picker/stateful-container.d.ts +1 -1
- package/esm/date-picker/stateful-container.js +11 -8
- package/esm/date-picker/styled-components.d.ts +0 -1
- package/esm/date-picker/styled-components.js +53 -26
- package/esm/date-picker/types.d.ts +10 -1
- package/esm/date-picker/utils.d.ts +10 -7
- package/esm/date-picker/utils.js +13 -5
- package/esm/date-time/DateTime.d.ts +3 -0
- package/esm/date-time/DateTime.js +8 -0
- package/esm/date-time/index.d.ts +3 -0
- package/esm/date-time/index.js +3 -0
- package/esm/date-time/types.d.ts +21 -0
- package/esm/date-time/types.js +15 -0
- package/esm/date-time/useDateTime.d.ts +2 -0
- package/esm/date-time/useDateTime.js +9 -0
- package/esm/date-time/variants.d.ts +4 -0
- package/esm/date-time/variants.js +84 -0
- package/esm/form-control/context.d.ts +6 -13
- package/esm/form-control/context.js +10 -9
- package/esm/form-control/form-control.d.ts +1 -1
- package/esm/form-control/form-control.js +17 -12
- package/esm/form-control/styled-component.js +18 -7
- package/esm/helpers/ClearIconButton.js +3 -1
- package/esm/helpers/StyledTombstone.d.ts +1 -0
- package/esm/helpers/StyledTombstone.js +17 -0
- package/esm/helpers/baseui/useConvertOverrides.js +6 -1
- package/esm/helpers/baseui/withThemeOverride.js +1 -1
- package/esm/helpers/commonStyles.d.ts +2 -2
- package/esm/helpers/commonStyles.js +3 -6
- package/esm/helpers/index.d.ts +1 -0
- package/esm/helpers/index.js +8 -0
- package/esm/helpers/styletron.d.ts +14 -3
- package/esm/helpers/themeHelpers.d.ts +1 -0
- package/esm/helpers/themeHelpers.js +13 -0
- package/esm/hooks/useAutoFocus.d.ts +6 -7
- package/esm/hooks/useAutoFocus.js +19 -13
- package/esm/hooks/useCombinedRef.d.ts +1 -0
- package/esm/hooks/useCombinedRef.js +33 -0
- package/esm/hooks/useIsMobileDevice.d.ts +1 -0
- package/esm/hooks/useIsMobileDevice.js +6 -0
- package/esm/hooks/useMatchMedia.d.ts +3 -0
- package/esm/hooks/useMatchMedia.js +49 -0
- package/esm/icon/components/alert-solid.js +2 -0
- package/esm/icon/components/alert.js +2 -0
- package/esm/icon/components/calendar-solid.js +2 -0
- package/esm/icon/components/chevron-down.js +2 -0
- package/esm/icon/components/chevron-left.d.ts +3 -0
- package/esm/icon/components/chevron-left.js +8 -0
- package/esm/icon/components/chevron-right.d.ts +3 -0
- package/esm/icon/components/chevron-right.js +8 -0
- package/esm/icon/components/close.js +2 -0
- package/esm/icon/components/error-clr.js +2 -0
- package/esm/icon/components/error-solid.js +2 -0
- package/esm/icon/components/error.js +2 -0
- package/esm/icon/components/imagePreview.js +2 -0
- package/esm/icon/components/info.js +2 -0
- package/esm/icon/components/play-video.js +2 -0
- package/esm/icon/components/reset-color.d.ts +3 -0
- package/esm/icon/components/reset-color.js +8 -0
- package/esm/icon/components/search.js +2 -0
- package/esm/icon/components/tick.js +2 -0
- package/esm/icon/components/tickCircle-solid.js +2 -0
- package/esm/icon/components/user.js +2 -0
- package/esm/icon/components/video-non-playable.js +2 -0
- package/esm/index.d.ts +2 -0
- package/esm/index.js +2 -0
- package/esm/input/basewebAdapters.d.ts +1 -1
- package/esm/input/basewebAdapters.js +18 -3
- package/esm/input/index.d.ts +2 -1
- package/esm/input/index.js +1 -0
- package/esm/input/styled-components.d.ts +1 -1
- package/esm/input/styled-components.js +8 -6
- package/esm/input/types.d.ts +10 -4
- package/esm/layer/useLayersContextValue.js +3 -2
- package/esm/list/avatar-list-item.d.ts +12 -22
- package/esm/list/avatar-list-item.js +8 -10
- package/esm/list/divider.js +6 -3
- package/esm/list/index.d.ts +1 -1
- package/esm/list/index.js +1 -1
- package/esm/list/list-item.d.ts +3 -1
- package/esm/list/list-item.js +9 -6
- package/esm/list/list.d.ts +10 -5
- package/esm/list/list.js +47 -6
- package/esm/list/styled-component.d.ts +1 -0
- package/esm/list/styled-component.js +23 -17
- package/esm/list/types.d.ts +8 -0
- package/esm/list/utils.d.ts +2 -0
- package/esm/list/utils.js +10 -0
- package/esm/locale/en_US.js +35 -0
- package/esm/locale/types.d.ts +21 -0
- package/esm/menu/MenuContext.d.ts +2 -1
- package/esm/menu/MenuContext.js +1 -0
- package/esm/menu/menu-item.d.ts +8 -2
- package/esm/menu/menu-item.js +11 -11
- package/esm/menu/menu.d.ts +6 -0
- package/esm/menu/menu.js +11 -11
- package/esm/menu/types.d.ts +1 -0
- package/esm/menu/useKeyboardNavigation.d.ts +6 -3
- package/esm/menu/useKeyboardNavigation.js +21 -14
- package/esm/menu/useStatefulMenu.d.ts +5 -2
- package/esm/menu/useStatefulMenu.js +14 -8
- package/esm/modal/adapter.d.ts +1 -1
- package/esm/modal/index.d.ts +1 -1
- package/esm/modal/index.js +1 -1
- package/esm/modal/modal.js +5 -5
- package/esm/modal/overrides.d.ts +2 -3
- package/esm/modal/overrides.js +6 -8
- package/esm/modal/styled-components.d.ts +1 -1
- package/esm/modal/styled-components.js +8 -8
- package/esm/number/Number.d.ts +3 -0
- package/esm/number/Number.js +10 -0
- package/esm/number/constants.d.ts +2 -0
- package/esm/number/constants.js +4 -0
- package/esm/number/index.d.ts +5 -0
- package/esm/number/index.js +5 -0
- package/esm/number/types.d.ts +6 -0
- package/esm/number/types.js +1 -0
- package/esm/number/useNumber.d.ts +2 -0
- package/esm/number/useNumber.js +8 -0
- package/esm/overrides/index.d.ts +1 -1
- package/esm/overrides/index.js +1 -1
- package/esm/overrides/mergeOverrides.d.ts +3 -2
- package/esm/overrides/mergeOverrides.js +5 -4
- package/esm/payment-card/basewebAdapters.d.ts +2 -0
- package/esm/payment-card/basewebAdapters.js +27 -4
- package/esm/payment-card/styled-components.js +25 -6
- package/esm/payment-card/types.d.ts +4 -2
- package/esm/phone-input/country-select-container.js +1 -1
- package/esm/phone-input/country-select.js +4 -6
- package/esm/phone-input/default-props.d.ts +6 -9
- package/esm/phone-input/default-props.js +7 -9
- package/esm/phone-input/flag-container.js +1 -1
- package/esm/phone-input/phone-input.d.ts +0 -6
- package/esm/phone-input/phone-input.js +21 -12
- package/esm/phone-input/stateful-phone-input-container.js +4 -3
- package/esm/phone-input/stateful-phone-input.d.ts +0 -6
- package/esm/phone-input/styled-components.d.ts +9 -1
- package/esm/phone-input/styled-components.js +21 -7
- package/esm/phone-input/types.d.ts +2 -1
- package/esm/phone-input/utils.d.ts +10 -3
- package/esm/phone-input/utils.js +10 -5
- package/esm/popover/adapter.d.ts +4 -3
- package/esm/popover/adapter.js +15 -0
- package/esm/popover/overrides.js +8 -19
- package/esm/popover/popover.d.ts +6 -3
- package/esm/popover/popover.js +13 -6
- package/esm/popover/stateful-popover.js +2 -2
- package/esm/popover/types.d.ts +10 -2
- package/esm/popover/types.js +2 -1
- package/esm/popover/utils.d.ts +12 -0
- package/esm/popover/utils.js +9 -0
- package/esm/progress/circular/styled-component.d.ts +1 -1
- package/esm/progress/circular/styled-component.js +3 -3
- package/esm/progress/linear/styled-component.d.ts +1 -1
- package/esm/progress/linear/styled-component.js +5 -5
- package/esm/radio/basewebAdapters.d.ts +8 -11
- package/esm/radio/basewebAdapters.js +6 -3
- package/esm/radio/radio.js +6 -5
- package/esm/radio/styled-components.js +9 -11
- package/esm/radio/types.d.ts +13 -6
- package/esm/search/index.d.ts +1 -0
- package/esm/search/index.js +1 -0
- package/esm/search/search.d.ts +1 -1
- package/esm/search/search.js +15 -6
- package/esm/search/stateful-search.d.ts +3 -0
- package/esm/search/stateful-search.js +15 -0
- package/esm/search/styled-components.d.ts +1 -10
- package/esm/search/styled-components.js +54 -24
- package/esm/search/types.d.ts +8 -2
- package/esm/select/adaptor.d.ts +1 -1
- package/esm/select/base-select.d.ts +36 -16
- package/esm/select/base-select.js +185 -88
- package/esm/select/constants.d.ts +3 -0
- package/esm/select/constants.js +3 -1
- package/esm/select/default-props.d.ts +9 -5
- package/esm/select/default-props.js +4 -1
- package/esm/select/index.d.ts +4 -4
- package/esm/select/index.js +3 -3
- package/esm/select/locale.d.ts +4 -0
- package/esm/select/mobileSelect/MobileSelect.js +3 -5
- package/esm/select/mobileSelect/MobileSheet.js +3 -1
- package/esm/select/multi-value.js +22 -12
- package/esm/select/overlaySelect/OverlaySelect.js +10 -18
- package/esm/select/overlaySelect/hooks/useControlRef.d.ts +9 -0
- package/esm/select/overlaySelect/hooks/useControlRef.js +33 -0
- package/esm/select/overlaySelect/hooks/useOverlaySelectOverrides.d.ts +24 -0
- package/esm/select/overlaySelect/{useOverlaySelectOverrides.js → hooks/useOverlaySelectOverrides.js} +31 -28
- package/esm/select/overlaySelect/{usePopover.d.ts → hooks/usePopover.d.ts} +1 -1
- package/esm/select/overlaySelect/{usePopover.js → hooks/usePopover.js} +2 -2
- package/esm/select/overrides.d.ts +3 -1
- package/esm/select/overrides.js +19 -13
- package/esm/select/select-variants.js +2 -2
- package/esm/select/select.d.ts +9 -5
- package/esm/select/select.js +9 -3
- package/esm/select/selectMenuAdapter/CollapsibleSelectMenu.d.ts +118 -0
- package/esm/select/selectMenuAdapter/CollapsibleSelectMenu.js +70 -0
- package/esm/select/selectMenuAdapter/SelectMenuAdapter.d.ts +2 -32
- package/esm/select/selectMenuAdapter/SelectMenuAdapter.js +11 -5
- package/esm/select/selectMenuAdapter/SelectMenuItem.d.ts +8 -2
- package/esm/select/selectMenuAdapter/SelectMenuItem.js +2 -4
- package/esm/select/selectMenuAdapter/hooks/useGetExpandedGroup.d.ts +6 -0
- package/esm/select/selectMenuAdapter/hooks/useGetExpandedGroup.js +16 -0
- package/esm/select/selectMenuAdapter/types.d.ts +42 -0
- package/esm/select/selectMenuAdapter/types.js +1 -0
- package/esm/select/stateful-select.d.ts +9 -5
- package/esm/select/stateful-select.js +3 -3
- package/esm/select/styled-component.d.ts +15 -4
- package/esm/select/styled-component.js +60 -10
- package/esm/select/types.d.ts +36 -9
- package/esm/select/types.js +1 -0
- package/esm/select/utils/default-filter-options.d.ts +2 -1
- package/esm/select/utils/default-filter-options.js +5 -1
- package/esm/select/utils/hidden-element.d.ts +6 -0
- package/esm/select/utils/hidden-element.js +16 -0
- package/esm/select/utils/merge-options.d.ts +2 -0
- package/esm/select/utils/merge-options.js +18 -0
- package/esm/select/utils/test-utils.d.ts +1 -0
- package/esm/select/utils/test-utils.js +7 -0
- package/esm/slider/mark.d.ts +3 -3
- package/esm/slider/slider.js +2 -1
- package/esm/slider/stateful-slider.js +1 -1
- package/esm/slider/styled-components.js +4 -4
- package/esm/slider/types.d.ts +9 -2
- package/esm/snackbar/Snackbar.js +12 -12
- package/esm/snackbar/styled-component.js +9 -6
- package/esm/spacewebProvider/CustomBaseProvider.js +1 -0
- package/esm/spacewebProvider/SpacewebProvider.d.ts +3 -1
- package/esm/spacewebProvider/SpacewebProvider.js +9 -9
- package/esm/stack/stack.js +6 -13
- package/esm/style/_buildUtils.d.ts +1 -1
- package/esm/style/_buildUtils.js +3 -1
- package/esm/style/_parseStyle.js +12 -7
- package/esm/style/useMemoizedStyletron.d.ts +1 -1
- package/esm/style/useMemoizedStyletron.js +6 -1
- package/esm/styleEngine/styleEngine.d.ts +1 -2
- package/esm/switch/__test__/switch.spec.js +13 -0
- package/esm/switch/styled-components.js +14 -21
- package/esm/switch/switch.js +5 -2
- package/esm/switch/types.d.ts +8 -11
- package/esm/tag/avatar-tag.js +23 -16
- package/esm/tag/styled-components.js +32 -27
- package/esm/tag/tag.js +20 -12
- package/esm/tag/types.d.ts +2 -2
- package/esm/tag/utils.d.ts +50 -0
- package/esm/tag/utils.js +64 -0
- package/esm/textarea/basewebAdapters.js +4 -4
- package/esm/textarea/styled-components.d.ts +1 -1
- package/esm/textarea/textarea.js +4 -8
- package/esm/textarea/types.d.ts +7 -5
- package/esm/theme/Provider.d.ts +10 -0
- package/esm/theme/Provider.js +61 -0
- package/esm/theme/context.d.ts +1 -10
- package/esm/theme/context.js +1 -61
- package/esm/theme/index.d.ts +1 -0
- package/esm/theme/index.js +1 -0
- package/esm/themes/index.js +1 -1
- package/esm/themes/responsive-theme.d.ts +2 -2
- package/esm/time-picker/TimePicker.d.ts +1 -6
- package/esm/time-picker/TimePicker.js +4 -4
- package/esm/time-picker/types.d.ts +3 -1
- package/esm/time-range-picker/RangeSelector.js +6 -5
- package/esm/time-range-picker/RangeSelectorContainer.js +27 -27
- package/esm/time-range-picker/TimeRangeList.js +8 -1
- package/esm/time-range-picker/TimeRangePicker.js +26 -17
- package/esm/time-range-picker/index.d.ts +1 -1
- package/esm/time-range-picker/index.js +1 -1
- package/esm/time-range-picker/locale.d.ts +3 -0
- package/esm/time-range-picker/types.d.ts +17 -3
- package/esm/time-range-picker/utils.d.ts +47 -18
- package/esm/time-range-picker/utils.js +94 -16
- package/esm/time-zone-picker/TimezonePicker.d.ts +1 -6
- package/esm/time-zone-picker/TimezonePicker.js +5 -7
- package/esm/time-zone-picker/types.d.ts +2 -0
- package/esm/tooltip/disabled-tooltip-container.d.ts +26 -1
- package/esm/tooltip/overrides.js +1 -2
- package/esm/tooltip/stateful-tooltip-container.d.ts +26 -1
- package/esm/tooltip/stateful-tooltip.d.ts +27 -1
- package/esm/tooltip/stateful-tooltip.js +2 -2
- package/esm/tooltip/tooltip.d.ts +1 -1
- package/esm/tooltip/tooltip.js +7 -4
- package/esm/tooltip/types.d.ts +12 -2
- package/esm/types.d.ts +5 -3
- package/esm/typography/Typography.js +14 -1
- package/esm/typography/constants.d.ts +56 -0
- package/esm/typography/constants.js +56 -0
- package/esm/typography/index.d.ts +1 -0
- package/esm/typography/index.js +1 -0
- package/esm/typography/styled-components.js +12 -4
- package/esm/typography/types.d.ts +1 -1
- package/esm/utils/intlNumberFormatUtils/index.d.ts +7 -0
- package/esm/utils/intlNumberFormatUtils/index.js +36 -0
- package/esm/utils/intlNumberFormatUtils/types.d.ts +21 -0
- package/esm/utils/intlNumberFormatUtils/types.js +6 -0
- package/esm/video/Video.js +4 -2
- package/esm/video/types.d.ts +2 -0
- package/form-control/context.d.ts +6 -13
- package/form-control/context.js +11 -10
- package/form-control/form-control.d.ts +1 -1
- package/form-control/form-control.js +16 -11
- package/form-control/styled-component.js +18 -7
- package/helpers/ClearIconButton.js +3 -1
- package/helpers/StyledTombstone.d.ts +1 -0
- package/helpers/StyledTombstone.js +21 -0
- package/helpers/baseui/useConvertOverrides.js +6 -1
- package/helpers/baseui/withThemeOverride.js +1 -1
- package/helpers/commonStyles.d.ts +2 -2
- package/helpers/commonStyles.js +3 -6
- package/helpers/index.d.ts +1 -0
- package/helpers/index.js +10 -1
- package/helpers/styletron.d.ts +14 -3
- package/helpers/themeHelpers.d.ts +1 -0
- package/helpers/themeHelpers.js +15 -1
- package/hooks/useAutoFocus.d.ts +6 -7
- package/hooks/useAutoFocus.js +19 -14
- package/hooks/useCombinedRef.d.ts +1 -0
- package/hooks/useCombinedRef.js +35 -1
- package/hooks/useIsMobileDevice.d.ts +1 -0
- package/hooks/useIsMobileDevice.js +11 -0
- package/hooks/useMatchMedia.d.ts +3 -0
- package/hooks/useMatchMedia.js +52 -0
- package/icon/components/alert-solid.js +2 -0
- package/icon/components/alert.js +2 -0
- package/icon/components/calendar-solid.js +2 -0
- package/icon/components/chevron-down.js +2 -0
- package/icon/components/chevron-left.d.ts +3 -0
- package/icon/components/chevron-left.js +11 -0
- package/icon/components/chevron-right.d.ts +3 -0
- package/icon/components/chevron-right.js +11 -0
- package/icon/components/close.js +2 -0
- package/icon/components/error-clr.js +2 -0
- package/icon/components/error-solid.js +2 -0
- package/icon/components/error.js +2 -0
- package/icon/components/imagePreview.js +2 -0
- package/icon/components/info.js +2 -0
- package/icon/components/play-video.js +2 -0
- package/icon/components/reset-color.d.ts +3 -0
- package/icon/components/reset-color.js +11 -0
- package/icon/components/search.js +2 -0
- package/icon/components/tick.js +2 -0
- package/icon/components/tickCircle-solid.js +2 -0
- package/icon/components/user.js +2 -0
- package/icon/components/video-non-playable.js +2 -0
- package/index.d.ts +2 -0
- package/index.js +3 -0
- package/input/basewebAdapters.d.ts +1 -1
- package/input/basewebAdapters.js +18 -3
- package/input/index.d.ts +2 -1
- package/input/index.js +3 -1
- package/input/styled-components.d.ts +1 -1
- package/input/styled-components.js +7 -5
- package/input/types.d.ts +10 -4
- package/layer/useLayersContextValue.js +2 -1
- package/list/avatar-list-item.d.ts +12 -22
- package/list/avatar-list-item.js +6 -8
- package/list/divider.js +6 -3
- package/list/index.d.ts +1 -1
- package/list/index.js +2 -1
- package/list/list-item.d.ts +3 -1
- package/list/list-item.js +9 -6
- package/list/list.d.ts +10 -5
- package/list/list.js +47 -6
- package/list/styled-component.d.ts +1 -0
- package/list/styled-component.js +24 -18
- package/list/types.d.ts +8 -0
- package/list/utils.d.ts +2 -0
- package/list/utils.js +14 -0
- package/locale/en_US.js +35 -0
- package/locale/types.d.ts +21 -0
- package/menu/MenuContext.d.ts +2 -1
- package/menu/MenuContext.js +1 -0
- package/menu/menu-item.d.ts +8 -2
- package/menu/menu-item.js +11 -11
- package/menu/menu.d.ts +6 -0
- package/menu/menu.js +11 -11
- package/menu/types.d.ts +1 -0
- package/menu/useKeyboardNavigation.d.ts +6 -3
- package/menu/useKeyboardNavigation.js +21 -14
- package/menu/useStatefulMenu.d.ts +5 -2
- package/menu/useStatefulMenu.js +14 -8
- package/modal/adapter.d.ts +1 -1
- package/modal/index.d.ts +1 -1
- package/modal/index.js +1 -2
- package/modal/modal.js +4 -4
- package/modal/overrides.d.ts +2 -3
- package/modal/overrides.js +7 -9
- package/modal/styled-components.d.ts +1 -1
- package/modal/styled-components.js +8 -9
- package/number/Number.d.ts +3 -0
- package/number/Number.js +14 -0
- package/number/constants.d.ts +2 -0
- package/number/constants.js +7 -0
- package/number/index.d.ts +5 -0
- package/number/index.js +12 -0
- package/number/package.json +4 -0
- package/number/types.d.ts +6 -0
- package/number/types.js +2 -0
- package/number/useNumber.d.ts +2 -0
- package/number/useNumber.js +12 -0
- package/overrides/index.d.ts +1 -1
- package/overrides/index.js +2 -1
- package/overrides/mergeOverrides.d.ts +3 -2
- package/overrides/mergeOverrides.js +6 -4
- package/package.json +18 -12
- package/payment-card/basewebAdapters.d.ts +2 -0
- package/payment-card/basewebAdapters.js +27 -4
- package/payment-card/styled-components.js +24 -5
- package/payment-card/types.d.ts +4 -2
- package/phone-input/country-select-container.js +1 -1
- package/phone-input/country-select.js +4 -6
- package/phone-input/default-props.d.ts +6 -9
- package/phone-input/default-props.js +8 -9
- package/phone-input/flag-container.js +1 -1
- package/phone-input/phone-input.d.ts +0 -6
- package/phone-input/phone-input.js +20 -11
- package/phone-input/stateful-phone-input-container.js +4 -3
- package/phone-input/stateful-phone-input.d.ts +0 -6
- package/phone-input/styled-components.d.ts +9 -1
- package/phone-input/styled-components.js +22 -7
- package/phone-input/types.d.ts +2 -1
- package/phone-input/utils.d.ts +10 -3
- package/phone-input/utils.js +11 -5
- package/popover/adapter.d.ts +4 -3
- package/popover/adapter.js +16 -1
- package/popover/overrides.js +8 -19
- package/popover/popover.d.ts +6 -3
- package/popover/popover.js +12 -5
- package/popover/stateful-popover.js +2 -2
- package/popover/types.d.ts +10 -2
- package/popover/types.js +5 -4
- package/popover/utils.d.ts +12 -0
- package/popover/utils.js +11 -1
- package/progress/circular/styled-component.d.ts +1 -1
- package/progress/circular/styled-component.js +4 -4
- package/progress/linear/styled-component.d.ts +1 -1
- package/progress/linear/styled-component.js +5 -5
- package/radio/basewebAdapters.d.ts +8 -11
- package/radio/basewebAdapters.js +6 -3
- package/radio/radio.js +6 -5
- package/radio/styled-components.js +9 -11
- package/radio/types.d.ts +13 -6
- package/search/index.d.ts +1 -0
- package/search/index.js +3 -1
- package/search/search.d.ts +1 -1
- package/search/search.js +14 -5
- package/search/stateful-search.d.ts +3 -0
- package/search/stateful-search.js +19 -0
- package/search/styled-components.d.ts +1 -10
- package/search/styled-components.js +56 -25
- package/search/types.d.ts +8 -2
- package/select/adaptor.d.ts +1 -1
- package/select/base-select.d.ts +36 -16
- package/select/base-select.js +183 -86
- package/select/constants.d.ts +3 -0
- package/select/constants.js +4 -2
- package/select/default-props.d.ts +9 -5
- package/select/default-props.js +4 -1
- package/select/index.d.ts +4 -4
- package/select/index.js +4 -2
- package/select/locale.d.ts +4 -0
- package/select/mobileSelect/MobileSelect.js +3 -5
- package/select/mobileSelect/MobileSheet.js +3 -1
- package/select/multi-value.js +21 -11
- package/select/overlaySelect/OverlaySelect.js +9 -17
- package/select/overlaySelect/hooks/useControlRef.d.ts +9 -0
- package/select/overlaySelect/hooks/useControlRef.js +37 -0
- package/select/overlaySelect/hooks/useOverlaySelectOverrides.d.ts +24 -0
- package/select/overlaySelect/{useOverlaySelectOverrides.js → hooks/useOverlaySelectOverrides.js} +31 -28
- package/select/overlaySelect/{usePopover.d.ts → hooks/usePopover.d.ts} +1 -1
- package/select/overlaySelect/{usePopover.js → hooks/usePopover.js} +2 -2
- package/select/overrides.d.ts +3 -1
- package/select/overrides.js +20 -14
- package/select/select-variants.js +2 -2
- package/select/select.d.ts +9 -5
- package/select/select.js +9 -3
- package/select/selectMenuAdapter/CollapsibleSelectMenu.d.ts +118 -0
- package/select/selectMenuAdapter/CollapsibleSelectMenu.js +74 -0
- package/select/selectMenuAdapter/SelectMenuAdapter.d.ts +2 -32
- package/select/selectMenuAdapter/SelectMenuAdapter.js +11 -5
- package/select/selectMenuAdapter/SelectMenuItem.d.ts +8 -2
- package/select/selectMenuAdapter/SelectMenuItem.js +2 -4
- package/select/selectMenuAdapter/hooks/useGetExpandedGroup.d.ts +6 -0
- package/select/selectMenuAdapter/hooks/useGetExpandedGroup.js +20 -0
- package/select/selectMenuAdapter/types.d.ts +42 -0
- package/select/selectMenuAdapter/types.js +2 -0
- package/select/stateful-select.d.ts +9 -5
- package/select/stateful-select.js +3 -3
- package/select/styled-component.d.ts +15 -4
- package/select/styled-component.js +58 -11
- package/select/types.d.ts +36 -9
- package/select/types.js +2 -1
- package/select/utils/default-filter-options.d.ts +2 -1
- package/select/utils/default-filter-options.js +6 -5
- package/select/utils/hidden-element.d.ts +6 -0
- package/select/utils/hidden-element.js +19 -0
- package/select/utils/merge-options.d.ts +2 -0
- package/select/utils/merge-options.js +22 -0
- package/select/utils/test-utils.d.ts +1 -0
- package/select/utils/test-utils.js +11 -0
- package/slider/mark.d.ts +3 -3
- package/slider/slider.js +2 -1
- package/slider/stateful-slider.js +1 -1
- package/slider/styled-components.js +4 -4
- package/slider/types.d.ts +9 -2
- package/snackbar/Snackbar.js +12 -12
- package/snackbar/styled-component.js +9 -6
- package/spacewebProvider/CustomBaseProvider.js +1 -0
- package/spacewebProvider/SpacewebProvider.d.ts +3 -1
- package/spacewebProvider/SpacewebProvider.js +8 -8
- package/stack/stack.js +6 -13
- package/style/_buildUtils.d.ts +1 -1
- package/style/_buildUtils.js +3 -1
- package/style/_parseStyle.js +12 -7
- package/style/useMemoizedStyletron.d.ts +1 -1
- package/style/useMemoizedStyletron.js +6 -1
- package/styleEngine/styleEngine.d.ts +1 -2
- package/switch/__test__/switch.spec.js +13 -0
- package/switch/styled-components.js +14 -21
- package/switch/switch.js +5 -2
- package/switch/types.d.ts +8 -11
- package/tag/avatar-tag.js +23 -16
- package/tag/styled-components.js +32 -27
- package/tag/tag.js +19 -11
- package/tag/types.d.ts +2 -2
- package/tag/utils.d.ts +50 -0
- package/tag/utils.js +67 -1
- package/textarea/basewebAdapters.js +3 -3
- package/textarea/styled-components.d.ts +1 -1
- package/textarea/textarea.js +3 -7
- package/textarea/types.d.ts +7 -5
- package/theme/Provider.d.ts +10 -0
- package/theme/Provider.js +65 -0
- package/theme/context.d.ts +1 -10
- package/theme/context.js +1 -61
- package/theme/index.d.ts +1 -0
- package/theme/index.js +1 -0
- package/themes/index.js +1 -1
- package/themes/responsive-theme.d.ts +2 -2
- package/time-picker/TimePicker.d.ts +1 -6
- package/time-picker/TimePicker.js +4 -4
- package/time-picker/types.d.ts +3 -1
- package/time-range-picker/RangeSelector.js +5 -4
- package/time-range-picker/RangeSelectorContainer.js +26 -26
- package/time-range-picker/TimeRangeList.js +8 -1
- package/time-range-picker/TimeRangePicker.js +25 -16
- package/time-range-picker/index.d.ts +1 -1
- package/time-range-picker/index.js +4 -1
- package/time-range-picker/locale.d.ts +3 -0
- package/time-range-picker/types.d.ts +17 -3
- package/time-range-picker/utils.d.ts +47 -18
- package/time-range-picker/utils.js +98 -17
- package/time-zone-picker/TimezonePicker.d.ts +1 -6
- package/time-zone-picker/TimezonePicker.js +5 -7
- package/time-zone-picker/types.d.ts +2 -0
- package/tooltip/disabled-tooltip-container.d.ts +26 -1
- package/tooltip/overrides.js +1 -2
- package/tooltip/stateful-tooltip-container.d.ts +26 -1
- package/tooltip/stateful-tooltip.d.ts +27 -1
- package/tooltip/stateful-tooltip.js +2 -2
- package/tooltip/tooltip.d.ts +1 -1
- package/tooltip/tooltip.js +7 -4
- package/tooltip/types.d.ts +12 -2
- package/tsconfig.tsbuildinfo +1 -1
- package/types.d.ts +5 -3
- package/typography/Typography.js +14 -1
- package/typography/constants.d.ts +56 -0
- package/typography/constants.js +57 -1
- package/typography/index.d.ts +1 -0
- package/typography/index.js +3 -1
- package/typography/styled-components.js +11 -3
- package/typography/types.d.ts +1 -1
- package/utils/intlNumberFormatUtils/index.d.ts +7 -0
- package/utils/intlNumberFormatUtils/index.js +40 -0
- package/utils/intlNumberFormatUtils/types.d.ts +21 -0
- package/utils/intlNumberFormatUtils/types.js +9 -0
- package/utils/package.json +4 -0
- package/video/Video.js +4 -2
- package/video/types.d.ts +2 -0
- package/esm/icon/components/chevron-right-solid.d.ts +0 -3
- package/esm/icon/components/chevron-right-solid.js +0 -6
- package/esm/phone-input/virtualized-country-select-dropdown.d.ts +0 -31
- package/esm/phone-input/virtualized-country-select-dropdown.js +0 -33
- package/esm/select/overlaySelect/useOverlaySelectOverrides.d.ts +0 -14
- package/esm/style/_escapeClassName.d.ts +0 -6
- package/esm/style/_escapeClassName.js +0 -6
- package/icon/components/chevron-right-solid.d.ts +0 -3
- package/icon/components/chevron-right-solid.js +0 -9
- package/phone-input/virtualized-country-select-dropdown.d.ts +0 -31
- package/phone-input/virtualized-country-select-dropdown.js +0 -35
- package/select/overlaySelect/useOverlaySelectOverrides.d.ts +0 -14
- package/style/_escapeClassName.d.ts +0 -6
- package/style/_escapeClassName.js +0 -9
|
@@ -3,19 +3,38 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import DateHelpers from 'baseui/datepicker/utils/date-helpers';
|
|
5
5
|
import dateFnsAdapter from 'baseui/datepicker/utils/date-fns-adapter';
|
|
6
|
-
import
|
|
6
|
+
import _compact from 'lodash/compact';
|
|
7
|
+
import BaseCalendar from './Calendar';
|
|
7
8
|
import { Box } from '../box';
|
|
8
9
|
import { Stack } from '../stack';
|
|
9
10
|
import { Button } from '../button';
|
|
10
11
|
import { StyledFooter } from './styled-components';
|
|
12
|
+
import { TimezonePicker } from '../time-zone-picker';
|
|
13
|
+
import { FormControl } from '../form-control';
|
|
11
14
|
import { useOverrides } from '../overrides';
|
|
12
15
|
import { useLocale } from '../locale';
|
|
13
16
|
import { isTimeInRange } from './utils';
|
|
17
|
+
import { convertDateFromTargetTzToSystemTz } from '../time-range-picker/utils';
|
|
18
|
+
var MONTH_WIDTH = 284;
|
|
19
|
+
var TIMEZONE_PICKER_OVERRIDES = {
|
|
20
|
+
Select: {
|
|
21
|
+
props: {
|
|
22
|
+
overrides: {
|
|
23
|
+
Input: {
|
|
24
|
+
props: {
|
|
25
|
+
'data-testid': 'timezone-selector',
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
};
|
|
14
32
|
export var DatePickerContent = function (_a) {
|
|
15
|
-
var _value = _a.value, onChange = _a.onChange, overrides = _a.overrides, autoFocusCalendar = _a.autoFocusCalendar, onClose = _a.onClose, _b = _a.adapter, adapter = _b === void 0 ? dateFnsAdapter : _b, props = __rest(_a, ["value", "onChange", "overrides", "autoFocusCalendar", "onClose", "adapter"]);
|
|
33
|
+
var _value = _a.value, onChange = _a.onChange, overrides = _a.overrides, autoFocusCalendar = _a.autoFocusCalendar, onClose = _a.onClose, _b = _a.adapter, adapter = _b === void 0 ? dateFnsAdapter : _b, showTimezone = _a.showTimezone, _timezone = _a.timezone, props = __rest(_a, ["value", "onChange", "overrides", "autoFocusCalendar", "onClose", "adapter", "showTimezone", "timezone"]);
|
|
16
34
|
var dateHelpers = React.useMemo(function () { return new DateHelpers(adapter); }, [adapter]);
|
|
17
35
|
var _c = __read(React.useState(_value), 2), value = _c[0], setValue = _c[1];
|
|
18
36
|
var _d = __read(React.useState(false), 2), hasError = _d[0], setHasError = _d[1];
|
|
37
|
+
var _e = __read(React.useState(_timezone), 2), timezone = _e[0], setTimezone = _e[1];
|
|
19
38
|
React.useEffect(function () {
|
|
20
39
|
if (isTimeInRange(value, { minDate: props.minDate, maxDate: props.maxDate, dateHelpers: dateHelpers })) {
|
|
21
40
|
setHasError(false);
|
|
@@ -24,18 +43,50 @@ export var DatePickerContent = function (_a) {
|
|
|
24
43
|
setHasError(true);
|
|
25
44
|
}
|
|
26
45
|
}, [dateHelpers, props.maxDate, props.minDate, value]);
|
|
27
|
-
var
|
|
46
|
+
var _f = __read(useOverrides(overrides === null || overrides === void 0 ? void 0 : overrides.Footer, StyledFooter), 2), Footer = _f[0], footerProps = _f[1];
|
|
47
|
+
var _g = __read(useOverrides(overrides === null || overrides === void 0 ? void 0 : overrides.Calendar, BaseCalendar), 2), Calendar = _g[0], calendarProps = _g[1];
|
|
28
48
|
var locale = useLocale();
|
|
29
49
|
var handleChange = React.useCallback(function (data) {
|
|
30
50
|
setValue(data.date);
|
|
31
51
|
if (!props.timeSelect) {
|
|
32
|
-
|
|
52
|
+
if (Array.isArray(data.date)) {
|
|
53
|
+
onChange === null || onChange === void 0 ? void 0 : onChange({
|
|
54
|
+
date: _compact(data.date).map(function (date) { return new Date(convertDateFromTargetTzToSystemTz(date, timezone)); }),
|
|
55
|
+
timezone: timezone,
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
var startMillis = convertDateFromTargetTzToSystemTz(data.date, timezone);
|
|
60
|
+
onChange === null || onChange === void 0 ? void 0 : onChange({
|
|
61
|
+
date: new Date(startMillis),
|
|
62
|
+
timezone: timezone,
|
|
63
|
+
});
|
|
64
|
+
}
|
|
33
65
|
}
|
|
34
|
-
}, [onChange, props.timeSelect]);
|
|
66
|
+
}, [onChange, props.timeSelect, timezone]);
|
|
35
67
|
var handleSubmit = React.useCallback(function () {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
68
|
+
if (value && !Array.isArray(value)) {
|
|
69
|
+
var startMillis = convertDateFromTargetTzToSystemTz(value, timezone);
|
|
70
|
+
onChange === null || onChange === void 0 ? void 0 : onChange({ date: new Date(startMillis), timezone: timezone });
|
|
71
|
+
}
|
|
72
|
+
else {
|
|
73
|
+
onChange === null || onChange === void 0 ? void 0 : onChange({
|
|
74
|
+
date: value
|
|
75
|
+
? _compact(value).map(function (date) { return new Date(convertDateFromTargetTzToSystemTz(date, timezone)); })
|
|
76
|
+
: undefined,
|
|
77
|
+
timezone: timezone,
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
}, [onChange, timezone, value]);
|
|
81
|
+
return (_jsxs(Box, __assign({ className: function (_a) {
|
|
82
|
+
var px2rem = _a.px2rem;
|
|
83
|
+
return ({
|
|
84
|
+
maxWidth: px2rem((props.monthsShown || 1) * MONTH_WIDTH),
|
|
85
|
+
});
|
|
86
|
+
} }, { children: [_jsx(Calendar, __assign({ trapTabbing: !props.timeSelect }, props, { value: value, onChange: handleChange,
|
|
39
87
|
// @ts-ignore
|
|
40
|
-
overrides: overrides, autoFocusCalendar: autoFocusCalendar, timeSelectEnd: props.timeSelect, timeSelectStart: props.timeSelect, adapter: adapter }), void 0),
|
|
88
|
+
overrides: overrides, autoFocusCalendar: autoFocusCalendar, timeSelectEnd: props.timeSelect, timeSelectStart: props.timeSelect, adapter: adapter }, calendarProps), void 0), showTimezone ? (_jsx(Box, __assign({ className: "px-4 mb-4" }, { children: _jsx(FormControl, __assign({ label: locale.datePicker.timezonePickerLabel }, { children: _jsx(TimezonePicker, { clearable: false, placeholder: locale.datePicker.timezonePickerPlaceholder, value: timezone, size: "sm", onChange: function (_a) {
|
|
89
|
+
var id = _a.id;
|
|
90
|
+
return setTimezone(id);
|
|
91
|
+
}, overrides: TIMEZONE_PICKER_OVERRIDES }, void 0) }), void 0) }), void 0)) : null, props.timeSelect ? (_jsx(Footer, __assign({ "$onSubmit": handleSubmit, "$onClose": onClose, className: "justify-end" }, footerProps, { children: _jsxs(Stack, __assign({ direction: "horizontal", gap: 3, className: "items-center" }, { children: [_jsx(Button, __assign({ size: "xs", onClick: onClose, variant: "secondary", "data-testid": "cancel" }, { children: locale.timeRangePicker.cancelBtnLabel }), void 0), _jsx(Button, __assign({ size: "xs", onClick: handleSubmit, "data-testid": "save", disabled: hasError || !value }, { children: locale.timeRangePicker.saveBtnLabel }), void 0)] }), void 0) }), void 0)) : null] }), void 0));
|
|
41
92
|
};
|
|
@@ -10,15 +10,19 @@ import ChevronDown from '../icon/components/chevron-down';
|
|
|
10
10
|
import CalendarIcon from '../icon/components/calendar-solid';
|
|
11
11
|
import ClearIconButton from '../helpers/ClearIconButton';
|
|
12
12
|
import { mergeOverrides } from '../overrides';
|
|
13
|
-
import {
|
|
13
|
+
import { getInputStyles } from '../input/styled-components';
|
|
14
14
|
import cx from '../classNames';
|
|
15
15
|
var InputBeforeEnhancer = function (_a) {
|
|
16
16
|
var disabled = _a.disabled, onClick = _a.onClick;
|
|
17
|
-
return (_jsx(Box, __assign({ className: cx('flex items-center pl-3', {
|
|
17
|
+
return (_jsx(Box, __assign({ className: cx('flex items-center pl-3', {
|
|
18
|
+
'cursor-pointer': !disabled,
|
|
19
|
+
}), onClick: disabled ? _noop : onClick }, { children: _jsx(CalendarIcon, { className: "".concat(disabled ? 'spr-icon-03' : 'spr-icon-01'), size: 14 }, void 0) }), void 0));
|
|
18
20
|
};
|
|
19
21
|
var InputAfterEnhancer = function (_a) {
|
|
20
22
|
var onClick = _a.onClick, isOpen = _a.isOpen, disabled = _a.disabled;
|
|
21
|
-
return (_jsx(Box, __assign({ className: cx('flex items-center pr-3', {
|
|
23
|
+
return (_jsx(Box, __assign({ className: cx('flex items-center pr-3', {
|
|
24
|
+
'cursor-pointer': !disabled,
|
|
25
|
+
}), onClick: disabled ? _noop : onClick }, { children: _jsx(ChevronDown, { className: chevronStyles, "$isOpen": isOpen }, void 0) }), void 0));
|
|
22
26
|
};
|
|
23
27
|
var DEFAULT_INPUT_WIDTH = 62;
|
|
24
28
|
var DatePickerInput = function (_a) {
|
|
@@ -69,10 +73,9 @@ var DatePickerInput = function (_a) {
|
|
|
69
73
|
style: function (_a, _b) {
|
|
70
74
|
var theme = _a.theme;
|
|
71
75
|
var $intent = _b.$intent;
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
}
|
|
75
|
-
return {};
|
|
76
|
+
return (__assign(__assign({}, (isOpen && $intent === 'default' && borderColor(theme.spr.focus01))), (autoSizeInput && {
|
|
77
|
+
width: 'auto',
|
|
78
|
+
})));
|
|
76
79
|
},
|
|
77
80
|
},
|
|
78
81
|
ClearIcon: {
|
|
@@ -84,15 +87,9 @@ var DatePickerInput = function (_a) {
|
|
|
84
87
|
}, overrides);
|
|
85
88
|
}, [overrides, onFocus, isOpen, inputWidth, disabled, autoSizeInput]);
|
|
86
89
|
return (_jsxs(_Fragment, { children: [_jsx(Input, __assign({}, props, { value: value, onFocus: onFocus, disabled: disabled, overrides: INPUT_OVERRIDES }), void 0), _jsx(Box, __assign({ ref: ref, className: [
|
|
87
|
-
function (
|
|
88
|
-
var
|
|
89
|
-
|
|
90
|
-
return {
|
|
91
|
-
lineHeight: inputSizeTheme.lineHeight,
|
|
92
|
-
paddingLeft: inputSizeTheme.paddingX,
|
|
93
|
-
paddingRight: inputSizeTheme.paddingX,
|
|
94
|
-
fontSize: inputSizeTheme.fontSize,
|
|
95
|
-
};
|
|
90
|
+
function (utils) {
|
|
91
|
+
var inputStyles = getInputStyles(utils, { $size: props.size, $disabled: disabled });
|
|
92
|
+
return inputStyles;
|
|
96
93
|
},
|
|
97
94
|
{
|
|
98
95
|
position: 'absolute',
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { CalendarProps as BaseCalendarProps } from 'baseui/datepicker';
|
|
3
|
+
import { DateIOAdapter } from 'baseui/datepicker/utils/types';
|
|
3
4
|
import { DatepickerOverrides } from './types';
|
|
4
5
|
declare type Props = {
|
|
5
6
|
range?: boolean;
|
|
6
|
-
adapter?:
|
|
7
|
+
adapter?: DateIOAdapter<Date>;
|
|
7
8
|
timeSelectStart?: boolean;
|
|
8
9
|
timeSelectEnd?: boolean;
|
|
9
10
|
value?: Date | Date[] | null;
|
|
@@ -13,6 +14,7 @@ declare type Props = {
|
|
|
13
14
|
locale?: any;
|
|
14
15
|
minDate?: Date;
|
|
15
16
|
maxDate?: Date;
|
|
17
|
+
disabled?: boolean;
|
|
16
18
|
};
|
|
17
|
-
export declare const DateTimeContainer: React.MemoExoticComponent<({ range, adapter, timeSelectStart, timeSelectEnd, value, monthsShown, onChange, overrides, locale: dateFnsLocale, minDate, maxDate, }: Props) => JSX.Element>;
|
|
19
|
+
export declare const DateTimeContainer: React.MemoExoticComponent<({ range, adapter, timeSelectStart, timeSelectEnd, value, monthsShown, onChange, overrides, locale: dateFnsLocale, minDate, maxDate, disabled, }: Props) => JSX.Element>;
|
|
18
20
|
export {};
|
|
@@ -10,20 +10,20 @@ import { FormControl } from '../form-control';
|
|
|
10
10
|
import { useOverrides } from '../overrides';
|
|
11
11
|
import { useLocale } from '../locale';
|
|
12
12
|
var DateAndTimeSelect = function (_a) {
|
|
13
|
-
var time = _a.time, onTimeChange = _a.onTimeChange, onDateChange = _a.onDateChange, dateInputLabel = _a.dateInputLabel, timePickerLabel = _a.timePickerLabel, overrides = _a.overrides, locale = _a.locale, minDate = _a.minDate, maxDate = _a.maxDate, adapter = _a.adapter;
|
|
13
|
+
var time = _a.time, onTimeChange = _a.onTimeChange, onDateChange = _a.onDateChange, dateInputLabel = _a.dateInputLabel, timePickerLabel = _a.timePickerLabel, overrides = _a.overrides, locale = _a.locale, minDate = _a.minDate, maxDate = _a.maxDate, adapter = _a.adapter, disabled = _a.disabled;
|
|
14
14
|
var dateHelpers = React.useMemo(function () { return new DateHelpers(adapter); }, [adapter]);
|
|
15
15
|
var _b = __read(useOverrides(overrides === null || overrides === void 0 ? void 0 : overrides.TimePickerFormControl, FormControl), 2), TimePickerFormControl = _b[0], timePickerFormControlProps = _b[1];
|
|
16
16
|
var _c = __read(useOverrides(overrides === null || overrides === void 0 ? void 0 : overrides.DateInputFormControl, FormControl), 2), DateInputFormControl = _c[0], dateInputFormControlProps = _c[1];
|
|
17
17
|
return (_jsxs(Stack, __assign({ direction: "horizontal", gap: 2, className: "items-center" }, { children: [_jsx(StackItem, __assign({ className: ['flex-1', function (_a) {
|
|
18
18
|
var px2rem = _a.px2rem;
|
|
19
19
|
return ({ width: px2rem(120) });
|
|
20
|
-
}] }, { children: _jsx(DateInputFormControl, __assign({ className: "mb-0", label: dateInputLabel }, dateInputFormControlProps, { children: _jsx(DateInput, { dateHelpers: dateHelpers, date: time, onChange: onDateChange, minDate: minDate, maxDate: maxDate, locale: locale }, void 0) }), void 0) }), void 0), _jsx(StackItem, __assign({ className: ['flex-1', function (_a) {
|
|
20
|
+
}] }, { children: _jsx(DateInputFormControl, __assign({ className: "mb-0", label: dateInputLabel }, dateInputFormControlProps, { children: _jsx(DateInput, { disabled: disabled, dateHelpers: dateHelpers, date: time, onChange: onDateChange, minDate: minDate, maxDate: maxDate, locale: locale }, void 0) }), void 0) }), void 0), _jsx(StackItem, __assign({ className: ['flex-1', function (_a) {
|
|
21
21
|
var px2rem = _a.px2rem;
|
|
22
22
|
return ({ width: px2rem(120) });
|
|
23
|
-
}] }, { children: _jsx(TimePickerFormControl, __assign({ className: "mb-0", label: timePickerLabel }, timePickerFormControlProps, { children: _jsx(TimeInput, { time: time, dateHelpers: dateHelpers, onChange: onTimeChange, overrides: overrides, minTime: minDate, maxTime: maxDate }, void 0) }), void 0) }), void 0)] }), void 0));
|
|
23
|
+
}] }, { children: _jsx(TimePickerFormControl, __assign({ className: "mb-0", label: timePickerLabel }, timePickerFormControlProps, { children: _jsx(TimeInput, { disabled: disabled, time: time, dateHelpers: dateHelpers, onChange: onTimeChange, overrides: overrides, minTime: minDate, maxTime: maxDate, adapter: adapter }, void 0) }), void 0) }), void 0)] }), void 0));
|
|
24
24
|
};
|
|
25
25
|
export var DateTimeContainer = React.memo(function (_a) {
|
|
26
|
-
var range = _a.range, _b = _a.adapter, adapter = _b === void 0 ? dateFnsAdapter : _b, timeSelectStart = _a.timeSelectStart, timeSelectEnd = _a.timeSelectEnd, value = _a.value, monthsShown = _a.monthsShown, onChange = _a.onChange, overrides = _a.overrides, dateFnsLocale = _a.locale, minDate = _a.minDate, maxDate = _a.maxDate;
|
|
26
|
+
var range = _a.range, _b = _a.adapter, adapter = _b === void 0 ? dateFnsAdapter : _b, timeSelectStart = _a.timeSelectStart, timeSelectEnd = _a.timeSelectEnd, value = _a.value, monthsShown = _a.monthsShown, onChange = _a.onChange, overrides = _a.overrides, dateFnsLocale = _a.locale, minDate = _a.minDate, maxDate = _a.maxDate, disabled = _a.disabled;
|
|
27
27
|
var _c = __read([].concat(value), 2), startDate = _c[0], endDate = _c[1];
|
|
28
28
|
var dateHelpers = React.useMemo(function () { return new DateHelpers(adapter); }, [adapter]);
|
|
29
29
|
var locale = useLocale();
|
|
@@ -117,5 +117,5 @@ export var DateTimeContainer = React.memo(function (_a) {
|
|
|
117
117
|
onChange === null || onChange === void 0 ? void 0 : onChange({ date: date });
|
|
118
118
|
}
|
|
119
119
|
}, [dateHelpers, onChange, range, adapter, value]);
|
|
120
|
-
return (_jsxs(Stack, __assign({ gap: 4, className: "px-4 pb-4", direction: monthsShown === 1 ? 'vertical' : 'horizontal' }, { children: [timeSelectStart && (_jsx(DateTimeSelectContainer, __assign({ className: "flex-1", "$timeSelect": "start" }, dateTimeSelectContainerProps, { children: _jsx(DateAndTimeSelect, { time: startDate, onTimeChange: function (date) { return handleTimeChange(date, 0); }, onDateChange: function (date) { return handleDateInputChange(date, 0); }, dateInputLabel: locale.calendar.dateInputStartLabel, timePickerLabel: locale.calendar.timePickerStartLabel, adapter: adapter, locale: locale, maxDate: maxDate, minDate: minDate, overrides: overrides }, void 0) }), void 0)), range && timeSelectEnd && (_jsx(DateTimeSelectContainer, __assign({ className: "flex-1", "$timeSelect": "end" }, dateTimeSelectContainerProps, { children: _jsx(DateAndTimeSelect, { time: endDate, onTimeChange: function (date) { return handleTimeChange(date, 1); }, onDateChange: function (date) { return handleDateInputChange(date, 1); }, dateInputLabel: locale.calendar.dateInputEndLabel, timePickerLabel: locale.calendar.timePickerEndLabel, adapter: adapter, locale: locale, maxDate: maxDate, minDate: minDate, overrides: overrides }, void 0) }), void 0))] }), void 0));
|
|
120
|
+
return (_jsxs(Stack, __assign({ gap: 4, className: "px-4 pb-4", direction: monthsShown === 1 ? 'vertical' : 'horizontal' }, { children: [timeSelectStart && (_jsx(DateTimeSelectContainer, __assign({ className: "flex-1", "$timeSelect": "start" }, dateTimeSelectContainerProps, { children: _jsx(DateAndTimeSelect, { time: startDate, onTimeChange: function (date) { return handleTimeChange(date, 0); }, onDateChange: function (date) { return handleDateInputChange(date, 0); }, dateInputLabel: locale.calendar.dateInputStartLabel, timePickerLabel: locale.calendar.timePickerStartLabel, adapter: adapter, locale: locale, maxDate: maxDate, minDate: minDate, overrides: overrides, disabled: disabled }, void 0) }), void 0)), range && timeSelectEnd && (_jsx(DateTimeSelectContainer, __assign({ className: "flex-1", "$timeSelect": "end" }, dateTimeSelectContainerProps, { children: _jsx(DateAndTimeSelect, { time: endDate, onTimeChange: function (date) { return handleTimeChange(date, 1); }, onDateChange: function (date) { return handleDateInputChange(date, 1); }, dateInputLabel: locale.calendar.dateInputEndLabel, timePickerLabel: locale.calendar.timePickerEndLabel, adapter: adapter, locale: locale, maxDate: maxDate, minDate: minDate, overrides: overrides, disabled: disabled }, void 0) }), void 0))] }), void 0));
|
|
121
121
|
});
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
2
|
import { StatelessDatePickerProps } from './types';
|
|
3
|
-
export declare const StatelessDatePicker: (
|
|
3
|
+
export declare const StatelessDatePicker: (_props: StatelessDatePickerProps) => ReactElement;
|
|
@@ -2,6 +2,7 @@ import { __assign, __read, __rest } from "tslib";
|
|
|
2
2
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import _noop from 'lodash/noop';
|
|
5
|
+
import _compact from 'lodash/compact';
|
|
5
6
|
import DateHelpers from 'baseui/datepicker/utils/date-helpers';
|
|
6
7
|
import dateFnsAdapter from 'baseui/datepicker/utils/date-fns-adapter';
|
|
7
8
|
import { PLACEMENT } from 'baseui/popover';
|
|
@@ -11,10 +12,14 @@ import { Typography } from '../typography';
|
|
|
11
12
|
import DatePickerInput from './DatePickerInput';
|
|
12
13
|
import { useLocale } from '../locale';
|
|
13
14
|
import useUniqueId from '../hooks/useUniqueId';
|
|
15
|
+
import { useContextualFormProps } from '../form-control/context';
|
|
14
16
|
import { mergeOverrides, useOverrides } from '../overrides';
|
|
15
17
|
import { DEFAULT_FORMAT_STRING } from './constants';
|
|
16
18
|
import { formatDate, getAriaLabel, isTimeInRange, normalizeDashes, prepareLocale } from './utils';
|
|
17
19
|
import { DatePickerContent } from './DatePickerContent';
|
|
20
|
+
import { convertDateFromSystemTzToTargetTz, getSystemTzName } from '../time-range-picker/utils';
|
|
21
|
+
import { getDefaultSize } from '../helpers/themeHelpers';
|
|
22
|
+
import { useStyle } from '../style';
|
|
18
23
|
var accessibilityStyles = {
|
|
19
24
|
position: 'fixed',
|
|
20
25
|
width: '0px',
|
|
@@ -29,16 +34,26 @@ var accessibilityStyles = {
|
|
|
29
34
|
clipPath: 'inset(100%)',
|
|
30
35
|
};
|
|
31
36
|
// eslint-disable-next-line max-statements
|
|
32
|
-
export var StatelessDatePicker = function (
|
|
33
|
-
var
|
|
34
|
-
var
|
|
37
|
+
export var StatelessDatePicker = function (_props) {
|
|
38
|
+
var _a, _b;
|
|
39
|
+
var theme = useStyle().theme;
|
|
40
|
+
var _c = useContextualFormProps(_props), onChange = _c.onChange, onBlur = _c.onBlur, _d = _c.adapter, adapter = _d === void 0 ? dateFnsAdapter : _d, _e = _c.size, size = _e === void 0 ? getDefaultSize(theme) : _e, _f = _c.formatString, formatString = _f === void 0 ? DEFAULT_FORMAT_STRING : _f, _g = _c.isOpen, isOpen = _g === void 0 ? false : _g, onFocus = _c.onFocus, clearable = _c.clearable, displayValueAtRangeIndex = _c.displayValueAtRangeIndex, _h = _c.variant, variant = _h === void 0 ? 'default' : _h, overrides = _c.overrides, intent = _c.intent, _value = _c.value, formatDisplayValue = _c.formatDisplayValue, _j = _c.autoSizeInput, autoSizeInput = _j === void 0 ? false : _j, weekStartsOn = _c.weekStartsOn, _k = _c.timezone, timezone = _k === void 0 ? getSystemTzName() : _k, _l = _c.showTimezone, showTimezone = _l === void 0 ? false : _l, props = __rest(_c, ["onChange", "onBlur", "adapter", "size", "formatString", "isOpen", "onFocus", "clearable", "displayValueAtRangeIndex", "variant", "overrides", "intent", "value", "formatDisplayValue", "autoSizeInput", "weekStartsOn", "timezone", "showTimezone"]);
|
|
35
41
|
var locale = useLocale();
|
|
36
42
|
var dateHelpers = React.useMemo(function () { return new DateHelpers(adapter); }, [adapter]);
|
|
37
43
|
var dateFnsLocale = React.useMemo(function () { return prepareLocale(props.locale, { weekStartsOn: weekStartsOn }); }, [weekStartsOn, props.locale]);
|
|
44
|
+
var value = React.useMemo(function () {
|
|
45
|
+
if (Array.isArray(_value)) {
|
|
46
|
+
return _compact(_value).map(function (date) { return new Date(convertDateFromSystemTzToTargetTz(date, timezone)); });
|
|
47
|
+
}
|
|
48
|
+
if (_value) {
|
|
49
|
+
return new Date(convertDateFromSystemTzToTargetTz(_value, timezone));
|
|
50
|
+
}
|
|
51
|
+
return undefined;
|
|
52
|
+
}, [_value, timezone]);
|
|
38
53
|
// this state is required for a11y of calendar, this will be set to true when user first press down arrow key on opened calendar
|
|
39
54
|
// and we will set this to false when calendar will be closed.
|
|
40
|
-
var
|
|
41
|
-
var
|
|
55
|
+
var _m = __read(React.useState(false), 2), autoFocusCalendar = _m[0], setAutoFocusCalendar = _m[1];
|
|
56
|
+
var _o = __read(React.useState(false), 2), error = _o[0], setError = _o[1];
|
|
42
57
|
React.useEffect(function () {
|
|
43
58
|
if (isTimeInRange(value, { minDate: props.minDate, maxDate: props.maxDate, dateHelpers: dateHelpers })) {
|
|
44
59
|
setError(false);
|
|
@@ -48,7 +63,7 @@ export var StatelessDatePicker = function (_a) {
|
|
|
48
63
|
}
|
|
49
64
|
}, [value, props.minDate, props.maxDate, dateHelpers]);
|
|
50
65
|
var screenReaderMsgId = useUniqueId();
|
|
51
|
-
var
|
|
66
|
+
var _p = props["aria-describedby"], ariaDescribedBy = _p === void 0 ? "datepicker--screenreader--message--input-".concat(screenReaderMsgId) : _p;
|
|
52
67
|
var defaultFormatDisplayValue = React.useCallback(function (date) {
|
|
53
68
|
var normalizedFormatString = normalizeDashes(formatString);
|
|
54
69
|
if (formatDisplayValue) {
|
|
@@ -57,8 +72,15 @@ export var StatelessDatePicker = function (_a) {
|
|
|
57
72
|
}
|
|
58
73
|
return formatDisplayValue(date, normalizedFormatString);
|
|
59
74
|
}
|
|
60
|
-
return formatDate({
|
|
61
|
-
|
|
75
|
+
return formatDate({
|
|
76
|
+
date: date,
|
|
77
|
+
dateHelpers: dateHelpers,
|
|
78
|
+
formatString: normalizedFormatString,
|
|
79
|
+
locale: dateFnsLocale,
|
|
80
|
+
timezone: timezone,
|
|
81
|
+
showTimezone: showTimezone,
|
|
82
|
+
});
|
|
83
|
+
}, [formatString, formatDisplayValue, dateHelpers, dateFnsLocale, timezone, showTimezone]);
|
|
62
84
|
var mergedOverrides = React.useMemo(function () {
|
|
63
85
|
return mergeOverrides({
|
|
64
86
|
Popover: {
|
|
@@ -90,11 +112,11 @@ export var StatelessDatePicker = function (_a) {
|
|
|
90
112
|
style: 'rounded-8',
|
|
91
113
|
},
|
|
92
114
|
}, overrides);
|
|
93
|
-
}, [overrides]);
|
|
115
|
+
}, [locale.datePicker.popoverAriaLabel, overrides]);
|
|
94
116
|
var displayValue = React.useMemo(function () { return defaultFormatDisplayValue(value) || ''; }, [value, defaultFormatDisplayValue]);
|
|
95
117
|
var handleDateChange = React.useCallback(function (data) {
|
|
96
|
-
onChange === null || onChange === void 0 ? void 0 : onChange({ value: data.date });
|
|
97
|
-
}, [onChange]);
|
|
118
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(showTimezone ? { value: data.date, timezone: data.timezone } : { value: data.date });
|
|
119
|
+
}, [onChange, showTimezone]);
|
|
98
120
|
var onClose = React.useCallback(function () {
|
|
99
121
|
onBlur === null || onBlur === void 0 ? void 0 : onBlur();
|
|
100
122
|
setAutoFocusCalendar(false);
|
|
@@ -121,17 +143,15 @@ export var StatelessDatePicker = function (_a) {
|
|
|
121
143
|
var handleInputChange = React.useCallback(function (e) {
|
|
122
144
|
var inputValue = e.currentTarget.value;
|
|
123
145
|
if (clearable && inputValue.length === 0) {
|
|
124
|
-
onChange === null || onChange === void 0 ? void 0 : onChange({
|
|
125
|
-
value: undefined,
|
|
126
|
-
});
|
|
146
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(showTimezone ? { value: undefined, timezone: timezone } : { value: undefined });
|
|
127
147
|
}
|
|
128
|
-
}, [clearable, onChange]);
|
|
148
|
+
}, [clearable, onChange, timezone, showTimezone]);
|
|
129
149
|
var dateAriaLabel = React.useMemo(function () { return getAriaLabel(value, defaultFormatDisplayValue, locale); }, [value, defaultFormatDisplayValue, locale]);
|
|
130
|
-
var
|
|
131
|
-
var
|
|
132
|
-
var
|
|
133
|
-
var placeholder = (
|
|
134
|
-
return (_jsxs(_Fragment, { children: [_jsx(PopoverComponent, __assign({ focusLock: true, returnFocus: true, mountNode: props.mountNode, placement: PLACEMENT.auto, isOpen: isOpen, onClickOutside: onClose, onEsc: onClose, showArrow: false, onClick: props.disabled ? _noop : onFocus, content: _jsx(DatePickerContent, __assign({}, props, { value: value, onChange: handleDateChange, overrides: mergedOverrides, autoFocusCalendar: autoFocusCalendar, onClose: onClose, formatString: formatString, adapter: adapter, locale: dateFnsLocale }), void 0) }, popoverProps, { children: _jsx(InputWrapper, __assign({}, inputWrapperProps, { children: _jsx(InputComponent, __assign({ "aria-disabled": props.disabled, "aria-label": (
|
|
150
|
+
var _q = __read(useOverrides(mergedOverrides === null || mergedOverrides === void 0 ? void 0 : mergedOverrides.Input, DatePickerInput), 2), InputComponent = _q[0], inputProps = _q[1];
|
|
151
|
+
var _r = __read(useOverrides(mergedOverrides === null || mergedOverrides === void 0 ? void 0 : mergedOverrides.Popover, Popover), 2), PopoverComponent = _r[0], popoverProps = _r[1];
|
|
152
|
+
var _s = __read(useOverrides(mergedOverrides === null || mergedOverrides === void 0 ? void 0 : mergedOverrides.InputWrapper, StyledInputWrapper), 2), InputWrapper = _s[0], inputWrapperProps = _s[1];
|
|
153
|
+
var placeholder = (_a = props.placeholder) !== null && _a !== void 0 ? _a : 'MM/DD/YYYY';
|
|
154
|
+
return (_jsxs(_Fragment, { children: [_jsx(PopoverComponent, __assign({ accessibilityType: "none", focusLock: true, returnFocus: true, mountNode: props.mountNode, placement: PLACEMENT.auto, isOpen: isOpen, onClickOutside: onClose, onEsc: onClose, showArrow: false, triggerType: "click", onClick: props.disabled ? _noop : onFocus, content: _jsx(DatePickerContent, __assign({}, props, { value: value, onChange: handleDateChange, overrides: mergedOverrides, autoFocusCalendar: autoFocusCalendar, onClose: onClose, formatString: formatString, adapter: adapter, locale: dateFnsLocale, showTimezone: showTimezone, timezone: timezone }), void 0) }, popoverProps, { children: _jsx(InputWrapper, __assign({}, inputWrapperProps, { children: _jsx(InputComponent, __assign({ id: props.id, "aria-disabled": props.disabled, "aria-label": (_b = props['aria-label']) !== null && _b !== void 0 ? _b : locale.timeRangePicker.ariaLabel, "aria-describedby": ariaDescribedBy, "aria-labelledby": props['aria-labelledby'], "aria-required": props.required || null, disabled: props.disabled, size: size, variant: variant, intent: error ? 'error' : intent, value: displayValue,
|
|
135
155
|
// onFocus={onFocus}
|
|
136
156
|
onKeyDown: handleKeyDown, onChange: handleInputChange, placeholder: placeholder, required: props.required, clearable: clearable, isOpen: isOpen, autoSizeInput: autoSizeInput }, inputProps), void 0) }), void 0) }), void 0), _jsx(Typography, __assign({ id: ariaDescribedBy, style: accessibilityStyles }, { children: locale.timeRangePicker.screenReaderMessageInput }), void 0), _jsx(Typography, __assign({ "aria-live": "assertive", style: accessibilityStyles }, { children: dateAriaLabel }), void 0)] }, void 0));
|
|
137
157
|
};
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import DateHelpers from 'baseui/datepicker/utils/date-helpers';
|
|
3
|
+
import { DateIOAdapter } from 'baseui/datepicker/utils/types';
|
|
3
4
|
declare type TimeInputProps = {
|
|
4
5
|
time?: Date | null;
|
|
5
6
|
overrides?: any;
|
|
6
7
|
onChange: (date: Date) => void;
|
|
7
|
-
dateHelpers: DateHelpers
|
|
8
|
+
dateHelpers: DateHelpers<Date>;
|
|
8
9
|
minTime?: Date;
|
|
9
10
|
maxTime?: Date;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
adapter: DateIOAdapter<Date>;
|
|
10
13
|
};
|
|
11
|
-
export declare const TimeInput: ({ overrides, time, onChange, dateHelpers, minTime, maxTime, }: TimeInputProps) => JSX.Element;
|
|
14
|
+
export declare const TimeInput: ({ overrides, time, onChange, dateHelpers, minTime, maxTime, disabled, adapter, }: TimeInputProps) => JSX.Element;
|
|
12
15
|
export {};
|
|
@@ -4,8 +4,10 @@ import { useState, useEffect, useMemo } from 'react';
|
|
|
4
4
|
import { TimePicker as DefaultTimePicker } from '../time-picker';
|
|
5
5
|
import { mergeOverrides, useOverrides } from '../overrides';
|
|
6
6
|
import { isTimeInRange } from './utils';
|
|
7
|
+
var MS_IN_5_MINUTES = 60 * 1000 * 5;
|
|
8
|
+
var roundUpTime = function (minTime) { return new Date(Math.ceil(minTime.getTime() / MS_IN_5_MINUTES) * MS_IN_5_MINUTES); };
|
|
7
9
|
export var TimeInput = function (_a) {
|
|
8
|
-
var overrides = _a.overrides, time = _a.time, onChange = _a.onChange, dateHelpers = _a.dateHelpers, minTime = _a.minTime, maxTime = _a.maxTime;
|
|
10
|
+
var overrides = _a.overrides, time = _a.time, onChange = _a.onChange, dateHelpers = _a.dateHelpers, minTime = _a.minTime, maxTime = _a.maxTime, disabled = _a.disabled, adapter = _a.adapter;
|
|
9
11
|
var _b = __read(useState(time), 2), value = _b[0], setValue = _b[1];
|
|
10
12
|
var _c = __read(useState(false), 2), error = _c[0], setError = _c[1];
|
|
11
13
|
useEffect(function () {
|
|
@@ -65,5 +67,5 @@ export var TimeInput = function (_a) {
|
|
|
65
67
|
}, overrides);
|
|
66
68
|
}, [error, value, overrides, time, minTime, maxTime, dateHelpers]);
|
|
67
69
|
var _d = __read(useOverrides(mergedOverrides === null || mergedOverrides === void 0 ? void 0 : mergedOverrides.TimePicker, DefaultTimePicker), 2), TimePicker = _d[0], timeSelectProps = _d[1];
|
|
68
|
-
return _jsx(TimePicker, __assign({ size: "sm", value: value, onChange: handleChange, creatable: true, clearable: true }, timeSelectProps), void 0);
|
|
70
|
+
return (_jsx(TimePicker, __assign({ adapter: adapter, size: "sm", value: value, onChange: handleChange, creatable: true, clearable: true, disabled: disabled, minTime: minTime && dateHelpers.isSameDay(value, minTime) ? roundUpTime(minTime) : undefined, maxTime: dateHelpers.isSameDay(value, maxTime) ? maxTime : undefined }, timeSelectProps), void 0));
|
|
69
71
|
};
|
|
@@ -7,4 +7,5 @@ export { DatePickerInput };
|
|
|
7
7
|
export { StatelessDatePicker } from './StatelessDatePicker';
|
|
8
8
|
export { useDatePickerState } from './useDatePickerState';
|
|
9
9
|
export { formatDate } from './utils';
|
|
10
|
+
export { DateTimeContainer as DateTimeRangeInputs } from './DateTimeContainer';
|
|
10
11
|
export * from './types';
|
package/esm/date-picker/index.js
CHANGED
|
@@ -7,4 +7,5 @@ export { DatePickerInput };
|
|
|
7
7
|
export { StatelessDatePicker } from './StatelessDatePicker';
|
|
8
8
|
export { useDatePickerState } from './useDatePickerState';
|
|
9
9
|
export { formatDate } from './utils';
|
|
10
|
+
export { DateTimeContainer as DateTimeRangeInputs } from './DateTimeContainer';
|
|
10
11
|
export * from './types';
|
|
@@ -3,7 +3,7 @@ import { StatefulContainerProps } from './types';
|
|
|
3
3
|
declare const StatefulContainer: {
|
|
4
4
|
({ adapter, onChange, value, startOpen, ...props }: StatefulContainerProps): ReactElement;
|
|
5
5
|
defaultProps: {
|
|
6
|
-
adapter:
|
|
6
|
+
adapter: import("baseui/datepicker/utils/types").DateIOAdapter<Date>;
|
|
7
7
|
};
|
|
8
8
|
};
|
|
9
9
|
export default StatefulContainer;
|
|
@@ -2,23 +2,26 @@ import { __assign, __read, __rest } from "tslib";
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import dateFnsAdapter from 'baseui/datepicker/utils/date-fns-adapter';
|
|
4
4
|
import { useDatePickerState } from './useDatePickerState';
|
|
5
|
+
import { getSystemTzName } from '../time-range-picker/utils';
|
|
5
6
|
var StatefulContainer = function (_a) {
|
|
6
|
-
var _b;
|
|
7
|
-
var adapter = _a.adapter, onChange = _a.onChange, value = _a.value,
|
|
8
|
-
var
|
|
9
|
-
var
|
|
7
|
+
var _b, _c;
|
|
8
|
+
var adapter = _a.adapter, onChange = _a.onChange, value = _a.value, _d = _a.startOpen, startOpen = _d === void 0 ? false : _d, props = __rest(_a, ["adapter", "onChange", "value", "startOpen"]);
|
|
9
|
+
var _e = __read(React.useState(value), 2), date = _e[0], setDate = _e[1];
|
|
10
|
+
var _f = __read(React.useState((_b = props.timezone) !== null && _b !== void 0 ? _b : getSystemTzName()), 2), timezone = _f[0], setTimezone = _f[1];
|
|
11
|
+
var _g = useDatePickerState({ startOpen: startOpen }), isOpen = _g.isOpen, handleOpen = _g.handleOpen, handleClose = _g.handleClose, setIsOpen = _g.setIsOpen;
|
|
10
12
|
React.useEffect(function () {
|
|
11
13
|
setDate(value);
|
|
12
14
|
}, [value]);
|
|
13
15
|
var handleDateChange = React.useCallback(function (_a) {
|
|
14
|
-
var _value = _a.value;
|
|
16
|
+
var _value = _a.value, _timezone = _a.timezone;
|
|
15
17
|
var prevValue = date;
|
|
16
18
|
setDate(_value);
|
|
17
|
-
|
|
19
|
+
setTimezone(_timezone);
|
|
20
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(props.showTimezone ? { value: _value, timezone: _timezone } : { value: _value });
|
|
18
21
|
setIsOpen(false);
|
|
19
|
-
}, [setDate, setIsOpen, onChange, date]);
|
|
22
|
+
}, [setDate, setIsOpen, onChange, date, props.showTimezone]);
|
|
20
23
|
var children = props.children, restProps = __rest(props, ["children"]);
|
|
21
|
-
return (
|
|
24
|
+
return (_c = props.children) === null || _c === void 0 ? void 0 : _c.call(props, __assign(__assign({}, restProps), { value: date, adapter: adapter, onChange: handleDateChange, onFocus: handleOpen, onBlur: handleClose, isOpen: isOpen, range: false, timezone: timezone }));
|
|
22
25
|
};
|
|
23
26
|
StatefulContainer.defaultProps = {
|
|
24
27
|
adapter: dateFnsAdapter,
|
|
@@ -2,7 +2,6 @@ import { SharedStyleProps } from './types';
|
|
|
2
2
|
import { StyleFn, Styles } from '../types';
|
|
3
3
|
export declare const StyledInputWrapper: import("../style/styled").StyledComponent;
|
|
4
4
|
export declare const getDayStyles: (todaySOD: any) => Styles;
|
|
5
|
-
export declare const StyledWeekdayHeader: import("../style/styled").StyledComponent;
|
|
6
5
|
export declare const StyledFooter: import("../style/styled").StyledComponent;
|
|
7
6
|
export declare const StyledFooterBeforeEnhancer: import("../style/styled").StyledComponent;
|
|
8
7
|
export declare const getCalendarContainerStyles: StyleFn<SharedStyleProps>;
|
|
@@ -1,30 +1,8 @@
|
|
|
1
1
|
import { __assign } from "tslib";
|
|
2
|
-
import { getWeekdayInLocale } from 'baseui/datepicker/utils';
|
|
3
2
|
import getDayStateCode from 'baseui/datepicker/utils/day-state';
|
|
4
3
|
import dateFnsAdapter from 'baseui/datepicker/utils/date-fns-adapter';
|
|
5
4
|
import { styled } from '../style';
|
|
6
5
|
export var StyledInputWrapper = styled('div');
|
|
7
|
-
var getWeekdayHeaderStyle = function (utils, props) {
|
|
8
|
-
var getStyle = utils.getStyle, px2rem = utils.px2rem, theme = utils.theme;
|
|
9
|
-
var _a = props.$date, $date = _a === void 0 ? [new Date()] : _a, alt = props.alt, range = props.range;
|
|
10
|
-
// no highlight required if range is true or no date is selected
|
|
11
|
-
var isHighlighted;
|
|
12
|
-
if (range || !$date[0]) {
|
|
13
|
-
isHighlighted = false;
|
|
14
|
-
}
|
|
15
|
-
else {
|
|
16
|
-
isHighlighted = getWeekdayInLocale(Array.isArray($date) ? $date[0] : $date) === alt;
|
|
17
|
-
}
|
|
18
|
-
return getStyle('border-b-2 box-border cursor-default h-9 inline-block m-0 pb-2 pt-2 relative text-center w-9', {
|
|
19
|
-
marginBottom: '-1px',
|
|
20
|
-
borderBottomStyle: 'solid',
|
|
21
|
-
borderBottomColor: isHighlighted ? theme.spr.ui04 : 'transparent',
|
|
22
|
-
color: isHighlighted ? theme.spr.text04 : 'inherit',
|
|
23
|
-
lineHeight: px2rem(20),
|
|
24
|
-
paddingLeft: px2rem(6),
|
|
25
|
-
paddingRight: px2rem(6),
|
|
26
|
-
});
|
|
27
|
-
};
|
|
28
6
|
var getEdgeDayBeforeStyle = function (code, firstChild, peekNextMonth) {
|
|
29
7
|
var firstChildStyle = firstChild ? { content: 'none' } : {};
|
|
30
8
|
var lastChildStyle = firstChild ? {} : { content: 'none' };
|
|
@@ -73,6 +51,56 @@ var getEdgeDayBeforeStyle = function (code, firstChild, peekNextMonth) {
|
|
|
73
51
|
'101010010000010': !peekNextMonth && firstChild ? { content: 'none' } : pseudoSelectedStyle,
|
|
74
52
|
}[code] || {});
|
|
75
53
|
};
|
|
54
|
+
function generateDayStyles(defaultCode, defaultStyle) {
|
|
55
|
+
var _a;
|
|
56
|
+
var codeForSM = "".concat(defaultCode.substr(0, 12), "1").concat(defaultCode.substr(12 + 1));
|
|
57
|
+
var codeForEM = "".concat(defaultCode.substr(0, 13), "1").concat(defaultCode.substr(13 + 1));
|
|
58
|
+
return _a = {},
|
|
59
|
+
_a[defaultCode] = defaultStyle,
|
|
60
|
+
_a[codeForSM] = defaultStyle,
|
|
61
|
+
_a[codeForEM] = defaultStyle,
|
|
62
|
+
_a;
|
|
63
|
+
}
|
|
64
|
+
var getTempRTLAdaptedStyles = function (code) {
|
|
65
|
+
var dayStyles = __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, generateDayStyles('100110100000000', {
|
|
66
|
+
':before': {
|
|
67
|
+
right: '0%',
|
|
68
|
+
left: '0%',
|
|
69
|
+
},
|
|
70
|
+
})), generateDayStyles('100100001001000', {
|
|
71
|
+
':before': {
|
|
72
|
+
right: '50%',
|
|
73
|
+
left: '0%',
|
|
74
|
+
},
|
|
75
|
+
})), generateDayStyles('101000001010000', {
|
|
76
|
+
':before': {
|
|
77
|
+
right: '50%',
|
|
78
|
+
left: '0%',
|
|
79
|
+
},
|
|
80
|
+
})), generateDayStyles('101110100000000', {
|
|
81
|
+
':before': {
|
|
82
|
+
right: '50%',
|
|
83
|
+
left: '0%',
|
|
84
|
+
},
|
|
85
|
+
})), generateDayStyles('101111000000000', {
|
|
86
|
+
':before': {
|
|
87
|
+
left: '50%',
|
|
88
|
+
},
|
|
89
|
+
})), generateDayStyles('100111000000000', {
|
|
90
|
+
':before': {
|
|
91
|
+
left: '50%',
|
|
92
|
+
},
|
|
93
|
+
})), generateDayStyles('101000001001000', {
|
|
94
|
+
':before': {
|
|
95
|
+
left: '50%',
|
|
96
|
+
},
|
|
97
|
+
})), generateDayStyles('100100001010000', {
|
|
98
|
+
':before': {
|
|
99
|
+
left: '50%',
|
|
100
|
+
},
|
|
101
|
+
}));
|
|
102
|
+
return dayStyles[code] || {};
|
|
103
|
+
};
|
|
76
104
|
export var getDayStyles = function (todaySOD) { return [
|
|
77
105
|
'text-12 leading-8 w-9',
|
|
78
106
|
function (_a, props) {
|
|
@@ -95,7 +123,7 @@ export var getDayStyles = function (todaySOD) { return [
|
|
|
95
123
|
!$isHovered &&
|
|
96
124
|
!$hasRangeHighlighted && {
|
|
97
125
|
backgroundColor: 'transparent',
|
|
98
|
-
})), { backgroundColor: backgroundColor, height: '100%', top: 0 }), ':before': __assign(__assign(__assign(__assign({ borderTopWidth: '0px', borderBottomWidth: '0px', borderLeftWidth: '0px', borderRightWidth: '0px' }, ($outsideMonthWithinRange ? { content: '' } : {})), ($startOfMonth
|
|
126
|
+
})), { backgroundColor: backgroundColor, height: '100%', top: 0 }), ':before': __assign(__assign(__assign(__assign(__assign({ borderTopWidth: '0px', borderBottomWidth: '0px', borderLeftWidth: '0px', borderRightWidth: '0px' }, ($outsideMonthWithinRange ? { content: '' } : {})), ($startOfMonth
|
|
99
127
|
? {
|
|
100
128
|
borderTopLeftRadius: '100%',
|
|
101
129
|
borderBottomLeftRadius: '100%',
|
|
@@ -105,7 +133,7 @@ export var getDayStyles = function (todaySOD) { return [
|
|
|
105
133
|
borderTopRightRadius: '100%',
|
|
106
134
|
borderBottomRightRadius: '100%',
|
|
107
135
|
}
|
|
108
|
-
: {})), ($outsideMonth ? { backgroundColor: 'transparent' } : {})), ':first-child': __assign({}, ($range
|
|
136
|
+
: {})), ($outsideMonth ? { backgroundColor: 'transparent' } : {})), (getTempRTLAdaptedStyles(code)[':before'] || {})), ':first-child': __assign({}, ($range
|
|
109
137
|
? {
|
|
110
138
|
':before': __assign({}, getEdgeDayBeforeStyle(code, true, props.$peekNextMonth)),
|
|
111
139
|
}
|
|
@@ -116,10 +144,9 @@ export var getDayStyles = function (todaySOD) { return [
|
|
|
116
144
|
: {})) }, (dateFnsAdapter.isEqual($date, todaySOD) &&
|
|
117
145
|
!$selected && {
|
|
118
146
|
color: theme.spr.text04,
|
|
119
|
-
})), ($outsideMonth && { color: theme.spr.text03 }));
|
|
147
|
+
})), ($outsideMonth && { color: $selected ? theme.spr.text05 : theme.spr.text03 }));
|
|
120
148
|
},
|
|
121
149
|
]; };
|
|
122
|
-
export var StyledWeekdayHeader = styled('div', getWeekdayHeaderStyle);
|
|
123
150
|
export var StyledFooter = styled('div', 'flex px-4 py-3');
|
|
124
151
|
export var StyledFooterBeforeEnhancer = styled('div', 'flex-none');
|
|
125
152
|
export var getCalendarContainerStyles = function (_a) {
|