yt-uikit 0.7.413 → 0.7.414-hide-progress.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.
Files changed (232) hide show
  1. package/README.md +94 -94
  2. package/dist/esm/atoms/bundleBuilderProductDetailsAtom.d.ts +4 -4
  3. package/dist/esm/atoms/cartDataAtom.d.ts +3 -3
  4. package/dist/esm/atoms/cartLoadingAtom.d.ts +22 -22
  5. package/dist/esm/atoms/cartTimer.d.ts +2 -2
  6. package/dist/esm/atoms/couponSelectionOpenAtom.d.ts +3 -3
  7. package/dist/esm/atoms/dateAtom.d.ts +1 -1
  8. package/dist/esm/atoms/freebieClaimModalAtom.d.ts +7 -7
  9. package/dist/esm/atoms/giftWrap.d.ts +2 -2
  10. package/dist/esm/atoms/gstCompanyNameAtom.d.ts +1 -1
  11. package/dist/esm/atoms/gstInputAtom.d.ts +1 -1
  12. package/dist/esm/atoms/maxQtyErrorAtom.d.ts +3 -3
  13. package/dist/esm/atoms/multiClaimSelectionAtom.d.ts +19 -19
  14. package/dist/esm/atoms/noteInputAtom.d.ts +3 -3
  15. package/dist/esm/atoms/postalCodeAtom.d.ts +1 -1
  16. package/dist/esm/atoms/shippingAtom.d.ts +8 -8
  17. package/dist/esm/atoms/showGSTInputAtom.d.ts +1 -1
  18. package/dist/esm/atoms/variantSelectionModalAtom.d.ts +23 -23
  19. package/dist/esm/components/BundleBlock/Bundle.d.ts +388 -388
  20. package/dist/esm/components/BundleBlock/BundleBuilder/BundleBuilder.d.ts +39 -39
  21. package/dist/esm/components/BundleBlock/BundleBuilder/ResponsiveBgImage.d.ts +9 -9
  22. package/dist/esm/components/BundleBlock/BundleBuilder/VariantOptionsModal.d.ts +16 -16
  23. package/dist/esm/components/BundleBlock/BundleBuilder/bundleBuilder.style.d.ts +35 -37
  24. package/dist/esm/components/BundleBlock/BundleBuilderTracker/BundleBuilderTracker.d.ts +50 -50
  25. package/dist/esm/components/BundleBlock/BundleBuilderTracker/bundleBuilderTracker.style.d.ts +75 -77
  26. package/dist/esm/components/BundleBlock/BundleProductDetailsModal/BundleProductDetailsModal.d.ts +27 -27
  27. package/dist/esm/components/BundleBlock/BundleProductDetailsModal/bundleProductDetailsModal.style.d.ts +10 -10
  28. package/dist/esm/components/BundleBlock/CollectionBundle/ColllectionBundle.d.ts +103 -103
  29. package/dist/esm/components/BundleBlock/CollectionBundle/FileUpload.d.ts +15 -15
  30. package/dist/esm/components/BundleBlock/CollectionBundle/LoadingSpinner.d.ts +2 -2
  31. package/dist/esm/components/BundleBlock/CollectionBundle/ProductDetailsModal.d.ts +15 -15
  32. package/dist/esm/components/BundleBlock/ComboBundle.d.ts +16 -16
  33. package/dist/esm/components/BundleBlock/FixedBundle/FixedBundle.d.ts +4 -4
  34. package/dist/esm/components/BundleBlock/FixedBundle/SeparateVariantOptions.d.ts +39 -39
  35. package/dist/esm/components/BundleBlock/FixedBundle/VariantSelectorModal.d.ts +22 -22
  36. package/dist/esm/components/BundleBlock/FixedBundle/fixedBundle.style.d.ts +84 -90
  37. package/dist/esm/components/BundleBlock/Loader.d.ts +5 -5
  38. package/dist/esm/components/BundleBlock/MixAndMatchBundle/MixAndMatchBundle.d.ts +8 -8
  39. package/dist/esm/components/BundleBlock/MixAndMatchBundle/mixAndMatchBundle.style.d.ts +86 -86
  40. package/dist/esm/components/BundleBlock/VolumeBundle/VolumeBundle.d.ts +3 -3
  41. package/dist/esm/components/BundleBlock/VolumeBundle/volumeBundle.style.d.ts +78 -80
  42. package/dist/esm/components/BundleBlock/index.d.ts +1 -1
  43. package/dist/esm/components/Cart/ApplyCoupon.d.ts +12 -12
  44. package/dist/esm/components/Cart/Bundle.d.ts +6 -6
  45. package/dist/esm/components/Cart/Cart.d.ts +235 -235
  46. package/dist/esm/components/Cart/CartDrawer.d.ts +21 -21
  47. package/dist/esm/components/Cart/CartOffersCarousel.d.ts +45 -45
  48. package/dist/esm/components/Cart/CartProductsList.d.ts +45 -45
  49. package/dist/esm/components/Cart/CartTimer.d.ts +8 -8
  50. package/dist/esm/components/Cart/CheckoutSection.d.ts +38 -38
  51. package/dist/esm/components/Cart/CouponSelection.d.ts +25 -25
  52. package/dist/esm/components/Cart/DatePicker.d.ts +10 -10
  53. package/dist/esm/components/Cart/EmptyCart.d.ts +33 -33
  54. package/dist/esm/components/Cart/FooterSections.d.ts +6 -6
  55. package/dist/esm/components/Cart/FreebieClaimManager.d.ts +18 -18
  56. package/dist/esm/components/Cart/FreebieClaimOverlay.d.ts +18 -18
  57. package/dist/esm/components/Cart/FreebieClaimOverlayCard.d.ts +10 -10
  58. package/dist/esm/components/Cart/FreebieClaimSection.d.ts +18 -18
  59. package/dist/esm/components/Cart/FreebieClaimSectionCard.d.ts +17 -17
  60. package/dist/esm/components/Cart/GSTSection.d.ts +15 -15
  61. package/dist/esm/components/Cart/GiftWrap.d.ts +14 -14
  62. package/dist/esm/components/Cart/GuestDiscountCoupon.d.ts +9 -9
  63. package/dist/esm/components/Cart/InlineCartOfferInfoText.d.ts +10 -10
  64. package/dist/esm/components/Cart/LoyaltyAppliedCTA.d.ts +19 -19
  65. package/dist/esm/components/Cart/LoyaltyApplyCTA.d.ts +18 -18
  66. package/dist/esm/components/Cart/LoyaltyBadge.d.ts +10 -10
  67. package/dist/esm/components/Cart/LoyaltyGuestCTA.d.ts +17 -17
  68. package/dist/esm/components/Cart/MultiStepProgressBar/CheckpointConfetti.d.ts +11 -11
  69. package/dist/esm/components/Cart/MultiStepProgressBar/CheckpointIcon.d.ts +3 -3
  70. package/dist/esm/components/Cart/MultiStepProgressBar/CheckpointTooltip.d.ts +3 -3
  71. package/dist/esm/components/Cart/MultiStepProgressBar/MultiStepIcon.d.ts +9 -9
  72. package/dist/esm/components/Cart/MultiStepProgressBar/MultiStepProgressBar.d.ts +5 -5
  73. package/dist/esm/components/Cart/MultiStepProgressBar/MultiStepProgressBar.styled.d.ts +45 -45
  74. package/dist/esm/components/Cart/MultiStepProgressBar/MultiStepUtils.d.ts +6 -5
  75. package/dist/esm/components/Cart/MultiStepProgressBar/MultiTierProgressBar.d.ts +4 -4
  76. package/dist/esm/components/Cart/MultiStepProgressBar/MutiTierNextRewardMessage.d.ts +3 -3
  77. package/dist/esm/components/Cart/MultiStepProgressBar/NextRewardMessage.d.ts +3 -3
  78. package/dist/esm/components/Cart/MultiStepProgressBar/SingleTierProgressBar.d.ts +4 -4
  79. package/dist/esm/components/Cart/MultiStepProgressBar/SingleTierProgressBar.styled.d.ts +22 -22
  80. package/dist/esm/components/Cart/MultiStepProgressBar/SingletTierNextRewardMessage.d.ts +3 -3
  81. package/dist/esm/components/Cart/MultiStepProgressBar/types.d.ts +55 -55
  82. package/dist/esm/components/Cart/NextFreebieRow.d.ts +19 -19
  83. package/dist/esm/components/Cart/NoteSection.d.ts +8 -8
  84. package/dist/esm/components/Cart/ProductCard.d.ts +30 -30
  85. package/dist/esm/components/Cart/ProductRecCard.d.ts +20 -20
  86. package/dist/esm/components/Cart/ProductRecList.d.ts +23 -23
  87. package/dist/esm/components/Cart/ProgressBar.d.ts +13 -13
  88. package/dist/esm/components/Cart/ProgressBarCartLoader.d.ts +7 -7
  89. package/dist/esm/components/Cart/QuantitySelector.d.ts +12 -12
  90. package/dist/esm/components/Cart/RegionSpecificDelivery.d.ts +17 -17
  91. package/dist/esm/components/Cart/RewardPointsPreview.d.ts +10 -10
  92. package/dist/esm/components/Cart/StandardDelivery.d.ts +11 -11
  93. package/dist/esm/components/Cart/StickyCart.d.ts +52 -52
  94. package/dist/esm/components/Cart/VariantSelectionPopup/DesktopVariantPopup.d.ts +19 -19
  95. package/dist/esm/components/Cart/VariantSelectionPopup/DesktopVariantPopup.styled.d.ts +60 -60
  96. package/dist/esm/components/Cart/VariantSelectionPopup/MobileVariantPopover.d.ts +19 -19
  97. package/dist/esm/components/Cart/index.d.ts +1 -1
  98. package/dist/esm/components/CouponFrame/CouponFrame.d.ts +15 -15
  99. package/dist/esm/components/CouponFrame/index.d.ts +1 -1
  100. package/dist/esm/components/Nudge/LeadGenerationNudge.d.ts +15 -15
  101. package/dist/esm/components/Nudge/Nudge.d.ts +40 -40
  102. package/dist/esm/components/Nudge/index.d.ts +1 -1
  103. package/dist/esm/components/SpinnerWheel/SpinnerWheel.d.ts +23 -23
  104. package/dist/esm/components/SpinnerWheel/WheelSection.d.ts +9 -9
  105. package/dist/esm/components/SpinnerWheel/index.d.ts +1 -1
  106. package/dist/esm/components/index.d.ts +6 -6
  107. package/dist/esm/index.d.ts +1 -1
  108. package/dist/esm/index.js +395 -395
  109. package/dist/esm/types/atoms/bundleBuilderProductDetailsAtom.d.ts +4 -4
  110. package/dist/esm/types/atoms/cartDataAtom.d.ts +3 -3
  111. package/dist/esm/types/atoms/cartLoadingAtom.d.ts +22 -22
  112. package/dist/esm/types/atoms/cartTimer.d.ts +2 -2
  113. package/dist/esm/types/atoms/couponSelectionOpenAtom.d.ts +3 -3
  114. package/dist/esm/types/atoms/dateAtom.d.ts +1 -1
  115. package/dist/esm/types/atoms/freebieClaimModalAtom.d.ts +7 -7
  116. package/dist/esm/types/atoms/giftWrap.d.ts +2 -2
  117. package/dist/esm/types/atoms/gstCompanyNameAtom.d.ts +1 -1
  118. package/dist/esm/types/atoms/gstInputAtom.d.ts +1 -1
  119. package/dist/esm/types/atoms/maxQtyErrorAtom.d.ts +3 -3
  120. package/dist/esm/types/atoms/multiClaimSelectionAtom.d.ts +19 -19
  121. package/dist/esm/types/atoms/noteInputAtom.d.ts +3 -3
  122. package/dist/esm/types/atoms/postalCodeAtom.d.ts +1 -1
  123. package/dist/esm/types/atoms/shippingAtom.d.ts +8 -8
  124. package/dist/esm/types/atoms/showGSTInputAtom.d.ts +1 -1
  125. package/dist/esm/types/atoms/variantSelectionModalAtom.d.ts +23 -23
  126. package/dist/esm/types/components/BundleBlock/Bundle.d.ts +388 -388
  127. package/dist/esm/types/components/BundleBlock/BundleBuilder/BundleBuilder.d.ts +39 -39
  128. package/dist/esm/types/components/BundleBlock/BundleBuilder/ResponsiveBgImage.d.ts +9 -9
  129. package/dist/esm/types/components/BundleBlock/BundleBuilder/VariantOptionsModal.d.ts +16 -16
  130. package/dist/esm/types/components/BundleBlock/BundleBuilder/bundleBuilder.style.d.ts +35 -37
  131. package/dist/esm/types/components/BundleBlock/BundleBuilderTracker/BundleBuilderTracker.d.ts +50 -50
  132. package/dist/esm/types/components/BundleBlock/BundleBuilderTracker/bundleBuilderTracker.style.d.ts +75 -77
  133. package/dist/esm/types/components/BundleBlock/BundleProductDetailsModal/BundleProductDetailsModal.d.ts +27 -27
  134. package/dist/esm/types/components/BundleBlock/BundleProductDetailsModal/bundleProductDetailsModal.style.d.ts +10 -10
  135. package/dist/esm/types/components/BundleBlock/CollectionBundle/ColllectionBundle.d.ts +103 -103
  136. package/dist/esm/types/components/BundleBlock/CollectionBundle/FileUpload.d.ts +15 -15
  137. package/dist/esm/types/components/BundleBlock/CollectionBundle/LoadingSpinner.d.ts +2 -2
  138. package/dist/esm/types/components/BundleBlock/CollectionBundle/ProductDetailsModal.d.ts +15 -15
  139. package/dist/esm/types/components/BundleBlock/ComboBundle.d.ts +16 -16
  140. package/dist/esm/types/components/BundleBlock/FixedBundle/FixedBundle.d.ts +4 -4
  141. package/dist/esm/types/components/BundleBlock/FixedBundle/SeparateVariantOptions.d.ts +39 -39
  142. package/dist/esm/types/components/BundleBlock/FixedBundle/VariantSelectorModal.d.ts +22 -22
  143. package/dist/esm/types/components/BundleBlock/FixedBundle/fixedBundle.style.d.ts +84 -90
  144. package/dist/esm/types/components/BundleBlock/Loader.d.ts +5 -5
  145. package/dist/esm/types/components/BundleBlock/MixAndMatchBundle/MixAndMatchBundle.d.ts +8 -8
  146. package/dist/esm/types/components/BundleBlock/MixAndMatchBundle/mixAndMatchBundle.style.d.ts +86 -86
  147. package/dist/esm/types/components/BundleBlock/VolumeBundle/VolumeBundle.d.ts +3 -3
  148. package/dist/esm/types/components/BundleBlock/VolumeBundle/volumeBundle.style.d.ts +78 -80
  149. package/dist/esm/types/components/BundleBlock/index.d.ts +1 -1
  150. package/dist/esm/types/components/Cart/ApplyCoupon.d.ts +12 -12
  151. package/dist/esm/types/components/Cart/Bundle.d.ts +6 -6
  152. package/dist/esm/types/components/Cart/Cart.d.ts +235 -235
  153. package/dist/esm/types/components/Cart/CartDrawer.d.ts +21 -21
  154. package/dist/esm/types/components/Cart/CartOffersCarousel.d.ts +45 -45
  155. package/dist/esm/types/components/Cart/CartProductsList.d.ts +45 -45
  156. package/dist/esm/types/components/Cart/CartTimer.d.ts +8 -8
  157. package/dist/esm/types/components/Cart/CheckoutSection.d.ts +38 -38
  158. package/dist/esm/types/components/Cart/CouponSelection.d.ts +25 -25
  159. package/dist/esm/types/components/Cart/DatePicker.d.ts +10 -10
  160. package/dist/esm/types/components/Cart/EmptyCart.d.ts +33 -33
  161. package/dist/esm/types/components/Cart/FooterSections.d.ts +6 -6
  162. package/dist/esm/types/components/Cart/FreebieClaimManager.d.ts +18 -18
  163. package/dist/esm/types/components/Cart/FreebieClaimOverlay.d.ts +18 -18
  164. package/dist/esm/types/components/Cart/FreebieClaimOverlayCard.d.ts +10 -10
  165. package/dist/esm/types/components/Cart/FreebieClaimSection.d.ts +18 -18
  166. package/dist/esm/types/components/Cart/FreebieClaimSectionCard.d.ts +17 -17
  167. package/dist/esm/types/components/Cart/GSTSection.d.ts +15 -15
  168. package/dist/esm/types/components/Cart/GiftWrap.d.ts +14 -14
  169. package/dist/esm/types/components/Cart/GuestDiscountCoupon.d.ts +9 -9
  170. package/dist/esm/types/components/Cart/InlineCartOfferInfoText.d.ts +10 -10
  171. package/dist/esm/types/components/Cart/LoyaltyAppliedCTA.d.ts +19 -19
  172. package/dist/esm/types/components/Cart/LoyaltyApplyCTA.d.ts +18 -18
  173. package/dist/esm/types/components/Cart/LoyaltyBadge.d.ts +10 -10
  174. package/dist/esm/types/components/Cart/LoyaltyGuestCTA.d.ts +17 -17
  175. package/dist/esm/types/components/Cart/MultiStepProgressBar/CheckpointConfetti.d.ts +11 -11
  176. package/dist/esm/types/components/Cart/MultiStepProgressBar/CheckpointIcon.d.ts +3 -3
  177. package/dist/esm/types/components/Cart/MultiStepProgressBar/CheckpointTooltip.d.ts +3 -3
  178. package/dist/esm/types/components/Cart/MultiStepProgressBar/MultiStepIcon.d.ts +9 -9
  179. package/dist/esm/types/components/Cart/MultiStepProgressBar/MultiStepProgressBar.d.ts +5 -5
  180. package/dist/esm/types/components/Cart/MultiStepProgressBar/MultiStepProgressBar.styled.d.ts +45 -45
  181. package/dist/esm/types/components/Cart/MultiStepProgressBar/MultiStepUtils.d.ts +6 -5
  182. package/dist/esm/types/components/Cart/MultiStepProgressBar/MultiTierProgressBar.d.ts +4 -4
  183. package/dist/esm/types/components/Cart/MultiStepProgressBar/MutiTierNextRewardMessage.d.ts +3 -3
  184. package/dist/esm/types/components/Cart/MultiStepProgressBar/NextRewardMessage.d.ts +3 -3
  185. package/dist/esm/types/components/Cart/MultiStepProgressBar/SingleTierProgressBar.d.ts +4 -4
  186. package/dist/esm/types/components/Cart/MultiStepProgressBar/SingleTierProgressBar.styled.d.ts +22 -22
  187. package/dist/esm/types/components/Cart/MultiStepProgressBar/SingletTierNextRewardMessage.d.ts +3 -3
  188. package/dist/esm/types/components/Cart/MultiStepProgressBar/types.d.ts +55 -55
  189. package/dist/esm/types/components/Cart/NextFreebieRow.d.ts +19 -19
  190. package/dist/esm/types/components/Cart/NoteSection.d.ts +8 -8
  191. package/dist/esm/types/components/Cart/ProductCard.d.ts +30 -30
  192. package/dist/esm/types/components/Cart/ProductRecCard.d.ts +20 -20
  193. package/dist/esm/types/components/Cart/ProductRecList.d.ts +23 -23
  194. package/dist/esm/types/components/Cart/ProgressBar.d.ts +13 -13
  195. package/dist/esm/types/components/Cart/ProgressBarCartLoader.d.ts +7 -7
  196. package/dist/esm/types/components/Cart/QuantitySelector.d.ts +12 -12
  197. package/dist/esm/types/components/Cart/RegionSpecificDelivery.d.ts +17 -17
  198. package/dist/esm/types/components/Cart/RewardPointsPreview.d.ts +10 -10
  199. package/dist/esm/types/components/Cart/StandardDelivery.d.ts +11 -11
  200. package/dist/esm/types/components/Cart/StickyCart.d.ts +52 -52
  201. package/dist/esm/types/components/Cart/VariantSelectionPopup/DesktopVariantPopup.d.ts +19 -19
  202. package/dist/esm/types/components/Cart/VariantSelectionPopup/DesktopVariantPopup.styled.d.ts +60 -60
  203. package/dist/esm/types/components/Cart/VariantSelectionPopup/MobileVariantPopover.d.ts +19 -19
  204. package/dist/esm/types/components/Cart/index.d.ts +1 -1
  205. package/dist/esm/types/components/CouponFrame/CouponFrame.d.ts +15 -15
  206. package/dist/esm/types/components/CouponFrame/index.d.ts +1 -1
  207. package/dist/esm/types/components/Nudge/LeadGenerationNudge.d.ts +15 -15
  208. package/dist/esm/types/components/Nudge/Nudge.d.ts +40 -40
  209. package/dist/esm/types/components/Nudge/index.d.ts +1 -1
  210. package/dist/esm/types/components/SpinnerWheel/SpinnerWheel.d.ts +23 -23
  211. package/dist/esm/types/components/SpinnerWheel/WheelSection.d.ts +9 -9
  212. package/dist/esm/types/components/SpinnerWheel/index.d.ts +1 -1
  213. package/dist/esm/types/components/index.d.ts +6 -6
  214. package/dist/esm/types/index.d.ts +1 -1
  215. package/dist/esm/types/utils/converter.d.ts +2 -2
  216. package/dist/esm/types/utils/customVariantOptions.d.ts +20 -20
  217. package/dist/esm/types/utils/freebieProductUtils.d.ts +22 -22
  218. package/dist/esm/types/utils/freebieUtils.d.ts +5 -5
  219. package/dist/esm/types/utils/index.d.ts +14 -14
  220. package/dist/esm/utils/converter.d.ts +2 -2
  221. package/dist/esm/utils/customVariantOptions.d.ts +20 -20
  222. package/dist/esm/utils/freebieProductUtils.d.ts +22 -22
  223. package/dist/esm/utils/freebieUtils.d.ts +5 -5
  224. package/dist/esm/utils/index.d.ts +14 -14
  225. package/dist/index.d.ts +712 -712
  226. package/package.json +95 -95
  227. package/src/assets/Frame.svg +4 -4
  228. package/src/assets/bundlePlus.svg +4 -4
  229. package/src/assets/copy-icon.svg +3 -3
  230. package/src/assets/copy-iconBlack.svg +4 -4
  231. package/src/assets/coupon.svg +4 -4
  232. package/src/assets/delivery.svg +5 -5
