@anker-in/headless-ui 0.0.27-alpha.37 → 0.0.27-alpha.38

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 (103) hide show
  1. package/dist/cjs/cpn-components/CpnBanner/index.d.ts +3 -0
  2. package/dist/cjs/cpn-components/CpnBanner/index.js +2 -0
  3. package/dist/cjs/cpn-components/CpnBanner/index.js.map +7 -0
  4. package/dist/cjs/cpn-components/CpnBanner/types.d.ts +42 -0
  5. package/dist/cjs/cpn-components/CpnBanner/types.js +2 -0
  6. package/dist/cjs/cpn-components/CpnBanner/types.js.map +7 -0
  7. package/dist/cjs/cpn-components/CpnCountDown/index.d.ts +3 -0
  8. package/dist/cjs/cpn-components/CpnCountDown/index.js +2 -0
  9. package/dist/cjs/cpn-components/CpnCountDown/index.js.map +7 -0
  10. package/dist/cjs/cpn-components/CpnCountDown/types.d.ts +28 -0
  11. package/dist/cjs/cpn-components/CpnCountDown/types.js +2 -0
  12. package/dist/cjs/cpn-components/CpnCountDown/types.js.map +7 -0
  13. package/dist/cjs/cpn-components/CpnNavigation/index.d.ts +3 -0
  14. package/dist/cjs/cpn-components/CpnNavigation/index.js +2 -0
  15. package/dist/cjs/cpn-components/CpnNavigation/index.js.map +7 -0
  16. package/dist/cjs/cpn-components/CpnNavigation/types.d.ts +19 -0
  17. package/dist/cjs/cpn-components/CpnNavigation/types.js +2 -0
  18. package/dist/cjs/cpn-components/CpnNavigation/types.js.map +7 -0
  19. package/dist/cjs/cpn-components/CpnProductCard/index.d.ts +3 -0
  20. package/dist/cjs/cpn-components/CpnProductCard/index.js +2 -0
  21. package/dist/cjs/cpn-components/CpnProductCard/index.js.map +7 -0
  22. package/dist/cjs/cpn-components/CpnProductCard/types.d.ts +109 -0
  23. package/dist/cjs/cpn-components/CpnProductCard/types.js +2 -0
  24. package/dist/cjs/cpn-components/CpnProductCard/types.js.map +7 -0
  25. package/dist/cjs/cpn-components/CpnTitle/index.d.ts +3 -0
  26. package/dist/cjs/cpn-components/CpnTitle/index.js +2 -0
  27. package/dist/cjs/cpn-components/CpnTitle/index.js.map +7 -0
  28. package/dist/cjs/cpn-components/CpnTitle/types.d.ts +10 -0
  29. package/dist/cjs/cpn-components/CpnTitle/types.js +2 -0
  30. package/dist/cjs/cpn-components/CpnTitle/types.js.map +7 -0
  31. package/dist/cjs/cpn-components/index.d.ts +5 -0
  32. package/dist/cjs/cpn-components/index.js +2 -0
  33. package/dist/cjs/cpn-components/index.js.map +7 -0
  34. package/dist/cjs/hooks/useCountDown.d.ts +10 -0
  35. package/dist/cjs/hooks/useCountDown.js +2 -0
  36. package/dist/cjs/hooks/useCountDown.js.map +7 -0
  37. package/dist/cjs/stories/cpnBanner.stories.d.ts +14 -0
  38. package/dist/cjs/stories/cpnBanner.stories.js +2 -0
  39. package/dist/cjs/stories/cpnBanner.stories.js.map +7 -0
  40. package/dist/cjs/stories/cpnCountdown.stories.d.ts +12 -0
  41. package/dist/cjs/stories/cpnCountdown.stories.js +2 -0
  42. package/dist/cjs/stories/cpnCountdown.stories.js.map +7 -0
  43. package/dist/cjs/stories/cpnNavigation.stories.d.ts +14 -0
  44. package/dist/cjs/stories/cpnNavigation.stories.js +2 -0
  45. package/dist/cjs/stories/cpnNavigation.stories.js.map +7 -0
  46. package/dist/cjs/stories/cpnProductcard.stories.d.ts +14 -0
  47. package/dist/cjs/stories/cpnProductcard.stories.js +2 -0
  48. package/dist/cjs/stories/cpnProductcard.stories.js.map +7 -0
  49. package/dist/cjs/stories/cpnTitle.stories.d.ts +14 -0
  50. package/dist/cjs/stories/cpnTitle.stories.js +2 -0
  51. package/dist/cjs/stories/cpnTitle.stories.js.map +7 -0
  52. package/dist/esm/cpn-components/CpnBanner/index.d.ts +3 -0
  53. package/dist/esm/cpn-components/CpnBanner/index.js +2 -0
  54. package/dist/esm/cpn-components/CpnBanner/index.js.map +7 -0
  55. package/dist/esm/cpn-components/CpnBanner/types.d.ts +42 -0
  56. package/dist/esm/cpn-components/CpnBanner/types.js +1 -0
  57. package/dist/esm/cpn-components/CpnBanner/types.js.map +7 -0
  58. package/dist/esm/cpn-components/CpnCountDown/index.d.ts +3 -0
  59. package/dist/esm/cpn-components/CpnCountDown/index.js +2 -0
  60. package/dist/esm/cpn-components/CpnCountDown/index.js.map +7 -0
  61. package/dist/esm/cpn-components/CpnCountDown/types.d.ts +28 -0
  62. package/dist/esm/cpn-components/CpnCountDown/types.js +1 -0
  63. package/dist/esm/cpn-components/CpnCountDown/types.js.map +7 -0
  64. package/dist/esm/cpn-components/CpnNavigation/index.d.ts +3 -0
  65. package/dist/esm/cpn-components/CpnNavigation/index.js +2 -0
  66. package/dist/esm/cpn-components/CpnNavigation/index.js.map +7 -0
  67. package/dist/esm/cpn-components/CpnNavigation/types.d.ts +19 -0
  68. package/dist/esm/cpn-components/CpnNavigation/types.js +1 -0
  69. package/dist/esm/cpn-components/CpnNavigation/types.js.map +7 -0
  70. package/dist/esm/cpn-components/CpnProductCard/index.d.ts +3 -0
  71. package/dist/esm/cpn-components/CpnProductCard/index.js +2 -0
  72. package/dist/esm/cpn-components/CpnProductCard/index.js.map +7 -0
  73. package/dist/esm/cpn-components/CpnProductCard/types.d.ts +109 -0
  74. package/dist/esm/cpn-components/CpnProductCard/types.js +1 -0
  75. package/dist/esm/cpn-components/CpnProductCard/types.js.map +7 -0
  76. package/dist/esm/cpn-components/CpnTitle/index.d.ts +3 -0
  77. package/dist/esm/cpn-components/CpnTitle/index.js +2 -0
  78. package/dist/esm/cpn-components/CpnTitle/index.js.map +7 -0
  79. package/dist/esm/cpn-components/CpnTitle/types.d.ts +10 -0
  80. package/dist/esm/cpn-components/CpnTitle/types.js +1 -0
  81. package/dist/esm/cpn-components/CpnTitle/types.js.map +7 -0
  82. package/dist/esm/cpn-components/index.d.ts +5 -0
  83. package/dist/esm/cpn-components/index.js +2 -0
  84. package/dist/esm/cpn-components/index.js.map +7 -0
  85. package/dist/esm/hooks/useCountDown.d.ts +10 -0
  86. package/dist/esm/hooks/useCountDown.js +2 -0
  87. package/dist/esm/hooks/useCountDown.js.map +7 -0
  88. package/dist/esm/stories/cpnBanner.stories.d.ts +14 -0
  89. package/dist/esm/stories/cpnBanner.stories.js +2 -0
  90. package/dist/esm/stories/cpnBanner.stories.js.map +7 -0
  91. package/dist/esm/stories/cpnCountdown.stories.d.ts +12 -0
  92. package/dist/esm/stories/cpnCountdown.stories.js +2 -0
  93. package/dist/esm/stories/cpnCountdown.stories.js.map +7 -0
  94. package/dist/esm/stories/cpnNavigation.stories.d.ts +14 -0
  95. package/dist/esm/stories/cpnNavigation.stories.js +2 -0
  96. package/dist/esm/stories/cpnNavigation.stories.js.map +7 -0
  97. package/dist/esm/stories/cpnProductcard.stories.d.ts +14 -0
  98. package/dist/esm/stories/cpnProductcard.stories.js +2 -0
  99. package/dist/esm/stories/cpnProductcard.stories.js.map +7 -0
  100. package/dist/esm/stories/cpnTitle.stories.d.ts +14 -0
  101. package/dist/esm/stories/cpnTitle.stories.js +2 -0
  102. package/dist/esm/stories/cpnTitle.stories.js.map +7 -0
  103. package/package.json +11 -1
