@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,33 +0,0 @@
|
|
|
1
|
-
/* ===== ProductDetailProductGroup ===== */
|
|
2
|
-
|
|
3
|
-
.kombos-pd-product-group {
|
|
4
|
-
display: flex;
|
|
5
|
-
flex-direction: column;
|
|
6
|
-
gap: 1.5rem;
|
|
7
|
-
margin-top: var(--mobile-mt);
|
|
8
|
-
margin-bottom: var(--mobile-mb);
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.kombos-pd-product-group__group {
|
|
12
|
-
display: flex;
|
|
13
|
-
flex-direction: column;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.kombos-pd-product-group__label {
|
|
17
|
-
color: var(--kombos-gray-900);
|
|
18
|
-
margin-bottom: 0.375rem;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.kombos-pd-product-group__row {
|
|
22
|
-
display: flex;
|
|
23
|
-
flex-wrap: wrap;
|
|
24
|
-
gap: 0.5rem;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
/* ===== Desktop (>=1024px) ===== */
|
|
28
|
-
@media (min-width: 1024px) {
|
|
29
|
-
.kombos-pd-product-group {
|
|
30
|
-
margin-top: var(--desktop-mt, var(--mobile-mt));
|
|
31
|
-
margin-bottom: var(--desktop-mb, var(--mobile-mb));
|
|
32
|
-
}
|
|
33
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
// This file is auto-generated — do not edit manually.
|
|
2
|
-
import type { IkasProduct, MarginTopStyleType, MarginBottomStyleType } from "@ikas/bp-storefront";
|
|
3
|
-
|
|
4
|
-
export interface Props {
|
|
5
|
-
product?: IkasProduct | null;
|
|
6
|
-
mobileMarginTop?: MarginTopStyleType;
|
|
7
|
-
mobileMarginBottom?: MarginBottomStyleType;
|
|
8
|
-
desktopMarginTop?: MarginTopStyleType;
|
|
9
|
-
desktopMarginBottom?: MarginBottomStyleType;
|
|
10
|
-
}
|
|
@@ -1,205 +0,0 @@
|
|
|
1
|
-
import { useState, useEffect, useRef } from "preact/hooks";
|
|
2
|
-
import type { IkasCustomerReviewList } from "@ikas/bp-storefront";
|
|
3
|
-
import {
|
|
4
|
-
customerStore,
|
|
5
|
-
getProductCustomerReviews,
|
|
6
|
-
getCustomerReviewListPageCount,
|
|
7
|
-
hasCustomerReviewListPrevPage,
|
|
8
|
-
hasCustomerReviewListNextPage,
|
|
9
|
-
getCustomerReviewListPage,
|
|
10
|
-
isCustomerReviewEnabled,
|
|
11
|
-
isCustomerReviewLoginRequired,
|
|
12
|
-
hasCustomer,
|
|
13
|
-
Router,
|
|
14
|
-
getIkasProductCustomerReviewForm,
|
|
15
|
-
clearIkasProductCustomerReviewForm,
|
|
16
|
-
} from "@ikas/bp-storefront";
|
|
17
|
-
import { Props } from "./types";
|
|
18
|
-
import Pagination from "../../sub-components/Pagination";
|
|
19
|
-
import Button from "../../sub-components/Button";
|
|
20
|
-
import Modal from "../../sub-components/Modal";
|
|
21
|
-
import ImagePreviewModal from "../../sub-components/ImagePreviewModal";
|
|
22
|
-
import ReviewSummary from "../../sub-components/ReviewSummary";
|
|
23
|
-
import ReviewCard from "../../sub-components/ReviewCard";
|
|
24
|
-
import ReviewForm from "../../sub-components/ReviewForm";
|
|
25
|
-
import PageLoader from "../../sub-components/PageLoader";
|
|
26
|
-
|
|
27
|
-
export function ProductDetailReviews({
|
|
28
|
-
product,
|
|
29
|
-
reviewsPerPage = 5,
|
|
30
|
-
sectionTitle = "Customer Reviews",
|
|
31
|
-
writeReviewButtonText = "Write a Review",
|
|
32
|
-
emptyStateText = "No reviews yet. Be the first to review this product!",
|
|
33
|
-
reviewCountText = "Based on {count} reviews",
|
|
34
|
-
submitButtonText = "Submit Review",
|
|
35
|
-
submittingButtonText = "Submitting...",
|
|
36
|
-
titlePlaceholder = "Review title",
|
|
37
|
-
commentPlaceholder = "Write your review...",
|
|
38
|
-
merchantReplyLabel = "Store Reply",
|
|
39
|
-
starRequiredError = "Please select a rating",
|
|
40
|
-
cancelButtonText = "Cancel",
|
|
41
|
-
errorMessage = "Something went wrong. Please try again.",
|
|
42
|
-
}: Props) {
|
|
43
|
-
const listRef = useRef<HTMLDivElement>(null);
|
|
44
|
-
const [reviewList, setReviewList] = useState<IkasCustomerReviewList | null>(
|
|
45
|
-
null,
|
|
46
|
-
);
|
|
47
|
-
const [formVisible, setFormVisible] = useState(false);
|
|
48
|
-
const [previewImage, setPreviewImage] = useState<{
|
|
49
|
-
src: string;
|
|
50
|
-
alt: string;
|
|
51
|
-
} | null>(null);
|
|
52
|
-
const [isLoading, setIsLoading] = useState(false);
|
|
53
|
-
|
|
54
|
-
useEffect(() => {
|
|
55
|
-
if (!product) return;
|
|
56
|
-
|
|
57
|
-
setIsLoading(true);
|
|
58
|
-
|
|
59
|
-
getProductCustomerReviews(product, reviewsPerPage)
|
|
60
|
-
.then((result) => {
|
|
61
|
-
setReviewList(result);
|
|
62
|
-
})
|
|
63
|
-
.finally(() => {
|
|
64
|
-
setIsLoading(false);
|
|
65
|
-
});
|
|
66
|
-
}, [product, reviewsPerPage]);
|
|
67
|
-
|
|
68
|
-
if (!product) return null;
|
|
69
|
-
|
|
70
|
-
const reviewsEnabled = isCustomerReviewEnabled(product);
|
|
71
|
-
const hasReviews = reviewList && reviewList.data.length > 0;
|
|
72
|
-
const hasSummary =
|
|
73
|
-
product.averageRating !== null && product.reviewCount !== null;
|
|
74
|
-
|
|
75
|
-
const handleWriteReview = () => {
|
|
76
|
-
if (isCustomerReviewLoginRequired(product) && !hasCustomer(customerStore)) {
|
|
77
|
-
Router.navigateToPage("LOGIN");
|
|
78
|
-
return;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
setFormVisible(true);
|
|
82
|
-
};
|
|
83
|
-
|
|
84
|
-
const handlePageChange = async (page: number) => {
|
|
85
|
-
if (!reviewList) return;
|
|
86
|
-
|
|
87
|
-
await getCustomerReviewListPage(reviewList, page);
|
|
88
|
-
listRef.current?.scrollIntoView({ behavior: "smooth", block: "start" });
|
|
89
|
-
};
|
|
90
|
-
|
|
91
|
-
const reviewForm = getIkasProductCustomerReviewForm(product);
|
|
92
|
-
|
|
93
|
-
const handleCloseForm = () => {
|
|
94
|
-
clearIkasProductCustomerReviewForm(product);
|
|
95
|
-
setFormVisible(false);
|
|
96
|
-
};
|
|
97
|
-
|
|
98
|
-
const handleReviewSuccess = () => {
|
|
99
|
-
getProductCustomerReviews(product, reviewsPerPage).then(setReviewList);
|
|
100
|
-
handleCloseForm();
|
|
101
|
-
};
|
|
102
|
-
|
|
103
|
-
return (
|
|
104
|
-
<section className="product-detail-reviews">
|
|
105
|
-
<div className="kombos-container product-detail-reviews__inner">
|
|
106
|
-
<div className="product-detail-reviews__header">
|
|
107
|
-
<h2 className="product-detail-reviews__title display-xs-semibold">
|
|
108
|
-
{sectionTitle}
|
|
109
|
-
</h2>
|
|
110
|
-
{reviewsEnabled && !hasSummary && (
|
|
111
|
-
<Button variant="secondary" size="s" onClick={handleWriteReview}>
|
|
112
|
-
{writeReviewButtonText}
|
|
113
|
-
</Button>
|
|
114
|
-
)}
|
|
115
|
-
</div>
|
|
116
|
-
|
|
117
|
-
{hasSummary && (
|
|
118
|
-
<ReviewSummary
|
|
119
|
-
averageStar={product.averageRating!}
|
|
120
|
-
totalReview={product.reviewCount!}
|
|
121
|
-
stars={product.stars ?? []}
|
|
122
|
-
reviewCountText={reviewCountText}
|
|
123
|
-
action={
|
|
124
|
-
reviewsEnabled ? (
|
|
125
|
-
<Button
|
|
126
|
-
variant="secondary"
|
|
127
|
-
size="s"
|
|
128
|
-
onClick={handleWriteReview}
|
|
129
|
-
>
|
|
130
|
-
{writeReviewButtonText}
|
|
131
|
-
</Button>
|
|
132
|
-
) : undefined
|
|
133
|
-
}
|
|
134
|
-
/>
|
|
135
|
-
)}
|
|
136
|
-
|
|
137
|
-
{isLoading && <PageLoader />}
|
|
138
|
-
|
|
139
|
-
{!hasReviews && !isLoading && reviewList && (
|
|
140
|
-
<p className="product-detail-reviews__empty text-md-regular">
|
|
141
|
-
{emptyStateText}
|
|
142
|
-
</p>
|
|
143
|
-
)}
|
|
144
|
-
|
|
145
|
-
{hasReviews && !isLoading && (
|
|
146
|
-
<>
|
|
147
|
-
<div ref={listRef} className="product-detail-reviews__list">
|
|
148
|
-
{reviewList?.data.map((review) => (
|
|
149
|
-
<ReviewCard
|
|
150
|
-
key={review.id}
|
|
151
|
-
review={review}
|
|
152
|
-
merchantReplyLabel={merchantReplyLabel}
|
|
153
|
-
onImageClick={(src, alt) => setPreviewImage({ src, alt })}
|
|
154
|
-
/>
|
|
155
|
-
))}
|
|
156
|
-
</div>
|
|
157
|
-
|
|
158
|
-
<Pagination
|
|
159
|
-
currentPage={reviewList.page}
|
|
160
|
-
totalPages={getCustomerReviewListPageCount(reviewList!)}
|
|
161
|
-
hasPrev={hasCustomerReviewListPrevPage(reviewList!)}
|
|
162
|
-
hasNext={hasCustomerReviewListNextPage(reviewList!)}
|
|
163
|
-
onPageChange={handlePageChange}
|
|
164
|
-
/>
|
|
165
|
-
</>
|
|
166
|
-
)}
|
|
167
|
-
</div>
|
|
168
|
-
|
|
169
|
-
{formVisible && (
|
|
170
|
-
<Modal
|
|
171
|
-
title={writeReviewButtonText}
|
|
172
|
-
onClose={handleCloseForm}
|
|
173
|
-
okText={
|
|
174
|
-
reviewForm.isSubmitting ? submittingButtonText : submitButtonText
|
|
175
|
-
}
|
|
176
|
-
cancelText={cancelButtonText}
|
|
177
|
-
okButtonProps={{
|
|
178
|
-
type: "submit",
|
|
179
|
-
form: "review-form",
|
|
180
|
-
disabled: reviewForm.isSubmitting,
|
|
181
|
-
}}
|
|
182
|
-
>
|
|
183
|
-
<ReviewForm
|
|
184
|
-
product={product}
|
|
185
|
-
onSuccess={handleReviewSuccess}
|
|
186
|
-
titlePlaceholder={titlePlaceholder}
|
|
187
|
-
commentPlaceholder={commentPlaceholder}
|
|
188
|
-
starRequiredError={starRequiredError}
|
|
189
|
-
errorMessage={errorMessage}
|
|
190
|
-
/>
|
|
191
|
-
</Modal>
|
|
192
|
-
)}
|
|
193
|
-
|
|
194
|
-
{previewImage && (
|
|
195
|
-
<ImagePreviewModal
|
|
196
|
-
src={previewImage.src}
|
|
197
|
-
alt={previewImage.alt}
|
|
198
|
-
onClose={() => setPreviewImage(null)}
|
|
199
|
-
/>
|
|
200
|
-
)}
|
|
201
|
-
</section>
|
|
202
|
-
);
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
export default ProductDetailReviews;
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
.product-detail-reviews {
|
|
2
|
-
width: 100%;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
.product-detail-reviews__inner {
|
|
6
|
-
display: flex;
|
|
7
|
-
flex-direction: column;
|
|
8
|
-
gap: 1rem;
|
|
9
|
-
padding-top: 2.5rem;
|
|
10
|
-
padding-bottom: 2.5rem;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
@media (min-width: 768px) {
|
|
14
|
-
.product-detail-reviews__inner {
|
|
15
|
-
padding-top: 3.5rem;
|
|
16
|
-
padding-bottom: 3.5rem;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.product-detail-reviews__header {
|
|
21
|
-
display: flex;
|
|
22
|
-
align-items: center;
|
|
23
|
-
justify-content: space-between;
|
|
24
|
-
gap: 1rem;
|
|
25
|
-
flex-wrap: wrap;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.product-detail-reviews__title {
|
|
29
|
-
margin: 0;
|
|
30
|
-
color: var(--kombos-gray-900);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.product-detail-reviews__empty {
|
|
34
|
-
color: var(--kombos-gray-500);
|
|
35
|
-
text-align: center;
|
|
36
|
-
padding: 3rem 1rem;
|
|
37
|
-
margin: 0;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.product-detail-reviews__list {
|
|
41
|
-
display: flex;
|
|
42
|
-
flex-direction: column;
|
|
43
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
// This file is auto-generated — do not edit manually.
|
|
2
|
-
import type { IkasProduct } from "@ikas/bp-storefront";
|
|
3
|
-
|
|
4
|
-
export interface Props {
|
|
5
|
-
product?: IkasProduct | null;
|
|
6
|
-
reviewsPerPage?: number;
|
|
7
|
-
sectionTitle?: string;
|
|
8
|
-
writeReviewButtonText?: string;
|
|
9
|
-
emptyStateText?: string;
|
|
10
|
-
reviewCountText?: string;
|
|
11
|
-
submitButtonText?: string;
|
|
12
|
-
submittingButtonText?: string;
|
|
13
|
-
titlePlaceholder?: string;
|
|
14
|
-
commentPlaceholder?: string;
|
|
15
|
-
merchantReplyLabel?: string;
|
|
16
|
-
starRequiredError?: string;
|
|
17
|
-
cancelButtonText?: string;
|
|
18
|
-
errorMessage?: string;
|
|
19
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
getFormattedMarginTopSize,
|
|
3
|
-
getFormattedMarginBottomSize,
|
|
4
|
-
getSelectedProductVariant,
|
|
5
|
-
} from "@ikas/bp-storefront";
|
|
6
|
-
import { Props } from "./types";
|
|
7
|
-
|
|
8
|
-
export function ProductDetailSku({
|
|
9
|
-
product,
|
|
10
|
-
productCodeLabel = "Product Code:",
|
|
11
|
-
mobileMarginTop,
|
|
12
|
-
mobileMarginBottom,
|
|
13
|
-
desktopMarginTop,
|
|
14
|
-
desktopMarginBottom,
|
|
15
|
-
}: Props) {
|
|
16
|
-
if (!product) return null;
|
|
17
|
-
|
|
18
|
-
const selectedVariant = getSelectedProductVariant(product);
|
|
19
|
-
const sku = selectedVariant?.sku;
|
|
20
|
-
|
|
21
|
-
if (!sku) return null;
|
|
22
|
-
|
|
23
|
-
return (
|
|
24
|
-
<p
|
|
25
|
-
className="kombos-pd-sku__text text-sm-medium"
|
|
26
|
-
style={{
|
|
27
|
-
"--mobile-mt": getFormattedMarginTopSize(mobileMarginTop),
|
|
28
|
-
"--mobile-mb": getFormattedMarginBottomSize(mobileMarginBottom),
|
|
29
|
-
"--desktop-mt": getFormattedMarginTopSize(desktopMarginTop),
|
|
30
|
-
"--desktop-mb": getFormattedMarginBottomSize(desktopMarginBottom),
|
|
31
|
-
}}
|
|
32
|
-
>
|
|
33
|
-
{productCodeLabel} {sku}
|
|
34
|
-
</p>
|
|
35
|
-
);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export default ProductDetailSku;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/* ===== ProductDetailSKU ===== */
|
|
2
|
-
|
|
3
|
-
.kombos-pd-sku__text {
|
|
4
|
-
margin: 0;
|
|
5
|
-
color: var(--kombos-gray-600);
|
|
6
|
-
margin-top: var(--mobile-mt);
|
|
7
|
-
margin-bottom: var(--mobile-mb);
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
/* ===== Desktop (>=1024px) ===== */
|
|
11
|
-
@media (min-width: 1024px) {
|
|
12
|
-
.kombos-pd-sku__text {
|
|
13
|
-
margin-top: var(--desktop-mt, var(--mobile-mt));
|
|
14
|
-
margin-bottom: var(--desktop-mb, var(--mobile-mb));
|
|
15
|
-
}
|
|
16
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
// This file is auto-generated — do not edit manually.
|
|
2
|
-
import type { IkasProduct, MarginTopStyleType, MarginBottomStyleType } from "@ikas/bp-storefront";
|
|
3
|
-
|
|
4
|
-
export interface Props {
|
|
5
|
-
product?: IkasProduct | null;
|
|
6
|
-
productCodeLabel?: string;
|
|
7
|
-
mobileMarginTop?: MarginTopStyleType;
|
|
8
|
-
mobileMarginBottom?: MarginBottomStyleType;
|
|
9
|
-
desktopMarginTop?: MarginTopStyleType;
|
|
10
|
-
desktopMarginBottom?: MarginBottomStyleType;
|
|
11
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
getFormattedMarginTopSize,
|
|
3
|
-
getFormattedMarginBottomSize,
|
|
4
|
-
} from "@ikas/bp-storefront";
|
|
5
|
-
import { Props } from "./types";
|
|
6
|
-
import VariantBadge from "../../sub-components/VariantBadge";
|
|
7
|
-
|
|
8
|
-
export function ProductDetailVariant({
|
|
9
|
-
product,
|
|
10
|
-
mobileMarginTop,
|
|
11
|
-
mobileMarginBottom,
|
|
12
|
-
desktopMarginTop,
|
|
13
|
-
desktopMarginBottom,
|
|
14
|
-
useVariantImages,
|
|
15
|
-
}: Props) {
|
|
16
|
-
if (!product) return null;
|
|
17
|
-
|
|
18
|
-
return (
|
|
19
|
-
<div
|
|
20
|
-
className="kombos-pd-variant"
|
|
21
|
-
style={{
|
|
22
|
-
"--mobile-mt": getFormattedMarginTopSize(mobileMarginTop),
|
|
23
|
-
"--mobile-mb": getFormattedMarginBottomSize(mobileMarginBottom),
|
|
24
|
-
"--desktop-mt": getFormattedMarginTopSize(desktopMarginTop),
|
|
25
|
-
"--desktop-mb": getFormattedMarginBottomSize(desktopMarginBottom),
|
|
26
|
-
}}
|
|
27
|
-
>
|
|
28
|
-
<VariantBadge
|
|
29
|
-
product={product}
|
|
30
|
-
size="l"
|
|
31
|
-
showLabels
|
|
32
|
-
useVariantImages={useVariantImages}
|
|
33
|
-
/>
|
|
34
|
-
</div>
|
|
35
|
-
);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export default ProductDetailVariant;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/* ===== ProductDetailVariant ===== */
|
|
2
|
-
|
|
3
|
-
.kombos-pd-variant {
|
|
4
|
-
margin-top: var(--mobile-mt);
|
|
5
|
-
margin-bottom: var(--mobile-mb);
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
/* ===== Desktop (>=1024px) ===== */
|
|
9
|
-
@media (min-width: 1024px) {
|
|
10
|
-
.kombos-pd-variant {
|
|
11
|
-
margin-top: var(--desktop-mt, var(--mobile-mt));
|
|
12
|
-
margin-bottom: var(--desktop-mb, var(--mobile-mb));
|
|
13
|
-
}
|
|
14
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
// This file is auto-generated — do not edit manually.
|
|
2
|
-
import type { IkasProduct, MarginTopStyleType, MarginBottomStyleType } from "@ikas/bp-storefront";
|
|
3
|
-
|
|
4
|
-
export interface Props {
|
|
5
|
-
product?: IkasProduct | null;
|
|
6
|
-
mobileMarginTop?: MarginTopStyleType;
|
|
7
|
-
mobileMarginBottom?: MarginBottomStyleType;
|
|
8
|
-
desktopMarginTop?: MarginTopStyleType;
|
|
9
|
-
desktopMarginBottom?: MarginBottomStyleType;
|
|
10
|
-
/** Use product images for color variant. */
|
|
11
|
-
useVariantImages?: boolean;
|
|
12
|
-
}
|
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
useRef,
|
|
3
|
-
useState,
|
|
4
|
-
useEffect,
|
|
5
|
-
useMemo,
|
|
6
|
-
useCallback,
|
|
7
|
-
} from "preact/hooks";
|
|
8
|
-
import {
|
|
9
|
-
getProductOptionSet,
|
|
10
|
-
IkasComponentRenderer,
|
|
11
|
-
} from "@ikas/bp-storefront";
|
|
12
|
-
import ProductCard from "../../sub-components/ProductCard";
|
|
13
|
-
import SliderArrow from "../../sub-components/SliderArrow";
|
|
14
|
-
import { Props } from "./types";
|
|
15
|
-
|
|
16
|
-
const COLUMNS_MAP: Record<string, number> = {
|
|
17
|
-
One: 1,
|
|
18
|
-
Two: 2,
|
|
19
|
-
Three: 3,
|
|
20
|
-
Four: 4,
|
|
21
|
-
Five: 5,
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
export function ProductSlider(props: Props) {
|
|
25
|
-
const {
|
|
26
|
-
productList,
|
|
27
|
-
title,
|
|
28
|
-
addToCartText = "Add to Cart",
|
|
29
|
-
addedToCartText = "Added to Cart",
|
|
30
|
-
outOfStockText = "Sold Out",
|
|
31
|
-
goToProductText = "View Product",
|
|
32
|
-
desktopColumns,
|
|
33
|
-
aspectRatio,
|
|
34
|
-
objectFit,
|
|
35
|
-
hideAddToCartButton,
|
|
36
|
-
components,
|
|
37
|
-
} = props;
|
|
38
|
-
|
|
39
|
-
const cols = COLUMNS_MAP[desktopColumns ?? ""] ?? 4;
|
|
40
|
-
const trackRef = useRef<HTMLDivElement>(null);
|
|
41
|
-
const [canScrollLeft, setCanScrollLeft] = useState(false);
|
|
42
|
-
const [canScrollRight, setCanScrollRight] = useState(false);
|
|
43
|
-
|
|
44
|
-
const updateScrollState = useCallback(() => {
|
|
45
|
-
const track = trackRef.current;
|
|
46
|
-
if (!track) return;
|
|
47
|
-
|
|
48
|
-
setCanScrollLeft(track.scrollLeft > 1);
|
|
49
|
-
setCanScrollRight(
|
|
50
|
-
track.scrollLeft + track.clientWidth < track.scrollWidth - 1,
|
|
51
|
-
);
|
|
52
|
-
}, []);
|
|
53
|
-
|
|
54
|
-
useEffect(() => {
|
|
55
|
-
const track = trackRef.current;
|
|
56
|
-
if (!track) return;
|
|
57
|
-
track.addEventListener("scroll", updateScrollState, { passive: true });
|
|
58
|
-
window.addEventListener("resize", updateScrollState);
|
|
59
|
-
const ro = new ResizeObserver(updateScrollState);
|
|
60
|
-
ro.observe(track);
|
|
61
|
-
return () => {
|
|
62
|
-
track.removeEventListener("scroll", updateScrollState);
|
|
63
|
-
window.removeEventListener("resize", updateScrollState);
|
|
64
|
-
ro.disconnect();
|
|
65
|
-
};
|
|
66
|
-
}, [updateScrollState]);
|
|
67
|
-
|
|
68
|
-
const products = productList?.data ?? [];
|
|
69
|
-
|
|
70
|
-
useEffect(() => {
|
|
71
|
-
products.forEach((p) => {
|
|
72
|
-
if (!p.productOptionSet) getProductOptionSet(p);
|
|
73
|
-
});
|
|
74
|
-
}, [products.length]);
|
|
75
|
-
|
|
76
|
-
const productCardSizes = useMemo(() => {
|
|
77
|
-
const desktopGaps = (cols - 1) * 24;
|
|
78
|
-
return `(max-width: 767px) calc((100vw - 48px) / 2), (max-width: 1023px) calc((100vw - 80px) / 2), calc((100vw - ${144 + desktopGaps}px) / ${cols})`;
|
|
79
|
-
}, [cols]);
|
|
80
|
-
|
|
81
|
-
if (!productList) return null;
|
|
82
|
-
|
|
83
|
-
const scroll = (direction: "left" | "right") => {
|
|
84
|
-
const el = trackRef.current;
|
|
85
|
-
if (!el) return;
|
|
86
|
-
const amount = direction === "left" ? -el.clientWidth : el.clientWidth;
|
|
87
|
-
el.scrollBy({ left: amount, behavior: "smooth" });
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
return (
|
|
91
|
-
<section className="kombos-product-slider">
|
|
92
|
-
<div className="kombos-product-slider__wrapper kombos-container">
|
|
93
|
-
{title && (
|
|
94
|
-
<h2 className="kombos-product-slider__title display-xs-medium md:display-sm-medium">
|
|
95
|
-
{title}
|
|
96
|
-
</h2>
|
|
97
|
-
)}
|
|
98
|
-
|
|
99
|
-
<div className="kombos-product-slider__slider">
|
|
100
|
-
<SliderArrow
|
|
101
|
-
direction="left"
|
|
102
|
-
className="kombos-product-slider__arrow kombos-product-slider__arrow--left"
|
|
103
|
-
onClick={() => scroll("left")}
|
|
104
|
-
disabled={!canScrollLeft}
|
|
105
|
-
/>
|
|
106
|
-
|
|
107
|
-
<div
|
|
108
|
-
className="kombos-product-slider__track"
|
|
109
|
-
ref={trackRef}
|
|
110
|
-
style={{ "--columns": cols }}
|
|
111
|
-
>
|
|
112
|
-
{products.map((product, index) => (
|
|
113
|
-
<div key={product.id} className="kombos-product-slider__card">
|
|
114
|
-
<ProductCard
|
|
115
|
-
product={product}
|
|
116
|
-
addToCartText={addToCartText}
|
|
117
|
-
addedToCartText={addedToCartText}
|
|
118
|
-
outOfStockText={outOfStockText}
|
|
119
|
-
goToProductText={goToProductText}
|
|
120
|
-
aspectRatio={aspectRatio}
|
|
121
|
-
objectFit={objectFit}
|
|
122
|
-
sizes={productCardSizes}
|
|
123
|
-
hideAddToCartButton={hideAddToCartButton}
|
|
124
|
-
priority={index < 4}
|
|
125
|
-
/>
|
|
126
|
-
<IkasComponentRenderer
|
|
127
|
-
id={`product-slider-product-${product.id}`}
|
|
128
|
-
components={components}
|
|
129
|
-
parentProps={props}
|
|
130
|
-
map={{
|
|
131
|
-
product,
|
|
132
|
-
}}
|
|
133
|
-
className="kombos-product-slider__card-content"
|
|
134
|
-
/>
|
|
135
|
-
</div>
|
|
136
|
-
))}
|
|
137
|
-
</div>
|
|
138
|
-
|
|
139
|
-
<SliderArrow
|
|
140
|
-
direction="right"
|
|
141
|
-
className="kombos-product-slider__arrow kombos-product-slider__arrow--right"
|
|
142
|
-
onClick={() => scroll("right")}
|
|
143
|
-
disabled={!canScrollRight}
|
|
144
|
-
/>
|
|
145
|
-
</div>
|
|
146
|
-
</div>
|
|
147
|
-
</section>
|
|
148
|
-
);
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
export default ProductSlider;
|