@zayne-labs/ui-react 0.9.20 → 0.9.21
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.
|
@@ -72,7 +72,7 @@ function CardFooter(props) {
|
|
|
72
72
|
"data-scope": "card",
|
|
73
73
|
"data-part": "footer",
|
|
74
74
|
"data-slot": "card-footer",
|
|
75
|
-
className: cnMerge("
|
|
75
|
+
className: cnMerge("px-6", className),
|
|
76
76
|
...restOfProps
|
|
77
77
|
});
|
|
78
78
|
}
|
|
@@ -92,4 +92,4 @@ __export(card_parts_exports, {
|
|
|
92
92
|
|
|
93
93
|
//#endregion
|
|
94
94
|
export { CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardRoot, CardTitle, card_parts_exports };
|
|
95
|
-
//# sourceMappingURL=card-
|
|
95
|
+
//# sourceMappingURL=card-jkLXbuiw.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"card-jkLXbuiw.js","names":["props: PolymorphicProps<TElement>","props: PolymorphicProps<TElement, { asChild?: boolean }>","Component"],"sources":["../../src/components/ui/card/card.tsx","../../src/components/ui/card/card-parts.ts"],"sourcesContent":["import type { PolymorphicProps } from \"@zayne-labs/toolkit-react/utils\";\nimport * as React from \"react\";\nimport { Slot } from \"@/components/common/slot\";\nimport { cnMerge } from \"@/lib/utils/cn\";\n\nexport function CardRoot<TElement extends React.ElementType = \"article\">(\n\tprops: PolymorphicProps<TElement>\n) {\n\tconst { as: Element = \"article\", ...restOfProps } = props;\n\n\treturn (\n\t\t<Element\n\t\t\tdata-scope=\"card\"\n\t\t\tdata-part=\"root\"\n\t\t\tdata-slot=\"card-root\"\n\t\t\tclassName=\"flex flex-col gap-6 rounded-xl border py-6 shadow-sm\"\n\t\t\t{...restOfProps}\n\t\t/>\n\t);\n}\n\nexport function CardHeader<TElement extends React.ElementType = \"header\">(\n\tprops: PolymorphicProps<TElement>\n) {\n\tconst { as: Element = \"header\", ...restOfProps } = props;\n\n\treturn (\n\t\t<Element\n\t\t\tdata-scope=\"card\"\n\t\t\tdata-part=\"header\"\n\t\t\tdata-slot=\"card-header\"\n\t\t\tclassName=\"@container/card-header has-data-[slot=card-action]:grid-cols-[1fr_auto] grid\n\t\t\t\tauto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6\"\n\t\t\t{...restOfProps}\n\t\t/>\n\t);\n}\n\nexport function CardTitle<TElement extends React.ElementType = \"h3\">(props: PolymorphicProps<TElement>) {\n\tconst { as: Element = \"h3\", className, ...restOfProps } = props;\n\n\treturn (\n\t\t<Element\n\t\t\tdata-scope=\"card\"\n\t\t\tdata-part=\"title\"\n\t\t\tdata-slot=\"card-title\"\n\t\t\tclassName={cnMerge(\"font-semibold leading-none\", className)}\n\t\t\t{...restOfProps}\n\t\t/>\n\t);\n}\n\nexport function CardDescription<TElement extends React.ElementType = \"p\">(\n\tprops: PolymorphicProps<TElement>\n) {\n\tconst { as: Element = \"p\", className, ...restOfProps } = props;\n\n\treturn (\n\t\t<Element\n\t\t\tdata-scope=\"card\"\n\t\t\tdata-part=\"description\"\n\t\t\tdata-slot=\"card-description\"\n\t\t\tclassName={cnMerge(\"text-shadcn-muted-foreground text-sm\", className)}\n\t\t\t{...restOfProps}\n\t\t/>\n\t);\n}\n\nexport function CardContent<TElement extends React.ElementType = \"div\">(\n\tprops: PolymorphicProps<TElement>\n) {\n\tconst { as: Element = \"div\", className, ...restOfProps } = props;\n\n\treturn (\n\t\t<Element\n\t\t\tdata-scope=\"card\"\n\t\t\tdata-part=\"content\"\n\t\t\tdata-slot=\"card-content\"\n\t\t\tclassName={cnMerge(\"px-6\", className)}\n\t\t\t{...restOfProps}\n\t\t/>\n\t);\n}\n\nexport function CardAction<TElement extends React.ElementType = \"div\">(props: PolymorphicProps<TElement>) {\n\tconst { as: Element = \"div\", className, ...restOfProps } = props;\n\n\treturn (\n\t\t<Element\n\t\t\tdata-scope=\"card\"\n\t\t\tdata-part=\"action\"\n\t\t\tdata-slot=\"card-action\"\n\t\t\tclassName={cnMerge(\"col-start-2 row-span-2 row-start-1 self-start justify-self-end\", className)}\n\t\t\t{...restOfProps}\n\t\t/>\n\t);\n}\n\nexport function CardFooter<TElement extends React.ElementType = \"footer\">(\n\tprops: PolymorphicProps<TElement, { asChild?: boolean }>\n) {\n\tconst { as: Element = \"footer\", asChild, className, ...restOfProps } = props;\n\n\tconst Component = asChild ? Slot.Root : Element;\n\n\treturn (\n\t\t<Component\n\t\t\tdata-scope=\"card\"\n\t\t\tdata-part=\"footer\"\n\t\t\tdata-slot=\"card-footer\"\n\t\t\tclassName={cnMerge(\"px-6\", className)}\n\t\t\t{...restOfProps}\n\t\t/>\n\t);\n}\n","export {\n\tCardContent as Content,\n\tCardDescription as Description,\n\tCardFooter as Footer,\n\tCardHeader as Header,\n\tCardAction as Action,\n\tCardRoot as Root,\n\tCardTitle as Title,\n} from \"./card\";\n"],"mappings":";;;;;;;AAKA,SAAgB,SACfA,OACC;CACD,MAAM,EAAE,IAAI,UAAU,UAAW,GAAG,aAAa,GAAG;AAEpD,wBACC,IAAC;EACA,cAAW;EACX,aAAU;EACV,aAAU;EACV,WAAU;EACV,GAAI;GACH;AAEH;AAED,SAAgB,WACfA,OACC;CACD,MAAM,EAAE,IAAI,UAAU,SAAU,GAAG,aAAa,GAAG;AAEnD,wBACC,IAAC;EACA,cAAW;EACX,aAAU;EACV,aAAU;EACV,WAAU;EAEV,GAAI;GACH;AAEH;AAED,SAAgB,UAAqDA,OAAmC;CACvG,MAAM,EAAE,IAAI,UAAU,MAAM,UAAW,GAAG,aAAa,GAAG;AAE1D,wBACC,IAAC;EACA,cAAW;EACX,aAAU;EACV,aAAU;EACV,WAAW,QAAQ,8BAA8B,UAAU;EAC3D,GAAI;GACH;AAEH;AAED,SAAgB,gBACfA,OACC;CACD,MAAM,EAAE,IAAI,UAAU,KAAK,UAAW,GAAG,aAAa,GAAG;AAEzD,wBACC,IAAC;EACA,cAAW;EACX,aAAU;EACV,aAAU;EACV,WAAW,QAAQ,wCAAwC,UAAU;EACrE,GAAI;GACH;AAEH;AAED,SAAgB,YACfA,OACC;CACD,MAAM,EAAE,IAAI,UAAU,OAAO,UAAW,GAAG,aAAa,GAAG;AAE3D,wBACC,IAAC;EACA,cAAW;EACX,aAAU;EACV,aAAU;EACV,WAAW,QAAQ,QAAQ,UAAU;EACrC,GAAI;GACH;AAEH;AAED,SAAgB,WAAuDA,OAAmC;CACzG,MAAM,EAAE,IAAI,UAAU,OAAO,UAAW,GAAG,aAAa,GAAG;AAE3D,wBACC,IAAC;EACA,cAAW;EACX,aAAU;EACV,aAAU;EACV,WAAW,QAAQ,kEAAkE,UAAU;EAC/F,GAAI;GACH;AAEH;AAED,SAAgB,WACfC,OACC;CACD,MAAM,EAAE,IAAI,UAAU,UAAU,SAAS,UAAW,GAAG,aAAa,GAAG;CAEvE,MAAMC,cAAY,qBAAsB;AAExC,wBACC,IAACA;EACA,cAAW;EACX,aAAU;EACV,aAAU;EACV,WAAW,QAAQ,QAAQ,UAAU;EACrC,GAAI;GACH;AAEH"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "../../../slot-RXTKo4L7.js";
|
|
2
2
|
import "../../../cn-_FbtIrlZ.js";
|
|
3
|
-
import { CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardRoot, CardTitle, card_parts_exports } from "../../../card-
|
|
3
|
+
import { CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardRoot, CardTitle, card_parts_exports } from "../../../card-jkLXbuiw.js";
|
|
4
4
|
|
|
5
5
|
export { card_parts_exports as Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardRoot, CardTitle };
|
|
@@ -10,7 +10,7 @@ import "../../switch-B2gKl94R.js";
|
|
|
10
10
|
import "../../teleport-dlSjWj_t.js";
|
|
11
11
|
import "../../common-BYWy8Q78.js";
|
|
12
12
|
import "../../cn-_FbtIrlZ.js";
|
|
13
|
-
import { card_parts_exports } from "../../card-
|
|
13
|
+
import { card_parts_exports } from "../../card-jkLXbuiw.js";
|
|
14
14
|
import { carousel_parts_exports } from "../../carousel-Dvp-qURP.js";
|
|
15
15
|
import { useDragScroll } from "../../drag-scroll-BLjij7aI.js";
|
|
16
16
|
import { drop_zone_parts_exports, useDropZone } from "../../drop-zone-Beip1k4x.js";
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"card-BBTJxmWt.js","names":["props: PolymorphicProps<TElement>","props: PolymorphicProps<TElement, { asChild?: boolean }>","Component"],"sources":["../../src/components/ui/card/card.tsx","../../src/components/ui/card/card-parts.ts"],"sourcesContent":["import * as React from \"react\";\n\nimport { Slot } from \"@/components/common/slot\";\nimport { cnMerge } from \"@/lib/utils/cn\";\nimport type { PolymorphicProps } from \"@zayne-labs/toolkit-react/utils\";\n\nexport function CardRoot<TElement extends React.ElementType = \"article\">(\n\tprops: PolymorphicProps<TElement>\n) {\n\tconst { as: Element = \"article\", ...restOfProps } = props;\n\n\treturn (\n\t\t<Element\n\t\t\tdata-scope=\"card\"\n\t\t\tdata-part=\"root\"\n\t\t\tdata-slot=\"card-root\"\n\t\t\tclassName=\"flex flex-col gap-6 rounded-xl border py-6 shadow-sm\"\n\t\t\t{...restOfProps}\n\t\t/>\n\t);\n}\n\nexport function CardHeader<TElement extends React.ElementType = \"header\">(\n\tprops: PolymorphicProps<TElement>\n) {\n\tconst { as: Element = \"header\", ...restOfProps } = props;\n\n\treturn (\n\t\t<Element\n\t\t\tdata-scope=\"card\"\n\t\t\tdata-part=\"header\"\n\t\t\tdata-slot=\"card-header\"\n\t\t\tclassName=\"@container/card-header has-data-[slot=card-action]:grid-cols-[1fr_auto] grid\n\t\t\t\tauto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6\"\n\t\t\t{...restOfProps}\n\t\t/>\n\t);\n}\n\nexport function CardTitle<TElement extends React.ElementType = \"h3\">(props: PolymorphicProps<TElement>) {\n\tconst { as: Element = \"h3\", className, ...restOfProps } = props;\n\n\treturn (\n\t\t<Element\n\t\t\tdata-scope=\"card\"\n\t\t\tdata-part=\"title\"\n\t\t\tdata-slot=\"card-title\"\n\t\t\tclassName={cnMerge(\"font-semibold leading-none\", className)}\n\t\t\t{...restOfProps}\n\t\t/>\n\t);\n}\n\nexport function CardDescription<TElement extends React.ElementType = \"p\">(\n\tprops: PolymorphicProps<TElement>\n) {\n\tconst { as: Element = \"p\", className, ...restOfProps } = props;\n\n\treturn (\n\t\t<Element\n\t\t\tdata-scope=\"card\"\n\t\t\tdata-part=\"description\"\n\t\t\tdata-slot=\"card-description\"\n\t\t\tclassName={cnMerge(\"text-shadcn-muted-foreground text-sm\", className)}\n\t\t\t{...restOfProps}\n\t\t/>\n\t);\n}\n\nexport function CardContent<TElement extends React.ElementType = \"div\">(\n\tprops: PolymorphicProps<TElement>\n) {\n\tconst { as: Element = \"div\", className, ...restOfProps } = props;\n\n\treturn (\n\t\t<Element\n\t\t\tdata-scope=\"card\"\n\t\t\tdata-part=\"content\"\n\t\t\tdata-slot=\"card-content\"\n\t\t\tclassName={cnMerge(\"px-6\", className)}\n\t\t\t{...restOfProps}\n\t\t/>\n\t);\n}\n\nexport function CardAction<TElement extends React.ElementType = \"div\">(props: PolymorphicProps<TElement>) {\n\tconst { as: Element = \"div\", className, ...restOfProps } = props;\n\n\treturn (\n\t\t<Element\n\t\t\tdata-scope=\"card\"\n\t\t\tdata-part=\"action\"\n\t\t\tdata-slot=\"card-action\"\n\t\t\tclassName={cnMerge(\"col-start-2 row-span-2 row-start-1 self-start justify-self-end\", className)}\n\t\t\t{...restOfProps}\n\t\t/>\n\t);\n}\n\nexport function CardFooter<TElement extends React.ElementType = \"footer\">(\n\tprops: PolymorphicProps<TElement, { asChild?: boolean }>\n) {\n\tconst { as: Element = \"footer\", asChild, className, ...restOfProps } = props;\n\n\tconst Component = asChild ? Slot.Root : Element;\n\n\treturn (\n\t\t<Component\n\t\t\tdata-scope=\"card\"\n\t\t\tdata-part=\"footer\"\n\t\t\tdata-slot=\"card-footer\"\n\t\t\tclassName={cnMerge(\"flex items-center px-6\", className)}\n\t\t\t{...restOfProps}\n\t\t/>\n\t);\n}\n","export {\n\tCardContent as Content,\n\tCardDescription as Description,\n\tCardFooter as Footer,\n\tCardHeader as Header,\n\tCardAction as Action,\n\tCardRoot as Root,\n\tCardTitle as Title,\n} from \"./card\";\n"],"mappings":";;;;;;;AAMA,SAAgB,SACfA,OACC;CACD,MAAM,EAAE,IAAI,UAAU,UAAW,GAAG,aAAa,GAAG;AAEpD,wBACC,IAAC;EACA,cAAW;EACX,aAAU;EACV,aAAU;EACV,WAAU;EACV,GAAI;GACH;AAEH;AAED,SAAgB,WACfA,OACC;CACD,MAAM,EAAE,IAAI,UAAU,SAAU,GAAG,aAAa,GAAG;AAEnD,wBACC,IAAC;EACA,cAAW;EACX,aAAU;EACV,aAAU;EACV,WAAU;EAEV,GAAI;GACH;AAEH;AAED,SAAgB,UAAqDA,OAAmC;CACvG,MAAM,EAAE,IAAI,UAAU,MAAM,UAAW,GAAG,aAAa,GAAG;AAE1D,wBACC,IAAC;EACA,cAAW;EACX,aAAU;EACV,aAAU;EACV,WAAW,QAAQ,8BAA8B,UAAU;EAC3D,GAAI;GACH;AAEH;AAED,SAAgB,gBACfA,OACC;CACD,MAAM,EAAE,IAAI,UAAU,KAAK,UAAW,GAAG,aAAa,GAAG;AAEzD,wBACC,IAAC;EACA,cAAW;EACX,aAAU;EACV,aAAU;EACV,WAAW,QAAQ,wCAAwC,UAAU;EACrE,GAAI;GACH;AAEH;AAED,SAAgB,YACfA,OACC;CACD,MAAM,EAAE,IAAI,UAAU,OAAO,UAAW,GAAG,aAAa,GAAG;AAE3D,wBACC,IAAC;EACA,cAAW;EACX,aAAU;EACV,aAAU;EACV,WAAW,QAAQ,QAAQ,UAAU;EACrC,GAAI;GACH;AAEH;AAED,SAAgB,WAAuDA,OAAmC;CACzG,MAAM,EAAE,IAAI,UAAU,OAAO,UAAW,GAAG,aAAa,GAAG;AAE3D,wBACC,IAAC;EACA,cAAW;EACX,aAAU;EACV,aAAU;EACV,WAAW,QAAQ,kEAAkE,UAAU;EAC/F,GAAI;GACH;AAEH;AAED,SAAgB,WACfC,OACC;CACD,MAAM,EAAE,IAAI,UAAU,UAAU,SAAS,UAAW,GAAG,aAAa,GAAG;CAEvE,MAAMC,cAAY,qBAAsB;AAExC,wBACC,IAACA;EACA,cAAW;EACX,aAAU;EACV,aAAU;EACV,WAAW,QAAQ,0BAA0B,UAAU;EACvD,GAAI;GACH;AAEH"}
|