@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
package/types.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { AllHTMLAttributes, ElementType } from 'react';
|
|
2
|
-
import { Theme as BaseTheme } from 'baseui/
|
|
3
|
-
import {
|
|
2
|
+
import { Theme as BaseTheme } from 'baseui/theme';
|
|
3
|
+
import { StyleObject as StyletronStyleObject } from 'styletron-react';
|
|
4
|
+
import { StandardEngine as StyletronStandardEngine } from 'styletron-standard';
|
|
4
5
|
import { Direction, Theme, ThemeClassNames } from '@sprinklrjs/spaceweb-themes/types';
|
|
5
6
|
export declare type StyleObject = StyletronStyleObject;
|
|
6
7
|
export declare type StandardEngine = StyletronStandardEngine;
|
|
@@ -59,7 +60,7 @@ export declare type Variant = 'primary' | 'secondary' | 'tertiary' | 'minimal';
|
|
|
59
60
|
/**
|
|
60
61
|
* Size Options
|
|
61
62
|
*/
|
|
62
|
-
export declare type Size = 'xxxs' | 'xxs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
63
|
+
export declare type Size = 'xxxxs' | 'xxxs' | 'xxs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
63
64
|
/**
|
|
64
65
|
* Intent Options
|
|
65
66
|
*/
|
|
@@ -76,6 +77,7 @@ export declare type Px2Rem = (px: number | string) => string;
|
|
|
76
77
|
* `useStyle` return type
|
|
77
78
|
*/
|
|
78
79
|
export declare type StyleUtils = ThemeContext & {
|
|
80
|
+
isRTL?: boolean;
|
|
79
81
|
css: CSSFunc;
|
|
80
82
|
getStyle: GetStyle;
|
|
81
83
|
px2rem: Px2Rem;
|
package/typography/Typography.js
CHANGED
|
@@ -19,9 +19,22 @@ var defaultVariantToHTMLTagMapping = {
|
|
|
19
19
|
bl1: 'p',
|
|
20
20
|
bl2: 'p',
|
|
21
21
|
bl3: 'p',
|
|
22
|
+
'body-8': 'span',
|
|
23
|
+
'body-10': 'span',
|
|
24
|
+
'body-12': 'span',
|
|
25
|
+
'body-13': 'span',
|
|
26
|
+
'body-14': 'span',
|
|
27
|
+
'body-16': 'span',
|
|
28
|
+
'display-18': 'h6',
|
|
29
|
+
'display-20': 'h5',
|
|
30
|
+
'display-24': 'h4',
|
|
31
|
+
'display-28': 'h3',
|
|
32
|
+
'display-32': 'h2',
|
|
33
|
+
'display-40': 'h1',
|
|
34
|
+
'display-42': 'h1',
|
|
22
35
|
};
|
|
23
36
|
var Typography = (0, react_1.forwardRef)(function (_a, ref) {
|
|
24
|
-
var $as = _a.$as, _b = _a.variant, variant = _b === void 0 ? '
|
|
37
|
+
var $as = _a.$as, _b = _a.variant, variant = _b === void 0 ? 'body-14' : _b, weight = _a.weight, restProps = (0, tslib_1.__rest)(_a, ["$as", "variant", "weight"]);
|
|
25
38
|
var sharedProps = (0, helpers_1.add$props)({ variant: variant, weight: weight });
|
|
26
39
|
return ((0, jsx_runtime_1.jsx)(styled_components_1.StyledTypography, (0, tslib_1.__assign)({ ref: ref, "data-spaceweb": "typography-".concat(variant), "$as": $as || defaultVariantToHTMLTagMapping[variant] }, restProps, sharedProps), void 0));
|
|
27
40
|
});
|
|
@@ -4,3 +4,59 @@ export declare const WEIGHT: Readonly<{
|
|
|
4
4
|
semibold: number;
|
|
5
5
|
bold: number;
|
|
6
6
|
}>;
|
|
7
|
+
export declare const DEFAULT_BODY_WEIGHT = 400;
|
|
8
|
+
export declare const DEFAULT_DISPLAY_WEIGHT = 600;
|
|
9
|
+
export declare const TYPOGRAPHY_VARIANT_MAP: {
|
|
10
|
+
'body-8': {
|
|
11
|
+
fontSize: string;
|
|
12
|
+
lineHeight: string;
|
|
13
|
+
};
|
|
14
|
+
'body-10': {
|
|
15
|
+
fontSize: string;
|
|
16
|
+
lineHeight: string;
|
|
17
|
+
};
|
|
18
|
+
'body-12': {
|
|
19
|
+
fontSize: string;
|
|
20
|
+
lineHeight: string;
|
|
21
|
+
};
|
|
22
|
+
'body-13': {
|
|
23
|
+
fontSize: string;
|
|
24
|
+
lineHeight: string;
|
|
25
|
+
};
|
|
26
|
+
'body-14': {
|
|
27
|
+
fontSize: string;
|
|
28
|
+
lineHeight: string;
|
|
29
|
+
};
|
|
30
|
+
'body-16': {
|
|
31
|
+
fontSize: string;
|
|
32
|
+
lineHeight: string;
|
|
33
|
+
};
|
|
34
|
+
'display-18': {
|
|
35
|
+
fontSize: string;
|
|
36
|
+
lineHeight: string;
|
|
37
|
+
};
|
|
38
|
+
'display-20': {
|
|
39
|
+
fontSize: string;
|
|
40
|
+
lineHeight: string;
|
|
41
|
+
};
|
|
42
|
+
'display-24': {
|
|
43
|
+
fontSize: string;
|
|
44
|
+
lineHeight: string;
|
|
45
|
+
};
|
|
46
|
+
'display-28': {
|
|
47
|
+
fontSize: string;
|
|
48
|
+
lineHeight: string;
|
|
49
|
+
};
|
|
50
|
+
'display-32': {
|
|
51
|
+
fontSize: string;
|
|
52
|
+
lineHeight: string;
|
|
53
|
+
};
|
|
54
|
+
'display-40': {
|
|
55
|
+
fontSize: string;
|
|
56
|
+
lineHeight: string;
|
|
57
|
+
};
|
|
58
|
+
'display-42': {
|
|
59
|
+
fontSize: string;
|
|
60
|
+
lineHeight: string;
|
|
61
|
+
};
|
|
62
|
+
};
|
package/typography/constants.js
CHANGED
|
@@ -1,9 +1,65 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.WEIGHT = void 0;
|
|
3
|
+
exports.TYPOGRAPHY_VARIANT_MAP = exports.DEFAULT_DISPLAY_WEIGHT = exports.DEFAULT_BODY_WEIGHT = exports.WEIGHT = void 0;
|
|
4
4
|
exports.WEIGHT = Object.freeze({
|
|
5
5
|
regular: 400,
|
|
6
6
|
medium: 500,
|
|
7
7
|
semibold: 600,
|
|
8
8
|
bold: 700,
|
|
9
9
|
});
|
|
10
|
+
exports.DEFAULT_BODY_WEIGHT = 400;
|
|
11
|
+
exports.DEFAULT_DISPLAY_WEIGHT = 600;
|
|
12
|
+
exports.TYPOGRAPHY_VARIANT_MAP = {
|
|
13
|
+
'body-8': {
|
|
14
|
+
fontSize: '8px',
|
|
15
|
+
lineHeight: '10px',
|
|
16
|
+
},
|
|
17
|
+
'body-10': {
|
|
18
|
+
fontSize: '10px',
|
|
19
|
+
lineHeight: '12px',
|
|
20
|
+
},
|
|
21
|
+
'body-12': {
|
|
22
|
+
fontSize: '12px',
|
|
23
|
+
lineHeight: '15px',
|
|
24
|
+
},
|
|
25
|
+
'body-13': {
|
|
26
|
+
fontSize: '13px',
|
|
27
|
+
lineHeight: '16px',
|
|
28
|
+
},
|
|
29
|
+
'body-14': {
|
|
30
|
+
fontSize: '14px',
|
|
31
|
+
lineHeight: '18px',
|
|
32
|
+
},
|
|
33
|
+
'body-16': {
|
|
34
|
+
fontSize: '16px',
|
|
35
|
+
lineHeight: '20px',
|
|
36
|
+
},
|
|
37
|
+
'display-18': {
|
|
38
|
+
fontSize: '18px',
|
|
39
|
+
lineHeight: '24px',
|
|
40
|
+
},
|
|
41
|
+
'display-20': {
|
|
42
|
+
fontSize: '20px',
|
|
43
|
+
lineHeight: '26px',
|
|
44
|
+
},
|
|
45
|
+
'display-24': {
|
|
46
|
+
fontSize: '24px',
|
|
47
|
+
lineHeight: '34px',
|
|
48
|
+
},
|
|
49
|
+
'display-28': {
|
|
50
|
+
fontSize: '28px',
|
|
51
|
+
lineHeight: '34px',
|
|
52
|
+
},
|
|
53
|
+
'display-32': {
|
|
54
|
+
fontSize: '32px',
|
|
55
|
+
lineHeight: '38px',
|
|
56
|
+
},
|
|
57
|
+
'display-40': {
|
|
58
|
+
fontSize: '40px',
|
|
59
|
+
lineHeight: '46px',
|
|
60
|
+
},
|
|
61
|
+
'display-42': {
|
|
62
|
+
fontSize: '42px',
|
|
63
|
+
lineHeight: '48px',
|
|
64
|
+
},
|
|
65
|
+
};
|
package/typography/index.d.ts
CHANGED
package/typography/index.js
CHANGED
|
@@ -3,6 +3,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.Typography = void 0;
|
|
6
|
+
exports.TYPOGRAPHY_VARIANT_MAP = exports.Typography = void 0;
|
|
7
7
|
var Typography_1 = require("./Typography");
|
|
8
8
|
Object.defineProperty(exports, "Typography", { enumerable: true, get: function () { return __importDefault(Typography_1).default; } });
|
|
9
|
+
var constants_1 = require("./constants");
|
|
10
|
+
Object.defineProperty(exports, "TYPOGRAPHY_VARIANT_MAP", { enumerable: true, get: function () { return constants_1.TYPOGRAPHY_VARIANT_MAP; } });
|
|
@@ -3,11 +3,19 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.StyledTypography = void 0;
|
|
4
4
|
var style_1 = require("../style");
|
|
5
5
|
var constants_1 = require("./constants");
|
|
6
|
+
var getTypographyWeight = function ($variant) {
|
|
7
|
+
return $variant.includes('body')
|
|
8
|
+
? constants_1.DEFAULT_BODY_WEIGHT
|
|
9
|
+
: $variant.includes('display')
|
|
10
|
+
? constants_1.DEFAULT_DISPLAY_WEIGHT
|
|
11
|
+
: constants_1.WEIGHT.regular;
|
|
12
|
+
};
|
|
6
13
|
exports.StyledTypography = (0, style_1.styled)('span', function (_a, _b) {
|
|
7
|
-
var
|
|
14
|
+
var _c, _d;
|
|
15
|
+
var theme = _a.theme, classes = _a.classes;
|
|
8
16
|
var $variant = _b.$variant, $weight = _b.$weight;
|
|
9
|
-
var variantStyles = theme.typography[$variant]
|
|
17
|
+
var variantStyles = (_d = (_c = constants_1.TYPOGRAPHY_VARIANT_MAP[$variant]) !== null && _c !== void 0 ? _c : theme.typography[$variant]) !== null && _d !== void 0 ? _d : theme.typography['l1'];
|
|
10
18
|
var fontSize = variantStyles.fontSize, lineHeight = variantStyles.lineHeight, variantFontWeight = variantStyles.fontWeight;
|
|
11
|
-
var fontWeight = $weight ? "".concat(constants_1.WEIGHT[$weight]) : variantFontWeight;
|
|
19
|
+
var fontWeight = $weight ? "".concat(constants_1.WEIGHT[$weight]) : variantFontWeight !== null && variantFontWeight !== void 0 ? variantFontWeight : getTypographyWeight($variant);
|
|
12
20
|
return { fontSize: fontSize, lineHeight: lineHeight, fontWeight: fontWeight };
|
|
13
21
|
});
|
package/typography/types.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PropsWithChildren } from 'react';
|
|
2
2
|
import { SpacewebComponentProps } from '../types';
|
|
3
|
-
export declare type TypographyVariant = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'h7' | 'bl1' | 'bl2' | 'bl3' | 'bs1' | 'bs2' | 'bs3' | 'l1' | 'l2' | 'l3' | 'l4';
|
|
3
|
+
export declare type TypographyVariant = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'h7' | 'bl1' | 'bl2' | 'bl3' | 'bs1' | 'bs2' | 'bs3' | 'l1' | 'l2' | 'l3' | 'l4' | 'body-8' | 'body-10' | 'body-12' | 'body-13' | 'body-14' | 'body-16' | 'display-18' | 'display-20' | 'display-24' | 'display-28' | 'display-32' | 'display-40' | 'display-42';
|
|
4
4
|
export declare type FontWeight = 'regular' | 'medium' | 'semibold' | 'bold';
|
|
5
5
|
export declare type TypographyProps = PropsWithChildren<SpacewebComponentProps> & {
|
|
6
6
|
/** variant of typography element */
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getFormattedNumber = void 0;
|
|
4
|
+
var tslib_1 = require("tslib");
|
|
5
|
+
var types_1 = require("./types");
|
|
6
|
+
var getFormattedNumber = function (_a) {
|
|
7
|
+
var value = _a.value, locale = _a.locale, variant = _a.variant, numberOptions = _a.numberOptions;
|
|
8
|
+
var absValue = Math.abs(value);
|
|
9
|
+
var betweenZeroAndOne = absValue > 0 && absValue < 1;
|
|
10
|
+
var maximumFractionDigits, notation;
|
|
11
|
+
switch (variant.type) {
|
|
12
|
+
case types_1.NUMBER_VARIANTS.EXPANDED_AUTO_FORMAT: {
|
|
13
|
+
var decimalDigits = betweenZeroAndOne ? 4 : 2;
|
|
14
|
+
maximumFractionDigits = decimalDigits;
|
|
15
|
+
notation = 'standard';
|
|
16
|
+
break;
|
|
17
|
+
}
|
|
18
|
+
case types_1.NUMBER_VARIANTS.EXPANDED_DECIMAL_FORMAT: {
|
|
19
|
+
maximumFractionDigits = variant.decimalDigits;
|
|
20
|
+
notation = 'standard';
|
|
21
|
+
break;
|
|
22
|
+
}
|
|
23
|
+
case types_1.NUMBER_VARIANTS.COMPACT_AUTO_FORMAT: {
|
|
24
|
+
var decimalDigits = betweenZeroAndOne ? 4 : 2;
|
|
25
|
+
maximumFractionDigits = decimalDigits;
|
|
26
|
+
notation = 'compact';
|
|
27
|
+
break;
|
|
28
|
+
}
|
|
29
|
+
case types_1.NUMBER_VARIANTS.COMPACT_DECIMAL_FORMAT: {
|
|
30
|
+
maximumFractionDigits = variant.decimalDigits;
|
|
31
|
+
notation = 'compact';
|
|
32
|
+
break;
|
|
33
|
+
}
|
|
34
|
+
default: {
|
|
35
|
+
break;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return Intl.NumberFormat(locale, (0, tslib_1.__assign)({ minimumFractionDigits: 0, maximumFractionDigits: maximumFractionDigits, notation: notation }, numberOptions)).format(value);
|
|
39
|
+
};
|
|
40
|
+
exports.getFormattedNumber = getFormattedNumber;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export declare const NUMBER_VARIANTS: {
|
|
2
|
+
readonly EXPANDED_AUTO_FORMAT: "expandedAutoFormat";
|
|
3
|
+
readonly COMPACT_AUTO_FORMAT: "compactAutoFormat";
|
|
4
|
+
readonly EXPANDED_DECIMAL_FORMAT: "expandedDecimalFormat";
|
|
5
|
+
readonly COMPACT_DECIMAL_FORMAT: "compactDecimalFormat";
|
|
6
|
+
};
|
|
7
|
+
export declare type ExpandedAutoFormat = {
|
|
8
|
+
type: typeof NUMBER_VARIANTS.EXPANDED_AUTO_FORMAT;
|
|
9
|
+
};
|
|
10
|
+
export declare type CompactAutoFormat = {
|
|
11
|
+
type: typeof NUMBER_VARIANTS.COMPACT_AUTO_FORMAT;
|
|
12
|
+
};
|
|
13
|
+
export declare type ExpandedDecimalFormat = {
|
|
14
|
+
type: typeof NUMBER_VARIANTS.EXPANDED_DECIMAL_FORMAT;
|
|
15
|
+
decimalDigits: number;
|
|
16
|
+
};
|
|
17
|
+
export declare type CompactDecimalFormat = {
|
|
18
|
+
type: typeof NUMBER_VARIANTS.COMPACT_DECIMAL_FORMAT;
|
|
19
|
+
decimalDigits: number;
|
|
20
|
+
};
|
|
21
|
+
export declare type NumberVariant = ExpandedAutoFormat | CompactAutoFormat | ExpandedDecimalFormat | CompactDecimalFormat;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NUMBER_VARIANTS = void 0;
|
|
4
|
+
exports.NUMBER_VARIANTS = {
|
|
5
|
+
EXPANDED_AUTO_FORMAT: 'expandedAutoFormat',
|
|
6
|
+
COMPACT_AUTO_FORMAT: 'compactAutoFormat',
|
|
7
|
+
EXPANDED_DECIMAL_FORMAT: 'expandedDecimalFormat',
|
|
8
|
+
COMPACT_DECIMAL_FORMAT: 'compactDecimalFormat',
|
|
9
|
+
};
|
package/video/Video.js
CHANGED
|
@@ -25,16 +25,18 @@ var Video = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
25
25
|
}, overrides || {});
|
|
26
26
|
var _c = (0, tslib_1.__read)((0, overrides_1.useOverrides)(mergedOverrides.Root, StyledRoot), 2), Root = _c[0], rootProps = _c[1];
|
|
27
27
|
var _d = (0, tslib_1.__read)((0, overrides_1.useOverrides)(mergedOverrides.Video, StyledVideo), 2), Vid = _d[0], videoProps = _d[1];
|
|
28
|
+
var _e = (0, tslib_1.__read)((0, overrides_1.useOverrides)(mergedOverrides.PlayButton, play_video_1.default), 2), PlayButton = _e[0], playButtonProps = _e[1];
|
|
29
|
+
var _f = (0, tslib_1.__read)((0, overrides_1.useOverrides)(mergedOverrides.PosterImage, image_1.Image), 2), PosterImage = _f[0], posterImageProps = _f[1];
|
|
28
30
|
var onPlay = videoProps.onPlay;
|
|
29
31
|
var onClickPlay = (0, react_1.useCallback)(function (event) {
|
|
30
32
|
startPlay(true);
|
|
31
33
|
if ((0, isFunction_1.default)(onPlay))
|
|
32
34
|
onPlay(event);
|
|
33
35
|
}, [onPlay]);
|
|
34
|
-
return played || !videoProps.poster ? ((0, jsx_runtime_1.jsx)(Root, (0, tslib_1.__assign)({ "data-spaceweb": "video" }, rootProps, { children: (0, jsx_runtime_1.jsx)(Vid, (0, tslib_1.__assign)({ ref: ref, "data-testid": "video" }, videoProps, { autoPlay: played }, { children: children }), void 0) }), void 0)) : ((0, jsx_runtime_1.jsxs)(Root, (0, tslib_1.__assign)({ "data-spaceweb": "video" }, rootProps, { className: "flex items-center relative justify-center ".concat((0, classNames_1.default)({ 'cursor-pointer': !videoProps.disabled })) }, { children: [(0, jsx_runtime_1.jsx)(
|
|
36
|
+
return played || !videoProps.poster ? ((0, jsx_runtime_1.jsx)(Root, (0, tslib_1.__assign)({ "data-spaceweb": "video" }, rootProps, { children: (0, jsx_runtime_1.jsx)(Vid, (0, tslib_1.__assign)({ ref: ref, "data-testid": "video" }, videoProps, { autoPlay: played }, { children: children }), void 0) }), void 0)) : ((0, jsx_runtime_1.jsxs)(Root, (0, tslib_1.__assign)({ "data-spaceweb": "video" }, rootProps, { className: "flex items-center relative justify-center ".concat((0, classNames_1.default)({ 'cursor-pointer': !videoProps.disabled })) }, { children: [(0, jsx_runtime_1.jsx)(PosterImage, (0, tslib_1.__assign)({}, videoProps, { src: videoProps.poster, alt: "Thumbnail", overrides: {
|
|
35
37
|
Image: { style: videoProps.$style },
|
|
36
38
|
Root: { style: rootProps.$style },
|
|
37
|
-
}, onClick: videoProps.disabled ? noop_1.default : onClickPlay }), void 0), (0, jsx_runtime_1.jsx)("div", (0, tslib_1.__assign)({ className: css('absolute') }, { children: videoProps.disabled ? ((0, jsx_runtime_1.jsx)(video_non_playable_1.default, { className: "w-8 h-8 cursor-not-allowed spr-icon-05" }, void 0)) : ((0, jsx_runtime_1.jsx)(
|
|
39
|
+
}, onClick: videoProps.disabled ? noop_1.default : onClickPlay }, posterImageProps), void 0), (0, jsx_runtime_1.jsx)("div", (0, tslib_1.__assign)({ className: css('absolute') }, { children: videoProps.disabled ? ((0, jsx_runtime_1.jsx)(video_non_playable_1.default, { className: "w-8 h-8 cursor-not-allowed spr-icon-05" }, void 0)) : ((0, jsx_runtime_1.jsx)(PlayButton, (0, tslib_1.__assign)({ className: "w-8 h-8 spr-icon-05", onClick: onClickPlay }, playButtonProps), void 0)) }), void 0)] }), void 0));
|
|
38
40
|
});
|
|
39
41
|
Video.displayName = 'Video';
|
|
40
42
|
exports.default = Video;
|
package/video/types.d.ts
CHANGED
|
@@ -5,6 +5,8 @@ import { SpacewebComponentProps } from '../types';
|
|
|
5
5
|
export declare type VideoOverrides = {
|
|
6
6
|
Root?: Override<{}>;
|
|
7
7
|
Video?: Override<{}>;
|
|
8
|
+
PlayButton?: Override<{}>;
|
|
9
|
+
PosterImage?: Override<{}>;
|
|
8
10
|
};
|
|
9
11
|
export declare type VideoProps = SpacewebComponentProps<React.VideoHTMLAttributes<HTMLVideoElement>> & {
|
|
10
12
|
children?: ReactChildren;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { __assign } from "tslib";
|
|
2
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import Icon from '../icon';
|
|
4
|
-
export default function ChevronRightSolid(props) {
|
|
5
|
-
return (_jsx(Icon, __assign({ viewBox: "0 0 10 10", "data-icon-name": "ChevronRightSolid" }, props, { children: _jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M2.369 1.97v6.06a.5.5 0 00.79.408l4.262-3.03a.5.5 0 000-.815L3.159 1.562a.5.5 0 00-.79.407z" }, void 0) }), void 0));
|
|
6
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { FixedSizeListItemProps } from './types';
|
|
3
|
-
declare const VirtualizedCountrySelectDropdown: React.ForwardRefExoticComponent<Omit<import("../list").ListProps, "overrides"> & {
|
|
4
|
-
disableNavigationOnMount?: boolean | undefined;
|
|
5
|
-
focusWhenNavigationEnabled?: boolean | undefined;
|
|
6
|
-
overrides?: {
|
|
7
|
-
List?: import("../overrides").Override<Omit<React.AllHTMLAttributes<HTMLElement>, "style" | "className"> & {
|
|
8
|
-
$as?: React.ElementType<any> | undefined;
|
|
9
|
-
className?: import("..").Styles;
|
|
10
|
-
style?: import("..").Styles;
|
|
11
|
-
} & {
|
|
12
|
-
children?: React.ReactNode;
|
|
13
|
-
overrides?: {
|
|
14
|
-
Root?: import("../overrides").Override<Record<string, any>> | undefined;
|
|
15
|
-
} | undefined;
|
|
16
|
-
} & Record<string, any>> | undefined;
|
|
17
|
-
} | undefined;
|
|
18
|
-
onHighlightedItemChange?: ((item?: HTMLElement | null | undefined) => void) | undefined;
|
|
19
|
-
disableAutoHighlight?: boolean | undefined;
|
|
20
|
-
resetMenuHighlightOnMouseLeave?: boolean | undefined;
|
|
21
|
-
resetMenuOnMouseLeave?: boolean | undefined;
|
|
22
|
-
reducer?: import("../menu/types").Reducer | undefined;
|
|
23
|
-
captureScroll?: boolean | undefined;
|
|
24
|
-
} & {
|
|
25
|
-
ListItem: React.ComponentType<FixedSizeListItemProps>;
|
|
26
|
-
emptyListHeight?: number | undefined;
|
|
27
|
-
listItemHeight?: number | undefined;
|
|
28
|
-
overscanCount?: number | undefined;
|
|
29
|
-
parentRef: React.MutableRefObject<HTMLDivElement>;
|
|
30
|
-
} & React.RefAttributes<HTMLElement>>;
|
|
31
|
-
export default VirtualizedCountrySelectDropdown;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { __assign, __rest } from "tslib";
|
|
2
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import { useCallback } from 'react';
|
|
4
|
-
import * as React from 'react';
|
|
5
|
-
import { useVirtual } from 'react-virtual';
|
|
6
|
-
import { Box } from '../box';
|
|
7
|
-
import { NoResults } from '../select';
|
|
8
|
-
import { Menu } from '../menu';
|
|
9
|
-
import { EMPTY_LIST_HEIGHT, LIST_ITEM_HEIGHT, OVERSCAN_COUNT } from './constants';
|
|
10
|
-
var FixedSizeListItem = React.forwardRef(function (_a, ref) {
|
|
11
|
-
var item = _a.item, top = _a.top;
|
|
12
|
-
return React.cloneElement(item, {
|
|
13
|
-
className: 'flex items-center w-full absolute top-0 left-0 box-border',
|
|
14
|
-
style: { transform: "translateY(".concat(top, "px)") },
|
|
15
|
-
ref: ref,
|
|
16
|
-
});
|
|
17
|
-
});
|
|
18
|
-
var VirtualizedCountrySelectDropdown = React.forwardRef(function (props, ref) {
|
|
19
|
-
var _a = props.ListItem, ListItem = _a === void 0 ? FixedSizeListItem : _a, _b = props.emptyListHeight, emptyListHeight = _b === void 0 ? EMPTY_LIST_HEIGHT : _b, _c = props.listItemHeight, listItemHeight = _c === void 0 ? LIST_ITEM_HEIGHT : _c, _children = props.children, _d = props.overscanCount, overscanCount = _d === void 0 ? OVERSCAN_COUNT : _d, parentRef = props.parentRef, rest = __rest(props, ["ListItem", "emptyListHeight", "listItemHeight", "children", "overscanCount", "parentRef"]);
|
|
20
|
-
var children = React.Children.toArray(_children);
|
|
21
|
-
var firstChild = children[0];
|
|
22
|
-
var estimateSize = useCallback(function () { return listItemHeight; }, [listItemHeight]);
|
|
23
|
-
var rowVirtualizer = useVirtual({
|
|
24
|
-
size: children.length,
|
|
25
|
-
parentRef: parentRef,
|
|
26
|
-
estimateSize: estimateSize,
|
|
27
|
-
overscan: overscanCount,
|
|
28
|
-
});
|
|
29
|
-
if (!React.isValidElement(firstChild))
|
|
30
|
-
return (_jsx(Menu, __assign({ style: { height: "".concat(emptyListHeight, "px") } }, { children: _jsx(NoResults, {}, void 0) }), void 0));
|
|
31
|
-
return (_jsx(Menu, __assign({ ref: ref, "$as": "div" }, rest, { children: _jsx(Box, __assign({ "$as": "ul", className: ['relative m-0', { height: "".concat(rowVirtualizer.totalSize, "px") }] }, { children: rowVirtualizer.virtualItems.map(function (virtualRow) { return (_jsx(ListItem, { ref: virtualRow.measureRef, top: virtualRow.start, item: children[virtualRow.index] }, virtualRow.index)); }) }), void 0) }), void 0));
|
|
32
|
-
});
|
|
33
|
-
export default VirtualizedCountrySelectDropdown;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { OnChangeParams, OverlaySelectProps } from '../types';
|
|
2
|
-
declare const useOverlaySelectOverrides: (props: OverlaySelectProps) => {
|
|
3
|
-
overrides: import("../../overrides").OverridesObject<any>;
|
|
4
|
-
filterOptionsOverride: (options: import("baseui/select").Value, filterValue: string, excludeOptions?: import("baseui/select").Value | undefined, newProps?: {
|
|
5
|
-
valueKey: string;
|
|
6
|
-
labelKey: string;
|
|
7
|
-
} | undefined) => import("baseui/select").Value;
|
|
8
|
-
handleValuesChange: (params: OnChangeParams) => void;
|
|
9
|
-
popoverOpen: boolean;
|
|
10
|
-
closePopover: () => void;
|
|
11
|
-
openPopover: () => void;
|
|
12
|
-
togglePopoverState: () => void;
|
|
13
|
-
};
|
|
14
|
-
export default useOverlaySelectOverrides;
|
|
@@ -1,9 +0,0 @@
|
|
|
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 icon_1 = (0, tslib_1.__importDefault)(require("../icon"));
|
|
6
|
-
function ChevronRightSolid(props) {
|
|
7
|
-
return ((0, jsx_runtime_1.jsx)(icon_1.default, (0, tslib_1.__assign)({ viewBox: "0 0 10 10", "data-icon-name": "ChevronRightSolid" }, props, { children: (0, jsx_runtime_1.jsx)("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M2.369 1.97v6.06a.5.5 0 00.79.408l4.262-3.03a.5.5 0 000-.815L3.159 1.562a.5.5 0 00-.79.407z" }, void 0) }), void 0));
|
|
8
|
-
}
|
|
9
|
-
exports.default = ChevronRightSolid;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { FixedSizeListItemProps } from './types';
|
|
3
|
-
declare const VirtualizedCountrySelectDropdown: React.ForwardRefExoticComponent<Omit<import("../list").ListProps, "overrides"> & {
|
|
4
|
-
disableNavigationOnMount?: boolean | undefined;
|
|
5
|
-
focusWhenNavigationEnabled?: boolean | undefined;
|
|
6
|
-
overrides?: {
|
|
7
|
-
List?: import("../overrides").Override<Omit<React.AllHTMLAttributes<HTMLElement>, "style" | "className"> & {
|
|
8
|
-
$as?: React.ElementType<any> | undefined;
|
|
9
|
-
className?: import("..").Styles;
|
|
10
|
-
style?: import("..").Styles;
|
|
11
|
-
} & {
|
|
12
|
-
children?: React.ReactNode;
|
|
13
|
-
overrides?: {
|
|
14
|
-
Root?: import("../overrides").Override<Record<string, any>> | undefined;
|
|
15
|
-
} | undefined;
|
|
16
|
-
} & Record<string, any>> | undefined;
|
|
17
|
-
} | undefined;
|
|
18
|
-
onHighlightedItemChange?: ((item?: HTMLElement | null | undefined) => void) | undefined;
|
|
19
|
-
disableAutoHighlight?: boolean | undefined;
|
|
20
|
-
resetMenuHighlightOnMouseLeave?: boolean | undefined;
|
|
21
|
-
resetMenuOnMouseLeave?: boolean | undefined;
|
|
22
|
-
reducer?: import("../menu/types").Reducer | undefined;
|
|
23
|
-
captureScroll?: boolean | undefined;
|
|
24
|
-
} & {
|
|
25
|
-
ListItem: React.ComponentType<FixedSizeListItemProps>;
|
|
26
|
-
emptyListHeight?: number | undefined;
|
|
27
|
-
listItemHeight?: number | undefined;
|
|
28
|
-
overscanCount?: number | undefined;
|
|
29
|
-
parentRef: React.MutableRefObject<HTMLDivElement>;
|
|
30
|
-
} & React.RefAttributes<HTMLElement>>;
|
|
31
|
-
export default VirtualizedCountrySelectDropdown;
|
|
@@ -1,35 +0,0 @@
|
|
|
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 React = (0, tslib_1.__importStar)(require("react"));
|
|
7
|
-
var react_virtual_1 = require("react-virtual");
|
|
8
|
-
var box_1 = require("../box");
|
|
9
|
-
var select_1 = require("../select");
|
|
10
|
-
var menu_1 = require("../menu");
|
|
11
|
-
var constants_1 = require("./constants");
|
|
12
|
-
var FixedSizeListItem = React.forwardRef(function (_a, ref) {
|
|
13
|
-
var item = _a.item, top = _a.top;
|
|
14
|
-
return React.cloneElement(item, {
|
|
15
|
-
className: 'flex items-center w-full absolute top-0 left-0 box-border',
|
|
16
|
-
style: { transform: "translateY(".concat(top, "px)") },
|
|
17
|
-
ref: ref,
|
|
18
|
-
});
|
|
19
|
-
});
|
|
20
|
-
var VirtualizedCountrySelectDropdown = React.forwardRef(function (props, ref) {
|
|
21
|
-
var _a = props.ListItem, ListItem = _a === void 0 ? FixedSizeListItem : _a, _b = props.emptyListHeight, emptyListHeight = _b === void 0 ? constants_1.EMPTY_LIST_HEIGHT : _b, _c = props.listItemHeight, listItemHeight = _c === void 0 ? constants_1.LIST_ITEM_HEIGHT : _c, _children = props.children, _d = props.overscanCount, overscanCount = _d === void 0 ? constants_1.OVERSCAN_COUNT : _d, parentRef = props.parentRef, rest = (0, tslib_1.__rest)(props, ["ListItem", "emptyListHeight", "listItemHeight", "children", "overscanCount", "parentRef"]);
|
|
22
|
-
var children = React.Children.toArray(_children);
|
|
23
|
-
var firstChild = children[0];
|
|
24
|
-
var estimateSize = (0, react_1.useCallback)(function () { return listItemHeight; }, [listItemHeight]);
|
|
25
|
-
var rowVirtualizer = (0, react_virtual_1.useVirtual)({
|
|
26
|
-
size: children.length,
|
|
27
|
-
parentRef: parentRef,
|
|
28
|
-
estimateSize: estimateSize,
|
|
29
|
-
overscan: overscanCount,
|
|
30
|
-
});
|
|
31
|
-
if (!React.isValidElement(firstChild))
|
|
32
|
-
return ((0, jsx_runtime_1.jsx)(menu_1.Menu, (0, tslib_1.__assign)({ style: { height: "".concat(emptyListHeight, "px") } }, { children: (0, jsx_runtime_1.jsx)(select_1.NoResults, {}, void 0) }), void 0));
|
|
33
|
-
return ((0, jsx_runtime_1.jsx)(menu_1.Menu, (0, tslib_1.__assign)({ ref: ref, "$as": "div" }, rest, { children: (0, jsx_runtime_1.jsx)(box_1.Box, (0, tslib_1.__assign)({ "$as": "ul", className: ['relative m-0', { height: "".concat(rowVirtualizer.totalSize, "px") }] }, { children: rowVirtualizer.virtualItems.map(function (virtualRow) { return ((0, jsx_runtime_1.jsx)(ListItem, { ref: virtualRow.measureRef, top: virtualRow.start, item: children[virtualRow.index] }, virtualRow.index)); }) }), void 0) }), void 0));
|
|
34
|
-
});
|
|
35
|
-
exports.default = VirtualizedCountrySelectDropdown;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { OnChangeParams, OverlaySelectProps } from '../types';
|
|
2
|
-
declare const useOverlaySelectOverrides: (props: OverlaySelectProps) => {
|
|
3
|
-
overrides: import("../../overrides").OverridesObject<any>;
|
|
4
|
-
filterOptionsOverride: (options: import("baseui/select").Value, filterValue: string, excludeOptions?: import("baseui/select").Value | undefined, newProps?: {
|
|
5
|
-
valueKey: string;
|
|
6
|
-
labelKey: string;
|
|
7
|
-
} | undefined) => import("baseui/select").Value;
|
|
8
|
-
handleValuesChange: (params: OnChangeParams) => void;
|
|
9
|
-
popoverOpen: boolean;
|
|
10
|
-
closePopover: () => void;
|
|
11
|
-
openPopover: () => void;
|
|
12
|
-
togglePopoverState: () => void;
|
|
13
|
-
};
|
|
14
|
-
export default useOverlaySelectOverrides;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* @author Ivan Torres
|
|
4
|
-
*/
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
var tslib_1 = require("tslib");
|
|
7
|
-
var memoize_1 = (0, tslib_1.__importDefault)(require("lodash/memoize"));
|
|
8
|
-
var _escapeClassName = function (className) { return className.replace(/\//g, '\\/'); };
|
|
9
|
-
exports.default = (0, memoize_1.default)(_escapeClassName);
|