@razorpay/blade 11.11.0 → 11.12.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/ActionList/ActionListBox.native.js.map +1 -1
- package/build/lib/native/components/Amount/Amount.js +1 -1
- package/build/lib/native/components/Amount/Amount.js.map +1 -1
- package/build/lib/native/components/BottomSheet/BottomSheet.native.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/AnimatedButtonContent.native.js.map +1 -1
- package/build/lib/native/components/Button/BaseButton/StyledBaseButton.native.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/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/BaseInput.js +2 -1
- package/build/lib/native/components/Input/BaseInput/BaseInput.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/BaseInputWrapper.js +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/BaseInput/useTaggedInput.js +13 -0
- package/build/lib/native/components/Input/BaseInput/useTaggedInput.js.map +1 -0
- package/build/lib/native/components/Input/OTPInput/OTPInput.js +1 -1
- package/build/lib/native/components/Input/OTPInput/OTPInput.js.map +1 -1
- package/build/lib/native/components/Input/TextArea/TextArea.js +2 -1
- package/build/lib/native/components/Input/TextArea/TextArea.js.map +1 -1
- package/build/lib/native/components/Input/TextInput/TextInput.js +2 -1
- package/build/lib/native/components/Input/TextInput/TextInput.js.map +1 -1
- package/build/lib/native/components/PopupArrow/PopupArrow.native.js +1 -1
- package/build/lib/native/components/PopupArrow/PopupArrow.native.js.map +1 -1
- package/build/lib/native/components/Tabs/Tabs.native.js.map +1 -1
- package/build/lib/native/components/Tag/AnimatedTag.native.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/Tag/getTagsGroup.js +1 -1
- package/build/lib/native/components/Tag/getTagsGroup.js.map +1 -1
- package/build/lib/native/components/Tag/tagAnimationConfig.js +1 -2
- package/build/lib/native/components/Tag/tagAnimationConfig.js.map +1 -1
- package/build/lib/native/components/Typography/BaseText/getBaseTextStyles.js +1 -1
- package/build/lib/native/components/Typography/BaseText/getBaseTextStyles.js.map +1 -1
- package/build/lib/native/utils/mergeProps.js +1 -1
- package/build/lib/native/utils/mergeProps.js.map +1 -1
- package/build/lib/web/development/components/Accordion/Accordion.js +2 -2
- package/build/lib/web/development/components/Accordion/AccordionButton.web.js +2 -2
- package/build/lib/web/development/components/Accordion/AccordionItem.js +2 -2
- package/build/lib/web/development/components/Accordion/AccordionItemBody.js +2 -2
- package/build/lib/web/development/components/Accordion/AccordionItemHeader.js +2 -2
- package/build/lib/web/development/components/Accordion/StyledAccordionButton.web.js +2 -2
- package/build/lib/web/development/components/ActionList/ActionList.js +2 -2
- package/build/lib/web/development/components/ActionList/ActionListBox.web.js +2 -2
- package/build/lib/web/development/components/ActionList/ActionListItem.js +2 -2
- package/build/lib/web/development/components/ActionList/actionListUtils.js +2 -2
- package/build/lib/web/development/components/ActionList/styles/StyledActionListItem.web.js +2 -2
- package/build/lib/web/development/components/ActionList/styles/StyledListBoxWrapper.web.js +4 -5
- package/build/lib/web/development/components/ActionList/styles/StyledListBoxWrapper.web.js.map +1 -1
- package/build/lib/web/development/components/Alert/Alert.js +2 -2
- package/build/lib/web/development/components/Amount/Amount.js +5 -3
- package/build/lib/web/development/components/Amount/Amount.js.map +1 -1
- package/build/lib/web/development/components/Badge/Badge.js +2 -2
- package/build/lib/web/development/components/Badge/StyledBadge.web.js +2 -2
- package/build/lib/web/development/components/BaseHeaderFooter/BaseFooter.js +2 -2
- package/build/lib/web/development/components/BaseHeaderFooter/BaseHeader.js +2 -2
- package/build/lib/web/development/components/BladeProvider/useBladeProvider.js +2 -2
- package/build/lib/web/development/components/BottomSheet/BottomSheet.web.js +2 -2
- package/build/lib/web/development/components/BottomSheet/BottomSheetBackdrop.web.js +2 -2
- package/build/lib/web/development/components/BottomSheet/BottomSheetBody.web.js +2 -2
- package/build/lib/web/development/components/BottomSheet/BottomSheetCommon.js +2 -2
- package/build/lib/web/development/components/BottomSheet/BottomSheetFooter.web.js +2 -2
- package/build/lib/web/development/components/BottomSheet/BottomSheetHeader.web.js +2 -2
- package/build/lib/web/development/components/BottomSheet/getBottomSheetGrabHandleStyles.js +2 -2
- package/build/lib/web/development/components/Box/BaseBox/BaseBox.web.js +2 -2
- package/build/lib/web/development/components/Box/BaseBox/baseBoxStyles.js +4 -3
- package/build/lib/web/development/components/Box/BaseBox/baseBoxStyles.js.map +1 -1
- package/build/lib/web/development/components/Box/BaseBox/types/propsTypes.js.map +1 -1
- package/build/lib/web/development/components/Box/BaseBox/useMemoizedStyles.web.js +2 -2
- package/build/lib/web/development/components/Box/Box.js +2 -2
- package/build/lib/web/development/components/Box/styledProps/getStyledProps.js +3 -1
- package/build/lib/web/development/components/Box/styledProps/getStyledProps.js.map +1 -1
- package/build/lib/web/development/components/Box/styledProps/useStyledProps.js +4 -3
- package/build/lib/web/development/components/Box/styledProps/useStyledProps.js.map +1 -1
- package/build/lib/web/development/components/Breadcrumb/Breadcrumb.web.js +2 -2
- package/build/lib/web/development/components/Button/BaseButton/BaseButton.js +2 -3
- package/build/lib/web/development/components/Button/BaseButton/BaseButton.js.map +1 -1
- package/build/lib/web/development/components/Button/BaseButton/StyledBaseButton.web.js +2 -2
- package/build/lib/web/development/components/Button/Button/Button.js +2 -2
- package/build/lib/web/development/components/Button/IconButton/StyledIconButton.web.js +2 -2
- package/build/lib/web/development/components/ButtonGroup/ButtonGroup.web.js +2 -3
- package/build/lib/web/development/components/ButtonGroup/ButtonGroup.web.js.map +1 -1
- package/build/lib/web/development/components/Card/Card.js +2 -2
- package/build/lib/web/development/components/Card/CardFooter.js +2 -2
- package/build/lib/web/development/components/Card/CardHeader.js +2 -2
- package/build/lib/web/development/components/Card/CardRoot.web.js +5 -6
- package/build/lib/web/development/components/Card/CardRoot.web.js.map +1 -1
- package/build/lib/web/development/components/Carousel/Carousel.web.js +2 -2
- package/build/lib/web/development/components/Carousel/CarouselItem.web.js +2 -2
- package/build/lib/web/development/components/Carousel/Indicators/IndicatorButton.js +2 -2
- package/build/lib/web/development/components/Carousel/Indicators/Indicators.js +2 -2
- package/build/lib/web/development/components/Carousel/Indicators/getIndicatorButtonStyles.js +2 -2
- package/build/lib/web/development/components/Carousel/NavigationButton/NavigationButton.js +2 -2
- package/build/lib/web/development/components/Carousel/NavigationButton/getNavigationButtonStyles.js +2 -2
- package/build/lib/web/development/components/Checkbox/Checkbox.js +2 -2
- package/build/lib/web/development/components/Checkbox/CheckboxGroup/CheckboxGroup.js +2 -2
- package/build/lib/web/development/components/Checkbox/CheckboxIcon/CheckboxIcon.js +2 -2
- package/build/lib/web/development/components/Checkbox/CheckboxIcon/Fade.web.js +2 -2
- package/build/lib/web/development/components/Checkbox/useCheckbox.js +2 -2
- package/build/lib/web/development/components/Chip/AnimatedChip.web.js +2 -2
- package/build/lib/web/development/components/Chip/Chip.js +2 -2
- package/build/lib/web/development/components/Chip/ChipGroup.js +2 -2
- package/build/lib/web/development/components/Chip/StyledChipWrapper.web.js +2 -2
- package/build/lib/web/development/components/Collapsible/Collapsible.js +2 -2
- package/build/lib/web/development/components/Collapsible/CollapsibleBody.js +2 -2
- package/build/lib/web/development/components/Collapsible/CollapsibleBodyContent.web.js +2 -2
- package/build/lib/web/development/components/Collapsible/CollapsibleChevronIcon.web.js +2 -2
- package/build/lib/web/development/components/Counter/Counter.js +2 -2
- package/build/lib/web/development/components/Counter/StyledCounter.web.js +2 -2
- package/build/lib/web/development/components/Divider/Divider.js +4 -5
- package/build/lib/web/development/components/Divider/Divider.js.map +1 -1
- package/build/lib/web/development/components/Drawer/Drawer.web.js +2 -2
- package/build/lib/web/development/components/Dropdown/Dropdown.js +2 -2
- package/build/lib/web/development/components/Dropdown/DropdownButton.js +2 -2
- package/build/lib/web/development/components/Dropdown/DropdownHeaderFooter.js +2 -2
- package/build/lib/web/development/components/Dropdown/DropdownLink.js +2 -2
- package/build/lib/web/development/components/Dropdown/DropdownOverlay.web.js +2 -2
- package/build/lib/web/development/components/Dropdown/useDropdown.js +2 -2
- package/build/lib/web/development/components/FileUpload/FileUpload.web.js +2 -2
- package/build/lib/web/development/components/FileUpload/FileUploadItemIcon.js +2 -2
- package/build/lib/web/development/components/FileUpload/StyledFileUploadItemWrapper.js +2 -2
- package/build/lib/web/development/components/FileUpload/StyledFileUploadWrapper.js +2 -2
- package/build/lib/web/development/components/Form/FormLabel.js +2 -2
- package/build/lib/web/development/components/Form/Selector/SelectorGroupField.js +2 -2
- package/build/lib/web/development/components/Form/Selector/SelectorInput.web.js +2 -2
- package/build/lib/web/development/components/Form/Selector/SelectorLabel.web.js +2 -2
- package/build/lib/web/development/components/Icons/ActivityIcon/ActivityIcon.js +2 -2
- package/build/lib/web/development/components/Icons/AirplayIcon/AirplayIcon.js +2 -2
- package/build/lib/web/development/components/Icons/AlertCircleIcon/AlertCircleIcon.js +2 -2
- package/build/lib/web/development/components/Icons/AlertOctagonIcon/AlertOctagonIcon.js +2 -2
- package/build/lib/web/development/components/Icons/AlertOnlyIcon/AlertOnlyIcon.js +2 -2
- package/build/lib/web/development/components/Icons/AlertTriangleIcon/AlertTriangleIcon.js +2 -2
- package/build/lib/web/development/components/Icons/AlignCenterIcon/AlignCenterIcon.js +2 -2
- package/build/lib/web/development/components/Icons/AlignJustifyIcon/AlignJustifyIcon.js +2 -2
- package/build/lib/web/development/components/Icons/AlignLeftIcon/AlignLeftIcon.js +2 -2
- package/build/lib/web/development/components/Icons/AlignRightIcon/AlignRightIcon.js +2 -2
- package/build/lib/web/development/components/Icons/AnchorIcon/AnchorIcon.js +2 -2
- package/build/lib/web/development/components/Icons/AnnouncementIcon/AnnouncementIcon.js +2 -2
- package/build/lib/web/development/components/Icons/ApertureIcon/ApertureIcon.js +2 -2
- package/build/lib/web/development/components/Icons/AppStoreIcon/AppStoreIcon.js +2 -2
- package/build/lib/web/development/components/Icons/ArrowDownIcon/ArrowDownIcon.js +2 -2
- package/build/lib/web/development/components/Icons/ArrowDownLeftIcon/ArrowDownLeftIcon.js +2 -2
- package/build/lib/web/development/components/Icons/ArrowDownRightIcon/ArrowDownRightIcon.js +2 -2
- package/build/lib/web/development/components/Icons/ArrowLeftIcon/ArrowLeftIcon.js +2 -2
- package/build/lib/web/development/components/Icons/ArrowRightIcon/ArrowRightIcon.js +2 -2
- package/build/lib/web/development/components/Icons/ArrowUpIcon/ArrowUpIcon.js +2 -2
- package/build/lib/web/development/components/Icons/ArrowUpLeftIcon/ArrowUpLeftIcon.js +2 -2
- package/build/lib/web/development/components/Icons/ArrowUpRightIcon/ArrowUpRightIcon.js +2 -2
- package/build/lib/web/development/components/Icons/AtSignIcon/AtSignIcon.js +2 -2
- package/build/lib/web/development/components/Icons/AttachmentIcon/AttachmentIcon.js +2 -2
- package/build/lib/web/development/components/Icons/AwardIcon/AwardIcon.js +2 -2
- package/build/lib/web/development/components/Icons/BankIcon/BankIcon.js +2 -2
- package/build/lib/web/development/components/Icons/BarChartAltIcon/BarChartAltIcon.js +2 -2
- package/build/lib/web/development/components/Icons/BarChartIcon/BarChartIcon.js +2 -2
- package/build/lib/web/development/components/Icons/BatteryChargingIcon/BatteryChargingIcon.js +2 -2
- package/build/lib/web/development/components/Icons/BatteryIcon/BatteryIcon.js +2 -2
- package/build/lib/web/development/components/Icons/BellIcon/BellIcon.js +2 -2
- package/build/lib/web/development/components/Icons/BellOffIcon/BellOffIcon.js +2 -2
- package/build/lib/web/development/components/Icons/BillIcon/BillIcon.js +2 -2
- package/build/lib/web/development/components/Icons/BluetoothIcon/BluetoothIcon.js +2 -2
- package/build/lib/web/development/components/Icons/BoldIcon/BoldIcon.js +2 -2
- package/build/lib/web/development/components/Icons/BookIcon/BookIcon.js +2 -2
- package/build/lib/web/development/components/Icons/BookmarkIcon/BookmarkIcon.js +2 -2
- package/build/lib/web/development/components/Icons/BoxIcon/BoxIcon.js +2 -2
- package/build/lib/web/development/components/Icons/BriefcaseIcon/BriefcaseIcon.js +2 -2
- package/build/lib/web/development/components/Icons/BulkPayoutsIcon/BulkPayoutsIcon.js +2 -2
- package/build/lib/web/development/components/Icons/CalendarIcon/CalendarIcon.js +2 -2
- package/build/lib/web/development/components/Icons/CameraIcon/CameraIcon.js +2 -2
- package/build/lib/web/development/components/Icons/CameraOffIcon/CameraOffIcon.js +2 -2
- package/build/lib/web/development/components/Icons/CastIcon/CastIcon.js +2 -2
- package/build/lib/web/development/components/Icons/CheckCircleIcon/CheckCircleIcon.js +2 -2
- package/build/lib/web/development/components/Icons/CheckIcon/CheckIcon.js +2 -2
- package/build/lib/web/development/components/Icons/CheckSquareIcon/CheckSquareIcon.js +2 -2
- package/build/lib/web/development/components/Icons/ChevronDownIcon/ChevronDownIcon.js +2 -2
- package/build/lib/web/development/components/Icons/ChevronLeftIcon/ChevronLeftIcon.js +2 -2
- package/build/lib/web/development/components/Icons/ChevronRightIcon/ChevronRightIcon.js +2 -2
- package/build/lib/web/development/components/Icons/ChevronUpIcon/ChevronUpIcon.js +2 -2
- package/build/lib/web/development/components/Icons/ChevronsDownIcon/ChevronsDownIcon.js +2 -2
- package/build/lib/web/development/components/Icons/ChevronsLeftIcon/ChevronsLeftIcon.js +2 -2
- package/build/lib/web/development/components/Icons/ChevronsRightIcon/ChevronsRightIcon.js +2 -2
- package/build/lib/web/development/components/Icons/ChevronsUpIcon/ChevronsUpIcon.js +2 -2
- package/build/lib/web/development/components/Icons/ChromeIcon/ChromeIcon.js +2 -2
- package/build/lib/web/development/components/Icons/CircleIcon/CircleIcon.js +2 -2
- package/build/lib/web/development/components/Icons/ClipboardIcon/ClipboardIcon.js +2 -2
- package/build/lib/web/development/components/Icons/ClockIcon/ClockIcon.js +2 -2
- package/build/lib/web/development/components/Icons/CloseIcon/CloseIcon.js +2 -2
- package/build/lib/web/development/components/Icons/CloudDrizzleIcon/CloudDrizzleIcon.js +2 -2
- package/build/lib/web/development/components/Icons/CloudIcon/CloudIcon.js +2 -2
- package/build/lib/web/development/components/Icons/CloudLightningIcon/CloudLightningIcon.js +2 -2
- package/build/lib/web/development/components/Icons/CloudOffIcon/CloudOffIcon.js +2 -2
- package/build/lib/web/development/components/Icons/CloudRainIcon/CloudRainIcon.js +2 -2
- package/build/lib/web/development/components/Icons/CloudSnowIcon/CloudSnowIcon.js +2 -2
- package/build/lib/web/development/components/Icons/CodepenIcon/CodepenIcon.js +2 -2
- package/build/lib/web/development/components/Icons/CoinsIcon/CoinsIcon.js +2 -2
- package/build/lib/web/development/components/Icons/CommandIcon/CommandIcon.js +2 -2
- package/build/lib/web/development/components/Icons/CompassIcon/CompassIcon.js +2 -2
- package/build/lib/web/development/components/Icons/CopyIcon/CopyIcon.js +2 -2
- package/build/lib/web/development/components/Icons/CornerDownLeftIcon/CornerDownLeftIcon.js +2 -2
- package/build/lib/web/development/components/Icons/CornerDownRightIcon/CornerDownRightIcon.js +2 -2
- package/build/lib/web/development/components/Icons/CornerLeftDownIcon/CornerLeftDownIcon.js +2 -2
- package/build/lib/web/development/components/Icons/CornerLeftUpIcon/CornerLeftUpIcon.js +2 -2
- package/build/lib/web/development/components/Icons/CornerRightDownIcon/CornerRightDownIcon.js +2 -2
- package/build/lib/web/development/components/Icons/CornerRightUpIcon/CornerRightUpIcon.js +2 -2
- package/build/lib/web/development/components/Icons/CornerUpLeftIcon/CornerUpLeftIcon.js +2 -2
- package/build/lib/web/development/components/Icons/CornerUpRightIcon/CornerUpRightIcon.js +2 -2
- package/build/lib/web/development/components/Icons/CpuIcon/CpuIcon.js +2 -2
- package/build/lib/web/development/components/Icons/CreditCardIcon/CreditCardIcon.js +2 -2
- package/build/lib/web/development/components/Icons/CropIcon/CropIcon.js +2 -2
- package/build/lib/web/development/components/Icons/CrosshairIcon/CrosshairIcon.js +2 -2
- package/build/lib/web/development/components/Icons/CustomersIcon/CustomersIcon.js +2 -2
- package/build/lib/web/development/components/Icons/CutIcon/CutIcon.js +2 -2
- package/build/lib/web/development/components/Icons/DashboardIcon/DashboardIcon.js +2 -2
- package/build/lib/web/development/components/Icons/DeleteIcon/DeleteIcon.js +2 -2
- package/build/lib/web/development/components/Icons/DiscIcon/DiscIcon.js +2 -2
- package/build/lib/web/development/components/Icons/DollarIcon/DollarIcon.js +2 -2
- package/build/lib/web/development/components/Icons/DollarsIcon/DollarsIcon.js +2 -2
- package/build/lib/web/development/components/Icons/DownloadCloudIcon/DownloadCloudIcon.js +2 -2
- package/build/lib/web/development/components/Icons/DownloadIcon/DownloadIcon.js +2 -2
- package/build/lib/web/development/components/Icons/DropletIcon/DropletIcon.js +2 -2
- package/build/lib/web/development/components/Icons/EditComposeIcon/EditComposeIcon.js +2 -2
- package/build/lib/web/development/components/Icons/EditIcon/EditIcon.js +2 -2
- package/build/lib/web/development/components/Icons/EditInlineIcon/EditInlineIcon.js +2 -2
- package/build/lib/web/development/components/Icons/ExportIcon/ExportIcon.js +2 -2
- package/build/lib/web/development/components/Icons/ExternalLinkIcon/ExternalLinkIcon.js +2 -2
- package/build/lib/web/development/components/Icons/EyeIcon/EyeIcon.js +2 -2
- package/build/lib/web/development/components/Icons/EyeOffIcon/EyeOffIcon.js +2 -2
- package/build/lib/web/development/components/Icons/FacebookIcon/FacebookIcon.js +2 -2
- package/build/lib/web/development/components/Icons/FastForwardIcon/FastForwardIcon.js +2 -2
- package/build/lib/web/development/components/Icons/FeatherIcon/FeatherIcon.js +2 -2
- package/build/lib/web/development/components/Icons/FileIcon/FileIcon.js +2 -2
- package/build/lib/web/development/components/Icons/FileMinusIcon/FileMinusIcon.js +2 -2
- package/build/lib/web/development/components/Icons/FilePlusIcon/FilePlusIcon.js +2 -2
- package/build/lib/web/development/components/Icons/FileTextIcon/FileTextIcon.js +2 -2
- package/build/lib/web/development/components/Icons/FileZipIcon/FileZipIcon.js +2 -2
- package/build/lib/web/development/components/Icons/FilmIcon/FilmIcon.js +2 -2
- package/build/lib/web/development/components/Icons/FilterIcon/FilterIcon.js +2 -2
- package/build/lib/web/development/components/Icons/FlagIcon/FlagIcon.js +2 -2
- package/build/lib/web/development/components/Icons/FolderIcon/FolderIcon.js +2 -2
- package/build/lib/web/development/components/Icons/FullScreenEnterIcon/FullScreenEnterIcon.js +2 -2
- package/build/lib/web/development/components/Icons/FullScreenExitIcon/FullScreenExitIcon.js +2 -2
- package/build/lib/web/development/components/Icons/GithubIcon/GithubIcon.js +2 -2
- package/build/lib/web/development/components/Icons/GitlabIcon/GitlabIcon.js +2 -2
- package/build/lib/web/development/components/Icons/GlobeIcon/GlobeIcon.js +2 -2
- package/build/lib/web/development/components/Icons/GridIcon/GridIcon.js +2 -2
- package/build/lib/web/development/components/Icons/HashIcon/HashIcon.js +2 -2
- package/build/lib/web/development/components/Icons/HeadphonesIcon/HeadphonesIcon.js +2 -2
- package/build/lib/web/development/components/Icons/HeartIcon/HeartIcon.js +2 -2
- package/build/lib/web/development/components/Icons/HelpCircleIcon/HelpCircleIcon.js +2 -2
- package/build/lib/web/development/components/Icons/HistoryIcon/HistoryIcon.js +2 -2
- package/build/lib/web/development/components/Icons/HomeIcon/HomeIcon.js +2 -2
- package/build/lib/web/development/components/Icons/ImageIcon/ImageIcon.js +2 -2
- package/build/lib/web/development/components/Icons/InboxIcon/InboxIcon.js +2 -2
- package/build/lib/web/development/components/Icons/InfoIcon/InfoIcon.js +2 -2
- package/build/lib/web/development/components/Icons/InstagramIcon/InstagramIcon.js +2 -2
- package/build/lib/web/development/components/Icons/InvoicesIcon/InvoicesIcon.js +2 -2
- package/build/lib/web/development/components/Icons/ItalicIcon/ItalicIcon.js +2 -2
- package/build/lib/web/development/components/Icons/LayersIcon/LayersIcon.js +2 -2
- package/build/lib/web/development/components/Icons/LayoutIcon/LayoutIcon.js +2 -2
- package/build/lib/web/development/components/Icons/LifeBuoyIcon/LifeBuoyIcon.js +2 -2
- package/build/lib/web/development/components/Icons/LinkIcon/LinkIcon.js +2 -2
- package/build/lib/web/development/components/Icons/ListIcon/ListIcon.js +2 -2
- package/build/lib/web/development/components/Icons/LoaderIcon/LoaderIcon.js +2 -2
- package/build/lib/web/development/components/Icons/LockIcon/LockIcon.js +2 -2
- package/build/lib/web/development/components/Icons/LogInIcon/LogInIcon.js +2 -2
- package/build/lib/web/development/components/Icons/LogOutIcon/LogOutIcon.js +2 -2
- package/build/lib/web/development/components/Icons/MailIcon/MailIcon.js +2 -2
- package/build/lib/web/development/components/Icons/MailOpenIcon/MailOpenIcon.js +2 -2
- package/build/lib/web/development/components/Icons/MapIcon/MapIcon.js +2 -2
- package/build/lib/web/development/components/Icons/MapPinIcon/MapPinIcon.js +2 -2
- package/build/lib/web/development/components/Icons/MaximizeIcon/MaximizeIcon.js +2 -2
- package/build/lib/web/development/components/Icons/MenuDotsIcon/MenuDotsIcon.js +2 -2
- package/build/lib/web/development/components/Icons/MenuIcon/MenuIcon.js +2 -2
- package/build/lib/web/development/components/Icons/MessageCircleIcon/MessageCircleIcon.js +2 -2
- package/build/lib/web/development/components/Icons/MessageSquareIcon/MessageSquareIcon.js +2 -2
- package/build/lib/web/development/components/Icons/MicIcon/MicIcon.js +2 -2
- package/build/lib/web/development/components/Icons/MicOffIcon/MicOffIcon.js +2 -2
- package/build/lib/web/development/components/Icons/MinimizeIcon/MinimizeIcon.js +2 -2
- package/build/lib/web/development/components/Icons/MinusCircleIcon/MinusCircleIcon.js +2 -2
- package/build/lib/web/development/components/Icons/MinusIcon/MinusIcon.js +2 -2
- package/build/lib/web/development/components/Icons/MinusSquareIcon/MinusSquareIcon.js +2 -2
- package/build/lib/web/development/components/Icons/MonitorIcon/MonitorIcon.js +2 -2
- package/build/lib/web/development/components/Icons/MoonIcon/MoonIcon.js +2 -2
- package/build/lib/web/development/components/Icons/MoreHorizontalIcon/MoreHorizontalIcon.js +2 -2
- package/build/lib/web/development/components/Icons/MoreVerticalIcon/MoreVerticalIcon.js +2 -2
- package/build/lib/web/development/components/Icons/MoveIcon/MoveIcon.js +2 -2
- package/build/lib/web/development/components/Icons/MusicIcon/MusicIcon.js +2 -2
- package/build/lib/web/development/components/Icons/MyAccountIcon/MyAccountIcon.js +2 -2
- package/build/lib/web/development/components/Icons/NavigationIcon/NavigationIcon.js +2 -2
- package/build/lib/web/development/components/Icons/OctagonIcon/OctagonIcon.js +2 -2
- package/build/lib/web/development/components/Icons/OffersIcon/OffersIcon.js +2 -2
- package/build/lib/web/development/components/Icons/PackageIcon/PackageIcon.js +2 -2
- package/build/lib/web/development/components/Icons/PaperclipIcon/PaperclipIcon.js +2 -2
- package/build/lib/web/development/components/Icons/PauseCircleIcon/PauseCircleIcon.js +2 -2
- package/build/lib/web/development/components/Icons/PauseIcon/PauseIcon.js +2 -2
- package/build/lib/web/development/components/Icons/PaymentButtonsIcon/PaymentButtonsIcon.js +2 -2
- package/build/lib/web/development/components/Icons/PaymentLinksIcon/PaymentLinksIcon.js +2 -2
- package/build/lib/web/development/components/Icons/PaymentPagesIcon/PaymentPagesIcon.js +2 -2
- package/build/lib/web/development/components/Icons/PercentIcon/PercentIcon.js +2 -2
- package/build/lib/web/development/components/Icons/PhoneCallIcon/PhoneCallIcon.js +2 -2
- package/build/lib/web/development/components/Icons/PhoneForwardedIcon/PhoneForwardedIcon.js +2 -2
- package/build/lib/web/development/components/Icons/PhoneIcon/PhoneIcon.js +2 -2
- package/build/lib/web/development/components/Icons/PhoneIncomingIcon/PhoneIncomingIcon.js +2 -2
- package/build/lib/web/development/components/Icons/PhoneMissedIcon/PhoneMissedIcon.js +2 -2
- package/build/lib/web/development/components/Icons/PhoneOffIcon/PhoneOffIcon.js +2 -2
- package/build/lib/web/development/components/Icons/PhoneOutgoingIcon/PhoneOutgoingIcon.js +2 -2
- package/build/lib/web/development/components/Icons/PieChartIcon/PieChartIcon.js +2 -2
- package/build/lib/web/development/components/Icons/PlayCircleIcon/PlayCircleIcon.js +2 -2
- package/build/lib/web/development/components/Icons/PlayIcon/PlayIcon.js +2 -2
- package/build/lib/web/development/components/Icons/PlusCircleIcon/PlusCircleIcon.js +2 -2
- package/build/lib/web/development/components/Icons/PlusIcon/PlusIcon.js +2 -2
- package/build/lib/web/development/components/Icons/PlusSquareIcon/PlusSquareIcon.js +2 -2
- package/build/lib/web/development/components/Icons/PocketIcon/PocketIcon.js +2 -2
- package/build/lib/web/development/components/Icons/PowerIcon/PowerIcon.js +2 -2
- package/build/lib/web/development/components/Icons/PrinterIcon/PrinterIcon.js +2 -2
- package/build/lib/web/development/components/Icons/QRCodeIcon/QRCodeIcon.js +2 -2
- package/build/lib/web/development/components/Icons/RadioIcon/RadioIcon.js +2 -2
- package/build/lib/web/development/components/Icons/RazorpayIcon/RazorpayIcon.js +2 -2
- package/build/lib/web/development/components/Icons/RazorpayXIcon/RazorpayXIcon.js +2 -2
- package/build/lib/web/development/components/Icons/RefreshIcon/RefreshIcon.js +2 -2
- package/build/lib/web/development/components/Icons/RepeatIcon/RepeatIcon.js +2 -2
- package/build/lib/web/development/components/Icons/ReportsIcon/ReportsIcon.js +2 -2
- package/build/lib/web/development/components/Icons/RewindIcon/RewindIcon.js +2 -2
- package/build/lib/web/development/components/Icons/RotateClockWiseIcon/RotateClockWiseIcon.js +2 -2
- package/build/lib/web/development/components/Icons/RotateCounterClockWiseIcon/RotateCounterClockWiseIcon.js +2 -2
- package/build/lib/web/development/components/Icons/RoutesIcon/RoutesIcon.js +2 -2
- package/build/lib/web/development/components/Icons/RupeeIcon/RupeeIcon.js +2 -2
- package/build/lib/web/development/components/Icons/RupeesIcon/RupeesIcon.js +2 -2
- package/build/lib/web/development/components/Icons/SaveIcon/SaveIcon.js +2 -2
- package/build/lib/web/development/components/Icons/ScissorsIcon/ScissorsIcon.js +2 -2
- package/build/lib/web/development/components/Icons/SearchIcon/SearchIcon.js +2 -2
- package/build/lib/web/development/components/Icons/SendIcon/SendIcon.js +2 -2
- package/build/lib/web/development/components/Icons/ServerIcon/ServerIcon.js +2 -2
- package/build/lib/web/development/components/Icons/SettingsIcon/SettingsIcon.js +2 -2
- package/build/lib/web/development/components/Icons/SettlementsIcon/SettlementsIcon.js +2 -2
- package/build/lib/web/development/components/Icons/ShareIcon/ShareIcon.js +2 -2
- package/build/lib/web/development/components/Icons/ShieldIcon/ShieldIcon.js +2 -2
- package/build/lib/web/development/components/Icons/ShoppingCartIcon/ShoppingCartIcon.js +2 -2
- package/build/lib/web/development/components/Icons/ShuffleIcon/ShuffleIcon.js +2 -2
- package/build/lib/web/development/components/Icons/SidebarIcon/SidebarIcon.js +2 -2
- package/build/lib/web/development/components/Icons/SkipBackIcon/SkipBackIcon.js +2 -2
- package/build/lib/web/development/components/Icons/SkipForwardIcon/SkipForwardIcon.js +2 -2
- package/build/lib/web/development/components/Icons/SlackIcon/SlackIcon.js +2 -2
- package/build/lib/web/development/components/Icons/SlashIcon/SlashIcon.js +2 -2
- package/build/lib/web/development/components/Icons/SlidersIcon/SlidersIcon.js +2 -2
- package/build/lib/web/development/components/Icons/SmartCollectIcon/SmartCollectIcon.js +2 -2
- package/build/lib/web/development/components/Icons/SmartphoneIcon/SmartphoneIcon.js +2 -2
- package/build/lib/web/development/components/Icons/SpeakerIcon/SpeakerIcon.js +2 -2
- package/build/lib/web/development/components/Icons/SquareIcon/SquareIcon.js +2 -2
- package/build/lib/web/development/components/Icons/StampIcon/StampIcon.js +2 -2
- package/build/lib/web/development/components/Icons/StarIcon/StarIcon.js +2 -2
- package/build/lib/web/development/components/Icons/StopCircleIcon/StopCircleIcon.js +2 -2
- package/build/lib/web/development/components/Icons/SubscriptionsIcon/SubscriptionsIcon.js +2 -2
- package/build/lib/web/development/components/Icons/SunIcon/SunIcon.js +2 -2
- package/build/lib/web/development/components/Icons/SunriseIcon/SunriseIcon.js +2 -2
- package/build/lib/web/development/components/Icons/SunsetIcon/SunsetIcon.js +2 -2
- package/build/lib/web/development/components/Icons/TabletIcon/TabletIcon.js +2 -2
- package/build/lib/web/development/components/Icons/TagIcon/TagIcon.js +2 -2
- package/build/lib/web/development/components/Icons/TargetIcon/TargetIcon.js +2 -2
- package/build/lib/web/development/components/Icons/ThermometerIcon/ThermometerIcon.js +2 -2
- package/build/lib/web/development/components/Icons/ThumbsDownIcon/ThumbsDownIcon.js +2 -2
- package/build/lib/web/development/components/Icons/ThumbsUpIcon/ThumbsUpIcon.js +2 -2
- package/build/lib/web/development/components/Icons/ToggleLeftIcon/ToggleLeftIcon.js +2 -2
- package/build/lib/web/development/components/Icons/ToggleRightIcon/ToggleRightIcon.js +2 -2
- package/build/lib/web/development/components/Icons/TransactionsIcon/TransactionsIcon.js +2 -2
- package/build/lib/web/development/components/Icons/TrashIcon/TrashIcon.js +2 -2
- package/build/lib/web/development/components/Icons/TrendingDownIcon/TrendingDownIcon.js +2 -2
- package/build/lib/web/development/components/Icons/TrendingUpIcon/TrendingUpIcon.js +2 -2
- package/build/lib/web/development/components/Icons/TriangleIcon/TriangleIcon.js +2 -2
- package/build/lib/web/development/components/Icons/TvIcon/TvIcon.js +2 -2
- package/build/lib/web/development/components/Icons/TwitterIcon/TwitterIcon.js +2 -2
- package/build/lib/web/development/components/Icons/TypeIcon/TypeIcon.js +2 -2
- package/build/lib/web/development/components/Icons/UmbrellaIcon/UmbrellaIcon.js +2 -2
- package/build/lib/web/development/components/Icons/UnderlineIcon/UnderlineIcon.js +2 -2
- package/build/lib/web/development/components/Icons/UnlockIcon/UnlockIcon.js +2 -2
- package/build/lib/web/development/components/Icons/UploadCloudIcon/UploadCloudIcon.js +2 -2
- package/build/lib/web/development/components/Icons/UploadIcon/UploadIcon.js +2 -2
- package/build/lib/web/development/components/Icons/UserCheckIcon/UserCheckIcon.js +2 -2
- package/build/lib/web/development/components/Icons/UserIcon/UserIcon.js +2 -2
- package/build/lib/web/development/components/Icons/UserMinusIcon/UserMinusIcon.js +2 -2
- package/build/lib/web/development/components/Icons/UserPlusIcon/UserPlusIcon.js +2 -2
- package/build/lib/web/development/components/Icons/UserXIcon/UserXIcon.js +2 -2
- package/build/lib/web/development/components/Icons/UsersIcon/UsersIcon.js +2 -2
- package/build/lib/web/development/components/Icons/VideoIcon/VideoIcon.js +2 -2
- package/build/lib/web/development/components/Icons/VideoOffIcon/VideoOffIcon.js +2 -2
- package/build/lib/web/development/components/Icons/VoicemailIcon/VoicemailIcon.js +2 -2
- package/build/lib/web/development/components/Icons/VolumeHighIcon/VolumeHighIcon.js +2 -2
- package/build/lib/web/development/components/Icons/VolumeIcon/VolumeIcon.js +2 -2
- package/build/lib/web/development/components/Icons/VolumeLowIcon/VolumeLowIcon.js +2 -2
- package/build/lib/web/development/components/Icons/VolumeMuteIcon/VolumeMuteIcon.js +2 -2
- package/build/lib/web/development/components/Icons/WatchIcon/WatchIcon.js +2 -2
- package/build/lib/web/development/components/Icons/WifiIcon/WifiIcon.js +2 -2
- package/build/lib/web/development/components/Icons/WifiOffIcon/WifiOffIcon.js +2 -2
- package/build/lib/web/development/components/Icons/WindIcon/WindIcon.js +2 -2
- package/build/lib/web/development/components/Icons/XCircleIcon/XCircleIcon.js +2 -2
- package/build/lib/web/development/components/Icons/XSquareIcon/XSquareIcon.js +2 -2
- package/build/lib/web/development/components/Icons/ZapIcon/ZapIcon.js +2 -2
- package/build/lib/web/development/components/Icons/ZoomInIcon/ZoomInIcon.js +2 -2
- package/build/lib/web/development/components/Icons/ZoomOutIcon/ZoomOutIcon.js +2 -2
- package/build/lib/web/development/components/Icons/_Svg/Circle/Circle.web.js +2 -2
- package/build/lib/web/development/components/Icons/_Svg/ClipPath/ClipPath.web.js +2 -2
- package/build/lib/web/development/components/Icons/_Svg/Defs/Defs.web.js +2 -2
- package/build/lib/web/development/components/Icons/_Svg/G/G.web.js +2 -2
- package/build/lib/web/development/components/Icons/_Svg/Path/Path.web.js +2 -2
- package/build/lib/web/development/components/Icons/_Svg/Rect/Rect.web.js +2 -2
- package/build/lib/web/development/components/Icons/_Svg/Svg/Svg.web.js +2 -2
- package/build/lib/web/development/components/Indicator/Indicator.js +2 -2
- package/build/lib/web/development/components/Input/BaseInput/AnimatedBaseInputWrapper.web.js +10 -4
- package/build/lib/web/development/components/Input/BaseInput/AnimatedBaseInputWrapper.web.js.map +1 -1
- package/build/lib/web/development/components/Input/BaseInput/BaseInput.js +15 -3
- package/build/lib/web/development/components/Input/BaseInput/BaseInput.js.map +1 -1
- package/build/lib/web/development/components/Input/BaseInput/BaseInputTagSlot.web.js +14 -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 +2 -2
- package/build/lib/web/development/components/Input/BaseInput/BaseInputWrapper.js +6 -4
- package/build/lib/web/development/components/Input/BaseInput/BaseInputWrapper.js.map +1 -1
- package/build/lib/web/development/components/Input/BaseInput/StyledBaseInput.web.js +7 -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 +4 -4
- package/build/lib/web/development/components/Input/BaseInput/baseInputStyles.js.map +1 -1
- package/build/lib/web/development/components/Input/BaseInput/useTaggedInput.js +172 -0
- package/build/lib/web/development/components/Input/BaseInput/useTaggedInput.js.map +1 -0
- package/build/lib/web/development/components/Input/DropdownInputTriggers/AutoComplete.js +2 -2
- package/build/lib/web/development/components/Input/DropdownInputTriggers/SelectInput.js +2 -2
- package/build/lib/web/development/components/Input/OTPInput/OTPInput.js +2 -2
- package/build/lib/web/development/components/Input/PasswordInput/PasswordInput.js +2 -2
- package/build/lib/web/development/components/Input/PhoneNumberInput/PhoneNumberInput.web.js +2 -2
- package/build/lib/web/development/components/Input/TextArea/TextArea.js +56 -10
- package/build/lib/web/development/components/Input/TextArea/TextArea.js.map +1 -1
- package/build/lib/web/development/components/Input/TextInput/TextInput.js +53 -7
- package/build/lib/web/development/components/Input/TextInput/TextInput.js.map +1 -1
- package/build/lib/web/development/components/Link/BaseLink/BaseLink.js +2 -2
- package/build/lib/web/development/components/Link/BaseLink/StyledBaseLink.web.js +2 -2
- package/build/lib/web/development/components/Link/Link/Link.js +2 -2
- package/build/lib/web/development/components/List/List.js +2 -3
- package/build/lib/web/development/components/List/List.js.map +1 -1
- package/build/lib/web/development/components/List/ListItem.js +2 -2
- package/build/lib/web/development/components/List/ListItemLink.js +2 -2
- package/build/lib/web/development/components/List/ListItemText.js +2 -2
- package/build/lib/web/development/components/LiveAnnouncer/LiveAnnouncer.web.js +1 -2
- package/build/lib/web/development/components/LiveAnnouncer/LiveAnnouncer.web.js.map +1 -1
- package/build/lib/web/development/components/Modal/Modal.web.js +2 -2
- package/build/lib/web/development/components/Modal/ModalBackdrop.js +2 -2
- package/build/lib/web/development/components/Modal/ModalBody.web.js +2 -2
- package/build/lib/web/development/components/Popover/Popover.web.js +2 -2
- package/build/lib/web/development/components/Popover/PopoverInteractiveWrapper.web.js +2 -2
- package/build/lib/web/development/components/Popover/getPopoverContentWrapperStyles.js +2 -2
- package/build/lib/web/development/components/ProgressBar/ProgressBar.js +2 -2
- package/build/lib/web/development/components/Radio/Radio.js +2 -2
- package/build/lib/web/development/components/Radio/RadioGroup/RadioGroup.js +2 -2
- package/build/lib/web/development/components/Radio/RadioIcon/RadioIcon.js +2 -2
- package/build/lib/web/development/components/Radio/RadioIcon/RadioIconWrapperStyles.js +2 -2
- package/build/lib/web/development/components/Radio/useRadio.js +2 -2
- package/build/lib/web/development/components/Skeleton/Skeleton.js +2 -2
- package/build/lib/web/development/components/SkipNav/SkipNav.web.js +2 -2
- package/build/lib/web/development/components/Spinner/BaseSpinner/BaseSpinner.js +2 -2
- package/build/lib/web/development/components/Spinner/Spinner/Spinner.js +2 -2
- package/build/lib/web/development/components/SpotlightPopoverTour/TourFooter.web.js +2 -2
- package/build/lib/web/development/components/SpotlightPopoverTour/TourMask.web.js +2 -2
- package/build/lib/web/development/components/SpotlightPopoverTour/TourPopover.web.js +2 -2
- package/build/lib/web/development/components/SpotlightPopoverTour/TourStep.web.js +2 -2
- package/build/lib/web/development/components/SpotlightPopoverTour/utils.js +2 -2
- package/build/lib/web/development/components/Switch/Switch.js +2 -2
- package/build/lib/web/development/components/Switch/SwitchTrack.web.js +2 -2
- package/build/lib/web/development/components/Switch/Thumb.js +2 -2
- package/build/lib/web/development/components/Table/Table.web.js +2 -2
- package/build/lib/web/development/components/Table/TableBody.web.js +2 -2
- package/build/lib/web/development/components/Table/TableFooter.web.js +2 -2
- package/build/lib/web/development/components/Table/TableHeader.web.js +2 -2
- package/build/lib/web/development/components/Table/TablePagination.web.js +2 -2
- package/build/lib/web/development/components/Table/TableToolbar.web.js +2 -2
- package/build/lib/web/development/components/Tabs/TabIndicator.web.js +2 -2
- package/build/lib/web/development/components/Tabs/TabItem.web.js +9 -9
- package/build/lib/web/development/components/Tabs/TabItem.web.js.map +1 -1
- package/build/lib/web/development/components/Tabs/TabList.web.js +2 -2
- package/build/lib/web/development/components/Tabs/TabPanel.web.js +2 -2
- package/build/lib/web/development/components/Tabs/Tabs.web.js +2 -2
- package/build/lib/web/development/components/Tag/AnimatedTag.web.js +2 -3
- package/build/lib/web/development/components/Tag/AnimatedTag.web.js.map +1 -1
- package/build/lib/web/development/components/Tag/Tag.js +7 -8
- package/build/lib/web/development/components/Tag/Tag.js.map +1 -1
- package/build/lib/web/development/components/Tag/getTagsGroup.js +1 -1
- package/build/lib/web/development/components/Tag/getTagsGroup.js.map +1 -1
- package/build/lib/web/development/components/Tag/tagAnimationConfig.js +4 -2
- package/build/lib/web/development/components/Tag/tagAnimationConfig.js.map +1 -1
- package/build/lib/web/development/components/Toast/Toast.web.js +2 -2
- package/build/lib/web/development/components/Toast/ToastContainer.web.js +2 -2
- package/build/lib/web/development/components/Toast/useToast.js +2 -2
- package/build/lib/web/development/components/Tooltip/Tooltip.web.js +2 -2
- package/build/lib/web/development/components/Tooltip/TooltipInteractiveWrapper.web.js +2 -2
- package/build/lib/web/development/components/Tooltip/getTooltipContentWrapperStyles.js +2 -2
- package/build/lib/web/development/components/Typography/BaseText/BaseText.web.js +2 -2
- package/build/lib/web/development/components/Typography/BaseText/getBaseTextStyles.js +4 -3
- package/build/lib/web/development/components/Typography/BaseText/getBaseTextStyles.js.map +1 -1
- package/build/lib/web/development/components/Typography/Code/Code.js +2 -2
- package/build/lib/web/development/components/Typography/Display/Display.js +2 -2
- package/build/lib/web/development/components/Typography/Heading/Heading.js +2 -2
- package/build/lib/web/development/components/Typography/Heading/getHeadingStyles.js +2 -2
- package/build/lib/web/development/components/Typography/Text/Text.js +2 -2
- package/build/lib/web/development/components/Typography/Text/getTextStyles.js +2 -2
- package/build/lib/web/development/components/VisuallyHidden/VisuallyHidden.web.js +2 -2
- package/build/lib/web/development/tokens/global/border.js +0 -1
- package/build/lib/web/development/tokens/global/border.js.map +1 -1
- package/build/lib/web/development/tokens/global/typography.js +2 -2
- package/build/lib/web/development/tokens/theme/createTheme.js +2 -3
- package/build/lib/web/development/tokens/theme/createTheme.js.map +1 -1
- package/build/lib/web/development/utils/bladeCoverage.js +1 -1
- package/build/lib/web/development/utils/bladeCoverage.js.map +1 -1
- package/build/lib/web/development/utils/makeAccessible/accessibilityMapWeb.js +2 -2
- package/build/lib/web/development/utils/mergeProps.js +19 -18
- package/build/lib/web/development/utils/mergeProps.js.map +1 -1
- package/build/lib/web/development/utils/metaAttribute/metaAttribute.web.js +2 -2
- package/build/lib/web/production/components/Accordion/Accordion.js +2 -2
- package/build/lib/web/production/components/Accordion/AccordionButton.web.js +2 -2
- package/build/lib/web/production/components/Accordion/AccordionItem.js +2 -2
- package/build/lib/web/production/components/Accordion/AccordionItemBody.js +2 -2
- package/build/lib/web/production/components/Accordion/AccordionItemHeader.js +2 -2
- package/build/lib/web/production/components/Accordion/StyledAccordionButton.web.js +2 -2
- package/build/lib/web/production/components/ActionList/ActionList.js +2 -2
- package/build/lib/web/production/components/ActionList/ActionListBox.web.js +2 -2
- package/build/lib/web/production/components/ActionList/ActionListItem.js +2 -2
- package/build/lib/web/production/components/ActionList/actionListUtils.js +2 -2
- package/build/lib/web/production/components/ActionList/styles/StyledActionListItem.web.js +2 -2
- package/build/lib/web/production/components/ActionList/styles/StyledListBoxWrapper.web.js +4 -5
- package/build/lib/web/production/components/ActionList/styles/StyledListBoxWrapper.web.js.map +1 -1
- package/build/lib/web/production/components/Alert/Alert.js +2 -2
- package/build/lib/web/production/components/Amount/Amount.js +5 -3
- package/build/lib/web/production/components/Amount/Amount.js.map +1 -1
- package/build/lib/web/production/components/Badge/Badge.js +2 -2
- package/build/lib/web/production/components/Badge/StyledBadge.web.js +2 -2
- package/build/lib/web/production/components/BaseHeaderFooter/BaseFooter.js +2 -2
- package/build/lib/web/production/components/BaseHeaderFooter/BaseHeader.js +2 -2
- package/build/lib/web/production/components/BladeProvider/useBladeProvider.js +2 -2
- package/build/lib/web/production/components/BottomSheet/BottomSheet.web.js +2 -2
- package/build/lib/web/production/components/BottomSheet/BottomSheetBackdrop.web.js +2 -2
- package/build/lib/web/production/components/BottomSheet/BottomSheetBody.web.js +2 -2
- package/build/lib/web/production/components/BottomSheet/BottomSheetCommon.js +2 -2
- package/build/lib/web/production/components/BottomSheet/BottomSheetFooter.web.js +2 -2
- package/build/lib/web/production/components/BottomSheet/BottomSheetHeader.web.js +2 -2
- package/build/lib/web/production/components/BottomSheet/getBottomSheetGrabHandleStyles.js +2 -2
- package/build/lib/web/production/components/Box/BaseBox/BaseBox.web.js +2 -2
- package/build/lib/web/production/components/Box/BaseBox/baseBoxStyles.js +4 -3
- package/build/lib/web/production/components/Box/BaseBox/baseBoxStyles.js.map +1 -1
- package/build/lib/web/production/components/Box/BaseBox/types/propsTypes.js.map +1 -1
- package/build/lib/web/production/components/Box/BaseBox/useMemoizedStyles.web.js +2 -2
- package/build/lib/web/production/components/Box/Box.js +2 -2
- package/build/lib/web/production/components/Box/styledProps/getStyledProps.js +3 -1
- package/build/lib/web/production/components/Box/styledProps/getStyledProps.js.map +1 -1
- package/build/lib/web/production/components/Box/styledProps/useStyledProps.js +4 -3
- package/build/lib/web/production/components/Box/styledProps/useStyledProps.js.map +1 -1
- package/build/lib/web/production/components/Breadcrumb/Breadcrumb.web.js +2 -2
- package/build/lib/web/production/components/Button/BaseButton/BaseButton.js +2 -3
- package/build/lib/web/production/components/Button/BaseButton/BaseButton.js.map +1 -1
- package/build/lib/web/production/components/Button/BaseButton/StyledBaseButton.web.js +2 -2
- package/build/lib/web/production/components/Button/Button/Button.js +2 -2
- package/build/lib/web/production/components/Button/IconButton/StyledIconButton.web.js +2 -2
- package/build/lib/web/production/components/ButtonGroup/ButtonGroup.web.js +2 -3
- package/build/lib/web/production/components/ButtonGroup/ButtonGroup.web.js.map +1 -1
- package/build/lib/web/production/components/Card/Card.js +2 -2
- package/build/lib/web/production/components/Card/CardFooter.js +2 -2
- package/build/lib/web/production/components/Card/CardHeader.js +2 -2
- package/build/lib/web/production/components/Card/CardRoot.web.js +5 -6
- package/build/lib/web/production/components/Card/CardRoot.web.js.map +1 -1
- package/build/lib/web/production/components/Carousel/Carousel.web.js +2 -2
- package/build/lib/web/production/components/Carousel/CarouselItem.web.js +2 -2
- package/build/lib/web/production/components/Carousel/Indicators/IndicatorButton.js +2 -2
- package/build/lib/web/production/components/Carousel/Indicators/Indicators.js +2 -2
- package/build/lib/web/production/components/Carousel/Indicators/getIndicatorButtonStyles.js +2 -2
- package/build/lib/web/production/components/Carousel/NavigationButton/NavigationButton.js +2 -2
- package/build/lib/web/production/components/Carousel/NavigationButton/getNavigationButtonStyles.js +2 -2
- package/build/lib/web/production/components/Checkbox/Checkbox.js +2 -2
- package/build/lib/web/production/components/Checkbox/CheckboxGroup/CheckboxGroup.js +2 -2
- package/build/lib/web/production/components/Checkbox/CheckboxIcon/CheckboxIcon.js +2 -2
- package/build/lib/web/production/components/Checkbox/CheckboxIcon/Fade.web.js +2 -2
- package/build/lib/web/production/components/Checkbox/useCheckbox.js +2 -2
- package/build/lib/web/production/components/Chip/AnimatedChip.web.js +2 -2
- package/build/lib/web/production/components/Chip/Chip.js +2 -2
- package/build/lib/web/production/components/Chip/ChipGroup.js +2 -2
- package/build/lib/web/production/components/Chip/StyledChipWrapper.web.js +2 -2
- package/build/lib/web/production/components/Collapsible/Collapsible.js +2 -2
- package/build/lib/web/production/components/Collapsible/CollapsibleBody.js +2 -2
- package/build/lib/web/production/components/Collapsible/CollapsibleBodyContent.web.js +2 -2
- package/build/lib/web/production/components/Collapsible/CollapsibleChevronIcon.web.js +2 -2
- package/build/lib/web/production/components/Counter/Counter.js +2 -2
- package/build/lib/web/production/components/Counter/StyledCounter.web.js +2 -2
- package/build/lib/web/production/components/Divider/Divider.js +4 -5
- package/build/lib/web/production/components/Divider/Divider.js.map +1 -1
- package/build/lib/web/production/components/Drawer/Drawer.web.js +2 -2
- package/build/lib/web/production/components/Dropdown/Dropdown.js +2 -2
- package/build/lib/web/production/components/Dropdown/DropdownButton.js +2 -2
- package/build/lib/web/production/components/Dropdown/DropdownHeaderFooter.js +2 -2
- package/build/lib/web/production/components/Dropdown/DropdownLink.js +2 -2
- package/build/lib/web/production/components/Dropdown/DropdownOverlay.web.js +2 -2
- package/build/lib/web/production/components/Dropdown/useDropdown.js +2 -2
- package/build/lib/web/production/components/FileUpload/FileUpload.web.js +2 -2
- package/build/lib/web/production/components/FileUpload/FileUploadItemIcon.js +2 -2
- package/build/lib/web/production/components/FileUpload/StyledFileUploadItemWrapper.js +2 -2
- package/build/lib/web/production/components/FileUpload/StyledFileUploadWrapper.js +2 -2
- package/build/lib/web/production/components/Form/FormLabel.js +2 -2
- package/build/lib/web/production/components/Form/Selector/SelectorGroupField.js +2 -2
- package/build/lib/web/production/components/Form/Selector/SelectorInput.web.js +2 -2
- package/build/lib/web/production/components/Form/Selector/SelectorLabel.web.js +2 -2
- package/build/lib/web/production/components/Icons/ActivityIcon/ActivityIcon.js +2 -2
- package/build/lib/web/production/components/Icons/AirplayIcon/AirplayIcon.js +2 -2
- package/build/lib/web/production/components/Icons/AlertCircleIcon/AlertCircleIcon.js +2 -2
- package/build/lib/web/production/components/Icons/AlertOctagonIcon/AlertOctagonIcon.js +2 -2
- package/build/lib/web/production/components/Icons/AlertOnlyIcon/AlertOnlyIcon.js +2 -2
- package/build/lib/web/production/components/Icons/AlertTriangleIcon/AlertTriangleIcon.js +2 -2
- package/build/lib/web/production/components/Icons/AlignCenterIcon/AlignCenterIcon.js +2 -2
- package/build/lib/web/production/components/Icons/AlignJustifyIcon/AlignJustifyIcon.js +2 -2
- package/build/lib/web/production/components/Icons/AlignLeftIcon/AlignLeftIcon.js +2 -2
- package/build/lib/web/production/components/Icons/AlignRightIcon/AlignRightIcon.js +2 -2
- package/build/lib/web/production/components/Icons/AnchorIcon/AnchorIcon.js +2 -2
- package/build/lib/web/production/components/Icons/AnnouncementIcon/AnnouncementIcon.js +2 -2
- package/build/lib/web/production/components/Icons/ApertureIcon/ApertureIcon.js +2 -2
- package/build/lib/web/production/components/Icons/AppStoreIcon/AppStoreIcon.js +2 -2
- package/build/lib/web/production/components/Icons/ArrowDownIcon/ArrowDownIcon.js +2 -2
- package/build/lib/web/production/components/Icons/ArrowDownLeftIcon/ArrowDownLeftIcon.js +2 -2
- package/build/lib/web/production/components/Icons/ArrowDownRightIcon/ArrowDownRightIcon.js +2 -2
- package/build/lib/web/production/components/Icons/ArrowLeftIcon/ArrowLeftIcon.js +2 -2
- package/build/lib/web/production/components/Icons/ArrowRightIcon/ArrowRightIcon.js +2 -2
- package/build/lib/web/production/components/Icons/ArrowUpIcon/ArrowUpIcon.js +2 -2
- package/build/lib/web/production/components/Icons/ArrowUpLeftIcon/ArrowUpLeftIcon.js +2 -2
- package/build/lib/web/production/components/Icons/ArrowUpRightIcon/ArrowUpRightIcon.js +2 -2
- package/build/lib/web/production/components/Icons/AtSignIcon/AtSignIcon.js +2 -2
- package/build/lib/web/production/components/Icons/AttachmentIcon/AttachmentIcon.js +2 -2
- package/build/lib/web/production/components/Icons/AwardIcon/AwardIcon.js +2 -2
- package/build/lib/web/production/components/Icons/BankIcon/BankIcon.js +2 -2
- package/build/lib/web/production/components/Icons/BarChartAltIcon/BarChartAltIcon.js +2 -2
- package/build/lib/web/production/components/Icons/BarChartIcon/BarChartIcon.js +2 -2
- package/build/lib/web/production/components/Icons/BatteryChargingIcon/BatteryChargingIcon.js +2 -2
- package/build/lib/web/production/components/Icons/BatteryIcon/BatteryIcon.js +2 -2
- package/build/lib/web/production/components/Icons/BellIcon/BellIcon.js +2 -2
- package/build/lib/web/production/components/Icons/BellOffIcon/BellOffIcon.js +2 -2
- package/build/lib/web/production/components/Icons/BillIcon/BillIcon.js +2 -2
- package/build/lib/web/production/components/Icons/BluetoothIcon/BluetoothIcon.js +2 -2
- package/build/lib/web/production/components/Icons/BoldIcon/BoldIcon.js +2 -2
- package/build/lib/web/production/components/Icons/BookIcon/BookIcon.js +2 -2
- package/build/lib/web/production/components/Icons/BookmarkIcon/BookmarkIcon.js +2 -2
- package/build/lib/web/production/components/Icons/BoxIcon/BoxIcon.js +2 -2
- package/build/lib/web/production/components/Icons/BriefcaseIcon/BriefcaseIcon.js +2 -2
- package/build/lib/web/production/components/Icons/BulkPayoutsIcon/BulkPayoutsIcon.js +2 -2
- package/build/lib/web/production/components/Icons/CalendarIcon/CalendarIcon.js +2 -2
- package/build/lib/web/production/components/Icons/CameraIcon/CameraIcon.js +2 -2
- package/build/lib/web/production/components/Icons/CameraOffIcon/CameraOffIcon.js +2 -2
- package/build/lib/web/production/components/Icons/CastIcon/CastIcon.js +2 -2
- package/build/lib/web/production/components/Icons/CheckCircleIcon/CheckCircleIcon.js +2 -2
- package/build/lib/web/production/components/Icons/CheckIcon/CheckIcon.js +2 -2
- package/build/lib/web/production/components/Icons/CheckSquareIcon/CheckSquareIcon.js +2 -2
- package/build/lib/web/production/components/Icons/ChevronDownIcon/ChevronDownIcon.js +2 -2
- package/build/lib/web/production/components/Icons/ChevronLeftIcon/ChevronLeftIcon.js +2 -2
- package/build/lib/web/production/components/Icons/ChevronRightIcon/ChevronRightIcon.js +2 -2
- package/build/lib/web/production/components/Icons/ChevronUpIcon/ChevronUpIcon.js +2 -2
- package/build/lib/web/production/components/Icons/ChevronsDownIcon/ChevronsDownIcon.js +2 -2
- package/build/lib/web/production/components/Icons/ChevronsLeftIcon/ChevronsLeftIcon.js +2 -2
- package/build/lib/web/production/components/Icons/ChevronsRightIcon/ChevronsRightIcon.js +2 -2
- package/build/lib/web/production/components/Icons/ChevronsUpIcon/ChevronsUpIcon.js +2 -2
- package/build/lib/web/production/components/Icons/ChromeIcon/ChromeIcon.js +2 -2
- package/build/lib/web/production/components/Icons/CircleIcon/CircleIcon.js +2 -2
- package/build/lib/web/production/components/Icons/ClipboardIcon/ClipboardIcon.js +2 -2
- package/build/lib/web/production/components/Icons/ClockIcon/ClockIcon.js +2 -2
- package/build/lib/web/production/components/Icons/CloseIcon/CloseIcon.js +2 -2
- package/build/lib/web/production/components/Icons/CloudDrizzleIcon/CloudDrizzleIcon.js +2 -2
- package/build/lib/web/production/components/Icons/CloudIcon/CloudIcon.js +2 -2
- package/build/lib/web/production/components/Icons/CloudLightningIcon/CloudLightningIcon.js +2 -2
- package/build/lib/web/production/components/Icons/CloudOffIcon/CloudOffIcon.js +2 -2
- package/build/lib/web/production/components/Icons/CloudRainIcon/CloudRainIcon.js +2 -2
- package/build/lib/web/production/components/Icons/CloudSnowIcon/CloudSnowIcon.js +2 -2
- package/build/lib/web/production/components/Icons/CodepenIcon/CodepenIcon.js +2 -2
- package/build/lib/web/production/components/Icons/CoinsIcon/CoinsIcon.js +2 -2
- package/build/lib/web/production/components/Icons/CommandIcon/CommandIcon.js +2 -2
- package/build/lib/web/production/components/Icons/CompassIcon/CompassIcon.js +2 -2
- package/build/lib/web/production/components/Icons/CopyIcon/CopyIcon.js +2 -2
- package/build/lib/web/production/components/Icons/CornerDownLeftIcon/CornerDownLeftIcon.js +2 -2
- package/build/lib/web/production/components/Icons/CornerDownRightIcon/CornerDownRightIcon.js +2 -2
- package/build/lib/web/production/components/Icons/CornerLeftDownIcon/CornerLeftDownIcon.js +2 -2
- package/build/lib/web/production/components/Icons/CornerLeftUpIcon/CornerLeftUpIcon.js +2 -2
- package/build/lib/web/production/components/Icons/CornerRightDownIcon/CornerRightDownIcon.js +2 -2
- package/build/lib/web/production/components/Icons/CornerRightUpIcon/CornerRightUpIcon.js +2 -2
- package/build/lib/web/production/components/Icons/CornerUpLeftIcon/CornerUpLeftIcon.js +2 -2
- package/build/lib/web/production/components/Icons/CornerUpRightIcon/CornerUpRightIcon.js +2 -2
- package/build/lib/web/production/components/Icons/CpuIcon/CpuIcon.js +2 -2
- package/build/lib/web/production/components/Icons/CreditCardIcon/CreditCardIcon.js +2 -2
- package/build/lib/web/production/components/Icons/CropIcon/CropIcon.js +2 -2
- package/build/lib/web/production/components/Icons/CrosshairIcon/CrosshairIcon.js +2 -2
- package/build/lib/web/production/components/Icons/CustomersIcon/CustomersIcon.js +2 -2
- package/build/lib/web/production/components/Icons/CutIcon/CutIcon.js +2 -2
- package/build/lib/web/production/components/Icons/DashboardIcon/DashboardIcon.js +2 -2
- package/build/lib/web/production/components/Icons/DeleteIcon/DeleteIcon.js +2 -2
- package/build/lib/web/production/components/Icons/DiscIcon/DiscIcon.js +2 -2
- package/build/lib/web/production/components/Icons/DollarIcon/DollarIcon.js +2 -2
- package/build/lib/web/production/components/Icons/DollarsIcon/DollarsIcon.js +2 -2
- package/build/lib/web/production/components/Icons/DownloadCloudIcon/DownloadCloudIcon.js +2 -2
- package/build/lib/web/production/components/Icons/DownloadIcon/DownloadIcon.js +2 -2
- package/build/lib/web/production/components/Icons/DropletIcon/DropletIcon.js +2 -2
- package/build/lib/web/production/components/Icons/EditComposeIcon/EditComposeIcon.js +2 -2
- package/build/lib/web/production/components/Icons/EditIcon/EditIcon.js +2 -2
- package/build/lib/web/production/components/Icons/EditInlineIcon/EditInlineIcon.js +2 -2
- package/build/lib/web/production/components/Icons/ExportIcon/ExportIcon.js +2 -2
- package/build/lib/web/production/components/Icons/ExternalLinkIcon/ExternalLinkIcon.js +2 -2
- package/build/lib/web/production/components/Icons/EyeIcon/EyeIcon.js +2 -2
- package/build/lib/web/production/components/Icons/EyeOffIcon/EyeOffIcon.js +2 -2
- package/build/lib/web/production/components/Icons/FacebookIcon/FacebookIcon.js +2 -2
- package/build/lib/web/production/components/Icons/FastForwardIcon/FastForwardIcon.js +2 -2
- package/build/lib/web/production/components/Icons/FeatherIcon/FeatherIcon.js +2 -2
- package/build/lib/web/production/components/Icons/FileIcon/FileIcon.js +2 -2
- package/build/lib/web/production/components/Icons/FileMinusIcon/FileMinusIcon.js +2 -2
- package/build/lib/web/production/components/Icons/FilePlusIcon/FilePlusIcon.js +2 -2
- package/build/lib/web/production/components/Icons/FileTextIcon/FileTextIcon.js +2 -2
- package/build/lib/web/production/components/Icons/FileZipIcon/FileZipIcon.js +2 -2
- package/build/lib/web/production/components/Icons/FilmIcon/FilmIcon.js +2 -2
- package/build/lib/web/production/components/Icons/FilterIcon/FilterIcon.js +2 -2
- package/build/lib/web/production/components/Icons/FlagIcon/FlagIcon.js +2 -2
- package/build/lib/web/production/components/Icons/FolderIcon/FolderIcon.js +2 -2
- package/build/lib/web/production/components/Icons/FullScreenEnterIcon/FullScreenEnterIcon.js +2 -2
- package/build/lib/web/production/components/Icons/FullScreenExitIcon/FullScreenExitIcon.js +2 -2
- package/build/lib/web/production/components/Icons/GithubIcon/GithubIcon.js +2 -2
- package/build/lib/web/production/components/Icons/GitlabIcon/GitlabIcon.js +2 -2
- package/build/lib/web/production/components/Icons/GlobeIcon/GlobeIcon.js +2 -2
- package/build/lib/web/production/components/Icons/GridIcon/GridIcon.js +2 -2
- package/build/lib/web/production/components/Icons/HashIcon/HashIcon.js +2 -2
- package/build/lib/web/production/components/Icons/HeadphonesIcon/HeadphonesIcon.js +2 -2
- package/build/lib/web/production/components/Icons/HeartIcon/HeartIcon.js +2 -2
- package/build/lib/web/production/components/Icons/HelpCircleIcon/HelpCircleIcon.js +2 -2
- package/build/lib/web/production/components/Icons/HistoryIcon/HistoryIcon.js +2 -2
- package/build/lib/web/production/components/Icons/HomeIcon/HomeIcon.js +2 -2
- package/build/lib/web/production/components/Icons/ImageIcon/ImageIcon.js +2 -2
- package/build/lib/web/production/components/Icons/InboxIcon/InboxIcon.js +2 -2
- package/build/lib/web/production/components/Icons/InfoIcon/InfoIcon.js +2 -2
- package/build/lib/web/production/components/Icons/InstagramIcon/InstagramIcon.js +2 -2
- package/build/lib/web/production/components/Icons/InvoicesIcon/InvoicesIcon.js +2 -2
- package/build/lib/web/production/components/Icons/ItalicIcon/ItalicIcon.js +2 -2
- package/build/lib/web/production/components/Icons/LayersIcon/LayersIcon.js +2 -2
- package/build/lib/web/production/components/Icons/LayoutIcon/LayoutIcon.js +2 -2
- package/build/lib/web/production/components/Icons/LifeBuoyIcon/LifeBuoyIcon.js +2 -2
- package/build/lib/web/production/components/Icons/LinkIcon/LinkIcon.js +2 -2
- package/build/lib/web/production/components/Icons/ListIcon/ListIcon.js +2 -2
- package/build/lib/web/production/components/Icons/LoaderIcon/LoaderIcon.js +2 -2
- package/build/lib/web/production/components/Icons/LockIcon/LockIcon.js +2 -2
- package/build/lib/web/production/components/Icons/LogInIcon/LogInIcon.js +2 -2
- package/build/lib/web/production/components/Icons/LogOutIcon/LogOutIcon.js +2 -2
- package/build/lib/web/production/components/Icons/MailIcon/MailIcon.js +2 -2
- package/build/lib/web/production/components/Icons/MailOpenIcon/MailOpenIcon.js +2 -2
- package/build/lib/web/production/components/Icons/MapIcon/MapIcon.js +2 -2
- package/build/lib/web/production/components/Icons/MapPinIcon/MapPinIcon.js +2 -2
- package/build/lib/web/production/components/Icons/MaximizeIcon/MaximizeIcon.js +2 -2
- package/build/lib/web/production/components/Icons/MenuDotsIcon/MenuDotsIcon.js +2 -2
- package/build/lib/web/production/components/Icons/MenuIcon/MenuIcon.js +2 -2
- package/build/lib/web/production/components/Icons/MessageCircleIcon/MessageCircleIcon.js +2 -2
- package/build/lib/web/production/components/Icons/MessageSquareIcon/MessageSquareIcon.js +2 -2
- package/build/lib/web/production/components/Icons/MicIcon/MicIcon.js +2 -2
- package/build/lib/web/production/components/Icons/MicOffIcon/MicOffIcon.js +2 -2
- package/build/lib/web/production/components/Icons/MinimizeIcon/MinimizeIcon.js +2 -2
- package/build/lib/web/production/components/Icons/MinusCircleIcon/MinusCircleIcon.js +2 -2
- package/build/lib/web/production/components/Icons/MinusIcon/MinusIcon.js +2 -2
- package/build/lib/web/production/components/Icons/MinusSquareIcon/MinusSquareIcon.js +2 -2
- package/build/lib/web/production/components/Icons/MonitorIcon/MonitorIcon.js +2 -2
- package/build/lib/web/production/components/Icons/MoonIcon/MoonIcon.js +2 -2
- package/build/lib/web/production/components/Icons/MoreHorizontalIcon/MoreHorizontalIcon.js +2 -2
- package/build/lib/web/production/components/Icons/MoreVerticalIcon/MoreVerticalIcon.js +2 -2
- package/build/lib/web/production/components/Icons/MoveIcon/MoveIcon.js +2 -2
- package/build/lib/web/production/components/Icons/MusicIcon/MusicIcon.js +2 -2
- package/build/lib/web/production/components/Icons/MyAccountIcon/MyAccountIcon.js +2 -2
- package/build/lib/web/production/components/Icons/NavigationIcon/NavigationIcon.js +2 -2
- package/build/lib/web/production/components/Icons/OctagonIcon/OctagonIcon.js +2 -2
- package/build/lib/web/production/components/Icons/OffersIcon/OffersIcon.js +2 -2
- package/build/lib/web/production/components/Icons/PackageIcon/PackageIcon.js +2 -2
- package/build/lib/web/production/components/Icons/PaperclipIcon/PaperclipIcon.js +2 -2
- package/build/lib/web/production/components/Icons/PauseCircleIcon/PauseCircleIcon.js +2 -2
- package/build/lib/web/production/components/Icons/PauseIcon/PauseIcon.js +2 -2
- package/build/lib/web/production/components/Icons/PaymentButtonsIcon/PaymentButtonsIcon.js +2 -2
- package/build/lib/web/production/components/Icons/PaymentLinksIcon/PaymentLinksIcon.js +2 -2
- package/build/lib/web/production/components/Icons/PaymentPagesIcon/PaymentPagesIcon.js +2 -2
- package/build/lib/web/production/components/Icons/PercentIcon/PercentIcon.js +2 -2
- package/build/lib/web/production/components/Icons/PhoneCallIcon/PhoneCallIcon.js +2 -2
- package/build/lib/web/production/components/Icons/PhoneForwardedIcon/PhoneForwardedIcon.js +2 -2
- package/build/lib/web/production/components/Icons/PhoneIcon/PhoneIcon.js +2 -2
- package/build/lib/web/production/components/Icons/PhoneIncomingIcon/PhoneIncomingIcon.js +2 -2
- package/build/lib/web/production/components/Icons/PhoneMissedIcon/PhoneMissedIcon.js +2 -2
- package/build/lib/web/production/components/Icons/PhoneOffIcon/PhoneOffIcon.js +2 -2
- package/build/lib/web/production/components/Icons/PhoneOutgoingIcon/PhoneOutgoingIcon.js +2 -2
- package/build/lib/web/production/components/Icons/PieChartIcon/PieChartIcon.js +2 -2
- package/build/lib/web/production/components/Icons/PlayCircleIcon/PlayCircleIcon.js +2 -2
- package/build/lib/web/production/components/Icons/PlayIcon/PlayIcon.js +2 -2
- package/build/lib/web/production/components/Icons/PlusCircleIcon/PlusCircleIcon.js +2 -2
- package/build/lib/web/production/components/Icons/PlusIcon/PlusIcon.js +2 -2
- package/build/lib/web/production/components/Icons/PlusSquareIcon/PlusSquareIcon.js +2 -2
- package/build/lib/web/production/components/Icons/PocketIcon/PocketIcon.js +2 -2
- package/build/lib/web/production/components/Icons/PowerIcon/PowerIcon.js +2 -2
- package/build/lib/web/production/components/Icons/PrinterIcon/PrinterIcon.js +2 -2
- package/build/lib/web/production/components/Icons/QRCodeIcon/QRCodeIcon.js +2 -2
- package/build/lib/web/production/components/Icons/RadioIcon/RadioIcon.js +2 -2
- package/build/lib/web/production/components/Icons/RazorpayIcon/RazorpayIcon.js +2 -2
- package/build/lib/web/production/components/Icons/RazorpayXIcon/RazorpayXIcon.js +2 -2
- package/build/lib/web/production/components/Icons/RefreshIcon/RefreshIcon.js +2 -2
- package/build/lib/web/production/components/Icons/RepeatIcon/RepeatIcon.js +2 -2
- package/build/lib/web/production/components/Icons/ReportsIcon/ReportsIcon.js +2 -2
- package/build/lib/web/production/components/Icons/RewindIcon/RewindIcon.js +2 -2
- package/build/lib/web/production/components/Icons/RotateClockWiseIcon/RotateClockWiseIcon.js +2 -2
- package/build/lib/web/production/components/Icons/RotateCounterClockWiseIcon/RotateCounterClockWiseIcon.js +2 -2
- package/build/lib/web/production/components/Icons/RoutesIcon/RoutesIcon.js +2 -2
- package/build/lib/web/production/components/Icons/RupeeIcon/RupeeIcon.js +2 -2
- package/build/lib/web/production/components/Icons/RupeesIcon/RupeesIcon.js +2 -2
- package/build/lib/web/production/components/Icons/SaveIcon/SaveIcon.js +2 -2
- package/build/lib/web/production/components/Icons/ScissorsIcon/ScissorsIcon.js +2 -2
- package/build/lib/web/production/components/Icons/SearchIcon/SearchIcon.js +2 -2
- package/build/lib/web/production/components/Icons/SendIcon/SendIcon.js +2 -2
- package/build/lib/web/production/components/Icons/ServerIcon/ServerIcon.js +2 -2
- package/build/lib/web/production/components/Icons/SettingsIcon/SettingsIcon.js +2 -2
- package/build/lib/web/production/components/Icons/SettlementsIcon/SettlementsIcon.js +2 -2
- package/build/lib/web/production/components/Icons/ShareIcon/ShareIcon.js +2 -2
- package/build/lib/web/production/components/Icons/ShieldIcon/ShieldIcon.js +2 -2
- package/build/lib/web/production/components/Icons/ShoppingCartIcon/ShoppingCartIcon.js +2 -2
- package/build/lib/web/production/components/Icons/ShuffleIcon/ShuffleIcon.js +2 -2
- package/build/lib/web/production/components/Icons/SidebarIcon/SidebarIcon.js +2 -2
- package/build/lib/web/production/components/Icons/SkipBackIcon/SkipBackIcon.js +2 -2
- package/build/lib/web/production/components/Icons/SkipForwardIcon/SkipForwardIcon.js +2 -2
- package/build/lib/web/production/components/Icons/SlackIcon/SlackIcon.js +2 -2
- package/build/lib/web/production/components/Icons/SlashIcon/SlashIcon.js +2 -2
- package/build/lib/web/production/components/Icons/SlidersIcon/SlidersIcon.js +2 -2
- package/build/lib/web/production/components/Icons/SmartCollectIcon/SmartCollectIcon.js +2 -2
- package/build/lib/web/production/components/Icons/SmartphoneIcon/SmartphoneIcon.js +2 -2
- package/build/lib/web/production/components/Icons/SpeakerIcon/SpeakerIcon.js +2 -2
- package/build/lib/web/production/components/Icons/SquareIcon/SquareIcon.js +2 -2
- package/build/lib/web/production/components/Icons/StampIcon/StampIcon.js +2 -2
- package/build/lib/web/production/components/Icons/StarIcon/StarIcon.js +2 -2
- package/build/lib/web/production/components/Icons/StopCircleIcon/StopCircleIcon.js +2 -2
- package/build/lib/web/production/components/Icons/SubscriptionsIcon/SubscriptionsIcon.js +2 -2
- package/build/lib/web/production/components/Icons/SunIcon/SunIcon.js +2 -2
- package/build/lib/web/production/components/Icons/SunriseIcon/SunriseIcon.js +2 -2
- package/build/lib/web/production/components/Icons/SunsetIcon/SunsetIcon.js +2 -2
- package/build/lib/web/production/components/Icons/TabletIcon/TabletIcon.js +2 -2
- package/build/lib/web/production/components/Icons/TagIcon/TagIcon.js +2 -2
- package/build/lib/web/production/components/Icons/TargetIcon/TargetIcon.js +2 -2
- package/build/lib/web/production/components/Icons/ThermometerIcon/ThermometerIcon.js +2 -2
- package/build/lib/web/production/components/Icons/ThumbsDownIcon/ThumbsDownIcon.js +2 -2
- package/build/lib/web/production/components/Icons/ThumbsUpIcon/ThumbsUpIcon.js +2 -2
- package/build/lib/web/production/components/Icons/ToggleLeftIcon/ToggleLeftIcon.js +2 -2
- package/build/lib/web/production/components/Icons/ToggleRightIcon/ToggleRightIcon.js +2 -2
- package/build/lib/web/production/components/Icons/TransactionsIcon/TransactionsIcon.js +2 -2
- package/build/lib/web/production/components/Icons/TrashIcon/TrashIcon.js +2 -2
- package/build/lib/web/production/components/Icons/TrendingDownIcon/TrendingDownIcon.js +2 -2
- package/build/lib/web/production/components/Icons/TrendingUpIcon/TrendingUpIcon.js +2 -2
- package/build/lib/web/production/components/Icons/TriangleIcon/TriangleIcon.js +2 -2
- package/build/lib/web/production/components/Icons/TvIcon/TvIcon.js +2 -2
- package/build/lib/web/production/components/Icons/TwitterIcon/TwitterIcon.js +2 -2
- package/build/lib/web/production/components/Icons/TypeIcon/TypeIcon.js +2 -2
- package/build/lib/web/production/components/Icons/UmbrellaIcon/UmbrellaIcon.js +2 -2
- package/build/lib/web/production/components/Icons/UnderlineIcon/UnderlineIcon.js +2 -2
- package/build/lib/web/production/components/Icons/UnlockIcon/UnlockIcon.js +2 -2
- package/build/lib/web/production/components/Icons/UploadCloudIcon/UploadCloudIcon.js +2 -2
- package/build/lib/web/production/components/Icons/UploadIcon/UploadIcon.js +2 -2
- package/build/lib/web/production/components/Icons/UserCheckIcon/UserCheckIcon.js +2 -2
- package/build/lib/web/production/components/Icons/UserIcon/UserIcon.js +2 -2
- package/build/lib/web/production/components/Icons/UserMinusIcon/UserMinusIcon.js +2 -2
- package/build/lib/web/production/components/Icons/UserPlusIcon/UserPlusIcon.js +2 -2
- package/build/lib/web/production/components/Icons/UserXIcon/UserXIcon.js +2 -2
- package/build/lib/web/production/components/Icons/UsersIcon/UsersIcon.js +2 -2
- package/build/lib/web/production/components/Icons/VideoIcon/VideoIcon.js +2 -2
- package/build/lib/web/production/components/Icons/VideoOffIcon/VideoOffIcon.js +2 -2
- package/build/lib/web/production/components/Icons/VoicemailIcon/VoicemailIcon.js +2 -2
- package/build/lib/web/production/components/Icons/VolumeHighIcon/VolumeHighIcon.js +2 -2
- package/build/lib/web/production/components/Icons/VolumeIcon/VolumeIcon.js +2 -2
- package/build/lib/web/production/components/Icons/VolumeLowIcon/VolumeLowIcon.js +2 -2
- package/build/lib/web/production/components/Icons/VolumeMuteIcon/VolumeMuteIcon.js +2 -2
- package/build/lib/web/production/components/Icons/WatchIcon/WatchIcon.js +2 -2
- package/build/lib/web/production/components/Icons/WifiIcon/WifiIcon.js +2 -2
- package/build/lib/web/production/components/Icons/WifiOffIcon/WifiOffIcon.js +2 -2
- package/build/lib/web/production/components/Icons/WindIcon/WindIcon.js +2 -2
- package/build/lib/web/production/components/Icons/XCircleIcon/XCircleIcon.js +2 -2
- package/build/lib/web/production/components/Icons/XSquareIcon/XSquareIcon.js +2 -2
- package/build/lib/web/production/components/Icons/ZapIcon/ZapIcon.js +2 -2
- package/build/lib/web/production/components/Icons/ZoomInIcon/ZoomInIcon.js +2 -2
- package/build/lib/web/production/components/Icons/ZoomOutIcon/ZoomOutIcon.js +2 -2
- package/build/lib/web/production/components/Icons/_Svg/Circle/Circle.web.js +2 -2
- package/build/lib/web/production/components/Icons/_Svg/ClipPath/ClipPath.web.js +2 -2
- package/build/lib/web/production/components/Icons/_Svg/Defs/Defs.web.js +2 -2
- package/build/lib/web/production/components/Icons/_Svg/G/G.web.js +2 -2
- package/build/lib/web/production/components/Icons/_Svg/Path/Path.web.js +2 -2
- package/build/lib/web/production/components/Icons/_Svg/Rect/Rect.web.js +2 -2
- package/build/lib/web/production/components/Icons/_Svg/Svg/Svg.web.js +2 -2
- package/build/lib/web/production/components/Indicator/Indicator.js +2 -2
- package/build/lib/web/production/components/Input/BaseInput/AnimatedBaseInputWrapper.web.js +10 -4
- package/build/lib/web/production/components/Input/BaseInput/AnimatedBaseInputWrapper.web.js.map +1 -1
- package/build/lib/web/production/components/Input/BaseInput/BaseInput.js +15 -3
- package/build/lib/web/production/components/Input/BaseInput/BaseInput.js.map +1 -1
- package/build/lib/web/production/components/Input/BaseInput/BaseInputTagSlot.web.js +14 -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 +2 -2
- package/build/lib/web/production/components/Input/BaseInput/BaseInputWrapper.js +6 -4
- package/build/lib/web/production/components/Input/BaseInput/BaseInputWrapper.js.map +1 -1
- package/build/lib/web/production/components/Input/BaseInput/StyledBaseInput.web.js +7 -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 +4 -4
- package/build/lib/web/production/components/Input/BaseInput/baseInputStyles.js.map +1 -1
- package/build/lib/web/production/components/Input/BaseInput/useTaggedInput.js +172 -0
- package/build/lib/web/production/components/Input/BaseInput/useTaggedInput.js.map +1 -0
- package/build/lib/web/production/components/Input/DropdownInputTriggers/AutoComplete.js +2 -2
- package/build/lib/web/production/components/Input/DropdownInputTriggers/SelectInput.js +2 -2
- package/build/lib/web/production/components/Input/OTPInput/OTPInput.js +2 -2
- package/build/lib/web/production/components/Input/PasswordInput/PasswordInput.js +2 -2
- package/build/lib/web/production/components/Input/PhoneNumberInput/PhoneNumberInput.web.js +2 -2
- package/build/lib/web/production/components/Input/TextArea/TextArea.js +56 -10
- package/build/lib/web/production/components/Input/TextArea/TextArea.js.map +1 -1
- package/build/lib/web/production/components/Input/TextInput/TextInput.js +53 -7
- package/build/lib/web/production/components/Input/TextInput/TextInput.js.map +1 -1
- package/build/lib/web/production/components/Link/BaseLink/BaseLink.js +2 -2
- package/build/lib/web/production/components/Link/BaseLink/StyledBaseLink.web.js +2 -2
- package/build/lib/web/production/components/Link/Link/Link.js +2 -2
- package/build/lib/web/production/components/List/List.js +2 -3
- package/build/lib/web/production/components/List/List.js.map +1 -1
- package/build/lib/web/production/components/List/ListItem.js +2 -2
- package/build/lib/web/production/components/List/ListItemLink.js +2 -2
- package/build/lib/web/production/components/List/ListItemText.js +2 -2
- package/build/lib/web/production/components/LiveAnnouncer/LiveAnnouncer.web.js +1 -2
- package/build/lib/web/production/components/LiveAnnouncer/LiveAnnouncer.web.js.map +1 -1
- package/build/lib/web/production/components/Modal/Modal.web.js +2 -2
- package/build/lib/web/production/components/Modal/ModalBackdrop.js +2 -2
- package/build/lib/web/production/components/Modal/ModalBody.web.js +2 -2
- package/build/lib/web/production/components/Popover/Popover.web.js +2 -2
- package/build/lib/web/production/components/Popover/PopoverInteractiveWrapper.web.js +2 -2
- package/build/lib/web/production/components/Popover/getPopoverContentWrapperStyles.js +2 -2
- package/build/lib/web/production/components/ProgressBar/ProgressBar.js +2 -2
- package/build/lib/web/production/components/Radio/Radio.js +2 -2
- package/build/lib/web/production/components/Radio/RadioGroup/RadioGroup.js +2 -2
- package/build/lib/web/production/components/Radio/RadioIcon/RadioIcon.js +2 -2
- package/build/lib/web/production/components/Radio/RadioIcon/RadioIconWrapperStyles.js +2 -2
- package/build/lib/web/production/components/Radio/useRadio.js +2 -2
- package/build/lib/web/production/components/Skeleton/Skeleton.js +2 -2
- package/build/lib/web/production/components/SkipNav/SkipNav.web.js +2 -2
- package/build/lib/web/production/components/Spinner/BaseSpinner/BaseSpinner.js +2 -2
- package/build/lib/web/production/components/Spinner/Spinner/Spinner.js +2 -2
- package/build/lib/web/production/components/SpotlightPopoverTour/TourFooter.web.js +2 -2
- package/build/lib/web/production/components/SpotlightPopoverTour/TourMask.web.js +2 -2
- package/build/lib/web/production/components/SpotlightPopoverTour/TourPopover.web.js +2 -2
- package/build/lib/web/production/components/SpotlightPopoverTour/TourStep.web.js +2 -2
- package/build/lib/web/production/components/SpotlightPopoverTour/utils.js +2 -2
- package/build/lib/web/production/components/Switch/Switch.js +2 -2
- package/build/lib/web/production/components/Switch/SwitchTrack.web.js +2 -2
- package/build/lib/web/production/components/Switch/Thumb.js +2 -2
- package/build/lib/web/production/components/Table/Table.web.js +2 -2
- package/build/lib/web/production/components/Table/TableBody.web.js +2 -2
- package/build/lib/web/production/components/Table/TableFooter.web.js +2 -2
- package/build/lib/web/production/components/Table/TableHeader.web.js +2 -2
- package/build/lib/web/production/components/Table/TablePagination.web.js +2 -2
- package/build/lib/web/production/components/Table/TableToolbar.web.js +2 -2
- package/build/lib/web/production/components/Tabs/TabIndicator.web.js +2 -2
- package/build/lib/web/production/components/Tabs/TabItem.web.js +9 -9
- package/build/lib/web/production/components/Tabs/TabItem.web.js.map +1 -1
- package/build/lib/web/production/components/Tabs/TabList.web.js +2 -2
- package/build/lib/web/production/components/Tabs/TabPanel.web.js +2 -2
- package/build/lib/web/production/components/Tabs/Tabs.web.js +2 -2
- package/build/lib/web/production/components/Tag/AnimatedTag.web.js +2 -3
- package/build/lib/web/production/components/Tag/AnimatedTag.web.js.map +1 -1
- package/build/lib/web/production/components/Tag/Tag.js +7 -8
- package/build/lib/web/production/components/Tag/Tag.js.map +1 -1
- package/build/lib/web/production/components/Tag/getTagsGroup.js +1 -1
- package/build/lib/web/production/components/Tag/getTagsGroup.js.map +1 -1
- package/build/lib/web/production/components/Tag/tagAnimationConfig.js +4 -2
- package/build/lib/web/production/components/Tag/tagAnimationConfig.js.map +1 -1
- package/build/lib/web/production/components/Toast/Toast.web.js +2 -2
- package/build/lib/web/production/components/Toast/ToastContainer.web.js +2 -2
- package/build/lib/web/production/components/Toast/useToast.js +2 -2
- package/build/lib/web/production/components/Tooltip/Tooltip.web.js +2 -2
- package/build/lib/web/production/components/Tooltip/TooltipInteractiveWrapper.web.js +2 -2
- package/build/lib/web/production/components/Tooltip/getTooltipContentWrapperStyles.js +2 -2
- package/build/lib/web/production/components/Typography/BaseText/BaseText.web.js +2 -2
- package/build/lib/web/production/components/Typography/BaseText/getBaseTextStyles.js +4 -3
- package/build/lib/web/production/components/Typography/BaseText/getBaseTextStyles.js.map +1 -1
- package/build/lib/web/production/components/Typography/Code/Code.js +2 -2
- package/build/lib/web/production/components/Typography/Display/Display.js +2 -2
- package/build/lib/web/production/components/Typography/Heading/Heading.js +2 -2
- package/build/lib/web/production/components/Typography/Heading/getHeadingStyles.js +2 -2
- package/build/lib/web/production/components/Typography/Text/Text.js +2 -2
- package/build/lib/web/production/components/Typography/Text/getTextStyles.js +2 -2
- package/build/lib/web/production/components/VisuallyHidden/VisuallyHidden.web.js +2 -2
- package/build/lib/web/production/tokens/global/border.js +0 -1
- package/build/lib/web/production/tokens/global/border.js.map +1 -1
- package/build/lib/web/production/tokens/global/typography.js +2 -2
- package/build/lib/web/production/tokens/theme/createTheme.js +2 -3
- package/build/lib/web/production/tokens/theme/createTheme.js.map +1 -1
- package/build/lib/web/production/utils/bladeCoverage.js +1 -1
- package/build/lib/web/production/utils/bladeCoverage.js.map +1 -1
- package/build/lib/web/production/utils/makeAccessible/accessibilityMapWeb.js +2 -2
- package/build/lib/web/production/utils/mergeProps.js +19 -18
- package/build/lib/web/production/utils/mergeProps.js.map +1 -1
- package/build/lib/web/production/utils/metaAttribute/metaAttribute.web.js +2 -2
- package/build/types/components/index.d.ts +20 -4
- package/build/types/components/index.native.d.ts +13 -5
- package/package.json +7 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionListBox.native.js","sources":["../../../../../src/components/ActionList/ActionListBox.native.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable react/display-name */\nimport React from 'react';\nimport { BottomSheetSectionList as GorhomBottomSheetSectionList } from '@gorhom/bottom-sheet';\nimport { SectionList } from 'react-native';\nimport { StyledListBoxWrapper } from './styles/StyledListBoxWrapper';\nimport { ActionListItem, ActionListSection } from './ActionListItem';\nimport type { SectionData } from './actionListUtils';\nimport { useBottomSheetContext } from '~components/BottomSheet/BottomSheetContext';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { Divider } from '~components/Divider';\n\ntype ActionListBoxProps = {\n childrenWithId?: React.ReactNode[] | null;\n sectionData: SectionData;\n actionListItemWrapperRole: 'listbox' | 'menu' | undefined;\n isMultiSelectable: boolean;\n isInBottomSheet: boolean;\n};\n\nconst _ActionListBox = React.forwardRef<SectionList, ActionListBoxProps>(\n ({ sectionData, actionListItemWrapperRole, isMultiSelectable, isInBottomSheet }, ref) => {\n const { footerHeight, setContentHeight } = useBottomSheetContext();\n\n const renderActionListItem = React.useCallback(({ item }) => {\n return <ActionListItem {...item} />;\n }, []);\n\n const renderActionListSectionHeader = React.useCallback(({ section: { title } }) => {\n if (!title) return null;\n return <ActionListSection title={title} _hideDivider={true} children={undefined} />;\n }, []);\n\n const renderActionListSectionDivider = React.useCallback(\n ({ section: { title, hideDivider } }) => {\n if (!title) return null;\n if (hideDivider) return null;\n return <Divider />;\n },\n [],\n );\n\n return (\n <StyledListBoxWrapper\n // Render either the Gorhom or RN Section list depending on where we are\n // We can't simply use RNSectionList because GorhomSectionList handles extra bottomsheet specific logic internally\n as={isInBottomSheet ? GorhomBottomSheetSectionList : SectionList}\n isInBottomSheet={Boolean(isInBottomSheet)}\n // Setting footerHeight as bottom margin for ActionListBox\n // otherwise the footer hides few list items under it, this will offset it\n marginBottom={footerHeight}\n sections={sectionData}\n windowSize={5}\n keyExtractor={(item: any) => {\n return item.value;\n }}\n stickySectionHeadersEnabled={false}\n renderSectionHeader={renderActionListSectionHeader}\n renderSectionFooter={renderActionListSectionDivider}\n renderItem={renderActionListItem}\n ref={ref as any}\n onContentSizeChange={(_width, height) => {\n setContentHeight(height);\n }}\n {...makeAccessible({\n role: actionListItemWrapperRole,\n multiSelectable: actionListItemWrapperRole === 'listbox' ? isMultiSelectable : undefined,\n })}\n />\n );\n },\n);\n\nconst ActionListBox = assignWithoutSideEffects(_ActionListBox, { displayName: 'ActionListBox' });\n\nexport { ActionListBox };\n"],"names":["_ActionListBox","React","forwardRef","_ref","ref","sectionData","actionListItemWrapperRole","isMultiSelectable","isInBottomSheet","_useBottomSheetContex","useBottomSheetContext","footerHeight","setContentHeight","renderActionListItem","useCallback","_ref2","item","_jsx","ActionListItem","Object","assign","renderActionListSectionHeader","_ref3","title","section","ActionListSection","_hideDivider","children","undefined","renderActionListSectionDivider","_ref4","_ref4$section","hideDivider","Divider","StyledListBoxWrapper","as","GorhomBottomSheetSectionList","SectionList","Boolean","marginBottom","sections","windowSize","keyExtractor","value","stickySectionHeadersEnabled","renderSectionHeader","renderSectionFooter","renderItem","onContentSizeChange","_width","height","makeAccessible","role","multiSelectable","ActionListBox","assignWithoutSideEffects","displayName"],"mappings":";;;;;;;;;;;AAqBA,IAAMA,cAAc,CAAGC,cAAK,CAACC,UAAU,CACrC,SAAAC,IAAA,CAAiFC,GAAG,CAAK,CAAA,IAAtFC,WAAW,CAAAF,IAAA,CAAXE,WAAW,CAAEC,yBAAyB,CAAAH,IAAA,CAAzBG,yBAAyB,CAAEC,iBAAiB,CAAAJ,IAAA,CAAjBI,iBAAiB,CAAEC,eAAe,CAAAL,IAAA,CAAfK,eAAe,CAC3E,IAAAC,qBAAA,CAA2CC,qBAAqB,EAAE,CAA1DC,YAAY,CAAAF,qBAAA,CAAZE,YAAY,CAAEC,gBAAgB,CAAAH,qBAAA,CAAhBG,gBAAgB,CAEtC,IAAMC,oBAAoB,CAAGZ,cAAK,CAACa,WAAW,CAAC,SAAAC,KAAA,
|
|
1
|
+
{"version":3,"file":"ActionListBox.native.js","sources":["../../../../../src/components/ActionList/ActionListBox.native.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable react/display-name */\nimport React from 'react';\nimport { BottomSheetSectionList as GorhomBottomSheetSectionList } from '@gorhom/bottom-sheet';\nimport { SectionList } from 'react-native';\nimport { StyledListBoxWrapper } from './styles/StyledListBoxWrapper';\nimport { ActionListItem, ActionListSection } from './ActionListItem';\nimport type { SectionData } from './actionListUtils';\nimport { useBottomSheetContext } from '~components/BottomSheet/BottomSheetContext';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { Divider } from '~components/Divider';\n\ntype ActionListBoxProps = {\n childrenWithId?: React.ReactNode[] | null;\n sectionData: SectionData;\n actionListItemWrapperRole: 'listbox' | 'menu' | undefined;\n isMultiSelectable: boolean;\n isInBottomSheet: boolean;\n};\n\nconst _ActionListBox = React.forwardRef<SectionList, ActionListBoxProps>(\n ({ sectionData, actionListItemWrapperRole, isMultiSelectable, isInBottomSheet }, ref) => {\n const { footerHeight, setContentHeight } = useBottomSheetContext();\n\n const renderActionListItem = React.useCallback(({ item }: any) => {\n return <ActionListItem {...item} />;\n }, []);\n\n const renderActionListSectionHeader = React.useCallback(({ section: { title } }: any) => {\n if (!title) return null;\n return <ActionListSection title={title} _hideDivider={true} children={undefined} />;\n }, []);\n\n const renderActionListSectionDivider = React.useCallback(\n ({ section: { title, hideDivider } }: any) => {\n if (!title) return null;\n if (hideDivider) return null;\n return <Divider />;\n },\n [],\n );\n\n return (\n <StyledListBoxWrapper\n // Render either the Gorhom or RN Section list depending on where we are\n // We can't simply use RNSectionList because GorhomSectionList handles extra bottomsheet specific logic internally\n as={isInBottomSheet ? GorhomBottomSheetSectionList : SectionList}\n isInBottomSheet={Boolean(isInBottomSheet)}\n // Setting footerHeight as bottom margin for ActionListBox\n // otherwise the footer hides few list items under it, this will offset it\n marginBottom={footerHeight}\n sections={sectionData}\n windowSize={5}\n keyExtractor={(item: any) => {\n return item.value;\n }}\n stickySectionHeadersEnabled={false}\n renderSectionHeader={renderActionListSectionHeader}\n renderSectionFooter={renderActionListSectionDivider}\n renderItem={renderActionListItem}\n ref={ref as any}\n onContentSizeChange={(_width, height) => {\n setContentHeight(height);\n }}\n {...makeAccessible({\n role: actionListItemWrapperRole,\n multiSelectable: actionListItemWrapperRole === 'listbox' ? isMultiSelectable : undefined,\n })}\n />\n );\n },\n);\n\nconst ActionListBox = assignWithoutSideEffects(_ActionListBox, { displayName: 'ActionListBox' });\n\nexport { ActionListBox };\n"],"names":["_ActionListBox","React","forwardRef","_ref","ref","sectionData","actionListItemWrapperRole","isMultiSelectable","isInBottomSheet","_useBottomSheetContex","useBottomSheetContext","footerHeight","setContentHeight","renderActionListItem","useCallback","_ref2","item","_jsx","ActionListItem","Object","assign","renderActionListSectionHeader","_ref3","title","section","ActionListSection","_hideDivider","children","undefined","renderActionListSectionDivider","_ref4","_ref4$section","hideDivider","Divider","StyledListBoxWrapper","as","GorhomBottomSheetSectionList","SectionList","Boolean","marginBottom","sections","windowSize","keyExtractor","value","stickySectionHeadersEnabled","renderSectionHeader","renderSectionFooter","renderItem","onContentSizeChange","_width","height","makeAccessible","role","multiSelectable","ActionListBox","assignWithoutSideEffects","displayName"],"mappings":";;;;;;;;;;;AAqBA,IAAMA,cAAc,CAAGC,cAAK,CAACC,UAAU,CACrC,SAAAC,IAAA,CAAiFC,GAAG,CAAK,CAAA,IAAtFC,WAAW,CAAAF,IAAA,CAAXE,WAAW,CAAEC,yBAAyB,CAAAH,IAAA,CAAzBG,yBAAyB,CAAEC,iBAAiB,CAAAJ,IAAA,CAAjBI,iBAAiB,CAAEC,eAAe,CAAAL,IAAA,CAAfK,eAAe,CAC3E,IAAAC,qBAAA,CAA2CC,qBAAqB,EAAE,CAA1DC,YAAY,CAAAF,qBAAA,CAAZE,YAAY,CAAEC,gBAAgB,CAAAH,qBAAA,CAAhBG,gBAAgB,CAEtC,IAAMC,oBAAoB,CAAGZ,cAAK,CAACa,WAAW,CAAC,SAAAC,KAAA,CAAmB,CAAA,IAAhBC,IAAI,CAAAD,KAAA,CAAJC,IAAI,CACpD,OAAOC,GAAA,CAACC,cAAc,CAAAC,MAAA,CAAAC,MAAA,CAAKJ,EAAAA,CAAAA,IAAI,CAAG,CAAC,CACrC,CAAC,CAAE,EAAE,CAAC,CAEN,IAAMK,6BAA6B,CAAGpB,cAAK,CAACa,WAAW,CAAC,SAAAQ,KAAA,CAAiC,CAAnB,IAAAC,KAAK,CAAAD,KAAA,CAAhBE,OAAO,CAAID,KAAK,CACzE,GAAI,CAACA,KAAK,CAAE,OAAW,IAAA,CACvB,OAAON,GAAA,CAACQ,iBAAiB,CAAA,CAACF,KAAK,CAAEA,KAAM,CAACG,YAAY,CAAE,IAAK,CAACC,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Aa,CAAGC,wBAAwB,CAACvD,cAAc,CAAE,CAAEwD,WAAW,CAAE,eAAgB,CAAC;;;;"}
|
|
@@ -21,7 +21,7 @@ import { jsx, jsxs } from 'react/jsx-runtime';
|
|
|
21
21
|
import { Text } from '../Typography/Text/Text.js';
|
|
22
22
|
import '../Typography/Code/Code.js';
|
|
23
23
|
|
|
24
|
-
var _excluded=["value","suffix","type","size","weight","isAffixSubtle","isStrikethrough","color","currencyIndicator","currency","testID"];var getTextColorProps=function getTextColorProps(_ref){var color=_ref.color;var props={amountValueColor:'surface.text.gray.normal'};if(!color)return props;props.amountValueColor=color;return props;};var AmountValue=function AmountValue(_ref2){var amount=_ref2.amount,_ref2$size=_ref2.size,size=_ref2$size===void 0?'medium':_ref2$size,_ref2$type=_ref2.type,type=_ref2$type===void 0?'body':_ref2$type,_ref2$weight=_ref2.weight,weight=_ref2$weight===void 0?'regular':_ref2$weight,amountValueColor=_ref2.amountValueColor,isAffixSubtle=_ref2.isAffixSubtle,suffix=_ref2.suffix;var isReactNative=getPlatformType()==='react-native';var affixFontSize=isAffixSubtle?subtleFontSizes[type][size]:normalAmountSizes[type][size];var numberFontFamily=type==='body'?'text':'heading';if(suffix==='decimals'&&isAffixSubtle){var AmountWrapper=isReactNative?Text:React__default.Fragment;return jsxs(AmountWrapper,{children:[jsx(BaseText,{fontSize:normalAmountSizes[type][size],fontWeight:weight,lineHeight:amountLineHeights[type][size],color:amountValueColor,fontFamily:numberFontFamily,as:isReactNative?undefined:'span',children:amount.integer}),jsxs(BaseText,{fontWeight:weight,fontSize:affixFontSize,fontFamily:numberFontFamily,color:amountValueColor,as:isReactNative?undefined:'span',opacity:isAffixSubtle?opacity[8]:1,children:[amount.decimal,amount.fraction]})]});}return jsx(BaseText,{fontSize:normalAmountSizes[type][size],fontWeight:weight,fontFamily:numberFontFamily,color:amountValueColor,lineHeight:amountLineHeights[type][size],children:amount.formatted});};var formatAmountWithSuffix=function formatAmountWithSuffix(_ref3){var suffix=_ref3.suffix,value=_ref3.value;try{switch(suffix){case'decimals':{var options={intlOptions:{maximumFractionDigits:2,minimumFractionDigits:2}};return Object.assign({},formatNumberByParts(value,options),{formatted:formatNumber(value,options)});}case'humanize':{var formatted=formatNumber(value,{intlOptions:{notation:'compact'}});return {formatted:formatted};}default:{var _formatted=formatNumber(value,{intlOptions:{maximumFractionDigits:0,roundingMode:'floor'}});return {formatted:_formatted};}}}catch(err){return {formatted:`${value}`};}};var _Amount=function _Amount(_ref4){var value=_ref4.value,_ref4$suffix=_ref4.suffix,suffix=_ref4$suffix===void 0?'decimals':_ref4$suffix,_ref4$type=_ref4.type,type=_ref4$type===void 0?'body':_ref4$type,_ref4$size=_ref4.size,size=_ref4$size===void 0?'medium':_ref4$size,_ref4$weight=_ref4.weight,weight=_ref4$weight===void 0?'regular':_ref4$weight,_ref4$isAffixSubtle=_ref4.isAffixSubtle,isAffixSubtle=_ref4$isAffixSubtle===void 0?true:_ref4$isAffixSubtle,_ref4$isStrikethrough=_ref4.isStrikethrough,isStrikethrough=_ref4$isStrikethrough===void 0?false:_ref4$isStrikethrough,color=_ref4.color,_ref4$currencyIndicat=_ref4.currencyIndicator,currencyIndicator=_ref4$currencyIndicat===void 0?'currency-symbol':_ref4$currencyIndicat,_ref4$currency=_ref4.currency,currency=_ref4$currency===void 0?'INR':_ref4$currency,testID=_ref4.testID,styledProps=_objectWithoutProperties(_ref4,_excluded);if(__DEV__){if(typeof value!=='number'){throwBladeError({message:'`value` prop must be of type `number` for Amount.',moduleName:'Amount'});}if(color==='neutral'){throwBladeError({message:'`neutral` color is not supported.',moduleName:'Amount'});}var bodySizes=objectKeysWithType(normalAmountSizes.body);if((type==='body'||!type)&&!bodySizes.includes(size)){throwBladeError({message:`size="${size}" is not allowed with type="body"`,moduleName:'Amount'});}var displaySizes=objectKeysWithType(normalAmountSizes.display);if(type==='display'&&!displaySizes.includes(size)){throwBladeError({message:`size="${size}" is not allowed with type="display"`,moduleName:'Amount'});}var headingSizes=objectKeysWithType(normalAmountSizes.heading);if(type==='heading'&&!headingSizes.includes(size)){throwBladeError({message:`size="${size}" is not allowed with type="heading"`,moduleName:'Amount'});}}var _getTextColorProps=getTextColorProps({color:color}),amountValueColor=_getTextColorProps.amountValueColor;var isPrefixSymbol,currencySymbol;try{var byParts=formatNumberByParts(value,{currency:currency});isPrefixSymbol=byParts.isPrefixSymbol;currencySymbol=byParts.currency;}catch(err){isPrefixSymbol=true;currencySymbol=currency;}var currencyPosition=isPrefixSymbol?'left':'right';var renderedValue=formatAmountWithSuffix({suffix:suffix,value:value});var currencySymbolOrCode=currencyIndicator==='currency-symbol'?currencySymbol:currency;var currencyFontSize=isAffixSubtle?subtleFontSizes[type][size]:normalAmountSizes[type][size];var isReactNative=getPlatformType()==='react-native';return jsx(BaseBox,Object.assign({display:isReactNative?'flex':'inline-flex',flexDirection:"row"},metaAttribute({name:MetaConstants.Amount,testID:testID}),getStyledProps(styledProps),{children:jsxs(BaseBox,{display:isReactNative?'flex':'inline-flex',alignItems:"baseline",flexDirection:"row",position:"relative",children:[currencyPosition==='left'&&jsx(BaseText,{marginRight:"spacing.1",fontWeight:weight,fontSize:currencyFontSize,color:amountValueColor,as:isReactNative?undefined:'span',opacity:isAffixSubtle?opacity[8]:1,children:currencySymbolOrCode}),jsx(AmountValue,{amount:renderedValue,amountValueColor:amountValueColor,type:type,weight:weight,size:size,isAffixSubtle:isAffixSubtle,suffix:suffix,currency:currency}),currencyPosition==='right'&&jsx(BaseText,{marginLeft:"spacing.1",fontWeight:weight,fontSize:currencyFontSize,color:amountValueColor,as:isReactNative?undefined:'span',opacity:isAffixSubtle?opacity[8]:1,children:currencySymbolOrCode}),isStrikethrough&&jsx(BaseBox,{borderBottomColor:amountValueColor,borderBottomWidth:type==='body'?'thin':'thicker',borderBottomStyle:"solid",position:"absolute",width:"100%",top:"50%"})]})}));};var Amount=assignWithoutSideEffects(_Amount,{displayName:'Amount',componentId:'Amount'});
|
|
24
|
+
var _excluded=["value","suffix","type","size","weight","isAffixSubtle","isStrikethrough","color","currencyIndicator","currency","testID"];var getTextColorProps=function getTextColorProps(_ref){var color=_ref.color;var props={amountValueColor:'surface.text.gray.normal'};if(!color)return props;props.amountValueColor=color;return props;};var AmountValue=function AmountValue(_ref2){var amount=_ref2.amount,_ref2$size=_ref2.size,size=_ref2$size===void 0?'medium':_ref2$size,_ref2$type=_ref2.type,type=_ref2$type===void 0?'body':_ref2$type,_ref2$weight=_ref2.weight,weight=_ref2$weight===void 0?'regular':_ref2$weight,amountValueColor=_ref2.amountValueColor,isAffixSubtle=_ref2.isAffixSubtle,suffix=_ref2.suffix;var isReactNative=getPlatformType()==='react-native';var affixFontSize=isAffixSubtle?subtleFontSizes[type][size]:normalAmountSizes[type][size];var numberFontFamily=type==='body'?'text':'heading';if(suffix==='decimals'&&isAffixSubtle){var AmountWrapper=isReactNative?Text:React__default.Fragment;return jsxs(AmountWrapper,{children:[jsx(BaseText,{fontSize:normalAmountSizes[type][size],fontWeight:weight,lineHeight:amountLineHeights[type][size],color:amountValueColor,fontFamily:numberFontFamily,as:isReactNative?undefined:'span',children:amount.integer}),jsxs(BaseText,{fontWeight:weight,fontSize:affixFontSize,fontFamily:numberFontFamily,color:amountValueColor,as:isReactNative?undefined:'span',opacity:isAffixSubtle?opacity[8]:1,children:[amount.decimal,amount.fraction]})]});}return jsx(BaseText,{fontSize:normalAmountSizes[type][size],fontWeight:weight,fontFamily:numberFontFamily,color:amountValueColor,lineHeight:amountLineHeights[type][size],children:amount.formatted});};var formatAmountWithSuffix=function formatAmountWithSuffix(_ref3){var suffix=_ref3.suffix,value=_ref3.value;try{switch(suffix){case'decimals':{var options={intlOptions:{maximumFractionDigits:2,minimumFractionDigits:2}};return Object.assign({},formatNumberByParts(value,options),{formatted:formatNumber(value,options)});}case'humanize':{var formatted=formatNumber(value,{intlOptions:{notation:'compact',maximumFractionDigits:2,trailingZeroDisplay:'stripIfInteger'}});return {formatted:formatted};}default:{var _formatted=formatNumber(value,{intlOptions:{maximumFractionDigits:0,roundingMode:'floor'}});return {formatted:_formatted};}}}catch(err){return {formatted:`${value}`};}};var _Amount=function _Amount(_ref4){var value=_ref4.value,_ref4$suffix=_ref4.suffix,suffix=_ref4$suffix===void 0?'decimals':_ref4$suffix,_ref4$type=_ref4.type,type=_ref4$type===void 0?'body':_ref4$type,_ref4$size=_ref4.size,size=_ref4$size===void 0?'medium':_ref4$size,_ref4$weight=_ref4.weight,weight=_ref4$weight===void 0?'regular':_ref4$weight,_ref4$isAffixSubtle=_ref4.isAffixSubtle,isAffixSubtle=_ref4$isAffixSubtle===void 0?true:_ref4$isAffixSubtle,_ref4$isStrikethrough=_ref4.isStrikethrough,isStrikethrough=_ref4$isStrikethrough===void 0?false:_ref4$isStrikethrough,color=_ref4.color,_ref4$currencyIndicat=_ref4.currencyIndicator,currencyIndicator=_ref4$currencyIndicat===void 0?'currency-symbol':_ref4$currencyIndicat,_ref4$currency=_ref4.currency,currency=_ref4$currency===void 0?'INR':_ref4$currency,testID=_ref4.testID,styledProps=_objectWithoutProperties(_ref4,_excluded);if(__DEV__){if(typeof value!=='number'){throwBladeError({message:'`value` prop must be of type `number` for Amount.',moduleName:'Amount'});}if(color==='neutral'){throwBladeError({message:'`neutral` color is not supported.',moduleName:'Amount'});}var bodySizes=objectKeysWithType(normalAmountSizes.body);if((type==='body'||!type)&&!bodySizes.includes(size)){throwBladeError({message:`size="${size}" is not allowed with type="body"`,moduleName:'Amount'});}var displaySizes=objectKeysWithType(normalAmountSizes.display);if(type==='display'&&!displaySizes.includes(size)){throwBladeError({message:`size="${size}" is not allowed with type="display"`,moduleName:'Amount'});}var headingSizes=objectKeysWithType(normalAmountSizes.heading);if(type==='heading'&&!headingSizes.includes(size)){throwBladeError({message:`size="${size}" is not allowed with type="heading"`,moduleName:'Amount'});}}var _getTextColorProps=getTextColorProps({color:color}),amountValueColor=_getTextColorProps.amountValueColor;var isPrefixSymbol,currencySymbol;try{var byParts=formatNumberByParts(value,{currency:currency});isPrefixSymbol=byParts.isPrefixSymbol;currencySymbol=byParts.currency;}catch(err){isPrefixSymbol=true;currencySymbol=currency;}var currencyPosition=isPrefixSymbol?'left':'right';var renderedValue=formatAmountWithSuffix({suffix:suffix,value:value});var currencySymbolOrCode=currencyIndicator==='currency-symbol'?currencySymbol:currency;var currencyFontSize=isAffixSubtle?subtleFontSizes[type][size]:normalAmountSizes[type][size];var isReactNative=getPlatformType()==='react-native';return jsx(BaseBox,Object.assign({display:isReactNative?'flex':'inline-flex',flexDirection:"row"},metaAttribute({name:MetaConstants.Amount,testID:testID}),getStyledProps(styledProps),{children:jsxs(BaseBox,{display:isReactNative?'flex':'inline-flex',alignItems:"baseline",flexDirection:"row",position:"relative",children:[currencyPosition==='left'&&jsx(BaseText,{marginRight:"spacing.1",fontWeight:weight,fontSize:currencyFontSize,color:amountValueColor,as:isReactNative?undefined:'span',opacity:isAffixSubtle?opacity[8]:1,children:currencySymbolOrCode}),jsx(AmountValue,{amount:renderedValue,amountValueColor:amountValueColor,type:type,weight:weight,size:size,isAffixSubtle:isAffixSubtle,suffix:suffix,currency:currency}),currencyPosition==='right'&&jsx(BaseText,{marginLeft:"spacing.1",fontWeight:weight,fontSize:currencyFontSize,color:amountValueColor,as:isReactNative?undefined:'span',opacity:isAffixSubtle?opacity[8]:1,children:currencySymbolOrCode}),isStrikethrough&&jsx(BaseBox,{borderBottomColor:amountValueColor,borderBottomWidth:type==='body'?'thin':'thicker',borderBottomStyle:"solid",position:"absolute",width:"100%",top:"50%"})]})}));};var Amount=assignWithoutSideEffects(_Amount,{displayName:'Amount',componentId:'Amount'});
|
|
25
25
|
|
|
26
26
|
export { Amount, formatAmountWithSuffix };
|
|
27
27
|
//# sourceMappingURL=Amount.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Amount.js","sources":["../../../../../src/components/Amount/Amount.tsx"],"sourcesContent":["import type { ReactElement } from 'react';\nimport React from 'react';\nimport type { CurrencyCodeType } from '@razorpay/i18nify-js/currency';\nimport { formatNumber, formatNumberByParts } from '@razorpay/i18nify-js/currency';\nimport type { AmountTypeProps } from './amountTokens';\nimport { normalAmountSizes, subtleFontSizes, amountLineHeights } from './amountTokens';\nimport type { BaseTextProps } from '~components/Typography/BaseText/types';\nimport BaseBox from '~components/Box/BaseBox';\nimport type { TestID } from '~utils/types';\nimport { getPlatformType } from '~utils';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { throwBladeError } from '~utils/logger';\nimport { objectKeysWithType } from '~utils/objectKeysWithType';\nimport { BaseText } from '~components/Typography/BaseText';\nimport { Text } from '~components/Typography';\nimport { opacity } from '~tokens/global';\nimport type { FontFamily } from '~tokens/global';\n\ntype AmountCommonProps = {\n /**\n * The value to be rendered within the component.\n *\n */\n value: number;\n /**\n * Sets the color of the amount.\n *\n * @default undefined\n */\n color?: BaseTextProps['color'];\n /**\n * Indicates what the suffix of amount should be\n *\n * @default 'decimals'\n */\n suffix?: 'decimals' | 'none' | 'humanize';\n /**\n * Makes the currency indicator(currency symbol/code) and decimal digits small and faded\n *\n * @default true\n */\n isAffixSubtle?: true | false;\n /**\n * Determines the visual representation of the currency, choose between displaying the currency symbol or code.\n *\n * Note: Currency symbol and code is determined by the locale set in user's browser or set via @razorpay/i18nify-react library.\n *\n * @default 'currency-symbol'\n */\n currencyIndicator?: 'currency-symbol' | 'currency-code';\n /**\n * The currency of the amount. Note that this component\n * only displays the provided value in the specified currency, it does not perform any currency conversion.\n *\n * @default 'INR'\n * */\n currency?: CurrencyCodeType;\n /**\n * If true, the amount text will have a line through it.\n *\n * @default false\n */\n isStrikethrough?: boolean;\n} & TestID &\n StyledPropsBlade;\n\ntype ColorProps = {\n amountValueColor: BaseTextProps['color'];\n};\n\ntype AmountProps = AmountTypeProps & AmountCommonProps;\n\nconst getTextColorProps = ({ color }: { color: AmountProps['color'] }): ColorProps => {\n const props: ColorProps = {\n amountValueColor: 'surface.text.gray.normal',\n };\n if (!color) return props;\n props.amountValueColor = color;\n return props;\n};\n\ntype AmountType = Partial<ReturnType<typeof formatNumberByParts>> & { formatted: string };\n\ninterface AmountValue extends Omit<AmountProps, 'value'> {\n amountValueColor: BaseTextProps['color'];\n amount: AmountType;\n size: Exclude<AmountProps['size'], undefined>;\n}\n\nconst AmountValue = ({\n amount,\n size = 'medium',\n type = 'body',\n weight = 'regular',\n amountValueColor,\n isAffixSubtle,\n suffix,\n}: AmountValue): ReactElement => {\n const isReactNative = getPlatformType() === 'react-native';\n const affixFontSize = isAffixSubtle ? subtleFontSizes[type][size] : normalAmountSizes[type][size];\n const numberFontFamily: keyof FontFamily = type === 'body' ? 'text' : 'heading';\n if (suffix === 'decimals' && isAffixSubtle) {\n // Native does not support alignItems of Text inside a div, instead we need to wrap is in a Text\n const AmountWrapper = isReactNative ? Text : React.Fragment;\n\n return (\n <AmountWrapper>\n <BaseText\n fontSize={normalAmountSizes[type][size]}\n fontWeight={weight}\n lineHeight={amountLineHeights[type][size]}\n color={amountValueColor}\n fontFamily={numberFontFamily}\n as={isReactNative ? undefined : 'span'}\n >\n {amount.integer}\n </BaseText>\n <BaseText\n fontWeight={weight}\n fontSize={affixFontSize}\n fontFamily={numberFontFamily}\n color={amountValueColor}\n as={isReactNative ? undefined : 'span'}\n opacity={isAffixSubtle ? opacity[8] : 1}\n >\n {amount.decimal}\n {amount.fraction}\n </BaseText>\n </AmountWrapper>\n );\n }\n\n return (\n <BaseText\n fontSize={normalAmountSizes[type][size]}\n fontWeight={weight}\n fontFamily={numberFontFamily}\n color={amountValueColor}\n lineHeight={amountLineHeights[type][size]}\n >\n {amount.formatted}\n </BaseText>\n );\n};\n\ntype FormatAmountWithSuffixType = {\n suffix: AmountProps['suffix'];\n value: number;\n};\n\n/**\n * Returns a parsed object based on the suffix passed in parameters\n * === Logic ===\n * value = 12500.45 \n * if suffix === 'decimals' => {\n \"formatted\": \"12,500.45\",\n \"integer\": \"12,500\",\n \"decimal\": \".\",\n \"fraction\": \"45\",\n \"isPrefixSymbol\": false,\n \"rawParts\": [{\"type\": \"integer\",\"value\": \"12\"},{\"type\": \"group\",\"value\": \",\"},{\"type\": \"integer\",\"value\": \"500\"},{\"type\": \"decimal\",\"value\": \".\"},{\"type\": \"fraction\",\"value\": \"45\"}]\n}\n * else if suffix === 'humanize' => { formatted: \"1.2T\" }\n * else => { formatted: \"1,23,456\" }\n * @returns {AmountType}\n */\nexport const formatAmountWithSuffix = ({\n suffix,\n value,\n}: FormatAmountWithSuffixType): AmountType => {\n try {\n switch (suffix) {\n case 'decimals': {\n const options = {\n intlOptions: {\n maximumFractionDigits: 2,\n minimumFractionDigits: 2,\n },\n };\n return {\n ...formatNumberByParts(value, options),\n formatted: formatNumber(value, options),\n };\n }\n case 'humanize': {\n const formatted = formatNumber(value, {\n intlOptions: {\n notation: 'compact',\n },\n });\n return {\n formatted,\n };\n }\n\n default: {\n const formatted = formatNumber(value, {\n intlOptions: {\n maximumFractionDigits: 0,\n roundingMode: 'floor',\n },\n });\n return {\n formatted,\n };\n }\n }\n } catch (err: unknown) {\n return {\n formatted: `${value}`,\n };\n }\n};\n\nconst _Amount = ({\n value,\n suffix = 'decimals',\n type = 'body',\n size = 'medium',\n weight = 'regular',\n isAffixSubtle = true,\n isStrikethrough = false,\n color,\n currencyIndicator = 'currency-symbol',\n currency = 'INR',\n testID,\n ...styledProps\n}: AmountProps): ReactElement => {\n if (__DEV__) {\n if (typeof value !== 'number') {\n throwBladeError({\n message: '`value` prop must be of type `number` for Amount.',\n moduleName: 'Amount',\n });\n }\n // @ts-expect-error neutral color should throw error\n if (color === 'neutral') {\n throwBladeError({\n message: '`neutral` color is not supported.',\n moduleName: 'Amount',\n });\n }\n\n const bodySizes = objectKeysWithType(normalAmountSizes.body);\n if ((type === 'body' || !type) && !bodySizes.includes(size)) {\n throwBladeError({\n message: `size=\"${size}\" is not allowed with type=\"body\"`,\n moduleName: 'Amount',\n });\n }\n\n const displaySizes = objectKeysWithType(normalAmountSizes.display);\n if (type === 'display' && !displaySizes.includes(size)) {\n throwBladeError({\n message: `size=\"${size}\" is not allowed with type=\"display\"`,\n moduleName: 'Amount',\n });\n }\n\n const headingSizes = objectKeysWithType(normalAmountSizes.heading);\n if (type === 'heading' && !headingSizes.includes(size)) {\n throwBladeError({\n message: `size=\"${size}\" is not allowed with type=\"heading\"`,\n moduleName: 'Amount',\n });\n }\n }\n\n const { amountValueColor } = getTextColorProps({\n color,\n });\n\n let isPrefixSymbol, currencySymbol;\n try {\n const byParts = formatNumberByParts(value, {\n currency,\n });\n isPrefixSymbol = byParts.isPrefixSymbol;\n currencySymbol = byParts.currency;\n } catch (err: unknown) {\n isPrefixSymbol = true;\n currencySymbol = currency;\n }\n\n const currencyPosition = isPrefixSymbol ? 'left' : 'right';\n const renderedValue = formatAmountWithSuffix({ suffix, value });\n const currencySymbolOrCode = currencyIndicator === 'currency-symbol' ? currencySymbol : currency;\n\n const currencyFontSize = isAffixSubtle\n ? subtleFontSizes[type][size]\n : normalAmountSizes[type][size];\n const isReactNative = getPlatformType() === 'react-native';\n\n return (\n <BaseBox\n display={(isReactNative ? 'flex' : 'inline-flex') as never}\n flexDirection=\"row\"\n {...metaAttribute({ name: MetaConstants.Amount, testID })}\n {...getStyledProps(styledProps)}\n >\n <BaseBox\n display={(isReactNative ? 'flex' : 'inline-flex') as never}\n alignItems=\"baseline\"\n flexDirection=\"row\"\n position=\"relative\"\n >\n {currencyPosition === 'left' && (\n <BaseText\n marginRight=\"spacing.1\"\n fontWeight={weight}\n fontSize={currencyFontSize}\n color={amountValueColor}\n as={isReactNative ? undefined : 'span'}\n opacity={isAffixSubtle ? opacity[8] : 1}\n >\n {currencySymbolOrCode}\n </BaseText>\n )}\n <AmountValue\n amount={renderedValue}\n amountValueColor={amountValueColor}\n type={type}\n weight={weight}\n size={size}\n isAffixSubtle={isAffixSubtle}\n suffix={suffix}\n currency={currency}\n />\n {currencyPosition === 'right' && (\n <BaseText\n marginLeft=\"spacing.1\"\n fontWeight={weight}\n fontSize={currencyFontSize}\n color={amountValueColor}\n as={isReactNative ? undefined : 'span'}\n opacity={isAffixSubtle ? opacity[8] : 1}\n >\n {currencySymbolOrCode}\n </BaseText>\n )}\n {isStrikethrough && (\n <BaseBox\n // @ts-expect-error - intentionally setting the border color to the color prop for this hacky strikethrough\n borderBottomColor={amountValueColor}\n borderBottomWidth={type === 'body' ? 'thin' : 'thicker'}\n borderBottomStyle=\"solid\"\n position=\"absolute\"\n width=\"100%\"\n top=\"50%\"\n />\n )}\n </BaseBox>\n </BaseBox>\n );\n};\n\nconst Amount = assignWithoutSideEffects(_Amount, {\n displayName: 'Amount',\n componentId: 'Amount',\n});\n\nexport type { AmountProps };\nexport { Amount };\n"],"names":["getTextColorProps","_ref","color","props","amountValueColor","AmountValue","_ref2","amount","_ref2$size","size","_ref2$type","type","_ref2$weight","weight","isAffixSubtle","suffix","isReactNative","getPlatformType","affixFontSize","subtleFontSizes","normalAmountSizes","numberFontFamily","AmountWrapper","Text","React","Fragment","_jsxs","children","_jsx","BaseText","fontSize","fontWeight","lineHeight","amountLineHeights","fontFamily","as","undefined","integer","opacity","decimal","fraction","formatted","formatAmountWithSuffix","_ref3","value","options","intlOptions","maximumFractionDigits","minimumFractionDigits","Object","assign","formatNumberByParts","formatNumber","notation","roundingMode","err","_Amount","_ref4","_ref4$suffix","_ref4$type","_ref4$size","_ref4$weight","_ref4$isAffixSubtle","_ref4$isStrikethrough","isStrikethrough","_ref4$currencyIndicat","currencyIndicator","_ref4$currency","currency","testID","styledProps","_objectWithoutProperties","_excluded","__DEV__","throwBladeError","message","moduleName","bodySizes","objectKeysWithType","body","includes","displaySizes","display","headingSizes","heading","_getTextColorProps","isPrefixSymbol","currencySymbol","byParts","currencyPosition","renderedValue","currencySymbolOrCode","currencyFontSize","BaseBox","flexDirection","metaAttribute","name","MetaConstants","Amount","getStyledProps","alignItems","position","marginRight","marginLeft","borderBottomColor","borderBottomWidth","borderBottomStyle","width","top","assignWithoutSideEffects","displayName","componentId"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AACA,IAAA,SAAA,CAAA,CAAA,OAAA,CAAA,QAAA,CAAA,MAAA,CAAA,MAAA,CAAA,QAAA,CAAA,eAAA,CAAA,iBAAA,CAAA,OAAA,CAAA,mBAAA,CAAA,UAAA,CAAA,QAAA,CAAA,CA0EA,IAAMA,iBAAiB,CAAG,SAApBA,iBAAiBA,CAAAC,IAAA,CAA+D,CAAzD,IAAAC,KAAK,CAAAD,IAAA,CAALC,KAAK,CAChC,IAAMC,KAAiB,CAAG,CACxBC,gBAAgB,CAAE,0BACpB,CAAC,CACD,GAAI,CAACF,KAAK,CAAE,OAAOC,KAAK,CACxBA,KAAK,CAACC,gBAAgB,CAAGF,KAAK,CAC9B,OAAOC,KAAK,CACd,CAAC,CAUD,IAAME,WAAW,CAAG,SAAdA,WAAWA,CAAAC,KAAA,CAQgB,CAAA,IAP/BC,MAAM,CAAAD,KAAA,CAANC,MAAM,CAAAC,UAAA,CAAAF,KAAA,CACNG,IAAI,CAAJA,IAAI,CAAAD,UAAA,GAAA,KAAA,CAAA,CAAG,QAAQ,CAAAA,UAAA,CAAAE,UAAA,CAAAJ,KAAA,CACfK,IAAI,CAAJA,IAAI,CAAAD,UAAA,GAAG,KAAA,CAAA,CAAA,MAAM,CAAAA,UAAA,CAAAE,YAAA,CAAAN,KAAA,CACbO,MAAM,CAANA,MAAM,CAAAD,YAAA,GAAG,KAAA,CAAA,CAAA,SAAS,CAAAA,YAAA,CAClBR,gBAAgB,CAAAE,KAAA,CAAhBF,gBAAgB,CAChBU,aAAa,CAAAR,KAAA,CAAbQ,aAAa,CACbC,MAAM,CAAAT,KAAA,CAANS,MAAM,CAEN,IAAMC,aAAa,CAAGC,eAAe,EAAE,GAAK,cAAc,CAC1D,IAAMC,aAAa,CAAGJ,aAAa,CAAGK,eAAe,CAACR,IAAI,CAAC,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,CACrBC,WAAW,CAAE,QACf,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"Amount.js","sources":["../../../../../src/components/Amount/Amount.tsx"],"sourcesContent":["import type { ReactElement } from 'react';\nimport React from 'react';\nimport type { CurrencyCodeType } from '@razorpay/i18nify-js/currency';\nimport { formatNumber, formatNumberByParts } from '@razorpay/i18nify-js/currency';\nimport type { AmountTypeProps } from './amountTokens';\nimport { normalAmountSizes, subtleFontSizes, amountLineHeights } from './amountTokens';\nimport type { BaseTextProps } from '~components/Typography/BaseText/types';\nimport BaseBox from '~components/Box/BaseBox';\nimport type { TestID } from '~utils/types';\nimport { getPlatformType } from '~utils';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { throwBladeError } from '~utils/logger';\nimport { objectKeysWithType } from '~utils/objectKeysWithType';\nimport { BaseText } from '~components/Typography/BaseText';\nimport { Text } from '~components/Typography';\nimport { opacity } from '~tokens/global';\nimport type { FontFamily } from '~tokens/global';\n\ntype AmountCommonProps = {\n /**\n * The value to be rendered within the component.\n *\n */\n value: number;\n /**\n * Sets the color of the amount.\n *\n * @default undefined\n */\n color?: BaseTextProps['color'];\n /**\n * Indicates what the suffix of amount should be\n *\n * @default 'decimals'\n */\n suffix?: 'decimals' | 'none' | 'humanize';\n /**\n * Makes the currency indicator(currency symbol/code) and decimal digits small and faded\n *\n * @default true\n */\n isAffixSubtle?: true | false;\n /**\n * Determines the visual representation of the currency, choose between displaying the currency symbol or code.\n *\n * Note: Currency symbol and code is determined by the locale set in user's browser or set via @razorpay/i18nify-react library.\n *\n * @default 'currency-symbol'\n */\n currencyIndicator?: 'currency-symbol' | 'currency-code';\n /**\n * The currency of the amount. Note that this component\n * only displays the provided value in the specified currency, it does not perform any currency conversion.\n *\n * @default 'INR'\n * */\n currency?: CurrencyCodeType;\n /**\n * If true, the amount text will have a line through it.\n *\n * @default false\n */\n isStrikethrough?: boolean;\n} & TestID &\n StyledPropsBlade;\n\ntype ColorProps = {\n amountValueColor: BaseTextProps['color'];\n};\n\ntype AmountProps = AmountTypeProps & AmountCommonProps;\n\nconst getTextColorProps = ({ color }: { color: AmountProps['color'] }): ColorProps => {\n const props: ColorProps = {\n amountValueColor: 'surface.text.gray.normal',\n };\n if (!color) return props;\n props.amountValueColor = color;\n return props;\n};\n\ntype AmountType = Partial<ReturnType<typeof formatNumberByParts>> & { formatted: string };\n\ninterface AmountValue extends Omit<AmountProps, 'value'> {\n amountValueColor: BaseTextProps['color'];\n amount: AmountType;\n size: Exclude<AmountProps['size'], undefined>;\n}\n\nconst AmountValue = ({\n amount,\n size = 'medium',\n type = 'body',\n weight = 'regular',\n amountValueColor,\n isAffixSubtle,\n suffix,\n}: AmountValue): ReactElement => {\n const isReactNative = getPlatformType() === 'react-native';\n const affixFontSize = isAffixSubtle ? subtleFontSizes[type][size] : normalAmountSizes[type][size];\n const numberFontFamily: keyof FontFamily = type === 'body' ? 'text' : 'heading';\n if (suffix === 'decimals' && isAffixSubtle) {\n // Native does not support alignItems of Text inside a div, instead we need to wrap is in a Text\n const AmountWrapper = isReactNative ? Text : React.Fragment;\n\n return (\n <AmountWrapper>\n <BaseText\n fontSize={normalAmountSizes[type][size]}\n fontWeight={weight}\n lineHeight={amountLineHeights[type][size]}\n color={amountValueColor}\n fontFamily={numberFontFamily}\n as={isReactNative ? undefined : 'span'}\n >\n {amount.integer}\n </BaseText>\n <BaseText\n fontWeight={weight}\n fontSize={affixFontSize}\n fontFamily={numberFontFamily}\n color={amountValueColor}\n as={isReactNative ? undefined : 'span'}\n opacity={isAffixSubtle ? opacity[8] : 1}\n >\n {amount.decimal}\n {amount.fraction}\n </BaseText>\n </AmountWrapper>\n );\n }\n\n return (\n <BaseText\n fontSize={normalAmountSizes[type][size]}\n fontWeight={weight}\n fontFamily={numberFontFamily}\n color={amountValueColor}\n lineHeight={amountLineHeights[type][size]}\n >\n {amount.formatted}\n </BaseText>\n );\n};\n\ntype FormatAmountWithSuffixType = {\n suffix: AmountProps['suffix'];\n value: number;\n};\n\n/**\n * Returns a parsed object based on the suffix passed in parameters\n * === Logic ===\n * value = 12500.45 \n * if suffix === 'decimals' => {\n \"formatted\": \"12,500.45\",\n \"integer\": \"12,500\",\n \"decimal\": \".\",\n \"fraction\": \"45\",\n \"isPrefixSymbol\": false,\n \"rawParts\": [{\"type\": \"integer\",\"value\": \"12\"},{\"type\": \"group\",\"value\": \",\"},{\"type\": \"integer\",\"value\": \"500\"},{\"type\": \"decimal\",\"value\": \".\"},{\"type\": \"fraction\",\"value\": \"45\"}]\n}\n * else if suffix === 'humanize' => { formatted: \"1.2T\" }\n * else => { formatted: \"1,23,456\" }\n * @returns {AmountType}\n */\nexport const formatAmountWithSuffix = ({\n suffix,\n value,\n}: FormatAmountWithSuffixType): AmountType => {\n try {\n switch (suffix) {\n case 'decimals': {\n const options = {\n intlOptions: {\n maximumFractionDigits: 2,\n minimumFractionDigits: 2,\n },\n };\n return {\n ...formatNumberByParts(value, options),\n formatted: formatNumber(value, options),\n };\n }\n case 'humanize': {\n const formatted = formatNumber(value, {\n intlOptions: {\n notation: 'compact',\n maximumFractionDigits: 2,\n trailingZeroDisplay: 'stripIfInteger',\n },\n });\n return {\n formatted,\n };\n }\n\n default: {\n const formatted = formatNumber(value, {\n intlOptions: {\n maximumFractionDigits: 0,\n roundingMode: 'floor',\n },\n });\n return {\n formatted,\n };\n }\n }\n } catch (err: unknown) {\n return {\n formatted: `${value}`,\n };\n }\n};\n\nconst _Amount = ({\n value,\n suffix = 'decimals',\n type = 'body',\n size = 'medium',\n weight = 'regular',\n isAffixSubtle = true,\n isStrikethrough = false,\n color,\n currencyIndicator = 'currency-symbol',\n currency = 'INR',\n testID,\n ...styledProps\n}: AmountProps): ReactElement => {\n if (__DEV__) {\n if (typeof value !== 'number') {\n throwBladeError({\n message: '`value` prop must be of type `number` for Amount.',\n moduleName: 'Amount',\n });\n }\n // @ts-expect-error neutral color should throw error\n if (color === 'neutral') {\n throwBladeError({\n message: '`neutral` color is not supported.',\n moduleName: 'Amount',\n });\n }\n\n const bodySizes = objectKeysWithType(normalAmountSizes.body);\n if ((type === 'body' || !type) && !bodySizes.includes(size)) {\n throwBladeError({\n message: `size=\"${size}\" is not allowed with type=\"body\"`,\n moduleName: 'Amount',\n });\n }\n\n const displaySizes = objectKeysWithType(normalAmountSizes.display);\n if (type === 'display' && !displaySizes.includes(size)) {\n throwBladeError({\n message: `size=\"${size}\" is not allowed with type=\"display\"`,\n moduleName: 'Amount',\n });\n }\n\n const headingSizes = objectKeysWithType(normalAmountSizes.heading);\n if (type === 'heading' && !headingSizes.includes(size)) {\n throwBladeError({\n message: `size=\"${size}\" is not allowed with type=\"heading\"`,\n moduleName: 'Amount',\n });\n }\n }\n\n const { amountValueColor } = getTextColorProps({\n color,\n });\n\n let isPrefixSymbol, currencySymbol;\n try {\n const byParts = formatNumberByParts(value, {\n currency,\n });\n isPrefixSymbol = byParts.isPrefixSymbol;\n currencySymbol = byParts.currency;\n } catch (err: unknown) {\n isPrefixSymbol = true;\n currencySymbol = currency;\n }\n\n const currencyPosition = isPrefixSymbol ? 'left' : 'right';\n const renderedValue = formatAmountWithSuffix({ suffix, value });\n const currencySymbolOrCode = currencyIndicator === 'currency-symbol' ? currencySymbol : currency;\n\n const currencyFontSize = isAffixSubtle\n ? subtleFontSizes[type][size]\n : normalAmountSizes[type][size];\n const isReactNative = getPlatformType() === 'react-native';\n\n return (\n <BaseBox\n display={(isReactNative ? 'flex' : 'inline-flex') as never}\n flexDirection=\"row\"\n {...metaAttribute({ name: MetaConstants.Amount, testID })}\n {...getStyledProps(styledProps)}\n >\n <BaseBox\n display={(isReactNative ? 'flex' : 'inline-flex') as never}\n alignItems=\"baseline\"\n flexDirection=\"row\"\n position=\"relative\"\n >\n {currencyPosition === 'left' && (\n <BaseText\n marginRight=\"spacing.1\"\n fontWeight={weight}\n fontSize={currencyFontSize}\n color={amountValueColor}\n as={isReactNative ? undefined : 'span'}\n opacity={isAffixSubtle ? opacity[8] : 1}\n >\n {currencySymbolOrCode}\n </BaseText>\n )}\n <AmountValue\n amount={renderedValue}\n amountValueColor={amountValueColor}\n type={type}\n weight={weight}\n size={size}\n isAffixSubtle={isAffixSubtle}\n suffix={suffix}\n currency={currency}\n />\n {currencyPosition === 'right' && (\n <BaseText\n marginLeft=\"spacing.1\"\n fontWeight={weight}\n fontSize={currencyFontSize}\n color={amountValueColor}\n as={isReactNative ? undefined : 'span'}\n opacity={isAffixSubtle ? opacity[8] : 1}\n >\n {currencySymbolOrCode}\n </BaseText>\n )}\n {isStrikethrough && (\n <BaseBox\n // @ts-expect-error - intentionally setting the border color to the color prop for this hacky strikethrough\n borderBottomColor={amountValueColor}\n borderBottomWidth={type === 'body' ? 'thin' : 'thicker'}\n borderBottomStyle=\"solid\"\n position=\"absolute\"\n width=\"100%\"\n top=\"50%\"\n />\n )}\n </BaseBox>\n </BaseBox>\n );\n};\n\nconst Amount = assignWithoutSideEffects(_Amount, {\n displayName: 'Amount',\n componentId: 'Amount',\n});\n\nexport type { AmountProps };\nexport { Amount };\n"],"names":["getTextColorProps","_ref","color","props","amountValueColor","AmountValue","_ref2","amount","_ref2$size","size","_ref2$type","type","_ref2$weight","weight","isAffixSubtle","suffix","isReactNative","getPlatformType","affixFontSize","subtleFontSizes","normalAmountSizes","numberFontFamily","AmountWrapper","Text","React","Fragment","_jsxs","children","_jsx","BaseText","fontSize","fontWeight","lineHeight","amountLineHeights","fontFamily","as","undefined","integer","opacity","decimal","fraction","formatted","formatAmountWithSuffix","_ref3","value","options","intlOptions","maximumFractionDigits","minimumFractionDigits","Object","assign","formatNumberByParts","formatNumber","notation","trailingZeroDisplay","roundingMode","err","_Amount","_ref4","_ref4$suffix","_ref4$type","_ref4$size","_ref4$weight","_ref4$isAffixSubtle","_ref4$isStrikethrough","isStrikethrough","_ref4$currencyIndicat","currencyIndicator","_ref4$currency","currency","testID","styledProps","_objectWithoutProperties","_excluded","__DEV__","throwBladeError","message","moduleName","bodySizes","objectKeysWithType","body","includes","displaySizes","display","headingSizes","heading","_getTextColorProps","isPrefixSymbol","currencySymbol","byParts","currencyPosition","renderedValue","currencySymbolOrCode","currencyFontSize","BaseBox","flexDirection","metaAttribute","name","MetaConstants","Amount","getStyledProps","alignItems","position","marginRight","marginLeft","borderBottomColor","borderBottomWidth","borderBottomStyle","width","top","assignWithoutSideEffects","displayName","componentId"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AACA,IAAA,SAAA,CAAA,CAAA,OAAA,CAAA,QAAA,CAAA,MAAA,CAAA,MAAA,CAAA,QAAA,CAAA,eAAA,CAAA,iBAAA,CAAA,OAAA,CAAA,mBAAA,CAAA,UAAA,CAAA,QAAA,CAAA,CA0EA,IAAMA,iBAAiB,CAAG,SAApBA,iBAAiBA,CAAAC,IAAA,CAA+D,KAAzDC,KAAK,CAAAD,IAAA,CAALC,KAAK,CAChC,IAAMC,KAAiB,CAAG,CACxBC,gBAAgB,CAAE,0BACpB,CAAC,CACD,GAAI,CAACF,KAAK,CAAE,OAAOC,KAAK,CACxBA,KAAK,CAACC,gBAAgB,CAAGF,KAAK,CAC9B,OAAOC,KAAK,CACd,CAAC,CAUD,IAAME,WAAW,CAAG,SAAdA,WAAWA,CAAAC,KAAA,CAQgB,CAP/B,IAAAC,MAAM,CAAAD,KAAA,CAANC,MAAM,CAAAC,UAAA,CAAAF,KAAA,CACNG,IAAI,CAAJA,IAAI,CAAAD,UAAA,GAAG,KAAA,CAAA,CAAA,QAAQ,CAAAA,UAAA,CAAAE,UAAA,CAAAJ,KAAA,CACfK,IAAI,CAAJA,IAAI,CAAAD,UAAA,GAAA,KAAA,CAAA,CAAG,MAAM,CAAAA,UAAA,CAAAE,YAAA,CAAAN,KAAA,CACbO,MAAM,CAANA,MAAM,CAAAD,YAAA,UAAG,SAAS,CAAAA,YAAA,CAClBR,gBAAgB,CAA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,CAAG,SAAU,CACxDgG,iBAAiB,CAAC,OAAO,CACzBL,QAAQ,CAAC,UAAU,CACnBM,KAAK,CAAC,MAAM,CACZC,GAAG,CAAC,KAAK,CACV,CACF,CACM,CAAA,CAAC,EACH,CAAC,CAEd,CAAC,CAEK,IAAAV,MAAM,CAAGW,wBAAwB,CAACrD,OAAO,CAAE,CAC/CsD,WAAW,CAAE,QAAQ,CACrBC,WAAW,CAAE,QACf,CAAC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BottomSheet.native.js","sources":["../../../../../src/components/BottomSheet/BottomSheet.native.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable @typescript-eslint/prefer-nullish-coalescing */\n/* eslint-disable @typescript-eslint/no-empty-function */\nimport GorhomBottomSheet, {\n BottomSheetFooter as GorhomBottomSheetFooter,\n} from '@gorhom/bottom-sheet';\nimport React from 'react';\nimport { Portal } from '@gorhom/portal';\nimport styled from 'styled-components/native';\nimport { Dimensions, AccessibilityInfo, findNodeHandle, View, Keyboard } from 'react-native';\nimport { BottomSheetHeader } from './BottomSheetHeader';\nimport { BottomSheetGrabHandle } from './BottomSheetGrabHandle';\nimport { BottomSheetBody } from './BottomSheetBody';\nimport { BottomSheetFooter } from './BottomSheetFooter';\nimport type { BottomSheetProps } from './types';\nimport { ComponentIds } from './componentIds';\nimport type { BottomSheetContextProps } from './BottomSheetContext';\nimport { BottomSheetContext, useBottomSheetAndDropdownGlue } from './BottomSheetContext';\nimport { BottomSheetBackdrop } from './BottomSheetBackdrop';\nimport { useBottomSheetStack } from './BottomSheetStack';\nimport { DropdownContext, useDropdown } from '~components/Dropdown/useDropdown';\nimport BaseBox from '~components/Box/BaseBox';\nimport { useId } from '~utils/useId';\nimport { useIsomorphicLayoutEffect } from '~utils/useIsomorphicLayoutEffect';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { makeSpace } from '~utils/makeSpace';\nimport { getComponentId } from '~utils/isValidAllowedChildren';\nimport { componentZIndices } from '~utils/componentZIndices';\n\nconst BottomSheetSurface = styled(BaseBox)(({ theme }) => {\n return {\n // TODO: we do not have 16px radius token\n borderTopLeftRadius: makeSpace(theme.spacing[5]),\n borderTopRightRadius: makeSpace(theme.spacing[5]),\n backgroundColor: theme.colors.popup.background.subtle,\n justifyContent: 'center',\n alignItems: 'center',\n position: 'relative',\n };\n});\n\nconst focusOnElement = (element: React.Component<any, any>): void => {\n const reactTag = findNodeHandle(element);\n if (reactTag) {\n AccessibilityInfo.setAccessibilityFocus(reactTag);\n }\n};\n\nconst _BottomSheet = ({\n children,\n snapPoints = [0.35, 0.5, 0.85],\n isOpen,\n onDismiss,\n initialFocusRef,\n zIndex = componentZIndices.bottomSheet,\n}: BottomSheetProps): React.ReactElement => {\n const bottomSheetAndDropdownGlue = useBottomSheetAndDropdownGlue();\n const defaultInitialFocusRef = React.useRef<any>(null);\n const sheetRef = React.useRef<GorhomBottomSheet>(null);\n const [header, setHeader] = React.useState<React.ReactNode>();\n const [footer, setFooter] = React.useState<React.ReactNode>();\n const [body, setBody] = React.useState<React.ReactNode>();\n const _isOpen = isOpen ?? bottomSheetAndDropdownGlue?.isOpen;\n const [headerHeight, setHeaderHeight] = React.useState(0);\n const [footerHeight, setFooterHeight] = React.useState(0);\n const [contentHeight, setContentHeight] = React.useState(0);\n const [hasBodyPadding, setHasBodyPadding] = React.useState(true);\n const [isHeaderEmpty, setIsHeaderEmpty] = React.useState(false);\n const initialSnapPoint = React.useRef<number>(0);\n const totalHeight = React.useMemo(() => {\n return headerHeight + footerHeight + contentHeight;\n }, [contentHeight, footerHeight, headerHeight]);\n\n const id = useId();\n const {\n addBottomSheetToStack,\n removeBottomSheetFromStack,\n getCurrentStackIndexById,\n getTopOfTheStack,\n } = useBottomSheetStack();\n const currentStackIndex = getCurrentStackIndexById(id);\n const bottomSheetZIndex = zIndex - currentStackIndex;\n\n // if bottomSheet height is >35% & <50% then set initial snapPoint to 35%\n useIsomorphicLayoutEffect(() => {\n if (bottomSheetAndDropdownGlue?.hasAutoCompleteInBottomSheetHeader) {\n // In AutoComplete, we want to open BottomSheet with max height so we set this to last index\n initialSnapPoint.current = 2;\n } else {\n const height = Dimensions.get('window').height;\n const middleSnapPoint = snapPoints[1] * height;\n if (totalHeight > middleSnapPoint) {\n initialSnapPoint.current = 1;\n }\n }\n }, [snapPoints, totalHeight]);\n\n const _snapPoints = React.useMemo(() => snapPoints.map((point) => `${point * 100}%`), [\n snapPoints,\n ]);\n\n const close = React.useCallback(() => {\n onDismiss?.();\n bottomSheetAndDropdownGlue?.onBottomSheetDismiss();\n }, [bottomSheetAndDropdownGlue, onDismiss]);\n\n const handleOnOpen = React.useCallback(() => {\n sheetRef.current?.snapToIndex(initialSnapPoint.current);\n }, []);\n\n const handleOnClose = React.useCallback(() => {\n sheetRef.current?.close();\n // We need this because if inside the BottomSheet there is a input which is focused\n // and user dragged down to close the sheet, even after closing the sheet the input will remain focused\n Keyboard.dismiss();\n }, [sheetRef]);\n\n // sync controlled state to our actions\n React.useEffect(() => {\n if (_isOpen) {\n handleOnOpen();\n if (!initialFocusRef) {\n // focus on close button\n focusOnElement(defaultInitialFocusRef.current);\n } else {\n // focus on the initialRef\n focusOnElement(initialFocusRef.current);\n }\n } else {\n handleOnClose();\n }\n }, [_isOpen, handleOnClose, handleOnOpen, initialFocusRef]);\n\n // let the Dropdown component know that it's rendering a bottomsheet\n React.useEffect(() => {\n if (!bottomSheetAndDropdownGlue) return;\n bottomSheetAndDropdownGlue.setDropdownHasBottomSheet(true);\n }, [bottomSheetAndDropdownGlue]);\n\n React.useLayoutEffect(() => {\n React.Children.forEach(children, (child) => {\n if (getComponentId(child) === ComponentIds.BottomSheetHeader) {\n setHeader(child);\n }\n if (getComponentId(child) === ComponentIds.BottomSheetFooter) {\n setFooter(child);\n }\n if (getComponentId(child) === ComponentIds.BottomSheetBody) {\n setBody(child);\n }\n });\n }, [children]);\n\n const renderFooter = React.useCallback(\n (props): React.ReactElement => {\n return (\n <GorhomBottomSheetFooter {...props}>\n <View\n onLayout={(event) => {\n // save footer height so that later we can offset the marginBottom from body content\n // otherwise few elements gets hidden under the footer\n setFooterHeight(event.nativeEvent.layout.height);\n }}\n >\n {footer}\n </View>\n </GorhomBottomSheetFooter>\n );\n },\n [footer],\n );\n\n const renderBackdrop = React.useCallback(\n (props): React.ReactElement => {\n return <BottomSheetBackdrop {...props} zIndex={bottomSheetZIndex} />;\n },\n [bottomSheetZIndex],\n );\n\n const renderHandle = React.useCallback((): React.ReactElement => {\n return (\n <BaseBox\n position={isHeaderEmpty ? 'absolute' : 'relative'}\n top=\"spacing.0\"\n left=\"spacing.0\"\n right=\"spacing.0\"\n onLayout={({ nativeEvent }) => {\n setHeaderHeight(nativeEvent.layout.height);\n }}\n >\n <BaseBox zIndex={bottomSheetZIndex}>\n <BottomSheetGrabHandle />\n </BaseBox>\n {header}\n </BaseBox>\n );\n }, [isHeaderEmpty, bottomSheetZIndex, header]);\n\n const isHeaderFloating = !hasBodyPadding && isHeaderEmpty;\n const contextValue = React.useMemo<BottomSheetContextProps>(\n () => ({\n isInBottomSheet: true,\n isOpen: Boolean(_isOpen),\n close: handleOnClose,\n positionY: 0,\n headerHeight,\n contentHeight,\n footerHeight,\n setContentHeight,\n setFooterHeight,\n setHeaderHeight,\n scrollRef: () => {},\n bind: {} as never,\n defaultInitialFocusRef,\n isHeaderFloating,\n setHasBodyPadding,\n setIsHeaderEmpty,\n }),\n [_isOpen, contentHeight, footerHeight, handleOnClose, headerHeight, isHeaderFloating],\n );\n\n // Hack: We need to <Portal> the GorhomBottomSheet to the root of the react-native app\n // But the portalled component will no longer be able to access the parent contexts (Dropdown Context)\n // To workaround this, I'm portalling both the DropdownContext & BotomSheetContext along with the component\n const dropdownProps = useDropdown();\n\n // register and deregister in the stack\n React.useEffect(() => {\n if (_isOpen) {\n addBottomSheetToStack(id);\n } else {\n removeBottomSheetFromStack(id);\n }\n }, [addBottomSheetToStack, _isOpen, id, removeBottomSheetFromStack]);\n\n // Handle TextInput inside BottomSheet\n // We expand the BottomSheet to the max snapPoint so that when the keyboard opens\n // the body content will be visible\n // There is a standard way to do this:\n // https://gorhom.github.io/react-native-bottom-sheet/keyboard-handling\n // But this didn't worked because:\n // https://github.com/gorhom/react-native-bottom-sheet/issues/618\n React.useEffect(() => {\n const showSubscription = Keyboard.addListener('keyboardDidShow', () => {\n if (id && id === getTopOfTheStack()) {\n sheetRef.current?.expand();\n }\n });\n return () => {\n showSubscription.remove();\n };\n }, [getTopOfTheStack, id]);\n\n return (\n <Portal hostName=\"BladeBottomSheetPortal\">\n {/* Portalling both the context */}\n <DropdownContext.Provider value={dropdownProps}>\n <BottomSheetContext.Provider value={contextValue}>\n <GorhomBottomSheet\n style={\n // only render shadow when the sheet is open,\n // otherwise there is visible shadow leak from the bottom edge of the screen\n isOpen\n ? {\n // this is reverse top elevation of highRaised elevation token\n shadowColor: 'hsla(217,56%,17%,0.64)',\n shadowOffset: {\n width: 0,\n height: -18,\n },\n shadowOpacity: 0.2,\n shadowRadius: 12,\n // this fails on andorid because its not handled on GorhomBottomSheet internally, hence tradeoff but its fine because visually this barely makes any difference its that nice design detail\n // elevation: 40,\n }\n : {}\n }\n enablePanDownToClose\n enableOverDrag\n enableContentPanningGesture\n ref={sheetRef}\n // on initial render if _isOpen is true we want to render the sheet at initialSnapPoint\n // otherwise we want to render it at -1 so that it is not visible\n index={_isOpen ? initialSnapPoint.current : -1}\n containerStyle={{ zIndex: bottomSheetZIndex }}\n animateOnMount={true}\n handleComponent={renderHandle}\n backgroundComponent={BottomSheetSurface}\n footerComponent={renderFooter}\n backdropComponent={renderBackdrop}\n onClose={close}\n snapPoints={_snapPoints}\n >\n {body}\n </GorhomBottomSheet>\n </BottomSheetContext.Provider>\n </DropdownContext.Provider>\n </Portal>\n );\n};\n\nconst BottomSheet = assignWithoutSideEffects(_BottomSheet, {\n componentId: ComponentIds.BottomSheet,\n});\n\nexport { BottomSheet, BottomSheetBody, BottomSheetFooter, BottomSheetHeader };\n"],"names":["BottomSheetSurface","styled","BaseBox","_ref","theme","borderTopLeftRadius","makeSpace","spacing","borderTopRightRadius","backgroundColor","colors","popup","background","subtle","justifyContent","alignItems","position","focusOnElement","element","reactTag","findNodeHandle","AccessibilityInfo","setAccessibilityFocus","_BottomSheet","_ref2","children","_ref2$snapPoints","snapPoints","isOpen","onDismiss","initialFocusRef","_ref2$zIndex","zIndex","componentZIndices","bottomSheet","bottomSheetAndDropdownGlue","useBottomSheetAndDropdownGlue","defaultInitialFocusRef","React","useRef","sheetRef","_React$useState","useState","_React$useState2","_slicedToArray","header","setHeader","_React$useState3","_React$useState4","footer","setFooter","_React$useState5","_React$useState6","body","setBody","_isOpen","_React$useState7","_React$useState8","headerHeight","setHeaderHeight","_React$useState9","_React$useState10","footerHeight","setFooterHeight","_React$useState11","_React$useState12","contentHeight","setContentHeight","_React$useState13","_React$useState14","hasBodyPadding","setHasBodyPadding","_React$useState15","_React$useState16","isHeaderEmpty","setIsHeaderEmpty","initialSnapPoint","totalHeight","useMemo","id","useId","_useBottomSheetStack","useBottomSheetStack","addBottomSheetToStack","removeBottomSheetFromStack","getCurrentStackIndexById","getTopOfTheStack","currentStackIndex","bottomSheetZIndex","useIsomorphicLayoutEffect","hasAutoCompleteInBottomSheetHeader","current","height","Dimensions","get","middleSnapPoint","_snapPoints","map","point","close","useCallback","onBottomSheetDismiss","handleOnOpen","_sheetRef$current","snapToIndex","handleOnClose","_sheetRef$current2","Keyboard","dismiss","useEffect","setDropdownHasBottomSheet","useLayoutEffect","Children","forEach","child","getComponentId","ComponentIds","BottomSheetHeader","BottomSheetFooter","BottomSheetBody","renderFooter","props","_jsx","GorhomBottomSheetFooter","Object","assign","View","onLayout","event","nativeEvent","layout","renderBackdrop","BottomSheetBackdrop","renderHandle","_jsxs","top","left","right","_ref3","BottomSheetGrabHandle","isHeaderFloating","contextValue","isInBottomSheet","Boolean","positionY","scrollRef","bind","dropdownProps","useDropdown","showSubscription","addListener","_sheetRef$current3","expand","remove","Portal","hostName","DropdownContext","Provider","value","BottomSheetContext","GorhomBottomSheet","style","shadowColor","shadowOffset","width","shadowOpacity","shadowRadius","enablePanDownToClose","enableOverDrag","enableContentPanningGesture","ref","index","containerStyle","animateOnMount","handleComponent","backgroundComponent","footerComponent","backdropComponent","onClose","BottomSheet","assignWithoutSideEffects","componentId"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AA6BA,IAAMA,kBAAkB,CAAGC,MAAM,CAACC,OAAO,CAAC,CAAC,SAAAC,IAAA,CAAe,CAAZ,IAAAC,KAAK,CAAAD,IAAA,CAALC,KAAK,CACjD,OAAO,CAELC,mBAAmB,CAAEC,SAAS,CAACF,KAAK,CAACG,OAAO,CAAC,CAAC,CAAC,CAAC,CAChDC,oBAAoB,CAAEF,SAAS,CAACF,KAAK,CAACG,OAAO,CAAC,CAAC,CAAC,CAAC,CACjDE,eAAe,CAAEL,KAAK,CAACM,MAAM,CAACC,KAAK,CAACC,UAAU,CAACC,MAAM,CACrDC,cAAc,CAAE,QAAQ,CACxBC,UAAU,CAAE,QAAQ,CACpBC,QAAQ,CAAE,UACZ,CAAC,CACH,CAAC,CAAC,CAEF,IAAMC,cAAc,CAAG,SAAjBA,cAAcA,CAAIC,OAAkC,CAAW,CACnE,IAAMC,QAAQ,CAAGC,cAAc,CAACF,OAAO,CAAC,CACxC,GAAIC,QAAQ,CAAE,CACZE,iBAAiB,CAACC,qBAAqB,CAACH,QAAQ,CAAC,CACnD,CACF,CAAC,CAED,IAAMI,YAAY,CAAG,SAAfA,YAAYA,CAAAC,KAAA,CAO0B,KAN1CC,QAAQ,CAAAD,KAAA,CAARC,QAAQ,CAAAC,gBAAA,CAAAF,KAAA,CACRG,UAAU,CAAVA,UAAU,CAAAD,gBAAA,GAAA,KAAA,CAAA,CAAG,CAAC,IAAI,CAAE,GAAG,CAAE,IAAI,CAAC,CAAAA,gBAAA,CAC9BE,MAAM,CAAAJ,KAAA,CAANI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2BAA2B,MAC3BC,GAAG,CAAElI,QAAS,CAGdmI,KAAK,CAAEpH,OAAO,CAAGqB,gBAAgB,CAACe,OAAO,CAAG,CAAC,CAAE,CAC/CiF,cAAc,CAAE,CAAE5I,MAAM,CAAEwD,iBAAkB,CAAE,CAC9CqF,cAAc,CAAE,IAAK,CACrBC,eAAe,CAAEzC,YAAa,CAC9B0C,mBAAmB,CAAE/K,kBAAmB,CACxCgL,eAAe,CAAExD,YAAa,CAC9ByD,iBAAiB,CAAE9C,cAAe,CAClC+C,OAAO,CAAE/E,KAAM,CACfxE,UAAU,CAAEqE,WAAY,CAAAvE,QAAA,CAEvB4B,IAAI,CACY,CAAC,CACO,CAAC,CACN,CAAC,CACrB,CAAC,CAEb,CAAC,CAEK,IAAA8H,WAAW,CAAGC,wBAAwB,CAAC7J,YAAY,CAAE,CACzD8J,WAAW,CAAEjE,YAAY,CAAC+D,WAC5B,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"BottomSheet.native.js","sources":["../../../../../src/components/BottomSheet/BottomSheet.native.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable @typescript-eslint/prefer-nullish-coalescing */\n/* eslint-disable @typescript-eslint/no-empty-function */\nimport GorhomBottomSheet, {\n BottomSheetFooter as GorhomBottomSheetFooter,\n} from '@gorhom/bottom-sheet';\nimport React from 'react';\nimport { Portal } from '@gorhom/portal';\nimport styled from 'styled-components/native';\nimport { Dimensions, AccessibilityInfo, findNodeHandle, View, Keyboard } from 'react-native';\nimport { BottomSheetHeader } from './BottomSheetHeader';\nimport { BottomSheetGrabHandle } from './BottomSheetGrabHandle';\nimport { BottomSheetBody } from './BottomSheetBody';\nimport { BottomSheetFooter } from './BottomSheetFooter';\nimport type { BottomSheetProps } from './types';\nimport { ComponentIds } from './componentIds';\nimport type { BottomSheetContextProps } from './BottomSheetContext';\nimport { BottomSheetContext, useBottomSheetAndDropdownGlue } from './BottomSheetContext';\nimport { BottomSheetBackdrop } from './BottomSheetBackdrop';\nimport { useBottomSheetStack } from './BottomSheetStack';\nimport { DropdownContext, useDropdown } from '~components/Dropdown/useDropdown';\nimport BaseBox from '~components/Box/BaseBox';\nimport { useId } from '~utils/useId';\nimport { useIsomorphicLayoutEffect } from '~utils/useIsomorphicLayoutEffect';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { makeSpace } from '~utils/makeSpace';\nimport { getComponentId } from '~utils/isValidAllowedChildren';\nimport { componentZIndices } from '~utils/componentZIndices';\n\nconst BottomSheetSurface = styled(BaseBox)(({ theme }) => {\n return {\n // TODO: we do not have 16px radius token\n borderTopLeftRadius: makeSpace(theme.spacing[5]),\n borderTopRightRadius: makeSpace(theme.spacing[5]),\n backgroundColor: theme.colors.popup.background.subtle,\n justifyContent: 'center',\n alignItems: 'center',\n position: 'relative',\n };\n});\n\nconst focusOnElement = (element: React.Component<any, any>): void => {\n const reactTag = findNodeHandle(element);\n if (reactTag) {\n AccessibilityInfo.setAccessibilityFocus(reactTag);\n }\n};\n\nconst _BottomSheet = ({\n children,\n snapPoints = [0.35, 0.5, 0.85],\n isOpen,\n onDismiss,\n initialFocusRef,\n zIndex = componentZIndices.bottomSheet,\n}: BottomSheetProps): React.ReactElement => {\n const bottomSheetAndDropdownGlue = useBottomSheetAndDropdownGlue();\n const defaultInitialFocusRef = React.useRef<any>(null);\n const sheetRef = React.useRef<GorhomBottomSheet>(null);\n const [header, setHeader] = React.useState<React.ReactNode>();\n const [footer, setFooter] = React.useState<React.ReactNode>();\n const [body, setBody] = React.useState<React.ReactNode>();\n const _isOpen = isOpen ?? bottomSheetAndDropdownGlue?.isOpen;\n const [headerHeight, setHeaderHeight] = React.useState(0);\n const [footerHeight, setFooterHeight] = React.useState(0);\n const [contentHeight, setContentHeight] = React.useState(0);\n const [hasBodyPadding, setHasBodyPadding] = React.useState(true);\n const [isHeaderEmpty, setIsHeaderEmpty] = React.useState(false);\n const initialSnapPoint = React.useRef<number>(0);\n const totalHeight = React.useMemo(() => {\n return headerHeight + footerHeight + contentHeight;\n }, [contentHeight, footerHeight, headerHeight]);\n\n const id = useId();\n const {\n addBottomSheetToStack,\n removeBottomSheetFromStack,\n getCurrentStackIndexById,\n getTopOfTheStack,\n } = useBottomSheetStack();\n const currentStackIndex = getCurrentStackIndexById(id);\n const bottomSheetZIndex = zIndex - currentStackIndex;\n\n // if bottomSheet height is >35% & <50% then set initial snapPoint to 35%\n useIsomorphicLayoutEffect(() => {\n if (bottomSheetAndDropdownGlue?.hasAutoCompleteInBottomSheetHeader) {\n // In AutoComplete, we want to open BottomSheet with max height so we set this to last index\n initialSnapPoint.current = 2;\n } else {\n const height = Dimensions.get('window').height;\n const middleSnapPoint = snapPoints[1] * height;\n if (totalHeight > middleSnapPoint) {\n initialSnapPoint.current = 1;\n }\n }\n }, [snapPoints, totalHeight]);\n\n const _snapPoints = React.useMemo(() => snapPoints.map((point) => `${point * 100}%`), [\n snapPoints,\n ]);\n\n const close = React.useCallback(() => {\n onDismiss?.();\n bottomSheetAndDropdownGlue?.onBottomSheetDismiss();\n }, [bottomSheetAndDropdownGlue, onDismiss]);\n\n const handleOnOpen = React.useCallback(() => {\n sheetRef.current?.snapToIndex(initialSnapPoint.current);\n }, []);\n\n const handleOnClose = React.useCallback(() => {\n sheetRef.current?.close();\n // We need this because if inside the BottomSheet there is a input which is focused\n // and user dragged down to close the sheet, even after closing the sheet the input will remain focused\n Keyboard.dismiss();\n }, [sheetRef]);\n\n // sync controlled state to our actions\n React.useEffect(() => {\n if (_isOpen) {\n handleOnOpen();\n if (!initialFocusRef) {\n // focus on close button\n focusOnElement(defaultInitialFocusRef.current);\n } else {\n // focus on the initialRef\n focusOnElement(initialFocusRef.current);\n }\n } else {\n handleOnClose();\n }\n }, [_isOpen, handleOnClose, handleOnOpen, initialFocusRef]);\n\n // let the Dropdown component know that it's rendering a bottomsheet\n React.useEffect(() => {\n if (!bottomSheetAndDropdownGlue) return;\n bottomSheetAndDropdownGlue.setDropdownHasBottomSheet(true);\n }, [bottomSheetAndDropdownGlue]);\n\n React.useLayoutEffect(() => {\n React.Children.forEach(children, (child) => {\n if (getComponentId(child) === ComponentIds.BottomSheetHeader) {\n setHeader(child);\n }\n if (getComponentId(child) === ComponentIds.BottomSheetFooter) {\n setFooter(child);\n }\n if (getComponentId(child) === ComponentIds.BottomSheetBody) {\n setBody(child);\n }\n });\n }, [children]);\n\n const renderFooter = React.useCallback(\n (props: any): React.ReactElement => {\n return (\n <GorhomBottomSheetFooter {...props}>\n <View\n onLayout={(event) => {\n // save footer height so that later we can offset the marginBottom from body content\n // otherwise few elements gets hidden under the footer\n setFooterHeight(event.nativeEvent.layout.height);\n }}\n >\n {footer}\n </View>\n </GorhomBottomSheetFooter>\n );\n },\n [footer],\n );\n\n const renderBackdrop = React.useCallback(\n (props: any): React.ReactElement => {\n return <BottomSheetBackdrop {...props} zIndex={bottomSheetZIndex} />;\n },\n [bottomSheetZIndex],\n );\n\n const renderHandle = React.useCallback((): React.ReactElement => {\n return (\n <BaseBox\n position={isHeaderEmpty ? 'absolute' : 'relative'}\n top=\"spacing.0\"\n left=\"spacing.0\"\n right=\"spacing.0\"\n onLayout={({ nativeEvent }) => {\n setHeaderHeight(nativeEvent.layout.height);\n }}\n >\n <BaseBox zIndex={bottomSheetZIndex}>\n <BottomSheetGrabHandle />\n </BaseBox>\n {header}\n </BaseBox>\n );\n }, [isHeaderEmpty, bottomSheetZIndex, header]);\n\n const isHeaderFloating = !hasBodyPadding && isHeaderEmpty;\n const contextValue = React.useMemo<BottomSheetContextProps>(\n () => ({\n isInBottomSheet: true,\n isOpen: Boolean(_isOpen),\n close: handleOnClose,\n positionY: 0,\n headerHeight,\n contentHeight,\n footerHeight,\n setContentHeight,\n setFooterHeight,\n setHeaderHeight,\n scrollRef: () => {},\n bind: {} as never,\n defaultInitialFocusRef,\n isHeaderFloating,\n setHasBodyPadding,\n setIsHeaderEmpty,\n }),\n [_isOpen, contentHeight, footerHeight, handleOnClose, headerHeight, isHeaderFloating],\n );\n\n // Hack: We need to <Portal> the GorhomBottomSheet to the root of the react-native app\n // But the portalled component will no longer be able to access the parent contexts (Dropdown Context)\n // To workaround this, I'm portalling both the DropdownContext & BotomSheetContext along with the component\n const dropdownProps = useDropdown();\n\n // register and deregister in the stack\n React.useEffect(() => {\n if (_isOpen) {\n addBottomSheetToStack(id);\n } else {\n removeBottomSheetFromStack(id);\n }\n }, [addBottomSheetToStack, _isOpen, id, removeBottomSheetFromStack]);\n\n // Handle TextInput inside BottomSheet\n // We expand the BottomSheet to the max snapPoint so that when the keyboard opens\n // the body content will be visible\n // There is a standard way to do this:\n // https://gorhom.github.io/react-native-bottom-sheet/keyboard-handling\n // But this didn't worked because:\n // https://github.com/gorhom/react-native-bottom-sheet/issues/618\n React.useEffect(() => {\n const showSubscription = Keyboard.addListener('keyboardDidShow', () => {\n if (id && id === getTopOfTheStack()) {\n sheetRef.current?.expand();\n }\n });\n return () => {\n showSubscription.remove();\n };\n }, [getTopOfTheStack, id]);\n\n return (\n <Portal hostName=\"BladeBottomSheetPortal\">\n {/* Portalling both the context */}\n <DropdownContext.Provider value={dropdownProps}>\n <BottomSheetContext.Provider value={contextValue}>\n <GorhomBottomSheet\n style={\n // only render shadow when the sheet is open,\n // otherwise there is visible shadow leak from the bottom edge of the screen\n isOpen\n ? {\n // this is reverse top elevation of highRaised elevation token\n shadowColor: 'hsla(217,56%,17%,0.64)',\n shadowOffset: {\n width: 0,\n height: -18,\n },\n shadowOpacity: 0.2,\n shadowRadius: 12,\n // this fails on andorid because its not handled on GorhomBottomSheet internally, hence tradeoff but its fine because visually this barely makes any difference its that nice design detail\n // elevation: 40,\n }\n : {}\n }\n enablePanDownToClose\n enableOverDrag\n enableContentPanningGesture\n ref={sheetRef}\n // on initial render if _isOpen is true we want to render the sheet at initialSnapPoint\n // otherwise we want to render it at -1 so that it is not visible\n index={_isOpen ? initialSnapPoint.current : -1}\n containerStyle={{ zIndex: bottomSheetZIndex }}\n animateOnMount={true}\n handleComponent={renderHandle}\n backgroundComponent={BottomSheetSurface}\n footerComponent={renderFooter}\n backdropComponent={renderBackdrop}\n onClose={close}\n snapPoints={_snapPoints}\n >\n {body}\n </GorhomBottomSheet>\n </BottomSheetContext.Provider>\n </DropdownContext.Provider>\n </Portal>\n );\n};\n\nconst BottomSheet = assignWithoutSideEffects(_BottomSheet, {\n componentId: ComponentIds.BottomSheet,\n});\n\nexport { BottomSheet, BottomSheetBody, BottomSheetFooter, BottomSheetHeader };\n"],"names":["BottomSheetSurface","styled","BaseBox","_ref","theme","borderTopLeftRadius","makeSpace","spacing","borderTopRightRadius","backgroundColor","colors","popup","background","subtle","justifyContent","alignItems","position","focusOnElement","element","reactTag","findNodeHandle","AccessibilityInfo","setAccessibilityFocus","_BottomSheet","_ref2","children","_ref2$snapPoints","snapPoints","isOpen","onDismiss","initialFocusRef","_ref2$zIndex","zIndex","componentZIndices","bottomSheet","bottomSheetAndDropdownGlue","useBottomSheetAndDropdownGlue","defaultInitialFocusRef","React","useRef","sheetRef","_React$useState","useState","_React$useState2","_slicedToArray","header","setHeader","_React$useState3","_React$useState4","footer","setFooter","_React$useState5","_React$useState6","body","setBody","_isOpen","_React$useState7","_React$useState8","headerHeight","setHeaderHeight","_React$useState9","_React$useState10","footerHeight","setFooterHeight","_React$useState11","_React$useState12","contentHeight","setContentHeight","_React$useState13","_React$useState14","hasBodyPadding","setHasBodyPadding","_React$useState15","_React$useState16","isHeaderEmpty","setIsHeaderEmpty","initialSnapPoint","totalHeight","useMemo","id","useId","_useBottomSheetStack","useBottomSheetStack","addBottomSheetToStack","removeBottomSheetFromStack","getCurrentStackIndexById","getTopOfTheStack","currentStackIndex","bottomSheetZIndex","useIsomorphicLayoutEffect","hasAutoCompleteInBottomSheetHeader","current","height","Dimensions","get","middleSnapPoint","_snapPoints","map","point","close","useCallback","onBottomSheetDismiss","handleOnOpen","_sheetRef$current","snapToIndex","handleOnClose","_sheetRef$current2","Keyboard","dismiss","useEffect","setDropdownHasBottomSheet","useLayoutEffect","Children","forEach","child","getComponentId","ComponentIds","BottomSheetHeader","BottomSheetFooter","BottomSheetBody","renderFooter","props","_jsx","GorhomBottomSheetFooter","Object","assign","View","onLayout","event","nativeEvent","layout","renderBackdrop","BottomSheetBackdrop","renderHandle","_jsxs","top","left","right","_ref3","BottomSheetGrabHandle","isHeaderFloating","contextValue","isInBottomSheet","Boolean","positionY","scrollRef","bind","dropdownProps","useDropdown","showSubscription","addListener","_sheetRef$current3","expand","remove","Portal","hostName","DropdownContext","Provider","value","BottomSheetContext","GorhomBottomSheet","style","shadowColor","shadowOffset","width","shadowOpacity","shadowRadius","enablePanDownToClose","enableOverDrag","enableContentPanningGesture","ref","index","containerStyle","animateOnMount","handleComponent","backgroundComponent","footerComponent","backdropComponent","onClose","BottomSheet","assignWithoutSideEffects","componentId"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AA6BA,IAAMA,kBAAkB,CAAGC,MAAM,CAACC,OAAO,CAAC,CAAC,SAAAC,IAAA,CAAe,CAAZ,IAAAC,KAAK,CAAAD,IAAA,CAALC,KAAK,CACjD,OAAO,CAELC,mBAAmB,CAAEC,SAAS,CAACF,KAAK,CAACG,OAAO,CAAC,CAAC,CAAC,CAAC,CAChDC,oBAAoB,CAAEF,SAAS,CAACF,KAAK,CAACG,OAAO,CAAC,CAAC,CAAC,CAAC,CACjDE,eAAe,CAAEL,KAAK,CAACM,MAAM,CAACC,KAAK,CAACC,UAAU,CAACC,MAAM,CACrDC,cAAc,CAAE,QAAQ,CACxBC,UAAU,CAAE,QAAQ,CACpBC,QAAQ,CAAE,UACZ,CAAC,CACH,CAAC,CAAC,CAEF,IAAMC,cAAc,CAAG,SAAjBA,cAAcA,CAAIC,OAAkC,CAAW,CACnE,IAAMC,QAAQ,CAAGC,cAAc,CAACF,OAAO,CAAC,CACxC,GAAIC,QAAQ,CAAE,CACZE,iBAAiB,CAACC,qBAAqB,CAACH,QAAQ,CAAC,CACnD,CACF,CAAC,CAED,IAA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iB,EAChBC,KAAK,CAGHrI,MAAM,CACF,CAEEsI,WAAW,CAAE,wBAAwB,CACrCC,YAAY,CAAE,CACZC,KAAK,CAAE,CAAC,CACRxE,MAAM,CAAE,CAAC,EACX,CAAC,CACDyE,aAAa,CAAE,GAAG,CAClBC,YAAY,CAAE,EAGhB,CAAC,CACD,EACL,CACDC,oBAAoB,CAAA,IAAA,CACpBC,cAAc,CACdC,IAAAA,CAAAA,2BAA2B,MAC3BC,GAAG,CAAElI,QAAS,CAGdmI,KAAK,CAAEpH,OAAO,CAAGqB,gBAAgB,CAACe,OAAO,CAAG,CAAC,CAAE,CAC/CiF,cAAc,CAAE,CAAE5I,MAAM,CAAEwD,iBAAkB,CAAE,CAC9CqF,cAAc,CAAE,IAAK,CACrBC,eAAe,CAAEzC,YAAa,CAC9B0C,mBAAmB,CAAE/K,kBAAmB,CACxCgL,eAAe,CAAExD,YAAa,CAC9ByD,iBAAiB,CAAE9C,cAAe,CAClC+C,OAAO,CAAE/E,KAAM,CACfxE,UAAU,CAAEqE,WAAY,CAAAvE,QAAA,CAEvB4B,IAAI,CACY,CAAC,CACO,CAAC,CACN,CAAC,CACrB,CAAC,CAEb,CAAC,CAEK,IAAA8H,WAAW,CAAGC,wBAAwB,CAAC7J,YAAY,CAAE,CACzD8J,WAAW,CAAEjE,YAAY,CAAC+D,WAC5B,CAAC;;;;"}
|
|
@@ -14,7 +14,7 @@ import { makeBorderSize } from '../../../utils/makeBorderSize/makeBorderSize.js'
|
|
|
14
14
|
import { makeSpace } from '../../../utils/makeSpace/makeSpace.js';
|
|
15
15
|
import '../../BladeProvider/useTheme.js';
|
|
16
16
|
|
|
17
|
-
var _excluded=["base"];var isSpacingToken=function isSpacingToken(value){return typeof value==='string'&&value.startsWith('spacing.');};var getSpacingValue=function getSpacingValue(spacingValue,theme,breakpoint){if(isEmpty(spacingValue)){return undefined;}var responsiveSpacingValue=getResponsiveValue(spacingValue,breakpoint);if(isEmpty(responsiveSpacingValue)){return undefined;}if(responsiveSpacingValue==='auto'){return responsiveSpacingValue;}if(Array.isArray(responsiveSpacingValue)){return responsiveSpacingValue.map(function(value){return getSpacingValue(value,theme);}).join(' ');}if(isSpacingToken(responsiveSpacingValue)){var spacingReturnValue=getIn(theme,responsiveSpacingValue);return isEmpty(spacingReturnValue)?makeSpace(spacingReturnValue):undefined;}return responsiveSpacingValue;};var getColorValue=function getColorValue(color,theme,breakpoint){var responsiveBackgroundValue=getResponsiveValue(color,breakpoint);var tokenValue=getIn(theme,`colors.${responsiveBackgroundValue}`);return tokenValue!=null?tokenValue:responsiveBackgroundValue;};var getBorderRadiusValue=function getBorderRadiusValue(borderRadius,theme,breakpoint){var responsiveBorderRadiusValue=getResponsiveValue(borderRadius,breakpoint);return isEmpty(responsiveBorderRadiusValue)?undefined:makeBorderSize(getIn(theme,`border.radius.${responsiveBorderRadiusValue}`));};var getBorderWidthValue=function getBorderWidthValue(borderWidth,theme,breakpoint){var responsiveBorderWidthValue=getResponsiveValue(borderWidth,breakpoint);return isEmpty(responsiveBorderWidthValue)?undefined:makeBorderSize(getIn(theme,`border.width.${responsiveBorderWidthValue}`));};var getElevationValue=function getElevationValue(elevation,theme,breakpoint){var responsiveElevationValue=getResponsiveValue(elevation,breakpoint);return isEmpty(responsiveElevationValue)?undefined:getIn(theme,`elevation.${responsiveElevationValue}`);};var getAllProps=function getAllProps(props,breakpoint){var _props$paddingTop,_props$paddingBottom,_props$paddingRight,_props$paddingLeft,_props$marginBottom,_props$marginTop,_props$marginRight,_props$marginLeft;var hasBorder=props.borderWidth||props.borderColor;var hasBorderRight=props.borderRight||props.borderRightColor||props.borderRightWidth;var hasBorderLeft=props.borderLeft||props.borderLeftColor||props.borderLeftWidth;var hasBorderTop=props.borderTop||props.borderTopColor||props.borderTopWidth;var hasBorderBottom=props.borderBottom||props.borderBottomColor||props.borderBottomWidth;return Object.assign({display:getResponsiveValue(props.display,breakpoint),overflow:getResponsiveValue(props.overflow,breakpoint),overflowX:getResponsiveValue(props.overflowX,breakpoint),overflowY:getResponsiveValue(props.overflowY,breakpoint),textAlign:getResponsiveValue(props.textAlign,breakpoint),whiteSpace:getResponsiveValue(props.whiteSpace,breakpoint),flex:getResponsiveValue(props.flex,breakpoint),flexWrap:getResponsiveValue(props.flexWrap,breakpoint),flexDirection:getResponsiveValue(props.flexDirection,breakpoint),flexGrow:getResponsiveValue(props.flexGrow,breakpoint),flexShrink:getResponsiveValue(props.flexShrink,breakpoint),flexBasis:getResponsiveValue(props.flexBasis,breakpoint),alignItems:getResponsiveValue(props.alignItems,breakpoint),alignContent:getResponsiveValue(props.alignContent,breakpoint),alignSelf:getResponsiveValue(props.alignSelf,breakpoint),justifyItems:getResponsiveValue(props.justifyItems,breakpoint),justifyContent:getResponsiveValue(props.justifyContent,breakpoint),justifySelf:getResponsiveValue(props.justifySelf,breakpoint),placeSelf:getResponsiveValue(props.placeSelf,breakpoint),placeItems:getResponsiveValue(props.placeItems,breakpoint),order:getResponsiveValue(props.order,breakpoint),position:getResponsiveValue(props.position,breakpoint),zIndex:getResponsiveValue(props.zIndex,breakpoint),grid:getResponsiveValue(props.grid,breakpoint),gridColumn:getResponsiveValue(props.gridColumn,breakpoint),gridRow:getResponsiveValue(props.gridRow,breakpoint),gridRowStart:getResponsiveValue(props.gridRowStart,breakpoint),gridRowEnd:getResponsiveValue(props.gridRowEnd,breakpoint),gridArea:getResponsiveValue(props.gridArea,breakpoint),gridAutoFlow:getResponsiveValue(props.gridAutoFlow,breakpoint),gridAutoRows:getResponsiveValue(props.gridAutoRows,breakpoint),gridAutoColumns:getResponsiveValue(props.gridAutoColumns,breakpoint),gridTemplate:getResponsiveValue(props.gridTemplate,breakpoint),gridTemplateAreas:getResponsiveValue(props.gridTemplateAreas,breakpoint),gridTemplateColumns:getResponsiveValue(props.gridTemplateColumns,breakpoint),gridTemplateRows:getResponsiveValue(props.gridTemplateRows,breakpoint),padding:getSpacingValue(props.padding,props.theme,breakpoint),paddingTop:getSpacingValue((_props$paddingTop=props.paddingTop)!=null?_props$paddingTop:props.paddingY,props.theme,breakpoint),paddingBottom:getSpacingValue((_props$paddingBottom=props.paddingBottom)!=null?_props$paddingBottom:props.paddingY,props.theme,breakpoint),paddingRight:getSpacingValue((_props$paddingRight=props.paddingRight)!=null?_props$paddingRight:props.paddingX,props.theme,breakpoint),paddingLeft:getSpacingValue((_props$paddingLeft=props.paddingLeft)!=null?_props$paddingLeft:props.paddingX,props.theme,breakpoint),margin:getSpacingValue(props.margin,props.theme,breakpoint),marginBottom:getSpacingValue((_props$marginBottom=props.marginBottom)!=null?_props$marginBottom:props.marginY,props.theme,breakpoint),marginTop:getSpacingValue((_props$marginTop=props.marginTop)!=null?_props$marginTop:props.marginY,props.theme,breakpoint),marginRight:getSpacingValue((_props$marginRight=props.marginRight)!=null?_props$marginRight:props.marginX,props.theme,breakpoint),marginLeft:getSpacingValue((_props$marginLeft=props.marginLeft)!=null?_props$marginLeft:props.marginX,props.theme,breakpoint),height:getSpacingValue(props.height,props.theme,breakpoint),minHeight:getSpacingValue(props.minHeight,props.theme,breakpoint),maxHeight:getSpacingValue(props.maxHeight,props.theme,breakpoint),width:getSpacingValue(props.width,props.theme,breakpoint),minWidth:getSpacingValue(props.minWidth,props.theme,breakpoint),maxWidth:getSpacingValue(props.maxWidth,props.theme,breakpoint),gap:getSpacingValue(props.gap,props.theme,breakpoint),rowGap:getSpacingValue(props.rowGap,props.theme,breakpoint),columnGap:getSpacingValue(props.columnGap,props.theme,breakpoint),top:getSpacingValue(props.top,props.theme,breakpoint),right:getSpacingValue(props.right,props.theme,breakpoint),bottom:getSpacingValue(props.bottom,props.theme,breakpoint),left:getSpacingValue(props.left,props.theme,breakpoint),backgroundColor:getColorValue(props.backgroundColor,props.theme,breakpoint),backgroundImage:getResponsiveValue(props.backgroundImage,breakpoint),backgroundSize:getResponsiveValue(props.backgroundSize,breakpoint),backgroundPosition:getResponsiveValue(props.backgroundPosition,breakpoint),backgroundOrigin:getResponsiveValue(props.backgroundOrigin,breakpoint),backgroundRepeat:getResponsiveValue(props.backgroundRepeat,breakpoint),borderRadius:getBorderRadiusValue(props.borderRadius,props.theme,breakpoint),lineHeight:getSpacingValue(props.lineHeight,props.theme,breakpoint),border:getResponsiveValue(props.border,breakpoint),borderTop:getResponsiveValue(props.borderTop,breakpoint),borderRight:getResponsiveValue(props.borderRight,breakpoint),borderBottom:getResponsiveValue(props.borderBottom,breakpoint),borderLeft:getResponsiveValue(props.borderLeft,breakpoint),borderWidth:getBorderWidthValue(props.borderWidth,props.theme,breakpoint),borderColor:getColorValue(props.borderColor,props.theme,breakpoint),borderTopWidth:getBorderWidthValue(props.borderTopWidth,props.theme,breakpoint),borderTopColor:getColorValue(props.borderTopColor,props.theme,breakpoint),borderRightWidth:getBorderWidthValue(props.borderRightWidth,props.theme,breakpoint),borderRightColor:getColorValue(props.borderRightColor,props.theme,breakpoint),borderBottomWidth:getBorderWidthValue(props.borderBottomWidth,props.theme,breakpoint),borderBottomColor:getColorValue(props.borderBottomColor,props.theme,breakpoint),borderLeftWidth:getBorderWidthValue(props.borderLeftWidth,props.theme,breakpoint),borderLeftColor:getColorValue(props.borderLeftColor,props.theme,breakpoint),borderTopLeftRadius:getBorderRadiusValue(props.borderTopLeftRadius,props.theme,breakpoint),borderTopRightRadius:getBorderRadiusValue(props.borderTopRightRadius,props.theme,breakpoint),borderBottomRightRadius:getBorderRadiusValue(props.borderBottomRightRadius,props.theme,breakpoint),borderBottomLeftRadius:getBorderRadiusValue(props.borderBottomLeftRadius,props.theme,breakpoint),borderStyle:hasBorder?'solid':undefined},!hasBorder&&{borderTopStyle:hasBorderTop?'solid':undefined,borderBottomStyle:hasBorderBottom?'solid':undefined,borderLeftStyle:hasBorderLeft?'solid':undefined,borderRightStyle:hasBorderRight?'solid':undefined},{touchAction:getResponsiveValue(props.touchAction,breakpoint),userSelect:getResponsiveValue(props.userSelect,breakpoint),pointerEvents:getResponsiveValue(props.pointerEvents),opacity:getResponsiveValue(props.opacity,breakpoint),visibility:getResponsiveValue(props.visibility,breakpoint)},!isReactNative()&&{boxShadow:getElevationValue(props.elevation,props.theme,breakpoint)},{transform:getResponsiveValue(props.transform,breakpoint),transformOrigin:getResponsiveValue(props.transformOrigin,breakpoint),clipPath:getResponsiveValue(props.clipPath,breakpoint)});};var shouldAddBreakpoint=function shouldAddBreakpoint(cssProps){var firstDefinedValue=Object.values(cssProps).find(function(cssValue){return cssValue!==undefined&&cssValue!==null;});return firstDefinedValue!==undefined;};var getAllMediaQueries=function getAllMediaQueries(props){if(isReactNative()){return {};}breakpoints.base;var breakpointsWithoutBase=_objectWithoutProperties(breakpoints,_excluded);return Object.fromEntries(Object.entries(breakpointsWithoutBase).map(function(_ref){var _ref2=_slicedToArray(_ref,2),breakpointKey=_ref2[0],breakpointValue=_ref2[1];var cssPropsForCurrentBreakpoint=getAllProps(props,breakpointKey);if(!shouldAddBreakpoint(cssPropsForCurrentBreakpoint)){return [];}var mediaQuery=`@media ${getMediaQuery({min:breakpointValue})}`;return [mediaQuery,cssPropsForCurrentBreakpoint];}));};var getBaseBoxStyles=function getBaseBoxStyles(props){return Object.assign({},getAllProps(props),getAllMediaQueries(props));};
|
|
17
|
+
var _excluded=["base"];var isSpacingToken=function isSpacingToken(value){return typeof value==='string'&&value.startsWith('spacing.');};var getSpacingValue=function getSpacingValue(spacingValue,theme,breakpoint){if(isEmpty(spacingValue)){return undefined;}var responsiveSpacingValue=getResponsiveValue(spacingValue,breakpoint);if(isEmpty(responsiveSpacingValue)){return undefined;}if(responsiveSpacingValue==='auto'){return responsiveSpacingValue;}if(Array.isArray(responsiveSpacingValue)){return responsiveSpacingValue.map(function(value){return getSpacingValue(value,theme);}).join(' ');}if(isSpacingToken(responsiveSpacingValue)){var spacingReturnValue=getIn(theme,responsiveSpacingValue);return isEmpty(spacingReturnValue)?makeSpace(spacingReturnValue):undefined;}return responsiveSpacingValue;};var getColorValue=function getColorValue(color,theme,breakpoint){var responsiveBackgroundValue=getResponsiveValue(color,breakpoint);var tokenValue=getIn(theme,`colors.${responsiveBackgroundValue}`);return tokenValue!=null?tokenValue:responsiveBackgroundValue;};var getBorderRadiusValue=function getBorderRadiusValue(borderRadius,theme,breakpoint){var responsiveBorderRadiusValue=getResponsiveValue(borderRadius,breakpoint);return isEmpty(responsiveBorderRadiusValue)?undefined:makeBorderSize(getIn(theme,`border.radius.${responsiveBorderRadiusValue}`));};var getBorderWidthValue=function getBorderWidthValue(borderWidth,theme,breakpoint){var responsiveBorderWidthValue=getResponsiveValue(borderWidth,breakpoint);return isEmpty(responsiveBorderWidthValue)?undefined:makeBorderSize(getIn(theme,`border.width.${responsiveBorderWidthValue}`));};var getElevationValue=function getElevationValue(elevation,theme,breakpoint){var responsiveElevationValue=getResponsiveValue(elevation,breakpoint);return isEmpty(responsiveElevationValue)?undefined:getIn(theme,`elevation.${responsiveElevationValue}`);};var getAllProps=function getAllProps(props,breakpoint){var _props$paddingTop,_props$paddingBottom,_props$paddingRight,_props$paddingLeft,_props$marginBottom,_props$marginTop,_props$marginRight,_props$marginLeft;var hasBorder=props.borderWidth||props.borderColor;var hasBorderRight=props.borderRight||props.borderRightColor||props.borderRightWidth;var hasBorderLeft=props.borderLeft||props.borderLeftColor||props.borderLeftWidth;var hasBorderTop=props.borderTop||props.borderTopColor||props.borderTopWidth;var hasBorderBottom=props.borderBottom||props.borderBottomColor||props.borderBottomWidth;return Object.assign({display:getResponsiveValue(props.display,breakpoint),overflow:getResponsiveValue(props.overflow,breakpoint),overflowX:getResponsiveValue(props.overflowX,breakpoint),overflowY:getResponsiveValue(props.overflowY,breakpoint),textAlign:getResponsiveValue(props.textAlign,breakpoint),whiteSpace:getResponsiveValue(props.whiteSpace,breakpoint),flex:getResponsiveValue(props.flex,breakpoint),flexWrap:getResponsiveValue(props.flexWrap,breakpoint),flexDirection:getResponsiveValue(props.flexDirection,breakpoint),flexGrow:getResponsiveValue(props.flexGrow,breakpoint),flexShrink:getResponsiveValue(props.flexShrink,breakpoint),flexBasis:getResponsiveValue(props.flexBasis,breakpoint),alignItems:getResponsiveValue(props.alignItems,breakpoint),alignContent:getResponsiveValue(props.alignContent,breakpoint),alignSelf:getResponsiveValue(props.alignSelf,breakpoint),justifyItems:getResponsiveValue(props.justifyItems,breakpoint),justifyContent:getResponsiveValue(props.justifyContent,breakpoint),justifySelf:getResponsiveValue(props.justifySelf,breakpoint),placeSelf:getResponsiveValue(props.placeSelf,breakpoint),placeItems:getResponsiveValue(props.placeItems,breakpoint),order:getResponsiveValue(props.order,breakpoint),position:getResponsiveValue(props.position,breakpoint),zIndex:getResponsiveValue(props.zIndex,breakpoint),grid:getResponsiveValue(props.grid,breakpoint),gridColumn:getResponsiveValue(props.gridColumn,breakpoint),gridRow:getResponsiveValue(props.gridRow,breakpoint),gridRowStart:getResponsiveValue(props.gridRowStart,breakpoint),gridRowEnd:getResponsiveValue(props.gridRowEnd,breakpoint),gridArea:getResponsiveValue(props.gridArea,breakpoint),gridAutoFlow:getResponsiveValue(props.gridAutoFlow,breakpoint),gridAutoRows:getResponsiveValue(props.gridAutoRows,breakpoint),gridAutoColumns:getResponsiveValue(props.gridAutoColumns,breakpoint),gridTemplate:getResponsiveValue(props.gridTemplate,breakpoint),gridTemplateAreas:getResponsiveValue(props.gridTemplateAreas,breakpoint),gridTemplateColumns:getResponsiveValue(props.gridTemplateColumns,breakpoint),gridTemplateRows:getResponsiveValue(props.gridTemplateRows,breakpoint),padding:getSpacingValue(props.padding,props.theme,breakpoint),paddingTop:getSpacingValue((_props$paddingTop=props.paddingTop)!=null?_props$paddingTop:props.paddingY,props.theme,breakpoint),paddingBottom:getSpacingValue((_props$paddingBottom=props.paddingBottom)!=null?_props$paddingBottom:props.paddingY,props.theme,breakpoint),paddingRight:getSpacingValue((_props$paddingRight=props.paddingRight)!=null?_props$paddingRight:props.paddingX,props.theme,breakpoint),paddingLeft:getSpacingValue((_props$paddingLeft=props.paddingLeft)!=null?_props$paddingLeft:props.paddingX,props.theme,breakpoint),margin:getSpacingValue(props.margin,props.theme,breakpoint),marginBottom:getSpacingValue((_props$marginBottom=props.marginBottom)!=null?_props$marginBottom:props.marginY,props.theme,breakpoint),marginTop:getSpacingValue((_props$marginTop=props.marginTop)!=null?_props$marginTop:props.marginY,props.theme,breakpoint),marginRight:getSpacingValue((_props$marginRight=props.marginRight)!=null?_props$marginRight:props.marginX,props.theme,breakpoint),marginLeft:getSpacingValue((_props$marginLeft=props.marginLeft)!=null?_props$marginLeft:props.marginX,props.theme,breakpoint),height:getSpacingValue(props.height,props.theme,breakpoint),minHeight:getSpacingValue(props.minHeight,props.theme,breakpoint),maxHeight:getSpacingValue(props.maxHeight,props.theme,breakpoint),width:getSpacingValue(props.width,props.theme,breakpoint),minWidth:getSpacingValue(props.minWidth,props.theme,breakpoint),maxWidth:getSpacingValue(props.maxWidth,props.theme,breakpoint),gap:getSpacingValue(props.gap,props.theme,breakpoint),rowGap:getSpacingValue(props.rowGap,props.theme,breakpoint),columnGap:getSpacingValue(props.columnGap,props.theme,breakpoint),top:getSpacingValue(props.top,props.theme,breakpoint),right:getSpacingValue(props.right,props.theme,breakpoint),bottom:getSpacingValue(props.bottom,props.theme,breakpoint),left:getSpacingValue(props.left,props.theme,breakpoint),backgroundColor:getColorValue(props.backgroundColor,props.theme,breakpoint),backgroundImage:getResponsiveValue(props.backgroundImage,breakpoint),backgroundSize:getResponsiveValue(props.backgroundSize,breakpoint),backgroundPosition:getResponsiveValue(props.backgroundPosition,breakpoint),backgroundOrigin:getResponsiveValue(props.backgroundOrigin,breakpoint),backgroundRepeat:getResponsiveValue(props.backgroundRepeat,breakpoint),borderRadius:getBorderRadiusValue(props.borderRadius,props.theme,breakpoint),lineHeight:getSpacingValue(props.lineHeight,props.theme,breakpoint),border:getResponsiveValue(props.border,breakpoint),borderTop:getResponsiveValue(props.borderTop,breakpoint),borderRight:getResponsiveValue(props.borderRight,breakpoint),borderBottom:getResponsiveValue(props.borderBottom,breakpoint),borderLeft:getResponsiveValue(props.borderLeft,breakpoint),borderWidth:getBorderWidthValue(props.borderWidth,props.theme,breakpoint),borderColor:getColorValue(props.borderColor,props.theme,breakpoint),borderTopWidth:getBorderWidthValue(props.borderTopWidth,props.theme,breakpoint),borderTopColor:getColorValue(props.borderTopColor,props.theme,breakpoint),borderRightWidth:getBorderWidthValue(props.borderRightWidth,props.theme,breakpoint),borderRightColor:getColorValue(props.borderRightColor,props.theme,breakpoint),borderBottomWidth:getBorderWidthValue(props.borderBottomWidth,props.theme,breakpoint),borderBottomColor:getColorValue(props.borderBottomColor,props.theme,breakpoint),borderLeftWidth:getBorderWidthValue(props.borderLeftWidth,props.theme,breakpoint),borderLeftColor:getColorValue(props.borderLeftColor,props.theme,breakpoint),borderTopLeftRadius:getBorderRadiusValue(props.borderTopLeftRadius,props.theme,breakpoint),borderTopRightRadius:getBorderRadiusValue(props.borderTopRightRadius,props.theme,breakpoint),borderBottomRightRadius:getBorderRadiusValue(props.borderBottomRightRadius,props.theme,breakpoint),borderBottomLeftRadius:getBorderRadiusValue(props.borderBottomLeftRadius,props.theme,breakpoint),borderStyle:hasBorder?'solid':undefined,cursor:getResponsiveValue(props.cursor,breakpoint)},!hasBorder&&{borderTopStyle:hasBorderTop?'solid':undefined,borderBottomStyle:hasBorderBottom?'solid':undefined,borderLeftStyle:hasBorderLeft?'solid':undefined,borderRightStyle:hasBorderRight?'solid':undefined},{touchAction:getResponsiveValue(props.touchAction,breakpoint),userSelect:getResponsiveValue(props.userSelect,breakpoint),pointerEvents:getResponsiveValue(props.pointerEvents),opacity:getResponsiveValue(props.opacity,breakpoint),visibility:getResponsiveValue(props.visibility,breakpoint)},!isReactNative()&&{boxShadow:getElevationValue(props.elevation,props.theme,breakpoint)},{transform:getResponsiveValue(props.transform,breakpoint),transformOrigin:getResponsiveValue(props.transformOrigin,breakpoint),clipPath:getResponsiveValue(props.clipPath,breakpoint)});};var shouldAddBreakpoint=function shouldAddBreakpoint(cssProps){var firstDefinedValue=Object.values(cssProps).find(function(cssValue){return cssValue!==undefined&&cssValue!==null;});return firstDefinedValue!==undefined;};var getAllMediaQueries=function getAllMediaQueries(props){if(isReactNative()){return {};}breakpoints.base;var breakpointsWithoutBase=_objectWithoutProperties(breakpoints,_excluded);return Object.fromEntries(Object.entries(breakpointsWithoutBase).map(function(_ref){var _ref2=_slicedToArray(_ref,2),breakpointKey=_ref2[0],breakpointValue=_ref2[1];var cssPropsForCurrentBreakpoint=getAllProps(props,breakpointKey);if(!shouldAddBreakpoint(cssPropsForCurrentBreakpoint)){return [];}var mediaQuery=`@media ${getMediaQuery({min:breakpointValue})}`;return [mediaQuery,cssPropsForCurrentBreakpoint];}));};var getBaseBoxStyles=function getBaseBoxStyles(props){return Object.assign({},getAllProps(props),getAllMediaQueries(props));};
|
|
18
18
|
|
|
19
19
|
export { getAllMediaQueries, getAllProps, getBaseBoxStyles, getBorderRadiusValue, getColorValue, getElevationValue, getSpacingValue, shouldAddBreakpoint };
|
|
20
20
|
//# sourceMappingURL=baseBoxStyles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"baseBoxStyles.js","sources":["../../../../../../src/components/Box/BaseBox/baseBoxStyles.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/prefer-ts-expect-error */\n/* eslint-disable @typescript-eslint/no-unnecessary-type-assertion */\nimport type { CSSObject } from 'styled-components';\nimport type {\n BaseBoxProps,\n MakeValueResponsive,\n SpacingValueType,\n ArrayOfMaxLength4,\n} from './types';\nimport { getResponsiveValue } from './getResponsiveValue';\nimport getIn from '~utils/lodashButBetter/get';\nimport isEmpty from '~utils/lodashButBetter/isEmpty';\nimport type { Breakpoints } from '~tokens/global';\nimport { breakpoints } from '~tokens/global';\nimport { isReactNative, getMediaQuery } from '~utils';\nimport type { Theme } from '~components/BladeProvider';\nimport { makeSpace } from '~utils/makeSpace';\nimport { makeBorderSize } from '~utils/makeBorderSize';\nimport type { DotNotationSpacingStringToken } from '~utils/types';\n\nconst isSpacingToken = (value: string): value is DotNotationSpacingStringToken => {\n return typeof value === 'string' && value.startsWith('spacing.');\n};\n\nconst getSpacingValue = (\n spacingValue:\n | MakeValueResponsive<SpacingValueType | ArrayOfMaxLength4<SpacingValueType>>\n | undefined,\n theme: Theme,\n breakpoint?: keyof Breakpoints,\n): string | undefined => {\n if (isEmpty(spacingValue)) {\n return undefined;\n }\n\n const responsiveSpacingValue = getResponsiveValue(\n spacingValue as MakeValueResponsive<SpacingValueType | SpacingValueType[]>,\n breakpoint,\n );\n\n if (isEmpty(responsiveSpacingValue)) {\n return undefined;\n }\n\n if (responsiveSpacingValue === 'auto') {\n return responsiveSpacingValue;\n }\n\n if (Array.isArray(responsiveSpacingValue)) {\n return responsiveSpacingValue.map((value) => getSpacingValue(value, theme)).join(' ');\n }\n\n if (isSpacingToken(responsiveSpacingValue)) {\n const spacingReturnValue = getIn(theme, responsiveSpacingValue);\n return isEmpty(spacingReturnValue) ? makeSpace(spacingReturnValue!) : undefined;\n }\n\n // pixel or with unit values\n return responsiveSpacingValue;\n};\n\nconst getColorValue = (\n color: BaseBoxProps['backgroundColor'] | BaseBoxProps['borderColor'],\n theme: Theme,\n breakpoint?: keyof Breakpoints,\n): string => {\n const responsiveBackgroundValue = getResponsiveValue(color, breakpoint);\n // @ts-expect-error: We always return any from getResponsiveValue so value can't be inferred here\n const tokenValue = getIn(theme, `colors.${responsiveBackgroundValue}`);\n return tokenValue ?? responsiveBackgroundValue;\n};\n\nconst getBorderRadiusValue = (\n borderRadius: BaseBoxProps['borderRadius'],\n theme: Theme,\n breakpoint?: keyof Breakpoints,\n): string | undefined => {\n const responsiveBorderRadiusValue = getResponsiveValue(borderRadius, breakpoint);\n return isEmpty(responsiveBorderRadiusValue)\n ? undefined\n : // @ts-ignore: intentionally set to any since figuring out types of responsive props is complex\n makeBorderSize(getIn(theme, `border.radius.${responsiveBorderRadiusValue}`));\n};\n\nconst getBorderWidthValue = (\n borderWidth: BaseBoxProps['borderWidth'],\n theme: Theme,\n breakpoint?: keyof Breakpoints,\n): string | undefined => {\n const responsiveBorderWidthValue = getResponsiveValue(borderWidth, breakpoint);\n return isEmpty(responsiveBorderWidthValue)\n ? undefined\n : // @ts-ignore: intentionally set to any since figuring out types of responsive props is complex\n makeBorderSize(getIn(theme, `border.width.${responsiveBorderWidthValue}`));\n};\n\nexport const getElevationValue = (\n elevation: BaseBoxProps['elevation'],\n theme: Theme,\n breakpoint?: keyof Breakpoints,\n): string | undefined => {\n const responsiveElevationValue = getResponsiveValue(elevation, breakpoint);\n return isEmpty(responsiveElevationValue)\n ? undefined\n : // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion\n // @ts-ignore: intentionally set to any since figuring out types of responsive props is complex\n getIn(theme, `elevation.${responsiveElevationValue!}`);\n};\n\nconst getAllProps = (\n props: BaseBoxProps & { theme: Theme },\n breakpoint?: keyof Breakpoints,\n): CSSObject => {\n const hasBorder = props.borderWidth || props.borderColor;\n const hasBorderRight = props.borderRight || props.borderRightColor || props.borderRightWidth;\n const hasBorderLeft = props.borderLeft || props.borderLeftColor || props.borderLeftWidth;\n const hasBorderTop = props.borderTop || props.borderTopColor || props.borderTopWidth;\n const hasBorderBottom = props.borderBottom || props.borderBottomColor || props.borderBottomWidth;\n\n return {\n display: getResponsiveValue(props.display, breakpoint),\n overflow: getResponsiveValue(props.overflow, breakpoint),\n overflowX: getResponsiveValue(props.overflowX, breakpoint),\n overflowY: getResponsiveValue(props.overflowY, breakpoint),\n textAlign: getResponsiveValue(props.textAlign, breakpoint),\n whiteSpace: getResponsiveValue(props.whiteSpace, breakpoint),\n\n // Flex\n flex: getResponsiveValue(props.flex, breakpoint),\n flexWrap: getResponsiveValue(props.flexWrap, breakpoint),\n flexDirection: getResponsiveValue(props.flexDirection, breakpoint),\n flexGrow: getResponsiveValue(props.flexGrow, breakpoint),\n flexShrink: getResponsiveValue(props.flexShrink, breakpoint),\n flexBasis: getResponsiveValue(props.flexBasis, breakpoint),\n alignItems: getResponsiveValue(props.alignItems, breakpoint),\n alignContent: getResponsiveValue(props.alignContent, breakpoint),\n alignSelf: getResponsiveValue(props.alignSelf, breakpoint),\n justifyItems: getResponsiveValue(props.justifyItems, breakpoint),\n justifyContent: getResponsiveValue(props.justifyContent, breakpoint),\n justifySelf: getResponsiveValue(props.justifySelf, breakpoint),\n placeSelf: getResponsiveValue(props.placeSelf, breakpoint),\n placeItems: getResponsiveValue(props.placeItems, breakpoint),\n order: getResponsiveValue(props.order, breakpoint),\n position: getResponsiveValue(props.position, breakpoint),\n zIndex: getResponsiveValue(props.zIndex, breakpoint),\n\n // Grid\n grid: getResponsiveValue(props.grid, breakpoint),\n gridColumn: getResponsiveValue(props.gridColumn, breakpoint),\n gridRow: getResponsiveValue(props.gridRow, breakpoint),\n gridRowStart: getResponsiveValue(props.gridRowStart, breakpoint),\n gridRowEnd: getResponsiveValue(props.gridRowEnd, breakpoint),\n gridArea: getResponsiveValue(props.gridArea, breakpoint),\n gridAutoFlow: getResponsiveValue(props.gridAutoFlow, breakpoint),\n gridAutoRows: getResponsiveValue(props.gridAutoRows, breakpoint),\n gridAutoColumns: getResponsiveValue(props.gridAutoColumns, breakpoint),\n gridTemplate: getResponsiveValue(props.gridTemplate, breakpoint),\n gridTemplateAreas: getResponsiveValue(props.gridTemplateAreas, breakpoint),\n gridTemplateColumns: getResponsiveValue(props.gridTemplateColumns, breakpoint),\n gridTemplateRows: getResponsiveValue(props.gridTemplateRows, breakpoint),\n\n // Spacing Props\n padding: getSpacingValue(props.padding, props.theme, breakpoint),\n paddingTop: getSpacingValue(props.paddingTop ?? props.paddingY, props.theme, breakpoint),\n paddingBottom: getSpacingValue(props.paddingBottom ?? props.paddingY, props.theme, breakpoint),\n paddingRight: getSpacingValue(props.paddingRight ?? props.paddingX, props.theme, breakpoint),\n paddingLeft: getSpacingValue(props.paddingLeft ?? props.paddingX, props.theme, breakpoint),\n margin: getSpacingValue(props.margin, props.theme, breakpoint),\n marginBottom: getSpacingValue(props.marginBottom ?? props.marginY, props.theme, breakpoint),\n marginTop: getSpacingValue(props.marginTop ?? props.marginY, props.theme, breakpoint),\n marginRight: getSpacingValue(props.marginRight ?? props.marginX, props.theme, breakpoint),\n marginLeft: getSpacingValue(props.marginLeft ?? props.marginX, props.theme, breakpoint),\n height: getSpacingValue(props.height, props.theme, breakpoint),\n minHeight: getSpacingValue(props.minHeight, props.theme, breakpoint),\n maxHeight: getSpacingValue(props.maxHeight, props.theme, breakpoint),\n width: getSpacingValue(props.width, props.theme, breakpoint),\n minWidth: getSpacingValue(props.minWidth, props.theme, breakpoint),\n maxWidth: getSpacingValue(props.maxWidth, props.theme, breakpoint),\n gap: getSpacingValue(props.gap, props.theme, breakpoint),\n rowGap: getSpacingValue(props.rowGap, props.theme, breakpoint),\n columnGap: getSpacingValue(props.columnGap, props.theme, breakpoint),\n top: getSpacingValue(props.top, props.theme, breakpoint),\n right: getSpacingValue(props.right, props.theme, breakpoint),\n bottom: getSpacingValue(props.bottom, props.theme, breakpoint),\n left: getSpacingValue(props.left, props.theme, breakpoint),\n\n // Visual props\n backgroundColor: getColorValue(props.backgroundColor, props.theme, breakpoint),\n backgroundImage: getResponsiveValue(props.backgroundImage, breakpoint),\n backgroundSize: getResponsiveValue(props.backgroundSize, breakpoint),\n backgroundPosition: getResponsiveValue(props.backgroundPosition, breakpoint),\n backgroundOrigin: getResponsiveValue(props.backgroundOrigin, breakpoint),\n backgroundRepeat: getResponsiveValue(props.backgroundRepeat, breakpoint),\n borderRadius: getBorderRadiusValue(props.borderRadius, props.theme, breakpoint),\n lineHeight: getSpacingValue(props.lineHeight, props.theme, breakpoint),\n border: getResponsiveValue(props.border, breakpoint),\n borderTop: getResponsiveValue(props.borderTop, breakpoint),\n borderRight: getResponsiveValue(props.borderRight, breakpoint),\n borderBottom: getResponsiveValue(props.borderBottom, breakpoint),\n borderLeft: getResponsiveValue(props.borderLeft, breakpoint),\n borderWidth: getBorderWidthValue(props.borderWidth, props.theme, breakpoint),\n borderColor: getColorValue(props.borderColor, props.theme, breakpoint),\n borderTopWidth: getBorderWidthValue(props.borderTopWidth, props.theme, breakpoint),\n borderTopColor: getColorValue(props.borderTopColor, props.theme, breakpoint),\n borderRightWidth: getBorderWidthValue(props.borderRightWidth, props.theme, breakpoint),\n borderRightColor: getColorValue(props.borderRightColor, props.theme, breakpoint),\n borderBottomWidth: getBorderWidthValue(props.borderBottomWidth, props.theme, breakpoint),\n borderBottomColor: getColorValue(props.borderBottomColor, props.theme, breakpoint),\n borderLeftWidth: getBorderWidthValue(props.borderLeftWidth, props.theme, breakpoint),\n borderLeftColor: getColorValue(props.borderLeftColor, props.theme, breakpoint),\n borderTopLeftRadius: getBorderRadiusValue(props.borderTopLeftRadius, props.theme, breakpoint),\n borderTopRightRadius: getBorderRadiusValue(props.borderTopRightRadius, props.theme, breakpoint),\n borderBottomRightRadius: getBorderRadiusValue(\n props.borderBottomRightRadius,\n props.theme,\n breakpoint,\n ),\n borderBottomLeftRadius: getBorderRadiusValue(\n props.borderBottomLeftRadius,\n props.theme,\n breakpoint,\n ),\n borderStyle: hasBorder ? 'solid' : undefined,\n // Since we only allow 'solid', we can use the same value for all borders if hasBorder is true\n // If hasBorder is false, we need to check each border individually\n ...(!hasBorder && {\n borderTopStyle: hasBorderTop ? 'solid' : undefined,\n borderBottomStyle: hasBorderBottom ? 'solid' : undefined,\n borderLeftStyle: hasBorderLeft ? 'solid' : undefined,\n borderRightStyle: hasBorderRight ? 'solid' : undefined,\n }),\n\n touchAction: getResponsiveValue(props.touchAction, breakpoint),\n userSelect: getResponsiveValue(props.userSelect, breakpoint),\n pointerEvents: getResponsiveValue(props.pointerEvents),\n opacity: getResponsiveValue(props.opacity, breakpoint),\n visibility: getResponsiveValue(props.visibility, breakpoint),\n ...(!isReactNative() && {\n boxShadow: getElevationValue(props.elevation, props.theme, breakpoint),\n }),\n\n // Polygon support\n transform: getResponsiveValue(props.transform as string, breakpoint),\n transformOrigin: getResponsiveValue(props.transformOrigin, breakpoint),\n clipPath: getResponsiveValue(props.clipPath, breakpoint),\n };\n};\n\n/** We only add breakpoint if at least one of the value is defined */\nconst shouldAddBreakpoint = (cssProps: CSSObject): boolean => {\n const firstDefinedValue = Object.values(cssProps).find(\n (cssValue) => cssValue !== undefined && cssValue !== null,\n );\n\n return firstDefinedValue !== undefined;\n};\n\nconst getAllMediaQueries = (props: BaseBoxProps & { theme: Theme }): CSSObject => {\n if (isReactNative()) {\n return {};\n }\n\n const { base, ...breakpointsWithoutBase } = breakpoints;\n\n return Object.fromEntries(\n Object.entries(breakpointsWithoutBase).map(([breakpointKey, breakpointValue]) => {\n const cssPropsForCurrentBreakpoint = getAllProps(props, breakpointKey as keyof Breakpoints);\n if (!shouldAddBreakpoint(cssPropsForCurrentBreakpoint)) {\n return [];\n }\n\n const mediaQuery = `@media ${getMediaQuery({ min: breakpointValue })}`;\n return [mediaQuery, cssPropsForCurrentBreakpoint];\n }),\n );\n};\n\nconst getBaseBoxStyles = (props: BaseBoxProps & { theme: Theme }): CSSObject => {\n return {\n ...getAllProps(props),\n ...getAllMediaQueries(props),\n };\n};\n\nexport {\n getBaseBoxStyles,\n getSpacingValue,\n getColorValue,\n getBorderRadiusValue,\n shouldAddBreakpoint,\n getAllMediaQueries,\n getAllProps,\n};\n"],"names":["isSpacingToken","value","startsWith","getSpacingValue","spacingValue","theme","breakpoint","isEmpty","undefined","responsiveSpacingValue","getResponsiveValue","Array","isArray","map","join","spacingReturnValue","getIn","makeSpace","getColorValue","color","responsiveBackgroundValue","tokenValue","getBorderRadiusValue","borderRadius","responsiveBorderRadiusValue","makeBorderSize","getBorderWidthValue","borderWidth","responsiveBorderWidthValue","getElevationValue","elevation","responsiveElevationValue","getAllProps","props","_props$paddingTop","_props$paddingBottom","_props$paddingRight","_props$paddingLeft","_props$marginBottom","_props$marginTop","_props$marginRight","_props$marginLeft","hasBorder","borderColor","hasBorderRight","borderRight","borderRightColor","borderRightWidth","hasBorderLeft","borderLeft","borderLeftColor","borderLeftWidth","hasBorderTop","borderTop","borderTopColor","borderTopWidth","hasBorderBottom","borderBottom","borderBottomColor","borderBottomWidth","Object","assign","display","overflow","overflowX","overflowY","textAlign","whiteSpace","flex","flexWrap","flexDirection","flexGrow","flexShrink","flexBasis","alignItems","alignContent","alignSelf","justifyItems","justifyContent","justifySelf","placeSelf","placeItems","order","position","zIndex","grid","gridColumn","gridRow","gridRowStart","gridRowEnd","gridArea","gridAutoFlow","gridAutoRows","gridAutoColumns","gridTemplate","gridTemplateAreas","gridTemplateColumns","gridTemplateRows","padding","paddingTop","paddingY","paddingBottom","paddingRight","paddingX","paddingLeft","margin","marginBottom","marginY","marginTop","marginRight","marginX","marginLeft","height","minHeight","maxHeight","width","minWidth","maxWidth","gap","rowGap","columnGap","top","right","bottom","left","backgroundColor","backgroundImage","backgroundSize","backgroundPosition","backgroundOrigin","backgroundRepeat","lineHeight","border","borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius","borderStyle","borderTopStyle","borderBottomStyle","borderLeftStyle","borderRightStyle","touchAction","userSelect","pointerEvents","opacity","visibility","isReactNative","boxShadow","transform","transformOrigin","clipPath","shouldAddBreakpoint","cssProps","firstDefinedValue","values","find","cssValue","getAllMediaQueries","breakpoints","base","breakpointsWithoutBase","_objectWithoutProperties","_excluded","fromEntries","entries","_ref","_ref2","_slicedToArray","breakpointKey","breakpointValue","cssPropsForCurrentBreakpoint","mediaQuery","getMediaQuery","min","getBaseBoxStyles"],"mappings":";;;;;;;;;;;;;;;;uBAoBA,IAAMA,cAAc,CAAG,SAAjBA,cAAcA,CAAIC,KAAa,CAA6C,CAChF,OAAO,OAAOA,KAAK,GAAK,QAAQ,EAAIA,KAAK,CAACC,UAAU,CAAC,UAAU,CAAC,CAClE,CAAC,CAEK,IAAAC,eAAe,CAAG,SAAlBA,eAAeA,CACnBC,YAEa,CACbC,KAAY,CACZC,UAA8B,CACP,CACvB,GAAIC,OAAO,CAACH,YAAY,CAAC,CAAE,CACzB,OAAOI,SAAS,CAClB,CAEA,IAAMC,sBAAsB,CAAGC,kBAAkB,CAC/C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"}
|
|
1
|
+
{"version":3,"file":"baseBoxStyles.js","sources":["../../../../../../src/components/Box/BaseBox/baseBoxStyles.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/prefer-ts-expect-error */\n/* eslint-disable @typescript-eslint/no-unnecessary-type-assertion */\nimport type { CSSObject } from 'styled-components';\nimport type {\n BaseBoxProps,\n MakeValueResponsive,\n SpacingValueType,\n ArrayOfMaxLength4,\n} from './types';\nimport { getResponsiveValue } from './getResponsiveValue';\nimport getIn from '~utils/lodashButBetter/get';\nimport isEmpty from '~utils/lodashButBetter/isEmpty';\nimport type { Breakpoints } from '~tokens/global';\nimport { breakpoints } from '~tokens/global';\nimport { isReactNative, getMediaQuery } from '~utils';\nimport type { Theme } from '~components/BladeProvider';\nimport { makeSpace } from '~utils/makeSpace';\nimport { makeBorderSize } from '~utils/makeBorderSize';\nimport type { DotNotationSpacingStringToken } from '~utils/types';\n\nconst isSpacingToken = (value: string): value is DotNotationSpacingStringToken => {\n return typeof value === 'string' && value.startsWith('spacing.');\n};\n\nconst getSpacingValue = (\n spacingValue:\n | MakeValueResponsive<SpacingValueType | ArrayOfMaxLength4<SpacingValueType>>\n | undefined,\n theme: Theme,\n breakpoint?: keyof Breakpoints,\n): string | undefined => {\n if (isEmpty(spacingValue)) {\n return undefined;\n }\n\n const responsiveSpacingValue = getResponsiveValue(\n spacingValue as MakeValueResponsive<SpacingValueType | SpacingValueType[]>,\n breakpoint,\n );\n\n if (isEmpty(responsiveSpacingValue)) {\n return undefined;\n }\n\n if (responsiveSpacingValue === 'auto') {\n return responsiveSpacingValue;\n }\n\n if (Array.isArray(responsiveSpacingValue)) {\n return responsiveSpacingValue.map((value) => getSpacingValue(value, theme)).join(' ');\n }\n\n if (isSpacingToken(responsiveSpacingValue)) {\n const spacingReturnValue = getIn(theme, responsiveSpacingValue);\n return isEmpty(spacingReturnValue) ? makeSpace(spacingReturnValue!) : undefined;\n }\n\n // pixel or with unit values\n return responsiveSpacingValue;\n};\n\nconst getColorValue = (\n color: BaseBoxProps['backgroundColor'] | BaseBoxProps['borderColor'],\n theme: Theme,\n breakpoint?: keyof Breakpoints,\n): string => {\n const responsiveBackgroundValue = getResponsiveValue(color, breakpoint);\n // @ts-expect-error: We always return any from getResponsiveValue so value can't be inferred here\n const tokenValue = getIn(theme, `colors.${responsiveBackgroundValue}`);\n return tokenValue ?? responsiveBackgroundValue;\n};\n\nconst getBorderRadiusValue = (\n borderRadius: BaseBoxProps['borderRadius'],\n theme: Theme,\n breakpoint?: keyof Breakpoints,\n): string | undefined => {\n const responsiveBorderRadiusValue = getResponsiveValue(borderRadius, breakpoint);\n return isEmpty(responsiveBorderRadiusValue)\n ? undefined\n : // @ts-ignore: intentionally set to any since figuring out types of responsive props is complex\n makeBorderSize(getIn(theme, `border.radius.${responsiveBorderRadiusValue}`));\n};\n\nconst getBorderWidthValue = (\n borderWidth: BaseBoxProps['borderWidth'],\n theme: Theme,\n breakpoint?: keyof Breakpoints,\n): string | undefined => {\n const responsiveBorderWidthValue = getResponsiveValue(borderWidth, breakpoint);\n return isEmpty(responsiveBorderWidthValue)\n ? undefined\n : // @ts-ignore: intentionally set to any since figuring out types of responsive props is complex\n makeBorderSize(getIn(theme, `border.width.${responsiveBorderWidthValue}`));\n};\n\nexport const getElevationValue = (\n elevation: BaseBoxProps['elevation'],\n theme: Theme,\n breakpoint?: keyof Breakpoints,\n): string | undefined => {\n const responsiveElevationValue = getResponsiveValue(elevation, breakpoint);\n return isEmpty(responsiveElevationValue)\n ? undefined\n : // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion\n // @ts-ignore: intentionally set to any since figuring out types of responsive props is complex\n getIn(theme, `elevation.${responsiveElevationValue!}`);\n};\n\nconst getAllProps = (\n props: BaseBoxProps & { theme: Theme },\n breakpoint?: keyof Breakpoints,\n): CSSObject => {\n const hasBorder = props.borderWidth || props.borderColor;\n const hasBorderRight = props.borderRight || props.borderRightColor || props.borderRightWidth;\n const hasBorderLeft = props.borderLeft || props.borderLeftColor || props.borderLeftWidth;\n const hasBorderTop = props.borderTop || props.borderTopColor || props.borderTopWidth;\n const hasBorderBottom = props.borderBottom || props.borderBottomColor || props.borderBottomWidth;\n\n return {\n display: getResponsiveValue(props.display, breakpoint),\n overflow: getResponsiveValue(props.overflow, breakpoint),\n overflowX: getResponsiveValue(props.overflowX, breakpoint),\n overflowY: getResponsiveValue(props.overflowY, breakpoint),\n textAlign: getResponsiveValue(props.textAlign, breakpoint),\n whiteSpace: getResponsiveValue(props.whiteSpace, breakpoint),\n\n // Flex\n flex: getResponsiveValue(props.flex, breakpoint),\n flexWrap: getResponsiveValue(props.flexWrap, breakpoint),\n flexDirection: getResponsiveValue(props.flexDirection, breakpoint),\n flexGrow: getResponsiveValue(props.flexGrow, breakpoint),\n flexShrink: getResponsiveValue(props.flexShrink, breakpoint),\n flexBasis: getResponsiveValue(props.flexBasis, breakpoint),\n alignItems: getResponsiveValue(props.alignItems, breakpoint),\n alignContent: getResponsiveValue(props.alignContent, breakpoint),\n alignSelf: getResponsiveValue(props.alignSelf, breakpoint),\n justifyItems: getResponsiveValue(props.justifyItems, breakpoint),\n justifyContent: getResponsiveValue(props.justifyContent, breakpoint),\n justifySelf: getResponsiveValue(props.justifySelf, breakpoint),\n placeSelf: getResponsiveValue(props.placeSelf, breakpoint),\n placeItems: getResponsiveValue(props.placeItems, breakpoint),\n order: getResponsiveValue(props.order, breakpoint),\n position: getResponsiveValue(props.position, breakpoint),\n zIndex: getResponsiveValue(props.zIndex, breakpoint),\n\n // Grid\n grid: getResponsiveValue(props.grid, breakpoint),\n gridColumn: getResponsiveValue(props.gridColumn, breakpoint),\n gridRow: getResponsiveValue(props.gridRow, breakpoint),\n gridRowStart: getResponsiveValue(props.gridRowStart, breakpoint),\n gridRowEnd: getResponsiveValue(props.gridRowEnd, breakpoint),\n gridArea: getResponsiveValue(props.gridArea, breakpoint),\n gridAutoFlow: getResponsiveValue(props.gridAutoFlow, breakpoint),\n gridAutoRows: getResponsiveValue(props.gridAutoRows, breakpoint),\n gridAutoColumns: getResponsiveValue(props.gridAutoColumns, breakpoint),\n gridTemplate: getResponsiveValue(props.gridTemplate, breakpoint),\n gridTemplateAreas: getResponsiveValue(props.gridTemplateAreas, breakpoint),\n gridTemplateColumns: getResponsiveValue(props.gridTemplateColumns, breakpoint),\n gridTemplateRows: getResponsiveValue(props.gridTemplateRows, breakpoint),\n\n // Spacing Props\n padding: getSpacingValue(props.padding, props.theme, breakpoint),\n paddingTop: getSpacingValue(props.paddingTop ?? props.paddingY, props.theme, breakpoint),\n paddingBottom: getSpacingValue(props.paddingBottom ?? props.paddingY, props.theme, breakpoint),\n paddingRight: getSpacingValue(props.paddingRight ?? props.paddingX, props.theme, breakpoint),\n paddingLeft: getSpacingValue(props.paddingLeft ?? props.paddingX, props.theme, breakpoint),\n margin: getSpacingValue(props.margin, props.theme, breakpoint),\n marginBottom: getSpacingValue(props.marginBottom ?? props.marginY, props.theme, breakpoint),\n marginTop: getSpacingValue(props.marginTop ?? props.marginY, props.theme, breakpoint),\n marginRight: getSpacingValue(props.marginRight ?? props.marginX, props.theme, breakpoint),\n marginLeft: getSpacingValue(props.marginLeft ?? props.marginX, props.theme, breakpoint),\n height: getSpacingValue(props.height, props.theme, breakpoint),\n minHeight: getSpacingValue(props.minHeight, props.theme, breakpoint),\n maxHeight: getSpacingValue(props.maxHeight, props.theme, breakpoint),\n width: getSpacingValue(props.width, props.theme, breakpoint),\n minWidth: getSpacingValue(props.minWidth, props.theme, breakpoint),\n maxWidth: getSpacingValue(props.maxWidth, props.theme, breakpoint),\n gap: getSpacingValue(props.gap, props.theme, breakpoint),\n rowGap: getSpacingValue(props.rowGap, props.theme, breakpoint),\n columnGap: getSpacingValue(props.columnGap, props.theme, breakpoint),\n top: getSpacingValue(props.top, props.theme, breakpoint),\n right: getSpacingValue(props.right, props.theme, breakpoint),\n bottom: getSpacingValue(props.bottom, props.theme, breakpoint),\n left: getSpacingValue(props.left, props.theme, breakpoint),\n\n // Visual props\n backgroundColor: getColorValue(props.backgroundColor, props.theme, breakpoint),\n backgroundImage: getResponsiveValue(props.backgroundImage, breakpoint),\n backgroundSize: getResponsiveValue(props.backgroundSize, breakpoint),\n backgroundPosition: getResponsiveValue(props.backgroundPosition, breakpoint),\n backgroundOrigin: getResponsiveValue(props.backgroundOrigin, breakpoint),\n backgroundRepeat: getResponsiveValue(props.backgroundRepeat, breakpoint),\n borderRadius: getBorderRadiusValue(props.borderRadius, props.theme, breakpoint),\n lineHeight: getSpacingValue(props.lineHeight, props.theme, breakpoint),\n border: getResponsiveValue(props.border, breakpoint),\n borderTop: getResponsiveValue(props.borderTop, breakpoint),\n borderRight: getResponsiveValue(props.borderRight, breakpoint),\n borderBottom: getResponsiveValue(props.borderBottom, breakpoint),\n borderLeft: getResponsiveValue(props.borderLeft, breakpoint),\n borderWidth: getBorderWidthValue(props.borderWidth, props.theme, breakpoint),\n borderColor: getColorValue(props.borderColor, props.theme, breakpoint),\n borderTopWidth: getBorderWidthValue(props.borderTopWidth, props.theme, breakpoint),\n borderTopColor: getColorValue(props.borderTopColor, props.theme, breakpoint),\n borderRightWidth: getBorderWidthValue(props.borderRightWidth, props.theme, breakpoint),\n borderRightColor: getColorValue(props.borderRightColor, props.theme, breakpoint),\n borderBottomWidth: getBorderWidthValue(props.borderBottomWidth, props.theme, breakpoint),\n borderBottomColor: getColorValue(props.borderBottomColor, props.theme, breakpoint),\n borderLeftWidth: getBorderWidthValue(props.borderLeftWidth, props.theme, breakpoint),\n borderLeftColor: getColorValue(props.borderLeftColor, props.theme, breakpoint),\n borderTopLeftRadius: getBorderRadiusValue(props.borderTopLeftRadius, props.theme, breakpoint),\n borderTopRightRadius: getBorderRadiusValue(props.borderTopRightRadius, props.theme, breakpoint),\n borderBottomRightRadius: getBorderRadiusValue(\n props.borderBottomRightRadius,\n props.theme,\n breakpoint,\n ),\n borderBottomLeftRadius: getBorderRadiusValue(\n props.borderBottomLeftRadius,\n props.theme,\n breakpoint,\n ),\n borderStyle: hasBorder ? 'solid' : undefined,\n cursor: getResponsiveValue(props.cursor, breakpoint),\n // Since we only allow 'solid', we can use the same value for all borders if hasBorder is true\n // If hasBorder is false, we need to check each border individually\n ...(!hasBorder && {\n borderTopStyle: hasBorderTop ? 'solid' : undefined,\n borderBottomStyle: hasBorderBottom ? 'solid' : undefined,\n borderLeftStyle: hasBorderLeft ? 'solid' : undefined,\n borderRightStyle: hasBorderRight ? 'solid' : undefined,\n }),\n\n touchAction: getResponsiveValue(props.touchAction, breakpoint),\n userSelect: getResponsiveValue(props.userSelect, breakpoint),\n pointerEvents: getResponsiveValue(props.pointerEvents),\n opacity: getResponsiveValue(props.opacity, breakpoint),\n visibility: getResponsiveValue(props.visibility, breakpoint),\n ...(!isReactNative() && {\n boxShadow: getElevationValue(props.elevation, props.theme, breakpoint),\n }),\n\n // Polygon support\n transform: getResponsiveValue(props.transform as string, breakpoint),\n transformOrigin: getResponsiveValue(props.transformOrigin, breakpoint),\n clipPath: getResponsiveValue(props.clipPath, breakpoint),\n };\n};\n\n/** We only add breakpoint if at least one of the value is defined */\nconst shouldAddBreakpoint = (cssProps: CSSObject): boolean => {\n const firstDefinedValue = Object.values(cssProps).find(\n (cssValue) => cssValue !== undefined && cssValue !== null,\n );\n\n return firstDefinedValue !== undefined;\n};\n\nconst getAllMediaQueries = (props: BaseBoxProps & { theme: Theme }): CSSObject => {\n if (isReactNative()) {\n return {};\n }\n\n const { base, ...breakpointsWithoutBase } = breakpoints;\n\n return Object.fromEntries(\n Object.entries(breakpointsWithoutBase).map(([breakpointKey, breakpointValue]) => {\n const cssPropsForCurrentBreakpoint = getAllProps(props, breakpointKey as keyof Breakpoints);\n if (!shouldAddBreakpoint(cssPropsForCurrentBreakpoint)) {\n return [];\n }\n\n const mediaQuery = `@media ${getMediaQuery({ min: breakpointValue })}`;\n return [mediaQuery, cssPropsForCurrentBreakpoint];\n }),\n );\n};\n\nconst getBaseBoxStyles = (props: BaseBoxProps & { theme: Theme }): CSSObject => {\n return {\n ...getAllProps(props),\n ...getAllMediaQueries(props),\n };\n};\n\nexport {\n getBaseBoxStyles,\n getSpacingValue,\n getColorValue,\n getBorderRadiusValue,\n shouldAddBreakpoint,\n getAllMediaQueries,\n getAllProps,\n};\n"],"names":["isSpacingToken","value","startsWith","getSpacingValue","spacingValue","theme","breakpoint","isEmpty","undefined","responsiveSpacingValue","getResponsiveValue","Array","isArray","map","join","spacingReturnValue","getIn","makeSpace","getColorValue","color","responsiveBackgroundValue","tokenValue","getBorderRadiusValue","borderRadius","responsiveBorderRadiusValue","makeBorderSize","getBorderWidthValue","borderWidth","responsiveBorderWidthValue","getElevationValue","elevation","responsiveElevationValue","getAllProps","props","_props$paddingTop","_props$paddingBottom","_props$paddingRight","_props$paddingLeft","_props$marginBottom","_props$marginTop","_props$marginRight","_props$marginLeft","hasBorder","borderColor","hasBorderRight","borderRight","borderRightColor","borderRightWidth","hasBorderLeft","borderLeft","borderLeftColor","borderLeftWidth","hasBorderTop","borderTop","borderTopColor","borderTopWidth","hasBorderBottom","borderBottom","borderBottomColor","borderBottomWidth","Object","assign","display","overflow","overflowX","overflowY","textAlign","whiteSpace","flex","flexWrap","flexDirection","flexGrow","flexShrink","flexBasis","alignItems","alignContent","alignSelf","justifyItems","justifyContent","justifySelf","placeSelf","placeItems","order","position","zIndex","grid","gridColumn","gridRow","gridRowStart","gridRowEnd","gridArea","gridAutoFlow","gridAutoRows","gridAutoColumns","gridTemplate","gridTemplateAreas","gridTemplateColumns","gridTemplateRows","padding","paddingTop","paddingY","paddingBottom","paddingRight","paddingX","paddingLeft","margin","marginBottom","marginY","marginTop","marginRight","marginX","marginLeft","height","minHeight","maxHeight","width","minWidth","maxWidth","gap","rowGap","columnGap","top","right","bottom","left","backgroundColor","backgroundImage","backgroundSize","backgroundPosition","backgroundOrigin","backgroundRepeat","lineHeight","border","borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius","borderStyle","cursor","borderTopStyle","borderBottomStyle","borderLeftStyle","borderRightStyle","touchAction","userSelect","pointerEvents","opacity","visibility","isReactNative","boxShadow","transform","transformOrigin","clipPath","shouldAddBreakpoint","cssProps","firstDefinedValue","values","find","cssValue","getAllMediaQueries","breakpoints","base","breakpointsWithoutBase","_objectWithoutProperties","_excluded","fromEntries","entries","_ref","_ref2","_slicedToArray","breakpointKey","breakpointValue","cssPropsForCurrentBreakpoint","mediaQuery","getMediaQuery","min","getBaseBoxStyles"],"mappings":";;;;;;;;;;;;;;;;uBAoBA,IAAMA,cAAc,CAAG,SAAjBA,cAAcA,CAAIC,KAAa,CAA6C,CAChF,OAAO,OAAOA,KAAK,GAAK,QAAQ,EAAIA,KAAK,CAACC,UAAU,CAAC,UAAU,CAAC,CAClE,CAAC,CAEK,IAAAC,eAAe,CAAG,SAAlBA,eAAeA,CACnBC,YAEa,CACbC,KAAY,CACZC,UAA8B,CACP,CACvB,GAAIC,OAAO,CAACH,YAAY,CAAC,CAAE,CACzB,OAAOI,SAAS,CAClB,CAEA,IAAMC,sBAAsB,CAAGC,kBAAkB,CAC/CN,YAAY,CACZE,UACF,CAAC,CAED,GAAIC,OAAO,CAACE,sBAAsB,CAAC,CAAE,CACnC,OAAOD,SAAS,CAClB,CAEA,GAAIC,sBAAsB,GAAK,MAAM,CAAE,CACrC,OAAOA,sBAAsB,CAC/B,CAEA,GAAIE,KAAK,CAACC,OAAO,CAACH,sBAAsB,CAAC,CAAE,CACzC,OAAOA,sBAAsB,CAACI,GAAG,CAAC,SAACZ,KAAK,CAAA,CAAA,OAAKE,eAAe,CAACF,KAAK,CAAEI,KAAK,CAAC,CAAA,CAAA,CAAC,CAACS,IAAI,CAAC,GAAG,CAAC,CACvF,CAEA,GAAId,cAAc,CAACS,sBAAsB,CAAC,CAAE,CAC1C,IAAMM,kBAAkB,CAAGC,KAAK,CAACX,KAAK,CAAEI,sBAAsB,CAAC,CAC/D,OAAOF,OAAO,CAACQ,kBAAkB,CAAC,CAAGE,SAAS,CAACF,kBAAmB,CAAC,CA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,CAACrJ,GAAG,CAAC,SAAA0J,IAAA,CAAsC,CAAA,IAAAC,KAAA,CAAAC,cAAA,CAAAF,IAAA,CAAA,CAAA,CAAA,CAApCG,aAAa,CAAAF,KAAA,CAAA,CAAA,CAAA,CAAEG,eAAe,CAAAH,KAAA,CAAA,CAAA,CAAA,CACzE,IAAMI,4BAA4B,CAAG5I,WAAW,CAACC,KAAK,CAAEyI,aAAkC,CAAC,CAC3F,GAAI,CAACjB,mBAAmB,CAACmB,4BAA4B,CAAC,CAAE,CACtD,OAAO,EAAE,CACX,CAEA,IAAMC,UAAU,CAAI,CAAA,OAAA,EAASC,aAAa,CAAC,CAAEC,GAAG,CAAEJ,eAAgB,CAAC,CAAE,CAAC,CAAA,CACtE,OAAO,CAACE,UAAU,CAAED,4BAA4B,CAAC,CACnD,CAAC,CACH,CAAC,CACH,EAEM,IAAAI,gBAAgB,CAAG,SAAnBA,gBAAgBA,CAAI/I,KAAsC,CAAgB,CAC9E,OAAA2B,MAAA,CAAAC,MAAA,CACK7B,EAAAA,CAAAA,WAAW,CAACC,KAAK,CAAC,CAClB8H,kBAAkB,CAAC9H,KAAK,CAAC,CAEhC,CAAA;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"propsTypes.js","sources":["../../../../../../../src/components/Box/BaseBox/types/propsTypes.ts"],"sourcesContent":["import type { View } from 'react-native';\nimport type { CSSObject } from 'styled-components';\nimport type { MarginProps, PaddingProps, SpacingValueType } from './spacingTypes';\nimport type { MakeObjectResponsive } from './responsiveTypes';\nimport type { Theme } from '~components/BladeProvider';\nimport type { Border, Elevation } from '~tokens/global';\nimport type { PickCSSByPlatform, TestID } from '~utils/types';\nimport type { Platform } from '~utils';\nimport type { BladeCommonEvents } from '~components/types';\nimport type { DotNotationToken } from '~utils/lodashButBetter/get';\n\ntype LayoutProps = MakeObjectResponsive<\n {\n height: SpacingValueType;\n minHeight: SpacingValueType;\n maxHeight: SpacingValueType;\n width: SpacingValueType;\n minWidth: SpacingValueType;\n maxWidth: SpacingValueType;\n } & PickCSSByPlatform<\n 'display' | 'overflow' | 'overflowX' | 'overflowY' | 'textAlign' | 'whiteSpace'\n >\n>;\n\ntype FlexboxProps = MakeObjectResponsive<\n {\n /**\n * This uses the native gap property which might not work on older browsers.\n * If you want to support older browsers, you might want to use `margin` instead.\n *\n * @see https://caniuse.com/?search=gap\n */\n gap: SpacingValueType;\n /**\n * This uses the native row-gap property which might not work on older browsers.\n * If you want to support older browsers, you might want to use `margin` instead.\n *\n * @see https://caniuse.com/?search=row-gap\n */\n rowGap: SpacingValueType;\n /**\n * This uses the native column-gap property which might not work on older browsers.\n * If you want to support older browsers, you might want to use `margin` instead.\n *\n * @see https://caniuse.com/?search=column-gap\n */\n columnGap: SpacingValueType;\n /**\n * The **`flex`** CSS shorthand property sets how a flex _item_ will grow or shrink to fit the space available in its flex container.\n *\n * @see https://developer.mozilla.org/docs/Web/CSS/flex\n */\n flex: string | number;\n } & PickCSSByPlatform<\n | 'flexWrap'\n | 'flexDirection'\n | 'flexGrow'\n | 'flexShrink'\n | 'flexBasis'\n | 'alignItems'\n | 'alignContent'\n | 'alignSelf'\n | 'justifyItems'\n | 'justifyContent'\n | 'justifySelf'\n | 'placeSelf'\n | 'placeItems'\n | 'order'\n >\n>;\n\ntype PositionProps = MakeObjectResponsive<\n {\n top: SpacingValueType;\n right: SpacingValueType;\n bottom: SpacingValueType;\n left: SpacingValueType;\n } & PickCSSByPlatform<'position' | 'zIndex'>\n>;\n\ntype GridProps = MakeObjectResponsive<\n PickCSSByPlatform<\n | 'grid'\n | 'gridColumn'\n | 'gridRow'\n | 'gridRowStart'\n | 'gridRowEnd'\n | 'gridColumnStart'\n | 'gridColumnEnd'\n | 'gridArea'\n | 'gridAutoFlow'\n | 'gridAutoRows'\n | 'gridAutoColumns'\n | 'gridTemplate'\n | 'gridTemplateAreas'\n | 'gridTemplateColumns'\n | 'gridTemplateRows'\n >\n>;\n\ntype ColorObjects = 'feedback' | 'surface' | 'interactive';\ntype BackgroundOnlyColorObjects = 'popup' | 'overlay';\ntype BackgroundColorString<\n T extends ColorObjects | BackgroundOnlyColorObjects\n> = `${T}.background.${DotNotationToken<Theme['colors'][T]['background']>}`;\ntype BorderColorString<T extends ColorObjects> = `${T}.border.${DotNotationToken<\n Theme['colors'][T]['border']\n>}`;\n\n// Created this as an array so I can reuse it for runtime validation\nconst validBoxAsValues = [\n 'div',\n 'section',\n 'footer',\n 'header',\n 'main',\n 'aside',\n 'nav',\n 'span',\n 'label',\n] as const;\n\ntype BoxAsType = typeof validBoxAsValues[number];\n\n// Visual props that are common for both Box and BaseBox\ntype CommonBoxVisualProps = MakeObjectResponsive<\n {\n borderRadius: keyof Border['radius'];\n borderWidth: keyof Border['width'];\n borderColor: BorderColorString<'surface'>;\n borderTopWidth: keyof Border['width'];\n borderTopColor: BorderColorString<'surface'>;\n borderRightWidth: keyof Border['width'];\n borderRightColor: BorderColorString<'surface'>;\n borderBottomWidth: keyof Border['width'];\n borderBottomColor: BorderColorString<'surface'>;\n borderLeftWidth: keyof Border['width'];\n borderLeftColor: BorderColorString<'surface'>;\n borderTopLeftRadius: keyof Border['radius'];\n borderTopRightRadius: keyof Border['radius'];\n borderBottomRightRadius: keyof Border['radius'];\n borderBottomLeftRadius: keyof Border['radius'];\n } & PickCSSByPlatform<\n | 'backgroundImage'\n | 'backgroundSize'\n | 'backgroundPosition'\n | 'backgroundOrigin'\n | 'backgroundRepeat'\n | 'pointerEvents'\n | 'opacity'\n | 'visibility'\n | 'transform'\n | 'transformOrigin'\n | 'clipPath'\n > & {\n /**\n * Sets the elevation for Box\n *\n * eg: `theme.elevation.midRaised`\n *\n * @default `theme.elevation.lowRaised`\n *\n * **Links:**\n * - Docs: https://blade.razorpay.com/?path=/docs/tokens-elevation--page\n */\n elevation?: keyof Elevation;\n }\n>;\n\n// Visual props that are specific BaseBox\n// This is used to ensure some of the more flexible BaseBox props are not passed to Box\ntype BaseBoxVisualProps = MakeObjectResponsive<\n {\n backgroundColor:\n | BackgroundColorString<'feedback'>\n | BackgroundColorString<'surface'>\n | BackgroundColorString<'interactive'>\n | BackgroundColorString<'overlay'>\n | BackgroundColorString<'popup'>\n | 'transparent'\n | (string & Record<never, never>);\n lineHeight: SpacingValueType;\n touchAction: CSSObject['touchAction'];\n userSelect: CSSObject['userSelect'];\n } & PickCSSByPlatform<\n | 'border'\n | 'borderLeft'\n | 'borderRight'\n | 'borderTop'\n | 'borderBottom'\n | 'opacity'\n | 'pointerEvents'\n >\n>;\n\n// Visual props that are specific to Box\ntype BoxVisualProps = MakeObjectResponsive<{\n backgroundColor: BackgroundColorString<'surface'> | 'transparent';\n}> & {\n // Intentionally keeping this outside of MakeObjectResponsive since we only want as to be string and not responsive object\n // styled-components do not support passing `as` prop as an object\n as: BoxAsType;\n};\n\ntype StyledPropsBlade = Partial<\n Omit<\n MarginProps &\n Pick<FlexboxProps, 'alignSelf' | 'justifySelf' | 'placeSelf' | 'order'> &\n PositionProps &\n Pick<\n GridProps,\n | 'gridColumn'\n | 'gridRow'\n | 'gridRowStart'\n | 'gridRowEnd'\n | 'gridColumnStart'\n | 'gridColumnEnd'\n | 'gridArea'\n > &\n Pick<LayoutProps, 'display'>,\n '__brand__'\n >\n>;\n\ntype BoxCallbackProps = Omit<\n Platform.Select<{\n web: {\n /**\n * **Warning**\n *\n * Make sure to not use Box when you want to create a trigger that performs action on hover.\n * You would probably want to render it as `button` using `styled.button` instead.\n *\n * Use this for hoverable containers in cases like custom menus.\n */\n onMouseOver: React.MouseEventHandler<HTMLElement>;\n /**\n * **Warning**\n *\n * Make sure to not use Box when you want to create a trigger that performs action on hover.\n * You would probably want to render it as `button` using `styled.button` instead.\n *\n * Use this for hoverable containers in cases like custom menus.\n */\n onMouseEnter: React.MouseEventHandler<HTMLElement>;\n /**\n * **Warning**\n *\n * Make sure to not use Box when you want to create a trigger that performs action on hover.\n * You would probably want to render it as `button` using `styled.button` instead.\n *\n * Use this for hoverable containers in cases like custom menus.\n */\n onMouseLeave: React.MouseEventHandler<HTMLElement>;\n onScroll: React.UIEventHandler<HTMLElement>;\n };\n native: Record<'onMouseOver' | 'onMouseEnter' | 'onMouseLeave' | 'onScroll', undefined>;\n }>,\n '__brand__'\n>;\n\ntype BoxDragAndDropProps = Omit<\n Platform.Select<{\n web: {\n draggable: boolean;\n onDragStart: React.DragEventHandler<HTMLElement>;\n onDragEnter: React.DragEventHandler<HTMLElement>;\n onDragLeave: React.DragEventHandler<HTMLElement>;\n onDragOver: React.DragEventHandler<HTMLElement>;\n onDragEnd: React.DragEventHandler<HTMLElement>;\n onDrop: React.DragEventHandler<HTMLElement>;\n };\n native: Record<\n | 'draggable'\n | 'onDragStart'\n | 'onDragEnter'\n | 'onDragLeave'\n | 'onDragOver'\n | 'onDragEnd'\n | 'onDrop',\n undefined\n >;\n }>,\n '__brand__'\n>;\n\ntype BoxProps = Partial<\n PaddingProps &\n MarginProps &\n LayoutProps &\n FlexboxProps &\n PositionProps &\n GridProps &\n BoxCallbackProps &\n BoxDragAndDropProps &\n CommonBoxVisualProps &\n BoxVisualProps & {\n children?: React.ReactNode | React.ReactNode[];\n tabIndex?: number;\n id?: string;\n } & TestID\n>;\n\n// Visual props have different types for BaseBox and Box. BaseBox has more flexible types and more props exposed.\n// So first we Omit Visual props of Box\n// Then we append BaseBoxVisualProps and some other props for styled-components like class and id\ntype BaseBoxProps = Omit<BoxProps, keyof BoxVisualProps> &\n Partial<\n BaseBoxVisualProps & {\n className?: string;\n id?: string;\n tabIndex?: number;\n }\n > &\n BladeCommonEvents;\n\n// ref prop type\ntype BoxRefType = Platform.Select<{\n web: Omit<HTMLElement, 'style'>;\n native: View;\n}>;\n\nexport type { BaseBoxProps, BoxProps, BoxRefType, StyledPropsBlade, FlexboxProps };\nexport { validBoxAsValues };\n"],"names":["validBoxAsValues"],"mappings":"AA8GM,IAAAA,gBAAgB,CAAG,CACvB,KAAK,CACL,SAAS,CACT,QAAQ,CACR,QAAQ,CACR,MAAM,CACN,OAAO,CACP,KAAK,CACL,MAAM,CACN,OAAO;;;;"}
|
|
1
|
+
{"version":3,"file":"propsTypes.js","sources":["../../../../../../../src/components/Box/BaseBox/types/propsTypes.ts"],"sourcesContent":["import type { View } from 'react-native';\nimport type { CSSObject } from 'styled-components';\nimport type { MarginProps, PaddingProps, SpacingValueType } from './spacingTypes';\nimport type { MakeObjectResponsive } from './responsiveTypes';\nimport type { Theme } from '~components/BladeProvider';\nimport type { Border, Elevation } from '~tokens/global';\nimport type { PickCSSByPlatform, TestID } from '~utils/types';\nimport type { Platform } from '~utils';\nimport type { BladeCommonEvents } from '~components/types';\nimport type { DotNotationToken } from '~utils/lodashButBetter/get';\n\ntype LayoutProps = MakeObjectResponsive<\n {\n height: SpacingValueType;\n minHeight: SpacingValueType;\n maxHeight: SpacingValueType;\n width: SpacingValueType;\n minWidth: SpacingValueType;\n maxWidth: SpacingValueType;\n } & PickCSSByPlatform<\n 'display' | 'overflow' | 'overflowX' | 'overflowY' | 'textAlign' | 'whiteSpace'\n >\n>;\n\ntype FlexboxProps = MakeObjectResponsive<\n {\n /**\n * This uses the native gap property which might not work on older browsers.\n * If you want to support older browsers, you might want to use `margin` instead.\n *\n * @see https://caniuse.com/?search=gap\n */\n gap: SpacingValueType;\n /**\n * This uses the native row-gap property which might not work on older browsers.\n * If you want to support older browsers, you might want to use `margin` instead.\n *\n * @see https://caniuse.com/?search=row-gap\n */\n rowGap: SpacingValueType;\n /**\n * This uses the native column-gap property which might not work on older browsers.\n * If you want to support older browsers, you might want to use `margin` instead.\n *\n * @see https://caniuse.com/?search=column-gap\n */\n columnGap: SpacingValueType;\n /**\n * The **`flex`** CSS shorthand property sets how a flex _item_ will grow or shrink to fit the space available in its flex container.\n *\n * @see https://developer.mozilla.org/docs/Web/CSS/flex\n */\n flex: string | number;\n } & PickCSSByPlatform<\n | 'flexWrap'\n | 'flexDirection'\n | 'flexGrow'\n | 'flexShrink'\n | 'flexBasis'\n | 'alignItems'\n | 'alignContent'\n | 'alignSelf'\n | 'justifyItems'\n | 'justifyContent'\n | 'justifySelf'\n | 'placeSelf'\n | 'placeItems'\n | 'order'\n >\n>;\n\ntype PositionProps = MakeObjectResponsive<\n {\n top: SpacingValueType;\n right: SpacingValueType;\n bottom: SpacingValueType;\n left: SpacingValueType;\n } & PickCSSByPlatform<'position' | 'zIndex'>\n>;\n\ntype GridProps = MakeObjectResponsive<\n PickCSSByPlatform<\n | 'grid'\n | 'gridColumn'\n | 'gridRow'\n | 'gridRowStart'\n | 'gridRowEnd'\n | 'gridColumnStart'\n | 'gridColumnEnd'\n | 'gridArea'\n | 'gridAutoFlow'\n | 'gridAutoRows'\n | 'gridAutoColumns'\n | 'gridTemplate'\n | 'gridTemplateAreas'\n | 'gridTemplateColumns'\n | 'gridTemplateRows'\n >\n>;\n\ntype ColorObjects = 'feedback' | 'surface' | 'interactive';\ntype BackgroundOnlyColorObjects = 'popup' | 'overlay';\ntype BackgroundColorString<\n T extends ColorObjects | BackgroundOnlyColorObjects\n> = `${T}.background.${DotNotationToken<Theme['colors'][T]['background']>}`;\ntype BorderColorString<T extends ColorObjects> = `${T}.border.${DotNotationToken<\n Theme['colors'][T]['border']\n>}`;\n\n// Created this as an array so I can reuse it for runtime validation\nconst validBoxAsValues = [\n 'div',\n 'section',\n 'footer',\n 'header',\n 'main',\n 'aside',\n 'nav',\n 'span',\n 'label',\n] as const;\n\ntype BoxAsType = typeof validBoxAsValues[number];\n\n// Visual props that are common for both Box and BaseBox\ntype CommonBoxVisualProps = MakeObjectResponsive<\n {\n borderRadius: keyof Border['radius'];\n borderWidth: keyof Border['width'];\n borderColor: BorderColorString<'surface'>;\n borderTopWidth: keyof Border['width'];\n borderTopColor: BorderColorString<'surface'>;\n borderRightWidth: keyof Border['width'];\n borderRightColor: BorderColorString<'surface'>;\n borderBottomWidth: keyof Border['width'];\n borderBottomColor: BorderColorString<'surface'>;\n borderLeftWidth: keyof Border['width'];\n borderLeftColor: BorderColorString<'surface'>;\n borderTopLeftRadius: keyof Border['radius'];\n borderTopRightRadius: keyof Border['radius'];\n borderBottomRightRadius: keyof Border['radius'];\n borderBottomLeftRadius: keyof Border['radius'];\n } & PickCSSByPlatform<\n | 'backgroundImage'\n | 'backgroundSize'\n | 'backgroundPosition'\n | 'backgroundOrigin'\n | 'backgroundRepeat'\n | 'pointerEvents'\n | 'opacity'\n | 'visibility'\n | 'transform'\n | 'transformOrigin'\n | 'clipPath'\n > & {\n /**\n * Sets the elevation for Box\n *\n * eg: `theme.elevation.midRaised`\n *\n * @default `theme.elevation.lowRaised`\n *\n * **Links:**\n * - Docs: https://blade.razorpay.com/?path=/docs/tokens-elevation--page\n */\n elevation?: keyof Elevation;\n }\n>;\n\n// Visual props that are specific BaseBox\n// This is used to ensure some of the more flexible BaseBox props are not passed to Box\ntype BaseBoxVisualProps = MakeObjectResponsive<\n {\n backgroundColor:\n | BackgroundColorString<'feedback'>\n | BackgroundColorString<'surface'>\n | BackgroundColorString<'interactive'>\n | BackgroundColorString<'overlay'>\n | BackgroundColorString<'popup'>\n | 'transparent'\n | (string & Record<never, never>);\n lineHeight: SpacingValueType;\n touchAction: CSSObject['touchAction'];\n userSelect: CSSObject['userSelect'];\n } & PickCSSByPlatform<\n | 'border'\n | 'borderLeft'\n | 'borderRight'\n | 'borderTop'\n | 'borderBottom'\n | 'opacity'\n | 'pointerEvents'\n | 'cursor'\n >\n>;\n\n// Visual props that are specific to Box\ntype BoxVisualProps = MakeObjectResponsive<{\n backgroundColor: BackgroundColorString<'surface'> | 'transparent';\n}> & {\n // Intentionally keeping this outside of MakeObjectResponsive since we only want as to be string and not responsive object\n // styled-components do not support passing `as` prop as an object\n as: BoxAsType;\n};\n\ntype StyledPropsBlade = Partial<\n Omit<\n MarginProps &\n Pick<FlexboxProps, 'alignSelf' | 'justifySelf' | 'placeSelf' | 'order'> &\n PositionProps &\n Pick<\n GridProps,\n | 'gridColumn'\n | 'gridRow'\n | 'gridRowStart'\n | 'gridRowEnd'\n | 'gridColumnStart'\n | 'gridColumnEnd'\n | 'gridArea'\n > &\n Pick<LayoutProps, 'display'>,\n '__brand__'\n >\n>;\n\ntype BoxCallbackProps = Omit<\n Platform.Select<{\n web: {\n /**\n * **Warning**\n *\n * Make sure to not use Box when you want to create a trigger that performs action on hover.\n * You would probably want to render it as `button` using `styled.button` instead.\n *\n * Use this for hoverable containers in cases like custom menus.\n */\n onMouseOver: React.MouseEventHandler<HTMLElement>;\n /**\n * **Warning**\n *\n * Make sure to not use Box when you want to create a trigger that performs action on hover.\n * You would probably want to render it as `button` using `styled.button` instead.\n *\n * Use this for hoverable containers in cases like custom menus.\n */\n onMouseEnter: React.MouseEventHandler<HTMLElement>;\n /**\n * **Warning**\n *\n * Make sure to not use Box when you want to create a trigger that performs action on hover.\n * You would probably want to render it as `button` using `styled.button` instead.\n *\n * Use this for hoverable containers in cases like custom menus.\n */\n onMouseLeave: React.MouseEventHandler<HTMLElement>;\n onScroll: React.UIEventHandler<HTMLElement>;\n };\n native: Record<'onMouseOver' | 'onMouseEnter' | 'onMouseLeave' | 'onScroll', undefined>;\n }>,\n '__brand__'\n>;\n\ntype BoxDragAndDropProps = Omit<\n Platform.Select<{\n web: {\n draggable: boolean;\n onDragStart: React.DragEventHandler<HTMLElement>;\n onDragEnter: React.DragEventHandler<HTMLElement>;\n onDragLeave: React.DragEventHandler<HTMLElement>;\n onDragOver: React.DragEventHandler<HTMLElement>;\n onDragEnd: React.DragEventHandler<HTMLElement>;\n onDrop: React.DragEventHandler<HTMLElement>;\n };\n native: Record<\n | 'draggable'\n | 'onDragStart'\n | 'onDragEnter'\n | 'onDragLeave'\n | 'onDragOver'\n | 'onDragEnd'\n | 'onDrop',\n undefined\n >;\n }>,\n '__brand__'\n>;\n\ntype BoxProps = Partial<\n PaddingProps &\n MarginProps &\n LayoutProps &\n FlexboxProps &\n PositionProps &\n GridProps &\n BoxCallbackProps &\n BoxDragAndDropProps &\n CommonBoxVisualProps &\n BoxVisualProps & {\n children?: React.ReactNode | React.ReactNode[];\n tabIndex?: number;\n id?: string;\n } & TestID\n>;\n\n// Visual props have different types for BaseBox and Box. BaseBox has more flexible types and more props exposed.\n// So first we Omit Visual props of Box\n// Then we append BaseBoxVisualProps and some other props for styled-components like class and id\ntype BaseBoxProps = Omit<BoxProps, keyof BoxVisualProps> &\n Partial<\n BaseBoxVisualProps & {\n className?: string;\n id?: string;\n tabIndex?: number;\n }\n > &\n BladeCommonEvents;\n\n// ref prop type\ntype BoxRefType = Platform.Select<{\n web: Omit<HTMLElement, 'style'>;\n native: View;\n}>;\n\nexport type { BaseBoxProps, BoxProps, BoxRefType, StyledPropsBlade, FlexboxProps };\nexport { validBoxAsValues };\n"],"names":["validBoxAsValues"],"mappings":"AA8GM,IAAAA,gBAAgB,CAAG,CACvB,KAAK,CACL,SAAS,CACT,QAAQ,CACR,QAAQ,CACR,MAAM,CACN,OAAO,CACP,KAAK,CACL,MAAM,CACN,OAAO;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AnimatedButtonContent.native.js","sources":["../../../../../../src/components/Button/BaseButton/AnimatedButtonContent.native.tsx"],"sourcesContent":["import Animated, { useAnimatedStyle, withTiming } from 'react-native-reanimated';\nimport React from 'react';\nimport type { TextInput } from 'react-native';\nimport type { AnimatedButtonContentProps } from './types';\nimport getIn from '~utils/lodashButBetter/get';\nimport { useTheme } from '~components/BladeProvider';\n\nconst AnimatedButtonContent: React.ForwardRefRenderFunction<\n TextInput,\n AnimatedButtonContentProps\n> = ({ motionDuration, motionEasing, children, isPressed }) => {\n const { theme } = useTheme();\n const duration = getIn(theme.motion, motionDuration);\n const easing = getIn(theme.motion, motionEasing);\n\n const animatedStyles = useAnimatedStyle(() => {\n return {\n transform: [\n {\n scale: withTiming(isPressed ? 0.95 : 1, {\n duration,\n easing,\n }),\n },\n ],\n };\n }, [isPressed]);\n\n return <Animated.View style={animatedStyles}>{children}</Animated.View>;\n};\n\nexport default AnimatedButtonContent;\n"],"names":["AnimatedButtonContent","_ref","motionDuration","motionEasing","children","isPressed","_useTheme","useTheme","theme","duration","getIn","motion","easing","animatedStyles","useAnimatedStyle","transform","scale","withTiming","_jsx","Animated","View","style"],"mappings":";;;;;;;;;;;;AAOM,IAAAA,qBAGL,CAAG,SAHEA,qBAGLA,CAAAC,IAAA,CAA8D,CAAA,IAAxDC,cAAc,CAAAD,IAAA,CAAdC,cAAc,CAAEC,YAAY,CAAAF,IAAA,CAAZE,YAAY,CAAEC,QAAQ,CAAAH,IAAA,CAARG,QAAQ,CAAEC,SAAS,CAAAJ,IAAA,CAATI,SAAS,CACtD,IAAAC,SAAA,CAAkBC,QAAQ,EAAE,CAApBC,KAAK,CAAAF,SAAA,CAALE,KAAK,CACb,IAAMC,QAAQ,CAAGC,KAAK,CAACF,KAAK,CAACG,MAAM,CAAET,cAAc,CAAC,CACpD,IAAMU,MAAM,CAAGF,KAAK,CAACF,KAAK,CAACG,MAAM,CAAER,YAAY,CAAC,CAEhD,IAAMU,cAAc,CAAGC,gBAAgB,CAAC,UAAM,CAC5C,OAAO,CACLC,SAAS,CAAE,CACT,CACEC,KAAK,CAAEC,UAAU,CAACZ,SAAS,CAAG,IAAI,CAAG,CAAC,CAAE,CACtCI,QAAQ,CAARA,QAAQ,CACRG,MAAM,CAANA,MACF,CAAC,CACH,CAAC,CAEL,CAAC,CACH,CAAC,CAAE,CAACP,SAAS,CAAC,CAAC,CAEf,OAAOa,GAAA,CAACC,QAAQ,CAACC,IAAI,EAACC,KAAK,CAAER,cAAe,CAAAT,QAAA,CAAEA,QAAQ,CAAgB,CAAC,CACzE;;;;"}
|
|
1
|
+
{"version":3,"file":"AnimatedButtonContent.native.js","sources":["../../../../../../src/components/Button/BaseButton/AnimatedButtonContent.native.tsx"],"sourcesContent":["import Animated, { useAnimatedStyle, withTiming } from 'react-native-reanimated';\nimport React from 'react';\nimport type { TextInput } from 'react-native';\nimport type { AnimatedButtonContentProps } from './types';\nimport getIn from '~utils/lodashButBetter/get';\nimport { useTheme } from '~components/BladeProvider';\n\nconst AnimatedButtonContent: React.ForwardRefRenderFunction<\n TextInput,\n AnimatedButtonContentProps & { children: React.ReactNode }\n> = ({ motionDuration, motionEasing, children, isPressed }) => {\n const { theme } = useTheme();\n const duration = getIn(theme.motion, motionDuration);\n const easing = getIn(theme.motion, motionEasing);\n\n const animatedStyles = useAnimatedStyle(() => {\n return {\n transform: [\n {\n scale: withTiming(isPressed ? 0.95 : 1, {\n duration,\n easing,\n }),\n },\n ],\n };\n }, [isPressed]);\n\n return <Animated.View style={animatedStyles}>{children}</Animated.View>;\n};\n\nexport default AnimatedButtonContent;\n"],"names":["AnimatedButtonContent","_ref","motionDuration","motionEasing","children","isPressed","_useTheme","useTheme","theme","duration","getIn","motion","easing","animatedStyles","useAnimatedStyle","transform","scale","withTiming","_jsx","Animated","View","style"],"mappings":";;;;;;;;;;;;AAOM,IAAAA,qBAGL,CAAG,SAHEA,qBAGLA,CAAAC,IAAA,CAA8D,CAAA,IAAxDC,cAAc,CAAAD,IAAA,CAAdC,cAAc,CAAEC,YAAY,CAAAF,IAAA,CAAZE,YAAY,CAAEC,QAAQ,CAAAH,IAAA,CAARG,QAAQ,CAAEC,SAAS,CAAAJ,IAAA,CAATI,SAAS,CACtD,IAAAC,SAAA,CAAkBC,QAAQ,EAAE,CAApBC,KAAK,CAAAF,SAAA,CAALE,KAAK,CACb,IAAMC,QAAQ,CAAGC,KAAK,CAACF,KAAK,CAACG,MAAM,CAAET,cAAc,CAAC,CACpD,IAAMU,MAAM,CAAGF,KAAK,CAACF,KAAK,CAACG,MAAM,CAAER,YAAY,CAAC,CAEhD,IAAMU,cAAc,CAAGC,gBAAgB,CAAC,UAAM,CAC5C,OAAO,CACLC,SAAS,CAAE,CACT,CACEC,KAAK,CAAEC,UAAU,CAACZ,SAAS,CAAG,IAAI,CAAG,CAAC,CAAE,CACtCI,QAAQ,CAARA,QAAQ,CACRG,MAAM,CAANA,MACF,CAAC,CACH,CAAC,CAEL,CAAC,CACH,CAAC,CAAE,CAACP,SAAS,CAAC,CAAC,CAEf,OAAOa,GAAA,CAACC,QAAQ,CAACC,IAAI,EAACC,KAAK,CAAER,cAAe,CAAAT,QAAA,CAAEA,QAAQ,CAAgB,CAAC,CACzE;;;;"}
|