@starwind-ui/core 1.8.0 → 1.10.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 (151) hide show
  1. package/dist/index.js +50 -23
  2. package/dist/index.js.map +1 -1
  3. package/dist/src/components/accordion/Accordion.astro +8 -2
  4. package/dist/src/components/accordion/AccordionContent.astro +2 -1
  5. package/dist/src/components/accordion/AccordionItem.astro +8 -2
  6. package/dist/src/components/accordion/AccordionTrigger.astro +4 -3
  7. package/dist/src/components/accordion/index.ts +7 -5
  8. package/dist/src/components/alert/Alert.astro +6 -3
  9. package/dist/src/components/alert/AlertDescription.astro +4 -4
  10. package/dist/src/components/alert/AlertTitle.astro +3 -3
  11. package/dist/src/components/alert/index.ts +6 -4
  12. package/dist/src/components/alert-dialog/AlertDialog.astro +273 -0
  13. package/dist/src/components/alert-dialog/AlertDialogAction.astro +44 -0
  14. package/dist/src/components/alert-dialog/AlertDialogCancel.astro +45 -0
  15. package/dist/src/components/alert-dialog/AlertDialogContent.astro +50 -0
  16. package/dist/src/components/alert-dialog/AlertDialogDescription.astro +18 -0
  17. package/dist/src/components/alert-dialog/AlertDialogFooter.astro +16 -0
  18. package/dist/src/components/alert-dialog/AlertDialogHeader.astro +14 -0
  19. package/dist/src/components/alert-dialog/AlertDialogTitle.astro +20 -0
  20. package/dist/src/components/alert-dialog/AlertDialogTrigger.astro +47 -0
  21. package/dist/src/components/alert-dialog/index.ts +46 -0
  22. package/dist/src/components/aspect-ratio/AspectRatio.astro +32 -0
  23. package/dist/src/components/aspect-ratio/index.ts +7 -0
  24. package/dist/src/components/avatar/Avatar.astro +2 -2
  25. package/dist/src/components/avatar/AvatarFallback.astro +2 -2
  26. package/dist/src/components/avatar/AvatarImage.astro +13 -2
  27. package/dist/src/components/avatar/index.ts +6 -4
  28. package/dist/src/components/badge/Badge.astro +15 -12
  29. package/dist/src/components/badge/index.ts +4 -2
  30. package/dist/src/components/breadcrumb/Breadcrumb.astro +1 -1
  31. package/dist/src/components/breadcrumb/BreadcrumbEllipsis.astro +4 -1
  32. package/dist/src/components/breadcrumb/BreadcrumbItem.astro +2 -2
  33. package/dist/src/components/breadcrumb/BreadcrumbLink.astro +2 -2
  34. package/dist/src/components/breadcrumb/BreadcrumbList.astro +2 -2
  35. package/dist/src/components/breadcrumb/BreadcrumbPage.astro +2 -1
  36. package/dist/src/components/breadcrumb/BreadcrumbSeparator.astro +2 -1
  37. package/dist/src/components/breadcrumb/index.ts +16 -6
  38. package/dist/src/components/button/Button.astro +15 -15
  39. package/dist/src/components/button/index.ts +4 -2
  40. package/dist/src/components/card/Card.astro +2 -2
  41. package/dist/src/components/card/CardContent.astro +2 -2
  42. package/dist/src/components/card/CardDescription.astro +2 -2
  43. package/dist/src/components/card/CardFooter.astro +2 -2
  44. package/dist/src/components/card/CardHeader.astro +2 -2
  45. package/dist/src/components/card/CardTitle.astro +2 -2
  46. package/dist/src/components/card/index.ts +16 -7
  47. package/dist/src/components/carousel/Carousel.astro +55 -0
  48. package/dist/src/components/carousel/CarouselContent.astro +26 -0
  49. package/dist/src/components/carousel/CarouselItem.astro +26 -0
  50. package/dist/src/components/carousel/CarouselNext.astro +33 -0
  51. package/dist/src/components/carousel/CarouselPrevious.astro +33 -0
  52. package/dist/src/components/carousel/carousel-script.ts +191 -0
  53. package/dist/src/components/carousel/index.ts +32 -0
  54. package/dist/src/components/checkbox/Checkbox.astro +28 -12
  55. package/dist/src/components/checkbox/index.ts +4 -2
  56. package/dist/src/components/dialog/Dialog.astro +24 -11
  57. package/dist/src/components/dialog/DialogClose.astro +7 -2
  58. package/dist/src/components/dialog/DialogContent.astro +9 -6
  59. package/dist/src/components/dialog/DialogDescription.astro +2 -2
  60. package/dist/src/components/dialog/DialogFooter.astro +2 -2
  61. package/dist/src/components/dialog/DialogHeader.astro +2 -2
  62. package/dist/src/components/dialog/DialogTitle.astro +2 -2
  63. package/dist/src/components/dialog/DialogTrigger.astro +7 -1
  64. package/dist/src/components/dialog/index.ts +20 -5
  65. package/dist/src/components/dropdown/Dropdown.astro +1 -0
  66. package/dist/src/components/dropdown/DropdownContent.astro +2 -1
  67. package/dist/src/components/dropdown/DropdownItem.astro +2 -1
  68. package/dist/src/components/dropdown/DropdownLabel.astro +2 -2
  69. package/dist/src/components/dropdown/DropdownSeparator.astro +3 -2
  70. package/dist/src/components/dropdown/DropdownTrigger.astro +9 -3
  71. package/dist/src/components/dropdown/index.ts +14 -5
  72. package/dist/src/components/dropzone/Dropzone.astro +7 -6
  73. package/dist/src/components/dropzone/DropzoneFilesList.astro +3 -2
  74. package/dist/src/components/dropzone/DropzoneLoadingIndicator.astro +1 -1
  75. package/dist/src/components/dropzone/DropzoneUploadIndicator.astro +1 -1
  76. package/dist/src/components/dropzone/index.ts +14 -3
  77. package/dist/src/components/input/Input.astro +4 -4
  78. package/dist/src/components/input/index.ts +4 -2
  79. package/dist/src/components/item/Item.astro +52 -0
  80. package/dist/src/components/item/ItemActions.astro +16 -0
  81. package/dist/src/components/item/ItemContent.astro +16 -0
  82. package/dist/src/components/item/ItemDescription.astro +19 -0
  83. package/dist/src/components/item/ItemFooter.astro +16 -0
  84. package/dist/src/components/item/ItemGroup.astro +16 -0
  85. package/dist/src/components/item/ItemHeader.astro +16 -0
  86. package/dist/src/components/item/ItemMedia.astro +40 -0
  87. package/dist/src/components/item/ItemSeparator.astro +21 -0
  88. package/dist/src/components/item/ItemTitle.astro +16 -0
  89. package/dist/src/components/item/index.ts +50 -0
  90. package/dist/src/components/label/Label.astro +2 -2
  91. package/dist/src/components/label/index.ts +4 -2
  92. package/dist/src/components/pagination/Pagination.astro +8 -2
  93. package/dist/src/components/pagination/PaginationContent.astro +2 -2
  94. package/dist/src/components/pagination/PaginationEllipsis.astro +7 -2
  95. package/dist/src/components/pagination/PaginationItem.astro +2 -2
  96. package/dist/src/components/pagination/PaginationLink.astro +10 -29
  97. package/dist/src/components/pagination/PaginationNext.astro +2 -1
  98. package/dist/src/components/pagination/PaginationPrevious.astro +2 -1
  99. package/dist/src/components/pagination/index.ts +18 -7
  100. package/dist/src/components/progress/Progress.astro +6 -3
  101. package/dist/src/components/progress/index.ts +7 -2
  102. package/dist/src/components/radio-group/RadioGroup.astro +2 -1
  103. package/dist/src/components/radio-group/RadioGroupItem.astro +17 -15
  104. package/dist/src/components/radio-group/index.ts +16 -3
  105. package/dist/src/components/select/Select.astro +1 -0
  106. package/dist/src/components/select/SelectContent.astro +3 -2
  107. package/dist/src/components/select/SelectGroup.astro +1 -1
  108. package/dist/src/components/select/SelectItem.astro +3 -2
  109. package/dist/src/components/select/SelectLabel.astro +2 -2
  110. package/dist/src/components/select/SelectSeparator.astro +2 -2
  111. package/dist/src/components/select/SelectTrigger.astro +4 -3
  112. package/dist/src/components/select/SelectValue.astro +2 -2
  113. package/dist/src/components/select/index.ts +18 -6
  114. package/dist/src/components/separator/Separator.astro +36 -0
  115. package/dist/src/components/separator/index.ts +7 -0
  116. package/dist/src/components/sheet/Sheet.astro +13 -0
  117. package/dist/src/components/sheet/SheetClose.astro +13 -0
  118. package/dist/src/components/sheet/SheetContent.astro +88 -0
  119. package/dist/src/components/sheet/SheetDescription.astro +16 -0
  120. package/dist/src/components/sheet/SheetFooter.astro +16 -0
  121. package/dist/src/components/sheet/SheetHeader.astro +16 -0
  122. package/dist/src/components/sheet/SheetTitle.astro +16 -0
  123. package/dist/src/components/sheet/SheetTrigger.astro +13 -0
  124. package/dist/src/components/sheet/index.ts +41 -0
  125. package/dist/src/components/skeleton/Skeleton.astro +3 -3
  126. package/dist/src/components/skeleton/index.ts +6 -2
  127. package/dist/src/components/spinner/Spinner.astro +21 -0
  128. package/dist/src/components/spinner/index.ts +7 -0
  129. package/dist/src/components/switch/Switch.astro +16 -13
  130. package/dist/src/components/switch/index.ts +8 -2
  131. package/dist/src/components/table/Table.astro +3 -3
  132. package/dist/src/components/table/TableBody.astro +2 -2
  133. package/dist/src/components/table/TableCaption.astro +2 -2
  134. package/dist/src/components/table/TableCell.astro +2 -2
  135. package/dist/src/components/table/TableFoot.astro +2 -2
  136. package/dist/src/components/table/TableHead.astro +2 -2
  137. package/dist/src/components/table/TableHeader.astro +2 -2
  138. package/dist/src/components/table/TableRow.astro +2 -2
  139. package/dist/src/components/table/index.ts +30 -9
  140. package/dist/src/components/tabs/Tabs.astro +2 -1
  141. package/dist/src/components/tabs/TabsContent.astro +4 -1
  142. package/dist/src/components/tabs/TabsList.astro +9 -3
  143. package/dist/src/components/tabs/TabsTrigger.astro +6 -3
  144. package/dist/src/components/tabs/index.ts +12 -5
  145. package/dist/src/components/textarea/Textarea.astro +4 -4
  146. package/dist/src/components/textarea/index.ts +6 -2
  147. package/dist/src/components/tooltip/Tooltip.astro +2 -1
  148. package/dist/src/components/tooltip/TooltipContent.astro +21 -5
  149. package/dist/src/components/tooltip/TooltipTrigger.astro +1 -1
  150. package/dist/src/components/tooltip/index.ts +8 -3
  151. package/package.json +1 -1
