@rimelight/ui 0.0.5 → 0.0.7
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/LICENSE +21 -21
- package/package.json +22 -14
- package/src/components/BlogPost.astro +195 -0
- package/src/components/DynamicShowcase.astro +681 -0
- package/src/components/ExtendedCarousel.astro +107 -0
- package/src/components/FormattedDate.astro +6 -2
- package/src/components/Head.astro +153 -0
- package/src/components/ProjectPost.astro +197 -0
- package/src/components/RLHead.astro +3 -0
- package/src/components/ThemeToggle.astro +30 -42
- package/src/components/astro/RLAButton.astro +32 -42
- package/src/components/astro/RLAHeader.astro +75 -0
- package/src/components/nuxt/index.ts +1 -0
- package/src/components/vue/RLVButton.vue +50 -37
- package/src/components/vue/RLVHeader.vue +78 -0
- package/src/composables/index.ts +1 -1
- package/src/composables/{useComponentUI.ts → useUi.ts} +3 -3
- package/src/config/index.ts +0 -2
- package/src/config/site.config.ts +1 -1
- package/src/env.d.ts +13 -16
- package/src/integrations/ui.ts +106 -81
- package/src/integrations/vue-entrypoint.ts +6 -0
- package/src/middleware/sri.ts +2 -2
- package/src/styles/index.css +2 -0
- package/src/themes/button.theme.ts +350 -34
- package/src/themes/header.theme.ts +33 -0
- package/src/themes/index.ts +3 -1
- package/src/utils/index.ts +1 -2
- package/i18n-data.json +0 -186
- package/src/components/MissingTranslationBanner.astro +0 -39
- package/src/components/accordion/Accordion.astro +0 -257
- package/src/components/accordion/AccordionContent.astro +0 -34
- package/src/components/accordion/AccordionItem.astro +0 -29
- package/src/components/accordion/AccordionTrigger.astro +0 -33
- package/src/components/alert/Alert.astro +0 -34
- package/src/components/alert/AlertDescription.astro +0 -15
- package/src/components/alert/AlertTitle.astro +0 -17
- package/src/components/alert-dialog/AlertDialog.astro +0 -275
- package/src/components/alert-dialog/AlertDialogAction.astro +0 -46
- package/src/components/alert-dialog/AlertDialogCancel.astro +0 -46
- package/src/components/alert-dialog/AlertDialogContent.astro +0 -52
- package/src/components/alert-dialog/AlertDialogDescription.astro +0 -18
- package/src/components/alert-dialog/AlertDialogFooter.astro +0 -16
- package/src/components/alert-dialog/AlertDialogHeader.astro +0 -14
- package/src/components/alert-dialog/AlertDialogTitle.astro +0 -20
- package/src/components/alert-dialog/AlertDialogTrigger.astro +0 -47
- package/src/components/aspect-ratio/AspectRatio.astro +0 -32
- package/src/components/avatar/Avatar.astro +0 -29
- package/src/components/avatar/AvatarFallback.astro +0 -18
- package/src/components/avatar/AvatarImage.astro +0 -66
- package/src/components/badge/Badge.astro +0 -57
- package/src/components/breadcrumb/Breadcrumb.astro +0 -12
- package/src/components/breadcrumb/BreadcrumbEllipsis.astro +0 -29
- package/src/components/breadcrumb/BreadcrumbItem.astro +0 -15
- package/src/components/breadcrumb/BreadcrumbLink.astro +0 -24
- package/src/components/breadcrumb/BreadcrumbList.astro +0 -17
- package/src/components/breadcrumb/BreadcrumbPage.astro +0 -22
- package/src/components/breadcrumb/BreadcrumbSeparator.astro +0 -24
- package/src/components/button/Button.astro +0 -58
- package/src/components/button-group/ButtonGroup.astro +0 -64
- package/src/components/button-group/ButtonGroupSeparator.astro +0 -20
- package/src/components/button-group/ButtonGroupText.astro +0 -19
- package/src/components/card/Card.astro +0 -36
- package/src/components/card/CardAction.astro +0 -16
- package/src/components/card/CardContent.astro +0 -16
- package/src/components/card/CardDescription.astro +0 -16
- package/src/components/card/CardFooter.astro +0 -16
- package/src/components/card/CardHeader.astro +0 -19
- package/src/components/card/CardTitle.astro +0 -16
- package/src/components/carousel/Carousel.astro +0 -55
- package/src/components/carousel/CarouselContent.astro +0 -26
- package/src/components/carousel/CarouselItem.astro +0 -26
- package/src/components/carousel/CarouselNext.astro +0 -39
- package/src/components/carousel/CarouselPrevious.astro +0 -41
- package/src/components/carousel/carousel-script.ts +0 -188
- package/src/components/carousel/index.ts +0 -1
- package/src/components/checkbox/Checkbox.astro +0 -133
- package/src/components/collapsible/Collapsible.astro +0 -161
- package/src/components/collapsible/CollapsibleContent.astro +0 -22
- package/src/components/collapsible/CollapsibleTrigger.astro +0 -44
- package/src/components/dialog/Dialog.astro +0 -389
- package/src/components/dialog/DialogClose.astro +0 -35
- package/src/components/dialog/DialogContent.astro +0 -78
- package/src/components/dialog/DialogDescription.astro +0 -14
- package/src/components/dialog/DialogFooter.astro +0 -14
- package/src/components/dialog/DialogHeader.astro +0 -14
- package/src/components/dialog/DialogTitle.astro +0 -18
- package/src/components/dialog/DialogTrigger.astro +0 -47
- package/src/components/dropdown/Dropdown.astro +0 -604
- package/src/components/dropdown/DropdownContent.astro +0 -118
- package/src/components/dropdown/DropdownItem.astro +0 -48
- package/src/components/dropdown/DropdownLabel.astro +0 -29
- package/src/components/dropdown/DropdownSeparator.astro +0 -21
- package/src/components/dropdown/DropdownShortcut.astro +0 -17
- package/src/components/dropdown/DropdownSub.astro +0 -15
- package/src/components/dropdown/DropdownSubContent.astro +0 -39
- package/src/components/dropdown/DropdownSubTrigger.astro +0 -34
- package/src/components/dropdown/DropdownTrigger.astro +0 -52
- package/src/components/dropzone/Dropzone.astro +0 -236
- package/src/components/dropzone/DropzoneFilesList.astro +0 -26
- package/src/components/dropzone/DropzoneLoadingIndicator.astro +0 -10
- package/src/components/dropzone/DropzoneUploadIndicator.astro +0 -10
- package/src/components/embeds/YoutubeEmbed.astro +0 -94
- package/src/components/hero/Hero.astro +0 -166
- package/src/components/icons/Flag.astro +0 -62
- package/src/components/image/ExtendedImage.astro +0 -46
- package/src/components/image/Image.astro +0 -25
- package/src/components/input/Input.astro +0 -27
- package/src/components/input-group/InputGroup.astro +0 -28
- package/src/components/input-group/InputGroupAddon.astro +0 -76
- package/src/components/input-group/InputGroupButton.astro +0 -36
- package/src/components/input-group/InputGroupInput.astro +0 -18
- package/src/components/input-group/InputGroupText.astro +0 -17
- package/src/components/input-group/InputGroupTextarea.astro +0 -22
- package/src/components/input-otp/InputOtp.astro +0 -352
- package/src/components/input-otp/InputOtpGroup.astro +0 -16
- package/src/components/input-otp/InputOtpSeparator.astro +0 -25
- package/src/components/input-otp/InputOtpSlot.astro +0 -50
- package/src/components/input-otp/InputOtpTypes.ts +0 -6
- package/src/components/item/Item.astro +0 -52
- package/src/components/item/ItemActions.astro +0 -16
- package/src/components/item/ItemContent.astro +0 -16
- package/src/components/item/ItemDescription.astro +0 -19
- package/src/components/item/ItemFooter.astro +0 -16
- package/src/components/item/ItemGroup.astro +0 -16
- package/src/components/item/ItemHeader.astro +0 -16
- package/src/components/item/ItemMedia.astro +0 -40
- package/src/components/item/ItemSeparator.astro +0 -23
- package/src/components/item/ItemTitle.astro +0 -16
- package/src/components/kbd/Kbd.astro +0 -21
- package/src/components/kbd/KbdGroup.astro +0 -16
- package/src/components/label/Label.astro +0 -24
- package/src/components/marquee/Marquee.astro +0 -73
- package/src/components/native-select/NativeSelect.astro +0 -68
- package/src/components/native-select/NativeSelectOptGroup.astro +0 -15
- package/src/components/native-select/NativeSelectOption.astro +0 -15
- package/src/components/pagination/Pagination.astro +0 -20
- package/src/components/pagination/PaginationContent.astro +0 -16
- package/src/components/pagination/PaginationEllipsis.astro +0 -37
- package/src/components/pagination/PaginationItem.astro +0 -16
- package/src/components/pagination/PaginationLink.astro +0 -27
- package/src/components/pagination/PaginationNext.astro +0 -33
- package/src/components/pagination/PaginationPrevious.astro +0 -33
- package/src/components/popover/Popover.astro +0 -717
- package/src/components/popover/PopoverContent.astro +0 -102
- package/src/components/popover/PopoverDescription.astro +0 -14
- package/src/components/popover/PopoverHeader.astro +0 -14
- package/src/components/popover/PopoverTitle.astro +0 -14
- package/src/components/popover/PopoverTrigger.astro +0 -51
- package/src/components/progress/Progress.astro +0 -154
- package/src/components/prose/Prose.astro +0 -619
- package/src/components/radio-group/RadioGroup.astro +0 -162
- package/src/components/radio-group/RadioGroupItem.astro +0 -133
- package/src/components/radio-group/RadioGroupTypes.ts +0 -6
- package/src/components/section/Section.astro +0 -167
- package/src/components/select/Select.astro +0 -752
- package/src/components/select/SelectContent.astro +0 -94
- package/src/components/select/SelectGroup.astro +0 -9
- package/src/components/select/SelectItem.astro +0 -51
- package/src/components/select/SelectLabel.astro +0 -14
- package/src/components/select/SelectSearch.astro +0 -49
- package/src/components/select/SelectSeparator.astro +0 -12
- package/src/components/select/SelectTrigger.astro +0 -56
- package/src/components/select/SelectTypes.ts +0 -13
- package/src/components/select/SelectValue.astro +0 -19
- package/src/components/separator/Separator.astro +0 -36
- package/src/components/sheet/Sheet.astro +0 -15
- package/src/components/sheet/SheetClose.astro +0 -15
- package/src/components/sheet/SheetContent.astro +0 -89
- package/src/components/sheet/SheetDescription.astro +0 -16
- package/src/components/sheet/SheetFooter.astro +0 -16
- package/src/components/sheet/SheetHeader.astro +0 -16
- package/src/components/sheet/SheetTitle.astro +0 -16
- package/src/components/sheet/SheetTrigger.astro +0 -15
- package/src/components/sidebar/Sidebar.astro +0 -231
- package/src/components/sidebar/SidebarContent.astro +0 -25
- package/src/components/sidebar/SidebarFooter.astro +0 -22
- package/src/components/sidebar/SidebarGroup.astro +0 -22
- package/src/components/sidebar/SidebarGroupContent.astro +0 -22
- package/src/components/sidebar/SidebarGroupLabel.astro +0 -53
- package/src/components/sidebar/SidebarHeader.astro +0 -22
- package/src/components/sidebar/SidebarInput.astro +0 -24
- package/src/components/sidebar/SidebarInset.astro +0 -22
- package/src/components/sidebar/SidebarMenu.astro +0 -22
- package/src/components/sidebar/SidebarMenuAction.astro +0 -63
- package/src/components/sidebar/SidebarMenuBadge.astro +0 -31
- package/src/components/sidebar/SidebarMenuButton.astro +0 -124
- package/src/components/sidebar/SidebarMenuItem.astro +0 -22
- package/src/components/sidebar/SidebarMenuSkeleton.astro +0 -43
- package/src/components/sidebar/SidebarMenuSub.astro +0 -25
- package/src/components/sidebar/SidebarMenuSubButton.astro +0 -52
- package/src/components/sidebar/SidebarMenuSubItem.astro +0 -17
- package/src/components/sidebar/SidebarProvider.astro +0 -215
- package/src/components/sidebar/SidebarRail.astro +0 -72
- package/src/components/sidebar/SidebarSeparator.astro +0 -25
- package/src/components/sidebar/SidebarTrigger.astro +0 -69
- package/src/components/skeleton/Skeleton.astro +0 -14
- package/src/components/slider/Slider.astro +0 -425
- package/src/components/spinner/Spinner.astro +0 -23
- package/src/components/switch/Switch.astro +0 -192
- package/src/components/switch/SwitchTypes.ts +0 -6
- package/src/components/table/Table.astro +0 -20
- package/src/components/table/TableBody.astro +0 -18
- package/src/components/table/TableCaption.astro +0 -18
- package/src/components/table/TableCell.astro +0 -18
- package/src/components/table/TableFoot.astro +0 -18
- package/src/components/table/TableHead.astro +0 -18
- package/src/components/table/TableHeader.astro +0 -18
- package/src/components/table/TableRow.astro +0 -17
- package/src/components/tabs/Tabs.astro +0 -270
- package/src/components/tabs/TabsContent.astro +0 -28
- package/src/components/tabs/TabsList.astro +0 -23
- package/src/components/tabs/TabsTrigger.astro +0 -34
- package/src/components/textarea/Textarea.astro +0 -31
- package/src/components/toast/ToastDescription.astro +0 -22
- package/src/components/toast/ToastItem.astro +0 -56
- package/src/components/toast/ToastTemplate.astro +0 -27
- package/src/components/toast/ToastTitle.astro +0 -59
- package/src/components/toast/Toaster.astro +0 -981
- package/src/components/toast/index.ts +0 -1
- package/src/components/toast/toast-manager.ts +0 -234
- package/src/components/toggle/Toggle.astro +0 -174
- package/src/components/toggle/ToggleTypes.ts +0 -14
- package/src/components/tooltip/Tooltip.astro +0 -422
- package/src/components/tooltip/TooltipContent.astro +0 -83
- package/src/components/tooltip/TooltipTrigger.astro +0 -13
- package/src/components/video/Video.astro +0 -121
- package/src/config/cookies.ts +0 -5
- package/src/config/links.ts +0 -4
- package/src/domain/cms/index.ts +0 -1
- package/src/domain/cms/types.ts +0 -20
- package/src/domain/i18n/constants.ts +0 -21
- package/src/domain/i18n/cookie-storage.ts +0 -13
- package/src/domain/i18n/country-to-locale-map.ts +0 -67
- package/src/domain/i18n/fallbacks.generated.ts +0 -230
- package/src/domain/i18n/fetcher.ts +0 -278
- package/src/domain/i18n/flags.ts +0 -16
- package/src/domain/i18n/format.ts +0 -90
- package/src/domain/i18n/index.ts +0 -10
- package/src/domain/i18n/middleware/i18n.ts +0 -161
- package/src/domain/i18n/resolve-locale.ts +0 -55
- package/src/domain/i18n/runtime-constants.ts +0 -14
- package/src/domain/i18n/schema.ts +0 -29
- package/src/domain/index.ts +0 -4
- package/src/domain/seo/constants.ts +0 -6
- package/src/domain/seo/index.ts +0 -3
- package/src/domain/seo/services/index.ts +0 -3
- package/src/domain/seo/services/llms.ts +0 -56
- package/src/domain/seo/services/robots.ts +0 -12
- package/src/domain/seo/services/sitemap.ts +0 -56
- package/src/domain/seo/utils.ts +0 -36
- package/src/domain/theme/constants.ts +0 -6
- package/src/domain/theme/index.ts +0 -2
- package/src/domain/theme/schema.ts +0 -10
- package/src/i18n.generated.d.ts +0 -202
- package/src/lib/component-preview.ts +0 -73
- package/src/lib/index.ts +0 -6
- package/src/lib/remark/remark-modified-time.ts +0 -13
- package/src/lib/showcase-preview-elements.ts +0 -408
- package/src/lib/showcase-renderer.ts +0 -218
- package/src/lib/showcase-utils.ts +0 -189
- package/src/lib/turnstile.ts +0 -35
- package/src/lib/utils/starwind/positioning.ts +0 -318
- package/src/locales/de/blog.json +0 -9
- package/src/locales/de/common.json +0 -19
- package/src/locales/de/errors.json +0 -6
- package/src/locales/de/home.json +0 -20
- package/src/locales/de/messages.json +0 -8
- package/src/locales/de/nav.json +0 -13
- package/src/locales/de/projects.json +0 -9
- package/src/locales/de/services.json +0 -43
- package/src/locales/en/blog.json +0 -9
- package/src/locales/en/chat.json +0 -29
- package/src/locales/en/common.json +0 -19
- package/src/locales/en/cookie_notice.json +0 -11
- package/src/locales/en/editor.json +0 -24
- package/src/locales/en/errors.json +0 -6
- package/src/locales/en/home.json +0 -20
- package/src/locales/en/messages.json +0 -8
- package/src/locales/en/nav.json +0 -13
- package/src/locales/en/projects.json +0 -9
- package/src/locales/en/services.json +0 -43
- package/src/locales/es/blog.json +0 -9
- package/src/locales/es/common.json +0 -19
- package/src/locales/es/errors.json +0 -6
- package/src/locales/es/home.json +0 -20
- package/src/locales/es/messages.json +0 -8
- package/src/locales/es/nav.json +0 -13
- package/src/locales/es/projects.json +0 -9
- package/src/locales/es/services.json +0 -43
- package/src/locales/ja/blog.json +0 -9
- package/src/locales/ja/common.json +0 -19
- package/src/locales/ja/errors.json +0 -6
- package/src/locales/ja/home.json +0 -20
- package/src/locales/ja/messages.json +0 -8
- package/src/locales/ja/nav.json +0 -13
- package/src/locales/ja/projects.json +0 -9
- package/src/locales/ja/services.json +0 -43
- package/src/locales/pt/blog.json +0 -9
- package/src/locales/pt/chat.json +0 -29
- package/src/locales/pt/common.json +0 -19
- package/src/locales/pt/cookie_notice.json +0 -11
- package/src/locales/pt/editor.json +0 -24
- package/src/locales/pt/errors.json +0 -6
- package/src/locales/pt/home.json +0 -20
- package/src/locales/pt/messages.json +0 -8
- package/src/locales/pt/nav.json +0 -13
- package/src/locales/pt/projects.json +0 -9
- package/src/locales/pt/services.json +0 -43
- package/src/utils/server/cookies.ts +0 -98
- package/src/utils/server/index.ts +0 -1
- package/src/utils/shared/deep-merge.ts +0 -36
- package/src/utils/shared/index.ts +0 -3
- package/src/utils/shared/parse-boolean.ts +0 -14
- /package/src/utils/{shared/embed.ts → embed.ts} +0 -0
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import type { HTMLAttributes } from "astro/types";
|
|
3
|
-
import { cv } from "css-variants";
|
|
4
|
-
|
|
5
|
-
interface Props extends HTMLAttributes<"div">, NonNullable<Parameters<typeof avatar>[0]> {}
|
|
6
|
-
|
|
7
|
-
export const avatar = cv({
|
|
8
|
-
base: "text-foreground bg-muted relative overflow-hidden rounded-full border-2",
|
|
9
|
-
variants: {
|
|
10
|
-
variant: {
|
|
11
|
-
default: "border-border",
|
|
12
|
-
primary: "border-primary",
|
|
13
|
-
secondary: "border-secondary",
|
|
14
|
-
info: "border-info",
|
|
15
|
-
success: "border-success",
|
|
16
|
-
warning: "border-warning",
|
|
17
|
-
error: "border-error",
|
|
18
|
-
},
|
|
19
|
-
size: { sm: "h-2xl w-2xl text-xs", md: "h-3xl w-3xl text-sm", lg: "h-3xl w-3xl text-base" },
|
|
20
|
-
},
|
|
21
|
-
defaultVariants: { variant: "default", size: "md" },
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
const { variant, size, class: className, ...rest } = Astro.props;
|
|
25
|
-
---
|
|
26
|
-
|
|
27
|
-
<figure class:list={[avatar({ variant, size }), className]} {...rest} data-slot="avatar">
|
|
28
|
-
<slot />
|
|
29
|
-
</figure>
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import type { HTMLAttributes } from "astro/types";
|
|
3
|
-
import { cv } from "css-variants";
|
|
4
|
-
|
|
5
|
-
export const avatarFallback = cv({
|
|
6
|
-
base: "absolute inset-0.5 flex items-center justify-center rounded-full font-medium",
|
|
7
|
-
});
|
|
8
|
-
|
|
9
|
-
interface Props extends HTMLAttributes<"div"> {
|
|
10
|
-
class?: string;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
const { class: className, ...rest } = Astro.props;
|
|
14
|
-
---
|
|
15
|
-
|
|
16
|
-
<div class:list={[avatarFallback(), className]} {...rest} data-slot="avatar-fallback">
|
|
17
|
-
<slot />
|
|
18
|
-
</div>
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import type { HTMLAttributes } from "astro/types";
|
|
3
|
-
import { Image } from "astro:assets";
|
|
4
|
-
import { cv } from "css-variants";
|
|
5
|
-
|
|
6
|
-
export const avatarImage = cv({ base: "relative z-1 h-full w-full object-cover" });
|
|
7
|
-
|
|
8
|
-
type BaseProps = { alt: string; class?: string };
|
|
9
|
-
|
|
10
|
-
type WithSrc = BaseProps & { src: string; image?: never };
|
|
11
|
-
|
|
12
|
-
type WithImage = BaseProps & { src?: never; image: ImageMetadata };
|
|
13
|
-
|
|
14
|
-
type Props = HTMLAttributes<"img"> & (WithSrc | WithImage);
|
|
15
|
-
|
|
16
|
-
const { src, image, alt, class: className, width, height, ...rest } = Astro.props;
|
|
17
|
-
|
|
18
|
-
if (!src && !image) {
|
|
19
|
-
throw new Error("Either 'src' or 'image' is required for an avatar image.");
|
|
20
|
-
}
|
|
21
|
-
---
|
|
22
|
-
|
|
23
|
-
{
|
|
24
|
-
src && (
|
|
25
|
-
// eslint-disable-next-line astro/jsx-a11y/no-noninteractive-element-interactions
|
|
26
|
-
<img
|
|
27
|
-
src={src}
|
|
28
|
-
alt={alt}
|
|
29
|
-
class:list={[avatarImage(), className]}
|
|
30
|
-
width={64}
|
|
31
|
-
height={64}
|
|
32
|
-
{...rest}
|
|
33
|
-
data-slot="avatar-image"
|
|
34
|
-
/>
|
|
35
|
-
)
|
|
36
|
-
}
|
|
37
|
-
{
|
|
38
|
-
image && (
|
|
39
|
-
<Image
|
|
40
|
-
src={image}
|
|
41
|
-
alt={alt}
|
|
42
|
-
class:list={[avatarImage(), className]}
|
|
43
|
-
width={64}
|
|
44
|
-
{...rest}
|
|
45
|
-
data-slot="avatar-image"
|
|
46
|
-
/>
|
|
47
|
-
)
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
<script>
|
|
51
|
-
const handleImageError = (event: Event) => {
|
|
52
|
-
const target = event.target as HTMLImageElement;
|
|
53
|
-
if (target) {
|
|
54
|
-
target.style.display = "none";
|
|
55
|
-
}
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
const setupAvatarErrors = () => {
|
|
59
|
-
document.querySelectorAll('[data-slot="avatar-image"]').forEach((img) => {
|
|
60
|
-
img.addEventListener("error", handleImageError);
|
|
61
|
-
});
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
setupAvatarErrors();
|
|
65
|
-
document.addEventListener("astro:after-swap", setupAvatarErrors);
|
|
66
|
-
</script>
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import type { HTMLAttributes } from "astro/types";
|
|
3
|
-
import { cv } from "css-variants";
|
|
4
|
-
|
|
5
|
-
export interface BadgeProps
|
|
6
|
-
extends HTMLAttributes<"div">, Omit<HTMLAttributes<"a">, "type">, NonNullable<Parameters<typeof badge>[0]> {}
|
|
7
|
-
|
|
8
|
-
type Props = BadgeProps;
|
|
9
|
-
|
|
10
|
-
export const badge = cv({
|
|
11
|
-
base: [
|
|
12
|
-
"starwind-badge inline-flex items-center gap-4xs rounded-full font-medium ws-nowrap",
|
|
13
|
-
"[&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
14
|
-
"transition-all outline-none focus-visible:ring-3",
|
|
15
|
-
"aria-invalid:border-error aria-invalid:focus-visible:ring-error/40",
|
|
16
|
-
],
|
|
17
|
-
variants: {
|
|
18
|
-
variant: {
|
|
19
|
-
default: "bg-foreground text-background focus-visible:ring-outline/50",
|
|
20
|
-
primary: "bg-primary text-primary-foreground focus-visible:ring-primary/50",
|
|
21
|
-
secondary: "bg-secondary text-secondary-foreground focus-visible:ring-secondary/50",
|
|
22
|
-
outline: "border-border focus-visible:border-outline focus-visible:ring-outline/50 b",
|
|
23
|
-
ghost: "bg-foreground/10 text-foreground focus-visible:ring-outline/50",
|
|
24
|
-
info: "bg-info text-info-foreground focus-visible:ring-info/50",
|
|
25
|
-
success: "bg-success text-success-foreground focus-visible:ring-success/50",
|
|
26
|
-
warning: "bg-warning text-warning-foreground focus-visible:ring-warning/50",
|
|
27
|
-
error: "bg-error text-error-foreground focus-visible:ring-error/50",
|
|
28
|
-
},
|
|
29
|
-
size: {
|
|
30
|
-
sm: "px-2xs py-6xs text-xs [&_svg:not([class*='size-'])]:size-3",
|
|
31
|
-
md: "px-xs py-6xs text-sm [&_svg:not([class*='size-'])]:size-4",
|
|
32
|
-
lg: "px-2xl py-5xs text-base [&_svg:not([class*='size-'])]:size-4.5",
|
|
33
|
-
},
|
|
34
|
-
isLink: { true: "cursor-pointer", false: "" },
|
|
35
|
-
},
|
|
36
|
-
compoundVariants: [
|
|
37
|
-
{ isLink: true, variant: "default", className: "hover:bg-foreground/80" },
|
|
38
|
-
{ isLink: true, variant: "primary", className: "hover:bg-primary/80" },
|
|
39
|
-
{ isLink: true, variant: "secondary", className: "hover:bg-secondary/80" },
|
|
40
|
-
{ isLink: true, variant: "outline", className: "hover:border-border/80" },
|
|
41
|
-
{ isLink: true, variant: "ghost", className: "hover:bg-foreground/7" },
|
|
42
|
-
{ isLink: true, variant: "info", className: "hover:bg-info/80" },
|
|
43
|
-
{ isLink: true, variant: "success", className: "hover:bg-success/80" },
|
|
44
|
-
{ isLink: true, variant: "warning", className: "hover:bg-warning/80" },
|
|
45
|
-
{ isLink: true, variant: "error", className: "hover:bg-error/80" },
|
|
46
|
-
],
|
|
47
|
-
defaultVariants: { variant: "default", size: "md", isLink: false },
|
|
48
|
-
});
|
|
49
|
-
|
|
50
|
-
const { variant, size, class: className, ...rest } = Astro.props;
|
|
51
|
-
const isLink = !!Astro.props.href;
|
|
52
|
-
const Tag = Astro.props.href ? "a" : "div";
|
|
53
|
-
---
|
|
54
|
-
|
|
55
|
-
<Tag class:list={[badge({ variant, size, isLink }), className]} data-slot="badge" {...rest}>
|
|
56
|
-
<slot />
|
|
57
|
-
</Tag>
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import type { HTMLAttributes } from "astro/types";
|
|
3
|
-
|
|
4
|
-
export interface BreadcrumbProps extends HTMLAttributes<"nav"> {}
|
|
5
|
-
type Props = BreadcrumbProps;
|
|
6
|
-
|
|
7
|
-
const { class: className, ...rest } = Astro.props;
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
<nav aria-label="breadcrumb" class={className} {...rest} data-slot="breadcrumb">
|
|
11
|
-
<slot />
|
|
12
|
-
</nav>
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import type { HTMLAttributes } from "astro/types";
|
|
3
|
-
import { cv } from "css-variants";
|
|
4
|
-
import IconMoreHorizontal from "~icons/lucide/more-horizontal";
|
|
5
|
-
|
|
6
|
-
export interface BreadcrumbEllipsisProps extends HTMLAttributes<"span"> {}
|
|
7
|
-
type Props = BreadcrumbEllipsisProps;
|
|
8
|
-
|
|
9
|
-
export const breadcrumbEllipsis = cv({
|
|
10
|
-
base: "flex size-6 items-center justify-center [&>svg]:size-4",
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
const { class: className, ...rest } = Astro.props;
|
|
14
|
-
---
|
|
15
|
-
|
|
16
|
-
<span
|
|
17
|
-
role="presentation"
|
|
18
|
-
aria-hidden="true"
|
|
19
|
-
class:list={[breadcrumbEllipsis(), className]}
|
|
20
|
-
{...rest}
|
|
21
|
-
data-slot="breadcrumb-ellipsis"
|
|
22
|
-
>
|
|
23
|
-
<slot name="icon">
|
|
24
|
-
<IconMoreHorizontal />
|
|
25
|
-
</slot>
|
|
26
|
-
<slot>
|
|
27
|
-
<span class="sr-only">More</span>
|
|
28
|
-
</slot>
|
|
29
|
-
</span>
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import type { HTMLAttributes } from "astro/types";
|
|
3
|
-
import { cv } from "css-variants";
|
|
4
|
-
|
|
5
|
-
export interface BreadcrumbItemProps extends HTMLAttributes<"li"> {}
|
|
6
|
-
type Props = BreadcrumbItemProps;
|
|
7
|
-
|
|
8
|
-
export const breadcrumbItem = cv({ base: "inline-flex items-center gap-1.5" });
|
|
9
|
-
|
|
10
|
-
const { class: className, ...rest } = Astro.props;
|
|
11
|
-
---
|
|
12
|
-
|
|
13
|
-
<li class:list={[breadcrumbItem(), className]} {...rest} data-slot="breadcrumb-item">
|
|
14
|
-
<slot />
|
|
15
|
-
</li>
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import type { HTMLAttributes } from "astro/types";
|
|
3
|
-
import { cv } from "css-variants";
|
|
4
|
-
|
|
5
|
-
export interface BreadcrumbLinkProps extends HTMLAttributes<"a"> {
|
|
6
|
-
asChild?: boolean;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
type Props = BreadcrumbLinkProps;
|
|
10
|
-
|
|
11
|
-
export const breadcrumbLink = cv({ base: "hover:text-foreground transition-colors" });
|
|
12
|
-
|
|
13
|
-
const { class: className, asChild = false, ...rest } = Astro.props;
|
|
14
|
-
---
|
|
15
|
-
|
|
16
|
-
{
|
|
17
|
-
asChild ? (
|
|
18
|
-
<slot />
|
|
19
|
-
) : (
|
|
20
|
-
<a class:list={[breadcrumbLink(), className]} {...rest} data-slot="breadcrumb-link">
|
|
21
|
-
<slot />
|
|
22
|
-
</a>
|
|
23
|
-
)
|
|
24
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import type { HTMLAttributes } from "astro/types";
|
|
3
|
-
import { cv } from "css-variants";
|
|
4
|
-
|
|
5
|
-
export interface BreadcrumbListProps extends HTMLAttributes<"ol"> {}
|
|
6
|
-
type Props = BreadcrumbListProps;
|
|
7
|
-
|
|
8
|
-
export const breadcrumbList = cv({
|
|
9
|
-
base: "text-muted-foreground flex flex-wrap items-center gap-xs break-words text-sm",
|
|
10
|
-
});
|
|
11
|
-
|
|
12
|
-
const { class: className, ...rest } = Astro.props;
|
|
13
|
-
---
|
|
14
|
-
|
|
15
|
-
<ol class:list={[breadcrumbList(), className]} {...rest} data-slot="breadcrumb-list">
|
|
16
|
-
<slot />
|
|
17
|
-
</ol>
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import type { HTMLAttributes } from "astro/types";
|
|
3
|
-
import { cv } from "css-variants";
|
|
4
|
-
|
|
5
|
-
export interface BreadcrumbPageProps extends HTMLAttributes<"span"> {}
|
|
6
|
-
type Props = BreadcrumbPageProps;
|
|
7
|
-
|
|
8
|
-
export const breadcrumbPage = cv({ base: "text-foreground font-normal" });
|
|
9
|
-
|
|
10
|
-
const { class: className, ...rest } = Astro.props;
|
|
11
|
-
---
|
|
12
|
-
|
|
13
|
-
<span
|
|
14
|
-
role="link"
|
|
15
|
-
aria-disabled="true"
|
|
16
|
-
aria-current="page"
|
|
17
|
-
class:list={[breadcrumbPage(), className]}
|
|
18
|
-
{...rest}
|
|
19
|
-
data-slot="breadcrumb-page"
|
|
20
|
-
>
|
|
21
|
-
<slot />
|
|
22
|
-
</span>
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import type { HTMLAttributes } from "astro/types";
|
|
3
|
-
import { cv } from "css-variants";
|
|
4
|
-
import IconChevronRight from "~icons/lucide/chevron-right";
|
|
5
|
-
|
|
6
|
-
export interface BreadcrumbSeparatorProps extends HTMLAttributes<"li"> {}
|
|
7
|
-
type Props = BreadcrumbSeparatorProps;
|
|
8
|
-
|
|
9
|
-
export const breadcrumbSeparator = cv({ base: "[&>svg]:size-4" });
|
|
10
|
-
|
|
11
|
-
const { class: className, ...rest } = Astro.props;
|
|
12
|
-
---
|
|
13
|
-
|
|
14
|
-
<li
|
|
15
|
-
role="presentation"
|
|
16
|
-
aria-hidden="true"
|
|
17
|
-
class:list={[breadcrumbSeparator(), className]}
|
|
18
|
-
{...rest}
|
|
19
|
-
data-slot="breadcrumb-separator"
|
|
20
|
-
>
|
|
21
|
-
<slot>
|
|
22
|
-
<IconChevronRight />
|
|
23
|
-
</slot>
|
|
24
|
-
</li>
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import type { HTMLAttributes } from "astro/types";
|
|
3
|
-
import { cv } from "css-variants";
|
|
4
|
-
|
|
5
|
-
export interface ButtonProps
|
|
6
|
-
extends
|
|
7
|
-
HTMLAttributes<"button">,
|
|
8
|
-
Omit<HTMLAttributes<"a">, "type">,
|
|
9
|
-
NonNullable<Parameters<typeof button>[0]> {}
|
|
10
|
-
|
|
11
|
-
type Props = ButtonProps;
|
|
12
|
-
|
|
13
|
-
const { variant, size, class: className, ...rest } = Astro.props;
|
|
14
|
-
|
|
15
|
-
export const button = cv({
|
|
16
|
-
base: [
|
|
17
|
-
"inline-flex items-center justify-center gap-4xs rounded-md font-medium ws-nowrap",
|
|
18
|
-
"[&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
19
|
-
"transition-all outline-none focus-visible:ring-3",
|
|
20
|
-
"disabled:pointer-events-none disabled:op-50",
|
|
21
|
-
"aria-invalid:border-error aria-invalid:focus-visible:ring-error/40",
|
|
22
|
-
],
|
|
23
|
-
variants: {
|
|
24
|
-
variant: {
|
|
25
|
-
default: "bg-foreground text-background hover:bg-foreground/90 focus-visible:ring-outline/50",
|
|
26
|
-
primary:
|
|
27
|
-
"bg-primary text-primary-foreground hover:bg-primary/90 focus-visible:ring-primary/50",
|
|
28
|
-
secondary:
|
|
29
|
-
"bg-secondary text-secondary-foreground hover:bg-secondary/90 focus-visible:ring-secondary/50",
|
|
30
|
-
outline:
|
|
31
|
-
"dark:border-input focus-visible:ring-outline/50 bg-background dark:bg-input/30 focus-visible:border-outline hover:bg-muted dark:hover:bg-input/50 hover:text-foreground b shadow-xs",
|
|
32
|
-
ghost: "hover:bg-muted hover:text-foreground focus-visible:ring-outline/50",
|
|
33
|
-
info: "bg-info text-info-foreground hover:bg-info/90 focus-visible:ring-info/50",
|
|
34
|
-
success:
|
|
35
|
-
"bg-success text-success-foreground hover:bg-success/90 focus-visible:ring-success/50",
|
|
36
|
-
warning:
|
|
37
|
-
"bg-warning text-warning-foreground hover:bg-warning/90 focus-visible:ring-warning/50",
|
|
38
|
-
error: "bg-error text-error-foreground hover:bg-error/90 focus-visible:ring-error/50",
|
|
39
|
-
},
|
|
40
|
-
size: {
|
|
41
|
-
xs: "px-xs py-2xs text-xs has-[>svg]:px-xs [&_svg:not([class*='size-'])]:size-xs",
|
|
42
|
-
sm: "px-sm py-3xs text-sm has-[>svg]:px-sm [&_svg:not([class*='size-'])]:size-sm",
|
|
43
|
-
md: "px-md py-2xs text-md has-[>svg]:px-md [&_svg:not([class*='size-'])]:size-md",
|
|
44
|
-
lg: "px-lg py-xs text-lg has-[>svg]:px-lg [&_svg:not([class*='size-'])]:size-lg",
|
|
45
|
-
xl: "px-xl py-sm text-xl has-[>svg]:px-xl [&_svg:not([class*='size-'])]:size-xl",
|
|
46
|
-
icon: "size-10 p-0",
|
|
47
|
-
"icon-sm": "size-8 p-0",
|
|
48
|
-
},
|
|
49
|
-
},
|
|
50
|
-
defaultVariants: { variant: "default", size: "md" },
|
|
51
|
-
});
|
|
52
|
-
|
|
53
|
-
const Tag = Astro.props.href ? "a" : "button";
|
|
54
|
-
---
|
|
55
|
-
|
|
56
|
-
<Tag class:list={[button({ variant, size }), className]} data-slot="button" {...rest}>
|
|
57
|
-
<slot />
|
|
58
|
-
</Tag>
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import type { HTMLAttributes } from "astro/types";
|
|
3
|
-
import { cv } from "css-variants";
|
|
4
|
-
|
|
5
|
-
export interface ButtonGroupProps extends HTMLAttributes<"div"> {
|
|
6
|
-
/**
|
|
7
|
-
* The orientation of the button group.
|
|
8
|
-
* @default "horizontal"
|
|
9
|
-
*/
|
|
10
|
-
orientation?: "horizontal" | "vertical";
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
type Props = ButtonGroupProps;
|
|
14
|
-
|
|
15
|
-
export const buttonGroup = cv({
|
|
16
|
-
base: [
|
|
17
|
-
"flex w-fit items-stretch",
|
|
18
|
-
"[&>*]:focus-visible:relative [&>*]:focus-visible:z-10",
|
|
19
|
-
"has-[>[data-slot=button-group]]:gap-md [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1",
|
|
20
|
-
],
|
|
21
|
-
variants: {
|
|
22
|
-
orientation: {
|
|
23
|
-
horizontal: [
|
|
24
|
-
"[&>*:not(:first-child)]:rounded-l-none",
|
|
25
|
-
"[&>*:not(:first-child)]:border-l-0",
|
|
26
|
-
"[&>*:not(:last-child):not(:has(+_script:last-child))]:rounded-r-none",
|
|
27
|
-
"[&>*:not(:first-child)_>_[data-as-child]_>_*]:rounded-l-none",
|
|
28
|
-
"[&>*:not(:first-child)_>_[data-as-child]_>_*]:border-l-0",
|
|
29
|
-
"[&>*:not(:last-child):not(:has(+_script:last-child))_>_[data-as-child]_>_*]:rounded-r-none",
|
|
30
|
-
"[&>*:not(:first-child)_>_[data-slot=select-trigger]]:rounded-l-none",
|
|
31
|
-
"[&>*:not(:first-child)_>_[data-slot=select-trigger]]:border-l-0",
|
|
32
|
-
"[&>*:not(:last-child):not(:has(+_script:last-child))_>_[data-slot=select-trigger]]:rounded-r-none",
|
|
33
|
-
],
|
|
34
|
-
vertical: [
|
|
35
|
-
"flex-col",
|
|
36
|
-
"[&>*:not(:first-child)]:rounded-t-none",
|
|
37
|
-
"[&>*:not(:first-child)]:border-t-0",
|
|
38
|
-
"[&>*:not(:last-child):not(:has(+_script:last-child))]:rounded-b-none",
|
|
39
|
-
"[&>*:not(:first-child)_>_[data-as-child]_>_*]:rounded-t-none",
|
|
40
|
-
"[&>*:not(:first-child)_>_[data-as-child]_>_*]:border-t-0",
|
|
41
|
-
"[&>*:not(:last-child):not(:has(+_script:last-child))_>_[data-as-child]_>_*]:rounded-b-none",
|
|
42
|
-
"[&>*:not(:first-child)_>_[data-slot=select-trigger]]:rounded-t-none",
|
|
43
|
-
"[&>*:not(:first-child)_>_[data-slot=select-trigger]]:border-t-0",
|
|
44
|
-
"[&>*:not(:last-child):not(:has(+_script:last-child))_>_[data-slot=select-trigger]]:rounded-b-none",
|
|
45
|
-
],
|
|
46
|
-
},
|
|
47
|
-
},
|
|
48
|
-
defaultVariants: {
|
|
49
|
-
orientation: "horizontal",
|
|
50
|
-
},
|
|
51
|
-
});
|
|
52
|
-
|
|
53
|
-
const { class: className, orientation = "horizontal", ...rest } = Astro.props;
|
|
54
|
-
---
|
|
55
|
-
|
|
56
|
-
<div
|
|
57
|
-
role="group"
|
|
58
|
-
data-orientation={orientation}
|
|
59
|
-
class:list={[buttonGroup({ orientation }), className]}
|
|
60
|
-
{...rest}
|
|
61
|
-
data-slot="button-group"
|
|
62
|
-
>
|
|
63
|
-
<slot />
|
|
64
|
-
</div>
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import type { HTMLAttributes } from "astro/types";
|
|
3
|
-
import { cv } from "css-variants";
|
|
4
|
-
|
|
5
|
-
type Props = HTMLAttributes<"div"> & {
|
|
6
|
-
/**
|
|
7
|
-
* The orientation of the separator.
|
|
8
|
-
* @default "vertical"
|
|
9
|
-
*/
|
|
10
|
-
orientation?: "horizontal" | "vertical";
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
export const buttonGroupSeparator = cv({
|
|
14
|
-
base: ["bg-input relative m-0! self-stretch data-[orientation=vertical]:h-auto"],
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
const { class: className, orientation = "vertical", ...rest } = Astro.props;
|
|
18
|
-
---
|
|
19
|
-
|
|
20
|
-
<div class:list={[buttonGroupSeparator(), className]} {...rest} data-slot="button-group-separator"></div>
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import type { HTMLAttributes } from "astro/types";
|
|
3
|
-
import { cv } from "css-variants";
|
|
4
|
-
|
|
5
|
-
type Props = HTMLAttributes<"div">;
|
|
6
|
-
|
|
7
|
-
export const buttonGroupText = cv({
|
|
8
|
-
base: [
|
|
9
|
-
"bg-muted flex items-center gap-md rounded-md b px-4 text-sm font-medium shadow-xs",
|
|
10
|
-
"[&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",
|
|
11
|
-
],
|
|
12
|
-
});
|
|
13
|
-
|
|
14
|
-
const { class: className, ...rest } = Astro.props;
|
|
15
|
-
---
|
|
16
|
-
|
|
17
|
-
<div class:list={[buttonGroupText(), className]} {...rest} data-slot="button-group-text">
|
|
18
|
-
<slot />
|
|
19
|
-
</div>
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import type { HTMLAttributes } from "astro/types";
|
|
3
|
-
import { cv } from "css-variants";
|
|
4
|
-
|
|
5
|
-
type VariantProps<T extends (...args: any) => any> = NonNullable<Parameters<T>[0]>;
|
|
6
|
-
|
|
7
|
-
type Props = HTMLAttributes<"div"> & VariantProps<typeof card>;
|
|
8
|
-
|
|
9
|
-
export const card = cv({
|
|
10
|
-
base: [
|
|
11
|
-
"bg-card text-card-foreground group/card ring-border flex flex-col rounded-xl ring-1",
|
|
12
|
-
"has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0",
|
|
13
|
-
"*:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",
|
|
14
|
-
],
|
|
15
|
-
variants: {
|
|
16
|
-
size: {
|
|
17
|
-
default: "gap-xl py-xl",
|
|
18
|
-
sm: "gap-2xl py-2xl text-sm",
|
|
19
|
-
},
|
|
20
|
-
},
|
|
21
|
-
defaultVariants: {
|
|
22
|
-
size: "default",
|
|
23
|
-
},
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
const { class: className, size, ...rest } = Astro.props;
|
|
27
|
-
---
|
|
28
|
-
|
|
29
|
-
<div
|
|
30
|
-
class:list={[card({ size }), className]}
|
|
31
|
-
data-size={size ?? "default"}
|
|
32
|
-
{...rest}
|
|
33
|
-
data-slot="card"
|
|
34
|
-
>
|
|
35
|
-
<slot />
|
|
36
|
-
</div>
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import type { HTMLAttributes } from "astro/types";
|
|
3
|
-
import { cv } from "css-variants";
|
|
4
|
-
|
|
5
|
-
type Props = HTMLAttributes<"div">;
|
|
6
|
-
|
|
7
|
-
export const cardAction = cv({
|
|
8
|
-
base: "col-start-2 row-span-2 row-start-1 self-start justify-self-end",
|
|
9
|
-
});
|
|
10
|
-
|
|
11
|
-
const { class: className, ...rest } = Astro.props;
|
|
12
|
-
---
|
|
13
|
-
|
|
14
|
-
<div class:list={[cardAction(), className]} {...rest} data-slot="card-action">
|
|
15
|
-
<slot />
|
|
16
|
-
</div>
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import type { HTMLAttributes } from "astro/types";
|
|
3
|
-
import { cv } from "css-variants";
|
|
4
|
-
|
|
5
|
-
type Props = HTMLAttributes<"div">;
|
|
6
|
-
|
|
7
|
-
export const cardContent = cv({
|
|
8
|
-
base: "px-xl group-data-[size=sm]/card:px-2xl",
|
|
9
|
-
});
|
|
10
|
-
|
|
11
|
-
const { class: className, ...rest } = Astro.props;
|
|
12
|
-
---
|
|
13
|
-
|
|
14
|
-
<div class:list={[cardContent(), className]} {...rest} data-slot="card-content">
|
|
15
|
-
<slot />
|
|
16
|
-
</div>
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import type { HTMLAttributes } from "astro/types";
|
|
3
|
-
import { cv } from "css-variants";
|
|
4
|
-
|
|
5
|
-
type Props = HTMLAttributes<"div">;
|
|
6
|
-
|
|
7
|
-
export const cardDescription = cv({
|
|
8
|
-
base: "text-muted-foreground text-base group-data-[size=sm]/card:text-sm",
|
|
9
|
-
});
|
|
10
|
-
|
|
11
|
-
const { class: className, ...rest } = Astro.props;
|
|
12
|
-
---
|
|
13
|
-
|
|
14
|
-
<div class:list={[cardDescription(), className]} {...rest} data-slot="card-description">
|
|
15
|
-
<slot />
|
|
16
|
-
</div>
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import type { HTMLAttributes } from "astro/types";
|
|
3
|
-
import { cv } from "css-variants";
|
|
4
|
-
|
|
5
|
-
type Props = HTMLAttributes<"div">;
|
|
6
|
-
|
|
7
|
-
export const cardFooter = cv({
|
|
8
|
-
base: "bg-muted/50 flex items-center rounded-b-xl border-t p-xl group-data-[size=sm]/card:p-2xl",
|
|
9
|
-
});
|
|
10
|
-
|
|
11
|
-
const { class: className, ...rest } = Astro.props;
|
|
12
|
-
---
|
|
13
|
-
|
|
14
|
-
<div class:list={[cardFooter(), className]} {...rest} data-slot="card-footer">
|
|
15
|
-
<slot />
|
|
16
|
-
</div>
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import type { HTMLAttributes } from "astro/types";
|
|
3
|
-
import { cv } from "css-variants";
|
|
4
|
-
|
|
5
|
-
type Props = HTMLAttributes<"div">;
|
|
6
|
-
|
|
7
|
-
export const cardHeader = cv({
|
|
8
|
-
base: [
|
|
9
|
-
"@container/card-header grid auto-rows-min items-start gap-1 px-xl group-data-[size=sm]/card:px-2xl",
|
|
10
|
-
"has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto]",
|
|
11
|
-
],
|
|
12
|
-
});
|
|
13
|
-
|
|
14
|
-
const { class: className, ...rest } = Astro.props;
|
|
15
|
-
---
|
|
16
|
-
|
|
17
|
-
<div class:list={[cardHeader(), className]} {...rest} data-slot="card-header">
|
|
18
|
-
<slot />
|
|
19
|
-
</div>
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import type { HTMLAttributes } from "astro/types";
|
|
3
|
-
import { cv } from "css-variants";
|
|
4
|
-
|
|
5
|
-
type Props = HTMLAttributes<"div">;
|
|
6
|
-
|
|
7
|
-
export const cardTitle = cv({
|
|
8
|
-
base: "font-heading text-xl leading-snug font-medium group-data-[size=sm]/card:text-base",
|
|
9
|
-
});
|
|
10
|
-
|
|
11
|
-
const { class: className, ...rest } = Astro.props;
|
|
12
|
-
---
|
|
13
|
-
|
|
14
|
-
<div class:list={[cardTitle(), className]} {...rest} data-slot="card-title">
|
|
15
|
-
<slot />
|
|
16
|
-
</div>
|