yt-uikit 0.7.348-compare-display.0 → 0.7.348

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