yt-uikit 0.7.417 → 0.7.418-TestVersion.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.
Files changed (27) hide show
  1. package/dist/esm/components/BundleBlock/Bundle.d.ts +6 -1
  2. package/dist/esm/components/BundleBlock/BundleBuilder/BundleBuilder.d.ts +2 -3
  3. package/dist/esm/components/BundleBlock/BundleBuilder/VariantOptionsModal.d.ts +0 -1
  4. package/dist/esm/components/BundleBlock/BundleProductDetailsModal/BundleProductDetailsModal.d.ts +0 -1
  5. package/dist/esm/components/BundleBlock/CollectionBundle/ColllectionBundle.d.ts +5 -3
  6. package/dist/esm/components/BundleBlock/ProductGridSkeleton/ProductGridSkeleton.d.ts +5 -0
  7. package/dist/esm/components/BundleBlock/VolumeBundle/temp.d.ts +3 -0
  8. package/dist/esm/components/Cart/FreebieClaim.d.ts +17 -0
  9. package/dist/esm/components/Cart/VariantSelectionPopup/MobileVariantPopover.styled.d.ts +49 -0
  10. package/dist/esm/components/index.d.ts +1 -0
  11. package/dist/esm/hooks/useShadowConfetti.d.ts +1 -0
  12. package/dist/esm/index.js +422 -420
  13. package/dist/esm/shadowStyles.d.ts +1 -0
  14. package/dist/esm/types/components/BundleBlock/Bundle.d.ts +6 -1
  15. package/dist/esm/types/components/BundleBlock/BundleBuilder/BundleBuilder.d.ts +2 -3
  16. package/dist/esm/types/components/BundleBlock/BundleBuilder/VariantOptionsModal.d.ts +0 -1
  17. package/dist/esm/types/components/BundleBlock/BundleProductDetailsModal/BundleProductDetailsModal.d.ts +0 -1
  18. package/dist/esm/types/components/BundleBlock/CollectionBundle/ColllectionBundle.d.ts +5 -3
  19. package/dist/esm/types/components/BundleBlock/ProductGridSkeleton/ProductGridSkeleton.d.ts +5 -0
  20. package/dist/esm/types/components/BundleBlock/VolumeBundle/temp.d.ts +3 -0
  21. package/dist/esm/types/components/Cart/FreebieClaim.d.ts +17 -0
  22. package/dist/esm/types/components/Cart/VariantSelectionPopup/MobileVariantPopover.styled.d.ts +49 -0
  23. package/dist/esm/types/components/index.d.ts +1 -0
  24. package/dist/esm/types/hooks/useShadowConfetti.d.ts +1 -0
  25. package/dist/esm/types/shadowStyles.d.ts +1 -0
  26. package/dist/index.d.ts +32 -1
  27. package/package.json +1 -1
@@ -0,0 +1 @@
1
+ export declare const ytBundleShadowCss: string;
@@ -50,6 +50,10 @@ export type VariantNode = {
50
50
  image: ProductImage;
51
51
  availableForSale: boolean;
52
52
  inventoryQuantity: number;
53
+ inventoryItem?: {
54
+ tracked?: boolean;
55
+ };
56
+ inventoryPolicy?: "deny" | "continue";
53
57
  };
54
58
  };
