fulldev-ui 0.9.2 → 0.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.
- package/CHANGELOG.md +12 -0
- package/README.md +100 -16
- package/package.json +3 -2
- package/public/r/accordion.json +3 -5
- package/public/r/alert-dialog.json +1 -1
- package/public/r/alert.json +0 -5
- package/public/r/article-1.json +1 -1
- package/public/r/article-2.json +1 -1
- package/public/r/articles-1.json +1 -1
- package/public/r/articles-2.json +1 -1
- package/public/r/articles-3.json +1 -1
- package/public/r/avatar.json +1 -16
- package/public/r/badge.json +1 -1
- package/public/r/banner-1.json +5 -3
- package/public/r/banner-2.json +1 -1
- package/public/r/banner.json +5 -3
- package/public/r/blocks-1.json +6 -3
- package/public/r/breadcrumb.json +4 -4
- package/public/r/button.json +1 -1
- package/public/r/card.json +4 -4
- package/public/r/carousel.json +5 -5
- package/public/r/checkbox.json +1 -1
- package/public/r/combobox.json +8 -8
- package/public/r/command.json +6 -6
- package/public/r/components.json +1 -6
- package/public/r/contact-1.json +4 -2
- package/public/r/contact-2.json +4 -2
- package/public/r/contact-3.json +11 -3
- package/public/r/content-1.json +11 -3
- package/public/r/content-2.json +11 -3
- package/public/r/content-3.json +7 -1
- package/public/r/content-4.json +11 -3
- package/public/r/cta-2.json +7 -1
- package/public/r/cta-4.json +7 -1
- package/public/r/cta-5.json +11 -3
- package/public/r/cta-6.json +7 -1
- package/public/r/dialog.json +6 -6
- package/public/r/doc-1.json +6 -3
- package/public/r/dropdown-menu.json +9 -11
- package/public/r/features-1.json +5 -3
- package/public/r/features-2.json +5 -3
- package/public/r/features-4.json +5 -3
- package/public/r/features-5.json +4 -2
- package/public/r/field.json +2 -7
- package/public/r/footer-1.json +5 -3
- package/public/r/footer-2.json +5 -3
- package/public/r/footer-3.json +5 -3
- package/public/r/header-1.json +1 -1
- package/public/r/header.json +3 -0
- package/public/r/hero-13.json +1 -1
- package/public/r/hero-4.json +5 -3
- package/public/r/hero-5.json +5 -3
- package/public/r/hero-6.json +5 -3
- package/public/r/hero-7.json +5 -3
- package/public/r/hero-8.json +1 -1
- package/public/r/hero-9.json +5 -3
- package/public/r/hover-card.json +2 -2
- package/public/r/icon.json +1 -1
- package/public/r/input-group.json +1 -1
- package/public/r/item.json +2 -20
- package/public/r/kbd.json +2 -2
- package/public/r/layout.json +4 -7
- package/public/r/links-2.json +5 -3
- package/public/r/marquee.json +1 -1
- package/public/r/native-select.json +3 -3
- package/public/r/navigation-menu.json +6 -8
- package/public/r/page.json +17 -0
- package/public/r/popover.json +1 -1
- package/public/r/pricing-1.json +5 -3
- package/public/r/pricing-2.json +5 -3
- package/public/r/pricing-3.json +5 -3
- package/public/r/products-1.json +1 -1
- package/public/r/products-4.json +1 -1
- package/public/r/products-5.json +1 -1
- package/public/r/radio-group.json +1 -1
- package/public/r/rating.json +3 -3
- package/public/r/registry.json +186 -440
- package/public/r/reviews-1.json +5 -3
- package/public/r/reviews-2.json +5 -3
- package/public/r/reviews-3.json +5 -3
- package/public/r/reviews-4.json +1 -1
- package/public/r/reviews-5.json +5 -3
- package/public/r/select.json +6 -8
- package/public/r/services-1.json +11 -3
- package/public/r/services-2.json +7 -1
- package/public/r/services-3.json +7 -1
- package/public/r/services-4.json +11 -3
- package/public/r/services-5.json +5 -3
- package/public/r/services-6.json +11 -3
- package/public/r/services-7.json +11 -3
- package/public/r/sheet.json +6 -3
- package/public/r/sidebar-1.json +4 -2
- package/public/r/sidebar.json +10 -7
- package/public/r/slider.json +1 -1
- package/public/r/spinner.json +3 -3
- package/public/r/switch.json +1 -1
- package/public/r/theme-toggle.json +5 -3
- package/public/r/tooltip.json +1 -1
- package/public/r/typography.json +16 -16
- package/public/r/video.json +1 -1
- package/registry.json +186 -440
- package/src/components/blocks/article-1.astro +1 -1
- package/src/components/blocks/article-2.astro +1 -1
- package/src/components/blocks/articles-1.astro +1 -1
- package/src/components/blocks/articles-2.astro +2 -2
- package/src/components/blocks/articles-3.astro +1 -1
- package/src/components/blocks/banner-1.astro +3 -5
- package/src/components/blocks/banner-2.astro +1 -1
- package/src/components/blocks/blocks-1.astro +25 -37
- package/src/components/blocks/contact-3.astro +4 -3
- package/src/components/blocks/content-1.astro +5 -4
- package/src/components/blocks/content-2.astro +6 -5
- package/src/components/blocks/content-3.astro +9 -2
- package/src/components/blocks/content-4.astro +6 -5
- package/src/components/blocks/cta-2.astro +4 -3
- package/src/components/blocks/cta-4.astro +3 -2
- package/src/components/blocks/cta-5.astro +6 -5
- package/src/components/blocks/cta-6.astro +4 -3
- package/src/components/blocks/doc-1.astro +28 -56
- package/src/components/blocks/features-1.astro +3 -1
- package/src/components/blocks/features-2.astro +4 -2
- package/src/components/blocks/features-4.astro +3 -1
- package/src/components/blocks/footer-1.astro +26 -12
- package/src/components/blocks/footer-2.astro +24 -12
- package/src/components/blocks/footer-3.astro +26 -12
- package/src/components/blocks/header-1.astro +2 -3
- package/src/components/blocks/hero-13.astro +1 -1
- package/src/components/blocks/hero-4.astro +2 -2
- package/src/components/blocks/hero-5.astro +3 -3
- package/src/components/blocks/hero-6.astro +3 -3
- package/src/components/blocks/hero-7.astro +3 -3
- package/src/components/blocks/hero-8.astro +1 -1
- package/src/components/blocks/hero-9.astro +2 -2
- package/src/components/blocks/links-2.astro +3 -5
- package/src/components/blocks/pricing-1.astro +3 -2
- package/src/components/blocks/pricing-2.astro +3 -2
- package/src/components/blocks/pricing-3.astro +3 -2
- package/src/components/blocks/products-1.astro +1 -1
- package/src/components/blocks/products-4.astro +2 -2
- package/src/components/blocks/products-5.astro +4 -4
- package/src/components/blocks/reviews-1.astro +2 -2
- package/src/components/blocks/reviews-2.astro +2 -2
- package/src/components/blocks/reviews-3.astro +2 -2
- package/src/components/blocks/reviews-4.astro +4 -4
- package/src/components/blocks/reviews-5.astro +16 -25
- package/src/components/blocks/services-1.astro +7 -9
- package/src/components/blocks/services-2.astro +5 -4
- package/src/components/blocks/services-3.astro +6 -5
- package/src/components/blocks/services-4.astro +7 -9
- package/src/components/blocks/services-5.astro +3 -4
- package/src/components/blocks/services-6.astro +7 -6
- package/src/components/blocks/services-7.astro +7 -9
- package/src/components/blocks/sidebar-1.astro +42 -97
- package/src/components/ui/accordion/accordion-trigger.astro +7 -8
- package/src/components/ui/alert-dialog/alert-dialog.astro +23 -3
- package/src/components/ui/avatar/avatar.astro +1 -1
- package/src/components/ui/badge/badge.astro +1 -0
- package/src/components/ui/banner/banner-container.astro +3 -3
- package/src/components/ui/breadcrumb/breadcrumb-ellipsis.astro +2 -2
- package/src/components/ui/breadcrumb/breadcrumb-separator.astro +2 -2
- package/src/components/ui/button/button-variants.ts +8 -7
- package/src/components/ui/card/card-content.astro +1 -1
- package/src/components/ui/card/card-footer.astro +1 -1
- package/src/components/ui/card/card-header.astro +1 -1
- package/src/components/ui/card/card.astro +1 -1
- package/src/components/ui/carousel/carousel-next.astro +3 -3
- package/src/components/ui/carousel/carousel-previous.astro +3 -3
- package/src/components/ui/checkbox/checkbox.astro +1 -1
- package/src/components/ui/combobox/combobox-input.astro +2 -2
- package/src/components/ui/combobox/combobox-item.astro +4 -4
- package/src/components/ui/combobox/combobox-list.astro +1 -1
- package/src/components/ui/combobox/combobox-trigger.astro +2 -5
- package/src/components/ui/combobox/combobox.astro +3 -0
- package/src/components/ui/command/command-dialog.astro +10 -10
- package/src/components/ui/command/command-input.astro +2 -2
- package/src/components/ui/command/command-item.astro +4 -5
- package/src/components/ui/dialog/dialog-close.astro +2 -2
- package/src/components/ui/dialog/dialog-content.astro +2 -2
- package/src/components/ui/dialog/dialog.astro +26 -3
- package/src/components/ui/dropdown-menu/dropdown-menu-checkbox-item.astro +4 -5
- package/src/components/ui/dropdown-menu/dropdown-menu-content.astro +4 -4
- package/src/components/ui/dropdown-menu/dropdown-menu-item.astro +1 -1
- package/src/components/ui/dropdown-menu/dropdown-menu-label.astro +1 -1
- package/src/components/ui/dropdown-menu/dropdown-menu-radio-item.astro +4 -5
- package/src/components/ui/dropdown-menu/dropdown-menu-shortcut.astro +1 -1
- package/src/components/ui/dropdown-menu/dropdown-menu.astro +3 -0
- package/src/components/ui/field/field-label.astro +1 -1
- package/src/components/ui/field/field-title.astro +1 -1
- package/src/components/ui/hover-card/hover-card-content.astro +4 -4
- package/src/components/ui/hover-card/hover-card.astro +2 -2
- package/src/components/ui/icon/icon.astro +7 -10
- package/src/components/ui/input-group/input-group-button.astro +0 -1
- package/src/components/ui/item/item-media.astro +1 -1
- package/src/components/ui/item/item.astro +0 -18
- package/src/components/ui/kbd/kbd-group.astro +1 -1
- package/src/components/ui/kbd/kbd.astro +1 -1
- package/src/components/ui/layout/layout-body.astro +1 -1
- package/src/components/ui/layout/layout-head.astro +3 -2
- package/src/components/ui/layout/layout-main.astro +1 -1
- package/src/components/ui/layout/layout.astro +4 -0
- package/src/components/ui/marquee/marquee.astro +49 -68
- package/src/components/ui/native-select/native-select.astro +2 -3
- package/src/components/ui/navigation-menu/navigation-menu-content.astro +1 -1
- package/src/components/ui/navigation-menu/navigation-menu-list.astro +1 -1
- package/src/components/ui/navigation-menu/navigation-menu-trigger.astro +2 -3
- package/src/components/ui/navigation-menu/navigation-menu.astro +1 -1
- package/src/components/ui/popover/popover-content.astro +1 -1
- package/src/components/ui/radio-group/radio-group-item.astro +3 -3
- package/src/components/ui/rating/rating.astro +3 -3
- package/src/components/ui/select/select-content.astro +1 -1
- package/src/components/ui/select/select-item.astro +4 -4
- package/src/components/ui/select/select-trigger.astro +3 -6
- package/src/components/ui/select/select.astro +6 -0
- package/src/components/ui/sheet/sheet-content.astro +4 -5
- package/src/components/ui/sidebar/sidebar-menu-button.astro +13 -10
- package/src/components/ui/sidebar/sidebar-menu-sub-button.astro +10 -8
- package/src/components/ui/sidebar/sidebar-provider.astro +1 -13
- package/src/components/ui/sidebar/sidebar-rail.astro +1 -1
- package/src/components/ui/sidebar/sidebar-trigger.astro +3 -3
- package/src/components/ui/sidebar/sidebar.astro +1 -1
- package/src/components/ui/slider/slider.astro +6 -4
- package/src/components/ui/spinner/spinner.astro +4 -4
- package/src/components/ui/switch/switch.astro +1 -1
- package/src/components/ui/theme-toggle/theme-toggle.astro +4 -3
- package/src/components/ui/tooltip/tooltip-content.astro +1 -1
- package/src/components/ui/typography/typography-a.astro +19 -4
- package/src/components/ui/typography/typography-blockquote.astro +26 -6
- package/src/components/ui/typography/typography-h1.astro +7 -9
- package/src/components/ui/typography/typography-h2.astro +12 -9
- package/src/components/ui/typography/typography-h3.astro +7 -9
- package/src/components/ui/typography/typography-h4.astro +7 -9
- package/src/components/ui/typography/typography-inline-code.astro +28 -12
- package/src/components/ui/typography/typography-lead.astro +29 -4
- package/src/components/ui/typography/typography-list-item.astro +25 -9
- package/src/components/ui/typography/typography-list.astro +29 -11
- package/src/components/ui/typography/typography-p.astro +26 -6
- package/src/components/ui/typography/typography-table-cell.astro +32 -13
- package/src/components/ui/typography/typography-table-head.astro +27 -13
- package/src/components/ui/typography/typography-table-row.astro +23 -13
- package/src/components/ui/typography/typography-table.astro +29 -20
- package/src/components/ui/typography/typography.astro +172 -46
- package/src/components/ui/video/video.astro +11 -27
- package/src/styles/global.css +2 -15
- package/public/r/beta-repo-setup.json +0 -131
- package/public/r/blocks.json +0 -91
- package/public/r/content-5.json +0 -17
- package/public/r/content-6.json +0 -17
- package/public/r/init.json +0 -23
- package/public/r/tile.json +0 -27
- package/src/components/blocks/content-5.astro +0 -115
- package/src/components/blocks/content-6.astro +0 -91
- package/src/components/ui/tile/index.ts +0 -3
- package/src/components/ui/tile/tile-content.astro +0 -17
- package/src/components/ui/tile/tile-group.astro +0 -76
- package/src/components/ui/tile/tile.astro +0 -46
|
@@ -1,81 +1,73 @@
|
|
|
1
1
|
---
|
|
2
|
-
import {
|
|
2
|
+
import type { HTMLAttributes } from "astro/types"
|
|
3
|
+
import { cva, type VariantProps } from "class-variance-authority"
|
|
3
4
|
|
|
4
5
|
import { cn } from "@/lib/utils"
|
|
5
6
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
7
|
+
const trackVariants = cva(
|
|
8
|
+
"flex min-w-max shrink-0 [animation:marquee_var(--marquee-duration)_linear_infinite] items-center gap-[var(--marquee-gap)] before:block before:size-0 before:shrink-0 before:content-['']",
|
|
9
|
+
{
|
|
10
|
+
variants: {
|
|
11
|
+
direction: {
|
|
12
|
+
left: "",
|
|
13
|
+
right: "[animation-direction:reverse]",
|
|
14
|
+
},
|
|
15
|
+
pauseOnHover: {
|
|
16
|
+
true: "group-hover/marquee:[animation-play-state:paused]",
|
|
17
|
+
false: "",
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
defaultVariants: {
|
|
21
|
+
direction: "left",
|
|
22
|
+
pauseOnHover: false,
|
|
23
|
+
},
|
|
24
|
+
}
|
|
25
|
+
)
|
|
26
|
+
|
|
27
|
+
type Props = HTMLAttributes<"div"> &
|
|
28
|
+
VariantProps<typeof trackVariants> & {
|
|
29
|
+
duration?: string
|
|
30
|
+
gap?: string
|
|
31
|
+
infinite?: boolean
|
|
32
|
+
}
|
|
17
33
|
|
|
18
34
|
const {
|
|
19
|
-
class: className
|
|
20
|
-
direction
|
|
21
|
-
|
|
22
|
-
|
|
35
|
+
class: className,
|
|
36
|
+
direction,
|
|
37
|
+
pauseOnHover,
|
|
38
|
+
duration = "40s",
|
|
39
|
+
gap = "1.5rem",
|
|
23
40
|
infinite = true,
|
|
24
|
-
pauseOnHover = false,
|
|
25
41
|
style,
|
|
26
|
-
time = 30,
|
|
27
|
-
variant = "gradient",
|
|
28
42
|
...props
|
|
29
43
|
} = Astro.props
|
|
30
44
|
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
"marquee-content flex min-w-full shrink-0 justify-around gap-[var(--gap)] will-change-transform group-data-[direction=bottom]:[animation-direction:reverse] group-data-[direction=right]:[animation-direction:reverse] data-[direction=bottom]:min-h-full data-[direction=bottom]:flex-col data-[direction=top]:min-h-full data-[direction=top]:flex-col motion-reduce:[animation-play-state:paused]",
|
|
39
|
-
infinite &&
|
|
40
|
-
"animate-[marquee-x_var(--duration,20s)_linear_infinite] group-data-[direction=bottom]:animate-[marquee-y_var(--duration,20s)_linear_infinite] group-data-[direction=top]:animate-[marquee-y_var(--duration,20s)_linear_infinite]",
|
|
41
|
-
direction === "top" && "flex-col",
|
|
42
|
-
direction === "bottom" && "flex-col"
|
|
43
|
-
)
|
|
44
|
-
|
|
45
|
-
const marqueeVariants = cva("relative w-full", {
|
|
46
|
-
variants: {
|
|
47
|
-
variant: {
|
|
48
|
-
gradient:
|
|
49
|
-
"[mask-image:linear-gradient(to_right,transparent,black_10%,black_90%,transparent)] [-webkit-mask-image:linear-gradient(to_right,transparent,black_10%,black_90%,transparent)] [&[data-direction=bottom]]:[mask-image:linear-gradient(to_top,transparent,black_10%,black_90%,transparent)] [&[data-direction=bottom]]:[-webkit-mask-image:linear-gradient(to_top,transparent,black_10%,black_90%,transparent)] [&[data-direction=top]]:[mask-image:linear-gradient(to_bottom,transparent,black_10%,black_90%,transparent)] [&[data-direction=top]]:[-webkit-mask-image:linear-gradient(to_bottom,transparent,black_10%,black_90%,transparent)]",
|
|
50
|
-
solid: "",
|
|
51
|
-
},
|
|
52
|
-
},
|
|
53
|
-
defaultVariants: {
|
|
54
|
-
variant: "gradient",
|
|
55
|
-
},
|
|
56
|
-
})
|
|
45
|
+
const resolvedStyle = [
|
|
46
|
+
`--marquee-duration:${duration}`,
|
|
47
|
+
`--marquee-gap:${gap}`,
|
|
48
|
+
typeof style === "string" ? style : undefined,
|
|
49
|
+
]
|
|
50
|
+
.filter(Boolean)
|
|
51
|
+
.join(";")
|
|
57
52
|
---
|
|
58
53
|
|
|
59
54
|
<div
|
|
60
|
-
data-marquee
|
|
61
|
-
data-direction={direction}
|
|
62
|
-
data-pause-on-hover={pauseOnHover ? "true" : undefined}
|
|
63
55
|
class={cn(
|
|
64
|
-
"",
|
|
65
|
-
// container utilities
|
|
66
|
-
"group flex w-full overflow-hidden data-[direction=bottom]:flex-col data-[direction=top]:flex-col",
|
|
67
|
-
marqueeVariants({ variant }),
|
|
56
|
+
"group/marquee flex overflow-hidden select-none [--marquee-duration:40s] [--marquee-gap:1.5rem]",
|
|
68
57
|
className
|
|
69
58
|
)}
|
|
70
|
-
style={
|
|
59
|
+
style={resolvedStyle}
|
|
71
60
|
{...props}
|
|
72
61
|
>
|
|
73
|
-
<div class={
|
|
62
|
+
<div class={trackVariants({ direction, pauseOnHover })}>
|
|
74
63
|
<slot />
|
|
75
64
|
</div>
|
|
76
65
|
{
|
|
77
66
|
infinite && (
|
|
78
|
-
<div
|
|
67
|
+
<div
|
|
68
|
+
aria-hidden="true"
|
|
69
|
+
class={trackVariants({ direction, pauseOnHover })}
|
|
70
|
+
>
|
|
79
71
|
<slot />
|
|
80
72
|
</div>
|
|
81
73
|
)
|
|
@@ -83,24 +75,13 @@ const marqueeVariants = cva("relative w-full", {
|
|
|
83
75
|
</div>
|
|
84
76
|
|
|
85
77
|
<style>
|
|
86
|
-
@keyframes marquee
|
|
78
|
+
@keyframes marquee {
|
|
87
79
|
from {
|
|
88
80
|
transform: translateX(0);
|
|
89
81
|
}
|
|
82
|
+
|
|
90
83
|
to {
|
|
91
84
|
transform: translateX(-100%);
|
|
92
85
|
}
|
|
93
86
|
}
|
|
94
|
-
@keyframes marquee-y {
|
|
95
|
-
from {
|
|
96
|
-
transform: translateY(0);
|
|
97
|
-
}
|
|
98
|
-
to {
|
|
99
|
-
transform: translateY(-100%);
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
[data-marquee][data-pause-on-hover="true"]:hover .marquee-content {
|
|
104
|
-
animation-play-state: paused;
|
|
105
|
-
}
|
|
106
87
|
</style>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
import type { HTMLAttributes } from "astro/types"
|
|
3
|
+
import ChevronDownIcon from "@lucide/astro/icons/chevron-down"
|
|
3
4
|
|
|
4
5
|
import { cn } from "@/lib/utils"
|
|
5
|
-
import { Icon } from "@/components/ui/icon"
|
|
6
6
|
|
|
7
7
|
type Props = Omit<HTMLAttributes<"select">, "size"> & {
|
|
8
8
|
size?: "sm" | "default"
|
|
@@ -27,8 +27,7 @@ const { class: className, size = "default", ...props } = Astro.props
|
|
|
27
27
|
>
|
|
28
28
|
<slot />
|
|
29
29
|
</select>
|
|
30
|
-
<
|
|
31
|
-
name="chevron-down"
|
|
30
|
+
<ChevronDownIcon
|
|
32
31
|
class="text-muted-foreground pointer-events-none absolute top-1/2 right-2.5 size-4 -translate-y-1/2 select-none"
|
|
33
32
|
aria-hidden="true"
|
|
34
33
|
data-slot="native-select-icon"
|
|
@@ -29,7 +29,7 @@ const {
|
|
|
29
29
|
data-side={side}
|
|
30
30
|
data-side-offset={sideOffset}
|
|
31
31
|
class={cn(
|
|
32
|
-
"
|
|
32
|
+
"group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:ring-foreground/10 data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 data-[motion^=from-]:animate-in data-[motion^=from-]:fade-in data-[motion^=to-]:animate-out data-[motion^=to-]:fade-out group-data-[viewport=false]/navigation-menu:data-open:animate-in group-data-[viewport=false]/navigation-menu:data-open:fade-in-0 group-data-[viewport=false]/navigation-menu:data-open:zoom-in-95 group-data-[viewport=false]/navigation-menu:data-closed:animate-out group-data-[viewport=false]/navigation-menu:data-closed:fade-out-0 group-data-[viewport=false]/navigation-menu:data-closed:zoom-out-95 h-full w-auto p-2 pr-2.5 transition-[opacity,transform,translate] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] group-data-[viewport=false]/navigation-menu:rounded-md group-data-[viewport=false]/navigation-menu:shadow group-data-[viewport=false]/navigation-menu:ring-1 group-data-[viewport=false]/navigation-menu:duration-300 data-ending-style:opacity-0 data-starting-style:opacity-0 data-ending-style:data-[activation-direction=left]:translate-x-[50%] data-starting-style:data-[activation-direction=left]:translate-x-[-50%] data-ending-style:data-[activation-direction=right]:translate-x-[-50%] data-starting-style:data-[activation-direction=right]:translate-x-[50%] **:data-[slot=navigation-menu-link]:focus:ring-0 **:data-[slot=navigation-menu-link]:focus:outline-none",
|
|
33
33
|
className
|
|
34
34
|
)}
|
|
35
35
|
>
|
|
@@ -11,7 +11,7 @@ const { class: className, ...props } = Astro.props
|
|
|
11
11
|
<ul
|
|
12
12
|
data-slot="navigation-menu-list"
|
|
13
13
|
class={cn(
|
|
14
|
-
"group flex flex-1 list-none items-center justify-center gap-
|
|
14
|
+
"group flex flex-1 list-none items-center justify-center gap-0",
|
|
15
15
|
className
|
|
16
16
|
)}
|
|
17
17
|
{...props}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
import type { HTMLAttributes } from "astro/types"
|
|
3
|
+
import ChevronDownIcon from "@lucide/astro/icons/chevron-down"
|
|
3
4
|
|
|
4
5
|
import { cn } from "@/lib/utils"
|
|
5
|
-
import { Icon } from "@/components/ui/icon"
|
|
6
6
|
|
|
7
7
|
import navigationMenuTriggerStyle from "./navigation-menu-trigger-style"
|
|
8
8
|
|
|
@@ -19,8 +19,7 @@ const { class: className, type = "button", ...props } = Astro.props
|
|
|
19
19
|
>
|
|
20
20
|
<slot />
|
|
21
21
|
{" "}
|
|
22
|
-
<
|
|
23
|
-
name="chevron-down"
|
|
22
|
+
<ChevronDownIcon
|
|
24
23
|
class="relative top-px ml-1 size-3 transition duration-300 group-data-open/navigation-menu-trigger:rotate-180 group-data-popup-open/navigation-menu-trigger:rotate-180"
|
|
25
24
|
aria-hidden="true"
|
|
26
25
|
/>
|
|
@@ -48,7 +48,7 @@ const {
|
|
|
48
48
|
data-safe-triangle={safeTriangle}
|
|
49
49
|
data-debug-safe-triangle={debugSafeTriangle}
|
|
50
50
|
class={cn(
|
|
51
|
-
"group/navigation-menu relative flex flex-1 items-center justify-center",
|
|
51
|
+
"group/navigation-menu relative flex max-w-max flex-1 items-center justify-center",
|
|
52
52
|
className
|
|
53
53
|
)}
|
|
54
54
|
>
|
|
@@ -51,7 +51,7 @@ const {
|
|
|
51
51
|
data-position={position}
|
|
52
52
|
hidden={hidden}
|
|
53
53
|
class={cn(
|
|
54
|
-
"bg-popover text-popover-foreground ring-foreground/10 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 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 z-50 flex w-72 origin-(--transform-origin) flex-col gap-4 rounded-md p-4 text-sm shadow-md ring-1 duration-100
|
|
54
|
+
"bg-popover text-popover-foreground ring-foreground/10 data-[closed]:animate-out data-[closed]:fade-out-0 data-[closed]:zoom-out-95 data-[open]:animate-in data-[open]:fade-in-0 data-[open]:zoom-in-95 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 z-50 flex w-72 origin-(--transform-origin) flex-col gap-4 rounded-md p-4 text-sm shadow-md ring-1 outline-hidden duration-100",
|
|
55
55
|
className
|
|
56
56
|
)}
|
|
57
57
|
{...props}
|
|
@@ -23,7 +23,7 @@ const {
|
|
|
23
23
|
data-value={value}
|
|
24
24
|
data-disabled={disabled ? "" : undefined}
|
|
25
25
|
class={cn(
|
|
26
|
-
"group/radio-group-item peer border-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-[checked]:border-primary data-[checked]:bg-primary data-[checked]:text-primary-foreground dark:data-[checked]:bg-primary relative flex aspect-square size-4 shrink-0 rounded-full border outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:ring-3 aria-invalid:ring-3 data-disabled:cursor-not-allowed data-disabled:opacity-50",
|
|
26
|
+
"group/radio-group-item peer border-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-[checked]:border-primary data-[checked]:bg-primary data-[checked]:text-primary-foreground dark:data-[checked]:bg-primary group-has-[:focus-visible]/field-label:not-data-[checked]:border-input group-has-[:focus-visible]/field-label:data-[checked]:border-primary relative flex aspect-square size-4 shrink-0 rounded-full border outline-none group-has-[:focus-visible]/field-label:ring-0 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:ring-3 aria-invalid:ring-3 data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50",
|
|
27
27
|
className
|
|
28
28
|
)}
|
|
29
29
|
{...props}
|
|
@@ -32,12 +32,12 @@ const {
|
|
|
32
32
|
aria-hidden="true"
|
|
33
33
|
data-slot="radio-group-indicator"
|
|
34
34
|
class={cn(
|
|
35
|
-
"flex size-4 items-center justify-center opacity-0 group-data-checked/radio-group-item:opacity-100",
|
|
35
|
+
"flex size-4 items-center justify-center opacity-0 group-data-[checked]/radio-group-item:opacity-100",
|
|
36
36
|
indicatorClass
|
|
37
37
|
)}
|
|
38
38
|
>
|
|
39
39
|
<span
|
|
40
|
-
class="bg-
|
|
40
|
+
class="bg-primary-foreground absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2 rounded-full"
|
|
41
41
|
></span>
|
|
42
42
|
</span>
|
|
43
43
|
</span>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
import type { HTMLAttributes } from "astro/types"
|
|
3
|
+
import Star from "@lucide/astro/icons/star"
|
|
3
4
|
|
|
4
5
|
import { cn } from "@/lib/utils"
|
|
5
|
-
import { Icon } from "@/components/ui/icon"
|
|
6
6
|
|
|
7
7
|
type Props = HTMLAttributes<"div"> & {
|
|
8
8
|
value?: number
|
|
@@ -23,13 +23,13 @@ const { value = 5, class: className, ...props } = Astro.props
|
|
|
23
23
|
|
|
24
24
|
return (
|
|
25
25
|
<span class="text-muted-foreground/25 relative inline-flex size-[1em]">
|
|
26
|
-
<
|
|
26
|
+
<Star class="size-[1em] fill-current" />
|
|
27
27
|
{fillPercentage > 0 && (
|
|
28
28
|
<span
|
|
29
29
|
class="text-primary absolute inset-0 overflow-hidden"
|
|
30
30
|
style={{ width: `${fillPercentage}%` }}
|
|
31
31
|
>
|
|
32
|
-
<
|
|
32
|
+
<Star class="size-[1em] fill-current" />
|
|
33
33
|
</span>
|
|
34
34
|
)}
|
|
35
35
|
</span>
|
|
@@ -60,7 +60,7 @@ const {
|
|
|
60
60
|
<div
|
|
61
61
|
data-slot="select-viewport"
|
|
62
62
|
data-position={position}
|
|
63
|
-
class="
|
|
63
|
+
class="data-[position=item-aligned]:w-full data-[position=popper]:min-w-36"
|
|
64
64
|
>
|
|
65
65
|
<slot />
|
|
66
66
|
</div>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
import type { HTMLAttributes } from "astro/types"
|
|
3
|
+
import CheckIcon from "@lucide/astro/icons/check"
|
|
3
4
|
|
|
4
5
|
import { cn } from "@/lib/utils"
|
|
5
|
-
import { Icon } from "@/components/ui/icon"
|
|
6
6
|
|
|
7
7
|
type Props = HTMLAttributes<"div"> & {
|
|
8
8
|
value?: string
|
|
@@ -19,7 +19,7 @@ const { class: className, value, disabled, label, ...props } = Astro.props
|
|
|
19
19
|
data-disabled={disabled ? "true" : undefined}
|
|
20
20
|
data-label={label}
|
|
21
21
|
class={cn(
|
|
22
|
-
"group/select-item data-highlighted:bg-accent data-highlighted:text-accent-foreground data-highlighted:**:[svg]:text-accent-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-
|
|
22
|
+
"group/select-item data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[highlighted]:**:[svg]:text-accent-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 *:data-[slot=select-item-text]:flex *:data-[slot=select-item-text]:shrink-0 *:data-[slot=select-item-text]:items-center *:data-[slot=select-item-text]:gap-2 *:data-[slot=select-item-text]:whitespace-nowrap [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
23
23
|
className
|
|
24
24
|
)}
|
|
25
25
|
{...props}
|
|
@@ -32,8 +32,8 @@ const { class: className, value, disabled, label, ...props } = Astro.props
|
|
|
32
32
|
</span>
|
|
33
33
|
<span
|
|
34
34
|
aria-hidden="true"
|
|
35
|
-
class="pointer-events-none absolute right-2 flex size-4 items-center justify-center opacity-0 group-data-selected/select-item:opacity-100"
|
|
35
|
+
class="pointer-events-none absolute right-2 flex size-4 items-center justify-center opacity-0 group-data-[selected]/select-item:opacity-100"
|
|
36
36
|
>
|
|
37
|
-
<
|
|
37
|
+
<CheckIcon />
|
|
38
38
|
</span>
|
|
39
39
|
</div>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
import type { HTMLAttributes } from "astro/types"
|
|
3
|
+
import ChevronDownIcon from "@lucide/astro/icons/chevron-down"
|
|
3
4
|
|
|
4
5
|
import { cn } from "@/lib/utils"
|
|
5
|
-
import { Icon } from "@/components/ui/icon"
|
|
6
6
|
|
|
7
7
|
type Props = HTMLAttributes<"button"> & {
|
|
8
8
|
size?: "sm" | "default"
|
|
@@ -23,7 +23,7 @@ const {
|
|
|
23
23
|
data-size={size}
|
|
24
24
|
type={type}
|
|
25
25
|
class={cn(
|
|
26
|
-
"border-input dark:bg-input/30 dark:hover:bg-input/50 focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 data-placeholder:text-muted-foreground flex w-
|
|
26
|
+
"border-input dark:bg-input/30 dark:hover:bg-input/50 focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 data-placeholder:text-muted-foreground flex w-fit items-center justify-between gap-1.5 rounded-md border bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-3 disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
27
27
|
className
|
|
28
28
|
)}
|
|
29
29
|
{...props}
|
|
@@ -31,10 +31,7 @@ const {
|
|
|
31
31
|
<slot />
|
|
32
32
|
{
|
|
33
33
|
showIcon && (
|
|
34
|
-
<
|
|
35
|
-
name="chevron-down"
|
|
36
|
-
class="text-muted-foreground pointer-events-none size-4"
|
|
37
|
-
/>
|
|
34
|
+
<ChevronDownIcon class="text-muted-foreground pointer-events-none size-4" />
|
|
38
35
|
)
|
|
39
36
|
}
|
|
40
37
|
</button>
|
|
@@ -6,6 +6,7 @@ import { cn } from "@/lib/utils"
|
|
|
6
6
|
|
|
7
7
|
type Props = HTMLAttributes<"div"> & {
|
|
8
8
|
defaultValue?: string
|
|
9
|
+
defaultOpen?: boolean
|
|
9
10
|
placeholder?: string
|
|
10
11
|
disabled?: boolean
|
|
11
12
|
required?: boolean
|
|
@@ -18,11 +19,13 @@ type Props = HTMLAttributes<"div"> & {
|
|
|
18
19
|
avoidCollisions?: boolean
|
|
19
20
|
collisionPadding?: number
|
|
20
21
|
highlightItemOnHover?: boolean
|
|
22
|
+
lockScroll?: boolean
|
|
21
23
|
}
|
|
22
24
|
|
|
23
25
|
const {
|
|
24
26
|
class: className,
|
|
25
27
|
defaultValue,
|
|
28
|
+
defaultOpen,
|
|
26
29
|
placeholder,
|
|
27
30
|
disabled,
|
|
28
31
|
required,
|
|
@@ -35,6 +38,7 @@ const {
|
|
|
35
38
|
avoidCollisions,
|
|
36
39
|
collisionPadding,
|
|
37
40
|
highlightItemOnHover,
|
|
41
|
+
lockScroll,
|
|
38
42
|
...props
|
|
39
43
|
} = Astro.props
|
|
40
44
|
---
|
|
@@ -42,6 +46,7 @@ const {
|
|
|
42
46
|
<div
|
|
43
47
|
data-slot="select"
|
|
44
48
|
data-default-value={defaultValue}
|
|
49
|
+
data-default-open={defaultOpen}
|
|
45
50
|
data-placeholder={placeholder}
|
|
46
51
|
data-disabled={disabled}
|
|
47
52
|
data-required={required}
|
|
@@ -54,6 +59,7 @@ const {
|
|
|
54
59
|
data-avoid-collisions={avoidCollisions}
|
|
55
60
|
data-collision-padding={collisionPadding}
|
|
56
61
|
data-highlight-item-on-hover={highlightItemOnHover}
|
|
62
|
+
data-lock-scroll={lockScroll}
|
|
57
63
|
class={cn(
|
|
58
64
|
"group/select relative inline-flex w-fit flex-col gap-1.5",
|
|
59
65
|
className
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
---
|
|
2
2
|
import type { HTMLAttributes } from "astro/types"
|
|
3
|
+
import XIcon from "@lucide/astro/icons/x"
|
|
3
4
|
|
|
4
5
|
import { cn } from "@/lib/utils"
|
|
5
6
|
import { Button } from "@/components/ui/button"
|
|
6
7
|
import DialogPortal from "@/components/ui/dialog/dialog-portal.astro"
|
|
7
|
-
import { Icon } from "@/components/ui/icon"
|
|
8
8
|
|
|
9
9
|
type Props = HTMLAttributes<"div"> & {
|
|
10
10
|
side?: "top" | "right" | "bottom" | "left"
|
|
@@ -33,8 +33,7 @@ const {
|
|
|
33
33
|
data-side={side}
|
|
34
34
|
hidden
|
|
35
35
|
class={cn(
|
|
36
|
-
"bg-popover text-popover-foreground fixed z-50 flex flex-col gap-4 bg-clip-padding text-sm shadow-lg transition duration-200 ease-in-out outline-none data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-
|
|
37
|
-
"bg-popover text-popover-foreground fixed z-50 flex flex-col gap-4 bg-clip-padding text-sm shadow-lg transition duration-200 ease-in-out outline-none data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-10 data-[side=bottom]:data-starting-style:translate-y-10 data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=left]:data-ending-style:-translate-x-10 data-[side=left]:data-starting-style:-translate-x-10 data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=right]:data-ending-style:translate-x-10 data-[side=right]:data-starting-style:translate-x-10 data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:-translate-y-10 data-[side=top]:data-starting-style:-translate-y-10 data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm",
|
|
36
|
+
"bg-popover text-popover-foreground fixed z-50 flex flex-col gap-4 bg-clip-padding text-sm shadow-lg transition duration-200 ease-in-out outline-none data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-[2.5rem] data-[side=bottom]:data-starting-style:translate-y-[2.5rem] data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=left]:data-ending-style:translate-x-[-2.5rem] data-[side=left]:data-starting-style:translate-x-[-2.5rem] data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=right]:data-ending-style:translate-x-[2.5rem] data-[side=right]:data-starting-style:translate-x-[2.5rem] data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:translate-y-[-2.5rem] data-[side=top]:data-starting-style:translate-y-[-2.5rem] data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm",
|
|
38
37
|
className
|
|
39
38
|
)}
|
|
40
39
|
style={`z-index: calc(var(--dialog-content-stack-index, 0) + 101);${style ? ` ${style}` : ""}`}
|
|
@@ -48,9 +47,9 @@ const {
|
|
|
48
47
|
data-slot="dialog-close"
|
|
49
48
|
variant="ghost"
|
|
50
49
|
size="icon-sm"
|
|
51
|
-
class="absolute top-
|
|
50
|
+
class="absolute top-4 right-4"
|
|
52
51
|
>
|
|
53
|
-
<
|
|
52
|
+
<XIcon />
|
|
54
53
|
<span class="sr-only">Close</span>
|
|
55
54
|
</Button>
|
|
56
55
|
)
|
|
@@ -17,7 +17,7 @@ const variants = cva(
|
|
|
17
17
|
variant: {
|
|
18
18
|
default: "hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
|
|
19
19
|
outline:
|
|
20
|
-
"bg-background hover:bg-sidebar-accent hover:text-sidebar-accent-foreground shadow-[
|
|
20
|
+
"bg-background hover:bg-sidebar-accent hover:text-sidebar-accent-foreground shadow-[0_0_0_1px_var(--sidebar-border)] hover:shadow-[0_0_0_1px_var(--sidebar-accent)]",
|
|
21
21
|
},
|
|
22
22
|
size: {
|
|
23
23
|
default: "h-8 text-sm",
|
|
@@ -45,14 +45,17 @@ type TooltipValue =
|
|
|
45
45
|
collisionPadding?: number
|
|
46
46
|
})
|
|
47
47
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
48
|
+
type Props = VariantProps<typeof variants> &
|
|
49
|
+
HTMLAttributes<"button"> &
|
|
50
|
+
HTMLAttributes<"a"> &
|
|
51
|
+
HTMLAttributes<"div"> &
|
|
52
|
+
HTMLAttributes<"span"> & {
|
|
53
|
+
as?: "a" | "button" | "div" | "span"
|
|
54
|
+
href?: string
|
|
55
|
+
isActive?: boolean
|
|
56
|
+
active?: boolean
|
|
57
|
+
tooltip?: TooltipValue
|
|
58
|
+
}
|
|
56
59
|
|
|
57
60
|
const {
|
|
58
61
|
as: explicitTag,
|
|
@@ -64,7 +67,7 @@ const {
|
|
|
64
67
|
tooltip,
|
|
65
68
|
type,
|
|
66
69
|
...props
|
|
67
|
-
} = Astro.props
|
|
70
|
+
} = Astro.props
|
|
68
71
|
|
|
69
72
|
const Tag = explicitTag || ("href" in Astro.props ? "a" : "button")
|
|
70
73
|
const resolvedActive = isActive ?? active
|
|
@@ -19,13 +19,15 @@ const variants = cva(
|
|
|
19
19
|
}
|
|
20
20
|
)
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
22
|
+
type Props = VariantProps<typeof variants> &
|
|
23
|
+
HTMLAttributes<"button"> &
|
|
24
|
+
HTMLAttributes<"a"> &
|
|
25
|
+
HTMLAttributes<"span"> & {
|
|
26
|
+
as?: "a" | "button" | "span"
|
|
27
|
+
href?: string
|
|
28
|
+
isActive?: boolean
|
|
29
|
+
active?: boolean
|
|
30
|
+
}
|
|
29
31
|
|
|
30
32
|
const {
|
|
31
33
|
as: explicitTag,
|
|
@@ -35,7 +37,7 @@ const {
|
|
|
35
37
|
active = false,
|
|
36
38
|
type,
|
|
37
39
|
...props
|
|
38
|
-
} = Astro.props
|
|
40
|
+
} = Astro.props
|
|
39
41
|
|
|
40
42
|
const Tag = explicitTag || "a"
|
|
41
43
|
const resolvedActive = isActive ?? active
|
|
@@ -34,7 +34,6 @@ const resolvedStyle = [
|
|
|
34
34
|
data-slot="sidebar-wrapper"
|
|
35
35
|
data-default-open={defaultOpen ? "true" : "false"}
|
|
36
36
|
data-open={open === undefined ? undefined : open ? "true" : "false"}
|
|
37
|
-
data-sidebar-initializing="true"
|
|
38
37
|
style={resolvedStyle}
|
|
39
38
|
class={cn(
|
|
40
39
|
"group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full",
|
|
@@ -43,14 +42,6 @@ const resolvedStyle = [
|
|
|
43
42
|
{...props}
|
|
44
43
|
>
|
|
45
44
|
<slot />
|
|
46
|
-
<style is:inline>
|
|
47
|
-
[data-slot="sidebar-wrapper"][data-sidebar-initializing="true"]
|
|
48
|
-
[data-slot="sidebar-gap"],
|
|
49
|
-
[data-slot="sidebar-wrapper"][data-sidebar-initializing="true"]
|
|
50
|
-
[data-slot="sidebar-container"] {
|
|
51
|
-
transition: none !important;
|
|
52
|
-
}
|
|
53
|
-
</style>
|
|
54
45
|
<script is:inline>
|
|
55
46
|
;(() => {
|
|
56
47
|
window.__fulldevSyncSidebarProvider ??= (provider, open) => {
|
|
@@ -102,9 +93,6 @@ const resolvedStyle = [
|
|
|
102
93
|
|
|
103
94
|
provider.dataset.openMobile = "false"
|
|
104
95
|
window.__fulldevSyncSidebarProvider(provider, isOpen)
|
|
105
|
-
requestAnimationFrame(() => {
|
|
106
|
-
provider.removeAttribute("data-sidebar-initializing")
|
|
107
|
-
})
|
|
108
96
|
})()
|
|
109
97
|
</script>
|
|
110
98
|
</div>
|
|
@@ -160,7 +148,7 @@ const resolvedStyle = [
|
|
|
160
148
|
|
|
161
149
|
document.addEventListener("keydown", (event) => {
|
|
162
150
|
if (event.key.toLowerCase() !== "b") return
|
|
163
|
-
if (!event.metaKey || event.ctrlKey || event.shiftKey || event.altKey) {
|
|
151
|
+
if (!(event.metaKey || event.ctrlKey) || event.shiftKey || event.altKey) {
|
|
164
152
|
return
|
|
165
153
|
}
|
|
166
154
|
if (event.defaultPrevented) return
|
|
@@ -16,7 +16,7 @@ const { class: className, type = "button", ...props } = Astro.props
|
|
|
16
16
|
title="Toggle Sidebar"
|
|
17
17
|
type={type}
|
|
18
18
|
class={cn(
|
|
19
|
-
"hover:after:bg-sidebar-border absolute inset-y-0 z-20 hidden w-4
|
|
19
|
+
"hover:after:bg-sidebar-border absolute inset-y-0 z-20 hidden w-4 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:start-1/2 after:w-[2px] sm:flex ltr:-translate-x-1/2 rtl:-translate-x-1/2",
|
|
20
20
|
"in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize",
|
|
21
21
|
"[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize",
|
|
22
22
|
"hover:group-data-[collapsible=offcanvas]:bg-sidebar group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
import type { HTMLAttributes } from "astro/types"
|
|
3
|
+
import PanelLeftIcon from "@lucide/astro/icons/panel-left"
|
|
3
4
|
|
|
4
5
|
import { Button } from "@/components/ui/button"
|
|
5
|
-
import { Icon } from "@/components/ui/icon"
|
|
6
6
|
|
|
7
7
|
type Props = HTMLAttributes<"button"> & {
|
|
8
8
|
variant?: "ghost" | "secondary"
|
|
@@ -17,10 +17,10 @@ const { class: className, ...props } = Astro.props
|
|
|
17
17
|
variant="ghost"
|
|
18
18
|
size="icon-sm"
|
|
19
19
|
class={className}
|
|
20
|
-
aria-keyshortcuts="Meta+B"
|
|
20
|
+
aria-keyshortcuts="Control+B Meta+B"
|
|
21
21
|
{...props}
|
|
22
22
|
>
|
|
23
|
-
<
|
|
23
|
+
<PanelLeftIcon />
|
|
24
24
|
<span class="sr-only">Toggle Sidebar</span>
|
|
25
25
|
<slot />
|
|
26
26
|
</Button>
|
|
@@ -96,7 +96,7 @@ const desktopCollapsible = desktopState === "collapsed" ? collapsible : ""
|
|
|
96
96
|
data-slot="sidebar-container"
|
|
97
97
|
data-side={side}
|
|
98
98
|
class={cn(
|
|
99
|
-
"fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear data-[side=left]:left-0 data-[side=left]:group-data-[collapsible=offcanvas]
|
|
99
|
+
"fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear data-[side=left]:left-0 data-[side=left]:group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)] data-[side=right]:right-0 data-[side=right]:group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)] md:flex",
|
|
100
100
|
variant === "floating" || variant === "inset"
|
|
101
101
|
? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]"
|
|
102
102
|
: "group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",
|