@ikas/component-cli 0.115.0 → 0.117.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/build.d.ts.map +1 -1
- package/dist/commands/build.js +12 -12
- package/dist/commands/build.js.map +1 -1
- package/dist/utils/compile.d.ts.map +1 -1
- package/dist/utils/compile.js +11 -9
- package/dist/utils/compile.js.map +1 -1
- package/package.json +1 -1
- package/templates/create-full/ikas.config.json +983 -983
- package/templates/create-full/src/components/AccountAddresses/components/AddressModal/index.tsx +6 -9
- package/templates/create-full/src/components/AccountAddresses/components/AddressModal/styles.css +1 -0
- package/templates/create-full/src/components/AccountAddresses/index.tsx +12 -12
- package/templates/create-full/src/components/AccountFavorites/index.tsx +3 -3
- package/templates/create-full/src/components/AccountInfo/index.tsx +5 -5
- package/templates/create-full/src/components/AccountInfoContent/index.tsx +5 -5
- package/templates/create-full/src/components/AccountOrderDetail/index.tsx +29 -29
- package/templates/create-full/src/components/AccountOrders/index.tsx +8 -8
- package/templates/create-full/src/components/BlogHome/index.tsx +3 -3
- package/templates/create-full/src/components/BlogPost/index.tsx +3 -3
- package/templates/create-full/src/components/CartPage/index.tsx +13 -13
- package/templates/create-full/src/components/CategoryList/components/CategoryListControls/index.tsx +1 -1
- package/templates/create-full/src/components/CategoryList/index.tsx +13 -13
- package/templates/create-full/src/components/CustomerEmailVerification/index.tsx +14 -14
- package/templates/create-full/src/components/Footer/index.tsx +3 -3
- package/templates/create-full/src/components/ForgotPassword/components/ForgotPasswordForm/index.tsx +10 -10
- package/templates/create-full/src/components/Login/components/LoginForm/index.tsx +13 -13
- package/templates/create-full/src/components/Navbar/components/MobileMenu/index.tsx +1 -1
- package/templates/create-full/src/components/Navbar/index.tsx +19 -19
- package/templates/create-full/src/components/ProductDetail/index.tsx +1 -1
- package/templates/create-full/src/components/ProductDetailAddToCart/index.tsx +7 -7
- package/templates/create-full/src/components/ProductDetailBundleFurniture/index.tsx +8 -8
- package/templates/create-full/src/components/ProductDetailBundleProduct/index.tsx +3 -3
- package/templates/create-full/src/components/ProductDetailDescription/index.tsx +1 -1
- package/templates/create-full/src/components/ProductDetailOffer/components/OfferCard/index.tsx +2 -2
- package/templates/create-full/src/components/ProductDetailOffer/index.tsx +9 -9
- package/templates/create-full/src/components/ProductDetailOptionSet/index.tsx +7 -7
- package/templates/create-full/src/components/ProductDetailSku/index.tsx +1 -1
- package/templates/create-full/src/components/ProductDetailVariant/types.ts +1 -1
- package/templates/create-full/src/components/ProductSlider/index.tsx +4 -4
- package/templates/create-full/src/components/RecoverPassword/components/RecoverPasswordForm/index.tsx +10 -10
- package/templates/create-full/src/components/Register/components/RegisterForm/index.tsx +15 -15
- package/templates/create-full/src/global-types.ts +0 -2
- package/templates/create-full/src/global.css +4 -0
- package/templates/create-full/src/hooks/useScrollLock.ts +0 -4
- package/templates/create-full/src/sub-components/CartItem/components/BundleProducts/index.tsx +1 -1
- package/templates/create-full/src/sub-components/Modal/index.tsx +4 -2
- package/templates/create-full/src/sub-components/ProductCard/index.tsx +4 -4
- package/templates/create-full/claude-md +0 -737
|
@@ -20,17 +20,17 @@ export function ProductDetailOffer({
|
|
|
20
20
|
product,
|
|
21
21
|
compactView = false,
|
|
22
22
|
preselectOffers = false,
|
|
23
|
-
addToCartTogetherText = "
|
|
24
|
-
addingToCartText = "
|
|
25
|
-
offerInfoText = "
|
|
26
|
-
totalText = "
|
|
27
|
-
advantageousTotalText = "
|
|
28
|
-
outOfStockText = "
|
|
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
29
|
imageAspectRatio,
|
|
30
30
|
imageObjectFit,
|
|
31
|
-
addedToCartBannerText = "
|
|
32
|
-
errorMessage = "
|
|
33
|
-
optionSetErrorMessage = "
|
|
31
|
+
addedToCartBannerText = "Added to cart",
|
|
32
|
+
errorMessage = "Failed to add product to cart",
|
|
33
|
+
optionSetErrorMessage = "Please fill in the required options",
|
|
34
34
|
mobileMarginTop,
|
|
35
35
|
mobileMarginBottom,
|
|
36
36
|
desktopMarginTop,
|
|
@@ -13,14 +13,14 @@ import type { TextProps } from "./components/OptionRenderer";
|
|
|
13
13
|
|
|
14
14
|
export function ProductDetailOptionSet({
|
|
15
15
|
product,
|
|
16
|
-
requiredFieldErrorText = "
|
|
17
|
-
selectPlaceholderText = "
|
|
18
|
-
fileDropText = "
|
|
19
|
-
uploadingText = "
|
|
20
|
-
uploadFailedText = "
|
|
16
|
+
requiredFieldErrorText = "This field is required",
|
|
17
|
+
selectPlaceholderText = "Select",
|
|
18
|
+
fileDropText = "Choose a file or drag it here",
|
|
19
|
+
uploadingText = "Uploading...",
|
|
20
|
+
uploadFailedText = "Upload failed",
|
|
21
21
|
fileSizeErrorText = "{fileName}: max {maxSize}MB",
|
|
22
|
-
fileTypeErrorText = "{fileName}: {ext}
|
|
23
|
-
maxFilesErrorText = "
|
|
22
|
+
fileTypeErrorText = "{fileName}: {ext} file type not allowed",
|
|
23
|
+
maxFilesErrorText = "Maximum {max} files can be uploaded",
|
|
24
24
|
minLabelText = "Min: ",
|
|
25
25
|
maxLabelText = "Max: ",
|
|
26
26
|
fileFallbackNameText = "File",
|
|
@@ -7,6 +7,6 @@ export interface Props {
|
|
|
7
7
|
mobileMarginBottom?: MarginBottomStyleType;
|
|
8
8
|
desktopMarginTop?: MarginTopStyleType;
|
|
9
9
|
desktopMarginBottom?: MarginBottomStyleType;
|
|
10
|
-
/**
|
|
10
|
+
/** Use product images for color variant. */
|
|
11
11
|
useVariantImages?: boolean;
|
|
12
12
|
}
|
|
@@ -25,10 +25,10 @@ export function ProductSlider(props: Props) {
|
|
|
25
25
|
const {
|
|
26
26
|
productList,
|
|
27
27
|
title,
|
|
28
|
-
addToCartText = "
|
|
29
|
-
addedToCartText = "
|
|
30
|
-
outOfStockText = "
|
|
31
|
-
goToProductText = "
|
|
28
|
+
addToCartText = "Add to Cart",
|
|
29
|
+
addedToCartText = "Added to Cart",
|
|
30
|
+
outOfStockText = "Sold Out",
|
|
31
|
+
goToProductText = "View Product",
|
|
32
32
|
desktopColumns,
|
|
33
33
|
aspectRatio,
|
|
34
34
|
objectFit,
|
|
@@ -18,16 +18,16 @@ interface RecoverPasswordFormProps extends Omit<Props, "backgroundColor"> {
|
|
|
18
18
|
|
|
19
19
|
const RecoverPasswordForm = observer(function RecoverPasswordForm({
|
|
20
20
|
recoverForm,
|
|
21
|
-
title = "
|
|
22
|
-
subtitle = "
|
|
23
|
-
passwordLabel = "
|
|
24
|
-
passwordPlaceholder = "
|
|
25
|
-
passwordAgainLabel = "
|
|
26
|
-
passwordAgainPlaceholder = "
|
|
27
|
-
submitButtonText = "
|
|
28
|
-
submittingButtonText = "
|
|
29
|
-
successMessage = "
|
|
30
|
-
loginLinkText = "
|
|
21
|
+
title = "Change Password",
|
|
22
|
+
subtitle = "Please set your new password.",
|
|
23
|
+
passwordLabel = "New Password",
|
|
24
|
+
passwordPlaceholder = "Password",
|
|
25
|
+
passwordAgainLabel = "Confirm New Password",
|
|
26
|
+
passwordAgainPlaceholder = "Password",
|
|
27
|
+
submitButtonText = "Change",
|
|
28
|
+
submittingButtonText = "Changing...",
|
|
29
|
+
successMessage = "Your password has been successfully changed.",
|
|
30
|
+
loginLinkText = "Sign In",
|
|
31
31
|
}: RecoverPasswordFormProps) {
|
|
32
32
|
const handleSubmit = async (e: Event) => {
|
|
33
33
|
e.preventDefault();
|
|
@@ -27,24 +27,24 @@ interface RegisterFormProps extends Props {
|
|
|
27
27
|
|
|
28
28
|
const RegisterForm = observer(function RegisterForm({
|
|
29
29
|
registerForm,
|
|
30
|
-
title = "
|
|
31
|
-
subtitle = "
|
|
32
|
-
firstNameLabel = "
|
|
33
|
-
lastNameLabel = "
|
|
34
|
-
emailLabel = "
|
|
35
|
-
passwordLabel = "
|
|
30
|
+
title = "Create Account",
|
|
31
|
+
subtitle = "Create your free account and start shopping.",
|
|
32
|
+
firstNameLabel = "First Name",
|
|
33
|
+
lastNameLabel = "Last Name",
|
|
34
|
+
emailLabel = "Email",
|
|
35
|
+
passwordLabel = "Password",
|
|
36
36
|
firstNamePlaceholder,
|
|
37
37
|
lastNamePlaceholder,
|
|
38
38
|
emailPlaceholder,
|
|
39
|
-
passwordPlaceholder = "
|
|
40
|
-
submitButtonText = "
|
|
41
|
-
submittingButtonText = "
|
|
42
|
-
loginLinkText = "
|
|
43
|
-
marketingConsentText = "
|
|
44
|
-
agreementConsentText = "
|
|
45
|
-
googleButtonText = "
|
|
46
|
-
facebookButtonText = "
|
|
47
|
-
dividerText = "
|
|
39
|
+
passwordPlaceholder = "Enter your password",
|
|
40
|
+
submitButtonText = "Sign Up",
|
|
41
|
+
submittingButtonText = "Signing up...",
|
|
42
|
+
loginLinkText = "Already have an account? Sign in",
|
|
43
|
+
marketingConsentText = "I want to receive emails about campaigns and promotions",
|
|
44
|
+
agreementConsentText = "I accept the membership agreement",
|
|
45
|
+
googleButtonText = "Sign up with Google",
|
|
46
|
+
facebookButtonText = "Sign up with Facebook",
|
|
47
|
+
dividerText = "or",
|
|
48
48
|
showGoogleLogin = false,
|
|
49
49
|
showFacebookLogin = false,
|
|
50
50
|
marketingConsentLink,
|
|
@@ -3,8 +3,6 @@
|
|
|
3
3
|
|
|
4
4
|
/** Enum type: s3OODUmZpJ */
|
|
5
5
|
export type AspectRatio = "Square" | "Portrait" | "Landscape" | "Video";
|
|
6
|
-
/** Enum type: __breakpointsEnum__ */
|
|
7
|
-
export type Breakpoints = "desktop";
|
|
8
6
|
/** Enum type: Tkt3wfuJ5F */
|
|
9
7
|
export type NumberOfColumns = "One" | "Two" | "Three" | "Four" | "Five";
|
|
10
8
|
/** Enum type: GrylMqHxui */
|
|
@@ -7,14 +7,10 @@ export function useScrollLock(
|
|
|
7
7
|
) {
|
|
8
8
|
useEffect(() => {
|
|
9
9
|
if (!enabled) return;
|
|
10
|
-
const scrollbarWidth =
|
|
11
|
-
window.innerWidth - document.documentElement.clientWidth;
|
|
12
10
|
document.body.style.overflow = "hidden";
|
|
13
|
-
document.body.style.paddingRight = `${scrollbarWidth}px`;
|
|
14
11
|
return () => {
|
|
15
12
|
if (skipCleanupRef?.current) return;
|
|
16
13
|
document.body.style.overflow = "";
|
|
17
|
-
document.body.style.paddingRight = "";
|
|
18
14
|
};
|
|
19
15
|
}, [enabled]);
|
|
20
16
|
}
|
package/templates/create-full/src/sub-components/CartItem/components/BundleProducts/index.tsx
CHANGED
|
@@ -16,7 +16,7 @@ const BundleProducts = observer(function BundleProducts({
|
|
|
16
16
|
item,
|
|
17
17
|
aspectRatio,
|
|
18
18
|
objectFit,
|
|
19
|
-
editButtonText = "
|
|
19
|
+
editButtonText = "Edit",
|
|
20
20
|
}: Props) {
|
|
21
21
|
const bundleProducts = (item.variant?.bundleProducts ?? []).filter(
|
|
22
22
|
(bp) => bp.quantity > 0,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { useState, useEffect, useRef, useId } from "preact/hooks";
|
|
2
|
+
import { createPortal } from "preact/compat";
|
|
2
3
|
import type { ComponentChildren } from "preact";
|
|
3
4
|
import { useScrollLock } from "../../hooks/useScrollLock";
|
|
4
5
|
import { cx } from "../../utils/cx";
|
|
@@ -58,7 +59,7 @@ export default function Modal({
|
|
|
58
59
|
return () => document.removeEventListener("keydown", handleKeyDown);
|
|
59
60
|
}, []);
|
|
60
61
|
|
|
61
|
-
return (
|
|
62
|
+
return createPortal(
|
|
62
63
|
<div
|
|
63
64
|
className={cx("kombos-modal", visible && "kombos-modal--open", className)}
|
|
64
65
|
role="dialog"
|
|
@@ -113,6 +114,7 @@ export default function Modal({
|
|
|
113
114
|
)
|
|
114
115
|
))}
|
|
115
116
|
</div>
|
|
116
|
-
</div
|
|
117
|
+
</div>,
|
|
118
|
+
document.body,
|
|
117
119
|
);
|
|
118
120
|
}
|
|
@@ -49,9 +49,9 @@ interface Props {
|
|
|
49
49
|
const ProductCard = observer(function ProductCard({
|
|
50
50
|
product,
|
|
51
51
|
addToCartText,
|
|
52
|
-
addedToCartText = "
|
|
53
|
-
outOfStockText = "
|
|
54
|
-
goToProductText = "
|
|
52
|
+
addedToCartText = "Added to Cart",
|
|
53
|
+
outOfStockText = "Sold Out",
|
|
54
|
+
goToProductText = "View Product",
|
|
55
55
|
showFavorite = true,
|
|
56
56
|
hideAddToCartButton = false,
|
|
57
57
|
badgeText,
|
|
@@ -60,7 +60,7 @@ const ProductCard = observer(function ProductCard({
|
|
|
60
60
|
dataPage,
|
|
61
61
|
sizes = "(max-width: 767px) calc(50vw - 24px), (max-width: 1023px) calc(50vw - 44px), 300px",
|
|
62
62
|
openCartOnAdd = true,
|
|
63
|
-
errorMessage = "
|
|
63
|
+
errorMessage = "Failed to add product to cart",
|
|
64
64
|
onFavoriteRemove,
|
|
65
65
|
priority = false,
|
|
66
66
|
}: Props) {
|