@starwind-ui/core 1.6.2 → 1.7.0

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 (101) hide show
  1. package/dist/index.js +4 -0
  2. package/dist/index.js.map +1 -1
  3. package/dist/src/components/accordion/Accordion.astro +224 -224
  4. package/dist/src/components/accordion/AccordionContent.astro +13 -13
  5. package/dist/src/components/accordion/AccordionItem.astro +6 -6
  6. package/dist/src/components/accordion/AccordionTrigger.astro +13 -13
  7. package/dist/src/components/accordion/index.ts +4 -4
  8. package/dist/src/components/alert/Alert.astro +15 -15
  9. package/dist/src/components/alert/AlertDescription.astro +1 -1
  10. package/dist/src/components/alert/AlertTitle.astro +2 -2
  11. package/dist/src/components/alert/index.ts +3 -3
  12. package/dist/src/components/avatar/Avatar.astro +16 -16
  13. package/dist/src/components/avatar/AvatarFallback.astro +3 -3
  14. package/dist/src/components/avatar/AvatarImage.astro +12 -12
  15. package/dist/src/components/avatar/index.ts +4 -4
  16. package/dist/src/components/badge/Badge.astro +33 -33
  17. package/dist/src/components/breadcrumb/Breadcrumb.astro +1 -1
  18. package/dist/src/components/breadcrumb/BreadcrumbEllipsis.astro +6 -6
  19. package/dist/src/components/breadcrumb/BreadcrumbItem.astro +1 -1
  20. package/dist/src/components/breadcrumb/BreadcrumbLink.astro +8 -8
  21. package/dist/src/components/breadcrumb/BreadcrumbList.astro +2 -2
  22. package/dist/src/components/breadcrumb/BreadcrumbPage.astro +6 -6
  23. package/dist/src/components/breadcrumb/BreadcrumbSeparator.astro +7 -7
  24. package/dist/src/components/breadcrumb/index.ts +14 -14
  25. package/dist/src/components/button/Button.astro +38 -38
  26. package/dist/src/components/card/Card.astro +1 -1
  27. package/dist/src/components/card/CardContent.astro +1 -1
  28. package/dist/src/components/card/CardDescription.astro +1 -1
  29. package/dist/src/components/card/CardFooter.astro +1 -1
  30. package/dist/src/components/card/CardHeader.astro +1 -1
  31. package/dist/src/components/card/CardTitle.astro +1 -1
  32. package/dist/src/components/card/index.ts +7 -7
  33. package/dist/src/components/checkbox/Checkbox.astro +89 -89
  34. package/dist/src/components/dialog/Dialog.astro +178 -178
  35. package/dist/src/components/dialog/DialogClose.astro +14 -14
  36. package/dist/src/components/dialog/DialogContent.astro +32 -32
  37. package/dist/src/components/dialog/DialogDescription.astro +1 -1
  38. package/dist/src/components/dialog/DialogFooter.astro +1 -1
  39. package/dist/src/components/dialog/DialogHeader.astro +1 -1
  40. package/dist/src/components/dialog/DialogTitle.astro +6 -6
  41. package/dist/src/components/dialog/DialogTrigger.astro +19 -19
  42. package/dist/src/components/dialog/index.ts +16 -16
  43. package/dist/src/components/dropdown/Dropdown.astro +359 -359
  44. package/dist/src/components/dropdown/DropdownContent.astro +63 -63
  45. package/dist/src/components/dropdown/DropdownItem.astro +31 -31
  46. package/dist/src/components/dropdown/DropdownLabel.astro +14 -14
  47. package/dist/src/components/dropdown/DropdownSeparator.astro +5 -5
  48. package/dist/src/components/dropdown/DropdownTrigger.astro +26 -26
  49. package/dist/src/components/dropdown/index.ts +12 -12
  50. package/dist/src/components/dropzone/Dropzone.astro +232 -0
  51. package/dist/src/components/dropzone/DropzoneFilesList.astro +25 -0
  52. package/dist/src/components/dropzone/DropzoneLoadingIndicator.astro +10 -0
  53. package/dist/src/components/dropzone/DropzoneUploadIndicator.astro +10 -0
  54. package/dist/src/components/dropzone/index.ts +13 -0
  55. package/dist/src/components/input/Input.astro +12 -12
  56. package/dist/src/components/label/Label.astro +8 -8
  57. package/dist/src/components/pagination/Pagination.astro +1 -1
  58. package/dist/src/components/pagination/PaginationContent.astro +3 -3
  59. package/dist/src/components/pagination/PaginationEllipsis.astro +2 -2
  60. package/dist/src/components/pagination/PaginationItem.astro +3 -3
  61. package/dist/src/components/pagination/PaginationLink.astro +27 -27
  62. package/dist/src/components/pagination/PaginationNext.astro +7 -6
  63. package/dist/src/components/pagination/PaginationPrevious.astro +7 -6
  64. package/dist/src/components/pagination/index.ts +14 -14
  65. package/dist/src/components/progress/Progress.astro +151 -0
  66. package/dist/src/components/progress/index.ts +5 -0
  67. package/dist/src/components/radio-group/RadioGroup.astro +156 -0
  68. package/dist/src/components/radio-group/RadioGroupItem.astro +125 -0
  69. package/dist/src/components/radio-group/RadioGroupTypes.ts +6 -0
  70. package/dist/src/components/radio-group/index.ts +10 -0
  71. package/dist/src/components/select/Select.astro +475 -475
  72. package/dist/src/components/select/SelectContent.astro +62 -62
  73. package/dist/src/components/select/SelectItem.astro +27 -27
  74. package/dist/src/components/select/SelectLabel.astro +1 -1
  75. package/dist/src/components/select/SelectTrigger.astro +28 -28
  76. package/dist/src/components/select/SelectTypes.ts +5 -5
  77. package/dist/src/components/select/SelectValue.astro +5 -5
  78. package/dist/src/components/select/index.ts +16 -16
  79. package/dist/src/components/skeleton/Skeleton.astro +14 -0
  80. package/dist/src/components/skeleton/index.ts +5 -0
  81. package/dist/src/components/switch/Switch.astro +150 -150
  82. package/dist/src/components/switch/SwitchTypes.ts +4 -4
  83. package/dist/src/components/table/Table.astro +5 -5
  84. package/dist/src/components/table/TableBody.astro +3 -3
  85. package/dist/src/components/table/TableCaption.astro +3 -3
  86. package/dist/src/components/table/TableCell.astro +3 -3
  87. package/dist/src/components/table/TableFoot.astro +3 -3
  88. package/dist/src/components/table/TableHead.astro +3 -3
  89. package/dist/src/components/table/TableHeader.astro +3 -3
  90. package/dist/src/components/table/TableRow.astro +3 -3
  91. package/dist/src/components/table/index.ts +8 -8
  92. package/dist/src/components/tabs/Tabs.astro +250 -250
  93. package/dist/src/components/tabs/TabsContent.astro +10 -10
  94. package/dist/src/components/tabs/TabsList.astro +2 -2
  95. package/dist/src/components/tabs/TabsTrigger.astro +15 -15
  96. package/dist/src/components/tabs/index.ts +4 -4
  97. package/dist/src/components/textarea/Textarea.astro +16 -16
  98. package/dist/src/components/tooltip/Tooltip.astro +217 -217
  99. package/dist/src/components/tooltip/TooltipContent.astro +81 -81
  100. package/dist/src/components/tooltip/index.ts +3 -3
  101. package/package.json +1 -1
