quirk-ui 0.1.178 → 0.1.179

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.
package/dist/index11.css CHANGED
@@ -1 +1 @@
1
- ._container_137s3_1{width:100%;display:flex;flex-direction:column;justify-content:flex-start;gap:var(--spacing-sm)}._container_137s3_1 *:not(h1,._h1_137s3_11,h2,._h2_137s3_11,h3,._h3_137s3_11,h4,._h4_137s3_11,h5,._h5_137s3_11,h6,._h6_137s3_11,strong,b,i){margin-bottom:var(--spacing-md)}._container_137s3_1 *:has(+._divider_137s3_15){margin-bottom:0}._container_137s3_1 ul{padding-top:var(--spacing-md);padding-bottom:var(--spacing-md)}._container_137s3_1 ul ul{padding-bottom:0}._container_137s3_1 *:last-child{margin-bottom:0}._container_137s3_1 ._richTextImage_137s3_33{border-radius:var(--radius-md);margin:0 auto;overflow:hidden;line-height:0;margin-bottom:var(--spacing-md)}._container_137s3_1 ._richTextLink_137s3_41{color:var(--color-secondary-100);text-decoration:underline;font-weight:var(--font-weight-semibold);transition:color .3s ease-in-out,text-decoration .3s ease-in-out}._container_137s3_1 ._richTextLink_137s3_41:hover{color:var(--color-primary-100);text-decoration:underline}._container_137s3_1 ._spacerSmall_137s3_55{border:none;margin:0 0 var(--spacing-sm)}._container_137s3_1 ._spacerMedium_137s3_60{border:none;margin:0 0 var(--spacing-md)}._container_137s3_1 ._spacerLarge_137s3_65{border:none;margin:0 0 var(--spacing-lg)}._container_137s3_1 ._divider_137s3_15{border:none;border-top:1px solid var(--color-secondary-25);margin:var(--spacing-md) 0}._container_137s3_1 .text-small{font-size:var(--font-size-sm)}._container_137s3_1 .text-medium{font-size:var(--font-size-md)}._container_137s3_1 .text-large{font-size:var(--font-size-lg)}._container_137s3_1 .text-xlarge{font-size:var(--font-size-xl)}code,._codeBlock_137s3_93{background-color:var(--color-secondary-10);padding:.25rem .5rem;border-radius:var(--radius-md);font-family:monospace;line-height:var(--line-height-normal);color:var(--color-text-primary)}._codeBlockWrapper_137s3_102{border-radius:var(--radius-md);overflow:hidden;background-color:var(--color-secondary-10);padding:var(--spacing-md);border:1px solid var(--color-secondary-25)}._codeBlockWrapper_137s3_102 code{padding:0!important}._codeFilename_137s3_114{font-size:var(--font-size-sm);font-weight:var(--font-weight-semibold);background-color:var(--color-secondary-10);padding:.25rem .5rem;border-bottom:1px solid var(--color-secondary-10)}._codeBlock_137s3_93{font-family:monospace;font-size:var(--font-size-sm);overflow-x:auto;white-space:pre;scrollbar-color:var(--color-secondary-50) transparent;scrollbar-width:thin}._codeBlock_137s3_93::-webkit-scrollbar{height:12px}._codeBlock_137s3_93::-webkit-scrollbar-track{border-radius:var(--radius-md);background-color:transparent;border:none}._codeBlock_137s3_93::-webkit-scrollbar-thumb{border:3px solid var(--color-secondary-10);border-radius:var(--radius-md);background-color:var(--color-secondary-50);background-clip:content-box}._tableWrapper_137s3_149{width:100%;overflow-x:auto;margin:var(--spacing-md) 0}._table_137s3_149{width:100%;border-collapse:collapse;border:1px solid var(--color-secondary-10)}._table_137s3_149 td,._table_137s3_149 th{border:1px solid var(--color-secondary-10);padding:var(--spacing-sm) var(--spacing-md);vertical-align:top}._table_137s3_149 th{font-weight:var(--font-weight-semibold)}
1
+ ._container_1glyt_1{width:100%;display:flex;flex-direction:column;justify-content:flex-start;gap:var(--spacing-sm)}._container_1glyt_1 *:not(h1,._h1_1glyt_13,h2,._h2_1glyt_15,h3,._h3_1glyt_17,h4,._h4_1glyt_19,h5,._h5_1glyt_21,h6,._h6_1glyt_23,strong,b,i,br){margin-bottom:var(--spacing-md)}._container_1glyt_1 *:has(+._divider_1glyt_32){margin-bottom:0}._container_1glyt_1 ul{padding-top:var(--spacing-md);padding-bottom:var(--spacing-md)}._container_1glyt_1 ul ul{padding-bottom:0}._container_1glyt_1 *:last-child{margin-bottom:0}._container_1glyt_1 ._richTextImage_1glyt_50{border-radius:var(--radius-md);margin:0 auto;overflow:hidden;line-height:0;margin-bottom:var(--spacing-md)}._container_1glyt_1 ._richTextLink_1glyt_58{color:var(--color-secondary-100);text-decoration:underline;font-weight:var(--font-weight-semibold);transition:color .3s ease-in-out,text-decoration .3s ease-in-out}._container_1glyt_1 ._richTextLink_1glyt_58:hover{color:var(--color-primary-100);text-decoration:underline}._container_1glyt_1 ._spacerSmall_1glyt_72{border:none;margin:0 0 var(--spacing-sm)}._container_1glyt_1 ._spacerMedium_1glyt_77{border:none;margin:0 0 var(--spacing-md)}._container_1glyt_1 ._spacerLarge_1glyt_82{border:none;margin:0 0 var(--spacing-lg)}._container_1glyt_1 ._divider_1glyt_32{border:none;border-top:1px solid var(--color-secondary-25);margin:var(--spacing-md) 0}._container_1glyt_1 .text-small{font-size:var(--font-size-sm)}._container_1glyt_1 .text-medium{font-size:var(--font-size-md)}._container_1glyt_1 .text-large{font-size:var(--font-size-lg)}._container_1glyt_1 .text-xlarge{font-size:var(--font-size-xl)}code,._codeBlock_1glyt_110{background-color:var(--color-secondary-10);padding:.25rem .5rem;border-radius:var(--radius-md);font-family:monospace;line-height:var(--line-height-normal);color:var(--color-text-primary)}._codeBlockWrapper_1glyt_119{border-radius:var(--radius-md);overflow:hidden;background-color:var(--color-secondary-10);padding:var(--spacing-md);border:1px solid var(--color-secondary-25)}._codeBlockWrapper_1glyt_119 code{padding:0!important}._codeFilename_1glyt_131{font-size:var(--font-size-sm);font-weight:var(--font-weight-semibold);background-color:var(--color-secondary-10);padding:.25rem .5rem;border-bottom:1px solid var(--color-secondary-10)}._codeBlock_1glyt_110{font-family:monospace;font-size:var(--font-size-sm);overflow-x:auto;white-space:pre;scrollbar-color:var(--color-secondary-50) transparent;scrollbar-width:thin}._codeBlock_1glyt_110::-webkit-scrollbar{height:12px}._codeBlock_1glyt_110::-webkit-scrollbar-track{border-radius:var(--radius-md);background-color:transparent;border:none}._codeBlock_1glyt_110::-webkit-scrollbar-thumb{border:3px solid var(--color-secondary-10);border-radius:var(--radius-md);background-color:var(--color-secondary-50);background-clip:content-box}._tableWrapper_1glyt_166{width:100%;overflow-x:auto;margin:var(--spacing-md) 0}._table_1glyt_166{width:100%;border-collapse:collapse;border:1px solid var(--color-secondary-10)}._table_1glyt_166 td,._table_1glyt_166 th{border:1px solid var(--color-secondary-10);padding:var(--spacing-sm) var(--spacing-md);vertical-align:top}._table_1glyt_166 th{font-weight:var(--font-weight-semibold)}
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../../index.css');require('../../../index11.css');const e=require("react/jsx-runtime"),k=require("react"),q=require("@portabletext/react"),w=require("../AnimatedSpan/index.cjs");;/* empty css */require("../../../core/components/Avatar/index.cjs");require("../../../core/context/ModalContext.cjs");require("../../../core/components/Checkbox/index.cjs");const L=require("../../../core/components/Text/index.cjs"),h=require("../../../core/components/Heading/index.cjs");require("react-dom");const B=require("../../../core/components/Table/index.cjs");require("../../../core/components/Tabs/index.cjs");require("../../../core/tokens/theme.cjs");const H=require("next/image"),S=require("../../hooks/useMediaQuery.cjs"),b="_container_137s3_1",z="_divider_137s3_15",F="_richTextImage_137s3_33",I="_richTextLink_137s3_41",W="_spacerSmall_137s3_55",C="_spacerMedium_137s3_60",P="_spacerLarge_137s3_65",U="_codeBlock_137s3_93",A="_codeBlockWrapper_137s3_102",E="_codeFilename_137s3_114",i={container:b,divider:z,richTextImage:F,richTextLink:I,spacerSmall:W,spacerMedium:C,spacerLarge:P,codeBlock:U,codeBlockWrapper:A,codeFilename:E};function Q(s){return{normal:({children:t})=>e.jsx(L.Text,{className:s,children:t}),h1:({children:t})=>e.jsx(h.Heading,{className:s,level:1,children:t}),h2:({children:t})=>e.jsx(h.Heading,{className:s,level:2,children:t}),h3:({children:t})=>e.jsx(h.Heading,{className:s,level:3,children:t}),h4:({children:t})=>e.jsx(h.Heading,{className:s,level:4,children:t}),h5:({children:t})=>e.jsx(h.Heading,{className:s,level:5,children:t}),h6:({children:t})=>e.jsx(h.Heading,{className:s,level:6,children:t}),quote:({children:t})=>e.jsx("blockquote",{className:s,children:t})}}const D={strong:({children:s})=>e.jsx("strong",{children:s}),em:({children:s})=>e.jsx("em",{children:s}),number:({children:s})=>e.jsx("span",{className:"inlineNumber",children:s}),left:({children:s})=>e.jsx("span",{className:"textLeft",children:s}),center:({children:s})=>e.jsx("span",{className:"textCenter",children:s}),right:({children:s})=>e.jsx("span",{className:"textRight",children:s}),inlineCode:({children:s})=>e.jsx("code",{children:s}),link:({children:s,value:t})=>{var p;const{linkType:r,internalUrl:a,externalUrl:l,blank:x}=t??{};let d="#";return r==="external"&&l?d=l:r==="internal"&&((p=a==null?void 0:a.slug)!=null&&p.current)&&(d=`/${a.slug.current}`),e.jsx("a",{href:d,target:x?"_blank":void 0,rel:r==="external"?"noopener noreferrer":void 0,className:i.richTextLink,children:s})},textSize:({children:s,value:t})=>{const r=t!=null&&t.size?`text-${t.size}`:"";return e.jsx("span",{className:r,children:s})}};function G({baseClassName:s,previousTextRef:t,textOverride:r,animateText:a,isMobile:l}){const x=({children:n,value:c})=>{if(!c)return e.jsx(e.Fragment,{children:n});const{colorClass:o}=c;return r?a?e.jsx(w.AnimatedSpan,{className:o,text:r,prevText:t.current},"animated-span"):e.jsx("span",{className:o,children:r}):e.jsx("span",{className:o,children:n})},d=({children:n=[]})=>{const c=k.Children.count(n);return e.jsx("ul",{style:{columnCount:l?1:c>7?2:1},className:s,children:n})};let p;const N=()=>p;return p={marks:{...D,coloredText:x},block:Q(s),list:{bullet:d},types:{image:({value:n})=>{var o,g,m,f,T;if(!(n!=null&&n.imageUrls))return null;const c=((o=n.asset)==null?void 0:o.altText)||"Content image";return e.jsxs("figure",{className:`${s??""} ${i.richTextImage}`,children:[e.jsx(H,{src:n.imageUrls.medium,alt:c,width:1e3,height:800,style:{maxWidth:"100%",height:"auto"}}),(((g=n.asset)==null?void 0:g.title)||((m=n.asset)==null?void 0:m.description))&&e.jsxs("figcaption",{children:[((f=n.asset)==null?void 0:f.title)&&e.jsx("strong",{children:n.asset.title}),((T=n.asset)==null?void 0:T.description)&&e.jsx("p",{children:n.asset.description})]})]})},divider:()=>e.jsx("hr",{className:i.divider}),spacer:({value:n})=>{const c=(n==null?void 0:n.style)||"medium",o={small:i.spacerSmall,medium:i.spacerMedium,large:i.spacerLarge};return e.jsx("span",{className:o[c]??i.spacerMedium})},table:({value:n})=>{var $,M;if(!(($=n==null?void 0:n.rows)!=null&&$.length))return null;const{hasHeadingRow:c}=n,o=c?n.rows[0]:null,g=c?n.rows.slice(1):n.rows,m=o||g[0];if(!((M=m==null?void 0:m.cells)!=null&&M.length))return null;const f=m.cells.map((y,u)=>{var j;return{header:o?e.jsx(q.PortableText,{value:(j=o.cells[u])==null?void 0:j.content,components:N()}):`Column ${u+1}`,accessor:`col${u}`,cellRenderer:_=>_?e.jsx(q.PortableText,{value:_,components:N()}):null}}),T=g.map(y=>{var j;const u={};return(j=y.cells)==null||j.forEach((_,R)=>{u[`col${R}`]=_==null?void 0:_.content}),u});return e.jsx(B.Table,{hasHeadingRow:c,data:T,columns:f,className:`${s??""} ${c?"hasHeadingRow":""}`})},code:({value:n})=>n!=null&&n.code?e.jsxs("div",{className:`${i.codeBlockWrapper} ${s??""}`,children:[n.filename&&e.jsx("div",{className:i.codeFilename,children:n.filename}),e.jsx("pre",{className:i.codeBlock,children:e.jsx("code",{children:n.code})})]}):null}},p}const J=({blocks:s,className:t,textOverride:r,animateText:a})=>{const l=S.useMediaQuery("(max-width: 767px)"),x=k.useRef(r);k.useEffect(()=>{x.current=r},[r]);const d=k.useMemo(()=>G({baseClassName:t,previousTextRef:x,textOverride:r,animateText:a,isMobile:l}),[t,r,a,l]);return s?typeof s=="string"?e.jsx(L.Text,{className:t,children:s}):e.jsx("div",{className:`${i.container} portableTextContainer`,children:e.jsx(q.PortableText,{value:s,components:d})}):null};exports.RichText=J;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../../index.css');require('../../../index11.css');const e=require("react/jsx-runtime"),y=require("react"),k=require("@portabletext/react"),w=require("../AnimatedSpan/index.cjs");;/* empty css */require("../../../core/components/Avatar/index.cjs");require("../../../core/context/ModalContext.cjs");require("../../../core/components/Checkbox/index.cjs");const L=require("../../../core/components/Text/index.cjs"),_=require("../../../core/components/Heading/index.cjs");require("react-dom");const B=require("../../../core/components/Table/index.cjs");require("../../../core/components/Tabs/index.cjs");require("../../../core/tokens/theme.cjs");const H=require("next/image"),S=require("../../hooks/useMediaQuery.cjs"),b="_container_1glyt_1",z="_divider_1glyt_32",F="_richTextImage_1glyt_50",I="_richTextLink_1glyt_58",W="_spacerSmall_1glyt_72",C="_spacerMedium_1glyt_77",P="_spacerLarge_1glyt_82",U="_codeBlock_1glyt_110",A="_codeBlockWrapper_1glyt_119",E="_codeFilename_1glyt_131",i={container:b,divider:z,richTextImage:F,richTextLink:I,spacerSmall:W,spacerMedium:C,spacerLarge:P,codeBlock:U,codeBlockWrapper:A,codeFilename:E};function Q(s){return{normal:({children:n})=>e.jsx(L.Text,{className:s,children:n}),h1:({children:n})=>e.jsx(_.Heading,{className:s,level:1,children:n}),h2:({children:n})=>e.jsx(_.Heading,{className:s,level:2,children:n}),h3:({children:n})=>e.jsx(_.Heading,{className:s,level:3,children:n}),h4:({children:n})=>e.jsx(_.Heading,{className:s,level:4,children:n}),h5:({children:n})=>e.jsx(_.Heading,{className:s,level:5,children:n}),h6:({children:n})=>e.jsx(_.Heading,{className:s,level:6,children:n}),quote:({children:n})=>e.jsx("blockquote",{className:s,children:n})}}const D={strong:({children:s})=>e.jsx("strong",{children:s}),em:({children:s})=>e.jsx("em",{children:s}),number:({children:s})=>e.jsx("span",{className:"inlineNumber",children:s}),left:({children:s})=>e.jsx("span",{className:"textLeft",children:s}),center:({children:s})=>e.jsx("span",{className:"textCenter",children:s}),right:({children:s})=>e.jsx("span",{className:"textRight",children:s}),inlineCode:({children:s})=>e.jsx("code",{children:s}),link:({children:s,value:n})=>{var p;const{linkType:r,internalUrl:a,externalUrl:l,blank:x}=n??{};let d="#";return r==="external"&&l?d=l:r==="internal"&&((p=a==null?void 0:a.slug)!=null&&p.current)&&(d=`/${a.slug.current}`),e.jsx("a",{href:d,target:x?"_blank":void 0,rel:r==="external"?"noopener noreferrer":void 0,className:i.richTextLink,children:s})},textSize:({children:s,value:n})=>{const r=n!=null&&n.size?`text-${n.size}`:"";return e.jsx("span",{className:r,children:s})}};function G({baseClassName:s,previousTextRef:n,textOverride:r,animateText:a,isMobile:l}){const x=({children:t,value:c})=>{if(!c)return e.jsx(e.Fragment,{children:t});const{colorClass:o}=c;return r?a?e.jsx(w.AnimatedSpan,{className:o,text:r,prevText:n.current},"animated-span"):e.jsx("span",{className:o,children:r}):e.jsx("span",{className:o,children:t})},d=({children:t=[]})=>{const c=y.Children.count(t);return e.jsx("ul",{style:{columnCount:l?1:c>7?2:1},className:s,children:t})};let p;const q=()=>p;return p={marks:{...D,coloredText:x},block:Q(s),list:{bullet:d},types:{image:({value:t})=>{var o,h,m,f,T;if(!(t!=null&&t.imageUrls))return null;const c=((o=t.asset)==null?void 0:o.altText)||"Content image";return e.jsxs("figure",{className:`${s??""} ${i.richTextImage}`,children:[e.jsx(H,{src:t.imageUrls.medium,alt:c,width:1e3,height:800,style:{maxWidth:"100%",height:"auto"}}),(((h=t.asset)==null?void 0:h.title)||((m=t.asset)==null?void 0:m.description))&&e.jsxs("figcaption",{children:[((f=t.asset)==null?void 0:f.title)&&e.jsx("strong",{children:t.asset.title}),((T=t.asset)==null?void 0:T.description)&&e.jsx("p",{children:t.asset.description})]})]})},divider:()=>e.jsx("hr",{className:i.divider}),spacer:({value:t})=>{const c=(t==null?void 0:t.style)||"medium",o={small:i.spacerSmall,medium:i.spacerMedium,large:i.spacerLarge};return e.jsx("span",{className:o[c]??i.spacerMedium})},table:({value:t})=>{var N,$;if(!((N=t==null?void 0:t.rows)!=null&&N.length))return null;const{hasHeadingRow:c}=t,o=c?t.rows[0]:null,h=c?t.rows.slice(1):t.rows,m=o||h[0];if(!(($=m==null?void 0:m.cells)!=null&&$.length))return null;const f=m.cells.map((M,u)=>{var j;return{header:o?e.jsx(k.PortableText,{value:(j=o.cells[u])==null?void 0:j.content,components:q()}):`Column ${u+1}`,accessor:`col${u}`,cellRenderer:g=>g?e.jsx(k.PortableText,{value:g,components:q()}):null}}),T=h.map(M=>{var j;const u={};return(j=M.cells)==null||j.forEach((g,R)=>{u[`col${R}`]=g==null?void 0:g.content}),u});return e.jsx(B.Table,{hasHeadingRow:c,data:T,columns:f,className:`${s??""} ${c?"hasHeadingRow":""}`})},code:({value:t})=>t!=null&&t.code?e.jsxs("div",{className:`${i.codeBlockWrapper} ${s??""}`,children:[t.filename&&e.jsx("div",{className:i.codeFilename,children:t.filename}),e.jsx("pre",{className:i.codeBlock,children:e.jsx("code",{children:t.code})})]}):null}},p}const J=({blocks:s,className:n,textOverride:r,animateText:a})=>{const l=S.useMediaQuery("(max-width: 767px)"),x=y.useRef(r);y.useEffect(()=>{x.current=r},[r]);const d=y.useMemo(()=>G({baseClassName:n,previousTextRef:x,textOverride:r,animateText:a,isMobile:l}),[n,r,a,l]);return s?typeof s=="string"?e.jsx(L.Text,{className:n,children:s}):e.jsx("div",{className:`${i.container} portableTextContainer`,children:e.jsx(k.PortableText,{value:s,components:d})}):null};exports.RichText=J;
@@ -1,12 +1,12 @@
1
- import { jsx as r, jsxs as N, Fragment as S } from "react/jsx-runtime";
1
+ import { jsx as r, jsxs as T, Fragment as S } from "react/jsx-runtime";
2
2
  import z, { useRef as F, useEffect as I, useMemo as W } from "react";
