@razorpay/blade 11.11.0 → 11.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/lib/native/components/ActionList/ActionListBox.native.js.map +1 -1
- package/build/lib/native/components/Amount/Amount.js +1 -1
- package/build/lib/native/components/Amount/Amount.js.map +1 -1
- package/build/lib/native/components/BottomSheet/BottomSheet.native.js.map +1 -1
- package/build/lib/native/components/Box/BaseBox/baseBoxStyles.js +1 -1
- package/build/lib/native/components/Box/BaseBox/baseBoxStyles.js.map +1 -1
- package/build/lib/native/components/Box/BaseBox/types/propsTypes.js.map +1 -1
- package/build/lib/native/components/Button/BaseButton/AnimatedButtonContent.native.js.map +1 -1
- package/build/lib/native/components/Button/BaseButton/StyledBaseButton.native.js.map +1 -1
- package/build/lib/native/components/Divider/Divider.js +1 -1
- package/build/lib/native/components/Divider/Divider.js.map +1 -1
- package/build/lib/native/components/Input/BaseInput/AnimatedBaseInputWrapper.native.js +1 -1
- package/build/lib/native/components/Input/BaseInput/AnimatedBaseInputWrapper.native.js.map +1 -1
- package/build/lib/native/components/Input/BaseInput/BaseInput.js +2 -1
- package/build/lib/native/components/Input/BaseInput/BaseInput.js.map +1 -1
- package/build/lib/native/components/Input/BaseInput/BaseInputTagSlot.native.js +1 -1
- package/build/lib/native/components/Input/BaseInput/BaseInputTagSlot.native.js.map +1 -1
- package/build/lib/native/components/Input/BaseInput/BaseInputWrapper.js +1 -1
- package/build/lib/native/components/Input/BaseInput/BaseInputWrapper.js.map +1 -1
- package/build/lib/native/components/Input/BaseInput/StyledBaseInput.native.js +1 -1
- package/build/lib/native/components/Input/BaseInput/StyledBaseInput.native.js.map +1 -1
- package/build/lib/native/components/Input/BaseInput/baseInputStyles.js +1 -1
- package/build/lib/native/components/Input/BaseInput/baseInputStyles.js.map +1 -1
- package/build/lib/native/components/Input/BaseInput/useTaggedInput.js +13 -0
- package/build/lib/native/components/Input/BaseInput/useTaggedInput.js.map +1 -0
- package/build/lib/native/components/Input/OTPInput/OTPInput.js +1 -1
- package/build/lib/native/components/Input/OTPInput/OTPInput.js.map +1 -1
- package/build/lib/native/components/Input/TextArea/TextArea.js +2 -1
- package/build/lib/native/components/Input/TextArea/TextArea.js.map +1 -1
- package/build/lib/native/components/Input/TextInput/TextInput.js +2 -1
- package/build/lib/native/components/Input/TextInput/TextInput.js.map +1 -1
- package/build/lib/native/components/PopupArrow/PopupArrow.native.js +1 -1
- package/build/lib/native/components/PopupArrow/PopupArrow.native.js.map +1 -1
- package/build/lib/native/components/Tabs/Tabs.native.js.map +1 -1
- package/build/lib/native/components/Tag/AnimatedTag.native.js.map +1 -1
- package/build/lib/native/components/Tag/Tag.js +1 -1
- package/build/lib/native/components/Tag/Tag.js.map +1 -1
- package/build/lib/native/components/Tag/getTagsGroup.js +1 -1
- package/build/lib/native/components/Tag/getTagsGroup.js.map +1 -1
- package/build/lib/native/components/Tag/tagAnimationConfig.js +1 -2
- package/build/lib/native/components/Tag/tagAnimationConfig.js.map +1 -1
- package/build/lib/native/components/Typography/BaseText/getBaseTextStyles.js +1 -1
- package/build/lib/native/components/Typography/BaseText/getBaseTextStyles.js.map +1 -1
- package/build/lib/native/utils/mergeProps.js +1 -1
- package/build/lib/native/utils/mergeProps.js.map +1 -1
- package/build/lib/web/development/components/Accordion/Accordion.js +2 -2
- package/build/lib/web/development/components/Accordion/AccordionButton.web.js +2 -2
- package/build/lib/web/development/components/Accordion/AccordionItem.js +2 -2
- package/build/lib/web/development/components/Accordion/AccordionItemBody.js +2 -2
- package/build/lib/web/development/components/Accordion/AccordionItemHeader.js +2 -2
- package/build/lib/web/development/components/Accordion/StyledAccordionButton.web.js +2 -2
- package/build/lib/web/development/components/ActionList/ActionList.js +2 -2
- package/build/lib/web/development/components/ActionList/ActionListBox.web.js +2 -2
- package/build/lib/web/development/components/ActionList/ActionListItem.js +2 -2
- package/build/lib/web/development/components/ActionList/actionListUtils.js +2 -2
- package/build/lib/web/development/components/ActionList/styles/StyledActionListItem.web.js +2 -2
- package/build/lib/web/development/components/ActionList/styles/StyledListBoxWrapper.web.js +4 -5
- package/build/lib/web/development/components/ActionList/styles/StyledListBoxWrapper.web.js.map +1 -1
- package/build/lib/web/development/components/Alert/Alert.js +2 -2
- package/build/lib/web/development/components/Amount/Amount.js +5 -3
- package/build/lib/web/development/components/Amount/Amount.js.map +1 -1
- package/build/lib/web/development/components/Badge/Badge.js +2 -2
- package/build/lib/web/development/components/Badge/StyledBadge.web.js +2 -2
- package/build/lib/web/development/components/BaseHeaderFooter/BaseFooter.js +2 -2
- package/build/lib/web/development/components/BaseHeaderFooter/BaseHeader.js +2 -2
- package/build/lib/web/development/components/BladeProvider/useBladeProvider.js +2 -2
- package/build/lib/web/development/components/BottomSheet/BottomSheet.web.js +2 -2
- package/build/lib/web/development/components/BottomSheet/BottomSheetBackdrop.web.js +2 -2
- package/build/lib/web/development/components/BottomSheet/BottomSheetBody.web.js +2 -2
- package/build/lib/web/development/components/BottomSheet/BottomSheetCommon.js +2 -2
- package/build/lib/web/development/components/BottomSheet/BottomSheetFooter.web.js +2 -2
- package/build/lib/web/development/components/BottomSheet/BottomSheetHeader.web.js +2 -2
- package/build/lib/web/development/components/BottomSheet/getBottomSheetGrabHandleStyles.js +2 -2
- package/build/lib/web/development/components/Box/BaseBox/BaseBox.web.js +2 -2
- package/build/lib/web/development/components/Box/BaseBox/baseBoxStyles.js +4 -3
- package/build/lib/web/development/components/Box/BaseBox/baseBoxStyles.js.map +1 -1
- package/build/lib/web/development/components/Box/BaseBox/types/propsTypes.js.map +1 -1
- package/build/lib/web/development/components/Box/BaseBox/useMemoizedStyles.web.js +2 -2
- package/build/lib/web/development/components/Box/Box.js +2 -2
- package/build/lib/web/development/components/Box/styledProps/getStyledProps.js +3 -1
- package/build/lib/web/development/components/Box/styledProps/getStyledProps.js.map +1 -1
- package/build/lib/web/development/components/Box/styledProps/useStyledProps.js +4 -3
- package/build/lib/web/development/components/Box/styledProps/useStyledProps.js.map +1 -1
- package/build/lib/web/development/components/Breadcrumb/Breadcrumb.web.js +2 -2
- package/build/lib/web/development/components/Button/BaseButton/BaseButton.js +2 -3
- package/build/lib/web/development/components/Button/BaseButton/BaseButton.js.map +1 -1
- package/build/lib/web/development/components/Button/BaseButton/StyledBaseButton.web.js +2 -2
- package/build/lib/web/development/components/Button/Button/Button.js +2 -2
- package/build/lib/web/development/components/Button/IconButton/StyledIconButton.web.js +2 -2
- package/build/lib/web/development/components/ButtonGroup/ButtonGroup.web.js +2 -3
- package/build/lib/web/development/components/ButtonGroup/ButtonGroup.web.js.map +1 -1
- package/build/lib/web/development/components/Card/Card.js +2 -2
- package/build/lib/web/development/components/Card/CardFooter.js +2 -2
- package/build/lib/web/development/components/Card/CardHeader.js +2 -2
- package/build/lib/web/development/components/Card/CardRoot.web.js +5 -6
- package/build/lib/web/development/components/Card/CardRoot.web.js.map +1 -1
- package/build/lib/web/development/components/Carousel/Carousel.web.js +2 -2
- package/build/lib/web/development/components/Carousel/CarouselItem.web.js +2 -2
- package/build/lib/web/development/components/Carousel/Indicators/IndicatorButton.js +2 -2
- package/build/lib/web/development/components/Carousel/Indicators/Indicators.js +2 -2
- package/build/lib/web/development/components/Carousel/Indicators/getIndicatorButtonStyles.js +2 -2
- package/build/lib/web/development/components/Carousel/NavigationButton/NavigationButton.js +2 -2
- package/build/lib/web/development/components/Carousel/NavigationButton/getNavigationButtonStyles.js +2 -2
- package/build/lib/web/development/components/Checkbox/Checkbox.js +2 -2
- package/build/lib/web/development/components/Checkbox/CheckboxGroup/CheckboxGroup.js +2 -2
- package/build/lib/web/development/components/Checkbox/CheckboxIcon/CheckboxIcon.js +2 -2
- package/build/lib/web/development/components/Checkbox/CheckboxIcon/Fade.web.js +2 -2
- package/build/lib/web/development/components/Checkbox/useCheckbox.js +2 -2
- package/build/lib/web/development/components/Chip/AnimatedChip.web.js +2 -2
- package/build/lib/web/development/components/Chip/Chip.js +2 -2
- package/build/lib/web/development/components/Chip/ChipGroup.js +2 -2
- package/build/lib/web/development/components/Chip/StyledChipWrapper.web.js +2 -2
- package/build/lib/web/development/components/Collapsible/Collapsible.js +2 -2
- package/build/lib/web/development/components/Collapsible/CollapsibleBody.js +2 -2
- package/build/lib/web/development/components/Collapsible/CollapsibleBodyContent.web.js +2 -2
- package/build/lib/web/development/components/Collapsible/CollapsibleChevronIcon.web.js +2 -2
- package/build/lib/web/development/components/Counter/Counter.js +2 -2
- package/build/lib/web/development/components/Counter/StyledCounter.web.js +2 -2
- package/build/lib/web/development/components/Divider/Divider.js +4 -5
- package/build/lib/web/development/components/Divider/Divider.js.map +1 -1
- package/build/lib/web/development/components/Drawer/Drawer.web.js +2 -2
- package/build/lib/web/development/components/Dropdown/Dropdown.js +2 -2
- package/build/lib/web/development/components/Dropdown/DropdownButton.js +2 -2
- package/build/lib/web/development/components/Dropdown/DropdownHeaderFooter.js +2 -2
- package/build/lib/web/development/components/Dropdown/DropdownLink.js +2 -2
- package/build/lib/web/development/components/Dropdown/DropdownOverlay.web.js +2 -2
- package/build/lib/web/development/components/Dropdown/useDropdown.js +2 -2
- package/build/lib/web/development/components/FileUpload/FileUpload.web.js +2 -2
- package/build/lib/web/development/components/FileUpload/FileUploadItemIcon.js +2 -2
- package/build/lib/web/development/components/FileUpload/StyledFileUploadItemWrapper.js +2 -2
- package/build/lib/web/development/components/FileUpload/StyledFileUploadWrapper.js +2 -2
- package/build/lib/web/development/components/Form/FormLabel.js +2 -2
- package/build/lib/web/development/components/Form/Selector/SelectorGroupField.js +2 -2
- package/build/lib/web/development/components/Form/Selector/SelectorInput.web.js +2 -2
- package/build/lib/web/development/components/Form/Selector/SelectorLabel.web.js +2 -2
- package/build/lib/web/development/components/Icons/ActivityIcon/ActivityIcon.js +2 -2
- package/build/lib/web/development/components/Icons/AirplayIcon/AirplayIcon.js +2 -2
- package/build/lib/web/development/components/Icons/AlertCircleIcon/AlertCircleIcon.js +2 -2
- package/build/lib/web/development/components/Icons/AlertOctagonIcon/AlertOctagonIcon.js +2 -2
- package/build/lib/web/development/components/Icons/AlertOnlyIcon/AlertOnlyIcon.js +2 -2
- package/build/lib/web/development/components/Icons/AlertTriangleIcon/AlertTriangleIcon.js +2 -2
- package/build/lib/web/development/components/Icons/AlignCenterIcon/AlignCenterIcon.js +2 -2
- package/build/lib/web/development/components/Icons/AlignJustifyIcon/AlignJustifyIcon.js +2 -2
- package/build/lib/web/development/components/Icons/AlignLeftIcon/AlignLeftIcon.js +2 -2
- package/build/lib/web/development/components/Icons/AlignRightIcon/AlignRightIcon.js +2 -2
- package/build/lib/web/development/components/Icons/AnchorIcon/AnchorIcon.js +2 -2
- package/build/lib/web/development/components/Icons/AnnouncementIcon/AnnouncementIcon.js +2 -2
- package/build/lib/web/development/components/Icons/ApertureIcon/ApertureIcon.js +2 -2
- package/build/lib/web/development/components/Icons/AppStoreIcon/AppStoreIcon.js +2 -2
- package/build/lib/web/development/components/Icons/ArrowDownIcon/ArrowDownIcon.js +2 -2
- package/build/lib/web/development/components/Icons/ArrowDownLeftIcon/ArrowDownLeftIcon.js +2 -2
- package/build/lib/web/development/components/Icons/ArrowDownRightIcon/ArrowDownRightIcon.js +2 -2
- package/build/lib/web/development/components/Icons/ArrowLeftIcon/ArrowLeftIcon.js +2 -2
- package/build/lib/web/development/components/Icons/ArrowRightIcon/ArrowRightIcon.js +2 -2
- package/build/lib/web/development/components/Icons/ArrowUpIcon/ArrowUpIcon.js +2 -2
- package/build/lib/web/development/components/Icons/ArrowUpLeftIcon/ArrowUpLeftIcon.js +2 -2
- package/build/lib/web/development/components/Icons/ArrowUpRightIcon/ArrowUpRightIcon.js +2 -2
- package/build/lib/web/development/components/Icons/AtSignIcon/AtSignIcon.js +2 -2
- package/build/lib/web/development/components/Icons/AttachmentIcon/AttachmentIcon.js +2 -2
- package/build/lib/web/development/components/Icons/AwardIcon/AwardIcon.js +2 -2
- package/build/lib/web/development/components/Icons/BankIcon/BankIcon.js +2 -2
- package/build/lib/web/development/components/Icons/BarChartAltIcon/BarChartAltIcon.js +2 -2
- package/build/lib/web/development/components/Icons/BarChartIcon/BarChartIcon.js +2 -2
- package/build/lib/web/development/components/Icons/BatteryChargingIcon/BatteryChargingIcon.js +2 -2
- package/build/lib/web/development/components/Icons/BatteryIcon/BatteryIcon.js +2 -2
- package/build/lib/web/development/components/Icons/BellIcon/BellIcon.js +2 -2
- package/build/lib/web/development/components/Icons/BellOffIcon/BellOffIcon.js +2 -2
- package/build/lib/web/development/components/Icons/BillIcon/BillIcon.js +2 -2
- package/build/lib/web/development/components/Icons/BluetoothIcon/BluetoothIcon.js +2 -2
- package/build/lib/web/development/components/Icons/BoldIcon/BoldIcon.js +2 -2
- package/build/lib/web/development/components/Icons/BookIcon/BookIcon.js +2 -2
- package/build/lib/web/development/components/Icons/BookmarkIcon/BookmarkIcon.js +2 -2
- package/build/lib/web/development/components/Icons/BoxIcon/BoxIcon.js +2 -2
- package/build/lib/web/development/components/Icons/BriefcaseIcon/BriefcaseIcon.js +2 -2
- package/build/lib/web/development/components/Icons/BulkPayoutsIcon/BulkPayoutsIcon.js +2 -2
- package/build/lib/web/development/components/Icons/CalendarIcon/CalendarIcon.js +2 -2
- package/build/lib/web/development/components/Icons/CameraIcon/CameraIcon.js +2 -2
- package/build/lib/web/development/components/Icons/CameraOffIcon/CameraOffIcon.js +2 -2
- package/build/lib/web/development/components/Icons/CastIcon/CastIcon.js +2 -2
- package/build/lib/web/development/components/Icons/CheckCircleIcon/CheckCircleIcon.js +2 -2
- package/build/lib/web/development/components/Icons/CheckIcon/CheckIcon.js +2 -2
- package/build/lib/web/development/components/Icons/CheckSquareIcon/CheckSquareIcon.js +2 -2
- package/build/lib/web/development/components/Icons/ChevronDownIcon/ChevronDownIcon.js +2 -2
- package/build/lib/web/development/components/Icons/ChevronLeftIcon/ChevronLeftIcon.js +2 -2
- package/build/lib/web/development/components/Icons/ChevronRightIcon/ChevronRightIcon.js +2 -2
- package/build/lib/web/development/components/Icons/ChevronUpIcon/ChevronUpIcon.js +2 -2
- package/build/lib/web/development/components/Icons/ChevronsDownIcon/ChevronsDownIcon.js +2 -2
- package/build/lib/web/development/components/Icons/ChevronsLeftIcon/ChevronsLeftIcon.js +2 -2
- package/build/lib/web/development/components/Icons/ChevronsRightIcon/ChevronsRightIcon.js +2 -2
- package/build/lib/web/development/components/Icons/ChevronsUpIcon/ChevronsUpIcon.js +2 -2
- package/build/lib/web/development/components/Icons/ChromeIcon/ChromeIcon.js +2 -2
- package/build/lib/web/development/components/Icons/CircleIcon/CircleIcon.js +2 -2
- package/build/lib/web/development/components/Icons/ClipboardIcon/ClipboardIcon.js +2 -2
- package/build/lib/web/development/components/Icons/ClockIcon/ClockIcon.js +2 -2
- package/build/lib/web/development/components/Icons/CloseIcon/CloseIcon.js +2 -2
- package/build/lib/web/development/components/Icons/CloudDrizzleIcon/CloudDrizzleIcon.js +2 -2
- package/build/lib/web/development/components/Icons/CloudIcon/CloudIcon.js +2 -2
- package/build/lib/web/development/components/Icons/CloudLightningIcon/CloudLightningIcon.js +2 -2
- package/build/lib/web/development/components/Icons/CloudOffIcon/CloudOffIcon.js +2 -2
- package/build/lib/web/development/components/Icons/CloudRainIcon/CloudRainIcon.js +2 -2
- package/build/lib/web/development/components/Icons/CloudSnowIcon/CloudSnowIcon.js +2 -2
- package/build/lib/web/development/components/Icons/CodepenIcon/CodepenIcon.js +2 -2
- package/build/lib/web/development/components/Icons/CoinsIcon/CoinsIcon.js +2 -2
- package/build/lib/web/development/components/Icons/CommandIcon/CommandIcon.js +2 -2
- package/build/lib/web/development/components/Icons/CompassIcon/CompassIcon.js +2 -2
- package/build/lib/web/development/components/Icons/CopyIcon/CopyIcon.js +2 -2
- package/build/lib/web/development/components/Icons/CornerDownLeftIcon/CornerDownLeftIcon.js +2 -2
- package/build/lib/web/development/components/Icons/CornerDownRightIcon/CornerDownRightIcon.js +2 -2
- package/build/lib/web/development/components/Icons/CornerLeftDownIcon/CornerLeftDownIcon.js +2 -2
- package/build/lib/web/development/components/Icons/CornerLeftUpIcon/CornerLeftUpIcon.js +2 -2
- package/build/lib/web/development/components/Icons/CornerRightDownIcon/CornerRightDownIcon.js +2 -2
- package/build/lib/web/development/components/Icons/CornerRightUpIcon/CornerRightUpIcon.js +2 -2
- package/build/lib/web/development/components/Icons/CornerUpLeftIcon/CornerUpLeftIcon.js +2 -2
- package/build/lib/web/development/components/Icons/CornerUpRightIcon/CornerUpRightIcon.js +2 -2
- package/build/lib/web/development/components/Icons/CpuIcon/CpuIcon.js +2 -2
- package/build/lib/web/development/components/Icons/CreditCardIcon/CreditCardIcon.js +2 -2
- package/build/lib/web/development/components/Icons/CropIcon/CropIcon.js +2 -2
- package/build/lib/web/development/components/Icons/CrosshairIcon/CrosshairIcon.js +2 -2
- package/build/lib/web/development/components/Icons/CustomersIcon/CustomersIcon.js +2 -2
- package/build/lib/web/development/components/Icons/CutIcon/CutIcon.js +2 -2
- package/build/lib/web/development/components/Icons/DashboardIcon/DashboardIcon.js +2 -2
- package/build/lib/web/development/components/Icons/DeleteIcon/DeleteIcon.js +2 -2
- package/build/lib/web/development/components/Icons/DiscIcon/DiscIcon.js +2 -2
- package/build/lib/web/development/components/Icons/DollarIcon/DollarIcon.js +2 -2
- package/build/lib/web/development/components/Icons/DollarsIcon/DollarsIcon.js +2 -2
- package/build/lib/web/development/components/Icons/DownloadCloudIcon/DownloadCloudIcon.js +2 -2
- package/build/lib/web/development/components/Icons/DownloadIcon/DownloadIcon.js +2 -2
- package/build/lib/web/development/components/Icons/DropletIcon/DropletIcon.js +2 -2
- package/build/lib/web/development/components/Icons/EditComposeIcon/EditComposeIcon.js +2 -2
- package/build/lib/web/development/components/Icons/EditIcon/EditIcon.js +2 -2
- package/build/lib/web/development/components/Icons/EditInlineIcon/EditInlineIcon.js +2 -2
- package/build/lib/web/development/components/Icons/ExportIcon/ExportIcon.js +2 -2
- package/build/lib/web/development/components/Icons/ExternalLinkIcon/ExternalLinkIcon.js +2 -2
- package/build/lib/web/development/components/Icons/EyeIcon/EyeIcon.js +2 -2
- package/build/lib/web/development/components/Icons/EyeOffIcon/EyeOffIcon.js +2 -2
- package/build/lib/web/development/components/Icons/FacebookIcon/FacebookIcon.js +2 -2
- package/build/lib/web/development/components/Icons/FastForwardIcon/FastForwardIcon.js +2 -2
- package/build/lib/web/development/components/Icons/FeatherIcon/FeatherIcon.js +2 -2
- package/build/lib/web/development/components/Icons/FileIcon/FileIcon.js +2 -2
- package/build/lib/web/development/components/Icons/FileMinusIcon/FileMinusIcon.js +2 -2
- package/build/lib/web/development/components/Icons/FilePlusIcon/FilePlusIcon.js +2 -2
- package/build/lib/web/development/components/Icons/FileTextIcon/FileTextIcon.js +2 -2
- package/build/lib/web/development/components/Icons/FileZipIcon/FileZipIcon.js +2 -2
- package/build/lib/web/development/components/Icons/FilmIcon/FilmIcon.js +2 -2
- package/build/lib/web/development/components/Icons/FilterIcon/FilterIcon.js +2 -2
- package/build/lib/web/development/components/Icons/FlagIcon/FlagIcon.js +2 -2
- package/build/lib/web/development/components/Icons/FolderIcon/FolderIcon.js +2 -2
- package/build/lib/web/development/components/Icons/FullScreenEnterIcon/FullScreenEnterIcon.js +2 -2
- package/build/lib/web/development/components/Icons/FullScreenExitIcon/FullScreenExitIcon.js +2 -2
- package/build/lib/web/development/components/Icons/GithubIcon/GithubIcon.js +2 -2
- package/build/lib/web/development/components/Icons/GitlabIcon/GitlabIcon.js +2 -2
- package/build/lib/web/development/components/Icons/GlobeIcon/GlobeIcon.js +2 -2
- package/build/lib/web/development/components/Icons/GridIcon/GridIcon.js +2 -2
- package/build/lib/web/development/components/Icons/HashIcon/HashIcon.js +2 -2
- package/build/lib/web/development/components/Icons/HeadphonesIcon/HeadphonesIcon.js +2 -2
- package/build/lib/web/development/components/Icons/HeartIcon/HeartIcon.js +2 -2
- package/build/lib/web/development/components/Icons/HelpCircleIcon/HelpCircleIcon.js +2 -2
- package/build/lib/web/development/components/Icons/HistoryIcon/HistoryIcon.js +2 -2
- package/build/lib/web/development/components/Icons/HomeIcon/HomeIcon.js +2 -2
- package/build/lib/web/development/components/Icons/ImageIcon/ImageIcon.js +2 -2
- package/build/lib/web/development/components/Icons/InboxIcon/InboxIcon.js +2 -2
- package/build/lib/web/development/components/Icons/InfoIcon/InfoIcon.js +2 -2
- package/build/lib/web/development/components/Icons/InstagramIcon/InstagramIcon.js +2 -2
- package/build/lib/web/development/components/Icons/InvoicesIcon/InvoicesIcon.js +2 -2
- package/build/lib/web/development/components/Icons/ItalicIcon/ItalicIcon.js +2 -2
- package/build/lib/web/development/components/Icons/LayersIcon/LayersIcon.js +2 -2
- package/build/lib/web/development/components/Icons/LayoutIcon/LayoutIcon.js +2 -2
- package/build/lib/web/development/components/Icons/LifeBuoyIcon/LifeBuoyIcon.js +2 -2
- package/build/lib/web/development/components/Icons/LinkIcon/LinkIcon.js +2 -2
- package/build/lib/web/development/components/Icons/ListIcon/ListIcon.js +2 -2
- package/build/lib/web/development/components/Icons/LoaderIcon/LoaderIcon.js +2 -2
- package/build/lib/web/development/components/Icons/LockIcon/LockIcon.js +2 -2
- package/build/lib/web/development/components/Icons/LogInIcon/LogInIcon.js +2 -2
- package/build/lib/web/development/components/Icons/LogOutIcon/LogOutIcon.js +2 -2
- package/build/lib/web/development/components/Icons/MailIcon/MailIcon.js +2 -2
- package/build/lib/web/development/components/Icons/MailOpenIcon/MailOpenIcon.js +2 -2
- package/build/lib/web/development/components/Icons/MapIcon/MapIcon.js +2 -2
- package/build/lib/web/development/components/Icons/MapPinIcon/MapPinIcon.js +2 -2
- package/build/lib/web/development/components/Icons/MaximizeIcon/MaximizeIcon.js +2 -2
- package/build/lib/web/development/components/Icons/MenuDotsIcon/MenuDotsIcon.js +2 -2
- package/build/lib/web/development/components/Icons/MenuIcon/MenuIcon.js +2 -2
- package/build/lib/web/development/components/Icons/MessageCircleIcon/MessageCircleIcon.js +2 -2
- package/build/lib/web/development/components/Icons/MessageSquareIcon/MessageSquareIcon.js +2 -2
- package/build/lib/web/development/components/Icons/MicIcon/MicIcon.js +2 -2
- package/build/lib/web/development/components/Icons/MicOffIcon/MicOffIcon.js +2 -2
- package/build/lib/web/development/components/Icons/MinimizeIcon/MinimizeIcon.js +2 -2
- package/build/lib/web/development/components/Icons/MinusCircleIcon/MinusCircleIcon.js +2 -2
- package/build/lib/web/development/components/Icons/MinusIcon/MinusIcon.js +2 -2
- package/build/lib/web/development/components/Icons/MinusSquareIcon/MinusSquareIcon.js +2 -2
- package/build/lib/web/development/components/Icons/MonitorIcon/MonitorIcon.js +2 -2
- package/build/lib/web/development/components/Icons/MoonIcon/MoonIcon.js +2 -2
- package/build/lib/web/development/components/Icons/MoreHorizontalIcon/MoreHorizontalIcon.js +2 -2
- package/build/lib/web/development/components/Icons/MoreVerticalIcon/MoreVerticalIcon.js +2 -2
- package/build/lib/web/development/components/Icons/MoveIcon/MoveIcon.js +2 -2
- package/build/lib/web/development/components/Icons/MusicIcon/MusicIcon.js +2 -2
- package/build/lib/web/development/components/Icons/MyAccountIcon/MyAccountIcon.js +2 -2
- package/build/lib/web/development/components/Icons/NavigationIcon/NavigationIcon.js +2 -2
- package/build/lib/web/development/components/Icons/OctagonIcon/OctagonIcon.js +2 -2
- package/build/lib/web/development/components/Icons/OffersIcon/OffersIcon.js +2 -2
- package/build/lib/web/development/components/Icons/PackageIcon/PackageIcon.js +2 -2
- package/build/lib/web/development/components/Icons/PaperclipIcon/PaperclipIcon.js +2 -2
- package/build/lib/web/development/components/Icons/PauseCircleIcon/PauseCircleIcon.js +2 -2
- package/build/lib/web/development/components/Icons/PauseIcon/PauseIcon.js +2 -2
- package/build/lib/web/development/components/Icons/PaymentButtonsIcon/PaymentButtonsIcon.js +2 -2
- package/build/lib/web/development/components/Icons/PaymentLinksIcon/PaymentLinksIcon.js +2 -2
- package/build/lib/web/development/components/Icons/PaymentPagesIcon/PaymentPagesIcon.js +2 -2
- package/build/lib/web/development/components/Icons/PercentIcon/PercentIcon.js +2 -2
- package/build/lib/web/development/components/Icons/PhoneCallIcon/PhoneCallIcon.js +2 -2
- package/build/lib/web/development/components/Icons/PhoneForwardedIcon/PhoneForwardedIcon.js +2 -2
- package/build/lib/web/development/components/Icons/PhoneIcon/PhoneIcon.js +2 -2
- package/build/lib/web/development/components/Icons/PhoneIncomingIcon/PhoneIncomingIcon.js +2 -2
- package/build/lib/web/development/components/Icons/PhoneMissedIcon/PhoneMissedIcon.js +2 -2
- package/build/lib/web/development/components/Icons/PhoneOffIcon/PhoneOffIcon.js +2 -2
- package/build/lib/web/development/components/Icons/PhoneOutgoingIcon/PhoneOutgoingIcon.js +2 -2
- package/build/lib/web/development/components/Icons/PieChartIcon/PieChartIcon.js +2 -2
- package/build/lib/web/development/components/Icons/PlayCircleIcon/PlayCircleIcon.js +2 -2
- package/build/lib/web/development/components/Icons/PlayIcon/PlayIcon.js +2 -2
- package/build/lib/web/development/components/Icons/PlusCircleIcon/PlusCircleIcon.js +2 -2
- package/build/lib/web/development/components/Icons/PlusIcon/PlusIcon.js +2 -2
- package/build/lib/web/development/components/Icons/PlusSquareIcon/PlusSquareIcon.js +2 -2
- package/build/lib/web/development/components/Icons/PocketIcon/PocketIcon.js +2 -2
- package/build/lib/web/development/components/Icons/PowerIcon/PowerIcon.js +2 -2
- package/build/lib/web/development/components/Icons/PrinterIcon/PrinterIcon.js +2 -2
- package/build/lib/web/development/components/Icons/QRCodeIcon/QRCodeIcon.js +2 -2
- package/build/lib/web/development/components/Icons/RadioIcon/RadioIcon.js +2 -2
- package/build/lib/web/development/components/Icons/RazorpayIcon/RazorpayIcon.js +2 -2
- package/build/lib/web/development/components/Icons/RazorpayXIcon/RazorpayXIcon.js +2 -2
- package/build/lib/web/development/components/Icons/RefreshIcon/RefreshIcon.js +2 -2
- package/build/lib/web/development/components/Icons/RepeatIcon/RepeatIcon.js +2 -2
- package/build/lib/web/development/components/Icons/ReportsIcon/ReportsIcon.js +2 -2
- package/build/lib/web/development/components/Icons/RewindIcon/RewindIcon.js +2 -2
- package/build/lib/web/development/components/Icons/RotateClockWiseIcon/RotateClockWiseIcon.js +2 -2
- package/build/lib/web/development/components/Icons/RotateCounterClockWiseIcon/RotateCounterClockWiseIcon.js +2 -2
- package/build/lib/web/development/components/Icons/RoutesIcon/RoutesIcon.js +2 -2
- package/build/lib/web/development/components/Icons/RupeeIcon/RupeeIcon.js +2 -2
- package/build/lib/web/development/components/Icons/RupeesIcon/RupeesIcon.js +2 -2
- package/build/lib/web/development/components/Icons/SaveIcon/SaveIcon.js +2 -2
- package/build/lib/web/development/components/Icons/ScissorsIcon/ScissorsIcon.js +2 -2
- package/build/lib/web/development/components/Icons/SearchIcon/SearchIcon.js +2 -2
- package/build/lib/web/development/components/Icons/SendIcon/SendIcon.js +2 -2
- package/build/lib/web/development/components/Icons/ServerIcon/ServerIcon.js +2 -2
- package/build/lib/web/development/components/Icons/SettingsIcon/SettingsIcon.js +2 -2
- package/build/lib/web/development/components/Icons/SettlementsIcon/SettlementsIcon.js +2 -2
- package/build/lib/web/development/components/Icons/ShareIcon/ShareIcon.js +2 -2
- package/build/lib/web/development/components/Icons/ShieldIcon/ShieldIcon.js +2 -2
- package/build/lib/web/development/components/Icons/ShoppingCartIcon/ShoppingCartIcon.js +2 -2
- package/build/lib/web/development/components/Icons/ShuffleIcon/ShuffleIcon.js +2 -2
- package/build/lib/web/development/components/Icons/SidebarIcon/SidebarIcon.js +2 -2
- package/build/lib/web/development/components/Icons/SkipBackIcon/SkipBackIcon.js +2 -2
- package/build/lib/web/development/components/Icons/SkipForwardIcon/SkipForwardIcon.js +2 -2
- package/build/lib/web/development/components/Icons/SlackIcon/SlackIcon.js +2 -2
- package/build/lib/web/development/components/Icons/SlashIcon/SlashIcon.js +2 -2
- package/build/lib/web/development/components/Icons/SlidersIcon/SlidersIcon.js +2 -2
- package/build/lib/web/development/components/Icons/SmartCollectIcon/SmartCollectIcon.js +2 -2
- package/build/lib/web/development/components/Icons/SmartphoneIcon/SmartphoneIcon.js +2 -2
- package/build/lib/web/development/components/Icons/SpeakerIcon/SpeakerIcon.js +2 -2
- package/build/lib/web/development/components/Icons/SquareIcon/SquareIcon.js +2 -2
- package/build/lib/web/development/components/Icons/StampIcon/StampIcon.js +2 -2
- package/build/lib/web/development/components/Icons/StarIcon/StarIcon.js +2 -2
- package/build/lib/web/development/components/Icons/StopCircleIcon/StopCircleIcon.js +2 -2
- package/build/lib/web/development/components/Icons/SubscriptionsIcon/SubscriptionsIcon.js +2 -2
- package/build/lib/web/development/components/Icons/SunIcon/SunIcon.js +2 -2
- package/build/lib/web/development/components/Icons/SunriseIcon/SunriseIcon.js +2 -2
- package/build/lib/web/development/components/Icons/SunsetIcon/SunsetIcon.js +2 -2
- package/build/lib/web/development/components/Icons/TabletIcon/TabletIcon.js +2 -2
- package/build/lib/web/development/components/Icons/TagIcon/TagIcon.js +2 -2
- package/build/lib/web/development/components/Icons/TargetIcon/TargetIcon.js +2 -2
- package/build/lib/web/development/components/Icons/ThermometerIcon/ThermometerIcon.js +2 -2
- package/build/lib/web/development/components/Icons/ThumbsDownIcon/ThumbsDownIcon.js +2 -2
- package/build/lib/web/development/components/Icons/ThumbsUpIcon/ThumbsUpIcon.js +2 -2
- package/build/lib/web/development/components/Icons/ToggleLeftIcon/ToggleLeftIcon.js +2 -2
- package/build/lib/web/development/components/Icons/ToggleRightIcon/ToggleRightIcon.js +2 -2
- package/build/lib/web/development/components/Icons/TransactionsIcon/TransactionsIcon.js +2 -2
- package/build/lib/web/development/components/Icons/TrashIcon/TrashIcon.js +2 -2
- package/build/lib/web/development/components/Icons/TrendingDownIcon/TrendingDownIcon.js +2 -2
- package/build/lib/web/development/components/Icons/TrendingUpIcon/TrendingUpIcon.js +2 -2
- package/build/lib/web/development/components/Icons/TriangleIcon/TriangleIcon.js +2 -2
- package/build/lib/web/development/components/Icons/TvIcon/TvIcon.js +2 -2
- package/build/lib/web/development/components/Icons/TwitterIcon/TwitterIcon.js +2 -2
- package/build/lib/web/development/components/Icons/TypeIcon/TypeIcon.js +2 -2
- package/build/lib/web/development/components/Icons/UmbrellaIcon/UmbrellaIcon.js +2 -2
- package/build/lib/web/development/components/Icons/UnderlineIcon/UnderlineIcon.js +2 -2
- package/build/lib/web/development/components/Icons/UnlockIcon/UnlockIcon.js +2 -2
- package/build/lib/web/development/components/Icons/UploadCloudIcon/UploadCloudIcon.js +2 -2
- package/build/lib/web/development/components/Icons/UploadIcon/UploadIcon.js +2 -2
- package/build/lib/web/development/components/Icons/UserCheckIcon/UserCheckIcon.js +2 -2
- package/build/lib/web/development/components/Icons/UserIcon/UserIcon.js +2 -2
- package/build/lib/web/development/components/Icons/UserMinusIcon/UserMinusIcon.js +2 -2
- package/build/lib/web/development/components/Icons/UserPlusIcon/UserPlusIcon.js +2 -2
- package/build/lib/web/development/components/Icons/UserXIcon/UserXIcon.js +2 -2
- package/build/lib/web/development/components/Icons/UsersIcon/UsersIcon.js +2 -2
- package/build/lib/web/development/components/Icons/VideoIcon/VideoIcon.js +2 -2
- package/build/lib/web/development/components/Icons/VideoOffIcon/VideoOffIcon.js +2 -2
- package/build/lib/web/development/components/Icons/VoicemailIcon/VoicemailIcon.js +2 -2
- package/build/lib/web/development/components/Icons/VolumeHighIcon/VolumeHighIcon.js +2 -2
- package/build/lib/web/development/components/Icons/VolumeIcon/VolumeIcon.js +2 -2
- package/build/lib/web/development/components/Icons/VolumeLowIcon/VolumeLowIcon.js +2 -2
- package/build/lib/web/development/components/Icons/VolumeMuteIcon/VolumeMuteIcon.js +2 -2
- package/build/lib/web/development/components/Icons/WatchIcon/WatchIcon.js +2 -2
- package/build/lib/web/development/components/Icons/WifiIcon/WifiIcon.js +2 -2
- package/build/lib/web/development/components/Icons/WifiOffIcon/WifiOffIcon.js +2 -2
- package/build/lib/web/development/components/Icons/WindIcon/WindIcon.js +2 -2
- package/build/lib/web/development/components/Icons/XCircleIcon/XCircleIcon.js +2 -2
- package/build/lib/web/development/components/Icons/XSquareIcon/XSquareIcon.js +2 -2
- package/build/lib/web/development/components/Icons/ZapIcon/ZapIcon.js +2 -2
- package/build/lib/web/development/components/Icons/ZoomInIcon/ZoomInIcon.js +2 -2
- package/build/lib/web/development/components/Icons/ZoomOutIcon/ZoomOutIcon.js +2 -2
- package/build/lib/web/development/components/Icons/_Svg/Circle/Circle.web.js +2 -2
- package/build/lib/web/development/components/Icons/_Svg/ClipPath/ClipPath.web.js +2 -2
- package/build/lib/web/development/components/Icons/_Svg/Defs/Defs.web.js +2 -2
- package/build/lib/web/development/components/Icons/_Svg/G/G.web.js +2 -2
- package/build/lib/web/development/components/Icons/_Svg/Path/Path.web.js +2 -2
- package/build/lib/web/development/components/Icons/_Svg/Rect/Rect.web.js +2 -2
- package/build/lib/web/development/components/Icons/_Svg/Svg/Svg.web.js +2 -2
- package/build/lib/web/development/components/Indicator/Indicator.js +2 -2
- package/build/lib/web/development/components/Input/BaseInput/AnimatedBaseInputWrapper.web.js +10 -4
- package/build/lib/web/development/components/Input/BaseInput/AnimatedBaseInputWrapper.web.js.map +1 -1
- package/build/lib/web/development/components/Input/BaseInput/BaseInput.js +15 -3
- package/build/lib/web/development/components/Input/BaseInput/BaseInput.js.map +1 -1
- package/build/lib/web/development/components/Input/BaseInput/BaseInputTagSlot.web.js +14 -1
- package/build/lib/web/development/components/Input/BaseInput/BaseInputTagSlot.web.js.map +1 -1
- package/build/lib/web/development/components/Input/BaseInput/BaseInputVisuals.js +2 -2
- package/build/lib/web/development/components/Input/BaseInput/BaseInputWrapper.js +6 -4
- package/build/lib/web/development/components/Input/BaseInput/BaseInputWrapper.js.map +1 -1
- package/build/lib/web/development/components/Input/BaseInput/StyledBaseInput.web.js +7 -4
- package/build/lib/web/development/components/Input/BaseInput/StyledBaseInput.web.js.map +1 -1
- package/build/lib/web/development/components/Input/BaseInput/baseInputStyles.js +4 -4
- package/build/lib/web/development/components/Input/BaseInput/baseInputStyles.js.map +1 -1
- package/build/lib/web/development/components/Input/BaseInput/useTaggedInput.js +172 -0
- package/build/lib/web/development/components/Input/BaseInput/useTaggedInput.js.map +1 -0
- package/build/lib/web/development/components/Input/DropdownInputTriggers/AutoComplete.js +2 -2
- package/build/lib/web/development/components/Input/DropdownInputTriggers/SelectInput.js +2 -2
- package/build/lib/web/development/components/Input/OTPInput/OTPInput.js +2 -2
- package/build/lib/web/development/components/Input/PasswordInput/PasswordInput.js +2 -2
- package/build/lib/web/development/components/Input/PhoneNumberInput/PhoneNumberInput.web.js +2 -2
- package/build/lib/web/development/components/Input/TextArea/TextArea.js +56 -10
- package/build/lib/web/development/components/Input/TextArea/TextArea.js.map +1 -1
- package/build/lib/web/development/components/Input/TextInput/TextInput.js +53 -7
- package/build/lib/web/development/components/Input/TextInput/TextInput.js.map +1 -1
- package/build/lib/web/development/components/Link/BaseLink/BaseLink.js +2 -2
- package/build/lib/web/development/components/Link/BaseLink/StyledBaseLink.web.js +2 -2
- package/build/lib/web/development/components/Link/Link/Link.js +2 -2
- package/build/lib/web/development/components/List/List.js +2 -3
- package/build/lib/web/development/components/List/List.js.map +1 -1
- package/build/lib/web/development/components/List/ListItem.js +2 -2
- package/build/lib/web/development/components/List/ListItemLink.js +2 -2
- package/build/lib/web/development/components/List/ListItemText.js +2 -2
- package/build/lib/web/development/components/LiveAnnouncer/LiveAnnouncer.web.js +1 -2
- package/build/lib/web/development/components/LiveAnnouncer/LiveAnnouncer.web.js.map +1 -1
- package/build/lib/web/development/components/Modal/Modal.web.js +2 -2
- package/build/lib/web/development/components/Modal/ModalBackdrop.js +2 -2
- package/build/lib/web/development/components/Modal/ModalBody.web.js +2 -2
- package/build/lib/web/development/components/Popover/Popover.web.js +2 -2
- package/build/lib/web/development/components/Popover/PopoverInteractiveWrapper.web.js +2 -2
- package/build/lib/web/development/components/Popover/getPopoverContentWrapperStyles.js +2 -2
- package/build/lib/web/development/components/ProgressBar/ProgressBar.js +2 -2
- package/build/lib/web/development/components/Radio/Radio.js +2 -2
- package/build/lib/web/development/components/Radio/RadioGroup/RadioGroup.js +2 -2
- package/build/lib/web/development/components/Radio/RadioIcon/RadioIcon.js +2 -2
- package/build/lib/web/development/components/Radio/RadioIcon/RadioIconWrapperStyles.js +2 -2
- package/build/lib/web/development/components/Radio/useRadio.js +2 -2
- package/build/lib/web/development/components/Skeleton/Skeleton.js +2 -2
- package/build/lib/web/development/components/SkipNav/SkipNav.web.js +2 -2
- package/build/lib/web/development/components/Spinner/BaseSpinner/BaseSpinner.js +2 -2
- package/build/lib/web/development/components/Spinner/Spinner/Spinner.js +2 -2
- package/build/lib/web/development/components/SpotlightPopoverTour/TourFooter.web.js +2 -2
- package/build/lib/web/development/components/SpotlightPopoverTour/TourMask.web.js +2 -2
- package/build/lib/web/development/components/SpotlightPopoverTour/TourPopover.web.js +2 -2
- package/build/lib/web/development/components/SpotlightPopoverTour/TourStep.web.js +2 -2
- package/build/lib/web/development/components/SpotlightPopoverTour/utils.js +2 -2
- package/build/lib/web/development/components/Switch/Switch.js +2 -2
- package/build/lib/web/development/components/Switch/SwitchTrack.web.js +2 -2
- package/build/lib/web/development/components/Switch/Thumb.js +2 -2
- package/build/lib/web/development/components/Table/Table.web.js +2 -2
- package/build/lib/web/development/components/Table/TableBody.web.js +2 -2
- package/build/lib/web/development/components/Table/TableFooter.web.js +2 -2
- package/build/lib/web/development/components/Table/TableHeader.web.js +2 -2
- package/build/lib/web/development/components/Table/TablePagination.web.js +2 -2
- package/build/lib/web/development/components/Table/TableToolbar.web.js +2 -2
- package/build/lib/web/development/components/Tabs/TabIndicator.web.js +2 -2
- package/build/lib/web/development/components/Tabs/TabItem.web.js +9 -9
- package/build/lib/web/development/components/Tabs/TabItem.web.js.map +1 -1
- package/build/lib/web/development/components/Tabs/TabList.web.js +2 -2
- package/build/lib/web/development/components/Tabs/TabPanel.web.js +2 -2
- package/build/lib/web/development/components/Tabs/Tabs.web.js +2 -2
- package/build/lib/web/development/components/Tag/AnimatedTag.web.js +2 -3
- package/build/lib/web/development/components/Tag/AnimatedTag.web.js.map +1 -1
- package/build/lib/web/development/components/Tag/Tag.js +7 -8
- package/build/lib/web/development/components/Tag/Tag.js.map +1 -1
- package/build/lib/web/development/components/Tag/getTagsGroup.js +1 -1
- package/build/lib/web/development/components/Tag/getTagsGroup.js.map +1 -1
- package/build/lib/web/development/components/Tag/tagAnimationConfig.js +4 -2
- package/build/lib/web/development/components/Tag/tagAnimationConfig.js.map +1 -1
- package/build/lib/web/development/components/Toast/Toast.web.js +2 -2
- package/build/lib/web/development/components/Toast/ToastContainer.web.js +2 -2
- package/build/lib/web/development/components/Toast/useToast.js +2 -2
- package/build/lib/web/development/components/Tooltip/Tooltip.web.js +2 -2
- package/build/lib/web/development/components/Tooltip/TooltipInteractiveWrapper.web.js +2 -2
- package/build/lib/web/development/components/Tooltip/getTooltipContentWrapperStyles.js +2 -2
- package/build/lib/web/development/components/Typography/BaseText/BaseText.web.js +2 -2
- package/build/lib/web/development/components/Typography/BaseText/getBaseTextStyles.js +4 -3
- package/build/lib/web/development/components/Typography/BaseText/getBaseTextStyles.js.map +1 -1
- package/build/lib/web/development/components/Typography/Code/Code.js +2 -2
- package/build/lib/web/development/components/Typography/Display/Display.js +2 -2
- package/build/lib/web/development/components/Typography/Heading/Heading.js +2 -2
- package/build/lib/web/development/components/Typography/Heading/getHeadingStyles.js +2 -2
- package/build/lib/web/development/components/Typography/Text/Text.js +2 -2
- package/build/lib/web/development/components/Typography/Text/getTextStyles.js +2 -2
- package/build/lib/web/development/components/VisuallyHidden/VisuallyHidden.web.js +2 -2
- package/build/lib/web/development/tokens/global/border.js +0 -1
- package/build/lib/web/development/tokens/global/border.js.map +1 -1
- package/build/lib/web/development/tokens/global/typography.js +2 -2
- package/build/lib/web/development/tokens/theme/createTheme.js +2 -3
- package/build/lib/web/development/tokens/theme/createTheme.js.map +1 -1
- package/build/lib/web/development/utils/bladeCoverage.js +1 -1
- package/build/lib/web/development/utils/bladeCoverage.js.map +1 -1
- package/build/lib/web/development/utils/makeAccessible/accessibilityMapWeb.js +2 -2
- package/build/lib/web/development/utils/mergeProps.js +19 -18
- package/build/lib/web/development/utils/mergeProps.js.map +1 -1
- package/build/lib/web/development/utils/metaAttribute/metaAttribute.web.js +2 -2
- package/build/lib/web/production/components/Accordion/Accordion.js +2 -2
- package/build/lib/web/production/components/Accordion/AccordionButton.web.js +2 -2
- package/build/lib/web/production/components/Accordion/AccordionItem.js +2 -2
- package/build/lib/web/production/components/Accordion/AccordionItemBody.js +2 -2
- package/build/lib/web/production/components/Accordion/AccordionItemHeader.js +2 -2
- package/build/lib/web/production/components/Accordion/StyledAccordionButton.web.js +2 -2
- package/build/lib/web/production/components/ActionList/ActionList.js +2 -2
- package/build/lib/web/production/components/ActionList/ActionListBox.web.js +2 -2
- package/build/lib/web/production/components/ActionList/ActionListItem.js +2 -2
- package/build/lib/web/production/components/ActionList/actionListUtils.js +2 -2
- package/build/lib/web/production/components/ActionList/styles/StyledActionListItem.web.js +2 -2
- package/build/lib/web/production/components/ActionList/styles/StyledListBoxWrapper.web.js +4 -5
- package/build/lib/web/production/components/ActionList/styles/StyledListBoxWrapper.web.js.map +1 -1
- package/build/lib/web/production/components/Alert/Alert.js +2 -2
- package/build/lib/web/production/components/Amount/Amount.js +5 -3
- package/build/lib/web/production/components/Amount/Amount.js.map +1 -1
- package/build/lib/web/production/components/Badge/Badge.js +2 -2
- package/build/lib/web/production/components/Badge/StyledBadge.web.js +2 -2
- package/build/lib/web/production/components/BaseHeaderFooter/BaseFooter.js +2 -2
- package/build/lib/web/production/components/BaseHeaderFooter/BaseHeader.js +2 -2
- package/build/lib/web/production/components/BladeProvider/useBladeProvider.js +2 -2
- package/build/lib/web/production/components/BottomSheet/BottomSheet.web.js +2 -2
- package/build/lib/web/production/components/BottomSheet/BottomSheetBackdrop.web.js +2 -2
- package/build/lib/web/production/components/BottomSheet/BottomSheetBody.web.js +2 -2
- package/build/lib/web/production/components/BottomSheet/BottomSheetCommon.js +2 -2
- package/build/lib/web/production/components/BottomSheet/BottomSheetFooter.web.js +2 -2
- package/build/lib/web/production/components/BottomSheet/BottomSheetHeader.web.js +2 -2
- package/build/lib/web/production/components/BottomSheet/getBottomSheetGrabHandleStyles.js +2 -2
- package/build/lib/web/production/components/Box/BaseBox/BaseBox.web.js +2 -2
- package/build/lib/web/production/components/Box/BaseBox/baseBoxStyles.js +4 -3
- package/build/lib/web/production/components/Box/BaseBox/baseBoxStyles.js.map +1 -1
- package/build/lib/web/production/components/Box/BaseBox/types/propsTypes.js.map +1 -1
- package/build/lib/web/production/components/Box/BaseBox/useMemoizedStyles.web.js +2 -2
- package/build/lib/web/production/components/Box/Box.js +2 -2
- package/build/lib/web/production/components/Box/styledProps/getStyledProps.js +3 -1
- package/build/lib/web/production/components/Box/styledProps/getStyledProps.js.map +1 -1
- package/build/lib/web/production/components/Box/styledProps/useStyledProps.js +4 -3
- package/build/lib/web/production/components/Box/styledProps/useStyledProps.js.map +1 -1
- package/build/lib/web/production/components/Breadcrumb/Breadcrumb.web.js +2 -2
- package/build/lib/web/production/components/Button/BaseButton/BaseButton.js +2 -3
- package/build/lib/web/production/components/Button/BaseButton/BaseButton.js.map +1 -1
- package/build/lib/web/production/components/Button/BaseButton/StyledBaseButton.web.js +2 -2
- package/build/lib/web/production/components/Button/Button/Button.js +2 -2
- package/build/lib/web/production/components/Button/IconButton/StyledIconButton.web.js +2 -2
- package/build/lib/web/production/components/ButtonGroup/ButtonGroup.web.js +2 -3
- package/build/lib/web/production/components/ButtonGroup/ButtonGroup.web.js.map +1 -1
- package/build/lib/web/production/components/Card/Card.js +2 -2
- package/build/lib/web/production/components/Card/CardFooter.js +2 -2
- package/build/lib/web/production/components/Card/CardHeader.js +2 -2
- package/build/lib/web/production/components/Card/CardRoot.web.js +5 -6
- package/build/lib/web/production/components/Card/CardRoot.web.js.map +1 -1
- package/build/lib/web/production/components/Carousel/Carousel.web.js +2 -2
- package/build/lib/web/production/components/Carousel/CarouselItem.web.js +2 -2
- package/build/lib/web/production/components/Carousel/Indicators/IndicatorButton.js +2 -2
- package/build/lib/web/production/components/Carousel/Indicators/Indicators.js +2 -2
- package/build/lib/web/production/components/Carousel/Indicators/getIndicatorButtonStyles.js +2 -2
- package/build/lib/web/production/components/Carousel/NavigationButton/NavigationButton.js +2 -2
- package/build/lib/web/production/components/Carousel/NavigationButton/getNavigationButtonStyles.js +2 -2
- package/build/lib/web/production/components/Checkbox/Checkbox.js +2 -2
- package/build/lib/web/production/components/Checkbox/CheckboxGroup/CheckboxGroup.js +2 -2
- package/build/lib/web/production/components/Checkbox/CheckboxIcon/CheckboxIcon.js +2 -2
- package/build/lib/web/production/components/Checkbox/CheckboxIcon/Fade.web.js +2 -2
- package/build/lib/web/production/components/Checkbox/useCheckbox.js +2 -2
- package/build/lib/web/production/components/Chip/AnimatedChip.web.js +2 -2
- package/build/lib/web/production/components/Chip/Chip.js +2 -2
- package/build/lib/web/production/components/Chip/ChipGroup.js +2 -2
- package/build/lib/web/production/components/Chip/StyledChipWrapper.web.js +2 -2
- package/build/lib/web/production/components/Collapsible/Collapsible.js +2 -2
- package/build/lib/web/production/components/Collapsible/CollapsibleBody.js +2 -2
- package/build/lib/web/production/components/Collapsible/CollapsibleBodyContent.web.js +2 -2
- package/build/lib/web/production/components/Collapsible/CollapsibleChevronIcon.web.js +2 -2
- package/build/lib/web/production/components/Counter/Counter.js +2 -2
- package/build/lib/web/production/components/Counter/StyledCounter.web.js +2 -2
- package/build/lib/web/production/components/Divider/Divider.js +4 -5
- package/build/lib/web/production/components/Divider/Divider.js.map +1 -1
- package/build/lib/web/production/components/Drawer/Drawer.web.js +2 -2
- package/build/lib/web/production/components/Dropdown/Dropdown.js +2 -2
- package/build/lib/web/production/components/Dropdown/DropdownButton.js +2 -2
- package/build/lib/web/production/components/Dropdown/DropdownHeaderFooter.js +2 -2
- package/build/lib/web/production/components/Dropdown/DropdownLink.js +2 -2
- package/build/lib/web/production/components/Dropdown/DropdownOverlay.web.js +2 -2
- package/build/lib/web/production/components/Dropdown/useDropdown.js +2 -2
- package/build/lib/web/production/components/FileUpload/FileUpload.web.js +2 -2
- package/build/lib/web/production/components/FileUpload/FileUploadItemIcon.js +2 -2
- package/build/lib/web/production/components/FileUpload/StyledFileUploadItemWrapper.js +2 -2
- package/build/lib/web/production/components/FileUpload/StyledFileUploadWrapper.js +2 -2
- package/build/lib/web/production/components/Form/FormLabel.js +2 -2
- package/build/lib/web/production/components/Form/Selector/SelectorGroupField.js +2 -2
- package/build/lib/web/production/components/Form/Selector/SelectorInput.web.js +2 -2
- package/build/lib/web/production/components/Form/Selector/SelectorLabel.web.js +2 -2
- package/build/lib/web/production/components/Icons/ActivityIcon/ActivityIcon.js +2 -2
- package/build/lib/web/production/components/Icons/AirplayIcon/AirplayIcon.js +2 -2
- package/build/lib/web/production/components/Icons/AlertCircleIcon/AlertCircleIcon.js +2 -2
- package/build/lib/web/production/components/Icons/AlertOctagonIcon/AlertOctagonIcon.js +2 -2
- package/build/lib/web/production/components/Icons/AlertOnlyIcon/AlertOnlyIcon.js +2 -2
- package/build/lib/web/production/components/Icons/AlertTriangleIcon/AlertTriangleIcon.js +2 -2
- package/build/lib/web/production/components/Icons/AlignCenterIcon/AlignCenterIcon.js +2 -2
- package/build/lib/web/production/components/Icons/AlignJustifyIcon/AlignJustifyIcon.js +2 -2
- package/build/lib/web/production/components/Icons/AlignLeftIcon/AlignLeftIcon.js +2 -2
- package/build/lib/web/production/components/Icons/AlignRightIcon/AlignRightIcon.js +2 -2
- package/build/lib/web/production/components/Icons/AnchorIcon/AnchorIcon.js +2 -2
- package/build/lib/web/production/components/Icons/AnnouncementIcon/AnnouncementIcon.js +2 -2
- package/build/lib/web/production/components/Icons/ApertureIcon/ApertureIcon.js +2 -2
- package/build/lib/web/production/components/Icons/AppStoreIcon/AppStoreIcon.js +2 -2
- package/build/lib/web/production/components/Icons/ArrowDownIcon/ArrowDownIcon.js +2 -2
- package/build/lib/web/production/components/Icons/ArrowDownLeftIcon/ArrowDownLeftIcon.js +2 -2
- package/build/lib/web/production/components/Icons/ArrowDownRightIcon/ArrowDownRightIcon.js +2 -2
- package/build/lib/web/production/components/Icons/ArrowLeftIcon/ArrowLeftIcon.js +2 -2
- package/build/lib/web/production/components/Icons/ArrowRightIcon/ArrowRightIcon.js +2 -2
- package/build/lib/web/production/components/Icons/ArrowUpIcon/ArrowUpIcon.js +2 -2
- package/build/lib/web/production/components/Icons/ArrowUpLeftIcon/ArrowUpLeftIcon.js +2 -2
- package/build/lib/web/production/components/Icons/ArrowUpRightIcon/ArrowUpRightIcon.js +2 -2
- package/build/lib/web/production/components/Icons/AtSignIcon/AtSignIcon.js +2 -2
- package/build/lib/web/production/components/Icons/AttachmentIcon/AttachmentIcon.js +2 -2
- package/build/lib/web/production/components/Icons/AwardIcon/AwardIcon.js +2 -2
- package/build/lib/web/production/components/Icons/BankIcon/BankIcon.js +2 -2
- package/build/lib/web/production/components/Icons/BarChartAltIcon/BarChartAltIcon.js +2 -2
- package/build/lib/web/production/components/Icons/BarChartIcon/BarChartIcon.js +2 -2
- package/build/lib/web/production/components/Icons/BatteryChargingIcon/BatteryChargingIcon.js +2 -2
- package/build/lib/web/production/components/Icons/BatteryIcon/BatteryIcon.js +2 -2
- package/build/lib/web/production/components/Icons/BellIcon/BellIcon.js +2 -2
- package/build/lib/web/production/components/Icons/BellOffIcon/BellOffIcon.js +2 -2
- package/build/lib/web/production/components/Icons/BillIcon/BillIcon.js +2 -2
- package/build/lib/web/production/components/Icons/BluetoothIcon/BluetoothIcon.js +2 -2
- package/build/lib/web/production/components/Icons/BoldIcon/BoldIcon.js +2 -2
- package/build/lib/web/production/components/Icons/BookIcon/BookIcon.js +2 -2
- package/build/lib/web/production/components/Icons/BookmarkIcon/BookmarkIcon.js +2 -2
- package/build/lib/web/production/components/Icons/BoxIcon/BoxIcon.js +2 -2
- package/build/lib/web/production/components/Icons/BriefcaseIcon/BriefcaseIcon.js +2 -2
- package/build/lib/web/production/components/Icons/BulkPayoutsIcon/BulkPayoutsIcon.js +2 -2
- package/build/lib/web/production/components/Icons/CalendarIcon/CalendarIcon.js +2 -2
- package/build/lib/web/production/components/Icons/CameraIcon/CameraIcon.js +2 -2
- package/build/lib/web/production/components/Icons/CameraOffIcon/CameraOffIcon.js +2 -2
- package/build/lib/web/production/components/Icons/CastIcon/CastIcon.js +2 -2
- package/build/lib/web/production/components/Icons/CheckCircleIcon/CheckCircleIcon.js +2 -2
- package/build/lib/web/production/components/Icons/CheckIcon/CheckIcon.js +2 -2
- package/build/lib/web/production/components/Icons/CheckSquareIcon/CheckSquareIcon.js +2 -2
- package/build/lib/web/production/components/Icons/ChevronDownIcon/ChevronDownIcon.js +2 -2
- package/build/lib/web/production/components/Icons/ChevronLeftIcon/ChevronLeftIcon.js +2 -2
- package/build/lib/web/production/components/Icons/ChevronRightIcon/ChevronRightIcon.js +2 -2
- package/build/lib/web/production/components/Icons/ChevronUpIcon/ChevronUpIcon.js +2 -2
- package/build/lib/web/production/components/Icons/ChevronsDownIcon/ChevronsDownIcon.js +2 -2
- package/build/lib/web/production/components/Icons/ChevronsLeftIcon/ChevronsLeftIcon.js +2 -2
- package/build/lib/web/production/components/Icons/ChevronsRightIcon/ChevronsRightIcon.js +2 -2
- package/build/lib/web/production/components/Icons/ChevronsUpIcon/ChevronsUpIcon.js +2 -2
- package/build/lib/web/production/components/Icons/ChromeIcon/ChromeIcon.js +2 -2
- package/build/lib/web/production/components/Icons/CircleIcon/CircleIcon.js +2 -2
- package/build/lib/web/production/components/Icons/ClipboardIcon/ClipboardIcon.js +2 -2
- package/build/lib/web/production/components/Icons/ClockIcon/ClockIcon.js +2 -2
- package/build/lib/web/production/components/Icons/CloseIcon/CloseIcon.js +2 -2
- package/build/lib/web/production/components/Icons/CloudDrizzleIcon/CloudDrizzleIcon.js +2 -2
- package/build/lib/web/production/components/Icons/CloudIcon/CloudIcon.js +2 -2
- package/build/lib/web/production/components/Icons/CloudLightningIcon/CloudLightningIcon.js +2 -2
- package/build/lib/web/production/components/Icons/CloudOffIcon/CloudOffIcon.js +2 -2
- package/build/lib/web/production/components/Icons/CloudRainIcon/CloudRainIcon.js +2 -2
- package/build/lib/web/production/components/Icons/CloudSnowIcon/CloudSnowIcon.js +2 -2
- package/build/lib/web/production/components/Icons/CodepenIcon/CodepenIcon.js +2 -2
- package/build/lib/web/production/components/Icons/CoinsIcon/CoinsIcon.js +2 -2
- package/build/lib/web/production/components/Icons/CommandIcon/CommandIcon.js +2 -2
- package/build/lib/web/production/components/Icons/CompassIcon/CompassIcon.js +2 -2
- package/build/lib/web/production/components/Icons/CopyIcon/CopyIcon.js +2 -2
- package/build/lib/web/production/components/Icons/CornerDownLeftIcon/CornerDownLeftIcon.js +2 -2
- package/build/lib/web/production/components/Icons/CornerDownRightIcon/CornerDownRightIcon.js +2 -2
- package/build/lib/web/production/components/Icons/CornerLeftDownIcon/CornerLeftDownIcon.js +2 -2
- package/build/lib/web/production/components/Icons/CornerLeftUpIcon/CornerLeftUpIcon.js +2 -2
- package/build/lib/web/production/components/Icons/CornerRightDownIcon/CornerRightDownIcon.js +2 -2
- package/build/lib/web/production/components/Icons/CornerRightUpIcon/CornerRightUpIcon.js +2 -2
- package/build/lib/web/production/components/Icons/CornerUpLeftIcon/CornerUpLeftIcon.js +2 -2
- package/build/lib/web/production/components/Icons/CornerUpRightIcon/CornerUpRightIcon.js +2 -2
- package/build/lib/web/production/components/Icons/CpuIcon/CpuIcon.js +2 -2
- package/build/lib/web/production/components/Icons/CreditCardIcon/CreditCardIcon.js +2 -2
- package/build/lib/web/production/components/Icons/CropIcon/CropIcon.js +2 -2
- package/build/lib/web/production/components/Icons/CrosshairIcon/CrosshairIcon.js +2 -2
- package/build/lib/web/production/components/Icons/CustomersIcon/CustomersIcon.js +2 -2
- package/build/lib/web/production/components/Icons/CutIcon/CutIcon.js +2 -2
- package/build/lib/web/production/components/Icons/DashboardIcon/DashboardIcon.js +2 -2
- package/build/lib/web/production/components/Icons/DeleteIcon/DeleteIcon.js +2 -2
- package/build/lib/web/production/components/Icons/DiscIcon/DiscIcon.js +2 -2
- package/build/lib/web/production/components/Icons/DollarIcon/DollarIcon.js +2 -2
- package/build/lib/web/production/components/Icons/DollarsIcon/DollarsIcon.js +2 -2
- package/build/lib/web/production/components/Icons/DownloadCloudIcon/DownloadCloudIcon.js +2 -2
- package/build/lib/web/production/components/Icons/DownloadIcon/DownloadIcon.js +2 -2
- package/build/lib/web/production/components/Icons/DropletIcon/DropletIcon.js +2 -2
- package/build/lib/web/production/components/Icons/EditComposeIcon/EditComposeIcon.js +2 -2
- package/build/lib/web/production/components/Icons/EditIcon/EditIcon.js +2 -2
- package/build/lib/web/production/components/Icons/EditInlineIcon/EditInlineIcon.js +2 -2
- package/build/lib/web/production/components/Icons/ExportIcon/ExportIcon.js +2 -2
- package/build/lib/web/production/components/Icons/ExternalLinkIcon/ExternalLinkIcon.js +2 -2
- package/build/lib/web/production/components/Icons/EyeIcon/EyeIcon.js +2 -2
- package/build/lib/web/production/components/Icons/EyeOffIcon/EyeOffIcon.js +2 -2
- package/build/lib/web/production/components/Icons/FacebookIcon/FacebookIcon.js +2 -2
- package/build/lib/web/production/components/Icons/FastForwardIcon/FastForwardIcon.js +2 -2
- package/build/lib/web/production/components/Icons/FeatherIcon/FeatherIcon.js +2 -2
- package/build/lib/web/production/components/Icons/FileIcon/FileIcon.js +2 -2
- package/build/lib/web/production/components/Icons/FileMinusIcon/FileMinusIcon.js +2 -2
- package/build/lib/web/production/components/Icons/FilePlusIcon/FilePlusIcon.js +2 -2
- package/build/lib/web/production/components/Icons/FileTextIcon/FileTextIcon.js +2 -2
- package/build/lib/web/production/components/Icons/FileZipIcon/FileZipIcon.js +2 -2
- package/build/lib/web/production/components/Icons/FilmIcon/FilmIcon.js +2 -2
- package/build/lib/web/production/components/Icons/FilterIcon/FilterIcon.js +2 -2
- package/build/lib/web/production/components/Icons/FlagIcon/FlagIcon.js +2 -2
- package/build/lib/web/production/components/Icons/FolderIcon/FolderIcon.js +2 -2
- package/build/lib/web/production/components/Icons/FullScreenEnterIcon/FullScreenEnterIcon.js +2 -2
- package/build/lib/web/production/components/Icons/FullScreenExitIcon/FullScreenExitIcon.js +2 -2
- package/build/lib/web/production/components/Icons/GithubIcon/GithubIcon.js +2 -2
- package/build/lib/web/production/components/Icons/GitlabIcon/GitlabIcon.js +2 -2
- package/build/lib/web/production/components/Icons/GlobeIcon/GlobeIcon.js +2 -2
- package/build/lib/web/production/components/Icons/GridIcon/GridIcon.js +2 -2
- package/build/lib/web/production/components/Icons/HashIcon/HashIcon.js +2 -2
- package/build/lib/web/production/components/Icons/HeadphonesIcon/HeadphonesIcon.js +2 -2
- package/build/lib/web/production/components/Icons/HeartIcon/HeartIcon.js +2 -2
- package/build/lib/web/production/components/Icons/HelpCircleIcon/HelpCircleIcon.js +2 -2
- package/build/lib/web/production/components/Icons/HistoryIcon/HistoryIcon.js +2 -2
- package/build/lib/web/production/components/Icons/HomeIcon/HomeIcon.js +2 -2
- package/build/lib/web/production/components/Icons/ImageIcon/ImageIcon.js +2 -2
- package/build/lib/web/production/components/Icons/InboxIcon/InboxIcon.js +2 -2
- package/build/lib/web/production/components/Icons/InfoIcon/InfoIcon.js +2 -2
- package/build/lib/web/production/components/Icons/InstagramIcon/InstagramIcon.js +2 -2
- package/build/lib/web/production/components/Icons/InvoicesIcon/InvoicesIcon.js +2 -2
- package/build/lib/web/production/components/Icons/ItalicIcon/ItalicIcon.js +2 -2
- package/build/lib/web/production/components/Icons/LayersIcon/LayersIcon.js +2 -2
- package/build/lib/web/production/components/Icons/LayoutIcon/LayoutIcon.js +2 -2
- package/build/lib/web/production/components/Icons/LifeBuoyIcon/LifeBuoyIcon.js +2 -2
- package/build/lib/web/production/components/Icons/LinkIcon/LinkIcon.js +2 -2
- package/build/lib/web/production/components/Icons/ListIcon/ListIcon.js +2 -2
- package/build/lib/web/production/components/Icons/LoaderIcon/LoaderIcon.js +2 -2
- package/build/lib/web/production/components/Icons/LockIcon/LockIcon.js +2 -2
- package/build/lib/web/production/components/Icons/LogInIcon/LogInIcon.js +2 -2
- package/build/lib/web/production/components/Icons/LogOutIcon/LogOutIcon.js +2 -2
- package/build/lib/web/production/components/Icons/MailIcon/MailIcon.js +2 -2
- package/build/lib/web/production/components/Icons/MailOpenIcon/MailOpenIcon.js +2 -2
- package/build/lib/web/production/components/Icons/MapIcon/MapIcon.js +2 -2
- package/build/lib/web/production/components/Icons/MapPinIcon/MapPinIcon.js +2 -2
- package/build/lib/web/production/components/Icons/MaximizeIcon/MaximizeIcon.js +2 -2
- package/build/lib/web/production/components/Icons/MenuDotsIcon/MenuDotsIcon.js +2 -2
- package/build/lib/web/production/components/Icons/MenuIcon/MenuIcon.js +2 -2
- package/build/lib/web/production/components/Icons/MessageCircleIcon/MessageCircleIcon.js +2 -2
- package/build/lib/web/production/components/Icons/MessageSquareIcon/MessageSquareIcon.js +2 -2
- package/build/lib/web/production/components/Icons/MicIcon/MicIcon.js +2 -2
- package/build/lib/web/production/components/Icons/MicOffIcon/MicOffIcon.js +2 -2
- package/build/lib/web/production/components/Icons/MinimizeIcon/MinimizeIcon.js +2 -2
- package/build/lib/web/production/components/Icons/MinusCircleIcon/MinusCircleIcon.js +2 -2
- package/build/lib/web/production/components/Icons/MinusIcon/MinusIcon.js +2 -2
- package/build/lib/web/production/components/Icons/MinusSquareIcon/MinusSquareIcon.js +2 -2
- package/build/lib/web/production/components/Icons/MonitorIcon/MonitorIcon.js +2 -2
- package/build/lib/web/production/components/Icons/MoonIcon/MoonIcon.js +2 -2
- package/build/lib/web/production/components/Icons/MoreHorizontalIcon/MoreHorizontalIcon.js +2 -2
- package/build/lib/web/production/components/Icons/MoreVerticalIcon/MoreVerticalIcon.js +2 -2
- package/build/lib/web/production/components/Icons/MoveIcon/MoveIcon.js +2 -2
- package/build/lib/web/production/components/Icons/MusicIcon/MusicIcon.js +2 -2
- package/build/lib/web/production/components/Icons/MyAccountIcon/MyAccountIcon.js +2 -2
- package/build/lib/web/production/components/Icons/NavigationIcon/NavigationIcon.js +2 -2
- package/build/lib/web/production/components/Icons/OctagonIcon/OctagonIcon.js +2 -2
- package/build/lib/web/production/components/Icons/OffersIcon/OffersIcon.js +2 -2
- package/build/lib/web/production/components/Icons/PackageIcon/PackageIcon.js +2 -2
- package/build/lib/web/production/components/Icons/PaperclipIcon/PaperclipIcon.js +2 -2
- package/build/lib/web/production/components/Icons/PauseCircleIcon/PauseCircleIcon.js +2 -2
- package/build/lib/web/production/components/Icons/PauseIcon/PauseIcon.js +2 -2
- package/build/lib/web/production/components/Icons/PaymentButtonsIcon/PaymentButtonsIcon.js +2 -2
- package/build/lib/web/production/components/Icons/PaymentLinksIcon/PaymentLinksIcon.js +2 -2
- package/build/lib/web/production/components/Icons/PaymentPagesIcon/PaymentPagesIcon.js +2 -2
- package/build/lib/web/production/components/Icons/PercentIcon/PercentIcon.js +2 -2
- package/build/lib/web/production/components/Icons/PhoneCallIcon/PhoneCallIcon.js +2 -2
- package/build/lib/web/production/components/Icons/PhoneForwardedIcon/PhoneForwardedIcon.js +2 -2
- package/build/lib/web/production/components/Icons/PhoneIcon/PhoneIcon.js +2 -2
- package/build/lib/web/production/components/Icons/PhoneIncomingIcon/PhoneIncomingIcon.js +2 -2
- package/build/lib/web/production/components/Icons/PhoneMissedIcon/PhoneMissedIcon.js +2 -2
- package/build/lib/web/production/components/Icons/PhoneOffIcon/PhoneOffIcon.js +2 -2
- package/build/lib/web/production/components/Icons/PhoneOutgoingIcon/PhoneOutgoingIcon.js +2 -2
- package/build/lib/web/production/components/Icons/PieChartIcon/PieChartIcon.js +2 -2
- package/build/lib/web/production/components/Icons/PlayCircleIcon/PlayCircleIcon.js +2 -2
- package/build/lib/web/production/components/Icons/PlayIcon/PlayIcon.js +2 -2
- package/build/lib/web/production/components/Icons/PlusCircleIcon/PlusCircleIcon.js +2 -2
- package/build/lib/web/production/components/Icons/PlusIcon/PlusIcon.js +2 -2
- package/build/lib/web/production/components/Icons/PlusSquareIcon/PlusSquareIcon.js +2 -2
- package/build/lib/web/production/components/Icons/PocketIcon/PocketIcon.js +2 -2
- package/build/lib/web/production/components/Icons/PowerIcon/PowerIcon.js +2 -2
- package/build/lib/web/production/components/Icons/PrinterIcon/PrinterIcon.js +2 -2
- package/build/lib/web/production/components/Icons/QRCodeIcon/QRCodeIcon.js +2 -2
- package/build/lib/web/production/components/Icons/RadioIcon/RadioIcon.js +2 -2
- package/build/lib/web/production/components/Icons/RazorpayIcon/RazorpayIcon.js +2 -2
- package/build/lib/web/production/components/Icons/RazorpayXIcon/RazorpayXIcon.js +2 -2
- package/build/lib/web/production/components/Icons/RefreshIcon/RefreshIcon.js +2 -2
- package/build/lib/web/production/components/Icons/RepeatIcon/RepeatIcon.js +2 -2
- package/build/lib/web/production/components/Icons/ReportsIcon/ReportsIcon.js +2 -2
- package/build/lib/web/production/components/Icons/RewindIcon/RewindIcon.js +2 -2
- package/build/lib/web/production/components/Icons/RotateClockWiseIcon/RotateClockWiseIcon.js +2 -2
- package/build/lib/web/production/components/Icons/RotateCounterClockWiseIcon/RotateCounterClockWiseIcon.js +2 -2
- package/build/lib/web/production/components/Icons/RoutesIcon/RoutesIcon.js +2 -2
- package/build/lib/web/production/components/Icons/RupeeIcon/RupeeIcon.js +2 -2
- package/build/lib/web/production/components/Icons/RupeesIcon/RupeesIcon.js +2 -2
- package/build/lib/web/production/components/Icons/SaveIcon/SaveIcon.js +2 -2
- package/build/lib/web/production/components/Icons/ScissorsIcon/ScissorsIcon.js +2 -2
- package/build/lib/web/production/components/Icons/SearchIcon/SearchIcon.js +2 -2
- package/build/lib/web/production/components/Icons/SendIcon/SendIcon.js +2 -2
- package/build/lib/web/production/components/Icons/ServerIcon/ServerIcon.js +2 -2
- package/build/lib/web/production/components/Icons/SettingsIcon/SettingsIcon.js +2 -2
- package/build/lib/web/production/components/Icons/SettlementsIcon/SettlementsIcon.js +2 -2
- package/build/lib/web/production/components/Icons/ShareIcon/ShareIcon.js +2 -2
- package/build/lib/web/production/components/Icons/ShieldIcon/ShieldIcon.js +2 -2
- package/build/lib/web/production/components/Icons/ShoppingCartIcon/ShoppingCartIcon.js +2 -2
- package/build/lib/web/production/components/Icons/ShuffleIcon/ShuffleIcon.js +2 -2
- package/build/lib/web/production/components/Icons/SidebarIcon/SidebarIcon.js +2 -2
- package/build/lib/web/production/components/Icons/SkipBackIcon/SkipBackIcon.js +2 -2
- package/build/lib/web/production/components/Icons/SkipForwardIcon/SkipForwardIcon.js +2 -2
- package/build/lib/web/production/components/Icons/SlackIcon/SlackIcon.js +2 -2
- package/build/lib/web/production/components/Icons/SlashIcon/SlashIcon.js +2 -2
- package/build/lib/web/production/components/Icons/SlidersIcon/SlidersIcon.js +2 -2
- package/build/lib/web/production/components/Icons/SmartCollectIcon/SmartCollectIcon.js +2 -2
- package/build/lib/web/production/components/Icons/SmartphoneIcon/SmartphoneIcon.js +2 -2
- package/build/lib/web/production/components/Icons/SpeakerIcon/SpeakerIcon.js +2 -2
- package/build/lib/web/production/components/Icons/SquareIcon/SquareIcon.js +2 -2
- package/build/lib/web/production/components/Icons/StampIcon/StampIcon.js +2 -2
- package/build/lib/web/production/components/Icons/StarIcon/StarIcon.js +2 -2
- package/build/lib/web/production/components/Icons/StopCircleIcon/StopCircleIcon.js +2 -2
- package/build/lib/web/production/components/Icons/SubscriptionsIcon/SubscriptionsIcon.js +2 -2
- package/build/lib/web/production/components/Icons/SunIcon/SunIcon.js +2 -2
- package/build/lib/web/production/components/Icons/SunriseIcon/SunriseIcon.js +2 -2
- package/build/lib/web/production/components/Icons/SunsetIcon/SunsetIcon.js +2 -2
- package/build/lib/web/production/components/Icons/TabletIcon/TabletIcon.js +2 -2
- package/build/lib/web/production/components/Icons/TagIcon/TagIcon.js +2 -2
- package/build/lib/web/production/components/Icons/TargetIcon/TargetIcon.js +2 -2
- package/build/lib/web/production/components/Icons/ThermometerIcon/ThermometerIcon.js +2 -2
- package/build/lib/web/production/components/Icons/ThumbsDownIcon/ThumbsDownIcon.js +2 -2
- package/build/lib/web/production/components/Icons/ThumbsUpIcon/ThumbsUpIcon.js +2 -2
- package/build/lib/web/production/components/Icons/ToggleLeftIcon/ToggleLeftIcon.js +2 -2
- package/build/lib/web/production/components/Icons/ToggleRightIcon/ToggleRightIcon.js +2 -2
- package/build/lib/web/production/components/Icons/TransactionsIcon/TransactionsIcon.js +2 -2
- package/build/lib/web/production/components/Icons/TrashIcon/TrashIcon.js +2 -2
- package/build/lib/web/production/components/Icons/TrendingDownIcon/TrendingDownIcon.js +2 -2
- package/build/lib/web/production/components/Icons/TrendingUpIcon/TrendingUpIcon.js +2 -2
- package/build/lib/web/production/components/Icons/TriangleIcon/TriangleIcon.js +2 -2
- package/build/lib/web/production/components/Icons/TvIcon/TvIcon.js +2 -2
- package/build/lib/web/production/components/Icons/TwitterIcon/TwitterIcon.js +2 -2
- package/build/lib/web/production/components/Icons/TypeIcon/TypeIcon.js +2 -2
- package/build/lib/web/production/components/Icons/UmbrellaIcon/UmbrellaIcon.js +2 -2
- package/build/lib/web/production/components/Icons/UnderlineIcon/UnderlineIcon.js +2 -2
- package/build/lib/web/production/components/Icons/UnlockIcon/UnlockIcon.js +2 -2
- package/build/lib/web/production/components/Icons/UploadCloudIcon/UploadCloudIcon.js +2 -2
- package/build/lib/web/production/components/Icons/UploadIcon/UploadIcon.js +2 -2
- package/build/lib/web/production/components/Icons/UserCheckIcon/UserCheckIcon.js +2 -2
- package/build/lib/web/production/components/Icons/UserIcon/UserIcon.js +2 -2
- package/build/lib/web/production/components/Icons/UserMinusIcon/UserMinusIcon.js +2 -2
- package/build/lib/web/production/components/Icons/UserPlusIcon/UserPlusIcon.js +2 -2
- package/build/lib/web/production/components/Icons/UserXIcon/UserXIcon.js +2 -2
- package/build/lib/web/production/components/Icons/UsersIcon/UsersIcon.js +2 -2
- package/build/lib/web/production/components/Icons/VideoIcon/VideoIcon.js +2 -2
- package/build/lib/web/production/components/Icons/VideoOffIcon/VideoOffIcon.js +2 -2
- package/build/lib/web/production/components/Icons/VoicemailIcon/VoicemailIcon.js +2 -2
- package/build/lib/web/production/components/Icons/VolumeHighIcon/VolumeHighIcon.js +2 -2
- package/build/lib/web/production/components/Icons/VolumeIcon/VolumeIcon.js +2 -2
- package/build/lib/web/production/components/Icons/VolumeLowIcon/VolumeLowIcon.js +2 -2
- package/build/lib/web/production/components/Icons/VolumeMuteIcon/VolumeMuteIcon.js +2 -2
- package/build/lib/web/production/components/Icons/WatchIcon/WatchIcon.js +2 -2
- package/build/lib/web/production/components/Icons/WifiIcon/WifiIcon.js +2 -2
- package/build/lib/web/production/components/Icons/WifiOffIcon/WifiOffIcon.js +2 -2
- package/build/lib/web/production/components/Icons/WindIcon/WindIcon.js +2 -2
- package/build/lib/web/production/components/Icons/XCircleIcon/XCircleIcon.js +2 -2
- package/build/lib/web/production/components/Icons/XSquareIcon/XSquareIcon.js +2 -2
- package/build/lib/web/production/components/Icons/ZapIcon/ZapIcon.js +2 -2
- package/build/lib/web/production/components/Icons/ZoomInIcon/ZoomInIcon.js +2 -2
- package/build/lib/web/production/components/Icons/ZoomOutIcon/ZoomOutIcon.js +2 -2
- package/build/lib/web/production/components/Icons/_Svg/Circle/Circle.web.js +2 -2
- package/build/lib/web/production/components/Icons/_Svg/ClipPath/ClipPath.web.js +2 -2
- package/build/lib/web/production/components/Icons/_Svg/Defs/Defs.web.js +2 -2
- package/build/lib/web/production/components/Icons/_Svg/G/G.web.js +2 -2
- package/build/lib/web/production/components/Icons/_Svg/Path/Path.web.js +2 -2
- package/build/lib/web/production/components/Icons/_Svg/Rect/Rect.web.js +2 -2
- package/build/lib/web/production/components/Icons/_Svg/Svg/Svg.web.js +2 -2
- package/build/lib/web/production/components/Indicator/Indicator.js +2 -2
- package/build/lib/web/production/components/Input/BaseInput/AnimatedBaseInputWrapper.web.js +10 -4
- package/build/lib/web/production/components/Input/BaseInput/AnimatedBaseInputWrapper.web.js.map +1 -1
- package/build/lib/web/production/components/Input/BaseInput/BaseInput.js +15 -3
- package/build/lib/web/production/components/Input/BaseInput/BaseInput.js.map +1 -1
- package/build/lib/web/production/components/Input/BaseInput/BaseInputTagSlot.web.js +14 -1
- package/build/lib/web/production/components/Input/BaseInput/BaseInputTagSlot.web.js.map +1 -1
- package/build/lib/web/production/components/Input/BaseInput/BaseInputVisuals.js +2 -2
- package/build/lib/web/production/components/Input/BaseInput/BaseInputWrapper.js +6 -4
- package/build/lib/web/production/components/Input/BaseInput/BaseInputWrapper.js.map +1 -1
- package/build/lib/web/production/components/Input/BaseInput/StyledBaseInput.web.js +7 -4
- package/build/lib/web/production/components/Input/BaseInput/StyledBaseInput.web.js.map +1 -1
- package/build/lib/web/production/components/Input/BaseInput/baseInputStyles.js +4 -4
- package/build/lib/web/production/components/Input/BaseInput/baseInputStyles.js.map +1 -1
- package/build/lib/web/production/components/Input/BaseInput/useTaggedInput.js +172 -0
- package/build/lib/web/production/components/Input/BaseInput/useTaggedInput.js.map +1 -0
- package/build/lib/web/production/components/Input/DropdownInputTriggers/AutoComplete.js +2 -2
- package/build/lib/web/production/components/Input/DropdownInputTriggers/SelectInput.js +2 -2
- package/build/lib/web/production/components/Input/OTPInput/OTPInput.js +2 -2
- package/build/lib/web/production/components/Input/PasswordInput/PasswordInput.js +2 -2
- package/build/lib/web/production/components/Input/PhoneNumberInput/PhoneNumberInput.web.js +2 -2
- package/build/lib/web/production/components/Input/TextArea/TextArea.js +56 -10
- package/build/lib/web/production/components/Input/TextArea/TextArea.js.map +1 -1
- package/build/lib/web/production/components/Input/TextInput/TextInput.js +53 -7
- package/build/lib/web/production/components/Input/TextInput/TextInput.js.map +1 -1
- package/build/lib/web/production/components/Link/BaseLink/BaseLink.js +2 -2
- package/build/lib/web/production/components/Link/BaseLink/StyledBaseLink.web.js +2 -2
- package/build/lib/web/production/components/Link/Link/Link.js +2 -2
- package/build/lib/web/production/components/List/List.js +2 -3
- package/build/lib/web/production/components/List/List.js.map +1 -1
- package/build/lib/web/production/components/List/ListItem.js +2 -2
- package/build/lib/web/production/components/List/ListItemLink.js +2 -2
- package/build/lib/web/production/components/List/ListItemText.js +2 -2
- package/build/lib/web/production/components/LiveAnnouncer/LiveAnnouncer.web.js +1 -2
- package/build/lib/web/production/components/LiveAnnouncer/LiveAnnouncer.web.js.map +1 -1
- package/build/lib/web/production/components/Modal/Modal.web.js +2 -2
- package/build/lib/web/production/components/Modal/ModalBackdrop.js +2 -2
- package/build/lib/web/production/components/Modal/ModalBody.web.js +2 -2
- package/build/lib/web/production/components/Popover/Popover.web.js +2 -2
- package/build/lib/web/production/components/Popover/PopoverInteractiveWrapper.web.js +2 -2
- package/build/lib/web/production/components/Popover/getPopoverContentWrapperStyles.js +2 -2
- package/build/lib/web/production/components/ProgressBar/ProgressBar.js +2 -2
- package/build/lib/web/production/components/Radio/Radio.js +2 -2
- package/build/lib/web/production/components/Radio/RadioGroup/RadioGroup.js +2 -2
- package/build/lib/web/production/components/Radio/RadioIcon/RadioIcon.js +2 -2
- package/build/lib/web/production/components/Radio/RadioIcon/RadioIconWrapperStyles.js +2 -2
- package/build/lib/web/production/components/Radio/useRadio.js +2 -2
- package/build/lib/web/production/components/Skeleton/Skeleton.js +2 -2
- package/build/lib/web/production/components/SkipNav/SkipNav.web.js +2 -2
- package/build/lib/web/production/components/Spinner/BaseSpinner/BaseSpinner.js +2 -2
- package/build/lib/web/production/components/Spinner/Spinner/Spinner.js +2 -2
- package/build/lib/web/production/components/SpotlightPopoverTour/TourFooter.web.js +2 -2
- package/build/lib/web/production/components/SpotlightPopoverTour/TourMask.web.js +2 -2
- package/build/lib/web/production/components/SpotlightPopoverTour/TourPopover.web.js +2 -2
- package/build/lib/web/production/components/SpotlightPopoverTour/TourStep.web.js +2 -2
- package/build/lib/web/production/components/SpotlightPopoverTour/utils.js +2 -2
- package/build/lib/web/production/components/Switch/Switch.js +2 -2
- package/build/lib/web/production/components/Switch/SwitchTrack.web.js +2 -2
- package/build/lib/web/production/components/Switch/Thumb.js +2 -2
- package/build/lib/web/production/components/Table/Table.web.js +2 -2
- package/build/lib/web/production/components/Table/TableBody.web.js +2 -2
- package/build/lib/web/production/components/Table/TableFooter.web.js +2 -2
- package/build/lib/web/production/components/Table/TableHeader.web.js +2 -2
- package/build/lib/web/production/components/Table/TablePagination.web.js +2 -2
- package/build/lib/web/production/components/Table/TableToolbar.web.js +2 -2
- package/build/lib/web/production/components/Tabs/TabIndicator.web.js +2 -2
- package/build/lib/web/production/components/Tabs/TabItem.web.js +9 -9
- package/build/lib/web/production/components/Tabs/TabItem.web.js.map +1 -1
- package/build/lib/web/production/components/Tabs/TabList.web.js +2 -2
- package/build/lib/web/production/components/Tabs/TabPanel.web.js +2 -2
- package/build/lib/web/production/components/Tabs/Tabs.web.js +2 -2
- package/build/lib/web/production/components/Tag/AnimatedTag.web.js +2 -3
- package/build/lib/web/production/components/Tag/AnimatedTag.web.js.map +1 -1
- package/build/lib/web/production/components/Tag/Tag.js +7 -8
- package/build/lib/web/production/components/Tag/Tag.js.map +1 -1
- package/build/lib/web/production/components/Tag/getTagsGroup.js +1 -1
- package/build/lib/web/production/components/Tag/getTagsGroup.js.map +1 -1
- package/build/lib/web/production/components/Tag/tagAnimationConfig.js +4 -2
- package/build/lib/web/production/components/Tag/tagAnimationConfig.js.map +1 -1
- package/build/lib/web/production/components/Toast/Toast.web.js +2 -2
- package/build/lib/web/production/components/Toast/ToastContainer.web.js +2 -2
- package/build/lib/web/production/components/Toast/useToast.js +2 -2
- package/build/lib/web/production/components/Tooltip/Tooltip.web.js +2 -2
- package/build/lib/web/production/components/Tooltip/TooltipInteractiveWrapper.web.js +2 -2
- package/build/lib/web/production/components/Tooltip/getTooltipContentWrapperStyles.js +2 -2
- package/build/lib/web/production/components/Typography/BaseText/BaseText.web.js +2 -2
- package/build/lib/web/production/components/Typography/BaseText/getBaseTextStyles.js +4 -3
- package/build/lib/web/production/components/Typography/BaseText/getBaseTextStyles.js.map +1 -1
- package/build/lib/web/production/components/Typography/Code/Code.js +2 -2
- package/build/lib/web/production/components/Typography/Display/Display.js +2 -2
- package/build/lib/web/production/components/Typography/Heading/Heading.js +2 -2
- package/build/lib/web/production/components/Typography/Heading/getHeadingStyles.js +2 -2
- package/build/lib/web/production/components/Typography/Text/Text.js +2 -2
- package/build/lib/web/production/components/Typography/Text/getTextStyles.js +2 -2
- package/build/lib/web/production/components/VisuallyHidden/VisuallyHidden.web.js +2 -2
- package/build/lib/web/production/tokens/global/border.js +0 -1
- package/build/lib/web/production/tokens/global/border.js.map +1 -1
- package/build/lib/web/production/tokens/global/typography.js +2 -2
- package/build/lib/web/production/tokens/theme/createTheme.js +2 -3
- package/build/lib/web/production/tokens/theme/createTheme.js.map +1 -1
- package/build/lib/web/production/utils/bladeCoverage.js +1 -1
- package/build/lib/web/production/utils/bladeCoverage.js.map +1 -1
- package/build/lib/web/production/utils/makeAccessible/accessibilityMapWeb.js +2 -2
- package/build/lib/web/production/utils/mergeProps.js +19 -18
- package/build/lib/web/production/utils/mergeProps.js.map +1 -1
- package/build/lib/web/production/utils/metaAttribute/metaAttribute.web.js +2 -2
- package/build/types/components/index.d.ts +20 -4
- package/build/types/components/index.native.d.ts +13 -5
- package/package.json +7 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextArea.js","sources":["../../../../../../../src/components/Input/TextArea/TextArea.tsx"],"sourcesContent":["/* eslint-disable jsx-a11y/no-autofocus */\nimport React from 'react';\nimport type { TextInput as TextInputReactNative } from 'react-native';\nimport type { BaseInputProps } from '../BaseInput';\nimport { BaseInput } from '../BaseInput';\nimport isEmpty from '~utils/lodashButBetter/isEmpty';\nimport { CloseIcon } from '~components/Icons';\nimport { IconButton } from '~components/Button/IconButton';\nimport BaseBox from '~components/Box/BaseBox';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport { MetaConstants } from '~utils/metaAttribute';\nimport { CharacterCounter } from '~components/Form/CharacterCounter';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { getPlatformType } from '~utils';\nimport { useMergeRefs } from '~utils/useMergeRefs';\nimport type { BladeElementRef } from '~utils/types';\nimport { hintMarginTop } from '~components/Form/formTokens';\n\ntype TextAreaCommonProps = Pick<\n BaseInputProps,\n | 'label'\n | 'accessibilityLabel'\n | 'labelPosition'\n | 'necessityIndicator'\n | 'validationState'\n | 'helpText'\n | 'errorText'\n | 'successText'\n | 'placeholder'\n | 'defaultValue'\n | 'name'\n | 'onChange'\n | 'onFocus'\n | 'onBlur'\n | 'onSubmit'\n | 'value'\n | 'isDisabled'\n | 'isRequired'\n | 'maxCharacters'\n | 'autoFocus'\n | 'numberOfLines'\n | 'testID'\n | 'size'\n> & {\n /**\n * Decides whether to render a clear icon button\n */\n showClearButton?: boolean;\n /**\n * Event handler to handle the onClick event for clear button. Used when `showClearButton` is `true`\n */\n onClearButtonClick?: () => void;\n} & StyledPropsBlade;\n\n/*\n Mandatory accessibilityLabel prop when label is not provided\n*/\ntype TextAreaPropsWithA11yLabel = {\n /**\n * Label to be shown for the input field\n */\n label?: undefined;\n /**\n * Accessibility label for the input\n */\n accessibilityLabel: string;\n};\n\n/*\n Optional accessibilityLabel prop when label is provided\n*/\ntype TextAreaPropsWithLabel = {\n /**\n * Label to be shown for the input field\n */\n label: string;\n /**\n * Accessibility label for the input\n */\n accessibilityLabel?: string;\n};\n\ntype TextAreaProps = (TextAreaPropsWithA11yLabel | TextAreaPropsWithLabel) & TextAreaCommonProps;\n\n// need to do this to tell TS to infer type as TextInput of React Native and make it believe that `ref.current.clear()` exists\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst isReactNative = (_textInputRef: any): _textInputRef is TextInputReactNative => {\n return getPlatformType() === 'react-native';\n};\n\nconst _TextArea: React.ForwardRefRenderFunction<BladeElementRef, TextAreaProps> = (\n {\n label,\n accessibilityLabel,\n labelPosition,\n necessityIndicator,\n errorText,\n helpText,\n successText,\n validationState,\n defaultValue,\n isDisabled,\n isRequired,\n name,\n onChange,\n onFocus,\n onBlur,\n onSubmit,\n placeholder,\n value,\n maxCharacters,\n showClearButton,\n onClearButtonClick,\n autoFocus,\n numberOfLines = 2,\n testID,\n size = 'medium',\n ...styledProps\n },\n ref,\n) => {\n const inputRef = React.useRef<BladeElementRef>(null);\n const mergedRef = useMergeRefs(ref, inputRef);\n\n const [shouldShowClearButton, setShouldShowClearButton] = React.useState(false);\n\n React.useEffect(() => {\n setShouldShowClearButton(Boolean(showClearButton && (value?.length || defaultValue?.length)));\n }, [showClearButton, defaultValue, value]);\n\n const renderInteractionElement = (): React.ReactNode => {\n if (shouldShowClearButton) {\n return (\n <BaseBox paddingTop=\"spacing.3\" marginTop=\"spacing.1\">\n <IconButton\n icon={CloseIcon}\n accessibilityLabel=\"Clear textarea content\"\n onClick={() => {\n if (isEmpty(value) && inputRef.current) {\n // when the input field is uncontrolled take the ref and clear the input and then call the onClearButtonClick function\n if (isReactNative(inputRef.current)) {\n inputRef.current.clear();\n inputRef.current.focus();\n } else if (inputRef.current instanceof HTMLTextAreaElement) {\n inputRef.current.value = '';\n inputRef.current.focus();\n }\n }\n // if the input field is controlled just call the click handler and the value change shall be left upto the consumer\n onClearButtonClick?.();\n inputRef?.current?.focus();\n setShouldShowClearButton(false);\n }}\n />\n </BaseBox>\n );\n }\n\n return null;\n };\n\n return (\n <BaseInput\n as=\"textarea\"\n id=\"textarea\"\n componentName={MetaConstants.TextArea}\n autoFocus={autoFocus}\n ref={mergedRef}\n label={label as string}\n accessibilityLabel={accessibilityLabel}\n hideLabelText={!Boolean(label)}\n labelPosition={labelPosition}\n necessityIndicator={necessityIndicator}\n errorText={errorText}\n helpText={helpText}\n successText={successText}\n validationState={validationState}\n isDisabled={isDisabled}\n isRequired={isRequired}\n name={name}\n maxCharacters={maxCharacters}\n placeholder={placeholder}\n trailingInteractionElement={renderInteractionElement()}\n defaultValue={defaultValue}\n value={value}\n numberOfLines={numberOfLines}\n onChange={({ name, value }) => {\n if (showClearButton && value?.length) {\n // show the clear button when the user starts typing in\n setShouldShowClearButton(true);\n }\n\n if (shouldShowClearButton && !value?.length) {\n // hide the clear button when the input field is empty\n setShouldShowClearButton(false);\n }\n\n onChange?.({ name, value });\n }}\n onFocus={onFocus}\n onBlur={onBlur}\n onSubmit={onSubmit}\n trailingFooterSlot={(value) => {\n return maxCharacters ? (\n <BaseBox marginTop={hintMarginTop[size]} marginRight=\"spacing.1\">\n <CharacterCounter currentCount={value?.length ?? 0} maxCount={maxCharacters} />\n </BaseBox>\n ) : null;\n }}\n testID={testID}\n size={size}\n {...styledProps}\n />\n );\n};\n\nconst TextArea = assignWithoutSideEffects(React.forwardRef(_TextArea), {\n displayName: 'TextArea',\n});\n\nexport type { TextAreaProps };\nexport { TextArea };\n"],"names":["isReactNative","_textInputRef","getPlatformType","_TextArea","_ref","ref","label","accessibilityLabel","labelPosition","necessityIndicator","errorText","helpText","successText","validationState","defaultValue","isDisabled","isRequired","name","onChange","onFocus","onBlur","onSubmit","placeholder","value","maxCharacters","showClearButton","onClearButtonClick","autoFocus","_ref$numberOfLines","numberOfLines","testID","_ref$size","size","styledProps","_objectWithoutProperties","_excluded","inputRef","React","useRef","mergedRef","useMergeRefs","_React$useState","useState","_React$useState2","_slicedToArray","shouldShowClearButton","setShouldShowClearButton","useEffect","Boolean","length","renderInteractionElement","_jsx","BaseBox","paddingTop","marginTop","children","IconButton","icon","CloseIcon","onClick","_inputRef$current","isEmpty","current","clear","focus","HTMLTextAreaElement","BaseInput","_objectSpread","as","id","componentName","MetaConstants","TextArea","hideLabelText","trailingInteractionElement","_ref2","trailingFooterSlot","_value$length","hintMarginTop","marginRight","CharacterCounter","currentCount","maxCount","assignWithoutSideEffects","forwardRef","displayName"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoFA;AACA;AACA,IAAMA,aAAa,GAAG,SAAhBA,aAAaA,CAAIC,aAAkB,EAA4C;AACnF,EAAA,OAAOC,eAAe,EAAE,KAAK,cAAc,CAAA;AAC7C,CAAC,CAAA;AAED,IAAMC,SAAyE,GAAG,SAA5EA,SAAyEA,CAAAC,IAAA,EA6B7EC,GAAG,EACA;AAAA,EAAA,IA5BDC,KAAK,GAAAF,IAAA,CAALE,KAAK;IACLC,kBAAkB,GAAAH,IAAA,CAAlBG,kBAAkB;IACl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M,QAAAA,KAAK,EAALA,KAAAA;AAAM,OAAC,CAAC,CAAA;KAC3B;AACFJ,IAAAA,OAAO,EAAEA,OAAQ;AACjBC,IAAAA,MAAM,EAAEA,MAAO;AACfC,IAAAA,QAAQ,EAAEA,QAAS;AACnBuD,IAAAA,kBAAkB,EAAE,SAAAA,kBAACrD,CAAAA,KAAK,EAAK;AAAA,MAAA,IAAAsD,aAAA,CAAA;AAC7B,MAAA,OAAOrD,aAAa,gBAClB2B,GAAA,CAACC,OAAO,EAAA;AAACE,QAAAA,SAAS,EAAEwB,aAAa,CAAC9C,IAAI,CAAE;AAAC+C,QAAAA,WAAW,EAAC,WAAW;QAAAxB,QAAA,eAC9DJ,GAAA,CAAC6B,gBAAgB,EAAA;AAACC,UAAAA,YAAY,EAAAJ,CAAAA,aAAA,GAAEtD,KAAK,aAALA,KAAK,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAALA,KAAK,CAAE0B,MAAM,MAAA4B,IAAAA,IAAAA,aAAA,KAAAA,KAAAA,CAAAA,GAAAA,aAAA,GAAI,CAAE;AAACK,UAAAA,QAAQ,EAAE1D,aAAAA;SAAgB,CAAA;OACvE,CAAC,GACR,IAAI,CAAA;KACR;AACFM,IAAAA,MAAM,EAAEA,MAAO;AACfE,IAAAA,IAAI,EAAEA,IAAAA;GACFC,EAAAA,WAAW,CAChB,CAAC,CAAA;AAEN,CAAC,CAAA;AAEKuC,IAAAA,QAAQ,gBAAGW,wBAAwB,eAAC9C,cAAK,CAAC+C,UAAU,CAACjF,SAAS,CAAC,EAAE;AACrEkF,EAAAA,WAAW,EAAE,UAAA;AACf,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"TextArea.js","sources":["../../../../../../../src/components/Input/TextArea/TextArea.tsx"],"sourcesContent":["/* eslint-disable jsx-a11y/no-autofocus */\nimport React from 'react';\nimport type { TextInput as TextInputReactNative } from 'react-native';\nimport type { BaseInputProps } from '../BaseInput';\nimport { BaseInput } from '../BaseInput';\nimport type { TaggedInputProps } from '../BaseInput/useTaggedInput';\nimport { useTaggedInput } from '../BaseInput/useTaggedInput';\nimport isEmpty from '~utils/lodashButBetter/isEmpty';\nimport { CloseIcon } from '~components/Icons';\nimport { IconButton } from '~components/Button/IconButton';\nimport BaseBox from '~components/Box/BaseBox';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport { MetaConstants } from '~utils/metaAttribute';\nimport { CharacterCounter } from '~components/Form/CharacterCounter';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { getPlatformType } from '~utils';\nimport { useMergeRefs } from '~utils/useMergeRefs';\nimport type { BladeElementRef, BladeElementRefWithValue } from '~utils/types';\nimport { hintMarginTop } from '~components/Form/formTokens';\n\ntype TextAreaCommonProps = Pick<\n BaseInputProps,\n | 'label'\n | 'accessibilityLabel'\n | 'labelPosition'\n | 'necessityIndicator'\n | 'validationState'\n | 'helpText'\n | 'errorText'\n | 'successText'\n | 'placeholder'\n | 'defaultValue'\n | 'name'\n | 'onChange'\n | 'onFocus'\n | 'onBlur'\n | 'onSubmit'\n | 'value'\n | 'isDisabled'\n | 'isRequired'\n | 'maxCharacters'\n | 'autoFocus'\n | 'numberOfLines'\n | 'testID'\n | 'size'\n> & {\n /**\n * Decides whether to render a clear icon button\n */\n showClearButton?: boolean;\n /**\n * Event handler to handle the onClick event for clear button. Used when `showClearButton` is `true`\n */\n onClearButtonClick?: () => void;\n} & TaggedInputProps &\n StyledPropsBlade;\n\n/*\n Mandatory accessibilityLabel prop when label is not provided\n*/\ntype TextAreaPropsWithA11yLabel = {\n /**\n * Label to be shown for the input field\n */\n label?: undefined;\n /**\n * Accessibility label for the input\n */\n accessibilityLabel: string;\n};\n\n/*\n Optional accessibilityLabel prop when label is provided\n*/\ntype TextAreaPropsWithLabel = {\n /**\n * Label to be shown for the input field\n */\n label: string;\n /**\n * Accessibility label for the input\n */\n accessibilityLabel?: string;\n};\n\ntype TextAreaProps = (TextAreaPropsWithA11yLabel | TextAreaPropsWithLabel) & TextAreaCommonProps;\n\n// need to do this to tell TS to infer type as TextInput of React Native and make it believe that `ref.current.clear()` exists\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst isReactNative = (_textInputRef: any): _textInputRef is TextInputReactNative => {\n return getPlatformType() === 'react-native';\n};\n\nconst _TextArea: React.ForwardRefRenderFunction<BladeElementRef, TextAreaProps> = (\n {\n label,\n accessibilityLabel,\n labelPosition,\n necessityIndicator,\n errorText,\n helpText,\n successText,\n validationState,\n defaultValue,\n isDisabled,\n isRequired,\n name,\n onChange,\n onFocus,\n onBlur,\n onSubmit,\n placeholder,\n value,\n maxCharacters,\n showClearButton,\n onClearButtonClick,\n autoFocus,\n numberOfLines = 2,\n testID,\n size = 'medium',\n isTaggedInput,\n tags,\n onTagChange,\n ...styledProps\n },\n ref,\n) => {\n const inputRef = React.useRef<BladeElementRefWithValue>(null);\n const mergedRef = useMergeRefs(ref, inputRef);\n const [isInputFocussed, setIsInputFocussed] = React.useState(autoFocus ?? false);\n const {\n activeTagIndex,\n setActiveTagIndex,\n getTags,\n handleTaggedInputKeydown,\n handleTaggedInputChange,\n handleTagsClear,\n } = useTaggedInput({\n tags,\n onTagChange,\n isDisabled,\n inputRef,\n isTaggedInput,\n name,\n value,\n onChange,\n });\n\n const [shouldShowClearButton, setShouldShowClearButton] = React.useState(false);\n\n React.useEffect(() => {\n setShouldShowClearButton(Boolean(showClearButton && (value?.length || defaultValue?.length)));\n }, [showClearButton, defaultValue, value]);\n\n const renderInteractionElement = (): React.ReactNode => {\n if (shouldShowClearButton) {\n return (\n <BaseBox paddingTop=\"spacing.3\" marginTop=\"spacing.1\">\n <IconButton\n icon={CloseIcon}\n accessibilityLabel=\"Clear textarea content\"\n onClick={() => {\n if (isEmpty(value) && inputRef.current) {\n // when the input field is uncontrolled take the ref and clear the input and then call the onClearButtonClick function\n if (isReactNative(inputRef.current)) {\n inputRef.current.clear();\n inputRef.current.focus();\n } else if (inputRef.current instanceof HTMLTextAreaElement) {\n inputRef.current.value = '';\n inputRef.current.focus();\n }\n }\n handleTagsClear();\n // if the input field is controlled just call the click handler and the value change shall be left upto the consumer\n onClearButtonClick?.();\n inputRef?.current?.focus();\n setShouldShowClearButton(false);\n }}\n />\n </BaseBox>\n );\n }\n\n return null;\n };\n\n return (\n <BaseInput\n as=\"textarea\"\n id=\"textarea\"\n maxTagRows=\"multiple\"\n componentName={MetaConstants.TextArea}\n autoFocus={autoFocus}\n ref={mergedRef}\n label={label as string}\n tags={isTaggedInput ? getTags({ size }) : undefined}\n activeTagIndex={activeTagIndex}\n setActiveTagIndex={setActiveTagIndex}\n isDropdownTrigger={isTaggedInput}\n showAllTags={isInputFocussed}\n accessibilityLabel={accessibilityLabel}\n hideLabelText={!Boolean(label)}\n labelPosition={labelPosition}\n necessityIndicator={necessityIndicator}\n errorText={errorText}\n helpText={helpText}\n successText={successText}\n validationState={validationState}\n isDisabled={isDisabled}\n isRequired={isRequired}\n name={name}\n maxCharacters={maxCharacters}\n placeholder={placeholder}\n trailingInteractionElement={renderInteractionElement()}\n defaultValue={defaultValue}\n value={value}\n numberOfLines={numberOfLines}\n onChange={({ name, value }) => {\n if (showClearButton && value?.length) {\n // show the clear button when the user starts typing in\n setShouldShowClearButton(true);\n }\n\n if (shouldShowClearButton && !value?.length) {\n // hide the clear button when the input field is empty\n setShouldShowClearButton(false);\n }\n\n handleTaggedInputChange({ name, value });\n onChange?.({ name, value });\n }}\n onFocus={(e) => {\n setIsInputFocussed(true);\n onFocus?.(e);\n }}\n onBlur={(e) => {\n setIsInputFocussed(false);\n onBlur?.(e);\n }}\n onKeyDown={(e) => {\n handleTaggedInputKeydown(e);\n }}\n onSubmit={onSubmit}\n trailingFooterSlot={(value) => {\n return maxCharacters ? (\n <BaseBox marginTop={hintMarginTop[size]} marginRight=\"spacing.1\">\n <CharacterCounter currentCount={value?.length ?? 0} maxCount={maxCharacters} />\n </BaseBox>\n ) : null;\n }}\n testID={testID}\n size={size}\n {...styledProps}\n />\n );\n};\n\nconst TextArea = assignWithoutSideEffects(React.forwardRef(_TextArea), {\n displayName: 'TextArea',\n});\n\nexport type { TextAreaProps };\nexport { TextArea };\n"],"names":["isReactNative","_textInputRef","getPlatformType","_TextArea","_ref","ref","label","accessibilityLabel","labelPosition","necessityIndicator","errorText","helpText","successText","validationState","defaultValue","isDisabled","isRequired","name","onChange","onFocus","onBlur","onSubmit","placeholder","value","maxCharacters","showClearButton","onClearButtonClick","autoFocus","_ref$numberOfLines","numberOfLines","testID","_ref$size","size","isTaggedInput","tags","onTagChange","styledProps","_objectWithoutProperties","_excluded","inputRef","React","useRef","mergedRef","useMergeRefs","_React$useState","useState","_React$useState2","_slicedToArray","isInputFocussed","setIsInputFocussed","_useTaggedInput","useTaggedInput","activeTagIndex","setActiveTagIndex","getTags","handleTaggedInputKeydown","handleTaggedInputChange","handleTagsClear","_React$useState3","_React$useState4","shouldShowClearButton","setShouldShowClearButton","useEffect","Boolean","length","renderInteractionElement","_jsx","BaseBox","paddingTop","marginTop","children","IconButton","icon","CloseIcon","onClick","_inputRef$current","isEmpty","current","clear","focus","HTMLTextAreaElement","BaseInput","_objectSpread","as","id","maxTagRows","componentName","MetaConstants","TextArea","undefined","isDropdownTrigger","showAllTags","hideLabelText","trailingInteractionElement","_ref2","e","onKeyDown","trailingFooterSlot","_value$length","hintMarginTop","marginRight","CharacterCounter","currentCount","maxCount","assignWithoutSideEffects","forwardRef","displayName"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuFA;AACA;AACA,IAAMA,aAAa,GAAG,SAAhBA,aAAaA,CAAIC,aAAkB,EAA4C;AACnF,EAAA,OAAOC,eAAe,EAAE,KAAK,cAAc,CAAA;AAC7C,CAAC,CAAA;AAED,IAAMC,SAAyE,GAAG,SAA5EA,SAAyEA,CAAAC,IAAA,EAgC7EC,GAAG,EACA;AAAA,EAAA,IA/BDC,KAAK,GAAAF,IAAA,CAALE,KAAK;IACLC,kBAAkB,GAAAH,IAAA,CAAlBG,kB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A,GAAE3E,KAAK,aAALA,KAAK,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAALA,KAAK,CAAEyC,MAAM,MAAAkC,IAAAA,IAAAA,aAAA,KAAAA,KAAAA,CAAAA,GAAAA,aAAA,GAAI,CAAE;AAACK,UAAAA,QAAQ,EAAE/E,aAAAA;SAAgB,CAAA;OACvE,CAAC,GACR,IAAI,CAAA;KACR;AACFM,IAAAA,MAAM,EAAEA,MAAO;AACfE,IAAAA,IAAI,EAAEA,IAAAA;GACFI,EAAAA,WAAW,CAChB,CAAC,CAAA;AAEN,CAAC,CAAA;AAEKoD,IAAAA,QAAQ,gBAAGgB,wBAAwB,eAAChE,cAAK,CAACiE,UAAU,CAACtG,SAAS,CAAC,EAAE;AACrEuG,EAAAA,WAAW,EAAE,UAAA;AACf,CAAC;;;;"}
|
|
@@ -4,6 +4,7 @@ import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProper
|
|
|
4
4
|
import React__default, { useState } from 'react';
|
|
5
5
|
import '../BaseInput/index.js';
|
|
6
6
|
import { getKeyboardAndAutocompleteProps } from '../BaseInput/utils.js';
|
|
7
|
+
import { useTaggedInput } from '../BaseInput/useTaggedInput.js';
|
|
7
8
|
import isEmpty from '../../../utils/lodashButBetter/isEmpty.js';
|
|
8
9
|
import '../../Icons/index.js';
|
|
9
10
|
import '../../Button/IconButton/index.js';
|
|
@@ -26,9 +27,9 @@ import { BaseBox } from '../../Box/BaseBox/BaseBox.web.js';
|
|
|
26
27
|
import { CharacterCounter } from '../../Form/CharacterCounter/CharacterCounter.js';
|
|
27
28
|
import { assignWithoutSideEffects } from '../../../utils/assignWithoutSideEffects/assignWithoutSideEffects.js';
|
|
28
29
|
|
|
29
|
-
var _excluded = ["label", "accessibilityLabel", "labelPosition", "placeholder", "type", "defaultValue", "name", "value", "maxCharacters", "onChange", "onClick", "onFocus", "onBlur", "onSubmit", "isDisabled", "necessityIndicator", "validationState", "errorText", "helpText", "successText", "isRequired", "icon", "prefix", "showClearButton", "onClearButtonClick", "isLoading", "suffix", "autoFocus", "keyboardReturnKeyType", "autoCompleteSuggestionType", "autoCapitalize", "testID", "size", "leadingIcon", "trailingIcon"];
|
|
30
|
-
function ownKeys(
|
|
31
|
-
function _objectSpread(
|
|
30
|
+
var _excluded = ["label", "accessibilityLabel", "labelPosition", "placeholder", "type", "defaultValue", "name", "value", "maxCharacters", "onChange", "onClick", "onFocus", "onBlur", "onSubmit", "isDisabled", "necessityIndicator", "validationState", "errorText", "helpText", "successText", "isRequired", "icon", "prefix", "showClearButton", "onClearButtonClick", "isLoading", "suffix", "autoFocus", "keyboardReturnKeyType", "autoCompleteSuggestionType", "autoCapitalize", "testID", "size", "leadingIcon", "trailingIcon", "isTaggedInput", "tags", "onTagChange"];
|
|
31
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
32
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
32
33
|
// need to do this to tell TS to infer type as TextInput of React Native and make it believe that `ref.current.clear()` exists
|
|
33
34
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
34
35
|
var isReactNative = function isReactNative(_textInputRef) {
|
|
@@ -48,8 +49,8 @@ var _TextInput = function _TextInput(_ref, ref) {
|
|
|
48
49
|
maxCharacters = _ref.maxCharacters,
|
|
49
50
|
_onChange = _ref.onChange,
|
|
50
51
|
onClick = _ref.onClick,
|
|
51
|
-
|
|
52
|
-
|
|
52
|
+
_onFocus = _ref.onFocus,
|
|
53
|
+
_onBlur = _ref.onBlur,
|
|
53
54
|
onSubmit = _ref.onSubmit,
|
|
54
55
|
isDisabled = _ref.isDisabled,
|
|
55
56
|
necessityIndicator = _ref.necessityIndicator,
|
|
@@ -73,6 +74,9 @@ var _TextInput = function _TextInput(_ref, ref) {
|
|
|
73
74
|
size = _ref$size === void 0 ? 'medium' : _ref$size,
|
|
74
75
|
leadingIcon = _ref.leadingIcon,
|
|
75
76
|
trailingIcon = _ref.trailingIcon,
|
|
77
|
+
isTaggedInput = _ref.isTaggedInput,
|
|
78
|
+
tags = _ref.tags,
|
|
79
|
+
onTagChange = _ref.onTagChange,
|
|
76
80
|
styledProps = _objectWithoutProperties(_ref, _excluded);
|
|
77
81
|
var textInputRef = React__default.useRef(null);
|
|
78
82
|
var mergedRef = useMergeRefs(ref, textInputRef);
|
|
@@ -80,6 +84,26 @@ var _TextInput = function _TextInput(_ref, ref) {
|
|
|
80
84
|
_useState2 = _slicedToArray(_useState, 2),
|
|
81
85
|
shouldShowClearButton = _useState2[0],
|
|
82
86
|
setShouldShowClearButton = _useState2[1];
|
|
87
|
+
var _useState3 = useState(autoFocus !== null && autoFocus !== void 0 ? autoFocus : false),
|
|
88
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
89
|
+
isInputFocussed = _useState4[0],
|
|
90
|
+
setIsInputFocussed = _useState4[1];
|
|
91
|
+
var _useTaggedInput = useTaggedInput({
|
|
92
|
+
isTaggedInput: isTaggedInput,
|
|
93
|
+
tags: tags,
|
|
94
|
+
onTagChange: onTagChange,
|
|
95
|
+
isDisabled: isDisabled,
|
|
96
|
+
onChange: _onChange,
|
|
97
|
+
name: name,
|
|
98
|
+
value: value,
|
|
99
|
+
inputRef: textInputRef
|
|
100
|
+
}),
|
|
101
|
+
activeTagIndex = _useTaggedInput.activeTagIndex,
|
|
102
|
+
setActiveTagIndex = _useTaggedInput.setActiveTagIndex,
|
|
103
|
+
getTags = _useTaggedInput.getTags,
|
|
104
|
+
handleTaggedInputKeydown = _useTaggedInput.handleTaggedInputKeydown,
|
|
105
|
+
handleTaggedInputChange = _useTaggedInput.handleTaggedInputChange,
|
|
106
|
+
handleTagsClear = _useTaggedInput.handleTagsClear;
|
|
83
107
|
React__default.useEffect(function () {
|
|
84
108
|
setShouldShowClearButton(Boolean(showClearButton && (defaultValue !== null && defaultValue !== void 0 ? defaultValue : value)));
|
|
85
109
|
}, [showClearButton, defaultValue, value]);
|
|
@@ -106,6 +130,7 @@ var _TextInput = function _TextInput(_ref, ref) {
|
|
|
106
130
|
textInputRef.current.focus();
|
|
107
131
|
}
|
|
108
132
|
}
|
|
133
|
+
handleTagsClear();
|
|
109
134
|
// if the input field is controlled just call the click handler and the value change shall be left upto the consumer
|
|
110
135
|
onClearButtonClick === null || onClearButtonClick === void 0 ? void 0 : onClearButtonClick();
|
|
111
136
|
textInputRef === null || textInputRef === void 0 ? void 0 : (_textInputRef$current = textInputRef.current) === null || _textInputRef$current === void 0 ? void 0 : _textInputRef$current.focus();
|
|
@@ -130,6 +155,14 @@ var _TextInput = function _TextInput(_ref, ref) {
|
|
|
130
155
|
value: value,
|
|
131
156
|
name: name,
|
|
132
157
|
maxCharacters: maxCharacters,
|
|
158
|
+
isDropdownTrigger: isTaggedInput,
|
|
159
|
+
tags: isTaggedInput ? getTags({
|
|
160
|
+
size: size
|
|
161
|
+
}) : undefined,
|
|
162
|
+
showAllTags: isInputFocussed,
|
|
163
|
+
maxTagRows: "single",
|
|
164
|
+
activeTagIndex: activeTagIndex,
|
|
165
|
+
setActiveTagIndex: setActiveTagIndex,
|
|
133
166
|
onChange: function onChange(_ref2) {
|
|
134
167
|
var name = _ref2.name,
|
|
135
168
|
value = _ref2.value;
|
|
@@ -141,14 +174,27 @@ var _TextInput = function _TextInput(_ref, ref) {
|
|
|
141
174
|
// hide the clear button when the input field is empty
|
|
142
175
|
setShouldShowClearButton(false);
|
|
143
176
|
}
|
|
177
|
+
handleTaggedInputChange({
|
|
178
|
+
name: name,
|
|
179
|
+
value: value
|
|
180
|
+
});
|
|
144
181
|
_onChange === null || _onChange === void 0 ? void 0 : _onChange({
|
|
145
182
|
name: name,
|
|
146
183
|
value: value
|
|
147
184
|
});
|
|
148
185
|
},
|
|
149
186
|
onClick: onClick,
|
|
150
|
-
onFocus: onFocus
|
|
151
|
-
|
|
187
|
+
onFocus: function onFocus(e) {
|
|
188
|
+
setIsInputFocussed(true);
|
|
189
|
+
_onFocus === null || _onFocus === void 0 ? void 0 : _onFocus(e);
|
|
190
|
+
},
|
|
191
|
+
onBlur: function onBlur(e) {
|
|
192
|
+
setIsInputFocussed(false);
|
|
193
|
+
_onBlur === null || _onBlur === void 0 ? void 0 : _onBlur(e);
|
|
194
|
+
},
|
|
195
|
+
onKeyDown: function onKeyDown(e) {
|
|
196
|
+
handleTaggedInputKeydown(e);
|
|
197
|
+
},
|
|
152
198
|
onSubmit: onSubmit,
|
|
153
199
|
isDisabled: isDisabled,
|
|
154
200
|
necessityIndicator: necessityIndicator,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextInput.js","sources":["../../../../../../../src/components/Input/TextInput/TextInput.tsx"],"sourcesContent":["import React, { useState } from 'react';\nimport type { ReactElement, ReactNode } from 'react';\nimport type { TextInput as TextInputReactNative } from 'react-native';\nimport type { BaseInputProps } from '../BaseInput';\nimport { BaseInput } from '../BaseInput';\nimport { getKeyboardAndAutocompleteProps } from '../BaseInput/utils';\nimport isEmpty from '~utils/lodashButBetter/isEmpty';\nimport type { IconComponent } from '~components/Icons';\nimport { CloseIcon } from '~components/Icons';\nimport { IconButton } from '~components/Button/IconButton';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport { MetaConstants } from '~utils/metaAttribute';\nimport { CharacterCounter } from '~components/Form/CharacterCounter';\nimport BaseBox from '~components/Box/BaseBox';\nimport { Spinner } from '~components/Spinner';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { getPlatformType } from '~utils';\nimport { useMergeRefs } from '~utils/useMergeRefs';\nimport type { BladeElementRef } from '~utils/types';\nimport { hintMarginTop } from '~components/Form/formTokens';\n\n// Users should use PasswordInput for input type password\ntype Type = Exclude<BaseInputProps['type'], 'password'>;\n\ntype TextInputCommonProps = Pick<\n BaseInputProps,\n | 'label'\n | 'accessibilityLabel'\n | 'labelPosition'\n | 'necessityIndicator'\n | 'validationState'\n | 'helpText'\n | 'errorText'\n | 'successText'\n | 'placeholder'\n | 'defaultValue'\n | 'name'\n | 'onChange'\n | 'onFocus'\n | 'onBlur'\n | 'value'\n | 'isDisabled'\n | 'isRequired'\n | 'prefix'\n | 'suffix'\n | 'maxCharacters'\n | 'autoFocus'\n | 'keyboardReturnKeyType'\n | 'autoCompleteSuggestionType'\n | 'onSubmit'\n | 'autoCapitalize'\n | 'testID'\n | 'onClick'\n | 'size'\n | 'leadingIcon'\n | 'trailingButton'\n | 'trailingIcon'\n> & {\n /**\n * Decides whether to render a clear icon button\n */\n showClearButton?: boolean;\n\n /**\n * Event handler to handle the onClick event for clear button. Used when `showClearButton` is `true`\n */\n onClearButtonClick?: () => void;\n\n /**\n * Decides whether to show a loading spinner for the input field.\n */\n isLoading?: boolean;\n\n /**\n * Icon that will be rendered at the beginning of the input field\n * @deprecated Use `leadingIcon` instead. This prop will be removed in the next major version.\n */\n icon?: IconComponent;\n /**\n * Type of Input Field to be rendered. Use `PasswordInput` for type `password`\n *\n *\n * **Note on number type**\n *\n * `type=\"number\"` internally uses `inputMode=\"numeric\"` instead of HTML's `type=\"number\"` which also allows text characters.\n * If you have a usecase where you only want to support number input, you can handle it on validations end.\n *\n * Check out [Why the GOV.UK Design System team changed the input type for numbers](https://technology.blog.gov.uk/2020/02/24/why-the-gov-uk-design-system-team-changed-the-input-type-for-numbers/) for reasoning\n *\n * @default text\n */\n type?: Type;\n} & StyledPropsBlade;\n\n/*\n Mandatory accessibilityLabel prop when label is not provided\n*/\ntype TextInputPropsWithA11yLabel = {\n /**\n * Label to be shown for the input field\n */\n label?: undefined;\n /**\n * Accessibility label for the input\n */\n accessibilityLabel: string;\n};\n\n/*\n Optional accessibilityLabel prop when label is provided\n*/\ntype TextInputPropsWithLabel = {\n /**\n * Label to be shown for the input field\n */\n label: string;\n /**\n * Accessibility label for the input\n */\n accessibilityLabel?: string;\n};\n\ntype TextInputProps = (TextInputPropsWithA11yLabel | TextInputPropsWithLabel) &\n TextInputCommonProps;\n\n// need to do this to tell TS to infer type as TextInput of React Native and make it believe that `ref.current.clear()` exists\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst isReactNative = (_textInputRef: any): _textInputRef is TextInputReactNative => {\n return getPlatformType() === 'react-native';\n};\n\nconst _TextInput: React.ForwardRefRenderFunction<BladeElementRef, TextInputProps> = (\n {\n label,\n accessibilityLabel,\n labelPosition = 'top',\n placeholder,\n type = 'text',\n defaultValue,\n name,\n value,\n maxCharacters,\n onChange,\n onClick,\n onFocus,\n onBlur,\n onSubmit,\n isDisabled,\n necessityIndicator,\n validationState,\n errorText,\n helpText,\n successText,\n isRequired,\n icon,\n prefix,\n showClearButton,\n onClearButtonClick,\n isLoading,\n suffix,\n autoFocus,\n keyboardReturnKeyType,\n autoCompleteSuggestionType,\n autoCapitalize,\n testID,\n size = 'medium',\n leadingIcon,\n trailingIcon,\n ...styledProps\n },\n ref,\n): ReactElement => {\n const textInputRef = React.useRef<BladeElementRef>(null);\n const mergedRef = useMergeRefs(ref, textInputRef);\n const [shouldShowClearButton, setShouldShowClearButton] = useState(false);\n\n React.useEffect(() => {\n setShouldShowClearButton(Boolean(showClearButton && (defaultValue ?? value)));\n }, [showClearButton, defaultValue, value]);\n\n const renderInteractionElement = (): ReactNode => {\n if (isLoading) {\n return <Spinner accessibilityLabel=\"Loading Content\" color=\"primary\" />;\n }\n\n if (shouldShowClearButton) {\n return (\n <IconButton\n size=\"medium\"\n icon={CloseIcon}\n onClick={() => {\n if (isEmpty(value) && textInputRef.current) {\n // when the input field is uncontrolled take the ref and clear the input and then call the onClearButtonClick function\n if (isReactNative(textInputRef.current)) {\n textInputRef.current.clear();\n textInputRef.current.focus();\n } else if (textInputRef.current instanceof HTMLInputElement) {\n textInputRef.current.value = '';\n textInputRef.current.focus();\n }\n }\n // if the input field is controlled just call the click handler and the value change shall be left upto the consumer\n onClearButtonClick?.();\n textInputRef?.current?.focus();\n setShouldShowClearButton(false);\n }}\n isDisabled={isDisabled}\n accessibilityLabel=\"Clear Input Content\"\n />\n );\n }\n\n return null;\n };\n\n return (\n <BaseInput\n id=\"textinput\"\n componentName={MetaConstants.TextInput}\n ref={mergedRef}\n label={label as string}\n accessibilityLabel={accessibilityLabel}\n hideLabelText={!Boolean(label)}\n labelPosition={labelPosition}\n placeholder={placeholder}\n defaultValue={defaultValue}\n value={value}\n name={name}\n maxCharacters={maxCharacters}\n onChange={({ name, value }) => {\n if (showClearButton && value?.length) {\n // show the clear button when the user starts typing in\n setShouldShowClearButton(true);\n }\n\n if (shouldShowClearButton && !value?.length) {\n // hide the clear button when the input field is empty\n setShouldShowClearButton(false);\n }\n\n onChange?.({ name, value });\n }}\n onClick={onClick}\n onFocus={onFocus}\n onBlur={onBlur}\n onSubmit={onSubmit}\n isDisabled={isDisabled}\n necessityIndicator={necessityIndicator}\n isRequired={isRequired}\n leadingIcon={leadingIcon ?? icon}\n prefix={prefix}\n trailingInteractionElement={renderInteractionElement()}\n trailingIcon={trailingIcon}\n suffix={suffix}\n validationState={validationState}\n errorText={errorText}\n helpText={helpText}\n successText={successText}\n trailingFooterSlot={(value) => {\n return maxCharacters ? (\n <BaseBox marginTop={hintMarginTop[size]} marginRight=\"spacing.1\">\n <CharacterCounter\n currentCount={value?.length ?? 0}\n maxCount={maxCharacters}\n size={size}\n />\n </BaseBox>\n ) : null;\n }}\n // eslint-disable-next-line jsx-a11y/no-autofocus\n autoFocus={autoFocus}\n testID={testID}\n {...getKeyboardAndAutocompleteProps({\n type,\n keyboardReturnKeyType,\n autoCompleteSuggestionType,\n autoCapitalize,\n })}\n size={size}\n {...styledProps}\n />\n );\n};\n\nconst TextInput = assignWithoutSideEffects(React.forwardRef(_TextInput), {\n displayName: 'TextInput',\n});\n\nexport type { TextInputProps };\nexport { TextInput };\n"],"names":["isReactNative","_textInputRef","getPlatformType","_TextInput","_ref","ref","label","accessibilityLabel","_ref$labelPosition","labelPosition","placeholder","_ref$type","type","defaultValue","name","value","maxCharacters","onChange","onClick","onFocus","onBlur","onSubmit","isDisabled","necessityIndicator","validationState","errorText","helpText","successText","isRequired","icon","prefix","showClearButton","onClearButtonClick","isLoading","suffix","autoFocus","keyboardReturnKeyType","autoCompleteSuggestionType","autoCapitalize","testID","_ref$size","size","leadingIcon","trailingIcon","styledProps","_objectWithoutProperties","_excluded","textInputRef","React","useRef","mergedRef","useMergeRefs","_useState","useState","_useState2","_slicedToArray","shouldShowClearButton","setShouldShowClearButton","useEffect","Boolean","renderInteractionElement","_jsx","Spinner","color","IconButton","CloseIcon","_textInputRef$current","isEmpty","current","clear","focus","HTMLInputElement","BaseInput","_objectSpread","id","componentName","MetaConstants","TextInput","hideLabelText","_ref2","length","trailingInteractionElement","trailingFooterSlot","_value$length","BaseBox","marginTop","hintMarginTop","marginRight","children","CharacterCounter","currentCount","maxCount","getKeyboardAndAutocompleteProps","assignWithoutSideEffects","forwardRef","displayName"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6HA;AACA;AACA,IAAMA,aAAa,GAAG,SAAhBA,aAAaA,CAAIC,aAAkB,EAA4C;AACnF,EAAA,OAAOC,eAAe,EAAE,KAAK,cAAc,CAAA;AAC7C,CAAC,CAAA;AAED,IAAMC,UAA2E,GAAG,SAA9EA,UAA2EA,CAAAC,IAAA,EAuC/EC,GAAG,EACc;AAAA,EAAA,IAtCfC,KAAK,GAAAF,IAAA,CAALE,KAAK;IACLC,kBAAkB,GAAAH,IAAA,CAAlBG,kBAAkB;IAAAC,kBAAA,GAAAJ,IAAA,CAClBK,aAAa;AAAbA,IAAAA,aAAa,GAAA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,QAAQ,EAAE3E,aAAc;AACxByB,UAAAA,IAAI,EAAEA,IAAAA;SACP,CAAA;OACM,CAAC,GACR,IAAI,CAAA;AACV,KAAA;AACA;AAAA;AACAN,IAAAA,SAAS,EAAEA,SAAU;AACrBI,IAAAA,MAAM,EAAEA,MAAAA;AAAO,GAAA,EACXqD,+BAA+B,CAAC;AAClChF,IAAAA,IAAI,EAAJA,IAAI;AACJwB,IAAAA,qBAAqB,EAArBA,qBAAqB;AACrBC,IAAAA,0BAA0B,EAA1BA,0BAA0B;AAC1BC,IAAAA,cAAc,EAAdA,cAAAA;AACF,GAAC,CAAC,CAAA,EAAA,EAAA,EAAA;AACFG,IAAAA,IAAI,EAAEA,IAAAA;GACFG,EAAAA,WAAW,CAChB,CAAC,CAAA;AAEN,CAAC,CAAA;AAEKiC,IAAAA,SAAS,gBAAGgB,wBAAwB,eAAC7C,cAAK,CAAC8C,UAAU,CAAC3F,UAAU,CAAC,EAAE;AACvE4F,EAAAA,WAAW,EAAE,WAAA;AACf,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"TextInput.js","sources":["../../../../../../../src/components/Input/TextInput/TextInput.tsx"],"sourcesContent":["import React, { useState } from 'react';\nimport type { ReactElement, ReactNode } from 'react';\nimport type { TextInput as TextInputReactNative } from 'react-native';\nimport type { BaseInputProps } from '../BaseInput';\nimport { BaseInput } from '../BaseInput';\nimport { getKeyboardAndAutocompleteProps } from '../BaseInput/utils';\nimport type { TaggedInputProps } from '../BaseInput/useTaggedInput';\nimport { useTaggedInput } from '../BaseInput/useTaggedInput';\nimport isEmpty from '~utils/lodashButBetter/isEmpty';\nimport type { IconComponent } from '~components/Icons';\nimport { CloseIcon } from '~components/Icons';\nimport { IconButton } from '~components/Button/IconButton';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport { MetaConstants } from '~utils/metaAttribute';\nimport { CharacterCounter } from '~components/Form/CharacterCounter';\nimport BaseBox from '~components/Box/BaseBox';\nimport { Spinner } from '~components/Spinner';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { getPlatformType } from '~utils';\nimport { useMergeRefs } from '~utils/useMergeRefs';\nimport type { BladeElementRef, BladeElementRefWithValue } from '~utils/types';\nimport { hintMarginTop } from '~components/Form/formTokens';\n\n// Users should use PasswordInput for input type password\ntype Type = Exclude<BaseInputProps['type'], 'password'>;\n\ntype TextInputCommonProps = Pick<\n BaseInputProps,\n | 'label'\n | 'accessibilityLabel'\n | 'labelPosition'\n | 'necessityIndicator'\n | 'validationState'\n | 'helpText'\n | 'errorText'\n | 'successText'\n | 'placeholder'\n | 'defaultValue'\n | 'name'\n | 'onChange'\n | 'onFocus'\n | 'onBlur'\n | 'value'\n | 'isDisabled'\n | 'isRequired'\n | 'prefix'\n | 'suffix'\n | 'maxCharacters'\n | 'autoFocus'\n | 'keyboardReturnKeyType'\n | 'autoCompleteSuggestionType'\n | 'onSubmit'\n | 'autoCapitalize'\n | 'testID'\n | 'onClick'\n | 'size'\n | 'leadingIcon'\n | 'trailingButton'\n | 'trailingIcon'\n> & {\n /**\n * Decides whether to render a clear icon button\n */\n showClearButton?: boolean;\n\n /**\n * Event handler to handle the onClick event for clear button. Used when `showClearButton` is `true`\n */\n onClearButtonClick?: () => void;\n\n /**\n * Decides whether to show a loading spinner for the input field.\n */\n isLoading?: boolean;\n\n /**\n * Icon that will be rendered at the beginning of the input field\n * @deprecated Use `leadingIcon` instead. This prop will be removed in the next major version.\n */\n icon?: IconComponent;\n /**\n * Type of Input Field to be rendered. Use `PasswordInput` for type `password`\n *\n *\n * **Note on number type**\n *\n * `type=\"number\"` internally uses `inputMode=\"numeric\"` instead of HTML's `type=\"number\"` which also allows text characters.\n * If you have a usecase where you only want to support number input, you can handle it on validations end.\n *\n * Check out [Why the GOV.UK Design System team changed the input type for numbers](https://technology.blog.gov.uk/2020/02/24/why-the-gov-uk-design-system-team-changed-the-input-type-for-numbers/) for reasoning\n *\n * @default text\n */\n type?: Type;\n} & TaggedInputProps &\n StyledPropsBlade;\n\n/*\n Mandatory accessibilityLabel prop when label is not provided\n*/\ntype TextInputPropsWithA11yLabel = {\n /**\n * Label to be shown for the input field\n */\n label?: undefined;\n /**\n * Accessibility label for the input\n */\n accessibilityLabel: string;\n};\n\n/*\n Optional accessibilityLabel prop when label is provided\n*/\ntype TextInputPropsWithLabel = {\n /**\n * Label to be shown for the input field\n */\n label: string;\n /**\n * Accessibility label for the input\n */\n accessibilityLabel?: string;\n};\n\ntype TextInputProps = (TextInputPropsWithA11yLabel | TextInputPropsWithLabel) &\n TextInputCommonProps;\n\n// need to do this to tell TS to infer type as TextInput of React Native and make it believe that `ref.current.clear()` exists\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst isReactNative = (_textInputRef: any): _textInputRef is TextInputReactNative => {\n return getPlatformType() === 'react-native';\n};\n\nconst _TextInput: React.ForwardRefRenderFunction<BladeElementRef, TextInputProps> = (\n {\n label,\n accessibilityLabel,\n labelPosition = 'top',\n placeholder,\n type = 'text',\n defaultValue,\n name,\n value,\n maxCharacters,\n onChange,\n onClick,\n onFocus,\n onBlur,\n onSubmit,\n isDisabled,\n necessityIndicator,\n validationState,\n errorText,\n helpText,\n successText,\n isRequired,\n icon,\n prefix,\n showClearButton,\n onClearButtonClick,\n isLoading,\n suffix,\n autoFocus,\n keyboardReturnKeyType,\n autoCompleteSuggestionType,\n autoCapitalize,\n testID,\n size = 'medium',\n leadingIcon,\n trailingIcon,\n isTaggedInput,\n tags,\n onTagChange,\n ...styledProps\n },\n ref,\n): ReactElement => {\n const textInputRef = React.useRef<BladeElementRefWithValue>(null);\n const mergedRef = useMergeRefs(ref, textInputRef);\n const [shouldShowClearButton, setShouldShowClearButton] = useState(false);\n const [isInputFocussed, setIsInputFocussed] = useState(autoFocus ?? false);\n const {\n activeTagIndex,\n setActiveTagIndex,\n getTags,\n handleTaggedInputKeydown,\n handleTaggedInputChange,\n handleTagsClear,\n } = useTaggedInput({\n isTaggedInput,\n tags,\n onTagChange,\n isDisabled,\n onChange,\n name,\n value,\n inputRef: textInputRef,\n });\n\n React.useEffect(() => {\n setShouldShowClearButton(Boolean(showClearButton && (defaultValue ?? value)));\n }, [showClearButton, defaultValue, value]);\n\n const renderInteractionElement = (): ReactNode => {\n if (isLoading) {\n return <Spinner accessibilityLabel=\"Loading Content\" color=\"primary\" />;\n }\n\n if (shouldShowClearButton) {\n return (\n <IconButton\n size=\"medium\"\n icon={CloseIcon}\n onClick={() => {\n if (isEmpty(value) && textInputRef.current) {\n // when the input field is uncontrolled take the ref and clear the input and then call the onClearButtonClick function\n if (isReactNative(textInputRef.current)) {\n textInputRef.current.clear();\n textInputRef.current.focus();\n } else if (textInputRef.current instanceof HTMLInputElement) {\n textInputRef.current.value = '';\n textInputRef.current.focus();\n }\n }\n handleTagsClear();\n // if the input field is controlled just call the click handler and the value change shall be left upto the consumer\n onClearButtonClick?.();\n textInputRef?.current?.focus();\n setShouldShowClearButton(false);\n }}\n isDisabled={isDisabled}\n accessibilityLabel=\"Clear Input Content\"\n />\n );\n }\n\n return null;\n };\n\n return (\n <BaseInput\n id=\"textinput\"\n componentName={MetaConstants.TextInput}\n ref={mergedRef}\n label={label as string}\n accessibilityLabel={accessibilityLabel}\n hideLabelText={!Boolean(label)}\n labelPosition={labelPosition}\n placeholder={placeholder}\n defaultValue={defaultValue}\n value={value}\n name={name}\n maxCharacters={maxCharacters}\n isDropdownTrigger={isTaggedInput}\n tags={isTaggedInput ? getTags({ size }) : undefined}\n showAllTags={isInputFocussed}\n maxTagRows=\"single\"\n activeTagIndex={activeTagIndex}\n setActiveTagIndex={setActiveTagIndex}\n onChange={({ name, value }) => {\n if (showClearButton && value?.length) {\n // show the clear button when the user starts typing in\n setShouldShowClearButton(true);\n }\n\n if (shouldShowClearButton && !value?.length) {\n // hide the clear button when the input field is empty\n setShouldShowClearButton(false);\n }\n\n handleTaggedInputChange({ name, value });\n onChange?.({ name, value });\n }}\n onClick={onClick}\n onFocus={(e) => {\n setIsInputFocussed(true);\n onFocus?.(e);\n }}\n onBlur={(e) => {\n setIsInputFocussed(false);\n onBlur?.(e);\n }}\n onKeyDown={(e) => {\n handleTaggedInputKeydown(e);\n }}\n onSubmit={onSubmit}\n isDisabled={isDisabled}\n necessityIndicator={necessityIndicator}\n isRequired={isRequired}\n leadingIcon={leadingIcon ?? icon}\n prefix={prefix}\n trailingInteractionElement={renderInteractionElement()}\n trailingIcon={trailingIcon}\n suffix={suffix}\n validationState={validationState}\n errorText={errorText}\n helpText={helpText}\n successText={successText}\n trailingFooterSlot={(value) => {\n return maxCharacters ? (\n <BaseBox marginTop={hintMarginTop[size]} marginRight=\"spacing.1\">\n <CharacterCounter\n currentCount={value?.length ?? 0}\n maxCount={maxCharacters}\n size={size}\n />\n </BaseBox>\n ) : null;\n }}\n // eslint-disable-next-line jsx-a11y/no-autofocus\n autoFocus={autoFocus}\n testID={testID}\n {...getKeyboardAndAutocompleteProps({\n type,\n keyboardReturnKeyType,\n autoCompleteSuggestionType,\n autoCapitalize,\n })}\n size={size}\n {...styledProps}\n />\n );\n};\n\nconst TextInput = assignWithoutSideEffects(React.forwardRef(_TextInput), {\n displayName: 'TextInput',\n});\n\nexport type { TextInputProps };\nexport { TextInput };\n"],"names":["isReactNative","_textInputRef","getPlatformType","_TextInput","_ref","ref","label","accessibilityLabel","_ref$labelPosition","labelPosition","placeholder","_ref$type","type","defaultValue","name","value","maxCharacters","onChange","onClick","onFocus","onBlur","onSubmit","isDisabled","necessityIndicator","validationState","errorText","helpText","successText","isRequired","icon","prefix","showClearButton","onClearButtonClick","isLoading","suffix","autoFocus","keyboardReturnKeyType","autoCompleteSuggestionType","autoCapitalize","testID","_ref$size","size","leadingIcon","trailingIcon","isTaggedInput","tags","onTagChange","styledProps","_objectWithoutProperties","_excluded","textInputRef","React","useRef","mergedRef","useMergeRefs","_useState","useState","_useState2","_slicedToArray","shouldShowClearButton","setShouldShowClearButton","_useState3","_useState4","isInputFocussed","setIsInputFocussed","_useTaggedInput","useTaggedInput","inputRef","activeTagIndex","setActiveTagIndex","getTags","handleTaggedInputKeydown","handleTaggedInputChange","handleTagsClear","useEffect","Boolean","renderInteractionElement","_jsx","Spinner","color","IconButton","CloseIcon","_textInputRef$current","isEmpty","current","clear","focus","HTMLInputElement","BaseInput","_objectSpread","id","componentName","MetaConstants","TextInput","hideLabelText","isDropdownTrigger","undefined","showAllTags","maxTagRows","_ref2","length","e","onKeyDown","trailingInteractionElement","trailingFooterSlot","_value$length","BaseBox","marginTop","hintMarginTop","marginRight","children","CharacterCounter","currentCount","maxCount","getKeyboardAndAutocompleteProps","assignWithoutSideEffects","forwardRef","displayName"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgIA;AACA;AACA,IAAMA,aAAa,GAAG,SAAhBA,aAAaA,CAAIC,aAAkB,EAA4C;AACnF,EAAA,OAAOC,eAAe,EAAE,KAAK,cAAc,CAAA;AAC7C,CAAC,CAAA;AAED,IAAMC,UAA2E,GAAG,SAA9EA,UAA2EA,CAAAC,IAAA,EA0C/EC,GAAG,EACc;AAAA,EAAA,IAzCfC,KAAK,GAAAF,IAAA,CAALE,KAAK;IACLC,kBAAkB,GAAAH,IAAA,CAAlBG,kBAAkB;IAAAC,kBAAA,GAAAJ,IAAA,CAClBK,aAAa;AAAbA,IAAAA,aAAa,GAAAD,kBAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,kBAAA;IACrBE,WAAW,GAAAN,IAAA,CAAXM,WAAW;IAAAC,SAAA,GAAAP,IAAA,CACXQ,IAAI;AAAJA,IAAAA,IAAI,GAAAD,SAAA,KAAG,KAAA,CAAA,GAAA,MAAM,GAAAA,SAAA;IACbE,YAAY,GAAAT,IAAA,CAAZS,YAAY;IACZC,IAAI,GAAAV,IAAA,CAAJU,IAAI;IACJC,KAAK,GAAAX,IAAA,CAALW,KAAK;IACLC,aAAa,GAAAZ,IAAA,CAAbY,aAAa;IACbC,SAAQ,GAAAb,IAAA,CAARa,QAAQ;IACRC,OAAO,GA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WAAW,EAAC,WAAW;QAAAC,QAAA,eAC9DjC,GAAA,CAACkC,gBAAgB,EAAA;AACfC,UAAAA,YAAY,EAAAP,CAAAA,aAAA,GAAE1F,KAAK,aAALA,KAAK,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAALA,KAAK,CAAEqF,MAAM,MAAAK,IAAAA,IAAAA,aAAA,KAAAA,KAAAA,CAAAA,GAAAA,aAAA,GAAI,CAAE;AACjCQ,UAAAA,QAAQ,EAAEjG,aAAc;AACxByB,UAAAA,IAAI,EAAEA,IAAAA;SACP,CAAA;OACM,CAAC,GACR,IAAI,CAAA;AACV,KAAA;AACA;AAAA;AACAN,IAAAA,SAAS,EAAEA,SAAU;AACrBI,IAAAA,MAAM,EAAEA,MAAAA;AAAO,GAAA,EACX2E,+BAA+B,CAAC;AAClCtG,IAAAA,IAAI,EAAJA,IAAI;AACJwB,IAAAA,qBAAqB,EAArBA,qBAAqB;AACrBC,IAAAA,0BAA0B,EAA1BA,0BAA0B;AAC1BC,IAAAA,cAAc,EAAdA,cAAAA;AACF,GAAC,CAAC,CAAA,EAAA,EAAA,EAAA;AACFG,IAAAA,IAAI,EAAEA,IAAAA;GACFM,EAAAA,WAAW,CAChB,CAAC,CAAA;AAEN,CAAC,CAAA;AAEK8C,IAAAA,SAAS,gBAAGsB,wBAAwB,eAAChE,cAAK,CAACiE,UAAU,CAACjH,UAAU,CAAC,EAAE;AACvEkH,EAAAA,WAAW,EAAE,WAAA;AACf,CAAC;;;;"}
|
|
@@ -29,8 +29,8 @@ import { assignWithoutSideEffects } from '../../../utils/assignWithoutSideEffect
|
|
|
29
29
|
|
|
30
30
|
var _excluded = ["children", "icon", "iconPosition", "isDisabled", "onClick", "onKeyDown", "variant", "href", "target", "rel", "color", "opacity", "accessibilityProps", "className", "style", "size", "testID", "hitSlop", "htmlTitle", "onBlur", "onFocus", "onMouseLeave", "onMouseMove", "onPointerDown", "onPointerEnter", "onTouchStart", "onTouchEnd"],
|
|
31
31
|
_excluded2 = ["currentInteraction", "setCurrentInteraction"];
|
|
32
|
-
function ownKeys(
|
|
33
|
-
function _objectSpread(
|
|
32
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
33
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
34
34
|
var getColorToken = function getColorToken(_ref) {
|
|
35
35
|
var variant = _ref.variant,
|
|
36
36
|
color = _ref.color,
|
|
@@ -12,8 +12,8 @@ import { makeBorderSize } from '../../../utils/makeBorderSize/makeBorderSize.js'
|
|
|
12
12
|
import { castWebType } from '../../../utils/platform/castUtils.js';
|
|
13
13
|
import { makeMotionTime } from '../../../utils/makeMotionTime/makeMotionTime.web.js';
|
|
14
14
|
|
|
15
|
-
function ownKeys(
|
|
16
|
-
function _objectSpread(
|
|
15
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
16
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
17
17
|
var StyledLink = /*#__PURE__*/styled.button.withConfig({
|
|
18
18
|
shouldForwardProp: omitPropsFromHTML,
|
|
19
19
|
displayName: 'StyledLink'
|
|
@@ -10,8 +10,8 @@ import { getStyledProps } from '../../Box/styledProps/getStyledProps.js';
|
|
|
10
10
|
import { assignWithoutSideEffects } from '../../../utils/assignWithoutSideEffects/assignWithoutSideEffects.js';
|
|
11
11
|
|
|
12
12
|
var _excluded = ["children", "icon", "iconPosition", "isDisabled", "onClick", "variant", "color", "href", "target", "rel", "accessibilityLabel", "size", "testID", "hitSlop", "htmlTitle", "onBlur", "onFocus", "onMouseLeave", "onMouseMove", "onPointerDown", "onPointerEnter", "onTouchStart", "onTouchEnd"];
|
|
13
|
-
function ownKeys(
|
|
14
|
-
function _objectSpread(
|
|
13
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
14
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
15
15
|
var _Link = function _Link(_ref, ref) {
|
|
16
16
|
var children = _ref.children,
|
|
17
17
|
icon = _ref.icon,
|
|
@@ -26,8 +26,8 @@ import { makeAccessible } from '../../utils/makeAccessible/makeAccessible.web.js
|
|
|
26
26
|
import { assignWithoutSideEffects } from '../../utils/assignWithoutSideEffects/assignWithoutSideEffects.js';
|
|
27
27
|
|
|
28
28
|
var _excluded = ["variant", "size", "children", "icon", "testID"];
|
|
29
|
-
function ownKeys(
|
|
30
|
-
function _objectSpread(
|
|
29
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
30
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
31
31
|
var StyledOrderedList = /*#__PURE__*/styled(OrderedList).withConfig({
|
|
32
32
|
displayName: "List__StyledOrderedList",
|
|
33
33
|
componentId: "bqf6r7-0"
|
|
@@ -121,7 +121,6 @@ var _List = function _List(_ref3) {
|
|
|
121
121
|
}))
|
|
122
122
|
});
|
|
123
123
|
};
|
|
124
|
-
|
|
125
124
|
var List = /*#__PURE__*/assignWithoutSideEffects(_List, {
|
|
126
125
|
componentId: MetaConstants.List
|
|
127
126
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"List.js","sources":["../../../../../../src/components/List/List.tsx"],"sourcesContent":["import React, { useMemo } from 'react';\nimport styled from 'styled-components';\nimport { ListProvider, useListContext } from './ListContext';\nimport { UnorderedList } from './UnorderedList';\nimport { OrderedList } from './OrderedList';\nimport type { ListItemProps } from './ListItem';\nimport getIn from '~utils/lodashButBetter/get';\nimport type { IconComponent } from '~components/Icons';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport type { DotNotationSpacingStringToken, TestID } from '~utils/types';\nimport BaseBox from '~components/Box/BaseBox';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { makeSpace } from '~utils/makeSpace';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { isValidAllowedChildren } from '~utils/isValidAllowedChildren';\nimport { throwBladeError } from '~utils/logger';\n\ntype ListCommonProps = {\n /**\n * ListItem to be rendered for the List.\n *\n */\n children: React.ReactElement<ListItemProps> | React.ReactElement<ListItemProps>[];\n /**\n * Sets the variant to be rendered for the List.\n *\n * @default 'unordered'\n */\n variant?: 'unordered' | 'ordered' | 'ordered-filled';\n /**\n * Sets the size for the List.\n *\n * @default 'medium'\n */\n size?: 'small' | 'medium' | 'large';\n} & TestID &\n StyledPropsBlade;\n\ntype ListWithIconProps = ListCommonProps & {\n variant?: 'unordered';\n icon?: IconComponent;\n};\ntype ListWithoutIconProps = ListCommonProps & {\n variant?: 'ordered' | 'ordered-filled';\n icon?: undefined;\n};\ntype ListProps = ListWithIconProps | ListWithoutIconProps;\n\nconst StyledOrderedList = styled(OrderedList)<{ marginTop?: DotNotationSpacingStringToken }>(\n ({ marginTop, theme }) => ({\n marginTop: marginTop ? makeSpace(getIn(theme, marginTop)) : undefined,\n }),\n);\n\nconst StyledUnorderedList = styled(UnorderedList)<{ marginTop?: DotNotationSpacingStringToken }>(\n ({ marginTop, theme }) => ({\n marginTop: marginTop ? makeSpace(getIn(theme, marginTop)) : undefined,\n }),\n);\n\n/**\n * List Component is used to display a set of related items that are composed of text/links. Each list item begins with a bullet or a number.\n *\n * ## Usage\n *\n * ```tsx\n * <List\n * variant='unordered'\n * size='medium'\n * >\n * <ListItem>\n * Item 1\n * <List>\n * <ListItem>Item 1.1</ListItem>\n * </List>\n * </ListItem>\n * <ListItem>Item 2</ListItem>\n * <List />\n * ```\n */\nconst _List = ({\n variant = 'unordered',\n size,\n children,\n icon,\n testID,\n ...styledProps\n}: ListProps): React.ReactElement => {\n const ListElement = variant === 'unordered' ? StyledUnorderedList : StyledOrderedList;\n const { level, size: listContextSize } = useListContext();\n const listContextValue = useMemo(\n () => ({\n level: level ? level + 1 : 1,\n size: size ?? listContextSize,\n icon,\n variant,\n }),\n [icon, level, listContextSize, size, variant],\n );\n\n const childrenArray = React.Children.toArray(children);\n const childListItems = childrenArray.filter((child) => {\n if (isValidAllowedChildren(child, MetaConstants.ListItem)) {\n return child;\n }\n if (__DEV__) {\n throwBladeError({\n message: 'You can only pass a ListItem as a child to List.',\n moduleName: 'List',\n });\n }\n return null;\n });\n\n return (\n <ListProvider value={listContextValue}>\n <BaseBox {...getStyledProps(styledProps)}>\n <ListElement\n {...metaAttribute({ name: MetaConstants.List, testID })}\n {...makeAccessible({ role: 'list' })} // Role needed for react-native\n >\n {variant === 'unordered'\n ? childListItems\n : childListItems.map(\n (child, index) =>\n React.cloneElement(child as React.ReactElement, { _itemNumber: index + 1 }), // adds _itemNumber for rendering ordered list bullets\n )}\n </ListElement>\n </BaseBox>\n </ListProvider>\n );\n};\n\nconst List = assignWithoutSideEffects(_List, { componentId: MetaConstants.List });\n\nexport { List };\nexport type { ListProps };\n"],"names":["StyledOrderedList","styled","OrderedList","withConfig","displayName","componentId","_ref","marginTop","theme","makeSpace","getIn","undefined","StyledUnorderedList","UnorderedList","_ref2","_List","_ref3","_ref3$variant","variant","size","children","icon","testID","styledProps","_objectWithoutProperties","_excluded","ListElement","_useListContext","useListContext","level","listContextSize","listContextValue","useMemo","childrenArray","React","Children","toArray","childListItems","filter","child","isValidAllowedChildren","MetaConstants","ListItem","throwBladeError","message","moduleName","_jsx","ListProvider","value","BaseBox","_objectSpread","getStyledProps","metaAttribute","name","List","makeAccessible","role","map","index","cloneElement","_itemNumber","assignWithoutSideEffects"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkDA,IAAMA,iBAAiB,gBAAGC,MAAM,CAACC,WAAW,CAAC,CAAAC,UAAA,CAAA;EAAAC,WAAA,EAAA,yBAAA;EAAAC,WAAA,EAAA,UAAA;AAAA,CAAA,CAAA,CAC3C,UAAAC,IAAA,EAAA;AAA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cAAc,CAAC5B,WAAW,CAAC,CAAA,EAAA,EAAA,EAAA;AAAAH,MAAAA,QAAA,eACtC0B,GAAA,CAACpB,WAAW,EAAAwB,aAAA,CAAAA,aAAA,CAAAA,aAAA,CACNE,EAAAA,EAAAA,aAAa,CAAC;QAAEC,IAAI,EAAEZ,aAAa,CAACa,IAAI;AAAEhC,QAAAA,MAAM,EAANA,MAAAA;OAAQ,CAAC,CACnDiC,EAAAA,cAAc,CAAC;AAAEC,QAAAA,IAAI,EAAE,MAAA;AAAO,OAAC,CAAC,CAAA,EAAA,EAAA,EAAA;AAAApC,QAAAA,QAAA,EAEnCF,OAAO,KAAK,WAAW,GACpBmB,cAAc,GACdA,cAAc,CAACoB,GAAG,CAChB,UAAClB,KAAK,EAAEmB,KAAK,EAAA;AAAA,UAAA,oBACXxB,cAAK,CAACyB,YAAY,CAACpB,KAAK,EAAwB;YAAEqB,WAAW,EAAEF,KAAK,GAAG,CAAA;AAAE,WAAC,CAAC,CAAA;SAAE;AACjF,SAAA;OACO,CAAA,CAAA;KACN,CAAA,CAAA;AAAC,GACE,CAAC,CAAA;AAEnB,CAAC,CAAA
|
|
1
|
+
{"version":3,"file":"List.js","sources":["../../../../../../src/components/List/List.tsx"],"sourcesContent":["import React, { useMemo } from 'react';\nimport styled from 'styled-components';\nimport { ListProvider, useListContext } from './ListContext';\nimport { UnorderedList } from './UnorderedList';\nimport { OrderedList } from './OrderedList';\nimport type { ListItemProps } from './ListItem';\nimport getIn from '~utils/lodashButBetter/get';\nimport type { IconComponent } from '~components/Icons';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport type { DotNotationSpacingStringToken, TestID } from '~utils/types';\nimport BaseBox from '~components/Box/BaseBox';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { makeSpace } from '~utils/makeSpace';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { isValidAllowedChildren } from '~utils/isValidAllowedChildren';\nimport { throwBladeError } from '~utils/logger';\n\ntype ListCommonProps = {\n /**\n * ListItem to be rendered for the List.\n *\n */\n children: React.ReactElement<ListItemProps> | React.ReactElement<ListItemProps>[];\n /**\n * Sets the variant to be rendered for the List.\n *\n * @default 'unordered'\n */\n variant?: 'unordered' | 'ordered' | 'ordered-filled';\n /**\n * Sets the size for the List.\n *\n * @default 'medium'\n */\n size?: 'small' | 'medium' | 'large';\n} & TestID &\n StyledPropsBlade;\n\ntype ListWithIconProps = ListCommonProps & {\n variant?: 'unordered';\n icon?: IconComponent;\n};\ntype ListWithoutIconProps = ListCommonProps & {\n variant?: 'ordered' | 'ordered-filled';\n icon?: undefined;\n};\ntype ListProps = ListWithIconProps | ListWithoutIconProps;\n\nconst StyledOrderedList = styled(OrderedList)<{ marginTop?: DotNotationSpacingStringToken }>(\n ({ marginTop, theme }) => ({\n marginTop: marginTop ? makeSpace(getIn(theme, marginTop)) : undefined,\n }),\n);\n\nconst StyledUnorderedList = styled(UnorderedList)<{ marginTop?: DotNotationSpacingStringToken }>(\n ({ marginTop, theme }) => ({\n marginTop: marginTop ? makeSpace(getIn(theme, marginTop)) : undefined,\n }),\n);\n\n/**\n * List Component is used to display a set of related items that are composed of text/links. Each list item begins with a bullet or a number.\n *\n * ## Usage\n *\n * ```tsx\n * <List\n * variant='unordered'\n * size='medium'\n * >\n * <ListItem>\n * Item 1\n * <List>\n * <ListItem>Item 1.1</ListItem>\n * </List>\n * </ListItem>\n * <ListItem>Item 2</ListItem>\n * <List />\n * ```\n */\nconst _List = ({\n variant = 'unordered',\n size,\n children,\n icon,\n testID,\n ...styledProps\n}: ListProps): React.ReactElement => {\n const ListElement = variant === 'unordered' ? StyledUnorderedList : StyledOrderedList;\n const { level, size: listContextSize } = useListContext();\n const listContextValue = useMemo(\n () => ({\n level: level ? level + 1 : 1,\n size: size ?? listContextSize,\n icon,\n variant,\n }),\n [icon, level, listContextSize, size, variant],\n );\n\n const childrenArray = React.Children.toArray(children);\n const childListItems = childrenArray.filter((child) => {\n if (isValidAllowedChildren(child, MetaConstants.ListItem)) {\n return child;\n }\n if (__DEV__) {\n throwBladeError({\n message: 'You can only pass a ListItem as a child to List.',\n moduleName: 'List',\n });\n }\n return null;\n });\n\n return (\n <ListProvider value={listContextValue}>\n <BaseBox {...getStyledProps(styledProps)}>\n <ListElement\n {...metaAttribute({ name: MetaConstants.List, testID })}\n {...makeAccessible({ role: 'list' })} // Role needed for react-native\n >\n {variant === 'unordered'\n ? childListItems\n : childListItems.map(\n (child, index) =>\n React.cloneElement(child as React.ReactElement, { _itemNumber: index + 1 }), // adds _itemNumber for rendering ordered list bullets\n )}\n </ListElement>\n </BaseBox>\n </ListProvider>\n );\n};\n\nconst List = assignWithoutSideEffects(_List, { componentId: MetaConstants.List });\n\nexport { List };\nexport type { ListProps };\n"],"names":["StyledOrderedList","styled","OrderedList","withConfig","displayName","componentId","_ref","marginTop","theme","makeSpace","getIn","undefined","StyledUnorderedList","UnorderedList","_ref2","_List","_ref3","_ref3$variant","variant","size","children","icon","testID","styledProps","_objectWithoutProperties","_excluded","ListElement","_useListContext","useListContext","level","listContextSize","listContextValue","useMemo","childrenArray","React","Children","toArray","childListItems","filter","child","isValidAllowedChildren","MetaConstants","ListItem","throwBladeError","message","moduleName","_jsx","ListProvider","value","BaseBox","_objectSpread","getStyledProps","metaAttribute","name","List","makeAccessible","role","map","index","cloneElement","_itemNumber","assignWithoutSideEffects"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkDA,IAAMA,iBAAiB,gBAAGC,MAAM,CAACC,WAAW,CAAC,CAAAC,UAAA,CAAA;EAAAC,WAAA,EAAA,yBAAA;EAAAC,WAAA,EAAA,UAAA;AAAA,CAAA,CAAA,CAC3C,UAAAC,IAAA,EAAA;AAAA,EAAA,IAAGC,SAAS,GAAAD,IAAA,CAATC,SAAS;IAAEC,KAAK,GAAAF,IAAA,CAALE,KAAK,CAAA;E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WAAW,EAAAwB,aAAA,CAAAA,aAAA,CAAAA,aAAA,CACNE,EAAAA,EAAAA,aAAa,CAAC;QAAEC,IAAI,EAAEZ,aAAa,CAACa,IAAI;AAAEhC,QAAAA,MAAM,EAANA,MAAAA;OAAQ,CAAC,CACnDiC,EAAAA,cAAc,CAAC;AAAEC,QAAAA,IAAI,EAAE,MAAA;AAAO,OAAC,CAAC,CAAA,EAAA,EAAA,EAAA;AAAApC,QAAAA,QAAA,EAEnCF,OAAO,KAAK,WAAW,GACpBmB,cAAc,GACdA,cAAc,CAACoB,GAAG,CAChB,UAAClB,KAAK,EAAEmB,KAAK,EAAA;AAAA,UAAA,oBACXxB,cAAK,CAACyB,YAAY,CAACpB,KAAK,EAAwB;YAAEqB,WAAW,EAAEF,KAAK,GAAG,CAAA;AAAE,WAAC,CAAC,CAAA;SAAE;AACjF,SAAA;OACO,CAAA,CAAA;KACN,CAAA,CAAA;AAAC,GACE,CAAC,CAAA;AAEnB,CAAC,CAAA;AAED,IAAMJ,IAAI,gBAAGO,wBAAwB,CAAC9C,KAAK,EAAE;EAAEV,WAAW,EAAEoC,aAAa,CAACa,IAAAA;AAAK,CAAC;;;;"}
|
|
@@ -26,8 +26,8 @@ import { MetaConstants } from '../../utils/metaAttribute/metaConstants.js';
|
|
|
26
26
|
import { metaAttribute } from '../../utils/metaAttribute/metaAttribute.web.js';
|
|
27
27
|
import { assignWithoutSideEffects } from '../../utils/assignWithoutSideEffects/assignWithoutSideEffects.js';
|
|
28
28
|
|
|
29
|
-
function ownKeys(
|
|
30
|
-
function _objectSpread(
|
|
29
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
30
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
31
31
|
var StyledListItem = /*#__PURE__*/styled(ListItemElement).withConfig({
|
|
32
32
|
displayName: "ListItem__StyledListItem",
|
|
33
33
|
componentId: "sc-6bxu4b-0"
|
|
@@ -8,8 +8,8 @@ import Link from '../Link/Link/Link.js';
|
|
|
8
8
|
import { assignWithoutSideEffects } from '../../utils/assignWithoutSideEffects/assignWithoutSideEffects.js';
|
|
9
9
|
import { MetaConstants } from '../../utils/metaAttribute/metaConstants.js';
|
|
10
10
|
|
|
11
|
-
function ownKeys(
|
|
12
|
-
function _objectSpread(
|
|
11
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
12
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
13
13
|
var _ListItemLink = function _ListItemLink(_ref) {
|
|
14
14
|
var accessibilityLabel = _ref.accessibilityLabel,
|
|
15
15
|
children = _ref.children,
|
|
@@ -10,8 +10,8 @@ import { assignWithoutSideEffects } from '../../utils/assignWithoutSideEffects/a
|
|
|
10
10
|
import { MetaConstants } from '../../utils/metaAttribute/metaConstants.js';
|
|
11
11
|
|
|
12
12
|
var _excluded = ["children", "testID"];
|
|
13
|
-
function ownKeys(
|
|
14
|
-
function _objectSpread(
|
|
13
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
14
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
15
15
|
var _ListItemText = function _ListItemText(_ref) {
|
|
16
16
|
var children = _ref.children,
|
|
17
17
|
testID = _ref.testID,
|
|
@@ -16,7 +16,7 @@ var LiveAnnouncer = /*#__PURE__*/function () {
|
|
|
16
16
|
this.node.appendChild(this.politeLog);
|
|
17
17
|
document.body.prepend(this.node);
|
|
18
18
|
}
|
|
19
|
-
_createClass(LiveAnnouncer, [{
|
|
19
|
+
return _createClass(LiveAnnouncer, [{
|
|
20
20
|
key: "createLog",
|
|
21
21
|
value: function createLog(ariaLive) {
|
|
22
22
|
var node = document.createElement('div');
|
|
@@ -69,7 +69,6 @@ var LiveAnnouncer = /*#__PURE__*/function () {
|
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
71
|
}]);
|
|
72
|
-
return LiveAnnouncer;
|
|
73
72
|
}();
|
|
74
73
|
/**
|
|
75
74
|
* Announces the message using screen reader technology.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LiveAnnouncer.web.js","sources":["../../../../../../src/components/LiveAnnouncer/LiveAnnouncer.web.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/ban-ts-comment */\n\n// Modified version of @react-aria/live-announcer\n// https://github.com/adobe/react-spectrum/blob/main/packages/@react-aria/live-announcer/src/LiveAnnouncer.tsx\n// LiveAnnouncer is implemented using vanilla DOM, not React.\n// While the spectrum team had their own reasons for using vanillajs,\n// For us:\n// 1. It's significantly easier to maintain & understand LiveAnnouncer code in vanillajs than React.\n// With React maintaining a singleton instance of LiveAnnouncer is tricky because we need\n// to save the instance of ReactElement to a top level ref, and then use ReactDOM.render() to render it\n// 2. Providing imperative APIs like `announce()` is also trikcky which involves using lesser known\n// React hook `useImperativeHandle` to give users imperative access.\n\nimport type { Assertiveness } from './types';\nimport { screenReaderStyles } from '~components/VisuallyHidden/ScreenReaderStyles';\n\nconst LIVEREGION_TIMEOUT_DELAY = 1000;\nlet liveAnnouncer: LiveAnnouncer | null = null;\n\nclass LiveAnnouncer {\n node: HTMLElement;\n assertiveLog: HTMLElement;\n politeLog: HTMLElement;\n\n constructor() {\n this.node = document.createElement('div');\n this.node.dataset.liveAnnouncer = 'true';\n Object.assign(this.node.style, screenReaderStyles);\n\n this.assertiveLog = this.createLog('assertive');\n this.node.appendChild(this.assertiveLog);\n\n this.politeLog = this.createLog('polite');\n this.node.appendChild(this.politeLog);\n\n document.body.prepend(this.node);\n }\n\n createLog(ariaLive: string): HTMLDivElement {\n const node = document.createElement('div');\n node.setAttribute('role', 'log');\n node.setAttribute('aria-live', ariaLive);\n node.setAttribute('aria-relevant', 'additions');\n return node;\n }\n\n destroy(): void {\n if (!this.node) {\n return;\n }\n\n document.body.removeChild(this.node);\n // @ts-expect-error\n this.node = null;\n }\n\n announce(message: string, assertiveness: Assertiveness = 'assertive'): void {\n if (!this.node) {\n return;\n }\n\n const node = document.createElement('div');\n node.textContent = message;\n\n if (assertiveness === 'assertive') {\n this.assertiveLog.appendChild(node);\n } else {\n this.politeLog.appendChild(node);\n }\n\n if (message !== '') {\n setTimeout(() => {\n node.remove();\n }, LIVEREGION_TIMEOUT_DELAY);\n }\n }\n\n clear(assertiveness: Assertiveness): void {\n if (!this.node) {\n return;\n }\n\n if (!assertiveness || assertiveness === 'assertive') {\n this.assertiveLog.innerHTML = '';\n }\n\n if (!assertiveness || assertiveness === 'polite') {\n this.politeLog.innerHTML = '';\n }\n }\n}\n\n/**\n * Announces the message using screen reader technology.\n */\nexport function announce(message: string, assertiveness: Assertiveness = 'assertive'): void {\n if (!liveAnnouncer) {\n liveAnnouncer = new LiveAnnouncer();\n }\n\n liveAnnouncer.announce(message, assertiveness);\n}\n\n/**\n * Stops all queued announcements.\n */\nexport function clearAnnouncer(assertiveness: Assertiveness): void {\n if (liveAnnouncer) {\n liveAnnouncer.clear(assertiveness);\n }\n}\n\n/**\n * Removes the announcer from the DOM.\n */\nexport function destroyAnnouncer(): void {\n if (liveAnnouncer) {\n liveAnnouncer.destroy();\n liveAnnouncer = null;\n }\n}\n"],"names":["LIVEREGION_TIMEOUT_DELAY","liveAnnouncer","LiveAnnouncer","_classCallCheck","node","document","createElement","dataset","Object","assign","style","screenReaderStyles","assertiveLog","createLog","appendChild","politeLog","body","prepend","_createClass","key","value","ariaLive","setAttribute","destroy","removeChild","announce","message","assertiveness","arguments","length","undefined","textContent","setTimeout","remove","clear","innerHTML","clearAnnouncer","destroyAnnouncer"],"mappings":";;;;AAgBA,IAAMA,wBAAwB,GAAG,IAAI,CAAA;AACrC,IAAIC,aAAmC,GAAG,IAAI,CAAA;AAAC,IAEzCC,aAAa,gBAAA,YAAA;AAKjB,EAAA,SAAAA,gBAAc;AAAAC,IAAAA,eAAA,OAAAD,aAAA,CAAA,CAAA;IACZ,IAAI,CAACE,IAAI,GAAGC,QAAQ,CAACC,aAAa,CAAC,KAAK,CAAC,CAAA;AACzC,IAAA,IAAI,CAACF,IAAI,CAACG,OAAO,CAACN,aAAa,GAAG,MAAM,CAAA;IACxCO,MAAM,CAACC,MAAM,CAAC,IAAI,CAACL,IAAI,CAACM,KAAK,EAAEC,kBAAkB,CAAC,CAAA;IAElD,IAAI,CAACC,YAAY,GAAG,IAAI,CAACC,SAAS,CAAC,WAAW,CAAC,CAAA;IAC/C,IAAI,CAACT,IAAI,CAACU,WAAW,CAAC,IAAI,CAACF,YAAY,CAAC,CAAA;IAExC,IAAI,CAACG,SAAS,GAAG,IAAI,CAACF,SAAS,CAAC,QAAQ,CAAC,CAAA;IACzC,IAAI,CAACT,IAAI,CAACU,WAAW,CAAC,IAAI,CAACC,SAAS,CAAC,CAAA;IAErCV,QAAQ,CAACW,IAAI,CAACC,OAAO,CAAC,IAAI,CAACb,IAAI,CAAC,CAAA;AAClC,GAAA;
|
|
1
|
+
{"version":3,"file":"LiveAnnouncer.web.js","sources":["../../../../../../src/components/LiveAnnouncer/LiveAnnouncer.web.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/ban-ts-comment */\n\n// Modified version of @react-aria/live-announcer\n// https://github.com/adobe/react-spectrum/blob/main/packages/@react-aria/live-announcer/src/LiveAnnouncer.tsx\n// LiveAnnouncer is implemented using vanilla DOM, not React.\n// While the spectrum team had their own reasons for using vanillajs,\n// For us:\n// 1. It's significantly easier to maintain & understand LiveAnnouncer code in vanillajs than React.\n// With React maintaining a singleton instance of LiveAnnouncer is tricky because we need\n// to save the instance of ReactElement to a top level ref, and then use ReactDOM.render() to render it\n// 2. Providing imperative APIs like `announce()` is also trikcky which involves using lesser known\n// React hook `useImperativeHandle` to give users imperative access.\n\nimport type { Assertiveness } from './types';\nimport { screenReaderStyles } from '~components/VisuallyHidden/ScreenReaderStyles';\n\nconst LIVEREGION_TIMEOUT_DELAY = 1000;\nlet liveAnnouncer: LiveAnnouncer | null = null;\n\nclass LiveAnnouncer {\n node: HTMLElement;\n assertiveLog: HTMLElement;\n politeLog: HTMLElement;\n\n constructor() {\n this.node = document.createElement('div');\n this.node.dataset.liveAnnouncer = 'true';\n Object.assign(this.node.style, screenReaderStyles);\n\n this.assertiveLog = this.createLog('assertive');\n this.node.appendChild(this.assertiveLog);\n\n this.politeLog = this.createLog('polite');\n this.node.appendChild(this.politeLog);\n\n document.body.prepend(this.node);\n }\n\n createLog(ariaLive: string): HTMLDivElement {\n const node = document.createElement('div');\n node.setAttribute('role', 'log');\n node.setAttribute('aria-live', ariaLive);\n node.setAttribute('aria-relevant', 'additions');\n return node;\n }\n\n destroy(): void {\n if (!this.node) {\n return;\n }\n\n document.body.removeChild(this.node);\n // @ts-expect-error\n this.node = null;\n }\n\n announce(message: string, assertiveness: Assertiveness = 'assertive'): void {\n if (!this.node) {\n return;\n }\n\n const node = document.createElement('div');\n node.textContent = message;\n\n if (assertiveness === 'assertive') {\n this.assertiveLog.appendChild(node);\n } else {\n this.politeLog.appendChild(node);\n }\n\n if (message !== '') {\n setTimeout(() => {\n node.remove();\n }, LIVEREGION_TIMEOUT_DELAY);\n }\n }\n\n clear(assertiveness: Assertiveness): void {\n if (!this.node) {\n return;\n }\n\n if (!assertiveness || assertiveness === 'assertive') {\n this.assertiveLog.innerHTML = '';\n }\n\n if (!assertiveness || assertiveness === 'polite') {\n this.politeLog.innerHTML = '';\n }\n }\n}\n\n/**\n * Announces the message using screen reader technology.\n */\nexport function announce(message: string, assertiveness: Assertiveness = 'assertive'): void {\n if (!liveAnnouncer) {\n liveAnnouncer = new LiveAnnouncer();\n }\n\n liveAnnouncer.announce(message, assertiveness);\n}\n\n/**\n * Stops all queued announcements.\n */\nexport function clearAnnouncer(assertiveness: Assertiveness): void {\n if (liveAnnouncer) {\n liveAnnouncer.clear(assertiveness);\n }\n}\n\n/**\n * Removes the announcer from the DOM.\n */\nexport function destroyAnnouncer(): void {\n if (liveAnnouncer) {\n liveAnnouncer.destroy();\n liveAnnouncer = null;\n }\n}\n"],"names":["LIVEREGION_TIMEOUT_DELAY","liveAnnouncer","LiveAnnouncer","_classCallCheck","node","document","createElement","dataset","Object","assign","style","screenReaderStyles","assertiveLog","createLog","appendChild","politeLog","body","prepend","_createClass","key","value","ariaLive","setAttribute","destroy","removeChild","announce","message","assertiveness","arguments","length","undefined","textContent","setTimeout","remove","clear","innerHTML","clearAnnouncer","destroyAnnouncer"],"mappings":";;;;AAgBA,IAAMA,wBAAwB,GAAG,IA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|
|
31
31
|
import { makeAccessible } from '../../utils/makeAccessible/makeAccessible.web.js';
|
|
32
32
|
import { makeSize } from '../../utils/makeSize/makeSize.js';
|
|
33
33
|
|
|
34
|
-
function ownKeys(
|
|
35
|
-
function _objectSpread(
|
|
34
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
35
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
36
36
|
var entry = /*#__PURE__*/keyframes(["from{opacity:0;transform:translate(-50%,-50%) scale(0.9) translateY(20px);}to{opacity:1;transform:translate(-50%,-50%) scale(1) translateY(0px);}"]);
|
|
37
37
|
var exit = /*#__PURE__*/keyframes(["from{opacity:1;transform:translate(-50%,-50%) scale(1) translateY(0px);}to{opacity:0;transform:translate(-50%,-50%) scale(0.9) translateY(20px);}"]);
|
|
38
38
|
var ModalContent = /*#__PURE__*/styled(BaseBox).withConfig({
|
|
@@ -11,8 +11,8 @@ import { castWebType } from '../../utils/platform/castUtils.js';
|
|
|
11
11
|
import { metaAttribute } from '../../utils/metaAttribute/metaAttribute.web.js';
|
|
12
12
|
import { MetaConstants } from '../../utils/metaAttribute/metaConstants.js';
|
|
13
13
|
|
|
14
|
-
function ownKeys(
|
|
15
|
-
function _objectSpread(
|
|
14
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
15
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
16
16
|
var StyledModalBackdrop = /*#__PURE__*/styled(FloatingOverlay).withConfig({
|
|
17
17
|
displayName: "ModalBackdrop__StyledModalBackdrop",
|
|
18
18
|
componentId: "sc-69uedf-0"
|
|
@@ -9,8 +9,8 @@ import { metaAttribute } from '../../utils/metaAttribute/metaAttribute.web.js';
|
|
|
9
9
|
import { MetaConstants } from '../../utils/metaAttribute/metaConstants.js';
|
|
10
10
|
import { assignWithoutSideEffects } from '../../utils/assignWithoutSideEffects/assignWithoutSideEffects.js';
|
|
11
11
|
|
|
12
|
-
function ownKeys(
|
|
13
|
-
function _objectSpread(
|
|
12
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
13
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
14
14
|
var _ModalBody = function _ModalBody(_ref) {
|
|
15
15
|
var children = _ref.children,
|
|
16
16
|
_ref$padding = _ref.padding,
|