@@ -3,96 +3,96 @@ import type { HTMLAttributes } from "astro/types";
3
3
  import { tv } from "tailwind-variants";
4
4
 
5
5
  type Props = HTMLAttributes<"div"> & {
6
- /**
7
- * Side of the tooltip
8
- * @default top
9
- */
10
- side?: "top" | "right" | "bottom" | "left";
11
- /**
12
- * Alignment of the tooltip
13
- * @default center
14
- */
15
- align?: "start" | "center" | "end";
16
- /**
17
- * Offset distance in pixels
18
- * @default 4
19
- */
20
- sideOffset?: number;
21
- /**
22
- * Prevent the tooltip from colliding with other elements
23
- * @default true
24
- */
25
- avoidCollisions?: boolean;
26
- /**
27
- * Open and close animation duration in milliseconds
28
- * @default 150
29
- */
30
- animationDuration?: number;
6
+ /**
7
+ * Side of the tooltip
8
+ * @default top
9
+ */
10
+ side?: "top" | "right" | "bottom" | "left";
11
+ /**
12
+ * Alignment of the tooltip
13
+ * @default center
14
+ */
15
+ align?: "start" | "center" | "end";
16
+ /**
17
+ * Offset distance in pixels
18
+ * @default 4
19
+ */
20
+ sideOffset?: number;
21
+ /**
22
+ * Prevent the tooltip from colliding with other elements
23
+ * @default true
24
+ */
25
+ avoidCollisions?: boolean;
26
+ /**
27
+ * Open and close animation duration in milliseconds
28
+ * @default 150
29
+ */
30
+ animationDuration?: number;
31
31
  };
32
32
 
