yt-uikit 0.7.344-shadowdomBundle.5 → 0.7.344-shadowdomBundle.50

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.
Files changed (37) hide show
  1. package/dist/esm/components/BundleBlock/BundleBuilder/ResponsiveBgImage.d.ts +9 -0
  2. package/dist/esm/components/BundleBlock/BundleBuilderTracker/BundleBuilderTracker.d.ts +1 -0
  3. package/dist/esm/components/BundleBlock/CollectionBundle/ColllectionBundle.d.ts +105 -0
  4. package/dist/esm/components/BundleBlock/CollectionBundle/FileUpload.d.ts +15 -0
  5. package/dist/esm/components/BundleBlock/CollectionBundle/LoadingSpinner.d.ts +2 -0
  6. package/dist/esm/components/BundleBlock/CollectionBundle/ProductDetailsModal.d.ts +15 -0
  7. package/dist/esm/components/BundleBlock/FixedBundle/SeparateVariantOptions.d.ts +1 -0
  8. package/dist/esm/components/BundleBlock/FixedBundle/VariantSelectorModal.d.ts +1 -0
  9. package/dist/esm/components/BundleBlock/ProductGridSkeleton/ProductGridSkeleton.d.ts +5 -0
  10. package/dist/esm/components/BundleBlock/VolumeBundle/VolumeBundle.d.ts +1 -1
  11. package/dist/esm/components/ProductOffersBlock/ProductOffersCoupon.d.ts +12 -0
  12. package/dist/esm/components/ProductOffersBlock/ProductOffersList.d.ts +12 -0
  13. package/dist/esm/components/ProductOffersBlock/ProductOffersTermsMobilePopover.d.ts +10 -0
  14. package/dist/esm/components/ProductOffersBlock/ProductOffersTermsPopup.d.ts +10 -0
  15. package/dist/esm/components/ProductOffersBlock/ProductsOffers.d.ts +32 -0
  16. package/dist/esm/components/index.d.ts +1 -0
  17. package/dist/esm/hooks/useShadowConfetti.d.ts +1 -0
  18. package/dist/esm/index.js +396 -396
  19. package/dist/esm/types/components/BundleBlock/BundleBuilder/ResponsiveBgImage.d.ts +9 -0
  20. package/dist/esm/types/components/BundleBlock/BundleBuilderTracker/BundleBuilderTracker.d.ts +1 -0
  21. package/dist/esm/types/components/BundleBlock/CollectionBundle/ColllectionBundle.d.ts +105 -0
  22. package/dist/esm/types/components/BundleBlock/CollectionBundle/FileUpload.d.ts +15 -0
  23. package/dist/esm/types/components/BundleBlock/CollectionBundle/LoadingSpinner.d.ts +2 -0
  24. package/dist/esm/types/components/BundleBlock/CollectionBundle/ProductDetailsModal.d.ts +15 -0
  25. package/dist/esm/types/components/BundleBlock/FixedBundle/SeparateVariantOptions.d.ts +1 -0
  26. package/dist/esm/types/components/BundleBlock/FixedBundle/VariantSelectorModal.d.ts +1 -0
  27. package/dist/esm/types/components/BundleBlock/ProductGridSkeleton/ProductGridSkeleton.d.ts +5 -0
  28. package/dist/esm/types/components/BundleBlock/VolumeBundle/VolumeBundle.d.ts +1 -1
  29. package/dist/esm/types/components/ProductOffersBlock/ProductOffersCoupon.d.ts +12 -0
  30. package/dist/esm/types/components/ProductOffersBlock/ProductOffersList.d.ts +12 -0
  31. package/dist/esm/types/components/ProductOffersBlock/ProductOffersTermsMobilePopover.d.ts +10 -0
  32. package/dist/esm/types/components/ProductOffersBlock/ProductOffersTermsPopup.d.ts +10 -0
  33. package/dist/esm/types/components/ProductOffersBlock/ProductsOffers.d.ts +32 -0
  34. package/dist/esm/types/components/index.d.ts +1 -0
  35. package/dist/esm/types/hooks/useShadowConfetti.d.ts +1 -0
  36. package/dist/index.d.ts +4 -1
  37. package/package.json +1 -1
