@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,64 @@
|
|
|
1
|
+
import {
|
|
2
|
+
IkasImage,
|
|
3
|
+
getDefaultSrc,
|
|
4
|
+
createMediaSrcset,
|
|
5
|
+
} from "@ikas/bp-storefront";
|
|
6
|
+
import { cx } from "../../../../utils/cx";
|
|
7
|
+
|
|
8
|
+
interface Props {
|
|
9
|
+
img: IkasImage;
|
|
10
|
+
cssClass: string;
|
|
11
|
+
objectFit: string;
|
|
12
|
+
aspectRatio?: string;
|
|
13
|
+
overlay: boolean;
|
|
14
|
+
label?: string;
|
|
15
|
+
href?: string;
|
|
16
|
+
openInNewTab?: boolean;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export default function Card({
|
|
20
|
+
img,
|
|
21
|
+
cssClass,
|
|
22
|
+
objectFit,
|
|
23
|
+
aspectRatio,
|
|
24
|
+
overlay,
|
|
25
|
+
label,
|
|
26
|
+
href,
|
|
27
|
+
openInNewTab,
|
|
28
|
+
}: Props) {
|
|
29
|
+
const cardClass = cx("kombos-category-image-item__card", cssClass);
|
|
30
|
+
const Tag = href ? "a" : "div";
|
|
31
|
+
const linkProps = href
|
|
32
|
+
? {
|
|
33
|
+
href,
|
|
34
|
+
target: openInNewTab ? "_blank" : undefined,
|
|
35
|
+
rel: openInNewTab ? "noopener noreferrer" : undefined,
|
|
36
|
+
}
|
|
37
|
+
: {};
|
|
38
|
+
|
|
39
|
+
return (
|
|
40
|
+
<Tag className={cardClass} {...linkProps}>
|
|
41
|
+
<div
|
|
42
|
+
className="kombos-category-image-item__img-wrap"
|
|
43
|
+
style={aspectRatio ? { aspectRatio, height: "auto" } : undefined}
|
|
44
|
+
>
|
|
45
|
+
<img
|
|
46
|
+
className="kombos-category-image-item__img"
|
|
47
|
+
src={getDefaultSrc(img)}
|
|
48
|
+
srcSet={createMediaSrcset(img)}
|
|
49
|
+
sizes="(max-width: 1023px) 100vw, 50vw"
|
|
50
|
+
alt={label ? "" : img.altText || "Category"}
|
|
51
|
+
style={{ objectFit }}
|
|
52
|
+
loading="lazy"
|
|
53
|
+
decoding="async"
|
|
54
|
+
/>
|
|
55
|
+
</div>
|
|
56
|
+
{overlay && <div className="kombos-category-image-item__overlay" />}
|
|
57
|
+
{label && (
|
|
58
|
+
<span className="kombos-category-image-item__label display-xs-semibold md:display-sm-semibold">
|
|
59
|
+
{label}
|
|
60
|
+
</span>
|
|
61
|
+
)}
|
|
62
|
+
</Tag>
|
|
63
|
+
);
|
|
64
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
.kombos-category-image-item__card {
|
|
2
|
+
position: relative;
|
|
3
|
+
overflow: hidden;
|
|
4
|
+
height: 100%;
|
|
5
|
+
text-decoration: none;
|
|
6
|
+
color: inherit;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.kombos-category-image-item__card--desktop {
|
|
10
|
+
display: none;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.kombos-category-image-item__card--mobile {
|
|
14
|
+
display: block;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.kombos-category-image-item__img-wrap {
|
|
18
|
+
width: 100%;
|
|
19
|
+
height: 100%;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.kombos-category-image-item__img {
|
|
23
|
+
display: block;
|
|
24
|
+
width: 100%;
|
|
25
|
+
height: 100%;
|
|
26
|
+
transition: transform 0.4s ease;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.kombos-category-image-item__overlay {
|
|
30
|
+
position: absolute;
|
|
31
|
+
inset: 0;
|
|
32
|
+
background: rgba(0, 0, 0, 0.2);
|
|
33
|
+
pointer-events: none;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.kombos-category-image-item__label {
|
|
37
|
+
position: absolute;
|
|
38
|
+
inset: 0;
|
|
39
|
+
display: flex;
|
|
40
|
+
align-items: center;
|
|
41
|
+
justify-content: center;
|
|
42
|
+
color: var(--kombos-white);
|
|
43
|
+
text-align: center;
|
|
44
|
+
pointer-events: none;
|
|
45
|
+
padding: 1.5rem;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
@media (min-width: 1024px) {
|
|
49
|
+
.kombos-category-image-item__card--desktop {
|
|
50
|
+
display: block;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.kombos-category-image-item__card--mobile {
|
|
54
|
+
display: none;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { Props } from "./types";
|
|
2
|
+
import { resolveAspectRatio, resolveObjectFit } from "../../utils/media";
|
|
3
|
+
import Card from "./components/Card";
|
|
4
|
+
|
|
5
|
+
export function CategoryImageItem({
|
|
6
|
+
image,
|
|
7
|
+
link,
|
|
8
|
+
overlay = false,
|
|
9
|
+
aspectRatio,
|
|
10
|
+
objectFit,
|
|
11
|
+
mobileImage,
|
|
12
|
+
mobileLink,
|
|
13
|
+
mobileOverlay,
|
|
14
|
+
mobileAspectRatio,
|
|
15
|
+
mobileObjectFit,
|
|
16
|
+
}: Props) {
|
|
17
|
+
const desktopImg = image || mobileImage;
|
|
18
|
+
const mobileImg = mobileImage || image;
|
|
19
|
+
|
|
20
|
+
if (!desktopImg && !mobileImg) return null;
|
|
21
|
+
|
|
22
|
+
const desktopFit = resolveObjectFit(objectFit);
|
|
23
|
+
const mobileFit = mobileObjectFit
|
|
24
|
+
? resolveObjectFit(mobileObjectFit)
|
|
25
|
+
: desktopFit;
|
|
26
|
+
|
|
27
|
+
const desktopAR = aspectRatio ? resolveAspectRatio(aspectRatio) : undefined;
|
|
28
|
+
const mobileAR = mobileAspectRatio
|
|
29
|
+
? resolveAspectRatio(mobileAspectRatio)
|
|
30
|
+
: desktopAR;
|
|
31
|
+
|
|
32
|
+
const mobOverlay = mobileOverlay ?? overlay;
|
|
33
|
+
|
|
34
|
+
return (
|
|
35
|
+
<div className="kombos-category-image-item">
|
|
36
|
+
{desktopImg && (
|
|
37
|
+
<Card
|
|
38
|
+
img={desktopImg}
|
|
39
|
+
cssClass="kombos-category-image-item__card--desktop"
|
|
40
|
+
objectFit={desktopFit}
|
|
41
|
+
aspectRatio={desktopAR}
|
|
42
|
+
overlay={overlay}
|
|
43
|
+
label={link?.label}
|
|
44
|
+
href={link?.href || undefined}
|
|
45
|
+
openInNewTab={link?.openInNewTab}
|
|
46
|
+
/>
|
|
47
|
+
)}
|
|
48
|
+
{mobileImg && (
|
|
49
|
+
<Card
|
|
50
|
+
img={mobileImg}
|
|
51
|
+
cssClass="kombos-category-image-item__card--mobile"
|
|
52
|
+
objectFit={mobileFit}
|
|
53
|
+
aspectRatio={mobileAR}
|
|
54
|
+
overlay={mobOverlay}
|
|
55
|
+
label={mobileLink?.label}
|
|
56
|
+
href={mobileLink?.href || undefined}
|
|
57
|
+
openInNewTab={mobileLink?.openInNewTab}
|
|
58
|
+
/>
|
|
59
|
+
)}
|
|
60
|
+
</div>
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export default CategoryImageItem;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// This file is auto-generated — do not edit manually.
|
|
2
|
+
import type { IkasImage, IkasNavigationLink } from "@ikas/bp-storefront";
|
|
3
|
+
import type { AspectRatio, ObjectFit } from "../../global-types";
|
|
4
|
+
|
|
5
|
+
export interface Props {
|
|
6
|
+
image?: IkasImage | null;
|
|
7
|
+
link?: IkasNavigationLink | null;
|
|
8
|
+
overlay?: boolean;
|
|
9
|
+
aspectRatio?: AspectRatio;
|
|
10
|
+
objectFit?: ObjectFit;
|
|
11
|
+
mobileImage?: IkasImage | null;
|
|
12
|
+
mobileLink?: IkasNavigationLink | null;
|
|
13
|
+
mobileOverlay?: boolean;
|
|
14
|
+
mobileAspectRatio?: AspectRatio;
|
|
15
|
+
mobileObjectFit?: ObjectFit;
|
|
16
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
// import { IkasComponentRenderer } from "@ikas/bp-storefront";
|
|
2
|
+
import { IkasComponentRenderer } from "@ikas/bp-storefront";
|
|
3
|
+
import { Props } from "./types";
|
|
4
|
+
|
|
5
|
+
const COLUMNS_MAP: Record<Props["desktopColumns"] & string, number> = {
|
|
6
|
+
One: 1,
|
|
7
|
+
Two: 2,
|
|
8
|
+
Three: 3,
|
|
9
|
+
Four: 4,
|
|
10
|
+
Five: 5,
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export function CategoryImages(props: Props) {
|
|
14
|
+
const {
|
|
15
|
+
title,
|
|
16
|
+
titleColor,
|
|
17
|
+
backgroundColor,
|
|
18
|
+
desktopColumns,
|
|
19
|
+
mobileColumns,
|
|
20
|
+
components,
|
|
21
|
+
} = props;
|
|
22
|
+
|
|
23
|
+
const count = components?.length ?? 0;
|
|
24
|
+
if (count === 0) return null;
|
|
25
|
+
|
|
26
|
+
const desktopCols = desktopColumns ? COLUMNS_MAP[desktopColumns] : count;
|
|
27
|
+
const mobileCols = mobileColumns ? COLUMNS_MAP[mobileColumns] : 1;
|
|
28
|
+
|
|
29
|
+
return (
|
|
30
|
+
<section
|
|
31
|
+
className="kombos-category-images"
|
|
32
|
+
style={backgroundColor ? { backgroundColor } : undefined}
|
|
33
|
+
>
|
|
34
|
+
<div className="kombos-category-images__container kombos-container">
|
|
35
|
+
{title && (
|
|
36
|
+
<h2
|
|
37
|
+
className="kombos-category-images__title text-xl-medium md:display-xs-medium"
|
|
38
|
+
style={titleColor ? { color: titleColor } : undefined}
|
|
39
|
+
>
|
|
40
|
+
{title}
|
|
41
|
+
</h2>
|
|
42
|
+
)}
|
|
43
|
+
|
|
44
|
+
<div
|
|
45
|
+
className="kombos-category-images__grid"
|
|
46
|
+
style={{
|
|
47
|
+
"--desktop-cols": String(desktopCols),
|
|
48
|
+
"--mobile-cols": String(mobileCols),
|
|
49
|
+
}}
|
|
50
|
+
>
|
|
51
|
+
<IkasComponentRenderer
|
|
52
|
+
id="category-images"
|
|
53
|
+
components={components}
|
|
54
|
+
parentProps={props}
|
|
55
|
+
/>
|
|
56
|
+
</div>
|
|
57
|
+
</div>
|
|
58
|
+
</section>
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export default CategoryImages;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
.kombos-category-images {
|
|
2
|
+
width: 100%;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
/* Mobile-first: base = mobile (375px) */
|
|
6
|
+
.kombos-category-images__container {
|
|
7
|
+
display: flex;
|
|
8
|
+
flex-direction: column;
|
|
9
|
+
gap: 1.25rem;
|
|
10
|
+
padding-top: 1rem;
|
|
11
|
+
padding-bottom: 1rem;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.kombos-category-images__title {
|
|
15
|
+
margin: 0;
|
|
16
|
+
color: var(--kombos-gray-900);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.kombos-category-images__grid {
|
|
20
|
+
display: grid;
|
|
21
|
+
grid-template-columns: repeat(var(--mobile-cols, 1), 1fr);
|
|
22
|
+
grid-auto-rows: 1fr;
|
|
23
|
+
gap: 1rem;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/* Desktop */
|
|
27
|
+
@media (min-width: 1024px) {
|
|
28
|
+
.kombos-category-images__container {
|
|
29
|
+
gap: 2rem;
|
|
30
|
+
padding-top: 2rem;
|
|
31
|
+
padding-bottom: 2rem;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.kombos-category-images__grid {
|
|
35
|
+
grid-template-columns: repeat(var(--desktop-cols, 4), 1fr);
|
|
36
|
+
gap: 1.5rem;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// This file is auto-generated — do not edit manually.
|
|
2
|
+
import type { NumberOfColumns } from "../../global-types";
|
|
3
|
+
|
|
4
|
+
export interface Props {
|
|
5
|
+
title?: string;
|
|
6
|
+
titleColor?: string;
|
|
7
|
+
backgroundColor?: string;
|
|
8
|
+
desktopColumns?: NumberOfColumns;
|
|
9
|
+
mobileColumns?: NumberOfColumns;
|
|
10
|
+
components?: any;
|
|
11
|
+
}
|
package/templates/create-full/src/components/CategoryList/components/CategoryListControls/index.tsx
ADDED
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { observer } from "@ikas/component-utils";
|
|
2
|
+
import Select from "../../../../sub-components/Select";
|
|
3
|
+
import Button from "../../../../sub-components/Button";
|
|
4
|
+
import Input from "../../../../sub-components/Input";
|
|
5
|
+
import {
|
|
6
|
+
SlidersHorizontalSVG,
|
|
7
|
+
Column3SVG,
|
|
8
|
+
Column4SVG,
|
|
9
|
+
MagnifyingGlass1SVG,
|
|
10
|
+
} from "../../../../sub-components/icons";
|
|
11
|
+
|
|
12
|
+
interface Props {
|
|
13
|
+
pageTitle: string;
|
|
14
|
+
productCount: number;
|
|
15
|
+
productCountText: string;
|
|
16
|
+
sortOptions: { label: string; value: string }[];
|
|
17
|
+
selectedSortValue: string;
|
|
18
|
+
onSort: (e: Event) => void;
|
|
19
|
+
columns: 3 | 4;
|
|
20
|
+
onToggleColumns: () => void;
|
|
21
|
+
columnText: string;
|
|
22
|
+
hasVisibleFilters: boolean;
|
|
23
|
+
selectedFiltersCount: number;
|
|
24
|
+
filtersText: string;
|
|
25
|
+
onOpenFilterModal: () => void;
|
|
26
|
+
showSearch: boolean;
|
|
27
|
+
searchPlaceholder: string;
|
|
28
|
+
searchKeyword: string;
|
|
29
|
+
onSearch: (e: Event) => void;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const CategoryListControls = observer(function CategoryListControls({
|
|
33
|
+
pageTitle,
|
|
34
|
+
productCount,
|
|
35
|
+
productCountText,
|
|
36
|
+
sortOptions,
|
|
37
|
+
selectedSortValue,
|
|
38
|
+
onSort,
|
|
39
|
+
columns,
|
|
40
|
+
onToggleColumns,
|
|
41
|
+
columnText,
|
|
42
|
+
hasVisibleFilters,
|
|
43
|
+
selectedFiltersCount,
|
|
44
|
+
filtersText,
|
|
45
|
+
onOpenFilterModal,
|
|
46
|
+
showSearch,
|
|
47
|
+
searchPlaceholder,
|
|
48
|
+
searchKeyword,
|
|
49
|
+
onSearch,
|
|
50
|
+
}: Props) {
|
|
51
|
+
return (
|
|
52
|
+
<div className="kombos-category-list-controls">
|
|
53
|
+
{pageTitle && (
|
|
54
|
+
<h1 className="kombos-category-list-controls__title display-xs-medium md:display-sm-medium">
|
|
55
|
+
{pageTitle}
|
|
56
|
+
{productCount > 0 && (
|
|
57
|
+
<span className="kombos-category-list-controls__count text-md-regular">
|
|
58
|
+
({productCount} {productCountText})
|
|
59
|
+
</span>
|
|
60
|
+
)}
|
|
61
|
+
</h1>
|
|
62
|
+
)}
|
|
63
|
+
|
|
64
|
+
{sortOptions.length > 0 && (
|
|
65
|
+
<div className="kombos-category-list-controls__sort-wrap">
|
|
66
|
+
<Select
|
|
67
|
+
size="xs"
|
|
68
|
+
options={sortOptions}
|
|
69
|
+
value={selectedSortValue}
|
|
70
|
+
onChange={onSort}
|
|
71
|
+
aria-label="Sort by"
|
|
72
|
+
/>
|
|
73
|
+
</div>
|
|
74
|
+
)}
|
|
75
|
+
|
|
76
|
+
<Button
|
|
77
|
+
variant="secondary"
|
|
78
|
+
size="xs"
|
|
79
|
+
className="kombos-category-list-controls__col-btn"
|
|
80
|
+
onClick={onToggleColumns}
|
|
81
|
+
aria-label={`${columns === 4 ? 3 : 4} sütun`}
|
|
82
|
+
icon={columns === 3 ? <Column3SVG /> : <Column4SVG />}
|
|
83
|
+
>
|
|
84
|
+
{columnText}
|
|
85
|
+
</Button>
|
|
86
|
+
|
|
87
|
+
<div className="kombos-category-list-controls__mobile-controls">
|
|
88
|
+
{sortOptions.length > 0 && (
|
|
89
|
+
<div className="kombos-category-list-controls__mobile-sort-wrap">
|
|
90
|
+
<Select
|
|
91
|
+
size="xs"
|
|
92
|
+
className="kombos-category-list-controls__mobile-sort-select"
|
|
93
|
+
options={sortOptions}
|
|
94
|
+
value={selectedSortValue}
|
|
95
|
+
onChange={onSort}
|
|
96
|
+
aria-label="Sort by"
|
|
97
|
+
/>
|
|
98
|
+
</div>
|
|
99
|
+
)}
|
|
100
|
+
{hasVisibleFilters && (
|
|
101
|
+
<Button
|
|
102
|
+
variant="secondary"
|
|
103
|
+
size="xs"
|
|
104
|
+
className="kombos-category-list-controls__filter-btn"
|
|
105
|
+
onClick={onOpenFilterModal}
|
|
106
|
+
icon={<SlidersHorizontalSVG />}
|
|
107
|
+
>
|
|
108
|
+
{filtersText}
|
|
109
|
+
{selectedFiltersCount > 0 && ` (${selectedFiltersCount})`}
|
|
110
|
+
</Button>
|
|
111
|
+
)}
|
|
112
|
+
</div>
|
|
113
|
+
|
|
114
|
+
{showSearch && (
|
|
115
|
+
<div className="kombos-category-list-controls__mobile-search">
|
|
116
|
+
<Input
|
|
117
|
+
leftIcon={<MagnifyingGlass1SVG />}
|
|
118
|
+
placeholder={searchPlaceholder}
|
|
119
|
+
value={searchKeyword}
|
|
120
|
+
onInput={onSearch}
|
|
121
|
+
size="xs"
|
|
122
|
+
/>
|
|
123
|
+
</div>
|
|
124
|
+
)}
|
|
125
|
+
</div>
|
|
126
|
+
);
|
|
127
|
+
});
|
|
128
|
+
|
|
129
|
+
export default CategoryListControls;
|
package/templates/create-full/src/components/CategoryList/components/CategoryListControls/styles.css
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/* ===== CategoryListControls ===== */
|
|
2
|
+
|
|
3
|
+
.kombos-category-list-controls {
|
|
4
|
+
display: flex;
|
|
5
|
+
align-items: center;
|
|
6
|
+
justify-content: flex-end;
|
|
7
|
+
flex-wrap: wrap;
|
|
8
|
+
padding-top: 1rem;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.kombos-category-list-controls__title {
|
|
12
|
+
color: var(--kombos-gray-900);
|
|
13
|
+
margin: 0 0 0.75rem;
|
|
14
|
+
width: 100%;
|
|
15
|
+
display: flex;
|
|
16
|
+
align-items: center;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.kombos-category-list-controls__count {
|
|
20
|
+
color: var(--kombos-gray-500);
|
|
21
|
+
margin-left: 0.5rem;
|
|
22
|
+
margin-top: 0.375rem;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/* Desktop sort — hidden on mobile */
|
|
26
|
+
.kombos-category-list-controls__sort-wrap {
|
|
27
|
+
display: none;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/* Column toggle — hidden on mobile */
|
|
31
|
+
.kombos-category-list-controls__col-btn {
|
|
32
|
+
display: none;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/* Mobile controls */
|
|
36
|
+
.kombos-category-list-controls__mobile-controls {
|
|
37
|
+
display: grid;
|
|
38
|
+
grid-template-columns: 1fr 1fr;
|
|
39
|
+
gap: 1.5rem;
|
|
40
|
+
width: 100%;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.kombos-category-list-controls__mobile-sort-wrap {
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.kombos-category-list-controls__mobile-sort-select {
|
|
47
|
+
width: 100%;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.kombos-category-list-controls__filter-btn {
|
|
51
|
+
flex: 1;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.kombos-category-list-controls__filter-btn .kombos-icon {
|
|
55
|
+
font-size: 1rem;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/* Mobile search — visible on mobile, hidden on desktop */
|
|
59
|
+
.kombos-category-list-controls__mobile-search {
|
|
60
|
+
width: 100%;
|
|
61
|
+
margin-top: 0.75rem;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/* ===== Desktop (>= 1024px) ===== */
|
|
65
|
+
@media (min-width: 1024px) {
|
|
66
|
+
.kombos-category-list-controls {
|
|
67
|
+
padding-top: 1.5rem;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/* Title inline on the left */
|
|
71
|
+
.kombos-category-list-controls__title {
|
|
72
|
+
width: auto;
|
|
73
|
+
margin: 0;
|
|
74
|
+
margin-right: auto;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/* Show desktop sort, hide mobile controls */
|
|
78
|
+
.kombos-category-list-controls__sort-wrap {
|
|
79
|
+
display: block;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.kombos-category-list-controls__mobile-controls {
|
|
83
|
+
display: none;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.kombos-category-list-controls__mobile-search {
|
|
87
|
+
display: none;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/* Column toggle button */
|
|
91
|
+
.kombos-category-list-controls__col-btn {
|
|
92
|
+
display: flex;
|
|
93
|
+
margin-left: 0.5rem;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.kombos-category-list-controls__col-btn .kombos-icon {
|
|
97
|
+
font-size: 1.25rem;
|
|
98
|
+
}
|
|
99
|
+
}
|
package/templates/create-full/src/components/CategoryList/components/FilterBoxValues/index.tsx
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import {
|
|
2
|
+
IkasProductList,
|
|
3
|
+
IkasProductFilter,
|
|
4
|
+
IkasApplicableProductFilterValue,
|
|
5
|
+
handleFilterValueClick,
|
|
6
|
+
} from "@ikas/bp-storefront";
|
|
7
|
+
import { observer } from "@ikas/component-utils";
|
|
8
|
+
import { cx } from "../../../../utils/cx";
|
|
9
|
+
|
|
10
|
+
interface Props {
|
|
11
|
+
productList: IkasProductList;
|
|
12
|
+
filter: IkasProductFilter;
|
|
13
|
+
values: IkasApplicableProductFilterValue[];
|
|
14
|
+
onFilterChange?: () => void;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const FilterBoxValues = observer(function FilterBoxValues({
|
|
18
|
+
productList,
|
|
19
|
+
filter,
|
|
20
|
+
values,
|
|
21
|
+
onFilterChange,
|
|
22
|
+
}: Props) {
|
|
23
|
+
return (
|
|
24
|
+
<div className="kombos-filter-box-values">
|
|
25
|
+
{values.map((fv) => (
|
|
26
|
+
<button
|
|
27
|
+
key={fv.name}
|
|
28
|
+
type="button"
|
|
29
|
+
className={cx("kombos-filter-box-values__item", "text-md-medium", fv.isSelected === true && "kombos-filter-box-values__item--active")}
|
|
30
|
+
onClick={() => {
|
|
31
|
+
handleFilterValueClick(productList, filter, fv);
|
|
32
|
+
onFilterChange?.();
|
|
33
|
+
}}
|
|
34
|
+
>
|
|
35
|
+
{fv.name}
|
|
36
|
+
</button>
|
|
37
|
+
))}
|
|
38
|
+
</div>
|
|
39
|
+
);
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
export default FilterBoxValues;
|
package/templates/create-full/src/components/CategoryList/components/FilterBoxValues/styles.css
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/* ===== Filter Box Values ===== */
|
|
2
|
+
|
|
3
|
+
.kombos-filter-box-values {
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-wrap: wrap;
|
|
6
|
+
gap: 0.5rem;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.kombos-filter-box-values__item {
|
|
10
|
+
padding: 0.3125rem 0.6875rem;
|
|
11
|
+
border-radius: 6px;
|
|
12
|
+
border: 1px solid var(--kombos-gray-200);
|
|
13
|
+
background: var(--kombos-white);
|
|
14
|
+
color: var(--kombos-gray-700);
|
|
15
|
+
cursor: pointer;
|
|
16
|
+
transition: all 0.15s ease;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.kombos-filter-box-values__item:hover:not(.kombos-filter-box-values__item--active) {
|
|
20
|
+
border-color: var(--kombos-gray-300);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.kombos-filter-box-values__item--active {
|
|
24
|
+
background: var(--kombos-gray-900);
|
|
25
|
+
color: var(--kombos-white);
|
|
26
|
+
border-color: var(--kombos-gray-900);
|
|
27
|
+
}
|
package/templates/create-full/src/components/CategoryList/components/FilterCategoryList/index.tsx
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import {
|
|
2
|
+
IkasProductList,
|
|
3
|
+
IkasFilterCategory,
|
|
4
|
+
onFilterCategoryClick,
|
|
5
|
+
} from "@ikas/bp-storefront";
|
|
6
|
+
import { observer } from "@ikas/component-utils";
|
|
7
|
+
import { cx } from "../../../../utils/cx";
|
|
8
|
+
|
|
9
|
+
interface Props {
|
|
10
|
+
productList: IkasProductList;
|
|
11
|
+
categories: IkasFilterCategory[];
|
|
12
|
+
className?: string;
|
|
13
|
+
onFilterChange?: () => void;
|
|
14
|
+
isBrandPage?: boolean;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const FilterCategoryList = observer(function FilterCategoryList({
|
|
18
|
+
productList,
|
|
19
|
+
categories,
|
|
20
|
+
className,
|
|
21
|
+
onFilterChange,
|
|
22
|
+
isBrandPage = false,
|
|
23
|
+
}: Props) {
|
|
24
|
+
return (
|
|
25
|
+
<div className={cx("kombos-filter-category-list", className)}>
|
|
26
|
+
{categories.map((cat) => (
|
|
27
|
+
<button
|
|
28
|
+
key={cat.name}
|
|
29
|
+
type="button"
|
|
30
|
+
className="kombos-filter-category-list__link text-sm-medium"
|
|
31
|
+
onClick={() => {
|
|
32
|
+
onFilterCategoryClick(productList, cat, isBrandPage);
|
|
33
|
+
onFilterChange?.();
|
|
34
|
+
}}
|
|
35
|
+
>
|
|
36
|
+
{cat.name}
|
|
37
|
+
</button>
|
|
38
|
+
))}
|
|
39
|
+
</div>
|
|
40
|
+
);
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
export default FilterCategoryList;
|
package/templates/create-full/src/components/CategoryList/components/FilterCategoryList/styles.css
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/* ===== Filter Category List ===== */
|
|
2
|
+
.kombos-filter-category-list {
|
|
3
|
+
display: flex;
|
|
4
|
+
flex-direction: column;
|
|
5
|
+
gap: 0.5rem;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.kombos-filter-category-list__link {
|
|
9
|
+
background: none;
|
|
10
|
+
border: none;
|
|
11
|
+
cursor: pointer;
|
|
12
|
+
padding: 0;
|
|
13
|
+
text-align: left;
|
|
14
|
+
color: var(--kombos-gray-700);
|
|
15
|
+
width: fit-content;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.kombos-filter-category-list__link:hover {
|
|
19
|
+
text-decoration: underline;
|
|
20
|
+
}
|