commerce-toolkit 0.0.39 → 0.0.40
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/blog-post-card-author-BGqy41Da.cjs +2 -0
- package/dist/blog-post-card-author-BGqy41Da.cjs.map +1 -0
- package/dist/{blog-post-card-author-DBEBNUmi.js → blog-post-card-author-Cwm4afzF.js} +70 -52
- package/dist/blog-post-card-author-Cwm4afzF.js.map +1 -0
- package/dist/blog-post-card.cjs +1 -1
- package/dist/blog-post-card.js +7 -6
- package/dist/card-link-COguZcAK.js +41 -0
- package/dist/card-link-COguZcAK.js.map +1 -0
- package/dist/card-link-Dnn-M6g-.cjs +2 -0
- package/dist/{card-link-C3U_404z.cjs.map → card-link-Dnn-M6g-.cjs.map} +1 -1
- package/dist/card.cjs +1 -1
- package/dist/card.js +1 -1
- package/dist/check-ChGAB_3v.js +13 -0
- package/dist/check-ChGAB_3v.js.map +1 -0
- package/dist/check-DJilMvC6.cjs +7 -0
- package/dist/check-DJilMvC6.cjs.map +1 -0
- package/dist/checkbox-indicator-BgXRGvAh.cjs +2 -0
- package/dist/checkbox-indicator-BgXRGvAh.cjs.map +1 -0
- package/dist/checkbox-indicator-Cfw9uH_b.js +313 -0
- package/dist/checkbox-indicator-Cfw9uH_b.js.map +1 -0
- package/dist/checkbox.cjs +2 -0
- package/dist/checkbox.cjs.map +1 -0
- package/dist/checkbox.js +7 -0
- package/dist/checkbox.js.map +1 -0
- package/dist/{compare-drawer-remove-aLeR1WyI.js → compare-drawer-remove-BBcOUiSl.js} +73 -50
- package/dist/compare-drawer-remove-BBcOUiSl.js.map +1 -0
- package/dist/compare-drawer-remove-ozXLyKba.cjs +2 -0
- package/dist/compare-drawer-remove-ozXLyKba.cjs.map +1 -0
- package/dist/compare-drawer.cjs +1 -1
- package/dist/compare-drawer.js +4 -3
- package/dist/components/accordion/accordion.d.ts +1 -1
- package/dist/components/accordion/accordion.d.ts.map +1 -1
- package/dist/components/blog-post-card/blog-post-card.d.ts.map +1 -1
- package/dist/components/blog-post-card/primitives/blog-post-card-image.d.ts +2 -2
- package/dist/components/blog-post-card/primitives/blog-post-card-image.d.ts.map +1 -1
- package/dist/components/blog-post-card/primitives/blog-post-card-link.d.ts +1 -1
- package/dist/components/blog-post-card/primitives/blog-post-card-link.d.ts.map +1 -1
- package/dist/components/blog-post-card/primitives/blog-post-card-thumbnail.d.ts +4 -0
- package/dist/components/blog-post-card/primitives/blog-post-card-thumbnail.d.ts.map +1 -0
- package/dist/components/blog-post-card/primitives.d.ts +1 -0
- package/dist/components/blog-post-card/primitives.d.ts.map +1 -1
- package/dist/components/card/card.d.ts.map +1 -1
- package/dist/components/card/primitives/card-link.d.ts.map +1 -1
- package/dist/components/checkbox/checkbox.d.ts +42 -0
- package/dist/components/checkbox/checkbox.d.ts.map +1 -0
- package/dist/components/checkbox/index.d.ts +3 -0
- package/dist/components/checkbox/index.d.ts.map +1 -0
- package/dist/components/checkbox/primitives/checkbox-indicator.d.ts +5 -0
- package/dist/components/checkbox/primitives/checkbox-indicator.d.ts.map +1 -0
- package/dist/components/checkbox/primitives/checkbox-root.d.ts +13 -0
- package/dist/components/checkbox/primitives/checkbox-root.d.ts.map +1 -0
- package/dist/components/checkbox/primitives.d.ts +3 -0
- package/dist/components/checkbox/primitives.d.ts.map +1 -0
- package/dist/components/compare-drawer/primitives/compare-drawer-image.d.ts +1 -1
- package/dist/components/compare-drawer/primitives/compare-drawer-image.d.ts.map +1 -1
- package/dist/components/compare-drawer/primitives/compare-drawer-link.d.ts.map +1 -1
- package/dist/components/compare-drawer/primitives/compare-drawer-thumbnail.d.ts +4 -0
- package/dist/components/compare-drawer/primitives/compare-drawer-thumbnail.d.ts.map +1 -0
- package/dist/components/compare-drawer/primitives.d.ts +1 -0
- package/dist/components/compare-drawer/primitives.d.ts.map +1 -1
- package/dist/components/cursor-pagination/primitives/cursor-pagination-link.d.ts.map +1 -1
- package/dist/components/label/index.d.ts +2 -0
- package/dist/components/label/index.d.ts.map +1 -0
- package/dist/components/label/label.d.ts +7 -0
- package/dist/components/label/label.d.ts.map +1 -0
- package/dist/components/logo/primitives/logo-image.d.ts.map +1 -1
- package/dist/components/logo/primitives/logo-link.d.ts.map +1 -1
- package/dist/components/price/price.d.ts.map +1 -1
- package/dist/components/product-card/index.d.ts +3 -0
- package/dist/components/product-card/index.d.ts.map +1 -0
- package/dist/components/product-card/primitives/product-card-badge.d.ts +5 -0
- package/dist/components/product-card/primitives/product-card-badge.d.ts.map +1 -0
- package/dist/components/product-card/primitives/product-card-checkbox.d.ts +5 -0
- package/dist/components/product-card/primitives/product-card-checkbox.d.ts.map +1 -0
- package/dist/components/product-card/primitives/product-card-compare.d.ts +4 -0
- package/dist/components/product-card/primitives/product-card-compare.d.ts.map +1 -0
- package/dist/components/product-card/primitives/product-card-content.d.ts +4 -0
- package/dist/components/product-card/primitives/product-card-content.d.ts.map +1 -0
- package/dist/components/product-card/primitives/product-card-details.d.ts +4 -0
- package/dist/components/product-card/primitives/product-card-details.d.ts.map +1 -0
- package/dist/components/product-card/primitives/product-card-fallback.d.ts +4 -0
- package/dist/components/product-card/primitives/product-card-fallback.d.ts.map +1 -0
- package/dist/components/product-card/primitives/product-card-header.d.ts +4 -0
- package/dist/components/product-card/primitives/product-card-header.d.ts.map +1 -0
- package/dist/components/product-card/primitives/product-card-image.d.ts +6 -0
- package/dist/components/product-card/primitives/product-card-image.d.ts.map +1 -0
- package/dist/components/product-card/primitives/product-card-label.d.ts +5 -0
- package/dist/components/product-card/primitives/product-card-label.d.ts.map +1 -0
- package/dist/components/product-card/primitives/product-card-link.d.ts +6 -0
- package/dist/components/product-card/primitives/product-card-link.d.ts.map +1 -0
- package/dist/components/product-card/primitives/product-card-preview.d.ts +4 -0
- package/dist/components/product-card/primitives/product-card-preview.d.ts.map +1 -0
- package/dist/components/product-card/primitives/product-card-price.d.ts +5 -0
- package/dist/components/product-card/primitives/product-card-price.d.ts.map +1 -0
- package/dist/components/product-card/primitives/product-card-root.d.ts +15 -0
- package/dist/components/product-card/primitives/product-card-root.d.ts.map +1 -0
- package/dist/components/product-card/primitives/product-card-skeleton.d.ts +5 -0
- package/dist/components/product-card/primitives/product-card-skeleton.d.ts.map +1 -0
- package/dist/components/product-card/primitives/product-card-subtitle.d.ts +4 -0
- package/dist/components/product-card/primitives/product-card-subtitle.d.ts.map +1 -0
- package/dist/components/product-card/primitives/product-card-thumbnail.d.ts +4 -0
- package/dist/components/product-card/primitives/product-card-thumbnail.d.ts.map +1 -0
- package/dist/components/product-card/primitives/product-card-title.d.ts +4 -0
- package/dist/components/product-card/primitives/product-card-title.d.ts.map +1 -0
- package/dist/components/product-card/primitives.d.ts +18 -0
- package/dist/components/product-card/primitives.d.ts.map +1 -0
- package/dist/components/product-card/product-card.d.ts +54 -0
- package/dist/components/product-card/product-card.d.ts.map +1 -0
- package/dist/cursor-pagination-link-CdxwX869.cjs +12 -0
- package/dist/{cursor-pagination-link-CGF7LkIQ.cjs.map → cursor-pagination-link-CdxwX869.cjs.map} +1 -1
- package/dist/cursor-pagination-link-DCIUoQmf.js +86 -0
- package/dist/{cursor-pagination-link-Cx4eqmLO.js.map → cursor-pagination-link-DCIUoQmf.js.map} +1 -1
- package/dist/cursor-pagination.cjs +1 -1
- package/dist/cursor-pagination.js +2 -2
- package/dist/dropdown-menu-node-BB7FJzMX.cjs +7 -0
- package/dist/dropdown-menu-node-BB7FJzMX.cjs.map +1 -0
- package/dist/{dropdown-menu-node-uYf2lhFv.js → dropdown-menu-node-C7Z-zRyr.js} +477 -510
- package/dist/dropdown-menu-node-C7Z-zRyr.js.map +1 -0
- package/dist/dropdown-menu.cjs +1 -1
- package/dist/dropdown-menu.js +1 -1
- package/dist/index-6tKkLrHE.cjs +2 -0
- package/dist/index-6tKkLrHE.cjs.map +1 -0
- package/dist/index-B_420jYs.js +28 -0
- package/dist/index-B_420jYs.js.map +1 -0
- package/dist/index.cjs +5 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +900 -944
- package/dist/index.js.map +1 -1
- package/dist/logo-text-BXz1J2dS.cjs +2 -0
- package/dist/logo-text-BXz1J2dS.cjs.map +1 -0
- package/dist/logo-text-Ck-jgjKv.js +38 -0
- package/dist/logo-text-Ck-jgjKv.js.map +1 -0
- package/dist/logo.cjs +1 -1
- package/dist/logo.js +1 -1
- package/dist/price-BwaeTmkR.js +53 -0
- package/dist/price-BwaeTmkR.js.map +1 -0
- package/dist/price-CdK2ye4P.cjs +2 -0
- package/dist/price-CdK2ye4P.cjs.map +1 -0
- package/dist/primitives--2McVg9Z.js +15 -0
- package/dist/primitives--2McVg9Z.js.map +1 -0
- package/dist/primitives-DmqzDKi2.cjs +2 -0
- package/dist/primitives-DmqzDKi2.cjs.map +1 -0
- package/dist/product-card.cjs +2 -0
- package/dist/product-card.cjs.map +1 -0
- package/dist/product-card.js +328 -0
- package/dist/product-card.js.map +1 -0
- package/dist/skeleton-root-DHW28LoV.js +28 -0
- package/dist/skeleton-root-DHW28LoV.js.map +1 -0
- package/dist/skeleton-root-uIgjea8b.cjs +2 -0
- package/dist/skeleton-root-uIgjea8b.cjs.map +1 -0
- package/dist/skeleton.cjs +1 -1
- package/dist/skeleton.js +1 -1
- package/package.json +21 -2
- package/dist/blog-post-card-author-B7qzTW41.cjs +0 -2
- package/dist/blog-post-card-author-B7qzTW41.cjs.map +0 -1
- package/dist/blog-post-card-author-DBEBNUmi.js.map +0 -1
- package/dist/card-link-C3U_404z.cjs +0 -2
- package/dist/card-link-D1jRC_W9.js +0 -35
- package/dist/card-link-D1jRC_W9.js.map +0 -1
- package/dist/compare-drawer-remove-DeId0NAZ.cjs +0 -2
- package/dist/compare-drawer-remove-DeId0NAZ.cjs.map +0 -1
- package/dist/compare-drawer-remove-aLeR1WyI.js.map +0 -1
- package/dist/cursor-pagination-link-CGF7LkIQ.cjs +0 -12
- package/dist/cursor-pagination-link-Cx4eqmLO.js +0 -80
- package/dist/dropdown-menu-node-DoGsxQQh.cjs +0 -12
- package/dist/dropdown-menu-node-DoGsxQQh.cjs.map +0 -1
- package/dist/dropdown-menu-node-uYf2lhFv.js.map +0 -1
- package/dist/logo-text-BSZv7ll-.js +0 -33
- package/dist/logo-text-BSZv7ll-.js.map +0 -1
- package/dist/logo-text-BsFPzrQT.cjs +0 -2
- package/dist/logo-text-BsFPzrQT.cjs.map +0 -1
- package/dist/primitives-C8vPn9x8.js +0 -39
- package/dist/primitives-C8vPn9x8.js.map +0 -1
- package/dist/primitives-CgOSEe-J.cjs +0 -2
- package/dist/primitives-CgOSEe-J.cjs.map +0 -1
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";const l=require("react/jsx-runtime"),a=require("./index-DGaxX11V.cjs"),s=require("./utils-LBH114_M.cjs");function r({asChild:o=!1,className:e,children:n,...t}){const i=o?a.Slot:"img";return l.jsx(i,{className:s.cn("object-contain object-left",e),...t})}function c({asChild:o=!1,className:e,children:n,...t}){const i=o?a.Slot:"a";return l.jsx(i,{className:s.cn("focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-[var(--logo-focus,hsl(var(--primary)))]",e),"data-slot":"logo-link",...t})}function f({children:o,className:e,...n}){return l.jsx("span",{className:s.cn("text-lg font-semibold leading-none text-[var(--logo-text,hsl(var(--foreground)))] [font-family:var(--logo-font-family,var(--font-family-heading))] @xl:text-2xl",e),...n,children:o})}exports.LogoImage=r;exports.LogoLink=c;exports.LogoText=f;
|
|
2
|
+
//# sourceMappingURL=logo-text-BXz1J2dS.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logo-text-BXz1J2dS.cjs","sources":["../src/components/logo/primitives/logo-image.tsx","../src/components/logo/primitives/logo-link.tsx","../src/components/logo/primitives/logo-text.tsx"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot';\nimport type { ComponentProps } from 'react';\n\nimport { cn } from '@/lib';\n\nexport interface LogoImageProps extends ComponentProps<'img'> {\n asChild?: boolean;\n}\n\nexport function LogoImage({ asChild = false, className, children, ...props }: LogoImageProps) {\n const Component = asChild ? Slot : 'img';\n\n return <Component className={cn('object-contain object-left', className)} {...props} />;\n}\n","import { Slot } from '@radix-ui/react-slot';\nimport type { ComponentProps } from 'react';\n\nimport { cn } from '@/lib';\n\nexport interface LogoLinkProps extends ComponentProps<'a'> {\n asChild?: boolean;\n}\n\nexport function LogoLink({ asChild = false, className, children, ...props }: LogoLinkProps) {\n const Component = asChild ? Slot : 'a';\n\n return (\n <Component\n className={cn(\n 'focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-[var(--logo-focus,hsl(var(--primary)))]',\n className,\n )}\n data-slot=\"logo-link\"\n {...props}\n />\n );\n}\n","import type { ComponentProps } from 'react';\n\nimport { cn } from '@/lib';\n\nexport type LogoTextProps = ComponentProps<'span'>;\n\nexport function LogoText({ children, className, ...props }: LogoTextProps) {\n return (\n <span\n className={cn(\n 'text-lg font-semibold leading-none text-[var(--logo-text,hsl(var(--foreground)))] [font-family:var(--logo-font-family,var(--font-family-heading))] @xl:text-2xl',\n className,\n )}\n {...props}\n >\n {children}\n </span>\n );\n}\n"],"names":["LogoImage","asChild","className","children","props","Component","Slot","jsx","cn","LogoLink","LogoText"],"mappings":"sHASO,SAASA,EAAU,CAAE,QAAAC,EAAU,GAAO,UAAAC,EAAW,SAAAC,EAAU,GAAGC,GAAyB,CAC5F,MAAMC,EAAYJ,EAAUK,EAAAA,KAAO,MAEnC,OAAOC,EAAAA,IAACF,GAAU,UAAWG,EAAAA,GAAG,6BAA8BN,CAAS,EAAI,GAAGE,EAAO,CACvF,CCJO,SAASK,EAAS,CAAE,QAAAR,EAAU,GAAO,UAAAC,EAAW,SAAAC,EAAU,GAAGC,GAAwB,CAC1F,MAAMC,EAAYJ,EAAUK,EAAAA,KAAO,IAEnC,OACEC,EAAAA,IAACF,EAAA,CACC,UAAWG,EAAAA,GACT,uHACAN,CAAA,EAEF,YAAU,YACT,GAAGE,CAAA,CAAA,CAGV,CChBO,SAASM,EAAS,CAAE,SAAAP,EAAU,UAAAD,EAAW,GAAGE,GAAwB,CACzE,OACEG,EAAAA,IAAC,OAAA,CACC,UAAWC,EAAAA,GACT,kKACAN,CAAA,EAED,GAAGE,EAEH,SAAAD,CAAA,CAAA,CAGP"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { S as s } from "./index-DD8W7cMj.js";
|
|
3
|
+
import { c as l } from "./utils-BOGlfttm.js";
|
|
4
|
+
function c({ asChild: o = !1, className: t, children: n, ...e }) {
|
|
5
|
+
return /* @__PURE__ */ a(o ? s : "img", { className: l("object-contain object-left", t), ...e });
|
|
6
|
+
}
|
|
7
|
+
function u({ asChild: o = !1, className: t, children: n, ...e }) {
|
|
8
|
+
return /* @__PURE__ */ a(
|
|
9
|
+
o ? s : "a",
|
|
10
|
+
{
|
|
11
|
+
className: l(
|
|
12
|
+
"focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-[var(--logo-focus,hsl(var(--primary)))]",
|
|
13
|
+
t
|
|
14
|
+
),
|
|
15
|
+
"data-slot": "logo-link",
|
|
16
|
+
...e
|
|
17
|
+
}
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
function g({ children: o, className: t, ...n }) {
|
|
21
|
+
return /* @__PURE__ */ a(
|
|
22
|
+
"span",
|
|
23
|
+
{
|
|
24
|
+
className: l(
|
|
25
|
+
"text-lg font-semibold leading-none text-[var(--logo-text,hsl(var(--foreground)))] [font-family:var(--logo-font-family,var(--font-family-heading))] @xl:text-2xl",
|
|
26
|
+
t
|
|
27
|
+
),
|
|
28
|
+
...n,
|
|
29
|
+
children: o
|
|
30
|
+
}
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
export {
|
|
34
|
+
c as L,
|
|
35
|
+
u as a,
|
|
36
|
+
g as b
|
|
37
|
+
};
|
|
38
|
+
//# sourceMappingURL=logo-text-Ck-jgjKv.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logo-text-Ck-jgjKv.js","sources":["../src/components/logo/primitives/logo-image.tsx","../src/components/logo/primitives/logo-link.tsx","../src/components/logo/primitives/logo-text.tsx"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot';\nimport type { ComponentProps } from 'react';\n\nimport { cn } from '@/lib';\n\nexport interface LogoImageProps extends ComponentProps<'img'> {\n asChild?: boolean;\n}\n\nexport function LogoImage({ asChild = false, className, children, ...props }: LogoImageProps) {\n const Component = asChild ? Slot : 'img';\n\n return <Component className={cn('object-contain object-left', className)} {...props} />;\n}\n","import { Slot } from '@radix-ui/react-slot';\nimport type { ComponentProps } from 'react';\n\nimport { cn } from '@/lib';\n\nexport interface LogoLinkProps extends ComponentProps<'a'> {\n asChild?: boolean;\n}\n\nexport function LogoLink({ asChild = false, className, children, ...props }: LogoLinkProps) {\n const Component = asChild ? Slot : 'a';\n\n return (\n <Component\n className={cn(\n 'focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-[var(--logo-focus,hsl(var(--primary)))]',\n className,\n )}\n data-slot=\"logo-link\"\n {...props}\n />\n );\n}\n","import type { ComponentProps } from 'react';\n\nimport { cn } from '@/lib';\n\nexport type LogoTextProps = ComponentProps<'span'>;\n\nexport function LogoText({ children, className, ...props }: LogoTextProps) {\n return (\n <span\n className={cn(\n 'text-lg font-semibold leading-none text-[var(--logo-text,hsl(var(--foreground)))] [font-family:var(--logo-font-family,var(--font-family-heading))] @xl:text-2xl',\n className,\n )}\n {...props}\n >\n {children}\n </span>\n );\n}\n"],"names":["LogoImage","asChild","className","children","props","jsx","Slot","cn","LogoLink","LogoText"],"mappings":";;;AASO,SAASA,EAAU,EAAE,SAAAC,IAAU,IAAO,WAAAC,GAAW,UAAAC,GAAU,GAAGC,KAAyB;AAG5F,SAAO,gBAAAC,EAFWJ,IAAUK,IAAO,SAEjB,WAAWC,EAAG,8BAA8BL,CAAS,GAAI,GAAGE,GAAO;AACvF;ACJO,SAASI,EAAS,EAAE,SAAAP,IAAU,IAAO,WAAAC,GAAW,UAAAC,GAAU,GAAGC,KAAwB;AAG1F,SACE,gBAAAC;AAAA,IAHgBJ,IAAUK,IAAO;AAAA,IAGhC;AAAA,MACC,WAAWC;AAAA,QACT;AAAA,QACAL;AAAA,MAAA;AAAA,MAEF,aAAU;AAAA,MACT,GAAGE;AAAA,IAAA;AAAA,EAAA;AAGV;AChBO,SAASK,EAAS,EAAE,UAAAN,GAAU,WAAAD,GAAW,GAAGE,KAAwB;AACzE,SACE,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWE;AAAA,QACT;AAAA,QACAL;AAAA,MAAA;AAAA,MAED,GAAGE;AAAA,MAEH,UAAAD;AAAA,IAAA;AAAA,EAAA;AAGP;"}
|
package/dist/logo.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./logo-text-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./logo-text-BXz1J2dS.cjs"),n=require("react/jsx-runtime"),r=require("./utils-LBH114_M.cjs"),i=require("./skeleton-box-yQLivCqg.cjs");function s({className:o,...t}){return n.jsx(i.SkeletonBox,{className:r.cn("h-6 w-16 rounded-md",o),...t})}exports.Image=e.LogoImage;exports.Link=e.LogoLink;exports.Text=e.LogoText;exports.Skeleton=s;
|
|
2
2
|
//# sourceMappingURL=logo.cjs.map
|
package/dist/logo.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { L as x, a as c, b as k } from "./logo-text-
|
|
1
|
+
import { L as x, a as c, b as k } from "./logo-text-Ck-jgjKv.js";
|
|
2
2
|
import { jsx as r } from "react/jsx-runtime";
|
|
3
3
|
import { c as t } from "./utils-BOGlfttm.js";
|
|
4
4
|
import { S as a } from "./skeleton-box-BSzQ5f9Y.js";
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { jsx as a, jsxs as l, Fragment as t } from "react/jsx-runtime";
|
|
2
|
+
import { c as s } from "./utils-BOGlfttm.js";
|
|
3
|
+
import { P as c, a as e, b as u } from "./price-strike-Br_Yriv9.js";
|
|
4
|
+
function h({
|
|
5
|
+
children: n,
|
|
6
|
+
shape: o = "rounded",
|
|
7
|
+
className: r,
|
|
8
|
+
variant: i = "primary",
|
|
9
|
+
...d
|
|
10
|
+
}) {
|
|
11
|
+
return /* @__PURE__ */ a(
|
|
12
|
+
"span",
|
|
13
|
+
{
|
|
14
|
+
className: s(
|
|
15
|
+
"px-2 py-0.5 text-xs uppercase tracking-tighter text-[var(--badge-text,hsl(var(--foreground)))] [font-family:var(--badge-font-family,var(--font-family-mono))]",
|
|
16
|
+
{
|
|
17
|
+
pill: "rounded-full",
|
|
18
|
+
rounded: "rounded"
|
|
19
|
+
}[o],
|
|
20
|
+
{
|
|
21
|
+
primary: "bg-[var(--badge-primary-background,color-mix(in_oklab,hsl(var(--primary)),white_75%))]",
|
|
22
|
+
warning: "bg-[var(--badge-warning-background,color-mix(in_oklab,hsl(var(--warning)),white_75%))]",
|
|
23
|
+
error: "bg-[var(--badge-error-background,color-mix(in_oklab,hsl(var(--error)),white_75%))]",
|
|
24
|
+
success: "bg-[var(--badge-success-background,color-mix(in_oklab,hsl(var(--success)),white_75%))]",
|
|
25
|
+
info: "bg-[var(--badge-info-background,color-mix(in_oklab,hsl(var(--info)),white_75%))]"
|
|
26
|
+
}[i],
|
|
27
|
+
r
|
|
28
|
+
),
|
|
29
|
+
...d,
|
|
30
|
+
children: n
|
|
31
|
+
}
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
function f({ className: n, colorScheme: o = "light", price: r, ...i }) {
|
|
35
|
+
return /* @__PURE__ */ l(c, { className: n, colorScheme: o, ...i, children: [
|
|
36
|
+
r.type === "range" && /* @__PURE__ */ l(t, { children: [
|
|
37
|
+
/* @__PURE__ */ a(e, { children: r.minValue }),
|
|
38
|
+
" – ",
|
|
39
|
+
/* @__PURE__ */ a(e, { children: r.maxValue })
|
|
40
|
+
] }),
|
|
41
|
+
r.type === "sale" && /* @__PURE__ */ l(t, { children: [
|
|
42
|
+
/* @__PURE__ */ a(u, { children: r.currentValue }),
|
|
43
|
+
" ",
|
|
44
|
+
/* @__PURE__ */ a(e, { children: r.previousValue })
|
|
45
|
+
] }),
|
|
46
|
+
r.type === "default" && /* @__PURE__ */ a(e, { children: r.value })
|
|
47
|
+
] });
|
|
48
|
+
}
|
|
49
|
+
export {
|
|
50
|
+
h as B,
|
|
51
|
+
f as P
|
|
52
|
+
};
|
|
53
|
+
//# sourceMappingURL=price-BwaeTmkR.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"price-BwaeTmkR.js","sources":["../src/components/badge/badge.tsx","../src/components/price/price.tsx"],"sourcesContent":["import type { ComponentProps } from 'react';\n\nimport { cn } from '@/lib';\n\nexport type BadgeProps = ComponentProps<'span'> & {\n children: string;\n shape?: 'pill' | 'rounded';\n variant?: 'primary' | 'warning' | 'error' | 'success' | 'info';\n};\n\n/**\n * This component supports various CSS variables for theming. Here's a comprehensive list, along\n * with their default values:\n *\n * ```css\n * :root {\n * --badge-primary-background: color-mix(in oklab, hsl(var(--primary)), white 75%);\n * --badge-success-background: color-mix(in oklab, hsl(var(--success)), white 75%);\n * --badge-warning-background: color-mix(in oklab, hsl(var(--warning)), white 75%);\n * --badge-error-background: color-mix(in oklab, hsl(var(--error)), white 75%);\n * --badge-info-background: color-mix(in oklab, hsl(var(--info)), white 75%);\n * --badge-text: hsl(var(--foreground));\n * --badge-font-family: var(--font-family-mono);\n * }\n * ```\n */\nexport function Badge({\n children,\n shape = 'rounded',\n className,\n variant = 'primary',\n ...props\n}: BadgeProps) {\n return (\n <span\n className={cn(\n 'px-2 py-0.5 text-xs uppercase tracking-tighter text-[var(--badge-text,hsl(var(--foreground)))] [font-family:var(--badge-font-family,var(--font-family-mono))]',\n {\n pill: 'rounded-full',\n rounded: 'rounded',\n }[shape],\n {\n primary:\n 'bg-[var(--badge-primary-background,color-mix(in_oklab,hsl(var(--primary)),white_75%))]',\n warning:\n 'bg-[var(--badge-warning-background,color-mix(in_oklab,hsl(var(--warning)),white_75%))]',\n error:\n 'bg-[var(--badge-error-background,color-mix(in_oklab,hsl(var(--error)),white_75%))]',\n success:\n 'bg-[var(--badge-success-background,color-mix(in_oklab,hsl(var(--success)),white_75%))]',\n info: 'bg-[var(--badge-info-background,color-mix(in_oklab,hsl(var(--info)),white_75%))]',\n }[variant],\n className,\n )}\n {...props}\n >\n {children}\n </span>\n );\n}\n","import * as PricePrimitive from '@/components/price';\n\ninterface PriceDefault {\n type: 'default';\n value: string;\n}\n\ninterface PriceRange {\n type: 'range';\n minValue: string;\n maxValue: string;\n}\n\ninterface PriceSale {\n type: 'sale';\n previousValue: string;\n currentValue: string;\n}\n\ntype PriceType = PriceDefault | PriceRange | PriceSale;\n\nexport interface PriceProps extends PricePrimitive.RootProps {\n price: PriceType;\n}\n\n/**\n * This component supports various CSS variables for theming. Here's a comprehensive list, along\n * with their default values:\n *\n * ```css\n * :root {\n * --price-light-text: hsl(var(--foreground));\n * --price-light-sale-text: hsl(var(--foreground));\n * --price-dark-text: hsl(var(--background));\n * --price-dark-sale-text: hsl(var(--background));\n * }\n * ```\n */\nexport function Price({ className, colorScheme = 'light', price, ...props }: PriceProps) {\n return (\n <PricePrimitive.Root className={className} colorScheme={colorScheme} {...props}>\n {price.type === 'range' && (\n <>\n <PricePrimitive.Default>{price.minValue}</PricePrimitive.Default>\n {' – '}\n <PricePrimitive.Default>{price.maxValue}</PricePrimitive.Default>\n </>\n )}\n {price.type === 'sale' && (\n <>\n <PricePrimitive.Strike>{price.currentValue}</PricePrimitive.Strike>{' '}\n <PricePrimitive.Default>{price.previousValue}</PricePrimitive.Default>\n </>\n )}\n {price.type === 'default' && <PricePrimitive.Default>{price.value}</PricePrimitive.Default>}\n </PricePrimitive.Root>\n );\n}\n"],"names":["Badge","children","shape","className","variant","props","jsx","cn","Price","colorScheme","price","PricePrimitive.Root","jsxs","Fragment","PricePrimitive.Default","PricePrimitive.Strike"],"mappings":";;;AA0BO,SAASA,EAAM;AAAA,EACpB,UAAAC;AAAA,EACA,OAAAC,IAAQ;AAAA,EACR,WAAAC;AAAA,EACA,SAAAC,IAAU;AAAA,EACV,GAAGC;AACL,GAAe;AACb,SACE,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWC;AAAA,QACT;AAAA,QACA;AAAA,UACE,MAAM;AAAA,UACN,SAAS;AAAA,QAAA,EACTL,CAAK;AAAA,QACP;AAAA,UACE,SACE;AAAA,UACF,SACE;AAAA,UACF,OACE;AAAA,UACF,SACE;AAAA,UACF,MAAM;AAAA,QAAA,EACNE,CAAO;AAAA,QACTD;AAAA,MAAA;AAAA,MAED,GAAGE;AAAA,MAEH,UAAAJ;AAAA,IAAA;AAAA,EAAA;AAGP;ACrBO,SAASO,EAAM,EAAE,WAAAL,GAAW,aAAAM,IAAc,SAAS,OAAAC,GAAO,GAAGL,KAAqB;AACvF,2BACGM,GAAA,EAAoB,WAAAR,GAAsB,aAAAM,GAA2B,GAAGJ,GACtE,UAAA;AAAA,IAAAK,EAAM,SAAS,WACd,gBAAAE,EAAAC,GAAA,EACE,UAAA;AAAA,MAAA,gBAAAP,EAACQ,GAAA,EAAwB,UAAAJ,EAAM,SAAA,CAAS;AAAA,MACvC;AAAA,MACD,gBAAAJ,EAACQ,GAAA,EAAwB,YAAM,SAAA,CAAS;AAAA,IAAA,GAC1C;AAAA,IAEDJ,EAAM,SAAS,UACd,gBAAAE,EAAAC,GAAA,EACE,UAAA;AAAA,MAAA,gBAAAP,EAACS,GAAA,EAAuB,UAAAL,EAAM,aAAA,CAAa;AAAA,MAAyB;AAAA,MACpE,gBAAAJ,EAACQ,GAAA,EAAwB,YAAM,cAAA,CAAc;AAAA,IAAA,GAC/C;AAAA,IAEDJ,EAAM,SAAS,aAAa,gBAAAJ,EAACQ,GAAA,EAAwB,YAAM,MAAA,CAAM;AAAA,EAAA,GACpE;AAEJ;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";const r=require("react/jsx-runtime"),t=require("./utils-LBH114_M.cjs"),a=require("./price-strike-DD2WNPQX.cjs");function s({children:i,shape:n="rounded",className:e,variant:l="primary",...o}){return r.jsx("span",{className:t.cn("px-2 py-0.5 text-xs uppercase tracking-tighter text-[var(--badge-text,hsl(var(--foreground)))] [font-family:var(--badge-font-family,var(--font-family-mono))]",{pill:"rounded-full",rounded:"rounded"}[n],{primary:"bg-[var(--badge-primary-background,color-mix(in_oklab,hsl(var(--primary)),white_75%))]",warning:"bg-[var(--badge-warning-background,color-mix(in_oklab,hsl(var(--warning)),white_75%))]",error:"bg-[var(--badge-error-background,color-mix(in_oklab,hsl(var(--error)),white_75%))]",success:"bg-[var(--badge-success-background,color-mix(in_oklab,hsl(var(--success)),white_75%))]",info:"bg-[var(--badge-info-background,color-mix(in_oklab,hsl(var(--info)),white_75%))]"}[l],e),...o,children:i})}function c({className:i,colorScheme:n="light",price:e,...l}){return r.jsxs(a.PriceRoot,{className:i,colorScheme:n,...l,children:[e.type==="range"&&r.jsxs(r.Fragment,{children:[r.jsx(a.PriceDefault,{children:e.minValue})," – ",r.jsx(a.PriceDefault,{children:e.maxValue})]}),e.type==="sale"&&r.jsxs(r.Fragment,{children:[r.jsx(a.PriceStrike,{children:e.currentValue})," ",r.jsx(a.PriceDefault,{children:e.previousValue})]}),e.type==="default"&&r.jsx(a.PriceDefault,{children:e.value})]})}exports.Badge=s;exports.Price=c;
|
|
2
|
+
//# sourceMappingURL=price-CdK2ye4P.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"price-CdK2ye4P.cjs","sources":["../src/components/badge/badge.tsx","../src/components/price/price.tsx"],"sourcesContent":["import type { ComponentProps } from 'react';\n\nimport { cn } from '@/lib';\n\nexport type BadgeProps = ComponentProps<'span'> & {\n children: string;\n shape?: 'pill' | 'rounded';\n variant?: 'primary' | 'warning' | 'error' | 'success' | 'info';\n};\n\n/**\n * This component supports various CSS variables for theming. Here's a comprehensive list, along\n * with their default values:\n *\n * ```css\n * :root {\n * --badge-primary-background: color-mix(in oklab, hsl(var(--primary)), white 75%);\n * --badge-success-background: color-mix(in oklab, hsl(var(--success)), white 75%);\n * --badge-warning-background: color-mix(in oklab, hsl(var(--warning)), white 75%);\n * --badge-error-background: color-mix(in oklab, hsl(var(--error)), white 75%);\n * --badge-info-background: color-mix(in oklab, hsl(var(--info)), white 75%);\n * --badge-text: hsl(var(--foreground));\n * --badge-font-family: var(--font-family-mono);\n * }\n * ```\n */\nexport function Badge({\n children,\n shape = 'rounded',\n className,\n variant = 'primary',\n ...props\n}: BadgeProps) {\n return (\n <span\n className={cn(\n 'px-2 py-0.5 text-xs uppercase tracking-tighter text-[var(--badge-text,hsl(var(--foreground)))] [font-family:var(--badge-font-family,var(--font-family-mono))]',\n {\n pill: 'rounded-full',\n rounded: 'rounded',\n }[shape],\n {\n primary:\n 'bg-[var(--badge-primary-background,color-mix(in_oklab,hsl(var(--primary)),white_75%))]',\n warning:\n 'bg-[var(--badge-warning-background,color-mix(in_oklab,hsl(var(--warning)),white_75%))]',\n error:\n 'bg-[var(--badge-error-background,color-mix(in_oklab,hsl(var(--error)),white_75%))]',\n success:\n 'bg-[var(--badge-success-background,color-mix(in_oklab,hsl(var(--success)),white_75%))]',\n info: 'bg-[var(--badge-info-background,color-mix(in_oklab,hsl(var(--info)),white_75%))]',\n }[variant],\n className,\n )}\n {...props}\n >\n {children}\n </span>\n );\n}\n","import * as PricePrimitive from '@/components/price';\n\ninterface PriceDefault {\n type: 'default';\n value: string;\n}\n\ninterface PriceRange {\n type: 'range';\n minValue: string;\n maxValue: string;\n}\n\ninterface PriceSale {\n type: 'sale';\n previousValue: string;\n currentValue: string;\n}\n\ntype PriceType = PriceDefault | PriceRange | PriceSale;\n\nexport interface PriceProps extends PricePrimitive.RootProps {\n price: PriceType;\n}\n\n/**\n * This component supports various CSS variables for theming. Here's a comprehensive list, along\n * with their default values:\n *\n * ```css\n * :root {\n * --price-light-text: hsl(var(--foreground));\n * --price-light-sale-text: hsl(var(--foreground));\n * --price-dark-text: hsl(var(--background));\n * --price-dark-sale-text: hsl(var(--background));\n * }\n * ```\n */\nexport function Price({ className, colorScheme = 'light', price, ...props }: PriceProps) {\n return (\n <PricePrimitive.Root className={className} colorScheme={colorScheme} {...props}>\n {price.type === 'range' && (\n <>\n <PricePrimitive.Default>{price.minValue}</PricePrimitive.Default>\n {' – '}\n <PricePrimitive.Default>{price.maxValue}</PricePrimitive.Default>\n </>\n )}\n {price.type === 'sale' && (\n <>\n <PricePrimitive.Strike>{price.currentValue}</PricePrimitive.Strike>{' '}\n <PricePrimitive.Default>{price.previousValue}</PricePrimitive.Default>\n </>\n )}\n {price.type === 'default' && <PricePrimitive.Default>{price.value}</PricePrimitive.Default>}\n </PricePrimitive.Root>\n );\n}\n"],"names":["Badge","children","shape","className","variant","props","jsx","cn","Price","colorScheme","price","PricePrimitive.Root","jsxs","Fragment","PricePrimitive.Default","PricePrimitive.Strike"],"mappings":"6HA0BO,SAASA,EAAM,CACpB,SAAAC,EACA,MAAAC,EAAQ,UACR,UAAAC,EACA,QAAAC,EAAU,UACV,GAAGC,CACL,EAAe,CACb,OACEC,EAAAA,IAAC,OAAA,CACC,UAAWC,EAAAA,GACT,gKACA,CACE,KAAM,eACN,QAAS,SAAA,EACTL,CAAK,EACP,CACE,QACE,yFACF,QACE,yFACF,MACE,qFACF,QACE,yFACF,KAAM,kFAAA,EACNE,CAAO,EACTD,CAAA,EAED,GAAGE,EAEH,SAAAJ,CAAA,CAAA,CAGP,CCrBO,SAASO,EAAM,CAAE,UAAAL,EAAW,YAAAM,EAAc,QAAS,MAAAC,EAAO,GAAGL,GAAqB,CACvF,cACGM,EAAAA,UAAA,CAAoB,UAAAR,EAAsB,YAAAM,EAA2B,GAAGJ,EACtE,SAAA,CAAAK,EAAM,OAAS,SACdE,EAAAA,KAAAC,EAAAA,SAAA,CACE,SAAA,CAAAP,EAAAA,IAACQ,EAAAA,aAAA,CAAwB,SAAAJ,EAAM,QAAA,CAAS,EACvC,MACDJ,EAAAA,IAACQ,EAAAA,aAAA,CAAwB,WAAM,QAAA,CAAS,CAAA,EAC1C,EAEDJ,EAAM,OAAS,QACdE,EAAAA,KAAAC,EAAAA,SAAA,CACE,SAAA,CAAAP,EAAAA,IAACS,EAAAA,YAAA,CAAuB,SAAAL,EAAM,YAAA,CAAa,EAAyB,IACpEJ,EAAAA,IAACQ,EAAAA,aAAA,CAAwB,WAAM,aAAA,CAAc,CAAA,EAC/C,EAEDJ,EAAM,OAAS,WAAaJ,EAAAA,IAACQ,EAAAA,aAAA,CAAwB,WAAM,KAAA,CAAM,CAAA,EACpE,CAEJ"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { S as o } from "./skeleton-root-DHW28LoV.js";
|
|
2
|
+
import { S as e } from "./skeleton-box-BSzQ5f9Y.js";
|
|
3
|
+
import { S as t } from "./skeleton-text-Dd4GbnEz.js";
|
|
4
|
+
import { S as r } from "./skeleton-icon-ThRjXhfU.js";
|
|
5
|
+
const l = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
6
|
+
__proto__: null,
|
|
7
|
+
Box: e,
|
|
8
|
+
Icon: r,
|
|
9
|
+
Root: o,
|
|
10
|
+
Text: t
|
|
11
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
12
|
+
export {
|
|
13
|
+
l as p
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=primitives--2McVg9Z.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"primitives--2McVg9Z.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";const e=require("./skeleton-root-uIgjea8b.cjs"),o=require("./skeleton-box-yQLivCqg.cjs"),t=require("./skeleton-text-CLzoDFvz.cjs"),n=require("./skeleton-icon-CCCgNtIy.cjs"),r=Object.freeze(Object.defineProperty({__proto__:null,Box:o.SkeletonBox,Icon:n.SkeletonIcon,Root:e.SkeletonRoot,Text:t.SkeletonText},Symbol.toStringTag,{value:"Module"}));exports.primitives=r;
|
|
2
|
+
//# sourceMappingURL=primitives-DmqzDKi2.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"primitives-DmqzDKi2.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),d=require("react"),c=require("./utils-LBH114_M.cjs"),i=require("./checkbox-indicator-BgXRGvAh.cjs"),m=require("./index-DGaxX11V.cjs"),f=require("./price-CdK2ye4P.cjs"),g=require("./skeleton-root-uIgjea8b.cjs"),v=require("./skeleton-box-yQLivCqg.cjs"),u=require("./skeleton-text-CLzoDFvz.cjs"),k=require("./check-DJilMvC6.cjs"),C=require("./index-Bw7_huW8.cjs");function j(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const o=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,o.get?o:{enumerable:!0,get:()=>t[r]})}}return e.default=t,Object.freeze(e)}const P=j(d),x=d.createContext(void 0);function N({className:t,children:e,as:r,colorScheme:o="light",aspectRatio:s="5:6",...l}){const b=r??"article",h=d.useMemo(()=>({colorScheme:o,aspectRatio:s}),[o,s]);return a.jsx(x.Provider,{value:h,children:a.jsx(b,{className:c.cn("group w-full max-w-md font-[var(--product-card-font-family,var(--font-family-body))] @container",t),"data-slot":"product-card-root",...l,children:e})})}function n(){const t=d.use(x);if(t===void 0)throw new Error("useProductCard must be used within an ProductCardRoot");return t}function S({className:t,children:e,...r}){return a.jsx("div",{className:c.cn("relative",t),"data-slot":"product-card-content",...r,children:e})}function w({className:t,children:e,...r}){return a.jsx("div",{className:c.cn("relative",t),"data-slot":"product-card-preview",...r,children:e})}function y({className:t,children:e,...r}){const{aspectRatio:o,colorScheme:s}=n();return a.jsx("div",{className:c.cn("relative overflow-hidden rounded-[var(--product-card-border-radius,1rem)]",{"5:6":"aspect-[5/6]","3:4":"aspect-[3/4]","1:1":"aspect-square"}[o],{light:"bg-[var(--product-card-light-background,hsl(var(--contrast-100)))]",dark:"bg-[var(--product-card-dark-background,hsl(var(--contrast-500)))]"}[s],t),"data-slot":"product-card-thumbnail",...r,children:e})}function q({className:t,children:e,asChild:r=!1,...o}){const{colorScheme:s}=n(),l=r?m.Slot:"img";return a.jsx(l,{className:c.cn("w-full scale-100 select-none object-cover transition-transform duration-500 ease-out group-hover:scale-110",{light:"bg-[var(--product-card-light-background,hsl(var(--contrast-100)))]",dark:"bg-[var(--product-card-dark-background,hsl(var(--contrast-500)))]"}[s],t),"data-slot":"product-card-image",...o})}function R({className:t,children:e,...r}){return a.jsx(f.Badge,{className:c.cn("absolute left-3 top-3",t),"data-slot":"product-card-badge",shape:"rounded",...r,children:e})}function T({className:t,children:e,...r}){const{colorScheme:o}=n();return a.jsx("div",{className:c.cn("break-words p-4 text-4xl font-bold leading-none tracking-tighter transition-transform duration-500 ease-out [color:var(--blog-post-card-empty-text,color-mix(in_oklab,hsl(var(--foreground))_15%,transparent))] group-hover:scale-105",{light:"text-[var(--product-card-light-title,hsl(var(--foreground)))]",dark:"text-[var(--product-card-dark-title,hsl(var(--background)))]"}[o]),"data-slot":"product-card-fallback",...r,children:e})}function _({asChild:t=!1,className:e,...r}){const{colorScheme:o}=n(),s=t?m.Slot:"a";return a.jsx(s,{className:c.cn("absolute inset-0 rounded-[var(--product-card-border-radius,1rem)] focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--product-card-focus,hsl(var(--primary)))] focus-visible:ring-offset-4",{light:"ring-offset-[var(--product-card-light-offset,hsl(var(--background)))]",dark:"ring-offset-[var(--product-card-dark-offset,hsl(var(--foreground)))]"}[o]),"data-slot":"product-card-link",...r})}function D({children:t,className:e,...r}){return a.jsx("div",{className:c.cn("mt-2 flex flex-col items-start gap-x-4 gap-y-3 px-1 @xs:mt-3 @xs:flex-row",e),"data-slot":"product-card-details",...r,children:t})}function L({children:t,className:e,...r}){return a.jsx("div",{className:c.cn("relative flex-1 text-sm @[16rem]:text-base",e),"data-slot":"product-card-header",...r,children:t})}function M({className:t,children:e,...r}){const{colorScheme:o}=n();return a.jsx("h3",{className:c.cn("block font-semibold",{light:"text-[var(--product-card-light-title,hsl(var(--foreground)))]",dark:"text-[var(--product-card-dark-title,hsl(var(--background)))]"}[o]),"data-slot":"product-card-title",...r,children:e})}function O({children:t,className:e,...r}){const{colorScheme:o}=n();return a.jsx("span",{className:c.cn("block text-sm font-normal",{light:"text-[var(--product-card-light-subtitle,color-mix(in_oklab,hsl(var(--foreground))_75%,transparent))]",dark:"text-[var(--product-card-dark-subtitle,color-mix(in_oklab,hsl(var(--background))_75%,transparent))]"}[o],e),"data-slot":"product-card-subtitle",...r,children:t})}function B({className:t,price:e,...r}){const{colorScheme:o}=n();return a.jsx(f.Price,{className:c.cn("mt-2",t),colorScheme:o,"data-slot":"product-card-price",price:e,...r})}function I({className:t,...e}){const{aspectRatio:r}=n();return a.jsxs(g.SkeletonRoot,{className:c.cn(t),"data-slot":"product-card-skeleton",...e,children:[a.jsx(v.SkeletonBox,{className:c.cn("rounded-[var(--product-card-border-radius,1rem)]",{"5:6":"aspect-[5/6]","3:4":"aspect-[3/4]","1:1":"aspect-square"}[r])}),a.jsx("div",{className:"mt-2 flex flex-col items-start gap-x-4 gap-y-3 px-1 @xs:mt-3 @xs:flex-row",children:a.jsxs("div",{className:"flex-1 text-sm @[16rem]:text-base",children:[a.jsx(u.SkeletonText,{characterCount:10,className:"rounded"}),a.jsx(u.SkeletonText,{characterCount:8,className:"rounded"}),a.jsx(u.SkeletonText,{characterCount:6,className:"rounded"})]})})]})}function E({className:t,children:e,...r}){return a.jsx("div",{className:c.cn("font-(family-name:--checkbox-font-family,var(--font-family-body)) flex shrink-0 items-center gap-2",t),"data-slot":"product-card-compare",...r,children:e})}function F({className:t,colorScheme:e="light",...r}){return a.jsx(i.CheckboxRoot,{className:t,colorScheme:e,...r,children:a.jsx(i.CheckboxIndicator,{children:a.jsx(k.default,{className:"h-4 w-4",color:"currentColor"})})})}function H({className:t,...e}){return a.jsx(F,{className:c.cn(t),"data-slot":"product-card-checkbox",...e})}var $="Label",p=P.forwardRef((t,e)=>a.jsx(C.Primitive.label,{...t,ref:e,onMouseDown:r=>{r.target.closest("button, input, select, textarea")||(t.onMouseDown?.(r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));p.displayName=$;var z=p;function A({className:t,children:e,colorScheme:r="light",...o}){return a.jsx(z,{className:c.cn("cursor-pointer text-sm peer-disabled:cursor-not-allowed peer-disabled:opacity-50",{light:"text-[var(--checkbox-light-label,hsl(var(--foreground)))]",dark:"text-[var(--checkbox-dark-label,hsl(var(--background)))]"}[r]),"data-slot":"label",...o,children:e})}function V({className:t,children:e,...r}){const{colorScheme:o}=n();return a.jsx(A,{className:c.cn(t),colorScheme:o,"data-slot":"product-card-label",...r,children:e})}exports.Badge=R;exports.Checkbox=H;exports.Compare=E;exports.Content=S;exports.Details=D;exports.Fallback=T;exports.Header=L;exports.Image=q;exports.Label=V;exports.Link=_;exports.Preview=w;exports.Price=B;exports.Root=N;exports.Skeleton=I;exports.Subtitle=O;exports.Thumbnail=y;exports.Title=M;exports.useProductCard=n;
|
|
2
|
+
//# sourceMappingURL=product-card.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"product-card.cjs","sources":["../src/components/product-card/primitives/product-card-root.tsx","../src/components/product-card/primitives/product-card-content.tsx","../src/components/product-card/primitives/product-card-preview.tsx","../src/components/product-card/primitives/product-card-thumbnail.tsx","../src/components/product-card/primitives/product-card-image.tsx","../src/components/product-card/primitives/product-card-badge.tsx","../src/components/product-card/primitives/product-card-fallback.tsx","../src/components/product-card/primitives/product-card-link.tsx","../src/components/product-card/primitives/product-card-details.tsx","../src/components/product-card/primitives/product-card-header.tsx","../src/components/product-card/primitives/product-card-title.tsx","../src/components/product-card/primitives/product-card-subtitle.tsx","../src/components/product-card/primitives/product-card-price.tsx","../src/components/product-card/primitives/product-card-skeleton.tsx","../src/components/product-card/primitives/product-card-compare.tsx","../src/components/checkbox/checkbox.tsx","../src/components/product-card/primitives/product-card-checkbox.tsx","../node_modules/.pnpm/@radix-ui+react-label@2.1.7_@types+react-dom@19.2.2_@types+react@19.2.2__@types+react@19.2.2__h3esd6u5mwikxnlir43mok2s5m/node_modules/@radix-ui/react-label/dist/index.mjs","../src/components/label/label.tsx","../src/components/product-card/primitives/product-card-label.tsx"],"sourcesContent":["'use client';\n\nimport { createContext, use, useMemo } from 'react';\nimport type { ComponentProps, ElementType } from 'react';\n\nimport { cn } from '@/lib';\n\ninterface ProductCardContext {\n colorScheme: 'light' | 'dark';\n aspectRatio: '5:6' | '3:4' | '1:1';\n}\n\nexport const ProductCardContext = createContext<ProductCardContext | undefined>(undefined);\n\nexport type ProductCardRootProps<E extends ElementType = 'article'> = Omit<\n ComponentProps<E>,\n 'as'\n> & {\n as?: E;\n colorScheme?: 'light' | 'dark';\n aspectRatio?: '5:6' | '3:4' | '1:1';\n};\n\nexport function ProductCardRoot<T extends ElementType = 'article'>({\n className,\n children,\n as,\n colorScheme = 'light',\n aspectRatio = '5:6',\n ...props\n}: ProductCardRootProps<T>) {\n const ProductCardRootElement = as ?? 'article';\n\n const contextValues = useMemo(\n () => ({\n colorScheme,\n aspectRatio,\n }),\n [colorScheme, aspectRatio],\n );\n\n return (\n <ProductCardContext.Provider value={contextValues}>\n <ProductCardRootElement\n className={cn(\n 'group w-full max-w-md font-[var(--product-card-font-family,var(--font-family-body))] @container',\n className,\n )}\n data-slot=\"product-card-root\"\n {...props}\n >\n {children}\n </ProductCardRootElement>\n </ProductCardContext.Provider>\n );\n}\n\nexport function useProductCard() {\n const context = use(ProductCardContext);\n\n if (context === undefined) {\n throw new Error('useProductCard must be used within an ProductCardRoot');\n }\n\n return context;\n}\n","import type { ComponentProps } from 'react';\n\nimport { cn } from '@/lib';\n\nexport type ProductCardContentProps = ComponentProps<'div'>;\n\nexport function ProductCardContent({ className, children, ...props }: ProductCardContentProps) {\n return (\n <div className={cn('relative', className)} data-slot=\"product-card-content\" {...props}>\n {children}\n </div>\n );\n}\n","import type { ComponentProps } from 'react';\n\nimport { cn } from '@/lib';\n\nexport type ProductCardPreviewProps = ComponentProps<'div'>;\n\nexport function ProductCardPreview({ className, children, ...props }: ProductCardPreviewProps) {\n return (\n <div className={cn('relative', className)} data-slot=\"product-card-preview\" {...props}>\n {children}\n </div>\n );\n}\n","'use client';\n\nimport type { ComponentProps } from 'react';\n\nimport { useProductCard } from '@/components/product-card';\nimport { cn } from '@/lib';\n\nexport type ProductCardThumbnailProps = ComponentProps<'div'>;\n\nexport function ProductCardThumbnail({ className, children, ...props }: ProductCardThumbnailProps) {\n const { aspectRatio, colorScheme } = useProductCard();\n\n return (\n <div\n className={cn(\n 'relative overflow-hidden rounded-[var(--product-card-border-radius,1rem)]',\n {\n '5:6': 'aspect-[5/6]',\n '3:4': 'aspect-[3/4]',\n '1:1': 'aspect-square',\n }[aspectRatio],\n {\n light: 'bg-[var(--product-card-light-background,hsl(var(--contrast-100)))]',\n dark: 'bg-[var(--product-card-dark-background,hsl(var(--contrast-500)))]',\n }[colorScheme],\n className,\n )}\n data-slot=\"product-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 { useProductCard } from '@/components/product-card';\nimport { cn } from '@/lib';\n\nexport interface ProductCardImageProps extends ComponentProps<'img'> {\n asChild?: boolean;\n}\n\nexport function ProductCardImage({\n className,\n children,\n asChild = false,\n ...props\n}: ProductCardImageProps) {\n const { colorScheme } = useProductCard();\n\n const Component = asChild ? Slot : 'img';\n\n return (\n <Component\n className={cn(\n 'w-full scale-100 select-none object-cover transition-transform duration-500 ease-out group-hover:scale-110',\n {\n light: 'bg-[var(--product-card-light-background,hsl(var(--contrast-100)))]',\n dark: 'bg-[var(--product-card-dark-background,hsl(var(--contrast-500)))]',\n }[colorScheme],\n className,\n )}\n data-slot=\"product-card-image\"\n {...props}\n />\n );\n}\n","import type { ComponentProps } from 'react';\n\nimport { Badge } from '@/components/badge';\nimport { cn } from '@/lib';\n\nexport type ProductCardBadgeProps = ComponentProps<typeof Badge>;\n\nexport function ProductCardBadge({ className, children, ...props }: ProductCardBadgeProps) {\n return (\n <Badge\n className={cn('absolute left-3 top-3', className)}\n data-slot=\"product-card-badge\"\n shape=\"rounded\"\n {...props}\n >\n {children}\n </Badge>\n );\n}\n","'use client';\n\nimport { ComponentProps } from 'react';\n\nimport { useProductCard } from '@/components/product-card';\nimport { cn } from '@/lib';\n\nexport type ProductCardFallbackProps = ComponentProps<'div'>;\n\nexport function ProductCardFallback({ className, children, ...props }: ProductCardFallbackProps) {\n const { colorScheme } = useProductCard();\n\n return (\n <div\n className={cn(\n 'break-words p-4 text-4xl font-bold leading-none tracking-tighter transition-transform duration-500 ease-out [color:var(--blog-post-card-empty-text,color-mix(in_oklab,hsl(var(--foreground))_15%,transparent))] group-hover:scale-105',\n {\n light: 'text-[var(--product-card-light-title,hsl(var(--foreground)))]',\n dark: 'text-[var(--product-card-dark-title,hsl(var(--background)))]',\n }[colorScheme],\n )}\n data-slot=\"product-card-fallback\"\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 { useProductCard } from '@/components/product-card';\nimport { cn } from '@/lib';\n\nexport interface ProductCardLinkProps extends ComponentProps<'a'> {\n asChild?: boolean;\n}\n\nexport function ProductCardLink({ asChild = false, className, ...props }: ProductCardLinkProps) {\n const { colorScheme } = useProductCard();\n\n const Component = asChild ? Slot : 'a';\n\n return (\n <Component\n className={cn(\n 'absolute inset-0 rounded-[var(--product-card-border-radius,1rem)] focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--product-card-focus,hsl(var(--primary)))] focus-visible:ring-offset-4',\n {\n light: 'ring-offset-[var(--product-card-light-offset,hsl(var(--background)))]',\n dark: 'ring-offset-[var(--product-card-dark-offset,hsl(var(--foreground)))]',\n }[colorScheme],\n )}\n data-slot=\"product-card-link\"\n {...props}\n />\n );\n}\n","import type { ComponentProps } from 'react';\n\nimport { cn } from '@/lib';\n\nexport type ProductCardDetailsProps = ComponentProps<'div'>;\n\nexport function ProductCardDetails({ children, className, ...props }: ProductCardDetailsProps) {\n return (\n <div\n className={cn(\n 'mt-2 flex flex-col items-start gap-x-4 gap-y-3 px-1 @xs:mt-3 @xs:flex-row',\n className,\n )}\n data-slot=\"product-card-details\"\n {...props}\n >\n {children}\n </div>\n );\n}\n","import type { ComponentProps } from 'react';\n\nimport { cn } from '@/lib';\n\nexport type ProductCardHeaderProps = ComponentProps<'div'>;\n\nexport function ProductCardHeader({ children, className, ...props }: ProductCardHeaderProps) {\n return (\n <div\n className={cn('relative flex-1 text-sm @[16rem]:text-base', className)}\n data-slot=\"product-card-header\"\n {...props}\n >\n {children}\n </div>\n );\n}\n","'use client';\n\nimport type { ComponentProps } from 'react';\n\nimport { useProductCard } from '@/components/product-card';\nimport { cn } from '@/lib';\n\nexport type ProductCardTitleProps = ComponentProps<'h3'>;\n\nexport function ProductCardTitle({ className, children, ...props }: ProductCardTitleProps) {\n const { colorScheme } = useProductCard();\n\n return (\n <h3\n className={cn(\n 'block font-semibold',\n {\n light: 'text-[var(--product-card-light-title,hsl(var(--foreground)))]',\n dark: 'text-[var(--product-card-dark-title,hsl(var(--background)))]',\n }[colorScheme],\n )}\n data-slot=\"product-card-title\"\n {...props}\n >\n {children}\n </h3>\n );\n}\n","'use client';\n\nimport type { ComponentProps } from 'react';\n\nimport { useProductCard } from '@/components/product-card';\nimport { cn } from '@/lib';\n\nexport type ProductCardSubtitleProps = ComponentProps<'span'>;\n\nexport function ProductCardSubtitle({ children, className, ...props }: ProductCardSubtitleProps) {\n const { colorScheme } = useProductCard();\n\n return (\n <span\n className={cn(\n 'block text-sm font-normal',\n {\n light:\n 'text-[var(--product-card-light-subtitle,color-mix(in_oklab,hsl(var(--foreground))_75%,transparent))]',\n dark: 'text-[var(--product-card-dark-subtitle,color-mix(in_oklab,hsl(var(--background))_75%,transparent))]',\n }[colorScheme],\n className,\n )}\n data-slot=\"product-card-subtitle\"\n {...props}\n >\n {children}\n </span>\n );\n}\n","import type { ComponentProps } from 'react';\n\nimport { Price } from '@/components/price';\nimport { useProductCard } from '@/components/product-card';\nimport { cn } from '@/lib';\n\nexport type ProductCardPriceProps = ComponentProps<typeof Price>;\n\nexport function ProductCardPrice({ className, price, ...props }: ProductCardPriceProps) {\n const { colorScheme } = useProductCard();\n\n return (\n <Price\n className={cn('mt-2', className)}\n colorScheme={colorScheme}\n data-slot=\"product-card-price\"\n price={price}\n {...props}\n />\n );\n}\n","import { ComponentProps } from 'react';\n\nimport { useProductCard } from '@/components/product-card';\nimport * as SkeletonPrimitive from '@/components/skeleton';\nimport { cn } from '@/lib';\n\nexport type ProductCardSkeletonProps = ComponentProps<typeof SkeletonPrimitive.Root>;\n\nexport function ProductCardSkeleton({ className, ...props }: ProductCardSkeletonProps) {\n const { aspectRatio } = useProductCard();\n\n return (\n <SkeletonPrimitive.Root className={cn(className)} data-slot=\"product-card-skeleton\" {...props}>\n <SkeletonPrimitive.Box\n className={cn(\n 'rounded-[var(--product-card-border-radius,1rem)]',\n {\n '5:6': 'aspect-[5/6]',\n '3:4': 'aspect-[3/4]',\n '1:1': 'aspect-square',\n }[aspectRatio],\n )}\n />\n <div className=\"mt-2 flex flex-col items-start gap-x-4 gap-y-3 px-1 @xs:mt-3 @xs:flex-row\">\n <div className=\"flex-1 text-sm @[16rem]:text-base\">\n <SkeletonPrimitive.Text characterCount={10} className=\"rounded\" />\n <SkeletonPrimitive.Text characterCount={8} className=\"rounded\" />\n <SkeletonPrimitive.Text characterCount={6} className=\"rounded\" />\n </div>\n </div>\n </SkeletonPrimitive.Root>\n );\n}\n","import type { ComponentProps } from 'react';\n\nimport { cn } from '@/lib';\nexport type ProductCardCompareProps = ComponentProps<'div'>;\n\nexport function ProductCardCompare({ className, children, ...props }: ProductCardCompareProps) {\n return (\n <div\n className={cn(\n 'font-(family-name:--checkbox-font-family,var(--font-family-body)) flex shrink-0 items-center gap-2',\n className,\n )}\n data-slot=\"product-card-compare\"\n {...props}\n >\n {children}\n </div>\n );\n}\n","'use client';\n\nimport { Check } from 'lucide-react';\nimport type { ComponentProps } from 'react';\n\nimport * as CheckboxPrimitive from '@/components/checkbox';\n\nexport type CheckboxProps = ComponentProps<typeof CheckboxPrimitive.Root>;\n\n/**\n * This component supports various CSS variables for theming. Here's a comprehensive list, along\n * with their default values:\n *\n * ```css\n * :root {\n * --checkbox-focus: var(--primary);\n * --checkbox-light-label: var(--foreground);\n * --checkbox-light-error: var(--error);\n * --checkbox-light-unchecked-border: var(--contrast-200);\n * --checkbox-light-unchecked-border-hover: var(--contrast-300);\n * --checkbox-light-unchecked-background: var(--background);\n * --checkbox-light-unchecked-icon: var(--foreground);\n * --checkbox-light-checked-border: var(--foreground);\n * --checkbox-light-checked-border-hover: var(--foreground);\n * --checkbox-light-checked-background: var(--foreground);\n * --checkbox-light-checked-icon: var(--background);\n * --checkbox-light-disabled-border: var(--contrast-200);\n * --checkbox-light-disabled-background: var(--contrast-100);\n * --checkbox-light-disabled-icon: var(--contrast-300);\n * --checkbox-dark-label: var(--background);\n * --checkbox-dark-error: var(--error);\n * --checkbox-dark-unchecked-border: var(--contrast-400);\n * --checkbox-dark-unchecked-border-hover: var(--contrast-300);\n * --checkbox-dark-unchecked-background: var(--foreground);\n * --checkbox-dark-unchecked-icon: var(--background);\n * --checkbox-dark-checked-border: var(--background);\n * --checkbox-dark-checked-border-hover: var(--background);\n * --checkbox-dark-checked-background: var(--foreground);\n * --checkbox-dark-checked-icon: var(--foreground);\n * --checkbox-dark-disabled-border: var(--contrast-200);\n * --checkbox-dark-disabled-background: var(--contrast-100);\n * --checkbox-dark-disabled-icon: var(--contrast-300);\n * --checkbox-font-family: var(--font-family-body);\n * }\n * ```\n */\nexport function Checkbox({ className, colorScheme = 'light', ...props }: CheckboxProps) {\n return (\n <CheckboxPrimitive.Root className={className} colorScheme={colorScheme} {...props}>\n <CheckboxPrimitive.Indicator>\n <Check className=\"h-4 w-4\" color=\"currentColor\" />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n );\n}\n","'use client';\n\nimport type { ComponentProps } from 'react';\n\nimport { Checkbox } from '@/components/checkbox';\nimport { cn } from '@/lib';\n\nexport type ProductCardCheckboxProps = ComponentProps<typeof Checkbox>;\n\nexport function ProductCardCheckbox({ className, ...props }: ProductCardCheckboxProps) {\n return <Checkbox className={cn(className)} data-slot=\"product-card-checkbox\" {...props} />;\n}\n","\"use client\";\n\n// src/label.tsx\nimport * as React from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { jsx } from \"react/jsx-runtime\";\nvar NAME = \"Label\";\nvar Label = React.forwardRef((props, forwardedRef) => {\n return /* @__PURE__ */ jsx(\n Primitive.label,\n {\n ...props,\n ref: forwardedRef,\n onMouseDown: (event) => {\n const target = event.target;\n if (target.closest(\"button, input, select, textarea\")) return;\n props.onMouseDown?.(event);\n if (!event.defaultPrevented && event.detail > 1) event.preventDefault();\n }\n }\n );\n});\nLabel.displayName = NAME;\nvar Root = Label;\nexport {\n Label,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n","import * as LabelPrimitive from '@radix-ui/react-label';\nimport type { ComponentProps } from 'react';\n\nimport { cn } from '@/lib';\n\nexport type LabelProps = ComponentProps<typeof LabelPrimitive.Root> & {\n colorScheme?: 'light' | 'dark';\n};\n\nexport function Label({ className, children, colorScheme = 'light', ...props }: LabelProps) {\n return (\n <LabelPrimitive.Root\n className={cn(\n 'cursor-pointer text-sm peer-disabled:cursor-not-allowed peer-disabled:opacity-50',\n {\n light: 'text-[var(--checkbox-light-label,hsl(var(--foreground)))]',\n dark: 'text-[var(--checkbox-dark-label,hsl(var(--background)))]',\n }[colorScheme],\n )}\n data-slot=\"label\"\n {...props}\n >\n {children}\n </LabelPrimitive.Root>\n );\n}\n","'use client';\n\nimport { ComponentProps } from 'react';\n\nimport { Label } from '@/components/label';\nimport { useProductCard } from '@/components/product-card';\nimport { cn } from '@/lib';\n\nexport type ProductCardLabelProps = ComponentProps<typeof Label>;\n\nexport function ProductCardLabel({ className, children, ...props }: ProductCardLabelProps) {\n const { colorScheme } = useProductCard();\n\n return (\n <Label\n className={cn(className)}\n colorScheme={colorScheme}\n data-slot=\"product-card-label\"\n {...props}\n >\n {children}\n </Label>\n );\n}\n"],"names":["ProductCardContext","createContext","ProductCardRoot","className","children","as","colorScheme","aspectRatio","props","ProductCardRootElement","contextValues","useMemo","jsx","cn","useProductCard","context","use","ProductCardContent","ProductCardPreview","ProductCardThumbnail","ProductCardImage","asChild","Component","Slot","ProductCardBadge","Badge","ProductCardFallback","ProductCardLink","ProductCardDetails","ProductCardHeader","ProductCardTitle","ProductCardSubtitle","ProductCardPrice","price","Price","ProductCardSkeleton","jsxs","SkeletonPrimitive.Root","SkeletonPrimitive.Box","SkeletonPrimitive.Text","ProductCardCompare","Checkbox","CheckboxPrimitive.Root","CheckboxPrimitive.Indicator","Check","ProductCardCheckbox","NAME","Label","React","forwardedRef","Primitive","event","Root","LabelPrimitive.Root","ProductCardLabel"],"mappings":"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","x_google_ignoreList":[17]}
|
|
@@ -0,0 +1,328 @@
|
|
|
1
|
+
import { jsx as o, jsxs as u } from "react/jsx-runtime";
|
|
2
|
+
import * as b from "react";
|
|
3
|
+
import { createContext as v, useMemo as g, use as x } from "react";
|
|
4
|
+
import { c } from "./utils-BOGlfttm.js";
|
|
5
|
+
import { C as k, a as C } from "./checkbox-indicator-Cfw9uH_b.js";
|
|
6
|
+
import { S as i } from "./index-DD8W7cMj.js";
|
|
7
|
+
import { B as P, P as N } from "./price-BwaeTmkR.js";
|
|
8
|
+
import { S } from "./skeleton-root-DHW28LoV.js";
|
|
9
|
+
import { S as w } from "./skeleton-box-BSzQ5f9Y.js";
|
|
10
|
+
import { S as l } from "./skeleton-text-Dd4GbnEz.js";
|
|
11
|
+
import y from "./check-ChGAB_3v.js";
|
|
12
|
+
import { P as R } from "./index-BzgbBl8b.js";
|
|
13
|
+
const m = v(void 0);
|
|
14
|
+
function z({
|
|
15
|
+
className: t,
|
|
16
|
+
children: a,
|
|
17
|
+
as: r,
|
|
18
|
+
colorScheme: e = "light",
|
|
19
|
+
aspectRatio: s = "5:6",
|
|
20
|
+
...n
|
|
21
|
+
}) {
|
|
22
|
+
const p = r ?? "article", h = g(
|
|
23
|
+
() => ({
|
|
24
|
+
colorScheme: e,
|
|
25
|
+
aspectRatio: s
|
|
26
|
+
}),
|
|
27
|
+
[e, s]
|
|
28
|
+
);
|
|
29
|
+
return /* @__PURE__ */ o(m.Provider, { value: h, children: /* @__PURE__ */ o(
|
|
30
|
+
p,
|
|
31
|
+
{
|
|
32
|
+
className: c(
|
|
33
|
+
"group w-full max-w-md font-[var(--product-card-font-family,var(--font-family-body))] @container",
|
|
34
|
+
t
|
|
35
|
+
),
|
|
36
|
+
"data-slot": "product-card-root",
|
|
37
|
+
...n,
|
|
38
|
+
children: a
|
|
39
|
+
}
|
|
40
|
+
) });
|
|
41
|
+
}
|
|
42
|
+
function d() {
|
|
43
|
+
const t = x(m);
|
|
44
|
+
if (t === void 0)
|
|
45
|
+
throw new Error("useProductCard must be used within an ProductCardRoot");
|
|
46
|
+
return t;
|
|
47
|
+
}
|
|
48
|
+
function G({ className: t, children: a, ...r }) {
|
|
49
|
+
return /* @__PURE__ */ o("div", { className: c("relative", t), "data-slot": "product-card-content", ...r, children: a });
|
|
50
|
+
}
|
|
51
|
+
function J({ className: t, children: a, ...r }) {
|
|
52
|
+
return /* @__PURE__ */ o("div", { className: c("relative", t), "data-slot": "product-card-preview", ...r, children: a });
|
|
53
|
+
}
|
|
54
|
+
function K({ className: t, children: a, ...r }) {
|
|
55
|
+
const { aspectRatio: e, colorScheme: s } = d();
|
|
56
|
+
return /* @__PURE__ */ o(
|
|
57
|
+
"div",
|
|
58
|
+
{
|
|
59
|
+
className: c(
|
|
60
|
+
"relative overflow-hidden rounded-[var(--product-card-border-radius,1rem)]",
|
|
61
|
+
{
|
|
62
|
+
"5:6": "aspect-[5/6]",
|
|
63
|
+
"3:4": "aspect-[3/4]",
|
|
64
|
+
"1:1": "aspect-square"
|
|
65
|
+
}[e],
|
|
66
|
+
{
|
|
67
|
+
light: "bg-[var(--product-card-light-background,hsl(var(--contrast-100)))]",
|
|
68
|
+
dark: "bg-[var(--product-card-dark-background,hsl(var(--contrast-500)))]"
|
|
69
|
+
}[s],
|
|
70
|
+
t
|
|
71
|
+
),
|
|
72
|
+
"data-slot": "product-card-thumbnail",
|
|
73
|
+
...r,
|
|
74
|
+
children: a
|
|
75
|
+
}
|
|
76
|
+
);
|
|
77
|
+
}
|
|
78
|
+
function O({
|
|
79
|
+
className: t,
|
|
80
|
+
children: a,
|
|
81
|
+
asChild: r = !1,
|
|
82
|
+
...e
|
|
83
|
+
}) {
|
|
84
|
+
const { colorScheme: s } = d();
|
|
85
|
+
return /* @__PURE__ */ o(
|
|
86
|
+
r ? i : "img",
|
|
87
|
+
{
|
|
88
|
+
className: c(
|
|
89
|
+
"w-full scale-100 select-none object-cover transition-transform duration-500 ease-out group-hover:scale-110",
|
|
90
|
+
{
|
|
91
|
+
light: "bg-[var(--product-card-light-background,hsl(var(--contrast-100)))]",
|
|
92
|
+
dark: "bg-[var(--product-card-dark-background,hsl(var(--contrast-500)))]"
|
|
93
|
+
}[s],
|
|
94
|
+
t
|
|
95
|
+
),
|
|
96
|
+
"data-slot": "product-card-image",
|
|
97
|
+
...e
|
|
98
|
+
}
|
|
99
|
+
);
|
|
100
|
+
}
|
|
101
|
+
function Q({ className: t, children: a, ...r }) {
|
|
102
|
+
return /* @__PURE__ */ o(
|
|
103
|
+
P,
|
|
104
|
+
{
|
|
105
|
+
className: c("absolute left-3 top-3", t),
|
|
106
|
+
"data-slot": "product-card-badge",
|
|
107
|
+
shape: "rounded",
|
|
108
|
+
...r,
|
|
109
|
+
children: a
|
|
110
|
+
}
|
|
111
|
+
);
|
|
112
|
+
}
|
|
113
|
+
function U({ className: t, children: a, ...r }) {
|
|
114
|
+
const { colorScheme: e } = d();
|
|
115
|
+
return /* @__PURE__ */ o(
|
|
116
|
+
"div",
|
|
117
|
+
{
|
|
118
|
+
className: c(
|
|
119
|
+
"break-words p-4 text-4xl font-bold leading-none tracking-tighter transition-transform duration-500 ease-out [color:var(--blog-post-card-empty-text,color-mix(in_oklab,hsl(var(--foreground))_15%,transparent))] group-hover:scale-105",
|
|
120
|
+
{
|
|
121
|
+
light: "text-[var(--product-card-light-title,hsl(var(--foreground)))]",
|
|
122
|
+
dark: "text-[var(--product-card-dark-title,hsl(var(--background)))]"
|
|
123
|
+
}[e]
|
|
124
|
+
),
|
|
125
|
+
"data-slot": "product-card-fallback",
|
|
126
|
+
...r,
|
|
127
|
+
children: a
|
|
128
|
+
}
|
|
129
|
+
);
|
|
130
|
+
}
|
|
131
|
+
function W({ asChild: t = !1, className: a, ...r }) {
|
|
132
|
+
const { colorScheme: e } = d();
|
|
133
|
+
return /* @__PURE__ */ o(
|
|
134
|
+
t ? i : "a",
|
|
135
|
+
{
|
|
136
|
+
className: c(
|
|
137
|
+
"absolute inset-0 rounded-[var(--product-card-border-radius,1rem)] focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--product-card-focus,hsl(var(--primary)))] focus-visible:ring-offset-4",
|
|
138
|
+
{
|
|
139
|
+
light: "ring-offset-[var(--product-card-light-offset,hsl(var(--background)))]",
|
|
140
|
+
dark: "ring-offset-[var(--product-card-dark-offset,hsl(var(--foreground)))]"
|
|
141
|
+
}[e]
|
|
142
|
+
),
|
|
143
|
+
"data-slot": "product-card-link",
|
|
144
|
+
...r
|
|
145
|
+
}
|
|
146
|
+
);
|
|
147
|
+
}
|
|
148
|
+
function X({ children: t, className: a, ...r }) {
|
|
149
|
+
return /* @__PURE__ */ o(
|
|
150
|
+
"div",
|
|
151
|
+
{
|
|
152
|
+
className: c(
|
|
153
|
+
"mt-2 flex flex-col items-start gap-x-4 gap-y-3 px-1 @xs:mt-3 @xs:flex-row",
|
|
154
|
+
a
|
|
155
|
+
),
|
|
156
|
+
"data-slot": "product-card-details",
|
|
157
|
+
...r,
|
|
158
|
+
children: t
|
|
159
|
+
}
|
|
160
|
+
);
|
|
161
|
+
}
|
|
162
|
+
function Y({ children: t, className: a, ...r }) {
|
|
163
|
+
return /* @__PURE__ */ o(
|
|
164
|
+
"div",
|
|
165
|
+
{
|
|
166
|
+
className: c("relative flex-1 text-sm @[16rem]:text-base", a),
|
|
167
|
+
"data-slot": "product-card-header",
|
|
168
|
+
...r,
|
|
169
|
+
children: t
|
|
170
|
+
}
|
|
171
|
+
);
|
|
172
|
+
}
|
|
173
|
+
function Z({ className: t, children: a, ...r }) {
|
|
174
|
+
const { colorScheme: e } = d();
|
|
175
|
+
return /* @__PURE__ */ o(
|
|
176
|
+
"h3",
|
|
177
|
+
{
|
|
178
|
+
className: c(
|
|
179
|
+
"block font-semibold",
|
|
180
|
+
{
|
|
181
|
+
light: "text-[var(--product-card-light-title,hsl(var(--foreground)))]",
|
|
182
|
+
dark: "text-[var(--product-card-dark-title,hsl(var(--background)))]"
|
|
183
|
+
}[e]
|
|
184
|
+
),
|
|
185
|
+
"data-slot": "product-card-title",
|
|
186
|
+
...r,
|
|
187
|
+
children: a
|
|
188
|
+
}
|
|
189
|
+
);
|
|
190
|
+
}
|
|
191
|
+
function rr({ children: t, className: a, ...r }) {
|
|
192
|
+
const { colorScheme: e } = d();
|
|
193
|
+
return /* @__PURE__ */ o(
|
|
194
|
+
"span",
|
|
195
|
+
{
|
|
196
|
+
className: c(
|
|
197
|
+
"block text-sm font-normal",
|
|
198
|
+
{
|
|
199
|
+
light: "text-[var(--product-card-light-subtitle,color-mix(in_oklab,hsl(var(--foreground))_75%,transparent))]",
|
|
200
|
+
dark: "text-[var(--product-card-dark-subtitle,color-mix(in_oklab,hsl(var(--background))_75%,transparent))]"
|
|
201
|
+
}[e],
|
|
202
|
+
a
|
|
203
|
+
),
|
|
204
|
+
"data-slot": "product-card-subtitle",
|
|
205
|
+
...r,
|
|
206
|
+
children: t
|
|
207
|
+
}
|
|
208
|
+
);
|
|
209
|
+
}
|
|
210
|
+
function tr({ className: t, price: a, ...r }) {
|
|
211
|
+
const { colorScheme: e } = d();
|
|
212
|
+
return /* @__PURE__ */ o(
|
|
213
|
+
N,
|
|
214
|
+
{
|
|
215
|
+
className: c("mt-2", t),
|
|
216
|
+
colorScheme: e,
|
|
217
|
+
"data-slot": "product-card-price",
|
|
218
|
+
price: a,
|
|
219
|
+
...r
|
|
220
|
+
}
|
|
221
|
+
);
|
|
222
|
+
}
|
|
223
|
+
function ar({ className: t, ...a }) {
|
|
224
|
+
const { aspectRatio: r } = d();
|
|
225
|
+
return /* @__PURE__ */ u(S, { className: c(t), "data-slot": "product-card-skeleton", ...a, children: [
|
|
226
|
+
/* @__PURE__ */ o(
|
|
227
|
+
w,
|
|
228
|
+
{
|
|
229
|
+
className: c(
|
|
230
|
+
"rounded-[var(--product-card-border-radius,1rem)]",
|
|
231
|
+
{
|
|
232
|
+
"5:6": "aspect-[5/6]",
|
|
233
|
+
"3:4": "aspect-[3/4]",
|
|
234
|
+
"1:1": "aspect-square"
|
|
235
|
+
}[r]
|
|
236
|
+
)
|
|
237
|
+
}
|
|
238
|
+
),
|
|
239
|
+
/* @__PURE__ */ o("div", { className: "mt-2 flex flex-col items-start gap-x-4 gap-y-3 px-1 @xs:mt-3 @xs:flex-row", children: /* @__PURE__ */ u("div", { className: "flex-1 text-sm @[16rem]:text-base", children: [
|
|
240
|
+
/* @__PURE__ */ o(l, { characterCount: 10, className: "rounded" }),
|
|
241
|
+
/* @__PURE__ */ o(l, { characterCount: 8, className: "rounded" }),
|
|
242
|
+
/* @__PURE__ */ o(l, { characterCount: 6, className: "rounded" })
|
|
243
|
+
] }) })
|
|
244
|
+
] });
|
|
245
|
+
}
|
|
246
|
+
function or({ className: t, children: a, ...r }) {
|
|
247
|
+
return /* @__PURE__ */ o(
|
|
248
|
+
"div",
|
|
249
|
+
{
|
|
250
|
+
className: c(
|
|
251
|
+
"font-(family-name:--checkbox-font-family,var(--font-family-body)) flex shrink-0 items-center gap-2",
|
|
252
|
+
t
|
|
253
|
+
),
|
|
254
|
+
"data-slot": "product-card-compare",
|
|
255
|
+
...r,
|
|
256
|
+
children: a
|
|
257
|
+
}
|
|
258
|
+
);
|
|
259
|
+
}
|
|
260
|
+
function L({ className: t, colorScheme: a = "light", ...r }) {
|
|
261
|
+
return /* @__PURE__ */ o(k, { className: t, colorScheme: a, ...r, children: /* @__PURE__ */ o(C, { children: /* @__PURE__ */ o(y, { className: "h-4 w-4", color: "currentColor" }) }) });
|
|
262
|
+
}
|
|
263
|
+
function er({ className: t, ...a }) {
|
|
264
|
+
return /* @__PURE__ */ o(L, { className: c(t), "data-slot": "product-card-checkbox", ...a });
|
|
265
|
+
}
|
|
266
|
+
var _ = "Label", f = b.forwardRef((t, a) => /* @__PURE__ */ o(
|
|
267
|
+
R.label,
|
|
268
|
+
{
|
|
269
|
+
...t,
|
|
270
|
+
ref: a,
|
|
271
|
+
onMouseDown: (r) => {
|
|
272
|
+
r.target.closest("button, input, select, textarea") || (t.onMouseDown?.(r), !r.defaultPrevented && r.detail > 1 && r.preventDefault());
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
));
|
|
276
|
+
f.displayName = _;
|
|
277
|
+
var B = f;
|
|
278
|
+
function D({ className: t, children: a, colorScheme: r = "light", ...e }) {
|
|
279
|
+
return /* @__PURE__ */ o(
|
|
280
|
+
B,
|
|
281
|
+
{
|
|
282
|
+
className: c(
|
|
283
|
+
"cursor-pointer text-sm peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
|
|
284
|
+
{
|
|
285
|
+
light: "text-[var(--checkbox-light-label,hsl(var(--foreground)))]",
|
|
286
|
+
dark: "text-[var(--checkbox-dark-label,hsl(var(--background)))]"
|
|
287
|
+
}[r]
|
|
288
|
+
),
|
|
289
|
+
"data-slot": "label",
|
|
290
|
+
...e,
|
|
291
|
+
children: a
|
|
292
|
+
}
|
|
293
|
+
);
|
|
294
|
+
}
|
|
295
|
+
function cr({ className: t, children: a, ...r }) {
|
|
296
|
+
const { colorScheme: e } = d();
|
|
297
|
+
return /* @__PURE__ */ o(
|
|
298
|
+
D,
|
|
299
|
+
{
|
|
300
|
+
className: c(t),
|
|
301
|
+
colorScheme: e,
|
|
302
|
+
"data-slot": "product-card-label",
|
|
303
|
+
...r,
|
|
304
|
+
children: a
|
|
305
|
+
}
|
|
306
|
+
);
|
|
307
|
+
}
|
|
308
|
+
export {
|
|
309
|
+
Q as Badge,
|
|
310
|
+
er as Checkbox,
|
|
311
|
+
or as Compare,
|
|
312
|
+
G as Content,
|
|
313
|
+
X as Details,
|
|
314
|
+
U as Fallback,
|
|
315
|
+
Y as Header,
|
|
316
|
+
O as Image,
|
|
317
|
+
cr as Label,
|
|
318
|
+
W as Link,
|
|
319
|
+
J as Preview,
|
|
320
|
+
tr as Price,
|
|
321
|
+
z as Root,
|
|
322
|
+
ar as Skeleton,
|
|
323
|
+
rr as Subtitle,
|
|
324
|
+
K as Thumbnail,
|
|
325
|
+
Z as Title,
|
|
326
|
+
d as useProductCard
|
|
327
|
+
};
|
|
328
|
+
//# sourceMappingURL=product-card.js.map
|