@anker-in/headless-ui 1.0.26-alpha.1762857531976 → 1.0.26-alpha.1762914443262

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 (174) hide show
  1. package/dist/cjs/biz-components/AiuiProvider/index.d.ts +1 -1
  2. package/dist/cjs/biz-components/AiuiProvider/index.js.map +1 -1
  3. package/dist/cjs/biz-components/CollectionShelves/CollectionShelvesItem.d.ts +4 -0
  4. package/dist/cjs/biz-components/CollectionShelves/CollectionShelvesItem.js +2 -0
  5. package/dist/cjs/biz-components/CollectionShelves/CollectionShelvesItem.js.map +7 -0
  6. package/dist/cjs/biz-components/CollectionShelves/index.d.ts +7 -0
  7. package/dist/cjs/biz-components/CollectionShelves/index.js +2 -0
  8. package/dist/cjs/biz-components/CollectionShelves/index.js.map +7 -0
  9. package/dist/cjs/biz-components/CollectionsBanner/index.d.ts +7 -0
  10. package/dist/cjs/biz-components/CollectionsBanner/index.js +2 -0
  11. package/dist/cjs/biz-components/CollectionsBanner/index.js.map +7 -0
  12. package/dist/cjs/biz-components/CollectionsBanner/types.d.ts +43 -0
  13. package/dist/cjs/biz-components/CollectionsBanner/types.js +2 -0
  14. package/dist/cjs/biz-components/CollectionsBanner/types.js.map +7 -0
  15. package/dist/cjs/biz-components/CollectionsFilters/FilterCardWrap.d.ts +19 -0
  16. package/dist/cjs/biz-components/CollectionsFilters/FilterCardWrap.js +2 -0
  17. package/dist/cjs/biz-components/CollectionsFilters/FilterCardWrap.js.map +7 -0
  18. package/dist/cjs/biz-components/CollectionsFilters/FilterCardWrapItem.d.ts +10 -0
  19. package/dist/cjs/biz-components/CollectionsFilters/FilterCardWrapItem.js +2 -0
  20. package/dist/cjs/biz-components/CollectionsFilters/FilterCardWrapItem.js.map +7 -0
  21. package/dist/cjs/biz-components/CollectionsFilters/FilterHeader.d.ts +13 -0
  22. package/dist/cjs/biz-components/CollectionsFilters/FilterHeader.js +2 -0
  23. package/dist/cjs/biz-components/CollectionsFilters/FilterHeader.js.map +7 -0
  24. package/dist/cjs/biz-components/CollectionsFilters/FilterList.d.ts +14 -0
  25. package/dist/cjs/biz-components/CollectionsFilters/FilterList.js +2 -0
  26. package/dist/cjs/biz-components/CollectionsFilters/FilterList.js.map +7 -0
  27. package/dist/cjs/biz-components/CollectionsFilters/component/AnimatedUL.d.ts +5 -0
  28. package/dist/cjs/biz-components/CollectionsFilters/component/AnimatedUL.js +2 -0
  29. package/dist/cjs/biz-components/CollectionsFilters/component/AnimatedUL.js.map +7 -0
  30. package/dist/cjs/biz-components/CollectionsFilters/component/TabFilter.d.ts +12 -0
  31. package/dist/cjs/biz-components/CollectionsFilters/component/TabFilter.js +2 -0
  32. package/dist/cjs/biz-components/CollectionsFilters/component/TabFilter.js.map +7 -0
  33. package/dist/cjs/biz-components/CollectionsFilters/component/filtersFun.d.ts +12 -0
  34. package/dist/cjs/biz-components/CollectionsFilters/component/filtersFun.js +2 -0
  35. package/dist/cjs/biz-components/CollectionsFilters/component/filtersFun.js.map +7 -0
  36. package/dist/cjs/biz-components/CollectionsFilters/component/helper.d.ts +81 -0
  37. package/dist/cjs/biz-components/CollectionsFilters/component/helper.js +2 -0
  38. package/dist/cjs/biz-components/CollectionsFilters/component/helper.js.map +7 -0
  39. package/dist/cjs/biz-components/CollectionsFilters/component/price.d.ts +25 -0
  40. package/dist/cjs/biz-components/CollectionsFilters/component/price.js +2 -0
  41. package/dist/cjs/biz-components/CollectionsFilters/component/price.js.map +7 -0
  42. package/dist/cjs/biz-components/CollectionsFilters/component/priceProps.d.ts +215 -0
  43. package/dist/cjs/biz-components/CollectionsFilters/component/priceProps.js +2 -0
  44. package/dist/cjs/biz-components/CollectionsFilters/component/priceProps.js.map +7 -0
  45. package/dist/cjs/biz-components/CollectionsFilters/index.d.ts +24 -0
  46. package/dist/cjs/biz-components/CollectionsFilters/index.js +2 -0
  47. package/dist/cjs/biz-components/CollectionsFilters/index.js.map +7 -0
  48. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/BenefitsTab.d.ts +1 -3
  49. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/BenefitsTab.js +4 -4
  50. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/BenefitsTab.js.map +3 -3
  51. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductBenefitsTabs/ModalContainer.d.ts +10 -0
  52. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductBenefitsTabs/ModalContainer.js +2 -0
  53. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductBenefitsTabs/ModalContainer.js.map +7 -0
  54. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/index.js +1 -1
  55. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/index.js.map +3 -3
  56. package/dist/cjs/biz-components/Listing/components/PurchaseBar/ProductActions/index.js +1 -1
  57. package/dist/cjs/biz-components/Listing/components/PurchaseBar/ProductActions/index.js.map +3 -3
  58. package/dist/cjs/biz-components/Listing/components/PurchaseBar/index.js +1 -1
  59. package/dist/cjs/biz-components/Listing/components/PurchaseBar/index.js.map +3 -3
  60. package/dist/cjs/biz-components/Listing/hooks/useBenefits.js +1 -1
  61. package/dist/cjs/biz-components/Listing/hooks/useBenefits.js.map +2 -2
  62. package/dist/cjs/biz-components/Paginator/index.d.ts +7 -0
  63. package/dist/cjs/biz-components/Paginator/index.js +7 -0
  64. package/dist/cjs/biz-components/Paginator/index.js.map +7 -0
  65. package/dist/cjs/biz-components/TextMarquee/index.d.ts +10 -0
  66. package/dist/cjs/biz-components/TextMarquee/index.js +2 -0
  67. package/dist/cjs/biz-components/TextMarquee/index.js.map +7 -0
  68. package/dist/cjs/biz-components/Title/index.js +1 -1
  69. package/dist/cjs/biz-components/Title/index.js.map +3 -3
  70. package/dist/cjs/biz-components/Title/types.d.ts +1 -0
  71. package/dist/cjs/biz-components/Title/types.js +1 -1
  72. package/dist/cjs/biz-components/Title/types.js.map +1 -1
  73. package/dist/cjs/biz-components/index.d.ts +9 -0
  74. package/dist/cjs/biz-components/index.js +1 -1
  75. package/dist/cjs/biz-components/index.js.map +3 -3
  76. package/dist/cjs/components/breadcrumb.d.ts +12 -0
  77. package/dist/cjs/components/breadcrumb.js +2 -0
  78. package/dist/cjs/components/breadcrumb.js.map +7 -0
  79. package/dist/cjs/components/index.d.ts +1 -0
  80. package/dist/cjs/components/index.js +1 -1
  81. package/dist/cjs/components/index.js.map +3 -3
  82. package/dist/cjs/helpers/utils.d.ts +1 -0
  83. package/dist/cjs/helpers/utils.js +1 -1
  84. package/dist/cjs/helpers/utils.js.map +3 -3
  85. package/dist/cjs/hooks/useRollout.d.ts +2 -14
  86. package/dist/cjs/hooks/useRollout.js +1 -1
  87. package/dist/cjs/hooks/useRollout.js.map +3 -3
  88. package/dist/esm/biz-components/AiuiProvider/index.d.ts +1 -1
  89. package/dist/esm/biz-components/AiuiProvider/index.js.map +1 -1
  90. package/dist/esm/biz-components/CollectionShelves/CollectionShelvesItem.d.ts +4 -0
  91. package/dist/esm/biz-components/CollectionShelves/CollectionShelvesItem.js +2 -0
  92. package/dist/esm/biz-components/CollectionShelves/CollectionShelvesItem.js.map +7 -0
  93. package/dist/esm/biz-components/CollectionShelves/index.d.ts +7 -0
  94. package/dist/esm/biz-components/CollectionShelves/index.js +2 -0
  95. package/dist/esm/biz-components/CollectionShelves/index.js.map +7 -0
  96. package/dist/esm/biz-components/CollectionsBanner/index.d.ts +7 -0
  97. package/dist/esm/biz-components/CollectionsBanner/index.js +2 -0
  98. package/dist/esm/biz-components/CollectionsBanner/index.js.map +7 -0
  99. package/dist/esm/biz-components/CollectionsBanner/types.d.ts +43 -0
  100. package/dist/esm/biz-components/CollectionsBanner/types.js +1 -0
  101. package/dist/esm/biz-components/CollectionsBanner/types.js.map +7 -0
  102. package/dist/esm/biz-components/CollectionsFilters/FilterCardWrap.d.ts +19 -0
  103. package/dist/esm/biz-components/CollectionsFilters/FilterCardWrap.js +2 -0
  104. package/dist/esm/biz-components/CollectionsFilters/FilterCardWrap.js.map +7 -0
  105. package/dist/esm/biz-components/CollectionsFilters/FilterCardWrapItem.d.ts +10 -0
  106. package/dist/esm/biz-components/CollectionsFilters/FilterCardWrapItem.js +2 -0
  107. package/dist/esm/biz-components/CollectionsFilters/FilterCardWrapItem.js.map +7 -0
  108. package/dist/esm/biz-components/CollectionsFilters/FilterHeader.d.ts +13 -0
  109. package/dist/esm/biz-components/CollectionsFilters/FilterHeader.js +2 -0
  110. package/dist/esm/biz-components/CollectionsFilters/FilterHeader.js.map +7 -0
  111. package/dist/esm/biz-components/CollectionsFilters/FilterList.d.ts +14 -0
  112. package/dist/esm/biz-components/CollectionsFilters/FilterList.js +2 -0
  113. package/dist/esm/biz-components/CollectionsFilters/FilterList.js.map +7 -0
  114. package/dist/esm/biz-components/CollectionsFilters/component/AnimatedUL.d.ts +5 -0
  115. package/dist/esm/biz-components/CollectionsFilters/component/AnimatedUL.js +2 -0
  116. package/dist/esm/biz-components/CollectionsFilters/component/AnimatedUL.js.map +7 -0
  117. package/dist/esm/biz-components/CollectionsFilters/component/TabFilter.d.ts +12 -0
  118. package/dist/esm/biz-components/CollectionsFilters/component/TabFilter.js +2 -0
  119. package/dist/esm/biz-components/CollectionsFilters/component/TabFilter.js.map +7 -0
  120. package/dist/esm/biz-components/CollectionsFilters/component/filtersFun.d.ts +12 -0
  121. package/dist/esm/biz-components/CollectionsFilters/component/filtersFun.js +2 -0
  122. package/dist/esm/biz-components/CollectionsFilters/component/filtersFun.js.map +7 -0
  123. package/dist/esm/biz-components/CollectionsFilters/component/helper.d.ts +81 -0
  124. package/dist/esm/biz-components/CollectionsFilters/component/helper.js +2 -0
  125. package/dist/esm/biz-components/CollectionsFilters/component/helper.js.map +7 -0
  126. package/dist/esm/biz-components/CollectionsFilters/component/price.d.ts +25 -0
  127. package/dist/esm/biz-components/CollectionsFilters/component/price.js +2 -0
  128. package/dist/esm/biz-components/CollectionsFilters/component/price.js.map +7 -0
  129. package/dist/esm/biz-components/CollectionsFilters/component/priceProps.d.ts +215 -0
  130. package/dist/esm/biz-components/CollectionsFilters/component/priceProps.js +2 -0
  131. package/dist/esm/biz-components/CollectionsFilters/component/priceProps.js.map +7 -0
  132. package/dist/esm/biz-components/CollectionsFilters/index.d.ts +24 -0
  133. package/dist/esm/biz-components/CollectionsFilters/index.js +2 -0
  134. package/dist/esm/biz-components/CollectionsFilters/index.js.map +7 -0
  135. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/BenefitsTab.d.ts +1 -3
  136. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/BenefitsTab.js +4 -4
  137. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/BenefitsTab.js.map +3 -3
  138. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductBenefitsTabs/ModalContainer.d.ts +10 -0
  139. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductBenefitsTabs/ModalContainer.js +2 -0
  140. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductBenefitsTabs/ModalContainer.js.map +7 -0
  141. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/index.js +1 -1
  142. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/index.js.map +3 -3
  143. package/dist/esm/biz-components/Listing/components/PurchaseBar/ProductActions/index.js +1 -1
  144. package/dist/esm/biz-components/Listing/components/PurchaseBar/ProductActions/index.js.map +2 -2
  145. package/dist/esm/biz-components/Listing/components/PurchaseBar/index.js +1 -1
  146. package/dist/esm/biz-components/Listing/components/PurchaseBar/index.js.map +3 -3
  147. package/dist/esm/biz-components/Listing/hooks/useBenefits.js +1 -1
  148. package/dist/esm/biz-components/Listing/hooks/useBenefits.js.map +2 -2
  149. package/dist/esm/biz-components/Paginator/index.d.ts +7 -0
  150. package/dist/esm/biz-components/Paginator/index.js +7 -0
  151. package/dist/esm/biz-components/Paginator/index.js.map +7 -0
  152. package/dist/esm/biz-components/TextMarquee/index.d.ts +10 -0
  153. package/dist/esm/biz-components/TextMarquee/index.js +2 -0
  154. package/dist/esm/biz-components/TextMarquee/index.js.map +7 -0
  155. package/dist/esm/biz-components/Title/index.js +1 -1
  156. package/dist/esm/biz-components/Title/index.js.map +3 -3
  157. package/dist/esm/biz-components/Title/types.d.ts +1 -0
  158. package/dist/esm/biz-components/index.d.ts +9 -0
  159. package/dist/esm/biz-components/index.js +1 -1
  160. package/dist/esm/biz-components/index.js.map +2 -2
  161. package/dist/esm/components/breadcrumb.d.ts +12 -0
  162. package/dist/esm/components/breadcrumb.js +2 -0
  163. package/dist/esm/components/breadcrumb.js.map +7 -0
  164. package/dist/esm/components/index.d.ts +1 -0
  165. package/dist/esm/components/index.js +1 -1
  166. package/dist/esm/components/index.js.map +2 -2
  167. package/dist/esm/helpers/utils.d.ts +1 -0
  168. package/dist/esm/helpers/utils.js +1 -1
  169. package/dist/esm/helpers/utils.js.map +3 -3
  170. package/dist/esm/hooks/useRollout.d.ts +2 -14
  171. package/dist/esm/hooks/useRollout.js +1 -1
  172. package/dist/esm/hooks/useRollout.js.map +3 -3
  173. package/package.json +1 -1
  174. package/style.css +23 -0
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ export type BreadcrumbItem = {
3
+ label: string;
4
+ href?: string;
5
+ };
6
+ type Props = {
7
+ items: BreadcrumbItem[];
8
+ maxItems?: number;
9
+ className?: string;
10
+ };
11
+ export declare const Breadcrumb: React.FC<Props>;
12
+ export default Breadcrumb;
@@ -0,0 +1,2 @@
1
+ "use strict";var f=Object.create;var o=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var h=Object.getOwnPropertyNames;var g=Object.getPrototypeOf,x=Object.prototype.hasOwnProperty;var N=(e,l)=>{for(var r in l)o(e,r,{get:l[r],enumerable:!0})},m=(e,l,r,c)=>{if(l&&typeof l=="object"||typeof l=="function")for(let t of h(l))!x.call(e,t)&&t!==r&&o(e,t,{get:()=>l[t],enumerable:!(c=d(l,t))||c.enumerable});return e};var y=(e,l,r)=>(r=e!=null?f(g(e)):{},m(l||!e||!e.__esModule?o(r,"default",{value:e,enumerable:!0}):r,e)),k=e=>m(o({},"__esModule",{value:!0}),e);var I={};N(I,{Breadcrumb:()=>p,default:()=>B});module.exports=k(I);var s=require("react/jsx-runtime"),v=require("react"),b=y(require("./link"));const p=({items:e,maxItems:l=5,className:r=""})=>{if(!e||e.length===0)return null;const c=e.length>l;let t=e;if(c){const a=e[0],n=e.slice(-2);t=[a,{ellipsis:!0},...n]}return(0,s.jsx)("nav",{className:r,"aria-label":"Breadcrumb",children:(0,s.jsx)("ol",{className:"flex items-center",children:t.map((a,n)=>{if("ellipsis"in a&&a.ellipsis)return(0,s.jsx)("li",{className:"select-none text-gray-400",children:(0,s.jsx)("span",{"aria-hidden":!0,children:"\u2026"})},`ellipsis-${n}`);const i=e?.[e?.length-1]?.label===a?.label&&e?.[e?.length-1]?.href===a?.href,u=`${a.label}-${n}`;return(0,s.jsxs)("li",{className:"flex items-center font-bold desktop:text-lg tablet:text-base text-sm",children:[n!==0&&(0,s.jsx)("span",{className:"mx-1 text-[#6D6D6F]",children:"/"}),i?(0,s.jsx)("span",{className:"truncate","aria-current":"page",title:a.label,children:a.label}):(0,s.jsx)(b.default,{href:a.href,asChild:!a.href,title:a.label,className:"text-[#6D6D6F] truncate no-underline",children:a.label})]},u)})})})};p.displayName="Breadcrumb";var B=p;
2
+ //# sourceMappingURL=breadcrumb.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/components/breadcrumb.tsx"],
4
+ "sourcesContent": ["// Breadcrumb.tsx\nimport React from 'react'\nimport Link from './link'\n\nexport type BreadcrumbItem = {\n label: string\n href?: string // \u5982\u679C\u6CA1\u6709 href \u5219\u6E32\u67D3\u4E3A\u4E0D\u53EF\u70B9\u51FB\u7684\u6587\u672C\uFF08\u901A\u5E38\u7528\u4E8E\u6700\u540E\u4E00\u9879\uFF09\n}\n\ntype Props = {\n items: BreadcrumbItem[]\n maxItems?: number // \u8D85\u8FC7\u591A\u5C11\u4E2A\u65F6\u542F\u7528\u622A\u65AD\u903B\u8F91\uFF08\u9ED8\u8BA4 5\uFF09\n className?: string\n}\n\nexport const Breadcrumb: React.FC<Props> = ({ items, maxItems = 5, className = '' }) => {\n if (!items || items.length === 0) return null\n\n // \u5982\u679C\u6570\u91CF\u8D85\u51FA maxItems\uFF0C\u5219\u663E\u793A first, '...', last 2\n const shouldTruncate = items.length > maxItems\n let visibleItems: (BreadcrumbItem | { ellipsis: true })[] = items\n\n if (shouldTruncate) {\n const first = items[0]\n const lastTwo = items.slice(-2)\n visibleItems = [first, { ellipsis: true }, ...lastTwo]\n }\n\n return (\n <nav className={className} aria-label=\"Breadcrumb\">\n <ol className=\"flex items-center\">\n {visibleItems.map((it: any, idx) => {\n // \u5904\u7406\u7701\u7565\u9879\n if ('ellipsis' in it && it.ellipsis) {\n return (\n <li key={`ellipsis-${idx}`} className=\"select-none text-gray-400\">\n <span aria-hidden>\u2026</span>\n </li>\n )\n }\n const isLast =\n items?.[items?.length - 1]?.label === it?.label && items?.[items?.length - 1]?.href === it?.href\n const key = `${it.label}-${idx}`\n\n return (\n <li key={key} className=\"flex items-center font-bold desktop:text-lg tablet:text-base text-sm\">\n {/* \u5206\u9694\u7B26\uFF08\u7B2C\u4E00\u4E2A\u9879\u524D\u9762\u4E0D\u6E32\u67D3\uFF09 */}\n {idx !== 0 && <span className=\"mx-1 text-[#6D6D6F]\">/</span>}\n\n {isLast ? (\n <span className=\"truncate\" aria-current=\"page\" title={it.label}>\n {it.label}\n </span>\n ) : (\n <Link\n href={it.href}\n asChild={!it.href}\n title={it.label}\n className=\"text-[#6D6D6F] truncate no-underline\"\n >\n {it.label}\n </Link>\n )}\n </li>\n )\n })}\n </ol>\n </nav>\n )\n}\n\nBreadcrumb.displayName = 'Breadcrumb'\n\nexport default Breadcrumb\n"],
5
+ "m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AEJ,EAEAhB,EAAW,YAAc,aAEzB,IAAOC,EAAQD",
6
+ "names": ["breadcrumb_exports", "__export", "Breadcrumb", "breadcrumb_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_link", "items", "maxItems", "className", "shouldTruncate", "visibleItems", "first", "lastTwo", "it", "idx", "isLast", "key", "Link"]
7
+ }
@@ -24,3 +24,4 @@ export { default as Picture } from './picture.js';
24
24
  export { default as Theme } from './theme.js';
