@starwind-ui/core 1.9.0 → 1.10.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.
Files changed (46) hide show
  1. package/dist/index.js +28 -19
  2. package/dist/index.js.map +1 -1
  3. package/dist/src/components/accordion/AccordionContent.astro +1 -1
  4. package/dist/src/components/accordion/AccordionItem.astro +1 -1
  5. package/dist/src/components/accordion/AccordionTrigger.astro +3 -3
  6. package/dist/src/components/alert/Alert.astro +1 -1
  7. package/dist/src/components/aspect-ratio/AspectRatio.astro +32 -0
  8. package/dist/src/components/aspect-ratio/index.ts +7 -0
  9. package/dist/src/components/badge/Badge.astro +13 -10
  10. package/dist/src/components/button/Button.astro +13 -13
  11. package/dist/src/components/card/CardTitle.astro +1 -1
  12. package/dist/src/components/checkbox/Checkbox.astro +18 -9
  13. package/dist/src/components/dialog/DialogContent.astro +3 -3
  14. package/dist/src/components/dialog/DialogTitle.astro +1 -1
  15. package/dist/src/components/dropdown/DropdownSeparator.astro +1 -1
  16. package/dist/src/components/dropdown/DropdownTrigger.astro +2 -1
  17. package/dist/src/components/dropzone/Dropzone.astro +4 -4
  18. package/dist/src/components/input/Input.astro +2 -2
  19. package/dist/src/components/item/Item.astro +52 -0
  20. package/dist/src/components/item/ItemActions.astro +16 -0
  21. package/dist/src/components/item/ItemContent.astro +16 -0
  22. package/dist/src/components/item/ItemDescription.astro +19 -0
  23. package/dist/src/components/item/ItemFooter.astro +16 -0
  24. package/dist/src/components/item/ItemGroup.astro +16 -0
  25. package/dist/src/components/item/ItemHeader.astro +16 -0
  26. package/dist/src/components/item/ItemMedia.astro +40 -0
  27. package/dist/src/components/item/ItemSeparator.astro +21 -0
  28. package/dist/src/components/item/ItemTitle.astro +16 -0
  29. package/dist/src/components/item/index.ts +50 -0
  30. package/dist/src/components/pagination/PaginationLink.astro +9 -29
  31. package/dist/src/components/progress/Progress.astro +1 -1
  32. package/dist/src/components/radio-group/RadioGroupItem.astro +10 -9
  33. package/dist/src/components/select/SelectLabel.astro +1 -1
  34. package/dist/src/components/select/SelectTrigger.astro +2 -2
  35. package/dist/src/components/separator/Separator.astro +36 -0
  36. package/dist/src/components/separator/index.ts +7 -0
  37. package/dist/src/components/sheet/SheetContent.astro +3 -5
  38. package/dist/src/components/skeleton/Skeleton.astro +1 -1
  39. package/dist/src/components/spinner/Spinner.astro +21 -0
  40. package/dist/src/components/spinner/index.ts +7 -0
  41. package/dist/src/components/switch/Switch.astro +10 -9
  42. package/dist/src/components/tabs/TabsList.astro +1 -1
  43. package/dist/src/components/tabs/TabsTrigger.astro +4 -2
  44. package/dist/src/components/textarea/Textarea.astro +2 -2
  45. package/dist/src/components/tooltip/TooltipContent.astro +19 -4
  46. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -6,47 +6,56 @@ 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.2.0", dependencies: [] },
10
- { name: "alert", type: "component", version: "1.2.0", dependencies: [] },
9
+ { name: "accordion", type: "component", version: "1.3.1", dependencies: [] },
10
+ { name: "alert", type: "component", version: "1.3.0", dependencies: [] },
11
11
  {
12
12
  name: "alert-dialog",
13
13
  type: "component",
14
14
  version: "1.0.0",
15
15
  dependencies: ["@starwind-ui/core/button@^2.1.0"]
16
16
  },
17
+ { name: "aspect-ratio", type: "component", version: "1.0.0", dependencies: [] },
17
18
  { name: "avatar", type: "component", version: "1.2.0", dependencies: [] },
18
- { name: "badge", type: "component", version: "1.2.0", dependencies: [] },
19
+ { name: "badge", type: "component", version: "1.3.0", dependencies: [] },
19
20
  { name: "breadcrumb", type: "component", version: "1.1.0", dependencies: [] },
20
- { name: "button", type: "component", version: "2.1.0", dependencies: [] },
21
- { name: "card", type: "component", version: "1.2.0", dependencies: [] },
21
+ { name: "button", type: "component", version: "2.2.0", dependencies: [] },
22
+ { name: "card", type: "component", version: "1.3.0", dependencies: [] },
22
23
  {
23
24
  name: "carousel",
24
25
  type: "component",
25
26
  version: "1.0.0",
26
27
  dependencies: ["@starwind-ui/core/button@^2.1.0", "embla-carousel@^8.6.0"]
27
28
  },
28
- { name: "checkbox", type: "component", version: "1.3.0", dependencies: [] },
29
- { name: "dialog", type: "component", version: "1.3.0", dependencies: [] },
30
- { name: "dropdown", type: "component", version: "1.1.0", dependencies: [] },
31
- { name: "dropzone", type: "component", version: "1.1.0", dependencies: [] },
32
- { name: "input", type: "component", version: "1.2.0", dependencies: [] },
29
+ { name: "checkbox", type: "component", version: "1.4.0", dependencies: [] },
30
+ { name: "dialog", type: "component", version: "1.4.0", dependencies: [] },
31
+ { name: "dropdown", type: "component", version: "1.2.0", dependencies: [] },
32
+ { name: "dropzone", type: "component", version: "1.2.0", dependencies: [] },
33
+ { name: "input", type: "component", version: "1.3.0", dependencies: [] },
34
+ {
35
+ name: "item",
36
+ type: "component",
37
+ version: "1.0.0",
38
+ dependencies: ["@starwind-ui/core/separator@^1.0.0"]
39
+ },
33
40
  { name: "label", type: "component", version: "1.2.0", dependencies: [] },
34
- { name: "pagination", type: "component", version: "2.1.0", dependencies: [] },
41
+ { name: "pagination", type: "component", version: "3.0.0", dependencies: [] },
35
42
  { name: "progress", type: "component", version: "1.1.0", dependencies: [] },
36
- { name: "radio-group", type: "component", version: "1.1.0", dependencies: [] },
37
- { name: "select", type: "component", version: "1.5.0", dependencies: [] },
43
+ { name: "radio-group", type: "component", version: "1.2.0", dependencies: [] },
44
+ { name: "select", type: "component", version: "1.6.0", dependencies: [] },
45
+ { name: "separator", type: "component", version: "1.0.0", dependencies: [] },
38
46
  {
39
47
  name: "sheet",
40
48
  type: "component",
41
- version: "1.0.0",
49
+ version: "1.1.0",
42
50
  dependencies: ["@starwind-ui/core/dialog@^1.3.0"]
43
51
  },
44
- { name: "skeleton", type: "component", version: "1.1.0", dependencies: [] },
45
- { name: "switch", type: "component", version: "1.2.0", dependencies: [] },
52
+ { name: "skeleton", type: "component", version: "1.2.0", dependencies: [] },
53
+ { name: "spinner", type: "component", version: "1.0.0", dependencies: [] },
54
+ { name: "switch", type: "component", version: "1.3.0", dependencies: [] },
46
55
  { name: "table", type: "component", version: "1.1.0", dependencies: [] },
