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
|
@@ -9,39 +9,20 @@ type Props = HTMLAttributes<"code"> & {
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
const { class: className, size = "default", ...props } = Astro.props
|
|
12
|
+
|
|
13
|
+
const sizeClass =
|
|
14
|
+
size === "sm" ? "text-xs" : size === "lg" ? "text-base" : "text-sm"
|
|
12
15
|
---
|
|
13
16
|
|
|
14
17
|
<code
|
|
15
18
|
data-slot="typography-inline-code"
|
|
16
19
|
data-size={size}
|
|
17
|
-
class={cn(
|
|
20
|
+
class={cn(
|
|
21
|
+
"bg-muted relative rounded px-[0.3rem] py-[0.2rem] font-mono font-semibold",
|
|
22
|
+
sizeClass,
|
|
23
|
+
className
|
|
24
|
+
)}
|
|
18
25
|
{...props}
|
|
19
26
|
>
|
|
20
27
|
<slot />
|
|
21
28
|
</code>
|
|
22
|
-
|
|
23
|
-
<style is:global>
|
|
24
|
-
@reference "@/styles/global.css";
|
|
25
|
-
|
|
26
|
-
[data-slot="typography-inline-code"],
|
|
27
|
-
[data-slot="typography"] :not(pre) > code {
|
|
28
|
-
@apply bg-muted relative rounded px-[0.3rem] py-[0.2rem] font-mono font-semibold;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
[data-slot="typography-inline-code"][data-size="sm"] {
|
|
32
|
-
@apply text-xs;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
[data-slot="typography-inline-code"][data-size="default"],
|
|
36
|
-
[data-slot="typography"] :not(pre) > code {
|
|
37
|
-
@apply text-sm;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
[data-slot="typography-inline-code"][data-size="lg"] {
|
|
41
|
-
@apply text-base;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
[data-slot="typography"] > table :not(pre) > code {
|
|
45
|
-
@apply rounded-md text-sm leading-5 font-normal;
|
|
46
|
-
}
|
|
47
|
-
</style>
|
|
@@ -9,38 +9,16 @@ type Props = HTMLAttributes<"p"> & {
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
const { class: className, size = "default", ...props } = Astro.props
|
|
12
|
+
|
|
13
|
+
const sizeClass =
|
|
14
|
+
size === "sm" ? "text-base" : size === "lg" ? "text-xl" : "text-lg"
|
|
12
15
|
---
|
|
13
16
|
|
|
14
17
|
<p
|
|
15
18
|
data-slot="typography-lead"
|
|
16
19
|
data-size={size}
|
|
17
|
-
class={cn(className)}
|
|
20
|
+
class={cn("text-muted-foreground", sizeClass, className)}
|
|
18
21
|
{...props}
|
|
19
22
|
>
|
|
20
23
|
<slot />
|
|
21
24
|
</p>
|
|
22
|
-
|
|
23
|
-
<style is:global>
|
|
24
|
-
@reference "@/styles/global.css";
|
|
25
|
-
|
|
26
|
-
[data-slot="typography-lead"] {
|
|
27
|
-
@apply text-muted-foreground;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
[data-slot="typography-lead"][data-size="sm"],
|
|
31
|
-
[data-slot="typography"][data-size="sm"] > [data-slot="typography-lead"] {
|
|
32
|
-
@apply text-base;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
[data-slot="typography-lead"][data-size="default"],
|
|
36
|
-
[data-slot="typography"] > [data-slot="typography-lead"],
|
|
37
|
-
[data-slot="typography"][data-size="default"]
|
|
38
|
-
> [data-slot="typography-lead"] {
|
|
39
|
-
@apply text-lg;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
[data-slot="typography-lead"][data-size="lg"],
|
|
43
|
-
[data-slot="typography"][data-size="lg"] > [data-slot="typography-lead"] {
|
|
44
|
-
@apply text-xl;
|
|
45
|
-
}
|
|
46
|
-
</style>
|
|
@@ -9,36 +9,16 @@ type Props = HTMLAttributes<"li"> & {
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
const { class: className, size = "default", ...props } = Astro.props
|
|
12
|
+
|
|
13
|
+
const sizeClass =
|
|
14
|
+
size === "sm" ? "text-sm" : size === "lg" ? "text-lg" : "text-base"
|
|
12
15
|
---
|
|
13
16
|
|
|
14
17
|
<li
|
|
15
18
|
data-slot="typography-list-item"
|
|
16
19
|
data-size={size}
|
|
17
|
-
class={cn(className)}
|
|
20
|
+
class={cn("mt-2", sizeClass, className)}
|
|
18
21
|
{...props}
|
|
19
22
|
>
|
|
20
23
|
<slot />
|
|
21
24
|
</li>
|
|
22
|
-
|
|
23
|
-
<style is:global>
|
|
24
|
-
@reference "@/styles/global.css";
|
|
25
|
-
|
|
26
|
-
[data-slot="typography-list-item"],
|
|
27
|
-
[data-slot="typography-list"] > li,
|
|
28
|
-
[data-slot="typography"] > ul > li,
|
|
29
|
-
[data-slot="typography"] > ol > li {
|
|
30
|
-
@apply mt-2;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
[data-slot="typography-list-item"][data-size="sm"] {
|
|
34
|
-
@apply text-sm;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
[data-slot="typography-list-item"][data-size="default"] {
|
|
38
|
-
@apply text-base;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
[data-slot="typography-list-item"][data-size="lg"] {
|
|
42
|
-
@apply text-lg;
|
|
43
|
-
}
|
|
44
|
-
</style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
import type {
|
|
2
|
+
import type { Polymorphic } from "astro/types"
|
|
3
3
|
|
|
4
4
|
import { cn } from "@/lib/utils"
|
|
5
5
|
|
|
@@ -12,52 +12,22 @@ const {
|
|
|
12
12
|
size = "default",
|
|
13
13
|
...props
|
|
14
14
|
} = Astro.props
|
|
15
|
+
|
|
16
|
+
const sizeClass =
|
|
17
|
+
size === "sm" ? "text-sm" : size === "lg" ? "text-lg" : "text-base"
|
|
15
18
|
---
|
|
16
19
|
|
|
17
20
|
<Tag
|
|
18
21
|
data-slot="typography-list"
|
|
19
22
|
data-size={size}
|
|
20
23
|
data-ordered={Tag === "ol" ? "" : undefined}
|
|
21
|
-
class={cn(
|
|
24
|
+
class={cn(
|
|
25
|
+
"my-6 ml-6",
|
|
26
|
+
Tag === "ol" ? "list-decimal" : "list-disc",
|
|
27
|
+
sizeClass,
|
|
28
|
+
className
|
|
29
|
+
)}
|
|
22
30
|
{...props}
|
|
23
31
|
>
|
|
24
32
|
<slot />
|
|
25
33
|
</Tag>
|
|
26
|
-
|
|
27
|
-
<style is:global>
|
|
28
|
-
@reference "@/styles/global.css";
|
|
29
|
-
|
|
30
|
-
[data-slot="typography-list"],
|
|
31
|
-
[data-slot="typography"] > ul,
|
|
32
|
-
[data-slot="typography"] > ol {
|
|
33
|
-
@apply my-6 ml-6;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
[data-slot="typography-list"][data-size="sm"] {
|
|
37
|
-
@apply text-sm;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
[data-slot="typography-list"][data-size="default"],
|
|
41
|
-
[data-slot="typography"] > ul,
|
|
42
|
-
[data-slot="typography"] > ol {
|
|
43
|
-
@apply text-base;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
[data-slot="typography-list"][data-size="lg"] {
|
|
47
|
-
@apply text-lg;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
[data-slot="typography-list"]:not([data-ordered]),
|
|
51
|
-
[data-slot="typography"] > ul {
|
|
52
|
-
@apply list-disc;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
[data-slot="typography-list"][data-ordered],
|
|
56
|
-
[data-slot="typography"] > ol {
|
|
57
|
-
@apply list-decimal;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
[data-slot="typography-list"] > li {
|
|
61
|
-
@apply mt-2;
|
|
62
|
-
}
|
|
63
|
-
</style>
|
|
@@ -9,35 +9,16 @@ type Props = HTMLAttributes<"p"> & {
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
const { class: className, size = "default", ...props } = Astro.props
|
|
12
|
+
|
|
13
|
+
const sizeClass =
|
|
14
|
+
size === "sm" ? "text-sm" : size === "lg" ? "text-lg" : "text-base"
|
|
12
15
|
---
|
|
13
16
|
|
|
14
|
-
<p
|
|
17
|
+
<p
|
|
18
|
+
data-slot="typography-p"
|
|
19
|
+
data-size={size}
|
|
20
|
+
class={cn("leading-7 [&:not(:first-child)]:mt-6", sizeClass, className)}
|
|
21
|
+
{...props}
|
|
22
|
+
>
|
|
15
23
|
<slot />
|
|
16
24
|
</p>
|
|
17
|
-
|
|
18
|
-
<style is:global>
|
|
19
|
-
@reference "@/styles/global.css";
|
|
20
|
-
|
|
21
|
-
[data-slot="typography-p"],
|
|
22
|
-
[data-slot="typography"] > p {
|
|
23
|
-
@apply leading-7;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
[data-slot="typography-p"][data-size="sm"] {
|
|
27
|
-
@apply text-sm;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
[data-slot="typography-p"][data-size="default"],
|
|
31
|
-
[data-slot="typography"] > p {
|
|
32
|
-
@apply text-base;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
[data-slot="typography-p"][data-size="lg"] {
|
|
36
|
-
@apply text-lg;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
[data-slot="typography-p"]:not(:first-child),
|
|
40
|
-
[data-slot="typography"] > p:not(:first-child) {
|
|
41
|
-
@apply mt-6;
|
|
42
|
-
}
|
|
43
|
-
</style>
|
|
@@ -9,52 +9,21 @@ type Props = HTMLAttributes<"td"> & {
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
const { class: className, size = "default", ...props } = Astro.props
|
|
12
|
+
|
|
13
|
+
const sizeClass =
|
|
14
|
+
size === "sm" ? "text-sm" : size === "lg" ? "text-lg" : "text-base"
|
|
12
15
|
---
|
|
13
16
|
|
|
14
17
|
<td
|
|
15
18
|
data-slot="typography-table-cell"
|
|
16
19
|
data-size={size}
|
|
17
|
-
class={cn(
|
|
20
|
+
class={cn(
|
|
21
|
+
"border-border border-t px-4 py-3 text-left align-middle",
|
|
22
|
+
"[&[align=center]]:text-center [&[align=right]]:text-right",
|
|
23
|
+
sizeClass,
|
|
24
|
+
className
|
|
25
|
+
)}
|
|
18
26
|
{...props}
|
|
19
27
|
>
|
|
20
28
|
<slot />
|
|
21
29
|
</td>
|
|
22
|
-
|
|
23
|
-
<style is:global>
|
|
24
|
-
@reference "@/styles/global.css";
|
|
25
|
-
|
|
26
|
-
[data-slot="typography-table-cell"],
|
|
27
|
-
[data-slot="typography-table"] td,
|
|
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;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
[data-slot="typography-table-cell"][align="center"],
|
|
50
|
-
[data-slot="typography-table"] td[align="center"],
|
|
51
|
-
[data-slot="typography"] > table td[align="center"] {
|
|
52
|
-
@apply text-center;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
[data-slot="typography-table-cell"][align="right"],
|
|
56
|
-
[data-slot="typography-table"] td[align="right"],
|
|
57
|
-
[data-slot="typography"] > table td[align="right"] {
|
|
58
|
-
@apply text-right;
|
|
59
|
-
}
|
|
60
|
-
</style>
|
|
@@ -9,47 +9,21 @@ type Props = HTMLAttributes<"th"> & {
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
const { class: className, size = "default", ...props } = Astro.props
|
|
12
|
+
|
|
13
|
+
const sizeClass =
|
|
14
|
+
size === "sm" ? "text-sm" : size === "lg" ? "text-lg" : "text-base"
|
|
12
15
|
---
|
|
13
16
|
|
|
14
17
|
<th
|
|
15
18
|
data-slot="typography-table-head"
|
|
16
19
|
data-size={size}
|
|
17
|
-
class={cn(
|
|
20
|
+
class={cn(
|
|
21
|
+
"border-border border-b px-4 py-3 text-left font-semibold",
|
|
22
|
+
"[&[align=center]]:text-center [&[align=right]]:text-right",
|
|
23
|
+
sizeClass,
|
|
24
|
+
className
|
|
25
|
+
)}
|
|
18
26
|
{...props}
|
|
19
27
|
>
|
|
20
28
|
<slot />
|
|
21
29
|
</th>
|
|
22
|
-
|
|
23
|
-
<style is:global>
|
|
24
|
-
@reference "@/styles/global.css";
|
|
25
|
-
|
|
26
|
-
[data-slot="typography-table-head"],
|
|
27
|
-
[data-slot="typography-table"] th,
|
|
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;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
[data-slot="typography-table-head"][align="center"],
|
|
45
|
-
[data-slot="typography-table"] th[align="center"],
|
|
46
|
-
[data-slot="typography"] > table th[align="center"] {
|
|
47
|
-
@apply text-center;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
[data-slot="typography-table-head"][align="right"],
|
|
51
|
-
[data-slot="typography-table"] th[align="right"],
|
|
52
|
-
[data-slot="typography"] > table th[align="right"] {
|
|
53
|
-
@apply text-right;
|
|
54
|
-
}
|
|
55
|
-
</style>
|
|
@@ -9,35 +9,16 @@ type Props = HTMLAttributes<"tr"> & {
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
const { class: className, size = "default", ...props } = Astro.props
|
|
12
|
+
|
|
13
|
+
const sizeClass =
|
|
14
|
+
size === "sm" ? "text-sm" : size === "lg" ? "text-lg" : "text-base"
|
|
12
15
|
---
|
|
13
16
|
|
|
14
17
|
<tr
|
|
15
18
|
data-slot="typography-table-row"
|
|
16
19
|
data-size={size}
|
|
17
|
-
class={cn(className)}
|
|
20
|
+
class={cn("even:bg-muted m-0 border-t p-0", sizeClass, className)}
|
|
18
21
|
{...props}
|
|
19
22
|
>
|
|
20
23
|
<slot />
|
|
21
24
|
</tr>
|
|
22
|
-
|
|
23
|
-
<style is:global>
|
|
24
|
-
@reference "@/styles/global.css";
|
|
25
|
-
|
|
26
|
-
[data-slot="typography-table-row"],
|
|
27
|
-
[data-slot="typography-table"] tr,
|
|
28
|
-
[data-slot="typography"] > table tr {
|
|
29
|
-
@apply even:bg-muted m-0 border-t p-0;
|
|
30
|
-
}
|
|
31
|
-
|
|
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;
|
|
42
|
-
}
|
|
43
|
-
</style>
|
|
@@ -15,45 +15,25 @@ const {
|
|
|
15
15
|
size = "default",
|
|
16
16
|
...props
|
|
17
17
|
} = Astro.props
|
|
18
|
+
|
|
19
|
+
const sizeClass =
|
|
20
|
+
size === "sm" ? "text-sm" : size === "lg" ? "text-lg" : "text-base"
|
|
18
21
|
---
|
|
19
22
|
|
|
20
23
|
<div
|
|
21
24
|
data-slot="typography-table-container"
|
|
22
25
|
data-size={size}
|
|
23
|
-
class={cn(
|
|
26
|
+
class={cn(
|
|
27
|
+
"border-border my-6 w-full overflow-x-auto rounded-xl border",
|
|
28
|
+
containerClass
|
|
29
|
+
)}
|
|
24
30
|
>
|
|
25
31
|
<table
|
|
26
32
|
data-slot="typography-table"
|
|
27
33
|
data-size={size}
|
|
28
|
-
class={cn(className)}
|
|
34
|
+
class={cn("w-full border-collapse", sizeClass, className)}
|
|
29
35
|
{...props}
|
|
30
36
|
>
|
|
31
37
|
<slot />
|
|
32
38
|
</table>
|
|
33
39
|
</div>
|
|
34
|
-
|
|
35
|
-
<style is:global>
|
|
36
|
-
@reference "@/styles/global.css";
|
|
37
|
-
|
|
38
|
-
[data-slot="typography-table-container"] {
|
|
39
|
-
@apply border-border my-6 w-full overflow-y-auto rounded-xl border;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
[data-slot="typography-table"],
|
|
43
|
-
[data-slot="typography"] > table {
|
|
44
|
-
@apply w-full border-collapse;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
[data-slot="typography-table"][data-size="sm"] {
|
|
48
|
-
@apply text-sm;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
[data-slot="typography-table"][data-size="default"],
|
|
52
|
-
[data-slot="typography"] > table {
|
|
53
|
-
@apply text-base;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
[data-slot="typography-table"][data-size="lg"] {
|
|
57
|
-
@apply text-lg;
|
|
58
|
-
}
|
|
59
|
-
</style>
|