33
33
  const tooltipContent = tv({
34
- base: [
35
- "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",
38
- "animate-in fade-in zoom-in-95",
39
- "data-[state=closed]:animate-out data-[state=closed]:fill-mode-forwards fade-out zoom-out-95",
40
- ],
41
- variants: {
42
- side: {
43
- left: "slide-in-from-right-2 right-(--tooltip-offset)",
44
- right: "slide-in-from-left-2 left-(--tooltip-offset)",
45
- bottom: "slide-in-from-top-2 top-(--tooltip-offset)",
46
- top: "slide-in-from-bottom-2 bottom-(--tooltip-offset)",
47
- },
48
- align: { center: "", start: "", end: "" },
49
- sideAlign: {
50
- "top-center": "left-[50%] translate-x-[-50%]",
51
- "bottom-center": "left-[50%] translate-x-[-50%]",
52
- "left-center": "top-[50%] translate-y-[-50%]",
53
- "right-center": "top-[50%] translate-y-[-50%]",
54
- "top-start": "left-0",
55
- "bottom-start": "left-0",
56
- "top-end": "right-0",
57
- "bottom-end": "right-0",
58
- "left-start": "top-0",
59
- "right-start": "top-0",
60
- "left-end": "bottom-0",
61
- "right-end": "bottom-0",
62
- },
63
- },
64
- defaultVariants: { side: "top", align: "center" },
65
- compoundVariants: [
66
- { side: ["top", "bottom"], align: "center", class: "left-[50%] translate-x-[-50%]" },
67
- { side: ["left", "right"], align: "center", class: "top-[50%] translate-y-[-50%]" },
68
- { side: ["top", "bottom"], align: "start", class: "left-0" },
69
- { side: ["top", "bottom"], align: "end", class: "right-0" },
70
- { side: ["left", "right"], align: "start", class: "top-0" },
71
- { side: ["left", "right"], align: "end", class: "bottom-0" },
72
- ],
34
+ base: [
35
+ "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",
38
+ "animate-in fade-in zoom-in-95",
39
+ "data-[state=closed]:animate-out data-[state=closed]:fill-mode-forwards fade-out zoom-out-95",
40
+ ],
41
+ variants: {
42
+ side: {
43
+ left: "slide-in-from-right-2 right-(--tooltip-offset)",
44
+ right: "slide-in-from-left-2 left-(--tooltip-offset)",
45
+ bottom: "slide-in-from-top-2 top-(--tooltip-offset)",
46
+ top: "slide-in-from-bottom-2 bottom-(--tooltip-offset)",
47
+ },
48
+ align: { center: "", start: "", end: "" },
49
+ sideAlign: {
50
+ "top-center": "left-[50%] translate-x-[-50%]",
51
+ "bottom-center": "left-[50%] translate-x-[-50%]",
52
+ "left-center": "top-[50%] translate-y-[-50%]",
53
+ "right-center": "top-[50%] translate-y-[-50%]",
54
+ "top-start": "left-0",
55
+ "bottom-start": "left-0",
56
+ "top-end": "right-0",
57
+ "bottom-end": "right-0",
58
+ "left-start": "top-0",
59
+ "right-start": "top-0",
60
+ "left-end": "bottom-0",
61
+ "right-end": "bottom-0",
62
+ },
63
+ },
64
+ defaultVariants: { side: "top", align: "center" },
65
+ compoundVariants: [
66
+ { side: ["top", "bottom"], align: "center", class: "left-[50%] translate-x-[-50%]" },
67
+ { side: ["left", "right"], align: "center", class: "top-[50%] translate-y-[-50%]" },
68
+ { side: ["top", "bottom"], align: "start", class: "left-0" },
69
+ { side: ["top", "bottom"], align: "end", class: "right-0" },
70
+ { side: ["left", "right"], align: "start", class: "top-0" },
71
+ { side: ["left", "right"], align: "end", class: "bottom-0" },
72
+ ],
73
73
  });
74
74
 
75
75
  const {
76
- side = "top",
77
- align = "center",
78
- sideOffset = 4,
79
- avoidCollisions = true,
80
- animationDuration = 150,
81
- class: className,
76
+ side = "top",
77
+ align = "center",
78
+ sideOffset = 4,
79
+ avoidCollisions = true,
80
+ animationDuration = 150,
81
+ class: className,
82
82
  } = Astro.props;
83
83
  ---
84
84
 
85
85
  <div
86
- class={tooltipContent({ side, align, class: className })}
87
- data-state="closed"
88
- data-side={side}
89
- data-align={align}
90
- {...avoidCollisions && { "data-avoid-collisions": "" }}
91
- role="tooltip"
92
- style={{
93
- "--tooltip-offset": `calc(100% + ${sideOffset}px)`,
94
- animationDuration: `${animationDuration}ms`,
95
- }}
86
+ class={tooltipContent({ side, align, class: className })}
87
+ data-state="closed"
88
+ data-side={side}
89
+ data-align={align}
90
+ {...avoidCollisions && { "data-avoid-collisions": "" }}
91
+ role="tooltip"
92
+ style={{
93
+ "--tooltip-offset": `calc(100% + ${sideOffset}px)`,
94
+ animationDuration: `${animationDuration}ms`,
95
+ }}
96
96
  >
97
- <slot> My tooltip! </slot>
97
+ <slot> My tooltip! </slot>
98
98
  </div>
@@ -5,7 +5,7 @@ import TooltipTrigger from "./TooltipTrigger.astro";
5
5
  export { Tooltip, TooltipContent, TooltipTrigger };
6
6
 
7
7
  export default {
8
- Root: Tooltip,
9
- Trigger: TooltipTrigger,
10
- Content: TooltipContent,
8
+ Root: Tooltip,
9
+ Trigger: TooltipTrigger,
10
+ Content: TooltipContent,
11
11
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@starwind-ui/core",
3
- "version": "1.6.2",
3
+ "version": "1.7.0",
4
4
  "description": "Starwind UI core components and registry",
5
5
  "license": "MIT",
6
6
  "author": {