@deckai/deck-ui 0.0.23 → 0.0.25
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/components/AboutCard.cjs +5 -5
- package/dist/components/AboutCard.cjs.map +1 -1
- package/dist/components/AboutCard.js +5 -5
- package/dist/components/AboutCard.js.map +1 -1
- package/dist/components/Accordion.cjs +1 -1
- package/dist/components/Accordion.cjs.map +1 -1
- package/dist/components/Accordion.js +1 -1
- package/dist/components/Accordion.js.map +1 -1
- package/dist/components/AddWorkCard.cjs +5 -5
- package/dist/components/AddWorkCard.cjs.map +1 -1
- package/dist/components/AddWorkCard.js +5 -5
- package/dist/components/AddWorkCard.js.map +1 -1
- package/dist/components/AutocompleteInput.cjs +6 -6
- package/dist/components/AutocompleteInput.cjs.map +1 -1
- package/dist/components/AutocompleteInput.d.cts +1 -1
- package/dist/components/AutocompleteInput.d.ts +1 -1
- package/dist/components/AutocompleteInput.js +6 -6
- package/dist/components/AutocompleteInput.js.map +1 -1
- package/dist/components/Avatar.cjs +1 -1
- package/dist/components/Avatar.cjs.map +1 -1
- package/dist/components/Avatar.js +1 -1
- package/dist/components/Avatar.js.map +1 -1
- package/dist/components/Badge.cjs +2 -2
- package/dist/components/Badge.cjs.map +1 -1
- package/dist/components/Badge.d.cts +1 -1
- package/dist/components/Badge.d.ts +1 -1
- package/dist/components/Badge.js +2 -2
- package/dist/components/Badge.js.map +1 -1
- package/dist/components/Breadcrumbs.cjs +2 -2
- package/dist/components/Breadcrumbs.cjs.map +1 -1
- package/dist/components/Breadcrumbs.js +2 -2
- package/dist/components/Breadcrumbs.js.map +1 -1
- package/dist/components/Button.cjs +6 -6
- package/dist/components/Button.cjs.map +1 -1
- package/dist/components/Button.d.cts +5 -0
- package/dist/components/Button.d.ts +5 -0
- package/dist/components/Button.js +6 -6
- package/dist/components/Button.js.map +1 -1
- package/dist/components/Carousel.cjs +1 -1
- package/dist/components/Carousel.cjs.map +1 -1
- package/dist/components/Carousel.d.cts +3 -1
- package/dist/components/Carousel.d.ts +3 -1
- package/dist/components/Carousel.js +1 -1
- package/dist/components/Carousel.js.map +1 -1
- package/dist/components/Collapsible.cjs +5 -5
- package/dist/components/Collapsible.cjs.map +1 -1
- package/dist/components/Collapsible.js +5 -5
- package/dist/components/Collapsible.js.map +1 -1
- package/dist/components/Combobox.cjs +3 -3
- package/dist/components/Combobox.cjs.map +1 -1
- package/dist/components/Combobox.d.cts +2 -1
- package/dist/components/Combobox.d.ts +2 -1
- package/dist/components/Combobox.js +3 -3
- package/dist/components/Combobox.js.map +1 -1
- package/dist/components/ContactItem.cjs +2 -2
- package/dist/components/ContactItem.cjs.map +1 -1
- package/dist/components/ContactItem.js +2 -2
- package/dist/components/ContactItem.js.map +1 -1
- package/dist/components/CreatorCard.cjs +8 -0
- package/dist/components/CreatorCard.cjs.map +1 -0
- package/dist/components/CreatorCard.d.cts +33 -0
- package/dist/components/CreatorCard.d.ts +33 -0
- package/dist/components/CreatorCard.js +8 -0
- package/dist/components/CreatorCard.js.map +1 -0
- package/dist/components/Dropdown.cjs +2 -2
- package/dist/components/Dropdown.cjs.map +1 -1
- package/dist/components/Dropdown.js +2 -2
- package/dist/components/Dropdown.js.map +1 -1
- package/dist/components/EditButton.cjs +4 -4
- package/dist/components/EditButton.cjs.map +1 -1
- package/dist/components/EditButton.js +4 -4
- package/dist/components/EditButton.js.map +1 -1
- package/dist/components/Hero.cjs +8 -0
- package/dist/components/Hero.cjs.map +1 -0
- package/dist/components/Hero.d.cts +19 -0
- package/dist/components/Hero.d.ts +19 -0
- package/dist/components/Hero.js +8 -0
- package/dist/components/Hero.js.map +1 -0
- package/dist/components/Icon.cjs +1 -1
- package/dist/components/Icon.cjs.map +1 -1
- package/dist/components/Icon.d.cts +1 -1
- package/dist/components/Icon.d.ts +1 -1
- package/dist/components/Icon.js +1 -1
- package/dist/components/Icon.js.map +1 -1
- package/dist/components/IconRenderer.cjs +1 -1
- package/dist/components/IconRenderer.cjs.map +1 -1
- package/dist/components/IconRenderer.js +1 -1
- package/dist/components/IconRenderer.js.map +1 -1
- package/dist/components/Input.cjs +2 -2
- package/dist/components/Input.cjs.map +1 -1
- package/dist/components/Input.d.cts +2 -2
- package/dist/components/Input.d.ts +2 -2
- package/dist/components/Input.js +2 -2
- package/dist/components/Input.js.map +1 -1
- package/dist/components/Link.cjs +1 -1
- package/dist/components/Link.cjs.map +1 -1
- package/dist/components/Link.d.cts +1 -1
- package/dist/components/Link.d.ts +1 -1
- package/dist/components/Link.js +1 -1
- package/dist/components/Link.js.map +1 -1
- package/dist/components/Modal.cjs +1 -1
- package/dist/components/Modal.cjs.map +1 -1
- package/dist/components/Modal.js +1 -1
- package/dist/components/Modal.js.map +1 -1
- package/dist/components/MultiSelectCombobox.cjs +2 -2
- package/dist/components/MultiSelectCombobox.cjs.map +1 -1
- package/dist/components/MultiSelectCombobox.js +2 -2
- package/dist/components/MultiSelectCombobox.js.map +1 -1
- package/dist/components/Navbar.cjs +14 -6
- package/dist/components/Navbar.cjs.map +1 -1
- package/dist/components/Navbar.d.cts +4 -2
- package/dist/components/Navbar.d.ts +4 -2
- package/dist/components/Navbar.js +14 -6
- package/dist/components/Navbar.js.map +1 -1
- package/dist/components/NavbarItem.cjs +3 -3
- package/dist/components/NavbarItem.cjs.map +1 -1
- package/dist/components/NavbarItem.d.cts +1 -1
- package/dist/components/NavbarItem.d.ts +1 -1
- package/dist/components/NavbarItem.js +3 -3
- package/dist/components/NavbarItem.js.map +1 -1
- package/dist/components/Option.cjs +3 -3
- package/dist/components/Option.cjs.map +1 -1
- package/dist/components/Option.js +3 -3
- package/dist/components/Option.js.map +1 -1
- package/dist/components/ProfileCard.cjs +2 -2
- package/dist/components/ProfileCard.cjs.map +1 -1
- package/dist/components/ProfileCard.js +2 -2
- package/dist/components/ProfileCard.js.map +1 -1
- package/dist/components/ProgressBar.cjs.map +1 -1
- package/dist/components/ProgressBar.js.map +1 -1
- package/dist/components/RadioGroup.cjs +2 -2
- package/dist/components/RadioGroup.cjs.map +1 -1
- package/dist/components/RadioGroup.js +2 -2
- package/dist/components/RadioGroup.js.map +1 -1
- package/dist/components/SegmentedTabs.cjs +6 -6
- package/dist/components/SegmentedTabs.cjs.map +1 -1
- package/dist/components/SegmentedTabs.js +6 -6
- package/dist/components/SegmentedTabs.js.map +1 -1
- package/dist/components/Sidebar.cjs +1 -1
- package/dist/components/Sidebar.cjs.map +1 -1
- package/dist/components/Sidebar.js +1 -1
- package/dist/components/Sidebar.js.map +1 -1
- package/dist/components/SlideButton.cjs.map +1 -1
- package/dist/components/SlideButton.js.map +1 -1
- package/dist/components/SocialCard.cjs +4 -4
- package/dist/components/SocialCard.cjs.map +1 -1
- package/dist/components/SocialCard.js +4 -4
- package/dist/components/SocialCard.js.map +1 -1
- package/dist/components/Tabs.cjs +5 -5
- package/dist/components/Tabs.cjs.map +1 -1
- package/dist/components/Tabs.js +5 -5
- package/dist/components/Tabs.js.map +1 -1
- package/dist/components/Tag.cjs +4 -4
- package/dist/components/Tag.cjs.map +1 -1
- package/dist/components/Tag.js +4 -4
- package/dist/components/Tag.js.map +1 -1
- package/dist/components/Text.cjs +3 -3
- package/dist/components/Text.cjs.map +1 -1
- package/dist/components/Text.d.cts +3 -3
- package/dist/components/Text.d.ts +3 -3
- package/dist/components/Text.js +3 -3
- package/dist/components/Text.js.map +1 -1
- package/dist/components/TextArea.cjs +2 -2
- package/dist/components/TextArea.cjs.map +1 -1
- package/dist/components/TextArea.js +2 -2
- package/dist/components/TextArea.js.map +1 -1
- package/dist/components/Toast.cjs +5 -5
- package/dist/components/Toast.cjs.map +1 -1
- package/dist/components/Toast.d.cts +4 -1
- package/dist/components/Toast.d.ts +4 -1
- package/dist/components/Toast.js +5 -5
- package/dist/components/Toast.js.map +1 -1
- package/dist/components/Tooltip.cjs +3 -3
- package/dist/components/Tooltip.cjs.map +1 -1
- package/dist/components/Tooltip.js +3 -3
- package/dist/components/Tooltip.js.map +1 -1
- package/dist/components/VideoPlayer.cjs +2 -2
- package/dist/components/VideoPlayer.cjs.map +1 -1
- package/dist/components/VideoPlayer.js +2 -2
- package/dist/components/VideoPlayer.js.map +1 -1
- package/dist/components/WorkCard.cjs +4 -4
- package/dist/components/WorkCard.cjs.map +1 -1
- package/dist/components/WorkCard.js +4 -4
- package/dist/components/WorkCard.js.map +1 -1
- package/dist/index.cjs +6 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +6 -6
- package/dist/index.js.map +1 -1
- package/dist/styles/styles.css +1 -1
- package/dist/styles/styles.css.map +1 -1
- package/dist/tailwind-D0Cc0jDS.d.cts +38 -0
- package/dist/tailwind-D0Cc0jDS.d.ts +38 -0
- package/dist/tailwind-DIVT5G0q.d.cts +38 -0
- package/dist/tailwind-DIVT5G0q.d.ts +38 -0
- package/package.json +6 -8
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
'use strict';var l=require('react'),clsx=require('clsx'),tailwindMerge=require('tailwind-merge'),icons=require('@deckai/icons');function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var l__namespace=/*#__PURE__*/_interopNamespace(l);function m(...e){return tailwindMerge.twMerge(clsx.clsx(e))}var P={12:"h-[12px] w-[12px]",16:"h-[16px] w-[16px]",18:"h-[18px] w-[18px]",20:"h-[20px] w-[20px]",24:"h-[24px] w-[24px]",32:"h-[32px] w-[32px]",36:"h-[36px] w-[36px]",40:"h-[40px] w-[40px]",42:"h-[42px] w-[42px]",48:"h-[48px] w-[48px]",64:"h-[64px] w-[64px]",72:"h-[72px] w-[72px]",80:"h-[80px] w-[80px]"},F={sm:{12:"sm:h-[12px] sm:w-[12px]",16:"sm:h-[16px] sm:w-[16px]",18:"sm:h-[18px] sm:w-[18px]",20:"sm:h-[20px] sm:w-[20px]",24:"sm:h-[24px] sm:w-[24px]",32:"sm:h-[32px] sm:w-[32px]",36:"sm:h-[36px] sm:w-[36px]",40:"sm:h-[40px] sm:w-[40px]",42:"sm:h-[42px] sm:w-[42px]",48:"sm:h-[48px] sm:w-[48px]",64:"sm:h-[64px] sm:w-[64px]",72:"sm:h-[72px] sm:w-[72px]",80:"sm:h-[80px] sm:w-[80px]"},md:{12:"md:h-[12px] md:w-[12px]",16:"md:h-[16px] md:w-[16px]",18:"md:h-[18px] md:w-[18px]",20:"md:h-[20px] md:w-[20px]",24:"md:h-[24px] md:w-[24px]",32:"md:h-[32px] md:w-[32px]",36:"md:h-[36px] md:w-[36px]",40:"md:h-[40px] md:w-[40px]",42:"md:h-[42px] md:w-[42px]",48:"md:h-[48px] md:w-[48px]",64:"md:h-[64px] md:w-[64px]",72:"md:h-[72px] md:w-[72px]",80:"md:h-[80px] md:w-[80px]"},lg:{12:"lg:h-[12px] lg:w-[12px]",16:"lg:h-[16px] lg:w-[16px]",18:"lg:h-[18px] lg:w-[18px]",20:"lg:h-[20px] lg:w-[20px]",24:"lg:h-[24px] lg:w-[24px]",32:"lg:h-[32px] lg:w-[32px]",36:"lg:h-[36px] lg:w-[36px]",40:"lg:h-[40px] lg:w-[40px]",42:"lg:h-[42px] lg:w-[42px]",48:"lg:h-[48px] lg:w-[48px]",64:"lg:h-[64px] lg:w-[64px]",72:"lg:h-[72px] lg:w-[72px]",80:"lg:h-[80px] lg:w-[80px]"},xl:{12:"xl:h-[12px] xl:w-[12px]",16:"xl:h-[16px] xl:w-[16px]",18:"xl:h-[18px] xl:w-[18px]",20:"xl:h-[20px] xl:w-[20px]",24:"xl:h-[24px] xl:w-[24px]",32:"xl:h-[32px] xl:w-[32px]",36:"xl:h-[36px] xl:w-[36px]",40:"xl:h-[40px] xl:w-[40px]",42:"xl:h-[42px] xl:w-[42px]",48:"xl:h-[48px] xl:w-[48px]",64:"xl:h-[64px] xl:w-[64px]",72:"xl:h-[72px] xl:w-[72px]",80:"xl:h-[80px] xl:w-[80px]"},"2xl":{12:"2xl:h-[12px] 2xl:w-[12px]",16:"2xl:h-[16px] 2xl:w-[16px]",18:"2xl:h-[18px] 2xl:w-[18px]",20:"2xl:h-[20px] 2xl:w-[20px]",24:"2xl:h-[24px] 2xl:w-[24px]",32:"2xl:h-[32px] 2xl:w-[32px]",36:"2xl:h-[36px] 2xl:w-[36px]",40:"2xl:h-[40px] 2xl:w-[40px]",42:"2xl:h-[42px] 2xl:w-[42px]",48:"2xl:h-[48px] 2xl:w-[48px]",64:"2xl:h-[64px] 2xl:w-[64px]",72:"2xl:h-[72px] 2xl:w-[72px]",80:"2xl:h-[80px] 2xl:w-[80px]"}},v=e=>String(e),j=(e,r=24)=>{let o=[],t={};if(e===void 0){let n=v(r);n?o.push(P[n]):(t.height=`${r}px`,t.width=`${r}px`);}if(typeof e=="number"){let n=v(e);n?o.push(P[n]):(t.height=`${e}px`,t.width=`${e}px`);}if(Array.isArray(e)){let n=v(r),p=[n&&P[n]||`h-[${r}px] w-[${r}px]`];e.forEach(a=>{if(typeof a=="string"){let[s,x]=a.split(":"),i=parseInt(x,10),c=v(i);o.push(c&&F[s]?.[c]||`${s}:h-[${i}px] ${s}:w-[${i}px]`);}}),o.push(...p);}if(typeof e=="string"){let[n,p]=e.split(":"),a=parseInt(p,10),s=v(a);o.push(s&&F[n]?.[s]||`${n}:h-[${a}px] ${n}:w-[${a}px]`);}return {responsiveSizeClasses:o.join(" "),responsiveSizeStyles:t}};var K={primary:"var(--color-primary)",secondary:"var(--color-secondary)",white:"var(--color-white)",primaryBlue:"var(--color-primary-100)",disabled:"var(--color-disabled)",danger:"var(--color-danger)",tertiary:"var(--color-tertiary-20)"},w=l__namespace.default.forwardRef(({name:e,size:r=24,color:o="primary",title:t,className:n,style:p={},...a},s)=>{let x=icons.IconMap[e],{responsiveSizeClasses:i,responsiveSizeStyles:c}=j(r,24);return l__namespace.default.createElement("div",{className:m("flex justify-center items-center",i,n),style:{"--icon-stroke":K[o],...c,...p}},l__namespace.default.createElement(x,{ref:s,"aria-hidden":!t,"aria-label":t,stroke:e.includes("filled")?void 0:K[o],...a}))});w.displayName="Icon";var ee={xl:"h1",lg:"h1",md:"h2",sm:"h3",xs:"h4"},te=e=>{let[r,o]=e.split("-");return r==="heading"?ee[o]||"p":r==="label"?"label":"p"},re={light:"font-light",regular:"font-regular",semibold:"font-semibold",bold:"font-bold"},oe=e=>e?(Array.isArray(e)?e:[e]).map(o=>{if(o.includes(":")){let[t,n]=o.split(":");return `${t}:text-${n}`}return `text-${o}`}).join(" "):"text-body-default",g=l__namespace.default.forwardRef(({variant:e="body-default",color:r="primary",as:o,className:t,children:n,weight:p,...a},s)=>{let x=oe(e),i=r==="inherit"?"text-inherit":`text-${r}`,c=l__namespace.default.useMemo(()=>{let h=typeof e=="string"?e.split(":").pop():Array.isArray(e)?e[0].split(":").pop():"body-default";return te(h)},[e]);return l__namespace.default.createElement(o||c,{ref:s,className:`
|
|
2
|
+
font-sans antialiased
|
|
3
|
+
${x}
|
|
4
|
+
${i}
|
|
5
|
+
${p&&`!${re[p]}`}
|
|
6
|
+
${t}
|
|
7
|
+
`,...a},n)});g.displayName="Text";var O={pink:"bg-tertiary-5",orange:"bg-tertiary-15",green:"bg-tertiary-25",purple:"bg-secondary-300"},se=e=>{let r=Object.keys(O),o=e.split("").reduce((p,a)=>a.charCodeAt(0)+((p<<5)-p),0),t=Math.abs(o)%r.length;return r[t]},k=l__namespace.forwardRef(({className:e,variant:r,iconName:o,children:t,...n},p)=>{let a=r||(typeof t=="string"?se(t):"pink");return l__namespace.createElement("span",{ref:p,className:m("inline-flex items-center gap-2","rounded px-2 py-1.5","text-sm font-medium",O[a],e),...n},o&&l__namespace.createElement(w,{size:16,name:o}),l__namespace.createElement(g,{variant:"body-xxs-semibold",className:"mt-0.5"},t))});k.displayName="Badge";var z={sm:"h-4",md:"h-6",lg:"h-8"},ne={sm:"w-20",md:"w-32",lg:"w-48"},R={sm:"w-8 h-8",md:"w-12 h-12",lg:"w-16 h-16"},V=l__namespace.default.forwardRef(({variant:e="text",size:r="md",lines:o=1,className:t,animate:n=true},p)=>{let a="bg-secondary-50 rounded-lg overflow-hidden",s=n?"animate-pulse":"",i=typeof r=="number"?(u=>({height:`${u}px`,width:e==="avatar"||e==="image"?`${u}px`:void 0}))(r):void 0,c=()=>{switch(e){case "text":return l__namespace.default.createElement("div",{className:"flex flex-col gap-2"},Array.from({length:o}).map((u,h)=>l__namespace.default.createElement("div",{key:h,style:i,className:m(a,s,typeof r=="string"?z[r]:void 0,h===o-1&&o>1?"w-3/4":"w-full",t)})));case "image":return l__namespace.default.createElement("div",{style:i,className:m(a,s,(!i||!t)&&"aspect-square w-full max-w-[300px]",t)});case "button":return l__namespace.default.createElement("div",{style:i,className:m(a,s,typeof r=="string"&&[z[r],ne[r]],t)});case "card":return l__namespace.default.createElement("div",{className:m("flex flex-col gap-4 p-6 border border-stroke rounded-xl",t)},l__namespace.default.createElement("div",{className:m(a,s,"w-16 h-16 rounded-full")}),l__namespace.default.createElement("div",{className:"space-y-2"},l__namespace.default.createElement("div",{className:m(a,s,"h-6 w-3/4")}),l__namespace.default.createElement("div",{className:m(a,s,"h-4 w-1/2")})),l__namespace.default.createElement("div",{className:"space-y-2"},l__namespace.default.createElement("div",{className:m(a,s,"h-4 w-full")}),l__namespace.default.createElement("div",{className:m(a,s,"h-4 w-full")}),l__namespace.default.createElement("div",{className:m(a,s,"h-4 w-2/3")})));case "avatar":return l__namespace.default.createElement("div",{style:i,className:m(a,s,"rounded-full",{[R.sm]:r==="sm",[R.md]:r==="md",[R.lg]:r==="lg"},t)});default:return null}};return l__namespace.default.createElement("div",{ref:p,className:m("w-full",t)},c())});V.displayName="Fallback";var W="focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-100";var b=l__namespace.default.forwardRef(({children:e,type:r="button",className:o,disabled:t,...n},p)=>l__namespace.default.createElement("button",{ref:p,type:r,disabled:t,className:m("appearance-none hover:opacity-80 transition-all active:scale-95",W,t&&"opacity-50 cursor-not-allowed",o),...n},e));b.displayName="Pressable";function B({children:e,color:r="primary",className:o,onClose:t,...n}){let[p,a]=l.useState(false),s=l.useCallback(()=>{a(true);},[]),x=l.useCallback(()=>{a(false);},[]),i=l__namespace.default.createElement("div",{className:m("flex gap-2",t?"justify-between items-center max-w-fit":"items-center justify-center","hover:bg-primary-100 rounded bg-secondary-400 px-2 py-1 sm:px-3 sm:py-1.5 h-min hover:text-white",r==="primary"?"text-primary-100":"text-primary",o),onMouseEnter:s,onMouseLeave:x},typeof e=="string"?l__namespace.default.createElement(g,{color:"inherit",variant:["md:body-default-medium","body-xxs-medium"],className:"truncate pt-0.5"},e):e,t&&l__namespace.default.createElement(b,{...n,onClick:t,className:"flex items-center justify-center"},l__namespace.default.createElement(w,{name:"close",size:12,color:p?"white":"primaryBlue"})));return t?i:l__namespace.default.createElement(b,{...n},i)}var Q=()=>{let e=l.useRef(null),r=l.useRef([]),[o,t]=l.useState(0),n=l.useCallback(s=>x=>{r.current[s]=x;},[]),p=l.useCallback(s=>{if(!e.current||s===0)return;let x=e.current.offsetWidth,i=0,c=0;r.current=r.current.slice(0,s);for(let u=0;u<r.current.length;u++){let h=r.current[u];if(!h)continue;let E=window.getComputedStyle(h),H=h.offsetWidth+parseFloat(E.marginLeft||"0")+parseFloat(E.marginRight||"0");if(u<s-1&&x-i-60<H)break;if(i+=H,c++,i>x){c=Math.max(0,c-1);break}}t(Math.max(1,c));},[]),a=l.useCallback(s=>{if(t(s),s===0)return ()=>{};let x=setTimeout(()=>p(s),100),i=()=>p(s);return window.addEventListener("resize",i),()=>{clearTimeout(x),window.removeEventListener("resize",i);}},[p]);return {containerRef:e,setItemRef:n,visibleItemsCount:o,setupTruncation:a}};function De({name:e,profileImage:r,tags:o,badges:t,rating:n,reviewCount:p,onClick:a,className:s,isLoading:x,isFavorited:i=false,onFavoriteClick:c}){let u=l.useCallback(f=>{f.stopPropagation(),c?.(f);},[c]),h=n?n.toFixed(1).replace(/\.0$/,""):void 0,{containerRef:E,setItemRef:H,visibleItemsCount:L,setupTruncation:$}=Q(),{containerRef:U,setItemRef:Z,visibleItemsCount:S,setupTruncation:N}=Q();return l.useLayoutEffect(()=>{let f=$(o?.length||0),y=setTimeout(()=>{o&&o.length>0&&$(o.length);},200);return ()=>{f(),clearTimeout(y);}},[o,$]),l.useLayoutEffect(()=>{let f=N(t?.length||0),y=setTimeout(()=>{t&&t.length>0&&N(t.length);},200);return ()=>{f(),clearTimeout(y);}},[t,N]),l__namespace.default.createElement(b,{onClick:a},l__namespace.default.createElement("div",{className:m("relative bg-background-0 rounded-xl overflow-hidden shadow-2xl max-w-[210px] md:max-w-[318px] max-h-[339px] md:max-h-[469px]",s)},x?l__namespace.default.createElement(V,{variant:"card",className:"w-full h-full"}):l__namespace.default.createElement(l__namespace.default.Fragment,null,l__namespace.default.createElement("div",{className:"relative aspect-square w-full bg-gray-200"},r&&l__namespace.default.createElement("img",{src:r,alt:e,className:"w-full h-full object-cover"}),l__namespace.default.createElement("div",{className:"absolute top-4 right-4"},l__namespace.default.createElement(b,{onClick:u,className:"rounded-full p-2"},l__namespace.default.createElement(w,{name:"heart",size:24,color:"white",style:{fill:i?"white":"none"}}))),t&&t.length>0&&l__namespace.default.createElement("div",{ref:U,className:"absolute bottom-4 left-4 flex gap-2 overflow-hidden max-w-[90%] flex-nowrap whitespace-nowrap"},t.slice(0,S).map((f,y)=>l__namespace.default.createElement("div",{key:y,ref:Z(y),className:"shrink-0"},l__namespace.default.createElement(k,{iconName:f.icon},f.label))),S<(t?.length||0)&&l__namespace.default.createElement("div",{className:"shrink-0"},l__namespace.default.createElement(k,null,"+",t.length-S)))),l__namespace.default.createElement("div",{className:"flex flex-col p-4 items-start"},l__namespace.default.createElement(g,{variant:["lg:heading-xs","body-default-semibold"]},e),h&&l__namespace.default.createElement("div",{className:"flex gap-1 items-center"},l__namespace.default.createElement(g,{variant:["lg:body-lg-semibold","body-default-semibold"]},h),l__namespace.default.createElement(w,{name:"star-filled",size:["lg:16",12],color:"tertiary"}),l__namespace.default.createElement(g,{variant:["lg:body-md","body-default-semibold"],color:"secondary",as:"span"},"(",p,")")),o&&o.length>0&&l__namespace.default.createElement("div",{ref:E,className:"flex flex-nowrap overflow-hidden gap-2 pt-4 w-full"},o.slice(0,L).map((f,y)=>l__namespace.default.createElement("div",{key:y,ref:H(y)},l__namespace.default.createElement(B,null,f))),L<(o?.length||0)&&l__namespace.default.createElement(B,null,"+",o.length-L))))))}exports.CreatorCard=De;//# sourceMappingURL=CreatorCard.cjs.map
|
|
8
|
+
//# sourceMappingURL=CreatorCard.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/utils/index.ts","../../src/utils/responsive.ts","../../src/components/Icon.tsx","../../src/components/Text.tsx","../../src/components/Badge.tsx","../../src/components/Fallback.tsx","../../src/components/Pressable.tsx","../../src/utils/tailwind.ts","../../src/components/Tag.tsx","../../src/components/CreatorCard.tsx"],"names":["cn","inputs","twMerge","clsx","BASE_SIZES","RESPONSIVE_SIZES","getSizeKey","size","getResponsiveSize","baseSize","classes","styles","key","baseKey","responsiveClasses","s","breakpoint","valueStr","value","valueKey","COLOR_MAP","Icon","React","name","color","title","className","style","props","ref","IconComponent","IconMap","responsiveSizeClasses","responsiveSizeStyles","HEADING_ELEMENT_MAP","getElementFromVariant","variant","category","fontWeight","processVariants","variants","typographyClass","Text","as","children","weight","typographyClasses","colorClasses","suggestedElement","baseVariant","stringToVariant","str","variantKeys","hash","acc","char","index","Badge","T","iconName","finalVariant","sizeMap","widthMap","avatarSizeMap","Fallback","lines","animate","baseClasses","animationClasses","customStyle","renderContent","_","focusRingStyles","Pressable","type","disabled","Tag","onClose","pressableProps","isHovered","setIsHovered","useState","handleMouseEnter","useCallback","handleMouseLeave","content","useTruncateItems","containerRef","useRef","itemRefs","visibleItemsCount","setVisibleItemsCount","setItemRef","el","calculateVisibleItems","itemsLength","containerWidth","totalWidth","visibleCount","i","itemElement","width","setupTruncation","timeoutId","handleResize","CreatorCard","profileImage","tags","badges","rating","reviewCount","onClick","isLoading","isFavorited","onFavoriteClick","handleFavoriteClick","e","formattedRating","tagsContainerRef","setTagRef","visibleTagsCount","setupTagsTruncation","badgesContainerRef","setBadgeRef","visibleBadgesCount","setupBadgesTruncation","useLayoutEffect","cleanup","forceUpdateTimeout","badge","tag"],"mappings":"seAGO,SAASA,CAAAA,CAAAA,GAAMC,CAAsB,CAAA,CAC1C,OAAOC,qBAAQC,CAAAA,SAAAA,CAAKF,CAAM,CAAC,CAC7B,CCcA,IAAMG,CAAsC,CAAA,CAC1C,EAAM,CAAA,mBAAA,CACN,GAAM,mBACN,CAAA,EAAA,CAAM,oBACN,EAAM,CAAA,mBAAA,CACN,GAAM,mBACN,CAAA,EAAA,CAAM,mBACN,CAAA,EAAA,CAAM,oBACN,EAAM,CAAA,mBAAA,CACN,GAAM,mBACN,CAAA,EAAA,CAAM,oBACN,EAAM,CAAA,mBAAA,CACN,EAAM,CAAA,mBAAA,CACN,GAAM,mBACR,CAAA,CAEMC,EAAgE,CACpE,EAAA,CAAI,CACF,EAAM,CAAA,yBAAA,CACN,GAAM,yBACN,CAAA,EAAA,CAAM,0BACN,EAAM,CAAA,yBAAA,CACN,GAAM,yBACN,CAAA,EAAA,CAAM,0BACN,EAAM,CAAA,yBAAA,CACN,EAAM,CAAA,yBAAA,CACN,GAAM,yBACN,CAAA,EAAA,CAAM,0BACN,EAAM,CAAA,yBAAA,CACN,GAAM,yBACN,CAAA,EAAA,CAAM,yBACR,CAAA,CACA,GAAI,CACF,EAAA,CAAM,0BACN,EAAM,CAAA,yBAAA,CACN,GAAM,yBACN,CAAA,EAAA,CAAM,yBACN,CAAA,EAAA,CAAM,0BACN,EAAM,CAAA,yBAAA,CACN,GAAM,yBACN,CAAA,EAAA,CAAM,0BACN,EAAM,CAAA,yBAAA,CACN,EAAM,CAAA,yBAAA,CACN,GAAM,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,aAAA,CACL,KAAM,CAAC,OAAA,CAAS,EAAE,CAAA,CAClB,KAAM,CAAA,UAAA,CACR,CACAC,CAAAA,oBAAAA,CAAA,cAACoB,CAAA,CAAA,CACC,OAAS,CAAA,CAAC,aAAc,uBAAuB,CAAA,CAC/C,KAAM,CAAA,WAAA,CACN,GAAG,MACJ,CAAA,CAAA,GAAA,CACGoE,CAAY,CAAA,GAChB,CACF,CAEDH,CAAAA,CAAAA,EAAQA,CAAK,CAAA,MAAA,CAAS,GACrBrF,oBAAA,CAAA,aAAA,CAAC,KACC,CAAA,CAAA,GAAA,CAAKgG,EACL,SAAU,CAAA,oDAAA,CAAA,CAETX,CAAK,CAAA,KAAA,CAAM,EAAGa,CAAgB,CAAA,CAAE,GAAI,CAAA,CAACU,EAAK1E,CACzClC,GAAAA,oBAAAA,CAAA,aAAC,CAAA,KAAA,CAAA,CAAI,IAAKkC,CAAO,CAAA,GAAA,CAAK+D,CAAU/D,CAAAA,CAAK,GACnClC,oBAAA,CAAA,aAAA,CAACsD,CAAA,CAAA,IAAA,CAAKsD,CAAI,CACZ,CACD,CACAV,CAAAA,CAAAA,EAAoBb,GAAM,MAAU,EAAA,CAAA,CAAA,EACnCrF,oBAAA,CAAA,aAAA,CAACsD,EAAA,IAAI,CAAA,GAAA,CAAE+B,CAAK,CAAA,MAAA,CAASa,CAAiB,CAE1C,CAEJ,CACF,CAEJ,CACF,CAEJ","file":"CreatorCard.cjs","sourcesContent":["import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n\nexport const noopFn = () => {};\n","export type Breakpoint = \"sm\" | \"md\" | \"lg\" | \"xl\" | \"2xl\";\nexport type ResponsiveSize = number | `${Breakpoint}:${number}`;\n\ntype SizeKey =\n | \"12\"\n | \"16\"\n | \"18\"\n | \"20\"\n | \"24\"\n | \"32\"\n | \"36\"\n | \"40\"\n | \"42\"\n | \"48\"\n | \"64\"\n | \"72\"\n | \"80\";\n\n// These constants help Tailwind identify the classes during compilation\nconst BASE_SIZES: Record<SizeKey, string> = {\n \"12\": \"h-[12px] w-[12px]\",\n \"16\": \"h-[16px] w-[16px]\",\n \"18\": \"h-[18px] w-[18px]\",\n \"20\": \"h-[20px] w-[20px]\",\n \"24\": \"h-[24px] w-[24px]\",\n \"32\": \"h-[32px] w-[32px]\",\n \"36\": \"h-[36px] w-[36px]\",\n \"40\": \"h-[40px] w-[40px]\",\n \"42\": \"h-[42px] w-[42px]\",\n \"48\": \"h-[48px] w-[48px]\",\n \"64\": \"h-[64px] w-[64px]\",\n \"72\": \"h-[72px] w-[72px]\",\n \"80\": \"h-[80px] w-[80px]\"\n};\n\nconst RESPONSIVE_SIZES: Record<Breakpoint, Record<SizeKey, string>> = {\n sm: {\n \"12\": \"sm:h-[12px] sm:w-[12px]\",\n \"16\": \"sm:h-[16px] sm:w-[16px]\",\n \"18\": \"sm:h-[18px] sm:w-[18px]\",\n \"20\": \"sm:h-[20px] sm:w-[20px]\",\n \"24\": \"sm:h-[24px] sm:w-[24px]\",\n \"32\": \"sm:h-[32px] sm:w-[32px]\",\n \"36\": \"sm:h-[36px] sm:w-[36px]\",\n \"40\": \"sm:h-[40px] sm:w-[40px]\",\n \"42\": \"sm:h-[42px] sm:w-[42px]\",\n \"48\": \"sm:h-[48px] sm:w-[48px]\",\n \"64\": \"sm:h-[64px] sm:w-[64px]\",\n \"72\": \"sm:h-[72px] sm:w-[72px]\",\n \"80\": \"sm:h-[80px] sm:w-[80px]\"\n },\n md: {\n \"12\": \"md:h-[12px] md:w-[12px]\",\n \"16\": \"md:h-[16px] md:w-[16px]\",\n \"18\": \"md:h-[18px] md:w-[18px]\",\n \"20\": \"md:h-[20px] md:w-[20px]\",\n \"24\": \"md:h-[24px] md:w-[24px]\",\n \"32\": \"md:h-[32px] md:w-[32px]\",\n \"36\": \"md:h-[36px] md:w-[36px]\",\n \"40\": \"md:h-[40px] md:w-[40px]\",\n \"42\": \"md:h-[42px] md:w-[42px]\",\n \"48\": \"md:h-[48px] md:w-[48px]\",\n \"64\": \"md:h-[64px] md:w-[64px]\",\n \"72\": \"md:h-[72px] md:w-[72px]\",\n \"80\": \"md:h-[80px] md:w-[80px]\"\n },\n lg: {\n \"12\": \"lg:h-[12px] lg:w-[12px]\",\n \"16\": \"lg:h-[16px] lg:w-[16px]\",\n \"18\": \"lg:h-[18px] lg:w-[18px]\",\n \"20\": \"lg:h-[20px] lg:w-[20px]\",\n \"24\": \"lg:h-[24px] lg:w-[24px]\",\n \"32\": \"lg:h-[32px] lg:w-[32px]\",\n \"36\": \"lg:h-[36px] lg:w-[36px]\",\n \"40\": \"lg:h-[40px] lg:w-[40px]\",\n \"42\": \"lg:h-[42px] lg:w-[42px]\",\n \"48\": \"lg:h-[48px] lg:w-[48px]\",\n \"64\": \"lg:h-[64px] lg:w-[64px]\",\n \"72\": \"lg:h-[72px] lg:w-[72px]\",\n \"80\": \"lg:h-[80px] lg:w-[80px]\"\n },\n xl: {\n \"12\": \"xl:h-[12px] xl:w-[12px]\",\n \"16\": \"xl:h-[16px] xl:w-[16px]\",\n \"18\": \"xl:h-[18px] xl:w-[18px]\",\n \"20\": \"xl:h-[20px] xl:w-[20px]\",\n \"24\": \"xl:h-[24px] xl:w-[24px]\",\n \"32\": \"xl:h-[32px] xl:w-[32px]\",\n \"36\": \"xl:h-[36px] xl:w-[36px]\",\n \"40\": \"xl:h-[40px] xl:w-[40px]\",\n \"42\": \"xl:h-[42px] xl:w-[42px]\",\n \"48\": \"xl:h-[48px] xl:w-[48px]\",\n \"64\": \"xl:h-[64px] xl:w-[64px]\",\n \"72\": \"xl:h-[72px] xl:w-[72px]\",\n \"80\": \"xl:h-[80px] xl:w-[80px]\"\n },\n \"2xl\": {\n \"12\": \"2xl:h-[12px] 2xl:w-[12px]\",\n \"16\": \"2xl:h-[16px] 2xl:w-[16px]\",\n \"18\": \"2xl:h-[18px] 2xl:w-[18px]\",\n \"20\": \"2xl:h-[20px] 2xl:w-[20px]\",\n \"24\": \"2xl:h-[24px] 2xl:w-[24px]\",\n \"32\": \"2xl:h-[32px] 2xl:w-[32px]\",\n \"36\": \"2xl:h-[36px] 2xl:w-[36px]\",\n \"40\": \"2xl:h-[40px] 2xl:w-[40px]\",\n \"42\": \"2xl:h-[42px] 2xl:w-[42px]\",\n \"48\": \"2xl:h-[48px] 2xl:w-[48px]\",\n \"64\": \"2xl:h-[64px] 2xl:w-[64px]\",\n \"72\": \"2xl:h-[72px] 2xl:w-[72px]\",\n \"80\": \"2xl:h-[80px] 2xl:w-[80px]\"\n }\n};\n\nconst getSizeKey = (size: number): SizeKey | undefined => {\n return String(size) as SizeKey;\n};\n\nexport const getResponsiveSize = (\n size: ResponsiveSize | ResponsiveSize[] | undefined,\n baseSize: number = 24\n): {\n responsiveSizeClasses: string;\n responsiveSizeStyles: Record<string, string>;\n} => {\n const classes: string[] = [];\n const styles: Record<string, string> = {};\n\n // If no size provided, use baseSize\n if (size === undefined) {\n const key = getSizeKey(baseSize);\n if (key) {\n classes.push(BASE_SIZES[key]);\n } else {\n styles.height = `${baseSize}px`;\n styles.width = `${baseSize}px`;\n }\n }\n\n // If size is a number, use that directly\n if (typeof size === \"number\") {\n const key = getSizeKey(size);\n if (key) {\n classes.push(BASE_SIZES[key]);\n } else {\n styles.height = `${size}px`;\n styles.width = `${size}px`;\n }\n }\n\n // If array of responsive sizes, generate responsive classes\n if (Array.isArray(size)) {\n const baseKey = getSizeKey(baseSize);\n const responsiveClasses = [\n (baseKey && BASE_SIZES[baseKey]) || `h-[${baseSize}px] w-[${baseSize}px]`\n ];\n\n size.forEach((s) => {\n if (typeof s === \"string\") {\n const [breakpoint, valueStr] = s.split(\":\") as [Breakpoint, string];\n const value = parseInt(valueStr, 10);\n const key = getSizeKey(value);\n classes.push(\n (key && RESPONSIVE_SIZES[breakpoint]?.[key]) ||\n `${breakpoint}:h-[${value}px] ${breakpoint}:w-[${value}px]`\n );\n }\n });\n\n classes.push(...responsiveClasses);\n }\n\n if (typeof size === \"string\") {\n const [breakpoint, valueStr] = size.split(\":\") as [Breakpoint, string];\n const value = parseInt(valueStr, 10);\n const valueKey = getSizeKey(value);\n classes.push(\n (valueKey && RESPONSIVE_SIZES[breakpoint]?.[valueKey]) ||\n `${breakpoint}:h-[${value}px] ${breakpoint}:w-[${value}px]`\n );\n }\n\n return {\n responsiveSizeClasses: classes.join(\" \"),\n responsiveSizeStyles: styles\n };\n};\n","import type { IconName } from \"@deckai/icons\";\nimport { IconMap } from \"@deckai/icons\";\nimport type { SVGProps } from \"react\";\nimport React from \"react\";\n\nimport type { IconColors } from \"../types/tailwind\";\nimport { cn } from \"../utils\";\nimport type { ResponsiveSize } from \"../utils/responsive\";\nimport { getResponsiveSize } from \"../utils/responsive\";\n\nexport type IconProps = {\n name: IconName;\n /** @default 24 */\n size?: ResponsiveSize | ResponsiveSize[];\n /** @default primary */\n color?: IconColors;\n title?: string;\n className?: string;\n style?: React.CSSProperties;\n} & Omit<SVGProps<SVGSVGElement>, \"aria-hidden\" | \"aria-label\">;\n\n// Using CSS variables to support dark mode\nconst COLOR_MAP: Record<IconColors, string> = {\n primary: \"var(--color-primary)\",\n secondary: \"var(--color-secondary)\",\n white: \"var(--color-white)\",\n primaryBlue: \"var(--color-primary-100)\",\n disabled: \"var(--color-disabled)\",\n danger: \"var(--color-danger)\",\n tertiary: \"var(--color-tertiary-20)\"\n};\n\nexport const Icon = React.forwardRef<SVGSVGElement, IconProps>(\n (\n {\n name,\n size = 24,\n color = \"primary\",\n title,\n className,\n style = {},\n ...props\n },\n ref\n ) => {\n const IconComponent = IconMap[name];\n const { responsiveSizeClasses, responsiveSizeStyles } = getResponsiveSize(\n size,\n 24\n );\n\n return (\n <div\n className={cn(\n \"flex justify-center items-center\",\n responsiveSizeClasses,\n className\n )}\n style={{\n [\"--icon-stroke\" as string]: COLOR_MAP[color],\n ...responsiveSizeStyles,\n ...style\n }}\n >\n <IconComponent\n ref={ref}\n aria-hidden={!title}\n aria-label={title}\n stroke={name.includes(\"filled\") ? undefined : COLOR_MAP[color]}\n {...props}\n />\n </div>\n );\n }\n);\n\nIcon.displayName = \"Icon\";\n","import React from \"react\";\n\nimport type { Typography } from \"../types/tailwind\";\nimport type { Breakpoint } from \"../utils/responsive\";\n\ntype TextElement =\n | \"p\"\n | \"span\"\n | \"h1\"\n | \"h2\"\n | \"h3\"\n | \"h4\"\n | \"h5\"\n | \"h6\"\n | \"strong\"\n | \"em\"\n | \"blockquote\"\n | \"pre\"\n | \"code\"\n | \"small\"\n | \"label\"\n | \"a\";\n\n// HTML element mapping type\ntype HTMLElementByTag = {\n p: HTMLParagraphElement;\n span: HTMLSpanElement;\n h1: HTMLHeadingElement;\n h2: HTMLHeadingElement;\n h3: HTMLHeadingElement;\n h4: HTMLHeadingElement;\n h5: HTMLHeadingElement;\n h6: HTMLHeadingElement;\n strong: HTMLElement;\n em: HTMLElement;\n blockquote: HTMLQuoteElement;\n pre: HTMLPreElement;\n code: HTMLElement;\n small: HTMLElement;\n label: HTMLLabelElement;\n a: HTMLAnchorElement;\n};\n\n// HTML props mapping type\ntype HTMLPropsMap = {\n p: React.HTMLAttributes<HTMLParagraphElement>;\n span: React.HTMLAttributes<HTMLSpanElement>;\n h1: React.HTMLAttributes<HTMLHeadingElement>;\n h2: React.HTMLAttributes<HTMLHeadingElement>;\n h3: React.HTMLAttributes<HTMLHeadingElement>;\n h4: React.HTMLAttributes<HTMLHeadingElement>;\n h5: React.HTMLAttributes<HTMLHeadingElement>;\n h6: React.HTMLAttributes<HTMLHeadingElement>;\n strong: React.HTMLAttributes<HTMLElement>;\n em: React.HTMLAttributes<HTMLElement>;\n blockquote: React.HTMLAttributes<HTMLQuoteElement>;\n pre: React.HTMLAttributes<HTMLPreElement>;\n code: React.HTMLAttributes<HTMLElement>;\n small: React.HTMLAttributes<HTMLElement>;\n label: React.LabelHTMLAttributes<HTMLLabelElement>;\n a: Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, \"color\">;\n};\n\ntype TextColor =\n | \"primary\"\n | \"secondary\"\n | \"white\"\n | \"primary-blue\"\n | \"disabled\"\n | \"danger\"\n | \"inherit\"\n | \"primary-100\";\n\nconst HEADING_ELEMENT_MAP: Record<string, TextElement> = {\n xl: \"h1\",\n lg: \"h1\",\n md: \"h2\",\n sm: \"h3\",\n xs: \"h4\"\n};\n\nconst getElementFromVariant = (variant: TypographyKey): TextElement => {\n const [category, size] = variant.split(\"-\");\n\n if (category === \"heading\") {\n return HEADING_ELEMENT_MAP[size] || \"p\";\n }\n\n if (category === \"label\") {\n return \"label\";\n }\n\n return \"p\";\n};\n\ntype Weight = \"light\" | \"regular\" | \"semibold\" | \"bold\";\n\nconst fontWeight: Record<Weight, string> = {\n light: \"font-light\",\n regular: \"font-regular\",\n semibold: \"font-semibold\",\n bold: \"font-bold\"\n};\n\nexport type ResponsiveVariant =\n | TypographyKey\n | `${Breakpoint}:${TypographyKey}`;\n\ntype TypographyCategory = keyof Typography;\ntype TypographyValue<T extends TypographyCategory> = Extract<\n keyof Typography[T],\n string | number | bigint | boolean | null | undefined\n>;\ntype TypographyKey = {\n [T in TypographyCategory]: `${T}-${TypographyValue<T>}`;\n}[TypographyCategory];\n\n// Update TextProps to use ResponsiveVariant\nexport type TextProps<T extends TextElement = \"p\"> = {\n variant?: ResponsiveVariant | ResponsiveVariant[];\n color?: TextColor;\n as?: T;\n className?: string;\n children: React.ReactNode;\n weight?: Weight;\n} & HTMLPropsMap[T];\n\n// Add helper function to process variants\nconst processVariants = (\n variants: ResponsiveVariant | ResponsiveVariant[] | undefined\n): string => {\n if (!variants) return \"text-body-default\";\n\n const variantArray = Array.isArray(variants) ? variants : [variants];\n\n return variantArray\n .map((variant) => {\n if (variant.includes(\":\")) {\n const [breakpoint, typographyClass] = variant.split(\":\");\n return `${breakpoint}:text-${typographyClass}`;\n }\n return `text-${variant}`;\n })\n .join(\" \");\n};\n\nexport const Text = React.forwardRef(\n <T extends TextElement = \"p\">(\n {\n variant = \"body-default\",\n color = \"primary\",\n as,\n className,\n children,\n weight,\n ...props\n }: TextProps<T>,\n ref: React.ForwardedRef<HTMLElementByTag[T]>\n ) => {\n // Process typography classes with breakpoints\n const typographyClasses = processVariants(variant);\n\n // Get color styles using Tailwind classes that reference CSS variables\n const colorClasses = color === \"inherit\" ? \"text-inherit\" : `text-${color}`;\n\n const suggestedElement = React.useMemo(() => {\n const baseVariant =\n typeof variant === \"string\"\n ? variant.split(\":\").pop()!\n : Array.isArray(variant)\n ? variant[0].split(\":\").pop()!\n : \"body-default\";\n return getElementFromVariant(baseVariant as TypographyKey);\n }, [variant]);\n\n const Component = (as || suggestedElement) as React.ElementType;\n\n return (\n <Component\n ref={ref}\n className={`\n font-sans antialiased\n ${typographyClasses}\n ${colorClasses}\n ${weight && `!${fontWeight[weight]}`}\n ${className}\n `}\n {...(props as HTMLPropsMap[T])}\n >\n {children}\n </Component>\n );\n }\n);\n\nText.displayName = \"Text\";\n","import type { IconName } from \"@deckai/icons\";\nimport * as React from \"react\";\n\nimport { cn } from \"../utils\";\nimport { Icon } from \"./Icon\";\nimport { Text } from \"./Text\";\n\nexport type BadgeProps = {\n variant?: \"pink\" | \"orange\" | \"green\" | \"purple\";\n iconName?: IconName;\n} & React.HTMLAttributes<HTMLSpanElement>;\n\nconst variants = {\n pink: \"bg-tertiary-5\",\n orange: \"bg-tertiary-15\",\n green: \"bg-tertiary-25\",\n purple: \"bg-secondary-300\"\n};\n\nconst stringToVariant = (str: string): keyof typeof variants => {\n const variantKeys = Object.keys(variants) as Array<keyof typeof variants>;\n // Let's log some values to understand what's happening\n const hash = str\n .split(\"\")\n .reduce((acc, char) => char.charCodeAt(0) + ((acc << 5) - acc), 0);\n\n const index = Math.abs(hash) % variantKeys.length;\n const selectedVariant = variantKeys[index];\n\n return selectedVariant;\n};\n\nexport const Badge = React.forwardRef<HTMLSpanElement, BadgeProps>(\n ({ className, variant, iconName, children, ...props }, ref) => {\n const finalVariant =\n variant ||\n (typeof children === \"string\" ? stringToVariant(children) : \"pink\");\n return (\n <span\n ref={ref}\n className={cn(\n \"inline-flex items-center gap-2\",\n \"rounded px-2 py-1.5\",\n \"text-sm font-medium\",\n variants[finalVariant],\n className\n )}\n {...props}\n >\n {iconName && <Icon size={16} name={iconName} />}\n <Text variant=\"body-xxs-semibold\" className=\"mt-0.5\">\n {children}\n </Text>\n </span>\n );\n }\n);\n\nBadge.displayName = \"Badge\";\n","import React from \"react\";\n\nimport { cn } from \"../utils\";\n\nexport type FallbackVariant = \"text\" | \"image\" | \"button\" | \"card\" | \"avatar\";\nexport type FallbackSize = \"sm\" | \"md\" | \"lg\" | number;\n\nexport type FallbackProps = {\n /**\n * The type of content being loaded\n */\n variant?: FallbackVariant;\n /**\n * The size of the fallback element\n * Can be a predefined size ('sm' | 'md' | 'lg') or a custom pixel value\n */\n size?: FallbackSize;\n /**\n * Whether to show multiple lines (only applies to text variant)\n */\n lines?: number;\n /**\n * Additional classes to apply to the fallback\n */\n className?: string;\n /**\n * Whether to show the loading animation\n */\n animate?: boolean;\n};\n\n// Updated to match existing component sizes\nconst sizeMap = {\n sm: \"h-4\", // 16px\n md: \"h-6\", // 24px\n lg: \"h-8\" // 32px\n};\n\n// Updated to match existing component sizes\nconst widthMap = {\n sm: \"w-20\", // 80px\n md: \"w-32\", // 128px\n lg: \"w-48\" // 192px\n};\n\n// Updated to match Avatar sizes\nconst avatarSizeMap = {\n sm: \"w-8 h-8\", // 32px\n md: \"w-12 h-12\", // 48px\n lg: \"w-16 h-16\" // 64px\n};\n\nexport const Fallback = React.forwardRef<HTMLDivElement, FallbackProps>(\n (\n { variant = \"text\", size = \"md\", lines = 1, className, animate = true },\n ref\n ) => {\n const baseClasses = \"bg-secondary-50 rounded-lg overflow-hidden\";\n const animationClasses = animate ? \"animate-pulse\" : \"\";\n\n const getCustomSizeStyle = (size: number) => ({\n height: `${size}px`,\n width:\n variant === \"avatar\" || variant === \"image\" ? `${size}px` : undefined\n });\n\n const customStyle =\n typeof size === \"number\" ? getCustomSizeStyle(size) : undefined;\n\n const renderContent = () => {\n switch (variant) {\n case \"text\":\n return (\n <div className=\"flex flex-col gap-2\">\n {Array.from({ length: lines }).map((_, index) => (\n <div\n key={index}\n style={customStyle}\n className={cn(\n baseClasses,\n animationClasses,\n typeof size === \"string\" ? sizeMap[size] : undefined,\n index === lines - 1 && lines > 1 ? \"w-3/4\" : \"w-full\",\n className\n )}\n />\n ))}\n </div>\n );\n\n case \"image\":\n return (\n <div\n style={customStyle}\n className={cn(\n baseClasses,\n animationClasses,\n (!customStyle || !className) &&\n \"aspect-square w-full max-w-[300px]\",\n className\n )}\n />\n );\n\n case \"button\":\n return (\n <div\n style={customStyle}\n className={cn(\n baseClasses,\n animationClasses,\n typeof size === \"string\" && [sizeMap[size], widthMap[size]],\n className\n )}\n />\n );\n\n case \"card\":\n return (\n <div\n className={cn(\n \"flex flex-col gap-4 p-6 border border-stroke rounded-xl\",\n className\n )}\n >\n <div\n className={cn(\n baseClasses,\n animationClasses,\n \"w-16 h-16 rounded-full\"\n )}\n />\n <div className=\"space-y-2\">\n <div\n className={cn(baseClasses, animationClasses, \"h-6 w-3/4\")}\n />\n <div\n className={cn(baseClasses, animationClasses, \"h-4 w-1/2\")}\n />\n </div>\n <div className=\"space-y-2\">\n <div\n className={cn(baseClasses, animationClasses, \"h-4 w-full\")}\n />\n <div\n className={cn(baseClasses, animationClasses, \"h-4 w-full\")}\n />\n <div\n className={cn(baseClasses, animationClasses, \"h-4 w-2/3\")}\n />\n </div>\n </div>\n );\n\n case \"avatar\":\n return (\n <div\n style={customStyle}\n className={cn(\n baseClasses,\n animationClasses,\n \"rounded-full\",\n {\n [avatarSizeMap.sm]: size === \"sm\",\n [avatarSizeMap.md]: size === \"md\",\n [avatarSizeMap.lg]: size === \"lg\"\n },\n className\n )}\n />\n );\n\n default:\n return null;\n }\n };\n\n return (\n <div ref={ref} className={cn(\"w-full\", className)}>\n {renderContent()}\n </div>\n );\n }\n);\n\nFallback.displayName = \"Fallback\";\n","import type { ButtonHTMLAttributes } from \"react\";\nimport React from \"react\";\n\nimport { cn } from \"../utils\";\nimport { focusRingStyles } from \"../utils/tailwind\";\n\nexport type PressableProps = ButtonHTMLAttributes<HTMLButtonElement>;\n\nexport const Pressable = React.forwardRef<HTMLButtonElement, PressableProps>(\n ({ children, type = \"button\", className, disabled, ...props }, ref) => (\n <button\n ref={ref}\n type={type}\n disabled={disabled}\n className={cn(\n \"appearance-none hover:opacity-80 transition-all active:scale-95\",\n focusRingStyles,\n disabled && \"opacity-50 cursor-not-allowed\",\n className\n )}\n {...props}\n >\n {children}\n </button>\n )\n);\n\nPressable.displayName = \"Pressable\";\n","import type { Colors, Typography } from \"../types/tailwind\";\n\n// Generate safelist patterns for all color utilities so you can use any theme color variable in your code\nexport const generateSafelist = (colors: Colors, typography: Typography) => {\n const colorNames = Object.keys(colors) as (keyof Colors)[];\n const utilities = [\"bg\", \"text\", \"border\", \"ring\", \"divide\", \"outline\"];\n const variants = [\"hover:\", \"focus:\", \"active:\", \"disabled:\"];\n const breakpoints = [\"sm\", \"md\", \"lg\", \"xl\", \"2xl\"];\n const sizes = [\"24\", \"42\", \"48\", \"64\", \"72\"]; // Add all the sizes you need\n\n const safelist: (string | { pattern: RegExp; variants: string[] })[] = [];\n\n colorNames.forEach((colorName) => {\n if (typeof colors[colorName] === \"object\") {\n // Handle nested color objects (with number keys)\n Object.keys(colors[colorName]).forEach((shade) => {\n utilities.forEach((utility) => {\n // Base utility\n safelist.push(`${utility}-${colorName}-${shade}`);\n\n // Variant utilities\n variants.forEach((variant) => {\n safelist.push(`${variant}${utility}-${colorName}-${shade}`);\n });\n });\n });\n } else {\n // Handle direct color values\n utilities.forEach((utility) => {\n safelist.push(`${utility}-${colorName}`);\n\n variants.forEach((variant) => {\n safelist.push(`${variant}${utility}-${colorName}`);\n });\n });\n }\n });\n\n // Generate typography classes\n Object.entries(typography).forEach(([family, sizes]) => {\n Object.keys(sizes).forEach((size) => {\n // Base typography classes\n safelist.push(`text-${family}-${size}`);\n\n // Add variants\n variants.forEach((variant) => {\n safelist.push(`${variant}text-${family}-${size}`);\n });\n });\n });\n\n const typographyClasses = Object.entries(typography).flatMap(\n ([category, sizes]) =>\n Object.keys(sizes).map((size) => `text-${category}-${size}`)\n );\n\n // Generate responsive variants\n const responsiveTypographyClasses = typographyClasses.flatMap((className) =>\n breakpoints.map((breakpoint) => `${breakpoint}:${className}`)\n );\n\n // Generate size classes with responsive variants\n const sizeClasses = sizes.flatMap((size) => [\n `h-[${size}px]`,\n `w-[${size}px]`,\n ...breakpoints.flatMap((bp) => [\n `${bp}:h-[${size}px]`,\n `${bp}:w-[${size}px]`\n ])\n ]);\n\n return [...typographyClasses, ...responsiveTypographyClasses, ...sizeClasses];\n};\n\nexport const focusRingStyles =\n \"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-100\";\nexport const focusRingWithinStyles =\n \"focus-within:outline-none focus-within:ring-2 focus-within:ring-primary-100\";\nexport const focusRingStylesCoerced = \"ring-2 ring-primary-100\";\n","import type { HTMLAttributes } from \"react\";\nimport React, { useCallback, useState } from \"react\";\n\nimport { cn } from \"../utils\";\nimport { Icon } from \"./Icon\";\nimport type { PressableProps } from \"./Pressable\";\nimport { Pressable } from \"./Pressable\";\nimport { Text } from \"./Text\";\n\nexport type TagProps = {\n children: React.ReactNode;\n padded?: boolean;\n color?: \"primary\" | \"text\";\n onClose?: () => void;\n} & HTMLAttributes<HTMLDivElement> &\n PressableProps;\n\nexport function Tag({\n children,\n color = \"primary\",\n className,\n onClose,\n ...pressableProps\n}: TagProps) {\n const [isHovered, setIsHovered] = useState(false);\n\n const handleMouseEnter = useCallback(() => {\n setIsHovered(true);\n }, []);\n\n const handleMouseLeave = useCallback(() => {\n setIsHovered(false);\n }, []);\n\n const content = (\n <div\n className={cn(\n \"flex gap-2\",\n onClose\n ? \"justify-between items-center max-w-fit\"\n : \"items-center justify-center\",\n \"hover:bg-primary-100 rounded bg-secondary-400 px-2 py-1 sm:px-3 sm:py-1.5 h-min hover:text-white\",\n color === \"primary\" ? \"text-primary-100\" : \"text-primary\",\n className\n )}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n >\n {typeof children === \"string\" ? (\n <Text\n color=\"inherit\"\n variant={[\"md:body-default-medium\", \"body-xxs-medium\"]}\n className=\"truncate pt-0.5\"\n >\n {children}\n </Text>\n ) : (\n children\n )}\n {onClose && (\n <Pressable\n {...pressableProps}\n onClick={onClose}\n className=\"flex items-center justify-center\"\n >\n <Icon\n name=\"close\"\n size={12}\n color={isHovered ? \"white\" : \"primaryBlue\"}\n />\n </Pressable>\n )}\n </div>\n );\n\n return onClose ? (\n content\n ) : (\n <Pressable {...pressableProps}>{content}</Pressable>\n );\n}\n","import type { IconName } from \"@deckai/icons\";\nimport React, { useCallback, useLayoutEffect, useRef, useState } from \"react\";\n\nimport { cn } from \"../utils\";\nimport { Badge } from \"./Badge\";\nimport { Fallback } from \"./Fallback\";\nimport { Icon } from \"./Icon\";\nimport { Pressable } from \"./Pressable\";\nimport { Tag } from \"./Tag\";\nimport { Text } from \"./Text\";\n\n// New hook for truncation logic\nconst useTruncateItems = () => {\n const containerRef = useRef<HTMLDivElement>(null);\n const itemRefs = useRef<Array<HTMLDivElement | null>>([]);\n const [visibleItemsCount, setVisibleItemsCount] = useState<number>(0);\n\n // Handle ref assignment for items\n const setItemRef = useCallback(\n (index: number) => (el: HTMLDivElement | null) => {\n itemRefs.current[index] = el;\n },\n []\n );\n\n // Calculate how many items can fit in the container\n const calculateVisibleItems = useCallback((itemsLength: number) => {\n if (!containerRef.current || itemsLength === 0) return;\n\n const containerWidth = containerRef.current.offsetWidth;\n let totalWidth = 0;\n let visibleCount = 0;\n\n // Reset refs array to match items length\n itemRefs.current = itemRefs.current.slice(0, itemsLength);\n\n // Calculate width of each item\n for (let i = 0; i < itemRefs.current.length; i++) {\n const itemElement = itemRefs.current[i];\n if (!itemElement) continue;\n\n // Get width + margins\n const style = window.getComputedStyle(itemElement);\n const width =\n itemElement.offsetWidth +\n parseFloat(style.marginLeft || \"0\") +\n parseFloat(style.marginRight || \"0\");\n\n // Account for the \"+X\" item if we can't fit all\n if (i < itemsLength - 1) {\n // Estimate the width of \"+X\" item (approx 60px)\n const remainingWidth = containerWidth - totalWidth - 60;\n\n if (remainingWidth < width) {\n break;\n }\n }\n\n totalWidth += width;\n visibleCount++;\n\n // If total width exceeds container, reduce visible count\n if (totalWidth > containerWidth) {\n visibleCount = Math.max(0, visibleCount - 1);\n break;\n }\n }\n\n setVisibleItemsCount(Math.max(1, visibleCount)); // Ensure at least one item is visible\n }, []);\n\n // Setup effect to run the calculation\n const setupTruncation = useCallback(\n (itemsLength: number) => {\n // Initialize with all items visible\n setVisibleItemsCount(itemsLength);\n\n if (itemsLength === 0) {\n return () => {};\n }\n\n // Run the calculation after a small delay to ensure layout is complete\n const timeoutId = setTimeout(\n () => calculateVisibleItems(itemsLength),\n 100\n );\n\n // Add resize listener to recalculate on window resize\n const handleResize = () => calculateVisibleItems(itemsLength);\n window.addEventListener(\"resize\", handleResize);\n\n return () => {\n clearTimeout(timeoutId);\n window.removeEventListener(\"resize\", handleResize);\n };\n },\n [calculateVisibleItems]\n );\n\n return {\n containerRef,\n setItemRef,\n visibleItemsCount,\n setupTruncation\n };\n};\n\nexport type CreatorCardProps = {\n /** Creator's name */\n name: string;\n /** Creator's profile image URL */\n profileImage?: string;\n /** Creator's tags/skills */\n tags?: string[];\n /** Creator's badges with icons */\n badges?: Array<{\n label: string;\n icon: IconName;\n }>;\n /** Creator's rating (out of 5) */\n rating?: number;\n /** Number of reviews */\n reviewCount?: number;\n /** Handler for when the card is clicked */\n onClick?: () => void;\n /** Additional class names */\n className?: string;\n /** Whether the component is in a loading state */\n isLoading?: boolean;\n /** Whether the creator is favorited */\n isFavorited?: boolean;\n /** Handler for when the favorite button is clicked */\n onFavoriteClick?: (e: React.MouseEvent) => void;\n};\n\nexport function CreatorCard({\n name,\n profileImage,\n tags,\n badges,\n rating,\n reviewCount,\n onClick,\n className,\n isLoading,\n isFavorited = false,\n onFavoriteClick\n}: CreatorCardProps) {\n const handleFavoriteClick = useCallback(\n (e: React.MouseEvent) => {\n e.stopPropagation();\n onFavoriteClick?.(e);\n },\n [onFavoriteClick]\n );\n\n // Format the rating to display only one decimal place if needed\n const formattedRating = rating\n ? rating.toFixed(1).replace(/\\.0$/, \"\")\n : undefined;\n\n // Use the truncation hook for tags\n const {\n containerRef: tagsContainerRef,\n setItemRef: setTagRef,\n visibleItemsCount: visibleTagsCount,\n setupTruncation: setupTagsTruncation\n } = useTruncateItems();\n\n // Use the truncation hook for badges\n const {\n containerRef: badgesContainerRef,\n setItemRef: setBadgeRef,\n visibleItemsCount: visibleBadgesCount,\n setupTruncation: setupBadgesTruncation\n } = useTruncateItems();\n\n // Setup truncation for tags\n useLayoutEffect(() => {\n // Set an initial value before calculation\n const cleanup = setupTagsTruncation(tags?.length || 0);\n\n // Force a recalculation after a delay to ensure all refs are set\n const forceUpdateTimeout = setTimeout(() => {\n if (tags && tags.length > 0) {\n setupTagsTruncation(tags.length);\n }\n }, 200);\n\n return () => {\n cleanup();\n clearTimeout(forceUpdateTimeout);\n };\n }, [tags, setupTagsTruncation]);\n\n // Setup truncation for badges\n useLayoutEffect(() => {\n // Set an initial value before calculation\n const cleanup = setupBadgesTruncation(badges?.length || 0);\n\n // Force a recalculation after a delay to ensure all refs are set\n const forceUpdateTimeout = setTimeout(() => {\n if (badges && badges.length > 0) {\n setupBadgesTruncation(badges.length);\n }\n }, 200);\n\n return () => {\n cleanup();\n clearTimeout(forceUpdateTimeout);\n };\n }, [badges, setupBadgesTruncation]);\n\n return (\n <Pressable onClick={onClick}>\n <div\n className={cn(\n \"relative bg-background-0 rounded-xl overflow-hidden shadow-2xl max-w-[210px] md:max-w-[318px] max-h-[339px] md:max-h-[469px]\",\n className\n )}\n >\n {isLoading ? (\n <Fallback variant=\"card\" className=\"w-full h-full\" />\n ) : (\n <>\n <div className=\"relative aspect-square w-full bg-gray-200\">\n {profileImage && (\n <img\n src={profileImage}\n alt={name}\n className=\"w-full h-full object-cover\"\n />\n )}\n\n {/* Heart Icon */}\n <div className=\"absolute top-4 right-4\">\n <Pressable\n onClick={handleFavoriteClick}\n className=\"rounded-full p-2\"\n >\n <Icon\n name=\"heart\"\n size={24}\n color=\"white\"\n style={{\n fill: isFavorited ? \"white\" : \"none\"\n }}\n />\n </Pressable>\n </div>\n\n {/* Badges with truncation */}\n {badges && badges.length > 0 && (\n <div\n ref={badgesContainerRef}\n className=\"absolute bottom-4 left-4 flex gap-2 overflow-hidden max-w-[90%] flex-nowrap whitespace-nowrap\"\n >\n {badges.slice(0, visibleBadgesCount).map((badge, index) => (\n <div\n key={index}\n ref={setBadgeRef(index)}\n className=\"shrink-0\"\n >\n <Badge iconName={badge.icon}>{badge.label}</Badge>\n </div>\n ))}\n {visibleBadgesCount < (badges?.length || 0) && (\n <div className=\"shrink-0\">\n <Badge>+{badges.length - visibleBadgesCount}</Badge>\n </div>\n )}\n </div>\n )}\n </div>\n\n <div className=\"flex flex-col p-4 items-start\">\n <Text variant={[\"lg:heading-xs\", \"body-default-semibold\"]}>\n {name}\n </Text>\n {formattedRating && (\n <div className=\"flex gap-1 items-center\">\n <Text\n variant={[\"lg:body-lg-semibold\", \"body-default-semibold\"]}\n >\n {formattedRating}\n </Text>\n <Icon\n name=\"star-filled\"\n size={[\"lg:16\", 12]}\n color=\"tertiary\"\n />\n <Text\n variant={[\"lg:body-md\", \"body-default-semibold\"]}\n color=\"secondary\"\n as=\"span\"\n >\n ({reviewCount})\n </Text>\n </div>\n )}\n {tags && tags.length > 0 && (\n <div\n ref={tagsContainerRef}\n className=\"flex flex-nowrap overflow-hidden gap-2 pt-4 w-full\"\n >\n {tags.slice(0, visibleTagsCount).map((tag, index) => (\n <div key={index} ref={setTagRef(index)}>\n <Tag>{tag}</Tag>\n </div>\n ))}\n {visibleTagsCount < (tags?.length || 0) && (\n <Tag>+{tags.length - visibleTagsCount}</Tag>\n )}\n </div>\n )}\n </div>\n </>\n )}\n </div>\n </Pressable>\n );\n}\n"]}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { IconName } from '@deckai/icons';
|
|
2
|
+
import React__default from 'react';
|
|
3
|
+
|
|
4
|
+
type CreatorCardProps = {
|
|
5
|
+
/** Creator's name */
|
|
6
|
+
name: string;
|
|
7
|
+
/** Creator's profile image URL */
|
|
8
|
+
profileImage?: string;
|
|
9
|
+
/** Creator's tags/skills */
|
|
10
|
+
tags?: string[];
|
|
11
|
+
/** Creator's badges with icons */
|
|
12
|
+
badges?: Array<{
|
|
13
|
+
label: string;
|
|
14
|
+
icon: IconName;
|
|
15
|
+
}>;
|
|
16
|
+
/** Creator's rating (out of 5) */
|
|
17
|
+
rating?: number;
|
|
18
|
+
/** Number of reviews */
|
|
19
|
+
reviewCount?: number;
|
|
20
|
+
/** Handler for when the card is clicked */
|
|
21
|
+
onClick?: () => void;
|
|
22
|
+
/** Additional class names */
|
|
23
|
+
className?: string;
|
|
24
|
+
/** Whether the component is in a loading state */
|
|
25
|
+
isLoading?: boolean;
|
|
26
|
+
/** Whether the creator is favorited */
|
|
27
|
+
isFavorited?: boolean;
|
|
28
|
+
/** Handler for when the favorite button is clicked */
|
|
29
|
+
onFavoriteClick?: (e: React__default.MouseEvent) => void;
|
|
30
|
+
};
|
|
31
|
+
declare function CreatorCard({ name, profileImage, tags, badges, rating, reviewCount, onClick, className, isLoading, isFavorited, onFavoriteClick }: CreatorCardProps): React__default.JSX.Element;
|
|
32
|
+
|
|
33
|
+
export { CreatorCard, type CreatorCardProps };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { IconName } from '@deckai/icons';
|
|
2
|
+
import React__default from 'react';
|
|
3
|
+
|
|
4
|
+
type CreatorCardProps = {
|
|
5
|
+
/** Creator's name */
|
|
6
|
+
name: string;
|
|
7
|
+
/** Creator's profile image URL */
|
|
8
|
+
profileImage?: string;
|
|
9
|
+
/** Creator's tags/skills */
|
|
10
|
+
tags?: string[];
|
|
11
|
+
/** Creator's badges with icons */
|
|
12
|
+
badges?: Array<{
|
|
13
|
+
label: string;
|
|
14
|
+
icon: IconName;
|
|
15
|
+
}>;
|
|
16
|
+
/** Creator's rating (out of 5) */
|
|
17
|
+
rating?: number;
|
|
18
|
+
/** Number of reviews */
|
|
19
|
+
reviewCount?: number;
|
|
20
|
+
/** Handler for when the card is clicked */
|
|
21
|
+
onClick?: () => void;
|
|
22
|
+
/** Additional class names */
|
|
23
|
+
className?: string;
|
|
24
|
+
/** Whether the component is in a loading state */
|
|
25
|
+
isLoading?: boolean;
|
|
26
|
+
/** Whether the creator is favorited */
|
|
27
|
+
isFavorited?: boolean;
|
|
28
|
+
/** Handler for when the favorite button is clicked */
|
|
29
|
+
onFavoriteClick?: (e: React__default.MouseEvent) => void;
|
|
30
|
+
};
|
|
31
|
+
declare function CreatorCard({ name, profileImage, tags, badges, rating, reviewCount, onClick, className, isLoading, isFavorited, onFavoriteClick }: CreatorCardProps): React__default.JSX.Element;
|
|
32
|
+
|
|
33
|
+
export { CreatorCard, type CreatorCardProps };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import*as l from'react';import l__default,{useCallback,useLayoutEffect,useRef,useState}from'react';import {clsx}from'clsx';import {twMerge}from'tailwind-merge';import {IconMap}from'@deckai/icons';function m(...e){return twMerge(clsx(e))}var P={12:"h-[12px] w-[12px]",16:"h-[16px] w-[16px]",18:"h-[18px] w-[18px]",20:"h-[20px] w-[20px]",24:"h-[24px] w-[24px]",32:"h-[32px] w-[32px]",36:"h-[36px] w-[36px]",40:"h-[40px] w-[40px]",42:"h-[42px] w-[42px]",48:"h-[48px] w-[48px]",64:"h-[64px] w-[64px]",72:"h-[72px] w-[72px]",80:"h-[80px] w-[80px]"},F={sm:{12:"sm:h-[12px] sm:w-[12px]",16:"sm:h-[16px] sm:w-[16px]",18:"sm:h-[18px] sm:w-[18px]",20:"sm:h-[20px] sm:w-[20px]",24:"sm:h-[24px] sm:w-[24px]",32:"sm:h-[32px] sm:w-[32px]",36:"sm:h-[36px] sm:w-[36px]",40:"sm:h-[40px] sm:w-[40px]",42:"sm:h-[42px] sm:w-[42px]",48:"sm:h-[48px] sm:w-[48px]",64:"sm:h-[64px] sm:w-[64px]",72:"sm:h-[72px] sm:w-[72px]",80:"sm:h-[80px] sm:w-[80px]"},md:{12:"md:h-[12px] md:w-[12px]",16:"md:h-[16px] md:w-[16px]",18:"md:h-[18px] md:w-[18px]",20:"md:h-[20px] md:w-[20px]",24:"md:h-[24px] md:w-[24px]",32:"md:h-[32px] md:w-[32px]",36:"md:h-[36px] md:w-[36px]",40:"md:h-[40px] md:w-[40px]",42:"md:h-[42px] md:w-[42px]",48:"md:h-[48px] md:w-[48px]",64:"md:h-[64px] md:w-[64px]",72:"md:h-[72px] md:w-[72px]",80:"md:h-[80px] md:w-[80px]"},lg:{12:"lg:h-[12px] lg:w-[12px]",16:"lg:h-[16px] lg:w-[16px]",18:"lg:h-[18px] lg:w-[18px]",20:"lg:h-[20px] lg:w-[20px]",24:"lg:h-[24px] lg:w-[24px]",32:"lg:h-[32px] lg:w-[32px]",36:"lg:h-[36px] lg:w-[36px]",40:"lg:h-[40px] lg:w-[40px]",42:"lg:h-[42px] lg:w-[42px]",48:"lg:h-[48px] lg:w-[48px]",64:"lg:h-[64px] lg:w-[64px]",72:"lg:h-[72px] lg:w-[72px]",80:"lg:h-[80px] lg:w-[80px]"},xl:{12:"xl:h-[12px] xl:w-[12px]",16:"xl:h-[16px] xl:w-[16px]",18:"xl:h-[18px] xl:w-[18px]",20:"xl:h-[20px] xl:w-[20px]",24:"xl:h-[24px] xl:w-[24px]",32:"xl:h-[32px] xl:w-[32px]",36:"xl:h-[36px] xl:w-[36px]",40:"xl:h-[40px] xl:w-[40px]",42:"xl:h-[42px] xl:w-[42px]",48:"xl:h-[48px] xl:w-[48px]",64:"xl:h-[64px] xl:w-[64px]",72:"xl:h-[72px] xl:w-[72px]",80:"xl:h-[80px] xl:w-[80px]"},"2xl":{12:"2xl:h-[12px] 2xl:w-[12px]",16:"2xl:h-[16px] 2xl:w-[16px]",18:"2xl:h-[18px] 2xl:w-[18px]",20:"2xl:h-[20px] 2xl:w-[20px]",24:"2xl:h-[24px] 2xl:w-[24px]",32:"2xl:h-[32px] 2xl:w-[32px]",36:"2xl:h-[36px] 2xl:w-[36px]",40:"2xl:h-[40px] 2xl:w-[40px]",42:"2xl:h-[42px] 2xl:w-[42px]",48:"2xl:h-[48px] 2xl:w-[48px]",64:"2xl:h-[64px] 2xl:w-[64px]",72:"2xl:h-[72px] 2xl:w-[72px]",80:"2xl:h-[80px] 2xl:w-[80px]"}},v=e=>String(e),j=(e,r=24)=>{let o=[],t={};if(e===void 0){let n=v(r);n?o.push(P[n]):(t.height=`${r}px`,t.width=`${r}px`);}if(typeof e=="number"){let n=v(e);n?o.push(P[n]):(t.height=`${e}px`,t.width=`${e}px`);}if(Array.isArray(e)){let n=v(r),p=[n&&P[n]||`h-[${r}px] w-[${r}px]`];e.forEach(a=>{if(typeof a=="string"){let[s,x]=a.split(":"),i=parseInt(x,10),c=v(i);o.push(c&&F[s]?.[c]||`${s}:h-[${i}px] ${s}:w-[${i}px]`);}}),o.push(...p);}if(typeof e=="string"){let[n,p]=e.split(":"),a=parseInt(p,10),s=v(a);o.push(s&&F[n]?.[s]||`${n}:h-[${a}px] ${n}:w-[${a}px]`);}return {responsiveSizeClasses:o.join(" "),responsiveSizeStyles:t}};var K={primary:"var(--color-primary)",secondary:"var(--color-secondary)",white:"var(--color-white)",primaryBlue:"var(--color-primary-100)",disabled:"var(--color-disabled)",danger:"var(--color-danger)",tertiary:"var(--color-tertiary-20)"},w=l__default.forwardRef(({name:e,size:r=24,color:o="primary",title:t,className:n,style:p={},...a},s)=>{let x=IconMap[e],{responsiveSizeClasses:i,responsiveSizeStyles:c}=j(r,24);return l__default.createElement("div",{className:m("flex justify-center items-center",i,n),style:{"--icon-stroke":K[o],...c,...p}},l__default.createElement(x,{ref:s,"aria-hidden":!t,"aria-label":t,stroke:e.includes("filled")?void 0:K[o],...a}))});w.displayName="Icon";var ee={xl:"h1",lg:"h1",md:"h2",sm:"h3",xs:"h4"},te=e=>{let[r,o]=e.split("-");return r==="heading"?ee[o]||"p":r==="label"?"label":"p"},re={light:"font-light",regular:"font-regular",semibold:"font-semibold",bold:"font-bold"},oe=e=>e?(Array.isArray(e)?e:[e]).map(o=>{if(o.includes(":")){let[t,n]=o.split(":");return `${t}:text-${n}`}return `text-${o}`}).join(" "):"text-body-default",g=l__default.forwardRef(({variant:e="body-default",color:r="primary",as:o,className:t,children:n,weight:p,...a},s)=>{let x=oe(e),i=r==="inherit"?"text-inherit":`text-${r}`,c=l__default.useMemo(()=>{let h=typeof e=="string"?e.split(":").pop():Array.isArray(e)?e[0].split(":").pop():"body-default";return te(h)},[e]);return l__default.createElement(o||c,{ref:s,className:`
|
|
2
|
+
font-sans antialiased
|
|
3
|
+
${x}
|
|
4
|
+
${i}
|
|
5
|
+
${p&&`!${re[p]}`}
|
|
6
|
+
${t}
|
|
7
|
+
`,...a},n)});g.displayName="Text";var O={pink:"bg-tertiary-5",orange:"bg-tertiary-15",green:"bg-tertiary-25",purple:"bg-secondary-300"},se=e=>{let r=Object.keys(O),o=e.split("").reduce((p,a)=>a.charCodeAt(0)+((p<<5)-p),0),t=Math.abs(o)%r.length;return r[t]},k=l.forwardRef(({className:e,variant:r,iconName:o,children:t,...n},p)=>{let a=r||(typeof t=="string"?se(t):"pink");return l.createElement("span",{ref:p,className:m("inline-flex items-center gap-2","rounded px-2 py-1.5","text-sm font-medium",O[a],e),...n},o&&l.createElement(w,{size:16,name:o}),l.createElement(g,{variant:"body-xxs-semibold",className:"mt-0.5"},t))});k.displayName="Badge";var z={sm:"h-4",md:"h-6",lg:"h-8"},ne={sm:"w-20",md:"w-32",lg:"w-48"},R={sm:"w-8 h-8",md:"w-12 h-12",lg:"w-16 h-16"},V=l__default.forwardRef(({variant:e="text",size:r="md",lines:o=1,className:t,animate:n=true},p)=>{let a="bg-secondary-50 rounded-lg overflow-hidden",s=n?"animate-pulse":"",i=typeof r=="number"?(u=>({height:`${u}px`,width:e==="avatar"||e==="image"?`${u}px`:void 0}))(r):void 0,c=()=>{switch(e){case "text":return l__default.createElement("div",{className:"flex flex-col gap-2"},Array.from({length:o}).map((u,h)=>l__default.createElement("div",{key:h,style:i,className:m(a,s,typeof r=="string"?z[r]:void 0,h===o-1&&o>1?"w-3/4":"w-full",t)})));case "image":return l__default.createElement("div",{style:i,className:m(a,s,(!i||!t)&&"aspect-square w-full max-w-[300px]",t)});case "button":return l__default.createElement("div",{style:i,className:m(a,s,typeof r=="string"&&[z[r],ne[r]],t)});case "card":return l__default.createElement("div",{className:m("flex flex-col gap-4 p-6 border border-stroke rounded-xl",t)},l__default.createElement("div",{className:m(a,s,"w-16 h-16 rounded-full")}),l__default.createElement("div",{className:"space-y-2"},l__default.createElement("div",{className:m(a,s,"h-6 w-3/4")}),l__default.createElement("div",{className:m(a,s,"h-4 w-1/2")})),l__default.createElement("div",{className:"space-y-2"},l__default.createElement("div",{className:m(a,s,"h-4 w-full")}),l__default.createElement("div",{className:m(a,s,"h-4 w-full")}),l__default.createElement("div",{className:m(a,s,"h-4 w-2/3")})));case "avatar":return l__default.createElement("div",{style:i,className:m(a,s,"rounded-full",{[R.sm]:r==="sm",[R.md]:r==="md",[R.lg]:r==="lg"},t)});default:return null}};return l__default.createElement("div",{ref:p,className:m("w-full",t)},c())});V.displayName="Fallback";var W="focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-100";var b=l__default.forwardRef(({children:e,type:r="button",className:o,disabled:t,...n},p)=>l__default.createElement("button",{ref:p,type:r,disabled:t,className:m("appearance-none hover:opacity-80 transition-all active:scale-95",W,t&&"opacity-50 cursor-not-allowed",o),...n},e));b.displayName="Pressable";function B({children:e,color:r="primary",className:o,onClose:t,...n}){let[p,a]=useState(false),s=useCallback(()=>{a(true);},[]),x=useCallback(()=>{a(false);},[]),i=l__default.createElement("div",{className:m("flex gap-2",t?"justify-between items-center max-w-fit":"items-center justify-center","hover:bg-primary-100 rounded bg-secondary-400 px-2 py-1 sm:px-3 sm:py-1.5 h-min hover:text-white",r==="primary"?"text-primary-100":"text-primary",o),onMouseEnter:s,onMouseLeave:x},typeof e=="string"?l__default.createElement(g,{color:"inherit",variant:["md:body-default-medium","body-xxs-medium"],className:"truncate pt-0.5"},e):e,t&&l__default.createElement(b,{...n,onClick:t,className:"flex items-center justify-center"},l__default.createElement(w,{name:"close",size:12,color:p?"white":"primaryBlue"})));return t?i:l__default.createElement(b,{...n},i)}var Q=()=>{let e=useRef(null),r=useRef([]),[o,t]=useState(0),n=useCallback(s=>x=>{r.current[s]=x;},[]),p=useCallback(s=>{if(!e.current||s===0)return;let x=e.current.offsetWidth,i=0,c=0;r.current=r.current.slice(0,s);for(let u=0;u<r.current.length;u++){let h=r.current[u];if(!h)continue;let E=window.getComputedStyle(h),H=h.offsetWidth+parseFloat(E.marginLeft||"0")+parseFloat(E.marginRight||"0");if(u<s-1&&x-i-60<H)break;if(i+=H,c++,i>x){c=Math.max(0,c-1);break}}t(Math.max(1,c));},[]),a=useCallback(s=>{if(t(s),s===0)return ()=>{};let x=setTimeout(()=>p(s),100),i=()=>p(s);return window.addEventListener("resize",i),()=>{clearTimeout(x),window.removeEventListener("resize",i);}},[p]);return {containerRef:e,setItemRef:n,visibleItemsCount:o,setupTruncation:a}};function De({name:e,profileImage:r,tags:o,badges:t,rating:n,reviewCount:p,onClick:a,className:s,isLoading:x,isFavorited:i=false,onFavoriteClick:c}){let u=useCallback(f=>{f.stopPropagation(),c?.(f);},[c]),h=n?n.toFixed(1).replace(/\.0$/,""):void 0,{containerRef:E,setItemRef:H,visibleItemsCount:L,setupTruncation:$}=Q(),{containerRef:U,setItemRef:Z,visibleItemsCount:S,setupTruncation:N}=Q();return useLayoutEffect(()=>{let f=$(o?.length||0),y=setTimeout(()=>{o&&o.length>0&&$(o.length);},200);return ()=>{f(),clearTimeout(y);}},[o,$]),useLayoutEffect(()=>{let f=N(t?.length||0),y=setTimeout(()=>{t&&t.length>0&&N(t.length);},200);return ()=>{f(),clearTimeout(y);}},[t,N]),l__default.createElement(b,{onClick:a},l__default.createElement("div",{className:m("relative bg-background-0 rounded-xl overflow-hidden shadow-2xl max-w-[210px] md:max-w-[318px] max-h-[339px] md:max-h-[469px]",s)},x?l__default.createElement(V,{variant:"card",className:"w-full h-full"}):l__default.createElement(l__default.Fragment,null,l__default.createElement("div",{className:"relative aspect-square w-full bg-gray-200"},r&&l__default.createElement("img",{src:r,alt:e,className:"w-full h-full object-cover"}),l__default.createElement("div",{className:"absolute top-4 right-4"},l__default.createElement(b,{onClick:u,className:"rounded-full p-2"},l__default.createElement(w,{name:"heart",size:24,color:"white",style:{fill:i?"white":"none"}}))),t&&t.length>0&&l__default.createElement("div",{ref:U,className:"absolute bottom-4 left-4 flex gap-2 overflow-hidden max-w-[90%] flex-nowrap whitespace-nowrap"},t.slice(0,S).map((f,y)=>l__default.createElement("div",{key:y,ref:Z(y),className:"shrink-0"},l__default.createElement(k,{iconName:f.icon},f.label))),S<(t?.length||0)&&l__default.createElement("div",{className:"shrink-0"},l__default.createElement(k,null,"+",t.length-S)))),l__default.createElement("div",{className:"flex flex-col p-4 items-start"},l__default.createElement(g,{variant:["lg:heading-xs","body-default-semibold"]},e),h&&l__default.createElement("div",{className:"flex gap-1 items-center"},l__default.createElement(g,{variant:["lg:body-lg-semibold","body-default-semibold"]},h),l__default.createElement(w,{name:"star-filled",size:["lg:16",12],color:"tertiary"}),l__default.createElement(g,{variant:["lg:body-md","body-default-semibold"],color:"secondary",as:"span"},"(",p,")")),o&&o.length>0&&l__default.createElement("div",{ref:E,className:"flex flex-nowrap overflow-hidden gap-2 pt-4 w-full"},o.slice(0,L).map((f,y)=>l__default.createElement("div",{key:y,ref:H(y)},l__default.createElement(B,null,f))),L<(o?.length||0)&&l__default.createElement(B,null,"+",o.length-L))))))}export{De as CreatorCard};//# sourceMappingURL=CreatorCard.js.map
|
|
8
|
+
//# sourceMappingURL=CreatorCard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/utils/index.ts","../../src/utils/responsive.ts","../../src/components/Icon.tsx","../../src/components/Text.tsx","../../src/components/Badge.tsx","../../src/components/Fallback.tsx","../../src/components/Pressable.tsx","../../src/utils/tailwind.ts","../../src/components/Tag.tsx","../../src/components/CreatorCard.tsx"],"names":["cn","inputs","twMerge","clsx","BASE_SIZES","RESPONSIVE_SIZES","getSizeKey","size","getResponsiveSize","baseSize","classes","styles","key","baseKey","responsiveClasses","s","breakpoint","valueStr","value","valueKey","COLOR_MAP","Icon","React","name","color","title","className","style","props","ref","IconComponent","IconMap","responsiveSizeClasses","responsiveSizeStyles","HEADING_ELEMENT_MAP","getElementFromVariant","variant","category","fontWeight","processVariants","variants","typographyClass","Text","as","children","weight","typographyClasses","colorClasses","suggestedElement","baseVariant","stringToVariant","str","variantKeys","hash","acc","char","index","Badge","T","iconName","finalVariant","sizeMap","widthMap","avatarSizeMap","Fallback","lines","animate","baseClasses","animationClasses","customStyle","renderContent","_","focusRingStyles","Pressable","type","disabled","Tag","onClose","pressableProps","isHovered","setIsHovered","useState","handleMouseEnter","useCallback","handleMouseLeave","content","useTruncateItems","containerRef","useRef","itemRefs","visibleItemsCount","setVisibleItemsCount","setItemRef","el","calculateVisibleItems","itemsLength","containerWidth","totalWidth","visibleCount","i","itemElement","width","setupTruncation","timeoutId","handleResize","CreatorCard","profileImage","tags","badges","rating","reviewCount","onClick","isLoading","isFavorited","onFavoriteClick","handleFavoriteClick","e","formattedRating","tagsContainerRef","setTagRef","visibleTagsCount","setupTagsTruncation","badgesContainerRef","setBadgeRef","visibleBadgesCount","setupBadgesTruncation","useLayoutEffect","cleanup","forceUpdateTimeout","badge","tag"],"mappings":"oMAGO,SAASA,CAAAA,CAAAA,GAAMC,CAAsB,CAAA,CAC1C,OAAOC,OAAQC,CAAAA,IA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AA,KAAA,CAAM,EAAGa,CAAgB,CAAA,CAAE,GAAI,CAAA,CAACU,EAAK1E,CACzClC,GAAAA,UAAAA,CAAA,aAAC,CAAA,KAAA,CAAA,CAAI,IAAKkC,CAAO,CAAA,GAAA,CAAK+D,CAAU/D,CAAAA,CAAK,GACnClC,UAAA,CAAA,aAAA,CAACsD,CAAA,CAAA,IAAA,CAAKsD,CAAI,CACZ,CACD,CACAV,CAAAA,CAAAA,EAAoBb,GAAM,MAAU,EAAA,CAAA,CAAA,EACnCrF,UAAA,CAAA,aAAA,CAACsD,EAAA,IAAI,CAAA,GAAA,CAAE+B,CAAK,CAAA,MAAA,CAASa,CAAiB,CAE1C,CAEJ,CACF,CAEJ,CACF,CAEJ","file":"CreatorCard.js","sourcesContent":["import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n\nexport const noopFn = () => {};\n","export type Breakpoint = \"sm\" | \"md\" | \"lg\" | \"xl\" | \"2xl\";\nexport type ResponsiveSize = number | `${Breakpoint}:${number}`;\n\ntype SizeKey =\n | \"12\"\n | \"16\"\n | \"18\"\n | \"20\"\n | \"24\"\n | \"32\"\n | \"36\"\n | \"40\"\n | \"42\"\n | \"48\"\n | \"64\"\n | \"72\"\n | \"80\";\n\n// These constants help Tailwind identify the classes during compilation\nconst BASE_SIZES: Record<SizeKey, string> = {\n \"12\": \"h-[12px] w-[12px]\",\n \"16\": \"h-[16px] w-[16px]\",\n \"18\": \"h-[18px] w-[18px]\",\n \"20\": \"h-[20px] w-[20px]\",\n \"24\": \"h-[24px] w-[24px]\",\n \"32\": \"h-[32px] w-[32px]\",\n \"36\": \"h-[36px] w-[36px]\",\n \"40\": \"h-[40px] w-[40px]\",\n \"42\": \"h-[42px] w-[42px]\",\n \"48\": \"h-[48px] w-[48px]\",\n \"64\": \"h-[64px] w-[64px]\",\n \"72\": \"h-[72px] w-[72px]\",\n \"80\": \"h-[80px] w-[80px]\"\n};\n\nconst RESPONSIVE_SIZES: Record<Breakpoint, Record<SizeKey, string>> = {\n sm: {\n \"12\": \"sm:h-[12px] sm:w-[12px]\",\n \"16\": \"sm:h-[16px] sm:w-[16px]\",\n \"18\": \"sm:h-[18px] sm:w-[18px]\",\n \"20\": \"sm:h-[20px] sm:w-[20px]\",\n \"24\": \"sm:h-[24px] sm:w-[24px]\",\n \"32\": \"sm:h-[32px] sm:w-[32px]\",\n \"36\": \"sm:h-[36px] sm:w-[36px]\",\n \"40\": \"sm:h-[40px] sm:w-[40px]\",\n \"42\": \"sm:h-[42px] sm:w-[42px]\",\n \"48\": \"sm:h-[48px] sm:w-[48px]\",\n \"64\": \"sm:h-[64px] sm:w-[64px]\",\n \"72\": \"sm:h-[72px] sm:w-[72px]\",\n \"80\": \"sm:h-[80px] sm:w-[80px]\"\n },\n md: {\n \"12\": \"md:h-[12px] md:w-[12px]\",\n \"16\": \"md:h-[16px] md:w-[16px]\",\n \"18\": \"md:h-[18px] md:w-[18px]\",\n \"20\": \"md:h-[20px] md:w-[20px]\",\n \"24\": \"md:h-[24px] md:w-[24px]\",\n \"32\": \"md:h-[32px] md:w-[32px]\",\n \"36\": \"md:h-[36px] md:w-[36px]\",\n \"40\": \"md:h-[40px] md:w-[40px]\",\n \"42\": \"md:h-[42px] md:w-[42px]\",\n \"48\": \"md:h-[48px] md:w-[48px]\",\n \"64\": \"md:h-[64px] md:w-[64px]\",\n \"72\": \"md:h-[72px] md:w-[72px]\",\n \"80\": \"md:h-[80px] md:w-[80px]\"\n },\n lg: {\n \"12\": \"lg:h-[12px] lg:w-[12px]\",\n \"16\": \"lg:h-[16px] lg:w-[16px]\",\n \"18\": \"lg:h-[18px] lg:w-[18px]\",\n \"20\": \"lg:h-[20px] lg:w-[20px]\",\n \"24\": \"lg:h-[24px] lg:w-[24px]\",\n \"32\": \"lg:h-[32px] lg:w-[32px]\",\n \"36\": \"lg:h-[36px] lg:w-[36px]\",\n \"40\": \"lg:h-[40px] lg:w-[40px]\",\n \"42\": \"lg:h-[42px] lg:w-[42px]\",\n \"48\": \"lg:h-[48px] lg:w-[48px]\",\n \"64\": \"lg:h-[64px] lg:w-[64px]\",\n \"72\": \"lg:h-[72px] lg:w-[72px]\",\n \"80\": \"lg:h-[80px] lg:w-[80px]\"\n },\n xl: {\n \"12\": \"xl:h-[12px] xl:w-[12px]\",\n \"16\": \"xl:h-[16px] xl:w-[16px]\",\n \"18\": \"xl:h-[18px] xl:w-[18px]\",\n \"20\": \"xl:h-[20px] xl:w-[20px]\",\n \"24\": \"xl:h-[24px] xl:w-[24px]\",\n \"32\": \"xl:h-[32px] xl:w-[32px]\",\n \"36\": \"xl:h-[36px] xl:w-[36px]\",\n \"40\": \"xl:h-[40px] xl:w-[40px]\",\n \"42\": \"xl:h-[42px] xl:w-[42px]\",\n \"48\": \"xl:h-[48px] xl:w-[48px]\",\n \"64\": \"xl:h-[64px] xl:w-[64px]\",\n \"72\": \"xl:h-[72px] xl:w-[72px]\",\n \"80\": \"xl:h-[80px] xl:w-[80px]\"\n },\n \"2xl\": {\n \"12\": \"2xl:h-[12px] 2xl:w-[12px]\",\n \"16\": \"2xl:h-[16px] 2xl:w-[16px]\",\n \"18\": \"2xl:h-[18px] 2xl:w-[18px]\",\n \"20\": \"2xl:h-[20px] 2xl:w-[20px]\",\n \"24\": \"2xl:h-[24px] 2xl:w-[24px]\",\n \"32\": \"2xl:h-[32px] 2xl:w-[32px]\",\n \"36\": \"2xl:h-[36px] 2xl:w-[36px]\",\n \"40\": \"2xl:h-[40px] 2xl:w-[40px]\",\n \"42\": \"2xl:h-[42px] 2xl:w-[42px]\",\n \"48\": \"2xl:h-[48px] 2xl:w-[48px]\",\n \"64\": \"2xl:h-[64px] 2xl:w-[64px]\",\n \"72\": \"2xl:h-[72px] 2xl:w-[72px]\",\n \"80\": \"2xl:h-[80px] 2xl:w-[80px]\"\n }\n};\n\nconst getSizeKey = (size: number): SizeKey | undefined => {\n return String(size) as SizeKey;\n};\n\nexport const getResponsiveSize = (\n size: ResponsiveSize | ResponsiveSize[] | undefined,\n baseSize: number = 24\n): {\n responsiveSizeClasses: string;\n responsiveSizeStyles: Record<string, string>;\n} => {\n const classes: string[] = [];\n const styles: Record<string, string> = {};\n\n // If no size provided, use baseSize\n if (size === undefined) {\n const key = getSizeKey(baseSize);\n if (key) {\n classes.push(BASE_SIZES[key]);\n } else {\n styles.height = `${baseSize}px`;\n styles.width = `${baseSize}px`;\n }\n }\n\n // If size is a number, use that directly\n if (typeof size === \"number\") {\n const key = getSizeKey(size);\n if (key) {\n classes.push(BASE_SIZES[key]);\n } else {\n styles.height = `${size}px`;\n styles.width = `${size}px`;\n }\n }\n\n // If array of responsive sizes, generate responsive classes\n if (Array.isArray(size)) {\n const baseKey = getSizeKey(baseSize);\n const responsiveClasses = [\n (baseKey && BASE_SIZES[baseKey]) || `h-[${baseSize}px] w-[${baseSize}px]`\n ];\n\n size.forEach((s) => {\n if (typeof s === \"string\") {\n const [breakpoint, valueStr] = s.split(\":\") as [Breakpoint, string];\n const value = parseInt(valueStr, 10);\n const key = getSizeKey(value);\n classes.push(\n (key && RESPONSIVE_SIZES[breakpoint]?.[key]) ||\n `${breakpoint}:h-[${value}px] ${breakpoint}:w-[${value}px]`\n );\n }\n });\n\n classes.push(...responsiveClasses);\n }\n\n if (typeof size === \"string\") {\n const [breakpoint, valueStr] = size.split(\":\") as [Breakpoint, string];\n const value = parseInt(valueStr, 10);\n const valueKey = getSizeKey(value);\n classes.push(\n (valueKey && RESPONSIVE_SIZES[breakpoint]?.[valueKey]) ||\n `${breakpoint}:h-[${value}px] ${breakpoint}:w-[${value}px]`\n );\n }\n\n return {\n responsiveSizeClasses: classes.join(\" \"),\n responsiveSizeStyles: styles\n };\n};\n","import type { IconName } from \"@deckai/icons\";\nimport { IconMap } from \"@deckai/icons\";\nimport type { SVGProps } from \"react\";\nimport React from \"react\";\n\nimport type { IconColors } from \"../types/tailwind\";\nimport { cn } from \"../utils\";\nimport type { ResponsiveSize } from \"../utils/responsive\";\nimport { getResponsiveSize } from \"../utils/responsive\";\n\nexport type IconProps = {\n name: IconName;\n /** @default 24 */\n size?: ResponsiveSize | ResponsiveSize[];\n /** @default primary */\n color?: IconColors;\n title?: string;\n className?: string;\n style?: React.CSSProperties;\n} & Omit<SVGProps<SVGSVGElement>, \"aria-hidden\" | \"aria-label\">;\n\n// Using CSS variables to support dark mode\nconst COLOR_MAP: Record<IconColors, string> = {\n primary: \"var(--color-primary)\",\n secondary: \"var(--color-secondary)\",\n white: \"var(--color-white)\",\n primaryBlue: \"var(--color-primary-100)\",\n disabled: \"var(--color-disabled)\",\n danger: \"var(--color-danger)\",\n tertiary: \"var(--color-tertiary-20)\"\n};\n\nexport const Icon = React.forwardRef<SVGSVGElement, IconProps>(\n (\n {\n name,\n size = 24,\n color = \"primary\",\n title,\n className,\n style = {},\n ...props\n },\n ref\n ) => {\n const IconComponent = IconMap[name];\n const { responsiveSizeClasses, responsiveSizeStyles } = getResponsiveSize(\n size,\n 24\n );\n\n return (\n <div\n className={cn(\n \"flex justify-center items-center\",\n responsiveSizeClasses,\n className\n )}\n style={{\n [\"--icon-stroke\" as string]: COLOR_MAP[color],\n ...responsiveSizeStyles,\n ...style\n }}\n >\n <IconComponent\n ref={ref}\n aria-hidden={!title}\n aria-label={title}\n stroke={name.includes(\"filled\") ? undefined : COLOR_MAP[color]}\n {...props}\n />\n </div>\n );\n }\n);\n\nIcon.displayName = \"Icon\";\n","import React from \"react\";\n\nimport type { Typography } from \"../types/tailwind\";\nimport type { Breakpoint } from \"../utils/responsive\";\n\ntype TextElement =\n | \"p\"\n | \"span\"\n | \"h1\"\n | \"h2\"\n | \"h3\"\n | \"h4\"\n | \"h5\"\n | \"h6\"\n | \"strong\"\n | \"em\"\n | \"blockquote\"\n | \"pre\"\n | \"code\"\n | \"small\"\n | \"label\"\n | \"a\";\n\n// HTML element mapping type\ntype HTMLElementByTag = {\n p: HTMLParagraphElement;\n span: HTMLSpanElement;\n h1: HTMLHeadingElement;\n h2: HTMLHeadingElement;\n h3: HTMLHeadingElement;\n h4: HTMLHeadingElement;\n h5: HTMLHeadingElement;\n h6: HTMLHeadingElement;\n strong: HTMLElement;\n em: HTMLElement;\n blockquote: HTMLQuoteElement;\n pre: HTMLPreElement;\n code: HTMLElement;\n small: HTMLElement;\n label: HTMLLabelElement;\n a: HTMLAnchorElement;\n};\n\n// HTML props mapping type\ntype HTMLPropsMap = {\n p: React.HTMLAttributes<HTMLParagraphElement>;\n span: React.HTMLAttributes<HTMLSpanElement>;\n h1: React.HTMLAttributes<HTMLHeadingElement>;\n h2: React.HTMLAttributes<HTMLHeadingElement>;\n h3: React.HTMLAttributes<HTMLHeadingElement>;\n h4: React.HTMLAttributes<HTMLHeadingElement>;\n h5: React.HTMLAttributes<HTMLHeadingElement>;\n h6: React.HTMLAttributes<HTMLHeadingElement>;\n strong: React.HTMLAttributes<HTMLElement>;\n em: React.HTMLAttributes<HTMLElement>;\n blockquote: React.HTMLAttributes<HTMLQuoteElement>;\n pre: React.HTMLAttributes<HTMLPreElement>;\n code: React.HTMLAttributes<HTMLElement>;\n small: React.HTMLAttributes<HTMLElement>;\n label: React.LabelHTMLAttributes<HTMLLabelElement>;\n a: Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, \"color\">;\n};\n\ntype TextColor =\n | \"primary\"\n | \"secondary\"\n | \"white\"\n | \"primary-blue\"\n | \"disabled\"\n | \"danger\"\n | \"inherit\"\n | \"primary-100\";\n\nconst HEADING_ELEMENT_MAP: Record<string, TextElement> = {\n xl: \"h1\",\n lg: \"h1\",\n md: \"h2\",\n sm: \"h3\",\n xs: \"h4\"\n};\n\nconst getElementFromVariant = (variant: TypographyKey): TextElement => {\n const [category, size] = variant.split(\"-\");\n\n if (category === \"heading\") {\n return HEADING_ELEMENT_MAP[size] || \"p\";\n }\n\n if (category === \"label\") {\n return \"label\";\n }\n\n return \"p\";\n};\n\ntype Weight = \"light\" | \"regular\" | \"semibold\" | \"bold\";\n\nconst fontWeight: Record<Weight, string> = {\n light: \"font-light\",\n regular: \"font-regular\",\n semibold: \"font-semibold\",\n bold: \"font-bold\"\n};\n\nexport type ResponsiveVariant =\n | TypographyKey\n | `${Breakpoint}:${TypographyKey}`;\n\ntype TypographyCategory = keyof Typography;\ntype TypographyValue<T extends TypographyCategory> = Extract<\n keyof Typography[T],\n string | number | bigint | boolean | null | undefined\n>;\ntype TypographyKey = {\n [T in TypographyCategory]: `${T}-${TypographyValue<T>}`;\n}[TypographyCategory];\n\n// Update TextProps to use ResponsiveVariant\nexport type TextProps<T extends TextElement = \"p\"> = {\n variant?: ResponsiveVariant | ResponsiveVariant[];\n color?: TextColor;\n as?: T;\n className?: string;\n children: React.ReactNode;\n weight?: Weight;\n} & HTMLPropsMap[T];\n\n// Add helper function to process variants\nconst processVariants = (\n variants: ResponsiveVariant | ResponsiveVariant[] | undefined\n): string => {\n if (!variants) return \"text-body-default\";\n\n const variantArray = Array.isArray(variants) ? variants : [variants];\n\n return variantArray\n .map((variant) => {\n if (variant.includes(\":\")) {\n const [breakpoint, typographyClass] = variant.split(\":\");\n return `${breakpoint}:text-${typographyClass}`;\n }\n return `text-${variant}`;\n })\n .join(\" \");\n};\n\nexport const Text = React.forwardRef(\n <T extends TextElement = \"p\">(\n {\n variant = \"body-default\",\n color = \"primary\",\n as,\n className,\n children,\n weight,\n ...props\n }: TextProps<T>,\n ref: React.ForwardedRef<HTMLElementByTag[T]>\n ) => {\n // Process typography classes with breakpoints\n const typographyClasses = processVariants(variant);\n\n // Get color styles using Tailwind classes that reference CSS variables\n const colorClasses = color === \"inherit\" ? \"text-inherit\" : `text-${color}`;\n\n const suggestedElement = React.useMemo(() => {\n const baseVariant =\n typeof variant === \"string\"\n ? variant.split(\":\").pop()!\n : Array.isArray(variant)\n ? variant[0].split(\":\").pop()!\n : \"body-default\";\n return getElementFromVariant(baseVariant as TypographyKey);\n }, [variant]);\n\n const Component = (as || suggestedElement) as React.ElementType;\n\n return (\n <Component\n ref={ref}\n className={`\n font-sans antialiased\n ${typographyClasses}\n ${colorClasses}\n ${weight && `!${fontWeight[weight]}`}\n ${className}\n `}\n {...(props as HTMLPropsMap[T])}\n >\n {children}\n </Component>\n );\n }\n);\n\nText.displayName = \"Text\";\n","import type { IconName } from \"@deckai/icons\";\nimport * as React from \"react\";\n\nimport { cn } from \"../utils\";\nimport { Icon } from \"./Icon\";\nimport { Text } from \"./Text\";\n\nexport type BadgeProps = {\n variant?: \"pink\" | \"orange\" | \"green\" | \"purple\";\n iconName?: IconName;\n} & React.HTMLAttributes<HTMLSpanElement>;\n\nconst variants = {\n pink: \"bg-tertiary-5\",\n orange: \"bg-tertiary-15\",\n green: \"bg-tertiary-25\",\n purple: \"bg-secondary-300\"\n};\n\nconst stringToVariant = (str: string): keyof typeof variants => {\n const variantKeys = Object.keys(variants) as Array<keyof typeof variants>;\n // Let's log some values to understand what's happening\n const hash = str\n .split(\"\")\n .reduce((acc, char) => char.charCodeAt(0) + ((acc << 5) - acc), 0);\n\n const index = Math.abs(hash) % variantKeys.length;\n const selectedVariant = variantKeys[index];\n\n return selectedVariant;\n};\n\nexport const Badge = React.forwardRef<HTMLSpanElement, BadgeProps>(\n ({ className, variant, iconName, children, ...props }, ref) => {\n const finalVariant =\n variant ||\n (typeof children === \"string\" ? stringToVariant(children) : \"pink\");\n return (\n <span\n ref={ref}\n className={cn(\n \"inline-flex items-center gap-2\",\n \"rounded px-2 py-1.5\",\n \"text-sm font-medium\",\n variants[finalVariant],\n className\n )}\n {...props}\n >\n {iconName && <Icon size={16} name={iconName} />}\n <Text variant=\"body-xxs-semibold\" className=\"mt-0.5\">\n {children}\n </Text>\n </span>\n );\n }\n);\n\nBadge.displayName = \"Badge\";\n","import React from \"react\";\n\nimport { cn } from \"../utils\";\n\nexport type FallbackVariant = \"text\" | \"image\" | \"button\" | \"card\" | \"avatar\";\nexport type FallbackSize = \"sm\" | \"md\" | \"lg\" | number;\n\nexport type FallbackProps = {\n /**\n * The type of content being loaded\n */\n variant?: FallbackVariant;\n /**\n * The size of the fallback element\n * Can be a predefined size ('sm' | 'md' | 'lg') or a custom pixel value\n */\n size?: FallbackSize;\n /**\n * Whether to show multiple lines (only applies to text variant)\n */\n lines?: number;\n /**\n * Additional classes to apply to the fallback\n */\n className?: string;\n /**\n * Whether to show the loading animation\n */\n animate?: boolean;\n};\n\n// Updated to match existing component sizes\nconst sizeMap = {\n sm: \"h-4\", // 16px\n md: \"h-6\", // 24px\n lg: \"h-8\" // 32px\n};\n\n// Updated to match existing component sizes\nconst widthMap = {\n sm: \"w-20\", // 80px\n md: \"w-32\", // 128px\n lg: \"w-48\" // 192px\n};\n\n// Updated to match Avatar sizes\nconst avatarSizeMap = {\n sm: \"w-8 h-8\", // 32px\n md: \"w-12 h-12\", // 48px\n lg: \"w-16 h-16\" // 64px\n};\n\nexport const Fallback = React.forwardRef<HTMLDivElement, FallbackProps>(\n (\n { variant = \"text\", size = \"md\", lines = 1, className, animate = true },\n ref\n ) => {\n const baseClasses = \"bg-secondary-50 rounded-lg overflow-hidden\";\n const animationClasses = animate ? \"animate-pulse\" : \"\";\n\n const getCustomSizeStyle = (size: number) => ({\n height: `${size}px`,\n width:\n variant === \"avatar\" || variant === \"image\" ? `${size}px` : undefined\n });\n\n const customStyle =\n typeof size === \"number\" ? getCustomSizeStyle(size) : undefined;\n\n const renderContent = () => {\n switch (variant) {\n case \"text\":\n return (\n <div className=\"flex flex-col gap-2\">\n {Array.from({ length: lines }).map((_, index) => (\n <div\n key={index}\n style={customStyle}\n className={cn(\n baseClasses,\n animationClasses,\n typeof size === \"string\" ? sizeMap[size] : undefined,\n index === lines - 1 && lines > 1 ? \"w-3/4\" : \"w-full\",\n className\n )}\n />\n ))}\n </div>\n );\n\n case \"image\":\n return (\n <div\n style={customStyle}\n className={cn(\n baseClasses,\n animationClasses,\n (!customStyle || !className) &&\n \"aspect-square w-full max-w-[300px]\",\n className\n )}\n />\n );\n\n case \"button\":\n return (\n <div\n style={customStyle}\n className={cn(\n baseClasses,\n animationClasses,\n typeof size === \"string\" && [sizeMap[size], widthMap[size]],\n className\n )}\n />\n );\n\n case \"card\":\n return (\n <div\n className={cn(\n \"flex flex-col gap-4 p-6 border border-stroke rounded-xl\",\n className\n )}\n >\n <div\n className={cn(\n baseClasses,\n animationClasses,\n \"w-16 h-16 rounded-full\"\n )}\n />\n <div className=\"space-y-2\">\n <div\n className={cn(baseClasses, animationClasses, \"h-6 w-3/4\")}\n />\n <div\n className={cn(baseClasses, animationClasses, \"h-4 w-1/2\")}\n />\n </div>\n <div className=\"space-y-2\">\n <div\n className={cn(baseClasses, animationClasses, \"h-4 w-full\")}\n />\n <div\n className={cn(baseClasses, animationClasses, \"h-4 w-full\")}\n />\n <div\n className={cn(baseClasses, animationClasses, \"h-4 w-2/3\")}\n />\n </div>\n </div>\n );\n\n case \"avatar\":\n return (\n <div\n style={customStyle}\n className={cn(\n baseClasses,\n animationClasses,\n \"rounded-full\",\n {\n [avatarSizeMap.sm]: size === \"sm\",\n [avatarSizeMap.md]: size === \"md\",\n [avatarSizeMap.lg]: size === \"lg\"\n },\n className\n )}\n />\n );\n\n default:\n return null;\n }\n };\n\n return (\n <div ref={ref} className={cn(\"w-full\", className)}>\n {renderContent()}\n </div>\n );\n }\n);\n\nFallback.displayName = \"Fallback\";\n","import type { ButtonHTMLAttributes } from \"react\";\nimport React from \"react\";\n\nimport { cn } from \"../utils\";\nimport { focusRingStyles } from \"../utils/tailwind\";\n\nexport type PressableProps = ButtonHTMLAttributes<HTMLButtonElement>;\n\nexport const Pressable = React.forwardRef<HTMLButtonElement, PressableProps>(\n ({ children, type = \"button\", className, disabled, ...props }, ref) => (\n <button\n ref={ref}\n type={type}\n disabled={disabled}\n className={cn(\n \"appearance-none hover:opacity-80 transition-all active:scale-95\",\n focusRingStyles,\n disabled && \"opacity-50 cursor-not-allowed\",\n className\n )}\n {...props}\n >\n {children}\n </button>\n )\n);\n\nPressable.displayName = \"Pressable\";\n","import type { Colors, Typography } from \"../types/tailwind\";\n\n// Generate safelist patterns for all color utilities so you can use any theme color variable in your code\nexport const generateSafelist = (colors: Colors, typography: Typography) => {\n const colorNames = Object.keys(colors) as (keyof Colors)[];\n const utilities = [\"bg\", \"text\", \"border\", \"ring\", \"divide\", \"outline\"];\n const variants = [\"hover:\", \"focus:\", \"active:\", \"disabled:\"];\n const breakpoints = [\"sm\", \"md\", \"lg\", \"xl\", \"2xl\"];\n const sizes = [\"24\", \"42\", \"48\", \"64\", \"72\"]; // Add all the sizes you need\n\n const safelist: (string | { pattern: RegExp; variants: string[] })[] = [];\n\n colorNames.forEach((colorName) => {\n if (typeof colors[colorName] === \"object\") {\n // Handle nested color objects (with number keys)\n Object.keys(colors[colorName]).forEach((shade) => {\n utilities.forEach((utility) => {\n // Base utility\n safelist.push(`${utility}-${colorName}-${shade}`);\n\n // Variant utilities\n variants.forEach((variant) => {\n safelist.push(`${variant}${utility}-${colorName}-${shade}`);\n });\n });\n });\n } else {\n // Handle direct color values\n utilities.forEach((utility) => {\n safelist.push(`${utility}-${colorName}`);\n\n variants.forEach((variant) => {\n safelist.push(`${variant}${utility}-${colorName}`);\n });\n });\n }\n });\n\n // Generate typography classes\n Object.entries(typography).forEach(([family, sizes]) => {\n Object.keys(sizes).forEach((size) => {\n // Base typography classes\n safelist.push(`text-${family}-${size}`);\n\n // Add variants\n variants.forEach((variant) => {\n safelist.push(`${variant}text-${family}-${size}`);\n });\n });\n });\n\n const typographyClasses = Object.entries(typography).flatMap(\n ([category, sizes]) =>\n Object.keys(sizes).map((size) => `text-${category}-${size}`)\n );\n\n // Generate responsive variants\n const responsiveTypographyClasses = typographyClasses.flatMap((className) =>\n breakpoints.map((breakpoint) => `${breakpoint}:${className}`)\n );\n\n // Generate size classes with responsive variants\n const sizeClasses = sizes.flatMap((size) => [\n `h-[${size}px]`,\n `w-[${size}px]`,\n ...breakpoints.flatMap((bp) => [\n `${bp}:h-[${size}px]`,\n `${bp}:w-[${size}px]`\n ])\n ]);\n\n return [...typographyClasses, ...responsiveTypographyClasses, ...sizeClasses];\n};\n\nexport const focusRingStyles =\n \"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-100\";\nexport const focusRingWithinStyles =\n \"focus-within:outline-none focus-within:ring-2 focus-within:ring-primary-100\";\nexport const focusRingStylesCoerced = \"ring-2 ring-primary-100\";\n","import type { HTMLAttributes } from \"react\";\nimport React, { useCallback, useState } from \"react\";\n\nimport { cn } from \"../utils\";\nimport { Icon } from \"./Icon\";\nimport type { PressableProps } from \"./Pressable\";\nimport { Pressable } from \"./Pressable\";\nimport { Text } from \"./Text\";\n\nexport type TagProps = {\n children: React.ReactNode;\n padded?: boolean;\n color?: \"primary\" | \"text\";\n onClose?: () => void;\n} & HTMLAttributes<HTMLDivElement> &\n PressableProps;\n\nexport function Tag({\n children,\n color = \"primary\",\n className,\n onClose,\n ...pressableProps\n}: TagProps) {\n const [isHovered, setIsHovered] = useState(false);\n\n const handleMouseEnter = useCallback(() => {\n setIsHovered(true);\n }, []);\n\n const handleMouseLeave = useCallback(() => {\n setIsHovered(false);\n }, []);\n\n const content = (\n <div\n className={cn(\n \"flex gap-2\",\n onClose\n ? \"justify-between items-center max-w-fit\"\n : \"items-center justify-center\",\n \"hover:bg-primary-100 rounded bg-secondary-400 px-2 py-1 sm:px-3 sm:py-1.5 h-min hover:text-white\",\n color === \"primary\" ? \"text-primary-100\" : \"text-primary\",\n className\n )}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n >\n {typeof children === \"string\" ? (\n <Text\n color=\"inherit\"\n variant={[\"md:body-default-medium\", \"body-xxs-medium\"]}\n className=\"truncate pt-0.5\"\n >\n {children}\n </Text>\n ) : (\n children\n )}\n {onClose && (\n <Pressable\n {...pressableProps}\n onClick={onClose}\n className=\"flex items-center justify-center\"\n >\n <Icon\n name=\"close\"\n size={12}\n color={isHovered ? \"white\" : \"primaryBlue\"}\n />\n </Pressable>\n )}\n </div>\n );\n\n return onClose ? (\n content\n ) : (\n <Pressable {...pressableProps}>{content}</Pressable>\n );\n}\n","import type { IconName } from \"@deckai/icons\";\nimport React, { useCallback, useLayoutEffect, useRef, useState } from \"react\";\n\nimport { cn } from \"../utils\";\nimport { Badge } from \"./Badge\";\nimport { Fallback } from \"./Fallback\";\nimport { Icon } from \"./Icon\";\nimport { Pressable } from \"./Pressable\";\nimport { Tag } from \"./Tag\";\nimport { Text } from \"./Text\";\n\n// New hook for truncation logic\nconst useTruncateItems = () => {\n const containerRef = useRef<HTMLDivElement>(null);\n const itemRefs = useRef<Array<HTMLDivElement | null>>([]);\n const [visibleItemsCount, setVisibleItemsCount] = useState<number>(0);\n\n // Handle ref assignment for items\n const setItemRef = useCallback(\n (index: number) => (el: HTMLDivElement | null) => {\n itemRefs.current[index] = el;\n },\n []\n );\n\n // Calculate how many items can fit in the container\n const calculateVisibleItems = useCallback((itemsLength: number) => {\n if (!containerRef.current || itemsLength === 0) return;\n\n const containerWidth = containerRef.current.offsetWidth;\n let totalWidth = 0;\n let visibleCount = 0;\n\n // Reset refs array to match items length\n itemRefs.current = itemRefs.current.slice(0, itemsLength);\n\n // Calculate width of each item\n for (let i = 0; i < itemRefs.current.length; i++) {\n const itemElement = itemRefs.current[i];\n if (!itemElement) continue;\n\n // Get width + margins\n const style = window.getComputedStyle(itemElement);\n const width =\n itemElement.offsetWidth +\n parseFloat(style.marginLeft || \"0\") +\n parseFloat(style.marginRight || \"0\");\n\n // Account for the \"+X\" item if we can't fit all\n if (i < itemsLength - 1) {\n // Estimate the width of \"+X\" item (approx 60px)\n const remainingWidth = containerWidth - totalWidth - 60;\n\n if (remainingWidth < width) {\n break;\n }\n }\n\n totalWidth += width;\n visibleCount++;\n\n // If total width exceeds container, reduce visible count\n if (totalWidth > containerWidth) {\n visibleCount = Math.max(0, visibleCount - 1);\n break;\n }\n }\n\n setVisibleItemsCount(Math.max(1, visibleCount)); // Ensure at least one item is visible\n }, []);\n\n // Setup effect to run the calculation\n const setupTruncation = useCallback(\n (itemsLength: number) => {\n // Initialize with all items visible\n setVisibleItemsCount(itemsLength);\n\n if (itemsLength === 0) {\n return () => {};\n }\n\n // Run the calculation after a small delay to ensure layout is complete\n const timeoutId = setTimeout(\n () => calculateVisibleItems(itemsLength),\n 100\n );\n\n // Add resize listener to recalculate on window resize\n const handleResize = () => calculateVisibleItems(itemsLength);\n window.addEventListener(\"resize\", handleResize);\n\n return () => {\n clearTimeout(timeoutId);\n window.removeEventListener(\"resize\", handleResize);\n };\n },\n [calculateVisibleItems]\n );\n\n return {\n containerRef,\n setItemRef,\n visibleItemsCount,\n setupTruncation\n };\n};\n\nexport type CreatorCardProps = {\n /** Creator's name */\n name: string;\n /** Creator's profile image URL */\n profileImage?: string;\n /** Creator's tags/skills */\n tags?: string[];\n /** Creator's badges with icons */\n badges?: Array<{\n label: string;\n icon: IconName;\n }>;\n /** Creator's rating (out of 5) */\n rating?: number;\n /** Number of reviews */\n reviewCount?: number;\n /** Handler for when the card is clicked */\n onClick?: () => void;\n /** Additional class names */\n className?: string;\n /** Whether the component is in a loading state */\n isLoading?: boolean;\n /** Whether the creator is favorited */\n isFavorited?: boolean;\n /** Handler for when the favorite button is clicked */\n onFavoriteClick?: (e: React.MouseEvent) => void;\n};\n\nexport function CreatorCard({\n name,\n profileImage,\n tags,\n badges,\n rating,\n reviewCount,\n onClick,\n className,\n isLoading,\n isFavorited = false,\n onFavoriteClick\n}: CreatorCardProps) {\n const handleFavoriteClick = useCallback(\n (e: React.MouseEvent) => {\n e.stopPropagation();\n onFavoriteClick?.(e);\n },\n [onFavoriteClick]\n );\n\n // Format the rating to display only one decimal place if needed\n const formattedRating = rating\n ? rating.toFixed(1).replace(/\\.0$/, \"\")\n : undefined;\n\n // Use the truncation hook for tags\n const {\n containerRef: tagsContainerRef,\n setItemRef: setTagRef,\n visibleItemsCount: visibleTagsCount,\n setupTruncation: setupTagsTruncation\n } = useTruncateItems();\n\n // Use the truncation hook for badges\n const {\n containerRef: badgesContainerRef,\n setItemRef: setBadgeRef,\n visibleItemsCount: visibleBadgesCount,\n setupTruncation: setupBadgesTruncation\n } = useTruncateItems();\n\n // Setup truncation for tags\n useLayoutEffect(() => {\n // Set an initial value before calculation\n const cleanup = setupTagsTruncation(tags?.length || 0);\n\n // Force a recalculation after a delay to ensure all refs are set\n const forceUpdateTimeout = setTimeout(() => {\n if (tags && tags.length > 0) {\n setupTagsTruncation(tags.length);\n }\n }, 200);\n\n return () => {\n cleanup();\n clearTimeout(forceUpdateTimeout);\n };\n }, [tags, setupTagsTruncation]);\n\n // Setup truncation for badges\n useLayoutEffect(() => {\n // Set an initial value before calculation\n const cleanup = setupBadgesTruncation(badges?.length || 0);\n\n // Force a recalculation after a delay to ensure all refs are set\n const forceUpdateTimeout = setTimeout(() => {\n if (badges && badges.length > 0) {\n setupBadgesTruncation(badges.length);\n }\n }, 200);\n\n return () => {\n cleanup();\n clearTimeout(forceUpdateTimeout);\n };\n }, [badges, setupBadgesTruncation]);\n\n return (\n <Pressable onClick={onClick}>\n <div\n className={cn(\n \"relative bg-background-0 rounded-xl overflow-hidden shadow-2xl max-w-[210px] md:max-w-[318px] max-h-[339px] md:max-h-[469px]\",\n className\n )}\n >\n {isLoading ? (\n <Fallback variant=\"card\" className=\"w-full h-full\" />\n ) : (\n <>\n <div className=\"relative aspect-square w-full bg-gray-200\">\n {profileImage && (\n <img\n src={profileImage}\n alt={name}\n className=\"w-full h-full object-cover\"\n />\n )}\n\n {/* Heart Icon */}\n <div className=\"absolute top-4 right-4\">\n <Pressable\n onClick={handleFavoriteClick}\n className=\"rounded-full p-2\"\n >\n <Icon\n name=\"heart\"\n size={24}\n color=\"white\"\n style={{\n fill: isFavorited ? \"white\" : \"none\"\n }}\n />\n </Pressable>\n </div>\n\n {/* Badges with truncation */}\n {badges && badges.length > 0 && (\n <div\n ref={badgesContainerRef}\n className=\"absolute bottom-4 left-4 flex gap-2 overflow-hidden max-w-[90%] flex-nowrap whitespace-nowrap\"\n >\n {badges.slice(0, visibleBadgesCount).map((badge, index) => (\n <div\n key={index}\n ref={setBadgeRef(index)}\n className=\"shrink-0\"\n >\n <Badge iconName={badge.icon}>{badge.label}</Badge>\n </div>\n ))}\n {visibleBadgesCount < (badges?.length || 0) && (\n <div className=\"shrink-0\">\n <Badge>+{badges.length - visibleBadgesCount}</Badge>\n </div>\n )}\n </div>\n )}\n </div>\n\n <div className=\"flex flex-col p-4 items-start\">\n <Text variant={[\"lg:heading-xs\", \"body-default-semibold\"]}>\n {name}\n </Text>\n {formattedRating && (\n <div className=\"flex gap-1 items-center\">\n <Text\n variant={[\"lg:body-lg-semibold\", \"body-default-semibold\"]}\n >\n {formattedRating}\n </Text>\n <Icon\n name=\"star-filled\"\n size={[\"lg:16\", 12]}\n color=\"tertiary\"\n />\n <Text\n variant={[\"lg:body-md\", \"body-default-semibold\"]}\n color=\"secondary\"\n as=\"span\"\n >\n ({reviewCount})\n </Text>\n </div>\n )}\n {tags && tags.length > 0 && (\n <div\n ref={tagsContainerRef}\n className=\"flex flex-nowrap overflow-hidden gap-2 pt-4 w-full\"\n >\n {tags.slice(0, visibleTagsCount).map((tag, index) => (\n <div key={index} ref={setTagRef(index)}>\n <Tag>{tag}</Tag>\n </div>\n ))}\n {visibleTagsCount < (tags?.length || 0) && (\n <Tag>+{tags.length - visibleTagsCount}</Tag>\n )}\n </div>\n )}\n </div>\n </>\n )}\n </div>\n </Pressable>\n );\n}\n"]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
'use strict';var h=require('@radix-ui/react-dropdown-menu'),
|
|
1
|
+
'use strict';var h=require('@radix-ui/react-dropdown-menu'),x=require('react'),clsx=require('clsx'),tailwindMerge=require('tailwind-merge'),icons=require('@deckai/icons'),l=require('@radix-ui/react-tooltip');function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var h__namespace=/*#__PURE__*/_interopNamespace(h);var x__namespace=/*#__PURE__*/_interopNamespace(x);var l__namespace=/*#__PURE__*/_interopNamespace(l);function g(...e){return tailwindMerge.twMerge(clsx.clsx(e))}var R={12:"h-[12px] w-[12px]",16:"h-[16px] w-[16px]",18:"h-[18px] w-[18px]",20:"h-[20px] w-[20px]",24:"h-[24px] w-[24px]",32:"h-[32px] w-[32px]",36:"h-[36px] w-[36px]",40:"h-[40px] w-[40px]",42:"h-[42px] w-[42px]",48:"h-[48px] w-[48px]",64:"h-[64px] w-[64px]",72:"h-[72px] w-[72px]",80:"h-[80px] w-[80px]"},$={sm:{12:"sm:h-[12px] sm:w-[12px]",16:"sm:h-[16px] sm:w-[16px]",18:"sm:h-[18px] sm:w-[18px]",20:"sm:h-[20px] sm:w-[20px]",24:"sm:h-[24px] sm:w-[24px]",32:"sm:h-[32px] sm:w-[32px]",36:"sm:h-[36px] sm:w-[36px]",40:"sm:h-[40px] sm:w-[40px]",42:"sm:h-[42px] sm:w-[42px]",48:"sm:h-[48px] sm:w-[48px]",64:"sm:h-[64px] sm:w-[64px]",72:"sm:h-[72px] sm:w-[72px]",80:"sm:h-[80px] sm:w-[80px]"},md:{12:"md:h-[12px] md:w-[12px]",16:"md:h-[16px] md:w-[16px]",18:"md:h-[18px] md:w-[18px]",20:"md:h-[20px] md:w-[20px]",24:"md:h-[24px] md:w-[24px]",32:"md:h-[32px] md:w-[32px]",36:"md:h-[36px] md:w-[36px]",40:"md:h-[40px] md:w-[40px]",42:"md:h-[42px] md:w-[42px]",48:"md:h-[48px] md:w-[48px]",64:"md:h-[64px] md:w-[64px]",72:"md:h-[72px] md:w-[72px]",80:"md:h-[80px] md:w-[80px]"},lg:{12:"lg:h-[12px] lg:w-[12px]",16:"lg:h-[16px] lg:w-[16px]",18:"lg:h-[18px] lg:w-[18px]",20:"lg:h-[20px] lg:w-[20px]",24:"lg:h-[24px] lg:w-[24px]",32:"lg:h-[32px] lg:w-[32px]",36:"lg:h-[36px] lg:w-[36px]",40:"lg:h-[40px] lg:w-[40px]",42:"lg:h-[42px] lg:w-[42px]",48:"lg:h-[48px] lg:w-[48px]",64:"lg:h-[64px] lg:w-[64px]",72:"lg:h-[72px] lg:w-[72px]",80:"lg:h-[80px] lg:w-[80px]"},xl:{12:"xl:h-[12px] xl:w-[12px]",16:"xl:h-[16px] xl:w-[16px]",18:"xl:h-[18px] xl:w-[18px]",20:"xl:h-[20px] xl:w-[20px]",24:"xl:h-[24px] xl:w-[24px]",32:"xl:h-[32px] xl:w-[32px]",36:"xl:h-[36px] xl:w-[36px]",40:"xl:h-[40px] xl:w-[40px]",42:"xl:h-[42px] xl:w-[42px]",48:"xl:h-[48px] xl:w-[48px]",64:"xl:h-[64px] xl:w-[64px]",72:"xl:h-[72px] xl:w-[72px]",80:"xl:h-[80px] xl:w-[80px]"},"2xl":{12:"2xl:h-[12px] 2xl:w-[12px]",16:"2xl:h-[16px] 2xl:w-[16px]",18:"2xl:h-[18px] 2xl:w-[18px]",20:"2xl:h-[20px] 2xl:w-[20px]",24:"2xl:h-[24px] 2xl:w-[24px]",32:"2xl:h-[32px] 2xl:w-[32px]",36:"2xl:h-[36px] 2xl:w-[36px]",40:"2xl:h-[40px] 2xl:w-[40px]",42:"2xl:h-[42px] 2xl:w-[42px]",48:"2xl:h-[48px] 2xl:w-[48px]",64:"2xl:h-[64px] 2xl:w-[64px]",72:"2xl:h-[72px] 2xl:w-[72px]",80:"2xl:h-[80px] 2xl:w-[80px]"}},H=e=>String(e),I=(e,t=24)=>{let o=[],r={};if(e===void 0){let n=H(t);n?o.push(R[n]):(r.height=`${t}px`,r.width=`${t}px`);}if(typeof e=="number"){let n=H(e);n?o.push(R[n]):(r.height=`${e}px`,r.width=`${e}px`);}if(Array.isArray(e)){let n=H(t),s=[n&&R[n]||`h-[${t}px] w-[${t}px]`];e.forEach(i=>{if(typeof i=="string"){let[p,d]=i.split(":"),a=parseInt(d,10),c=H(a);o.push(c&&$[p]?.[c]||`${p}:h-[${a}px] ${p}:w-[${a}px]`);}}),o.push(...s);}if(typeof e=="string"){let[n,s]=e.split(":"),i=parseInt(s,10),p=H(i);o.push(p&&$[n]?.[p]||`${n}:h-[${i}px] ${n}:w-[${i}px]`);}return {responsiveSizeClasses:o.join(" "),responsiveSizeStyles:r}};var V={primary:"var(--color-primary)",secondary:"var(--color-secondary)",white:"var(--color-white)",primaryBlue:"var(--color-primary-100)",disabled:"var(--color-disabled)",danger:"var(--color-danger)",tertiary:"var(--color-tertiary-20)"},P=x__namespace.default.forwardRef(({name:e,size:t=24,color:o="primary",title:r,className:n,style:s={},...i},p)=>{let d=icons.IconMap[e],{responsiveSizeClasses:a,responsiveSizeStyles:c}=I(t,24);return x__namespace.default.createElement("div",{className:g("flex justify-center items-center",a,n),style:{"--icon-stroke":V[o],...c,...s}},x__namespace.default.createElement(d,{ref:p,"aria-hidden":!r,"aria-label":r,stroke:e.includes("filled")?void 0:V[o],...i}))});P.displayName="Icon";var _={xl:"h1",lg:"h1",md:"h2",sm:"h3",xs:"h4"},j=e=>{let[t,o]=e.split("-");return t==="heading"?_[o]||"p":t==="label"?"label":"p"},W={light:"font-light",regular:"font-regular",semibold:"font-semibold",bold:"font-bold"},q=e=>e?(Array.isArray(e)?e:[e]).map(o=>{if(o.includes(":")){let[r,n]=o.split(":");return `${r}:text-${n}`}return `text-${o}`}).join(" "):"text-body-default",f=x__namespace.default.forwardRef(({variant:e="body-default",color:t="primary",as:o,className:r,children:n,weight:s,...i},p)=>{let d=q(e),a=t==="inherit"?"text-inherit":`text-${t}`,c=x__namespace.default.useMemo(()=>{let y=typeof e=="string"?e.split(":").pop():Array.isArray(e)?e[0].split(":").pop():"body-default";return j(y)},[e]);return x__namespace.default.createElement(o||c,{ref:p,className:`
|
|
2
2
|
font-sans antialiased
|
|
3
3
|
${d}
|
|
4
4
|
${a}
|
|
5
5
|
${s&&`!${W[s]}`}
|
|
6
6
|
${r}
|
|
7
|
-
`,...i},n)});f.displayName="Text";var D={pink:"bg-tertiary-5",orange:"bg-tertiary-15",green:"bg-tertiary-25",purple:"bg-secondary-300"},F=e=>{let t=Object.keys(D),o=e.split("").reduce((s,i)=>i.charCodeAt(0)+((s<<5)-s),0),r=Math.abs(o)%t.length;return t[r]},k=
|
|
7
|
+
`,...i},n)});f.displayName="Text";var D={pink:"bg-tertiary-5",orange:"bg-tertiary-15",green:"bg-tertiary-25",purple:"bg-secondary-300"},F=e=>{let t=Object.keys(D),o=e.split("").reduce((s,i)=>i.charCodeAt(0)+((s<<5)-s),0),r=Math.abs(o)%t.length;return t[r]},k=x__namespace.forwardRef(({className:e,variant:t,iconName:o,children:r,...n},s)=>{let i=t||(typeof r=="string"?F(r):"pink");return x__namespace.createElement("span",{ref:s,className:g("inline-flex items-center gap-2","rounded px-2 py-1.5","text-sm font-medium",D[i],e),...n},o&&x__namespace.createElement(P,{size:16,name:o}),x__namespace.createElement(f,{variant:"body-xxs-semibold",className:"mt-0.5"},r))});k.displayName="Badge";function B({content:e,children:t,side:o="bottom",align:r="center",className:n,delayDuration:s=200,defaultOpen:i,open:p,onOpenChange:d,longPressDuration:a=500}){let[c,v]=x.useState(i||false),y=null,L=p??c,T=x.useCallback(M=>{p||v(M),d?.(M);},[p,d]),E=x.useCallback(()=>{y=setTimeout(()=>{T(true);},a);},[T,a]),b=x.useCallback(()=>{y&&(clearTimeout(y),y=null),setTimeout(()=>T(false),1500);},[y,T]);return x__namespace.createElement(l__namespace.Provider,{delayDuration:s},x__namespace.createElement(l__namespace.Root,{open:L,onOpenChange:T},x__namespace.createElement(l__namespace.Trigger,{asChild:true},x__namespace.createElement("span",{tabIndex:0,onTouchStart:E,onTouchEnd:b,onTouchCancel:b},t)),x__namespace.createElement(l__namespace.Portal,null,x__namespace.createElement(l__namespace.Content,{side:o,align:r,sideOffset:4,className:g("z-50 overflow-hidden rounded-lg","bg-primary px-3 py-1.5","text-xs text-white","animate-in fade-in-0 zoom-in-95","data-[state=closed]:animate-out data-[state=closed]:fade-out-0","data-[side=bottom]:slide-in-from-top-2","data-[side=top]:slide-in-from-bottom-2","select-none","max-w-60","touch-none",n)},typeof e=="string"?x__namespace.createElement(f,{variant:"body-default-medium",color:"white"},e):e,x__namespace.createElement(l__namespace.Arrow,{className:"fill-text-primary",width:10,height:5})))))}function Z({text:e,highlight:t}){if(!t)return x__namespace.default.createElement(x__namespace.default.Fragment,null,e);let o=e.split(new RegExp(`(${t})`,"i"));return x__namespace.default.createElement(x__namespace.default.Fragment,null,o.map((r,n)=>r.toLowerCase()===t.toLowerCase()?x__namespace.default.createElement("span",{key:n,className:"font-bold"},r):r))}var K=x__namespace.default.forwardRef(({value:e,label:t,onChange:o,onKeyDown:r,onMouseEnter:n,onMouseLeave:s,selected:i,color:p,disabled:d,className:a,id:c,role:v,"aria-selected":y,searchValue:L="",tooltip:T,onClick:E,badge:b},M)=>{let N=x__namespace.default.createElement("button",{ref:M,type:"button",id:c,role:v,"aria-selected":y,disabled:d,className:g("relative w-full text-left px-2 py-1.5 text-sm rounded outline-none text-primary","cursor-pointer hover:bg-background-50","disabled:opacity-50 disabled:cursor-not-allowed",i&&"bg-background-50","flex items-center gap-2",a),onClick:()=>{o?.(e),E?.();},onKeyDown:r,onMouseEnter:n,onMouseLeave:s},x__namespace.default.createElement(f,{variant:"body-default-medium",color:p==="danger"?"danger":"inherit"},typeof t=="string"?x__namespace.default.createElement(Z,{text:t,highlight:L}):t),b&&x__namespace.default.createElement(k,null,b));return T?x__namespace.default.createElement(B,{content:T},N):N});var J=x__namespace.forwardRef(({trigger:e,items:t,className:o,onSelect:r,align:n="end"},s)=>{let i=x__namespace.useCallback(p=>{r?.(p);},[r]);return x__namespace.createElement(h__namespace.Root,null,x__namespace.createElement(h__namespace.Trigger,{asChild:true},e),x__namespace.createElement(h__namespace.Portal,null,x__namespace.createElement(h__namespace.Content,{ref:s,align:n,sideOffset:4,className:g("z-50 min-w-[220px]","bg-background-0 rounded-lg p-1","shadow-lg border border-gray-100","animate-in fade-in-0 zoom-in-95",o)},t.map(p=>x__namespace.createElement(h__namespace.Item,{key:p.value,disabled:p.disabled,onClick:()=>p.onClick&&p.onClick(),onSelect:()=>i(p.value),className:"outline-none",asChild:true},x__namespace.createElement(K,{...p,className:"py-3 px-6",onChange:i}))))))});J.displayName="Dropdown";exports.Dropdown=J;//# sourceMappingURL=Dropdown.cjs.map
|
|
8
8
|
//# sourceMappingURL=Dropdown.cjs.map
|