25
25
  export { default as Board } from './board.js';
26
26
  export { default as LoadingDots } from './loadingDots.js';
27
+ export { default as Breadcrumb } from './breadcrumb.js';
@@ -1,2 +1,2 @@
1
- "use strict";var h=Object.create;var f=Object.defineProperty;var F=Object.getOwnPropertyDescriptor;var B=Object.getOwnPropertyNames;var N=Object.getPrototypeOf,O=Object.prototype.hasOwnProperty;var j=(t,p)=>{for(var d in p)f(t,d,{get:p[d],enumerable:!0})},P=(t,p,d,w)=>{if(p&&typeof p=="object"||typeof p=="function")for(let m of B(p))!O.call(t,m)&&m!==d&&f(t,m,{get:()=>p[m],enumerable:!(w=F(p,m))||w.enumerable});return t};var n=(t,p,d)=>(d=t!=null?h(N(t)):{},P(p||!t||!t.__esModule?f(d,"default",{value:t,enumerable:!0}):d,t)),q=t=>P(f({},"__esModule",{value:!0}),t);var z={};j(z,{Alert:()=>s.Alert,AlertDescription:()=>s.AlertDescription,AlertTitle:()=>s.AlertTitle,Avatar:()=>D.Avatar,AvatarFallback:()=>D.AvatarFallback,AvatarImage:()=>D.AvatarImage,Badge:()=>M.default,Board:()=>H.default,Button:()=>T.default,Card:()=>a.Card,CardContent:()=>a.CardContent,CardDescription:()=>a.CardDescription,CardFooter:()=>a.CardFooter,CardHeader:()=>a.CardHeader,CardTitle:()=>a.CardTitle,Carousel:()=>u.Carousel,CarouselContent:()=>u.CarouselContent,CarouselItem:()=>u.CarouselItem,CarouselNext:()=>u.CarouselNext,CarouselPrevious:()=>u.CarouselPrevious,Checkbox:()=>b.default,Color:()=>v.Color,Container:()=>c.Container,Dialog:()=>o.Dialog,DialogClose:()=>o.DialogClose,DialogContent:()=>o.DialogContent,DialogDescription:()=>o.DialogDescription,DialogFooter:()=>o.DialogFooter,DialogHeader:()=>o.DialogHeader,DialogOverlay:()=>o.DialogOverlay,DialogPortal:()=>o.DialogPortal,DialogTitle:()=>o.DialogTitle,DialogTrigger:()=>o.DialogTrigger,Drawer:()=>e.Drawer,DrawerClose:()=>e.DrawerClose,DrawerContent:()=>e.DrawerContent,DrawerDescription:()=>e.DrawerDescription,DrawerFooter:()=>e.DrawerFooter,DrawerHeader:()=>e.DrawerHeader,DrawerOverlay:()=>e.DrawerOverlay,DrawerPortal:()=>e.DrawerPortal,DrawerTitle:()=>e.DrawerTitle,DrawerTrigger:()=>e.DrawerTrigger,DropdownMenu:()=>r.DropdownMenu,DropdownMenuCheckboxItem:()=>r.DropdownMenuCheckboxItem,DropdownMenuContent:()=>r.DropdownMenuContent,DropdownMenuGroup:()=>r.DropdownMenuGroup,DropdownMenuItem:()=>r.DropdownMenuItem,DropdownMenuLabel:()=>r.DropdownMenuLabel,DropdownMenuPortal:()=>r.DropdownMenuPortal,DropdownMenuRadioGroup:()=>r.DropdownMenuRadioGroup,DropdownMenuRadioItem:()=>r.DropdownMenuRadioItem,DropdownMenuSeparator:()=>r.DropdownMenuSeparator,DropdownMenuShortcut:()=>r.DropdownMenuShortcut,DropdownMenuSub:()=>r.DropdownMenuSub,DropdownMenuSubContent:()=>r.DropdownMenuSubContent,DropdownMenuSubTrigger:()=>r.DropdownMenuSubTrigger,DropdownMenuTrigger:()=>r.DropdownMenuTrigger,Grid:()=>g.Grid,GridItem:()=>g.GridItem,Heading:()=>G.Heading,Input:()=>x.Input,InputNumber:()=>S.default,InputSlot:()=>x.InputSlot,Link:()=>A.default,LoadingDots:()=>L.default,Picture:()=>k.default,Popover:()=>l.Popover,PopoverContent:()=>l.PopoverContent,PopoverTrigger:()=>l.PopoverTrigger,RadioGroup:()=>C.RadioGroup,RadioGroupItem:()=>C.RadioGroupItem,Skeleton:()=>y.default,Tabs:()=>i.Tabs,TabsContent:()=>i.TabsContent,TabsList:()=>i.TabsList,TabsTrigger:()=>i.TabsTrigger,Text:()=>I.Text,Theme:()=>R.default});module.exports=q(z);var T=n(require("./button.js")),M=n(require("./badge.js")),x=require("./input.js"),b=n(require("./checkbox.js")),y=n(require("./skeleton.js")),o=require("./dialog.js"),l=require("./popover.js"),C=require("./radio.js"),I=require("./text.js"),g=require("./gird.js"),G=require("./heading.js"),c=require("./container.js"),v=require("./color.js"),e=require("./drawer.js"),A=n(require("./link.js")),D=require("./avatar.js"),S=n(require("./input-number.js")),r=require("./drop-down.js"),a=require("./card.js"),u=require("./carousel.js"),i=require("./tabs.js"),s=require("./alert.js"),k=n(require("./picture.js")),R=n(require("./theme.js")),H=n(require("./board.js")),L=n(require("./loadingDots.js"));
1
+ "use strict";var B=Object.create;var f=Object.defineProperty;var F=Object.getOwnPropertyDescriptor;var N=Object.getOwnPropertyNames;var O=Object.getPrototypeOf,j=Object.prototype.hasOwnProperty;var q=(t,p)=>{for(var d in p)f(t,d,{get:p[d],enumerable:!0})},P=(t,p,d,w)=>{if(p&&typeof p=="object"||typeof p=="function")for(let D of N(p))!j.call(t,D)&&D!==d&&f(t,D,{get:()=>p[D],enumerable:!(w=F(p,D))||w.enumerable});return t};var n=(t,p,d)=>(d=t!=null?B(O(t)):{},P(p||!t||!t.__esModule?f(d,"default",{value:t,enumerable:!0}):d,t)),z=t=>P(f({},"__esModule",{value:!0}),t);var E={};q(E,{Alert:()=>s.Alert,AlertDescription:()=>s.AlertDescription,AlertTitle:()=>s.AlertTitle,Avatar:()=>m.Avatar,AvatarFallback:()=>m.AvatarFallback,AvatarImage:()=>m.AvatarImage,Badge:()=>M.default,Board:()=>H.default,Breadcrumb:()=>h.default,Button:()=>T.default,Card:()=>a.Card,CardContent:()=>a.CardContent,CardDescription:()=>a.CardDescription,CardFooter:()=>a.CardFooter,CardHeader:()=>a.CardHeader,CardTitle:()=>a.CardTitle,Carousel:()=>u.Carousel,CarouselContent:()=>u.CarouselContent,CarouselItem:()=>u.CarouselItem,CarouselNext:()=>u.CarouselNext,CarouselPrevious:()=>u.CarouselPrevious,Checkbox:()=>b.default,Color:()=>v.Color,Container:()=>G.Container,Dialog:()=>o.Dialog,DialogClose:()=>o.DialogClose,DialogContent:()=>o.DialogContent,DialogDescription:()=>o.DialogDescription,DialogFooter:()=>o.DialogFooter,DialogHeader:()=>o.DialogHeader,DialogOverlay:()=>o.DialogOverlay,DialogPortal:()=>o.DialogPortal,DialogTitle:()=>o.DialogTitle,DialogTrigger:()=>o.DialogTrigger,Drawer:()=>e.Drawer,DrawerClose:()=>e.DrawerClose,DrawerContent:()=>e.DrawerContent,DrawerDescription:()=>e.DrawerDescription,DrawerFooter:()=>e.DrawerFooter,DrawerHeader:()=>e.DrawerHeader,DrawerOverlay:()=>e.DrawerOverlay,DrawerPortal:()=>e.DrawerPortal,DrawerTitle:()=>e.DrawerTitle,DrawerTrigger:()=>e.DrawerTrigger,DropdownMenu:()=>r.DropdownMenu,DropdownMenuCheckboxItem:()=>r.DropdownMenuCheckboxItem,DropdownMenuContent:()=>r.DropdownMenuContent,DropdownMenuGroup:()=>r.DropdownMenuGroup,DropdownMenuItem:()=>r.DropdownMenuItem,DropdownMenuLabel:()=>r.DropdownMenuLabel,DropdownMenuPortal:()=>r.DropdownMenuPortal,DropdownMenuRadioGroup:()=>r.DropdownMenuRadioGroup,DropdownMenuRadioItem:()=>r.DropdownMenuRadioItem,DropdownMenuSeparator:()=>r.DropdownMenuSeparator,DropdownMenuShortcut:()=>r.DropdownMenuShortcut,DropdownMenuSub:()=>r.DropdownMenuSub,DropdownMenuSubContent:()=>r.DropdownMenuSubContent,DropdownMenuSubTrigger:()=>r.DropdownMenuSubTrigger,DropdownMenuTrigger:()=>r.DropdownMenuTrigger,Grid:()=>g.Grid,GridItem:()=>g.GridItem,Heading:()=>c.Heading,Input:()=>x.Input,InputNumber:()=>S.default,InputSlot:()=>x.InputSlot,Link:()=>A.default,LoadingDots:()=>L.default,Picture:()=>k.default,Popover:()=>l.Popover,PopoverContent:()=>l.PopoverContent,PopoverTrigger:()=>l.PopoverTrigger,RadioGroup:()=>C.RadioGroup,RadioGroupItem:()=>C.RadioGroupItem,Skeleton:()=>y.default,Tabs:()=>i.Tabs,TabsContent:()=>i.TabsContent,TabsList:()=>i.TabsList,TabsTrigger:()=>i.TabsTrigger,Text:()=>I.Text,Theme:()=>R.default});module.exports=z(E);var T=n(require("./button.js")),M=n(require("./badge.js")),x=require("./input.js"),b=n(require("./checkbox.js")),y=n(require("./skeleton.js")),o=require("./dialog.js"),l=require("./popover.js"),C=require("./radio.js"),I=require("./text.js"),g=require("./gird.js"),c=require("./heading.js"),G=require("./container.js"),v=require("./color.js"),e=require("./drawer.js"),A=n(require("./link.js")),m=require("./avatar.js"),S=n(require("./input-number.js")),r=require("./drop-down.js"),a=require("./card.js"),u=require("./carousel.js"),i=require("./tabs.js"),s=require("./alert.js"),k=n(require("./picture.js")),R=n(require("./theme.js")),H=n(require("./board.js")),L=n(require("./loadingDots.js")),h=n(require("./breadcrumb.js"));
2
2
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/index.ts"],
4
- "sourcesContent": ["export { default as Button } from './button.js'\nexport { default as Badge } from './badge.js'\nexport { Input, InputSlot } from './input.js'\n\nexport { default as Checkbox } from './checkbox.js'\n\nexport { default as Skeleton } from './skeleton.js'\nexport {\n Dialog,\n DialogPortal,\n DialogOverlay,\n DialogClose,\n DialogTrigger,\n DialogContent,\n DialogHeader,\n DialogFooter,\n DialogTitle,\n DialogDescription,\n} from './dialog.js'\nexport { Popover, PopoverTrigger, PopoverContent } from './popover.js'\nexport { RadioGroup, RadioGroupItem, type RadioGroupProps, type RadioGroupItemProps } from './radio.js'\nexport { Text, type TextProps } from './text.js'\nexport { Grid, GridItem, type GridProps, type GridItemProps } from './gird.js'\nexport { Heading, type HeadingProps } from './heading.js'\nexport { Container, type ContainerProps } from './container.js'\nexport { Color, type ColorProps } from './color.js'\nexport {\n Drawer,\n DrawerPortal,\n DrawerOverlay,\n DrawerTrigger,\n DrawerClose,\n DrawerContent,\n DrawerHeader,\n DrawerFooter,\n DrawerTitle,\n DrawerDescription,\n} from './drawer.js'\nexport { default as Link, type LinkProps } from './link.js'\nexport { Avatar, AvatarImage, AvatarFallback } from './avatar.js'\nexport { default as InputNumber, type InputNumberProps } from './input-number.js'\nexport {\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuGroup,\n DropdownMenuPortal,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuRadioGroup,\n} from './drop-down.js'\nexport { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent } from './card.js'\nexport {\n type CarouselApi,\n Carousel,\n CarouselContent,\n CarouselItem,\n CarouselPrevious,\n CarouselNext,\n} from './carousel.js'\nexport { Tabs, TabsList, TabsTrigger, TabsContent } from './tabs.js'\nexport { Alert, AlertTitle, AlertDescription } from './alert.js'\nexport { default as Picture } from './picture.js'\nexport { default as Theme } from './theme.js'\nexport { default as Board } from './board.js'\nexport { default as LoadingDots } from './loadingDots.js'\n"],
5
- "mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,g8EAAAE,EAAAF,GAAA,IAAAG,EAAkC,0BAClCC,EAAiC,yBACjCC,EAAiC,sBAEjCC,EAAoC,4BAEpCC,EAAoC,4BACpCC,EAWO,uBACPC,EAAwD,wBACxDC,EAA2F,sBAC3FC,EAAqC,qBACrCC,EAAmE,qBACnEC,EAA2C,wBAC3CC,EAA+C,0BAC/CC,EAAuC,sBACvCC,EAWO,uBACPC,EAAgD,wBAChDC,EAAoD,uBACpDC,EAA8D,gCAC9DC,EAgBO,0BACPC,EAAsF,qBACtFC,EAOO,yBACPC,EAAyD,qBACzDC,EAAoD,sBACpDC,EAAmC,2BACnCC,EAAiC,yBACjCC,EAAiC,yBACjCC,EAAuC",
6
- "names": ["components_exports", "__export", "__toCommonJS", "import_button", "import_badge", "import_input", "import_checkbox", "import_skeleton", "import_dialog", "import_popover", "import_radio", "import_text", "import_gird", "import_heading", "import_container", "import_color", "import_drawer", "import_link", "import_avatar", "import_input_number", "import_drop_down", "import_card", "import_carousel", "import_tabs", "import_alert", "import_picture", "import_theme", "import_board", "import_loadingDots"]
4
+ "sourcesContent": ["export { default as Button } from './button.js'\nexport { default as Badge } from './badge.js'\nexport { Input, InputSlot } from './input.js'\n\nexport { default as Checkbox } from './checkbox.js'\n\nexport { default as Skeleton } from './skeleton.js'\nexport {\n Dialog,\n DialogPortal,\n DialogOverlay,\n DialogClose,\n DialogTrigger,\n DialogContent,\n DialogHeader,\n DialogFooter,\n DialogTitle,\n DialogDescription,\n} from './dialog.js'\nexport { Popover, PopoverTrigger, PopoverContent } from './popover.js'\nexport { RadioGroup, RadioGroupItem, type RadioGroupProps, type RadioGroupItemProps } from './radio.js'\nexport { Text, type TextProps } from './text.js'\nexport { Grid, GridItem, type GridProps, type GridItemProps } from './gird.js'\nexport { Heading, type HeadingProps } from './heading.js'\nexport { Container, type ContainerProps } from './container.js'\nexport { Color, type ColorProps } from './color.js'\nexport {\n Drawer,\n DrawerPortal,\n DrawerOverlay,\n DrawerTrigger,\n DrawerClose,\n DrawerContent,\n DrawerHeader,\n DrawerFooter,\n DrawerTitle,\n DrawerDescription,\n} from './drawer.js'\nexport { default as Link, type LinkProps } from './link.js'\nexport { Avatar, AvatarImage, AvatarFallback } from './avatar.js'\nexport { default as InputNumber, type InputNumberProps } from './input-number.js'\nexport {\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuGroup,\n DropdownMenuPortal,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuRadioGroup,\n} from './drop-down.js'\nexport { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent } from './card.js'\nexport {\n type CarouselApi,\n Carousel,\n CarouselContent,\n CarouselItem,\n CarouselPrevious,\n CarouselNext,\n} from './carousel.js'\nexport { Tabs, TabsList, TabsTrigger, TabsContent } from './tabs.js'\nexport { Alert, AlertTitle, AlertDescription } from './alert.js'\nexport { default as Picture } from './picture.js'\nexport { default as Theme } from './theme.js'\nexport { default as Board } from './board.js'\nexport { default as LoadingDots } from './loadingDots.js'\nexport { default as Breadcrumb } from './breadcrumb.js'\n"],
5
+ "mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,y9EAAAE,EAAAF,GAAA,IAAAG,EAAkC,0BAClCC,EAAiC,yBACjCC,EAAiC,sBAEjCC,EAAoC,4BAEpCC,EAAoC,4BACpCC,EAWO,uBACPC,EAAwD,wBACxDC,EAA2F,sBAC3FC,EAAqC,qBACrCC,EAAmE,qBACnEC,EAA2C,wBAC3CC,EAA+C,0BAC/CC,EAAuC,sBACvCC,EAWO,uBACPC,EAAgD,wBAChDC,EAAoD,uBACpDC,EAA8D,gCAC9DC,EAgBO,0BACPC,EAAsF,qBACtFC,EAOO,yBACPC,EAAyD,qBACzDC,EAAoD,sBACpDC,EAAmC,2BACnCC,EAAiC,yBACjCC,EAAiC,yBACjCC,EAAuC,+BACvCC,EAAsC",
6
+ "names": ["components_exports", "__export", "__toCommonJS", "import_button", "import_badge", "import_input", "import_checkbox", "import_skeleton", "import_dialog", "import_popover", "import_radio", "import_text", "import_gird", "import_heading", "import_container", "import_color", "import_drawer", "import_link", "import_avatar", "import_input_number", "import_drop_down", "import_card", "import_carousel", "import_tabs", "import_alert", "import_picture", "import_theme", "import_board", "import_loadingDots", "import_breadcrumb"]
7
7
  }