@@ -1,388 +1,388 @@
1
- import React from "react";
2
- import "./bundle.scss";
3
- interface ShopifyCurrency {
4
- rate: number;
5
- active: string;
6
- }
7
- declare global {
8
- interface Window {
9
- Shopify?: {
10
- currency?: ShopifyCurrency;
11
- };
12
- }
13
- }
14
- type ProductImage = {
15
- url: string;
16
- height: number;
17
- width: number;
18
- altText?: string;
19
- };
20
- type ProductFeaturedMedia = {
21
- alt: string;
22
- preview: {
23
- image: {
24
- url: string;
25
- height?: number;
26
- width?: number;
27
- altText: string;
28
- };
29
- };
30
- };
31
- type ProductOption = {
32
- id: string;
33
- name: string;
34
- values: string[];
35
- };
36
- type CollectionNode = {
37
- node: {
38
- id: string;
39
- title: string;
40
- handle: string;
41
- };
42
- };
43
- export type VariantNode = {
44
- node: {
45
- id: string;
46
- price: string;
47
- compareAtPrice: string;
48
- title: string;
49
- displayName: string;
50
- image: ProductImage;
51
- availableForSale: boolean;
52
- inventoryQuantity: number;
53
- };
54
- };
55
- type SelectedVariantDetails = {
56
- id: string;
57
- price: string;
58
- compareAtPrice: string;
59
- title: string;
60
- displayName: string;
61
- image: ProductImage;
62
- availableForSale: boolean;
63
- inventoryQuantity: number;
64
- };
65
- export type VariantOptions = {
66
- shop: string;
67
- options: {
68
- name: string;
69
- type: "text" | "image" | "color";
70
- values: {
71
- name: string;
72
- value: string;
73
- }[];
74
- }[];
75
- createdAt: string;
76
- updatedAt: string;
77
- };
78
- export type ProductDetails = {
79
- id: string;
80
- title: string;
81
- handle: string;
82
- featuredMedia: ProductFeaturedMedia;
83
- status: "active" | "archived" | "draft" | "";
84
- options: ProductOption[];
85
- onlineStoreUrl: string;
86
- collections: {
87
- edges: CollectionNode[];
88
- };
89
- variants: {
90
- edges: VariantNode[];
91
- };
92
- shop: string;
93
- metafield?: {
94
- key: string;
95
- namespace: string;
96
- ownerType: string;
97
- value: string;
98
- id: string;
99
- jsonValue: string[];
100
- type: string;
101
- };
102
- descriptionHtml: string;
103
- media: {
104
- edges: {
105
- node: {
106
- alt: string;
107
- preview: {
108
- image: {
109
- altText: string;
110
- width?: number;
111
- height?: number;
112
- url: string;
113
- };
114
- };
115
- image: {
116
- altText: string;
117
- height: number;
118
- width: number;
119
- url: string;
120
- };
121
- };
122
- }[];
123
- };
124
- selectedVariant?: SelectedVariantDetails;
125
- rating?: {
126
- averageRating: number;
127
- ratingCount: number;
128
- };
129
- };
130
- export type ProductData = {
131
- productId: string;
132
- variantIds: string[];
133
- productDetails: ProductDetails;
134
- };
135
- type GeneralStyle = {
136
- primaryColor: string;
137
- primaryContrastColor: string;
138
- secondaryColor: string;
139
- secondaryContrastColor: string;
140
- imageAspectRatio: string;
141
- ctaBackgroundColor: string;
142
- ctaTextColor: string;
143
- ctaBorderColor: string;
144
- ctaShadowType: string;
145
- ctaPadding: string;
146
- ctaWidth: string;
147
- ctaBorderRadius: string;
148
- ctaHoverBackgroundColor: string;
149
- ctaHoverTextColor: string;
150
- customizeHoverState: boolean;
151
- checkoutPartner: string;
152
- redirectToPDP: boolean;
153
- restrictCOD: boolean;
154
- trackInventory: boolean;
155
- showOutOfStockProducts: boolean;
156
- outOfStockLabel: string;
157
- disabledButtonColor: string;
158
- storeCurrency: string;
159
- currencySymbol: string;
160
- discountPrefix: string;
161
- discountSuffix: string;
162
- addOrderTags: boolean;
163
- addOrderNotes: boolean;
164
- variantTitleSuffix: boolean;
165
- titleLength: string;
166
- showDecimalsInBundlePricing?: boolean;
167
- };
168
- type VolumeStyle = {
169
- addtoCartMethod: string;
170
- titleFontSize: string;
171
- subtitleFontSize: string;
172
- titleBackgroundColor: string;
173
- titleTextColor: string;
174
- verticalMargin: string;
175
- sectionBackgroundColor: string;
176
- cardStyle: string;
177
- discountBadgeVisibility: string;
178
- allowVariantSelection: string;
179
- variantSelectorType: string;
180
- ctaTitle: string;
181
- bundleRedirection: string;
182
- };
183
- type ComboStyle = {
184
- productTitleFontSize: string;
185
- productDescriptionFontSize: string;
186
- descriptionTextColor: string;
187
- titleTextColor: string;
188
- verticalMargin: string;
189
- infoAlignment: string;
190
- ctaTitle: string;
191
- bundleRedirection: string;
192
- embedContentVisibility: boolean;
193
- mixAndMatchCardStyle: string;
194
- mixAndMatchVariantTypeSelector: string;
195
- comboCardStyle: string;
196
- comboVariantTypeSelector: string;
197
- selectedEmbedContentVisibilityOptions: string[];
198
- subProductsSectionVisibility: boolean;
199
- subProductsImageVisibility: boolean;
200
- subProductsProductTitleVisibility: boolean;
201
- subProductsProductPriceVisibility: boolean;
202
- };
203
- type ByobStyle = {
204
- titleFontSize: string;
205
- subtitleFontSize: string;
206
- titleBackgroundColor: string;
207
- titleTextColor: string;
208
- productTitleFontSize: string;
209
- sectionBackgroundColor: string;
210
- lazyLoadWidget: string;
211
- listingsGap: string;
212
- footerMargin: string;
213
- borderRadius: string;
214
- borderColor: string;
215
- cardBackgroundColor: string;
216
- shadowType: string;
217
- addToBundleCTAText: string;
218
- checkoutCTAText: string;
219
- variantSelectorType: string;
220
- primaryVariant: string;
221
- productsPriceVisibility: boolean;
222
- compareAtPriceVisibility: boolean;
223
- selectedProductsVisibility: boolean;
224
- bundleRedirection: string;
225
- enableConfetti: boolean;
226
- selectedItemVisibility: boolean;
227
- productTiersVisibility: boolean;
228
- tierNavigation: boolean;
229
- enableProductCategories: boolean;
230
- productCardCategoryVisibility: string;
231
- categoryFilterOnPage: string;
232
- };
233
- type FixedStyle = {
234
- titleFontSize: string;
235
- subtitleFontSize: string;
236
- titleBackgroundColor: string;
237
- titleTextColor: string;
238
- verticalMargin: string;
239
- sectionBackgroundColor: string;
240
- borderRadius: string;
241
- borderColor: string;
242
- cardBackgroundColor: string;
243
- shadowType: string;
244
- infoAlignment: string;
245
- ctaTitle: string;
246
- bundleRedirection: string;
247
- cardLayoutStyle: string;
248
- variantSelectorType: string;
249
- productsPriceVisibility: boolean;
250
- compareAtPriceVisibility: boolean;
251
- };
252
- export type Customizations = {
253
- shop?: string;
254
- general: GeneralStyle;
255
- byob: ByobStyle;
256
- fixedBundle: FixedStyle;
257
- volumeBundle: VolumeStyle;
258
- comboBundle: ComboStyle;
259
- createdAt?: string;
260
- updatedAt?: string;
261
- };
262
- export type BundlePayload = {
263
- showIndividualProductSelector: boolean;
264
- title?: string;
265
- subtitle?: string;
266
- products: ProductData[];
267
- percentageOff?: number;
268
- dealAmount?: number;
269
- amountOff?: number;
270
- type: "fixed" | "builder" | "volume" | "mixAndMatch" | "" | "combo" | "collection";
271
- minimumQuantity: number;
272
- showProductDetailsInTracker: boolean;
273
- coverImageUrl?: string;
274
- mobileCoverImageUrl?: string;
275
- titleSectionTextColor?: string;
276
- titleSectionBackgroundColor?: string;
277
- dealTextColor?: string;
278
- showBorder?: boolean;
279
- hideProductDetails?: boolean;
280
- cornerRadiusType?: "medium" | "high" | "";
281
- primaryBackgroundColorCta?: string;
282
- enableProgressBar?: boolean;
283
- enableSortAndFilter?: boolean;
284
- disableQuantitySelector?: boolean;
285
- disableInventoryTracking?: boolean;
286
- alignFixedBundleContent?: "left" | "right" | "center" | "";
287
- imageAspectType?: "portrait" | "square" | "";
288
- backgroundColorFixedBundleDiv?: string;
289
- canCustomizeFixedBundle?: boolean;
290
- primaryTextColorCta?: string;
291
- showVariants?: boolean;
292
- discountType?: string;
293
- showCta?: boolean;
294
- productCardBadgeText?: string;
295
- coverImageVerticalMargin?: string;
296
- builderTiers?: {
297
- type: string;
298
- offerTier?: {
299
- tier: number;
300
- minimumQuantity: number;
301
- discountValue: number;
302
- }[];
303
- productTier?: {
304
- tier: number;
305
- title: string;
306
- minimumQuantity: number;
307
- isFixed?: boolean;
308
- products: {
309
- productId: string;
310
- variantIds: string[];
311
- }[];
312
- }[];
313
- };
314
- volumeTiers?: {
315
- isDefault: unknown;
316
- tier: number;
317
- minimumQuantity: number;
318
- title: string;
319
- subtitle: string;
320
- badgeTitle: string;
321
- discountValue: number;
322
- imageUrl?: string;
323
- }[];
324
- mixAndMatchTiers?: {
325
- tier: number;
326
- title: string;
327
- products: {
328
- productId: string;
329
- variantIds: string[];
330
- }[];
331
- }[];
332
- customizations: Customizations;
333
- variantOptions?: VariantOptions;
334
- storeCurrencyCode?: string;
335
- customStoreDetails?: {
336
- [key: string]: any;
337
- };
338
- customProductsQuantity?: number | null;
339
- reviewRatingType?: "none" | "ratingOnly" | "ratingAndReviewCount";
340
- appName?: string;
341
- pageHeader?: {
342
- title?: string;
343
- description?: string;
344
- customizePadding?: string;
345
- };
346
- };
347
- export type BundleProps = {
348
- bundle: BundlePayload;
349
- addToCartFunction?: (selectedItemsSubtotal: number, variantIds?: string[], finalBundlePrice?: number, variantIdPriceMap?: {
350
- variantId: string;
351
- price: number;
352
- }[]) => Promise<void>;
353
- addCustomBundleToCart?: (e: any) => Promise<void>;
354
- selectedItems?: {
355
- variantId: string;
356
- product: ProductDetails;
357
- quantity: number;
358
- }[];
359
- setSelectedItems?: React.Dispatch<React.SetStateAction<{
360
- variantId: string;
361
- product: ProductDetails;
362
- quantity: number;
363
- }[]>>;
364
- bundleAddToCartLoading?: boolean;
365
- handleRemoveItem?: (variantId: string) => void;
366
- selectedItemsQuantity?: number;
367
- renderingOnPage?: boolean;
368
- bundleSubtotal?: {
369
- price: number;
370
- compareAtPrice: number;
371
- };
372
- bundleHeaderBackgroundColor?: string;
373
- currentProductId?: string;
374
- };
375
- export declare const currencyPrice: (price: number | string | undefined) => string | undefined;
376
- export declare const getCurrencySymbol: (genSymbol: string, storeCurrencyCode?: string) => string;
377
- export declare const optimiseImage: (url: string) => string;
378
- export declare const handleAddToBundle: (variantId: string, product: ProductDetails, quantity: number, selectedItems: {
379
- variantId: string;
380
- product: ProductDetails;
381
- quantity: number;
382
- }[], setSelectedItems: React.Dispatch<React.SetStateAction<{
383
- variantId: string;
384
- product: ProductDetails;
385
- quantity: number;
386
- }[]>>) => void;
387
- declare const Bundle: React.FC<BundleProps>;
388
- export default Bundle;
1
+ import React from "react";
2
+ import "./bundle.scss";
3
+ interface ShopifyCurrency {
4
+ rate: number;
5
+ active: string;
6
+ }
7
+ declare global {
8
+ interface Window {
9
+ Shopify?: {
10
+ currency?: ShopifyCurrency;
11
+ };
12
+ }
13
+ }
14
+ type ProductImage = {
15
+ url: string;
16
+ height: number;
17
+ width: number;
18
+ altText?: string;
19
+ };
20
+ type ProductFeaturedMedia = {
21
+ alt: string;
22
+ preview: {
23
+ image: {
24
+ url: string;
25
+ height?: number;
26
+ width?: number;
27
+ altText: string;
28
+ };
29
+ };
30
+ };
31
+ type ProductOption = {
32
+ id: string;
33
+ name: string;
34
+ values: string[];
35
+ };
36
+ type CollectionNode = {
37
+ node: {
38
+ id: string;
39
+ title: string;
40
+ handle: string;
41
+ };
42
+ };
43
+ export type VariantNode = {
44
+ node: {
45
+ id: string;
46
+ price: string;
47
+ compareAtPrice: string;
48
+ title: string;
49
+ displayName: string;
50
+ image: ProductImage;
51
+ availableForSale: boolean;
52
+ inventoryQuantity: number;
53
+ };
54
+ };
55
+ type SelectedVariantDetails = {
56
+ id: string;
57
+ price: string;
58
+ compareAtPrice: string;
59
+ title: string;
60
+ displayName: string;
61
+ image: ProductImage;
62
+ availableForSale: boolean;
63
+ inventoryQuantity: number;
64
+ };
65
+ export type VariantOptions = {
66
+ shop: string;
67
+ options: {
68
+ name: string;
69
+ type: "text" | "image" | "color";
70
+ values: {
71
+ name: string;
72
+ value: string;
73
+ }[];
74
+ }[];
75
+ createdAt: string;
76
+ updatedAt: string;
77
+ };
78
+ export type ProductDetails = {
79
+ id: string;
80
+ title: string;
81
+ handle: string;
82
+ featuredMedia: ProductFeaturedMedia;
83
+ status: "active" | "archived" | "draft" | "";
84
+ options: ProductOption[];
85
+ onlineStoreUrl: string;
86
+ collections: {
87
+ edges: CollectionNode[];
88
+ };
89
+ variants: {
90
+ edges: VariantNode[];
91
+ };
92
+ shop: string;
93
+ metafield?: {
94
+ key: string;
95
+ namespace: string;
96
+ ownerType: string;
97
+ value: string;
98
+ id: string;
99
+ jsonValue: string[];
100
+ type: string;
101
+ };
102
+ descriptionHtml: string;
103
+ media: {
104
+ edges: {
105
+ node: {
106
+ alt: string;
107
+ preview: {
108
+ image: {
109
+ altText: string;
110
+ width?: number;
111
+ height?: number;
112
+ url: string;
113
+ };
114
+ };
115
+ image: {
116
+ altText: string;
117
+ height: number;
118
+ width: number;
119
+ url: string;
120
+ };
121
+ };
122
+ }[];
123
+ };
124
+ selectedVariant?: SelectedVariantDetails;
125
+ rating?: {
126
+ averageRating: number;
127
+ ratingCount: number;
128
+ };
129
+ };
130
+ export type ProductData = {
131
+ productId: string;
132
+ variantIds: string[];
133
+ productDetails: ProductDetails;
134
+ };
135
+ type GeneralStyle = {
136
+ primaryColor: string;
137
+ primaryContrastColor: string;
138
+ secondaryColor: string;
139
+ secondaryContrastColor: string;
140
+ imageAspectRatio: string;
141
+ ctaBackgroundColor: string;
142
+ ctaTextColor: string;
143
+ ctaBorderColor: string;
144
+ ctaShadowType: string;
145
+ ctaPadding: string;
146
+ ctaWidth: string;
147
+ ctaBorderRadius: string;
148
+ ctaHoverBackgroundColor: string;
149
+ ctaHoverTextColor: string;
150
+ customizeHoverState: boolean;
151
+ checkoutPartner: string;
152
+ redirectToPDP: boolean;
153
+ restrictCOD: boolean;
154
+ trackInventory: boolean;
155
+ showOutOfStockProducts: boolean;
156
+ outOfStockLabel: string;
157
+ disabledButtonColor: string;
158
+ storeCurrency: string;
159
+ currencySymbol: string;
160
+ discountPrefix: string;
161
+ discountSuffix: string;
162
+ addOrderTags: boolean;
163
+ addOrderNotes: boolean;
164
+ variantTitleSuffix: boolean;
165
+ titleLength: string;
166
+ showDecimalsInBundlePricing?: boolean;
167
+ };
168
+ type VolumeStyle = {
169
+ addtoCartMethod: string;
170
+ titleFontSize: string;
171
+ subtitleFontSize: string;
172
+ titleBackgroundColor: string;
173
+ titleTextColor: string;
174
+ verticalMargin: string;
175
+ sectionBackgroundColor: string;
176
+ cardStyle: string;
177
+ discountBadgeVisibility: string;
178
+ allowVariantSelection: string;
179
+ variantSelectorType: string;
180
+ ctaTitle: string;
181
+ bundleRedirection: string;
182
+ };
183
+ type ComboStyle = {
184
+ productTitleFontSize: string;
185
+ productDescriptionFontSize: string;
186
+ descriptionTextColor: string;
187
+ titleTextColor: string;
188
+ verticalMargin: string;
189
+ infoAlignment: string;
190
+ ctaTitle: string;
191
+ bundleRedirection: string;
192
+ embedContentVisibility: boolean;
193
+ mixAndMatchCardStyle: string;
194
+ mixAndMatchVariantTypeSelector: string;
195
+ comboCardStyle: string;
196
+ comboVariantTypeSelector: string;
197
+ selectedEmbedContentVisibilityOptions: string[];
198
+ subProductsSectionVisibility: boolean;
199
+ subProductsImageVisibility: boolean;
200
+ subProductsProductTitleVisibility: boolean;
201
+ subProductsProductPriceVisibility: boolean;
202
+ };
203
+ type ByobStyle = {
204
+ titleFontSize: string;
205
+ subtitleFontSize: string;
206
+ titleBackgroundColor: string;
207
+ titleTextColor: string;
208
+ productTitleFontSize: string;
209
+ sectionBackgroundColor: string;
210
+ lazyLoadWidget: string;
211
+ listingsGap: string;
212
+ footerMargin: string;
213
+ borderRadius: string;
214
+ borderColor: string;
215
+ cardBackgroundColor: string;
216
+ shadowType: string;
217
+ addToBundleCTAText: string;
218
+ checkoutCTAText: string;
219
+ variantSelectorType: string;
220
+ primaryVariant: string;
221
+ productsPriceVisibility: boolean;
222
+ compareAtPriceVisibility: boolean;
223
+ selectedProductsVisibility: boolean;
224
+ bundleRedirection: string;
225
+ enableConfetti: boolean;
226
+ selectedItemVisibility: boolean;
227
+ productTiersVisibility: boolean;
228
+ tierNavigation: boolean;
229
+ enableProductCategories: boolean;
230
+ productCardCategoryVisibility: string;
231
+ categoryFilterOnPage: string;
232
+ };
233
+ type FixedStyle = {
234
+ titleFontSize: string;
235
+ subtitleFontSize: string;
236
+ titleBackgroundColor: string;
237
+ titleTextColor: string;
238
+ verticalMargin: string;
239
+ sectionBackgroundColor: string;
240
+ borderRadius: string;
241
+ borderColor: string;
242
+ cardBackgroundColor: string;
243
+ shadowType: string;
244
+ infoAlignment: string;
245
+ ctaTitle: string;
246
+ bundleRedirection: string;
247
+ cardLayoutStyle: string;
248
+ variantSelectorType: string;
249
+ productsPriceVisibility: boolean;
250
+ compareAtPriceVisibility: boolean;
251
+ };
252
+ export type Customizations = {
253
+ shop?: string;
254
+ general: GeneralStyle;
255
+ byob: ByobStyle;
256
+ fixedBundle: FixedStyle;
257
+ volumeBundle: VolumeStyle;
258
+ comboBundle: ComboStyle;
259
+ createdAt?: string;
260
+ updatedAt?: string;
261
+ };
262
+ export type BundlePayload = {
263
+ showIndividualProductSelector: boolean;
264
+ title?: string;
265
+ subtitle?: string;
266
+ products: ProductData[];
267
+ percentageOff?: number;
268
+ dealAmount?: number;
269
+ amountOff?: number;
270
+ type: "fixed" | "builder" | "volume" | "mixAndMatch" | "" | "combo" | "collection";
271
+ minimumQuantity: number;
272
+ showProductDetailsInTracker: boolean;
273
+ coverImageUrl?: string;
274
+ mobileCoverImageUrl?: string;
275
+ titleSectionTextColor?: string;
276
+ titleSectionBackgroundColor?: string;
277
+ dealTextColor?: string;
278
+ showBorder?: boolean;
279
+ hideProductDetails?: boolean;
280
+ cornerRadiusType?: "medium" | "high" | "";
281
+ primaryBackgroundColorCta?: string;
282
+ enableProgressBar?: boolean;
283
+ enableSortAndFilter?: boolean;
284
+ disableQuantitySelector?: boolean;
285
+ disableInventoryTracking?: boolean;
286
+ alignFixedBundleContent?: "left" | "right" | "center" | "";
287
+ imageAspectType?: "portrait" | "square" | "";
288
+ backgroundColorFixedBundleDiv?: string;
289
+ canCustomizeFixedBundle?: boolean;
290
+ primaryTextColorCta?: string;
291
+ showVariants?: boolean;
292
+ discountType?: string;
293
+ showCta?: boolean;
294
+ productCardBadgeText?: string;
295
+ coverImageVerticalMargin?: string;
296
+ builderTiers?: {
297
+ type: string;
298
+ offerTier?: {
299
+ tier: number;
300
+ minimumQuantity: number;
301
+ discountValue: number;
302
+ }[];
303
+ productTier?: {
304
+ tier: number;
305
+ title: string;
306
+ minimumQuantity: number;
307
+ isFixed?: boolean;
308
+ products: {
309
+ productId: string;
310
+ variantIds: string[];
311
+ }[];
312
+ }[];
313
+ };
314
+ volumeTiers?: {
315
+ isDefault: unknown;
316
+ tier: number;
317
+ minimumQuantity: number;
318
+ title: string;
319
+ subtitle: string;
320
+ badgeTitle: string;
321
+ discountValue: number;
322
+ imageUrl?: string;
323
+ }[];
324
+ mixAndMatchTiers?: {
325
+ tier: number;
326
+ title: string;
327
+ products: {
328
+ productId: string;
329
+ variantIds: string[];
330
+ }[];
331
+ }[];
332
+ customizations: Customizations;
333
+ variantOptions?: VariantOptions;
334
+ storeCurrencyCode?: string;
335
+ customStoreDetails?: {
336
+ [key: string]: any;
337
+ };
338
+ customProductsQuantity?: number | null;
339
+ reviewRatingType?: "none" | "ratingOnly" | "ratingAndReviewCount";
340
+ appName?: string;
341
+ pageHeader?: {
342
+ title?: string;
343
+ description?: string;
344
+ customizePadding?: string;
345
+ };
346
+ };
347
+ export type BundleProps = {
348
+ bundle: BundlePayload;
349
+ addToCartFunction?: (selectedItemsSubtotal: number, variantIds?: string[], finalBundlePrice?: number, variantIdPriceMap?: {
350
+ variantId: string;
351
+ price: number;
352
+ }[]) => Promise<void>;
353
+ addCustomBundleToCart?: (e: any) => Promise<void>;
354
+ selectedItems?: {
355
+ variantId: string;
356
+ product: ProductDetails;
357
+ quantity: number;
358
+ }[];
359
+ setSelectedItems?: React.Dispatch<React.SetStateAction<{
360
+ variantId: string;
361
+ product: ProductDetails;
362
+ quantity: number;
363
+ }[]>>;
364
+ bundleAddToCartLoading?: boolean;
365
+ handleRemoveItem?: (variantId: string) => void;
366
+ selectedItemsQuantity?: number;
367
+ renderingOnPage?: boolean;
368
+ bundleSubtotal?: {
369
+ price: number;
370
+ compareAtPrice: number;
371
+ };
372
+ bundleHeaderBackgroundColor?: string;
373
+ currentProductId?: string;
374
+ };
375
+ export declare const currencyPrice: (price: number | string | undefined) => string | undefined;
376
+ export declare const getCurrencySymbol: (genSymbol: string, storeCurrencyCode?: string) => string;
377
+ export declare const optimiseImage: (url: string) => string;
378
+ export declare const handleAddToBundle: (variantId: string, product: ProductDetails, quantity: number, selectedItems: {
379
+ variantId: string;
380
+ product: ProductDetails;
381
+ quantity: number;
382
+ }[], setSelectedItems: React.Dispatch<React.SetStateAction<{
383
+ variantId: string;
384
+ product: ProductDetails;
385
+ quantity: number;
386
+ }[]>>) => void;
387
+ declare const Bundle: React.FC<BundleProps>;
388
+ export default Bundle;