@codefast/ui 0.3.15 → 0.3.16-canary.1

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 (147) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/components/accordion.d.mts +30 -0
  3. package/dist/components/accordion.mjs +15 -0
  4. package/dist/components/alert-dialog.d.mts +60 -0
  5. package/dist/components/alert-dialog.mjs +30 -0
  6. package/dist/components/alert.d.mts +21 -0
  7. package/dist/components/alert.mjs +12 -0
  8. package/dist/components/aspect-ratio.d.mts +6 -0
  9. package/dist/components/aspect-ratio.mjs +3 -0
  10. package/dist/components/avatar.d.mts +18 -0
  11. package/dist/components/avatar.mjs +9 -0
  12. package/dist/components/badge.d.mts +9 -0
  13. package/dist/components/badge.mjs +6 -0
  14. package/dist/components/breadcrumb.d.mts +42 -0
  15. package/dist/components/breadcrumb.mjs +21 -0
  16. package/dist/components/button-group.d.mts +21 -0
  17. package/dist/components/button-group.mjs +12 -0
  18. package/dist/components/button.d.mts +9 -0
  19. package/dist/components/button.mjs +6 -0
  20. package/dist/components/calendar.d.mts +12 -0
  21. package/dist/components/calendar.mjs +7 -1
  22. package/dist/components/card.d.mts +42 -0
  23. package/dist/components/card.mjs +21 -0
  24. package/dist/components/carousel.d.mts +33 -0
  25. package/dist/components/carousel.mjs +15 -0
  26. package/dist/components/chart.d.mts +40 -1
  27. package/dist/components/chart.mjs +18 -0
  28. package/dist/components/checkbox-cards.d.mts +12 -0
  29. package/dist/components/checkbox-cards.mjs +6 -0
  30. package/dist/components/checkbox-group.d.mts +12 -0
  31. package/dist/components/checkbox-group.mjs +6 -0
  32. package/dist/components/checkbox.d.mts +6 -0
  33. package/dist/components/checkbox.mjs +3 -0
  34. package/dist/components/collapsible.d.mts +18 -0
  35. package/dist/components/collapsible.mjs +9 -0
  36. package/dist/components/command.d.mts +60 -0
  37. package/dist/components/command.mjs +30 -0
  38. package/dist/components/context-menu.d.mts +90 -0
  39. package/dist/components/context-menu.mjs +45 -0
  40. package/dist/components/dialog.d.mts +54 -0
  41. package/dist/components/dialog.mjs +27 -0
  42. package/dist/components/drawer.d.mts +54 -0
  43. package/dist/components/drawer.mjs +27 -0
  44. package/dist/components/dropdown-menu.d.mts +90 -0
  45. package/dist/components/dropdown-menu.mjs +45 -0
  46. package/dist/components/empty.d.mts +39 -0
  47. package/dist/components/empty.mjs +21 -0
  48. package/dist/components/field.d.mts +64 -1
  49. package/dist/components/field.mjs +33 -0
  50. package/dist/components/form.d.mts +42 -0
  51. package/dist/components/form.mjs +21 -0
  52. package/dist/components/hover-card.d.mts +24 -0
  53. package/dist/components/hover-card.mjs +12 -0
  54. package/dist/components/input-group.d.mts +45 -0
  55. package/dist/components/input-group.mjs +27 -0
  56. package/dist/components/input-number.d.mts +6 -0
  57. package/dist/components/input-number.mjs +3 -0
  58. package/dist/components/input-otp.d.mts +24 -0
  59. package/dist/components/input-otp.mjs +12 -0
  60. package/dist/components/input-password.d.mts +6 -0
  61. package/dist/components/input-password.mjs +3 -0
  62. package/dist/components/input-search.d.mts +6 -0
  63. package/dist/components/input-search.mjs +3 -0
  64. package/dist/components/input.d.mts +6 -0
  65. package/dist/components/input.mjs +3 -0
  66. package/dist/components/item.d.mts +66 -0
  67. package/dist/components/item.mjs +36 -0
  68. package/dist/components/kbd.d.mts +12 -0
  69. package/dist/components/kbd.mjs +6 -0
  70. package/dist/components/label.d.mts +6 -0
  71. package/dist/components/label.mjs +3 -0
  72. package/dist/components/menubar.d.mts +96 -0
  73. package/dist/components/menubar.mjs +48 -0
  74. package/dist/components/native-select.d.mts +18 -0
  75. package/dist/components/native-select.mjs +9 -0
  76. package/dist/components/navigation-menu.d.mts +39 -0
  77. package/dist/components/navigation-menu.mjs +21 -0
  78. package/dist/components/pagination.d.mts +42 -0
  79. package/dist/components/pagination.mjs +21 -0
  80. package/dist/components/popover.d.mts +30 -0
  81. package/dist/components/popover.mjs +15 -0
  82. package/dist/components/progress-circle.d.mts +9 -0
  83. package/dist/components/progress-circle.mjs +6 -0
  84. package/dist/components/progress.d.mts +6 -0
  85. package/dist/components/progress.mjs +3 -0
  86. package/dist/components/radio-cards.d.mts +12 -0
  87. package/dist/components/radio-cards.mjs +6 -0
  88. package/dist/components/radio-group.d.mts +12 -0
  89. package/dist/components/radio-group.mjs +6 -0
  90. package/dist/components/radio.d.mts +6 -0
  91. package/dist/components/radio.mjs +3 -0
  92. package/dist/components/resizable.d.mts +18 -0
  93. package/dist/components/resizable.mjs +9 -0
  94. package/dist/components/scroll-area.d.mts +15 -0
  95. package/dist/components/scroll-area.mjs +9 -0
  96. package/dist/components/select.d.mts +60 -0
  97. package/dist/components/select.mjs +30 -0
  98. package/dist/components/separator.d.mts +15 -0
  99. package/dist/components/separator.mjs +9 -0
  100. package/dist/components/sheet.d.mts +57 -0
  101. package/dist/components/sheet.mjs +30 -0
  102. package/dist/components/sidebar.d.mts +141 -0
  103. package/dist/components/sidebar.mjs +72 -0
  104. package/dist/components/skeleton.d.mts +6 -0
  105. package/dist/components/skeleton.mjs +3 -0
  106. package/dist/components/slider.d.mts +6 -0
  107. package/dist/components/slider.mjs +3 -0
  108. package/dist/components/sonner.d.mts +6 -0
  109. package/dist/components/sonner.mjs +3 -0
  110. package/dist/components/spinner.d.mts +6 -0
  111. package/dist/components/spinner.mjs +3 -0
  112. package/dist/components/switch.d.mts +6 -0
  113. package/dist/components/switch.mjs +3 -0
  114. package/dist/components/table.d.mts +48 -0
  115. package/dist/components/table.mjs +24 -0
  116. package/dist/components/tabs.d.mts +24 -0
  117. package/dist/components/tabs.mjs +12 -0
  118. package/dist/components/textarea.d.mts +6 -0
  119. package/dist/components/textarea.mjs +3 -0
  120. package/dist/components/toggle-group.d.mts +12 -0
  121. package/dist/components/toggle-group.mjs +6 -0
  122. package/dist/components/toggle.d.mts +12 -0
  123. package/dist/components/toggle.mjs +6 -0
  124. package/dist/components/tooltip.d.mts +30 -0
  125. package/dist/components/tooltip.mjs +15 -0
  126. package/dist/hooks/use-animated-value.d.mts +2 -0
  127. package/dist/hooks/use-animated-value.mjs +2 -0
  128. package/dist/hooks/use-copy-to-clipboard.d.mts +2 -0
  129. package/dist/hooks/use-copy-to-clipboard.mjs +2 -0
  130. package/dist/hooks/use-is-mobile.d.mts +2 -0
  131. package/dist/hooks/use-is-mobile.mjs +2 -0
  132. package/dist/hooks/use-media-query.d.mts +2 -0
  133. package/dist/hooks/use-media-query.mjs +2 -0
  134. package/dist/hooks/use-mutation-observer.d.mts +2 -0
  135. package/dist/hooks/use-mutation-observer.mjs +2 -0
  136. package/dist/hooks/use-pagination.d.mts +8 -1
  137. package/dist/hooks/use-pagination.mjs +4 -0
  138. package/dist/lib/utils.d.mts +1 -1
  139. package/dist/primitives/checkbox-group.d.mts +15 -3
  140. package/dist/primitives/checkbox-group.mjs +6 -0
  141. package/dist/primitives/input-number.d.mts +22 -0
  142. package/dist/primitives/input-number.mjs +12 -0
  143. package/dist/primitives/input.d.mts +10 -0
  144. package/dist/primitives/input.mjs +6 -0
  145. package/dist/primitives/progress-circle.d.mts +31 -1
  146. package/dist/primitives/progress-circle.mjs +12 -0
  147. package/package.json +17 -9
