@evenicanpm/storefront-core 1.0.2 → 1.0.4
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/docs.tsconfig.json +35 -0
- package/package.json +6 -3
- package/src/api-manager/README.md +30 -22
- package/src/api-manager/datasources/e4/{e4-address.datasource.ts → address/e4-address.datasource.ts} +10 -10
- package/src/api-manager/datasources/e4/address/e4-address.remaps.ts +70 -0
- package/src/api-manager/datasources/e4/address/e4-address.translator.ts +98 -0
- package/src/api-manager/datasources/e4/{e4-cart.datasource.ts → cart/e4-cart.datasource.ts} +17 -16
- package/src/api-manager/datasources/e4/cart/e4-cart.remaps.ts +94 -0
- package/src/api-manager/datasources/e4/cart/e4-cart.translator.ts +23 -0
- package/src/api-manager/datasources/e4/categories/e4-categories.datasource.ts +38 -0
- package/src/api-manager/datasources/e4/categories/e4-categories.translator.ts +161 -0
- package/src/api-manager/datasources/e4/e4.datasource.ts +8 -39
- package/src/api-manager/datasources/e4/{e4-order.datasource.ts → order/e4-order.datasource.ts} +3 -3
- package/src/api-manager/datasources/e4/order/e4-order.remaps.ts +101 -0
- package/src/api-manager/datasources/e4/{e4-organization.datasource.ts → organization/e4-organization.datasource.ts} +1 -1
- package/src/api-manager/datasources/e4/{e4-product.datasource.ts → product/e4-product.datasource.ts} +13 -11
- package/src/api-manager/datasources/e4/product/e4-product.remaps.ts +88 -0
- package/src/api-manager/datasources/e4/{e4.translator.ts → product/e4-product.translator.ts} +9 -329
- package/src/api-manager/datasources/e4/{e4-session.datasource.ts → session/e4-session.datasource.ts} +3 -3
- package/src/api-manager/datasources/e4/session/e4-session.translator.ts +18 -0
- package/src/api-manager/datasources/e4/user/e4-user.datasource.ts +13 -6
- package/src/api-manager/datasources/e4/user/e4-user.remaps.ts +49 -0
- package/src/api-manager/datasources/e4/user/e4-user.translator.ts +23 -2
- package/src/api-manager/datasources/e4/utils/unwrap-e4-variants.ts +1 -1
- package/src/api-manager/index.ts +11 -6
- package/src/api-manager/schemas/product.schema.ts +0 -1
- package/src/api-manager/schemas/user.schema.ts +3 -1
- package/src/api-manager/services/cart/mutations/add-to-cart.ts +1 -1
- package/src/api-manager/services/cart/mutations/checkout.ts +1 -2
- package/src/api-manager/services/create-query.ts +10 -0
- package/src/api-manager/services/product/queries/get-product-availability.ts +1 -1
- package/src/api-manager/services/product/server/product.server.ts +4 -1
- package/src/api-manager/services/user/mutations/add-to-wishlist.ts +23 -3
- package/src/api-manager/services/user/mutations/remove-from-wishlist.ts +23 -0
- package/src/api-manager/types/Datasource.ts +1 -5
- package/src/cms/blocks/BlockManager.tsx +67 -0
- package/src/cms/blocks/Components/BrandLogosScroller.tsx +72 -0
- package/src/cms/blocks/Components/CategoryCard.tsx +47 -0
- package/src/cms/blocks/Components/CategoryCarousel/index.tsx +59 -0
- package/src/cms/blocks/Components/FeaturePill.tsx +99 -0
- package/src/cms/blocks/Components/FeaturedCategories.tsx +41 -0
- package/src/cms/blocks/Components/FeaturedProducts.tsx +41 -0
- package/src/cms/blocks/Components/Footer/data/index.ts +32 -0
- package/src/cms/blocks/Components/Footer/index.tsx +88 -0
- package/src/cms/blocks/Components/Footer/interfaces.ts +37 -0
- package/src/cms/blocks/Components/Footer/sections/FooterAppStore.tsx +45 -0
- package/src/cms/blocks/Components/Footer/sections/FooterContact.tsx +36 -0
- package/src/cms/blocks/Components/Footer/sections/FooterLinks.tsx +30 -0
- package/src/cms/blocks/Components/Footer/sections/FooterLogo.tsx +26 -0
- package/src/cms/blocks/Components/Footer/sections/FooterSocialLinks.tsx +70 -0
- package/src/cms/blocks/Components/Footer/styles/index.ts +39 -0
- package/src/cms/blocks/Components/Footer.tsx +77 -0
- package/src/cms/blocks/Components/Hero.tsx +73 -0
- package/src/cms/blocks/Components/HeroCarousel/index.tsx +48 -0
- package/src/cms/blocks/Components/Image.tsx +39 -0
- package/src/cms/blocks/Components/MediaCard.tsx +41 -0
- package/src/cms/blocks/Components/ProductCarousel/index.tsx +88 -0
- package/src/cms/blocks/Components/ProductSectionFullWidth/index.tsx +107 -0
- package/src/cms/blocks/Components/RichText.tsx +19 -0
- package/src/cms/blocks/Components/Seo/index.tsx +48 -0
- package/src/cms/blocks/Components/Services/index.tsx +21 -0
- package/src/cms/blocks/Components/Services/service-card.tsx +73 -0
- package/src/cms/blocks/Components/shared/featured-product-card.tsx +29 -0
- package/src/cms/blocks/Components/shared/product-category-item.tsx +49 -0
- package/src/cms/blocks/Components/shared/product-grid.tsx +63 -0
- package/src/cms/blocks/Components/shared/top-categories-card.tsx +66 -0
- package/src/cms/blocks/Components/shared/top-rating-product-card.tsx +66 -0
- package/src/cms/blocks/Icons/Components/Category.tsx +14 -0
- package/src/cms/blocks/Icons/Components/DottedStar.tsx +40 -0
- package/src/cms/blocks/Icons/Components/FallbackIcon.tsx +33 -0
- package/src/cms/blocks/Icons/Components/GiftBox.tsx +18 -0
- package/src/cms/blocks/Icons/Components/Light.tsx +13 -0
- package/src/cms/blocks/Icons/Components/NewArrival.tsx +18 -0
- package/src/cms/blocks/Icons/Components/RankBadge.tsx +39 -0
- package/src/cms/blocks/Icons/index.ts +32 -0
- package/src/cms/blocks/index.tsx +16 -0
- package/src/cms/blocks/interfaces.ts +240 -0
- package/src/components/Notifications/README.md +1 -1
- package/src/components/Notifications/notification-context.tsx +1 -1
- package/src/components/README.md +3 -8
- package/src/components/_components/MiniCartClient.tsx +1 -1
- package/src/components/_components/navbar/category-based-menu/components/categories.tsx +1 -1
- package/src/components/_components/navbar/mega-menu/mega-menu.tsx +1 -1
- package/src/components/_components/navbar/nav-list/nav-item-child.tsx +2 -2
- package/src/components/_components/product-cards/product-card-1/product-card-1-wrapper.tsx +1 -1
- package/src/components/_components/products-view/product-view-dialog.tsx +1 -1
- package/src/components/_components/settings/setting.tsx +1 -1
- package/src/components/_components/wishlist/add-to-wishlist-dialog.tsx +2 -2
- package/src/components/_components/wishlist/components/create-new-list.tsx +1 -1
- package/src/components/_components/wishlist/remove-from-wishlist-dialog.tsx +2 -2
- package/src/components/_components/wishlist-modal/add-to-wishlist-dialog.tsx +2 -2
- package/src/components/_components/wishlist-modal/remove-from-wishlist-dialog.tsx +2 -2
- package/src/components/countries-input.tsx +0 -1
- package/src/components-v2/BazaarCard.tsx +21 -0
- package/src/components-v2/BazaarImage.tsx +12 -0
- package/src/components-v2/BazaarMenu.tsx +47 -0
- package/src/components-v2/BazaarSwitch.tsx +37 -0
- package/src/components-v2/BazaarTextField.tsx +73 -0
- package/src/components-v2/BoxShadowCard.tsx +16 -0
- package/src/components-v2/DropZone.tsx +86 -0
- package/src/components-v2/HoverBox.tsx +22 -0
- package/src/components-v2/Image.tsx +5 -0
- package/src/components-v2/ImageWithFallback.tsx +51 -0
- package/src/components-v2/LazyImage.tsx +12 -0
- package/src/components-v2/Loading.tsx +36 -0
- package/src/components-v2/README.md +4 -0
- package/src/components-v2/SearchInput.tsx +28 -0
- package/src/components-v2/SnackbarProvider.tsx +32 -0
- package/src/components-v2/T/index.tsx +15 -0
- package/src/components-v2/Typography.tsx +227 -0
- package/src/components-v2/WhiteButton.tsx +20 -0
- package/src/components-v2/accordion/accordion-header.tsx +43 -0
- package/src/components-v2/accordion/index.ts +1 -0
- package/src/components-v2/bazaar-types.ts +84 -0
- package/src/components-v2/carousel/carousel.tsx +106 -0
- package/src/components-v2/carousel/components/carousel-arrows.tsx +54 -0
- package/src/components-v2/carousel/components/carousel-dots.tsx +18 -0
- package/src/components-v2/carousel/index.ts +1 -0
- package/src/components-v2/carousel/styles/index.ts +93 -0
- package/src/components-v2/carousel-cards/carousel-card-1/carousel-card-1.tsx +83 -0
- package/src/components-v2/carousel-cards/carousel-card-1/index.ts +1 -0
- package/src/components-v2/carousel-cards/carousel-card-1/styles.ts +34 -0
- package/src/components-v2/categories/category-list/category-list.tsx +101 -0
- package/src/components-v2/categories/category-list/index.ts +1 -0
- package/src/components-v2/categories/category-list/styles.ts +35 -0
- package/src/components-v2/categories/category-list/types.ts +4 -0
- package/src/components-v2/categories/category-list-item/category-menu-item.tsx +37 -0
- package/src/components-v2/categories/category-list-item/index.ts +1 -0
- package/src/components-v2/categories/category-list-item/styles.ts +35 -0
- package/src/components-v2/categories/category-menu.tsx +53 -0
- package/src/components-v2/categories/mega-menu/banner.tsx +91 -0
- package/src/components-v2/categories/mega-menu/column-list.tsx +77 -0
- package/src/components-v2/categories/mega-menu/mega-menu-1.tsx +55 -0
- package/src/components-v2/categories/mega-menu/mega-menu-2.tsx +67 -0
- package/src/components-v2/categories/mega-menu/styles.ts +25 -0
- package/src/components-v2/categories/types.ts +16 -0
- package/src/components-v2/countries-input.tsx +73 -0
- package/src/components-v2/flex-box/flex-between.tsx +14 -0
- package/src/components-v2/flex-box/flex-box.tsx +9 -0
- package/src/components-v2/flex-box/flex-row-center.tsx +9 -0
- package/src/components-v2/flex-box/index.ts +5 -0
- package/src/components-v2/header/components/categories-menu.tsx +23 -0
- package/src/components-v2/header/components/mobile-header.tsx +148 -0
- package/src/components-v2/header/components/user.test.tsx +200 -0
- package/src/components-v2/header/components/user.tsx +250 -0
- package/src/components-v2/header/header.tsx +83 -0
- package/src/components-v2/header/hooks/use-header.ts +13 -0
- package/src/components-v2/header/index.ts +1 -0
- package/src/components-v2/header/sticky-header.tsx +49 -0
- package/src/components-v2/header/styles/index.ts +24 -0
- package/src/components-v2/icons/cart-bag.tsx +13 -0
- package/src/components-v2/icons/category-outline.tsx +29 -0
- package/src/components-v2/icons/category.tsx +12 -0
- package/src/components-v2/icons/home.tsx +19 -0
- package/src/components-v2/icons/search.tsx +13 -0
- package/src/components-v2/icons/shopping-bag-outlined.tsx +13 -0
- package/src/components-v2/icons/up-down.tsx +21 -0
- package/src/components-v2/icons/user.tsx +13 -0
- package/src/components-v2/icons/user2.tsx +14 -0
- package/src/components-v2/mini-cart/__tests__/cart-item.test.tsx +174 -0
- package/src/components-v2/mini-cart/__tests__/mini-cart.test.tsx +121 -0
- package/src/components-v2/mini-cart/__tests__/test-cart-empty.json +84 -0
- package/src/components-v2/mini-cart/__tests__/test-cart-with-item.json +244 -0
- package/src/components-v2/mini-cart/components/bottom-actions.tsx +81 -0
- package/src/components-v2/mini-cart/components/cart-item.tsx +205 -0
- package/src/components-v2/mini-cart/components/empty-view.tsx +69 -0
- package/src/components-v2/mini-cart/components/top-header.tsx +76 -0
- package/src/components-v2/mini-cart/index.ts +1 -0
- package/src/components-v2/mini-cart/mini-cart-trigger.tsx +99 -0
- package/src/components-v2/mini-cart/mini-cart.tsx +175 -0
- package/src/components-v2/mobile-navigation/index.ts +3 -0
- package/src/components-v2/mobile-navigation/mobile-navigation-bar.tsx +118 -0
- package/src/components-v2/mobile-navigation/styles/index.ts +63 -0
- package/src/components-v2/nav-link/index.ts +5 -0
- package/src/components-v2/nav-link/nav-link-2.tsx +32 -0
- package/src/components-v2/nav-link/nav-link-3.tsx +67 -0
- package/src/components-v2/nav-link/nav-link.tsx +53 -0
- package/src/components-v2/navbar/categories.tsx +81 -0
- package/src/components-v2/navbar/category-based-menu/category-based-menu.tsx +146 -0
- package/src/components-v2/navbar/category-based-menu/index.ts +1 -0
- package/src/components-v2/navbar/category-based-menu/styles.ts +81 -0
- package/src/components-v2/navbar/category-based-menu/types.ts +18 -0
- package/src/components-v2/navbar/index.ts +1 -0
- package/src/components-v2/navbar/mega-menu/index.ts +1 -0
- package/src/components-v2/navbar/mega-menu/mega-menu.tsx +138 -0
- package/src/components-v2/navbar/mega-menu/styles.ts +43 -0
- package/src/components-v2/navbar/mobile-menu/index.ts +1 -0
- package/src/components-v2/navbar/mobile-menu/mobile-menu.test.tsx +111 -0
- package/src/components-v2/navbar/mobile-menu/mobile-menu.tsx +141 -0
- package/src/components-v2/navbar/nav-list/cms-nav.test.tsx +84 -0
- package/src/components-v2/navbar/nav-list/index.ts +1 -0
- package/src/components-v2/navbar/nav-list/nav-item-child.tsx +66 -0
- package/src/components-v2/navbar/nav-list/nav-list.tsx +141 -0
- package/src/components-v2/navbar/navbar.tsx +95 -0
- package/src/components-v2/navbar/styles.ts +90 -0
- package/src/components-v2/navbar/utils/transform-nav.test.ts +209 -0
- package/src/components-v2/navbar/utils/transform-nav.ts +43 -0
- package/src/components-v2/no-records.tsx +20 -0
- package/src/components-v2/product-cards/discount-chip.tsx +43 -0
- package/src/components-v2/product-cards/product-card/components/hover-actions.tsx +37 -0
- package/src/components-v2/product-cards/product-card/components/quantity-buttons.tsx +65 -0
- package/src/components-v2/product-cards/product-card/index.ts +1 -0
- package/src/components-v2/product-cards/product-card/product-card.tsx +410 -0
- package/src/components-v2/product-cards/product-card/styles/index.ts +52 -0
- package/src/components-v2/product-cards/product-card-plp/components/quantity-buttons.tsx +54 -0
- package/src/components-v2/product-cards/product-card-plp/index.ts +1 -0
- package/src/components-v2/product-cards/product-card-plp/product-card.tsx +161 -0
- package/src/components-v2/product-cards/product-card-plp/styles/index.ts +18 -0
- package/src/components-v2/product-cards/product-card-plp-list/components/add-to-cart.tsx +63 -0
- package/src/components-v2/product-cards/product-card-plp-list/components/favorite-button.tsx +27 -0
- package/src/components-v2/product-cards/product-card-plp-list/components/tags.tsx +33 -0
- package/src/components-v2/product-cards/product-card-plp-list/index.ts +1 -0
- package/src/components-v2/product-cards/product-card-plp-list/product-card.tsx +219 -0
- package/src/components-v2/product-cards/product-card-search/index.ts +1 -0
- package/src/components-v2/product-cards/product-card-search/product-card.tsx +166 -0
- package/src/components-v2/product-cards/product-card-search/styles/index.ts +61 -0
- package/src/components-v2/product-cards/product-price.tsx +26 -0
- package/src/components-v2/product-cards/product-rating.tsx +28 -0
- package/src/components-v2/product-cards/product-title.tsx +24 -0
- package/src/components-v2/product-cards/use-product.ts +35 -0
- package/src/components-v2/product-dialog/compound/product-dialog.tsx +225 -0
- package/src/components-v2/product-dialog/index.tsx +29 -0
- package/src/components-v2/product-dimensions/compound/dimensions-group-error.tsx +46 -0
- package/src/components-v2/product-dimensions/compound/dimensions-group-label.tsx +27 -0
- package/src/components-v2/product-dimensions/compound/dimensions-group-list-chip.tsx +78 -0
- package/src/components-v2/product-dimensions/compound/dimensions-group-list.tsx +24 -0
- package/src/components-v2/product-dimensions/compound/dimensions-group.tsx +55 -0
- package/src/components-v2/product-dimensions/compound/dimensions.tsx +81 -0
- package/src/components-v2/product-dimensions/index.tsx +38 -0
- package/src/components-v2/product-dimensions/utils/has-selected-dimension.ts +20 -0
- package/src/components-v2/product-quantity-buttons/compound/quantity-buttons-root.tsx +181 -0
- package/src/components-v2/product-quantity-buttons/index.tsx +22 -0
- package/src/components-v2/product-quantity-variants/index.tsx +90 -0
- package/src/components-v2/products-view/compound/context.ts +25 -0
- package/src/components-v2/products-view/compound/products-grid-view.tsx +109 -0
- package/src/components-v2/products-view/compound/products-list-view.tsx +98 -0
- package/src/components-v2/products-view/compound/types.ts +12 -0
- package/src/components-v2/products-view/index.tsx +45 -0
- package/src/components-v2/products-view/products-grid-view.tsx +65 -0
- package/src/components-v2/products-view/products-list-view.tsx +66 -0
- package/src/components-v2/progress/index.ts +1 -0
- package/src/components-v2/progress/progress.tsx +77 -0
- package/src/components-v2/scrollbar/index.ts +1 -0
- package/src/components-v2/scrollbar/scrollbar.tsx +27 -0
- package/src/components-v2/scrollbar/styles.ts +15 -0
- package/src/components-v2/search-bar/compound/context.ts +31 -0
- package/src/components-v2/search-bar/compound/results-item-lg.tsx +43 -0
- package/src/components-v2/search-bar/compound/results-item-sm.tsx +48 -0
- package/src/components-v2/search-bar/compound/results-suspense.tsx +49 -0
- package/src/components-v2/search-bar/compound/results.tsx +42 -0
- package/src/components-v2/search-bar/compound/search-bar-root.tsx +64 -0
- package/src/components-v2/search-bar/compound/textfield-adornment-button.tsx +22 -0
- package/src/components-v2/search-bar/compound/textfield-adornment-category.tsx +83 -0
- package/src/components-v2/search-bar/compound/textfield-adornment-search-icon.tsx +34 -0
- package/src/components-v2/search-bar/compound/textfield.tsx +58 -0
- package/src/components-v2/search-bar/hooks/use-click-outside.ts +20 -0
- package/src/components-v2/search-bar/hooks/use-search.ts +63 -0
- package/src/components-v2/search-bar/index.tsx +36 -0
- package/src/components-v2/search-bar/styles/index.ts +49 -0
- package/src/components-v2/search-bar/utils/findCategoryNameById.ts +18 -0
- package/src/components-v2/section/compound/section-header.tsx +63 -0
- package/src/components-v2/section/compound/section.tsx +26 -0
- package/src/components-v2/section/index.ts +1 -0
- package/src/components-v2/side-nav/index.ts +1 -0
- package/src/components-v2/side-nav/side-nav.tsx +48 -0
- package/src/components-v2/site-logo.tsx +17 -0
- package/src/components-v2/sticky/index.ts +1 -0
- package/src/components-v2/sticky/sticky.tsx +62 -0
- package/src/components-v2/sticky/styles.ts +38 -0
- package/src/components-v2/utils/constants.ts +8 -0
- package/src/components-v2/wishlist-dialogs/add-to-wishlist/add-to-wishlist-button.tsx +69 -0
- package/src/components-v2/wishlist-dialogs/add-to-wishlist/compound/add-to-wishlist-bottom-ui.tsx +35 -0
- package/src/components-v2/wishlist-dialogs/add-to-wishlist/compound/add-to-wishlist-dialog.tsx +79 -0
- package/src/components-v2/wishlist-dialogs/add-to-wishlist/compound/add-to-wishlist-list.tsx +41 -0
- package/src/components-v2/wishlist-dialogs/add-to-wishlist/compound/context.ts +29 -0
- package/src/components-v2/wishlist-dialogs/add-to-wishlist/compound/wishlist-dialog-header.tsx +74 -0
- package/src/components-v2/wishlist-dialogs/add-to-wishlist/compound/wishlist-dialog-item.tsx +82 -0
- package/src/components-v2/wishlist-dialogs/add-to-wishlist/hooks/use-add-to-wishlist.ts +152 -0
- package/src/components-v2/wishlist-dialogs/add-to-wishlist/index.tsx +39 -0
- package/src/components-v2/wishlist-dialogs/create-wishlist/compound/context.ts +2 -0
- package/src/components-v2/wishlist-dialogs/create-wishlist/compound/create-wishlist-bottom-ui.tsx +42 -0
- package/src/components-v2/wishlist-dialogs/create-wishlist/compound/create-wishlist-dialog.tsx +92 -0
- package/src/components-v2/wishlist-dialogs/create-wishlist/compound/create-wishlist-form.tsx +96 -0
- package/src/components-v2/wishlist-dialogs/create-wishlist/create-wishlist-button.tsx +42 -0
- package/src/components-v2/wishlist-dialogs/create-wishlist/index.tsx +22 -0
- package/src/components-v2/wishlist-dialogs/styles.ts +61 -0
- package/src/hooks/{use-cart.tsx → use-cart.ts} +29 -23
- package/src/hooks/use-variants.ts +138 -0
- package/src/lib/build-detail-url.ts +2 -1
- package/src/pages/README.md +4 -0
- package/src/pages/product-details/product-intro/product-intro.tsx +29 -24
- package/src/pages/product-list/quick-view-dialog-content.tsx +22 -11
- package/src/pages-v2/README.md +4 -0
- package/src/pages-v2/account/addresses/address-form.tsx +289 -0
- package/src/pages-v2/account/addresses/address-item.tsx +104 -0
- package/src/pages-v2/account/dashboard-header.tsx +123 -0
- package/src/pages-v2/account/navigation.tsx +87 -0
- package/src/pages-v2/account/orders/icons/delivery.tsx +14 -0
- package/src/pages-v2/account/orders/icons/package-box.tsx +13 -0
- package/src/pages-v2/account/orders/icons/truck-filled.tsx +14 -0
- package/src/pages-v2/account/orders/order-progress.tsx +114 -0
- package/src/pages-v2/account/orders/order-row.tsx +64 -0
- package/src/pages-v2/account/orders/order-summary.tsx +87 -0
- package/src/pages-v2/account/orders/ordered-products.tsx +121 -0
- package/src/pages-v2/account/profile/profile-button.test.tsx +59 -0
- package/src/pages-v2/account/profile/profile-button.tsx +50 -0
- package/src/pages-v2/account/profile/user-info.tsx +62 -0
- package/src/pages-v2/account/styles.ts +32 -0
- package/src/pages-v2/account/table-row.tsx +19 -0
- package/src/pages-v2/account/wishlist/create-new-list.tsx +167 -0
- package/src/pages-v2/account/wishlist/create-wishlist-button.tsx +40 -0
- package/src/pages-v2/account/wishlist/wishlist-item.tsx +82 -0
- package/src/pages-v2/blog/pagination.tsx +38 -0
- package/src/pages-v2/cart/cart-item.tsx +312 -0
- package/src/pages-v2/cart/checkout-form.tsx +122 -0
- package/src/pages-v2/cart/coupon-entry.tsx +90 -0
- package/src/pages-v2/cart/estimate-shipping.tsx +183 -0
- package/src/pages-v2/cart/wrapper.tsx +30 -0
- package/src/pages-v2/checkout/checkout-alt-form/address-card.tsx +76 -0
- package/src/pages-v2/checkout/checkout-alt-form/checkout-form.tsx +131 -0
- package/src/pages-v2/checkout/checkout-alt-form/checkout-step.tsx +120 -0
- package/src/pages-v2/checkout/checkout-alt-form/customer-information.tsx +94 -0
- package/src/pages-v2/checkout/checkout-alt-form/delivery-address.tsx +174 -0
- package/src/pages-v2/checkout/checkout-alt-form/delivery-date.tsx +114 -0
- package/src/pages-v2/checkout/checkout-alt-form/delivery-options.tsx +190 -0
- package/src/pages-v2/checkout/checkout-alt-form/edit-address-form.tsx +130 -0
- package/src/pages-v2/checkout/checkout-alt-form/heading.tsx +50 -0
- package/src/pages-v2/checkout/checkout-alt-form/index.ts +1 -0
- package/src/pages-v2/checkout/checkout-alt-form/new-address-form.tsx +299 -0
- package/src/pages-v2/checkout/checkout-alt-form/node.tsx +9 -0
- package/src/pages-v2/checkout/checkout-alt-form/payment-details.tsx +347 -0
- package/src/pages-v2/checkout/checkout-alt-form/safe-card-preview-data.tsx +36 -0
- package/src/pages-v2/checkout/checkout-alt-form/types.ts +20 -0
- package/src/pages-v2/checkout/checkout-alt-summary/cart-item.tsx +42 -0
- package/src/pages-v2/checkout/checkout-alt-summary/checkout-alt-summary.tsx +42 -0
- package/src/pages-v2/checkout/checkout-alt-summary/index.ts +1 -0
- package/src/pages-v2/checkout/checkout-alt-summary/list-item.tsx +31 -0
- package/src/pages-v2/confirmation/address.tsx +25 -0
- package/src/pages-v2/confirmation/confirmation-summary.tsx +55 -0
- package/src/pages-v2/confirmation/ordered-products.tsx +115 -0
- package/src/pages-v2/product-details/available-shops.tsx +48 -0
- package/src/pages-v2/product-details/bopis/find-in-store-button.tsx +64 -0
- package/src/pages-v2/product-details/bopis/find-in-store-modal.tsx +257 -0
- package/src/pages-v2/product-details/bopis/pickup-option-select.tsx +127 -0
- package/src/pages-v2/product-details/bopis/search-header.tsx +69 -0
- package/src/pages-v2/product-details/bopis/store-card/index.ts +1 -0
- package/src/pages-v2/product-details/bopis/store-card/shop-card.tsx +121 -0
- package/src/pages-v2/product-details/bopis/store-card/styles.ts +33 -0
- package/src/pages-v2/product-details/bopis/store-card/utils/convertSecondsToTime.ts +8 -0
- package/src/pages-v2/product-details/bopis/store-card/utils/getDaysResources.ts +25 -0
- package/src/pages-v2/product-details/checkbox-label.tsx +20 -0
- package/src/pages-v2/product-details/currency.ts +64 -0
- package/src/pages-v2/product-details/frequently-bought.tsx +97 -0
- package/src/pages-v2/product-details/frequently-product-card.tsx +63 -0
- package/src/pages-v2/product-details/product-comment.tsx +49 -0
- package/src/pages-v2/product-details/product-description.tsx +22 -0
- package/src/pages-v2/product-details/product-filter-card.tsx +265 -0
- package/src/pages-v2/product-details/product-intro/compound/context.ts +52 -0
- package/src/pages-v2/product-details/product-intro/compound/product-info.tsx +231 -0
- package/src/pages-v2/product-details/product-intro/compound/product-intro-images.tsx +124 -0
- package/src/pages-v2/product-details/product-intro/compound/product-intro.tsx +49 -0
- package/src/pages-v2/product-details/product-intro/compound/thumbnail-with-skeleton.tsx +28 -0
- package/src/pages-v2/product-details/product-intro/utils.ts +42 -0
- package/src/pages-v2/product-details/product-review.tsx +131 -0
- package/src/pages-v2/product-details/product-tabs.tsx +117 -0
- package/src/pages-v2/product-details/related-products.tsx +56 -0
- package/src/pages-v2/product-details/types.ts +11 -0
- package/src/pages-v2/product-list/breadcrumbs.tsx +39 -0
- package/src/pages-v2/product-list/checkbox-label.tsx +20 -0
- package/src/pages-v2/product-list/facet-group.tsx +125 -0
- package/src/pages-v2/product-list/facet.tsx +36 -0
- package/src/pages-v2/product-list/list-filter.tsx +43 -0
- package/src/pages-v2/product-list/pagination.tsx +80 -0
- package/src/pages-v2/product-list/product-list-context.tsx +302 -0
- package/src/pages-v2/product-list/product-list-state.ts +187 -0
- package/src/pages-v2/product-list/product-rating.tsx +16 -0
- package/src/pages-v2/product-list/quick-view-dialog-content.tsx +214 -0
- package/src/pages-v2/product-list/quick-view-dialog.tsx +54 -0
- package/src/pages-v2/product-list/range-filter.tsx +125 -0
- package/src/pages-v2/product-list/scrollbar.tsx +38 -0
- package/src/pages-v2/product-list/search-bar.tsx +162 -0
- package/src/pages-v2/product-list/selected-facets.tsx +80 -0
- package/src/pages-v2/product-list/side-nav.tsx +49 -0
- package/src/pages-v2/product-list/swatch.tsx +80 -0
- package/src/pages-v2/product-list/types.ts +18 -0
- package/src/pages-v2/product-list/use-product-list.ts +12 -0
- package/src/pages-v2/product-list/useCategoryFilter.tsx +26 -0
- package/src/pages-v2/product-list/utils/facet-helpers.ts +5 -0
- package/src/pages-v2/product-list/utils/generate-breadcrumbs.ts +30 -0
- package/src/pages-v2/product-list/utils/getCategoryFilterFromSlug.ts +153 -0
- package/src/pages-v2/product-list/utils/product-list-helper.ts +111 -0
- package/src/pages-v2/product-list/utils/product-list-types.ts +41 -0
- package/src/pages-v2/product-list/utils/search-for-category.ts +76 -0
- package/src/pages-v2/product-list/utils/sort-options.ts +44 -0
- package/src/pages-v2/product-list/utils/use-previous-refiners.ts +14 -0
- package/src/pages-v2/quickorder/order-upload.tsx +150 -0
- package/src/pages-v2/quickorder/quick-order-form.tsx +346 -0
- package/src/pages-v2/quickorder/quick-order-row.tsx +144 -0
- package/src/providers/nav-provider/index.tsx +59 -0
- package/src/providers/nav-provider/utils/createLink.ts +15 -0
- package/src/providers/notifications/README.md +15 -0
- package/src/providers/notifications/notification-context.tsx +82 -0
- package/src/providers/notifications/use-notification.ts +12 -0
- package/tsconfig.json +3 -2
- package/typedoc.js +12 -0
- package/src/api-manager/api-manager.config.json +0 -12
- package/src/api-manager/datasources/e4/e4.remaps.ts +0 -355
- package/src/api-manager/datasources/e4/e4.translator.test.ts +0 -202
- package/src/hooks/use-variants.tsx +0 -85
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import React, {
|
|
4
|
+
createContext,
|
|
5
|
+
useState,
|
|
6
|
+
useEffect,
|
|
7
|
+
useContext,
|
|
8
|
+
MouseEvent,
|
|
9
|
+
ReactNode,
|
|
10
|
+
} from "react";
|
|
11
|
+
import { useRouter } from "next/navigation";
|
|
12
|
+
// UI Components
|
|
13
|
+
import {
|
|
14
|
+
Box,
|
|
15
|
+
Button,
|
|
16
|
+
Popover,
|
|
17
|
+
List,
|
|
18
|
+
ListItemButton,
|
|
19
|
+
IconButton,
|
|
20
|
+
} from "@mui/material";
|
|
21
|
+
import { MdPersonOutline as PersonOutline } from "react-icons/md";
|
|
22
|
+
import MobileUserIcon from "@evenicanpm/storefront-core/src/components-v2/icons/user";
|
|
23
|
+
import { NavLink } from "@evenicanpm/storefront-core/src/components-v2/nav-link";
|
|
24
|
+
import T from "@evenicanpm/storefront-core/src/components-v2/T";
|
|
25
|
+
// Auth components
|
|
26
|
+
import { signIn, useSession } from "next-auth/react";
|
|
27
|
+
import { getMsalInstance, initializeMsal } from "@/auth/msal";
|
|
28
|
+
import signOutCustom from "@/auth/signout";
|
|
29
|
+
// API hooks
|
|
30
|
+
import useUpdateUser from "@/services/user/mutations/update-user";
|
|
31
|
+
import useSessionInit from "@/services/session/mutations/session-init";
|
|
32
|
+
import useSessionLogout from "@/services/session/mutations/session-logout";
|
|
33
|
+
|
|
34
|
+
interface IdTokenClaims {
|
|
35
|
+
given_name?: string;
|
|
36
|
+
family_name?: string;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
const MENU_ITEMS = [
|
|
40
|
+
{ href: "/account/profile", label: "Account.Menu.profile" },
|
|
41
|
+
{ href: "/account/addresses", label: "Account.Menu.addresses" },
|
|
42
|
+
{ href: "/account/orders", label: "Account.Menu.orders" },
|
|
43
|
+
{ href: "/account/wish-lists", label: "Account.Menu.wishlists" },
|
|
44
|
+
];
|
|
45
|
+
|
|
46
|
+
interface UserContextValue {
|
|
47
|
+
isAuthenticated: boolean;
|
|
48
|
+
status: string;
|
|
49
|
+
menuItems: typeof MENU_ITEMS;
|
|
50
|
+
handleLogout: () => void;
|
|
51
|
+
signIn: typeof signIn;
|
|
52
|
+
signOut: () => void;
|
|
53
|
+
anchorEl: HTMLButtonElement | null;
|
|
54
|
+
setAnchorEl: (el: HTMLButtonElement | null) => void;
|
|
55
|
+
open: boolean;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
const UserContext = createContext<UserContextValue | undefined>(undefined);
|
|
59
|
+
|
|
60
|
+
const useUserContext = () => {
|
|
61
|
+
const ctx = useContext(UserContext);
|
|
62
|
+
if (!ctx) throw new Error("User subcomponent must be used within <User>");
|
|
63
|
+
return ctx;
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
interface Props {
|
|
67
|
+
children?: ReactNode;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
const User = ({ children }: Props) => {
|
|
71
|
+
const { data: session, status } = useSession();
|
|
72
|
+
|
|
73
|
+
if (session?.error) {
|
|
74
|
+
// Custom error set in server - /api/auth/[...nextauth]
|
|
75
|
+
console.warn("Auth Error", session?.error);
|
|
76
|
+
signOutCustom();
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
const isAuthenticated = !!session;
|
|
80
|
+
const { mutateAsync: sessionInit } = useSessionInit();
|
|
81
|
+
const { mutateAsync: updateUser } = useUpdateUser();
|
|
82
|
+
const { mutateAsync: sessionLogout } = useSessionLogout();
|
|
83
|
+
|
|
84
|
+
// session init
|
|
85
|
+
useEffect(() => {
|
|
86
|
+
if (isAuthenticated) {
|
|
87
|
+
const { accessToken, user } = session;
|
|
88
|
+
const email = user?.email;
|
|
89
|
+
if (accessToken && email) {
|
|
90
|
+
sessionInit({ accessToken, email });
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}, [isAuthenticated, session, sessionInit]);
|
|
94
|
+
|
|
95
|
+
// Handles MSAL redirect - which happens for edit profile and reset password use cases in account/profile page.
|
|
96
|
+
useEffect(() => {
|
|
97
|
+
const handleRedirect = async () => {
|
|
98
|
+
try {
|
|
99
|
+
await initializeMsal();
|
|
100
|
+
const res = await getMsalInstance().handleRedirectPromise();
|
|
101
|
+
if (res) {
|
|
102
|
+
const { given_name, family_name } =
|
|
103
|
+
res.idTokenClaims as IdTokenClaims;
|
|
104
|
+
// Update the API when profile info is updated through MSAL
|
|
105
|
+
if (given_name && family_name) {
|
|
106
|
+
updateUser({
|
|
107
|
+
AccountNumber: "",
|
|
108
|
+
FirstName: given_name,
|
|
109
|
+
LastName: family_name,
|
|
110
|
+
}).catch(console.error);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
} catch (err) {
|
|
114
|
+
console.error("MSAL redirect error:", err);
|
|
115
|
+
}
|
|
116
|
+
};
|
|
117
|
+
handleRedirect();
|
|
118
|
+
}, [updateUser]);
|
|
119
|
+
|
|
120
|
+
const handleLogout = async () => {
|
|
121
|
+
try {
|
|
122
|
+
await sessionLogout({});
|
|
123
|
+
signOutCustom();
|
|
124
|
+
} catch (err) {
|
|
125
|
+
console.error("Logout Error:", err);
|
|
126
|
+
}
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
const [anchorEl, setAnchorEl] = useState<HTMLButtonElement | null>(null);
|
|
130
|
+
const open = Boolean(anchorEl);
|
|
131
|
+
|
|
132
|
+
const value: UserContextValue = {
|
|
133
|
+
isAuthenticated,
|
|
134
|
+
status,
|
|
135
|
+
menuItems: MENU_ITEMS,
|
|
136
|
+
handleLogout,
|
|
137
|
+
signIn,
|
|
138
|
+
signOut: signOutCustom,
|
|
139
|
+
anchorEl,
|
|
140
|
+
setAnchorEl,
|
|
141
|
+
open,
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
if (status === "loading") return null;
|
|
145
|
+
|
|
146
|
+
return <UserContext.Provider value={value}>{children}</UserContext.Provider>;
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
// Subcomponents
|
|
150
|
+
User.MobileTrigger = function MobileTrigger() {
|
|
151
|
+
const { isAuthenticated, signIn } = useUserContext();
|
|
152
|
+
const router = useRouter();
|
|
153
|
+
return (
|
|
154
|
+
<IconButton
|
|
155
|
+
aria-label="User Menu"
|
|
156
|
+
onClick={() => {
|
|
157
|
+
if (!isAuthenticated) signIn();
|
|
158
|
+
else router.push("/account/profile");
|
|
159
|
+
}}
|
|
160
|
+
>
|
|
161
|
+
<MobileUserIcon style={{ fontSize: "1.25rem" }} />
|
|
162
|
+
</IconButton>
|
|
163
|
+
);
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
User.DesktopTrigger = function DesktopTrigger() {
|
|
167
|
+
const { setAnchorEl } = useUserContext();
|
|
168
|
+
return (
|
|
169
|
+
<IconButton
|
|
170
|
+
aria-label="User Menu"
|
|
171
|
+
onClick={(e: MouseEvent<HTMLButtonElement>) =>
|
|
172
|
+
setAnchorEl(e.currentTarget)
|
|
173
|
+
}
|
|
174
|
+
>
|
|
175
|
+
<PersonOutline />
|
|
176
|
+
</IconButton>
|
|
177
|
+
);
|
|
178
|
+
};
|
|
179
|
+
|
|
180
|
+
User.Menu = function Menu({
|
|
181
|
+
children,
|
|
182
|
+
}: {
|
|
183
|
+
children?: (items: typeof MENU_ITEMS) => React.ReactNode;
|
|
184
|
+
}) {
|
|
185
|
+
const { anchorEl, open, setAnchorEl, menuItems, handleLogout } =
|
|
186
|
+
useUserContext();
|
|
187
|
+
const id = open ? "account-popover" : undefined;
|
|
188
|
+
|
|
189
|
+
return (
|
|
190
|
+
<Popover
|
|
191
|
+
id={id}
|
|
192
|
+
open={open}
|
|
193
|
+
anchorEl={anchorEl}
|
|
194
|
+
onClose={() => setAnchorEl(null)}
|
|
195
|
+
anchorOrigin={{ vertical: "bottom", horizontal: "right" }}
|
|
196
|
+
transformOrigin={{ vertical: "top", horizontal: "right" }}
|
|
197
|
+
>
|
|
198
|
+
<List sx={{ p: 1 }} onClick={() => setAnchorEl(null)}>
|
|
199
|
+
{children
|
|
200
|
+
? children(menuItems) // Allow caller to control what gets rendered
|
|
201
|
+
: menuItems.map(({ href, label }) => (
|
|
202
|
+
<User.MenuItem key={href} href={href} label={label} />
|
|
203
|
+
))}
|
|
204
|
+
<Box p={1}>
|
|
205
|
+
<Button
|
|
206
|
+
fullWidth
|
|
207
|
+
size="small"
|
|
208
|
+
color="primary"
|
|
209
|
+
variant="outlined"
|
|
210
|
+
onClick={handleLogout}
|
|
211
|
+
>
|
|
212
|
+
<T path="Account.Menu.btnLogout" />
|
|
213
|
+
</Button>
|
|
214
|
+
</Box>
|
|
215
|
+
</List>
|
|
216
|
+
</Popover>
|
|
217
|
+
);
|
|
218
|
+
};
|
|
219
|
+
|
|
220
|
+
User.MenuItem = function MenuItem({
|
|
221
|
+
href,
|
|
222
|
+
label,
|
|
223
|
+
}: {
|
|
224
|
+
href: string;
|
|
225
|
+
label: string;
|
|
226
|
+
}) {
|
|
227
|
+
return (
|
|
228
|
+
<NavLink href={href} style={{ color: "inherit" }}>
|
|
229
|
+
<ListItemButton>
|
|
230
|
+
<T path={label} />
|
|
231
|
+
</ListItemButton>
|
|
232
|
+
</NavLink>
|
|
233
|
+
);
|
|
234
|
+
};
|
|
235
|
+
|
|
236
|
+
User.LoginButton = function LoginButton() {
|
|
237
|
+
const { signIn } = useUserContext();
|
|
238
|
+
return (
|
|
239
|
+
<Button
|
|
240
|
+
size="small"
|
|
241
|
+
variant="contained"
|
|
242
|
+
color="primary"
|
|
243
|
+
onClick={() => signIn()}
|
|
244
|
+
>
|
|
245
|
+
<T path="Account.Menu.btnLogin" />
|
|
246
|
+
</Button>
|
|
247
|
+
);
|
|
248
|
+
};
|
|
249
|
+
|
|
250
|
+
export default User;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { ReactNode } from "react";
|
|
4
|
+
import clsx from "clsx";
|
|
5
|
+
import { MdOutlineShoppingBag } from "react-icons/md";
|
|
6
|
+
// GLOBAL CUSTOM COMPONENTS
|
|
7
|
+
import FlexBox from "@evenicanpm/storefront-core/src/components-v2/flex-box/flex-box";
|
|
8
|
+
import SiteLogo from "@evenicanpm/storefront-core/src/components-v2/site-logo";
|
|
9
|
+
// LOCAL CUSTOM COMPONENTS
|
|
10
|
+
import CategoriesMenu from "./components/categories-menu";
|
|
11
|
+
import User from "./components/user";
|
|
12
|
+
import MiniCartTrigger from "../mini-cart/mini-cart-trigger";
|
|
13
|
+
// STYLED COMPONENTS
|
|
14
|
+
import { HeaderWrapper, StyledContainer } from "./styles/index";
|
|
15
|
+
// API
|
|
16
|
+
import getCart from "@/api-manager/services/cart/queries/get-cart";
|
|
17
|
+
|
|
18
|
+
import { useSession } from "next-auth/react";
|
|
19
|
+
|
|
20
|
+
type HeaderRootProps = {
|
|
21
|
+
className?: string;
|
|
22
|
+
children: ReactNode;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
const Header = ({ className, children }: HeaderRootProps) => {
|
|
26
|
+
return (
|
|
27
|
+
<HeaderWrapper className={clsx(className)}>
|
|
28
|
+
<StyledContainer>{children}</StyledContainer>
|
|
29
|
+
</HeaderWrapper>
|
|
30
|
+
);
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
Header.LeftSlot = ({ children }: { children: ReactNode }) => {
|
|
34
|
+
return (
|
|
35
|
+
<FlexBox minWidth={100} alignItems="center">
|
|
36
|
+
{children}
|
|
37
|
+
</FlexBox>
|
|
38
|
+
);
|
|
39
|
+
};
|
|
40
|
+
Header.Logo = () => {
|
|
41
|
+
return <SiteLogo />;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
Header.Categories = () => {
|
|
45
|
+
return <CategoriesMenu />;
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
Header.MidSlot = ({ children }: { children: ReactNode }) => {
|
|
49
|
+
return <>{children}</>;
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
Header.User = () => {
|
|
53
|
+
const { data: session } = useSession();
|
|
54
|
+
const isAuthenticated = !!session;
|
|
55
|
+
return (
|
|
56
|
+
<User>
|
|
57
|
+
{isAuthenticated ? (
|
|
58
|
+
<>
|
|
59
|
+
<User.DesktopTrigger />
|
|
60
|
+
<User.Menu />
|
|
61
|
+
</>
|
|
62
|
+
) : (
|
|
63
|
+
<User.LoginButton />
|
|
64
|
+
)}
|
|
65
|
+
</User>
|
|
66
|
+
);
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
Header.Cart = () => {
|
|
70
|
+
const { data: cart } = getCart.useData();
|
|
71
|
+
return cart ? (
|
|
72
|
+
<MiniCartTrigger cart={cart}>
|
|
73
|
+
<MiniCartTrigger.Badge>
|
|
74
|
+
<MiniCartTrigger.Button>
|
|
75
|
+
<MdOutlineShoppingBag />
|
|
76
|
+
</MiniCartTrigger.Button>
|
|
77
|
+
</MiniCartTrigger.Badge>
|
|
78
|
+
<MiniCartTrigger.Drawer />
|
|
79
|
+
</MiniCartTrigger>
|
|
80
|
+
) : null;
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
export default Header;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { useState } from "react";
|
|
4
|
+
|
|
5
|
+
export default function useHeader() {
|
|
6
|
+
const [searchBarOpen, setSearchBarOpen] = useState(false);
|
|
7
|
+
const toggleSearchBar = () => setSearchBarOpen((state) => !state);
|
|
8
|
+
|
|
9
|
+
return {
|
|
10
|
+
searchBarOpen,
|
|
11
|
+
toggleSearchBar,
|
|
12
|
+
};
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./header";
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import Header from "@evenicanpm/storefront-core/src/components-v2/header/index";
|
|
4
|
+
import { SearchBarViewLg as SearchBar } from "@evenicanpm/storefront-core/src/components-v2/search-bar";
|
|
5
|
+
import Sticky from "@evenicanpm/storefront-core/src/components-v2/sticky/index";
|
|
6
|
+
import { useCallback, useState } from "react";
|
|
7
|
+
|
|
8
|
+
import useTheme from "@mui/material/styles/useTheme";
|
|
9
|
+
import useMediaQuery from "@mui/material/useMediaQuery";
|
|
10
|
+
import MobileHeader from "./components/mobile-header";
|
|
11
|
+
|
|
12
|
+
export default function StickyHeader() {
|
|
13
|
+
const [isFixed, setIsFixed] = useState(false);
|
|
14
|
+
const toggleIsFixed = useCallback((fixed: boolean) => setIsFixed(fixed), []);
|
|
15
|
+
|
|
16
|
+
const theme = useTheme();
|
|
17
|
+
const downMd = useMediaQuery(theme.breakpoints.down(1150));
|
|
18
|
+
|
|
19
|
+
if (downMd) {
|
|
20
|
+
return (
|
|
21
|
+
<MobileHeader>
|
|
22
|
+
<MobileHeader.Menu />
|
|
23
|
+
<MobileHeader.Logo />
|
|
24
|
+
<MobileHeader.Icons>
|
|
25
|
+
<MobileHeader.Search />
|
|
26
|
+
<MobileHeader.User />
|
|
27
|
+
<MobileHeader.Cart />
|
|
28
|
+
</MobileHeader.Icons>
|
|
29
|
+
<MobileHeader.SearchDrawer />
|
|
30
|
+
</MobileHeader>
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
return (
|
|
35
|
+
<Sticky fixedOn={0} onSticky={toggleIsFixed} scrollDistance={300}>
|
|
36
|
+
<Header>
|
|
37
|
+
<Header.LeftSlot>
|
|
38
|
+
<Header.Logo />
|
|
39
|
+
{isFixed && <Header.Categories />}
|
|
40
|
+
</Header.LeftSlot>
|
|
41
|
+
<Header.MidSlot>
|
|
42
|
+
<SearchBar />
|
|
43
|
+
</Header.MidSlot>
|
|
44
|
+
<Header.User />
|
|
45
|
+
<Header.Cart />
|
|
46
|
+
</Header>
|
|
47
|
+
</Sticky>
|
|
48
|
+
);
|
|
49
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import Container from "@mui/material/Container";
|
|
2
|
+
import styled from "@mui/material/styles/styled";
|
|
3
|
+
// CONSTANT VARIABLES
|
|
4
|
+
import { layoutConstant } from "@evenicanpm/storefront-core/src/components-v2/utils/constants";
|
|
5
|
+
|
|
6
|
+
export const HeaderWrapper = styled("div")(({ theme }) => ({
|
|
7
|
+
zIndex: 3,
|
|
8
|
+
position: "relative",
|
|
9
|
+
height: layoutConstant.headerHeight,
|
|
10
|
+
transition: "height 250ms ease-in-out",
|
|
11
|
+
background: theme.palette.background.paper,
|
|
12
|
+
// borderBottom: `1px solid ${theme.palette.grey[200]}`,
|
|
13
|
+
[theme.breakpoints.down("sm")]: {
|
|
14
|
+
height: layoutConstant.mobileHeaderHeight,
|
|
15
|
+
},
|
|
16
|
+
}));
|
|
17
|
+
|
|
18
|
+
export const StyledContainer = styled(Container)({
|
|
19
|
+
gap: 2,
|
|
20
|
+
height: "100%",
|
|
21
|
+
display: "flex",
|
|
22
|
+
alignItems: "center",
|
|
23
|
+
justifyContent: "space-between",
|
|
24
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import createSvgIcon from "@mui/material/utils/createSvgIcon";
|
|
2
|
+
|
|
3
|
+
const CartBag = createSvgIcon(
|
|
4
|
+
<svg viewBox="0 0 20 23" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
5
|
+
<path
|
|
6
|
+
d="M5.33329 7.37181V5.37181C5.33329 2.79431 7.42079 0.705139 9.99996 0.705139C12.5791 0.705139 14.6666 2.79431 14.6666 5.37181V7.37181H17.3333C18.4375 7.37181 19.3333 8.26764 19.3333 9.37181V18.0385C19.3333 20.2468 17.5416 22.0385 15.3333 22.0385H4.66663C2.45746 22.0385 0.666626 20.2468 0.666626 18.0385V9.37181C0.666626 8.26764 1.56204 7.37181 2.66663 7.37181H5.33329ZM7.33329 7.37181H12.6666V5.37181C12.6666 3.89889 11.4708 2.70514 9.99996 2.70514C8.52913 2.70514 7.33329 3.89889 7.33329 5.37181V7.37181ZM2.66663 9.37181V18.0385C2.66663 19.1426 3.56204 20.0385 4.66663 20.0385H15.3333C16.4375 20.0385 17.3333 19.1426 17.3333 18.0385V9.37181H14.6666V11.7051C14.6666 12.2593 14.2208 12.7051 13.6666 12.7051C13.1125 12.7051 12.6666 12.2593 12.6666 11.7051V9.37181H7.33329V11.7051C7.33329 12.2593 6.88746 12.7051 6.33329 12.7051C5.77913 12.7051 5.33329 12.2593 5.33329 11.7051V9.37181H2.66663Z"
|
|
7
|
+
fill="currentColor"
|
|
8
|
+
/>
|
|
9
|
+
</svg>,
|
|
10
|
+
"CartBag",
|
|
11
|
+
);
|
|
12
|
+
|
|
13
|
+
export default CartBag;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import createSvgIcon from "@mui/material/utils/createSvgIcon";
|
|
2
|
+
|
|
3
|
+
const CategoryOutlined = createSvgIcon(
|
|
4
|
+
<svg fill="currentColor" viewBox="0 0 24 24">
|
|
5
|
+
<path
|
|
6
|
+
fillRule="evenodd"
|
|
7
|
+
clipRule="evenodd"
|
|
8
|
+
d="M2 3C2 2.44772 2.44772 2 3 2H10C10.5523 2 11 2.44772 11 3V10C11 10.5523 10.5523 11 10 11H3C2.44772 11 2 10.5523 2 10V3ZM4 4V9H9V4H4Z"
|
|
9
|
+
/>
|
|
10
|
+
<path
|
|
11
|
+
fillRule="evenodd"
|
|
12
|
+
clipRule="evenodd"
|
|
13
|
+
d="M13 3C13 2.44772 13.4477 2 14 2H21C21.5523 2 22 2.44772 22 3V10C22 10.5523 21.5523 11 21 11H14C13.4477 11 13 10.5523 13 10V3ZM15 4V9H20V4H15Z"
|
|
14
|
+
/>
|
|
15
|
+
<path
|
|
16
|
+
fillRule="evenodd"
|
|
17
|
+
clipRule="evenodd"
|
|
18
|
+
d="M13 14C13 13.4477 13.4477 13 14 13H21C21.5523 13 22 13.4477 22 14V21C22 21.5523 21.5523 22 21 22H14C13.4477 22 13 21.5523 13 21V14ZM15 15V20H20V15H15Z"
|
|
19
|
+
/>
|
|
20
|
+
<path
|
|
21
|
+
fillRule="evenodd"
|
|
22
|
+
clipRule="evenodd"
|
|
23
|
+
d="M2 14C2 13.4477 2.44772 13 3 13H10C10.5523 13 11 13.4477 11 14V21C11 21.5523 10.5523 22 10 22H3C2.44772 22 2 21.5523 2 21V14ZM4 15V20H9V15H4Z"
|
|
24
|
+
/>
|
|
25
|
+
</svg>,
|
|
26
|
+
"CategoryOutlined",
|
|
27
|
+
);
|
|
28
|
+
|
|
29
|
+
export default CategoryOutlined;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import createSvgIcon from "@mui/material/utils/createSvgIcon";
|
|
4
|
+
|
|
5
|
+
const Category = createSvgIcon(
|
|
6
|
+
<svg fill="currentColor" viewBox="0 0 64 64">
|
|
7
|
+
<path d="m29 11v14a4 4 0 0 1 -4 4h-14a4 4 0 0 1 -4-4v-14a4 4 0 0 1 4-4h14a4 4 0 0 1 4 4zm24-4h-14a4 4 0 0 0 -4 4v14a4 4 0 0 0 4 4h14a4 4 0 0 0 4-4v-14a4 4 0 0 0 -4-4zm-28 28h-14a4 4 0 0 0 -4 4v14a4 4 0 0 0 4 4h14a4 4 0 0 0 4-4v-14a4 4 0 0 0 -4-4zm21 0a11 11 0 1 0 11 11 11 11 0 0 0 -11-11z" />
|
|
8
|
+
</svg>,
|
|
9
|
+
"Category",
|
|
10
|
+
);
|
|
11
|
+
|
|
12
|
+
export default Category;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import createSvgIcon from "@mui/material/utils/createSvgIcon";
|
|
2
|
+
|
|
3
|
+
const Home = createSvgIcon(
|
|
4
|
+
<svg fill="currentColor" viewBox="0 0 24 24">
|
|
5
|
+
<path
|
|
6
|
+
fillRule="evenodd"
|
|
7
|
+
clipRule="evenodd"
|
|
8
|
+
d="M11.3861 1.21065C11.7472 0.929784 12.2528 0.929784 12.6139 1.21065L21.6139 8.21065C21.8575 8.4001 22 8.69141 22 9V20C22 20.7957 21.6839 21.5587 21.1213 22.1213C20.5587 22.6839 19.7957 23 19 23H5C4.20435 23 3.44129 22.6839 2.87868 22.1213C2.31607 21.5587 2 20.7957 2 20V9C2 8.69141 2.14247 8.4001 2.38606 8.21065L11.3861 1.21065ZM4 9.48908V20C4 20.2652 4.10536 20.5196 4.29289 20.7071C4.48043 20.8946 4.73478 21 5 21H19C19.2652 21 19.5196 20.8946 19.7071 20.7071C19.8946 20.5196 20 20.2652 20 20V9.48908L12 3.26686L4 9.48908Z"
|
|
9
|
+
/>
|
|
10
|
+
<path
|
|
11
|
+
fillRule="evenodd"
|
|
12
|
+
clipRule="evenodd"
|
|
13
|
+
d="M8 12C8 11.4477 8.44772 11 9 11H15C15.5523 11 16 11.4477 16 12V22C16 22.5523 15.5523 23 15 23C14.4477 23 14 22.5523 14 22V13H10V22C10 22.5523 9.55228 23 9 23C8.44772 23 8 22.5523 8 22V12Z"
|
|
14
|
+
/>
|
|
15
|
+
</svg>,
|
|
16
|
+
"Home",
|
|
17
|
+
);
|
|
18
|
+
|
|
19
|
+
export default Home;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import createSvgIcon from "@mui/material/utils/createSvgIcon";
|
|
2
|
+
|
|
3
|
+
const Search = createSvgIcon(
|
|
4
|
+
<svg viewBox="0 0 22 23" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
5
|
+
<path
|
|
6
|
+
d="M21.3162 20.0056L17.2879 15.9891C18.5876 14.3333 19.2928 12.2886 19.2902 10.1836C19.2902 8.30891 18.7343 6.47636 17.6928 4.91764C16.6513 3.35892 15.1709 2.14405 13.439 1.42665C11.707 0.709246 9.80123 0.521542 7.96259 0.887269C6.12396 1.253 4.43507 2.15573 3.10948 3.48131C1.7839 4.80689 0.88117 6.49579 0.515443 8.33442C0.149715 10.1731 0.33742 12.0788 1.05482 13.8108C1.77222 15.5428 2.98709 17.0231 4.54581 18.0646C6.10453 19.1061 7.93709 19.662 9.81174 19.662C11.9167 19.6646 13.9615 18.9594 15.6173 17.6597L19.6338 21.688C19.7439 21.7991 19.8749 21.8872 20.0193 21.9474C20.1637 22.0075 20.3186 22.0385 20.475 22.0385C20.6314 22.0385 20.7862 22.0075 20.9306 21.9474C21.075 21.8872 21.206 21.7991 21.3162 21.688C21.4272 21.5779 21.5154 21.4468 21.5755 21.3024C21.6357 21.1581 21.6666 21.0032 21.6666 20.8468C21.6666 20.6904 21.6357 20.5355 21.5755 20.3912C21.5154 20.2468 21.4272 20.1157 21.3162 20.0056ZM2.70292 10.1836C2.70292 8.77758 3.11985 7.40316 3.90098 6.23412C4.6821 5.06508 5.79235 4.15393 7.09132 3.61588C8.39028 3.07783 9.81963 2.93705 11.1986 3.21134C12.5776 3.48564 13.8443 4.16269 14.8384 5.15688C15.8326 6.15106 16.5097 7.41773 16.784 8.79671C17.0583 10.1757 16.9175 11.605 16.3794 12.904C15.8414 14.203 14.9302 15.3132 13.7612 16.0943C12.5922 16.8755 11.2177 17.2924 9.81174 17.2924C7.92637 17.2924 6.11821 16.5434 4.78505 15.2103C3.45189 13.8771 2.70292 12.0689 2.70292 10.1836Z"
|
|
7
|
+
fill="currentColor"
|
|
8
|
+
/>
|
|
9
|
+
</svg>,
|
|
10
|
+
"Search",
|
|
11
|
+
);
|
|
12
|
+
|
|
13
|
+
export default Search;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import createSvgIcon from "@mui/material/utils/createSvgIcon";
|
|
2
|
+
|
|
3
|
+
const ShoppingBagOutlined = createSvgIcon(
|
|
4
|
+
<svg fill="currentColor" viewBox="0 0 24 24">
|
|
5
|
+
<g>
|
|
6
|
+
<rect fill="none" height="24" width="24" />
|
|
7
|
+
<path d="M18,6h-2c0-2.21-1.79-4-4-4S8,3.79,8,6H6C4.9,6,4,6.9,4,8v12c0,1.1,0.9,2,2,2h12c1.1,0,2-0.9,2-2V8C20,6.9,19.1,6,18,6z M12,4c1.1,0,2,0.9,2,2h-4C10,4.9,10.9,4,12,4z M18,20H6V8h2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V8h4v2c0,0.55,0.45,1,1,1s1-0.45,1-1V8 h2V20z" />
|
|
8
|
+
</g>
|
|
9
|
+
</svg>,
|
|
10
|
+
"ShoppingBagOutlined",
|
|
11
|
+
);
|
|
12
|
+
|
|
13
|
+
export default ShoppingBagOutlined;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import createSvgIcon from "@mui/material/utils/createSvgIcon";
|
|
2
|
+
|
|
3
|
+
const UpDown = createSvgIcon(
|
|
4
|
+
<svg viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
5
|
+
<path
|
|
6
|
+
d="M8.64847 6.88354H3.35158C3.04454 6.88354 2.86173 7.2269 3.03517 7.4812L5.68362 11.3824C5.83596 11.6062 6.16526 11.6062 6.3176 11.3824L8.96605 7.4812C9.13714 7.2269 8.9555 6.88354 8.64847 6.88354Z"
|
|
7
|
+
fill="currentColor"
|
|
8
|
+
/>
|
|
9
|
+
<path
|
|
10
|
+
d="M8.64852 6.76641C8.54188 6.76641 8.43524 6.76641 8.32743 6.76641C8.05204 6.76641 7.77782 6.76641 7.50243 6.76641C7.13329 6.76641 6.76532 6.76641 6.39618 6.76641C6.0036 6.76641 5.61102 6.76641 5.21845 6.76641C4.87274 6.76641 4.52821 6.76641 4.18251 6.76641C3.95517 6.76641 3.72783 6.76641 3.49931 6.76641C3.45361 6.76641 3.40673 6.76641 3.36103 6.76641C3.17705 6.76758 3.00478 6.85898 2.91455 7.02187C2.82197 7.18828 2.83251 7.39102 2.93916 7.54922C2.96728 7.59141 2.9954 7.63242 3.02353 7.67344C3.16064 7.87617 3.29892 8.07891 3.43603 8.28164C3.64111 8.58281 3.84618 8.88516 4.05009 9.18633C4.26923 9.50977 4.48954 9.8332 4.70868 10.1566C4.89384 10.4285 5.07782 10.7016 5.26298 10.9734C5.36259 11.1211 5.46337 11.2687 5.56298 11.4164C5.63798 11.5277 5.73642 11.6168 5.87001 11.6508C6.08446 11.7059 6.2954 11.6145 6.41962 11.4363C6.50282 11.3168 6.58368 11.1949 6.66571 11.0742C6.84032 10.8164 7.01493 10.5598 7.18954 10.302C7.40751 9.97969 7.62665 9.65859 7.84461 9.33633C8.05438 9.02812 8.26415 8.71875 8.47274 8.41055C8.62391 8.18789 8.77508 7.96406 8.92625 7.74141C9.02703 7.59375 9.14891 7.44961 9.14539 7.26094C9.14422 6.98672 8.91922 6.77109 8.64852 6.76641C8.49735 6.76406 8.49735 6.99844 8.64852 7.00078C8.85125 7.0043 8.98133 7.22109 8.88055 7.39687C8.8618 7.42969 8.83836 7.46133 8.81727 7.49297C8.70125 7.66289 8.58641 7.83398 8.47039 8.00391C8.06493 8.60156 7.65946 9.19922 7.25282 9.79687C6.93173 10.2703 6.61063 10.7437 6.28954 11.216C6.2661 11.2512 6.24266 11.2863 6.21805 11.3203C6.12313 11.4504 5.94149 11.4715 5.82548 11.3684C5.79149 11.3379 5.76806 11.2992 5.74227 11.2617C5.69774 11.1961 5.65321 11.1305 5.60868 11.0648C5.2454 10.5305 4.88212 9.99492 4.52001 9.46055C4.13915 8.89922 3.75712 8.33672 3.37626 7.77539C3.29775 7.65937 3.21806 7.54453 3.14072 7.42852C3.05634 7.30195 3.07392 7.14726 3.18642 7.0582C3.2497 7.00898 3.31298 7.00078 3.3915 7.00078C3.86025 7.00078 4.33017 7.00078 4.79892 7.00078C5.55009 7.00078 6.30126 7.00078 7.05243 7.00078C7.55985 7.00078 8.0661 7.00078 8.57352 7.00078C8.5993 7.00078 8.62391 7.00078 8.64969 7.00078C8.79852 7.00078 8.79969 6.76641 8.64852 6.76641ZM8.64852 5.11641H3.35165C3.04462 5.11641 2.86181 4.77305 3.03525 4.51875L5.68368 0.617578C5.83602 0.39375 6.16532 0.39375 6.31766 0.617578L8.9661 4.51875C9.13719 4.77305 8.95555 5.11641 8.64852 5.11641Z"
|
|
11
|
+
fill="currentColor"
|
|
12
|
+
/>
|
|
13
|
+
<path
|
|
14
|
+
d="M8.64832 4.99922C8.28153 4.99922 7.91473 4.99922 7.54676 4.99922C6.80262 4.99922 6.05849 4.99922 5.31552 4.99922C4.73193 4.99922 4.14834 4.99922 3.56592 4.99922C3.50615 4.99922 3.44639 4.99922 3.38662 4.99922C3.30459 4.99922 3.23428 4.98515 3.17803 4.93476C3.07022 4.83633 3.05733 4.6957 3.1417 4.57031C3.16865 4.53047 3.19561 4.49062 3.22256 4.45195C3.55068 3.96914 3.87881 3.48633 4.20576 3.00234C4.60888 2.4082 5.01201 1.81524 5.41513 1.2211C5.52529 1.05821 5.63661 0.895317 5.74677 0.732426C5.77372 0.692583 5.7995 0.650395 5.83583 0.62227C5.95536 0.52852 6.12763 0.55313 6.21903 0.680864C6.30106 0.794536 6.37724 0.912895 6.45575 1.02891C6.62333 1.27618 6.79208 1.52461 6.95966 1.77188C7.37801 2.38828 7.79637 3.00469 8.21473 3.61992C8.37293 3.85312 8.53113 4.08515 8.68816 4.31836C8.7327 4.38281 8.77605 4.44844 8.82059 4.51289C8.8452 4.55039 8.87566 4.58789 8.89441 4.6289C8.96824 4.8 8.84051 4.9957 8.64832 4.99922C8.49715 5.00156 8.49715 5.23593 8.64832 5.23359C8.92371 5.2289 9.15926 5.00039 9.14871 4.71914C9.14519 4.60898 9.10301 4.51289 9.04324 4.425C8.93777 4.26914 8.8323 4.11445 8.72684 3.95859C8.53934 3.68203 8.35184 3.40547 8.16317 3.12891C7.94285 2.80547 7.72371 2.48086 7.5034 2.15742C7.30184 1.85977 7.10028 1.56211 6.89755 1.26563C6.76395 1.06875 6.62919 0.870707 6.49559 0.673833C6.47098 0.637505 6.44638 0.600005 6.42059 0.563677C6.29403 0.382036 6.06903 0.287115 5.85224 0.356255C5.65419 0.418364 5.56044 0.591802 5.45146 0.751176C5.30146 0.971488 5.15263 1.1918 5.00263 1.41328C4.79287 1.72266 4.5831 2.03203 4.37216 2.34141C4.1542 2.6625 3.93623 2.98242 3.71943 3.30352C3.54365 3.5625 3.3667 3.82266 3.19092 4.08164C3.10654 4.20586 3.021 4.3289 2.93779 4.45429C2.82998 4.61601 2.82178 4.82929 2.9249 4.99687C3.01983 5.15039 3.18389 5.23476 3.36318 5.23593C3.50615 5.23711 3.65029 5.23593 3.79326 5.23593C4.08974 5.23593 4.38623 5.23593 4.68271 5.23593C5.06357 5.23593 5.44325 5.23593 5.82411 5.23593C6.21317 5.23593 6.60223 5.23593 6.9913 5.23593C7.31942 5.23593 7.64872 5.23593 7.97684 5.23593C8.17371 5.23593 8.37059 5.23593 8.56746 5.23593C8.59441 5.23593 8.62137 5.23593 8.64832 5.23593C8.79832 5.23359 8.79949 4.99922 8.64832 4.99922Z"
|
|
15
|
+
fill="currentColor"
|
|
16
|
+
/>
|
|
17
|
+
</svg>,
|
|
18
|
+
"UpDown",
|
|
19
|
+
);
|
|
20
|
+
|
|
21
|
+
export default UpDown;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import createSvgIcon from "@mui/material/utils/createSvgIcon";
|
|
2
|
+
|
|
3
|
+
const User = createSvgIcon(
|
|
4
|
+
<svg viewBox="0 0 20 23" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
5
|
+
<path
|
|
6
|
+
d="M12 13.3718H8.00002C3.95002 13.3718 0.666687 16.6551 0.666687 20.7051C0.666687 21.4414 1.26377 22.0385 2.00002 22.0385H18C18.7363 22.0385 19.3334 21.4414 19.3334 20.7051C19.3334 16.6551 16.05 13.3718 12 13.3718ZM2.70794 20.0385C3.0371 17.4093 5.28335 15.3718 8.00002 15.3718H12C14.715 15.3718 16.9625 17.4114 17.2917 20.0385H2.70794ZM10 11.3718C12.9454 11.3718 15.3334 8.98389 15.3334 6.03847C15.3334 3.09306 12.9454 0.705139 10 0.705139C7.0546 0.705139 4.66669 3.09306 4.66669 6.03847C4.66669 8.98431 7.05419 11.3718 10 11.3718ZM10 2.70514C11.8379 2.70514 13.3334 4.20056 13.3334 6.03847C13.3334 7.87639 11.8379 9.37181 10 9.37181C8.1621 9.37181 6.66669 7.87597 6.66669 6.03847C6.66669 4.20056 8.16252 2.70514 10 2.70514Z"
|
|
7
|
+
fill="currentColor"
|
|
8
|
+
/>
|
|
9
|
+
</svg>,
|
|
10
|
+
"User",
|
|
11
|
+
);
|
|
12
|
+
|
|
13
|
+
export default User;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import createSvgIcon from "@mui/material/utils/createSvgIcon";
|
|
2
|
+
|
|
3
|
+
const User2 = createSvgIcon(
|
|
4
|
+
<svg fill="currentColor" viewBox="0 0 24 24">
|
|
5
|
+
<path
|
|
6
|
+
d="M6.65 7.5C6.65 9.21452 7.46395 10.7392 8.72162 11.7184C4.89924 13.0726 2.15 16.7186 2.15 21C2.15 21.47 2.53084 21.85 3 21.85H21C21.4692 21.85 21.85 21.47 21.85 21C21.85 16.7186 19.1008 13.0726 15.2784 11.7184C16.536 10.7392 17.35 9.21452 17.35 7.5C17.35 4.55053 14.9502 2.15 12 2.15C9.04976 2.15 6.65 4.55053 6.65 7.5ZM8.35 7.5C8.35 5.48748 9.98748 3.85 12 3.85C14.0125 3.85 15.65 5.48748 15.65 7.5C15.65 9.51252 14.0125 11.15 12 11.15C9.98748 11.15 8.35 9.51252 8.35 7.5ZM20.106 20.15H3.89395C4.32041 16.0538 7.79275 12.85 12 12.85C16.2072 12.85 19.6796 16.0538 20.106 20.15Z"
|
|
7
|
+
stroke="#395589"
|
|
8
|
+
strokeWidth="0.2"
|
|
9
|
+
/>
|
|
10
|
+
</svg>,
|
|
11
|
+
"User2",
|
|
12
|
+
);
|
|
13
|
+
|
|
14
|
+
export default User2;
|