fulldev-ui 0.11.1 → 0.13.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/CHANGELOG.md +35 -0
- package/package.json +29 -21
- package/public/r/accordion.json +2 -2
- package/public/r/alert-dialog.json +2 -2
- package/public/r/aspect-ratio.json +23 -0
- package/public/r/attachment.json +66 -0
- package/public/r/banner.json +0 -4
- package/public/r/blocks-1.json +1 -1
- package/public/r/button-group.json +41 -0
- package/public/r/button.json +1 -1
- package/public/r/carousel.json +8 -8
- package/public/r/collapsible.json +2 -2
- package/public/r/combobox.json +6 -5
- package/public/r/command.json +5 -4
- package/public/r/components.json +8 -0
- package/public/r/dialog.json +2 -2
- package/public/r/doc-1.json +1 -1
- package/public/r/drawer.json +109 -0
- package/public/r/dropdown-menu.json +4 -4
- package/public/r/hover-card.json +4 -4
- package/public/r/init.json +1 -1
- package/public/r/input-group.json +0 -1
- package/public/r/layout.json +3 -0
- package/public/r/navigation-menu.json +3 -3
- package/public/r/pagination.json +59 -0
- package/public/r/popover.json +3 -3
- package/public/r/radio-group.json +2 -2
- package/public/r/registry.json +418 -28
- package/public/r/resizable.json +36 -0
- package/public/r/reviews-3.json +1 -1
- package/public/r/select.json +3 -3
- package/public/r/sheet.json +2 -2
- package/public/r/sidebar-1.json +1 -1
- package/public/r/sidebar.json +1 -1
- package/public/r/slider.json +2 -2
- package/public/r/switch.json +2 -2
- package/public/r/tabs.json +4 -4
- package/public/r/toast.json +80 -0
- package/public/r/toggle-group.json +34 -0
- package/public/r/toggle.json +2 -2
- package/public/r/tooltip.json +3 -3
- package/public/r/typography.json +21 -16
- package/registry/init/global.css +2 -0
- package/registry.json +384 -23
- package/src/components/blocks/blocks-1.astro +23 -23
- package/src/components/blocks/doc-1.astro +116 -26
- package/src/components/blocks/reviews-3.astro +1 -1
- package/src/components/blocks/sidebar-1.astro +46 -44
- package/src/components/ui/accordion/accordion.astro +8 -2
- package/src/components/ui/alert-dialog/alert-dialog.astro +8 -2
- package/src/components/ui/aspect-ratio/aspect-ratio.astro +25 -0
- package/src/components/ui/aspect-ratio/index.ts +1 -0
- package/src/components/ui/attachment/attachment-action.astro +20 -0
- package/src/components/ui/attachment/attachment-actions.astro +20 -0
- package/src/components/ui/attachment/attachment-content.astro +20 -0
- package/src/components/ui/attachment/attachment-description.astro +20 -0
- package/src/components/ui/attachment/attachment-group.astro +20 -0
- package/src/components/ui/attachment/attachment-media.astro +36 -0
- package/src/components/ui/attachment/attachment-title.astro +20 -0
- package/src/components/ui/attachment/attachment-trigger.astro +24 -0
- package/src/components/ui/attachment/attachment.astro +52 -0
- package/src/components/ui/attachment/index.ts +9 -0
- package/src/components/ui/button/button.astro +4 -1
- package/src/components/ui/button-group/button-group-separator.astro +29 -0
- package/src/components/ui/button-group/button-group-text.astro +20 -0
- package/src/components/ui/button-group/button-group-variants.ts +20 -0
- package/src/components/ui/button-group/button-group.astro +30 -0
- package/src/components/ui/button-group/index.ts +7 -0
- package/src/components/ui/carousel/carousel-content.astro +11 -13
- package/src/components/ui/carousel/carousel-item.astro +2 -5
- package/src/components/ui/carousel/carousel-next.astro +0 -3
- package/src/components/ui/carousel/carousel-previous.astro +0 -3
- package/src/components/ui/carousel/carousel.astro +19 -219
- package/src/components/ui/carousel/index.ts +1 -5
- package/src/components/ui/collapsible/collapsible.astro +8 -2
- package/src/components/ui/combobox/combobox-content.astro +1 -1
- package/src/components/ui/combobox/combobox-input.astro +11 -4
- package/src/components/ui/combobox/combobox-trigger.astro +7 -7
- package/src/components/ui/combobox/combobox.astro +9 -17
- package/src/components/ui/command/command-dialog.astro +1 -0
- package/src/components/ui/command/command.astro +40 -25
- package/src/components/ui/dialog/dialog.astro +8 -2
- package/src/components/ui/drawer/drawer-close.astro +13 -0
- package/src/components/ui/drawer/drawer-content.astro +43 -0
- package/src/components/ui/drawer/drawer-description.astro +17 -0
- package/src/components/ui/drawer/drawer-footer.astro +17 -0
- package/src/components/ui/drawer/drawer-header.astro +17 -0
- package/src/components/ui/drawer/drawer-indent-background.astro +11 -0
- package/src/components/ui/drawer/drawer-indent.astro +11 -0
- package/src/components/ui/drawer/drawer-overlay.astro +21 -0
- package/src/components/ui/drawer/drawer-popup.astro +36 -0
- package/src/components/ui/drawer/drawer-portal.astro +27 -0
- package/src/components/ui/drawer/drawer-provider.astro +11 -0
- package/src/components/ui/drawer/drawer-swipe-handle.astro +20 -0
- package/src/components/ui/drawer/drawer-title.astro +17 -0
- package/src/components/ui/drawer/drawer-trigger.astro +21 -0
- package/src/components/ui/drawer/drawer-viewport.astro +21 -0
- package/src/components/ui/drawer/drawer-virtual-keyboard-provider.astro +11 -0
- package/src/components/ui/drawer/drawer.astro +60 -0
- package/src/components/ui/drawer/index.ts +28 -0
- package/src/components/ui/dropdown-menu/dropdown-menu-content.astro +1 -1
- package/src/components/ui/dropdown-menu/dropdown-menu-item.astro +40 -9
- package/src/components/ui/dropdown-menu/dropdown-menu.astro +8 -2
- package/src/components/ui/hover-card/hover-card-content.astro +1 -1
- package/src/components/ui/hover-card/hover-card.astro +15 -4
- package/src/components/ui/navigation-menu/navigation-menu-positioner.astro +1 -1
- package/src/components/ui/navigation-menu/navigation-menu.astro +13 -4
- package/src/components/ui/pagination/index.ts +7 -0
- package/src/components/ui/pagination/pagination-content.astro +17 -0
- package/src/components/ui/pagination/pagination-ellipsis.astro +22 -0
- package/src/components/ui/pagination/pagination-item.astro +11 -0
- package/src/components/ui/pagination/pagination-link.astro +41 -0
- package/src/components/ui/pagination/pagination-next.astro +27 -0
- package/src/components/ui/pagination/pagination-previous.astro +27 -0
- package/src/components/ui/pagination/pagination.astro +19 -0
- package/src/components/ui/popover/popover-content.astro +2 -1
- package/src/components/ui/popover/popover.astro +9 -2
- package/src/components/ui/radio-group/radio-group.astro +8 -2
- package/src/components/ui/resizable/index.ts +4 -0
- package/src/components/ui/resizable/resizable-handle.astro +32 -0
- package/src/components/ui/resizable/resizable-panel.astro +36 -0
- package/src/components/ui/resizable/resizable.astro +43 -0
- package/src/components/ui/select/select-content.astro +2 -2
- package/src/components/ui/select/select.astro +11 -7
- package/src/components/ui/sheet/sheet.astro +8 -2
- package/src/components/ui/slider/slider.astro +9 -3
- package/src/components/ui/switch/switch.astro +8 -2
- package/src/components/ui/tabs/tabs-content.astro +1 -1
- package/src/components/ui/tabs/tabs-trigger.astro +3 -2
- package/src/components/ui/tabs/tabs.astro +8 -2
- package/src/components/ui/toast/index.ts +26 -0
- package/src/components/ui/toast/toast-action.astro +25 -0
- package/src/components/ui/toast/toast-close.astro +27 -0
- package/src/components/ui/toast/toast-content.astro +20 -0
- package/src/components/ui/toast/toast-description.astro +18 -0
- package/src/components/ui/toast/toast-icon.astro +37 -0
- package/src/components/ui/toast/toast-item.astro +28 -0
- package/src/components/ui/toast/toast-template.astro +11 -0
- package/src/components/ui/toast/toast-title.astro +17 -0
- package/src/components/ui/toast/toast-viewport.astro +20 -0
- package/src/components/ui/toast/toast.astro +51 -0
- package/src/components/ui/toast/toaster.astro +37 -0
- package/src/components/ui/toggle/toggle.astro +8 -2
- package/src/components/ui/toggle-group/index.ts +2 -0
- package/src/components/ui/toggle-group/toggle-group-item.astro +44 -0
- package/src/components/ui/toggle-group/toggle-group.astro +74 -0
- package/src/components/ui/tooltip/tooltip-content.astro +1 -1
- package/src/components/ui/tooltip/tooltip.astro +11 -2
- package/src/components/ui/typography/typeset.css +441 -0
- package/src/components/ui/typography/typography-a.astro +13 -22
- package/src/components/ui/typography/typography-blockquote.astro +4 -23
- package/src/components/ui/typography/typography-h1.astro +13 -26
- package/src/components/ui/typography/typography-h2.astro +13 -31
- package/src/components/ui/typography/typography-h3.astro +9 -26
- package/src/components/ui/typography/typography-h4.astro +9 -26
- package/src/components/ui/typography/typography-inline-code.astro +8 -27
- package/src/components/ui/typography/typography-lead.astro +4 -26
- package/src/components/ui/typography/typography-list-item.astro +4 -24
- package/src/components/ui/typography/typography-list.astro +10 -40
- package/src/components/ui/typography/typography-p.astro +9 -28
- package/src/components/ui/typography/typography-table-cell.astro +9 -40
- package/src/components/ui/typography/typography-table-head.astro +9 -35
- package/src/components/ui/typography/typography-table-row.astro +4 -23
- package/src/components/ui/typography/typography-table.astro +8 -28
- package/src/components/ui/typography/typography.astro +10 -283
- package/src/styles/global.css +2 -0
|
@@ -4,6 +4,7 @@ import type { HTMLAttributes } from "astro/types"
|
|
|
4
4
|
import { cn } from "@/lib/utils"
|
|
5
5
|
|
|
6
6
|
type Props = HTMLAttributes<"div"> & {
|
|
7
|
+
mountStrategy?: "lazy" | "eager"
|
|
7
8
|
defaultOpen?: boolean
|
|
8
9
|
open?: boolean
|
|
9
10
|
delay?: number
|
|
@@ -21,6 +22,7 @@ type Props = HTMLAttributes<"div"> & {
|
|
|
21
22
|
}
|
|
22
23
|
|
|
23
24
|
const {
|
|
25
|
+
mountStrategy,
|
|
24
26
|
class: className,
|
|
25
27
|
defaultOpen,
|
|
26
28
|
open,
|
|
@@ -42,6 +44,7 @@ const {
|
|
|
42
44
|
|
|
43
45
|
<div
|
|
44
46
|
data-slot="hover-card"
|
|
47
|
+
data-mount-strategy={mountStrategy}
|
|
45
48
|
data-default-open={defaultOpen}
|
|
46
49
|
data-controlled-open={open}
|
|
47
50
|
data-delay={delay}
|
|
@@ -63,14 +66,22 @@ const {
|
|
|
63
66
|
</div>
|
|
64
67
|
|
|
65
68
|
<script>
|
|
66
|
-
import { getDataBool } from "@data-slot/core"
|
|
69
|
+
import { getDataBool, getRoots, hasRootBinding } from "@data-slot/core"
|
|
67
70
|
import { createHoverCard } from "@data-slot/hover-card"
|
|
68
71
|
|
|
72
|
+
const controllers: ReturnType<typeof createHoverCard>[] = []
|
|
69
73
|
const initialize = () => {
|
|
70
|
-
document
|
|
71
|
-
|
|
72
|
-
|
|
74
|
+
for (const root of getRoots(document, "hover-card")) {
|
|
75
|
+
if (hasRootBinding(root, "@data-slot/hover-card")) continue
|
|
76
|
+
controllers.push(
|
|
77
|
+
createHoverCard(root, { open: getDataBool(root, "controlledOpen") })
|
|
78
|
+
)
|
|
79
|
+
}
|
|
73
80
|
}
|
|
74
81
|
initialize()
|
|
75
82
|
document.addEventListener("astro:page-load", initialize)
|
|
83
|
+
document.addEventListener("astro:before-swap", () => {
|
|
84
|
+
for (const controller of controllers) controller.destroy()
|
|
85
|
+
controllers.length = 0
|
|
86
|
+
})
|
|
76
87
|
</script>
|
|
@@ -29,7 +29,7 @@ const {
|
|
|
29
29
|
data-align={align}
|
|
30
30
|
data-align-offset={alignOffset}
|
|
31
31
|
class={cn(
|
|
32
|
-
"isolate z-
|
|
32
|
+
"isolate z-[1000] h-(--positioner-height) w-(--positioner-width) max-w-(--available-width) transition-[top,left,right,bottom] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] data-instant:transition-none data-[side=bottom]:before:top-[-10px] data-[side=bottom]:before:right-0 data-[side=bottom]:before:left-0",
|
|
33
33
|
className
|
|
34
34
|
)}
|
|
35
35
|
>
|
|
@@ -6,6 +6,7 @@ import { cn } from "@/lib/utils"
|
|
|
6
6
|
import NavigationMenuPositioner from "./navigation-menu-positioner.astro"
|
|
7
7
|
|
|
8
8
|
type Props = HTMLAttributes<"nav"> & {
|
|
9
|
+
mountStrategy?: "lazy" | "eager"
|
|
9
10
|
delayOpen?: number
|
|
10
11
|
delayClose?: number
|
|
11
12
|
openOnFocus?: boolean
|
|
@@ -19,13 +20,14 @@ type Props = HTMLAttributes<"nav"> & {
|
|
|
19
20
|
}
|
|
20
21
|
|
|
21
22
|
const {
|
|
23
|
+
mountStrategy,
|
|
22
24
|
class: className = "",
|
|
23
25
|
delayOpen = 0,
|
|
24
26
|
delayClose = 0,
|
|
25
27
|
openOnFocus,
|
|
26
28
|
side = "bottom",
|
|
27
29
|
align = "start",
|
|
28
|
-
sideOffset =
|
|
30
|
+
sideOffset = 8,
|
|
29
31
|
alignOffset = 0,
|
|
30
32
|
positionMethod = "absolute",
|
|
31
33
|
safeTriangle,
|
|
@@ -37,6 +39,7 @@ const {
|
|
|
37
39
|
<nav
|
|
38
40
|
{...props}
|
|
39
41
|
data-slot="navigation-menu"
|
|
42
|
+
data-mount-strategy={mountStrategy}
|
|
40
43
|
data-delay-open={delayOpen}
|
|
41
44
|
data-delay-close={delayClose}
|
|
42
45
|
data-open-on-focus={openOnFocus}
|
|
@@ -53,12 +56,18 @@ const {
|
|
|
53
56
|
)}
|
|
54
57
|
>
|
|
55
58
|
<slot />
|
|
56
|
-
<NavigationMenuPositioner
|
|
59
|
+
<NavigationMenuPositioner {side} {sideOffset} {align} {alignOffset} />
|
|
57
60
|
</nav>
|
|
58
61
|
|
|
59
62
|
<script>
|
|
60
63
|
import { create } from "@data-slot/navigation-menu"
|
|
61
64
|
|
|
62
|
-
create
|
|
63
|
-
|
|
65
|
+
const controllers: ReturnType<typeof create> = []
|
|
66
|
+
const initialize = () => controllers.push(...create())
|
|
67
|
+
initialize()
|
|
68
|
+
document.addEventListener("astro:page-load", initialize)
|
|
69
|
+
document.addEventListener("astro:before-swap", () => {
|
|
70
|
+
for (const controller of controllers) controller.destroy()
|
|
71
|
+
controllers.length = 0
|
|
72
|
+
})
|
|
64
73
|
</script>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { default as Pagination } from "./pagination.astro"
|
|
2
|
+
export { default as PaginationContent } from "./pagination-content.astro"
|
|
3
|
+
export { default as PaginationEllipsis } from "./pagination-ellipsis.astro"
|
|
4
|
+
export { default as PaginationItem } from "./pagination-item.astro"
|
|
5
|
+
export { default as PaginationLink } from "./pagination-link.astro"
|
|
6
|
+
export { default as PaginationNext } from "./pagination-next.astro"
|
|
7
|
+
export { default as PaginationPrevious } from "./pagination-previous.astro"
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
---
|
|
2
|
+
import type { HTMLAttributes } from "astro/types"
|
|
3
|
+
|
|
4
|
+
import { cn } from "@/lib/utils"
|
|
5
|
+
|
|
6
|
+
type Props = HTMLAttributes<"ul">
|
|
7
|
+
|
|
8
|
+
const { class: className, ...props } = Astro.props
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
<ul
|
|
12
|
+
data-slot="pagination-content"
|
|
13
|
+
class={cn("flex items-center gap-1", className)}
|
|
14
|
+
{...props}
|
|
15
|
+
>
|
|
16
|
+
<slot />
|
|
17
|
+
</ul>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
import type { HTMLAttributes } from "astro/types"
|
|
3
|
+
import EllipsisIcon from "@lucide/astro/icons/ellipsis"
|
|
4
|
+
|
|
5
|
+
import { cn } from "@/lib/utils"
|
|
6
|
+
|
|
7
|
+
type Props = HTMLAttributes<"span">
|
|
8
|
+
|
|
9
|
+
const { class: className, ...props } = Astro.props
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
<span
|
|
13
|
+
data-slot="pagination-ellipsis"
|
|
14
|
+
class={cn(
|
|
15
|
+
"flex size-9 items-center justify-center [&_svg:not([class*='size-'])]:size-4",
|
|
16
|
+
className
|
|
17
|
+
)}
|
|
18
|
+
{...props}
|
|
19
|
+
>
|
|
20
|
+
<EllipsisIcon aria-hidden="true" />
|
|
21
|
+
<span class="sr-only">More pages</span>
|
|
22
|
+
</span>
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
---
|
|
2
|
+
import type { HTMLAttributes } from "astro/types"
|
|
3
|
+
|
|
4
|
+
import { cn } from "@/lib/utils"
|
|
5
|
+
import { Button, type ButtonVariantProps } from "@/components/ui/button"
|
|
6
|
+
|
|
7
|
+
type Props = HTMLAttributes<"a"> & {
|
|
8
|
+
isActive?: boolean
|
|
9
|
+
disabled?: boolean
|
|
10
|
+
size?: ButtonVariantProps["size"]
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const {
|
|
14
|
+
class: className,
|
|
15
|
+
href,
|
|
16
|
+
isActive,
|
|
17
|
+
disabled,
|
|
18
|
+
size = "icon",
|
|
19
|
+
tabindex,
|
|
20
|
+
...props
|
|
21
|
+
} = Astro.props
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
<Button
|
|
25
|
+
as="a"
|
|
26
|
+
data-slot="pagination-link"
|
|
27
|
+
data-active={isActive ? "true" : undefined}
|
|
28
|
+
href={disabled ? undefined : href}
|
|
29
|
+
aria-current={isActive ? "page" : undefined}
|
|
30
|
+
aria-disabled={disabled ? "true" : undefined}
|
|
31
|
+
tabindex={disabled ? -1 : tabindex}
|
|
32
|
+
variant={isActive ? "outline" : "ghost"}
|
|
33
|
+
size={size}
|
|
34
|
+
class={cn(
|
|
35
|
+
"aria-disabled:pointer-events-none aria-disabled:opacity-50",
|
|
36
|
+
className
|
|
37
|
+
)}
|
|
38
|
+
{...props}
|
|
39
|
+
>
|
|
40
|
+
<slot />
|
|
41
|
+
</Button>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
import type { HTMLAttributes } from "astro/types"
|
|
3
|
+
import ChevronRightIcon from "@lucide/astro/icons/chevron-right"
|
|
4
|
+
|
|
5
|
+
import { cn } from "@/lib/utils"
|
|
6
|
+
import type { ButtonVariantProps } from "@/components/ui/button"
|
|
7
|
+
|
|
8
|
+
import PaginationLink from "./pagination-link.astro"
|
|
9
|
+
|
|
10
|
+
type Props = HTMLAttributes<"a"> & {
|
|
11
|
+
text?: string
|
|
12
|
+
disabled?: boolean
|
|
13
|
+
size?: ButtonVariantProps["size"]
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const { class: className, text = "Next", ...props } = Astro.props
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
<PaginationLink
|
|
20
|
+
aria-label="Go to next page"
|
|
21
|
+
size="default"
|
|
22
|
+
class={cn("pr-2!", className)}
|
|
23
|
+
{...props}
|
|
24
|
+
>
|
|
25
|
+
<span class="hidden sm:block">{text}</span>
|
|
26
|
+
<ChevronRightIcon data-icon="inline-end" class="rtl:rotate-180" />
|
|
27
|
+
</PaginationLink>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
import type { HTMLAttributes } from "astro/types"
|
|
3
|
+
import ChevronLeftIcon from "@lucide/astro/icons/chevron-left"
|
|
4
|
+
|
|
5
|
+
import { cn } from "@/lib/utils"
|
|
6
|
+
import type { ButtonVariantProps } from "@/components/ui/button"
|
|
7
|
+
|
|
8
|
+
import PaginationLink from "./pagination-link.astro"
|
|
9
|
+
|
|
10
|
+
type Props = HTMLAttributes<"a"> & {
|
|
11
|
+
text?: string
|
|
12
|
+
disabled?: boolean
|
|
13
|
+
size?: ButtonVariantProps["size"]
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const { class: className, text = "Previous", ...props } = Astro.props
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
<PaginationLink
|
|
20
|
+
aria-label="Go to previous page"
|
|
21
|
+
size="default"
|
|
22
|
+
class={cn("pl-2!", className)}
|
|
23
|
+
{...props}
|
|
24
|
+
>
|
|
25
|
+
<ChevronLeftIcon data-icon="inline-start" class="rtl:rotate-180" />
|
|
26
|
+
<span class="hidden sm:block">{text}</span>
|
|
27
|
+
</PaginationLink>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
---
|
|
2
|
+
import type { HTMLAttributes } from "astro/types"
|
|
3
|
+
|
|
4
|
+
import { cn } from "@/lib/utils"
|
|
5
|
+
|
|
6
|
+
type Props = HTMLAttributes<"nav">
|
|
7
|
+
|
|
8
|
+
const { class: className, ...props } = Astro.props
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
<nav
|
|
12
|
+
role="navigation"
|
|
13
|
+
aria-label="pagination"
|
|
14
|
+
data-slot="pagination"
|
|
15
|
+
class={cn("mx-auto flex w-full justify-center", className)}
|
|
16
|
+
{...props}
|
|
17
|
+
>
|
|
18
|
+
<slot />
|
|
19
|
+
</nav>
|
|
@@ -11,6 +11,7 @@ type Props = HTMLAttributes<"div"> & {
|
|
|
11
11
|
alignOffset?: number
|
|
12
12
|
avoidCollisions?: boolean
|
|
13
13
|
collisionPadding?: number
|
|
14
|
+
/** Compatibility alias. Prefer `side`. */
|
|
14
15
|
position?: PopoverSide
|
|
15
16
|
}
|
|
16
17
|
|
|
@@ -38,7 +39,7 @@ const {
|
|
|
38
39
|
data-avoid-collisions={avoidCollisions}
|
|
39
40
|
data-collision-padding={collisionPadding}
|
|
40
41
|
data-position={position}
|
|
41
|
-
class="isolate z-
|
|
42
|
+
class="isolate z-[1000]"
|
|
42
43
|
>
|
|
43
44
|
<div
|
|
44
45
|
data-slot="popover-content"
|
|
@@ -11,6 +11,7 @@ type Props = HTMLAttributes<"div"> & {
|
|
|
11
11
|
avoidCollisions?: boolean
|
|
12
12
|
collisionPadding?: number
|
|
13
13
|
portal?: boolean
|
|
14
|
+
/** Compatibility alias. Prefer `side`. */
|
|
14
15
|
position?: PopoverSide
|
|
15
16
|
closeOnClickOutside?: boolean
|
|
16
17
|
closeOnEscape?: boolean
|
|
@@ -55,6 +56,12 @@ const {
|
|
|
55
56
|
<script>
|
|
56
57
|
import { create } from "@data-slot/popover"
|
|
57
58
|
|
|
58
|
-
create
|
|
59
|
-
|
|
59
|
+
const controllers: ReturnType<typeof create> = []
|
|
60
|
+
const initialize = () => controllers.push(...create())
|
|
61
|
+
initialize()
|
|
62
|
+
document.addEventListener("astro:page-load", initialize)
|
|
63
|
+
document.addEventListener("astro:before-swap", () => {
|
|
64
|
+
for (const controller of controllers) controller.destroy()
|
|
65
|
+
controllers.length = 0
|
|
66
|
+
})
|
|
60
67
|
</script>
|
|
@@ -38,6 +38,12 @@ const {
|
|
|
38
38
|
<script>
|
|
39
39
|
import { create } from "@data-slot/radio-group"
|
|
40
40
|
|
|
41
|
-
create
|
|
42
|
-
|
|
41
|
+
const controllers: ReturnType<typeof create> = []
|
|
42
|
+
const initialize = () => controllers.push(...create())
|
|
43
|
+
initialize()
|
|
44
|
+
document.addEventListener("astro:page-load", initialize)
|
|
45
|
+
document.addEventListener("astro:before-swap", () => {
|
|
46
|
+
for (const controller of controllers) controller.destroy()
|
|
47
|
+
controllers.length = 0
|
|
48
|
+
})
|
|
43
49
|
</script>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
import type { HTMLAttributes } from "astro/types"
|
|
3
|
+
|
|
4
|
+
import { cn } from "@/lib/utils"
|
|
5
|
+
|
|
6
|
+
type Props = HTMLAttributes<"div"> & {
|
|
7
|
+
withHandle?: boolean
|
|
8
|
+
disabled?: boolean
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const { class: className, withHandle, disabled, ...props } = Astro.props
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
<div
|
|
15
|
+
data-slot="resizable-handle"
|
|
16
|
+
data-disabled={disabled ? "true" : undefined}
|
|
17
|
+
class={cn(
|
|
18
|
+
"bg-border ring-offset-background focus-visible:ring-ring data-[active]:bg-ring relative flex w-px shrink-0 items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:outline-hidden aria-[orientation=horizontal]:h-px aria-[orientation=horizontal]:w-full aria-[orientation=horizontal]:after:inset-x-0 aria-[orientation=horizontal]:after:top-1/2 aria-[orientation=horizontal]:after:h-1 aria-[orientation=horizontal]:after:w-full aria-[orientation=horizontal]:after:translate-x-0 aria-[orientation=horizontal]:after:-translate-y-1/2 data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&[aria-orientation=horizontal]>div]:rotate-90",
|
|
19
|
+
className
|
|
20
|
+
)}
|
|
21
|
+
{...props}
|
|
22
|
+
>
|
|
23
|
+
{
|
|
24
|
+
withHandle && (
|
|
25
|
+
<div
|
|
26
|
+
data-slot="resizable-handle-indicator"
|
|
27
|
+
aria-hidden="true"
|
|
28
|
+
class="bg-border z-10 flex h-6 w-1 shrink-0 rounded-lg"
|
|
29
|
+
/>
|
|
30
|
+
)
|
|
31
|
+
}
|
|
32
|
+
</div>
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
import type { HTMLAttributes } from "astro/types"
|
|
3
|
+
|
|
4
|
+
import { cn } from "@/lib/utils"
|
|
5
|
+
|
|
6
|
+
type Props = HTMLAttributes<"div"> & {
|
|
7
|
+
defaultSize?: number
|
|
8
|
+
minSize?: number
|
|
9
|
+
maxSize?: number
|
|
10
|
+
collapsible?: boolean
|
|
11
|
+
collapsedSize?: number
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const {
|
|
15
|
+
class: className,
|
|
16
|
+
defaultSize,
|
|
17
|
+
minSize,
|
|
18
|
+
maxSize,
|
|
19
|
+
collapsible,
|
|
20
|
+
collapsedSize,
|
|
21
|
+
...props
|
|
22
|
+
} = Astro.props
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
<div
|
|
26
|
+
data-slot="resizable-panel"
|
|
27
|
+
data-default-size={defaultSize}
|
|
28
|
+
data-min-size={minSize}
|
|
29
|
+
data-max-size={maxSize}
|
|
30
|
+
data-collapsible={collapsible}
|
|
31
|
+
data-collapsed-size={collapsedSize}
|
|
32
|
+
class={cn("min-h-0 min-w-0", className)}
|
|
33
|
+
{...props}
|
|
34
|
+
>
|
|
35
|
+
<slot />
|
|
36
|
+
</div>
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
---
|
|
2
|
+
import type { HTMLAttributes } from "astro/types"
|
|
3
|
+
|
|
4
|
+
import { cn } from "@/lib/utils"
|
|
5
|
+
|
|
6
|
+
type Props = HTMLAttributes<"div"> & {
|
|
7
|
+
direction?: "horizontal" | "vertical"
|
|
8
|
+
keyboardResizeBy?: number
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const {
|
|
12
|
+
class: className,
|
|
13
|
+
direction = "horizontal",
|
|
14
|
+
keyboardResizeBy,
|
|
15
|
+
...props
|
|
16
|
+
} = Astro.props
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
<div
|
|
20
|
+
data-slot="resizable"
|
|
21
|
+
data-direction={direction}
|
|
22
|
+
data-keyboard-resize-by={keyboardResizeBy}
|
|
23
|
+
class={cn(
|
|
24
|
+
"group/resizable flex h-full w-full data-[direction=vertical]:flex-col",
|
|
25
|
+
className
|
|
26
|
+
)}
|
|
27
|
+
{...props}
|
|
28
|
+
>
|
|
29
|
+
<slot />
|
|
30
|
+
</div>
|
|
31
|
+
|
|
32
|
+
<script>
|
|
33
|
+
import { create } from "@data-slot/resizable"
|
|
34
|
+
|
|
35
|
+
const controllers: ReturnType<typeof create> = []
|
|
36
|
+
const initialize = () => controllers.push(...create())
|
|
37
|
+
initialize()
|
|
38
|
+
document.addEventListener("astro:page-load", initialize)
|
|
39
|
+
document.addEventListener("astro:before-swap", () => {
|
|
40
|
+
for (const controller of controllers) controller.destroy()
|
|
41
|
+
controllers.length = 0
|
|
42
|
+
})
|
|
43
|
+
</script>
|
|
@@ -38,7 +38,7 @@ const {
|
|
|
38
38
|
data-align-offset={alignOffset}
|
|
39
39
|
data-avoid-collisions={avoidCollisions}
|
|
40
40
|
data-collision-padding={collisionPadding}
|
|
41
|
-
class="isolate z-
|
|
41
|
+
class="isolate z-[1000]"
|
|
42
42
|
>
|
|
43
43
|
<div
|
|
44
44
|
data-slot="select-content"
|
|
@@ -52,7 +52,7 @@ const {
|
|
|
52
52
|
data-collision-padding={collisionPadding}
|
|
53
53
|
hidden={hidden}
|
|
54
54
|
class={cn(
|
|
55
|
-
"bg-popover text-popover-foreground ring-foreground/10 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 relative isolate z-
|
|
55
|
+
"bg-popover text-popover-foreground ring-foreground/10 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 relative isolate z-[1000] max-h-(--available-height) w-(--anchor-width) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-md shadow-md ring-1 duration-100 outline-none data-[align-trigger=true]:animate-none",
|
|
56
56
|
className
|
|
57
57
|
)}
|
|
58
58
|
{...props}
|
|
@@ -5,6 +5,7 @@ import type { Align, Position, Side } from "@data-slot/select"
|
|
|
5
5
|
import { cn } from "@/lib/utils"
|
|
6
6
|
|
|
7
7
|
type Props = HTMLAttributes<"div"> & {
|
|
8
|
+
mountStrategy?: "lazy" | "eager"
|
|
8
9
|
defaultValue?: string
|
|
9
10
|
defaultOpen?: boolean
|
|
10
11
|
placeholder?: string
|
|
@@ -23,6 +24,7 @@ type Props = HTMLAttributes<"div"> & {
|
|
|
23
24
|
}
|
|
24
25
|
|
|
25
26
|
const {
|
|
27
|
+
mountStrategy,
|
|
26
28
|
class: className,
|
|
27
29
|
defaultValue,
|
|
28
30
|
defaultOpen,
|
|
@@ -45,6 +47,7 @@ const {
|
|
|
45
47
|
|
|
46
48
|
<div
|
|
47
49
|
data-slot="select"
|
|
50
|
+
data-mount-strategy={mountStrategy}
|
|
48
51
|
data-default-value={defaultValue}
|
|
49
52
|
data-default-open={defaultOpen}
|
|
50
53
|
data-placeholder={placeholder}
|
|
@@ -72,11 +75,12 @@ const {
|
|
|
72
75
|
<script>
|
|
73
76
|
import { create } from "@data-slot/select"
|
|
74
77
|
|
|
75
|
-
const
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
78
|
+
const controllers: ReturnType<typeof create> = []
|
|
79
|
+
const initialize = () => controllers.push(...create())
|
|
80
|
+
initialize()
|
|
81
|
+
document.addEventListener("astro:page-load", initialize)
|
|
82
|
+
document.addEventListener("astro:before-swap", () => {
|
|
83
|
+
for (const controller of controllers) controller.destroy()
|
|
84
|
+
controllers.length = 0
|
|
85
|
+
})
|
|
82
86
|
</script>
|
|
@@ -33,6 +33,12 @@ const {
|
|
|
33
33
|
<script>
|
|
34
34
|
import { create } from "@data-slot/dialog"
|
|
35
35
|
|
|
36
|
-
create
|
|
37
|
-
|
|
36
|
+
const controllers: ReturnType<typeof create> = []
|
|
37
|
+
const initialize = () => controllers.push(...create())
|
|
38
|
+
initialize()
|
|
39
|
+
document.addEventListener("astro:page-load", initialize)
|
|
40
|
+
document.addEventListener("astro:before-swap", () => {
|
|
41
|
+
for (const controller of controllers) controller.destroy()
|
|
42
|
+
controllers.length = 0
|
|
43
|
+
})
|
|
38
44
|
</script>
|
|
@@ -3,7 +3,7 @@ import type { HTMLAttributes } from "astro/types"
|
|
|
3
3
|
|
|
4
4
|
import { cn } from "@/lib/utils"
|
|
5
5
|
|
|
6
|
-
type SliderValue = number | [number, number]
|
|
6
|
+
type SliderValue = number | [number, number]
|
|
7
7
|
type ThumbAlignment = "center" | "edge" | "edge-client-only"
|
|
8
8
|
|
|
9
9
|
type Props = HTMLAttributes<"div"> & {
|
|
@@ -82,6 +82,12 @@ const thumbCount = String(serializedDefaultValue ?? "").includes(",") ? 2 : 1
|
|
|
82
82
|
<script>
|
|
83
83
|
import { create } from "@data-slot/slider"
|
|
84
84
|
|
|
85
|
-
create
|
|
86
|
-
|
|
85
|
+
const controllers: ReturnType<typeof create> = []
|
|
86
|
+
const initialize = () => controllers.push(...create())
|
|
87
|
+
initialize()
|
|
88
|
+
document.addEventListener("astro:page-load", initialize)
|
|
89
|
+
document.addEventListener("astro:before-swap", () => {
|
|
90
|
+
for (const controller of controllers) controller.destroy()
|
|
91
|
+
controllers.length = 0
|
|
92
|
+
})
|
|
87
93
|
</script>
|
|
@@ -69,6 +69,12 @@ const switchSizeStyle = {
|
|
|
69
69
|
<script>
|
|
70
70
|
import { create } from "@data-slot/switch"
|
|
71
71
|
|
|
72
|
-
create
|
|
73
|
-
|
|
72
|
+
const controllers: ReturnType<typeof create> = []
|
|
73
|
+
const initialize = () => controllers.push(...create())
|
|
74
|
+
initialize()
|
|
75
|
+
document.addEventListener("astro:page-load", initialize)
|
|
76
|
+
document.addEventListener("astro:before-swap", () => {
|
|
77
|
+
for (const controller of controllers) controller.destroy()
|
|
78
|
+
controllers.length = 0
|
|
79
|
+
})
|
|
74
80
|
</script>
|
|
@@ -4,14 +4,15 @@ import type { HTMLAttributes } from "astro/types"
|
|
|
4
4
|
import { cn } from "@/lib/utils"
|
|
5
5
|
|
|
6
6
|
type Props = HTMLAttributes<"button"> & {
|
|
7
|
-
value
|
|
7
|
+
value: string
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
const { class: className, value, ...props } = Astro.props
|
|
10
|
+
const { class: className, value, type = "button", ...props } = Astro.props
|
|
11
11
|
---
|
|
12
12
|
|
|
13
13
|
<button
|
|
14
14
|
data-slot="tabs-trigger"
|
|
15
|
+
type={type}
|
|
15
16
|
data-value={value}
|
|
16
17
|
class={cn(
|
|
17
18
|
"text-foreground/60 hover:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:text-muted-foreground dark:hover:text-foreground relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-disabled:pointer-events-none aria-disabled:opacity-50 group-data-[variant=default]/tabs-list:data-[state=active]:shadow-sm group-data-[variant=line]/tabs-list:data-[state=active]:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
@@ -34,6 +34,12 @@ const {
|
|
|
34
34
|
<script>
|
|
35
35
|
import { create } from "@data-slot/tabs"
|
|
36
36
|
|
|
37
|
-
create
|
|
38
|
-
|
|
37
|
+
const controllers: ReturnType<typeof create> = []
|
|
38
|
+
const initialize = () => controllers.push(...create())
|
|
39
|
+
initialize()
|
|
40
|
+
document.addEventListener("astro:page-load", initialize)
|
|
41
|
+
document.addEventListener("astro:before-swap", () => {
|
|
42
|
+
for (const controller of controllers) controller.destroy()
|
|
43
|
+
controllers.length = 0
|
|
44
|
+
})
|
|
39
45
|
</script>
|