@@ -4,13 +4,13 @@ import { tv, type VariantProps } from "tailwind-variants";
4
4
 
5
5
  type Props = HTMLAttributes<"th"> & VariantProps<typeof tableHead>;
6
6
 
7
- const tableHead = tv({
7
+ export const tableHead = tv({
8
8
  base: "text-muted-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
9
9
  });
10
10
 
11
11
  const { class: className, ...rest } = Astro.props;
12
12
  ---
13
13
 
14
- <th data-table-head class={tableHead({ class: className })} {...rest} role="columnheader">
14
+ <th data-slot="table-head" class={tableHead({ class: className })} {...rest} role="columnheader">
15
15
  <slot />
16
16
  </th>
@@ -4,13 +4,13 @@ import { tv, type VariantProps } from "tailwind-variants";
4
4
 
5
5
  type Props = HTMLAttributes<"thead"> & VariantProps<typeof tableHeader>;
6
6
 
7
- const tableHeader = tv({
7
+ export const tableHeader = tv({
8
8
  base: "[&_tr]:border-b",
9
9
  });
10
10
 
11
11
  const { class: className, ...rest } = Astro.props;
12
12
  ---
13
13
 
14
- <thead data-table-header class={tableHeader({ class: className })} {...rest}>
14
+ <thead data-slot="table-header" class={tableHeader({ class: className })} {...rest}>
15
15
  <slot />
16
16
  </thead>
@@ -4,13 +4,13 @@ import { tv, type VariantProps } from "tailwind-variants";
4
4
 
5
5
  type Props = HTMLAttributes<"tr"> & VariantProps<typeof tableRow>;
6
6
 
7
- const tableRow = tv({
7
+ export const tableRow = tv({
8
8
  base: "hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",
9
9
  });
10
10
 
11
11
  const { class: className, ...rest } = Astro.props;
12
12
  ---
13
13
 
14
- <tr data-table-row class={tableRow({ class: className })} {...rest} role="row">
14
+ <tr data-slot="table-row" class={tableRow({ class: className })} {...rest} role="row">
15
15
  <slot />
16
16
  </tr>
@@ -1,13 +1,34 @@
1
- import Table from "./Table.astro";
2
- import TableBody from "./TableBody.astro";
3
- import TableCaption from "./TableCaption.astro";
4
- import TableCell from "./TableCell.astro";
5
- import TableFoot from "./TableFoot.astro";
6
- import TableHead from "./TableHead.astro";
7
- import TableHeader from "./TableHeader.astro";
8
- import TableRow from "./TableRow.astro";
1
+ import Table, { table } from "./Table.astro";
2
+ import TableBody, { tableBody } from "./TableBody.astro";
3
+ import TableCaption, { tableCaption } from "./TableCaption.astro";
4
+ import TableCell, { tableCell } from "./TableCell.astro";
5
+ import TableFoot, { tableFoot } from "./TableFoot.astro";
6
+ import TableHead, { tableHead } from "./TableHead.astro";
7
+ import TableHeader, { tableHeader } from "./TableHeader.astro";
8
+ import TableRow, { tableRow } from "./TableRow.astro";
9
9
 
10
- export { Table, TableBody, TableCaption, TableCell, TableFoot, TableHead, TableHeader, TableRow };
10
+ const TableVariants = {
11
+ table,
12
+ tableBody,
13
+ tableCaption,
14
+ tableCell,
15
+ tableFoot,
16
+ tableHead,
17
+ tableHeader,
18
+ tableRow,
19
+ };
20
+
21
+ export {
22
+ Table,
23
+ TableBody,
24
+ TableCaption,
25
+ TableCell,
26
+ TableFoot,
27
+ TableHead,
28
+ TableHeader,
29
+ TableRow,
30
+ TableVariants,
31
+ };
11
32
 
12
33
  export default {
13
34
  Root: Table,
@@ -7,7 +7,7 @@ interface Props extends HTMLAttributes<"div"> {
7
7
  syncKey?: string;
8
8
  }
9
9
 
10
- const tabs = tv({ base: "starwind-tabs" });
10
+ export const tabs = tv({ base: "starwind-tabs" });
11
11
 
12
12
  const { defaultValue, syncKey, class: className, ...rest } = Astro.props;
13
13
  ---
@@ -16,6 +16,7 @@ const { defaultValue, syncKey, class: className, ...rest } = Astro.props;
16
16
  class={tabs({ class: className })}
17
17
  data-default-value={defaultValue}
18
18
  data-sync-key={syncKey}
19
+ data-slot="tabs"
19
20
  {...rest}
20
21
  >
21
22
  <slot />
@@ -6,13 +6,16 @@ interface Props extends Omit<HTMLAttributes<"div">, "id" | "role" | "tabindex" |
6
6
  value: string;
7
7
  }
8
8
 
9
- const tabsContent = tv({ base: "mt-2 focus-visible:outline-2 focus-visible:outline-offset-2" });
9
+ export const tabsContent = tv({
10
+ base: "mt-2 focus-visible:outline-2 focus-visible:outline-offset-2",
11
+ });
10
12
 
11
13
  const { value, class: className, ...rest } = Astro.props;
12
14
  ---
13
15
 
14
16
  <div
15
17
  class={tabsContent({ class: className })}
18
+ data-slot="tabs-content"
16
19
  data-tabs-content
17
20
  data-value={value}
18
21
  data-state="inactive"
@@ -4,13 +4,19 @@ import { tv } from "tailwind-variants";
4
4
 
5
5
  type Props = Omit<HTMLAttributes<"div">, "role">;
6
6
 
7
- const tabsList = tv({
8
- base: "bg-muted text-muted-foreground inline-flex w-full items-center justify-center rounded-md p-1",
7
+ export const tabsList = tv({
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;
12
12
  ---
13
13
 
14
- <div class={tabsList({ class: className })} data-tabs-list role="tablist" {...rest}>
14
+ <div
15
+ class={tabsList({ class: className })}
16
+ data-slot="tabs-list"
17
+ data-tabs-list
18
+ role="tablist"
19
+ {...rest}
20
+ >
15
21
  <slot />
16
22
  </div>
@@ -6,11 +6,13 @@ interface Props extends Omit<HTMLAttributes<"button">, "type" | "id" | "role"> {
6
6
  value: string;
7
7
  }
8
8
 
9
- const tabsTrigger = tv({
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
  });
@@ -20,6 +22,7 @@ const { value, class: className, ...rest } = Astro.props;
20
22
 
21
23
  <button
22
24
  class={tabsTrigger({ class: className })}
25
+ data-slot="tabs-trigger"
23
26
  data-tabs-trigger
24
27
  data-value={value}
25
28
  data-state="inactive"
@@ -1,9 +1,16 @@
1
- import Tabs from "./Tabs.astro";
2
- import TabsContent from "./TabsContent.astro";
3
- import TabsList from "./TabsList.astro";
4
- import TabsTrigger from "./TabsTrigger.astro";
1
+ import Tabs, { tabs } from "./Tabs.astro";
2
+ import TabsContent, { tabsContent } from "./TabsContent.astro";
3
+ import TabsList, { tabsList } from "./TabsList.astro";
4
+ import TabsTrigger, { tabsTrigger } from "./TabsTrigger.astro";
5
5
 
6
- export { Tabs, TabsContent, TabsList, TabsTrigger };
6
+ const TabsVariants = {
7
+ tabs,
8
+ tabsContent,
9
+ tabsList,
10
+ tabsTrigger,
11
+ };
12
+
13
+ export { Tabs, TabsContent, TabsList, TabsTrigger, TabsVariants };
7
14
 
8
15
  export default {
9
16
  Root: Tabs,
@@ -4,10 +4,10 @@ import { tv, type VariantProps } from "tailwind-variants";
4
4
 
5
5
  type Props = HTMLAttributes<"textarea"> & VariantProps<typeof textarea>;
6
6
 
7
- const textarea = tv({
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",
@@ -25,4 +25,4 @@ const textarea = tv({
25
25
  const { size, class: className, ...rest } = Astro.props;
26
26
  ---
27
27
 
28
- <textarea class={textarea({ size, class: className })} {...rest}></textarea>
28
+ <textarea class={textarea({ size, class: className })} data-slot="textarea" {...rest}></textarea>
@@ -1,5 +1,9 @@
1
- import Textarea from "./Textarea.astro";
1
+ import Textarea, { textarea } from "./Textarea.astro";
2
2
 
3
- export { Textarea };
3
+ const TextareaVariants = {
4
+ textarea,
5
+ };
6
+
7
+ export { Textarea, TextareaVariants };
4
8
 
5
9
  export default Textarea;
@@ -17,7 +17,7 @@ type Props = HTMLAttributes<"div"> & {
17
17
  disableHoverableContent?: boolean;
18
18
  };
19
19
 
20
- const tooltip = tv({ base: "starwind-tooltip relative inline-block" });
20
+ export const tooltip = tv({ base: "starwind-tooltip relative inline-block" });
21
21
 
22
22
  const {
23
23
  openDelay = 200,
@@ -29,6 +29,7 @@ const {
29
29
 
30
30
  <div
31
31
  class={tooltip({ class: className })}
32
+ data-slot="tooltip"
32
33
  data-state="closed"
33
34
  data-open-delay={openDelay}
34
35
  data-close-delay={closeDelay}
@@ -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
  /**
@@ -30,11 +31,11 @@ type Props = HTMLAttributes<"div"> & {
30
31
  animationDuration?: number;
31
32
  };
32
33
 
33
- const tooltipContent = tv({
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 @@ 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,
@@ -84,6 +98,7 @@ const {
84
98
 
85
99
  <div
86
100
  class={tooltipContent({ side, align, class: className })}
101
+ data-slot="tooltip-content"
87
102
  data-state="closed"
88
103
  data-side={side}
89
104
  data-align={align}
@@ -95,4 +110,5 @@ const {
95
110
  }}
96
111
  >
97
112
  <slot> My tooltip! </slot>
113
+ <CaretUp class={tooltipCaret({ side })} />
98
114
  </div>
@@ -3,7 +3,7 @@
3
3
  * This component is used to trigger the tooltip
4
4
  * All it does is require a slot
5
5
  */
6
- // eslint-disable-next-line
6
+
7
7
  type Props = { children: any };
8
8
  ---
9
9
 
@@ -1,8 +1,13 @@
1
- import Tooltip from "./Tooltip.astro";
2
- import TooltipContent from "./TooltipContent.astro";
1
+ import Tooltip, { tooltip } from "./Tooltip.astro";
2
+ import TooltipContent, { tooltipContent } from "./TooltipContent.astro";
3
3
  import TooltipTrigger from "./TooltipTrigger.astro";
4
4
 
5
- export { Tooltip, TooltipContent, TooltipTrigger };
5
+ const TooltipVariants = {
6
+ tooltip,
7
+ tooltipContent,
8
+ };
9
+
10
+ export { Tooltip, TooltipContent, TooltipTrigger, TooltipVariants };
6
11
 
7
12
  export default {
8
13
  Root: Tooltip,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@starwind-ui/core",
3
- "version": "1.8.0",
3
+ "version": "1.10.0",
4
4
  "description": "Starwind UI core components and registry",
5
5
  "license": "MIT",
6
6
  "author": {