@@ -0,0 +1,9 @@
1
+ import React from "react";
2
+ interface ResponsiveBackgroundImageProps {
3
+ coverImageUrl?: string;
4
+ mobileCoverImageUrl?: string;
5
+ alt?: string;
6
+ styles?: React.CSSProperties;
7
+ }
8
+ export declare const ResponsiveBackgroundImage: React.FC<ResponsiveBackgroundImageProps>;
9
+ export default ResponsiveBackgroundImage;
@@ -46,6 +46,7 @@ type BundleBuilderTrackerProps = {
46
46
  renderingOnPage: boolean;
47
47
  handleRemoveItemProductTier: (variantId: string, currentTier: number) => void;
48
48
  storeCurrencyCode?: string;
49
+ shadowRoot?: ShadowRoot | null;
49
50
  };
50
51
  export declare const BundleBuilderTrackerBar: React.FC<BundleBuilderTrackerProps>;
51
52
  export default BundleBuilderTrackerBar;
@@ -0,0 +1,105 @@
1
+ import React from "react";
2
+ export type Product = {
3
+ id: number;
4
+ title: string;
5
+ handle: string;
6
+ description: string | null;
7
+ published_at: string;
8
+ created_at: string;
9
+ vendor: string;
10
+ type: string;
11
+ tags: string[];
12
+ price: number;
13
+ price_min: number;
14
+ price_max: number;
15
+ available: boolean;
16
+ price_varies: boolean;
17
+ compare_at_price: number | null;
18
+ compare_at_price_min: number;
19
+ compare_at_price_max: number;
20
+ compare_at_price_varies: boolean;
21
+ variants: Array<{
22
+ id: number;
23
+ title: string;
24
+ option1: string | null;
25
+ option2: string | null;
26
+ option3: string | null;
27
+ sku: string;
28
+ requires_shipping: boolean;
29
+ taxable: boolean;
30
+ featured_image: any | null;
31
+ available: boolean;
32
+ name: string;
33
+ public_title: string;
34
+ options: string[];
35
+ price: number;
36
+ weight: number;
37
+ compare_at_price: number | null;
38
+ inventory_management: string;
39
+ barcode: string;
40
+ requires_selling_plan: boolean;
41
+ selling_plan_allocations: any[];
42
+ quantity_rule: {
43
+ min: number;
44
+ max: number | null;
45
+ increment: number;
46
+ };
47
+ }>;
48
+ images: string[];
49
+ image?: string;
50
+ options?: string[];
51
+ };
52
+ export type BundleConfig = {
53
+ config: {
54
+ shop: string;
55
+ collectionIds: string[];
56
+ type: "collection";
57
+ builderTiers: {
58
+ type: "collectionTier";
59
+ collectionTier: {
60
+ title: string;
61
+ tier: number;
62
+ minimumQuantity: number;
63
+ collectionId: string;
64
+ handle: string;
65
+ products: Product[];
66
+ }[];
67
+ };
68
+ form?: {
69
+ title?: string;
70
+ sections?: {
71
+ title: string;
72
+ type: "text" | "image";
73
+ fields: {
74
+ title: string;
75
+ }[];
76
+ }[];
77
+ };
78
+ };
79
+ customizations: {
80
+ borderRadius: string;
81
+ atcBg: string;
82
+ atcText: string;
83
+ productImageRatio: string;
84
+ bundleBg: string;
85
+ bundleText: string;
86
+ bundleBorder: string;
87
+ btnPrimaryBg: string;
88
+ btnPrimaryText: string;
89
+ productCardBorder: string;
90
+ productCardBg: string;
91
+ productCardShadow: string;
92
+ hideSelectedProducts: boolean;
93
+ allowMultipleQty: boolean;
94
+ hideOutOfStockProducts: boolean;
95
+ bundleRedirection: "cart-drawer" | "checkout";
96
+ checkoutPartner: "shopify" | "razorpay" | "shiprocket" | "gokwik" | "breeze" | "zecpay" | "shopflo";
97
+ };
98
+ };
99
+ interface CollectionBundleProps {
100
+ config: BundleConfig;
101
+ addCustomBundleToCart: (items: any) => void;
102
+ bundleAddToCartLoading: boolean;
103
+ }
104
+ declare const CollectionBundle: ({ config, bundleAddToCartLoading, addCustomBundleToCart, }: CollectionBundleProps) => React.JSX.Element;
105
+ export default CollectionBundle;
@@ -0,0 +1,15 @@
1
+ import React from "react";
2
+ interface UploadFieldProps {
3
+ title: string;
4
+ uploadState?: {
5
+ url?: string;
6
+ name?: string;
7
+ loading?: boolean;
8
+ error?: boolean;
9
+ } | string;
10
+ onUpload: () => void;
11
+ onRemove: () => void;
12
+ onRetry: () => void;
13
+ }
14
+ export declare const UploadField: ({ title, uploadState, onUpload, onRemove, onRetry, }: UploadFieldProps) => React.JSX.Element;
15
+ export {};
@@ -0,0 +1,2 @@
1
+ import React from "react";
2
+ export declare const LoaderSpinner: () => React.JSX.Element;
@@ -0,0 +1,15 @@
1
+ import React from "react";
2
+ import { Product, BundleConfig } from "./ColllectionBundle";
3
+ type ProductDetailsModalProps = {
4
+ product: Product;
5
+ tierIdx: number;
6
+ isOpen: boolean;
7
+ onClose: () => void;
8
+ onAddToBundle: (product: Product, tierIdx: number) => void;
9
+ canAdd: boolean;
10
+ isSelected: boolean;
11
+ customizations: BundleConfig["customizations"];
12
+ isMobile: boolean;
13
+ };
14
+ export declare const ProductDetailsModal: ({ product, tierIdx, isOpen, onClose, onAddToBundle, canAdd, isSelected, customizations, isMobile, }: ProductDetailsModalProps) => React.ReactPortal | null;
15
+ export {};
@@ -34,6 +34,7 @@ interface ProductVariantSelectorProps {
34
34
  variantType?: string;
35
35
  variantId?: string;
36
36
  primaryProductId?: string;
37
+ shadowRoot?: ShadowRoot | null;
37
38
  }