47
- { name: "tabs", type: "component", version: "1.3.0", dependencies: [] },
48
- { name: "textarea", type: "component", version: "1.2.0", dependencies: [] },
49
- { name: "tooltip", type: "component", version: "1.2.0", dependencies: [] }
56
+ { name: "tabs", type: "component", version: "1.4.0", dependencies: [] },
57
+ { name: "textarea", type: "component", version: "1.3.0", dependencies: [] },
58
+ { name: "tooltip", type: "component", version: "1.3.0", dependencies: [] }
50
59
  ]
51
60
  };
52
61
 
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.2.0\", \"dependencies\": [] },\n { \"name\": \"alert\", \"type\": \"component\", \"version\": \"1.2.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\": \"avatar\", \"type\": \"component\", \"version\": \"1.2.0\", \"dependencies\": [] },\n { \"name\": \"badge\", \"type\": \"component\", \"version\": \"1.2.0\", \"dependencies\": [] },\n { \"name\": \"breadcrumb\", \"type\": \"component\", \"version\": \"1.1.0\", \"dependencies\": [] },\n { \"name\": \"button\", \"type\": \"component\", \"version\": \"2.1.0\", \"dependencies\": [] },\n { \"name\": \"card\", \"type\": \"component\", \"version\": \"1.2.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.3.0\", \"dependencies\": [] },\n { \"name\": \"dialog\", \"type\": \"component\", \"version\": \"1.3.0\", \"dependencies\": [] },\n { \"name\": \"dropdown\", \"type\": \"component\", \"version\": \"1.1.0\", \"dependencies\": [] },\n { \"name\": \"dropzone\", \"type\": \"component\", \"version\": \"1.1.0\", \"dependencies\": [] },\n { \"name\": \"input\", \"type\": \"component\", \"version\": \"1.2.0\", \"dependencies\": [] },\n { \"name\": \"label\", \"type\": \"component\", \"version\": \"1.2.0\", \"dependencies\": [] },\n { \"name\": \"pagination\", \"type\": \"component\", \"version\": \"2.1.0\", \"dependencies\": [] },\n { \"name\": \"progress\", \"type\": \"component\", \"version\": \"1.1.0\", \"dependencies\": [] },\n { \"name\": \"radio-group\", \"type\": \"component\", \"version\": \"1.1.0\", \"dependencies\": [] },\n { \"name\": \"select\", \"type\": \"component\", \"version\": \"1.5.0\", \"dependencies\": [] },\n {\n \"name\": \"sheet\",\n \"type\": \"component\",\n \"version\": \"1.0.0\",\n \"dependencies\": [\"@starwind-ui/core/dialog@^1.3.0\"]\n },\n { \"name\": \"skeleton\", \"type\": \"component\", \"version\": \"1.1.0\", \"dependencies\": [] },\n { \"name\": \"switch\", \"type\": \"component\", \"version\": \"1.2.0\", \"dependencies\": [] },\n { \"name\": \"table\", \"type\": \"component\", \"version\": \"1.1.0\", \"dependencies\": [] },\n { \"name\": \"tabs\", \"type\": \"component\", \"version\": \"1.3.0\", \"dependencies\": [] },\n { \"name\": \"textarea\", \"type\": \"component\", \"version\": \"1.2.0\", \"dependencies\": [] },\n { \"name\": \"tooltip\", \"type\": \"component\", \"version\": \"1.2.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,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,EAAE,MAAQ,UAAU,MAAQ,aAAa,SAAW,SAAS,cAAgB,CAAC,EAAE;AAAA,IAChF,EAAE,MAAQ,YAAY,MAAQ,aAAa,SAAW,SAAS,cAAgB,CAAC,EAAE;AAAA,IAClF,EAAE,MAAQ,YAAY,MAAQ,aAAa,SAAW,SAAS,cAAgB,CAAC,EAAE;AAAA,IAClF,EAAE,MAAQ,SAAS,MAAQ,aAAa,SAAW,SAAS,cAAgB,CAAC,EAAE;AAAA,IAC/E,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,YAAY,MAAQ,aAAa,SAAW,SAAS,cAAgB,CAAC,EAAE;AAAA,IAClF,EAAE,MAAQ,eAAe,MAAQ,aAAa,SAAW,SAAS,cAAgB,CAAC,EAAE;AAAA,IACrF,EAAE,MAAQ,UAAU,MAAQ,aAAa,SAAW,SAAS,cAAgB,CAAC,EAAE;AAAA,IAChF;AAAA,MACE,MAAQ;AAAA,MACR,MAAQ;AAAA,MACR,SAAW;AAAA,MACX,cAAgB,CAAC,iCAAiC;AAAA,IACpD;AAAA,IACA,EAAE,MAAQ,YAAY,MAAQ,aAAa,SAAW,SAAS,cAAgB,CAAC,EAAE;AAAA,IAClF,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,EAAE,MAAQ,WAAW,MAAQ,aAAa,SAAW,SAAS,cAAgB,CAAC,EAAE;AAAA,EACnF;AACF;;;ADvBA,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
+ {"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,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,EAAE,MAAQ,UAAU,MAAQ,aAAa,SAAW,SAAS,cAAgB,CAAC,EAAE;AAAA,IAChF,EAAE,MAAQ,YAAY,MAAQ,aAAa,SAAW,SAAS,cAAgB,CAAC,EAAE;AAAA,IAClF,EAAE,MAAQ,YAAY,MAAQ,aAAa,SAAW,SAAS,cAAgB,CAAC,EAAE;AAAA,IAClF,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,oCAAoC;AAAA,IACvD;AAAA,IACA,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,YAAY,MAAQ,aAAa,SAAW,SAAS,cAAgB,CAAC,EAAE;AAAA,IAClF,EAAE,MAAQ,eAAe,MAAQ,aAAa,SAAW,SAAS,cAAgB,CAAC,EAAE;AAAA,IACrF,EAAE,MAAQ,UAAU,MAAQ,aAAa,SAAW,SAAS,cAAgB,CAAC,EAAE;AAAA,IAChF,EAAE,MAAQ,aAAa,MAAQ,aAAa,SAAW,SAAS,cAAgB,CAAC,EAAE;AAAA,IACnF;AAAA,MACE,MAAQ;AAAA,MACR,MAAQ;AAAA,MACR,SAAW;AAAA,MACX,cAAgB,CAAC,iCAAiC;AAAA,IACpD;AAAA,IACA,EAAE,MAAQ,YAAY,MAAQ,aAAa,SAAW,SAAS,cAAgB,CAAC,EAAE;AAAA,IAClF,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,EAAE,MAAQ,WAAW,MAAQ,aAAa,SAAW,SAAS,cAAgB,CAAC,EAAE;AAAA,EACnF;AACF;;;ADhCA,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":[]}
@@ -27,7 +27,7 @@ const { class: className, ...rest } = Astro.props;
27
27
  data-slot="accordion-content"
28
28
  {...rest}
29
29
  >
