@orbitkit/components 0.1.0 → 0.2.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/README.md +25 -25
- package/dist/astro/accordion/Accordion.astro +34 -0
- package/dist/astro/accordion/AccordionItem.astro +19 -0
- package/dist/astro/accordion/AccordionTrigger.astro +33 -0
- package/dist/astro/accordion/AcordionContent.astro +23 -0
- package/dist/astro/accordion/accordion.ts +151 -0
- package/dist/astro/accordion/index.ts +6 -0
- package/dist/astro/alert/Alert.astro +30 -30
- package/dist/astro/alert/AlertDescription.astro +10 -10
- package/dist/astro/alert/AlertTitle.astro +15 -15
- package/dist/astro/alert/alertVariants.ts +51 -51
- package/dist/astro/alert/index.ts +6 -6
- package/dist/astro/avatar/Avatar.astro +16 -16
- package/dist/astro/avatar/AvatarFallback.astro +18 -18
- package/dist/astro/avatar/AvatarImage.astro +14 -14
- package/dist/astro/avatar/avatarVariants.ts +23 -23
- package/dist/astro/avatar/index.ts +6 -6
- package/dist/astro/badge/Badge.astro +22 -22
- package/dist/astro/badge/badgeVariants.ts +37 -37
- package/dist/astro/badge/index.ts +4 -4
- package/dist/astro/breadcrumb/Breadcrumb.astro +12 -12
- package/dist/astro/breadcrumb/BreadcrumbEllipsis.astro +20 -20
- package/dist/astro/breadcrumb/BreadcrumbItem.astro +15 -15
- package/dist/astro/breadcrumb/BreadcrumbLink.astro +18 -18
- package/dist/astro/breadcrumb/BreadcrumbList.astro +18 -18
- package/dist/astro/breadcrumb/BreadcrumbPage.astro +18 -18
- package/dist/astro/breadcrumb/BreadcrumbSeparator.astro +17 -17
- package/dist/astro/breadcrumb/index.ts +17 -17
- package/dist/astro/button/Button.astro +29 -29
- package/dist/astro/button/buttonVariants.ts +61 -61
- package/dist/astro/button/index.ts +4 -4
- package/dist/astro/card/Card.astro +18 -18
- package/dist/astro/card/CardContent.astro +12 -12
- package/dist/astro/card/CardDescription.astro +12 -12
- package/dist/astro/card/CardFooter.astro +15 -15
- package/dist/astro/card/CardHeader.astro +12 -12
- package/dist/astro/card/CardTitle.astro +18 -18
- package/dist/astro/card/index.ts +15 -15
- package/dist/astro/checkbox/Checkbox.astro +38 -38
- package/dist/astro/checkbox/index.ts +3 -3
- package/dist/astro/collapsible/Collapsible.astro +34 -0
- package/dist/astro/collapsible/CollapsibleContent.astro +20 -0
- package/dist/astro/collapsible/collapsible.ts +81 -0
- package/dist/astro/collapsible/index.ts +4 -0
- package/dist/astro/divider/Divider.astro +22 -22
- package/dist/astro/divider/index.ts +3 -3
- package/dist/astro/drawer/Drawer.astro +19 -0
- package/dist/astro/drawer/DrawerContent.astro +74 -0
- package/dist/astro/drawer/DrawerDescription.astro +12 -0
- package/dist/astro/drawer/DrawerFooter.astro +15 -0
- package/dist/astro/drawer/DrawerHeader.astro +12 -0
- package/dist/astro/drawer/DrawerTitle.astro +18 -0
- package/dist/astro/drawer/drawer.ts +104 -0
- package/dist/astro/drawer/drawerVariants.ts +83 -0
- package/dist/astro/drawer/index.ts +17 -0
- package/dist/astro/dropdown/DropdownMenu.astro +19 -0
- package/dist/astro/dropdown/DropdownMenuContent.astro +42 -0
- package/dist/astro/dropdown/DropdownMenuGroup.astro +3 -0
- package/dist/astro/dropdown/DropdownMenuItem.astro +27 -0
- package/dist/astro/dropdown/DropdownMenuLabel.astro +3 -0
- package/dist/astro/dropdown/DropdownMenuSeparator.astro +6 -0
- package/dist/astro/dropdown/dropdown.ts +157 -0
- package/dist/astro/dropdown/dropdownVariants.ts +134 -0
- package/dist/astro/dropdown/index.ts +23 -0
- package/dist/astro/input/Input.astro +18 -18
- package/dist/astro/input/index.ts +4 -4
- package/dist/astro/input/inputVariants.ts +30 -30
- package/dist/astro/kbd/Kbd.astro +18 -0
- package/dist/astro/kbd/index.ts +3 -0
- package/dist/astro/label/Label.astro +14 -14
- package/dist/astro/label/index.ts +3 -3
- package/dist/astro/list/List.astro +25 -25
- package/dist/astro/list/ListItem.astro +39 -39
- package/dist/astro/list/ListVariants.ts +65 -65
- package/dist/astro/list/index.ts +5 -5
- package/dist/astro/modal/Modal.astro +19 -0
- package/dist/astro/modal/ModalContent.astro +71 -0
- package/dist/astro/modal/ModalDescription.astro +12 -0
- package/dist/astro/modal/ModalFooter.astro +15 -0
- package/dist/astro/modal/ModalHeader.astro +12 -0
- package/dist/astro/modal/ModalTitle.astro +18 -0
- package/dist/astro/modal/index.ts +15 -0
- package/dist/astro/modal/modal.ts +101 -0
- package/dist/astro/pagination/Pagination.astro +12 -0
- package/dist/astro/pagination/PaginationContent.astro +15 -0
- package/dist/astro/pagination/PaginationEllipsis.astro +33 -0
- package/dist/astro/pagination/PaginationItem.astro +12 -0
- package/dist/astro/pagination/PaginationLink.astro +21 -0
- package/dist/astro/pagination/PaginationNext.astro +29 -0
- package/dist/astro/pagination/PaginationPrevious.astro +34 -0
- package/dist/astro/pagination/index.ts +15 -0
- package/dist/astro/pagination/paginationVariants.ts +26 -0
- package/dist/astro/popover/Popover.astro +17 -0
- package/dist/astro/popover/PopoverContent.astro +39 -0
- package/dist/astro/popover/index.ts +5 -0
- package/dist/astro/popover/popover.ts +113 -0
- package/dist/astro/popover/popoverVariants.ts +115 -0
- package/dist/astro/progress/Progress.astro +23 -23
- package/dist/astro/progress/index.ts +4 -4
- package/dist/astro/progress/progressContainer.astro +17 -17
- package/dist/astro/radio/Radio.astro +26 -26
- package/dist/astro/radio/index.ts +3 -3
- package/dist/astro/select/Option.astro +11 -11
- package/dist/astro/select/Select.astro +39 -39
- package/dist/astro/select/index.ts +5 -5
- package/dist/astro/select/selectVariants.ts +30 -30
- package/dist/astro/skeleton/Skeleton.astro +12 -12
- package/dist/astro/skeleton/SkeletonItem.astro +18 -18
- package/dist/astro/skeleton/index.ts +4 -4
- package/dist/astro/stat/Stat.astro +12 -0
- package/dist/astro/stat/StatDescription.astro +12 -0
- package/dist/astro/stat/StatTitle.astro +18 -0
- package/dist/astro/stat/StatValue.astro +12 -0
- package/dist/astro/stat/index.ts +6 -0
- package/dist/astro/switch/Switch.astro +19 -19
- package/dist/astro/switch/index.ts +3 -3
- package/dist/astro/tab/Tab.astro +33 -0
- package/dist/astro/tab/TabContent.astro +19 -0
- package/dist/astro/tab/TabList.astro +19 -0
- package/dist/astro/tab/TabTrigger.astro +24 -0
- package/dist/astro/tab/index.ts +6 -0
- package/dist/astro/tab/tab.ts +142 -0
- package/dist/astro/textarea/Textarea.astro +19 -19
- package/dist/astro/textarea/TextareaVariants.ts +30 -30
- package/dist/astro/textarea/index.ts +4 -4
- package/dist/astro/tooltip/Tooltip.astro +40 -0
- package/dist/astro/tooltip/TooltipContent.astro +39 -0
- package/dist/astro/tooltip/index.ts +5 -0
- package/dist/astro/tooltip/tooltip.ts +137 -0
- package/dist/astro/tooltip/tooltipVariants.ts +115 -0
- package/dist/index.js +46 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { cva } from "class-variance-authority";
|
|
2
|
-
|
|
3
|
-
const avatarBaseClass =
|
|
4
|
-
"relative inline-flex items-center justify-center size-10 overflow-hidden bg-secondary text-secondary-foreground z-10";
|
|
5
|
-
|
|
6
|
-
const avatarVariants = cva(avatarBaseClass, {
|
|
7
|
-
variants: {
|
|
8
|
-
variant: {
|
|
9
|
-
circular: "rounded-full",
|
|
10
|
-
square: "rounded-sm",
|
|
11
|
-
},
|
|
12
|
-
bordered: {
|
|
13
|
-
false: null,
|
|
14
|
-
true: "ring-2 ring-border",
|
|
15
|
-
},
|
|
16
|
-
},
|
|
17
|
-
defaultVariants: {
|
|
18
|
-
variant: "circular",
|
|
19
|
-
bordered: false,
|
|
20
|
-
},
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
export { avatarVariants };
|
|
1
|
+
import { cva } from "class-variance-authority";
|
|
2
|
+
|
|
3
|
+
const avatarBaseClass =
|
|
4
|
+
"relative inline-flex items-center justify-center size-10 overflow-hidden bg-secondary text-secondary-foreground z-10";
|
|
5
|
+
|
|
6
|
+
const avatarVariants = cva(avatarBaseClass, {
|
|
7
|
+
variants: {
|
|
8
|
+
variant: {
|
|
9
|
+
circular: "rounded-full",
|
|
10
|
+
square: "rounded-sm",
|
|
11
|
+
},
|
|
12
|
+
bordered: {
|
|
13
|
+
false: null,
|
|
14
|
+
true: "ring-2 ring-border",
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
defaultVariants: {
|
|
18
|
+
variant: "circular",
|
|
19
|
+
bordered: false,
|
|
20
|
+
},
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
export { avatarVariants };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import Avatar from "./Avatar.astro";
|
|
2
|
-
import AvatarFallback from "./AvatarFallback.astro";
|
|
3
|
-
import AvatarImage from "./AvatarImage.astro";
|
|
4
|
-
import { avatarVariants } from "./avatarVariants";
|
|
5
|
-
|
|
6
|
-
export { Avatar, AvatarFallback, AvatarImage, avatarVariants };
|
|
1
|
+
import Avatar from "./Avatar.astro";
|
|
2
|
+
import AvatarFallback from "./AvatarFallback.astro";
|
|
3
|
+
import AvatarImage from "./AvatarImage.astro";
|
|
4
|
+
import { avatarVariants } from "./avatarVariants";
|
|
5
|
+
|
|
6
|
+
export { Avatar, AvatarFallback, AvatarImage, avatarVariants };
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
---
|
|
2
|
-
import { cn } from "@/utils/cn";
|
|
3
|
-
import { type HTMLAttributes } from "astro/types";
|
|
4
|
-
import type { VariantProps } from "class-variance-authority";
|
|
5
|
-
import { badgeVariants } from "./badgeVariants";
|
|
6
|
-
|
|
7
|
-
interface Props
|
|
8
|
-
extends HTMLAttributes<"div">,
|
|
9
|
-
HTMLAttributes<"a">,
|
|
10
|
-
VariantProps<typeof badgeVariants> {}
|
|
11
|
-
|
|
12
|
-
const { class: className, variant, rounded, size, ...attrs } = Astro.props;
|
|
13
|
-
|
|
14
|
-
const Comp = Astro.props.href ? "a" : "div";
|
|
15
|
-
---
|
|
16
|
-
|
|
17
|
-
<Comp
|
|
18
|
-
{...attrs}
|
|
19
|
-
class={cn(badgeVariants({ variant, rounded, size, className }))}
|
|
20
|
-
>
|
|
21
|
-
<slot />
|
|
22
|
-
</Comp>
|
|
1
|
+
---
|
|
2
|
+
import { cn } from "@/utils/cn";
|
|
3
|
+
import { type HTMLAttributes } from "astro/types";
|
|
4
|
+
import type { VariantProps } from "class-variance-authority";
|
|
5
|
+
import { badgeVariants } from "./badgeVariants";
|
|
6
|
+
|
|
7
|
+
interface Props
|
|
8
|
+
extends HTMLAttributes<"div">,
|
|
9
|
+
HTMLAttributes<"a">,
|
|
10
|
+
VariantProps<typeof badgeVariants> {}
|
|
11
|
+
|
|
12
|
+
const { class: className, variant, rounded, size, ...attrs } = Astro.props;
|
|
13
|
+
|
|
14
|
+
const Comp = Astro.props.href ? "a" : "div";
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
<Comp
|
|
18
|
+
{...attrs}
|
|
19
|
+
class={cn(badgeVariants({ variant, rounded, size, className }))}
|
|
20
|
+
>
|
|
21
|
+
<slot />
|
|
22
|
+
</Comp>
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import { cva } from "class-variance-authority";
|
|
2
|
-
|
|
3
|
-
const classBase =
|
|
4
|
-
"inline-flex justify-center items-center gap-1 text-xs font-medium px-2.5 py-0.5";
|
|
5
|
-
|
|
6
|
-
const badgeVariants = cva(classBase, {
|
|
7
|
-
variants: {
|
|
8
|
-
variant: {
|
|
9
|
-
default: "bg-secondary text-secondary-foreground",
|
|
10
|
-
outline:
|
|
11
|
-
"bg-secondary text-secondary-foreground border-secondary-accent border",
|
|
12
|
-
},
|
|
13
|
-
rounded: {
|
|
14
|
-
none: "rounded-none",
|
|
15
|
-
xs: "rounded-xs",
|
|
16
|
-
sm: "rounded-sm",
|
|
17
|
-
md: "rounded-md",
|
|
18
|
-
lg: "rounded-lg",
|
|
19
|
-
xl: "rounded-xl",
|
|
20
|
-
full: "rounded-full",
|
|
21
|
-
},
|
|
22
|
-
size: {
|
|
23
|
-
xs: "text-xs [&_svg]:size-2.5",
|
|
24
|
-
sm: "text-sm [&_svg]:size-3",
|
|
25
|
-
md: "text-base [&_svg]:size-3",
|
|
26
|
-
lg: "text-lg [&_svg]:size-4",
|
|
27
|
-
xl: "text-xl [&_svg]:size-4",
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
defaultVariants: {
|
|
31
|
-
variant: "default",
|
|
32
|
-
rounded: "sm",
|
|
33
|
-
size: "xs",
|
|
34
|
-
},
|
|
35
|
-
});
|
|
36
|
-
|
|
37
|
-
export { badgeVariants };
|
|
1
|
+
import { cva } from "class-variance-authority";
|
|
2
|
+
|
|
3
|
+
const classBase =
|
|
4
|
+
"inline-flex justify-center items-center gap-1 text-xs font-medium px-2.5 py-0.5";
|
|
5
|
+
|
|
6
|
+
const badgeVariants = cva(classBase, {
|
|
7
|
+
variants: {
|
|
8
|
+
variant: {
|
|
9
|
+
default: "bg-secondary text-secondary-foreground",
|
|
10
|
+
outline:
|
|
11
|
+
"bg-secondary text-secondary-foreground border-secondary-accent border",
|
|
12
|
+
},
|
|
13
|
+
rounded: {
|
|
14
|
+
none: "rounded-none",
|
|
15
|
+
xs: "rounded-xs",
|
|
16
|
+
sm: "rounded-sm",
|
|
17
|
+
md: "rounded-md",
|
|
18
|
+
lg: "rounded-lg",
|
|
19
|
+
xl: "rounded-xl",
|
|
20
|
+
full: "rounded-full",
|
|
21
|
+
},
|
|
22
|
+
size: {
|
|
23
|
+
xs: "text-xs [&_svg]:size-2.5",
|
|
24
|
+
sm: "text-sm [&_svg]:size-3",
|
|
25
|
+
md: "text-base [&_svg]:size-3",
|
|
26
|
+
lg: "text-lg [&_svg]:size-4",
|
|
27
|
+
xl: "text-xl [&_svg]:size-4",
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
defaultVariants: {
|
|
31
|
+
variant: "default",
|
|
32
|
+
rounded: "sm",
|
|
33
|
+
size: "xs",
|
|
34
|
+
},
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
export { badgeVariants };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import Badge from "./Badge.astro";
|
|
2
|
-
import { badgeVariants } from "./badgeVariants";
|
|
3
|
-
|
|
4
|
-
export { Badge, badgeVariants };
|
|
1
|
+
import Badge from "./Badge.astro";
|
|
2
|
+
import { badgeVariants } from "./badgeVariants";
|
|
3
|
+
|
|
4
|
+
export { Badge, badgeVariants };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
---
|
|
2
|
-
import { cn } from "@/utils/cn";
|
|
3
|
-
import { type HTMLAttributes } from "astro/types";
|
|
4
|
-
|
|
5
|
-
interface Props extends HTMLAttributes<"nav"> {}
|
|
6
|
-
|
|
7
|
-
const { class: className, ...attrs } = Astro.props;
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
<nav aria-label="breadcrumb" class={cn("w-max", className)}>
|
|
11
|
-
<slot />
|
|
12
|
-
</nav>
|
|
1
|
+
---
|
|
2
|
+
import { cn } from "@/utils/cn";
|
|
3
|
+
import { type HTMLAttributes } from "astro/types";
|
|
4
|
+
|
|
5
|
+
interface Props extends HTMLAttributes<"nav"> {}
|
|
6
|
+
|
|
7
|
+
const { class: className, ...attrs } = Astro.props;
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
<nav aria-label="breadcrumb" class={cn("w-max", className)}>
|
|
11
|
+
<slot />
|
|
12
|
+
</nav>
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
---
|
|
2
|
-
import { cn } from "@/utils/cn";
|
|
3
|
-
import type { HTMLAttributes } from "astro/types";
|
|
4
|
-
|
|
5
|
-
type Props = HTMLAttributes<"span">;
|
|
6
|
-
|
|
7
|
-
const { class: className, ...attrs } = Astro.props;
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
<span
|
|
11
|
-
{...attrs}
|
|
12
|
-
role="presentation"
|
|
13
|
-
aria-hidden="true"
|
|
14
|
-
class={cn(
|
|
15
|
-
"flex size-6 items-center justify-center [&>svg]:size-4",
|
|
16
|
-
className,
|
|
17
|
-
)}
|
|
18
|
-
>
|
|
19
|
-
<slot> ... </slot>
|
|
20
|
-
</span>
|
|
1
|
+
---
|
|
2
|
+
import { cn } from "@/utils/cn";
|
|
3
|
+
import type { HTMLAttributes } from "astro/types";
|
|
4
|
+
|
|
5
|
+
type Props = HTMLAttributes<"span">;
|
|
6
|
+
|
|
7
|
+
const { class: className, ...attrs } = Astro.props;
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
<span
|
|
11
|
+
{...attrs}
|
|
12
|
+
role="presentation"
|
|
13
|
+
aria-hidden="true"
|
|
14
|
+
class={cn(
|
|
15
|
+
"flex size-6 items-center justify-center [&>svg]:size-4",
|
|
16
|
+
className,
|
|
17
|
+
)}
|
|
18
|
+
>
|
|
19
|
+
<slot> ... </slot>
|
|
20
|
+
</span>
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
---
|
|
2
|
-
import { cn } from "@/utils/cn";
|
|
3
|
-
import { type HTMLAttributes } from "astro/types";
|
|
4
|
-
|
|
5
|
-
interface Props extends HTMLAttributes<"li"> {}
|
|
6
|
-
|
|
7
|
-
const { class: className, ...attrs } = Astro.props;
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
<li
|
|
11
|
-
{...attrs}
|
|
12
|
-
class={cn("flex flex-row items-center justify-between gap-1", className)}
|
|
13
|
-
>
|
|
14
|
-
<slot />
|
|
15
|
-
</li>
|
|
1
|
+
---
|
|
2
|
+
import { cn } from "@/utils/cn";
|
|
3
|
+
import { type HTMLAttributes } from "astro/types";
|
|
4
|
+
|
|
5
|
+
interface Props extends HTMLAttributes<"li"> {}
|
|
6
|
+
|
|
7
|
+
const { class: className, ...attrs } = Astro.props;
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
<li
|
|
11
|
+
{...attrs}
|
|
12
|
+
class={cn("flex flex-row items-center justify-between gap-1", className)}
|
|
13
|
+
>
|
|
14
|
+
<slot />
|
|
15
|
+
</li>
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
---
|
|
2
|
-
import { cn } from "@/utils/cn";
|
|
3
|
-
import { type HTMLAttributes } from "astro/types";
|
|
4
|
-
|
|
5
|
-
interface Props extends HTMLAttributes<"a"> {}
|
|
6
|
-
|
|
7
|
-
const { class: className, ...attrs } = Astro.props;
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
<a
|
|
11
|
-
{...attrs}
|
|
12
|
-
class={cn(
|
|
13
|
-
"flex items-center justify-between gap-1 cursor-pointer hover:text-foreground [&_svg]:size-4",
|
|
14
|
-
className,
|
|
15
|
-
)}
|
|
16
|
-
>
|
|
17
|
-
<slot />
|
|
18
|
-
</a>
|
|
1
|
+
---
|
|
2
|
+
import { cn } from "@/utils/cn";
|
|
3
|
+
import { type HTMLAttributes } from "astro/types";
|
|
4
|
+
|
|
5
|
+
interface Props extends HTMLAttributes<"a"> {}
|
|
6
|
+
|
|
7
|
+
const { class: className, ...attrs } = Astro.props;
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
<a
|
|
11
|
+
{...attrs}
|
|
12
|
+
class={cn(
|
|
13
|
+
"flex items-center justify-between gap-1 cursor-pointer hover:text-foreground [&_svg]:size-4",
|
|
14
|
+
className,
|
|
15
|
+
)}
|
|
16
|
+
>
|
|
17
|
+
<slot />
|
|
18
|
+
</a>
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
---
|
|
2
|
-
import { cn } from "@/utils/cn";
|
|
3
|
-
import { type HTMLAttributes } from "astro/types";
|
|
4
|
-
|
|
5
|
-
interface Props extends HTMLAttributes<"ol"> {}
|
|
6
|
-
|
|
7
|
-
const { class: className, ...attrs } = Astro.props;
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
<ol
|
|
11
|
-
{...attrs}
|
|
12
|
-
class={cn(
|
|
13
|
-
"flex flex-row flex-wrap items-center gap-2 rtl:flex-row-reverse text-muted-foreground break-words font-medium",
|
|
14
|
-
className,
|
|
15
|
-
)}
|
|
16
|
-
>
|
|
17
|
-
<slot />
|
|
18
|
-
</ol>
|
|
1
|
+
---
|
|
2
|
+
import { cn } from "@/utils/cn";
|
|
3
|
+
import { type HTMLAttributes } from "astro/types";
|
|
4
|
+
|
|
5
|
+
interface Props extends HTMLAttributes<"ol"> {}
|
|
6
|
+
|
|
7
|
+
const { class: className, ...attrs } = Astro.props;
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
<ol
|
|
11
|
+
{...attrs}
|
|
12
|
+
class={cn(
|
|
13
|
+
"flex flex-row flex-wrap items-center gap-2 rtl:flex-row-reverse text-muted-foreground break-words font-medium",
|
|
14
|
+
className,
|
|
15
|
+
)}
|
|
16
|
+
>
|
|
17
|
+
<slot />
|
|
18
|
+
</ol>
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
---
|
|
2
|
-
import { cn } from "@/utils/cn";
|
|
3
|
-
import { type HTMLAttributes } from "astro/types";
|
|
4
|
-
|
|
5
|
-
interface Props extends HTMLAttributes<"span"> {}
|
|
6
|
-
|
|
7
|
-
const { class: className, ...attrs } = Astro.props;
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
<spam
|
|
11
|
-
{...attrs}
|
|
12
|
-
class={cn(
|
|
13
|
-
"flex items-center justify-between gap-1 cursor-pointer text-foreground [&_svg]:size-4",
|
|
14
|
-
className,
|
|
15
|
-
)}
|
|
16
|
-
>
|
|
17
|
-
<slot />
|
|
18
|
-
</spam>
|
|
1
|
+
---
|
|
2
|
+
import { cn } from "@/utils/cn";
|
|
3
|
+
import { type HTMLAttributes } from "astro/types";
|
|
4
|
+
|
|
5
|
+
interface Props extends HTMLAttributes<"span"> {}
|
|
6
|
+
|
|
7
|
+
const { class: className, ...attrs } = Astro.props;
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
<spam
|
|
11
|
+
{...attrs}
|
|
12
|
+
class={cn(
|
|
13
|
+
"flex items-center justify-between gap-1 cursor-pointer text-foreground [&_svg]:size-4",
|
|
14
|
+
className,
|
|
15
|
+
)}
|
|
16
|
+
>
|
|
17
|
+
<slot />
|
|
18
|
+
</spam>
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
---
|
|
2
|
-
import { cn } from "@/utils/cn";
|
|
3
|
-
import type { HTMLAttributes } from "astro/types";
|
|
4
|
-
|
|
5
|
-
type Props = HTMLAttributes<"li">;
|
|
6
|
-
|
|
7
|
-
const { class: className, ...attrs } = Astro.props;
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
<li
|
|
11
|
-
{...attrs}
|
|
12
|
-
role="presentation"
|
|
13
|
-
aria-hidden="true"
|
|
14
|
-
class={cn("[&_svg]:size-4", className)}
|
|
15
|
-
>
|
|
16
|
-
<slot> / </slot>
|
|
17
|
-
</li>
|
|
1
|
+
---
|
|
2
|
+
import { cn } from "@/utils/cn";
|
|
3
|
+
import type { HTMLAttributes } from "astro/types";
|
|
4
|
+
|
|
5
|
+
type Props = HTMLAttributes<"li">;
|
|
6
|
+
|
|
7
|
+
const { class: className, ...attrs } = Astro.props;
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
<li
|
|
11
|
+
{...attrs}
|
|
12
|
+
role="presentation"
|
|
13
|
+
aria-hidden="true"
|
|
14
|
+
class={cn("[&_svg]:size-4", className)}
|
|
15
|
+
>
|
|
16
|
+
<slot> / </slot>
|
|
17
|
+
</li>
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import Breadcrumb from "./Breadcrumb.astro";
|
|
2
|
-
import BreadcrumbEllipsis from "./BreadcrumbEllipsis.astro";
|
|
3
|
-
import BreadcrumbItem from "./BreadcrumbItem.astro";
|
|
4
|
-
import BreadcrumbLink from "./BreadcrumbLink.astro";
|
|
5
|
-
import BreadcrumbList from "./BreadcrumbList.astro";
|
|
6
|
-
import BreadcrumbPage from "./BreadcrumbPage.astro";
|
|
7
|
-
import BreadcrumbSeparator from "./BreadcrumbSeparator.astro";
|
|
8
|
-
|
|
9
|
-
export {
|
|
10
|
-
Breadcrumb,
|
|
11
|
-
BreadcrumbEllipsis,
|
|
12
|
-
BreadcrumbItem,
|
|
13
|
-
BreadcrumbLink,
|
|
14
|
-
BreadcrumbList,
|
|
15
|
-
BreadcrumbPage,
|
|
16
|
-
BreadcrumbSeparator,
|
|
17
|
-
};
|
|
1
|
+
import Breadcrumb from "./Breadcrumb.astro";
|
|
2
|
+
import BreadcrumbEllipsis from "./BreadcrumbEllipsis.astro";
|
|
3
|
+
import BreadcrumbItem from "./BreadcrumbItem.astro";
|
|
4
|
+
import BreadcrumbLink from "./BreadcrumbLink.astro";
|
|
5
|
+
import BreadcrumbList from "./BreadcrumbList.astro";
|
|
6
|
+
import BreadcrumbPage from "./BreadcrumbPage.astro";
|
|
7
|
+
import BreadcrumbSeparator from "./BreadcrumbSeparator.astro";
|
|
8
|
+
|
|
9
|
+
export {
|
|
10
|
+
Breadcrumb,
|
|
11
|
+
BreadcrumbEllipsis,
|
|
12
|
+
BreadcrumbItem,
|
|
13
|
+
BreadcrumbLink,
|
|
14
|
+
BreadcrumbList,
|
|
15
|
+
BreadcrumbPage,
|
|
16
|
+
BreadcrumbSeparator,
|
|
17
|
+
};
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
---
|
|
2
|
-
import { cn } from "@/utils/cn";
|
|
3
|
-
import type { HTMLAttributes } from "astro/types";
|
|
4
|
-
import { type VariantProps } from "class-variance-authority";
|
|
5
|
-
import buttonVariants from "./buttonVariants";
|
|
6
|
-
|
|
7
|
-
export interface Props
|
|
8
|
-
extends Omit<HTMLAttributes<"button">, "disabled">,
|
|
9
|
-
Omit<HTMLAttributes<"a">, "type">,
|
|
10
|
-
VariantProps<typeof buttonVariants> {}
|
|
11
|
-
|
|
12
|
-
const {
|
|
13
|
-
class: className,
|
|
14
|
-
variant,
|
|
15
|
-
size,
|
|
16
|
-
rounded,
|
|
17
|
-
disabled,
|
|
18
|
-
...attrs
|
|
19
|
-
} = Astro.props;
|
|
20
|
-
|
|
21
|
-
const Comp = Astro.props.href ? "a" : "button";
|
|
22
|
-
---
|
|
23
|
-
|
|
24
|
-
<Comp
|
|
25
|
-
{...attrs}
|
|
26
|
-
class={cn(buttonVariants({ variant, size, rounded, disabled, className }))}
|
|
27
|
-
>
|
|
28
|
-
<slot />
|
|
29
|
-
</Comp>
|
|
1
|
+
---
|
|
2
|
+
import { cn } from "@/utils/cn";
|
|
3
|
+
import type { HTMLAttributes } from "astro/types";
|
|
4
|
+
import { type VariantProps } from "class-variance-authority";
|
|
5
|
+
import buttonVariants from "./buttonVariants";
|
|
6
|
+
|
|
7
|
+
export interface Props
|
|
8
|
+
extends Omit<HTMLAttributes<"button">, "disabled">,
|
|
9
|
+
Omit<HTMLAttributes<"a">, "type">,
|
|
10
|
+
VariantProps<typeof buttonVariants> {}
|
|
11
|
+
|
|
12
|
+
const {
|
|
13
|
+
class: className,
|
|
14
|
+
variant,
|
|
15
|
+
size,
|
|
16
|
+
rounded,
|
|
17
|
+
disabled,
|
|
18
|
+
...attrs
|
|
19
|
+
} = Astro.props;
|
|
20
|
+
|
|
21
|
+
const Comp = Astro.props.href ? "a" : "button";
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
<Comp
|
|
25
|
+
{...attrs}
|
|
26
|
+
class={cn(buttonVariants({ variant, size, rounded, disabled, className }))}
|
|
27
|
+
>
|
|
28
|
+
<slot />
|
|
29
|
+
</Comp>
|
|
@@ -1,61 +1,61 @@
|
|
|
1
|
-
import { cva } from "class-variance-authority";
|
|
2
|
-
|
|
3
|
-
const baseClass =
|
|
4
|
-
"flex justify-center gap-1.5 items-center font-medium cursor-pointer outline-none border [&_svg]:pointer-events-none [&_svg]:shrink-0";
|
|
5
|
-
|
|
6
|
-
const buttonVariants = cva(baseClass, {
|
|
7
|
-
variants: {
|
|
8
|
-
variant: {
|
|
9
|
-
default: "border-primary text-primary-foreground bg-primary",
|
|
10
|
-
outline: "text-primary border-primary",
|
|
11
|
-
ghost: "text-primary bg-transparent border-transparent",
|
|
12
|
-
},
|
|
13
|
-
rounded: {
|
|
14
|
-
none: "rounded-none",
|
|
15
|
-
xs: "rounded-xs",
|
|
16
|
-
sm: "rounded-sm",
|
|
17
|
-
md: "rounded-md",
|
|
18
|
-
lg: "rounded-lg",
|
|
19
|
-
xl: "rounded-xl",
|
|
20
|
-
full: "rounded-full",
|
|
21
|
-
},
|
|
22
|
-
size: {
|
|
23
|
-
xs: "px-3 py-2 text-xs [&_svg]:size-3.5",
|
|
24
|
-
sm: "px-3 py-2 text-sm [&_svg]:size-4",
|
|
25
|
-
md: "px-5 py-2.5 text-sm [&_svg]:size-4",
|
|
26
|
-
lg: "px-5 py-3 text-base [&_svg]:size-[18px]",
|
|
27
|
-
xl: "px-6 py-3.5 text-base [&_svg]:size-[18px]",
|
|
28
|
-
},
|
|
29
|
-
disabled: {
|
|
30
|
-
false: null,
|
|
31
|
-
true: ["opacity-50", "cursor-not-allowed"],
|
|
32
|
-
},
|
|
33
|
-
},
|
|
34
|
-
compoundVariants: [
|
|
35
|
-
{
|
|
36
|
-
variant: "default",
|
|
37
|
-
disabled: false,
|
|
38
|
-
class: "hover:bg-primary-accent hover:border-primary-accent",
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
variant: "outline",
|
|
42
|
-
disabled: false,
|
|
43
|
-
class:
|
|
44
|
-
"hover:text-primary-foreground hover:bg-primary-accent hover:border-primary-accent",
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
variant: "ghost",
|
|
48
|
-
disabled: false,
|
|
49
|
-
class:
|
|
50
|
-
"hover:bg-primary hover:text-primary-foreground hover:border-primary",
|
|
51
|
-
},
|
|
52
|
-
],
|
|
53
|
-
defaultVariants: {
|
|
54
|
-
variant: "default",
|
|
55
|
-
size: "sm",
|
|
56
|
-
rounded: "lg",
|
|
57
|
-
disabled: false,
|
|
58
|
-
},
|
|
59
|
-
});
|
|
60
|
-
|
|
61
|
-
export default buttonVariants;
|
|
1
|
+
import { cva } from "class-variance-authority";
|
|
2
|
+
|
|
3
|
+
const baseClass =
|
|
4
|
+
"flex justify-center gap-1.5 items-center font-medium cursor-pointer outline-none border [&_svg]:pointer-events-none [&_svg]:shrink-0";
|
|
5
|
+
|
|
6
|
+
const buttonVariants = cva(baseClass, {
|
|
7
|
+
variants: {
|
|
8
|
+
variant: {
|
|
9
|
+
default: "border-primary text-primary-foreground bg-primary",
|
|
10
|
+
outline: "text-primary border-primary",
|
|
11
|
+
ghost: "text-primary bg-transparent border-transparent",
|
|
12
|
+
},
|
|
13
|
+
rounded: {
|
|
14
|
+
none: "rounded-none",
|
|
15
|
+
xs: "rounded-xs",
|
|
16
|
+
sm: "rounded-sm",
|
|
17
|
+
md: "rounded-md",
|
|
18
|
+
lg: "rounded-lg",
|
|
19
|
+
xl: "rounded-xl",
|
|
20
|
+
full: "rounded-full",
|
|
21
|
+
},
|
|
22
|
+
size: {
|
|
23
|
+
xs: "px-3 py-2 text-xs [&_svg]:size-3.5",
|
|
24
|
+
sm: "px-3 py-2 text-sm [&_svg]:size-4",
|
|
25
|
+
md: "px-5 py-2.5 text-sm [&_svg]:size-4",
|
|
26
|
+
lg: "px-5 py-3 text-base [&_svg]:size-[18px]",
|
|
27
|
+
xl: "px-6 py-3.5 text-base [&_svg]:size-[18px]",
|
|
28
|
+
},
|
|
29
|
+
disabled: {
|
|
30
|
+
false: null,
|
|
31
|
+
true: ["opacity-50", "cursor-not-allowed"],
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
compoundVariants: [
|
|
35
|
+
{
|
|
36
|
+
variant: "default",
|
|
37
|
+
disabled: false,
|
|
38
|
+
class: "hover:bg-primary-accent hover:border-primary-accent",
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
variant: "outline",
|
|
42
|
+
disabled: false,
|
|
43
|
+
class:
|
|
44
|
+
"hover:text-primary-foreground hover:bg-primary-accent hover:border-primary-accent",
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
variant: "ghost",
|
|
48
|
+
disabled: false,
|
|
49
|
+
class:
|
|
50
|
+
"hover:bg-primary hover:text-primary-foreground hover:border-primary",
|
|
51
|
+
},
|
|
52
|
+
],
|
|
53
|
+
defaultVariants: {
|
|
54
|
+
variant: "default",
|
|
55
|
+
size: "sm",
|
|
56
|
+
rounded: "lg",
|
|
57
|
+
disabled: false,
|
|
58
|
+
},
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
export default buttonVariants;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import Button from "./Button.astro";
|
|
2
|
-
import buttonVariants from "./buttonVariants";
|
|
3
|
-
|
|
4
|
-
export { Button, buttonVariants };
|
|
1
|
+
import Button from "./Button.astro";
|
|
2
|
+
import buttonVariants from "./buttonVariants";
|
|
3
|
+
|
|
4
|
+
export { Button, buttonVariants };
|