yt-uikit 0.10.99 → 0.10.100-dropdown-ui-refact.1

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.
@@ -2,7 +2,9 @@
2
2
  export declare const Container: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
3
3
  export declare const Button: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>> & string;
4
4
  export declare const Quantity: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
5
- export declare const AddToBundleButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>> & string;
5
+ export declare const AddToBundleButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
6
+ ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
7
+ }>, never>, never>> & string;
6
8
  export declare const QuantitySelectorContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
7
9
  export declare const ProductContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
8
10
  borderRadius: string;
@@ -15,9 +17,6 @@ export declare const ProductImage: import("styled-components/dist/types").IStyle
15
17
  aspectRatio: string;
16
18
  borderRadius: string;
17
19
  }>> & string;
18
- export declare const VariantSelector: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").SelectHTMLAttributes<HTMLSelectElement>, HTMLSelectElement>, {
19
- isCoralHaze: boolean;
20
- }>> & string;
21
20
  export declare const ProductTitle: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
22
21
  isMobile: boolean;
23
22
  showBorder: boolean;
@@ -28,9 +27,9 @@ export declare const PriceContainer: import("styled-components/dist/types").ISty
28
27
  export declare const AddToBundleWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
29
28
  borderRadius: string;
30
29
  }>> & string;
31
- export declare const AddedButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<Omit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>, "ref"> & {
30
+ export declare const AddedButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
32
31
  ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
33
- }, {
32
+ }>, never>, never>, {
34
33
  borderRadius: string;
35
34
  }>> & string;
36
35
  export declare const AddedButtonText: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
@@ -52,7 +52,9 @@ export declare const SaveLabel: import("styled-components/dist/types").IStyledCo
52
52
  export declare const SubtotalRow: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
53
53
  export declare const FinalPrice: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
54
54
  export declare const LineThroughPrice: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
55
- export declare const CheckoutButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {
55
+ export declare const CheckoutButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
56
+ ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
57
+ }>, never>, {
56
58
  canCheckout: boolean;
57
59
  progressPercentage: number;
58
60
  ctaColors: any;
@@ -7,4 +7,3 @@ export declare const ModalContent: import("styled-components/dist/types").IStyle
7
7
  export declare const BundlProductDetailsModalContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
8
8
  $isDev?: boolean | undefined;
9
9
  }>> & string;
10
- export declare const StyledSelect: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").SelectHTMLAttributes<HTMLSelectElement>, HTMLSelectElement>, never>> & string;
@@ -18,7 +18,9 @@ export declare const OriginalPrice: import("styled-components/dist/types").IStyl
18
18
  export declare const TotalPrice: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
19
19
  export declare const Price: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
20
20
  export declare const SaveTag: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
21
- export declare const AddToCart: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>> & string;
21
+ export declare const AddToCart: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
22
+ ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
23
+ }>, never>, never>> & string;
22
24
  export declare const CustomDropdown: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
23
25
  export declare const Swatch: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
24
26
  export declare const Chevron: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
@@ -47,7 +49,9 @@ export declare const ProductTitle: import("styled-components/dist/types").IStyle
47
49
  export declare const ProductPrice: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
48
50
  export declare const PriceLine: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
49
51
  export declare const SummaryBlock: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
50
- export declare const AddBundleButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>> & string;
52
+ export declare const AddBundleButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
53
+ ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
54
+ }>, never>, never>> & string;
51
55
  export declare const PlusWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
