@evenicanpm/storefront-core 1.0.3 → 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/schemas/product.schema.ts +0 -1
- 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/user/mutations/add-to-wishlist.ts +23 -3
- package/src/api-manager/services/user/mutations/remove-from-wishlist.ts +23 -0
- package/src/cms/blocks/Components/CategoryCarousel/index.tsx +6 -7
- package/src/cms/blocks/Components/HeroCarousel/index.tsx +25 -19
- package/src/cms/blocks/Components/ProductCarousel/index.tsx +44 -38
- package/src/cms/blocks/Components/ProductSectionFullWidth/index.tsx +7 -3
- package/src/cms/blocks/Components/shared/product-grid.tsx +38 -23
- package/src/components/_components/wishlist/add-to-wishlist-dialog.tsx +1 -1
- package/src/components/_components/wishlist/remove-from-wishlist-dialog.tsx +1 -1
- package/src/components/_components/wishlist-modal/add-to-wishlist-dialog.tsx +1 -1
- package/src/components/_components/wishlist-modal/remove-from-wishlist-dialog.tsx +1 -1
- package/src/components-v2/carousel/carousel.tsx +69 -35
- package/src/components-v2/carousel/components/carousel-arrows.tsx +40 -46
- package/src/components-v2/carousel/components/carousel-dots.tsx +10 -13
- package/src/components-v2/carousel/index.ts +0 -2
- package/src/components-v2/carousel-cards/carousel-card-1/carousel-card-1.tsx +68 -49
- package/src/components-v2/categories/category-list/category-list.tsx +83 -41
- package/src/components-v2/categories/category-list/styles.ts +7 -1
- package/src/components-v2/categories/category-menu.tsx +2 -0
- package/src/components-v2/categories/mega-menu/banner.tsx +68 -37
- package/src/components-v2/categories/mega-menu/column-list.tsx +59 -52
- package/src/components-v2/categories/mega-menu/mega-menu-1.tsx +19 -1
- package/src/components-v2/categories/mega-menu/mega-menu-2.tsx +32 -2
- package/src/components-v2/header/components/mobile-header.tsx +119 -46
- package/src/components-v2/header/components/user.tsx +163 -117
- package/src/components-v2/header/header.tsx +62 -42
- package/src/components-v2/header/sticky-header.tsx +34 -2
- package/src/components-v2/mini-cart/components/bottom-actions.tsx +71 -17
- package/src/components-v2/mini-cart/components/cart-item.tsx +159 -101
- package/src/components-v2/mini-cart/components/empty-view.tsx +59 -19
- package/src/components-v2/mini-cart/components/top-header.tsx +61 -22
- package/src/components-v2/mini-cart/mini-cart-trigger.tsx +99 -0
- package/src/components-v2/mini-cart/mini-cart.tsx +111 -43
- package/src/components-v2/mobile-navigation/mobile-navigation-bar.tsx +93 -48
- package/src/components-v2/navbar/categories.tsx +70 -16
- package/src/components-v2/navbar/category-based-menu/category-based-menu.tsx +135 -41
- package/src/components-v2/navbar/mega-menu/mega-menu.tsx +115 -48
- package/src/components-v2/navbar/mobile-menu/mobile-menu.test.tsx +111 -0
- package/src/components-v2/navbar/mobile-menu/mobile-menu.tsx +127 -56
- package/src/components-v2/navbar/nav-list/nav-list.tsx +125 -103
- package/src/components-v2/navbar/navbar.tsx +72 -20
- package/src/components-v2/product-cards/{product-card-1 → product-card}/components/quantity-buttons.tsx +1 -1
- package/src/components-v2/product-cards/product-card/product-card.tsx +410 -0
- package/src/components-v2/product-cards/{product-card-1 → product-card}/styles/index.ts +6 -0
- package/src/components-v2/product-cards/product-card-plp/product-card.tsx +161 -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/product-card.tsx +166 -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/{components → compound}/dimensions-group-error.tsx +1 -1
- package/src/components-v2/product-dimensions/{components → compound}/dimensions-group-label.tsx +1 -1
- package/src/components-v2/product-dimensions/{components → compound}/dimensions-group-list-chip.tsx +1 -1
- package/src/components-v2/product-dimensions/{components → compound}/dimensions-group-list.tsx +1 -1
- package/src/components-v2/product-dimensions/{components → compound}/dimensions-group.tsx +1 -1
- package/src/components-v2/product-dimensions/{components → compound}/dimensions.tsx +0 -3
- package/src/components-v2/product-dimensions/index.tsx +1 -1
- 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 +24 -11
- package/src/components-v2/products-view/products-list-view.tsx +29 -12
- 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-box/components/category-dropdown.tsx → search-bar/compound/textfield-adornment-category.tsx} +29 -7
- 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-box → search-bar}/styles/index.ts +5 -3
- 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/side-nav.tsx +4 -5
- package/src/components-v2/sticky/index.ts +1 -1
- package/src/components-v2/{wishlist-modal → wishlist-dialogs/add-to-wishlist}/add-to-wishlist-button.tsx +1 -1
- 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/components → wishlist-dialogs/create-wishlist}/create-wishlist-button.tsx +5 -3
- package/src/components-v2/wishlist-dialogs/create-wishlist/index.tsx +22 -0
- package/src/hooks/use-cart.ts +29 -23
- package/src/hooks/use-variants.ts +106 -53
- package/src/lib/build-detail-url.ts +2 -1
- package/src/pages/product-details/product-intro/product-intro.tsx +26 -23
- package/src/pages/product-list/quick-view-dialog-content.tsx +18 -9
- package/src/pages-v2/product-details/bopis/find-in-store-button.tsx +9 -8
- package/src/pages-v2/product-details/bopis/find-in-store-modal.tsx +2 -2
- package/src/{components-v2/shop-card → pages-v2/product-details/bopis/store-card}/shop-card.tsx +17 -48
- 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/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-tabs.tsx +87 -21
- package/src/pages-v2/product-details/related-products.tsx +26 -12
- package/src/pages-v2/product-list/quick-view-dialog-content.tsx +17 -10
- package/typedoc.js +3 -1
- package/src/components-v2/MiniCartClient.tsx +0 -65
- package/src/components-v2/carousel-cards/carousel-card-2/carousel-card-2.tsx +0 -78
- package/src/components-v2/carousel-cards/carousel-card-2/index.ts +0 -1
- package/src/components-v2/carousel-cards/carousel-card-2/styles.ts +0 -26
- package/src/components-v2/carousel-cards/carousel-card-3/carousel-card-3.tsx +0 -37
- package/src/components-v2/carousel-cards/carousel-card-3/index.ts +0 -1
- package/src/components-v2/carousel-cards/carousel-card-3/styles.ts +0 -28
- package/src/components-v2/carousel-cards/carousel-card-4/carousel-card-4.tsx +0 -81
- package/src/components-v2/carousel-cards/carousel-card-4/index.ts +0 -1
- package/src/components-v2/carousel-cards/carousel-card-4/styles.ts +0 -27
- package/src/components-v2/category-cards/category-card-1/category-card-1.tsx +0 -21
- package/src/components-v2/category-cards/category-card-1/index.ts +0 -1
- package/src/components-v2/category-cards/category-card-1/styles.ts +0 -37
- package/src/components-v2/countdown/count-box.tsx +0 -19
- package/src/components-v2/countdown/count-down.tsx +0 -24
- package/src/components-v2/countdown/index.tsx +0 -2
- package/src/components-v2/countdown/useCountDown.ts +0 -41
- package/src/components-v2/data-table/index.ts +0 -2
- package/src/components-v2/data-table/table-header.tsx +0 -91
- package/src/components-v2/data-table/table-pagination.tsx +0 -36
- package/src/components-v2/footer/components/about-links.tsx +0 -23
- package/src/components-v2/footer/components/app-store.tsx +0 -38
- package/src/components-v2/footer/components/customer-care-links.tsx +0 -21
- package/src/components-v2/footer/components/logo.tsx +0 -23
- package/src/components-v2/footer/components/social-links.tsx +0 -43
- package/src/components-v2/footer/data/index.ts +0 -54
- package/src/components-v2/footer/footer-1.tsx +0 -62
- package/src/components-v2/footer/footer-2.tsx +0 -57
- package/src/components-v2/footer/footer-3.tsx +0 -53
- package/src/components-v2/footer/footer-4.tsx +0 -71
- package/src/components-v2/footer/index.ts +0 -4
- package/src/components-v2/footer/styles/index.ts +0 -42
- package/src/components-v2/navbar/category-based-menu/components/categories.tsx +0 -44
- package/src/components-v2/navbar/category-based-menu/components/category-item.tsx +0 -31
- package/src/components-v2/navbar/category-based-menu/components/child-categories.tsx +0 -38
- package/src/components-v2/navbar/mega-menu/category-list.tsx +0 -29
- package/src/components-v2/navbar/mobile-menu/render-levels.test.tsx +0 -71
- package/src/components-v2/navbar/mobile-menu/render-levels.tsx +0 -62
- package/src/components-v2/newsletter/index.ts +0 -1
- package/src/components-v2/newsletter/newsletter.tsx +0 -112
- package/src/components-v2/newsletter/social-icons.tsx +0 -35
- package/src/components-v2/newsletter/styles.ts +0 -65
- package/src/components-v2/page-sidenav/grocery-side-nav/components/link-item.tsx +0 -21
- package/src/components-v2/page-sidenav/grocery-side-nav/components/list-item.tsx +0 -27
- package/src/components-v2/page-sidenav/grocery-side-nav/components/nav-accordion.tsx +0 -36
- package/src/components-v2/page-sidenav/grocery-side-nav/components/render-child.tsx +0 -26
- package/src/components-v2/page-sidenav/grocery-side-nav/grocery-side-nav.tsx +0 -32
- package/src/components-v2/page-sidenav/grocery-side-nav/index.ts +0 -1
- package/src/components-v2/page-sidenav/grocery-side-nav/styles/index.ts +0 -11
- package/src/components-v2/page-sidenav/health-beauty-side-nav/components/list-item.tsx +0 -27
- package/src/components-v2/page-sidenav/health-beauty-side-nav/components/nav-accordion.tsx +0 -44
- package/src/components-v2/page-sidenav/health-beauty-side-nav/components/render-child.tsx +0 -20
- package/src/components-v2/page-sidenav/health-beauty-side-nav/health-beauty-side-nav.tsx +0 -43
- package/src/components-v2/page-sidenav/health-beauty-side-nav/index.ts +0 -1
- package/src/components-v2/page-sidenav/health-beauty-side-nav/styles/index.ts +0 -27
- package/src/components-v2/page-sidenav/side-navbar/components/list-item.tsx +0 -25
- package/src/components-v2/page-sidenav/side-navbar/components/nav-accordion.tsx +0 -46
- package/src/components-v2/page-sidenav/side-navbar/components/render-child.tsx +0 -20
- package/src/components-v2/page-sidenav/side-navbar/index.ts +0 -1
- package/src/components-v2/page-sidenav/side-navbar/side-nav-bar.tsx +0 -77
- package/src/components-v2/page-sidenav/side-navbar/styles/index.ts +0 -73
- package/src/components-v2/page-sidenav/side-navbar-2/components/button-content.tsx +0 -32
- package/src/components-v2/page-sidenav/side-navbar-2/components/sidebar-accordion.tsx +0 -66
- package/src/components-v2/page-sidenav/side-navbar-2/index.ts +0 -1
- package/src/components-v2/page-sidenav/side-navbar-2/side-navbar-2.tsx +0 -63
- package/src/components-v2/page-sidenav/side-navbar-2/styles/index.ts +0 -68
- package/src/components-v2/product-cards/product-card-1/index.ts +0 -1
- package/src/components-v2/product-cards/product-card-1/product-card-1-wrapper.tsx +0 -304
- package/src/components-v2/product-cards/product-card-1/product-card.tsx +0 -107
- package/src/components-v2/product-cards/product-card-10/index.ts +0 -1
- package/src/components-v2/product-cards/product-card-10/product-card.tsx +0 -128
- package/src/components-v2/product-cards/product-card-10/styles/index.ts +0 -38
- package/src/components-v2/product-cards/product-card-11/index.ts +0 -1
- package/src/components-v2/product-cards/product-card-11/product-card.tsx +0 -66
- package/src/components-v2/product-cards/product-card-11/styles/index.ts +0 -16
- package/src/components-v2/product-cards/product-card-12/index.ts +0 -1
- package/src/components-v2/product-cards/product-card-12/product-card.tsx +0 -42
- package/src/components-v2/product-cards/product-card-12/styles/index.ts +0 -16
- package/src/components-v2/product-cards/product-card-13/index.ts +0 -1
- package/src/components-v2/product-cards/product-card-13/product-card.tsx +0 -48
- package/src/components-v2/product-cards/product-card-13/styles/index.ts +0 -25
- package/src/components-v2/product-cards/product-card-14/index.ts +0 -1
- package/src/components-v2/product-cards/product-card-14/product-card.tsx +0 -125
- package/src/components-v2/product-cards/product-card-14/styles/index.ts +0 -40
- package/src/components-v2/product-cards/product-card-15/index.ts +0 -1
- package/src/components-v2/product-cards/product-card-15/product-card.tsx +0 -121
- package/src/components-v2/product-cards/product-card-15/styles/index.ts +0 -57
- package/src/components-v2/product-cards/product-card-16/product-card.tsx +0 -116
- package/src/components-v2/product-cards/product-card-2/components/favorite-button.tsx +0 -29
- package/src/components-v2/product-cards/product-card-2/components/product-price.tsx +0 -26
- package/src/components-v2/product-cards/product-card-2/index.ts +0 -1
- package/src/components-v2/product-cards/product-card-2/product-card.tsx +0 -70
- package/src/components-v2/product-cards/product-card-3/components/hover-actions.tsx +0 -83
- package/src/components-v2/product-cards/product-card-3/index.ts +0 -1
- package/src/components-v2/product-cards/product-card-3/product-card.tsx +0 -110
- package/src/components-v2/product-cards/product-card-3/styles/index.ts +0 -89
- package/src/components-v2/product-cards/product-card-4/components/hover-actions.tsx +0 -50
- package/src/components-v2/product-cards/product-card-4/index.ts +0 -1
- package/src/components-v2/product-cards/product-card-4/product-card.tsx +0 -128
- package/src/components-v2/product-cards/product-card-4/styles/index.ts +0 -66
- package/src/components-v2/product-cards/product-card-5/components/button-actions.tsx +0 -49
- package/src/components-v2/product-cards/product-card-5/components/hover-actions.tsx +0 -50
- package/src/components-v2/product-cards/product-card-5/index.ts +0 -1
- package/src/components-v2/product-cards/product-card-5/product-card.tsx +0 -137
- package/src/components-v2/product-cards/product-card-5/styles/index.ts +0 -94
- package/src/components-v2/product-cards/product-card-6/components/hover-actions.tsx +0 -50
- package/src/components-v2/product-cards/product-card-6/index.ts +0 -1
- package/src/components-v2/product-cards/product-card-6/product-card.tsx +0 -121
- package/src/components-v2/product-cards/product-card-6/styles/index.ts +0 -63
- package/src/components-v2/product-cards/product-card-7/components/product-status.tsx +0 -18
- package/src/components-v2/product-cards/product-card-7/components/quantity-buttons.tsx +0 -47
- package/src/components-v2/product-cards/product-card-7/index.ts +0 -1
- package/src/components-v2/product-cards/product-card-7/product-card.tsx +0 -139
- package/src/components-v2/product-cards/product-card-7/styles/index.ts +0 -98
- package/src/components-v2/product-cards/product-card-8/product-card.tsx +0 -151
- package/src/components-v2/product-cards/product-card-9/index.ts +0 -1
- package/src/components-v2/product-cards/product-card-9/product-card.tsx +0 -169
- package/src/components-v2/product-cards/product-card-wishlist/components/hover-actions.tsx +0 -37
- package/src/components-v2/product-cards/product-card-wishlist/product-card.tsx +0 -118
- package/src/components-v2/product-cards/product-card-wishlist/styles/index.ts +0 -53
- package/src/components-v2/product-quantity-buttons/product-quantity-buttons.tsx +0 -88
- package/src/components-v2/products-view/product-view-dialog.tsx +0 -218
- package/src/components-v2/search-box/__test__/search-input-category.test.tsx +0 -110
- package/src/components-v2/search-box/__test__/search-input.test.tsx +0 -137
- package/src/components-v2/search-box/__test__/search-results.json +0 -165
- package/src/components-v2/search-box/components/search-result.tsx +0 -86
- package/src/components-v2/search-box/hooks/use-search.ts +0 -63
- package/src/components-v2/search-box/index.ts +0 -2
- package/src/components-v2/search-box/search-input-category.test.tsx +0 -110
- package/src/components-v2/search-box/search-input-category.tsx +0 -203
- package/src/components-v2/search-box/search-input.test.tsx +0 -41
- package/src/components-v2/search-box/search-input.tsx +0 -66
- package/src/components-v2/section-header/index.ts +0 -2
- package/src/components-v2/section-header/section-creator.tsx +0 -29
- package/src/components-v2/section-header/section-header.tsx +0 -44
- package/src/components-v2/service-cards/icon-component.tsx +0 -18
- package/src/components-v2/service-cards/service-card-1/index.ts +0 -1
- package/src/components-v2/service-cards/service-card-1/service-card-1.tsx +0 -42
- package/src/components-v2/service-cards/service-card-2/index.ts +0 -1
- package/src/components-v2/service-cards/service-card-2/service-card-2.tsx +0 -37
- package/src/components-v2/service-cards/service-card-3/index.ts +0 -1
- package/src/components-v2/service-cards/service-card-3/service-card-3.tsx +0 -28
- package/src/components-v2/service-cards/service-card-3/styles.ts +0 -23
- package/src/components-v2/settings/index.ts +0 -1
- package/src/components-v2/settings/setting.tsx +0 -141
- package/src/components-v2/settings/styles.ts +0 -57
- package/src/components-v2/sticky-wrapper/index.ts +0 -1
- package/src/components-v2/sticky-wrapper/sticky-wrapper.tsx +0 -21
- package/src/components-v2/sticky-wrapper/styles.ts +0 -25
- package/src/components-v2/stories/story-content/index.ts +0 -1
- package/src/components-v2/stories/story-content/story-content.tsx +0 -28
- package/src/components-v2/stories/story-content/styles.ts +0 -22
- package/src/components-v2/stories/story-item/index.ts +0 -1
- package/src/components-v2/stories/story-item/story-item.tsx +0 -24
- package/src/components-v2/stories/story-item/styles.ts +0 -11
- package/src/components-v2/stories/story-viewer/index.ts +0 -1
- package/src/components-v2/stories/story-viewer/story-viewer.tsx +0 -44
- package/src/components-v2/stories/story-viewer/styles.ts +0 -15
- package/src/components-v2/subscribe-input/index.ts +0 -1
- package/src/components-v2/subscribe-input/styles.ts +0 -14
- package/src/components-v2/subscribe-input/subscribe-input.tsx +0 -43
- package/src/components-v2/topbar/index.ts +0 -1
- package/src/components-v2/topbar/styles.ts +0 -55
- package/src/components-v2/topbar/top-bar.tsx +0 -115
- package/src/components-v2/wishlist/add-to-wishlist-dialog.tsx +0 -161
- package/src/components-v2/wishlist/components/create-new-list.tsx +0 -167
- package/src/components-v2/wishlist/components/dashboard-header.tsx +0 -123
- package/src/components-v2/wishlist/components/navigation.tsx +0 -87
- package/src/components-v2/wishlist/components/no-records.tsx +0 -20
- package/src/components-v2/wishlist/components/wishlist-modal-item.tsx +0 -66
- package/src/components-v2/wishlist/remove-from-wishlist-dialog.tsx +0 -175
- package/src/components-v2/wishlist-modal/TODO.md +0 -10
- package/src/components-v2/wishlist-modal/add-to-wishlist-dialog.tsx +0 -161
- package/src/components-v2/wishlist-modal/remove-from-wishlist-dialog.tsx +0 -174
- package/src/components-v2/wishlist-modal/wishlist-modal-item.tsx +0 -65
- package/src/pages-v2/product-details/product-intro/product-intro-images.tsx +0 -90
- package/src/pages-v2/product-details/product-intro/product-intro.tsx +0 -256
- /package/src/{pages-v2/account → components-v2}/no-records.tsx +0 -0
- /package/src/components-v2/product-cards/{product-card-1 → product-card}/components/hover-actions.tsx +0 -0
- /package/src/components-v2/product-cards/{product-card-16 → product-card}/index.ts +0 -0
- /package/src/components-v2/product-cards/{product-card-16 → product-card-plp}/components/quantity-buttons.tsx +0 -0
- /package/src/components-v2/product-cards/{product-card-wishlist → product-card-plp}/index.ts +0 -0
- /package/src/components-v2/product-cards/{product-card-16 → product-card-plp}/styles/index.ts +0 -0
- /package/src/components-v2/product-cards/{product-card-9 → product-card-plp-list}/components/add-to-cart.tsx +0 -0
- /package/src/components-v2/product-cards/{product-card-9 → product-card-plp-list}/components/favorite-button.tsx +0 -0
- /package/src/components-v2/product-cards/{product-card-9 → product-card-plp-list}/components/tags.tsx +0 -0
- /package/src/components-v2/product-cards/{product-card-8 → product-card-search}/index.ts +0 -0
- /package/src/components-v2/product-cards/{product-card-8 → product-card-search}/styles/index.ts +0 -0
- /package/src/components-v2/sticky/{Sticky.tsx → sticky.tsx} +0 -0
- /package/src/components-v2/{wishlist → wishlist-dialogs}/styles.ts +0 -0
- /package/src/{components-v2/shop-card → pages-v2/product-details/bopis/store-card}/index.ts +0 -0
- /package/src/{components-v2/shop-card → pages-v2/product-details/bopis/store-card}/styles.ts +0 -0
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import Link from "next/link";
|
|
2
|
-
import Avatar from "@mui/material/Avatar";
|
|
3
|
-
// STYLED COMPONENT
|
|
4
|
-
import { SubCategoryListItem } from "../styles";
|
|
5
|
-
// DATA TYPES
|
|
6
|
-
import { TransformedNavItem } from "../../utils/transform-nav";
|
|
7
|
-
|
|
8
|
-
// ==============================================================
|
|
9
|
-
type Props = { item: TransformedNavItem };
|
|
10
|
-
// ==============================================================
|
|
11
|
-
|
|
12
|
-
export default function CategoryItem({ item }: Props) {
|
|
13
|
-
const { title, href = "/", Icon, img } = item || {};
|
|
14
|
-
|
|
15
|
-
return (
|
|
16
|
-
<Link href={href}>
|
|
17
|
-
<SubCategoryListItem>
|
|
18
|
-
{img ? (
|
|
19
|
-
<Avatar
|
|
20
|
-
alt={title}
|
|
21
|
-
src={img}
|
|
22
|
-
sx={{ backgroundColor: "grey.100", borderRadius: 1 }}
|
|
23
|
-
/>
|
|
24
|
-
) : null}
|
|
25
|
-
|
|
26
|
-
{Icon ? <Icon sx={{ fontSize: 16 }} /> : null}
|
|
27
|
-
{title}
|
|
28
|
-
</SubCategoryListItem>
|
|
29
|
-
</Link>
|
|
30
|
-
);
|
|
31
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import Box from "@mui/material/Box";
|
|
2
|
-
// LOCAL CUSTOM COMPONENTS
|
|
3
|
-
import { H6 } from "@evenicanpm/storefront-core/src/components-v2/Typography";
|
|
4
|
-
import Scrollbar from "@evenicanpm/storefront-core/src/components-v2/scrollbar/index";
|
|
5
|
-
// LOCAL CUSTOM COMPONENT
|
|
6
|
-
import CategoryItem from "./category-item";
|
|
7
|
-
// STYLED COMPONENT
|
|
8
|
-
import { SubCategoryList } from "../styles";
|
|
9
|
-
// DATA TYPES
|
|
10
|
-
import { TransformedNavItem } from "../../utils/transform-nav";
|
|
11
|
-
|
|
12
|
-
// ==============================================================
|
|
13
|
-
type Props = { categories: TransformedNavItem };
|
|
14
|
-
// ==============================================================
|
|
15
|
-
|
|
16
|
-
export default function ChildCategories({ categories }: Props) {
|
|
17
|
-
return (
|
|
18
|
-
<Scrollbar autoHide={false} sx={{ width: "100%" }}>
|
|
19
|
-
<Box px={6} py={2} height="100%">
|
|
20
|
-
{categories?.items.map((item, key) => (
|
|
21
|
-
<div key={key}>
|
|
22
|
-
{/* NAV / CATEGORY TITLE */}
|
|
23
|
-
<H6 fontWeight={700} my={3}>
|
|
24
|
-
{item?.title}
|
|
25
|
-
</H6>
|
|
26
|
-
|
|
27
|
-
{/* NAV LIST ITEM / CATEGORY LIST ITEM */}
|
|
28
|
-
<SubCategoryList>
|
|
29
|
-
{item?.items.map((sub, key) => (
|
|
30
|
-
<CategoryItem item={sub} key={key} />
|
|
31
|
-
))}
|
|
32
|
-
</SubCategoryList>
|
|
33
|
-
</div>
|
|
34
|
-
))}
|
|
35
|
-
</Box>
|
|
36
|
-
</Scrollbar>
|
|
37
|
-
);
|
|
38
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import List from "@mui/material/List";
|
|
2
|
-
// GLOBAL CUSTOM COMPONENTS
|
|
3
|
-
import { H6 } from "@evenicanpm/storefront-core/src/components-v2/Typography";
|
|
4
|
-
// STYLED COMPONENTS
|
|
5
|
-
import { MenuListItem, StyledNavLink } from "./styles";
|
|
6
|
-
// Types
|
|
7
|
-
import { TransformedNavItem } from "../utils/transform-nav";
|
|
8
|
-
|
|
9
|
-
// ==============================================================
|
|
10
|
-
type Props = { category: TransformedNavItem };
|
|
11
|
-
// ==============================================================
|
|
12
|
-
|
|
13
|
-
export default function CategoryList({ category }: Props) {
|
|
14
|
-
const { title, items } = category || {};
|
|
15
|
-
|
|
16
|
-
return (
|
|
17
|
-
<List>
|
|
18
|
-
<H6 mb={0.5} pl={4}>
|
|
19
|
-
{title}
|
|
20
|
-
</H6>
|
|
21
|
-
|
|
22
|
-
{items.map((sub: TransformedNavItem, i) => (
|
|
23
|
-
<StyledNavLink href={sub.href} key={sub.title + i}>
|
|
24
|
-
<MenuListItem>{sub.title}</MenuListItem>
|
|
25
|
-
</StyledNavLink>
|
|
26
|
-
))}
|
|
27
|
-
</List>
|
|
28
|
-
);
|
|
29
|
-
}
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { describe, it, vi } from "vitest";
|
|
2
|
-
import { renderLevels } from "./render-levels";
|
|
3
|
-
import { render, screen } from "@testing-library/react";
|
|
4
|
-
import { transformCmsNav } from "../utils/transform-nav";
|
|
5
|
-
import { CmsNavItem } from "@/cms/interfaces/navigation";
|
|
6
|
-
|
|
7
|
-
describe("Render Nested Mobile Nav", () => {
|
|
8
|
-
const cmsNav = transformCmsNav(mockCmsData as unknown as CmsNavItem[]);
|
|
9
|
-
const handleClose = vi.fn();
|
|
10
|
-
it("should render the menu ", () => {
|
|
11
|
-
render(renderLevels(cmsNav, handleClose));
|
|
12
|
-
expect(screen.getByText("NESTED")).toBeInTheDocument();
|
|
13
|
-
});
|
|
14
|
-
|
|
15
|
-
it("should expand dropdown when clicked", () => {
|
|
16
|
-
render(renderLevels(cmsNav, handleClose));
|
|
17
|
-
screen.getByText("My Page").click();
|
|
18
|
-
expect(screen.getByText("NESTED")).toBeInTheDocument();
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
it("should navigate to page when link is clicked", () => {
|
|
22
|
-
render(renderLevels(cmsNav, handleClose));
|
|
23
|
-
|
|
24
|
-
const link = screen.getByText("NESTED");
|
|
25
|
-
expect(link).toHaveAttribute("href", "https://google.com");
|
|
26
|
-
|
|
27
|
-
link.click();
|
|
28
|
-
expect(handleClose).toHaveBeenCalled();
|
|
29
|
-
|
|
30
|
-
//Can't test actual navigation unless we use router.push() instead of Link and then mock it
|
|
31
|
-
// Should be part of E2E tests
|
|
32
|
-
});
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
const mockCmsData = [
|
|
36
|
-
{
|
|
37
|
-
id: 3,
|
|
38
|
-
title: "My Page",
|
|
39
|
-
menuAttached: false,
|
|
40
|
-
order: 1,
|
|
41
|
-
path: "/pages/my-page",
|
|
42
|
-
type: "INTERNAL",
|
|
43
|
-
uiRouterKey: "my-page",
|
|
44
|
-
slug: "pages-my-page",
|
|
45
|
-
external: false,
|
|
46
|
-
related: {
|
|
47
|
-
id: 1,
|
|
48
|
-
title: "My Page",
|
|
49
|
-
slug: "my-page",
|
|
50
|
-
createdAt: "2025-01-20T17:27:16.685Z",
|
|
51
|
-
updatedAt: "2025-01-20T17:27:19.608Z",
|
|
52
|
-
publishedAt: "2025-01-20T17:27:19.603Z",
|
|
53
|
-
__contentType: "api::page.page",
|
|
54
|
-
navigationItemId: 3,
|
|
55
|
-
__templateName: "Generic",
|
|
56
|
-
},
|
|
57
|
-
items: [
|
|
58
|
-
{
|
|
59
|
-
id: 4,
|
|
60
|
-
title: "NESTED",
|
|
61
|
-
menuAttached: false,
|
|
62
|
-
order: 1,
|
|
63
|
-
path: "https://google.com",
|
|
64
|
-
type: "EXTERNAL",
|
|
65
|
-
uiRouterKey: "nested",
|
|
66
|
-
slug: "",
|
|
67
|
-
external: true,
|
|
68
|
-
},
|
|
69
|
-
],
|
|
70
|
-
},
|
|
71
|
-
];
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import Box from "@mui/material/Box";
|
|
2
|
-
import Accordion from "@mui/material/Accordion";
|
|
3
|
-
import AccordionSummary from "@mui/material/AccordionSummary";
|
|
4
|
-
import { MdExpandMore as ExpandMore } from "react-icons/md";
|
|
5
|
-
// GLOBAL CUSTOM COMPONENTS
|
|
6
|
-
import { H6 } from "@evenicanpm/storefront-core/src/components-v2/Typography";
|
|
7
|
-
import { NavLink } from "@evenicanpm/storefront-core/src/components-v2/nav-link/index";
|
|
8
|
-
|
|
9
|
-
import { TransformedNavItem } from "@evenicanpm/storefront-core/src/components-v2/navbar/utils/transform-nav";
|
|
10
|
-
|
|
11
|
-
const ACCORDION_STYLES = {
|
|
12
|
-
"&:not(:last-child)": { borderBottom: 0 },
|
|
13
|
-
"&:before": { display: "none" },
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
const ACCORDION_SUMMARY_STYLES = {
|
|
17
|
-
padding: 0,
|
|
18
|
-
minHeight: 48,
|
|
19
|
-
boxShadow: "none",
|
|
20
|
-
"& .Mui-expanded": { color: "primary.main", margin: 0 },
|
|
21
|
-
"& .MuiAccordionSummary-expandIconWrapper.Mui-expanded": {
|
|
22
|
-
margin: 0,
|
|
23
|
-
"& .MuiSvgIcon-root": { color: "primary.main" },
|
|
24
|
-
},
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
export const renderLevels = (
|
|
28
|
-
data: TransformedNavItem[],
|
|
29
|
-
handleClose: () => void,
|
|
30
|
-
) => {
|
|
31
|
-
return data.map((nav: TransformedNavItem, index: number) => {
|
|
32
|
-
const { href, title, items } = nav;
|
|
33
|
-
if (items && items.length) {
|
|
34
|
-
return (
|
|
35
|
-
<Accordion
|
|
36
|
-
square
|
|
37
|
-
key={index}
|
|
38
|
-
elevation={0}
|
|
39
|
-
disableGutters
|
|
40
|
-
sx={ACCORDION_STYLES}
|
|
41
|
-
>
|
|
42
|
-
<AccordionSummary
|
|
43
|
-
expandIcon={<ExpandMore style={{ fontSize: "1.5rem" }} />}
|
|
44
|
-
sx={ACCORDION_SUMMARY_STYLES}
|
|
45
|
-
>
|
|
46
|
-
<H6>{title}</H6>
|
|
47
|
-
</AccordionSummary>
|
|
48
|
-
|
|
49
|
-
<Box mx={2}>{renderLevels(items, handleClose)}</Box>
|
|
50
|
-
</Accordion>
|
|
51
|
-
);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
return (
|
|
55
|
-
<Box key={index} py={1}>
|
|
56
|
-
<NavLink href={href} onClick={handleClose}>
|
|
57
|
-
{title}
|
|
58
|
-
</NavLink>
|
|
59
|
-
</Box>
|
|
60
|
-
);
|
|
61
|
-
});
|
|
62
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from "./newsletter";
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import { useEffect, useState } from "react";
|
|
4
|
-
// MUI
|
|
5
|
-
import Grid from "@mui/material/Grid2";
|
|
6
|
-
import Modal from "@mui/material/Modal";
|
|
7
|
-
import Button from "@mui/material/Button";
|
|
8
|
-
import Checkbox from "@mui/material/Checkbox";
|
|
9
|
-
import TextField from "@mui/material/TextField";
|
|
10
|
-
import IconButton from "@mui/material/IconButton";
|
|
11
|
-
import FormControlLabel from "@mui/material/FormControlLabel";
|
|
12
|
-
import ClickAwayListener from "@mui/material/ClickAwayListener";
|
|
13
|
-
// MUI UTILS METHODS
|
|
14
|
-
import debounce from "@mui/material/utils/debounce";
|
|
15
|
-
// MUI ICON COMPONENTS
|
|
16
|
-
import Clear from "@mui/icons-material/Clear";
|
|
17
|
-
// GLOBAL CUSTOM COMPONENTS
|
|
18
|
-
import {
|
|
19
|
-
H1,
|
|
20
|
-
Paragraph,
|
|
21
|
-
Span,
|
|
22
|
-
} from "@evenicanpm/storefront-core/src/components-v2/Typography";
|
|
23
|
-
// LOCAL CUSTOM COMPONENT
|
|
24
|
-
import SocialIcons from "./social-icons";
|
|
25
|
-
// STYLED COMPONENTS
|
|
26
|
-
import { Wrapper } from "./styles";
|
|
27
|
-
|
|
28
|
-
// ======================================================
|
|
29
|
-
type Props = { image?: string };
|
|
30
|
-
// ======================================================
|
|
31
|
-
|
|
32
|
-
export default function Newsletter({
|
|
33
|
-
image = "/assets/images/newsletter/bg-1.png",
|
|
34
|
-
}: Props) {
|
|
35
|
-
const [open, setOpen] = useState(false);
|
|
36
|
-
const handleClose = () => setOpen(false);
|
|
37
|
-
|
|
38
|
-
useEffect(() => {
|
|
39
|
-
if (!window) return;
|
|
40
|
-
|
|
41
|
-
if (!window.sessionStorage.getItem("newsletter")) {
|
|
42
|
-
debounce(() => {
|
|
43
|
-
setOpen(true);
|
|
44
|
-
window.sessionStorage.setItem("newsletter", "true");
|
|
45
|
-
}, 2000)();
|
|
46
|
-
}
|
|
47
|
-
}, []);
|
|
48
|
-
|
|
49
|
-
return (
|
|
50
|
-
<ClickAwayListener onClickAway={handleClose}>
|
|
51
|
-
<Modal
|
|
52
|
-
open={open}
|
|
53
|
-
onClose={handleClose}
|
|
54
|
-
aria-labelledby="modal-modal-title"
|
|
55
|
-
aria-describedby="modal-modal-description"
|
|
56
|
-
sx={{ zIndex: 999999999 }}
|
|
57
|
-
>
|
|
58
|
-
<Wrapper img={image}>
|
|
59
|
-
<Grid container spacing={2}>
|
|
60
|
-
<Grid
|
|
61
|
-
size={{ lg: 6, md: 6 }}
|
|
62
|
-
display={{ md: "flex", xs: "none" }}
|
|
63
|
-
/>
|
|
64
|
-
|
|
65
|
-
<Grid size={{ lg: 6, md: 6, xs: 12 }} alignItems="center">
|
|
66
|
-
<div className="content">
|
|
67
|
-
<Paragraph fontSize={22} fontWeight={700}>
|
|
68
|
-
UP TO <Span color="primary.main">30% OFF</Span>
|
|
69
|
-
</Paragraph>
|
|
70
|
-
|
|
71
|
-
<H1 fontSize={36} fontWeight={700} mb={2}>
|
|
72
|
-
Sign up to <Span color="primary.main">BAZAAR</Span>
|
|
73
|
-
</H1>
|
|
74
|
-
|
|
75
|
-
<Paragraph color="grey.600" mb={5}>
|
|
76
|
-
Subscribe to the BAZAR eCommerce newsletter to receive timely
|
|
77
|
-
updates from your favorite products.
|
|
78
|
-
</Paragraph>
|
|
79
|
-
|
|
80
|
-
<TextField
|
|
81
|
-
fullWidth
|
|
82
|
-
className="emailInput"
|
|
83
|
-
placeholder="Enter your email address"
|
|
84
|
-
/>
|
|
85
|
-
|
|
86
|
-
<Button
|
|
87
|
-
variant="contained"
|
|
88
|
-
fullWidth
|
|
89
|
-
color="primary"
|
|
90
|
-
sx={{ p: 1.5 }}
|
|
91
|
-
>
|
|
92
|
-
SUBMIT
|
|
93
|
-
</Button>
|
|
94
|
-
|
|
95
|
-
<SocialIcons />
|
|
96
|
-
|
|
97
|
-
<FormControlLabel
|
|
98
|
-
control={<Checkbox defaultChecked />}
|
|
99
|
-
label="No, Thanks"
|
|
100
|
-
/>
|
|
101
|
-
</div>
|
|
102
|
-
</Grid>
|
|
103
|
-
</Grid>
|
|
104
|
-
|
|
105
|
-
<IconButton onClick={handleClose} className="clear-btn">
|
|
106
|
-
<Clear color="inherit" />
|
|
107
|
-
</IconButton>
|
|
108
|
-
</Wrapper>
|
|
109
|
-
</Modal>
|
|
110
|
-
</ClickAwayListener>
|
|
111
|
-
);
|
|
112
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import IconButton from "@mui/material/IconButton";
|
|
2
|
-
// MUI ICON COMPONENTS
|
|
3
|
-
import Google from "@mui/icons-material/Google";
|
|
4
|
-
import Twitter from "@mui/icons-material/Twitter";
|
|
5
|
-
import Instagram from "@mui/icons-material/Instagram";
|
|
6
|
-
// GLOBAL CUSTOM COMPONENT
|
|
7
|
-
import FlexRowCenter from "@evenicanpm/storefront-core/src/components-v2/flex-box/flex-row-center";
|
|
8
|
-
// CUSTOM ICON COMPONENT
|
|
9
|
-
// import Facebook from "icons/Facebook";
|
|
10
|
-
import FallbackIcon from "@/cms/blocks/Icons/Components/FallbackIcon";
|
|
11
|
-
const Facebook = FallbackIcon;
|
|
12
|
-
|
|
13
|
-
const STYLE = { fontSize: 20, color: "grey.900" };
|
|
14
|
-
|
|
15
|
-
export default function SocialIcons() {
|
|
16
|
-
return (
|
|
17
|
-
<FlexRowCenter mt={4} mb={2}>
|
|
18
|
-
<IconButton>
|
|
19
|
-
<Facebook sx={STYLE} />
|
|
20
|
-
</IconButton>
|
|
21
|
-
|
|
22
|
-
<IconButton>
|
|
23
|
-
<Twitter sx={STYLE} />
|
|
24
|
-
</IconButton>
|
|
25
|
-
|
|
26
|
-
<IconButton>
|
|
27
|
-
<Instagram sx={STYLE} />
|
|
28
|
-
</IconButton>
|
|
29
|
-
|
|
30
|
-
<IconButton>
|
|
31
|
-
<Google sx={STYLE} />
|
|
32
|
-
</IconButton>
|
|
33
|
-
</FlexRowCenter>
|
|
34
|
-
);
|
|
35
|
-
}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import styled from "@mui/material/styles/styled";
|
|
2
|
-
|
|
3
|
-
// styled components
|
|
4
|
-
export const Wrapper = styled("div", {
|
|
5
|
-
shouldForwardProp: (prop) => prop !== "img",
|
|
6
|
-
})<{ img: string }>(({ theme, img }) => ({
|
|
7
|
-
top: "50%",
|
|
8
|
-
padding: 0,
|
|
9
|
-
left: "50%",
|
|
10
|
-
width: "100%",
|
|
11
|
-
maxWidth: 1020,
|
|
12
|
-
height: "auto",
|
|
13
|
-
borderRadius: 8,
|
|
14
|
-
outline: "none",
|
|
15
|
-
position: "absolute",
|
|
16
|
-
boxShadow: theme.shadows[3],
|
|
17
|
-
transform: "translate(-50%, -50%)",
|
|
18
|
-
backgroundColor: theme.palette.background.paper,
|
|
19
|
-
".content": {
|
|
20
|
-
zIndex: 2,
|
|
21
|
-
padding: 24,
|
|
22
|
-
textAlign: "center",
|
|
23
|
-
position: "relative",
|
|
24
|
-
},
|
|
25
|
-
".clear-btn": {
|
|
26
|
-
top: 8,
|
|
27
|
-
right: 8,
|
|
28
|
-
zIndex: 2,
|
|
29
|
-
position: "absolute",
|
|
30
|
-
color: theme.palette.grey[900],
|
|
31
|
-
},
|
|
32
|
-
".emailInput": {
|
|
33
|
-
marginBottom: 16,
|
|
34
|
-
"& input": { padding: 16, textAlign: "center" },
|
|
35
|
-
"& .MuiOutlinedInput-notchedOutline": {
|
|
36
|
-
borderColor: theme.palette.grey[300],
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
[theme.breakpoints.between("sm", "md")]: {
|
|
40
|
-
padding: 24,
|
|
41
|
-
maxWidth: 620,
|
|
42
|
-
},
|
|
43
|
-
[theme.breakpoints.up("md")]: {
|
|
44
|
-
padding: 32,
|
|
45
|
-
height: 550,
|
|
46
|
-
":after": {
|
|
47
|
-
content: "''",
|
|
48
|
-
width: "100%",
|
|
49
|
-
height: "100%",
|
|
50
|
-
backgroundImage: `url(${img})`,
|
|
51
|
-
backgroundRepeat: "no-repeat",
|
|
52
|
-
backgroundPosition: "left",
|
|
53
|
-
top: 0,
|
|
54
|
-
left: 0,
|
|
55
|
-
zIndex: 1,
|
|
56
|
-
position: "absolute",
|
|
57
|
-
...(theme.direction === "rtl" && {
|
|
58
|
-
right: 0,
|
|
59
|
-
marginRight: "auto",
|
|
60
|
-
backgroundPosition: "right",
|
|
61
|
-
transform: "rotateX(180deg) rotateZ(180deg)",
|
|
62
|
-
}),
|
|
63
|
-
},
|
|
64
|
-
},
|
|
65
|
-
}));
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
// GLOBAL CUSTOM COMPONENTS
|
|
2
|
-
import { Span } from "@evenicanpm/storefront-core/src/components-v2/Typography";
|
|
3
|
-
import { NavLink } from "@evenicanpm/storefront-core/src/components-v2/nav-link/index";
|
|
4
|
-
|
|
5
|
-
// ==============================================================
|
|
6
|
-
interface Props {
|
|
7
|
-
ml: number;
|
|
8
|
-
href: string;
|
|
9
|
-
title: string;
|
|
10
|
-
}
|
|
11
|
-
// ==============================================================
|
|
12
|
-
|
|
13
|
-
export default function LinkItem({ href, title, ml = 4 }: Props) {
|
|
14
|
-
return (
|
|
15
|
-
<NavLink href={href} color="grey.700">
|
|
16
|
-
<Span display="block" ml={ml} py={1}>
|
|
17
|
-
{title}
|
|
18
|
-
</Span>
|
|
19
|
-
</NavLink>
|
|
20
|
-
);
|
|
21
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
// GLOBAL CUSTOM COMPONENTS
|
|
4
|
-
import { Span } from "@evenicanpm/storefront-core/src/components-v2/Typography";
|
|
5
|
-
import FlexBox from "@evenicanpm/storefront-core/src/components-v2/flex-box/flex-box";
|
|
6
|
-
// CUSTOM ICON COMPONENTS
|
|
7
|
-
// import appIcons from "icons";
|
|
8
|
-
import FallbackIcon from "@/cms/blocks/Icons/Components/FallbackIcon";
|
|
9
|
-
|
|
10
|
-
// ==============================================================
|
|
11
|
-
interface Props {
|
|
12
|
-
icon: string;
|
|
13
|
-
title: string;
|
|
14
|
-
}
|
|
15
|
-
// ==============================================================
|
|
16
|
-
|
|
17
|
-
export default function ListItem({ title }: Props) {
|
|
18
|
-
// const Icon = appIcons[icon] as SvgIconComponent;
|
|
19
|
-
const Icon = FallbackIcon;
|
|
20
|
-
|
|
21
|
-
return (
|
|
22
|
-
<FlexBox py={1} gap={1.5} alignItems="center">
|
|
23
|
-
<Icon fontSize="small" />
|
|
24
|
-
<Span fontWeight={600}>{title}</Span>
|
|
25
|
-
</FlexBox>
|
|
26
|
-
);
|
|
27
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import { Fragment, useState } from "react";
|
|
4
|
-
import Collapse from "@mui/material/Collapse";
|
|
5
|
-
// GLOBAL CUSTOM COMPONENTS
|
|
6
|
-
import { AccordionHeader } from "@evenicanpm/storefront-core/src/components-v2/accordion/index";
|
|
7
|
-
// LOCAL CUSTOM COMPONENT
|
|
8
|
-
import ListItem from "./list-item";
|
|
9
|
-
import { renderChild } from "./render-child";
|
|
10
|
-
// CUSTOM DATA MODEL
|
|
11
|
-
import { CategoryItem } from "@evenicanpm/storefront-core/src/components-v2/bazaar-types";
|
|
12
|
-
|
|
13
|
-
// ==============================================================
|
|
14
|
-
type Props = { item: CategoryItem };
|
|
15
|
-
// ==============================================================
|
|
16
|
-
|
|
17
|
-
export default function NavAccordion({ item }: Props) {
|
|
18
|
-
const { icon, title, child } = item;
|
|
19
|
-
|
|
20
|
-
const [open, setOpen] = useState(true);
|
|
21
|
-
|
|
22
|
-
return (
|
|
23
|
-
<Fragment>
|
|
24
|
-
<AccordionHeader
|
|
25
|
-
open={open}
|
|
26
|
-
onClick={() => setOpen((state) => !state)}
|
|
27
|
-
sx={{ padding: 0, cursor: "pointer" }}
|
|
28
|
-
>
|
|
29
|
-
<ListItem icon={icon} title={title} />
|
|
30
|
-
</AccordionHeader>
|
|
31
|
-
|
|
32
|
-
{/* RENDER NESTED ITEMS */}
|
|
33
|
-
{child ? <Collapse in={open}>{renderChild(child)}</Collapse> : null}
|
|
34
|
-
</Fragment>
|
|
35
|
-
);
|
|
36
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { Fragment } from "react";
|
|
2
|
-
import LinkItem from "./link-item";
|
|
3
|
-
|
|
4
|
-
// ==============================================================
|
|
5
|
-
type Item = { title: string; href: string };
|
|
6
|
-
|
|
7
|
-
interface Props extends Item {
|
|
8
|
-
child?: Item[];
|
|
9
|
-
}
|
|
10
|
-
// ==============================================================
|
|
11
|
-
|
|
12
|
-
export const renderChild = (childList: Props[], type = "parent") => {
|
|
13
|
-
// NESTED LIST
|
|
14
|
-
if (type === "parent") {
|
|
15
|
-
return childList.map(({ href, title, child }) => (
|
|
16
|
-
<Fragment key={title}>
|
|
17
|
-
<LinkItem href={href} title={title} ml={4} />
|
|
18
|
-
{child ? renderChild(child, "child") : null}
|
|
19
|
-
</Fragment>
|
|
20
|
-
));
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
return childList.map((item, ind) => (
|
|
24
|
-
<LinkItem key={ind} href={item.href} title={item.title} ml={6} />
|
|
25
|
-
));
|
|
26
|
-
};
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
// GLOBAL CUSTOM COMPONENTS
|
|
2
|
-
import Scrollbar from "@evenicanpm/storefront-core/src/components-v2/scrollbar/index";
|
|
3
|
-
import { NavLink } from "@evenicanpm/storefront-core/src/components-v2/nav-link/index";
|
|
4
|
-
// LOCAL CUSTOM COMPONENTS
|
|
5
|
-
import ListItem from "./components/list-item";
|
|
6
|
-
import NavAccordion from "./components/nav-accordion";
|
|
7
|
-
// STYLED COMPONENTS
|
|
8
|
-
import { StyledCard } from "./styles/index";
|
|
9
|
-
// CUSTOM DATA MODEL
|
|
10
|
-
import { CategoryItem } from "@evenicanpm/storefront-core/src/components-v2/bazaar-types";
|
|
11
|
-
|
|
12
|
-
// ===========================================================
|
|
13
|
-
type Props = { navigation: CategoryItem[] };
|
|
14
|
-
// ===========================================================
|
|
15
|
-
|
|
16
|
-
export default function GrocerySideNav({ navigation }: Props) {
|
|
17
|
-
return (
|
|
18
|
-
<Scrollbar>
|
|
19
|
-
<StyledCard elevation={3}>
|
|
20
|
-
{navigation.map((item, ind) => {
|
|
21
|
-
if (item.child) return <NavAccordion item={item} key={ind} />;
|
|
22
|
-
|
|
23
|
-
return (
|
|
24
|
-
<NavLink key={ind} href={item.href ?? ""} color="grey.700">
|
|
25
|
-
<ListItem title={item.title} icon={item.icon} />
|
|
26
|
-
</NavLink>
|
|
27
|
-
);
|
|
28
|
-
})}
|
|
29
|
-
</StyledCard>
|
|
30
|
-
</Scrollbar>
|
|
31
|
-
);
|
|
32
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from "./grocery-side-nav";
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
// GLOBAL CUSTOM COMPONENTS
|
|
4
|
-
import { Span } from "@evenicanpm/storefront-core/src/components-v2/Typography";
|
|
5
|
-
import FlexBox from "@evenicanpm/storefront-core/src/components-v2/flex-box/flex-box";
|
|
6
|
-
// CUSTOM ICON COMPONENTS
|
|
7
|
-
// import appIcons from "icons";
|
|
8
|
-
import FallbackIcon from "@/cms/blocks/Icons/Components/FallbackIcon";
|
|
9
|
-
|
|
10
|
-
// ==============================================================
|
|
11
|
-
interface Props {
|
|
12
|
-
icon: string;
|
|
13
|
-
title: string;
|
|
14
|
-
}
|
|
15
|
-
// ==============================================================
|
|
16
|
-
|
|
17
|
-
export default function ListItem({ title }: Props) {
|
|
18
|
-
// const Icon = appIcons[icon] as SvgIconComponent;
|
|
19
|
-
const Icon = FallbackIcon;
|
|
20
|
-
|
|
21
|
-
return (
|
|
22
|
-
<FlexBox py={1} gap={1.5} alignItems="center">
|
|
23
|
-
<Icon fontSize="small" />
|
|
24
|
-
<Span fontWeight={600}>{title}</Span>
|
|
25
|
-
</FlexBox>
|
|
26
|
-
);
|
|
27
|
-
}
|