@starwind-ui/core 1.7.3 → 1.9.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.
- package/dist/index.js +41 -23
- package/dist/index.js.map +1 -1
- package/dist/src/components/accordion/Accordion.astro +8 -2
- package/dist/src/components/accordion/AccordionContent.astro +2 -1
- package/dist/src/components/accordion/AccordionItem.astro +8 -2
- package/dist/src/components/accordion/AccordionTrigger.astro +2 -1
- package/dist/src/components/accordion/index.ts +7 -5
- package/dist/src/components/alert/Alert.astro +5 -2
- package/dist/src/components/alert/AlertDescription.astro +4 -4
- package/dist/src/components/alert/AlertTitle.astro +3 -3
- package/dist/src/components/alert/index.ts +6 -4
- package/dist/src/components/alert-dialog/AlertDialog.astro +273 -0
- package/dist/src/components/alert-dialog/AlertDialogAction.astro +44 -0
- package/dist/src/components/alert-dialog/AlertDialogCancel.astro +45 -0
- package/dist/src/components/alert-dialog/AlertDialogContent.astro +50 -0
- package/dist/src/components/alert-dialog/AlertDialogDescription.astro +18 -0
- package/dist/src/components/alert-dialog/AlertDialogFooter.astro +16 -0
- package/dist/src/components/alert-dialog/AlertDialogHeader.astro +14 -0
- package/dist/src/components/alert-dialog/AlertDialogTitle.astro +20 -0
- package/dist/src/components/alert-dialog/AlertDialogTrigger.astro +47 -0
- package/dist/src/components/alert-dialog/index.ts +46 -0
- package/dist/src/components/avatar/Avatar.astro +2 -2
- package/dist/src/components/avatar/AvatarFallback.astro +2 -2
- package/dist/src/components/avatar/AvatarImage.astro +13 -2
- package/dist/src/components/avatar/index.ts +6 -4
- package/dist/src/components/badge/Badge.astro +2 -2
- package/dist/src/components/badge/index.ts +4 -2
- package/dist/src/components/breadcrumb/Breadcrumb.astro +1 -1
- package/dist/src/components/breadcrumb/BreadcrumbEllipsis.astro +4 -1
- package/dist/src/components/breadcrumb/BreadcrumbItem.astro +2 -2
- package/dist/src/components/breadcrumb/BreadcrumbLink.astro +2 -2
- package/dist/src/components/breadcrumb/BreadcrumbList.astro +2 -2
- package/dist/src/components/breadcrumb/BreadcrumbPage.astro +2 -1
- package/dist/src/components/breadcrumb/BreadcrumbSeparator.astro +2 -1
- package/dist/src/components/breadcrumb/index.ts +16 -6
- package/dist/src/components/button/Button.astro +2 -2
- package/dist/src/components/button/index.ts +4 -2
- package/dist/src/components/card/Card.astro +2 -2
- package/dist/src/components/card/CardContent.astro +2 -2
- package/dist/src/components/card/CardDescription.astro +2 -2
- package/dist/src/components/card/CardFooter.astro +2 -2
- package/dist/src/components/card/CardHeader.astro +2 -2
- package/dist/src/components/card/CardTitle.astro +2 -2
- package/dist/src/components/card/index.ts +16 -7
- package/dist/src/components/carousel/Carousel.astro +55 -0
- package/dist/src/components/carousel/CarouselContent.astro +26 -0
- package/dist/src/components/carousel/CarouselItem.astro +26 -0
- package/dist/src/components/carousel/CarouselNext.astro +33 -0
- package/dist/src/components/carousel/CarouselPrevious.astro +33 -0
- package/dist/src/components/carousel/carousel-script.ts +191 -0
- package/dist/src/components/carousel/index.ts +32 -0
- package/dist/src/components/checkbox/Checkbox.astro +10 -3
- package/dist/src/components/checkbox/index.ts +4 -2
- package/dist/src/components/dialog/Dialog.astro +24 -11
- package/dist/src/components/dialog/DialogClose.astro +7 -2
- package/dist/src/components/dialog/DialogContent.astro +6 -3
- package/dist/src/components/dialog/DialogDescription.astro +2 -2
- package/dist/src/components/dialog/DialogFooter.astro +2 -2
- package/dist/src/components/dialog/DialogHeader.astro +2 -2
- package/dist/src/components/dialog/DialogTitle.astro +2 -2
- package/dist/src/components/dialog/DialogTrigger.astro +7 -1
- package/dist/src/components/dialog/index.ts +20 -5
- package/dist/src/components/dropdown/Dropdown.astro +1 -0
- package/dist/src/components/dropdown/DropdownContent.astro +2 -1
- package/dist/src/components/dropdown/DropdownItem.astro +2 -1
- package/dist/src/components/dropdown/DropdownLabel.astro +2 -2
- package/dist/src/components/dropdown/DropdownSeparator.astro +2 -1
- package/dist/src/components/dropdown/DropdownTrigger.astro +7 -2
- package/dist/src/components/dropdown/index.ts +14 -5
- package/dist/src/components/dropzone/Dropzone.astro +3 -2
- package/dist/src/components/dropzone/DropzoneFilesList.astro +3 -2
- package/dist/src/components/dropzone/DropzoneLoadingIndicator.astro +1 -1
- package/dist/src/components/dropzone/DropzoneUploadIndicator.astro +1 -1
- package/dist/src/components/dropzone/index.ts +14 -3
- package/dist/src/components/input/Input.astro +2 -2
- package/dist/src/components/input/index.ts +4 -2
- package/dist/src/components/label/Label.astro +2 -2
- package/dist/src/components/label/index.ts +4 -2
- package/dist/src/components/pagination/Pagination.astro +8 -2
- package/dist/src/components/pagination/PaginationContent.astro +2 -2
- package/dist/src/components/pagination/PaginationEllipsis.astro +7 -2
- package/dist/src/components/pagination/PaginationItem.astro +2 -2
- package/dist/src/components/pagination/PaginationLink.astro +2 -1
- package/dist/src/components/pagination/PaginationNext.astro +2 -1
- package/dist/src/components/pagination/PaginationPrevious.astro +2 -1
- package/dist/src/components/pagination/index.ts +18 -7
- package/dist/src/components/progress/Progress.astro +5 -2
- package/dist/src/components/progress/index.ts +7 -2
- package/dist/src/components/radio-group/RadioGroup.astro +2 -1
- package/dist/src/components/radio-group/RadioGroupItem.astro +7 -6
- package/dist/src/components/radio-group/index.ts +16 -3
- package/dist/src/components/select/Select.astro +1 -0
- package/dist/src/components/select/SelectContent.astro +3 -2
- package/dist/src/components/select/SelectGroup.astro +1 -1
- package/dist/src/components/select/SelectItem.astro +3 -2
- package/dist/src/components/select/SelectLabel.astro +2 -2
- package/dist/src/components/select/SelectSeparator.astro +2 -2
- package/dist/src/components/select/SelectTrigger.astro +2 -1
- package/dist/src/components/select/SelectValue.astro +2 -2
- package/dist/src/components/select/index.ts +18 -6
- package/dist/src/components/sheet/Sheet.astro +13 -0
- package/dist/src/components/sheet/SheetClose.astro +13 -0
- package/dist/src/components/sheet/SheetContent.astro +90 -0
- package/dist/src/components/sheet/SheetDescription.astro +16 -0
- package/dist/src/components/sheet/SheetFooter.astro +16 -0
- package/dist/src/components/sheet/SheetHeader.astro +16 -0
- package/dist/src/components/sheet/SheetTitle.astro +16 -0
- package/dist/src/components/sheet/SheetTrigger.astro +13 -0
- package/dist/src/components/sheet/index.ts +41 -0
- package/dist/src/components/skeleton/Skeleton.astro +2 -2
- package/dist/src/components/skeleton/index.ts +6 -2
- package/dist/src/components/switch/Switch.astro +6 -4
- package/dist/src/components/switch/index.ts +8 -2
- package/dist/src/components/table/Table.astro +3 -3
- package/dist/src/components/table/TableBody.astro +2 -2
- package/dist/src/components/table/TableCaption.astro +2 -2
- package/dist/src/components/table/TableCell.astro +2 -2
- package/dist/src/components/table/TableFoot.astro +2 -2
- package/dist/src/components/table/TableHead.astro +2 -2
- package/dist/src/components/table/TableHeader.astro +2 -2
- package/dist/src/components/table/TableRow.astro +2 -2
- package/dist/src/components/table/index.ts +30 -9
- package/dist/src/components/tabs/Tabs.astro +2 -1
- package/dist/src/components/tabs/TabsContent.astro +4 -1
- package/dist/src/components/tabs/TabsList.astro +8 -2
- package/dist/src/components/tabs/TabsTrigger.astro +2 -1
- package/dist/src/components/tabs/index.ts +12 -5
- package/dist/src/components/textarea/Textarea.astro +2 -2
- package/dist/src/components/textarea/index.ts +6 -2
- package/dist/src/components/tooltip/Tooltip.astro +2 -1
- package/dist/src/components/tooltip/TooltipContent.astro +2 -1
- package/dist/src/components/tooltip/TooltipTrigger.astro +1 -1
- package/dist/src/components/tooltip/index.ts +8 -3
- package/package.json +1 -1
|
@@ -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
|
-
|
|
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({
|
|
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({
|
|
7
|
+
export const tabsList = tv({
|
|
8
8
|
base: "bg-muted text-muted-foreground inline-flex w-full 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
|
|
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,7 +6,7 @@ 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
11
|
"starwind-transition-colors inline-flex grow items-center justify-center rounded-sm px-3 py-1.5 font-medium whitespace-nowrap",
|
|
12
12
|
"data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",
|
|
@@ -20,6 +20,7 @@ const { value, class: className, ...rest } = Astro.props;
|
|
|
20
20
|
|
|
21
21
|
<button
|
|
22
22
|
class={tabsTrigger({ class: className })}
|
|
23
|
+
data-slot="tabs-trigger"
|
|
23
24
|
data-tabs-trigger
|
|
24
25
|
data-value={value}
|
|
25
26
|
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
|
-
|
|
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,7 +4,7 @@ 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
9
|
"border-input bg-background text-foreground ring-offset-background min-h-10 w-full rounded-md border",
|
|
10
10
|
"focus:outline-outline focus:ring-0 focus:outline-2 focus:outline-offset-2",
|
|
@@ -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>
|
|
@@ -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}
|
|
@@ -30,7 +30,7 @@ type Props = HTMLAttributes<"div"> & {
|
|
|
30
30
|
animationDuration?: number;
|
|
31
31
|
};
|
|
32
32
|
|
|
33
|
-
const tooltipContent = tv({
|
|
33
|
+
export const tooltipContent = tv({
|
|
34
34
|
base: [
|
|
35
35
|
"starwind-tooltip-content",
|
|
36
36
|
"absolute z-50 hidden px-3 py-1.5 whitespace-nowrap shadow-sm will-change-transform",
|
|
@@ -84,6 +84,7 @@ const {
|
|
|
84
84
|
|
|
85
85
|
<div
|
|
86
86
|
class={tooltipContent({ side, align, class: className })}
|
|
87
|
+
data-slot="tooltip-content"
|
|
87
88
|
data-state="closed"
|
|
88
89
|
data-side={side}
|
|
89
90
|
data-align={align}
|
|
@@ -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
|
-
|
|
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,
|