@codefast/ui 0.3.11-canary.1 → 0.3.11

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 (149) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/README.md +34 -14
  3. package/dist/components/accordion.d.ts +29 -10
  4. package/dist/components/accordion.js +38 -37
  5. package/dist/components/alert-dialog.d.ts +60 -24
  6. package/dist/components/alert-dialog.js +69 -72
  7. package/dist/components/alert.d.ts +27 -15
  8. package/dist/components/alert.js +29 -31
  9. package/dist/components/aspect-ratio.d.ts +8 -4
  10. package/dist/components/aspect-ratio.js +7 -5
  11. package/dist/components/avatar.d.ts +17 -6
  12. package/dist/components/avatar.js +19 -17
  13. package/dist/components/badge.d.ts +21 -14
  14. package/dist/components/badge.js +19 -22
  15. package/dist/components/breadcrumb.d.ts +35 -12
  16. package/dist/components/breadcrumb.js +48 -54
  17. package/dist/components/button-group.d.ts +29 -14
  18. package/dist/components/button-group.js +27 -32
  19. package/dist/components/button.d.ts +35 -25
  20. package/dist/components/button.js +50 -48
  21. package/dist/components/calendar.d.ts +24 -9
  22. package/dist/components/calendar.js +92 -98
  23. package/dist/components/card.d.ts +34 -10
  24. package/dist/components/card.js +39 -37
  25. package/dist/components/carousel.d.ts +55 -24
  26. package/dist/components/carousel.js +113 -130
  27. package/dist/components/chart.d.ts +72 -36
  28. package/dist/components/chart.js +154 -166
  29. package/dist/components/checkbox-cards.d.ts +15 -8
  30. package/dist/components/checkbox-cards.js +22 -25
  31. package/dist/components/checkbox-group.d.ts +16 -8
  32. package/dist/components/checkbox-group.js +19 -19
  33. package/dist/components/checkbox.d.ts +9 -4
  34. package/dist/components/checkbox.js +14 -14
  35. package/dist/components/collapsible.d.ts +14 -6
  36. package/dist/components/collapsible.js +18 -16
  37. package/dist/components/command.d.ts +55 -23
  38. package/dist/components/command.js +70 -85
  39. package/dist/components/context-menu.d.ts +72 -22
  40. package/dist/components/context-menu.js +88 -109
  41. package/dist/components/dialog.d.ts +53 -22
  42. package/dist/components/dialog.js +71 -85
  43. package/dist/components/drawer.d.ts +60 -28
  44. package/dist/components/drawer.js +59 -67
  45. package/dist/components/dropdown-menu.d.ts +73 -22
  46. package/dist/components/dropdown-menu.js +95 -112
  47. package/dist/components/empty.d.ts +37 -15
  48. package/dist/components/empty.js +43 -45
  49. package/dist/components/field.d.ts +63 -25
  50. package/dist/components/field.js +88 -104
  51. package/dist/components/form.d.ts +37 -15
  52. package/dist/components/form.js +65 -70
  53. package/dist/components/hover-card.d.ts +21 -7
  54. package/dist/components/hover-card.js +24 -24
  55. package/dist/components/input-group.d.ts +53 -28
  56. package/dist/components/input-group.js +63 -77
  57. package/dist/components/input-number.d.ts +28 -7
  58. package/dist/components/input-number.js +55 -59
  59. package/dist/components/input-otp.d.ts +24 -10
  60. package/dist/components/input-otp.js +33 -37
  61. package/dist/components/input-password.d.ts +12 -5
  62. package/dist/components/input-password.js +31 -32
  63. package/dist/components/input-search.d.ts +18 -8
  64. package/dist/components/input-search.js +43 -41
  65. package/dist/components/input.d.ts +10 -4
  66. package/dist/components/input.js +9 -7
  67. package/dist/components/item.d.ts +69 -32
  68. package/dist/components/item.js +89 -92
  69. package/dist/components/kbd.d.ts +13 -5
  70. package/dist/components/kbd.js +13 -11
  71. package/dist/components/label.d.ts +9 -4
  72. package/dist/components/label.js +9 -7
  73. package/dist/components/menubar.d.ts +80 -23
  74. package/dist/components/menubar.js +97 -118
  75. package/dist/components/native-select.d.ts +16 -6
  76. package/dist/components/native-select.js +25 -26
  77. package/dist/components/navigation-menu.d.ts +36 -12
  78. package/dist/components/navigation-menu.js +60 -75
  79. package/dist/components/pagination.d.ts +35 -14
  80. package/dist/components/pagination.js +54 -69
  81. package/dist/components/popover.d.ts +24 -8
  82. package/dist/components/popover.js +28 -28
  83. package/dist/components/progress-circle.d.ts +106 -88
  84. package/dist/components/progress-circle.js +106 -138
  85. package/dist/components/progress.d.ts +10 -4
  86. package/dist/components/progress.js +14 -14
  87. package/dist/components/radio-cards.d.ts +10 -4
  88. package/dist/components/radio-cards.js +22 -23
  89. package/dist/components/radio-group.d.ts +13 -5
  90. package/dist/components/radio-group.js +18 -16
  91. package/dist/components/radio.d.ts +12 -5
  92. package/dist/components/radio.js +10 -8
  93. package/dist/components/resizable.d.ts +18 -7
  94. package/dist/components/resizable.js +22 -22
  95. package/dist/components/scroll-area.d.ts +33 -20
  96. package/dist/components/scroll-area.js +84 -88
  97. package/dist/components/select.d.ts +50 -16
  98. package/dist/components/select.js +77 -96
  99. package/dist/components/separator.d.ts +29 -19
  100. package/dist/components/separator.js +36 -34
  101. package/dist/components/sheet.d.ts +62 -29
  102. package/dist/components/sheet.js +79 -100
  103. package/dist/components/sidebar.d.ts +160 -66
  104. package/dist/components/sidebar.js +294 -336
  105. package/dist/components/skeleton.d.ts +9 -4
  106. package/dist/components/skeleton.js +8 -6
  107. package/dist/components/slider.d.ts +13 -4
  108. package/dist/components/slider.js +34 -40
  109. package/dist/components/sonner.d.ts +10 -7
  110. package/dist/components/sonner.js +16 -14
  111. package/dist/components/spinner.d.ts +12 -5
  112. package/dist/components/spinner.js +33 -35
  113. package/dist/components/switch.d.ts +9 -4
  114. package/dist/components/switch.js +13 -11
  115. package/dist/components/table.d.ts +37 -11
  116. package/dist/components/table.js +47 -45
  117. package/dist/components/tabs.d.ts +21 -7
  118. package/dist/components/tabs.js +24 -22
  119. package/dist/components/textarea.d.ts +9 -4
  120. package/dist/components/textarea.js +8 -6
  121. package/dist/components/toggle-group.d.ts +24 -9
  122. package/dist/components/toggle-group.js +41 -42
  123. package/dist/components/toggle.d.ts +25 -17
  124. package/dist/components/toggle.js +30 -28
  125. package/dist/components/tooltip.d.ts +24 -8
  126. package/dist/components/tooltip.js +29 -32
  127. package/dist/hooks/use-animated-value.d.ts +4 -1
  128. package/dist/hooks/use-animated-value.js +57 -36
  129. package/dist/hooks/use-copy-to-clipboard.d.ts +11 -5
  130. package/dist/hooks/use-copy-to-clipboard.js +39 -20
  131. package/dist/hooks/use-is-mobile.d.ts +4 -1
  132. package/dist/hooks/use-is-mobile.js +21 -1
  133. package/dist/hooks/use-media-query.d.ts +4 -1
  134. package/dist/hooks/use-media-query.js +45 -18
  135. package/dist/hooks/use-mutation-observer.d.ts +6 -2
  136. package/dist/hooks/use-mutation-observer.js +34 -16
  137. package/dist/hooks/use-pagination.d.ts +22 -14
  138. package/dist/hooks/use-pagination.js +100 -49
  139. package/dist/index.d.ts +69 -130
  140. package/dist/index.js +11 -11
  141. package/dist/primitives/checkbox-group.d.ts +105 -83
  142. package/dist/primitives/checkbox-group.js +111 -84
  143. package/dist/primitives/input-number.d.ts +51 -40
  144. package/dist/primitives/input-number.js +483 -350
  145. package/dist/primitives/input.d.ts +48 -42
  146. package/dist/primitives/input.js +65 -43
  147. package/dist/primitives/progress-circle.d.ts +79 -48
  148. package/dist/primitives/progress-circle.js +154 -105
  149. package/package.json +6 -7
