@faststore/ui 2.0.173-alpha.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/atoms/Badge/Badge.d.ts +11 -0
- package/dist/atoms/Badge/Badge.js +6 -0
- package/dist/atoms/Badge/Badge.js.map +1 -0
- package/dist/atoms/Badge/index.d.ts +2 -0
- package/dist/atoms/Badge/index.js +2 -0
- package/dist/atoms/Badge/index.js.map +1 -0
- package/dist/atoms/Button/Button.d.ts +10 -0
- package/dist/atoms/Button/Button.js +6 -0
- package/dist/atoms/Button/Button.js.map +1 -0
- package/dist/atoms/Button/index.d.ts +2 -0
- package/dist/atoms/Button/index.js +2 -0
- package/dist/atoms/Button/index.js.map +1 -0
- package/dist/atoms/Checkbox/Checkbox.d.ts +10 -0
- package/dist/atoms/Checkbox/Checkbox.js +6 -0
- package/dist/atoms/Checkbox/Checkbox.js.map +1 -0
- package/dist/atoms/Checkbox/index.d.ts +2 -0
- package/dist/atoms/Checkbox/index.js +2 -0
- package/dist/atoms/Checkbox/index.js.map +1 -0
- package/dist/atoms/Icon/Icon.d.ts +14 -0
- package/dist/atoms/Icon/Icon.js +6 -0
- package/dist/atoms/Icon/Icon.js.map +1 -0
- package/dist/atoms/Icon/index.d.ts +2 -0
- package/dist/atoms/Icon/index.js +2 -0
- package/dist/atoms/Icon/index.js.map +1 -0
- package/dist/atoms/Icon/stories/assets/ShoppingCart.d.ts +3 -0
- package/dist/atoms/Icon/stories/assets/ShoppingCart.js +8 -0
- package/dist/atoms/Icon/stories/assets/ShoppingCart.js.map +1 -0
- package/dist/atoms/Incentive/Incentive.d.ts +11 -0
- package/dist/atoms/Incentive/Incentive.js +6 -0
- package/dist/atoms/Incentive/Incentive.js.map +1 -0
- package/dist/atoms/Incentive/index.d.ts +2 -0
- package/dist/atoms/Incentive/index.js +2 -0
- package/dist/atoms/Incentive/index.js.map +1 -0
- package/dist/atoms/Incentive/stories/assets/Icons.d.ts +2 -0
- package/dist/atoms/Incentive/stories/assets/Icons.js +6 -0
- package/dist/atoms/Incentive/stories/assets/Icons.js.map +1 -0
- package/dist/atoms/Input/Input.d.ts +14 -0
- package/dist/atoms/Input/Input.js +10 -0
- package/dist/atoms/Input/Input.js.map +1 -0
- package/dist/atoms/Input/index.d.ts +2 -0
- package/dist/atoms/Input/index.js +2 -0
- package/dist/atoms/Input/index.js.map +1 -0
- package/dist/atoms/Label/Label.d.ts +10 -0
- package/dist/atoms/Label/Label.js +6 -0
- package/dist/atoms/Label/Label.js.map +1 -0
- package/dist/atoms/Label/index.d.ts +2 -0
- package/dist/atoms/Label/index.js +2 -0
- package/dist/atoms/Label/index.js.map +1 -0
- package/dist/atoms/Link/Link.d.ts +19 -0
- package/dist/atoms/Link/Link.js +13 -0
- package/dist/atoms/Link/Link.js.map +1 -0
- package/dist/atoms/Link/index.d.ts +2 -0
- package/dist/atoms/Link/index.js +2 -0
- package/dist/atoms/Link/index.js.map +1 -0
- package/dist/atoms/List/List.d.ts +12 -0
- package/dist/atoms/List/List.js +16 -0
- package/dist/atoms/List/List.js.map +1 -0
- package/dist/atoms/List/index.d.ts +2 -0
- package/dist/atoms/List/index.js +2 -0
- package/dist/atoms/List/index.js.map +1 -0
- package/dist/atoms/Overlay/Overlay.d.ts +10 -0
- package/dist/atoms/Overlay/Overlay.js +6 -0
- package/dist/atoms/Overlay/Overlay.js.map +1 -0
- package/dist/atoms/Overlay/index.d.ts +2 -0
- package/dist/atoms/Overlay/index.js +2 -0
- package/dist/atoms/Overlay/index.js.map +1 -0
- package/dist/atoms/Popover/Popover.d.ts +15 -0
- package/dist/atoms/Popover/Popover.js +7 -0
- package/dist/atoms/Popover/Popover.js.map +1 -0
- package/dist/atoms/Popover/index.d.ts +2 -0
- package/dist/atoms/Popover/index.js +2 -0
- package/dist/atoms/Popover/index.js.map +1 -0
- package/dist/atoms/Price/Price.d.ts +28 -0
- package/dist/atoms/Price/Price.js +7 -0
- package/dist/atoms/Price/Price.js.map +1 -0
- package/dist/atoms/Price/index.d.ts +2 -0
- package/dist/atoms/Price/index.js +2 -0
- package/dist/atoms/Price/index.js.map +1 -0
- package/dist/atoms/Radio/Radio.d.ts +7 -0
- package/dist/atoms/Radio/Radio.js +6 -0
- package/dist/atoms/Radio/Radio.js.map +1 -0
- package/dist/atoms/Radio/index.d.ts +2 -0
- package/dist/atoms/Radio/index.js +2 -0
- package/dist/atoms/Radio/index.js.map +1 -0
- package/dist/atoms/Select/Select.d.ts +10 -0
- package/dist/atoms/Select/Select.js +6 -0
- package/dist/atoms/Select/Select.js.map +1 -0
- package/dist/atoms/Select/index.d.ts +2 -0
- package/dist/atoms/Select/index.js +2 -0
- package/dist/atoms/Select/index.js.map +1 -0
- package/dist/atoms/Skeleton/Skeleton.d.ts +10 -0
- package/dist/atoms/Skeleton/Skeleton.js +6 -0
- package/dist/atoms/Skeleton/Skeleton.js.map +1 -0
- package/dist/atoms/Skeleton/index.d.ts +2 -0
- package/dist/atoms/Skeleton/index.js +2 -0
- package/dist/atoms/Skeleton/index.js.map +1 -0
- package/dist/atoms/Slider/Slider.d.ts +67 -0
- package/dist/atoms/Slider/Slider.js +48 -0
- package/dist/atoms/Slider/Slider.js.map +1 -0
- package/dist/atoms/Slider/index.d.ts +2 -0
- package/dist/atoms/Slider/index.js +2 -0
- package/dist/atoms/Slider/index.js.map +1 -0
- package/dist/atoms/Spinner/Spinner.d.ts +11 -0
- package/dist/atoms/Spinner/Spinner.js +6 -0
- package/dist/atoms/Spinner/Spinner.js.map +1 -0
- package/dist/atoms/Spinner/index.d.ts +2 -0
- package/dist/atoms/Spinner/index.js +2 -0
- package/dist/atoms/Spinner/index.js.map +1 -0
- package/dist/atoms/TextArea/TextArea.d.ts +14 -0
- package/dist/atoms/TextArea/TextArea.js +10 -0
- package/dist/atoms/TextArea/TextArea.js.map +1 -0
- package/dist/atoms/TextArea/index.d.ts +2 -0
- package/dist/atoms/TextArea/index.js +2 -0
- package/dist/atoms/TextArea/index.js.map +1 -0
- package/dist/components/atoms/Incentive/stories/assets/Icons.d.ts +2 -0
- package/dist/components/atoms/Incentive/stories/assets/Icons.js +6 -0
- package/dist/components/atoms/Incentive/stories/assets/Icons.js.map +1 -0
- package/dist/components/atoms/Popover/Popover.d.ts +15 -0
- package/dist/components/atoms/Popover/Popover.js +7 -0
- package/dist/components/atoms/Popover/Popover.js.map +1 -0
- package/dist/components/atoms/Popover/index.d.ts +2 -0
- package/dist/components/atoms/Popover/index.js +2 -0
- package/dist/components/atoms/Popover/index.js.map +1 -0
- package/dist/components/atoms/Skeleton/Skeleton.d.ts +10 -0
- package/dist/components/atoms/Skeleton/Skeleton.js +6 -0
- package/dist/components/atoms/Skeleton/Skeleton.js.map +1 -0
- package/dist/components/atoms/Skeleton/index.d.ts +2 -0
- package/dist/components/atoms/Skeleton/index.js +2 -0
- package/dist/components/atoms/Skeleton/index.js.map +1 -0
- package/dist/components/atoms/Slider/Slider.d.ts +67 -0
- package/dist/components/atoms/Slider/Slider.js +48 -0
- package/dist/components/atoms/Slider/Slider.js.map +1 -0
- package/dist/components/atoms/Slider/index.d.ts +2 -0
- package/dist/components/atoms/Slider/index.js +2 -0
- package/dist/components/atoms/Slider/index.js.map +1 -0
- package/dist/components/atoms/Spinner/Spinner.d.ts +11 -0
- package/dist/components/atoms/Spinner/Spinner.js +6 -0
- package/dist/components/atoms/Spinner/Spinner.js.map +1 -0
- package/dist/components/atoms/Spinner/index.d.ts +2 -0
- package/dist/components/atoms/Spinner/index.js +2 -0
- package/dist/components/atoms/Spinner/index.js.map +1 -0
- package/dist/components/molecules/Accordion/Accordion.d.ts +26 -0
- package/dist/components/molecules/Accordion/Accordion.js +21 -0
- package/dist/components/molecules/Accordion/Accordion.js.map +1 -0
- package/dist/components/molecules/Accordion/AccordionButton.d.ts +10 -0
- package/dist/components/molecules/Accordion/AccordionButton.js +37 -0
- package/dist/components/molecules/Accordion/AccordionButton.js.map +1 -0
- package/dist/components/molecules/Accordion/AccordionItem.d.ts +31 -0
- package/dist/components/molecules/Accordion/AccordionItem.js +22 -0
- package/dist/components/molecules/Accordion/AccordionItem.js.map +1 -0
- package/dist/components/molecules/Accordion/AccordionPanel.d.ts +10 -0
- package/dist/components/molecules/Accordion/AccordionPanel.js +10 -0
- package/dist/components/molecules/Accordion/AccordionPanel.js.map +1 -0
- package/dist/components/molecules/Accordion/index.d.ts +8 -0
- package/dist/components/molecules/Accordion/index.js +5 -0
- package/dist/components/molecules/Accordion/index.js.map +1 -0
- package/dist/components/molecules/AggregateRating/AggregateRating.d.ts +18 -0
- package/dist/components/molecules/AggregateRating/AggregateRating.js +26 -0
- package/dist/components/molecules/AggregateRating/AggregateRating.js.map +1 -0
- package/dist/components/molecules/AggregateRating/index.d.ts +2 -0
- package/dist/components/molecules/AggregateRating/index.js +2 -0
- package/dist/components/molecules/AggregateRating/index.js.map +1 -0
- package/dist/components/molecules/Alert/Alert.d.ts +11 -0
- package/dist/components/molecules/Alert/Alert.js +6 -0
- package/dist/components/molecules/Alert/Alert.js.map +1 -0
- package/dist/components/molecules/Alert/index.d.ts +2 -0
- package/dist/components/molecules/Alert/index.js +2 -0
- package/dist/components/molecules/Alert/index.js.map +1 -0
- package/dist/components/molecules/Breadcrumb/Breadcrumb.d.ts +14 -0
- package/dist/components/molecules/Breadcrumb/Breadcrumb.js +38 -0
- package/dist/components/molecules/Breadcrumb/Breadcrumb.js.map +1 -0
- package/dist/components/molecules/Breadcrumb/index.d.ts +2 -0
- package/dist/components/molecules/Breadcrumb/index.js +2 -0
- package/dist/components/molecules/Breadcrumb/index.js.map +1 -0
- package/dist/components/molecules/Bullets/Bullets.d.ts +35 -0
- package/dist/components/molecules/Bullets/Bullets.js +12 -0
- package/dist/components/molecules/Bullets/Bullets.js.map +1 -0
- package/dist/components/molecules/Bullets/index.d.ts +2 -0
- package/dist/components/molecules/Bullets/index.js +2 -0
- package/dist/components/molecules/Bullets/index.js.map +1 -0
- package/dist/components/molecules/Card/Card.d.ts +10 -0
- package/dist/components/molecules/Card/Card.js +6 -0
- package/dist/components/molecules/Card/Card.js.map +1 -0
- package/dist/components/molecules/Card/CardActions.d.ts +10 -0
- package/dist/components/molecules/Card/CardActions.js +6 -0
- package/dist/components/molecules/Card/CardActions.js.map +1 -0
- package/dist/components/molecules/Card/CardContent.d.ts +10 -0
- package/dist/components/molecules/Card/CardContent.js +6 -0
- package/dist/components/molecules/Card/CardContent.js.map +1 -0
- package/dist/components/molecules/Card/CardImage.d.ts +10 -0
- package/dist/components/molecules/Card/CardImage.js +6 -0
- package/dist/components/molecules/Card/CardImage.js.map +1 -0
- package/dist/components/molecules/Card/index.d.ts +8 -0
- package/dist/components/molecules/Card/index.js +5 -0
- package/dist/components/molecules/Card/index.js.map +1 -0
- package/dist/components/molecules/Carousel/Arrows.d.ts +12 -0
- package/dist/components/molecules/Carousel/Arrows.js +6 -0
- package/dist/components/molecules/Carousel/Arrows.js.map +1 -0
- package/dist/components/molecules/Carousel/Carousel.d.ts +54 -0
- package/dist/components/molecules/Carousel/Carousel.js +183 -0
- package/dist/components/molecules/Carousel/Carousel.js.map +1 -0
- package/dist/components/molecules/Carousel/CarouselItem.d.ts +11 -0
- package/dist/components/molecules/Carousel/CarouselItem.js +18 -0
- package/dist/components/molecules/Carousel/CarouselItem.js.map +1 -0
- package/dist/components/molecules/Carousel/hooks/useSlideVisibility.d.ts +9 -0
- package/dist/components/molecules/Carousel/hooks/useSlideVisibility.js +29 -0
- package/dist/components/molecules/Carousel/hooks/useSlideVisibility.js.map +1 -0
- package/dist/components/molecules/Carousel/index.d.ts +2 -0
- package/dist/components/molecules/Carousel/index.js +3 -0
- package/dist/components/molecules/Carousel/index.js.map +1 -0
- package/dist/components/molecules/CartItem/CartItem.d.ts +10 -0
- package/dist/components/molecules/CartItem/CartItem.js +6 -0
- package/dist/components/molecules/CartItem/CartItem.js.map +1 -0
- package/dist/components/molecules/CartItem/CartItemActions.d.ts +10 -0
- package/dist/components/molecules/CartItem/CartItemActions.js +6 -0
- package/dist/components/molecules/CartItem/CartItemActions.js.map +1 -0
- package/dist/components/molecules/CartItem/CartItemContent.d.ts +10 -0
- package/dist/components/molecules/CartItem/CartItemContent.js +6 -0
- package/dist/components/molecules/CartItem/CartItemContent.js.map +1 -0
- package/dist/components/molecules/CartItem/CartItemImage.d.ts +10 -0
- package/dist/components/molecules/CartItem/CartItemImage.js +6 -0
- package/dist/components/molecules/CartItem/CartItemImage.js.map +1 -0
- package/dist/components/molecules/CartItem/CartItemPrices.d.ts +10 -0
- package/dist/components/molecules/CartItem/CartItemPrices.js +6 -0
- package/dist/components/molecules/CartItem/CartItemPrices.js.map +1 -0
- package/dist/components/molecules/CartItem/CartItemSummary.d.ts +10 -0
- package/dist/components/molecules/CartItem/CartItemSummary.js +6 -0
- package/dist/components/molecules/CartItem/CartItemSummary.js.map +1 -0
- package/dist/components/molecules/CartItem/CartItemTitle.d.ts +10 -0
- package/dist/components/molecules/CartItem/CartItemTitle.js +6 -0
- package/dist/components/molecules/CartItem/CartItemTitle.js.map +1 -0
- package/dist/components/molecules/CartItem/index.d.ts +14 -0
- package/dist/components/molecules/CartItem/index.js +8 -0
- package/dist/components/molecules/CartItem/index.js.map +1 -0
- package/dist/components/molecules/Dropdown/Dropdown.d.ts +9 -0
- package/dist/components/molecules/Dropdown/Dropdown.js +67 -0
- package/dist/components/molecules/Dropdown/Dropdown.js.map +1 -0
- package/dist/components/molecules/Dropdown/DropdownButton.d.ts +10 -0
- package/dist/components/molecules/Dropdown/DropdownButton.js +11 -0
- package/dist/components/molecules/Dropdown/DropdownButton.js.map +1 -0
- package/dist/components/molecules/Dropdown/DropdownItem.d.ts +10 -0
- package/dist/components/molecules/Dropdown/DropdownItem.js +26 -0
- package/dist/components/molecules/Dropdown/DropdownItem.js.map +1 -0
- package/dist/components/molecules/Dropdown/DropdownMenu.d.ts +22 -0
- package/dist/components/molecules/Dropdown/DropdownMenu.js +65 -0
- package/dist/components/molecules/Dropdown/DropdownMenu.js.map +1 -0
- package/dist/components/molecules/Dropdown/contexts/DropdownContext.d.ts +41 -0
- package/dist/components/molecules/Dropdown/contexts/DropdownContext.js +11 -0
- package/dist/components/molecules/Dropdown/contexts/DropdownContext.js.map +1 -0
- package/dist/components/molecules/Dropdown/hooks/useDropdown.d.ts +6 -0
- package/dist/components/molecules/Dropdown/hooks/useDropdown.js +14 -0
- package/dist/components/molecules/Dropdown/hooks/useDropdown.js.map +1 -0
- package/dist/components/molecules/Dropdown/hooks/useDropdownPosition.d.ts +8 -0
- package/dist/components/molecules/Dropdown/hooks/useDropdownPosition.js +25 -0
- package/dist/components/molecules/Dropdown/hooks/useDropdownPosition.js.map +1 -0
- package/dist/components/molecules/Dropdown/index.d.ts +8 -0
- package/dist/components/molecules/Dropdown/index.js +5 -0
- package/dist/components/molecules/Dropdown/index.js.map +1 -0
- package/dist/components/molecules/Dropdown/stories/assets/Caret.d.ts +2 -0
- package/dist/components/molecules/Dropdown/stories/assets/Caret.js +4 -0
- package/dist/components/molecules/Dropdown/stories/assets/Caret.js.map +1 -0
- package/dist/components/molecules/Form/Form.d.ts +11 -0
- package/dist/components/molecules/Form/Form.js +6 -0
- package/dist/components/molecules/Form/Form.js.map +1 -0
- package/dist/components/molecules/Form/index.d.ts +2 -0
- package/dist/components/molecules/Form/index.js +2 -0
- package/dist/components/molecules/Form/index.js.map +1 -0
- package/dist/components/molecules/Gift/Gift.d.ts +15 -0
- package/dist/components/molecules/Gift/Gift.js +9 -0
- package/dist/components/molecules/Gift/Gift.js.map +1 -0
- package/dist/components/molecules/Gift/GiftContent.d.ts +10 -0
- package/dist/components/molecules/Gift/GiftContent.js +6 -0
- package/dist/components/molecules/Gift/GiftContent.js.map +1 -0
- package/dist/components/molecules/Gift/GiftImage.d.ts +10 -0
- package/dist/components/molecules/Gift/GiftImage.js +6 -0
- package/dist/components/molecules/Gift/GiftImage.js.map +1 -0
- package/dist/components/molecules/Gift/index.d.ts +6 -0
- package/dist/components/molecules/Gift/index.js +4 -0
- package/dist/components/molecules/Gift/index.js.map +1 -0
- package/dist/components/molecules/LoadingButton/LoadingButton.d.ts +14 -0
- package/dist/components/molecules/LoadingButton/LoadingButton.js +8 -0
- package/dist/components/molecules/LoadingButton/LoadingButton.js.map +1 -0
- package/dist/components/molecules/LoadingButton/index.d.ts +2 -0
- package/dist/components/molecules/LoadingButton/index.js +2 -0
- package/dist/components/molecules/LoadingButton/index.js.map +1 -0
- package/dist/components/molecules/Modal/Modal.d.ts +25 -0
- package/dist/components/molecules/Modal/Modal.js +31 -0
- package/dist/components/molecules/Modal/Modal.js.map +1 -0
- package/dist/components/molecules/Modal/ModalContent.d.ts +10 -0
- package/dist/components/molecules/Modal/ModalContent.js +23 -0
- package/dist/components/molecules/Modal/ModalContent.js.map +1 -0
- package/dist/components/molecules/Modal/index.d.ts +2 -0
- package/dist/components/molecules/Modal/index.js +2 -0
- package/dist/components/molecules/Modal/index.js.map +1 -0
- package/dist/components/molecules/Modal/useTrapFocus.d.ts +8 -0
- package/dist/components/molecules/Modal/useTrapFocus.js +76 -0
- package/dist/components/molecules/Modal/useTrapFocus.js.map +1 -0
- package/dist/components/molecules/OrderSummary/OrderSummary.d.ts +35 -0
- package/dist/components/molecules/OrderSummary/OrderSummary.js +16 -0
- package/dist/components/molecules/OrderSummary/OrderSummary.js.map +1 -0
- package/dist/components/molecules/OrderSummary/index.d.ts +2 -0
- package/dist/components/molecules/OrderSummary/index.js +2 -0
- package/dist/components/molecules/OrderSummary/index.js.map +1 -0
- package/dist/components/molecules/PaymentMethods/PaymentMethods.d.ts +26 -0
- package/dist/components/molecules/PaymentMethods/PaymentMethods.js +8 -0
- package/dist/components/molecules/PaymentMethods/PaymentMethods.js.map +1 -0
- package/dist/components/molecules/PaymentMethods/index.d.ts +2 -0
- package/dist/components/molecules/PaymentMethods/index.js +2 -0
- package/dist/components/molecules/PaymentMethods/index.js.map +1 -0
- package/dist/components/molecules/PaymentMethods/stories/assets/Icons.d.ts +9 -0
- package/dist/components/molecules/PaymentMethods/stories/assets/Icons.js +26 -0
- package/dist/components/molecules/PaymentMethods/stories/assets/Icons.js.map +1 -0
- package/dist/components/molecules/PriceRange/PriceRange.d.ts +47 -0
- package/dist/components/molecules/PriceRange/PriceRange.js +28 -0
- package/dist/components/molecules/PriceRange/PriceRange.js.map +1 -0
- package/dist/components/molecules/PriceRange/index.d.ts +2 -0
- package/dist/components/molecules/PriceRange/index.js +2 -0
- package/dist/components/molecules/PriceRange/index.js.map +1 -0
- package/dist/components/molecules/ProductCard/ProductCard.d.ts +11 -0
- package/dist/components/molecules/ProductCard/ProductCard.js +6 -0
- package/dist/components/molecules/ProductCard/ProductCard.js.map +1 -0
- package/dist/components/molecules/ProductCard/ProductCardActions.d.ts +10 -0
- package/dist/components/molecules/ProductCard/ProductCardActions.js +6 -0
- package/dist/components/molecules/ProductCard/ProductCardActions.js.map +1 -0
- package/dist/components/molecules/ProductCard/ProductCardContent.d.ts +10 -0
- package/dist/components/molecules/ProductCard/ProductCardContent.js +6 -0
- package/dist/components/molecules/ProductCard/ProductCardContent.js.map +1 -0
- package/dist/components/molecules/ProductCard/ProductCardImage.d.ts +10 -0
- package/dist/components/molecules/ProductCard/ProductCardImage.js +6 -0
- package/dist/components/molecules/ProductCard/ProductCardImage.js.map +1 -0
- package/dist/components/molecules/ProductCard/index.d.ts +8 -0
- package/dist/components/molecules/ProductCard/index.js +5 -0
- package/dist/components/molecules/ProductCard/index.js.map +1 -0
- package/dist/components/molecules/ProductTitle/ProductTitle.d.ts +47 -0
- package/dist/components/molecules/ProductTitle/ProductTitle.js +12 -0
- package/dist/components/molecules/ProductTitle/ProductTitle.js.map +1 -0
- package/dist/components/molecules/ProductTitle/index.d.ts +2 -0
- package/dist/components/molecules/ProductTitle/index.js +2 -0
- package/dist/components/molecules/ProductTitle/index.js.map +1 -0
- package/dist/components/molecules/QuantitySelector/QuantitySelector.d.ts +29 -0
- package/dist/components/molecules/QuantitySelector/QuantitySelector.js +10 -0
- package/dist/components/molecules/QuantitySelector/QuantitySelector.js.map +1 -0
- package/dist/components/molecules/QuantitySelector/index.d.ts +2 -0
- package/dist/components/molecules/QuantitySelector/index.js +2 -0
- package/dist/components/molecules/QuantitySelector/index.js.map +1 -0
- package/dist/components/molecules/QuantitySelector/stories/assets/Icons.d.ts +7 -0
- package/dist/components/molecules/QuantitySelector/stories/assets/Icons.js +11 -0
- package/dist/components/molecules/QuantitySelector/stories/assets/Icons.js.map +1 -0
- package/dist/components/molecules/RadioGroup/RadioGroup.d.ts +5 -0
- package/dist/components/molecules/RadioGroup/RadioGroup.js +10 -0
- package/dist/components/molecules/RadioGroup/RadioGroup.js.map +1 -0
- package/dist/components/molecules/RadioGroup/RadioOption.d.ts +19 -0
- package/dist/components/molecules/RadioGroup/RadioOption.js +11 -0
- package/dist/components/molecules/RadioGroup/RadioOption.js.map +1 -0
- package/dist/components/molecules/RadioGroup/index.d.ts +4 -0
- package/dist/components/molecules/RadioGroup/index.js +3 -0
- package/dist/components/molecules/RadioGroup/index.js.map +1 -0
- package/dist/components/molecules/RadioGroup/useRadioGroup.d.ts +17 -0
- package/dist/components/molecules/RadioGroup/useRadioGroup.js +10 -0
- package/dist/components/molecules/RadioGroup/useRadioGroup.js.map +1 -0
- package/dist/components/molecules/SearchInput/SearchInput.d.ts +28 -0
- package/dist/components/molecules/SearchInput/SearchInput.js +26 -0
- package/dist/components/molecules/SearchInput/SearchInput.js.map +1 -0
- package/dist/components/molecules/SearchInput/index.d.ts +2 -0
- package/dist/components/molecules/SearchInput/index.js +2 -0
- package/dist/components/molecules/SearchInput/index.js.map +1 -0
- package/dist/components/molecules/SearchInput/stories/assets/CustomIcon.d.ts +3 -0
- package/dist/components/molecules/SearchInput/stories/assets/CustomIcon.js +7 -0
- package/dist/components/molecules/SearchInput/stories/assets/CustomIcon.js.map +1 -0
- package/dist/components/molecules/SkuSelector/SkuSelector.d.ts +58 -0
- package/dist/components/molecules/SkuSelector/SkuSelector.js +16 -0
- package/dist/components/molecules/SkuSelector/SkuSelector.js.map +1 -0
- package/dist/components/molecules/SkuSelector/index.d.ts +2 -0
- package/dist/components/molecules/SkuSelector/index.js +2 -0
- package/dist/components/molecules/SkuSelector/index.js.map +1 -0
- package/dist/components/organisms/OutOfStock/OutOfStock.d.ts +21 -0
- package/dist/components/organisms/OutOfStock/OutOfStock.js +8 -0
- package/dist/components/organisms/OutOfStock/OutOfStock.js.map +1 -0
- package/dist/components/organisms/OutOfStock/OutOfStockMessage.d.ts +9 -0
- package/dist/components/organisms/OutOfStock/OutOfStockMessage.js +5 -0
- package/dist/components/organisms/OutOfStock/OutOfStockMessage.js.map +1 -0
- package/dist/components/organisms/OutOfStock/OutOfStockTitle.d.ts +9 -0
- package/dist/components/organisms/OutOfStock/OutOfStockTitle.js +5 -0
- package/dist/components/organisms/OutOfStock/OutOfStockTitle.js.map +1 -0
- package/dist/components/organisms/OutOfStock/index.d.ts +6 -0
- package/dist/components/organisms/OutOfStock/index.js +4 -0
- package/dist/components/organisms/OutOfStock/index.js.map +1 -0
- package/dist/hooks/useSlider/index.d.ts +2 -0
- package/dist/hooks/useSlider/index.js +3 -0
- package/dist/hooks/useSlider/index.js.map +1 -0
- package/dist/hooks/useSlider/useSlider.d.ts +64 -0
- package/dist/hooks/useSlider/useSlider.js +103 -0
- package/dist/hooks/useSlider/useSlider.js.map +1 -0
- package/dist/index.d.ts +0 -2
- package/dist/index.js +0 -2
- package/dist/index.js.map +1 -1
- package/dist/molecules/Accordion/Accordion.d.ts +26 -0
- package/dist/molecules/Accordion/Accordion.js +21 -0
- package/dist/molecules/Accordion/Accordion.js.map +1 -0
- package/dist/molecules/Accordion/AccordionButton.d.ts +10 -0
- package/dist/molecules/Accordion/AccordionButton.js +37 -0
- package/dist/molecules/Accordion/AccordionButton.js.map +1 -0
- package/dist/molecules/Accordion/AccordionItem.d.ts +37 -0
- package/dist/molecules/Accordion/AccordionItem.js +28 -0
- package/dist/molecules/Accordion/AccordionItem.js.map +1 -0
- package/dist/molecules/Accordion/AccordionPanel.d.ts +10 -0
- package/dist/molecules/Accordion/AccordionPanel.js +10 -0
- package/dist/molecules/Accordion/AccordionPanel.js.map +1 -0
- package/dist/molecules/Accordion/index.d.ts +8 -0
- package/dist/molecules/Accordion/index.js +5 -0
- package/dist/molecules/Accordion/index.js.map +1 -0
- package/dist/molecules/AggregateRating/AggregateRating.d.ts +18 -0
- package/dist/molecules/AggregateRating/AggregateRating.js +26 -0
- package/dist/molecules/AggregateRating/AggregateRating.js.map +1 -0
- package/dist/molecules/AggregateRating/index.d.ts +2 -0
- package/dist/molecules/AggregateRating/index.js +2 -0
- package/dist/molecules/AggregateRating/index.js.map +1 -0
- package/dist/molecules/Alert/Alert.d.ts +11 -0
- package/dist/molecules/Alert/Alert.js +6 -0
- package/dist/molecules/Alert/Alert.js.map +1 -0
- package/dist/molecules/Alert/index.d.ts +2 -0
- package/dist/molecules/Alert/index.js +2 -0
- package/dist/molecules/Alert/index.js.map +1 -0
- package/dist/molecules/Banner/Banner.d.ts +14 -0
- package/dist/molecules/Banner/Banner.js +6 -0
- package/dist/molecules/Banner/Banner.js.map +1 -0
- package/dist/molecules/Banner/BannerContent.d.ts +10 -0
- package/dist/molecules/Banner/BannerContent.js +6 -0
- package/dist/molecules/Banner/BannerContent.js.map +1 -0
- package/dist/molecules/Banner/BannerImage.d.ts +10 -0
- package/dist/molecules/Banner/BannerImage.js +6 -0
- package/dist/molecules/Banner/BannerImage.js.map +1 -0
- package/dist/molecules/Banner/BannerLink.d.ts +10 -0
- package/dist/molecules/Banner/BannerLink.js +6 -0
- package/dist/molecules/Banner/BannerLink.js.map +1 -0
- package/dist/molecules/Banner/index.d.ts +8 -0
- package/dist/molecules/Banner/index.js +5 -0
- package/dist/molecules/Banner/index.js.map +1 -0
- package/dist/molecules/Breadcrumb/Breadcrumb.d.ts +14 -0
- package/dist/molecules/Breadcrumb/Breadcrumb.js +38 -0
- package/dist/molecules/Breadcrumb/Breadcrumb.js.map +1 -0
- package/dist/molecules/Breadcrumb/index.d.ts +2 -0
- package/dist/molecules/Breadcrumb/index.js +2 -0
- package/dist/molecules/Breadcrumb/index.js.map +1 -0
- package/dist/molecules/Bullets/Bullets.d.ts +35 -0
- package/dist/molecules/Bullets/Bullets.js +12 -0
- package/dist/molecules/Bullets/Bullets.js.map +1 -0
- package/dist/molecules/Bullets/index.d.ts +2 -0
- package/dist/molecules/Bullets/index.js +2 -0
- package/dist/molecules/Bullets/index.js.map +1 -0
- package/dist/molecules/Card/Card.d.ts +10 -0
- package/dist/molecules/Card/Card.js +6 -0
- package/dist/molecules/Card/Card.js.map +1 -0
- package/dist/molecules/Card/CardActions.d.ts +10 -0
- package/dist/molecules/Card/CardActions.js +6 -0
- package/dist/molecules/Card/CardActions.js.map +1 -0
- package/dist/molecules/Card/CardContent.d.ts +10 -0
- package/dist/molecules/Card/CardContent.js +6 -0
- package/dist/molecules/Card/CardContent.js.map +1 -0
- package/dist/molecules/Card/CardImage.d.ts +10 -0
- package/dist/molecules/Card/CardImage.js +6 -0
- package/dist/molecules/Card/CardImage.js.map +1 -0
- package/dist/molecules/Card/index.d.ts +8 -0
- package/dist/molecules/Card/index.js +5 -0
- package/dist/molecules/Card/index.js.map +1 -0
- package/dist/molecules/Carousel/Arrows.d.ts +12 -0
- package/dist/molecules/Carousel/Arrows.js +6 -0
- package/dist/molecules/Carousel/Arrows.js.map +1 -0
- package/dist/molecules/Carousel/Carousel.d.ts +54 -0
- package/dist/molecules/Carousel/Carousel.js +183 -0
- package/dist/molecules/Carousel/Carousel.js.map +1 -0
- package/dist/molecules/Carousel/CarouselItem.d.ts +11 -0
- package/dist/molecules/Carousel/CarouselItem.js +18 -0
- package/dist/molecules/Carousel/CarouselItem.js.map +1 -0
- package/dist/molecules/Carousel/hooks/useSlideVisibility.d.ts +9 -0
- package/dist/molecules/Carousel/hooks/useSlideVisibility.js +29 -0
- package/dist/molecules/Carousel/hooks/useSlideVisibility.js.map +1 -0
- package/dist/molecules/Carousel/index.d.ts +2 -0
- package/dist/molecules/Carousel/index.js +3 -0
- package/dist/molecules/Carousel/index.js.map +1 -0
- package/dist/molecules/CartItem/CartItem.d.ts +10 -0
- package/dist/molecules/CartItem/CartItem.js +6 -0
- package/dist/molecules/CartItem/CartItem.js.map +1 -0
- package/dist/molecules/CartItem/CartItemActions.d.ts +10 -0
- package/dist/molecules/CartItem/CartItemActions.js +6 -0
- package/dist/molecules/CartItem/CartItemActions.js.map +1 -0
- package/dist/molecules/CartItem/CartItemContent.d.ts +10 -0
- package/dist/molecules/CartItem/CartItemContent.js +6 -0
- package/dist/molecules/CartItem/CartItemContent.js.map +1 -0
- package/dist/molecules/CartItem/CartItemImage.d.ts +10 -0
- package/dist/molecules/CartItem/CartItemImage.js +6 -0
- package/dist/molecules/CartItem/CartItemImage.js.map +1 -0
- package/dist/molecules/CartItem/CartItemPrices.d.ts +10 -0
- package/dist/molecules/CartItem/CartItemPrices.js +6 -0
- package/dist/molecules/CartItem/CartItemPrices.js.map +1 -0
- package/dist/molecules/CartItem/CartItemSummary.d.ts +10 -0
- package/dist/molecules/CartItem/CartItemSummary.js +6 -0
- package/dist/molecules/CartItem/CartItemSummary.js.map +1 -0
- package/dist/molecules/CartItem/CartItemTitle.d.ts +10 -0
- package/dist/molecules/CartItem/CartItemTitle.js +6 -0
- package/dist/molecules/CartItem/CartItemTitle.js.map +1 -0
- package/dist/molecules/CartItem/index.d.ts +14 -0
- package/dist/molecules/CartItem/index.js +8 -0
- package/dist/molecules/CartItem/index.js.map +1 -0
- package/dist/molecules/Dropdown/Dropdown.d.ts +9 -0
- package/dist/molecules/Dropdown/Dropdown.js +67 -0
- package/dist/molecules/Dropdown/Dropdown.js.map +1 -0
- package/dist/molecules/Dropdown/DropdownButton.d.ts +10 -0
- package/dist/molecules/Dropdown/DropdownButton.js +11 -0
- package/dist/molecules/Dropdown/DropdownButton.js.map +1 -0
- package/dist/molecules/Dropdown/DropdownItem.d.ts +10 -0
- package/dist/molecules/Dropdown/DropdownItem.js +26 -0
- package/dist/molecules/Dropdown/DropdownItem.js.map +1 -0
- package/dist/molecules/Dropdown/DropdownMenu.d.ts +22 -0
- package/dist/molecules/Dropdown/DropdownMenu.js +65 -0
- package/dist/molecules/Dropdown/DropdownMenu.js.map +1 -0
- package/dist/molecules/Dropdown/contexts/DropdownContext.d.ts +41 -0
- package/dist/molecules/Dropdown/contexts/DropdownContext.js +11 -0
- package/dist/molecules/Dropdown/contexts/DropdownContext.js.map +1 -0
- package/dist/molecules/Dropdown/hooks/useDropdown.d.ts +6 -0
- package/dist/molecules/Dropdown/hooks/useDropdown.js +14 -0
- package/dist/molecules/Dropdown/hooks/useDropdown.js.map +1 -0
- package/dist/molecules/Dropdown/hooks/useDropdownPosition.d.ts +8 -0
- package/dist/molecules/Dropdown/hooks/useDropdownPosition.js +25 -0
- package/dist/molecules/Dropdown/hooks/useDropdownPosition.js.map +1 -0
- package/dist/molecules/Dropdown/index.d.ts +8 -0
- package/dist/molecules/Dropdown/index.js +5 -0
- package/dist/molecules/Dropdown/index.js.map +1 -0
- package/dist/molecules/Dropdown/stories/assets/Caret.d.ts +2 -0
- package/dist/molecules/Dropdown/stories/assets/Caret.js +4 -0
- package/dist/molecules/Dropdown/stories/assets/Caret.js.map +1 -0
- package/dist/molecules/Form/Form.d.ts +11 -0
- package/dist/molecules/Form/Form.js +6 -0
- package/dist/molecules/Form/Form.js.map +1 -0
- package/dist/molecules/Form/index.d.ts +2 -0
- package/dist/molecules/Form/index.js +2 -0
- package/dist/molecules/Form/index.js.map +1 -0
- package/dist/molecules/Gift/Gift.d.ts +16 -0
- package/dist/molecules/Gift/Gift.js +9 -0
- package/dist/molecules/Gift/Gift.js.map +1 -0
- package/dist/molecules/Gift/GiftContent.d.ts +10 -0
- package/dist/molecules/Gift/GiftContent.js +6 -0
- package/dist/molecules/Gift/GiftContent.js.map +1 -0
- package/dist/molecules/Gift/GiftImage.d.ts +10 -0
- package/dist/molecules/Gift/GiftImage.js +6 -0
- package/dist/molecules/Gift/GiftImage.js.map +1 -0
- package/dist/molecules/Gift/index.d.ts +6 -0
- package/dist/molecules/Gift/index.js +4 -0
- package/dist/molecules/Gift/index.js.map +1 -0
- package/dist/molecules/IconButton/IconButton.d.ts +19 -0
- package/dist/molecules/IconButton/IconButton.js +9 -0
- package/dist/molecules/IconButton/IconButton.js.map +1 -0
- package/dist/molecules/IconButton/index.d.ts +2 -0
- package/dist/molecules/IconButton/index.js +2 -0
- package/dist/molecules/IconButton/index.js.map +1 -0
- package/dist/molecules/LoadingButton/LoadingButton.d.ts +14 -0
- package/dist/molecules/LoadingButton/LoadingButton.js +8 -0
- package/dist/molecules/LoadingButton/LoadingButton.js.map +1 -0
- package/dist/molecules/LoadingButton/index.d.ts +2 -0
- package/dist/molecules/LoadingButton/index.js +2 -0
- package/dist/molecules/LoadingButton/index.js.map +1 -0
- package/dist/molecules/Modal/Modal.d.ts +25 -0
- package/dist/molecules/Modal/Modal.js +31 -0
- package/dist/molecules/Modal/Modal.js.map +1 -0
- package/dist/molecules/Modal/ModalContent.d.ts +10 -0
- package/dist/molecules/Modal/ModalContent.js +23 -0
- package/dist/molecules/Modal/ModalContent.js.map +1 -0
- package/dist/molecules/Modal/index.d.ts +2 -0
- package/dist/molecules/Modal/index.js +2 -0
- package/dist/molecules/Modal/index.js.map +1 -0
- package/dist/molecules/Modal/useTrapFocus.d.ts +8 -0
- package/dist/molecules/Modal/useTrapFocus.js +76 -0
- package/dist/molecules/Modal/useTrapFocus.js.map +1 -0
- package/dist/molecules/OrderSummary/OrderSummary.d.ts +35 -0
- package/dist/molecules/OrderSummary/OrderSummary.js +16 -0
- package/dist/molecules/OrderSummary/OrderSummary.js.map +1 -0
- package/dist/molecules/OrderSummary/index.d.ts +2 -0
- package/dist/molecules/OrderSummary/index.js +2 -0
- package/dist/molecules/OrderSummary/index.js.map +1 -0
- package/dist/molecules/PaymentMethods/PaymentMethods.d.ts +26 -0
- package/dist/molecules/PaymentMethods/PaymentMethods.js +8 -0
- package/dist/molecules/PaymentMethods/PaymentMethods.js.map +1 -0
- package/dist/molecules/PaymentMethods/index.d.ts +2 -0
- package/dist/molecules/PaymentMethods/index.js +2 -0
- package/dist/molecules/PaymentMethods/index.js.map +1 -0
- package/dist/molecules/PaymentMethods/stories/assets/Icons.d.ts +9 -0
- package/dist/molecules/PaymentMethods/stories/assets/Icons.js +26 -0
- package/dist/molecules/PaymentMethods/stories/assets/Icons.js.map +1 -0
- package/dist/molecules/PriceRange/PriceRange.d.ts +47 -0
- package/dist/molecules/PriceRange/PriceRange.js +28 -0
- package/dist/molecules/PriceRange/PriceRange.js.map +1 -0
- package/dist/molecules/PriceRange/index.d.ts +2 -0
- package/dist/molecules/PriceRange/index.js +2 -0
- package/dist/molecules/PriceRange/index.js.map +1 -0
- package/dist/molecules/ProductCard/ProductCard.d.ts +11 -0
- package/dist/molecules/ProductCard/ProductCard.js +6 -0
- package/dist/molecules/ProductCard/ProductCard.js.map +1 -0
- package/dist/molecules/ProductCard/ProductCardActions.d.ts +10 -0
- package/dist/molecules/ProductCard/ProductCardActions.js +6 -0
- package/dist/molecules/ProductCard/ProductCardActions.js.map +1 -0
- package/dist/molecules/ProductCard/ProductCardContent.d.ts +10 -0
- package/dist/molecules/ProductCard/ProductCardContent.js +6 -0
- package/dist/molecules/ProductCard/ProductCardContent.js.map +1 -0
- package/dist/molecules/ProductCard/ProductCardImage.d.ts +10 -0
- package/dist/molecules/ProductCard/ProductCardImage.js +6 -0
- package/dist/molecules/ProductCard/ProductCardImage.js.map +1 -0
- package/dist/molecules/ProductCard/index.d.ts +8 -0
- package/dist/molecules/ProductCard/index.js +5 -0
- package/dist/molecules/ProductCard/index.js.map +1 -0
- package/dist/molecules/ProductTitle/ProductTitle.d.ts +47 -0
- package/dist/molecules/ProductTitle/ProductTitle.js +12 -0
- package/dist/molecules/ProductTitle/ProductTitle.js.map +1 -0
- package/dist/molecules/ProductTitle/index.d.ts +2 -0
- package/dist/molecules/ProductTitle/index.js +2 -0
- package/dist/molecules/ProductTitle/index.js.map +1 -0
- package/dist/molecules/QuantitySelector/QuantitySelector.d.ts +30 -0
- package/dist/molecules/QuantitySelector/QuantitySelector.js +11 -0
- package/dist/molecules/QuantitySelector/QuantitySelector.js.map +1 -0
- package/dist/molecules/QuantitySelector/index.d.ts +2 -0
- package/dist/molecules/QuantitySelector/index.js +2 -0
- package/dist/molecules/QuantitySelector/index.js.map +1 -0
- package/dist/molecules/QuantitySelector/stories/assets/Icons.d.ts +7 -0
- package/dist/molecules/QuantitySelector/stories/assets/Icons.js +11 -0
- package/dist/molecules/QuantitySelector/stories/assets/Icons.js.map +1 -0
- package/dist/molecules/RadioGroup/RadioGroup.d.ts +5 -0
- package/dist/molecules/RadioGroup/RadioGroup.js +10 -0
- package/dist/molecules/RadioGroup/RadioGroup.js.map +1 -0
- package/dist/molecules/RadioGroup/RadioOption.d.ts +19 -0
- package/dist/molecules/RadioGroup/RadioOption.js +11 -0
- package/dist/molecules/RadioGroup/RadioOption.js.map +1 -0
- package/dist/molecules/RadioGroup/index.d.ts +4 -0
- package/dist/molecules/RadioGroup/index.js +3 -0
- package/dist/molecules/RadioGroup/index.js.map +1 -0
- package/dist/molecules/RadioGroup/useRadioGroup.d.ts +17 -0
- package/dist/molecules/RadioGroup/useRadioGroup.js +10 -0
- package/dist/molecules/RadioGroup/useRadioGroup.js.map +1 -0
- package/dist/molecules/SearchInput/SearchInput.d.ts +28 -0
- package/dist/molecules/SearchInput/SearchInput.js +28 -0
- package/dist/molecules/SearchInput/SearchInput.js.map +1 -0
- package/dist/molecules/SearchInput/index.d.ts +2 -0
- package/dist/molecules/SearchInput/index.js +2 -0
- package/dist/molecules/SearchInput/index.js.map +1 -0
- package/dist/molecules/SearchInput/stories/assets/CustomIcon.d.ts +3 -0
- package/dist/molecules/SearchInput/stories/assets/CustomIcon.js +7 -0
- package/dist/molecules/SearchInput/stories/assets/CustomIcon.js.map +1 -0
- package/dist/molecules/SkuSelector/SkuSelector.d.ts +58 -0
- package/dist/molecules/SkuSelector/SkuSelector.js +15 -0
- package/dist/molecules/SkuSelector/SkuSelector.js.map +1 -0
- package/dist/molecules/SkuSelector/index.d.ts +2 -0
- package/dist/molecules/SkuSelector/index.js +2 -0
- package/dist/molecules/SkuSelector/index.js.map +1 -0
- package/dist/molecules/Table/Table.d.ts +11 -0
- package/dist/molecules/Table/Table.js +6 -0
- package/dist/molecules/Table/Table.js.map +1 -0
- package/dist/molecules/Table/TableBody.d.ts +11 -0
- package/dist/molecules/Table/TableBody.js +6 -0
- package/dist/molecules/Table/TableBody.js.map +1 -0
- package/dist/molecules/Table/TableCell.d.ts +20 -0
- package/dist/molecules/Table/TableCell.js +7 -0
- package/dist/molecules/Table/TableCell.js.map +1 -0
- package/dist/molecules/Table/TableFooter.d.ts +11 -0
- package/dist/molecules/Table/TableFooter.js +6 -0
- package/dist/molecules/Table/TableFooter.js.map +1 -0
- package/dist/molecules/Table/TableHead.d.ts +11 -0
- package/dist/molecules/Table/TableHead.js +6 -0
- package/dist/molecules/Table/TableHead.js.map +1 -0
- package/dist/molecules/Table/TableRow.d.ts +11 -0
- package/dist/molecules/Table/TableRow.js +6 -0
- package/dist/molecules/Table/TableRow.js.map +1 -0
- package/dist/molecules/Table/index.d.ts +12 -0
- package/dist/molecules/Table/index.js +7 -0
- package/dist/molecules/Table/index.js.map +1 -0
- package/dist/organisms/Hero/Hero.d.ts +11 -0
- package/dist/organisms/Hero/Hero.js +6 -0
- package/dist/organisms/Hero/Hero.js.map +1 -0
- package/dist/organisms/Hero/HeroHeading.d.ts +10 -0
- package/dist/organisms/Hero/HeroHeading.js +6 -0
- package/dist/organisms/Hero/HeroHeading.js.map +1 -0
- package/dist/organisms/Hero/HeroImage.d.ts +10 -0
- package/dist/organisms/Hero/HeroImage.js +6 -0
- package/dist/organisms/Hero/HeroImage.js.map +1 -0
- package/dist/organisms/Hero/index.d.ts +6 -0
- package/dist/organisms/Hero/index.js +4 -0
- package/dist/organisms/Hero/index.js.map +1 -0
- package/dist/organisms/OutOfStock/OutOfStock.d.ts +21 -0
- package/dist/organisms/OutOfStock/OutOfStock.js +8 -0
- package/dist/organisms/OutOfStock/OutOfStock.js.map +1 -0
- package/dist/organisms/OutOfStock/OutOfStockMessage.d.ts +9 -0
- package/dist/organisms/OutOfStock/OutOfStockMessage.js +5 -0
- package/dist/organisms/OutOfStock/OutOfStockMessage.js.map +1 -0
- package/dist/organisms/OutOfStock/OutOfStockTitle.d.ts +9 -0
- package/dist/organisms/OutOfStock/OutOfStockTitle.js +5 -0
- package/dist/organisms/OutOfStock/OutOfStockTitle.js.map +1 -0
- package/dist/organisms/OutOfStock/index.d.ts +6 -0
- package/dist/organisms/OutOfStock/index.js +4 -0
- package/dist/organisms/OutOfStock/index.js.map +1 -0
- package/dist/organisms/Tiles/Tile.d.ts +11 -0
- package/dist/organisms/Tiles/Tile.js +6 -0
- package/dist/organisms/Tiles/Tile.js.map +1 -0
- package/dist/organisms/Tiles/Tiles.d.ts +11 -0
- package/dist/organisms/Tiles/Tiles.js +30 -0
- package/dist/organisms/Tiles/Tiles.js.map +1 -0
- package/dist/organisms/Tiles/index.d.ts +4 -0
- package/dist/organisms/Tiles/index.js +3 -0
- package/dist/organisms/Tiles/index.js.map +1 -0
- package/dist/setupTests.d.ts +1 -0
- package/dist/setupTests.js +6 -0
- package/dist/setupTests.js.map +1 -0
- package/dist/utils/toHaveNoIncomplete.d.ts +17 -0
- package/dist/utils/toHaveNoIncomplete.js +43 -0
- package/dist/utils/toHaveNoIncomplete.js.map +1 -0
- package/package.json +4 -4
- package/src/components/{molecules → organisms}/Banner/styles.scss +11 -11
- package/src/components/organisms/BannerNewsletter/styles.scss +1 -1
- package/src/index.ts +0 -14
- package/src/styles/base/layout.scss +10 -0
- package/src/styles/components.scss +1 -1
- package/src/components/molecules/Banner/Banner.tsx +0 -31
- package/src/components/molecules/Banner/BannerContent.tsx +0 -24
- package/src/components/molecules/Banner/BannerImage.tsx +0 -24
- package/src/components/molecules/Banner/BannerLink.tsx +0 -24
- package/src/components/molecules/Banner/index.ts +0 -11
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React, { useImperativeHandle, forwardRef, useRef, useState } from 'react';
|
|
2
|
+
import { useDropdown } from './hooks/useDropdown';
|
|
3
|
+
const DropdownItem = forwardRef(function Button({ children, onClick, testId = 'store-dropdown-item', ...otherProps }, ref) {
|
|
4
|
+
const { dropdownItemsRef, selectedDropdownItemIndexRef, close } = useDropdown();
|
|
5
|
+
const [dropdownItemIndex, setDropdownItemIndex] = useState(0);
|
|
6
|
+
const dropdownItemRef = useRef();
|
|
7
|
+
const addToRefs = (el) => {
|
|
8
|
+
if (el && !dropdownItemsRef?.current.includes(el)) {
|
|
9
|
+
dropdownItemsRef?.current.push(el);
|
|
10
|
+
setDropdownItemIndex(dropdownItemsRef?.current.findIndex((element) => element === el) ?? 0);
|
|
11
|
+
}
|
|
12
|
+
dropdownItemRef.current = el;
|
|
13
|
+
};
|
|
14
|
+
const onFocusItem = () => {
|
|
15
|
+
selectedDropdownItemIndexRef.current = dropdownItemIndex;
|
|
16
|
+
dropdownItemsRef?.current[selectedDropdownItemIndexRef.current]?.focus();
|
|
17
|
+
};
|
|
18
|
+
const handleOnClickItem = (event) => {
|
|
19
|
+
onClick?.(event);
|
|
20
|
+
close?.();
|
|
21
|
+
};
|
|
22
|
+
useImperativeHandle(ref, () => dropdownItemRef.current, []);
|
|
23
|
+
return (React.createElement("button", { "data-fs-dropdown-item": true, "data-testid": testId, ref: addToRefs, onFocus: onFocusItem, onMouseEnter: onFocusItem, onClick: handleOnClickItem, role: "menuitem", tabIndex: -1, "data-index": dropdownItemIndex, ...otherProps }, children));
|
|
24
|
+
});
|
|
25
|
+
export default DropdownItem;
|
|
26
|
+
//# sourceMappingURL=DropdownItem.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DropdownItem.js","sourceRoot":"","sources":["../../../../src/components/molecules/Dropdown/DropdownItem.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAEhF,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AAUjD,MAAM,YAAY,GAAG,UAAU,CAC7B,SAAS,MAAM,CACb,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,GAAG,qBAAqB,EAAE,GAAG,UAAU,EAAE,EACpE,GAAG;IAEH,MAAM,EAAE,gBAAgB,EAAE,4BAA4B,EAAE,KAAK,EAAE,GAC7D,WAAW,EAAE,CAAA;IAEf,MAAM,CAAC,iBAAiB,EAAE,oBAAoB,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAA;IAC7D,MAAM,eAAe,GAAG,MAAM,EAAqB,CAAA;IAEnD,MAAM,SAAS,GAAG,CAAC,EAAqB,EAAE,EAAE;QAC1C,IAAI,EAAE,IAAI,CAAC,gBAAgB,EAAE,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAE;YACjD,gBAAgB,EAAE,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;YAClC,oBAAoB,CAClB,gBAAgB,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,KAAK,EAAE,CAAC,IAAI,CAAC,CACtE,CAAA;SACF;QAED,eAAe,CAAC,OAAO,GAAG,EAAE,CAAA;IAC9B,CAAC,CAAA;IAED,MAAM,WAAW,GAAG,GAAG,EAAE;QACvB,4BAA6B,CAAC,OAAO,GAAG,iBAAiB,CAAA;QACzD,gBAAgB,EAAE,OAAO,CAAC,4BAA6B,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,CAAA;IAC3E,CAAC,CAAA;IAED,MAAM,iBAAiB,GAAG,CACxB,KAAsD,EACtD,EAAE;QACF,OAAO,EAAE,CAAC,KAAK,CAAC,CAAA;QAChB,KAAK,EAAE,EAAE,CAAA;IACX,CAAC,CAAA;IAED,mBAAmB,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC,eAAe,CAAC,OAAQ,EAAE,EAAE,CAAC,CAAA;IAE5D,OAAO,CACL,8EAEe,MAAM,EACnB,GAAG,EAAE,SAAS,EACd,OAAO,EAAE,WAAW,EACpB,YAAY,EAAE,WAAW,EACzB,OAAO,EAAE,iBAAiB,EAC1B,IAAI,EAAC,UAAU,EACf,QAAQ,EAAE,CAAC,CAAC,gBACA,iBAAiB,KACzB,UAAU,IAEb,QAAQ,CACF,CACV,CAAA;AACH,CAAC,CACF,CAAA;AAED,eAAe,YAAY,CAAA"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { AriaAttributes, KeyboardEvent, PropsWithChildren, MouseEvent, ReactNode } from 'react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import type { ModalContentProps } from '../Modal/ModalContent';
|
|
4
|
+
export interface DropdownMenuProps extends ModalContentProps {
|
|
5
|
+
/**
|
|
6
|
+
* ID to find this component in testing tools (e.g.: cypress, testing library, and jest).
|
|
7
|
+
*/
|
|
8
|
+
testId?: string;
|
|
9
|
+
/**
|
|
10
|
+
* Identifies the element (or elements) that labels the current element.
|
|
11
|
+
* @see aria-labelledby https://www.w3.org/TR/wai-aria-1.1/#aria-labelledby
|
|
12
|
+
*/
|
|
13
|
+
'aria-labelledby'?: AriaAttributes['aria-label'];
|
|
14
|
+
/**
|
|
15
|
+
* This function is called whenever the user hits "Escape" or clicks outside
|
|
16
|
+
* the dialog.
|
|
17
|
+
*/
|
|
18
|
+
onDismiss?: (event: MouseEvent | KeyboardEvent) => void;
|
|
19
|
+
children: ReactNode[] | ReactNode;
|
|
20
|
+
}
|
|
21
|
+
declare const DropdownMenu: ({ children, testId, style, ...otherProps }: PropsWithChildren<DropdownMenuProps>) => React.ReactPortal | null;
|
|
22
|
+
export default DropdownMenu;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { createPortal } from 'react-dom';
|
|
3
|
+
import { useDropdown } from './hooks/useDropdown';
|
|
4
|
+
import { useDropdownPosition } from './hooks/useDropdownPosition';
|
|
5
|
+
/*
|
|
6
|
+
* This component is based on @reach/dialog.
|
|
7
|
+
* https://github.com/reach/reach-ui/blob/main/packages/dialog/src/index.tsx
|
|
8
|
+
* https://reach.tech/dialog
|
|
9
|
+
*/
|
|
10
|
+
const DropdownMenu = ({ children, testId = 'store-dropdown-menu', style, ...otherProps }) => {
|
|
11
|
+
const { isOpen, close, dropdownItemsRef, selectedDropdownItemIndexRef, id } = useDropdown();
|
|
12
|
+
const dropdownPosition = useDropdownPosition();
|
|
13
|
+
const childrenLength = React.Children.toArray(children).length;
|
|
14
|
+
const handleDownPress = () => {
|
|
15
|
+
if (selectedDropdownItemIndexRef.current < childrenLength - 1) {
|
|
16
|
+
selectedDropdownItemIndexRef.current++;
|
|
17
|
+
}
|
|
18
|
+
else {
|
|
19
|
+
selectedDropdownItemIndexRef.current = 0;
|
|
20
|
+
}
|
|
21
|
+
dropdownItemsRef?.current[selectedDropdownItemIndexRef.current]?.focus();
|
|
22
|
+
};
|
|
23
|
+
const handleUpPress = () => {
|
|
24
|
+
if (selectedDropdownItemIndexRef.current > 0) {
|
|
25
|
+
selectedDropdownItemIndexRef.current--;
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
selectedDropdownItemIndexRef.current = childrenLength - 1;
|
|
29
|
+
}
|
|
30
|
+
dropdownItemsRef?.current[selectedDropdownItemIndexRef.current]?.focus();
|
|
31
|
+
};
|
|
32
|
+
const handleHomePress = () => {
|
|
33
|
+
selectedDropdownItemIndexRef.current = 0;
|
|
34
|
+
dropdownItemsRef?.current[selectedDropdownItemIndexRef.current]?.focus();
|
|
35
|
+
};
|
|
36
|
+
const handleEndPress = () => {
|
|
37
|
+
selectedDropdownItemIndexRef.current = childrenLength - 1;
|
|
38
|
+
dropdownItemsRef?.current[selectedDropdownItemIndexRef.current]?.focus();
|
|
39
|
+
};
|
|
40
|
+
const handleEscapePress = () => {
|
|
41
|
+
close?.();
|
|
42
|
+
};
|
|
43
|
+
const handleBackdropKeyDown = (event) => {
|
|
44
|
+
if (event.defaultPrevented || event.key === 'Enter') {
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
event.preventDefault();
|
|
48
|
+
event.key === 'Escape' && handleEscapePress();
|
|
49
|
+
event.key === 'ArrowDown' && handleDownPress();
|
|
50
|
+
event.key === 'ArrowUp' && handleUpPress();
|
|
51
|
+
event.key === 'Home' && handleHomePress();
|
|
52
|
+
event.key === 'End' && handleEndPress();
|
|
53
|
+
event.stopPropagation();
|
|
54
|
+
};
|
|
55
|
+
const clearChildrenReferences = () => {
|
|
56
|
+
dropdownItemsRef.current = [];
|
|
57
|
+
return null;
|
|
58
|
+
};
|
|
59
|
+
return isOpen
|
|
60
|
+
? createPortal(React.createElement("div", { role: "presentation", "data-fs-dropdown-overlay": true, onKeyDown: handleBackdropKeyDown, "data-testid": `${testId}-overlay` },
|
|
61
|
+
React.createElement("div", { role: "menu", "aria-orientation": "vertical", "data-fs-dropdown-menu": true, "data-testid": testId, style: { ...dropdownPosition, ...style }, id: id, ...otherProps }, children)), document.body)
|
|
62
|
+
: clearChildrenReferences();
|
|
63
|
+
};
|
|
64
|
+
export default DropdownMenu;
|
|
65
|
+
//# sourceMappingURL=DropdownMenu.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DropdownMenu.js","sourceRoot":"","sources":["../../../../src/components/molecules/Dropdown/DropdownMenu.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAGxC,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AACjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAA;AAsBjE;;;;GAIG;AAEH,MAAM,YAAY,GAAG,CAAC,EACpB,QAAQ,EACR,MAAM,GAAG,qBAAqB,EAC9B,KAAK,EACL,GAAG,UAAU,EACwB,EAAE,EAAE;IACzC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,gBAAgB,EAAE,4BAA4B,EAAE,EAAE,EAAE,GACzE,WAAW,EAAE,CAAA;IAEf,MAAM,gBAAgB,GAAG,mBAAmB,EAAE,CAAA;IAE9C,MAAM,cAAc,GAAG,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAA;IAE9D,MAAM,eAAe,GAAG,GAAG,EAAE;QAC3B,IAAI,4BAA6B,CAAC,OAAO,GAAG,cAAc,GAAG,CAAC,EAAE;YAC9D,4BAA6B,CAAC,OAAO,EAAE,CAAA;SACxC;aAAM;YACL,4BAA6B,CAAC,OAAO,GAAG,CAAC,CAAA;SAC1C;QAED,gBAAgB,EAAE,OAAO,CAAC,4BAA6B,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,CAAA;IAC3E,CAAC,CAAA;IAED,MAAM,aAAa,GAAG,GAAG,EAAE;QACzB,IAAI,4BAA6B,CAAC,OAAO,GAAG,CAAC,EAAE;YAC7C,4BAA6B,CAAC,OAAO,EAAE,CAAA;SACxC;aAAM;YACL,4BAA6B,CAAC,OAAO,GAAG,cAAc,GAAG,CAAC,CAAA;SAC3D;QAED,gBAAgB,EAAE,OAAO,CAAC,4BAA6B,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,CAAA;IAC3E,CAAC,CAAA;IAED,MAAM,eAAe,GAAG,GAAG,EAAE;QAC3B,4BAA6B,CAAC,OAAO,GAAG,CAAC,CAAA;QACzC,gBAAgB,EAAE,OAAO,CAAC,4BAA6B,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,CAAA;IAC3E,CAAC,CAAA;IAED,MAAM,cAAc,GAAG,GAAG,EAAE;QAC1B,4BAA6B,CAAC,OAAO,GAAG,cAAc,GAAG,CAAC,CAAA;QAC1D,gBAAgB,EAAE,OAAO,CAAC,4BAA6B,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,CAAA;IAC3E,CAAC,CAAA;IAED,MAAM,iBAAiB,GAAG,GAAG,EAAE;QAC7B,KAAK,EAAE,EAAE,CAAA;IACX,CAAC,CAAA;IAED,MAAM,qBAAqB,GAAG,CAAC,KAAoB,EAAE,EAAE;QACrD,IAAI,KAAK,CAAC,gBAAgB,IAAI,KAAK,CAAC,GAAG,KAAK,OAAO,EAAE;YACnD,OAAM;SACP;QAED,KAAK,CAAC,cAAc,EAAE,CAAA;QAEtB,KAAK,CAAC,GAAG,KAAK,QAAQ,IAAI,iBAAiB,EAAE,CAAA;QAE7C,KAAK,CAAC,GAAG,KAAK,WAAW,IAAI,eAAe,EAAE,CAAA;QAE9C,KAAK,CAAC,GAAG,KAAK,SAAS,IAAI,aAAa,EAAE,CAAA;QAE1C,KAAK,CAAC,GAAG,KAAK,MAAM,IAAI,eAAe,EAAE,CAAA;QAEzC,KAAK,CAAC,GAAG,KAAK,KAAK,IAAI,cAAc,EAAE,CAAA;QAEvC,KAAK,CAAC,eAAe,EAAE,CAAA;IACzB,CAAC,CAAA;IAED,MAAM,uBAAuB,GAAG,GAAG,EAAE;QACnC,gBAAiB,CAAC,OAAO,GAAG,EAAE,CAAA;QAE9B,OAAO,IAAI,CAAA;IACb,CAAC,CAAA;IAED,OAAO,MAAM;QACX,CAAC,CAAC,YAAY,CACV,6BACE,IAAI,EAAC,cAAc,oCAEnB,SAAS,EAAE,qBAAqB,iBACnB,GAAG,MAAM,UAAU;YAEhC,6BACE,IAAI,EAAC,MAAM,sBACM,UAAU,gDAEd,MAAM,EACnB,KAAK,EAAE,EAAE,GAAG,gBAAgB,EAAE,GAAG,KAAK,EAAE,EACxC,EAAE,EAAE,EAAE,KACF,UAAU,IAEb,QAAQ,CACL,CACF,EACN,QAAQ,CAAC,IAAI,CACd;QACH,CAAC,CAAC,uBAAuB,EAAE,CAAA;AAC/B,CAAC,CAAA;AAED,eAAe,YAAY,CAAA"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export type DropdownContextState = {
|
|
3
|
+
/**
|
|
4
|
+
* Control de Dropdown state as Opened (true) or Closed (false).
|
|
5
|
+
*/
|
|
6
|
+
isOpen: boolean;
|
|
7
|
+
/**
|
|
8
|
+
* Reference to DropdownButton, used to calculate a position for the DropdownMenu.
|
|
9
|
+
*/
|
|
10
|
+
dropdownButtonRef: React.RefObject<HTMLButtonElement> | null;
|
|
11
|
+
/**
|
|
12
|
+
* Reference to a selected DropdownItem, used to manipulate focus.
|
|
13
|
+
*/
|
|
14
|
+
selectedDropdownItemIndexRef: React.MutableRefObject<number> | null;
|
|
15
|
+
/**
|
|
16
|
+
* Array of References to dropdownItems in a DropdownMenu.
|
|
17
|
+
*/
|
|
18
|
+
dropdownItemsRef: React.MutableRefObject<HTMLButtonElement[]> | null;
|
|
19
|
+
/**
|
|
20
|
+
* Close DropdownMenu event inherited from Modal.
|
|
21
|
+
*/
|
|
22
|
+
onDismiss?(): void;
|
|
23
|
+
/**
|
|
24
|
+
* Function responsible for close the DropdownMenu in this context.
|
|
25
|
+
*/
|
|
26
|
+
close?(): void;
|
|
27
|
+
/**
|
|
28
|
+
* Function responsible for open the DropdownMenu in this context.
|
|
29
|
+
*/
|
|
30
|
+
open?(): void;
|
|
31
|
+
/**
|
|
32
|
+
* Function responsible for switch the the DropdownMenu state in this context.
|
|
33
|
+
*/
|
|
34
|
+
toggle?(): void;
|
|
35
|
+
/**
|
|
36
|
+
* Identifier to be used in aria-controls
|
|
37
|
+
*/
|
|
38
|
+
id: string;
|
|
39
|
+
};
|
|
40
|
+
declare const DropdownContext: import("react").Context<DropdownContextState>;
|
|
41
|
+
export default DropdownContext;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { createContext } from 'react';
|
|
2
|
+
const defaultState = {
|
|
3
|
+
isOpen: false,
|
|
4
|
+
dropdownButtonRef: null,
|
|
5
|
+
selectedDropdownItemIndexRef: null,
|
|
6
|
+
dropdownItemsRef: null,
|
|
7
|
+
id: 'store-dropdown',
|
|
8
|
+
};
|
|
9
|
+
const DropdownContext = createContext(defaultState);
|
|
10
|
+
export default DropdownContext;
|
|
11
|
+
//# sourceMappingURL=DropdownContext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DropdownContext.js","sourceRoot":"","sources":["../../../../../src/components/molecules/Dropdown/contexts/DropdownContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AA0CrC,MAAM,YAAY,GAAyB;IACzC,MAAM,EAAE,KAAK;IACb,iBAAiB,EAAE,IAAI;IACvB,4BAA4B,EAAE,IAAI;IAClC,gBAAgB,EAAE,IAAI;IACtB,EAAE,EAAE,gBAAgB;CACrB,CAAA;AAED,MAAM,eAAe,GAAG,aAAa,CAAuB,YAAY,CAAC,CAAA;AAEzE,eAAe,eAAe,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { useContext } from 'react';
|
|
2
|
+
import DropdownContext from '../contexts/DropdownContext';
|
|
3
|
+
/**
|
|
4
|
+
* Hook to use the Dropdown context.
|
|
5
|
+
* @returns Dropdown context.
|
|
6
|
+
*/
|
|
7
|
+
export const useDropdown = () => {
|
|
8
|
+
const context = useContext(DropdownContext);
|
|
9
|
+
if (context === undefined) {
|
|
10
|
+
throw new Error('Do not use useDropdown hook outside the Dropdown context.');
|
|
11
|
+
}
|
|
12
|
+
return context;
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=useDropdown.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDropdown.js","sourceRoot":"","sources":["../../../../../src/components/molecules/Dropdown/hooks/useDropdown.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAGlC,OAAO,eAAe,MAAM,6BAA6B,CAAA;AAEzD;;;GAGG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,EAAE;IAC9B,MAAM,OAAO,GAAG,UAAU,CAAuB,eAAe,CAAC,CAAA;IAEjE,IAAI,OAAO,KAAK,SAAS,EAAE;QACzB,MAAM,IAAI,KAAK,CAAC,2DAA2D,CAAC,CAAA;KAC7E;IAED,OAAO,OAAO,CAAA;AAChB,CAAC,CAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
type DropdownPosition = Pick<React.CSSProperties, 'position' | 'top' | 'left'>;
|
|
3
|
+
/**
|
|
4
|
+
* Hook used to find the DropdownMenu position in relation to DropdownButton
|
|
5
|
+
* @returns Style with positions.
|
|
6
|
+
*/
|
|
7
|
+
export declare const useDropdownPosition: () => DropdownPosition;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { useDropdown } from './useDropdown';
|
|
2
|
+
/**
|
|
3
|
+
* Hook used to find the DropdownMenu position in relation to DropdownButton
|
|
4
|
+
* @returns Style with positions.
|
|
5
|
+
*/
|
|
6
|
+
export const useDropdownPosition = () => {
|
|
7
|
+
const { dropdownButtonRef } = useDropdown();
|
|
8
|
+
// Necessary to use this component in SSR
|
|
9
|
+
const isBrowser = typeof window !== 'undefined';
|
|
10
|
+
const buttonRect = dropdownButtonRef?.current?.getBoundingClientRect();
|
|
11
|
+
const topLevel = buttonRect?.top ?? 0;
|
|
12
|
+
const topOffset = buttonRect?.height ?? 0;
|
|
13
|
+
const leftLevel = buttonRect?.left ?? 0;
|
|
14
|
+
// The scroll properties fix the position of DropdownMenu when the scroll is activated.
|
|
15
|
+
const scrollTop = isBrowser ? document?.documentElement?.scrollTop : 0;
|
|
16
|
+
const scrollLeft = isBrowser ? document?.documentElement?.scrollLeft : 0;
|
|
17
|
+
const topPosition = topLevel + topOffset + scrollTop;
|
|
18
|
+
const leftPosition = leftLevel + scrollLeft;
|
|
19
|
+
return {
|
|
20
|
+
position: 'absolute',
|
|
21
|
+
top: topPosition,
|
|
22
|
+
left: leftPosition,
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=useDropdownPosition.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDropdownPosition.js","sourceRoot":"","sources":["../../../../../src/components/molecules/Dropdown/hooks/useDropdownPosition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAI3C;;;GAGG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,GAAqB,EAAE;IACxD,MAAM,EAAE,iBAAiB,EAAE,GAAG,WAAW,EAAE,CAAA;IAE3C,yCAAyC;IACzC,MAAM,SAAS,GAAG,OAAO,MAAM,KAAK,WAAW,CAAA;IAE/C,MAAM,UAAU,GAAG,iBAAiB,EAAE,OAAO,EAAE,qBAAqB,EAAE,CAAA;IACtE,MAAM,QAAQ,GAAG,UAAU,EAAE,GAAG,IAAI,CAAC,CAAA;IACrC,MAAM,SAAS,GAAG,UAAU,EAAE,MAAM,IAAI,CAAC,CAAA;IACzC,MAAM,SAAS,GAAG,UAAU,EAAE,IAAI,IAAI,CAAC,CAAA;IAEvC,uFAAuF;IACvF,MAAM,SAAS,GAAG,SAAS,CAAC,CAAC,CAAC,QAAQ,EAAE,eAAe,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,CAAA;IACtE,MAAM,UAAU,GAAG,SAAS,CAAC,CAAC,CAAC,QAAQ,EAAE,eAAe,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,CAAA;IAExE,MAAM,WAAW,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,CAAA;IAEpD,MAAM,YAAY,GAAG,SAAS,GAAG,UAAU,CAAA;IAE3C,OAAO;QACL,QAAQ,EAAE,UAAU;QACpB,GAAG,EAAE,WAAW;QAChB,IAAI,EAAE,YAAY;KACnB,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { default } from './Dropdown';
|
|
2
|
+
export type { DropdownProps } from './Dropdown';
|
|
3
|
+
export { default as DropdownButton } from './DropdownButton';
|
|
4
|
+
export type { DropdownButtonProps } from './DropdownButton';
|
|
5
|
+
export { default as DropdownItem } from './DropdownItem';
|
|
6
|
+
export type { DropdownItemProps } from './DropdownItem';
|
|
7
|
+
export { default as DropdownMenu } from './DropdownMenu';
|
|
8
|
+
export type { DropdownMenuProps } from './DropdownMenu';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/molecules/Dropdown/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AAGpC,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAG5D,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAGxD,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAA"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export const Caret = () => (React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", className: "feather feather-chevron-down", style: { display: 'inline' } },
|
|
3
|
+
React.createElement("polyline", { points: "6 9 12 15 18 9" })));
|
|
4
|
+
//# sourceMappingURL=Caret.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Caret.js","sourceRoot":"","sources":["../../../../../../src/components/molecules/Dropdown/stories/assets/Caret.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,MAAM,CAAC,MAAM,KAAK,GAAG,GAAG,EAAE,CAAC,CACzB,6BACE,KAAK,EAAC,4BAA4B,EAClC,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,EACX,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,MAAM,EACX,MAAM,EAAC,cAAc,EACrB,WAAW,EAAC,GAAG,EACf,aAAa,EAAC,OAAO,EACrB,cAAc,EAAC,OAAO,EACtB,SAAS,EAAC,8BAA8B,EACxC,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;IAE5B,kCAAU,MAAM,EAAC,gBAAgB,GAAG,CAChC,CACP,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { FormHTMLAttributes } from 'react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export interface FormProps extends FormHTMLAttributes<HTMLFormElement> {
|
|
4
|
+
/**
|
|
5
|
+
* ID to find this component in testing tools (e.g.: cypress,
|
|
6
|
+
* testing-library, and jest).
|
|
7
|
+
*/
|
|
8
|
+
testId?: string;
|
|
9
|
+
}
|
|
10
|
+
declare const Form: React.ForwardRefExoticComponent<FormProps & React.RefAttributes<HTMLFormElement>>;
|
|
11
|
+
export default Form;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React, { forwardRef } from 'react';
|
|
2
|
+
const Form = forwardRef(function Form({ testId = 'store-form', children, ...otherProps }, ref) {
|
|
3
|
+
return (React.createElement("form", { ref: ref, "data-fs-form": true, "data-testid": testId, ...otherProps }, children));
|
|
4
|
+
});
|
|
5
|
+
export default Form;
|
|
6
|
+
//# sourceMappingURL=Form.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Form.js","sourceRoot":"","sources":["../../../../src/components/molecules/Form/Form.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAUzC,MAAM,IAAI,GAAG,UAAU,CAA6B,SAAS,IAAI,CAC/D,EAAE,MAAM,GAAG,YAAY,EAAE,QAAQ,EAAE,GAAG,UAAU,EAAE,EAClD,GAAG;IAEH,OAAO,CACL,8BAAM,GAAG,EAAE,GAAG,uCAA4B,MAAM,KAAM,UAAU,IAC7D,QAAQ,CACJ,CACR,CAAA;AACH,CAAC,CAAC,CAAA;AAEF,eAAe,IAAI,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/molecules/Form/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export interface GiftProps extends HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
/**
|
|
5
|
+
* ID to find this component in testing tools (e.g.: cypress,
|
|
6
|
+
* testing-library, and jest).
|
|
7
|
+
*/
|
|
8
|
+
testId?: string;
|
|
9
|
+
/**
|
|
10
|
+
* A React component that will be rendered as an icon.
|
|
11
|
+
*/
|
|
12
|
+
icon?: ReactNode;
|
|
13
|
+
}
|
|
14
|
+
declare const Gift: React.ForwardRefExoticComponent<GiftProps & React.RefAttributes<HTMLDivElement>>;
|
|
15
|
+
export default Gift;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React, { forwardRef } from 'react';
|
|
2
|
+
import { Icon } from '@faststore/components';
|
|
3
|
+
const Gift = forwardRef(function Gift({ icon, testId = 'store-gift', children, ...otherProps }, ref) {
|
|
4
|
+
return (React.createElement("div", { ref: ref, "data-fs-gift": true, "data-testid": testId, ...otherProps },
|
|
5
|
+
icon && React.createElement(Icon, { component: icon, "data-fs-gift-icon": true }),
|
|
6
|
+
React.createElement("div", { "data-fs-gift-wrapper": true }, children)));
|
|
7
|
+
});
|
|
8
|
+
export default Gift;
|
|
9
|
+
//# sourceMappingURL=Gift.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Gift.js","sourceRoot":"","sources":["../../../../src/components/molecules/Gift/Gift.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAEzC,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAA;AAc5C,MAAM,IAAI,GAAG,UAAU,CAA4B,SAAS,IAAI,CAC9D,EAAE,IAAI,EAAE,MAAM,GAAG,YAAY,EAAE,QAAQ,EAAE,GAAG,UAAU,EAAE,EACxD,GAAG;IAEH,OAAO,CACL,6BAAK,GAAG,EAAE,GAAG,uCAA4B,MAAM,KAAM,UAAU;QAC5D,IAAI,IAAI,oBAAC,IAAI,IAAC,SAAS,EAAE,IAAI,8BAAsB;QACpD,6DAA2B,QAAQ,CAAO,CACtC,CACP,CAAA;AACH,CAAC,CAAC,CAAA;AAEF,eAAe,IAAI,CAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export interface GiftContentProps extends HTMLAttributes<HTMLElement> {
|
|
4
|
+
/**
|
|
5
|
+
* ID to find this component in testing tools (e.g.: cypress, testing library, and jest).
|
|
6
|
+
*/
|
|
7
|
+
testId?: string;
|
|
8
|
+
}
|
|
9
|
+
declare const GiftContent: React.ForwardRefExoticComponent<GiftContentProps & React.RefAttributes<HTMLElement>>;
|
|
10
|
+
export default GiftContent;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React, { forwardRef } from 'react';
|
|
2
|
+
const GiftContent = forwardRef(function GiftContent({ testId = 'store-gift-content', children, ...otherProps }, ref) {
|
|
3
|
+
return (React.createElement("section", { ref: ref, "data-fs-gift-content": true, "data-testid": testId, ...otherProps }, children));
|
|
4
|
+
});
|
|
5
|
+
export default GiftContent;
|
|
6
|
+
//# sourceMappingURL=GiftContent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GiftContent.js","sourceRoot":"","sources":["../../../../src/components/molecules/Gift/GiftContent.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AASzC,MAAM,WAAW,GAAG,UAAU,CAC5B,SAAS,WAAW,CAClB,EAAE,MAAM,GAAG,oBAAoB,EAAE,QAAQ,EAAE,GAAG,UAAU,EAAE,EAC1D,GAAG;IAEH,OAAO,CACL,iCACE,GAAG,EAAE,GAAG,+CAEK,MAAM,KACf,UAAU,IAEb,QAAQ,CACD,CACX,CAAA;AACH,CAAC,CACF,CAAA;AAED,eAAe,WAAW,CAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export interface GiftImageProps extends HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
/**
|
|
5
|
+
* ID to find this component in testing tools (e.g.: cypress, testing library, and jest).
|
|
6
|
+
*/
|
|
7
|
+
testId?: string;
|
|
8
|
+
}
|
|
9
|
+
declare const GiftImage: React.ForwardRefExoticComponent<GiftImageProps & React.RefAttributes<HTMLDivElement>>;
|
|
10
|
+
export default GiftImage;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React, { forwardRef } from 'react';
|
|
2
|
+
const GiftImage = forwardRef(function GiftImage({ testId = 'store-gift-image', children, ...otherProps }, ref) {
|
|
3
|
+
return (React.createElement("div", { ref: ref, "data-fs-gift-image": true, "data-testid": testId, ...otherProps }, children));
|
|
4
|
+
});
|
|
5
|
+
export default GiftImage;
|
|
6
|
+
//# sourceMappingURL=GiftImage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GiftImage.js","sourceRoot":"","sources":["../../../../src/components/molecules/Gift/GiftImage.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AASzC,MAAM,SAAS,GAAG,UAAU,CAAiC,SAAS,SAAS,CAC7E,EAAE,MAAM,GAAG,kBAAkB,EAAE,QAAQ,EAAE,GAAG,UAAU,EAAE,EACxD,GAAG;IAEH,OAAO,CACL,6BAAK,GAAG,EAAE,GAAG,6CAAkC,MAAM,KAAM,UAAU,IAClE,QAAQ,CACL,CACP,CAAA;AACH,CAAC,CAAC,CAAA;AAEF,eAAe,SAAS,CAAA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { default } from './Gift';
|
|
2
|
+
export type { GiftProps } from './Gift';
|
|
3
|
+
export { default as GiftContent } from './GiftContent';
|
|
4
|
+
export type { GiftContentProps } from './GiftContent';
|
|
5
|
+
export { default as GiftImage } from './GiftImage';
|
|
6
|
+
export type { GiftImageProps } from './GiftImage';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/molecules/Gift/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAA;AAGhC,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAA;AAGtD,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ButtonProps } from '@faststore/components';
|
|
3
|
+
export interface LoadingButtonProps extends ButtonProps {
|
|
4
|
+
/**
|
|
5
|
+
* ID to find this component in testing tools (e.g.: cypress, testing library, and jest).
|
|
6
|
+
*/
|
|
7
|
+
testId?: string;
|
|
8
|
+
/**
|
|
9
|
+
* The current loading state of the button.
|
|
10
|
+
*/
|
|
11
|
+
loading: boolean;
|
|
12
|
+
}
|
|
13
|
+
declare const LoadingButton: React.ForwardRefExoticComponent<LoadingButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
14
|
+
export default LoadingButton;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React, { forwardRef } from 'react';
|
|
2
|
+
import { Button } from '@faststore/components';
|
|
3
|
+
import Spinner from '../../atoms/Spinner';
|
|
4
|
+
const LoadingButton = forwardRef(function LoadingButton({ children, loading, testId = 'store-loading-button', ...otherProps }, ref) {
|
|
5
|
+
return (React.createElement(Button, { ref: ref, "data-fs-loading-button": true, testId: testId, ...otherProps }, loading ? React.createElement(Spinner, null) : children));
|
|
6
|
+
});
|
|
7
|
+
export default LoadingButton;
|
|
8
|
+
//# sourceMappingURL=LoadingButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LoadingButton.js","sourceRoot":"","sources":["../../../../src/components/molecules/LoadingButton/LoadingButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAEzC,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAA;AAE9C,OAAO,OAAO,MAAM,qBAAqB,CAAA;AAazC,MAAM,aAAa,GAAG,UAAU,CAC9B,SAAS,aAAa,CACpB,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,GAAG,sBAAsB,EAAE,GAAG,UAAU,EAAE,EACrE,GAAG;IAEH,OAAO,CACL,oBAAC,MAAM,IAAC,GAAG,EAAE,GAAG,kCAAyB,MAAM,EAAE,MAAM,KAAM,UAAU,IACpE,OAAO,CAAC,CAAC,CAAC,oBAAC,OAAO,OAAG,CAAC,CAAC,CAAC,QAAQ,CAC1B,CACV,CAAA;AACH,CAAC,CACF,CAAA;AAED,eAAe,aAAa,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/molecules/LoadingButton/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAA"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { AriaAttributes, KeyboardEvent, MouseEvent, PropsWithChildren } from 'react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import type { ModalContentProps } from './ModalContent';
|
|
4
|
+
export interface ModalProps extends ModalContentProps {
|
|
5
|
+
/**
|
|
6
|
+
* ID to find this component in testing tools (e.g.: cypress, testing library, and jest).
|
|
7
|
+
*/
|
|
8
|
+
testId?: string;
|
|
9
|
+
/**
|
|
10
|
+
* Identifies the element (or elements) that labels the current element.
|
|
11
|
+
* @see aria-labelledby https://www.w3.org/TR/wai-aria-1.1/#aria-labelledby
|
|
12
|
+
*/
|
|
13
|
+
'aria-labelledby'?: AriaAttributes['aria-label'];
|
|
14
|
+
/**
|
|
15
|
+
* This function is called whenever the user hits "Escape" or clicks outside
|
|
16
|
+
* the dialog.
|
|
17
|
+
*/
|
|
18
|
+
onDismiss?: (event: MouseEvent | KeyboardEvent) => void;
|
|
19
|
+
/**
|
|
20
|
+
* Controls whether or not the dialog is open.
|
|
21
|
+
*/
|
|
22
|
+
isOpen: boolean;
|
|
23
|
+
}
|
|
24
|
+
declare const Modal: ({ isOpen, children, onDismiss, testId, ...otherProps }: PropsWithChildren<ModalProps>) => React.ReactPortal | null;
|
|
25
|
+
export default Modal;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { createPortal } from 'react-dom';
|
|
3
|
+
import { Overlay } from '@faststore/components';
|
|
4
|
+
import ModalContent from './ModalContent';
|
|
5
|
+
/*
|
|
6
|
+
* This component is based on @reach/dialog.
|
|
7
|
+
* https://github.com/reach/reach-ui/blob/main/packages/dialog/src/index.tsx
|
|
8
|
+
* https://reach.tech/dialog
|
|
9
|
+
*/
|
|
10
|
+
const Modal = ({ isOpen, children, onDismiss, testId = 'store-modal', ...otherProps }) => {
|
|
11
|
+
const handleBackdropClick = (event) => {
|
|
12
|
+
if (event.defaultPrevented) {
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
event.stopPropagation();
|
|
16
|
+
onDismiss?.(event);
|
|
17
|
+
};
|
|
18
|
+
const handleBackdropKeyDown = (event) => {
|
|
19
|
+
if (event.key !== 'Escape' || event.defaultPrevented) {
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
event.stopPropagation();
|
|
23
|
+
onDismiss?.(event);
|
|
24
|
+
};
|
|
25
|
+
return isOpen
|
|
26
|
+
? createPortal(React.createElement(Overlay, { onClick: handleBackdropClick, onKeyDown: handleBackdropKeyDown },
|
|
27
|
+
React.createElement(ModalContent, { ...otherProps, testId: testId }, children)), document.body)
|
|
28
|
+
: null;
|
|
29
|
+
};
|
|
30
|
+
export default Modal;
|
|
31
|
+
//# sourceMappingURL=Modal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Modal.js","sourceRoot":"","sources":["../../../../src/components/molecules/Modal/Modal.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAExC,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAA;AAE/C,OAAO,YAAY,MAAM,gBAAgB,CAAA;AAwBzC;;;;GAIG;AAEH,MAAM,KAAK,GAAG,CAAC,EACb,MAAM,EACN,QAAQ,EACR,SAAS,EACT,MAAM,GAAG,aAAa,EACtB,GAAG,UAAU,EACiB,EAAE,EAAE;IAClC,MAAM,mBAAmB,GAAG,CAAC,KAAiB,EAAE,EAAE;QAChD,IAAI,KAAK,CAAC,gBAAgB,EAAE;YAC1B,OAAM;SACP;QAED,KAAK,CAAC,eAAe,EAAE,CAAA;QACvB,SAAS,EAAE,CAAC,KAAK,CAAC,CAAA;IACpB,CAAC,CAAA;IAED,MAAM,qBAAqB,GAAG,CAAC,KAAoB,EAAE,EAAE;QACrD,IAAI,KAAK,CAAC,GAAG,KAAK,QAAQ,IAAI,KAAK,CAAC,gBAAgB,EAAE;YACpD,OAAM;SACP;QAED,KAAK,CAAC,eAAe,EAAE,CAAA;QACvB,SAAS,EAAE,CAAC,KAAK,CAAC,CAAA;IACpB,CAAC,CAAA;IAED,OAAO,MAAM;QACX,CAAC,CAAC,YAAY,CACV,oBAAC,OAAO,IACN,OAAO,EAAE,mBAAmB,EAC5B,SAAS,EAAE,qBAAqB;YAEhC,oBAAC,YAAY,OAAK,UAAU,EAAE,MAAM,EAAE,MAAM,IACzC,QAAQ,CACI,CACP,EACV,QAAQ,CAAC,IAAI,CACd;QACH,CAAC,CAAC,IAAI,CAAA;AACV,CAAC,CAAA;AAED,eAAe,KAAK,CAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { DetailedHTMLProps, HTMLAttributes, RefObject } from 'react';
|
|
2
|
+
interface ModalContentPureProps extends Omit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, 'ref'> {
|
|
3
|
+
beforeElementRef: RefObject<HTMLDivElement>;
|
|
4
|
+
trapFocusRef: RefObject<HTMLDivElement>;
|
|
5
|
+
afterElementRef: RefObject<HTMLDivElement>;
|
|
6
|
+
testId?: string;
|
|
7
|
+
}
|
|
8
|
+
export type ModalContentProps = Omit<ModalContentPureProps, 'trapFocusRef' | 'onClick' | 'beforeElementRef' | 'afterElementRef'>;
|
|
9
|
+
declare const ModalContent: ({ children, ...otherProps }: ModalContentProps) => JSX.Element;
|
|
10
|
+
export default ModalContent;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React, { useRef } from 'react';
|
|
2
|
+
import useTrapFocus from './useTrapFocus';
|
|
3
|
+
const ModalContentPure = ({ beforeElementRef, trapFocusRef, afterElementRef, testId = 'store-modal-content', children, ...otherProps }) => {
|
|
4
|
+
return (React.createElement(React.Fragment, null,
|
|
5
|
+
React.createElement("div", { ref: beforeElementRef, "data-testid": "beforeElement", tabIndex: 0, "aria-hidden": "true" }),
|
|
6
|
+
React.createElement("div", { "data-fs-modal-content": true, "data-testid": testId, ref: trapFocusRef, "aria-modal": "true", role: "dialog", tabIndex: -1, ...otherProps }, children),
|
|
7
|
+
React.createElement("div", { ref: afterElementRef, "data-testid": "afterElement", tabIndex: 0, "aria-hidden": "true" })));
|
|
8
|
+
};
|
|
9
|
+
const ModalContent = ({ children, ...otherProps }) => {
|
|
10
|
+
const trapFocusRef = useRef(null);
|
|
11
|
+
const beforeElementRef = useRef(null);
|
|
12
|
+
const afterElementRef = useRef(null);
|
|
13
|
+
useTrapFocus({
|
|
14
|
+
beforeElementRef,
|
|
15
|
+
trapFocusRef,
|
|
16
|
+
afterElementRef,
|
|
17
|
+
});
|
|
18
|
+
return (React.createElement(ModalContentPure, { ...otherProps, trapFocusRef: trapFocusRef, beforeElementRef: beforeElementRef, afterElementRef: afterElementRef, onClick: (event) => {
|
|
19
|
+
event.stopPropagation();
|
|
20
|
+
} }, children));
|
|
21
|
+
};
|
|
22
|
+
export default ModalContent;
|
|
23
|
+
//# sourceMappingURL=ModalContent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ModalContent.js","sourceRoot":"","sources":["../../../../src/components/molecules/Modal/ModalContent.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,OAAO,CAAA;AAErC,OAAO,YAAY,MAAM,gBAAgB,CAAA;AAazC,MAAM,gBAAgB,GAAG,CAAC,EACxB,gBAAgB,EAChB,YAAY,EACZ,eAAe,EACf,MAAM,GAAG,qBAAqB,EAC9B,QAAQ,EACR,GAAG,UAAU,EACS,EAAE,EAAE;IAC1B,OAAO,CACL;QACE,6BACE,GAAG,EAAE,gBAAgB,iBACT,eAAe,EAC3B,QAAQ,EAAE,CAAC,iBACC,MAAM,GAClB;QACF,2EAEe,MAAM,EACnB,GAAG,EAAE,YAAY,gBACN,MAAM,EACjB,IAAI,EAAC,QAAQ,EACb,QAAQ,EAAE,CAAC,CAAC,KACR,UAAU,IAEb,QAAQ,CACL;QACN,6BACE,GAAG,EAAE,eAAe,iBACR,cAAc,EAC1B,QAAQ,EAAE,CAAC,iBACC,MAAM,GAClB,CACD,CACJ,CAAA;AACH,CAAC,CAAA;AAOD,MAAM,YAAY,GAAG,CAAC,EAAE,QAAQ,EAAE,GAAG,UAAU,EAAqB,EAAE,EAAE;IACtE,MAAM,YAAY,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAA;IACjD,MAAM,gBAAgB,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAA;IACrD,MAAM,eAAe,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAA;IAEpD,YAAY,CAAC;QACX,gBAAgB;QAChB,YAAY;QACZ,eAAe;KAChB,CAAC,CAAA;IAEF,OAAO,CACL,oBAAC,gBAAgB,OACX,UAAU,EACd,YAAY,EAAE,YAAY,EAC1B,gBAAgB,EAAE,gBAAgB,EAClC,eAAe,EAAE,eAAe,EAChC,OAAO,EAAE,CAAC,KAAiB,EAAE,EAAE;YAC7B,KAAK,CAAC,eAAe,EAAE,CAAA;QACzB,CAAC,IAEA,QAAQ,CACQ,CACpB,CAAA;AACH,CAAC,CAAA;AAED,eAAe,YAAY,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/molecules/Modal/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { RefObject } from 'react';
|
|
2
|
+
interface TrapFocusParams {
|
|
3
|
+
beforeElementRef: RefObject<HTMLElement>;
|
|
4
|
+
trapFocusRef: RefObject<HTMLElement>;
|
|
5
|
+
afterElementRef: RefObject<HTMLElement>;
|
|
6
|
+
}
|
|
7
|
+
declare const useTrapFocus: ({ trapFocusRef, beforeElementRef, afterElementRef, }: TrapFocusParams) => void;
|
|
8
|
+
export default useTrapFocus;
|