@greatapps/common 1.0.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 (205) hide show
  1. package/dist/components/handlers/SearchParamsHandler.mjs +23 -0
  2. package/dist/components/handlers/SearchParamsHandler.mjs.map +1 -0
  3. package/dist/components/layouts/MainLayout.mjs +60 -0
  4. package/dist/components/layouts/MainLayout.mjs.map +1 -0
  5. package/dist/components/layouts/MdSideBarNavigation.mjs +36 -0
  6. package/dist/components/layouts/MdSideBarNavigation.mjs.map +1 -0
  7. package/dist/components/layouts/NavBar.mjs +45 -0
  8. package/dist/components/layouts/NavBar.mjs.map +1 -0
  9. package/dist/components/layouts/NotificationItem.mjs +7 -0
  10. package/dist/components/layouts/NotificationItem.mjs.map +1 -0
  11. package/dist/components/layouts/SideBarNavigation.mjs +22 -0
  12. package/dist/components/layouts/SideBarNavigation.mjs.map +1 -0
  13. package/dist/components/ui/buttons/Button.mjs +51 -0
  14. package/dist/components/ui/buttons/Button.mjs.map +1 -0
  15. package/dist/components/ui/buttons/CancelButton.mjs +16 -0
  16. package/dist/components/ui/buttons/CancelButton.mjs.map +1 -0
  17. package/dist/components/ui/buttons/CopyButton.mjs +34 -0
  18. package/dist/components/ui/buttons/CopyButton.mjs.map +1 -0
  19. package/dist/components/ui/data-display/Accordion.mjs +73 -0
  20. package/dist/components/ui/data-display/Accordion.mjs.map +1 -0
  21. package/dist/components/ui/data-display/Badge.mjs +41 -0
  22. package/dist/components/ui/data-display/Badge.mjs.map +1 -0
  23. package/dist/components/ui/data-display/Card.mjs +91 -0
  24. package/dist/components/ui/data-display/Card.mjs.map +1 -0
  25. package/dist/components/ui/data-display/Pagination.mjs +115 -0
  26. package/dist/components/ui/data-display/Pagination.mjs.map +1 -0
  27. package/dist/components/ui/data-display/ScrollArea.mjs +60 -0
  28. package/dist/components/ui/data-display/ScrollArea.mjs.map +1 -0
  29. package/dist/components/ui/data-display/Separator.mjs +28 -0
  30. package/dist/components/ui/data-display/Separator.mjs.map +1 -0
  31. package/dist/components/ui/data-display/Table.mjs +116 -0
  32. package/dist/components/ui/data-display/Table.mjs.map +1 -0
  33. package/dist/components/ui/data-display/Tabs.mjs +69 -0
  34. package/dist/components/ui/data-display/Tabs.mjs.map +1 -0
  35. package/dist/components/ui/feedback/CircularProgress.mjs +61 -0
  36. package/dist/components/ui/feedback/CircularProgress.mjs.map +1 -0
  37. package/dist/components/ui/feedback/DefaultCircularProgress.mjs +49 -0
  38. package/dist/components/ui/feedback/DefaultCircularProgress.mjs.map +1 -0
  39. package/dist/components/ui/feedback/Progress.mjs +37 -0
  40. package/dist/components/ui/feedback/Progress.mjs.map +1 -0
  41. package/dist/components/ui/feedback/Toast.mjs +73 -0
  42. package/dist/components/ui/feedback/Toast.mjs.map +1 -0
  43. package/dist/components/ui/form/Calendar.mjs +203 -0
  44. package/dist/components/ui/form/Calendar.mjs.map +1 -0
  45. package/dist/components/ui/form/Checkbox.mjs +33 -0
  46. package/dist/components/ui/form/Checkbox.mjs.map +1 -0
  47. package/dist/components/ui/form/DatePicker.mjs +78 -0
  48. package/dist/components/ui/form/DatePicker.mjs.map +1 -0
  49. package/dist/components/ui/form/DateRangePicker.mjs +86 -0
  50. package/dist/components/ui/form/DateRangePicker.mjs.map +1 -0
  51. package/dist/components/ui/form/Input.mjs +20 -0
  52. package/dist/components/ui/form/Input.mjs.map +1 -0
  53. package/dist/components/ui/form/InputOtp.mjs +67 -0
  54. package/dist/components/ui/form/InputOtp.mjs.map +1 -0
  55. package/dist/components/ui/form/RadioGroup.mjs +36 -0
  56. package/dist/components/ui/form/RadioGroup.mjs.map +1 -0
  57. package/dist/components/ui/form/Select.mjs +172 -0
  58. package/dist/components/ui/form/Select.mjs.map +1 -0
  59. package/dist/components/ui/form/Switch.mjs +33 -0
  60. package/dist/components/ui/form/Switch.mjs.map +1 -0
  61. package/dist/components/ui/form/Textarea.mjs +19 -0
  62. package/dist/components/ui/form/Textarea.mjs.map +1 -0
  63. package/dist/components/ui/overlay/Command.mjs +170 -0
  64. package/dist/components/ui/overlay/Command.mjs.map +1 -0
  65. package/dist/components/ui/overlay/Dialog.mjs +131 -0
  66. package/dist/components/ui/overlay/Dialog.mjs.map +1 -0
  67. package/dist/components/ui/overlay/Popover.mjs +46 -0
  68. package/dist/components/ui/overlay/Popover.mjs.map +1 -0
  69. package/dist/components/ui/overlay/Sheet.mjs +129 -0
  70. package/dist/components/ui/overlay/Sheet.mjs.map +1 -0
  71. package/dist/components/ui/overlay/Tooltip.mjs +55 -0
  72. package/dist/components/ui/overlay/Tooltip.mjs.map +1 -0
  73. package/dist/hooks/copy-to-clipboard.hook.mjs +39 -0
  74. package/dist/hooks/copy-to-clipboard.hook.mjs.map +1 -0
  75. package/dist/index.mjs +57 -0
  76. package/dist/index.mjs.map +1 -0
  77. package/dist/infra/api/client.mjs +115 -0
  78. package/dist/infra/api/client.mjs.map +1 -0
  79. package/dist/infra/api/types.mjs +31 -0
  80. package/dist/infra/api/types.mjs.map +1 -0
  81. package/dist/infra/utils/client-info.mjs +27 -0
  82. package/dist/infra/utils/client-info.mjs.map +1 -0
  83. package/dist/infra/utils/clsx.mjs +9 -0
  84. package/dist/infra/utils/clsx.mjs.map +1 -0
  85. package/dist/infra/utils/params.mjs +21 -0
  86. package/dist/infra/utils/params.mjs.map +1 -0
  87. package/dist/infra/utils/percentage.mjs +20 -0
  88. package/dist/infra/utils/percentage.mjs.map +1 -0
  89. package/dist/middlewares/chain.mjs +37 -0
  90. package/dist/middlewares/chain.mjs.map +1 -0
  91. package/dist/middlewares/create-auth-middleware.mjs +28 -0
  92. package/dist/middlewares/create-auth-middleware.mjs.map +1 -0
  93. package/dist/middlewares/types.mjs +11 -0
  94. package/dist/middlewares/types.mjs.map +1 -0
  95. package/dist/middlewares/validate-session.mjs +92 -0
  96. package/dist/middlewares/validate-session.mjs.map +1 -0
  97. package/dist/modules/auth/actions/login.action.mjs +11 -0
  98. package/dist/modules/auth/actions/login.action.mjs.map +1 -0
  99. package/dist/modules/auth/actions/logout.action.mjs +11 -0
  100. package/dist/modules/auth/actions/logout.action.mjs.map +1 -0
  101. package/dist/modules/auth/actions/register.action.mjs +9 -0
  102. package/dist/modules/auth/actions/register.action.mjs.map +1 -0
  103. package/dist/modules/auth/actions/validate-session.action.mjs +44 -0
  104. package/dist/modules/auth/actions/validate-session.action.mjs.map +1 -0
  105. package/dist/modules/auth/hooks/login.hook.mjs +12 -0
  106. package/dist/modules/auth/hooks/login.hook.mjs.map +1 -0
  107. package/dist/modules/auth/hooks/logout.hook.mjs +12 -0
  108. package/dist/modules/auth/hooks/logout.hook.mjs.map +1 -0
  109. package/dist/modules/auth/hooks/register.hook.mjs +12 -0
  110. package/dist/modules/auth/hooks/register.hook.mjs.map +1 -0
  111. package/dist/modules/auth/hooks/useUserQuery.mjs +48 -0
  112. package/dist/modules/auth/hooks/useUserQuery.mjs.map +1 -0
  113. package/dist/modules/auth/schema.mjs +1 -0
  114. package/dist/modules/auth/schema.mjs.map +1 -0
  115. package/dist/modules/auth/services/auth.service.mjs +163 -0
  116. package/dist/modules/auth/services/auth.service.mjs.map +1 -0
  117. package/dist/modules/users/action/find-user-by-id.action.mjs +21 -0
  118. package/dist/modules/users/action/find-user-by-id.action.mjs.map +1 -0
  119. package/dist/modules/users/schema.mjs +11 -0
  120. package/dist/modules/users/schema.mjs.map +1 -0
  121. package/dist/modules/users/services/user.service.mjs +50 -0
  122. package/dist/modules/users/services/user.service.mjs.map +1 -0
  123. package/dist/modules/whitelabel/actions/find-whitelabel.action.mjs +19 -0
  124. package/dist/modules/whitelabel/actions/find-whitelabel.action.mjs.map +1 -0
  125. package/dist/modules/whitelabel/schema.mjs +1 -0
  126. package/dist/modules/whitelabel/schema.mjs.map +1 -0
  127. package/dist/modules/whitelabel/services/whitelabel.service.mjs +62 -0
  128. package/dist/modules/whitelabel/services/whitelabel.service.mjs.map +1 -0
  129. package/dist/providers/auth.provider.mjs +84 -0
  130. package/dist/providers/auth.provider.mjs.map +1 -0
  131. package/dist/providers/query.provider.mjs +37 -0
  132. package/dist/providers/query.provider.mjs.map +1 -0
  133. package/dist/providers/whitelabel.provider.mjs +33 -0
  134. package/dist/providers/whitelabel.provider.mjs.map +1 -0
  135. package/dist/store/useMdSidebarStore.mjs +11 -0
  136. package/dist/store/useMdSidebarStore.mjs.map +1 -0
  137. package/package.json +68 -0
  138. package/src/components/handlers/SearchParamsHandler.tsx +61 -0
  139. package/src/components/layouts/MainLayout.tsx +59 -0
  140. package/src/components/layouts/MdSideBarNavigation.tsx +39 -0
  141. package/src/components/layouts/NavBar.tsx +79 -0
  142. package/src/components/layouts/NotificationItem.tsx +26 -0
  143. package/src/components/layouts/SideBarNavigation.tsx +22 -0
  144. package/src/components/ui/buttons/Button.tsx +55 -0
  145. package/src/components/ui/buttons/CancelButton.tsx +12 -0
  146. package/src/components/ui/buttons/CopyButton.tsx +47 -0
  147. package/src/components/ui/data-display/Accordion.tsx +79 -0
  148. package/src/components/ui/data-display/Badge.tsx +45 -0
  149. package/src/components/ui/data-display/Card.tsx +91 -0
  150. package/src/components/ui/data-display/Pagination.tsx +124 -0
  151. package/src/components/ui/data-display/ScrollArea.tsx +57 -0
  152. package/src/components/ui/data-display/Separator.tsx +27 -0
  153. package/src/components/ui/data-display/Table.tsx +115 -0
  154. package/src/components/ui/data-display/Tabs.tsx +65 -0
  155. package/src/components/ui/feedback/CircularProgress.tsx +75 -0
  156. package/src/components/ui/feedback/DefaultCircularProgress.tsx +53 -0
  157. package/src/components/ui/feedback/Progress.tsx +38 -0
  158. package/src/components/ui/feedback/Toast.tsx +99 -0
  159. package/src/components/ui/form/Calendar.tsx +226 -0
  160. package/src/components/ui/form/Checkbox.tsx +31 -0
  161. package/src/components/ui/form/DatePicker.tsx +97 -0
  162. package/src/components/ui/form/DateRangePicker.tsx +108 -0
  163. package/src/components/ui/form/Input.tsx +18 -0
  164. package/src/components/ui/form/InputOtp.tsx +78 -0
  165. package/src/components/ui/form/RadioGroup.tsx +43 -0
  166. package/src/components/ui/form/Select.tsx +195 -0
  167. package/src/components/ui/form/Switch.tsx +30 -0
  168. package/src/components/ui/form/Textarea.tsx +17 -0
  169. package/src/components/ui/overlay/Command.tsx +183 -0
  170. package/src/components/ui/overlay/Dialog.tsx +146 -0
  171. package/src/components/ui/overlay/Popover.tsx +47 -0
  172. package/src/components/ui/overlay/Sheet.tsx +145 -0
  173. package/src/components/ui/overlay/Tooltip.tsx +60 -0
  174. package/src/hooks/copy-to-clipboard.hook.tsx +52 -0
  175. package/src/index.ts +50 -0
  176. package/src/infra/api/client.ts +142 -0
  177. package/src/infra/api/types.ts +79 -0
  178. package/src/infra/utils/client-info.ts +35 -0
  179. package/src/infra/utils/clsx.ts +6 -0
  180. package/src/infra/utils/params.ts +27 -0
  181. package/src/infra/utils/percentage.ts +42 -0
  182. package/src/middlewares/chain.ts +45 -0
  183. package/src/middlewares/create-auth-middleware.ts +38 -0
  184. package/src/middlewares/types.ts +24 -0
  185. package/src/middlewares/validate-session.ts +116 -0
  186. package/src/modules/auth/actions/login.action.ts +11 -0
  187. package/src/modules/auth/actions/logout.action.ts +11 -0
  188. package/src/modules/auth/actions/register.action.ts +8 -0
  189. package/src/modules/auth/actions/validate-session.action.ts +51 -0
  190. package/src/modules/auth/hooks/login.hook.tsx +10 -0
  191. package/src/modules/auth/hooks/logout.hook.tsx +10 -0
  192. package/src/modules/auth/hooks/register.hook.tsx +10 -0
  193. package/src/modules/auth/hooks/useUserQuery.ts +49 -0
  194. package/src/modules/auth/schema.ts +220 -0
  195. package/src/modules/auth/services/auth.service.ts +225 -0
  196. package/src/modules/users/action/find-user-by-id.action.ts +25 -0
  197. package/src/modules/users/schema.ts +79 -0
  198. package/src/modules/users/services/user.service.ts +63 -0
  199. package/src/modules/whitelabel/actions/find-whitelabel.action.ts +20 -0
  200. package/src/modules/whitelabel/schema.ts +49 -0
  201. package/src/modules/whitelabel/services/whitelabel.service.ts +77 -0
  202. package/src/providers/auth.provider.tsx +113 -0
  203. package/src/providers/query.provider.tsx +52 -0
  204. package/src/providers/whitelabel.provider.tsx +44 -0
  205. package/src/store/useMdSidebarStore.ts +15 -0