@@ -1,25 +1,46 @@
1
- import type { VariantProps } from "@codefast/tailwind-variants";
2
- import type { ComponentProps, JSX } from "react";
3
- import { buttonVariants } from "./button";
1
+ import { buttonVariants } from "./button.js";
2
+ import { VariantProps } from "@codefast/tailwind-variants";
3
+ import { ComponentProps, JSX } from "react";
4
+
5
+ //#region src/components/pagination.d.ts
4
6
  type PaginationProps = ComponentProps<"nav">;
5
- declare function Pagination({ className, ...props }: PaginationProps): JSX.Element;
7
+ declare function Pagination({
8
+ className,
9
+ ...props
10
+ }: PaginationProps): JSX.Element;
6
11
  type PaginationContentProps = ComponentProps<"ul">;
7
- declare function PaginationContent({ className, ...props }: PaginationContentProps): JSX.Element;
12
+ declare function PaginationContent({
13
+ className,
14
+ ...props
15
+ }: PaginationContentProps): JSX.Element;
8
16
  type PaginationItemProps = ComponentProps<"li">;
9
17
  declare function PaginationItem(props: PaginationItemProps): JSX.Element;
10
18
  interface PaginationLinkProps extends ComponentProps<"a">, Pick<VariantProps<typeof buttonVariants>, "size"> {
11
- isActive?: boolean;
19
+ isActive?: boolean;
12
20
  }
