@orbitkit/components 0.2.0 → 0.3.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.
Files changed (62) hide show
  1. package/dist/astro/accordion/Accordion.astro +34 -34
  2. package/dist/astro/accordion/AccordionItem.astro +19 -19
  3. package/dist/astro/accordion/AccordionTrigger.astro +33 -33
  4. package/dist/astro/accordion/AcordionContent.astro +23 -23
  5. package/dist/astro/accordion/accordion.ts +151 -151
  6. package/dist/astro/accordion/index.ts +6 -6
  7. package/dist/astro/collapsible/Collapsible.astro +34 -34
  8. package/dist/astro/collapsible/CollapsibleContent.astro +20 -20
  9. package/dist/astro/collapsible/collapsible.ts +81 -81
  10. package/dist/astro/collapsible/index.ts +4 -4
  11. package/dist/astro/drawer/DrawerContent.astro +74 -74
  12. package/dist/astro/drawer/drawer.ts +104 -104
  13. package/dist/astro/drawer/index.ts +17 -17
  14. package/dist/astro/dropdown/DropdownMenu.astro +19 -19
  15. package/dist/astro/dropdown/DropdownMenuContent.astro +42 -42
  16. package/dist/astro/dropdown/DropdownMenuGroup.astro +3 -3
  17. package/dist/astro/dropdown/DropdownMenuItem.astro +27 -27
  18. package/dist/astro/dropdown/DropdownMenuLabel.astro +3 -3
  19. package/dist/astro/dropdown/DropdownMenuSeparator.astro +6 -6
  20. package/dist/astro/dropdown/dropdown.ts +157 -157
  21. package/dist/astro/dropdown/dropdownVariants.ts +134 -134
  22. package/dist/astro/dropdown/index.ts +23 -23
  23. package/dist/astro/marquee/Marquee.astro +53 -0
  24. package/dist/astro/marquee/index.ts +3 -0
  25. package/dist/astro/modal/Modal.astro +19 -19
  26. package/dist/astro/modal/ModalContent.astro +71 -71
  27. package/dist/astro/modal/ModalDescription.astro +12 -12
  28. package/dist/astro/modal/ModalFooter.astro +15 -15
  29. package/dist/astro/modal/ModalHeader.astro +12 -12
  30. package/dist/astro/modal/ModalTitle.astro +18 -18
  31. package/dist/astro/modal/index.ts +15 -15
  32. package/dist/astro/modal/modal.ts +101 -101
  33. package/dist/astro/pagination/index.ts +15 -15
  34. package/dist/astro/popover/Popover.astro +17 -17
  35. package/dist/astro/popover/PopoverContent.astro +39 -39
  36. package/dist/astro/popover/index.ts +5 -5
  37. package/dist/astro/popover/popover.ts +113 -113
  38. package/dist/astro/popover/popoverVariants.ts +115 -115
  39. package/dist/astro/scroll-progress/ScrollProgress.astro +41 -0
  40. package/dist/astro/scroll-progress/ScrollProgressBar.astro +19 -0
  41. package/dist/astro/scroll-progress/index.ts +4 -0
  42. package/dist/astro/stat/Stat.astro +12 -12
  43. package/dist/astro/stat/StatDescription.astro +12 -12
  44. package/dist/astro/stat/StatTitle.astro +18 -18
  45. package/dist/astro/stat/StatValue.astro +12 -12
  46. package/dist/astro/stat/index.ts +6 -6
  47. package/dist/astro/tab/TabList.astro +19 -19
  48. package/dist/astro/toast/Toast.astro +36 -0
  49. package/dist/astro/toast/ToastDescription.astro +10 -0
  50. package/dist/astro/toast/ToastTitle.astro +18 -0
  51. package/dist/astro/toast/Toaster.astro +78 -0
  52. package/dist/astro/toast/assets.ts +6 -0
  53. package/dist/astro/toast/index.ts +30 -0
  54. package/dist/astro/toast/toast.ts +277 -0
  55. package/dist/astro/tooltip/Tooltip.astro +40 -40
  56. package/dist/astro/tooltip/TooltipContent.astro +39 -39
  57. package/dist/astro/tooltip/index.ts +5 -5
  58. package/dist/astro/tooltip/tooltip.ts +137 -137
  59. package/dist/astro/tooltip/tooltipVariants.ts +115 -115
  60. package/dist/index.js +12 -0
  61. package/dist/index.js.map +1 -1
  62. package/package.json +54 -54