30
- <div class="overflow-hidden px-5 pt-0 pb-4">
30
+ <div class="pt-0 pb-4">
31
31
  <slot />
32
32
  </div>
33
33
  </div>
@@ -10,7 +10,7 @@ type Props = HTMLAttributes<"div"> & {
10
10
  };
11
11
 
12
12
  export const accordionItem = tv({
13
- base: "starwind-accordion-item border-x border-b first:rounded-t-lg first:border-t last:rounded-b-lg",
13
+ base: "starwind-accordion-item border-b last:border-b-0",
14
14
  });
15
15
 
16
16
  const { value, class: className, ...rest } = Astro.props;
@@ -8,10 +8,10 @@ type Props = HTMLAttributes<"button">;
8
8
  export const accordionTrigger = tv({
9
9
  base: [
10
10
  "starwind-accordion-trigger",
11
- "flex w-full items-center justify-between gap-4 rounded-md px-5 py-4",
12
- "starwind-transition-colors hover:text-muted-foreground text-left font-medium",
11
+ "flex w-full items-center justify-between gap-4 rounded-md py-4",
12
+ "hover:text-muted-foreground text-left font-medium transition-all",
13
13
  "[&[data-state=open]>svg]:rotate-180",
14
- "focus-visible:outline-outline focus-visible:outline-2 focus-visible:outline-offset-0",
14
+ "focus-visible:border-outline focus-visible:ring-outline/50 outline-none focus-visible:ring-3",
15
15
  ],
16
16
  });
17
17
 