@@ -4,3 +4,4 @@ export declare function noop(): any;
4
4
  export declare function atobID(id: string): string | undefined;
5
5
  export declare const spaceToHyphen: (str: string) => string;
6
6
  export declare const highlightSearchWord: (text: string, searchText: string) => string;
7
+ export declare const yotpoInstanceId: (locale?: string) => string;
@@ -1,2 +1,2 @@
1
- "use strict";var i=Object.defineProperty;var l=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var p=Object.prototype.hasOwnProperty;var c=(t,e)=>{for(var n in e)i(t,n,{get:e[n],enumerable:!0})},x=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of g(e))!p.call(t,o)&&o!==n&&i(t,o,{get:()=>e[o],enumerable:!(r=l(e,o))||r.enumerable});return t};var d=t=>x(i({},"__esModule",{value:!0}),t);var b={};c(b,{atobID:()=>y,cn:()=>h,highlightSearchWord:()=>w,noop:()=>u,spaceToHyphen:()=>m});module.exports=d(b);var s=require("clsx"),a=require("tailwind-merge");const f=(0,a.extendTailwindMerge)({extend:{theme:{borderRadius:["btn"]},classGroups:{"font-size":["text-heading-1","text-heading-2","text-heading-3","text-heading-4","text-heading-5","text-text-3","text-text-2","text-text-1"],"text-color":["text-info-primary","text-info-secondary","text-info-tertiary","text-info-quaternary","text-info-white"],leading:["leading-tight","leading-normal","leading-loose"]}}});function h(...t){return f((0,s.clsx)(t))}function u(){}function y(t){return t&&typeof t=="string"&&t.includes("/")?t.split("/").pop()?.split("?")?.shift():t}const m=t=>t?.replace(/\s+/g,"-"),w=(t,e)=>{try{const n=t?.search(new RegExp(e,"i"));if(e&&n!==-1){const r=t.slice(n,n+e.length);return t.replace(r,`<span class='text-brand-0 font-bold'>${r}</span>`)}else return t}catch(n){return console.log("e",n),t}};
1
+ "use strict";var s=Object.defineProperty;var l=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var p=Object.prototype.hasOwnProperty;var g=(t,e)=>{for(var n in e)s(t,n,{get:e[n],enumerable:!0})},x=(t,e,n,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of c(e))!p.call(t,r)&&r!==n&&s(t,r,{get:()=>e[r],enumerable:!(o=l(e,r))||o.enumerable});return t};var d=t=>x(s({},"__esModule",{value:!0}),t);var I={};g(I,{atobID:()=>y,cn:()=>f,highlightSearchWord:()=>w,noop:()=>h,spaceToHyphen:()=>m,yotpoInstanceId:()=>b});module.exports=d(I);var i=require("clsx"),a=require("tailwind-merge");const u=(0,a.extendTailwindMerge)({extend:{theme:{borderRadius:["btn"]},classGroups:{"font-size":["text-heading-1","text-heading-2","text-heading-3","text-heading-4","text-heading-5","text-text-3","text-text-2","text-text-1"],"text-color":["text-info-primary","text-info-secondary","text-info-tertiary","text-info-quaternary","text-info-white"],leading:["leading-tight","leading-normal","leading-loose"]}}});function f(...t){return u((0,i.clsx)(t))}function h(){}function y(t){return t&&typeof t=="string"&&t.includes("/")?t.split("/").pop()?.split("?")?.shift():t}const m=t=>t?.replace(/\s+/g,"-"),w=(t,e)=>{try{const n=t?.search(new RegExp(e,"i"));if(e&&n!==-1){const o=t.slice(n,n+e.length);return t.replace(o,`<span class='text-brand-0 font-bold'>${o}</span>`)}else return t}catch(n){return console.log("e",n),t}},b=(t="us")=>({us:"1126311",uk:"638361",ca:"638351"})[t]||"";
2
2
  //# sourceMappingURL=utils.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/helpers/utils.ts"],
4
- "sourcesContent": ["import { clsx, type ClassValue } from 'clsx'\nimport { extendTailwindMerge } from 'tailwind-merge'\n\nconst twMerge = extendTailwindMerge({\n extend: {\n theme: {\n borderRadius: ['btn'],\n },\n classGroups: {\n 'font-size': [\n 'text-heading-1',\n 'text-heading-2',\n 'text-heading-3',\n 'text-heading-4',\n 'text-heading-5',\n 'text-text-3',\n 'text-text-2',\n 'text-text-1',\n ],\n 'text-color': [\n 'text-info-primary',\n 'text-info-secondary',\n 'text-info-tertiary',\n 'text-info-quaternary',\n 'text-info-white',\n ],\n leading: ['leading-tight', 'leading-normal', 'leading-loose'],\n },\n },\n})\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n\nexport function noop(): any {}\n\nexport function atobID(id: string) {\n if (id && typeof id === 'string' && id.includes('/')) {\n return id.split('/').pop()?.split('?')?.shift()\n } else {\n return id\n }\n}\nexport const spaceToHyphen = (str: string) => str?.replace(/\\s+/g, '-')\n\nexport const highlightSearchWord = (text: string, searchText: string) => {\n try {\n const wordIndex = text?.search(new RegExp(searchText, 'i'))\n if (searchText && wordIndex !== -1) {\n const word = text.slice(wordIndex, wordIndex + searchText.length)\n return text.replace(word, `<span class='text-brand-0 font-bold'>${word}</span>`)\n } else {\n return text\n }\n } catch (e) {\n console.log('e', e)\n return text\n }\n}"],
5
- "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,YAAAE,EAAA,OAAAC,EAAA,wBAAAC,EAAA,SAAAC,EAAA,kBAAAC,IAAA,eAAAC,EAAAP,GAAA,IAAAQ,EAAsC,gBACtCC,EAAoC,0BAEpC,MAAMC,KAAU,uBAAoB,CAClC,OAAQ,CACN,MAAO,CACL,aAAc,CAAC,KAAK,CACtB,EACA,YAAa,CACX,YAAa,CACX,iBACA,iBACA,iBACA,iBACA,iBACA,cACA,cACA,aACF,EACA,aAAc,CACZ,oBACA,sBACA,qBACA,uBACA,iBACF,EACA,QAAS,CAAC,gBAAiB,iBAAkB,eAAe,CAC9D,CACF,CACF,CAAC,EAEM,SAASP,KAAMQ,EAAsB,CAC1C,OAAOD,KAAQ,QAAKC,CAAM,CAAC,CAC7B,CAEO,SAASN,GAAY,CAAC,CAEtB,SAASH,EAAOU,EAAY,CACjC,OAAIA,GAAM,OAAOA,GAAO,UAAYA,EAAG,SAAS,GAAG,EAC1CA,EAAG,MAAM,GAAG,EAAE,IAAI,GAAG,MAAM,GAAG,GAAG,MAAM,EAEvCA,CAEX,CACO,MAAMN,EAAiBO,GAAgBA,GAAK,QAAQ,OAAQ,GAAG,EAEzDT,EAAsB,CAACU,EAAcC,IAAuB,CACvE,GAAI,CACF,MAAMC,EAAYF,GAAM,OAAO,IAAI,OAAOC,EAAY,GAAG,CAAC,EAC1D,GAAIA,GAAcC,IAAc,GAAI,CAClC,MAAMC,EAAOH,EAAK,MAAME,EAAWA,EAAYD,EAAW,MAAM,EAChE,OAAOD,EAAK,QAAQG,EAAM,wCAAwCA,CAAI,SAAS,CACjF,KACE,QAAOH,CAEX,OAASI,EAAG,CACV,eAAQ,IAAI,IAAKA,CAAC,EACXJ,CACT,CACF",
6
- "names": ["utils_exports", "__export", "atobID", "cn", "highlightSearchWord", "noop", "spaceToHyphen", "__toCommonJS", "import_clsx", "import_tailwind_merge", "twMerge", "inputs", "id", "str", "text", "searchText", "wordIndex", "word", "e"]
4
+ "sourcesContent": ["import { clsx, type ClassValue } from 'clsx'\nimport { extendTailwindMerge } from 'tailwind-merge'\n\nconst twMerge = extendTailwindMerge({\n extend: {\n theme: {\n borderRadius: ['btn'],\n },\n classGroups: {\n 'font-size': [\n 'text-heading-1',\n 'text-heading-2',\n 'text-heading-3',\n 'text-heading-4',\n 'text-heading-5',\n 'text-text-3',\n 'text-text-2',\n 'text-text-1',\n ],\n 'text-color': [\n 'text-info-primary',\n 'text-info-secondary',\n 'text-info-tertiary',\n 'text-info-quaternary',\n 'text-info-white',\n ],\n leading: ['leading-tight', 'leading-normal', 'leading-loose'],\n },\n },\n})\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n\nexport function noop(): any {}\n\nexport function atobID(id: string) {\n if (id && typeof id === 'string' && id.includes('/')) {\n return id.split('/').pop()?.split('?')?.shift()\n } else {\n return id\n }\n}\n\nexport const spaceToHyphen = (str: string) => str?.replace(/\\s+/g, '-')\n\nexport const highlightSearchWord = (text: string, searchText: string) => {\n try {\n const wordIndex = text?.search(new RegExp(searchText, 'i'))\n if (searchText && wordIndex !== -1) {\n const word = text.slice(wordIndex, wordIndex + searchText.length)\n return text.replace(word, `<span class='text-brand-0 font-bold'>${word}</span>`)\n } else {\n return text\n }\n } catch (e) {\n console.log('e', e)\n return text\n }\n}\nexport const yotpoInstanceId = (locale = 'us') =>\n ({\n us: '1126311',\n uk: '638361',\n ca: '638351',\n }[locale] || '')\n"],
5
+ "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,YAAAE,EAAA,OAAAC,EAAA,wBAAAC,EAAA,SAAAC,EAAA,kBAAAC,EAAA,oBAAAC,IAAA,eAAAC,EAAAR,GAAA,IAAAS,EAAsC,gBACtCC,EAAoC,0BAEpC,MAAMC,KAAU,uBAAoB,CAClC,OAAQ,CACN,MAAO,CACL,aAAc,CAAC,KAAK,CACtB,EACA,YAAa,CACX,YAAa,CACX,iBACA,iBACA,iBACA,iBACA,iBACA,cACA,cACA,aACF,EACA,aAAc,CACZ,oBACA,sBACA,qBACA,uBACA,iBACF,EACA,QAAS,CAAC,gBAAiB,iBAAkB,eAAe,CAC9D,CACF,CACF,CAAC,EAEM,SAASR,KAAMS,EAAsB,CAC1C,OAAOD,KAAQ,QAAKC,CAAM,CAAC,CAC7B,CAEO,SAASP,GAAY,CAAC,CAEtB,SAASH,EAAOW,EAAY,CACjC,OAAIA,GAAM,OAAOA,GAAO,UAAYA,EAAG,SAAS,GAAG,EAC1CA,EAAG,MAAM,GAAG,EAAE,IAAI,GAAG,MAAM,GAAG,GAAG,MAAM,EAEvCA,CAEX,CAEO,MAAMP,EAAiBQ,GAAgBA,GAAK,QAAQ,OAAQ,GAAG,EAEzDV,EAAsB,CAACW,EAAcC,IAAuB,CACvE,GAAI,CACF,MAAMC,EAAYF,GAAM,OAAO,IAAI,OAAOC,EAAY,GAAG,CAAC,EAC1D,GAAIA,GAAcC,IAAc,GAAI,CAClC,MAAMC,EAAOH,EAAK,MAAME,EAAWA,EAAYD,EAAW,MAAM,EAChE,OAAOD,EAAK,QAAQG,EAAM,wCAAwCA,CAAI,SAAS,CACjF,KACE,QAAOH,CAEX,OAASI,EAAG,CACV,eAAQ,IAAI,IAAKA,CAAC,EACXJ,CACT,CACF,EACaR,EAAkB,CAACa,EAAS,QACtC,CACC,GAAI,UACJ,GAAI,SACJ,GAAI,QACN,GAAEA,CAAM,GAAK",
6
+ "names": ["utils_exports", "__export", "atobID", "cn", "highlightSearchWord", "noop", "spaceToHyphen", "yotpoInstanceId", "__toCommonJS", "import_clsx", "import_tailwind_merge", "twMerge", "inputs", "id", "str", "text", "searchText", "wordIndex", "word", "e", "locale"]
7
7
  }
