@ikas/component-cli 0.132.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/config.d.ts.map +1 -1
- package/dist/commands/config.js +43 -1
- package/dist/commands/config.js.map +1 -1
- 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 +134 -32
- package/dist/commands/dev.js.map +1 -1
- package/dist/commands/proxy.js +1 -1
- package/dist/commands/proxy.js.map +1 -1
- package/dist/utils/component-helpers.d.ts +13 -0
- package/dist/utils/component-helpers.d.ts.map +1 -1
- package/dist/utils/component-helpers.js +52 -0
- package/dist/utils/component-helpers.js.map +1 -1
- package/dist/utils/websocket-server.d.ts +12 -0
- package/dist/utils/websocket-server.d.ts.map +1 -1
- package/dist/utils/websocket-server.js +25 -0
- package/dist/utils/websocket-server.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,199 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
getDefaultSrc,
|
|
3
|
-
getFormattedMarginTopSize,
|
|
4
|
-
getFormattedMarginBottomSize,
|
|
5
|
-
getProductVariantFormattedFinalPrice,
|
|
6
|
-
getProductVariantMainImage,
|
|
7
|
-
getSelectedProductVariant,
|
|
8
|
-
acceptProductOffer,
|
|
9
|
-
rejectProductOffer,
|
|
10
|
-
} from "@ikas/bp-storefront";
|
|
11
|
-
import { useEffect } from "preact/hooks";
|
|
12
|
-
import { cx } from "../../utils/cx";
|
|
13
|
-
import { resolveAspectRatio, resolveObjectFit } from "../../utils/media";
|
|
14
|
-
import { Props } from "./types";
|
|
15
|
-
import OfferCard from "./components/OfferCard";
|
|
16
|
-
import OfferSummary from "./components/OfferSummary";
|
|
17
|
-
import { NoProductSVG } from "../../sub-components/icons";
|
|
18
|
-
|
|
19
|
-
export function ProductDetailOffer({
|
|
20
|
-
product,
|
|
21
|
-
compactView = false,
|
|
22
|
-
preselectOffers = false,
|
|
23
|
-
addToCartTogetherText = "Add Together to Cart",
|
|
24
|
-
addingToCartText = "Adding...",
|
|
25
|
-
offerInfoText = "Add selected products together to your cart and enjoy the discount.",
|
|
26
|
-
totalText = "Total",
|
|
27
|
-
advantageousTotalText = "Discounted Total",
|
|
28
|
-
outOfStockText = "Sold Out",
|
|
29
|
-
imageAspectRatio,
|
|
30
|
-
imageObjectFit,
|
|
31
|
-
addedToCartBannerText = "Added to cart",
|
|
32
|
-
errorMessage = "Failed to add product to cart",
|
|
33
|
-
optionSetErrorMessage = "Please fill in the required options",
|
|
34
|
-
mobileMarginTop,
|
|
35
|
-
mobileMarginBottom,
|
|
36
|
-
desktopMarginTop,
|
|
37
|
-
desktopMarginBottom,
|
|
38
|
-
}: Props) {
|
|
39
|
-
useEffect(() => {
|
|
40
|
-
product?.offers?.forEach((offer) => {
|
|
41
|
-
if (preselectOffers) {
|
|
42
|
-
acceptProductOffer(offer);
|
|
43
|
-
} else {
|
|
44
|
-
rejectProductOffer(offer);
|
|
45
|
-
}
|
|
46
|
-
});
|
|
47
|
-
}, [preselectOffers]);
|
|
48
|
-
|
|
49
|
-
if (!product?.offers?.length) return null;
|
|
50
|
-
|
|
51
|
-
const selectedVariant = getSelectedProductVariant(product);
|
|
52
|
-
|
|
53
|
-
const appliedCampaign = product.appliedCampaignOffer;
|
|
54
|
-
|
|
55
|
-
const mainImage = getProductVariantMainImage(selectedVariant);
|
|
56
|
-
const mainMedia = mainImage?.image;
|
|
57
|
-
const mainImageSrc = mainMedia ? getDefaultSrc(mainMedia) : undefined;
|
|
58
|
-
const mainPrice = getProductVariantFormattedFinalPrice(selectedVariant);
|
|
59
|
-
|
|
60
|
-
// Resolve image styles
|
|
61
|
-
const resolvedAspectRatio = resolveAspectRatio(imageAspectRatio);
|
|
62
|
-
const resolvedObjectFit = resolveObjectFit(imageObjectFit);
|
|
63
|
-
|
|
64
|
-
const isInline = compactView;
|
|
65
|
-
|
|
66
|
-
const mainImageStyle = {
|
|
67
|
-
aspectRatio: resolvedAspectRatio,
|
|
68
|
-
objectFit: resolvedObjectFit,
|
|
69
|
-
};
|
|
70
|
-
|
|
71
|
-
const summaryPanel = (
|
|
72
|
-
<OfferSummary
|
|
73
|
-
product={product}
|
|
74
|
-
offerInfoText={offerInfoText}
|
|
75
|
-
totalText={totalText}
|
|
76
|
-
advantageousTotalText={advantageousTotalText}
|
|
77
|
-
isInline={isInline}
|
|
78
|
-
addingToCartText={addingToCartText}
|
|
79
|
-
addToCartTogetherText={addToCartTogetherText}
|
|
80
|
-
errorMessage={errorMessage}
|
|
81
|
-
optionSetErrorMessage={optionSetErrorMessage}
|
|
82
|
-
/>
|
|
83
|
-
);
|
|
84
|
-
|
|
85
|
-
return (
|
|
86
|
-
<div
|
|
87
|
-
className={cx("kombos-pd-offer", isInline && "kombos-pd-offer--inline")}
|
|
88
|
-
style={{
|
|
89
|
-
"--mobile-mt": getFormattedMarginTopSize(mobileMarginTop),
|
|
90
|
-
"--mobile-mb": getFormattedMarginBottomSize(mobileMarginBottom),
|
|
91
|
-
"--desktop-mt": getFormattedMarginTopSize(desktopMarginTop),
|
|
92
|
-
"--desktop-mb": getFormattedMarginBottomSize(desktopMarginBottom),
|
|
93
|
-
}}
|
|
94
|
-
>
|
|
95
|
-
{/* Campaign header */}
|
|
96
|
-
{appliedCampaign &&
|
|
97
|
-
(appliedCampaign.title || appliedCampaign.description) && (
|
|
98
|
-
<div className="kombos-pd-offer__header">
|
|
99
|
-
{appliedCampaign.title && (
|
|
100
|
-
<span className="kombos-pd-offer__title text-md-semibold md:text-lg-semibold">
|
|
101
|
-
{appliedCampaign.title}
|
|
102
|
-
</span>
|
|
103
|
-
)}
|
|
104
|
-
{appliedCampaign.description && (
|
|
105
|
-
<span className="kombos-pd-offer__desc text-sm-regular">
|
|
106
|
-
{appliedCampaign.description}
|
|
107
|
-
</span>
|
|
108
|
-
)}
|
|
109
|
-
</div>
|
|
110
|
-
)}
|
|
111
|
-
|
|
112
|
-
{/* Grid wrapper for standalone mode */}
|
|
113
|
-
{!isInline ? (
|
|
114
|
-
<div className="kombos-pd-offer__grid">
|
|
115
|
-
{/* Cards area: main product + offers in 2-col grid */}
|
|
116
|
-
<div className="kombos-pd-offer__cards">
|
|
117
|
-
{/* Main product card */}
|
|
118
|
-
<div className="kombos-pd-offer__main-product">
|
|
119
|
-
<div className="kombos-pd-offer__main-content">
|
|
120
|
-
{mainMedia?.isVideo ? (
|
|
121
|
-
<video
|
|
122
|
-
src={mainImageSrc}
|
|
123
|
-
className="kombos-pd-offer__main-image"
|
|
124
|
-
style={mainImageStyle}
|
|
125
|
-
muted
|
|
126
|
-
loop
|
|
127
|
-
autoPlay
|
|
128
|
-
playsInline
|
|
129
|
-
>
|
|
130
|
-
<track kind="captions" />
|
|
131
|
-
</video>
|
|
132
|
-
) : mainImageSrc ? (
|
|
133
|
-
<img
|
|
134
|
-
className="kombos-pd-offer__main-image"
|
|
135
|
-
src={mainImageSrc}
|
|
136
|
-
alt={product.name}
|
|
137
|
-
loading="lazy"
|
|
138
|
-
style={mainImageStyle}
|
|
139
|
-
/>
|
|
140
|
-
) : (
|
|
141
|
-
<div
|
|
142
|
-
className="kombos-pd-offer__main-image kombos-pd-offer__main-image--placeholder"
|
|
143
|
-
style={mainImageStyle}
|
|
144
|
-
>
|
|
145
|
-
<NoProductSVG />
|
|
146
|
-
</div>
|
|
147
|
-
)}
|
|
148
|
-
<div className="kombos-pd-offer__main-body">
|
|
149
|
-
<span className="kombos-pd-offer__main-name text-sm-medium">
|
|
150
|
-
{product.name}
|
|
151
|
-
</span>
|
|
152
|
-
<span className="kombos-pd-offer__main-price text-sm-semibold">
|
|
153
|
-
{mainPrice}
|
|
154
|
-
</span>
|
|
155
|
-
</div>
|
|
156
|
-
</div>
|
|
157
|
-
</div>
|
|
158
|
-
|
|
159
|
-
{/* Offer cards */}
|
|
160
|
-
{product.offers.map((offer) => (
|
|
161
|
-
<OfferCard
|
|
162
|
-
key={offer.campaignOfferProductId}
|
|
163
|
-
offer={offer}
|
|
164
|
-
outOfStockText={outOfStockText}
|
|
165
|
-
addedToCartBannerText={addedToCartBannerText}
|
|
166
|
-
imageAspectRatio={resolvedAspectRatio}
|
|
167
|
-
imageObjectFit={resolvedObjectFit}
|
|
168
|
-
/>
|
|
169
|
-
))}
|
|
170
|
-
</div>
|
|
171
|
-
|
|
172
|
-
{/* Summary panel */}
|
|
173
|
-
{summaryPanel}
|
|
174
|
-
</div>
|
|
175
|
-
) : (
|
|
176
|
-
<>
|
|
177
|
-
{/* Inline mode: vertical stack, no main product, no button */}
|
|
178
|
-
<div className="kombos-pd-offer__list">
|
|
179
|
-
{product.offers.map((offer) => (
|
|
180
|
-
<OfferCard
|
|
181
|
-
key={offer.campaignOfferProductId}
|
|
182
|
-
offer={offer}
|
|
183
|
-
outOfStockText={outOfStockText}
|
|
184
|
-
addedToCartBannerText={addedToCartBannerText}
|
|
185
|
-
imageAspectRatio={resolvedAspectRatio}
|
|
186
|
-
imageObjectFit={resolvedObjectFit}
|
|
187
|
-
/>
|
|
188
|
-
))}
|
|
189
|
-
</div>
|
|
190
|
-
|
|
191
|
-
{/* Summary (no button in inline mode) */}
|
|
192
|
-
{summaryPanel}
|
|
193
|
-
</>
|
|
194
|
-
)}
|
|
195
|
-
</div>
|
|
196
|
-
);
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
export default ProductDetailOffer;
|
|
@@ -1,211 +0,0 @@
|
|
|
1
|
-
/* ===== Product Detail Offer ===== */
|
|
2
|
-
|
|
3
|
-
.kombos-pd-offer {
|
|
4
|
-
display: flex;
|
|
5
|
-
flex-direction: column;
|
|
6
|
-
margin-top: var(--mobile-mt);
|
|
7
|
-
margin-bottom: var(--mobile-mb);
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
/* Inline mode (compactView) */
|
|
11
|
-
.kombos-pd-offer--inline {
|
|
12
|
-
border: 1px solid var(--kombos-gray-200);
|
|
13
|
-
border-radius: 6px;
|
|
14
|
-
padding: 1rem;
|
|
15
|
-
gap: 1rem;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
/* Header */
|
|
19
|
-
.kombos-pd-offer__header {
|
|
20
|
-
display: flex;
|
|
21
|
-
flex-direction: column;
|
|
22
|
-
gap: 0.25rem;
|
|
23
|
-
padding-block: 0.75rem;
|
|
24
|
-
border-radius: 6px;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.kombos-pd-offer__title {
|
|
28
|
-
color: inherit;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.kombos-pd-offer__desc {
|
|
32
|
-
color: inherit;
|
|
33
|
-
opacity: 0.8;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
/* Grid layout (standalone mode): cards + summary side by side */
|
|
37
|
-
.kombos-pd-offer__grid {
|
|
38
|
-
display: flex;
|
|
39
|
-
flex-direction: column;
|
|
40
|
-
gap: 1rem;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
/* Cards area: 2-col grid with main product + offer cards */
|
|
44
|
-
.kombos-pd-offer__cards {
|
|
45
|
-
display: grid;
|
|
46
|
-
grid-template-columns: 1fr;
|
|
47
|
-
gap: 0.75rem;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.kombos-pd-offer--inline .kombos-pd-offer__header {
|
|
51
|
-
padding: 0;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.kombos-pd-offer--inline .kombos-pd-offer__summary {
|
|
55
|
-
width: 100%;
|
|
56
|
-
max-width: none;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
/* Offer list (inline mode) */
|
|
60
|
-
.kombos-pd-offer__list {
|
|
61
|
-
display: flex;
|
|
62
|
-
flex-direction: column;
|
|
63
|
-
gap: 1rem;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
/* Main product card (standalone mode) — same style as OfferCard */
|
|
67
|
-
.kombos-pd-offer__main-product {
|
|
68
|
-
border: 1px solid var(--kombos-gray-200);
|
|
69
|
-
border-radius: 6px;
|
|
70
|
-
overflow: hidden;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
.kombos-pd-offer__main-content {
|
|
74
|
-
display: flex;
|
|
75
|
-
align-items: flex-start;
|
|
76
|
-
gap: 0.75rem;
|
|
77
|
-
padding: 0.75rem;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
.kombos-pd-offer__main-image {
|
|
81
|
-
width: 4rem;
|
|
82
|
-
flex-shrink: 0;
|
|
83
|
-
border-radius: 4px;
|
|
84
|
-
object-fit: cover;
|
|
85
|
-
aspect-ratio: 1 / 1;
|
|
86
|
-
background: var(--kombos-gray-100);
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
.kombos-pd-offer__main-image--placeholder {
|
|
90
|
-
display: flex;
|
|
91
|
-
align-items: center;
|
|
92
|
-
justify-content: center;
|
|
93
|
-
color: var(--kombos-gray-300);
|
|
94
|
-
font-size: 1.5rem;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
.kombos-pd-offer__main-body {
|
|
98
|
-
display: flex;
|
|
99
|
-
flex-direction: column;
|
|
100
|
-
gap: 0.25rem;
|
|
101
|
-
flex: 1;
|
|
102
|
-
min-width: 0;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
.kombos-pd-offer__main-name {
|
|
106
|
-
color: var(--kombos-gray-900);
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
.kombos-pd-offer__main-price {
|
|
110
|
-
color: var(--kombos-gray-900);
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
/* Summary panel */
|
|
114
|
-
.kombos-pd-offer__summary {
|
|
115
|
-
display: flex;
|
|
116
|
-
flex-direction: column;
|
|
117
|
-
gap: 0.75rem;
|
|
118
|
-
padding: 1rem;
|
|
119
|
-
border: 1px solid var(--kombos-gray-200);
|
|
120
|
-
border-radius: 6px;
|
|
121
|
-
background: var(--kombos-gray-50);
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
.kombos-pd-offer__summary-info {
|
|
125
|
-
display: flex;
|
|
126
|
-
align-items: flex-start;
|
|
127
|
-
gap: 0.5rem;
|
|
128
|
-
color: var(--kombos-gray-600);
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
.kombos-pd-offer__summary-info-icon {
|
|
132
|
-
flex-shrink: 0;
|
|
133
|
-
font-size: 1rem;
|
|
134
|
-
margin-top: 0.0625rem;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
.kombos-pd-offer__total-row {
|
|
138
|
-
display: flex;
|
|
139
|
-
align-items: center;
|
|
140
|
-
justify-content: space-between;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
.kombos-pd-offer__total-label {
|
|
144
|
-
color: var(--kombos-gray-500);
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
.kombos-pd-offer__total-price {
|
|
148
|
-
color: var(--kombos-gray-900);
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
.kombos-pd-offer__total-price--strike {
|
|
152
|
-
color: var(--kombos-gray-500);
|
|
153
|
-
text-decoration: line-through;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
.kombos-pd-offer__discount-row {
|
|
157
|
-
display: flex;
|
|
158
|
-
align-items: center;
|
|
159
|
-
justify-content: space-between;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
.kombos-pd-offer__discount-values {
|
|
163
|
-
display: flex;
|
|
164
|
-
align-items: center;
|
|
165
|
-
gap: 0.5rem;
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
.kombos-pd-offer__btn {
|
|
169
|
-
width: 100%;
|
|
170
|
-
margin-top: auto;
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
@media (min-width: 768px) {
|
|
174
|
-
.kombos-pd-offer__header {
|
|
175
|
-
padding-block: 1rem;
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
.kombos-pd-offer__cards {
|
|
179
|
-
grid-template-columns: 1fr 1fr;
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
.kombos-pd-offer__main-content {
|
|
183
|
-
gap: 1rem;
|
|
184
|
-
padding: 1rem;
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
.kombos-pd-offer__main-image {
|
|
188
|
-
width: 5rem;
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
@media (min-width: 1024px) {
|
|
193
|
-
.kombos-pd-offer {
|
|
194
|
-
margin-top: var(--desktop-mt);
|
|
195
|
-
margin-bottom: var(--desktop-mb);
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
.kombos-pd-offer__grid {
|
|
199
|
-
display: grid;
|
|
200
|
-
grid-template-columns: 1fr auto;
|
|
201
|
-
gap: 1rem;
|
|
202
|
-
align-items: start;
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
.kombos-pd-offer__summary {
|
|
206
|
-
min-width: 16rem;
|
|
207
|
-
max-width: 20rem;
|
|
208
|
-
justify-content: space-between;
|
|
209
|
-
align-self: stretch;
|
|
210
|
-
}
|
|
211
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
// This file is auto-generated — do not edit manually.
|
|
2
|
-
import type { IkasProduct, MarginTopStyleType, MarginBottomStyleType } from "@ikas/bp-storefront";
|
|
3
|
-
import type { AspectRatio, ObjectFit } from "../../global-types";
|
|
4
|
-
|
|
5
|
-
export interface Props {
|
|
6
|
-
product?: IkasProduct | null;
|
|
7
|
-
preselectOffers?: boolean;
|
|
8
|
-
addToCartTogetherText?: string;
|
|
9
|
-
addingToCartText?: string;
|
|
10
|
-
offerInfoText?: string;
|
|
11
|
-
totalText?: string;
|
|
12
|
-
advantageousTotalText?: string;
|
|
13
|
-
outOfStockText?: string;
|
|
14
|
-
imageAspectRatio?: AspectRatio;
|
|
15
|
-
imageObjectFit?: ObjectFit;
|
|
16
|
-
addedToCartBannerText?: string;
|
|
17
|
-
compactView?: boolean;
|
|
18
|
-
mobileMarginTop?: MarginTopStyleType;
|
|
19
|
-
mobileMarginBottom?: MarginBottomStyleType;
|
|
20
|
-
desktopMarginTop?: MarginTopStyleType;
|
|
21
|
-
desktopMarginBottom?: MarginBottomStyleType;
|
|
22
|
-
errorMessage?: string;
|
|
23
|
-
optionSetErrorMessage?: string;
|
|
24
|
-
}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
IkasProductOption,
|
|
3
|
-
isChecked as isOptionChecked,
|
|
4
|
-
setCheckboxValue,
|
|
5
|
-
hasError as hasOptionError,
|
|
6
|
-
getProductOptionFormattedLabel,
|
|
7
|
-
} from "@ikas/bp-storefront";
|
|
8
|
-
import { observer } from "@ikas/component-utils";
|
|
9
|
-
import Checkbox from "../../../../sub-components/Checkbox";
|
|
10
|
-
import FormItem from "../../../../sub-components/FormItem";
|
|
11
|
-
|
|
12
|
-
interface Props {
|
|
13
|
-
option: IkasProductOption;
|
|
14
|
-
showError: boolean;
|
|
15
|
-
requiredErrorText: string;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
const OptionCheckbox = observer(function OptionCheckbox({
|
|
19
|
-
option,
|
|
20
|
-
showError,
|
|
21
|
-
requiredErrorText,
|
|
22
|
-
}: Props) {
|
|
23
|
-
const checked = isOptionChecked(option);
|
|
24
|
-
const errored = showError && hasOptionError(option);
|
|
25
|
-
const label = getProductOptionFormattedLabel(option);
|
|
26
|
-
|
|
27
|
-
return (
|
|
28
|
-
<FormItem
|
|
29
|
-
status={errored ? "error" : "default"}
|
|
30
|
-
helper={errored ? requiredErrorText : undefined}
|
|
31
|
-
>
|
|
32
|
-
<div className="kombos-option-checkbox__row">
|
|
33
|
-
<Checkbox
|
|
34
|
-
checked={checked}
|
|
35
|
-
onChange={(val) => setCheckboxValue(option, val)}
|
|
36
|
-
/>
|
|
37
|
-
<div className="kombos-option-checkbox__text">
|
|
38
|
-
<span className="kombos-option-checkbox__label text-sm-medium">
|
|
39
|
-
{label}
|
|
40
|
-
</span>
|
|
41
|
-
{option.optionalText && (
|
|
42
|
-
<span className="kombos-option-checkbox__desc text-xs-regular">
|
|
43
|
-
{option.optionalText}
|
|
44
|
-
</span>
|
|
45
|
-
)}
|
|
46
|
-
</div>
|
|
47
|
-
</div>
|
|
48
|
-
</FormItem>
|
|
49
|
-
);
|
|
50
|
-
});
|
|
51
|
-
|
|
52
|
-
export default OptionCheckbox;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
.kombos-option-checkbox__row {
|
|
2
|
-
display: flex;
|
|
3
|
-
align-items: center;
|
|
4
|
-
gap: 0.5rem;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
.kombos-option-checkbox__text {
|
|
8
|
-
display: flex;
|
|
9
|
-
flex-direction: column;
|
|
10
|
-
gap: 0.125rem;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.kombos-option-checkbox__label {
|
|
14
|
-
color: var(--kombos-gray-700);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.kombos-option-checkbox__desc {
|
|
18
|
-
color: var(--kombos-gray-500);
|
|
19
|
-
}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
IkasProductOption,
|
|
3
|
-
selectValue,
|
|
4
|
-
isProductOptionSelectValueSelected,
|
|
5
|
-
getProductOptionFormattedLabel,
|
|
6
|
-
} from "@ikas/bp-storefront";
|
|
7
|
-
import { observer } from "@ikas/component-utils";
|
|
8
|
-
import { cx } from "../../../../../../utils/cx";
|
|
9
|
-
import FormItem from "../../../../../../sub-components/FormItem";
|
|
10
|
-
import { getSelectValuePrice } from "../../../../../../utils/optionPrice";
|
|
11
|
-
|
|
12
|
-
interface Props {
|
|
13
|
-
option: IkasProductOption;
|
|
14
|
-
errored: boolean;
|
|
15
|
-
requiredErrorText: string;
|
|
16
|
-
constraintText?: string;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
const ChoiceBox = observer(function ChoiceBox({
|
|
20
|
-
option,
|
|
21
|
-
errored,
|
|
22
|
-
requiredErrorText,
|
|
23
|
-
constraintText,
|
|
24
|
-
}: Props) {
|
|
25
|
-
const settings = option.selectSettings!;
|
|
26
|
-
|
|
27
|
-
return (
|
|
28
|
-
<FormItem
|
|
29
|
-
label={getProductOptionFormattedLabel(option)}
|
|
30
|
-
status={errored ? "error" : "default"}
|
|
31
|
-
description={option.optionalText}
|
|
32
|
-
helper={errored ? requiredErrorText : constraintText}
|
|
33
|
-
>
|
|
34
|
-
<div className="kombos-option-choice__grid">
|
|
35
|
-
{settings.values.map((val) => {
|
|
36
|
-
const isSelected = isProductOptionSelectValueSelected(option, val);
|
|
37
|
-
const price = getSelectValuePrice(option, val);
|
|
38
|
-
|
|
39
|
-
return (
|
|
40
|
-
<button
|
|
41
|
-
key={val.id}
|
|
42
|
-
type="button"
|
|
43
|
-
className={cx("kombos-option-choice__box", "text-sm-medium", isSelected && "kombos-option-choice__box--selected")}
|
|
44
|
-
onClick={() => selectValue(option, val)}
|
|
45
|
-
>
|
|
46
|
-
<span>{val.value}</span>
|
|
47
|
-
{price && (
|
|
48
|
-
<span className="kombos-option-choice__box-price text-xs-regular">
|
|
49
|
-
{price}
|
|
50
|
-
</span>
|
|
51
|
-
)}
|
|
52
|
-
</button>
|
|
53
|
-
);
|
|
54
|
-
})}
|
|
55
|
-
</div>
|
|
56
|
-
</FormItem>
|
|
57
|
-
);
|
|
58
|
-
});
|
|
59
|
-
|
|
60
|
-
export default ChoiceBox;
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
/* Box grid */
|
|
2
|
-
.kombos-option-choice__grid {
|
|
3
|
-
display: flex;
|
|
4
|
-
flex-wrap: wrap;
|
|
5
|
-
gap: 0.5rem;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
.kombos-option-choice__box {
|
|
9
|
-
display: flex;
|
|
10
|
-
flex-direction: column;
|
|
11
|
-
align-items: center;
|
|
12
|
-
gap: 0.125rem;
|
|
13
|
-
padding: 0.5rem 1rem;
|
|
14
|
-
border: 1px solid var(--kombos-gray-200);
|
|
15
|
-
border-radius: 6px;
|
|
16
|
-
background: var(--kombos-white);
|
|
17
|
-
color: var(--kombos-gray-700);
|
|
18
|
-
cursor: pointer;
|
|
19
|
-
transition: border-color 0.15s;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.kombos-option-choice__box:hover {
|
|
23
|
-
border-color: var(--kombos-gray-400);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.kombos-option-choice__box--selected {
|
|
27
|
-
border-color: var(--kombos-gray-900);
|
|
28
|
-
background: var(--kombos-gray-900);
|
|
29
|
-
color: var(--kombos-white);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.kombos-option-choice__box-price {
|
|
33
|
-
color: var(--kombos-gray-500);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.kombos-option-choice__box--selected .kombos-option-choice__box-price {
|
|
37
|
-
color: var(--kombos-white);
|
|
38
|
-
}
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
IkasProductOption,
|
|
3
|
-
selectValue,
|
|
4
|
-
clearValues,
|
|
5
|
-
isProductOptionSelectValueSelected,
|
|
6
|
-
getProductOptionFormattedLabel,
|
|
7
|
-
} from "@ikas/bp-storefront";
|
|
8
|
-
import { observer } from "@ikas/component-utils";
|
|
9
|
-
import { cx } from "../../../../../../utils/cx";
|
|
10
|
-
import Select from "../../../../../../sub-components/Select";
|
|
11
|
-
import FormItem from "../../../../../../sub-components/FormItem";
|
|
12
|
-
import Checkbox from "../../../../../../sub-components/Checkbox";
|
|
13
|
-
import { getSelectValuePrice } from "../../../../../../utils/optionPrice";
|
|
14
|
-
|
|
15
|
-
interface Props {
|
|
16
|
-
option: IkasProductOption;
|
|
17
|
-
errored: boolean;
|
|
18
|
-
requiredErrorText: string;
|
|
19
|
-
placeholderText: string;
|
|
20
|
-
constraintText?: string;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
const ChoiceSelect = observer(function ChoiceSelect({
|
|
24
|
-
option,
|
|
25
|
-
errored,
|
|
26
|
-
requiredErrorText,
|
|
27
|
-
placeholderText,
|
|
28
|
-
constraintText,
|
|
29
|
-
}: Props) {
|
|
30
|
-
const settings = option.selectSettings!;
|
|
31
|
-
const selectedId = option.values?.[0] ?? "";
|
|
32
|
-
const selectOptions = settings.values.map((v) => ({
|
|
33
|
-
label: `${v.value} (${getSelectValuePrice(option, v)})`,
|
|
34
|
-
value: v.id,
|
|
35
|
-
}));
|
|
36
|
-
|
|
37
|
-
const isMulti = (settings.maxSelect ?? 0) > 1;
|
|
38
|
-
const selectId = !isMulti ? `option-choice-${option.id}` : undefined;
|
|
39
|
-
|
|
40
|
-
return (
|
|
41
|
-
<FormItem
|
|
42
|
-
label={getProductOptionFormattedLabel(option)}
|
|
43
|
-
htmlFor={selectId}
|
|
44
|
-
status={errored ? "error" : "default"}
|
|
45
|
-
description={option.optionalText}
|
|
46
|
-
helper={errored ? requiredErrorText : constraintText}
|
|
47
|
-
>
|
|
48
|
-
{isMulti ? (
|
|
49
|
-
<div
|
|
50
|
-
className={cx(
|
|
51
|
-
"kombos-option-choice__checklist",
|
|
52
|
-
errored && "kombos-option-choice__checklist--error",
|
|
53
|
-
)}
|
|
54
|
-
>
|
|
55
|
-
{settings.values.map((val) => {
|
|
56
|
-
const isSelected = isProductOptionSelectValueSelected(option, val);
|
|
57
|
-
const price = getSelectValuePrice(option, val);
|
|
58
|
-
|
|
59
|
-
return (
|
|
60
|
-
<div
|
|
61
|
-
key={val.id}
|
|
62
|
-
className="kombos-option-choice__checklist-row"
|
|
63
|
-
onClick={() => selectValue(option, val)}
|
|
64
|
-
>
|
|
65
|
-
<Checkbox
|
|
66
|
-
checked={isSelected}
|
|
67
|
-
onChange={() => selectValue(option, val)}
|
|
68
|
-
/>
|
|
69
|
-
<span className="text-sm-medium">{val.value}</span>
|
|
70
|
-
{price && (
|
|
71
|
-
<span className="kombos-option-choice__checklist-price text-xs-regular">
|
|
72
|
-
{price}
|
|
73
|
-
</span>
|
|
74
|
-
)}
|
|
75
|
-
</div>
|
|
76
|
-
);
|
|
77
|
-
})}
|
|
78
|
-
</div>
|
|
79
|
-
) : (
|
|
80
|
-
<Select
|
|
81
|
-
id={selectId}
|
|
82
|
-
allowClear
|
|
83
|
-
options={[{ label: placeholderText, value: "" }, ...selectOptions]}
|
|
84
|
-
value={selectedId}
|
|
85
|
-
onChange={(e: Event) => {
|
|
86
|
-
const id = (e.target as HTMLSelectElement).value;
|
|
87
|
-
if (!id) {
|
|
88
|
-
clearValues(option, true);
|
|
89
|
-
return;
|
|
90
|
-
}
|
|
91
|
-
const val = settings.values.find((v) => v.id === id);
|
|
92
|
-
if (val) selectValue(option, val);
|
|
93
|
-
}}
|
|
94
|
-
onClear={() => clearValues(option, true)}
|
|
95
|
-
size="xs"
|
|
96
|
-
/>
|
|
97
|
-
)}
|
|
98
|
-
</FormItem>
|
|
99
|
-
);
|
|
100
|
-
});
|
|
101
|
-
|
|
102
|
-
export default ChoiceSelect;
|