@@ -8,7 +8,7 @@ export const alert = tv({
8
8
  base: "text-foreground relative w-full rounded-lg border p-4",
9
9
  variants: {
10
10
  variant: {
11
- default: "bg-background [&>h5>svg]:text-foreground",
11
+ default: "bg-background dark:bg-input/30 [&>h5>svg]:text-foreground",
12
12
  primary: "border-primary bg-primary/7 [&>h5>svg]:text-primary",
13
13
  secondary: "border-secondary bg-secondary/7 [&>h5>svg]:text-secondary",
14
14
  info: "border-info bg-info/7 [&>h5>svg]:text-info",
@@ -0,0 +1,32 @@
1
+ ---
2
+ import type { HTMLTag, Polymorphic } from "astro/types";
3
+ import { tv } from "tailwind-variants";
4
+
5
+ type Props<Tag extends HTMLTag> = Polymorphic<{ as: Tag }> & {
6
+ /**
7
+ * The aspect ratio of the container (e.g., 16/9, 4/3, 1)
8
+ * @default 1
9
+ */
10
+ ratio?: number;
11
+ };
12
+
13
+ export const aspectRatioWrapper = tv({
14
+ base: "relative w-full",
15
+ });
16
+
17
+ export const aspectRatio = tv({
18
+ base: "absolute inset-0",
19
+ });
20
+
21
+ const { ratio = 1, class: className, as: Tag = "div", ...rest } = Astro.props;
22
+ ---
23
+
24
+ <div
25
+ class={aspectRatioWrapper()}
26
+ style={`padding-bottom: ${100 / ratio}%`}
27
+ data-slot="aspect-ratio-wrapper"
28
+ >
29
+ <Tag class={aspectRatio({ class: className })} data-slot="aspect-ratio" {...rest}>
30
+ <slot />
31
+ </Tag>
32
+ </div>
@@ -0,0 +1,7 @@
1
+ import AspectRatio, { aspectRatio, aspectRatioWrapper } from "./AspectRatio.astro";
2
+
3
+ const AspectRatioVariants = { aspectRatio, aspectRatioWrapper };
4
+
5
+ export { AspectRatio, AspectRatioVariants };
6
+
7
+ export default AspectRatio;
@@ -8,18 +8,21 @@ interface Props
8
8
  VariantProps<typeof badge> {}
9
9
 
10
10
  export const badge = tv({
11
- base: "starwind-badge starwind-transition-colors inline-flex items-center rounded-full font-semibold focus-visible:outline-2 focus-visible:outline-offset-2",
11
+ base: [
12
+ "starwind-badge inline-flex items-center rounded-full font-semibold",
13
+ "transition-all outline-none focus-visible:ring-3",
14
+ ],
12
15
  variants: {
13
16
  variant: {
14
- default: "bg-foreground text-background",
15
- primary: "bg-primary text-primary-foreground focus-visible:outline-primary",
16
- secondary: "bg-secondary text-secondary-foreground focus-visible:outline-secondary",
17
- outline: "border-border focus-visible:outline-outline border",
18
- ghost: "bg-foreground/10 text-foreground focus-visible:outline-outline",
19
- info: "bg-info text-info-foreground focus-visible:outline-info",
20
- success: "bg-success text-success-foreground focus-visible:outline-success",
21
- warning: "bg-warning text-warning-foreground focus-visible:outline-warning",
22
- error: "bg-error text-error-foreground focus-visible:outline-error",
17
+ default: "bg-foreground text-background focus-visible:ring-outline/50",
18
+ primary: "bg-primary text-primary-foreground focus-visible:ring-primary/50",
19
+ secondary: "bg-secondary text-secondary-foreground focus-visible:ring-secondary/50",
20
+ outline: "border-border focus-visible:border-outline focus-visible:ring-outline/50 border",
21
+ ghost: "bg-foreground/10 text-foreground focus-visible:ring-outline/50",
22
+ info: "bg-info text-info-foreground focus-visible:ring-info/50",
23
+ success: "bg-success text-success-foreground focus-visible:ring-success/50",
24
+ warning: "bg-warning text-warning-foreground focus-visible:ring-warning/50",
25
+ error: "bg-error text-error-foreground focus-visible:ring-error/50",
23
26
  },
24
27
  size: { sm: "px-2.5 py-0.5 text-xs", md: "px-3 py-0.5 text-sm", lg: "px-4 py-1 text-base" },
25
28
  isLink: { true: "cursor-pointer", false: "" },
@@ -13,33 +13,33 @@ export const button = tv({
13
13
  base: [
14
14
  "inline-flex items-center justify-center gap-1.5 rounded-md font-medium whitespace-nowrap",
15
15
  "[&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
16
- "starwind-transition-colors",
17
- "focus-visible:outline-2 focus-visible:outline-offset-2",
16
+ "transition-all outline-none focus-visible:ring-3",
18
17
  "disabled:pointer-events-none disabled:opacity-50",
19
18
  ],
20
19
  variants: {
21
20
  variant: {
22
- default: "bg-foreground text-background hover:bg-foreground/90 focus-visible:outline-outline",
21
+ default: "bg-foreground text-background hover:bg-foreground/90 focus-visible:ring-outline/50",
23
22
  primary:
24
- "bg-primary text-primary-foreground hover:bg-primary/90 focus-visible:outline-primary",
23
+ "bg-primary text-primary-foreground hover:bg-primary/90 focus-visible:ring-primary/50",
25
24
  secondary:
26
- "bg-secondary text-secondary-foreground hover:bg-secondary/90 focus-visible:outline-secondary",
25
+ "bg-secondary text-secondary-foreground hover:bg-secondary/90 focus-visible:ring-secondary/50",
27
26
  outline:
28
- "border-border hover:bg-border hover:text-foreground focus-visible:outline-outline border",
29
- ghost:
30
- "hover:bg-foreground/10 hover:text-foreground focus-visible:outline-outline bg-transparent",
31
- info: "bg-info text-info-foreground hover:bg-info/90 focus-visible:outline-info",
27
+ "dark:border-input focus-visible:ring-outline/50 bg-background dark:bg-input/30 focus-visible:border-outline hover:bg-muted dark:hover:bg-input/50 hover:text-foreground border shadow-xs",
28
+ ghost: "hover:bg-muted hover:text-foreground focus-visible:ring-outline/50",
29
+ info: "bg-info text-info-foreground hover:bg-info/90 focus-visible:ring-info/50",
32
30
  success:
33
- "bg-success text-success-foreground hover:bg-success/90 focus-visible:outline-success",
31
+ "bg-success text-success-foreground hover:bg-success/90 focus-visible:ring-success/50",
34
32
  warning:
35
- "bg-warning text-warning-foreground hover:bg-warning/90 focus-visible:outline-warning",
36
- error: "bg-error text-error-foreground hover:bg-error/90 focus-visible:outline-error",
33
+ "bg-warning text-warning-foreground hover:bg-warning/90 focus-visible:ring-warning/50",
34
+ error: "bg-error text-error-foreground hover:bg-error/90 focus-visible:ring-error/50",
37
35
  },
38
36
  size: {
39
37
  sm: "h-9 px-3 py-2 text-sm",
40
38
  md: "h-11 px-4 py-2 text-base",
41
39
  lg: "h-12 px-8 py-2 text-lg",
42
- icon: "h-11 w-11",
40
+ icon: "size-11",
41
+ "icon-sm": "size-9",
42
+ "icon-lg": "size-12",
43
43
  },
44
44
  },
45
45
  defaultVariants: { variant: "default", size: "md" },
@@ -4,7 +4,7 @@ import { tv } from "tailwind-variants";
4
4
 
5
5
  type Props = HTMLAttributes<"div">;
6
6
 
7
- export const cardTitle = tv({ base: "text-3xl leading-none font-semibold tracking-tight" });
7
+ export const cardTitle = tv({ base: "text-xl leading-none font-semibold tracking-tight" });
8
8
 
9
9
  const { class: className, ...rest } = Astro.props;
10
10
  ---
@@ -15,8 +15,8 @@ export const checkbox = tv({
15
15
  slots: {
16
16
  base: "starwind-checkbox relative flex items-center space-x-2",
17
17
  input: [
18
- "peer border-input bg-background starwind-transition-colors shrink-0 transform-gpu rounded-sm border",
19
- "focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:transition-none",
18
+ "peer border-input bg-background dark:bg-input/30 shrink-0 transform-gpu rounded-sm border",
19
+ "transition-all focus-visible:ring-3",
20
20
  "outline-0 focus:ring-0 focus:ring-offset-0",
21
21
  "not-disabled:cursor-pointer disabled:cursor-not-allowed disabled:opacity-50",
22
22
  ],
@@ -35,28 +35,37 @@ export const checkbox = tv({
35
35
  },
36
36
  variant: {
37
37
  default: {
38
- input: "checked:bg-foreground focus-visible:outline-outline",
38
+ input: "checked:bg-foreground focus-visible:ring-outline/50 focus-visible:border-outline",
39
39
  icon: "text-background",
40
40
  },
41
41
  primary: {
42
- input: "checked:bg-primary focus-visible:outline-primary",
42
+ input:
43
+ "checked:bg-primary checked:border-primary focus-visible:ring-primary/50 focus-visible:border-primary",
43
44
  icon: "text-primary-foreground",
44
45
  },
45
46
  secondary: {
46
- input: "checked:bg-secondary focus-visible:outline-secondary",
47
+ input:
48
+ "checked:bg-secondary checked:border-secondary focus-visible:ring-secondary/50 focus-visible:border-secondary",
47
49
  icon: "text-secondary-foreground",
48
50
  },
49
- info: { input: "checked:bg-info focus-visible:outline-info", icon: "text-info-foreground" },
51
+ info: {
52
+ input:
53
+ "checked:bg-info checked:border-info focus-visible:ring-info/50 focus-visible:border-info",
54
+ icon: "text-info-foreground",
55
+ },
50
56
  success: {
51
- input: "checked:bg-success focus-visible:outline-success",
57
+ input:
58
+ "checked:bg-success checked:border-success focus-visible:ring-success/50 focus-visible:border-success",
52
59
  icon: "text-success-foreground",
53
60
  },
54
61
  warning: {
55
- input: "checked:bg-warning focus-visible:outline-warning",
62
+ input:
63
+ "checked:bg-warning checked:border-warning focus-visible:ring-warning/50 focus-visible:border-warning",
56
64
  icon: "text-warning-foreground",
57
65
  },
58
66
  error: {
59
- input: "checked:bg-error focus-visible:outline-error",
67
+ input:
68
+ "checked:bg-error checked:border-error focus-visible:ring-error/50 focus-visible:border-error",
60
69
  icon: "text-error-foreground",
61
70
  },
62
71
  },
@@ -31,8 +31,8 @@ export const dialogContent = tv({
31
31
  export const dialogCloseButton = tv({
32
32
  base: [
33
33
  "starwind-dialog-close text-muted-foreground",
34
- "absolute top-5.5 right-5.5 rounded-sm opacity-70 transition-opacity hover:opacity-100 disabled:pointer-events-none",
35
- "focus-visible:outline-outline focus-visible:outline-2 focus-visible:outline-offset-2",
34
+ "absolute top-5.5 right-5.5 rounded-sm [&>svg]:opacity-70 hover:[&>svg]:opacity-100",
35
+ "focus-visible:ring-outline/50 transition-[color,box-shadow] outline-none focus-visible:ring-3",
36
36
  ],
37
37
  });
38
38
 
@@ -57,7 +57,7 @@ const { class: className, animationDuration = 200, ...rest } = Astro.props;
57
57
  >
58
58
  <slot />
59
59
  <button type="button" class={dialogCloseButton()} data-dialog-close aria-label="Close dialog">
60
- <X class="size-5" />
60
+ <X class="size-5 transition-opacity" />
61
61
  <span class="sr-only">Close</span>
62
62
  </button>
63
63
  </dialog>
@@ -10,7 +10,7 @@ type Props = Omit<HTMLAttributes<"h2">, "id"> & {
10
10
  children: any;
11
11
  };
12
12
 
13
- export const dialogTitle = tv({ base: "text-2xl leading-none font-semibold tracking-tight" });
13
+ export const dialogTitle = tv({ base: "text-xl leading-none font-semibold tracking-tight" });
14
14
 
15
15
  const { class: className, ...rest } = Astro.props;
16
16
  ---
@@ -5,7 +5,7 @@ import { tv } from "tailwind-variants";
5
5
  type Props = HTMLAttributes<"div">;
6
6
 
7
7
  export const dropdownSeparator = tv({
8
- base: "bg-muted -mx-1 my-1 h-px",
8
+ base: "bg-border -mx-1 my-1 h-px",
9
9
  });
10
10
 
11
11
  const { class: className, ...rest } = Astro.props;
@@ -13,7 +13,8 @@ export const dropdownTrigger = tv({
13
13
  base: [
14
14
  "starwind-dropdown-trigger",
15
15
  "inline-flex items-center justify-center",
16
- "focus-visible:ring-ring focus-visible:ring-2 focus-visible:outline-none",
16
+ "focus-visible:ring-outline/50 transition-[color,box-shadow] outline-none focus-visible:ring-3",
17
+ "disabled:pointer-events-none",
17
18
  ],
18
19
  });
19
20
 
@@ -19,10 +19,10 @@ const { class: className, id, isUploading = false, ...rest } = Astro.props as Pr
19
19
  export const dropzone = tv({
20
20
  base: [
21
21
  "starwind-dropzone",
22
- "relative flex w-full flex-col items-center justify-center gap-1 rounded-lg px-6 py-12",
23
- "bg-background text-muted-foreground border-input cursor-pointer border border-dashed text-center text-sm",
24
- "starwind-transition-colors data-[is-uploading=false]:hover:bg-muted/50 data-[drag-active=true]:bg-muted/50",
25
- "focus-visible:outline-outline focus-visible:ring-0 focus-visible:outline-2 focus-visible:outline-offset-2",
22
+ "relative flex w-full flex-col items-center justify-center gap-1 rounded-lg px-6 py-12 shadow-xs",
23
+ "bg-background dark:bg-input/30 text-muted-foreground border-input cursor-pointer border border-dashed text-center text-sm",
24
+ "data-[is-uploading=false]:hover:bg-muted/50 data-[drag-active=true]:bg-muted/50 transition",
25
+ "focus-visible:border-outline focus-visible:ring-outline/50 outline-none focus-visible:ring-3",
26
26
  ],
27
27
  });
28
28
  ---
@@ -6,8 +6,8 @@ type Props = HTMLAttributes<"input"> & VariantProps<typeof input>;
6
6
 
7
7
  export const input = tv({
8
8
  base: [
9
- "border-input bg-background text-foreground w-full rounded-md border",
10
- "focus:outline-outline focus:ring-0 focus:outline-2 focus:outline-offset-2",
9
+ "border-input dark:bg-input/30 text-foreground w-full rounded-md border bg-transparent shadow-xs",
10
+ "focus-visible:border-outline focus-visible:ring-outline/50 transition-[color,box-shadow] focus-visible:ring-3",
11
11
  "file:text-foreground file:my-auto file:mr-4 file:h-full file:border-0 file:bg-transparent file:text-sm file:font-medium",
12
12
  "disabled:cursor-not-allowed disabled:opacity-50",
13
13
  "peer placeholder:text-muted-foreground",
@@ -0,0 +1,52 @@
1
+ ---
2
+ import type { HTMLTag, Polymorphic } from "astro/types";
3
+ import { tv } from "tailwind-variants";
4
+
5
+ type Props<Tag extends HTMLTag> = Polymorphic<{ as: Tag }> & {
6
+ /**
7
+ * Variant of the item
8
+ * @default "default"
9
+ */
10
+ variant?: "default" | "outline" | "muted";
11
+ /**
12
+ * Size of the item
13
+ * @default "default"
14
+ */
15
+ size?: "default" | "sm";
16
+ };
17
+
18
+ export const item = tv({
19
+ base: [
20
+ "group/item flex flex-wrap items-center rounded-md border border-transparent text-sm transition-colors",
21
+ "[a]:hover:bg-accent/50 [a]:transition-colors",
22
+ "focus-visible:border-ring focus-visible:ring-outline/50 outline-none focus-visible:ring-[3px]",
23
+ ],
24
+ variants: {
25
+ variant: {
26
+ default: "bg-transparent",
27
+ outline: "border-border",
28
+ muted: "bg-muted/50",
29
+ },
30
+ size: {
31
+ default: "gap-4 p-4",
32
+ sm: "gap-2.5 px-4 py-3",
33
+ },
34
+ },
35
+ defaultVariants: {
36
+ variant: "default",
37
+ size: "default",
38
+ },
39
+ });
40
+
41
+ const {
42
+ variant = "default",
43
+ size = "default",
44
+ class: className,
45
+ as: Tag = "div",
46
+ ...rest
47
+ } = Astro.props;
48
+ ---
49
+
50
+ <Tag class={item({ variant, size, class: className })} data-slot="item" {...rest}>
51
+ <slot />
52
+ </Tag>
@@ -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 itemActions = tv({
8
+ base: "flex items-center gap-2",
9
+ });
10
+
11
+ const { class: className, ...rest } = Astro.props;
12
+ ---
13
+
14
+ <div class={itemActions({ class: className })} data-slot="item-actions" {...rest}>
15
+ <slot />
16
+ </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 itemContent = tv({
8
+ base: "flex flex-1 flex-col gap-1.5 [&+[data-slot=item-content]]:flex-none",
9
+ });
10
+
11
+ const { class: className, ...rest } = Astro.props;
12
+ ---
13
+
14
+ <div class={itemContent({ class: className })} data-slot="item-content" {...rest}>
15
+ <slot />
16
+ </div>
@@ -0,0 +1,19 @@
1
+ ---
2
+ import type { HTMLAttributes } from "astro/types";
3
+ import { tv } from "tailwind-variants";
4
+
5
+ type Props = HTMLAttributes<"p">;
6
+
7
+ export const itemDescription = tv({
8
+ base: [
9
+ "text-muted-foreground line-clamp-2 leading-snug font-normal text-balance",
10
+ "[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4",
11
+ ],
12
+ });
13
+
14
+ const { class: className, ...rest } = Astro.props;
15
+ ---
16
+
17
+ <p class={itemDescription({ class: className })} data-slot="item-description" {...rest}>
18
+ <slot />
19
+ </p>
@@ -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 itemFooter = tv({
8
+ base: "flex basis-full items-center justify-between gap-2",
9
+ });
10
+
11
+ const { class: className, ...rest } = Astro.props;
12
+ ---
13
+
14
+ <div class={itemFooter({ class: className })} data-slot="item-footer" {...rest}>
15
+ <slot />
16
+ </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 itemGroup = tv({
8
+ base: "group/item-group flex flex-col",
9
+ });
10
+
11
+ const { class: className, ...rest } = Astro.props;
12
+ ---
13
+
14
+ <div role="list" class={itemGroup({ class: className })} data-slot="item-group" {...rest}>
15
+ <slot />
16
+ </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 itemHeader = tv({
8
+ base: "flex basis-full items-center justify-between gap-2",
9
+ });
10
+
11
+ const { class: className, ...rest } = Astro.props;
12
+ ---
13
+
14
+ <div class={itemHeader({ class: className })} data-slot="item-header" {...rest}>
15
+ <slot />
16
+ </div>
@@ -0,0 +1,40 @@
1
+ ---
2
+ import type { HTMLAttributes } from "astro/types";
3
+ import { tv } from "tailwind-variants";
4
+
5
+ type Props = HTMLAttributes<"div"> & {
6
+ /**
7
+ * Variant of the item media
8
+ * @default "default"
9
+ */
10
+ variant?: "default" | "icon" | "image";
11
+ };
12
+
13
+ export const itemMedia = tv({
14
+ base: [
15
+ "flex shrink-0 items-center justify-center gap-2 [&_svg]:pointer-events-none",
16
+ "group-has-[[data-slot=item-description]]/item:translate-y-0.5 group-has-[[data-slot=item-description]]/item:self-start",
17
+ ],
18
+ variants: {
19
+ variant: {
20
+ default: "bg-transparent",
21
+ icon: "bg-muted size-8 rounded-sm border [&_svg:not([class*='size-'])]:size-4",
22
+ image: "size-10 overflow-hidden rounded-sm [&_img]:size-full [&_img]:object-cover",
23
+ },
24
+ },
25
+ defaultVariants: {
26
+ variant: "default",
27
+ },
28
+ });
29
+
30
+ const { variant = "default", class: className, ...rest } = Astro.props;
31
+ ---
32
+
33
+ <div
34
+ class={itemMedia({ variant, class: className })}
35
+ data-slot="item-media"
36
+ data-variant={variant}
37
+ {...rest}
38
+ >
39
+ <slot />
40
+ </div>
@@ -0,0 +1,21 @@
1
+ ---
2
+ import type { ComponentProps } from "astro/types";
3
+ import { tv } from "tailwind-variants";
4
+
5
+ import { Separator } from "@/components/starwind/separator";
6
+
7
+ type Props = ComponentProps<typeof Separator>;
8
+
9
+ export const itemSeparator = tv({
10
+ base: "my-0",
11
+ });
12
+
13
+ const { class: className, orientation = "horizontal", ...rest } = Astro.props;
14
+ ---
15
+
16
+ <Separator
17
+ orientation={orientation}
18
+ class={itemSeparator({ class: className })}
19
+ data-slot="item-separator"
20
+ {...rest}
21
+ />
@@ -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 itemTitle = tv({
8
+ base: "flex w-fit items-center gap-2 leading-snug font-medium",
9
+ });
10
+
11
+ const { class: className, ...rest } = Astro.props;
12
+ ---
13
+
14
+ <div class={itemTitle({ class: className })} data-slot="item-title" {...rest}>
15
+ <slot />
16
+ </div>
@@ -0,0 +1,50 @@
1
+ import Item, { item } from "./Item.astro";
2
+ import ItemActions, { itemActions } from "./ItemActions.astro";
3
+ import ItemContent, { itemContent } from "./ItemContent.astro";
4
+ import ItemDescription, { itemDescription } from "./ItemDescription.astro";
5
+ import ItemFooter, { itemFooter } from "./ItemFooter.astro";
6
+ import ItemGroup, { itemGroup } from "./ItemGroup.astro";
7
+ import ItemHeader, { itemHeader } from "./ItemHeader.astro";
8
+ import ItemMedia, { itemMedia } from "./ItemMedia.astro";
9
+ import ItemSeparator, { itemSeparator } from "./ItemSeparator.astro";
10
+ import ItemTitle, { itemTitle } from "./ItemTitle.astro";
11
+
12
+ const ItemVariants = {
13
+ item,
14
+ itemActions,
15
+ itemContent,
16
+ itemDescription,
17
+ itemFooter,
18
+ itemGroup,
19
+ itemHeader,
20
+ itemMedia,
21
+ itemSeparator,
22
+ itemTitle,
23
+ };
24
+
25
+ export {
26
+ Item,
27
+ ItemActions,
28
+ ItemContent,
29
+ ItemDescription,
30
+ ItemFooter,
31
+ ItemGroup,
32
+ ItemHeader,
33
+ ItemMedia,
34
+ ItemSeparator,
35
+ ItemTitle,
36
+ ItemVariants,
37
+ };
38
+
39
+ export default {
40
+ Root: Item,
41
+ Actions: ItemActions,
42
+ Content: ItemContent,
43
+ Description: ItemDescription,
44
+ Footer: ItemFooter,
45
+ Group: ItemGroup,
46
+ Header: ItemHeader,
47
+ Media: ItemMedia,
48
+ Separator: ItemSeparator,
49
+ Title: ItemTitle,
50
+ };
@@ -1,42 +1,22 @@
1
1
  ---
2
2
  import type { HTMLAttributes } from "astro/types";
3
- import { tv } from "tailwind-variants";
3
+ import type { VariantProps } from "tailwind-variants";
4
4
 
5
- interface Props extends HTMLAttributes<"a"> {
6
- isActive?: boolean;
7
- size?: "sm" | "md" | "lg" | "icon";
8
- }
5
+ import { ButtonVariants } from "@/components/starwind/button";
9
6
 
10
- export const paginationLink = tv({
11
- base: [
12
- "inline-flex items-center justify-center gap-1.5 rounded-md font-medium whitespace-nowrap",
13
- "[&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
14
- "starwind-transition-colors",
15
- "focus-visible:outline-2 focus-visible:outline-offset-2",
16
- "disabled:pointer-events-none disabled:opacity-50",
17
- ],
18
- variants: {
19
- isActive: {
20
- true: "border-border hover:bg-border hover:text-foreground focus-visible:outline-outline border",
21
- false:
22
- "hover:bg-foreground/10 hover:text-foreground focus-visible:outline-outline bg-transparent",
23
- },
24
- size: {
25
- sm: "h-9 px-3 py-2 text-sm",
26
- md: "h-11 px-4 py-2 text-base",
27
- lg: "h-12 px-8 py-2 text-lg",
28
- icon: "h-11 w-11",
29
- },
30
- },
31
- defaultVariants: { isActive: false, size: "icon" },
32
- });
7
+ type Props = HTMLAttributes<"a"> &
8
+ Omit<VariantProps<typeof ButtonVariants.button>, "variant"> & {
9
+ isActive?: boolean;
10
+ };
11
+
12
+ export const paginationLink = ButtonVariants.button;
33
13
 
34
14
  const { class: className, isActive, size = "icon", ...rest } = Astro.props;
35
15
  ---
36
16
 
37
17
  <a
38
18
  aria-current={isActive ? "page" : undefined}
39
- class={paginationLink({ isActive, size, class: className })}
19
+ class={ButtonVariants.button({ variant: isActive ? "outline" : "ghost", size, class: className })}
40
20
  data-slot="pagination-link"
41
21
  {...rest}
42
22
  >
@@ -24,7 +24,7 @@ const valuePercent = isIndeterminate ? undefined : Math.round((value / max) * 10
24
24
  const valueText = isIndeterminate ? undefined : `${valuePercent}%`;
25
25
 
26
26
  export const progress = tv({
27
- base: ["starwind-progress-bar", "bg-accent h-2 w-full overflow-hidden rounded-full"],
27
+ base: ["starwind-progress-bar", "bg-muted h-2 w-full overflow-hidden rounded-full"],
28
28
  variants: {
29
29
  variant: {
30
30
  indeterminate: "relative",
@@ -53,27 +53,28 @@ export const radioItem = tv({
53
53
  export const radioControl = tv({
54
54
  base: [
55
55
  "starwind-radio-control",
56
- "border-input bg-background",
56
+ "border-input bg-background dark:bg-input/30",
57
57
  "peer-focus-visible:outline-2 peer-focus-visible:outline-offset-1 peer-focus-visible:transition-none",
58
+ "outline-none peer-focus-visible:ring-3",
58
59
  "absolute inset-0 rounded-full border shadow-xs",
59
- "starwind-transition-colors peer-checked:[&>svg]:opacity-100",
60
+ "transition-all peer-checked:[&>svg]:opacity-100",
60
61
  "peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
61
62
  "flex items-center justify-center",
62
63
  ],
63
64
  variants: {
64
65
  variant: {
65
66
  default:
66
- "peer-checked:border-foreground [&>svg]:fill-foreground peer-focus-visible:outline-outline",
67
+ "peer-checked:border-foreground [&>svg]:fill-foreground peer-focus-visible:ring-outline/50",
67
68
  primary:
68
- "peer-checked:border-primary [&>svg]:fill-primary peer-focus-visible:outline-primary",
69
+ "peer-checked:border-primary [&>svg]:fill-primary peer-focus-visible:ring-primary/50",
69
70
  secondary:
70
- "peer-checked:border-secondary [&>svg]:fill-secondary peer-focus-visible:outline-secondary",
71
- info: "peer-checked:border-info [&>svg]:fill-info peer-focus-visible:outline-info",
71
+ "peer-checked:border-secondary [&>svg]:fill-secondary peer-focus-visible:ring-secondary/50",
72
+ info: "peer-checked:border-info [&>svg]:fill-info peer-focus-visible:ring-info/50",
72
73
  success:
73
- "peer-checked:border-success [&>svg]:fill-success peer-focus-visible:outline-success",
74
+ "peer-checked:border-success [&>svg]:fill-success peer-focus-visible:ring-success/50",
74
75
  warning:
75
- "peer-checked:border-warning [&>svg]:fill-warning peer-focus-visible:outline-warning",
76
- error: "peer-checked:border-error [&>svg]:fill-error peer-focus-visible:outline-error",
76
+ "peer-checked:border-warning [&>svg]:fill-warning peer-focus-visible:ring-warning/50",
77
+ error: "peer-checked:border-error [&>svg]:fill-error peer-focus-visible:ring-error/50",
77
78
  },
78
79
  },
79
80
  defaultVariants: {
@@ -4,7 +4,7 @@ import { tv } from "tailwind-variants";
4
4
 
5
5
  type Props = HTMLAttributes<"div">;
6
6
 
7
- export const selectLabel = tv({ base: "py-1.5 pr-2 pl-8 font-semibold" });
7
+ export const selectLabel = tv({ base: "text-muted-foreground py-1.5 pr-2 pl-8 text-sm" });
8
8
 
9
9
  const { class: className, ...rest } = Astro.props;
10
10
  ---
@@ -18,8 +18,8 @@ type Props = Omit<HTMLAttributes<"button">, "role" | "type"> & {
18
18
  export const selectTrigger = tv({
19
19
  base: [
20
20
  "starwind-select-trigger",
21
- "border-input bg-background text-foreground ring-offset-background flex h-11 items-center justify-between rounded-md border px-3 py-2",
22
- "focus:outline-outline focus:outline-2 focus:outline-offset-2",
21
+ "border-input dark:bg-input/30 text-foreground ring-offset-background flex h-11 items-center justify-between rounded-md border bg-transparent px-3 py-2 shadow-xs",
22
+ "focus-visible:border-outline focus-visible:ring-outline/50 transition-[color,box-shadow] outline-none focus-visible:ring-3",
23
23
  "disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
24
24
  ],
25
25
  });
@@ -0,0 +1,36 @@
1
+ ---
2
+ import type { HTMLAttributes } from "astro/types";
3
+ import { tv } from "tailwind-variants";
4
+
5
+ type Props = Omit<HTMLAttributes<"div">, "role" | "aria-orientation"> & {
6
+ /**
7
+ * The orientation of the separator.
8
+ * @default "horizontal"
9
+ */
10
+ orientation?: "horizontal" | "vertical";
11
+ };
12
+
13
+ export const separator = tv({
14
+ base: "bg-border shrink-0",
15
+ variants: {
16
+ orientation: {
17
+ horizontal: "h-[1px] w-full",
18
+ vertical: "h-full w-[1px]",
19
+ },
20
+ },
21
+ defaultVariants: {
22
+ orientation: "horizontal",
23
+ },
24
+ });
25
+
26
+ const { class: className, orientation = "horizontal", ...rest } = Astro.props;
27
+ ---
28
+
29
+ <div
30
+ role="separator"
31
+ aria-orientation={orientation}
32
+ class={separator({ orientation, class: className })}
33
+ data-slot="separator"
34
+ {...rest}
35
+ >
36
+ </div>
@@ -0,0 +1,7 @@
1
+ import Separator, { separator } from "./Separator.astro";
2
+
3
+ const SeparatorVariants = { separator };
4
+
5
+ export { Separator, SeparatorVariants };
6
+
7
+ export default Separator;
@@ -56,10 +56,8 @@ export const sheetContent = tv({
56
56
  export const sheetCloseButton = tv({
57
57
  base: [
58
58
  "starwind-dialog-close",
59
- "ring-offset-background focus:ring-ring data-[state=open]:bg-secondary",
60
- "absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100",
61
- "focus-visible:outline-outline focus-visible:outline-2 focus-visible:outline-offset-2",
62
- "disabled:pointer-events-none",
59
+ "absolute top-4 right-4 rounded-xs [&>svg]:opacity-70 hover:[&>svg]:opacity-100",
60
+ "focus-visible:ring-outline/50 transition-[color,box-shadow] outline-none focus-visible:ring-3",
63
61
  ],
64
62
  });
65
63
  ---
@@ -84,7 +82,7 @@ export const sheetCloseButton = tv({
84
82
  data-slot="sheet-close"
85
83
  aria-label="Close dialog"
86
84
  >
87
- <X class="size-5" />
85
+ <X class="size-5 transition-opacity" />
88
86
  <span class="sr-only">Close</span>
89
87
  </button>
90
88
  </dialog>
@@ -7,7 +7,7 @@ type Props = HTMLAttributes<"div">;
7
7
  const { class: className, ...rest } = Astro.props;
8
8
 
9
9
  export const skeleton = tv({
10
- base: "bg-accent animate-pulse rounded-md",
10
+ base: "bg-muted animate-pulse rounded-md",
11
11
  });
12
12
  ---
13
13
 
@@ -0,0 +1,21 @@
1
+ ---
2
+ import Loader2 from "@tabler/icons/outline/loader-2.svg";
3
+ import type { HTMLAttributes } from "astro/types";
4
+ import { tv } from "tailwind-variants";
5
+
6
+ type Props = Omit<HTMLAttributes<"svg">, "role" | "aria-label">;
7
+
8
+ export const spinner = tv({
9
+ base: "size-4 animate-spin",
10
+ });
11
+
12
+ const { class: className, ...rest } = Astro.props;
13
+ ---
14
+
15
+ <Loader2
16
+ role="status"
17
+ aria-label="Loading"
18
+ class={spinner({ class: className })}
19
+ data-slot="spinner"
20
+ {...rest}
21
+ />
@@ -0,0 +1,7 @@
1
+ import Spinner, { spinner } from "./Spinner.astro";
2
+
3
+ const SpinnerVariants = { spinner };
4
+
5
+ export { Spinner, SpinnerVariants };
6
+
7
+ export default Spinner;
@@ -61,19 +61,20 @@ if (rest["aria-label"]) {
61
61
 
62
62
  export const switchButton = tv({
63
63
  base: [
64
- "starwind-transition-colors border-input bg-muted inline-flex h-(--height) w-(--width) items-center rounded-full border",
65
- "group peer ring-offset-background focus-visible:outline-2 focus-visible:outline-offset-2",
64
+ "border-input bg-muted inline-flex h-(--height) w-(--width) items-center rounded-full border",
65
+ "group peer ring-offset-background transition outline-none focus-visible:ring-3",
66
66
  "not-disabled:cursor-pointer disabled:cursor-not-allowed disabled:opacity-50",
67
67
  ],
68
68
  variants: {
69
69
  variant: {
70
- primary: "aria-checked:border-primary focus:outline-primary",
71
- secondary: "aria-checked:border-secondary focus:outline-secondary",
72
- default: "aria-checked:border-foreground focus:outline-outline",
73
- info: "aria-checked:border-info focus:outline-info",
74
- success: "aria-checked:border-success focus:outline-success",
75
- warning: "aria-checked:border-warning focus:outline-warning",
76
- error: "aria-checked:border-error focus:outline-error",
70
+ primary: "aria-checked:border-primary focus-visible:border-primary/70 focus:ring-primary/50",
71
+ secondary:
72
+ "aria-checked:border-secondary focus-visible:border-secondary/70 focus:ring-secondary/50",
73
+ default: "aria-checked:border-foreground focus-visible:border-outline focus:ring-outline/50",
74
+ info: "aria-checked:border-info focus-visible:border-info/70 focus:ring-info/50",
75
+ success: "aria-checked:border-success focus-visible:border-success/70 focus:ring-success/50",
76
+ warning: "aria-checked:border-warning focus-visible:border-warning/70 focus:ring-warning/50",
77
+ error: "aria-checked:border-error focus-visible:border-error/70 focus:ring-error/50",
77
78
  },
78
79
  },
79
80
  defaultVariants: { variant: "default" },
@@ -5,7 +5,7 @@ import { tv } from "tailwind-variants";
5
5
  type Props = Omit<HTMLAttributes<"div">, "role">;
6
6
 
7
7
  export const tabsList = tv({
8
- base: "bg-muted text-muted-foreground inline-flex w-full items-center justify-center rounded-md p-1",
8
+ base: "bg-muted text-muted-foreground inline-flex w-fit items-center justify-center rounded-md p-1",
9
9
  });
10
10
 
11
11
  const { class: className, ...rest } = Astro.props;
@@ -8,9 +8,11 @@ interface Props extends Omit<HTMLAttributes<"button">, "type" | "id" | "role"> {
8
8
 
9
9
  export const tabsTrigger = tv({
10
10
  base: [
11
- "starwind-transition-colors inline-flex grow items-center justify-center rounded-sm px-3 py-1.5 font-medium whitespace-nowrap",
11
+ "inline-flex grow items-center justify-center gap-2 rounded-sm border border-transparent px-3 py-1.5 font-medium whitespace-nowrap transition-[color,box-shadow]",
12
12
  "data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",
13
- "focus-visible:outline-outline focus-visible:outline-2 focus-visible:outline-offset-2",
13
+ "dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 dark:text-muted-foreground",
14
+ "[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
15
+ "focus-visible:border-outline focus-visible:ring-outline/50 focus-visible:outline-outline focus-visible:ring-3 focus-visible:outline-1",
14
16
  "disabled:pointer-events-none disabled:opacity-50",
15
17
  ],
16
18
  });
@@ -6,8 +6,8 @@ type Props = HTMLAttributes<"textarea"> & VariantProps<typeof textarea>;
6
6
 
7
7
  export const textarea = tv({
8
8
  base: [
9
- "border-input bg-background text-foreground ring-offset-background min-h-10 w-full rounded-md border",
10
- "focus:outline-outline focus:ring-0 focus:outline-2 focus:outline-offset-2",
9
+ "border-input dark:bg-input/30 text-foreground ring-offset-background min-h-10 w-full rounded-md border bg-transparent shadow-xs",
10
+ "focus-visible:border-outline focus-visible:ring-outline/50 transition-[color,box-shadow] focus-visible:ring-3",
11
11
  "file:text-foreground file:border-0 file:bg-transparent file:text-sm file:font-medium",
12
12
  "disabled:cursor-not-allowed disabled:opacity-50",
13
13
  "peer placeholder:text-muted-foreground",
@@ -1,4 +1,5 @@
1
1
  ---
2
+ import CaretUp from "@tabler/icons/filled/caret-up.svg";
2
3
  import type { HTMLAttributes } from "astro/types";
3
4
  import { tv } from "tailwind-variants";
4
5
 
@@ -15,7 +16,7 @@ type Props = HTMLAttributes<"div"> & {
15
16
  align?: "start" | "center" | "end";
16
17
  /**
17
18
  * Offset distance in pixels
18
- * @default 4
19
+ * @default 8
19
20
  */
20
21
  sideOffset?: number;
21
22
  /**
@@ -33,8 +34,8 @@ type Props = HTMLAttributes<"div"> & {
33
34
  export const tooltipContent = tv({
34
35
  base: [
35
36
  "starwind-tooltip-content",
36
- "absolute z-50 hidden px-3 py-1.5 whitespace-nowrap shadow-sm will-change-transform",
37
- "bg-popover text-popover-foreground rounded-md border",
37
+ "absolute z-50 hidden px-3 py-1.5 whitespace-nowrap shadow-xs will-change-transform",
38
+ "bg-foreground text-background rounded-md",
38
39
  "animate-in fade-in zoom-in-95",
39
40
  "data-[state=closed]:animate-out data-[state=closed]:fill-mode-forwards fade-out zoom-out-95",
40
41
  ],
@@ -72,10 +73,23 @@ export const tooltipContent = tv({
72
73
  ],
73
74
  });
74
75
 
76
+ export const tooltipCaret = tv({
77
+ base: ["text-foreground absolute z-50 size-4"],
78
+ variants: {
79
+ side: {
80
+ top: "bottom-0 left-1/2 -translate-x-1/2 translate-y-[calc(50%+1px)] rotate-180",
81
+ bottom: "top-0 left-1/2 -translate-x-1/2 -translate-y-[calc(50%+1px)]",
82
+ left: "top-1/2 right-0 translate-x-[calc(50%+1px)] -translate-y-1/2 rotate-90",
83
+ right: "top-1/2 left-0 -translate-x-[calc(50%+1px)] -translate-y-1/2 -rotate-90",
84
+ },
85
+ },
86
+ defaultVariants: { side: "top" },
87
+ });
88
+
75
89
  const {
76
90
  side = "top",
77
91
  align = "center",
78
- sideOffset = 4,
92
+ sideOffset = 8,
79
93
  avoidCollisions = true,
80
94
  animationDuration = 150,
81
95
  class: className,
@@ -96,4 +110,5 @@ const {
96
110
  }}
97
111
  >
98
112
  <slot> My tooltip! </slot>
113
+ <CaretUp class={tooltipCaret({ side })} />
99
114
  </div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@starwind-ui/core",
3
- "version": "1.9.0",
3
+ "version": "1.10.1",
4
4
  "description": "Starwind UI core components and registry",
5
5
  "license": "MIT",
6
6
  "author": {