@@ -0,0 +1,3 @@
1
+ import type { BannerProps } from './types.js';
2
+ declare const CpnBanner: (props: BannerProps) => import("react/jsx-runtime").JSX.Element;
3
+ export default CpnBanner;
@@ -0,0 +1,2 @@
1
+ "use strict";var w=Object.create;var m=Object.defineProperty;var k=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var y=Object.getPrototypeOf,h=Object.prototype.hasOwnProperty;var N=(n,a)=>{for(var o in a)m(n,o,{get:a[o],enumerable:!0})},x=(n,a,o,b)=>{if(a&&typeof a=="object"||typeof a=="function")for(let i of g(a))!h.call(n,i)&&i!==o&&m(n,i,{get:()=>a[i],enumerable:!(b=k(a,i))||b.enumerable});return n};var B=(n,a,o)=>(o=n!=null?w(y(n)):{},x(a||!n||!n.__esModule?m(o,"default",{value:n,enumerable:!0}):o,n)),C=n=>x(m({},"__esModule",{value:!0}),n);var P={};N(P,{default:()=>z});module.exports=C(P);var e=require("react/jsx-runtime"),s=require("../../helpers/utils.js"),c=require("../../components/index.js"),d=B(require("../CpnCountDown/index.js"));const j=n=>{const{id:a,image:o,imageMob:b,imageLink:i,content:f=[],cns:l}=n,u=t=>{if(t?.startsWith("http")&&(location.href=t),t?.startsWith("#")){const r=document.querySelector(t);r&&r.scrollIntoView({behavior:"smooth"})}};return(0,e.jsxs)("div",{id:a,className:(0,s.cn)("cpn-banner-container relative w-full",l?.container),children:[(0,e.jsx)(c.Picture,{loading:"eager",source:`${o}, ${b||o} 768`,className:(0,s.cn)("cpn-banner-picture",l?.picture),imgClassName:(0,s.cn)("cpn-banner-image h-full object-cover",l?.image),alt:""}),i&&(0,e.jsx)("a",{href:i,className:"absolute left-0 top-0 z-[1] size-full"}),(0,e.jsx)("div",{className:(0,s.cn)("cpn-banner-box tablet:flex tablet:flex-col tablet:justify-center tablet:pt-0 tablet:text-left absolute left-0 top-0 size-full pt-10 text-center",l?.box),children:(0,e.jsx)("div",{className:"tablet:px-10 desktop:px-20 px-6",children:(0,e.jsx)("div",{className:(0,s.cn)("cpn-banner-content tablet:mx-0 tablet:max-w-[40vw] mx-auto max-w-[70vw]",l?.content),children:f?.map((t,r)=>{switch(t.type){case"subheading":return(0,e.jsx)(c.Text,{as:"div",html:t.text,className:(0,s.cn)("cpn-banner-subheading tablet:text-[1.25vw] lg-desktop:text-[24px] mt-4 font-medium",l?.subheading)},r);case"title":return(0,e.jsx)(c.Text,{as:"div",html:t.text,className:(0,s.cn)("cpn-banner-title tablet:mt-5 tablet:text-[2.7vw] lg-desktop:text-[56px] mt-4 text-[32px] font-bold leading-[1.12]",l?.title)},r);case"subtitle":return(0,e.jsx)(c.Text,{as:"div",html:t.text,className:(0,s.cn)("cpn-banner-subtitle tablet:mt-5 tablet:text-[1.25vw] lg-desktop:text-[24px] mt-4 font-medium",l?.subtitle)},r);case"button":return(0,e.jsx)("div",{className:(0,s.cn)("cpn-banner-buttonBox tablet:mt-6 tablet:justify-start mt-4 flex justify-center",l?.buttonBox),children:(0,e.jsx)(c.Button,{className:(0,s.cn)("cpn-banner-button tablet:min-w-[138px] tablet:px-7 lg-desktop:min-w-[156px] lg-desktop:px-8 !w-auto min-w-[120px] !max-w-full px-5",l?.button,t.cns),onClick:t.onClick?t.onClick:()=>u(t.target||""),children:t.text},r)});case"buttons":return(0,e.jsx)("div",{className:(0,s.cn)("cpn-banner-buttonBox tablet:mt-6 tablet:justify-start mt-4 flex justify-center",l?.buttonBox),children:t.buttons.map((p,v)=>(0,e.jsx)(c.Button,{className:(0,s.cn)("cpn-banner-button tablet:min-w-[138px] tablet:px-7 lg-desktop:min-w-[156px] lg-desktop:px-8 !w-auto min-w-[120px] !max-w-full px-5",l?.button,p.cns),onClick:p.onClick?p.onClick:()=>u(p.target||""),children:p.text},v))});case"countdown":return(0,e.jsx)("div",{className:"cpn-banner-countdown tablet:mt-6 tablet:justify-start mt-4 flex justify-center",children:(0,e.jsx)(d.default,{endTime:t.endTime,copy:t.copy,cns:l?.countdown})},r)}})})})})]})};var z=j;
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/cpn-components/CpnBanner/index.tsx"],
4
+ "sourcesContent": ["import type { BannerProps } from './types.js'\nimport { cn } from '../../helpers/utils.js'\nimport { Picture, Text, Button } from '../../components/index.js'\nimport CountDown from '../CpnCountDown/index.js'\n\nconst CpnBanner = (props: BannerProps) => {\n const { id, image, imageMob, imageLink, content = [], cns } = props\n\n const btnClick = (target: string) => {\n if (target?.startsWith('http')) {\n location.href = target\n }\n if (target?.startsWith('#')) {\n const element = document.querySelector(target)\n if (element) {\n element.scrollIntoView({ behavior: 'smooth' })\n }\n }\n }\n\n return (\n <div id={id} className={cn('cpn-banner-container relative w-full', cns?.container)}>\n <Picture\n loading=\"eager\"\n source={`${image}, ${imageMob || image} 768`}\n className={cn('cpn-banner-picture', cns?.picture)}\n imgClassName={cn('cpn-banner-image h-full object-cover', cns?.image)}\n alt=\"\"\n />\n {imageLink && <a href={imageLink} className=\"absolute left-0 top-0 z-[1] size-full\"></a>}\n <div\n className={cn(\n 'cpn-banner-box tablet:flex tablet:flex-col tablet:justify-center tablet:pt-0 tablet:text-left absolute left-0 top-0 size-full pt-10 text-center',\n cns?.box\n )}\n >\n <div className=\"tablet:px-10 desktop:px-20 px-6\">\n <div className={cn('cpn-banner-content tablet:mx-0 tablet:max-w-[40vw] mx-auto max-w-[70vw]', cns?.content)}>\n {content?.map((item, index) => {\n switch (item.type) {\n case 'subheading':\n return (\n <Text\n key={index}\n as=\"div\"\n html={item.text}\n className={cn(\n 'cpn-banner-subheading tablet:text-[1.25vw] lg-desktop:text-[24px] mt-4 font-medium',\n cns?.subheading\n )}\n />\n )\n case 'title':\n return (\n <Text\n key={index}\n as=\"div\"\n html={item.text}\n className={cn(\n 'cpn-banner-title tablet:mt-5 tablet:text-[2.7vw] lg-desktop:text-[56px] mt-4 text-[32px] font-bold leading-[1.12]',\n cns?.title\n )}\n />\n )\n case 'subtitle':\n return (\n <Text\n key={index}\n as=\"div\"\n html={item.text}\n className={cn(\n 'cpn-banner-subtitle tablet:mt-5 tablet:text-[1.25vw] lg-desktop:text-[24px] mt-4 font-medium',\n cns?.subtitle\n )}\n />\n )\n case 'button':\n return (\n <div\n className={cn(\n 'cpn-banner-buttonBox tablet:mt-6 tablet:justify-start mt-4 flex justify-center',\n cns?.buttonBox\n )}\n >\n <Button\n key={index}\n className={cn(\n 'cpn-banner-button tablet:min-w-[138px] tablet:px-7 lg-desktop:min-w-[156px] lg-desktop:px-8 !w-auto min-w-[120px] !max-w-full px-5',\n cns?.button,\n item.cns\n )}\n onClick={item.onClick ? item.onClick : () => btnClick(item.target || '')}\n >\n {item.text}\n </Button>\n </div>\n )\n case 'buttons':\n return (\n <div\n className={cn(\n 'cpn-banner-buttonBox tablet:mt-6 tablet:justify-start mt-4 flex justify-center',\n cns?.buttonBox\n )}\n >\n {item.buttons.map((button, index) => (\n <Button\n key={index}\n className={cn(\n 'cpn-banner-button tablet:min-w-[138px] tablet:px-7 lg-desktop:min-w-[156px] lg-desktop:px-8 !w-auto min-w-[120px] !max-w-full px-5',\n cns?.button,\n button.cns\n )}\n onClick={button.onClick ? button.onClick : () => btnClick(button.target || '')}\n >\n {button.text}\n </Button>\n ))}\n </div>\n )\n case 'countdown':\n return (\n <div\n key={index}\n className=\"cpn-banner-countdown tablet:mt-6 tablet:justify-start mt-4 flex justify-center\"\n >\n <CountDown endTime={item.endTime} copy={item.copy} cns={cns?.countdown} />\n </div>\n )\n }\n })}\n </div>\n </div>\n </div>\n </div>\n )\n}\n\nexport default CpnBanner\n"],
5
+ "mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAqBI,IAAAI,EAAA,6BApBJC,EAAmB,kCACnBC,EAAsC,qCACtCC,EAAsB,uCAEtB,MAAMC,EAAaC,GAAuB,CACxC,KAAM,CAAE,GAAAC,EAAI,MAAAC,EAAO,SAAAC,EAAU,UAAAC,EAAW,QAAAC,EAAU,CAAC,EAAG,IAAAC,CAAI,EAAIN,EAExDO,EAAYC,GAAmB,CAInC,GAHIA,GAAQ,WAAW,MAAM,IAC3B,SAAS,KAAOA,GAEdA,GAAQ,WAAW,GAAG,EAAG,CAC3B,MAAMC,EAAU,SAAS,cAAcD,CAAM,EACzCC,GACFA,EAAQ,eAAe,CAAE,SAAU,QAAS,CAAC,CAEjD,CACF,EAEA,SACE,QAAC,OAAI,GAAIR,EAAI,aAAW,MAAG,uCAAwCK,GAAK,SAAS,EAC/E,oBAAC,WACC,QAAQ,QACR,OAAQ,GAAGJ,CAAK,KAAKC,GAAYD,CAAK,OACtC,aAAW,MAAG,qBAAsBI,GAAK,OAAO,EAChD,gBAAc,MAAG,uCAAwCA,GAAK,KAAK,EACnE,IAAI,GACN,EACCF,MAAa,OAAC,KAAE,KAAMA,EAAW,UAAU,wCAAwC,KACpF,OAAC,OACC,aAAW,MACT,kJACAE,GAAK,GACP,EAEA,mBAAC,OAAI,UAAU,kCACb,mBAAC,OAAI,aAAW,MAAG,0EAA2EA,GAAK,OAAO,EACvG,SAAAD,GAAS,IAAI,CAACK,EAAMC,IAAU,CAC7B,OAAQD,EAAK,KAAM,CACjB,IAAK,aACH,SACE,OAAC,QAEC,GAAG,MACH,KAAMA,EAAK,KACX,aAAW,MACT,qFACAJ,GAAK,UACP,GANKK,CAOP,EAEJ,IAAK,QACH,SACE,OAAC,QAEC,GAAG,MACH,KAAMD,EAAK,KACX,aAAW,MACT,oHACAJ,GAAK,KACP,GANKK,CAOP,EAEJ,IAAK,WACH,SACE,OAAC,QAEC,GAAG,MACH,KAAMD,EAAK,KACX,aAAW,MACT,+FACAJ,GAAK,QACP,GANKK,CAOP,EAEJ,IAAK,SACH,SACE,OAAC,OACC,aAAW,MACT,iFACAL,GAAK,SACP,EAEA,mBAAC,UAEC,aAAW,MACT,qIACAA,GAAK,OACLI,EAAK,GACP,EACA,QAASA,EAAK,QAAUA,EAAK,QAAU,IAAMH,EAASG,EAAK,QAAU,EAAE,EAEtE,SAAAA,EAAK,MARDC,CASP,EACF,EAEJ,IAAK,UACH,SACE,OAAC,OACC,aAAW,MACT,iFACAL,GAAK,SACP,EAEC,SAAAI,EAAK,QAAQ,IAAI,CAACE,EAAQD,OACzB,OAAC,UAEC,aAAW,MACT,qIACAL,GAAK,OACLM,EAAO,GACT,EACA,QAASA,EAAO,QAAUA,EAAO,QAAU,IAAML,EAASK,EAAO,QAAU,EAAE,EAE5E,SAAAA,EAAO,MARHD,CASP,CACD,EACH,EAEJ,IAAK,YACH,SACE,OAAC,OAEC,UAAU,iFAEV,mBAAC,EAAAE,QAAA,CAAU,QAASH,EAAK,QAAS,KAAMA,EAAK,KAAM,IAAKJ,GAAK,UAAW,GAHnEK,CAIP,CAEN,CACF,CAAC,EACH,EACF,EACF,GACF,CAEJ,EAEA,IAAOlB,EAAQM",
6
+ "names": ["CpnBanner_exports", "__export", "CpnBanner_default", "__toCommonJS", "import_jsx_runtime", "import_utils", "import_components", "import_CpnCountDown", "CpnBanner", "props", "id", "image", "imageMob", "imageLink", "content", "cns", "btnClick", "target", "element", "item", "index", "button", "CountDown"]
7
+ }
@@ -0,0 +1,42 @@
1
+ import type { CountDownProps } from '../CpnCountDown/types';
2
+ type TextType = 'title' | 'subtitle' | 'subheading';
3
+ type TextContent = {
4
+ type: TextType;
5
+ text: string;
6
+ };
7
+ type ButtonContent = {
8
+ type: 'button';
9
+ text: string;
10
+ target?: string;
11
+ cns?: string;
12
+ onClick?: () => void;
13
+ };
14
+ type ButtonsContent = {
15
+ type: 'buttons';
16
+ buttons: Omit<ButtonContent, 'type'>[];
17
+ };
18
+ type CountDownContent = {
19
+ type: 'countdown';
20
+ } & CountDownProps;
21
+ type BannerContent = TextContent | ButtonContent | ButtonsContent | CountDownContent;
22
+ export type BannerProps = {
23
+ id?: string;
24
+ image: string;
25
+ imageMob?: string;
26
+ imageLink?: string;
27
+ content?: BannerContent[];
28
+ cns?: {
29
+ container?: string;
30
+ picture?: string;
31
+ image?: string;
32
+ box?: string;
33
+ content?: string;
34
+ subheading?: string;
35
+ title?: string;
36
+ subtitle?: string;
37
+ buttonBox?: string;
38
+ button?: string;
39
+ countdown?: CountDownProps['cns'];
40
+ };
41
+ };
42
+ export {};
@@ -0,0 +1,2 @@
1
+ "use strict";var i=Object.defineProperty;var r=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var p=Object.prototype.hasOwnProperty;var u=(n,t,s,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let e of g(t))!p.call(n,e)&&e!==s&&i(n,e,{get:()=>t[e],enumerable:!(o=r(t,e))||o.enumerable});return n};var C=n=>u(i({},"__esModule",{value:!0}),n);var y={};module.exports=C(y);
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/cpn-components/CpnBanner/types.ts"],
4
+ "sourcesContent": ["import type { CountDownProps } from '../CpnCountDown/types'\n\ntype TextType = 'title' | 'subtitle' | 'subheading'\n\ntype TextContent = {\n type: TextType\n text: string\n}\n\ninterface BaseType {\n text?: string\n target?: string\n end?: string\n copy?: CountDownProps['copy']\n}\n\ntype ButtonContent = {\n type: 'button'\n text: string\n target?: string\n cns?: string\n onClick?: () => void\n}\n\ntype ButtonsContent = {\n type: 'buttons'\n buttons: Omit<ButtonContent, 'type'>[]\n}\n\ntype CountDownContent = {\n type: 'countdown'\n} & CountDownProps\n\ntype BannerContent = TextContent | ButtonContent | ButtonsContent | CountDownContent\n\nexport type BannerProps = {\n id?: string\n image: string\n imageMob?: string\n imageLink?: string\n content?: BannerContent[]\n cns?: {\n container?: string\n picture?: string\n image?: string\n box?: string\n content?: string\n subheading?: string\n title?: string\n subtitle?: string\n buttonBox?: string\n button?: string\n countdown?: CountDownProps['cns']\n }\n}\n"],
5
+ "mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD",
6
+ "names": ["types_exports", "__toCommonJS"]
7
+ }
@@ -0,0 +1,3 @@
1
+ import type { CountDownProps } from './types.js';
2
+ declare const CpnCountDown: (props: CountDownProps) => import("react/jsx-runtime").JSX.Element;
3
+ export default CpnCountDown;
@@ -0,0 +1,2 @@
1
+ "use strict";var x=Object.create;var l=Object.defineProperty;var v=Object.getOwnPropertyDescriptor;var b=Object.getOwnPropertyNames;var w=Object.getPrototypeOf,y=Object.prototype.hasOwnProperty;var g=(t,n)=>{for(var o in n)l(t,o,{get:n[o],enumerable:!0})},m=(t,n,o,c)=>{if(n&&typeof n=="object"||typeof n=="function")for(let p of b(n))!y.call(t,p)&&p!==o&&l(t,p,{get:()=>n[p],enumerable:!(c=v(n,p))||c.enumerable});return t};var N=(t,n,o)=>(o=t!=null?x(w(t)):{},m(n||!t||!t.__esModule?l(o,"default",{value:t,enumerable:!0}):o,t)),z=t=>m(l({},"__esModule",{value:!0}),t);var P={};g(P,{default:()=>h});module.exports=z(P);var e=require("react/jsx-runtime"),s=require("../../helpers/utils.js"),r=require("../../components/index.js"),u=N(require("../../hooks/useCountDown.js"));const a=({time:t,copy:n,image:o,cns:c})=>(0,e.jsx)(e.Fragment,{children:t?(0,e.jsxs)("div",{className:(0,s.cn)("cpn-countdown-item laptop:size-[54px] tablet:size-[3.2vw] relative size-[34px] rounded bg-black",c?.item),children:[o&&(0,e.jsx)(r.Picture,{className:(0,s.cn)("cpn-countdown-picture absolute left-0 top-0 size-full",c?.picture),imgClassName:(0,s.cn)("cpn-countdown-image h-full object-cover",c?.image),source:`${o}`}),(0,e.jsx)("div",{className:(0,s.cn)("cpn-countdown-time tablet:text-[1.25vw] laptop:text-[24px] absolute left-0 top-0 flex size-full items-center justify-center text-[16px] font-[600] text-white",c?.time),children:t}),n&&(0,e.jsx)("div",{className:(0,s.cn)("cpn-countdown-copy tablet:text-[12px] laptop:text-[14px] tablet:-bottom-6 absolute -bottom-4 left-1/2 -translate-x-1/2 text-[9px] font-medium",c?.copy),children:n})]}):(0,e.jsx)("div",{className:(0,s.cn)("cpn-countdown-colonBox relative flex flex-col gap-1",c?.colonBox),children:Array.from({length:2}).map((p,i)=>(0,e.jsx)("span",{className:(0,s.cn)("cpn-countdown-colon size-1 rounded-full bg-black",c?.colon)},i))})}),C=t=>{const{endTime:n,copy:o,cns:c}=t,{days:p,hours:i,minutes:d,seconds:f}=(0,u.default)({endTime:n});return(0,e.jsxs)("div",{className:(0,s.cn)("cpn-countdown-container laptop:gap-4 relative flex items-center justify-center gap-2",{"mb-5":o?.days},c?.container),children:[(0,e.jsx)(a,{time:p,copy:o?.days,cns:c}),(0,e.jsx)(a,{}),(0,e.jsx)(a,{time:i,copy:o?.hours,cns:c}),(0,e.jsx)(a,{}),(0,e.jsx)(a,{time:d,copy:o?.minutes,cns:c}),(0,e.jsx)(a,{}),(0,e.jsx)(a,{time:f,copy:o?.seconds,cns:c})]})};var h=C;
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/cpn-components/CpnCountDown/index.tsx"],
4
+ "sourcesContent": ["import type { CountDownProps, ItemProps } from './types.js'\nimport { cn } from '../../helpers/utils.js'\nimport { Picture } from '../../components/index.js'\nimport useCountDown from '../../hooks/useCountDown.js'\n\nconst Item = ({ time, copy, image, cns }: ItemProps) => (\n <>\n {time ? (\n <div\n className={cn(\n 'cpn-countdown-item laptop:size-[54px] tablet:size-[3.2vw] relative size-[34px] rounded bg-black',\n cns?.item\n )}\n >\n {image && (\n <Picture\n className={cn('cpn-countdown-picture absolute left-0 top-0 size-full', cns?.picture)}\n imgClassName={cn('cpn-countdown-image h-full object-cover', cns?.image)}\n source={`${image}`}\n />\n )}\n <div\n className={cn(\n 'cpn-countdown-time tablet:text-[1.25vw] laptop:text-[24px] absolute left-0 top-0 flex size-full items-center justify-center text-[16px] font-[600] text-white',\n cns?.time\n )}\n >\n {time}\n </div>\n {copy && (\n <div\n className={cn(\n 'cpn-countdown-copy tablet:text-[12px] laptop:text-[14px] tablet:-bottom-6 absolute -bottom-4 left-1/2 -translate-x-1/2 text-[9px] font-medium',\n cns?.copy\n )}\n >\n {copy}\n </div>\n )}\n </div>\n ) : (\n <div className={cn('cpn-countdown-colonBox relative flex flex-col gap-1', cns?.colonBox)}>\n {Array.from({ length: 2 }).map((_, index) => (\n <span key={index} className={cn('cpn-countdown-colon size-1 rounded-full bg-black', cns?.colon)}></span>\n ))}\n </div>\n )}\n </>\n)\n\nconst CpnCountDown = (props: CountDownProps) => {\n const { endTime, copy, cns } = props\n\n const { days, hours, minutes, seconds } = useCountDown({ endTime })\n\n return (\n <div\n className={cn(\n 'cpn-countdown-container laptop:gap-4 relative flex items-center justify-center gap-2',\n {\n 'mb-5': copy?.days,\n },\n cns?.container\n )}\n >\n <Item time={days} copy={copy?.days} cns={cns} />\n <Item />\n <Item time={hours} copy={copy?.hours} cns={cns} />\n <Item />\n <Item time={minutes} copy={copy?.minutes} cns={cns} />\n <Item />\n <Item time={seconds} copy={copy?.seconds} cns={cns} />\n </div>\n )\n}\n\nexport default CpnCountDown\n"],
5
+ "mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAME,IAAAI,EAAA,6BALFC,EAAmB,kCACnBC,EAAwB,qCACxBC,EAAyB,0CAEzB,MAAMC,EAAO,CAAC,CAAE,KAAAC,EAAM,KAAAC,EAAM,MAAAC,EAAO,IAAAC,CAAI,OACrC,mBACG,SAAAH,KACC,QAAC,OACC,aAAW,MACT,kGACAG,GAAK,IACP,EAEC,UAAAD,MACC,OAAC,WACC,aAAW,MAAG,wDAAyDC,GAAK,OAAO,EACnF,gBAAc,MAAG,0CAA2CA,GAAK,KAAK,EACtE,OAAQ,GAAGD,CAAK,GAClB,KAEF,OAAC,OACC,aAAW,MACT,gKACAC,GAAK,IACP,EAEC,SAAAH,EACH,EACCC,MACC,OAAC,OACC,aAAW,MACT,gJACAE,GAAK,IACP,EAEC,SAAAF,EACH,GAEJ,KAEA,OAAC,OAAI,aAAW,MAAG,sDAAuDE,GAAK,QAAQ,EACpF,eAAM,KAAK,CAAE,OAAQ,CAAE,CAAC,EAAE,IAAI,CAACC,EAAGC,OACjC,OAAC,QAAiB,aAAW,MAAG,mDAAoDF,GAAK,KAAK,GAAnFE,CAAsF,CAClG,EACH,EAEJ,EAGIC,EAAgBC,GAA0B,CAC9C,KAAM,CAAE,QAAAC,EAAS,KAAAP,EAAM,IAAAE,CAAI,EAAII,EAEzB,CAAE,KAAAE,EAAM,MAAAC,EAAO,QAAAC,EAAS,QAAAC,CAAQ,KAAI,EAAAC,SAAa,CAAE,QAAAL,CAAQ,CAAC,EAElE,SACE,QAAC,OACC,aAAW,MACT,uFACA,CACE,OAAQP,GAAM,IAChB,EACAE,GAAK,SACP,EAEA,oBAACJ,EAAA,CAAK,KAAMU,EAAM,KAAMR,GAAM,KAAM,IAAKE,EAAK,KAC9C,OAACJ,EAAA,EAAK,KACN,OAACA,EAAA,CAAK,KAAMW,EAAO,KAAMT,GAAM,MAAO,IAAKE,EAAK,KAChD,OAACJ,EAAA,EAAK,KACN,OAACA,EAAA,CAAK,KAAMY,EAAS,KAAMV,GAAM,QAAS,IAAKE,EAAK,KACpD,OAACJ,EAAA,EAAK,KACN,OAACA,EAAA,CAAK,KAAMa,EAAS,KAAMX,GAAM,QAAS,IAAKE,EAAK,GACtD,CAEJ,EAEA,IAAOV,EAAQa",
6
+ "names": ["CpnCountDown_exports", "__export", "CpnCountDown_default", "__toCommonJS", "import_jsx_runtime", "import_utils", "import_components", "import_useCountDown", "Item", "time", "copy", "image", "cns", "_", "index", "CpnCountDown", "props", "endTime", "days", "hours", "minutes", "seconds", "useCountDown"]
7
+ }
@@ -0,0 +1,28 @@
1
+ type Cns = {
2
+ container?: string;
3
+ item?: string;
4
+ picture?: string;
5
+ image?: string;
6
+ time?: string;
7
+ copy?: string;
8
+ colonBox?: string;
9
+ colon?: string;
10
+ };
11
+ type Copy = {
12
+ days?: string;
13
+ hours?: string;
14
+ minutes?: string;
15
+ seconds?: string;
16
+ };
17
+ export type CountDownProps = {
18
+ endTime?: string;
19
+ copy?: Copy;
20
+ cns?: Cns;
21
+ };
22
+ export type ItemProps = {
23
+ time?: string;
24
+ copy?: string;
25
+ image?: string;
26
+ cns?: Cns;
27
+ };
28
+ export {};
@@ -0,0 +1,2 @@
1
+ "use strict";var r=Object.defineProperty;var e=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var p=Object.prototype.hasOwnProperty;var c=(t,n,o,i)=>{if(n&&typeof n=="object"||typeof n=="function")for(let s of g(n))!p.call(t,s)&&s!==o&&r(t,s,{get:()=>n[s],enumerable:!(i=e(n,s))||i.enumerable});return t};var y=t=>c(r({},"__esModule",{value:!0}),t);var m={};module.exports=y(m);
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/cpn-components/CpnCountDown/types.ts"],
4
+ "sourcesContent": ["type Cns = {\n container?: string\n item?: string\n picture?: string\n image?: string\n time?: string\n copy?: string\n colonBox?: string\n colon?: string\n}\n\ntype Copy = {\n days?: string\n hours?: string\n minutes?: string\n seconds?: string\n}\n\nexport type CountDownProps = {\n endTime?: string\n copy?: Copy\n cns?: Cns\n}\n\nexport type ItemProps = {\n time?: string\n copy?: string\n image?: string\n cns?: Cns\n}\n"],
5
+ "mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD",
6
+ "names": ["types_exports", "__toCommonJS"]
7
+ }
@@ -0,0 +1,3 @@
1
+ import type { NavigationProps } from './types.js';
2
+ declare const CpnNavigation: (props: NavigationProps) => import("react/jsx-runtime").JSX.Element;
3
+ export default CpnNavigation;
@@ -0,0 +1,2 @@
1
+ "use strict";var y=Object.create;var s=Object.defineProperty;var E=Object.getOwnPropertyDescriptor;var N=Object.getOwnPropertyNames;var I=Object.getPrototypeOf,R=Object.prototype.hasOwnProperty;var S=(e,t)=>{for(var o in t)s(e,o,{get:t[o],enumerable:!0})},h=(e,t,o,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of N(t))!R.call(e,n)&&n!==o&&s(e,n,{get:()=>t[n],enumerable:!(a=E(t,n))||a.enumerable});return e};var k=(e,t,o)=>(o=e!=null?y(I(e)):{},h(t||!e||!e.__esModule?s(o,"default",{value:e,enumerable:!0}):o,e)),H=e=>h(s({},"__esModule",{value:!0}),e);var $={};S($,{default:()=>T});module.exports=H($);var f=require("react/jsx-runtime"),l=require("react"),v=require("../../helpers/utils.js"),g=k(require("lodash.debounce"));const L=e=>{const{lists:t,styles:o,cns:a,offset:n=0}=e,[x,d]=(0,l.useState)(0),u=(0,l.useRef)(null),C=r=>{r.scrollIntoView({behavior:"smooth",inline:"center"})},w=(r,c,i)=>{d(c);const p=i.target;C(p),r.anchor&&document.querySelector(`#${r.anchor}`)?.scrollIntoView({behavior:"smooth"}),i.preventDefault()};return(0,l.useEffect)(()=>{const r=(0,g.default)(()=>{const i=[];t?.forEach(m=>{const b=document.querySelector(`#${m.anchor}`);b&&i.push(b.getBoundingClientRect().top)});const p=i.findIndex(m=>m>c+n)-1;d(p)},100),c=u.current?.getBoundingClientRect().height||0;return window.addEventListener("scroll",r),()=>{window.removeEventListener("scroll",r)}},[t,n]),(0,f.jsx)("div",{id:"nav",className:(0,v.cn)("cpn-nav-container sticky top-0 z-10 w-full bg-[var(--bgColor)]",a?.container),style:{"--bgColor":o?.bgColor||"#C6F1FF","--color":o?.color||"#333","--activeColor":o?.activeColor||"#000"},children:(0,f.jsx)("div",{className:(0,v.cn)("cpn-nav-box relative flex items-center justify-start gap-[18px] overflow-scroll px-6 text-center [&::-webkit-scrollbar]:hidden","tablet:gap-[80px] tablet:justify-center",a?.box),ref:u,children:t?.map((r,c)=>(0,f.jsx)("a",{href:`#${r.anchor}`,className:(0,v.cn)("cpn-nav-item relative cursor-pointer whitespace-nowrap py-[14px] text-[16px] font-medium leading-[1.2] text-[var(--color)] transition-all duration-200",a?.item,{[`border-[var(--activeColor)] text-[var(--activeColor)] after:absolute after:bottom-0 after:left-0 after:h-[2px] after:w-full after:bg-[var(--activeColor)] after:transition-all after:duration-200 after:content-[""] ${a?.activeItem}`]:x===c}),onClick:i=>w(r,c,i),children:r.label},r.label))})})};var T=L;
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/cpn-components/CpnNavigation/index.tsx"],
4
+ "sourcesContent": ["import React, { useEffect, useRef, useState } from 'react'\nimport { cn } from '../../helpers/utils.js'\nimport type { Nav, NavigationProps } from './types.js'\nimport debounce from 'lodash.debounce'\n\nconst CpnNavigation = (props: NavigationProps) => {\n const { lists, styles, cns, offset = 0 } = props\n const [activeIndex, setActiveIndex] = useState(0)\n const navBox = useRef<HTMLDivElement>(null)\n\n const scrollIntoView = (ele: HTMLElement) => {\n ele.scrollIntoView({ behavior: 'smooth', inline: 'center' })\n }\n\n const handleNavItemClick = (nav: Nav, index: number, e: React.SyntheticEvent<EventTarget>) => {\n setActiveIndex(index)\n const ele = e.target as HTMLAnchorElement\n scrollIntoView(ele)\n if (nav.anchor) {\n document.querySelector(`#${nav.anchor}`)?.scrollIntoView({ behavior: 'smooth' })\n }\n e.preventDefault()\n }\n\n useEffect(() => {\n const scrollHandler = debounce(() => {\n const sectionTops: number[] = []\n lists?.forEach(nav => {\n const section = document.querySelector(`#${nav.anchor}`)\n if (section) {\n sectionTops.push(section.getBoundingClientRect().top)\n }\n })\n const index = sectionTops.findIndex(sectionTop => sectionTop > navHeight + offset) - 1\n setActiveIndex(index)\n }, 100)\n const navHeight = navBox.current?.getBoundingClientRect().height || 0\n window.addEventListener('scroll', scrollHandler)\n return () => {\n window.removeEventListener('scroll', scrollHandler)\n }\n }, [lists, offset])\n\n return (\n <div\n id=\"nav\"\n className={cn('cpn-nav-container sticky top-0 z-10 w-full bg-[var(--bgColor)]', cns?.container)}\n style={\n {\n '--bgColor': styles?.bgColor || '#C6F1FF',\n '--color': styles?.color || '#333',\n '--activeColor': styles?.activeColor || '#000',\n } as React.CSSProperties\n }\n >\n <div\n className={cn(\n 'cpn-nav-box relative flex items-center justify-start gap-[18px] overflow-scroll px-6 text-center [&::-webkit-scrollbar]:hidden',\n 'tablet:gap-[80px] tablet:justify-center',\n cns?.box\n )}\n ref={navBox}\n >\n {lists?.map((nav, index) => {\n return (\n <a\n key={nav.label}\n href={`#${nav.anchor}`}\n className={cn(\n 'cpn-nav-item relative cursor-pointer whitespace-nowrap py-[14px] text-[16px] font-medium leading-[1.2] text-[var(--color)] transition-all duration-200',\n cns?.item,\n {\n [`border-[var(--activeColor)] text-[var(--activeColor)] after:absolute after:bottom-0 after:left-0 after:h-[2px] after:w-full after:bg-[var(--activeColor)] after:transition-all after:duration-200 after:content-[\"\"] ${cns?.activeItem}`]:\n activeIndex === index,\n }\n )}\n onClick={e => handleNavItemClick(nav, index, e)}\n >\n {nav.label}\n </a>\n )\n })}\n </div>\n </div>\n )\n}\n\nexport default CpnNavigation\n"],
5
+ "mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAiEY,IAAAI,EAAA,6BAjEZC,EAAmD,iBACnDC,EAAmB,kCAEnBC,EAAqB,8BAErB,MAAMC,EAAiBC,GAA2B,CAChD,KAAM,CAAE,MAAAC,EAAO,OAAAC,EAAQ,IAAAC,EAAK,OAAAC,EAAS,CAAE,EAAIJ,EACrC,CAACK,EAAaC,CAAc,KAAI,YAAS,CAAC,EAC1CC,KAAS,UAAuB,IAAI,EAEpCC,EAAkBC,GAAqB,CAC3CA,EAAI,eAAe,CAAE,SAAU,SAAU,OAAQ,QAAS,CAAC,CAC7D,EAEMC,EAAqB,CAACC,EAAUC,EAAeC,IAAyC,CAC5FP,EAAeM,CAAK,EACpB,MAAMH,EAAMI,EAAE,OACdL,EAAeC,CAAG,EACdE,EAAI,QACN,SAAS,cAAc,IAAIA,EAAI,MAAM,EAAE,GAAG,eAAe,CAAE,SAAU,QAAS,CAAC,EAEjFE,EAAE,eAAe,CACnB,EAEA,sBAAU,IAAM,CACd,MAAMC,KAAgB,EAAAC,SAAS,IAAM,CACnC,MAAMC,EAAwB,CAAC,EAC/Bf,GAAO,QAAQU,GAAO,CACpB,MAAMM,EAAU,SAAS,cAAc,IAAIN,EAAI,MAAM,EAAE,EACnDM,GACFD,EAAY,KAAKC,EAAQ,sBAAsB,EAAE,GAAG,CAExD,CAAC,EACD,MAAML,EAAQI,EAAY,UAAUE,GAAcA,EAAaC,EAAYf,CAAM,EAAI,EACrFE,EAAeM,CAAK,CACtB,EAAG,GAAG,EACAO,EAAYZ,EAAO,SAAS,sBAAsB,EAAE,QAAU,EACpE,cAAO,iBAAiB,SAAUO,CAAa,EACxC,IAAM,CACX,OAAO,oBAAoB,SAAUA,CAAa,CACpD,CACF,EAAG,CAACb,EAAOG,CAAM,CAAC,KAGhB,OAAC,OACC,GAAG,MACH,aAAW,MAAG,iEAAkED,GAAK,SAAS,EAC9F,MACE,CACE,YAAaD,GAAQ,SAAW,UAChC,UAAWA,GAAQ,OAAS,OAC5B,gBAAiBA,GAAQ,aAAe,MAC1C,EAGF,mBAAC,OACC,aAAW,MACT,iIACA,0CACAC,GAAK,GACP,EACA,IAAKI,EAEJ,SAAAN,GAAO,IAAI,CAACU,EAAKC,OAEd,OAAC,KAEC,KAAM,IAAID,EAAI,MAAM,GACpB,aAAW,MACT,yJACAR,GAAK,KACL,CACE,CAAC,wNAAwNA,GAAK,UAAU,EAAE,EACxOE,IAAgBO,CACpB,CACF,EACA,QAASC,GAAKH,EAAmBC,EAAKC,EAAOC,CAAC,EAE7C,SAAAF,EAAI,OAZAA,EAAI,KAaX,CAEH,EACH,EACF,CAEJ,EAEA,IAAOlB,EAAQM",
6
+ "names": ["CpnNavigation_exports", "__export", "CpnNavigation_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_utils", "import_lodash", "CpnNavigation", "props", "lists", "styles", "cns", "offset", "activeIndex", "setActiveIndex", "navBox", "scrollIntoView", "ele", "handleNavItemClick", "nav", "index", "e", "scrollHandler", "debounce", "sectionTops", "section", "sectionTop", "navHeight"]
7
+ }
@@ -0,0 +1,19 @@
1
+ type Cns = {
2
+ container?: string;
3
+ box?: string;
4
+ item?: string;
5
+ activeItem?: string;
6
+ };
7
+ export interface Nav {
8
+ label: string;
9
+ anchor: string;
10
+ }
11
+ export type NavigationProps = {
12
+ lists: Nav[];
13
+ styles?: {
14
+ [key: string]: string;
15
+ };
16
+ cns?: Cns;
17
+ offset?: number;
18
+ };
19
+ export {};
@@ -0,0 +1,2 @@
1
+ "use strict";var i=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var o=Object.prototype.hasOwnProperty;var c=(n,t,r,e)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of g(t))!o.call(n,s)&&s!==r&&i(n,s,{get:()=>t[s],enumerable:!(e=a(t,s))||e.enumerable});return n};var p=n=>c(i({},"__esModule",{value:!0}),n);var l={};module.exports=p(l);
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/cpn-components/CpnNavigation/types.ts"],
4
+ "sourcesContent": ["type Cns = {\n container?: string\n box?: string\n item?: string\n activeItem?: string\n}\n\nexport interface Nav {\n label: string\n anchor: string\n}\n\nexport type NavigationProps = {\n lists: Nav[]\n styles?: {\n [key: string]: string\n }\n cns?: Cns\n offset?: number\n}\n"],
5
+ "mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD",
6
+ "names": ["types_exports", "__toCommonJS"]
7
+ }
@@ -0,0 +1,3 @@
1
+ import type { ProductCardProps } from './types.js';
2
+ declare const CpnProductCard: (props: ProductCardProps) => import("react/jsx-runtime").JSX.Element;
3
+ export default CpnProductCard;
@@ -0,0 +1,2 @@
1
+ "use strict";var p=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var d=Object.getOwnPropertyNames;var x=Object.prototype.hasOwnProperty;var u=(a,t)=>{for(var o in t)p(a,o,{get:t[o],enumerable:!0})},v=(a,t,o,e)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of d(t))!x.call(a,r)&&r!==o&&p(a,r,{get:()=>t[r],enumerable:!(e=i(t,r))||e.enumerable});return a};var f=a=>v(p({},"__esModule",{value:!0}),a);var g={};u(g,{default:()=>b});module.exports=f(g);var s=require("react/jsx-runtime"),l=require("../../helpers/utils.js"),c=require("../../components/index.js");const N=a=>{const{content:t,cns:o}=a;return(0,s.jsx)("div",{className:(0,l.cn)("cpn-card-container relative box-border w-[177px] px-2 pb-3 pt-4 text-center",o?.container),children:t?.map((e,r)=>{switch(e.type){case"tag":return(0,s.jsx)(c.Text,{as:"div",html:e.text},r);case"image":return(0,s.jsx)(c.Picture,{source:`${e.image}, ${e.imageMob||e.image} 768`,className:(0,l.cn)("mx-auto h-[100px]"),imgClassName:(0,l.cn)("h-full object-cover")},r);case"title":return(0,s.jsx)(c.Text,{as:"div",html:e.text,className:(0,l.cn)("text-[14px] font-semibold text-[#333]")},r);case"price":return(0,s.jsx)("div",{className:"mt-3",children:(0,s.jsx)(c.Text,{html:`${e.text}`,className:(0,l.cn)("text-[14px] font-semibold text-[#333]")})});case"buttons":return(0,s.jsx)("div",{className:"mt-2 flex flex-col gap-2",children:e.buttons?.map((n,m)=>(0,s.jsx)(c.Button,{variant:n.variant,className:"w-full",onClick:n.onClick,children:n.text},m))})}})})};var b=N;
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/cpn-components/CpnProductCard/index.tsx"],
4
+ "sourcesContent": ["import { cn } from '../../helpers/utils.js'\nimport type { ProductCardProps } from './types.js'\nimport { Button, Picture, Text } from '../../components/index.js'\n\nconst CpnProductCard = (props: ProductCardProps) => {\n const { content, cns } = props\n\n return (\n <div className={cn('cpn-card-container relative box-border w-[177px] px-2 pb-3 pt-4 text-center', cns?.container)}>\n {content?.map((item, index) => {\n switch (item.type) {\n case 'tag':\n return <Text key={index} as=\"div\" html={item.text} />\n case 'image':\n return (\n <Picture\n key={index}\n source={`${item.image}, ${item.imageMob || item.image} 768`}\n className={cn('mx-auto h-[100px]')}\n imgClassName={cn('h-full object-cover')}\n />\n )\n case 'title':\n return (\n <Text key={index} as=\"div\" html={item.text} className={cn('text-[14px] font-semibold text-[#333]')} />\n )\n case 'price':\n return (\n <div className=\"mt-3\">\n <Text html={`${item.text}`} className={cn('text-[14px] font-semibold text-[#333]')} />\n </div>\n )\n case 'buttons':\n return (\n <div className=\"mt-2 flex flex-col gap-2\">\n {item.buttons?.map((button, index) => (\n <Button key={index} variant={button.variant} className=\"w-full\" onClick={button.onClick}>\n {button.text}\n </Button>\n ))}\n </div>\n )\n }\n })}\n </div>\n )\n}\n\nexport default CpnProductCard\n"],
5
+ "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAYmB,IAAAI,EAAA,6BAZnBC,EAAmB,kCAEnBC,EAAsC,qCAEtC,MAAMC,EAAkBC,GAA4B,CAClD,KAAM,CAAE,QAAAC,EAAS,IAAAC,CAAI,EAAIF,EAEzB,SACE,OAAC,OAAI,aAAW,MAAG,8EAA+EE,GAAK,SAAS,EAC7G,SAAAD,GAAS,IAAI,CAACE,EAAMC,IAAU,CAC7B,OAAQD,EAAK,KAAM,CACjB,IAAK,MACH,SAAO,OAAC,QAAiB,GAAG,MAAM,KAAMA,EAAK,MAA3BC,CAAiC,EACrD,IAAK,QACH,SACE,OAAC,WAEC,OAAQ,GAAGD,EAAK,KAAK,KAAKA,EAAK,UAAYA,EAAK,KAAK,OACrD,aAAW,MAAG,mBAAmB,EACjC,gBAAc,MAAG,qBAAqB,GAHjCC,CAIP,EAEJ,IAAK,QACH,SACE,OAAC,QAAiB,GAAG,MAAM,KAAMD,EAAK,KAAM,aAAW,MAAG,uCAAuC,GAAtFC,CAAyF,EAExG,IAAK,QACH,SACE,OAAC,OAAI,UAAU,OACb,mBAAC,QAAK,KAAM,GAAGD,EAAK,IAAI,GAAI,aAAW,MAAG,uCAAuC,EAAG,EACtF,EAEJ,IAAK,UACH,SACE,OAAC,OAAI,UAAU,2BACZ,SAAAA,EAAK,SAAS,IAAI,CAACE,EAAQD,OAC1B,OAAC,UAAmB,QAASC,EAAO,QAAS,UAAU,SAAS,QAASA,EAAO,QAC7E,SAAAA,EAAO,MADGD,CAEb,CACD,EACH,CAEN,CACF,CAAC,EACH,CAEJ,EAEA,IAAOV,EAAQK",
6
+ "names": ["CpnProductCard_exports", "__export", "CpnProductCard_default", "__toCommonJS", "import_jsx_runtime", "import_utils", "import_components", "CpnProductCard", "props", "content", "cns", "item", "index", "button"]
7
+ }
@@ -0,0 +1,109 @@
1
+ export type ProductImage = {
2
+ url: string;
3
+ altText?: string;
4
+ width?: number;
5
+ height?: number;
6
+ };
7
+ export type ProductPrice = {
8
+ value: number;
9
+ currencyCode?: 'USD' | 'EUR' | 'ARS' | string;
10
+ retailPrice?: number;
11
+ salePrice?: number;
12
+ listPrice?: number;
13
+ extendedSalePrice?: number;
14
+ extendedListPrice?: number;
15
+ };
16
+ export type ProductOption = {
17
+ __typename?: 'MultipleChoiceOption';
18
+ id: string;
19
+ displayName: string;
20
+ name?: string;
21
+ values: ProductOptionValues[];
22
+ };
23
+ export type ProductOptionValues = {
24
+ label: string;
25
+ hexColors?: string[];
26
+ };
27
+ export type SellingPlans = {
28
+ id: string;
29
+ name: string;
30
+ options: {
31
+ name: string;
32
+ value: string;
33
+ }[];
34
+ };
35
+ export type SellingPlanGroups = {
36
+ name: string;
37
+ sellingPlans: SellingPlans[];
38
+ };
39
+ export type SellingPlanAllocations = {
40
+ priceAdjustments: [];
41
+ sellingPlan: SellingPlans;
42
+ }[];
43
+ export type ProductVariant = {
44
+ barcode?: string;
45
+ id: string | number;
46
+ options: ProductOption[];
47
+ availableForSale?: boolean;
48
+ quantityAvailable: number;
49
+ metafields?: Record<string, any>;
50
+ sellingPlanAllocations?: SellingPlanAllocations;
51
+ price: number;
52
+ weight?: number;
53
+ name?: string;
54
+ image?: ProductImage;
55
+ requiresShipping?: boolean;
56
+ [key: string]: any;
57
+ };
58
+ export type Product = {
59
+ availableForSale?: boolean;
60
+ id: string;
61
+ name: string;
62
+ description: string;
63
+ descriptionHtml?: string;
64
+ productType?: string;
65
+ onlineStoreUrl?: string | null;
66
+ publishedAt?: string;
67
+ title?: string;
68
+ slug?: string;
69
+ handle?: string;
70
+ path?: string;
71
+ images: ProductImage[];
72
+ variants: ProductVariant[];
73
+ price: ProductPrice;
74
+ listPrice?: number;
75
+ options: ProductOption[];
76
+ seo?: any;
77
+ tags?: string[];
78
+ metafields?: {
79
+ [key: string]: any;
80
+ };
81
+ vendor: string;
82
+ totalInventory: number;
83
+ requiresSellingPlan: boolean;
84
+ sellingPlanGroups: SellingPlanGroups[];
85
+ };
86
+ type Cns = {
87
+ container?: string;
88
+ box?: string;
89
+ item?: string;
90
+ activeItem?: string;
91
+ };
92
+ type ContentType = 'tag' | 'image' | 'title' | 'subtitle' | 'price' | 'buttons' | 'code';
93
+ interface Content {
94
+ type: ContentType;
95
+ text?: string;
96
+ image?: string;
97
+ imageMob?: string;
98
+ url?: string;
99
+ buttons?: {
100
+ text: string;
101
+ variant?: "primary" | "secondary";
102
+ onClick?: () => void;
103
+ }[];
104
+ }
105
+ export type ProductCardProps = {
106
+ content?: Content[];
107
+ cns?: Cns;
108
+ };
109
+ export {};
@@ -0,0 +1,2 @@
1
+ "use strict";var r=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var l=Object.getOwnPropertyNames;var o=Object.prototype.hasOwnProperty;var g=(t,e,s,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of l(e))!o.call(t,n)&&n!==s&&r(t,n,{get:()=>e[n],enumerable:!(i=a(e,n))||i.enumerable});return t};var p=t=>g(r({},"__esModule",{value:!0}),t);var c={};module.exports=p(c);
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/cpn-components/CpnProductCard/types.ts"],
4
+ "sourcesContent": ["export type ProductImage = {\n url: string\n altText?: string\n width?: number\n height?: number\n}\n\nexport type ProductPrice = {\n value: number\n currencyCode?: 'USD' | 'EUR' | 'ARS' | string\n retailPrice?: number\n salePrice?: number\n listPrice?: number\n extendedSalePrice?: number\n extendedListPrice?: number\n}\n\nexport type ProductOption = {\n __typename?: 'MultipleChoiceOption'\n id: string\n displayName: string\n name?: string\n values: ProductOptionValues[]\n}\n\nexport type ProductOptionValues = {\n label: string\n hexColors?: string[]\n}\n\nexport type SellingPlans = {\n id: string\n name: string\n options: {\n name: string\n value: string\n }[]\n}\n\nexport type SellingPlanGroups = {\n name: string\n sellingPlans: SellingPlans[]\n}\n\nexport type SellingPlanAllocations = {\n priceAdjustments: []\n sellingPlan: SellingPlans\n}[]\n\nexport type ProductVariant = {\n barcode?: string\n id: string | number\n options: ProductOption[]\n availableForSale?: boolean\n quantityAvailable: number\n metafields?: Record<string, any>\n sellingPlanAllocations?: SellingPlanAllocations\n price: number\n weight?: number\n name?: string\n image?: ProductImage\n requiresShipping?: boolean\n [key: string]: any\n}\n\nexport type Product = {\n availableForSale?: boolean\n id: string\n name: string\n description: string\n descriptionHtml?: string\n productType?: string\n onlineStoreUrl?: string | null\n publishedAt?: string\n title?: string\n slug?: string\n handle?: string\n path?: string\n images: ProductImage[]\n variants: ProductVariant[]\n price: ProductPrice\n listPrice?: number\n options: ProductOption[]\n seo?: any\n tags?: string[]\n metafields?: { [key: string]: any }\n vendor: string\n totalInventory: number\n requiresSellingPlan: boolean\n sellingPlanGroups: SellingPlanGroups[]\n}\n\ntype Cns = {\n container?: string\n box?: string\n item?: string\n activeItem?: string\n}\n\ninterface TagType {\n type: 'tag'\n text: string\n}\n\ninterface ImageType {\n type: 'image'\n image: string\n imageMob?: string\n imageLink?: string\n}\n\ninterface TitleType {\n type: 'title'\n text: string\n}\n\ninterface SubtitleType {\n type: 'subtitle'\n text: string\n}\n\ninterface PriceType {\n type: 'price'\n price: string\n comparePrice?: string\n soldOut?: boolean\n}\n\ntype ContentType = 'tag' | 'image' | 'title' | 'subtitle' | 'price' | 'buttons' | 'code'\n\ninterface Content {\n type: ContentType\n text?: string\n image?: string\n imageMob?: string\n url?: string\n buttons?: {\n text: string\n variant?: \"primary\" | \"secondary\"\n onClick?: () => void\n }[]\n}\n\nexport type ProductCardProps = {\n content?: Content[]\n cns?: Cns\n}\n"],
5
+ "mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD",
6
+ "names": ["types_exports", "__toCommonJS"]
7
+ }
@@ -0,0 +1,3 @@
1
+ import type { TitleProps } from './types.js';
2
+ declare const CpnTitle: (props: TitleProps) => import("react/jsx-runtime").JSX.Element;
3
+ export default CpnTitle;
@@ -0,0 +1,2 @@
1
+ "use strict";var s=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var m=Object.prototype.hasOwnProperty;var x=(e,t)=>{for(var o in t)s(e,o,{get:t[o],enumerable:!0})},f=(e,t,o,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let c of a(t))!m.call(e,c)&&c!==o&&s(e,c,{get:()=>t[c],enumerable:!(n=p(t,c))||n.enumerable});return e};var u=e=>f(s({},"__esModule",{value:!0}),e);var T={};x(T,{default:()=>N});module.exports=u(T);var i=require("react/jsx-runtime"),r=require("../../helpers/utils.js"),l=require("../../components/index.js");const d=e=>{const{html:t,icon_l:o,icon_r:n,cns:c}=e;return(0,i.jsxs)("div",{className:(0,r.cn)("cpn-title-container flex items-start justify-center gap-5 text-center",c?.container),children:[o&&(0,i.jsx)(l.Picture,{source:o,className:(0,r.cn)("cpn-title-icon-l",c?.icon_l)}),(0,i.jsx)(l.Text,{html:t,className:"cpn-title-text laptop:text-[40px] text-[24px] font-bold"}),n&&(0,i.jsx)(l.Picture,{source:n,className:(0,r.cn)("cpn-title-icon-r",c?.icon_r)})]})};var N=d;
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/cpn-components/CpnTitle/index.tsx"],
4
+ "sourcesContent": ["import type { TitleProps } from './types.js'\nimport { cn } from '../../helpers/utils.js'\nimport { Picture, Text } from '../../components/index.js'\n\nconst CpnTitle = (props: TitleProps) => {\n const { html, icon_l, icon_r, cns } = props\n\n return (\n <div className={cn('cpn-title-container flex items-start justify-center gap-5 text-center', cns?.container)}>\n {icon_l && <Picture source={icon_l} className={cn('cpn-title-icon-l', cns?.icon_l)} />}\n <Text html={html} className=\"cpn-title-text laptop:text-[40px] text-[24px] font-bold\" />\n {icon_r && <Picture source={icon_r} className={cn('cpn-title-icon-r', cns?.icon_r)} />}\n </div>\n )\n}\n\nexport default CpnTitle\n"],
5
+ "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAQI,IAAAI,EAAA,6BAPJC,EAAmB,kCACnBC,EAA8B,qCAE9B,MAAMC,EAAYC,GAAsB,CACtC,KAAM,CAAE,KAAAC,EAAM,OAAAC,EAAQ,OAAAC,EAAQ,IAAAC,CAAI,EAAIJ,EAEtC,SACE,QAAC,OAAI,aAAW,MAAG,wEAAyEI,GAAK,SAAS,EACvG,UAAAF,MAAU,OAAC,WAAQ,OAAQA,EAAQ,aAAW,MAAG,mBAAoBE,GAAK,MAAM,EAAG,KACpF,OAAC,QAAK,KAAMH,EAAM,UAAU,0DAA0D,EACrFE,MAAU,OAAC,WAAQ,OAAQA,EAAQ,aAAW,MAAG,mBAAoBC,GAAK,MAAM,EAAG,GACtF,CAEJ,EAEA,IAAOV,EAAQK",
6
+ "names": ["CpnTitle_exports", "__export", "CpnTitle_default", "__toCommonJS", "import_jsx_runtime", "import_utils", "import_components", "CpnTitle", "props", "html", "icon_l", "icon_r", "cns"]
7
+ }
@@ -0,0 +1,10 @@
1
+ export type TitleProps = {
2
+ html: string;
3
+ icon_l?: string;
4
+ icon_r?: string;
5
+ cns?: {
6
+ container?: string;
7
+ icon_l?: string;
8
+ icon_r?: string;
9
+ };
10
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";var s=Object.defineProperty;var c=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var e=Object.prototype.hasOwnProperty;var l=(i,n,o,t)=>{if(n&&typeof n=="object"||typeof n=="function")for(let r of g(n))!e.call(i,r)&&r!==o&&s(i,r,{get:()=>n[r],enumerable:!(t=c(n,r))||t.enumerable});return i};var _=i=>l(s({},"__esModule",{value:!0}),i);var p={};module.exports=_(p);
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/cpn-components/CpnTitle/types.ts"],
4
+ "sourcesContent": ["export type TitleProps = {\n html: string\n icon_l?: string\n icon_r?: string\n cns?: {\n container?: string\n icon_l?: string\n icon_r?: string\n }\n}\n"],
5
+ "mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD",
6
+ "names": ["types_exports", "__toCommonJS"]
7
+ }
@@ -0,0 +1,5 @@
1
+ export { default as CpnBanner } from './CpnBanner/index.js';
2
+ export { default as CpnCountDown } from './CpnCountDown/index.js';
3
+ export { default as CpnNavigation } from './CpnNavigation/index.js';
4
+ export { default as CpnProductCard } from './CpnProductCard/index.js';
5
+ export { default as CpnTitle } from './CpnTitle/index.js';
@@ -0,0 +1,2 @@
1
+ "use strict";var s=Object.create;var f=Object.defineProperty;var x=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var c=Object.getPrototypeOf,g=Object.prototype.hasOwnProperty;var v=(a,o)=>{for(var t in o)f(a,t,{get:o[t],enumerable:!0})},p=(a,o,t,n)=>{if(o&&typeof o=="object"||typeof o=="function")for(let r of i(o))!g.call(a,r)&&r!==t&&f(a,r,{get:()=>o[r],enumerable:!(n=x(o,r))||n.enumerable});return a};var e=(a,o,t)=>(t=a!=null?s(c(a)):{},p(o||!a||!a.__esModule?f(t,"default",{value:a,enumerable:!0}):t,a)),w=a=>p(f({},"__esModule",{value:!0}),a);var B={};v(B,{CpnBanner:()=>d.default,CpnCountDown:()=>u.default,CpnNavigation:()=>C.default,CpnProductCard:()=>l.default,CpnTitle:()=>m.default});module.exports=w(B);var d=e(require("./CpnBanner/index.js")),u=e(require("./CpnCountDown/index.js")),C=e(require("./CpnNavigation/index.js")),l=e(require("./CpnProductCard/index.js")),m=e(require("./CpnTitle/index.js"));
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/cpn-components/index.ts"],
4
+ "sourcesContent": ["export { default as CpnBanner } from './CpnBanner/index.js'\nexport { default as CpnCountDown } from './CpnCountDown/index.js'\nexport { default as CpnNavigation } from './CpnNavigation/index.js'\nexport { default as CpnProductCard } from './CpnProductCard/index.js'\nexport { default as CpnTitle } from './CpnTitle/index.js'\n"],
5
+ "mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,qJAAAE,EAAAF,GAAA,IAAAG,EAAqC,mCACrCC,EAAwC,sCACxCC,EAAyC,uCACzCC,EAA0C,wCAC1CC,EAAoC",
6
+ "names": ["cpn_components_exports", "__export", "__toCommonJS", "import_CpnBanner", "import_CpnCountDown", "import_CpnNavigation", "import_CpnProductCard", "import_CpnTitle"]
7
+ }
@@ -0,0 +1,10 @@
1
+ interface Time {
2
+ days: string;
3
+ hours: string;
4
+ minutes: string;
5
+ seconds: string;
6
+ }
7
+ declare const useCountDown: ({ endTime }: {
8
+ endTime?: string;
9
+ }) => Time;
10
+ export default useCountDown;
@@ -0,0 +1,2 @@
1
+ "use strict";var u=Object.defineProperty;var l=Object.getOwnPropertyDescriptor;var w=Object.getOwnPropertyNames;var D=Object.prototype.hasOwnProperty;var T=(n,t)=>{for(var o in t)u(n,o,{get:t[o],enumerable:!0})},h=(n,t,o,e)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of w(t))!D.call(n,s)&&s!==o&&u(n,s,{get:()=>t[s],enumerable:!(e=l(t,s))||e.enumerable});return n};var b=n=>h(u({},"__esModule",{value:!0}),n);var S={};T(S,{default:()=>y});module.exports=b(S);var i=require("react");const p=({endTime:n=""})=>{const[t,o]=(0,i.useState)({days:"00",hours:"00",minutes:"00",seconds:"00"});return(0,i.useEffect)(()=>{const e=c=>(c<0?0:Math.floor(c)).toString().padStart(2,"0"),s=new Date(n).getTime(),a=setInterval(()=>{const c=new Date().getTime(),r=s-c,m=e(r/(1e3*60*60*24)),d=e(r%(1e3*60*60*24)/(1e3*60*60)),g=e(r%(1e3*60*60)/(1e3*60)),f=e(r%(1e3*60)/1e3);o({days:m,hours:d,minutes:g,seconds:f})},1e3);return()=>clearInterval(a)},[n]),t};var y=p;
2
+ //# sourceMappingURL=useCountDown.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/hooks/useCountDown.ts"],
4
+ "sourcesContent": ["import { useEffect, useState } from 'react'\n\ninterface Time {\n days: string\n hours: string\n minutes: string\n seconds: string\n}\n\nconst useCountDown = ({ endTime = '' }: { endTime?: string }) => {\n const [time, setTime] = useState<Time>({\n days: '00',\n hours: '00',\n minutes: '00',\n seconds: '00',\n })\n\n useEffect(() => {\n const format = (date: number) => {\n const number = date < 0 ? 0 : Math.floor(date)\n return number.toString().padStart(2, '0')\n }\n\n const countDownDate = new Date(endTime).getTime()\n\n const timer = setInterval(() => {\n const now = new Date().getTime()\n const distance = countDownDate - now\n\n const days = format(distance / (1000 * 60 * 60 * 24))\n const hours = format((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60))\n const minutes = format((distance % (1000 * 60 * 60)) / (1000 * 60))\n const seconds = format((distance % (1000 * 60)) / 1000)\n\n setTime({\n days,\n hours,\n minutes,\n seconds,\n })\n }, 1000)\n\n return () => clearInterval(timer)\n }, [endTime])\n\n return time\n}\n\nexport default useCountDown\n"],
5
+ "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAAoC,iBASpC,MAAMC,EAAe,CAAC,CAAE,QAAAC,EAAU,EAAG,IAA4B,CAC/D,KAAM,CAACC,EAAMC,CAAO,KAAI,YAAe,CACrC,KAAM,KACN,MAAO,KACP,QAAS,KACT,QAAS,IACX,CAAC,EAED,sBAAU,IAAM,CACd,MAAMC,EAAUC,IACCA,EAAO,EAAI,EAAI,KAAK,MAAMA,CAAI,GAC/B,SAAS,EAAE,SAAS,EAAG,GAAG,EAGpCC,EAAgB,IAAI,KAAKL,CAAO,EAAE,QAAQ,EAE1CM,EAAQ,YAAY,IAAM,CAC9B,MAAMC,EAAM,IAAI,KAAK,EAAE,QAAQ,EACzBC,EAAWH,EAAgBE,EAE3BE,EAAON,EAAOK,GAAY,IAAO,GAAK,GAAK,GAAG,EAC9CE,EAAQP,EAAQK,GAAY,IAAO,GAAK,GAAK,KAAQ,IAAO,GAAK,GAAG,EACpEG,EAAUR,EAAQK,GAAY,IAAO,GAAK,KAAQ,IAAO,GAAG,EAC5DI,EAAUT,EAAQK,GAAY,IAAO,IAAO,GAAI,EAEtDN,EAAQ,CACN,KAAAO,EACA,MAAAC,EACA,QAAAC,EACA,QAAAC,CACF,CAAC,CACH,EAAG,GAAI,EAEP,MAAO,IAAM,cAAcN,CAAK,CAClC,EAAG,CAACN,CAAO,CAAC,EAELC,CACT,EAEA,IAAOL,EAAQG",
6
+ "names": ["useCountDown_exports", "__export", "useCountDown_default", "__toCommonJS", "import_react", "useCountDown", "endTime", "time", "setTime", "format", "date", "countDownDate", "timer", "now", "distance", "days", "hours", "minutes", "seconds"]
7
+ }
@@ -0,0 +1,14 @@
1
+ import type { StoryObj } from '@storybook/react';
2
+ declare const meta: {
3
+ title: string;
4
+ component: (props: import("../cpn-components/CpnBanner/types.js").BannerProps) => import("react/jsx-runtime").JSX.Element;
5
+ parameters: {
6
+ viewport: {
7
+ defaultViewport: string;
8
+ };
9
+ };
10
+ tags: string[];
11
+ };
12
+ export default meta;
13
+ type Story = StoryObj<typeof meta>;
14
+ export declare const Default: Story;
@@ -0,0 +1,2 @@
1
+ "use strict";var s=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var m=Object.getOwnPropertyNames;var r=Object.prototype.hasOwnProperty;var c=(e,t)=>{for(var n in t)s(e,n,{get:t[n],enumerable:!0})},y=(e,t,n,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of m(t))!r.call(e,o)&&o!==n&&s(e,o,{get:()=>t[o],enumerable:!(i=p(t,o))||i.enumerable});return e};var f=e=>y(s({},"__esModule",{value:!0}),e);var d={};c(d,{Default:()=>b,default:()=>u});module.exports=f(d);var a=require("../cpn-components/index.js");const l={title:"Cpn-Components/CpnBanner",component:a.CpnBanner,parameters:{viewport:{defaultViewport:"tablet"}},tags:["autodocs"]};var u=l;const b={args:{image:"https://cdn.shopify.com/s/files/1/0521/9411/5753/files/landing_banner.jpg?v=1742379112",imageMob:"https://cdn.shopify.com/s/files/1/0521/9411/5753/files/landing_banner_mob.png?v=1742458121",content:[{type:"subheading",text:"Kick Off Summer with Exclusive Savings"},{type:"title",text:"Kick Off Summer with Exclusive Savings"},{type:"subtitle",text:"Get Early Access to Amazing Offers"},{type:"countdown",endTime:"2025-06-30T00:00:00",copy:{days:"Days",hours:"HRS",minutes:"MINS",seconds:"SEC"}},{type:"button",text:"Check Out Now"}],cns:{box:"",content:"min-md:max-w-[28vw] min-xl:max-w-[25vw] mx-auto",title:"",subtitle:"",button:"",countdown:{item:"bg-[#042637]",copy:"opacity-75"}}}};
2
+ //# sourceMappingURL=cpnBanner.stories.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/stories/cpnBanner.stories.tsx"],
4
+ "sourcesContent": ["import type { Meta, StoryObj } from '@storybook/react'\n\nimport { CpnBanner } from '../cpn-components/index.js'\n\nconst meta = {\n title: 'Cpn-Components/CpnBanner',\n component: CpnBanner,\n parameters: {\n // layout: 'fullscreen',\n viewport: { defaultViewport: 'tablet' },\n },\n tags: ['autodocs'],\n} satisfies Meta<typeof CpnBanner>\n\nexport default meta\n\ntype Story = StoryObj<typeof meta>\n\nexport const Default: Story = {\n args: {\n image: 'https://cdn.shopify.com/s/files/1/0521/9411/5753/files/landing_banner.jpg?v=1742379112',\n imageMob: 'https://cdn.shopify.com/s/files/1/0521/9411/5753/files/landing_banner_mob.png?v=1742458121',\n content: [\n {\n type: 'subheading',\n text: 'Kick Off Summer with Exclusive Savings',\n },\n {\n type: 'title',\n text: 'Kick Off Summer with Exclusive Savings',\n },\n {\n type: 'subtitle',\n text: 'Get Early Access to Amazing Offers',\n },\n {\n type: 'countdown',\n endTime: '2025-06-30T00:00:00',\n copy: {\n days: 'Days',\n hours: 'HRS',\n minutes: 'MINS',\n seconds: 'SEC',\n },\n },\n {\n type: 'button',\n text: 'Check Out Now',\n },\n ],\n cns: {\n box: '',\n content: 'min-md:max-w-[28vw] min-xl:max-w-[25vw] mx-auto',\n title: '',\n subtitle: '',\n button: '',\n countdown: {\n item: 'bg-[#042637]',\n copy: 'opacity-75',\n },\n },\n },\n}\n"],
5
+ "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,EAAA,YAAAC,IAAA,eAAAC,EAAAJ,GAEA,IAAAK,EAA0B,sCAE1B,MAAMC,EAAO,CACX,MAAO,2BACP,UAAW,YACX,WAAY,CAEV,SAAU,CAAE,gBAAiB,QAAS,CACxC,EACA,KAAM,CAAC,UAAU,CACnB,EAEA,IAAOH,EAAQG,EAIR,MAAMJ,EAAiB,CAC5B,KAAM,CACJ,MAAO,yFACP,SAAU,6FACV,QAAS,CACP,CACE,KAAM,aACN,KAAM,wCACR,EACA,CACE,KAAM,QACN,KAAM,wCACR,EACA,CACE,KAAM,WACN,KAAM,oCACR,EACA,CACE,KAAM,YACN,QAAS,sBACT,KAAM,CACJ,KAAM,OACN,MAAO,MACP,QAAS,OACT,QAAS,KACX,CACF,EACA,CACE,KAAM,SACN,KAAM,eACR,CACF,EACA,IAAK,CACH,IAAK,GACL,QAAS,kDACT,MAAO,GACP,SAAU,GACV,OAAQ,GACR,UAAW,CACT,KAAM,eACN,KAAM,YACR,CACF,CACF,CACF",
6
+ "names": ["cpnBanner_stories_exports", "__export", "Default", "cpnBanner_stories_default", "__toCommonJS", "import_cpn_components", "meta"]
7
+ }
@@ -0,0 +1,12 @@
1
+ import type { StoryObj } from '@storybook/react';
2
+ declare const meta: {
3
+ title: string;
4
+ component: (props: import("../cpn-components/CpnCountDown/types.js").CountDownProps) => import("react/jsx-runtime").JSX.Element;
5
+ parameters: {
6
+ layout: string;
7
+ };
8
+ tags: string[];
9
+ };
10
+ export default meta;
11
+ type Story = StoryObj<typeof meta>;
12
+ export declare const Default: Story;
@@ -0,0 +1,2 @@
1
+ "use strict";var r=Object.defineProperty;var s=Object.getOwnPropertyDescriptor;var m=Object.getOwnPropertyNames;var y=Object.prototype.hasOwnProperty;var C=(o,t)=>{for(var n in t)r(o,n,{get:t[n],enumerable:!0})},f=(o,t,n,p)=>{if(t&&typeof t=="object"||typeof t=="function")for(let e of m(t))!y.call(o,e)&&e!==n&&r(o,e,{get:()=>t[e],enumerable:!(p=s(t,e))||p.enumerable});return o};var u=o=>f(r({},"__esModule",{value:!0}),o);var l={};C(l,{Default:()=>d,default:()=>i});module.exports=u(l);var a=require("../cpn-components/index.js");const c={title:"Cpn-Components/CpnCountDown",component:a.CpnCountDown,parameters:{layout:"centered"},tags:["autodocs"]};var i=c;const d={args:{endTime:"2025-06-30T00:00:00"}};
2
+ //# sourceMappingURL=cpnCountdown.stories.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/stories/cpnCountdown.stories.tsx"],
4
+ "sourcesContent": ["import type { Meta, StoryObj } from '@storybook/react'\n\nimport { CpnCountDown } from '../cpn-components/index.js'\n\nconst meta = {\n title: 'Cpn-Components/CpnCountDown',\n component: CpnCountDown,\n parameters: {\n layout: 'centered',\n },\n tags: ['autodocs'],\n} satisfies Meta<typeof CpnCountDown>\n\nexport default meta\n\ntype Story = StoryObj<typeof meta>\n\nexport const Default: Story = {\n args: {\n endTime: '2025-06-30T00:00:00',\n },\n}\n"],
5
+ "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,EAAA,YAAAC,IAAA,eAAAC,EAAAJ,GAEA,IAAAK,EAA6B,sCAE7B,MAAMC,EAAO,CACX,MAAO,8BACP,UAAW,eACX,WAAY,CACV,OAAQ,UACV,EACA,KAAM,CAAC,UAAU,CACnB,EAEA,IAAOH,EAAQG,EAIR,MAAMJ,EAAiB,CAC5B,KAAM,CACJ,QAAS,qBACX,CACF",
6
+ "names": ["cpnCountdown_stories_exports", "__export", "Default", "cpnCountdown_stories_default", "__toCommonJS", "import_cpn_components", "meta"]
7
+ }
@@ -0,0 +1,14 @@
1
+ import type { StoryObj } from '@storybook/react';
2
+ declare const meta: {
3
+ title: string;
4
+ component: (props: import("../cpn-components/CpnNavigation/types.js").NavigationProps) => import("react/jsx-runtime").JSX.Element;
5
+ parameters: {
6
+ viewport: {
7
+ defaultViewport: string;
8
+ };
9
+ };
10
+ tags: string[];
11
+ };
12
+ export default meta;
13
+ type Story = StoryObj<typeof meta>;
14
+ export declare const Default: Story;
@@ -0,0 +1,2 @@
1
+ "use strict";var r=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var s=Object.getOwnPropertyNames;var l=Object.prototype.hasOwnProperty;var f=(e,t)=>{for(var a in t)r(e,a,{get:t[a],enumerable:!0})},c=(e,t,a,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of s(t))!l.call(e,o)&&o!==a&&r(e,o,{get:()=>t[o],enumerable:!(n=i(t,o))||n.enumerable});return e};var u=e=>c(r({},"__esModule",{value:!0}),e);var g={};f(g,{Default:()=>m,default:()=>b});module.exports=u(g);var p=require("../cpn-components/index.js");const y={title:"Cpn-Components/CpnNavigation",component:p.CpnNavigation,parameters:{viewport:{defaultViewport:"tablet"}},tags:["autodocs"]};var b=y;const m={args:{lists:[{label:"Benefits",anchor:"benefits"},{label:"Super Sale",anchor:"featureProducts"},{label:"Free Gifts",anchor:"giftWithPurchase"},{label:"Group Buy",anchor:"groupBuying"},{label:"Super Gifts",anchor:"superGifts"}],cns:{container:"top-[46px]"}}};
2
+ //# sourceMappingURL=cpnNavigation.stories.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/stories/cpnNavigation.stories.tsx"],
4
+ "sourcesContent": ["import type { Meta, StoryObj } from '@storybook/react'\n\nimport { CpnNavigation } from '../cpn-components/index.js'\n\nconst meta = {\n title: 'Cpn-Components/CpnNavigation',\n component: CpnNavigation,\n parameters: {\n // layout: 'fullscreen',\n viewport: { defaultViewport: 'tablet' },\n },\n tags: ['autodocs'],\n} satisfies Meta<typeof CpnNavigation>\n\nexport default meta\n\ntype Story = StoryObj<typeof meta>\n\nexport const Default: Story = {\n args: {\n lists: [\n { label: 'Benefits', anchor: 'benefits' },\n { label: 'Super Sale', anchor: 'featureProducts' },\n { label: 'Free Gifts', anchor: 'giftWithPurchase' },\n { label: 'Group Buy', anchor: 'groupBuying' },\n { label: 'Super Gifts', anchor: 'superGifts' },\n ],\n cns: {\n container: 'top-[46px]',\n },\n },\n}\n"],
5
+ "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,EAAA,YAAAC,IAAA,eAAAC,EAAAJ,GAEA,IAAAK,EAA8B,sCAE9B,MAAMC,EAAO,CACX,MAAO,+BACP,UAAW,gBACX,WAAY,CAEV,SAAU,CAAE,gBAAiB,QAAS,CACxC,EACA,KAAM,CAAC,UAAU,CACnB,EAEA,IAAOH,EAAQG,EAIR,MAAMJ,EAAiB,CAC5B,KAAM,CACJ,MAAO,CACL,CAAE,MAAO,WAAY,OAAQ,UAAW,EACxC,CAAE,MAAO,aAAc,OAAQ,iBAAkB,EACjD,CAAE,MAAO,aAAc,OAAQ,kBAAmB,EAClD,CAAE,MAAO,YAAa,OAAQ,aAAc,EAC5C,CAAE,MAAO,cAAe,OAAQ,YAAa,CAC/C,EACA,IAAK,CACH,UAAW,YACb,CACF,CACF",
6
+ "names": ["cpnNavigation_stories_exports", "__export", "Default", "cpnNavigation_stories_default", "__toCommonJS", "import_cpn_components", "meta"]
7
+ }