@@ -1,14 +1,2 @@
1
- import { type MutableRefObject } from 'react';
2
- type UseRolloutOptions = IntersectionObserverInit & {
3
- /**
4
- * When true, once the target enters the viewport the first time,
5
- * the observer disconnects and `inView` stays true.
6
- */
7
- once?: boolean;
8
- };
9
- /**
10
- * Observe when an element enters the viewport.
11
- * Returns a ref to attach to the element and a boolean indicating visibility.
12
- */
13
- export declare function useRollout<T extends HTMLElement = HTMLElement>(options?: UseRolloutOptions): [MutableRefObject<T | null>, boolean];
14
- export {};
1
+ /// <reference types="react" />
2
+ export declare function useRollout<T extends Element>(options: any): (boolean | import("react").RefObject<T>)[];
@@ -1,2 +1,2 @@
1
- "use strict";var c=Object.defineProperty;var I=Object.getOwnPropertyDescriptor;var O=Object.getOwnPropertyNames;var R=Object.prototype.hasOwnProperty;var g=(e,t)=>{for(var r in t)c(e,r,{get:t[r],enumerable:!0})},y=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of O(t))!R.call(e,n)&&n!==r&&c(e,n,{get:()=>t[n],enumerable:!(o=I(t,n))||o.enumerable});return e};var M=e=>y(c({},"__esModule",{value:!0}),e);var v={};g(v,{useRollout:()=>p});module.exports=M(v);var s=require("react");function p(e={}){const t=(0,s.useRef)(null),[r,o]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{if(typeof window>"u"||typeof IntersectionObserver>"u"){o(!0);return}const{root:n=null,rootMargin:a="0px",threshold:d=0,once:i=!1}=e,u=t.current;if(!u)return;let f=!1;const l=new IntersectionObserver(b=>{b[0]?.isIntersecting??!1?(o(!0),i&&!f&&(f=!0,l.disconnect())):i||o(!1)},{root:n,rootMargin:a,threshold:d});return l.observe(u),()=>{l.disconnect()}},[t.current,e.root,e.rootMargin,e.threshold,e.once]),[t,r]}
1
+ "use strict";var i=Object.defineProperty;var f=Object.getOwnPropertyDescriptor;var l=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var b=(n,e)=>{for(var t in e)i(n,t,{get:e[t],enumerable:!0})},v=(n,e,t,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of l(e))!d.call(n,r)&&r!==t&&i(n,r,{get:()=>e[r],enumerable:!(o=f(e,r))||o.enumerable});return n};var I=n=>v(i({},"__esModule",{value:!0}),n);var m={};b(m,{useRollout:()=>a});module.exports=I(m);var s=require("react");function a(n){const e=(0,s.useRef)(null),[t,o]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{if(t)return;const r=e.current;if(!r||typeof IntersectionObserver>"u")return;const c=new IntersectionObserver(([u])=>{u.isIntersecting&&(o(!0),c.disconnect())},n);return c.observe(r),()=>c.disconnect()},[t,n]),[e,t]}
2
2
  //# sourceMappingURL=useRollout.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/hooks/useRollout.ts"],
4
- "sourcesContent": ["import { useEffect, useRef, useState, type MutableRefObject } from 'react'\n\ntype UseRolloutOptions = IntersectionObserverInit & {\n /**\n * When true, once the target enters the viewport the first time,\n * the observer disconnects and `inView` stays true.\n */\n once?: boolean\n}\n\n/**\n * Observe when an element enters the viewport.\n * Returns a ref to attach to the element and a boolean indicating visibility.\n */\nexport function useRollout<T extends HTMLElement = HTMLElement>(\n options: UseRolloutOptions = {}\n): [MutableRefObject<T | null>, boolean] {\n const targetRef = useRef<T | null>(null)\n const [inView, setInView] = useState<boolean>(false)\n\n useEffect(() => {\n // Guard for SSR or unsupported environments\n if (typeof window === 'undefined' || typeof IntersectionObserver === 'undefined') {\n setInView(true)\n return\n }\n\n const { root = null, rootMargin = '0px', threshold = 0, once = false } = options\n\n const node = targetRef.current\n if (!node) return\n\n let didDisconnect = false\n\n const observer = new IntersectionObserver(\n entries => {\n const entry = entries[0]\n const isIntersecting = entry?.isIntersecting ?? false\n if (isIntersecting) {\n setInView(true)\n if (once && !didDisconnect) {\n didDisconnect = true\n observer.disconnect()\n }\n } else if (!once) {\n setInView(false)\n }\n },\n { root, rootMargin, threshold }\n )\n\n observer.observe(node)\n\n return () => {\n observer.disconnect()\n }\n // It's important that we only recreate when options or node change\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [targetRef.current, options.root, options.rootMargin, options.threshold, options.once])\n\n return [targetRef, inView]\n}\n\n\n"],
5
- "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,gBAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAAmE,iBAc5D,SAASF,EACdG,EAA6B,CAAC,EACS,CACvC,MAAMC,KAAY,UAAiB,IAAI,EACjC,CAACC,EAAQC,CAAS,KAAI,YAAkB,EAAK,EAEnD,sBAAU,IAAM,CAEd,GAAI,OAAO,OAAW,KAAe,OAAO,qBAAyB,IAAa,CAChFA,EAAU,EAAI,EACd,MACF,CAEA,KAAM,CAAE,KAAAC,EAAO,KAAM,WAAAC,EAAa,MAAO,UAAAC,EAAY,EAAG,KAAAC,EAAO,EAAM,EAAIP,EAEnEQ,EAAOP,EAAU,QACvB,GAAI,CAACO,EAAM,OAEX,IAAIC,EAAgB,GAEpB,MAAMC,EAAW,IAAI,qBACnBC,GAAW,CACKA,EAAQ,CAAC,GACO,gBAAkB,IAE9CR,EAAU,EAAI,EACVI,GAAQ,CAACE,IACXA,EAAgB,GAChBC,EAAS,WAAW,IAEZH,GACVJ,EAAU,EAAK,CAEnB,EACA,CAAE,KAAAC,EAAM,WAAAC,EAAY,UAAAC,CAAU,CAChC,EAEA,OAAAI,EAAS,QAAQF,CAAI,EAEd,IAAM,CACXE,EAAS,WAAW,CACtB,CAGF,EAAG,CAACT,EAAU,QAASD,EAAQ,KAAMA,EAAQ,WAAYA,EAAQ,UAAWA,EAAQ,IAAI,CAAC,EAElF,CAACC,EAAWC,CAAM,CAC3B",
6
- "names": ["useRollout_exports", "__export", "useRollout", "__toCommonJS", "import_react", "options", "targetRef", "inView", "setInView", "root", "rootMargin", "threshold", "once", "node", "didDisconnect", "observer", "entries"]
4
+ "sourcesContent": ["import { useState, useEffect, useRef } from 'react'\n\nexport function useRollout<T extends Element>(options: any) {\n const ref = useRef<T>(null)\n const [inView, setInView] = useState(false)\n useEffect(() => {\n if (inView) return // \u5DF2\u8FDB\u5165\u8FC7\uFF0C\u5219\u4E0D\u518D\u89C2\u5BDF\n const el = ref.current\n if (!el || typeof IntersectionObserver === 'undefined') return\n\n const observer = new IntersectionObserver(([entry]) => {\n if (entry.isIntersecting) {\n setInView(true)\n observer.disconnect() // \u505C\u6B62\u89C2\u5BDF\n }\n }, options)\n\n observer.observe(el)\n return () => observer.disconnect()\n }, [inView, options])\n\n return [ref, inView]\n}\n"],
5
+ "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,gBAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAA4C,iBAErC,SAASF,EAA8BG,EAAc,CAC1D,MAAMC,KAAM,UAAU,IAAI,EACpB,CAACC,EAAQC,CAAS,KAAI,YAAS,EAAK,EAC1C,sBAAU,IAAM,CACd,GAAID,EAAQ,OACZ,MAAME,EAAKH,EAAI,QACf,GAAI,CAACG,GAAM,OAAO,qBAAyB,IAAa,OAExD,MAAMC,EAAW,IAAI,qBAAqB,CAAC,CAACC,CAAK,IAAM,CACjDA,EAAM,iBACRH,EAAU,EAAI,EACdE,EAAS,WAAW,EAExB,EAAGL,CAAO,EAEV,OAAAK,EAAS,QAAQD,CAAE,EACZ,IAAMC,EAAS,WAAW,CACnC,EAAG,CAACH,EAAQF,CAAO,CAAC,EAEb,CAACC,EAAKC,CAAM,CACrB",
6
+ "names": ["useRollout_exports", "__export", "useRollout", "__toCommonJS", "import_react", "options", "ref", "inView", "setInView", "el", "observer", "entry"]
7
7
  }
@@ -2,11 +2,11 @@ import React from 'react';
2
2
  interface AiuiContextType {
3
3
  trackingData: Record<string, any>;
4
4
  locale?: string;
5
- copyWriting?: Record<string, string>;
6
5
  pathname?: string;
7
6
  storeDomain?: string;
8
7
  isLogin?: boolean;
9
8
  currencyCode?: string;
9
+ copyWriting?: Record<string, string>;
10
10
  }
11
11
  export declare const AiuiContext: React.Context<AiuiContextType>;
12
12
  export declare const useAiuiContext: () => AiuiContextType;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/AiuiProvider/index.tsx"],
4
- "sourcesContent": ["import { gaTrack } from '../../shared/track.js'\nimport React, { createContext, useContext, useEffect } from 'react'\n\ninterface AiuiContextType {\n trackingData: Record<string, any>\n locale?: string\n copyWriting?: Record<string, string>\n pathname?: string\n storeDomain?: string\n isLogin?: boolean\n currencyCode?: string\n}\n\nexport const AiuiContext = createContext<AiuiContextType>({\n trackingData: {},\n locale: undefined,\n copyWriting: {},\n})\n\nexport const useAiuiContext = () => {\n const context = useContext(AiuiContext)\n if (!context) {\n throw new Error('useAiui must be used in <AiuiProvider>')\n }\n return useContext(AiuiContext)\n}\n\nconst AiuiProvider = ({\n children,\n ...rest\n}: {\n children: React.ReactNode\n} & AiuiContextType) => {\n useEffect(() => {\n const handleTrackClick = (e: any, el: any) => {\n // e?.stopPropagation?.()\n const out: any = {}\n if (!el || !el.attributes) return out\n for (const attr of Array.from(el.attributes)) {\n const name = (attr as any)?.name\n if (name?.startsWith('data-headless-')) {\n out[name] = el.getAttribute(name)\n }\n }\n const sku = out?.['data-headless-sku']\n const nameType = out?.['data-headless-type-name']?.split?.('#')\n const titleDesc = out?.['data-headless-title-desc-button']?.split?.('#')\n const navPosition = out?.['data-headless-nav-postion']?.split?.('#')\n gaTrack({\n event: 'ga4Event',\n event_name: 'component_click',\n event_parameters: {\n page_group: rest?.trackingData?.pageGroup || 'Home Page',\n component_type: nameType?.[0] || '',\n component_name: nameType?.[1] || '',\n position: navPosition?.[1] || '',\n navigation: navPosition?.[0] || '',\n button_name: titleDesc?.[2] || '',\n SKU: sku || '',\n component_title: titleDesc?.[0] || '',\n component_description: titleDesc?.[1] || '',\n },\n })\n }\n const observer = new MutationObserver(() => {\n document.querySelectorAll('[data-headless-type-name]').forEach(el => {\n if (!el.hasAttribute('data-headless-track-bound')) {\n el.addEventListener('click', e => handleTrackClick(e, el))\n el.setAttribute('data-headless-track-bound', 'true') // \u907F\u514D\u91CD\u590D\u7ED1\u5B9A\n }\n })\n })\n observer.observe(document.body, { childList: true, subtree: true })\n // \u521D\u59CB\u5316\u4E00\u6B21\u73B0\u6709\u8282\u70B9\n document.querySelectorAll('[data-headless-type-name]').forEach(el => {\n if (!el.hasAttribute('data-headless-track-bound')) {\n el.addEventListener('click', e => handleTrackClick(e, el))\n el.setAttribute('data-headless-track-bound', 'true')\n }\n })\n return () => observer.disconnect()\n }, [])\n\n return <AiuiContext.Provider value={rest}>{children}</AiuiContext.Provider>\n}\n\nexport default AiuiProvider\n"],
4
+ "sourcesContent": ["import { gaTrack } from '../../shared/track.js'\nimport React, { createContext, useContext, useEffect } from 'react'\n\ninterface AiuiContextType {\n trackingData: Record<string, any>\n locale?: string\n pathname?: string\n storeDomain?: string\n isLogin?: boolean\n currencyCode?: string\n copyWriting?: Record<string, string>\n}\n\nexport const AiuiContext = createContext<AiuiContextType>({\n trackingData: {},\n locale: undefined,\n copyWriting: {},\n})\n\nexport const useAiuiContext = () => {\n const context = useContext(AiuiContext)\n if (!context) {\n throw new Error('useAiui must be used in <AiuiProvider>')\n }\n return useContext(AiuiContext)\n}\n\nconst AiuiProvider = ({\n children,\n ...rest\n}: {\n children: React.ReactNode\n} & AiuiContextType) => {\n useEffect(() => {\n const handleTrackClick = (e: any, el: any) => {\n // e?.stopPropagation?.()\n const out: any = {}\n if (!el || !el.attributes) return out\n for (const attr of Array.from(el.attributes)) {\n const name = (attr as any)?.name\n if (name?.startsWith('data-headless-')) {\n out[name] = el.getAttribute(name)\n }\n }\n const sku = out?.['data-headless-sku']\n const nameType = out?.['data-headless-type-name']?.split?.('#')\n const titleDesc = out?.['data-headless-title-desc-button']?.split?.('#')\n const navPosition = out?.['data-headless-nav-postion']?.split?.('#')\n gaTrack({\n event: 'ga4Event',\n event_name: 'component_click',\n event_parameters: {\n page_group: rest?.trackingData?.pageGroup || 'Home Page',\n component_type: nameType?.[0] || '',\n component_name: nameType?.[1] || '',\n position: navPosition?.[1] || '',\n navigation: navPosition?.[0] || '',\n button_name: titleDesc?.[2] || '',\n SKU: sku || '',\n component_title: titleDesc?.[0] || '',\n component_description: titleDesc?.[1] || '',\n },\n })\n }\n const observer = new MutationObserver(() => {\n document.querySelectorAll('[data-headless-type-name]').forEach(el => {\n if (!el.hasAttribute('data-headless-track-bound')) {\n el.addEventListener('click', e => handleTrackClick(e, el))\n el.setAttribute('data-headless-track-bound', 'true') // \u907F\u514D\u91CD\u590D\u7ED1\u5B9A\n }\n })\n })\n observer.observe(document.body, { childList: true, subtree: true })\n // \u521D\u59CB\u5316\u4E00\u6B21\u73B0\u6709\u8282\u70B9\n document.querySelectorAll('[data-headless-type-name]').forEach(el => {\n if (!el.hasAttribute('data-headless-track-bound')) {\n el.addEventListener('click', e => handleTrackClick(e, el))\n el.setAttribute('data-headless-track-bound', 'true')\n }\n })\n return () => observer.disconnect()\n }, [])\n\n return <AiuiContext.Provider value={rest}>{children}</AiuiContext.Provider>\n}\n\nexport default AiuiProvider\n"],
5
5
  "mappings": "AAmFS,cAAAA,MAAA,oBAnFT,OAAS,WAAAC,MAAe,wBACxB,OAAgB,iBAAAC,EAAe,cAAAC,EAAY,aAAAC,MAAiB,QAYrD,MAAMC,EAAcH,EAA+B,CACxD,aAAc,CAAC,EACf,OAAQ,OACR,YAAa,CAAC,CAChB,CAAC,E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ACD,OAAAQ,EAAS,QAAQ,SAAS,KAAM,CAAE,UAAW,GAAM,QAAS,EAAK,CAAC,EAElE,SAAS,iBAAiB,2BAA2B,EAAE,QAAQR,GAAM,CAC9DA,EAAG,aAAa,2BAA2B,IAC9CA,EAAG,iBAAiB,QAAS,GAAKF,EAAiB,EAAGE,CAAE,CAAC,EACzDA,EAAG,aAAa,4BAA6B,MAAM,EAEvD,CAAC,EACM,IAAMQ,EAAS,WAAW,CACnC,EAAG,CAAC,CAAC,EAEEpB,EAACK,EAAY,SAAZ,CAAqB,MAAOI,EAAO,SAAAD,EAAS,GAGtD,IAAOa,EAAQd",
6
6
  "names": ["jsx", "gaTrack", "createContext", "useContext", "useEffect", "AiuiContext", "useAiuiContext", "AiuiProvider", "children", "rest", "handleTrackClick", "e", "el", "out", "attr", "name", "sku", "nameType", "titleDesc", "navPosition", "observer", "AiuiProvider_default"]
7
7
  }