13
- declare function PaginationLink({ children, className, isActive, size, ...props }: PaginationLinkProps): JSX.Element;
21
+ declare function PaginationLink({
22
+ children,
23
+ className,
24
+ isActive,
25
+ size,
26
+ ...props
27
+ }: PaginationLinkProps): JSX.Element;
14
28
  interface PaginationPreviousProps extends ComponentProps<"a">, Pick<VariantProps<typeof buttonVariants>, "size"> {
15
- isActive?: boolean;
29
+ isActive?: boolean;
16
30
  }
17
- declare function PaginationPrevious({ ...props }: PaginationPreviousProps): JSX.Element;
31
+ declare function PaginationPrevious({
32
+ ...props
33
+ }: PaginationPreviousProps): JSX.Element;
18
34
  interface PaginationNextProps extends ComponentProps<"a">, Pick<VariantProps<typeof buttonVariants>, "size"> {
19
- isActive?: boolean;
35
+ isActive?: boolean;
20
36
  }
21
- declare function PaginationNext({ ...props }: PaginationNextProps): JSX.Element;
37
+ declare function PaginationNext({
38
+ ...props
39
+ }: PaginationNextProps): JSX.Element;
22
40
  type PaginationEllipsisProps = ComponentProps<"span">;
23
- declare function PaginationEllipsis({ className, ...props }: PaginationEllipsisProps): JSX.Element;
24
- export { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, };
25
- export type { PaginationContentProps, PaginationEllipsisProps, PaginationItemProps, PaginationLinkProps, PaginationNextProps, PaginationPreviousProps, PaginationProps, };
41
+ declare function PaginationEllipsis({
42
+ className,
43
+ ...props
44
+ }: PaginationEllipsisProps): JSX.Element;
45
+ //#endregion
46
+ export { Pagination, PaginationContent, type PaginationContentProps, PaginationEllipsis, type PaginationEllipsisProps, PaginationItem, type PaginationItemProps, PaginationLink, type PaginationLinkProps, PaginationNext, type PaginationNextProps, PaginationPrevious, type PaginationPreviousProps, type PaginationProps };
@@ -1,86 +1,71 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
1
+ import { buttonVariants } from "./button.js";
2
2
  import { cn } from "@codefast/tailwind-variants";
3
3
  import { ChevronLeftIcon, ChevronRightIcon, EllipsisIcon } from "lucide-react";
4
- import { buttonVariants } from "./button.js";
4
+ import { jsx, jsxs } from "react/jsx-runtime";
5
+ //#region src/components/pagination.tsx
5
6
  function Pagination({ className, ...props }) {
6
- return /*#__PURE__*/ jsx("nav", {
7
- "aria-label": "pagination",
8
- className: cn("mx-auto flex w-full justify-center", className),
9
- "data-slot": "pagination",
10
- ...props
11
- });
7
+ return /* @__PURE__ */ jsx("nav", {
8
+ "aria-label": "pagination",
9
+ className: cn("mx-auto flex w-full justify-center", className),
10
+ "data-slot": "pagination",
11
+ ...props
12
+ });
12
13
  }
