@ikas/component-cli 0.133.0 → 1.2.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/create.d.ts +8 -3
- package/dist/commands/create.d.ts.map +1 -1
- package/dist/commands/create.js +8 -227
- package/dist/commands/create.js.map +1 -1
- package/dist/commands/dev.d.ts.map +1 -1
- package/dist/commands/dev.js +120 -31
- package/dist/commands/dev.js.map +1 -1
- package/dist/commands/proxy.d.ts.map +1 -1
- package/dist/commands/proxy.js +5 -1
- package/dist/commands/proxy.js.map +1 -1
- package/package.json +4 -5
- package/bin/create-ikas-component.js +0 -8
- package/templates/create/README.md +0 -50
- package/templates/create/claude-md +0 -275
- package/templates/create/cursorrules +0 -123
- package/templates/create/gitignore +0 -6
- package/templates/create/ikas.config.json +0 -95
- package/templates/create/mcp.json +0 -10
- package/templates/create/package.json +0 -22
- package/templates/create/src/components/ExampleComponent/index.tsx +0 -22
- package/templates/create/src/components/ExampleComponent/styles.css +0 -36
- package/templates/create/src/components/ExampleComponent/types.ts +0 -7
- package/templates/create/src/components/ExampleSection/index.tsx +0 -14
- package/templates/create/src/components/ExampleSection/styles.css +0 -29
- package/templates/create/src/components/ExampleSection/types.ts +0 -6
- package/templates/create/src/components/index.ts +0 -2
- package/templates/create/src/global-types.ts +0 -5
- package/templates/create/src/global.css +0 -29
- package/templates/create/src/ikas-component-utils.d.ts +0 -3
- package/templates/create/tsconfig.json +0 -30
- package/templates/create/vite.config.ts +0 -15
- package/templates/create-full/README.md +0 -78
- package/templates/create-full/claude-md +0 -752
- package/templates/create-full/cursorrules +0 -117
- package/templates/create-full/gitignore +0 -4
- package/templates/create-full/ikas.config.json +0 -5009
- package/templates/create-full/mcp.json +0 -10
- package/templates/create-full/package.json +0 -23
- package/templates/create-full/src/components/AccountAddresses/components/AddressCard/index.tsx +0 -55
- package/templates/create-full/src/components/AccountAddresses/components/AddressCard/styles.css +0 -46
- package/templates/create-full/src/components/AccountAddresses/components/AddressModal/index.tsx +0 -298
- package/templates/create-full/src/components/AccountAddresses/components/AddressModal/styles.css +0 -23
- package/templates/create-full/src/components/AccountAddresses/index.tsx +0 -127
- package/templates/create-full/src/components/AccountAddresses/styles.css +0 -41
- package/templates/create-full/src/components/AccountAddresses/types.ts +0 -15
- package/templates/create-full/src/components/AccountFavorites/index.tsx +0 -82
- package/templates/create-full/src/components/AccountFavorites/styles.css +0 -52
- package/templates/create-full/src/components/AccountFavorites/types.ts +0 -7
- package/templates/create-full/src/components/AccountInfo/components/AccountSidebar/index.tsx +0 -171
- package/templates/create-full/src/components/AccountInfo/components/AccountSidebar/styles.css +0 -144
- package/templates/create-full/src/components/AccountInfo/index.tsx +0 -91
- package/templates/create-full/src/components/AccountInfo/styles.css +0 -35
- package/templates/create-full/src/components/AccountInfo/types.ts +0 -9
- package/templates/create-full/src/components/AccountInfoContent/index.tsx +0 -134
- package/templates/create-full/src/components/AccountInfoContent/styles.css +0 -57
- package/templates/create-full/src/components/AccountInfoContent/types.ts +0 -8
- package/templates/create-full/src/components/AccountOrderDetail/components/OrderHeader/index.tsx +0 -78
- package/templates/create-full/src/components/AccountOrderDetail/components/OrderHeader/styles.css +0 -46
- package/templates/create-full/src/components/AccountOrderDetail/components/OrderItemRow/index.tsx +0 -20
- package/templates/create-full/src/components/AccountOrderDetail/components/OrderItemRow/styles.css +0 -16
- package/templates/create-full/src/components/AccountOrderDetail/components/OrderLineItemDisplay/index.tsx +0 -112
- package/templates/create-full/src/components/AccountOrderDetail/components/OrderLineItemDisplay/styles.css +0 -86
- package/templates/create-full/src/components/AccountOrderDetail/components/OrderSidebar/index.tsx +0 -195
- package/templates/create-full/src/components/AccountOrderDetail/components/OrderSidebar/styles.css +0 -93
- package/templates/create-full/src/components/AccountOrderDetail/components/PackageGroup/index.tsx +0 -156
- package/templates/create-full/src/components/AccountOrderDetail/components/PackageGroup/styles.css +0 -100
- package/templates/create-full/src/components/AccountOrderDetail/components/ReturnItemRow/index.tsx +0 -56
- package/templates/create-full/src/components/AccountOrderDetail/components/ReturnItemRow/styles.css +0 -57
- package/templates/create-full/src/components/AccountOrderDetail/components/ReturnView/index.tsx +0 -159
- package/templates/create-full/src/components/AccountOrderDetail/components/ReturnView/styles.css +0 -29
- package/templates/create-full/src/components/AccountOrderDetail/index.tsx +0 -244
- package/templates/create-full/src/components/AccountOrderDetail/styles.css +0 -125
- package/templates/create-full/src/components/AccountOrderDetail/types.ts +0 -32
- package/templates/create-full/src/components/AccountOrders/components/OrderCard/index.tsx +0 -122
- package/templates/create-full/src/components/AccountOrders/components/OrderCard/styles.css +0 -114
- package/templates/create-full/src/components/AccountOrders/index.tsx +0 -105
- package/templates/create-full/src/components/AccountOrders/styles.css +0 -36
- package/templates/create-full/src/components/AccountOrders/types.ts +0 -11
- package/templates/create-full/src/components/Announcement/index.tsx +0 -11
- package/templates/create-full/src/components/Announcement/styles.css +0 -4
- package/templates/create-full/src/components/Announcement/types.ts +0 -4
- package/templates/create-full/src/components/Announcements/index.tsx +0 -91
- package/templates/create-full/src/components/Announcements/styles.css +0 -46
- package/templates/create-full/src/components/Announcements/types.ts +0 -8
- package/templates/create-full/src/components/BlogHome/components/BlogCard/index.tsx +0 -89
- package/templates/create-full/src/components/BlogHome/components/BlogCard/styles.css +0 -121
- package/templates/create-full/src/components/BlogHome/index.tsx +0 -124
- package/templates/create-full/src/components/BlogHome/styles.css +0 -118
- package/templates/create-full/src/components/BlogHome/types.ts +0 -15
- package/templates/create-full/src/components/BlogPost/index.tsx +0 -128
- package/templates/create-full/src/components/BlogPost/styles.css +0 -120
- package/templates/create-full/src/components/BlogPost/types.ts +0 -12
- package/templates/create-full/src/components/CardProductName/index.tsx +0 -25
- package/templates/create-full/src/components/CardProductName/styles.css +0 -22
- package/templates/create-full/src/components/CardProductName/types.ts +0 -7
- package/templates/create-full/src/components/CardProductPrice/index.tsx +0 -30
- package/templates/create-full/src/components/CardProductPrice/styles.css +0 -13
- package/templates/create-full/src/components/CardProductPrice/types.ts +0 -6
- package/templates/create-full/src/components/CardProductVariants/index.tsx +0 -10
- package/templates/create-full/src/components/CardProductVariants/styles.css +0 -1
- package/templates/create-full/src/components/CardProductVariants/types.ts +0 -6
- package/templates/create-full/src/components/CartPage/components/CouponCode/index.tsx +0 -108
- package/templates/create-full/src/components/CartPage/components/CouponCode/styles.css +0 -68
- package/templates/create-full/src/components/CartPage/components/EmptyState/index.tsx +0 -31
- package/templates/create-full/src/components/CartPage/components/EmptyState/styles.css +0 -18
- package/templates/create-full/src/components/CartPage/components/OrderSummary/index.tsx +0 -106
- package/templates/create-full/src/components/CartPage/components/OrderSummary/styles.css +0 -70
- package/templates/create-full/src/components/CartPage/index.tsx +0 -107
- package/templates/create-full/src/components/CartPage/styles.css +0 -54
- package/templates/create-full/src/components/CartPage/types.ts +0 -16
- package/templates/create-full/src/components/CategoryImageItem/components/Card/index.tsx +0 -64
- package/templates/create-full/src/components/CategoryImageItem/components/Card/styles.css +0 -56
- package/templates/create-full/src/components/CategoryImageItem/index.tsx +0 -64
- package/templates/create-full/src/components/CategoryImageItem/styles.css +0 -10
- package/templates/create-full/src/components/CategoryImageItem/types.ts +0 -16
- package/templates/create-full/src/components/CategoryImages/index.tsx +0 -62
- package/templates/create-full/src/components/CategoryImages/styles.css +0 -38
- package/templates/create-full/src/components/CategoryImages/types.ts +0 -11
- package/templates/create-full/src/components/CategoryList/components/CategoryListControls/index.tsx +0 -129
- package/templates/create-full/src/components/CategoryList/components/CategoryListControls/styles.css +0 -99
- package/templates/create-full/src/components/CategoryList/components/FilterBoxValues/index.tsx +0 -42
- package/templates/create-full/src/components/CategoryList/components/FilterBoxValues/styles.css +0 -27
- package/templates/create-full/src/components/CategoryList/components/FilterCategoryList/index.tsx +0 -43
- package/templates/create-full/src/components/CategoryList/components/FilterCategoryList/styles.css +0 -20
- package/templates/create-full/src/components/CategoryList/components/FilterGroupValues/index.tsx +0 -114
- package/templates/create-full/src/components/CategoryList/components/FilterGroupValues/styles.css +0 -1
- package/templates/create-full/src/components/CategoryList/components/FilterListValues/index.tsx +0 -54
- package/templates/create-full/src/components/CategoryList/components/FilterListValues/styles.css +0 -22
- package/templates/create-full/src/components/CategoryList/components/FilterRangeListValues/index.tsx +0 -50
- package/templates/create-full/src/components/CategoryList/components/FilterRangeListValues/styles.css +0 -25
- package/templates/create-full/src/components/CategoryList/components/FilterRangeValues/index.tsx +0 -189
- package/templates/create-full/src/components/CategoryList/components/FilterRangeValues/styles.css +0 -89
- package/templates/create-full/src/components/CategoryList/components/FilterSidebar/index.tsx +0 -92
- package/templates/create-full/src/components/CategoryList/components/FilterSidebar/styles.css +0 -27
- package/templates/create-full/src/components/CategoryList/components/FilterSwatchValues/index.tsx +0 -63
- package/templates/create-full/src/components/CategoryList/components/FilterSwatchValues/styles.css +0 -48
- package/templates/create-full/src/components/CategoryList/components/MobileFilterModal/index.tsx +0 -146
- package/templates/create-full/src/components/CategoryList/components/MobileFilterModal/styles.css +0 -133
- package/templates/create-full/src/components/CategoryList/index.tsx +0 -333
- package/templates/create-full/src/components/CategoryList/styles.css +0 -110
- package/templates/create-full/src/components/CategoryList/types.ts +0 -30
- package/templates/create-full/src/components/CollapsibleContent/index.tsx +0 -23
- package/templates/create-full/src/components/CollapsibleContent/styles.css +0 -11
- package/templates/create-full/src/components/CollapsibleContent/types.ts +0 -6
- package/templates/create-full/src/components/CookieBar/index.tsx +0 -78
- package/templates/create-full/src/components/CookieBar/styles.css +0 -111
- package/templates/create-full/src/components/CookieBar/types.ts +0 -10
- package/templates/create-full/src/components/CustomerEmailVerification/index.tsx +0 -168
- package/templates/create-full/src/components/CustomerEmailVerification/styles.css +0 -118
- package/templates/create-full/src/components/CustomerEmailVerification/types.ts +0 -17
- package/templates/create-full/src/components/FeatureItem/index.tsx +0 -27
- package/templates/create-full/src/components/FeatureItem/styles.css +0 -19
- package/templates/create-full/src/components/FeatureItem/types.ts +0 -7
- package/templates/create-full/src/components/Features/index.tsx +0 -25
- package/templates/create-full/src/components/Features/styles.css +0 -39
- package/templates/create-full/src/components/Features/types.ts +0 -5
- package/templates/create-full/src/components/Footer/index.tsx +0 -154
- package/templates/create-full/src/components/Footer/styles.css +0 -175
- package/templates/create-full/src/components/Footer/types.ts +0 -15
- package/templates/create-full/src/components/ForgotPassword/components/ForgotPasswordForm/index.tsx +0 -129
- package/templates/create-full/src/components/ForgotPassword/components/ForgotPasswordForm/styles.css +0 -0
- package/templates/create-full/src/components/ForgotPassword/index.tsx +0 -30
- package/templates/create-full/src/components/ForgotPassword/styles.css +0 -85
- package/templates/create-full/src/components/ForgotPassword/types.ts +0 -13
- package/templates/create-full/src/components/Header/index.tsx +0 -46
- package/templates/create-full/src/components/Header/styles.css +0 -4
- package/templates/create-full/src/components/Header/types.ts +0 -4
- package/templates/create-full/src/components/HeroSlider/index.tsx +0 -110
- package/templates/create-full/src/components/HeroSlider/styles.css +0 -129
- package/templates/create-full/src/components/HeroSlider/types.ts +0 -9
- package/templates/create-full/src/components/HeroSliderItem/index.tsx +0 -231
- package/templates/create-full/src/components/HeroSliderItem/styles.css +0 -152
- package/templates/create-full/src/components/HeroSliderItem/types.ts +0 -34
- package/templates/create-full/src/components/Login/components/LoginForm/index.tsx +0 -181
- package/templates/create-full/src/components/Login/components/LoginForm/styles.css +0 -0
- package/templates/create-full/src/components/Login/index.tsx +0 -37
- package/templates/create-full/src/components/Login/styles.css +0 -129
- package/templates/create-full/src/components/Login/types.ts +0 -18
- package/templates/create-full/src/components/Navbar/components/CartSidebar/index.tsx +0 -203
- package/templates/create-full/src/components/Navbar/components/CartSidebar/styles.css +0 -175
- package/templates/create-full/src/components/Navbar/components/MobileMenu/index.tsx +0 -198
- package/templates/create-full/src/components/Navbar/components/MobileMenu/styles.css +0 -122
- package/templates/create-full/src/components/Navbar/components/NavItem/index.tsx +0 -65
- package/templates/create-full/src/components/Navbar/components/SearchModal/index.tsx +0 -339
- package/templates/create-full/src/components/Navbar/components/SearchModal/styles.css +0 -191
- package/templates/create-full/src/components/Navbar/index.tsx +0 -254
- package/templates/create-full/src/components/Navbar/styles.css +0 -254
- package/templates/create-full/src/components/Navbar/types.ts +0 -42
- package/templates/create-full/src/components/NotFound/index.tsx +0 -39
- package/templates/create-full/src/components/NotFound/styles.css +0 -46
- package/templates/create-full/src/components/NotFound/types.ts +0 -8
- package/templates/create-full/src/components/ProductDetail/components/ProductGallery/index.tsx +0 -316
- package/templates/create-full/src/components/ProductDetail/components/ProductGallery/styles.css +0 -213
- package/templates/create-full/src/components/ProductDetail/index.tsx +0 -92
- package/templates/create-full/src/components/ProductDetail/styles.css +0 -58
- package/templates/create-full/src/components/ProductDetail/types.ts +0 -12
- package/templates/create-full/src/components/ProductDetailAddToCart/components/PayWithIkas/index.tsx +0 -34
- package/templates/create-full/src/components/ProductDetailAddToCart/components/PayWithIkas/styles.css +0 -4
- package/templates/create-full/src/components/ProductDetailAddToCart/index.tsx +0 -146
- package/templates/create-full/src/components/ProductDetailAddToCart/styles.css +0 -27
- package/templates/create-full/src/components/ProductDetailAddToCart/types.ts +0 -18
- package/templates/create-full/src/components/ProductDetailBundleFurniture/components/BundleFurnitureRow/index.tsx +0 -164
- package/templates/create-full/src/components/ProductDetailBundleFurniture/components/BundleFurnitureSection/index.tsx +0 -134
- package/templates/create-full/src/components/ProductDetailBundleFurniture/components/BundleFurnitureSection/styles.css +0 -188
- package/templates/create-full/src/components/ProductDetailBundleFurniture/index.tsx +0 -61
- package/templates/create-full/src/components/ProductDetailBundleFurniture/styles.css +0 -12
- package/templates/create-full/src/components/ProductDetailBundleFurniture/types.ts +0 -21
- package/templates/create-full/src/components/ProductDetailBundleProduct/components/BundleProductItem/index.tsx +0 -169
- package/templates/create-full/src/components/ProductDetailBundleProduct/components/BundleProductItem/styles.css +0 -141
- package/templates/create-full/src/components/ProductDetailBundleProduct/components/BundleSkeletonLoading/index.tsx +0 -35
- package/templates/create-full/src/components/ProductDetailBundleProduct/components/BundleSkeletonLoading/styles.css +0 -85
- package/templates/create-full/src/components/ProductDetailBundleProduct/components/FurnitureRow/index.tsx +0 -51
- package/templates/create-full/src/components/ProductDetailBundleProduct/components/FurnitureRow/styles.css +0 -30
- package/templates/create-full/src/components/ProductDetailBundleProduct/components/FurnitureView/index.tsx +0 -54
- package/templates/create-full/src/components/ProductDetailBundleProduct/components/FurnitureView/styles.css +0 -22
- package/templates/create-full/src/components/ProductDetailBundleProduct/index.tsx +0 -101
- package/templates/create-full/src/components/ProductDetailBundleProduct/styles.css +0 -20
- package/templates/create-full/src/components/ProductDetailBundleProduct/types.ts +0 -18
- package/templates/create-full/src/components/ProductDetailDescription/index.tsx +0 -56
- package/templates/create-full/src/components/ProductDetailDescription/styles.css +0 -21
- package/templates/create-full/src/components/ProductDetailDescription/types.ts +0 -13
- package/templates/create-full/src/components/ProductDetailFeatureItem/index.tsx +0 -28
- package/templates/create-full/src/components/ProductDetailFeatureItem/styles.css +0 -22
- package/templates/create-full/src/components/ProductDetailFeatureItem/types.ts +0 -7
- package/templates/create-full/src/components/ProductDetailFeatures/index.tsx +0 -40
- package/templates/create-full/src/components/ProductDetailFeatures/styles.css +0 -17
- package/templates/create-full/src/components/ProductDetailFeatures/types.ts +0 -10
- package/templates/create-full/src/components/ProductDetailNameFavorite/index.tsx +0 -66
- package/templates/create-full/src/components/ProductDetailNameFavorite/styles.css +0 -45
- package/templates/create-full/src/components/ProductDetailNameFavorite/types.ts +0 -11
- package/templates/create-full/src/components/ProductDetailOffer/components/OfferCard/index.tsx +0 -209
- package/templates/create-full/src/components/ProductDetailOffer/components/OfferCard/styles.css +0 -146
- package/templates/create-full/src/components/ProductDetailOffer/components/OfferSummary/index.tsx +0 -175
- package/templates/create-full/src/components/ProductDetailOffer/index.tsx +0 -199
- package/templates/create-full/src/components/ProductDetailOffer/styles.css +0 -211
- package/templates/create-full/src/components/ProductDetailOffer/types.ts +0 -24
- package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionCheckbox/index.tsx +0 -52
- package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionCheckbox/styles.css +0 -19
- package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionChoice/components/ChoiceBox/index.tsx +0 -60
- package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionChoice/components/ChoiceBox/styles.css +0 -38
- package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionChoice/components/ChoiceSelect/index.tsx +0 -102
- package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionChoice/components/ChoiceSelect/styles.css +0 -34
- package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionChoice/components/ChoiceSwatch/index.tsx +0 -121
- package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionChoice/components/ChoiceSwatch/styles.css +0 -87
- package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionChoice/index.tsx +0 -57
- package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionColorPicker/index.tsx +0 -54
- package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionColorPicker/styles.css +0 -0
- package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionDatePicker/index.tsx +0 -124
- package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionDatePicker/styles.css +0 -1
- package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionFile/index.tsx +0 -217
- package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionFile/styles.css +0 -87
- package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionRenderer/index.tsx +0 -133
- package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionText/index.tsx +0 -60
- package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionText/styles.css +0 -1
- package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionTextarea/index.tsx +0 -74
- package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionTextarea/styles.css +0 -10
- package/templates/create-full/src/components/ProductDetailOptionSet/index.tsx +0 -99
- package/templates/create-full/src/components/ProductDetailOptionSet/styles.css +0 -30
- package/templates/create-full/src/components/ProductDetailOptionSet/types.ts +0 -21
- package/templates/create-full/src/components/ProductDetailPrices/index.tsx +0 -62
- package/templates/create-full/src/components/ProductDetailPrices/styles.css +0 -32
- package/templates/create-full/src/components/ProductDetailPrices/types.ts +0 -10
- package/templates/create-full/src/components/ProductDetailProductGroup/index.tsx +0 -74
- package/templates/create-full/src/components/ProductDetailProductGroup/styles.css +0 -33
- package/templates/create-full/src/components/ProductDetailProductGroup/types.ts +0 -10
- package/templates/create-full/src/components/ProductDetailReviews/index.tsx +0 -205
- package/templates/create-full/src/components/ProductDetailReviews/styles.css +0 -43
- package/templates/create-full/src/components/ProductDetailReviews/types.ts +0 -19
- package/templates/create-full/src/components/ProductDetailSku/index.tsx +0 -38
- package/templates/create-full/src/components/ProductDetailSku/styles.css +0 -16
- package/templates/create-full/src/components/ProductDetailSku/types.ts +0 -11
- package/templates/create-full/src/components/ProductDetailVariant/index.tsx +0 -38
- package/templates/create-full/src/components/ProductDetailVariant/styles.css +0 -14
- package/templates/create-full/src/components/ProductDetailVariant/types.ts +0 -12
- package/templates/create-full/src/components/ProductSlider/index.tsx +0 -151
- package/templates/create-full/src/components/ProductSlider/styles.css +0 -105
- package/templates/create-full/src/components/ProductSlider/types.ts +0 -17
- package/templates/create-full/src/components/RecoverPassword/components/RecoverPasswordForm/index.tsx +0 -133
- package/templates/create-full/src/components/RecoverPassword/components/RecoverPasswordForm/styles.css +0 -0
- package/templates/create-full/src/components/RecoverPassword/index.tsx +0 -30
- package/templates/create-full/src/components/RecoverPassword/styles.css +0 -93
- package/templates/create-full/src/components/RecoverPassword/types.ts +0 -13
- package/templates/create-full/src/components/Register/components/RegisterForm/index.tsx +0 -326
- package/templates/create-full/src/components/Register/components/RegisterForm/styles.css +0 -0
- package/templates/create-full/src/components/Register/index.tsx +0 -30
- package/templates/create-full/src/components/Register/styles.css +0 -152
- package/templates/create-full/src/components/Register/types.ts +0 -27
- package/templates/create-full/src/components/RichText/index.tsx +0 -25
- package/templates/create-full/src/components/RichText/styles.css +0 -51
- package/templates/create-full/src/components/RichText/types.ts +0 -5
- package/templates/create-full/src/components/SocialMediaIcon/index.tsx +0 -26
- package/templates/create-full/src/components/SocialMediaIcon/styles.css +0 -17
- package/templates/create-full/src/components/SocialMediaIcon/types.ts +0 -7
- package/templates/create-full/src/components/index.ts +0 -50
- package/templates/create-full/src/global-types.ts +0 -11
- package/templates/create-full/src/global.css +0 -598
- package/templates/create-full/src/hooks/useBundleProducts.ts +0 -75
- package/templates/create-full/src/hooks/useColumnPreference.ts +0 -26
- package/templates/create-full/src/hooks/useInfiniteScroll.ts +0 -49
- package/templates/create-full/src/hooks/usePageTracking.ts +0 -56
- package/templates/create-full/src/hooks/usePayWithIkas.ts +0 -114
- package/templates/create-full/src/hooks/useRedirectIfLoggedIn.ts +0 -35
- package/templates/create-full/src/hooks/useScrollLock.ts +0 -19
- package/templates/create-full/src/hooks/useToast.ts +0 -27
- package/templates/create-full/src/ikas-component-utils.d.ts +0 -3
- package/templates/create-full/src/sub-components/Badge/index.tsx +0 -208
- package/templates/create-full/src/sub-components/Badge/styles.css +0 -129
- package/templates/create-full/src/sub-components/Breadcrumb/index.tsx +0 -57
- package/templates/create-full/src/sub-components/Breadcrumb/styles.css +0 -49
- package/templates/create-full/src/sub-components/BundleMedia/index.tsx +0 -72
- package/templates/create-full/src/sub-components/BundleQuantityBox/index.tsx +0 -73
- package/templates/create-full/src/sub-components/BundleQuantityBox/styles.css +0 -43
- package/templates/create-full/src/sub-components/Button/index.tsx +0 -52
- package/templates/create-full/src/sub-components/Button/styles.css +0 -114
- package/templates/create-full/src/sub-components/CartItem/components/BundleProductItem/index.tsx +0 -59
- package/templates/create-full/src/sub-components/CartItem/components/BundleProductItem/styles.css +0 -24
- package/templates/create-full/src/sub-components/CartItem/components/BundleProducts/index.tsx +0 -55
- package/templates/create-full/src/sub-components/CartItem/components/BundleProducts/styles.css +0 -30
- package/templates/create-full/src/sub-components/CartItem/components/ItemOptions/index.tsx +0 -31
- package/templates/create-full/src/sub-components/CartItem/components/ItemOptions/styles.css +0 -6
- package/templates/create-full/src/sub-components/CartItem/components/OptionValueDisplay/index.tsx +0 -79
- package/templates/create-full/src/sub-components/CartItem/components/OptionValueDisplay/styles.css +0 -28
- package/templates/create-full/src/sub-components/CartItem/index.tsx +0 -216
- package/templates/create-full/src/sub-components/CartItem/styles.css +0 -170
- package/templates/create-full/src/sub-components/Checkbox/index.tsx +0 -42
- package/templates/create-full/src/sub-components/Checkbox/styles.css +0 -65
- package/templates/create-full/src/sub-components/CollapsibleGroup/index.tsx +0 -52
- package/templates/create-full/src/sub-components/CollapsibleGroup/styles.css +0 -51
- package/templates/create-full/src/sub-components/ColorInput/index.tsx +0 -33
- package/templates/create-full/src/sub-components/ColorInput/styles.css +0 -53
- package/templates/create-full/src/sub-components/ConfirmModal/index.tsx +0 -60
- package/templates/create-full/src/sub-components/ConfirmModal/styles.css +0 -20
- package/templates/create-full/src/sub-components/FormItem/index.tsx +0 -66
- package/templates/create-full/src/sub-components/FormItem/styles.css +0 -38
- package/templates/create-full/src/sub-components/ImagePreviewModal/index.tsx +0 -55
- package/templates/create-full/src/sub-components/ImagePreviewModal/styles.css +0 -50
- package/templates/create-full/src/sub-components/Input/index.tsx +0 -69
- package/templates/create-full/src/sub-components/Input/styles.css +0 -162
- package/templates/create-full/src/sub-components/Modal/index.tsx +0 -120
- package/templates/create-full/src/sub-components/Modal/styles.css +0 -70
- package/templates/create-full/src/sub-components/PageLoader/index.tsx +0 -14
- package/templates/create-full/src/sub-components/PageLoader/styles.css +0 -12
- package/templates/create-full/src/sub-components/Pagination/index.tsx +0 -107
- package/templates/create-full/src/sub-components/Pagination/styles.css +0 -88
- package/templates/create-full/src/sub-components/ProductCard/index.tsx +0 -276
- package/templates/create-full/src/sub-components/ProductCard/styles.css +0 -99
- package/templates/create-full/src/sub-components/QuantitySelector/index.tsx +0 -41
- package/templates/create-full/src/sub-components/QuantitySelector/styles.css +0 -51
- package/templates/create-full/src/sub-components/ReviewCard/index.tsx +0 -103
- package/templates/create-full/src/sub-components/ReviewCard/styles.css +0 -95
- package/templates/create-full/src/sub-components/ReviewForm/index.tsx +0 -115
- package/templates/create-full/src/sub-components/ReviewForm/styles.css +0 -11
- package/templates/create-full/src/sub-components/ReviewSummary/index.tsx +0 -65
- package/templates/create-full/src/sub-components/ReviewSummary/styles.css +0 -86
- package/templates/create-full/src/sub-components/Select/index.tsx +0 -86
- package/templates/create-full/src/sub-components/Select/styles.css +0 -110
- package/templates/create-full/src/sub-components/SkeletonField/index.tsx +0 -12
- package/templates/create-full/src/sub-components/SkeletonField/styles.css +0 -29
- package/templates/create-full/src/sub-components/SliderArrow/index.tsx +0 -26
- package/templates/create-full/src/sub-components/SliderArrow/styles.css +0 -24
- package/templates/create-full/src/sub-components/SocialLoginButton/index.tsx +0 -24
- package/templates/create-full/src/sub-components/SocialLoginButton/styles.css +0 -19
- package/templates/create-full/src/sub-components/SpinnerIcon/index.tsx +0 -10
- package/templates/create-full/src/sub-components/SpinnerIcon/styles.css +0 -8
- package/templates/create-full/src/sub-components/StarRating/index.tsx +0 -76
- package/templates/create-full/src/sub-components/StarRating/styles.css +0 -40
- package/templates/create-full/src/sub-components/Tag/index.tsx +0 -21
- package/templates/create-full/src/sub-components/Tag/styles.css +0 -30
- package/templates/create-full/src/sub-components/Textarea/index.tsx +0 -45
- package/templates/create-full/src/sub-components/Textarea/styles.css +0 -82
- package/templates/create-full/src/sub-components/Toast/index.tsx +0 -257
- package/templates/create-full/src/sub-components/Toast/styles.css +0 -3
- package/templates/create-full/src/sub-components/Toggle/index.tsx +0 -46
- package/templates/create-full/src/sub-components/Toggle/styles.css +0 -86
- package/templates/create-full/src/sub-components/VariantBadge/index.tsx +0 -153
- package/templates/create-full/src/sub-components/VariantBadge/styles.css +0 -47
- package/templates/create-full/src/sub-components/icons/index.tsx +0 -981
- package/templates/create-full/src/utils/bundle.ts +0 -70
- package/templates/create-full/src/utils/cx.ts +0 -4
- package/templates/create-full/src/utils/fullName.ts +0 -6
- package/templates/create-full/src/utils/media.ts +0 -36
- package/templates/create-full/src/utils/optionPrice.ts +0 -19
- package/templates/create-full/src/utils/optionSet.ts +0 -17
- package/templates/create-full/src/utils/orderStatus.ts +0 -28
- package/templates/create-full/src/utils/pagination.ts +0 -29
- package/templates/create-full/src/utils/toast.ts +0 -5
- package/templates/create-full/tsconfig.json +0 -30
- package/templates/create-full/vite.config.ts +0 -15
|
@@ -1,333 +0,0 @@
|
|
|
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 = "No products found.",
|
|
43
|
-
searchPlaceholder = "Search",
|
|
44
|
-
clearFiltersText = "Clear Filters",
|
|
45
|
-
addToCartText = "Add to Cart",
|
|
46
|
-
addedToCartText = "Added",
|
|
47
|
-
outOfStockText = "Sold Out",
|
|
48
|
-
showProductsText = "VIEW PRODUCT",
|
|
49
|
-
filtersText = "Filters",
|
|
50
|
-
columnText = "Column",
|
|
51
|
-
badgeText,
|
|
52
|
-
homepageText = "Home",
|
|
53
|
-
showFilters = false,
|
|
54
|
-
showSearch = false,
|
|
55
|
-
aspectRatio,
|
|
56
|
-
objectFit,
|
|
57
|
-
isInfinity = false,
|
|
58
|
-
loadPrevPageText = "Load previous page",
|
|
59
|
-
pageTitle: pageTitleProp,
|
|
60
|
-
productCountText = "product",
|
|
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}
|
|
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;
|
|
@@ -1,110 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
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;
|
|
@@ -1,78 +0,0 @@
|
|
|
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;
|
|
@@ -1,111 +0,0 @@
|
|
|
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
|
-
}
|