@starwind-ui/core 1.10.1 → 1.11.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -6,28 +6,28 @@ import { fileURLToPath } from "url";
6
6
  var registry_default = {
7
7
  $schema: "https://starwind.dev/registry-schema.json",
8
8
  components: [
9
- { name: "accordion", type: "component", version: "1.3.1", dependencies: [] },
9
+ { name: "accordion", type: "component", version: "1.3.2", dependencies: [] },
10
10
  { name: "alert", type: "component", version: "1.3.0", dependencies: [] },
11
11
  {
12
12
  name: "alert-dialog",
13
13
  type: "component",
14
- version: "1.0.0",
14
+ version: "1.0.1",
15
15
  dependencies: ["@starwind-ui/core/button@^2.1.0"]
16
16
  },
17
17
  { name: "aspect-ratio", type: "component", version: "1.0.0", dependencies: [] },
18
18
  { name: "avatar", type: "component", version: "1.2.0", dependencies: [] },
19
19
  { name: "badge", type: "component", version: "1.3.0", dependencies: [] },
20
- { name: "breadcrumb", type: "component", version: "1.1.0", dependencies: [] },
20
+ { name: "breadcrumb", type: "component", version: "1.1.1", dependencies: [] },
21
21
  { name: "button", type: "component", version: "2.2.0", dependencies: [] },
22
22
  { name: "card", type: "component", version: "1.3.0", dependencies: [] },
23
23
  {
24
24
  name: "carousel",
25
25
  type: "component",
26
- version: "1.0.0",
26
+ version: "1.0.1",
27
27
  dependencies: ["@starwind-ui/core/button@^2.1.0", "embla-carousel@^8.6.0"]
28
28
  },
29
29
  { name: "checkbox", type: "component", version: "1.4.0", dependencies: [] },
30
- { name: "dialog", type: "component", version: "1.4.0", dependencies: [] },
30
+ { name: "dialog", type: "component", version: "1.4.1", dependencies: [] },
31
31
  { name: "dropdown", type: "component", version: "1.2.0", dependencies: [] },
32
32
  { name: "dropzone", type: "component", version: "1.2.0", dependencies: [] },
33
33
  { name: "input", type: "component", version: "1.3.0", dependencies: [] },
@@ -37,16 +37,17 @@ var registry_default = {
37
37
  version: "1.0.0",
38
38
  dependencies: ["@starwind-ui/core/separator@^1.0.0"]
39
39
  },
40
+ { name: "kbd", type: "component", version: "1.0.0", dependencies: [] },
40
41
  { name: "label", type: "component", version: "1.2.0", dependencies: [] },
41
- { name: "pagination", type: "component", version: "3.0.0", dependencies: [] },
42
+ { name: "pagination", type: "component", version: "3.0.1", dependencies: [] },
42
43
  { name: "progress", type: "component", version: "1.1.0", dependencies: [] },
43
- { name: "radio-group", type: "component", version: "1.2.0", dependencies: [] },
44
- { name: "select", type: "component", version: "1.6.0", dependencies: [] },
44
+ { name: "radio-group", type: "component", version: "1.2.1", dependencies: [] },
45
+ { name: "select", type: "component", version: "1.6.1", dependencies: [] },
45
46
  { name: "separator", type: "component", version: "1.0.0", dependencies: [] },
46
47
  {
47
48
  name: "sheet",
48
49
  type: "component",
49
- version: "1.1.0",
50
+ version: "1.1.1",
50
51
  dependencies: ["@starwind-ui/core/dialog@^1.3.0"]
51
52
  },
52
53
  { name: "skeleton", type: "component", version: "1.2.0", dependencies: [] },
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.1\", \"dependencies\": [] },\n { \"name\": \"alert\", \"type\": \"component\", \"version\": \"1.3.0\", \"dependencies\": [] },\n {\n \"name\": \"alert-dialog\",\n \"type\": \"component\",\n \"version\": \"1.0.0\",\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.0\", \"dependencies\": [] },\n { \"name\": \"badge\", \"type\": \"component\", \"version\": \"1.3.0\", \"dependencies\": [] },\n { \"name\": \"breadcrumb\", \"type\": \"component\", \"version\": \"1.1.0\", \"dependencies\": [] },\n { \"name\": \"button\", \"type\": \"component\", \"version\": \"2.2.0\", \"dependencies\": [] },\n { \"name\": \"card\", \"type\": \"component\", \"version\": \"1.3.0\", \"dependencies\": [] },\n {\n \"name\": \"carousel\",\n \"type\": \"component\",\n \"version\": \"1.0.0\",\n \"dependencies\": [\"@starwind-ui/core/button@^2.1.0\", \"embla-carousel@^8.6.0\"]\n },\n { \"name\": \"checkbox\", \"type\": \"component\", \"version\": \"1.4.0\", \"dependencies\": [] },\n { \"name\": \"dialog\", \"type\": \"component\", \"version\": \"1.4.0\", \"dependencies\": [] },\n { \"name\": \"dropdown\", \"type\": \"component\", \"version\": \"1.2.0\", \"dependencies\": [] },\n { \"name\": \"dropzone\", \"type\": \"component\", \"version\": \"1.2.0\", \"dependencies\": [] },\n { \"name\": \"input\", \"type\": \"component\", \"version\": \"1.3.0\", \"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\": \"label\", \"type\": \"component\", \"version\": \"1.2.0\", \"dependencies\": [] },\n { \"name\": \"pagination\", \"type\": \"component\", \"version\": \"3.0.0\", \"dependencies\": [] },\n { \"name\": \"progress\", \"type\": \"component\", \"version\": \"1.1.0\", \"dependencies\": [] },\n { \"name\": \"radio-group\", \"type\": \"component\", \"version\": \"1.2.0\", \"dependencies\": [] },\n { \"name\": \"select\", \"type\": \"component\", \"version\": \"1.6.0\", \"dependencies\": [] },\n { \"name\": \"separator\", \"type\": \"component\", \"version\": \"1.0.0\", \"dependencies\": [] },\n {\n \"name\": \"sheet\",\n \"type\": \"component\",\n \"version\": \"1.1.0\",\n \"dependencies\": [\"@starwind-ui/core/dialog@^1.3.0\"]\n },\n { \"name\": \"skeleton\", \"type\": \"component\", \"version\": \"1.2.0\", \"dependencies\": [] },\n { \"name\": \"spinner\", \"type\": \"component\", \"version\": \"1.0.0\", \"dependencies\": [] },\n { \"name\": \"switch\", \"type\": \"component\", \"version\": \"1.3.0\", \"dependencies\": [] },\n { \"name\": \"table\", \"type\": \"component\", \"version\": \"1.1.0\", \"dependencies\": [] },\n { \"name\": \"tabs\", \"type\": \"component\", \"version\": \"1.4.0\", \"dependencies\": [] },\n { \"name\": \"textarea\", \"type\": \"component\", \"version\": \"1.3.0\", \"dependencies\": [] },\n { \"name\": \"tooltip\", \"type\": \"component\", \"version\": \"1.3.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,IACpD;AAAA,IACA,EAAE,MAA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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.2\", \"dependencies\": [] },\n { \"name\": \"alert\", \"type\": \"component\", \"version\": \"1.3.0\", \"dependencies\": [] },\n {\n \"name\": \"alert-dialog\",\n \"type\": \"component\",\n \"version\": \"1.0.1\",\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.0\", \"dependencies\": [] },\n { \"name\": \"badge\", \"type\": \"component\", \"version\": \"1.3.0\", \"dependencies\": [] },\n { \"name\": \"breadcrumb\", \"type\": \"component\", \"version\": \"1.1.1\", \"dependencies\": [] },\n { \"name\": \"button\", \"type\": \"component\", \"version\": \"2.2.0\", \"dependencies\": [] },\n { \"name\": \"card\", \"type\": \"component\", \"version\": \"1.3.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.0\", \"dependencies\": [] },\n { \"name\": \"dialog\", \"type\": \"component\", \"version\": \"1.4.1\", \"dependencies\": [] },\n { \"name\": \"dropdown\", \"type\": \"component\", \"version\": \"1.2.0\", \"dependencies\": [] },\n { \"name\": \"dropzone\", \"type\": \"component\", \"version\": \"1.2.0\", \"dependencies\": [] },\n { \"name\": \"input\", \"type\": \"component\", \"version\": \"1.3.0\", \"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.1\", \"dependencies\": [] },\n { \"name\": \"progress\", \"type\": \"component\", \"version\": \"1.1.0\", \"dependencies\": [] },\n { \"name\": \"radio-group\", \"type\": \"component\", \"version\": \"1.2.1\", \"dependencies\": [] },\n { \"name\": \"select\", \"type\": \"component\", \"version\": \"1.6.1\", \"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 { \"name\": \"skeleton\", \"type\": \"component\", \"version\": \"1.2.0\", \"dependencies\": [] },\n { \"name\": \"spinner\", \"type\": \"component\", \"version\": \"1.0.0\", \"dependencies\": [] },\n { \"name\": \"switch\", \"type\": \"component\", \"version\": \"1.3.0\", \"dependencies\": [] },\n { \"name\": \"table\", \"type\": \"component\", \"version\": \"1.1.0\", \"dependencies\": [] },\n { \"name\": \"tabs\", \"type\": \"component\", \"version\": \"1.4.0\", \"dependencies\": [] },\n { \"name\": \"textarea\", \"type\": \"component\", \"version\": \"1.3.0\", \"dependencies\": [] },\n { \"name\": \"tooltip\", \"type\": \"component\", \"version\": \"1.3.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,IACpD;AAAA,IACA,EAAE,MAAQ,gBAAgB,MAAQ,aAAa,SAAW,SAAS,cAAgB,CAAC,EAAE;AAAA,IACtF,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,cAAc,MAAQ,aAAa,SAAW,SAAS,cAAgB,CAAC,EAAE;AAAA,IACpF,EAAE,MAAQ,UAAU,MAAQ,aAAa,SAAW,SAAS,cAAgB,CAAC,EAAE;AAAA,IAChF,EAAE,MAAQ,QAAQ,MAAQ,aAAa,SAAW,SAAS,cAAgB,CAAC,EAAE;AAAA,IAC9E;AAAA,MACE,MAAQ;AAAA,MACR,MAAQ;AAAA,MACR,SAAW;AAAA,MACX,cAAgB,CAAC,mCAAmC,uBAAuB;AAAA,IAC7E;AAAA,IACA,EAAE,MAAQ,YAAY,MAAQ,aAAa,SAAW,SAAS,cAAgB,CAAC,EAAE;AAAA,IAClF,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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,EAAE,MAAQ,WAAW,MAAQ,aAAa,SAAW,SAAS,cAAgB,CAAC,EAAE;AAAA,EACnF;AACF;;;ADjCA,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":[]}
@@ -26,5 +26,7 @@ const { class: className, ...rest } = Astro.props;
26
26
  {...rest}
27
27
  >
28
28
  <slot />
29
- <ChevronDown class="size-5 shrink-0 transition-transform duration-200" />
29
+ <slot name="icon">
30
+ <ChevronDown class="size-5 shrink-0 transition-transform duration-200" />
31
+ </slot>
30
32
  </button>
@@ -30,13 +30,15 @@ const { class: className, animationDuration = 200, ...rest } = Astro.props;
30
30
  ---
31
31
 
32
32
  <!-- dialog overlay -->
33
- <div
34
- class={alertDialogBackdrop()}
35
- data-state="closed"
36
- data-slot="alert-dialog-backdrop"
37
- style={{ animationDuration: `${animationDuration}ms` }}
38
- >
39
- </div>
33
+ <slot name="backdrop">
34
+ <div
35
+ class={alertDialogBackdrop()}
36
+ data-state="closed"
37
+ data-slot="alert-dialog-backdrop"
38
+ style={{ animationDuration: `${animationDuration}ms` }}
39
+ >
40
+ </div>
41
+ </slot>
40
42
 
41
43
  <dialog
42
44
  class={alertDialogContent({ class: className })}
@@ -1,17 +1,18 @@
1
1
  ---
2
+ import type { HTMLAttributes } from "astro/types";
2
3
  import { tv } from "tailwind-variants";
3
4
 
4
5
  export const avatarFallback = tv({
5
6
  base: "absolute inset-0.5 flex items-center justify-center rounded-full font-medium",
6
7
  });
7
8
 
8
- interface Props {
9
+ interface Props extends HTMLAttributes<"div"> {
9
10
  class?: string;
10
11
  }
11
12
 
12
- const { class: className } = Astro.props;
13
+ const { class: className, ...rest } = Astro.props;
13
14
  ---
14
15
 
15
- <div class={avatarFallback({ class: className })} data-slot="avatar-fallback">
16
+ <div class={avatarFallback({ class: className })} data-slot="avatar-fallback" {...rest}>
16
17
  <slot />
17
18
  </div>
@@ -1,4 +1,5 @@
1
1
  ---
2
+ import type { HTMLAttributes } from "astro/types";
2
3
  import { Image } from "astro:assets";
3
4
  import { tv } from "tailwind-variants";
4
5
 
@@ -10,9 +11,9 @@ type WithSrc = BaseProps & { src: string; image?: never };
10
11
 
11
12
  type WithImage = BaseProps & { src?: never; image: ImageMetadata };
12
13
 
13
- type Props = WithSrc | WithImage;
14
+ type Props = HTMLAttributes<"img"> & (WithSrc | WithImage);
14
15
 
15
- const { src, image, alt, class: className } = Astro.props;
16
+ const { src, image, alt, class: className, width, height, ...rest } = Astro.props;
16
17
 
17
18
  if (!src && !image) {
18
19
  throw new Error("Either 'src' or 'image' is required for an avatar image.");
@@ -30,6 +31,7 @@ if (!src && !image) {
30
31
  height={64}
31
32
  onerror="this.style.display='none'"
32
33
  data-slot="avatar-image"
34
+ {...rest}
33
35
  />
34
36
  )
35
37
  }
@@ -41,6 +43,7 @@ if (!src && !image) {
41
43
  class={avatarImage({ class: className })}
42
44
  width={64}
43
45
  data-slot="avatar-image"
46
+ {...rest}
44
47
  />
45
48
  )
46
49
  }
@@ -19,6 +19,10 @@ const { class: className, ...rest } = Astro.props;
19
19
  data-slot="breadcrumb-ellipsis"
20
20
  {...rest}
21
21
  >
22
- <Dots />
23
- <span class="sr-only">More</span>
22
+ <slot name="icon">
23
+ <Dots />
24
+ </slot>
25
+ <slot>
26
+ <span class="sr-only">More</span>
27
+ </slot>
24
28
  </span>
@@ -28,6 +28,10 @@ const { class: className = "", variant = "outline", size = "icon", ...rest } = A
28
28
  aria-label="Next slide"
29
29
  {...rest}
30
30
  >
31
- <ArrowRight />
32
- <span class="sr-only">Next slide</span>
31
+ <slot name="icon">
32
+ <ArrowRight />
33
+ </slot>
34
+ <slot>
35
+ <span class="sr-only">Next slide</span>
36
+ </slot>
33
37
  </Button>
@@ -28,6 +28,10 @@ const { class: className = "", variant = "outline", size = "icon", ...rest } = A
28
28
  aria-label="Previous slide"
29
29
  {...rest}
30
30
  >
31
- <ArrowLeft />
32
- <span class="sr-only">Previous slide</span>
31
+ <slot name="icon">
32
+ <ArrowLeft />
33
+ </slot>
34
+ <slot>
35
+ <span class="sr-only">Previous slide</span>
36
+ </slot>
33
37
  </Button>
@@ -40,13 +40,15 @@ const { class: className, animationDuration = 200, ...rest } = Astro.props;
40
40
  ---
41
41
 
42
42
  <!-- dialog overlay -->
43
- <div
44
- class={dialogBackdrop()}
45
- data-state="closed"
46
- data-slot="dialog-backdrop"
47
- style={{ animationDuration: `${animationDuration}ms` }}
48
- >
49
- </div>
43
+ <slot name="backdrop">
44
+ <div
45
+ class={dialogBackdrop()}
46
+ data-state="closed"
47
+ data-slot="dialog-backdrop"
48
+ style={{ animationDuration: `${animationDuration}ms` }}
49
+ >
50
+ </div>
51
+ </slot>
50
52
 
51
53
  <dialog
52
54
  class={dialogContent({ class: className })}
@@ -57,7 +59,9 @@ const { class: className, animationDuration = 200, ...rest } = Astro.props;
57
59
  >
58
60
  <slot />
59
61
  <button type="button" class={dialogCloseButton()} data-dialog-close aria-label="Close dialog">
60
- <X class="size-5 transition-opacity" />
62
+ <slot name="icon">
63
+ <X class="size-5 transition-opacity" />
64
+ </slot>
61
65
  <span class="sr-only">Close</span>
62
66
  </button>
63
67
  </dialog>
@@ -163,7 +163,7 @@ const { class: className, openOnHover = false, closeDelay = 200, ...rest } = Ast
163
163
  if (item && !(item as HTMLElement).hasAttribute("data-disabled")) {
164
164
  // Close the dropdown after item selection
165
165
  this.closeDropdown();
166
- console.log("click closing");
166
+ // console.log("click closing");
167
167
  }
168
168
  });
