@starwind-ui/core 1.15.4 → 1.16.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.d.ts +1 -0
- package/dist/index.js +67 -43
- package/dist/index.js.map +1 -1
- package/dist/src/components/accordion/Accordion.astro +1 -1
- package/dist/src/components/accordion/AccordionContent.astro +1 -1
- package/dist/src/components/accordion/AccordionItem.astro +1 -1
- package/dist/src/components/accordion/AccordionTrigger.astro +1 -1
- package/dist/src/components/alert/Alert.astro +1 -1
- package/dist/src/components/alert/AlertDescription.astro +1 -1
- package/dist/src/components/alert/AlertTitle.astro +1 -1
- package/dist/src/components/alert-dialog/AlertDialog.astro +1 -1
- package/dist/src/components/alert-dialog/AlertDialogAction.astro +1 -1
- package/dist/src/components/alert-dialog/AlertDialogCancel.astro +1 -1
- package/dist/src/components/alert-dialog/AlertDialogContent.astro +3 -3
- package/dist/src/components/alert-dialog/AlertDialogDescription.astro +1 -1
- package/dist/src/components/alert-dialog/AlertDialogFooter.astro +1 -1
- package/dist/src/components/alert-dialog/AlertDialogHeader.astro +1 -1
- package/dist/src/components/alert-dialog/AlertDialogTitle.astro +1 -1
- package/dist/src/components/alert-dialog/AlertDialogTrigger.astro +2 -2
- package/dist/src/components/aspect-ratio/AspectRatio.astro +1 -1
- package/dist/src/components/avatar/Avatar.astro +1 -1
- package/dist/src/components/avatar/AvatarFallback.astro +1 -1
- package/dist/src/components/avatar/AvatarImage.astro +2 -2
- package/dist/src/components/badge/Badge.astro +1 -1
- package/dist/src/components/breadcrumb/Breadcrumb.astro +1 -1
- package/dist/src/components/breadcrumb/BreadcrumbEllipsis.astro +1 -1
- package/dist/src/components/breadcrumb/BreadcrumbItem.astro +1 -1
- package/dist/src/components/breadcrumb/BreadcrumbLink.astro +1 -1
- package/dist/src/components/breadcrumb/BreadcrumbList.astro +2 -2
- package/dist/src/components/breadcrumb/BreadcrumbPage.astro +1 -1
- package/dist/src/components/breadcrumb/BreadcrumbSeparator.astro +1 -1
- package/dist/src/components/button/Button.astro +1 -1
- package/dist/src/components/button-group/ButtonGroup.astro +1 -1
- package/dist/src/components/button-group/ButtonGroupSeparator.astro +1 -1
- package/dist/src/components/button-group/ButtonGroupText.astro +1 -1
- package/dist/src/components/card/Card.astro +1 -1
- package/dist/src/components/card/CardAction.astro +1 -1
- package/dist/src/components/card/CardContent.astro +1 -1
- package/dist/src/components/card/CardDescription.astro +1 -1
- package/dist/src/components/card/CardFooter.astro +1 -1
- package/dist/src/components/card/CardHeader.astro +1 -1
- package/dist/src/components/card/CardTitle.astro +1 -1
- package/dist/src/components/carousel/Carousel.astro +1 -1
- package/dist/src/components/carousel/CarouselContent.astro +1 -1
- package/dist/src/components/carousel/CarouselItem.astro +1 -1
- package/dist/src/components/carousel/CarouselNext.astro +1 -1
- package/dist/src/components/carousel/CarouselPrevious.astro +1 -1
- package/dist/src/components/checkbox/Checkbox.astro +1 -1
- package/dist/src/components/collapsible/Collapsible.astro +1 -1
- package/dist/src/components/collapsible/CollapsibleContent.astro +1 -1
- package/dist/src/components/collapsible/CollapsibleTrigger.astro +1 -1
- package/dist/src/components/dialog/Dialog.astro +1 -1
- package/dist/src/components/dialog/DialogClose.astro +1 -1
- package/dist/src/components/dialog/DialogContent.astro +2 -2
- package/dist/src/components/dialog/DialogDescription.astro +1 -1
- package/dist/src/components/dialog/DialogFooter.astro +1 -1
- package/dist/src/components/dialog/DialogHeader.astro +1 -1
- package/dist/src/components/dialog/DialogTitle.astro +1 -1
- package/dist/src/components/dialog/DialogTrigger.astro +1 -1
- package/dist/src/components/dropdown/Dropdown.astro +261 -34
- package/dist/src/components/dropdown/DropdownContent.astro +41 -5
- package/dist/src/components/dropdown/DropdownItem.astro +2 -2
- package/dist/src/components/dropdown/DropdownLabel.astro +2 -2
- package/dist/src/components/dropdown/DropdownSeparator.astro +1 -1
- package/dist/src/components/dropdown/DropdownShortcut.astro +17 -0
- package/dist/src/components/dropdown/DropdownSub.astro +15 -0
- package/dist/src/components/dropdown/DropdownSubContent.astro +36 -0
- package/dist/src/components/dropdown/DropdownSubTrigger.astro +34 -0
- package/dist/src/components/dropdown/DropdownTrigger.astro +1 -1
- package/dist/src/components/dropdown/index.ts +12 -0
- package/dist/src/components/dropzone/DropzoneFilesList.astro +1 -1
- package/dist/src/components/image/Image.astro +1 -1
- package/dist/src/components/input/Input.astro +1 -1
- package/dist/src/components/input-group/InputGroup.astro +28 -0
- package/dist/src/components/input-group/InputGroupAddon.astro +79 -0
- package/dist/src/components/input-group/InputGroupButton.astro +34 -0
- package/dist/src/components/input-group/InputGroupInput.astro +16 -0
- package/dist/src/components/input-group/InputGroupText.astro +17 -0
- package/dist/src/components/input-group/InputGroupTextarea.astro +20 -0
- package/dist/src/components/input-group/index.ts +33 -0
- package/dist/src/components/input-otp/InputOtp.astro +1 -1
- package/dist/src/components/input-otp/InputOtpGroup.astro +1 -1
- package/dist/src/components/input-otp/InputOtpSeparator.astro +1 -1
- package/dist/src/components/input-otp/InputOtpSlot.astro +1 -1
- package/dist/src/components/item/Item.astro +1 -1
- package/dist/src/components/item/ItemActions.astro +1 -1
- package/dist/src/components/item/ItemContent.astro +1 -1
- package/dist/src/components/item/ItemDescription.astro +1 -1
- package/dist/src/components/item/ItemFooter.astro +1 -1
- package/dist/src/components/item/ItemGroup.astro +1 -1
- package/dist/src/components/item/ItemHeader.astro +1 -1
- package/dist/src/components/item/ItemMedia.astro +1 -1
- package/dist/src/components/item/ItemSeparator.astro +1 -1
- package/dist/src/components/item/ItemTitle.astro +1 -1
- package/dist/src/components/kbd/Kbd.astro +1 -1
- package/dist/src/components/kbd/KbdGroup.astro +1 -1
- package/dist/src/components/label/Label.astro +1 -1
- package/dist/src/components/native-select/NativeSelect.astro +64 -0
- package/dist/src/components/native-select/NativeSelectOptGroup.astro +15 -0
- package/dist/src/components/native-select/NativeSelectOption.astro +15 -0
- package/dist/src/components/native-select/index.ts +21 -0
- package/dist/src/components/pagination/Pagination.astro +1 -1
- package/dist/src/components/pagination/PaginationContent.astro +1 -1
- package/dist/src/components/pagination/PaginationEllipsis.astro +1 -1
- package/dist/src/components/pagination/PaginationItem.astro +1 -1
- package/dist/src/components/pagination/PaginationLink.astro +1 -1
- package/dist/src/components/pagination/PaginationNext.astro +1 -1
- package/dist/src/components/pagination/PaginationPrevious.astro +1 -1
- package/dist/src/components/popover/Popover.astro +717 -0
- package/dist/src/components/popover/PopoverContent.astro +102 -0
- package/dist/src/components/popover/PopoverDescription.astro +14 -0
- package/dist/src/components/popover/PopoverHeader.astro +14 -0
- package/dist/src/components/popover/PopoverTitle.astro +14 -0
- package/dist/src/components/popover/PopoverTrigger.astro +51 -0
- package/dist/src/components/popover/index.ts +34 -0
- package/dist/src/components/progress/Progress.astro +1 -1
- package/dist/src/components/prose/Prose.astro +1 -1
- package/dist/src/components/radio-group/RadioGroup.astro +1 -1
- package/dist/src/components/radio-group/RadioGroupItem.astro +1 -1
- package/dist/src/components/select/Select.astro +1 -1
- package/dist/src/components/select/SelectContent.astro +1 -1
- package/dist/src/components/select/SelectItem.astro +1 -1
- package/dist/src/components/select/SelectLabel.astro +1 -1
- package/dist/src/components/select/SelectSearch.astro +1 -1
- package/dist/src/components/select/SelectSeparator.astro +1 -1
- package/dist/src/components/select/SelectTrigger.astro +1 -1
- package/dist/src/components/select/SelectValue.astro +1 -1
- package/dist/src/components/separator/Separator.astro +1 -1
- package/dist/src/components/sheet/Sheet.astro +1 -1
- package/dist/src/components/sheet/SheetContent.astro +1 -1
- package/dist/src/components/sheet/SheetDescription.astro +1 -1
- package/dist/src/components/sheet/SheetFooter.astro +1 -1
- package/dist/src/components/sheet/SheetHeader.astro +1 -1
- package/dist/src/components/sheet/SheetTitle.astro +1 -1
- package/dist/src/components/sidebar/Sidebar.astro +19 -2
- package/dist/src/components/sidebar/SidebarContent.astro +1 -1
- package/dist/src/components/sidebar/SidebarFooter.astro +1 -1
- package/dist/src/components/sidebar/SidebarGroup.astro +1 -1
- package/dist/src/components/sidebar/SidebarGroupContent.astro +1 -1
- package/dist/src/components/sidebar/SidebarGroupLabel.astro +2 -2
- package/dist/src/components/sidebar/SidebarHeader.astro +1 -1
- package/dist/src/components/sidebar/SidebarInput.astro +1 -1
- package/dist/src/components/sidebar/SidebarInset.astro +1 -1
- package/dist/src/components/sidebar/SidebarMenu.astro +1 -1
- package/dist/src/components/sidebar/SidebarMenuAction.astro +1 -1
- package/dist/src/components/sidebar/SidebarMenuBadge.astro +1 -1
- package/dist/src/components/sidebar/SidebarMenuButton.astro +2 -14
- package/dist/src/components/sidebar/SidebarMenuItem.astro +1 -1
- package/dist/src/components/sidebar/SidebarMenuSkeleton.astro +1 -1
- package/dist/src/components/sidebar/SidebarMenuSub.astro +1 -1
- package/dist/src/components/sidebar/SidebarMenuSubButton.astro +1 -1
- package/dist/src/components/sidebar/SidebarMenuSubItem.astro +1 -1
- package/dist/src/components/sidebar/SidebarProvider.astro +1 -1
- package/dist/src/components/sidebar/SidebarRail.astro +2 -2
- package/dist/src/components/sidebar/SidebarSeparator.astro +1 -1
- package/dist/src/components/sidebar/SidebarTrigger.astro +1 -1
- package/dist/src/components/skeleton/Skeleton.astro +1 -1
- package/dist/src/components/slider/Slider.astro +1 -1
- package/dist/src/components/spinner/Spinner.astro +1 -1
- package/dist/src/components/switch/Switch.astro +1 -1
- package/dist/src/components/table/Table.astro +1 -1
- package/dist/src/components/table/TableBody.astro +1 -1
- package/dist/src/components/table/TableCaption.astro +1 -1
- package/dist/src/components/table/TableCell.astro +1 -1
- package/dist/src/components/table/TableFoot.astro +1 -1
- package/dist/src/components/table/TableHead.astro +1 -1
- package/dist/src/components/table/TableHeader.astro +1 -1
- package/dist/src/components/table/TableRow.astro +1 -1
- package/dist/src/components/tabs/Tabs.astro +1 -1
- package/dist/src/components/tabs/TabsContent.astro +1 -1
- package/dist/src/components/tabs/TabsList.astro +1 -1
- package/dist/src/components/tabs/TabsTrigger.astro +1 -1
- package/dist/src/components/textarea/Textarea.astro +1 -1
- package/dist/src/components/theme-toggle/ThemeToggle.astro +1 -1
- package/dist/src/components/toast/ToastDescription.astro +1 -1
- package/dist/src/components/toast/ToastItem.astro +1 -1
- package/dist/src/components/toast/Toaster.astro +1 -1
- package/dist/src/components/toggle/Toggle.astro +1 -1
- package/dist/src/components/tooltip/Tooltip.astro +260 -122
- package/dist/src/components/tooltip/TooltipContent.astro +13 -23
- package/dist/src/components/video/Video.astro +2 -2
- package/dist/src/lib/utils/starwind/positioning.ts +318 -0
- package/package.json +1 -1
|
@@ -27,9 +27,9 @@ const skeletonWidth = width || `${Math.floor(Math.random() * 40) + 50}%`;
|
|
|
27
27
|
|
|
28
28
|
<div
|
|
29
29
|
class={sidebarMenuSkeleton({ class: className })}
|
|
30
|
-
data-slot="sidebar-menu-skeleton"
|
|
31
30
|
data-sidebar="menu-skeleton"
|
|
32
31
|
{...rest}
|
|
32
|
+
data-slot="sidebar-menu-skeleton"
|
|
33
33
|
>
|
|
34
34
|
{showIcon && <Skeleton class="size-4 rounded-md" data-sidebar="menu-skeleton-icon" />}
|
|
35
35
|
<Skeleton
|
|
@@ -39,11 +39,11 @@ const { size, isActive = false, class: className, ...rest } = Astro.props;
|
|
|
39
39
|
|
|
40
40
|
<a
|
|
41
41
|
class={sidebarMenuSubButton({ size, class: className })}
|
|
42
|
-
data-slot="sidebar-menu-sub-button"
|
|
43
42
|
data-sidebar="menu-sub-button"
|
|
44
43
|
data-size={size || "md"}
|
|
45
44
|
data-active={isActive}
|
|
46
45
|
{...rest}
|
|
46
|
+
data-slot="sidebar-menu-sub-button"
|
|
47
47
|
>
|
|
48
48
|
<slot />
|
|
49
49
|
</a>
|
|
@@ -8,9 +8,9 @@ const { class: className, ...rest } = Astro.props;
|
|
|
8
8
|
|
|
9
9
|
<li
|
|
10
10
|
class:list={["group/menu-sub-item relative", className]}
|
|
11
|
-
data-slot="sidebar-menu-sub-item"
|
|
12
11
|
data-sidebar="menu-sub-item"
|
|
13
12
|
{...rest}
|
|
13
|
+
data-slot="sidebar-menu-sub-item"
|
|
14
14
|
>
|
|
15
15
|
<slot />
|
|
16
16
|
</li>
|
|
@@ -45,12 +45,12 @@ const mergedStyle = {
|
|
|
45
45
|
|
|
46
46
|
<div
|
|
47
47
|
class={sidebarProvider({ class: className })}
|
|
48
|
-
data-slot="sidebar-provider"
|
|
49
48
|
data-state={defaultOpen ? "expanded" : "collapsed"}
|
|
50
49
|
data-mobile-open="false"
|
|
51
50
|
data-keyboard-shortcut={keyboardShortcut}
|
|
52
51
|
style={mergedStyle}
|
|
53
52
|
{...rest}
|
|
53
|
+
data-slot="sidebar-provider"
|
|
54
54
|
>
|
|
55
55
|
<slot />
|
|
56
56
|
</div>
|
|
@@ -28,11 +28,11 @@ const { class: className, ...rest } = Astro.props;
|
|
|
28
28
|
<button
|
|
29
29
|
type="button"
|
|
30
30
|
class={sidebarRail({ class: className })}
|
|
31
|
-
data-slot="sidebar-rail"
|
|
32
31
|
data-sidebar="rail"
|
|
33
32
|
aria-label="Toggle Sidebar"
|
|
34
33
|
tabindex="-1"
|
|
35
|
-
{...rest}
|
|
34
|
+
{...rest}
|
|
35
|
+
data-slot="sidebar-rail"></button>
|
|
36
36
|
|
|
37
37
|
<script>
|
|
38
38
|
class SidebarRailHandler {
|
|
@@ -16,7 +16,7 @@ const { orientation = "horizontal", class: className, ...rest } = Astro.props;
|
|
|
16
16
|
<Separator
|
|
17
17
|
orientation={orientation}
|
|
18
18
|
class={sidebarSeparator({ class: className })}
|
|
19
|
-
data-slot="sidebar-separator"
|
|
20
19
|
data-sidebar="separator"
|
|
21
20
|
{...rest}
|
|
21
|
+
data-slot="sidebar-separator"
|
|
22
22
|
/>
|
|
@@ -18,10 +18,10 @@ const { class: className, size = "icon-sm", variant = "ghost", ...rest } = Astro
|
|
|
18
18
|
variant={variant}
|
|
19
19
|
size={size}
|
|
20
20
|
class={sidebarTrigger({ class: className })}
|
|
21
|
-
data-slot="sidebar-trigger"
|
|
22
21
|
data-sidebar="trigger"
|
|
23
22
|
aria-label="Toggle Sidebar"
|
|
24
23
|
{...rest}
|
|
24
|
+
data-slot="sidebar-trigger"
|
|
25
25
|
>
|
|
26
26
|
<slot name="icon">
|
|
27
27
|
<PanelLeft />
|
|
@@ -101,7 +101,6 @@ const rangeEnd = isRange ? getPercentage(Math.max(...values)) : getPercentage(va
|
|
|
101
101
|
|
|
102
102
|
<div
|
|
103
103
|
class={root({ class: className })}
|
|
104
|
-
data-slot="slider"
|
|
105
104
|
data-orientation={orientation}
|
|
106
105
|
data-disabled={disabled ? "" : undefined}
|
|
107
106
|
role="group"
|
|
@@ -111,6 +110,7 @@ const rangeEnd = isRange ? getPercentage(Math.max(...values)) : getPercentage(va
|
|
|
111
110
|
data-step={step}
|
|
112
111
|
data-large-step={largeStep}
|
|
113
112
|
{...rest}
|
|
113
|
+
data-slot="slider"
|
|
114
114
|
>
|
|
115
115
|
<div class={control()} data-slot="slider-control" data-orientation={orientation}>
|
|
116
116
|
<div class={track()} data-slot="slider-track" data-orientation={orientation}>
|
|
@@ -110,8 +110,8 @@ export const switchLabel = tv({
|
|
|
110
110
|
"--width": `calc((var(--spacing) * ${sizeMultiplier} * 2) + (var(--padding) * 3))`,
|
|
111
111
|
"--border-offset": "1px",
|
|
112
112
|
}}
|
|
113
|
-
data-slot="switch-button"
|
|
114
113
|
{...rest}
|
|
114
|
+
data-slot="switch-button"
|
|
115
115
|
>
|
|
116
116
|
<span
|
|
117
117
|
class={switchToggle({ size })}
|
|
@@ -12,7 +12,7 @@ const { class: className, ...rest } = Astro.props;
|
|
|
12
12
|
---
|
|
13
13
|
|
|
14
14
|
<div data-slot="table-container" class="relative w-full overflow-x-auto">
|
|
15
|
-
<table
|
|
15
|
+
<table role="table" class={table({ class: className })} {...rest} data-slot="table">
|
|
16
16
|
<slot />
|
|
17
17
|
</table>
|
|
18
18
|
</div>
|
|
@@ -11,6 +11,6 @@ export const tableBody = tv({
|
|
|
11
11
|
const { class: className, ...rest } = Astro.props;
|
|
12
12
|
---
|
|
13
13
|
|
|
14
|
-
<tbody
|
|
14
|
+
<tbody class={tableBody({ class: className })} {...rest} data-slot="table-body">
|
|
15
15
|
<slot />
|
|
16
16
|
</tbody>
|
|
@@ -11,6 +11,6 @@ export const tableCaption = tv({
|
|
|
11
11
|
const { class: className, ...rest } = Astro.props;
|
|
12
12
|
---
|
|
13
13
|
|
|
14
|
-
<caption
|
|
14
|
+
<caption class={tableCaption({ class: className })} {...rest} data-slot="table-caption">
|
|
15
15
|
<slot />
|
|
16
16
|
</caption>
|
|
@@ -11,6 +11,6 @@ export const tableCell = tv({
|
|
|
11
11
|
const { class: className, ...rest } = Astro.props;
|
|
12
12
|
---
|
|
13
13
|
|
|
14
|
-
<td
|
|
14
|
+
<td class={tableCell({ class: className })} {...rest} data-slot="table-cell">
|
|
15
15
|
<slot />
|
|
16
16
|
</td>
|
|
@@ -11,6 +11,6 @@ export const tableFoot = tv({
|
|
|
11
11
|
const { class: className, ...rest } = Astro.props;
|
|
12
12
|
---
|
|
13
13
|
|
|
14
|
-
<tfoot
|
|
14
|
+
<tfoot class={tableFoot({ class: className })} {...rest} data-slot="table-foot">
|
|
15
15
|
<slot />
|
|
16
16
|
</tfoot>
|
|
@@ -11,6 +11,6 @@ export const tableHead = tv({
|
|
|
11
11
|
const { class: className, ...rest } = Astro.props;
|
|
12
12
|
---
|
|
13
13
|
|
|
14
|
-
<th
|
|
14
|
+
<th role="columnheader" class={tableHead({ class: className })} {...rest} data-slot="table-head">
|
|
15
15
|
<slot />
|
|
16
16
|
</th>
|
|
@@ -11,6 +11,6 @@ export const tableHeader = tv({
|
|
|
11
11
|
const { class: className, ...rest } = Astro.props;
|
|
12
12
|
---
|
|
13
13
|
|
|
14
|
-
<thead
|
|
14
|
+
<thead class={tableHeader({ class: className })} {...rest} data-slot="table-header">
|
|
15
15
|
<slot />
|
|
16
16
|
</thead>
|
|
@@ -11,6 +11,6 @@ export const tableRow = tv({
|
|
|
11
11
|
const { class: className, ...rest } = Astro.props;
|
|
12
12
|
---
|
|
13
13
|
|
|
14
|
-
<tr
|
|
14
|
+
<tr role="row" class={tableRow({ class: className })} {...rest} data-slot="table-row">
|
|
15
15
|
<slot />
|
|
16
16
|
</tr>
|
|
@@ -15,7 +15,6 @@ const { value, class: className, ...rest } = Astro.props;
|
|
|
15
15
|
|
|
16
16
|
<div
|
|
17
17
|
class={tabsContent({ class: className })}
|
|
18
|
-
data-slot="tabs-content"
|
|
19
18
|
data-tabs-content
|
|
20
19
|
data-value={value}
|
|
21
20
|
data-state="inactive"
|
|
@@ -23,6 +22,7 @@ const { value, class: className, ...rest } = Astro.props;
|
|
|
23
22
|
tabindex="0"
|
|
24
23
|
hidden
|
|
25
24
|
{...rest}
|
|
25
|
+
data-slot="tabs-content"
|
|
26
26
|
>
|
|
27
27
|
<slot />
|
|
28
28
|
</div>
|
|
@@ -22,13 +22,13 @@ const { value, class: className, ...rest } = Astro.props;
|
|
|
22
22
|
|
|
23
23
|
<button
|
|
24
24
|
class={tabsTrigger({ class: className })}
|
|
25
|
-
data-slot="tabs-trigger"
|
|
26
25
|
data-tabs-trigger
|
|
27
26
|
data-value={value}
|
|
28
27
|
data-state="inactive"
|
|
29
28
|
role="tab"
|
|
30
29
|
aria-selected="false"
|
|
31
30
|
{...rest}
|
|
31
|
+
data-slot="tabs-trigger"
|
|
32
32
|
>
|
|
33
33
|
<slot />
|
|
34
34
|
</button>
|
|
@@ -26,4 +26,4 @@ export const textarea = tv({
|
|
|
26
26
|
const { size, class: className, ...rest } = Astro.props;
|
|
27
27
|
---
|
|
28
28
|
|
|
29
|
-
<textarea class={textarea({ size, class: className })} data-slot="textarea"
|
|
29
|
+
<textarea class={textarea({ size, class: className })} {...rest} data-slot="textarea"></textarea>
|
|
@@ -30,12 +30,12 @@ const { class: className, variant = "default", ...rest } = Astro.props;
|
|
|
30
30
|
|
|
31
31
|
<div
|
|
32
32
|
class={toastItem({ variant, class: className })}
|
|
33
|
-
data-slot="toast"
|
|
34
33
|
data-variant={variant}
|
|
35
34
|
data-state="open"
|
|
36
35
|
role="dialog"
|
|
37
36
|
aria-modal="false"
|
|
38
37
|
{...rest}
|
|
38
|
+
data-slot="toast"
|
|
39
39
|
>
|
|
40
40
|
<div
|
|
41
41
|
class="starwind-toast-content grid gap-1 transition-opacity duration-200 data-behind:opacity-0 data-expanded:opacity-100"
|
|
@@ -45,7 +45,6 @@ const {
|
|
|
45
45
|
|
|
46
46
|
<div
|
|
47
47
|
class={toastViewport({ class: className })}
|
|
48
|
-
data-slot="toast-viewport"
|
|
49
48
|
data-position={position}
|
|
50
49
|
data-limit={limit}
|
|
51
50
|
data-duration={duration}
|
|
@@ -57,6 +56,7 @@ const {
|
|
|
57
56
|
tabindex={-1}
|
|
58
57
|
style={`--gap: ${gap}; --peek: ${peek};`}
|
|
59
58
|
{...rest}
|
|
59
|
+
data-slot="toast-viewport"
|
|
60
60
|
>
|
|
61
61
|
<!-- Hidden templates for each variant - JS will clone these -->
|
|
62
62
|
<slot>
|
|
@@ -50,11 +50,11 @@ const dataState = defaultPressed ? "on" : "off";
|
|
|
50
50
|
<button
|
|
51
51
|
type="button"
|
|
52
52
|
class={toggle({ variant, size, class: `starwind-toggle ${className || ""}` })}
|
|
53
|
-
data-slot="toggle"
|
|
54
53
|
data-state={dataState}
|
|
55
54
|
data-sync-group={syncGroup}
|
|
56
55
|
aria-pressed={defaultPressed}
|
|
57
56
|
{...rest}
|
|
57
|
+
data-slot="toggle"
|
|
58
58
|
>
|
|
59
59
|
<slot />
|
|
60
60
|
</button>
|