cortex-react-components 1.4.3 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/dist/{chunk-Q4PYWFOV.mjs → chunk-3FH4D24Y.mjs} +1 -1
  2. package/dist/{chunk-5UEX2ZT3.mjs → chunk-3GEC74P7.mjs} +1 -1
  3. package/dist/chunk-5GC7OIJP.mjs +4 -0
  4. package/dist/{chunk-E6LAVMGN.mjs → chunk-5SWDYMFR.mjs} +1 -1
  5. package/dist/chunk-6M36WM2P.mjs +1 -0
  6. package/dist/{chunk-OANFAQE4.mjs → chunk-6ZHKTYRN.mjs} +1 -1
  7. package/dist/chunk-BJKCW3JV.mjs +1 -0
  8. package/dist/chunk-C6AUISPJ.mjs +1 -0
  9. package/dist/{chunk-YQY5Z73J.mjs → chunk-ED34GA67.mjs} +1 -1
  10. package/dist/{chunk-MT7IEKDP.mjs → chunk-FS4U2L75.mjs} +1 -1
  11. package/dist/chunk-FUEY5ODP.mjs +4 -0
  12. package/dist/{chunk-BZVOHDLV.mjs → chunk-IUS3FIWG.mjs} +1 -1
  13. package/dist/chunk-PKS6BM5A.mjs +1 -0
  14. package/dist/chunk-RPNCR5DE.mjs +1 -0
  15. package/dist/chunk-VIQ2LSEB.mjs +1 -0
  16. package/dist/{chunk-MY7YCD7T.mjs → chunk-VIRO5TNH.mjs} +1 -1
  17. package/dist/{chunk-HQ5V5FY5.mjs → chunk-WBBN5JFF.mjs} +1 -1
  18. package/dist/{chunk-6XQN7JHH.mjs → chunk-YWDNHDQY.mjs} +1 -1
  19. package/dist/client/Blocks/Banner.mjs +1 -1
  20. package/dist/client/Blocks/CallToAction.mjs +1 -1
  21. package/dist/client/Blocks/CaseStudy.mjs +1 -1
  22. package/dist/client/Blocks/CaseStudy.stories.mjs +1 -1
  23. package/dist/client/Blocks/ConsultantProfile.mjs +1 -1
  24. package/dist/client/Blocks/ConsultantProfile.stories.mjs +1 -1
  25. package/dist/client/Blocks/Content.mjs +1 -1
  26. package/dist/client/Blocks/FeaturesBlock.mjs +1 -1
  27. package/dist/client/Blocks/FeaturesBlock.stories.mjs +1 -1
  28. package/dist/client/Blocks/ImageBlock.mjs +1 -1
  29. package/dist/client/Blocks/MediaBlock.mjs +1 -1
  30. package/dist/client/Blocks/RelatedPosts.mjs +1 -1
  31. package/dist/client/Blocks/RenderBlocks.mjs +1 -1
  32. package/dist/client/Blocks/index.d.ts +11 -0
  33. package/dist/client/Blocks/index.js +1 -1
  34. package/dist/client/Blocks/index.mjs +1 -1
  35. package/dist/client/Cards/EventCard.mjs +1 -1
  36. package/dist/client/Cards/EventCard.stories.mjs +1 -1
  37. package/dist/client/Cards/Image.d.ts +1 -1
  38. package/dist/client/Cards/Image.js +1 -1
  39. package/dist/client/Cards/Image.mjs +1 -1
  40. package/dist/client/Cards/Image.stories.js +1 -1
  41. package/dist/client/Cards/Image.stories.mjs +1 -1
  42. package/dist/client/Cards/index.d.ts +2 -0
  43. package/dist/client/Cards/index.js +5 -1
  44. package/dist/client/Cards/index.mjs +1 -1
  45. package/dist/client/Layouts/NewsGrid.mjs +1 -1
  46. package/dist/client/Layouts/NewsGrid.stories.mjs +1 -1
  47. package/dist/client/Layouts/index.mjs +1 -1
  48. package/dist/client/Payload/Card/index.mjs +1 -1
  49. package/dist/client/Payload/CollectionArchive/index.mjs +1 -1
  50. package/dist/client/Payload/Logo/index.mjs +1 -0
  51. package/dist/client/Payload/Media/ImageMedia/index.mjs +1 -1
  52. package/dist/client/Payload/Media/VideoMedia/index.mjs +1 -1
  53. package/dist/client/Payload/Media/index.mjs +1 -1
  54. package/dist/client/Payload/PageRange/index.mjs +1 -1
  55. package/dist/client/Payload/Pagination/index.mjs +1 -3
  56. package/dist/client/Payload/RichText/index.mjs +1 -1
  57. package/dist/client/Payload/RichText/serialize.mjs +1 -1
  58. package/dist/client/Payload/index.d.ts +8 -0
  59. package/dist/client/Payload/index.js +4 -0
  60. package/dist/client/Payload/index.mjs +1 -0
  61. package/dist/client/index.d.ts +5 -0
  62. package/dist/client/index.js +6 -1
  63. package/dist/client/index.mjs +1 -1
  64. package/dist/client/ui/index.mjs +1 -1
  65. package/dist/index.js +6 -1
  66. package/dist/index.mjs +1 -1
  67. package/dist/metafile-cjs.json +1 -1
  68. package/dist/metafile-esm.json +1 -1
  69. package/package.json +1 -1
  70. package/dist/chunk-I6MWUGBD.mjs +0 -1
  71. package/dist/chunk-RTU6IVSY.mjs +0 -1
  72. package/dist/chunk-UVJPKH6R.mjs +0 -4
  73. package/dist/client/Payload/Logo/Logo.mjs +0 -1
  74. /package/dist/{chunk-KQTFKGAZ.mjs → chunk-R7ZYTXG2.mjs} +0 -0
  75. /package/dist/client/Payload/Logo/{Logo.d.ts → index.d.ts} +0 -0
  76. /package/dist/client/Payload/Logo/{Logo.js → index.js} +0 -0
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "cortex-react-components",
3
3
  "author": "Cortex Reply",
