@deckai/deck-ui 0.0.30 → 0.0.31
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/Badge.d.cts +1 -1
- package/dist/components/Badge.d.ts +1 -1
- package/dist/components/Input.d.cts +1 -1
- package/dist/components/Input.d.ts +1 -1
- package/dist/components/OrderCard.cjs +8 -0
- package/dist/components/OrderCard.cjs.map +1 -0
- package/dist/components/OrderCard.d.cts +18 -0
- package/dist/components/OrderCard.d.ts +18 -0
- package/dist/components/OrderCard.js +8 -0
- package/dist/components/OrderCard.js.map +1 -0
- package/dist/components/OrderProgress.cjs +8 -0
- package/dist/components/OrderProgress.cjs.map +1 -0
- package/dist/components/OrderProgress.d.cts +15 -0
- package/dist/components/OrderProgress.d.ts +15 -0
- package/dist/components/OrderProgress.js +8 -0
- package/dist/components/OrderProgress.js.map +1 -0
- package/dist/components/OrderSummary.cjs +8 -0
- package/dist/components/OrderSummary.cjs.map +1 -0
- package/dist/components/OrderSummary.d.cts +18 -0
- package/dist/components/OrderSummary.d.ts +18 -0
- package/dist/components/OrderSummary.js +8 -0
- package/dist/components/OrderSummary.js.map +1 -0
- package/dist/components/ReviewCard.cjs +5 -5
- package/dist/components/ReviewCard.cjs.map +1 -1
- package/dist/components/ReviewCard.js +5 -5
- package/dist/components/ReviewCard.js.map +1 -1
- package/dist/components/Text.d.cts +1 -1
- package/dist/components/Text.d.ts +1 -1
- package/dist/components/Toast.d.cts +1 -1
- package/dist/components/Toast.d.ts +1 -1
- package/dist/index.cjs +8 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +8 -8
- package/dist/index.js.map +1 -1
- package/dist/styles/styles.css +1 -1
- package/package.json +2 -2
|
@@ -6,7 +6,7 @@ type BadgeProps = {
|
|
|
6
6
|
iconName?: IconName;
|
|
7
7
|
} & React.HTMLAttributes<HTMLSpanElement>;
|
|
8
8
|
declare const Badge: React.ForwardRefExoticComponent<{
|
|
9
|
-
variant?: "
|
|
9
|
+
variant?: "pink" | "orange" | "green" | "purple" | undefined;
|
|
10
10
|
iconName?: IconName | undefined;
|
|
11
11
|
} & React.HTMLAttributes<HTMLSpanElement> & React.RefAttributes<HTMLSpanElement>>;
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@ type BadgeProps = {
|
|
|
6
6
|
iconName?: IconName;
|
|
7
7
|
} & React.HTMLAttributes<HTMLSpanElement>;
|
|
8
8
|
declare const Badge: React.ForwardRefExoticComponent<{
|
|
9
|
-
variant?: "
|
|
9
|
+
variant?: "pink" | "orange" | "green" | "purple" | undefined;
|
|
10
10
|
iconName?: IconName | undefined;
|
|
11
11
|
} & React.HTMLAttributes<HTMLSpanElement> & React.RefAttributes<HTMLSpanElement>>;
|
|
12
12
|
|
|
@@ -47,6 +47,6 @@ declare const Input: React.ForwardRefExoticComponent<{
|
|
|
47
47
|
showCharacterCount?: boolean | undefined;
|
|
48
48
|
/** Maximum number of characters */
|
|
49
49
|
maxLength?: number | undefined;
|
|
50
|
-
} & React.InputHTMLAttributes<HTMLInputElement> & Pick<IconProps, "
|
|
50
|
+
} & React.InputHTMLAttributes<HTMLInputElement> & Pick<IconProps, "title" | "color" | "size"> & React.RefAttributes<HTMLInputElement>>;
|
|
51
51
|
|
|
52
52
|
export { Input, type InputProps };
|
|
@@ -47,6 +47,6 @@ declare const Input: React.ForwardRefExoticComponent<{
|
|
|
47
47
|
showCharacterCount?: boolean | undefined;
|
|
48
48
|
/** Maximum number of characters */
|
|
49
49
|
maxLength?: number | undefined;
|
|
50
|
-
} & React.InputHTMLAttributes<HTMLInputElement> & Pick<IconProps, "
|
|
50
|
+
} & React.InputHTMLAttributes<HTMLInputElement> & Pick<IconProps, "title" | "color" | "size"> & React.RefAttributes<HTMLInputElement>>;
|
|
51
51
|
|
|
52
52
|
export { Input, type InputProps };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
'use strict';Object.defineProperty(exports,'__esModule',{value:true});var x=require('react'),clsx=require('clsx'),tailwindMerge=require('tailwind-merge');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var x__default=/*#__PURE__*/_interopDefault(x);function n(...e){return tailwindMerge.twMerge(clsx.clsx(e))}var L={sm:"h-4",md:"h-6",lg:"h-8"},R={sm:"w-20",md:"w-32",lg:"w-48"},b={sm:"w-8 h-8",md:"w-12 h-12",lg:"w-16 h-16"},T=x__default.default.forwardRef(({variant:e="text",size:t="md",lines:r=1,className:o,animate:s=true},a)=>{let l="bg-secondary-50 rounded-lg overflow-hidden",p=s?"animate-pulse":"",i=typeof t=="number"?(u=>({height:`${u}px`,width:e==="avatar"||e==="image"?`${u}px`:void 0}))(t):void 0,d=()=>{switch(e){case "text":return x__default.default.createElement("div",{className:"flex flex-col gap-2"},Array.from({length:r}).map((u,y)=>x__default.default.createElement("div",{key:y,style:i,className:n(l,p,typeof t=="string"?L[t]:void 0,y===r-1&&r>1?"w-3/4":"w-full",o)})));case "image":return x__default.default.createElement("div",{style:i,className:n(l,p,(!i||!o)&&"aspect-square w-full max-w-[300px]",o)});case "button":return x__default.default.createElement("div",{style:i,className:n(l,p,typeof t=="string"&&[L[t],R[t]],o)});case "card":return x__default.default.createElement("div",{className:n("flex flex-col gap-4 p-6 border border-stroke rounded-xl",o)},x__default.default.createElement("div",{className:n(l,p,"w-16 h-16 rounded-full")}),x__default.default.createElement("div",{className:"space-y-2"},x__default.default.createElement("div",{className:n(l,p,"h-6 w-3/4")}),x__default.default.createElement("div",{className:n(l,p,"h-4 w-1/2")})),x__default.default.createElement("div",{className:"space-y-2"},x__default.default.createElement("div",{className:n(l,p,"h-4 w-full")}),x__default.default.createElement("div",{className:n(l,p,"h-4 w-full")}),x__default.default.createElement("div",{className:n(l,p,"h-4 w-2/3")})));case "avatar":return x__default.default.createElement("div",{style:i,className:n(l,p,"rounded-full",{[b.sm]:t==="sm",[b.md]:t==="md",[b.lg]:t==="lg"},o)});default:return null}};return x__default.default.createElement("div",{ref:a,className:n("w-full",o)},d())});T.displayName="Fallback";var f="focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-100";var v=x__default.default.forwardRef(({children:e,type:t="button",className:r,disabled:o,scaleOnPress:s=true,...a},l)=>x__default.default.createElement("button",{ref:l,type:t,disabled:o,className:n("appearance-none hover:opacity-90",f,o&&"opacity-50 cursor-not-allowed",s&&"transition-all active:scale-95",r),...a},e));v.displayName="Pressable";var H={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]",52:"h-[52px] w-[52px]",60:"h-[60px] w-[60px]",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]",52:"sm:h-[52px] sm:w-[52px]",60:"sm:h-[60px] sm:w-[60px]",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]",52:"md:h-[52px] md:w-[52px]",60:"md:h-[60px] md:w-[60px]",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]",52:"lg:h-[52px] lg:w-[52px]",60:"lg:h-[60px] lg:w-[60px]",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]",52:"xl:h-[52px] xl:w-[52px]",60:"xl:h-[60px] xl:w-[60px]",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]",52:"2xl:h-[52px] 2xl:w-[52px]",60:"2xl:h-[60px] 2xl:w-[60px]",64:"2xl:h-[64px] 2xl:w-[64px]",72:"2xl:h-[72px] 2xl:w-[72px]",80:"2xl:h-[80px] 2xl:w-[80px]"}},g=e=>String(e),k=(e,t=24)=>{let r=[],o={};if(e===void 0){let s=g(t);s?r.push(H[s]):(o.height=`${t}px`,o.width=`${t}px`);}if(typeof e=="number"){let s=g(e);s?r.push(H[s]):(o.height=`${e}px`,o.width=`${e}px`);}if(Array.isArray(e)){let s=g(t),a=[s&&H[s]||`h-[${t}px] w-[${t}px]`];e.forEach(l=>{if(typeof l=="string"){let[p,c]=l.split(":"),i=parseInt(c,10),d=g(i);r.push(d&&$[p]?.[d]||`${p}:h-[${i}px] ${p}:w-[${i}px]`);}}),r.push(...a);}if(typeof e=="string"){let[s,a]=e.split(":"),l=parseInt(a,10),p=g(l);r.push(p&&$[s]?.[p]||`${s}:h-[${l}px] ${s}:w-[${l}px]`);}return {responsiveSizeClasses:r.join(" "),responsiveSizeStyles:o}};function S({src:e,size:t=48,onClick:r,alt:o="avatar",className:s,fallback:a,isLoading:l,...p}){let{responsiveSizeClasses:c,responsiveSizeStyles:i}=k(t,48);if(l)return x__default.default.createElement(T,{variant:"avatar",size:typeof t=="number"?t:"md"});let d=e?x__default.default.createElement("img",{src:e,alt:o,className:n("rounded-full object-cover",c,s),style:i,...p}):x__default.default.createElement("div",{className:n("rounded-full bg-secondary-50",c,s),style:i},a);return r?x__default.default.createElement(v,{onClick:r,...p},d):d}var V={xl:"h1",lg:"h1",md:"h2",sm:"h3",xs:"h4"},B=e=>{let[t,r]=e.split("-");return t==="heading"?V[r]||"p":t==="label"?"label":"p"},O={light:"font-light",regular:"font-regular",semibold:"font-semibold",bold:"font-bold"},F=e=>e?(Array.isArray(e)?e:[e]).map(r=>{if(r.includes(":")){let[o,s]=r.split(":");return `${o}:text-${s}`}return `text-${r}`}).join(" "):"text-body-default",h=x__default.default.forwardRef(({variant:e="body-default",color:t="primary",as:r,className:o,children:s,weight:a,...l},p)=>{let c=F(e),i=t==="inherit"?"text-inherit":`text-${t}`,d=x__default.default.useMemo(()=>{let y=typeof e=="string"?e.split(":").pop():Array.isArray(e)?e[0].split(":").pop():"body-default";return B(y)},[e]);return x__default.default.createElement(r||d,{ref:p,className:`
|
|
2
|
+
font-sans antialiased
|
|
3
|
+
${c}
|
|
4
|
+
${i}
|
|
5
|
+
${a&&`!${O[a]}`}
|
|
6
|
+
${o}
|
|
7
|
+
`,...l},s)});h.displayName="Text";function C({children:e,color:t="inherit",variant:r="body-default-semibold",href:o,className:s,...a}){return x__default.default.createElement(h,{variant:r,color:t},x__default.default.createElement("a",{href:o,className:n("hover:opacity-80 transition-all ease-in-out active:scale-95 hover:underline text-ellipsis",f,s),...a},e))}var j=({title:e,orderNumber:t,username:r,userAvatar:o,description:s,status:a,className:l,onClick:p,leaveReviewHref:c,onLeaveReviewClick:i})=>{let d=x.useCallback(()=>{p&&p();},[p]);return x__default.default.createElement("div",{className:n("flex flex-col rounded-lg p-4 border border-stroke h-[270px]",p&&"cursor-pointer",a==="completed"?"bg-background-50":"bg-background-0",l),onClick:p?d:void 0},x__default.default.createElement("div",{className:"flex flex-col gap-6"},x__default.default.createElement("div",{className:"flex items-center justify-between"},x__default.default.createElement("div",{className:"flex items-center gap-2"},x__default.default.createElement("div",{className:n("rounded-md px-3 py-2",a==="completed"?"bg-background-0":"bg-secondary-400")},x__default.default.createElement(h,{variant:"body-lg-semibold",color:"primary"},e)),x__default.default.createElement(h,{variant:"body-xxs-medium"},t)),(a==="in progress"||a==="pending")&&x__default.default.createElement("div",{className:n("rounded-full h-4 w-4","bg-danger")})),x__default.default.createElement("div",{className:"flex items-center gap-2"},x__default.default.createElement(S,{src:o,size:48,alt:r}),x__default.default.createElement(h,{variant:"body-default-medium"},r)),x__default.default.createElement(h,{variant:"body-default",className:"line-clamp-2"},s),x__default.default.createElement("div",{className:"flex items-center justify-between"},x__default.default.createElement(h,{variant:"body-default-bold",className:"flex items-center gap-2 capitalize"},x__default.default.createElement(h,{variant:"body-default"},"Status:")," ",a),a==="completed"&&x__default.default.createElement(C,{color:"primary-blue",className:"underline",href:c??"",onClick:i},"Leave a Review"))))},ye=j;exports.OrderCard=j;exports.default=ye;//# sourceMappingURL=OrderCard.cjs.map
|
|
8
|
+
//# sourceMappingURL=OrderCard.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/utils/index.ts","../../src/components/Fallback.tsx","../../src/utils/tailwind.ts","../../src/components/Pressable.tsx","../../src/utils/responsive.ts","../../src/components/Avatar.tsx","../../src/components/Text.tsx","../../src/components/Link.tsx","../../src/components/OrderCard.tsx"],"names":["cn","inputs","twMerge","clsx","sizeMap","widthMap","avatarSizeMap","Fallback","React","variant","size","lines","className","animate","ref","baseClasses","animationClasses","customStyle","renderContent","_","index","focusRingStyles","Pressable","children","type","disabled","scaleOnPress","props","BASE_SIZES","RESPONSIVE_SIZES","getSizeKey","getResponsiveSize","baseSize","classes","styles","key","baseKey","responsiveClasses","s","breakpoint","valueStr","value","valueKey","Avatar","src","onClick","alt","fallback","isLoading","responsiveSizeClasses","responsiveSizeStyles","content","HEADING_ELEMENT_MAP","getElementFromVariant","category","fontWeight","processVariants","variants","typographyClass","Text","color","as","weight","typographyClasses","colorClasses","suggestedElement","baseVariant","Link","href","OrderCard","title","orderNumber","username","userAvatar","description","status","leaveReviewHref","onLeaveReviewClick","handleClick","useCallback","OrderCard_default"],"mappings":"0QAGO,SAASA,CAAMC,CAAAA,GAAAA,CAAAA,CAAsB,CAC1C,OAAOC,qBAAQC,CAAAA,SAAAA,CAAKF,CAAM,CAAC,CAC7B,CC2BA,IAAMG,CAAU,CAAA,CACd,EAAI,CAAA,KAAA,CACJ,EAAI,CAAA,KAAA,CACJ,EAAI,CAAA,KACN,CAGMC,CAAAA,CAAAA,CAAW,CACf,EAAA,CAAI,MACJ,CAAA,EAAA,CAAI,MACJ,CAAA,EAAA,CAAI,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AAA,CAAA,aAAC2D,CAAAA,CAAAA,CAAA,CACC,KAAA,CAAM,cACN,CAAA,SAAA,CAAU,WACV,CAAA,IAAA,CAAMS,CAAmB,EAAA,EAAA,CACzB,OAASC,CAAAA,CAAAA,CAAAA,CACV,gBAED,CAEJ,CACF,CACF,CAEJ,CAAA,CAEOG,EAAQX,CAAAA","file":"OrderCard.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","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 { 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 { ButtonHTMLAttributes } from \"react\";\nimport React from \"react\";\n\nimport { cn } from \"../utils\";\nimport { focusRingStyles } from \"../utils/tailwind\";\n\nexport type PressableProps = ButtonHTMLAttributes<HTMLButtonElement> & {\n /**\n * @default true\n * Scaling motion when pressed\n */\n scaleOnPress?: boolean;\n};\n\nexport const Pressable = React.forwardRef<HTMLButtonElement, PressableProps>(\n (\n {\n children,\n type = \"button\",\n className,\n disabled,\n scaleOnPress = true,\n ...props\n },\n ref\n ) => (\n <button\n ref={ref}\n type={type}\n disabled={disabled}\n className={cn(\n \"appearance-none hover:opacity-90\",\n focusRingStyles,\n disabled && \"opacity-50 cursor-not-allowed\",\n scaleOnPress && \"transition-all active:scale-95\",\n className\n )}\n {...props}\n >\n {children}\n </button>\n )\n);\n\nPressable.displayName = \"Pressable\";\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 | \"52\"\n | \"60\"\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 \"52\": \"h-[52px] w-[52px]\",\n \"60\": \"h-[60px] w-[60px]\",\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 \"52\": \"sm:h-[52px] sm:w-[52px]\",\n \"60\": \"sm:h-[60px] sm:w-[60px]\",\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 \"52\": \"md:h-[52px] md:w-[52px]\",\n \"60\": \"md:h-[60px] md:w-[60px]\",\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 \"52\": \"lg:h-[52px] lg:w-[52px]\",\n \"60\": \"lg:h-[60px] lg:w-[60px]\",\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 \"52\": \"xl:h-[52px] xl:w-[52px]\",\n \"60\": \"xl:h-[60px] xl:w-[60px]\",\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 \"52\": \"2xl:h-[52px] 2xl:w-[52px]\",\n \"60\": \"2xl:h-[60px] 2xl:w-[60px]\",\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 React from \"react\";\n\nimport { cn } from \"../utils\";\nimport { Fallback } from \"./Fallback\";\nimport { Pressable } from \"./Pressable\";\nimport type { ResponsiveSize } from \"../utils/responsive\";\nimport { getResponsiveSize } from \"../utils/responsive\";\n\nexport type AvatarProps = {\n src?: string;\n size?: ResponsiveSize | ResponsiveSize[];\n alt?: string;\n className?: string;\n fallback?: React.ReactNode;\n isLoading?: boolean;\n} & Pick<React.ComponentProps<typeof Pressable>, \"onClick\">;\n\nexport function Avatar({\n src,\n size = 48,\n onClick,\n alt = \"avatar\",\n className,\n fallback,\n isLoading,\n ...props\n}: AvatarProps) {\n const { responsiveSizeClasses, responsiveSizeStyles } = getResponsiveSize(\n size,\n 48\n );\n\n if (isLoading) {\n return (\n <Fallback\n variant=\"avatar\"\n size={typeof size === \"number\" ? size : \"md\"}\n />\n );\n }\n\n const content = src ? (\n <img\n src={src}\n alt={alt}\n className={cn(\n \"rounded-full object-cover\",\n responsiveSizeClasses,\n className\n )}\n style={responsiveSizeStyles}\n {...props}\n />\n ) : (\n <div\n className={cn(\n \"rounded-full bg-secondary-50\",\n responsiveSizeClasses,\n className\n )}\n style={responsiveSizeStyles}\n >\n {fallback}\n </div>\n );\n\n return onClick ? (\n <Pressable onClick={onClick} {...props}>\n {content}\n </Pressable>\n ) : (\n content\n );\n}\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 React from \"react\";\n\nimport { cn } from \"../utils\";\nimport { focusRingStyles } from \"../utils/tailwind\";\nimport type { TextProps } from \"./Text\";\nimport { Text } from \"./Text\";\n\nexport type LinkProps = {\n href: string;\n children: React.ReactNode;\n className?: string;\n style?: React.CSSProperties;\n} & Pick<TextProps, \"variant\" | \"color\"> &\n React.AnchorHTMLAttributes<HTMLAnchorElement>;\n\nexport function Link({\n children,\n color = \"inherit\",\n variant = \"body-default-semibold\",\n href,\n className,\n ...props\n}: LinkProps) {\n return (\n <Text variant={variant} color={color}>\n <a\n href={href}\n className={cn(\n \"hover:opacity-80 transition-all ease-in-out active:scale-95 hover:underline text-ellipsis\",\n focusRingStyles,\n className\n )}\n {...props}\n >\n {children}\n </a>\n </Text>\n );\n}\n","import React, { useCallback } from \"react\";\n\nimport { cn } from \"../utils\";\nimport { Avatar } from \"./Avatar\";\nimport { Link } from \"./Link\";\nimport { Text } from \"./Text\";\n\nexport type OrderStatus = \"in progress\" | \"completed\" | \"canceled\" | \"pending\";\n\nexport type OrderCardProps = {\n title: string;\n orderNumber: string;\n username: string;\n userAvatar?: string;\n description: string;\n status: OrderStatus;\n className?: string;\n onClick?: () => void;\n leaveReviewHref?: string;\n onLeaveReviewClick?: () => void;\n};\n\nexport const OrderCard: React.FC<OrderCardProps> = ({\n title,\n orderNumber,\n username,\n userAvatar,\n description,\n status,\n className,\n onClick,\n leaveReviewHref,\n onLeaveReviewClick\n}) => {\n const handleClick = useCallback(() => {\n if (onClick) {\n onClick();\n }\n }, [onClick]);\n\n return (\n <div\n className={cn(\n \"flex flex-col rounded-lg p-4 border border-stroke h-[270px]\",\n onClick && \"cursor-pointer\",\n status === \"completed\" ? \"bg-background-50\" : \"bg-background-0\",\n className\n )}\n onClick={onClick ? handleClick : undefined}\n >\n <div className=\"flex flex-col gap-6\">\n <div className=\"flex items-center justify-between\">\n <div className=\"flex items-center gap-2\">\n <div\n className={cn(\n \"rounded-md px-3 py-2\",\n status === \"completed\" ? \"bg-background-0\" : \"bg-secondary-400\"\n )}\n >\n <Text variant=\"body-lg-semibold\" color=\"primary\">\n {title}\n </Text>\n </div>\n <Text variant=\"body-xxs-medium\">{orderNumber}</Text>\n </div>\n {(status === \"in progress\" || status === \"pending\") && (\n <div className={cn(\"rounded-full h-4 w-4\", `bg-danger`)}></div>\n )}\n </div>\n\n <div className=\"flex items-center gap-2\">\n <Avatar src={userAvatar} size={48} alt={username} />\n <Text variant=\"body-default-medium\">{username}</Text>\n </div>\n\n <Text variant=\"body-default\" className=\"line-clamp-2\">\n {description}\n </Text>\n <div className=\"flex items-center justify-between\">\n <Text\n variant=\"body-default-bold\"\n className=\"flex items-center gap-2 capitalize\"\n >\n <Text variant=\"body-default\">Status:</Text> {status}\n </Text>\n {status === \"completed\" && (\n <Link\n color=\"primary-blue\"\n className=\"underline\"\n href={leaveReviewHref ?? \"\"}\n onClick={onLeaveReviewClick}\n >\n Leave a Review\n </Link>\n )}\n </div>\n </div>\n </div>\n );\n};\n\nexport default OrderCard;\n"]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
|
|
3
|
+
type OrderStatus = "in progress" | "completed" | "canceled" | "pending";
|
|
4
|
+
type OrderCardProps = {
|
|
5
|
+
title: string;
|
|
6
|
+
orderNumber: string;
|
|
7
|
+
username: string;
|
|
8
|
+
userAvatar?: string;
|
|
9
|
+
description: string;
|
|
10
|
+
status: OrderStatus;
|
|
11
|
+
className?: string;
|
|
12
|
+
onClick?: () => void;
|
|
13
|
+
leaveReviewHref?: string;
|
|
14
|
+
onLeaveReviewClick?: () => void;
|
|
15
|
+
};
|
|
16
|
+
declare const OrderCard: React__default.FC<OrderCardProps>;
|
|
17
|
+
|
|
18
|
+
export { OrderCard, type OrderCardProps, type OrderStatus, OrderCard as default };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
|
|
3
|
+
type OrderStatus = "in progress" | "completed" | "canceled" | "pending";
|
|
4
|
+
type OrderCardProps = {
|
|
5
|
+
title: string;
|
|
6
|
+
orderNumber: string;
|
|
7
|
+
username: string;
|
|
8
|
+
userAvatar?: string;
|
|
9
|
+
description: string;
|
|
10
|
+
status: OrderStatus;
|
|
11
|
+
className?: string;
|
|
12
|
+
onClick?: () => void;
|
|
13
|
+
leaveReviewHref?: string;
|
|
14
|
+
onLeaveReviewClick?: () => void;
|
|
15
|
+
};
|
|
16
|
+
declare const OrderCard: React__default.FC<OrderCardProps>;
|
|
17
|
+
|
|
18
|
+
export { OrderCard, type OrderCardProps, type OrderStatus, OrderCard as default };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import x,{useCallback}from'react';import {clsx}from'clsx';import {twMerge}from'tailwind-merge';function n(...e){return twMerge(clsx(e))}var L={sm:"h-4",md:"h-6",lg:"h-8"},R={sm:"w-20",md:"w-32",lg:"w-48"},b={sm:"w-8 h-8",md:"w-12 h-12",lg:"w-16 h-16"},T=x.forwardRef(({variant:e="text",size:t="md",lines:r=1,className:o,animate:s=true},a)=>{let l="bg-secondary-50 rounded-lg overflow-hidden",p=s?"animate-pulse":"",i=typeof t=="number"?(u=>({height:`${u}px`,width:e==="avatar"||e==="image"?`${u}px`:void 0}))(t):void 0,d=()=>{switch(e){case "text":return x.createElement("div",{className:"flex flex-col gap-2"},Array.from({length:r}).map((u,y)=>x.createElement("div",{key:y,style:i,className:n(l,p,typeof t=="string"?L[t]:void 0,y===r-1&&r>1?"w-3/4":"w-full",o)})));case "image":return x.createElement("div",{style:i,className:n(l,p,(!i||!o)&&"aspect-square w-full max-w-[300px]",o)});case "button":return x.createElement("div",{style:i,className:n(l,p,typeof t=="string"&&[L[t],R[t]],o)});case "card":return x.createElement("div",{className:n("flex flex-col gap-4 p-6 border border-stroke rounded-xl",o)},x.createElement("div",{className:n(l,p,"w-16 h-16 rounded-full")}),x.createElement("div",{className:"space-y-2"},x.createElement("div",{className:n(l,p,"h-6 w-3/4")}),x.createElement("div",{className:n(l,p,"h-4 w-1/2")})),x.createElement("div",{className:"space-y-2"},x.createElement("div",{className:n(l,p,"h-4 w-full")}),x.createElement("div",{className:n(l,p,"h-4 w-full")}),x.createElement("div",{className:n(l,p,"h-4 w-2/3")})));case "avatar":return x.createElement("div",{style:i,className:n(l,p,"rounded-full",{[b.sm]:t==="sm",[b.md]:t==="md",[b.lg]:t==="lg"},o)});default:return null}};return x.createElement("div",{ref:a,className:n("w-full",o)},d())});T.displayName="Fallback";var f="focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-100";var v=x.forwardRef(({children:e,type:t="button",className:r,disabled:o,scaleOnPress:s=true,...a},l)=>x.createElement("button",{ref:l,type:t,disabled:o,className:n("appearance-none hover:opacity-90",f,o&&"opacity-50 cursor-not-allowed",s&&"transition-all active:scale-95",r),...a},e));v.displayName="Pressable";var H={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]",52:"h-[52px] w-[52px]",60:"h-[60px] w-[60px]",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]",52:"sm:h-[52px] sm:w-[52px]",60:"sm:h-[60px] sm:w-[60px]",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]",52:"md:h-[52px] md:w-[52px]",60:"md:h-[60px] md:w-[60px]",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]",52:"lg:h-[52px] lg:w-[52px]",60:"lg:h-[60px] lg:w-[60px]",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]",52:"xl:h-[52px] xl:w-[52px]",60:"xl:h-[60px] xl:w-[60px]",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]",52:"2xl:h-[52px] 2xl:w-[52px]",60:"2xl:h-[60px] 2xl:w-[60px]",64:"2xl:h-[64px] 2xl:w-[64px]",72:"2xl:h-[72px] 2xl:w-[72px]",80:"2xl:h-[80px] 2xl:w-[80px]"}},g=e=>String(e),k=(e,t=24)=>{let r=[],o={};if(e===void 0){let s=g(t);s?r.push(H[s]):(o.height=`${t}px`,o.width=`${t}px`);}if(typeof e=="number"){let s=g(e);s?r.push(H[s]):(o.height=`${e}px`,o.width=`${e}px`);}if(Array.isArray(e)){let s=g(t),a=[s&&H[s]||`h-[${t}px] w-[${t}px]`];e.forEach(l=>{if(typeof l=="string"){let[p,c]=l.split(":"),i=parseInt(c,10),d=g(i);r.push(d&&$[p]?.[d]||`${p}:h-[${i}px] ${p}:w-[${i}px]`);}}),r.push(...a);}if(typeof e=="string"){let[s,a]=e.split(":"),l=parseInt(a,10),p=g(l);r.push(p&&$[s]?.[p]||`${s}:h-[${l}px] ${s}:w-[${l}px]`);}return {responsiveSizeClasses:r.join(" "),responsiveSizeStyles:o}};function S({src:e,size:t=48,onClick:r,alt:o="avatar",className:s,fallback:a,isLoading:l,...p}){let{responsiveSizeClasses:c,responsiveSizeStyles:i}=k(t,48);if(l)return x.createElement(T,{variant:"avatar",size:typeof t=="number"?t:"md"});let d=e?x.createElement("img",{src:e,alt:o,className:n("rounded-full object-cover",c,s),style:i,...p}):x.createElement("div",{className:n("rounded-full bg-secondary-50",c,s),style:i},a);return r?x.createElement(v,{onClick:r,...p},d):d}var V={xl:"h1",lg:"h1",md:"h2",sm:"h3",xs:"h4"},B=e=>{let[t,r]=e.split("-");return t==="heading"?V[r]||"p":t==="label"?"label":"p"},O={light:"font-light",regular:"font-regular",semibold:"font-semibold",bold:"font-bold"},F=e=>e?(Array.isArray(e)?e:[e]).map(r=>{if(r.includes(":")){let[o,s]=r.split(":");return `${o}:text-${s}`}return `text-${r}`}).join(" "):"text-body-default",h=x.forwardRef(({variant:e="body-default",color:t="primary",as:r,className:o,children:s,weight:a,...l},p)=>{let c=F(e),i=t==="inherit"?"text-inherit":`text-${t}`,d=x.useMemo(()=>{let y=typeof e=="string"?e.split(":").pop():Array.isArray(e)?e[0].split(":").pop():"body-default";return B(y)},[e]);return x.createElement(r||d,{ref:p,className:`
|
|
2
|
+
font-sans antialiased
|
|
3
|
+
${c}
|
|
4
|
+
${i}
|
|
5
|
+
${a&&`!${O[a]}`}
|
|
6
|
+
${o}
|
|
7
|
+
`,...l},s)});h.displayName="Text";function C({children:e,color:t="inherit",variant:r="body-default-semibold",href:o,className:s,...a}){return x.createElement(h,{variant:r,color:t},x.createElement("a",{href:o,className:n("hover:opacity-80 transition-all ease-in-out active:scale-95 hover:underline text-ellipsis",f,s),...a},e))}var j=({title:e,orderNumber:t,username:r,userAvatar:o,description:s,status:a,className:l,onClick:p,leaveReviewHref:c,onLeaveReviewClick:i})=>{let d=useCallback(()=>{p&&p();},[p]);return x.createElement("div",{className:n("flex flex-col rounded-lg p-4 border border-stroke h-[270px]",p&&"cursor-pointer",a==="completed"?"bg-background-50":"bg-background-0",l),onClick:p?d:void 0},x.createElement("div",{className:"flex flex-col gap-6"},x.createElement("div",{className:"flex items-center justify-between"},x.createElement("div",{className:"flex items-center gap-2"},x.createElement("div",{className:n("rounded-md px-3 py-2",a==="completed"?"bg-background-0":"bg-secondary-400")},x.createElement(h,{variant:"body-lg-semibold",color:"primary"},e)),x.createElement(h,{variant:"body-xxs-medium"},t)),(a==="in progress"||a==="pending")&&x.createElement("div",{className:n("rounded-full h-4 w-4","bg-danger")})),x.createElement("div",{className:"flex items-center gap-2"},x.createElement(S,{src:o,size:48,alt:r}),x.createElement(h,{variant:"body-default-medium"},r)),x.createElement(h,{variant:"body-default",className:"line-clamp-2"},s),x.createElement("div",{className:"flex items-center justify-between"},x.createElement(h,{variant:"body-default-bold",className:"flex items-center gap-2 capitalize"},x.createElement(h,{variant:"body-default"},"Status:")," ",a),a==="completed"&&x.createElement(C,{color:"primary-blue",className:"underline",href:c??"",onClick:i},"Leave a Review"))))},ye=j;export{j as OrderCard,ye as default};//# sourceMappingURL=OrderCard.js.map
|
|
8
|
+
//# sourceMappingURL=OrderCard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/utils/index.ts","../../src/components/Fallback.tsx","../../src/utils/tailwind.ts","../../src/components/Pressable.tsx","../../src/utils/responsive.ts","../../src/components/Avatar.tsx","../../src/components/Text.tsx","../../src/components/Link.tsx","../../src/components/OrderCard.tsx"],"names":["cn","inputs","twMerge","clsx","sizeMap","widthMap","avatarSizeMap","Fallback","React","variant","size","lines","className","animate","ref","baseClasses","animationClasses","customStyle","renderContent","_","index","focusRingStyles","Pressable","children","type","disabled","scaleOnPress","props","BASE_SIZES","RESPONSIVE_SIZES","getSizeKey","getResponsiveSize","baseSize","classes","styles","key","baseKey","responsiveClasses","s","breakpoint","valueStr","value","valueKey","Avatar","src","onClick","alt","fallback","isLoading","responsiveSizeClasses","responsiveSizeStyles","content","HEADING_ELEMENT_MAP","getElementFromVariant","category","fontWeight","processVariants","variants","typographyClass","Text","color","as","weight","typographyClasses","colorClasses","suggestedElement","baseVariant","Link","href","OrderCard","title","orderNumber","username","userAvatar","description","status","leaveReviewHref","onLeaveReviewClick","handleClick","useCallback","OrderCard_default"],"mappings":"+FAGO,SAASA,CAAMC,CAAAA,GAAAA,CAAAA,CAAsB,CAC1C,OAAOC,OAAQC,CAAAA,IAAAA,CAAKF,CAAM,CAAC,CAC7B,CC2BA,IAAMG,CAAU,CAAA,CACd,EAAI,CAAA,KAAA,CACJ,EAAI,CAAA,KAAA,CACJ,EAAI,CAAA,KACN,CAGMC,CAAAA,CAAAA,CAAW,CACf,EAAA,CAAI,MACJ,CAAA,EAAA,CAAI,MACJ,CAAA,EAAA,CAAI,MACN,CAGMC,CAAAA,CAAAA,CAAgB,CACpB,EAAA,CAAI,SACJ,CAAA,EAAA,CAAI,WACJ,CAAA,EAAA,CAAI,WACN,CAAA,CAEaC,CAAWC,CAAAA,CAAAA,CAAM,UAC5B,CAAA,CACE,CAAE,OAAA,CAAAC,EAAU,MAAQ,CAAA,IAAA,CAAAC,CAAO,CAAA,IAAA,CAAM,KAAAC,CAAAA,CAAAA,CAAQ,CAAG,CAAA,SAAA,CAAAC,CAAW,CAAA,OAAA,CAAAC,CAAU,CAAA,IAAK,CACtEC,CAAAA,CAAAA,GACG,CACH,IAAMC,EAAc,4CACdC,CAAAA,CAAAA,CAAmBH,CAAU,CAAA,eAAA,CAAkB,EAQ/CI,CAAAA,CAAAA,CACJ,OAAOP,CAAAA,EAAS,QAPUA,CAAAA,CAAAA,CAAAA,GAAkB,C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GAAA,CAAK8B,CAAY,CAAA,IAAA,CAAM,EAAI,CAAA,GAAA,CAAKD,CAAU,CAAA,CAAA,CAClDhE,CAAA,CAAA,aAAA,CAACmD,CAAA,CAAA,CAAK,OAAQ,CAAA,qBAAA,CAAA,CAAuBa,CAAS,CAChD,CAEAhE,CAAAA,CAAAA,CAAA,aAACmD,CAAAA,CAAAA,CAAA,CAAK,OAAA,CAAQ,cAAe,CAAA,SAAA,CAAU,cACpCe,CAAAA,CAAAA,CACH,CACAlE,CAAAA,CAAAA,CAAA,aAAC,CAAA,KAAA,CAAA,CAAI,SAAU,CAAA,mCAAA,CAAA,CACbA,CAAA,CAAA,aAAA,CAACmD,CAAA,CAAA,CACC,OAAQ,CAAA,mBAAA,CACR,SAAU,CAAA,oCAAA,CAAA,CAEVnD,CAAA,CAAA,aAAA,CAACmD,CAAA,CAAA,CAAK,OAAQ,CAAA,cAAA,CAAA,CAAe,SAAO,CAAA,CAAO,GAAEgB,CAAAA,CAC/C,CACCA,CAAAA,CAAAA,GAAW,WACVnE,EAAAA,CAAAA,CAAA,aAAC2D,CAAAA,CAAAA,CAAA,CACC,KAAA,CAAM,cACN,CAAA,SAAA,CAAU,WACV,CAAA,IAAA,CAAMS,CAAmB,EAAA,EAAA,CACzB,OAASC,CAAAA,CAAAA,CAAAA,CACV,gBAED,CAEJ,CACF,CACF,CAEJ,CAAA,CAEOG,EAAQX,CAAAA","file":"OrderCard.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","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 { 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 { ButtonHTMLAttributes } from \"react\";\nimport React from \"react\";\n\nimport { cn } from \"../utils\";\nimport { focusRingStyles } from \"../utils/tailwind\";\n\nexport type PressableProps = ButtonHTMLAttributes<HTMLButtonElement> & {\n /**\n * @default true\n * Scaling motion when pressed\n */\n scaleOnPress?: boolean;\n};\n\nexport const Pressable = React.forwardRef<HTMLButtonElement, PressableProps>(\n (\n {\n children,\n type = \"button\",\n className,\n disabled,\n scaleOnPress = true,\n ...props\n },\n ref\n ) => (\n <button\n ref={ref}\n type={type}\n disabled={disabled}\n className={cn(\n \"appearance-none hover:opacity-90\",\n focusRingStyles,\n disabled && \"opacity-50 cursor-not-allowed\",\n scaleOnPress && \"transition-all active:scale-95\",\n className\n )}\n {...props}\n >\n {children}\n </button>\n )\n);\n\nPressable.displayName = \"Pressable\";\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 | \"52\"\n | \"60\"\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 \"52\": \"h-[52px] w-[52px]\",\n \"60\": \"h-[60px] w-[60px]\",\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 \"52\": \"sm:h-[52px] sm:w-[52px]\",\n \"60\": \"sm:h-[60px] sm:w-[60px]\",\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 \"52\": \"md:h-[52px] md:w-[52px]\",\n \"60\": \"md:h-[60px] md:w-[60px]\",\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 \"52\": \"lg:h-[52px] lg:w-[52px]\",\n \"60\": \"lg:h-[60px] lg:w-[60px]\",\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 \"52\": \"xl:h-[52px] xl:w-[52px]\",\n \"60\": \"xl:h-[60px] xl:w-[60px]\",\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 \"52\": \"2xl:h-[52px] 2xl:w-[52px]\",\n \"60\": \"2xl:h-[60px] 2xl:w-[60px]\",\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 React from \"react\";\n\nimport { cn } from \"../utils\";\nimport { Fallback } from \"./Fallback\";\nimport { Pressable } from \"./Pressable\";\nimport type { ResponsiveSize } from \"../utils/responsive\";\nimport { getResponsiveSize } from \"../utils/responsive\";\n\nexport type AvatarProps = {\n src?: string;\n size?: ResponsiveSize | ResponsiveSize[];\n alt?: string;\n className?: string;\n fallback?: React.ReactNode;\n isLoading?: boolean;\n} & Pick<React.ComponentProps<typeof Pressable>, \"onClick\">;\n\nexport function Avatar({\n src,\n size = 48,\n onClick,\n alt = \"avatar\",\n className,\n fallback,\n isLoading,\n ...props\n}: AvatarProps) {\n const { responsiveSizeClasses, responsiveSizeStyles } = getResponsiveSize(\n size,\n 48\n );\n\n if (isLoading) {\n return (\n <Fallback\n variant=\"avatar\"\n size={typeof size === \"number\" ? size : \"md\"}\n />\n );\n }\n\n const content = src ? (\n <img\n src={src}\n alt={alt}\n className={cn(\n \"rounded-full object-cover\",\n responsiveSizeClasses,\n className\n )}\n style={responsiveSizeStyles}\n {...props}\n />\n ) : (\n <div\n className={cn(\n \"rounded-full bg-secondary-50\",\n responsiveSizeClasses,\n className\n )}\n style={responsiveSizeStyles}\n >\n {fallback}\n </div>\n );\n\n return onClick ? (\n <Pressable onClick={onClick} {...props}>\n {content}\n </Pressable>\n ) : (\n content\n );\n}\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 React from \"react\";\n\nimport { cn } from \"../utils\";\nimport { focusRingStyles } from \"../utils/tailwind\";\nimport type { TextProps } from \"./Text\";\nimport { Text } from \"./Text\";\n\nexport type LinkProps = {\n href: string;\n children: React.ReactNode;\n className?: string;\n style?: React.CSSProperties;\n} & Pick<TextProps, \"variant\" | \"color\"> &\n React.AnchorHTMLAttributes<HTMLAnchorElement>;\n\nexport function Link({\n children,\n color = \"inherit\",\n variant = \"body-default-semibold\",\n href,\n className,\n ...props\n}: LinkProps) {\n return (\n <Text variant={variant} color={color}>\n <a\n href={href}\n className={cn(\n \"hover:opacity-80 transition-all ease-in-out active:scale-95 hover:underline text-ellipsis\",\n focusRingStyles,\n className\n )}\n {...props}\n >\n {children}\n </a>\n </Text>\n );\n}\n","import React, { useCallback } from \"react\";\n\nimport { cn } from \"../utils\";\nimport { Avatar } from \"./Avatar\";\nimport { Link } from \"./Link\";\nimport { Text } from \"./Text\";\n\nexport type OrderStatus = \"in progress\" | \"completed\" | \"canceled\" | \"pending\";\n\nexport type OrderCardProps = {\n title: string;\n orderNumber: string;\n username: string;\n userAvatar?: string;\n description: string;\n status: OrderStatus;\n className?: string;\n onClick?: () => void;\n leaveReviewHref?: string;\n onLeaveReviewClick?: () => void;\n};\n\nexport const OrderCard: React.FC<OrderCardProps> = ({\n title,\n orderNumber,\n username,\n userAvatar,\n description,\n status,\n className,\n onClick,\n leaveReviewHref,\n onLeaveReviewClick\n}) => {\n const handleClick = useCallback(() => {\n if (onClick) {\n onClick();\n }\n }, [onClick]);\n\n return (\n <div\n className={cn(\n \"flex flex-col rounded-lg p-4 border border-stroke h-[270px]\",\n onClick && \"cursor-pointer\",\n status === \"completed\" ? \"bg-background-50\" : \"bg-background-0\",\n className\n )}\n onClick={onClick ? handleClick : undefined}\n >\n <div className=\"flex flex-col gap-6\">\n <div className=\"flex items-center justify-between\">\n <div className=\"flex items-center gap-2\">\n <div\n className={cn(\n \"rounded-md px-3 py-2\",\n status === \"completed\" ? \"bg-background-0\" : \"bg-secondary-400\"\n )}\n >\n <Text variant=\"body-lg-semibold\" color=\"primary\">\n {title}\n </Text>\n </div>\n <Text variant=\"body-xxs-medium\">{orderNumber}</Text>\n </div>\n {(status === \"in progress\" || status === \"pending\") && (\n <div className={cn(\"rounded-full h-4 w-4\", `bg-danger`)}></div>\n )}\n </div>\n\n <div className=\"flex items-center gap-2\">\n <Avatar src={userAvatar} size={48} alt={username} />\n <Text variant=\"body-default-medium\">{username}</Text>\n </div>\n\n <Text variant=\"body-default\" className=\"line-clamp-2\">\n {description}\n </Text>\n <div className=\"flex items-center justify-between\">\n <Text\n variant=\"body-default-bold\"\n className=\"flex items-center gap-2 capitalize\"\n >\n <Text variant=\"body-default\">Status:</Text> {status}\n </Text>\n {status === \"completed\" && (\n <Link\n color=\"primary-blue\"\n className=\"underline\"\n href={leaveReviewHref ?? \"\"}\n onClick={onLeaveReviewClick}\n >\n Leave a Review\n </Link>\n )}\n </div>\n </div>\n </div>\n );\n};\n\nexport default OrderCard;\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
'use strict';Object.defineProperty(exports,'__esModule',{value:true});var l=require('react'),clsx=require('clsx'),tailwindMerge=require('tailwind-merge'),icons=require('@deckai/icons');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var l__default=/*#__PURE__*/_interopDefault(l);function h(...e){return tailwindMerge.twMerge(clsx.clsx(e))}var y={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]",52:"h-[52px] w-[52px]",60:"h-[60px] w-[60px]",64:"h-[64px] w-[64px]",72:"h-[72px] w-[72px]",80:"h-[80px] w-[80px]"},T={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]",52:"sm:h-[52px] sm:w-[52px]",60:"sm:h-[60px] sm:w-[60px]",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]",52:"md:h-[52px] md:w-[52px]",60:"md:h-[60px] md:w-[60px]",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]",52:"lg:h-[52px] lg:w-[52px]",60:"lg:h-[60px] lg:w-[60px]",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]",52:"xl:h-[52px] xl:w-[52px]",60:"xl:h-[60px] xl:w-[60px]",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]",52:"2xl:h-[52px] 2xl:w-[52px]",60:"2xl:h-[60px] 2xl:w-[60px]",64:"2xl:h-[64px] 2xl:w-[64px]",72:"2xl:h-[72px] 2xl:w-[72px]",80:"2xl:h-[80px] 2xl:w-[80px]"}},c=e=>String(e),f=(e,r=24)=>{let s=[],p={};if(e===void 0){let t=c(r);t?s.push(y[t]):(p.height=`${r}px`,p.width=`${r}px`);}if(typeof e=="number"){let t=c(e);t?s.push(y[t]):(p.height=`${e}px`,p.width=`${e}px`);}if(Array.isArray(e)){let t=c(r),n=[t&&y[t]||`h-[${r}px] w-[${r}px]`];e.forEach(o=>{if(typeof o=="string"){let[x,d]=o.split(":"),i=parseInt(d,10),a=c(i);s.push(a&&T[x]?.[a]||`${x}:h-[${i}px] ${x}:w-[${i}px]`);}}),s.push(...n);}if(typeof e=="string"){let[t,n]=e.split(":"),o=parseInt(n,10),x=c(o);s.push(x&&T[t]?.[x]||`${t}:h-[${o}px] ${t}:w-[${o}px]`);}return {responsiveSizeClasses:s.join(" "),responsiveSizeStyles:p}};var b={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-15)"},g=l__default.default.forwardRef(({name:e,size:r=24,color:s="primary",title:p,className:t,style:n={},...o},x)=>{let d=icons.IconMap[e],{responsiveSizeClasses:i,responsiveSizeStyles:a}=f(r,24);return l__default.default.createElement("div",{className:h("flex justify-center items-center",i,t),style:{"--icon-stroke":b[s],...a,...n}},l__default.default.createElement(d,{ref:x,"aria-hidden":!p,"aria-label":p,stroke:e.includes("filled")?void 0:b[s],...o}))});g.displayName="Icon";var E={xl:"h1",lg:"h1",md:"h2",sm:"h3",xs:"h4"},S=e=>{let[r,s]=e.split("-");return r==="heading"?E[s]||"p":r==="label"?"label":"p"},A={light:"font-light",regular:"font-regular",semibold:"font-semibold",bold:"font-bold"},R=e=>e?(Array.isArray(e)?e:[e]).map(s=>{if(s.includes(":")){let[p,t]=s.split(":");return `${p}:text-${t}`}return `text-${s}`}).join(" "):"text-body-default",m=l__default.default.forwardRef(({variant:e="body-default",color:r="primary",as:s,className:p,children:t,weight:n,...o},x)=>{let d=R(e),i=r==="inherit"?"text-inherit":`text-${r}`,a=l__default.default.useMemo(()=>{let H=typeof e=="string"?e.split(":").pop():Array.isArray(e)?e[0].split(":").pop():"body-default";return S(H)},[e]);return l__default.default.createElement(s||a,{ref:x,className:`
|
|
2
|
+
font-sans antialiased
|
|
3
|
+
${d}
|
|
4
|
+
${i}
|
|
5
|
+
${n&&`!${A[n]}`}
|
|
6
|
+
${p}
|
|
7
|
+
`,...o},t)});m.displayName="Text";var $=({deliveryDays:e,steps:r,className:s})=>l__default.default.createElement("div",{className:h("flex flex-col p-8 rounded-xl border border-stroke gap-4",s)},l__default.default.createElement("div",{className:"flex flex-col items-center gap-2"},l__default.default.createElement("div",{className:"bg-secondary-400 rounded-md p-4 flex items-center gap-4"},l__default.default.createElement(g,{name:"shopping-cart",size:24}),l__default.default.createElement(m,{variant:"body-md"},"Estimated delivery in"," ",l__default.default.createElement("span",{className:"font-bold"},e," days"))),l__default.default.createElement(m,{variant:"body-xxs-medium",color:"secondary",className:"italic"},"First day starts after order has been confirmed.")),l__default.default.createElement("div",{className:"flex flex-col"},r.map((p,t)=>l__default.default.createElement("div",{key:t,className:"flex gap-4 relative"},t<r.length-1&&l__default.default.createElement("div",{className:"absolute left-[13px] top-7 bottom-0 w-0.5 bg-stroke z-0"},p.status==="completed"&&l__default.default.createElement("div",{className:"absolute top-0 left-0 w-full bg-primary-blue",style:{height:t<r.length-1?"100%":"0px"}})),l__default.default.createElement("div",{className:"flex flex-col items-center z-10"},l__default.default.createElement("div",{className:h("flex items-center justify-center w-7 h-7 rounded-full",p.status==="completed"?"bg-primary-blue":p.status==="current"?"bg-white border-4 border-primary-blue":"bg-white border border-stroke")},p.status==="completed"?l__default.default.createElement(g,{name:"swoosh",size:20,color:"white"}):p.status==="current"?l__default.default.createElement("div",{className:"w-4 h-4 rounded-full bg-primary-blue"}):l__default.default.createElement("div",{className:"w-4 h-4 rounded-full border border-stroke"}))),l__default.default.createElement("div",{className:"flex flex-col pb-14"},l__default.default.createElement(m,{variant:"body-xs-medium",className:"primary"},p.title),l__default.default.createElement(m,{variant:"body-xxs-medium",color:"secondary"},p.description)))))),D=$;exports.OrderProgress=$;exports.default=D;//# sourceMappingURL=OrderProgress.cjs.map
|
|
8
|
+
//# sourceMappingURL=OrderProgress.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/OrderProgress.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","OrderProgress","deliveryDays","steps","step","index","OrderProgress_default"],"mappings":"ySAGO,SAASA,KAAMC,CAAsB,CAAA,CAC1C,OAAOC,qBAAQC,CAAAA,SAAAA,CAAKF,CAAM,CAAC,CAC7B,CCgBA,IAAMG,CAAsC,CAAA,CAC1C,GAAM,mBACN,CAAA,EAAA,CAAM,oBACN,EAAM,CAAA,mBAAA,CACN,GAAM,mBACN,CAAA,EAAA,CAAM,oBACN,EAAM,CAAA,mBAAA,CACN,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,mBACR,CAAA,CAEMC,EAAgE,CACpE,EAAA,CAAI,CACF,EAAA,CAAM,0BACN,EAAM,CAAA,yBAAA,CACN,GAAM,yBACN,CAAA,EAAA,CAAM,0BACN,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,yBACR,EACA,EAAI,CAAA,CACF,EAAM,CAAA,yBAAA,CACN,GAAM,yBACN,CAAA,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,GAAM,yBAC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AQgC,CAAQF,CAAAA,CAAAA,CAAM,OAAS,CAAI,CAAA,MAAA,CAAS,KAC9C,CACF,CAAA,CAEJ,EAIF9B,kBAAA,CAAA,aAAA,CAAC,KAAI,CAAA,CAAA,SAAA,CAAU,iCAEbA,CAAAA,CAAAA,kBAAAA,CAAA,cAAC,KACC,CAAA,CAAA,SAAA,CAAWtB,EACT,uDACAqD,CAAAA,CAAAA,CAAK,SAAW,WACZ,CAAA,iBAAA,CACAA,CAAK,CAAA,MAAA,GAAW,SACd,CAAA,uCAAA,CACA,+BACR,CAECA,CAAAA,CAAAA,CAAAA,CAAK,MAAW,GAAA,WAAA,CACf/B,kBAAA,CAAA,aAAA,CAACD,EAAA,CAAK,IAAA,CAAK,QAAS,CAAA,IAAA,CAAM,EAAI,CAAA,KAAA,CAAM,QAAQ,CAC1CgC,CAAAA,CAAAA,CAAK,SAAW,SAClB/B,CAAAA,kBAAAA,CAAA,cAAC,KAAI,CAAA,CAAA,SAAA,CAAU,sCAAuC,CAAA,CAAA,CAEtDA,kBAAA,CAAA,aAAA,CAAC,OAAI,SAAU,CAAA,2CAAA,CAA4C,CAE/D,CACF,CAAA,CAGAA,mBAAA,aAAC,CAAA,KAAA,CAAA,CAAI,SAAU,CAAA,qBAAA,CAAA,CACbA,kBAAA,CAAA,aAAA,CAACoB,EAAA,CAAK,OAAA,CAAQ,iBAAiB,SAAU,CAAA,SAAA,CAAA,CACtCW,EAAK,KACR,CAAA,CACA/B,kBAAA,CAAA,aAAA,CAACoB,CAAA,CAAA,CAAK,QAAQ,iBAAkB,CAAA,KAAA,CAAM,WACnCW,CAAAA,CAAAA,CAAAA,CAAK,WACR,CACF,CACF,CACD,CACH,CACF,CAAA,CAIGE,CAAQL,CAAAA","file":"OrderProgress.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 | \"52\"\n | \"60\"\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 \"52\": \"h-[52px] w-[52px]\",\n \"60\": \"h-[60px] w-[60px]\",\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 \"52\": \"sm:h-[52px] sm:w-[52px]\",\n \"60\": \"sm:h-[60px] sm:w-[60px]\",\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 \"52\": \"md:h-[52px] md:w-[52px]\",\n \"60\": \"md:h-[60px] md:w-[60px]\",\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 \"52\": \"lg:h-[52px] lg:w-[52px]\",\n \"60\": \"lg:h-[60px] lg:w-[60px]\",\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 \"52\": \"xl:h-[52px] xl:w-[52px]\",\n \"60\": \"xl:h-[60px] xl:w-[60px]\",\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 \"52\": \"2xl:h-[52px] 2xl:w-[52px]\",\n \"60\": \"2xl:h-[60px] 2xl:w-[60px]\",\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-15)\"\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 React from \"react\";\n\nimport { cn } from \"../utils\";\nimport { Icon } from \"./Icon\";\nimport { Text } from \"./Text\";\n\nexport type OrderStep = {\n title: string;\n description: string;\n status: \"completed\" | \"current\" | \"pending\";\n};\n\nexport type OrderProgressProps = {\n deliveryDays: number;\n steps: OrderStep[];\n className?: string;\n};\n\nexport const OrderProgress: React.FC<OrderProgressProps> = ({\n deliveryDays,\n steps,\n className\n}) => {\n return (\n <div\n className={cn(\n \"flex flex-col p-8 rounded-xl border border-stroke gap-4\",\n className\n )}\n >\n <div className=\"flex flex-col items-center gap-2\">\n {/* Delivery Banner */}\n <div className=\"bg-secondary-400 rounded-md p-4 flex items-center gap-4\">\n <Icon name=\"shopping-cart\" size={24} />\n <Text variant=\"body-md\">\n Estimated delivery in{\" \"}\n <span className=\"font-bold\">{deliveryDays} days</span>\n </Text>\n </div>\n\n {/* Delivery Note */}\n <Text variant=\"body-xxs-medium\" color=\"secondary\" className=\"italic\">\n First day starts after order has been confirmed.\n </Text>\n </div>\n\n {/* Progress Steps */}\n <div className=\"flex flex-col\">\n {steps.map((step, index) => (\n <div key={index} className=\"flex gap-4 relative\">\n {/* Status Line Container */}\n {index < steps.length - 1 && (\n <div className=\"absolute left-[13px] top-7 bottom-0 w-0.5 bg-stroke z-0\">\n {/* Colored portion for completed steps */}\n {step.status === \"completed\" && (\n <div\n className=\"absolute top-0 left-0 w-full bg-primary-blue\"\n style={{\n height: index < steps.length - 1 ? \"100%\" : \"0px\"\n }}\n />\n )}\n </div>\n )}\n\n {/* Step Circle Column */}\n <div className=\"flex flex-col items-center z-10\">\n {/* Step Circle */}\n <div\n className={cn(\n \"flex items-center justify-center w-7 h-7 rounded-full\",\n step.status === \"completed\"\n ? \"bg-primary-blue\"\n : step.status === \"current\"\n ? \"bg-white border-4 border-primary-blue\"\n : \"bg-white border border-stroke\"\n )}\n >\n {step.status === \"completed\" ? (\n <Icon name=\"swoosh\" size={20} color=\"white\" />\n ) : step.status === \"current\" ? (\n <div className=\"w-4 h-4 rounded-full bg-primary-blue\" />\n ) : (\n <div className=\"w-4 h-4 rounded-full border border-stroke\" />\n )}\n </div>\n </div>\n\n {/* Step Content */}\n <div className=\"flex flex-col pb-14\">\n <Text variant=\"body-xs-medium\" className=\"primary\">\n {step.title}\n </Text>\n <Text variant=\"body-xxs-medium\" color=\"secondary\">\n {step.description}\n </Text>\n </div>\n </div>\n ))}\n </div>\n </div>\n );\n};\n\nexport default OrderProgress;\n"]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
|
|
3
|
+
type OrderStep = {
|
|
4
|
+
title: string;
|
|
5
|
+
description: string;
|
|
6
|
+
status: "completed" | "current" | "pending";
|
|
7
|
+
};
|
|
8
|
+
type OrderProgressProps = {
|
|
9
|
+
deliveryDays: number;
|
|
10
|
+
steps: OrderStep[];
|
|
11
|
+
className?: string;
|
|
12
|
+
};
|
|
13
|
+
declare const OrderProgress: React__default.FC<OrderProgressProps>;
|
|
14
|
+
|
|
15
|
+
export { OrderProgress, type OrderProgressProps, type OrderStep, OrderProgress as default };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
|
|
3
|
+
type OrderStep = {
|
|
4
|
+
title: string;
|
|
5
|
+
description: string;
|
|
6
|
+
status: "completed" | "current" | "pending";
|
|
7
|
+
};
|
|
8
|
+
type OrderProgressProps = {
|
|
9
|
+
deliveryDays: number;
|
|
10
|
+
steps: OrderStep[];
|
|
11
|
+
className?: string;
|
|
12
|
+
};
|
|
13
|
+
declare const OrderProgress: React__default.FC<OrderProgressProps>;
|
|
14
|
+
|
|
15
|
+
export { OrderProgress, type OrderProgressProps, type OrderStep, OrderProgress as default };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import l from'react';import {clsx}from'clsx';import {twMerge}from'tailwind-merge';import {IconMap}from'@deckai/icons';function h(...e){return twMerge(clsx(e))}var y={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]",52:"h-[52px] w-[52px]",60:"h-[60px] w-[60px]",64:"h-[64px] w-[64px]",72:"h-[72px] w-[72px]",80:"h-[80px] w-[80px]"},T={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]",52:"sm:h-[52px] sm:w-[52px]",60:"sm:h-[60px] sm:w-[60px]",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]",52:"md:h-[52px] md:w-[52px]",60:"md:h-[60px] md:w-[60px]",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]",52:"lg:h-[52px] lg:w-[52px]",60:"lg:h-[60px] lg:w-[60px]",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]",52:"xl:h-[52px] xl:w-[52px]",60:"xl:h-[60px] xl:w-[60px]",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]",52:"2xl:h-[52px] 2xl:w-[52px]",60:"2xl:h-[60px] 2xl:w-[60px]",64:"2xl:h-[64px] 2xl:w-[64px]",72:"2xl:h-[72px] 2xl:w-[72px]",80:"2xl:h-[80px] 2xl:w-[80px]"}},c=e=>String(e),f=(e,r=24)=>{let s=[],p={};if(e===void 0){let t=c(r);t?s.push(y[t]):(p.height=`${r}px`,p.width=`${r}px`);}if(typeof e=="number"){let t=c(e);t?s.push(y[t]):(p.height=`${e}px`,p.width=`${e}px`);}if(Array.isArray(e)){let t=c(r),n=[t&&y[t]||`h-[${r}px] w-[${r}px]`];e.forEach(o=>{if(typeof o=="string"){let[x,d]=o.split(":"),i=parseInt(d,10),a=c(i);s.push(a&&T[x]?.[a]||`${x}:h-[${i}px] ${x}:w-[${i}px]`);}}),s.push(...n);}if(typeof e=="string"){let[t,n]=e.split(":"),o=parseInt(n,10),x=c(o);s.push(x&&T[t]?.[x]||`${t}:h-[${o}px] ${t}:w-[${o}px]`);}return {responsiveSizeClasses:s.join(" "),responsiveSizeStyles:p}};var b={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-15)"},g=l.forwardRef(({name:e,size:r=24,color:s="primary",title:p,className:t,style:n={},...o},x)=>{let d=IconMap[e],{responsiveSizeClasses:i,responsiveSizeStyles:a}=f(r,24);return l.createElement("div",{className:h("flex justify-center items-center",i,t),style:{"--icon-stroke":b[s],...a,...n}},l.createElement(d,{ref:x,"aria-hidden":!p,"aria-label":p,stroke:e.includes("filled")?void 0:b[s],...o}))});g.displayName="Icon";var E={xl:"h1",lg:"h1",md:"h2",sm:"h3",xs:"h4"},S=e=>{let[r,s]=e.split("-");return r==="heading"?E[s]||"p":r==="label"?"label":"p"},A={light:"font-light",regular:"font-regular",semibold:"font-semibold",bold:"font-bold"},R=e=>e?(Array.isArray(e)?e:[e]).map(s=>{if(s.includes(":")){let[p,t]=s.split(":");return `${p}:text-${t}`}return `text-${s}`}).join(" "):"text-body-default",m=l.forwardRef(({variant:e="body-default",color:r="primary",as:s,className:p,children:t,weight:n,...o},x)=>{let d=R(e),i=r==="inherit"?"text-inherit":`text-${r}`,a=l.useMemo(()=>{let H=typeof e=="string"?e.split(":").pop():Array.isArray(e)?e[0].split(":").pop():"body-default";return S(H)},[e]);return l.createElement(s||a,{ref:x,className:`
|
|
2
|
+
font-sans antialiased
|
|
3
|
+
${d}
|
|
4
|
+
${i}
|
|
5
|
+
${n&&`!${A[n]}`}
|
|
6
|
+
${p}
|
|
7
|
+
`,...o},t)});m.displayName="Text";var $=({deliveryDays:e,steps:r,className:s})=>l.createElement("div",{className:h("flex flex-col p-8 rounded-xl border border-stroke gap-4",s)},l.createElement("div",{className:"flex flex-col items-center gap-2"},l.createElement("div",{className:"bg-secondary-400 rounded-md p-4 flex items-center gap-4"},l.createElement(g,{name:"shopping-cart",size:24}),l.createElement(m,{variant:"body-md"},"Estimated delivery in"," ",l.createElement("span",{className:"font-bold"},e," days"))),l.createElement(m,{variant:"body-xxs-medium",color:"secondary",className:"italic"},"First day starts after order has been confirmed.")),l.createElement("div",{className:"flex flex-col"},r.map((p,t)=>l.createElement("div",{key:t,className:"flex gap-4 relative"},t<r.length-1&&l.createElement("div",{className:"absolute left-[13px] top-7 bottom-0 w-0.5 bg-stroke z-0"},p.status==="completed"&&l.createElement("div",{className:"absolute top-0 left-0 w-full bg-primary-blue",style:{height:t<r.length-1?"100%":"0px"}})),l.createElement("div",{className:"flex flex-col items-center z-10"},l.createElement("div",{className:h("flex items-center justify-center w-7 h-7 rounded-full",p.status==="completed"?"bg-primary-blue":p.status==="current"?"bg-white border-4 border-primary-blue":"bg-white border border-stroke")},p.status==="completed"?l.createElement(g,{name:"swoosh",size:20,color:"white"}):p.status==="current"?l.createElement("div",{className:"w-4 h-4 rounded-full bg-primary-blue"}):l.createElement("div",{className:"w-4 h-4 rounded-full border border-stroke"}))),l.createElement("div",{className:"flex flex-col pb-14"},l.createElement(m,{variant:"body-xs-medium",className:"primary"},p.title),l.createElement(m,{variant:"body-xxs-medium",color:"secondary"},p.description)))))),D=$;export{$ as OrderProgress,D as default};//# sourceMappingURL=OrderProgress.js.map
|
|
8
|
+
//# sourceMappingURL=OrderProgress.js.map
|