@razorpay/blade 10.23.5 → 11.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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 +17 -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 +4 -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 +24 -8
- 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 +6 -13
- 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 +17 -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 +4 -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 +24 -8
- 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 +6 -13
- 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 +6040 -6171
- package/build/types/components/index.native.d.ts +4687 -4818
- 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
|
@@ -13,11 +13,13 @@ import '../../utils/index.js';
|
|
|
13
13
|
import '../Box/BaseBox/index.js';
|
|
14
14
|
import '../../utils/metaAttribute/index.js';
|
|
15
15
|
import '../../utils/assignWithoutSideEffects/index.js';
|
|
16
|
+
import '../../utils/getFocusRingStyles/index.js';
|
|
16
17
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
17
18
|
import { makeMotionTime } from '../../utils/makeMotionTime/makeMotionTime.web.js';
|
|
18
19
|
import { metaAttribute } from '../../utils/metaAttribute/metaAttribute.web.js';
|
|
19
20
|
import { MetaConstants } from '../../utils/metaAttribute/metaConstants.js';
|
|
20
21
|
import { assignWithoutSideEffects } from '../../utils/assignWithoutSideEffects/assignWithoutSideEffects.js';
|
|
22
|
+
import { getFocusRingStyles } from '../../utils/getFocusRingStyles/getFocusRingStyles.web.js';
|
|
21
23
|
import { BaseBox } from '../Box/BaseBox/BaseBox.web.js';
|
|
22
24
|
import { makeSpace } from '../../utils/makeSpace/makeSpace.js';
|
|
23
25
|
import { Text } from '../Typography/Text/Text.js';
|
|
@@ -133,18 +135,18 @@ var StyledCell = /*#__PURE__*/styled(Cell).withConfig({
|
|
|
133
135
|
componentId: "sc-1fpz8hn-1"
|
|
134
136
|
})(function (_ref3) {
|
|
135
137
|
var theme = _ref3.theme,
|
|
136
|
-
$
|
|
138
|
+
$backgroundColor = _ref3.$backgroundColor;
|
|
137
139
|
return {
|
|
138
140
|
'&&&': {
|
|
139
141
|
height: '100%',
|
|
140
|
-
backgroundColor: getIn(theme.colors,
|
|
142
|
+
backgroundColor: getIn(theme.colors, $backgroundColor),
|
|
141
143
|
'& > div:first-child': {
|
|
142
144
|
alignSelf: 'stretch'
|
|
143
145
|
},
|
|
144
|
-
'&:focus-visible': {
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
}
|
|
146
|
+
'&:focus-visible': getFocusRingStyles({
|
|
147
|
+
theme: theme,
|
|
148
|
+
negativeOffset: true
|
|
149
|
+
})
|
|
148
150
|
}
|
|
149
151
|
};
|
|
150
152
|
});
|
|
@@ -179,12 +181,12 @@ var _TableCell = function _TableCell(_ref5) {
|
|
|
179
181
|
selectionType = _useTableContext2.selectionType,
|
|
180
182
|
rowDensity = _useTableContext2.rowDensity,
|
|
181
183
|
showStripedRows = _useTableContext2.showStripedRows,
|
|
182
|
-
|
|
184
|
+
backgroundColor = _useTableContext2.backgroundColor;
|
|
183
185
|
var isSelectable = selectionType !== 'none';
|
|
184
186
|
return /*#__PURE__*/jsx(StyledCell, _objectSpread(_objectSpread({
|
|
185
187
|
tabIndex: 0,
|
|
186
188
|
role: "cell",
|
|
187
|
-
$
|
|
189
|
+
$backgroundColor: backgroundColor
|
|
188
190
|
}, metaAttribute({
|
|
189
191
|
name: MetaConstants.TableCell
|
|
190
192
|
})), {}, {
|
|
@@ -263,10 +265,10 @@ var StyledRow = /*#__PURE__*/styled(Row).withConfig({
|
|
|
263
265
|
cursor: 'pointer'
|
|
264
266
|
}
|
|
265
267
|
}), {}, {
|
|
266
|
-
'&:focus': {
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
}
|
|
268
|
+
'&:focus': getFocusRingStyles({
|
|
269
|
+
theme: theme,
|
|
270
|
+
negativeOffset: true
|
|
271
|
+
})
|
|
270
272
|
})
|
|
271
273
|
};
|
|
272
274
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableBody.web.js","sources":["../../../../../../src/components/Table/TableBody.web.tsx"],"sourcesContent":["import React, { useEffect } from 'react';\nimport { Body, Row, Cell } from '@table-library/react-table-library/table';\nimport styled from 'styled-components';\nimport { useTableContext } from './TableContext';\nimport { checkboxCellWidth, tableRow } from './tokens';\nimport { ComponentIds } from './componentIds';\nimport type { TableProps, TableBodyProps, TableRowProps, TableCellProps } from './types';\nimport getIn from '~utils/lodashButBetter/get';\nimport { Text } from '~components/Typography';\nimport type { CheckboxProps } from '~components/Checkbox';\nimport { Checkbox } from '~components/Checkbox';\nimport { makeMotionTime, makeSize, makeSpace } from '~utils';\nimport BaseBox from '~components/Box/BaseBox';\nimport { MetaConstants, metaAttribute } from '~utils/metaAttribute';\nimport type { SurfaceLevels } from '~tokens/theme/theme';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\n\nconst StyledBody = styled(Body)<{ $isSelectable: boolean; $showStripedRows: boolean }>(\n ({ theme, $showStripedRows, $isSelectable }) => {\n const rowBackgroundTransition = `background-color ${makeMotionTime(\n getIn(theme.motion, tableRow.backgroundColorMotionDuration),\n )} ${getIn(theme.motion, tableRow.backgroundColorMotionEasing)}`;\n\n return {\n '&&&': {\n border: 'none',\n transition: rowBackgroundTransition,\n '& tr:last-child .cell-wrapper': {\n borderBottom: 'none',\n },\n\n '& .row-select-single-selected .cell-wrapper-base, .row-select-selected .cell-wrapper-base': {\n backgroundColor: getIn(theme.colors, tableRow.nonStripe.backgroundColorSelected),\n },\n '& .row-select-single-selected:hover:not(.disabled-row) .cell-wrapper-base, .row-select-selected:hover:not(.disabled-row) .cell-wrapper-base': {\n backgroundColor: getIn(theme.colors, tableRow.nonStripe.backgroundColorSelectedHover),\n },\n '& .row-select-single-selected:focus:not(.disabled-row) .cell-wrapper-base, .row-select-selected:focus:not(.disabled-row) .cell-wrapper-base': {\n backgroundColor: getIn(theme.colors, tableRow.nonStripe.backgroundColorSelectedFocus),\n },\n '& .row-select-single-selected:active:not(.disabled-row) .cell-wrapper-base, .row-select-selected:active:not(.disabled-row) .cell-wrapper-base': {\n backgroundColor: getIn(theme.colors, tableRow.nonStripe.backgroundColorSelectedActive),\n },\n\n ...($isSelectable && {\n '& tr:active:not(.disabled-row) .cell-wrapper': {\n backgroundColor: getIn(theme.colors, tableRow.nonStripeWrapper.backgroundColorActive),\n },\n }),\n\n ...($showStripedRows && {\n '& tr:nth-child(even) .cell-wrapper': {\n backgroundColor: getIn(theme.colors, tableRow.stripeWrapper.backgroundColor),\n },\n '& tr:nth-child(even) .cell-wrapper-base': {\n backgroundColor: tableRow.stripe.backgroundColor,\n },\n }),\n\n ...($showStripedRows &&\n $isSelectable && {\n '& tr:nth-child(even):hover:not(.disabled-row) .cell-wrapper': {\n backgroundColor: getIn(theme.colors, tableRow.stripeWrapper.backgroundColorHover),\n },\n '& tr:nth-child(even):focus:not(.disabled-row) .cell-wrapper': {\n backgroundColor: getIn(theme.colors, tableRow.stripeWrapper.backgroundColorFocus),\n },\n '& tr:nth-child(even):active:not(.disabled-row) .cell-wrapper': {\n backgroundColor: getIn(theme.colors, tableRow.stripeWrapper.backgroundColorActive),\n },\n '& .row-select-single-selected:nth-child(even) .cell-wrapper, .row-select-selected:nth-child(even) .cell-wrapper': {\n backgroundColor: getIn(theme.colors, tableRow.stripeWrapper.backgroundColorSelected),\n },\n '& .row-select-single-selected:nth-child(even):hover:not(.disabled-row) .cell-wrapper, .row-select-selected:nth-child(even):hover:not(.disabled-row) .cell-wrapper': {\n backgroundColor: getIn(\n theme.colors,\n tableRow.stripeWrapper.backgroundColorSelectedHover,\n ),\n },\n '& .row-select-single-selected:nth-child(even):focus:not(.disabled-row) .cell-wrapper, .row-select-selected:nth-child(even):focus:not(.disabled-row) .cell-wrapper': {\n backgroundColor: getIn(\n theme.colors,\n tableRow.stripeWrapper.backgroundColorSelectedFocus,\n ),\n },\n '& .row-select-single-selected:nth-child(even):active:not(.disabled-row) .cell-wrapper, .row-select-selected:nth-child(even):active:not(.disabled-row) .cell-wrapper': {\n backgroundColor: getIn(\n theme.colors,\n tableRow.stripeWrapper.backgroundColorSelectedActive,\n ),\n },\n\n '& tr:nth-child(even):hover:not(.disabled-row) .cell-wrapper-base': {\n backgroundColor: getIn(theme.colors, tableRow.stripe.backgroundColorHover),\n },\n '& tr:nth-child(even):focus:not(.disabled-row) .cell-wrapper-base': {\n backgroundColor: getIn(theme.colors, tableRow.stripe.backgroundColorFocus),\n },\n '& tr:nth-child(even):active:not(.disabled-row) .cell-wrapper-base': {\n backgroundColor: getIn(theme.colors, tableRow.stripe.backgroundColorActive),\n },\n\n '& .row-select-single-selected:nth-child(even) .cell-wrapper-base, .row-select-selected:nth-child(even) .cell-wrapper-base ': {\n backgroundColor: getIn(theme.colors, tableRow.stripe.backgroundColorSelected),\n },\n '& .row-select-single-selected:nth-child(even):hover:not(.disabled-row) .cell-wrapper-base, .row-select-selected:nth-child(even):hover:not(.disabled-row) .cell-wrapper-base ': {\n backgroundColor: getIn(theme.colors, tableRow.stripe.backgroundColorSelectedHover),\n },\n '& .row-select-single-selected:nth-child(even):focus:not(.disabled-row) .cell-wrapper-base, .row-select-selected:nth-child(even):focus:not(.disabled-row) .cell-wrapper-base ': {\n backgroundColor: getIn(theme.colors, tableRow.stripe.backgroundColorSelectedFocus),\n },\n '& .row-select-single-selected:nth-child(even):active:not(.disabled-row) .cell-wrapper-base, .row-select-selected:nth-child(even):active:not(.disabled-row) .cell-wrapper-base ': {\n backgroundColor: getIn(theme.colors, tableRow.stripe.backgroundColorSelectedActive),\n },\n }),\n },\n };\n },\n);\n\nconst _TableBody = ({ children }: TableBodyProps): React.ReactElement => {\n const { showStripedRows, selectionType } = useTableContext();\n const isSelectable = selectionType !== 'none';\n\n return (\n <StyledBody\n $isSelectable={isSelectable}\n $showStripedRows={showStripedRows}\n {...metaAttribute({ name: MetaConstants.TableBody })}\n >\n {children}\n </StyledBody>\n );\n};\n\nconst TableBody = assignWithoutSideEffects(_TableBody, {\n componentId: ComponentIds.TableBody,\n});\n\nconst StyledCell = styled(Cell)<{\n $surfaceLevel: SurfaceLevels;\n}>(({ theme, $surfaceLevel }) => ({\n '&&&': {\n height: '100%',\n backgroundColor: getIn(theme.colors, `surface.background.level${$surfaceLevel}.lowContrast`),\n '& > div:first-child': {\n alignSelf: 'stretch',\n },\n '&:focus-visible': {\n outline: 'none',\n boxShadow: `0px 0px 0px 4px ${getIn(theme.colors, tableRow.focusRingColor)} inset`,\n },\n },\n}));\n\nconst CellWrapper = styled(BaseBox)<{\n rowDensity: NonNullable<TableProps<unknown>['rowDensity']>;\n showStripedRows?: boolean;\n}>(({ theme, rowDensity, showStripedRows }) => {\n const rowBackgroundTransition = `background-color ${makeMotionTime(\n getIn(theme.motion, tableRow.backgroundColorMotionDuration),\n )} ${getIn(theme.motion, tableRow.backgroundColorMotionEasing)}`;\n\n return {\n '&&&': {\n transition: rowBackgroundTransition,\n backgroundColor: tableRow.nonStripeWrapper.backgroundColor,\n paddingTop: makeSpace(getIn(theme, tableRow.paddingTop[rowDensity])),\n paddingBottom: makeSpace(getIn(theme, tableRow.paddingBottom[rowDensity])),\n paddingLeft: makeSpace(getIn(theme, tableRow.paddingLeft[rowDensity])),\n paddingRight: makeSpace(getIn(theme, tableRow.paddingRight[rowDensity])),\n height: '100%',\n ...(!showStripedRows && {\n borderBottomWidth: makeSpace(getIn(theme.border.width, tableRow.borderBottomWidth)),\n borderBottomColor: getIn(theme.colors, tableRow.borderBottomColor),\n borderBottomStyle: 'solid',\n }),\n },\n };\n});\n\nconst _TableCell = ({ children }: TableCellProps): React.ReactElement => {\n const isChildrenString = typeof children === 'string';\n const { selectionType, rowDensity, showStripedRows, surfaceLevel } = useTableContext();\n const isSelectable = selectionType !== 'none';\n\n return (\n <StyledCell\n tabIndex={0}\n role=\"cell\"\n $surfaceLevel={surfaceLevel}\n {...metaAttribute({ name: MetaConstants.TableCell })}\n >\n <BaseBox className=\"cell-wrapper-base\" display=\"flex\" alignItems=\"center\" height=\"100%\">\n <CellWrapper\n className=\"cell-wrapper\"\n rowDensity={rowDensity}\n showStripedRows={showStripedRows}\n display=\"flex\"\n alignItems=\"center\"\n flex={1}\n // when a direct string child is passed we want to disable pointer events\n // for custom cells components, consumers can handle pointer events themselves\n pointerEvents={isChildrenString && isSelectable ? 'none' : 'auto'}\n >\n {isChildrenString ? <Text size=\"medium\">{children}</Text> : children}\n </CellWrapper>\n </BaseBox>\n </StyledCell>\n );\n};\n\nconst TableCell = assignWithoutSideEffects(_TableCell, {\n componentId: ComponentIds.TableCell,\n});\n\nconst TableCheckboxCell = ({\n isChecked,\n onChange,\n isDisabled,\n}: {\n isChecked: CheckboxProps['isChecked'];\n onChange: CheckboxProps['onChange'];\n isDisabled?: boolean;\n}): React.ReactElement => {\n return (\n <TableCell>\n <BaseBox\n display=\"flex\"\n alignItems=\"center\"\n justifyContent=\"center\"\n flex={1}\n width={makeSize(checkboxCellWidth)}\n >\n <Checkbox isDisabled={isDisabled} isChecked={isChecked} onChange={onChange} />\n </BaseBox>\n </TableCell>\n );\n};\n\nconst StyledRow = styled(Row)<{ $isSelectable: boolean; $isHoverable: boolean }>(\n ({ theme, $isSelectable, $isHoverable }) => {\n const rowBackgroundTransition = `background-color ${makeMotionTime(\n getIn(theme.motion, tableRow.backgroundColorMotionDuration),\n )} ${getIn(theme.motion, tableRow.backgroundColorMotionEasing)}`;\n\n return {\n '&&&': {\n backgroundColor: 'transparent',\n ...(($isHoverable || $isSelectable) && {\n '&:hover:not(.disabled-row) .cell-wrapper-base': {\n transition: rowBackgroundTransition,\n cursor: 'pointer',\n backgroundColor: getIn(theme.colors, tableRow.nonStripe.backgroundColorHover),\n },\n }),\n ...($isSelectable && {\n '&:focus:not(.disabled-row) .cell-wrapper-base': {\n transition: rowBackgroundTransition,\n backgroundColor: getIn(theme.colors, tableRow.nonStripe.backgroundColorFocus),\n cursor: 'pointer',\n },\n '&:active:not(.disabled-row) .cell-wrapper-base': {\n transition: rowBackgroundTransition,\n backgroundColor: getIn(theme.colors, tableRow.nonStripe.backgroundColorActive),\n cursor: 'pointer',\n },\n }),\n '&:focus': {\n outline: 'none',\n boxShadow: `0 0 0 2px ${getIn(theme.colors, 'brand.primary.300')}`,\n },\n },\n };\n },\n);\n\nconst _TableRow = <Item,>({\n children,\n item,\n isDisabled,\n onHover,\n onClick,\n}: TableRowProps<Item>): React.ReactElement => {\n const {\n selectionType,\n selectedRows,\n toggleRowSelectionById,\n setDisabledRows,\n } = useTableContext();\n const isSelectable = selectionType !== 'none';\n const isMultiSelect = selectionType === 'multiple';\n const isSelected = selectedRows?.includes(item.id);\n useEffect(() => {\n if (isDisabled) {\n setDisabledRows((prev) => [...prev, item.id]);\n }\n }, [isDisabled, item.id, setDisabledRows]);\n\n return (\n <StyledRow\n disabled={isDisabled}\n $isSelectable={isDisabled ? false : isSelectable}\n $isHoverable={isDisabled ? false : Boolean(onHover) || Boolean(onClick)}\n item={item}\n className={isDisabled ? 'disabled-row' : ''}\n onMouseEnter={() => onHover?.({ item })}\n onClick={() => onClick?.({ item })}\n {...metaAttribute({ name: MetaConstants.TableRow })}\n >\n {isMultiSelect && (\n <TableCheckboxCell\n isChecked={isSelected}\n onChange={() => !isDisabled && toggleRowSelectionById(item.id)}\n isDisabled={isDisabled}\n />\n )}\n {children}\n </StyledRow>\n );\n};\n\nconst TableRow = assignWithoutSideEffects(_TableRow, {\n componentId: ComponentIds.TableRow,\n});\n\nexport { TableBody, TableRow, TableCell };\n"],"names":["StyledBody","styled","Body","withConfig","displayName","componentId","_ref","theme","$showStripedRows","$isSelectable","rowBackgroundTransition","concat","makeMotionTime","getIn","motion","tableRow","backgroundColorMotionDuration","backgroundColorMotionEasing","_objectSpread","border","transition","borderBottom","backgroundColor","colors","nonStripe","backgroundColorSelected","backgroundColorSelectedHover","backgroundColorSelectedFocus","backgroundColorSelectedActive","nonStripeWrapper","backgroundColorActive","stripeWrapper","stripe","backgroundColorHover","backgroundColorFocus","_TableBody","_ref2","children","_useTableContext","useTableContext","showStripedRows","selectionType","isSelectable","_jsx","metaAttribute","name","MetaConstants","TableBody","assignWithoutSideEffects","ComponentIds","StyledCell","Cell","_ref3","$surfaceLevel","height","alignSelf","outline","boxShadow","focusRingColor","CellWrapper","BaseBox","_ref4","rowDensity","paddingTop","makeSpace","paddingBottom","paddingLeft","paddingRight","borderBottomWidth","width","borderBottomColor","borderBottomStyle","_TableCell","_ref5","isChildrenString","_useTableContext2","surfaceLevel","tabIndex","role","TableCell","className","display","alignItems","flex","pointerEvents","Text","size","TableCheckboxCell","_ref6","isChecked","onChange","isDisabled","justifyContent","makeSize","checkboxCellWidth","Checkbox","StyledRow","Row","_ref7","$isHoverable","cursor","_TableRow","_ref8","item","onHover","onClick","_useTableContext3","selectedRows","toggleRowSelectionById","setDisabledRows","isMultiSelect","isSelected","includes","id","useEffect","prev","_toConsumableArray","_jsxs","disabled","Bool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,SAAS,EAAEW,UAAU,GAAG,cAAc,GAAG,EAAG;IAC5C6B,YAAY,EAAE,SAAAA,YAAA,GAAA;AAAA,MAAA,OAAMhB,OAAO,KAAA,IAAA,IAAPA,OAAO,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAPA,OAAO,CAAG;AAAED,QAAAA,IAAI,EAAJA,IAAAA;AAAK,OAAC,CAAC,CAAA;KAAC;IACxCE,OAAO,EAAE,SAAAA,OAAA,GAAA;AAAA,MAAA,OAAMA,QAAO,KAAA,IAAA,IAAPA,QAAO,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAPA,QAAO,CAAG;AAAEF,QAAAA,IAAI,EAAJA,IAAAA;AAAK,OAAC,CAAC,CAAA;AAAA,KAAA;AAAC,GAAA,EAC/B3D,aAAa,CAAC;IAAEC,IAAI,EAAEC,aAAa,CAAC2E,QAAAA;AAAS,GAAC,CAAC,CAAA,EAAA,EAAA,EAAA;AAAApF,IAAAA,QAAA,EAElDyE,CAAAA,aAAa,iBACZnE,GAAA,CAAC4C,iBAAiB,EAAA;AAChBE,MAAAA,SAAS,EAAEsB,UAAW;MACtBrB,QAAQ,EAAE,SAAAA,QAAA,GAAA;QAAA,OAAM,CAACC,UAAU,IAAIiB,sBAAsB,CAACL,IAAI,CAACU,EAAE,CAAC,CAAA;OAAC;AAC/DtB,MAAAA,UAAU,EAAEA,UAAAA;KACb,CACF,EACAtD,QAAQ,CAAA;AAAA,GAAA,CACA,CAAC,CAAA;AAEhB,CAAC,CAAA;AAED,IAAMoF,QAAQ,gBAAGzE,wBAAwB,CAACqD,SAAS,EAAE;EACnDhG,WAAW,EAAE4C,YAAY,CAACwE,QAAAA;AAC5B,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"TableBody.web.js","sources":["../../../../../../src/components/Table/TableBody.web.tsx"],"sourcesContent":["import React, { useEffect } from 'react';\nimport { Body, Row, Cell } from '@table-library/react-table-library/table';\nimport styled from 'styled-components';\nimport { useTableContext } from './TableContext';\nimport { checkboxCellWidth, tableRow } from './tokens';\nimport { ComponentIds } from './componentIds';\nimport type {\n TableProps,\n TableBodyProps,\n TableRowProps,\n TableCellProps,\n TableBackgroundColors,\n} from './types';\nimport getIn from '~utils/lodashButBetter/get';\nimport { Text } from '~components/Typography';\nimport type { CheckboxProps } from '~components/Checkbox';\nimport { Checkbox } from '~components/Checkbox';\nimport { makeMotionTime, makeSize, makeSpace } from '~utils';\nimport BaseBox from '~components/Box/BaseBox';\nimport { MetaConstants, metaAttribute } from '~utils/metaAttribute';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { getFocusRingStyles } from '~utils/getFocusRingStyles';\n\nconst StyledBody = styled(Body)<{ $isSelectable: boolean; $showStripedRows: boolean }>(\n ({ theme, $showStripedRows, $isSelectable }) => {\n const rowBackgroundTransition = `background-color ${makeMotionTime(\n getIn(theme.motion, tableRow.backgroundColorMotionDuration),\n )} ${getIn(theme.motion, tableRow.backgroundColorMotionEasing)}`;\n\n return {\n '&&&': {\n border: 'none',\n transition: rowBackgroundTransition,\n '& tr:last-child .cell-wrapper': {\n borderBottom: 'none',\n },\n\n '& .row-select-single-selected .cell-wrapper-base, .row-select-selected .cell-wrapper-base': {\n backgroundColor: getIn(theme.colors, tableRow.nonStripe.backgroundColorSelected),\n },\n '& .row-select-single-selected:hover:not(.disabled-row) .cell-wrapper-base, .row-select-selected:hover:not(.disabled-row) .cell-wrapper-base': {\n backgroundColor: getIn(theme.colors, tableRow.nonStripe.backgroundColorSelectedHover),\n },\n '& .row-select-single-selected:focus:not(.disabled-row) .cell-wrapper-base, .row-select-selected:focus:not(.disabled-row) .cell-wrapper-base': {\n backgroundColor: getIn(theme.colors, tableRow.nonStripe.backgroundColorSelectedFocus),\n },\n '& .row-select-single-selected:active:not(.disabled-row) .cell-wrapper-base, .row-select-selected:active:not(.disabled-row) .cell-wrapper-base': {\n backgroundColor: getIn(theme.colors, tableRow.nonStripe.backgroundColorSelectedActive),\n },\n\n ...($isSelectable && {\n '& tr:active:not(.disabled-row) .cell-wrapper': {\n backgroundColor: getIn(theme.colors, tableRow.nonStripeWrapper.backgroundColorActive),\n },\n }),\n\n ...($showStripedRows && {\n '& tr:nth-child(even) .cell-wrapper': {\n backgroundColor: getIn(theme.colors, tableRow.stripeWrapper.backgroundColor),\n },\n '& tr:nth-child(even) .cell-wrapper-base': {\n backgroundColor: tableRow.stripe.backgroundColor,\n },\n }),\n\n ...($showStripedRows &&\n $isSelectable && {\n '& tr:nth-child(even):hover:not(.disabled-row) .cell-wrapper': {\n backgroundColor: getIn(theme.colors, tableRow.stripeWrapper.backgroundColorHover),\n },\n '& tr:nth-child(even):focus:not(.disabled-row) .cell-wrapper': {\n backgroundColor: getIn(theme.colors, tableRow.stripeWrapper.backgroundColorFocus),\n },\n '& tr:nth-child(even):active:not(.disabled-row) .cell-wrapper': {\n backgroundColor: getIn(theme.colors, tableRow.stripeWrapper.backgroundColorActive),\n },\n '& .row-select-single-selected:nth-child(even) .cell-wrapper, .row-select-selected:nth-child(even) .cell-wrapper': {\n backgroundColor: getIn(theme.colors, tableRow.stripeWrapper.backgroundColorSelected),\n },\n '& .row-select-single-selected:nth-child(even):hover:not(.disabled-row) .cell-wrapper, .row-select-selected:nth-child(even):hover:not(.disabled-row) .cell-wrapper': {\n backgroundColor: getIn(\n theme.colors,\n tableRow.stripeWrapper.backgroundColorSelectedHover,\n ),\n },\n '& .row-select-single-selected:nth-child(even):focus:not(.disabled-row) .cell-wrapper, .row-select-selected:nth-child(even):focus:not(.disabled-row) .cell-wrapper': {\n backgroundColor: getIn(\n theme.colors,\n tableRow.stripeWrapper.backgroundColorSelectedFocus,\n ),\n },\n '& .row-select-single-selected:nth-child(even):active:not(.disabled-row) .cell-wrapper, .row-select-selected:nth-child(even):active:not(.disabled-row) .cell-wrapper': {\n backgroundColor: getIn(\n theme.colors,\n tableRow.stripeWrapper.backgroundColorSelectedActive,\n ),\n },\n\n '& tr:nth-child(even):hover:not(.disabled-row) .cell-wrapper-base': {\n backgroundColor: getIn(theme.colors, tableRow.stripe.backgroundColorHover),\n },\n '& tr:nth-child(even):focus:not(.disabled-row) .cell-wrapper-base': {\n backgroundColor: getIn(theme.colors, tableRow.stripe.backgroundColorFocus),\n },\n '& tr:nth-child(even):active:not(.disabled-row) .cell-wrapper-base': {\n backgroundColor: getIn(theme.colors, tableRow.stripe.backgroundColorActive),\n },\n\n '& .row-select-single-selected:nth-child(even) .cell-wrapper-base, .row-select-selected:nth-child(even) .cell-wrapper-base ': {\n backgroundColor: getIn(theme.colors, tableRow.stripe.backgroundColorSelected),\n },\n '& .row-select-single-selected:nth-child(even):hover:not(.disabled-row) .cell-wrapper-base, .row-select-selected:nth-child(even):hover:not(.disabled-row) .cell-wrapper-base ': {\n backgroundColor: getIn(theme.colors, tableRow.stripe.backgroundColorSelectedHover),\n },\n '& .row-select-single-selected:nth-child(even):focus:not(.disabled-row) .cell-wrapper-base, .row-select-selected:nth-child(even):focus:not(.disabled-row) .cell-wrapper-base ': {\n backgroundColor: getIn(theme.colors, tableRow.stripe.backgroundColorSelectedFocus),\n },\n '& .row-select-single-selected:nth-child(even):active:not(.disabled-row) .cell-wrapper-base, .row-select-selected:nth-child(even):active:not(.disabled-row) .cell-wrapper-base ': {\n backgroundColor: getIn(theme.colors, tableRow.stripe.backgroundColorSelectedActive),\n },\n }),\n },\n };\n },\n);\n\nconst _TableBody = ({ children }: TableBodyProps): React.ReactElement => {\n const { showStripedRows, selectionType } = useTableContext();\n const isSelectable = selectionType !== 'none';\n\n return (\n <StyledBody\n $isSelectable={isSelectable}\n $showStripedRows={showStripedRows}\n {...metaAttribute({ name: MetaConstants.TableBody })}\n >\n {children}\n </StyledBody>\n );\n};\n\nconst TableBody = assignWithoutSideEffects(_TableBody, {\n componentId: ComponentIds.TableBody,\n});\n\nconst StyledCell = styled(Cell)<{\n $backgroundColor: TableBackgroundColors;\n}>(({ theme, $backgroundColor }) => ({\n '&&&': {\n height: '100%',\n backgroundColor: getIn(theme.colors, $backgroundColor),\n '& > div:first-child': {\n alignSelf: 'stretch',\n },\n '&:focus-visible': getFocusRingStyles({ theme, negativeOffset: true }),\n },\n}));\n\nconst CellWrapper = styled(BaseBox)<{\n rowDensity: NonNullable<TableProps<unknown>['rowDensity']>;\n showStripedRows?: boolean;\n}>(({ theme, rowDensity, showStripedRows }) => {\n const rowBackgroundTransition = `background-color ${makeMotionTime(\n getIn(theme.motion, tableRow.backgroundColorMotionDuration),\n )} ${getIn(theme.motion, tableRow.backgroundColorMotionEasing)}`;\n\n return {\n '&&&': {\n transition: rowBackgroundTransition,\n backgroundColor: tableRow.nonStripeWrapper.backgroundColor,\n paddingTop: makeSpace(getIn(theme, tableRow.paddingTop[rowDensity])),\n paddingBottom: makeSpace(getIn(theme, tableRow.paddingBottom[rowDensity])),\n paddingLeft: makeSpace(getIn(theme, tableRow.paddingLeft[rowDensity])),\n paddingRight: makeSpace(getIn(theme, tableRow.paddingRight[rowDensity])),\n height: '100%',\n ...(!showStripedRows && {\n borderBottomWidth: makeSpace(getIn(theme.border.width, tableRow.borderBottomWidth)),\n borderBottomColor: getIn(theme.colors, tableRow.borderBottomColor),\n borderBottomStyle: 'solid',\n }),\n },\n };\n});\n\nconst _TableCell = ({ children }: TableCellProps): React.ReactElement => {\n const isChildrenString = typeof children === 'string';\n const { selectionType, rowDensity, showStripedRows, backgroundColor } = useTableContext();\n const isSelectable = selectionType !== 'none';\n\n return (\n <StyledCell\n tabIndex={0}\n role=\"cell\"\n $backgroundColor={backgroundColor}\n {...metaAttribute({ name: MetaConstants.TableCell })}\n >\n <BaseBox className=\"cell-wrapper-base\" display=\"flex\" alignItems=\"center\" height=\"100%\">\n <CellWrapper\n className=\"cell-wrapper\"\n rowDensity={rowDensity}\n showStripedRows={showStripedRows}\n display=\"flex\"\n alignItems=\"center\"\n flex={1}\n // when a direct string child is passed we want to disable pointer events\n // for custom cells components, consumers can handle pointer events themselves\n pointerEvents={isChildrenString && isSelectable ? 'none' : 'auto'}\n >\n {isChildrenString ? <Text size=\"medium\">{children}</Text> : children}\n </CellWrapper>\n </BaseBox>\n </StyledCell>\n );\n};\n\nconst TableCell = assignWithoutSideEffects(_TableCell, {\n componentId: ComponentIds.TableCell,\n});\n\nconst TableCheckboxCell = ({\n isChecked,\n onChange,\n isDisabled,\n}: {\n isChecked: CheckboxProps['isChecked'];\n onChange: CheckboxProps['onChange'];\n isDisabled?: boolean;\n}): React.ReactElement => {\n return (\n <TableCell>\n <BaseBox\n display=\"flex\"\n alignItems=\"center\"\n justifyContent=\"center\"\n flex={1}\n width={makeSize(checkboxCellWidth)}\n >\n <Checkbox isDisabled={isDisabled} isChecked={isChecked} onChange={onChange} />\n </BaseBox>\n </TableCell>\n );\n};\n\nconst StyledRow = styled(Row)<{ $isSelectable: boolean; $isHoverable: boolean }>(\n ({ theme, $isSelectable, $isHoverable }) => {\n const rowBackgroundTransition = `background-color ${makeMotionTime(\n getIn(theme.motion, tableRow.backgroundColorMotionDuration),\n )} ${getIn(theme.motion, tableRow.backgroundColorMotionEasing)}`;\n\n return {\n '&&&': {\n backgroundColor: 'transparent',\n ...(($isHoverable || $isSelectable) && {\n '&:hover:not(.disabled-row) .cell-wrapper-base': {\n transition: rowBackgroundTransition,\n cursor: 'pointer',\n backgroundColor: getIn(theme.colors, tableRow.nonStripe.backgroundColorHover),\n },\n }),\n ...($isSelectable && {\n '&:focus:not(.disabled-row) .cell-wrapper-base': {\n transition: rowBackgroundTransition,\n backgroundColor: getIn(theme.colors, tableRow.nonStripe.backgroundColorFocus),\n cursor: 'pointer',\n },\n '&:active:not(.disabled-row) .cell-wrapper-base': {\n transition: rowBackgroundTransition,\n backgroundColor: getIn(theme.colors, tableRow.nonStripe.backgroundColorActive),\n cursor: 'pointer',\n },\n }),\n '&:focus': getFocusRingStyles({ theme, negativeOffset: true }),\n },\n };\n },\n);\n\nconst _TableRow = <Item,>({\n children,\n item,\n isDisabled,\n onHover,\n onClick,\n}: TableRowProps<Item>): React.ReactElement => {\n const {\n selectionType,\n selectedRows,\n toggleRowSelectionById,\n setDisabledRows,\n } = useTableContext();\n const isSelectable = selectionType !== 'none';\n const isMultiSelect = selectionType === 'multiple';\n const isSelected = selectedRows?.includes(item.id);\n useEffect(() => {\n if (isDisabled) {\n setDisabledRows((prev) => [...prev, item.id]);\n }\n }, [isDisabled, item.id, setDisabledRows]);\n\n return (\n <StyledRow\n disabled={isDisabled}\n $isSelectable={isDisabled ? false : isSelectable}\n $isHoverable={isDisabled ? false : Boolean(onHover) || Boolean(onClick)}\n item={item}\n className={isDisabled ? 'disabled-row' : ''}\n onMouseEnter={() => onHover?.({ item })}\n onClick={() => onClick?.({ item })}\n {...metaAttribute({ name: MetaConstants.TableRow })}\n >\n {isMultiSelect && (\n <TableCheckboxCell\n isChecked={isSelected}\n onChange={() => !isDisabled && toggleRowSelectionById(item.id)}\n isDisabled={isDisabled}\n />\n )}\n {children}\n </StyledRow>\n );\n};\n\nconst TableRow = assignWithoutSideEffects(_TableRow, {\n componentId: ComponentIds.TableRow,\n});\n\nexport { TableBody, TableRow, TableCell };\n"],"names":["StyledBody","styled","Body","withConfig","displayName","componentId","_ref","theme","$showStripedRows","$isSelectable","rowBackgroundTransition","concat","makeMotionTime","getIn","motion","tableRow","backgroundColorMotionDuration","backgroundColorMotionEasing","_objectSpread","border","transition","borderBottom","backgroundColor","colors","nonStripe","backgroundColorSelected","backgroundColorSelectedHover","backgroundColorSelectedFocus","backgroundColorSelectedActive","nonStripeWrapper","backgroundColorActive","stripeWrapper","stripe","backgroundColorHover","backgroundColorFocus","_TableBody","_ref2","children","_useTableContext","useTableContext","showStripedRows","selectionType","isSelectable","_jsx","metaAttribute","name","MetaConstants","TableBody","assignWithoutSideEffects","ComponentIds","StyledCell","Cell","_ref3","$backgroundColor","height","alignSelf","getFocusRingStyles","negativeOffset","CellWrapper","BaseBox","_ref4","rowDensity","paddingTop","makeSpace","paddingBottom","paddingLeft","paddingRight","borderBottomWidth","width","borderBottomColor","borderBottomStyle","_TableCell","_ref5","isChildrenString","_useTableContext2","tabIndex","role","TableCell","className","display","alignItems","flex","pointerEvents","Text","size","TableCheckboxCell","_ref6","isChecked","onChange","isDisabled","justifyContent","makeSize","checkboxCellWidth","Checkbox","StyledRow","Row","_ref7","$isHoverable","cursor","_TableRow","_ref8","item","onHover","onClick","_useTableContext3","selectedRows","toggleRowSelectionById","setDisabledRows","isMultiSelect","isSelected","includes","id","useEffect","prev","_toConsumableArray","_jsxs","disabled","Boolean","onMouseEnter","TableRow"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuBA,IAAMA,UAAU,gBAAGC,MAAM,CAACC,IAAI,CAAC,CAAAC,UAAA,CAAA;EAAAC,WAAA,EAAA,0BAAA;EAAAC,WAAA,EAAA,cAAA;AAAA,CAC7B,CAAA,CAAA,UAAAC,IAAA,EAAgD;AAAA,EAAA,IAA7CC,KAAK,GAAAD,IAAA,CAALC,KAAK;IAAEC,gBAAgB,GAAAF,IAAA,CAAhBE,gBAAgB;IAAEC,aAAa,GAAAH,IAAA,CAAbG,aAAa,CAAA;AACvC,EAAA,IAAMC,uBAAuB,GAAA,mBAAA,CAAAC,MAAA,CAAuBC,cAAc,CAChEC,KAAK,CAACN,KAAK,CAACO,MAAM,EAAEC,QAAQ,CAACC,6BAA6B,CAC5D,CAAC,EAAAL,GAAAA,CAAAA,CAAAA,MAAA,CAAIE,KAAK,CAACN,KAAK,CAACO,MAAM,EAAEC,QAAQ,CAACE,2BAA2B,CAAC,CAAE,CAAA;EAEhE,OAAO;AACL,IAAA,KAAK,EAAAC,aAAA,CAAAA,aAAA,CAAAA,aAAA,CAAA;AACHC,MAAAA,MAAM,EAAE,MAAM;AACdC,MAAAA,UAAU,EAAEV,uBAAuB;AACnC,MAAA,+BAA+B,EAAE;AAC/BW,QAAAA,YAAY,EAAE,MAAA;OACf;AAED,MAAA,2FAA2F,EAAE;QAC3FC,eAAe,EAAET,KAAK,CAACN,KAAK,CAACgB,MAAM,EAAER,QAA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|
17
17
|
},
|
|
18
18
|
setPaginationPage: function setPaginationPage() {},
|
|
19
19
|
setPaginationRowSize: function setPaginationRowSize() {},
|
|
20
|
-
surfaceLevel: 1,
|
|
21
20
|
disabledRows: [],
|
|
22
|
-
setDisabledRows: function setDisabledRows() {}
|
|
21
|
+
setDisabledRows: function setDisabledRows() {},
|
|
22
|
+
paginationType: 'client',
|
|
23
|
+
setPaginationType: function setPaginationType() {},
|
|
24
|
+
backgroundColor: 'surface.background.gray.intense'
|
|
23
25
|
});
|
|
24
26
|
var useTableContext = function useTableContext() {
|
|
25
27
|
var context = React__default.useContext(TableContext);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableContext.js","sources":["../../../../../../src/components/Table/TableContext.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-empty-function */\n// eslint-disable-next-line @typescript-eslint/no-empty-function\nimport React from 'react';\nimport type { TableNode } from '@table-library/react-table-library/table';\nimport type { TableProps } from './types';\
|
|
1
|
+
{"version":3,"file":"TableContext.js","sources":["../../../../../../src/components/Table/TableContext.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-empty-function */\n// eslint-disable-next-line @typescript-eslint/no-empty-function\nimport React from 'react';\nimport type { TableNode } from '@table-library/react-table-library/table';\nimport type { TableBackgroundColors, TableProps, TablePaginationType } from './types';\n\nexport type TableContextType = {\n selectionType?: TableProps<unknown>['selectionType'];\n selectedRows?: TableNode['id'][];\n totalItems: number;\n toggleRowSelectionById: (id: TableNode['id']) => void;\n toggleAllRowsSelection: () => void;\n deselectAllRows: () => void;\n rowDensity: NonNullable<TableProps<unknown>['rowDensity']>;\n toggleSort: (sortKey: string) => void;\n currentSortedState: {\n sortKey: string;\n isSortReversed: boolean;\n sortableColumns?: string[];\n };\n setPaginationPage: (page: number) => void;\n setPaginationRowSize: (size: number) => void;\n currentPaginationState?: {\n page: number;\n size: number;\n };\n showStripedRows?: boolean;\n disabledRows: TableNode['id'][];\n setDisabledRows: React.Dispatch<React.SetStateAction<TableNode['id'][]>>;\n paginationType: NonNullable<TablePaginationType>;\n setPaginationType: React.Dispatch<React.SetStateAction<NonNullable<TablePaginationType>>>;\n backgroundColor: TableBackgroundColors;\n};\n\nconst TableContext = React.createContext<TableContextType>({\n selectionType: 'none',\n selectedRows: undefined,\n totalItems: 0,\n toggleRowSelectionById: () => {},\n toggleAllRowsSelection: () => {},\n deselectAllRows: () => {},\n rowDensity: 'normal',\n toggleSort: () => {},\n currentSortedState: {\n sortKey: '',\n isSortReversed: false,\n },\n setPaginationPage: () => {},\n setPaginationRowSize: () => {},\n disabledRows: [],\n setDisabledRows: () => {},\n paginationType: 'client',\n setPaginationType: () => {},\n backgroundColor: 'surface.background.gray.intense',\n});\n\nconst useTableContext = (): TableContextType => {\n const context = React.useContext(TableContext);\n return context;\n};\n\nexport { useTableContext, TableContext };\n"],"names":["TableContext","React","createContext","selectionType","selectedRows","undefined","totalItems","toggleRowSelectionById","toggleAllRowsSelection","deselectAllRows","rowDensity","toggleSort","currentSortedState","sortKey","isSortReversed","setPaginationPage","setPaginationRowSize","disabledRows","setDisabledRows","paginationType","setPaginationType","backgroundColor","useTableContext","context","useContext"],"mappings":";;AAAA;AACA;AAiCA,IAAMA,YAAY,gBAAGC,cAAK,CAACC,aAAa,CAAmB;AACzDC,EAAAA,aAAa,EAAE,MAAM;AACrBC,EAAAA,YAAY,EAAEC,SAAS;AACvBC,EAAAA,UAAU,EAAE,CAAC;AACbC,EAAAA,sBAAsB,EAAE,SAAAA,sBAAA,GAAM,EAAE;AAChCC,EAAAA,sBAAsB,EAAE,SAAAA,sBAAA,GAAM,EAAE;AAChCC,EAAAA,eAAe,EAAE,SAAAA,eAAA,GAAM,EAAE;AACzBC,EAAAA,UAAU,EAAE,QAAQ;AACpBC,EAAAA,UAAU,EAAE,SAAAA,UAAA,GAAM,EAAE;AACpBC,EAAAA,kBAAkB,EAAE;AAClBC,IAAAA,OAAO,EAAE,EAAE;AACXC,IAAAA,cAAc,EAAE,KAAA;GACjB;AACDC,EAAAA,iBAAiB,EAAE,SAAAA,iBAAA,GAAM,EAAE;AAC3BC,EAAAA,oBAAoB,EAAE,SAAAA,oBAAA,GAAM,EAAE;AAC9BC,EAAAA,YAAY,EAAE,EAAE;AAChBC,EAAAA,eAAe,EAAE,SAAAA,eAAA,GAAM,EAAE;AACzBC,EAAAA,cAAc,EAAE,QAAQ;AACxBC,EAAAA,iBAAiB,EAAE,SAAAA,iBAAA,GAAM,EAAE;AAC3BC,EAAAA,eAAe,EAAE,iCAAA;AACnB,CAAC,EAAC;AAEF,IAAMC,eAAe,GAAG,SAAlBA,eAAeA,GAA2B;AAC9C,EAAA,IAAMC,OAAO,GAAGtB,cAAK,CAACuB,UAAU,CAACxB,YAAY,CAAC,CAAA;AAC9C,EAAA,OAAOuB,OAAO,CAAA;AAChB;;;;"}
|
|
@@ -3,8 +3,8 @@ import 'react';
|
|
|
3
3
|
import { Footer, FooterRow, FooterCell } from '@table-library/react-table-library/table';
|
|
4
4
|
import styled from 'styled-components';
|
|
5
5
|
import { tableFooter } from './tokens.js';
|
|
6
|
-
import { useTableContext } from './TableContext.js';
|
|
7
6
|
import { ComponentIds } from './componentIds.js';
|
|
7
|
+
import { useTableContext } from './TableContext.js';
|
|
8
8
|
import '../Typography/index.js';
|
|
9
9
|
import '../../utils/index.js';
|
|
10
10
|
import '../../utils/metaAttribute/index.js';
|
|
@@ -62,11 +62,11 @@ var StyledFooterCell = /*#__PURE__*/styled(FooterCell).withConfig({
|
|
|
62
62
|
componentId: "sc-1dkm291-1"
|
|
63
63
|
})(function (_ref4) {
|
|
64
64
|
var theme = _ref4.theme,
|
|
65
|
-
$
|
|
65
|
+
$backgroundColor = _ref4.$backgroundColor;
|
|
66
66
|
return {
|
|
67
67
|
'&&&': {
|
|
68
68
|
height: '100%',
|
|
69
|
-
backgroundColor: getIn(theme.colors,
|
|
69
|
+
backgroundColor: getIn(theme.colors, $backgroundColor),
|
|
70
70
|
borderBottomWidth: makeSpace(getIn(theme.border.width, tableFooter.borderBottomAndTopWidth)),
|
|
71
71
|
borderTopWidth: makeSpace(getIn(theme.border.width, tableFooter.borderBottomAndTopWidth)),
|
|
72
72
|
borderBottomColor: getIn(theme.colors, tableFooter.borderBottomAndTopColor),
|
|
@@ -88,17 +88,17 @@ var StyledFooterCell = /*#__PURE__*/styled(FooterCell).withConfig({
|
|
|
88
88
|
});
|
|
89
89
|
var _TableFooterCell = function _TableFooterCell(_ref5) {
|
|
90
90
|
var children = _ref5.children;
|
|
91
|
-
var _useTableContext = useTableContext(),
|
|
92
|
-
surfaceLevel = _useTableContext.surfaceLevel;
|
|
93
91
|
var isChildrenString = typeof children === 'string';
|
|
92
|
+
var _useTableContext = useTableContext(),
|
|
93
|
+
backgroundColor = _useTableContext.backgroundColor;
|
|
94
94
|
return /*#__PURE__*/jsx(StyledFooterCell, _objectSpread(_objectSpread({
|
|
95
|
-
$
|
|
95
|
+
$backgroundColor: backgroundColor
|
|
96
96
|
}, metaAttribute({
|
|
97
97
|
name: MetaConstants.TableFooterCell
|
|
98
98
|
})), {}, {
|
|
99
99
|
children: isChildrenString ? /*#__PURE__*/jsx(Text, {
|
|
100
100
|
size: "medium",
|
|
101
|
-
weight: "
|
|
101
|
+
weight: "medium",
|
|
102
102
|
children: children
|
|
103
103
|
}) : children
|
|
104
104
|
}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableFooter.web.js","sources":["../../../../../../src/components/Table/TableFooter.web.tsx"],"sourcesContent":["import React from 'react';\nimport { Footer, FooterRow, FooterCell } from '@table-library/react-table-library/table';\nimport styled from 'styled-components';\nimport { tableFooter } from './tokens';\nimport {
|
|
1
|
+
{"version":3,"file":"TableFooter.web.js","sources":["../../../../../../src/components/Table/TableFooter.web.tsx"],"sourcesContent":["import React from 'react';\nimport { Footer, FooterRow, FooterCell } from '@table-library/react-table-library/table';\nimport styled from 'styled-components';\nimport { tableFooter } from './tokens';\nimport { ComponentIds } from './componentIds';\nimport type {\n TableFooterProps,\n TableFooterRowProps,\n TableFooterCellProps,\n TableBackgroundColors,\n} from './types';\nimport { useTableContext } from './TableContext';\nimport { Text } from '~components/Typography';\nimport { makeSpace } from '~utils';\nimport { MetaConstants, metaAttribute } from '~utils/metaAttribute';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport getIn from '~utils/lodashButBetter/get';\n\nconst StyledFooter = styled(Footer)(({ theme }) => ({\n '&&&': {\n backgroundColor: getIn(theme.colors, tableFooter.backgroundColor),\n '& tr:last-child th': {\n borderBottom: 'none',\n },\n },\n}));\n\nconst _TableFooter = ({ children }: TableFooterProps): React.ReactElement => {\n return (\n <StyledFooter isFooter {...metaAttribute({ name: MetaConstants.TableFooter })}>\n {children}\n </StyledFooter>\n );\n};\n\nconst TableFooter = assignWithoutSideEffects(_TableFooter, {\n componentId: ComponentIds.TableFooter,\n});\n\nconst _TableFooterRow = ({ children }: TableFooterRowProps): React.ReactElement => {\n return (\n <FooterRow {...metaAttribute({ name: MetaConstants.TableFooterRow })}>{children}</FooterRow>\n );\n};\n\nconst TableFooterRow = assignWithoutSideEffects(_TableFooterRow, {\n componentId: ComponentIds.TableFooterRow,\n});\n\nconst StyledFooterCell = styled(FooterCell)<{ $backgroundColor: TableBackgroundColors }>(\n ({ theme, $backgroundColor }) => ({\n '&&&': {\n height: '100%',\n backgroundColor: getIn(theme.colors, $backgroundColor),\n borderBottomWidth: makeSpace(getIn(theme.border.width, tableFooter.borderBottomAndTopWidth)),\n borderTopWidth: makeSpace(getIn(theme.border.width, tableFooter.borderBottomAndTopWidth)),\n borderBottomColor: getIn(theme.colors, tableFooter.borderBottomAndTopColor),\n borderTopColor: getIn(theme.colors, tableFooter.borderBottomAndTopColor),\n borderBottomStyle: 'solid',\n borderTopStyle: 'solid',\n '> div': {\n backgroundColor: getIn(theme.colors, tableFooter.backgroundColor),\n display: 'flex',\n flexDirection: 'row',\n height: '100%',\n paddingTop: makeSpace(getIn(theme, tableFooter.paddingTop)),\n paddingBottom: makeSpace(getIn(theme, tableFooter.paddingBottom)),\n paddingLeft: makeSpace(getIn(theme, tableFooter.paddingLeft)),\n paddingRight: makeSpace(getIn(theme, tableFooter.paddingRight)),\n },\n },\n }),\n);\n\nconst _TableFooterCell = ({ children }: TableFooterCellProps): React.ReactElement => {\n const isChildrenString = typeof children === 'string';\n const { backgroundColor } = useTableContext();\n\n return (\n <StyledFooterCell\n $backgroundColor={backgroundColor}\n {...metaAttribute({ name: MetaConstants.TableFooterCell })}\n >\n {isChildrenString ? (\n <Text size=\"medium\" weight=\"medium\">\n {children}\n </Text>\n ) : (\n children\n )}\n </StyledFooterCell>\n );\n};\n\nconst TableFooterCell = assignWithoutSideEffects(_TableFooterCell, {\n componentId: ComponentIds.TableFooterCell,\n});\n\nexport { TableFooter, TableFooterRow, TableFooterCell };\n"],"names":["StyledFooter","styled","Footer","withConfig","displayName","componentId","_ref","theme","backgroundColor","getIn","colors","tableFooter","borderBottom","_TableFooter","_ref2","children","_jsx","_objectSpread","isFooter","metaAttribute","name","MetaConstants","TableFooter","assignWithoutSideEffects","ComponentIds","_TableFooterRow","_ref3","FooterRow","TableFooterRow","StyledFooterCell","FooterCell","_ref4","$backgroundColor","height","borderBottomWidth","makeSpace","border","width","borderBottomAndTopWidth","borderTopWidth","borderBottomColor","borderBottomAndTopColor","borderTopColor","borderBottomStyle","borderTopStyle","display","flexDirection","paddingTop","paddingBottom","paddingLeft","paddingRight","_TableFooterCell","_ref5","isChildrenString","_useTableContext","useTableContext","TableFooterCell","Text","size","weight"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAkBA,IAAMA,YAAY,gBAAGC,MAAM,CAACC,MAAM,CAAC,CAAAC,UAAA,CAAA;EAAAC,WAAA,EAAA,8BAAA;EAAAC,WAAA,EAAA,cAAA;AAAA,CAAA,CAAA,CAAC,UAAAC,IAAA,EAAA;AAAA,EAAA,IAAGC,KAAK,GAAAD,IAAA,CAALC,KAAK,CAAA;EAAA,OAAQ;AAClD,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CAAC;;;;"}
|
|
@@ -14,9 +14,11 @@ import '../Box/BaseBox/index.js';
|
|
|
14
14
|
import '../../utils/metaAttribute/index.js';
|
|
15
15
|
import '../BladeProvider/index.js';
|
|
16
16
|
import getIn from '../../utils/lodashButBetter/get.js';
|
|
17
|
+
import '../../utils/getFocusRingStyles/index.js';
|
|
17
18
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
18
19
|
import { castWebType } from '../../utils/platform/castUtils.js';
|
|
19
20
|
import { makeMotionTime } from '../../utils/makeMotionTime/makeMotionTime.web.js';
|
|
21
|
+
import { getFocusRingStyles } from '../../utils/getFocusRingStyles/getFocusRingStyles.web.js';
|
|
20
22
|
import useTheme from '../BladeProvider/useTheme.js';
|
|
21
23
|
import { makeAccessible } from '../../utils/makeAccessible/makeAccessible.web.js';
|
|
22
24
|
import { metaAttribute } from '../../utils/metaAttribute/metaAttribute.web.js';
|
|
@@ -47,10 +49,9 @@ var SortButton = /*#__PURE__*/styled.button.withConfig({
|
|
|
47
49
|
transitionProperty: 'color, box-shadow',
|
|
48
50
|
transitionDuration: castWebType(makeMotionTime(getIn(theme.motion, 'duration.quick'))),
|
|
49
51
|
transitionTimingFunction: theme.motion.easing.standard,
|
|
50
|
-
'&:focus-visible': {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}
|
|
52
|
+
'&:focus-visible': getFocusRingStyles({
|
|
53
|
+
theme: theme
|
|
54
|
+
})
|
|
54
55
|
};
|
|
55
56
|
});
|
|
56
57
|
var SortIcon = function SortIcon(_ref2) {
|
|
@@ -58,8 +59,8 @@ var SortIcon = function SortIcon(_ref2) {
|
|
|
58
59
|
isSortReversed = _ref2.isSortReversed;
|
|
59
60
|
var _useTheme = useTheme(),
|
|
60
61
|
theme = _useTheme.theme;
|
|
61
|
-
var defaultColor = getIn(theme.colors, '
|
|
62
|
-
var activeColor = getIn(theme.colors, '
|
|
62
|
+
var defaultColor = getIn(theme.colors, 'interactive.icon.gray.muted');
|
|
63
|
+
var activeColor = getIn(theme.colors, 'interactive.icon.primary.subtle');
|
|
63
64
|
var upArrowColor = isSorted && isSortReversed ? activeColor : defaultColor;
|
|
64
65
|
var downArrowColor = isSorted && !isSortReversed ? activeColor : defaultColor;
|
|
65
66
|
return /*#__PURE__*/jsx(SortButton, _objectSpread(_objectSpread({}, makeAccessible({
|
|
@@ -106,12 +107,12 @@ var StyledHeaderCell = /*#__PURE__*/styled(HeaderCell).withConfig({
|
|
|
106
107
|
componentId: "z541ct-2"
|
|
107
108
|
})(function (_ref4) {
|
|
108
109
|
var theme = _ref4.theme,
|
|
109
|
-
$
|
|
110
|
-
$
|
|
110
|
+
$isSortable = _ref4.$isSortable,
|
|
111
|
+
$backgroundColor = _ref4.$backgroundColor;
|
|
111
112
|
return {
|
|
112
113
|
'&&&': {
|
|
113
|
-
backgroundColor: getIn(theme.colors, "surface.background.level".concat($surfaceLevel, ".lowContrast")),
|
|
114
114
|
height: '100%',
|
|
115
|
+
backgroundColor: getIn(theme.colors, $backgroundColor),
|
|
115
116
|
borderBottomWidth: makeSpace(getIn(theme.border.width, tableHeader.borderBottomAndTopWidth)),
|
|
116
117
|
borderTopWidth: makeSpace(getIn(theme.border.width, tableHeader.borderBottomAndTopWidth)),
|
|
117
118
|
borderBottomColor: getIn(theme.colors, tableHeader.borderBottomAndTopColor),
|
|
@@ -131,10 +132,10 @@ var StyledHeaderCell = /*#__PURE__*/styled(HeaderCell).withConfig({
|
|
|
131
132
|
paddingLeft: makeSpace(getIn(theme, tableHeader.paddingLeft)),
|
|
132
133
|
paddingRight: makeSpace(getIn(theme, tableHeader.paddingRight))
|
|
133
134
|
},
|
|
134
|
-
'&:focus-visible': {
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
}
|
|
135
|
+
'&:focus-visible': getFocusRingStyles({
|
|
136
|
+
theme: theme,
|
|
137
|
+
negativeOffset: true
|
|
138
|
+
})
|
|
138
139
|
}
|
|
139
140
|
};
|
|
140
141
|
});
|
|
@@ -145,15 +146,15 @@ var _TableHeaderCell = function _TableHeaderCell(_ref5) {
|
|
|
145
146
|
var _useTableContext = useTableContext(),
|
|
146
147
|
toggleSort = _useTableContext.toggleSort,
|
|
147
148
|
currentSortedState = _useTableContext.currentSortedState,
|
|
148
|
-
|
|
149
|
+
backgroundColor = _useTableContext.backgroundColor;
|
|
149
150
|
var isChildrenString = typeof children === 'string';
|
|
150
151
|
var isSortable = headerKey && Boolean((_currentSortedState$s = currentSortedState.sortableColumns) === null || _currentSortedState$s === void 0 ? void 0 : _currentSortedState$s.find(function (key) {
|
|
151
152
|
return key === headerKey;
|
|
152
153
|
}));
|
|
153
154
|
return /*#__PURE__*/jsxs(StyledHeaderCell, _objectSpread(_objectSpread({
|
|
154
155
|
tabIndex: 0,
|
|
155
|
-
$surfaceLevel: surfaceLevel,
|
|
156
156
|
$isSortable: isSortable,
|
|
157
|
+
$backgroundColor: backgroundColor,
|
|
157
158
|
onClick: function onClick() {
|
|
158
159
|
if (isSortable) {
|
|
159
160
|
toggleSort(headerKey);
|
|
@@ -164,7 +165,8 @@ var _TableHeaderCell = function _TableHeaderCell(_ref5) {
|
|
|
164
165
|
})), {}, {
|
|
165
166
|
children: [isChildrenString ? /*#__PURE__*/jsx(Text, {
|
|
166
167
|
size: "medium",
|
|
167
|
-
weight: "
|
|
168
|
+
weight: "medium",
|
|
169
|
+
color: "surface.text.gray.normal",
|
|
168
170
|
children: children
|
|
169
171
|
}) : children, isSortable && /*#__PURE__*/jsx(BaseBox, {
|
|
170
172
|
paddingLeft: "spacing.2",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableHeader.web.js","sources":["../../../../../../src/components/Table/TableHeader.web.tsx"],"sourcesContent":["import React from 'react';\nimport styled from 'styled-components';\nimport { Header, HeaderRow, HeaderCell } from '@table-library/react-table-library/table';\nimport { tableHeader } from './tokens';\nimport { useTableContext } from './TableContext';\nimport { ComponentIds } from './componentIds';\nimport type { TableHeaderRowProps, TableHeaderCellProps } from './types';\nimport type { CheckboxProps } from '~components/Checkbox';\nimport { Checkbox } from '~components/Checkbox';\nimport { Text } from '~components/Typography';\nimport { castWebType, makeMotionTime, makeSpace } from '~utils';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport BaseBox from '~components/Box/BaseBox';\nimport type { SurfaceLevels } from '~tokens/theme/theme';\nimport { MetaConstants, metaAttribute } from '~utils/metaAttribute';\nimport { useTheme } from '~components/BladeProvider';\nimport getIn from '~utils/lodashButBetter/get';\n\nconst SortButton = styled.button(({ theme }) => ({\n cursor: 'pointer',\n border: 'none',\n padding: 0,\n margin: 0,\n borderRadius: theme.border.radius.small,\n background: 'transparent',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n transitionProperty: 'color, box-shadow',\n transitionDuration: castWebType(makeMotionTime(getIn(theme.motion, 'duration.quick'))),\n transitionTimingFunction: (theme.motion.easing.standard as unknown) as string,\n '&:focus-visible': {\n boxShadow: `0px 0px 0px 4px ${theme.colors.brand.primary[400]}`,\n outline: 'none',\n },\n}));\n\nconst SortIcon = ({\n isSorted,\n isSortReversed,\n}: {\n isSorted: boolean;\n isSortReversed: boolean;\n}): React.ReactElement => {\n const { theme } = useTheme();\n const defaultColor = getIn(theme.colors, 'surface.action.icon.default.lowContrast');\n const activeColor = getIn(theme.colors, 'brand.primary.500');\n const upArrowColor = isSorted && isSortReversed ? activeColor : defaultColor;\n const downArrowColor = isSorted && !isSortReversed ? activeColor : defaultColor;\n return (\n <SortButton {...makeAccessible({ label: 'Toggle Sort', role: 'button' })}>\n <svg width={20} height={20} fill=\"none\">\n <path\n fill={upArrowColor}\n d=\"M10.59 2.251a.817.817 0 0 0-1.18 0L5.245 6.537a.875.875 0 0 0 0 1.212.817.817 0 0 0 1.179 0L10 4.069l3.577 3.68a.817.817 0 0 0 1.179 0 .874.874 0 0 0 0-1.212L10.589 2.25Z\"\n />\n <path\n fill={downArrowColor}\n d=\"M9.41 17.749a.817.817 0 0 0 1.18 0l4.166-4.286a.874.874 0 0 0 0-1.212.817.817 0 0 0-1.179 0L10 15.931l-3.577-3.68a.817.817 0 0 0-1.179 0 .874.874 0 0 0 0 1.212l4.167 4.286Z\"\n />\n </svg>\n </SortButton>\n );\n};\n\nconst StyledHeader = styled(Header)({\n '&&&': {\n '& tr:first-child th': {\n borderTop: 'none',\n },\n },\n});\n\nconst _TableHeader = ({ children }: TableHeaderRowProps): React.ReactElement => {\n return (\n <StyledHeader {...metaAttribute({ name: MetaConstants.TableHeader })}>{children}</StyledHeader>\n );\n};\n\nconst TableHeader = assignWithoutSideEffects(_TableHeader, {\n componentId: ComponentIds.TableHeader,\n});\n\nconst StyledHeaderCell = styled(HeaderCell)<{\n $surfaceLevel: SurfaceLevels;\n $isSortable: boolean;\n}>(({ theme, $surfaceLevel, $isSortable }) => ({\n '&&&': {\n backgroundColor: getIn(theme.colors, `surface.background.level${$surfaceLevel}.lowContrast`),\n height: '100%',\n borderBottomWidth: makeSpace(getIn(theme.border.width, tableHeader.borderBottomAndTopWidth)),\n borderTopWidth: makeSpace(getIn(theme.border.width, tableHeader.borderBottomAndTopWidth)),\n borderBottomColor: getIn(theme.colors, tableHeader.borderBottomAndTopColor),\n borderTopColor: getIn(theme.colors, tableHeader.borderBottomAndTopColor),\n borderBottomStyle: 'solid',\n borderTopStyle: 'solid',\n cursor: $isSortable ? 'pointer' : 'auto',\n '> div': {\n backgroundColor: getIn(theme.colors, tableHeader.backgroundColor),\n display: 'flex',\n flexDirection: 'row',\n justifyContent: 'space-between',\n alignItems: 'center',\n height: '100%',\n paddingTop: makeSpace(getIn(theme, tableHeader.paddingTop)),\n paddingBottom: makeSpace(getIn(theme, tableHeader.paddingBottom)),\n paddingLeft: makeSpace(getIn(theme, tableHeader.paddingLeft)),\n paddingRight: makeSpace(getIn(theme, tableHeader.paddingRight)),\n },\n '&:focus-visible': {\n boxShadow: `0px 0px 0px 4px ${theme.colors.brand.primary[400]} inset`,\n outline: 'none',\n },\n },\n}));\n\nconst _TableHeaderCell = ({ children, headerKey }: TableHeaderCellProps): React.ReactElement => {\n const { toggleSort, currentSortedState, surfaceLevel } = useTableContext();\n const isChildrenString = typeof children === 'string';\n const isSortable =\n headerKey && Boolean(currentSortedState.sortableColumns?.find((key) => key === headerKey));\n return (\n <StyledHeaderCell\n tabIndex={0}\n $surfaceLevel={surfaceLevel}\n $isSortable={isSortable}\n onClick={() => {\n if (isSortable) {\n toggleSort(headerKey);\n }\n }}\n {...metaAttribute({ name: MetaConstants.TableHeaderCell })}\n >\n {isChildrenString ? (\n <Text size=\"medium\" weight=\"bold\">\n {children}\n </Text>\n ) : (\n children\n )}\n {isSortable && (\n <BaseBox paddingLeft=\"spacing.2\" backgroundColor=\"transparent\">\n <SortIcon\n isSorted={currentSortedState.sortKey === headerKey}\n isSortReversed={currentSortedState.isSortReversed}\n />\n </BaseBox>\n )}\n </StyledHeaderCell>\n );\n};\n\nconst TableHeaderCell = assignWithoutSideEffects(_TableHeaderCell, {\n componentId: ComponentIds.TableHeaderCell,\n});\n\nconst TableHeaderCellCheckbox = ({\n isChecked,\n isIndeterminate,\n onChange,\n}: {\n isChecked: CheckboxProps['isChecked'];\n isIndeterminate?: CheckboxProps['isIndeterminate'];\n onChange: CheckboxProps['onChange'];\n}): React.ReactElement => {\n return (\n <TableHeaderCell headerKey=\"SELECT\">\n <BaseBox display=\"flex\" alignItems=\"center\" justifyContent=\"center\" flex={1}>\n <Checkbox isChecked={isChecked} isIndeterminate={isIndeterminate} onChange={onChange} />\n </BaseBox>\n </TableHeaderCell>\n );\n};\n\nconst _TableHeaderRow = ({ children }: TableHeaderRowProps): React.ReactElement => {\n const { selectionType, selectedRows, totalItems, toggleAllRowsSelection } = useTableContext();\n const isMultiSelect = selectionType === 'multiple';\n const isAllSelected = selectedRows && selectedRows.length === totalItems;\n const isIndeterminate = selectedRows && selectedRows.length > 0 && !isAllSelected;\n return (\n <HeaderRow role=\"rowheader\" {...metaAttribute({ name: MetaConstants.TableHeaderRow })}>\n {isMultiSelect && (\n <TableHeaderCellCheckbox\n isChecked={isAllSelected}\n isIndeterminate={isIndeterminate}\n onChange={() => toggleAllRowsSelection()}\n />\n )}\n {children}\n </HeaderRow>\n );\n};\n\nconst TableHeaderRow = assignWithoutSideEffects(_TableHeaderRow, {\n componentId: ComponentIds.TableHeaderRow,\n});\n\nexport { TableHeader, TableHeaderRow, TableHeaderCell };\n"],"names":["SortButton","styled","button","withConfig","displayName","componentId","_ref","theme","cursor","border","padding","margin","borderRadius","radius","small","background","display","alignItems","justifyContent","transitionProperty","transitionDuration","castWebType","makeMotionTime","getIn","motion","transitionTimingFunction","easing","standard","boxShadow","concat","colors","brand","primary","outline","SortIcon","_ref2","isSorted","isSortReversed","_useTheme","useTheme","defaultColor","activeColor","upArrowColor","downArrowColor","_jsx","_objectSpread","makeAccessible","label","role","children","_jsxs","width","height","fill","d","StyledHeader","Header","borderTop","_TableHeader","_ref3","metaAttribute","name","MetaConstants","TableHeader","assignWithoutSideEffects","ComponentIds","StyledHeaderCell","HeaderCell","_ref4","$surfaceLevel","$isSortable","backgroundColor","borderBottomWidth","makeSpace","tableHeader","borderBottomAndTopWidth","borderTopWidth","borderBottomColor","borderBottomAndTopColor","borderTopColor","borderBottomStyle","borderTopStyle","flexDirection","paddingTop","paddingBottom","paddingLeft","paddingRight","_TableHeaderCell","_ref5","_currentSortedState$s","headerKey","_useTableContext","useTableContext","toggleSort","currentSortedState","surfaceLevel","isChildrenString","isSortable","Boolean","sortableColumns","find","key","tabIndex","onClick","TableHeaderCell","Text","size","weight","BaseBox","sortKey","TableHeaderCellCheckbox","_ref6","isChecked","isIndeterminate","onChange","flex","Checkbox","_TableHeaderRow","_ref7","_useTableContext2","selectionType","selectedRows","totalItems","toggleAllRowsSelection","isMultiSelect","isAllSelected","length","HeaderRow","TableHeaderRow"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmBA,IAAMA,UAAU,gBAAGC,MAAM,CAACC,MA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AAA;AAED,IAAM+E,cAAc,gBAAGhE,wBAAwB,CAACqD,eAAe,EAAE;EAC/DhH,WAAW,EAAE4D,YAAY,CAAC+D,cAAAA;AAC5B,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"TableHeader.web.js","sources":["../../../../../../src/components/Table/TableHeader.web.tsx"],"sourcesContent":["import React from 'react';\nimport styled from 'styled-components';\nimport { Header, HeaderRow, HeaderCell } from '@table-library/react-table-library/table';\nimport { tableHeader } from './tokens';\nimport { useTableContext } from './TableContext';\nimport { ComponentIds } from './componentIds';\nimport type { TableHeaderRowProps, TableHeaderCellProps, TableBackgroundColors } from './types';\nimport type { CheckboxProps } from '~components/Checkbox';\nimport { Checkbox } from '~components/Checkbox';\nimport { Text } from '~components/Typography';\nimport { castWebType, makeMotionTime, makeSpace } from '~utils';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport BaseBox from '~components/Box/BaseBox';\nimport { MetaConstants, metaAttribute } from '~utils/metaAttribute';\nimport { useTheme } from '~components/BladeProvider';\nimport getIn from '~utils/lodashButBetter/get';\nimport { getFocusRingStyles } from '~utils/getFocusRingStyles';\n\nconst SortButton = styled.button(({ theme }) => ({\n cursor: 'pointer',\n border: 'none',\n padding: 0,\n margin: 0,\n borderRadius: theme.border.radius.small,\n background: 'transparent',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n transitionProperty: 'color, box-shadow',\n transitionDuration: castWebType(makeMotionTime(getIn(theme.motion, 'duration.quick'))),\n transitionTimingFunction: (theme.motion.easing.standard as unknown) as string,\n '&:focus-visible': getFocusRingStyles({ theme }),\n}));\n\nconst SortIcon = ({\n isSorted,\n isSortReversed,\n}: {\n isSorted: boolean;\n isSortReversed: boolean;\n}): React.ReactElement => {\n const { theme } = useTheme();\n const defaultColor = getIn(theme.colors, 'interactive.icon.gray.muted');\n const activeColor = getIn(theme.colors, 'interactive.icon.primary.subtle');\n const upArrowColor = isSorted && isSortReversed ? activeColor : defaultColor;\n const downArrowColor = isSorted && !isSortReversed ? activeColor : defaultColor;\n return (\n <SortButton {...makeAccessible({ label: 'Toggle Sort', role: 'button' })}>\n <svg width={20} height={20} fill=\"none\">\n <path\n fill={upArrowColor}\n d=\"M10.59 2.251a.817.817 0 0 0-1.18 0L5.245 6.537a.875.875 0 0 0 0 1.212.817.817 0 0 0 1.179 0L10 4.069l3.577 3.68a.817.817 0 0 0 1.179 0 .874.874 0 0 0 0-1.212L10.589 2.25Z\"\n />\n <path\n fill={downArrowColor}\n d=\"M9.41 17.749a.817.817 0 0 0 1.18 0l4.166-4.286a.874.874 0 0 0 0-1.212.817.817 0 0 0-1.179 0L10 15.931l-3.577-3.68a.817.817 0 0 0-1.179 0 .874.874 0 0 0 0 1.212l4.167 4.286Z\"\n />\n </svg>\n </SortButton>\n );\n};\n\nconst StyledHeader = styled(Header)({\n '&&&': {\n '& tr:first-child th': {\n borderTop: 'none',\n },\n },\n});\n\nconst _TableHeader = ({ children }: TableHeaderRowProps): React.ReactElement => {\n return (\n <StyledHeader {...metaAttribute({ name: MetaConstants.TableHeader })}>{children}</StyledHeader>\n );\n};\n\nconst TableHeader = assignWithoutSideEffects(_TableHeader, {\n componentId: ComponentIds.TableHeader,\n});\n\nconst StyledHeaderCell = styled(HeaderCell)<{\n $isSortable: boolean;\n $backgroundColor: TableBackgroundColors;\n}>(({ theme, $isSortable, $backgroundColor }) => ({\n '&&&': {\n height: '100%',\n backgroundColor: getIn(theme.colors, $backgroundColor),\n borderBottomWidth: makeSpace(getIn(theme.border.width, tableHeader.borderBottomAndTopWidth)),\n borderTopWidth: makeSpace(getIn(theme.border.width, tableHeader.borderBottomAndTopWidth)),\n borderBottomColor: getIn(theme.colors, tableHeader.borderBottomAndTopColor),\n borderTopColor: getIn(theme.colors, tableHeader.borderBottomAndTopColor),\n borderBottomStyle: 'solid',\n borderTopStyle: 'solid',\n cursor: $isSortable ? 'pointer' : 'auto',\n '> div': {\n backgroundColor: getIn(theme.colors, tableHeader.backgroundColor),\n display: 'flex',\n flexDirection: 'row',\n justifyContent: 'space-between',\n alignItems: 'center',\n height: '100%',\n paddingTop: makeSpace(getIn(theme, tableHeader.paddingTop)),\n paddingBottom: makeSpace(getIn(theme, tableHeader.paddingBottom)),\n paddingLeft: makeSpace(getIn(theme, tableHeader.paddingLeft)),\n paddingRight: makeSpace(getIn(theme, tableHeader.paddingRight)),\n },\n '&:focus-visible': getFocusRingStyles({ theme, negativeOffset: true }),\n },\n}));\n\nconst _TableHeaderCell = ({ children, headerKey }: TableHeaderCellProps): React.ReactElement => {\n const { toggleSort, currentSortedState, backgroundColor } = useTableContext();\n const isChildrenString = typeof children === 'string';\n const isSortable =\n headerKey && Boolean(currentSortedState.sortableColumns?.find((key) => key === headerKey));\n return (\n <StyledHeaderCell\n tabIndex={0}\n $isSortable={isSortable}\n $backgroundColor={backgroundColor}\n onClick={() => {\n if (isSortable) {\n toggleSort(headerKey);\n }\n }}\n {...metaAttribute({ name: MetaConstants.TableHeaderCell })}\n >\n {isChildrenString ? (\n <Text size=\"medium\" weight=\"medium\" color=\"surface.text.gray.normal\">\n {children}\n </Text>\n ) : (\n children\n )}\n {isSortable && (\n <BaseBox paddingLeft=\"spacing.2\" backgroundColor=\"transparent\">\n <SortIcon\n isSorted={currentSortedState.sortKey === headerKey}\n isSortReversed={currentSortedState.isSortReversed}\n />\n </BaseBox>\n )}\n </StyledHeaderCell>\n );\n};\n\nconst TableHeaderCell = assignWithoutSideEffects(_TableHeaderCell, {\n componentId: ComponentIds.TableHeaderCell,\n});\n\nconst TableHeaderCellCheckbox = ({\n isChecked,\n isIndeterminate,\n onChange,\n}: {\n isChecked: CheckboxProps['isChecked'];\n isIndeterminate?: CheckboxProps['isIndeterminate'];\n onChange: CheckboxProps['onChange'];\n}): React.ReactElement => {\n return (\n <TableHeaderCell headerKey=\"SELECT\">\n <BaseBox display=\"flex\" alignItems=\"center\" justifyContent=\"center\" flex={1}>\n <Checkbox isChecked={isChecked} isIndeterminate={isIndeterminate} onChange={onChange} />\n </BaseBox>\n </TableHeaderCell>\n );\n};\n\nconst _TableHeaderRow = ({ children }: TableHeaderRowProps): React.ReactElement => {\n const { selectionType, selectedRows, totalItems, toggleAllRowsSelection } = useTableContext();\n const isMultiSelect = selectionType === 'multiple';\n const isAllSelected = selectedRows && selectedRows.length === totalItems;\n const isIndeterminate = selectedRows && selectedRows.length > 0 && !isAllSelected;\n return (\n <HeaderRow role=\"rowheader\" {...metaAttribute({ name: MetaConstants.TableHeaderRow })}>\n {isMultiSelect && (\n <TableHeaderCellCheckbox\n isChecked={isAllSelected}\n isIndeterminate={isIndeterminate}\n onChange={() => toggleAllRowsSelection()}\n />\n )}\n {children}\n </HeaderRow>\n );\n};\n\nconst TableHeaderRow = assignWithoutSideEffects(_TableHeaderRow, {\n componentId: ComponentIds.TableHeaderRow,\n});\n\nexport { TableHeader, TableHeaderRow, TableHeaderCell };\n"],"names":["SortButton","styled","button","withConfig","displayName","componentId","_ref","theme","cursor","border","padding","margin","borderRadius","radius","small","background","display","alignItems","justifyContent","transitionProperty","transitionDuration","castWebType","makeMotionTime","getIn","motion","transitionTimingFunction","easing","standard","getFocusRingStyles","SortIcon","_ref2","isSorted","isSortReversed","_useTheme","useTheme","defaultColor","colors","activeColor","upArrowColor","downArrowColor","_jsx","_objectSpread","makeAccessible","label","role","children","_jsxs","width","height","fill","d","StyledHeader","Header","borderTop","_TableHeader","_ref3","metaAttribute","name","MetaConstants","TableHeader","assignWithoutSideEffects","ComponentIds","StyledHeaderCell","HeaderCell","_ref4","$isSortable","$backgroundColor","backgroundColor","borderBottomWidth","makeSpace","tableHeader","borderBottomAndTopWidth","borderTopWidth","borderBottomColor","borderBottomAndTopColor","borderTopColor","borderBottomStyle","borderTopStyle","flexDirection","paddingTop","paddingBottom","paddingLeft","paddingRight","negativeOffset","_TableHeaderCell","_ref5","_currentSortedState$s","headerKey","_useTableContext","useTableContext","toggleSort","currentSortedState","isChildrenString","isSortable","Boolean","sortableColumns","find","key","tabIndex","onClick","TableHeaderCell","Text","size","weight","color","BaseBox","sortKey","TableHeaderCellCheckbox","_ref6","isChecked","isIndeterminate","onChange","flex","Checkbox","_TableHeaderRow","_ref7","_useTableContext2","selectionType","selectedRows","totalItems","toggleAllRowsSelection","isMultiSelect","isAllSelected","length","HeaderRow","TableHeaderRow"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmBA,IAAMA,UAAU,gBAAGC,MAAM,CAACC,MAAM,CAAAC,UAAA,CAAA;EAAAC,WAAA,EAAA,4BAAA;EAAAC,WAAA,EAAA,UAAA;AAAA,CAAA,CAAA,CAAC,UAAAC,IAAA,EAAA;AAAA,EAAA,IAAGC,KAAK,GAAAD,IAAA,CAALC,KAAK,CAAA;EAAA,OAAQ;AAC/CC,IAAAA,MAAM,EAAE,SAAS;AACjBC,IAAAA,MAAM,EAAE,MAAM;AACdC,IAAAA,OAAO,EAAE,CAAC;AACVC,IAAAA,MAAM,EAAE,CAAC;AACTC,IAAAA,YAAY,EAAEL,KAAK,CAACE,MAAM,CAACI,MAAM,CAACC,KAAK;AACvCC,IAAAA,UAAU,EAAE,aAAa;AACzBC,IAAAA,OAAO,EAAE,MAAM;AACfC,IAAAA,UAAU,EAAE,QAAQ;AACpBC,IAAAA,cAAc,EAAE,QAAQ;AACxBC,IAAAA,kBAAkB,EAAE,mBAAmB;AACvCC,IAAAA,kBAAkB,EAAEC,WAAW,CAACC,cAAc,CAACC,KAAK,CAAChB,KAAK,CAACiB,MAAM,EAAE,gBAAgB,CAAC,CAAC,CAAC;AACtFC,IAAAA,wBAAwB,EAAGlB,KAAK,CAACiB,MAAM,CAACE,MAAM,CAACC,QAA8B;IAC7E,iBAAiB,EAAEC,kBAAkB,CAAC;AAAErB,MAAAA,KAAK,EAALA,KAAAA;KAAO,CAAA;GAChD,CAAA;AAAA,CAAC,CAAC,CAAA;AAEH,IAAMsB,QAAQ,GAAG,SAAXA,QAAQA,CAAAC,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A,OAAMS,sBAAsB,EAAE,CAAA;AAAA,OAAA;KACzC,CACF,EACA3E,QAAQ,CAAA;AAAA,GAAA,CACA,CAAC,CAAA;AAEhB,CAAC,CAAA;AAED,IAAMgF,cAAc,gBAAGjE,wBAAwB,CAACsD,eAAe,EAAE;EAC/D7G,WAAW,EAAEwD,YAAY,CAACgE,cAAAA;AAC5B,CAAC;;;;"}
|
|
@@ -18,9 +18,13 @@ import '../Button/index.js';
|
|
|
18
18
|
import '../../utils/makeAccessible/index.js';
|
|
19
19
|
import '../../utils/assignWithoutSideEffects/index.js';
|
|
20
20
|
import '../BladeProvider/index.js';
|
|
21
|
+
import '../../utils/logger/index.js';
|
|
22
|
+
import '../../utils/getFocusRingStyles/index.js';
|
|
21
23
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
22
24
|
import { makeSize } from '../../utils/makeSize/makeSize.js';
|
|
25
|
+
import { getFocusRingStyles } from '../../utils/getFocusRingStyles/getFocusRingStyles.web.js';
|
|
23
26
|
import useTheme from '../BladeProvider/useTheme.js';
|
|
27
|
+
import { throwBladeError } from '../../utils/logger/logger.js';
|
|
24
28
|
import { BaseBox } from '../Box/BaseBox/BaseBox.web.js';
|
|
25
29
|
import { Text } from '../Typography/Text/Text.js';
|
|
26
30
|
import { Dropdown } from '../Dropdown/Dropdown.js';
|
|
@@ -62,10 +66,9 @@ var PageSelectionButton = /*#__PURE__*/styled.button.withConfig({
|
|
|
62
66
|
'&:focus-visible': {
|
|
63
67
|
backgroundColor: isSelected ? getIn(theme.colors, tablePagination.pageSelectionButton.backgroundColorSelectedActive) : getIn(theme.colors, tablePagination.pageSelectionButton.backgroundColorActive),
|
|
64
68
|
outline: 'none',
|
|
65
|
-
'&:focus-visible': {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
}
|
|
69
|
+
'&:focus-visible': getFocusRingStyles({
|
|
70
|
+
theme: theme
|
|
71
|
+
})
|
|
69
72
|
},
|
|
70
73
|
'&:active': {
|
|
71
74
|
backgroundColor: isSelected ? getIn(theme.colors, tablePagination.pageSelectionButton.backgroundColorSelectedActive) : getIn(theme.colors, tablePagination.pageSelectionButton.backgroundColorActive)
|
|
@@ -150,12 +153,16 @@ var _TablePagination = function _TablePagination(_ref3) {
|
|
|
150
153
|
_ref3$showPageNumberS = _ref3.showPageNumberSelector,
|
|
151
154
|
showPageNumberSelector = _ref3$showPageNumberS === void 0 ? false : _ref3$showPageNumberS,
|
|
152
155
|
showLabel = _ref3.showLabel,
|
|
153
|
-
label = _ref3.label
|
|
156
|
+
label = _ref3.label,
|
|
157
|
+
totalItemCount = _ref3.totalItemCount,
|
|
158
|
+
_ref3$paginationType = _ref3.paginationType,
|
|
159
|
+
paginationType = _ref3$paginationType === void 0 ? 'client' : _ref3$paginationType;
|
|
154
160
|
var _useTableContext = useTableContext(),
|
|
155
161
|
setPaginationPage = _useTableContext.setPaginationPage,
|
|
156
162
|
currentPaginationState = _useTableContext.currentPaginationState,
|
|
157
163
|
totalItems = _useTableContext.totalItems,
|
|
158
|
-
setPaginationRowSize = _useTableContext.setPaginationRowSize
|
|
164
|
+
setPaginationRowSize = _useTableContext.setPaginationRowSize,
|
|
165
|
+
setPaginationType = _useTableContext.setPaginationType;
|
|
159
166
|
var _React$useState = React__default.useState(defaultPageSize),
|
|
160
167
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
161
168
|
currentPageSize = _React$useState2[0],
|
|
@@ -174,13 +181,14 @@ var _TablePagination = function _TablePagination(_ref3) {
|
|
|
174
181
|
var onMobile = platform === 'onMobile';
|
|
175
182
|
useEffect(function () {
|
|
176
183
|
setPaginationRowSize(currentPageSize);
|
|
184
|
+
setPaginationType(paginationType);
|
|
177
185
|
}, []);
|
|
178
186
|
useEffect(function () {
|
|
179
187
|
if (currentPage && (currentPaginationState === null || currentPaginationState === void 0 ? void 0 : currentPaginationState.page) !== currentPage) {
|
|
180
188
|
setPaginationPage(currentPage);
|
|
181
189
|
}
|
|
182
190
|
}, [currentPage, currentPaginationState === null || currentPaginationState === void 0 ? void 0 : currentPaginationState.page, setPaginationPage]);
|
|
183
|
-
var totalPages = Math.ceil(totalItems / currentPageSize);
|
|
191
|
+
var totalPages = isUndefined(totalItemCount) ? Math.ceil(totalItems / currentPageSize) : Math.ceil(totalItemCount / currentPageSize);
|
|
184
192
|
var handlePageChange = useCallback(function (page) {
|
|
185
193
|
var pageToJumpTo = page;
|
|
186
194
|
if (pageToJumpTo < 0) {
|
|
@@ -202,6 +210,14 @@ var _TablePagination = function _TablePagination(_ref3) {
|
|
|
202
210
|
handlePageChange(controlledCurrentPage);
|
|
203
211
|
}
|
|
204
212
|
}, [controlledCurrentPage, currentPage, handlePageChange, onPageChange]);
|
|
213
|
+
if (false) {
|
|
214
|
+
if (paginationType === 'server' && (isUndefined(totalItemCount) || isUndefined(onPageChange))) {
|
|
215
|
+
throwBladeError({
|
|
216
|
+
message: '`onPageChange` and `totalItemCount` props are required when paginationType is server.',
|
|
217
|
+
moduleName: 'TablePagination'
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
}
|
|
205
221
|
var handlePageSizeChange = function handlePageSizeChange(pageSize) {
|
|
206
222
|
onPageSizeChange === null || onPageSizeChange === void 0 ? void 0 : onPageSizeChange({
|
|
207
223
|
pageSize: pageSize
|
|
@@ -227,7 +243,7 @@ var _TablePagination = function _TablePagination(_ref3) {
|
|
|
227
243
|
alignItems: "center",
|
|
228
244
|
children: /*#__PURE__*/jsx(Text, {
|
|
229
245
|
size: "medium",
|
|
230
|
-
weight: "
|
|
246
|
+
weight: "semibold",
|
|
231
247
|
children: label !== null && label !== void 0 ? label : defaultLabel
|
|
232
248
|
})
|
|
233
249
|
}), /*#__PURE__*/jsxs(BaseBox, {
|