@starwind-ui/core 1.15.2 → 1.15.4
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/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/src/components/card/Card.astro +25 -5
- package/dist/src/components/card/CardAction.astro +16 -0
- package/dist/src/components/card/CardContent.astro +3 -1
- package/dist/src/components/card/CardDescription.astro +3 -1
- package/dist/src/components/card/CardFooter.astro +3 -1
- package/dist/src/components/card/CardHeader.astro +6 -1
- package/dist/src/components/card/CardTitle.astro +3 -1
- package/dist/src/components/card/index.ts +13 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -25,7 +25,7 @@ var registry_default = {
|
|
|
25
25
|
dependencies: ["@starwind-ui/core/separator@^1.0.0"]
|
|
26
26
|
},
|
|
27
27
|
{ name: "button", type: "component", version: "2.3.0", dependencies: [] },
|
|
28
|
-
{ name: "card", type: "component", version: "
|
|
28
|
+
{ name: "card", type: "component", version: "2.0.0", dependencies: [] },
|
|
29
29
|
{
|
|
30
30
|
name: "carousel",
|
|
31
31
|
type: "component",
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts","../src/registry.json"],"sourcesContent":["import { join } from \"node:path\";\nimport { fileURLToPath } from \"node:url\";\n\nimport componentRegistry from \"./registry.json\" with { type: \"json\" };\n\n/**\n * Component metadata interface describing a Starwind UI component\n */\nexport interface ComponentMeta {\n name: string;\n version: string;\n type: \"component\";\n dependencies: string[];\n}\n\n/**\n * Registry interface containing all available components\n */\nexport interface Registry {\n components: ComponentMeta[];\n}\n\nconst __dirname = fileURLToPath(new URL(\".\", import.meta.url));\n\n/**\n * Get the absolute path to a component file\n * @param {string} componentName - The name of the component\n * @param {string} fileName - The name of the file within the component\n * @returns {string} The absolute path to the component file\n */\nexport const getComponentPath = (componentName: string, fileName: string): string => {\n // In production (when installed as a dependency), the components will be in dist/src/components\n // In development, they will be in src/components\n const componentsDir = __dirname.includes(\"dist\") ? \"src/components\" : \"src/components\";\n return join(__dirname, componentsDir, componentName, fileName);\n};\n\n/**\n * Map of all components and their metadata from registry\n */\nexport const registry = componentRegistry.components as ComponentMeta[];\n","{\n \"$schema\": \"https://starwind.dev/registry-schema.json\",\n \"components\": [\n { \"name\": \"accordion\", \"type\": \"component\", \"version\": \"1.3.3\", \"dependencies\": [] },\n { \"name\": \"alert\", \"type\": \"component\", \"version\": \"1.3.0\", \"dependencies\": [] },\n {\n \"name\": \"alert-dialog\",\n \"type\": \"component\",\n \"version\": \"1.0.3\",\n \"dependencies\": [\"@starwind-ui/core/button@^2.1.0\"]\n },\n { \"name\": \"aspect-ratio\", \"type\": \"component\", \"version\": \"1.0.0\", \"dependencies\": [] },\n { \"name\": \"avatar\", \"type\": \"component\", \"version\": \"1.2.1\", \"dependencies\": [] },\n { \"name\": \"badge\", \"type\": \"component\", \"version\": \"1.4.0\", \"dependencies\": [] },\n { \"name\": \"breadcrumb\", \"type\": \"component\", \"version\": \"1.1.1\", \"dependencies\": [] },\n {\n \"name\": \"button-group\",\n \"type\": \"component\",\n \"version\": \"1.0.0\",\n \"dependencies\": [\"@starwind-ui/core/separator@^1.0.0\"]\n },\n { \"name\": \"button\", \"type\": \"component\", \"version\": \"2.3.0\", \"dependencies\": [] },\n { \"name\": \"card\", \"type\": \"component\", \"version\": \"
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/registry.json"],"sourcesContent":["import { join } from \"node:path\";\nimport { fileURLToPath } from \"node:url\";\n\nimport componentRegistry from \"./registry.json\" with { type: \"json\" };\n\n/**\n * Component metadata interface describing a Starwind UI component\n */\nexport interface ComponentMeta {\n name: string;\n version: string;\n type: \"component\";\n dependencies: string[];\n}\n\n/**\n * Registry interface containing all available components\n */\nexport interface Registry {\n components: ComponentMeta[];\n}\n\nconst __dirname = fileURLToPath(new URL(\".\", import.meta.url));\n\n/**\n * Get the absolute path to a component file\n * @param {string} componentName - The name of the component\n * @param {string} fileName - The name of the file within the component\n * @returns {string} The absolute path to the component file\n */\nexport const getComponentPath = (componentName: string, fileName: string): string => {\n // In production (when installed as a dependency), the components will be in dist/src/components\n // In development, they will be in src/components\n const componentsDir = __dirname.includes(\"dist\") ? \"src/components\" : \"src/components\";\n return join(__dirname, componentsDir, componentName, fileName);\n};\n\n/**\n * Map of all components and their metadata from registry\n */\nexport const registry = componentRegistry.components as ComponentMeta[];\n","{\n \"$schema\": \"https://starwind.dev/registry-schema.json\",\n \"components\": [\n { \"name\": \"accordion\", \"type\": \"component\", \"version\": \"1.3.3\", \"dependencies\": [] },\n { \"name\": \"alert\", \"type\": \"component\", \"version\": \"1.3.0\", \"dependencies\": [] },\n {\n \"name\": \"alert-dialog\",\n \"type\": \"component\",\n \"version\": \"1.0.3\",\n \"dependencies\": [\"@starwind-ui/core/button@^2.1.0\"]\n },\n { \"name\": \"aspect-ratio\", \"type\": \"component\", \"version\": \"1.0.0\", \"dependencies\": [] },\n { \"name\": \"avatar\", \"type\": \"component\", \"version\": \"1.2.1\", \"dependencies\": [] },\n { \"name\": \"badge\", \"type\": \"component\", \"version\": \"1.4.0\", \"dependencies\": [] },\n { \"name\": \"breadcrumb\", \"type\": \"component\", \"version\": \"1.1.1\", \"dependencies\": [] },\n {\n \"name\": \"button-group\",\n \"type\": \"component\",\n \"version\": \"1.0.0\",\n \"dependencies\": [\"@starwind-ui/core/separator@^1.0.0\"]\n },\n { \"name\": \"button\", \"type\": \"component\", \"version\": \"2.3.0\", \"dependencies\": [] },\n { \"name\": \"card\", \"type\": \"component\", \"version\": \"2.0.0\", \"dependencies\": [] },\n {\n \"name\": \"carousel\",\n \"type\": \"component\",\n \"version\": \"1.0.1\",\n \"dependencies\": [\"@starwind-ui/core/button@^2.1.0\", \"embla-carousel@^8.6.0\"]\n },\n { \"name\": \"checkbox\", \"type\": \"component\", \"version\": \"1.4.1\", \"dependencies\": [] },\n { \"name\": \"collapsible\", \"type\": \"component\", \"version\": \"1.0.0\", \"dependencies\": [] },\n { \"name\": \"dialog\", \"type\": \"component\", \"version\": \"1.4.3\", \"dependencies\": [] },\n { \"name\": \"dropdown\", \"type\": \"component\", \"version\": \"1.2.3\", \"dependencies\": [] },\n { \"name\": \"dropzone\", \"type\": \"component\", \"version\": \"1.2.2\", \"dependencies\": [] },\n { \"name\": \"image\", \"type\": \"component\", \"version\": \"1.0.0\", \"dependencies\": [] },\n { \"name\": \"input\", \"type\": \"component\", \"version\": \"1.3.1\", \"dependencies\": [] },\n { \"name\": \"input-otp\", \"type\": \"component\", \"version\": \"1.0.1\", \"dependencies\": [] },\n {\n \"name\": \"item\",\n \"type\": \"component\",\n \"version\": \"1.0.0\",\n \"dependencies\": [\"@starwind-ui/core/separator@^1.0.0\"]\n },\n { \"name\": \"kbd\", \"type\": \"component\", \"version\": \"1.0.0\", \"dependencies\": [] },\n { \"name\": \"label\", \"type\": \"component\", \"version\": \"1.2.0\", \"dependencies\": [] },\n { \"name\": \"pagination\", \"type\": \"component\", \"version\": \"3.0.2\", \"dependencies\": [] },\n { \"name\": \"progress\", \"type\": \"component\", \"version\": \"1.1.1\", \"dependencies\": [] },\n { \"name\": \"prose\", \"type\": \"component\", \"version\": \"1.0.0\", \"dependencies\": [] },\n { \"name\": \"radio-group\", \"type\": \"component\", \"version\": \"1.2.4\", \"dependencies\": [] },\n { \"name\": \"select\", \"type\": \"component\", \"version\": \"1.8.3\", \"dependencies\": [] },\n { \"name\": \"separator\", \"type\": \"component\", \"version\": \"1.0.0\", \"dependencies\": [] },\n {\n \"name\": \"sheet\",\n \"type\": \"component\",\n \"version\": \"1.1.1\",\n \"dependencies\": [\"@starwind-ui/core/dialog@^1.3.0\"]\n },\n {\n \"name\": \"sidebar\",\n \"type\": \"component\",\n \"version\": \"1.0.0\",\n \"dependencies\": [\n \"@starwind-ui/core/button@^2.3.0\",\n \"@starwind-ui/core/dialog@^1.4.3\",\n \"@starwind-ui/core/input@^1.3.1\",\n \"@starwind-ui/core/separator@^1.0.0\",\n \"@starwind-ui/core/sheet@^1.1.1\",\n \"@starwind-ui/core/skeleton@^1.2.0\",\n \"@starwind-ui/core/tooltip@^1.4.0\"\n ]\n },\n { \"name\": \"skeleton\", \"type\": \"component\", \"version\": \"1.2.0\", \"dependencies\": [] },\n { \"name\": \"slider\", \"type\": \"component\", \"version\": \"1.0.0\", \"dependencies\": [] },\n { \"name\": \"spinner\", \"type\": \"component\", \"version\": \"1.0.0\", \"dependencies\": [] },\n { \"name\": \"switch\", \"type\": \"component\", \"version\": \"1.3.1\", \"dependencies\": [] },\n { \"name\": \"table\", \"type\": \"component\", \"version\": \"1.1.0\", \"dependencies\": [] },\n { \"name\": \"tabs\", \"type\": \"component\", \"version\": \"1.4.1\", \"dependencies\": [] },\n { \"name\": \"textarea\", \"type\": \"component\", \"version\": \"1.3.1\", \"dependencies\": [] },\n {\n \"name\": \"theme-toggle\",\n \"type\": \"component\",\n \"version\": \"1.0.0\",\n \"dependencies\": [\"@starwind-ui/core/toggle@^1.0.1\"]\n },\n { \"name\": \"toast\", \"type\": \"component\", \"version\": \"1.0.0\", \"dependencies\": [] },\n { \"name\": \"toggle\", \"type\": \"component\", \"version\": \"1.0.1\", \"dependencies\": [] },\n { \"name\": \"tooltip\", \"type\": \"component\", \"version\": \"1.4.0\", \"dependencies\": [] },\n { \"name\": \"video\", \"type\": \"component\", \"version\": \"1.0.0\", \"dependencies\": [] }\n ]\n}\n"],"mappings":";AAAA,SAAS,YAAY;AACrB,SAAS,qBAAqB;;;ACD9B;AAAA,EACE,SAAW;AAAA,EACX,YAAc;AAAA,IACZ,EAAE,MAAQ,aAAa,MAAQ,aAAa,SAAW,SAAS,cAAgB,CAAC,EAAE;AAAA,IACnF,EAAE,MAAQ,SAAS,MAAQ,aAAa,SAAW,SAAS,cAAgB,CAAC,EAAE;AAAA,IAC/E;AAAA,MACE,MAAQ;AAAA,MACR,MAAQ;AAAA,MACR,SAAW;AAAA,MACX,cAAgB,CAAC,iCAAiC;AAAA,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IAChF,EAAE,MAAQ,WAAW,MAAQ,aAAa,SAAW,SAAS,cAAgB,CAAC,EAAE;AAAA,IACjF,EAAE,MAAQ,UAAU,MAAQ,aAAa,SAAW,SAAS,cAAgB,CAAC,EAAE;AAAA,IAChF,EAAE,MAAQ,SAAS,MAAQ,aAAa,SAAW,SAAS,cAAgB,CAAC,EAAE;AAAA,IAC/E,EAAE,MAAQ,QAAQ,MAAQ,aAAa,SAAW,SAAS,cAAgB,CAAC,EAAE;AAAA,IAC9E,EAAE,MAAQ,YAAY,MAAQ,aAAa,SAAW,SAAS,cAAgB,CAAC,EAAE;AAAA,IAClF;AAAA,MACE,MAAQ;AAAA,MACR,MAAQ;AAAA,MACR,SAAW;AAAA,MACX,cAAgB,CAAC,iCAAiC;AAAA,IACpD;AAAA,IACA,EAAE,MAAQ,SAAS,MAAQ,aAAa,SAAW,SAAS,cAAgB,CAAC,EAAE;AAAA,IAC/E,EAAE,MAAQ,UAAU,MAAQ,aAAa,SAAW,SAAS,cAAgB,CAAC,EAAE;AAAA,IAChF,EAAE,MAAQ,WAAW,MAAQ,aAAa,SAAW,SAAS,cAAgB,CAAC,EAAE;AAAA,IACjF,EAAE,MAAQ,SAAS,MAAQ,aAAa,SAAW,SAAS,cAAgB,CAAC,EAAE;AAAA,EACjF;AACF;;;ADnEA,IAAM,YAAY,cAAc,IAAI,IAAI,KAAK,YAAY,GAAG,CAAC;AAQtD,IAAM,mBAAmB,CAAC,eAAuB,aAA6B;AAGnF,QAAM,gBAAgB,UAAU,SAAS,MAAM,IAAI,mBAAmB;AACtE,SAAO,KAAK,WAAW,eAAe,eAAe,QAAQ;AAC/D;AAKO,IAAM,WAAW,iBAAkB;","names":[]}
|
|
@@ -1,14 +1,34 @@
|
|
|
1
1
|
---
|
|
2
2
|
import type { HTMLAttributes } from "astro/types";
|
|
3
|
-
import { tv } from "tailwind-variants";
|
|
3
|
+
import { tv, type VariantProps } from "tailwind-variants";
|
|
4
4
|
|
|
5
|
-
type Props = HTMLAttributes<"div">;
|
|
5
|
+
type Props = HTMLAttributes<"div"> & VariantProps<typeof card>;
|
|
6
6
|
|
|
7
|
-
export const card = tv({
|
|
7
|
+
export const card = tv({
|
|
8
|
+
base: [
|
|
9
|
+
"bg-card text-card-foreground group/card ring-border flex flex-col rounded-xl ring-1",
|
|
10
|
+
"has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0",
|
|
11
|
+
"*:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",
|
|
12
|
+
],
|
|
13
|
+
variants: {
|
|
14
|
+
size: {
|
|
15
|
+
default: "gap-6 py-6",
|
|
16
|
+
sm: "gap-4 py-4 text-sm",
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
defaultVariants: {
|
|
20
|
+
size: "default",
|
|
21
|
+
},
|
|
22
|
+
});
|
|
8
23
|
|
|
9
|
-
const { class: className, ...rest } = Astro.props;
|
|
24
|
+
const { class: className, size, ...rest } = Astro.props;
|
|
10
25
|
---
|
|
11
26
|
|
|
12
|
-
<div
|
|
27
|
+
<div
|
|
28
|
+
class={card({ size, class: className })}
|
|
29
|
+
data-slot="card"
|
|
30
|
+
data-size={size ?? "default"}
|
|
31
|
+
{...rest}
|
|
32
|
+
>
|
|
13
33
|
<slot />
|
|
14
34
|
</div>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
import type { HTMLAttributes } from "astro/types";
|
|
3
|
+
import { tv } from "tailwind-variants";
|
|
4
|
+
|
|
5
|
+
type Props = HTMLAttributes<"div">;
|
|
6
|
+
|
|
7
|
+
export const cardAction = tv({
|
|
8
|
+
base: "col-start-2 row-span-2 row-start-1 self-start justify-self-end",
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
const { class: className, ...rest } = Astro.props;
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
<div class={cardAction({ class: className })} data-slot="card-action" {...rest}>
|
|
15
|
+
<slot />
|
|
16
|
+
</div>
|
|
@@ -4,7 +4,9 @@ import { tv } from "tailwind-variants";
|
|
|
4
4
|
|
|
5
5
|
type Props = HTMLAttributes<"div">;
|
|
6
6
|
|
|
7
|
-
export const cardContent = tv({
|
|
7
|
+
export const cardContent = tv({
|
|
8
|
+
base: "px-6 group-data-[size=sm]/card:px-4",
|
|
9
|
+
});
|
|
8
10
|
|
|
9
11
|
const { class: className, ...rest } = Astro.props;
|
|
10
12
|
---
|
|
@@ -4,7 +4,9 @@ import { tv } from "tailwind-variants";
|
|
|
4
4
|
|
|
5
5
|
type Props = HTMLAttributes<"div">;
|
|
6
6
|
|
|
7
|
-
export const cardDescription = tv({
|
|
7
|
+
export const cardDescription = tv({
|
|
8
|
+
base: "text-muted-foreground text-base group-data-[size=sm]/card:text-sm",
|
|
9
|
+
});
|
|
8
10
|
|
|
9
11
|
const { class: className, ...rest } = Astro.props;
|
|
10
12
|
---
|
|
@@ -4,7 +4,9 @@ import { tv } from "tailwind-variants";
|
|
|
4
4
|
|
|
5
5
|
type Props = HTMLAttributes<"div">;
|
|
6
6
|
|
|
7
|
-
export const cardFooter = tv({
|
|
7
|
+
export const cardFooter = tv({
|
|
8
|
+
base: "bg-muted/50 flex items-center rounded-b-xl border-t p-6 group-data-[size=sm]/card:p-4",
|
|
9
|
+
});
|
|
8
10
|
|
|
9
11
|
const { class: className, ...rest } = Astro.props;
|
|
10
12
|
---
|
|
@@ -4,7 +4,12 @@ import { tv } from "tailwind-variants";
|
|
|
4
4
|
|
|
5
5
|
type Props = HTMLAttributes<"div">;
|
|
6
6
|
|
|
7
|
-
export const cardHeader = tv({
|
|
7
|
+
export const cardHeader = tv({
|
|
8
|
+
base: [
|
|
9
|
+
"@container/card-header grid auto-rows-min items-start gap-1 px-6 group-data-[size=sm]/card:px-4",
|
|
10
|
+
"has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto]",
|
|
11
|
+
],
|
|
12
|
+
});
|
|
8
13
|
|
|
9
14
|
const { class: className, ...rest } = Astro.props;
|
|
10
15
|
---
|
|
@@ -4,7 +4,9 @@ import { tv } from "tailwind-variants";
|
|
|
4
4
|
|
|
5
5
|
type Props = HTMLAttributes<"div">;
|
|
6
6
|
|
|
7
|
-
export const cardTitle = tv({
|
|
7
|
+
export const cardTitle = tv({
|
|
8
|
+
base: "font-heading text-xl leading-snug font-medium group-data-[size=sm]/card:text-base",
|
|
9
|
+
});
|
|
8
10
|
|
|
9
11
|
const { class: className, ...rest } = Astro.props;
|
|
10
12
|
---
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import Card, { card } from "./Card.astro";
|
|
2
|
+
import CardAction, { cardAction } from "./CardAction.astro";
|
|
2
3
|
import CardContent, { cardContent } from "./CardContent.astro";
|
|
3
4
|
import CardDescription, { cardDescription } from "./CardDescription.astro";
|
|
4
5
|
import CardFooter, { cardFooter } from "./CardFooter.astro";
|
|
@@ -7,6 +8,7 @@ import CardTitle, { cardTitle } from "./CardTitle.astro";
|
|
|
7
8
|
|
|
8
9
|
const CardVariants = {
|
|
9
10
|
card,
|
|
11
|
+
cardAction,
|
|
10
12
|
cardContent,
|
|
11
13
|
cardDescription,
|
|
12
14
|
cardFooter,
|
|
@@ -14,7 +16,16 @@ const CardVariants = {
|
|
|
14
16
|
cardTitle,
|
|
15
17
|
};
|
|
16
18
|
|
|
17
|
-
export {
|
|
19
|
+
export {
|
|
20
|
+
Card,
|
|
21
|
+
CardAction,
|
|
22
|
+
CardContent,
|
|
23
|
+
CardDescription,
|
|
24
|
+
CardFooter,
|
|
25
|
+
CardHeader,
|
|
26
|
+
CardTitle,
|
|
27
|
+
CardVariants,
|
|
28
|
+
};
|
|
18
29
|
|
|
19
30
|
export default {
|
|
20
31
|
Root: Card,
|
|
@@ -23,4 +34,5 @@ export default {
|
|
|
23
34
|
Title: CardTitle,
|
|
24
35
|
Description: CardDescription,
|
|
25
36
|
Content: CardContent,
|
|
37
|
+
Action: CardAction,
|
|
26
38
|
};
|