@razorpay/blade 10.23.5 → 11.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/lib/native/components/Accordion/AccordionButton.native.js +2 -3
- package/build/lib/native/components/Accordion/AccordionButton.native.js.map +1 -1
- package/build/lib/native/components/Accordion/AccordionItem.js +1 -1
- package/build/lib/native/components/Accordion/AccordionItem.js.map +1 -1
- package/build/lib/native/components/Accordion/commonStyles.js +1 -1
- package/build/lib/native/components/Accordion/commonStyles.js.map +1 -1
- package/build/lib/native/components/ActionList/ActionList.js +2 -3
- package/build/lib/native/components/ActionList/ActionList.js.map +1 -1
- package/build/lib/native/components/ActionList/ActionListBox.native.js +4 -1
- package/build/lib/native/components/ActionList/ActionListBox.native.js.map +1 -1
- package/build/lib/native/components/ActionList/ActionListItem.js +1 -2
- package/build/lib/native/components/ActionList/ActionListItem.js.map +1 -1
- package/build/lib/native/components/ActionList/ActionListNoResults.js +1 -1
- package/build/lib/native/components/ActionList/ActionListNoResults.js.map +1 -1
- package/build/lib/native/components/ActionList/actionListUtils.js +1 -1
- package/build/lib/native/components/ActionList/actionListUtils.js.map +1 -1
- package/build/lib/native/components/ActionList/styles/StyledActionListItem.native.js +1 -1
- package/build/lib/native/components/ActionList/styles/StyledActionListItem.native.js.map +1 -1
- package/build/lib/native/components/Alert/Alert.js +1 -3
- package/build/lib/native/components/Alert/Alert.js.map +1 -1
- package/build/lib/native/components/Alert/styles.js +1 -1
- package/build/lib/native/components/Alert/styles.js.map +1 -1
- package/build/lib/native/components/Amount/Amount.js +7 -3
- package/build/lib/native/components/Amount/Amount.js.map +1 -1
- package/build/lib/native/components/Amount/amountTokens.js +2 -2
- package/build/lib/native/components/Amount/amountTokens.js.map +1 -1
- package/build/lib/native/components/Badge/Badge.js +3 -2
- package/build/lib/native/components/Badge/Badge.js.map +1 -1
- package/build/lib/native/components/Badge/badgeTokens.js +4 -2
- package/build/lib/native/components/Badge/badgeTokens.js.map +1 -1
- package/build/lib/native/components/BaseHeaderFooter/BaseHeader.js +1 -2
- package/build/lib/native/components/BaseHeaderFooter/BaseHeader.js.map +1 -1
- package/build/lib/native/components/BottomSheet/BottomSheet.native.js +1 -1
- package/build/lib/native/components/BottomSheet/BottomSheet.native.js.map +1 -1
- package/build/lib/native/components/BottomSheet/BottomSheetBackdrop.native.js +1 -1
- package/build/lib/native/components/BottomSheet/BottomSheetBackdrop.native.js.map +1 -1
- package/build/lib/native/components/BottomSheet/BottomSheetCommon.js +2 -2
- package/build/lib/native/components/BottomSheet/BottomSheetCommon.js.map +1 -1
- package/build/lib/native/components/BottomSheet/BottomSheetFooter.native.js +2 -9
- package/build/lib/native/components/BottomSheet/BottomSheetFooter.native.js.map +1 -1
- package/build/lib/native/components/BottomSheet/getBottomSheetGrabHandleStyles.js +1 -1
- package/build/lib/native/components/BottomSheet/getBottomSheetGrabHandleStyles.js.map +1 -1
- package/build/lib/native/components/Box/BaseBox/baseBoxStyles.js +1 -1
- package/build/lib/native/components/Box/BaseBox/baseBoxStyles.js.map +1 -1
- package/build/lib/native/components/Box/BaseBox/types/propsTypes.js.map +1 -1
- package/build/lib/native/components/Button/BaseButton/BaseButton.js +2 -2
- package/build/lib/native/components/Button/BaseButton/BaseButton.js.map +1 -1
- package/build/lib/native/components/Button/BaseButton/StyledBaseButton.native.js +1 -1
- package/build/lib/native/components/Button/BaseButton/StyledBaseButton.native.js.map +1 -1
- package/build/lib/native/components/Button/BaseButton/buttonTokens.js +2 -2
- package/build/lib/native/components/Button/BaseButton/buttonTokens.js.map +1 -1
- package/build/lib/native/components/Button/BaseButton/getStyledBaseButtonStyles.js +1 -1
- package/build/lib/native/components/Button/BaseButton/getStyledBaseButtonStyles.js.map +1 -1
- package/build/lib/native/components/Button/Button/Button.js +1 -1
- package/build/lib/native/components/Button/Button/Button.js.map +1 -1
- package/build/lib/native/components/Button/IconButton/IconButton.js +1 -1
- package/build/lib/native/components/Button/IconButton/IconButton.js.map +1 -1
- package/build/lib/native/components/Button/IconButton/StyledIconButton.native.js +1 -1
- package/build/lib/native/components/Button/IconButton/StyledIconButton.native.js.map +1 -1
- package/build/lib/native/components/Card/Card.js +1 -1
- package/build/lib/native/components/Card/Card.js.map +1 -1
- package/build/lib/native/components/Card/CardFooter.js +1 -1
- package/build/lib/native/components/Card/CardFooter.js.map +1 -1
- package/build/lib/native/components/Card/CardHeader.js +3 -3
- package/build/lib/native/components/Card/CardHeader.js.map +1 -1
- package/build/lib/native/components/Card/CardRoot.native.js +1 -1
- package/build/lib/native/components/Card/CardRoot.native.js.map +1 -1
- package/build/lib/native/components/Card/CardSurface.native.js +1 -1
- package/build/lib/native/components/Card/CardSurface.native.js.map +1 -1
- package/build/lib/native/components/Carousel/Carousel.native.js +2 -1
- package/build/lib/native/components/Carousel/Carousel.native.js.map +1 -1
- package/build/lib/native/components/Carousel/Indicators/getIndicatorButtonStyles.js +2 -1
- package/build/lib/native/components/Carousel/Indicators/getIndicatorButtonStyles.js.map +1 -1
- package/build/lib/native/components/Carousel/NavigationButton/NavigationButton.js +1 -1
- package/build/lib/native/components/Carousel/NavigationButton/NavigationButton.js.map +1 -1
- package/build/lib/native/components/Carousel/NavigationButton/StyledNavigationButton.native.js +7 -1
- package/build/lib/native/components/Carousel/NavigationButton/StyledNavigationButton.native.js.map +1 -1
- package/build/lib/native/components/Carousel/NavigationButton/getNavigationButtonStyles.js +2 -1
- package/build/lib/native/components/Carousel/NavigationButton/getNavigationButtonStyles.js.map +1 -1
- package/build/lib/native/components/Checkbox/CheckboxIcon/CheckboxIcon.js +1 -1
- package/build/lib/native/components/Checkbox/CheckboxIcon/CheckboxIcon.js.map +1 -1
- package/build/lib/native/components/Checkbox/CheckboxIcon/CheckboxIconWrapperStyles.js +1 -1
- package/build/lib/native/components/Checkbox/CheckboxIcon/CheckboxIconWrapperStyles.js.map +1 -1
- package/build/lib/native/components/Checkbox/checkboxTokens.js +1 -1
- package/build/lib/native/components/Checkbox/checkboxTokens.js.map +1 -1
- package/build/lib/native/components/Chip/AnimatedChip.native.js +1 -1
- package/build/lib/native/components/Chip/AnimatedChip.native.js.map +1 -1
- package/build/lib/native/components/Chip/Chip.js +1 -1
- package/build/lib/native/components/Chip/Chip.js.map +1 -1
- package/build/lib/native/components/Chip/ChipGroup.js +1 -1
- package/build/lib/native/components/Chip/ChipGroup.js.map +1 -1
- package/build/lib/native/components/Chip/chipTokens.js +1 -1
- package/build/lib/native/components/Chip/chipTokens.js.map +1 -1
- package/build/lib/native/components/Chip/getAnimatedChipStyles.js +1 -1
- package/build/lib/native/components/Chip/getAnimatedChipStyles.js.map +1 -1
- package/build/lib/native/components/Chip/useChipGroup.js +1 -1
- package/build/lib/native/components/Chip/useChipGroup.js.map +1 -1
- package/build/lib/native/components/Counter/Counter.js +3 -3
- package/build/lib/native/components/Counter/Counter.js.map +1 -1
- package/build/lib/native/components/Counter/counterTokens.js +2 -2
- package/build/lib/native/components/Counter/counterTokens.js.map +1 -1
- package/build/lib/native/components/Divider/Divider.js +1 -1
- package/build/lib/native/components/Divider/Divider.js.map +1 -1
- package/build/lib/native/components/Dropdown/Dropdown.js +1 -1
- package/build/lib/native/components/Dropdown/Dropdown.js.map +1 -1
- package/build/lib/native/components/Dropdown/StyledDropdownOverlay.js +1 -1
- package/build/lib/native/components/Dropdown/StyledDropdownOverlay.js.map +1 -1
- package/build/lib/native/components/Form/CharacterCounter/CharacterCounter.js +1 -1
- package/build/lib/native/components/Form/CharacterCounter/CharacterCounter.js.map +1 -1
- package/build/lib/native/components/Form/FormHint.js +2 -2
- package/build/lib/native/components/Form/FormHint.js.map +1 -1
- package/build/lib/native/components/Form/FormLabel.js +2 -2
- package/build/lib/native/components/Form/FormLabel.js.map +1 -1
- package/build/lib/native/components/Form/Selector/SelectorSupportText.js +4 -2
- package/build/lib/native/components/Form/Selector/SelectorSupportText.js.map +1 -1
- package/build/lib/native/components/Form/Selector/SelectorTitle.js +2 -2
- package/build/lib/native/components/Form/Selector/SelectorTitle.js.map +1 -1
- package/build/lib/native/components/Icons/useIconProps/useIconProps.js +1 -1
- package/build/lib/native/components/Icons/useIconProps/useIconProps.js.map +1 -1
- package/build/lib/native/components/Indicator/Indicator.js +1 -1
- package/build/lib/native/components/Indicator/Indicator.js.map +1 -1
- package/build/lib/native/components/Input/BaseInput/AnimatedBaseInputWrapper.native.js +1 -1
- package/build/lib/native/components/Input/BaseInput/AnimatedBaseInputWrapper.native.js.map +1 -1
- package/build/lib/native/components/Input/BaseInput/BaseInputAnimatedBorder.native.js +1 -1
- package/build/lib/native/components/Input/BaseInput/BaseInputAnimatedBorder.native.js.map +1 -1
- package/build/lib/native/components/Input/BaseInput/BaseInputTagSlot.native.js +1 -1
- package/build/lib/native/components/Input/BaseInput/BaseInputTagSlot.native.js.map +1 -1
- package/build/lib/native/components/Input/BaseInput/BaseInputVisuals.js +1 -1
- package/build/lib/native/components/Input/BaseInput/BaseInputVisuals.js.map +1 -1
- package/build/lib/native/components/Input/BaseInput/BaseInputWrapper.js.map +1 -1
- package/build/lib/native/components/Input/BaseInput/StyledBaseInput.native.js +1 -1
- package/build/lib/native/components/Input/BaseInput/StyledBaseInput.native.js.map +1 -1
- package/build/lib/native/components/Input/BaseInput/baseInputStyles.js +1 -1
- package/build/lib/native/components/Input/BaseInput/baseInputStyles.js.map +1 -1
- package/build/lib/native/components/Input/DropdownInputTriggers/Chevron.js +1 -1
- package/build/lib/native/components/Input/DropdownInputTriggers/Chevron.js.map +1 -1
- package/build/lib/native/components/Link/BaseLink/BaseLink.js +3 -3
- package/build/lib/native/components/Link/BaseLink/BaseLink.js.map +1 -1
- package/build/lib/native/components/Link/BaseLink/StyledBaseLink.native.js +1 -1
- package/build/lib/native/components/Link/BaseLink/StyledBaseLink.native.js.map +1 -1
- package/build/lib/native/components/Link/Link/Link.js +1 -1
- package/build/lib/native/components/Link/Link/Link.js.map +1 -1
- package/build/lib/native/components/List/List.js +1 -1
- package/build/lib/native/components/List/List.js.map +1 -1
- package/build/lib/native/components/List/ListItem.js +1 -1
- package/build/lib/native/components/List/ListItem.js.map +1 -1
- package/build/lib/native/components/List/ListItemIcons.js +4 -1
- package/build/lib/native/components/List/ListItemIcons.js.map +1 -1
- package/build/lib/native/components/Popover/Popover.native.js +1 -1
- package/build/lib/native/components/Popover/Popover.native.js.map +1 -1
- package/build/lib/native/components/Popover/PopoverContent.js +2 -3
- package/build/lib/native/components/Popover/PopoverContent.js.map +1 -1
- package/build/lib/native/components/Popover/getPopoverContentWrapperStyles.js +1 -1
- package/build/lib/native/components/Popover/getPopoverContentWrapperStyles.js.map +1 -1
- package/build/lib/native/components/ProgressBar/ProgressBar.js +14 -18
- package/build/lib/native/components/ProgressBar/ProgressBar.js.map +1 -1
- package/build/lib/native/components/Radio/Radio.js +1 -1
- package/build/lib/native/components/Radio/Radio.js.map +1 -1
- package/build/lib/native/components/Radio/RadioIcon/RadioIcon.js +1 -1
- package/build/lib/native/components/Radio/RadioIcon/RadioIcon.js.map +1 -1
- package/build/lib/native/components/Radio/RadioIcon/RadioIconWrapperStyles.js +1 -1
- package/build/lib/native/components/Radio/RadioIcon/RadioIconWrapperStyles.js.map +1 -1
- package/build/lib/native/components/Radio/radioTokens.js +1 -1
- package/build/lib/native/components/Radio/radioTokens.js.map +1 -1
- package/build/lib/native/components/Skeleton/PulseAnimation.native.js +1 -2
- package/build/lib/native/components/Skeleton/PulseAnimation.native.js.map +1 -1
- package/build/lib/native/components/Skeleton/Skeleton.js +1 -1
- package/build/lib/native/components/Skeleton/Skeleton.js.map +1 -1
- package/build/lib/native/components/Spinner/BaseSpinner/BaseSpinner.js +1 -1
- package/build/lib/native/components/Spinner/BaseSpinner/BaseSpinner.js.map +1 -1
- package/build/lib/native/components/Spinner/Spinner/Spinner.js +1 -1
- package/build/lib/native/components/Spinner/Spinner/Spinner.js.map +1 -1
- package/build/lib/native/components/Switch/switchTokens.js +1 -1
- package/build/lib/native/components/Switch/switchTokens.js.map +1 -1
- package/build/lib/native/components/Tabs/TabIndicator.native.js +1 -1
- package/build/lib/native/components/Tabs/TabIndicator.native.js.map +1 -1
- package/build/lib/native/components/Tabs/Tabs.native.js +3 -2
- package/build/lib/native/components/Tabs/Tabs.native.js.map +1 -1
- package/build/lib/native/components/Tabs/tabTokens.js +2 -2
- package/build/lib/native/components/Tabs/tabTokens.js.map +1 -1
- package/build/lib/native/components/Tag/Tag.js +1 -1
- package/build/lib/native/components/Tag/Tag.js.map +1 -1
- package/build/lib/native/components/Tooltip/Tooltip.native.js +1 -1
- package/build/lib/native/components/Tooltip/Tooltip.native.js.map +1 -1
- package/build/lib/native/components/Tooltip/TooltipContent.js +1 -1
- package/build/lib/native/components/Tooltip/TooltipContent.js.map +1 -1
- package/build/lib/native/components/Tooltip/getTooltipContentWrapperStyles.js +1 -1
- package/build/lib/native/components/Tooltip/getTooltipContentWrapperStyles.js.map +1 -1
- package/build/lib/native/components/Typography/BaseText/BaseText.native.js +1 -1
- package/build/lib/native/components/Typography/BaseText/BaseText.native.js.map +1 -1
- package/build/lib/native/components/Typography/BaseText/getBaseTextStyles.js +2 -1
- package/build/lib/native/components/Typography/BaseText/getBaseTextStyles.js.map +1 -1
- package/build/lib/native/components/Typography/Code/Code.js +1 -1
- package/build/lib/native/components/Typography/Code/Code.js.map +1 -1
- package/build/lib/native/components/Typography/Display/Display.js +1 -1
- package/build/lib/native/components/Typography/Display/Display.js.map +1 -1
- package/build/lib/native/components/Typography/Heading/Heading.js +1 -2
- package/build/lib/native/components/Typography/Heading/Heading.js.map +1 -1
- package/build/lib/native/components/Typography/Text/Text.js +1 -1
- package/build/lib/native/components/Typography/Text/Text.js.map +1 -1
- package/build/lib/native/components/Typography/Text/getTextStyles.js +1 -1
- package/build/lib/native/components/Typography/Text/getTextStyles.js.map +1 -1
- package/build/lib/native/components/index.js +37 -38
- package/build/lib/native/components/index.js.map +1 -1
- package/build/lib/native/tokens/global/border.js +1 -1
- package/build/lib/native/tokens/global/border.js.map +1 -1
- package/build/lib/native/tokens/global/colors.js +1 -1
- package/build/lib/native/tokens/global/colors.js.map +1 -1
- package/build/lib/native/tokens/global/elevation/elevation.native.js +1 -1
- package/build/lib/native/tokens/global/elevation/elevation.native.js.map +1 -1
- package/build/lib/native/tokens/global/fontFamily/fontFamily.native.js +1 -1
- package/build/lib/native/tokens/global/fontFamily/fontFamily.native.js.map +1 -1
- package/build/lib/native/tokens/global/motion.js.map +1 -1
- package/build/lib/native/tokens/global/opacity.js +1 -1
- package/build/lib/native/tokens/global/opacity.js.map +1 -1
- package/build/lib/native/tokens/global/typography.js +1 -1
- package/build/lib/native/tokens/global/typography.js.map +1 -1
- package/build/lib/native/tokens/index.js +1 -2
- package/build/lib/native/tokens/index.js.map +1 -1
- package/build/lib/native/tokens/theme/bladeTheme.js +13 -0
- package/build/lib/native/tokens/theme/bladeTheme.js.map +1 -0
- package/build/lib/native/tokens/theme/createTheme.js +2 -2
- package/build/lib/native/tokens/theme/createTheme.js.map +1 -1
- package/build/lib/native/tokens/theme/overrideTheme.js +3 -3
- package/build/lib/native/tokens/theme/overrideTheme.js.map +1 -1
- package/build/lib/native/tokens/theme/theme.js.map +1 -1
- package/build/lib/native/utils/getFocusRingStyles/getFocusRingStyles.native.js +4 -0
- package/build/lib/native/utils/getFocusRingStyles/getFocusRingStyles.native.js.map +1 -0
- package/build/lib/native/utils/lodashButBetter/get.js.map +1 -1
- package/build/lib/native/utils/lodashButBetter/isEmpty.js.map +1 -1
- package/build/lib/native/utils/makeLetterSpacing/makeLetterSpacing.js +4 -0
- package/build/lib/native/utils/makeLetterSpacing/makeLetterSpacing.js.map +1 -0
- package/build/lib/native/utils/objectKeysWithType.js +4 -0
- package/build/lib/native/utils/objectKeysWithType.js.map +1 -0
- package/build/lib/native/utils/useInteraction.js +1 -1
- package/build/lib/native/utils/useInteraction.js.map +1 -1
- package/build/lib/web/development/components/Accordion/AccordionButton.web.js +8 -6
- package/build/lib/web/development/components/Accordion/AccordionButton.web.js.map +1 -1
- package/build/lib/web/development/components/Accordion/AccordionItem.js +1 -1
- package/build/lib/web/development/components/Accordion/AccordionItem.js.map +1 -1
- package/build/lib/web/development/components/Accordion/StyledAccordionButton.web.js +10 -11
- package/build/lib/web/development/components/Accordion/StyledAccordionButton.web.js.map +1 -1
- package/build/lib/web/development/components/Accordion/commonStyles.js +3 -6
- package/build/lib/web/development/components/Accordion/commonStyles.js.map +1 -1
- package/build/lib/web/development/components/ActionList/ActionList.js +21 -48
- package/build/lib/web/development/components/ActionList/ActionList.js.map +1 -1
- package/build/lib/web/development/components/ActionList/ActionListItem.js +6 -12
- package/build/lib/web/development/components/ActionList/ActionListItem.js.map +1 -1
- package/build/lib/web/development/components/ActionList/ActionListNoResults.js +3 -3
- package/build/lib/web/development/components/ActionList/ActionListNoResults.js.map +1 -1
- package/build/lib/web/development/components/ActionList/actionListUtils.js +3 -3
- package/build/lib/web/development/components/ActionList/actionListUtils.js.map +1 -1
- package/build/lib/web/development/components/ActionList/index.js +1 -1
- package/build/lib/web/development/components/ActionList/styles/StyledActionListItem.web.js +6 -3
- package/build/lib/web/development/components/ActionList/styles/StyledActionListItem.web.js.map +1 -1
- package/build/lib/web/development/components/Alert/Alert.js +36 -52
- package/build/lib/web/development/components/Alert/Alert.js.map +1 -1
- package/build/lib/web/development/components/Alert/styles.js +3 -7
- package/build/lib/web/development/components/Alert/styles.js.map +1 -1
- package/build/lib/web/development/components/Amount/Amount.js +141 -76
- package/build/lib/web/development/components/Amount/Amount.js.map +1 -1
- package/build/lib/web/development/components/Amount/amountTokens.js +67 -34
- package/build/lib/web/development/components/Amount/amountTokens.js.map +1 -1
- package/build/lib/web/development/components/Badge/Badge.js +26 -35
- package/build/lib/web/development/components/Badge/Badge.js.map +1 -1
- package/build/lib/web/development/components/Badge/badgeTokens.js +7 -5
- package/build/lib/web/development/components/Badge/badgeTokens.js.map +1 -1
- package/build/lib/web/development/components/BaseHeaderFooter/BaseHeader.js +7 -7
- package/build/lib/web/development/components/BaseHeaderFooter/BaseHeader.js.map +1 -1
- package/build/lib/web/development/components/BottomSheet/BottomSheet.web.js +3 -3
- package/build/lib/web/development/components/BottomSheet/BottomSheet.web.js.map +1 -1
- package/build/lib/web/development/components/BottomSheet/BottomSheetBackdrop.web.js +1 -5
- package/build/lib/web/development/components/BottomSheet/BottomSheetBackdrop.web.js.map +1 -1
- package/build/lib/web/development/components/BottomSheet/BottomSheetCommon.js +1 -5
- package/build/lib/web/development/components/BottomSheet/BottomSheetCommon.js.map +1 -1
- package/build/lib/web/development/components/BottomSheet/BottomSheetFooter.web.js +1 -5
- package/build/lib/web/development/components/BottomSheet/BottomSheetFooter.web.js.map +1 -1
- package/build/lib/web/development/components/BottomSheet/getBottomSheetGrabHandleStyles.js +1 -1
- package/build/lib/web/development/components/BottomSheet/getBottomSheetGrabHandleStyles.js.map +1 -1
- package/build/lib/web/development/components/Box/BaseBox/baseBoxStyles.js +15 -4
- package/build/lib/web/development/components/Box/BaseBox/baseBoxStyles.js.map +1 -1
- package/build/lib/web/development/components/Box/BaseBox/getResponsiveValue.web.js.map +1 -1
- package/build/lib/web/development/components/Box/BaseBox/types/propsTypes.js.map +1 -1
- package/build/lib/web/development/components/Button/BaseButton/BaseButton.js +103 -91
- package/build/lib/web/development/components/Button/BaseButton/BaseButton.js.map +1 -1
- package/build/lib/web/development/components/Button/BaseButton/StyledBaseButton.web.js +4 -4
- package/build/lib/web/development/components/Button/BaseButton/StyledBaseButton.web.js.map +1 -1
- package/build/lib/web/development/components/Button/BaseButton/buttonTokens.js +113 -6
- package/build/lib/web/development/components/Button/BaseButton/buttonTokens.js.map +1 -1
- package/build/lib/web/development/components/Button/BaseButton/getStyledBaseButtonStyles.js +2 -1
- package/build/lib/web/development/components/Button/BaseButton/getStyledBaseButtonStyles.js.map +1 -1
- package/build/lib/web/development/components/Button/Button/Button.js +1 -1
- package/build/lib/web/development/components/Button/Button/Button.js.map +1 -1
- package/build/lib/web/development/components/Button/IconButton/IconButton.js +3 -3
- package/build/lib/web/development/components/Button/IconButton/IconButton.js.map +1 -1
- package/build/lib/web/development/components/Button/IconButton/StyledIconButton.web.js +15 -14
- package/build/lib/web/development/components/Button/IconButton/StyledIconButton.web.js.map +1 -1
- package/build/lib/web/development/components/Card/Card.js +8 -5
- package/build/lib/web/development/components/Card/Card.js.map +1 -1
- package/build/lib/web/development/components/Card/CardFooter.js +13 -9
- package/build/lib/web/development/components/Card/CardFooter.js.map +1 -1
- package/build/lib/web/development/components/Card/CardHeader.js +28 -15
- package/build/lib/web/development/components/Card/CardHeader.js.map +1 -1
- package/build/lib/web/development/components/Card/CardRoot.web.js +2 -2
- package/build/lib/web/development/components/Card/CardRoot.web.js.map +1 -1
- package/build/lib/web/development/components/Card/CardSurface.web.js +2 -5
- package/build/lib/web/development/components/Card/CardSurface.web.js.map +1 -1
- package/build/lib/web/development/components/Card/index.js +1 -1
- package/build/lib/web/development/components/Carousel/Carousel.web.js.map +1 -1
- package/build/lib/web/development/components/Carousel/Indicators/getIndicatorButtonStyles.js +9 -9
- package/build/lib/web/development/components/Carousel/Indicators/getIndicatorButtonStyles.js.map +1 -1
- package/build/lib/web/development/components/Carousel/NavigationButton/NavigationButton.js +2 -2
- package/build/lib/web/development/components/Carousel/NavigationButton/NavigationButton.js.map +1 -1
- package/build/lib/web/development/components/Carousel/NavigationButton/getNavigationButtonStyles.js +23 -30
- package/build/lib/web/development/components/Carousel/NavigationButton/getNavigationButtonStyles.js.map +1 -1
- package/build/lib/web/development/components/Checkbox/CheckboxIcon/CheckboxIcon.js +1 -3
- package/build/lib/web/development/components/Checkbox/CheckboxIcon/CheckboxIcon.js.map +1 -1
- package/build/lib/web/development/components/Checkbox/CheckboxIcon/CheckboxIconWrapperStyles.js +2 -2
- package/build/lib/web/development/components/Checkbox/CheckboxIcon/CheckboxIconWrapperStyles.js.map +1 -1
- package/build/lib/web/development/components/Checkbox/checkboxTokens.js +17 -16
- package/build/lib/web/development/components/Checkbox/checkboxTokens.js.map +1 -1
- package/build/lib/web/development/components/Chip/AnimatedChip.web.js +2 -2
- package/build/lib/web/development/components/Chip/AnimatedChip.web.js.map +1 -1
- package/build/lib/web/development/components/Chip/Chip.js +6 -11
- package/build/lib/web/development/components/Chip/Chip.js.map +1 -1
- package/build/lib/web/development/components/Chip/ChipGroup.js +3 -5
- package/build/lib/web/development/components/Chip/ChipGroup.js.map +1 -1
- package/build/lib/web/development/components/Chip/StyledChipWrapper.web.js +2 -2
- package/build/lib/web/development/components/Chip/StyledChipWrapper.web.js.map +1 -1
- package/build/lib/web/development/components/Chip/chipTokens.js +38 -38
- package/build/lib/web/development/components/Chip/chipTokens.js.map +1 -1
- package/build/lib/web/development/components/Chip/getAnimatedChipStyles.js +1 -1
- package/build/lib/web/development/components/Chip/getAnimatedChipStyles.js.map +1 -1
- package/build/lib/web/development/components/Chip/useChipGroup.js +1 -3
- package/build/lib/web/development/components/Chip/useChipGroup.js.map +1 -1
- package/build/lib/web/development/components/Counter/Counter.js +25 -44
- package/build/lib/web/development/components/Counter/Counter.js.map +1 -1
- package/build/lib/web/development/components/Counter/counterTokens.js +5 -5
- package/build/lib/web/development/components/Counter/counterTokens.js.map +1 -1
- package/build/lib/web/development/components/Divider/Divider.js +6 -8
- package/build/lib/web/development/components/Divider/Divider.js.map +1 -1
- package/build/lib/web/development/components/Dropdown/Dropdown.js +1 -5
- package/build/lib/web/development/components/Dropdown/Dropdown.js.map +1 -1
- package/build/lib/web/development/components/Dropdown/StyledDropdownOverlay.js +2 -2
- package/build/lib/web/development/components/Dropdown/StyledDropdownOverlay.js.map +1 -1
- package/build/lib/web/development/components/Form/CharacterCounter/CharacterCounter.js +1 -1
- package/build/lib/web/development/components/Form/CharacterCounter/CharacterCounter.js.map +1 -1
- package/build/lib/web/development/components/Form/FormHint.js +11 -13
- package/build/lib/web/development/components/Form/FormHint.js.map +1 -1
- package/build/lib/web/development/components/Form/FormLabel.js +9 -17
- package/build/lib/web/development/components/Form/FormLabel.js.map +1 -1
- package/build/lib/web/development/components/Form/Selector/SelectorInput.web.js +5 -5
- package/build/lib/web/development/components/Form/Selector/SelectorInput.web.js.map +1 -1
- package/build/lib/web/development/components/Form/Selector/SelectorSupportText.js +16 -11
- package/build/lib/web/development/components/Form/Selector/SelectorSupportText.js.map +1 -1
- package/build/lib/web/development/components/Form/Selector/SelectorTitle.js +5 -16
- package/build/lib/web/development/components/Form/Selector/SelectorTitle.js.map +1 -1
- package/build/lib/web/development/components/Icons/_Svg/Circle/Circle.web.js +4 -2
- package/build/lib/web/development/components/Icons/_Svg/Circle/Circle.web.js.map +1 -1
- package/build/lib/web/development/components/Icons/_Svg/Rect/Rect.web.js +4 -2
- package/build/lib/web/development/components/Icons/_Svg/Rect/Rect.web.js.map +1 -1
- package/build/lib/web/development/components/Icons/_Svg/Svg/Svg.web.js +4 -2
- package/build/lib/web/development/components/Icons/_Svg/Svg/Svg.web.js.map +1 -1
- package/build/lib/web/development/components/Icons/useIconProps/useIconProps.js +1 -1
- package/build/lib/web/development/components/Icons/useIconProps/useIconProps.js.map +1 -1
- package/build/lib/web/development/components/Indicator/Indicator.js +9 -16
- package/build/lib/web/development/components/Indicator/Indicator.js.map +1 -1
- package/build/lib/web/development/components/Input/BaseInput/AnimatedBaseInputWrapper.web.js +3 -3
- package/build/lib/web/development/components/Input/BaseInput/AnimatedBaseInputWrapper.web.js.map +1 -1
- package/build/lib/web/development/components/Input/BaseInput/BaseInputAnimatedBorder.web.js +2 -2
- package/build/lib/web/development/components/Input/BaseInput/BaseInputAnimatedBorder.web.js.map +1 -1
- package/build/lib/web/development/components/Input/BaseInput/BaseInputTagSlot.web.js +4 -1
- package/build/lib/web/development/components/Input/BaseInput/BaseInputTagSlot.web.js.map +1 -1
- package/build/lib/web/development/components/Input/BaseInput/BaseInputVisuals.js +4 -6
- package/build/lib/web/development/components/Input/BaseInput/BaseInputVisuals.js.map +1 -1
- package/build/lib/web/development/components/Input/BaseInput/BaseInputWrapper.js.map +1 -1
- package/build/lib/web/development/components/Input/BaseInput/StyledBaseInput.web.js +3 -4
- package/build/lib/web/development/components/Input/BaseInput/StyledBaseInput.web.js.map +1 -1
- package/build/lib/web/development/components/Input/BaseInput/baseInputStyles.js +11 -12
- package/build/lib/web/development/components/Input/BaseInput/baseInputStyles.js.map +1 -1
- package/build/lib/web/development/components/Input/DropdownInputTriggers/Chevron.js +1 -1
- package/build/lib/web/development/components/Input/DropdownInputTriggers/Chevron.js.map +1 -1
- package/build/lib/web/development/components/Link/BaseLink/BaseLink.js +20 -32
- package/build/lib/web/development/components/Link/BaseLink/BaseLink.js.map +1 -1
- package/build/lib/web/development/components/Link/Link/Link.js +1 -1
- package/build/lib/web/development/components/Link/Link/Link.js.map +1 -1
- package/build/lib/web/development/components/List/List.js +1 -3
- package/build/lib/web/development/components/List/List.js.map +1 -1
- package/build/lib/web/development/components/List/ListItem.js +3 -3
- package/build/lib/web/development/components/List/ListItem.js.map +1 -1
- package/build/lib/web/development/components/List/ListItemIcons.js +11 -7
- package/build/lib/web/development/components/List/ListItemIcons.js.map +1 -1
- package/build/lib/web/development/components/Modal/Modal.web.js +1 -1
- package/build/lib/web/development/components/Modal/Modal.web.js.map +1 -1
- package/build/lib/web/development/components/Modal/ModalBackdrop.js +1 -1
- package/build/lib/web/development/components/Modal/ModalBackdrop.js.map +1 -1
- package/build/lib/web/development/components/Modal/ModalHeader.web.js +1 -5
- package/build/lib/web/development/components/Modal/ModalHeader.web.js.map +1 -1
- package/build/lib/web/development/components/Popover/Popover.web.js +2 -2
- package/build/lib/web/development/components/Popover/Popover.web.js.map +1 -1
- package/build/lib/web/development/components/Popover/PopoverContent.js +4 -5
- package/build/lib/web/development/components/Popover/PopoverContent.js.map +1 -1
- package/build/lib/web/development/components/Popover/PopoverInteractiveWrapper.web.js +5 -5
- package/build/lib/web/development/components/Popover/PopoverInteractiveWrapper.web.js.map +1 -1
- package/build/lib/web/development/components/Popover/getPopoverContentWrapperStyles.js +2 -2
- package/build/lib/web/development/components/Popover/getPopoverContentWrapperStyles.js.map +1 -1
- package/build/lib/web/development/components/ProgressBar/ProgressBar.js +9 -13
- package/build/lib/web/development/components/ProgressBar/ProgressBar.js.map +1 -1
- package/build/lib/web/development/components/Radio/Radio.js +1 -0
- package/build/lib/web/development/components/Radio/Radio.js.map +1 -1
- package/build/lib/web/development/components/Radio/RadioIcon/RadioIcon.js +2 -1
- package/build/lib/web/development/components/Radio/RadioIcon/RadioIcon.js.map +1 -1
- package/build/lib/web/development/components/Radio/RadioIcon/RadioIconWrapperStyles.js +2 -2
- package/build/lib/web/development/components/Radio/RadioIcon/RadioIconWrapperStyles.js.map +1 -1
- package/build/lib/web/development/components/Radio/radioTokens.js +23 -22
- package/build/lib/web/development/components/Radio/radioTokens.js.map +1 -1
- package/build/lib/web/development/components/Skeleton/PulseAnimation.web.js +4 -7
- package/build/lib/web/development/components/Skeleton/PulseAnimation.web.js.map +1 -1
- package/build/lib/web/development/components/Skeleton/Skeleton.js +3 -6
- package/build/lib/web/development/components/Skeleton/Skeleton.js.map +1 -1
- package/build/lib/web/development/components/Spinner/BaseSpinner/BaseSpinner.js +9 -14
- package/build/lib/web/development/components/Spinner/BaseSpinner/BaseSpinner.js.map +1 -1
- package/build/lib/web/development/components/Spinner/Spinner/Spinner.js +2 -5
- package/build/lib/web/development/components/Spinner/Spinner/Spinner.js.map +1 -1
- package/build/lib/web/development/components/SpotlightPopoverTour/TourFooter.web.js +1 -1
- package/build/lib/web/development/components/SpotlightPopoverTour/TourFooter.web.js.map +1 -1
- package/build/lib/web/development/components/SpotlightPopoverTour/TourMask.web.js +2 -2
- package/build/lib/web/development/components/SpotlightPopoverTour/TourMask.web.js.map +1 -1
- package/build/lib/web/development/components/SpotlightPopoverTour/TourPopover.web.js +2 -2
- package/build/lib/web/development/components/SpotlightPopoverTour/TourPopover.web.js.map +1 -1
- package/build/lib/web/development/components/Switch/switchTokens.js +10 -10
- package/build/lib/web/development/components/Switch/switchTokens.js.map +1 -1
- package/build/lib/web/development/components/Table/Table.web.js +9 -9
- package/build/lib/web/development/components/Table/Table.web.js.map +1 -1
- package/build/lib/web/development/components/Table/TableBody.web.js +14 -12
- package/build/lib/web/development/components/Table/TableBody.web.js.map +1 -1
- package/build/lib/web/development/components/Table/TableContext.js +2 -2
- package/build/lib/web/development/components/Table/TableContext.js.map +1 -1
- package/build/lib/web/development/components/Table/TableFooter.web.js +7 -7
- package/build/lib/web/development/components/Table/TableFooter.web.js.map +1 -1
- package/build/lib/web/development/components/Table/TableHeader.web.js +18 -16
- package/build/lib/web/development/components/Table/TableHeader.web.js.map +1 -1
- package/build/lib/web/development/components/Table/TablePagination.web.js +6 -5
- package/build/lib/web/development/components/Table/TablePagination.web.js.map +1 -1
- package/build/lib/web/development/components/Table/TableToolbar.web.js +4 -3
- package/build/lib/web/development/components/Table/TableToolbar.web.js.map +1 -1
- package/build/lib/web/development/components/Table/tokens.js +41 -43
- package/build/lib/web/development/components/Table/tokens.js.map +1 -1
- package/build/lib/web/development/components/Tabs/TabIndicator.web.js +7 -6
- package/build/lib/web/development/components/Tabs/TabIndicator.web.js.map +1 -1
- package/build/lib/web/development/components/Tabs/TabItem.web.js +17 -14
- package/build/lib/web/development/components/Tabs/TabItem.web.js.map +1 -1
- package/build/lib/web/development/components/Tabs/TabList.web.js +7 -5
- package/build/lib/web/development/components/Tabs/TabList.web.js.map +1 -1
- package/build/lib/web/development/components/Tabs/tabTokens.js +38 -41
- package/build/lib/web/development/components/Tabs/tabTokens.js.map +1 -1
- package/build/lib/web/development/components/Tag/Tag.js +7 -5
- package/build/lib/web/development/components/Tag/Tag.js.map +1 -1
- package/build/lib/web/development/components/Tooltip/Tooltip.web.js +2 -2
- package/build/lib/web/development/components/Tooltip/Tooltip.web.js.map +1 -1
- package/build/lib/web/development/components/Tooltip/TooltipContent.js +3 -4
- package/build/lib/web/development/components/Tooltip/TooltipContent.js.map +1 -1
- package/build/lib/web/development/components/Tooltip/getTooltipContentWrapperStyles.js +2 -2
- package/build/lib/web/development/components/Tooltip/getTooltipContentWrapperStyles.js.map +1 -1
- package/build/lib/web/development/components/Typography/BaseText/BaseText.web.js +10 -2
- package/build/lib/web/development/components/Typography/BaseText/BaseText.web.js.map +1 -1
- package/build/lib/web/development/components/Typography/BaseText/getBaseTextStyles.js +10 -2
- package/build/lib/web/development/components/Typography/BaseText/getBaseTextStyles.js.map +1 -1
- package/build/lib/web/development/components/Typography/Code/Code.js +3 -3
- package/build/lib/web/development/components/Typography/Code/Code.js.map +1 -1
- package/build/lib/web/development/components/Typography/Display/Display.js +23 -25
- package/build/lib/web/development/components/Typography/Display/Display.js.map +1 -1
- package/build/lib/web/development/components/Typography/Heading/Heading.js +30 -61
- package/build/lib/web/development/components/Typography/Heading/Heading.js.map +1 -1
- package/build/lib/web/development/components/Typography/Text/Text.js +26 -24
- package/build/lib/web/development/components/Typography/Text/Text.js.map +1 -1
- package/build/lib/web/development/components/Typography/Text/getTextStyles.js +3 -5
- package/build/lib/web/development/components/Typography/Text/getTextStyles.js.map +1 -1
- package/build/lib/web/development/components/Typography/index.js +0 -1
- package/build/lib/web/development/components/Typography/index.js.map +1 -1
- package/build/lib/web/development/components/index.js +56 -57
- package/build/lib/web/development/components/index.js.map +1 -1
- package/build/lib/web/development/tokens/global/border.js +3 -0
- package/build/lib/web/development/tokens/global/border.js.map +1 -1
- package/build/lib/web/development/tokens/global/colors.js +227 -250
- package/build/lib/web/development/tokens/global/colors.js.map +1 -1
- package/build/lib/web/development/tokens/global/elevation/elevation.web.js +6 -6
- package/build/lib/web/development/tokens/global/elevation/elevation.web.js.map +1 -1
- package/build/lib/web/development/tokens/global/fontFamily/fontFamily.web.js +3 -2
- package/build/lib/web/development/tokens/global/fontFamily/fontFamily.web.js.map +1 -1
- package/build/lib/web/development/tokens/global/motion.js.map +1 -1
- package/build/lib/web/development/tokens/global/opacity.js +12 -9
- package/build/lib/web/development/tokens/global/opacity.js.map +1 -1
- package/build/lib/web/development/tokens/global/typography.js +37 -40
- package/build/lib/web/development/tokens/global/typography.js.map +1 -1
- package/build/lib/web/development/tokens/index.js +1 -2
- package/build/lib/web/development/tokens/index.js.map +1 -1
- package/build/lib/web/development/tokens/theme/bladeTheme.js +925 -0
- package/build/lib/web/development/tokens/theme/bladeTheme.js.map +1 -0
- package/build/lib/web/development/tokens/theme/createTheme.js +123 -177
- package/build/lib/web/development/tokens/theme/createTheme.js.map +1 -1
- package/build/lib/web/development/tokens/theme/index.js +1 -2
- package/build/lib/web/development/tokens/theme/index.js.map +1 -1
- package/build/lib/web/development/tokens/theme/overrideTheme.js +4 -4
- package/build/lib/web/development/tokens/theme/overrideTheme.js.map +1 -1
- package/build/lib/web/development/tokens/theme/theme.js +1 -7
- package/build/lib/web/development/tokens/theme/theme.js.map +1 -1
- package/build/lib/web/development/utils/getFocusRingStyles/getFocusRingStyles.web.js +26 -0
- package/build/lib/web/development/utils/getFocusRingStyles/getFocusRingStyles.web.js.map +1 -0
- package/build/lib/web/development/utils/getFocusRingStyles/index.js +2 -0
- package/build/lib/web/development/utils/lodashButBetter/get.js +8 -0
- package/build/lib/web/development/utils/lodashButBetter/get.js.map +1 -1
- package/build/lib/web/development/utils/lodashButBetter/isEmpty.js.map +1 -1
- package/build/lib/web/development/utils/makeLetterSpacing/index.js +2 -0
- package/build/lib/web/development/utils/makeLetterSpacing/makeLetterSpacing.js +7 -0
- package/build/lib/web/development/utils/makeLetterSpacing/makeLetterSpacing.js.map +1 -0
- package/build/lib/web/development/utils/objectKeysWithType.js +7 -0
- package/build/lib/web/development/utils/objectKeysWithType.js.map +1 -0
- package/build/lib/web/development/utils/useInteraction.js +3 -3
- package/build/lib/web/development/utils/useInteraction.js.map +1 -1
- package/build/lib/web/production/components/Accordion/AccordionButton.web.js +8 -6
- package/build/lib/web/production/components/Accordion/AccordionButton.web.js.map +1 -1
- package/build/lib/web/production/components/Accordion/AccordionItem.js +1 -1
- package/build/lib/web/production/components/Accordion/AccordionItem.js.map +1 -1
- package/build/lib/web/production/components/Accordion/StyledAccordionButton.web.js +10 -11
- package/build/lib/web/production/components/Accordion/StyledAccordionButton.web.js.map +1 -1
- package/build/lib/web/production/components/Accordion/commonStyles.js +3 -6
- package/build/lib/web/production/components/Accordion/commonStyles.js.map +1 -1
- package/build/lib/web/production/components/ActionList/ActionList.js +21 -48
- package/build/lib/web/production/components/ActionList/ActionList.js.map +1 -1
- package/build/lib/web/production/components/ActionList/ActionListItem.js +6 -12
- package/build/lib/web/production/components/ActionList/ActionListItem.js.map +1 -1
- package/build/lib/web/production/components/ActionList/ActionListNoResults.js +3 -3
- package/build/lib/web/production/components/ActionList/ActionListNoResults.js.map +1 -1
- package/build/lib/web/production/components/ActionList/actionListUtils.js +3 -3
- package/build/lib/web/production/components/ActionList/actionListUtils.js.map +1 -1
- package/build/lib/web/production/components/ActionList/index.js +1 -1
- package/build/lib/web/production/components/ActionList/styles/StyledActionListItem.web.js +6 -3
- package/build/lib/web/production/components/ActionList/styles/StyledActionListItem.web.js.map +1 -1
- package/build/lib/web/production/components/Alert/Alert.js +36 -52
- package/build/lib/web/production/components/Alert/Alert.js.map +1 -1
- package/build/lib/web/production/components/Alert/styles.js +3 -7
- package/build/lib/web/production/components/Alert/styles.js.map +1 -1
- package/build/lib/web/production/components/Amount/Amount.js +141 -76
- package/build/lib/web/production/components/Amount/Amount.js.map +1 -1
- package/build/lib/web/production/components/Amount/amountTokens.js +67 -34
- package/build/lib/web/production/components/Amount/amountTokens.js.map +1 -1
- package/build/lib/web/production/components/Badge/Badge.js +26 -35
- package/build/lib/web/production/components/Badge/Badge.js.map +1 -1
- package/build/lib/web/production/components/Badge/badgeTokens.js +7 -5
- package/build/lib/web/production/components/Badge/badgeTokens.js.map +1 -1
- package/build/lib/web/production/components/BaseHeaderFooter/BaseHeader.js +7 -7
- package/build/lib/web/production/components/BaseHeaderFooter/BaseHeader.js.map +1 -1
- package/build/lib/web/production/components/BottomSheet/BottomSheet.web.js +3 -3
- package/build/lib/web/production/components/BottomSheet/BottomSheet.web.js.map +1 -1
- package/build/lib/web/production/components/BottomSheet/BottomSheetBackdrop.web.js +1 -5
- package/build/lib/web/production/components/BottomSheet/BottomSheetBackdrop.web.js.map +1 -1
- package/build/lib/web/production/components/BottomSheet/BottomSheetCommon.js +1 -5
- package/build/lib/web/production/components/BottomSheet/BottomSheetCommon.js.map +1 -1
- package/build/lib/web/production/components/BottomSheet/BottomSheetFooter.web.js +1 -5
- package/build/lib/web/production/components/BottomSheet/BottomSheetFooter.web.js.map +1 -1
- package/build/lib/web/production/components/BottomSheet/getBottomSheetGrabHandleStyles.js +1 -1
- package/build/lib/web/production/components/BottomSheet/getBottomSheetGrabHandleStyles.js.map +1 -1
- package/build/lib/web/production/components/Box/BaseBox/baseBoxStyles.js +15 -4
- package/build/lib/web/production/components/Box/BaseBox/baseBoxStyles.js.map +1 -1
- package/build/lib/web/production/components/Box/BaseBox/getResponsiveValue.web.js.map +1 -1
- package/build/lib/web/production/components/Box/BaseBox/types/propsTypes.js.map +1 -1
- package/build/lib/web/production/components/Button/BaseButton/BaseButton.js +103 -91
- package/build/lib/web/production/components/Button/BaseButton/BaseButton.js.map +1 -1
- package/build/lib/web/production/components/Button/BaseButton/StyledBaseButton.web.js +4 -4
- package/build/lib/web/production/components/Button/BaseButton/StyledBaseButton.web.js.map +1 -1
- package/build/lib/web/production/components/Button/BaseButton/buttonTokens.js +113 -6
- package/build/lib/web/production/components/Button/BaseButton/buttonTokens.js.map +1 -1
- package/build/lib/web/production/components/Button/BaseButton/getStyledBaseButtonStyles.js +2 -1
- package/build/lib/web/production/components/Button/BaseButton/getStyledBaseButtonStyles.js.map +1 -1
- package/build/lib/web/production/components/Button/Button/Button.js +1 -1
- package/build/lib/web/production/components/Button/Button/Button.js.map +1 -1
- package/build/lib/web/production/components/Button/IconButton/IconButton.js +3 -3
- package/build/lib/web/production/components/Button/IconButton/IconButton.js.map +1 -1
- package/build/lib/web/production/components/Button/IconButton/StyledIconButton.web.js +15 -14
- package/build/lib/web/production/components/Button/IconButton/StyledIconButton.web.js.map +1 -1
- package/build/lib/web/production/components/Card/Card.js +8 -5
- package/build/lib/web/production/components/Card/Card.js.map +1 -1
- package/build/lib/web/production/components/Card/CardFooter.js +13 -9
- package/build/lib/web/production/components/Card/CardFooter.js.map +1 -1
- package/build/lib/web/production/components/Card/CardHeader.js +28 -15
- package/build/lib/web/production/components/Card/CardHeader.js.map +1 -1
- package/build/lib/web/production/components/Card/CardRoot.web.js +2 -2
- package/build/lib/web/production/components/Card/CardRoot.web.js.map +1 -1
- package/build/lib/web/production/components/Card/CardSurface.web.js +2 -5
- package/build/lib/web/production/components/Card/CardSurface.web.js.map +1 -1
- package/build/lib/web/production/components/Card/index.js +1 -1
- package/build/lib/web/production/components/Carousel/Carousel.web.js.map +1 -1
- package/build/lib/web/production/components/Carousel/Indicators/getIndicatorButtonStyles.js +9 -9
- package/build/lib/web/production/components/Carousel/Indicators/getIndicatorButtonStyles.js.map +1 -1
- package/build/lib/web/production/components/Carousel/NavigationButton/NavigationButton.js +2 -2
- package/build/lib/web/production/components/Carousel/NavigationButton/NavigationButton.js.map +1 -1
- package/build/lib/web/production/components/Carousel/NavigationButton/getNavigationButtonStyles.js +23 -30
- package/build/lib/web/production/components/Carousel/NavigationButton/getNavigationButtonStyles.js.map +1 -1
- package/build/lib/web/production/components/Checkbox/CheckboxIcon/CheckboxIcon.js +1 -3
- package/build/lib/web/production/components/Checkbox/CheckboxIcon/CheckboxIcon.js.map +1 -1
- package/build/lib/web/production/components/Checkbox/CheckboxIcon/CheckboxIconWrapperStyles.js +2 -2
- package/build/lib/web/production/components/Checkbox/CheckboxIcon/CheckboxIconWrapperStyles.js.map +1 -1
- package/build/lib/web/production/components/Checkbox/checkboxTokens.js +17 -16
- package/build/lib/web/production/components/Checkbox/checkboxTokens.js.map +1 -1
- package/build/lib/web/production/components/Chip/AnimatedChip.web.js +2 -2
- package/build/lib/web/production/components/Chip/AnimatedChip.web.js.map +1 -1
- package/build/lib/web/production/components/Chip/Chip.js +6 -11
- package/build/lib/web/production/components/Chip/Chip.js.map +1 -1
- package/build/lib/web/production/components/Chip/ChipGroup.js +3 -5
- package/build/lib/web/production/components/Chip/ChipGroup.js.map +1 -1
- package/build/lib/web/production/components/Chip/StyledChipWrapper.web.js +2 -2
- package/build/lib/web/production/components/Chip/StyledChipWrapper.web.js.map +1 -1
- package/build/lib/web/production/components/Chip/chipTokens.js +38 -38
- package/build/lib/web/production/components/Chip/chipTokens.js.map +1 -1
- package/build/lib/web/production/components/Chip/getAnimatedChipStyles.js +1 -1
- package/build/lib/web/production/components/Chip/getAnimatedChipStyles.js.map +1 -1
- package/build/lib/web/production/components/Chip/useChipGroup.js +1 -3
- package/build/lib/web/production/components/Chip/useChipGroup.js.map +1 -1
- package/build/lib/web/production/components/Counter/Counter.js +25 -44
- package/build/lib/web/production/components/Counter/Counter.js.map +1 -1
- package/build/lib/web/production/components/Counter/counterTokens.js +5 -5
- package/build/lib/web/production/components/Counter/counterTokens.js.map +1 -1
- package/build/lib/web/production/components/Divider/Divider.js +6 -8
- package/build/lib/web/production/components/Divider/Divider.js.map +1 -1
- package/build/lib/web/production/components/Dropdown/Dropdown.js +1 -5
- package/build/lib/web/production/components/Dropdown/Dropdown.js.map +1 -1
- package/build/lib/web/production/components/Dropdown/StyledDropdownOverlay.js +2 -2
- package/build/lib/web/production/components/Dropdown/StyledDropdownOverlay.js.map +1 -1
- package/build/lib/web/production/components/Form/CharacterCounter/CharacterCounter.js +1 -1
- package/build/lib/web/production/components/Form/CharacterCounter/CharacterCounter.js.map +1 -1
- package/build/lib/web/production/components/Form/FormHint.js +11 -13
- package/build/lib/web/production/components/Form/FormHint.js.map +1 -1
- package/build/lib/web/production/components/Form/FormLabel.js +9 -17
- package/build/lib/web/production/components/Form/FormLabel.js.map +1 -1
- package/build/lib/web/production/components/Form/Selector/SelectorInput.web.js +5 -5
- package/build/lib/web/production/components/Form/Selector/SelectorInput.web.js.map +1 -1
- package/build/lib/web/production/components/Form/Selector/SelectorSupportText.js +16 -11
- package/build/lib/web/production/components/Form/Selector/SelectorSupportText.js.map +1 -1
- package/build/lib/web/production/components/Form/Selector/SelectorTitle.js +5 -16
- package/build/lib/web/production/components/Form/Selector/SelectorTitle.js.map +1 -1
- package/build/lib/web/production/components/Icons/_Svg/Circle/Circle.web.js +4 -2
- package/build/lib/web/production/components/Icons/_Svg/Circle/Circle.web.js.map +1 -1
- package/build/lib/web/production/components/Icons/_Svg/Rect/Rect.web.js +4 -2
- package/build/lib/web/production/components/Icons/_Svg/Rect/Rect.web.js.map +1 -1
- package/build/lib/web/production/components/Icons/_Svg/Svg/Svg.web.js +4 -2
- package/build/lib/web/production/components/Icons/_Svg/Svg/Svg.web.js.map +1 -1
- package/build/lib/web/production/components/Icons/useIconProps/useIconProps.js +1 -1
- package/build/lib/web/production/components/Icons/useIconProps/useIconProps.js.map +1 -1
- package/build/lib/web/production/components/Indicator/Indicator.js +9 -16
- package/build/lib/web/production/components/Indicator/Indicator.js.map +1 -1
- package/build/lib/web/production/components/Input/BaseInput/AnimatedBaseInputWrapper.web.js +3 -3
- package/build/lib/web/production/components/Input/BaseInput/AnimatedBaseInputWrapper.web.js.map +1 -1
- package/build/lib/web/production/components/Input/BaseInput/BaseInputAnimatedBorder.web.js +2 -2
- package/build/lib/web/production/components/Input/BaseInput/BaseInputAnimatedBorder.web.js.map +1 -1
- package/build/lib/web/production/components/Input/BaseInput/BaseInputTagSlot.web.js +4 -1
- package/build/lib/web/production/components/Input/BaseInput/BaseInputTagSlot.web.js.map +1 -1
- package/build/lib/web/production/components/Input/BaseInput/BaseInputVisuals.js +4 -6
- package/build/lib/web/production/components/Input/BaseInput/BaseInputVisuals.js.map +1 -1
- package/build/lib/web/production/components/Input/BaseInput/BaseInputWrapper.js.map +1 -1
- package/build/lib/web/production/components/Input/BaseInput/StyledBaseInput.web.js +3 -4
- package/build/lib/web/production/components/Input/BaseInput/StyledBaseInput.web.js.map +1 -1
- package/build/lib/web/production/components/Input/BaseInput/baseInputStyles.js +11 -12
- package/build/lib/web/production/components/Input/BaseInput/baseInputStyles.js.map +1 -1
- package/build/lib/web/production/components/Input/DropdownInputTriggers/Chevron.js +1 -1
- package/build/lib/web/production/components/Input/DropdownInputTriggers/Chevron.js.map +1 -1
- package/build/lib/web/production/components/Link/BaseLink/BaseLink.js +20 -32
- package/build/lib/web/production/components/Link/BaseLink/BaseLink.js.map +1 -1
- package/build/lib/web/production/components/Link/Link/Link.js +1 -1
- package/build/lib/web/production/components/Link/Link/Link.js.map +1 -1
- package/build/lib/web/production/components/List/List.js +1 -3
- package/build/lib/web/production/components/List/List.js.map +1 -1
- package/build/lib/web/production/components/List/ListItem.js +3 -3
- package/build/lib/web/production/components/List/ListItem.js.map +1 -1
- package/build/lib/web/production/components/List/ListItemIcons.js +11 -7
- package/build/lib/web/production/components/List/ListItemIcons.js.map +1 -1
- package/build/lib/web/production/components/Modal/Modal.web.js +1 -1
- package/build/lib/web/production/components/Modal/Modal.web.js.map +1 -1
- package/build/lib/web/production/components/Modal/ModalBackdrop.js +1 -1
- package/build/lib/web/production/components/Modal/ModalBackdrop.js.map +1 -1
- package/build/lib/web/production/components/Modal/ModalHeader.web.js +1 -5
- package/build/lib/web/production/components/Modal/ModalHeader.web.js.map +1 -1
- package/build/lib/web/production/components/Popover/Popover.web.js +2 -2
- package/build/lib/web/production/components/Popover/Popover.web.js.map +1 -1
- package/build/lib/web/production/components/Popover/PopoverContent.js +4 -5
- package/build/lib/web/production/components/Popover/PopoverContent.js.map +1 -1
- package/build/lib/web/production/components/Popover/PopoverInteractiveWrapper.web.js +5 -5
- package/build/lib/web/production/components/Popover/PopoverInteractiveWrapper.web.js.map +1 -1
- package/build/lib/web/production/components/Popover/getPopoverContentWrapperStyles.js +2 -2
- package/build/lib/web/production/components/Popover/getPopoverContentWrapperStyles.js.map +1 -1
- package/build/lib/web/production/components/ProgressBar/ProgressBar.js +9 -13
- package/build/lib/web/production/components/ProgressBar/ProgressBar.js.map +1 -1
- package/build/lib/web/production/components/Radio/Radio.js +1 -0
- package/build/lib/web/production/components/Radio/Radio.js.map +1 -1
- package/build/lib/web/production/components/Radio/RadioIcon/RadioIcon.js +2 -1
- package/build/lib/web/production/components/Radio/RadioIcon/RadioIcon.js.map +1 -1
- package/build/lib/web/production/components/Radio/RadioIcon/RadioIconWrapperStyles.js +2 -2
- package/build/lib/web/production/components/Radio/RadioIcon/RadioIconWrapperStyles.js.map +1 -1
- package/build/lib/web/production/components/Radio/radioTokens.js +23 -22
- package/build/lib/web/production/components/Radio/radioTokens.js.map +1 -1
- package/build/lib/web/production/components/Skeleton/PulseAnimation.web.js +4 -7
- package/build/lib/web/production/components/Skeleton/PulseAnimation.web.js.map +1 -1
- package/build/lib/web/production/components/Skeleton/Skeleton.js +3 -6
- package/build/lib/web/production/components/Skeleton/Skeleton.js.map +1 -1
- package/build/lib/web/production/components/Spinner/BaseSpinner/BaseSpinner.js +9 -14
- package/build/lib/web/production/components/Spinner/BaseSpinner/BaseSpinner.js.map +1 -1
- package/build/lib/web/production/components/Spinner/Spinner/Spinner.js +2 -5
- package/build/lib/web/production/components/Spinner/Spinner/Spinner.js.map +1 -1
- package/build/lib/web/production/components/SpotlightPopoverTour/TourFooter.web.js +1 -1
- package/build/lib/web/production/components/SpotlightPopoverTour/TourFooter.web.js.map +1 -1
- package/build/lib/web/production/components/SpotlightPopoverTour/TourMask.web.js +2 -2
- package/build/lib/web/production/components/SpotlightPopoverTour/TourMask.web.js.map +1 -1
- package/build/lib/web/production/components/SpotlightPopoverTour/TourPopover.web.js +2 -2
- package/build/lib/web/production/components/SpotlightPopoverTour/TourPopover.web.js.map +1 -1
- package/build/lib/web/production/components/Switch/switchTokens.js +10 -10
- package/build/lib/web/production/components/Switch/switchTokens.js.map +1 -1
- package/build/lib/web/production/components/Table/Table.web.js +9 -9
- package/build/lib/web/production/components/Table/Table.web.js.map +1 -1
- package/build/lib/web/production/components/Table/TableBody.web.js +14 -12
- package/build/lib/web/production/components/Table/TableBody.web.js.map +1 -1
- package/build/lib/web/production/components/Table/TableContext.js +2 -2
- package/build/lib/web/production/components/Table/TableContext.js.map +1 -1
- package/build/lib/web/production/components/Table/TableFooter.web.js +7 -7
- package/build/lib/web/production/components/Table/TableFooter.web.js.map +1 -1
- package/build/lib/web/production/components/Table/TableHeader.web.js +18 -16
- package/build/lib/web/production/components/Table/TableHeader.web.js.map +1 -1
- package/build/lib/web/production/components/Table/TablePagination.web.js +6 -5
- package/build/lib/web/production/components/Table/TablePagination.web.js.map +1 -1
- package/build/lib/web/production/components/Table/TableToolbar.web.js +4 -3
- package/build/lib/web/production/components/Table/TableToolbar.web.js.map +1 -1
- package/build/lib/web/production/components/Table/tokens.js +41 -43
- package/build/lib/web/production/components/Table/tokens.js.map +1 -1
- package/build/lib/web/production/components/Tabs/TabIndicator.web.js +7 -6
- package/build/lib/web/production/components/Tabs/TabIndicator.web.js.map +1 -1
- package/build/lib/web/production/components/Tabs/TabItem.web.js +17 -14
- package/build/lib/web/production/components/Tabs/TabItem.web.js.map +1 -1
- package/build/lib/web/production/components/Tabs/TabList.web.js +7 -5
- package/build/lib/web/production/components/Tabs/TabList.web.js.map +1 -1
- package/build/lib/web/production/components/Tabs/tabTokens.js +38 -41
- package/build/lib/web/production/components/Tabs/tabTokens.js.map +1 -1
- package/build/lib/web/production/components/Tag/Tag.js +7 -5
- package/build/lib/web/production/components/Tag/Tag.js.map +1 -1
- package/build/lib/web/production/components/Tooltip/Tooltip.web.js +2 -2
- package/build/lib/web/production/components/Tooltip/Tooltip.web.js.map +1 -1
- package/build/lib/web/production/components/Tooltip/TooltipContent.js +3 -4
- package/build/lib/web/production/components/Tooltip/TooltipContent.js.map +1 -1
- package/build/lib/web/production/components/Tooltip/getTooltipContentWrapperStyles.js +2 -2
- package/build/lib/web/production/components/Tooltip/getTooltipContentWrapperStyles.js.map +1 -1
- package/build/lib/web/production/components/Typography/BaseText/BaseText.web.js +10 -2
- package/build/lib/web/production/components/Typography/BaseText/BaseText.web.js.map +1 -1
- package/build/lib/web/production/components/Typography/BaseText/getBaseTextStyles.js +10 -2
- package/build/lib/web/production/components/Typography/BaseText/getBaseTextStyles.js.map +1 -1
- package/build/lib/web/production/components/Typography/Code/Code.js +3 -3
- package/build/lib/web/production/components/Typography/Code/Code.js.map +1 -1
- package/build/lib/web/production/components/Typography/Display/Display.js +23 -25
- package/build/lib/web/production/components/Typography/Display/Display.js.map +1 -1
- package/build/lib/web/production/components/Typography/Heading/Heading.js +30 -61
- package/build/lib/web/production/components/Typography/Heading/Heading.js.map +1 -1
- package/build/lib/web/production/components/Typography/Text/Text.js +26 -24
- package/build/lib/web/production/components/Typography/Text/Text.js.map +1 -1
- package/build/lib/web/production/components/Typography/Text/getTextStyles.js +3 -5
- package/build/lib/web/production/components/Typography/Text/getTextStyles.js.map +1 -1
- package/build/lib/web/production/components/Typography/index.js +0 -1
- package/build/lib/web/production/components/Typography/index.js.map +1 -1
- package/build/lib/web/production/components/index.js +56 -57
- package/build/lib/web/production/components/index.js.map +1 -1
- package/build/lib/web/production/tokens/global/border.js +3 -0
- package/build/lib/web/production/tokens/global/border.js.map +1 -1
- package/build/lib/web/production/tokens/global/colors.js +227 -250
- package/build/lib/web/production/tokens/global/colors.js.map +1 -1
- package/build/lib/web/production/tokens/global/elevation/elevation.web.js +6 -6
- package/build/lib/web/production/tokens/global/elevation/elevation.web.js.map +1 -1
- package/build/lib/web/production/tokens/global/fontFamily/fontFamily.web.js +3 -2
- package/build/lib/web/production/tokens/global/fontFamily/fontFamily.web.js.map +1 -1
- package/build/lib/web/production/tokens/global/motion.js.map +1 -1
- package/build/lib/web/production/tokens/global/opacity.js +12 -9
- package/build/lib/web/production/tokens/global/opacity.js.map +1 -1
- package/build/lib/web/production/tokens/global/typography.js +37 -40
- package/build/lib/web/production/tokens/global/typography.js.map +1 -1
- package/build/lib/web/production/tokens/index.js +1 -2
- package/build/lib/web/production/tokens/index.js.map +1 -1
- package/build/lib/web/production/tokens/theme/bladeTheme.js +925 -0
- package/build/lib/web/production/tokens/theme/bladeTheme.js.map +1 -0
- package/build/lib/web/production/tokens/theme/createTheme.js +123 -177
- package/build/lib/web/production/tokens/theme/createTheme.js.map +1 -1
- package/build/lib/web/production/tokens/theme/index.js +1 -2
- package/build/lib/web/production/tokens/theme/index.js.map +1 -1
- package/build/lib/web/production/tokens/theme/overrideTheme.js +4 -4
- package/build/lib/web/production/tokens/theme/overrideTheme.js.map +1 -1
- package/build/lib/web/production/tokens/theme/theme.js +1 -7
- package/build/lib/web/production/tokens/theme/theme.js.map +1 -1
- package/build/lib/web/production/utils/getFocusRingStyles/getFocusRingStyles.web.js +26 -0
- package/build/lib/web/production/utils/getFocusRingStyles/getFocusRingStyles.web.js.map +1 -0
- package/build/lib/web/production/utils/getFocusRingStyles/index.js +2 -0
- package/build/lib/web/production/utils/getFocusRingStyles/index.js.map +1 -0
- package/build/lib/web/production/utils/lodashButBetter/get.js +8 -0
- package/build/lib/web/production/utils/lodashButBetter/get.js.map +1 -1
- package/build/lib/web/production/utils/lodashButBetter/isEmpty.js.map +1 -1
- package/build/lib/web/production/utils/makeLetterSpacing/index.js +2 -0
- package/build/lib/web/production/utils/makeLetterSpacing/index.js.map +1 -0
- package/build/lib/web/production/utils/makeLetterSpacing/makeLetterSpacing.js +7 -0
- package/build/lib/web/production/utils/makeLetterSpacing/makeLetterSpacing.js.map +1 -0
- package/build/lib/web/production/utils/objectKeysWithType.js +7 -0
- package/build/lib/web/production/utils/objectKeysWithType.js.map +1 -0
- package/build/lib/web/production/utils/useInteraction.js +3 -3
- package/build/lib/web/production/utils/useInteraction.js.map +1 -1
- package/build/types/components/index.d.ts +6006 -6173
- package/build/types/components/index.native.d.ts +4657 -4824
- package/build/types/tokens/index.d.ts +135 -182
- package/build/types/tokens/index.native.d.ts +135 -182
- package/build/types/utils/index.d.ts +94 -154
- package/build/types/utils/index.native.d.ts +94 -154
- package/codemods/brand-refresh/transformers/__tests__/migrate-actionlist.test.ts +88 -0
- package/codemods/brand-refresh/transformers/__tests__/migrate-amount.test.ts +186 -0
- package/codemods/brand-refresh/transformers/__tests__/migrate-badge.test.ts +32 -0
- package/codemods/brand-refresh/transformers/__tests__/migrate-card.test.ts +180 -0
- package/codemods/brand-refresh/transformers/__tests__/migrate-colors.test.ts +172 -0
- package/codemods/brand-refresh/transformers/__tests__/migrate-contrast-intent-variant.test.ts +206 -0
- package/codemods/brand-refresh/transformers/__tests__/migrate-divider.test.ts +24 -0
- package/codemods/brand-refresh/transformers/__tests__/migrate-dropdown.test.ts +282 -0
- package/codemods/brand-refresh/transformers/__tests__/migrate-table.test.ts +182 -0
- package/codemods/brand-refresh/transformers/__tests__/migrate-typography.test.ts +432 -0
- package/codemods/brand-refresh/transformers/colorTokensMapping.json +624 -0
- package/codemods/brand-refresh/transformers/index.ts +224 -0
- package/codemods/brand-refresh/transformers/migrate-actionlist-and-table.ts +32 -0
- package/codemods/brand-refresh/transformers/migrate-amount.ts +173 -0
- package/codemods/brand-refresh/transformers/migrate-badge.ts +28 -0
- package/codemods/brand-refresh/transformers/migrate-card.ts +43 -0
- package/codemods/brand-refresh/transformers/migrate-contrast-intent-color-props.ts +298 -0
- package/codemods/brand-refresh/transformers/migrate-divider.ts +38 -0
- package/codemods/brand-refresh/transformers/migrate-dropdown.ts +81 -0
- package/codemods/brand-refresh/transformers/migrate-typography.ts +342 -0
- package/codemods/brand-refresh/transformers/utils.ts +7 -0
- package/fonts/blade-fonts-react-native.zip +0 -0
- package/fonts/inter-variable/inter-cyrillic-extra.woff2 +0 -0
- package/fonts/inter-variable/inter-cyrillic.woff2 +0 -0
- package/fonts/inter-variable/inter-greek-extra.woff2 +0 -0
- package/fonts/inter-variable/inter-greek.woff2 +0 -0
- package/fonts/inter-variable/inter-latin-blade-extra.woff2 +0 -0
- package/fonts/inter-variable/inter-latin-blade.woff2 +0 -0
- package/fonts/inter-variable/inter-vietnamese.woff2 +0 -0
- package/fonts/tasa-orbiter.woff2 +0 -0
- package/fonts.css +82 -0
- package/package.json +10 -4
- package/build/css/bankingThemeDarkDesktop.css +0 -751
- package/build/css/bankingThemeDarkMobile.css +0 -751
- package/build/css/bankingThemeLightDesktop.css +0 -751
- package/build/css/bankingThemeLightMobile.css +0 -751
- package/build/css/paymentThemeDarkDesktop.css +0 -751
- package/build/css/paymentThemeDarkMobile.css +0 -751
- package/build/css/paymentThemeLightDesktop.css +0 -751
- package/build/css/paymentThemeLightMobile.css +0 -751
- package/build/lib/native/components/Typography/Title/Title.js +0 -17
- package/build/lib/native/components/Typography/Title/Title.js.map +0 -1
- package/build/lib/native/tokens/theme/bankingTheme.js +0 -12
- package/build/lib/native/tokens/theme/bankingTheme.js.map +0 -1
- package/build/lib/native/tokens/theme/paymentTheme.js +0 -12
- package/build/lib/native/tokens/theme/paymentTheme.js.map +0 -1
- package/build/lib/web/development/components/Typography/Title/Title.js +0 -96
- package/build/lib/web/development/components/Typography/Title/Title.js.map +0 -1
- package/build/lib/web/development/components/Typography/Title/index.js +0 -2
- package/build/lib/web/development/tokens/theme/bankingTheme.js +0 -3086
- package/build/lib/web/development/tokens/theme/bankingTheme.js.map +0 -1
- package/build/lib/web/development/tokens/theme/paymentTheme.js +0 -3086
- package/build/lib/web/development/tokens/theme/paymentTheme.js.map +0 -1
- package/build/lib/web/production/components/Typography/Title/Title.js +0 -96
- package/build/lib/web/production/components/Typography/Title/Title.js.map +0 -1
- package/build/lib/web/production/components/Typography/Title/index.js +0 -2
- package/build/lib/web/production/tokens/theme/bankingTheme.js +0 -3086
- package/build/lib/web/production/tokens/theme/bankingTheme.js.map +0 -1
- package/build/lib/web/production/tokens/theme/paymentTheme.js +0 -3086
- package/build/lib/web/production/tokens/theme/paymentTheme.js.map +0 -1
- /package/build/lib/web/development/{components/Typography/Title → utils/getFocusRingStyles}/index.js.map +0 -0
- /package/build/lib/web/{production/components/Typography/Title → development/utils/makeLetterSpacing}/index.js.map +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Radio.js","sources":["../../../../../src/components/Radio/Radio.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-shadow */\nimport React from 'react';\nimport type { OnChange } from './useRadio';\nimport { useRadio } from './useRadio';\nimport { RadioIcon } from './RadioIcon/RadioIcon';\nimport { useRadioGroupContext } from './RadioGroup/RadioContext';\nimport { radioHoverTokens } from './radioTokens';\nimport isEmpty from '~utils/lodashButBetter/isEmpty';\nimport { SelectorLabel } from '~components/Form/Selector/SelectorLabel';\nimport BaseBox from '~components/Box/BaseBox';\nimport { SelectorTitle } from '~components/Form/Selector/SelectorTitle';\nimport { SelectorSupportText } from '~components/Form/Selector/SelectorSupportText';\nimport { SelectorInput } from '~components/Form/Selector/SelectorInput';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport type { BladeElementRef, StringChildrenType, TestID } from '~utils/types';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { getPlatformType } from '~utils';\nimport { MetaConstants } from '~utils/metaAttribute';\nimport { throwBladeError } from '~utils/logger';\n\ntype RadioProps = {\n /**\n * Sets the label text of the Radio\n */\n children?: StringChildrenType;\n /**\n * Help text for the Radio\n */\n helpText?: string;\n /**\n * The value to be used in the Radio input.\n * This is the value that will be returned on form submission.\n */\n value: string;\n /**\n * If `true`, the Radio will be disabled\n *\n * @default false\n */\n isDisabled?: boolean;\n /**\n * Size of the radios\n *\n * @default \"medium\"\n */\n size?: 'small' | 'medium';\n} & TestID &\n StyledPropsBlade;\n\nconst _Radio: React.ForwardRefRenderFunction<BladeElementRef, RadioProps> = (\n { value, children, helpText, isDisabled, size = 'medium', testID, ...styledProps },\n ref,\n) => {\n const groupProps = useRadioGroupContext();\n const isInsideGroup = !isEmpty(groupProps);\n\n if (__DEV__) {\n if (!isInsideGroup) {\n throwBladeError({\n moduleName: 'Radio',\n message: 'Cannot use <Radio /> outside of <RadioGroup />',\n });\n }\n }\n\n const isChecked = groupProps?.state?.isChecked(value);\n const defaultChecked =\n groupProps?.defaultValue === undefined ? undefined : groupProps?.defaultValue === value;\n const validationState = groupProps?.validationState;\n const hasError = validationState === 'error';\n const _isDisabled = isDisabled ?? groupProps?.isDisabled;\n const _isRequired = groupProps?.isRequired || groupProps?.necessityIndicator === 'required';\n const name = groupProps?.name;\n const showHelpText = !hasError && helpText;\n const isReactNative = getPlatformType() === 'react-native';\n const _size = groupProps.size ?? size;\n const isSmall = _size === 'small';\n\n const handleChange: OnChange = ({ isChecked, value }) => {\n if (isChecked) {\n groupProps?.state?.setValue(value!);\n } else {\n groupProps?.state?.removeValue();\n }\n };\n\n const { state, ids, inputProps } = useRadio({\n defaultChecked,\n isChecked,\n hasError,\n isDisabled: _isDisabled,\n isRequired: _isRequired,\n name,\n value,\n onChange: handleChange,\n });\n\n return (\n <BaseBox {...getStyledProps(styledProps)}>\n <SelectorLabel\n componentName={MetaConstants.RadioLabel}\n inputProps={isReactNative ? inputProps : {}}\n testID={testID}\n >\n <BaseBox display=\"flex\" flexDirection=\"column\">\n <BaseBox display=\"flex\" alignItems=\"center\" flexDirection=\"row\">\n <SelectorInput\n hoverTokens={radioHoverTokens}\n isChecked={state.isChecked}\n isDisabled={_isDisabled}\n hasError={hasError}\n inputProps={inputProps}\n ref={ref}\n />\n <RadioIcon\n size={_size}\n isChecked={state.isChecked}\n isDisabled={_isDisabled}\n isNegative={hasError}\n />\n {children ? (\n <SelectorTitle size={_size} isDisabled={_isDisabled}>\n {children}\n </SelectorTitle>\n ) : null}\n </BaseBox>\n {showHelpText && (\n <BaseBox marginLeft={isSmall ? 'spacing.6' : 'spacing.7'}>\n <SelectorSupportText id={ids?.helpTextId}
|
|
1
|
+
{"version":3,"file":"Radio.js","sources":["../../../../../src/components/Radio/Radio.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-shadow */\nimport React from 'react';\nimport type { OnChange } from './useRadio';\nimport { useRadio } from './useRadio';\nimport { RadioIcon } from './RadioIcon/RadioIcon';\nimport { useRadioGroupContext } from './RadioGroup/RadioContext';\nimport { radioHoverTokens } from './radioTokens';\nimport isEmpty from '~utils/lodashButBetter/isEmpty';\nimport { SelectorLabel } from '~components/Form/Selector/SelectorLabel';\nimport BaseBox from '~components/Box/BaseBox';\nimport { SelectorTitle } from '~components/Form/Selector/SelectorTitle';\nimport { SelectorSupportText } from '~components/Form/Selector/SelectorSupportText';\nimport { SelectorInput } from '~components/Form/Selector/SelectorInput';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport type { BladeElementRef, StringChildrenType, TestID } from '~utils/types';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { getPlatformType } from '~utils';\nimport { MetaConstants } from '~utils/metaAttribute';\nimport { throwBladeError } from '~utils/logger';\n\ntype RadioProps = {\n /**\n * Sets the label text of the Radio\n */\n children?: StringChildrenType;\n /**\n * Help text for the Radio\n */\n helpText?: string;\n /**\n * The value to be used in the Radio input.\n * This is the value that will be returned on form submission.\n */\n value: string;\n /**\n * If `true`, the Radio will be disabled\n *\n * @default false\n */\n isDisabled?: boolean;\n /**\n * Size of the radios\n *\n * @default \"medium\"\n */\n size?: 'small' | 'medium';\n} & TestID &\n StyledPropsBlade;\n\nconst _Radio: React.ForwardRefRenderFunction<BladeElementRef, RadioProps> = (\n { value, children, helpText, isDisabled, size = 'medium', testID, ...styledProps },\n ref,\n) => {\n const groupProps = useRadioGroupContext();\n const isInsideGroup = !isEmpty(groupProps);\n\n if (__DEV__) {\n if (!isInsideGroup) {\n throwBladeError({\n moduleName: 'Radio',\n message: 'Cannot use <Radio /> outside of <RadioGroup />',\n });\n }\n }\n\n const isChecked = groupProps?.state?.isChecked(value);\n const defaultChecked =\n groupProps?.defaultValue === undefined ? undefined : groupProps?.defaultValue === value;\n const validationState = groupProps?.validationState;\n const hasError = validationState === 'error';\n const _isDisabled = isDisabled ?? groupProps?.isDisabled;\n const _isRequired = groupProps?.isRequired || groupProps?.necessityIndicator === 'required';\n const name = groupProps?.name;\n const showHelpText = !hasError && helpText;\n const isReactNative = getPlatformType() === 'react-native';\n const _size = groupProps.size ?? size;\n const isSmall = _size === 'small';\n\n const handleChange: OnChange = ({ isChecked, value }) => {\n if (isChecked) {\n groupProps?.state?.setValue(value!);\n } else {\n groupProps?.state?.removeValue();\n }\n };\n\n const { state, ids, inputProps } = useRadio({\n defaultChecked,\n isChecked,\n hasError,\n isDisabled: _isDisabled,\n isRequired: _isRequired,\n name,\n value,\n onChange: handleChange,\n });\n\n return (\n <BaseBox {...getStyledProps(styledProps)}>\n <SelectorLabel\n componentName={MetaConstants.RadioLabel}\n inputProps={isReactNative ? inputProps : {}}\n testID={testID}\n >\n <BaseBox display=\"flex\" flexDirection=\"column\">\n <BaseBox display=\"flex\" alignItems=\"center\" flexDirection=\"row\">\n <SelectorInput\n hoverTokens={radioHoverTokens}\n isChecked={state.isChecked}\n isDisabled={_isDisabled}\n hasError={hasError}\n inputProps={inputProps}\n ref={ref}\n />\n <RadioIcon\n size={_size}\n isChecked={state.isChecked}\n isDisabled={_isDisabled}\n isNegative={hasError}\n />\n {children ? (\n <SelectorTitle size={_size} isDisabled={_isDisabled}>\n {children}\n </SelectorTitle>\n ) : null}\n </BaseBox>\n {showHelpText && (\n <BaseBox marginLeft={isSmall ? 'spacing.6' : 'spacing.7'}>\n <SelectorSupportText isNegative={true} id={ids?.helpTextId}>\n {helpText}\n </SelectorSupportText>\n </BaseBox>\n )}\n </BaseBox>\n </SelectorLabel>\n </BaseBox>\n );\n};\n\nconst Radio = assignWithoutSideEffects(React.forwardRef(_Radio), { displayName: 'Radio' });\n\nexport type { RadioProps };\nexport { Radio };\n"],"names":["_Radio","_ref","ref","_groupProps$state","_groupProps$size","value","children","helpText","isDisabled","_ref$size","size","testID","styledProps","_objectWithoutProperties","_excluded","groupProps","useRadioGroupContext","isInsideGroup","isEmpty","__DEV__","throwBladeError","moduleName","message","isChecked","state","defaultChecked","defaultValue","undefined","validationState","hasError","_isDisabled","_isRequired","isRequired","necessityIndicator","name","showHelpText","isReactNative","getPlatformType","_size","isSmall","handleChange","_ref2","_groupProps$state2","setValue","_groupProps$state3","removeValue","_useRadio","useRadio","onChange","ids","inputProps","_jsx","BaseBox","Object","assign","getStyledProps","SelectorLabel","componentName","MetaConstants","RadioLabel","_jsxs","display","flexDirection","alignItems","SelectorInput","hoverTokens","radioHoverTokens","RadioIcon","isNegative","SelectorTitle","marginLeft","SelectorSupportText","id","helpTextId","Radio","assignWithoutSideEffects","React","forwardRef","displayName"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AACA,IAAA,SAAA,CAAA,CAAA,OAAA,CAAA,UAAA,CAAA,UAAA,CAAA,YAAA,CAAA,MAAA,CAAA,QAAA,CAAA,CAiDA,IAAMA,MAAmE,CAAG,SAAtEA,MAAmEA,CAAAC,IAAA,CAEvEC,GAAG,CACA,CAAAC,IAAAA,iBAAA,CAAAC,gBAAA,CAAA,IAFDC,KAAK,CAAAJ,IAAA,CAALI,KAAK,CAAEC,QAAQ,CAAAL,IAAA,CAARK,QAAQ,CAAEC,QAAQ,CAAAN,IAAA,CAARM,QAAQ,CAAEC,UAAU,CAAAP,IAAA,CAAVO,UAAU,CAAAC,SAAA,CAAAR,IAAA,CAAES,IAAI,CAAJA,IAAI,CAAAD,SAAA,GAAG,KAAA,CAAA,CAAA,QAAQ,CAAAA,SAAA,CAAEE,MAAM,CAAAV,IAAA,CAANU,MAAM,CAAKC,WAAW,CAAAC,wBAAA,CAAAZ,IAAA,CAAAa,SAAA,EAGhF,IAAMC,UAAU,CAAGC,oBAAoB,EAAE,CACzC,IAAMC,aAAa,CAAG,CAACC,OAAO,CAACH,UAAU,CAAC,CAE1C,GAAII,OAAO,CAAE,CACX,GAAI,CAACF,aAAa,CAAE,CAClBG,eAAe,CAAC,CACdC,UAAU,CAAE,OAAO,CACnBC,OAAO,CAAE,gDACX,CAAC,CAAC,CACJ,CACF,CAEA,IAAMC,SAAS,CAAGR,UAAU,EAAAZ,IAAAA,CAAAA,KAAAA,CAAAA,CAAAA,CAAAA,iBAAA,CAAVY,UAAU,CAAES,KAAK,GAAjBrB,IAAAA,CAAAA,KAAAA,CAAAA,CAAAA,iBAAA,CAAmBoB,SAAS,CAAClB,KAAK,CAAC,CACrD,IAAMoB,cAAc,CAClB,CAAAV,UAAU,cAAVA,UAAU,CAAEW,YAAY,IAAKC,SAAS,CAAGA,SAAS,CAAG,CAAAZ,UAAU,cAAVA,UAAU,CAAEW,YAAY,IAAKrB,KAAK,CACzF,IAAMuB,eAAe,CAAGb,UAAU,EAAA,IAAA,CAAA,KAAA,CAAA,CAAVA,UAAU,CAAEa,eAAe,CACnD,IAAMC,QAAQ,CAAGD,eAAe,GAAK,OAAO,CAC5C,IAAME,WAAW,CAAGtB,UAAU,EAAA,IAAA,CAAVA,UAAU,CAAIO,UAAU,cAAVA,UAAU,CAAEP,UAAU,CACxD,IAAMuB,WAAW,CAAG,CAAAhB,UAAU,EAAVA,IAAAA,CAAAA,KAAAA,CAAAA,CAAAA,UAAU,CAAEiB,UAAU,GAAI,CAAAjB,UAAU,cAAVA,UAAU,CAAEkB,kBAAkB,IAAK,UAAU,CAC3F,IAAMC,IAAI,CAAGnB,UAAU,EAAVA,IAAAA,CAAAA,KAAAA,CAAAA,CAAAA,UAAU,CAAEmB,IAAI,CAC7B,IAAMC,YAAY,CAAG,CAACN,QAAQ,EAAItB,QAAQ,CAC1C,IAAM6B,aAAa,CAAGC,eAAe,EAAE,GAAK,cAAc,CAC1D,IAAMC,KAAK,CAAA,CAAAlC,gBAAA,CAAGW,UAAU,CAACL,IAAI,QAAAN,gBAAA,CAAIM,IAAI,CACrC,IAAM6B,OAAO,CAAGD,KAAK,GAAK,OAAO,CAEjC,IAAME,YAAsB,CAAG,SAAzBA,YAAsBA,CAAAC,KAAA,CAA6B,CAAA,IAAvBlB,SAAS,CAAAkB,KAAA,CAATlB,SAAS,CAAElB,KAAK,CAAAoC,KAAA,CAALpC,KAAK,CAChD,GAAIkB,SAAS,CAAE,CAAAmB,IAAAA,kBAAA,CACb3B,UAAU,EAAA,IAAA,CAAA,KAAA,CAAA,CAAA,CAAA2B,kBAAA,CAAV3B,UAAU,CAAES,KAAK,eAAjBkB,kBAAA,CAAmBC,QAAQ,CAACtC,KAAM,CAAC,CACrC,CAAC,KAAM,KAAAuC,kBAAA,CACL7B,UAAU,EAAA6B,IAAAA,CAAAA,KAAAA,CAAAA,CAAAA,CAAAA,kBAAA,CAAV7B,UAAU,CAAES,KAAK,GAAA,IAAA,CAAA,KAAA,CAAA,CAAjBoB,kBAAA,CAAmBC,WAAW,EAAE,CAClC,CACF,CAAC,CAED,IAAAC,SAAA,CAAmCC,QAAQ,CAAC,CAC1CtB,cAAc,CAAdA,cAAc,CACdF,SAAS,CAATA,SAAS,CACTM,QAAQ,CAARA,QAAQ,CACRrB,UAAU,CAAEsB,WAAW,CACvBE,UAAU,CAAED,WAAW,CACvBG,IAAI,CAAJA,IAAI,CACJ7B,KAAK,CAALA,KAAK,CACL2C,QAAQ,CAAER,YACZ,CAAC,CAAC,CATMhB,KAAK,CAAAsB,SAAA,CAALtB,KAAK,CAAEyB,GAAG,CAAAH,SAAA,CAAHG,GAAG,CAAEC,UAAU,CAAAJ,SAAA,CAAVI,UAAU,CAW9B,OACEC,GAAA,CAACC,OAAO,CAAAC,MAAA,CAAAC,MAAA,IAAKC,cAAc,CAAC3C,WAAW,CAAC,CAAA,CAAAN,QAAA,CACtC6C,GAAA,CAACK,aAAa,CACZC,CAAAA,aAAa,CAAEC,aAAa,CAACC,UAAW,CACxCT,UAAU,CAAEd,aAAa,CAAGc,UAAU,CAAG,EAAG,CAC5CvC,MAAM,CAAEA,MAAO,CAAAL,QAAA,CAEfsD,IAAA,CAACR,OAAO,CAAA,CAACS,OAAO,CAAC,MAAM,CAACC,aAAa,CAAC,QAAQ,CAAAxD,QAAA,CAC5CsD,CAAAA,IAAA,CAACR,OAAO,EAACS,OAAO,CAAC,MAAM,CAACE,UAAU,CAAC,QAAQ,CAACD,aAAa,CAAC,KAAK,CAAAxD,QAAA,CAC7D6C,CAAAA,GAAA,CAACa,aAAa,CAAA,CACZC,WAAW,CAAEC,gBAAiB,CAC9B3C,SAAS,CAAEC,KAAK,CAACD,SAAU,CAC3Bf,UAAU,CAAEsB,WAAY,CACxBD,QAAQ,CAAEA,QAAS,CACnBqB,UAAU,CAAEA,UAAW,CACvBhD,GAAG,CAAEA,GAAI,CACV,CAAC,CACFiD,GAAA,CAACgB,SAAS,CACRzD,CAAAA,IAAI,CAAE4B,KAAM,CACZf,SAAS,CAAEC,KAAK,CAACD,SAAU,CAC3Bf,UAAU,CAAEsB,WAAY,CACxBsC,UAAU,CAAEvC,QAAS,CACtB,CAAC,CACDvB,QAAQ,CACP6C,GAAA,CAACkB,aAAa,EAAC3D,IAAI,CAAE4B,KAAM,CAAC9B,UAAU,CAAEsB,WAAY,CAAAxB,QAAA,CACjDA,QAAQ,CACI,CAAC,CACd,IAAI,CACD,CAAA,CAAC,CACT6B,YAAY,EACXgB,GAAA,CAACC,OAAO,EAACkB,UAAU,CAAE/B,OAAO,CAAG,WAAW,CAAG,WAAY,CAAAjC,QAAA,CACvD6C,GAAA,CAACoB,mBAAmB,CAAA,CAACH,UAAU,CAAE,IAAK,CAACI,EAAE,CAAEvB,GAAG,EAAHA,IAAAA,CAAAA,KAAAA,CAAAA,CAAAA,GAAG,CAAEwB,UAAW,CAAAnE,QAAA,CACxDC,QAAQ,CACU,CAAC,CACf,CACV,CACM,CAAA,CAAC,CACG,CAAC,CAAA,CACT,CAAC,CAEd,CAAC,CAEK,IAAAmE,KAAK,CAAGC,wBAAwB,CAACC,cAAK,CAACC,UAAU,CAAC7E,MAAM,CAAC,CAAE,CAAE8E,WAAW,CAAE,OAAQ,CAAC;;;;"}
|
|
@@ -17,7 +17,7 @@ import { metaAttribute } from '../../../utils/metaAttribute/metaAttribute.native
|
|
|
17
17
|
import Circle from '../../Icons/_Svg/Circle/Circle.native.js';
|
|
18
18
|
import Svg from '../../Icons/_Svg/Svg/Svg.native.js';
|
|
19
19
|
|
|
20
|
-
var CheckedIcon=function CheckedIcon(_ref){var color=_ref.color,size=_ref.size;var width=radioSizes.icon[size].width;var height=radioSizes.icon[size].height;var radius=radioSizes.icon[size].dotRadius;var viewBox=`0 0 ${width} ${height}`;var cx=`${width/2}`;var cy=`${height/2}`;return jsx(Svg,{width:makeSpace(width),height:makeSpace(height),viewBox:viewBox,fill:"none",children:jsx(Circle,{cx:cx,cy:cy,r:`${radius}`,fill:color})});};var RadioIcon=function RadioIcon(_ref2){var isChecked=_ref2.isChecked,isDisabled=_ref2.isDisabled,isNegative=_ref2.isNegative,size=_ref2.size;var _useTheme=useTheme(),theme=_useTheme.theme;var checked=Boolean(isChecked);var state=checked?'checked':'unchecked';var variant='default';if(isDisabled)variant='disabled';if(isNegative)variant='negative';var
|
|
20
|
+
var CheckedIcon=function CheckedIcon(_ref){var color=_ref.color,size=_ref.size;var width=radioSizes.icon[size].width;var height=radioSizes.icon[size].height;var radius=radioSizes.icon[size].dotRadius;var viewBox=`0 0 ${width} ${height}`;var cx=`${width/2}`;var cy=`${height/2}`;return jsx(Svg,{width:makeSpace(width),height:makeSpace(height),viewBox:viewBox,fill:"none",children:jsx(Circle,{cx:cx,cy:cy,r:`${radius}`,fill:color})});};var RadioIcon=function RadioIcon(_ref2){var isChecked=_ref2.isChecked,isDisabled=_ref2.isDisabled,isNegative=_ref2.isNegative,size=_ref2.size;var _useTheme=useTheme(),theme=_useTheme.theme;var checked=Boolean(isChecked);var state=checked?'checked':'unchecked';var variant='default';if(isDisabled)variant='disabled';if(isNegative)variant='negative';var dotColorToken=radioIconColors.variants[variant].dot[state];var dotColor=getIn(theme,dotColorToken);return jsx(RadioIconWrapper,Object.assign({size:size,isDisabled:isDisabled,isNegative:isNegative,isChecked:checked},metaAttribute({name:'radio-icon-wrapper'}),{children:jsx(Fade,{show:checked,styles:{position:'absolute',display:'flex'},children:jsx(CheckedIcon,{size:size,color:dotColor})})}));};
|
|
21
21
|
|
|
22
22
|
export { RadioIcon };
|
|
23
23
|
//# sourceMappingURL=RadioIcon.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioIcon.js","sources":["../../../../../../src/components/Radio/RadioIcon/RadioIcon.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/explicit-function-return-type */\n/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\nimport React from 'react';\nimport { radioIconColors, radioSizes } from '../radioTokens';\nimport type { RadioProps } from '../Radio';\nimport { RadioIconWrapper } from './RadioIconWrapper';\nimport { Fade } from './Fade';\nimport getIn from '~utils/lodashButBetter/get';\nimport { useTheme } from '~components/BladeProvider';\nimport Svg from '~components/Icons/_Svg';\nimport Circle from '~components/Icons/_Svg/Circle';\nimport { makeSpace } from '~utils/makeSpace';\nimport { metaAttribute } from '~utils/metaAttribute';\n\nexport type RadioIconProps = {\n isDisabled?: boolean;\n isNegative?: boolean;\n isChecked?: boolean;\n} & Required<Pick<RadioProps, 'size'>>;\n\nconst CheckedIcon = ({ color, size }: { color: string; size: RadioIconProps['size'] }) => {\n const width = radioSizes.icon[size].width;\n const height = radioSizes.icon[size].height;\n const radius = radioSizes.icon[size].dotRadius;\n const viewBox = `0 0 ${width} ${height}`;\n const cx = `${width / 2}`;\n const cy = `${height / 2}`;\n\n return (\n <Svg width={makeSpace(width)} height={makeSpace(height)} viewBox={viewBox} fill=\"none\">\n <Circle cx={cx} cy={cy} r={`${radius}`} fill={color} />\n </Svg>\n );\n};\n\nconst RadioIcon = ({ isChecked, isDisabled, isNegative, size }: RadioIconProps) => {\n const { theme } = useTheme();\n\n const checked = Boolean(isChecked);\n const state = checked ? 'checked' : 'unchecked';\n let variant: 'default' | 'disabled' | 'negative' = 'default';\n if (isDisabled) variant = 'disabled';\n if (isNegative) variant = 'negative';\n const
|
|
1
|
+
{"version":3,"file":"RadioIcon.js","sources":["../../../../../../src/components/Radio/RadioIcon/RadioIcon.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/explicit-function-return-type */\n/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\nimport React from 'react';\nimport { radioIconColors, radioSizes } from '../radioTokens';\nimport type { RadioProps } from '../Radio';\nimport { RadioIconWrapper } from './RadioIconWrapper';\nimport { Fade } from './Fade';\nimport getIn from '~utils/lodashButBetter/get';\nimport { useTheme } from '~components/BladeProvider';\nimport Svg from '~components/Icons/_Svg';\nimport Circle from '~components/Icons/_Svg/Circle';\nimport { makeSpace } from '~utils/makeSpace';\nimport { metaAttribute } from '~utils/metaAttribute';\n\nexport type RadioIconProps = {\n isDisabled?: boolean;\n isNegative?: boolean;\n isChecked?: boolean;\n} & Required<Pick<RadioProps, 'size'>>;\n\nconst CheckedIcon = ({ color, size }: { color: string; size: RadioIconProps['size'] }) => {\n const width = radioSizes.icon[size].width;\n const height = radioSizes.icon[size].height;\n const radius = radioSizes.icon[size].dotRadius;\n const viewBox = `0 0 ${width} ${height}`;\n const cx = `${width / 2}`;\n const cy = `${height / 2}`;\n\n return (\n <Svg width={makeSpace(width)} height={makeSpace(height)} viewBox={viewBox} fill=\"none\">\n <Circle cx={cx} cy={cy} r={`${radius}`} fill={color} />\n </Svg>\n );\n};\n\nconst RadioIcon = ({ isChecked, isDisabled, isNegative, size }: RadioIconProps) => {\n const { theme } = useTheme();\n\n const checked = Boolean(isChecked);\n const state = checked ? 'checked' : 'unchecked';\n let variant: 'default' | 'disabled' | 'negative' = 'default';\n if (isDisabled) variant = 'disabled';\n if (isNegative) variant = 'negative';\n const dotColorToken = radioIconColors.variants[variant].dot[state];\n const dotColor = getIn(theme, dotColorToken);\n\n return (\n <RadioIconWrapper\n size={size}\n isDisabled={isDisabled}\n isNegative={isNegative}\n isChecked={checked}\n {...metaAttribute({ name: 'radio-icon-wrapper' })}\n >\n <Fade show={checked} styles={{ position: 'absolute', display: 'flex' }}>\n <CheckedIcon size={size} color={dotColor} />\n </Fade>\n </RadioIconWrapper>\n );\n};\n\nexport { RadioIcon };\n"],"names":["CheckedIcon","_ref","color","size","width","radioSizes","icon","height","radius","dotRadius","viewBox","cx","cy","_jsx","Svg","makeSpace","fill","children","Circle","r","RadioIcon","_ref2","isChecked","isDisabled","isNegative","_useTheme","useTheme","theme","checked","Boolean","state","variant","dotColorToken","radioIconColors","variants","dot","dotColor","getIn","RadioIconWrapper","Object","assign","metaAttribute","name","Fade","show","styles","position","display"],"mappings":";;;;;;;;;;;;;;;;;;;AAoBA,IAAMA,WAAW,CAAG,SAAdA,WAAWA,CAAAC,IAAA,CAAyE,CAAA,IAAnEC,KAAK,CAAAD,IAAA,CAALC,KAAK,CAAEC,IAAI,CAAAF,IAAA,CAAJE,IAAI,CAChC,IAAMC,KAAK,CAAGC,UAAU,CAACC,IAAI,CAACH,IAAI,CAAC,CAACC,KAAK,CACzC,IAAMG,MAAM,CAAGF,UAAU,CAACC,IAAI,CAACH,IAAI,CAAC,CAACI,MAAM,CAC3C,IAAMC,MAAM,CAAGH,UAAU,CAACC,IAAI,CAACH,IAAI,CAAC,CAACM,SAAS,CAC9C,IAAMC,OAAO,CAAI,CAAMN,IAAAA,EAAAA,KAAM,IAAGG,MAAO,CAAA,CAAC,CACxC,IAAMI,EAAE,CAAI,CAAA,EAAEP,KAAK,CAAG,CAAE,EAAC,CACzB,IAAMQ,EAAE,CAAI,GAAEL,MAAM,CAAG,CAAE,CAAC,CAAA,CAE1B,OACEM,GAAA,CAACC,GAAG,CAAA,CAACV,KAAK,CAAEW,SAAS,CAACX,KAAK,CAAE,CAACG,MAAM,CAAEQ,SAAS,CAACR,MAAM,CAAE,CAACG,OAAO,CAAEA,OAAQ,CAACM,IAAI,CAAC,MAAM,CAAAC,QAAA,CACpFJ,GAAA,CAACK,MAAM,CAAA,CAACP,EAAE,CAAEA,EAAG,CAACC,EAAE,CAAEA,EAAG,CAACO,CAAC,CAAG,CAAEX,EAAAA,MAAO,EAAE,CAACQ,IAAI,CAAEd,KAAM,CAAE,CAAC,CACpD,CAAC,CAEV,CAAC,CAEK,IAAAkB,SAAS,CAAG,SAAZA,SAASA,CAAAC,KAAA,CAAoE,KAA9DC,SAAS,CAAAD,KAAA,CAATC,SAAS,CAAEC,UAAU,CAAAF,KAAA,CAAVE,UAAU,CAAEC,UAAU,CAAAH,KAAA,CAAVG,UAAU,CAAErB,IAAI,CAAAkB,KAAA,CAAJlB,IAAI,CAC1D,IAAAsB,SAAA,CAAkBC,QAAQ,EAAE,CAApBC,KAAK,CAAAF,SAAA,CAALE,KAAK,CAEb,IAAMC,OAAO,CAAGC,OAAO,CAACP,SAAS,CAAC,CAClC,IAAMQ,KAAK,CAAGF,OAAO,CAAG,SAAS,CAAG,WAAW,CAC/C,IAAIG,OAA4C,CAAG,SAAS,CAC5D,GAAIR,UAAU,CAAEQ,OAAO,CAAG,UAAU,CACpC,GAAIP,UAAU,CAAEO,OAAO,CAAG,UAAU,CACpC,IAAMC,aAAa,CAAGC,eAAe,CAACC,QAAQ,CAACH,OAAO,CAAC,CAACI,GAAG,CAACL,KAAK,CAAC,CAClE,IAAMM,QAAQ,CAAGC,KAAK,CAACV,KAAK,CAAEK,aAAa,CAAC,CAE5C,OACEnB,GAAA,CAACyB,gBAAgB,CAAAC,MAAA,CAAAC,MAAA,CACfrC,CAAAA,IAAI,CAAEA,IAAK,CACXoB,UAAU,CAAEA,UAAW,CACvBC,UAAU,CAAEA,UAAW,CACvBF,SAAS,CAAEM,OAAQ,CAAA,CACfa,aAAa,CAAC,CAAEC,IAAI,CAAE,oBAAqB,CAAC,CAAC,CAAAzB,CAAAA,QAAA,CAEjDJ,GAAA,CAAC8B,IAAI,CAACC,CAAAA,IAAI,CAAEhB,OAAQ,CAACiB,MAAM,CAAE,CAAEC,QAAQ,CAAE,UAAU,CAAEC,OAAO,CAAE,MAAO,CAAE,CAAA9B,QAAA,CACrEJ,GAAA,CAACb,WAAW,CAAA,CAACG,IAAI,CAAEA,IAAK,CAACD,KAAK,CAAEkC,QAAS,CAAE,CAAC,CACxC,CAAC,CAAA,CACS,CAAC,CAEvB;;;;"}
|
|
@@ -11,7 +11,7 @@ import { makeSpace } from '../../../utils/makeSpace/makeSpace.js';
|
|
|
11
11
|
import { makeSize } from '../../../utils/makeSize/makeSize.js';
|
|
12
12
|
import '../../BladeProvider/useTheme.js';
|
|
13
13
|
|
|
14
|
-
var getRadioIconWrapperStyles=function getRadioIconWrapperStyles(_ref){var theme=_ref.theme,isChecked=_ref.isChecked,isDisabled=_ref.isDisabled,isNegative=_ref.isNegative,size=_ref.size;var isReactNative=getPlatformType()==='react-native';var variant='default';if(isDisabled)variant='disabled';if(isNegative)variant='negative';var checked=isChecked?'checked':'unchecked';var background=radioIconColors.variants[variant].background[checked];var border=radioIconColors.variants[variant].border[checked];var backgroundColor=
|
|
14
|
+
var getRadioIconWrapperStyles=function getRadioIconWrapperStyles(_ref){var theme=_ref.theme,isChecked=_ref.isChecked,isDisabled=_ref.isDisabled,isNegative=_ref.isNegative,size=_ref.size;var isReactNative=getPlatformType()==='react-native';var variant='default';if(isDisabled)variant='disabled';if(isNegative)variant='negative';var checked=isChecked?'checked':'unchecked';var background=radioIconColors.variants[variant].background[checked];var border=radioIconColors.variants[variant].border[checked];var backgroundColor=getIn(theme,background);var borderColor=getIn(theme,border);return Object.assign({position:'relative',display:'flex',alignItems:'center',justifyContent:'center',width:makeSpace(radioSizes.icon[size].width),height:makeSpace(radioSizes.icon[size].height),borderWidth:makeBorderSize(theme.border.width.thick),borderStyle:'solid',margin:makeSpace(theme.spacing[1]),borderRadius:makeSize(theme.border.radius.max),backgroundColor:backgroundColor,borderColor:borderColor},!isReactNative&&{transitionDuration:castWebType(makeMotionTime(theme.motion.duration.xquick)),transitionTimingFunction:castWebType(theme.motion.easing.exit.attentive)});};
|
|
15
15
|
|
|
16
16
|
export { getRadioIconWrapperStyles };
|
|
17
17
|
//# sourceMappingURL=RadioIconWrapperStyles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioIconWrapperStyles.js","sources":["../../../../../../src/components/Radio/RadioIcon/RadioIconWrapperStyles.ts"],"sourcesContent":["import type { CSSObject } from 'styled-components';\nimport { radioIconColors, radioSizes } from '../radioTokens';\nimport type { RadioIconProps } from './RadioIcon';\nimport getIn from '~utils/lodashButBetter/get';\nimport type { Theme } from '~components/BladeProvider';\nimport { castWebType, getPlatformType } from '~utils';\nimport { makeSpace } from '~utils/makeSpace';\nimport { makeSize } from '~utils/makeSize';\nimport { makeBorderSize } from '~utils/makeBorderSize';\nimport { makeMotionTime } from '~utils/makeMotionTime';\n\nexport type RadioRectProps = RadioIconProps;\n\nconst getRadioIconWrapperStyles = ({\n theme,\n isChecked,\n isDisabled,\n isNegative,\n size,\n}: RadioRectProps & { theme: Theme }): CSSObject => {\n const isReactNative = getPlatformType() === 'react-native';\n let variant: 'default' | 'disabled' | 'negative' = 'default';\n if (isDisabled) variant = 'disabled';\n if (isNegative) variant = 'negative';\n const checked = isChecked ? 'checked' : 'unchecked';\n const background = radioIconColors.variants[variant].background[checked];\n const border = radioIconColors.variants[variant].border[checked];\n const backgroundColor =
|
|
1
|
+
{"version":3,"file":"RadioIconWrapperStyles.js","sources":["../../../../../../src/components/Radio/RadioIcon/RadioIconWrapperStyles.ts"],"sourcesContent":["import type { CSSObject } from 'styled-components';\nimport { radioIconColors, radioSizes } from '../radioTokens';\nimport type { RadioIconProps } from './RadioIcon';\nimport getIn from '~utils/lodashButBetter/get';\nimport type { Theme } from '~components/BladeProvider';\nimport { castWebType, getPlatformType } from '~utils';\nimport { makeSpace } from '~utils/makeSpace';\nimport { makeSize } from '~utils/makeSize';\nimport { makeBorderSize } from '~utils/makeBorderSize';\nimport { makeMotionTime } from '~utils/makeMotionTime';\n\nexport type RadioRectProps = RadioIconProps;\n\nconst getRadioIconWrapperStyles = ({\n theme,\n isChecked,\n isDisabled,\n isNegative,\n size,\n}: RadioRectProps & { theme: Theme }): CSSObject => {\n const isReactNative = getPlatformType() === 'react-native';\n let variant: 'default' | 'disabled' | 'negative' = 'default';\n if (isDisabled) variant = 'disabled';\n if (isNegative) variant = 'negative';\n const checked = isChecked ? 'checked' : 'unchecked';\n const background = radioIconColors.variants[variant].background[checked];\n const border = radioIconColors.variants[variant].border[checked];\n const backgroundColor = getIn(theme, background);\n const borderColor = getIn(theme, border);\n\n return {\n position: 'relative',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n width: makeSpace(radioSizes.icon[size].width),\n height: makeSpace(radioSizes.icon[size].height),\n borderWidth: makeBorderSize(theme.border.width.thick),\n borderStyle: 'solid',\n margin: makeSpace(theme.spacing[1]),\n borderRadius: makeSize(theme.border.radius.max),\n backgroundColor,\n borderColor,\n ...(!isReactNative && {\n transitionDuration: castWebType(makeMotionTime(theme.motion.duration.xquick)),\n transitionTimingFunction: castWebType(theme.motion.easing.exit.attentive),\n }),\n };\n};\n\nexport { getRadioIconWrapperStyles };\n"],"names":["getRadioIconWrapperStyles","_ref","theme","isChecked","isDisabled","isNegative","size","isReactNative","getPlatformType","variant","checked","background","radioIconColors","variants","border","backgroundColor","getIn","borderColor","Object","assign","position","display","alignItems","justifyContent","width","makeSpace","radioSizes","icon","height","borderWidth","makeBorderSize","thick","borderStyle","margin","spacing","borderRadius","makeSize","radius","max","transitionDuration","castWebType","makeMotionTime","motion","duration","xquick","transitionTimingFunction","easing","exit","attentive"],"mappings":";;;;;;;;;;;;;AAaM,IAAAA,yBAAyB,CAAG,SAA5BA,yBAAyBA,CAAAC,IAAA,CAMqB,CALlD,IAAAC,KAAK,CAAAD,IAAA,CAALC,KAAK,CACLC,SAAS,CAAAF,IAAA,CAATE,SAAS,CACTC,UAAU,CAAAH,IAAA,CAAVG,UAAU,CACVC,UAAU,CAAAJ,IAAA,CAAVI,UAAU,CACVC,IAAI,CAAAL,IAAA,CAAJK,IAAI,CAEJ,IAAMC,aAAa,CAAGC,eAAe,EAAE,GAAK,cAAc,CAC1D,IAAIC,OAA4C,CAAG,SAAS,CAC5D,GAAIL,UAAU,CAAEK,OAAO,CAAG,UAAU,CACpC,GAAIJ,UAAU,CAAEI,OAAO,CAAG,UAAU,CACpC,IAAMC,OAAO,CAAGP,SAAS,CAAG,SAAS,CAAG,WAAW,CACnD,IAAMQ,UAAU,CAAGC,eAAe,CAACC,QAAQ,CAACJ,OAAO,CAAC,CAACE,UAAU,CAACD,OAAO,CAAC,CACxE,IAAMI,MAAM,CAAGF,eAAe,CAACC,QAAQ,CAACJ,OAAO,CAAC,CAACK,MAAM,CAACJ,OAAO,CAAC,CAChE,IAAMK,eAAe,CAAGC,KAAK,CAACd,KAAK,CAAES,UAAU,CAAC,CAChD,IAAMM,WAAW,CAAGD,KAAK,CAACd,KAAK,CAAEY,MAAM,CAAC,CAExC,OAAAI,MAAA,CAAAC,MAAA,EACEC,QAAQ,CAAE,UAAU,CACpBC,OAAO,CAAE,MAAM,CACfC,UAAU,CAAE,QAAQ,CACpBC,cAAc,CAAE,QAAQ,CACxBC,KAAK,CAAEC,SAAS,CAACC,UAAU,CAACC,IAAI,CAACrB,IAAI,CAAC,CAACkB,KAAK,CAAC,CAC7CI,MAAM,CAAEH,SAAS,CAACC,UAAU,CAACC,IAAI,CAACrB,IAAI,CAAC,CAACsB,MAAM,CAAC,CAC/CC,WAAW,CAAEC,cAAc,CAAC5B,KAAK,CAACY,MAAM,CAACU,KAAK,CAACO,KAAK,CAAC,CACrDC,WAAW,CAAE,OAAO,CACpBC,MAAM,CAAER,SAAS,CAACvB,KAAK,CAACgC,OAAO,CAAC,CAAC,CAAC,CAAC,CACnCC,YAAY,CAAEC,QAAQ,CAAClC,KAAK,CAACY,MAAM,CAACuB,MAAM,CAACC,GAAG,CAAC,CAC/CvB,eAAe,CAAfA,eAAe,CACfE,WAAW,CAAXA,WAAW,CAAA,CACP,CAACV,aAAa,EAAI,CACpBgC,kBAAkB,CAAEC,WAAW,CAACC,cAAc,CAACvC,KAAK,CAACwC,MAAM,CAACC,QAAQ,CAACC,MAAM,CAAC,CAAC,CAC7EC,wBAAwB,CAAEL,WAAW,CAACtC,KAAK,CAACwC,MAAM,CAACI,MAAM,CAACC,IAAI,CAACC,SAAS,CAC1E,CAAC,CAAA,CAEL;;;;"}
|
|
@@ -2,7 +2,7 @@ import '../../tokens/global/typography.js';
|
|
|
2
2
|
import '../../tokens/global/motion.js';
|
|
3
3
|
import { size } from '../../tokens/global/size.js';
|
|
4
4
|
|
|
5
|
-
var radioSizes={group:{gap:{small:{mobile:'spacing.2',desktop:'spacing.0'},medium:{mobile:'spacing.3',desktop:'spacing.2'}}},icon:{small:{width:size[12],height:size[12],dotRadius:size[2]},medium:{width:size[16],height:size[16],dotRadius:size[3]}}};var radioIconColors={variants:{default:{dot:{checked:'colors.
|
|
5
|
+
var radioSizes={group:{gap:{small:{mobile:'spacing.2',desktop:'spacing.0'},medium:{mobile:'spacing.3',desktop:'spacing.2'}}},icon:{small:{width:size[12],height:size[12],dotRadius:size[2]},medium:{width:size[16],height:size[16],dotRadius:size[3]}}};var radioIconColors={variants:{default:{dot:{checked:'colors.interactive.icon.onPrimary.normal',unchecked:'colors.transparent'},border:{checked:'colors.interactive.border.primary.default',unchecked:'colors.interactive.border.gray.default'},background:{checked:'colors.interactive.background.primary.default',unchecked:'colors.transparent'}},disabled:{dot:{checked:'colors.interactive.icon.onPrimary.normal',unchecked:'colors.interactive.icon.onPrimary.normal'},border:{checked:'colors.transparent',unchecked:'colors.interactive.border.gray.disabled'},background:{checked:'colors.interactive.background.primary.disabled',unchecked:'colors.transparent'}},negative:{dot:{checked:'colors.interactive.icon.onPrimary.normal',unchecked:'colors.transparent'},border:{checked:'colors.interactive.border.negative.default',unchecked:'colors.interactive.border.negative.default'},background:{checked:'colors.interactive.background.negative.default',unchecked:'colors.transparent'}}}};var radioHoverTokens={default:{background:{checked:'colors.interactive.background.primary.highlighted',unchecked:'colors.interactive.background.gray.faded'},border:{checked:'colors.interactive.background.primary.highlighted',unchecked:'colors.interactive.border.gray.default'}}};
|
|
6
6
|
|
|
7
7
|
export { radioHoverTokens, radioIconColors, radioSizes };
|
|
8
8
|
//# sourceMappingURL=radioTokens.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radioTokens.js","sources":["../../../../../src/components/Radio/radioTokens.ts"],"sourcesContent":["import type { Theme } from '~components/BladeProvider';\nimport type {
|
|
1
|
+
{"version":3,"file":"radioTokens.js","sources":["../../../../../src/components/Radio/radioTokens.ts"],"sourcesContent":["import type { Theme } from '~components/BladeProvider';\nimport type { SelectorInputHoverTokens } from '~components/Form/Selector/types';\nimport type { DotNotationToken } from '~utils/lodashButBetter/get';\nimport { size } from '~tokens/global';\n\nconst radioSizes = {\n group: {\n gap: {\n small: {\n mobile: 'spacing.2',\n desktop: 'spacing.0',\n },\n medium: {\n mobile: 'spacing.3',\n desktop: 'spacing.2',\n },\n },\n },\n icon: {\n small: {\n width: size[12],\n height: size[12],\n dotRadius: size[2],\n },\n medium: {\n width: size[16],\n height: size[16],\n dotRadius: size[3],\n },\n },\n} as const;\n\ntype ColorTokens = `colors.${DotNotationToken<Theme['colors']>}`;\ntype Variant = {\n dot: {\n checked: ColorTokens;\n unchecked: ColorTokens;\n };\n border: {\n checked: ColorTokens;\n unchecked: ColorTokens;\n };\n background: {\n checked: ColorTokens;\n unchecked: ColorTokens;\n };\n};\n\ntype RadioIconColors = {\n variants: {\n default: Variant;\n disabled: Variant;\n negative: Variant;\n };\n};\n\nconst radioIconColors: RadioIconColors = {\n variants: {\n default: {\n dot: {\n checked: 'colors.interactive.icon.onPrimary.normal',\n unchecked: 'colors.transparent',\n },\n border: {\n checked: 'colors.interactive.border.primary.default',\n unchecked: 'colors.interactive.border.gray.default',\n },\n background: {\n checked: 'colors.interactive.background.primary.default',\n unchecked: 'colors.transparent',\n },\n },\n disabled: {\n dot: {\n checked: 'colors.interactive.icon.onPrimary.normal',\n unchecked: 'colors.interactive.icon.onPrimary.normal',\n },\n border: {\n checked: 'colors.transparent',\n unchecked: 'colors.interactive.border.gray.disabled',\n },\n background: {\n checked: 'colors.interactive.background.primary.disabled',\n unchecked: 'colors.transparent',\n },\n },\n negative: {\n dot: {\n checked: 'colors.interactive.icon.onPrimary.normal',\n unchecked: 'colors.transparent',\n },\n border: {\n checked: 'colors.interactive.border.negative.default',\n unchecked: 'colors.interactive.border.negative.default',\n },\n background: {\n checked: 'colors.interactive.background.negative.default',\n unchecked: 'colors.transparent',\n },\n },\n },\n} as const;\n\nconst radioHoverTokens: SelectorInputHoverTokens = {\n default: {\n background: {\n checked: 'colors.interactive.background.primary.highlighted',\n unchecked: 'colors.interactive.background.gray.faded',\n },\n border: {\n checked: 'colors.interactive.background.primary.highlighted', // Intentionally not using border tokens here since we want to match the background color\n unchecked: 'colors.interactive.border.gray.default',\n },\n },\n};\n\nexport { radioSizes, radioIconColors, radioHoverTokens };\n"],"names":["radioSizes","group","gap","small","mobile","desktop","medium","icon","width","size","height","dotRadius","radioIconColors","variants","default","dot","checked","unchecked","border","background","disabled","negative","radioHoverTokens"],"mappings":";;;;AAKM,IAAAA,UAAU,CAAG,CACjBC,KAAK,CAAE,CACLC,GAAG,CAAE,CACHC,KAAK,CAAE,CACLC,MAAM,CAAE,WAAW,CACnBC,OAAO,CAAE,WACX,CAAC,CACDC,MAAM,CAAE,CACNF,MAAM,CAAE,WAAW,CACnBC,OAAO,CAAE,WACX,CACF,CACF,CAAC,CACDE,IAAI,CAAE,CACJJ,KAAK,CAAE,CACLK,KAAK,CAAEC,IAAI,CAAC,EAAE,CAAC,CACfC,MAAM,CAAED,IAAI,CAAC,EAAE,CAAC,CAChBE,SAAS,CAAEF,IAAI,CAAC,CAAC,CACnB,CAAC,CACDH,MAAM,CAAE,CACNE,KAAK,CAAEC,IAAI,CAAC,EAAE,CAAC,CACfC,MAAM,CAAED,IAAI,CAAC,EAAE,CAAC,CAChBE,SAAS,CAAEF,IAAI,CAAC,CAAC,CACnB,CACF,CACF,EA0BM,IAAAG,eAAgC,CAAG,CACvCC,QAAQ,CAAE,CACRC,OAAO,CAAE,CACPC,GAAG,CAAE,CACHC,OAAO,CAAE,0CAA0C,CACnDC,SAAS,CAAE,oBACb,CAAC,CACDC,MAAM,CAAE,CACNF,OAAO,CAAE,2CAA2C,CACpDC,SAAS,CAAE,wCACb,CAAC,CACDE,UAAU,CAAE,CACVH,OAAO,CAAE,+CAA+C,CACxDC,SAAS,CAAE,oBACb,CACF,CAAC,CACDG,QAAQ,CAAE,CACRL,GAAG,CAAE,CACHC,OAAO,CAAE,0CAA0C,CACnDC,SAAS,CAAE,0CACb,CAAC,CACDC,MAAM,CAAE,CACNF,OAAO,CAAE,oBAAoB,CAC7BC,SAAS,CAAE,yCACb,CAAC,CACDE,UAAU,CAAE,CACVH,OAAO,CAAE,gDAAgD,CACzDC,SAAS,CAAE,oBACb,CACF,CAAC,CACDI,QAAQ,CAAE,CACRN,GAAG,CAAE,CACHC,OAAO,CAAE,0CAA0C,CACnDC,SAAS,CAAE,oBACb,CAAC,CACDC,MAAM,CAAE,CACNF,OAAO,CAAE,4CAA4C,CACrDC,SAAS,CAAE,4CACb,CAAC,CACDE,UAAU,CAAE,CACVH,OAAO,CAAE,gDAAgD,CACzDC,SAAS,CAAE,oBACb,CACF,CACF,CACF,EAEM,IAAAK,gBAA0C,CAAG,CACjDR,OAAO,CAAE,CACPK,UAAU,CAAE,CACVH,OAAO,CAAE,mDAAmD,CAC5DC,SAAS,CAAE,0CACb,CAAC,CACDC,MAAM,CAAE,CACNF,OAAO,CAAE,mDAAmD,CAC5DC,SAAS,CAAE,wCACb,CACF,CACF;;;;"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
2
1
|
import Animated, { useSharedValue, withRepeat, withSequence, withTiming, cancelAnimation, useAnimatedStyle, interpolateColor } from 'react-native-reanimated';
|
|
3
2
|
import React__default from 'react';
|
|
4
3
|
import { BaseBox } from '../Box/BaseBox/BaseBox.native.js';
|
|
@@ -13,7 +12,7 @@ import 'react-native-gesture-handler';
|
|
|
13
12
|
import '../BottomSheet/BottomSheetStack.js';
|
|
14
13
|
import { jsx } from 'react/jsx-runtime';
|
|
15
14
|
|
|
16
|
-
var
|
|
15
|
+
var AnimatedBox=Animated.createAnimatedComponent(BaseBox);var PulseAnimation=function PulseAnimation(props){var _useTheme=useTheme(),theme=_useTheme.theme;var durationPluseOff=theme.motion.duration.xmoderate;var durationPluseOn=theme.motion.duration['2xgentle'];var totalDuration=castNativeType(makeMotionTime(durationPluseOn+durationPluseOff));var easing=castNativeType(theme.motion.easing.standard.revealing);var progress=useSharedValue(0);var fadeIn=function fadeIn(){'worklet';var animations={opacity:withTiming(1,{duration:totalDuration,easing:easing})};var initialValues={opacity:0};return {initialValues:initialValues,animations:animations};};React__default.useEffect(function(){var pulsatingAnimationTimingConfig={duration:totalDuration,easing:easing};progress.value=withRepeat(withSequence(withTiming(0,pulsatingAnimationTimingConfig),withTiming(1,pulsatingAnimationTimingConfig)),-1,true);return function(){cancelAnimation(progress);};},[easing,progress,totalDuration]);var pulseAnimatedStyle=useAnimatedStyle(function(){return {backgroundColor:interpolateColor(progress.value,[1,0],[theme.colors.interactive.background.gray.highlighted,theme.colors.interactive.background.gray.default])};});return jsx(AnimatedBox,Object.assign({entering:fadeIn,style:pulseAnimatedStyle},props));};
|
|
17
16
|
|
|
18
17
|
export { PulseAnimation };
|
|
19
18
|
//# sourceMappingURL=PulseAnimation.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PulseAnimation.native.js","sources":["../../../../../src/components/Skeleton/PulseAnimation.native.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/explicit-function-return-type */\n/* eslint-disable @typescript-eslint/restrict-plus-operands */\nimport Animated, {\n cancelAnimation,\n interpolateColor,\n useAnimatedStyle,\n useSharedValue,\n withRepeat,\n withSequence,\n withTiming,\n} from 'react-native-reanimated';\nimport React from 'react';\nimport type { SkeletonProps } from './types';\nimport BaseBox from '~components/Box/BaseBox';\nimport { castNativeType, makeMotionTime } from '~utils';\nimport { useTheme } from '~components/BladeProvider';\n\nconst AnimatedBox = Animated.createAnimatedComponent(BaseBox);\n\nconst PulseAnimation = (
|
|
1
|
+
{"version":3,"file":"PulseAnimation.native.js","sources":["../../../../../src/components/Skeleton/PulseAnimation.native.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/explicit-function-return-type */\n/* eslint-disable @typescript-eslint/restrict-plus-operands */\nimport Animated, {\n cancelAnimation,\n interpolateColor,\n useAnimatedStyle,\n useSharedValue,\n withRepeat,\n withSequence,\n withTiming,\n} from 'react-native-reanimated';\nimport React from 'react';\nimport type { SkeletonProps } from './types';\nimport BaseBox from '~components/Box/BaseBox';\nimport { castNativeType, makeMotionTime } from '~utils';\nimport { useTheme } from '~components/BladeProvider';\n\nconst AnimatedBox = Animated.createAnimatedComponent(BaseBox);\n\nconst PulseAnimation = (props: SkeletonProps): React.ReactElement => {\n const { theme } = useTheme();\n const durationPluseOff = theme.motion.duration.xmoderate;\n const durationPluseOn = theme.motion.duration['2xgentle'];\n const totalDuration = castNativeType(makeMotionTime(durationPluseOn + durationPluseOff));\n const easing = castNativeType(theme.motion.easing.standard.revealing);\n const progress = useSharedValue(0);\n\n const fadeIn = () => {\n 'worklet';\n const animations = {\n opacity: withTiming(1, { duration: totalDuration, easing }),\n };\n const initialValues = {\n opacity: 0,\n };\n return {\n initialValues,\n animations,\n };\n };\n\n // Trigger pulsating animation\n React.useEffect(() => {\n const pulsatingAnimationTimingConfig = {\n duration: totalDuration,\n easing,\n };\n progress.value = withRepeat(\n withSequence(\n withTiming(0, pulsatingAnimationTimingConfig),\n withTiming(1, pulsatingAnimationTimingConfig),\n ),\n -1,\n true,\n );\n\n return () => {\n cancelAnimation(progress);\n };\n }, [easing, progress, totalDuration]);\n\n const pulseAnimatedStyle = useAnimatedStyle(() => {\n return {\n backgroundColor: interpolateColor(\n progress.value,\n [1, 0],\n [\n theme.colors.interactive.background.gray.highlighted,\n theme.colors.interactive.background.gray.default,\n ],\n ),\n };\n });\n\n return <AnimatedBox entering={fadeIn} style={pulseAnimatedStyle} {...props} />;\n};\n\nexport { PulseAnimation };\n"],"names":["AnimatedBox","Animated","createAnimatedComponent","BaseBox","PulseAnimation","props","_useTheme","useTheme","theme","durationPluseOff","motion","duration","xmoderate","durationPluseOn","totalDuration","castNativeType","makeMotionTime","easing","standard","revealing","progress","useSharedValue","fadeIn","animations","opacity","withTiming","initialValues","React","useEffect","pulsatingAnimationTimingConfig","value","withRepeat","withSequence","cancelAnimation","pulseAnimatedStyle","useAnimatedStyle","backgroundColor","interpolateColor","colors","interactive","background","gray","highlighted","default","_jsx","Object","assign","entering","style"],"mappings":";;;;;;;;;;;;;;AAiBA,IAAMA,WAAW,CAAGC,QAAQ,CAACC,uBAAuB,CAACC,OAAO,CAAC,CAEvD,IAAAC,cAAc,CAAG,SAAjBA,cAAcA,CAAIC,KAAoB,CAAyB,CACnE,IAAAC,SAAA,CAAkBC,QAAQ,EAAE,CAApBC,KAAK,CAAAF,SAAA,CAALE,KAAK,CACb,IAAMC,gBAAgB,CAAGD,KAAK,CAACE,MAAM,CAACC,QAAQ,CAACC,SAAS,CACxD,IAAMC,eAAe,CAAGL,KAAK,CAACE,MAAM,CAACC,QAAQ,CAAC,UAAU,CAAC,CACzD,IAAMG,aAAa,CAAGC,cAAc,CAACC,cAAc,CAACH,eAAe,CAAGJ,gBAAgB,CAAC,CAAC,CACxF,IAAMQ,MAAM,CAAGF,cAAc,CAACP,KAAK,CAACE,MAAM,CAACO,MAAM,CAACC,QAAQ,CAACC,SAAS,CAAC,CACrE,IAAMC,QAAQ,CAAGC,cAAc,CAAC,CAAC,CAAC,CAElC,IAAMC,MAAM,CAAG,SAATA,MAAMA,EAAS,CACnB,SAAS,CACT,IAAMC,UAAU,CAAG,CACjBC,OAAO,CAAEC,UAAU,CAAC,CAAC,CAAE,CAAEd,QAAQ,CAAEG,aAAa,CAAEG,MAAM,CAANA,MAAO,CAAC,CAC5D,CAAC,CACD,IAAMS,aAAa,CAAG,CACpBF,OAAO,CAAE,CACX,CAAC,CACD,OAAO,CACLE,aAAa,CAAbA,aAAa,CACbH,UAAU,CAAVA,UACF,CAAC,CACH,CAAC,CAGDI,cAAK,CAACC,SAAS,CAAC,UAAM,CACpB,IAAMC,8BAA8B,CAAG,CACrClB,QAAQ,CAAEG,aAAa,CACvBG,MAAM,CAANA,MACF,CAAC,CACDG,QAAQ,CAACU,KAAK,CAAGC,UAAU,CACzBC,YAAY,CACVP,UAAU,CAAC,CAAC,CAAEI,8BAA8B,CAAC,CAC7CJ,UAAU,CAAC,CAAC,CAAEI,8BAA8B,CAC9C,CAAC,CACD,CAAC,CAAC,CACF,IACF,CAAC,CAED,OAAa,UAAA,CACXI,eAAe,CAACb,QAAQ,CAAC,CAC3B,CAAC,CACH,CAAC,CAAE,CAACH,MAAM,CAAEG,QAAQ,CAAEN,aAAa,CAAC,CAAC,CAErC,IAAMoB,kBAAkB,CAAGC,gBAAgB,CAAC,UAAM,CAChD,OAAO,CACLC,eAAe,CAAEC,gBAAgB,CAC/BjB,QAAQ,CAACU,KAAK,CACd,CAAC,CAAC,CAAE,CAAC,CAAC,CACN,CACEtB,KAAK,CAAC8B,MAAM,CAACC,WAAW,CAACC,UAAU,CAACC,IAAI,CAACC,WAAW,CACpDlC,KAAK,CAAC8B,MAAM,CAACC,WAAW,CAACC,UAAU,CAACC,IAAI,CAACE,OAAO,CAEpD,CACF,CAAC,CACH,CAAC,CAAC,CAEF,OAAOC,GAAA,CAAC5C,WAAW,CAAA6C,MAAA,CAAAC,MAAA,EAACC,QAAQ,CAAEzB,MAAO,CAAC0B,KAAK,CAAEd,kBAAmB,CAAA,CAAK7B,KAAK,CAAG,CAAC,CAChF;;;;"}
|
|
@@ -12,7 +12,7 @@ import { metaAttribute } from '../../utils/metaAttribute/metaAttribute.native.js
|
|
|
12
12
|
import { MetaConstants } from '../../utils/metaAttribute/metaConstants.js';
|
|
13
13
|
import { jsx } from 'react/jsx-runtime';
|
|
14
14
|
|
|
15
|
-
var _excluded=["
|
|
15
|
+
var _excluded=["width","maxWidth","minWidth","height","maxHeight","minHeight","borderRadius","flexWrap","flexDirection","flexGrow","flexShrink","flexBasis","alignItems","alignContent","alignSelf","justifyItems","justifyContent","justifySelf","placeSelf","placeItems","order","testID"];var Skeleton=function Skeleton(_ref){var width=_ref.width,maxWidth=_ref.maxWidth,minWidth=_ref.minWidth,height=_ref.height,maxHeight=_ref.maxHeight,minHeight=_ref.minHeight,borderRadius=_ref.borderRadius,flexWrap=_ref.flexWrap,flexDirection=_ref.flexDirection,flexGrow=_ref.flexGrow,flexShrink=_ref.flexShrink,flexBasis=_ref.flexBasis,alignItems=_ref.alignItems,alignContent=_ref.alignContent,alignSelf=_ref.alignSelf,justifyItems=_ref.justifyItems,justifyContent=_ref.justifyContent,justifySelf=_ref.justifySelf,placeSelf=_ref.placeSelf,placeItems=_ref.placeItems,order=_ref.order,testID=_ref.testID,props=_objectWithoutProperties(_ref,_excluded);return jsx(PulseAnimation,Object.assign({width:width,minWidth:minWidth,maxWidth:maxWidth,height:height,minHeight:minHeight,maxHeight:maxHeight,borderRadius:borderRadius,flexWrap:flexWrap,flexDirection:flexDirection,flexGrow:flexGrow,flexShrink:flexShrink,flexBasis:flexBasis,alignItems:alignItems,alignContent:alignContent,alignSelf:alignSelf,justifyItems:justifyItems,justifyContent:justifyContent,justifySelf:justifySelf,placeSelf:placeSelf,placeItems:placeItems,order:order},getStyledProps(props),makeAccessible({hidden:true}),metaAttribute({name:MetaConstants.Skeleton,testID:testID})));};
|
|
16
16
|
|
|
17
17
|
export { Skeleton };
|
|
18
18
|
//# sourceMappingURL=Skeleton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Skeleton.js","sources":["../../../../../src/components/Skeleton/Skeleton.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-unnecessary-type-assertion */\nimport { PulseAnimation } from './PulseAnimation';\nimport type { SkeletonProps } from './types';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\n\nconst Skeleton = ({\n
|
|
1
|
+
{"version":3,"file":"Skeleton.js","sources":["../../../../../src/components/Skeleton/Skeleton.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-unnecessary-type-assertion */\nimport { PulseAnimation } from './PulseAnimation';\nimport type { SkeletonProps } from './types';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\n\nconst Skeleton = ({\n width,\n maxWidth,\n minWidth,\n height,\n maxHeight,\n minHeight,\n borderRadius,\n flexWrap,\n flexDirection,\n flexGrow,\n flexShrink,\n flexBasis,\n alignItems,\n alignContent,\n alignSelf,\n justifyItems,\n justifyContent,\n justifySelf,\n placeSelf,\n placeItems,\n order,\n testID,\n ...props\n}: SkeletonProps): React.ReactElement => {\n return (\n <PulseAnimation\n width={width}\n minWidth={minWidth}\n maxWidth={maxWidth}\n height={height}\n minHeight={minHeight}\n maxHeight={maxHeight}\n borderRadius={borderRadius}\n flexWrap={flexWrap}\n flexDirection={flexDirection}\n flexGrow={flexGrow}\n flexShrink={flexShrink}\n flexBasis={flexBasis}\n alignItems={alignItems}\n alignContent={alignContent}\n alignSelf={alignSelf}\n justifyItems={justifyItems}\n justifyContent={justifyContent}\n justifySelf={justifySelf}\n placeSelf={placeSelf}\n placeItems={placeItems}\n order={order}\n {...getStyledProps(props)}\n {...makeAccessible({ hidden: true })}\n {...metaAttribute({ name: MetaConstants.Skeleton, testID })}\n />\n );\n};\n\nexport { Skeleton };\n"],"names":["Skeleton","_ref","width","maxWidth","minWidth","height","maxHeight","minHeight","borderRadius","flexWrap","flexDirection","flexGrow","flexShrink","flexBasis","alignItems","alignContent","alignSelf","justifyItems","justifyContent","justifySelf","placeSelf","placeItems","order","testID","props","_objectWithoutProperties","_excluded","_jsx","PulseAnimation","Object","assign","getStyledProps","makeAccessible","hidden","metaAttribute","name","MetaConstants"],"mappings":";;;;;;;;;;;;;;AACA,IAAA,SAAA,CAAA,CAAA,OAAA,CAAA,UAAA,CAAA,UAAA,CAAA,QAAA,CAAA,WAAA,CAAA,WAAA,CAAA,cAAA,CAAA,UAAA,CAAA,eAAA,CAAA,UAAA,CAAA,YAAA,CAAA,WAAA,CAAA,YAAA,CAAA,cAAA,CAAA,WAAA,CAAA,cAAA,CAAA,gBAAA,CAAA,aAAA,CAAA,WAAA,CAAA,YAAA,CAAA,OAAA,CAAA,QAAA,CAAA,CAMM,IAAAA,QAAQ,CAAG,SAAXA,QAAQA,CAAAC,IAAA,CAwB2B,CAvBvC,IAAAC,KAAK,CAAAD,IAAA,CAALC,KAAK,CACLC,QAAQ,CAAAF,IAAA,CAARE,QAAQ,CACRC,QAAQ,CAAAH,IAAA,CAARG,QAAQ,CACRC,MAAM,CAAAJ,IAAA,CAANI,MAAM,CACNC,SAAS,CAAAL,IAAA,CAATK,SAAS,CACTC,SAAS,CAAAN,IAAA,CAATM,SAAS,CACTC,YAAY,CAAAP,IAAA,CAAZO,YAAY,CACZC,QAAQ,CAAAR,IAAA,CAARQ,QAAQ,CACRC,aAAa,CAAAT,IAAA,CAAbS,aAAa,CACbC,QAAQ,CAAAV,IAAA,CAARU,QAAQ,CACRC,UAAU,CAAAX,IAAA,CAAVW,UAAU,CACVC,SAAS,CAAAZ,IAAA,CAATY,SAAS,CACTC,UAAU,CAAAb,IAAA,CAAVa,UAAU,CACVC,YAAY,CAAAd,IAAA,CAAZc,YAAY,CACZC,SAAS,CAAAf,IAAA,CAATe,SAAS,CACTC,YAAY,CAAAhB,IAAA,CAAZgB,YAAY,CACZC,cAAc,CAAAjB,IAAA,CAAdiB,cAAc,CACdC,WAAW,CAAAlB,IAAA,CAAXkB,WAAW,CACXC,SAAS,CAAAnB,IAAA,CAATmB,SAAS,CACTC,UAAU,CAAApB,IAAA,CAAVoB,UAAU,CACVC,KAAK,CAAArB,IAAA,CAALqB,KAAK,CACLC,MAAM,CAAAtB,IAAA,CAANsB,MAAM,CACHC,KAAK,CAAAC,wBAAA,CAAAxB,IAAA,CAAAyB,SAAA,CAER,CAAA,OACEC,GAAA,CAACC,cAAc,CAAAC,MAAA,CAAAC,MAAA,CACb5B,CAAAA,KAAK,CAAEA,KAAM,CACbE,QAAQ,CAAEA,QAAS,CACnBD,QAAQ,CAAEA,QAAS,CACnBE,MAAM,CAAEA,MAAO,CACfE,SAAS,CAAEA,SAAU,CACrBD,SAAS,CAAEA,SAAU,CACrBE,YAAY,CAAEA,YAAa,CAC3BC,QAAQ,CAAEA,QAAS,CACnBC,aAAa,CAAEA,aAAc,CAC7BC,QAAQ,CAAEA,QAAS,CACnBC,UAAU,CAAEA,UAAW,CACvBC,SAAS,CAAEA,SAAU,CACrBC,UAAU,CAAEA,UAAW,CACvBC,YAAY,CAAEA,YAAa,CAC3BC,SAAS,CAAEA,SAAU,CACrBC,YAAY,CAAEA,YAAa,CAC3BC,cAAc,CAAEA,cAAe,CAC/BC,WAAW,CAAEA,WAAY,CACzBC,SAAS,CAAEA,SAAU,CACrBC,UAAU,CAAEA,UAAW,CACvBC,KAAK,CAAEA,KAAM,CAAA,CACTS,cAAc,CAACP,KAAK,CAAC,CACrBQ,cAAc,CAAC,CAAEC,MAAM,CAAE,IAAK,CAAC,CAAC,CAChCC,aAAa,CAAC,CAAEC,IAAI,CAAEC,aAAa,CAACpC,QAAQ,CAAEuB,MAAM,CAANA,MAAO,CAAC,CAAC,CAC5D,CAAC,CAEN;;;;"}
|
|
@@ -24,7 +24,7 @@ import { Text } from '../../Typography/Text/Text.js';
|
|
|
24
24
|
import '../../Typography/Code/Code.js';
|
|
25
25
|
import { makeAccessible } from '../../../utils/makeAccessible/makeAccessible.native.js';
|
|
26
26
|
|
|
27
|
-
var _excluded=["label","labelPosition","accessibilityLabel","
|
|
27
|
+
var _excluded=["label","labelPosition","accessibilityLabel","color","size","testID"];var getColor=function getColor(_ref){var color=_ref.color,theme=_ref.theme;if(color&&color==='white'){return getIn(theme.colors,'surface.background.gray.intense');}if(color&&color!=='primary'){return getIn(theme.colors,`feedback.background.${color}.intense`);}return getIn(theme.colors,'surface.background.primary.intense');};var BaseSpinner=function BaseSpinner(_ref2){var label=_ref2.label,_ref2$labelPosition=_ref2.labelPosition,labelPosition=_ref2$labelPosition===void 0?'right':_ref2$labelPosition,accessibilityLabel=_ref2.accessibilityLabel,_ref2$color=_ref2.color,color=_ref2$color===void 0?'neutral':_ref2$color,_ref2$size=_ref2.size,size=_ref2$size===void 0?'medium':_ref2$size,testID=_ref2.testID,styledProps=_objectWithoutProperties(_ref2,_excluded);var _useTheme=useTheme(),theme=_useTheme.theme;return jsx(BaseBox,Object.assign({},metaAttribute({name:MetaConstants.Spinner,testID:testID}),getStyledProps(styledProps),{children:jsxs(BaseBox,Object.assign({display:"flex",alignItems:"center",flexDirection:labelPosition==='right'?'row':'column'},makeAccessible({label:accessibilityLabel,role:'progressbar'}),{children:[jsx(SpinningBox,{children:jsx(SpinnerIcon,{dimensions:makeSize(dimensions[size]),color:getColor({color:color,theme:theme})})}),label&&label.trim().length>0?jsx(BaseBox,{marginLeft:labelPosition==='right'?'spacing.3':'spacing.0',marginTop:labelPosition==='bottom'?'spacing.3':'spacing.0',children:jsx(Text,{variant:"body",weight:"regular",size:"small",color:"surface.text.gray.muted",children:label})}):null]}))}));};
|
|
28
28
|
|
|
29
29
|
export { BaseSpinner };
|
|
30
30
|
//# sourceMappingURL=BaseSpinner.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseSpinner.js","sources":["../../../../../../src/components/Spinner/BaseSpinner/BaseSpinner.tsx"],"sourcesContent":["import React from 'react';\nimport { dimensions } from './spinnerTokens';\nimport SpinnerIcon from './SpinnerIcon';\nimport { SpinningBox } from './SpinningBox';\nimport getIn from '~utils/lodashButBetter/get';\nimport type { Theme } from '~components/BladeProvider';\nimport { useTheme } from '~components/BladeProvider';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport type {
|
|
1
|
+
{"version":3,"file":"BaseSpinner.js","sources":["../../../../../../src/components/Spinner/BaseSpinner/BaseSpinner.tsx"],"sourcesContent":["import React from 'react';\nimport { dimensions } from './spinnerTokens';\nimport SpinnerIcon from './SpinnerIcon';\nimport { SpinningBox } from './SpinningBox';\nimport getIn from '~utils/lodashButBetter/get';\nimport type { Theme } from '~components/BladeProvider';\nimport { useTheme } from '~components/BladeProvider';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport type { FeedbackColors } from '~tokens/theme/theme';\nimport BaseBox from '~components/Box/BaseBox';\nimport { Text } from '~components/Typography';\nimport type { TestID } from '~utils/types';\nimport { makeSize } from '~utils/makeSize';\nimport { makeAccessible } from '~utils/makeAccessible';\n\ntype BaseSpinnerProps = {\n /**\n * Sets the color of the spinner.\n *\n * @default 'default'\n */\n color?: 'primary' | 'white' | FeedbackColors;\n /**\n * Sets the label of the spinner.\n *\n * @default 'right'\n */\n label?: string;\n /**\n * Sets the label of the spinner.\n *\n */\n labelPosition?: 'right' | 'bottom';\n /**\n * Sets the size of the spinner.\n *\n * @default 'medium'\n */\n size?: 'medium' | 'large' | 'xlarge';\n /**\n * Sets the aria-label for web & accessibilityLabel react-native.\n *\n */\n accessibilityLabel: string;\n} & TestID &\n StyledPropsBlade;\n\nconst getColor = ({ color, theme }: { color: BaseSpinnerProps['color']; theme: Theme }): string => {\n if (color && color === 'white') {\n return getIn(theme.colors, 'surface.background.gray.intense');\n }\n if (color && color !== 'primary') {\n return getIn(theme.colors, `feedback.background.${color}.intense`);\n }\n return getIn(theme.colors, 'surface.background.primary.intense');\n};\n\nconst BaseSpinner = ({\n label,\n labelPosition = 'right',\n accessibilityLabel,\n color = 'neutral',\n size = 'medium',\n testID,\n ...styledProps\n}: BaseSpinnerProps): React.ReactElement => {\n const { theme } = useTheme();\n return (\n <BaseBox\n {...metaAttribute({ name: MetaConstants.Spinner, testID })}\n {...getStyledProps(styledProps)}\n >\n <BaseBox\n display=\"flex\"\n alignItems=\"center\"\n flexDirection={labelPosition === 'right' ? 'row' : 'column'}\n {...makeAccessible({\n label: accessibilityLabel,\n role: 'progressbar',\n })}\n >\n <SpinningBox>\n <SpinnerIcon dimensions={makeSize(dimensions[size])} color={getColor({ color, theme })} />\n </SpinningBox>\n {label && label.trim().length > 0 ? (\n <BaseBox\n marginLeft={labelPosition === 'right' ? 'spacing.3' : 'spacing.0'}\n marginTop={labelPosition === 'bottom' ? 'spacing.3' : 'spacing.0'}\n >\n <Text variant=\"body\" weight=\"regular\" size=\"small\" color=\"surface.text.gray.muted\">\n {label}\n </Text>\n </BaseBox>\n ) : null}\n </BaseBox>\n </BaseBox>\n );\n};\n\nexport type { BaseSpinnerProps };\nexport { BaseSpinner };\n"],"names":["getColor","_ref","color","theme","getIn","colors","BaseSpinner","_ref2","label","_ref2$labelPosition","labelPosition","accessibilityLabel","_ref2$color","_ref2$size","size","testID","styledProps","_objectWithoutProperties","_excluded","_useTheme","useTheme","_jsx","BaseBox","Object","assign","metaAttribute","name","MetaConstants","Spinner","getStyledProps","children","_jsxs","display","alignItems","flexDirection","makeAccessible","role","SpinningBox","SpinnerIcon","dimensions","makeSize","trim","length","marginLeft","marginTop","Text","variant","weight"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;qFAiDA,IAAMA,QAAQ,CAAG,SAAXA,QAAQA,CAAAC,IAAA,CAAqF,KAA/EC,KAAK,CAAAD,IAAA,CAALC,KAAK,CAAEC,KAAK,CAAAF,IAAA,CAALE,KAAK,CAC9B,GAAID,KAAK,EAAIA,KAAK,GAAK,OAAO,CAAE,CAC9B,OAAOE,KAAK,CAACD,KAAK,CAACE,MAAM,CAAE,iCAAiC,CAAC,CAC/D,CACA,GAAIH,KAAK,EAAIA,KAAK,GAAK,SAAS,CAAE,CAChC,OAAOE,KAAK,CAACD,KAAK,CAACE,MAAM,CAAG,CAAsBH,oBAAAA,EAAAA,KAAM,UAAS,CAAC,CACpE,CACA,OAAOE,KAAK,CAACD,KAAK,CAACE,MAAM,CAAE,oCAAoC,CAAC,CAClE,CAAC,CAEK,IAAAC,WAAW,CAAG,SAAdA,WAAWA,CAAAC,KAAA,CAQ2B,CAP1C,IAAAC,KAAK,CAAAD,KAAA,CAALC,KAAK,CAAAC,mBAAA,CAAAF,KAAA,CACLG,aAAa,CAAbA,aAAa,CAAAD,mBAAA,GAAA,KAAA,CAAA,CAAG,OAAO,CAAAA,mBAAA,CACvBE,kBAAkB,CAAAJ,KAAA,CAAlBI,kBAAkB,CAAAC,WAAA,CAAAL,KAAA,CAClBL,KAAK,CAALA,KAAK,CAAAU,WAAA,GAAA,KAAA,CAAA,CAAG,SAAS,CAAAA,WAAA,CAAAC,UAAA,CAAAN,KAAA,CACjBO,IAAI,CAAJA,IAAI,CAAAD,UAAA,UAAG,QAAQ,CAAAA,UAAA,CACfE,MAAM,CAAAR,KAAA,CAANQ,MAAM,CACHC,WAAW,CAAAC,wBAAA,CAAAV,KAAA,CAAAW,SAAA,CAAA,CAEd,IAAAC,SAAA,CAAkBC,QAAQ,EAAE,CAApBjB,KAAK,CAAAgB,SAAA,CAALhB,KAAK,CACb,OACEkB,GAAA,CAACC,OAAO,CAAAC,MAAA,CAAAC,MAAA,CAAA,EAAA,CACFC,aAAa,CAAC,CAAEC,IAAI,CAAEC,aAAa,CAACC,OAAO,CAAEb,MAAM,CAANA,MAAO,CAAC,CAAC,CACtDc,cAAc,CAACb,WAAW,CAAC,CAAAc,CAAAA,QAAA,CAE/BC,IAAA,CAACT,OAAO,CAAAC,MAAA,CAAAC,MAAA,EACNQ,OAAO,CAAC,MAAM,CACdC,UAAU,CAAC,QAAQ,CACnBC,aAAa,CAAExB,aAAa,GAAK,OAAO,CAAG,KAAK,CAAG,QAAS,CACxDyB,CAAAA,cAAc,CAAC,CACjB3B,KAAK,CAAEG,kBAAkB,CACzByB,IAAI,CAAE,aACR,CAAC,CAAC,CAAAN,CAAAA,QAAA,EAEFT,GAAA,CAACgB,WAAW,CAAAP,CAAAA,QAAA,CACVT,GAAA,CAACiB,WAAW,CAAA,CAACC,UAAU,CAAEC,QAAQ,CAACD,UAAU,CAACzB,IAAI,CAAC,CAAE,CAACZ,KAAK,CAAEF,QAAQ,CAAC,CAAEE,KAAK,CAALA,KAAK,CAAEC,KAAK,CAALA,KAAM,CAAC,CAAE,CAAE,CAAC,CAC/E,CAAC,CACbK,KAAK,EAAIA,KAAK,CAACiC,IAAI,EAAE,CAACC,MAAM,CAAG,CAAC,CAC/BrB,GAAA,CAACC,OAAO,EACNqB,UAAU,CAAEjC,aAAa,GAAK,OAAO,CAAG,WAAW,CAAG,WAAY,CAClEkC,SAAS,CAAElC,aAAa,GAAK,QAAQ,CAAG,WAAW,CAAG,WAAY,CAAAoB,QAAA,CAElET,GAAA,CAACwB,IAAI,EAACC,OAAO,CAAC,MAAM,CAACC,MAAM,CAAC,SAAS,CAACjC,IAAI,CAAC,OAAO,CAACZ,KAAK,CAAC,yBAAyB,CAAA4B,QAAA,CAC/EtB,KAAK,CACF,CAAC,CACA,CAAC,CACR,IAAI,GACD,CAAC,CAAA,CACH,CAAC,CAEd;;;;"}
|
|
@@ -2,7 +2,7 @@ import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProper
|
|
|
2
2
|
import { BaseSpinner } from '../BaseSpinner/BaseSpinner.js';
|
|
3
3
|
import { jsx } from 'react/jsx-runtime';
|
|
4
4
|
|
|
5
|
-
var _excluded=["label","labelPosition","accessibilityLabel","color","
|
|
5
|
+
var _excluded=["label","labelPosition","accessibilityLabel","color","size","testID"];var Spinner=function Spinner(_ref){var _ref2;var label=_ref.label,labelPosition=_ref.labelPosition,accessibilityLabel=_ref.accessibilityLabel,_ref$color=_ref.color,color=_ref$color===void 0?'neutral':_ref$color,_ref$size=_ref.size,size=_ref$size===void 0?'medium':_ref$size,testID=_ref.testID,styledProps=_objectWithoutProperties(_ref,_excluded);return jsx(BaseSpinner,Object.assign({label:label,labelPosition:labelPosition,accessibilityLabel:(_ref2=accessibilityLabel!=null?accessibilityLabel:label)!=null?_ref2:'Loading',color:color,size:size,testID:testID},styledProps));};
|
|
6
6
|
|
|
7
7
|
export { Spinner };
|
|
8
8
|
//# sourceMappingURL=Spinner.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Spinner.js","sources":["../../../../../../src/components/Spinner/Spinner/Spinner.tsx"],"sourcesContent":["import { BaseSpinner } from '../BaseSpinner';\nimport type { BaseSpinnerProps } from '../BaseSpinner';\n\ntype SpinnerProps =
|
|
1
|
+
{"version":3,"file":"Spinner.js","sources":["../../../../../../src/components/Spinner/Spinner/Spinner.tsx"],"sourcesContent":["import { BaseSpinner } from '../BaseSpinner';\nimport type { BaseSpinnerProps } from '../BaseSpinner';\n\ntype SpinnerProps = BaseSpinnerProps & {\n /**\n * Sets the color of the spinner.\n *\n * @default 'default'\n */\n color?: 'primary' | 'neutral' | 'white';\n};\n\nconst Spinner = ({\n label,\n labelPosition,\n accessibilityLabel,\n color = 'neutral',\n size = 'medium',\n testID,\n ...styledProps\n}: SpinnerProps): React.ReactElement => {\n return (\n <BaseSpinner\n label={label}\n labelPosition={labelPosition}\n accessibilityLabel={accessibilityLabel ?? label ?? 'Loading'}\n color={color}\n size={size}\n testID={testID}\n {...styledProps}\n />\n );\n};\n\nexport type { SpinnerProps };\nexport { Spinner };\n"],"names":["Spinner","_ref","_ref2","label","labelPosition","accessibilityLabel","_ref$color","color","_ref$size","size","testID","styledProps","_objectWithoutProperties","_excluded","_jsx","BaseSpinner","Object","assign"],"mappings":";;;;AAAA,IAAA,SAAA,CAAA,CAAA,OAAA,CAAA,eAAA,CAAA,oBAAA,CAAA,OAAA,CAAA,MAAA,CAAA,QAAA,CAAA,CAYM,IAAAA,OAAO,CAAG,SAAVA,OAAOA,CAAAC,IAAA,CAQ2B,CAAAC,IAAAA,KAAA,CAPtC,IAAAC,KAAK,CAAAF,IAAA,CAALE,KAAK,CACLC,aAAa,CAAAH,IAAA,CAAbG,aAAa,CACbC,kBAAkB,CAAAJ,IAAA,CAAlBI,kBAAkB,CAAAC,UAAA,CAAAL,IAAA,CAClBM,KAAK,CAALA,KAAK,CAAAD,UAAA,GAAA,KAAA,CAAA,CAAG,SAAS,CAAAA,UAAA,CAAAE,SAAA,CAAAP,IAAA,CACjBQ,IAAI,CAAJA,IAAI,CAAAD,SAAA,GAAA,KAAA,CAAA,CAAG,QAAQ,CAAAA,SAAA,CACfE,MAAM,CAAAT,IAAA,CAANS,MAAM,CACHC,WAAW,CAAAC,wBAAA,CAAAX,IAAA,CAAAY,SAAA,EAEd,OACEC,GAAA,CAACC,WAAW,CAAAC,MAAA,CAAAC,MAAA,CAAA,CACVd,KAAK,CAAEA,KAAM,CACbC,aAAa,CAAEA,aAAc,CAC7BC,kBAAkB,CAAAH,CAAAA,KAAA,CAAEG,kBAAkB,EAAlBA,IAAAA,CAAAA,kBAAkB,CAAIF,KAAK,GAAAD,IAAAA,CAAAA,KAAA,CAAI,SAAU,CAC7DK,KAAK,CAAEA,KAAM,CACbE,IAAI,CAAEA,IAAK,CACXC,MAAM,CAAEA,MAAO,CAAA,CACXC,WAAW,CAChB,CAAC,CAEN;;;;"}
|
|
@@ -2,7 +2,7 @@ import '../../tokens/global/typography.js';
|
|
|
2
2
|
import '../../tokens/global/motion.js';
|
|
3
3
|
import { size } from '../../tokens/global/size.js';
|
|
4
4
|
|
|
5
|
-
var switchSizes={track:{desktop:{small:{width:size[28],height:'spacing.5'},medium:{width:size[36],height:'spacing.6'}},mobile:{small:{width:size[36],height:'spacing.6'},medium:{width:size[44],height:'spacing.7'}}},thumb:{desktop:{small:{width:'spacing.4',height:'spacing.4'},medium:{width:'spacing.5',height:'spacing.5'}},mobile:{small:{width:'spacing.5',height:'spacing.5'},medium:{width:'spacing.6',height:'spacing.6'}}}};var switchColors={track:{default:{background:{checked:'colors.
|
|
5
|
+
var switchSizes={track:{desktop:{small:{width:size[28],height:'spacing.5'},medium:{width:size[36],height:'spacing.6'}},mobile:{small:{width:size[36],height:'spacing.6'},medium:{width:size[44],height:'spacing.7'}}},thumb:{desktop:{small:{width:'spacing.4',height:'spacing.4'},medium:{width:'spacing.5',height:'spacing.5'}},mobile:{small:{width:'spacing.5',height:'spacing.5'},medium:{width:'spacing.6',height:'spacing.6'}}}};var switchColors={track:{default:{background:{checked:'colors.interactive.background.primary.default',unchecked:'colors.interactive.background.gray.faded'}},disabled:{background:{checked:'colors.interactive.background.primary.faded',unchecked:'colors.interactive.background.gray.disabled'}}},thumb:{default:{background:'colors.interactive.background.staticWhite.default'},disabled:{background:'colors.interactive.background.staticWhite.disabled'}},thumbIcon:{default:{fill:'colors.interactive.icon.staticBlack.normal'},disabled:{fill:'colors.interactive.icon.staticBlack.disabled'}}};var switchMotion={easing:{thumb:'motion.easing.standard.effective',thumbIcon:'motion.easing.standard.effective',track:'motion.easing.standard.effective'},duration:{thumb:'motion.duration.xquick',thumbIcon:'motion.duration.xquick',track:'motion.duration.xquick'}};var switchHoverTokens={default:{background:{checked:'colors.interactive.background.primary.highlighted',unchecked:'colors.interactive.background.gray.fadedHighlighted'}}};
|
|
6
6
|
|
|
7
7
|
export { switchColors, switchHoverTokens, switchMotion, switchSizes };
|
|
8
8
|
//# sourceMappingURL=switchTokens.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"switchTokens.js","sources":["../../../../../src/components/Switch/switchTokens.ts"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"switchTokens.js","sources":["../../../../../src/components/Switch/switchTokens.ts"],"sourcesContent":["import { size } from '~tokens/global';\n\nconst switchSizes = {\n track: {\n desktop: {\n small: {\n width: size[28],\n height: 'spacing.5',\n },\n medium: {\n width: size[36],\n height: 'spacing.6',\n },\n },\n mobile: {\n small: {\n width: size[36],\n height: 'spacing.6',\n },\n medium: {\n width: size[44],\n height: 'spacing.7',\n },\n },\n },\n thumb: {\n desktop: {\n small: {\n width: 'spacing.4',\n height: 'spacing.4',\n },\n medium: {\n width: 'spacing.5',\n height: 'spacing.5',\n },\n },\n mobile: {\n small: {\n width: 'spacing.5',\n height: 'spacing.5',\n },\n medium: {\n width: 'spacing.6',\n height: 'spacing.6',\n },\n },\n },\n} as const;\n\nconst switchColors = {\n track: {\n default: {\n background: {\n checked: 'colors.interactive.background.primary.default',\n unchecked: 'colors.interactive.background.gray.faded',\n },\n },\n disabled: {\n background: {\n checked: 'colors.interactive.background.primary.faded',\n unchecked: 'colors.interactive.background.gray.disabled',\n },\n },\n },\n thumb: {\n default: {\n background: 'colors.interactive.background.staticWhite.default',\n },\n disabled: {\n background: 'colors.interactive.background.staticWhite.disabled',\n },\n },\n thumbIcon: {\n default: {\n fill: 'colors.interactive.icon.staticBlack.normal',\n },\n disabled: {\n fill: 'colors.interactive.icon.staticBlack.disabled',\n },\n },\n} as const;\n\nconst switchMotion = {\n easing: {\n thumb: 'motion.easing.standard.effective',\n thumbIcon: 'motion.easing.standard.effective',\n track: 'motion.easing.standard.effective',\n },\n duration: {\n thumb: 'motion.duration.xquick',\n thumbIcon: 'motion.duration.xquick',\n track: 'motion.duration.xquick',\n },\n} as const;\n\nconst switchHoverTokens = {\n default: {\n background: {\n checked: 'colors.interactive.background.primary.highlighted',\n unchecked: 'colors.interactive.background.gray.fadedHighlighted',\n },\n },\n} as const;\n\nexport { switchColors, switchSizes, switchHoverTokens, switchMotion };\n"],"names":["switchSizes","track","desktop","small","width","size","height","medium","mobile","thumb","switchColors","default","background","checked","unchecked","disabled","thumbIcon","fill","switchMotion","easing","duration","switchHoverTokens"],"mappings":";;;;AAEM,IAAAA,WAAW,CAAG,CAClBC,KAAK,CAAE,CACLC,OAAO,CAAE,CACPC,KAAK,CAAE,CACLC,KAAK,CAAEC,IAAI,CAAC,EAAE,CAAC,CACfC,MAAM,CAAE,WACV,CAAC,CACDC,MAAM,CAAE,CACNH,KAAK,CAAEC,IAAI,CAAC,EAAE,CAAC,CACfC,MAAM,CAAE,WACV,CACF,CAAC,CACDE,MAAM,CAAE,CACNL,KAAK,CAAE,CACLC,KAAK,CAAEC,IAAI,CAAC,EAAE,CAAC,CACfC,MAAM,CAAE,WACV,CAAC,CACDC,MAAM,CAAE,CACNH,KAAK,CAAEC,IAAI,CAAC,EAAE,CAAC,CACfC,MAAM,CAAE,WACV,CACF,CACF,CAAC,CACDG,KAAK,CAAE,CACLP,OAAO,CAAE,CACPC,KAAK,CAAE,CACLC,KAAK,CAAE,WAAW,CAClBE,MAAM,CAAE,WACV,CAAC,CACDC,MAAM,CAAE,CACNH,KAAK,CAAE,WAAW,CAClBE,MAAM,CAAE,WACV,CACF,CAAC,CACDE,MAAM,CAAE,CACNL,KAAK,CAAE,CACLC,KAAK,CAAE,WAAW,CAClBE,MAAM,CAAE,WACV,CAAC,CACDC,MAAM,CAAE,CACNH,KAAK,CAAE,WAAW,CAClBE,MAAM,CAAE,WACV,CACF,CACF,CACF,EAEM,IAAAI,YAAY,CAAG,CACnBT,KAAK,CAAE,CACLU,OAAO,CAAE,CACPC,UAAU,CAAE,CACVC,OAAO,CAAE,+CAA+C,CACxDC,SAAS,CAAE,0CACb,CACF,CAAC,CACDC,QAAQ,CAAE,CACRH,UAAU,CAAE,CACVC,OAAO,CAAE,6CAA6C,CACtDC,SAAS,CAAE,6CACb,CACF,CACF,CAAC,CACDL,KAAK,CAAE,CACLE,OAAO,CAAE,CACPC,UAAU,CAAE,mDACd,CAAC,CACDG,QAAQ,CAAE,CACRH,UAAU,CAAE,oDACd,CACF,CAAC,CACDI,SAAS,CAAE,CACTL,OAAO,CAAE,CACPM,IAAI,CAAE,4CACR,CAAC,CACDF,QAAQ,CAAE,CACRE,IAAI,CAAE,8CACR,CACF,CACF,EAEM,IAAAC,YAAY,CAAG,CACnBC,MAAM,CAAE,CACNV,KAAK,CAAE,kCAAkC,CACzCO,SAAS,CAAE,kCAAkC,CAC7Cf,KAAK,CAAE,kCACT,CAAC,CACDmB,QAAQ,CAAE,CACRX,KAAK,CAAE,wBAAwB,CAC/BO,SAAS,CAAE,wBAAwB,CACnCf,KAAK,CAAE,wBACT,CACF,EAEM,IAAAoB,iBAAiB,CAAG,CACxBV,OAAO,CAAE,CACPC,UAAU,CAAE,CACVC,OAAO,CAAE,mDAAmD,CAC5DC,SAAS,CAAE,qDACb,CACF,CACF;;;;"}
|
|
@@ -12,7 +12,7 @@ import { jsx } from 'react/jsx-runtime';
|
|
|
12
12
|
import { metaAttribute } from '../../utils/metaAttribute/metaAttribute.native.js';
|
|
13
13
|
import { MetaConstants } from '../../utils/metaAttribute/metaConstants.js';
|
|
14
14
|
|
|
15
|
-
var TabIndicator=function TabIndicator(props){var _useTheme=useTheme(),theme=_useTheme.theme;var _useTabsContext=useTabsContext(),variant=_useTabsContext.variant;var isFilled=variant==='filled';return jsx(TabBarIndicator,Object.assign({},props,metaAttribute({name:MetaConstants.TabIndicator}),{width:"auto",getTabWidth:function getTabWidth(index){if(!isFilled)return props.getTabWidth(index);if(index===props.navigationState.routes.length-1){return props.getTabWidth(index)-theme.spacing[2]*3;}return props.getTabWidth(index);},style:Object.assign({pointerEvents:'none'},isFilled?{height:props.layout.height-theme.border.width.
|
|
15
|
+
var TabIndicator=function TabIndicator(props){var _useTheme=useTheme(),theme=_useTheme.theme;var _useTabsContext=useTabsContext(),variant=_useTabsContext.variant;var isFilled=variant==='filled';return jsx(TabBarIndicator,Object.assign({},props,metaAttribute({name:MetaConstants.TabIndicator}),{width:"auto",getTabWidth:function getTabWidth(index){if(!isFilled)return props.getTabWidth(index);if(index===props.navigationState.routes.length-1){return props.getTabWidth(index)-theme.spacing[2]*3;}return props.getTabWidth(index);},style:Object.assign({pointerEvents:'none'},isFilled?{height:props.layout.height-theme.border.width.thicker-theme.spacing[2]*2,left:theme.spacing[2],bottom:theme.spacing[2],backgroundColor:theme.colors.interactive.background.primary.faded,borderRadius:theme.border.radius.small}:{height:theme.border.width.thicker,backgroundColor:theme.colors.interactive.border.primary.default})}));};
|
|
16
16
|
|
|
17
17
|
export { TabIndicator };
|
|
18
18
|
//# sourceMappingURL=TabIndicator.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabIndicator.native.js","sources":["../../../../../src/components/Tabs/TabIndicator.native.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport React from 'react';\nimport type { TabBarIndicatorProps } from 'react-native-tab-view';\nimport { TabBarIndicator as RNTabBarIndicator } from 'react-native-tab-view';\nimport { useTabsContext } from './TabsContext';\nimport { useTheme } from '~components/BladeProvider';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\n\nconst TabIndicator = (props: TabBarIndicatorProps<any>): React.ReactElement => {\n const { theme } = useTheme();\n const { variant } = useTabsContext();\n const isFilled = variant === 'filled';\n return (\n <RNTabBarIndicator\n {...props}\n {...metaAttribute({ name: MetaConstants.TabIndicator })}\n width=\"auto\"\n getTabWidth={(index) => {\n if (!isFilled) return props.getTabWidth(index);\n if (index === props.navigationState.routes.length - 1) {\n return props.getTabWidth(index) - theme.spacing[2] * 3;\n }\n return props.getTabWidth(index);\n }}\n style={{\n pointerEvents: 'none',\n ...(isFilled\n ? {\n height: props.layout.height - theme.border.width.
|
|
1
|
+
{"version":3,"file":"TabIndicator.native.js","sources":["../../../../../src/components/Tabs/TabIndicator.native.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport React from 'react';\nimport type { TabBarIndicatorProps } from 'react-native-tab-view';\nimport { TabBarIndicator as RNTabBarIndicator } from 'react-native-tab-view';\nimport { useTabsContext } from './TabsContext';\nimport { useTheme } from '~components/BladeProvider';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\n\nconst TabIndicator = (props: TabBarIndicatorProps<any>): React.ReactElement => {\n const { theme } = useTheme();\n const { variant } = useTabsContext();\n const isFilled = variant === 'filled';\n return (\n <RNTabBarIndicator\n {...props}\n {...metaAttribute({ name: MetaConstants.TabIndicator })}\n width=\"auto\"\n getTabWidth={(index) => {\n if (!isFilled) return props.getTabWidth(index);\n if (index === props.navigationState.routes.length - 1) {\n return props.getTabWidth(index) - theme.spacing[2] * 3;\n }\n return props.getTabWidth(index);\n }}\n style={{\n pointerEvents: 'none',\n ...(isFilled\n ? {\n height: props.layout.height - theme.border.width.thicker - theme.spacing[2] * 2,\n left: theme.spacing[2],\n bottom: theme.spacing[2],\n backgroundColor: theme.colors.interactive.background.primary.faded,\n borderRadius: theme.border.radius.small,\n }\n : {\n height: theme.border.width.thicker,\n backgroundColor: theme.colors.interactive.border.primary.default,\n }),\n }}\n />\n );\n};\n\nexport { TabIndicator };\n"],"names":["TabIndicator","props","_useTheme","useTheme","theme","_useTabsContext","useTabsContext","variant","isFilled","_jsx","RNTabBarIndicator","Object","assign","metaAttribute","name","MetaConstants","width","getTabWidth","index","navigationState","routes","length","spacing","style","pointerEvents","height","layout","border","thicker","left","bottom","backgroundColor","colors","interactive","background","primary","faded","borderRadius","radius","small","default"],"mappings":";;;;;;;;;;;;;;AAQM,IAAAA,YAAY,CAAG,SAAfA,YAAYA,CAAIC,KAAgC,CAAyB,CAC7E,IAAAC,SAAA,CAAkBC,QAAQ,EAAE,CAApBC,KAAK,CAAAF,SAAA,CAALE,KAAK,CACb,IAAAC,eAAA,CAAoBC,cAAc,EAAE,CAA5BC,OAAO,CAAAF,eAAA,CAAPE,OAAO,CACf,IAAMC,QAAQ,CAAGD,OAAO,GAAK,QAAQ,CACrC,OACEE,GAAA,CAACC,eAAiB,CAAAC,MAAA,CAAAC,MAAA,CACZX,EAAAA,CAAAA,KAAK,CACLY,aAAa,CAAC,CAAEC,IAAI,CAAEC,aAAa,CAACf,YAAa,CAAC,CAAC,CACvDgB,CAAAA,KAAK,CAAC,MAAM,CACZC,WAAW,CAAE,SAAAA,WAAAA,CAACC,KAAK,CAAK,CACtB,GAAI,CAACV,QAAQ,CAAE,OAAOP,KAAK,CAACgB,WAAW,CAACC,KAAK,CAAC,CAC9C,GAAIA,KAAK,GAAKjB,KAAK,CAACkB,eAAe,CAACC,MAAM,CAACC,MAAM,CAAG,CAAC,CAAE,CACrD,OAAOpB,KAAK,CAACgB,WAAW,CAACC,KAAK,CAAC,CAAGd,KAAK,CAACkB,OAAO,CAAC,CAAC,CAAC,CAAG,CAAC,CACxD,CACA,OAAOrB,KAAK,CAACgB,WAAW,CAACC,KAAK,CAAC,CACjC,CAAE,CACFK,KAAK,CAAAZ,MAAA,CAAAC,MAAA,CAAA,CACHY,aAAa,CAAE,MAAM,CACjBhB,CAAAA,QAAQ,CACR,CACEiB,MAAM,CAAExB,KAAK,CAACyB,MAAM,CAACD,MAAM,CAAGrB,KAAK,CAACuB,MAAM,CAACX,KAAK,CAACY,OAAO,CAAGxB,KAAK,CAACkB,OAAO,CAAC,CAAC,CAAC,CAAG,CAAC,CAC/EO,IAAI,CAAEzB,KAAK,CAACkB,OAAO,CAAC,CAAC,CAAC,CACtBQ,MAAM,CAAE1B,KAAK,CAACkB,OAAO,CAAC,CAAC,CAAC,CACxBS,eAAe,CAAE3B,KAAK,CAAC4B,MAAM,CAACC,WAAW,CAACC,UAAU,CAACC,OAAO,CAACC,KAAK,CAClEC,YAAY,CAAEjC,KAAK,CAACuB,MAAM,CAACW,MAAM,CAACC,KACpC,CAAC,CACD,CACEd,MAAM,CAAErB,KAAK,CAACuB,MAAM,CAACX,KAAK,CAACY,OAAO,CAClCG,eAAe,CAAE3B,KAAK,CAAC4B,MAAM,CAACC,WAAW,CAACN,MAAM,CAACQ,OAAO,CAACK,OAC3D,CAAC,CACL,CAAA,CACH,CAAC,CAEN;;;;"}
|
|
@@ -5,13 +5,14 @@ import { TabBar, TabView } from 'react-native-tab-view';
|
|
|
5
5
|
import { Dimensions } from 'react-native';
|
|
6
6
|
import { TabsContext } from './TabsContext.js';
|
|
7
7
|
import { StyledTabButton } from './TabItem.native.js';
|
|
8
|
-
import { textColor } from './tabTokens.js';
|
|
8
|
+
import { iconColor, textColor, trackColor } from './tabTokens.js';
|
|
9
9
|
import { useTabsItemPropRestriction, iconSizeMap } from './utils.js';
|
|
10
10
|
import { TabIndicator } from './TabIndicator.native.js';
|
|
11
11
|
import { SafeSceneMap } from './SafeSceneMap.native.js';
|
|
12
12
|
import { getComponentId } from '../../utils/isValidAllowedChildren/isValidAllowedChildren.js';
|
|
13
13
|
import '@babel/runtime/helpers/objectWithoutProperties';
|
|
14
14
|
import '../Typography/BaseText/BaseText.native.js';
|
|
15
|
+
import getIn from '../../utils/lodashButBetter/get.js';
|
|
15
16
|
import '../../tokens/global/typography.js';
|
|
16
17
|
import '../../tokens/global/motion.js';
|
|
17
18
|
import useTheme from '../BladeProvider/useTheme.js';
|
|
@@ -28,7 +29,7 @@ import { Divider } from '../Divider/Divider.js';
|
|
|
28
29
|
import { metaAttribute } from '../../utils/metaAttribute/metaAttribute.native.js';
|
|
29
30
|
import { MetaConstants } from '../../utils/metaAttribute/metaConstants.js';
|
|
30
31
|
|
|
31
|
-
var initialLayout={height:0,width:Dimensions.get('window').width};var getTabs=function getTabs(node){var children=React__default.Children.toArray(node);var tabList=children.find(function(child){return getComponentId(child)==='TabList';});if(!tabList||!React__default.isValidElement(tabList)){throw new Error('TabList is required');}return tabList.props.children;};var getTabPanels=function getTabPanels(node){var children=React__default.Children.toArray(node);return children.filter(function(child){return getComponentId(child)==='TabPanel';}).reduce(function(prev,curr){return Object.assign({},prev,_defineProperty({},curr.props.value,function(){return curr.props.children;}));},{});};var getRoutes=function getRoutes(tabs){return tabs.map(function(TabComponent,index){return {index:index,title:TabComponent.props.children,key:TabComponent.props.value,value:TabComponent.props.value,leading:TabComponent.props.leading,trailing:TabComponent.props.trailing};});};var getRouteIndexFromValue=function getRouteIndexFromValue(_ref){var value=_ref.value,routes=_ref.routes;return routes.findIndex(function(route){return route.value===value;});};var getRouteValueFromIndex=function getRouteValueFromIndex(_ref2){var _routes$find;var index=_ref2.index,routes=_ref2.routes;return (_routes$find=routes.find(function(route){return route.index===index;}))==null?void 0:_routes$find.value;};var Tabs=function Tabs(_ref3){var children=_ref3.children,defaultValue=_ref3.defaultValue,value=_ref3.value,_onChange=_ref3.onChange,_ref3$size=_ref3.size,size=_ref3$size===void 0?'medium':_ref3$size,_ref3$variant=_ref3.variant,variant=_ref3$variant===void 0?'bordered':_ref3$variant,_ref3$isFullWidthTabI=_ref3.isFullWidthTabItem,isFullWidthTabItem=_ref3$isFullWidthTabI===void 0?false:_ref3$isFullWidthTabI,_ref3$isLazy=_ref3.isLazy,isLazy=_ref3$isLazy===void 0?false:_ref3$isLazy;var _useTheme=useTheme(),theme=_useTheme.theme;var tabs=getTabs(children);var panels=getTabPanels(children);var routes=getRoutes(tabs);var isFilled=variant==='filled';var _useControllableState=useControllableState({defaultValue:defaultValue,value:value,onChange:function onChange(value){_onChange==null?void 0:_onChange(value);}}),_useControllableState2=_slicedToArray(_useControllableState,2),selectedValue=_useControllableState2[0],setSelectedValue=_useControllableState2[1];var routeIndex=getRouteIndexFromValue({value:selectedValue,routes:routes});var setIndex=React__default.useCallback(function(index){var skipUpdate=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;var value=getRouteValueFromIndex({index:index,routes:routes});setSelectedValue(function(){return value;},skipUpdate);},[routes,setSelectedValue]);var isVertical=false;var contextValue={baseId:'',selectedValue:selectedValue,isVertical:isVertical,size:size,variant:variant,isFullWidthTabItem:isFullWidthTabItem};React__default.useLayoutEffect(function(){if(selectedValue)return;setIndex(0,true);},[selectedValue,setIndex]);var renderTabLabel=React__default.useCallback(function(_ref4){var route=_ref4.route,focused=_ref4.focused;var title=route.title,Leading=route.leading,trailing=route.trailing;var selectedState=focused?'selected':'unselected';var validatedTrailingComponent=useTabsItemPropRestriction(trailing,size);return jsx(StyledTabButton,Object.assign({size:size,variant:variant,isFullWidthTabItem:!isFullWidthTabItem&&!isFilled},metaAttribute({name:MetaConstants.TabItem}),{children:jsxs(Box,{display:"flex",alignItems:"center",flexDirection:"row",gap:"spacing.3",children:[Leading?jsx(Leading,{size:iconSizeMap[size],color:selectedState
|
|
32
|
+
var initialLayout={height:0,width:Dimensions.get('window').width};var getTabs=function getTabs(node){var children=React__default.Children.toArray(node);var tabList=children.find(function(child){return getComponentId(child)==='TabList';});if(!tabList||!React__default.isValidElement(tabList)){throw new Error('TabList is required');}return tabList.props.children;};var getTabPanels=function getTabPanels(node){var children=React__default.Children.toArray(node);return children.filter(function(child){return getComponentId(child)==='TabPanel';}).reduce(function(prev,curr){return Object.assign({},prev,_defineProperty({},curr.props.value,function(){return curr.props.children;}));},{});};var getRoutes=function getRoutes(tabs){return tabs.map(function(TabComponent,index){return {index:index,title:TabComponent.props.children,key:TabComponent.props.value,value:TabComponent.props.value,leading:TabComponent.props.leading,trailing:TabComponent.props.trailing};});};var getRouteIndexFromValue=function getRouteIndexFromValue(_ref){var value=_ref.value,routes=_ref.routes;return routes.findIndex(function(route){return route.value===value;});};var getRouteValueFromIndex=function getRouteValueFromIndex(_ref2){var _routes$find;var index=_ref2.index,routes=_ref2.routes;return (_routes$find=routes.find(function(route){return route.index===index;}))==null?void 0:_routes$find.value;};var Tabs=function Tabs(_ref3){var children=_ref3.children,defaultValue=_ref3.defaultValue,value=_ref3.value,_onChange=_ref3.onChange,_ref3$size=_ref3.size,size=_ref3$size===void 0?'medium':_ref3$size,_ref3$variant=_ref3.variant,variant=_ref3$variant===void 0?'bordered':_ref3$variant,_ref3$isFullWidthTabI=_ref3.isFullWidthTabItem,isFullWidthTabItem=_ref3$isFullWidthTabI===void 0?false:_ref3$isFullWidthTabI,_ref3$isLazy=_ref3.isLazy,isLazy=_ref3$isLazy===void 0?false:_ref3$isLazy;var _useTheme=useTheme(),theme=_useTheme.theme;var tabs=getTabs(children);var panels=getTabPanels(children);var routes=getRoutes(tabs);var isFilled=variant==='filled';var _useControllableState=useControllableState({defaultValue:defaultValue,value:value,onChange:function onChange(value){_onChange==null?void 0:_onChange(value);}}),_useControllableState2=_slicedToArray(_useControllableState,2),selectedValue=_useControllableState2[0],setSelectedValue=_useControllableState2[1];var routeIndex=getRouteIndexFromValue({value:selectedValue,routes:routes});var setIndex=React__default.useCallback(function(index){var skipUpdate=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;var value=getRouteValueFromIndex({index:index,routes:routes});setSelectedValue(function(){return value;},skipUpdate);},[routes,setSelectedValue]);var isVertical=false;var contextValue={baseId:'',selectedValue:selectedValue,isVertical:isVertical,size:size,variant:variant,isFullWidthTabItem:isFullWidthTabItem};React__default.useLayoutEffect(function(){if(selectedValue)return;setIndex(0,true);},[selectedValue,setIndex]);var renderTabLabel=React__default.useCallback(function(_ref4){var route=_ref4.route,focused=_ref4.focused;var title=route.title,Leading=route.leading,trailing=route.trailing;var selectedState=focused?'selected':'unselected';var validatedTrailingComponent=useTabsItemPropRestriction(trailing,size);return jsx(StyledTabButton,Object.assign({size:size,variant:variant,isFullWidthTabItem:!isFullWidthTabItem&&!isFilled},metaAttribute({name:MetaConstants.TabItem}),{children:jsxs(Box,{display:"flex",alignItems:"center",flexDirection:"row",gap:"spacing.3",children:[Leading?jsx(Leading,{size:iconSizeMap[size],color:iconColor[selectedState].default}):null,jsx(Text,{color:textColor[selectedState].default,size:size==='medium'?'medium':'large',weight:"semibold",children:title}),validatedTrailingComponent]})}));},[isFullWidthTabItem,isFilled,size,variant]);var renderTabBar=React__default.useCallback(function(props){return jsx(TabBar,Object.assign({},props,metaAttribute({name:MetaConstants.TabList}),{gap:0,android_ripple:{borderless:true,color:'transparent'},scrollEnabled:!isFullWidthTabItem&&!isFilled,tabStyle:{padding:0,margin:0,minHeight:0},style:Object.assign({},isFilled?{shadowOpacity:0,shadowColor:'transparent',borderRadius:theme.border.radius.small,borderWidth:theme.border.width.thick,borderColor:theme.colors.interactive.border.gray.faded,backgroundColor:theme.colors.surface.background.gray.intense,padding:theme.spacing[2]}:Object.assign({shadowOpacity:0,shadowColor:'transparent',backgroundColor:'transparent'},variant!=='borderless'&&{borderBottomColor:getIn(theme.colors,trackColor),borderBottomWidth:theme.border.width.thin})),renderIndicator:TabIndicator,renderLabel:renderTabLabel,renderBadge:function renderBadge(){if(!isFilled)return null;if(routeIndex===0){return null;}return jsx(Divider,{left:"1px",height:"20px",variant:"normal",orientation:"vertical",top:size==='large'?'6px':'4px'});}}));},[isFullWidthTabItem,isFilled,renderTabLabel]);return jsx(TabsContext.Provider,{value:contextValue,children:jsx(TabView,{navigationState:{index:routeIndex,routes:routes},renderScene:SafeSceneMap(panels),renderTabBar:renderTabBar,onIndexChange:function onIndexChange(idx){setIndex(idx);},initialLayout:initialLayout,lazy:isLazy})});};
|
|
32
33
|
|
|
33
34
|
export { Tabs };
|
|
34
35
|
//# sourceMappingURL=Tabs.native.js.map
|