@@ -4,6 +4,9 @@ import { Slot } from "@radix-ui/react-slot";
4
4
  import { ChevronRightIcon, EllipsisIcon } from "lucide-react";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
6
6
  //#region src/components/breadcrumb.tsx
7
+ /**
8
+ * @since 0.3.16-canary.0
9
+ */
7
10
  function Breadcrumb({ ...props }) {
8
11
  return /* @__PURE__ */ jsx("nav", {
9
12
  "aria-label": "breadcrumb",
@@ -11,6 +14,9 @@ function Breadcrumb({ ...props }) {
11
14
  ...props
12
15
  });
13
16
  }
17
+ /**
18
+ * @since 0.3.16-canary.0
19
+ */
14
20
  function BreadcrumbList({ className, ...props }) {
15
21
  return /* @__PURE__ */ jsx("ol", {
16
22
  className: cn("flex flex-wrap items-center gap-1.5 text-sm break-words text-muted-foreground", "sm:gap-2", className),
@@ -18,6 +24,9 @@ function BreadcrumbList({ className, ...props }) {
18
24
  ...props
19
25
  });
20
26
  }
27
+ /**
28
+ * @since 0.3.16-canary.0
29
+ */
21
30
  function BreadcrumbItem({ className, ...props }) {
22
31
  return /* @__PURE__ */ jsx("li", {
23
32
  className: cn("inline-flex items-center gap-1.5", className),
@@ -25,6 +34,9 @@ function BreadcrumbItem({ className, ...props }) {
25
34
  ...props
26
35
  });
27
36
  }
37
+ /**
38
+ * @since 0.3.16-canary.0
39
+ */
28
40
  function BreadcrumbLink({ asChild, className, ...props }) {
29
41
  return /* @__PURE__ */ jsx(asChild ? Slot : "a", {
30
42
  className: cn("transition-colors", "hover:text-foreground", className),
@@ -32,6 +44,9 @@ function BreadcrumbLink({ asChild, className, ...props }) {
32
44
  ...props
33
45
  });
34
46
  }
47
+ /**
48
+ * @since 0.3.16-canary.0
49
+ */
35
50
  function BreadcrumbPage({ className, ...props }) {
36
51
  return /* @__PURE__ */ jsx("span", {
37
52
  "aria-current": "page",
@@ -41,6 +56,9 @@ function BreadcrumbPage({ className, ...props }) {
41
56
  ...props
42
57
  });
43
58
  }
59
+ /**
60
+ * @since 0.3.16-canary.0
61
+ */
44
62
  function BreadcrumbSeparator({ children, ...props }) {
45
63
  return /* @__PURE__ */ jsx("li", {
46
64
  "aria-hidden": "true",
@@ -50,6 +68,9 @@ function BreadcrumbSeparator({ children, ...props }) {
50
68
  children: children ?? /* @__PURE__ */ jsx(ChevronRightIcon, { className: "size-3.5" })
51
69
  });
52
70
  }
71
+ /**
72
+ * @since 0.3.16-canary.0
73
+ */
53
74
  function BreadcrumbEllipsis({ className, ...props }) {
54
75
  return /* @__PURE__ */ jsxs("span", {
55
76
  "aria-hidden": "true",
@@ -4,27 +4,48 @@ import * as _$_codefast_tailwind_variants0 from "@codefast/tailwind-variants";
4
4
  import { ComponentProps, JSX } from "react";
5
5
 
6
6
  //#region src/components/button-group.d.ts
7
+ /**
8
+ * @since 0.3.16-canary.0
9
+ */
7
10
  declare const buttonGroupVariants: _$_codefast_tailwind_variants0.VariantFunctionType<{
8
11
  orientation: {
9
12
  horizontal: string[];
10
13
  vertical: string[];
11
14
  };
12
15
  }, Record<string, never>>;
16
+ /**
17
+ * @since 0.3.16-canary.0
18
+ */
13
19
  type ButtonGroupProps = ComponentProps<"div"> & VariantProps<typeof buttonGroupVariants>;
20
+ /**
21
+ * @since 0.3.16-canary.0
22
+ */
14
23
  declare function ButtonGroup({
15
24
  className,
16
25
  orientation,
17
26
  ...props
18
27
  }: ButtonGroupProps): JSX.Element;
28
+ /**
29
+ * @since 0.3.16-canary.0
30
+ */
19
31
  interface ButtonGroupTextProps extends ComponentProps<"div"> {
20
32
  asChild?: boolean;
21
33
  }
34
+ /**
35
+ * @since 0.3.16-canary.0
36
+ */
22
37
  declare function ButtonGroupText({
23
38
  asChild,
24
39
  className,
25
40
  ...props
26
41
  }: ButtonGroupTextProps): JSX.Element;
42
+ /**
43
+ * @since 0.3.16-canary.0
44
+ */
27
45
  type ButtonGroupSeparatorProps = ComponentProps<typeof Separator>;
46
+ /**
47
+ * @since 0.3.16-canary.0
48
+ */
28
49
  declare function ButtonGroupSeparator({
29
50
  className,
30
51
  orientation,
@@ -4,6 +4,9 @@ import { Separator } from "./separator.mjs";
4
4
  import { Slot } from "@radix-ui/react-slot";
5
5
  import { jsx } from "react/jsx-runtime";
6
6
  //#region src/components/button-group.tsx
7
+ /**
8
+ * @since 0.3.16-canary.0
9
+ */
7
10
  const buttonGroupVariants = tv({
8
11
  base: [
9
12
  "flex w-fit items-stretch",
@@ -23,6 +26,9 @@ const buttonGroupVariants = tv({
23
26
  ]
24
27
  } }
25
28
  });
29
+ /**
30
+ * @since 0.3.16-canary.0
31
+ */
26
32
  function ButtonGroup({ className, orientation, ...props }) {
27
33
  return /* @__PURE__ */ jsx("div", {
28
34
  className: buttonGroupVariants({
@@ -35,12 +41,18 @@ function ButtonGroup({ className, orientation, ...props }) {
35
41
  ...props
36
42
  });
37
43
  }
44
+ /**
45
+ * @since 0.3.16-canary.0
46
+ */
38
47
  function ButtonGroupText({ asChild = false, className, ...props }) {
39
48
  return /* @__PURE__ */ jsx(asChild ? Slot : "div", {
40
49
  className: cn("flex items-center gap-2", "px-4", "rounded-lg border", "bg-muted shadow-xs", "text-sm font-medium", "[&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4", className),
41
50
  ...props
42
51
  });
43
52
  }
53
+ /**
54
+ * @since 0.3.16-canary.0
55
+ */
44
56
  function ButtonGroupSeparator({ className, orientation = "vertical", ...props }) {
45
57
  return /* @__PURE__ */ jsx(Separator, {
46
58
  className: cn("relative self-stretch", "bg-input", "data-vertical:h-auto", "!m-0", className),
@@ -3,6 +3,9 @@ import * as _$_codefast_tailwind_variants0 from "@codefast/tailwind-variants";
3
3
  import { ComponentProps, JSX } from "react";
4
4
 
5
5
  //#region src/components/button.d.ts
6
+ /**
7
+ * @since 0.3.16-canary.0
8
+ */
6
9
  declare const buttonVariants: _$_codefast_tailwind_variants0.VariantFunctionType<{
7
10
  size: {
8
11
  "icon-sm": string;
@@ -21,10 +24,16 @@ declare const buttonVariants: _$_codefast_tailwind_variants0.VariantFunctionType
21
24
  secondary: string[];
22
25
  };
23
26
  }, Record<string, never>>;
27
+ /**
28
+ * @since 0.3.16-canary.0
29
+ */
24
30
  type ButtonProps = ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
25
31
  asChild?: boolean;
26
32
  type?: ComponentProps<"button">["type"];
27
33
  };
34
+ /**
35
+ * @since 0.3.16-canary.0
36
+ */
28
37
  declare function Button({
29
38
  asChild,
30
39
  children,
@@ -2,6 +2,9 @@ import { tv } from "../lib/utils.mjs";
2
2
  import { Slot } from "@radix-ui/react-slot";
3
3
  import { jsx } from "react/jsx-runtime";
4
4
  //#region src/components/button.tsx
5
+ /**
6
+ * @since 0.3.16-canary.0
7
+ */
5
8
  const buttonVariants = tv({
6
9
  base: [
7
10
  "inline-flex shrink-0 items-center justify-center gap-2",
@@ -69,6 +72,9 @@ const buttonVariants = tv({
69
72
  }
70
73
  }
71
74
  });
75
+ /**
76
+ * @since 0.3.16-canary.0
77
+ */
72
78
  function Button({ asChild = false, children, className, size, type = "button", variant, ...props }) {
73
79
  const Comp = asChild ? Slot : "button";
74
80
  if (asChild) return /* @__PURE__ */ jsx(Comp, {
@@ -3,9 +3,15 @@ import { ComponentProps, JSX } from "react";
3
3
  import { DayButton, DayPicker } from "react-day-picker";
4
4
 
5
5
  //#region src/components/calendar.d.ts
6
+ /**
7
+ * @since 0.3.16-canary.0
8
+ */
6
9
  type CalendarProps = ComponentProps<typeof DayPicker> & {
7
10
  buttonVariant?: ComponentProps<typeof Button>["variant"];
8
11
  };
12
+ /**
13
+ * @since 0.3.16-canary.0
14
+ */
9
15
  declare function Calendar({
10
16
  buttonVariant,
11
17
  captionLayout,
@@ -16,7 +22,13 @@ declare function Calendar({
16
22
  showOutsideDays,
17
23
  ...props
18
24
  }: CalendarProps): JSX.Element;
25
+ /**
26
+ * @since 0.3.16-canary.0
27
+ */
19
28
  type CalendarDayButtonProps = ComponentProps<typeof DayButton>;
29
+ /**
30
+ * @since 0.3.16-canary.0
31
+ */
20
32
  declare function CalendarDayButton({
21
33
  className,
22
34
  day,
@@ -6,6 +6,9 @@ import { jsx } from "react/jsx-runtime";
6
6
  import { useEffect, useRef } from "react";
7
7
  import { DayPicker, getDefaultClassNames } from "react-day-picker";
8
8
  //#region src/components/calendar.tsx
9
+ /**
10
+ * @since 0.3.16-canary.0
11
+ */
9
12
  function Calendar({ buttonVariant = "ghost", captionLayout = "label", className, classNames, components, formatters, showOutsideDays = true, ...props }) {
10
13
  const defaultClassNames = getDefaultClassNames();
11
14
  return /* @__PURE__ */ jsx(DayPicker, {
@@ -36,7 +39,7 @@ function Calendar({ buttonVariant = "ghost", captionLayout = "label", className,
36
39
  range_middle: cn("rounded-none", defaultClassNames.range_middle),
37
40
  range_start: cn("rounded-l-md", "bg-accent", defaultClassNames.range_start),
38
41
  root: cn("w-fit", defaultClassNames.root),
39
- table: "w-full border-collapse",
42
+ month_grid: "w-full border-collapse",
40
43
  today: cn("rounded-md", "bg-accent text-accent-foreground", "data-selected:rounded-none", defaultClassNames.today),
41
44
  week: cn("flex w-full", "mt-2", defaultClassNames.week),
42
45
  week_number: cn("text-[0.8rem] text-muted-foreground", "select-none", defaultClassNames.week_number),
@@ -91,6 +94,9 @@ function CalendarWeekNumber({ children, ...props }) {
91
94
  })
92
95
  });
93
96
  }
97
+ /**
98
+ * @since 0.3.16-canary.0
99
+ */
94
100
  function CalendarDayButton({ className, day, modifiers, ...props }) {
95
101
  const defaultClassNames = getDefaultClassNames();
96
102
  const ref = useRef(null);
@@ -1,38 +1,80 @@
1
1
  import { ComponentProps, JSX } from "react";
2
2
 
3
3
  //#region src/components/card.d.ts
4
+ /**
5
+ * @since 0.3.16-canary.0
6
+ */
4
7
  type CardProps = ComponentProps<"div">;
8
+ /**
9
+ * @since 0.3.16-canary.0
10
+ */
5
11
  declare function Card({
6
12
  className,
7
13
  ...props
8
14
  }: CardProps): JSX.Element;
15
+ /**
16
+ * @since 0.3.16-canary.0
17
+ */
9
18
  type CardHeaderProps = ComponentProps<"div">;
19
+ /**
20
+ * @since 0.3.16-canary.0
21
+ */
10
22
  declare function CardHeader({
11
23
  className,
12
24
  ...props
13
25
  }: CardHeaderProps): JSX.Element;
26
+ /**
27
+ * @since 0.3.16-canary.0
28
+ */
14
29
  type CardTitleProps = ComponentProps<"div">;
30
+ /**
31
+ * @since 0.3.16-canary.0
32
+ */
15
33
  declare function CardTitle({
16
34
  children,
17
35
  className,
18
36
  ...props
19
37
  }: CardTitleProps): JSX.Element;
38
+ /**
39
+ * @since 0.3.16-canary.0
40
+ */
20
41
  type CardDescriptionProps = ComponentProps<"div">;
42
+ /**
43
+ * @since 0.3.16-canary.0
44
+ */
21
45
  declare function CardDescription({
22
46
  className,
23
47
  ...props
24
48
  }: CardDescriptionProps): JSX.Element;
49
+ /**
50
+ * @since 0.3.16-canary.0
51
+ */
25
52
  type CardContentProps = ComponentProps<"div">;
53
+ /**
54
+ * @since 0.3.16-canary.0
55
+ */
26
56
  declare function CardContent({
27
57
  className,
28
58
  ...props
29
59
  }: CardContentProps): JSX.Element;
60
+ /**
61
+ * @since 0.3.16-canary.0
62
+ */
30
63
  type CardFooterProps = ComponentProps<"div">;
64
+ /**
65
+ * @since 0.3.16-canary.0
66
+ */
31
67
  declare function CardFooter({
32
68
  className,
33
69
  ...props
34
70
  }: CardFooterProps): JSX.Element;
71
+ /**
72
+ * @since 0.3.16-canary.0
73
+ */
35
74
  type CardActionProps = ComponentProps<"div">;
75
+ /**
76
+ * @since 0.3.16-canary.0
77
+ */
36
78
  declare function CardAction({
37
79
  className,
38
80
  ...props
@@ -1,6 +1,9 @@
1
1
  import { cn } from "../lib/utils.mjs";
2
2
  import { jsx } from "react/jsx-runtime";
3
3
  //#region src/components/card.tsx
4
+ /**
5
+ * @since 0.3.16-canary.0
6
+ */
4
7
  function Card({ className, ...props }) {
5
8
  return /* @__PURE__ */ jsx("div", {
6
9
  className: cn("flex flex-col gap-6 overflow-auto py-6", "rounded-xl border", "bg-card text-card-foreground shadow-sm", className),
@@ -8,6 +11,9 @@ function Card({ className, ...props }) {
8
11
  ...props
9
12
  });
10
13
  }
14
+ /**
15
+ * @since 0.3.16-canary.0
16
+ */
11
17
  function CardHeader({ className, ...props }) {
12
18
  return /* @__PURE__ */ jsx("div", {
13
19
  className: cn("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5", "px-6", "has-[data-slot=card-action]:grid-cols-[1fr_auto]", "[.border-b]:pb-6", className),
@@ -15,6 +21,9 @@ function CardHeader({ className, ...props }) {
15
21
  ...props
16
22
  });
17
23
  }
24
+ /**
25
+ * @since 0.3.16-canary.0
26
+ */
18
27
  function CardTitle({ children, className, ...props }) {
19
28
  return /* @__PURE__ */ jsx("div", {
20
29
  className: cn("leading-none font-semibold", className),
@@ -23,6 +32,9 @@ function CardTitle({ children, className, ...props }) {
23
32
  children
24
33
  });
25
34
  }
35
+ /**
36
+ * @since 0.3.16-canary.0
37
+ */
26
38
  function CardDescription({ className, ...props }) {
27
39
  return /* @__PURE__ */ jsx("div", {
28
40
  className: cn("text-sm text-muted-foreground", className),
@@ -30,6 +42,9 @@ function CardDescription({ className, ...props }) {
30
42
  ...props
31
43
  });
32
44
  }
45
+ /**
46
+ * @since 0.3.16-canary.0
47
+ */
33
48
  function CardContent({ className, ...props }) {
34
49
  return /* @__PURE__ */ jsx("div", {
35
50
  className: cn("px-6", className),
@@ -37,6 +52,9 @@ function CardContent({ className, ...props }) {
37
52
  ...props
38
53
  });
39
54
  }
55
+ /**
56
+ * @since 0.3.16-canary.0
57
+ */
40
58
  function CardFooter({ className, ...props }) {
41
59
  return /* @__PURE__ */ jsx("div", {
42
60
  className: cn("flex items-center", "px-6", "[.border-t]:pt-6", className),
@@ -44,6 +62,9 @@ function CardFooter({ className, ...props }) {
44
62
  ...props
45
63
  });
46
64
  }
65
+ /**
66
+ * @since 0.3.16-canary.0
67
+ */
47
68
  function CardAction({ className, ...props }) {
48
69
  return /* @__PURE__ */ jsx("div", {
49
70
  className: cn("col-start-2 row-span-2 row-start-1 self-start justify-self-end", className),
@@ -9,6 +9,9 @@ type ScopedProps<P> = P & {
9
9
  __scopeCarousel?: Scope;
10
10
  };
11
11
  declare const createCarouselScope: _$_radix_ui_react_context0.CreateScope;
12
+ /**
13
+ * @since 0.3.16-canary.0
14
+ */
12
15
  type CarouselApi = UseEmblaCarouselType[1];
13
16
  type UseCarouselParameters = Parameters<typeof useEmblaCarousel>;
14
17
  type CarouselOptions = UseCarouselParameters[0];
@@ -19,7 +22,13 @@ interface BaseCarouselProps {
19
22
  plugins?: CarouselPlugin;
20
23
  setApi?: (api: CarouselApi) => void;
21
24
  }
25
+ /**
26
+ * @since 0.3.16-canary.0
27
+ */
22
28
  interface CarouselProps extends BaseCarouselProps, ComponentProps<"div"> {}
29
+ /**
30
+ * @since 0.3.16-canary.0
31
+ */
23
32
  declare function Carousel({
24
33
  __scopeCarousel,
25
34
  children,
@@ -30,25 +39,43 @@ declare function Carousel({
30
39
  setApi,
31
40
  ...props
32
41
  }: ScopedProps<CarouselProps>): JSX.Element;
42
+ /**
43
+ * @since 0.3.16-canary.0
44
+ */
33
45
  interface CarouselContentProps extends ComponentProps<"div"> {
34
46
  classNames?: {
35
47
  content?: string;
36
48
  wrapper?: string;
37
49
  };
38
50
  }
51
+ /**
52
+ * @since 0.3.16-canary.0
53
+ */
39
54
  declare function CarouselContent({
40
55
  __scopeCarousel,
41
56
  className,
42
57
  classNames,
43
58
  ...props
44
59
  }: ScopedProps<CarouselContentProps>): JSX.Element;
60
+ /**
61
+ * @since 0.3.16-canary.0
62
+ */
45
63
  type CarouselItemProps = ComponentProps<"div">;
64
+ /**
65
+ * @since 0.3.16-canary.0
66
+ */
46
67
  declare function CarouselItem({
47
68
  __scopeCarousel,
48
69
  className,
49
70
  ...props
50
71
  }: ScopedProps<CarouselItemProps>): JSX.Element;
72
+ /**
73
+ * @since 0.3.16-canary.0
74
+ */
51
75
  type CarouselPreviousProps = ComponentProps<typeof Button>;
76
+ /**
77
+ * @since 0.3.16-canary.0
78
+ */
52
79
  declare function CarouselPrevious({
53
80
  __scopeCarousel,
54
81
  className,
@@ -56,7 +83,13 @@ declare function CarouselPrevious({
56
83
  variant,
57
84
  ...props
58
85
  }: ScopedProps<CarouselPreviousProps>): JSX.Element;
86
+ /**
87
+ * @since 0.3.16-canary.0
88
+ */
59
89
  type CarouselNextProps = ComponentProps<typeof Button>;
90
+ /**
91
+ * @since 0.3.16-canary.0
92
+ */
60
93
  declare function CarouselNext({
61
94
  __scopeCarousel,
62
95
  className,
@@ -10,6 +10,9 @@ import useEmblaCarousel from "embla-carousel-react";
10
10
  const CAROUSEL_NAME = "Carousel";
11
11
  const [createCarouselContext, createCarouselScope] = createContextScope(CAROUSEL_NAME);
12
12
  const [CarouselContextProvider, useCarouselContext] = createCarouselContext(CAROUSEL_NAME);
13
+ /**
14
+ * @since 0.3.16-canary.0
15
+ */
13
16
  function Carousel({ __scopeCarousel, children, className, opts, orientation, plugins, setApi, ...props }) {
14
17
  const [carouselRef, api] = useEmblaCarousel({
15
18
  ...opts,
@@ -72,6 +75,9 @@ function Carousel({ __scopeCarousel, children, className, opts, orientation, plu
72
75
  });
73
76
  }
74
77
  const CAROUSEL_CONTENT_NAME = "CarouselContent";
78
+ /**
79
+ * @since 0.3.16-canary.0
80
+ */
75
81
  function CarouselContent({ __scopeCarousel, className, classNames, ...props }) {
76
82
  const { carouselRef, orientation } = useCarouselContext(CAROUSEL_CONTENT_NAME, __scopeCarousel);
77
83
  return /* @__PURE__ */ jsx("div", {
@@ -85,6 +91,9 @@ function CarouselContent({ __scopeCarousel, className, classNames, ...props }) {
85
91
  });
86
92
  }
87
93
  const CAROUSEL_ITEM_NAME = "CarouselItem";
94
+ /**
95
+ * @since 0.3.16-canary.0
96
+ */
88
97
  function CarouselItem({ __scopeCarousel, className, ...props }) {
89
98
  const { orientation } = useCarouselContext(CAROUSEL_ITEM_NAME, __scopeCarousel);
90
99
  return /* @__PURE__ */ jsx("div", {
@@ -96,6 +105,9 @@ function CarouselItem({ __scopeCarousel, className, ...props }) {
96
105
  });
97
106
  }
98
107
  const CAROUSEL_PREVIOUS_NAME = "CarouselPrevious";
108
+ /**
109
+ * @since 0.3.16-canary.0
110
+ */
99
111
  function CarouselPrevious({ __scopeCarousel, className, size = "icon", variant = "outline", ...props }) {
100
112
  const { canScrollPrev, orientation, scrollPrev } = useCarouselContext(CAROUSEL_PREVIOUS_NAME, __scopeCarousel);
101
113
  return /* @__PURE__ */ jsxs(Button, {
@@ -114,6 +126,9 @@ function CarouselPrevious({ __scopeCarousel, className, size = "icon", variant =
114
126
  });
115
127
  }
116
128
  const CAROUSEL_NEXT_NAME = "CarouselNext";
129
+ /**
130
+ * @since 0.3.16-canary.0
131
+ */
117
132
  function CarouselNext({ __scopeCarousel, className, size = "icon", variant = "outline", ...props }) {
118
133
  const { canScrollNext, orientation, scrollNext } = useCarouselContext(CAROUSEL_NEXT_NAME, __scopeCarousel);
119
134
  return /* @__PURE__ */ jsxs(Button, {
@@ -13,6 +13,9 @@ declare const THEMES: {
13
13
  readonly dark: ".dark";
14
14
  readonly light: "";
15
15
  };
16
+ /**
17
+ * @since 0.3.16-canary.0
18
+ */
16
19
  type ChartConfig = Record<string, {
17
20
  label?: ReactNode;
18
21
  icon?: ComponentType;
@@ -27,10 +30,16 @@ type ScopedProps<P> = P & {
27
30
  __scopeChart?: Scope;
28
31
  };
29
32
  declare const createChartScope: _$_radix_ui_react_context0.CreateScope;
33
+ /**
34
+ * @since 0.3.16-canary.0
35
+ */
30
36
  interface ChartContainerProps extends ComponentProps<"div"> {
31
37
  children: ComponentProps<typeof RechartsPrimitive.ResponsiveContainer>["children"];
32
38
  config: ChartConfig;
33
39
  }
40
+ /**
41
+ * @since 0.3.16-canary.0
42
+ */
34
43
  declare function ChartContainer({
35
44
  __scopeChart,
36
45
  children,
@@ -39,16 +48,31 @@ declare function ChartContainer({
39
48
  id,
40
49
  ...props
41
50
  }: ScopedProps<ChartContainerProps>): JSX.Element;
51
+ /**
52
+ * @since 0.3.16-canary.0
53
+ */
42
54
  interface ChartStyleProps {
43
55
  config: ChartConfig;
44
56
  id: string;
45
57
  }
58
+ /**
59
+ * @since 0.3.16-canary.0
60
+ */
46
61
  declare function ChartStyle({
47
62
  config,
48
63
  id
49
64
  }: ChartStyleProps): ReactNode;
65
+ /**
66
+ * @since 0.3.16-canary.0
67
+ */
50
68
  type ChartTooltipProps<TValue extends ValueType, TName extends NameType> = TooltipProps<TValue, TName>;
69
+ /**
70
+ * @since 0.3.16-canary.0
71
+ */
51
72
  declare const ChartTooltip: typeof RechartsPrimitive.Tooltip;
73
+ /**
74
+ * @since 0.3.16-canary.0
75
+ */
52
76
  type ChartTooltipContentProps<TValue extends ValueType, TName extends NameType> = Omit<MakeOptional<TooltipContentProps<TValue, TName>, "accessibilityLayer" | "active" | "activeIndex" | "coordinate" | "payload">, "payload"> & {
53
77
  hideIndicator?: boolean;
54
78
  hideLabel?: boolean;
@@ -57,8 +81,11 @@ type ChartTooltipContentProps<TValue extends ValueType, TName extends NameType>
57
81
  nameKey?: string;
58
82
  color?: string | undefined;
59
83
  className?: string | undefined;
60
- payload?: Payload<TValue, TName>[];
84
+ payload?: Array<Payload<TValue, TName>>;
61
85
  };
86
+ /**
87
+ * @since 0.3.16-canary.0
88
+ */
62
89
  declare function ChartTooltipContent<TValue extends ValueType, TName extends NameType>({
63
90
  __scopeChart,
64
91
  active,
@@ -75,12 +102,24 @@ declare function ChartTooltipContent<TValue extends ValueType, TName extends Nam
75
102
  nameKey,
76
103
  payload
77
104
  }: ScopedProps<ChartTooltipContentProps<TValue, TName>>): ReactNode;
105
+ /**
106
+ * @since 0.3.16-canary.0
107
+ */
78
108
  type ChartLegendProps = ComponentProps<typeof RechartsPrimitive.Legend>;
109
+ /**
110
+ * @since 0.3.16-canary.0
111
+ */
79
112
  declare const ChartLegend: _$react.MemoExoticComponent<(outsideProps: RechartsPrimitive.LegendProps) => React.ReactPortal | null>;
113
+ /**
114
+ * @since 0.3.16-canary.0
115
+ */
80
116
  type ChartLegendContentProps = ComponentProps<"div"> & ExtractProps<RechartsPrimitive.LegendProps["content"]> & {
81
117
  hideIcon?: boolean;
82
118
  nameKey?: string;
83
119
  };
120
+ /**
121
+ * @since 0.3.16-canary.0
122
+ */
84
123
  declare function ChartLegendContent({
85
124
  __scopeChart,
86
125
  className,
@@ -12,6 +12,9 @@ const THEMES = {
12
12
  const CHART_PROVIDER_NAME = "ChartProvider";
13
13
  const [createChartContext, createChartScope] = createContextScope(CHART_PROVIDER_NAME);
14
14
  const [ChartContextProvider, useChartContext] = createChartContext(CHART_PROVIDER_NAME);
15
+ /**
16
+ * @since 0.3.16-canary.0
17
+ */
15
18
  function ChartContainer({ __scopeChart, children, className, config, id, ...props }) {
16
19
  const uniqueId = useId();
17
20
  const chartId = `chart-${id ?? uniqueId}`;
@@ -30,13 +33,22 @@ function ChartContainer({ __scopeChart, children, className, config, id, ...prop
30
33
  })
31
34
  });
32
35
  }
36
+ /**
37
+ * @since 0.3.16-canary.0
38
+ */
33
39
  function ChartStyle({ config, id }) {
34
40
  const colorConfig = Object.entries(config).filter(([, itemConfig]) => itemConfig.theme ?? itemConfig.color);
35
41
  if (colorConfig.length === 0) return null;
36
42
  return /* @__PURE__ */ jsx("style", { dangerouslySetInnerHTML: { __html: generateChartStyles(id, colorConfig) } });
37
43
  }
44
+ /**
45
+ * @since 0.3.16-canary.0
46
+ */
38
47
  const ChartTooltip = RechartsPrimitive.Tooltip;
39
48
  const CHART_TOOLTIP_CONTENT_NAME = "ChartTooltipContent";
49
+ /**
50
+ * @since 0.3.16-canary.0
51
+ */
40
52
  function ChartTooltipContent({ __scopeChart, active, className, color, formatter, hideIndicator = false, hideLabel = false, indicator = "dot", label, labelClassName, labelFormatter, labelKey, nameKey, payload = [] }) {
41
53
  const { config } = useChartContext(CHART_TOOLTIP_CONTENT_NAME, __scopeChart);
42
54
  const tooltipLabel = useMemo(() => {
@@ -105,8 +117,14 @@ function ChartTooltipContent({ __scopeChart, active, className, color, formatter
105
117
  })]
106
118
  });
107
119
  }
120
+ /**
121
+ * @since 0.3.16-canary.0
122
+ */
108
123
  const ChartLegend = RechartsPrimitive.Legend;
109
124
  const CHART_LEGEND_CONTENT_NAME = "ChartLegendContent";
125
+ /**
126
+ * @since 0.3.16-canary.0
127
+ */
110
128
  function ChartLegendContent({ __scopeChart, className, hideIcon = false, nameKey, payload, verticalAlign = "bottom" }) {
111
129
  const { config } = useChartContext(CHART_LEGEND_CONTENT_NAME, __scopeChart);
112
130
  if (!payload?.length) return null;