@razorpay/blade 11.11.0 → 11.11.1
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/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/OTPInput/OTPInput.js +1 -1
- package/build/lib/native/components/Input/OTPInput/OTPInput.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/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 +2 -2
- 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 +2 -2
- package/build/lib/web/development/components/Input/BaseInput/BaseInput.js +2 -2
- package/build/lib/web/development/components/Input/BaseInput/BaseInputVisuals.js +2 -2
- package/build/lib/web/development/components/Input/BaseInput/BaseInputWrapper.js +2 -2
- package/build/lib/web/development/components/Input/BaseInput/StyledBaseInput.web.js +2 -2
- package/build/lib/web/development/components/Input/BaseInput/baseInputStyles.js +2 -2
- 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 +2 -2
- package/build/lib/web/development/components/Input/TextInput/TextInput.js +2 -2
- 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/Tag.js +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- package/build/lib/web/production/components/Input/BaseInput/BaseInput.js +2 -2
- package/build/lib/web/production/components/Input/BaseInput/BaseInputVisuals.js +2 -2
- package/build/lib/web/production/components/Input/BaseInput/BaseInputWrapper.js +2 -2
- package/build/lib/web/production/components/Input/BaseInput/StyledBaseInput.web.js +2 -2
- package/build/lib/web/production/components/Input/BaseInput/baseInputStyles.js +2 -2
- 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 +2 -2
- package/build/lib/web/production/components/Input/TextInput/TextInput.js +2 -2
- 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/Tag.js +2 -2
- 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 +2 -2
- 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 +1 -1
- package/build/types/components/index.native.d.ts +2 -2
- 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,CAAJ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CAAExB,6BAA8B,CACnDyB,mBAAmB,CAAEjB,8BAA+B,CACpDkB,UAAU,CAAElC,oBAAqB,CACjCT,GAAG,CAAEA,GAAW,CAChB4C,mBAAmB,CAAE,SAAAA,mBAAAA,CAACC,MAAM,CAAEC,MAAM,CAAK,CACvCtC,gBAAgB,CAACsC,MAAM,CAAC,CAC1B,CAAE,CAAA,CACEC,cAAc,CAAC,CACjBC,IAAI,CAAE9C,yBAAyB,CAC/B+C,eAAe,CAAE/C,yBAAyB,GAAK,SAAS,CAAGC,iBAAiB,CAAGqB,SACjF,CAAC,CAAC,CACH,CAAC,CAEN,CACF,CAAC,CAEK,IAAA0B,aAAa,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,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AA,CAEvCgE,oBAAoB,CACb,CACX,CACA3B,eAAe,EACdpC,GAAA,CAACiE,OAAO,CAAA,CAENW,iBAAiB,CAAEpG,gBAAiB,CACpCqG,iBAAiB,CAAE9F,IAAI,GAAK,MAAM,CAAG,MAAM,CAAG,SAAU,CACxD+F,iBAAiB,CAAC,OAAO,CACzBL,QAAQ,CAAC,UAAU,CACnBM,KAAK,CAAC,MAAM,CACZC,GAAG,CAAC,KAAK,CACV,CACF,EACM,CAAC,CAAA,CACH,CAAC,CAEd,CAAC,CAEK,IAAAV,MAAM,CAAGW,wBAAwB,CAACrD,OAAO,CAAE,CAC/CsD,WAAW,CAAE,QAAQ,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,CAA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A,CACP2E,UAAU,CAAC,WAAW,CACtBzE,UAAU,CAAElB,MAAO,CACnBiB,QAAQ,CAAE+D,gBAAiB,CAC3B3F,KAAK,CAAEE,gBAAiB,CACxB+B,EAAE,CAAEnB,aAAa,CAAGoB,SAAS,CAAG,MAAO,CACvCE,OAAO,CAAExB,aAAa,CAAGwB,OAAO,CAAC,CAAC,CAAC,CAAG,CAAE,CAAAX,QAAA,CAEvCiE,oBAAoB,CACb,CACX,CACA3B,eAAe,EACdrC,GAAA,CAACkE,OAAO,EAENW,iBAAiB,CAAErG,gBAAiB,CACpCsG,iBAAiB,CAAE/F,IAAI,GAAK,MAAM,CAAG,MAAM,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,QA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aAAc,CAAA1H,QAAA,CAC7CiG,GAAA,CAACqC,kBAAkB,CAACF,QAAQ,CAAA,CAACC,KAAK,CAAEjB,YAAa,CAAApH,QAAA,CAC/CiG,GAAA,CAACsC,iBAAiB,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;;;;"}
|
|
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,CAA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CAAC+D,WAC5B,CAAC;;;;"}
|
|
@@ -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;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StyledBaseButton.native.js","sources":["../../../../../../src/components/Button/BaseButton/StyledBaseButton.native.tsx"],"sourcesContent":["import { Linking, Pressable } from 'react-native';\nimport Animated, { useAnimatedStyle, useSharedValue, withTiming } from 'react-native-reanimated';\nimport styled from 'styled-components/native';\nimport React from 'react';\nimport type { TextInput, GestureResponderEvent } from 'react-native';\nimport getStyledBaseButtonStyles from './getStyledBaseButtonStyles';\nimport type { StyledBaseButtonProps } from './types';\nimport getIn from '~utils/lodashButBetter/get';\nimport { useStyledProps } from '~components/Box/styledProps';\nimport { useTheme } from '~components/BladeProvider';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { logger } from '~utils/logger';\nimport { castNativeType } from '~utils';\n\nconst StyledPressable = styled(Animated.createAnimatedComponent(Pressable))<\n Omit<StyledBaseButtonProps, 'accessibilityProps'>\n>((props) => {\n const styledPropsCSSObject = useStyledProps(props);\n\n return {\n ...getStyledBaseButtonStyles(props),\n alignSelf: 'center',\n display: 'flex',\n flexDirection: 'row',\n ...styledPropsCSSObject,\n };\n});\n\nconst openURL = async (href: string): Promise<void> => {\n try {\n const canOpen = await Linking.canOpenURL(href);\n if (canOpen) {\n await Linking.openURL(href);\n }\n } catch {\n if (__DEV__) {\n logger({\n type: 'warn',\n message: `Could not open the link \"href=${href}\"`,\n moduleName: 'BaseButton',\n });\n }\n }\n};\n\nconst _StyledBaseButton: React.ForwardRefRenderFunction<TextInput, StyledBaseButtonProps> = (\n {\n onClick,\n href,\n onBlur,\n onKeyDown,\n children,\n variant,\n minHeight,\n buttonPaddingTop,\n buttonPaddingBottom,\n buttonPaddingLeft,\n buttonPaddingRight,\n isFullWidth,\n disabled,\n defaultBackgroundColor,\n defaultBorderColor,\n hoverBackgroundColor,\n focusBackgroundColor,\n focusRingColor,\n hoverBorderColor,\n focusBorderColor,\n borderWidth,\n borderRadius,\n motionDuration,\n motionEasing,\n isLoading,\n accessibilityProps,\n testID,\n onTouchStart,\n onTouchEnd,\n onPointerEnter,\n onPointerDown,\n onFocus,\n ...styledProps\n },\n ref,\n) => {\n const { theme } = useTheme();\n const isPressed = useSharedValue(false);\n const duration = getIn(theme.motion, motionDuration);\n const easing = getIn(theme.motion, motionEasing);\n\n const animatedStyles = useAnimatedStyle(() => {\n return {\n backgroundColor: withTiming(isPressed.value ? focusBackgroundColor : defaultBackgroundColor, {\n duration,\n easing,\n }),\n ...(variant !== 'tertiary' && {\n borderColor: withTiming(isPressed.value ? focusBorderColor : defaultBorderColor, {\n duration,\n easing,\n }),\n }),\n };\n });\n\n const handleOnPress = (event: GestureResponderEvent): void => {\n if (href) {\n void openURL(href);\n }\n\n if (onClick) {\n onClick(event);\n }\n };\n\n return (\n <StyledPressable\n {...styledProps}\n {...accessibilityProps}\n ref={ref}\n role=\"button\"\n onTouchStart={castNativeType(onTouchStart)}\n onTouchEnd={castNativeType(onTouchEnd)}\n onPointerEnter={castNativeType(onPointerEnter)}\n onPointerDown={castNativeType(onPointerDown)}\n onFocus={castNativeType(onFocus)}\n isLoading={isLoading}\n onPress={handleOnPress}\n style={animatedStyles}\n minHeight={minHeight}\n buttonPaddingTop={buttonPaddingTop}\n buttonPaddingBottom={buttonPaddingBottom}\n buttonPaddingLeft={buttonPaddingLeft}\n buttonPaddingRight={buttonPaddingRight}\n isFullWidth={isFullWidth}\n disabled={disabled}\n defaultBackgroundColor={defaultBackgroundColor}\n defaultBorderColor={defaultBorderColor}\n hoverBackgroundColor={hoverBackgroundColor}\n focusBackgroundColor={focusBackgroundColor}\n focusRingColor={focusRingColor}\n hoverBorderColor={hoverBorderColor}\n focusBorderColor={focusBorderColor}\n borderWidth={borderWidth}\n borderRadius={borderRadius}\n motionDuration={motionDuration}\n motionEasing={motionEasing}\n testID={testID}\n >\n {({ pressed }): React.ReactNode => {\n isPressed.value = pressed;\n return children;\n }}\n </StyledPressable>\n );\n};\n\nconst StyledBaseButton = assignWithoutSideEffects(React.forwardRef(_StyledBaseButton), {\n displayName: 'StyledBaseButton',\n});\n\nexport default StyledBaseButton;\n"],"names":["StyledPressable","styled","Animated","createAnimatedComponent","Pressable","props","styledPropsCSSObject","useStyledProps","Object","assign","getStyledBaseButtonStyles","alignSelf","display","flexDirection","openURL","_ref","_asyncToGenerator","href","canOpen","Linking","canOpenURL","_unused","__DEV__","logger","type","message","moduleName","_x","apply","arguments","_StyledBaseButton","_ref2","ref","onClick","onBlur","onKeyDown","children","variant","minHeight","buttonPaddingTop","buttonPaddingBottom","buttonPaddingLeft","buttonPaddingRight","isFullWidth","disabled","defaultBackgroundColor","defaultBorderColor","hoverBackgroundColor","focusBackgroundColor","focusRingColor","hoverBorderColor","focusBorderColor","borderWidth","borderRadius","motionDuration","motionEasing","isLoading","accessibilityProps","testID","onTouchStart","onTouchEnd","onPointerEnter","onPointerDown","onFocus","styledProps","_objectWithoutProperties","_excluded","_useTheme","useTheme","theme","isPressed","useSharedValue","duration","getIn","motion","easing","animatedStyles","useAnimatedStyle","backgroundColor","withTiming","value","borderColor","handleOnPress","event","_jsx","role","castNativeType","onPress","style","_ref3","pressed","StyledBaseButton","assignWithoutSideEffects","React","forwardRef","displayName"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,IAAA,SAAA,CAAA,CAAA,SAAA,CAAA,MAAA,CAAA,QAAA,CAAA,WAAA,CAAA,UAAA,CAAA,SAAA,CAAA,WAAA,CAAA,kBAAA,CAAA,qBAAA,CAAA,mBAAA,CAAA,oBAAA,CAAA,aAAA,CAAA,UAAA,CAAA,wBAAA,CAAA,oBAAA,CAAA,sBAAA,CAAA,sBAAA,CAAA,gBAAA,CAAA,kBAAA,CAAA,kBAAA,CAAA,aAAA,CAAA,cAAA,CAAA,gBAAA,CAAA,cAAA,CAAA,WAAA,CAAA,oBAAA,CAAA,QAAA,CAAA,cAAA,CAAA,YAAA,CAAA,gBAAA,CAAA,eAAA,CAAA,SAAA,CAAA,CAcA,IAAMA,eAAe,CAAGC,MAAM,CAACC,QAAQ,CAACC,uBAAuB,CAACC,SAAS,CAAC,CAAC,CAEzE,SAACC,KAAK,CAAK,CACX,IAAMC,oBAAoB,CAAGC,cAAc,CAACF,KAAK,CAAC,CAElD,OAAAG,MAAA,CAAAC,MAAA,CAAA,EAAA,CACKC,mBAAyB,CAACL,KAAK,CAAC,CAAA,CACnCM,SAAS,CAAE,QAAQ,CACnBC,OAAO,CAAE,MAAM,CACfC,aAAa,CAAE,KAAK,CAAA,CACjBP,oBAAoB,CAE3B,CAAA,CAAC,CAAC,CAEF,IAAMQ,OAAO,CAAA,UAAA,CAAA,IAAAC,IAAA,CAAAC,iBAAA,CA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CAAEA,kBAAmB,CACvCC,oBAAoB,CAAEA,oBAAqB,CAC3CC,oBAAoB,CAAEA,oBAAqB,CAC3CC,cAAc,CAAEA,cAAe,CAC/BC,gBAAgB,CAAEA,gBAAiB,CACnCC,gBAAgB,CAAEA,gBAAiB,CACnCC,WAAW,CAAEA,WAAY,CACzBC,YAAY,CAAEA,YAAa,CAC3BC,cAAc,CAAEA,cAAe,CAC/BC,YAAY,CAAEA,YAAa,CAC3BG,MAAM,CAAEA,MAAO,CAAAtB,QAAA,CAEd,SAAAA,SAAAqD,KAAA,CAAkC,KAA/BC,OAAO,CAAAD,KAAA,CAAPC,OAAO,CACTpB,SAAS,CAACU,KAAK,CAAGU,OAAO,CACzB,OAAOtD,SAAQ,CACjB,CAAC,CACc,CAAA,CAAC,CAEtB,CAAC,CAEK,IAAAuD,gBAAgB,CAAGC,wBAAwB,CAACC,cAAK,CAACC,UAAU,CAAChE,iBAAiB,CAAC,CAAE,CACrFiE,WAAW,CAAE,kBACf,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"StyledBaseButton.native.js","sources":["../../../../../../src/components/Button/BaseButton/StyledBaseButton.native.tsx"],"sourcesContent":["import { Linking, Pressable } from 'react-native';\nimport Animated, { useAnimatedStyle, useSharedValue, withTiming } from 'react-native-reanimated';\nimport styled from 'styled-components/native';\nimport React from 'react';\nimport type { TextInput, GestureResponderEvent } from 'react-native';\nimport getStyledBaseButtonStyles from './getStyledBaseButtonStyles';\nimport type { StyledBaseButtonProps } from './types';\nimport getIn from '~utils/lodashButBetter/get';\nimport { useStyledProps } from '~components/Box/styledProps';\nimport { useTheme } from '~components/BladeProvider';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { logger } from '~utils/logger';\nimport { castNativeType } from '~utils';\n\nconst StyledPressable = styled(Animated.createAnimatedComponent(Pressable))<\n Omit<StyledBaseButtonProps, 'accessibilityProps'>\n>((props) => {\n const styledPropsCSSObject = useStyledProps(props);\n\n return {\n ...getStyledBaseButtonStyles(props),\n alignSelf: 'center',\n display: 'flex',\n flexDirection: 'row',\n ...styledPropsCSSObject,\n };\n});\n\nconst openURL = async (href: string): Promise<void> => {\n try {\n const canOpen = await Linking.canOpenURL(href);\n if (canOpen) {\n await Linking.openURL(href);\n }\n } catch {\n if (__DEV__) {\n logger({\n type: 'warn',\n message: `Could not open the link \"href=${href}\"`,\n moduleName: 'BaseButton',\n });\n }\n }\n};\n\nconst _StyledBaseButton: React.ForwardRefRenderFunction<TextInput, StyledBaseButtonProps> = (\n {\n onClick,\n href,\n onBlur,\n onKeyDown,\n children,\n variant,\n minHeight,\n buttonPaddingTop,\n buttonPaddingBottom,\n buttonPaddingLeft,\n buttonPaddingRight,\n isFullWidth,\n disabled,\n defaultBackgroundColor,\n defaultBorderColor,\n hoverBackgroundColor,\n focusBackgroundColor,\n focusRingColor,\n hoverBorderColor,\n focusBorderColor,\n borderWidth,\n borderRadius,\n motionDuration,\n motionEasing,\n isLoading,\n accessibilityProps,\n testID,\n onTouchStart,\n onTouchEnd,\n onPointerEnter,\n onPointerDown,\n onFocus,\n ...styledProps\n },\n ref,\n) => {\n const { theme } = useTheme();\n const isPressed = useSharedValue(false);\n const duration = getIn(theme.motion, motionDuration);\n const easing = getIn(theme.motion, motionEasing);\n\n const animatedStyles = useAnimatedStyle(() => {\n return {\n backgroundColor: withTiming(isPressed.value ? focusBackgroundColor : defaultBackgroundColor, {\n duration,\n easing,\n }),\n ...(variant !== 'tertiary' && {\n borderColor: withTiming(isPressed.value ? focusBorderColor : defaultBorderColor, {\n duration,\n easing,\n }),\n }),\n };\n });\n\n const handleOnPress = (event: GestureResponderEvent): void => {\n if (href) {\n void openURL(href);\n }\n\n if (onClick) {\n onClick(event);\n }\n };\n\n return (\n <StyledPressable\n {...styledProps}\n {...accessibilityProps}\n ref={ref}\n role=\"button\"\n onTouchStart={castNativeType(onTouchStart)}\n onTouchEnd={castNativeType(onTouchEnd)}\n onPointerEnter={castNativeType(onPointerEnter)}\n onPointerDown={castNativeType(onPointerDown)}\n onFocus={castNativeType(onFocus)}\n isLoading={isLoading}\n onPress={handleOnPress}\n style={animatedStyles}\n minHeight={minHeight}\n buttonPaddingTop={buttonPaddingTop}\n buttonPaddingBottom={buttonPaddingBottom}\n buttonPaddingLeft={buttonPaddingLeft}\n buttonPaddingRight={buttonPaddingRight}\n isFullWidth={isFullWidth}\n disabled={disabled}\n defaultBackgroundColor={defaultBackgroundColor}\n defaultBorderColor={defaultBorderColor}\n hoverBackgroundColor={hoverBackgroundColor}\n focusBackgroundColor={focusBackgroundColor}\n focusRingColor={focusRingColor}\n hoverBorderColor={hoverBorderColor}\n focusBorderColor={focusBorderColor}\n borderWidth={borderWidth}\n borderRadius={borderRadius}\n motionDuration={motionDuration}\n motionEasing={motionEasing}\n testID={testID}\n >\n {/* @ts-expect-error */}\n {({ pressed }): React.ReactNode => {\n isPressed.value = pressed;\n return children;\n }}\n </StyledPressable>\n );\n};\n\nconst StyledBaseButton = assignWithoutSideEffects(React.forwardRef(_StyledBaseButton), {\n displayName: 'StyledBaseButton',\n});\n\nexport default StyledBaseButton;\n"],"names":["StyledPressable","styled","Animated","createAnimatedComponent","Pressable","props","styledPropsCSSObject","useStyledProps","Object","assign","getStyledBaseButtonStyles","alignSelf","display","flexDirection","openURL","_ref","_asyncToGenerator","href","canOpen","Linking","canOpenURL","_unused","__DEV__","logger","type","message","moduleName","_x","apply","arguments","_StyledBaseButton","_ref2","ref","onClick","onBlur","onKeyDown","children","variant","minHeight","buttonPaddingTop","buttonPaddingBottom","buttonPaddingLeft","buttonPaddingRight","isFullWidth","disabled","defaultBackgroundColor","defaultBorderColor","hoverBackgroundColor","focusBackgroundColor","focusRingColor","hoverBorderColor","focusBorderColor","borderWidth","borderRadius","motionDuration","motionEasing","isLoading","accessibilityProps","testID","onTouchStart","onTouchEnd","onPointerEnter","onPointerDown","onFocus","styledProps","_objectWithoutProperties","_excluded","_useTheme","useTheme","theme","isPressed","useSharedValue","duration","getIn","motion","easing","animatedStyles","useAnimatedStyle","backgroundColor","withTiming","value","borderColor","handleOnPress","event","_jsx","role","castNativeType","onPress","style","_ref3","pressed","StyledBaseButton","assignWithoutSideEffects","React","forwardRef","displayName"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,IAAA,SAAA,CAAA,CAAA,SAAA,CAAA,MAAA,CAAA,QAAA,CAAA,WAAA,CAAA,UAAA,CAAA,SAAA,CAAA,WAAA,CAAA,kBAAA,CAAA,qBAAA,CAAA,mBAAA,CAAA,oBAAA,CAAA,aAAA,CAAA,UAAA,CAAA,wBAAA,CAAA,oBAAA,CAAA,sBAAA,CAAA,sBAAA,CAAA,gBAAA,CAAA,kBAAA,CAAA,kBAAA,CAAA,aAAA,CAAA,cAAA,CAAA,gBAAA,CAAA,cAAA,CAAA,WAAA,CAAA,oBAAA,CAAA,QAAA,CAAA,cAAA,CAAA,YAAA,CAAA,gBAAA,CAAA,eAAA,CAAA,SAAA,CAAA,CAcA,IAAMA,eAAe,CAAGC,MAAM,CAACC,QAAQ,CAACC,uBAAuB,CAACC,SAAS,CAAC,CAAC,CAEzE,SAACC,KAAK,CAAK,CACX,IAAMC,oBAAoB,CAAGC,cAAc,CAACF,KAAK,CAAC,CAElD,OAAAG,MAAA,CAAAC,MAAA,CAAA,EAAA,CACKC,mBAAyB,CAACL,KAAK,CAAC,CAAA,CACnCM,SAAS,CAAE,QAAQ,CACnBC,OAAO,CAAE,MAAM,CACfC,aAAa,CAAE,KAAK,CAAA,CACjBP,oBAAoB,CAE3B,CAAA,CAAC,CAAC,CAEF,IAAMQ,OAAO,CAAA,UAAA,CAAA,IAAAC,IAAA,CAAAC,iBAAA,CAAG,UAAOC,IAAY,CAAoB,CACrD,GAAI,CACF,IAAMC,OAAO,CAAS,MAAAC,OAAO,CAACC,UAAU,CAACH,IAAI,CAAC,CAC9C,GAAIC,OAAO,CAAE,CACX,MAAMC,OAAO,CAACL,OAAO,CAACG,IAAI,CAAC,CAC7B,CACF,CAAE,MAAAI,OAA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AY,CAAEA,YAAa,CAC3BC,cAAc,CAAEA,cAAe,CAC/BC,YAAY,CAAEA,YAAa,CAC3BG,MAAM,CAAEA,MAAO,CAAAtB,QAAA,CAGd,SAAAA,SAAAqD,KAAA,CAAkC,KAA/BC,OAAO,CAAAD,KAAA,CAAPC,OAAO,CACTpB,SAAS,CAACU,KAAK,CAAGU,OAAO,CACzB,OAAOtD,SAAQ,CACjB,CAAC,CACc,CAAA,CAAC,CAEtB,CAAC,CAEK,IAAAuD,gBAAgB,CAAGC,wBAAwB,CAACC,cAAK,CAACC,UAAU,CAAChE,iBAAiB,CAAC,CAAE,CACrFiE,WAAW,CAAE,kBACf,CAAC;;;;"}
|
|
@@ -16,7 +16,7 @@ import { MetaConstants } from '../../utils/metaAttribute/metaConstants.js';
|
|
|
16
16
|
import { makeAccessible } from '../../utils/makeAccessible/makeAccessible.native.js';
|
|
17
17
|
import { jsx } from 'react/jsx-runtime';
|
|
18
18
|
|
|
19
|
-
var _excluded=["orientation","dividerStyle","variant","thickness","height","width","testID"];var StyledDivider=styled(BaseBox)(function(_ref){var
|
|
19
|
+
var _excluded=["orientation","dividerStyle","variant","thickness","height","width","testID"];var StyledDivider=styled(BaseBox)(function(_ref){var theme=_ref.theme,borderPosition=_ref.borderPosition,dividerStyle=_ref.dividerStyle,thickness=_ref.thickness,isDividerHorizontal=_ref.isDividerHorizontal,width=_ref.width,height=_ref.height;return Object.assign(_defineProperty(_defineProperty({borderWidth:0},`${borderPosition}Style`,dividerStyle),`${borderPosition}Width`,makeBorderSize(theme.border.width[thickness])),isDividerHorizontal?{flexGrow:1,width:width}:{alignSelf:'stretch',height:height});});var Divider=function Divider(_ref2){var _ref2$orientation=_ref2.orientation,orientation=_ref2$orientation===void 0?'horizontal':_ref2$orientation,_ref2$dividerStyle=_ref2.dividerStyle,dividerStyle=_ref2$dividerStyle===void 0?'solid':_ref2$dividerStyle,_ref2$variant=_ref2.variant,variant=_ref2$variant===void 0?'muted':_ref2$variant,_ref2$thickness=_ref2.thickness,thickness=_ref2$thickness===void 0?'thin':_ref2$thickness,height=_ref2.height,width=_ref2.width,testID=_ref2.testID,styledProps=_objectWithoutProperties(_ref2,_excluded);var isDividerHorizontal=orientation==='horizontal';var borderPosition=isDividerHorizontal?'borderBottom':'borderLeft';var borderColor=_defineProperty({},`${borderPosition}Color`,`surface.border.gray.${variant}`);var accessibilityProps=isReactNative()?{}:makeAccessible({role:'separator'});return jsx(StyledDivider,Object.assign({borderPosition:borderPosition,isDividerHorizontal:isDividerHorizontal,dividerStyle:dividerStyle,thickness:thickness,height:height,width:width},borderColor,metaAttribute({name:MetaConstants.Divider,testID:testID}),getStyledProps(styledProps),accessibilityProps));};
|
|
20
20
|
|
|
21
21
|
export { Divider };
|
|
22
22
|
//# sourceMappingURL=Divider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Divider.js","sources":["../../../../../src/components/Divider/Divider.tsx"],"sourcesContent":["import React from 'react';\nimport type { CSSObject } from 'styled-components';\nimport styled from 'styled-components';\nimport BaseBox from '~components/Box/BaseBox';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport { isReactNative, makeBorderSize } from '~utils';\nimport { MetaConstants, metaAttribute } from '~utils/metaAttribute';\nimport type { TestID } from '~utils/types';\nimport { makeAccessible } from '~utils/makeAccessible';\n\ntype DividerProps = {\n /**\n * Sets the orientation of divider\n *\n * @default 'horizontal'\n */\n orientation?: 'horizontal' | 'vertical';\n /**\n * Sets the style of divider\n *\n * @default 'solid'\n */\n dividerStyle?: 'solid' | 'dashed';\n /**\n * Sets the variant of divider\n *\n * @default 'normal'\n */\n variant?: 'normal' | 'subtle' | 'muted';\n /**\n * Sets the thickness of divider\n *\n * @default 'thin'\n */\n thickness?: 'thinner' | 'thin' | 'thick' | 'thicker';\n /**\n * Sets the height of divider. Divider uses Flex by default, use height only when parent is not flex.\n *\n */\n height?: CSSObject['height'];\n /**\n * Sets the width of divider. Divider uses Flex by default, use width only when parent is not flex.\n *\n */\n width?: CSSObject['width'];\n} & TestID &\n StyledPropsBlade;\n\nconst StyledDivider = styled(BaseBox)<{\n borderPosition: 'borderBottom' | 'borderLeft';\n dividerStyle: NonNullable<DividerProps['dividerStyle']>;\n thickness: NonNullable<DividerProps['thickness']>;\n height: DividerProps['height'];\n width: DividerProps['width'];\n isDividerHorizontal: boolean;\n}>(({ theme, borderPosition, dividerStyle, thickness, isDividerHorizontal, width, height }) => ({\n borderWidth: 0,\n [`${borderPosition}Style`]: dividerStyle,\n [`${borderPosition}Width`]: makeBorderSize(theme.border.width[thickness]),\n ...(isDividerHorizontal ? { flexGrow: 1, width } : { alignSelf: 'stretch', height }),\n}));\n\nconst Divider = ({\n orientation = 'horizontal',\n dividerStyle = 'solid',\n variant = 'muted',\n thickness = 'thin',\n height,\n width,\n testID,\n ...styledProps\n}: DividerProps): React.ReactElement => {\n const isDividerHorizontal = orientation === 'horizontal';\n const borderPosition = isDividerHorizontal ? 'borderBottom' : 'borderLeft';\n const borderColor = { [`${borderPosition}Color`]: `surface.border.gray.${variant}` };\n const accessibilityProps = isReactNative()\n ? {}\n : makeAccessible({\n role: 'separator',\n });\n\n return (\n <StyledDivider\n borderPosition={borderPosition}\n isDividerHorizontal={isDividerHorizontal}\n dividerStyle={dividerStyle}\n thickness={thickness}\n height={height}\n width={width}\n {...borderColor}\n {...metaAttribute({ name: MetaConstants.Divider, testID })}\n {...getStyledProps(styledProps)}\n {...accessibilityProps}\n />\n );\n};\n\nexport { Divider };\nexport type { DividerProps };\n"],"names":["StyledDivider","styled","BaseBox","_ref","
|
|
1
|
+
{"version":3,"file":"Divider.js","sources":["../../../../../src/components/Divider/Divider.tsx"],"sourcesContent":["import React from 'react';\nimport type { CSSObject } from 'styled-components';\nimport styled from 'styled-components';\nimport BaseBox from '~components/Box/BaseBox';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport { isReactNative, makeBorderSize } from '~utils';\nimport { MetaConstants, metaAttribute } from '~utils/metaAttribute';\nimport type { TestID } from '~utils/types';\nimport { makeAccessible } from '~utils/makeAccessible';\n\ntype DividerProps = {\n /**\n * Sets the orientation of divider\n *\n * @default 'horizontal'\n */\n orientation?: 'horizontal' | 'vertical';\n /**\n * Sets the style of divider\n *\n * @default 'solid'\n */\n dividerStyle?: 'solid' | 'dashed';\n /**\n * Sets the variant of divider\n *\n * @default 'normal'\n */\n variant?: 'normal' | 'subtle' | 'muted';\n /**\n * Sets the thickness of divider\n *\n * @default 'thin'\n */\n thickness?: 'thinner' | 'thin' | 'thick' | 'thicker';\n /**\n * Sets the height of divider. Divider uses Flex by default, use height only when parent is not flex.\n *\n */\n height?: CSSObject['height'];\n /**\n * Sets the width of divider. Divider uses Flex by default, use width only when parent is not flex.\n *\n */\n width?: CSSObject['width'];\n} & TestID &\n StyledPropsBlade;\n\nconst StyledDivider = styled(BaseBox)<{\n borderPosition: 'borderBottom' | 'borderLeft';\n dividerStyle: NonNullable<DividerProps['dividerStyle']>;\n thickness: NonNullable<DividerProps['thickness']>;\n height: DividerProps['height'];\n width: DividerProps['width'];\n isDividerHorizontal: boolean;\n}>(({ theme, borderPosition, dividerStyle, thickness, isDividerHorizontal, width, height }) => ({\n borderWidth: 0,\n [`${borderPosition}Style`]: dividerStyle,\n [`${borderPosition}Width`]: makeBorderSize(theme.border.width[thickness]),\n ...(isDividerHorizontal ? { flexGrow: 1, width } : { alignSelf: 'stretch', height }),\n}));\n\nconst Divider = ({\n orientation = 'horizontal',\n dividerStyle = 'solid',\n variant = 'muted',\n thickness = 'thin',\n height,\n width,\n testID,\n ...styledProps\n}: DividerProps): React.ReactElement => {\n const isDividerHorizontal = orientation === 'horizontal';\n const borderPosition = isDividerHorizontal ? 'borderBottom' : 'borderLeft';\n const borderColor = { [`${borderPosition}Color`]: `surface.border.gray.${variant}` };\n const accessibilityProps = isReactNative()\n ? {}\n : makeAccessible({\n role: 'separator',\n });\n\n return (\n <StyledDivider\n borderPosition={borderPosition}\n isDividerHorizontal={isDividerHorizontal}\n dividerStyle={dividerStyle}\n thickness={thickness}\n height={height}\n width={width}\n {...borderColor}\n {...metaAttribute({ name: MetaConstants.Divider, testID })}\n {...getStyledProps(styledProps)}\n {...accessibilityProps}\n />\n );\n};\n\nexport { Divider };\nexport type { DividerProps };\n"],"names":["StyledDivider","styled","BaseBox","_ref","theme","borderPosition","dividerStyle","thickness","isDividerHorizontal","width","height","Object","assign","_defineProperty","borderWidth","makeBorderSize","border","flexGrow","alignSelf","Divider","_ref2","_ref2$orientation","orientation","_ref2$dividerStyle","_ref2$variant","variant","_ref2$thickness","testID","styledProps","_objectWithoutProperties","_excluded","borderColor","accessibilityProps","isReactNative","makeAccessible","role","_jsx","metaAttribute","name","MetaConstants","getStyledProps"],"mappings":";;;;;;;;;;;;;;;;;;AAAA,IAAA,SAAA,CAAA,CAAA,aAAA,CAAA,cAAA,CAAA,SAAA,CAAA,WAAA,CAAA,QAAA,CAAA,OAAA,CAAA,QAAA,CAAA,CAiDA,IAAMA,aAAa,CAAGC,MAAM,CAACC,OAAO,CAAC,CAOlC,SAAAC,IAAA,MAAGC,KAAK,CAAAD,IAAA,CAALC,KAAK,CAAEC,cAAc,CAAAF,IAAA,CAAdE,cAAc,CAAEC,YAAY,CAAAH,IAAA,CAAZG,YAAY,CAAEC,SAAS,CAAAJ,IAAA,CAATI,SAAS,CAAEC,mBAAmB,CAAAL,IAAA,CAAnBK,mBAAmB,CAAEC,KAAK,CAAAN,IAAA,CAALM,KAAK,CAAEC,MAAM,CAAAP,IAAA,CAANO,MAAM,CAAAC,OAAAA,MAAA,CAAAC,MAAA,CAAAC,eAAA,CAAAA,eAAA,EACtFC,WAAW,CAAE,CAAC,CAAA,CACZ,GAAET,cAAe,CAAA,KAAA,CAAM,CAAGC,YAAY,CAAA,CACtC,GAAED,cAAe,CAAA,KAAA,CAAM,CAAGU,cAAc,CAACX,KAAK,CAACY,MAAM,CAACP,KAA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,OACEC,GAAA,CAACpC,aAAa,CAAAW,MAAA,CAAAC,MAAA,CACZP,CAAAA,cAAc,CAAEA,cAAe,CAC/BG,mBAAmB,CAAEA,mBAAoB,CACzCF,YAAY,CAAEA,YAAa,CAC3BC,SAAS,CAAEA,SAAU,CACrBG,MAAM,CAAEA,MAAO,CACfD,KAAK,CAAEA,KAAM,EACTsB,WAAW,CACXM,aAAa,CAAC,CAAEC,IAAI,CAAEC,aAAa,CAACpB,OAAO,CAAEQ,MAAM,CAANA,MAAO,CAAC,CAAC,CACtDa,cAAc,CAACZ,WAAW,CAAC,CAC3BI,kBAAkB,CACvB,CAAC,CAEN;;;;"}
|
|
@@ -18,7 +18,7 @@ import { metaAttribute } from '../../../utils/metaAttribute/metaAttribute.native
|
|
|
18
18
|
import { MetaConstants } from '../../../utils/metaAttribute/metaConstants.js';
|
|
19
19
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
20
20
|
|
|
21
|
-
var _excluded=["autoFocus","errorText","helpText","isDisabled","keyboardReturnKeyType","keyboardType","label","accessibilityLabel","labelPosition","name","onChange","onFocus","onBlur","onOTPFilled","otpLength","placeholder","successText","validationState","value","isMasked","autoCompleteSuggestionType","testID","size"];var isReactNative=getPlatformType()==='react-native';var otpToArray=function otpToArray(code){var _code$split;return (_code$split=code==null?void 0:code.split(''))!=null?_code$split:Array(6).fill('');};var _OTPInput=function _OTPInput(_ref,incomingRef){var autoFocus=_ref.autoFocus,errorText=_ref.errorText,helpText=_ref.helpText,isDisabled=_ref.isDisabled,keyboardReturnKeyType=_ref.keyboardReturnKeyType,_ref$keyboardType=_ref.keyboardType,keyboardType=_ref$keyboardType===void 0?'decimal':_ref$keyboardType,label=_ref.label,accessibilityLabel=_ref.accessibilityLabel,labelPosition=_ref.labelPosition,name=_ref.name,onChange=_ref.onChange,_onFocus=_ref.onFocus,_onBlur=_ref.onBlur,onOTPFilled=_ref.onOTPFilled,_ref$otpLength=_ref.otpLength,otpLength=_ref$otpLength===void 0?6:_ref$otpLength,placeholder=_ref.placeholder,successText=_ref.successText,validationState=_ref.validationState,inputValue=_ref.value,isMasked=_ref.isMasked,_ref$autoCompleteSugg=_ref.autoCompleteSuggestionType,autoCompleteSuggestionType=_ref$autoCompleteSugg===void 0?'oneTimeCode':_ref$autoCompleteSugg,testID=_ref.testID,_ref$size=_ref.size,size=_ref$size===void 0?'medium':_ref$size,styledProps=_objectWithoutProperties(_ref,_excluded);var inputRefs=[];var _useState=useState(otpToArray(inputValue)),_useState2=_slicedToArray(_useState,2),otpValue=_useState2[0],setOtpValue=_useState2[1];var _useState3=useState([]),_useState4=_slicedToArray(_useState3,2),inputType=_useState4[0],setInputType=_useState4[1];var isLabelLeftPositioned=labelPosition==='left';var _useFormId=useFormId('otp'),inputId=_useFormId.inputId,helpTextId=_useFormId.helpTextId,errorTextId=_useFormId.errorTextId,successTextId=_useFormId.successTextId;useImperativeHandle(incomingRef,function(){return inputRefs.map(function(ref){return ref.current;});},[inputRefs]);useEffect(function(){if(inputValue&&inputValue.length>=otpLength){onOTPFilled==null?void 0:onOTPFilled({value:inputValue.slice(0,otpLength),name:name});}else if(!inputValue&&otpValue.join('').length>=otpLength){onOTPFilled==null?void 0:onOTPFilled({value:otpValue.slice(0,otpLength).join(''),name:name});}},[otpValue,otpLength,name,inputValue,onOTPFilled]);useEffect(function(){otpValue.forEach(function(otp,index){if(!isEmpty(otp)&&!inputType[index]&&isMasked){var newInputType=Array.from(inputType);newInputType[index]='password';setInputType(newInputType);}if(isEmpty(otp)&&inputType[index]){var _newInputType=Array.from(inputType);_newInputType[index]=undefined;setInputType(_newInputType);}});},[otpValue,inputType,isMasked]);var setOtpValueByIndex=function setOtpValueByIndex(_ref2){var value=_ref2.value,index=_ref2.index;var newOtpValue=Array.from(otpValue);newOtpValue[index]=value;setOtpValue(newOtpValue);return newOtpValue.join('');};var focusOnOtpByIndex=function focusOnOtpByIndex(index){var _inputRefs$index,_inputRefs$index$curr;(_inputRefs$index=inputRefs[index])==null?void 0:(_inputRefs$index$curr=_inputRefs$index.current)==null?void 0:_inputRefs$index$curr.focus();if(!isReactNative){var _inputRefs$index2,_inputRefs$index2$cur;(_inputRefs$index2=inputRefs[index])==null?void 0:(_inputRefs$index2$cur=_inputRefs$index2.current)==null?void 0:_inputRefs$index2$cur.select();}};var handleOnChange=function handleOnChange(_ref3){var value=_ref3.value,currentOtpIndex=_ref3.currentOtpIndex;if(value&&value===' '){return;}if(inputValue&&inputValue.length>0){var newOtpValue=Array.from(inputValue);newOtpValue[currentOtpIndex]=value!=null?value:'';setOtpValue(newOtpValue);onChange==null?void 0:onChange({name:name,value:newOtpValue.join('')});}else if(value&&value.trim().length>1){setOtpValue(Array.from(value));onChange==null?void 0:onChange({name:name,value:value.trim().slice(0,otpLength)});}else if(otpValue[currentOtpIndex]!==(value==null?void 0:value.trim())){var _value$trim;var newValue=setOtpValueByIndex({value:(_value$trim=value==null?void 0:value.trim())!=null?_value$trim:'',index:currentOtpIndex});onChange==null?void 0:onChange({name:name,value:newValue});}};var handleOnInput=function handleOnInput(_ref4){var value=_ref4.value,currentOtpIndex=_ref4.currentOtpIndex;if(value&&value.trim().length===1){focusOnOtpByIndex(++currentOtpIndex);}};var handleOnKeyDown=function handleOnKeyDown(_ref5){var key=_ref5.key,code=_ref5.code,event=_ref5.event,currentOtpIndex=_ref5.currentOtpIndex;if(key==='Backspace'||code==='Backspace'||code==='Delete'||key==='Delete'){event.preventDefault==null?void 0:event.preventDefault();handleOnChange({value:'',currentOtpIndex:currentOtpIndex});focusOnOtpByIndex(--currentOtpIndex);}else if(key==='ArrowLeft'||code==='ArrowLeft'){event.preventDefault==null?void 0:event.preventDefault();focusOnOtpByIndex(--currentOtpIndex);}else if(key==='ArrowRight'||code==='ArrowRight'){event.preventDefault==null?void 0:event.preventDefault();focusOnOtpByIndex(++currentOtpIndex);}else if(key===' '||code==='Space'){event.preventDefault==null?void 0:event.preventDefault();}};var getHiddenInput=function getHiddenInput(){if(!isReactNative){var _ref6;return jsx("input",{hidden:true,id:inputId,name:name,value:(_ref6=inputValue!=null?inputValue:otpValue.join(''))!=null?_ref6:'',readOnly:true});}return null;};var getOTPInputFields=function getOTPInputFields(){var inputs=[];var _loop=function _loop(index){var _otpValue$index,_Array$from$index;var currentValue=inputValue?otpToArray(inputValue)[index]||'':otpValue[index]||'';var ref=React__default.createRef();var currentInputType
|
|
21
|
+
var _excluded=["autoFocus","errorText","helpText","isDisabled","keyboardReturnKeyType","keyboardType","label","accessibilityLabel","labelPosition","name","onChange","onFocus","onBlur","onOTPFilled","otpLength","placeholder","successText","validationState","value","isMasked","autoCompleteSuggestionType","testID","size"];var isReactNative=getPlatformType()==='react-native';var otpToArray=function otpToArray(code){var _code$split;return (_code$split=code==null?void 0:code.split(''))!=null?_code$split:Array(6).fill('');};var _OTPInput=function _OTPInput(_ref,incomingRef){var autoFocus=_ref.autoFocus,errorText=_ref.errorText,helpText=_ref.helpText,isDisabled=_ref.isDisabled,keyboardReturnKeyType=_ref.keyboardReturnKeyType,_ref$keyboardType=_ref.keyboardType,keyboardType=_ref$keyboardType===void 0?'decimal':_ref$keyboardType,label=_ref.label,accessibilityLabel=_ref.accessibilityLabel,labelPosition=_ref.labelPosition,name=_ref.name,onChange=_ref.onChange,_onFocus=_ref.onFocus,_onBlur=_ref.onBlur,onOTPFilled=_ref.onOTPFilled,_ref$otpLength=_ref.otpLength,otpLength=_ref$otpLength===void 0?6:_ref$otpLength,placeholder=_ref.placeholder,successText=_ref.successText,validationState=_ref.validationState,inputValue=_ref.value,isMasked=_ref.isMasked,_ref$autoCompleteSugg=_ref.autoCompleteSuggestionType,autoCompleteSuggestionType=_ref$autoCompleteSugg===void 0?'oneTimeCode':_ref$autoCompleteSugg,testID=_ref.testID,_ref$size=_ref.size,size=_ref$size===void 0?'medium':_ref$size,styledProps=_objectWithoutProperties(_ref,_excluded);var inputRefs=[];var _useState=useState(otpToArray(inputValue)),_useState2=_slicedToArray(_useState,2),otpValue=_useState2[0],setOtpValue=_useState2[1];var _useState3=useState([]),_useState4=_slicedToArray(_useState3,2),inputType=_useState4[0],setInputType=_useState4[1];var isLabelLeftPositioned=labelPosition==='left';var _useFormId=useFormId('otp'),inputId=_useFormId.inputId,helpTextId=_useFormId.helpTextId,errorTextId=_useFormId.errorTextId,successTextId=_useFormId.successTextId;useImperativeHandle(incomingRef,function(){return inputRefs.map(function(ref){return ref.current;});},[inputRefs]);useEffect(function(){if(inputValue&&inputValue.length>=otpLength){onOTPFilled==null?void 0:onOTPFilled({value:inputValue.slice(0,otpLength),name:name});}else if(!inputValue&&otpValue.join('').length>=otpLength){onOTPFilled==null?void 0:onOTPFilled({value:otpValue.slice(0,otpLength).join(''),name:name});}},[otpValue,otpLength,name,inputValue,onOTPFilled]);useEffect(function(){otpValue.forEach(function(otp,index){if(!isEmpty(otp)&&!inputType[index]&&isMasked){var newInputType=Array.from(inputType);newInputType[index]='password';setInputType(newInputType);}if(isEmpty(otp)&&inputType[index]){var _newInputType=Array.from(inputType);_newInputType[index]=undefined;setInputType(_newInputType);}});},[otpValue,inputType,isMasked]);var setOtpValueByIndex=function setOtpValueByIndex(_ref2){var value=_ref2.value,index=_ref2.index;var newOtpValue=Array.from(otpValue);newOtpValue[index]=value;setOtpValue(newOtpValue);return newOtpValue.join('');};var focusOnOtpByIndex=function focusOnOtpByIndex(index){var _inputRefs$index,_inputRefs$index$curr;(_inputRefs$index=inputRefs[index])==null?void 0:(_inputRefs$index$curr=_inputRefs$index.current)==null?void 0:_inputRefs$index$curr.focus();if(!isReactNative){var _inputRefs$index2,_inputRefs$index2$cur;(_inputRefs$index2=inputRefs[index])==null?void 0:(_inputRefs$index2$cur=_inputRefs$index2.current)==null?void 0:_inputRefs$index2$cur.select();}};var handleOnChange=function handleOnChange(_ref3){var value=_ref3.value,currentOtpIndex=_ref3.currentOtpIndex;if(value&&value===' '){return;}if(inputValue&&inputValue.length>0){var newOtpValue=Array.from(inputValue);newOtpValue[currentOtpIndex]=value!=null?value:'';setOtpValue(newOtpValue);onChange==null?void 0:onChange({name:name,value:newOtpValue.join('')});}else if(value&&value.trim().length>1){setOtpValue(Array.from(value));onChange==null?void 0:onChange({name:name,value:value.trim().slice(0,otpLength)});}else if(otpValue[currentOtpIndex]!==(value==null?void 0:value.trim())){var _value$trim;var newValue=setOtpValueByIndex({value:(_value$trim=value==null?void 0:value.trim())!=null?_value$trim:'',index:currentOtpIndex});onChange==null?void 0:onChange({name:name,value:newValue});}};var handleOnInput=function handleOnInput(_ref4){var value=_ref4.value,currentOtpIndex=_ref4.currentOtpIndex;if(value&&value.trim().length===1){focusOnOtpByIndex(++currentOtpIndex);}};var handleOnKeyDown=function handleOnKeyDown(_ref5){var key=_ref5.key,code=_ref5.code,event=_ref5.event,currentOtpIndex=_ref5.currentOtpIndex;if(key==='Backspace'||code==='Backspace'||code==='Delete'||key==='Delete'){event.preventDefault==null?void 0:event.preventDefault();handleOnChange({value:'',currentOtpIndex:currentOtpIndex});focusOnOtpByIndex(--currentOtpIndex);}else if(key==='ArrowLeft'||code==='ArrowLeft'){event.preventDefault==null?void 0:event.preventDefault();focusOnOtpByIndex(--currentOtpIndex);}else if(key==='ArrowRight'||code==='ArrowRight'){event.preventDefault==null?void 0:event.preventDefault();focusOnOtpByIndex(++currentOtpIndex);}else if(key===' '||code==='Space'){event.preventDefault==null?void 0:event.preventDefault();}};var getHiddenInput=function getHiddenInput(){if(!isReactNative){var _ref6;return jsx("input",{hidden:true,id:inputId,name:name,value:(_ref6=inputValue!=null?inputValue:otpValue.join(''))!=null?_ref6:'',readOnly:true});}return null;};var getOTPInputFields=function getOTPInputFields(){var inputs=[];var _loop=function _loop(index){var _otpValue$index,_Array$from$index;var currentValue=inputValue?otpToArray(inputValue)[index]||'':otpValue[index]||'';var ref=React__default.createRef();var currentInputType;if(isMasked){currentInputType=inputValue?'password':inputType[index];}inputRefs.push(ref);inputs.push(jsx(BaseBox,{flex:1,marginLeft:index==0?'spacing.0':'spacing.3',children:jsx(BaseInput,{autoFocus:autoFocus&&index===0,accessibilityLabel:`${index===0?label||accessibilityLabel:''} character ${index+1}`,label:label,hideLabelText:true,id:`${inputId}-${index}`,textAlign:"center",ref:ref,name:name,value:currentValue,maxCharacters:((_otpValue$index=otpValue[index])==null?void 0:_otpValue$index.length)>0?1:undefined,onChange:function onChange(formEvent){return handleOnChange(Object.assign({},formEvent,{currentOtpIndex:index}));},onFocus:function onFocus(formEvent){return _onFocus==null?void 0:_onFocus(Object.assign({},formEvent,{inputIndex:index}));},onBlur:function onBlur(formEvent){return _onBlur==null?void 0:_onBlur(Object.assign({},formEvent,{inputIndex:index}));},onInput:function onInput(formEvent){return handleOnInput(Object.assign({},formEvent,{currentOtpIndex:index}));},onKeyDown:function onKeyDown(keyboardEvent){return handleOnKeyDown(Object.assign({},keyboardEvent,{currentOtpIndex:index}));},isDisabled:isDisabled,placeholder:(_Array$from$index=Array.from(placeholder!=null?placeholder:'')[index])!=null?_Array$from$index:'',isRequired:true,autoCompleteSuggestionType:autoCompleteSuggestionType,keyboardType:keyboardType,keyboardReturnKeyType:keyboardReturnKeyType,validationState:validationState,successText:successText,errorText:errorText,helpText:helpText,hideFormHint:true,type:currentInputType,size:size,valueComponentType:"heading"})},`${inputId}-${index}`));};for(var index=0;index<otpLength;index++){_loop(index);}return inputs;};return jsxs(BaseBox,Object.assign({},metaAttribute({name:MetaConstants.OTPInput,testID:testID}),getStyledProps(styledProps),{children:[jsxs(BaseBox,{display:"flex",flexDirection:isLabelLeftPositioned?'row':'column',alignItems:isLabelLeftPositioned?'center':undefined,position:"relative",children:[Boolean(label)&&jsx(FormLabel,{as:"label",position:labelPosition,htmlFor:inputId,size:size,children:label}),jsxs(BaseBox,{display:"flex",flexDirection:"row",children:[getHiddenInput(),getOTPInputFields()]})]}),jsx(BaseBox,{marginLeft:makeSize(isLabelLeftPositioned?136:0),children:jsx(FormHint,{type:getHintType({validationState:validationState,hasHelpText:Boolean(helpText)}),helpText:helpText,errorText:errorText,successText:successText,helpTextId:helpTextId,errorTextId:errorTextId,successTextId:successTextId,size:size})})]}));};var OTPInput=React__default.forwardRef(_OTPInput);
|
|
22
22
|
|
|
23
23
|
export { OTPInput };
|
|
24
24
|
//# sourceMappingURL=OTPInput.js.map
|