@@ -0,0 +1,115 @@
1
+ import * as React from "react";
2
+ import {
3
+ ChevronLeftIcon,
4
+ ChevronRightIcon,
5
+ MoreHorizontalIcon
6
+ } from "lucide-react";
7
+ import { cn } from "../../../infra/utils/clsx";
8
+ import { buttonVariants } from "../buttons/Button";
9
+ function Pagination({ className, ...props }) {
10
+ return /* @__PURE__ */ React.createElement(
11
+ "nav",
12
+ {
13
+ role: "navigation",
14
+ "aria-label": "pagination",
15
+ "data-slot": "pagination",
16
+ className: cn("mx-auto flex w-full justify-center", className),
17
+ ...props
18
+ }
19
+ );
20
+ }
21
+ function PaginationContent({
22
+ className,
23
+ ...props
24
+ }) {
25
+ return /* @__PURE__ */ React.createElement(
26
+ "ul",
27
+ {
28
+ "data-slot": "pagination-content",
29
+ className: cn("flex flex-row items-center gap-1.5", className),
30
+ ...props
31
+ }
32
+ );
33
+ }
34
+ function PaginationItem({ ...props }) {
35
+ return /* @__PURE__ */ React.createElement("li", { "data-slot": "pagination-item", ...props });
36
+ }
37
+ function PaginationLink({
38
+ className,
39
+ isActive,
40
+ size = "icon-sm",
41
+ ...props
42
+ }) {
43
+ return /* @__PURE__ */ React.createElement(
44
+ "a",
45
+ {
46
+ "aria-current": isActive ? "page" : void 0,
47
+ "data-slot": "pagination-link",
48
+ "data-active": isActive,
49
+ className: cn(
50
+ buttonVariants({
51
+ variant: isActive ? "secondary" : "ghost",
52
+ size
53
+ }),
54
+ className
55
+ ),
56
+ ...props
57
+ }
58
+ );
59
+ }
60
+ function PaginationPrevious({
61
+ className,
62
+ ...props
63
+ }) {
64
+ return /* @__PURE__ */ React.createElement(
65
+ PaginationLink,
66
+ {
67
+ "aria-label": "Go to previous page",
68
+ size: "default",
69
+ className: cn("gap-1 size-8 sm:pl-2.5", className),
70
+ ...props
71
+ },
72
+ /* @__PURE__ */ React.createElement(ChevronLeftIcon, null)
73
+ );
74
+ }
75
+ function PaginationNext({
76
+ className,
77
+ ...props
78
+ }) {
79
+ return /* @__PURE__ */ React.createElement(
80
+ PaginationLink,
81
+ {
82
+ "aria-label": "Go to next page",
83
+ size: "default",
84
+ className: cn("gap-1 size-8 sm:pr-2.5", className),
85
+ ...props
86
+ },
87
+ /* @__PURE__ */ React.createElement(ChevronRightIcon, null)
88
+ );
89
+ }
90
+ function PaginationEllipsis({
91
+ className,
92
+ ...props
93
+ }) {
94
+ return /* @__PURE__ */ React.createElement(
95
+ "span",
96
+ {
97
+ "aria-hidden": true,
98
+ "data-slot": "pagination-ellipsis",
99
+ className: cn("flex size-9 items-center justify-center", className),
100
+ ...props
101
+ },
102
+ /* @__PURE__ */ React.createElement(MoreHorizontalIcon, { className: "size-4 mt-1.5" }),
103
+ /* @__PURE__ */ React.createElement("span", { className: "sr-only" }, "More pages")
104
+ );
105
+ }
106
+ export {
107
+ Pagination,
108
+ PaginationContent,
109
+ PaginationEllipsis,
110
+ PaginationItem,
111
+ PaginationLink,
112
+ PaginationNext,
113
+ PaginationPrevious
114
+ };
115
+ //# sourceMappingURL=Pagination.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/components/ui/data-display/Pagination.tsx"],"sourcesContent":["import * as React from \"react\"\nimport {\n ChevronLeftIcon,\n ChevronRightIcon,\n MoreHorizontalIcon,\n} from \"lucide-react\"\nimport { cn } from \"../../../infra/utils/clsx\"\nimport { Button, buttonVariants } from \"../buttons/Button\"\n\nfunction Pagination({ className, ...props }: React.ComponentProps<\"nav\">) {\n return (\n <nav\n role=\"navigation\"\n aria-label=\"pagination\"\n data-slot=\"pagination\"\n className={cn(\"mx-auto flex w-full justify-center\", className)}\n {...props}\n />\n )\n}\n\nfunction PaginationContent({\n className,\n ...props\n}: React.ComponentProps<\"ul\">) {\n return (\n <ul\n data-slot=\"pagination-content\"\n className={cn(\"flex flex-row items-center gap-1.5\", className)}\n {...props}\n />\n )\n}\n\nfunction PaginationItem({ ...props }: React.ComponentProps<\"li\">) {\n return <li data-slot=\"pagination-item\" {...props} />\n}\n\ntype PaginationLinkProps = {\n isActive?: boolean\n} & Pick<React.ComponentProps<typeof Button>, \"size\"> &\n React.ComponentProps<\"a\">\n\nfunction PaginationLink({\n className,\n isActive,\n size = \"icon-sm\",\n ...props\n}: PaginationLinkProps) {\n return (\n <a\n aria-current={isActive ? \"page\" : undefined}\n data-slot=\"pagination-link\"\n data-active={isActive}\n className={cn(\n buttonVariants({\n variant: isActive ? \"secondary\" : \"ghost\",\n size,\n }),\n className\n )}\n {...props}\n />\n )\n}\n\nfunction PaginationPrevious({\n className,\n ...props\n}: React.ComponentProps<typeof PaginationLink>) {\n return (\n <PaginationLink\n aria-label=\"Go to previous page\"\n size=\"default\"\n className={cn(\"gap-1 size-8 sm:pl-2.5\", className)}\n {...props}\n >\n <ChevronLeftIcon />\n </PaginationLink>\n )\n}\n\nfunction PaginationNext({\n className,\n ...props\n}: React.ComponentProps<typeof PaginationLink>) {\n return (\n <PaginationLink\n aria-label=\"Go to next page\"\n size=\"default\"\n className={cn(\"gap-1 size-8 sm:pr-2.5\", className)}\n {...props}\n >\n <ChevronRightIcon />\n </PaginationLink>\n )\n}\n\nfunction PaginationEllipsis({\n className,\n ...props\n}: React.ComponentProps<\"span\">) {\n return (\n <span\n aria-hidden\n data-slot=\"pagination-ellipsis\"\n className={cn(\"flex size-9 items-center justify-center\", className)}\n {...props}\n >\n <MoreHorizontalIcon className=\"size-4 mt-1.5\" />\n <span className=\"sr-only\">More pages</span>\n </span>\n )\n}\n\nexport {\n Pagination,\n PaginationContent,\n PaginationLink,\n PaginationItem,\n PaginationPrevious,\n PaginationNext,\n PaginationEllipsis,\n}\n"],"mappings":"AAAA,YAAY,WAAW;AACvB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,UAAU;AACnB,SAAiB,sBAAsB;AAEvC,SAAS,WAAW,EAAE,WAAW,GAAG,MAAM,GAAgC;AACxE,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAK;AAAA,MACL,cAAW;AAAA,MACX,aAAU;AAAA,MACV,WAAW,GAAG,sCAAsC,SAAS;AAAA,MAC5D,GAAG;AAAA;AAAA,EACN;AAEJ;AAEA,SAAS,kBAAkB;AAAA,EACzB;AAAA,EACA,GAAG;AACL,GAA+B;AAC7B,SACE;AAAA,IAAC;AAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAW,GAAG,sCAAsC,SAAS;AAAA,MAC5D,GAAG;AAAA;AAAA,EACN;AAEJ;AAEA,SAAS,eAAe,EAAE,GAAG,MAAM,GAA+B;AAChE,SAAO,oCAAC,QAAG,aAAU,mBAAmB,GAAG,OAAO;AACpD;AAOA,SAAS,eAAe;AAAA,EACtB;AAAA,EACA;AAAA,EACA,OAAO;AAAA,EACP,GAAG;AACL,GAAwB;AACtB,SACE;AAAA,IAAC;AAAA;AAAA,MACC,gBAAc,WAAW,SAAS;AAAA,MAClC,aAAU;AAAA,MACV,eAAa;AAAA,MACb,WAAW;AAAA,QACT,eAAe;AAAA,UACb,SAAS,WAAW,cAAc;AAAA,UAClC;AAAA,QACF,CAAC;AAAA,QACD;AAAA,MACF;AAAA,MACC,GAAG;AAAA;AAAA,EACN;AAEJ;AAEA,SAAS,mBAAmB;AAAA,EAC1B;AAAA,EACA,GAAG;AACL,GAAgD;AAC9C,SACE;AAAA,IAAC;AAAA;AAAA,MACC,cAAW;AAAA,MACX,MAAK;AAAA,MACL,WAAW,GAAG,0BAA0B,SAAS;AAAA,MAChD,GAAG;AAAA;AAAA,IAEJ,oCAAC,qBAAgB;AAAA,EACnB;AAEJ;AAEA,SAAS,eAAe;AAAA,EACtB;AAAA,EACA,GAAG;AACL,GAAgD;AAC9C,SACE;AAAA,IAAC;AAAA;AAAA,MACC,cAAW;AAAA,MACX,MAAK;AAAA,MACL,WAAW,GAAG,0BAA0B,SAAS;AAAA,MAChD,GAAG;AAAA;AAAA,IAEJ,oCAAC,sBAAiB;AAAA,EACpB;AAEJ;AAEA,SAAS,mBAAmB;AAAA,EAC1B;AAAA,EACA,GAAG;AACL,GAAiC;AAC/B,SACE;AAAA,IAAC;AAAA;AAAA,MACC,eAAW;AAAA,MACX,aAAU;AAAA,MACV,WAAW,GAAG,2CAA2C,SAAS;AAAA,MACjE,GAAG;AAAA;AAAA,IAEJ,oCAAC,sBAAmB,WAAU,iBAAgB;AAAA,IAC9C,oCAAC,UAAK,WAAU,aAAU,YAAU;AAAA,EACtC;AAEJ;","names":[]}
@@ -0,0 +1,60 @@
1
+ "use client";
2
+ import * as React from "react";
3
+ import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
4
+ import { cn } from "../../../infra/utils/clsx";
5
+ function ScrollArea({
6
+ className,
7
+ children,
8
+ ...props
9
+ }) {
10
+ return /* @__PURE__ */ React.createElement(
11
+ ScrollAreaPrimitive.Root,
12
+ {
13
+ "data-slot": "scroll-area",
14
+ className: cn("relative", className),
15
+ ...props
16
+ },
17
+ /* @__PURE__ */ React.createElement(
18
+ ScrollAreaPrimitive.Viewport,
19
+ {
20
+ "data-slot": "scroll-area-viewport",
21
+ className: "focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1"
22
+ },
23
+ children
24
+ ),
25
+ /* @__PURE__ */ React.createElement(ScrollBar, null),
26
+ /* @__PURE__ */ React.createElement(ScrollAreaPrimitive.Corner, null)
27
+ );
28
+ }
29
+ function ScrollBar({
30
+ className,
31
+ orientation = "vertical",
32
+ ...props
33
+ }) {
34
+ return /* @__PURE__ */ React.createElement(
35
+ ScrollAreaPrimitive.ScrollAreaScrollbar,
36
+ {
37
+ "data-slot": "scroll-area-scrollbar",
38
+ orientation,
39
+ className: cn(
40
+ "flex touch-none p-px transition-colors select-none",
41
+ orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent",
42
+ orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent",
43
+ className
44
+ ),
45
+ ...props
46
+ },
47
+ /* @__PURE__ */ React.createElement(
48
+ ScrollAreaPrimitive.ScrollAreaThumb,
49
+ {
50
+ "data-slot": "scroll-area-thumb",
51
+ className: "bg-border relative flex-1 rounded-full"
52
+ }
53
+ )
54
+ );
55
+ }
56
+ export {
57
+ ScrollArea,
58
+ ScrollBar
59
+ };
60
+ //# sourceMappingURL=ScrollArea.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/components/ui/data-display/ScrollArea.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport * as ScrollAreaPrimitive from \"@radix-ui/react-scroll-area\"\nimport { cn } from \"../../../infra/utils/clsx\"\n\nfunction ScrollArea({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof ScrollAreaPrimitive.Root>) {\n return (\n <ScrollAreaPrimitive.Root\n data-slot=\"scroll-area\"\n className={cn(\"relative\", className)}\n {...props}\n >\n <ScrollAreaPrimitive.Viewport\n data-slot=\"scroll-area-viewport\"\n className=\"focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1\"\n >\n {children}\n </ScrollAreaPrimitive.Viewport>\n <ScrollBar />\n <ScrollAreaPrimitive.Corner />\n </ScrollAreaPrimitive.Root>\n )\n}\n\nfunction ScrollBar({\n className,\n orientation = \"vertical\",\n ...props\n}: React.ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>) {\n return (\n <ScrollAreaPrimitive.ScrollAreaScrollbar\n data-slot=\"scroll-area-scrollbar\"\n orientation={orientation}\n className={cn(\n \"flex touch-none p-px transition-colors select-none\",\n orientation === \"vertical\" &&\n \"h-full w-2.5 border-l border-l-transparent\",\n orientation === \"horizontal\" &&\n \"h-2.5 flex-col border-t border-t-transparent\",\n className\n )}\n {...props}\n >\n <ScrollAreaPrimitive.ScrollAreaThumb\n data-slot=\"scroll-area-thumb\"\n className=\"bg-border relative flex-1 rounded-full\"\n />\n </ScrollAreaPrimitive.ScrollAreaScrollbar>\n )\n}\n\nexport { ScrollArea, ScrollBar }\n"],"mappings":";AAEA,YAAY,WAAW;AACvB,YAAY,yBAAyB;AACrC,SAAS,UAAU;AAEnB,SAAS,WAAW;AAAA,EAClB;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAA0D;AACxD,SACE;AAAA,IAAC,oBAAoB;AAAA,IAApB;AAAA,MACC,aAAU;AAAA,MACV,WAAW,GAAG,YAAY,SAAS;AAAA,MAClC,GAAG;AAAA;AAAA,IAEJ;AAAA,MAAC,oBAAoB;AAAA,MAApB;AAAA,QACC,aAAU;AAAA,QACV,WAAU;AAAA;AAAA,MAET;AAAA,IACH;AAAA,IACA,oCAAC,eAAU;AAAA,IACX,oCAAC,oBAAoB,QAApB,IAA2B;AAAA,EAC9B;AAEJ;AAEA,SAAS,UAAU;AAAA,EACjB;AAAA,EACA,cAAc;AAAA,EACd,GAAG;AACL,GAAyE;AACvE,SACE;AAAA,IAAC,oBAAoB;AAAA,IAApB;AAAA,MACC,aAAU;AAAA,MACV;AAAA,MACA,WAAW;AAAA,QACT;AAAA,QACA,gBAAgB,cACd;AAAA,QACF,gBAAgB,gBACd;AAAA,QACF;AAAA,MACF;AAAA,MACC,GAAG;AAAA;AAAA,IAEJ;AAAA,MAAC,oBAAoB;AAAA,MAApB;AAAA,QACC,aAAU;AAAA,QACV,WAAU;AAAA;AAAA,IACZ;AAAA,EACF;AAEJ;","names":[]}
@@ -0,0 +1,28 @@
1
+ "use client";
2
+ import * as React from "react";
3
+ import * as SeparatorPrimitive from "@radix-ui/react-separator";
4
+ import { cn } from "../../../infra/utils/clsx";
5
+ function Separator({
6
+ className,
7
+ orientation = "horizontal",
8
+ decorative = true,
9
+ ...props
10
+ }) {
11
+ return /* @__PURE__ */ React.createElement(
12
+ SeparatorPrimitive.Root,
13
+ {
14
+ "data-slot": "separator",
15
+ decorative,
16
+ orientation,
17
+ className: cn(
18
+ "bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
19
+ className
20
+ ),
21
+ ...props
22
+ }
23
+ );
24
+ }
25
+ export {
26
+ Separator
27
+ };
28
+ //# sourceMappingURL=Separator.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/components/ui/data-display/Separator.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport * as SeparatorPrimitive from \"@radix-ui/react-separator\"\nimport { cn } from \"../../../infra/utils/clsx\"\n\nfunction Separator({\n className,\n orientation = \"horizontal\",\n decorative = true,\n ...props\n}: React.ComponentProps<typeof SeparatorPrimitive.Root>) {\n return (\n <SeparatorPrimitive.Root\n data-slot=\"separator\"\n decorative={decorative}\n orientation={orientation}\n className={cn(\n \"bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Separator }\n"],"mappings":";AAEA,YAAY,WAAW;AACvB,YAAY,wBAAwB;AACpC,SAAS,UAAU;AAEnB,SAAS,UAAU;AAAA,EACjB;AAAA,EACA,cAAc;AAAA,EACd,aAAa;AAAA,EACb,GAAG;AACL,GAAyD;AACvD,SACE;AAAA,IAAC,mBAAmB;AAAA,IAAnB;AAAA,MACC,aAAU;AAAA,MACV;AAAA,MACA;AAAA,MACA,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,MACC,GAAG;AAAA;AAAA,EACN;AAEJ;","names":[]}
@@ -0,0 +1,116 @@
1
+ "use client";
2
+ import * as React from "react";
3
+ import { cn } from "../../../infra/utils/clsx";
4
+ function Table({ className, ...props }) {
5
+ return /* @__PURE__ */ React.createElement(
6
+ "div",
7
+ {
8
+ "data-slot": "table-container",
9
+ className: "relative w-full overflow-x-auto"
10
+ },
11
+ /* @__PURE__ */ React.createElement(
12
+ "table",
13
+ {
14
+ "data-slot": "table",
15
+ className: cn("w-full caption-bottom text-sm", className),
16
+ ...props
17
+ }
18
+ )
19
+ );
20
+ }
21
+ function TableHeader({ className, ...props }) {
22
+ return /* @__PURE__ */ React.createElement(
23
+ "thead",
24
+ {
25
+ "data-slot": "table-header",
26
+ className: cn("[&_tr]:border-b", className),
27
+ ...props
28
+ }
29
+ );
30
+ }
31
+ function TableBody({ className, ...props }) {
32
+ return /* @__PURE__ */ React.createElement(
33
+ "tbody",
34
+ {
35
+ "data-slot": "table-body",
36
+ className: cn("[&_tr:last-child]:border-0", className),
37
+ ...props
38
+ }
39
+ );
40
+ }
41
+ function TableFooter({ className, ...props }) {
42
+ return /* @__PURE__ */ React.createElement(
43
+ "tfoot",
44
+ {
45
+ "data-slot": "table-footer",
46
+ className: cn(
47
+ "bg-muted/50 border-t font-medium [&>tr]:last:border-b-0",
48
+ className
49
+ ),
50
+ ...props
51
+ }
52
+ );
53
+ }
54
+ function TableRow({ className, ...props }) {
55
+ return /* @__PURE__ */ React.createElement(
56
+ "tr",
57
+ {
58
+ "data-slot": "table-row",
59
+ className: cn(
60
+ "hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",
61
+ className
62
+ ),
63
+ ...props
64
+ }
65
+ );
66
+ }
67
+ function TableHead({ className, ...props }) {
68
+ return /* @__PURE__ */ React.createElement(
69
+ "th",
70
+ {
71
+ "data-slot": "table-head",
72
+ className: cn(
73
+ "text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
74
+ className
75
+ ),
76
+ ...props
77
+ }
78
+ );
79
+ }
80
+ function TableCell({ className, ...props }) {
81
+ return /* @__PURE__ */ React.createElement(
82
+ "td",
83
+ {
84
+ "data-slot": "table-cell",
85
+ className: cn(
86
+ "p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
87
+ className
88
+ ),
89
+ ...props
90
+ }
91
+ );
92
+ }
93
+ function TableCaption({
94
+ className,
95
+ ...props
96
+ }) {
97
+ return /* @__PURE__ */ React.createElement(
98
+ "caption",
99
+ {
100
+ "data-slot": "table-caption",
101
+ className: cn("text-muted-foreground mt-4 text-sm", className),
102
+ ...props
103
+ }
104
+ );
105
+ }
106
+ export {
107
+ Table,
108
+ TableBody,
109
+ TableCaption,
110
+ TableCell,
111
+ TableFooter,
112
+ TableHead,
113
+ TableHeader,
114
+ TableRow
115
+ };
116
+ //# sourceMappingURL=Table.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/components/ui/data-display/Table.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport { cn } from \"../../../infra/utils/clsx\"\n\nfunction Table({ className, ...props }: React.ComponentProps<\"table\">) {\n return (\n <div\n data-slot=\"table-container\"\n className=\"relative w-full overflow-x-auto\"\n >\n <table\n data-slot=\"table\"\n className={cn(\"w-full caption-bottom text-sm\", className)}\n {...props}\n />\n </div>\n )\n}\n\nfunction TableHeader({ className, ...props }: React.ComponentProps<\"thead\">) {\n return (\n <thead\n data-slot=\"table-header\"\n className={cn(\"[&_tr]:border-b\", className)}\n {...props}\n />\n )\n}\n\nfunction TableBody({ className, ...props }: React.ComponentProps<\"tbody\">) {\n return (\n <tbody\n data-slot=\"table-body\"\n className={cn(\"[&_tr:last-child]:border-0\", className)}\n {...props}\n />\n )\n}\n\nfunction TableFooter({ className, ...props }: React.ComponentProps<\"tfoot\">) {\n return (\n <tfoot\n data-slot=\"table-footer\"\n className={cn(\n \"bg-muted/50 border-t font-medium [&>tr]:last:border-b-0\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction TableRow({ className, ...props }: React.ComponentProps<\"tr\">) {\n return (\n <tr\n data-slot=\"table-row\"\n className={cn(\n \"hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction TableHead({ className, ...props }: React.ComponentProps<\"th\">) {\n return (\n <th\n data-slot=\"table-head\"\n className={cn(\n \"text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction TableCell({ className, ...props }: React.ComponentProps<\"td\">) {\n return (\n <td\n data-slot=\"table-cell\"\n className={cn(\n \"p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction TableCaption({\n className,\n ...props\n}: React.ComponentProps<\"caption\">) {\n return (\n <caption\n data-slot=\"table-caption\"\n className={cn(\"text-muted-foreground mt-4 text-sm\", className)}\n {...props}\n />\n )\n}\n\nexport {\n Table,\n TableHeader,\n TableBody,\n TableFooter,\n TableHead,\n TableRow,\n TableCell,\n TableCaption,\n}\n"],"mappings":";AAEA,YAAY,WAAW;AACvB,SAAS,UAAU;AAEnB,SAAS,MAAM,EAAE,WAAW,GAAG,MAAM,GAAkC;AACrE,SACE;AAAA,IAAC;AAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAU;AAAA;AAAA,IAEV;AAAA,MAAC;AAAA;AAAA,QACC,aAAU;AAAA,QACV,WAAW,GAAG,iCAAiC,SAAS;AAAA,QACvD,GAAG;AAAA;AAAA,IACN;AAAA,EACF;AAEJ;AAEA,SAAS,YAAY,EAAE,WAAW,GAAG,MAAM,GAAkC;AAC3E,SACE;AAAA,IAAC;AAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAW,GAAG,mBAAmB,SAAS;AAAA,MACzC,GAAG;AAAA;AAAA,EACN;AAEJ;AAEA,SAAS,UAAU,EAAE,WAAW,GAAG,MAAM,GAAkC;AACzE,SACE;AAAA,IAAC;AAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAW,GAAG,8BAA8B,SAAS;AAAA,MACpD,GAAG;AAAA;AAAA,EACN;AAEJ;AAEA,SAAS,YAAY,EAAE,WAAW,GAAG,MAAM,GAAkC;AAC3E,SACE;AAAA,IAAC;AAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,MACC,GAAG;AAAA;AAAA,EACN;AAEJ;AAEA,SAAS,SAAS,EAAE,WAAW,GAAG,MAAM,GAA+B;AACrE,SACE;AAAA,IAAC;AAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,MACC,GAAG;AAAA;AAAA,EACN;AAEJ;AAEA,SAAS,UAAU,EAAE,WAAW,GAAG,MAAM,GAA+B;AACtE,SACE;AAAA,IAAC;AAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,MACC,GAAG;AAAA;AAAA,EACN;AAEJ;AAEA,SAAS,UAAU,EAAE,WAAW,GAAG,MAAM,GAA+B;AACtE,SACE;AAAA,IAAC;AAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,MACC,GAAG;AAAA;AAAA,EACN;AAEJ;AAEA,SAAS,aAAa;AAAA,EACpB;AAAA,EACA,GAAG;AACL,GAAoC;AAClC,SACE;AAAA,IAAC;AAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAW,GAAG,sCAAsC,SAAS;AAAA,MAC5D,GAAG;AAAA;AAAA,EACN;AAEJ;","names":[]}
@@ -0,0 +1,69 @@
1
+ "use client";
2
+ import * as React from "react";
3
+ import * as TabsPrimitive from "@radix-ui/react-tabs";
4
+ import { cn } from "../../../infra/utils/clsx";
5
+ function Tabs({
6
+ className,
7
+ ...props
8
+ }) {
9
+ return /* @__PURE__ */ React.createElement(
10
+ TabsPrimitive.Root,
11
+ {
12
+ "data-slot": "tabs",
13
+ className: cn("flex flex-col gap-2", className),
14
+ ...props
15
+ }
16
+ );
17
+ }
18
+ function TabsList({
19
+ className,
20
+ ...props
21
+ }) {
22
+ return /* @__PURE__ */ React.createElement(
23
+ TabsPrimitive.List,
24
+ {
25
+ "data-slot": "tabs-list",
26
+ className: cn(
27
+ "inline-flex w-full items-center justify-start border-b border-gray-200",
28
+ className
29
+ ),
30
+ ...props
31
+ }
32
+ );
33
+ }
34
+ function TabsTrigger({
35
+ className,
36
+ ...props
37
+ }) {
38
+ return /* @__PURE__ */ React.createElement(
39
+ TabsPrimitive.Trigger,
40
+ {
41
+ "data-slot": "tabs-trigger",
42
+ className: cn(
43
+ "inline-flex items-center justify-center whitespace-nowrap px-4 py-3 text-sm font-medium text-gray-500 transition-all border-b-2 border-transparent hover:text-gray-900 cursor-pointer data-[state=active]:text-gray-950 data-[state=active]:border-gray-950 disabled:pointer-events-none disabled:opacity-50",
44
+ className
45
+ ),
46
+ ...props
47
+ }
48
+ );
49
+ }
50
+ function TabsContent({
51
+ className,
52
+ ...props
53
+ }) {
54
+ return /* @__PURE__ */ React.createElement(
55
+ TabsPrimitive.Content,
56
+ {
57
+ "data-slot": "tabs-content",
58
+ className: cn("flex-1 outline-none", className),
59
+ ...props
60
+ }
61
+ );
62
+ }
63
+ export {
64
+ Tabs,
65
+ TabsContent,
66
+ TabsList,
67
+ TabsTrigger
68
+ };
69
+ //# sourceMappingURL=Tabs.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/components/ui/data-display/Tabs.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport * as TabsPrimitive from \"@radix-ui/react-tabs\"\nimport { cn } from \"../../../infra/utils/clsx\"\n\nfunction Tabs({\n className,\n ...props\n}: React.ComponentProps<typeof TabsPrimitive.Root>) {\n return (\n <TabsPrimitive.Root\n data-slot=\"tabs\"\n className={cn(\"flex flex-col gap-2\", className)}\n {...props}\n />\n )\n}\n\nfunction TabsList({\n className,\n ...props\n}: React.ComponentProps<typeof TabsPrimitive.List>) {\n return (\n <TabsPrimitive.List\n data-slot=\"tabs-list\"\n className={cn(\n \"inline-flex w-full items-center justify-start border-b border-gray-200\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction TabsTrigger({\n className,\n ...props\n}: React.ComponentProps<typeof TabsPrimitive.Trigger>) {\n return (\n <TabsPrimitive.Trigger\n data-slot=\"tabs-trigger\"\n className={cn(\n \"inline-flex items-center justify-center whitespace-nowrap px-4 py-3 text-sm font-medium text-gray-500 transition-all border-b-2 border-transparent hover:text-gray-900 cursor-pointer data-[state=active]:text-gray-950 data-[state=active]:border-gray-950 disabled:pointer-events-none disabled:opacity-50\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction TabsContent({\n className,\n ...props\n}: React.ComponentProps<typeof TabsPrimitive.Content>) {\n return (\n <TabsPrimitive.Content\n data-slot=\"tabs-content\"\n className={cn(\"flex-1 outline-none\", className)}\n {...props}\n />\n )\n}\n\nexport { Tabs, TabsList, TabsTrigger, TabsContent }\n"],"mappings":";AAEA,YAAY,WAAW;AACvB,YAAY,mBAAmB;AAC/B,SAAS,UAAU;AAEnB,SAAS,KAAK;AAAA,EACZ;AAAA,EACA,GAAG;AACL,GAAoD;AAClD,SACE;AAAA,IAAC,cAAc;AAAA,IAAd;AAAA,MACC,aAAU;AAAA,MACV,WAAW,GAAG,uBAAuB,SAAS;AAAA,MAC7C,GAAG;AAAA;AAAA,EACN;AAEJ;AAEA,SAAS,SAAS;AAAA,EAChB;AAAA,EACA,GAAG;AACL,GAAoD;AAClD,SACE;AAAA,IAAC,cAAc;AAAA,IAAd;AAAA,MACC,aAAU;AAAA,MACV,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,MACC,GAAG;AAAA;AAAA,EACN;AAEJ;AAEA,SAAS,YAAY;AAAA,EACnB;AAAA,EACA,GAAG;AACL,GAAuD;AACrD,SACE;AAAA,IAAC,cAAc;AAAA,IAAd;AAAA,MACC,aAAU;AAAA,MACV,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,MACC,GAAG;AAAA;AAAA,EACN;AAEJ;AAEA,SAAS,YAAY;AAAA,EACnB;AAAA,EACA,GAAG;AACL,GAAuD;AACrD,SACE;AAAA,IAAC,cAAc;AAAA,IAAd;AAAA,MACC,aAAU;AAAA,MACV,WAAW,GAAG,uBAAuB,SAAS;AAAA,MAC7C,GAAG;AAAA;AAAA,EACN;AAEJ;","names":[]}
@@ -0,0 +1,61 @@
1
+ import {
2
+ calculateRadius,
3
+ calculateCircumference,
4
+ calculatePercentage,
5
+ calculateCircularProgressOffset
6
+ } from "../../../infra/utils/percentage";
7
+ function CircularProgress({
8
+ current,
9
+ total,
10
+ size = 62,
11
+ strokeWidth = 3,
12
+ children
13
+ }) {
14
+ const radius = calculateRadius(size, strokeWidth);
15
+ const circumference = calculateCircumference(radius);
16
+ const percentage = calculatePercentage(current, total);
17
+ const offset = calculateCircularProgressOffset(percentage, circumference);
18
+ return /* @__PURE__ */ React.createElement(
19
+ "div",
20
+ {
21
+ className: "relative flex items-center justify-center",
22
+ style: { width: size, height: size },
23
+ role: "progressbar",
24
+ "aria-valuenow": current,
25
+ "aria-valuemin": 0,
26
+ "aria-valuemax": total,
27
+ "aria-label": "Progresso"
28
+ },
29
+ /* @__PURE__ */ React.createElement("svg", { width: size, height: size, className: "absolute" }, /* @__PURE__ */ React.createElement(
30
+ "circle",
31
+ {
32
+ cx: size / 2,
33
+ cy: size / 2,
34
+ r: radius,
35
+ stroke: "var(--color-gray-50)",
36
+ strokeWidth,
37
+ fill: "white"
38
+ }
39
+ ), /* @__PURE__ */ React.createElement(
40
+ "circle",
41
+ {
42
+ cx: size / 2,
43
+ cy: size / 2,
44
+ r: radius,
45
+ stroke: "var(--color-gray-950)",
46
+ strokeWidth,
47
+ fill: "none",
48
+ strokeDasharray: circumference,
49
+ strokeDashoffset: offset,
50
+ strokeLinecap: "round",
51
+ transform: `rotate(-90 ${size / 2} ${size / 2})`,
52
+ className: "transition-all duration-300 ease-in-out"
53
+ }
54
+ )),
55
+ /* @__PURE__ */ React.createElement("div", { className: "relative z-10 flex items-center justify-center w-[50px] h-[50px] rounded-full bg-gray-50 paragraph-small-semibold" }, children ?? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("span", { className: "text-gray-600" }, current), /* @__PURE__ */ React.createElement("span", { className: "text-gray-500" }, "/"), /* @__PURE__ */ React.createElement("span", { className: "text-gray-600" }, total)))
56
+ );
57
+ }
58
+ export {
59
+ CircularProgress as default
60
+ };
61
+ //# sourceMappingURL=CircularProgress.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/components/ui/feedback/CircularProgress.tsx"],"sourcesContent":["import { ReactNode } from \"react\";\nimport {\n calculateRadius,\n calculateCircumference,\n calculatePercentage,\n calculateCircularProgressOffset,\n} from \"../../../infra/utils/percentage\";\n\ninterface CircularProgressProps {\n current: number;\n total: number;\n size?: number;\n strokeWidth?: number;\n children?: ReactNode;\n}\n\nexport default function CircularProgress({\n current,\n total,\n size = 62,\n strokeWidth = 3,\n children,\n}: CircularProgressProps) {\n const radius = calculateRadius(size, strokeWidth);\n const circumference = calculateCircumference(radius);\n const percentage = calculatePercentage(current, total);\n const offset = calculateCircularProgressOffset(percentage, circumference);\n\n return (\n <div\n className=\"relative flex items-center justify-center\"\n style={{ width: size, height: size }}\n role=\"progressbar\"\n aria-valuenow={current}\n aria-valuemin={0}\n aria-valuemax={total}\n aria-label=\"Progresso\"\n >\n <svg width={size} height={size} className=\"absolute\">\n <circle\n cx={size / 2}\n cy={size / 2}\n r={radius}\n stroke=\"var(--color-gray-50)\"\n strokeWidth={strokeWidth}\n fill=\"white\"\n />\n\n <circle\n cx={size / 2}\n cy={size / 2}\n r={radius}\n stroke=\"var(--color-gray-950)\"\n strokeWidth={strokeWidth}\n fill=\"none\"\n strokeDasharray={circumference}\n strokeDashoffset={offset}\n strokeLinecap=\"round\"\n transform={`rotate(-90 ${size / 2} ${size / 2})`}\n className=\"transition-all duration-300 ease-in-out\"\n />\n </svg>\n\n <div className=\"relative z-10 flex items-center justify-center w-[50px] h-[50px] rounded-full bg-gray-50 paragraph-small-semibold\">\n {children ?? (\n <>\n <span className=\"text-gray-600\">{current}</span>\n <span className=\"text-gray-500\">/</span>\n <span className=\"text-gray-600\">{total}</span>\n </>\n )}\n </div>\n </div>\n );\n}\n"],"mappings":"AACA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAUQ,SAAR,iBAAkC;AAAA,EACvC;AAAA,EACA;AAAA,EACA,OAAO;AAAA,EACP,cAAc;AAAA,EACd;AACF,GAA0B;AACxB,QAAM,SAAS,gBAAgB,MAAM,WAAW;AAChD,QAAM,gBAAgB,uBAAuB,MAAM;AACnD,QAAM,aAAa,oBAAoB,SAAS,KAAK;AACrD,QAAM,SAAS,gCAAgC,YAAY,aAAa;AAExE,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAU;AAAA,MACV,OAAO,EAAE,OAAO,MAAM,QAAQ,KAAK;AAAA,MACnC,MAAK;AAAA,MACL,iBAAe;AAAA,MACf,iBAAe;AAAA,MACf,iBAAe;AAAA,MACf,cAAW;AAAA;AAAA,IAEX,oCAAC,SAAI,OAAO,MAAM,QAAQ,MAAM,WAAU,cACxC;AAAA,MAAC;AAAA;AAAA,QACC,IAAI,OAAO;AAAA,QACX,IAAI,OAAO;AAAA,QACX,GAAG;AAAA,QACH,QAAO;AAAA,QACP;AAAA,QACA,MAAK;AAAA;AAAA,IACP,GAEA;AAAA,MAAC;AAAA;AAAA,QACC,IAAI,OAAO;AAAA,QACX,IAAI,OAAO;AAAA,QACX,GAAG;AAAA,QACH,QAAO;AAAA,QACP;AAAA,QACA,MAAK;AAAA,QACL,iBAAiB;AAAA,QACjB,kBAAkB;AAAA,QAClB,eAAc;AAAA,QACd,WAAW,cAAc,OAAO,CAAC,IAAI,OAAO,CAAC;AAAA,QAC7C,WAAU;AAAA;AAAA,IACZ,CACF;AAAA,IAEA,oCAAC,SAAI,WAAU,uHACZ,YACC,0DACE,oCAAC,UAAK,WAAU,mBAAiB,OAAQ,GACzC,oCAAC,UAAK,WAAU,mBAAgB,GAAC,GACjC,oCAAC,UAAK,WAAU,mBAAiB,KAAM,CACzC,CAEJ;AAAA,EACF;AAEJ;","names":[]}
@@ -0,0 +1,49 @@
1
+ import {
2
+ calculateRadius,
3
+ calculateCircumference,
4
+ calculatePercentage,
5
+ calculateCircularProgressOffset
6
+ } from "../../../infra/utils/percentage";
7
+ function DefaultCircularProgress({
8
+ current,
9
+ total,
10
+ size = 62,
11
+ strokeWidth = 3
12
+ }) {
13
+ const radius = calculateRadius(size, strokeWidth);
14
+ const circumference = calculateCircumference(radius);
15
+ const percentage = calculatePercentage(current, total);
16
+ const offset = calculateCircularProgressOffset(percentage, circumference);
17
+ return /* @__PURE__ */ React.createElement(
18
+ "div",
19
+ {
20
+ className: "relative flex items-center justify-center",
21
+ style: { width: size, height: size },
22
+ role: "progressbar",
23
+ "aria-valuenow": current,
24
+ "aria-valuemin": 0,
25
+ "aria-valuemax": total,
26
+ "aria-label": "Progresso de exporta\xE7\xE3o"
27
+ },
28
+ /* @__PURE__ */ React.createElement("svg", { width: size, height: size, className: "absolute" }, /* @__PURE__ */ React.createElement(
29
+ "circle",
30
+ {
31
+ cx: size / 2,
32
+ cy: size / 2,
33
+ r: radius,
34
+ stroke: "var(--color-pages-300)",
35
+ strokeWidth,
36
+ fill: "none",
37
+ strokeDasharray: circumference,
38
+ strokeDashoffset: offset,
39
+ strokeLinecap: "round",
40
+ transform: `rotate(-90 ${size / 2} ${size / 2})`,
41
+ className: "transition-all duration-300 ease-in-out"
42
+ }
43
+ ))
44
+ );
45
+ }
46
+ export {
47
+ DefaultCircularProgress as default
48
+ };
49
+ //# sourceMappingURL=DefaultCircularProgress.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/components/ui/feedback/DefaultCircularProgress.tsx"],"sourcesContent":["import {\n calculateRadius,\n calculateCircumference,\n calculatePercentage,\n calculateCircularProgressOffset,\n} from \"../../../infra/utils/percentage\";\n\ninterface CircularProgressProps {\n current: number;\n total: number;\n size?: number;\n strokeWidth?: number;\n}\n\nexport default function DefaultCircularProgress({\n current,\n total,\n size = 62,\n strokeWidth = 3,\n}: CircularProgressProps) {\n const radius = calculateRadius(size, strokeWidth);\n const circumference = calculateCircumference(radius);\n const percentage = calculatePercentage(current, total);\n const offset = calculateCircularProgressOffset(percentage, circumference);\n\n return (\n <div\n className=\"relative flex items-center justify-center\"\n style={{ width: size, height: size }}\n role=\"progressbar\"\n aria-valuenow={current}\n aria-valuemin={0}\n aria-valuemax={total}\n aria-label=\"Progresso de exportação\"\n >\n <svg width={size} height={size} className=\"absolute\">\n <circle\n cx={size / 2}\n cy={size / 2}\n r={radius}\n stroke=\"var(--color-pages-300)\"\n strokeWidth={strokeWidth}\n fill=\"none\"\n strokeDasharray={circumference}\n strokeDashoffset={offset}\n strokeLinecap=\"round\"\n transform={`rotate(-90 ${size / 2} ${size / 2})`}\n className=\"transition-all duration-300 ease-in-out\"\n />\n </svg>\n </div>\n );\n}\n"],"mappings":"AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AASQ,SAAR,wBAAyC;AAAA,EAC9C;AAAA,EACA;AAAA,EACA,OAAO;AAAA,EACP,cAAc;AAChB,GAA0B;AACxB,QAAM,SAAS,gBAAgB,MAAM,WAAW;AAChD,QAAM,gBAAgB,uBAAuB,MAAM;AACnD,QAAM,aAAa,oBAAoB,SAAS,KAAK;AACrD,QAAM,SAAS,gCAAgC,YAAY,aAAa;AAExE,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAU;AAAA,MACV,OAAO,EAAE,OAAO,MAAM,QAAQ,KAAK;AAAA,MACnC,MAAK;AAAA,MACL,iBAAe;AAAA,MACf,iBAAe;AAAA,MACf,iBAAe;AAAA,MACf,cAAW;AAAA;AAAA,IAEX,oCAAC,SAAI,OAAO,MAAM,QAAQ,MAAM,WAAU,cACxC;AAAA,MAAC;AAAA;AAAA,QACC,IAAI,OAAO;AAAA,QACX,IAAI,OAAO;AAAA,QACX,GAAG;AAAA,QACH,QAAO;AAAA,QACP;AAAA,QACA,MAAK;AAAA,QACL,iBAAiB;AAAA,QACjB,kBAAkB;AAAA,QAClB,eAAc;AAAA,QACd,WAAW,cAAc,OAAO,CAAC,IAAI,OAAO,CAAC;AAAA,QAC7C,WAAU;AAAA;AAAA,IACZ,CACF;AAAA,EACF;AAEJ;","names":[]}
@@ -0,0 +1,37 @@
1
+ "use client";
2
+ import * as React from "react";
3
+ import * as ProgressPrimitive from "@radix-ui/react-progress";
4
+ import { cn } from "../../../infra/utils/clsx";
5
+ function Progress({
6
+ className,
7
+ value,
8
+ indicatorColor,
9
+ ...props
10
+ }) {
11
+ return /* @__PURE__ */ React.createElement(
12
+ ProgressPrimitive.Root,
13
+ {
14
+ "data-slot": "progress",
15
+ className: cn(
16
+ "bg-primary/20 relative h-2 w-full overflow-hidden rounded-full",
17
+ className
18
+ ),
19
+ ...props
20
+ },
21
+ /* @__PURE__ */ React.createElement(
22
+ ProgressPrimitive.Indicator,
23
+ {
24
+ "data-slot": "progress-indicator",
25
+ className: cn(
26
+ "bg-primary h-full w-full flex-1 transition-all rounded-full",
27
+ indicatorColor
28
+ ),
29
+ style: { transform: `translateX(-${100 - (value || 0)}%)` }
30
+ }
31
+ )
32
+ );
33
+ }
34
+ export {
35
+ Progress
36
+ };
37
+ //# sourceMappingURL=Progress.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/components/ui/feedback/Progress.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport * as ProgressPrimitive from \"@radix-ui/react-progress\"\nimport { cn } from \"../../../infra/utils/clsx\"\n\ninterface ProgressProps extends React.ComponentProps<typeof ProgressPrimitive.Root> {\n indicatorColor?: string\n}\n\nfunction Progress({\n className,\n value,\n indicatorColor,\n ...props\n}: ProgressProps) {\n return (\n <ProgressPrimitive.Root\n data-slot=\"progress\"\n className={cn(\n \"bg-primary/20 relative h-2 w-full overflow-hidden rounded-full\",\n className\n )}\n {...props}\n >\n <ProgressPrimitive.Indicator\n data-slot=\"progress-indicator\"\n className={cn(\n \"bg-primary h-full w-full flex-1 transition-all rounded-full\",\n indicatorColor\n )}\n style={{ transform: `translateX(-${100 - (value || 0)}%)` }}\n />\n </ProgressPrimitive.Root>\n )\n}\n\nexport { Progress }\n"],"mappings":";AAEA,YAAY,WAAW;AACvB,YAAY,uBAAuB;AACnC,SAAS,UAAU;AAMnB,SAAS,SAAS;AAAA,EAChB;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAkB;AAChB,SACE;AAAA,IAAC,kBAAkB;AAAA,IAAlB;AAAA,MACC,aAAU;AAAA,MACV,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,MACC,GAAG;AAAA;AAAA,IAEJ;AAAA,MAAC,kBAAkB;AAAA,MAAlB;AAAA,QACC,aAAU;AAAA,QACV,WAAW;AAAA,UACT;AAAA,UACA;AAAA,QACF;AAAA,QACA,OAAO,EAAE,WAAW,eAAe,OAAO,SAAS,EAAE,KAAK;AAAA;AAAA,IAC5D;AAAA,EACF;AAEJ;","names":[]}