@faststore/ui 2.2.0 → 2.2.13
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/package.json +3 -3
- package/src/components/molecules/Carousel/styles.scss +20 -37
- package/src/components/organisms/ImageGallery/styles.scss +2 -28
- package/dist/atoms/Badge/Badge.d.ts +0 -11
- package/dist/atoms/Badge/Badge.js +0 -6
- package/dist/atoms/Badge/Badge.js.map +0 -1
- package/dist/atoms/Badge/index.d.ts +0 -2
- package/dist/atoms/Badge/index.js +0 -2
- package/dist/atoms/Badge/index.js.map +0 -1
- package/dist/atoms/Button/Button.d.ts +0 -10
- package/dist/atoms/Button/Button.js +0 -6
- package/dist/atoms/Button/Button.js.map +0 -1
- package/dist/atoms/Button/index.d.ts +0 -2
- package/dist/atoms/Button/index.js +0 -2
- package/dist/atoms/Button/index.js.map +0 -1
- package/dist/atoms/Checkbox/Checkbox.d.ts +0 -10
- package/dist/atoms/Checkbox/Checkbox.js +0 -6
- package/dist/atoms/Checkbox/Checkbox.js.map +0 -1
- package/dist/atoms/Checkbox/index.d.ts +0 -2
- package/dist/atoms/Checkbox/index.js +0 -2
- package/dist/atoms/Checkbox/index.js.map +0 -1
- package/dist/atoms/Icon/Icon.d.ts +0 -14
- package/dist/atoms/Icon/Icon.js +0 -6
- package/dist/atoms/Icon/Icon.js.map +0 -1
- package/dist/atoms/Icon/index.d.ts +0 -2
- package/dist/atoms/Icon/index.js +0 -2
- package/dist/atoms/Icon/index.js.map +0 -1
- package/dist/atoms/Icon/stories/assets/ShoppingCart.d.ts +0 -3
- package/dist/atoms/Icon/stories/assets/ShoppingCart.js +0 -8
- package/dist/atoms/Icon/stories/assets/ShoppingCart.js.map +0 -1
- package/dist/atoms/Incentive/Incentive.d.ts +0 -11
- package/dist/atoms/Incentive/Incentive.js +0 -6
- package/dist/atoms/Incentive/Incentive.js.map +0 -1
- package/dist/atoms/Incentive/index.d.ts +0 -2
- package/dist/atoms/Incentive/index.js +0 -2
- package/dist/atoms/Incentive/index.js.map +0 -1
- package/dist/atoms/Incentive/stories/assets/Icons.d.ts +0 -2
- package/dist/atoms/Incentive/stories/assets/Icons.js +0 -6
- package/dist/atoms/Incentive/stories/assets/Icons.js.map +0 -1
- package/dist/atoms/Input/Input.d.ts +0 -14
- package/dist/atoms/Input/Input.js +0 -10
- package/dist/atoms/Input/Input.js.map +0 -1
- package/dist/atoms/Input/index.d.ts +0 -2
- package/dist/atoms/Input/index.js +0 -2
- package/dist/atoms/Input/index.js.map +0 -1
- package/dist/atoms/Label/Label.d.ts +0 -10
- package/dist/atoms/Label/Label.js +0 -6
- package/dist/atoms/Label/Label.js.map +0 -1
- package/dist/atoms/Label/index.d.ts +0 -2
- package/dist/atoms/Label/index.js +0 -2
- package/dist/atoms/Label/index.js.map +0 -1
- package/dist/atoms/Link/Link.d.ts +0 -19
- package/dist/atoms/Link/Link.js +0 -13
- package/dist/atoms/Link/Link.js.map +0 -1
- package/dist/atoms/Link/index.d.ts +0 -2
- package/dist/atoms/Link/index.js +0 -2
- package/dist/atoms/Link/index.js.map +0 -1
- package/dist/atoms/List/List.d.ts +0 -12
- package/dist/atoms/List/List.js +0 -16
- package/dist/atoms/List/List.js.map +0 -1
- package/dist/atoms/List/index.d.ts +0 -2
- package/dist/atoms/List/index.js +0 -2
- package/dist/atoms/List/index.js.map +0 -1
- package/dist/atoms/Overlay/Overlay.d.ts +0 -10
- package/dist/atoms/Overlay/Overlay.js +0 -6
- package/dist/atoms/Overlay/Overlay.js.map +0 -1
- package/dist/atoms/Overlay/index.d.ts +0 -2
- package/dist/atoms/Overlay/index.js +0 -2
- package/dist/atoms/Overlay/index.js.map +0 -1
- package/dist/atoms/Popover/Popover.d.ts +0 -15
- package/dist/atoms/Popover/Popover.js +0 -7
- package/dist/atoms/Popover/Popover.js.map +0 -1
- package/dist/atoms/Popover/index.d.ts +0 -2
- package/dist/atoms/Popover/index.js +0 -2
- package/dist/atoms/Popover/index.js.map +0 -1
- package/dist/atoms/Price/Price.d.ts +0 -28
- package/dist/atoms/Price/Price.js +0 -7
- package/dist/atoms/Price/Price.js.map +0 -1
- package/dist/atoms/Price/index.d.ts +0 -2
- package/dist/atoms/Price/index.js +0 -2
- package/dist/atoms/Price/index.js.map +0 -1
- package/dist/atoms/Radio/Radio.d.ts +0 -7
- package/dist/atoms/Radio/Radio.js +0 -6
- package/dist/atoms/Radio/Radio.js.map +0 -1
- package/dist/atoms/Radio/index.d.ts +0 -2
- package/dist/atoms/Radio/index.js +0 -2
- package/dist/atoms/Radio/index.js.map +0 -1
- package/dist/atoms/Select/Select.d.ts +0 -10
- package/dist/atoms/Select/Select.js +0 -6
- package/dist/atoms/Select/Select.js.map +0 -1
- package/dist/atoms/Select/index.d.ts +0 -2
- package/dist/atoms/Select/index.js +0 -2
- package/dist/atoms/Select/index.js.map +0 -1
- package/dist/atoms/Skeleton/Skeleton.d.ts +0 -10
- package/dist/atoms/Skeleton/Skeleton.js +0 -6
- package/dist/atoms/Skeleton/Skeleton.js.map +0 -1
- package/dist/atoms/Skeleton/index.d.ts +0 -2
- package/dist/atoms/Skeleton/index.js +0 -2
- package/dist/atoms/Skeleton/index.js.map +0 -1
- package/dist/atoms/Slider/Slider.d.ts +0 -67
- package/dist/atoms/Slider/Slider.js +0 -48
- package/dist/atoms/Slider/Slider.js.map +0 -1
- package/dist/atoms/Slider/index.d.ts +0 -2
- package/dist/atoms/Slider/index.js +0 -2
- package/dist/atoms/Slider/index.js.map +0 -1
- package/dist/atoms/Spinner/Spinner.d.ts +0 -11
- package/dist/atoms/Spinner/Spinner.js +0 -6
- package/dist/atoms/Spinner/Spinner.js.map +0 -1
- package/dist/atoms/Spinner/index.d.ts +0 -2
- package/dist/atoms/Spinner/index.js +0 -2
- package/dist/atoms/Spinner/index.js.map +0 -1
- package/dist/atoms/TextArea/TextArea.d.ts +0 -14
- package/dist/atoms/TextArea/TextArea.js +0 -10
- package/dist/atoms/TextArea/TextArea.js.map +0 -1
- package/dist/atoms/TextArea/index.d.ts +0 -2
- package/dist/atoms/TextArea/index.js +0 -2
- package/dist/atoms/TextArea/index.js.map +0 -1
- package/dist/components/atoms/Incentive/Incentive.d.ts +0 -11
- package/dist/components/atoms/Incentive/Incentive.js +0 -6
- package/dist/components/atoms/Incentive/Incentive.js.map +0 -1
- package/dist/components/atoms/Incentive/index.d.ts +0 -2
- package/dist/components/atoms/Incentive/index.js +0 -2
- package/dist/components/atoms/Incentive/index.js.map +0 -1
- package/dist/components/atoms/Popover/Popover.d.ts +0 -15
- package/dist/components/atoms/Popover/Popover.js +0 -7
- package/dist/components/atoms/Popover/Popover.js.map +0 -1
- package/dist/components/atoms/Popover/index.d.ts +0 -2
- package/dist/components/atoms/Popover/index.js +0 -2
- package/dist/components/atoms/Popover/index.js.map +0 -1
- package/dist/components/atoms/Skeleton/Skeleton.d.ts +0 -10
- package/dist/components/atoms/Skeleton/Skeleton.js +0 -6
- package/dist/components/atoms/Skeleton/Skeleton.js.map +0 -1
- package/dist/components/atoms/Skeleton/index.d.ts +0 -2
- package/dist/components/atoms/Skeleton/index.js +0 -2
- package/dist/components/atoms/Skeleton/index.js.map +0 -1
- package/dist/components/atoms/Slider/Slider.d.ts +0 -67
- package/dist/components/atoms/Slider/Slider.js +0 -48
- package/dist/components/atoms/Slider/Slider.js.map +0 -1
- package/dist/components/atoms/Slider/index.d.ts +0 -2
- package/dist/components/atoms/Slider/index.js +0 -2
- package/dist/components/atoms/Slider/index.js.map +0 -1
- package/dist/components/atoms/Spinner/Spinner.d.ts +0 -11
- package/dist/components/atoms/Spinner/Spinner.js +0 -6
- package/dist/components/atoms/Spinner/Spinner.js.map +0 -1
- package/dist/components/atoms/Spinner/index.d.ts +0 -2
- package/dist/components/atoms/Spinner/index.js +0 -2
- package/dist/components/atoms/Spinner/index.js.map +0 -1
- package/dist/components/atoms/TextArea/TextArea.d.ts +0 -14
- package/dist/components/atoms/TextArea/TextArea.js +0 -10
- package/dist/components/atoms/TextArea/TextArea.js.map +0 -1
- package/dist/components/atoms/TextArea/index.d.ts +0 -2
- package/dist/components/atoms/TextArea/index.js +0 -2
- package/dist/components/atoms/TextArea/index.js.map +0 -1
- package/dist/components/molecules/Banner/Banner.d.ts +0 -14
- package/dist/components/molecules/Banner/Banner.js +0 -6
- package/dist/components/molecules/Banner/Banner.js.map +0 -1
- package/dist/components/molecules/Banner/BannerContent.d.ts +0 -10
- package/dist/components/molecules/Banner/BannerContent.js +0 -6
- package/dist/components/molecules/Banner/BannerContent.js.map +0 -1
- package/dist/components/molecules/Banner/BannerImage.d.ts +0 -10
- package/dist/components/molecules/Banner/BannerImage.js +0 -6
- package/dist/components/molecules/Banner/BannerImage.js.map +0 -1
- package/dist/components/molecules/Banner/BannerLink.d.ts +0 -10
- package/dist/components/molecules/Banner/BannerLink.js +0 -6
- package/dist/components/molecules/Banner/BannerLink.js.map +0 -1
- package/dist/components/molecules/Banner/index.d.ts +0 -8
- package/dist/components/molecules/Banner/index.js +0 -5
- package/dist/components/molecules/Banner/index.js.map +0 -1
- package/dist/components/molecules/Breadcrumb/Breadcrumb.d.ts +0 -14
- package/dist/components/molecules/Breadcrumb/Breadcrumb.js +0 -38
- package/dist/components/molecules/Breadcrumb/Breadcrumb.js.map +0 -1
- package/dist/components/molecules/Breadcrumb/index.d.ts +0 -2
- package/dist/components/molecules/Breadcrumb/index.js +0 -2
- package/dist/components/molecules/Breadcrumb/index.js.map +0 -1
- package/dist/components/molecules/Bullets/Bullets.d.ts +0 -35
- package/dist/components/molecules/Bullets/Bullets.js +0 -12
- package/dist/components/molecules/Bullets/Bullets.js.map +0 -1
- package/dist/components/molecules/Bullets/index.d.ts +0 -2
- package/dist/components/molecules/Bullets/index.js +0 -2
- package/dist/components/molecules/Bullets/index.js.map +0 -1
- package/dist/components/molecules/Card/Card.d.ts +0 -10
- package/dist/components/molecules/Card/Card.js +0 -6
- package/dist/components/molecules/Card/Card.js.map +0 -1
- package/dist/components/molecules/Card/CardActions.d.ts +0 -10
- package/dist/components/molecules/Card/CardActions.js +0 -6
- package/dist/components/molecules/Card/CardActions.js.map +0 -1
- package/dist/components/molecules/Card/CardContent.d.ts +0 -10
- package/dist/components/molecules/Card/CardContent.js +0 -6
- package/dist/components/molecules/Card/CardContent.js.map +0 -1
- package/dist/components/molecules/Card/CardImage.d.ts +0 -10
- package/dist/components/molecules/Card/CardImage.js +0 -6
- package/dist/components/molecules/Card/CardImage.js.map +0 -1
- package/dist/components/molecules/Card/index.d.ts +0 -8
- package/dist/components/molecules/Card/index.js +0 -5
- package/dist/components/molecules/Card/index.js.map +0 -1
- package/dist/components/molecules/Carousel/Arrows.d.ts +0 -12
- package/dist/components/molecules/Carousel/Arrows.js +0 -6
- package/dist/components/molecules/Carousel/Arrows.js.map +0 -1
- package/dist/components/molecules/Carousel/Carousel.d.ts +0 -54
- package/dist/components/molecules/Carousel/Carousel.js +0 -183
- package/dist/components/molecules/Carousel/Carousel.js.map +0 -1
- package/dist/components/molecules/Carousel/CarouselItem.d.ts +0 -11
- package/dist/components/molecules/Carousel/CarouselItem.js +0 -18
- package/dist/components/molecules/Carousel/CarouselItem.js.map +0 -1
- package/dist/components/molecules/Carousel/hooks/useSlideVisibility.d.ts +0 -9
- package/dist/components/molecules/Carousel/hooks/useSlideVisibility.js +0 -29
- package/dist/components/molecules/Carousel/hooks/useSlideVisibility.js.map +0 -1
- package/dist/components/molecules/Carousel/index.d.ts +0 -2
- package/dist/components/molecules/Carousel/index.js +0 -3
- package/dist/components/molecules/Carousel/index.js.map +0 -1
- package/dist/components/molecules/CartItem/CartItem.d.ts +0 -10
- package/dist/components/molecules/CartItem/CartItem.js +0 -6
- package/dist/components/molecules/CartItem/CartItem.js.map +0 -1
- package/dist/components/molecules/CartItem/CartItemActions.d.ts +0 -10
- package/dist/components/molecules/CartItem/CartItemActions.js +0 -6
- package/dist/components/molecules/CartItem/CartItemActions.js.map +0 -1
- package/dist/components/molecules/CartItem/CartItemContent.d.ts +0 -10
- package/dist/components/molecules/CartItem/CartItemContent.js +0 -6
- package/dist/components/molecules/CartItem/CartItemContent.js.map +0 -1
- package/dist/components/molecules/CartItem/CartItemImage.d.ts +0 -10
- package/dist/components/molecules/CartItem/CartItemImage.js +0 -6
- package/dist/components/molecules/CartItem/CartItemImage.js.map +0 -1
- package/dist/components/molecules/CartItem/CartItemPrices.d.ts +0 -10
- package/dist/components/molecules/CartItem/CartItemPrices.js +0 -6
- package/dist/components/molecules/CartItem/CartItemPrices.js.map +0 -1
- package/dist/components/molecules/CartItem/CartItemSummary.d.ts +0 -10
- package/dist/components/molecules/CartItem/CartItemSummary.js +0 -6
- package/dist/components/molecules/CartItem/CartItemSummary.js.map +0 -1
- package/dist/components/molecules/CartItem/CartItemTitle.d.ts +0 -10
- package/dist/components/molecules/CartItem/CartItemTitle.js +0 -6
- package/dist/components/molecules/CartItem/CartItemTitle.js.map +0 -1
- package/dist/components/molecules/CartItem/index.d.ts +0 -14
- package/dist/components/molecules/CartItem/index.js +0 -8
- package/dist/components/molecules/CartItem/index.js.map +0 -1
- package/dist/components/molecules/Form/Form.d.ts +0 -11
- package/dist/components/molecules/Form/Form.js +0 -6
- package/dist/components/molecules/Form/Form.js.map +0 -1
- package/dist/components/molecules/Form/index.d.ts +0 -2
- package/dist/components/molecules/Form/index.js +0 -2
- package/dist/components/molecules/Form/index.js.map +0 -1
- package/dist/components/molecules/Gift/Gift.d.ts +0 -15
- package/dist/components/molecules/Gift/Gift.js +0 -9
- package/dist/components/molecules/Gift/Gift.js.map +0 -1
- package/dist/components/molecules/Gift/GiftContent.d.ts +0 -10
- package/dist/components/molecules/Gift/GiftContent.js +0 -6
- package/dist/components/molecules/Gift/GiftContent.js.map +0 -1
- package/dist/components/molecules/Gift/GiftImage.d.ts +0 -10
- package/dist/components/molecules/Gift/GiftImage.js +0 -6
- package/dist/components/molecules/Gift/GiftImage.js.map +0 -1
- package/dist/components/molecules/Gift/index.d.ts +0 -6
- package/dist/components/molecules/Gift/index.js +0 -4
- package/dist/components/molecules/Gift/index.js.map +0 -1
- package/dist/components/molecules/LoadingButton/LoadingButton.d.ts +0 -14
- package/dist/components/molecules/LoadingButton/LoadingButton.js +0 -8
- package/dist/components/molecules/LoadingButton/LoadingButton.js.map +0 -1
- package/dist/components/molecules/LoadingButton/index.d.ts +0 -2
- package/dist/components/molecules/LoadingButton/index.js +0 -2
- package/dist/components/molecules/LoadingButton/index.js.map +0 -1
- package/dist/components/molecules/Modal/Modal.d.ts +0 -25
- package/dist/components/molecules/Modal/Modal.js +0 -31
- package/dist/components/molecules/Modal/Modal.js.map +0 -1
- package/dist/components/molecules/Modal/ModalContent.d.ts +0 -10
- package/dist/components/molecules/Modal/ModalContent.js +0 -23
- package/dist/components/molecules/Modal/ModalContent.js.map +0 -1
- package/dist/components/molecules/Modal/index.d.ts +0 -2
- package/dist/components/molecules/Modal/index.js +0 -2
- package/dist/components/molecules/Modal/index.js.map +0 -1
- package/dist/components/molecules/Modal/useTrapFocus.d.ts +0 -8
- package/dist/components/molecules/Modal/useTrapFocus.js +0 -76
- package/dist/components/molecules/Modal/useTrapFocus.js.map +0 -1
- package/dist/components/molecules/OrderSummary/OrderSummary.d.ts +0 -35
- package/dist/components/molecules/OrderSummary/OrderSummary.js +0 -16
- package/dist/components/molecules/OrderSummary/OrderSummary.js.map +0 -1
- package/dist/components/molecules/OrderSummary/index.d.ts +0 -2
- package/dist/components/molecules/OrderSummary/index.js +0 -2
- package/dist/components/molecules/OrderSummary/index.js.map +0 -1
- package/dist/components/molecules/PaymentMethods/PaymentMethods.d.ts +0 -26
- package/dist/components/molecules/PaymentMethods/PaymentMethods.js +0 -8
- package/dist/components/molecules/PaymentMethods/PaymentMethods.js.map +0 -1
- package/dist/components/molecules/PaymentMethods/index.d.ts +0 -2
- package/dist/components/molecules/PaymentMethods/index.js +0 -2
- package/dist/components/molecules/PaymentMethods/index.js.map +0 -1
- package/dist/components/molecules/PriceRange/PriceRange.d.ts +0 -47
- package/dist/components/molecules/PriceRange/PriceRange.js +0 -28
- package/dist/components/molecules/PriceRange/PriceRange.js.map +0 -1
- package/dist/components/molecules/PriceRange/index.d.ts +0 -2
- package/dist/components/molecules/PriceRange/index.js +0 -2
- package/dist/components/molecules/PriceRange/index.js.map +0 -1
- package/dist/components/molecules/ProductCard/ProductCard.d.ts +0 -11
- package/dist/components/molecules/ProductCard/ProductCard.js +0 -6
- package/dist/components/molecules/ProductCard/ProductCard.js.map +0 -1
- package/dist/components/molecules/ProductCard/ProductCardActions.d.ts +0 -10
- package/dist/components/molecules/ProductCard/ProductCardActions.js +0 -6
- package/dist/components/molecules/ProductCard/ProductCardActions.js.map +0 -1
- package/dist/components/molecules/ProductCard/ProductCardContent.d.ts +0 -10
- package/dist/components/molecules/ProductCard/ProductCardContent.js +0 -6
- package/dist/components/molecules/ProductCard/ProductCardContent.js.map +0 -1
- package/dist/components/molecules/ProductCard/ProductCardImage.d.ts +0 -10
- package/dist/components/molecules/ProductCard/ProductCardImage.js +0 -6
- package/dist/components/molecules/ProductCard/ProductCardImage.js.map +0 -1
- package/dist/components/molecules/ProductCard/index.d.ts +0 -8
- package/dist/components/molecules/ProductCard/index.js +0 -5
- package/dist/components/molecules/ProductCard/index.js.map +0 -1
- package/dist/components/molecules/ProductTitle/ProductTitle.d.ts +0 -47
- package/dist/components/molecules/ProductTitle/ProductTitle.js +0 -12
- package/dist/components/molecules/ProductTitle/ProductTitle.js.map +0 -1
- package/dist/components/molecules/ProductTitle/index.d.ts +0 -2
- package/dist/components/molecules/ProductTitle/index.js +0 -2
- package/dist/components/molecules/ProductTitle/index.js.map +0 -1
- package/dist/components/molecules/SearchInput/SearchInput.d.ts +0 -28
- package/dist/components/molecules/SearchInput/SearchInput.js +0 -26
- package/dist/components/molecules/SearchInput/SearchInput.js.map +0 -1
- package/dist/components/molecules/SearchInput/index.d.ts +0 -2
- package/dist/components/molecules/SearchInput/index.js +0 -2
- package/dist/components/molecules/SearchInput/index.js.map +0 -1
- package/dist/components/molecules/SkuSelector/SkuSelector.d.ts +0 -58
- package/dist/components/molecules/SkuSelector/SkuSelector.js +0 -15
- package/dist/components/molecules/SkuSelector/SkuSelector.js.map +0 -1
- package/dist/components/molecules/SkuSelector/index.d.ts +0 -2
- package/dist/components/molecules/SkuSelector/index.js +0 -2
- package/dist/components/molecules/SkuSelector/index.js.map +0 -1
- package/dist/components/organisms/OutOfStock/OutOfStock.d.ts +0 -21
- package/dist/components/organisms/OutOfStock/OutOfStock.js +0 -8
- package/dist/components/organisms/OutOfStock/OutOfStock.js.map +0 -1
- package/dist/components/organisms/OutOfStock/OutOfStockMessage.d.ts +0 -9
- package/dist/components/organisms/OutOfStock/OutOfStockMessage.js +0 -5
- package/dist/components/organisms/OutOfStock/OutOfStockMessage.js.map +0 -1
- package/dist/components/organisms/OutOfStock/OutOfStockTitle.d.ts +0 -9
- package/dist/components/organisms/OutOfStock/OutOfStockTitle.js +0 -5
- package/dist/components/organisms/OutOfStock/OutOfStockTitle.js.map +0 -1
- package/dist/components/organisms/OutOfStock/index.d.ts +0 -6
- package/dist/components/organisms/OutOfStock/index.js +0 -4
- package/dist/components/organisms/OutOfStock/index.js.map +0 -1
- package/dist/components/organisms/Tiles/Tile.d.ts +0 -11
- package/dist/components/organisms/Tiles/Tile.js +0 -6
- package/dist/components/organisms/Tiles/Tile.js.map +0 -1
- package/dist/components/organisms/Tiles/Tiles.d.ts +0 -11
- package/dist/components/organisms/Tiles/Tiles.js +0 -30
- package/dist/components/organisms/Tiles/Tiles.js.map +0 -1
- package/dist/components/organisms/Tiles/index.d.ts +0 -4
- package/dist/components/organisms/Tiles/index.js +0 -3
- package/dist/components/organisms/Tiles/index.js.map +0 -1
- package/dist/hooks/useSlider/index.d.ts +0 -2
- package/dist/hooks/useSlider/index.js +0 -3
- package/dist/hooks/useSlider/index.js.map +0 -1
- package/dist/hooks/useSlider/useSlider.d.ts +0 -64
- package/dist/hooks/useSlider/useSlider.js +0 -103
- package/dist/hooks/useSlider/useSlider.js.map +0 -1
- package/dist/index.d.ts +0 -7
- package/dist/index.js +0 -7
- package/dist/index.js.map +0 -1
- package/dist/molecules/Accordion/Accordion.d.ts +0 -26
- package/dist/molecules/Accordion/Accordion.js +0 -21
- package/dist/molecules/Accordion/Accordion.js.map +0 -1
- package/dist/molecules/Accordion/AccordionButton.d.ts +0 -10
- package/dist/molecules/Accordion/AccordionButton.js +0 -37
- package/dist/molecules/Accordion/AccordionButton.js.map +0 -1
- package/dist/molecules/Accordion/AccordionItem.d.ts +0 -37
- package/dist/molecules/Accordion/AccordionItem.js +0 -28
- package/dist/molecules/Accordion/AccordionItem.js.map +0 -1
- package/dist/molecules/Accordion/AccordionPanel.d.ts +0 -10
- package/dist/molecules/Accordion/AccordionPanel.js +0 -10
- package/dist/molecules/Accordion/AccordionPanel.js.map +0 -1
- package/dist/molecules/Accordion/index.d.ts +0 -8
- package/dist/molecules/Accordion/index.js +0 -5
- package/dist/molecules/Accordion/index.js.map +0 -1
- package/dist/molecules/AggregateRating/AggregateRating.d.ts +0 -18
- package/dist/molecules/AggregateRating/AggregateRating.js +0 -26
- package/dist/molecules/AggregateRating/AggregateRating.js.map +0 -1
- package/dist/molecules/AggregateRating/index.d.ts +0 -2
- package/dist/molecules/AggregateRating/index.js +0 -2
- package/dist/molecules/AggregateRating/index.js.map +0 -1
- package/dist/molecules/Alert/Alert.d.ts +0 -11
- package/dist/molecules/Alert/Alert.js +0 -6
- package/dist/molecules/Alert/Alert.js.map +0 -1
- package/dist/molecules/Alert/index.d.ts +0 -2
- package/dist/molecules/Alert/index.js +0 -2
- package/dist/molecules/Alert/index.js.map +0 -1
- package/dist/molecules/Banner/Banner.d.ts +0 -14
- package/dist/molecules/Banner/Banner.js +0 -6
- package/dist/molecules/Banner/Banner.js.map +0 -1
- package/dist/molecules/Banner/BannerContent.d.ts +0 -10
- package/dist/molecules/Banner/BannerContent.js +0 -6
- package/dist/molecules/Banner/BannerContent.js.map +0 -1
- package/dist/molecules/Banner/BannerImage.d.ts +0 -10
- package/dist/molecules/Banner/BannerImage.js +0 -6
- package/dist/molecules/Banner/BannerImage.js.map +0 -1
- package/dist/molecules/Banner/BannerLink.d.ts +0 -10
- package/dist/molecules/Banner/BannerLink.js +0 -6
- package/dist/molecules/Banner/BannerLink.js.map +0 -1
- package/dist/molecules/Banner/index.d.ts +0 -8
- package/dist/molecules/Banner/index.js +0 -5
- package/dist/molecules/Banner/index.js.map +0 -1
- package/dist/molecules/Breadcrumb/Breadcrumb.d.ts +0 -14
- package/dist/molecules/Breadcrumb/Breadcrumb.js +0 -38
- package/dist/molecules/Breadcrumb/Breadcrumb.js.map +0 -1
- package/dist/molecules/Breadcrumb/index.d.ts +0 -2
- package/dist/molecules/Breadcrumb/index.js +0 -2
- package/dist/molecules/Breadcrumb/index.js.map +0 -1
- package/dist/molecules/Bullets/Bullets.d.ts +0 -35
- package/dist/molecules/Bullets/Bullets.js +0 -12
- package/dist/molecules/Bullets/Bullets.js.map +0 -1
- package/dist/molecules/Bullets/index.d.ts +0 -2
- package/dist/molecules/Bullets/index.js +0 -2
- package/dist/molecules/Bullets/index.js.map +0 -1
- package/dist/molecules/Card/Card.d.ts +0 -10
- package/dist/molecules/Card/Card.js +0 -6
- package/dist/molecules/Card/Card.js.map +0 -1
- package/dist/molecules/Card/CardActions.d.ts +0 -10
- package/dist/molecules/Card/CardActions.js +0 -6
- package/dist/molecules/Card/CardActions.js.map +0 -1
- package/dist/molecules/Card/CardContent.d.ts +0 -10
- package/dist/molecules/Card/CardContent.js +0 -6
- package/dist/molecules/Card/CardContent.js.map +0 -1
- package/dist/molecules/Card/CardImage.d.ts +0 -10
- package/dist/molecules/Card/CardImage.js +0 -6
- package/dist/molecules/Card/CardImage.js.map +0 -1
- package/dist/molecules/Card/index.d.ts +0 -8
- package/dist/molecules/Card/index.js +0 -5
- package/dist/molecules/Card/index.js.map +0 -1
- package/dist/molecules/Carousel/Arrows.d.ts +0 -12
- package/dist/molecules/Carousel/Arrows.js +0 -6
- package/dist/molecules/Carousel/Arrows.js.map +0 -1
- package/dist/molecules/Carousel/Carousel.d.ts +0 -54
- package/dist/molecules/Carousel/Carousel.js +0 -183
- package/dist/molecules/Carousel/Carousel.js.map +0 -1
- package/dist/molecules/Carousel/CarouselItem.d.ts +0 -11
- package/dist/molecules/Carousel/CarouselItem.js +0 -18
- package/dist/molecules/Carousel/CarouselItem.js.map +0 -1
- package/dist/molecules/Carousel/hooks/useSlideVisibility.d.ts +0 -9
- package/dist/molecules/Carousel/hooks/useSlideVisibility.js +0 -29
- package/dist/molecules/Carousel/hooks/useSlideVisibility.js.map +0 -1
- package/dist/molecules/Carousel/index.d.ts +0 -2
- package/dist/molecules/Carousel/index.js +0 -3
- package/dist/molecules/Carousel/index.js.map +0 -1
- package/dist/molecules/CartItem/CartItem.d.ts +0 -10
- package/dist/molecules/CartItem/CartItem.js +0 -6
- package/dist/molecules/CartItem/CartItem.js.map +0 -1
- package/dist/molecules/CartItem/CartItemActions.d.ts +0 -10
- package/dist/molecules/CartItem/CartItemActions.js +0 -6
- package/dist/molecules/CartItem/CartItemActions.js.map +0 -1
- package/dist/molecules/CartItem/CartItemContent.d.ts +0 -10
- package/dist/molecules/CartItem/CartItemContent.js +0 -6
- package/dist/molecules/CartItem/CartItemContent.js.map +0 -1
- package/dist/molecules/CartItem/CartItemImage.d.ts +0 -10
- package/dist/molecules/CartItem/CartItemImage.js +0 -6
- package/dist/molecules/CartItem/CartItemImage.js.map +0 -1
- package/dist/molecules/CartItem/CartItemPrices.d.ts +0 -10
- package/dist/molecules/CartItem/CartItemPrices.js +0 -6
- package/dist/molecules/CartItem/CartItemPrices.js.map +0 -1
- package/dist/molecules/CartItem/CartItemSummary.d.ts +0 -10
- package/dist/molecules/CartItem/CartItemSummary.js +0 -6
- package/dist/molecules/CartItem/CartItemSummary.js.map +0 -1
- package/dist/molecules/CartItem/CartItemTitle.d.ts +0 -10
- package/dist/molecules/CartItem/CartItemTitle.js +0 -6
- package/dist/molecules/CartItem/CartItemTitle.js.map +0 -1
- package/dist/molecules/CartItem/index.d.ts +0 -14
- package/dist/molecules/CartItem/index.js +0 -8
- package/dist/molecules/CartItem/index.js.map +0 -1
- package/dist/molecules/Dropdown/Dropdown.d.ts +0 -9
- package/dist/molecules/Dropdown/Dropdown.js +0 -67
- package/dist/molecules/Dropdown/Dropdown.js.map +0 -1
- package/dist/molecules/Dropdown/DropdownButton.d.ts +0 -10
- package/dist/molecules/Dropdown/DropdownButton.js +0 -11
- package/dist/molecules/Dropdown/DropdownButton.js.map +0 -1
- package/dist/molecules/Dropdown/DropdownItem.d.ts +0 -10
- package/dist/molecules/Dropdown/DropdownItem.js +0 -26
- package/dist/molecules/Dropdown/DropdownItem.js.map +0 -1
- package/dist/molecules/Dropdown/DropdownMenu.d.ts +0 -22
- package/dist/molecules/Dropdown/DropdownMenu.js +0 -65
- package/dist/molecules/Dropdown/DropdownMenu.js.map +0 -1
- package/dist/molecules/Dropdown/contexts/DropdownContext.d.ts +0 -41
- package/dist/molecules/Dropdown/contexts/DropdownContext.js +0 -11
- package/dist/molecules/Dropdown/contexts/DropdownContext.js.map +0 -1
- package/dist/molecules/Dropdown/hooks/useDropdown.d.ts +0 -6
- package/dist/molecules/Dropdown/hooks/useDropdown.js +0 -14
- package/dist/molecules/Dropdown/hooks/useDropdown.js.map +0 -1
- package/dist/molecules/Dropdown/hooks/useDropdownPosition.d.ts +0 -8
- package/dist/molecules/Dropdown/hooks/useDropdownPosition.js +0 -25
- package/dist/molecules/Dropdown/hooks/useDropdownPosition.js.map +0 -1
- package/dist/molecules/Dropdown/index.d.ts +0 -8
- package/dist/molecules/Dropdown/index.js +0 -5
- package/dist/molecules/Dropdown/index.js.map +0 -1
- package/dist/molecules/Dropdown/stories/assets/Caret.d.ts +0 -2
- package/dist/molecules/Dropdown/stories/assets/Caret.js +0 -4
- package/dist/molecules/Dropdown/stories/assets/Caret.js.map +0 -1
- package/dist/molecules/Form/Form.d.ts +0 -11
- package/dist/molecules/Form/Form.js +0 -6
- package/dist/molecules/Form/Form.js.map +0 -1
- package/dist/molecules/Form/index.d.ts +0 -2
- package/dist/molecules/Form/index.js +0 -2
- package/dist/molecules/Form/index.js.map +0 -1
- package/dist/molecules/Gift/Gift.d.ts +0 -16
- package/dist/molecules/Gift/Gift.js +0 -9
- package/dist/molecules/Gift/Gift.js.map +0 -1
- package/dist/molecules/Gift/GiftContent.d.ts +0 -10
- package/dist/molecules/Gift/GiftContent.js +0 -6
- package/dist/molecules/Gift/GiftContent.js.map +0 -1
- package/dist/molecules/Gift/GiftImage.d.ts +0 -10
- package/dist/molecules/Gift/GiftImage.js +0 -6
- package/dist/molecules/Gift/GiftImage.js.map +0 -1
- package/dist/molecules/Gift/index.d.ts +0 -6
- package/dist/molecules/Gift/index.js +0 -4
- package/dist/molecules/Gift/index.js.map +0 -1
- package/dist/molecules/IconButton/IconButton.d.ts +0 -19
- package/dist/molecules/IconButton/IconButton.js +0 -9
- package/dist/molecules/IconButton/IconButton.js.map +0 -1
- package/dist/molecules/IconButton/index.d.ts +0 -2
- package/dist/molecules/IconButton/index.js +0 -2
- package/dist/molecules/IconButton/index.js.map +0 -1
- package/dist/molecules/LoadingButton/LoadingButton.d.ts +0 -14
- package/dist/molecules/LoadingButton/LoadingButton.js +0 -8
- package/dist/molecules/LoadingButton/LoadingButton.js.map +0 -1
- package/dist/molecules/LoadingButton/index.d.ts +0 -2
- package/dist/molecules/LoadingButton/index.js +0 -2
- package/dist/molecules/LoadingButton/index.js.map +0 -1
- package/dist/molecules/Modal/Modal.d.ts +0 -25
- package/dist/molecules/Modal/Modal.js +0 -31
- package/dist/molecules/Modal/Modal.js.map +0 -1
- package/dist/molecules/Modal/ModalContent.d.ts +0 -10
- package/dist/molecules/Modal/ModalContent.js +0 -23
- package/dist/molecules/Modal/ModalContent.js.map +0 -1
- package/dist/molecules/Modal/index.d.ts +0 -2
- package/dist/molecules/Modal/index.js +0 -2
- package/dist/molecules/Modal/index.js.map +0 -1
- package/dist/molecules/Modal/useTrapFocus.d.ts +0 -8
- package/dist/molecules/Modal/useTrapFocus.js +0 -76
- package/dist/molecules/Modal/useTrapFocus.js.map +0 -1
- package/dist/molecules/OrderSummary/OrderSummary.d.ts +0 -35
- package/dist/molecules/OrderSummary/OrderSummary.js +0 -16
- package/dist/molecules/OrderSummary/OrderSummary.js.map +0 -1
- package/dist/molecules/OrderSummary/index.d.ts +0 -2
- package/dist/molecules/OrderSummary/index.js +0 -2
- package/dist/molecules/OrderSummary/index.js.map +0 -1
- package/dist/molecules/PaymentMethods/PaymentMethods.d.ts +0 -26
- package/dist/molecules/PaymentMethods/PaymentMethods.js +0 -8
- package/dist/molecules/PaymentMethods/PaymentMethods.js.map +0 -1
- package/dist/molecules/PaymentMethods/index.d.ts +0 -2
- package/dist/molecules/PaymentMethods/index.js +0 -2
- package/dist/molecules/PaymentMethods/index.js.map +0 -1
- package/dist/molecules/PaymentMethods/stories/assets/Icons.d.ts +0 -9
- package/dist/molecules/PaymentMethods/stories/assets/Icons.js +0 -26
- package/dist/molecules/PaymentMethods/stories/assets/Icons.js.map +0 -1
- package/dist/molecules/PriceRange/PriceRange.d.ts +0 -47
- package/dist/molecules/PriceRange/PriceRange.js +0 -28
- package/dist/molecules/PriceRange/PriceRange.js.map +0 -1
- package/dist/molecules/PriceRange/index.d.ts +0 -2
- package/dist/molecules/PriceRange/index.js +0 -2
- package/dist/molecules/PriceRange/index.js.map +0 -1
- package/dist/molecules/ProductCard/ProductCard.d.ts +0 -11
- package/dist/molecules/ProductCard/ProductCard.js +0 -6
- package/dist/molecules/ProductCard/ProductCard.js.map +0 -1
- package/dist/molecules/ProductCard/ProductCardActions.d.ts +0 -10
- package/dist/molecules/ProductCard/ProductCardActions.js +0 -6
- package/dist/molecules/ProductCard/ProductCardActions.js.map +0 -1
- package/dist/molecules/ProductCard/ProductCardContent.d.ts +0 -10
- package/dist/molecules/ProductCard/ProductCardContent.js +0 -6
- package/dist/molecules/ProductCard/ProductCardContent.js.map +0 -1
- package/dist/molecules/ProductCard/ProductCardImage.d.ts +0 -10
- package/dist/molecules/ProductCard/ProductCardImage.js +0 -6
- package/dist/molecules/ProductCard/ProductCardImage.js.map +0 -1
- package/dist/molecules/ProductCard/index.d.ts +0 -8
- package/dist/molecules/ProductCard/index.js +0 -5
- package/dist/molecules/ProductCard/index.js.map +0 -1
- package/dist/molecules/ProductTitle/ProductTitle.d.ts +0 -47
- package/dist/molecules/ProductTitle/ProductTitle.js +0 -12
- package/dist/molecules/ProductTitle/ProductTitle.js.map +0 -1
- package/dist/molecules/ProductTitle/index.d.ts +0 -2
- package/dist/molecules/ProductTitle/index.js +0 -2
- package/dist/molecules/ProductTitle/index.js.map +0 -1
- package/dist/molecules/QuantitySelector/QuantitySelector.d.ts +0 -30
- package/dist/molecules/QuantitySelector/QuantitySelector.js +0 -11
- package/dist/molecules/QuantitySelector/QuantitySelector.js.map +0 -1
- package/dist/molecules/QuantitySelector/index.d.ts +0 -2
- package/dist/molecules/QuantitySelector/index.js +0 -2
- package/dist/molecules/QuantitySelector/index.js.map +0 -1
- package/dist/molecules/QuantitySelector/stories/assets/Icons.d.ts +0 -7
- package/dist/molecules/QuantitySelector/stories/assets/Icons.js +0 -11
- package/dist/molecules/QuantitySelector/stories/assets/Icons.js.map +0 -1
- package/dist/molecules/RadioGroup/RadioGroup.d.ts +0 -5
- package/dist/molecules/RadioGroup/RadioGroup.js +0 -10
- package/dist/molecules/RadioGroup/RadioGroup.js.map +0 -1
- package/dist/molecules/RadioGroup/RadioOption.d.ts +0 -19
- package/dist/molecules/RadioGroup/RadioOption.js +0 -11
- package/dist/molecules/RadioGroup/RadioOption.js.map +0 -1
- package/dist/molecules/RadioGroup/index.d.ts +0 -4
- package/dist/molecules/RadioGroup/index.js +0 -3
- package/dist/molecules/RadioGroup/index.js.map +0 -1
- package/dist/molecules/RadioGroup/useRadioGroup.d.ts +0 -17
- package/dist/molecules/RadioGroup/useRadioGroup.js +0 -10
- package/dist/molecules/RadioGroup/useRadioGroup.js.map +0 -1
- package/dist/molecules/SearchInput/SearchInput.d.ts +0 -28
- package/dist/molecules/SearchInput/SearchInput.js +0 -28
- package/dist/molecules/SearchInput/SearchInput.js.map +0 -1
- package/dist/molecules/SearchInput/index.d.ts +0 -2
- package/dist/molecules/SearchInput/index.js +0 -2
- package/dist/molecules/SearchInput/index.js.map +0 -1
- package/dist/molecules/SearchInput/stories/assets/CustomIcon.d.ts +0 -3
- package/dist/molecules/SearchInput/stories/assets/CustomIcon.js +0 -7
- package/dist/molecules/SearchInput/stories/assets/CustomIcon.js.map +0 -1
- package/dist/molecules/SkuSelector/SkuSelector.d.ts +0 -58
- package/dist/molecules/SkuSelector/SkuSelector.js +0 -15
- package/dist/molecules/SkuSelector/SkuSelector.js.map +0 -1
- package/dist/molecules/SkuSelector/index.d.ts +0 -2
- package/dist/molecules/SkuSelector/index.js +0 -2
- package/dist/molecules/SkuSelector/index.js.map +0 -1
- package/dist/molecules/Table/Table.d.ts +0 -11
- package/dist/molecules/Table/Table.js +0 -6
- package/dist/molecules/Table/Table.js.map +0 -1
- package/dist/molecules/Table/TableBody.d.ts +0 -11
- package/dist/molecules/Table/TableBody.js +0 -6
- package/dist/molecules/Table/TableBody.js.map +0 -1
- package/dist/molecules/Table/TableCell.d.ts +0 -20
- package/dist/molecules/Table/TableCell.js +0 -7
- package/dist/molecules/Table/TableCell.js.map +0 -1
- package/dist/molecules/Table/TableFooter.d.ts +0 -11
- package/dist/molecules/Table/TableFooter.js +0 -6
- package/dist/molecules/Table/TableFooter.js.map +0 -1
- package/dist/molecules/Table/TableHead.d.ts +0 -11
- package/dist/molecules/Table/TableHead.js +0 -6
- package/dist/molecules/Table/TableHead.js.map +0 -1
- package/dist/molecules/Table/TableRow.d.ts +0 -11
- package/dist/molecules/Table/TableRow.js +0 -6
- package/dist/molecules/Table/TableRow.js.map +0 -1
- package/dist/molecules/Table/index.d.ts +0 -12
- package/dist/molecules/Table/index.js +0 -7
- package/dist/molecules/Table/index.js.map +0 -1
- package/dist/organisms/Hero/Hero.d.ts +0 -11
- package/dist/organisms/Hero/Hero.js +0 -6
- package/dist/organisms/Hero/Hero.js.map +0 -1
- package/dist/organisms/Hero/HeroHeading.d.ts +0 -10
- package/dist/organisms/Hero/HeroHeading.js +0 -6
- package/dist/organisms/Hero/HeroHeading.js.map +0 -1
- package/dist/organisms/Hero/HeroImage.d.ts +0 -10
- package/dist/organisms/Hero/HeroImage.js +0 -6
- package/dist/organisms/Hero/HeroImage.js.map +0 -1
- package/dist/organisms/Hero/index.d.ts +0 -6
- package/dist/organisms/Hero/index.js +0 -4
- package/dist/organisms/Hero/index.js.map +0 -1
- package/dist/organisms/OutOfStock/OutOfStock.d.ts +0 -21
- package/dist/organisms/OutOfStock/OutOfStock.js +0 -8
- package/dist/organisms/OutOfStock/OutOfStock.js.map +0 -1
- package/dist/organisms/OutOfStock/OutOfStockMessage.d.ts +0 -9
- package/dist/organisms/OutOfStock/OutOfStockMessage.js +0 -5
- package/dist/organisms/OutOfStock/OutOfStockMessage.js.map +0 -1
- package/dist/organisms/OutOfStock/OutOfStockTitle.d.ts +0 -9
- package/dist/organisms/OutOfStock/OutOfStockTitle.js +0 -5
- package/dist/organisms/OutOfStock/OutOfStockTitle.js.map +0 -1
- package/dist/organisms/OutOfStock/index.d.ts +0 -6
- package/dist/organisms/OutOfStock/index.js +0 -4
- package/dist/organisms/OutOfStock/index.js.map +0 -1
- package/dist/organisms/Tiles/Tile.d.ts +0 -11
- package/dist/organisms/Tiles/Tile.js +0 -6
- package/dist/organisms/Tiles/Tile.js.map +0 -1
- package/dist/organisms/Tiles/Tiles.d.ts +0 -11
- package/dist/organisms/Tiles/Tiles.js +0 -30
- package/dist/organisms/Tiles/Tiles.js.map +0 -1
- package/dist/organisms/Tiles/index.d.ts +0 -4
- package/dist/organisms/Tiles/index.js +0 -3
- package/dist/organisms/Tiles/index.js.map +0 -1
- package/dist/setupTests.d.ts +0 -1
- package/dist/setupTests.js +0 -6
- package/dist/setupTests.js.map +0 -1
- package/dist/typings/PolymorphicGenerics.d.ts +0 -28
- package/dist/typings/PolymorphicGenerics.js +0 -8
- package/dist/typings/PolymorphicGenerics.js.map +0 -1
- package/dist/typings/index.d.ts +0 -1
- package/dist/typings/index.js +0 -2
- package/dist/typings/index.js.map +0 -1
- package/dist/utils/toHaveNoIncomplete.d.ts +0 -17
- package/dist/utils/toHaveNoIncomplete.js +0 -43
- package/dist/utils/toHaveNoIncomplete.js.map +0 -1
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { HTMLAttributes } from 'react';
|
|
3
|
-
export interface CartItemProps 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 CartItem: React.ForwardRefExoticComponent<CartItemProps & React.RefAttributes<HTMLDivElement>>;
|
|
10
|
-
export default CartItem;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import React, { forwardRef } from 'react';
|
|
2
|
-
const CartItem = forwardRef(function CartItem({ testId = 'store-cart-item', children, ...otherProps }, ref) {
|
|
3
|
-
return (React.createElement("article", Object.assign({ ref: ref, "data-fs-cart-item": true, "data-testid": testId }, otherProps), children));
|
|
4
|
-
});
|
|
5
|
-
export default CartItem;
|
|
6
|
-
//# sourceMappingURL=CartItem.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CartItem.js","sourceRoot":"","sources":["../../../src/molecules/CartItem/CartItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAUzC,MAAM,QAAQ,GAAG,UAAU,CAAgC,SAAS,QAAQ,CAC1E,EAAE,MAAM,GAAG,iBAAiB,EAAE,QAAQ,EAAE,GAAG,UAAU,EAAE,EACvD,GAAG;IAEH,OAAO,CACL,+CAAS,GAAG,EAAE,GAAG,4CAAiC,MAAM,IAAM,UAAU,GACrE,QAAQ,CACD,CACX,CAAA;AACH,CAAC,CAAC,CAAA;AAEF,eAAe,QAAQ,CAAA"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { HTMLAttributes } from 'react';
|
|
3
|
-
export interface CartItemActionsProps 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 CartItemActions: React.ForwardRefExoticComponent<CartItemActionsProps & React.RefAttributes<HTMLDivElement>>;
|
|
10
|
-
export default CartItemActions;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import React, { forwardRef } from 'react';
|
|
2
|
-
const CartItemActions = forwardRef(function CartItemActions({ testId = 'store-cart-item-actions', children, ...otherProps }, ref) {
|
|
3
|
-
return (React.createElement("div", Object.assign({ ref: ref, "data-fs-cart-item-actions": true, "data-testid": testId }, otherProps), children));
|
|
4
|
-
});
|
|
5
|
-
export default CartItemActions;
|
|
6
|
-
//# sourceMappingURL=CartItemActions.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CartItemActions.js","sourceRoot":"","sources":["../../../src/molecules/CartItem/CartItemActions.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAUzC,MAAM,eAAe,GAAG,UAAU,CAChC,SAAS,eAAe,CACtB,EAAE,MAAM,GAAG,yBAAyB,EAAE,QAAQ,EAAE,GAAG,UAAU,EAAE,EAC/D,GAAG;IAEH,OAAO,CACL,2CAAK,GAAG,EAAE,GAAG,oDAAyC,MAAM,IAAM,UAAU,GACzE,QAAQ,CACL,CACP,CAAA;AACH,CAAC,CACF,CAAA;AAED,eAAe,eAAe,CAAA"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { HTMLAttributes } from 'react';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
export interface CartItemContentProps 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 CartItemContent: React.ForwardRefExoticComponent<CartItemContentProps & React.RefAttributes<HTMLElement>>;
|
|
10
|
-
export default CartItemContent;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import React, { forwardRef } from 'react';
|
|
2
|
-
const CartItemContent = forwardRef(function CartItemContent({ testId = 'store-cart-item-content', children, ...otherProps }, ref) {
|
|
3
|
-
return (React.createElement("section", Object.assign({ ref: ref, "data-fs-cart-item-content": true, "data-testid": testId }, otherProps), children));
|
|
4
|
-
});
|
|
5
|
-
export default CartItemContent;
|
|
6
|
-
//# sourceMappingURL=CartItemContent.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CartItemContent.js","sourceRoot":"","sources":["../../../src/molecules/CartItem/CartItemContent.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AASzC,MAAM,eAAe,GAAG,UAAU,CAChC,SAAS,eAAe,CACtB,EAAE,MAAM,GAAG,yBAAyB,EAAE,QAAQ,EAAE,GAAG,UAAU,EAAE,EAC/D,GAAG;IAEH,OAAO,CACL,+CAAS,GAAG,EAAE,GAAG,oDAAyC,MAAM,IAAM,UAAU,GAC7E,QAAQ,CACD,CACX,CAAA;AACH,CAAC,CACF,CAAA;AAED,eAAe,eAAe,CAAA"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { HTMLAttributes } from 'react';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
export interface CartItemImageProps 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 CartItemImage: React.ForwardRefExoticComponent<CartItemImageProps & React.RefAttributes<HTMLDivElement>>;
|
|
10
|
-
export default CartItemImage;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import React, { forwardRef } from 'react';
|
|
2
|
-
const CartItemImage = forwardRef(function CartItemImage({ testId = 'store-cart-item-image', children, ...otherProps }, ref) {
|
|
3
|
-
return (React.createElement("div", Object.assign({ ref: ref, "data-fs-cart-item-image": true, "data-testid": testId }, otherProps), children));
|
|
4
|
-
});
|
|
5
|
-
export default CartItemImage;
|
|
6
|
-
//# sourceMappingURL=CartItemImage.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CartItemImage.js","sourceRoot":"","sources":["../../../src/molecules/CartItem/CartItemImage.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AASzC,MAAM,aAAa,GAAG,UAAU,CAAqC,SAAS,aAAa,CACzF,EAAE,MAAM,GAAG,uBAAuB,EAAE,QAAQ,EAAE,GAAG,UAAU,EAAE,EAC7D,GAAG;IAEH,OAAO,CACL,2CAAK,GAAG,EAAE,GAAG,kDAAuC,MAAM,IAAM,UAAU,GACvE,QAAQ,CACL,CACP,CAAA;AACH,CAAC,CAAC,CAAA;AAEF,eAAe,aAAa,CAAA"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { HTMLAttributes } from 'react';
|
|
3
|
-
export interface CartItemPricesProps extends HTMLAttributes<HTMLSpanElement> {
|
|
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 CartItemPrices: React.ForwardRefExoticComponent<CartItemPricesProps & React.RefAttributes<HTMLSpanElement>>;
|
|
10
|
-
export default CartItemPrices;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import React, { forwardRef } from 'react';
|
|
2
|
-
const CartItemPrices = forwardRef(function CartItemPrices({ testId = 'store-cart-item-prices', children, ...otherProps }, ref) {
|
|
3
|
-
return (React.createElement("span", Object.assign({ ref: ref, "data-fs-cart-item-prices": true, "data-testid": testId }, otherProps), children));
|
|
4
|
-
});
|
|
5
|
-
export default CartItemPrices;
|
|
6
|
-
//# sourceMappingURL=CartItemPrices.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CartItemPrices.js","sourceRoot":"","sources":["../../../src/molecules/CartItem/CartItemPrices.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAUzC,MAAM,cAAc,GAAG,UAAU,CAC/B,SAAS,cAAc,CACrB,EAAE,MAAM,GAAG,wBAAwB,EAAE,QAAQ,EAAE,GAAG,UAAU,EAAE,EAC9D,GAAG;IAEH,OAAO,CACL,4CAAM,GAAG,EAAE,GAAG,mDAAwC,MAAM,IAAM,UAAU,GACzE,QAAQ,CACJ,CACR,CAAA;AACH,CAAC,CACF,CAAA;AAED,eAAe,cAAc,CAAA"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { HTMLAttributes } from 'react';
|
|
3
|
-
export interface CartItemSummaryProps 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 CartItemSummary: React.ForwardRefExoticComponent<CartItemSummaryProps & React.RefAttributes<HTMLDivElement>>;
|
|
10
|
-
export default CartItemSummary;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import React, { forwardRef } from 'react';
|
|
2
|
-
const CartItemSummary = forwardRef(function CartItemSummary({ testId = 'store-cart-item-summary', children, ...otherProps }, ref) {
|
|
3
|
-
return (React.createElement("div", Object.assign({ ref: ref, "data-fs-cart-item-summary": true, "data-testid": testId }, otherProps), children));
|
|
4
|
-
});
|
|
5
|
-
export default CartItemSummary;
|
|
6
|
-
//# sourceMappingURL=CartItemSummary.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CartItemSummary.js","sourceRoot":"","sources":["../../../src/molecules/CartItem/CartItemSummary.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAUzC,MAAM,eAAe,GAAG,UAAU,CAChC,SAAS,eAAe,CACtB,EAAE,MAAM,GAAG,yBAAyB,EAAE,QAAQ,EAAE,GAAG,UAAU,EAAE,EAC/D,GAAG;IAEH,OAAO,CACL,2CAAK,GAAG,EAAE,GAAG,oDAAyC,MAAM,IAAM,UAAU,GACzE,QAAQ,CACL,CACP,CAAA;AACH,CAAC,CACF,CAAA;AAED,eAAe,eAAe,CAAA"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { HTMLAttributes } from 'react';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
export interface CartItemTitleProps 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 CartItemTitle: React.ForwardRefExoticComponent<CartItemTitleProps & React.RefAttributes<HTMLDivElement>>;
|
|
10
|
-
export default CartItemTitle;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import React, { forwardRef } from 'react';
|
|
2
|
-
const CartItemTitle = forwardRef(function CartItemTitle({ testId = 'store-cart-item-title', children, ...otherProps }, ref) {
|
|
3
|
-
return (React.createElement("div", Object.assign({ ref: ref, "data-fs-cart-item-title": true, "data-testid": testId }, otherProps), children));
|
|
4
|
-
});
|
|
5
|
-
export default CartItemTitle;
|
|
6
|
-
//# sourceMappingURL=CartItemTitle.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CartItemTitle.js","sourceRoot":"","sources":["../../../src/molecules/CartItem/CartItemTitle.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AASzC,MAAM,aAAa,GAAG,UAAU,CAAqC,SAAS,aAAa,CACzF,EAAE,MAAM,GAAG,uBAAuB,EAAE,QAAQ,EAAE,GAAG,UAAU,EAAE,EAC7D,GAAG;IAEH,OAAO,CACL,2CAAK,GAAG,EAAE,GAAG,kDAAuC,MAAM,IAAM,UAAU,GACvE,QAAQ,CACL,CACP,CAAA;AACH,CAAC,CAAC,CAAA;AAEF,eAAe,aAAa,CAAA"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export { default } from './CartItem';
|
|
2
|
-
export type { CartItemProps } from './CartItem';
|
|
3
|
-
export { default as CartItemActions } from './CartItemActions';
|
|
4
|
-
export type { CartItemActionsProps } from './CartItemActions';
|
|
5
|
-
export { default as CartItemContent } from './CartItemContent';
|
|
6
|
-
export type { CartItemContentProps } from './CartItemContent';
|
|
7
|
-
export { default as CartItemImage } from './CartItemImage';
|
|
8
|
-
export type { CartItemImageProps } from './CartItemImage';
|
|
9
|
-
export { default as CartItemPrices } from './CartItemPrices';
|
|
10
|
-
export type { CartItemPricesProps } from './CartItemPrices';
|
|
11
|
-
export { default as CartItemSummary } from './CartItemSummary';
|
|
12
|
-
export type { CartItemSummaryProps } from './CartItemSummary';
|
|
13
|
-
export { default as CartItemTitle } from './CartItemTitle';
|
|
14
|
-
export type { CartItemTitleProps } from './CartItemTitle';
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export { default } from './CartItem';
|
|
2
|
-
export { default as CartItemActions } from './CartItemActions';
|
|
3
|
-
export { default as CartItemContent } from './CartItemContent';
|
|
4
|
-
export { default as CartItemImage } from './CartItemImage';
|
|
5
|
-
export { default as CartItemPrices } from './CartItemPrices';
|
|
6
|
-
export { default as CartItemSummary } from './CartItemSummary';
|
|
7
|
-
export { default as CartItemTitle } from './CartItemTitle';
|
|
8
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/molecules/CartItem/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AAGpC,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAG9D,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAG9D,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAG1D,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAG5D,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAG9D,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAA"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { ReactNode } from 'react';
|
|
2
|
-
export declare type DropdownProps = {
|
|
3
|
-
children: ReactNode;
|
|
4
|
-
onDismiss?(): void;
|
|
5
|
-
isOpen?: boolean;
|
|
6
|
-
id?: string;
|
|
7
|
-
};
|
|
8
|
-
declare const Dropdown: ({ children, isOpen: isOpenDefault, onDismiss, id, }: DropdownProps) => JSX.Element;
|
|
9
|
-
export default Dropdown;
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import React, { useRef, useMemo, useState, useEffect, useCallback } from 'react';
|
|
2
|
-
import DropdownContext from './contexts/DropdownContext';
|
|
3
|
-
const Dropdown = ({ children, isOpen: isOpenDefault = false, onDismiss, id = 'store-dropdown', }) => {
|
|
4
|
-
const [isOpen, setIsOpen] = useState(isOpenDefault);
|
|
5
|
-
const dropdownItemsRef = useRef([]);
|
|
6
|
-
const selectedDropdownItemIndexRef = useRef(0);
|
|
7
|
-
const dropdownButtonRef = useRef(null);
|
|
8
|
-
const close = useCallback(() => {
|
|
9
|
-
setIsOpen(false);
|
|
10
|
-
onDismiss?.();
|
|
11
|
-
dropdownButtonRef.current?.focus();
|
|
12
|
-
}, [onDismiss]);
|
|
13
|
-
const open = () => {
|
|
14
|
-
setIsOpen(true);
|
|
15
|
-
};
|
|
16
|
-
const toggle = useCallback(() => {
|
|
17
|
-
setIsOpen((old) => {
|
|
18
|
-
if (old) {
|
|
19
|
-
onDismiss?.();
|
|
20
|
-
dropdownButtonRef.current?.focus();
|
|
21
|
-
}
|
|
22
|
-
return !old;
|
|
23
|
-
});
|
|
24
|
-
}, [onDismiss]);
|
|
25
|
-
useEffect(() => {
|
|
26
|
-
setIsOpen(isOpenDefault);
|
|
27
|
-
}, [isOpenDefault]);
|
|
28
|
-
useEffect(() => {
|
|
29
|
-
isOpen && dropdownItemsRef?.current[0]?.focus();
|
|
30
|
-
}, [isOpen]);
|
|
31
|
-
useEffect(() => {
|
|
32
|
-
let firstClick = true;
|
|
33
|
-
const event = (e) => {
|
|
34
|
-
const someItemWasClicked = dropdownItemsRef?.current.some((item) => e.target === item);
|
|
35
|
-
if (firstClick) {
|
|
36
|
-
firstClick = false;
|
|
37
|
-
return;
|
|
38
|
-
}
|
|
39
|
-
!someItemWasClicked && close();
|
|
40
|
-
};
|
|
41
|
-
if (isOpen) {
|
|
42
|
-
document.addEventListener('click', event);
|
|
43
|
-
}
|
|
44
|
-
else {
|
|
45
|
-
document.removeEventListener('click', event);
|
|
46
|
-
}
|
|
47
|
-
return () => {
|
|
48
|
-
document.removeEventListener('click', event);
|
|
49
|
-
};
|
|
50
|
-
}, [close, isOpen]);
|
|
51
|
-
const value = useMemo(() => {
|
|
52
|
-
return {
|
|
53
|
-
isOpen,
|
|
54
|
-
close,
|
|
55
|
-
open,
|
|
56
|
-
toggle,
|
|
57
|
-
dropdownButtonRef,
|
|
58
|
-
onDismiss,
|
|
59
|
-
selectedDropdownItemIndexRef,
|
|
60
|
-
dropdownItemsRef,
|
|
61
|
-
id,
|
|
62
|
-
};
|
|
63
|
-
}, [close, id, isOpen, onDismiss, toggle]);
|
|
64
|
-
return (React.createElement(DropdownContext.Provider, { value: value }, children));
|
|
65
|
-
};
|
|
66
|
-
export default Dropdown;
|
|
67
|
-
//# sourceMappingURL=Dropdown.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Dropdown.js","sourceRoot":"","sources":["../../../src/molecules/Dropdown/Dropdown.tsx"],"names":[],"mappings":"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"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { ButtonHTMLAttributes } from 'react';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
export interface DropdownButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
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 DropdownButton: React.ForwardRefExoticComponent<DropdownButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
10
|
-
export default DropdownButton;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React, { forwardRef, useImperativeHandle } from 'react';
|
|
2
|
-
import { useDropdown } from './hooks/useDropdown';
|
|
3
|
-
const DropdownButton = forwardRef(function Button({ children, testId = 'store-dropdown-button', ...otherProps }, ref) {
|
|
4
|
-
const { toggle, dropdownButtonRef, isOpen, id } = useDropdown();
|
|
5
|
-
useImperativeHandle(ref, () => dropdownButtonRef.current, [
|
|
6
|
-
dropdownButtonRef,
|
|
7
|
-
]);
|
|
8
|
-
return (React.createElement("button", Object.assign({ "data-fs-dropdown-button": true, onClick: toggle, "data-testid": testId, ref: dropdownButtonRef, "aria-expanded": isOpen, "aria-haspopup": "menu", "aria-controls": id }, otherProps), children));
|
|
9
|
-
});
|
|
10
|
-
export default DropdownButton;
|
|
11
|
-
//# sourceMappingURL=DropdownButton.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownButton.js","sourceRoot":"","sources":["../../../src/molecules/Dropdown/DropdownButton.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,OAAO,CAAA;AAE9D,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AAUjD,MAAM,cAAc,GAAG,UAAU,CAC/B,SAAS,MAAM,CACb,EAAE,QAAQ,EAAE,MAAM,GAAG,uBAAuB,EAAE,GAAG,UAAU,EAAE,EAC7D,GAAG;IAEH,MAAM,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,EAAE,EAAE,EAAE,GAAG,WAAW,EAAE,CAAA;IAE/D,mBAAmB,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC,iBAAkB,CAAC,OAAQ,EAAE;QAC1D,iBAAiB;KAClB,CAAC,CAAA;IAEF,OAAO,CACL,+EAEE,OAAO,EAAE,MAAM,iBACF,MAAM,EACnB,GAAG,EAAE,iBAAiB,mBACP,MAAM,mBACP,MAAM,mBACL,EAAE,IACb,UAAU,GAEb,QAAQ,CACF,CACV,CAAA;AACH,CAAC,CACF,CAAA;AAED,eAAe,cAAc,CAAA"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { ButtonHTMLAttributes } from 'react';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
export interface DropdownItemProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
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 DropdownItem: React.ForwardRefExoticComponent<DropdownItemProps & React.RefAttributes<HTMLButtonElement>>;
|
|
10
|
-
export default DropdownItem;
|
|
@@ -1,26 +0,0 @@
|
|
|
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", Object.assign({ "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
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownItem.js","sourceRoot":"","sources":["../../../src/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,4FAEe,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,IACzB,UAAU,GAEb,QAAQ,CACF,CACV,CAAA;AACH,CAAC,CACF,CAAA;AAED,eAAe,YAAY,CAAA"}
|
|
@@ -1,22 +0,0 @@
|
|
|
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;
|
|
@@ -1,65 +0,0 @@
|
|
|
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", Object.assign({ 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
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownMenu.js","sourceRoot":"","sources":["../../../src/molecules/Dropdown/DropdownMenu.tsx"],"names":[],"mappings":"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"}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
export declare 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;
|
|
@@ -1,11 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownContext.js","sourceRoot":"","sources":["../../../../src/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"}
|
|
@@ -1,14 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useDropdown.js","sourceRoot":"","sources":["../../../../src/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"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
declare 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 {};
|
|
@@ -1,25 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useDropdownPosition.js","sourceRoot":"","sources":["../../../../src/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"}
|
|
@@ -1,8 +0,0 @@
|
|
|
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';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/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"}
|
|
@@ -1,4 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Caret.js","sourceRoot":"","sources":["../../../../../src/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"}
|