@codefast/ui 0.3.9 → 0.3.11-canary.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (210) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/README.md +277 -167
  3. package/dist/components/accordion.cjs +97 -1
  4. package/dist/components/accordion.js +51 -1
  5. package/dist/components/alert-dialog.cjs +155 -1
  6. package/dist/components/alert-dialog.d.ts +2 -2
  7. package/dist/components/alert-dialog.js +94 -1
  8. package/dist/components/alert.cjs +84 -1
  9. package/dist/components/alert.d.ts +1 -1
  10. package/dist/components/alert.js +41 -1
  11. package/dist/components/aspect-ratio.cjs +43 -1
  12. package/dist/components/aspect-ratio.js +9 -1
  13. package/dist/components/avatar.cjs +65 -1
  14. package/dist/components/avatar.js +25 -1
  15. package/dist/components/badge.cjs +66 -1
  16. package/dist/components/badge.d.ts +1 -1
  17. package/dist/components/badge.js +29 -1
  18. package/dist/components/breadcrumb.cjs +124 -1
  19. package/dist/components/breadcrumb.js +72 -1
  20. package/dist/components/button-group.cjs +86 -1
  21. package/dist/components/button-group.d.ts +1 -1
  22. package/dist/components/button-group.js +43 -1
  23. package/dist/components/button.cjs +92 -1
  24. package/dist/components/button.d.ts +1 -1
  25. package/dist/components/button.js +55 -1
  26. package/dist/components/calendar.cjs +150 -1
  27. package/dist/components/calendar.d.ts +11 -18
  28. package/dist/components/calendar.js +113 -1
  29. package/dist/components/card.cjs +105 -1
  30. package/dist/components/card.js +53 -1
  31. package/dist/components/carousel.cjs +210 -1
  32. package/dist/components/carousel.d.ts +1 -1
  33. package/dist/components/carousel.js +151 -1
  34. package/dist/components/chart.cjs +250 -3
  35. package/dist/components/chart.d.ts +5 -4
  36. package/dist/components/chart.js +198 -3
  37. package/dist/components/checkbox-cards.cjs +69 -1
  38. package/dist/components/checkbox-cards.js +32 -1
  39. package/dist/components/checkbox-group.cjs +63 -1
  40. package/dist/components/checkbox-group.js +26 -1
  41. package/dist/components/checkbox.cjs +53 -1
  42. package/dist/components/checkbox.js +19 -1
  43. package/dist/components/collapsible.cjs +61 -1
  44. package/dist/components/collapsible.js +21 -1
  45. package/dist/components/command.cjs +167 -1
  46. package/dist/components/command.js +106 -1
  47. package/dist/components/context-menu.cjs +218 -1
  48. package/dist/components/context-menu.js +142 -1
  49. package/dist/components/dialog.cjs +164 -1
  50. package/dist/components/dialog.d.ts +2 -2
  51. package/dist/components/dialog.js +106 -1
  52. package/dist/components/drawer.cjs +143 -1
  53. package/dist/components/drawer.d.ts +1 -1
  54. package/dist/components/drawer.js +85 -1
  55. package/dist/components/dropdown-menu.cjs +221 -1
  56. package/dist/components/dropdown-menu.js +145 -1
  57. package/dist/components/empty.cjs +113 -1
  58. package/dist/components/empty.d.ts +1 -1
  59. package/dist/components/empty.js +61 -1
  60. package/dist/components/field.cjs +193 -1
  61. package/dist/components/field.d.ts +1 -1
  62. package/dist/components/field.js +129 -1
  63. package/dist/components/form.cjs +151 -1
  64. package/dist/components/form.d.ts +3 -3
  65. package/dist/components/form.js +96 -1
  66. package/dist/components/hover-card.cjs +77 -1
  67. package/dist/components/hover-card.js +34 -1
  68. package/dist/components/input-group.cjs +155 -1
  69. package/dist/components/input-group.d.ts +1 -1
  70. package/dist/components/input-group.js +97 -1
  71. package/dist/components/input-number.cjs +98 -1
  72. package/dist/components/input-number.js +64 -1
  73. package/dist/components/input-otp.cjs +101 -1
  74. package/dist/components/input-otp.js +49 -1
  75. package/dist/components/input-password.cjs +71 -1
  76. package/dist/components/input-password.js +37 -1
  77. package/dist/components/input-search.cjs +80 -1
  78. package/dist/components/input-search.js +46 -1
  79. package/dist/components/input.cjs +45 -1
  80. package/dist/components/input.js +11 -1
  81. package/dist/components/item.cjs +186 -1
  82. package/dist/components/item.d.ts +1 -1
  83. package/dist/components/item.js +119 -1
  84. package/dist/components/kbd.cjs +54 -1
  85. package/dist/components/kbd.js +17 -1
  86. package/dist/components/label.cjs +45 -1
  87. package/dist/components/label.js +11 -1
  88. package/dist/components/menubar.cjs +232 -1
  89. package/dist/components/menubar.js +153 -1
  90. package/dist/components/native-select.cjs +75 -1
  91. package/dist/components/native-select.js +35 -1
  92. package/dist/components/navigation-menu.cjs +146 -2
  93. package/dist/components/navigation-menu.js +94 -2
  94. package/dist/components/pagination.cjs +138 -1
  95. package/dist/components/pagination.d.ts +1 -1
  96. package/dist/components/pagination.js +86 -1
  97. package/dist/components/popover.cjs +86 -1
  98. package/dist/components/popover.js +40 -1
  99. package/dist/components/progress-circle.cjs +184 -1
  100. package/dist/components/progress-circle.d.ts +1 -1
  101. package/dist/components/progress-circle.js +147 -1
  102. package/dist/components/progress.cjs +52 -1
  103. package/dist/components/progress.js +18 -1
  104. package/dist/components/radio-cards.cjs +66 -1
  105. package/dist/components/radio-cards.js +29 -1
  106. package/dist/components/radio-group.cjs +59 -1
  107. package/dist/components/radio-group.js +22 -1
  108. package/dist/components/radio.cjs +47 -1
  109. package/dist/components/radio.js +13 -1
  110. package/dist/components/resizable.cjs +71 -1
  111. package/dist/components/resizable.d.ts +6 -6
  112. package/dist/components/resizable.js +31 -1
  113. package/dist/components/scroll-area.cjs +140 -1
  114. package/dist/components/scroll-area.d.ts +1 -1
  115. package/dist/components/scroll-area.js +100 -1
  116. package/dist/components/select.cjs +180 -1
  117. package/dist/components/select.d.ts +2 -2
  118. package/dist/components/select.js +119 -1
  119. package/dist/components/separator.cjs +82 -1
  120. package/dist/components/separator.d.ts +1 -1
  121. package/dist/components/separator.js +42 -1
  122. package/dist/components/sheet.cjs +184 -1
  123. package/dist/components/sheet.d.ts +2 -2
  124. package/dist/components/sheet.js +123 -1
  125. package/dist/components/sidebar.cjs +506 -1
  126. package/dist/components/sidebar.d.ts +1 -1
  127. package/dist/components/sidebar.js +400 -1
  128. package/dist/components/skeleton.cjs +44 -1
  129. package/dist/components/skeleton.js +10 -1
  130. package/dist/components/slider.cjs +79 -1
  131. package/dist/components/slider.js +45 -1
  132. package/dist/components/sonner.cjs +57 -1
  133. package/dist/components/sonner.js +17 -1
  134. package/dist/components/spinner.cjs +75 -1
  135. package/dist/components/spinner.js +41 -1
  136. package/dist/components/switch.cjs +49 -1
  137. package/dist/components/switch.js +15 -1
  138. package/dist/components/table.cjs +118 -1
  139. package/dist/components/table.js +63 -1
  140. package/dist/components/tabs.cjs +75 -1
  141. package/dist/components/tabs.d.ts +1 -1
  142. package/dist/components/tabs.js +32 -1
  143. package/dist/components/textarea.cjs +44 -1
  144. package/dist/components/textarea.js +10 -1
  145. package/dist/components/toggle-group.cjs +90 -1
  146. package/dist/components/toggle-group.d.ts +8 -10
  147. package/dist/components/toggle-group.js +53 -1
  148. package/dist/components/toggle.cjs +71 -1
  149. package/dist/components/toggle.d.ts +8 -10
  150. package/dist/components/toggle.js +34 -1
  151. package/dist/components/tooltip.cjs +90 -1
  152. package/dist/components/tooltip.js +44 -1
  153. package/dist/css/amber.css +95 -1
  154. package/dist/css/blue.css +95 -1
  155. package/dist/css/cyan.css +95 -1
  156. package/dist/css/emerald.css +95 -1
  157. package/dist/css/fuchsia.css +95 -1
  158. package/dist/css/gray.css +95 -1
  159. package/dist/css/green.css +95 -1
  160. package/dist/css/indigo.css +95 -1
  161. package/dist/css/lime.css +95 -1
  162. package/dist/css/neutral.css +95 -1
  163. package/dist/css/orange.css +95 -1
  164. package/dist/css/pink.css +95 -1
  165. package/dist/css/preset.css +118 -1
  166. package/dist/css/purple.css +95 -1
  167. package/dist/css/red.css +95 -1
  168. package/dist/css/rose.css +95 -1
  169. package/dist/css/sky.css +95 -1
  170. package/dist/css/slate.css +95 -1
  171. package/dist/css/stone.css +95 -1
  172. package/dist/css/style.css +3 -1
  173. package/dist/css/teal.css +95 -1
  174. package/dist/css/violet.css +95 -1
  175. package/dist/css/yellow.css +95 -1
  176. package/dist/css/zinc.css +95 -1
  177. package/dist/hooks/use-animated-value.cjs +74 -1
  178. package/dist/hooks/use-animated-value.d.ts +9 -10
  179. package/dist/hooks/use-animated-value.js +40 -1
  180. package/dist/hooks/use-copy-to-clipboard.cjs +57 -1
  181. package/dist/hooks/use-copy-to-clipboard.d.ts +17 -0
  182. package/dist/hooks/use-copy-to-clipboard.js +23 -1
  183. package/dist/hooks/use-is-mobile.cjs +39 -1
  184. package/dist/hooks/use-is-mobile.d.ts +15 -6
  185. package/dist/hooks/use-is-mobile.js +5 -1
  186. package/dist/hooks/use-media-query.cjs +56 -1
  187. package/dist/hooks/use-media-query.d.ts +11 -3
  188. package/dist/hooks/use-media-query.js +22 -1
  189. package/dist/hooks/use-mutation-observer.cjs +56 -1
  190. package/dist/hooks/use-mutation-observer.d.ts +7 -11
  191. package/dist/hooks/use-mutation-observer.js +22 -1
  192. package/dist/hooks/use-pagination.cjs +92 -1
  193. package/dist/hooks/use-pagination.d.ts +12 -10
  194. package/dist/hooks/use-pagination.js +55 -1
  195. package/dist/index.cjs +1081 -1
  196. package/dist/index.d.ts +4 -5
  197. package/dist/index.js +69 -1
  198. package/dist/primitives/checkbox-group.cjs +151 -1
  199. package/dist/primitives/checkbox-group.d.ts +1 -1
  200. package/dist/primitives/checkbox-group.js +99 -1
  201. package/dist/primitives/input-number.cjs +439 -1
  202. package/dist/primitives/input-number.d.ts +1 -1
  203. package/dist/primitives/input-number.js +381 -1
  204. package/dist/primitives/input.cjs +99 -1
  205. package/dist/primitives/input.d.ts +1 -1
  206. package/dist/primitives/input.js +53 -1
  207. package/dist/primitives/progress-circle.cjs +198 -1
  208. package/dist/primitives/progress-circle.d.ts +1 -1
  209. package/dist/primitives/progress-circle.js +128 -1
  210. package/package.json +405 -62