38
39
  export declare const ProductVariantSelector: React.FC<ProductVariantSelectorProps>;
39
40
  export {};
@@ -13,6 +13,7 @@ interface VariantSelectorModalProps {
13
13
  variantId?: string;
14
14
  onVariantChange: (productId: string, variantId: string) => void;
15
15
  handleAddToCart: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => Promise<void>;
16
+ shadowRoot?: ShadowRoot | null;
16
17
  }
17
18
  declare const VariantSelectorModal: React.FC<VariantSelectorModalProps>;
18
19
  export default VariantSelectorModal;
@@ -0,0 +1,5 @@
1
+ import React from "react";
2
+ import "./ProductGridSkeleton.css";
3
+ type ProductGridSkeletonProps = {};
4
+ declare const ProductGridSkeleton: React.FC<ProductGridSkeletonProps>;
5
+ export default ProductGridSkeleton;
@@ -1,3 +1,3 @@
1
1
  import React from "react";
2
2
  import { BundleProps } from "../Bundle";
3
- export default function VolumeBundle({ bundle, addToCartFunction, currentProductId, }: BundleProps): React.JSX.Element;
3
+ export default function VolumeBundle({ bundle, addToCartFunction, currentProductId, shadowRoot }: BundleProps): React.JSX.Element;
@@ -0,0 +1,12 @@
1
+ import React from "react";
2
+ import { CartCheckpoint } from "./ProductsOffers";
3
+ import { ProductsOffersConfigType } from "./ProductsOffers";
4
+ interface ProductOffersCouponProps {
5
+ offersToShow: CartCheckpoint[];
6
+ offersConfig?: ProductsOffersConfigType | null;
7
+ getOfferCardMessage: (offer: CartCheckpoint) => string;
8
+ setSelectedOffer: (offer: CartCheckpoint | null) => void;
9
+ setShowPopup: (show: boolean) => void;
10
+ }
11
+ export declare const ProductOffersCoupon: ({ offersToShow, offersConfig, getOfferCardMessage, setSelectedOffer, setShowPopup, }: ProductOffersCouponProps) => React.JSX.Element;
12
+ export {};
@@ -0,0 +1,12 @@
1
+ import React from "react";
2
+ import { CartCheckpoint } from "./ProductsOffers";
3
+ import { ProductsOffersConfigType } from "./ProductsOffers";
4
+ interface ProductOffersListProps {
5
+ offersToShow: CartCheckpoint[];
6
+ offersConfig: ProductsOffersConfigType;
7
+ getOfferCardMessage: (offer: CartCheckpoint) => string;
8
+ setSelectedOffer: (offer: CartCheckpoint | null) => void;
9
+ setShowPopup: (show: boolean) => void;
10
+ }
11
+ export declare const ProductOffersList: ({ offersToShow, offersConfig, getOfferCardMessage, setSelectedOffer, setShowPopup, }: ProductOffersListProps) => React.JSX.Element;
12
+ export {};
@@ -0,0 +1,10 @@
1
+ import React from "react";
2
+ import { CartCheckpoint, OfferTermsAndConditions } from "./ProductsOffers";
3
+ import { ProductsOffersConfigType } from "./ProductsOffers";
4
+ export declare const ProductOffersTermsMobilePopover: ({ showPopup, selectedOffer, selectedOfferTerms, onClose, offersConfig, }: {
5
+ showPopup: boolean;
6
+ selectedOffer: CartCheckpoint | null;
7
+ selectedOfferTerms: OfferTermsAndConditions | null;
8
+ onClose: () => void;
9
+ offersConfig?: ProductsOffersConfigType | null | undefined;
10
+ }) => React.ReactPortal | null;
@@ -0,0 +1,10 @@
1
+ import React from "react";
2
+ import { CartCheckpoint, OfferTermsAndConditions } from "./ProductsOffers";
3
+ import { ProductsOffersConfigType } from "./ProductsOffers";
4
+ export declare const ProductOffersTermsPopup: ({ showPopup, selectedOffer, selectedOfferTerms, onClose, offersConfig, }: {
5
+ showPopup: boolean;
6
+ selectedOffer: CartCheckpoint | null;
7
+ selectedOfferTerms: OfferTermsAndConditions | null;
8
+ onClose: () => void;
9
+ offersConfig?: ProductsOffersConfigType | null | undefined;
10
+ }) => React.ReactPortal | null;
@@ -0,0 +1,32 @@
1
+ import React from "react";
2
+ import { Checkpoint } from "../Cart/Cart";
3
+ export interface ProductsOffersConfigType {
4
+ sectionType?: "coupon" | "list";
5
+ sectionTitle?: string;
6
+ sectionBackgroundColor?: string;
7
+ sectionBgContrastColor?: string;
8
+ cardBackgroundColor?: string;
9
+ cardBackgroundTransparent?: boolean;
10
+ textColor?: string;
11
+ accentColor?: string;
12
+ roundness?: number;
13
+ cardPadding?: number;
14
+ viewDetailsTitle?: string;
15
+ alignment?: "left" | "middle" | "right";
16
+ iconVisibility?: boolean;
17
+ popupIsolationStrategy?: "revert" | "revert-layer" | "unset" | "initial" | "inherit" | "none";
18
+ }
19
+ export interface CartCheckpoint extends Checkpoint {
20
+ customCartProgressBarCriteria?: string | null;
21
+ discountPercentage?: number | null;
22
+ discountId?: number | null;
23
+ }
24
+ export interface OfferTermsAndConditions {
25
+ offerMessage: string;
26
+ terms: string[];
27
+ }
28
+ declare const ProductsOffers: ({ offersConfig, offers, }: {
29
+ offersConfig?: ProductsOffersConfigType | null | undefined;
30
+ offers: CartCheckpoint[];
31
+ }) => React.JSX.Element;
32
+ export default ProductsOffers;
@@ -4,3 +4,4 @@ export { default as Cart } from "./Cart";
4
4
  export { default as CouponFrame } from "./CouponFrame";
5
5
  export { default as Bundle } from "./BundleBlock";
6
6
  export { default as BundleLoader } from "./BundleBlock/Loader";
7
+ export { default as ProductGridSkeleton } from "../components/BundleBlock/ProductGridSkeleton/ProductGridSkeleton";
@@ -0,0 +1 @@
1
+ export declare function useShadowConfetti(): (options: any) => void;