@@ -1,134 +1,134 @@
1
- import { cva } from "class-variance-authority";
2
-
3
- const baseClass = [
4
- "hidden absolute z-50 bg-surface border border-border p-1 rounded-md",
5
- "transform duration-100 transition-all ease-in data-[state=closed]:opacity-0 data-[state=closed]:scale-95 data[state=open]:opacity-100 data[state=open]:scale-100",
6
- ];
7
-
8
- const dropdownMenuVariants = cva(baseClass, {
9
- variants: {
10
- side: {
11
- top: "bottom-full mb-(--tooltip-offset)",
12
- bottom: "top-full mt-(--tooltip-offset)",
13
- left: "right-full mr-(--tooltip-offset)",
14
- right: "left-full ml-(--tooltip-offset)",
15
- },
16
- alignment: {
17
- start: "",
18
- center: "",
19
- end: "",
20
- },
21
- },
22
- compoundVariants: [
23
- {
24
- side: ["top", "bottom"],
25
- alignment: "start",
26
- class: "left-0",
27
- },
28
- {
29
- side: ["top", "bottom"],
30
- alignment: "end",
31
- class: "left-full -translate-x-full",
32
- },
33
- {
34
- side: ["top", "bottom"],
35
- alignment: "center",
36
- class: "left-1/2 -translate-x-1/2",
37
- },
38
- {
39
- side: ["left", "right"],
40
- alignment: "start",
41
- class: "top-0 -translate-y-0",
42
- },
43
- {
44
- side: ["left", "right"],
45
- alignment: "center",
46
- class: "top-1/2 -translate-y-1/2",
47
- },
48
- {
49
- side: ["left", "right"],
50
- alignment: "end",
51
- class: "top-full -translate-y-full",
52
- },
53
- ],
54
- defaultVariants: {
55
- side: "bottom",
56
- alignment: "center",
57
- },
58
- });
59
-
60
- const dropdownMenuItemBaseClass =
61
- "flex justify-between items-center gap-2 px-2 py-1.5 text-sm cursor-default rounded-md outline-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg]:size-4";
62
-
63
- const dropdownMenuItemVariants = cva(dropdownMenuItemBaseClass, {
64
- variants: {
65
- disabled: {
66
- false: "hover:bg-foreground/5 focus:bg-foreground/5 ",
67
- true: "opacity-70 pointer-events-none",
68
- },
69
- },
70
- defaultVariants: {
71
- disabled: false,
72
- },
73
- });
74
-
75
- const arrowClass =
76
- "absolute w-0 h-0 transition-all transform ease-in size-2 bg-surface transform rotate-45 border-border";
77
-
78
- const dropdownArrowVariants = cva(arrowClass, {
79
- variants: {
80
- side: {
81
- top: "top-full -mt-1 border-b border-r",
82
- bottom: "bottom-full -mb-1 border-t border-l",
83
- left: "left-full -ml-1 border-t border-r",
84
- right: "right-full -mr-1 border-b border-l",
85
- },
86
- alignment: {
87
- start: "",
88
- center: "",
89
- end: "",
90
- },
91
- },
92
- compoundVariants: [
93
- {
94
- side: ["top", "bottom"],
95
- alignment: "start",
96
- class: "left-0 ml-3 ",
97
- },
98
- {
99
- side: ["top", "bottom"],
100
- alignment: "end",
101
- class: "right-0 mr-3",
102
- },
103
- {
104
- side: ["top", "bottom"],
105
- alignment: "center",
106
- class: "left-1/2 -translate-x-1/2",
107
- },
108
- {
109
- side: ["left", "right"],
110
- alignment: "start",
111
- class: "top-0 mt-3",
112
- },
113
- {
114
- side: ["left", "right"],
115
- alignment: "center",
116
- class: "top-1/2 -translate-y-1/2",
117
- },
118
- {
119
- side: ["left", "right"],
120
- alignment: "end",
121
- class: "bottom-0 mb-3",
122
- },
123
- ],
124
- defaultVariants: {
125
- side: "bottom",
126
- alignment: "center",
127
- },
128
- });
129
-
130
- export {
131
- dropdownArrowVariants,
132
- dropdownMenuItemVariants,
133
- dropdownMenuVariants,
134
- };
1
+ import { cva } from "class-variance-authority";
2
+
3
+ const baseClass = [
4
+ "hidden absolute z-50 bg-surface border border-border p-1 rounded-md",
5
+ "transform duration-100 transition-all ease-in data-[state=closed]:opacity-0 data-[state=closed]:scale-95 data[state=open]:opacity-100 data[state=open]:scale-100",
6
+ ];
7
+
8
+ const dropdownMenuVariants = cva(baseClass, {
9
+ variants: {
10
+ side: {
11
+ top: "bottom-full mb-(--tooltip-offset)",
12
+ bottom: "top-full mt-(--tooltip-offset)",
13
+ left: "right-full mr-(--tooltip-offset)",
14
+ right: "left-full ml-(--tooltip-offset)",
15
+ },
16
+ alignment: {
17
+ start: "",
18
+ center: "",
19
+ end: "",
20
+ },
21
+ },
22
+ compoundVariants: [
23
+ {
24
+ side: ["top", "bottom"],
25
+ alignment: "start",
26
+ class: "left-0",
27
+ },
28
+ {
29
+ side: ["top", "bottom"],
30
+ alignment: "end",
31
+ class: "left-full -translate-x-full",
32
+ },
33
+ {
34
+ side: ["top", "bottom"],
35
+ alignment: "center",
36
+ class: "left-1/2 -translate-x-1/2",
37
+ },
38
+ {
39
+ side: ["left", "right"],
40
+ alignment: "start",
41
+ class: "top-0 -translate-y-0",
42
+ },
43
+ {
44
+ side: ["left", "right"],
45
+ alignment: "center",
46
+ class: "top-1/2 -translate-y-1/2",
47
+ },
48
+ {
49
+ side: ["left", "right"],
50
+ alignment: "end",
51
+ class: "top-full -translate-y-full",
52
+ },
53
+ ],
54
+ defaultVariants: {
55
+ side: "bottom",
56
+ alignment: "center",
57
+ },
58
+ });
59
+
60
+ const dropdownMenuItemBaseClass =
61
+ "flex justify-between items-center gap-2 px-2 py-1.5 text-sm cursor-default rounded-md outline-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg]:size-4";
62
+
63
+ const dropdownMenuItemVariants = cva(dropdownMenuItemBaseClass, {
64
+ variants: {
65
+ disabled: {
66
+ false: "hover:bg-foreground/5 focus:bg-foreground/5 ",
67
+ true: "opacity-70 pointer-events-none",
68
+ },
69
+ },
70
+ defaultVariants: {
71
+ disabled: false,
72
+ },
73
+ });
74
+
75
+ const arrowClass =
76
+ "absolute w-0 h-0 transition-all transform ease-in size-2 bg-surface transform rotate-45 border-border";
77
+
78
+ const dropdownArrowVariants = cva(arrowClass, {
79
+ variants: {
80
+ side: {
81
+ top: "top-full -mt-1 border-b border-r",
82
+ bottom: "bottom-full -mb-1 border-t border-l",
83
+ left: "left-full -ml-1 border-t border-r",
84
+ right: "right-full -mr-1 border-b border-l",
85
+ },
86
+ alignment: {
87
+ start: "",
88
+ center: "",
89
+ end: "",
90
+ },
91
+ },
92
+ compoundVariants: [
93
+ {
94
+ side: ["top", "bottom"],
95
+ alignment: "start",
96
+ class: "left-0 ml-3 ",
97
+ },
98
+ {
99
+ side: ["top", "bottom"],
100
+ alignment: "end",
101
+ class: "right-0 mr-3",
102
+ },
103
+ {
104
+ side: ["top", "bottom"],
105
+ alignment: "center",
106
+ class: "left-1/2 -translate-x-1/2",
107
+ },
108
+ {
109
+ side: ["left", "right"],
110
+ alignment: "start",
111
+ class: "top-0 mt-3",
112
+ },
113
+ {
114
+ side: ["left", "right"],
115
+ alignment: "center",
116
+ class: "top-1/2 -translate-y-1/2",
117
+ },
118
+ {
119
+ side: ["left", "right"],
120
+ alignment: "end",
121
+ class: "bottom-0 mb-3",
122
+ },
123
+ ],
124
+ defaultVariants: {
125
+ side: "bottom",
126
+ alignment: "center",
127
+ },
128
+ });
129
+
130
+ export {
131
+ dropdownArrowVariants,
132
+ dropdownMenuItemVariants,
133
+ dropdownMenuVariants,
134
+ };
@@ -1,23 +1,23 @@
1
- import DropdownMenu from "./DropdownMenu.astro";
2
- import DropdownMenuContent from "./DropdownMenuContent.astro";
3
- import DropdownMenuGroup from "./DropdownMenuGroup.astro";
4
- import DropdownMenuItem from "./DropdownMenuItem.astro";
5
- import DropdownMenuLabel from "./DropdownMenuLabel.astro";
6
- import DropdownMenuSeparator from "./DropdownMenuSeparator.astro";
7
- import {
8
- dropdownArrowVariants,
9
- dropdownMenuItemVariants,
10
- dropdownMenuVariants,
11
- } from "./dropdownVariants";
12
-
13
- export {
14
- dropdownArrowVariants,
15
- DropdownMenu,
16
- DropdownMenuContent,
17
- DropdownMenuGroup,
18
- DropdownMenuItem,
19
- dropdownMenuItemVariants,
20
- DropdownMenuLabel,
21
- DropdownMenuSeparator,
22
- dropdownMenuVariants,
23
- };
1
+ import DropdownMenu from "./DropdownMenu.astro";
2
+ import DropdownMenuContent from "./DropdownMenuContent.astro";
3
+ import DropdownMenuGroup from "./DropdownMenuGroup.astro";
4
+ import DropdownMenuItem from "./DropdownMenuItem.astro";
5
+ import DropdownMenuLabel from "./DropdownMenuLabel.astro";
6
+ import DropdownMenuSeparator from "./DropdownMenuSeparator.astro";
7
+ import {
8
+ dropdownArrowVariants,
9
+ dropdownMenuItemVariants,
10
+ dropdownMenuVariants,
11
+ } from "./dropdownVariants";
12
+
13
+ export {
14
+ dropdownArrowVariants,
15
+ DropdownMenu,
16
+ DropdownMenuContent,
17
+ DropdownMenuGroup,
18
+ DropdownMenuItem,
19
+ dropdownMenuItemVariants,
20
+ DropdownMenuLabel,
21
+ DropdownMenuSeparator,
22
+ dropdownMenuVariants,
23
+ };
@@ -0,0 +1,53 @@
1
+ ---
2
+ import { cn } from "@/utils/cn";
3
+
4
+ interface Props {
5
+ duration?: number;
6
+ gap?: number;
7
+ repeat?: number;
8
+ pauseOnHover?: boolean;
9
+ vertical?: boolean;
10
+ reverse?: boolean;
11
+ }
12
+
13
+ const {
14
+ duration = 10,
15
+ gap = 1,
16
+ repeat = 4,
17
+ pauseOnHover = true,
18
+ vertical = false,
19
+ reverse = false,
20
+ } = Astro.props;
21
+ ---
22
+
23
+ <div
24
+ class={cn(
25
+ "group flex overflow-hidden max-w-max p-2 gap-(--gap)",
26
+ vertical ? "flex-col" : "flex-row",
27
+ )}
28
+ style={{
29
+ "--gap": `${gap}rem`,
30
+ "--duration": `${duration}s`,
31
+ }}
32
+ >
33
+ {
34
+ Array(repeat)
35
+ .fill(0)
36
+ .map(() => (
37
+ <div
38
+ class={cn(
39
+ "gap-(--gap) flex shrink-0 justify-around",
40
+ {
41
+ "group-hover:[animation-play-state:paused]": pauseOnHover,
42
+ "[animation-direction:reverse]": reverse,
43
+ },
44
+ vertical
45
+ ? "animate-marquee-vertical flex-col"
46
+ : "animate-marquee-horizontal flex-row",
47
+ )}
48
+ >
49
+ <slot />
50
+ </div>
51
+ ))
52
+ }
53
+ </div>
@@ -0,0 +1,3 @@
1
+ import Marquee from "./Marquee.astro";
2
+
3
+ export { Marquee };
@@ -1,19 +1,19 @@
1
- <div data-modal-wrapper>
2
- <slot />
3
- </div>
4
-
5
- <script>
6
- import { Modal } from "./modal";
7
-
8
- function init() {
9
- const modals = document.querySelectorAll<HTMLElement>(
10
- "[data-modal-wrapper]",
11
- );
12
- modals.forEach((modal) => {
13
- new Modal(modal);
14
- });
15
- }
16
-
17
- init();
18
- document.addEventListener("astro:page-load", () => init());
19
- </script>
1
+ <div data-modal-wrapper>
2
+ <slot />
3
+ </div>
4
+
5
+ <script>
6
+ import { Modal } from "./modal";
7
+
8
+ function init() {
9
+ const modals = document.querySelectorAll<HTMLElement>(
10
+ "[data-modal-wrapper]",
11
+ );
12
+ modals.forEach((modal) => {
13
+ new Modal(modal);
14
+ });
15
+ }
16
+
17
+ init();
18
+ document.addEventListener("astro:page-load", () => init());
19
+ </script>
@@ -1,71 +1,71 @@
1
- ---
2
- import { cn } from "@/utils/cn";
3
- import type { HTMLAttributes } from "astro/types";
4
-
5
- interface Props extends HTMLAttributes<"div"> {
6
- showCloseButton?: boolean;
7
- backdrop?: boolean;
8
- allowOutsideClick?: boolean;
9
- }
10
-
11
- const {
12
- class: className,
13
- showCloseButton = true,
14
- backdrop = true,
15
- allowOutsideClick = true,
16
- ...attrs
17
- } = Astro.props;
18
- ---
19
-
20
- {
21
- backdrop && (
22
- <div
23
- class="bg-background fixed inset-0 left-0 top-0 z-50 hidden h-dvh w-full transition-opacity duration-100 data-[state=closed]:opacity-0 data-[state=open]:opacity-80"
24
- aria-hidden="true"
25
- data-state="closed"
26
- data-backdrop
27
- />
28
- )
29
- }
30
-
31
- <div
32
- data-modal
33
- role="dialog"
34
- aria-hidden="true"
35
- data-state="closed"
36
- data-show-close-button={showCloseButton}
37
- data-allow-outside-click={allowOutsideClick}
38
- class={cn(
39
- "hidden fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 z-50 bg-surface text-foreground border-border border rounded-lg shadow-sm p-6 w-full max-w-[calc(100%-2rem)] sm:max-w-md transform transition-all ease-in data-[state=closed]:opacity-0 data-[state=closed]:scale-95 data-[state=open]:opacity-100 data-[state=open]:scale-100",
40
- className,
41
- )}
42
- {...attrs}
43
- >
44
- {
45
- showCloseButton && (
46
- <button
47
- class="text-foreground hover:bg-muted absolute right-3 top-3 cursor-pointer rounded-lg p-1 transition-colors duration-150"
48
- aria-label="close modal"
49
- data-close-modal
50
- >
51
- <svg
52
- xmlns="http://www.w3.org/2000/svg"
53
- viewBox="0 0 24 24"
54
- fill="none"
55
- stroke="currentColor"
56
- stroke-width="2"
57
- stroke-linecap="round"
58
- stroke-linejoin="round"
59
- class="size-4"
60
- >
61
- <>
62
- <path stroke="none" d="M0 0h24v24H0z" fill="none" />
63
- <path d="M18 6l-12 12" />
64
- <path d="M6 6l12 12" />
65
- </>
66
- </svg>
67
- </button>
68
- )
69
- }
70
- <slot />
71
- </div>
1
+ ---
2
+ import { cn } from "@/utils/cn";
3
+ import type { HTMLAttributes } from "astro/types";
4
+
5
+ interface Props extends HTMLAttributes<"div"> {
6
+ showCloseButton?: boolean;
7
+ backdrop?: boolean;
8
+ allowOutsideClick?: boolean;
9
+ }
10
+
11
+ const {
12
+ class: className,
13
+ showCloseButton = true,
14
+ backdrop = true,
15
+ allowOutsideClick = true,
16
+ ...attrs
17
+ } = Astro.props;
18
+ ---
19
+
20
+ {
21
+ backdrop && (
22
+ <div
23
+ class="bg-background fixed inset-0 left-0 top-0 z-50 hidden h-dvh w-full transition-opacity duration-100 data-[state=closed]:opacity-0 data-[state=open]:opacity-80"
24
+ aria-hidden="true"
25
+ data-state="closed"
26
+ data-backdrop
27
+ />
28
+ )
29
+ }
30
+
31
+ <div
32
+ data-modal
33
+ role="dialog"
34
+ aria-hidden="true"
35
+ data-state="closed"
36
+ data-show-close-button={showCloseButton}
37
+ data-allow-outside-click={allowOutsideClick}
38
+ class={cn(
39
+ "hidden fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 z-50 bg-surface text-foreground border-border border rounded-lg shadow-sm p-6 w-full max-w-[calc(100%-2rem)] sm:max-w-md transform transition-all ease-in data-[state=closed]:opacity-0 data-[state=closed]:scale-95 data-[state=open]:opacity-100 data-[state=open]:scale-100",
40
+ className,
41
+ )}
42
+ {...attrs}
43
+ >
44
+ {
45
+ showCloseButton && (
46
+ <button
47
+ class="text-foreground hover:bg-muted absolute right-3 top-3 cursor-pointer rounded-lg p-1 transition-colors duration-150"
48
+ aria-label="close modal"
49
+ data-close-modal
50
+ >
51
+ <svg
52
+ xmlns="http://www.w3.org/2000/svg"
53
+ viewBox="0 0 24 24"
54
+ fill="none"
55
+ stroke="currentColor"
56
+ stroke-width="2"
57
+ stroke-linecap="round"
58
+ stroke-linejoin="round"
59
+ class="size-4"
60
+ >
61
+ <>
62
+ <path stroke="none" d="M0 0h24v24H0z" fill="none" />
63
+ <path d="M18 6l-12 12" />
64
+ <path d="M6 6l12 12" />
65
+ </>
66
+ </svg>
67
+ </button>
68
+ )
69
+ }
70
+ <slot />
71
+ </div>
@@ -1,12 +1,12 @@
1
- ---
2
- import { cn } from "@/utils/cn";
3
- import { type HTMLAttributes } from "astro/types";
4
-
5
- interface Props extends HTMLAttributes<"p"> {}
6
-
7
- const { class: className, ...attrs } = Astro.props;
8
- ---
9
-
10
- <p {...attrs} class={cn("font-normal text-muted-foreground", className)}>
11
- <slot />
12
- </p>
1
+ ---
2
+ import { cn } from "@/utils/cn";
3
+ import { type HTMLAttributes } from "astro/types";
4
+
5
+ interface Props extends HTMLAttributes<"p"> {}
6
+
7
+ const { class: className, ...attrs } = Astro.props;
8
+ ---
9
+
10
+ <p {...attrs} class={cn("font-normal text-muted-foreground", className)}>
11
+ <slot />
12
+ </p>
@@ -1,15 +1,15 @@
1
- ---
2
- import { cn } from "@/utils/cn";
3
- import { type HTMLAttributes } from "astro/types";
4
-
5
- interface Props extends HTMLAttributes<"div"> {}
6
-
7
- const { class: className, ...attrs } = Astro.props;
8
- ---
9
-
10
- <div
11
- {...attrs}
12
- class={cn("pt-4 flex items-center justify-end gap-2", className)}
13
- >
14
- <slot />
15
- </div>
1
+ ---
2
+ import { cn } from "@/utils/cn";
3
+ import { type HTMLAttributes } from "astro/types";
4
+
5
+ interface Props extends HTMLAttributes<"div"> {}
6
+
7
+ const { class: className, ...attrs } = Astro.props;
8
+ ---
9
+
10
+ <div
11
+ {...attrs}
12
+ class={cn("pt-4 flex items-center justify-end gap-2", className)}
13
+ >
14
+ <slot />
15
+ </div>
@@ -1,12 +1,12 @@
1
- ---
2
- import { cn } from "@/utils/cn";
3
- import { type HTMLAttributes } from "astro/types";
4
-
5
- interface Props extends HTMLAttributes<"div"> {}
6
-
7
- const { class: className, ...attrs } = Astro.props;
8
- ---
9
-
10
- <div {...attrs} class={cn("flex flex-col gap-1 pb-4", className)}>
11
- <slot />
12
- </div>
1
+ ---
2
+ import { cn } from "@/utils/cn";
3
+ import { type HTMLAttributes } from "astro/types";
4
+
5
+ interface Props extends HTMLAttributes<"div"> {}
6
+
7
+ const { class: className, ...attrs } = Astro.props;
8
+ ---
9
+
10
+ <div {...attrs} class={cn("flex flex-col gap-1 pb-4", className)}>
11
+ <slot />
12
+ </div>
@@ -1,18 +1,18 @@
1
- ---
2
- import { cn } from "@/utils/cn";
3
- import { type HTMLAttributes } from "astro/types";
4
-
5
- interface Props extends HTMLAttributes<"h2"> {}
6
-
7
- const { class: className, ...attrs } = Astro.props;
8
- ---
9
-
10
- <h2
11
- {...attrs}
12
- class={cn(
13
- "flex items-center justify-start gap-2 text-2xl font-semibold tracking-tight",
14
- className,
15
- )}
16
- >
17
- <slot />
18
- </h2>
1
+ ---
2
+ import { cn } from "@/utils/cn";
3
+ import { type HTMLAttributes } from "astro/types";
4
+
5
+ interface Props extends HTMLAttributes<"h2"> {}
6
+
7
+ const { class: className, ...attrs } = Astro.props;
8
+ ---
9
+
10
+ <h2
11
+ {...attrs}
12
+ class={cn(
13
+ "flex items-center justify-start gap-2 text-2xl font-semibold tracking-tight",
14
+ className,
15
+ )}
16
+ >
17
+ <slot />
18
+ </h2>