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
|
@@ -3,12 +3,20 @@ import type { HTMLAttributes } from "astro/types"
|
|
|
3
3
|
|
|
4
4
|
import { cn } from "@/lib/utils"
|
|
5
5
|
|
|
6
|
-
type
|
|
6
|
+
type Size = "sm" | "default" | "lg"
|
|
7
|
+
type Props = HTMLAttributes<"td"> & {
|
|
8
|
+
size?: Size
|
|
9
|
+
}
|
|
7
10
|
|
|
8
|
-
const { class: className, ...props } = Astro.props
|
|
11
|
+
const { class: className, size = "default", ...props } = Astro.props
|
|
9
12
|
---
|
|
10
13
|
|
|
11
|
-
<td
|
|
14
|
+
<td
|
|
15
|
+
data-slot="typography-table-cell"
|
|
16
|
+
data-size={size}
|
|
17
|
+
class={cn(className)}
|
|
18
|
+
{...props}
|
|
19
|
+
>
|
|
12
20
|
<slot />
|
|
13
21
|
</td>
|
|
14
22
|
|
|
@@ -17,25 +25,36 @@ const { class: className, ...props } = Astro.props
|
|
|
17
25
|
|
|
18
26
|
[data-slot="typography-table-cell"],
|
|
19
27
|
[data-slot="typography-table"] td,
|
|
20
|
-
[data-slot="typography"]
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
28
|
+
[data-slot="typography"] > table td {
|
|
29
|
+
@apply border-border border-t px-4 py-3 text-left align-middle;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
[data-slot="typography-table-cell"][data-size="sm"] {
|
|
33
|
+
@apply text-sm;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
[data-slot="typography-table-cell"][data-size="default"] {
|
|
37
|
+
@apply text-base;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
[data-slot="typography-table-cell"][data-size="lg"] {
|
|
41
|
+
@apply text-lg;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
[data-slot="typography-table"] tbody tr:last-child td,
|
|
45
|
+
[data-slot="typography"] > table tbody tr:last-child td {
|
|
46
|
+
@apply border-b-0;
|
|
24
47
|
}
|
|
25
48
|
|
|
26
49
|
[data-slot="typography-table-cell"][align="center"],
|
|
27
50
|
[data-slot="typography-table"] td[align="center"],
|
|
28
|
-
[data-slot="typography"]
|
|
29
|
-
table:not(.no-typography):not(.no-typography *)
|
|
30
|
-
td:not(.no-typography):not(.no-typography *)[align="center"] {
|
|
51
|
+
[data-slot="typography"] > table td[align="center"] {
|
|
31
52
|
@apply text-center;
|
|
32
53
|
}
|
|
33
54
|
|
|
34
55
|
[data-slot="typography-table-cell"][align="right"],
|
|
35
56
|
[data-slot="typography-table"] td[align="right"],
|
|
36
|
-
[data-slot="typography"]
|
|
37
|
-
table:not(.no-typography):not(.no-typography *)
|
|
38
|
-
td:not(.no-typography):not(.no-typography *)[align="right"] {
|
|
57
|
+
[data-slot="typography"] > table td[align="right"] {
|
|
39
58
|
@apply text-right;
|
|
40
59
|
}
|
|
41
60
|
</style>
|
|
@@ -3,12 +3,20 @@ import type { HTMLAttributes } from "astro/types"
|
|
|
3
3
|
|
|
4
4
|
import { cn } from "@/lib/utils"
|
|
5
5
|
|
|
6
|
-
type
|
|
6
|
+
type Size = "sm" | "default" | "lg"
|
|
7
|
+
type Props = HTMLAttributes<"th"> & {
|
|
8
|
+
size?: Size
|
|
9
|
+
}
|
|
7
10
|
|
|
8
|
-
const { class: className, ...props } = Astro.props
|
|
11
|
+
const { class: className, size = "default", ...props } = Astro.props
|
|
9
12
|
---
|
|
10
13
|
|
|
11
|
-
<th
|
|
14
|
+
<th
|
|
15
|
+
data-slot="typography-table-head"
|
|
16
|
+
data-size={size}
|
|
17
|
+
class={cn(className)}
|
|
18
|
+
{...props}
|
|
19
|
+
>
|
|
12
20
|
<slot />
|
|
13
21
|
</th>
|
|
14
22
|
|
|
@@ -17,25 +25,31 @@ const { class: className, ...props } = Astro.props
|
|
|
17
25
|
|
|
18
26
|
[data-slot="typography-table-head"],
|
|
19
27
|
[data-slot="typography-table"] th,
|
|
20
|
-
[data-slot="typography"]
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
28
|
+
[data-slot="typography"] > table th {
|
|
29
|
+
@apply border-border border-b px-4 py-3 text-left font-semibold;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
[data-slot="typography-table-head"][data-size="sm"] {
|
|
33
|
+
@apply text-sm;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
[data-slot="typography-table-head"][data-size="default"] {
|
|
37
|
+
@apply text-base;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
[data-slot="typography-table-head"][data-size="lg"] {
|
|
41
|
+
@apply text-lg;
|
|
24
42
|
}
|
|
25
43
|
|
|
26
44
|
[data-slot="typography-table-head"][align="center"],
|
|
27
45
|
[data-slot="typography-table"] th[align="center"],
|
|
28
|
-
[data-slot="typography"]
|
|
29
|
-
table:not(.no-typography):not(.no-typography *)
|
|
30
|
-
th:not(.no-typography):not(.no-typography *)[align="center"] {
|
|
46
|
+
[data-slot="typography"] > table th[align="center"] {
|
|
31
47
|
@apply text-center;
|
|
32
48
|
}
|
|
33
49
|
|
|
34
50
|
[data-slot="typography-table-head"][align="right"],
|
|
35
51
|
[data-slot="typography-table"] th[align="right"],
|
|
36
|
-
[data-slot="typography"]
|
|
37
|
-
table:not(.no-typography):not(.no-typography *)
|
|
38
|
-
th:not(.no-typography):not(.no-typography *)[align="right"] {
|
|
52
|
+
[data-slot="typography"] > table th[align="right"] {
|
|
39
53
|
@apply text-right;
|
|
40
54
|
}
|
|
41
55
|
</style>
|
|
@@ -3,12 +3,20 @@ import type { HTMLAttributes } from "astro/types"
|
|
|
3
3
|
|
|
4
4
|
import { cn } from "@/lib/utils"
|
|
5
5
|
|
|
6
|
-
type
|
|
6
|
+
type Size = "sm" | "default" | "lg"
|
|
7
|
+
type Props = HTMLAttributes<"tr"> & {
|
|
8
|
+
size?: Size
|
|
9
|
+
}
|
|
7
10
|
|
|
8
|
-
const { class: className, ...props } = Astro.props
|
|
11
|
+
const { class: className, size = "default", ...props } = Astro.props
|
|
9
12
|
---
|
|
10
13
|
|
|
11
|
-
<tr
|
|
14
|
+
<tr
|
|
15
|
+
data-slot="typography-table-row"
|
|
16
|
+
data-size={size}
|
|
17
|
+
class={cn(className)}
|
|
18
|
+
{...props}
|
|
19
|
+
>
|
|
12
20
|
<slot />
|
|
13
21
|
</tr>
|
|
14
22
|
|
|
@@ -17,17 +25,19 @@ const { class: className, ...props } = Astro.props
|
|
|
17
25
|
|
|
18
26
|
[data-slot="typography-table-row"],
|
|
19
27
|
[data-slot="typography-table"] tr,
|
|
20
|
-
[data-slot="typography"]
|
|
21
|
-
|
|
22
|
-
tr:not(.no-typography):not(.no-typography *) {
|
|
23
|
-
@apply border-b transition-colors;
|
|
28
|
+
[data-slot="typography"] > table tr {
|
|
29
|
+
@apply even:bg-muted m-0 border-t p-0;
|
|
24
30
|
}
|
|
25
31
|
|
|
26
|
-
[data-slot="typography-table"]
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
@apply
|
|
32
|
+
[data-slot="typography-table-row"][data-size="sm"] {
|
|
33
|
+
@apply text-sm;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
[data-slot="typography-table-row"][data-size="default"] {
|
|
37
|
+
@apply text-base;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
[data-slot="typography-table-row"][data-size="lg"] {
|
|
41
|
+
@apply text-lg;
|
|
32
42
|
}
|
|
33
43
|
</style>
|
|
@@ -3,15 +3,31 @@ import type { HTMLAttributes } from "astro/types"
|
|
|
3
3
|
|
|
4
4
|
import { cn } from "@/lib/utils"
|
|
5
5
|
|
|
6
|
+
type Size = "sm" | "default" | "lg"
|
|
6
7
|
type Props = HTMLAttributes<"table"> & {
|
|
7
8
|
containerClass?: string
|
|
9
|
+
size?: Size
|
|
8
10
|
}
|
|
9
11
|
|
|
10
|
-
const {
|
|
12
|
+
const {
|
|
13
|
+
class: className,
|
|
14
|
+
containerClass,
|
|
15
|
+
size = "default",
|
|
16
|
+
...props
|
|
17
|
+
} = Astro.props
|
|
11
18
|
---
|
|
12
19
|
|
|
13
|
-
<div
|
|
14
|
-
|
|
20
|
+
<div
|
|
21
|
+
data-slot="typography-table-container"
|
|
22
|
+
data-size={size}
|
|
23
|
+
class={cn(containerClass)}
|
|
24
|
+
>
|
|
25
|
+
<table
|
|
26
|
+
data-slot="typography-table"
|
|
27
|
+
data-size={size}
|
|
28
|
+
class={cn(className)}
|
|
29
|
+
{...props}
|
|
30
|
+
>
|
|
15
31
|
<slot />
|
|
16
32
|
</table>
|
|
17
33
|
</div>
|
|
@@ -20,31 +36,24 @@ const { class: className, containerClass, ...props } = Astro.props
|
|
|
20
36
|
@reference "@/styles/global.css";
|
|
21
37
|
|
|
22
38
|
[data-slot="typography-table-container"] {
|
|
23
|
-
@apply border-border w-full overflow-
|
|
39
|
+
@apply border-border my-6 w-full overflow-y-auto rounded-xl border;
|
|
24
40
|
}
|
|
25
41
|
|
|
26
42
|
[data-slot="typography-table"],
|
|
27
|
-
[data-slot="typography"] table
|
|
28
|
-
@apply w-full
|
|
43
|
+
[data-slot="typography"] > table {
|
|
44
|
+
@apply w-full border-collapse;
|
|
29
45
|
}
|
|
30
46
|
|
|
31
|
-
[data-slot="typography"]
|
|
32
|
-
@apply
|
|
33
|
-
border-spacing: 0;
|
|
47
|
+
[data-slot="typography-table"][data-size="sm"] {
|
|
48
|
+
@apply text-sm;
|
|
34
49
|
}
|
|
35
50
|
|
|
36
|
-
[data-slot="typography"]
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
[data-slot="typography"]
|
|
40
|
-
table:not(.no-typography):not(.no-typography *)
|
|
41
|
-
tbody,
|
|
42
|
-
[data-slot="typography"] table:not(.no-typography):not(.no-typography *) tr {
|
|
43
|
-
@apply w-full;
|
|
51
|
+
[data-slot="typography-table"][data-size="default"],
|
|
52
|
+
[data-slot="typography"] > table {
|
|
53
|
+
@apply text-base;
|
|
44
54
|
}
|
|
45
55
|
|
|
46
|
-
[data-slot="typography-table"]
|
|
47
|
-
|
|
48
|
-
@apply text-sm;
|
|
56
|
+
[data-slot="typography-table"][data-size="lg"] {
|
|
57
|
+
@apply text-lg;
|
|
49
58
|
}
|
|
50
59
|
</style>
|
|
@@ -3,10 +3,8 @@ import type { HTMLTag, Polymorphic } from "astro/types"
|
|
|
3
3
|
|
|
4
4
|
import { cn } from "@/lib/utils"
|
|
5
5
|
|
|
6
|
-
type
|
|
7
|
-
|
|
8
|
-
size?: "sm" | "default" | "lg"
|
|
9
|
-
}>
|
|
6
|
+
type Size = "sm" | "default" | "lg"
|
|
7
|
+
type Props<Tag extends HTMLTag> = Polymorphic<{ as: Tag; size?: Size }>
|
|
10
8
|
|
|
11
9
|
const {
|
|
12
10
|
as: Tag = "div",
|
|
@@ -30,15 +28,7 @@ const {
|
|
|
30
28
|
|
|
31
29
|
[data-slot="typography"]
|
|
32
30
|
> :is(
|
|
33
|
-
p,
|
|
34
|
-
blockquote,
|
|
35
|
-
ul,
|
|
36
|
-
ol,
|
|
37
|
-
table,
|
|
38
31
|
[data-slot="typography-lead"],
|
|
39
|
-
[data-slot="typography-p"],
|
|
40
|
-
[data-slot="typography-blockquote"],
|
|
41
|
-
[data-slot="typography-list"],
|
|
42
32
|
[data-slot="typography-table-container"],
|
|
43
33
|
div,
|
|
44
34
|
section,
|
|
@@ -47,7 +37,6 @@ const {
|
|
|
47
37
|
nav,
|
|
48
38
|
figure,
|
|
49
39
|
details,
|
|
50
|
-
.docs-code-block,
|
|
51
40
|
pre,
|
|
52
41
|
small,
|
|
53
42
|
dl,
|
|
@@ -59,39 +48,42 @@ const {
|
|
|
59
48
|
@apply mt-6;
|
|
60
49
|
}
|
|
61
50
|
|
|
62
|
-
[data-slot="typography"]
|
|
63
|
-
|
|
51
|
+
[data-slot="typography"] > h1 {
|
|
52
|
+
@apply scroll-m-20 text-4xl font-semibold tracking-tight text-balance;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
[data-slot="typography"] > h2 {
|
|
56
|
+
@apply scroll-m-20 text-3xl font-semibold tracking-tight;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
[data-slot="typography"] > h2:first-child {
|
|
60
|
+
@apply mt-0;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
[data-slot="typography"] > h2:not(:first-child) {
|
|
64
64
|
@apply mt-10;
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
-
[data-slot="typography"]
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
67
|
+
[data-slot="typography"] > h3 {
|
|
68
|
+
@apply scroll-m-20 text-2xl font-semibold tracking-tight;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
[data-slot="typography"] > h3:not(:first-child) {
|
|
72
|
+
@apply mt-8;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
[data-slot="typography"] > h4 {
|
|
76
|
+
@apply scroll-m-20 text-xl font-semibold tracking-tight;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
[data-slot="typography"] > h4:not(:first-child) {
|
|
71
80
|
@apply mt-8;
|
|
72
81
|
}
|
|
73
82
|
|
|
74
83
|
[data-slot="typography"]
|
|
75
|
-
> :is(
|
|
76
|
-
h1,
|
|
77
|
-
h2,
|
|
78
|
-
h3,
|
|
79
|
-
h4,
|
|
80
|
-
[data-slot="typography-h1"],
|
|
81
|
-
[data-slot="typography-h2"],
|
|
82
|
-
[data-slot="typography-h3"],
|
|
83
|
-
[data-slot="typography-h4"]
|
|
84
|
-
)
|
|
84
|
+
> :is(h1, h2, h3, h4)
|
|
85
85
|
+ :is(
|
|
86
|
-
p,
|
|
87
|
-
blockquote,
|
|
88
|
-
ul,
|
|
89
|
-
ol,
|
|
90
|
-
table,
|
|
91
86
|
[data-slot="typography-lead"],
|
|
92
|
-
[data-slot="typography-p"],
|
|
93
|
-
[data-slot="typography-blockquote"],
|
|
94
|
-
[data-slot="typography-list"],
|
|
95
87
|
[data-slot="typography-table-container"],
|
|
96
88
|
div,
|
|
97
89
|
section,
|
|
@@ -100,8 +92,12 @@ const {
|
|
|
100
92
|
nav,
|
|
101
93
|
figure,
|
|
102
94
|
details,
|
|
103
|
-
|
|
95
|
+
p,
|
|
96
|
+
blockquote,
|
|
104
97
|
pre,
|
|
98
|
+
ul,
|
|
99
|
+
ol,
|
|
100
|
+
table,
|
|
105
101
|
small,
|
|
106
102
|
dl,
|
|
107
103
|
img,
|
|
@@ -112,6 +108,31 @@ const {
|
|
|
112
108
|
@apply mt-4;
|
|
113
109
|
}
|
|
114
110
|
|
|
111
|
+
[data-slot="typography"] > p {
|
|
112
|
+
@apply text-base leading-7;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
[data-slot="typography"] > p:not(:first-child) {
|
|
116
|
+
@apply mt-6;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
[data-slot="typography"]
|
|
120
|
+
> :is(h1, h2, h3, h4)
|
|
121
|
+
+ :is(p, [data-slot="typography-lead"]):not(:first-child) {
|
|
122
|
+
@apply mt-4;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
[data-slot="typography"] > a:not([data-slot]),
|
|
126
|
+
[data-slot="typography"]
|
|
127
|
+
> :is(p, blockquote, ul, ol, dl, table)
|
|
128
|
+
a:not([data-slot]) {
|
|
129
|
+
@apply text-primary font-medium underline underline-offset-4;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
[data-slot="typography"] > blockquote {
|
|
133
|
+
@apply mt-6 border-l-2 pl-6 text-base italic;
|
|
134
|
+
}
|
|
135
|
+
|
|
115
136
|
[data-slot="typography"] > hr {
|
|
116
137
|
@apply border-border my-8;
|
|
117
138
|
}
|
|
@@ -126,16 +147,16 @@ const {
|
|
|
126
147
|
|
|
127
148
|
[data-slot="typography"] > .docs-code-block > pre,
|
|
128
149
|
[data-slot="typography"] > .docs-code-block > pre.astro-code {
|
|
129
|
-
@apply m-0 rounded-none border-0 bg-transparent
|
|
150
|
+
@apply m-0 rounded-none border-0 !bg-transparent p-4 pr-14 text-sm leading-[var(--text-sm--line-height)];
|
|
130
151
|
font-family: var(--font-mono);
|
|
131
152
|
}
|
|
132
153
|
|
|
133
154
|
[data-slot="typography"] > .docs-code-block > pre.astro-code code {
|
|
134
|
-
@apply text-sm leading-(--text-sm--line-height) text-(--shiki-light,var(--foreground))
|
|
155
|
+
@apply text-sm leading-[var(--text-sm--line-height)] !text-[var(--shiki-light,var(--foreground))];
|
|
135
156
|
}
|
|
136
157
|
|
|
137
158
|
.dark [data-slot="typography"] > .docs-code-block > pre.astro-code code {
|
|
138
|
-
@apply text-(--shiki-dark,var(--foreground))
|
|
159
|
+
@apply !text-[var(--shiki-dark,var(--foreground))];
|
|
139
160
|
}
|
|
140
161
|
|
|
141
162
|
.dark
|
|
@@ -143,7 +164,7 @@ const {
|
|
|
143
164
|
> .docs-code-block
|
|
144
165
|
> pre.astro-code
|
|
145
166
|
span[style*="--shiki-dark"] {
|
|
146
|
-
@apply font-(--shiki-dark-font-weight,inherit)!
|
|
167
|
+
@apply ![font-weight:var(--shiki-dark-font-weight,inherit)] !text-[var(--shiki-dark)] ![font-style:var(--shiki-dark-font-style,inherit)] ![text-decoration:var(--shiki-dark-text-decoration,inherit)];
|
|
147
168
|
}
|
|
148
169
|
|
|
149
170
|
[data-slot="typography"] > .docs-code-block > .docs-code-copy {
|
|
@@ -154,6 +175,42 @@ const {
|
|
|
154
175
|
@apply size-4;
|
|
155
176
|
}
|
|
156
177
|
|
|
178
|
+
[data-slot="typography"] > ul,
|
|
179
|
+
[data-slot="typography"] > ol {
|
|
180
|
+
@apply my-6 ml-6 text-base;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
[data-slot="typography"] > ul {
|
|
184
|
+
@apply list-disc;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
[data-slot="typography"] > ol {
|
|
188
|
+
@apply list-decimal;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
[data-slot="typography"] > ul > li,
|
|
192
|
+
[data-slot="typography"] > ol > li {
|
|
193
|
+
@apply mt-2;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
[data-slot="typography"] > [data-slot="typography-lead"] {
|
|
197
|
+
@apply text-muted-foreground;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
[data-slot="typography"][data-size="sm"] > [data-slot="typography-lead"] {
|
|
201
|
+
@apply text-base;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
[data-slot="typography"] > [data-slot="typography-lead"],
|
|
205
|
+
[data-slot="typography"][data-size="default"]
|
|
206
|
+
> [data-slot="typography-lead"] {
|
|
207
|
+
@apply text-lg;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
[data-slot="typography"][data-size="lg"] > [data-slot="typography-lead"] {
|
|
211
|
+
@apply text-xl;
|
|
212
|
+
}
|
|
213
|
+
|
|
157
214
|
[data-slot="typography"] > small {
|
|
158
215
|
@apply block leading-none font-medium;
|
|
159
216
|
}
|
|
@@ -162,19 +219,88 @@ const {
|
|
|
162
219
|
@apply text-sm;
|
|
163
220
|
}
|
|
164
221
|
|
|
222
|
+
[data-slot="typography"] > table {
|
|
223
|
+
@apply border-border my-6 block w-full overflow-x-auto rounded-lg border;
|
|
224
|
+
border-collapse: separate;
|
|
225
|
+
border-spacing: 0;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
[data-slot="typography"] > table th,
|
|
229
|
+
[data-slot="typography"] > table td {
|
|
230
|
+
@apply border-border border-b px-4 py-2 text-left align-top whitespace-nowrap;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
[data-slot="typography"] > table th {
|
|
234
|
+
@apply text-foreground bg-muted/40 font-medium;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
[data-slot="typography"] > table tr:last-child td {
|
|
238
|
+
@apply border-b-0;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
[data-slot="typography"] > table thead,
|
|
242
|
+
[data-slot="typography"] > table tbody,
|
|
243
|
+
[data-slot="typography"] > table tr {
|
|
244
|
+
@apply w-full;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
[data-slot="typography"] > table tr {
|
|
248
|
+
@apply grid grid-cols-[minmax(0,1fr)_minmax(0,1fr)_minmax(0,1fr)];
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
[data-slot="typography"] > table tr {
|
|
252
|
+
@apply even:bg-muted/40 m-0 border-t p-0 first:border-t-0;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
[data-slot="typography"] > table th {
|
|
256
|
+
@apply border-r px-4 py-2 text-left font-bold last:border-r-0;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
[data-slot="typography"] > table th[align="center"] {
|
|
260
|
+
@apply text-center;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
[data-slot="typography"] > table th[align="right"] {
|
|
264
|
+
@apply text-right;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
[data-slot="typography"] > table td {
|
|
268
|
+
@apply border-r px-4 py-2 text-left last:border-r-0;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
[data-slot="typography"] > table td[align="center"] {
|
|
272
|
+
@apply text-center;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
[data-slot="typography"] > table td[align="right"] {
|
|
276
|
+
@apply text-right;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
[data-slot="typography"] > table tbody tr:last-child td {
|
|
280
|
+
@apply border-b-0;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
[data-slot="typography"] :not(pre) > code {
|
|
284
|
+
@apply bg-muted relative rounded px-[0.3rem] py-[0.2rem] font-mono text-sm font-semibold;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
[data-slot="typography"] > table :not(pre) > code {
|
|
288
|
+
@apply rounded-md text-sm leading-5 font-normal;
|
|
289
|
+
}
|
|
290
|
+
|
|
165
291
|
[data-slot="typography"] > pre.astro-code {
|
|
166
|
-
@apply border-border bg-muted/60
|
|
292
|
+
@apply border-border !bg-muted/60 rounded-xl border p-4 text-sm leading-[var(--text-sm--line-height)];
|
|
167
293
|
}
|
|
168
294
|
|
|
169
295
|
[data-slot="typography"] > pre.astro-code code {
|
|
170
|
-
@apply text-inherit
|
|
296
|
+
@apply !text-inherit;
|
|
171
297
|
}
|
|
172
298
|
|
|
173
299
|
.dark [data-slot="typography"] > pre.astro-code {
|
|
174
|
-
@apply text-(--shiki-dark,var(--foreground))
|
|
300
|
+
@apply !text-[var(--shiki-dark,var(--foreground))];
|
|
175
301
|
}
|
|
176
302
|
|
|
177
303
|
.dark [data-slot="typography"] > pre.astro-code span[style*="--shiki-dark"] {
|
|
178
|
-
@apply font-(--shiki-dark-font-weight,inherit)!
|
|
304
|
+
@apply ![font-weight:var(--shiki-dark-font-weight,inherit)] !text-[var(--shiki-dark)] ![font-style:var(--shiki-dark-font-style,inherit)] ![text-decoration:var(--shiki-dark-text-decoration,inherit)];
|
|
179
305
|
}
|
|
180
306
|
</style>
|
|
@@ -3,19 +3,13 @@ import type { HTMLAttributes } from "astro/types"
|
|
|
3
3
|
|
|
4
4
|
import { cn } from "@/lib/utils"
|
|
5
5
|
|
|
6
|
-
type Props = Omit<HTMLAttributes<"
|
|
6
|
+
type Props = Omit<HTMLAttributes<"div">, "src"> & {
|
|
7
7
|
src?: string
|
|
8
|
-
title?: string
|
|
9
8
|
}
|
|
10
9
|
|
|
11
|
-
const {
|
|
12
|
-
class: className,
|
|
13
|
-
src,
|
|
14
|
-
title = "Embedded video",
|
|
15
|
-
...props
|
|
16
|
-
} = Astro.props
|
|
10
|
+
const { class: className, src, ...props } = Astro.props
|
|
17
11
|
|
|
18
|
-
const
|
|
12
|
+
const getEmbedSrc = (value?: string) => {
|
|
19
13
|
if (!value) return undefined
|
|
20
14
|
|
|
21
15
|
try {
|
|
@@ -23,32 +17,25 @@ const getVideoId = (value?: string) => {
|
|
|
23
17
|
const host = url.hostname.replace(/^www\./, "")
|
|
24
18
|
|
|
25
19
|
if (host === "youtube.com" && url.pathname === "/watch") {
|
|
26
|
-
|
|
20
|
+
const id = url.searchParams.get("v")
|
|
21
|
+
return id ? `https://www.youtube.com/embed/${id}` : undefined
|
|
27
22
|
}
|
|
28
23
|
|
|
29
24
|
if (host === "youtube.com" && url.pathname.startsWith("/shorts/")) {
|
|
30
|
-
|
|
25
|
+
const id = url.pathname.split("/")[2]
|
|
26
|
+
return id ? `https://www.youtube.com/embed/${id}` : undefined
|
|
31
27
|
}
|
|
32
28
|
|
|
33
29
|
if (host === "youtu.be") {
|
|
34
|
-
|
|
30
|
+
const id = url.pathname.slice(1)
|
|
31
|
+
return id ? `https://www.youtube.com/embed/${id}` : undefined
|
|
35
32
|
}
|
|
36
33
|
} catch {
|
|
37
34
|
return undefined
|
|
38
35
|
}
|
|
39
36
|
}
|
|
40
37
|
|
|
41
|
-
const
|
|
42
|
-
const embedSrc = videoId
|
|
43
|
-
? `https://www.youtube-nocookie.com/embed/${videoId}`
|
|
44
|
-
: undefined
|
|
45
|
-
const thumbnailSrc = videoId
|
|
46
|
-
? `https://i.ytimg.com/vi/${videoId}/hqdefault.jpg`
|
|
47
|
-
: undefined
|
|
48
|
-
const srcdoc =
|
|
49
|
-
embedSrc && thumbnailSrc
|
|
50
|
-
? `<style>*{box-sizing:border-box}html,body{height:100%;margin:0}body{display:grid;place-items:center;background:#000;font-family:system-ui,sans-serif}a{position:absolute;inset:0;display:grid;place-items:center;color:white;text-decoration:none}img{width:100%;height:100%;object-fit:cover}span{position:absolute;display:grid;place-items:center;width:4.5rem;height:3.25rem;border-radius:1rem;background:rgb(0 0 0 / .72);box-shadow:0 10px 30px rgb(0 0 0 / .25);transition:background .15s ease}span:before{content:"";margin-left:.25rem;border-top:.7rem solid transparent;border-bottom:.7rem solid transparent;border-left:1.1rem solid currentColor}a:hover span{background:#ff0033}</style><a href="${embedSrc}?autoplay=1" aria-label="Play video"><img src="${thumbnailSrc}" alt="" /><span></span></a>`
|
|
51
|
-
: undefined
|
|
38
|
+
const embedSrc = getEmbedSrc(src)
|
|
52
39
|
const isShort = src?.includes("/shorts/")
|
|
53
40
|
---
|
|
54
41
|
|
|
@@ -56,12 +43,9 @@ const isShort = src?.includes("/shorts/")
|
|
|
56
43
|
embedSrc && (
|
|
57
44
|
<iframe
|
|
58
45
|
src={embedSrc}
|
|
59
|
-
|
|
60
|
-
title={title}
|
|
46
|
+
title="Embedded video"
|
|
61
47
|
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
|
|
62
48
|
allowfullscreen
|
|
63
|
-
loading="lazy"
|
|
64
|
-
referrerpolicy="strict-origin-when-cross-origin"
|
|
65
49
|
class={cn(
|
|
66
50
|
"bg-muted w-full rounded-lg border",
|
|
67
51
|
isShort ? "aspect-9/16 max-w-xs" : "aspect-video",
|