@@ -1 +1,138 @@
1
- "use strict";const __rslib_import_meta_url__="undefined"==typeof document?new(require("url".replace("",""))).URL("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("main.js",document.baseURI).href;var __webpack_require__={};__webpack_require__.d=(e,a)=>{for(var n in a)__webpack_require__.o(a,n)&&!__webpack_require__.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:a[n]})},__webpack_require__.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={};__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{PaginationPrevious:()=>PaginationPrevious,Pagination:()=>Pagination,PaginationLink:()=>PaginationLink,PaginationItem:()=>PaginationItem,PaginationNext:()=>PaginationNext,PaginationContent:()=>PaginationContent,PaginationEllipsis:()=>PaginationEllipsis});const jsx_runtime_namespaceObject=require("react/jsx-runtime"),external_lucide_react_namespaceObject=require("lucide-react"),external_button_cjs_namespaceObject=require("./button.cjs"),tailwind_variants_namespaceObject=require("@codefast/tailwind-variants");function Pagination({className:e,...a}){return(0,jsx_runtime_namespaceObject.jsx)("nav",{"aria-label":"pagination",className:(0,tailwind_variants_namespaceObject.cn)("mx-auto flex w-full justify-center",e),"data-slot":"pagination",...a})}function PaginationContent({className:e,...a}){return(0,jsx_runtime_namespaceObject.jsx)("ul",{className:(0,tailwind_variants_namespaceObject.cn)("flex flex-row items-center gap-1",e),"data-slot":"pagination-content",...a})}function PaginationItem(e){return(0,jsx_runtime_namespaceObject.jsx)("li",{"data-slot":"pagination-item",...e})}function PaginationLink({children:e,className:a,isActive:n,size:t="icon",...i}){return(0,jsx_runtime_namespaceObject.jsx)("a",{"aria-current":n?"page":void 0,className:(0,external_button_cjs_namespaceObject.buttonVariants)({className:a,size:t,variant:n?"outline":"ghost"}),"data-slot":"pagination-link",...i,children:e})}function PaginationPrevious({...e}){return(0,jsx_runtime_namespaceObject.jsxs)(PaginationLink,{"aria-label":"Go to previous page","data-slot":"pagination-previous",size:"md",...e,children:[(0,jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.ChevronLeftIcon,{className:"size-4"}),(0,jsx_runtime_namespaceObject.jsx)("span",{children:"Previous"})]})}function PaginationNext({...e}){return(0,jsx_runtime_namespaceObject.jsxs)(PaginationLink,{"aria-label":"Go to next page","data-slot":"pagination-next",size:"md",...e,children:[(0,jsx_runtime_namespaceObject.jsx)("span",{children:"Next"}),(0,jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.ChevronRightIcon,{})]})}function PaginationEllipsis({className:e,...a}){return(0,jsx_runtime_namespaceObject.jsxs)("span",{"aria-hidden":!0,className:(0,tailwind_variants_namespaceObject.cn)("flex size-10 items-center justify-center",e),"data-slot":"pagination-ellipsis",...a,children:[(0,jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.EllipsisIcon,{className:"size-4"}),(0,jsx_runtime_namespaceObject.jsx)("span",{className:"sr-only",children:"More pages"})]})}for(var __webpack_i__ in exports.Pagination=__webpack_exports__.Pagination,exports.PaginationContent=__webpack_exports__.PaginationContent,exports.PaginationEllipsis=__webpack_exports__.PaginationEllipsis,exports.PaginationItem=__webpack_exports__.PaginationItem,exports.PaginationLink=__webpack_exports__.PaginationLink,exports.PaginationNext=__webpack_exports__.PaginationNext,exports.PaginationPrevious=__webpack_exports__.PaginationPrevious,__webpack_exports__)-1===["Pagination","PaginationContent","PaginationEllipsis","PaginationItem","PaginationLink","PaginationNext","PaginationPrevious"].indexOf(__webpack_i__)&&(exports[__webpack_i__]=__webpack_exports__[__webpack_i__]);Object.defineProperty(exports,"__esModule",{value:!0});
1
+ "use strict";
2
+ var __webpack_require__ = {};
3
+ (()=>{
4
+ __webpack_require__.d = (exports1, definition)=>{
5
+ for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
6
+ enumerable: true,
7
+ get: definition[key]
8
+ });
9
+ };
10
+ })();
11
+ (()=>{
12
+ __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
13
+ })();
14
+ (()=>{
15
+ __webpack_require__.r = (exports1)=>{
16
+ if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
17
+ value: 'Module'
18
+ });
19
+ Object.defineProperty(exports1, '__esModule', {
20
+ value: true
21
+ });
22
+ };
23
+ })();
24
+ var __webpack_exports__ = {};
25
+ __webpack_require__.r(__webpack_exports__);
26
+ __webpack_require__.d(__webpack_exports__, {
27
+ PaginationPrevious: ()=>PaginationPrevious,
28
+ Pagination: ()=>Pagination,
29
+ PaginationLink: ()=>PaginationLink,
30
+ PaginationItem: ()=>PaginationItem,
31
+ PaginationNext: ()=>PaginationNext,
32
+ PaginationContent: ()=>PaginationContent,
33
+ PaginationEllipsis: ()=>PaginationEllipsis
34
+ });
35
+ const jsx_runtime_namespaceObject = require("react/jsx-runtime");
36
+ const tailwind_variants_namespaceObject = require("@codefast/tailwind-variants");
37
+ const external_lucide_react_namespaceObject = require("lucide-react");
38
+ const external_button_cjs_namespaceObject = require("./button.cjs");
39
+ function Pagination({ className, ...props }) {
40
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("nav", {
41
+ "aria-label": "pagination",
42
+ className: (0, tailwind_variants_namespaceObject.cn)("mx-auto flex w-full justify-center", className),
43
+ "data-slot": "pagination",
44
+ ...props
45
+ });
46
+ }
47
+ function PaginationContent({ className, ...props }) {
48
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("ul", {
49
+ className: (0, tailwind_variants_namespaceObject.cn)("flex flex-row items-center gap-1", className),
50
+ "data-slot": "pagination-content",
51
+ ...props
52
+ });
53
+ }
54
+ function PaginationItem(props) {
55
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("li", {
56
+ "data-slot": "pagination-item",
57
+ ...props
58
+ });
59
+ }
60
+ function PaginationLink({ children, className, isActive, size = "icon", ...props }) {
61
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("a", {
62
+ "aria-current": isActive ? "page" : void 0,
63
+ className: (0, external_button_cjs_namespaceObject.buttonVariants)({
64
+ className,
65
+ size,
66
+ variant: isActive ? "outline" : "ghost"
67
+ }),
68
+ "data-slot": "pagination-link",
69
+ ...props,
70
+ children: children
71
+ });
72
+ }
73
+ function PaginationPrevious({ ...props }) {
74
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(PaginationLink, {
75
+ "aria-label": "Go to previous page",
76
+ "data-slot": "pagination-previous",
77
+ size: "md",
78
+ ...props,
79
+ children: [
80
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.ChevronLeftIcon, {
81
+ className: "size-4"
82
+ }),
83
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
84
+ children: "Previous"
85
+ })
86
+ ]
87
+ });
88
+ }
89
+ function PaginationNext({ ...props }) {
90
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(PaginationLink, {
91
+ "aria-label": "Go to next page",
92
+ "data-slot": "pagination-next",
93
+ size: "md",
94
+ ...props,
95
+ children: [
96
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
97
+ children: "Next"
98
+ }),
99
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.ChevronRightIcon, {})
100
+ ]
101
+ });
102
+ }
103
+ function PaginationEllipsis({ className, ...props }) {
104
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("span", {
105
+ "aria-hidden": true,
106
+ className: (0, tailwind_variants_namespaceObject.cn)("flex size-10 items-center justify-center", className),
107
+ "data-slot": "pagination-ellipsis",
108
+ ...props,
109
+ children: [
110
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.EllipsisIcon, {
111
+ className: "size-4"
112
+ }),
113
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
114
+ className: "sr-only",
115
+ children: "More pages"
116
+ })
117
+ ]
118
+ });
119
+ }
120
+ exports.Pagination = __webpack_exports__.Pagination;
121
+ exports.PaginationContent = __webpack_exports__.PaginationContent;
122
+ exports.PaginationEllipsis = __webpack_exports__.PaginationEllipsis;
123
+ exports.PaginationItem = __webpack_exports__.PaginationItem;
124
+ exports.PaginationLink = __webpack_exports__.PaginationLink;
125
+ exports.PaginationNext = __webpack_exports__.PaginationNext;
126
+ exports.PaginationPrevious = __webpack_exports__.PaginationPrevious;
127
+ for(var __rspack_i in __webpack_exports__)if (-1 === [
128
+ "Pagination",
129
+ "PaginationContent",
130
+ "PaginationEllipsis",
131
+ "PaginationItem",
132
+ "PaginationLink",
133
+ "PaginationNext",
134
+ "PaginationPrevious"
135
+ ].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
136
+ Object.defineProperty(exports, '__esModule', {
137
+ value: true
138
+ });
@@ -1,5 +1,5 @@
1
- import type { ComponentProps, JSX } from "react";
2
1
  import type { VariantProps } from "@codefast/tailwind-variants";
2
+ import type { ComponentProps, JSX } from "react";
3
3
  import { buttonVariants } from "./button";
4
4
  type PaginationProps = ComponentProps<"nav">;
5
5
  declare function Pagination({ className, ...props }: PaginationProps): JSX.Element;
@@ -1 +1,86 @@
1
- import{jsx as a,jsxs as n}from"react/jsx-runtime";import{ChevronLeftIcon as i,ChevronRightIcon as t,EllipsisIcon as e}from"lucide-react";import{buttonVariants as o}from"./button.js";import{cn as r}from"@codefast/tailwind-variants";function s({className:n,...i}){return a("nav",{"aria-label":"pagination",className:r("mx-auto flex w-full justify-center",n),"data-slot":"pagination",...i})}function l({className:n,...i}){return a("ul",{className:r("flex flex-row items-center gap-1",n),"data-slot":"pagination-content",...i})}function c(n){return a("li",{"data-slot":"pagination-item",...n})}function u({children:n,className:i,isActive:t,size:e="icon",...r}){return a("a",{"aria-current":t?"page":void 0,className:o({className:i,size:e,variant:t?"outline":"ghost"}),"data-slot":"pagination-link",...r,children:n})}function p({...t}){return n(u,{"aria-label":"Go to previous page","data-slot":"pagination-previous",size:"md",...t,children:[a(i,{className:"size-4"}),a("span",{children:"Previous"})]})}function m({...i}){return n(u,{"aria-label":"Go to next page","data-slot":"pagination-next",size:"md",...i,children:[a("span",{children:"Next"}),a(t,{})]})}function d({className:i,...t}){return n("span",{"aria-hidden":!0,className:r("flex size-10 items-center justify-center",i),"data-slot":"pagination-ellipsis",...t,children:[a(e,{className:"size-4"}),a("span",{className:"sr-only",children:"More pages"})]})}export{s as Pagination,l as PaginationContent,d as PaginationEllipsis,c as PaginationItem,u as PaginationLink,m as PaginationNext,p as PaginationPrevious};
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { cn } from "@codefast/tailwind-variants";
3
+ import { ChevronLeftIcon, ChevronRightIcon, EllipsisIcon } from "lucide-react";
4
+ import { buttonVariants } from "./button.js";
5
+ 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
+ });
12
+ }
13
+ 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
+ });
19
+ }
20
+ function PaginationItem(props) {
21
+ return /*#__PURE__*/ jsx("li", {
22
+ "data-slot": "pagination-item",
23
+ ...props
24
+ });
25
+ }
26
+ 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
+ });
38
+ }
39
+ 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
+ });
54
+ }
55
+ 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
+ });
68
+ }
69
+ 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
+ });
85
+ }
86
+ export { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious };
@@ -1,2 +1,87 @@
1
+ "use strict";
1
2
  "use client";