13
14
  function PaginationContent({ className, ...props }) {
14
- return /*#__PURE__*/ jsx("ul", {
15
- className: cn("flex flex-row items-center gap-1", className),
16
- "data-slot": "pagination-content",
17
- ...props
18
- });
15
+ return /* @__PURE__ */ jsx("ul", {
16
+ className: cn("flex flex-row items-center gap-1", className),
17
+ "data-slot": "pagination-content",
18
+ ...props
19
+ });
19
20
  }
20
21
  function PaginationItem(props) {
21
- return /*#__PURE__*/ jsx("li", {
22
- "data-slot": "pagination-item",
23
- ...props
24
- });
22
+ return /* @__PURE__ */ jsx("li", {
23
+ "data-slot": "pagination-item",
24
+ ...props
25
+ });
25
26
  }
26
27
  function PaginationLink({ children, className, isActive, size = "icon", ...props }) {
27
- return /*#__PURE__*/ jsx("a", {
28
- "aria-current": isActive ? "page" : void 0,
29
- className: buttonVariants({
30
- className,
31
- size,
32
- variant: isActive ? "outline" : "ghost"
33
- }),
34
- "data-slot": "pagination-link",
35
- ...props,
36
- children: children
37
- });
28
+ return /* @__PURE__ */ jsx("a", {
29
+ "aria-current": isActive ? "page" : void 0,
30
+ className: buttonVariants({
31
+ className,
32
+ size,
33
+ variant: isActive ? "outline" : "ghost"
34
+ }),
35
+ "data-slot": "pagination-link",
36
+ ...props,
37
+ children
38
+ });
38
39
  }
39
40
  function PaginationPrevious({ ...props }) {
40
- return /*#__PURE__*/ jsxs(PaginationLink, {
41
- "aria-label": "Go to previous page",
42
- "data-slot": "pagination-previous",
43
- size: "md",
44
- ...props,
45
- children: [
46
- /*#__PURE__*/ jsx(ChevronLeftIcon, {
47
- className: "size-4"
48
- }),
49
- /*#__PURE__*/ jsx("span", {
50
- children: "Previous"
51
- })
52
- ]
53
- });
41
+ return /* @__PURE__ */ jsxs(PaginationLink, {
42
+ "aria-label": "Go to previous page",
43
+ "data-slot": "pagination-previous",
44
+ size: "md",
45
+ ...props,
46
+ children: [/* @__PURE__ */ jsx(ChevronLeftIcon, { className: "size-4" }), /* @__PURE__ */ jsx("span", { children: "Previous" })]
47
+ });
54
48
  }
55
49
  function PaginationNext({ ...props }) {
56
- return /*#__PURE__*/ jsxs(PaginationLink, {
57
- "aria-label": "Go to next page",
58
- "data-slot": "pagination-next",
59
- size: "md",
60
- ...props,
61
- children: [
62
- /*#__PURE__*/ jsx("span", {
63
- children: "Next"
64
- }),
65
- /*#__PURE__*/ jsx(ChevronRightIcon, {})
66
- ]
67
- });
50
+ return /* @__PURE__ */ jsxs(PaginationLink, {
51
+ "aria-label": "Go to next page",
52
+ "data-slot": "pagination-next",
53
+ size: "md",
54
+ ...props,
55
+ children: [/* @__PURE__ */ jsx("span", { children: "Next" }), /* @__PURE__ */ jsx(ChevronRightIcon, {})]
56
+ });
68
57
  }
69
58
  function PaginationEllipsis({ className, ...props }) {
70
- return /*#__PURE__*/ jsxs("span", {
71
- "aria-hidden": true,
72
- className: cn("flex size-10 items-center justify-center", className),
73
- "data-slot": "pagination-ellipsis",
74
- ...props,
75
- children: [
76
- /*#__PURE__*/ jsx(EllipsisIcon, {
77
- className: "size-4"
78
- }),
79
- /*#__PURE__*/ jsx("span", {
80
- className: "sr-only",
81
- children: "More pages"
82
- })
83
- ]
84
- });
59
+ return /* @__PURE__ */ jsxs("span", {
60
+ "aria-hidden": true,
61
+ className: cn("flex size-10 items-center justify-center", className),
62
+ "data-slot": "pagination-ellipsis",
63
+ ...props,
64
+ children: [/* @__PURE__ */ jsx(EllipsisIcon, { className: "size-4" }), /* @__PURE__ */ jsx("span", {
65
+ className: "sr-only",
66
+ children: "More pages"
67
+ })]
68
+ });
85
69
  }
