@codefast/ui 0.3.11-canary.1 → 0.3.11-canary.2

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 (148) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/dist/components/accordion.d.ts +29 -10
  3. package/dist/components/accordion.js +38 -37
  4. package/dist/components/alert-dialog.d.ts +60 -24
  5. package/dist/components/alert-dialog.js +69 -72
  6. package/dist/components/alert.d.ts +27 -15
  7. package/dist/components/alert.js +29 -31
  8. package/dist/components/aspect-ratio.d.ts +8 -4
  9. package/dist/components/aspect-ratio.js +7 -5
  10. package/dist/components/avatar.d.ts +17 -6
  11. package/dist/components/avatar.js +19 -17
  12. package/dist/components/badge.d.ts +21 -14
  13. package/dist/components/badge.js +19 -22
  14. package/dist/components/breadcrumb.d.ts +35 -12
  15. package/dist/components/breadcrumb.js +48 -54
  16. package/dist/components/button-group.d.ts +29 -14
  17. package/dist/components/button-group.js +27 -32
  18. package/dist/components/button.d.ts +35 -25
  19. package/dist/components/button.js +50 -48
  20. package/dist/components/calendar.d.ts +24 -9
  21. package/dist/components/calendar.js +92 -98
  22. package/dist/components/card.d.ts +34 -10
  23. package/dist/components/card.js +39 -37
  24. package/dist/components/carousel.d.ts +55 -24
  25. package/dist/components/carousel.js +113 -130
  26. package/dist/components/chart.d.ts +72 -36
  27. package/dist/components/chart.js +154 -166
  28. package/dist/components/checkbox-cards.d.ts +15 -8
  29. package/dist/components/checkbox-cards.js +22 -25
  30. package/dist/components/checkbox-group.d.ts +16 -8
  31. package/dist/components/checkbox-group.js +19 -19
  32. package/dist/components/checkbox.d.ts +9 -4
  33. package/dist/components/checkbox.js +14 -14
  34. package/dist/components/collapsible.d.ts +14 -6
  35. package/dist/components/collapsible.js +18 -16
  36. package/dist/components/command.d.ts +55 -23
  37. package/dist/components/command.js +70 -85
  38. package/dist/components/context-menu.d.ts +72 -22
  39. package/dist/components/context-menu.js +88 -109
  40. package/dist/components/dialog.d.ts +53 -22
  41. package/dist/components/dialog.js +71 -85
  42. package/dist/components/drawer.d.ts +60 -28
  43. package/dist/components/drawer.js +59 -67
  44. package/dist/components/dropdown-menu.d.ts +73 -22
  45. package/dist/components/dropdown-menu.js +95 -112
  46. package/dist/components/empty.d.ts +37 -15
  47. package/dist/components/empty.js +43 -45
  48. package/dist/components/field.d.ts +63 -25
  49. package/dist/components/field.js +88 -104
  50. package/dist/components/form.d.ts +37 -15
  51. package/dist/components/form.js +65 -70
  52. package/dist/components/hover-card.d.ts +21 -7
  53. package/dist/components/hover-card.js +24 -24
  54. package/dist/components/input-group.d.ts +53 -28
  55. package/dist/components/input-group.js +63 -77
  56. package/dist/components/input-number.d.ts +28 -7
  57. package/dist/components/input-number.js +55 -59
  58. package/dist/components/input-otp.d.ts +24 -10
  59. package/dist/components/input-otp.js +33 -37
  60. package/dist/components/input-password.d.ts +12 -5
  61. package/dist/components/input-password.js +31 -32
  62. package/dist/components/input-search.d.ts +18 -8
  63. package/dist/components/input-search.js +43 -41
  64. package/dist/components/input.d.ts +10 -4
  65. package/dist/components/input.js +9 -7
  66. package/dist/components/item.d.ts +69 -32
  67. package/dist/components/item.js +89 -92
  68. package/dist/components/kbd.d.ts +13 -5
  69. package/dist/components/kbd.js +13 -11
  70. package/dist/components/label.d.ts +9 -4
  71. package/dist/components/label.js +9 -7
  72. package/dist/components/menubar.d.ts +80 -23
  73. package/dist/components/menubar.js +97 -118
  74. package/dist/components/native-select.d.ts +16 -6
  75. package/dist/components/native-select.js +25 -26
  76. package/dist/components/navigation-menu.d.ts +36 -12
  77. package/dist/components/navigation-menu.js +60 -75
  78. package/dist/components/pagination.d.ts +35 -14
  79. package/dist/components/pagination.js +54 -69
  80. package/dist/components/popover.d.ts +24 -8
  81. package/dist/components/popover.js +28 -28
  82. package/dist/components/progress-circle.d.ts +106 -88
  83. package/dist/components/progress-circle.js +106 -138
  84. package/dist/components/progress.d.ts +10 -4
  85. package/dist/components/progress.js +14 -14
  86. package/dist/components/radio-cards.d.ts +10 -4
  87. package/dist/components/radio-cards.js +22 -23
  88. package/dist/components/radio-group.d.ts +13 -5
  89. package/dist/components/radio-group.js +18 -16
  90. package/dist/components/radio.d.ts +12 -5
  91. package/dist/components/radio.js +10 -8
  92. package/dist/components/resizable.d.ts +18 -7
  93. package/dist/components/resizable.js +22 -22
  94. package/dist/components/scroll-area.d.ts +33 -20
  95. package/dist/components/scroll-area.js +84 -88
  96. package/dist/components/select.d.ts +50 -16
  97. package/dist/components/select.js +77 -96
  98. package/dist/components/separator.d.ts +29 -19
  99. package/dist/components/separator.js +36 -34
  100. package/dist/components/sheet.d.ts +62 -29
  101. package/dist/components/sheet.js +79 -100
  102. package/dist/components/sidebar.d.ts +160 -66
  103. package/dist/components/sidebar.js +294 -336
  104. package/dist/components/skeleton.d.ts +9 -4
  105. package/dist/components/skeleton.js +8 -6
  106. package/dist/components/slider.d.ts +13 -4
  107. package/dist/components/slider.js +34 -40
  108. package/dist/components/sonner.d.ts +10 -7
  109. package/dist/components/sonner.js +16 -14
  110. package/dist/components/spinner.d.ts +12 -5
  111. package/dist/components/spinner.js +33 -35
  112. package/dist/components/switch.d.ts +9 -4
  113. package/dist/components/switch.js +13 -11
  114. package/dist/components/table.d.ts +37 -11
  115. package/dist/components/table.js +47 -45
  116. package/dist/components/tabs.d.ts +21 -7
  117. package/dist/components/tabs.js +24 -22
  118. package/dist/components/textarea.d.ts +9 -4
  119. package/dist/components/textarea.js +8 -6
  120. package/dist/components/toggle-group.d.ts +24 -9
  121. package/dist/components/toggle-group.js +41 -42
  122. package/dist/components/toggle.d.ts +25 -17
  123. package/dist/components/toggle.js +30 -28
  124. package/dist/components/tooltip.d.ts +24 -8
  125. package/dist/components/tooltip.js +29 -32
  126. package/dist/hooks/use-animated-value.d.ts +4 -1
  127. package/dist/hooks/use-animated-value.js +57 -36
  128. package/dist/hooks/use-copy-to-clipboard.d.ts +11 -5
  129. package/dist/hooks/use-copy-to-clipboard.js +39 -20
  130. package/dist/hooks/use-is-mobile.d.ts +4 -1
  131. package/dist/hooks/use-is-mobile.js +21 -1
  132. package/dist/hooks/use-media-query.d.ts +4 -1
  133. package/dist/hooks/use-media-query.js +45 -18
  134. package/dist/hooks/use-mutation-observer.d.ts +6 -2
  135. package/dist/hooks/use-mutation-observer.js +34 -16
  136. package/dist/hooks/use-pagination.d.ts +22 -14
  137. package/dist/hooks/use-pagination.js +100 -49
  138. package/dist/index.d.ts +69 -130
  139. package/dist/index.js +11 -11
  140. package/dist/primitives/checkbox-group.d.ts +105 -83
  141. package/dist/primitives/checkbox-group.js +111 -84
  142. package/dist/primitives/input-number.d.ts +51 -40
  143. package/dist/primitives/input-number.js +483 -350
  144. package/dist/primitives/input.d.ts +48 -42
  145. package/dist/primitives/input.js +65 -43
  146. package/dist/primitives/progress-circle.d.ts +79 -48
  147. package/dist/primitives/progress-circle.js +154 -105
  148. package/package.json +6 -7