2
- "use strict";const __rslib_import_meta_url__="undefined"==typeof document?new(require("url".replace("",""))).URL("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("main.js",document.baseURI).href;var __webpack_require__={};__webpack_require__.d=(e,o)=>{for(var t in o)__webpack_require__.o(o,t)&&!__webpack_require__.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:o[t]})},__webpack_require__.o=(e,o)=>Object.prototype.hasOwnProperty.call(e,o),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={};__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{PopoverAnchor:()=>PopoverAnchor,PopoverArrow:()=>PopoverArrow,PopoverContent:()=>PopoverContent,Popover:()=>Popover,PopoverTrigger:()=>PopoverTrigger});const jsx_runtime_namespaceObject=require("react/jsx-runtime"),tailwind_variants_namespaceObject=require("@codefast/tailwind-variants"),react_popover_namespaceObject=require("@radix-ui/react-popover");function Popover({...e}){return(0,jsx_runtime_namespaceObject.jsx)(react_popover_namespaceObject.Root,{"data-slot":"popover",...e})}function PopoverTrigger({...e}){return(0,jsx_runtime_namespaceObject.jsx)(react_popover_namespaceObject.Trigger,{"data-slot":"popover-trigger",...e})}function PopoverAnchor({...e}){return(0,jsx_runtime_namespaceObject.jsx)(react_popover_namespaceObject.Anchor,{"data-slot":"popover-anchor",...e})}function PopoverContent({align:e="center",className:o,sideOffset:t=4,...r}){return(0,jsx_runtime_namespaceObject.jsx)(react_popover_namespaceObject.Portal,{children:(0,jsx_runtime_namespaceObject.jsx)(react_popover_namespaceObject.Content,{align:e,className:(0,tailwind_variants_namespaceObject.cn)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 ease-ui z-50 min-w-32 rounded-lg border p-4 shadow-lg outline-hidden",o),"data-slot":"popover-content",sideOffset:t,...r})})}function PopoverArrow({className:e,...o}){return(0,jsx_runtime_namespaceObject.jsx)(react_popover_namespaceObject.Arrow,{className:(0,tailwind_variants_namespaceObject.cn)("fill-popover",e),"data-slot":"popover-arrow",...o})}for(var __webpack_i__ in exports.Popover=__webpack_exports__.Popover,exports.PopoverAnchor=__webpack_exports__.PopoverAnchor,exports.PopoverArrow=__webpack_exports__.PopoverArrow,exports.PopoverContent=__webpack_exports__.PopoverContent,exports.PopoverTrigger=__webpack_exports__.PopoverTrigger,__webpack_exports__)-1===["Popover","PopoverAnchor","PopoverArrow","PopoverContent","PopoverTrigger"].indexOf(__webpack_i__)&&(exports[__webpack_i__]=__webpack_exports__[__webpack_i__]);Object.defineProperty(exports,"__esModule",{value:!0});
3
+ var __webpack_require__ = {};
4
+ (()=>{
5
+ __webpack_require__.d = (exports1, definition)=>{
6
+ for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
7
+ enumerable: true,
8
+ get: definition[key]
9
+ });
10
+ };
11
+ })();
12
+ (()=>{
13
+ __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
14
+ })();
15
+ (()=>{
16
+ __webpack_require__.r = (exports1)=>{
17
+ if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
18
+ value: 'Module'
19
+ });
20
+ Object.defineProperty(exports1, '__esModule', {
21
+ value: true
22
+ });
23
+ };
24
+ })();
25
+ var __webpack_exports__ = {};
26
+ __webpack_require__.r(__webpack_exports__);
27
+ __webpack_require__.d(__webpack_exports__, {
28
+ PopoverAnchor: ()=>PopoverAnchor,
29
+ PopoverArrow: ()=>PopoverArrow,
30
+ PopoverContent: ()=>PopoverContent,
31
+ Popover: ()=>Popover,
32
+ PopoverTrigger: ()=>PopoverTrigger
33
+ });
34
+ const jsx_runtime_namespaceObject = require("react/jsx-runtime");
35
+ const tailwind_variants_namespaceObject = require("@codefast/tailwind-variants");
36
+ const react_popover_namespaceObject = require("@radix-ui/react-popover");
37
+ function Popover({ ...props }) {
38
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_popover_namespaceObject.Root, {
39
+ "data-slot": "popover",
40
+ ...props
41
+ });
42
+ }
43
+ function PopoverTrigger({ ...props }) {
44
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_popover_namespaceObject.Trigger, {
45
+ "data-slot": "popover-trigger",
46
+ ...props
47
+ });
48
+ }
49
+ function PopoverAnchor({ ...props }) {
50
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_popover_namespaceObject.Anchor, {
51
+ "data-slot": "popover-anchor",
52
+ ...props
53
+ });
54
+ }
55
+ function PopoverContent({ align = "center", className, sideOffset = 4, ...props }) {
56
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_popover_namespaceObject.Portal, {
57
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_popover_namespaceObject.Content, {
58
+ align: align,
59
+ className: (0, tailwind_variants_namespaceObject.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),
60
+ "data-slot": "popover-content",
61
+ sideOffset: sideOffset,
62
+ ...props
63
+ })
64
+ });
65
+ }
66
+ function PopoverArrow({ className, ...props }) {
67
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_popover_namespaceObject.Arrow, {
68
+ className: (0, tailwind_variants_namespaceObject.cn)("fill-popover", className),
69
+ "data-slot": "popover-arrow",
70
+ ...props
71
+ });
72
+ }
73
+ exports.Popover = __webpack_exports__.Popover;
74
+ exports.PopoverAnchor = __webpack_exports__.PopoverAnchor;
75
+ exports.PopoverArrow = __webpack_exports__.PopoverArrow;
76
+ exports.PopoverContent = __webpack_exports__.PopoverContent;
77
+ exports.PopoverTrigger = __webpack_exports__.PopoverTrigger;
78
+ for(var __rspack_i in __webpack_exports__)if (-1 === [
79
+ "Popover",
80
+ "PopoverAnchor",
81
+ "PopoverArrow",
82
+ "PopoverContent",
83
+ "PopoverTrigger"
84
+ ].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
85
+ Object.defineProperty(exports, '__esModule', {
86
+ value: true
87
+ });
@@ -1,2 +1,41 @@
1
1
  "use client";
2
- import{jsx as t}from"react/jsx-runtime";import{cn as o}from"@codefast/tailwind-variants";import{Anchor as e,Arrow as a,Content as d,Portal as r,Root as i,Trigger as s}from"@radix-ui/react-popover";function n({...o}){return t(i,{"data-slot":"popover",...o})}function p({...o}){return t(s,{"data-slot":"popover-trigger",...o})}function l({...o}){return t(e,{"data-slot":"popover-anchor",...o})}function f({align:e="center",className:a,sideOffset:i=4,...s}){return t(r,{children:t(d,{align:e,className:o("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 ease-ui z-50 min-w-32 rounded-lg border p-4 shadow-lg outline-hidden",a),"data-slot":"popover-content",sideOffset:i,...s})})}function u({className:e,...d}){return t(a,{className:o("fill-popover",e),"data-slot":"popover-arrow",...d})}export{n as Popover,l as PopoverAnchor,u as PopoverArrow,f as PopoverContent,p as PopoverTrigger};
2
+ import { jsx } from "react/jsx-runtime";
3
+ import { cn } from "@codefast/tailwind-variants";
4
+ import { Anchor, Arrow, Content, Portal, Root, Trigger } from "@radix-ui/react-popover";
5
+ function Popover({ ...props }) {
6
+ return /*#__PURE__*/ jsx(Root, {
7
+ "data-slot": "popover",
8
+ ...props
9
+ });
10
+ }
11
+ function PopoverTrigger({ ...props }) {
12
+ return /*#__PURE__*/ jsx(Trigger, {
13
+ "data-slot": "popover-trigger",
14
+ ...props
15
+ });
16
+ }
17
+ function PopoverAnchor({ ...props }) {
18
+ return /*#__PURE__*/ jsx(Anchor, {
19
+ "data-slot": "popover-anchor",
20
+ ...props
21
+ });
22
+ }
23
+ 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
+ });
33
+ }
34
+ function PopoverArrow({ className, ...props }) {
35
+ return /*#__PURE__*/ jsx(Arrow, {
36
+ className: cn("fill-popover", className),
37
+ "data-slot": "popover-arrow",
38
+ ...props
39
+ });
40
+ }
41
+ export { Popover, PopoverAnchor, PopoverArrow, PopoverContent, PopoverTrigger };
@@ -1,2 +1,185 @@
1
+ "use strict";
1
2
  "use client";