3
- import { PortableText as $ } from "@portabletext/react";
3
+ import { PortableText as N } from "@portabletext/react";
4
4
  import { AnimatedSpan as C } from "../AnimatedSpan/index.mjs";
5
5
  import '../../../index.css';import '../../../index11.css';/* empty css */
6
6
  import "../../../core/components/Avatar/index.mjs";
7
7
  import "../../../core/context/ModalContext.mjs";
8
8
  import "../../../core/components/Checkbox/index.mjs";
9
- import { Text as R } from "../../../core/components/Text/index.mjs";
9
+ import { Text as B } from "../../../core/components/Text/index.mjs";
10
10
  import { Heading as _ } from "../../../core/components/Heading/index.mjs";
11
11
  import "react-dom";
12
12
  import { Table as j } from "../../../core/components/Table/index.mjs";
@@ -14,7 +14,7 @@ import "../../../core/components/Tabs/index.mjs";
14
14
  import "../../../core/tokens/theme.mjs";
15
15
  import H from "next/image";
16
16
  import { useMediaQuery as U } from "../../hooks/useMediaQuery.mjs";
17
- const q = "_container_137s3_1", E = "_divider_137s3_15", b = "_richTextImage_137s3_33", A = "_richTextLink_137s3_41", P = "_spacerSmall_137s3_55", Q = "_spacerMedium_137s3_60", D = "_spacerLarge_137s3_65", G = "_codeBlock_137s3_93", J = "_codeBlockWrapper_137s3_102", K = "_codeFilename_137s3_114", i = {
17
+ const q = "_container_1glyt_1", E = "_divider_1glyt_32", b = "_richTextImage_1glyt_50", A = "_richTextLink_1glyt_58", P = "_spacerSmall_1glyt_72", Q = "_spacerMedium_1glyt_77", D = "_spacerLarge_1glyt_82", G = "_codeBlock_1glyt_110", J = "_codeBlockWrapper_1glyt_119", K = "_codeFilename_1glyt_131", i = {
18
18
  container: q,
19
19
  divider: E,
20
20
  richTextImage: b,
@@ -28,7 +28,7 @@ const q = "_container_137s3_1", E = "_divider_137s3_15", b = "_richTextImage_137
28
28
  };
29
29
  function X(e) {
30
30
  return {
31
- normal: ({ children: n }) => /* @__PURE__ */ r(R, { className: e, children: n }),
31
+ normal: ({ children: n }) => /* @__PURE__ */ r(B, { className: e, children: n }),
32
32
  h1: ({ children: n }) => /* @__PURE__ */ r(_, { className: e, level: 1, children: n }),
33
33
  h2: ({ children: n }) => /* @__PURE__ */ r(_, { className: e, level: 2, children: n }),
34
34
  h3: ({ children: n }) => /* @__PURE__ */ r(_, { className: e, level: 3, children: n }),
@@ -47,89 +47,89 @@ const Y = {
47
47
  right: ({ children: e }) => /* @__PURE__ */ r("span", { className: "textRight", children: e }),
48
48
  inlineCode: ({ children: e }) => /* @__PURE__ */ r("code", { children: e }),
49
49
  link: ({ children: e, value: n }) => {
50
- var h;
51
- const { linkType: s, internalUrl: a, externalUrl: m, blank: d } = n ?? {};
52
- let l = "#";
53
- return s === "external" && m ? l = m : s === "internal" && ((h = a == null ? void 0 : a.slug) != null && h.current) && (l = `/${a.slug.current}`), /* @__PURE__ */ r(
50
+ var g;
51
+ const { linkType: o, internalUrl: l, externalUrl: a, blank: d } = n ?? {};
52
+ let m = "#";
53
+ return o === "external" && a ? m = a : o === "internal" && ((g = l == null ? void 0 : l.slug) != null && g.current) && (m = `/${l.slug.current}`), /* @__PURE__ */ r(
54
54
  "a",
55
55
  {
56
- href: l,
56
+ href: m,
57
57
  target: d ? "_blank" : void 0,
58
- rel: s === "external" ? "noopener noreferrer" : void 0,
58
+ rel: o === "external" ? "noopener noreferrer" : void 0,
59
59
  className: i.richTextLink,
60
60
  children: e
61
61
  }
62
62
  );
63
63
  },
64
64
  textSize: ({ children: e, value: n }) => {
65
- const s = n != null && n.size ? `text-${n.size}` : "";
66
- return /* @__PURE__ */ r("span", { className: s, children: e });
65
+ const o = n != null && n.size ? `text-${n.size}` : "";
66
+ return /* @__PURE__ */ r("span", { className: o, children: e });
67
67
  }
68
68
  };
69
69
  function Z({
70
70
  baseClassName: e,
71
71
  previousTextRef: n,
72
- textOverride: s,
73
- animateText: a,
74
- isMobile: m
72
+ textOverride: o,
73
+ animateText: l,
74
+ isMobile: a
75
75
  }) {
76
76
  const d = ({
77
77
  children: t,
78
- value: o
78
+ value: s
79
79
  }) => {
80
- if (!o) return /* @__PURE__ */ r(S, { children: t });
81
- const { colorClass: c } = o;
82
- return s ? a ? /* @__PURE__ */ r(
80
+ if (!s) return /* @__PURE__ */ r(S, { children: t });
81
+ const { colorClass: c } = s;
82
+ return o ? l ? /* @__PURE__ */ r(
83
83
  C,
84
84
  {
85
85
  className: c,
86
- text: s,
86
+ text: o,
87
87
  prevText: n.current
88
88
  },
89
89
  "animated-span"
90
- ) : /* @__PURE__ */ r("span", { className: c, children: s }) : /* @__PURE__ */ r("span", { className: c, children: t });
91
- }, l = ({ children: t = [] }) => {
92
- const o = z.Children.count(t);
90
+ ) : /* @__PURE__ */ r("span", { className: c, children: o }) : /* @__PURE__ */ r("span", { className: c, children: t });
91
+ }, m = ({ children: t = [] }) => {
92
+ const s = z.Children.count(t);
93
93
  return /* @__PURE__ */ r(
94
94
  "ul",
95
95
  {
96
- style: { columnCount: m ? 1 : o > 7 ? 2 : 1 },
96
+ style: { columnCount: a ? 1 : s > 7 ? 2 : 1 },
97
97
  className: e,
98
98
  children: t
99
99
  }
100
100
  );
101
101
  };
102
- let h;
103
- const L = () => h;
104
- return h = {
102
+ let g;
103
+ const $ = () => g;
104
+ return g = {
105
105
  marks: {
106
106
  ...Y,
107
107
  coloredText: d
108
108
  },
109
109
  block: X(e),
110
110
  list: {
111
- bullet: l
111
+ bullet: m
112
112
  },
113
113
  types: {
114
114
  // ── Inline image ────────────────────────────────────────────────────
115
115
  image: ({ value: t }) => {
116
- var c, u, p, k, T;
116
+ var c, u, p, k, y;
117
117
  if (!(t != null && t.imageUrls)) return null;
118
- const o = ((c = t.asset) == null ? void 0 : c.altText) || "Content image";
119
- return /* @__PURE__ */ N("figure", { className: `${e ?? ""} ${i.richTextImage}`, children: [
118
+ const s = ((c = t.asset) == null ? void 0 : c.altText) || "Content image";
119
+ return /* @__PURE__ */ T("figure", { className: `${e ?? ""} ${i.richTextImage}`, children: [
120
120
  /* @__PURE__ */ r(
121
121
  H,
122
122
  {
123
123
  src: t.imageUrls.medium,
124
- alt: o,
124
+ alt: s,
125
125
  width: 1e3,
126
126
  height: 800,
127
127
  style: { maxWidth: "100%", height: "auto" }
128
128
  }
129
129
  ),
130
- (((u = t.asset) == null ? void 0 : u.title) || ((p = t.asset) == null ? void 0 : p.description)) && /* @__PURE__ */ N("figcaption", { children: [
130
+ (((u = t.asset) == null ? void 0 : u.title) || ((p = t.asset) == null ? void 0 : p.description)) && /* @__PURE__ */ T("figcaption", { children: [
131
131
  ((k = t.asset) == null ? void 0 : k.title) && /* @__PURE__ */ r("strong", { children: t.asset.title }),
132
- ((T = t.asset) == null ? void 0 : T.description) && /* @__PURE__ */ r("p", { children: t.asset.description })
132
+ ((y = t.asset) == null ? void 0 : y.description) && /* @__PURE__ */ r("p", { children: t.asset.description })
133
133
  ] })
134
134
  ] });
135
135
  },
@@ -137,87 +137,87 @@ function Z({
137
137
  divider: () => /* @__PURE__ */ r("hr", { className: i.divider }),
138
138
  // ── Spacer ──────────────────────────────────────────────────────────
139
139
  spacer: ({ value: t }) => {
140
- const o = (t == null ? void 0 : t.style) || "medium", c = {
140
+ const s = (t == null ? void 0 : t.style) || "medium", c = {
141
141
  small: i.spacerSmall,
142
142
  medium: i.spacerMedium,
143
143
  large: i.spacerLarge
144
144
  };
145
- return /* @__PURE__ */ r("span", { className: c[o] ?? i.spacerMedium });
145
+ return /* @__PURE__ */ r("span", { className: c[s] ?? i.spacerMedium });
146
146
  },
147
147
  // ── Table ────────────────────────────────────────────────────────────
148
148
  table: ({ value: t }) => {
149
- var M, w;
150
- if (!((M = t == null ? void 0 : t.rows) != null && M.length)) return null;
151
- const { hasHeadingRow: o } = t, c = o ? t.rows[0] : null, u = o ? t.rows.slice(1) : t.rows, p = c || u[0];
152
- if (!((w = p == null ? void 0 : p.cells) != null && w.length)) return null;
153
- const k = p.cells.map((B, f) => {
149
+ var L, M;
150
+ if (!((L = t == null ? void 0 : t.rows) != null && L.length)) return null;
151
+ const { hasHeadingRow: s } = t, c = s ? t.rows[0] : null, u = s ? t.rows.slice(1) : t.rows, p = c || u[0];
152
+ if (!((M = p == null ? void 0 : p.cells) != null && M.length)) return null;
153
+ const k = p.cells.map((w, h) => {
154
154
  var x;
155
155
  return {
156
156
  header: c ? /* @__PURE__ */ r(
157
- $,
157
+ N,
158
158
  {
159
- value: (x = c.cells[f]) == null ? void 0 : x.content,
160
- components: L()
159
+ value: (x = c.cells[h]) == null ? void 0 : x.content,
160
+ components: $()
161
161
  }
162
- ) : `Column ${f + 1}`,
163
- accessor: `col${f}`,
164
- cellRenderer: (g) => g ? /* @__PURE__ */ r(
165
- $,
162
+ ) : `Column ${h + 1}`,
163
+ accessor: `col${h}`,
164
+ cellRenderer: (f) => f ? /* @__PURE__ */ r(
165
+ N,
166
166
  {
167
- value: g,
168
- components: L()
167
+ value: f,
168
+ components: $()
169
169
  }
170
170
  ) : null
171
171
  };
172
- }), T = u.map((B) => {
172
+ }), y = u.map((w) => {
173
173
  var x;
174
- const f = {};
175
- return (x = B.cells) == null || x.forEach((g, y) => {
176
- f[`col${y}`] = g == null ? void 0 : g.content;
177
- }), f;
174
+ const h = {};
175
+ return (x = w.cells) == null || x.forEach((f, R) => {
176
+ h[`col${R}`] = f == null ? void 0 : f.content;
177
+ }), h;
178
178
  });
179
179
  return /* @__PURE__ */ r(
180
180
  j,
181
181
  {
182
- hasHeadingRow: o,
183
- data: T,
182
+ hasHeadingRow: s,
183
+ data: y,
184
184
  columns: k,
185
- className: `${e ?? ""} ${o ? "hasHeadingRow" : ""}`
185
+ className: `${e ?? ""} ${s ? "hasHeadingRow" : ""}`
186
186
  }
187
187
  );
188
188
  },
189
189
  // ── Code block ──────────────────────────────────────────────────────
190
- code: ({ value: t }) => t != null && t.code ? /* @__PURE__ */ N("div", { className: `${i.codeBlockWrapper} ${e ?? ""}`, children: [
190
+ code: ({ value: t }) => t != null && t.code ? /* @__PURE__ */ T("div", { className: `${i.codeBlockWrapper} ${e ?? ""}`, children: [
191
191
  t.filename && /* @__PURE__ */ r("div", { className: i.codeFilename, children: t.filename }),
192
192
  /* @__PURE__ */ r("pre", { className: i.codeBlock, children: /* @__PURE__ */ r("code", { children: t.code }) })
193
193
  ] }) : null
194
194
  }
195
- }, h;
195
+ }, g;
196
196
  }
197
- const he = ({
197
+ const ge = ({
198
198
  blocks: e,
199
199
  className: n,
200
- textOverride: s,
201
- animateText: a
200
+ textOverride: o,
201
+ animateText: l
202
202
  }) => {
203
- const m = U("(max-width: 767px)"), d = F(s);
203
+ const a = U("(max-width: 767px)"), d = F(o);
204
204
  I(() => {
205
- d.current = s;
206
- }, [s]);
207
- const l = W(
205
+ d.current = o;
206
+ }, [o]);
207
+ const m = W(
208
208
  () => Z({
209
209
  baseClassName: n,
210
210
  previousTextRef: d,
211
- textOverride: s,
212
- animateText: a,
213
- isMobile: m
211
+ textOverride: o,
212
+ animateText: l,
213
+ isMobile: a
214
214
  }),
215
215
  // previousTextRef intentionally omitted — it's a stable ref object.
216
216
  // eslint-disable-next-line react-hooks/exhaustive-deps
217
- [n, s, a, m]
217
+ [n, o, l, a]
218
218
  );
219
- return e ? typeof e == "string" ? /* @__PURE__ */ r(R, { className: n, children: e }) : /* @__PURE__ */ r("div", { className: `${i.container} portableTextContainer`, children: /* @__PURE__ */ r($, { value: e, components: l }) }) : null;
219
+ return e ? typeof e == "string" ? /* @__PURE__ */ r(B, { className: n, children: e }) : /* @__PURE__ */ r("div", { className: `${i.container} portableTextContainer`, children: /* @__PURE__ */ r(N, { value: e, components: m }) }) : null;
220
220
  };
221
221
  export {
222
- he as RichText
222
+ ge as RichText
223
223
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "quirk-ui",
3
3
  "private": false,
4
- "version": "0.1.178",
4
+ "version": "0.1.179",
5
5
  "type": "module",
6
6
  "exports": {
7
7
  ".": {