169
169
 
@@ -0,0 +1,21 @@
1
+ ---
2
+ import type { HTMLAttributes } from "astro/types";
3
+ import { tv } from "tailwind-variants";
4
+
5
+ type Props = HTMLAttributes<"kbd">;
6
+
7
+ export const kbd = tv({
8
+ base: [
9
+ "pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-sm px-1 font-sans text-xs font-medium select-none",
10
+ "bg-muted text-muted-foreground",
11
+ "[&_svg:not([class*='size-'])]:size-3",
12
+ "[[data-slot=tooltip-content]_&]:bg-background/20 [[data-slot=tooltip-content]_&]:text-background dark:[[data-slot=tooltip-content]_&]:bg-background/10",
13
+ ],
14
+ });
15
+
16
+ const { class: className, ...rest } = Astro.props;
17
+ ---
18
+
19
+ <kbd class={kbd({ class: className })} data-slot="kbd" {...rest}>
20
+ <slot />
21
+ </kbd>
@@ -0,0 +1,16 @@
1
+ ---
2
+ import type { HTMLAttributes } from "astro/types";
3
+ import { tv } from "tailwind-variants";
4
+
5
+ type Props = HTMLAttributes<"kbd">;
6
+
7
+ export const kbdGroup = tv({
8
+ base: "inline-flex items-center gap-1",
9
+ });
10
+
11
+ const { class: className, ...rest } = Astro.props;
12
+ ---
13
+
14
+ <kbd class={kbdGroup({ class: className })} data-slot="kbd-group" {...rest}>
15
+ <slot />
16
+ </kbd>
@@ -0,0 +1,11 @@
1
+ import Kbd, { kbd } from "./Kbd.astro";
2
+ import KbdGroup, { kbdGroup } from "./KbdGroup.astro";
3
+
4
+ const KbdVariants = { kbd, kbdGroup };
5
+
6
+ export { Kbd, KbdGroup, KbdVariants };
7
+
8
+ export default {
9
+ Root: Kbd,
10
+ Group: KbdGroup,
11
+ };
@@ -16,6 +16,10 @@ const { class: className, ...rest } = Astro.props;
16
16
  data-slot="pagination-ellipsis"