55
59
  type SelectedVariantDetails = {
@@ -83,6 +87,7 @@ export type ProductDetails = {
83
87
  status: "active" | "archived" | "draft" | "";
84
88
  options: ProductOption[];
85
89
  onlineStoreUrl: string;
90
+ tracksInventory?: boolean;
86
91
  collections: {
87
92
  edges: CollectionNode[];
88
93
  };
@@ -374,7 +379,7 @@ export type BundleProps = {
374
379
  };
375
380
  export declare const currencyPrice: (price: number | string | undefined) => string | undefined;
376
381
  export declare const getCurrencySymbol: (genSymbol: string, storeCurrencyCode?: string) => string;
377
- export declare const optimiseImage: (url: string) => string;
382
+ export declare const optimiseImage: (url: string, width?: number) => string;
378
383
  export declare const handleAddToBundle: (variantId: string, product: ProductDetails, quantity: number, selectedItems: {
379
384
  variantId: string;
380
385
  product: ProductDetails;
@@ -1,7 +1,7 @@
1
1
  import "../bundle.scss";
2
2
  import React from "react";
3
3
  import { BundlePayload, ProductDetails } from "../Bundle";
4
- export declare function QuantitySelectorForBundle({ quantity, setQuantity, remainingQuantity, handleAddToBundle, variantId, product, handleRemoveItem, hideAddToBundle, disableInventoryTracking, selectedVariantInventoryQty, }: {
4
+ export declare function QuantitySelectorForBundle({ quantity, setQuantity, remainingQuantity, handleAddToBundle, variantId, product, handleRemoveItem, hideAddToBundle, selectedVariantInventoryQty, }: {
5
5
  quantity: number;
6
6
  setQuantity: React.Dispatch<React.SetStateAction<number>>;
7
7
  remainingQuantity: number;
@@ -10,8 +10,7 @@ export declare function QuantitySelectorForBundle({ quantity, setQuantity, remai
10
10
  product?: ProductDetails;
11
11
  handleRemoveItem?: (variantId: string, quantity: number) => void;
12
12
  hideAddToBundle?: boolean;
13
- disableInventoryTracking?: boolean;
14
- selectedVariantInventoryQty: number;
13
+ selectedVariantInventoryQty: number | typeof Infinity;
15
14
  }): React.JSX.Element;
16
15
  type BundleBuilderProps = {
17
16
  bundle: BundlePayload;
@@ -10,7 +10,6 @@ interface SingleProductVariantOptionsModalProps {
10
10
  backgroundColor: string;
11
11
  };
12
12
  onConfirm: (variantId: string) => void;
13
- disableInventoryTracking?: boolean;
14
13
  }
15
14
  declare const SingleProductVariantOptionsModal: React.FC<SingleProductVariantOptionsModalProps>;
16
15
  export default SingleProductVariantOptionsModal;
@@ -11,7 +11,6 @@ type BundleProductDetailsModalProps = {
11
11
  remainingQuantity: number;
12
12
  hideAddToBundle: boolean;
13
13
  disableQuantitySelector: boolean;
14
- disableInventoryTracking: boolean;
15
14
  themeColor?: string;
16
15
  cornerRadius: string;
17
16
  primaryTextColorCta: string;
@@ -65,9 +65,9 @@ export type BundleConfig = {
65
65
  products: Product[];
66
66
  }[];
67
67
  };
68
- form: {
69
- title: string;
70
- sections: {
68
+ form?: {
69
+ title?: string;
70
+ sections?: {
71
71
  title: string;
72
72
  type: "text" | "image";
73
73
  fields: {
@@ -92,6 +92,8 @@ export type BundleConfig = {
92
92
  hideSelectedProducts: boolean;
93
93
  allowMultipleQty: boolean;
94
94
  hideOutOfStockProducts: boolean;
95
+ bundleRedirection: "cart-drawer" | "checkout";
96
+ checkoutPartner: "shopify" | "razorpay" | "shiprocket" | "gokwik" | "breeze" | "zecpay" | "shopflo";
95
97
  };
96
98
  };
97
99
  interface CollectionBundleProps {
@@ -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;
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ import { BundleProps } from "../Bundle";
3
+ export default function VolumeBundle({ bundle, addToCartFunction, currentProductId, }: BundleProps): React.JSX.Element;
@@ -0,0 +1,17 @@
1
+ import React from "react";
2
+ type FreebieClaimProps = {
3
+ freebieProductsInCart: any;
4
+ freebieSectionTitle?: string;
5
+ themeColor?: string;
6
+ themeTextColor?: string;
7
+ checkpoints?: any;
8
+ addFreebieToCart?: (variantId: string, originalAllowedVariantIds?: string[]) => Promise<void>;
9
+ freebiesInCart: string[];
10
+ showFreebieClaimAsPopup?: boolean;
11
+ productClaimCtaButtonText?: string;
12
+ imageAspectSelector?: "square" | "portrait";
13
+ freebieCouponTemplates?: any;
14
+ };
15
+ export declare const FreebieClaimPopup: React.ForwardRefExoticComponent<FreebieClaimProps & React.RefAttributes<HTMLDivElement>>;
16
+ declare const FreebieClaim: React.FC<FreebieClaimProps>;
17
+ export default FreebieClaim;
@@ -0,0 +1,49 @@
1
+ /// <reference types="react" />
2
+ export declare const VariantSelectionPopupContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
3
+ export declare const ModalContent: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
4
+ $themeColor?: string | undefined;
5
+ $cornerRadius?: number | undefined;
6
+ $backgroundColor?: string | undefined;
7
+ }>> & string;
8
+ export declare const CloseButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
9
+ export declare const ProductDetails: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
10
+ export declare const ProductImage: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, never>> & string;
11
+ export declare const ProductInfo: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
12
+ export declare const ProductTitle: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, {
13
+ $themeColor?: string | undefined;
14
+ }>> & string;
15
+ export declare const ProductPrice: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
16
+ primaryTextColor?: string | undefined;
17
+ }>> & string;
18
+ export declare const OriginalPrice: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
19
+ export declare const ViewDetailsLink: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, never>> & string;
20
+ export declare const OptionContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
21
+ export declare const OptionTitle: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
22
+ export declare const OptionsWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
23
+ export declare const VariantOption: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {
24
+ $isSelected?: boolean | undefined;
25
+ $isDisabled?: boolean | undefined;
26
+ $themeColor?: string | undefined;
27
+ backgroundColor?: string | undefined;
28
+ }>> & string;
29
+ export declare const CartButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {
30
+ $themeColor: string;
31
+ }>> & string;
32
+ export declare const LoaderContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
33
+ 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;
34
+ export declare const MainSelectorContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
35
+ $backgroundColor: string;
36
+ }>> & string;
37
+ export declare const FlexContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
38
+ export declare const DetailsSection: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
39
+ export declare const PriceSection: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
40
+ export declare const LinkSection: 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 ActionsSection: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
42
+ export declare const ReplaceButtonContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
43
+ export declare const ReplaceButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {
44
+ $themeColor?: string | undefined;
45
+ $cornerRadius?: number | undefined;
46
+ $cornerType?: string | undefined;
47
+ $disabled?: boolean | undefined;
48
+ }>> & string;
49
+ export declare const ReplaceButtonContent: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
@@ -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 ProductOffers, ProductsOffersConfigType, CartCheckpoint, } from "./ProductOffersBlock/ProductsOffers";
@@ -0,0 +1 @@
1
+ export declare function useShadowConfetti(): (options: any) => void;
@@ -0,0 +1 @@
1
+ export declare const ytBundleShadowCss: string;
package/dist/index.d.ts CHANGED
@@ -123,6 +123,10 @@ type VariantNode = {
123
123
  image: ProductImage;
124
124
  availableForSale: boolean;
125
125
  inventoryQuantity: number;
126
+ inventoryItem?: {
127
+ tracked?: boolean;
128
+ };
129
+ inventoryPolicy?: "deny" | "continue";
126
130
  };
127
131
  };
128
132
  type SelectedVariantDetails = {
@@ -156,6 +160,7 @@ type ProductDetails = {
156
160
  status: "active" | "archived" | "draft" | "";
157
161
  options: ProductOption[];
158
162
  onlineStoreUrl: string;
163
+ tracksInventory?: boolean;
159
164
  collections: {
160
165
  edges: CollectionNode[];
161
166
  };
@@ -732,4 +737,30 @@ declare const Cart: React.FC<CartProps>;
732
737
  type BundleLoaderProps = {};
733
738
  declare const BundleLoader: React.FC<BundleLoaderProps>;
734
739
 
735
- export { Bundle, BundleLoader, Cart, CouponFrame, Nudge, SpinnerWheel };
740
+ interface ProductsOffersConfigType {
741
+ sectionType?: "coupon" | "list";
742
+ sectionTitle?: string;
743
+ sectionBackgroundColor?: string;
744
+ sectionBgContrastColor?: string;
745
+ cardBackgroundColor?: string;
746
+ cardBackgroundTransparent?: boolean;
747
+ textColor?: string;
748
+ accentColor?: string;
749
+ roundness?: number;
750
+ cardPadding?: number;
751
+ viewDetailsTitle?: string;
752
+ alignment?: "left" | "middle" | "right";
753
+ iconVisibility?: boolean;
754
+ popupIsolationStrategy?: "revert" | "revert-layer" | "unset" | "initial" | "inherit" | "none";
755
+ }
756
+ interface CartCheckpoint extends Checkpoint {
757
+ customCartProgressBarCriteria?: string | null;
758
+ discountPercentage?: number | null;
759
+ discountId?: number | null;
760
+ }
761
+ declare const ProductsOffers: ({ offersConfig, offers, }: {
762
+ offersConfig?: ProductsOffersConfigType | null | undefined;
763
+ offers: CartCheckpoint[];
764
+ }) => React.JSX.Element;
765
+
766
+ export { Bundle, BundleLoader, Cart, CartCheckpoint, CouponFrame, Nudge, ProductsOffers as ProductOffers, ProductsOffersConfigType, SpinnerWheel };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yt-uikit",
3
- "version": "0.7.417",
3
+ "version": "0.7.418-TestVersion.1",
4
4
  "description": "YourToken UI Kit",
5
5
  "scripts": {
6
6
  "rollup": "tsc && rollup -c",