commerce-toolkit 0.8.0 → 0.8.1
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/category-card-link-B7MMGsnN.cjs +7 -0
- package/dist/category-card-link-B7MMGsnN.cjs.map +1 -0
- package/dist/{category-card-link-CdNA4PeK.js → category-card-link-DZ2CRf4d.js} +81 -69
- package/dist/category-card-link-DZ2CRf4d.js.map +1 -0
- package/dist/category-card.cjs +1 -1
- package/dist/category-card.js +1 -1
- package/dist/components/category-card/category-card.d.ts +3 -1
- package/dist/components/category-card/category-card.d.ts.map +1 -1
- package/dist/components/category-card/primitives/category-card-icon.d.ts.map +1 -1
- package/dist/components/category-card/primitives/category-card-root.d.ts +3 -1
- package/dist/components/category-card/primitives/category-card-root.d.ts.map +1 -1
- package/dist/components/category-card/primitives/category-card-title.d.ts.map +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +95 -91
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/category-card-link-CdNA4PeK.js.map +0 -1
- package/dist/category-card-link-CjIZ-qsb.cjs +0 -7
- package/dist/category-card-link-CjIZ-qsb.cjs.map +0 -1
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),c=require("./utils-DoxiiusW.cjs"),g=require("./index-DGaxX11V.cjs"),p=require("./createLucideIcon-CpmcoNn-.cjs");/**
|
|
2
|
+
* @license lucide-react v0.545.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const s=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],i=p.createLucideIcon("arrow-up-right",s),v=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:s,default:i},Symbol.toStringTag,{value:"Module"}));function f({className:a,children:t,as:r,aspectRatio:o="5/6",textSize:d="small",textColor:l="dark",iconColor:n="dark",showOverlay:u=!0,...y}){const x=r??"article";return e.jsx(x,{className:c.cn("group/category-card relative flex w-full max-w-md cursor-pointer flex-col rounded-[var(--category-card-border-radius,1rem)] font-[var(--category-card-font-family,var(--font-family-body))] @container","data-[text-size=small]:gap-2","data-[text-size=medium]:gap-3","data-[text-size=large]:gap-4","data-[text-size=x-large]:gap-5",a),"data-aspect-ratio":o,"data-icon-color":n,"data-show-overlay":u,"data-slot":"category-card-root","data-text-color":l,"data-text-size":d,...y,children:t})}function m({asChild:a=!1,className:t,children:r}){const o=c.cn("absolute right-5 top-5 z-10 size-6 text-[var(--category-card-light-icon,var(--foreground))] transition-transform duration-700 ease-out","group-hover/category-card:-translate-y-1.5 group-hover/category-card:translate-x-1.5","group-data-[icon-color=light]/category-card:text-[var(--category-card-light-icon,var(--background))]","group-data-[icon-color=dark]/category-card:text-[var(--category-card-dark-icon,var(--foreground))]",t);return a?e.jsx(g.Slot,{className:o,"data-slot":"category-card-icon",children:r}):e.jsx(i,{absoluteStrokeWidth:!0,className:o,"data-slot":"category-card-icon",strokeWidth:1.5})}function h({className:a,children:t,...r}){return e.jsx("div",{className:c.cn("relative overflow-hidden rounded-[inherit] bg-[var(--category-card-light-background,var(--contrast-100))]","group-focus-visible/category-card:outline-2 group-focus-visible/category-card:outline-offset-4 group-focus-visible/category-card:outline-[var(--category-card-focus,var(--brand))]","group-data-[aspect-ratio=1/1]/category-card:aspect-square","group-data-[aspect-ratio=3/4]/category-card:aspect-[3/4]","group-data-[aspect-ratio=5/6]/category-card:aspect-[5/6]",a),"data-slot":"category-card-thumbnail",...r,children:t})}function b({className:a,children:t,asChild:r=!1,...o}){const d=r?g.Slot:"img";return e.jsx(d,{className:c.cn("h-full w-full scale-100 select-none bg-[var(--category-card-light-background,var(--contrast-100))] object-cover transition-transform duration-500 ease-out","group-hover/category-card:scale-110",a),"data-slot":"category-card-image",...o})}function C({className:a,children:t,...r}){return e.jsx("div",{className:c.cn("break-words p-4 text-4xl font-bold leading-none tracking-tight transition-transform duration-500 ease-out [color:color-mix(in_oklab,var(--foreground)_30%,transparent)]","group-hover/category-card:scale-105",a),"data-slot":"category-card-fallback",...r,children:t})}function k({children:a,className:t,...r}){return e.jsx("div",{className:c.cn("absolute inset-0 flex items-end p-6","group-data-[show-overlay=true]/category-card:bg-gradient-to-b","group-data-[show-overlay=true]/category-card:from-foreground/0 group-data-[show-overlay=true]/category-card:from-50%","group-data-[show-overlay=true]/category-card:via-foreground/0 group-data-[show-overlay=true]/category-card:via-50%","group-data-[show-overlay=true]/category-card:to-foreground/50 group-data-[show-overlay=true]/category-card:to-100%","@xs:p-8",t),"data-slot":"category-card-overlay",...r,children:a})}function z({children:a,className:t,...r}){return e.jsx("h3",{className:c.cn("font-semibold leading-tight","group-data-[text-size=small]/category-card:text-lg group-data-[text-size=small]/category-card:tracking-normal","group-data-[text-size=small]/category-card:@xs:text-xl","group-data-[text-size=medium]/category-card:text-xl group-data-[text-size=medium]/category-card:tracking-normal","group-data-[text-size=medium]/category-card:@xs:text-2xl","group-data-[text-size=large]/category-card:text-2xl group-data-[text-size=large]/category-card:tracking-tight","group-data-[text-size=large]/category-card:@xs:text-3xl","group-data-[text-size=x-large]/category-card:text-3xl group-data-[text-size=x-large]/category-card:tracking-tight","group-data-[text-size=x-large]/category-card:@xs:text-4xl","group-data-[text-color=light]/category-card:text-[var(--category-card-light-text,var(--background))]","group-data-[text-color=dark]/category-card:text-[var(--category-card-dark-text,var(--foreground))]",t),"data-slot":"category-card-title",...r,children:a})}function w({asChild:a=!1,className:t,...r}){const o=a?g.Slot:"a";return e.jsx(o,{className:c.cn("absolute inset-0 rounded-[var(--category-card-border-radius,1rem)]","focus:outline-none focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-[var(--category-card-focus,var(--brand))]",t),"data-slot":"category-card-link",...r})}exports.CategoryCardFallback=C;exports.CategoryCardIcon=m;exports.CategoryCardImage=b;exports.CategoryCardLink=w;exports.CategoryCardOverlay=k;exports.CategoryCardRoot=f;exports.CategoryCardThumbnail=h;exports.CategoryCardTitle=z;exports.arrowUpRight=v;
|
|
7
|
+
//# sourceMappingURL=category-card-link-B7MMGsnN.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"category-card-link-B7MMGsnN.cjs","sources":["../node_modules/.pnpm/lucide-react@0.545.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/arrow-up-right.js","../src/components/category-card/primitives/category-card-root.tsx","../src/components/category-card/primitives/category-card-icon.tsx","../src/components/category-card/primitives/category-card-thumbnail.tsx","../src/components/category-card/primitives/category-card-image.tsx","../src/components/category-card/primitives/category-card-fallback.tsx","../src/components/category-card/primitives/category-card-overlay.tsx","../src/components/category-card/primitives/category-card-title.tsx","../src/components/category-card/primitives/category-card-link.tsx"],"sourcesContent":["/**\n * @license lucide-react v0.545.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\"path\", { d: \"M7 7h10v10\", key: \"1tivn9\" }],\n [\"path\", { d: \"M7 17 17 7\", key: \"1vkiza\" }]\n];\nconst ArrowUpRight = createLucideIcon(\"arrow-up-right\", __iconNode);\n\nexport { __iconNode, ArrowUpRight as default };\n//# sourceMappingURL=arrow-up-right.js.map\n","'use client';\n\nimport type { ComponentProps, ElementType } from 'react';\n\nimport { cn } from '@/lib';\n\nexport type CategoryCardRootProps<E extends ElementType = 'article'> = Omit<\n ComponentProps<E>,\n 'as'\n> & {\n as?: E;\n aspectRatio?: '5/6' | '3/4' | '1/1';\n textSize?: 'small' | 'medium' | 'large' | 'x-large';\n textColor?: 'light' | 'dark';\n iconColor?: 'light' | 'dark';\n showOverlay?: boolean;\n};\n\nexport function CategoryCardRoot<T extends ElementType = 'article'>({\n className,\n children,\n as,\n aspectRatio = '5/6',\n textSize = 'small',\n textColor = 'dark',\n iconColor = 'dark',\n showOverlay = true,\n ...props\n}: CategoryCardRootProps<T>) {\n const CategoryCardRootElement = as ?? 'article';\n\n return (\n <CategoryCardRootElement\n className={cn(\n 'group/category-card relative flex w-full max-w-md cursor-pointer flex-col rounded-[var(--category-card-border-radius,1rem)] font-[var(--category-card-font-family,var(--font-family-body))] @container',\n // Text size gap variants\n 'data-[text-size=small]:gap-2',\n 'data-[text-size=medium]:gap-3',\n 'data-[text-size=large]:gap-4',\n 'data-[text-size=x-large]:gap-5',\n className,\n )}\n data-aspect-ratio={aspectRatio}\n data-icon-color={iconColor}\n data-show-overlay={showOverlay}\n data-slot=\"category-card-root\"\n data-text-color={textColor}\n data-text-size={textSize}\n {...props}\n >\n {children}\n </CategoryCardRootElement>\n );\n}\n","'use client';\n\nimport { Slot } from '@radix-ui/react-slot';\nimport { ArrowUpRight } from 'lucide-react';\nimport type { ReactNode } from 'react';\n\nimport { cn } from '@/lib';\n\nexport interface CategoryCardIconProps {\n asChild?: boolean;\n className?: string;\n children?: ReactNode;\n}\n\nexport function CategoryCardIcon({ asChild = false, className, children }: CategoryCardIconProps) {\n const baseClassName = cn(\n 'absolute right-5 top-5 z-10 size-6 text-[var(--category-card-light-icon,var(--foreground))] transition-transform duration-700 ease-out',\n // Group hover state\n 'group-hover/category-card:-translate-y-1.5 group-hover/category-card:translate-x-1.5',\n // Icon color: light\n 'group-data-[icon-color=light]/category-card:text-[var(--category-card-light-icon,var(--background))]',\n // Icon color: dark\n 'group-data-[icon-color=dark]/category-card:text-[var(--category-card-dark-icon,var(--foreground))]',\n className,\n );\n\n if (asChild) {\n return (\n <Slot className={baseClassName} data-slot=\"category-card-icon\">\n {children}\n </Slot>\n );\n }\n\n return (\n <ArrowUpRight\n absoluteStrokeWidth\n className={baseClassName}\n data-slot=\"category-card-icon\"\n strokeWidth={1.5}\n />\n );\n}\n","import type { ComponentProps } from 'react';\n\nimport { cn } from '@/lib';\n\nexport type CategoryCardThumbnailProps = ComponentProps<'div'>;\n\nexport function CategoryCardThumbnail({\n className,\n children,\n ...props\n}: CategoryCardThumbnailProps) {\n return (\n <div\n className={cn(\n 'relative overflow-hidden rounded-[inherit] bg-[var(--category-card-light-background,var(--contrast-100))]',\n // Group focus-visible state\n 'group-focus-visible/category-card:outline-2 group-focus-visible/category-card:outline-offset-4 group-focus-visible/category-card:outline-[var(--category-card-focus,var(--brand))]',\n // Aspect ratio variants\n 'group-data-[aspect-ratio=1/1]/category-card:aspect-square',\n 'group-data-[aspect-ratio=3/4]/category-card:aspect-[3/4]',\n 'group-data-[aspect-ratio=5/6]/category-card:aspect-[5/6]',\n className,\n )}\n data-slot=\"category-card-thumbnail\"\n {...props}\n >\n {children}\n </div>\n );\n}\n","'use client';\n\nimport { Slot } from '@radix-ui/react-slot';\nimport type { ComponentProps } from 'react';\n\nimport { cn } from '@/lib';\n\nexport type CategoryCardImageProps = ComponentProps<'img'> & {\n asChild?: boolean;\n};\n\nexport function CategoryCardImage({\n className,\n children,\n asChild = false,\n ...props\n}: CategoryCardImageProps) {\n const Component = asChild ? Slot : 'img';\n\n return (\n <Component\n className={cn(\n 'h-full w-full scale-100 select-none bg-[var(--category-card-light-background,var(--contrast-100))] object-cover transition-transform duration-500 ease-out',\n // Group hover state\n 'group-hover/category-card:scale-110',\n className,\n )}\n data-slot=\"category-card-image\"\n {...props}\n />\n );\n}\n","import type { ComponentProps } from 'react';\n\nimport { cn } from '@/lib';\n\nexport type CategoryCardFallbackProps = ComponentProps<'div'>;\n\nexport function CategoryCardFallback({ className, children, ...props }: CategoryCardFallbackProps) {\n return (\n <div\n className={cn(\n 'break-words p-4 text-4xl font-bold leading-none tracking-tight transition-transform duration-500 ease-out [color:color-mix(in_oklab,var(--foreground)_30%,transparent)]',\n // Group hover state\n 'group-hover/category-card:scale-105',\n className,\n )}\n data-slot=\"category-card-fallback\"\n {...props}\n >\n {children}\n </div>\n );\n}\n","import type { ComponentProps } from 'react';\n\nimport { cn } from '@/lib';\n\nexport type CategoryCardOverlayProps = ComponentProps<'div'>;\n\nexport function CategoryCardOverlay({ children, className, ...props }: CategoryCardOverlayProps) {\n return (\n <div\n className={cn(\n 'absolute inset-0 flex items-end p-6',\n // Show overlay gradient\n 'group-data-[show-overlay=true]/category-card:bg-gradient-to-b',\n 'group-data-[show-overlay=true]/category-card:from-foreground/0 group-data-[show-overlay=true]/category-card:from-50%',\n 'group-data-[show-overlay=true]/category-card:via-foreground/0 group-data-[show-overlay=true]/category-card:via-50%',\n 'group-data-[show-overlay=true]/category-card:to-foreground/50 group-data-[show-overlay=true]/category-card:to-100%',\n // Container query\n '@xs:p-8',\n className,\n )}\n data-slot=\"category-card-overlay\"\n {...props}\n >\n {children}\n </div>\n );\n}\n","import type { ComponentProps } from 'react';\n\nimport { cn } from '@/lib';\n\nexport type CategoryCardTitleProps = ComponentProps<'h3'>;\n\nexport function CategoryCardTitle({ children, className, ...props }: CategoryCardTitleProps) {\n return (\n <h3\n className={cn(\n 'font-semibold leading-tight',\n // Text size: small\n 'group-data-[text-size=small]/category-card:text-lg group-data-[text-size=small]/category-card:tracking-normal',\n 'group-data-[text-size=small]/category-card:@xs:text-xl',\n // Text size: medium\n 'group-data-[text-size=medium]/category-card:text-xl group-data-[text-size=medium]/category-card:tracking-normal',\n 'group-data-[text-size=medium]/category-card:@xs:text-2xl',\n // Text size: large\n 'group-data-[text-size=large]/category-card:text-2xl group-data-[text-size=large]/category-card:tracking-tight',\n 'group-data-[text-size=large]/category-card:@xs:text-3xl',\n // Text size: x-large\n 'group-data-[text-size=x-large]/category-card:text-3xl group-data-[text-size=x-large]/category-card:tracking-tight',\n 'group-data-[text-size=x-large]/category-card:@xs:text-4xl',\n // Text color: light\n 'group-data-[text-color=light]/category-card:text-[var(--category-card-light-text,var(--background))]',\n // Text color: dark\n 'group-data-[text-color=dark]/category-card:text-[var(--category-card-dark-text,var(--foreground))]',\n className,\n )}\n data-slot=\"category-card-title\"\n {...props}\n >\n {children}\n </h3>\n );\n}\n","'use client';\n\nimport { Slot } from '@radix-ui/react-slot';\nimport type { ComponentProps } from 'react';\n\nimport { cn } from '@/lib';\n\nexport interface CategoryCardLinkProps extends ComponentProps<'a'> {\n asChild?: boolean;\n}\n\nexport function CategoryCardLink({ asChild = false, className, ...props }: CategoryCardLinkProps) {\n const Component = asChild ? Slot : 'a';\n\n return (\n <Component\n className={cn(\n 'absolute inset-0 rounded-[var(--category-card-border-radius,1rem)]',\n // Focus-visible state\n 'focus:outline-none focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-[var(--category-card-focus,var(--brand))]',\n className,\n )}\n data-slot=\"category-card-link\"\n {...props}\n />\n );\n}\n"],"names":["__iconNode","ArrowUpRight","createLucideIcon","CategoryCardRoot","className","children","as","aspectRatio","textSize","textColor","iconColor","showOverlay","props","CategoryCardRootElement","jsx","cn","CategoryCardIcon","asChild","baseClassName","Slot","CategoryCardThumbnail","CategoryCardImage","Component","CategoryCardFallback","CategoryCardOverlay","CategoryCardTitle","CategoryCardLink"],"mappings":"mKAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GASA,MAAMA,EAAa,CACjB,CAAC,OAAQ,CAAE,EAAG,aAAc,IAAK,QAAQ,CAAE,EAC3C,CAAC,OAAQ,CAAE,EAAG,aAAc,IAAK,QAAQ,CAAE,CAC7C,EACMC,EAAeC,EAAAA,iBAAiB,iBAAkBF,CAAU,sHCK3D,SAASG,EAAoD,CAClE,UAAAC,EACA,SAAAC,EACA,GAAAC,EACA,YAAAC,EAAc,MACd,SAAAC,EAAW,QACX,UAAAC,EAAY,OACZ,UAAAC,EAAY,OACZ,YAAAC,EAAc,GACd,GAAGC,CACL,EAA6B,CAC3B,MAAMC,EAA0BP,GAAM,UAEtC,OACEQ,EAAAA,IAACD,EAAA,CACC,UAAWE,EAAAA,GACT,yMAEA,+BACA,gCACA,+BACA,iCACAX,CAAA,EAEF,oBAAmBG,EACnB,kBAAiBG,EACjB,oBAAmBC,EACnB,YAAU,qBACV,kBAAiBF,EACjB,iBAAgBD,EACf,GAAGI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SAAAP,CAAA,CAAA,CAGP,CCpBO,SAASoB,EAAkB,CAAE,SAAApB,EAAU,UAAAD,EAAW,GAAGQ,GAAiC,CAC3F,OACEE,EAAAA,IAAC,KAAA,CACC,UAAWC,EAAAA,GACT,8BAEA,gHACA,yDAEA,kHACA,2DAEA,gHACA,0DAEA,oHACA,4DAEA,uGAEA,qGACAX,CAAA,EAEF,YAAU,sBACT,GAAGQ,EAEH,SAAAP,CAAA,CAAA,CAGP,CCxBO,SAASqB,EAAiB,CAAE,QAAAT,EAAU,GAAO,UAAAb,EAAW,GAAGQ,GAAgC,CAChG,MAAMU,EAAYL,EAAUE,EAAAA,KAAO,IAEnC,OACEL,EAAAA,IAACQ,EAAA,CACC,UAAWP,EAAAA,GACT,qEAEA,4IACAX,CAAA,EAEF,YAAU,qBACT,GAAGQ,CAAA,CAAA,CAGV","x_google_ignoreList":[0]}
|
|
@@ -1,34 +1,36 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { c as
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { c as e } from "./utils-CRiPKpXj.js";
|
|
3
3
|
import { S as d } from "./index-DD8W7cMj.js";
|
|
4
|
-
import { c as
|
|
4
|
+
import { c as p } from "./createLucideIcon-DU8bVqFn.js";
|
|
5
5
|
/**
|
|
6
6
|
* @license lucide-react v0.545.0 - ISC
|
|
7
7
|
*
|
|
8
8
|
* This source code is licensed under the ISC license.
|
|
9
9
|
* See the LICENSE file in the root directory of this source tree.
|
|
10
10
|
*/
|
|
11
|
-
const
|
|
11
|
+
const s = [
|
|
12
12
|
["path", { d: "M7 7h10v10", key: "1tivn9" }],
|
|
13
13
|
["path", { d: "M7 17 17 7", key: "1vkiza" }]
|
|
14
|
-
],
|
|
14
|
+
], l = p("arrow-up-right", s), b = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
15
15
|
__proto__: null,
|
|
16
|
-
__iconNode:
|
|
17
|
-
default:
|
|
16
|
+
__iconNode: s,
|
|
17
|
+
default: l
|
|
18
18
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
19
|
-
function
|
|
19
|
+
function k({
|
|
20
20
|
className: a,
|
|
21
|
-
children:
|
|
22
|
-
as:
|
|
21
|
+
children: t,
|
|
22
|
+
as: r,
|
|
23
23
|
aspectRatio: c = "5/6",
|
|
24
|
-
textSize:
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
textSize: g = "small",
|
|
25
|
+
textColor: i = "dark",
|
|
26
|
+
iconColor: n = "dark",
|
|
27
|
+
showOverlay: u = !0,
|
|
28
|
+
...y
|
|
27
29
|
}) {
|
|
28
|
-
return /* @__PURE__ */
|
|
29
|
-
|
|
30
|
+
return /* @__PURE__ */ o(
|
|
31
|
+
r ?? "article",
|
|
30
32
|
{
|
|
31
|
-
className:
|
|
33
|
+
className: e(
|
|
32
34
|
"group/category-card relative flex w-full max-w-md cursor-pointer flex-col rounded-[var(--category-card-border-radius,1rem)] font-[var(--category-card-font-family,var(--font-family-body))] @container",
|
|
33
35
|
// Text size gap variants
|
|
34
36
|
"data-[text-size=small]:gap-2",
|
|
@@ -38,23 +40,29 @@ function h({
|
|
|
38
40
|
a
|
|
39
41
|
),
|
|
40
42
|
"data-aspect-ratio": c,
|
|
41
|
-
"data-
|
|
43
|
+
"data-icon-color": n,
|
|
44
|
+
"data-show-overlay": u,
|
|
42
45
|
"data-slot": "category-card-root",
|
|
43
|
-
"data-text-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
+
"data-text-color": i,
|
|
47
|
+
"data-text-size": g,
|
|
48
|
+
...y,
|
|
49
|
+
children: t
|
|
46
50
|
}
|
|
47
51
|
);
|
|
48
52
|
}
|
|
49
|
-
function
|
|
50
|
-
const c =
|
|
53
|
+
function C({ asChild: a = !1, className: t, children: r }) {
|
|
54
|
+
const c = e(
|
|
51
55
|
"absolute right-5 top-5 z-10 size-6 text-[var(--category-card-light-icon,var(--foreground))] transition-transform duration-700 ease-out",
|
|
52
56
|
// Group hover state
|
|
53
57
|
"group-hover/category-card:-translate-y-1.5 group-hover/category-card:translate-x-1.5",
|
|
54
|
-
|
|
58
|
+
// Icon color: light
|
|
59
|
+
"group-data-[icon-color=light]/category-card:text-[var(--category-card-light-icon,var(--background))]",
|
|
60
|
+
// Icon color: dark
|
|
61
|
+
"group-data-[icon-color=dark]/category-card:text-[var(--category-card-dark-icon,var(--foreground))]",
|
|
62
|
+
t
|
|
55
63
|
);
|
|
56
|
-
return a ? /* @__PURE__ */
|
|
57
|
-
|
|
64
|
+
return a ? /* @__PURE__ */ o(d, { className: c, "data-slot": "category-card-icon", children: r }) : /* @__PURE__ */ o(
|
|
65
|
+
l,
|
|
58
66
|
{
|
|
59
67
|
absoluteStrokeWidth: !0,
|
|
60
68
|
className: c,
|
|
@@ -63,15 +71,15 @@ function b({ asChild: a = !1, className: r, children: t }) {
|
|
|
63
71
|
}
|
|
64
72
|
);
|
|
65
73
|
}
|
|
66
|
-
function
|
|
74
|
+
function z({
|
|
67
75
|
className: a,
|
|
68
|
-
children:
|
|
69
|
-
...
|
|
76
|
+
children: t,
|
|
77
|
+
...r
|
|
70
78
|
}) {
|
|
71
|
-
return /* @__PURE__ */
|
|
79
|
+
return /* @__PURE__ */ o(
|
|
72
80
|
"div",
|
|
73
81
|
{
|
|
74
|
-
className:
|
|
82
|
+
className: e(
|
|
75
83
|
"relative overflow-hidden rounded-[inherit] bg-[var(--category-card-light-background,var(--contrast-100))]",
|
|
76
84
|
// Group focus-visible state
|
|
77
85
|
"group-focus-visible/category-card:outline-2 group-focus-visible/category-card:outline-offset-4 group-focus-visible/category-card:outline-[var(--category-card-focus,var(--brand))]",
|
|
@@ -82,21 +90,21 @@ function C({
|
|
|
82
90
|
a
|
|
83
91
|
),
|
|
84
92
|
"data-slot": "category-card-thumbnail",
|
|
85
|
-
...
|
|
86
|
-
children:
|
|
93
|
+
...r,
|
|
94
|
+
children: t
|
|
87
95
|
}
|
|
88
96
|
);
|
|
89
97
|
}
|
|
90
|
-
function
|
|
98
|
+
function w({
|
|
91
99
|
className: a,
|
|
92
|
-
children:
|
|
93
|
-
asChild:
|
|
100
|
+
children: t,
|
|
101
|
+
asChild: r = !1,
|
|
94
102
|
...c
|
|
95
103
|
}) {
|
|
96
|
-
return /* @__PURE__ */
|
|
97
|
-
|
|
104
|
+
return /* @__PURE__ */ o(
|
|
105
|
+
r ? d : "img",
|
|
98
106
|
{
|
|
99
|
-
className:
|
|
107
|
+
className: e(
|
|
100
108
|
"h-full w-full scale-100 select-none bg-[var(--category-card-light-background,var(--contrast-100))] object-cover transition-transform duration-500 ease-out",
|
|
101
109
|
// Group hover state
|
|
102
110
|
"group-hover/category-card:scale-110",
|
|
@@ -107,27 +115,27 @@ function z({
|
|
|
107
115
|
}
|
|
108
116
|
);
|
|
109
117
|
}
|
|
110
|
-
function
|
|
111
|
-
return /* @__PURE__ */
|
|
118
|
+
function N({ className: a, children: t, ...r }) {
|
|
119
|
+
return /* @__PURE__ */ o(
|
|
112
120
|
"div",
|
|
113
121
|
{
|
|
114
|
-
className:
|
|
122
|
+
className: e(
|
|
115
123
|
"break-words p-4 text-4xl font-bold leading-none tracking-tight transition-transform duration-500 ease-out [color:color-mix(in_oklab,var(--foreground)_30%,transparent)]",
|
|
116
124
|
// Group hover state
|
|
117
125
|
"group-hover/category-card:scale-105",
|
|
118
126
|
a
|
|
119
127
|
),
|
|
120
128
|
"data-slot": "category-card-fallback",
|
|
121
|
-
...
|
|
122
|
-
children:
|
|
129
|
+
...r,
|
|
130
|
+
children: t
|
|
123
131
|
}
|
|
124
132
|
);
|
|
125
133
|
}
|
|
126
|
-
function
|
|
127
|
-
return /* @__PURE__ */
|
|
134
|
+
function _({ children: a, className: t, ...r }) {
|
|
135
|
+
return /* @__PURE__ */ o(
|
|
128
136
|
"div",
|
|
129
137
|
{
|
|
130
|
-
className:
|
|
138
|
+
className: e(
|
|
131
139
|
"absolute inset-0 flex items-end p-6",
|
|
132
140
|
// Show overlay gradient
|
|
133
141
|
"group-data-[show-overlay=true]/category-card:bg-gradient-to-b",
|
|
@@ -136,20 +144,20 @@ function w({ children: a, className: r, ...t }) {
|
|
|
136
144
|
"group-data-[show-overlay=true]/category-card:to-foreground/50 group-data-[show-overlay=true]/category-card:to-100%",
|
|
137
145
|
// Container query
|
|
138
146
|
"@xs:p-8",
|
|
139
|
-
|
|
147
|
+
t
|
|
140
148
|
),
|
|
141
149
|
"data-slot": "category-card-overlay",
|
|
142
|
-
...
|
|
150
|
+
...r,
|
|
143
151
|
children: a
|
|
144
152
|
}
|
|
145
153
|
);
|
|
146
154
|
}
|
|
147
|
-
function
|
|
148
|
-
return /* @__PURE__ */
|
|
155
|
+
function R({ children: a, className: t, ...r }) {
|
|
156
|
+
return /* @__PURE__ */ o(
|
|
149
157
|
"h3",
|
|
150
158
|
{
|
|
151
|
-
className:
|
|
152
|
-
"font-semibold leading-tight
|
|
159
|
+
className: e(
|
|
160
|
+
"font-semibold leading-tight",
|
|
153
161
|
// Text size: small
|
|
154
162
|
"group-data-[text-size=small]/category-card:text-lg group-data-[text-size=small]/category-card:tracking-normal",
|
|
155
163
|
"group-data-[text-size=small]/category-card:@xs:text-xl",
|
|
@@ -162,38 +170,42 @@ function N({ children: a, className: r, ...t }) {
|
|
|
162
170
|
// Text size: x-large
|
|
163
171
|
"group-data-[text-size=x-large]/category-card:text-3xl group-data-[text-size=x-large]/category-card:tracking-tight",
|
|
164
172
|
"group-data-[text-size=x-large]/category-card:@xs:text-4xl",
|
|
165
|
-
|
|
173
|
+
// Text color: light
|
|
174
|
+
"group-data-[text-color=light]/category-card:text-[var(--category-card-light-text,var(--background))]",
|
|
175
|
+
// Text color: dark
|
|
176
|
+
"group-data-[text-color=dark]/category-card:text-[var(--category-card-dark-text,var(--foreground))]",
|
|
177
|
+
t
|
|
166
178
|
),
|
|
167
179
|
"data-slot": "category-card-title",
|
|
168
|
-
...
|
|
180
|
+
...r,
|
|
169
181
|
children: a
|
|
170
182
|
}
|
|
171
183
|
);
|
|
172
184
|
}
|
|
173
|
-
function
|
|
174
|
-
return /* @__PURE__ */
|
|
185
|
+
function S({ asChild: a = !1, className: t, ...r }) {
|
|
186
|
+
return /* @__PURE__ */ o(
|
|
175
187
|
a ? d : "a",
|
|
176
188
|
{
|
|
177
|
-
className:
|
|
189
|
+
className: e(
|
|
178
190
|
"absolute inset-0 rounded-[var(--category-card-border-radius,1rem)]",
|
|
179
191
|
// Focus-visible state
|
|
180
192
|
"focus:outline-none focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-[var(--category-card-focus,var(--brand))]",
|
|
181
|
-
|
|
193
|
+
t
|
|
182
194
|
),
|
|
183
195
|
"data-slot": "category-card-link",
|
|
184
|
-
...
|
|
196
|
+
...r
|
|
185
197
|
}
|
|
186
198
|
);
|
|
187
199
|
}
|
|
188
200
|
export {
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
201
|
+
k as C,
|
|
202
|
+
C as a,
|
|
203
|
+
z as b,
|
|
204
|
+
w as c,
|
|
205
|
+
N as d,
|
|
206
|
+
_ as e,
|
|
207
|
+
R as f,
|
|
208
|
+
S as g,
|
|
209
|
+
b as h
|
|
198
210
|
};
|
|
199
|
-
//# sourceMappingURL=category-card-link-
|
|
211
|
+
//# sourceMappingURL=category-card-link-DZ2CRf4d.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"category-card-link-DZ2CRf4d.js","sources":["../node_modules/.pnpm/lucide-react@0.545.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/arrow-up-right.js","../src/components/category-card/primitives/category-card-root.tsx","../src/components/category-card/primitives/category-card-icon.tsx","../src/components/category-card/primitives/category-card-thumbnail.tsx","../src/components/category-card/primitives/category-card-image.tsx","../src/components/category-card/primitives/category-card-fallback.tsx","../src/components/category-card/primitives/category-card-overlay.tsx","../src/components/category-card/primitives/category-card-title.tsx","../src/components/category-card/primitives/category-card-link.tsx"],"sourcesContent":["/**\n * @license lucide-react v0.545.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\"path\", { d: \"M7 7h10v10\", key: \"1tivn9\" }],\n [\"path\", { d: \"M7 17 17 7\", key: \"1vkiza\" }]\n];\nconst ArrowUpRight = createLucideIcon(\"arrow-up-right\", __iconNode);\n\nexport { __iconNode, ArrowUpRight as default };\n//# sourceMappingURL=arrow-up-right.js.map\n","'use client';\n\nimport type { ComponentProps, ElementType } from 'react';\n\nimport { cn } from '@/lib';\n\nexport type CategoryCardRootProps<E extends ElementType = 'article'> = Omit<\n ComponentProps<E>,\n 'as'\n> & {\n as?: E;\n aspectRatio?: '5/6' | '3/4' | '1/1';\n textSize?: 'small' | 'medium' | 'large' | 'x-large';\n textColor?: 'light' | 'dark';\n iconColor?: 'light' | 'dark';\n showOverlay?: boolean;\n};\n\nexport function CategoryCardRoot<T extends ElementType = 'article'>({\n className,\n children,\n as,\n aspectRatio = '5/6',\n textSize = 'small',\n textColor = 'dark',\n iconColor = 'dark',\n showOverlay = true,\n ...props\n}: CategoryCardRootProps<T>) {\n const CategoryCardRootElement = as ?? 'article';\n\n return (\n <CategoryCardRootElement\n className={cn(\n 'group/category-card relative flex w-full max-w-md cursor-pointer flex-col rounded-[var(--category-card-border-radius,1rem)] font-[var(--category-card-font-family,var(--font-family-body))] @container',\n // Text size gap variants\n 'data-[text-size=small]:gap-2',\n 'data-[text-size=medium]:gap-3',\n 'data-[text-size=large]:gap-4',\n 'data-[text-size=x-large]:gap-5',\n className,\n )}\n data-aspect-ratio={aspectRatio}\n data-icon-color={iconColor}\n data-show-overlay={showOverlay}\n data-slot=\"category-card-root\"\n data-text-color={textColor}\n data-text-size={textSize}\n {...props}\n >\n {children}\n </CategoryCardRootElement>\n );\n}\n","'use client';\n\nimport { Slot } from '@radix-ui/react-slot';\nimport { ArrowUpRight } from 'lucide-react';\nimport type { ReactNode } from 'react';\n\nimport { cn } from '@/lib';\n\nexport interface CategoryCardIconProps {\n asChild?: boolean;\n className?: string;\n children?: ReactNode;\n}\n\nexport function CategoryCardIcon({ asChild = false, className, children }: CategoryCardIconProps) {\n const baseClassName = cn(\n 'absolute right-5 top-5 z-10 size-6 text-[var(--category-card-light-icon,var(--foreground))] transition-transform duration-700 ease-out',\n // Group hover state\n 'group-hover/category-card:-translate-y-1.5 group-hover/category-card:translate-x-1.5',\n // Icon color: light\n 'group-data-[icon-color=light]/category-card:text-[var(--category-card-light-icon,var(--background))]',\n // Icon color: dark\n 'group-data-[icon-color=dark]/category-card:text-[var(--category-card-dark-icon,var(--foreground))]',\n className,\n );\n\n if (asChild) {\n return (\n <Slot className={baseClassName} data-slot=\"category-card-icon\">\n {children}\n </Slot>\n );\n }\n\n return (\n <ArrowUpRight\n absoluteStrokeWidth\n className={baseClassName}\n data-slot=\"category-card-icon\"\n strokeWidth={1.5}\n />\n );\n}\n","import type { ComponentProps } from 'react';\n\nimport { cn } from '@/lib';\n\nexport type CategoryCardThumbnailProps = ComponentProps<'div'>;\n\nexport function CategoryCardThumbnail({\n className,\n children,\n ...props\n}: CategoryCardThumbnailProps) {\n return (\n <div\n className={cn(\n 'relative overflow-hidden rounded-[inherit] bg-[var(--category-card-light-background,var(--contrast-100))]',\n // Group focus-visible state\n 'group-focus-visible/category-card:outline-2 group-focus-visible/category-card:outline-offset-4 group-focus-visible/category-card:outline-[var(--category-card-focus,var(--brand))]',\n // Aspect ratio variants\n 'group-data-[aspect-ratio=1/1]/category-card:aspect-square',\n 'group-data-[aspect-ratio=3/4]/category-card:aspect-[3/4]',\n 'group-data-[aspect-ratio=5/6]/category-card:aspect-[5/6]',\n className,\n )}\n data-slot=\"category-card-thumbnail\"\n {...props}\n >\n {children}\n </div>\n );\n}\n","'use client';\n\nimport { Slot } from '@radix-ui/react-slot';\nimport type { ComponentProps } from 'react';\n\nimport { cn } from '@/lib';\n\nexport type CategoryCardImageProps = ComponentProps<'img'> & {\n asChild?: boolean;\n};\n\nexport function CategoryCardImage({\n className,\n children,\n asChild = false,\n ...props\n}: CategoryCardImageProps) {\n const Component = asChild ? Slot : 'img';\n\n return (\n <Component\n className={cn(\n 'h-full w-full scale-100 select-none bg-[var(--category-card-light-background,var(--contrast-100))] object-cover transition-transform duration-500 ease-out',\n // Group hover state\n 'group-hover/category-card:scale-110',\n className,\n )}\n data-slot=\"category-card-image\"\n {...props}\n />\n );\n}\n","import type { ComponentProps } from 'react';\n\nimport { cn } from '@/lib';\n\nexport type CategoryCardFallbackProps = ComponentProps<'div'>;\n\nexport function CategoryCardFallback({ className, children, ...props }: CategoryCardFallbackProps) {\n return (\n <div\n className={cn(\n 'break-words p-4 text-4xl font-bold leading-none tracking-tight transition-transform duration-500 ease-out [color:color-mix(in_oklab,var(--foreground)_30%,transparent)]',\n // Group hover state\n 'group-hover/category-card:scale-105',\n className,\n )}\n data-slot=\"category-card-fallback\"\n {...props}\n >\n {children}\n </div>\n );\n}\n","import type { ComponentProps } from 'react';\n\nimport { cn } from '@/lib';\n\nexport type CategoryCardOverlayProps = ComponentProps<'div'>;\n\nexport function CategoryCardOverlay({ children, className, ...props }: CategoryCardOverlayProps) {\n return (\n <div\n className={cn(\n 'absolute inset-0 flex items-end p-6',\n // Show overlay gradient\n 'group-data-[show-overlay=true]/category-card:bg-gradient-to-b',\n 'group-data-[show-overlay=true]/category-card:from-foreground/0 group-data-[show-overlay=true]/category-card:from-50%',\n 'group-data-[show-overlay=true]/category-card:via-foreground/0 group-data-[show-overlay=true]/category-card:via-50%',\n 'group-data-[show-overlay=true]/category-card:to-foreground/50 group-data-[show-overlay=true]/category-card:to-100%',\n // Container query\n '@xs:p-8',\n className,\n )}\n data-slot=\"category-card-overlay\"\n {...props}\n >\n {children}\n </div>\n );\n}\n","import type { ComponentProps } from 'react';\n\nimport { cn } from '@/lib';\n\nexport type CategoryCardTitleProps = ComponentProps<'h3'>;\n\nexport function CategoryCardTitle({ children, className, ...props }: CategoryCardTitleProps) {\n return (\n <h3\n className={cn(\n 'font-semibold leading-tight',\n // Text size: small\n 'group-data-[text-size=small]/category-card:text-lg group-data-[text-size=small]/category-card:tracking-normal',\n 'group-data-[text-size=small]/category-card:@xs:text-xl',\n // Text size: medium\n 'group-data-[text-size=medium]/category-card:text-xl group-data-[text-size=medium]/category-card:tracking-normal',\n 'group-data-[text-size=medium]/category-card:@xs:text-2xl',\n // Text size: large\n 'group-data-[text-size=large]/category-card:text-2xl group-data-[text-size=large]/category-card:tracking-tight',\n 'group-data-[text-size=large]/category-card:@xs:text-3xl',\n // Text size: x-large\n 'group-data-[text-size=x-large]/category-card:text-3xl group-data-[text-size=x-large]/category-card:tracking-tight',\n 'group-data-[text-size=x-large]/category-card:@xs:text-4xl',\n // Text color: light\n 'group-data-[text-color=light]/category-card:text-[var(--category-card-light-text,var(--background))]',\n // Text color: dark\n 'group-data-[text-color=dark]/category-card:text-[var(--category-card-dark-text,var(--foreground))]',\n className,\n )}\n data-slot=\"category-card-title\"\n {...props}\n >\n {children}\n </h3>\n );\n}\n","'use client';\n\nimport { Slot } from '@radix-ui/react-slot';\nimport type { ComponentProps } from 'react';\n\nimport { cn } from '@/lib';\n\nexport interface CategoryCardLinkProps extends ComponentProps<'a'> {\n asChild?: boolean;\n}\n\nexport function CategoryCardLink({ asChild = false, className, ...props }: CategoryCardLinkProps) {\n const Component = asChild ? Slot : 'a';\n\n return (\n <Component\n className={cn(\n 'absolute inset-0 rounded-[var(--category-card-border-radius,1rem)]',\n // Focus-visible state\n 'focus:outline-none focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-[var(--category-card-focus,var(--brand))]',\n className,\n )}\n data-slot=\"category-card-link\"\n {...props}\n />\n );\n}\n"],"names":["__iconNode","ArrowUpRight","createLucideIcon","CategoryCardRoot","className","children","as","aspectRatio","textSize","textColor","iconColor","showOverlay","props","jsx","cn","CategoryCardIcon","asChild","baseClassName","Slot","CategoryCardThumbnail","CategoryCardImage","CategoryCardFallback","CategoryCardOverlay","CategoryCardTitle","CategoryCardLink"],"mappings":";;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,MAAMA,IAAa;AAAA,EACjB,CAAC,QAAQ,EAAE,GAAG,cAAc,KAAK,SAAQ,CAAE;AAAA,EAC3C,CAAC,QAAQ,EAAE,GAAG,cAAc,KAAK,SAAQ,CAAE;AAC7C,GACMC,IAAeC,EAAiB,kBAAkBF,CAAU;;;;;ACK3D,SAASG,EAAoD;AAAA,EAClE,WAAAC;AAAA,EACA,UAAAC;AAAA,EACA,IAAAC;AAAA,EACA,aAAAC,IAAc;AAAA,EACd,UAAAC,IAAW;AAAA,EACX,WAAAC,IAAY;AAAA,EACZ,WAAAC,IAAY;AAAA,EACZ,aAAAC,IAAc;AAAA,EACd,GAAGC;AACL,GAA6B;AAG3B,SACE,gBAAAC;AAAA,IAH8BP,KAAM;AAAA,IAGnC;AAAA,MACC,WAAWQ;AAAA,QACT;AAAA;AAAA,QAEA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACAV;AAAA,MAAA;AAAA,MAEF,qBAAmBG;AAAA,MACnB,mBAAiBG;AAAA,MACjB,qBAAmBC;AAAA,MACnB,aAAU;AAAA,MACV,mBAAiBF;AAAA,MACjB,kBAAgBD;AAAA,MACf,GAAGI;AAAA,MAEH,UAAAP;AAAA,IAAA;AAAA,EAAA;AAGP;ACvCO,SAASU,EAAiB,EAAE,SAAAC,IAAU,IAAO,WAAAZ,GAAW,UAAAC,KAAmC;AAChG,QAAMY,IAAgBH;AAAA,IACpB;AAAA;AAAA,IAEA;AAAA;AAAA,IAEA;AAAA;AAAA,IAEA;AAAA,IACAV;AAAA,EAAA;AAGF,SAAIY,sBAECE,GAAA,EAAK,WAAWD,GAAe,aAAU,sBACvC,UAAAZ,GACH,IAKF,gBAAAQ;AAAA,IAACZ;AAAA,IAAA;AAAA,MACC,qBAAmB;AA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AAAA,MAEF,aAAU;AAAA,MACT,GAAGQ;AAAA,MAEH,UAAAP;AAAA,IAAA;AAAA,EAAA;AAGP;ACpBO,SAASkB,EAAkB,EAAE,UAAAlB,GAAU,WAAAD,GAAW,GAAGQ,KAAiC;AAC3F,SACE,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWC;AAAA,QACT;AAAA;AAAA,QAEA;AAAA,QACA;AAAA;AAAA,QAEA;AAAA,QACA;AAAA;AAAA,QAEA;AAAA,QACA;AAAA;AAAA,QAEA;AAAA,QACA;AAAA;AAAA,QAEA;AAAA;AAAA,QAEA;AAAA,QACAV;AAAA,MAAA;AAAA,MAEF,aAAU;AAAA,MACT,GAAGQ;AAAA,MAEH,UAAAP;AAAA,IAAA;AAAA,EAAA;AAGP;ACxBO,SAASmB,EAAiB,EAAE,SAAAR,IAAU,IAAO,WAAAZ,GAAW,GAAGQ,KAAgC;AAGhG,SACE,gBAAAC;AAAA,IAHgBG,IAAUE,IAAO;AAAA,IAGhC;AAAA,MACC,WAAWJ;AAAA,QACT;AAAA;AAAA,QAEA;AAAA,QACAV;AAAA,MAAA;AAAA,MAEF,aAAU;AAAA,MACT,GAAGQ;AAAA,IAAA;AAAA,EAAA;AAGV;","x_google_ignoreList":[0]}
|
package/dist/category-card.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./category-card-link-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./category-card-link-B7MMGsnN.cjs"),a=require("react/jsx-runtime"),r=require("./utils-DoxiiusW.cjs"),c=require("./skeleton-box-CcjaHRz4.cjs"),s=require("./skeleton-text-CY7gaT4A.cjs");function n({className:t,...o}){return a.jsxs("div",{className:r.cn("@container",t),"data-slot":"category-card-skeleton",...o,children:[a.jsx(c.SkeletonBox,{className:r.cn("rounded-[var(--category-card-border-radius,1rem)]","group-data-[aspect-ratio=1/1]/category-card:aspect-square","group-data-[aspect-ratio=3/4]/category-card:aspect-[3/4]","group-data-[aspect-ratio=5/6]/category-card:aspect-[5/6]")}),a.jsx("div",{className:"mt-3",children:a.jsx(s.SkeletonText,{characterCount:10,className:"rounded text-lg"})})]})}exports.Fallback=e.CategoryCardFallback;exports.Icon=e.CategoryCardIcon;exports.Image=e.CategoryCardImage;exports.Link=e.CategoryCardLink;exports.Overlay=e.CategoryCardOverlay;exports.Root=e.CategoryCardRoot;exports.Thumbnail=e.CategoryCardThumbnail;exports.Title=e.CategoryCardTitle;exports.Skeleton=n;
|
|
2
2
|
//# sourceMappingURL=category-card.cjs.map
|
package/dist/category-card.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as u, a as f, c as k, g as x, e as y, C as S, b, f as h } from "./category-card-link-
|
|
1
|
+
import { d as u, a as f, c as k, g as x, e as y, C as S, b, f as h } from "./category-card-link-DZ2CRf4d.js";
|
|
2
2
|
import { jsxs as o, jsx as a } from "react/jsx-runtime";
|
|
3
3
|
import { c as r } from "./utils-CRiPKpXj.js";
|
|
4
4
|
import { S as s } from "./skeleton-box-EYvfbwBB.js";
|
|
@@ -24,6 +24,8 @@ export interface CategoryCardProps extends CategoryCardContent {
|
|
|
24
24
|
textSize?: 'small' | 'medium' | 'large' | 'x-large';
|
|
25
25
|
textPosition?: 'inside' | 'outside';
|
|
26
26
|
showOverlay?: boolean;
|
|
27
|
+
textColor?: 'light' | 'dark';
|
|
28
|
+
iconColor?: 'light' | 'dark';
|
|
27
29
|
}
|
|
28
30
|
/**
|
|
29
31
|
* This component supports various CSS variables for theming. Here's a comprehensive list, along
|
|
@@ -45,5 +47,5 @@ export interface CategoryCardProps extends CategoryCardContent {
|
|
|
45
47
|
* }
|
|
46
48
|
* ```
|
|
47
49
|
*/
|
|
48
|
-
export declare function CategoryCard({ className, title, image, link, icon, aspectRatio, textPosition, textSize, showOverlay, }: CategoryCardProps): import("react/jsx-runtime").JSX.Element;
|
|
50
|
+
export declare function CategoryCard({ className, title, image, link, icon, aspectRatio, textPosition, textSize, textColor, iconColor, showOverlay, }: CategoryCardProps): import("react/jsx-runtime").JSX.Element;
|
|
49
51
|
//# sourceMappingURL=category-card.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"category-card.d.ts","sourceRoot":"","sources":["../../../src/components/category-card/category-card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvC,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE;QACN,GAAG,EAAE,MAAM,CAAC;QACZ,GAAG,EAAE,MAAM,CAAC;QACZ,OAAO,CAAC,EAAE,OAAO,CAAC;QAClB,QAAQ,CAAC,EAAE,SAAS,CAAC;KACtB,CAAC;IACF,IAAI,EAAE;QACJ,IAAI,EAAE,MAAM,CAAC;QACb,SAAS,EAAE,MAAM,CAAC;QAClB,OAAO,CAAC,EAAE,OAAO,CAAC;QAClB,QAAQ,CAAC,EAAE,SAAS,CAAC;KACtB,CAAC;IACF,IAAI,CAAC,EAAE;QACL,OAAO,CAAC,EAAE,OAAO,CAAC;QAClB,QAAQ,CAAC,EAAE,SAAS,CAAC;KACtB,CAAC;CACH;AAED,MAAM,WAAW,iBAAkB,SAAQ,mBAAmB;IAC5D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC;IACpC,QAAQ,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,CAAC;IACpD,YAAY,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;IACpC,WAAW,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"category-card.d.ts","sourceRoot":"","sources":["../../../src/components/category-card/category-card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,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ources":["../../../../src/components/category-card/primitives/category-card-icon.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvC,MAAM,WAAW,qBAAqB;IACpC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,wBAAgB,gBAAgB,CAAC,EAAE,OAAe,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,qBAAqB,
|
|
1
|
+
{"version":3,"file":"category-card-icon.d.ts","sourceRoot":"","sources":["../../../../src/components/category-card/primitives/category-card-icon.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvC,MAAM,WAAW,qBAAqB;IACpC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,wBAAgB,gBAAgB,CAAC,EAAE,OAAe,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,qBAAqB,2CA4B/F"}
|
|
@@ -3,7 +3,9 @@ export type CategoryCardRootProps<E extends ElementType = 'article'> = Omit<Comp
|
|
|
3
3
|
as?: E;
|
|
4
4
|
aspectRatio?: '5/6' | '3/4' | '1/1';
|
|
5
5
|
textSize?: 'small' | 'medium' | 'large' | 'x-large';
|
|
6
|
+
textColor?: 'light' | 'dark';
|
|
7
|
+
iconColor?: 'light' | 'dark';
|
|
6
8
|
showOverlay?: boolean;
|
|
7
9
|
};
|
|
8
|
-
export declare function CategoryCardRoot<T extends ElementType = 'article'>({ className, children, as, aspectRatio, textSize, showOverlay, ...props }: CategoryCardRootProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare function CategoryCardRoot<T extends ElementType = 'article'>({ className, children, as, aspectRatio, textSize, textColor, iconColor, showOverlay, ...props }: CategoryCardRootProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
9
11
|
//# sourceMappingURL=category-card-root.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"category-card-root.d.ts","sourceRoot":"","sources":["../../../../src/components/category-card/primitives/category-card-root.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAIzD,MAAM,MAAM,qBAAqB,CAAC,CAAC,SAAS,WAAW,GAAG,SAAS,IAAI,IAAI,CACzE,cAAc,CAAC,CAAC,CAAC,EACjB,IAAI,CACL,GAAG;IACF,EAAE,CAAC,EAAE,CAAC,CAAC;IACP,WAAW,CAAC,EAAE,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC;IACpC,QAAQ,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,CAAC;IACpD,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;AAEF,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,WAAW,GAAG,SAAS,EAAE,EAClE,SAAS,EACT,QAAQ,EACR,EAAE,EACF,WAAmB,EACnB,QAAkB,EAClB,WAAkB,EAClB,GAAG,KAAK,EACT,EAAE,qBAAqB,CAAC,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"category-card-root.d.ts","sourceRoot":"","sources":["../../../../src/components/category-card/primitives/category-card-root.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAIzD,MAAM,MAAM,qBAAqB,CAAC,CAAC,SAAS,WAAW,GAAG,SAAS,IAAI,IAAI,CACzE,cAAc,CAAC,CAAC,CAAC,EACjB,IAAI,CACL,GAAG;IACF,EAAE,CAAC,EAAE,CAAC,CAAC;IACP,WAAW,CAAC,EAAE,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC;IACpC,QAAQ,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,CAAC;IACpD,SAAS,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAC7B,SAAS,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAC7B,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;AAEF,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,WAAW,GAAG,SAAS,EAAE,EAClE,SAAS,EACT,QAAQ,EACR,EAAE,EACF,WAAmB,EACnB,QAAkB,EAClB,SAAkB,EAClB,SAAkB,EAClB,WAAkB,EAClB,GAAG,KAAK,EACT,EAAE,qBAAqB,CAAC,CAAC,CAAC,2CAyB1B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"category-card-title.d.ts","sourceRoot":"","sources":["../../../../src/components/category-card/primitives/category-card-title.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAI5C,MAAM,MAAM,sBAAsB,GAAG,cAAc,CAAC,IAAI,CAAC,CAAC;AAE1D,wBAAgB,iBAAiB,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,sBAAsB,
|
|
1
|
+
{"version":3,"file":"category-card-title.d.ts","sourceRoot":"","sources":["../../../../src/components/category-card/primitives/category-card-title.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAI5C,MAAM,MAAM,sBAAsB,GAAG,cAAc,CAAC,IAAI,CAAC,CAAC;AAE1D,wBAAgB,iBAAiB,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,sBAAsB,2CA6B1F"}
|