package/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # @codefast/ui
2
2
 
3
+ ## 0.3.11-canary.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [`92d1ed7`](https://github.com/codefastlabs/codefast/commit/92d1ed7650b19f91824cfb38ec238857a3d95876) Thanks [@thevuong](https://github.com/thevuong)! - build: replace rslib with tsdown in library packages
8
+
9
+ - Updated dependencies [[`92d1ed7`](https://github.com/codefastlabs/codefast/commit/92d1ed7650b19f91824cfb38ec238857a3d95876)]:
10
+ - @codefast/tailwind-variants@0.3.11-canary.2
11
+
3
12
  ## 0.3.11-canary.1
4
13
 
5
14
  ### Patch Changes
@@ -1,18 +1,37 @@
1
- import type { ComponentProps, JSX } from "react";
2
1
  import * as AccordionPrimitive from "@radix-ui/react-accordion";
3
2
  import { Slot } from "@radix-ui/react-slot";
3
+ import { ComponentProps, JSX } from "react";
4
+
5
+ //#region src/components/accordion.d.ts
4
6
  type AccordionProps = ComponentProps<typeof AccordionPrimitive.Root>;
5
- declare function Accordion({ ...props }: AccordionProps): JSX.Element;
7
+ declare function Accordion({
8
+ ...props
9
+ }: AccordionProps): JSX.Element;
6
10
  type AccordionItemProps = ComponentProps<typeof AccordionPrimitive.Item>;
7
- declare function AccordionItem({ className, ...props }: AccordionItemProps): JSX.Element;
11
+ declare function AccordionItem({
12
+ className,
13
+ ...props
14
+ }: AccordionItemProps): JSX.Element;
8
15
  interface AccordionIconProps extends ComponentProps<typeof Slot> {
9
- asChild?: boolean;
10
- className?: string;
16
+ asChild?: boolean;
17
+ className?: string;
11
18
  }
12
- declare function AccordionIcon({ asChild, className, ...props }: AccordionIconProps): JSX.Element;
19
+ declare function AccordionIcon({
20
+ asChild,
21
+ className,
22
+ ...props
23
+ }: AccordionIconProps): JSX.Element;
13
24
  type AccordionTriggerProps = ComponentProps<typeof AccordionPrimitive.Trigger>;
14
- declare function AccordionTrigger({ children, className, ...props }: AccordionTriggerProps): JSX.Element;
25
+ declare function AccordionTrigger({
26
+ children,
27
+ className,
28
+ ...props
29
+ }: AccordionTriggerProps): JSX.Element;
15
30
  type AccordionContentProps = ComponentProps<typeof AccordionPrimitive.Content>;
16
- declare function AccordionContent({ children, className, ...props }: AccordionContentProps): JSX.Element;
17
- export { Accordion, AccordionContent, AccordionIcon, AccordionItem, AccordionTrigger };
18
- export type { AccordionContentProps, AccordionIconProps, AccordionItemProps, AccordionProps, AccordionTriggerProps, };
31
+ declare function AccordionContent({
32
+ children,
33
+ className,
34
+ ...props
35
+ }: AccordionContentProps): JSX.Element;
36
+ //#endregion
37
+ export { Accordion, AccordionContent, type AccordionContentProps, AccordionIcon, type AccordionIconProps, AccordionItem, type AccordionItemProps, type AccordionProps, AccordionTrigger, type AccordionTriggerProps };
@@ -1,52 +1,53 @@
1
1
  "use client";
2
- import { jsx } from "react/jsx-runtime";
3
2
  import { cn } from "@codefast/tailwind-variants";
4
- import { Content, Header, Item, Root, Trigger } from "@radix-ui/react-accordion";
3
+ import * as AccordionPrimitive from "@radix-ui/react-accordion";
5
4
  import { Slot } from "@radix-ui/react-slot";
6
5
  import { ChevronDownIcon } from "lucide-react";
6
+ import { jsx } from "react/jsx-runtime";
7
+ //#region src/components/accordion.tsx
7
8
  function Accordion({ ...props }) {
8
- return /*#__PURE__*/ jsx(Root, {
9
- "data-slot": "accordion",
10
- ...props
11
- });
9
+ return /* @__PURE__ */ jsx(AccordionPrimitive.Root, {
10
+ "data-slot": "accordion",
11
+ ...props
12
+ });
12
13
  }
13
14
  function AccordionItem({ className, ...props }) {
14
- return /*#__PURE__*/ jsx(Item, {
15
- className: cn("border-b last:border-b-0", className),
16
- "data-slot": "accordion-item",
17
- ...props
18
- });
15
+ return /* @__PURE__ */ jsx(AccordionPrimitive.Item, {
16
+ className: cn("border-b last:border-b-0", className),
17
+ "data-slot": "accordion-item",
18
+ ...props
19
+ });
19
20
  }
20
21
  function AccordionIcon({ asChild, className, ...props }) {
21
- const Component = asChild ? Slot : ChevronDownIcon;
22
- return /*#__PURE__*/ jsx(Component, {
23
- "aria-hidden": true,
24
- className: cn("size-4 shrink-0 translate-y-0.5 text-muted-foreground transition-transform duration-200", className),
25
- "data-slot": "accordion-icon",
26
- ...props
27
- });
22
+ return /* @__PURE__ */ jsx(asChild ? Slot : ChevronDownIcon, {
23
+ "aria-hidden": true,
24
+ className: cn("size-4 shrink-0 translate-y-0.5 text-muted-foreground transition-transform duration-200", className),
25
+ "data-slot": "accordion-icon",
26
+ ...props
27
+ });
28
28
  }
29
29
  function AccordionTrigger({ children, className, ...props }) {
30
- return /*#__PURE__*/ jsx(Header, {
31
- className: "flex",
32
- "data-slot": "accordion-trigger-wrapper",
33
- children: /*#__PURE__*/ jsx(Trigger, {
34
- className: cn("group/accordion-trigger flex grow items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium outline-hidden hover:not-disabled:underline focus-visible:ring-3 focus-visible:ring-ring/50 disabled:opacity-50 [&[data-state=open]>svg]:rotate-180", className),
35
- "data-slot": "accordion-trigger",
36
- ...props,
37
- children: children
38
- })
39
- });
30
+ return /* @__PURE__ */ jsx(AccordionPrimitive.Header, {
31
+ className: "flex",
32
+ "data-slot": "accordion-trigger-wrapper",
33
+ children: /* @__PURE__ */ jsx(AccordionPrimitive.Trigger, {
34
+ className: cn("group/accordion-trigger flex grow items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium outline-hidden hover:not-disabled:underline focus-visible:ring-3 focus-visible:ring-ring/50 disabled:opacity-50 [&[data-state=open]>svg]:rotate-180", className),
35
+ "data-slot": "accordion-trigger",
36
+ ...props,
37
+ children
38
+ })
39
+ });
40
40
  }
41
41
  function AccordionContent({ children, className, ...props }) {
42
- return /*#__PURE__*/ jsx(Content, {
43
- className: "overflow-hidden data-[state=closed]:animate-collapsible-up data-[state=open]:animate-collapsible-down",
44
- "data-slot": "accordion-content",
45
- ...props,
46
- children: /*#__PURE__*/ jsx("div", {
47
- className: cn("pt-0 pb-4 text-sm", className),
48
- children: children
49
- })
50
- });
42
+ return /* @__PURE__ */ jsx(AccordionPrimitive.Content, {
43
+ className: "overflow-hidden data-[state=closed]:animate-collapsible-up data-[state=open]:animate-collapsible-down",
44
+ "data-slot": "accordion-content",
45
+ ...props,
46
+ children: /* @__PURE__ */ jsx("div", {
47
+ className: cn("pt-0 pb-4 text-sm", className),
48
+ children
49
+ })
50
+ });
51
51
  }
52
+ //#endregion
52
53
  export { Accordion, AccordionContent, AccordionIcon, AccordionItem, AccordionTrigger };
@@ -1,38 +1,74 @@
1
- import type { VariantProps } from "@codefast/tailwind-variants";
2
- import type { ComponentProps, JSX } from "react";
1
+ import { buttonVariants } from "./button.js";
2
+ import { VariantProps } from "@codefast/tailwind-variants";
3
3
  import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
4
- import { buttonVariants } from "./button";
4
+ import { ComponentProps, JSX } from "react";
5
+
6
+ //#region src/components/alert-dialog.d.ts
5
7
  type AlertDialogProps = ComponentProps<typeof AlertDialogPrimitive.Root>;
6
- declare function AlertDialog({ ...props }: AlertDialogProps): JSX.Element;
8
+ declare function AlertDialog({
9
+ ...props
10
+ }: AlertDialogProps): JSX.Element;
7
11
  type AlertDialogTriggerProps = ComponentProps<typeof AlertDialogPrimitive.Trigger>;
8
- declare function AlertDialogTrigger({ ...props }: AlertDialogTriggerProps): JSX.Element;
12
+ declare function AlertDialogTrigger({
13
+ ...props
14
+ }: AlertDialogTriggerProps): JSX.Element;
9
15
  interface AlertDialogContentProps extends ComponentProps<typeof AlertDialogPrimitive.Content> {
10
- classNames?: {
11
- content?: string;
12
- overlay?: string;
13
- wrapper?: string;
14
- };
16
+ classNames?: {
17
+ content?: string;
18
+ overlay?: string;
19
+ wrapper?: string;
20
+ };
15
21
  }
16
- declare function AlertDialogContent({ children, className, classNames, ...props }: AlertDialogContentProps): JSX.Element;
22
+ declare function AlertDialogContent({
23
+ children,
24
+ className,
25
+ classNames,
26
+ ...props
27
+ }: AlertDialogContentProps): JSX.Element;
17
28
  type AlertDialogHeaderProps = ComponentProps<"div">;
18
- declare function AlertDialogHeader({ className, ...props }: AlertDialogHeaderProps): JSX.Element;
29
+ declare function AlertDialogHeader({
30
+ className,
31
+ ...props
32
+ }: AlertDialogHeaderProps): JSX.Element;
19
33
  type AlertDialogBodyProps = ComponentProps<"div">;
20
- declare function AlertDialogBody({ className, ...props }: AlertDialogBodyProps): JSX.Element;
34
+ declare function AlertDialogBody({
35
+ className,
36
+ ...props
37
+ }: AlertDialogBodyProps): JSX.Element;
21
38
  type AlertDialogFooterProps = ComponentProps<"div">;
22
- declare function AlertDialogFooter({ className, ...props }: AlertDialogFooterProps): JSX.Element;
39
+ declare function AlertDialogFooter({
40
+ className,
41
+ ...props
42
+ }: AlertDialogFooterProps): JSX.Element;
23
43
  type AlertDialogTitleProps = ComponentProps<typeof AlertDialogPrimitive.Title>;
24
- declare function AlertDialogTitle({ className, ...props }: AlertDialogTitleProps): JSX.Element;
44
+ declare function AlertDialogTitle({
45
+ className,
46
+ ...props
47
+ }: AlertDialogTitleProps): JSX.Element;
25
48
  type AlertDialogDescriptionProps = ComponentProps<typeof AlertDialogPrimitive.Description>;
26
- declare function AlertDialogDescription({ className, ...props }: AlertDialogDescriptionProps): JSX.Element;
49
+ declare function AlertDialogDescription({
50
+ className,
51
+ ...props
52
+ }: AlertDialogDescriptionProps): JSX.Element;
27
53
  interface AlertDialogActionProps extends ComponentProps<typeof AlertDialogPrimitive.Action> {
28
- size?: VariantProps<typeof buttonVariants>["size"];
29
- variant?: VariantProps<typeof buttonVariants>["variant"];
54
+ size?: VariantProps<typeof buttonVariants>["size"];
55
+ variant?: VariantProps<typeof buttonVariants>["variant"];
30
56
  }
31
- declare function AlertDialogAction({ className, size, variant, ...props }: AlertDialogActionProps): JSX.Element;
57
+ declare function AlertDialogAction({
58
+ className,
59
+ size,
60
+ variant,
61
+ ...props
62
+ }: AlertDialogActionProps): JSX.Element;
32
63
  interface AlertDialogCancelProps extends ComponentProps<typeof AlertDialogPrimitive.Cancel> {
33
- size?: VariantProps<typeof buttonVariants>["size"];
34
- variant?: VariantProps<typeof buttonVariants>["variant"];
64
+ size?: VariantProps<typeof buttonVariants>["size"];
65
+ variant?: VariantProps<typeof buttonVariants>["variant"];
35
66
  }
36
- declare function AlertDialogCancel({ className, size, variant, ...props }: AlertDialogCancelProps): JSX.Element;
37
- export { AlertDialog, AlertDialogAction, AlertDialogBody, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger, };
38
- export type { AlertDialogActionProps, AlertDialogBodyProps, AlertDialogCancelProps, AlertDialogContentProps, AlertDialogDescriptionProps, AlertDialogFooterProps, AlertDialogHeaderProps, AlertDialogProps, AlertDialogTitleProps, AlertDialogTriggerProps, };
67
+ declare function AlertDialogCancel({
68
+ className,
69
+ size,
70
+ variant,
71
+ ...props
72
+ }: AlertDialogCancelProps): JSX.Element;
73
+ //#endregion
74
+ export { AlertDialog, AlertDialogAction, type AlertDialogActionProps, AlertDialogBody, type AlertDialogBodyProps, AlertDialogCancel, type AlertDialogCancelProps, AlertDialogContent, type AlertDialogContentProps, AlertDialogDescription, type AlertDialogDescriptionProps, AlertDialogFooter, type AlertDialogFooterProps, AlertDialogHeader, type AlertDialogHeaderProps, type AlertDialogProps, AlertDialogTitle, type AlertDialogTitleProps, AlertDialogTrigger, type AlertDialogTriggerProps };
@@ -1,95 +1,92 @@
1
1
  "use client";
2
- import { jsx, jsxs } from "react/jsx-runtime";
3
- import { cn } from "@codefast/tailwind-variants";
4
- import { Action, Cancel, Content, Description, Overlay, Portal, Root, Title, Trigger } from "@radix-ui/react-alert-dialog";
5
2
  import { buttonVariants } from "./button.js";
3
+ import { cn } from "@codefast/tailwind-variants";
4
+ import { jsx, jsxs } from "react/jsx-runtime";
5
+ import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
6
+ //#region src/components/alert-dialog.tsx
6
7
  function AlertDialog({ ...props }) {
7
- return /*#__PURE__*/ jsx(Root, {
8
- "data-slot": "alert-dialog",
9
- ...props
10
- });
8
+ return /* @__PURE__ */ jsx(AlertDialogPrimitive.Root, {
9
+ "data-slot": "alert-dialog",
10
+ ...props
11
+ });
11
12
  }
12
13
  function AlertDialogTrigger({ ...props }) {
13
- return /*#__PURE__*/ jsx(Trigger, {
14
- "data-slot": "alert-dialog-trigger",
15
- ...props
16
- });
14
+ return /* @__PURE__ */ jsx(AlertDialogPrimitive.Trigger, {
15
+ "data-slot": "alert-dialog-trigger",
16
+ ...props
17
+ });
17
18
  }
18
19
  function AlertDialogContent({ children, className, classNames, ...props }) {
19
- return /*#__PURE__*/ jsxs(Portal, {
20
- children: [
21
- /*#__PURE__*/ jsx(Overlay, {
22
- className: cn("fixed inset-0 z-50 bg-black/50 ease-ui data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0", classNames?.overlay),
23
- "data-slot": "alert-dialog-overlay"
24
- }),
25
- /*#__PURE__*/ jsx(Content, {
26
- className: cn("fixed inset-0 z-50 grid grid-rows-[1fr_auto_1fr] justify-items-center overflow-auto p-8 ease-ui data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 sm:grid-rows-[1fr_auto_3fr] sm:p-4", classNames?.wrapper),
27
- "data-slot": "alert-dialog-content-wrapper",
28
- ...props,
29
- children: /*#__PURE__*/ jsx("div", {
30
- className: cn("relative row-start-2 flex w-full max-w-lg flex-col rounded-2xl border bg-popover text-popover-foreground shadow-lg", classNames?.content, className),
31
- "data-slot": "alert-dialog-content",
32
- children: children
33
- })
34
- })
35
- ]
36
- });
20
+ return /* @__PURE__ */ jsxs(AlertDialogPrimitive.Portal, { children: [/* @__PURE__ */ jsx(AlertDialogPrimitive.Overlay, {
21
+ className: cn("fixed inset-0 z-50 bg-black/50 ease-ui data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0", classNames?.overlay),
22
+ "data-slot": "alert-dialog-overlay"
23
+ }), /* @__PURE__ */ jsx(AlertDialogPrimitive.Content, {
24
+ className: cn("fixed inset-0 z-50 grid grid-rows-[1fr_auto_1fr] justify-items-center overflow-auto p-8 ease-ui data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 sm:grid-rows-[1fr_auto_3fr] sm:p-4", classNames?.wrapper),
25
+ "data-slot": "alert-dialog-content-wrapper",
26
+ ...props,
27
+ children: /* @__PURE__ */ jsx("div", {
28
+ className: cn("relative row-start-2 flex w-full max-w-lg flex-col rounded-2xl border bg-popover text-popover-foreground shadow-lg", classNames?.content, className),
29
+ "data-slot": "alert-dialog-content",
30
+ children
31
+ })
32
+ })] });
37
33
  }
38
34
  function AlertDialogHeader({ className, ...props }) {
39
- return /*#__PURE__*/ jsx("div", {
40
- className: cn("flex shrink-0 flex-col gap-1.5 px-6 pt-6 pb-4 text-center sm:text-left", className),
41
- "data-slot": "alert-dialog-header",
42
- ...props
43
- });
35
+ return /* @__PURE__ */ jsx("div", {
36
+ className: cn("flex shrink-0 flex-col gap-1.5 px-6 pt-6 pb-4 text-center sm:text-left", className),
37
+ "data-slot": "alert-dialog-header",
38
+ ...props
39
+ });
44
40
  }
45
41
  function AlertDialogBody({ className, ...props }) {
46
- return /*#__PURE__*/ jsx("main", {
47
- className: cn("overflow-auto px-6 py-2", className),
48
- "data-slot": "alert-dialog-body",
49
- ...props
50
- });
42
+ return /* @__PURE__ */ jsx("main", {
43
+ className: cn("overflow-auto px-6 py-2", className),
44
+ "data-slot": "alert-dialog-body",
45
+ ...props
46
+ });
51
47
  }
52
48
  function AlertDialogFooter({ className, ...props }) {
53
- return /*#__PURE__*/ jsx("div", {
54
- className: cn("flex shrink-0 flex-col-reverse gap-2 px-6 pt-4 pb-6 sm:flex-row sm:justify-end", className),
55
- "data-slot": "alert-dialog-footer",
56
- ...props
57
- });
49
+ return /* @__PURE__ */ jsx("div", {
50
+ className: cn("flex shrink-0 flex-col-reverse gap-2 px-6 pt-4 pb-6 sm:flex-row sm:justify-end", className),
51
+ "data-slot": "alert-dialog-footer",
52
+ ...props
53
+ });
58
54
  }
59
55
  function AlertDialogTitle({ className, ...props }) {
60
- return /*#__PURE__*/ jsx(Title, {
61
- className: cn("text-lg leading-none font-semibold tracking-tight", className),
62
- "data-slot": "alert-dialog-title",
63
- ...props
64
- });
56
+ return /* @__PURE__ */ jsx(AlertDialogPrimitive.Title, {
57
+ className: cn("text-lg leading-none font-semibold tracking-tight", className),
58
+ "data-slot": "alert-dialog-title",
59
+ ...props
60
+ });
65
61
  }
66
62
  function AlertDialogDescription({ className, ...props }) {
67
- return /*#__PURE__*/ jsx(Description, {
68
- className: cn("text-sm text-muted-foreground", className),
69
- "data-slot": "alert-dialog-description",
70
- ...props
71
- });
63
+ return /* @__PURE__ */ jsx(AlertDialogPrimitive.Description, {
64
+ className: cn("text-sm text-muted-foreground", className),
65
+ "data-slot": "alert-dialog-description",
66
+ ...props
67
+ });
72
68
  }
73
69
  function AlertDialogAction({ className, size, variant, ...props }) {
74
- return /*#__PURE__*/ jsx(Action, {
75
- className: buttonVariants({
76
- className,
77
- size,
78
- variant
79
- }),
80
- "data-slot": "alert-dialog-action",
81
- ...props
82
- });
70
+ return /* @__PURE__ */ jsx(AlertDialogPrimitive.Action, {
71
+ className: buttonVariants({
72
+ className,
73
+ size,
74
+ variant
75
+ }),
76
+ "data-slot": "alert-dialog-action",
77
+ ...props
78
+ });
83
79
  }
84
80
  function AlertDialogCancel({ className, size, variant = "outline", ...props }) {
85
- return /*#__PURE__*/ jsx(Cancel, {
86
- className: buttonVariants({
87
- className,
88
- size,
89
- variant
90
- }),
91
- "data-slot": "alert-dialog-cancel",
92
- ...props
93
- });
81
+ return /* @__PURE__ */ jsx(AlertDialogPrimitive.Cancel, {
82
+ className: buttonVariants({
83
+ className,
84
+ size,
85
+ variant
86
+ }),
87
+ "data-slot": "alert-dialog-cancel",
88
+ ...props
89
+ });
94
90
  }
91
+ //#endregion
95
92
  export { AlertDialog, AlertDialogAction, AlertDialogBody, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger };
@@ -1,18 +1,30 @@
1
- import type { VariantProps } from "@codefast/tailwind-variants";
2
- import type { ComponentProps, JSX } from "react";
3
- declare const alertVariants: import("@codefast/tailwind-variants").VariantFunctionType<{
4
- variant: {
5
- default: string;
6
- destructive: string;
7
- };
1
+ import * as _$_codefast_tailwind_variants0 from "@codefast/tailwind-variants";
2
+ import { VariantProps } from "@codefast/tailwind-variants";
3
+ import { ComponentProps, JSX } from "react";
4
+
5
+ //#region src/components/alert.d.ts
6
+ declare const alertVariants: _$_codefast_tailwind_variants0.VariantFunctionType<{
7
+ variant: {
8
+ default: string;
9
+ destructive: string;
10
+ };
8
11
  }, Record<string, never>>;
9
- interface AlertProps extends ComponentProps<"div">, VariantProps<typeof alertVariants> {
10
- }
11
- declare function Alert({ className, variant, ...props }: AlertProps): JSX.Element;
12
+ interface AlertProps extends ComponentProps<"div">, VariantProps<typeof alertVariants> {}
13
+ declare function Alert({
14
+ className,
15
+ variant,
16
+ ...props
17
+ }: AlertProps): JSX.Element;
12
18
  type AlertTitleProps = ComponentProps<"div">;
13
- declare function AlertTitle({ children, className, ...props }: AlertTitleProps): JSX.Element;
19
+ declare function AlertTitle({
20
+ children,
21
+ className,
22
+ ...props
23
+ }: AlertTitleProps): JSX.Element;
14
24
  type AlertDescriptionProps = ComponentProps<"div">;
15
- declare function AlertDescription({ className, ...props }: AlertDescriptionProps): JSX.Element;
16
- export { alertVariants };
17
- export { Alert, AlertDescription, AlertTitle };
18
- export type { AlertDescriptionProps, AlertProps, AlertTitleProps };
25
+ declare function AlertDescription({
26
+ className,
27
+ ...props
28
+ }: AlertDescriptionProps): JSX.Element;
29
+ //#endregion
30
+ export { Alert, AlertDescription, type AlertDescriptionProps, type AlertProps, AlertTitle, type AlertTitleProps, alertVariants };
@@ -1,41 +1,39 @@
1
- import { jsx } from "react/jsx-runtime";
2
1
  import { cn, tv } from "@codefast/tailwind-variants";
2
+ import { jsx } from "react/jsx-runtime";
3
+ //#region src/components/alert.tsx
3
4
  const alertVariants = tv({
4
- base: "relative grid w-full grid-cols-[0_1fr] items-start gap-y-0.5 rounded-xl border bg-card px-4 py-3 text-sm has-[>svg]:grid-cols-[--spacing(4)_1fr] has-[>svg]:gap-x-3 [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",
5
- defaultVariants: {
6
- variant: "default"
7
- },
8
- variants: {
9
- variant: {
10
- default: "text-card-foreground",
11
- destructive: "text-destructive *:data-[slot=alert-description]:text-destructive/90 [&>svg]:text-current"
12
- }
13
- }
5
+ base: "relative grid w-full grid-cols-[0_1fr] items-start gap-y-0.5 rounded-xl border bg-card px-4 py-3 text-sm has-[>svg]:grid-cols-[--spacing(4)_1fr] has-[>svg]:gap-x-3 [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",
6
+ defaultVariants: { variant: "default" },
7
+ variants: { variant: {
8
+ default: "text-card-foreground",
9
+ destructive: "text-destructive *:data-[slot=alert-description]:text-destructive/90 [&>svg]:text-current"
10
+ } }
14
11
  });
15
12
  function Alert({ className, variant, ...props }) {
16
- return /*#__PURE__*/ jsx("div", {
17
- className: alertVariants({
18
- className,
19
- variant
20
- }),
21
- "data-slot": "alert",
22
- role: "alert",
23
- ...props
24
- });
13
+ return /* @__PURE__ */ jsx("div", {
14
+ className: alertVariants({
15
+ className,
16
+ variant
17
+ }),
18
+ "data-slot": "alert",
19
+ role: "alert",
20
+ ...props
21
+ });
25
22
  }
26
23
  function AlertTitle({ children, className, ...props }) {
27
- return /*#__PURE__*/ jsx("div", {
28
- className: cn("col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight", className),
29
- "data-slot": "alert-title",
30
- ...props,
31
- children: children
32
- });
24
+ return /* @__PURE__ */ jsx("div", {
25
+ className: cn("col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight", className),
26
+ "data-slot": "alert-title",
27
+ ...props,
28
+ children
29
+ });
33
30
  }
34
31
  function AlertDescription({ className, ...props }) {
35
- return /*#__PURE__*/ jsx("div", {
36
- className: cn("col-start-2 grid justify-items-start gap-1 text-sm text-muted-foreground [&_p]:leading-relaxed", className),
37
- "data-slot": "alert-description",
38
- ...props
39
- });
32
+ return /* @__PURE__ */ jsx("div", {
33
+ className: cn("col-start-2 grid justify-items-start gap-1 text-sm text-muted-foreground [&_p]:leading-relaxed", className),
34
+ "data-slot": "alert-description",
35
+ ...props
36
+ });
40
37
  }
38
+ //#endregion
41
39
  export { Alert, AlertDescription, AlertTitle, alertVariants };
@@ -1,6 +1,10 @@
1
- import type { ComponentProps, JSX } from "react";
2
1
  import * as AspectRatioPrimitive from "@radix-ui/react-aspect-ratio";
2
+ import { ComponentProps, JSX } from "react";
3
+
4
+ //#region src/components/aspect-ratio.d.ts
3
5
  type AspectRatioProps = ComponentProps<typeof AspectRatioPrimitive.Root>;
4
- declare function AspectRatio({ ...props }: AspectRatioProps): JSX.Element;
5
- export { AspectRatio };
6
- export type { AspectRatioProps };
6
+ declare function AspectRatio({
7
+ ...props
8
+ }: AspectRatioProps): JSX.Element;
9
+ //#endregion
10
+ export { AspectRatio, type AspectRatioProps };
@@ -1,10 +1,12 @@
1
1
  "use client";
2
2
  import { jsx } from "react/jsx-runtime";
3
- import { Root } from "@radix-ui/react-aspect-ratio";
3
+ import * as AspectRatioPrimitive from "@radix-ui/react-aspect-ratio";
4
+ //#region src/components/aspect-ratio.tsx
4
5
  function AspectRatio({ ...props }) {
5
- return /*#__PURE__*/ jsx(Root, {
6
- "data-slot": "aspect-ratio",
7
- ...props
8
- });
6
+ return /* @__PURE__ */ jsx(AspectRatioPrimitive.Root, {
7
+ "data-slot": "aspect-ratio",
8
+ ...props
9
+ });
9
10
  }
11
+ //#endregion
10
12
  export { AspectRatio };
@@ -1,10 +1,21 @@
1
- import type { ComponentProps, JSX } from "react";
2
1
  import * as AvatarPrimitive from "@radix-ui/react-avatar";
2
+ import { ComponentProps, JSX } from "react";
3
+
4
+ //#region src/components/avatar.d.ts
3
5
  type AvatarProps = ComponentProps<typeof AvatarPrimitive.Root>;
4
- declare function Avatar({ className, ...props }: AvatarProps): JSX.Element;
6
+ declare function Avatar({
7
+ className,
8
+ ...props
9
+ }: AvatarProps): JSX.Element;
5
10
  type AvatarImageProps = ComponentProps<typeof AvatarPrimitive.Image>;
6
- declare function AvatarImage({ className, ...props }: AvatarImageProps): JSX.Element;
11
+ declare function AvatarImage({
12
+ className,
13
+ ...props
14
+ }: AvatarImageProps): JSX.Element;
7
15
  type AvatarFallbackProps = ComponentProps<typeof AvatarPrimitive.Fallback>;
8
- declare function AvatarFallback({ className, ...props }: AvatarFallbackProps): JSX.Element;
9
- export { Avatar, AvatarFallback, AvatarImage };
10
- export type { AvatarFallbackProps, AvatarImageProps, AvatarProps };
16
+ declare function AvatarFallback({
17
+ className,
18
+ ...props
19
+ }: AvatarFallbackProps): JSX.Element;
20
+ //#endregion
21
+ export { Avatar, AvatarFallback, type AvatarFallbackProps, AvatarImage, type AvatarImageProps, type AvatarProps };