17
17
  {...rest}
18
18
  >
19
- <Dots class="size-4" />
20
- <span class="sr-only">More pages</span>
19
+ <slot name="icon">
20
+ <Dots class="size-4" />
21
+ </slot>
22
+ <slot>
23
+ <span class="sr-only">More pages</span>
24
+ </slot>
21
25
  </span>
@@ -20,5 +20,7 @@ const { class: className, size = "md", ...rest } = Astro.props;
20
20
  {...rest}
21
21
  >
22
22
  <slot />
23
- <ChevronRight class="size-4 transition-transform group-hover:translate-x-1" />
23
+ <slot name="icon">
24
+ <ChevronRight class="size-4 transition-transform group-hover:translate-x-1" />
25
+ </slot>
24
26
  </PaginationLink>
@@ -19,6 +19,8 @@ const { class: className, size = "md", ...rest } = Astro.props;
19
19
  data-slot="pagination-previous"
20
20
  {...rest}
21
21
  >
22
- <ChevronLeft class="size-4 transition-transform group-hover:-translate-x-1" />
22
+ <slot name="icon">
23
+ <ChevronLeft class="size-4 transition-transform group-hover:-translate-x-1" />
24
+ </slot>
23
25
  <slot />
24
26
  </PaginationLink>
@@ -104,7 +104,7 @@ const {
104
104
 
105
105
  private handleChange(e: Event) {
106
106
  const target = e.target as HTMLInputElement;
107
- console.log("target", target);
107
+ // console.log("target", target);
108
108
  if (target.type !== "radio") return;
109
109
 
110
110
  // Update the data-value attribute
@@ -122,6 +122,8 @@ const {
122
122
  {...rest}
123
123
  />
124
124
  <span class={radioControl({ variant, class: className })} data-slot="radio-group-item-control">
125
- <CircleFilled class={radioIndicator({ size })} />
125
+ <slot name="icon">
126
+ <CircleFilled class={radioIndicator({ size })} />
127
+ </slot>
126
128
  </span>
127
129
  </div>
@@ -39,7 +39,9 @@ const { class: className, value, disabled, ...rest } = Astro.props;
39
39
  {...rest}
40
40
  >
41
41
  <span class={selectItemIcon()}>
42
- <Check class="size-4" />
42
+ <slot name="icon">
43
+ <Check class="size-4" />
44
+ </slot>
43
45
  </span>
44
46
  <span>
45
47
  <slot />
@@ -42,5 +42,7 @@ const { class: className, required = false, ...rest } = Astro.props;
42
42
  {...rest}
43
43
  >
44
44
  <slot />
45
- <ChevronDown class="size-4 opacity-50" />
45
+ <slot name="icon">
46
+ <ChevronDown class="size-4 opacity-50" />
47
+ </slot>
46
48
  </button>
@@ -63,7 +63,9 @@ export const sheetCloseButton = tv({
63
63
  ---
64
64
 
65
65
  <!-- dialog overlay -->
66
- <div class={dialogBackdrop()} data-state="closed" data-slot="dialog-backdrop"></div>
66
+ <slot name="backdrop">
67
+ <div class={dialogBackdrop()} data-state="closed" data-slot="dialog-backdrop"></div>
68
+ </slot>
67
69
 
68
70
  <dialog
69
71
  class={sheetContent({
@@ -82,7 +84,9 @@ export const sheetCloseButton = tv({
82
84
  data-slot="sheet-close"
83
85
  aria-label="Close dialog"
84
86
  >
85
- <X class="size-5 transition-opacity" />
87
+ <slot name="icon">
88
+ <X class="size-5 transition-opacity" />
89
+ </slot>
86
90
  <span class="sr-only">Close</span>
87
91
  </button>
88
92
  </dialog>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@starwind-ui/core",
3
- "version": "1.10.1",
3
+ "version": "1.11.1",
4
4
  "description": "Starwind UI core components and registry",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -40,7 +40,6 @@
40
40
  "dev": "tsup --watch",
41
41
  "core:link": "pnpm link --global",
42
42
  "core:unlink": "pnpm rm --global @starwind-ui/core",
43
- "sync:demo": "pnpm exec starwind sync src/components ../../apps/demo/src/components/starwind",
44
43
  "publish:beta": "pnpm publish --tag beta --access public",
45
44
  "publish:next": "pnpm publish --tag next --access public",
46
45
  "publish:release": "pnpm publish --access public"