@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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BottomNav.web.js","sources":["../../../../../../src/components/BottomNav/BottomNav.web.tsx"],"sourcesContent":["import React from 'react';\nimport styled from 'styled-components';\nimport type { BottomNavItemProps, BottomNavProps } from './types';\nimport BaseBox from '~components/Box/BaseBox';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport { Text } from '~components/Typography';\nimport { makeMotionTime, makeSpace } from '~utils';\nimport { componentZIndices } from '~utils/componentZIndices';\nimport { getFocusRingStyles } from '~utils/getFocusRingStyles';\nimport { throwBladeError } from '~utils/logger';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\n\n/**\n * ### BottomNav component\n *\n * Bottom navigation component is a persistent user interface element at the bottom of a mobile app screen, providing quick access to core functionalities through icons and labels.\n *\n * ---\n *\n * #### Usage\n *\n * ```jsx\n * import { NavLink } from 'react-router-dom';\n *\n * <BottomNav>\n * <BottomNavItem\n * as={NavLink}\n * isActive={true}\n * title=\"Payments\"\n * icon={WalletIcon}\n * href=\"/payments\"\n * />\n * <BottomNavItem\n * as={NavLink}\n * title=\"Transactions\"\n * icon={TransactionsIcon}\n * href=\"/transactions\"\n * />\n * <BottomNavItem\n * title=\"More\"\n * icon={MoreIcon}\n * onClick={() => {\n * // This can be used to open SideNav drawer\n * setIsSideNavOpen(true)\n * }}\n * />\n * </BottomNav>\n * ```\n *\n * Checkout {@link https://blade.razorpay.com/??path=/docs/components-bottomnav--doc BottomNav Documentation}\n\n */\nconst BottomNav = ({\n children,\n zIndex = componentZIndices.bottomNav,\n testID,\n ...styledProps\n}: BottomNavProps): React.ReactElement => {\n if (__DEV__) {\n const childrenCount = React.Children.count(children);\n if (childrenCount > 5 && childrenCount < 2) {\n throwBladeError({\n moduleName: 'BottomNav',\n message: 'children cannot be less than 2 and more than 5',\n });\n }\n }\n\n return (\n <BaseBox\n role=\"navigation\"\n position=\"fixed\"\n bottom=\"spacing.0\"\n left=\"spacing.0\"\n elevation=\"midRaised\"\n width=\"100%\"\n backgroundColor=\"surface.background.gray.intense\"\n borderTopWidth=\"thin\"\n borderTopColor=\"surface.border.gray.muted\"\n paddingX=\"spacing.2\"\n display=\"flex\"\n flexDirection=\"row\"\n {...getStyledProps(styledProps)}\n zIndex={zIndex}\n {...metaAttribute({\n testID,\n name: MetaConstants.BottomNav,\n })}\n >\n {children}\n </BaseBox>\n );\n};\n\nconst StyledBottomNavItem = styled(BaseBox)<{ to?: string }>((props) => {\n return {\n textDecoration: 'none',\n color: props.theme.colors.interactive.text.gray.subtle,\n backgroundColor: 'transparent',\n border: 'none',\n paddingLeft: makeSpace(props.theme.spacing[0]),\n paddingRight: makeSpace(props.theme.spacing[0]),\n transition: `color ${makeMotionTime(props.theme.motion.duration['2xquick'])} ${\n props.theme.motion.easing.standard.effective\n }`,\n '&[aria-current=\"page\"]': {\n color: props.theme.colors.interactive.text.primary.subtle,\n },\n '&:focus-visible': {\n ...getFocusRingStyles({ theme: props.theme }),\n },\n };\n});\n\nconst BottomNavItem = ({\n title,\n href,\n rel,\n target,\n as,\n isActive,\n onClick,\n icon: Icon,\n testID,\n}: BottomNavItemProps): React.ReactElement => {\n const isRouterLink = as && href;\n const defaultRenderElement = href ? 'a' : 'button';\n const defaultRel = target === '_blank' ? 'noreferrer noopener' : undefined;\n\n return (\n <StyledBottomNavItem\n as={isRouterLink ? as : defaultRenderElement}\n href={as ? undefined : href}\n to={href} // for react router\n rel={rel ?? defaultRel}\n target={target}\n paddingTop=\"spacing.5\"\n paddingBottom=\"spacing.4\"\n display=\"flex\"\n alignItems=\"center\"\n justifyContent=\"center\"\n flexDirection=\"column\"\n flex=\"1\"\n cursor=\"pointer\"\n onClick={onClick}\n gap=\"spacing.1\"\n {...makeAccessible({\n current: isActive ? 'page' : undefined,\n })}\n {...metaAttribute({\n name: MetaConstants.BottomNavItem,\n testID,\n })}\n >\n <Icon color=\"currentColor\" size=\"large\" />\n <Text truncateAfterLines={1} color=\"currentColor\" size=\"xsmall\" weight=\"semibold\">\n {title}\n </Text>\n </StyledBottomNavItem>\n );\n};\n\nexport { BottomNav, BottomNavItem };\n"],"names":["BottomNav","_ref","children","_ref$zIndex","zIndex","componentZIndices","bottomNav","testID","styledProps","_objectWithoutProperties","_excluded","childrenCount","React","Children","count","throwBladeError","moduleName","message","_jsx","BaseBox","_objectSpread","role","position","bottom","left","elevation","width","backgroundColor","borderTopWidth","borderTopColor","paddingX","display","flexDirection","getStyledProps","metaAttribute","name","MetaConstants","StyledBottomNavItem","styled","withConfig","displayName","componentId","props","textDecoration","color","theme","colors","interactive","text","gray","subtle","border","paddingLeft","makeSpace","spacing","paddingRight","transition","concat","makeMotionTime","motion","duration","easing","standard","effective","primary","getFocusRingStyles","BottomNavItem","_ref2","title","href","rel","target","as","isActive","onClick","Icon","icon","isRouterLink","defaultRenderElement","defaultRel","undefined","_jsxs","to","paddingTop","paddingBottom","alignItems","justifyContent","flex","cursor","gap","makeAccessible","current","size","Text","truncateAfterLines","weight"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqDA,IAAMA,SAAS,GAAG,SAAZA,SAASA,CAAAC,IAAA,EAK2B;AAAA,EAAA,IAJxCC,QAAQ,GAAAD,IAAA,CAARC,QAAQ;IAAAC,WAAA,GAAAF,IAAA,CACRG,MAAM;AAANA,IAAAA,MAAM,GAAAD,WAAA,KAAA,KAAA,CAAA,GAAGE,iBAAiB,CAACC,SAAS,GAAAH,WAAA;IACpCI,MAAM,GAAAN,IAAA,CAANM,MAAM;AACHC,IAAAA,WAAW,GAAAC,wBAAA,CAAAR,IAAA,EAAAS,SAAA,CAAA,CAAA;AAEd,EAAA,IAAI,KAAO,EAAE;IACX,IAAMC,aAAa,GAAGC,cAAK,CAACC,QAAQ,CAACC,KAAK,CAACZ,QAAQ,CAAC,CAAA;AACpD,IAAA,IAAIS,aAAa,GAAG,CAAC,IAAIA,aAAa,GAAG,CAAC,EAAE;AAC1CI,MAAAA,eAAe,CAAC;AACdC,QAAAA,UAAU,EAAE,WAAW;AACvBC,QAAAA,OAAO,EAAE,gDAAA;AACX,OAAC,CAA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AC,eAC1C1E,GAAA,CAAC2E,IAAI,EAAA;AAACC,MAAAA,kBAAkB,EAAE,CAAE;AAAClD,MAAAA,KAAK,EAAC,cAAc;AAACgD,MAAAA,IAAI,EAAC,QAAQ;AAACG,MAAAA,MAAM,EAAC,UAAU;AAAA7F,MAAAA,QAAA,EAC9EkE,KAAAA;AAAK,KACF,CAAC,CAAA;AAAA,GAAA,CACY,CAAC,CAAA;AAE1B;;;;"}
|
|
1
|
+
{"version":3,"file":"BottomNav.web.js","sources":["../../../../../../src/components/BottomNav/BottomNav.web.tsx"],"sourcesContent":["import React from 'react';\nimport styled from 'styled-components';\nimport type { BottomNavItemProps, BottomNavProps } from './types';\nimport BaseBox from '~components/Box/BaseBox';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport { Text } from '~components/Typography';\nimport { makeMotionTime, makeSpace } from '~utils';\nimport { componentZIndices } from '~utils/componentZIndices';\nimport { getFocusRingStyles } from '~utils/getFocusRingStyles';\nimport { throwBladeError } from '~utils/logger';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\n\n/**\n * ### BottomNav component\n *\n * Bottom navigation component is a persistent user interface element at the bottom of a mobile app screen, providing quick access to core functionalities through icons and labels.\n *\n * ---\n *\n * #### Usage\n *\n * ```jsx\n * import { NavLink } from 'react-router-dom';\n *\n * <BottomNav>\n * <BottomNavItem\n * as={NavLink}\n * isActive={true}\n * title=\"Payments\"\n * icon={WalletIcon}\n * href=\"/payments\"\n * />\n * <BottomNavItem\n * as={NavLink}\n * title=\"Transactions\"\n * icon={TransactionsIcon}\n * href=\"/transactions\"\n * />\n * <BottomNavItem\n * title=\"More\"\n * icon={MoreIcon}\n * onClick={() => {\n * // This can be used to open SideNav drawer\n * setIsSideNavOpen(true)\n * }}\n * />\n * </BottomNav>\n * ```\n *\n * Checkout {@link https://blade.razorpay.com/??path=/docs/components-bottomnav--doc BottomNav Documentation}\n\n */\nconst BottomNav = ({\n children,\n zIndex = componentZIndices.bottomNav,\n testID,\n ...rest\n}: BottomNavProps): React.ReactElement => {\n if (__DEV__) {\n const childrenCount = React.Children.count(children);\n if (childrenCount > 5 && childrenCount < 2) {\n throwBladeError({\n moduleName: 'BottomNav',\n message: 'children cannot be less than 2 and more than 5',\n });\n }\n }\n\n return (\n <BaseBox\n role=\"navigation\"\n position=\"fixed\"\n bottom=\"spacing.0\"\n left=\"spacing.0\"\n elevation=\"midRaised\"\n width=\"100%\"\n backgroundColor=\"surface.background.gray.intense\"\n borderTopWidth=\"thin\"\n borderTopColor=\"surface.border.gray.muted\"\n paddingX=\"spacing.2\"\n display=\"flex\"\n flexDirection=\"row\"\n {...getStyledProps(rest)}\n zIndex={zIndex}\n {...metaAttribute({\n testID,\n name: MetaConstants.BottomNav,\n })}\n {...makeAnalyticsAttribute(rest)}\n >\n {children}\n </BaseBox>\n );\n};\n\nconst StyledBottomNavItem = styled(BaseBox)<{ to?: string }>((props) => {\n return {\n textDecoration: 'none',\n color: props.theme.colors.interactive.text.gray.subtle,\n backgroundColor: 'transparent',\n border: 'none',\n paddingLeft: makeSpace(props.theme.spacing[0]),\n paddingRight: makeSpace(props.theme.spacing[0]),\n transition: `color ${makeMotionTime(props.theme.motion.duration['2xquick'])} ${\n props.theme.motion.easing.standard.effective\n }`,\n '&[aria-current=\"page\"]': {\n color: props.theme.colors.interactive.text.primary.subtle,\n },\n '&:focus-visible': {\n ...getFocusRingStyles({ theme: props.theme }),\n },\n };\n});\n\nconst BottomNavItem = ({\n title,\n href,\n rel,\n target,\n as,\n isActive,\n onClick,\n icon: Icon,\n testID,\n ...rest\n}: BottomNavItemProps): React.ReactElement => {\n const isRouterLink = as && href;\n const defaultRenderElement = href ? 'a' : 'button';\n const defaultRel = target === '_blank' ? 'noreferrer noopener' : undefined;\n\n return (\n <StyledBottomNavItem\n as={isRouterLink ? as : defaultRenderElement}\n href={as ? undefined : href}\n to={href} // for react router\n rel={rel ?? defaultRel}\n target={target}\n paddingTop=\"spacing.5\"\n paddingBottom=\"spacing.4\"\n display=\"flex\"\n alignItems=\"center\"\n justifyContent=\"center\"\n flexDirection=\"column\"\n flex=\"1\"\n cursor=\"pointer\"\n onClick={onClick}\n gap=\"spacing.1\"\n {...makeAccessible({\n current: isActive ? 'page' : undefined,\n })}\n {...metaAttribute({\n name: MetaConstants.BottomNavItem,\n testID,\n })}\n {...makeAnalyticsAttribute(rest)}\n >\n <Icon color=\"currentColor\" size=\"large\" />\n <Text truncateAfterLines={1} color=\"currentColor\" size=\"xsmall\" weight=\"semibold\">\n {title}\n </Text>\n </StyledBottomNavItem>\n );\n};\n\nexport { BottomNav, BottomNavItem };\n"],"names":["BottomNav","_ref","children","_ref$zIndex","zIndex","componentZIndices","bottomNav","testID","rest","_objectWithoutProperties","_excluded","childrenCount","React","Children","count","throwBladeError","moduleName","message","_jsx","BaseBox","_objectSpread","role","position","bottom","left","elevation","width","backgroundColor","borderTopWidth","borderTopColor","paddingX","display","flexDirection","getStyledProps","metaAttribute","name","MetaConstants","makeAnalyticsAttribute","StyledBottomNavItem","styled","withConfig","displayName","componentId","props","textDecoration","color","theme","colors","interactive","text","gray","subtle","border","paddingLeft","makeSpace","spacing","paddingRight","transition","concat","makeMotionTime","motion","duration","easing","standard","effective","primary","getFocusRingStyles","BottomNavItem","_ref2","title","href","rel","target","as","isActive","onClick","Icon","icon","_excluded2","isRouterLink","defaultRenderElement","defaultRel","undefined","_jsxs","to","paddingTop","paddingBottom","alignItems","justifyContent","flex","cursor","gap","makeAccessible","current","size","Text","truncateAfterLines","weight"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsDA,IAAMA,SAAS,GAAG,SAAZA,SAASA,CAAAC,IAAA,EAK2B;AAAA,EAAA,IAJxCC,QAAQ,GAAAD,IAAA,CAARC,QAAQ;IAAAC,WAAA,GAAAF,IAAA,CACRG,MAAM;AAANA,IAAAA,MAAM,GAAAD,WA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,EAAC,QAAQ;AACnBC,IAAAA,cAAc,EAAC,QAAQ;AACvBxD,IAAAA,aAAa,EAAC,QAAQ;AACtByD,IAAAA,IAAI,EAAC,GAAG;AACRC,IAAAA,MAAM,EAAC,SAAS;AAChBf,IAAAA,OAAO,EAAEA,OAAQ;AACjBgB,IAAAA,GAAG,EAAC,WAAA;AAAW,GAAA,EACXC,cAAc,CAAC;AACjBC,IAAAA,OAAO,EAAEnB,QAAQ,GAAG,MAAM,GAAGQ,SAAAA;GAC9B,CAAC,CACEhD,EAAAA,aAAa,CAAC;IAChBC,IAAI,EAAEC,aAAa,CAAC+B,aAAa;AACjC5D,IAAAA,MAAM,EAANA,MAAAA;AACF,GAAC,CAAC,CAAA,EACE8B,sBAAsB,CAAC7B,IAAI,CAAC,CAAA,EAAA,EAAA,EAAA;IAAAN,QAAA,EAAA,cAEhCgB,GAAA,CAAC0D,IAAI,EAAA;AAAC/B,MAAAA,KAAK,EAAC,cAAc;AAACiD,MAAAA,IAAI,EAAC,OAAA;AAAO,KAAE,CAAC,eAC1C5E,GAAA,CAAC6E,IAAI,EAAA;AAACC,MAAAA,kBAAkB,EAAE,CAAE;AAACnD,MAAAA,KAAK,EAAC,cAAc;AAACiD,MAAAA,IAAI,EAAC,QAAQ;AAACG,MAAAA,MAAM,EAAC,UAAU;AAAA/F,MAAAA,QAAA,EAC9EmE,KAAAA;AAAK,KACF,CAAC,CAAA;AAAA,GAAA,CACY,CAAC,CAAA;AAE1B;;;;"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
2
2
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
3
|
+
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
3
4
|
import React__default from 'react';
|
|
4
5
|
import styled from 'styled-components';
|
|
5
6
|
import { useDrag, rubberbandIfOutOfBounds } from '@use-gesture/react';
|
|
@@ -27,6 +28,7 @@ import '../../utils/makeAccessible/index.js';
|
|
|
27
28
|
import '../../tokens/global/index.js';
|
|
28
29
|
import '../../utils/makeMotionTime/index.web.js';
|
|
29
30
|
import { componentZIndices } from '../../utils/componentZIndices.js';
|
|
31
|
+
import '../../utils/makeAnalyticsAttribute/index.js';
|
|
30
32
|
import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
31
33
|
import { makeSize } from '../../utils/makeSize/makeSize.js';
|
|
32
34
|
import { size } from '../../tokens/global/size.js';
|
|
@@ -35,9 +37,11 @@ import useTheme from '../BladeProvider/useTheme.js';
|
|
|
35
37
|
import { metaAttribute } from '../../utils/metaAttribute/metaAttribute.web.js';
|
|
36
38
|
import { MetaConstants } from '../../utils/metaAttribute/metaConstants.js';
|
|
37
39
|
import { makeAccessible } from '../../utils/makeAccessible/makeAccessible.web.js';
|
|
40
|
+
import { makeAnalyticsAttribute } from '../../utils/makeAnalyticsAttribute/makeAnalyticsAttribute.js';
|
|
38
41
|
import { BaseBox } from '../Box/BaseBox/BaseBox.web.js';
|
|
39
42
|
import { assignWithoutSideEffects } from '../../utils/assignWithoutSideEffects/assignWithoutSideEffects.js';
|
|
40
43
|
|
|
44
|
+
var _excluded = ["isOpen", "onDismiss", "children", "initialFocusRef", "snapPoints", "zIndex"];
|
|
41
45
|
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; }
|
|
42
46
|
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; }
|
|
43
47
|
var BOTTOM_SHEET_EASING = 'cubic-bezier(.15,0,.24,.97)';
|
|
@@ -82,7 +86,8 @@ var _BottomSheet = function _BottomSheet(_ref2) {
|
|
|
82
86
|
_ref2$snapPoints = _ref2.snapPoints,
|
|
83
87
|
snapPoints = _ref2$snapPoints === void 0 ? [0.35, 0.5, 0.85] : _ref2$snapPoints,
|
|
84
88
|
_ref2$zIndex = _ref2.zIndex,
|
|
85
|
-
zIndex = _ref2$zIndex === void 0 ? componentZIndices.bottomSheet : _ref2$zIndex
|
|
89
|
+
zIndex = _ref2$zIndex === void 0 ? componentZIndices.bottomSheet : _ref2$zIndex,
|
|
90
|
+
dataAnalyticsProps = _objectWithoutProperties(_ref2, _excluded);
|
|
86
91
|
var _useTheme = useTheme(),
|
|
87
92
|
theme = _useTheme.theme;
|
|
88
93
|
var dimensions = useWindowSize();
|
|
@@ -450,7 +455,7 @@ var _BottomSheet = function _BottomSheet(_ref2) {
|
|
|
450
455
|
value: contextValue,
|
|
451
456
|
children: [/*#__PURE__*/jsx(BottomSheetBackdrop, {
|
|
452
457
|
zIndex: bottomSheetZIndex
|
|
453
|
-
}), /*#__PURE__*/jsx(BottomSheetSurface, _objectSpread(_objectSpread(_objectSpread({}, metaAttribute({
|
|
458
|
+
}), /*#__PURE__*/jsx(BottomSheetSurface, _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, metaAttribute({
|
|
454
459
|
name: MetaConstants.BottomSheet,
|
|
455
460
|
testID: 'bottomsheet-surface'
|
|
456
461
|
})), makeAccessible({
|
|
@@ -466,7 +471,8 @@ var _BottomSheet = function _BottomSheet(_ref2) {
|
|
|
466
471
|
bottom: 0,
|
|
467
472
|
top: 'auto',
|
|
468
473
|
zIndex: bottomSheetZIndex
|
|
469
|
-
}
|
|
474
|
+
}
|
|
475
|
+
}, makeAnalyticsAttribute(dataAnalyticsProps)), {}, {
|
|
470
476
|
children: /*#__PURE__*/jsxs(BaseBox, {
|
|
471
477
|
height: "100%",
|
|
472
478
|
display: "flex",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BottomSheet.web.js","sources":["../../../../../../src/components/BottomSheet/BottomSheet.web.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable react/jsx-no-useless-fragment */\n/* eslint-disable consistent-return */\n/* eslint-disable @typescript-eslint/explicit-function-return-type */\nimport React from 'react';\nimport styled from 'styled-components';\nimport { rubberbandIfOutOfBounds, useDrag } from '@use-gesture/react';\nimport usePresence from 'use-presence';\nimport { clearAllBodyScrollLocks } from 'body-scroll-lock-upgrade';\nimport { BottomSheetHeader } from './BottomSheetHeader';\nimport { BottomSheetFooter } from './BottomSheetFooter';\nimport { BottomSheetBody } from './BottomSheetBody';\nimport type { SnapPoints } from './utils';\nimport { computeMaxContent, computeSnapPointBounds } from './utils';\nimport { BottomSheetBackdrop } from './BottomSheetBackdrop';\nimport type { BottomSheetContextProps } from './BottomSheetContext';\nimport { BottomSheetContext, useBottomSheetAndDropdownGlue } from './BottomSheetContext';\nimport { ComponentIds } from './componentIds';\nimport type { BottomSheetProps } from './types';\nimport { BottomSheetGrabHandle } from './BottomSheetGrabHandle';\nimport { useBottomSheetStack } from './BottomSheetStack';\nimport BaseBox from '~components/Box/BaseBox';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { useScrollLock } from '~utils/useScrollLock';\nimport { useWindowSize } from '~utils/useWindowSize';\nimport { useIsomorphicLayoutEffect } from '~utils/useIsomorphicLayoutEffect';\nimport { useTheme } from '~components/BladeProvider';\nimport { useId } from '~utils/useId';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { makeSize } from '~utils/makeSize';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { size } from '~tokens/global';\nimport { makeMotionTime } from '~utils/makeMotionTime';\nimport { componentZIndices } from '~utils/componentZIndices';\n\nexport const BOTTOM_SHEET_EASING = 'cubic-bezier(.15,0,.24,.97)';\nconst AUTOCOMPLETE_DEFAULT_SNAPPOINT = 0.85;\n\nconst BottomSheetSurface = styled.div<{\n windowHeight: number;\n isDragging: boolean;\n}>(({ theme, windowHeight, isDragging }) => {\n return {\n background: theme.colors.popup.background.subtle,\n borderTopLeftRadius: makeSize(size[16]),\n borderTopRightRadius: makeSize(size[16]),\n borderColor: theme.colors.popup.border.subtle,\n // this is reverse top elevation of highRaised elevation token\n boxShadow: '0px -24px 48px -12px hsla(217, 56%, 17%, 0.18)',\n opacity: 0,\n pointerEvents: 'none',\n transitionDuration: isDragging\n ? undefined\n : `${makeMotionTime(theme.motion.duration.moderate)}`,\n transitionTimingFunction: BOTTOM_SHEET_EASING,\n willChange: 'transform, opacity, height',\n transitionProperty: 'transform, opacity, height',\n position: 'fixed',\n left: 0,\n right: 0,\n bottom: 0,\n top: windowHeight,\n backgroundColor: theme.colors.popup.background.subtle,\n justifyContent: 'center',\n alignItems: 'center',\n touchAction: 'none',\n overflow: 'hidden',\n };\n});\n\nconst _BottomSheet = ({\n isOpen,\n onDismiss,\n children,\n initialFocusRef,\n snapPoints = [0.35, 0.5, 0.85],\n zIndex = componentZIndices.bottomSheet,\n}: BottomSheetProps): React.ReactElement => {\n const { theme } = useTheme();\n const dimensions = useWindowSize();\n const [contentHeight, setContentHeight] = React.useState(0);\n const [headerHeight, setHeaderHeight] = React.useState(0);\n const [footerHeight, setFooterHeight] = React.useState(0);\n const [grabHandleHeight, setGrabHandleHeight] = React.useState(0);\n const [hasBodyPadding, setHasBodyPadding] = React.useState(true);\n const [isHeaderEmpty, setIsHeaderEmpty] = React.useState(false);\n\n const bottomSheetAndDropdownGlue = useBottomSheetAndDropdownGlue();\n const [positionY, _setPositionY] = React.useState(0);\n const _isOpen = isOpen ?? bottomSheetAndDropdownGlue?.isOpen;\n const [isDragging, setIsDragging] = React.useState(false);\n\n const preventScrollingRef = React.useRef(true);\n const scrollRef = React.useRef<HTMLDivElement>(null);\n const grabHandleRef = React.useRef<HTMLDivElement>(null);\n const defaultInitialFocusRef = React.useRef<any>(null);\n const originalFocusElement = React.useRef<HTMLElement | null>(null);\n const initialSnapPoint = React.useRef<number>(snapPoints[1]);\n const totalHeight = React.useMemo(() => {\n return grabHandleHeight + headerHeight + footerHeight + contentHeight;\n }, [contentHeight, footerHeight, grabHandleHeight, headerHeight]);\n\n const id = useId();\n const {\n stack,\n addBottomSheetToStack,\n removeBottomSheetFromStack,\n getTopOfTheStack,\n getCurrentStackIndexById,\n } = useBottomSheetStack();\n const currentStackIndex = getCurrentStackIndexById(id);\n const isOnTopOfStack = getTopOfTheStack() === id;\n const bottomSheetZIndex = zIndex - currentStackIndex;\n\n const setPositionY = React.useCallback(\n (value: number, limit = true) => {\n // In AutoComplete, we want BottomSheet to be docked to top snappoint so we remove the limits\n const shouldLimitPositionY =\n limit && !bottomSheetAndDropdownGlue?.hasAutoCompleteInBottomSheetHeader;\n\n const maxValue = computeMaxContent({\n contentHeight,\n footerHeight,\n headerHeight: headerHeight + grabHandleHeight,\n maxHeight: value,\n });\n _setPositionY(shouldLimitPositionY ? maxValue : value);\n },\n [\n bottomSheetAndDropdownGlue?.hasAutoCompleteInBottomSheetHeader,\n contentHeight,\n footerHeight,\n grabHandleHeight,\n headerHeight,\n ],\n );\n\n // locks the body scroll to prevent accidental scrolling of content when we drag the sheet\n // We are ready when we calculated the height of the content\n const isReady = contentHeight > 0;\n // only lock the body when we atleast have 1 bottomsheet open\n const shouldLock = isReady && stack.length > 0;\n const scrollLockRef = useScrollLock({\n enabled: shouldLock,\n targetRef: scrollRef,\n reserveScrollBarGap: true,\n });\n\n // clear all body locks to avoid memory leaks & accidental body locking\n React.useEffect(() => {\n const hasNoBottomSheets = stack.length < 1;\n if (hasNoBottomSheets) {\n clearAllBodyScrollLocks();\n }\n }, [stack]);\n\n // take the grabHandle's height into headerHeight too\n useIsomorphicLayoutEffect(() => {\n if (!grabHandleRef.current) return;\n setGrabHandleHeight(grabHandleRef.current.getBoundingClientRect().height);\n }, [grabHandleRef.current, _isOpen]);\n\n // if bottomSheet height is >35% & <50% then set initial snapPoint to 35%\n useIsomorphicLayoutEffect(() => {\n if (bottomSheetAndDropdownGlue?.hasAutoCompleteInBottomSheetHeader) {\n initialSnapPoint.current = AUTOCOMPLETE_DEFAULT_SNAPPOINT;\n } else {\n const middleSnapPoint = snapPoints[1] * dimensions.height;\n const lowerSnapPoint = snapPoints[0] * dimensions.height;\n if (totalHeight > lowerSnapPoint && totalHeight < middleSnapPoint) {\n initialSnapPoint.current = snapPoints[0];\n }\n }\n }, [dimensions.height, snapPoints, totalHeight]);\n\n const returnFocus = React.useCallback(() => {\n if (!originalFocusElement.current) return;\n originalFocusElement.current.focus();\n // After returning focus we will clear the original focus\n // Because if sheet can be opened up via multiple triggers\n // We want to ensure the focus returns back to the most recent triggerer\n originalFocusElement.current = null;\n }, [originalFocusElement]);\n\n const focusOnInitialRef = React.useCallback(() => {\n if (!initialFocusRef) {\n // focus on close button\n defaultInitialFocusRef.current?.focus();\n } else {\n // focus on the initialRef passed by the user\n initialFocusRef.current?.focus();\n }\n }, [initialFocusRef]);\n\n // focus on the initial ref when the sheet is opened\n React.useLayoutEffect(() => {\n if (_isOpen) {\n focusOnInitialRef();\n }\n }, [_isOpen, focusOnInitialRef]);\n\n const handleOnOpen = React.useCallback(() => {\n setPositionY(dimensions.height * initialSnapPoint.current);\n scrollLockRef.current.activate();\n // initialize the original focused element\n // On first render it will be the activeElement, eg: the button trigger or select input\n // On Subsequent open operations it won't further update the original focus\n originalFocusElement.current =\n originalFocusElement.current ?? (document.activeElement as HTMLElement);\n }, [dimensions.height, scrollLockRef, setPositionY]);\n\n const handleOnClose = React.useCallback(() => {\n setPositionY(0);\n }, [setPositionY]);\n\n const close = React.useCallback(() => {\n onDismiss?.();\n bottomSheetAndDropdownGlue?.onBottomSheetDismiss();\n returnFocus();\n }, [bottomSheetAndDropdownGlue, onDismiss, returnFocus]);\n\n // sync controlled state to our actions\n React.useEffect(() => {\n if (_isOpen) {\n // open on the next frame, otherwise the animations will not run on first render\n window.setTimeout(() => {\n handleOnOpen();\n });\n } else {\n handleOnClose();\n }\n }, [_isOpen, handleOnClose, handleOnOpen]);\n\n // let the Dropdown component know that it's rendering a bottomsheet\n React.useEffect(() => {\n if (!bottomSheetAndDropdownGlue) return;\n bottomSheetAndDropdownGlue.setDropdownHasBottomSheet(true);\n }, [bottomSheetAndDropdownGlue]);\n\n const bind = useDrag(\n ({\n active,\n last,\n cancel,\n tap,\n movement: [_movementX, movementY],\n velocity: [_velocityX, velocityY],\n lastOffset: [_, lastOffsetY],\n down,\n dragging,\n args: [{ isContentDragging = false } = {}] = [],\n }) => {\n setIsDragging(Boolean(dragging));\n // lastOffsetY is the previous position user stopped dragging the sheet\n // movementY is the drag amount from the bottom of the screen, so as you drag up the movementY goes into negatives\n // and rawY is the calculated offset from the last position of the bottomsheet to current drag amount.\n const rawY = lastOffsetY - movementY;\n\n const lowerSnapPoint = dimensions.height * snapPoints[0];\n const upperSnapPoint = dimensions.height * snapPoints[snapPoints.length - 1];\n\n // predictedY is used to create velocity driven swipe\n // the faster you swipe the more distance you cover\n // this enables users to reach upper & lower snappoint with a single swipe\n const predictedDistance = movementY * (velocityY / 2);\n const predictedY = Math.max(\n lowerSnapPoint,\n Math.min(upperSnapPoint, rawY - predictedDistance * 2),\n );\n\n let newY = rawY;\n\n if (down) {\n // Ensure that users aren't able to drag the sheet\n // more than the upperSnapPoint or maximum height of the sheet\n // this is basically a clamp() function but creates a nice rubberband effect\n const dampening = 0.55;\n if (totalHeight < upperSnapPoint) {\n newY = rubberbandIfOutOfBounds(rawY, 0, totalHeight, dampening);\n } else {\n newY = rubberbandIfOutOfBounds(rawY, 0, upperSnapPoint, dampening);\n }\n } else {\n newY = predictedY;\n }\n\n const isPosAtUpperSnapPoint = newY >= upperSnapPoint;\n\n if (isContentDragging) {\n if (isPosAtUpperSnapPoint) {\n newY = upperSnapPoint;\n }\n\n // keep the newY at upper snap point\n // until the scrollable content is not at top\n // and previously saved Y position is greater than or equal to upper snap point\n // Note: how using newY won't work here since we need the previous value of the newY\n // since we always keep updating the newY,\n // this is cruicial in making the scroll feel natural\n const isContentScrolledAtTop = scrollRef.current && scrollRef.current.scrollTop <= 0;\n if (lastOffsetY === upperSnapPoint && !isContentScrolledAtTop) {\n newY = upperSnapPoint;\n }\n preventScrollingRef.current = newY < upperSnapPoint;\n }\n\n if (last) {\n // calculate the nearest snapPoint\n const [nearest, lower] = computeSnapPointBounds(\n newY,\n snapPoints.map((point) => dimensions.height * point) as SnapPoints,\n );\n\n // This ensure that the lower snapPoint will always have atleast some buffer\n // When the bottomsheet total height is less than the lower snapPoint\n // Video walkthrough: https://www.loom.com/share/a9a8db7688d64194b13df8b3e25859ae\n const lowerPointBuffer = 60;\n const lowerestSnap = Math.min(lower, totalHeight) - lowerPointBuffer;\n\n const shouldClose = rawY < lowerestSnap;\n if (shouldClose) {\n setIsDragging(false);\n cancel();\n close();\n return;\n }\n\n // if we stop dragging assign snap to the nearest point\n if (!active && !tap) {\n newY = nearest;\n }\n }\n\n setPositionY(newY, !down);\n },\n {\n from: [0, positionY],\n filterTaps: true,\n enabled: isOnTopOfStack && _isOpen,\n },\n );\n\n // Here we are preventing the scrolling of the content, until the preventScrollingRef value is true\n useIsomorphicLayoutEffect(() => {\n const scrollElement = scrollRef.current;\n if (!scrollElement) return;\n\n const preventScrolling = (e: Event) => {\n if (preventScrollingRef?.current) {\n e.preventDefault();\n }\n };\n\n // https://www.bram.us/2016/05/02/prevent-overscroll-bounce-in-ios-mobilesafari-pure-css/\n const preventSafariOverscroll = (e: Event) => {\n if (scrollElement.scrollTop < 0) {\n // TODO: figure this out, it doesn't seem to work >iOS12\n // requestAnimationFrame(() => {\n // elem.style.overflow = 'hidden';\n // elem.scrollTop = 0;\n // elem.style.removeProperty('overflow');\n // });\n e.preventDefault();\n }\n };\n\n scrollElement.addEventListener('scroll', preventScrolling);\n scrollElement.addEventListener('touchmove', preventScrolling);\n scrollElement.addEventListener('touchstart', preventSafariOverscroll);\n return () => {\n scrollElement.removeEventListener('scroll', preventScrolling);\n scrollElement.removeEventListener('touchmove', preventScrolling);\n scrollElement.removeEventListener('touchstart', preventSafariOverscroll);\n };\n // Only run this hook when we know all the layout calculations are done,\n // Otherwise the scrollRef.current will be null.\n // isReady prop will ensure that we are done measuring the content height\n }, [isReady]);\n\n // usePresence hook waits for the animation to finish before unmounting the component\n // It's similar to framer-motions usePresence hook\n // https://www.framer.com/docs/animate-presence/#usepresence\n const { isMounted, isVisible } = usePresence(Boolean(_isOpen), {\n transitionDuration: theme.motion.duration.moderate,\n });\n\n const isHeaderFloating = !hasBodyPadding && isHeaderEmpty;\n const contextValue: BottomSheetContextProps = React.useMemo(\n () => ({\n isInBottomSheet: true,\n isOpen: Boolean(isVisible),\n close,\n positionY,\n headerHeight,\n contentHeight,\n footerHeight,\n setContentHeight,\n setFooterHeight,\n setHeaderHeight,\n setHasBodyPadding,\n setIsHeaderEmpty,\n scrollRef,\n bind,\n defaultInitialFocusRef,\n isHeaderFloating,\n }),\n [\n isVisible,\n close,\n positionY,\n headerHeight,\n contentHeight,\n footerHeight,\n setContentHeight,\n setFooterHeight,\n setHeaderHeight,\n setHasBodyPadding,\n setIsHeaderEmpty,\n scrollRef,\n bind,\n defaultInitialFocusRef,\n isHeaderFloating,\n ],\n );\n\n React.useEffect(() => {\n if (isMounted) {\n addBottomSheetToStack(id);\n } else {\n removeBottomSheetFromStack(id);\n }\n }, [addBottomSheetToStack, id, isMounted, removeBottomSheetFromStack]);\n\n // We will need to reset these values otherwise the next time the bottomsheet opens\n // this will be populated and the animations won't run\n // why?: because how the usePresence hook works, we actually just unmount the\n // html contents not the whole <BottomSheet /> react component\n React.useEffect(() => {\n if (!isMounted) {\n setHeaderHeight(0);\n setFooterHeight(0);\n setContentHeight(0);\n setGrabHandleHeight(0);\n _setPositionY(0);\n }\n }, [isMounted, scrollLockRef]);\n\n // We don't want to destroy the react tree when we are rendering inside Dropdown\n // Because if we bail out early then ActionList won't render,\n // and Dropdown manages it's state based on the rendered JSX of ActionList\n // If we don't render ActionList Dropdown state will reset each time we open/close BottomSheet\n const isInsideDropdown = Boolean(bottomSheetAndDropdownGlue);\n if (!isMounted && !isInsideDropdown) {\n return <></>;\n }\n\n return (\n <BottomSheetContext.Provider value={contextValue}>\n <BottomSheetBackdrop zIndex={bottomSheetZIndex} />\n <BottomSheetSurface\n {...metaAttribute({\n name: MetaConstants.BottomSheet,\n testID: 'bottomsheet-surface',\n })}\n {...makeAccessible({ modal: true, role: 'dialog' })}\n windowHeight={dimensions.height}\n isDragging={isDragging}\n style={{\n opacity: isVisible ? 1 : 0,\n pointerEvents: isVisible ? 'all' : 'none',\n height: positionY,\n bottom: 0,\n top: 'auto',\n zIndex: bottomSheetZIndex,\n }}\n >\n <BaseBox height=\"100%\" display=\"flex\" flexDirection=\"column\">\n <BottomSheetGrabHandle\n ref={grabHandleRef}\n isHeaderFloating={isHeaderFloating}\n {...metaAttribute({ name: ComponentIds.BottomSheetGrabHandle })}\n {...bind()}\n />\n {children}\n </BaseBox>\n </BottomSheetSurface>\n </BottomSheetContext.Provider>\n );\n};\n\nconst BottomSheet = assignWithoutSideEffects(_BottomSheet, {\n componentId: ComponentIds.BottomSheet,\n});\n\nexport { BottomSheet, BottomSheetBody, BottomSheetHeader, BottomSheetFooter };\nexport type { BottomSheetProps };\n"],"names":["BOTTOM_SHEET_EASING","AUTOCOMPLETE_DEFAULT_SNAPPOINT","BottomSheetSurface","styled","div","withConfig","displayName","componentId","_ref","theme","windowHeight","isDragging","background","colors","popup","subtle","borderTopLeftRadius","makeSize","size","borderTopRightRadius","borderColor","border","boxShadow","opacity","pointerEvents","transitionDuration","undefined","concat","makeMotionTime","motion","duration","moderate","transitionTimingFunction","willChange","transitionProperty","position","left","right","bottom","top","backgroundColor","justifyContent","alignItems","touchAction","overflow","_BottomSheet","_ref2","isOpen","onDismiss","children","initialFocusRef","_ref2$snapPoints","snapPoints","_ref2$zIndex","zIndex","componentZIndices","bottomSheet","_useTheme","useTheme","dimensions","useWindowSize","_React$useState","React","useState","_React$useState2","_slicedToArray","contentHeight","setContentHeight","_React$useState3","_React$useState4","headerHeight","setHeaderHeight","_React$useState5","_React$useState6","footerHeight","setFooterHeight","_React$useState7","_React$useState8","grabHandleHeight","setGrabHandleHeight","_React$useState9","_React$useState10","hasBodyPadding","setHasBodyPadding","_React$useState11","_React$useState12","isHeaderEmpty","setIsHeaderEmpty","bottomSheetAndDropdownGlue","useBottomSheetAndDropdownGlue","_React$useState13","_React$useState14","positionY","_setPositionY","_isOpen","_React$useState15","_React$useState16","setIsDragging","preventScrollingRef","useRef","scrollRef","grabHandleRef","defaultInitialFocusRef","originalFocusElement","initialSnapPoint","totalHeight","useMemo","id","useId","_useBottomSheetStack","useBottomSheetStack","stack","addBottomSheetToStack","removeBottomSheetFromStack","getTopOfTheStack","getCurrentStackIndexById","currentStackIndex","isOnTopOfStack","bottomSheetZIndex","setPositionY","useCallback","value","limit","arguments","length","shouldLimitPositionY","hasAutoCompleteInBottomSheetHeader","maxValue","computeMaxContent","maxHeight","isReady","shouldLock","scrollLockRef","useScrollLock","enabled","targetRef","reserveScrollBarGap","useEffect","hasNoBottomSheets","clearAllBodyScrollLocks","useIsomorphicLayoutEffect","current","getBoundingClientRect","height","middleSnapPoint","lowerSnapPoint","returnFocus","focus","focusOnInitialRef","_defaultInitialFocusR","_initialFocusRef$curr","useLayoutEffect","handleOnOpen","_originalFocusElement","activate","document","activeElement","handleOnClose","close","onBottomSheetDismiss","window","setTimeout","setDropdownHasBottomSheet","bind","useDrag","_ref3","active","last","cancel","tap","_ref3$movement","movement","_movementX","movementY","_ref3$velocity","velocity","_velocityX","velocityY","_ref3$lastOffset","lastOffset","_","lastOffsetY","down","dragging","_ref3$args","args","_ref3$args2","_ref3$args3","_ref3$args3$","_ref3$args3$2","_ref3$args3$2$isConte","isContentDragging","Boolean","rawY","upperSnapPoint","predictedDistance","predictedY","Math","max","min","newY","dampening","rubberbandIfOutOfBounds","isPosAtUpperSnapPoint","isContentScrolledAtTop","scrollTop","_computeSnapPointBoun","computeSnapPointBounds","map","point","_computeSnapPointBoun2","nearest","lower","lowerPointBuffer","lowerestSnap","shouldClose","from","filterTaps","scrollElement","preventScrolling","e","preventDefault","preventSafariOverscroll","addEventListener","removeEventListener","_usePresence","usePresence","isMounted","isVisible","isHeaderFloating","contextValue","isInBottomSheet","isInsideDropdown","_jsx","_Fragment","_jsxs","BottomSheetContext","Provider","BottomSheetBackdrop","_objectSpread","metaAttribute","name","MetaConstants","BottomSheet","testID","makeAccessible","modal","role","style","BaseBox","display","flexDirection","BottomSheetGrabHandle","ref","ComponentIds","assignWithoutSideEffects"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmCO,IAAMA,mBAAmB,GAAG,8BAA6B;AAChE,IAAMC,8BAA8B,GAAG,IAAI,CAAA;AAE3C,IAAMC,kBAAkB,gBAAGC,MAAM,CAACC,GAAG,CAAAC,UAAA,CAAA;EAAAC,WAAA,EAAA,oCAAA;EAAAC,WAAA,EAAA,UAAA;AAAA,CAGlC,CAAA,CAAA,UAAAC,IAAA,EAAyC;AAAA,EAAA,IAAtCC,KAAK,GAAAD,IAAA,CAALC,KAAK;IAAEC,YAAY,GAAAF,IAAA,CAAZE,YAAY;IAAEC,UAAU,GAAAH,IAAA,CAAVG,UAAU,CAAA;EACnC,OAAO;IACLC,UAAU,EAAEH,KAAK,CAACI,MAAM,CAACC,KAAK,CAACF,UAAU,CAACG,MAAM;AAChDC,IAAAA,mBAAmB,EAAEC,QAAQ,CAACC,IAAI,CAAC,EAAE,CAAC,CAAC;AACvCC,IAAAA,oBAAoB,EAAEF,QAAQ,CAACC,IAAI,CAAC,EAAE,CAAC,CAAC;IACxCE,WAAW,EAAEX,KAAK,CAACI,MAAM,CAACC,KAAK,CAACO,MAAM,CAACN,MAAM;AAC7C;AACAO,IAAAA,SAAS,EAAE,gDAAgD;AAC3DC,IAAAA,OAAO,EAAE,CAAC;AACVC,IAAAA,aAAa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YAAY,CAACF,qBAAAA;SAAuB,CAAC,GAC3DzF,IAAI,EAAE,CACX,CAAC,EACDlH,QAAQ,CAAA;OACF,CAAA;AAAC,KAAA,CACQ,CAAC,CAAA;AAAA,GACM,CAAC,CAAA;AAElC,CAAC,CAAA;AAED,IAAMkM,WAAW,gBAAGY,wBAAwB,CAAClN,YAAY,EAAE;EACzDtC,WAAW,EAAEuP,YAAY,CAACX,WAAAA;AAC5B,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"BottomSheet.web.js","sources":["../../../../../../src/components/BottomSheet/BottomSheet.web.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable react/jsx-no-useless-fragment */\n/* eslint-disable consistent-return */\n/* eslint-disable @typescript-eslint/explicit-function-return-type */\nimport React from 'react';\nimport styled from 'styled-components';\nimport { rubberbandIfOutOfBounds, useDrag } from '@use-gesture/react';\nimport usePresence from 'use-presence';\nimport { clearAllBodyScrollLocks } from 'body-scroll-lock-upgrade';\nimport { BottomSheetHeader } from './BottomSheetHeader';\nimport { BottomSheetFooter } from './BottomSheetFooter';\nimport { BottomSheetBody } from './BottomSheetBody';\nimport type { SnapPoints } from './utils';\nimport { computeMaxContent, computeSnapPointBounds } from './utils';\nimport { BottomSheetBackdrop } from './BottomSheetBackdrop';\nimport type { BottomSheetContextProps } from './BottomSheetContext';\nimport { BottomSheetContext, useBottomSheetAndDropdownGlue } from './BottomSheetContext';\nimport { ComponentIds } from './componentIds';\nimport type { BottomSheetProps } from './types';\nimport { BottomSheetGrabHandle } from './BottomSheetGrabHandle';\nimport { useBottomSheetStack } from './BottomSheetStack';\nimport BaseBox from '~components/Box/BaseBox';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { useScrollLock } from '~utils/useScrollLock';\nimport { useWindowSize } from '~utils/useWindowSize';\nimport { useIsomorphicLayoutEffect } from '~utils/useIsomorphicLayoutEffect';\nimport { useTheme } from '~components/BladeProvider';\nimport { useId } from '~utils/useId';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { makeSize } from '~utils/makeSize';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { size } from '~tokens/global';\nimport { makeMotionTime } from '~utils/makeMotionTime';\nimport { componentZIndices } from '~utils/componentZIndices';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\n\nexport const BOTTOM_SHEET_EASING = 'cubic-bezier(.15,0,.24,.97)';\nconst AUTOCOMPLETE_DEFAULT_SNAPPOINT = 0.85;\n\nconst BottomSheetSurface = styled.div<{\n windowHeight: number;\n isDragging: boolean;\n}>(({ theme, windowHeight, isDragging }) => {\n return {\n background: theme.colors.popup.background.subtle,\n borderTopLeftRadius: makeSize(size[16]),\n borderTopRightRadius: makeSize(size[16]),\n borderColor: theme.colors.popup.border.subtle,\n // this is reverse top elevation of highRaised elevation token\n boxShadow: '0px -24px 48px -12px hsla(217, 56%, 17%, 0.18)',\n opacity: 0,\n pointerEvents: 'none',\n transitionDuration: isDragging\n ? undefined\n : `${makeMotionTime(theme.motion.duration.moderate)}`,\n transitionTimingFunction: BOTTOM_SHEET_EASING,\n willChange: 'transform, opacity, height',\n transitionProperty: 'transform, opacity, height',\n position: 'fixed',\n left: 0,\n right: 0,\n bottom: 0,\n top: windowHeight,\n backgroundColor: theme.colors.popup.background.subtle,\n justifyContent: 'center',\n alignItems: 'center',\n touchAction: 'none',\n overflow: 'hidden',\n };\n});\n\nconst _BottomSheet = ({\n isOpen,\n onDismiss,\n children,\n initialFocusRef,\n snapPoints = [0.35, 0.5, 0.85],\n zIndex = componentZIndices.bottomSheet,\n ...dataAnalyticsProps\n}: BottomSheetProps): React.ReactElement => {\n const { theme } = useTheme();\n const dimensions = useWindowSize();\n const [contentHeight, setContentHeight] = React.useState(0);\n const [headerHeight, setHeaderHeight] = React.useState(0);\n const [footerHeight, setFooterHeight] = React.useState(0);\n const [grabHandleHeight, setGrabHandleHeight] = React.useState(0);\n const [hasBodyPadding, setHasBodyPadding] = React.useState(true);\n const [isHeaderEmpty, setIsHeaderEmpty] = React.useState(false);\n\n const bottomSheetAndDropdownGlue = useBottomSheetAndDropdownGlue();\n const [positionY, _setPositionY] = React.useState(0);\n const _isOpen = isOpen ?? bottomSheetAndDropdownGlue?.isOpen;\n const [isDragging, setIsDragging] = React.useState(false);\n\n const preventScrollingRef = React.useRef(true);\n const scrollRef = React.useRef<HTMLDivElement>(null);\n const grabHandleRef = React.useRef<HTMLDivElement>(null);\n const defaultInitialFocusRef = React.useRef<any>(null);\n const originalFocusElement = React.useRef<HTMLElement | null>(null);\n const initialSnapPoint = React.useRef<number>(snapPoints[1]);\n const totalHeight = React.useMemo(() => {\n return grabHandleHeight + headerHeight + footerHeight + contentHeight;\n }, [contentHeight, footerHeight, grabHandleHeight, headerHeight]);\n\n const id = useId();\n const {\n stack,\n addBottomSheetToStack,\n removeBottomSheetFromStack,\n getTopOfTheStack,\n getCurrentStackIndexById,\n } = useBottomSheetStack();\n const currentStackIndex = getCurrentStackIndexById(id);\n const isOnTopOfStack = getTopOfTheStack() === id;\n const bottomSheetZIndex = zIndex - currentStackIndex;\n\n const setPositionY = React.useCallback(\n (value: number, limit = true) => {\n // In AutoComplete, we want BottomSheet to be docked to top snappoint so we remove the limits\n const shouldLimitPositionY =\n limit && !bottomSheetAndDropdownGlue?.hasAutoCompleteInBottomSheetHeader;\n\n const maxValue = computeMaxContent({\n contentHeight,\n footerHeight,\n headerHeight: headerHeight + grabHandleHeight,\n maxHeight: value,\n });\n _setPositionY(shouldLimitPositionY ? maxValue : value);\n },\n [\n bottomSheetAndDropdownGlue?.hasAutoCompleteInBottomSheetHeader,\n contentHeight,\n footerHeight,\n grabHandleHeight,\n headerHeight,\n ],\n );\n\n // locks the body scroll to prevent accidental scrolling of content when we drag the sheet\n // We are ready when we calculated the height of the content\n const isReady = contentHeight > 0;\n // only lock the body when we atleast have 1 bottomsheet open\n const shouldLock = isReady && stack.length > 0;\n const scrollLockRef = useScrollLock({\n enabled: shouldLock,\n targetRef: scrollRef,\n reserveScrollBarGap: true,\n });\n\n // clear all body locks to avoid memory leaks & accidental body locking\n React.useEffect(() => {\n const hasNoBottomSheets = stack.length < 1;\n if (hasNoBottomSheets) {\n clearAllBodyScrollLocks();\n }\n }, [stack]);\n\n // take the grabHandle's height into headerHeight too\n useIsomorphicLayoutEffect(() => {\n if (!grabHandleRef.current) return;\n setGrabHandleHeight(grabHandleRef.current.getBoundingClientRect().height);\n }, [grabHandleRef.current, _isOpen]);\n\n // if bottomSheet height is >35% & <50% then set initial snapPoint to 35%\n useIsomorphicLayoutEffect(() => {\n if (bottomSheetAndDropdownGlue?.hasAutoCompleteInBottomSheetHeader) {\n initialSnapPoint.current = AUTOCOMPLETE_DEFAULT_SNAPPOINT;\n } else {\n const middleSnapPoint = snapPoints[1] * dimensions.height;\n const lowerSnapPoint = snapPoints[0] * dimensions.height;\n if (totalHeight > lowerSnapPoint && totalHeight < middleSnapPoint) {\n initialSnapPoint.current = snapPoints[0];\n }\n }\n }, [dimensions.height, snapPoints, totalHeight]);\n\n const returnFocus = React.useCallback(() => {\n if (!originalFocusElement.current) return;\n originalFocusElement.current.focus();\n // After returning focus we will clear the original focus\n // Because if sheet can be opened up via multiple triggers\n // We want to ensure the focus returns back to the most recent triggerer\n originalFocusElement.current = null;\n }, [originalFocusElement]);\n\n const focusOnInitialRef = React.useCallback(() => {\n if (!initialFocusRef) {\n // focus on close button\n defaultInitialFocusRef.current?.focus();\n } else {\n // focus on the initialRef passed by the user\n initialFocusRef.current?.focus();\n }\n }, [initialFocusRef]);\n\n // focus on the initial ref when the sheet is opened\n React.useLayoutEffect(() => {\n if (_isOpen) {\n focusOnInitialRef();\n }\n }, [_isOpen, focusOnInitialRef]);\n\n const handleOnOpen = React.useCallback(() => {\n setPositionY(dimensions.height * initialSnapPoint.current);\n scrollLockRef.current.activate();\n // initialize the original focused element\n // On first render it will be the activeElement, eg: the button trigger or select input\n // On Subsequent open operations it won't further update the original focus\n originalFocusElement.current =\n originalFocusElement.current ?? (document.activeElement as HTMLElement);\n }, [dimensions.height, scrollLockRef, setPositionY]);\n\n const handleOnClose = React.useCallback(() => {\n setPositionY(0);\n }, [setPositionY]);\n\n const close = React.useCallback(() => {\n onDismiss?.();\n bottomSheetAndDropdownGlue?.onBottomSheetDismiss();\n returnFocus();\n }, [bottomSheetAndDropdownGlue, onDismiss, returnFocus]);\n\n // sync controlled state to our actions\n React.useEffect(() => {\n if (_isOpen) {\n // open on the next frame, otherwise the animations will not run on first render\n window.setTimeout(() => {\n handleOnOpen();\n });\n } else {\n handleOnClose();\n }\n }, [_isOpen, handleOnClose, handleOnOpen]);\n\n // let the Dropdown component know that it's rendering a bottomsheet\n React.useEffect(() => {\n if (!bottomSheetAndDropdownGlue) return;\n bottomSheetAndDropdownGlue.setDropdownHasBottomSheet(true);\n }, [bottomSheetAndDropdownGlue]);\n\n const bind = useDrag(\n ({\n active,\n last,\n cancel,\n tap,\n movement: [_movementX, movementY],\n velocity: [_velocityX, velocityY],\n lastOffset: [_, lastOffsetY],\n down,\n dragging,\n args: [{ isContentDragging = false } = {}] = [],\n }) => {\n setIsDragging(Boolean(dragging));\n // lastOffsetY is the previous position user stopped dragging the sheet\n // movementY is the drag amount from the bottom of the screen, so as you drag up the movementY goes into negatives\n // and rawY is the calculated offset from the last position of the bottomsheet to current drag amount.\n const rawY = lastOffsetY - movementY;\n\n const lowerSnapPoint = dimensions.height * snapPoints[0];\n const upperSnapPoint = dimensions.height * snapPoints[snapPoints.length - 1];\n\n // predictedY is used to create velocity driven swipe\n // the faster you swipe the more distance you cover\n // this enables users to reach upper & lower snappoint with a single swipe\n const predictedDistance = movementY * (velocityY / 2);\n const predictedY = Math.max(\n lowerSnapPoint,\n Math.min(upperSnapPoint, rawY - predictedDistance * 2),\n );\n\n let newY = rawY;\n\n if (down) {\n // Ensure that users aren't able to drag the sheet\n // more than the upperSnapPoint or maximum height of the sheet\n // this is basically a clamp() function but creates a nice rubberband effect\n const dampening = 0.55;\n if (totalHeight < upperSnapPoint) {\n newY = rubberbandIfOutOfBounds(rawY, 0, totalHeight, dampening);\n } else {\n newY = rubberbandIfOutOfBounds(rawY, 0, upperSnapPoint, dampening);\n }\n } else {\n newY = predictedY;\n }\n\n const isPosAtUpperSnapPoint = newY >= upperSnapPoint;\n\n if (isContentDragging) {\n if (isPosAtUpperSnapPoint) {\n newY = upperSnapPoint;\n }\n\n // keep the newY at upper snap point\n // until the scrollable content is not at top\n // and previously saved Y position is greater than or equal to upper snap point\n // Note: how using newY won't work here since we need the previous value of the newY\n // since we always keep updating the newY,\n // this is cruicial in making the scroll feel natural\n const isContentScrolledAtTop = scrollRef.current && scrollRef.current.scrollTop <= 0;\n if (lastOffsetY === upperSnapPoint && !isContentScrolledAtTop) {\n newY = upperSnapPoint;\n }\n preventScrollingRef.current = newY < upperSnapPoint;\n }\n\n if (last) {\n // calculate the nearest snapPoint\n const [nearest, lower] = computeSnapPointBounds(\n newY,\n snapPoints.map((point) => dimensions.height * point) as SnapPoints,\n );\n\n // This ensure that the lower snapPoint will always have atleast some buffer\n // When the bottomsheet total height is less than the lower snapPoint\n // Video walkthrough: https://www.loom.com/share/a9a8db7688d64194b13df8b3e25859ae\n const lowerPointBuffer = 60;\n const lowerestSnap = Math.min(lower, totalHeight) - lowerPointBuffer;\n\n const shouldClose = rawY < lowerestSnap;\n if (shouldClose) {\n setIsDragging(false);\n cancel();\n close();\n return;\n }\n\n // if we stop dragging assign snap to the nearest point\n if (!active && !tap) {\n newY = nearest;\n }\n }\n\n setPositionY(newY, !down);\n },\n {\n from: [0, positionY],\n filterTaps: true,\n enabled: isOnTopOfStack && _isOpen,\n },\n );\n\n // Here we are preventing the scrolling of the content, until the preventScrollingRef value is true\n useIsomorphicLayoutEffect(() => {\n const scrollElement = scrollRef.current;\n if (!scrollElement) return;\n\n const preventScrolling = (e: Event) => {\n if (preventScrollingRef?.current) {\n e.preventDefault();\n }\n };\n\n // https://www.bram.us/2016/05/02/prevent-overscroll-bounce-in-ios-mobilesafari-pure-css/\n const preventSafariOverscroll = (e: Event) => {\n if (scrollElement.scrollTop < 0) {\n // TODO: figure this out, it doesn't seem to work >iOS12\n // requestAnimationFrame(() => {\n // elem.style.overflow = 'hidden';\n // elem.scrollTop = 0;\n // elem.style.removeProperty('overflow');\n // });\n e.preventDefault();\n }\n };\n\n scrollElement.addEventListener('scroll', preventScrolling);\n scrollElement.addEventListener('touchmove', preventScrolling);\n scrollElement.addEventListener('touchstart', preventSafariOverscroll);\n return () => {\n scrollElement.removeEventListener('scroll', preventScrolling);\n scrollElement.removeEventListener('touchmove', preventScrolling);\n scrollElement.removeEventListener('touchstart', preventSafariOverscroll);\n };\n // Only run this hook when we know all the layout calculations are done,\n // Otherwise the scrollRef.current will be null.\n // isReady prop will ensure that we are done measuring the content height\n }, [isReady]);\n\n // usePresence hook waits for the animation to finish before unmounting the component\n // It's similar to framer-motions usePresence hook\n // https://www.framer.com/docs/animate-presence/#usepresence\n const { isMounted, isVisible } = usePresence(Boolean(_isOpen), {\n transitionDuration: theme.motion.duration.moderate,\n });\n\n const isHeaderFloating = !hasBodyPadding && isHeaderEmpty;\n const contextValue: BottomSheetContextProps = React.useMemo(\n () => ({\n isInBottomSheet: true,\n isOpen: Boolean(isVisible),\n close,\n positionY,\n headerHeight,\n contentHeight,\n footerHeight,\n setContentHeight,\n setFooterHeight,\n setHeaderHeight,\n setHasBodyPadding,\n setIsHeaderEmpty,\n scrollRef,\n bind,\n defaultInitialFocusRef,\n isHeaderFloating,\n }),\n [\n isVisible,\n close,\n positionY,\n headerHeight,\n contentHeight,\n footerHeight,\n setContentHeight,\n setFooterHeight,\n setHeaderHeight,\n setHasBodyPadding,\n setIsHeaderEmpty,\n scrollRef,\n bind,\n defaultInitialFocusRef,\n isHeaderFloating,\n ],\n );\n\n React.useEffect(() => {\n if (isMounted) {\n addBottomSheetToStack(id);\n } else {\n removeBottomSheetFromStack(id);\n }\n }, [addBottomSheetToStack, id, isMounted, removeBottomSheetFromStack]);\n\n // We will need to reset these values otherwise the next time the bottomsheet opens\n // this will be populated and the animations won't run\n // why?: because how the usePresence hook works, we actually just unmount the\n // html contents not the whole <BottomSheet /> react component\n React.useEffect(() => {\n if (!isMounted) {\n setHeaderHeight(0);\n setFooterHeight(0);\n setContentHeight(0);\n setGrabHandleHeight(0);\n _setPositionY(0);\n }\n }, [isMounted, scrollLockRef]);\n\n // We don't want to destroy the react tree when we are rendering inside Dropdown\n // Because if we bail out early then ActionList won't render,\n // and Dropdown manages it's state based on the rendered JSX of ActionList\n // If we don't render ActionList Dropdown state will reset each time we open/close BottomSheet\n const isInsideDropdown = Boolean(bottomSheetAndDropdownGlue);\n if (!isMounted && !isInsideDropdown) {\n return <></>;\n }\n\n return (\n <BottomSheetContext.Provider value={contextValue}>\n <BottomSheetBackdrop zIndex={bottomSheetZIndex} />\n <BottomSheetSurface\n {...metaAttribute({\n name: MetaConstants.BottomSheet,\n testID: 'bottomsheet-surface',\n })}\n {...makeAccessible({ modal: true, role: 'dialog' })}\n windowHeight={dimensions.height}\n isDragging={isDragging}\n style={{\n opacity: isVisible ? 1 : 0,\n pointerEvents: isVisible ? 'all' : 'none',\n height: positionY,\n bottom: 0,\n top: 'auto',\n zIndex: bottomSheetZIndex,\n }}\n {...makeAnalyticsAttribute(dataAnalyticsProps)}\n >\n <BaseBox height=\"100%\" display=\"flex\" flexDirection=\"column\">\n <BottomSheetGrabHandle\n ref={grabHandleRef}\n isHeaderFloating={isHeaderFloating}\n {...metaAttribute({ name: ComponentIds.BottomSheetGrabHandle })}\n {...bind()}\n />\n {children}\n </BaseBox>\n </BottomSheetSurface>\n </BottomSheetContext.Provider>\n );\n};\n\nconst BottomSheet = assignWithoutSideEffects(_BottomSheet, {\n componentId: ComponentIds.BottomSheet,\n});\n\nexport { BottomSheet, BottomSheetBody, BottomSheetHeader, BottomSheetFooter };\nexport type { BottomSheetProps };\n"],"names":["BOTTOM_SHEET_EASING","AUTOCOMPLETE_DEFAULT_SNAPPOINT","BottomSheetSurface","styled","div","withConfig","displayName","componentId","_ref","theme","windowHeight","isDragging","background","colors","popup","subtle","borderTopLeftRadius","makeSize","size","borderTopRightRadius","borderColor","border","boxShadow","opacity","pointerEvents","transitionDuration","undefined","concat","makeMotionTime","motion","duration","moderate","transitionTimingFunction","willChange","transitionProperty","position","left","right","bottom","top","backgroundColor","justifyContent","alignItems","touchAction","overflow","_BottomSheet","_ref2","isOpen","onDismiss","children","initialFocusRef","_ref2$snapPoints","snapPoints","_ref2$zIndex","zIndex","componentZIndices","bottomSheet","dataAnalyticsProps","_objectWithoutProperties","_excluded","_useTheme","useTheme","dimensions","useWindowSize","_React$useState","React","useState","_React$useState2","_slicedToArray","contentHeight","setContentHeight","_React$useState3","_React$useState4","headerHeight","setHeaderHeight","_React$useState5","_React$useState6","footerHeight","setFooterHeight","_React$useState7","_React$useState8","grabHandleHeight","setGrabHandleHeight","_React$useState9","_React$useState10","hasBodyPadding","setHasBodyPadding","_React$useState11","_React$useState12","isHeaderEmpty","setIsHeaderEmpty","bottomSheetAndDropdownGlue","useBottomSheetAndDropdownGlue","_React$useState13","_React$useState14","positionY","_setPositionY","_isOpen","_React$useState15","_React$useState16","setIsDragging","preventScrollingRef","useRef","scrollRef","grabHandleRef","defaultInitialFocusRef","originalFocusElement","initialSnapPoint","totalHeight","useMemo","id","useId","_useBottomSheetStack","useBottomSheetStack","stack","addBottomSheetToStack","removeBottomSheetFromStack","getTopOfTheStack","getCurrentStackIndexById","currentStackIndex","isOnTopOfStack","bottomSheetZIndex","setPositionY","useCallback","value","limit","arguments","length","shouldLimitPositionY","hasAutoCompleteInBottomSheetHeader","maxValue","computeMaxContent","maxHeight","isReady","shouldLock","scrollLockRef","useScrollLock","enabled","targetRef","reserveScrollBarGap","useEffect","hasNoBottomSheets","clearAllBodyScrollLocks","useIsomorphicLayoutEffect","current","getBoundingClientRect","height","middleSnapPoint","lowerSnapPoint","returnFocus","focus","focusOnInitialRef","_defaultInitialFocusR","_initialFocusRef$curr","useLayoutEffect","handleOnOpen","_originalFocusElement","activate","document","activeElement","handleOnClose","close","onBottomSheetDismiss","window","setTimeout","setDropdownHasBottomSheet","bind","useDrag","_ref3","active","last","cancel","tap","_ref3$movement","movement","_movementX","movementY","_ref3$velocity","velocity","_velocityX","velocityY","_ref3$lastOffset","lastOffset","_","lastOffsetY","down","dragging","_ref3$args","args","_ref3$args2","_ref3$args3","_ref3$args3$","_ref3$args3$2","_ref3$args3$2$isConte","isContentDragging","Boolean","rawY","upperSnapPoint","predictedDistance","predictedY","Math","max","min","newY","dampening","rubberbandIfOutOfBounds","isPosAtUpperSnapPoint","isContentScrolledAtTop","scrollTop","_computeSnapPointBoun","computeSnapPointBounds","map","point","_computeSnapPointBoun2","nearest","lower","lowerPointBuffer","lowerestSnap","shouldClose","from","filterTaps","scrollElement","preventScrolling","e","preventDefault","preventSafariOverscroll","addEventListener","removeEventListener","_usePresence","usePresence","isMounted","isVisible","isHeaderFloating","contextValue","isInBottomSheet","isInsideDropdown","_jsx","_Fragment","_jsxs","BottomSheetContext","Provider","BottomSheetBackdrop","_objectSpread","metaAttribute","name","MetaConstants","BottomSheet","testID","makeAccessible","modal","role","style","makeAnalyticsAttribute","BaseBox","display","flexDirection","BottomSheetGrabHandle","ref","ComponentIds","assignWithoutSideEffects"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCO,IAAMA,mBAAmB,GAAG,8BAA6B;AAChE,IAAMC,8BAA8B,GAAG,IAAI,CAAA;AAE3C,IAAMC,kBAAkB,gBAAGC,MAAM,CAACC,GAAG,CAAAC,UAAA,CAAA;EAAAC,WAAA,EAAA,oCAAA;EAAAC,WAAA,EAAA,UAAA;AAAA,CAGlC,CAAA,CAAA,UAAAC,IAAA,EAAyC;AAAA,EAAA,IAAtCC,KAAK,GAAAD,IAAA,CAALC,KAAK;IAAEC,YAAY,GAAAF,IAAA,CAAZE,YAAY;IAAEC,UAAU,GAAAH,IAAA,CAA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AM;AACzCrF,QAAAA,MAAM,EAAEnD,SAAS;AACjBzD,QAAAA,MAAM,EAAE,CAAC;AACTC,QAAAA,GAAG,EAAE,MAAM;AACXe,QAAAA,MAAM,EAAEmE,iBAAAA;AACV,OAAA;KACImI,EAAAA,sBAAsB,CAACnM,kBAAkB,CAAC,CAAA,EAAA,EAAA,EAAA;MAAAR,QAAA,eAE9C6L,IAAA,CAACe,OAAO,EAAA;AAAC3G,QAAAA,MAAM,EAAC,MAAM;AAAC4G,QAAAA,OAAO,EAAC,MAAM;AAACC,QAAAA,aAAa,EAAC,QAAQ;AAAA9M,QAAAA,QAAA,gBAC1D2L,GAAA,CAACoB,qBAAqB,EAAAd,aAAA,CAAAA,aAAA,CAAA;AACpBe,UAAAA,GAAG,EAAEzJ,aAAc;AACnBgI,UAAAA,gBAAgB,EAAEA,gBAAAA;AAAiB,SAAA,EAC/BW,aAAa,CAAC;UAAEC,IAAI,EAAEc,YAAY,CAACF,qBAAAA;SAAuB,CAAC,GAC3D1F,IAAI,EAAE,CACX,CAAC,EACDrH,QAAQ,CAAA;OACF,CAAA;AAAC,KAAA,CACQ,CAAC,CAAA;AAAA,GACM,CAAC,CAAA;AAElC,CAAC,CAAA;AAED,IAAMqM,WAAW,gBAAGa,wBAAwB,CAACtN,YAAY,EAAE;EACzDtC,WAAW,EAAE2P,YAAY,CAACZ,WAAAA;AAC5B,CAAC;;;;"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
2
2
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
3
|
+
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
3
4
|
import React__default from 'react';
|
|
4
5
|
import { ComponentIds } from './componentIds.js';
|
|
5
6
|
import { useBottomSheetContext } from './BottomSheetContext.js';
|
|
@@ -9,13 +10,16 @@ import { componentIds } from '../ActionList/componentIds.js';
|
|
|
9
10
|
import '../../utils/assignWithoutSideEffects/index.js';
|
|
10
11
|
import '../../utils/metaAttribute/index.js';
|
|
11
12
|
import '../../utils/isValidAllowedChildren/index.js';
|
|
13
|
+
import '../../utils/makeAnalyticsAttribute/index.js';
|
|
12
14
|
import { jsx } from 'react/jsx-runtime';
|
|
13
15
|
import { isValidAllowedChildren } from '../../utils/isValidAllowedChildren/isValidAllowedChildren.js';
|
|
14
16
|
import { BaseBox } from '../Box/BaseBox/BaseBox.web.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", "padding", "overflow"];
|
|
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 bodyStyles = {
|
|
@@ -32,7 +36,8 @@ var _BottomSheetBody = function _BottomSheetBody(_ref) {
|
|
|
32
36
|
_ref$padding = _ref.padding,
|
|
33
37
|
padding = _ref$padding === void 0 ? 'spacing.5' : _ref$padding,
|
|
34
38
|
_ref$overflow = _ref.overflow,
|
|
35
|
-
overflow = _ref$overflow === void 0 ? 'auto' : _ref$overflow
|
|
39
|
+
overflow = _ref$overflow === void 0 ? 'auto' : _ref$overflow,
|
|
40
|
+
dataAnalyticsProps = _objectWithoutProperties(_ref, _excluded);
|
|
36
41
|
var _useBottomSheetContex = useBottomSheetContext(),
|
|
37
42
|
scrollRef = _useBottomSheetContex.scrollRef,
|
|
38
43
|
setContentHeight = _useBottomSheetContex.setContentHeight,
|
|
@@ -62,10 +67,10 @@ var _BottomSheetBody = function _BottomSheetBody(_ref) {
|
|
|
62
67
|
}
|
|
63
68
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
64
69
|
}, [padding]);
|
|
65
|
-
return /*#__PURE__*/jsx(BaseBox, _objectSpread(_objectSpread(_objectSpread({}, metaAttribute({
|
|
70
|
+
return /*#__PURE__*/jsx(BaseBox, _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, metaAttribute({
|
|
66
71
|
testID: 'bottomsheet-body',
|
|
67
72
|
name: MetaConstants.BottomSheetBody
|
|
68
|
-
})), {}, {
|
|
73
|
+
})), makeAnalyticsAttribute(dataAnalyticsProps)), {}, {
|
|
69
74
|
ref: scrollRef,
|
|
70
75
|
flexGrow: 1,
|
|
71
76
|
flexShrink: 1,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BottomSheetBody.web.js","sources":["../../../../../../src/components/BottomSheet/BottomSheetBody.web.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport React from 'react';\nimport { ComponentIds } from './componentIds';\nimport { useBottomSheetContext } from './BottomSheetContext';\nimport type { BottomSheetBodyProps } from './types';\nimport { useIsomorphicLayoutEffect } from '~utils/useIsomorphicLayoutEffect';\nimport BaseBox from '~components/Box/BaseBox';\nimport { componentIds } from '~components/ActionList/componentIds';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { isValidAllowedChildren } from '~utils/isValidAllowedChildren';\n\nconst bodyStyles: React.CSSProperties = {\n WebkitTapHighlightColor: 'revert',\n WebkitTouchCallout: 'revert',\n WebkitUserSelect: 'auto',\n overscrollBehavior: 'contain',\n WebkitOverflowScrolling: 'touch',\n userSelect: 'auto',\n touchAction: 'none',\n};\n\nconst _BottomSheetBody = ({\n children,\n padding = 'spacing.5',\n overflow = 'auto',\n}: BottomSheetBodyProps): React.ReactElement => {\n const { scrollRef, setContentHeight, setHasBodyPadding, isOpen, bind } = useBottomSheetContext();\n const contentRef = React.useRef<HTMLDivElement>(null);\n const [bottomSheetHasActionList, setBottomSheetHasActionList] = React.useState<boolean>(false);\n\n useIsomorphicLayoutEffect(() => {\n if (!contentRef.current) return;\n setContentHeight(contentRef.current.getBoundingClientRect().height);\n }, [contentRef, isOpen, children]);\n\n React.useEffect(() => {\n setBottomSheetHasActionList(false);\n React.Children.forEach(children, (child) => {\n if (isValidAllowedChildren(child, componentIds.ActionList)) {\n setBottomSheetHasActionList(true);\n }\n });\n }, [children]);\n\n React.useEffect(() => {\n if (padding === 'spacing.0') {\n setHasBodyPadding(false);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [padding]);\n\n return (\n <BaseBox\n {...metaAttribute({\n testID: 'bottomsheet-body',\n name: MetaConstants.BottomSheetBody,\n })}\n ref={scrollRef}\n flexGrow={1}\n flexShrink={1}\n style={bodyStyles}\n overflow={overflow}\n // Passing isContentDragging to bind()\n // Inside the useDrag() hook this will let us know if user is dragging the content or not\n {...bind?.({ isContentDragging: true })}\n >\n <BaseBox\n paddingLeft={bottomSheetHasActionList ? 'spacing.3' : padding}\n paddingRight={bottomSheetHasActionList ? 'spacing.3' : padding}\n paddingTop={bottomSheetHasActionList ? 'spacing.3' : padding}\n paddingBottom={bottomSheetHasActionList ? 'spacing.3' : padding}\n ref={contentRef}\n overflow={overflow}\n >\n {children}\n </BaseBox>\n </BaseBox>\n );\n};\n\nconst BottomSheetBody = assignWithoutSideEffects(_BottomSheetBody, {\n componentId: ComponentIds.BottomSheetBody,\n});\n\nexport { BottomSheetBody };\n"],"names":["bodyStyles","WebkitTapHighlightColor","WebkitTouchCallout","WebkitUserSelect","overscrollBehavior","WebkitOverflowScrolling","userSelect","touchAction","_BottomSheetBody","_ref","children","_ref$padding","padding","_ref$overflow","overflow","_useBottomSheetContex","useBottomSheetContext","scrollRef","setContentHeight","setHasBodyPadding","isOpen","bind","contentRef","React","useRef","_React$useState","useState","_React$useState2","_slicedToArray","bottomSheetHasActionList","setBottomSheetHasActionList","useIsomorphicLayoutEffect","current","getBoundingClientRect","height","useEffect","Children","forEach","child","isValidAllowedChildren","componentIds","ActionList","_jsx","BaseBox","_objectSpread","metaAttribute","testID","name","MetaConstants","BottomSheetBody","ref","flexGrow","flexShrink","style","isContentDragging","paddingLeft","paddingRight","paddingTop","paddingBottom","assignWithoutSideEffects","componentId","ComponentIds"],"mappings":"
|
|
1
|
+
{"version":3,"file":"BottomSheetBody.web.js","sources":["../../../../../../src/components/BottomSheet/BottomSheetBody.web.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport React from 'react';\nimport { ComponentIds } from './componentIds';\nimport { useBottomSheetContext } from './BottomSheetContext';\nimport type { BottomSheetBodyProps } from './types';\nimport { useIsomorphicLayoutEffect } from '~utils/useIsomorphicLayoutEffect';\nimport BaseBox from '~components/Box/BaseBox';\nimport { componentIds } from '~components/ActionList/componentIds';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { isValidAllowedChildren } from '~utils/isValidAllowedChildren';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\n\nconst bodyStyles: React.CSSProperties = {\n WebkitTapHighlightColor: 'revert',\n WebkitTouchCallout: 'revert',\n WebkitUserSelect: 'auto',\n overscrollBehavior: 'contain',\n WebkitOverflowScrolling: 'touch',\n userSelect: 'auto',\n touchAction: 'none',\n};\n\nconst _BottomSheetBody = ({\n children,\n padding = 'spacing.5',\n overflow = 'auto',\n ...dataAnalyticsProps\n}: BottomSheetBodyProps): React.ReactElement => {\n const { scrollRef, setContentHeight, setHasBodyPadding, isOpen, bind } = useBottomSheetContext();\n const contentRef = React.useRef<HTMLDivElement>(null);\n const [bottomSheetHasActionList, setBottomSheetHasActionList] = React.useState<boolean>(false);\n\n useIsomorphicLayoutEffect(() => {\n if (!contentRef.current) return;\n setContentHeight(contentRef.current.getBoundingClientRect().height);\n }, [contentRef, isOpen, children]);\n\n React.useEffect(() => {\n setBottomSheetHasActionList(false);\n React.Children.forEach(children, (child) => {\n if (isValidAllowedChildren(child, componentIds.ActionList)) {\n setBottomSheetHasActionList(true);\n }\n });\n }, [children]);\n\n React.useEffect(() => {\n if (padding === 'spacing.0') {\n setHasBodyPadding(false);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [padding]);\n\n return (\n <BaseBox\n {...metaAttribute({\n testID: 'bottomsheet-body',\n name: MetaConstants.BottomSheetBody,\n })}\n {...makeAnalyticsAttribute(dataAnalyticsProps)}\n ref={scrollRef}\n flexGrow={1}\n flexShrink={1}\n style={bodyStyles}\n overflow={overflow}\n // Passing isContentDragging to bind()\n // Inside the useDrag() hook this will let us know if user is dragging the content or not\n {...bind?.({ isContentDragging: true })}\n >\n <BaseBox\n paddingLeft={bottomSheetHasActionList ? 'spacing.3' : padding}\n paddingRight={bottomSheetHasActionList ? 'spacing.3' : padding}\n paddingTop={bottomSheetHasActionList ? 'spacing.3' : padding}\n paddingBottom={bottomSheetHasActionList ? 'spacing.3' : padding}\n ref={contentRef}\n overflow={overflow}\n >\n {children}\n </BaseBox>\n </BaseBox>\n );\n};\n\nconst BottomSheetBody = assignWithoutSideEffects(_BottomSheetBody, {\n componentId: ComponentIds.BottomSheetBody,\n});\n\nexport { BottomSheetBody };\n"],"names":["bodyStyles","WebkitTapHighlightColor","WebkitTouchCallout","WebkitUserSelect","overscrollBehavior","WebkitOverflowScrolling","userSelect","touchAction","_BottomSheetBody","_ref","children","_ref$padding","padding","_ref$overflow","overflow","dataAnalyticsProps","_objectWithoutProperties","_excluded","_useBottomSheetContex","useBottomSheetContext","scrollRef","setContentHeight","setHasBodyPadding","isOpen","bind","contentRef","React","useRef","_React$useState","useState","_React$useState2","_slicedToArray","bottomSheetHasActionList","setBottomSheetHasActionList","useIsomorphicLayoutEffect","current","getBoundingClientRect","height","useEffect","Children","forEach","child","isValidAllowedChildren","componentIds","ActionList","_jsx","BaseBox","_objectSpread","metaAttribute","testID","name","MetaConstants","BottomSheetBody","makeAnalyticsAttribute","ref","flexGrow","flexShrink","style","isContentDragging","paddingLeft","paddingRight","paddingTop","paddingBottom","assignWithoutSideEffects","componentId","ComponentIds"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAaA,IAAMA,UAA+B,GAAG;AACtCC,EAAAA,uBAAuB,EAAE,QAAQ;AACjCC,EAAAA,kBAAkB,EAAE,QAAQ;AAC5BC,EAAAA,gBAAgB,EAAE,MAAM;AACxBC,EAAAA,kBAAkB,EAAE,SAAS;AAC7BC,EAAAA,uBAAuB,EAAE,OAAO;AAChCC,EAAAA,UAAU,EAAE,MAAM;AAClBC,EAAAA,WAAW,EAAE,MAAA;AACf,CAAC,CAAA;AAED,IAAMC,gBAAgB,GAAG,SAAnBA,gBAAgBA,CAAAC,IAAA,EAK0B;AAAA,EAAA,IAJ9CC,QAAQ,GAAAD,IAAA,CAARC,QAAQ;IAAAC,YAAA,GAAAF,IAAA,CACRG,OAAO;AAAPA,IAAAA,OAAO,GAAAD,YAAA,KAAG,KAAA,CAAA,GAAA,WAAW,GAAAA,YAAA;IAAAE,aAAA,GAAAJ,IAAA,CACrBK,QAAQ;AAARA,IAAAA,QAAQ,GAAAD,aAAA,KAAG,KAAA,CAAA,GAAA,MAAM,GAAAA,aAAA;AACdE,IAAAA,kBAAkB,GAAAC,wBAAA,CAAAP,IAAA,EAAAQ,SAAA,CAAA,CAAA;AAErB,EAAA,IAAAC,qBAAA,GAAyEC,qBAAqB,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AED,IAAM0C,eAAe,gBAAGW,wBAAwB,CAACvD,gBAAgB,EAAE;EACjEwD,WAAW,EAAEC,YAAY,CAACb,eAAAA;AAC5B,CAAC;;;;"}
|
|
@@ -1,19 +1,24 @@
|
|
|
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 { useBottomSheetContext } from './BottomSheetContext.js';
|
|
4
5
|
import { BaseFooter } from '../BaseHeaderFooter/BaseFooter.js';
|
|
5
6
|
import '../Box/BaseBox/index.js';
|
|
6
7
|
import { useIsomorphicLayoutEffect } from '../../utils/useIsomorphicLayoutEffect.js';
|
|
7
8
|
import '../../utils/metaAttribute/index.js';
|
|
9
|
+
import '../../utils/makeAnalyticsAttribute/index.js';
|
|
8
10
|
import { jsx } from 'react/jsx-runtime';
|
|
9
11
|
import { BaseBox } from '../Box/BaseBox/BaseBox.web.js';
|
|
10
12
|
import { metaAttribute } from '../../utils/metaAttribute/metaAttribute.web.js';
|
|
11
13
|
import { MetaConstants } from '../../utils/metaAttribute/metaConstants.js';
|
|
14
|
+
import { makeAnalyticsAttribute } from '../../utils/makeAnalyticsAttribute/makeAnalyticsAttribute.js';
|
|
12
15
|
|
|
16
|
+
var _excluded = ["children"];
|
|
13
17
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
14
18
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
15
19
|
var BottomSheetFooter = function BottomSheetFooter(_ref) {
|
|
16
|
-
var children = _ref.children
|
|
20
|
+
var children = _ref.children,
|
|
21
|
+
dataAnalyticsProps = _objectWithoutProperties(_ref, _excluded);
|
|
17
22
|
var _useBottomSheetContex = useBottomSheetContext(),
|
|
18
23
|
setFooterHeight = _useBottomSheetContex.setFooterHeight,
|
|
19
24
|
isOpen = _useBottomSheetContex.isOpen,
|
|
@@ -28,7 +33,7 @@ var BottomSheetFooter = function BottomSheetFooter(_ref) {
|
|
|
28
33
|
setFooterHeight(ref.current.getBoundingClientRect().height);
|
|
29
34
|
});
|
|
30
35
|
}, [ref, isOpen]);
|
|
31
|
-
return /*#__PURE__*/jsx(BaseBox, _objectSpread(_objectSpread(_objectSpread({
|
|
36
|
+
return /*#__PURE__*/jsx(BaseBox, _objectSpread(_objectSpread(_objectSpread(_objectSpread({
|
|
32
37
|
ref: ref,
|
|
33
38
|
width: "100%",
|
|
34
39
|
flexShrink: 0,
|
|
@@ -38,7 +43,7 @@ var BottomSheetFooter = function BottomSheetFooter(_ref) {
|
|
|
38
43
|
zIndex: 2
|
|
39
44
|
}, metaAttribute({
|
|
40
45
|
name: MetaConstants.BottomSheetFooter
|
|
41
|
-
})), bind === null || bind === void 0 ? void 0 : bind()), {}, {
|
|
46
|
+
})), bind === null || bind === void 0 ? void 0 : bind()), makeAnalyticsAttribute(dataAnalyticsProps)), {}, {
|
|
42
47
|
children: /*#__PURE__*/jsx(BaseFooter, {
|
|
43
48
|
children: children
|
|
44
49
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BottomSheetFooter.web.js","sources":["../../../../../../src/components/BottomSheet/BottomSheetFooter.web.tsx"],"sourcesContent":["import React from 'react';\nimport { useBottomSheetContext } from './BottomSheetContext';\nimport type { BaseFooterProps } from '~components/BaseHeaderFooter/BaseFooter';\nimport { BaseFooter } from '~components/BaseHeaderFooter/BaseFooter';\nimport BaseBox from '~components/Box/BaseBox';\nimport { useIsomorphicLayoutEffect } from '~utils/useIsomorphicLayoutEffect';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\n\nconst BottomSheetFooter = ({
|
|
1
|
+
{"version":3,"file":"BottomSheetFooter.web.js","sources":["../../../../../../src/components/BottomSheet/BottomSheetFooter.web.tsx"],"sourcesContent":["import React from 'react';\nimport { useBottomSheetContext } from './BottomSheetContext';\nimport type { BaseFooterProps } from '~components/BaseHeaderFooter/BaseFooter';\nimport { BaseFooter } from '~components/BaseHeaderFooter/BaseFooter';\nimport BaseBox from '~components/Box/BaseBox';\nimport { useIsomorphicLayoutEffect } from '~utils/useIsomorphicLayoutEffect';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\n\nconst BottomSheetFooter = ({\n children,\n ...dataAnalyticsProps\n}: BaseFooterProps): React.ReactElement => {\n const { setFooterHeight, isOpen, bind } = useBottomSheetContext();\n const ref = React.useRef<HTMLDivElement>(null);\n\n useIsomorphicLayoutEffect(() => {\n // for some reason the calculated footer height is changing when user drags the sheet\n // although i don't see a reason why, thus putting it in a setTimeout so that\n // we calculate the height on the next browser paint\n window.setTimeout(() => {\n if (!ref.current) return;\n setFooterHeight(ref.current.getBoundingClientRect().height);\n });\n }, [ref, isOpen]);\n\n return (\n <BaseBox\n ref={ref}\n width=\"100%\"\n flexShrink={0}\n marginTop=\"auto\"\n backgroundColor=\"popup.background.subtle\"\n touchAction=\"none\"\n zIndex={2}\n {...metaAttribute({ name: MetaConstants.BottomSheetFooter })}\n {...bind?.()}\n {...makeAnalyticsAttribute(dataAnalyticsProps)}\n >\n <BaseFooter>{children}</BaseFooter>\n </BaseBox>\n );\n};\n\nexport { BottomSheetFooter };\n"],"names":["BottomSheetFooter","_ref","children","dataAnalyticsProps","_objectWithoutProperties","_excluded","_useBottomSheetContex","useBottomSheetContext","setFooterHeight","isOpen","bind","ref","React","useRef","useIsomorphicLayoutEffect","window","setTimeout","current","getBoundingClientRect","height","_jsx","BaseBox","_objectSpread","width","flexShrink","marginTop","backgroundColor","touchAction","zIndex","metaAttribute","name","MetaConstants","makeAnalyticsAttribute","BaseFooter"],"mappings":";;;;;;;;;;;;;;;;;;AASA,IAAMA,iBAAiB,GAAG,SAApBA,iBAAiBA,CAAAC,IAAA,EAGoB;AAAA,EAAA,IAFzCC,QAAQ,GAAAD,IAAA,CAARC,QAAQ;AACLC,IAAAA,kBAAkB,GAAAC,wBAAA,CAAAH,IAAA,EAAAI,SAAA,CAAA,CAAA;AAErB,EAAA,IAAAC,qBAAA,GAA0CC,qBAAqB,EAAE;IAAzDC,eAAe,GAAAF,qBAAA,CAAfE,eAAe;IAAEC,MAAM,GAAAH,qBAAA,CAANG,MAAM;IAAEC,IAAI,GAAAJ,qBAAA,CAAJI,IAAI,CAAA;AACrC,EAAA,IAAMC,GAAG,GAAGC,cAAK,CAACC,MAAM,CAAiB,IAAI,CAAC,CAAA;AAE9CC,EAAAA,yBAAyB,CAAC,YAAM;AAC9B;AACA;AACA;IACAC,MAAM,CAACC,UAAU,CAAC,YAAM;AACtB,MAAA,IAAI,CAACL,GAAG,CAACM,OAAO,EAAE,OAAA;MAClBT,eAAe,CAACG,GAAG,CAACM,OAAO,CAACC,qBAAqB,EAAE,CAACC,MAAM,CAAC,CAAA;AAC7D,KAAC,CAAC,CAAA;AACJ,GAAC,EAAE,CAACR,GAAG,EAAEF,MAAM,CAAC,CAAC,CAAA;EAEjB,oBACEW,GAAA,CAACC,OAAO,EAAAC,aAAA,CAAAA,aAAA,CAAAA,aAAA,CAAAA,aAAA,CAAA;AACNX,IAAAA,GAAG,EAAEA,GAAI;AACTY,IAAAA,KAAK,EAAC,MAAM;AACZC,IAAAA,UAAU,EAAE,CAAE;AACdC,IAAAA,SAAS,EAAC,MAAM;AAChBC,IAAAA,eAAe,EAAC,yBAAyB;AACzCC,IAAAA,WAAW,EAAC,MAAM;AAClBC,IAAAA,MAAM,EAAE,CAAA;AAAE,GAAA,EACNC,aAAa,CAAC;IAAEC,IAAI,EAAEC,aAAa,CAAC/B,iBAAAA;AAAkB,GAAC,CAAC,CAAA,EACxDU,IAAI,KAAA,IAAA,IAAJA,IAAI,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAJA,IAAI,EAAI,CAAA,EACRsB,sBAAsB,CAAC7B,kBAAkB,CAAC,CAAA,EAAA,EAAA,EAAA;IAAAD,QAAA,eAE9CkB,GAAA,CAACa,UAAU,EAAA;AAAA/B,MAAAA,QAAA,EAAEA,QAAAA;KAAqB,CAAA;AAAC,GAAA,CAC5B,CAAC,CAAA;AAEd;;;;"}
|
|
@@ -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 { ComponentIds } from './componentIds.js';
|
|
4
5
|
import { useBottomSheetContext, useBottomSheetAndDropdownGlue } from './BottomSheetContext.js';
|
|
@@ -8,12 +9,15 @@ import '../Box/BaseBox/index.js';
|
|
|
8
9
|
import '../../utils/metaAttribute/index.js';
|
|
9
10
|
import { useIsomorphicLayoutEffect } from '../../utils/useIsomorphicLayoutEffect.js';
|
|
10
11
|
import '../../utils/assignWithoutSideEffects/index.js';
|
|
12
|
+
import '../../utils/makeAnalyticsAttribute/index.js';
|
|
11
13
|
import { jsx } from 'react/jsx-runtime';
|
|
12
14
|
import { BaseBox } from '../Box/BaseBox/BaseBox.web.js';
|
|
13
15
|
import { metaAttribute } from '../../utils/metaAttribute/metaAttribute.web.js';
|
|
14
16
|
import { MetaConstants } from '../../utils/metaAttribute/metaConstants.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", "titleSuffix", "trailing", "showBackButton", "onBackButtonClick", "children"];
|
|
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 _BottomSheetHeader = function _BottomSheetHeader(_ref) {
|
|
@@ -25,7 +29,8 @@ var _BottomSheetHeader = function _BottomSheetHeader(_ref) {
|
|
|
25
29
|
_ref$showBackButton = _ref.showBackButton,
|
|
26
30
|
showBackButton = _ref$showBackButton === void 0 ? false : _ref$showBackButton,
|
|
27
31
|
onBackButtonClick = _ref.onBackButtonClick,
|
|
28
|
-
children = _ref.children
|
|
32
|
+
children = _ref.children,
|
|
33
|
+
dataAnalyticsProps = _objectWithoutProperties(_ref, _excluded);
|
|
29
34
|
var _useBottomSheetContex = useBottomSheetContext(),
|
|
30
35
|
setHeaderHeight = _useBottomSheetContex.setHeaderHeight,
|
|
31
36
|
isOpen = _useBottomSheetContex.isOpen,
|
|
@@ -44,13 +49,13 @@ var _BottomSheetHeader = function _BottomSheetHeader(_ref) {
|
|
|
44
49
|
setIsHeaderEmpty(isHeaderEmpty);
|
|
45
50
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
46
51
|
}, [isHeaderEmpty]);
|
|
47
|
-
return /*#__PURE__*/jsx(BaseBox, _objectSpread(_objectSpread({
|
|
52
|
+
return /*#__PURE__*/jsx(BaseBox, _objectSpread(_objectSpread(_objectSpread({
|
|
48
53
|
ref: ref,
|
|
49
54
|
overflow: isHeaderEmpty ? 'visible' : 'auto',
|
|
50
55
|
flexShrink: 0
|
|
51
56
|
}, metaAttribute({
|
|
52
57
|
name: MetaConstants.BottomSheetHeader
|
|
53
|
-
})), {}, {
|
|
58
|
+
})), makeAnalyticsAttribute(dataAnalyticsProps)), {}, {
|
|
54
59
|
children: isHeaderEmpty ? /*#__PURE__*/jsx(BottomSheetEmptyHeader, {
|
|
55
60
|
ref: defaultInitialFocusRef
|
|
56
61
|
}) : /*#__PURE__*/jsx(BaseHeader, _objectSpread(_objectSpread({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BottomSheetHeader.web.js","sources":["../../../../../../src/components/BottomSheet/BottomSheetHeader.web.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/prefer-nullish-coalescing */\nimport React from 'react';\nimport { ComponentIds } from './componentIds';\nimport { useBottomSheetAndDropdownGlue, useBottomSheetContext } from './BottomSheetContext';\nimport type { BottomSheetHeaderProps } from './types';\nimport { BottomSheetEmptyHeader } from './BottomSheetCommon';\nimport { BaseHeader } from '~components/BaseHeaderFooter/BaseHeader';\nimport BaseBox from '~components/Box/BaseBox';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { useIsomorphicLayoutEffect } from '~utils/useIsomorphicLayoutEffect';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\n\nconst _BottomSheetHeader = ({\n title,\n subtitle,\n leading,\n titleSuffix,\n trailing,\n showBackButton = false,\n onBackButtonClick,\n children,\n}: BottomSheetHeaderProps): React.ReactElement => {\n const {\n setHeaderHeight,\n isOpen,\n close,\n bind,\n setIsHeaderEmpty,\n defaultInitialFocusRef,\n } = useBottomSheetContext();\n const bottomSheetAndDropdownGlue = useBottomSheetAndDropdownGlue();\n const ref = React.useRef<HTMLDivElement>(null);\n\n useIsomorphicLayoutEffect(() => {\n if (!ref.current) return;\n setHeaderHeight(ref.current.getBoundingClientRect().height);\n }, [ref, isOpen]);\n\n const isHeaderEmpty = !(title || subtitle || leading || trailing || showBackButton || children);\n\n React.useEffect(() => {\n setIsHeaderEmpty(isHeaderEmpty);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [isHeaderEmpty]);\n\n return (\n <BaseBox\n ref={ref}\n overflow={isHeaderEmpty ? 'visible' : 'auto'}\n flexShrink={0}\n {...metaAttribute({ name: MetaConstants.BottomSheetHeader })}\n >\n {isHeaderEmpty ? (\n <BottomSheetEmptyHeader ref={defaultInitialFocusRef} />\n ) : (\n <BaseHeader\n title={title}\n subtitle={subtitle}\n leading={leading}\n trailing={trailing}\n titleSuffix={titleSuffix}\n // we don't set focus on close button when it has AutoComplete inside.\n // We set focus on AutoComplete instead inside AutoComplete component\n closeButtonRef={\n bottomSheetAndDropdownGlue?.hasAutoCompleteInBottomSheetHeader\n ? undefined\n : defaultInitialFocusRef\n }\n // back button\n showBackButton={showBackButton}\n onBackButtonClick={onBackButtonClick}\n // close button\n showCloseButton={true}\n onCloseButtonClick={close}\n {...bind?.()}\n >\n {children}\n </BaseHeader>\n )}\n </BaseBox>\n );\n};\n\nconst BottomSheetHeader = assignWithoutSideEffects(_BottomSheetHeader, {\n componentId: ComponentIds.BottomSheetHeader,\n});\n\nexport { BottomSheetHeader };\n"],"names":["_BottomSheetHeader","_ref","title","subtitle","leading","titleSuffix","trailing","_ref$showBackButton","showBackButton","onBackButtonClick","children","_useBottomSheetContex","useBottomSheetContext","setHeaderHeight","isOpen","close","bind","setIsHeaderEmpty","defaultInitialFocusRef","bottomSheetAndDropdownGlue","useBottomSheetAndDropdownGlue","ref","React","useRef","useIsomorphicLayoutEffect","current","getBoundingClientRect","height","isHeaderEmpty","useEffect","_jsx","BaseBox","_objectSpread","overflow","flexShrink","metaAttribute","name","MetaConstants","BottomSheetHeader","BottomSheetEmptyHeader","BaseHeader","closeButtonRef","hasAutoCompleteInBottomSheetHeader","undefined","showCloseButton","onCloseButtonClick","assignWithoutSideEffects","componentId","ComponentIds"],"mappings":"
|
|
1
|
+
{"version":3,"file":"BottomSheetHeader.web.js","sources":["../../../../../../src/components/BottomSheet/BottomSheetHeader.web.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/prefer-nullish-coalescing */\nimport React from 'react';\nimport { ComponentIds } from './componentIds';\nimport { useBottomSheetAndDropdownGlue, useBottomSheetContext } from './BottomSheetContext';\nimport type { BottomSheetHeaderProps } from './types';\nimport { BottomSheetEmptyHeader } from './BottomSheetCommon';\nimport { BaseHeader } from '~components/BaseHeaderFooter/BaseHeader';\nimport BaseBox from '~components/Box/BaseBox';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { useIsomorphicLayoutEffect } from '~utils/useIsomorphicLayoutEffect';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\n\nconst _BottomSheetHeader = ({\n title,\n subtitle,\n leading,\n titleSuffix,\n trailing,\n showBackButton = false,\n onBackButtonClick,\n children,\n ...dataAnalyticsProps\n}: BottomSheetHeaderProps): React.ReactElement => {\n const {\n setHeaderHeight,\n isOpen,\n close,\n bind,\n setIsHeaderEmpty,\n defaultInitialFocusRef,\n } = useBottomSheetContext();\n const bottomSheetAndDropdownGlue = useBottomSheetAndDropdownGlue();\n const ref = React.useRef<HTMLDivElement>(null);\n\n useIsomorphicLayoutEffect(() => {\n if (!ref.current) return;\n setHeaderHeight(ref.current.getBoundingClientRect().height);\n }, [ref, isOpen]);\n\n const isHeaderEmpty = !(title || subtitle || leading || trailing || showBackButton || children);\n\n React.useEffect(() => {\n setIsHeaderEmpty(isHeaderEmpty);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [isHeaderEmpty]);\n\n return (\n <BaseBox\n ref={ref}\n overflow={isHeaderEmpty ? 'visible' : 'auto'}\n flexShrink={0}\n {...metaAttribute({ name: MetaConstants.BottomSheetHeader })}\n {...makeAnalyticsAttribute(dataAnalyticsProps)}\n >\n {isHeaderEmpty ? (\n <BottomSheetEmptyHeader ref={defaultInitialFocusRef} />\n ) : (\n <BaseHeader\n title={title}\n subtitle={subtitle}\n leading={leading}\n trailing={trailing}\n titleSuffix={titleSuffix}\n // we don't set focus on close button when it has AutoComplete inside.\n // We set focus on AutoComplete instead inside AutoComplete component\n closeButtonRef={\n bottomSheetAndDropdownGlue?.hasAutoCompleteInBottomSheetHeader\n ? undefined\n : defaultInitialFocusRef\n }\n // back button\n showBackButton={showBackButton}\n onBackButtonClick={onBackButtonClick}\n // close button\n showCloseButton={true}\n onCloseButtonClick={close}\n {...bind?.()}\n >\n {children}\n </BaseHeader>\n )}\n </BaseBox>\n );\n};\n\nconst BottomSheetHeader = assignWithoutSideEffects(_BottomSheetHeader, {\n componentId: ComponentIds.BottomSheetHeader,\n});\n\nexport { BottomSheetHeader };\n"],"names":["_BottomSheetHeader","_ref","title","subtitle","leading","titleSuffix","trailing","_ref$showBackButton","showBackButton","onBackButtonClick","children","dataAnalyticsProps","_objectWithoutProperties","_excluded","_useBottomSheetContex","useBottomSheetContext","setHeaderHeight","isOpen","close","bind","setIsHeaderEmpty","defaultInitialFocusRef","bottomSheetAndDropdownGlue","useBottomSheetAndDropdownGlue","ref","React","useRef","useIsomorphicLayoutEffect","current","getBoundingClientRect","height","isHeaderEmpty","useEffect","_jsx","BaseBox","_objectSpread","overflow","flexShrink","metaAttribute","name","MetaConstants","BottomSheetHeader","makeAnalyticsAttribute","BottomSheetEmptyHeader","BaseHeader","closeButtonRef","hasAutoCompleteInBottomSheetHeader","undefined","showCloseButton","onCloseButtonClick","assignWithoutSideEffects","componentId","ComponentIds"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAaA,IAAMA,kBAAkB,GAAG,SAArBA,kBAAkBA,CAAAC,IAAA,EAU0B;AAAA,EAAA,IAThDC,KAAK,GAAAD,IAAA,CAALC,KAAK;IACLC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JA,KAAAA,CAAAA,GAAAA,KAAAA,CAAAA,GAAAA,IAAI,EAAI,CAAA,EAAA,EAAA,EAAA;AAAAT,MAAAA,QAAA,EAEXA,QAAAA;KACS,CAAA,CAAA;AACb,GAAA,CACM,CAAC,CAAA;AAEd,CAAC,CAAA;AAED,IAAM+B,iBAAiB,gBAAGS,wBAAwB,CAAClD,kBAAkB,EAAE;EACrEmD,WAAW,EAAEC,YAAY,CAACX,iBAAAA;AAC5B,CAAC;;;;"}
|
|
@@ -4,17 +4,19 @@ import { useMemoizedStyles } from './useMemoizedStyles.web.js';
|
|
|
4
4
|
import { omitPropsFromHTML } from '../../../utils/omitPropsFromHTML/index.js';
|
|
5
5
|
import '../../../utils/metaAttribute/index.js';
|
|
6
6
|
import '../../../utils/assignWithoutSideEffects/index.js';
|
|
7
|
+
import '../../../utils/makeAnalyticsAttribute/index.js';
|
|
7
8
|
import { metaAttribute } from '../../../utils/metaAttribute/metaAttribute.web.js';
|
|
8
9
|
import { MetaConstants } from '../../../utils/metaAttribute/metaConstants.js';
|
|
10
|
+
import { makeAnalyticsAttribute } from '../../../utils/makeAnalyticsAttribute/makeAnalyticsAttribute.js';
|
|
9
11
|
import { assignWithoutSideEffects } from '../../../utils/assignWithoutSideEffects/assignWithoutSideEffects.js';
|
|
10
12
|
|
|
11
13
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
12
14
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
13
15
|
var _BaseBox = /*#__PURE__*/styled.div.attrs(function (props) {
|
|
14
|
-
return _objectSpread({}, metaAttribute({
|
|
16
|
+
return _objectSpread(_objectSpread({}, metaAttribute({
|
|
15
17
|
name: props['data-blade-component'] || MetaConstants.BaseBox,
|
|
16
18
|
testID: props['data-testid'] || props.testID
|
|
17
|
-
}));
|
|
19
|
+
})), makeAnalyticsAttribute(props));
|
|
18
20
|
}).withConfig({
|
|
19
21
|
shouldForwardProp: omitPropsFromHTML,
|
|
20
22
|
displayName: 'BaseBox'
|