70
+ //#endregion
86
71
  export { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious };
@@ -1,14 +1,30 @@
1
- import type { ComponentProps, JSX } from "react";
1
+ import { ComponentProps, JSX } from "react";
2
2
  import * as PopoverPrimitive from "@radix-ui/react-popover";
3
+
4
+ //#region src/components/popover.d.ts
3
5
  type PopoverProps = ComponentProps<typeof PopoverPrimitive.Root>;
4
- declare function Popover({ ...props }: PopoverProps): JSX.Element;
6
+ declare function Popover({
7
+ ...props
8
+ }: PopoverProps): JSX.Element;
5
9
  type PopoverTriggerProps = ComponentProps<typeof PopoverPrimitive.Trigger>;
6
- declare function PopoverTrigger({ ...props }: PopoverTriggerProps): JSX.Element;
10
+ declare function PopoverTrigger({
11
+ ...props
12
+ }: PopoverTriggerProps): JSX.Element;
7
13
  type PopoverAnchorProps = ComponentProps<typeof PopoverPrimitive.Anchor>;
8
- declare function PopoverAnchor({ ...props }: PopoverAnchorProps): JSX.Element;
14
+ declare function PopoverAnchor({
15
+ ...props
16
+ }: PopoverAnchorProps): JSX.Element;
9
17
  type PopoverContentProps = ComponentProps<typeof PopoverPrimitive.Content>;
10
- declare function PopoverContent({ align, className, sideOffset, ...props }: PopoverContentProps): JSX.Element;
18
+ declare function PopoverContent({
19
+ align,
20
+ className,
21
+ sideOffset,
22
+ ...props
23
+ }: PopoverContentProps): JSX.Element;
11
24
  type PopoverArrowProps = ComponentProps<typeof PopoverPrimitive.Arrow>;
12
- declare function PopoverArrow({ className, ...props }: PopoverArrowProps): JSX.Element;
13
- export { Popover, PopoverAnchor, PopoverArrow, PopoverContent, PopoverTrigger };
14
- export type { PopoverAnchorProps, PopoverArrowProps, PopoverContentProps, PopoverProps, PopoverTriggerProps, };
25
+ declare function PopoverArrow({
26
+ className,
27
+ ...props
28
+ }: PopoverArrowProps): JSX.Element;
29
+ //#endregion
30
+ export { Popover, PopoverAnchor, type PopoverAnchorProps, PopoverArrow, type PopoverArrowProps, PopoverContent, type PopoverContentProps, type PopoverProps, PopoverTrigger, type PopoverTriggerProps };
@@ -1,41 +1,41 @@
1
1
  "use client";
2
- import { jsx } from "react/jsx-runtime";
3
2
  import { cn } from "@codefast/tailwind-variants";
4
- import { Anchor, Arrow, Content, Portal, Root, Trigger } from "@radix-ui/react-popover";
3
+ import { jsx } from "react/jsx-runtime";
4
+ import * as PopoverPrimitive from "@radix-ui/react-popover";
5
+ //#region src/components/popover.tsx
5
6
  function Popover({ ...props }) {
6
- return /*#__PURE__*/ jsx(Root, {
7
- "data-slot": "popover",
8
- ...props
9
- });
7
+ return /* @__PURE__ */ jsx(PopoverPrimitive.Root, {
8
+ "data-slot": "popover",
9
+ ...props
10
+ });
10
11
  }
11
12
  function PopoverTrigger({ ...props }) {
12
- return /*#__PURE__*/ jsx(Trigger, {
13
- "data-slot": "popover-trigger",
14
- ...props
15
- });
13
+ return /* @__PURE__ */ jsx(PopoverPrimitive.Trigger, {
14
+ "data-slot": "popover-trigger",
15
+ ...props
16
+ });
16
17
  }
