@razorpay/blade 11.37.0 → 11.38.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/lib/native/components/Accordion/Accordion.js +2 -1
- package/build/lib/native/components/Accordion/Accordion.js.map +1 -1
- package/build/lib/native/components/Accordion/AccordionItem.js +3 -1
- package/build/lib/native/components/Accordion/AccordionItem.js.map +1 -1
- package/build/lib/native/components/Accordion/AccordionItemBody.js +3 -2
- package/build/lib/native/components/Accordion/AccordionItemBody.js.map +1 -1
- package/build/lib/native/components/Accordion/AccordionItemHeader.js +3 -2
- package/build/lib/native/components/Accordion/AccordionItemHeader.js.map +1 -1
- package/build/lib/native/components/ActionList/ActionList.js +3 -1
- package/build/lib/native/components/ActionList/ActionList.js.map +1 -1
- package/build/lib/native/components/ActionList/ActionListItem.js +3 -2
- package/build/lib/native/components/ActionList/ActionListItem.js.map +1 -1
- package/build/lib/native/components/Alert/Alert.js +2 -1
- package/build/lib/native/components/Alert/Alert.js.map +1 -1
- package/build/lib/native/components/Amount/Amount.js +2 -1
- package/build/lib/native/components/Amount/Amount.js.map +1 -1
- package/build/lib/native/components/Badge/Badge.js +2 -1
- package/build/lib/native/components/Badge/Badge.js.map +1 -1
- package/build/lib/native/components/BaseHeaderFooter/BaseFooter.js +3 -1
- package/build/lib/native/components/BaseHeaderFooter/BaseFooter.js.map +1 -1
- package/build/lib/native/components/BaseHeaderFooter/BaseHeader.js +3 -2
- package/build/lib/native/components/BaseHeaderFooter/BaseHeader.js.map +1 -1
- package/build/lib/native/components/Box/BaseBox/types/propsTypes.js.map +1 -1
- package/build/lib/native/components/Box/Box.js +2 -1
- package/build/lib/native/components/Box/Box.js.map +1 -1
- package/build/lib/native/components/Button/BaseButton/BaseButton.js +2 -1
- package/build/lib/native/components/Button/BaseButton/BaseButton.js.map +1 -1
- package/build/lib/native/components/Button/Button/Button.js +2 -1
- package/build/lib/native/components/Button/Button/Button.js.map +1 -1
- package/build/lib/native/components/Button/IconButton/IconButton.js +3 -1
- package/build/lib/native/components/Button/IconButton/IconButton.js.map +1 -1
- package/build/lib/native/components/Card/Card.js +2 -1
- package/build/lib/native/components/Card/Card.js.map +1 -1
- package/build/lib/native/components/Card/CardFooter.js +3 -2
- package/build/lib/native/components/Card/CardFooter.js.map +1 -1
- package/build/lib/native/components/Card/CardHeader.js +3 -2
- package/build/lib/native/components/Card/CardHeader.js.map +1 -1
- package/build/lib/native/components/Checkbox/Checkbox.js +3 -2
- package/build/lib/native/components/Checkbox/Checkbox.js.map +1 -1
- package/build/lib/native/components/Checkbox/CheckboxGroup/CheckboxGroup.js +2 -1
- package/build/lib/native/components/Checkbox/CheckboxGroup/CheckboxGroup.js.map +1 -1
- package/build/lib/native/components/Chip/Chip.js +2 -1
- package/build/lib/native/components/Chip/Chip.js.map +1 -1
- package/build/lib/native/components/Chip/ChipGroup.js +2 -1
- package/build/lib/native/components/Chip/ChipGroup.js.map +1 -1
- package/build/lib/native/components/Collapsible/Collapsible.js +2 -1
- package/build/lib/native/components/Collapsible/Collapsible.js.map +1 -1
- package/build/lib/native/components/Collapsible/CollapsibleBody.js +3 -1
- package/build/lib/native/components/Collapsible/CollapsibleBody.js.map +1 -1
- package/build/lib/native/components/Collapsible/CollapsibleButton.js +3 -1
- package/build/lib/native/components/Collapsible/CollapsibleButton.js.map +1 -1
- package/build/lib/native/components/Collapsible/CollapsibleLink.js +2 -1
- package/build/lib/native/components/Collapsible/CollapsibleLink.js.map +1 -1
- package/build/lib/native/components/Counter/Counter.js +2 -1
- package/build/lib/native/components/Counter/Counter.js.map +1 -1
- package/build/lib/native/components/Dropdown/Dropdown.js +2 -1
- package/build/lib/native/components/Dropdown/Dropdown.js.map +1 -1
- package/build/lib/native/components/Dropdown/DropdownButton.js +1 -1
- package/build/lib/native/components/Dropdown/DropdownButton.js.map +1 -1
- package/build/lib/native/components/Dropdown/DropdownHeaderFooter.js +3 -1
- package/build/lib/native/components/Dropdown/DropdownHeaderFooter.js.map +1 -1
- package/build/lib/native/components/Dropdown/DropdownLink.js +2 -1
- package/build/lib/native/components/Dropdown/DropdownLink.js.map +1 -1
- package/build/lib/native/components/Form/Selector/SelectorGroupField.js +3 -1
- package/build/lib/native/components/Form/Selector/SelectorGroupField.js.map +1 -1
- package/build/lib/native/components/Indicator/Indicator.js +2 -1
- package/build/lib/native/components/Indicator/Indicator.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/DropdownInputTriggers/BaseDropdownInputTrigger.js +2 -1
- package/build/lib/native/components/Input/DropdownInputTriggers/BaseDropdownInputTrigger.js.map +1 -1
- package/build/lib/native/components/Input/DropdownInputTriggers/SelectInput.js +2 -1
- package/build/lib/native/components/Input/DropdownInputTriggers/SelectInput.js.map +1 -1
- package/build/lib/native/components/Input/OTPInput/OTPInput.js +2 -1
- package/build/lib/native/components/Input/OTPInput/OTPInput.js.map +1 -1
- package/build/lib/native/components/Input/PasswordInput/PasswordInput.js +1 -1
- package/build/lib/native/components/Input/PasswordInput/PasswordInput.js.map +1 -1
- package/build/lib/native/components/Input/SearchInput/SearchInput.js +1 -1
- package/build/lib/native/components/Input/SearchInput/SearchInput.js.map +1 -1
- package/build/lib/native/components/Input/TextArea/TextArea.js +1 -1
- package/build/lib/native/components/Input/TextArea/TextArea.js.map +1 -1
- package/build/lib/native/components/Input/TextInput/TextInput.js +1 -1
- package/build/lib/native/components/Input/TextInput/TextInput.js.map +1 -1
- package/build/lib/native/components/Link/BaseLink/BaseLink.js +2 -1
- package/build/lib/native/components/Link/BaseLink/BaseLink.js.map +1 -1
- package/build/lib/native/components/Link/Link/Link.js +2 -1
- package/build/lib/native/components/Link/Link/Link.js.map +1 -1
- package/build/lib/native/components/ProgressBar/ProgressBar.js +2 -1
- package/build/lib/native/components/ProgressBar/ProgressBar.js.map +1 -1
- package/build/lib/native/components/Radio/Radio.js +2 -1
- package/build/lib/native/components/Radio/Radio.js.map +1 -1
- package/build/lib/native/components/Radio/RadioGroup/RadioGroup.js +2 -1
- package/build/lib/native/components/Radio/RadioGroup/RadioGroup.js.map +1 -1
- package/build/lib/native/components/StepGroup/tokens.js +1 -1
- package/build/lib/native/components/StepGroup/tokens.js.map +1 -1
- package/build/lib/native/components/Switch/Switch.js +2 -1
- package/build/lib/native/components/Switch/Switch.js.map +1 -1
- package/build/lib/native/components/Tag/Tag.js +2 -1
- package/build/lib/native/components/Tag/Tag.js.map +1 -1
- package/build/lib/native/tokens/global/size.js +1 -1
- package/build/lib/native/tokens/global/size.js.map +1 -1
- package/build/lib/native/utils/makeAnalyticsAttribute/makeAnalyticsAttribute.js +7 -0
- package/build/lib/native/utils/makeAnalyticsAttribute/makeAnalyticsAttribute.js.map +1 -0
- package/build/lib/web/development/components/Accordion/Accordion.js +5 -3
- package/build/lib/web/development/components/Accordion/Accordion.js.map +1 -1
- package/build/lib/web/development/components/Accordion/AccordionButton.web.js +8 -3
- package/build/lib/web/development/components/Accordion/AccordionButton.web.js.map +1 -1
- package/build/lib/web/development/components/Accordion/AccordionItem.js +8 -3
- package/build/lib/web/development/components/Accordion/AccordionItem.js.map +1 -1
- package/build/lib/web/development/components/Accordion/AccordionItemBody.js +8 -3
- package/build/lib/web/development/components/Accordion/AccordionItemBody.js.map +1 -1
- package/build/lib/web/development/components/Accordion/AccordionItemHeader.js +10 -4
- package/build/lib/web/development/components/Accordion/AccordionItemHeader.js.map +1 -1
- package/build/lib/web/development/components/ActionList/ActionList.js +9 -4
- package/build/lib/web/development/components/ActionList/ActionList.js.map +1 -1
- package/build/lib/web/development/components/ActionList/ActionListBox.web.js +8 -3
- package/build/lib/web/development/components/ActionList/ActionListBox.web.js.map +1 -1
- package/build/lib/web/development/components/ActionList/ActionListItem.js +10 -5
- package/build/lib/web/development/components/ActionList/ActionListItem.js.map +1 -1
- package/build/lib/web/development/components/Alert/Alert.js +5 -3
- package/build/lib/web/development/components/Alert/Alert.js.map +1 -1
- package/build/lib/web/development/components/Amount/Amount.js +5 -8
- package/build/lib/web/development/components/Amount/Amount.js.map +1 -1
- package/build/lib/web/development/components/Avatar/Avatar.web.js +5 -3
- package/build/lib/web/development/components/Avatar/Avatar.web.js.map +1 -1
- package/build/lib/web/development/components/Avatar/AvatarGroup.web.js +5 -3
- package/build/lib/web/development/components/Avatar/AvatarGroup.web.js.map +1 -1
- package/build/lib/web/development/components/Badge/Badge.js +5 -3
- package/build/lib/web/development/components/Badge/Badge.js.map +1 -1
- package/build/lib/web/development/components/BaseHeaderFooter/BaseFooter.js +8 -3
- package/build/lib/web/development/components/BaseHeaderFooter/BaseFooter.js.map +1 -1
- package/build/lib/web/development/components/BaseHeaderFooter/BaseHeader.js +8 -3
- package/build/lib/web/development/components/BaseHeaderFooter/BaseHeader.js.map +1 -1
- package/build/lib/web/development/components/BottomNav/BottomNav.web.js +12 -8
- package/build/lib/web/development/components/BottomNav/BottomNav.web.js.map +1 -1
- package/build/lib/web/development/components/BottomSheet/BottomSheet.web.js +9 -3
- package/build/lib/web/development/components/BottomSheet/BottomSheet.web.js.map +1 -1
- package/build/lib/web/development/components/BottomSheet/BottomSheetBody.web.js +8 -3
- package/build/lib/web/development/components/BottomSheet/BottomSheetBody.web.js.map +1 -1
- package/build/lib/web/development/components/BottomSheet/BottomSheetFooter.web.js +8 -3
- package/build/lib/web/development/components/BottomSheet/BottomSheetFooter.web.js.map +1 -1
- package/build/lib/web/development/components/BottomSheet/BottomSheetHeader.web.js +8 -3
- package/build/lib/web/development/components/BottomSheet/BottomSheetHeader.web.js.map +1 -1
- package/build/lib/web/development/components/Box/BaseBox/BaseBox.web.js +4 -2
- package/build/lib/web/development/components/Box/BaseBox/BaseBox.web.js.map +1 -1
- package/build/lib/web/development/components/Box/BaseBox/types/propsTypes.js.map +1 -1
- package/build/lib/web/development/components/Box/Box.js +4 -2
- package/build/lib/web/development/components/Box/Box.js.map +1 -1
- package/build/lib/web/development/components/Breadcrumb/Breadcrumb.web.js +6 -4
- package/build/lib/web/development/components/Breadcrumb/Breadcrumb.web.js.map +1 -1
- package/build/lib/web/development/components/Breadcrumb/BreadcrumbItem.web.js +13 -4
- package/build/lib/web/development/components/Breadcrumb/BreadcrumbItem.web.js.map +1 -1
- package/build/lib/web/development/components/Button/BaseButton/BaseButton.js +4 -2
- package/build/lib/web/development/components/Button/BaseButton/BaseButton.js.map +1 -1
- package/build/lib/web/development/components/Button/Button/Button.js +4 -2
- package/build/lib/web/development/components/Button/Button/Button.js.map +1 -1
- package/build/lib/web/development/components/Button/IconButton/IconButton.js +11 -5
- package/build/lib/web/development/components/Button/IconButton/IconButton.js.map +1 -1
- package/build/lib/web/development/components/Button/IconButton/StyledIconButton.web.js +8 -3
- package/build/lib/web/development/components/Button/IconButton/StyledIconButton.web.js.map +1 -1
- package/build/lib/web/development/components/ButtonGroup/ButtonGroup.web.js +5 -3
- package/build/lib/web/development/components/ButtonGroup/ButtonGroup.web.js.map +1 -1
- package/build/lib/web/development/components/Card/Card.js +11 -7
- package/build/lib/web/development/components/Card/Card.js.map +1 -1
- package/build/lib/web/development/components/Card/CardFooter.js +22 -11
- package/build/lib/web/development/components/Card/CardFooter.js.map +1 -1
- package/build/lib/web/development/components/Card/CardHeader.js +13 -6
- package/build/lib/web/development/components/Card/CardHeader.js.map +1 -1
- package/build/lib/web/development/components/Carousel/Carousel.web.js +5 -3
- package/build/lib/web/development/components/Carousel/Carousel.web.js.map +1 -1
- package/build/lib/web/development/components/Carousel/CarouselItem.web.js +9 -3
- package/build/lib/web/development/components/Carousel/CarouselItem.web.js.map +1 -1
- package/build/lib/web/development/components/Checkbox/Checkbox.js +6 -4
- package/build/lib/web/development/components/Checkbox/Checkbox.js.map +1 -1
- package/build/lib/web/development/components/Checkbox/CheckboxGroup/CheckboxGroup.js +8 -5
- package/build/lib/web/development/components/Checkbox/CheckboxGroup/CheckboxGroup.js.map +1 -1
- package/build/lib/web/development/components/Chip/Chip.js +5 -3
- package/build/lib/web/development/components/Chip/Chip.js.map +1 -1
- package/build/lib/web/development/components/Chip/ChipGroup.js +8 -5
- package/build/lib/web/development/components/Chip/ChipGroup.js.map +1 -1
- package/build/lib/web/development/components/Collapsible/Collapsible.js +5 -3
- package/build/lib/web/development/components/Collapsible/Collapsible.js.map +1 -1
- package/build/lib/web/development/components/Collapsible/CollapsibleBody.js +8 -3
- package/build/lib/web/development/components/Collapsible/CollapsibleBody.js.map +1 -1
- package/build/lib/web/development/components/Collapsible/CollapsibleButton.js +13 -4
- package/build/lib/web/development/components/Collapsible/CollapsibleButton.js.map +1 -1
- package/build/lib/web/development/components/Collapsible/CollapsibleLink.js +5 -3
- package/build/lib/web/development/components/Collapsible/CollapsibleLink.js.map +1 -1
- package/build/lib/web/development/components/Counter/Counter.js +5 -3
- package/build/lib/web/development/components/Counter/Counter.js.map +1 -1
- package/build/lib/web/development/components/DatePicker/DateInput.web.js +11 -7
- package/build/lib/web/development/components/DatePicker/DateInput.web.js.map +1 -1
- package/build/lib/web/development/components/DatePicker/DatePicker.web.js +4 -2
- package/build/lib/web/development/components/DatePicker/DatePicker.web.js.map +1 -1
- package/build/lib/web/development/components/Drawer/Drawer.web.js +8 -3
- package/build/lib/web/development/components/Drawer/Drawer.web.js.map +1 -1
- package/build/lib/web/development/components/Drawer/DrawerSubcomponents.web.js +11 -3
- package/build/lib/web/development/components/Drawer/DrawerSubcomponents.web.js.map +1 -1
- package/build/lib/web/development/components/Dropdown/Dropdown.js +5 -3
- package/build/lib/web/development/components/Dropdown/Dropdown.js.map +1 -1
- package/build/lib/web/development/components/Dropdown/DropdownButton.js +2 -2
- package/build/lib/web/development/components/Dropdown/DropdownButton.js.map +1 -1
- package/build/lib/web/development/components/Dropdown/DropdownHeaderFooter.js +8 -3
- package/build/lib/web/development/components/Dropdown/DropdownHeaderFooter.js.map +1 -1
- package/build/lib/web/development/components/Dropdown/DropdownLink.js +5 -3
- package/build/lib/web/development/components/Dropdown/DropdownLink.js.map +1 -1
- package/build/lib/web/development/components/FileUpload/FileUpload.web.js +6 -4
- package/build/lib/web/development/components/FileUpload/FileUpload.web.js.map +1 -1
- package/build/lib/web/development/components/Form/Selector/SelectorGroupField.js +8 -3
- package/build/lib/web/development/components/Form/Selector/SelectorGroupField.js.map +1 -1
- package/build/lib/web/development/components/Form/Selector/SelectorInput.web.js +8 -3
- package/build/lib/web/development/components/Form/Selector/SelectorInput.web.js.map +1 -1
- package/build/lib/web/development/components/Indicator/Indicator.js +5 -3
- package/build/lib/web/development/components/Indicator/Indicator.js.map +1 -1
- package/build/lib/web/development/components/Input/BaseInput/BaseInput.js +6 -4
- package/build/lib/web/development/components/Input/BaseInput/BaseInput.js.map +1 -1
- package/build/lib/web/development/components/Input/DropdownInputTriggers/BaseDropdownInputTrigger.js +5 -2
- package/build/lib/web/development/components/Input/DropdownInputTriggers/BaseDropdownInputTrigger.js.map +1 -1
- package/build/lib/web/development/components/Input/DropdownInputTriggers/SelectInput.js +5 -3
- package/build/lib/web/development/components/Input/DropdownInputTriggers/SelectInput.js.map +1 -1
- package/build/lib/web/development/components/Input/OTPInput/OTPInput.js +6 -4
- package/build/lib/web/development/components/Input/OTPInput/OTPInput.js.map +1 -1
- package/build/lib/web/development/components/Input/PasswordInput/PasswordInput.js +2 -2
- package/build/lib/web/development/components/Input/PasswordInput/PasswordInput.js.map +1 -1
- package/build/lib/web/development/components/Input/PhoneNumberInput/PhoneNumberInput.web.js +2 -2
- package/build/lib/web/development/components/Input/PhoneNumberInput/PhoneNumberInput.web.js.map +1 -1
- package/build/lib/web/development/components/Input/SearchInput/SearchInput.js +2 -2
- package/build/lib/web/development/components/Input/SearchInput/SearchInput.js.map +1 -1
- package/build/lib/web/development/components/Input/TextArea/TextArea.js +2 -2
- package/build/lib/web/development/components/Input/TextArea/TextArea.js.map +1 -1
- package/build/lib/web/development/components/Input/TextInput/TextInput.js +2 -2
- package/build/lib/web/development/components/Input/TextInput/TextInput.js.map +1 -1
- package/build/lib/web/development/components/Link/BaseLink/BaseLink.js +5 -3
- package/build/lib/web/development/components/Link/BaseLink/BaseLink.js.map +1 -1
- package/build/lib/web/development/components/Link/Link/Link.js +4 -2
- package/build/lib/web/development/components/Link/Link/Link.js.map +1 -1
- package/build/lib/web/development/components/Menu/VisualSubComponents/MenuHeaderFooter.web.js +18 -8
- package/build/lib/web/development/components/Menu/VisualSubComponents/MenuHeaderFooter.web.js.map +1 -1
- package/build/lib/web/development/components/Modal/Modal.web.js +10 -4
- package/build/lib/web/development/components/Modal/Modal.web.js.map +1 -1
- package/build/lib/web/development/components/Modal/ModalBody.web.js +9 -3
- package/build/lib/web/development/components/Modal/ModalBody.web.js.map +1 -1
- package/build/lib/web/development/components/Modal/ModalFooter.web.js +7 -2
- package/build/lib/web/development/components/Modal/ModalFooter.web.js.map +1 -1
- package/build/lib/web/development/components/Modal/ModalHeader.web.js +14 -6
- package/build/lib/web/development/components/Modal/ModalHeader.web.js.map +1 -1
- package/build/lib/web/development/components/Popover/Popover.web.js +8 -3
- package/build/lib/web/development/components/Popover/Popover.web.js.map +1 -1
- package/build/lib/web/development/components/Popover/PopoverInteractiveWrapper.web.js.map +1 -1
- package/build/lib/web/development/components/ProgressBar/ProgressBar.js +5 -3
- package/build/lib/web/development/components/ProgressBar/ProgressBar.js.map +1 -1
- package/build/lib/web/development/components/Radio/Radio.js +6 -4
- package/build/lib/web/development/components/Radio/Radio.js.map +1 -1
- package/build/lib/web/development/components/Radio/RadioGroup/RadioGroup.js +8 -5
- package/build/lib/web/development/components/Radio/RadioGroup/RadioGroup.js.map +1 -1
- package/build/lib/web/development/components/SideNav/SideNav.web.js +5 -3
- package/build/lib/web/development/components/SideNav/SideNav.web.js.map +1 -1
- package/build/lib/web/development/components/SideNav/SideNavItems/SideNavItem.web.js +13 -4
- package/build/lib/web/development/components/SideNav/SideNavItems/SideNavItem.web.js.map +1 -1
- package/build/lib/web/development/components/SideNav/SideNavItems/SideNavLink.web.js +10 -4
- package/build/lib/web/development/components/SideNav/SideNavItems/SideNavLink.web.js.map +1 -1
- package/build/lib/web/development/components/SideNav/SideNavSection.web.js +10 -4
- package/build/lib/web/development/components/SideNav/SideNavSection.web.js.map +1 -1
- package/build/lib/web/development/components/StepGroup/StepGroup.web.js +5 -3
- package/build/lib/web/development/components/StepGroup/StepGroup.web.js.map +1 -1
- package/build/lib/web/development/components/StepGroup/StepItem.web.js +13 -7
- package/build/lib/web/development/components/StepGroup/StepItem.web.js.map +1 -1
- package/build/lib/web/development/components/StepGroup/StepLine.web.js +79 -42
- package/build/lib/web/development/components/StepGroup/StepLine.web.js.map +1 -1
- package/build/lib/web/development/components/StepGroup/tokens.js +6 -6
- package/build/lib/web/development/components/StepGroup/tokens.js.map +1 -1
- package/build/lib/web/development/components/Switch/Switch.js +5 -3
- package/build/lib/web/development/components/Switch/Switch.js.map +1 -1
- package/build/lib/web/development/components/Table/Table.web.js +9 -7
- package/build/lib/web/development/components/Table/Table.web.js.map +1 -1
- package/build/lib/web/development/components/Table/TableBody.web.js +18 -9
- package/build/lib/web/development/components/Table/TableBody.web.js.map +1 -1
- package/build/lib/web/development/components/Table/TableFooter.web.js +18 -9
- package/build/lib/web/development/components/Table/TableFooter.web.js.map +1 -1
- package/build/lib/web/development/components/Table/TableHeader.web.js +18 -9
- package/build/lib/web/development/components/Table/TableHeader.web.js.map +1 -1
- package/build/lib/web/development/components/Table/TablePagination.web.js +10 -4
- package/build/lib/web/development/components/Table/TablePagination.web.js.map +1 -1
- package/build/lib/web/development/components/Table/TableToolbar.web.js +13 -8
- package/build/lib/web/development/components/Table/TableToolbar.web.js.map +1 -1
- package/build/lib/web/development/components/Tabs/TabItem.web.js +9 -5
- package/build/lib/web/development/components/Tabs/TabItem.web.js.map +1 -1
- package/build/lib/web/development/components/Tabs/TabList.web.js +5 -3
- package/build/lib/web/development/components/Tabs/TabList.web.js.map +1 -1
- package/build/lib/web/development/components/Tabs/TabPanel.web.js +10 -5
- package/build/lib/web/development/components/Tabs/TabPanel.web.js.map +1 -1
- package/build/lib/web/development/components/Tabs/Tabs.web.js +8 -3
- package/build/lib/web/development/components/Tabs/Tabs.web.js.map +1 -1
- package/build/lib/web/development/components/Tag/Tag.js +6 -4
- package/build/lib/web/development/components/Tag/Tag.js.map +1 -1
- package/build/lib/web/development/components/Toast/ToastContainer.web.js +8 -3
- package/build/lib/web/development/components/Toast/ToastContainer.web.js.map +1 -1
- package/build/lib/web/development/components/Tooltip/Tooltip.web.js +8 -3
- package/build/lib/web/development/components/Tooltip/Tooltip.web.js.map +1 -1
- package/build/lib/web/development/components/TopNav/TabNav/TabNav.web.js +6 -3
- package/build/lib/web/development/components/TopNav/TabNav/TabNav.web.js.map +1 -1
- package/build/lib/web/development/components/TopNav/TopNav.web.js +8 -5
- package/build/lib/web/development/components/TopNav/TopNav.web.js.map +1 -1
- package/build/lib/web/development/tokens/global/size.js +3 -1
- package/build/lib/web/development/tokens/global/size.js.map +1 -1
- package/build/lib/web/development/utils/makeAnalyticsAttribute/index.js +2 -0
- package/build/lib/web/development/utils/makeAnalyticsAttribute/index.js.map +1 -0
- package/build/lib/web/development/utils/makeAnalyticsAttribute/makeAnalyticsAttribute.js +20 -0
- package/build/lib/web/development/utils/makeAnalyticsAttribute/makeAnalyticsAttribute.js.map +1 -0
- package/build/lib/web/production/components/Accordion/Accordion.js +5 -3
- package/build/lib/web/production/components/Accordion/Accordion.js.map +1 -1
- package/build/lib/web/production/components/Accordion/AccordionButton.web.js +8 -3
- package/build/lib/web/production/components/Accordion/AccordionButton.web.js.map +1 -1
- package/build/lib/web/production/components/Accordion/AccordionItem.js +8 -3
- package/build/lib/web/production/components/Accordion/AccordionItem.js.map +1 -1
- package/build/lib/web/production/components/Accordion/AccordionItemBody.js +8 -3
- package/build/lib/web/production/components/Accordion/AccordionItemBody.js.map +1 -1
- package/build/lib/web/production/components/Accordion/AccordionItemHeader.js +10 -4
- package/build/lib/web/production/components/Accordion/AccordionItemHeader.js.map +1 -1
- package/build/lib/web/production/components/ActionList/ActionList.js +9 -4
- package/build/lib/web/production/components/ActionList/ActionList.js.map +1 -1
- package/build/lib/web/production/components/ActionList/ActionListBox.web.js +8 -3
- package/build/lib/web/production/components/ActionList/ActionListBox.web.js.map +1 -1
- package/build/lib/web/production/components/ActionList/ActionListItem.js +10 -5
- package/build/lib/web/production/components/ActionList/ActionListItem.js.map +1 -1
- package/build/lib/web/production/components/Alert/Alert.js +5 -3
- package/build/lib/web/production/components/Alert/Alert.js.map +1 -1
- package/build/lib/web/production/components/Amount/Amount.js +5 -8
- package/build/lib/web/production/components/Amount/Amount.js.map +1 -1
- package/build/lib/web/production/components/Avatar/Avatar.web.js +5 -3
- package/build/lib/web/production/components/Avatar/Avatar.web.js.map +1 -1
- package/build/lib/web/production/components/Avatar/AvatarGroup.web.js +5 -3
- package/build/lib/web/production/components/Avatar/AvatarGroup.web.js.map +1 -1
- package/build/lib/web/production/components/Badge/Badge.js +5 -3
- package/build/lib/web/production/components/Badge/Badge.js.map +1 -1
- package/build/lib/web/production/components/BaseHeaderFooter/BaseFooter.js +8 -3
- package/build/lib/web/production/components/BaseHeaderFooter/BaseFooter.js.map +1 -1
- package/build/lib/web/production/components/BaseHeaderFooter/BaseHeader.js +8 -3
- package/build/lib/web/production/components/BaseHeaderFooter/BaseHeader.js.map +1 -1
- package/build/lib/web/production/components/BottomNav/BottomNav.web.js +12 -8
- package/build/lib/web/production/components/BottomNav/BottomNav.web.js.map +1 -1
- package/build/lib/web/production/components/BottomSheet/BottomSheet.web.js +9 -3
- package/build/lib/web/production/components/BottomSheet/BottomSheet.web.js.map +1 -1
- package/build/lib/web/production/components/BottomSheet/BottomSheetBody.web.js +8 -3
- package/build/lib/web/production/components/BottomSheet/BottomSheetBody.web.js.map +1 -1
- package/build/lib/web/production/components/BottomSheet/BottomSheetFooter.web.js +8 -3
- package/build/lib/web/production/components/BottomSheet/BottomSheetFooter.web.js.map +1 -1
- package/build/lib/web/production/components/BottomSheet/BottomSheetHeader.web.js +8 -3
- package/build/lib/web/production/components/BottomSheet/BottomSheetHeader.web.js.map +1 -1
- package/build/lib/web/production/components/Box/BaseBox/BaseBox.web.js +4 -2
- package/build/lib/web/production/components/Box/BaseBox/BaseBox.web.js.map +1 -1
- package/build/lib/web/production/components/Box/BaseBox/types/propsTypes.js.map +1 -1
- package/build/lib/web/production/components/Box/Box.js +4 -2
- package/build/lib/web/production/components/Box/Box.js.map +1 -1
- package/build/lib/web/production/components/Breadcrumb/Breadcrumb.web.js +6 -4
- package/build/lib/web/production/components/Breadcrumb/Breadcrumb.web.js.map +1 -1
- package/build/lib/web/production/components/Breadcrumb/BreadcrumbItem.web.js +13 -4
- package/build/lib/web/production/components/Breadcrumb/BreadcrumbItem.web.js.map +1 -1
- package/build/lib/web/production/components/Button/BaseButton/BaseButton.js +4 -2
- package/build/lib/web/production/components/Button/BaseButton/BaseButton.js.map +1 -1
- package/build/lib/web/production/components/Button/Button/Button.js +4 -2
- package/build/lib/web/production/components/Button/Button/Button.js.map +1 -1
- package/build/lib/web/production/components/Button/IconButton/IconButton.js +11 -5
- package/build/lib/web/production/components/Button/IconButton/IconButton.js.map +1 -1
- package/build/lib/web/production/components/Button/IconButton/StyledIconButton.web.js +8 -3
- package/build/lib/web/production/components/Button/IconButton/StyledIconButton.web.js.map +1 -1
- package/build/lib/web/production/components/ButtonGroup/ButtonGroup.web.js +5 -3
- package/build/lib/web/production/components/ButtonGroup/ButtonGroup.web.js.map +1 -1
- package/build/lib/web/production/components/Card/Card.js +11 -7
- package/build/lib/web/production/components/Card/Card.js.map +1 -1
- package/build/lib/web/production/components/Card/CardFooter.js +22 -11
- package/build/lib/web/production/components/Card/CardFooter.js.map +1 -1
- package/build/lib/web/production/components/Card/CardHeader.js +13 -6
- package/build/lib/web/production/components/Card/CardHeader.js.map +1 -1
- package/build/lib/web/production/components/Carousel/Carousel.web.js +5 -3
- package/build/lib/web/production/components/Carousel/Carousel.web.js.map +1 -1
- package/build/lib/web/production/components/Carousel/CarouselItem.web.js +9 -3
- package/build/lib/web/production/components/Carousel/CarouselItem.web.js.map +1 -1
- package/build/lib/web/production/components/Checkbox/Checkbox.js +6 -4
- package/build/lib/web/production/components/Checkbox/Checkbox.js.map +1 -1
- package/build/lib/web/production/components/Checkbox/CheckboxGroup/CheckboxGroup.js +8 -5
- package/build/lib/web/production/components/Checkbox/CheckboxGroup/CheckboxGroup.js.map +1 -1
- package/build/lib/web/production/components/Chip/Chip.js +5 -3
- package/build/lib/web/production/components/Chip/Chip.js.map +1 -1
- package/build/lib/web/production/components/Chip/ChipGroup.js +8 -5
- package/build/lib/web/production/components/Chip/ChipGroup.js.map +1 -1
- package/build/lib/web/production/components/Collapsible/Collapsible.js +5 -3
- package/build/lib/web/production/components/Collapsible/Collapsible.js.map +1 -1
- package/build/lib/web/production/components/Collapsible/CollapsibleBody.js +8 -3
- package/build/lib/web/production/components/Collapsible/CollapsibleBody.js.map +1 -1
- package/build/lib/web/production/components/Collapsible/CollapsibleButton.js +13 -4
- package/build/lib/web/production/components/Collapsible/CollapsibleButton.js.map +1 -1
- package/build/lib/web/production/components/Collapsible/CollapsibleLink.js +5 -3
- package/build/lib/web/production/components/Collapsible/CollapsibleLink.js.map +1 -1
- package/build/lib/web/production/components/Counter/Counter.js +5 -3
- package/build/lib/web/production/components/Counter/Counter.js.map +1 -1
- package/build/lib/web/production/components/DatePicker/DateInput.web.js +11 -7
- package/build/lib/web/production/components/DatePicker/DateInput.web.js.map +1 -1
- package/build/lib/web/production/components/DatePicker/DatePicker.web.js +4 -2
- package/build/lib/web/production/components/DatePicker/DatePicker.web.js.map +1 -1
- package/build/lib/web/production/components/Drawer/Drawer.web.js +8 -3
- package/build/lib/web/production/components/Drawer/Drawer.web.js.map +1 -1
- package/build/lib/web/production/components/Drawer/DrawerSubcomponents.web.js +11 -3
- package/build/lib/web/production/components/Drawer/DrawerSubcomponents.web.js.map +1 -1
- package/build/lib/web/production/components/Dropdown/Dropdown.js +5 -3
- package/build/lib/web/production/components/Dropdown/Dropdown.js.map +1 -1
- package/build/lib/web/production/components/Dropdown/DropdownButton.js +2 -2
- package/build/lib/web/production/components/Dropdown/DropdownButton.js.map +1 -1
- package/build/lib/web/production/components/Dropdown/DropdownHeaderFooter.js +8 -3
- package/build/lib/web/production/components/Dropdown/DropdownHeaderFooter.js.map +1 -1
- package/build/lib/web/production/components/Dropdown/DropdownLink.js +5 -3
- package/build/lib/web/production/components/Dropdown/DropdownLink.js.map +1 -1
- package/build/lib/web/production/components/FileUpload/FileUpload.web.js +6 -4
- package/build/lib/web/production/components/FileUpload/FileUpload.web.js.map +1 -1
- package/build/lib/web/production/components/Form/Selector/SelectorGroupField.js +8 -3
- package/build/lib/web/production/components/Form/Selector/SelectorGroupField.js.map +1 -1
- package/build/lib/web/production/components/Form/Selector/SelectorInput.web.js +8 -3
- package/build/lib/web/production/components/Form/Selector/SelectorInput.web.js.map +1 -1
- package/build/lib/web/production/components/Indicator/Indicator.js +5 -3
- package/build/lib/web/production/components/Indicator/Indicator.js.map +1 -1
- package/build/lib/web/production/components/Input/BaseInput/BaseInput.js +6 -4
- package/build/lib/web/production/components/Input/BaseInput/BaseInput.js.map +1 -1
- package/build/lib/web/production/components/Input/DropdownInputTriggers/BaseDropdownInputTrigger.js +5 -2
- package/build/lib/web/production/components/Input/DropdownInputTriggers/BaseDropdownInputTrigger.js.map +1 -1
- package/build/lib/web/production/components/Input/DropdownInputTriggers/SelectInput.js +5 -3
- package/build/lib/web/production/components/Input/DropdownInputTriggers/SelectInput.js.map +1 -1
- package/build/lib/web/production/components/Input/OTPInput/OTPInput.js +6 -4
- package/build/lib/web/production/components/Input/OTPInput/OTPInput.js.map +1 -1
- package/build/lib/web/production/components/Input/PasswordInput/PasswordInput.js +2 -2
- package/build/lib/web/production/components/Input/PasswordInput/PasswordInput.js.map +1 -1
- package/build/lib/web/production/components/Input/PhoneNumberInput/PhoneNumberInput.web.js +2 -2
- package/build/lib/web/production/components/Input/PhoneNumberInput/PhoneNumberInput.web.js.map +1 -1
- package/build/lib/web/production/components/Input/SearchInput/SearchInput.js +2 -2
- package/build/lib/web/production/components/Input/SearchInput/SearchInput.js.map +1 -1
- package/build/lib/web/production/components/Input/TextArea/TextArea.js +2 -2
- package/build/lib/web/production/components/Input/TextArea/TextArea.js.map +1 -1
- package/build/lib/web/production/components/Input/TextInput/TextInput.js +2 -2
- package/build/lib/web/production/components/Input/TextInput/TextInput.js.map +1 -1
- package/build/lib/web/production/components/Link/BaseLink/BaseLink.js +5 -3
- package/build/lib/web/production/components/Link/BaseLink/BaseLink.js.map +1 -1
- package/build/lib/web/production/components/Link/Link/Link.js +4 -2
- package/build/lib/web/production/components/Link/Link/Link.js.map +1 -1
- package/build/lib/web/production/components/Menu/VisualSubComponents/MenuHeaderFooter.web.js +18 -8
- package/build/lib/web/production/components/Menu/VisualSubComponents/MenuHeaderFooter.web.js.map +1 -1
- package/build/lib/web/production/components/Modal/Modal.web.js +10 -4
- package/build/lib/web/production/components/Modal/Modal.web.js.map +1 -1
- package/build/lib/web/production/components/Modal/ModalBody.web.js +9 -3
- package/build/lib/web/production/components/Modal/ModalBody.web.js.map +1 -1
- package/build/lib/web/production/components/Modal/ModalFooter.web.js +7 -2
- package/build/lib/web/production/components/Modal/ModalFooter.web.js.map +1 -1
- package/build/lib/web/production/components/Modal/ModalHeader.web.js +14 -6
- package/build/lib/web/production/components/Modal/ModalHeader.web.js.map +1 -1
- package/build/lib/web/production/components/Popover/Popover.web.js +8 -3
- package/build/lib/web/production/components/Popover/Popover.web.js.map +1 -1
- package/build/lib/web/production/components/Popover/PopoverInteractiveWrapper.web.js.map +1 -1
- package/build/lib/web/production/components/ProgressBar/ProgressBar.js +5 -3
- package/build/lib/web/production/components/ProgressBar/ProgressBar.js.map +1 -1
- package/build/lib/web/production/components/Radio/Radio.js +6 -4
- package/build/lib/web/production/components/Radio/Radio.js.map +1 -1
- package/build/lib/web/production/components/Radio/RadioGroup/RadioGroup.js +8 -5
- package/build/lib/web/production/components/Radio/RadioGroup/RadioGroup.js.map +1 -1
- package/build/lib/web/production/components/SideNav/SideNav.web.js +5 -3
- package/build/lib/web/production/components/SideNav/SideNav.web.js.map +1 -1
- package/build/lib/web/production/components/SideNav/SideNavItems/SideNavItem.web.js +13 -4
- package/build/lib/web/production/components/SideNav/SideNavItems/SideNavItem.web.js.map +1 -1
- package/build/lib/web/production/components/SideNav/SideNavItems/SideNavLink.web.js +10 -4
- package/build/lib/web/production/components/SideNav/SideNavItems/SideNavLink.web.js.map +1 -1
- package/build/lib/web/production/components/SideNav/SideNavSection.web.js +10 -4
- package/build/lib/web/production/components/SideNav/SideNavSection.web.js.map +1 -1
- package/build/lib/web/production/components/StepGroup/StepGroup.web.js +5 -3
- package/build/lib/web/production/components/StepGroup/StepGroup.web.js.map +1 -1
- package/build/lib/web/production/components/StepGroup/StepItem.web.js +13 -7
- package/build/lib/web/production/components/StepGroup/StepItem.web.js.map +1 -1
- package/build/lib/web/production/components/StepGroup/StepLine.web.js +79 -42
- package/build/lib/web/production/components/StepGroup/StepLine.web.js.map +1 -1
- package/build/lib/web/production/components/StepGroup/tokens.js +6 -6
- package/build/lib/web/production/components/StepGroup/tokens.js.map +1 -1
- package/build/lib/web/production/components/Switch/Switch.js +5 -3
- package/build/lib/web/production/components/Switch/Switch.js.map +1 -1
- package/build/lib/web/production/components/Table/Table.web.js +9 -7
- package/build/lib/web/production/components/Table/Table.web.js.map +1 -1
- package/build/lib/web/production/components/Table/TableBody.web.js +18 -9
- package/build/lib/web/production/components/Table/TableBody.web.js.map +1 -1
- package/build/lib/web/production/components/Table/TableFooter.web.js +18 -9
- package/build/lib/web/production/components/Table/TableFooter.web.js.map +1 -1
- package/build/lib/web/production/components/Table/TableHeader.web.js +18 -9
- package/build/lib/web/production/components/Table/TableHeader.web.js.map +1 -1
- package/build/lib/web/production/components/Table/TablePagination.web.js +10 -4
- package/build/lib/web/production/components/Table/TablePagination.web.js.map +1 -1
- package/build/lib/web/production/components/Table/TableToolbar.web.js +13 -8
- package/build/lib/web/production/components/Table/TableToolbar.web.js.map +1 -1
- package/build/lib/web/production/components/Tabs/TabItem.web.js +9 -5
- package/build/lib/web/production/components/Tabs/TabItem.web.js.map +1 -1
- package/build/lib/web/production/components/Tabs/TabList.web.js +5 -3
- package/build/lib/web/production/components/Tabs/TabList.web.js.map +1 -1
- package/build/lib/web/production/components/Tabs/TabPanel.web.js +10 -5
- package/build/lib/web/production/components/Tabs/TabPanel.web.js.map +1 -1
- package/build/lib/web/production/components/Tabs/Tabs.web.js +8 -3
- package/build/lib/web/production/components/Tabs/Tabs.web.js.map +1 -1
- package/build/lib/web/production/components/Tag/Tag.js +6 -4
- package/build/lib/web/production/components/Tag/Tag.js.map +1 -1
- package/build/lib/web/production/components/Toast/ToastContainer.web.js +8 -3
- package/build/lib/web/production/components/Toast/ToastContainer.web.js.map +1 -1
- package/build/lib/web/production/components/Tooltip/Tooltip.web.js +8 -3
- package/build/lib/web/production/components/Tooltip/Tooltip.web.js.map +1 -1
- package/build/lib/web/production/components/TopNav/TabNav/TabNav.web.js +6 -3
- package/build/lib/web/production/components/TopNav/TabNav/TabNav.web.js.map +1 -1
- package/build/lib/web/production/components/TopNav/TopNav.web.js +8 -5
- package/build/lib/web/production/components/TopNav/TopNav.web.js.map +1 -1
- package/build/lib/web/production/tokens/global/size.js +3 -1
- package/build/lib/web/production/tokens/global/size.js.map +1 -1
- package/build/lib/web/production/utils/makeAnalyticsAttribute/index.js +2 -0
- package/build/lib/web/production/utils/makeAnalyticsAttribute/index.js.map +1 -0
- package/build/lib/web/production/utils/makeAnalyticsAttribute/makeAnalyticsAttribute.js +20 -0
- package/build/lib/web/production/utils/makeAnalyticsAttribute/makeAnalyticsAttribute.js.map +1 -0
- package/build/types/components/index.d.ts +221 -189
- package/build/types/components/index.native.d.ts +145 -131
- package/build/types/tokens/index.d.ts +3 -1
- package/build/types/tokens/index.native.d.ts +3 -1
- package/package.json +3 -3
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
1
2
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
2
3
|
import { useAccordion } from './AccordionContext.js';
|
|
3
4
|
import { componentIds } from './componentIds.js';
|
|
@@ -7,6 +8,7 @@ import '../../utils/index.js';
|
|
|
7
8
|
import '../../utils/makeAccessible/index.js';
|
|
8
9
|
import '../../utils/assignWithoutSideEffects/index.js';
|
|
9
10
|
import '../../utils/metaAttribute/index.js';
|
|
11
|
+
import '../../utils/makeAnalyticsAttribute/index.js';
|
|
10
12
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
11
13
|
import { BaseBox } from '../Box/BaseBox/BaseBox.web.js';
|
|
12
14
|
import { makeAccessible } from '../../utils/makeAccessible/makeAccessible.web.js';
|
|
@@ -14,8 +16,10 @@ import { Text } from '../Typography/Text/Text.js';
|
|
|
14
16
|
import { isReactNative } from '../../utils/platform/isReactNative.js';
|
|
15
17
|
import { metaAttribute } from '../../utils/metaAttribute/metaAttribute.web.js';
|
|
16
18
|
import { MetaConstants } from '../../utils/metaAttribute/metaConstants.js';
|
|
19
|
+
import { makeAnalyticsAttribute } from '../../utils/makeAnalyticsAttribute/makeAnalyticsAttribute.js';
|
|
17
20
|
import { assignWithoutSideEffects } from '../../utils/assignWithoutSideEffects/assignWithoutSideEffects.js';
|
|
18
21
|
|
|
22
|
+
var _excluded = ["children", "_description"];
|
|
19
23
|
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; }
|
|
20
24
|
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; }
|
|
21
25
|
var BLANK_SPACE = ' ';
|
|
@@ -43,7 +47,8 @@ var descriptionSizeToken = {
|
|
|
43
47
|
};
|
|
44
48
|
var _AccordionItemBody = function _AccordionItemBody(_ref) {
|
|
45
49
|
var children = _ref.children,
|
|
46
|
-
_description = _ref._description
|
|
50
|
+
_description = _ref._description,
|
|
51
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
47
52
|
var _useAccordion = useAccordion(),
|
|
48
53
|
size = _useAccordion.size;
|
|
49
54
|
var childrenElement = typeof children === 'string' || typeof children === 'number' ? /*#__PURE__*/jsx(Text, {
|
|
@@ -70,9 +75,9 @@ var _AccordionItemBody = function _AccordionItemBody(_ref) {
|
|
|
70
75
|
marginX: "spacing.5",
|
|
71
76
|
children: [descriptionElement, childrenElement]
|
|
72
77
|
});
|
|
73
|
-
return /*#__PURE__*/jsx(BaseBox, _objectSpread(_objectSpread({}, metaAttribute({
|
|
78
|
+
return /*#__PURE__*/jsx(BaseBox, _objectSpread(_objectSpread(_objectSpread({}, metaAttribute({
|
|
74
79
|
name: MetaConstants.AccordionItemBody
|
|
75
|
-
})), {}, {
|
|
80
|
+
})), makeAnalyticsAttribute(rest)), {}, {
|
|
76
81
|
children: collapsibleBodyContent
|
|
77
82
|
}));
|
|
78
83
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccordionItemBody.js","sources":["../../../../../../src/components/Accordion/AccordionItemBody.tsx"],"sourcesContent":["import { useAccordion } from './AccordionContext';\nimport { componentIds } from './componentIds';\nimport BaseBox from '~components/Box/BaseBox';\nimport { Text } from '~components/Typography';\nimport { isReactNative } from '~utils';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport type { StringChildrenType } from '~utils/types';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { MetaConstants, metaAttribute } from '~utils/metaAttribute';\n\nconst BLANK_SPACE = ' ';\n\n/**\n * On React Native if the `AccordionItem` has a lengthy description which renders a `Text` spanning multiple lines,\n * it sometimes messes up the layout calculation (it thinks of multiline as a single line before flowing in the UI).\n * And during the expanding / collapsing animation, text reflows causing words to jump around across lines.\n *\n * Rendering a blank `Text` at the end seems to fix all this 🤯\n */\nconst reactNativeMultilineTextOverflowFix = (\n // make this hidden from screen readers\n <BaseBox {...makeAccessible({ hidden: true })}>\n <Text>{BLANK_SPACE}</Text>\n </BaseBox>\n);\n\nconst descriptionSizeToken = {\n large: 'medium',\n medium: 'small',\n} as const;\n\nconst _AccordionItemBody = ({\n children,\n _description,\n}: {\n children?: React.ReactNode | StringChildrenType;\n _description?: string;\n}): React.ReactElement => {\n const { size } = useAccordion();\n\n const childrenElement =\n typeof children === 'string' || typeof children === 'number' ? (\n <Text size={descriptionSizeToken[size]} color=\"surface.text.gray.subtle\">\n {children}\n </Text>\n ) : (\n children\n );\n\n const descriptionElement = _description && (\n <Text size={descriptionSizeToken[size]} color=\"surface.text.gray.subtle\">\n {_description}\n </Text>\n );\n\n const collapsibleBodyContent = isReactNative() ? (\n <BaseBox marginX=\"spacing.5\">\n {descriptionElement}\n <BaseBox marginTop={_description && children ? 'spacing.5' : 'spacing.0'}>\n {childrenElement}\n </BaseBox>\n {reactNativeMultilineTextOverflowFix}\n </BaseBox>\n ) : (\n <BaseBox\n display=\"flex\"\n flexDirection=\"column\"\n gap=\"spacing.5\"\n marginBottom=\"spacing.5\"\n marginX=\"spacing.5\"\n >\n {descriptionElement}\n {childrenElement}\n </BaseBox>\n );\n\n return (\n <BaseBox
|
|
1
|
+
{"version":3,"file":"AccordionItemBody.js","sources":["../../../../../../src/components/Accordion/AccordionItemBody.tsx"],"sourcesContent":["import { useAccordion } from './AccordionContext';\nimport { componentIds } from './componentIds';\nimport BaseBox from '~components/Box/BaseBox';\nimport { Text } from '~components/Typography';\nimport { isReactNative } from '~utils';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport type { DataAnalyticsAttribute, StringChildrenType } from '~utils/types';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { MetaConstants, metaAttribute } from '~utils/metaAttribute';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\n\nconst BLANK_SPACE = ' ';\n\n/**\n * On React Native if the `AccordionItem` has a lengthy description which renders a `Text` spanning multiple lines,\n * it sometimes messes up the layout calculation (it thinks of multiline as a single line before flowing in the UI).\n * And during the expanding / collapsing animation, text reflows causing words to jump around across lines.\n *\n * Rendering a blank `Text` at the end seems to fix all this 🤯\n */\nconst reactNativeMultilineTextOverflowFix = (\n // make this hidden from screen readers\n <BaseBox {...makeAccessible({ hidden: true })}>\n <Text>{BLANK_SPACE}</Text>\n </BaseBox>\n);\n\nconst descriptionSizeToken = {\n large: 'medium',\n medium: 'small',\n} as const;\n\nconst _AccordionItemBody = ({\n children,\n _description,\n ...rest\n}: {\n children?: React.ReactNode | StringChildrenType;\n _description?: string;\n} & DataAnalyticsAttribute): React.ReactElement => {\n const { size } = useAccordion();\n\n const childrenElement =\n typeof children === 'string' || typeof children === 'number' ? (\n <Text size={descriptionSizeToken[size]} color=\"surface.text.gray.subtle\">\n {children}\n </Text>\n ) : (\n children\n );\n\n const descriptionElement = _description && (\n <Text size={descriptionSizeToken[size]} color=\"surface.text.gray.subtle\">\n {_description}\n </Text>\n );\n\n const collapsibleBodyContent = isReactNative() ? (\n <BaseBox marginX=\"spacing.5\">\n {descriptionElement}\n <BaseBox marginTop={_description && children ? 'spacing.5' : 'spacing.0'}>\n {childrenElement}\n </BaseBox>\n {reactNativeMultilineTextOverflowFix}\n </BaseBox>\n ) : (\n <BaseBox\n display=\"flex\"\n flexDirection=\"column\"\n gap=\"spacing.5\"\n marginBottom=\"spacing.5\"\n marginX=\"spacing.5\"\n >\n {descriptionElement}\n {childrenElement}\n </BaseBox>\n );\n\n return (\n <BaseBox\n {...metaAttribute({ name: MetaConstants.AccordionItemBody })}\n {...makeAnalyticsAttribute(rest)}\n >\n {collapsibleBodyContent}\n </BaseBox>\n );\n};\n\nconst AccordionItemBody = assignWithoutSideEffects(_AccordionItemBody, {\n componentId: componentIds.AccordionItemBody,\n});\n\nexport { AccordionItemBody };\n"],"names":["BLANK_SPACE","reactNativeMultilineTextOverflowFix","_jsx","BaseBox","_objectSpread","makeAccessible","hidden","children","Text","descriptionSizeToken","large","medium","_AccordionItemBody","_ref","_description","rest","_objectWithoutProperties","_excluded","_useAccordion","useAccordion","size","childrenElement","color","descriptionElement","collapsibleBodyContent","isReactNative","_jsxs","marginX","marginTop","display","flexDirection","gap","marginBottom","metaAttribute","name","MetaConstants","AccordionItemBody","makeAnalyticsAttribute","assignWithoutSideEffects","componentId","componentIds"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAWA,IAAMA,WAAW,GAAG,GAAG,CAAA;;AAEvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAMC,mCAAmC;AAAA;AACvC;AACAC,GAAA,CAACC,OAAO,EAAAC,aAAA,CAAAA,aAAA,CAAA,EAAA,EAAKC,cAAc,CAAC;AAAEC,EAAAA,MAAM,EAAE,IAAA;AAAK,CAAC,CAAC,CAAA,EAAA,EAAA,EAAA;EAAAC,QAAA,eAC3CL,GAAA,CAACM,IAAI,EAAA;AAAAD,IAAAA,QAAA,EAAEP,WAAAA;GAAkB,CAAA;AAAC,CAAA,CACnB,CACV,CAAA;AAED,IAAMS,oBAAoB,GAAG;AAC3BC,EAAAA,KAAK,EAAE,QAAQ;AACfC,EAAAA,MAAM,EAAE,OAAA;AACV,CAAU,CAAA;AAEV,IAAMC,kBAAkB,GAAG,SAArBA,kBAAkBA,CAAAC,IAAA,EAO2B;AAAA,EAAA,IANjDN,QAAQ,GAAAM,IAAA,CAARN,QAAQ;IACRO,YAAY,GAAAD,IAAA,CAAZC,YAAY;AACTC,IAAAA,IAAI,GAAAC,wBAAA,CAAAH,IAAA,EAAAI,SAAA,CAAA,CAAA;AAKP,EAAA,IAAAC,aAAA,GAAiBC,YAAY,EAAE;IAAvBC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AAAA,EAAAA,aAAa,CAAC;IAAEC,IAAI,EAAEC,aAAa,CAACC,iBAAAA;AAAkB,GAAC,CAAC,CAAA,EACxDC,sBAAsB,CAACtB,IAAI,CAAC,CAAA,EAAA,EAAA,EAAA;AAAAR,IAAAA,QAAA,EAE/BiB,sBAAAA;AAAsB,GAAA,CAChB,CAAC,CAAA;AAEd,CAAC,CAAA;AAED,IAAMY,iBAAiB,gBAAGE,wBAAwB,CAAC1B,kBAAkB,EAAE;EACrE2B,WAAW,EAAEC,YAAY,CAACJ,iBAAAA;AAC5B,CAAC;;;;"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
2
|
+
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
2
3
|
import { useAccordion, useAccordionItemIndex } from './AccordionContext.js';
|
|
3
4
|
import { componentIds } from './componentIds.js';
|
|
4
5
|
import { BaseHeader } from '../BaseHeaderFooter/BaseHeader.js';
|
|
@@ -7,13 +8,16 @@ import '../Box/BaseBox/index.js';
|
|
|
7
8
|
import { CollapsibleChevronIcon } from '../Collapsible/CollapsibleChevronIcon.web.js';
|
|
8
9
|
import '../../utils/assignWithoutSideEffects/index.js';
|
|
9
10
|
import '../../utils/metaAttribute/index.js';
|
|
11
|
+
import '../../utils/makeAnalyticsAttribute/index.js';
|
|
10
12
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
11
13
|
import { BaseBox } from '../Box/BaseBox/BaseBox.web.js';
|
|
12
14
|
import { metaAttribute } from '../../utils/metaAttribute/metaAttribute.web.js';
|
|
13
15
|
import { MetaConstants } from '../../utils/metaAttribute/metaConstants.js';
|
|
14
16
|
import { Text } from '../Typography/Text/Text.js';
|
|
17
|
+
import { makeAnalyticsAttribute } from '../../utils/makeAnalyticsAttribute/makeAnalyticsAttribute.js';
|
|
15
18
|
import { assignWithoutSideEffects } from '../../utils/assignWithoutSideEffects/assignWithoutSideEffects.js';
|
|
16
19
|
|
|
20
|
+
var _excluded = ["title", "subtitle", "leading", "children", "trailing", "titleSuffix"];
|
|
17
21
|
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; }
|
|
18
22
|
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; }
|
|
19
23
|
var _AccordionItemHeader = function _AccordionItemHeader(_ref) {
|
|
@@ -22,7 +26,8 @@ var _AccordionItemHeader = function _AccordionItemHeader(_ref) {
|
|
|
22
26
|
leading = _ref.leading,
|
|
23
27
|
children = _ref.children,
|
|
24
28
|
trailing = _ref.trailing,
|
|
25
|
-
titleSuffix = _ref.titleSuffix
|
|
29
|
+
titleSuffix = _ref.titleSuffix,
|
|
30
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
26
31
|
var _useAccordion = useAccordion(),
|
|
27
32
|
size = _useAccordion.size,
|
|
28
33
|
showNumberPrefix = _useAccordion.showNumberPrefix;
|
|
@@ -33,7 +38,7 @@ var _AccordionItemHeader = function _AccordionItemHeader(_ref) {
|
|
|
33
38
|
name: MetaConstants.AccordionItemHeader
|
|
34
39
|
})), {}, {
|
|
35
40
|
flex: "1",
|
|
36
|
-
children: /*#__PURE__*/jsx(BaseHeader, {
|
|
41
|
+
children: /*#__PURE__*/jsx(BaseHeader, _objectSpread(_objectSpread({
|
|
37
42
|
leading: showNumberPrefix && typeof index === 'number' ?
|
|
38
43
|
/*#__PURE__*/
|
|
39
44
|
// we have to add -2px margin to align the number with title of BaseHeader
|
|
@@ -58,9 +63,10 @@ var _AccordionItemHeader = function _AccordionItemHeader(_ref) {
|
|
|
58
63
|
trailingInteractionElement: /*#__PURE__*/jsx(CollapsibleChevronIcon, {
|
|
59
64
|
color: isDisabled ? 'interactive.icon.gray.disabled' : 'interactive.icon.gray.muted',
|
|
60
65
|
size: "large"
|
|
61
|
-
})
|
|
66
|
+
})
|
|
67
|
+
}, makeAnalyticsAttribute(rest)), {}, {
|
|
62
68
|
children: children
|
|
63
|
-
})
|
|
69
|
+
}))
|
|
64
70
|
}));
|
|
65
71
|
};
|
|
66
72
|
var AccordionItemHeader = /*#__PURE__*/assignWithoutSideEffects(_AccordionItemHeader, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccordionItemHeader.js","sources":["../../../../../../src/components/Accordion/AccordionItemHeader.tsx"],"sourcesContent":["import { useAccordion, useAccordionItemIndex } from './AccordionContext';\nimport { componentIds } from './componentIds';\nimport type { BaseHeaderProps } from '~components/BaseHeaderFooter/BaseHeader';\nimport { BaseHeader } from '~components/BaseHeaderFooter/BaseHeader';\nimport { Text } from '~components/Typography';\nimport BaseBox from '~components/Box/BaseBox';\nimport { CollapsibleChevronIcon } from '~components/Collapsible/CollapsibleChevronIcon';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\n\nconst _AccordionItemHeader = ({\n title,\n subtitle,\n leading,\n children,\n trailing,\n titleSuffix,\n}: Pick<\n BaseHeaderProps,\n 'title' | 'subtitle' | 'leading' | 'children' | 'trailing' | 'titleSuffix'\n>): React.ReactElement => {\n const { size, showNumberPrefix } = useAccordion();\n const { index, isDisabled } = useAccordionItemIndex();\n\n return (\n <BaseBox {...metaAttribute({ name: MetaConstants.AccordionItemHeader })} flex=\"1\">\n <BaseHeader\n leading={\n showNumberPrefix && typeof index === 'number' ? (\n // we have to add -2px margin to align the number with title of BaseHeader\n <Text size={size} weight=\"semibold\" marginTop=\"-2px\" as=\"span\">\n {index + 1}.\n </Text>\n ) : (\n leading\n )\n }\n title={title}\n subtitle={subtitle}\n trailing={trailing}\n titleSuffix={titleSuffix}\n isDisabled={isDisabled}\n showBackButton={false}\n showCloseButton={false}\n showDivider={false}\n paddingX=\"spacing.5\"\n marginY=\"spacing.5\"\n size={size}\n trailingInteractionElement={\n <CollapsibleChevronIcon\n color={isDisabled ? 'interactive.icon.gray.disabled' : 'interactive.icon.gray.muted'}\n size=\"large\"\n />\n }\n >\n {children}\n </BaseHeader>\n </BaseBox>\n );\n};\n\nconst AccordionItemHeader = assignWithoutSideEffects(_AccordionItemHeader, {\n componentId: componentIds.AccordionItemHeader,\n});\n\nexport { AccordionItemHeader };\n"],"names":["_AccordionItemHeader","_ref","title","subtitle","leading","children","trailing","titleSuffix","_useAccordion","useAccordion","size","showNumberPrefix","_useAccordionItemInde","useAccordionItemIndex","index","isDisabled","_jsx","BaseBox","_objectSpread","metaAttribute","name","MetaConstants","AccordionItemHeader","flex","BaseHeader","_jsxs","Text","weight","marginTop","as","showBackButton","showCloseButton","showDivider","paddingX","marginY","trailingInteractionElement","CollapsibleChevronIcon","color","assignWithoutSideEffects","componentId","componentIds"],"mappings":"
|
|
1
|
+
{"version":3,"file":"AccordionItemHeader.js","sources":["../../../../../../src/components/Accordion/AccordionItemHeader.tsx"],"sourcesContent":["import { useAccordion, useAccordionItemIndex } from './AccordionContext';\nimport { componentIds } from './componentIds';\nimport type { BaseHeaderProps } from '~components/BaseHeaderFooter/BaseHeader';\nimport { BaseHeader } from '~components/BaseHeaderFooter/BaseHeader';\nimport { Text } from '~components/Typography';\nimport BaseBox from '~components/Box/BaseBox';\nimport { CollapsibleChevronIcon } from '~components/Collapsible/CollapsibleChevronIcon';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport type { DataAnalyticsAttribute } from '~utils/types';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\n\nconst _AccordionItemHeader = ({\n title,\n subtitle,\n leading,\n children,\n trailing,\n titleSuffix,\n ...rest\n}: Pick<\n BaseHeaderProps,\n 'title' | 'subtitle' | 'leading' | 'children' | 'trailing' | 'titleSuffix'\n> &\n DataAnalyticsAttribute): React.ReactElement => {\n const { size, showNumberPrefix } = useAccordion();\n const { index, isDisabled } = useAccordionItemIndex();\n\n return (\n <BaseBox {...metaAttribute({ name: MetaConstants.AccordionItemHeader })} flex=\"1\">\n <BaseHeader\n leading={\n showNumberPrefix && typeof index === 'number' ? (\n // we have to add -2px margin to align the number with title of BaseHeader\n <Text size={size} weight=\"semibold\" marginTop=\"-2px\" as=\"span\">\n {index + 1}.\n </Text>\n ) : (\n leading\n )\n }\n title={title}\n subtitle={subtitle}\n trailing={trailing}\n titleSuffix={titleSuffix}\n isDisabled={isDisabled}\n showBackButton={false}\n showCloseButton={false}\n showDivider={false}\n paddingX=\"spacing.5\"\n marginY=\"spacing.5\"\n size={size}\n trailingInteractionElement={\n <CollapsibleChevronIcon\n color={isDisabled ? 'interactive.icon.gray.disabled' : 'interactive.icon.gray.muted'}\n size=\"large\"\n />\n }\n {...makeAnalyticsAttribute(rest)}\n >\n {children}\n </BaseHeader>\n </BaseBox>\n );\n};\n\nconst AccordionItemHeader = assignWithoutSideEffects(_AccordionItemHeader, {\n componentId: componentIds.AccordionItemHeader,\n});\n\nexport { AccordionItemHeader };\n"],"names":["_AccordionItemHeader","_ref","title","subtitle","leading","children","trailing","titleSuffix","rest","_objectWithoutProperties","_excluded","_useAccordion","useAccordion","size","showNumberPrefix","_useAccordionItemInde","useAccordionItemIndex","index","isDisabled","_jsx","BaseBox","_objectSpread","metaAttribute","name","MetaConstants","AccordionItemHeader","flex","BaseHeader","_jsxs","Text","weight","marginTop","as","showBackButton","showCloseButton","showDivider","paddingX","marginY","trailingInteractionElement","CollapsibleChevronIcon","color","makeAnalyticsAttribute","assignWithoutSideEffects","componentId","componentIds"],"mappings":";;;;;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AAAA,QAAA,EAC3DY,CAAAA,KAAK,GAAG,CAAC,EAAC,GACb,CAAA;OAAM,CAAC,GAEPb,OAEH;AACDF,MAAAA,KAAK,EAAEA,KAAM;AACbC,MAAAA,QAAQ,EAAEA,QAAS;AACnBG,MAAAA,QAAQ,EAAEA,QAAS;AACnBC,MAAAA,WAAW,EAAEA,WAAY;AACzBW,MAAAA,UAAU,EAAEA,UAAW;AACvBe,MAAAA,cAAc,EAAE,KAAM;AACtBC,MAAAA,eAAe,EAAE,KAAM;AACvBC,MAAAA,WAAW,EAAE,KAAM;AACnBC,MAAAA,QAAQ,EAAC,WAAW;AACpBC,MAAAA,OAAO,EAAC,WAAW;AACnBxB,MAAAA,IAAI,EAAEA,IAAK;MACXyB,0BAA0B,eACxBnB,GAAA,CAACoB,sBAAsB,EAAA;AACrBC,QAAAA,KAAK,EAAEtB,UAAU,GAAG,gCAAgC,GAAG,6BAA8B;AACrFL,QAAAA,IAAI,EAAC,OAAA;OACN,CAAA;KAEC4B,EAAAA,sBAAsB,CAACjC,IAAI,CAAC,CAAA,EAAA,EAAA,EAAA;AAAAH,MAAAA,QAAA,EAE/BA,QAAAA;KACS,CAAA,CAAA;AAAC,GAAA,CACN,CAAC,CAAA;AAEd,CAAC,CAAA;AAED,IAAMoB,mBAAmB,gBAAGiB,wBAAwB,CAAC1C,oBAAoB,EAAE;EACzE2C,WAAW,EAAEC,YAAY,CAACnB,mBAAAA;AAC5B,CAAC;;;;"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
2
|
+
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
2
3
|
import React__default from 'react';
|
|
3
4
|
import { getActionListContainerRole, getActionListItemWrapperRole } from './getA11yRoles.js';
|
|
4
5
|
import { getActionListProperties } from './actionListUtils.js';
|
|
@@ -12,18 +13,22 @@ import '../../utils/assignWithoutSideEffects/index.js';
|
|
|
12
13
|
import '../Box/BaseBox/index.js';
|
|
13
14
|
import '../../utils/metaAttribute/index.js';
|
|
14
15
|
import { dropdownComponentIds } from '../Dropdown/dropdownComponentIds.js';
|
|
16
|
+
import '../../utils/makeAnalyticsAttribute/index.js';
|
|
15
17
|
import { jsx } from 'react/jsx-runtime';
|
|
18
|
+
import { makeAnalyticsAttribute } from '../../utils/makeAnalyticsAttribute/makeAnalyticsAttribute.js';
|
|
16
19
|
import { BaseBox } from '../Box/BaseBox/BaseBox.web.js';
|
|
17
20
|
import { makeAccessible } from '../../utils/makeAccessible/makeAccessible.web.js';
|
|
18
21
|
import { metaAttribute } from '../../utils/metaAttribute/metaAttribute.web.js';
|
|
19
22
|
import { MetaConstants } from '../../utils/metaAttribute/metaConstants.js';
|
|
20
23
|
import { assignWithoutSideEffects } from '../../utils/assignWithoutSideEffects/assignWithoutSideEffects.js';
|
|
21
24
|
|
|
25
|
+
var _excluded = ["children", "testID"];
|
|
22
26
|
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; }
|
|
23
27
|
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; }
|
|
24
28
|
var _ActionList = function _ActionList(_ref) {
|
|
25
29
|
var children = _ref.children,
|
|
26
|
-
testID = _ref.testID
|
|
30
|
+
testID = _ref.testID,
|
|
31
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
27
32
|
var _useDropdown = useDropdown(),
|
|
28
33
|
setOptions = _useDropdown.setOptions,
|
|
29
34
|
actionListItemRef = _useDropdown.actionListItemRef,
|
|
@@ -56,14 +61,14 @@ var _ActionList = function _ActionList(_ref) {
|
|
|
56
61
|
// 1. We don't render the box wrapper styles which includes shadows, padding, border etc
|
|
57
62
|
// 2. to ensure GorhomBottomSheetSectionList works as expected, if we add extra wrappers GorhomBottomSheet won't render the content inside
|
|
58
63
|
// NOTE: That this also means inside BottomSheet, ActionList won't render any ActionListHeader or Footer.
|
|
59
|
-
return isInBottomSheet ? /*#__PURE__*/jsx(ActionListBox, {
|
|
64
|
+
return isInBottomSheet ? /*#__PURE__*/jsx(ActionListBox, _objectSpread({
|
|
60
65
|
isInBottomSheet: isInBottomSheet,
|
|
61
66
|
actionListItemWrapperRole: actionListItemWrapperRole,
|
|
62
67
|
childrenWithId: childrenWithId,
|
|
63
68
|
sectionData: sectionData,
|
|
64
69
|
isMultiSelectable: isMultiSelectable,
|
|
65
70
|
ref: actionListItemRef
|
|
66
|
-
}) : /*#__PURE__*/jsx(BaseBox, _objectSpread(_objectSpread(_objectSpread({
|
|
71
|
+
}, makeAnalyticsAttribute(rest))) : /*#__PURE__*/jsx(BaseBox, _objectSpread(_objectSpread(_objectSpread(_objectSpread({
|
|
67
72
|
id: "".concat(dropdownBaseId, "-actionlist")
|
|
68
73
|
}, makeAccessible({
|
|
69
74
|
role: actionListContainerRole,
|
|
@@ -72,7 +77,7 @@ var _ActionList = function _ActionList(_ref) {
|
|
|
72
77
|
})), metaAttribute({
|
|
73
78
|
name: MetaConstants.ActionList,
|
|
74
79
|
testID: testID
|
|
75
|
-
})), {}, {
|
|
80
|
+
})), makeAnalyticsAttribute(rest)), {}, {
|
|
76
81
|
children: /*#__PURE__*/jsx(ActionListBox, {
|
|
77
82
|
isInBottomSheet: isInBottomSheet,
|
|
78
83
|
actionListItemWrapperRole: actionListItemWrapperRole,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionList.js","sources":["../../../../../../src/components/ActionList/ActionList.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport React from 'react';\nimport { getActionListContainerRole, getActionListItemWrapperRole } from './getA11yRoles';\nimport { getActionListProperties } from './actionListUtils';\nimport { ActionListBox } from './ActionListBox';\nimport { componentIds } from './componentIds';\nimport { ActionListNoResults } from './ActionListNoResults';\nimport { useDropdown } from '~components/Dropdown/useDropdown';\nimport { useBottomSheetContext } from '~components/BottomSheet/BottomSheetContext';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport type { TestID } from '~utils/types';\nimport BaseBox from '~components/Box/BaseBox';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { dropdownComponentIds } from '~components/Dropdown/dropdownComponentIds';\n\ntype ActionListProps = {\n children: React.ReactNode[];\n} & TestID;\n\nconst _ActionList = ({ children, testID }: ActionListProps): React.ReactElement => {\n const {\n setOptions,\n actionListItemRef,\n selectionType,\n dropdownBaseId,\n dropdownTriggerer,\n hasFooterAction,\n filteredValues,\n } = useDropdown();\n\n const { isInBottomSheet } = useBottomSheetContext();\n\n const { sectionData, childrenWithId, actionListOptions } = React.useMemo(\n () => getActionListProperties(children),\n [children],\n );\n\n React.useEffect(() => {\n setOptions(actionListOptions);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [actionListOptions]);\n\n if (\n filteredValues.length <= 0 &&\n dropdownTriggerer === dropdownComponentIds.triggers.AutoComplete\n ) {\n return <ActionListNoResults />;\n }\n\n const actionListContainerRole = getActionListContainerRole(hasFooterAction, dropdownTriggerer);\n const actionListItemWrapperRole = getActionListItemWrapperRole(\n hasFooterAction,\n dropdownTriggerer,\n );\n const isMultiSelectable = selectionType === 'multiple';\n\n // If we are inside BottomSheet, we don't render The StyledActionList wrapper\n // This is to ensure:\n // 1. We don't render the box wrapper styles which includes shadows, padding, border etc\n // 2. to ensure GorhomBottomSheetSectionList works as expected, if we add extra wrappers GorhomBottomSheet won't render the content inside\n // NOTE: That this also means inside BottomSheet, ActionList won't render any ActionListHeader or Footer.\n return isInBottomSheet ? (\n <ActionListBox\n isInBottomSheet={isInBottomSheet}\n actionListItemWrapperRole={actionListItemWrapperRole}\n childrenWithId={childrenWithId}\n sectionData={sectionData}\n isMultiSelectable={isMultiSelectable}\n ref={actionListItemRef as any}\n />\n ) : (\n <BaseBox\n id={`${dropdownBaseId}-actionlist`}\n {...makeAccessible({\n role: actionListContainerRole,\n multiSelectable: actionListContainerRole === 'listbox' ? isMultiSelectable : undefined,\n labelledBy: `${dropdownBaseId}-label`,\n })}\n {...metaAttribute({ name: MetaConstants.ActionList, testID })}\n >\n <ActionListBox\n isInBottomSheet={isInBottomSheet}\n actionListItemWrapperRole={actionListItemWrapperRole}\n childrenWithId={childrenWithId}\n sectionData={sectionData}\n isMultiSelectable={isMultiSelectable}\n ref={actionListItemRef as any}\n />\n </BaseBox>\n );\n};\n\n/**\n * ### ActionList\n *\n * List of multiple actionable items. Can be used as menu items inside `Dropdown`,\n * `BottomSheet` and as selectable items when combined with `SelectInput`\n *\n * #### Usage\n *\n * ```jsx\n * <Dropdown>\n * <SelectInput label=\"Select Action\" />\n * <DropdownOverlay>\n * <DropdownHeader title=\"Header Title\" />\n * <ActionList>\n * <ActionListItem\n * title=\"Home\"\n * value=\"home\"\n * leading={<ActionListItemIcon icon={HomeIcon} />}\n * />\n * <ActionListItem\n * title=\"Pricing\"\n * value=\"pricing\"\n * leading={<ActionListItemAsset src=\"https://flagcdn.com/w20/in.png\" alt=\"India Flag\" />}\n * />\n * </ActionList>\n * <DropdownFooter><Button>Apply</Button></DropdownFooter>\n * </DropdownOverlay>\n * </Dropdown>\n * ```\n *\n */\nconst ActionList = assignWithoutSideEffects(React.memo(_ActionList), {\n displayName: componentIds.ActionList,\n componentId: componentIds.ActionList,\n});\n\nexport type { ActionListProps };\nexport { ActionList };\n"],"names":["_ActionList","_ref","children","testID","_useDropdown","useDropdown","setOptions","actionListItemRef","selectionType","dropdownBaseId","dropdownTriggerer","hasFooterAction","filteredValues","_useBottomSheetContex","useBottomSheetContext","isInBottomSheet","_React$useMemo","React","useMemo","getActionListProperties","sectionData","childrenWithId","actionListOptions","useEffect","length","dropdownComponentIds","triggers","AutoComplete","_jsx","ActionListNoResults","actionListContainerRole","getActionListContainerRole","actionListItemWrapperRole","getActionListItemWrapperRole","isMultiSelectable","ActionListBox","ref","
|
|
1
|
+
{"version":3,"file":"ActionList.js","sources":["../../../../../../src/components/ActionList/ActionList.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport React from 'react';\nimport { getActionListContainerRole, getActionListItemWrapperRole } from './getA11yRoles';\nimport { getActionListProperties } from './actionListUtils';\nimport { ActionListBox } from './ActionListBox';\nimport { componentIds } from './componentIds';\nimport { ActionListNoResults } from './ActionListNoResults';\nimport { useDropdown } from '~components/Dropdown/useDropdown';\nimport { useBottomSheetContext } from '~components/BottomSheet/BottomSheetContext';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport type { DataAnalyticsAttribute, TestID } from '~utils/types';\nimport BaseBox from '~components/Box/BaseBox';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { dropdownComponentIds } from '~components/Dropdown/dropdownComponentIds';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\n\ntype ActionListProps = {\n children: React.ReactNode[];\n} & TestID &\n DataAnalyticsAttribute;\n\nconst _ActionList = ({ children, testID, ...rest }: ActionListProps): React.ReactElement => {\n const {\n setOptions,\n actionListItemRef,\n selectionType,\n dropdownBaseId,\n dropdownTriggerer,\n hasFooterAction,\n filteredValues,\n } = useDropdown();\n\n const { isInBottomSheet } = useBottomSheetContext();\n\n const { sectionData, childrenWithId, actionListOptions } = React.useMemo(\n () => getActionListProperties(children),\n [children],\n );\n\n React.useEffect(() => {\n setOptions(actionListOptions);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [actionListOptions]);\n\n if (\n filteredValues.length <= 0 &&\n dropdownTriggerer === dropdownComponentIds.triggers.AutoComplete\n ) {\n return <ActionListNoResults />;\n }\n\n const actionListContainerRole = getActionListContainerRole(hasFooterAction, dropdownTriggerer);\n const actionListItemWrapperRole = getActionListItemWrapperRole(\n hasFooterAction,\n dropdownTriggerer,\n );\n const isMultiSelectable = selectionType === 'multiple';\n\n // If we are inside BottomSheet, we don't render The StyledActionList wrapper\n // This is to ensure:\n // 1. We don't render the box wrapper styles which includes shadows, padding, border etc\n // 2. to ensure GorhomBottomSheetSectionList works as expected, if we add extra wrappers GorhomBottomSheet won't render the content inside\n // NOTE: That this also means inside BottomSheet, ActionList won't render any ActionListHeader or Footer.\n return isInBottomSheet ? (\n <ActionListBox\n isInBottomSheet={isInBottomSheet}\n actionListItemWrapperRole={actionListItemWrapperRole}\n childrenWithId={childrenWithId}\n sectionData={sectionData}\n isMultiSelectable={isMultiSelectable}\n ref={actionListItemRef as any}\n {...makeAnalyticsAttribute(rest)}\n />\n ) : (\n <BaseBox\n id={`${dropdownBaseId}-actionlist`}\n {...makeAccessible({\n role: actionListContainerRole,\n multiSelectable: actionListContainerRole === 'listbox' ? isMultiSelectable : undefined,\n labelledBy: `${dropdownBaseId}-label`,\n })}\n {...metaAttribute({ name: MetaConstants.ActionList, testID })}\n {...makeAnalyticsAttribute(rest)}\n >\n <ActionListBox\n isInBottomSheet={isInBottomSheet}\n actionListItemWrapperRole={actionListItemWrapperRole}\n childrenWithId={childrenWithId}\n sectionData={sectionData}\n isMultiSelectable={isMultiSelectable}\n ref={actionListItemRef as any}\n />\n </BaseBox>\n );\n};\n\n/**\n * ### ActionList\n *\n * List of multiple actionable items. Can be used as menu items inside `Dropdown`,\n * `BottomSheet` and as selectable items when combined with `SelectInput`\n *\n * #### Usage\n *\n * ```jsx\n * <Dropdown>\n * <SelectInput label=\"Select Action\" />\n * <DropdownOverlay>\n * <DropdownHeader title=\"Header Title\" />\n * <ActionList>\n * <ActionListItem\n * title=\"Home\"\n * value=\"home\"\n * leading={<ActionListItemIcon icon={HomeIcon} />}\n * />\n * <ActionListItem\n * title=\"Pricing\"\n * value=\"pricing\"\n * leading={<ActionListItemAsset src=\"https://flagcdn.com/w20/in.png\" alt=\"India Flag\" />}\n * />\n * </ActionList>\n * <DropdownFooter><Button>Apply</Button></DropdownFooter>\n * </DropdownOverlay>\n * </Dropdown>\n * ```\n *\n */\nconst ActionList = assignWithoutSideEffects(React.memo(_ActionList), {\n displayName: componentIds.ActionList,\n componentId: componentIds.ActionList,\n});\n\nexport type { ActionListProps };\nexport { ActionList };\n"],"names":["_ActionList","_ref","children","testID","rest","_objectWithoutProperties","_excluded","_useDropdown","useDropdown","setOptions","actionListItemRef","selectionType","dropdownBaseId","dropdownTriggerer","hasFooterAction","filteredValues","_useBottomSheetContex","useBottomSheetContext","isInBottomSheet","_React$useMemo","React","useMemo","getActionListProperties","sectionData","childrenWithId","actionListOptions","useEffect","length","dropdownComponentIds","triggers","AutoComplete","_jsx","ActionListNoResults","actionListContainerRole","getActionListContainerRole","actionListItemWrapperRole","getActionListItemWrapperRole","isMultiSelectable","ActionListBox","_objectSpread","ref","makeAnalyticsAttribute","BaseBox","id","concat","makeAccessible","role","multiSelectable","undefined","labelledBy","metaAttribute","name","MetaConstants","ActionList","assignWithoutSideEffects","memo","displayName","componentIds","componentId"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAsBA,IAAMA,WAAW,GAAG,SAAdA,WAAWA,CAAAC,IAAA,EAA2E;AAAA,EAAA,IAArEC,QAAQ,GAAAD,IAAA,CAARC,QAAQ;IAAEC,MAAM,GAAAF,IAAA,CAANE,MAAM;AAAKC,IAAAA,IAAI,GAAAC,wBAAA,CAAAJ,IAAA,EAAAK,SAAA,CAAA,CAAA;AAC9C,EAAA,IAAAC,YAAA,GAQIC,WAAW,EAAE;IAPfC,UAAU,GAAAF,YAAA,CAAVE,UAAU;IACVC,iBAAiB,GAAAH,YAAA,CAAjBG,iBAAiB;IACjBC,aAAa,G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AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACM2C,IAAAA,UAAU,gBAAGC,wBAAwB,eAAClC,cAAK,CAACmC,IAAI,CAACvD,WAAW,CAAC,EAAE;EACnEwD,WAAW,EAAEC,YAAY,CAACJ,UAAU;EACpCK,WAAW,EAAED,YAAY,CAACJ,UAAAA;AAC5B,CAAC;;;;"}
|
|
@@ -1,28 +1,33 @@
|
|
|
1
1
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
2
|
+
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
2
3
|
import React__default from 'react';
|
|
3
4
|
import { StyledListBoxWrapper } from './styles/StyledListBoxWrapper.web.js';
|
|
4
5
|
import { useBottomSheetContext } from '../BottomSheet/BottomSheetContext.js';
|
|
5
6
|
import '../../utils/assignWithoutSideEffects/index.js';
|
|
6
7
|
import '../../utils/makeAccessible/index.js';
|
|
8
|
+
import '../../utils/makeAnalyticsAttribute/index.js';
|
|
7
9
|
import { jsx } from 'react/jsx-runtime';
|
|
8
10
|
import { makeAccessible } from '../../utils/makeAccessible/makeAccessible.web.js';
|
|
11
|
+
import { makeAnalyticsAttribute } from '../../utils/makeAnalyticsAttribute/makeAnalyticsAttribute.js';
|
|
9
12
|
import { assignWithoutSideEffects } from '../../utils/assignWithoutSideEffects/assignWithoutSideEffects.js';
|
|
10
13
|
|
|
14
|
+
var _excluded = ["childrenWithId", "actionListItemWrapperRole", "isMultiSelectable"];
|
|
11
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; }
|
|
12
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; }
|
|
13
17
|
var _ActionListBox = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
14
18
|
var childrenWithId = _ref.childrenWithId,
|
|
15
19
|
actionListItemWrapperRole = _ref.actionListItemWrapperRole,
|
|
16
|
-
isMultiSelectable = _ref.isMultiSelectable
|
|
20
|
+
isMultiSelectable = _ref.isMultiSelectable,
|
|
21
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
17
22
|
var _useBottomSheetContex = useBottomSheetContext(),
|
|
18
23
|
isInBottomSheet = _useBottomSheetContex.isInBottomSheet;
|
|
19
|
-
return /*#__PURE__*/jsx(StyledListBoxWrapper, _objectSpread(_objectSpread({
|
|
24
|
+
return /*#__PURE__*/jsx(StyledListBoxWrapper, _objectSpread(_objectSpread(_objectSpread({
|
|
20
25
|
isInBottomSheet: isInBottomSheet,
|
|
21
26
|
ref: ref
|
|
22
27
|
}, makeAccessible({
|
|
23
28
|
role: actionListItemWrapperRole,
|
|
24
29
|
multiSelectable: actionListItemWrapperRole === 'listbox' ? isMultiSelectable : undefined
|
|
25
|
-
})), {}, {
|
|
30
|
+
})), makeAnalyticsAttribute(rest)), {}, {
|
|
26
31
|
children: childrenWithId
|
|
27
32
|
}));
|
|
28
33
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionListBox.web.js","sources":["../../../../../../src/components/ActionList/ActionListBox.web.tsx"],"sourcesContent":["/* eslint-disable react/display-name */\nimport React from 'react';\nimport { StyledListBoxWrapper } from './styles/StyledListBoxWrapper';\nimport type { SectionData } from './actionListUtils';\nimport { useBottomSheetContext } from '~components/BottomSheet/BottomSheetContext';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { makeAccessible } from '~utils/makeAccessible';\n\ntype ActionListBoxProps = {\n childrenWithId?: React.ReactNode[] | null;\n sectionData: SectionData;\n actionListItemWrapperRole: 'listbox' | 'menu' | undefined;\n isMultiSelectable: boolean;\n isInBottomSheet: boolean;\n};\n\nconst _ActionListBox = React.forwardRef<HTMLDivElement, ActionListBoxProps>(\n ({ childrenWithId, actionListItemWrapperRole, isMultiSelectable }, ref) => {\n const { isInBottomSheet } = useBottomSheetContext();\n\n return (\n <StyledListBoxWrapper\n isInBottomSheet={isInBottomSheet}\n ref={ref}\n {...makeAccessible({\n role: actionListItemWrapperRole,\n multiSelectable: actionListItemWrapperRole === 'listbox' ? isMultiSelectable : undefined,\n })}\n >\n {childrenWithId}\n </StyledListBoxWrapper>\n );\n },\n);\n\nconst ActionListBox = assignWithoutSideEffects(_ActionListBox, { displayName: 'ActionListBox' });\n\nexport { ActionListBox };\n"],"names":["_ActionListBox","React","forwardRef","_ref","ref","childrenWithId","actionListItemWrapperRole","isMultiSelectable","_useBottomSheetContex","useBottomSheetContext","isInBottomSheet","_jsx","StyledListBoxWrapper","_objectSpread","makeAccessible","role","multiSelectable","undefined","children","ActionListBox","assignWithoutSideEffects","displayName"],"mappings":"
|
|
1
|
+
{"version":3,"file":"ActionListBox.web.js","sources":["../../../../../../src/components/ActionList/ActionListBox.web.tsx"],"sourcesContent":["/* eslint-disable react/display-name */\nimport React from 'react';\nimport { StyledListBoxWrapper } from './styles/StyledListBoxWrapper';\nimport type { SectionData } from './actionListUtils';\nimport { useBottomSheetContext } from '~components/BottomSheet/BottomSheetContext';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport type { DataAnalyticsAttribute } from '~utils/types';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\n\ntype ActionListBoxProps = {\n childrenWithId?: React.ReactNode[] | null;\n sectionData: SectionData;\n actionListItemWrapperRole: 'listbox' | 'menu' | undefined;\n isMultiSelectable: boolean;\n isInBottomSheet: boolean;\n} & DataAnalyticsAttribute;\n\nconst _ActionListBox = React.forwardRef<HTMLDivElement, ActionListBoxProps>(\n ({ childrenWithId, actionListItemWrapperRole, isMultiSelectable, ...rest }, ref) => {\n const { isInBottomSheet } = useBottomSheetContext();\n\n return (\n <StyledListBoxWrapper\n isInBottomSheet={isInBottomSheet}\n ref={ref}\n {...makeAccessible({\n role: actionListItemWrapperRole,\n multiSelectable: actionListItemWrapperRole === 'listbox' ? isMultiSelectable : undefined,\n })}\n {...makeAnalyticsAttribute(rest)}\n >\n {childrenWithId}\n </StyledListBoxWrapper>\n );\n },\n);\n\nconst ActionListBox = assignWithoutSideEffects(_ActionListBox, { displayName: 'ActionListBox' });\n\nexport { ActionListBox };\n"],"names":["_ActionListBox","React","forwardRef","_ref","ref","childrenWithId","actionListItemWrapperRole","isMultiSelectable","rest","_objectWithoutProperties","_excluded","_useBottomSheetContex","useBottomSheetContext","isInBottomSheet","_jsx","StyledListBoxWrapper","_objectSpread","makeAccessible","role","multiSelectable","undefined","makeAnalyticsAttribute","children","ActionListBox","assignWithoutSideEffects","displayName"],"mappings":";;;;;;;;;;;;;;;;AAkBA,IAAMA,cAAc,gBAAGC,cAAK,CAACC,UAAU,CACrC,UAAAC,IAAA,EAA4EC,GAAG,EAAK;AAAA,EAAA,IAAjFC,cAAc,GAAAF,IAAA,CAAdE,cAAc;IAAEC,yBAAyB,GAAAH,IAAA,CAAzBG,yBAAyB;IAAEC,iBAAiB,GAAAJ,IAAA,CAAjBI,iBAAiB;AAAKC,IAAAA,IAAI,GAAAC,wBAAA,CAAAN,IAAA,EAAAO,SAAA,CAAA,CAAA;AACtE,EAAA,IAAAC,qBAAA,GAA4BC,qBAAqB,EAAE;IAA3CC,eAAe,GAAAF,qBAAA,CAAfE,eAAe,CAAA;EAEvB,oBACEC,GAAA,CAACC,oBAAoB,EAAAC,aAAA,CAAAA,aAAA,CAAAA,aAAA,CAAA;AACnBH,IAAAA,eAAe,EAAEA,eAAgB;AACjCT,IAAAA,GAAG,EAAEA,GAAAA;AAAI,GAAA,EACLa,cAAc,CAAC;AACjBC,IAAAA,IAAI,EAAEZ,yBAAyB;AAC/Ba,IAAAA,eAAe,EAAEb,yBAAyB,KAAK,SAAS,GAAGC,iBAAiB,GAAGa,SAAAA;AACjF,GAAC,CAAC,CAAA,EACEC,sBAAsB,CAACb,IAAI,CAAC,CAAA,EAAA,EAAA,EAAA;AAAAc,IAAAA,QAAA,EAE/BjB,cAAAA;AAAc,GAAA,CACK,CAAC,CAAA;AAE3B,CACF,CAAC,CAAA;AAED,IAAMkB,aAAa,gBAAGC,wBAAwB,CAACxB,cAAc,EAAE;AAAEyB,EAAAA,WAAW,EAAE,eAAA;AAAgB,CAAC;;;;"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
2
|
+
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
2
3
|
import React__default from 'react';
|
|
3
4
|
import styled from 'styled-components';
|
|
4
5
|
import { componentIds } from './componentIds.js';
|
|
@@ -20,6 +21,7 @@ import { dropdownComponentIds } from '../Dropdown/dropdownComponentIds.js';
|
|
|
20
21
|
import '../BaseMenu/index.js';
|
|
21
22
|
import '../Checkbox/index.js';
|
|
22
23
|
import '../Avatar/index.js';
|
|
24
|
+
import '../../utils/makeAnalyticsAttribute/index.js';
|
|
23
25
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
24
26
|
import { BaseBox } from '../Box/BaseBox/BaseBox.web.js';
|
|
25
27
|
import { makeSize } from '../../utils/makeSize/makeSize.js';
|
|
@@ -27,6 +29,7 @@ import { isReactNative } from '../../utils/platform/isReactNative.js';
|
|
|
27
29
|
import { makeAccessible } from '../../utils/makeAccessible/makeAccessible.web.js';
|
|
28
30
|
import { metaAttribute } from '../../utils/metaAttribute/metaAttribute.web.js';
|
|
29
31
|
import { MetaConstants } from '../../utils/metaAttribute/metaConstants.js';
|
|
32
|
+
import { makeAnalyticsAttribute } from '../../utils/makeAnalyticsAttribute/makeAnalyticsAttribute.js';
|
|
30
33
|
import { Text } from '../Typography/Text/Text.js';
|
|
31
34
|
import { Divider } from '../Divider/Divider.js';
|
|
32
35
|
import { assignWithoutSideEffects } from '../../utils/assignWithoutSideEffects/assignWithoutSideEffects.js';
|
|
@@ -39,6 +42,7 @@ import { BaseMenuItem } from '../BaseMenu/BaseMenuItem/BaseMenuItem.js';
|
|
|
39
42
|
import { Checkbox } from '../Checkbox/Checkbox.js';
|
|
40
43
|
import { castWebType } from '../../utils/platform/castUtils.js';
|
|
41
44
|
|
|
45
|
+
var _excluded = ["title", "children", "testID", "_hideDivider", "_sectionChildValues"];
|
|
42
46
|
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; }
|
|
43
47
|
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; }
|
|
44
48
|
var StyledActionListSectionTitle = /*#__PURE__*/styled(BaseBox).withConfig({
|
|
@@ -55,7 +59,8 @@ var _ActionListSection = function _ActionListSection(_ref) {
|
|
|
55
59
|
children = _ref.children,
|
|
56
60
|
testID = _ref.testID,
|
|
57
61
|
_hideDivider = _ref._hideDivider,
|
|
58
|
-
_sectionChildValues = _ref._sectionChildValues
|
|
62
|
+
_sectionChildValues = _ref._sectionChildValues,
|
|
63
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
59
64
|
var _useDropdown = useDropdown(),
|
|
60
65
|
hasAutoCompleteInBottomSheetHeader = _useDropdown.hasAutoCompleteInBottomSheetHeader,
|
|
61
66
|
dropdownTriggerer = _useDropdown.dropdownTriggerer,
|
|
@@ -72,13 +77,13 @@ var _ActionListSection = function _ActionListSection(_ref) {
|
|
|
72
77
|
}, [_sectionChildValues, hasAutoComplete, filteredValues]);
|
|
73
78
|
var showDividerInRN = !(_hideDivider && isReactNative());
|
|
74
79
|
var showDividerInAutoComplete = hasAutoComplete ? isSectionVisible && filteredValues.length > 1 : true;
|
|
75
|
-
return /*#__PURE__*/jsxs(BaseBox, _objectSpread(_objectSpread(_objectSpread({}, makeAccessible({
|
|
80
|
+
return /*#__PURE__*/jsxs(BaseBox, _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, makeAccessible({
|
|
76
81
|
role: getActionListSectionRole(),
|
|
77
82
|
label: title
|
|
78
83
|
})), metaAttribute({
|
|
79
84
|
name: MetaConstants.ActionListSection,
|
|
80
85
|
testID: testID
|
|
81
|
-
})), {}, {
|
|
86
|
+
})), makeAnalyticsAttribute(rest)), {}, {
|
|
82
87
|
children: [isSectionVisible ? /*#__PURE__*/jsx(StyledActionListSectionTitle, _objectSpread(_objectSpread({}, makeAccessible({
|
|
83
88
|
hidden: true
|
|
84
89
|
})), {}, {
|
|
@@ -244,7 +249,7 @@ var _ActionListItem = function _ActionListItem(props) {
|
|
|
244
249
|
return (
|
|
245
250
|
/*#__PURE__*/
|
|
246
251
|
// We use this context to change the color of subcomponents like ActionListItemIcon, ActionListItemText, etc
|
|
247
|
-
jsx(BaseMenuItem, _objectSpread(_objectSpread(_objectSpread({
|
|
252
|
+
jsx(BaseMenuItem, _objectSpread(_objectSpread(_objectSpread(_objectSpread({
|
|
248
253
|
isVisible: hasAutoComplete && filteredValues ? filteredValues.includes(props.value) : true,
|
|
249
254
|
as: !isReactNative() ? renderOnWebAs : undefined,
|
|
250
255
|
id: "".concat(dropdownBaseId, "-").concat(props._index),
|
|
@@ -282,7 +287,7 @@ var _ActionListItem = function _ActionListItem(props) {
|
|
|
282
287
|
event: castWebType(e)
|
|
283
288
|
});
|
|
284
289
|
}
|
|
285
|
-
})), metaAttribute({
|
|
290
|
+
})), makeAnalyticsAttribute(_objectSpread({}, props))), metaAttribute({
|
|
286
291
|
name: MetaConstants.ActionListItem,
|
|
287
292
|
testID: props.testID
|
|
288
293
|
})), {}, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionListItem.js","sources":["../../../../../../src/components/ActionList/ActionListItem.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/ban-ts-comment */\nimport React from 'react';\nimport styled from 'styled-components';\nimport type { TouchableOpacity } from 'react-native';\nimport { componentIds } from './componentIds';\nimport { validateActionListItemProps, getNormalTextColor } from './actionListUtils';\nimport { getActionListItemRole, getActionListSectionRole } from './getA11yRoles';\nimport { Divider } from '~components/Divider';\nimport BaseBox from '~components/Box/BaseBox';\nimport type { IconComponent } from '~components/Icons';\nimport { useDropdown } from '~components/Dropdown/useDropdown';\nimport type { FeedbackColors } from '~tokens/theme/theme';\nimport { Text } from '~components/Typography';\nimport type { Platform } from '~utils';\nimport { castWebType, isReactNative } from '~utils';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport type { StringChildrenType, TestID } from '~utils/types';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { makeSize } from '~utils/makeSize';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { throwBladeError } from '~utils/logger';\nimport type { BadgeProps } from '~components/Badge';\nimport { Badge } from '~components/Badge';\nimport { Box } from '~components/Box';\nimport { dropdownComponentIds } from '~components/Dropdown/dropdownComponentIds';\nimport { BaseMenuItem, useBaseMenuItem } from '~components/BaseMenu';\nimport { Checkbox } from '~components/Checkbox';\nimport type { AvatarProps } from '~components/Avatar/types';\nimport { Avatar } from '~components/Avatar';\n\ntype ActionListItemProps = {\n title: string;\n description?: string;\n onClick?: (clickProps: {\n name: string;\n value?: boolean;\n event: Platform.Select<{\n web: React.MouseEvent;\n native: React.TouchEvent<TouchableOpacity>;\n }>;\n }) => void;\n /**\n * value that you get from `onChange` event on SelectInput or in form submissions.\n */\n value: string;\n /**\n * Link to open when item is clicked.\n */\n href?: string;\n /**\n * HTML target of the link\n */\n target?: string;\n /**\n * Item that goes on left-side of item.\n *\n * Valid elements - `<ActionListItemIcon />`, `<ActionListItemAsset />`\n *\n * Will be overriden in multiselect\n */\n leading?: React.ReactNode;\n /**\n * Item that goes on right-side of item.\n *\n * Valid elements - `<ActionListItemText />`, `<ActionListItemIcon />`\n */\n trailing?: React.ReactNode;\n /**\n * Item that goes immediately next to the title.\n *\n * Valid elements - `<ActionListItemBadge />`, `<ActionListItemBadgeGroup />`\n *\n */\n titleSuffix?: React.ReactElement;\n isDisabled?: boolean;\n intent?: Extract<FeedbackColors, 'negative'>;\n /**\n * Can be used in combination of `onClick` to highlight item as selected in Button Triggers.\n *\n * When trigger is SelectInput, Use `value` prop on SelectInput instead to make dropdown controlled.\n */\n isSelected?: boolean;\n /**\n * Internally passed from ActionList. No need to pass it explicitly\n *\n * @private\n */\n _index?: number;\n} & TestID;\n\nconst StyledActionListSectionTitle = styled(BaseBox)((props) => ({\n // @TODO: replace this styled-component with new layout box when we have padding shorthand\n padding: makeSize(props.theme.spacing[3]),\n}));\n\ntype ActionListSectionProps = {\n title: string;\n children: React.ReactNode[] | React.ReactNode;\n /**\n * Internally used to hide the divider on final item in React Native.\n *\n * Should not be used by consumers (also won't work on web)\n *\n * @private\n */\n _hideDivider?: boolean;\n /**\n * Internally used to hide / show section in AutoComplete\n *\n * @private\n */\n _sectionChildValues?: string[];\n} & TestID;\nconst _ActionListSection = ({\n title,\n children,\n testID,\n _hideDivider,\n _sectionChildValues,\n}: ActionListSectionProps): React.ReactElement => {\n const { hasAutoCompleteInBottomSheetHeader, dropdownTriggerer, filteredValues } = useDropdown();\n const hasAutoComplete =\n hasAutoCompleteInBottomSheetHeader ||\n dropdownTriggerer === dropdownComponentIds.triggers.AutoComplete;\n\n const isSectionVisible = React.useMemo(() => {\n if (hasAutoComplete) {\n const visibleActionListItemInSection = _sectionChildValues?.find((actionItemValue) =>\n filteredValues.includes(actionItemValue),\n );\n\n return Boolean(visibleActionListItemInSection);\n }\n\n return true;\n }, [_sectionChildValues, hasAutoComplete, filteredValues]);\n\n const showDividerInRN = !(_hideDivider && isReactNative());\n const showDividerInAutoComplete = hasAutoComplete\n ? isSectionVisible && filteredValues.length > 1\n : true;\n\n return (\n <BaseBox\n {...makeAccessible({\n role: getActionListSectionRole(),\n label: title,\n })}\n {...metaAttribute({ name: MetaConstants.ActionListSection, testID })}\n >\n {/* We're announcing title as group label so we can hide this */}\n {isSectionVisible ? (\n <StyledActionListSectionTitle {...makeAccessible({ hidden: true })}>\n <Text color=\"surface.text.gray.muted\" size=\"small\" weight=\"semibold\">\n {title}\n </Text>\n </StyledActionListSectionTitle>\n ) : null}\n <BaseBox\n {...makeAccessible({\n // On web, we just wrap it in another listbox to announce item count properly for particular group.\n // On React Native, we ignore it since `menu` + `group` role will take care of accessibility\n role: isReactNative() ? undefined : 'listbox',\n })}\n >\n {children}\n </BaseBox>\n {showDividerInAutoComplete && showDividerInRN ? (\n <Divider marginX=\"spacing.3\" marginY=\"spacing.1\" />\n ) : null}\n </BaseBox>\n );\n};\n\nconst ActionListSection = assignWithoutSideEffects(_ActionListSection, {\n componentId: componentIds.ActionListSection,\n});\n\nconst _ActionListItemIcon = ({ icon }: { icon: IconComponent }): React.ReactElement => {\n const Icon = icon;\n const { color, isDisabled } = useBaseMenuItem();\n const iconState = isDisabled ? 'disabled' : 'muted';\n return (\n <Icon\n color={\n color === 'negative'\n ? 'feedback.icon.negative.intense'\n : `interactive.icon.gray.${iconState}`\n }\n size=\"medium\"\n />\n );\n};\n\nconst ActionListItemIcon = assignWithoutSideEffects(_ActionListItemIcon, {\n componentId: componentIds.ActionListItemIcon,\n});\n\nconst _ActionListItemBadgeGroup = ({\n children,\n}: {\n children: React.ReactElement[] | React.ReactElement;\n}): React.ReactElement => {\n return (\n <Box display=\"flex\" alignItems=\"center\" flexDirection=\"row\">\n {children}\n </Box>\n );\n};\n\nconst ActionListItemBadgeGroup = assignWithoutSideEffects(_ActionListItemBadgeGroup, {\n componentId: componentIds.ActionListItemBadgeGroup,\n});\n\nconst _ActionListItemAvatar = (avatarProps: Omit<AvatarProps, 'size' | ''>): React.ReactElement => {\n return <Avatar size=\"xsmall\" {...avatarProps} />;\n};\n\nconst ActionListItemAvatar = assignWithoutSideEffects(_ActionListItemAvatar, {\n componentId: componentIds.ActionListItemAvatar,\n});\n\nconst _ActionListItemBadge = (props: BadgeProps): React.ReactElement => {\n return <Badge size=\"medium\" marginLeft=\"spacing.3\" {...props} />;\n};\n\nconst ActionListItemBadge = assignWithoutSideEffects(_ActionListItemBadge, {\n componentId: componentIds.ActionListItemBadge,\n});\n\nconst _ActionListItemText = ({\n children,\n}: {\n children: StringChildrenType;\n}): React.ReactElement => {\n const { isDisabled } = useBaseMenuItem();\n\n return (\n <Text variant=\"caption\" color={getNormalTextColor(isDisabled, { isMuted: true })}>\n {children}\n </Text>\n );\n};\n\nconst ActionListItemText = assignWithoutSideEffects(_ActionListItemText, {\n componentId: componentIds.ActionListItemText,\n});\n\ntype ClickHandlerType = (e: React.MouseEvent<HTMLButtonElement>) => void;\n\nconst makeActionListItemClickable = (\n clickHandler: ClickHandlerType,\n): { onPress?: (e: React.TouchEvent<TouchableOpacity>) => void; onClick?: ClickHandlerType } => {\n if (isReactNative()) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment, @typescript-eslint/prefer-ts-expect-error\n // @ts-ignore: ignoring ReactNative press type for the peace of mind\n return { onPress: clickHandler };\n }\n\n return {\n onClick: clickHandler,\n };\n};\n\n/**\n * ### ActionListItem\n *\n * Creates option inside `ActionList`.\n *\n * #### Usage\n *\n * ```jsx\n * <ActionList>\n * <ActionListItem\n * title=\"Home\"\n * value=\"home\"\n * leading={<ActionListItemIcon icon={HomeIcon} />}\n * trailing={<ActionListItemText>⌘ + S</ActionListItemText>}\n * />\n * </ActionList>\n * ```\n */\nconst _ActionListItem = (props: ActionListItemProps): React.ReactElement => {\n const {\n activeIndex,\n dropdownBaseId,\n onOptionClick,\n selectedIndices,\n setShouldIgnoreBlurAnimation,\n selectionType,\n dropdownTriggerer,\n isKeydownPressed,\n filteredValues,\n hasAutoCompleteInBottomSheetHeader,\n } = useDropdown();\n\n const hasAutoComplete =\n hasAutoCompleteInBottomSheetHeader ||\n dropdownTriggerer === dropdownComponentIds.triggers.AutoComplete;\n\n const renderOnWebAs = props.href ? 'a' : 'button';\n\n /**\n * In SelectInput, returns the isSelected according to selected indexes in the state\n *\n * In Other Triggers (Menu Usecase), returns `props.isSelected` since passing the\n * isSelected prop explicitly is the only way to select item in menu\n */\n const getIsSelected = (): boolean | undefined => {\n if (dropdownTriggerer === dropdownComponentIds.triggers.SelectInput || hasAutoComplete) {\n if (typeof props._index === 'number') {\n return selectedIndices.includes(props._index);\n }\n\n return undefined;\n }\n\n return props.isSelected;\n };\n\n const isSelected = getIsSelected();\n\n React.useEffect(() => {\n validateActionListItemProps({\n leading: props.leading,\n trailing: props.trailing,\n titleSuffix: props.titleSuffix,\n });\n }, [props.leading, props.trailing, props.titleSuffix]);\n\n React.useEffect(() => {\n if (__DEV__) {\n if (\n dropdownTriggerer === dropdownComponentIds.triggers.SelectInput &&\n props.intent === 'negative'\n ) {\n throwBladeError({\n message:\n 'negative intent ActionListItem cannot be used inside Dropdown with SelectInput trigger',\n moduleName: 'ActionListItem',\n });\n }\n }\n }, [props.intent, dropdownTriggerer]);\n\n return (\n // We use this context to change the color of subcomponents like ActionListItemIcon, ActionListItemText, etc\n <BaseMenuItem\n isVisible={hasAutoComplete && filteredValues ? filteredValues.includes(props.value) : true}\n as={!isReactNative() ? renderOnWebAs : undefined}\n id={`${dropdownBaseId}-${props._index}`}\n tabIndex={-1}\n title={props.title}\n description={props.description}\n leading={\n selectionType === 'multiple' ? (\n <BaseBox\n pointerEvents=\"none\"\n // Adding aria-hidden because the listbox item in multiselect in itself explains the behaviour so announcing checkbox is unneccesary and just a nice UI tweak for us\n {...makeAccessible({\n hidden: true,\n })}\n >\n <Checkbox isChecked={isSelected} tabIndex={-1} isDisabled={props.isDisabled}>\n {/* \n Checkbox requires children. Didn't want to make it optional because its helpful for consumers\n But for this case in particular, we just want to use Text separately so that we can control spacing and color and keep it consistent with non-multiselect dropdowns\n */}\n {null}\n </Checkbox>\n </BaseBox>\n ) : (\n props.leading\n )\n }\n trailing={props.trailing}\n titleSuffix={props.titleSuffix}\n href={props.href}\n target={props.target}\n className={activeIndex === props._index ? 'active-focus' : ''}\n isSelected={isSelected}\n isDisabled={props.isDisabled}\n role={getActionListItemRole(dropdownTriggerer, props.href)}\n {...makeActionListItemClickable((e: React.MouseEvent<HTMLButtonElement>): void => {\n if (typeof props._index === 'number') {\n onOptionClick(e, props._index);\n props.onClick?.({ name: props.value, value: isSelected, event: castWebType(e) });\n }\n })}\n {...metaAttribute({ name: MetaConstants.ActionListItem, testID: props.testID })}\n onMouseDown={() => {\n // We want to keep focus on Dropdown's trigger while option is being clicked\n // So We set this flag that ignores the blur animation to avoid the flicker between focus out + focus in\n setShouldIgnoreBlurAnimation(true);\n }}\n onMouseUp={() => {\n // (Contd from above comment...) We set this flag back to false since blur of SelectInput is done calling by this time\n setShouldIgnoreBlurAnimation(false);\n }}\n data-value={props.value}\n data-index={props._index}\n selectionType={selectionType}\n color={props.intent}\n isKeydownPressed={isKeydownPressed}\n />\n );\n};\n\nconst ActionListItem = assignWithoutSideEffects(React.memo(_ActionListItem), {\n componentId: componentIds.ActionListItem,\n displayName: componentIds.ActionListItem,\n});\n\nexport type { ActionListItemProps, ActionListSectionProps };\nexport {\n ActionListItem,\n ActionListItemIcon,\n ActionListItemText,\n ActionListItemAvatar,\n ActionListItemBadge,\n ActionListItemBadgeGroup,\n ActionListSection,\n};\n"],"names":["StyledActionListSectionTitle","styled","BaseBox","withConfig","displayName","componentId","props","padding","makeSize","theme","spacing","_ActionListSection","_ref","title","children","testID","_hideDivider","_sectionChildValues","_useDropdown","useDropdown","hasAutoCompleteInBottomSheetHeader","dropdownTriggerer","filteredValues","hasAutoComplete","dropdownComponentIds","triggers","AutoComplete","isSectionVisible","React","useMemo","visibleActionListItemInSection","find","actionItemValue","includes","Boolean","showDividerInRN","isReactNative","showDividerInAutoComplete","length","_jsxs","_objectSpread","makeAccessible","role","getActionListSectionRole","label","metaAttribute","name","MetaConstants","ActionListSection","_jsx","hidden","Text","color","size","weight","undefined","Divider","marginX","marginY","assignWithoutSideEffects","componentIds","_ActionListItemIcon","_ref2","icon","Icon","_useBaseMenuItem","useBaseMenuItem","isDisabled","iconState","concat","ActionListItemIcon","_ActionListItemBadgeGroup","_ref3","Box","display","alignItems","flexDirection","ActionListItemBadgeGroup","_ActionListItemAvatar","avatarProps","Avatar","ActionListItemAvatar","_ActionListItemBadge","Badge","marginLeft","ActionListItemBadge","_ActionListItemText","_ref4","_useBaseMenuItem2","variant","getNormalTextColor","isMuted","ActionListItemText","makeActionListItemClickable","clickHandler","onPress","onClick","_ActionListItem","_useDropdown2","activeIndex","dropdownBaseId","onOptionClick","selectedIndices","setShouldIgnoreBlurAnimation","selectionType","isKeydownPressed","renderOnWebAs","href","getIsSelected","SelectInput","_index","isSelected","useEffect","validateActionListItemProps","leading","trailing","titleSuffix","intent","throwBladeError","message","moduleName","BaseMenuItem","isVisible","value","as","id","tabIndex","description","pointerEvents","Checkbox","isChecked","target","className","getActionListItemRole","e","_props$onClick","call","event","castWebType","ActionListItem","onMouseDown","onMouseUp","memo"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0FA,IAAMA,4BAA4B,gBAAGC,MAAM,CAACC,OAAO,CAAC,CAAAC,UAAA,CAAA;EAAAC,WAAA,EAAA,8CAAA;EAAAC,WAAA,EAAA,UAAA;AAAA,CAAA,CAAA,CAAC,UAACC,KAAK,EAAA;EAAA,OAAM;AAC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AA;OACnC;MACF,YAAYjG,EAAAA,KAAK,CAACqH,KAAM;MACxB,YAAYrH,EAAAA,KAAK,CAACwG,MAAO;AACzBN,MAAAA,aAAa,EAAEA,aAAc;MAC7BpD,KAAK,EAAE9C,KAAK,CAAC+G,MAAO;AACpBZ,MAAAA,gBAAgB,EAAEA,gBAAAA;KACnB,CAAA,CAAA;AAAC,IAAA;AAEN,CAAC,CAAA;AAEKkC,IAAAA,cAAc,gBAAGhF,wBAAwB,eAAC/B,cAAK,CAACkH,IAAI,CAAC7C,eAAe,CAAC,EAAE;EAC3E5F,WAAW,EAAEuD,YAAY,CAAC+E,cAAc;EACxCvI,WAAW,EAAEwD,YAAY,CAAC+E,cAAAA;AAC5B,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"ActionListItem.js","sources":["../../../../../../src/components/ActionList/ActionListItem.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/ban-ts-comment */\nimport React from 'react';\nimport styled from 'styled-components';\nimport type { TouchableOpacity } from 'react-native';\nimport { componentIds } from './componentIds';\nimport { validateActionListItemProps, getNormalTextColor } from './actionListUtils';\nimport { getActionListItemRole, getActionListSectionRole } from './getA11yRoles';\nimport { Divider } from '~components/Divider';\nimport BaseBox from '~components/Box/BaseBox';\nimport type { IconComponent } from '~components/Icons';\nimport { useDropdown } from '~components/Dropdown/useDropdown';\nimport type { FeedbackColors } from '~tokens/theme/theme';\nimport { Text } from '~components/Typography';\nimport type { Platform } from '~utils';\nimport { castWebType, isReactNative } from '~utils';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport type { DataAnalyticsAttribute, StringChildrenType, TestID } from '~utils/types';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { makeSize } from '~utils/makeSize';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { throwBladeError } from '~utils/logger';\nimport type { BadgeProps } from '~components/Badge';\nimport { Badge } from '~components/Badge';\nimport { Box } from '~components/Box';\nimport { dropdownComponentIds } from '~components/Dropdown/dropdownComponentIds';\nimport { BaseMenuItem, useBaseMenuItem } from '~components/BaseMenu';\nimport { Checkbox } from '~components/Checkbox';\nimport type { AvatarProps } from '~components/Avatar/types';\nimport { Avatar } from '~components/Avatar';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\n\ntype ActionListItemProps = {\n title: string;\n description?: string;\n onClick?: (clickProps: {\n name: string;\n value?: boolean;\n event: Platform.Select<{\n web: React.MouseEvent;\n native: React.TouchEvent<TouchableOpacity>;\n }>;\n }) => void;\n /**\n * value that you get from `onChange` event on SelectInput or in form submissions.\n */\n value: string;\n /**\n * Link to open when item is clicked.\n */\n href?: string;\n /**\n * HTML target of the link\n */\n target?: string;\n /**\n * Item that goes on left-side of item.\n *\n * Valid elements - `<ActionListItemIcon />`, `<ActionListItemAsset />`\n *\n * Will be overriden in multiselect\n */\n leading?: React.ReactNode;\n /**\n * Item that goes on right-side of item.\n *\n * Valid elements - `<ActionListItemText />`, `<ActionListItemIcon />`\n */\n trailing?: React.ReactNode;\n /**\n * Item that goes immediately next to the title.\n *\n * Valid elements - `<ActionListItemBadge />`, `<ActionListItemBadgeGroup />`\n *\n */\n titleSuffix?: React.ReactElement;\n isDisabled?: boolean;\n intent?: Extract<FeedbackColors, 'negative'>;\n /**\n * Can be used in combination of `onClick` to highlight item as selected in Button Triggers.\n *\n * When trigger is SelectInput, Use `value` prop on SelectInput instead to make dropdown controlled.\n */\n isSelected?: boolean;\n /**\n * Internally passed from ActionList. No need to pass it explicitly\n *\n * @private\n */\n _index?: number;\n} & TestID &\n DataAnalyticsAttribute;\n\nconst StyledActionListSectionTitle = styled(BaseBox)((props) => ({\n // @TODO: replace this styled-component with new layout box when we have padding shorthand\n padding: makeSize(props.theme.spacing[3]),\n}));\n\ntype ActionListSectionProps = {\n title: string;\n children: React.ReactNode[] | React.ReactNode;\n /**\n * Internally used to hide the divider on final item in React Native.\n *\n * Should not be used by consumers (also won't work on web)\n *\n * @private\n */\n _hideDivider?: boolean;\n /**\n * Internally used to hide / show section in AutoComplete\n *\n * @private\n */\n _sectionChildValues?: string[];\n} & TestID &\n DataAnalyticsAttribute;\nconst _ActionListSection = ({\n title,\n children,\n testID,\n _hideDivider,\n _sectionChildValues,\n ...rest\n}: ActionListSectionProps): React.ReactElement => {\n const { hasAutoCompleteInBottomSheetHeader, dropdownTriggerer, filteredValues } = useDropdown();\n const hasAutoComplete =\n hasAutoCompleteInBottomSheetHeader ||\n dropdownTriggerer === dropdownComponentIds.triggers.AutoComplete;\n\n const isSectionVisible = React.useMemo(() => {\n if (hasAutoComplete) {\n const visibleActionListItemInSection = _sectionChildValues?.find((actionItemValue) =>\n filteredValues.includes(actionItemValue),\n );\n\n return Boolean(visibleActionListItemInSection);\n }\n\n return true;\n }, [_sectionChildValues, hasAutoComplete, filteredValues]);\n\n const showDividerInRN = !(_hideDivider && isReactNative());\n const showDividerInAutoComplete = hasAutoComplete\n ? isSectionVisible && filteredValues.length > 1\n : true;\n\n return (\n <BaseBox\n {...makeAccessible({\n role: getActionListSectionRole(),\n label: title,\n })}\n {...metaAttribute({ name: MetaConstants.ActionListSection, testID })}\n {...makeAnalyticsAttribute(rest as Record<string, unknown>)}\n >\n {/* We're announcing title as group label so we can hide this */}\n {isSectionVisible ? (\n <StyledActionListSectionTitle {...makeAccessible({ hidden: true })}>\n <Text color=\"surface.text.gray.muted\" size=\"small\" weight=\"semibold\">\n {title}\n </Text>\n </StyledActionListSectionTitle>\n ) : null}\n <BaseBox\n {...makeAccessible({\n // On web, we just wrap it in another listbox to announce item count properly for particular group.\n // On React Native, we ignore it since `menu` + `group` role will take care of accessibility\n role: isReactNative() ? undefined : 'listbox',\n })}\n >\n {children}\n </BaseBox>\n {showDividerInAutoComplete && showDividerInRN ? (\n <Divider marginX=\"spacing.3\" marginY=\"spacing.1\" />\n ) : null}\n </BaseBox>\n );\n};\n\nconst ActionListSection = assignWithoutSideEffects(_ActionListSection, {\n componentId: componentIds.ActionListSection,\n});\n\nconst _ActionListItemIcon = ({ icon }: { icon: IconComponent }): React.ReactElement => {\n const Icon = icon;\n const { color, isDisabled } = useBaseMenuItem();\n const iconState = isDisabled ? 'disabled' : 'muted';\n return (\n <Icon\n color={\n color === 'negative'\n ? 'feedback.icon.negative.intense'\n : `interactive.icon.gray.${iconState}`\n }\n size=\"medium\"\n />\n );\n};\n\nconst ActionListItemIcon = assignWithoutSideEffects(_ActionListItemIcon, {\n componentId: componentIds.ActionListItemIcon,\n});\n\nconst _ActionListItemBadgeGroup = ({\n children,\n}: {\n children: React.ReactElement[] | React.ReactElement;\n}): React.ReactElement => {\n return (\n <Box display=\"flex\" alignItems=\"center\" flexDirection=\"row\">\n {children}\n </Box>\n );\n};\n\nconst ActionListItemBadgeGroup = assignWithoutSideEffects(_ActionListItemBadgeGroup, {\n componentId: componentIds.ActionListItemBadgeGroup,\n});\n\nconst _ActionListItemAvatar = (avatarProps: Omit<AvatarProps, 'size' | ''>): React.ReactElement => {\n return <Avatar size=\"xsmall\" {...avatarProps} />;\n};\n\nconst ActionListItemAvatar = assignWithoutSideEffects(_ActionListItemAvatar, {\n componentId: componentIds.ActionListItemAvatar,\n});\n\nconst _ActionListItemBadge = (props: BadgeProps): React.ReactElement => {\n return <Badge size=\"medium\" marginLeft=\"spacing.3\" {...props} />;\n};\n\nconst ActionListItemBadge = assignWithoutSideEffects(_ActionListItemBadge, {\n componentId: componentIds.ActionListItemBadge,\n});\n\nconst _ActionListItemText = ({\n children,\n}: {\n children: StringChildrenType;\n}): React.ReactElement => {\n const { isDisabled } = useBaseMenuItem();\n\n return (\n <Text variant=\"caption\" color={getNormalTextColor(isDisabled, { isMuted: true })}>\n {children}\n </Text>\n );\n};\n\nconst ActionListItemText = assignWithoutSideEffects(_ActionListItemText, {\n componentId: componentIds.ActionListItemText,\n});\n\ntype ClickHandlerType = (e: React.MouseEvent<HTMLButtonElement>) => void;\n\nconst makeActionListItemClickable = (\n clickHandler: ClickHandlerType,\n): { onPress?: (e: React.TouchEvent<TouchableOpacity>) => void; onClick?: ClickHandlerType } => {\n if (isReactNative()) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment, @typescript-eslint/prefer-ts-expect-error\n // @ts-ignore: ignoring ReactNative press type for the peace of mind\n return { onPress: clickHandler };\n }\n\n return {\n onClick: clickHandler,\n };\n};\n\n/**\n * ### ActionListItem\n *\n * Creates option inside `ActionList`.\n *\n * #### Usage\n *\n * ```jsx\n * <ActionList>\n * <ActionListItem\n * title=\"Home\"\n * value=\"home\"\n * leading={<ActionListItemIcon icon={HomeIcon} />}\n * trailing={<ActionListItemText>⌘ + S</ActionListItemText>}\n * />\n * </ActionList>\n * ```\n */\nconst _ActionListItem = (props: ActionListItemProps): React.ReactElement => {\n const {\n activeIndex,\n dropdownBaseId,\n onOptionClick,\n selectedIndices,\n setShouldIgnoreBlurAnimation,\n selectionType,\n dropdownTriggerer,\n isKeydownPressed,\n filteredValues,\n hasAutoCompleteInBottomSheetHeader,\n } = useDropdown();\n\n const hasAutoComplete =\n hasAutoCompleteInBottomSheetHeader ||\n dropdownTriggerer === dropdownComponentIds.triggers.AutoComplete;\n\n const renderOnWebAs = props.href ? 'a' : 'button';\n\n /**\n * In SelectInput, returns the isSelected according to selected indexes in the state\n *\n * In Other Triggers (Menu Usecase), returns `props.isSelected` since passing the\n * isSelected prop explicitly is the only way to select item in menu\n */\n const getIsSelected = (): boolean | undefined => {\n if (dropdownTriggerer === dropdownComponentIds.triggers.SelectInput || hasAutoComplete) {\n if (typeof props._index === 'number') {\n return selectedIndices.includes(props._index);\n }\n\n return undefined;\n }\n\n return props.isSelected;\n };\n\n const isSelected = getIsSelected();\n\n React.useEffect(() => {\n validateActionListItemProps({\n leading: props.leading,\n trailing: props.trailing,\n titleSuffix: props.titleSuffix,\n });\n }, [props.leading, props.trailing, props.titleSuffix]);\n\n React.useEffect(() => {\n if (__DEV__) {\n if (\n dropdownTriggerer === dropdownComponentIds.triggers.SelectInput &&\n props.intent === 'negative'\n ) {\n throwBladeError({\n message:\n 'negative intent ActionListItem cannot be used inside Dropdown with SelectInput trigger',\n moduleName: 'ActionListItem',\n });\n }\n }\n }, [props.intent, dropdownTriggerer]);\n\n return (\n // We use this context to change the color of subcomponents like ActionListItemIcon, ActionListItemText, etc\n <BaseMenuItem\n isVisible={hasAutoComplete && filteredValues ? filteredValues.includes(props.value) : true}\n as={!isReactNative() ? renderOnWebAs : undefined}\n id={`${dropdownBaseId}-${props._index}`}\n tabIndex={-1}\n title={props.title}\n description={props.description}\n leading={\n selectionType === 'multiple' ? (\n <BaseBox\n pointerEvents=\"none\"\n // Adding aria-hidden because the listbox item in multiselect in itself explains the behaviour so announcing checkbox is unneccesary and just a nice UI tweak for us\n {...makeAccessible({\n hidden: true,\n })}\n >\n <Checkbox isChecked={isSelected} tabIndex={-1} isDisabled={props.isDisabled}>\n {/* \n Checkbox requires children. Didn't want to make it optional because its helpful for consumers\n But for this case in particular, we just want to use Text separately so that we can control spacing and color and keep it consistent with non-multiselect dropdowns\n */}\n {null}\n </Checkbox>\n </BaseBox>\n ) : (\n props.leading\n )\n }\n trailing={props.trailing}\n titleSuffix={props.titleSuffix}\n href={props.href}\n target={props.target}\n className={activeIndex === props._index ? 'active-focus' : ''}\n isSelected={isSelected}\n isDisabled={props.isDisabled}\n role={getActionListItemRole(dropdownTriggerer, props.href)}\n {...makeActionListItemClickable((e: React.MouseEvent<HTMLButtonElement>): void => {\n if (typeof props._index === 'number') {\n onOptionClick(e, props._index);\n props.onClick?.({ name: props.value, value: isSelected, event: castWebType(e) });\n }\n })}\n {...makeAnalyticsAttribute({ ...props })}\n {...metaAttribute({ name: MetaConstants.ActionListItem, testID: props.testID })}\n onMouseDown={() => {\n // We want to keep focus on Dropdown's trigger while option is being clicked\n // So We set this flag that ignores the blur animation to avoid the flicker between focus out + focus in\n setShouldIgnoreBlurAnimation(true);\n }}\n onMouseUp={() => {\n // (Contd from above comment...) We set this flag back to false since blur of SelectInput is done calling by this time\n setShouldIgnoreBlurAnimation(false);\n }}\n data-value={props.value}\n data-index={props._index}\n selectionType={selectionType}\n color={props.intent}\n isKeydownPressed={isKeydownPressed}\n />\n );\n};\n\nconst ActionListItem = assignWithoutSideEffects(React.memo(_ActionListItem), {\n componentId: componentIds.ActionListItem,\n displayName: componentIds.ActionListItem,\n});\n\nexport type { ActionListItemProps, ActionListSectionProps };\nexport {\n ActionListItem,\n ActionListItemIcon,\n ActionListItemText,\n ActionListItemAvatar,\n ActionListItemBadge,\n ActionListItemBadgeGroup,\n ActionListSection,\n};\n"],"names":["StyledActionListSectionTitle","styled","BaseBox","withConfig","displayName","componentId","props","padding","makeSize","theme","spacing","_ActionListSection","_ref","title","children","testID","_hideDivider","_sectionChildValues","rest","_objectWithoutProperties","_excluded","_useDropdown","useDropdown","hasAutoCompleteInBottomSheetHeader","dropdownTriggerer","filteredValues","hasAutoComplete","dropdownComponentIds","triggers","AutoComplete","isSectionVisible","React","useMemo","visibleActionListItemInSection","find","actionItemValue","includes","Boolean","showDividerInRN","isReactNative","showDividerInAutoComplete","length","_jsxs","_objectSpread","makeAccessible","role","getActionListSectionRole","label","metaAttribute","name","MetaConstants","ActionListSection","makeAnalyticsAttribute","_jsx","hidden","Text","color","size","weight","undefined","Divider","marginX","marginY","assignWithoutSideEffects","componentIds","_ActionListItemIcon","_ref2","icon","Icon","_useBaseMenuItem","useBaseMenuItem","isDisabled","iconState","concat","ActionListItemIcon","_ActionListItemBadgeGroup","_ref3","Box","display","alignItems","flexDirection","ActionListItemBadgeGroup","_ActionListItemAvatar","avatarProps","Avatar","ActionListItemAvatar","_ActionListItemBadge","Badge","marginLeft","ActionListItemBadge","_ActionListItemText","_ref4","_useBaseMenuItem2","variant","getNormalTextColor","isMuted","ActionListItemText","makeActionListItemClickable","clickHandler","onPress","onClick","_ActionListItem","_useDropdown2","activeIndex","dropdownBaseId","onOptionClick","selectedIndices","setShouldIgnoreBlurAnimation","selectionType","isKeydownPressed","renderOnWebAs","href","getIsSelected","SelectInput","_index","isSelected","useEffect","validateActionListItemProps","leading","trailing","titleSuffix","intent","throwBladeError","message","moduleName","BaseMenuItem","isVisible","value","as","id","tabIndex","description","pointerEvents","Checkbox","isChecked","target","className","getActionListItemRole","e","_props$onClick","call","event","castWebType","ActionListItem","onMouseDown","onMouseUp","memo"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4FA,IAAMA,4BAA4B,gBAAGC,MAAM,CAACC,OAAO,CAAC,CAAAC,UAAA,CAAA;EAAAC,WAAA,EAAA,8CAAA;EAAAC,WAAA,EAAA,UAAA;AAAA,CAAA,CAAA,CAAC,UAACC,KAAK,EAAA;EAAA,OAAM;AAC/D;IACAC,OAAO,EAAEC,QAAQ,CAACF,KAAK,CAACG,KAAK,CAACC,OAAO,CAAC,CAAC,CAAC,CAAA;GACzC,CAAA;AAAA,CAAC,CAAC,CAAA;AAqBH,IAAMC,kBAAkB,GAAG,SAArBA,kBAAkBA,CAAAC,IAAA,EAO0B;AAAA,EAAA,IANhDC,KAAK,GAAAD,IAAA,CAALC,KAAK;IACLC,QAAQ,GAAAF,IAAA,CAARE,QAAQ;IACRC,MAAM,GAAAH,IAAA,CAANG,MAAM;IACNC,YAAY,GAAAJ,IAAA,CAAZI,YAAY;IACZC,mBAAmB,GAAAL,IAAA,CAAnBK,mBAAmB;AAChBC,IAAAA,IAAI,GAAAC,wBAAA,CAAAP,IAAA,EAAAQ,SAAA,CAAA,CAAA;AAEP,EAAA,IAAAC,YAAA,GAAkFC,WAAW,EAAE;IAAvFC,kCAAkC,GAAAF,YAAA,CAAlCE,kCAAkC;IAAEC,iBAAiB,GAAAH,YAAA,CAAjBG,iBAAiB;IAAEC,cAAc,GAAAJ,YAAA,CAAdI,cAAc,CAAA;EAC7E,IAAMC,eAAe,GACnBH,kCAAkC,IAClCC,iBAAiB,KAAKG,oBAAoB,CAACC,QAAQ,CAACC,YAAY,CAAA;AAElE,EAAA,IAAMC,gBAAgB,GAAGC,cAAK,CAACC,O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,CAAA,GAAbA,cAAA,CAAAC,IAAA,CAAAtI,KAAK,EAAW;UAAE2C,IAAI,EAAE3C,KAAK,CAACyH,KAAK;AAAEA,UAAAA,KAAK,EAAEZ,UAAU;UAAE0B,KAAK,EAAEC,WAAW,CAACJ,CAAC,CAAA;AAAE,SAAC,CAAC,CAAA;AAClF,OAAA;KACD,CAAC,CACEtF,EAAAA,sBAAsB,CAAAT,aAAA,CAAMrC,EAAAA,EAAAA,KAAK,CAAE,CAAC,CACpC0C,EAAAA,aAAa,CAAC;MAAEC,IAAI,EAAEC,aAAa,CAAC6F,cAAc;MAAEhI,MAAM,EAAET,KAAK,CAACS,MAAAA;AAAO,KAAC,CAAC,CAAA,EAAA,EAAA,EAAA;MAC/EiI,WAAW,EAAE,SAAAA,WAAAA,GAAM;AACjB;AACA;QACArC,4BAA4B,CAAC,IAAI,CAAC,CAAA;OAClC;MACFsC,SAAS,EAAE,SAAAA,SAAAA,GAAM;AACf;QACAtC,4BAA4B,CAAC,KAAK,CAAC,CAAA;OACnC;MACF,YAAYrG,EAAAA,KAAK,CAACyH,KAAM;MACxB,YAAYzH,EAAAA,KAAK,CAAC4G,MAAO;AACzBN,MAAAA,aAAa,EAAEA,aAAc;MAC7BpD,KAAK,EAAElD,KAAK,CAACmH,MAAO;AACpBZ,MAAAA,gBAAgB,EAAEA,gBAAAA;KACnB,CAAA,CAAA;AAAC,IAAA;AAEN,CAAC,CAAA;AAEKkC,IAAAA,cAAc,gBAAGhF,wBAAwB,eAAChC,cAAK,CAACmH,IAAI,CAAC7C,eAAe,CAAC,EAAE;EAC3EhG,WAAW,EAAE2D,YAAY,CAAC+E,cAAc;EACxC3I,WAAW,EAAE4D,YAAY,CAAC+E,cAAAA;AAC5B,CAAC;;;;"}
|
|
@@ -14,6 +14,7 @@ import '../Button/BaseButton/index.js';
|
|
|
14
14
|
import '../Link/BaseLink/index.js';
|
|
15
15
|
import '../BladeProvider/index.js';
|
|
16
16
|
import '../../utils/makeAccessible/index.js';
|
|
17
|
+
import '../../utils/makeAnalyticsAttribute/index.js';
|
|
17
18
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
18
19
|
import { getPlatformType } from '../../utils/getPlatformType/getPlatformType.js';
|
|
19
20
|
import { BaseBox } from '../Box/BaseBox/BaseBox.web.js';
|
|
@@ -33,6 +34,7 @@ import { makeAccessible } from '../../utils/makeAccessible/makeAccessible.web.js
|
|
|
33
34
|
import { metaAttribute } from '../../utils/metaAttribute/metaAttribute.web.js';
|
|
34
35
|
import { MetaConstants } from '../../utils/metaAttribute/metaConstants.js';
|
|
35
36
|
import { getStyledProps } from '../Box/styledProps/getStyledProps.js';
|
|
37
|
+
import { makeAnalyticsAttribute } from '../../utils/makeAnalyticsAttribute/makeAnalyticsAttribute.js';
|
|
36
38
|
|
|
37
39
|
var _excluded = ["description", "title", "isDismissible", "onDismiss", "emphasis", "isFullWidth", "color", "actions", "testID", "icon"];
|
|
38
40
|
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; }
|
|
@@ -63,7 +65,7 @@ var Alert = function Alert(_ref) {
|
|
|
63
65
|
actions = _ref.actions,
|
|
64
66
|
testID = _ref.testID,
|
|
65
67
|
icon = _ref.icon,
|
|
66
|
-
|
|
68
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
67
69
|
var _useTheme = useTheme(),
|
|
68
70
|
theme = _useTheme.theme;
|
|
69
71
|
var _useBreakpoint = useBreakpoint({
|
|
@@ -202,10 +204,10 @@ var Alert = function Alert(_ref) {
|
|
|
202
204
|
if (!isVisible) {
|
|
203
205
|
return null;
|
|
204
206
|
}
|
|
205
|
-
return /*#__PURE__*/jsx(BaseBox, _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, a11yProps), metaAttribute({
|
|
207
|
+
return /*#__PURE__*/jsx(BaseBox, _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, a11yProps), metaAttribute({
|
|
206
208
|
name: MetaConstants.Alert,
|
|
207
209
|
testID: testID
|
|
208
|
-
})), getStyledProps(
|
|
210
|
+
})), getStyledProps(rest)), makeAnalyticsAttribute(rest)), {}, {
|
|
209
211
|
children: /*#__PURE__*/jsxs(StyledAlert, {
|
|
210
212
|
color: color,
|
|
211
213
|
emphasis: emphasis,
|