@@ -0,0 +1,4 @@
1
+ export declare const CollectionShelvesWrapItem: ({ data, configuration }: {
2
+ data: any;
3
+ configuration?: any;
4
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import{Fragment as W,jsx as o,jsxs as r}from"react/jsx-runtime";import{cn as d}from"../../helpers/utils.js";import I from"../../components/badge.js";import{Text as E}from"../../components/text.js";import g from"../../components/button.js";import{gaTrack as j}from"../../shared/track.js";import{useState as v,useEffect as k}from"react";import S from"../../components/picture.js";import{Heading as A}from"../../components/heading.js";import{useAiuiContext as L}from"../AiuiProvider/index.js";import{trackUrlRef as U}from"../../shared/trackUrlRef.js";import{formatVariantPrice as H}from"../ShelfDisplay/shelfDisplay.js";const R="image",z="collectio_shelves",M=999999999e-2,le=({data:e,configuration:t})=>{const{itemShape:w}=t||{},{locale:a="us"}=L(),[_,N]=v(""),T=(l,i,n)=>t?.event?.primaryButton?.(l,i+1,n),B=(l,i,n)=>t?.event?.secondaryButton?.(l,i+1,n),s=e?.variants?.find(l=>l?.sku===e?.sku)||e?.variants?.[0]||{},p=!s?.availableForSale||s?.price?.amount===M,C=t?.isShowTag,h=t?.isShowOriginalPrice,[x,D]=v([]),[$,y]=v(!1),u=s?.coupons?.[0],{price:F,basePrice:O,discount:c}=H({locale:a,amount:h&&u?u.variant_price4wscode:s.price,baseAmount:h&&u?s.price:0,currencyCode:e?.price?.currencyCode||"USD"}),P=()=>{const l=e?.sku,i=e?.variants;return i?.find(f=>f?.sku===l)?.image?.url||i?.[0]?.image?.url||""},m=e?.custom_name||e?.title||e?.name,b=e?.custom_description||e?.description;return k(()=>{let l=[];if(c){const n=`${c}${t?.metafields?.discounts?.off||""}`;l.push(n)}const i=e?.tags?.filter?.(n=>n?.startsWith?.("CLtag"))?.map?.(n=>n?.replace?.("CLtag:",""))?.slice?.(0,c?1:2);D(l.concat(i))},[c,t?.metafields?.discounts,e?.tags]),k(()=>{const{infos:l}=s?.metafields||{},{productInfos:i,preRender:n}=e?.metafields||{},{shopCommon:f}=t?.metafields||{};N(l?.comingSoon||i?.comingSoon||n?.soldOut||f?.soldOut||"")},[e,s]),o("div",{className:d(w==="rounded"?"rounded-2xl":"rounded-none","bg-[#EAEAEC] tablet:hover:bg-[#FFFFFF] box-border w-full cursor-pointer overflow-hidden duration-300","collection-shelves-item",{"aiui-dark":e?.custom_theme==="dark"}),children:r("div",{className:"h-full box-border flex flex-col justify-between overflow-hidden",children:[o("div",{onMouseEnter:()=>y(!0),onMouseLeave:()=>y(!1),className:d("desktop:p-6 p-4 relative inline-block w-full lg-desktop:h-[288px] desktop:h-[234px] h-[182px] overflow-hidden cursor-pointer"),children:r("a",{"aria-label":m,target:t?.target,href:U(`${a==="us"||!a?"":`/${a}`}/products/${e?.handle}`,`${R}_${z}`),onClick:()=>{j({event:"ga4Event",event_name:"select_item",event_parameters:{page_group:"Home Page",item_list_name:"Home_Page_Bundle",items:[{item_id:e?.sku||s?.sku,item_name:e?.name,item_variant:s?.name,price:s?.price,index:t?.index+1}]}})},children:[o(S,{alt:"",source:P(),className:"flex h-full justify-center object-cover [&_img]:h-full [&_img]:w-auto"}),o(S,{alt:"",source:e?.custom_image,className:d($?"opacity-100":"opacity-0","absolute inset-x-0 top-0 h-full object-cover [&_img]:size-full transition-all duration-300")})]})}),r("div",{className:"overflow-hidden flex flex-col justify-end desktop:p-6 p-4 flex-1 box-border collection-shelves-product-content",children:[C&&x?.length?o("div",{className:"mb-2 box-border flex flex-wrap gap-1 overflow-hidden",children:x?.map?.((l,i)=>o(I,{children:l},i))}):null,m?o(A,{as:"h3",title:m||"",html:m||"",className:"lg-desktop:text-2xl lg-desktop:leading-7 tablet:text-xl collection-shelves-product-title line-clamp-2 text-info-primary font-bold tablet:leading-6 text-base"}):null,b?o(E,{size:2,html:b||"",className:"lg-desktop:text-lg desktop:text-base collection-shelves-product-description line-clamp-1 text-sm font-bold text-info-primary"}):null,o("div",{className:"mb-1 mt-4 flex items-center",children:p?o("div",{className:"tablet:text-2xl text-info-primary text-xl font-bold",children:_||""}):r(W,{children:[o("div",{className:"final-price tablet:text-2xl text-info-primary text-xl font-bold",children:s?.availableForSale&&F||""}),o("div",{className:"origin-price tablet:text-xl text-info-secondary ml-1 text-lg font-bold line-through",children:s?.availableForSale&&O||""})]})}),r("div",{className:d("shelf-flex-button-group","lg-desktop:gap-3 flex items-center gap-2",t.direction==="vertical"?"flex-col":""),children:[t?.secondaryButton?o(g,{variant:"secondary",onClick:()=>B(e,t?.index,t),className:`overflow-hidden font-bold ${t.direction==="vertical"?"w-full":""} ${t?.shape==="rounded"?"rounded-2xl":""}`,children:t?.secondaryButton||""}):null,t?.primaryButton&&!p?o(g,{variant:"primary",disabled:p,onClick:()=>T(e,t?.index,t),className:`overflow-hidden font-bold ${t.direction==="vertical"?"w-full":""} ${t?.shape==="rounded"?"rounded-2xl":""}`,children:t?.primaryButton||""}):null]})]})]})},e?.id||e?.handle)};export{le as CollectionShelvesWrapItem};
2
+ //# sourceMappingURL=CollectionShelvesItem.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/biz-components/CollectionShelves/CollectionShelvesItem.tsx"],
4
+ "sourcesContent": ["import { cn } from '../../helpers/utils.js'\nimport Badge from '../../components/badge.js'\nimport { Text } from '../../components/text.js'\nimport Button from '../../components/button.js'\nimport { gaTrack } from '../../shared/track.js'\nimport { useState, useEffect } from 'react'\nimport Picture from '../../components/picture.js'\nimport { Heading } from '../../components/heading.js'\nimport { useAiuiContext } from '../AiuiProvider/index.js'\nimport { trackUrlRef } from '../../shared/trackUrlRef.js'\nimport { formatVariantPrice } from '../ShelfDisplay/shelfDisplay.js'\nimport type { ShelfDisplayItem, ShelfDisplayType } from '../ShelfDisplay/shelfDisplay.js'\n\nconst componentType = 'image'\nconst componentName = 'collectio_shelves'\n\nconst SOLD_OUT_PRICE = 9999999.99\n\nexport const CollectionShelvesWrapItem = ({ data, configuration }: { data: any; configuration?: any }) => {\n const { itemShape } = configuration || {}\n const { locale = 'us' } = useAiuiContext()\n\n const [soldOutText, setSoldOutText] = useState<string>('')\n\n const onPrimaryButton = (params: ShelfDisplayItem, index: number, data: ShelfDisplayType) =>\n configuration?.event?.primaryButton?.(params, index + 1, data)\n\n const onSecondaryButton = (params: ShelfDisplayItem, index: number, data: ShelfDisplayType) =>\n configuration?.event?.secondaryButton?.(params, index + 1, data)\n\n const variant = data?.variants?.find((item: any) => item?.sku === data?.sku) || data?.variants?.[0] || {}\n\n const isSoldOut = !variant?.availableForSale || variant?.price?.amount === SOLD_OUT_PRICE\n const isShowTag = configuration?.isShowTag\n const isShowOriginalPrice = configuration?.isShowOriginalPrice\n\n const [showTags, setShowTags] = useState<string[]>([])\n const [showImage, setShowImage] = useState<boolean>(false)\n\n // active \u7684 \u901A\u7528\u6298\u6263\n const coupon = variant?.coupons?.[0]\n\n const { price, basePrice, discount } = formatVariantPrice({\n locale: locale,\n amount: isShowOriginalPrice && coupon ? coupon.variant_price4wscode : variant.price,\n baseAmount: isShowOriginalPrice && coupon ? variant.price : 0,\n currencyCode: data?.price?.currencyCode || 'USD',\n })\n\n const handleUrl = () => {\n const sku = data?.sku\n const skuArray = data?.variants\n const findSku = skuArray?.find((item: any) => item?.sku === sku)\n return findSku?.image?.url || skuArray?.[0]?.image?.url || ''\n }\n\n const displayTitle = data?.custom_name || data?.title || data?.name\n const displayDescription = data?.custom_description || data?.description\n\n useEffect(() => {\n let handleTags: string[] = []\n if (discount) {\n const discountTag = `${discount}${configuration?.metafields?.discounts?.off || ''}`\n handleTags.push(discountTag)\n }\n const newTags = data?.tags\n ?.filter?.((item: string) => item?.startsWith?.('CLtag'))\n ?.map?.((item: string) => item?.replace?.('CLtag:', ''))\n ?.slice?.(0, discount ? 1 : 2)\n setShowTags(handleTags.concat(newTags))\n }, [discount, configuration?.metafields?.discounts, data?.tags])\n\n useEffect(() => {\n const { infos } = variant?.metafields || {}\n const { productInfos, preRender } = data?.metafields || {}\n const { shopCommon } = configuration?.metafields || {}\n setSoldOutText(infos?.comingSoon || productInfos?.comingSoon || preRender?.soldOut || shopCommon?.soldOut || '')\n }, [data, variant])\n\n return (\n <div\n key={data?.id || data?.handle}\n className={cn(\n itemShape === 'rounded' ? 'rounded-2xl' : 'rounded-none',\n 'bg-[#EAEAEC] tablet:hover:bg-[#FFFFFF] box-border w-full cursor-pointer overflow-hidden duration-300',\n 'collection-shelves-item',\n {\n 'aiui-dark': data?.custom_theme === 'dark',\n }\n )}\n >\n <div className=\"h-full box-border flex flex-col justify-between overflow-hidden\">\n <div\n onMouseEnter={() => setShowImage(true)}\n onMouseLeave={() => setShowImage(false)}\n className={cn(\n 'desktop:p-6 p-4 relative inline-block w-full lg-desktop:h-[288px] desktop:h-[234px] h-[182px] overflow-hidden cursor-pointer'\n )}\n >\n <a\n aria-label={displayTitle}\n target={configuration?.target}\n href={trackUrlRef(\n `${locale === 'us' || !locale ? '' : `/${locale}`}/products/${data?.handle}`,\n `${componentType}_${componentName}`\n )}\n onClick={() => {\n gaTrack({\n event: 'ga4Event',\n event_name: 'select_item',\n event_parameters: {\n page_group: 'Home Page',\n item_list_name: 'Home_Page_Bundle',\n items: [\n {\n item_id: data?.sku || variant?.sku,\n item_name: data?.name,\n item_variant: variant?.name,\n price: variant?.price,\n index: configuration?.index + 1,\n },\n ],\n },\n })\n }}\n >\n <Picture\n alt=\"\"\n source={handleUrl()}\n className=\"flex h-full justify-center object-cover [&_img]:h-full [&_img]:w-auto\"\n />\n <Picture\n alt=\"\"\n source={data?.custom_image}\n className={cn(\n showImage ? 'opacity-100' : 'opacity-0',\n 'absolute inset-x-0 top-0 h-full object-cover [&_img]:size-full transition-all duration-300'\n )}\n />\n </a>\n </div>\n <div className=\"overflow-hidden flex flex-col justify-end desktop:p-6 p-4 flex-1 box-border collection-shelves-product-content\">\n {isShowTag && showTags?.length ? (\n <div className=\"mb-2 box-border flex flex-wrap gap-1 overflow-hidden\">\n {showTags?.map?.((item: any, index: number) => <Badge key={index}>{item}</Badge>)}\n </div>\n ) : null}\n {displayTitle ? (\n <Heading\n as=\"h3\"\n title={displayTitle || ''}\n html={displayTitle || ''}\n className=\"lg-desktop:text-2xl lg-desktop:leading-7 tablet:text-xl collection-shelves-product-title line-clamp-2 text-info-primary font-bold tablet:leading-6 text-base\"\n />\n ) : null}\n {displayDescription ? (\n <Text\n size={2}\n html={displayDescription || ''}\n className=\"lg-desktop:text-lg desktop:text-base collection-shelves-product-description line-clamp-1 text-sm font-bold text-info-primary\"\n />\n ) : null}\n <div className=\"mb-1 mt-4 flex items-center\">\n {isSoldOut ? (\n <div className=\"tablet:text-2xl text-info-primary text-xl font-bold\">{soldOutText || ''}</div>\n ) : (\n <>\n <div className=\"final-price tablet:text-2xl text-info-primary text-xl font-bold\">\n {variant?.availableForSale ? price || '' : ''}\n </div>\n <div className=\"origin-price tablet:text-xl text-info-secondary ml-1 text-lg font-bold line-through\">\n {variant?.availableForSale ? basePrice || '' : ''}\n </div>\n </>\n )}\n </div>\n {/* \u6309\u94AE\u7EC4 */}\n <div\n className={cn(\n 'shelf-flex-button-group',\n 'lg-desktop:gap-3 flex items-center gap-2',\n configuration.direction === 'vertical' ? 'flex-col' : ''\n )}\n >\n {configuration?.secondaryButton ? (\n <Button\n variant=\"secondary\"\n onClick={() => onSecondaryButton(data, configuration?.index, configuration)}\n className={`overflow-hidden font-bold ${configuration.direction === 'vertical' ? 'w-full' : ''} ${configuration?.shape === 'rounded' ? 'rounded-2xl' : ''}`}\n >\n {configuration?.secondaryButton || ''}\n </Button>\n ) : null}\n {configuration?.primaryButton && !isSoldOut ? (\n <Button\n variant=\"primary\"\n disabled={isSoldOut}\n onClick={() => onPrimaryButton(data, configuration?.index, configuration)}\n className={`overflow-hidden font-bold ${configuration.direction === 'vertical' ? 'w-full' : ''} ${configuration?.shape === 'rounded' ? 'rounded-2xl' : ''}`}\n >\n {configuration?.primaryButton || ''}\n </Button>\n ) : null}\n </div>\n </div>\n </div>\n </div>\n )\n}\n"],
5
+ "mappings": "AAmGU,OAmEI,YAAAA,EAxCF,OAAAC,EA3BF,QAAAC,MAAA,oBAnGV,OAAS,MAAAC,MAAU,yBACnB,OAAOC,MAAW,4BAClB,OAAS,QAAAC,MAAY,2BACrB,OAAOC,MAAY,6BACnB,OAAS,WAAAC,MAAe,wBACxB,OAAS,YAAAC,EAAU,aAAAC,MAAiB,QACpC,OAAOC,MAAa,8BACpB,OAAS,WAAAC,MAAe,8BACxB,OAAS,kBAAAC,MAAsB,2BAC/B,OAAS,eAAAC,MAAmB,8BAC5B,OAAS,sBAAAC,MAA0B,kCAGnC,MAAMC,EAAgB,QAChBC,EAAgB,oBAEhBC,EAAiB,aAEVC,GAA4B,CAAC,CAAE,KAAAC,EAAM,cAAAC,CAAc,IAA0C,CACxG,KAAM,CAAE,UAAAC,CAAU,EAAID,GAAiB,CAAC,EAClC,CAAE,OAAAE,EAAS,IAAK,EAAIV,EAAe,EAEnC,CAACW,EAAaC,CAAc,EAAIhB,EAAiB,EAAE,EAEnDiB,EAAkB,CAACC,EAA0BC,EAAeR,IAChEC,GAAe,OAAO,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,UAAW,6BAA6BA,EAAc,YAAc,WAAa,SAAW,EAAE,IAAIA,GAAe,QAAU,UAAY,cAAgB,EAAE,GAExJ,SAAAA,GAAe,eAAiB,GACnC,EACE,MACN,GACF,GACF,GA5HKD,GAAM,IAAMA,GAAM,MA6HzB,CAEJ",
6
+ "names": ["Fragment", "jsx", "jsxs", "cn", "Badge", "Text", "Button", "gaTrack", "useState", "useEffect", "Picture", "Heading", "useAiuiContext", "trackUrlRef", "formatVariantPrice", "componentType", "componentName", "SOLD_OUT_PRICE", "CollectionShelvesWrapItem", "data", "configuration", "itemShape", "locale", "soldOutText", "setSoldOutText", "onPrimaryButton", "params", "index", "onSecondaryButton", "variant", "item", "isSoldOut", "isShowTag", "isShowOriginalPrice", "showTags", "setShowTags", "showImage", "setShowImage", "coupon", "price", "basePrice", "discount", "handleUrl", "sku", "skuArray", "displayTitle", "displayDescription", "handleTags", "discountTag", "newTags", "infos", "productInfos", "preRender", "shopCommon"]
7
+ }
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ import type { ShelfDisplayProps } from '../ShelfDisplay/shelfDisplay.js';
3
+ declare const _default: import("react").ForwardRefExoticComponent<Omit<Omit<ShelfDisplayProps & import("react").RefAttributes<HTMLDivElement>, keyof import("../../shared/Styles.js").StylesProps> & Partial<import("../../shared/Styles.js").StylesProps & import("../../shared/Styles.js").ContainerProps> & {
4
+ className?: string | undefined;
5
+ data?: Record<string, any> | undefined;
6
+ }, "ref"> & import("react").RefAttributes<any>>;
7
+ export default _default;
@@ -0,0 +1,2 @@
1
+ "use client";import{jsx as o}from"react/jsx-runtime";import{cn as g}from"../../helpers/utils.js";import T from"../SwiperBox/index.js";import"../../shared/track.js";import{withLayout as k}from"../../shared/Styles.js";import{useExposure as M}from"../../hooks/useExposure.js";import{useRollout as P}from"../../hooks/useRollout.js";import{CollectionShelvesWrapItem as E}from"./CollectionShelvesItem.js";import{forwardRef as I,useEffect as L,useRef as B,useImperativeHandle as C,useState as H}from"react";const R="image",V="collectio_shelves",N=I(({key:n,data:t,event:a,buildData:m,breakpoints:c,className:f="",target:p="_self",metafields:u},d)=>{const{productsCard:h=[],title:b,isShowTag:w=!1,isShowOriginalPrice:v=!0,...D}=t,s=B(null),[S,x]=P({threshold:0}),[i,y]=H([]);return C(d,()=>s.current),M(s,{componentType:R,componentName:V,componentTitle:t?.title}),L(()=>{const l=h?.map?.(e=>{const r=m?.products?.find(_=>_?.handle===e?.handle);if(r)return{sku:e.sku,custom_name:e.custom_name,custom_image:e.custom_image,custom_link:e.custom_link,custom_theme:e.custom_theme,custom_description:e.custom_description,...r}})?.filter(e=>e);y(l?.length?l||[]:[])},[]),o("div",{ref:s,className:g("collection-shelves-wrap w-full",f,{"aiui-dark":t?.theme==="dark"}),children:o("div",{ref:S,children:o(T,{data:{list:i,configuration:{...D,isShowTag:w,event:a,target:p,isShowOriginalPrice:v,metafields:u||{},itemLength:i?.length}},id:`CollectionShelves${n}`,className:"!overflow-visible",Slide:E,breakpoints:c||{0:{spaceBetween:12,freeMode:!1,slidesPerView:1},374:{spaceBetween:12,freeMode:!1,slidesPerView:1.2},768:{spaceBetween:16,freeMode:!1,slidesPerView:2.3},1024:{spaceBetween:16,freeMode:!1,slidesPerView:3}}})})})});var J=k(N);export{J as default};
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/biz-components/CollectionShelves/index.tsx"],
4
+ "sourcesContent": ["'use client'\nimport { cn } from '../../helpers/utils.js'\nimport SwiperBox from '../SwiperBox/index.js'\nimport { gaTrack } from '../../shared/track.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport { useRollout } from '../../hooks/useRollout.js'\nimport { CollectionShelvesWrapItem } from './CollectionShelvesItem.js'\nimport { forwardRef, useEffect, useRef, useImperativeHandle, useState } from 'react'\nimport type { ShelfDisplayProps, ShelfDisplayItem } from '../ShelfDisplay/shelfDisplay.js'\n\nconst componentType = 'image'\nconst componentName = 'collectio_shelves'\n\nconst ShelfDisplay = forwardRef<HTMLDivElement, ShelfDisplayProps>(\n (\n {\n key,\n data,\n event,\n buildData,\n breakpoints,\n className = '',\n target = '_self',\n metafields,\n },\n ref\n ) => {\n const {\n productsCard = [],\n title,\n isShowTag = false,\n isShowOriginalPrice = true,\n ...other\n } = data\n\n const innerRef = useRef<HTMLDivElement>(null)\n\n const [viewRef, inView] = useRollout<HTMLDivElement>({ threshold: 0 })\n\n const [currentItems, setCurrentItems] = useState<ShelfDisplayItem[]>([])\n\n useImperativeHandle(ref, () => innerRef.current as HTMLDivElement)\n\n useExposure(innerRef, {\n componentType: componentType,\n componentName: componentName,\n componentTitle: data?.title,\n })\n\n useEffect(() => {\n const newCurrentData = productsCard\n ?.map?.(item => {\n const findData = buildData?.products?.find(params => params?.handle === item?.handle)\n if (findData) {\n return {\n sku: item.sku,\n custom_name: item.custom_name,\n custom_image: item.custom_image,\n custom_link: item.custom_link,\n custom_theme: item.custom_theme,\n custom_description: item.custom_description,\n ...findData,\n }\n }\n })\n ?.filter(item => item)\n setCurrentItems(newCurrentData?.length ? newCurrentData || [] : [])\n }, [])\n\n return (\n <div\n ref={innerRef}\n className={cn('collection-shelves-wrap w-full', className, { 'aiui-dark': data?.theme === 'dark' })}\n >\n <div ref={viewRef as any}>\n <SwiperBox\n data={{\n list: currentItems,\n configuration: {\n ...other,\n isShowTag,\n event: event,\n target: target,\n isShowOriginalPrice,\n metafields: metafields || {},\n itemLength: currentItems?.length,\n },\n }}\n id={`CollectionShelves${key}`}\n className={`!overflow-visible`}\n Slide={CollectionShelvesWrapItem}\n breakpoints={\n breakpoints || {\n 0: {\n spaceBetween: 12,\n freeMode: false,\n slidesPerView: 1,\n },\n 374: {\n spaceBetween: 12,\n freeMode: false,\n slidesPerView: 1.2,\n },\n 768: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: 2.3,\n },\n 1024: {\n spaceBetween: 16,\n freeMode: false,\n sl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AAK,mBACzB,GAAGC,CACL,CAEJ,CAAC,GACC,OAAOD,GAAQA,CAAI,EACvBF,EAAgBC,GAAgB,OAASA,GAAkB,CAAC,EAAI,CAAC,CAAC,CACpE,EAAG,CAAC,CAAC,EAGHlC,EAAC,OACC,IAAK6B,EACL,UAAW5B,EAAG,iCAAkCmB,EAAW,CAAE,YAAaJ,GAAM,QAAU,MAAO,CAAC,EAElG,SAAAhB,EAAC,OAAI,IAAK8B,EACR,SAAA9B,EAACE,EAAA,CACC,KAAM,CACJ,KAAM8B,EACN,cAAe,CACb,GAAGJ,EACH,UAAAF,EACA,MAAOT,EACP,OAAQI,EACR,oBAAAM,EACA,WAAYL,GAAc,CAAC,EAC3B,WAAYU,GAAc,MAC5B,CACF,EACA,GAAI,oBAAoBjB,CAAG,GAC3B,UAAW,oBACX,MAAOT,EACP,YACEa,GAAe,CACb,EAAG,CACD,aAAc,GACd,SAAU,GACV,cAAe,CACjB,EACA,IAAK,CACH,aAAc,GACd,SAAU,GACV,cAAe,GACjB,EACA,IAAK,CACH,aAAc,GACd,SAAU,GACV,cAAe,GACjB,EACA,KAAM,CACJ,aAAc,GACd,SAAU,GACV,cAAe,CACjB,CACF,EAEJ,EACF,EACF,CAEJ,CACF,EAEA,IAAOmB,EAAQnC,EAAWW,CAAY",
6
+ "names": ["jsx", "cn", "SwiperBox", "withLayout", "useExposure", "useRollout", "CollectionShelvesWrapItem", "forwardRef", "useEffect", "useRef", "useImperativeHandle", "useState", "componentType", "componentName", "ShelfDisplay", "key", "data", "event", "buildData", "breakpoints", "className", "target", "metafields", "ref", "productsCard", "title", "isShowTag", "isShowOriginalPrice", "other", "innerRef", "viewRef", "inView", "currentItems", "setCurrentItems", "newCurrentData", "item", "findData", "params", "CollectionShelves_default"]
7
+ }
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import type { CollectionsBannerProps } from './types.js';
3
+ declare const _default: React.ForwardRefExoticComponent<Omit<Omit<CollectionsBannerProps & React.RefAttributes<HTMLDivElement>, keyof import("../../shared/Styles.js").StylesProps> & Partial<import("../../shared/Styles.js").StylesProps & import("../../shared/Styles.js").ContainerProps> & {
4
+ className?: string | undefined;
5
+ data?: Record<string, any> | undefined;
6
+ }, "ref"> & React.RefAttributes<any>>;
7
+ export default _default;
@@ -0,0 +1,2 @@
1
+ "use client";import{jsx as e,jsxs as $}from"react/jsx-runtime";import U,{useImperativeHandle as j,useRef as s,useEffect as q}from"react";import c from"gsap";import{ScrollTrigger as p}from"gsap/dist/ScrollTrigger";import{useMediaQuery as R}from"react-responsive";import{useInView as _}from"react-intersection-observer";import Q from"../../helpers/ScrollLoadVideo.js";import{Heading as P,Picture as A}from"../../components/index.js";import{cn as u}from"../../helpers/index.js";import{withLayout as F}from"../../shared/Styles.js";import{useExposure as G}from"../../hooks/useExposure.js";import{trackUrlRef as J}from"../../shared/trackUrlRef.js";import"../../components/button.js";import"../VideoModal/index.js";const f="image",b="collections_banner",V=U.forwardRef(({data:I,className:M},C)=>{const{title:r,subtitle:n,pcImage:h,padImage:L,mobileImage:x,pcVideo:v,padVideo:y,mobileVideo:i,isShowVideo:S,theme:z="light",blockLink:k}=I,w=R({query:"(max-width: 768px)"}),T=R({query:"(max-width: 1024px)"}),{ref:B,inView:N}=_(),m=s(null),d=s(null),g=s(null),o=s(null),t=s(null);return G(t,{componentType:f,componentName:b,componentTitle:r,componentDescription:n}),j(C,()=>t.current),q(()=>{c.registerPlugin(p);function E(){if(!o.current)return;const D=t.current?.clientHeight||100;window.innerHeight<=D?m.current=p.create({trigger:t.current,start:"top bottom",end:"bottom top",scrub:!0,onUpdate:l=>{const a=l.progress*40-20;c.set(o.current,{yPercent:a})}}):(g.current=p.create({trigger:t.current,start:"top bottom",end:"bottom bottom",scrub:!0,onUpdate:l=>{const a=l.progress*20-20;c.set(o.current,{yPercent:a})}}),d.current=p.create({trigger:t.current,start:"top top",end:"bottom top",scrub:!0,onUpdate:l=>{const a=l.progress*20;c.set(o.current,{yPercent:a})}}))}return N&&E(),()=>{m.current&&m.current.kill(),g.current&&g.current.kill(),d.current&&d.current.kill()}},[N]),e("div",{ref:B,"data-ui-component-id":"CollectionsBanner",children:$("div",{ref:t,className:u(z==="dark"?"aiui-dark":"","text-info-primary relative w-full overflow-hidden","lg-desktop:aspect-[1920/480] desktop:aspect-[1440/384] laptop:aspect-[1024/400] tablet:aspect-[768/480] aspect-[390/430]",M),children:[k&&e("a",{tabIndex:-1,"aria-hidden":"true","aria-label":r,className:"absolute inset-0 z-10","data-headless-title-desc-button":`${r}#${n}`,"data-headless-type-name":`${f}#${b}`,href:J(k,`${f}_${b}`)}),e("div",{ref:o,className:u("absolute left-0 top-0 size-full"),children:S?e(Q,{poster:w?i?.url:T?y?.url||i?.url:v?.url,src:w?i?.url:T?y?.url||i?.url:v?.url,className:"laptop:w-full h-full",videoClassName:"h-full object-cover",muted:!0,loop:!0,playsInline:!0}):e(A,{loading:"eager",fetchPriority:"high",className:"laptop:w-full h-full",imgClassName:"h-full object-cover",alt:h?.alt||"",source:`${h?.url||""} , ${L?.url??(x?.url||"")} 1024, ${x?.url||""} 767`})}),e("div",{className:"laptop:top-1/2 laptop:-translate-y-1/2 tablet:px-8 laptop:px-16 lg-desktop:px-[calc(50%-832px)] lg-desktop:gap-8 absolute top-24 md-tablet:top-8 z-10 flex flex-col gap-6 px-4",children:$("div",{className:"laptop:text-left max-w-[686px]",children:[r&&e(P,{as:"h2",size:5,className:u("font-bold hero-banner-title"),html:r}),n&&e(P,{as:"h3",className:u("hero-banner-subtitle font-heading lg-desktop:text-lg desktop:text-base laptop:mt-2 lg-desktop:mt-4 mt-1 text-sm font-bold"),html:n})]})})]})})});V.displayName="CollectionsBanner";var de=F(V);export{de as default};
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/biz-components/CollectionsBanner/index.tsx"],
4
+ "sourcesContent": ["'use client'\nimport React, { useImperativeHandle, useRef, useState, useEffect } from 'react'\nimport gsap from 'gsap'\nimport { ScrollTrigger } from 'gsap/dist/ScrollTrigger'\nimport type { CollectionsBannerProps } from './types.js'\nimport { useMediaQuery } from 'react-responsive'\nimport { useInView } from 'react-intersection-observer'\nimport ScrollLoadVideo from '../../helpers/ScrollLoadVideo.js'\nimport { Button, Heading, Picture, Text } from '../../components/index.js'\nimport { cn } from '../../helpers/index.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport { trackUrlRef } from '../../shared/trackUrlRef.js'\nimport { sizeMap } from '../../components/button.js'\nimport { VideoModal } from '../VideoModal/index.js'\n\nconst componentType = 'image'\nconst componentName = 'collections_banner'\n\nconst CollectionsBanner = React.forwardRef<HTMLDivElement, CollectionsBannerProps>(({ data, className }, ref) => {\n const {\n title,\n subtitle,\n pcImage,\n padImage,\n mobileImage,\n pcVideo,\n padVideo,\n mobileVideo,\n isShowVideo,\n theme = 'light',\n blockLink,\n } = data\n\n const isMobile = useMediaQuery({ query: '(max-width: 768px)' })\n const isPad = useMediaQuery({ query: '(max-width: 1024px)' })\n const { ref: inViewRef, inView } = useInView()\n const scrollTriggerRef = useRef<ScrollTrigger | null>(null)\n const bgTriggerRef = useRef<ScrollTrigger | null>(null)\n const boxTriggerRef = useRef<ScrollTrigger | null>(null)\n\n const bgRef = useRef<HTMLImageElement>(null)\n const boxRef = useRef<HTMLDivElement>(null)\n\n useExposure(boxRef, {\n componentType,\n componentName,\n componentTitle: title,\n componentDescription: subtitle,\n })\n\n useImperativeHandle(ref, () => boxRef.current as HTMLDivElement)\n\n useEffect(() => {\n gsap.registerPlugin(ScrollTrigger)\n function gsapResize() {\n if (!bgRef.current) return\n const clientHeight = boxRef.current?.clientHeight || 100\n const screenHeight = window.innerHeight\n\n if (screenHeight <= clientHeight) {\n scrollTriggerRef.current = ScrollTrigger.create({\n trigger: boxRef.current,\n start: 'top bottom',\n end: 'bottom top',\n scrub: true,\n onUpdate: (self: any) => {\n const base = 40\n const value = self.progress * base - base / 2\n gsap.set(bgRef.current, { yPercent: value })\n },\n })\n } else {\n boxTriggerRef.current = ScrollTrigger.create({\n trigger: boxRef.current,\n start: 'top bottom',\n end: 'bottom bottom',\n scrub: true,\n onUpdate: (self: any) => {\n const base = 20\n const value = self.progress * base - base\n gsap.set(bgRef.current, { yPercent: value })\n },\n })\n bgTriggerRef.current = ScrollTrigger.create({\n trigger: boxRef.current,\n start: 'top top',\n end: 'bottom top',\n scrub: true,\n onUpdate: (self: any) => {\n const base = 20\n const value = self.progress * base\n gsap.set(bgRef.current, { yPercent: value })\n },\n })\n }\n }\n if (inView) gsapResize()\n return () => {\n scrollTriggerRef.current && scrollTriggerRef.current.kill()\n boxTriggerRef.current && boxTriggerRef.current.kill()\n bgTriggerRef.current && bgTriggerRef.current.kill()\n }\n }, [inView])\n\n return (\n <div ref={inViewRef} data-ui-component-id=\"CollectionsBanner\">\n <div\n ref={boxRef}\n className={cn(\n theme === 'dark' ? 'aiui-dark' : '',\n 'text-info-primary relative w-full overflow-hidden',\n 'lg-desktop:aspect-[1920/480] desktop:aspect-[1440/384] laptop:aspect-[1024/400] tablet:aspect-[768/480] aspect-[390/430]',\n className\n )}\n >\n {blockLink && (\n <a\n tabIndex={-1}\n aria-hidden=\"true\"\n aria-label={title}\n className=\"absolute inset-0 z-10\"\n data-headless-title-desc-button={`${title}#${subtitle}`}\n data-headless-type-name={`${componentType}#${componentName}`}\n href={trackUrlRef(blockLink, `${componentType}_${componentName}`)}\n />\n )}\n <div ref={bgRef} className={cn('absolute left-0 top-0 size-full')}>\n {isShowVideo ? (\n <ScrollLoadVideo\n poster={isMobile ? mobileVideo?.url : isPad ? padVideo?.url || mobileVideo?.url : pcVideo?.url}\n src={\n isMobile\n ? (mobileVideo?.url as string)\n : isPad\n ? (padVideo?.url as string) || (mobileVideo?.url as string)\n : (pcVideo?.url as string)\n }\n className=\"laptop:w-full h-full\"\n videoClassName=\"h-full object-cover\"\n muted\n loop\n playsInline\n />\n ) : (\n <Picture\n loading=\"eager\"\n fetchPriority=\"high\"\n className=\"laptop:w-full h-full\"\n imgClassName=\"h-full object-cover\"\n alt={pcImage?.alt || ''}\n source={`${pcImage?.url || ''} , ${padImage?.url ?? (mobileImage?.url || '')} 1024, ${mobileImage?.url || ''} 767`}\n />\n )}\n </div>\n\n {/* \u5185\u5BB9\u533A\u57DF */}\n <div className=\"laptop:top-1/2 laptop:-translate-y-1/2 tablet:px-8 laptop:px-16 lg-desktop:px-[calc(50%-832px)] lg-desktop:gap-8 absolute top-24 md-tablet:top-8 z-10 flex flex-col gap-6 px-4\">\n <div className=\"laptop:text-left max-w-[686px]\">\n {title && <Heading as=\"h2\" size={5} className={cn('font-bold hero-banner-title')} html={title} />}\n {subtitle && (\n <Heading\n as=\"h3\"\n className={cn(\n 'hero-banner-subtitle font-heading lg-desktop:text-lg desktop:text-base laptop:mt-2 lg-desktop:mt-4 mt-1 text-sm font-bold'\n )}\n html={subtitle}\n />\n )}\n </div>\n </div>\n </div>\n </div>\n )\n})\n\nCollectionsBanner.displayName = 'CollectionsBanner'\n\nexport default withLayout(CollectionsBanner)\n"],
5
+ "mappings": "aAqHU,cAAAA,EAyCA,QAAAC,MAzCA,oBApHV,OAAOC,GAAS,uBAAAC,EAAqB,UAAAC,EAAkB,aAAAC,MAAiB,QACxE,OAAOC,MAAU,OACjB,OAAS,iBAAAC,MAAqB,0BAE9B,OAAS,iBAAAC,MAAqB,mBAC9B,OAAS,aAAAC,MAAiB,8BAC1B,OAAOC,MAAqB,mCAC5B,OAAiB,WAAAC,EAAS,WAAAC,MAAqB,4BAC/C,OAAS,MAAAC,MAAU,yBACnB,OAAS,cAAAC,MAAkB,yBAC3B,OAAS,eAAAC,MAAmB,6BAC5B,OAAS,eAAAC,MAAmB,8BAC5B,MAAwB,6BACxB,MAA2B,yBAE3B,MAAMC,EAAgB,QAChBC,EAAgB,qBAEhBC,EAAoBjB,EAAM,WAAmD,CAAC,CAAE,KAAAkB,EAAM,UAAAC,CAAU,EAAG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AAa,KAAO,GAAG,UAAUA,GAAa,KAAO,EAAE,OAC9G,EAEJ,EAGA3B,EAAC,OAAI,UAAU,iLACb,SAAAC,EAAC,OAAI,UAAU,iCACZ,UAAAsB,GAASvB,EAACW,EAAA,CAAQ,GAAG,KAAK,KAAM,EAAG,UAAWE,EAAG,6BAA6B,EAAG,KAAMU,EAAO,EAC9FC,GACCxB,EAACW,EAAA,CACC,GAAG,KACH,UAAWE,EACT,2HACF,EACA,KAAMW,EACR,GAEJ,EACF,GACF,EACF,CAEJ,CAAC,EAEDL,EAAkB,YAAc,oBAEhC,IAAO4B,GAAQjC,EAAWK,CAAiB",
6
+ "names": ["jsx", "jsxs", "React", "useImperativeHandle", "useRef", "useEffect", "gsap", "ScrollTrigger", "useMediaQuery", "useInView", "ScrollLoadVideo", "Heading", "Picture", "cn", "withLayout", "useExposure", "trackUrlRef", "componentType", "componentName", "CollectionsBanner", "data", "className", "ref", "title", "subtitle", "pcImage", "padImage", "mobileImage", "pcVideo", "padVideo", "mobileVideo", "isShowVideo", "theme", "blockLink", "isMobile", "isPad", "inViewRef", "inView", "scrollTriggerRef", "bgTriggerRef", "boxTriggerRef", "bgRef", "boxRef", "gsapResize", "clientHeight", "self", "value", "CollectionsBanner_default"]
7
+ }
@@ -0,0 +1,43 @@
1
+ import type { ButtonProps } from '../../components/button.js';
2
+ import type { Media, Theme } from '../../types/props.js';
3
+ export interface CollectionsBannerProps {
4
+ data: {
5
+ /** 主标题 */
6
+ title: string;
7
+ /** 副标题/描述文本 */
8
+ subtitle: string;
9
+ pcImage: Media;
10
+ padImage?: Media;
11
+ mobileImage: Media;
12
+ pcVideo?: Media;
13
+ padVideo?: Media;
14
+ mobileVideo?: Media;
15
+ isShowVideo?: boolean;
16
+ blockLink?: string;
17
+ /** 主按钮文本和配置 */
18
+ primaryButton?: {
19
+ text: string;
20
+ link?: string;
21
+ } & Omit<ButtonProps, 'children'>;
22
+ /** 次要按钮文本和配置 */
23
+ secondaryButton?: {
24
+ text: string;
25
+ link?: string;
26
+ isShowPlayVideoButton?: boolean;
27
+ playVideoButtonText?: string;
28
+ playIcon?: boolean;
29
+ videoUrl?: Media;
30
+ youtubeId?: string;
31
+ } & Omit<ButtonProps, 'children'>;
32
+ /** 主题 */
33
+ theme?: Theme;
34
+ /** 大小, 默认default,单banner, 可选sm, 用于多banner场景 */
35
+ size?: 'default' | 'sm';
36
+ /** 底部产品列表 */
37
+ caption?: Array<{
38
+ title: string;
39
+ }>;
40
+ };
41
+ /** 自定义类名 */
42
+ className?: string;
43
+ }
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": [],
4
+ "sourcesContent": [],
5
+ "mappings": "",
6
+ "names": []
7
+ }
@@ -0,0 +1,19 @@
1
+ /// <reference types="react" />
2
+ type FilterCardWrapProps = {
3
+ isSale?: boolean;
4
+ result?: any;
5
+ total: number;
6
+ shopifyData?: any;
7
+ currentPage?: number;
8
+ closeFilter: boolean;
9
+ page: number;
10
+ metafields: any;
11
+ noResultNode?: React.ReactNode;
12
+ refreshStarRating?: () => void;
13
+ onPrimaryChange?: (item: any, sku: string) => void;
14
+ onSecondaryChange?: (item: any, sku: string) => void;
15
+ onNextPage?: (v: string) => void;
16
+ onPrevPage?: (v: string) => void;
17
+ };
18
+ declare const _default: import("react").ForwardRefExoticComponent<FilterCardWrapProps & import("react").RefAttributes<unknown>>;
19
+ export default _default;
@@ -0,0 +1,2 @@
1
+ import{jsx as r,jsxs as v}from"react/jsx-runtime";import{cn as h}from"../../helpers/utils.js";import{useMediaQuery as B}from"react-responsive";import q from"./FilterCardWrapItem";import{useRef as A,useState as O,useEffect as m,forwardRef as V,useImperativeHandle as Y}from"react";import{cloneDeep as E}from"es-toolkit";const H=(F,I)=>{const{shopifyData:w={},isSale:y=!1,total:N,result:o,closeFilter:p,page:f,metafields:x,noResultNode:D,refreshStarRating:L,onPrimaryChange:R,onSecondaryChange:M,onNextPage:b,onPrevPage:j}=F,{advertisingSpace:C}=x,{buttonText:T,loadMoreText:W}=w,c=C||w?.advertisingSpace,S=A(null),[i,u]=O([]),s=B({query:"(max-width: 1024px)"}),P=n=>{const e=E(n||[]);if(c){const t=e.findIndex(g=>g.mImage);if(t===-1){const g=Math.min(p?c?.maxLocation||7:c?.minLocation||5,e.length);e.splice(g,0,c)}else{e.splice(t,1);const g=Math.min(p?c?.maxLocation||7:c?.minLocation||5,e.length);e.splice(g,0,c)}}return e};Y(I,()=>({clearData(){u([])}}));const k=()=>{const n=S.current;if(!n)return;const e=n.getBoundingClientRect()?.top+window?.pageYOffset-120;window?.scrollTo?.({top:e,behavior:"smooth"})},z=n=>n?.metafields?.seoSetting?.noindex;return m(()=>{(o?.slug||o?.id)&&((f===1||!s)&&u([]),o?.products&&u(n=>{const e=o.products?.filter?.(a=>!n.some(l=>l.id===a.id));let t=[...n,...e];const g=t.filter?.(a=>!(!a?.metafields?.seoSetting?.noindex&&a.availableForSale&&a?.variants?.some(l=>l.availableForSale)));return t=t.filter?.(a=>!a?.metafields?.seoSetting?.noindex&&a.availableForSale&&a?.variants?.some(l=>l.availableForSale)),t.push(...g),y&&(t=t.filter?.(a=>{let l=!1;if(a?.options?.find(d=>d?.displayName==="color"))l=a?.variants?.find(d=>d?.coupons?.length&&d?.coupons?.[0]&&typeof d?.coupons?.[0]=="object");else{const d=a?.variants?.[0]?.coupons;l=d?.length&&d?.[0]&&typeof d?.[0]=="object"}return!!l})),t?.length&&(f===1&&!s||s)&&(t=P(t)),t}))},[o?.products,f,s,C,y]),m(()=>{i?.length&&f===1&&!s&&u(P(i))},[p]),m(()=>{const n=document?.querySelector?.(".yotpo-reviews-star-ratings-widget");i?.length&&(!n||s)&&L?.()},[i]),v("div",{className:"filter-card-wrap-container",ref:S,children:[r("div",{className:h("w-full grid gap-3 md-tablet:grid-cols-2 grid-cols-3",{"laptop:grid-cols-4 tablet:grid-cols-3":p&&!s,"laptop:grid-cols-3 tablet:grid-cols-2":!p&&!s},"filter-card-wrap"),children:i?.map?.(n=>z(n)?null:r(q,{data:n,buttonText:T,metafields:x,onPrimaryChange:(e,t)=>R?.(e,t),onSecondaryChange:(e,t)=>M?.(e,t)},n.id))}),!i?.length&&D,s&&o?.pageInfo?.hasNextPage?v("div",{onClick:()=>{b?.(o?.pageInfo?.endCursor)},className:"mt-6 text-sm font-bold cursor-pointer flex items-center justify-center gap-1 filter-card-wrap-more",children:[r("span",{children:W||"View More"}),r("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"6",viewBox:"0 0 12 6",fill:"none",children:r("path",{d:"M9.96967 0.21967C10.2626 -0.0732232 10.7373 -0.073223 11.0302 0.21967C11.3231 0.512563 11.3231 0.987324 11.0302 1.28022L6.53022 5.78022C6.23732 6.07311 5.76256 6.07311 5.46967 5.78022L0.96967 1.28022C0.676777 0.987324 0.676777 0.512563 0.96967 0.21967C1.26256 -0.0732233 1.73732 -0.0732233 2.03022 0.21967L5.99994 4.1894L9.96967 0.21967Z",fill:"#1D1D1F"})})]}):null,!s&&N>18?v("div",{className:"mt-6 flex items-center justify-end gap-4 cursor-pointer",children:[r("button",{name:"perv page",disabled:!o?.pageInfo?.hasPreviousPage||!i?.length,className:h("flex items-center justify-center lg-desktop:size-14 size-10 rounded-full leading-tight overflow-hidden bg-transparent border-[1.5px] border-[#3D3D3F]",{"opacity-50 cursor-not-allowed":!o?.pageInfo?.hasPreviousPage||!i?.length}),onClick:()=>{k?.(),j?.(o?.pageInfo?.startCursor)},children:r("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:r("path",{d:"M12 5L7 10L12 15",stroke:"#3D3D3F","stroke-width":"1.66667","stroke-linecap":"round","stroke-linejoin":"round"})})}),r("button",{name:"next page",className:h("flex items-center justify-center lg-desktop:size-14 size-10 rounded-full leading-tight overflow-hidden bg-transparent border-[1.5px] border-[#3D3D3F]",{"opacity-50 cursor-not-allowed":!o?.pageInfo?.hasNextPage||!i?.length}),disabled:!o?.pageInfo?.hasNextPage||!i?.length,onClick:()=>{k?.(),b?.(o?.pageInfo?.endCursor)},children:r("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:r("path",{d:"M7.5 5L12.5 10L7.5 15",stroke:"#3D3D3F","stroke-width":"1.66667","stroke-linecap":"round","stroke-linejoin":"round"})})})]}):null]})};var X=V(H);export{X as default};
2
+ //# sourceMappingURL=FilterCardWrap.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/biz-components/CollectionsFilters/FilterCardWrap.tsx"],
4
+ "sourcesContent": ["import { cn } from '../../helpers/utils.js'\nimport { useMediaQuery } from 'react-responsive'\nimport FilterCardWrapItem from './FilterCardWrapItem'\nimport { useRef, useState, useEffect, forwardRef, useImperativeHandle } from 'react'\nimport type { Ref } from 'react'\nimport { cloneDeep } from 'es-toolkit'\n\ntype FilterCardWrapProps = {\n isSale?: boolean\n result?: any\n total: number\n shopifyData?: any\n currentPage?: number\n closeFilter: boolean\n page: number\n metafields: any\n noResultNode?: React.ReactNode\n refreshStarRating?: () => void\n onPrimaryChange?: (item: any, sku: string) => void\n onSecondaryChange?: (item: any, sku: string) => void\n onNextPage?: (v: string) => void\n onPrevPage?: (v: string) => void\n}\n\nconst FilterCardWrap = (props: FilterCardWrapProps, ref: Ref<unknown> | undefined) => {\n const {\n shopifyData = {},\n isSale = false,\n total,\n result,\n closeFilter,\n page,\n metafields,\n noResultNode,\n refreshStarRating,\n onPrimaryChange,\n onSecondaryChange,\n onNextPage,\n onPrevPage,\n } = props\n const { advertisingSpace } = metafields\n const { buttonText, loadMoreText } = shopifyData\n\n const currentAdvertisingSpace = advertisingSpace || shopifyData?.advertisingSpace\n\n const filterCardWrapRef = useRef<any>(null)\n\n const [data, setData] = useState<any[]>([])\n\n const isMobile = useMediaQuery({ query: '(max-width: 1024px)' })\n\n const handleAdvertisingSpace = (products: any[]) => {\n const updatedProducts = cloneDeep(products || [])\n if (currentAdvertisingSpace) {\n const findIndex = updatedProducts.findIndex(item => item.mImage)\n if (findIndex === -1) {\n const insertIndex = closeFilter\n ? Math.min(currentAdvertisingSpace?.maxLocation || 7, updatedProducts.length)\n : Math.min(currentAdvertisingSpace?.minLocation || 5, updatedProducts.length)\n updatedProducts.splice(insertIndex, 0, currentAdvertisingSpace)\n } else {\n updatedProducts.splice(findIndex, 1)\n const insertIndex = closeFilter\n ? Math.min(currentAdvertisingSpace?.maxLocation || 7, updatedProducts.length)\n : Math.min(currentAdvertisingSpace?.minLocation || 5, updatedProducts.length)\n updatedProducts.splice(insertIndex, 0, currentAdvertisingSpace)\n }\n }\n return updatedProducts\n }\n\n useImperativeHandle(ref, () => ({\n clearData() {\n setData([])\n },\n }))\n\n const onScrollTop = () => {\n const target = filterCardWrapRef.current\n if (!target) return\n const targetY = target.getBoundingClientRect()?.top + window?.pageYOffset - 120\n window?.scrollTo?.({\n top: targetY,\n behavior: 'smooth',\n })\n }\n\n const hasNoIndex = (product: { metafields: { seoSetting: { noindex: any } } }) => {\n return product?.metafields?.seoSetting?.noindex\n }\n\n // \u5904\u7406\u4EA7\u54C1\u6570\u636E\n useEffect(() => {\n if (result?.slug || result?.id) {\n if (page === 1 || !isMobile) {\n setData([])\n }\n if (result?.products) {\n setData(prevProducts => {\n // \u68C0\u67E5\u662F\u5426\u5DF2\u7ECF\u5B58\u5728\u4E8E prevProducts \u4E2D\uFF0C\u907F\u514D\u91CD\u590D\u6DFB\u52A0\n const newProducts = result.products?.filter?.(\n (product: { id: any }) => !prevProducts.some(prev => prev.id === product.id)\n )\n let updatedProducts = [...prevProducts, ...newProducts]\n /** \u5DF2\u552E\u5B8C\u7684\u4EA7\u54C1 */\n const soldOutProducts = updatedProducts.filter?.(\n item =>\n !(\n !item?.metafields?.seoSetting?.noindex &&\n item.availableForSale &&\n item?.variants?.some((item: { availableForSale: any }) => item.availableForSale)\n )\n )\n // \u8FC7\u6EE4\u6389 availableForSale \u4E3A false \u7684\u4EA7\u54C1\n updatedProducts = updatedProducts.filter?.(\n item =>\n !item?.metafields?.seoSetting?.noindex &&\n item.availableForSale &&\n item?.variants?.some((item: { availableForSale: any }) => item.availableForSale)\n )\n // \u5C06\u5DF2\u552E\u5B8C\u7684\u4EA7\u54C1\u6DFB\u52A0\u5230\u6700\u540E\n updatedProducts.push(...soldOutProducts)\n // \u5982\u679C\u662F\u6709\u6298\u6263\u7684\u4EA7\u54C1\uFF0C\u5219\u8FC7\u6EE4\u6389\u6CA1\u6709\u6298\u6263\u7684\u4EA7\u54C1\n if (isSale) {\n updatedProducts = updatedProducts.filter?.((item: any) => {\n let isShow = false\n const isColor = item?.options?.find((item: any) => item?.displayName === 'color')\n if (isColor) {\n isShow = item?.variants?.find(\n (params: any) =>\n params?.coupons?.length && params?.coupons?.[0] && typeof params?.coupons?.[0] === 'object'\n )\n } else {\n const isVariants = item?.variants?.[0]?.coupons\n isShow = isVariants?.length && isVariants?.[0] && typeof isVariants?.[0] === 'object'\n }\n return !!isShow\n })\n }\n // \u5982\u679C advertisingSpace \u5B58\u5728\u4E14\u5C1A\u672A\u6DFB\u52A0\u5230\u6570\u7EC4\u4E2D\n if (updatedProducts?.length && ((page === 1 && !isMobile) || isMobile)) {\n updatedProducts = handleAdvertisingSpace(updatedProducts)\n }\n return updatedProducts\n })\n }\n }\n }, [result?.products, page, isMobile, advertisingSpace, isSale])\n\n useEffect(() => {\n if (!data?.length) return\n if (page === 1 && !isMobile) {\n setData(handleAdvertisingSpace(data))\n }\n }, [closeFilter])\n\n useEffect(() => {\n const isClass = document?.querySelector?.('.yotpo-reviews-star-ratings-widget')\n if (data?.length && (!isClass || isMobile)) {\n refreshStarRating?.()\n }\n }, [data])\n return (\n <div className=\"filter-card-wrap-container\" ref={filterCardWrapRef}>\n <div\n className={cn(\n 'w-full grid gap-3 md-tablet:grid-cols-2 grid-cols-3',\n {\n 'laptop:grid-cols-4 tablet:grid-cols-3': closeFilter && !isMobile,\n 'laptop:grid-cols-3 tablet:grid-cols-2': !closeFilter && !isMobile,\n },\n 'filter-card-wrap'\n )}\n >\n {data?.map?.(item => {\n if (hasNoIndex(item)) return null\n return (\n <FilterCardWrapItem\n data={item}\n key={item.id}\n buttonText={buttonText}\n metafields={metafields}\n onPrimaryChange={(e, data) => onPrimaryChange?.(e, data)}\n onSecondaryChange={(e, data) => onSecondaryChange?.(e, data)}\n />\n )\n })}\n </div>\n {!data?.length && noResultNode}\n {isMobile && result?.pageInfo?.hasNextPage ? (\n <div\n onClick={() => {\n onNextPage?.(result?.pageInfo?.endCursor)\n }}\n className=\"mt-6 text-sm font-bold cursor-pointer flex items-center justify-center gap-1 filter-card-wrap-more\"\n >\n <span>{loadMoreText || 'View More'}</span>\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"12\" height=\"6\" viewBox=\"0 0 12 6\" fill=\"none\">\n <path\n d=\"M9.96967 0.21967C10.2626 -0.0732232 10.7373 -0.073223 11.0302 0.21967C11.3231 0.512563 11.3231 0.987324 11.0302 1.28022L6.53022 5.78022C6.23732 6.07311 5.76256 6.07311 5.46967 5.78022L0.96967 1.28022C0.676777 0.987324 0.676777 0.512563 0.96967 0.21967C1.26256 -0.0732233 1.73732 -0.0732233 2.03022 0.21967L5.99994 4.1894L9.96967 0.21967Z\"\n fill=\"#1D1D1F\"\n />\n </svg>\n </div>\n ) : null}\n {!isMobile && total > 18 ? (\n <div className=\"mt-6 flex items-center justify-end gap-4 cursor-pointer\">\n <button\n name=\"perv page\"\n disabled={!result?.pageInfo?.hasPreviousPage || !data?.length}\n className={cn(\n 'flex items-center justify-center lg-desktop:size-14 size-10 rounded-full leading-tight overflow-hidden bg-transparent border-[1.5px] border-[#3D3D3F]',\n {\n 'opacity-50 cursor-not-allowed': !result?.pageInfo?.hasPreviousPage || !data?.length,\n }\n )}\n onClick={() => {\n onScrollTop?.()\n onPrevPage?.(result?.pageInfo?.startCursor)\n }}\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\n <path\n d=\"M12 5L7 10L12 15\"\n stroke=\"#3D3D3F\"\n stroke-width=\"1.66667\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n </button>\n <button\n name=\"next page\"\n className={cn(\n 'flex items-center justify-center lg-desktop:size-14 size-10 rounded-full leading-tight overflow-hidden bg-transparent border-[1.5px] border-[#3D3D3F]',\n {\n 'opacity-50 cursor-not-allowed': !result?.pageInfo?.hasNextPage || !data?.length,\n }\n )}\n disabled={!result?.pageInfo?.hasNextPage || !data?.length}\n onClick={() => {\n onScrollTop?.()\n onNextPage?.(result?.pageInfo?.endCursor)\n }}\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\n <path\n d=\"M7.5 5L12.5 10L7.5 15\"\n stroke=\"#3D3D3F\"\n stroke-width=\"1.66667\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n </button>\n </div>\n ) : null}\n </div>\n )\n}\n\nexport default forwardRef(FilterCardWrap)\n"],
5
+ "mappings": "AAiLY,cAAAA,EAaJ,QAAAC,MAbI,oBAjLZ,OAAS,MAAAC,MAAU,yBACnB,OAAS,iBAAAC,MAAqB,mBAC9B,OAAOC,MAAwB,uBAC/B,OAAS,UAAAC,EAAQ,YAAAC,EAAU,aAAAC,EAAW,cAAAC,EAAY,uBAAAC,MAA2B,QAE7E,OAAS,aAAAC,MAAiB,aAmB1B,MAAMC,EAAiB,CAACC,EAA4BC,IAAkC,CACpF,KAAM,CACJ,YAAAC,EAAc,CAAC,EACf,OAAAC,EAAS,GACT,MAAAC,EACA,OAAAC,EACA,YAAAC,EACA,KAAAC,EACA,WAAAC,EACA,aAAAC,EACA,kBAAAC,EACA,gBAAAC,EACA,kBAAAC,EACA,WAAAC,EACA,WAAAC,CACF,EAAId,EACE,CAAE,iBAAAe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,UACP,eAAa,UACb,iBAAe,QACf,kBAAgB,QAClB,EACF,EACF,EACAA,EAAC,UACC,KAAK,YACL,UAAWE,EACT,wJACA,CACE,gCAAiC,CAACe,GAAQ,UAAU,aAAe,CAACe,GAAM,MAC5E,CACF,EACA,SAAU,CAACf,GAAQ,UAAU,aAAe,CAACe,GAAM,OACnD,QAAS,IAAM,CACbS,IAAc,EACdhB,IAAaR,GAAQ,UAAU,SAAS,CAC1C,EAEA,SAAAjB,EAAC,OAAI,MAAM,6BAA6B,MAAM,KAAK,OAAO,KAAK,QAAQ,YAAY,KAAK,OACtF,SAAAA,EAAC,QACC,EAAE,wBACF,OAAO,UACP,eAAa,UACb,iBAAe,QACf,kBAAgB,QAClB,EACF,EACF,GACF,EACE,MACN,CAEJ,EAEA,IAAOsD,EAAQ9C,EAAWG,CAAc",
6
+ "names": ["jsx", "jsxs", "cn", "useMediaQuery", "FilterCardWrapItem", "useRef", "useState", "useEffect", "forwardRef", "useImperativeHandle", "cloneDeep", "FilterCardWrap", "props", "ref", "shopifyData", "isSale", "total", "result", "closeFilter", "page", "metafields", "noResultNode", "refreshStarRating", "onPrimaryChange", "onSecondaryChange", "onNextPage", "onPrevPage", "advertisingSpace", "buttonText", "loadMoreText", "currentAdvertisingSpace", "filterCardWrapRef", "data", "setData", "isMobile", "handleAdvertisingSpace", "products", "updatedProducts", "findIndex", "item", "insertIndex", "onScrollTop", "target", "targetY", "hasNoIndex", "product", "prevProducts", "newProducts", "prev", "soldOutProducts", "isShow", "params", "isVariants", "isClass", "FilterCardWrap_default"]
7
+ }
@@ -0,0 +1,10 @@
1
+ type FilterCardWrapItemProps = {
2
+ data: any;
3
+ buttonText?: any;
4
+ itemShape?: string;
5
+ metafields: any;
6
+ onPrimaryChange?: (item: any, sku: string) => void;
7
+ onSecondaryChange?: (item: any, sku: string) => void;
8
+ };
9
+ declare const FilterCardWrapItem: ({ data, buttonText, itemShape, metafields, onPrimaryChange, onSecondaryChange, }: FilterCardWrapItemProps) => import("react/jsx-runtime").JSX.Element;
10
+ export default FilterCardWrapItem;
@@ -0,0 +1,2 @@
1
+ import{Fragment as Ne,jsx as t,jsxs as m}from"react/jsx-runtime";import{cn as b,atobID as fe,yotpoInstanceId as be}from"../../helpers/utils.js";import{useAiuiContext as ge}from"../AiuiProvider/index.js";import{formatVariantPrice as xe}from"../ShelfDisplay/shelfDisplay.js";import ye from"../../components/badge.js";import{Text as ve}from"../../components/text.js";import R from"../../components/button.js";import V from"../../components/picture.js";import{trackUrlRef as N}from"../../shared/trackUrlRef.js";import{getFunctionMemberPrice as he}from"./component/price.js";import{useState as n,useEffect as w}from"react";const S="image",$="product_shelf",_e=999999999e-2,ke=e=>{let u;return e?.includes("products")?u=e?.split("products")[0]+"files/":u=e?.replace(e?.split("files")?.pop()||"","")+"/",u},Ce=({data:e,buttonText:u,itemShape:q,metafields:G,onPrimaryChange:J,onSecondaryChange:K})=>{const{memberPriceDiscount:Q,memberSetting:P,discounts:I,shopCommon:X}=G,[p,T]=n(""),[Y,B]=n(""),[f,M]=n(""),[z,Z]=n(!1),[L,ee]=n({}),[te,oe]=n(!1),[W,se]=n({price:"",basePrice:""}),[j,re]=n([]),[ne,le]=n([]),[g,ie]=n(""),[ae,ce]=n(""),{locale:l="us",currencyCode:de,isLogin:F}=ge(),v=e?.custom_name||e?.title||e?.name,O=e?.custom_description||e?.description||e?.descriptionHtml,a=e?.filter_variants||e?.variants||[],D=fe(e?.id||""),H=e?.images?.[0]?.url,me=o=>M(o),h=(o,r,s,i)=>{oe(i),ie(o||""),se({basePrice:r||"",price:s||""})};return w(()=>{if(f){const s=a?.find(i=>i?.name?.includes?.(f));T(s?.sku||a?.[0]?.sku||""),B(s?.image?.url||a?.[0]?.image?.url||"");return}const o=e?.options?.find(s=>s?.displayName==="color")?.values?.[0]?.label;o&&M(o);const r=a?.find(s=>s?.name?.includes?.(o));T(r?.sku||a?.[0]?.sku||""),B(r?.image?.url||a?.[0]?.image?.url||"")},[f]),w(()=>{if(!p)return;re(e?.tags||[]);const o=a?.find(c=>c?.sku===p)||a?.[0]||{};ee(o),Z(!o?.availableForSale||o?.price?.amount===_e);const{infos:r}=o?.metafields||{},{productInfos:s,preRender:i}=e?.metafields||{};ce(r?.comingSoon||s?.comingSoon||i?.soldOut||X?.soldOut||"");const x=o?.coupons?.[0],{price:A,basePrice:U,discount:ue,discountAmount:pe}=xe({locale:l,amount:x?x.variant_price4wscode:o.price,baseAmount:x?o.price:0,currencyCode:e?.price?.currencyCode||"USD"}),E=(()=>{if(x?.value_type==="fixed_amount"){const c=pe||"",y=c.match(/^(.*?)(\d[\d.,]*)(.*)$/);if(y){const[,_,d,k]=y;let C=d;return d.endsWith(".00")?C=d.replace(/\.00$/,""):d.endsWith(",00")&&(C=d.replace(/,00$/,"")),`${_}${C}${k}`}return c}return ue||""})();if(F){const c=he({locale:l,variant:o,shopMemberPriceDiscountConfig:Q,currencyCode:de||e?.price?.currencyCode||"USD"});if(c){const{hasMemberPrice:y,salePriceWithCurrency:_,originalPriceWithCurrency:d,savePriceWithCurrency:k}=c;h(k||"",d||"",y?_:"",c?.hasMemberPrice)}else h(E,U||"",A||"",!1)}else h(E,U||"",A||"",!1)},[e,p]),w(()=>{let o=[];if(g){const s=`${g} ${I?.off}`;o.push(s)}const r=j?.filter?.(s=>s?.startsWith?.("CLtag"))?.map?.(s=>s?.replace?.("CLtag:",""))?.slice?.(0,g?1:2);le(o.concat(r))},[j,g]),t("div",{className:b(q==="round"?"rounded-2xl":"rounded-none","tablet:hover:bg-info-white bg-container-secondary-1 box-border w-full cursor-pointer overflow-hidden duration-300",{"aiui-dark":e.theme==="dark"}),children:e?.mImage?t("div",{className:"size-full box-border overflow-hidden hover:[&_img]:scale-105",children:t("div",{className:"relative inset-0 size-full",children:m("a",{className:"size-full",href:N(e?.link,`${S}_${$}`),children:[t(V,{alt:"",source:e?.mImage?.url||e?.mImage,className:"size-full [&_img]:object-cover [&_img]:size-full",imgClassName:"size-full object-cover transition-all duration-300"}),m("div",{className:"desktop:p-6 absolute inset-x-0 top-0 box-border overflow-hidden p-4",children:[t("p",{className:"desktop:mb-2 mb-1 text-info-primary desktop:text-base text-sm font-bold",dangerouslySetInnerHTML:{__html:e?.subTitle}}),t("span",{className:"text-info-secondary desktop:text-[32px] text-[20px] font-bold desktop:leading-9 line-clamp-4 leading-6",dangerouslySetInnerHTML:{__html:e?.title}})]})]})})}):m("div",{className:"size-full desktop:p-6 desktop:pt-4 box-border overflow-hidden flex flex-col justify-between tablet:p-4 p-2 pb-4",children:[t("div",{className:"min-h-6 flex flex-wrap gap-1 overflow-hidden collection-filter-tags",children:ne?.map?.((o,r)=>t(ye,{className:"whitespace-nowrap max-w-full truncate px-1 box-border font-bold item-badge",children:o},r))}),t("a",{target:"_blank","aria-label":v,className:"my-1",href:N(`${l==="us"||!l?"":`/${l}`}/products/${e?.handle}`,`${S}_${$}`),children:t("div",{className:b("m-auto desktop:size-[196px] size-[120px] overflow-hidden"),children:t(V,{alt:"",source:Y,className:"h-full [&_img]:object-cover [&_img]:h-full [&_img]:w-fit"})})}),e?.options?.map(o=>{if(o?.displayName==="color")return t("div",{className:"flex items-center gap-1",children:o?.values?.map(r=>{const s=r?.hexColors?r.hexColors?.[0]:r?.label,i=s.startsWith("#")?s:"";return t("button",{onClick:()=>me(r?.label),className:b("size-4 rounded-full cursor-pointer overflow-hidden",`${f===r?.label?"border-[#00BEFA]":""}`),children:t("span",{className:b("h-full w-full overflow-hidden border-[0.5px] border-transparent","relative flex items-center justify-center overflow-hidden rounded-full",f===r?.label&&"border-[#ddd]"),style:i?{backgroundColor:i}:{},children:!i&&H&&t("img",{alt:s,className:"h-full w-full object-cover",src:`${ke(H)}${s?.toLowerCase().split(" ")?.join("-")}_50x.png`})})},r?.label)})})}),m("div",{children:[v?t("span",{dangerouslySetInnerHTML:{__html:v||""},className:"shelf-display-product-title line-clamp-2 lg-desktop:text-2xl laptop:text-xl text-base font-bold"}):null,e?.metafields?.judgemeBadge?t("a",{target:"_blank",className:"font-bold text-xs [&_.jdgm-star]:text-[#F77234]",dangerouslySetInnerHTML:{__html:e?.metafields?.judgemeBadge},href:N(`${l==="us"||!l?"":`/${l}`}/products/${e?.handle}`,`${S}_${$}`)}):t("div",{className:"w-full truncate font-bold yotpo-widget-instance [&_.yotpo-sr-bottom-line-new-review]:hidden [&_.yotpo-sr-bottom-line-text]:!text-xs [&_.yotpo-sr-bottom-line-text]:!pt-0 [&_.yotpo-sr-bottom-line-summary]:!items-center [&_.yotpo-sr-bottom-line-summary_span]:!h-auto [&_.yotpo-sr-bottom-line-summary_svg]:!mr-[3px]","data-yotpo-instance-id":be(l),"data-yotpo-product-id":D,"data-yotpo-cart-product-id":D,"data-yotpo-section-id":""}),O?t(ve,{size:2,html:O||"",className:"desktop:text-base laptop:text-sm shelf-display-product-description line-clamp-1 text-xs font-bold"}):null,m("div",{className:"mt-3 mb-2",children:[t("p",{dangerouslySetInnerHTML:{__html:F&&te&&(I?.memberPrice||P?.member_price||P?.plus_member_price)||""},className:"text-info-primary lg-desktop:text-lg desktop:text-base laptop:text-sm text-xs font-bold"}),t("div",{className:"flex items-center",children:z?t("div",{className:"desktop:text-2xl tablet:text-xl text-info-primary text-base font-bold",children:ae||""}):m(Ne,{children:[t("div",{className:"final-price desktop:text-2xl tablet:text-xl text-info-primary text-base font-bold",children:L?.availableForSale&&W?.price||""}),t("div",{className:"origin-price desktop:text-xl tablet:text-lg text-info-secondary ml-1 text-sm font-bold line-through",children:L?.availableForSale&&W?.basePrice||""})]})})]}),m("div",{className:b("shelf-flex-button-group","lg-desktop:gap-3 flex items-center gap-2 m-tablet:flex-col"),children:[t(R,{variant:"secondary",className:"m-tablet:w-full font-bold",onClick:()=>K?.(e,p),children:u?.secondaryButton||"Learn More"}),t(R,{variant:"primary",className:"m-tablet:w-full font-bold",disabled:z,onClick:()=>J?.(e,p),children:u?.primaryButton||"Shop Now"})]})]})]})},e?.id||e?.handle)};var We=Ce;export{We as default};
2
+ //# sourceMappingURL=FilterCardWrapItem.js.map