4
4
  "private": false,
5
- "version": "1.4.3",
5
+ "version": "1.5.0",
6
6
  "description": "A library of React components with styles. Designed to seamlessly integrate with React and Next.js.",
7
7
  "license": "MPL-2.0",
8
8
  "main": "./dist/index.js",
@@ -1 +0,0 @@
1
- import{c}from"./chunk-RTU6IVSY.mjs";import{a as s}from"./chunk-CJTRVASG.mjs";import{a as e}from"./chunk-NIQ4466A.mjs";import{jsx as o,jsxs as f}from"react/jsx-runtime";var h=a=>{let{columns:t}=a,r={full:"12",half:"6",oneThird:"4",twoThirds:"8"};return o("div",{className:"container my-6",children:o("div",{className:"grid grid-cols-4 lg:grid-cols-12 gap-y-8 gap-x-16",children:t&&t.length>0&&t.map((i,p)=>{let{enableLink:m,link:d,richText:n,size:l}=i;return f("div",{className:e(`col-span-4 lg:col-span-${r[l]}`,{"md:col-span-2":l!=="full"}),children:[n&&o(c,{content:n,enableGutter:!1}),m&&o(s,{...d})]},p)})})})};export{h as a};
@@ -1 +0,0 @@
1
- import{i as N,j as T,k as g,l as C,m as h,n as P,o as v}from"./chunk-DYHP6A4B.mjs";import{a as p}from"./chunk-CJTRVASG.mjs";import{a as y}from"./chunk-YQY5Z73J.mjs";import{a as k}from"./chunk-NEW735FX.mjs";import{a as i}from"./chunk-NIQ4466A.mjs";import{jsx as f}from"react/jsx-runtime";var b=({className:s,content:e,style:a})=>f("div",{className:i("mx-auto my-8 w-full",s),children:f("div",{className:i("border py-3 px-6 flex items-center rounded",{"border-border bg-card":a==="info","border-error bg-error/30":a==="error","border-success bg-success/30":a==="success","border-warning bg-warning/30":a==="warning"}),children:f(n,{content:e,enableGutter:!1,enableProse:!1})})});import S,{Fragment as R}from"react";import{jsx as t}from"react/jsx-runtime";function u({nodes:s}){return t(R,{children:s==null?void 0:s.map((e,a)=>{if(e==null)return null;if(e.type==="text"){let r=t(S.Fragment,{children:e.text},a);return e.format&1&&(r=t("strong",{children:r},a)),e.format&2&&(r=t("em",{children:r},a)),e.format&4&&(r=t("span",{style:{textDecoration:"line-through"},children:r},a)),e.format&8&&(r=t("span",{style:{textDecoration:"underline"},children:r},a)),e.format&16&&(r=t("code",{children:e.text},a)),e.format&32&&(r=t("sub",{children:r},a)),e.format&64&&(r=t("sup",{children:r},a)),r}let c=r=>{if(r.children==null)return null;if((r==null?void 0:r.type)==="list"&&(r==null?void 0:r.listType)==="check")for(let o of r.children)"checked"in o&&(o!=null&&o.checked||(o.checked=!1));return u({nodes:r.children})},l="children"in e?c(e):"";if(e.type==="block"){let r=e.fields,o=r==null?void 0:r.blockType;if(!r||!o)return null;switch(o){case"cta":return t(B,{...r},a);case"mediaBlock":return t(y,{className:"col-start-1 col-span-3",imgClassName:"m-0",...r,captionClassName:"mx-auto max-w-[48rem]",enableGutter:!1,disableInnerContainer:!0},a);case"banner":return t(b,{className:"col-start-2 mb-4",...r},a);case"code":return t(k,{className:"col-start-2",...r},a);default:return null}}else switch(e.type){case"linebreak":return t("br",{className:"col-start-2"},a);case"paragraph":return t("p",{className:"col-start-2",children:l},a);case"heading":{let r=e==null?void 0:e.tag;return t(r,{className:"col-start-2",children:l},a)}case"list":{let r=e==null?void 0:e.tag;return t(r,{className:"list col-start-2",children:l},a)}case"listitem":return(e==null?void 0:e.checked)!=null?t("li",{"aria-checked":e.checked?"true":"false",className:` ${e.checked,""}`,role:"checkbox",tabIndex:-1,value:e==null?void 0:e.value,children:l},a):t("li",{value:e==null?void 0:e.value,children:l},a);case"quote":return t("blockquote",{className:"col-start-2",children:l},a);case"link":{let r=e.fields;return t(p,{newTab:!!(r!=null&&r.newTab),reference:r.doc,type:r.linkType==="internal"?"reference":"custom",url:r.url,children:l},a)}default:return null}})})}import{jsx as w}from"react/jsx-runtime";var I=({className:s,content:e,enableGutter:a=!0,enableProse:c=!0})=>{var l;return e?w("div",{className:i({"container ":a,"max-w-none":!a,"mx-auto prose dark:prose-invert ":c},s),children:e&&!Array.isArray(e)&&typeof e=="object"&&"root"in e&&u({nodes:(l=e==null?void 0:e.root)==null?void 0:l.children})}):null},n=I;import{jsx as m,jsxs as A}from"react/jsx-runtime";var B=({links:s,richText:e})=>m("div",{className:"container",children:A("div",{className:"bg-card rounded border-border border p-4 flex flex-col gap-8 md:flex-row md:justify-between md:items-center",children:[m("div",{className:"max-w-[48rem] flex items-center",children:e&&m(n,{className:"mb-0",content:e,enableGutter:!1})}),m("div",{className:"flex flex-col gap-8",children:(s||[]).map(({link:a},c)=>m(p,{size:"lg",...a},c))})]})});export{B as a,u as b,n as c,b as d};
@@ -1,4 +0,0 @@
1
- "use client";
2
- "use strict";
3
-
4
- import{a as m,d,f as p,g as f,i as u}from"./chunk-OQNGQGJV.mjs";import w from"next/image";import a from"path";import{useState as s}from"react";import{Fragment as z,jsx as o,jsxs as c}from"react/jsx-runtime";function N(t){try{let e=new URL(t),{hostname:n}=e;return n.endsWith("sharepoint.com")}catch{return!1}}function W(t){return t.startsWith("http")}function v(t,e){let n=t;if(N(t))n=`/docs/api/content/sharepoint?url=${t}`;else if(W(t))n=t;else if(e.source==="github"){let i=t.replace("./","");if(i.startsWith("/")&&(i=i.slice(1)),e.linked){if(e.linked.path){let r=a.dirname(e.linked.path);r.startsWith(".")||(i=`${r}/${i}`)}n=`/docs/docs/api/github/content?owner=${e.linked.owner}&repo=${e.linked.repo}&path=${i}&branch=${e.linked.branch}`}else{if(e.file){let r=a.dirname(e.file);r.startsWith(".")||(i=`${r}/${i}`)}n=`/docs/docs/api/github/content?owner=${e.owner}&repo=${e.repo}&path=${i}&branch=${e.branch}`}}else if(t.startsWith("/"))n=t;else if(t.startsWith("./")){let i=t.replace("./","");e.file&&(i=`/${a.dirname(e.file)}/${i}`),n=i}else n="/image-not-found.png";return n}function S({src:t,alt:e}){let[n,i]=s(!1),[r,$]=s(!1),[l,y]=s({width:0,height:0}),k=()=>{r&&i(!0)},L=()=>{i(!1)},I=D=>{let{naturalWidth:h,naturalHeight:g}=D.target;y({width:h,height:g}),$(h>300||g>300)};return c(z,{children:[o("div",{className:`relative mx-auto my-4 flex justify-center items-center cursor-pointer ${l.height>300?"h-[300px]":`h-[${l.height}px]`}`,onClick:k,children:o(w,{sizes:"100vw",height:l.height,width:l.width,src:t,alt:e||"",onLoad:I,unoptimized:!0,className:"object-contain max-w-full max-h-full"})}),o(m,{open:n,onOpenChange:i,children:c(p,{className:"flex flex-col items-center justify-center",children:[c(f,{className:"flex w-full justify-end",children:[o(u,{className:"hidden",children:e}),o(d,{})]}),o("div",{className:"flex items-center justify-center",children:o(w,{height:l.height,width:l.width,src:t,alt:e||"",unoptimized:!0,className:"object-contain"})})]})})]})}function j({props:t,baseContext:e}){let{src:n}=t;return n=v(n,e),o(S,{src:n,alt:t.alt})}export{j as a};
@@ -1 +0,0 @@
1
- import"../../../chunk-US547EKQ.mjs";import t from"clsx";import s from"next/image";import{jsx as l}from"react/jsx-runtime";var n=o=>{let{loading:a,priority:r,className:i}=o;return l(s,{alt:"Payload Logo",width:193,height:34,loading:a||"lazy",fetchPriority:r||"low",decoding:"async",className:t("max-w-[9.375rem] w-full h-[34px]",i),src:"https://raw.githubusercontent.com/payloadcms/payload/main/packages/ui/src/assets/payload-logo-light.svg"})};export{n as Logo};
File without changes
File without changes