17
18
  function PopoverAnchor({ ...props }) {
18
- return /*#__PURE__*/ jsx(Anchor, {
19
- "data-slot": "popover-anchor",
20
- ...props
21
- });
19
+ return /* @__PURE__ */ jsx(PopoverPrimitive.Anchor, {
20
+ "data-slot": "popover-anchor",
21
+ ...props
22
+ });
22
23
  }
23
24
  function PopoverContent({ align = "center", className, sideOffset = 4, ...props }) {
24
- return /*#__PURE__*/ jsx(Portal, {
25
- children: /*#__PURE__*/ jsx(Content, {
26
- align: align,
27
- className: cn("z-50 min-w-32 origin-(--radix-popover-content-transform-origin) rounded-lg border bg-popover p-4 text-popover-foreground shadow-lg outline-hidden ease-ui data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=top]:slide-in-from-bottom-2", className),
28
- "data-slot": "popover-content",
29
- sideOffset: sideOffset,
30
- ...props
31
- })
32
- });
25
+ return /* @__PURE__ */ jsx(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx(PopoverPrimitive.Content, {
26
+ align,
27
+ className: cn("z-50 min-w-32 origin-(--radix-popover-content-transform-origin) rounded-lg border bg-popover p-4 text-popover-foreground shadow-lg outline-hidden ease-ui data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=top]:slide-in-from-bottom-2", className),
28
+ "data-slot": "popover-content",
29
+ sideOffset,
30
+ ...props
31
+ }) });
33
32
  }
34
33
  function PopoverArrow({ className, ...props }) {
35
- return /*#__PURE__*/ jsx(Arrow, {
36
- className: cn("fill-popover", className),
37
- "data-slot": "popover-arrow",
38
- ...props
39
- });
34
+ return /* @__PURE__ */ jsx(PopoverPrimitive.Arrow, {
35
+ className: cn("fill-popover", className),
36
+ "data-slot": "popover-arrow",
37
+ ...props
38
+ });
40
39
  }
40
+ //#endregion
41
41
  export { Popover, PopoverAnchor, PopoverArrow, PopoverContent, PopoverTrigger };
