@sprinklrjs/spaceweb 11.0.0 → 12.14.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/allComponentsAndUtilities.d.ts +1 -0
- package/allComponentsAndUtilities.js +2 -1
- package/asyncSelect/asyncSelect.d.ts +4 -2
- package/asyncSelect/asyncSelect.js +43 -108
- package/asyncSelect/groupedAsyncSelect.d.ts +5 -0
- package/asyncSelect/groupedAsyncSelect.js +41 -0
- package/asyncSelect/helpers.d.ts +8 -2
- package/asyncSelect/helpers.js +35 -4
- package/asyncSelect/hooks/useAsyncOptionHandlers.d.ts +16 -11
- package/asyncSelect/hooks/useAsyncOptionHandlers.js +73 -26
- package/asyncSelect/hooks/useAsyncSelect.d.ts +10 -0
- package/asyncSelect/hooks/useAsyncSelect.js +182 -0
- package/asyncSelect/hooks/useResolveSelectedOptions.d.ts +10 -7
- package/asyncSelect/hooks/useResolveSelectedOptions.js +59 -47
- package/asyncSelect/index.d.ts +4 -1
- package/asyncSelect/index.js +8 -0
- package/asyncSelect/types.d.ts +61 -9
- package/avatar/avatar.js +12 -2
- package/avatar/styled-component.js +7 -22
- package/badge/styled-component.js +10 -8
- package/banner/banner.js +1 -1
- package/breadcrumb/breadcrumb-item.d.ts +7 -0
- package/breadcrumb/breadcrumb-item.js +41 -0
- package/breadcrumb/breadcrumb.d.ts +7 -0
- package/breadcrumb/breadcrumb.js +29 -0
- package/breadcrumb/index.d.ts +4 -0
- package/breadcrumb/index.js +17 -0
- package/breadcrumb/package.json +4 -0
- package/breadcrumb/styled-components.d.ts +7 -0
- package/breadcrumb/styled-components.js +19 -0
- package/breadcrumb/types.d.ts +38 -0
- package/breadcrumb/types.js +2 -0
- package/button/Button.d.ts +2 -0
- package/button/Button.js +13 -1
- package/button/IconButton/IconButton.d.ts +2 -4
- package/button/IconButton/IconButton.js +5 -2
- package/button/IconButton/types.d.ts +10 -1
- package/button/basewebAdapter.d.ts +3 -1
- package/button/styled-components.js +30 -25
- package/button/types.d.ts +3 -0
- package/button-group/ButtonGroup.d.ts +1 -0
- package/button-group/ButtonGroup.js +9 -5
- package/button-group/StatefulButtonGroup.d.ts +1 -0
- package/button-group/styled-components.d.ts +34 -0
- package/button-group/styled-components.js +57 -9
- package/button-group/types.d.ts +2 -0
- package/checkbox/basewebAdapters.js +6 -1
- package/color-picker/ColorPalette.d.ts +9 -0
- package/color-picker/ColorPalette.js +26 -0
- package/color-picker/ColorPicker.d.ts +3 -0
- package/color-picker/ColorPicker.js +35 -0
- package/color-picker/Swatch.d.ts +12 -0
- package/color-picker/Swatch.js +40 -0
- package/color-picker/colors.d.ts +1 -0
- package/color-picker/colors.js +109 -0
- package/color-picker/getContrastRatio.d.ts +1 -0
- package/color-picker/getContrastRatio.js +23 -0
- package/color-picker/index.d.ts +3 -0
- package/color-picker/index.js +7 -0
- package/color-picker/locale.d.ts +3 -0
- package/color-picker/locale.js +2 -0
- package/color-picker/package.json +4 -0
- package/color-picker/styled-component.d.ts +1 -0
- package/color-picker/styled-component.js +5 -0
- package/color-picker/types.d.ts +15 -0
- package/color-picker/types.js +2 -0
- package/currency/Currency.d.ts +3 -0
- package/currency/Currency.js +14 -0
- package/currency/constants.d.ts +3 -0
- package/currency/constants.js +8 -0
- package/currency/index.d.ts +5 -0
- package/currency/index.js +12 -0
- package/currency/package.json +4 -0
- package/currency/types.d.ts +7 -0
- package/currency/types.js +2 -0
- package/currency/useCurrency.d.ts +2 -0
- package/currency/useCurrency.js +12 -0
- package/currency/utils.d.ts +8 -0
- package/currency/utils.js +11 -0
- package/date-input/Before.d.ts +4 -2
- package/date-input/Before.js +4 -4
- package/date-input/CalendarIconButton.js +7 -1
- package/date-input/DateInput.d.ts +1 -1
- package/date-input/DateInput.js +46 -25
- package/date-input/styled-components.d.ts +2 -2
- package/date-input/styled-components.js +10 -8
- package/date-input/types.d.ts +4 -2
- package/date-picker/Calendar.js +5 -3
- package/date-picker/DateInput.js +16 -14
- package/date-picker/DatePickerContent.d.ts +9 -3
- package/date-picker/DatePickerContent.js +59 -8
- package/date-picker/DatePickerInput.js +9 -6
- package/date-picker/StatelessDatePicker.js +35 -16
- package/date-picker/locale.d.ts +2 -0
- package/date-picker/stateful-container.js +11 -8
- package/date-picker/styled-components.js +53 -3
- package/date-picker/types.d.ts +10 -1
- package/date-picker/utils.d.ts +3 -1
- package/date-picker/utils.js +8 -3
- package/date-time/DateTime.d.ts +3 -0
- package/date-time/DateTime.js +12 -0
- package/date-time/index.d.ts +3 -0
- package/date-time/index.js +9 -0
- package/date-time/package.json +4 -0
- package/date-time/types.d.ts +21 -0
- package/date-time/types.js +18 -0
- package/date-time/useDateTime.d.ts +2 -0
- package/date-time/useDateTime.js +13 -0
- package/date-time/variants.d.ts +4 -0
- package/date-time/variants.js +87 -0
- package/esm/allComponentsAndUtilities.d.ts +1 -0
- package/esm/allComponentsAndUtilities.js +2 -0
- package/esm/asyncSelect/asyncSelect.d.ts +4 -2
- package/esm/asyncSelect/asyncSelect.js +46 -111
- package/esm/asyncSelect/groupedAsyncSelect.d.ts +5 -0
- package/esm/asyncSelect/groupedAsyncSelect.js +37 -0
- package/esm/asyncSelect/helpers.d.ts +8 -2
- package/esm/asyncSelect/helpers.js +31 -3
- package/esm/asyncSelect/hooks/useAsyncOptionHandlers.d.ts +16 -11
- package/esm/asyncSelect/hooks/useAsyncOptionHandlers.js +76 -29
- package/esm/asyncSelect/hooks/useAsyncSelect.d.ts +10 -0
- package/esm/asyncSelect/hooks/useAsyncSelect.js +178 -0
- package/esm/asyncSelect/hooks/useResolveSelectedOptions.d.ts +10 -7
- package/esm/asyncSelect/hooks/useResolveSelectedOptions.js +62 -50
- package/esm/asyncSelect/index.d.ts +4 -1
- package/esm/asyncSelect/index.js +3 -0
- package/esm/asyncSelect/types.d.ts +61 -9
- package/esm/avatar/avatar.js +12 -2
- package/esm/avatar/styled-component.js +7 -22
- package/esm/badge/styled-component.js +10 -8
- package/esm/banner/banner.js +1 -1
- package/esm/breadcrumb/breadcrumb-item.d.ts +7 -0
- package/esm/breadcrumb/breadcrumb-item.js +39 -0
- package/esm/breadcrumb/breadcrumb.d.ts +7 -0
- package/esm/breadcrumb/breadcrumb.js +27 -0
- package/esm/breadcrumb/index.d.ts +4 -0
- package/esm/breadcrumb/index.js +3 -0
- package/esm/breadcrumb/styled-components.d.ts +7 -0
- package/esm/breadcrumb/styled-components.js +15 -0
- package/esm/breadcrumb/types.d.ts +38 -0
- package/esm/breadcrumb/types.js +1 -0
- package/esm/button/Button.d.ts +2 -0
- package/esm/button/Button.js +13 -1
- package/esm/button/IconButton/IconButton.d.ts +2 -4
- package/esm/button/IconButton/IconButton.js +5 -2
- package/esm/button/IconButton/types.d.ts +10 -1
- package/esm/button/basewebAdapter.d.ts +3 -1
- package/esm/button/styled-components.js +30 -25
- package/esm/button/types.d.ts +3 -0
- package/esm/button-group/ButtonGroup.d.ts +1 -0
- package/esm/button-group/ButtonGroup.js +9 -5
- package/esm/button-group/StatefulButtonGroup.d.ts +1 -0
- package/esm/button-group/styled-components.d.ts +34 -0
- package/esm/button-group/styled-components.js +55 -8
- package/esm/button-group/types.d.ts +2 -0
- package/esm/checkbox/basewebAdapters.js +6 -1
- package/esm/color-picker/ColorPalette.d.ts +9 -0
- package/esm/color-picker/ColorPalette.js +22 -0
- package/esm/color-picker/ColorPicker.d.ts +3 -0
- package/esm/color-picker/ColorPicker.js +31 -0
- package/esm/color-picker/Swatch.d.ts +12 -0
- package/esm/color-picker/Swatch.js +37 -0
- package/esm/color-picker/colors.d.ts +1 -0
- package/esm/color-picker/colors.js +106 -0
- package/esm/color-picker/getContrastRatio.d.ts +1 -0
- package/esm/color-picker/getContrastRatio.js +19 -0
- package/esm/color-picker/index.d.ts +3 -0
- package/esm/color-picker/index.js +2 -0
- package/esm/color-picker/locale.d.ts +3 -0
- package/esm/color-picker/locale.js +1 -0
- package/esm/color-picker/styled-component.d.ts +1 -0
- package/esm/color-picker/styled-component.js +2 -0
- package/esm/color-picker/types.d.ts +15 -0
- package/esm/color-picker/types.js +1 -0
- package/esm/currency/Currency.d.ts +3 -0
- package/esm/currency/Currency.js +10 -0
- package/esm/currency/constants.d.ts +3 -0
- package/esm/currency/constants.js +5 -0
- package/esm/currency/index.d.ts +5 -0
- package/esm/currency/index.js +5 -0
- package/esm/currency/types.d.ts +7 -0
- package/esm/currency/types.js +1 -0
- package/esm/currency/useCurrency.d.ts +2 -0
- package/esm/currency/useCurrency.js +8 -0
- package/esm/currency/utils.d.ts +8 -0
- package/esm/currency/utils.js +7 -0
- package/esm/date-input/Before.d.ts +4 -2
- package/esm/date-input/Before.js +4 -4
- package/esm/date-input/CalendarIconButton.js +7 -1
- package/esm/date-input/DateInput.d.ts +1 -1
- package/esm/date-input/DateInput.js +47 -26
- package/esm/date-input/styled-components.d.ts +2 -2
- package/esm/date-input/styled-components.js +10 -7
- package/esm/date-input/types.d.ts +4 -2
- package/esm/date-picker/Calendar.js +5 -3
- package/esm/date-picker/DateInput.js +17 -15
- package/esm/date-picker/DatePickerContent.d.ts +9 -3
- package/esm/date-picker/DatePickerContent.js +60 -9
- package/esm/date-picker/DatePickerInput.js +9 -6
- package/esm/date-picker/StatelessDatePicker.js +35 -16
- package/esm/date-picker/locale.d.ts +2 -0
- package/esm/date-picker/stateful-container.js +11 -8
- package/esm/date-picker/styled-components.js +53 -3
- package/esm/date-picker/types.d.ts +10 -1
- package/esm/date-picker/utils.d.ts +3 -1
- package/esm/date-picker/utils.js +9 -4
- package/esm/date-time/DateTime.d.ts +3 -0
- package/esm/date-time/DateTime.js +8 -0
- package/esm/date-time/index.d.ts +3 -0
- package/esm/date-time/index.js +3 -0
- package/esm/date-time/types.d.ts +21 -0
- package/esm/date-time/types.js +15 -0
- package/esm/date-time/useDateTime.d.ts +2 -0
- package/esm/date-time/useDateTime.js +9 -0
- package/esm/date-time/variants.d.ts +4 -0
- package/esm/date-time/variants.js +84 -0
- package/esm/form-control/form-control.d.ts +1 -1
- package/esm/form-control/form-control.js +17 -12
- package/esm/form-control/styled-component.js +17 -6
- package/esm/helpers/ClearIconButton.js +3 -1
- package/esm/helpers/StyledTombstone.d.ts +1 -0
- package/esm/helpers/StyledTombstone.js +17 -0
- package/esm/helpers/baseui/useConvertOverrides.js +6 -1
- package/esm/helpers/commonStyles.js +3 -6
- package/esm/helpers/index.d.ts +1 -0
- package/esm/helpers/index.js +8 -0
- package/esm/helpers/themeHelpers.d.ts +1 -0
- package/esm/helpers/themeHelpers.js +13 -0
- package/esm/hooks/useAutoFocus.js +6 -0
- package/esm/hooks/useMatchMedia.js +13 -2
- package/esm/icon/components/alert-solid.js +2 -0
- package/esm/icon/components/alert.js +2 -0
- package/esm/icon/components/calendar-solid.js +2 -0
- package/esm/icon/components/chevron-down.js +2 -0
- package/esm/icon/components/chevron-left.d.ts +3 -0
- package/esm/icon/components/chevron-left.js +8 -0
- package/esm/icon/components/chevron-right.d.ts +3 -0
- package/esm/icon/components/chevron-right.js +8 -0
- package/esm/icon/components/close.js +2 -0
- package/esm/icon/components/error-clr.js +2 -0
- package/esm/icon/components/error-solid.js +2 -0
- package/esm/icon/components/error.js +2 -0
- package/esm/icon/components/imagePreview.js +2 -0
- package/esm/icon/components/info.js +2 -0
- package/esm/icon/components/play-video.js +2 -0
- package/esm/icon/components/reset-color.d.ts +3 -0
- package/esm/icon/components/reset-color.js +8 -0
- package/esm/icon/components/search.js +2 -0
- package/esm/icon/components/tick.js +2 -0
- package/esm/icon/components/tickCircle-solid.js +2 -0
- package/esm/icon/components/user.js +2 -0
- package/esm/icon/components/video-non-playable.js +2 -0
- package/esm/index.d.ts +2 -0
- package/esm/index.js +2 -0
- package/esm/input/basewebAdapters.js +18 -3
- package/esm/input/styled-components.js +8 -6
- package/esm/input/types.d.ts +4 -1
- package/esm/layer/useLayersContextValue.js +3 -2
- package/esm/list/avatar-list-item.d.ts +12 -22
- package/esm/list/avatar-list-item.js +6 -4
- package/esm/list/index.d.ts +1 -1
- package/esm/list/index.js +1 -1
- package/esm/list/list-item.d.ts +3 -1
- package/esm/list/list-item.js +9 -6
- package/esm/list/styled-component.d.ts +1 -0
- package/esm/list/styled-component.js +23 -15
- package/esm/list/types.d.ts +3 -0
- package/esm/locale/en_US.js +26 -0
- package/esm/locale/types.d.ts +19 -0
- package/esm/menu/MenuContext.d.ts +2 -1
- package/esm/menu/MenuContext.js +1 -0
- package/esm/menu/menu-item.d.ts +4 -1
- package/esm/menu/menu-item.js +11 -11
- package/esm/menu/menu.d.ts +1 -0
- package/esm/menu/menu.js +11 -11
- package/esm/menu/types.d.ts +1 -0
- package/esm/menu/useKeyboardNavigation.d.ts +6 -3
- package/esm/menu/useKeyboardNavigation.js +21 -14
- package/esm/menu/useStatefulMenu.d.ts +5 -2
- package/esm/menu/useStatefulMenu.js +14 -8
- package/esm/modal/modal.js +3 -1
- package/esm/modal/overrides.d.ts +2 -2
- package/esm/modal/overrides.js +6 -7
- package/esm/modal/styled-components.js +7 -7
- package/esm/number/Number.d.ts +3 -0
- package/esm/number/Number.js +10 -0
- package/esm/number/constants.d.ts +2 -0
- package/esm/number/constants.js +4 -0
- package/esm/number/index.d.ts +5 -0
- package/esm/number/index.js +5 -0
- package/esm/number/types.d.ts +6 -0
- package/esm/number/types.js +1 -0
- package/esm/number/useNumber.d.ts +2 -0
- package/esm/number/useNumber.js +8 -0
- package/esm/overrides/index.d.ts +1 -1
- package/esm/overrides/index.js +1 -1
- package/esm/overrides/mergeOverrides.d.ts +3 -2
- package/esm/overrides/mergeOverrides.js +1 -1
- package/esm/payment-card/basewebAdapters.d.ts +2 -0
- package/esm/payment-card/basewebAdapters.js +23 -1
- package/esm/payment-card/styled-components.js +25 -6
- package/esm/phone-input/country-select-container.js +1 -1
- package/esm/phone-input/country-select.js +3 -3
- package/esm/phone-input/default-props.d.ts +5 -5
- package/esm/phone-input/default-props.js +7 -7
- package/esm/phone-input/flag-container.js +1 -1
- package/esm/phone-input/phone-input.d.ts +0 -4
- package/esm/phone-input/phone-input.js +20 -12
- package/esm/phone-input/stateful-phone-input-container.js +4 -3
- package/esm/phone-input/stateful-phone-input.d.ts +0 -4
- package/esm/phone-input/styled-components.d.ts +9 -1
- package/esm/phone-input/styled-components.js +21 -7
- package/esm/phone-input/types.d.ts +2 -1
- package/esm/phone-input/utils.d.ts +5 -1
- package/esm/phone-input/utils.js +6 -1
- package/esm/popover/adapter.d.ts +1 -0
- package/esm/popover/adapter.js +15 -0
- package/esm/popover/overrides.js +8 -19
- package/esm/popover/popover.d.ts +1 -0
- package/esm/popover/popover.js +9 -4
- package/esm/popover/stateful-popover.js +2 -2
- package/esm/popover/types.d.ts +3 -0
- package/esm/popover/utils.d.ts +12 -0
- package/esm/popover/utils.js +9 -0
- package/esm/progress/linear/styled-component.d.ts +1 -1
- package/esm/progress/linear/styled-component.js +5 -5
- package/esm/radio/styled-components.js +5 -5
- package/esm/search/index.d.ts +1 -0
- package/esm/search/index.js +1 -0
- package/esm/search/search.d.ts +1 -1
- package/esm/search/search.js +15 -6
- package/esm/search/stateful-search.d.ts +3 -0
- package/esm/search/stateful-search.js +15 -0
- package/esm/search/styled-components.d.ts +1 -10
- package/esm/search/styled-components.js +54 -24
- package/esm/search/types.d.ts +8 -2
- package/esm/select/base-select.d.ts +22 -5
- package/esm/select/base-select.js +174 -82
- package/esm/select/constants.d.ts +3 -0
- package/esm/select/constants.js +3 -1
- package/esm/select/default-props.d.ts +1 -0
- package/esm/select/default-props.js +3 -0
- package/esm/select/index.d.ts +2 -2
- package/esm/select/index.js +2 -2
- package/esm/select/locale.d.ts +4 -0
- package/esm/select/mobileSelect/MobileSheet.js +3 -1
- package/esm/select/multi-value.js +22 -12
- package/esm/select/overlaySelect/OverlaySelect.js +1 -0
- package/esm/select/overlaySelect/hooks/useOverlaySelectOverrides.d.ts +2 -1
- package/esm/select/overlaySelect/hooks/useOverlaySelectOverrides.js +13 -16
- package/esm/select/overrides.d.ts +3 -0
- package/esm/select/overrides.js +19 -6
- package/esm/select/select.d.ts +1 -0
- package/esm/select/select.js +9 -3
- package/esm/select/selectMenuAdapter/CollapsibleSelectMenu.d.ts +118 -0
- package/esm/select/selectMenuAdapter/CollapsibleSelectMenu.js +70 -0
- package/esm/select/selectMenuAdapter/SelectMenuAdapter.d.ts +2 -34
- package/esm/select/selectMenuAdapter/SelectMenuAdapter.js +3 -3
- package/esm/select/selectMenuAdapter/SelectMenuItem.d.ts +4 -1
- package/esm/select/selectMenuAdapter/hooks/useGetExpandedGroup.d.ts +6 -0
- package/esm/select/selectMenuAdapter/hooks/useGetExpandedGroup.js +16 -0
- package/esm/select/selectMenuAdapter/types.d.ts +42 -0
- package/esm/select/selectMenuAdapter/types.js +1 -0
- package/esm/select/stateful-select.d.ts +1 -0
- package/esm/select/styled-component.d.ts +10 -1
- package/esm/select/styled-component.js +39 -15
- package/esm/select/types.d.ts +23 -1
- package/esm/select/types.js +1 -0
- package/esm/select/utils/default-filter-options.d.ts +2 -1
- package/esm/select/utils/default-filter-options.js +5 -1
- package/esm/select/utils/hidden-element.d.ts +6 -0
- package/esm/select/utils/hidden-element.js +16 -0
- package/esm/select/utils/merge-options.d.ts +2 -0
- package/esm/select/utils/merge-options.js +18 -0
- package/esm/select/utils/test-utils.d.ts +1 -0
- package/esm/select/utils/test-utils.js +7 -0
- package/esm/slider/styled-components.js +4 -4
- package/esm/snackbar/Snackbar.js +12 -12
- package/esm/snackbar/styled-component.js +9 -6
- package/esm/spacewebProvider/SpacewebProvider.d.ts +2 -0
- package/esm/spacewebProvider/SpacewebProvider.js +9 -9
- package/esm/stack/stack.js +6 -13
- package/esm/style/_buildUtils.d.ts +1 -1
- package/esm/style/_buildUtils.js +3 -1
- package/esm/style/_parseStyle.js +7 -2
- package/esm/style/useMemoizedStyletron.js +6 -1
- package/esm/switch/styled-components.js +3 -3
- package/esm/tag/avatar-tag.js +23 -16
- package/esm/tag/styled-components.js +32 -27
- package/esm/tag/tag.js +20 -12
- package/esm/tag/types.d.ts +2 -2
- package/esm/tag/utils.d.ts +50 -0
- package/esm/tag/utils.js +64 -0
- package/esm/textarea/basewebAdapters.js +3 -3
- package/esm/textarea/textarea.js +3 -3
- package/esm/textarea/types.d.ts +2 -2
- package/esm/theme/Provider.d.ts +10 -0
- package/esm/theme/Provider.js +61 -0
- package/esm/theme/context.d.ts +1 -10
- package/esm/theme/context.js +1 -61
- package/esm/theme/index.d.ts +1 -0
- package/esm/theme/index.js +1 -0
- package/esm/time-picker/TimePicker.js +4 -1
- package/esm/time-range-picker/RangeSelectorContainer.js +1 -1
- package/esm/time-range-picker/TimeRangePicker.js +20 -12
- package/esm/time-range-picker/index.d.ts +1 -1
- package/esm/time-range-picker/index.js +1 -1
- package/esm/time-range-picker/types.d.ts +1 -2
- package/esm/time-range-picker/utils.d.ts +33 -4
- package/esm/time-range-picker/utils.js +49 -15
- package/esm/time-zone-picker/types.d.ts +2 -0
- package/esm/tooltip/overrides.js +0 -1
- package/esm/tooltip/stateful-tooltip.js +2 -2
- package/esm/tooltip/tooltip.d.ts +1 -1
- package/esm/tooltip/tooltip.js +5 -2
- package/esm/tooltip/types.d.ts +2 -0
- package/esm/types.d.ts +2 -1
- package/esm/typography/Typography.js +14 -1
- package/esm/typography/constants.d.ts +56 -0
- package/esm/typography/constants.js +56 -0
- package/esm/typography/index.d.ts +1 -0
- package/esm/typography/index.js +1 -0
- package/esm/typography/styled-components.js +12 -4
- package/esm/typography/types.d.ts +1 -1
- package/esm/utils/intlNumberFormatUtils/index.d.ts +7 -0
- package/esm/utils/intlNumberFormatUtils/index.js +36 -0
- package/esm/utils/intlNumberFormatUtils/types.d.ts +21 -0
- package/esm/utils/intlNumberFormatUtils/types.js +6 -0
- package/form-control/form-control.d.ts +1 -1
- package/form-control/form-control.js +16 -11
- package/form-control/styled-component.js +17 -6
- package/helpers/ClearIconButton.js +3 -1
- package/helpers/StyledTombstone.d.ts +1 -0
- package/helpers/StyledTombstone.js +21 -0
- package/helpers/baseui/useConvertOverrides.js +6 -1
- package/helpers/commonStyles.js +3 -6
- package/helpers/index.d.ts +1 -0
- package/helpers/index.js +10 -1
- package/helpers/themeHelpers.d.ts +1 -0
- package/helpers/themeHelpers.js +15 -1
- package/hooks/useAutoFocus.js +6 -0
- package/hooks/useMatchMedia.js +13 -2
- package/icon/components/alert-solid.js +2 -0
- package/icon/components/alert.js +2 -0
- package/icon/components/calendar-solid.js +2 -0
- package/icon/components/chevron-down.js +2 -0
- package/icon/components/chevron-left.d.ts +3 -0
- package/icon/components/chevron-left.js +11 -0
- package/icon/components/chevron-right.d.ts +3 -0
- package/icon/components/chevron-right.js +11 -0
- package/icon/components/close.js +2 -0
- package/icon/components/error-clr.js +2 -0
- package/icon/components/error-solid.js +2 -0
- package/icon/components/error.js +2 -0
- package/icon/components/imagePreview.js +2 -0
- package/icon/components/info.js +2 -0
- package/icon/components/play-video.js +2 -0
- package/icon/components/reset-color.d.ts +3 -0
- package/icon/components/reset-color.js +11 -0
- package/icon/components/search.js +2 -0
- package/icon/components/tick.js +2 -0
- package/icon/components/tickCircle-solid.js +2 -0
- package/icon/components/user.js +2 -0
- package/icon/components/video-non-playable.js +2 -0
- package/index.d.ts +2 -0
- package/index.js +3 -0
- package/input/basewebAdapters.js +18 -3
- package/input/styled-components.js +7 -5
- package/input/types.d.ts +4 -1
- package/layer/useLayersContextValue.js +2 -1
- package/list/avatar-list-item.d.ts +12 -22
- package/list/avatar-list-item.js +5 -3
- package/list/index.d.ts +1 -1
- package/list/index.js +2 -1
- package/list/list-item.d.ts +3 -1
- package/list/list-item.js +9 -6
- package/list/styled-component.d.ts +1 -0
- package/list/styled-component.js +24 -16
- package/list/types.d.ts +3 -0
- package/locale/en_US.js +26 -0
- package/locale/types.d.ts +19 -0
- package/menu/MenuContext.d.ts +2 -1
- package/menu/MenuContext.js +1 -0
- package/menu/menu-item.d.ts +4 -1
- package/menu/menu-item.js +11 -11
- package/menu/menu.d.ts +1 -0
- package/menu/menu.js +11 -11
- package/menu/types.d.ts +1 -0
- package/menu/useKeyboardNavigation.d.ts +6 -3
- package/menu/useKeyboardNavigation.js +21 -14
- package/menu/useStatefulMenu.d.ts +5 -2
- package/menu/useStatefulMenu.js +14 -8
- package/modal/modal.js +3 -1
- package/modal/overrides.d.ts +2 -2
- package/modal/overrides.js +6 -7
- package/modal/styled-components.js +7 -7
- package/number/Number.d.ts +3 -0
- package/number/Number.js +14 -0
- package/number/constants.d.ts +2 -0
- package/number/constants.js +7 -0
- package/number/index.d.ts +5 -0
- package/number/index.js +12 -0
- package/number/package.json +4 -0
- package/number/types.d.ts +6 -0
- package/number/types.js +2 -0
- package/number/useNumber.d.ts +2 -0
- package/number/useNumber.js +12 -0
- package/overrides/index.d.ts +1 -1
- package/overrides/index.js +2 -1
- package/overrides/mergeOverrides.d.ts +3 -2
- package/overrides/mergeOverrides.js +2 -1
- package/package.json +8 -5
- package/payment-card/basewebAdapters.d.ts +2 -0
- package/payment-card/basewebAdapters.js +23 -1
- package/payment-card/styled-components.js +24 -5
- package/phone-input/country-select-container.js +1 -1
- package/phone-input/country-select.js +3 -3
- package/phone-input/default-props.d.ts +5 -5
- package/phone-input/default-props.js +8 -7
- package/phone-input/flag-container.js +1 -1
- package/phone-input/phone-input.d.ts +0 -4
- package/phone-input/phone-input.js +19 -11
- package/phone-input/stateful-phone-input-container.js +4 -3
- package/phone-input/stateful-phone-input.d.ts +0 -4
- package/phone-input/styled-components.d.ts +9 -1
- package/phone-input/styled-components.js +22 -7
- package/phone-input/types.d.ts +2 -1
- package/phone-input/utils.d.ts +5 -1
- package/phone-input/utils.js +7 -1
- package/popover/adapter.d.ts +1 -0
- package/popover/adapter.js +16 -1
- package/popover/overrides.js +8 -19
- package/popover/popover.d.ts +1 -0
- package/popover/popover.js +8 -3
- package/popover/stateful-popover.js +2 -2
- package/popover/types.d.ts +3 -0
- package/popover/utils.d.ts +12 -0
- package/popover/utils.js +11 -1
- package/progress/linear/styled-component.d.ts +1 -1
- package/progress/linear/styled-component.js +5 -5
- package/radio/styled-components.js +5 -5
- package/search/index.d.ts +1 -0
- package/search/index.js +3 -1
- package/search/search.d.ts +1 -1
- package/search/search.js +14 -5
- package/search/stateful-search.d.ts +3 -0
- package/search/stateful-search.js +19 -0
- package/search/styled-components.d.ts +1 -10
- package/search/styled-components.js +56 -25
- package/search/types.d.ts +8 -2
- package/select/base-select.d.ts +22 -5
- package/select/base-select.js +172 -80
- package/select/constants.d.ts +3 -0
- package/select/constants.js +4 -2
- package/select/default-props.d.ts +1 -0
- package/select/default-props.js +3 -0
- package/select/index.d.ts +2 -2
- package/select/index.js +4 -1
- package/select/locale.d.ts +4 -0
- package/select/mobileSelect/MobileSheet.js +3 -1
- package/select/multi-value.js +21 -11
- package/select/overlaySelect/OverlaySelect.js +1 -0
- package/select/overlaySelect/hooks/useOverlaySelectOverrides.d.ts +2 -1
- package/select/overlaySelect/hooks/useOverlaySelectOverrides.js +13 -16
- package/select/overrides.d.ts +3 -0
- package/select/overrides.js +20 -6
- package/select/select.d.ts +1 -0
- package/select/select.js +9 -3
- package/select/selectMenuAdapter/CollapsibleSelectMenu.d.ts +118 -0
- package/select/selectMenuAdapter/CollapsibleSelectMenu.js +74 -0
- package/select/selectMenuAdapter/SelectMenuAdapter.d.ts +2 -34
- package/select/selectMenuAdapter/SelectMenuAdapter.js +3 -3
- package/select/selectMenuAdapter/SelectMenuItem.d.ts +4 -1
- package/select/selectMenuAdapter/hooks/useGetExpandedGroup.d.ts +6 -0
- package/select/selectMenuAdapter/hooks/useGetExpandedGroup.js +20 -0
- package/select/selectMenuAdapter/types.d.ts +42 -0
- package/select/selectMenuAdapter/types.js +2 -0
- package/select/stateful-select.d.ts +1 -0
- package/select/styled-component.d.ts +10 -1
- package/select/styled-component.js +38 -14
- package/select/types.d.ts +23 -1
- package/select/types.js +2 -1
- package/select/utils/default-filter-options.d.ts +2 -1
- package/select/utils/default-filter-options.js +6 -5
- package/select/utils/hidden-element.d.ts +6 -0
- package/select/utils/hidden-element.js +19 -0
- package/select/utils/merge-options.d.ts +2 -0
- package/select/utils/merge-options.js +22 -0
- package/select/utils/test-utils.d.ts +1 -0
- package/select/utils/test-utils.js +11 -0
- package/slider/styled-components.js +4 -4
- package/snackbar/Snackbar.js +12 -12
- package/snackbar/styled-component.js +9 -6
- package/spacewebProvider/SpacewebProvider.d.ts +2 -0
- package/spacewebProvider/SpacewebProvider.js +8 -8
- package/stack/stack.js +6 -13
- package/style/_buildUtils.d.ts +1 -1
- package/style/_buildUtils.js +3 -1
- package/style/_parseStyle.js +7 -2
- package/style/useMemoizedStyletron.js +6 -1
- package/switch/styled-components.js +3 -3
- package/tag/avatar-tag.js +23 -16
- package/tag/styled-components.js +32 -27
- package/tag/tag.js +19 -11
- package/tag/types.d.ts +2 -2
- package/tag/utils.d.ts +50 -0
- package/tag/utils.js +67 -1
- package/textarea/basewebAdapters.js +2 -2
- package/textarea/textarea.js +2 -2
- package/textarea/types.d.ts +2 -2
- package/theme/Provider.d.ts +10 -0
- package/theme/Provider.js +65 -0
- package/theme/context.d.ts +1 -10
- package/theme/context.js +1 -61
- package/theme/index.d.ts +1 -0
- package/theme/index.js +1 -0
- package/time-picker/TimePicker.js +4 -1
- package/time-range-picker/RangeSelectorContainer.js +1 -1
- package/time-range-picker/TimeRangePicker.js +19 -11
- package/time-range-picker/index.d.ts +1 -1
- package/time-range-picker/index.js +4 -1
- package/time-range-picker/types.d.ts +1 -2
- package/time-range-picker/utils.d.ts +33 -4
- package/time-range-picker/utils.js +53 -17
- package/time-zone-picker/types.d.ts +2 -0
- package/tooltip/overrides.js +0 -1
- package/tooltip/stateful-tooltip.js +2 -2
- package/tooltip/tooltip.d.ts +1 -1
- package/tooltip/tooltip.js +5 -2
- package/tooltip/types.d.ts +2 -0
- package/tsconfig.tsbuildinfo +1 -1
- package/types.d.ts +2 -1
- package/typography/Typography.js +14 -1
- package/typography/constants.d.ts +56 -0
- package/typography/constants.js +57 -1
- package/typography/index.d.ts +1 -0
- package/typography/index.js +3 -1
- package/typography/styled-components.js +11 -3
- package/typography/types.d.ts +1 -1
- package/utils/intlNumberFormatUtils/index.d.ts +7 -0
- package/utils/intlNumberFormatUtils/index.js +40 -0
- package/utils/intlNumberFormatUtils/types.d.ts +21 -0
- package/utils/intlNumberFormatUtils/types.js +9 -0
- package/utils/package.json +4 -0
- package/esm/icon/components/chevron-right-solid.d.ts +0 -3
- package/esm/icon/components/chevron-right-solid.js +0 -6
- package/icon/components/chevron-right-solid.d.ts +0 -3
- package/icon/components/chevron-right-solid.js +0 -9
package/esm/modal/modal.js
CHANGED
|
@@ -9,12 +9,14 @@ import { getWidthFromSize, roleMap } from './adapter';
|
|
|
9
9
|
import { getCloseButtonProps, getDialogContainerStyles, getDialogStyles } from './overrides';
|
|
10
10
|
import { StyledModal } from './styled-components';
|
|
11
11
|
import { add$props } from '../helpers';
|
|
12
|
+
import { useLocale } from '../locale';
|
|
12
13
|
var CloseButton = function (closeProps) { return (_jsx(IconButton, __assign({}, closeProps, { children: _jsx(Close, {}, void 0) }), void 0)); };
|
|
13
14
|
var Modal = function (_a) {
|
|
14
15
|
var _b = _a.size, size = _b === void 0 ? 'md' : _b, _c = _a.role, role = _c === void 0 ? 'dialog' : _c, ariaLabel = _a.ariaLabel, overrides = _a.overrides, props = __rest(_a, ["size", "role", "ariaLabel", "overrides"]);
|
|
15
16
|
var utils = useStyle();
|
|
16
17
|
var theme = utils.theme;
|
|
17
18
|
var sharedProps = add$props({ dialogSize: size });
|
|
19
|
+
var locale = useLocale();
|
|
18
20
|
var _overrides = useConvertOverrides({
|
|
19
21
|
DialogContainer: { style: getDialogContainerStyles, props: sharedProps },
|
|
20
22
|
Dialog: {
|
|
@@ -23,7 +25,7 @@ var Modal = function (_a) {
|
|
|
23
25
|
},
|
|
24
26
|
Close: {
|
|
25
27
|
component: CloseButton,
|
|
26
|
-
props: getCloseButtonProps(utils, sharedProps),
|
|
28
|
+
props: getCloseButtonProps(utils, sharedProps, locale.modal.closeAriaLabel),
|
|
27
29
|
},
|
|
28
30
|
}, overrides, [overrides, theme]);
|
|
29
31
|
return (_jsx(StyledModal, __assign({}, props, { size: getWidthFromSize(utils, size), role: roleMap[role], overrides: _overrides }), void 0));
|
package/esm/modal/overrides.d.ts
CHANGED
|
@@ -3,6 +3,6 @@ import { Styles, StyleUtils } from '../types';
|
|
|
3
3
|
import { SharedProps } from './types';
|
|
4
4
|
export declare const getDialogContainerStyles: Styles;
|
|
5
5
|
export declare const getDialogStyles: Styles;
|
|
6
|
-
export declare const getCloseButtonProps: ({ px2rem,
|
|
6
|
+
export declare const getCloseButtonProps: ({ px2rem, theme }: StyleUtils, { $dialogSize }: {
|
|
7
7
|
$dialogSize: SharedProps['$size'];
|
|
8
|
-
}) => IconButtonProps;
|
|
8
|
+
}, ariaLabel: string) => IconButtonProps;
|
package/esm/modal/overrides.js
CHANGED
|
@@ -38,16 +38,15 @@ export var getDialogStyles = [
|
|
|
38
38
|
getDialogHeightControl,
|
|
39
39
|
transitionDuration,
|
|
40
40
|
];
|
|
41
|
-
export var getCloseButtonProps = function (_a, _b) {
|
|
42
|
-
var
|
|
43
|
-
var px2rem = _a.px2rem, direction = _a.direction, theme = _a.theme;
|
|
41
|
+
export var getCloseButtonProps = function (_a, _b, ariaLabel) {
|
|
42
|
+
var px2rem = _a.px2rem, theme = _a.theme;
|
|
44
43
|
var $dialogSize = _b.$dialogSize;
|
|
45
|
-
|
|
46
|
-
return {
|
|
44
|
+
return ({
|
|
47
45
|
size: 'sm',
|
|
46
|
+
'aria-label': ariaLabel,
|
|
48
47
|
overrides: {
|
|
49
48
|
BaseButton: {
|
|
50
|
-
style: __assign(
|
|
49
|
+
style: __assign({ position: 'absolute', top: px2rem(12), right: px2rem(16) }, ($dialogSize === 'fullPage'
|
|
51
50
|
? {
|
|
52
51
|
top: px2rem(-44),
|
|
53
52
|
right: px2rem(0),
|
|
@@ -62,5 +61,5 @@ export var getCloseButtonProps = function (_a, _b) {
|
|
|
62
61
|
: {})),
|
|
63
62
|
},
|
|
64
63
|
},
|
|
65
|
-
};
|
|
64
|
+
});
|
|
66
65
|
};
|
|
@@ -13,19 +13,19 @@ export var StyledModal = withThemeOverride(BaseModal, function (theme) { return
|
|
|
13
13
|
contentSecondary: theme.spr.text02,
|
|
14
14
|
},
|
|
15
15
|
}); });
|
|
16
|
-
export var StyledModalHeader = styled('div', 'typography-h4 spr-text-01 font-bold border-t-0 border-r-0 border-l-0', function (_a, _b) {
|
|
16
|
+
export var StyledModalHeader = styled('div', 'typography-h4 spr-text-01 font-bold border-t-0 border-r-0 border-l-0 pt-4 px-6', function (_a, _b) {
|
|
17
17
|
var px2rem = _a.px2rem;
|
|
18
18
|
var $noBorder = _b.$noBorder;
|
|
19
19
|
return ({ lineHeight: $noBorder ? px2rem(28) : px2rem(24) });
|
|
20
20
|
}, function (utils, _a) {
|
|
21
21
|
var $noBorder = _a.$noBorder;
|
|
22
|
-
return ($noBorder ? '
|
|
22
|
+
return ($noBorder ? 'pb-0' : 'border-b-1 border-solid spr-border-02 pb-4');
|
|
23
23
|
});
|
|
24
|
-
export var ModalBody = styled('div', 'typography-bl1 spr-text-01 overflow-auto flex-grow');
|
|
25
|
-
export var StyledModalFooter = styled('div', 'border-b-0 border-l-0 border-r-0', function (_a) {
|
|
26
|
-
var px2rem = _a.px2rem
|
|
27
|
-
return ({ lineHeight: px2rem(28), textAlign:
|
|
24
|
+
export var ModalBody = styled('div', 'typography-bl1 spr-text-01 overflow-auto flex-grow px-6 py-4');
|
|
25
|
+
export var StyledModalFooter = styled('div', 'border-b-0 border-l-0 border-r-0 pb-4 px-6', function (_a) {
|
|
26
|
+
var px2rem = _a.px2rem;
|
|
27
|
+
return ({ lineHeight: px2rem(28), textAlign: 'right' });
|
|
28
28
|
}, function (utils, _a) {
|
|
29
29
|
var $noBorder = _a.$noBorder;
|
|
30
|
-
return ($noBorder ? '
|
|
30
|
+
return ($noBorder ? 'pt-0' : 'border-t-1 border-solid spr-border-02 pt-4');
|
|
31
31
|
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
//hooks
|
|
3
|
+
import { useNumber } from './useNumber';
|
|
4
|
+
//constants
|
|
5
|
+
import { DEFAULT_VARIANT } from './constants';
|
|
6
|
+
export var Number = function (_a) {
|
|
7
|
+
var value = _a.value, _b = _a.variant, variant = _b === void 0 ? DEFAULT_VARIANT : _b, numberOptions = _a.numberOptions;
|
|
8
|
+
var formattedNumber = useNumber({ value: value, variant: variant, numberOptions: numberOptions });
|
|
9
|
+
return _jsx(_Fragment, { children: formattedNumber }, void 0);
|
|
10
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { useLocale } from '../locale';
|
|
2
|
+
import { getFormattedNumber } from '../utils/intlNumberFormatUtils';
|
|
3
|
+
import { DEFAULT_VARIANT } from './constants';
|
|
4
|
+
export var useNumber = function (_a) {
|
|
5
|
+
var value = _a.value, _b = _a.variant, variant = _b === void 0 ? DEFAULT_VARIANT : _b, numberOptions = _a.numberOptions;
|
|
6
|
+
var langCode = useLocale().langCode;
|
|
7
|
+
return getFormattedNumber({ value: value, locale: langCode, variant: variant, numberOptions: numberOptions });
|
|
8
|
+
};
|
package/esm/overrides/index.d.ts
CHANGED
package/esm/overrides/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import { Overrides, OverridesObject } from './types';
|
|
1
|
+
import { Override, OverrideObject, Overrides, OverridesObject } from './types';
|
|
2
|
+
declare const mergeOverride: <T>(_target?: Override<T> | undefined, _source?: Override<T> | undefined) => OverrideObject<T>;
|
|
2
3
|
declare const mergeOverrides: <T>(target: Overrides<T>, source?: Overrides<T>) => OverridesObject<T>;
|
|
3
|
-
export { mergeOverrides };
|
|
4
|
+
export { mergeOverrides, mergeOverride };
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { PaymentCardOverrides as BasePaymentCardOverrides } from 'baseui/payment-card';
|
|
2
2
|
import { PaymentCardProps, StatefulPaymentCardProps } from './types';
|
|
3
3
|
declare type AdapterProps = Omit<PaymentCardProps | StatefulPaymentCardProps, 'autoFocus'>;
|
|
4
|
+
declare type BaseWebCardSize = 'default' | 'mini' | 'compact';
|
|
4
5
|
declare const usePaymentCardBasewebAdapter: (props: AdapterProps) => Omit<AdapterProps, 'size' | 'variant' | 'className' | 'overrides' | 'style' | 'intent'> & {
|
|
5
6
|
overrides?: BasePaymentCardOverrides;
|
|
7
|
+
size: BaseWebCardSize;
|
|
6
8
|
};
|
|
7
9
|
export default usePaymentCardBasewebAdapter;
|
|
@@ -5,9 +5,31 @@ import useInputBasewebAdapter from '../input/basewebAdapters';
|
|
|
5
5
|
import { getIconWrapperStyles } from './styled-components';
|
|
6
6
|
import { add$props } from '../helpers';
|
|
7
7
|
import { mergeOverrides } from '../overrides';
|
|
8
|
+
import { SIZE } from 'baseui/input';
|
|
9
|
+
import { getDefaultSize } from '../helpers/themeHelpers';
|
|
10
|
+
import { useStyle } from '../style/';
|
|
11
|
+
var getBasewebPaymentCardSizeMap = function (_size) {
|
|
12
|
+
switch (_size) {
|
|
13
|
+
case 'lg':
|
|
14
|
+
return SIZE.default;
|
|
15
|
+
case 'md':
|
|
16
|
+
return SIZE.default;
|
|
17
|
+
case 'sm':
|
|
18
|
+
return SIZE.compact;
|
|
19
|
+
case 'xs':
|
|
20
|
+
return SIZE.compact;
|
|
21
|
+
case 'xxxs':
|
|
22
|
+
return SIZE.mini;
|
|
23
|
+
default:
|
|
24
|
+
return SIZE.default;
|
|
25
|
+
}
|
|
26
|
+
};
|
|
8
27
|
var usePaymentCardBasewebAdapter = function (props) {
|
|
28
|
+
var _a, _b;
|
|
9
29
|
var contextualProps = useContextualFormProps(props);
|
|
10
30
|
var sharedProps = add$props(_pick(contextualProps, ['size', 'variant', 'intent']));
|
|
31
|
+
var theme = useStyle().theme;
|
|
32
|
+
var _size = (_b = (_a = contextualProps.size) !== null && _a !== void 0 ? _a : sharedProps.$size) !== null && _b !== void 0 ? _b : getDefaultSize(theme);
|
|
11
33
|
var basePaymentCardStyles = {
|
|
12
34
|
Input: {
|
|
13
35
|
style: { paddingLeft: '0px' },
|
|
@@ -18,6 +40,6 @@ var usePaymentCardBasewebAdapter = function (props) {
|
|
|
18
40
|
},
|
|
19
41
|
};
|
|
20
42
|
var adaptedProps = useInputBasewebAdapter(__assign(__assign({}, contextualProps), { overrides: mergeOverrides(basePaymentCardStyles, contextualProps.overrides) }));
|
|
21
|
-
return adaptedProps;
|
|
43
|
+
return __assign(__assign({}, adaptedProps), { size: getBasewebPaymentCardSizeMap(_size) });
|
|
22
44
|
};
|
|
23
45
|
export default usePaymentCardBasewebAdapter;
|
|
@@ -1,12 +1,31 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { __assign } from "tslib";
|
|
2
|
+
import { getComponentSizeTheme, getDefaultSize } from '../helpers/themeHelpers';
|
|
3
|
+
// todo: fix this and derive from input styles
|
|
4
|
+
var SIZES_STYLES_MAP = {
|
|
5
|
+
xxxs: {
|
|
6
|
+
height: '22px',
|
|
7
|
+
},
|
|
8
|
+
xs: {
|
|
9
|
+
height: '30px',
|
|
10
|
+
},
|
|
11
|
+
sm: {
|
|
12
|
+
height: '34px',
|
|
13
|
+
},
|
|
14
|
+
md: {
|
|
15
|
+
height: '38px',
|
|
16
|
+
},
|
|
17
|
+
lg: {
|
|
18
|
+
height: '38px',
|
|
19
|
+
},
|
|
20
|
+
};
|
|
2
21
|
export var getIconWrapperStyles = function (_a, _b) {
|
|
3
22
|
var theme = _a.theme;
|
|
4
23
|
var $size = _b.$size;
|
|
5
|
-
var styles = {
|
|
6
|
-
|
|
7
|
-
marginRight: '',
|
|
8
|
-
};
|
|
9
|
-
var inputSizeTheme = getComponentSizeTheme(theme, 'input', $size, 'md');
|
|
24
|
+
var styles = __assign({ marginLeft: '', marginRight: '', lineHeight: '', fontSize: '', borderRadius: '' }, SIZES_STYLES_MAP[$size]);
|
|
25
|
+
var inputSizeTheme = getComponentSizeTheme(theme, 'input', $size, getDefaultSize(theme));
|
|
10
26
|
styles.marginLeft = styles.marginRight = inputSizeTheme.paddingX;
|
|
27
|
+
styles.fontSize = inputSizeTheme.fontSize;
|
|
28
|
+
styles.lineHeight = inputSizeTheme.lineHeight;
|
|
29
|
+
styles.borderRadius = (inputSizeTheme === null || inputSizeTheme === void 0 ? void 0 : inputSizeTheme.borderRadius) || theme.input.borderRadius;
|
|
11
30
|
return styles;
|
|
12
31
|
};
|
|
@@ -10,6 +10,6 @@ var CountrySelectContainer = function (props) {
|
|
|
10
10
|
var _a = __read(useOverrides(overrides === null || overrides === void 0 ? void 0 : overrides.CountrySelectContainer, StyledCountrySelectContainer), 2), CountrySelectComponent = _a[0], countrySelectContainerProps = _a[1];
|
|
11
11
|
var countrySelectProps = __assign(__assign({}, props), { overrides: _pick(overrides, ['CountrySelect', 'FlagContainer']) });
|
|
12
12
|
var dialCodeProps = __assign(__assign({}, _pick(props, ['size', 'value'])), { overrides: _pick(overrides, ['DialCode']) });
|
|
13
|
-
return (_jsxs(CountrySelectComponent, __assign({}, countrySelectContainerProps, { children: [_jsx(CountrySelect, __assign({}, countrySelectProps), void 0), _jsx(DialCode, __assign({}, dialCodeProps), void 0)] }), void 0));
|
|
13
|
+
return (_jsxs(CountrySelectComponent, __assign({ dir: "ltr" }, countrySelectContainerProps, { children: [_jsx(CountrySelect, __assign({}, countrySelectProps), void 0), _jsx(DialCode, __assign({}, dialCodeProps), void 0)] }), void 0));
|
|
14
14
|
};
|
|
15
15
|
export default CountrySelectContainer;
|
|
@@ -16,7 +16,7 @@ var SelectListItem = React.forwardRef(function (_a, ref) {
|
|
|
16
16
|
return (_jsxs(ListItem, __assign({}, rest, { startEnhancer: iso2FlagEmoji(id), ref: ref }, { children: [dialCode, _jsxs(Typography, __assign({ "data-testid": id, "data-entity-type": "country-label", className: "spr-text-03 ml-1" }, { children: ["(", mapIsoToLabel ? mapIsoToLabel(id) : label, ")"] }), void 0)] }), void 0));
|
|
17
17
|
});
|
|
18
18
|
var CountrySelect = function (props) {
|
|
19
|
-
var size = props.size, disabled = props.disabled, inputRef = props.inputRef, onChange = props.onChange, value = props.value, mapIsoToLabel = props.mapIsoToLabel, maxDropdownHeight = props.maxDropdownHeight, maxDropdownWidth = props.maxDropdownWidth, overrides = props.overrides;
|
|
19
|
+
var size = props.size, disabled = props.disabled, inputRef = props.inputRef, onChange = props.onChange, countries = props.countries, value = props.value, mapIsoToLabel = props.mapIsoToLabel, maxDropdownHeight = props.maxDropdownHeight, maxDropdownWidth = props.maxDropdownWidth, overrides = props.overrides;
|
|
20
20
|
var locale = useLocale();
|
|
21
21
|
var overlayContentContainerRef = useRef();
|
|
22
22
|
var mergedOverrides = useMemo(function () {
|
|
@@ -66,7 +66,7 @@ var CountrySelect = function (props) {
|
|
|
66
66
|
},
|
|
67
67
|
},
|
|
68
68
|
}, overrides);
|
|
69
|
-
}, [mapIsoToLabel,
|
|
69
|
+
}, [mapIsoToLabel, overrides, size]);
|
|
70
70
|
var _a = __read(useOverrides(mergedOverrides === null || mergedOverrides === void 0 ? void 0 : mergedOverrides.CountrySelect, DefaultSelect), 2), Select = _a[0], selectProps = _a[1];
|
|
71
71
|
var flagContainerProps = {
|
|
72
72
|
size: size,
|
|
@@ -76,7 +76,7 @@ var CountrySelect = function (props) {
|
|
|
76
76
|
};
|
|
77
77
|
return (
|
|
78
78
|
// @ts-ignore
|
|
79
|
-
_jsx(Select, __assign({ type: "overlay", options: COUNTRY_SELECT_OPTIONS, value: [value.country], onChange: function (params) {
|
|
79
|
+
_jsx(Select, __assign({ type: "overlay", options: countries !== null && countries !== void 0 ? countries : COUNTRY_SELECT_OPTIONS, value: [value.country], onChange: function (params) {
|
|
80
80
|
if (onChange) {
|
|
81
81
|
onChange(__assign(__assign({}, value), { country: params.option }));
|
|
82
82
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { InputVariant } from '../input';
|
|
2
|
-
import {
|
|
2
|
+
import { Country, PhoneInputOverrides } from './types';
|
|
3
3
|
declare const defaultProps: {
|
|
4
4
|
clearable: boolean;
|
|
5
5
|
focusLock: boolean;
|
|
@@ -12,9 +12,9 @@ declare const defaultProps: {
|
|
|
12
12
|
positive: boolean;
|
|
13
13
|
required: boolean;
|
|
14
14
|
variant: InputVariant;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
};
|
|
16
|
+
export declare const defaultValue: {
|
|
17
|
+
country: Country;
|
|
18
|
+
phoneNumber: string;
|
|
19
19
|
};
|
|
20
20
|
export default defaultProps;
|
|
@@ -11,13 +11,13 @@ var defaultProps = {
|
|
|
11
11
|
positive: false,
|
|
12
12
|
required: false,
|
|
13
13
|
variant: 'default',
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
phoneNumber: '',
|
|
14
|
+
};
|
|
15
|
+
export var defaultValue = {
|
|
16
|
+
country: {
|
|
17
|
+
label: 'United States',
|
|
18
|
+
id: 'US',
|
|
19
|
+
dialCode: '+1',
|
|
21
20
|
},
|
|
21
|
+
phoneNumber: '',
|
|
22
22
|
};
|
|
23
23
|
export default defaultProps;
|
|
@@ -13,6 +13,6 @@ var FlagContainer = forwardRef(function (props, ref) {
|
|
|
13
13
|
var locale = useLocale();
|
|
14
14
|
var sharedProps = add$props({ iso: iso, inputSize: inputSize });
|
|
15
15
|
var _a = __read(useOverrides(overrides === null || overrides === void 0 ? void 0 : overrides.FlagContainer, DefaultButton), 2), Button = _a[0], buttonProps = _a[1];
|
|
16
|
-
return (_jsx(Button, __assign({ "aria-label": locale.phoneInput.flagContainerAriaLabel, variant: "minimal", size: "
|
|
16
|
+
return (_jsx(Button, __assign({ "aria-label": locale.phoneInput.flagContainerAriaLabel, variant: "minimal", size: "xxxs", type: "button", className: [getFlagContainerStyles], "data-iso": iso, ref: ref }, sharedProps, buttonProps, rest, { children: iso2FlagEmoji(iso) }), void 0));
|
|
17
17
|
});
|
|
18
18
|
export default FlagContainer;
|
|
@@ -5,27 +5,34 @@ import _pick from 'lodash/pick';
|
|
|
5
5
|
import { Input as DefaultInput } from '../input';
|
|
6
6
|
import CountrySelectContainer from './country-select-container';
|
|
7
7
|
import { getRootStyles, getInputStyles } from './styled-components';
|
|
8
|
-
import { sanitize } from './utils';
|
|
8
|
+
import { getDefaultValue, sanitize } from './utils';
|
|
9
9
|
import { useOverrides, mergeOverrides } from '../overrides';
|
|
10
10
|
import { useLocale } from '../locale';
|
|
11
11
|
import defaultProps from './default-props';
|
|
12
12
|
import { useContextualFormProps } from '../form-control/context';
|
|
13
|
+
import { useStyle } from '../style';
|
|
14
|
+
import { getDefaultSize } from '../helpers/themeHelpers';
|
|
13
15
|
var PhoneInput = function (props) {
|
|
14
|
-
var _a
|
|
16
|
+
var _a;
|
|
17
|
+
var _b = useContextualFormProps(props), _size = _b.size, variant = _b.variant, intent = _b.intent, disabled = _b.disabled, overrides = _b.overrides, mapIsoToLabel = _b.mapIsoToLabel, maxDropdownHeight = _b.maxDropdownHeight, maxDropdownWidth = _b.maxDropdownWidth, onInputChange = _b.onInputChange, onChange = _b.onChange, propValue = _b.value, countries = _b.countries, rest = __rest(_b, ["size", "variant", "intent", "disabled", "overrides", "mapIsoToLabel", "maxDropdownHeight", "maxDropdownWidth", "onInputChange", "onChange", "value", "countries"]);
|
|
18
|
+
var _c = useStyle(), isRTL = _c.isRTL, theme = _c.theme;
|
|
19
|
+
var size = _size !== null && _size !== void 0 ? _size : getDefaultSize(theme);
|
|
15
20
|
var locale = useLocale();
|
|
16
21
|
var inputRef = useRef(null);
|
|
22
|
+
var value = propValue !== null && propValue !== void 0 ? propValue : getDefaultValue(countries);
|
|
17
23
|
var mergedOverrides = mergeOverrides({
|
|
18
24
|
Input: {
|
|
19
25
|
props: {
|
|
20
|
-
overrides: {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
26
|
+
overrides: (_a = {
|
|
27
|
+
Root: {
|
|
28
|
+
style: getRootStyles,
|
|
29
|
+
props: { $disabled: disabled },
|
|
30
|
+
},
|
|
31
|
+
Input: {
|
|
32
|
+
style: getInputStyles,
|
|
33
|
+
}
|
|
27
34
|
},
|
|
28
|
-
|
|
35
|
+
_a[isRTL ? 'After' : 'Before'] = {
|
|
29
36
|
component: CountrySelectContainer,
|
|
30
37
|
props: {
|
|
31
38
|
size: size,
|
|
@@ -36,14 +43,15 @@ var PhoneInput = function (props) {
|
|
|
36
43
|
mapIsoToLabel: mapIsoToLabel,
|
|
37
44
|
maxDropdownHeight: maxDropdownHeight,
|
|
38
45
|
maxDropdownWidth: maxDropdownWidth,
|
|
46
|
+
countries: countries,
|
|
39
47
|
overrides: _pick(overrides, ['CountrySelect', 'CountrySelectContainer', 'FlagContainer', 'DialCode']),
|
|
40
48
|
},
|
|
41
49
|
},
|
|
42
|
-
|
|
50
|
+
_a),
|
|
43
51
|
},
|
|
44
52
|
},
|
|
45
53
|
}, overrides);
|
|
46
|
-
var
|
|
54
|
+
var _d = __read(useOverrides(mergedOverrides === null || mergedOverrides === void 0 ? void 0 : mergedOverrides.Input, DefaultInput), 2), Input = _d[0], inputProps = _d[1];
|
|
47
55
|
return (_jsx(Input, __assign({ "aria-label": locale.phoneInput.inputAriaLabel, size: size, variant: variant, intent: intent, disabled: disabled, onChange: function (e) {
|
|
48
56
|
var number = sanitize(e.currentTarget.value);
|
|
49
57
|
if (onChange) {
|
|
@@ -2,10 +2,11 @@ import { __assign, __read } from "tslib";
|
|
|
2
2
|
import { useState } from 'react';
|
|
3
3
|
import defaultProps from './default-props';
|
|
4
4
|
import { STATE_CHANGE_TYPE } from './constants';
|
|
5
|
+
import { getDefaultValue } from './utils';
|
|
5
6
|
var defaultStateReducer = function (type, nextState) { return nextState; };
|
|
6
7
|
var StatefulPhoneInputContainer = function (props) {
|
|
7
|
-
var clearable = props.clearable, disabled = props.disabled, id = props.id,
|
|
8
|
-
var
|
|
8
|
+
var clearable = props.clearable, disabled = props.disabled, id = props.id, initialState = props.initialState, intent = props.intent, maxDropdownHeight = props.maxDropdownHeight, maxDropdownWidth = props.maxDropdownWidth, mapIsoToLabel = props.mapIsoToLabel, name = props.name, _a = props.onChange, onChange = _a === void 0 ? defaultProps.onChange : _a, overrides = props.overrides, placeholder = props.placeholder, required = props.required, size = props.size, _b = props.stateReducer, stateReducer = _b === void 0 ? defaultStateReducer : _b, variant = props.variant, countries = props.countries;
|
|
9
|
+
var _c = __read(useState(initialState !== null && initialState !== void 0 ? initialState : getDefaultValue(countries)), 2), state = _c[0], setState = _c[1];
|
|
9
10
|
var internalSetState = function (type, nextState) {
|
|
10
11
|
setState(stateReducer(type, nextState, state));
|
|
11
12
|
};
|
|
@@ -14,6 +15,6 @@ var StatefulPhoneInputContainer = function (props) {
|
|
|
14
15
|
onChange({ country: country, phoneNumber: phoneNumber });
|
|
15
16
|
internalSetState(STATE_CHANGE_TYPE.onChange, __assign(__assign({}, state), { country: country, phoneNumber: phoneNumber }));
|
|
16
17
|
};
|
|
17
|
-
return props.children(__assign(__assign({}, defaultProps), { 'aria-label': props['aria-label'], 'aria-labelledby': props['aria-labelledby'], 'aria-describedby': props['aria-describedby'], clearable: clearable, disabled: disabled, id: id, intent: intent, maxDropdownHeight: maxDropdownHeight, maxDropdownWidth: maxDropdownWidth, mapIsoToLabel: mapIsoToLabel, name: name, overrides: overrides, placeholder: placeholder, required: required, size: size, variant: variant, value: state, onChange: statefulOnChange }));
|
|
18
|
+
return props.children(__assign(__assign({}, defaultProps), { 'aria-label': props['aria-label'], 'aria-labelledby': props['aria-labelledby'], 'aria-describedby': props['aria-describedby'], clearable: clearable, disabled: disabled, id: id, intent: intent, maxDropdownHeight: maxDropdownHeight, maxDropdownWidth: maxDropdownWidth, mapIsoToLabel: mapIsoToLabel, name: name, overrides: overrides, placeholder: placeholder, required: required, size: size, variant: variant, value: state, onChange: statefulOnChange, countries: countries }));
|
|
18
19
|
};
|
|
19
20
|
export default StatefulPhoneInputContainer;
|
|
@@ -14,10 +14,6 @@ declare const StatefulPhoneInput: {
|
|
|
14
14
|
positive: boolean;
|
|
15
15
|
required: boolean;
|
|
16
16
|
variant: import("../input").InputVariant;
|
|
17
|
-
value: {
|
|
18
|
-
country: import("./types").Country;
|
|
19
|
-
phoneNumber: string;
|
|
20
|
-
};
|
|
21
17
|
};
|
|
22
18
|
};
|
|
23
19
|
export default StatefulPhoneInput;
|
|
@@ -8,6 +8,14 @@ export declare const getFlagContainerStyles: (string | (({ theme, px2rem }: {
|
|
|
8
8
|
export declare const getRootStyles: ({}: {}, { $disabled }: {
|
|
9
9
|
$disabled: any;
|
|
10
10
|
}) => "cursor-not-allowed" | undefined;
|
|
11
|
-
export declare const getInputStyles
|
|
11
|
+
export declare const getInputStyles: ({ theme, px2rem }: {
|
|
12
|
+
theme: any;
|
|
13
|
+
px2rem: any;
|
|
14
|
+
}, { $size }: {
|
|
15
|
+
$size: any;
|
|
16
|
+
}) => {
|
|
17
|
+
paddingLeft: string;
|
|
18
|
+
paddingRight: string;
|
|
19
|
+
};
|
|
12
20
|
export declare const StyledCountrySelectContainer: import("../style/styled").StyledComponent;
|
|
13
21
|
export declare const StyledDialCode: import("../style/styled").StyledComponent;
|
|
@@ -1,35 +1,49 @@
|
|
|
1
1
|
import { __assign } from "tslib";
|
|
2
2
|
import { styled } from '../style';
|
|
3
|
+
import { getComponentSizeTheme, getDefaultSize } from '../helpers/themeHelpers';
|
|
3
4
|
var dialCodeSizeConfig = function (px2rem) { return ({
|
|
4
|
-
|
|
5
|
-
|
|
5
|
+
xxxs: { fontSize: px2rem(10) },
|
|
6
|
+
xs: { fontSize: px2rem(12) },
|
|
7
|
+
sm: { fontSize: px2rem(14) },
|
|
8
|
+
md: { fontSize: px2rem(16) },
|
|
6
9
|
lg: { fontSize: px2rem(16) },
|
|
7
10
|
}); };
|
|
8
11
|
var getSizeConfig = function (px2rem, size) { var _a; return (_a = dialCodeSizeConfig(px2rem)[size]) !== null && _a !== void 0 ? _a : dialCodeSizeConfig(px2rem).lg; };
|
|
9
12
|
export var getFlagContainerStyles = [
|
|
10
|
-
'min-w-0 spr-ui-05 px-2 text-16 rounded-4',
|
|
13
|
+
'min-w-0 spr-ui-05 px-2 py-0.5 text-16 rounded-4',
|
|
11
14
|
function (_a, _b) {
|
|
12
15
|
var theme = _a.theme, px2rem = _a.px2rem;
|
|
13
16
|
var $inputSize = _b.$inputSize, $isFocusVisible = _b.$isFocusVisible;
|
|
14
|
-
|
|
17
|
+
var inputSizeTheme = getComponentSizeTheme(theme, 'input', $inputSize, getDefaultSize(theme));
|
|
18
|
+
return __assign({ marginLeft: inputSizeTheme.paddingX, marginRight: '0 /* @noflip */' }, ($isFocusVisible && {
|
|
15
19
|
':focus': {
|
|
16
20
|
outline: "1px solid ".concat(theme.spr.focus01),
|
|
17
21
|
},
|
|
18
|
-
}))
|
|
22
|
+
}));
|
|
19
23
|
},
|
|
20
24
|
];
|
|
21
25
|
export var getRootStyles = function (_a, _b) {
|
|
22
26
|
var $disabled = _b.$disabled;
|
|
23
27
|
return ($disabled ? 'cursor-not-allowed' : undefined);
|
|
24
28
|
};
|
|
25
|
-
export var getInputStyles =
|
|
29
|
+
export var getInputStyles = function (_a, _b) {
|
|
30
|
+
var theme = _a.theme, px2rem = _a.px2rem;
|
|
31
|
+
var $size = _b.$size;
|
|
32
|
+
var inputSizeTheme = getComponentSizeTheme(theme, 'input', $size, getDefaultSize(theme));
|
|
33
|
+
return {
|
|
34
|
+
paddingLeft: "".concat(px2rem(4), " /* @noflip */"),
|
|
35
|
+
paddingRight: "".concat(inputSizeTheme.paddingX, " /* @noflip */"),
|
|
36
|
+
};
|
|
37
|
+
};
|
|
26
38
|
export var StyledCountrySelectContainer = styled('div', 'flex items-center');
|
|
27
|
-
export var StyledDialCode = styled('div', 'flex items-center
|
|
39
|
+
export var StyledDialCode = styled('div', 'flex items-center font-medium', function (_a, _b) {
|
|
28
40
|
var px2rem = _a.px2rem;
|
|
29
41
|
var $size = _b.$size;
|
|
30
42
|
var sizeTheme = getSizeConfig(px2rem, $size);
|
|
31
43
|
var styles = {
|
|
32
44
|
fontSize: sizeTheme.fontSize,
|
|
45
|
+
marginLeft: "".concat(px2rem(4), " /* @noflip */"),
|
|
46
|
+
marginRight: '0 /* @noflip */',
|
|
33
47
|
};
|
|
34
48
|
return styles;
|
|
35
49
|
});
|
|
@@ -28,6 +28,7 @@ export declare type PhoneInputProps = Omit<InputProps, 'value' | 'onChange'> & {
|
|
|
28
28
|
value?: Value;
|
|
29
29
|
mapIsoToLabel?: (iso: string) => string;
|
|
30
30
|
maxDropdownHeight?: string;
|
|
31
|
+
countries?: Array<Country>;
|
|
31
32
|
maxDropdownWidth?: string;
|
|
32
33
|
overrides?: PhoneInputOverrides;
|
|
33
34
|
};
|
|
@@ -37,7 +38,7 @@ export declare type StatefulPhoneInputContainerProps = Omit<PhoneInputProps, 'ch
|
|
|
37
38
|
stateReducer?: StateReducer;
|
|
38
39
|
children: (props: PhoneInputProps) => any;
|
|
39
40
|
};
|
|
40
|
-
export declare type CountrySelectContainerProps = Required<Pick<PhoneInputProps, 'size' | 'disabled' | 'onChange' | 'mapIsoToLabel' | 'maxDropdownHeight' | 'maxDropdownWidth'>> & {
|
|
41
|
+
export declare type CountrySelectContainerProps = Required<Pick<PhoneInputProps, 'size' | 'disabled' | 'onChange' | 'mapIsoToLabel' | 'maxDropdownHeight' | 'maxDropdownWidth' | 'countries'>> & {
|
|
41
42
|
overrides?: Pick<PhoneInputOverrides, 'CountrySelectContainer' | 'CountrySelect' | 'FlagContainer' | 'DialCode'>;
|
|
42
43
|
value: State;
|
|
43
44
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Value as ValueT } from '../select/types';
|
|
2
|
-
import { Value } from './types';
|
|
2
|
+
import { Value, Country } from './types';
|
|
3
3
|
export declare const iso2FlagEmoji: (iso: string) => string | undefined;
|
|
4
4
|
export declare const sanitize: (value?: string) => string;
|
|
5
5
|
export declare const getPhoneNumberWithCountryDialCode: (value: Value) => string | undefined;
|
|
@@ -7,3 +7,7 @@ export declare const countrySelectFilterOptions: (options: ValueT, filterValue:
|
|
|
7
7
|
valueKey: string;
|
|
8
8
|
labelKey: string;
|
|
9
9
|
}) => ValueT;
|
|
10
|
+
export declare const getDefaultValue: (countries?: Country[] | undefined) => {
|
|
11
|
+
country: Country;
|
|
12
|
+
phoneNumber: string;
|
|
13
|
+
};
|
package/esm/phone-input/utils.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { __assign, __read, __spreadArray } from "tslib";
|
|
2
|
+
import _isEmpty from 'lodash/isEmpty';
|
|
2
3
|
import { filterOptions } from '../select/utils/default-filter-options';
|
|
3
|
-
import { ISO_REGEX, ISO_TO_FLAG_OFFSET } from './constants';
|
|
4
|
+
import { COUNTRIES, ISO_REGEX, ISO_TO_FLAG_OFFSET } from './constants';
|
|
5
|
+
import { defaultValue } from './default-props';
|
|
4
6
|
export var iso2FlagEmoji = function (iso) {
|
|
5
7
|
if (!ISO_REGEX.test(iso)) {
|
|
6
8
|
return undefined;
|
|
@@ -25,3 +27,6 @@ export var countrySelectFilterOptions = function (options, filterValue, excludeO
|
|
|
25
27
|
return label.toLowerCase().includes(filterValueLowerCase) || dialCode.includes(filterValueLowerCase);
|
|
26
28
|
} }));
|
|
27
29
|
};
|
|
30
|
+
export var getDefaultValue = function (countries) {
|
|
31
|
+
return countries && !_isEmpty(countries) ? { country: COUNTRIES[countries[0].id], phoneNumber: '' } : defaultValue;
|
|
32
|
+
};
|
package/esm/popover/adapter.d.ts
CHANGED
|
@@ -4,3 +4,4 @@ import { ValueOf } from '../utility-types';
|
|
|
4
4
|
export declare const accessibilityMap: Record<AccessibilityType, ValueOf<typeof ACCESSIBILITY_TYPE>>;
|
|
5
5
|
export declare const triggerTypeMap: Record<TriggerType, ValueOf<typeof TRIGGER_TYPE>>;
|
|
6
6
|
export declare const placementMap: Record<Placement, ValueOf<typeof PLACEMENT>>;
|
|
7
|
+
export declare const rtlPlacementMap: Record<Placement, ValueOf<typeof PLACEMENT>>;
|