@ikas/component-cli 0.93.0 → 0.95.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/config.d.ts.map +1 -1
- package/dist/commands/config.js +148 -0
- package/dist/commands/config.js.map +1 -1
- package/dist/commands/create.d.ts.map +1 -1
- package/dist/commands/create.js +108 -42
- package/dist/commands/create.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/utils/component-helpers.js +1 -1
- package/dist/utils/component-helpers.js.map +1 -1
- package/dist/utils/template.d.ts +12 -0
- package/dist/utils/template.d.ts.map +1 -1
- package/dist/utils/template.js +44 -0
- package/dist/utils/template.js.map +1 -1
- package/package.json +3 -2
- package/templates/create/claude-md +2 -1
- package/templates/create/cursorrules +1 -1
- package/templates/create/src/components/ExampleComponent/types.ts +1 -1
- package/templates/create/src/components/ExampleSection/types.ts +1 -1
- package/templates/create-full/README.md +78 -0
- package/templates/create-full/claude-md +721 -0
- package/templates/create-full/cursorrules +103 -0
- package/templates/create-full/gitignore +4 -0
- package/templates/create-full/ikas.config.json +5007 -0
- package/templates/create-full/mcp.json +10 -0
- package/templates/create-full/package.json +17 -0
- package/templates/create-full/src/components/AccountAddresses/components/AddressCard/index.tsx +55 -0
- package/templates/create-full/src/components/AccountAddresses/components/AddressCard/styles.css +46 -0
- package/templates/create-full/src/components/AccountAddresses/components/AddressModal/index.tsx +301 -0
- package/templates/create-full/src/components/AccountAddresses/components/AddressModal/styles.css +22 -0
- package/templates/create-full/src/components/AccountAddresses/index.tsx +127 -0
- package/templates/create-full/src/components/AccountAddresses/styles.css +41 -0
- package/templates/create-full/src/components/AccountAddresses/types.ts +15 -0
- package/templates/create-full/src/components/AccountFavorites/index.tsx +82 -0
- package/templates/create-full/src/components/AccountFavorites/styles.css +52 -0
- package/templates/create-full/src/components/AccountFavorites/types.ts +7 -0
- package/templates/create-full/src/components/AccountInfo/components/AccountSidebar/index.tsx +171 -0
- package/templates/create-full/src/components/AccountInfo/components/AccountSidebar/styles.css +144 -0
- package/templates/create-full/src/components/AccountInfo/index.tsx +91 -0
- package/templates/create-full/src/components/AccountInfo/styles.css +35 -0
- package/templates/create-full/src/components/AccountInfo/types.ts +9 -0
- package/templates/create-full/src/components/AccountInfoContent/index.tsx +134 -0
- package/templates/create-full/src/components/AccountInfoContent/styles.css +57 -0
- package/templates/create-full/src/components/AccountInfoContent/types.ts +8 -0
- package/templates/create-full/src/components/AccountOrderDetail/components/OrderHeader/index.tsx +78 -0
- package/templates/create-full/src/components/AccountOrderDetail/components/OrderHeader/styles.css +46 -0
- package/templates/create-full/src/components/AccountOrderDetail/components/OrderItemRow/index.tsx +20 -0
- package/templates/create-full/src/components/AccountOrderDetail/components/OrderItemRow/styles.css +16 -0
- package/templates/create-full/src/components/AccountOrderDetail/components/OrderLineItemDisplay/index.tsx +112 -0
- package/templates/create-full/src/components/AccountOrderDetail/components/OrderLineItemDisplay/styles.css +86 -0
- package/templates/create-full/src/components/AccountOrderDetail/components/OrderSidebar/index.tsx +195 -0
- package/templates/create-full/src/components/AccountOrderDetail/components/OrderSidebar/styles.css +93 -0
- package/templates/create-full/src/components/AccountOrderDetail/components/PackageGroup/index.tsx +156 -0
- package/templates/create-full/src/components/AccountOrderDetail/components/PackageGroup/styles.css +100 -0
- package/templates/create-full/src/components/AccountOrderDetail/components/ReturnItemRow/index.tsx +56 -0
- package/templates/create-full/src/components/AccountOrderDetail/components/ReturnItemRow/styles.css +57 -0
- package/templates/create-full/src/components/AccountOrderDetail/components/ReturnView/index.tsx +159 -0
- package/templates/create-full/src/components/AccountOrderDetail/components/ReturnView/styles.css +29 -0
- package/templates/create-full/src/components/AccountOrderDetail/index.tsx +244 -0
- package/templates/create-full/src/components/AccountOrderDetail/styles.css +125 -0
- package/templates/create-full/src/components/AccountOrderDetail/types.ts +32 -0
- package/templates/create-full/src/components/AccountOrders/components/OrderCard/index.tsx +122 -0
- package/templates/create-full/src/components/AccountOrders/components/OrderCard/styles.css +114 -0
- package/templates/create-full/src/components/AccountOrders/index.tsx +105 -0
- package/templates/create-full/src/components/AccountOrders/styles.css +36 -0
- package/templates/create-full/src/components/AccountOrders/types.ts +11 -0
- package/templates/create-full/src/components/Announcement/index.tsx +11 -0
- package/templates/create-full/src/components/Announcement/styles.css +4 -0
- package/templates/create-full/src/components/Announcement/types.ts +4 -0
- package/templates/create-full/src/components/Announcements/index.tsx +91 -0
- package/templates/create-full/src/components/Announcements/styles.css +45 -0
- package/templates/create-full/src/components/Announcements/types.ts +8 -0
- package/templates/create-full/src/components/BlogHome/components/BlogCard/index.tsx +89 -0
- package/templates/create-full/src/components/BlogHome/components/BlogCard/styles.css +121 -0
- package/templates/create-full/src/components/BlogHome/index.tsx +124 -0
- package/templates/create-full/src/components/BlogHome/styles.css +118 -0
- package/templates/create-full/src/components/BlogHome/types.ts +15 -0
- package/templates/create-full/src/components/BlogPost/index.tsx +128 -0
- package/templates/create-full/src/components/BlogPost/styles.css +120 -0
- package/templates/create-full/src/components/BlogPost/types.ts +12 -0
- package/templates/create-full/src/components/CardProductName/index.tsx +25 -0
- package/templates/create-full/src/components/CardProductName/styles.css +22 -0
- package/templates/create-full/src/components/CardProductName/types.ts +7 -0
- package/templates/create-full/src/components/CardProductPrice/index.tsx +30 -0
- package/templates/create-full/src/components/CardProductPrice/styles.css +13 -0
- package/templates/create-full/src/components/CardProductPrice/types.ts +6 -0
- package/templates/create-full/src/components/CardProductVariants/index.tsx +10 -0
- package/templates/create-full/src/components/CardProductVariants/styles.css +1 -0
- package/templates/create-full/src/components/CardProductVariants/types.ts +6 -0
- package/templates/create-full/src/components/CartPage/components/CouponCode/index.tsx +108 -0
- package/templates/create-full/src/components/CartPage/components/CouponCode/styles.css +68 -0
- package/templates/create-full/src/components/CartPage/components/EmptyState/index.tsx +31 -0
- package/templates/create-full/src/components/CartPage/components/EmptyState/styles.css +18 -0
- package/templates/create-full/src/components/CartPage/components/OrderSummary/index.tsx +106 -0
- package/templates/create-full/src/components/CartPage/components/OrderSummary/styles.css +70 -0
- package/templates/create-full/src/components/CartPage/index.tsx +107 -0
- package/templates/create-full/src/components/CartPage/styles.css +54 -0
- package/templates/create-full/src/components/CartPage/types.ts +16 -0
- package/templates/create-full/src/components/CategoryImageItem/components/Card/index.tsx +64 -0
- package/templates/create-full/src/components/CategoryImageItem/components/Card/styles.css +56 -0
- package/templates/create-full/src/components/CategoryImageItem/index.tsx +64 -0
- package/templates/create-full/src/components/CategoryImageItem/styles.css +10 -0
- package/templates/create-full/src/components/CategoryImageItem/types.ts +16 -0
- package/templates/create-full/src/components/CategoryImages/index.tsx +62 -0
- package/templates/create-full/src/components/CategoryImages/styles.css +38 -0
- package/templates/create-full/src/components/CategoryImages/types.ts +11 -0
- package/templates/create-full/src/components/CategoryList/components/CategoryListControls/index.tsx +129 -0
- package/templates/create-full/src/components/CategoryList/components/CategoryListControls/styles.css +99 -0
- package/templates/create-full/src/components/CategoryList/components/FilterBoxValues/index.tsx +42 -0
- package/templates/create-full/src/components/CategoryList/components/FilterBoxValues/styles.css +27 -0
- package/templates/create-full/src/components/CategoryList/components/FilterCategoryList/index.tsx +43 -0
- package/templates/create-full/src/components/CategoryList/components/FilterCategoryList/styles.css +20 -0
- package/templates/create-full/src/components/CategoryList/components/FilterGroupValues/index.tsx +114 -0
- package/templates/create-full/src/components/CategoryList/components/FilterGroupValues/styles.css +1 -0
- package/templates/create-full/src/components/CategoryList/components/FilterListValues/index.tsx +54 -0
- package/templates/create-full/src/components/CategoryList/components/FilterListValues/styles.css +22 -0
- package/templates/create-full/src/components/CategoryList/components/FilterRangeListValues/index.tsx +50 -0
- package/templates/create-full/src/components/CategoryList/components/FilterRangeListValues/styles.css +25 -0
- package/templates/create-full/src/components/CategoryList/components/FilterRangeValues/index.tsx +189 -0
- package/templates/create-full/src/components/CategoryList/components/FilterRangeValues/styles.css +89 -0
- package/templates/create-full/src/components/CategoryList/components/FilterSidebar/index.tsx +92 -0
- package/templates/create-full/src/components/CategoryList/components/FilterSidebar/styles.css +27 -0
- package/templates/create-full/src/components/CategoryList/components/FilterSwatchValues/index.tsx +63 -0
- package/templates/create-full/src/components/CategoryList/components/FilterSwatchValues/styles.css +48 -0
- package/templates/create-full/src/components/CategoryList/components/MobileFilterModal/index.tsx +146 -0
- package/templates/create-full/src/components/CategoryList/components/MobileFilterModal/styles.css +133 -0
- package/templates/create-full/src/components/CategoryList/index.tsx +333 -0
- package/templates/create-full/src/components/CategoryList/styles.css +110 -0
- package/templates/create-full/src/components/CategoryList/types.ts +30 -0
- package/templates/create-full/src/components/CollapsibleContent/index.tsx +23 -0
- package/templates/create-full/src/components/CollapsibleContent/styles.css +11 -0
- package/templates/create-full/src/components/CollapsibleContent/types.ts +6 -0
- package/templates/create-full/src/components/CookieBar/index.tsx +78 -0
- package/templates/create-full/src/components/CookieBar/styles.css +111 -0
- package/templates/create-full/src/components/CookieBar/types.ts +10 -0
- package/templates/create-full/src/components/CustomerEmailVerification/index.tsx +168 -0
- package/templates/create-full/src/components/CustomerEmailVerification/styles.css +118 -0
- package/templates/create-full/src/components/CustomerEmailVerification/types.ts +17 -0
- package/templates/create-full/src/components/FeatureItem/index.tsx +27 -0
- package/templates/create-full/src/components/FeatureItem/styles.css +19 -0
- package/templates/create-full/src/components/FeatureItem/types.ts +7 -0
- package/templates/create-full/src/components/Features/index.tsx +25 -0
- package/templates/create-full/src/components/Features/styles.css +39 -0
- package/templates/create-full/src/components/Features/types.ts +5 -0
- package/templates/create-full/src/components/Footer/index.tsx +154 -0
- package/templates/create-full/src/components/Footer/styles.css +175 -0
- package/templates/create-full/src/components/Footer/types.ts +15 -0
- package/templates/create-full/src/components/ForgotPassword/components/ForgotPasswordForm/index.tsx +129 -0
- package/templates/create-full/src/components/ForgotPassword/components/ForgotPasswordForm/styles.css +0 -0
- package/templates/create-full/src/components/ForgotPassword/index.tsx +30 -0
- package/templates/create-full/src/components/ForgotPassword/styles.css +85 -0
- package/templates/create-full/src/components/ForgotPassword/types.ts +13 -0
- package/templates/create-full/src/components/Header/index.tsx +53 -0
- package/templates/create-full/src/components/Header/styles.css +6 -0
- package/templates/create-full/src/components/Header/types.ts +6 -0
- package/templates/create-full/src/components/HeroSlider/index.tsx +110 -0
- package/templates/create-full/src/components/HeroSlider/styles.css +129 -0
- package/templates/create-full/src/components/HeroSlider/types.ts +9 -0
- package/templates/create-full/src/components/HeroSliderItem/index.tsx +231 -0
- package/templates/create-full/src/components/HeroSliderItem/styles.css +152 -0
- package/templates/create-full/src/components/HeroSliderItem/types.ts +34 -0
- package/templates/create-full/src/components/Login/components/LoginForm/index.tsx +181 -0
- package/templates/create-full/src/components/Login/components/LoginForm/styles.css +0 -0
- package/templates/create-full/src/components/Login/index.tsx +37 -0
- package/templates/create-full/src/components/Login/styles.css +129 -0
- package/templates/create-full/src/components/Login/types.ts +18 -0
- package/templates/create-full/src/components/Navbar/components/CartSidebar/index.tsx +203 -0
- package/templates/create-full/src/components/Navbar/components/CartSidebar/styles.css +175 -0
- package/templates/create-full/src/components/Navbar/components/MobileMenu/index.tsx +198 -0
- package/templates/create-full/src/components/Navbar/components/MobileMenu/styles.css +122 -0
- package/templates/create-full/src/components/Navbar/components/NavItem/index.tsx +65 -0
- package/templates/create-full/src/components/Navbar/components/SearchModal/index.tsx +267 -0
- package/templates/create-full/src/components/Navbar/components/SearchModal/styles.css +182 -0
- package/templates/create-full/src/components/Navbar/index.tsx +250 -0
- package/templates/create-full/src/components/Navbar/styles.css +243 -0
- package/templates/create-full/src/components/Navbar/types.ts +37 -0
- package/templates/create-full/src/components/NotFound/index.tsx +39 -0
- package/templates/create-full/src/components/NotFound/styles.css +46 -0
- package/templates/create-full/src/components/NotFound/types.ts +8 -0
- package/templates/create-full/src/components/ProductDetail/components/ProductGallery/index.tsx +316 -0
- package/templates/create-full/src/components/ProductDetail/components/ProductGallery/styles.css +213 -0
- package/templates/create-full/src/components/ProductDetail/index.tsx +92 -0
- package/templates/create-full/src/components/ProductDetail/styles.css +58 -0
- package/templates/create-full/src/components/ProductDetail/types.ts +12 -0
- package/templates/create-full/src/components/ProductDetailAddToCart/components/PayWithIkas/index.tsx +34 -0
- package/templates/create-full/src/components/ProductDetailAddToCart/components/PayWithIkas/styles.css +4 -0
- package/templates/create-full/src/components/ProductDetailAddToCart/index.tsx +146 -0
- package/templates/create-full/src/components/ProductDetailAddToCart/styles.css +27 -0
- package/templates/create-full/src/components/ProductDetailAddToCart/types.ts +18 -0
- package/templates/create-full/src/components/ProductDetailBundleFurniture/components/BundleFurnitureRow/index.tsx +164 -0
- package/templates/create-full/src/components/ProductDetailBundleFurniture/components/BundleFurnitureSection/index.tsx +134 -0
- package/templates/create-full/src/components/ProductDetailBundleFurniture/components/BundleFurnitureSection/styles.css +188 -0
- package/templates/create-full/src/components/ProductDetailBundleFurniture/index.tsx +61 -0
- package/templates/create-full/src/components/ProductDetailBundleFurniture/styles.css +12 -0
- package/templates/create-full/src/components/ProductDetailBundleFurniture/types.ts +21 -0
- package/templates/create-full/src/components/ProductDetailBundleProduct/components/BundleProductItem/index.tsx +169 -0
- package/templates/create-full/src/components/ProductDetailBundleProduct/components/BundleProductItem/styles.css +141 -0
- package/templates/create-full/src/components/ProductDetailBundleProduct/components/BundleSkeletonLoading/index.tsx +35 -0
- package/templates/create-full/src/components/ProductDetailBundleProduct/components/BundleSkeletonLoading/styles.css +85 -0
- package/templates/create-full/src/components/ProductDetailBundleProduct/components/FurnitureRow/index.tsx +51 -0
- package/templates/create-full/src/components/ProductDetailBundleProduct/components/FurnitureRow/styles.css +30 -0
- package/templates/create-full/src/components/ProductDetailBundleProduct/components/FurnitureView/index.tsx +54 -0
- package/templates/create-full/src/components/ProductDetailBundleProduct/components/FurnitureView/styles.css +22 -0
- package/templates/create-full/src/components/ProductDetailBundleProduct/index.tsx +101 -0
- package/templates/create-full/src/components/ProductDetailBundleProduct/styles.css +20 -0
- package/templates/create-full/src/components/ProductDetailBundleProduct/types.ts +18 -0
- package/templates/create-full/src/components/ProductDetailDescription/index.tsx +56 -0
- package/templates/create-full/src/components/ProductDetailDescription/styles.css +21 -0
- package/templates/create-full/src/components/ProductDetailDescription/types.ts +13 -0
- package/templates/create-full/src/components/ProductDetailFeatureItem/index.tsx +28 -0
- package/templates/create-full/src/components/ProductDetailFeatureItem/styles.css +22 -0
- package/templates/create-full/src/components/ProductDetailFeatureItem/types.ts +7 -0
- package/templates/create-full/src/components/ProductDetailFeatures/index.tsx +40 -0
- package/templates/create-full/src/components/ProductDetailFeatures/styles.css +17 -0
- package/templates/create-full/src/components/ProductDetailFeatures/types.ts +10 -0
- package/templates/create-full/src/components/ProductDetailNameFavorite/index.tsx +66 -0
- package/templates/create-full/src/components/ProductDetailNameFavorite/styles.css +45 -0
- package/templates/create-full/src/components/ProductDetailNameFavorite/types.ts +11 -0
- package/templates/create-full/src/components/ProductDetailOffer/components/OfferCard/index.tsx +209 -0
- package/templates/create-full/src/components/ProductDetailOffer/components/OfferCard/styles.css +146 -0
- package/templates/create-full/src/components/ProductDetailOffer/components/OfferSummary/index.tsx +175 -0
- package/templates/create-full/src/components/ProductDetailOffer/index.tsx +199 -0
- package/templates/create-full/src/components/ProductDetailOffer/styles.css +211 -0
- package/templates/create-full/src/components/ProductDetailOffer/types.ts +24 -0
- package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionCheckbox/index.tsx +52 -0
- package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionCheckbox/styles.css +19 -0
- package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionChoice/components/ChoiceBox/index.tsx +60 -0
- package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionChoice/components/ChoiceBox/styles.css +38 -0
- package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionChoice/components/ChoiceSelect/index.tsx +102 -0
- package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionChoice/components/ChoiceSelect/styles.css +34 -0
- package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionChoice/components/ChoiceSwatch/index.tsx +121 -0
- package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionChoice/components/ChoiceSwatch/styles.css +87 -0
- package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionChoice/index.tsx +57 -0
- package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionColorPicker/index.tsx +54 -0
- package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionColorPicker/styles.css +0 -0
- package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionDatePicker/index.tsx +124 -0
- package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionDatePicker/styles.css +1 -0
- package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionFile/index.tsx +217 -0
- package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionFile/styles.css +87 -0
- package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionRenderer/index.tsx +133 -0
- package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionText/index.tsx +60 -0
- package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionText/styles.css +1 -0
- package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionTextarea/index.tsx +74 -0
- package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionTextarea/styles.css +10 -0
- package/templates/create-full/src/components/ProductDetailOptionSet/index.tsx +99 -0
- package/templates/create-full/src/components/ProductDetailOptionSet/styles.css +30 -0
- package/templates/create-full/src/components/ProductDetailOptionSet/types.ts +21 -0
- package/templates/create-full/src/components/ProductDetailPrices/index.tsx +62 -0
- package/templates/create-full/src/components/ProductDetailPrices/styles.css +32 -0
- package/templates/create-full/src/components/ProductDetailPrices/types.ts +10 -0
- package/templates/create-full/src/components/ProductDetailProductGroup/index.tsx +74 -0
- package/templates/create-full/src/components/ProductDetailProductGroup/styles.css +33 -0
- package/templates/create-full/src/components/ProductDetailProductGroup/types.ts +10 -0
- package/templates/create-full/src/components/ProductDetailReviews/index.tsx +205 -0
- package/templates/create-full/src/components/ProductDetailReviews/styles.css +43 -0
- package/templates/create-full/src/components/ProductDetailReviews/types.ts +19 -0
- package/templates/create-full/src/components/ProductDetailSku/index.tsx +38 -0
- package/templates/create-full/src/components/ProductDetailSku/styles.css +16 -0
- package/templates/create-full/src/components/ProductDetailSku/types.ts +11 -0
- package/templates/create-full/src/components/ProductDetailVariant/index.tsx +38 -0
- package/templates/create-full/src/components/ProductDetailVariant/styles.css +14 -0
- package/templates/create-full/src/components/ProductDetailVariant/types.ts +12 -0
- package/templates/create-full/src/components/ProductSlider/index.tsx +151 -0
- package/templates/create-full/src/components/ProductSlider/styles.css +105 -0
- package/templates/create-full/src/components/ProductSlider/types.ts +17 -0
- package/templates/create-full/src/components/RecoverPassword/components/RecoverPasswordForm/index.tsx +133 -0
- package/templates/create-full/src/components/RecoverPassword/components/RecoverPasswordForm/styles.css +0 -0
- package/templates/create-full/src/components/RecoverPassword/index.tsx +30 -0
- package/templates/create-full/src/components/RecoverPassword/styles.css +93 -0
- package/templates/create-full/src/components/RecoverPassword/types.ts +13 -0
- package/templates/create-full/src/components/Register/components/RegisterForm/index.tsx +326 -0
- package/templates/create-full/src/components/Register/components/RegisterForm/styles.css +0 -0
- package/templates/create-full/src/components/Register/index.tsx +30 -0
- package/templates/create-full/src/components/Register/styles.css +152 -0
- package/templates/create-full/src/components/Register/types.ts +27 -0
- package/templates/create-full/src/components/RichText/index.tsx +25 -0
- package/templates/create-full/src/components/RichText/styles.css +51 -0
- package/templates/create-full/src/components/RichText/types.ts +5 -0
- package/templates/create-full/src/components/SocialMediaIcon/index.tsx +26 -0
- package/templates/create-full/src/components/SocialMediaIcon/styles.css +17 -0
- package/templates/create-full/src/components/SocialMediaIcon/types.ts +7 -0
- package/templates/create-full/src/components/index.ts +50 -0
- package/templates/create-full/src/global-types.ts +13 -0
- package/templates/create-full/src/global.css +582 -0
- package/templates/create-full/src/hooks/useBundleProducts.ts +75 -0
- package/templates/create-full/src/hooks/useColumnPreference.ts +26 -0
- package/templates/create-full/src/hooks/useInfiniteScroll.ts +49 -0
- package/templates/create-full/src/hooks/usePageTracking.ts +56 -0
- package/templates/create-full/src/hooks/usePayWithIkas.ts +114 -0
- package/templates/create-full/src/hooks/useRedirectIfLoggedIn.ts +35 -0
- package/templates/create-full/src/hooks/useScrollLock.ts +20 -0
- package/templates/create-full/src/hooks/useToast.ts +27 -0
- package/templates/create-full/src/ikas-component-utils.d.ts +3 -0
- package/templates/create-full/src/sub-components/Badge/index.tsx +208 -0
- package/templates/create-full/src/sub-components/Badge/styles.css +129 -0
- package/templates/create-full/src/sub-components/Breadcrumb/index.tsx +57 -0
- package/templates/create-full/src/sub-components/Breadcrumb/styles.css +49 -0
- package/templates/create-full/src/sub-components/BundleMedia/index.tsx +72 -0
- package/templates/create-full/src/sub-components/BundleQuantityBox/index.tsx +73 -0
- package/templates/create-full/src/sub-components/BundleQuantityBox/styles.css +43 -0
- package/templates/create-full/src/sub-components/Button/index.tsx +52 -0
- package/templates/create-full/src/sub-components/Button/styles.css +114 -0
- package/templates/create-full/src/sub-components/CartItem/components/BundleProductItem/index.tsx +59 -0
- package/templates/create-full/src/sub-components/CartItem/components/BundleProductItem/styles.css +24 -0
- package/templates/create-full/src/sub-components/CartItem/components/BundleProducts/index.tsx +55 -0
- package/templates/create-full/src/sub-components/CartItem/components/BundleProducts/styles.css +30 -0
- package/templates/create-full/src/sub-components/CartItem/components/ItemOptions/index.tsx +31 -0
- package/templates/create-full/src/sub-components/CartItem/components/ItemOptions/styles.css +6 -0
- package/templates/create-full/src/sub-components/CartItem/components/OptionValueDisplay/index.tsx +79 -0
- package/templates/create-full/src/sub-components/CartItem/components/OptionValueDisplay/styles.css +28 -0
- package/templates/create-full/src/sub-components/CartItem/index.tsx +216 -0
- package/templates/create-full/src/sub-components/CartItem/styles.css +170 -0
- package/templates/create-full/src/sub-components/Checkbox/index.tsx +42 -0
- package/templates/create-full/src/sub-components/Checkbox/styles.css +65 -0
- package/templates/create-full/src/sub-components/CollapsibleGroup/index.tsx +52 -0
- package/templates/create-full/src/sub-components/CollapsibleGroup/styles.css +51 -0
- package/templates/create-full/src/sub-components/ColorInput/index.tsx +33 -0
- package/templates/create-full/src/sub-components/ColorInput/styles.css +53 -0
- package/templates/create-full/src/sub-components/ConfirmModal/index.tsx +60 -0
- package/templates/create-full/src/sub-components/ConfirmModal/styles.css +20 -0
- package/templates/create-full/src/sub-components/FormItem/index.tsx +66 -0
- package/templates/create-full/src/sub-components/FormItem/styles.css +38 -0
- package/templates/create-full/src/sub-components/ImagePreviewModal/index.tsx +55 -0
- package/templates/create-full/src/sub-components/ImagePreviewModal/styles.css +50 -0
- package/templates/create-full/src/sub-components/Input/index.tsx +69 -0
- package/templates/create-full/src/sub-components/Input/styles.css +162 -0
- package/templates/create-full/src/sub-components/Modal/index.tsx +118 -0
- package/templates/create-full/src/sub-components/Modal/styles.css +70 -0
- package/templates/create-full/src/sub-components/PageLoader/index.tsx +14 -0
- package/templates/create-full/src/sub-components/PageLoader/styles.css +12 -0
- package/templates/create-full/src/sub-components/Pagination/index.tsx +107 -0
- package/templates/create-full/src/sub-components/Pagination/styles.css +88 -0
- package/templates/create-full/src/sub-components/ProductCard/index.tsx +276 -0
- package/templates/create-full/src/sub-components/ProductCard/styles.css +99 -0
- package/templates/create-full/src/sub-components/QuantitySelector/index.tsx +41 -0
- package/templates/create-full/src/sub-components/QuantitySelector/styles.css +51 -0
- package/templates/create-full/src/sub-components/ReviewCard/index.tsx +103 -0
- package/templates/create-full/src/sub-components/ReviewCard/styles.css +95 -0
- package/templates/create-full/src/sub-components/ReviewForm/index.tsx +115 -0
- package/templates/create-full/src/sub-components/ReviewForm/styles.css +11 -0
- package/templates/create-full/src/sub-components/ReviewSummary/index.tsx +65 -0
- package/templates/create-full/src/sub-components/ReviewSummary/styles.css +86 -0
- package/templates/create-full/src/sub-components/Select/index.tsx +86 -0
- package/templates/create-full/src/sub-components/Select/styles.css +110 -0
- package/templates/create-full/src/sub-components/SkeletonField/index.tsx +12 -0
- package/templates/create-full/src/sub-components/SkeletonField/styles.css +29 -0
- package/templates/create-full/src/sub-components/SliderArrow/index.tsx +26 -0
- package/templates/create-full/src/sub-components/SliderArrow/styles.css +24 -0
- package/templates/create-full/src/sub-components/SocialLoginButton/index.tsx +24 -0
- package/templates/create-full/src/sub-components/SocialLoginButton/styles.css +19 -0
- package/templates/create-full/src/sub-components/SpinnerIcon/index.tsx +10 -0
- package/templates/create-full/src/sub-components/SpinnerIcon/styles.css +8 -0
- package/templates/create-full/src/sub-components/StarRating/index.tsx +76 -0
- package/templates/create-full/src/sub-components/StarRating/styles.css +40 -0
- package/templates/create-full/src/sub-components/Tag/index.tsx +21 -0
- package/templates/create-full/src/sub-components/Tag/styles.css +30 -0
- package/templates/create-full/src/sub-components/Textarea/index.tsx +45 -0
- package/templates/create-full/src/sub-components/Textarea/styles.css +82 -0
- package/templates/create-full/src/sub-components/Toast/index.tsx +257 -0
- package/templates/create-full/src/sub-components/Toast/styles.css +3 -0
- package/templates/create-full/src/sub-components/Toggle/index.tsx +46 -0
- package/templates/create-full/src/sub-components/Toggle/styles.css +86 -0
- package/templates/create-full/src/sub-components/VariantBadge/index.tsx +153 -0
- package/templates/create-full/src/sub-components/VariantBadge/styles.css +47 -0
- package/templates/create-full/src/sub-components/icons/index.tsx +981 -0
- package/templates/create-full/src/utils/bundle.ts +70 -0
- package/templates/create-full/src/utils/cx.ts +4 -0
- package/templates/create-full/src/utils/fullName.ts +6 -0
- package/templates/create-full/src/utils/media.ts +36 -0
- package/templates/create-full/src/utils/optionPrice.ts +19 -0
- package/templates/create-full/src/utils/optionSet.ts +17 -0
- package/templates/create-full/src/utils/orderStatus.ts +28 -0
- package/templates/create-full/src/utils/pagination.ts +29 -0
- package/templates/create-full/src/utils/toast.ts +5 -0
- package/templates/create-full/tsconfig.json +30 -0
- package/templates/create-full/vite.config.ts +15 -0
|
@@ -0,0 +1,333 @@
|
|
|
1
|
+
import {
|
|
2
|
+
useCallback,
|
|
3
|
+
useEffect,
|
|
4
|
+
useMemo,
|
|
5
|
+
useRef,
|
|
6
|
+
useState,
|
|
7
|
+
} from "preact/hooks";
|
|
8
|
+
import {
|
|
9
|
+
IkasProductListSortType,
|
|
10
|
+
getProductListSortOptions,
|
|
11
|
+
hasProductListNextPage,
|
|
12
|
+
setSortType,
|
|
13
|
+
getCategoryPath,
|
|
14
|
+
getIkasCategoryHref,
|
|
15
|
+
getFilterDisplayedValues,
|
|
16
|
+
isStockFilter,
|
|
17
|
+
hasProductListPrevPage,
|
|
18
|
+
getProductListPrevPage,
|
|
19
|
+
getProductListPage,
|
|
20
|
+
setProductListVisiblePage,
|
|
21
|
+
searchProductList,
|
|
22
|
+
getProductOptionSet,
|
|
23
|
+
IkasComponentRenderer,
|
|
24
|
+
} from "@ikas/bp-storefront";
|
|
25
|
+
import { Props } from "./types";
|
|
26
|
+
import ProductCard from "../../sub-components/ProductCard";
|
|
27
|
+
import Breadcrumb from "../../sub-components/Breadcrumb";
|
|
28
|
+
import type { BreadcrumbItem } from "../../sub-components/Breadcrumb";
|
|
29
|
+
import Button from "../../sub-components/Button";
|
|
30
|
+
import SpinnerIcon from "../../sub-components/SpinnerIcon";
|
|
31
|
+
import CategoryListControls from "./components/CategoryListControls";
|
|
32
|
+
import FilterSidebar from "./components/FilterSidebar";
|
|
33
|
+
import MobileFilterModal from "./components/MobileFilterModal";
|
|
34
|
+
import Pagination from "../../sub-components/Pagination";
|
|
35
|
+
import { useColumnPreference } from "../../hooks/useColumnPreference";
|
|
36
|
+
import { useInfiniteScroll } from "../../hooks/useInfiniteScroll";
|
|
37
|
+
import { usePageTracking } from "../../hooks/usePageTracking";
|
|
38
|
+
|
|
39
|
+
export function CategoryList(props: Props) {
|
|
40
|
+
const {
|
|
41
|
+
productList,
|
|
42
|
+
emptyMessage = "Ürün bulunamadı.",
|
|
43
|
+
searchPlaceholder = "Ara",
|
|
44
|
+
clearFiltersText = "Filtreleri Temizle",
|
|
45
|
+
addToCartText = "Sepete Ekle",
|
|
46
|
+
addedToCartText = "Eklendi",
|
|
47
|
+
outOfStockText = "Tükendi",
|
|
48
|
+
showProductsText = "ÜRÜNÜ GÖR",
|
|
49
|
+
filtersText = "Filtreler",
|
|
50
|
+
columnText = "Sütun",
|
|
51
|
+
badgeText,
|
|
52
|
+
homepageText = "Anasayfa",
|
|
53
|
+
showFilters = false,
|
|
54
|
+
showSearch = false,
|
|
55
|
+
aspectRatio,
|
|
56
|
+
objectFit,
|
|
57
|
+
isInfinity = false,
|
|
58
|
+
loadPrevPageText = "Önceki sayfayı yükle",
|
|
59
|
+
pageTitle: pageTitleProp,
|
|
60
|
+
productCountText = "ürün",
|
|
61
|
+
hideAddToCartButton,
|
|
62
|
+
hideBreadcrumb = false,
|
|
63
|
+
isBrandPage = false,
|
|
64
|
+
components,
|
|
65
|
+
} = props;
|
|
66
|
+
|
|
67
|
+
const [filterModalOpen, setFilterModalOpen] = useState(false);
|
|
68
|
+
const sectionRef = useRef<HTMLElement>(null);
|
|
69
|
+
|
|
70
|
+
const { columns, toggleColumns } = useColumnPreference();
|
|
71
|
+
const products = productList?.data ?? [];
|
|
72
|
+
|
|
73
|
+
const { sentinelRef } = useInfiniteScroll({
|
|
74
|
+
isEnabled: isInfinity,
|
|
75
|
+
productList,
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
const { gridRef } = usePageTracking({
|
|
79
|
+
isEnabled: isInfinity,
|
|
80
|
+
productList,
|
|
81
|
+
productCount: products.length,
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
useEffect(() => {
|
|
85
|
+
if (!productList) return;
|
|
86
|
+
const items = productList.data ?? [];
|
|
87
|
+
items.forEach((p) => {
|
|
88
|
+
if (!p.productOptionSet) getProductOptionSet(p);
|
|
89
|
+
});
|
|
90
|
+
}, [productList?.data?.length]);
|
|
91
|
+
|
|
92
|
+
const scrollToTop = useCallback(() => {
|
|
93
|
+
sectionRef.current?.scrollIntoView({ behavior: "smooth", block: "start" });
|
|
94
|
+
}, []);
|
|
95
|
+
|
|
96
|
+
const handleLoadPrevPage = useCallback(() => {
|
|
97
|
+
getProductListPrevPage(productList);
|
|
98
|
+
setProductListVisiblePage(productList, (productList.minPage ?? 1) - 1);
|
|
99
|
+
scrollToTop();
|
|
100
|
+
}, [productList, scrollToTop]);
|
|
101
|
+
|
|
102
|
+
const openFilterModal = useCallback(() => setFilterModalOpen(true), []);
|
|
103
|
+
const closeFilterModal = useCallback(() => setFilterModalOpen(false), []);
|
|
104
|
+
|
|
105
|
+
const handleSearch = useCallback(
|
|
106
|
+
(e: Event) => {
|
|
107
|
+
searchProductList(productList, (e.target as HTMLInputElement).value);
|
|
108
|
+
},
|
|
109
|
+
[productList],
|
|
110
|
+
);
|
|
111
|
+
|
|
112
|
+
const handleSort = useCallback(
|
|
113
|
+
(e: Event) => {
|
|
114
|
+
const value = (e.target as HTMLSelectElement).value;
|
|
115
|
+
setSortType(productList, value as IkasProductListSortType);
|
|
116
|
+
},
|
|
117
|
+
[productList],
|
|
118
|
+
);
|
|
119
|
+
|
|
120
|
+
const sortSelectOptions = useMemo(
|
|
121
|
+
() =>
|
|
122
|
+
getProductListSortOptions(productList).map((o) => ({
|
|
123
|
+
label: o.label,
|
|
124
|
+
value: o.value,
|
|
125
|
+
})),
|
|
126
|
+
[productList],
|
|
127
|
+
);
|
|
128
|
+
|
|
129
|
+
const hasVisibleFilters = useMemo(() => {
|
|
130
|
+
if (!showFilters) return false;
|
|
131
|
+
const hasFilterValues = productList?.filters?.some((filter) => {
|
|
132
|
+
const values = getFilterDisplayedValues(filter);
|
|
133
|
+
return values.length > 0 && !isStockFilter(filter);
|
|
134
|
+
});
|
|
135
|
+
const hasCategoryFilters =
|
|
136
|
+
productList?.filterCategories && productList.filterCategories.length > 0;
|
|
137
|
+
return hasFilterValues || hasCategoryFilters;
|
|
138
|
+
}, [showFilters, productList?.filters, productList?.filterCategories]);
|
|
139
|
+
|
|
140
|
+
const selectedFiltersCount = useMemo(() => {
|
|
141
|
+
const selectedCategories =
|
|
142
|
+
productList?.filterCategories?.filter((c) => c.isSelected).length ?? 0;
|
|
143
|
+
return (
|
|
144
|
+
((productList?.filters &&
|
|
145
|
+
productList.filters
|
|
146
|
+
.map((filter) => {
|
|
147
|
+
if (filter.numberRangeListOptions) {
|
|
148
|
+
return filter.numberRangeListOptions.filter((v) => v.isSelected)
|
|
149
|
+
.length;
|
|
150
|
+
}
|
|
151
|
+
const displayedValues = getFilterDisplayedValues(filter);
|
|
152
|
+
return displayedValues.filter((v) => v.isSelected).length;
|
|
153
|
+
})
|
|
154
|
+
.reduce((a, b) => a + b, 0)) ||
|
|
155
|
+
0) + selectedCategories
|
|
156
|
+
);
|
|
157
|
+
}, [productList?.filters, productList?.filterCategories]);
|
|
158
|
+
|
|
159
|
+
if (!productList) return null;
|
|
160
|
+
|
|
161
|
+
const category = productList.category;
|
|
162
|
+
const brand = productList.brand;
|
|
163
|
+
const selectedSort = getProductListSortOptions(productList).find(
|
|
164
|
+
(o) => o.isSelected,
|
|
165
|
+
);
|
|
166
|
+
const pageTitle = pageTitleProp || category?.name || brand?.name || "";
|
|
167
|
+
|
|
168
|
+
const breadcrumbItems = useMemo(() => {
|
|
169
|
+
if (!category) return [];
|
|
170
|
+
const path = getCategoryPath(category);
|
|
171
|
+
if (path.length === 0) return [];
|
|
172
|
+
return [
|
|
173
|
+
{ label: homepageText, href: "/" } as BreadcrumbItem,
|
|
174
|
+
...path.map(
|
|
175
|
+
(cat: any) =>
|
|
176
|
+
({
|
|
177
|
+
label: cat.name,
|
|
178
|
+
href: getIkasCategoryHref(cat),
|
|
179
|
+
}) as BreadcrumbItem,
|
|
180
|
+
),
|
|
181
|
+
];
|
|
182
|
+
}, [category, homepageText]);
|
|
183
|
+
|
|
184
|
+
const startPage = productList.minPage ?? productList.page ?? 1;
|
|
185
|
+
const limit = productList.limit || products.length;
|
|
186
|
+
|
|
187
|
+
return (
|
|
188
|
+
<section ref={sectionRef} className="kombos-category-list">
|
|
189
|
+
<div className="kombos-container">
|
|
190
|
+
{!hideBreadcrumb && breadcrumbItems.length > 0 && (
|
|
191
|
+
<div className="kombos-category-list__top">
|
|
192
|
+
<Breadcrumb
|
|
193
|
+
items={breadcrumbItems}
|
|
194
|
+
className="kombos-category-list__breadcrumb"
|
|
195
|
+
/>
|
|
196
|
+
</div>
|
|
197
|
+
)}
|
|
198
|
+
|
|
199
|
+
<CategoryListControls
|
|
200
|
+
pageTitle={pageTitle}
|
|
201
|
+
productCount={productList.count}
|
|
202
|
+
productCountText={productCountText}
|
|
203
|
+
sortOptions={sortSelectOptions}
|
|
204
|
+
selectedSortValue={selectedSort?.value ?? ""}
|
|
205
|
+
onSort={handleSort}
|
|
206
|
+
columns={columns}
|
|
207
|
+
onToggleColumns={toggleColumns}
|
|
208
|
+
columnText={columnText}
|
|
209
|
+
hasVisibleFilters={!!hasVisibleFilters}
|
|
210
|
+
selectedFiltersCount={selectedFiltersCount}
|
|
211
|
+
filtersText={filtersText}
|
|
212
|
+
onOpenFilterModal={openFilterModal}
|
|
213
|
+
showSearch={showSearch}
|
|
214
|
+
searchPlaceholder={searchPlaceholder}
|
|
215
|
+
searchKeyword={productList.searchKeyword ?? ""}
|
|
216
|
+
onSearch={handleSearch}
|
|
217
|
+
/>
|
|
218
|
+
|
|
219
|
+
<div className="kombos-category-list__main">
|
|
220
|
+
{hasVisibleFilters && (
|
|
221
|
+
<div className="kombos-category-list__sidebar">
|
|
222
|
+
<FilterSidebar
|
|
223
|
+
productList={productList}
|
|
224
|
+
searchPlaceholder={searchPlaceholder}
|
|
225
|
+
clearFiltersText={clearFiltersText}
|
|
226
|
+
showSearch={showSearch}
|
|
227
|
+
onFilterChange={isInfinity ? undefined : scrollToTop}
|
|
228
|
+
isBrandPage={isBrandPage}
|
|
229
|
+
/>
|
|
230
|
+
</div>
|
|
231
|
+
)}
|
|
232
|
+
|
|
233
|
+
<div className="kombos-category-list__grid-area">
|
|
234
|
+
{hasProductListPrevPage(productList) && isInfinity && (
|
|
235
|
+
<div className="kombos-category-list__prev-wrap">
|
|
236
|
+
<Button
|
|
237
|
+
size="xs"
|
|
238
|
+
disabled={productList.isLoading}
|
|
239
|
+
onClick={handleLoadPrevPage}
|
|
240
|
+
icon={productList.isLoading ? <SpinnerIcon /> : undefined}
|
|
241
|
+
>
|
|
242
|
+
{loadPrevPageText}
|
|
243
|
+
</Button>
|
|
244
|
+
</div>
|
|
245
|
+
)}
|
|
246
|
+
|
|
247
|
+
{products.length === 0 ? (
|
|
248
|
+
<p className="kombos-category-list__empty text-md-semibold">
|
|
249
|
+
{emptyMessage}
|
|
250
|
+
</p>
|
|
251
|
+
) : (
|
|
252
|
+
<div
|
|
253
|
+
ref={gridRef}
|
|
254
|
+
className={`kombos-category-list__grid kombos-category-list__grid--cols-${columns}`}
|
|
255
|
+
>
|
|
256
|
+
{products.map((product, index) => {
|
|
257
|
+
const isPageStart = isInfinity && index % limit === 0;
|
|
258
|
+
const pageNum = startPage + Math.floor(index / limit);
|
|
259
|
+
|
|
260
|
+
return (
|
|
261
|
+
<div
|
|
262
|
+
key={`${product.id}-${index}`}
|
|
263
|
+
className="kombos-category-list__card"
|
|
264
|
+
>
|
|
265
|
+
<ProductCard
|
|
266
|
+
product={product}
|
|
267
|
+
addToCartText={addToCartText}
|
|
268
|
+
addedToCartText={addedToCartText}
|
|
269
|
+
outOfStockText={outOfStockText}
|
|
270
|
+
badgeText={badgeText}
|
|
271
|
+
aspectRatio={aspectRatio}
|
|
272
|
+
objectFit={objectFit}
|
|
273
|
+
dataPage={isPageStart ? pageNum : undefined}
|
|
274
|
+
sizes={`(max-width: 767px) calc((100vw - 48px) / 2), (max-width: 1023px) calc((100vw - 88px) / 2), calc((100vw - ${columns === 3 ? 464 : 488}px) / ${columns})`}
|
|
275
|
+
hideAddToCartButton={hideAddToCartButton}
|
|
276
|
+
priority={index < 4}
|
|
277
|
+
/>
|
|
278
|
+
<IkasComponentRenderer
|
|
279
|
+
id={`category-list-product-${product.id}`}
|
|
280
|
+
components={components}
|
|
281
|
+
parentProps={props}
|
|
282
|
+
map={{ product }}
|
|
283
|
+
className="kombos-category-list__card-content"
|
|
284
|
+
/>
|
|
285
|
+
</div>
|
|
286
|
+
);
|
|
287
|
+
})}
|
|
288
|
+
</div>
|
|
289
|
+
)}
|
|
290
|
+
|
|
291
|
+
{isInfinity && hasProductListNextPage(productList) && (
|
|
292
|
+
<div
|
|
293
|
+
ref={sentinelRef}
|
|
294
|
+
className="kombos-category-list__sentinel"
|
|
295
|
+
/>
|
|
296
|
+
)}
|
|
297
|
+
|
|
298
|
+
{!isInfinity && (
|
|
299
|
+
<div className="kombos-category-list__pagination">
|
|
300
|
+
<Pagination
|
|
301
|
+
currentPage={productList.page ?? 1}
|
|
302
|
+
totalPages={Math.ceil(
|
|
303
|
+
(productList.count ?? 0) / (productList.limit || 20),
|
|
304
|
+
)}
|
|
305
|
+
hasPrev={hasProductListPrevPage(productList)}
|
|
306
|
+
hasNext={hasProductListNextPage(productList)}
|
|
307
|
+
onPageChange={(page) => {
|
|
308
|
+
getProductListPage(productList, page);
|
|
309
|
+
scrollToTop();
|
|
310
|
+
}}
|
|
311
|
+
/>
|
|
312
|
+
</div>
|
|
313
|
+
)}
|
|
314
|
+
</div>
|
|
315
|
+
</div>
|
|
316
|
+
</div>
|
|
317
|
+
|
|
318
|
+
{hasVisibleFilters && (
|
|
319
|
+
<MobileFilterModal
|
|
320
|
+
productList={productList}
|
|
321
|
+
isOpen={filterModalOpen}
|
|
322
|
+
onClose={closeFilterModal}
|
|
323
|
+
clearFiltersText={clearFiltersText}
|
|
324
|
+
showProductsText={showProductsText}
|
|
325
|
+
filtersText={filtersText}
|
|
326
|
+
isBrandPage={isBrandPage}
|
|
327
|
+
/>
|
|
328
|
+
)}
|
|
329
|
+
</section>
|
|
330
|
+
);
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
export default CategoryList;
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/* ===== Category List Section ===== */
|
|
2
|
+
.kombos-category-list {
|
|
3
|
+
width: 100%;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.kombos-category-list__prev-wrap {
|
|
7
|
+
display: flex;
|
|
8
|
+
justify-content: center;
|
|
9
|
+
margin-bottom: 1rem;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/* Top: Breadcrumb + Title */
|
|
13
|
+
.kombos-category-list__top {
|
|
14
|
+
padding-top: 1rem;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.kombos-category-list__breadcrumb {
|
|
18
|
+
margin-bottom: 0;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/* Main layout */
|
|
22
|
+
.kombos-category-list__main {
|
|
23
|
+
display: flex;
|
|
24
|
+
gap: 2rem;
|
|
25
|
+
padding-top: 1.5rem;
|
|
26
|
+
padding-bottom: 3rem;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/* Sidebar — hidden on mobile */
|
|
30
|
+
.kombos-category-list__sidebar {
|
|
31
|
+
display: none;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/* Grid area */
|
|
35
|
+
.kombos-category-list__grid-area {
|
|
36
|
+
flex: 1;
|
|
37
|
+
min-width: 0;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.kombos-category-list__grid {
|
|
41
|
+
display: grid;
|
|
42
|
+
grid-template-columns: repeat(2, 1fr);
|
|
43
|
+
gap: 1rem;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.kombos-category-list__empty {
|
|
47
|
+
color: var(--kombos-gray-900);
|
|
48
|
+
text-align: center;
|
|
49
|
+
padding: 3rem 0;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.kombos-category-list__pagination {
|
|
53
|
+
margin-top: 2rem;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.kombos-category-list__card {
|
|
57
|
+
min-width: 0;
|
|
58
|
+
display: flex;
|
|
59
|
+
flex-direction: column;
|
|
60
|
+
gap: 0.5rem;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.kombos-category-list__card-content {
|
|
64
|
+
display: flex;
|
|
65
|
+
flex-direction: column;
|
|
66
|
+
gap: 0.5rem;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/* Sentinel for IntersectionObserver (infinite scroll) */
|
|
70
|
+
.kombos-category-list__sentinel {
|
|
71
|
+
height: 1px;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/* ===== Tablet (>= 768px) ===== */
|
|
75
|
+
@media (min-width: 768px) {
|
|
76
|
+
.kombos-category-list__grid {
|
|
77
|
+
gap: 1.5rem;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/* ===== Desktop (>= 1024px) ===== */
|
|
82
|
+
@media (min-width: 1024px) {
|
|
83
|
+
.kombos-category-list__top {
|
|
84
|
+
padding-top: 1.5rem;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.kombos-category-list__main {
|
|
88
|
+
padding-top: 1.5rem;
|
|
89
|
+
padding-bottom: 4rem;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/* Show sidebar — sticky so it stays visible while scrolling */
|
|
93
|
+
.kombos-category-list__sidebar {
|
|
94
|
+
width: 15rem;
|
|
95
|
+
display: block;
|
|
96
|
+
position: sticky;
|
|
97
|
+
top: 0.75rem;
|
|
98
|
+
max-height: calc(100vh - 2.5rem);
|
|
99
|
+
overflow-y: auto;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/* Grid columns — default 4 on desktop */
|
|
103
|
+
.kombos-category-list__grid--cols-3 {
|
|
104
|
+
grid-template-columns: repeat(3, 1fr);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.kombos-category-list__grid--cols-4 {
|
|
108
|
+
grid-template-columns: repeat(4, 1fr);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// This file is auto-generated — do not edit manually.
|
|
2
|
+
import type { IkasProductList } from "@ikas/bp-storefront";
|
|
3
|
+
import type { AspectRatio, ObjectFit } from "../../global-types";
|
|
4
|
+
|
|
5
|
+
export interface Props {
|
|
6
|
+
productList: IkasProductList;
|
|
7
|
+
pageTitle?: string;
|
|
8
|
+
productCountText?: string;
|
|
9
|
+
emptyMessage?: string;
|
|
10
|
+
searchPlaceholder?: string;
|
|
11
|
+
clearFiltersText?: string;
|
|
12
|
+
addToCartText?: string;
|
|
13
|
+
addedToCartText?: string;
|
|
14
|
+
outOfStockText?: string;
|
|
15
|
+
showProductsText?: string;
|
|
16
|
+
filtersText?: string;
|
|
17
|
+
homepageText?: string;
|
|
18
|
+
badgeText?: string;
|
|
19
|
+
showFilters?: boolean;
|
|
20
|
+
showSearch?: boolean;
|
|
21
|
+
aspectRatio?: AspectRatio;
|
|
22
|
+
objectFit?: ObjectFit;
|
|
23
|
+
isInfinity?: boolean;
|
|
24
|
+
columnText?: string;
|
|
25
|
+
loadPrevPageText?: string;
|
|
26
|
+
hideAddToCartButton?: boolean;
|
|
27
|
+
components?: any;
|
|
28
|
+
hideBreadcrumb?: boolean;
|
|
29
|
+
isBrandPage?: boolean;
|
|
30
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import CollapsibleGroup from "../../sub-components/CollapsibleGroup";
|
|
2
|
+
import { Props } from "./types";
|
|
3
|
+
|
|
4
|
+
export function CollapsibleContent({
|
|
5
|
+
title,
|
|
6
|
+
description,
|
|
7
|
+
defaultOpen = false,
|
|
8
|
+
}: Props) {
|
|
9
|
+
return (
|
|
10
|
+
<div className="kombos-collapsible-content">
|
|
11
|
+
<CollapsibleGroup title={title} defaultOpen={defaultOpen}>
|
|
12
|
+
{description && (
|
|
13
|
+
<div
|
|
14
|
+
className="kombos-collapsible-content__body text-sm-regular kombos-richtext"
|
|
15
|
+
dangerouslySetInnerHTML={{ __html: description }}
|
|
16
|
+
/>
|
|
17
|
+
)}
|
|
18
|
+
</CollapsibleGroup>
|
|
19
|
+
</div>
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export default CollapsibleContent;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { useState, useEffect } from "preact/hooks";
|
|
2
|
+
import {
|
|
3
|
+
customerStore,
|
|
4
|
+
getCustomerConsentGranted,
|
|
5
|
+
handleCustomerConsentGrant,
|
|
6
|
+
waitForCustomerStoreInit,
|
|
7
|
+
} from "@ikas/bp-storefront";
|
|
8
|
+
import { XSVG } from "../../sub-components/icons";
|
|
9
|
+
import { cx } from "../../utils/cx";
|
|
10
|
+
import { Props } from "./types";
|
|
11
|
+
|
|
12
|
+
export function CookieBar({
|
|
13
|
+
cookieContent,
|
|
14
|
+
buttonText,
|
|
15
|
+
position = false,
|
|
16
|
+
showCloseIcon = false,
|
|
17
|
+
backgroundColor,
|
|
18
|
+
textColor,
|
|
19
|
+
buttonTextColor,
|
|
20
|
+
}: Props) {
|
|
21
|
+
const [dismissed, setDismissed] = useState(false);
|
|
22
|
+
const [storeReady, setStoreReady] = useState(false);
|
|
23
|
+
|
|
24
|
+
useEffect(() => {
|
|
25
|
+
waitForCustomerStoreInit(customerStore).then(() => setStoreReady(true));
|
|
26
|
+
}, []);
|
|
27
|
+
|
|
28
|
+
if (!storeReady) return null;
|
|
29
|
+
|
|
30
|
+
const hasConsent = getCustomerConsentGranted(customerStore);
|
|
31
|
+
if (hasConsent || dismissed) return null;
|
|
32
|
+
|
|
33
|
+
const positionClass = position
|
|
34
|
+
? "kombos-cookie-bar--left"
|
|
35
|
+
: "kombos-cookie-bar--right";
|
|
36
|
+
|
|
37
|
+
const cssVars = {
|
|
38
|
+
...(backgroundColor && { "--cookie-bg-color": backgroundColor }),
|
|
39
|
+
...(textColor && { "--cookie-text-color": textColor }),
|
|
40
|
+
...(buttonTextColor && { "--cookie-button-text-color": buttonTextColor }),
|
|
41
|
+
} as Record<string, string>;
|
|
42
|
+
|
|
43
|
+
return (
|
|
44
|
+
<div className={cx("kombos-cookie-bar", positionClass)} style={cssVars}>
|
|
45
|
+
<div className="kombos-cookie-bar__wrapper">
|
|
46
|
+
<div
|
|
47
|
+
className={cx(
|
|
48
|
+
"kombos-cookie-bar__top",
|
|
49
|
+
!showCloseIcon && "kombos-cookie-bar__top--has-close",
|
|
50
|
+
)}
|
|
51
|
+
>
|
|
52
|
+
<div
|
|
53
|
+
className="kombos-cookie-bar__content text-sm-regular"
|
|
54
|
+
dangerouslySetInnerHTML={{ __html: cookieContent || "" }}
|
|
55
|
+
/>
|
|
56
|
+
|
|
57
|
+
{!showCloseIcon && (
|
|
58
|
+
<button
|
|
59
|
+
className="kombos-cookie-bar__close"
|
|
60
|
+
onClick={() => setDismissed(true)}
|
|
61
|
+
aria-label="Close"
|
|
62
|
+
>
|
|
63
|
+
<XSVG />
|
|
64
|
+
</button>
|
|
65
|
+
)}
|
|
66
|
+
</div>
|
|
67
|
+
<button
|
|
68
|
+
className="kombos-cookie-bar__accept text-sm-semibold"
|
|
69
|
+
onClick={() => handleCustomerConsentGrant(customerStore)}
|
|
70
|
+
>
|
|
71
|
+
{buttonText}
|
|
72
|
+
</button>
|
|
73
|
+
</div>
|
|
74
|
+
</div>
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export default CookieBar;
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
/* ===== CookieBar Component ===== */
|
|
2
|
+
|
|
3
|
+
.kombos-cookie-bar {
|
|
4
|
+
position: fixed;
|
|
5
|
+
bottom: 1.5rem;
|
|
6
|
+
z-index: var(--kombos-z-overlay);
|
|
7
|
+
width: calc(100% - 2rem);
|
|
8
|
+
max-width: 22rem;
|
|
9
|
+
color: var(--cookie-text-color, var(--kombos-white));
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/* Position variants */
|
|
13
|
+
.kombos-cookie-bar--right {
|
|
14
|
+
right: 1rem;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.kombos-cookie-bar--left {
|
|
18
|
+
left: 1rem;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/* Wrapper */
|
|
22
|
+
.kombos-cookie-bar__wrapper {
|
|
23
|
+
display: flex;
|
|
24
|
+
flex-direction: column;
|
|
25
|
+
gap: 1rem;
|
|
26
|
+
padding: 1rem;
|
|
27
|
+
background-color: var(--cookie-bg-color, rgba(0, 0, 0, 0.7));
|
|
28
|
+
border-radius: 8px;
|
|
29
|
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
|
30
|
+
word-break: break-word;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/* Top section (content + close) */
|
|
34
|
+
.kombos-cookie-bar__top {
|
|
35
|
+
position: relative;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.kombos-cookie-bar__top--has-close {
|
|
39
|
+
padding-right: 1.5rem;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/* Rich text content */
|
|
43
|
+
.kombos-cookie-bar__content {
|
|
44
|
+
line-height: 1.5;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.kombos-cookie-bar__content a {
|
|
48
|
+
text-decoration: underline;
|
|
49
|
+
text-underline-offset: 2px;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/* Close button */
|
|
53
|
+
.kombos-cookie-bar__close {
|
|
54
|
+
position: absolute;
|
|
55
|
+
top: -0.25rem;
|
|
56
|
+
right: -0.5rem;
|
|
57
|
+
display: flex;
|
|
58
|
+
align-items: center;
|
|
59
|
+
justify-content: center;
|
|
60
|
+
padding: 0.25rem;
|
|
61
|
+
font-size: 1rem;
|
|
62
|
+
color: var(--cookie-button-text-color, var(--cookie-text-color, var(--kombos-white)));
|
|
63
|
+
background: none;
|
|
64
|
+
border: none;
|
|
65
|
+
cursor: pointer;
|
|
66
|
+
opacity: 0.8;
|
|
67
|
+
transition: opacity 0.15s ease;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.kombos-cookie-bar__close:hover {
|
|
71
|
+
opacity: 1;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/* Accept button */
|
|
75
|
+
.kombos-cookie-bar__accept {
|
|
76
|
+
align-self: flex-end;
|
|
77
|
+
padding: 0;
|
|
78
|
+
color: var(--cookie-button-text-color, var(--cookie-text-color, var(--kombos-white)));
|
|
79
|
+
background: none;
|
|
80
|
+
border: none;
|
|
81
|
+
text-decoration: underline;
|
|
82
|
+
text-underline-offset: 2px;
|
|
83
|
+
cursor: pointer;
|
|
84
|
+
opacity: 0.9;
|
|
85
|
+
transition: opacity 0.15s ease;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.kombos-cookie-bar__accept:hover {
|
|
89
|
+
opacity: 1;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/* ===== Responsive ===== */
|
|
93
|
+
|
|
94
|
+
@media (min-width: 768px) {
|
|
95
|
+
.kombos-cookie-bar {
|
|
96
|
+
bottom: 2rem;
|
|
97
|
+
max-width: 24rem;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.kombos-cookie-bar--right {
|
|
101
|
+
right: 2rem;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.kombos-cookie-bar--left {
|
|
105
|
+
left: 2rem;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.kombos-cookie-bar__wrapper {
|
|
109
|
+
padding: 1.5rem;
|
|
110
|
+
}
|
|
111
|
+
}
|