@@ -1,106 +1,124 @@
1
- import type { VariantProps } from "@codefast/tailwind-variants";
2
- import type { ComponentProps, JSX } from "react";
3
- import * as ProgressCirclePrimitive from "../primitives/progress-circle";
4
- declare const progressCircleVariants: import("@codefast/tailwind-variants").VariantFunctionType<{
5
- size: {
6
- sm: {
7
- label: string;
8
- };
9
- md: {
10
- label: string;
11
- };
12
- lg: {
13
- label: string;
14
- };
15
- xl: {
16
- label: string;
17
- };
18
- "2xl": {
19
- label: string;
20
- };
1
+ import { ProgressCircleProvider } from "../primitives/progress-circle.js";
2
+ import * as _$_codefast_tailwind_variants0 from "@codefast/tailwind-variants";
3
+ import { VariantProps } from "@codefast/tailwind-variants";
4
+ import { ComponentProps, JSX } from "react";
5
+
6
+ //#region src/components/progress-circle.d.ts
7
+ declare const progressCircleVariants: _$_codefast_tailwind_variants0.VariantFunctionType<{
8
+ size: {
9
+ sm: {
10
+ label: string;
21
11
  };
22
- thickness: {
23
- regular: {};
24
- thick: {};
25
- thin: {};
12
+ md: {
13
+ label: string;
26
14
  };
27
- variant: {
28
- default: {
29
- indicator: string;
30
- track: string;
31
- };
32
- destructive: {
33
- indicator: string;
34
- track: string;
35
- };
15
+ lg: {
16
+ label: string;
36
17
  };
18
+ xl: {
19
+ label: string;
20
+ };
21
+ "2xl": {
22
+ label: string;
23
+ };
24
+ };
25
+ thickness: {
26
+ regular: {};
27
+ thick: {};
28
+ thin: {};
29
+ };
30
+ variant: {
31
+ default: {
32
+ indicator: string;
33
+ track: string;
34
+ };
35
+ destructive: {
36
+ indicator: string;
37
+ track: string;
38
+ };
39
+ };
37
40
  }, {
38
- indicator: string;
39
- label: string;
40
- root: string;
41
- svg: string;
42
- track: string;
41
+ indicator: string;
42
+ label: string;
43
+ root: string;
44
+ svg: string;
45
+ track: string;
43
46
  }>;
44
- interface ProgressCircleProps extends Omit<ComponentProps<typeof ProgressCirclePrimitive.Provider>, "children" | "size">, VariantProps<typeof progressCircleVariants> {
47
+ interface ProgressCircleProps extends Omit<ComponentProps<typeof ProgressCircleProvider>, "children" | "size">, VariantProps<typeof progressCircleVariants> {
48
+ /**
49
+ * Enables animation effect when value changes
50
+ */
51
+ animate?: boolean;
52
+ /**
53
+ * Duration of the animation in milliseconds
54
+ */
55
+ animationDuration?: number;
56
+ /**
57
+ * CSS class to customize the entire component
58
+ */
59
+ className?: string;
60
+ /**
61
+ * CSS classes to customize specific parts of the component
62
+ */
63
+ classNames?: {
45
64
  /**
46
- * Enables animation effect when value changes
65
+ * Class for the progress indicator
47
66
  */
48
- animate?: boolean;
67
+ indicator?: string;
49
68
  /**
50
- * Duration of the animation in milliseconds
69
+ * Class for the label in the center of the circle
51
70
  */
52
- animationDuration?: number;
53
- /**
54
- * CSS class to customize the entire component
55
- */
56
- className?: string;
57
- /**
58
- * CSS classes to customize specific parts of the component
59
- */
60
- classNames?: {
61
- /**
62
- * Class for the progress indicator
63
- */
64
- indicator?: string;
65
- /**
66
- * Class for the label in the center of the circle
67
- */
68
- label?: string;
69
- /**
70
- * Class for the root element of the component
71
- */
72
- root?: string;
73
- /**
74
- * Class for the SVG element
75
- */
76
- svg?: string;
77
- /**
78
- * Class for the circle track
79
- */
80
- track?: string;
81
- };
71
+ label?: string;
82
72
  /**
83
- * Custom function to render content in the center of the circle
84
- * @param value - Current value of the component
85
- * @returns React element to display in the center of the circle
73
+ * Class for the root element of the component
86
74
  */
87
- customLabel?: ({ value }: {
88
- value: number;
89
- }) => JSX.Element;
75
+ root?: string;
90
76
  /**
91
- * Display the numeric value in the center of the circle
77
+ * Class for the SVG element
92
78
  */
93
- showValue?: boolean;
79
+ svg?: string;
94
80
  /**
95
- * Custom size in pixels
96
- * When provided, this value overrides the size variant option
81
+ * Class for the circle track
97
82
  */
98
- sizeInPixels?: number;
83
+ track?: string;
84
+ };
85
+ /**
86
+ * Custom function to render content in the center of the circle
87
+ * @param value - Current value of the component
88
+ * @returns React element to display in the center of the circle
89
+ */
90
+ customLabel?: ({
91
+ value
92
+ }: {
93
+ value: number;
94
+ }) => JSX.Element;
95
+ /**
96
+ * Display the numeric value in the center of the circle
97
+ */
98
+ showValue?: boolean;
99
+ /**
100
+ * Custom size in pixels
101
+ * When provided, this value overrides the size variant option
102
+ */
103
+ sizeInPixels?: number;
99
104
  }
100
- declare function ProgressCircle({ animate, animationDuration, className, classNames, customLabel, showValue, size, sizeInPixels, strokeWidth, thickness, value, variant, ...props }: ProgressCircleProps): JSX.Element;
105
+ declare function ProgressCircle({
106
+ animate,
107
+ animationDuration,
108
+ className,
109
+ classNames,
110
+ customLabel,
111
+ showValue,
112
+ size,
113
+ sizeInPixels,
114
+ strokeWidth,
115
+ thickness,
116
+ value,
117
+ variant,
118
+ ...props
119
+ }: ProgressCircleProps): JSX.Element;
101
120
  declare namespace ProgressCircle {
102
- var displayName: string;
121
+ var displayName: string;
103
122
  }
104
- export { progressCircleVariants };
105
- export { ProgressCircle };
106
- export type { ProgressCircleProps };
123
+ //#endregion
124
+ export { ProgressCircle, type ProgressCircleProps, progressCircleVariants };