2
- "use strict";const __rslib_import_meta_url__="undefined"==typeof document?new(require("url".replace("",""))).URL("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("main.js",document.baseURI).href;var __webpack_require__={};__webpack_require__.d=(e,r)=>{for(var a in r)__webpack_require__.o(r,a)&&!__webpack_require__.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:r[a]})},__webpack_require__.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={};__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{ProgressCircle:()=>ProgressCircle,progressCircleVariants:()=>progressCircleVariants});const jsx_runtime_namespaceObject=require("react/jsx-runtime"),external_react_namespaceObject=require("react"),use_animated_value_cjs_namespaceObject=require("../hooks/use-animated-value.cjs"),progress_circle_cjs_namespaceObject=require("../primitives/progress-circle.cjs"),tailwind_variants_namespaceObject=require("@codefast/tailwind-variants"),progressCircleVariants=(0,tailwind_variants_namespaceObject.tv)({defaultVariants:{size:"md",thickness:"regular",variant:"default"},slots:{indicator:"origin-center",label:"absolute inset-0 flex items-center justify-center text-xs font-medium",root:"relative inline-flex items-center justify-center",svg:"size-full",track:"origin-center"},variants:{size:{sm:{label:"text-[10px]"},md:{label:"text-xs"},lg:{label:"text-sm"},xl:{label:"text-base"},"2xl":{label:"text-lg"}},thickness:{regular:{},thick:{},thin:{}},variant:{default:{indicator:"text-primary",track:"text-primary/20"},destructive:{indicator:"text-destructive",track:"text-destructive/20"}}}});function ProgressCircle({animate:e=!0,animationDuration:r=1e3,className:a,classNames:t,customLabel:s,showValue:c=!1,size:_,sizeInPixels:i,strokeWidth:n,thickness:l="regular",value:o=0,variant:p="default",...m}){let u=(0,use_animated_value_cjs_namespaceObject.useAnimatedValue)(o,r,e),b=(0,external_react_namespaceObject.useMemo)(()=>i??getActualSize(_),[i,_]),j=(0,external_react_namespaceObject.useMemo)(()=>n??getStrokeWidth(l,b),[n,l,b]),x=(0,external_react_namespaceObject.useMemo)(()=>progressCircleVariants({size:_,thickness:l,variant:p}),[p,_,l]),d=c||!!s,g=(0,external_react_namespaceObject.useCallback)(()=>s?s({value:u}):`${u.toString()}%`,[s,u]);return(0,jsx_runtime_namespaceObject.jsx)(progress_circle_cjs_namespaceObject.Provider,{size:b,strokeWidth:j,value:o,...m,children:(0,jsx_runtime_namespaceObject.jsxs)(progress_circle_cjs_namespaceObject.Root,{className:x.root({className:[a,t?.root]}),children:[(0,jsx_runtime_namespaceObject.jsxs)(progress_circle_cjs_namespaceObject.SVG,{className:x.svg({className:t?.svg}),children:[(0,jsx_runtime_namespaceObject.jsx)(progress_circle_cjs_namespaceObject.Track,{className:x.track({className:t?.track})}),(0,jsx_runtime_namespaceObject.jsx)(progress_circle_cjs_namespaceObject.Indicator,{className:x.indicator({className:t?.indicator}),style:{transitionDuration:`${r.toString()}ms`,transitionProperty:"stroke-dashoffset"}})]}),d?(0,jsx_runtime_namespaceObject.jsx)(progress_circle_cjs_namespaceObject.Value,{className:x.label({className:t?.label}),children:g()}):null]})})}ProgressCircle.displayName="ProgressCircle";const getActualSize=e=>e?({"2xl":128,lg:64,md:48,sm:32,xl:96})[e]:48,getStrokeWidth=(e,r)=>e?({regular:Math.max(3,.05*r),thick:Math.max(4,.075*r),thin:Math.max(2,.025*r)})[e]:Math.max(3,.05*r);for(var __webpack_i__ in exports.ProgressCircle=__webpack_exports__.ProgressCircle,exports.progressCircleVariants=__webpack_exports__.progressCircleVariants,__webpack_exports__)-1===["ProgressCircle","progressCircleVariants"].indexOf(__webpack_i__)&&(exports[__webpack_i__]=__webpack_exports__[__webpack_i__]);Object.defineProperty(exports,"__esModule",{value:!0});
3
+ var __webpack_require__ = {};
4
+ (()=>{
5
+ __webpack_require__.d = (exports1, definition)=>{
6
+ for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
7
+ enumerable: true,
8
+ get: definition[key]
9
+ });
10
+ };
11
+ })();
12
+ (()=>{
13
+ __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
14
+ })();
15
+ (()=>{
16
+ __webpack_require__.r = (exports1)=>{
17
+ if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
18
+ value: 'Module'
19
+ });
20
+ Object.defineProperty(exports1, '__esModule', {
21
+ value: true
22
+ });
23
+ };
24
+ })();
25
+ var __webpack_exports__ = {};
26
+ __webpack_require__.r(__webpack_exports__);
27
+ __webpack_require__.d(__webpack_exports__, {
28
+ ProgressCircle: ()=>ProgressCircle,
29
+ progressCircleVariants: ()=>progressCircleVariants
30
+ });
31
+ const jsx_runtime_namespaceObject = require("react/jsx-runtime");
32
+ const tailwind_variants_namespaceObject = require("@codefast/tailwind-variants");
33
+ const external_react_namespaceObject = require("react");
34
+ const use_animated_value_cjs_namespaceObject = require("../hooks/use-animated-value.cjs");
35
+ const progress_circle_cjs_namespaceObject = require("../primitives/progress-circle.cjs");
36
+ const progressCircleVariants = (0, tailwind_variants_namespaceObject.tv)({
37
+ defaultVariants: {
38
+ size: "md",
39
+ thickness: "regular",
40
+ variant: "default"
41
+ },
42
+ slots: {
43
+ indicator: "origin-center",
44
+ label: "absolute inset-0 flex items-center justify-center text-xs font-medium",
45
+ root: "relative inline-flex items-center justify-center",
46
+ svg: "size-full",
47
+ track: "origin-center"
48
+ },
49
+ variants: {
50
+ size: {
51
+ sm: {
52
+ label: "text-[0.625rem]"
53
+ },
54
+ md: {
55
+ label: "text-xs"
56
+ },
57
+ lg: {
58
+ label: "text-sm"
59
+ },
60
+ xl: {
61
+ label: "text-base"
62
+ },
63
+ "2xl": {
64
+ label: "text-lg"
65
+ }
66
+ },
67
+ thickness: {
68
+ regular: {},
69
+ thick: {},
70
+ thin: {}
71
+ },
72
+ variant: {
73
+ default: {
74
+ indicator: "text-primary",
75
+ track: "text-primary/20"
76
+ },
77
+ destructive: {
78
+ indicator: "text-destructive",
79
+ track: "text-destructive/20"
80
+ }
81
+ }
82
+ }
83
+ });
84
+ function ProgressCircle({ animate = true, animationDuration = 1000, className, classNames, customLabel, showValue = false, size, sizeInPixels, strokeWidth, thickness = "regular", value = 0, variant = "default", ...props }) {
85
+ const displayValue = (0, use_animated_value_cjs_namespaceObject.useAnimatedValue)(value, animationDuration, animate);
86
+ const actualSize = (0, external_react_namespaceObject.useMemo)(()=>sizeInPixels ?? getActualSize(size), [
87
+ sizeInPixels,
88
+ size
89
+ ]);
90
+ const actualThickness = (0, external_react_namespaceObject.useMemo)(()=>strokeWidth ?? getStrokeWidth(thickness, actualSize), [
91
+ strokeWidth,
92
+ thickness,
93
+ actualSize
94
+ ]);
95
+ const slots = (0, external_react_namespaceObject.useMemo)(()=>progressCircleVariants({
96
+ size,
97
+ thickness,
98
+ variant
99
+ }), [
100
+ variant,
101
+ size,
102
+ thickness
103
+ ]);
104
+ const shouldShowLabel = showValue || Boolean(customLabel);
105
+ const renderLabel = (0, external_react_namespaceObject.useCallback)(()=>{
106
+ if (customLabel) return customLabel({
107
+ value: displayValue
108
+ });
109
+ return `${displayValue.toString()}%`;
110
+ }, [
111
+ customLabel,
112
+ displayValue
113
+ ]);
114
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(progress_circle_cjs_namespaceObject.Provider, {
115
+ size: actualSize,
116
+ strokeWidth: actualThickness,
117
+ value: value,
118
+ ...props,
119
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(progress_circle_cjs_namespaceObject.Root, {
120
+ className: slots.root({
121
+ className: [
122
+ className,
123
+ classNames?.root
124
+ ]
125
+ }),
126
+ children: [
127
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(progress_circle_cjs_namespaceObject.SVG, {
128
+ className: slots.svg({
129
+ className: classNames?.svg
130
+ }),
131
+ children: [
132
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(progress_circle_cjs_namespaceObject.Track, {
133
+ className: slots.track({
134
+ className: classNames?.track
135
+ })
136
+ }),
137
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(progress_circle_cjs_namespaceObject.Indicator, {
138
+ className: slots.indicator({
139
+ className: classNames?.indicator
140
+ }),
141
+ style: {
142
+ transitionDuration: `${animationDuration.toString()}ms`,
143
+ transitionProperty: "stroke-dashoffset"
144
+ }
145
+ })
146
+ ]
147
+ }),
148
+ shouldShowLabel ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(progress_circle_cjs_namespaceObject.Value, {
149
+ className: slots.label({
150
+ className: classNames?.label
151
+ }),
152
+ children: renderLabel()
153
+ }) : null
154
+ ]
155
+ })
156
+ });
157
+ }
158
+ ProgressCircle.displayName = "ProgressCircle";
159
+ const getActualSize = (size)=>{
160
+ const sizeMap = {
161
+ "2xl": 128,
162
+ lg: 64,
163
+ md: 48,
164
+ sm: 32,
165
+ xl: 96
166
+ };
167
+ return size ? sizeMap[size] : 48;
168
+ };
169
+ const getStrokeWidth = (thickness, size)=>{
170
+ const thicknessMap = {
171
+ regular: Math.max(3, 0.05 * size),
172
+ thick: Math.max(4, 0.075 * size),
173
+ thin: Math.max(2, 0.025 * size)
174
+ };
175
+ return thickness ? thicknessMap[thickness] : Math.max(3, 0.05 * size);
176
+ };
177
+ exports.ProgressCircle = __webpack_exports__.ProgressCircle;
178
+ exports.progressCircleVariants = __webpack_exports__.progressCircleVariants;
179
+ for(var __rspack_i in __webpack_exports__)if (-1 === [
180
+ "ProgressCircle",
181
+ "progressCircleVariants"
182
+ ].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
183
+ Object.defineProperty(exports, '__esModule', {
184
+ value: true
185
+ });
@@ -1,5 +1,5 @@
1
- import type { ComponentProps, JSX } from "react";
2
1
  import type { VariantProps } from "@codefast/tailwind-variants";
2
+ import type { ComponentProps, JSX } from "react";
3
3
  import * as ProgressCirclePrimitive from "../primitives/progress-circle";
4
4
  declare const progressCircleVariants: import("@codefast/tailwind-variants").VariantFunctionType<{
5
5
  size: {