52
56
  export declare const PlusWrapperWithHiding: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>, "ref"> & {
53
57
  ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
@@ -38,7 +38,9 @@ export declare const ProductTitle: import("styled-components/dist/types").IStyle
38
38
  export declare const ProductVariant: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, never>> & string;
39
39
  export declare const RemoveButtonIcon: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>> & string;
40
40
  export declare const PlusIcon: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
41
- export declare const AddToCartButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {
41
+ export declare const AddToCartButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
42
+ ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
43
+ }>, never>, {
42
44
  borderRadius?: string | undefined;
43
45
  primaryBgColor?: string | undefined;
44
46
  textColor?: string | undefined;
@@ -70,7 +72,9 @@ export declare const VendorImage: import("styled-components/dist/types").IStyled
70
72
  export declare const VendorInfo: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
71
73
  export declare const VendorName: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, never>> & string;
72
74
  export declare const ProductPrice: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, never>> & string;
73
- export declare const AddToBundle: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {
75
+ export declare const AddToBundle: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
76
+ ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
77
+ }>, never>, {
74
78
  primaryBgColor?: string | undefined;
75
79
  cornerRadiusType?: string | undefined;
76
80
  }>> & string;
@@ -0,0 +1,31 @@
1
+ import React from "react";
2
+ export interface VariantDropdownOption {
3
+ value: string;
4
+ label: string;
5
+ disabled?: boolean;
6
+ /** extra class on the option, e.g. the variant-out-of-stock hook */
7
+ className?: string;
8
+ }
9
+ interface VariantDropdownProps {
10
+ options: VariantDropdownOption[];
11
+ value: string;
12
+ onChange: (value: string) => void;
13
+ className?: string;
14
+ /** styles for the clickable trigger */
15
+ style?: React.CSSProperties;
16
+ /** styles for the portaled option list */
17
+ menuStyle?: React.CSSProperties;
18
+ /** trigger content, defaults to the selected label + chevron */
19
+ children?: React.ReactNode;
20
+ ariaLabel?: string;
21
+ }
22
+ /**
23
+ * Variant picker rendered as a custom dropdown instead of a native <select>.
24
+ *
25
+ * The option list is portaled to document.body with position: fixed so it is
26
+ * never clipped by a Shopify theme app block (sections routinely set
27
+ * overflow: hidden, transforms or their own stacking contexts around our
28
+ * embedded bundle markup).
29
+ */
30
+ declare const VariantDropdown: React.FC<VariantDropdownProps>;
31
+ export default VariantDropdown;
@@ -51,7 +51,9 @@ export declare const VariantButton: import("styled-components/dist/types").IStyl
51
51
  isSelected?: boolean | undefined;
52
52
  primaryColor?: string | undefined;
53
53
  }>> & string;
54
- export declare const AddToCartButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {
54
+ export declare const AddToCartButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
55
+ ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
56
+ }>, never>, {
55
57
  bgColor?: string | undefined;
56
58
  textColor?: string | undefined;
57
59
  border?: string | undefined;
@@ -0,0 +1,22 @@
1
+ /**
2
+ * GoKwik's theme script uses `data-gokwik-processed` as a guard clause: `attach`,
3
+ * `replaceButton`, `claimExternalNode`, `claimShadowButton` and its 500ms ownership
4
+ * sweep all bail out the moment they see that attribute on a button.
5
+ *
6
+ * Without it, GoKwik clone-and-replaces any button whose label contains
7
+ * "checkout" / "place order" / "buy now" / "buy it now" — and `cloneNode` does not
8
+ * copy event listeners, so the button silently loses every React handler on it.
9
+ * Bundle CTA labels are merchant-configurable, so any of ours can match.
10
+ *
11
+ * Applied to the add-to-cart / add-to-bundle / checkout buttons only. Variant
12
+ * swatches, quantity steppers, filters and close buttons don't need it.
13
+ *
14
+ * It must be a JSX / `.attrs` attribute, never a runtime stamp: GoKwik registers
15
+ * its `document.body` MutationObserver before ours, so its callback always runs
16
+ * first and would claim the button before an observer of ours could mark it.
17
+ * React sets attributes before inserting the node, so the guard is already there.
18
+ *
19
+ * Cast because styled-components v6 only accepts known button props in `.attrs()` —
20
+ * React permits dashed attributes in JSX, but not in the prop type.
21
+ */
22
+ export declare const GOKWIK_GUARD_ATTRS: any;
@@ -8,6 +8,7 @@ import { GSTSectionCustomizationProps } from "./GSTSection";
8
8
  import { BundlePayload } from "../BundleBlock/Bundle";
9
9
  import { type FloatingCartDataProps } from "./FloatingCart";
10
10
  import { trustedBadgeInterface } from "./CheckoutSection";
11
+ import type { ItemSwapData, ItemSwapProduct, ItemSwapRequest } from "./ItemSwap";
11
12
  export interface Checkpoint {
12
13
  couponTemplateId: number;
13
14
  couponType: string;
@@ -269,6 +270,9 @@ export interface CartProps {
269
270
  drawerLayoutData?: DrawerLayout;
270
271
  cartConfigData?: cartConfigInterface;
271
272
  uploadImageAddonData?: uploadImageAddonInterface;
273
+ itemSwapData?: ItemSwapData;
274
+ itemSwapProducts?: Record<string, ItemSwapProduct>;
275
+ swapCartItem?: (request: ItemSwapRequest) => Promise<void>;
272
276
  }
273
277
  declare const _default: React.NamedExoticComponent<CartProps>;
274
278
  export default _default;
@@ -2,6 +2,7 @@ import React from "react";
2
2
  import { Checkpoint } from "./Cart";
3
3
  import type { cartConfigInterface } from "./CartDrawer";
4
4
  import { freebieMilestoneProps } from "./NextFreebieRow";
5
+ import { type ItemSwapData, type ItemSwapProduct, type ItemSwapRequest } from "./ItemSwap";
5
6
  type CartProductsListProps = {
6
7
  addCartItem?: (product: any, quantity?: number, triggeredFrom?: string) => Promise<any>;
7
8
  removeCartItem: (lineItemKey: string, triggeredFrom?: string, ytRequest?: boolean) => Promise<any>;
@@ -47,6 +48,9 @@ type CartProductsListProps = {
47
48
  customCartProgressBarCriteria?: string;
48
49
  effectiveQuantityForProgressBar?: number;
49
50
  isLargeScreen?: boolean;
51
+ itemSwapData?: ItemSwapData;
52
+ itemSwapProducts?: Record<string, ItemSwapProduct>;
53
+ swapCartItem?: (request: ItemSwapRequest) => Promise<void>;
50
54
  };
51
55
  declare const CartProductsList: React.FC<CartProductsListProps>;
52
56
  export default CartProductsList;
@@ -0,0 +1,37 @@
1
+ import React from "react";
2
+ export interface ItemSwapRule {
3
+ targetProductId: string;
4
+ swapVariantId: string;
5
+ }
6
+ export interface ItemSwapData {
7
+ enableItemSwap: boolean;
8
+ itemSwaps: ItemSwapRule[];
9
+ }
10
+ export interface ItemSwapProduct {
11
+ productTitle: string;
12
+ variantTitle?: string;
13
+ imageUrl?: string;
14
+ price: number;
15
+ }
16
+ export interface ItemSwapRequest {
17
+ lineItemKey: string;
18
+ swapVariantId: string;
19
+ }
20
+ type ItemSwapProps = {
21
+ product: any;
22
+ swapVariantId: string;
23
+ swapProduct: ItemSwapProduct;
24
+ onSwap: (request: ItemSwapRequest) => Promise<void>;
25
+ currency: string;
26
+ currencySymbol: string;
27
+ primaryTextColor?: string;
28
+ secondaryTextColor?: string;
29
+ themeColor?: string;
30
+ themeTextColor?: string;
31
+ backgroundSubdued?: string;
32
+ tertiaryTextColor?: string;
33
+ cartComponentsCornerType?: "rounded" | "sharp";
34
+ cartComponentsCornerRadius?: number;
35
+ };
36
+ declare const ItemSwap: React.FC<ItemSwapProps>;
37
+ export default ItemSwap;
@@ -35,11 +35,17 @@ export interface LoyaltyBalanceContentConfig extends LoyaltyTextContentConfig {
35
35
  purchaseValueMethod?: "order_count" | "purchase_value" | null;
36
36
  currencyCode?: string;
37
37
  }
38
+ /** Guest banner: the primary CTA plus an optional secondary one beside it. */
39
+ export interface LoyaltyBannerGuestConfig extends LoyaltyButtonContentConfig {
40
+ /** Off unless explicitly enabled, matching `badge.enabled`. */
41
+ showSecondaryButton?: boolean;
42
+ secondaryButtonText?: string;
43
+ }
38
44
  export interface LoyaltyBannerConfig extends LoyaltySectionConfig {
39
45
  alignment?: LoyaltyAlignment;
40
46
  imageUrl?: string;
41
47
  showTierProgress?: boolean;
42
- guestView?: LoyaltyButtonContentConfig;
48
+ guestView?: LoyaltyBannerGuestConfig;
43
49
  signedInView?: LoyaltyBalanceContentConfig;
44
50
  }
45
51
  export interface LoyaltyReferralContentConfig extends LoyaltyTextContentConfig {
@@ -214,6 +220,7 @@ export interface LoyaltyPageProps {
214
220
  referralLocked?: boolean;
215
221
  userData?: any;
216
222
  onBannerButtonClick?: LoyaltyActionHandler;
223
+ onBannerSecondaryButtonClick?: LoyaltyActionHandler;
217
224
  onReferralButtonClick?: LoyaltyActionHandler;
218
225
  onReferralCopyClick?: LoyaltyActionHandler<[referralLink: string]>;
219
226
  onRewardsButtonClick?: LoyaltyActionHandler;
@@ -224,5 +231,5 @@ export interface LoyaltyPageProps {
224
231
  freebie: LoyaltyWaysToRedeemFreebieConfig
225
232
  ]>;
226
233
  }
227
- export declare const LoyaltyPageBlock: ({ config, signedIn, referralLocked, userData, onBannerButtonClick, onReferralButtonClick, onReferralCopyClick, onRewardsButtonClick, onRedeemClick, onEarnMoreClick, onActiveCouponCopy, onFreebieAddToCart, }: LoyaltyPageProps) => React.JSX.Element;
234
+ export declare const LoyaltyPageBlock: ({ config, signedIn, referralLocked, userData, onBannerButtonClick, onBannerSecondaryButtonClick, onReferralButtonClick, onReferralCopyClick, onRewardsButtonClick, onRedeemClick, onEarnMoreClick, onActiveCouponCopy, onFreebieAddToCart, }: LoyaltyPageProps) => React.JSX.Element;
228
235
  export default LoyaltyPageBlock;