@phsa.tec/design-system-react 0.1.6 → 0.1.9

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 (217) hide show
  1. package/README.md +390 -209
  2. package/dist/index.d.mts +485 -0
  3. package/dist/index.d.ts +485 -0
  4. package/dist/index.js +4259 -0
  5. package/dist/index.js.map +1 -0
  6. package/dist/index.mjs +4186 -0
  7. package/dist/index.mjs.map +1 -0
  8. package/dist/styles.css +2534 -0
  9. package/dist/styles.css.map +1 -0
  10. package/dist/styles.d.mts +2 -0
  11. package/dist/styles.d.ts +2 -0
  12. package/package.json +46 -6
  13. package/.eslintrc.json +0 -7
  14. package/.github/workflows/deploy-storybook.yml +0 -75
  15. package/.storybook/main.ts +0 -16
  16. package/.storybook/preview.ts +0 -15
  17. package/components.json +0 -21
  18. package/jest.config.ts +0 -25
  19. package/next.config.ts +0 -7
  20. package/postcss.config.mjs +0 -8
  21. package/public/file.svg +0 -1
  22. package/public/globe.svg +0 -1
  23. package/public/next.svg +0 -1
  24. package/public/vercel.svg +0 -1
  25. package/public/window.svg +0 -1
  26. package/src/app/columns.tsx +0 -178
  27. package/src/app/favicon.ico +0 -0
  28. package/src/app/fonts/GeistMonoVF.woff +0 -0
  29. package/src/app/fonts/GeistVF.woff +0 -0
  30. package/src/app/globals.css +0 -94
  31. package/src/app/layout.tsx +0 -35
  32. package/src/app/page.tsx +0 -7
  33. package/src/components/actions/AlertDialog/AlertDialog.tsx +0 -45
  34. package/src/components/actions/AlertDialog/alert-dialog.stories.tsx +0 -21
  35. package/src/components/actions/AlertDialog/index.ts +0 -1
  36. package/src/components/actions/Button/Button.stories.ts +0 -38
  37. package/src/components/actions/Button/Button.tsx +0 -23
  38. package/src/components/actions/Button/index.ts +0 -1
  39. package/src/components/actions/Collapsible/index.ts +0 -1
  40. package/src/components/actions/Dialog/Dialog.stories.tsx +0 -70
  41. package/src/components/actions/Dialog/Dialog.tsx +0 -87
  42. package/src/components/actions/Dialog/components/DialogWithActions/index.tsx +0 -40
  43. package/src/components/actions/Dialog/index.ts +0 -1
  44. package/src/components/actions/Steps/Steps.stories.tsx +0 -25
  45. package/src/components/actions/Steps/Steps.tsx +0 -51
  46. package/src/components/actions/Steps/index.ts +0 -1
  47. package/src/components/actions/index.ts +0 -5
  48. package/src/components/dataDisplay/Avatar/Avatar.stories.tsx +0 -22
  49. package/src/components/dataDisplay/Avatar/Avatar.tsx +0 -21
  50. package/src/components/dataDisplay/Avatar/index.ts +0 -2
  51. package/src/components/dataDisplay/Badge/Badge.stories.tsx +0 -36
  52. package/src/components/dataDisplay/Badge/index.ts +0 -1
  53. package/src/components/dataDisplay/Card/Card.stories.tsx +0 -24
  54. package/src/components/dataDisplay/Card/Card.tsx +0 -34
  55. package/src/components/dataDisplay/Card/index.ts +0 -1
  56. package/src/components/dataDisplay/DataPairList/DataPairList.tsx +0 -56
  57. package/src/components/dataDisplay/DataPairList/data-pair-list.stories.tsx +0 -87
  58. package/src/components/dataDisplay/DataPairList/index.ts +0 -2
  59. package/src/components/dataDisplay/DataPairList/types.ts +0 -10
  60. package/src/components/dataDisplay/DropDownMenu/index.ts +0 -1
  61. package/src/components/dataDisplay/ErrorMessage/ErrorMessage.tsx +0 -6
  62. package/src/components/dataDisplay/ErrorMessage/index.ts +0 -1
  63. package/src/components/dataDisplay/Icon/Icon.stories.tsx +0 -21
  64. package/src/components/dataDisplay/Icon/Icon.tsx +0 -47
  65. package/src/components/dataDisplay/Icon/index.ts +0 -1
  66. package/src/components/dataDisplay/Icon/types.ts +0 -6
  67. package/src/components/dataDisplay/Label/Label.stories.tsx +0 -21
  68. package/src/components/dataDisplay/Label/Label.tsx +0 -10
  69. package/src/components/dataDisplay/Label/index.ts +0 -1
  70. package/src/components/dataDisplay/Table/Table.tsx +0 -173
  71. package/src/components/dataDisplay/Table/columns.tsx +0 -223
  72. package/src/components/dataDisplay/Table/components/DynamicTable/data-table-column-header.tsx +0 -72
  73. package/src/components/dataDisplay/Table/components/DynamicTable/data-table-pagination.tsx +0 -91
  74. package/src/components/dataDisplay/Table/components/DynamicTable/data-table-toolbar.tsx +0 -17
  75. package/src/components/dataDisplay/Table/components/DynamicTable/data-table-view-options.tsx +0 -58
  76. package/src/components/dataDisplay/Table/components/DynamicTable/data-table.stories.tsx +0 -118
  77. package/src/components/dataDisplay/Table/components/DynamicTable/index.tsx +0 -136
  78. package/src/components/dataDisplay/Table/components/DynamicTable/types.ts +0 -43
  79. package/src/components/dataDisplay/Table/custom/CustomTable/data-table-column-header.tsx +0 -71
  80. package/src/components/dataDisplay/Table/custom/CustomTable/data-table-faceted-filter.tsx +0 -147
  81. package/src/components/dataDisplay/Table/custom/CustomTable/data-table-pagination.tsx +0 -97
  82. package/src/components/dataDisplay/Table/custom/CustomTable/data-table-row-actions.tsx +0 -78
  83. package/src/components/dataDisplay/Table/custom/CustomTable/data-table-toolbar.tsx +0 -60
  84. package/src/components/dataDisplay/Table/custom/CustomTable/data-table-view-options.tsx +0 -59
  85. package/src/components/dataDisplay/Table/custom/CustomTable/data-table.tsx +0 -145
  86. package/src/components/dataDisplay/Table/custom/CustomTable/data.ts +0 -71
  87. package/src/components/dataDisplay/Table/custom/CustomTable/index.tsx +0 -34
  88. package/src/components/dataDisplay/Table/custom/CustomTable/schema.ts +0 -11
  89. package/src/components/dataDisplay/Table/index.ts +0 -2
  90. package/src/components/dataDisplay/Table/table.stories.tsx +0 -147
  91. package/src/components/dataDisplay/Table/types.ts +0 -15
  92. package/src/components/dataDisplay/Tabs/Tabs.stories.tsx +0 -34
  93. package/src/components/dataDisplay/Tabs/Tabs.tsx +0 -53
  94. package/src/components/dataDisplay/Tabs/index.ts +0 -1
  95. package/src/components/dataDisplay/Text/Text.stories.tsx +0 -66
  96. package/src/components/dataDisplay/Text/Text.tsx +0 -56
  97. package/src/components/dataDisplay/Text/index.ts +0 -1
  98. package/src/components/dataDisplay/index.ts +0 -8
  99. package/src/components/dataInput/Input/components/Input/Input.stories.tsx +0 -99
  100. package/src/components/dataInput/Input/components/Input/InputBase.tsx +0 -50
  101. package/src/components/dataInput/Input/components/Input/__tests__/input.test.tsx +0 -38
  102. package/src/components/dataInput/Input/components/Input/index.tsx +0 -48
  103. package/src/components/dataInput/Input/components/Input/types.ts +0 -15
  104. package/src/components/dataInput/Input/components/InputBase/index.tsx +0 -31
  105. package/src/components/dataInput/Input/components/MaskInput/__tests__/mask-input.test.tsx +0 -77
  106. package/src/components/dataInput/Input/components/MaskInput/index.ts +0 -1
  107. package/src/components/dataInput/Input/components/MaskInput/mask-input.stories.tsx +0 -85
  108. package/src/components/dataInput/Input/components/MaskInput/mask-input.tsx +0 -73
  109. package/src/components/dataInput/Input/components/MultipleInput/MultipleInput.tsx +0 -105
  110. package/src/components/dataInput/Input/components/MultipleInput/MultipleInputBase.tsx +0 -100
  111. package/src/components/dataInput/Input/components/MultipleInput/MultipleMaskInput.tsx +0 -35
  112. package/src/components/dataInput/Input/components/MultipleInput/MultipleNumberInput.tsx +0 -35
  113. package/src/components/dataInput/Input/components/MultipleInput/__tests__/multiple-input.test.tsx +0 -152
  114. package/src/components/dataInput/Input/components/MultipleInput/index.ts +0 -2
  115. package/src/components/dataInput/Input/components/MultipleInput/multiple-input.stories.tsx +0 -96
  116. package/src/components/dataInput/Input/components/NumberInput/__tests__/number-input.test.tsx +0 -175
  117. package/src/components/dataInput/Input/components/NumberInput/index.ts +0 -1
  118. package/src/components/dataInput/Input/components/NumberInput/number-input.stories.tsx +0 -76
  119. package/src/components/dataInput/Input/components/NumberInput/number-input.tsx +0 -70
  120. package/src/components/dataInput/Input/index.ts +0 -4
  121. package/src/components/dataInput/Select/MultiSelect/MultiSelect.stories.tsx +0 -119
  122. package/src/components/dataInput/Select/MultiSelect/MultiSelectBase.tsx +0 -135
  123. package/src/components/dataInput/Select/MultiSelect/index.tsx +0 -75
  124. package/src/components/dataInput/Select/Select.stories.tsx +0 -61
  125. package/src/components/dataInput/Select/Select.tsx +0 -73
  126. package/src/components/dataInput/Select/SelectBase.tsx +0 -58
  127. package/src/components/dataInput/Select/index.ts +0 -2
  128. package/src/components/dataInput/Switch/Switch.stories.tsx +0 -75
  129. package/src/components/dataInput/Switch/Switch.tsx +0 -52
  130. package/src/components/dataInput/Switch/index.ts +0 -1
  131. package/src/components/dataInput/checkbox/Checkbox.tsx +0 -57
  132. package/src/components/dataInput/checkbox/Checkbox_old.tsx +0 -58
  133. package/src/components/dataInput/checkbox/Checkout.stories.tsx +0 -62
  134. package/src/components/dataInput/checkbox/index.ts +0 -1
  135. package/src/components/dataInput/form/Form.tsx +0 -47
  136. package/src/components/dataInput/form/index.ts +0 -3
  137. package/src/components/dataInput/index.ts +0 -5
  138. package/src/components/feedback/ErrorLabel/index.tsx +0 -24
  139. package/src/components/feedback/Spinner/index.ts +0 -1
  140. package/src/components/feedback/Toast/Toast.stories.tsx +0 -45
  141. package/src/components/feedback/Toast/index.ts +0 -2
  142. package/src/components/feedback/index.ts +0 -2
  143. package/src/components/index.ts +0 -6
  144. package/src/components/layout/Crud/components/Table/index.tsx +0 -183
  145. package/src/components/layout/Crud/components/Table/types.ts +0 -15
  146. package/src/components/layout/Crud/crud.stories.tsx +0 -317
  147. package/src/components/layout/Crud/hook/useCrudLayout/index.tsx +0 -94
  148. package/src/components/layout/Crud/hook/useRequest/index.tsx +0 -156
  149. package/src/components/layout/Crud/index.tsx +0 -295
  150. package/src/components/layout/Crud/store/CrudLayoutStore.ts +0 -75
  151. package/src/components/layout/Crud/types.ts +0 -14
  152. package/src/components/layout/Drawer/CustomDrawer/index.tsx +0 -33
  153. package/src/components/layout/Drawer/Drawer.stories.tsx +0 -80
  154. package/src/components/layout/Drawer/index.ts +0 -2
  155. package/src/components/layout/PageLayout/PageLayout.stories.tsx +0 -42
  156. package/src/components/layout/PageLayout/index.tsx +0 -28
  157. package/src/components/layout/Separator/index.ts +0 -1
  158. package/src/components/layout/Sheet/Sheet.stories.tsx +0 -28
  159. package/src/components/layout/Sheet/Sheet.tsx +0 -22
  160. package/src/components/layout/Sheet/index.ts +0 -1
  161. package/src/components/layout/Sidebar/Sidebar.stories.tsx +0 -116
  162. package/src/components/layout/Sidebar/Sidebar.tsx +0 -50
  163. package/src/components/layout/Sidebar/components/app-sidebar.tsx +0 -203
  164. package/src/components/layout/Sidebar/components/footer-sidebar.tsx +0 -17
  165. package/src/components/layout/Sidebar/components/header-sidebar.tsx +0 -90
  166. package/src/components/layout/Sidebar/components/menus.tsx +0 -55
  167. package/src/components/layout/Sidebar/components/nav-projects.tsx +0 -88
  168. package/src/components/layout/Sidebar/components/nav-user.tsx +0 -114
  169. package/src/components/layout/Sidebar/components/team-switcher.tsx +0 -85
  170. package/src/components/layout/Sidebar/index.ts +0 -2
  171. package/src/components/layout/Sidebar/provider/index.tsx +0 -51
  172. package/src/components/layout/Tabs/Tabs.tsx +0 -51
  173. package/src/components/layout/Tabs/index.ts +0 -1
  174. package/src/components/layout/Tabs/tabs.stories.tsx +0 -57
  175. package/src/components/layout/index.ts +0 -6
  176. package/src/components/navigation/Breadcrumbs/Breadcrumbs.tsx +0 -66
  177. package/src/components/navigation/Breadcrumbs/index.ts +0 -2
  178. package/src/components/navigation/index.ts +0 -1
  179. package/src/components/ui/alert-dialog.tsx +0 -141
  180. package/src/components/ui/alert.tsx +0 -59
  181. package/src/components/ui/avatar.tsx +0 -50
  182. package/src/components/ui/badge.tsx +0 -40
  183. package/src/components/ui/breadcrumb.tsx +0 -115
  184. package/src/components/ui/button.tsx +0 -57
  185. package/src/components/ui/card.tsx +0 -83
  186. package/src/components/ui/checkbox.tsx +0 -34
  187. package/src/components/ui/collapsible.tsx +0 -11
  188. package/src/components/ui/command.tsx +0 -153
  189. package/src/components/ui/dialog.tsx +0 -124
  190. package/src/components/ui/drawer.tsx +0 -117
  191. package/src/components/ui/dropdown-menu.tsx +0 -201
  192. package/src/components/ui/form.tsx +0 -179
  193. package/src/components/ui/input.tsx +0 -24
  194. package/src/components/ui/label.tsx +0 -30
  195. package/src/components/ui/popover.tsx +0 -33
  196. package/src/components/ui/select.tsx +0 -161
  197. package/src/components/ui/separator.tsx +0 -31
  198. package/src/components/ui/sheet.tsx +0 -140
  199. package/src/components/ui/sidebar.tsx +0 -763
  200. package/src/components/ui/skeleton.tsx +0 -15
  201. package/src/components/ui/sonner.tsx +0 -31
  202. package/src/components/ui/spinner.tsx +0 -54
  203. package/src/components/ui/switch.tsx +0 -33
  204. package/src/components/ui/table.tsx +0 -120
  205. package/src/components/ui/tabs.tsx +0 -55
  206. package/src/components/ui/toast.tsx +0 -130
  207. package/src/components/ui/toaster.tsx +0 -35
  208. package/src/components/ui/tooltip.tsx +0 -32
  209. package/src/hooks/use-conditional-controller.tsx +0 -35
  210. package/src/hooks/use-mask.tsx +0 -116
  211. package/src/hooks/use-mobile.tsx +0 -19
  212. package/src/hooks/use-toast.ts +0 -191
  213. package/src/index.ts +0 -1
  214. package/src/introduction.mdx +0 -132
  215. package/src/lib/utils.ts +0 -6
  216. package/tailwind.config.ts +0 -83
  217. package/tsconfig.json +0 -27
package/dist/index.js ADDED
@@ -0,0 +1,4259 @@
1
+ "use client"
2
+ "use strict";
3
+ var __create = Object.create;
4
+ var __defProp = Object.defineProperty;
5
+ var __defProps = Object.defineProperties;
6
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
8
+ var __getOwnPropNames = Object.getOwnPropertyNames;
9
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
10
+ var __getProtoOf = Object.getPrototypeOf;
11
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
12
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
13
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
14
+ var __spreadValues = (a, b) => {
15
+ for (var prop in b || (b = {}))
16
+ if (__hasOwnProp.call(b, prop))
17
+ __defNormalProp(a, prop, b[prop]);
18
+ if (__getOwnPropSymbols)
19
+ for (var prop of __getOwnPropSymbols(b)) {
20
+ if (__propIsEnum.call(b, prop))
21
+ __defNormalProp(a, prop, b[prop]);
22
+ }
23
+ return a;
24
+ };
25
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
26
+ var __objRest = (source, exclude) => {
27
+ var target = {};
28
+ for (var prop in source)
29
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
30
+ target[prop] = source[prop];
31
+ if (source != null && __getOwnPropSymbols)
32
+ for (var prop of __getOwnPropSymbols(source)) {
33
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
34
+ target[prop] = source[prop];
35
+ }
36
+ return target;
37
+ };
38
+ var __export = (target, all) => {
39
+ for (var name in all)
40
+ __defProp(target, name, { get: all[name], enumerable: true });
41
+ };
42
+ var __copyProps = (to, from, except, desc) => {
43
+ if (from && typeof from === "object" || typeof from === "function") {
44
+ for (let key of __getOwnPropNames(from))
45
+ if (!__hasOwnProp.call(to, key) && key !== except)
46
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
47
+ }
48
+ return to;
49
+ };
50
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
51
+ // If the importer is in node compatibility mode or this is not an ESM
52
+ // file that has been converted to a CommonJS file using a Babel-
53
+ // compatible transform (i.e. "__esModule" has not been set), then set
54
+ // "default" to the CommonJS "module.exports" for node compatibility.
55
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
56
+ mod
57
+ ));
58
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
59
+
60
+ // src/index.ts
61
+ var src_exports = {};
62
+ __export(src_exports, {
63
+ AlertDialog: () => AlertDialog2,
64
+ Avatar: () => Avatar,
65
+ AvatarFallback: () => AvatarFallback,
66
+ AvatarImage: () => AvatarImage,
67
+ Badge: () => Badge,
68
+ Breadcrumb: () => Breadcrumb,
69
+ BreadcrumbEllipsis: () => BreadcrumbEllipsis,
70
+ BreadcrumbItem: () => BreadcrumbItem,
71
+ BreadcrumbLink: () => BreadcrumbLink,
72
+ BreadcrumbList: () => BreadcrumbList,
73
+ BreadcrumbPage: () => BreadcrumbPage,
74
+ BreadcrumbSeparator: () => BreadcrumbSeparator,
75
+ Button: () => Button2,
76
+ Checkbox: () => Checkbox2,
77
+ Collapsible: () => Collapsible,
78
+ CollapsibleContent: () => CollapsibleContent2,
79
+ CollapsibleTrigger: () => CollapsibleTrigger2,
80
+ CustomDrawer: () => CustomDrawer,
81
+ DataPairList: () => DataPairList,
82
+ Dialog: () => Dialog2,
83
+ DialogWithForm: () => DialogWithForm,
84
+ Drawer: () => Drawer,
85
+ DrawerClose: () => DrawerClose,
86
+ DrawerContent: () => DrawerContent,
87
+ DrawerDescription: () => DrawerDescription,
88
+ DrawerFooter: () => DrawerFooter,
89
+ DrawerHeader: () => DrawerHeader,
90
+ DrawerOverlay: () => DrawerOverlay,
91
+ DrawerPortal: () => DrawerPortal,
92
+ DrawerTitle: () => DrawerTitle,
93
+ DrawerTrigger: () => DrawerTrigger,
94
+ DropdownMenu: () => DropdownMenu,
95
+ DropdownMenuCheckboxItem: () => DropdownMenuCheckboxItem,
96
+ DropdownMenuContent: () => DropdownMenuContent,
97
+ DropdownMenuGroup: () => DropdownMenuGroup,
98
+ DropdownMenuItem: () => DropdownMenuItem,
99
+ DropdownMenuLabel: () => DropdownMenuLabel,
100
+ DropdownMenuPortal: () => DropdownMenuPortal,
101
+ DropdownMenuRadioGroup: () => DropdownMenuRadioGroup,
102
+ DropdownMenuRadioItem: () => DropdownMenuRadioItem,
103
+ DropdownMenuSeparator: () => DropdownMenuSeparator,
104
+ DropdownMenuShortcut: () => DropdownMenuShortcut,
105
+ DropdownMenuSub: () => DropdownMenuSub,
106
+ DropdownMenuSubContent: () => DropdownMenuSubContent,
107
+ DropdownMenuSubTrigger: () => DropdownMenuSubTrigger,
108
+ DropdownMenuTrigger: () => DropdownMenuTrigger,
109
+ DynamicTable: () => DynamicTable,
110
+ Form: () => Form,
111
+ FormControl: () => FormControl,
112
+ FormDescription: () => FormDescription,
113
+ FormField: () => FormField,
114
+ FormItem: () => FormItem,
115
+ FormLabel: () => FormLabel,
116
+ FormMessage: () => FormMessage,
117
+ Icon: () => Icon2,
118
+ Input: () => Input2,
119
+ MaskInput: () => MaskInput,
120
+ MultiSelect: () => MultiSelect,
121
+ MultipleInput: () => MultipleInput,
122
+ MultipleMaskInput: () => MultipleMaskInput,
123
+ NavUser: () => NavUser,
124
+ NumberInput: () => NumberInput,
125
+ PageLayout: () => PageLayout,
126
+ Select: () => Select2,
127
+ Separator: () => Separator3,
128
+ Sheet: () => Sheet2,
129
+ Sidebar: () => Sidebar2,
130
+ Spinner: () => Spinner,
131
+ Steps: () => Steps,
132
+ Switch: () => Switch2,
133
+ Tabs: () => Tabs2,
134
+ Text: () => Text,
135
+ Toaster: () => Toaster,
136
+ badgeVariants: () => badgeVariants,
137
+ reducer: () => reducer,
138
+ toast: () => toast,
139
+ useFormContext: () => import_react_hook_form2.useFormContext,
140
+ useFormField: () => useFormField,
141
+ useToast: () => useToast
142
+ });
143
+ module.exports = __toCommonJS(src_exports);
144
+
145
+ // src/components/dataDisplay/Table/components/DynamicTable/index.tsx
146
+ var React5 = __toESM(require("react"));
147
+ var import_react_table = require("@tanstack/react-table");
148
+
149
+ // src/components/ui/table.tsx
150
+ var React = __toESM(require("react"));
151
+
152
+ // src/lib/utils.ts
153
+ var import_clsx = require("clsx");
154
+ var import_tailwind_merge = require("tailwind-merge");
155
+ function cn(...inputs) {
156
+ return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
157
+ }
158
+
159
+ // src/components/ui/table.tsx
160
+ var import_jsx_runtime = require("react/jsx-runtime");
161
+ var Table = React.forwardRef((_a, ref) => {
162
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
163
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "relative w-full overflow-auto", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
164
+ "table",
165
+ __spreadValues({
166
+ ref,
167
+ className: cn("w-full caption-bottom text-sm", className)
168
+ }, props)
169
+ ) });
170
+ });
171
+ Table.displayName = "Table";
172
+ var TableHeader = React.forwardRef((_a, ref) => {
173
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
174
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("thead", __spreadValues({ ref, className: cn("[&_tr]:border-b", className) }, props));
175
+ });
176
+ TableHeader.displayName = "TableHeader";
177
+ var TableBody = React.forwardRef((_a, ref) => {
178
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
179
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
180
+ "tbody",
181
+ __spreadValues({
182
+ ref,
183
+ className: cn("[&_tr:last-child]:border-0", className)
184
+ }, props)
185
+ );
186
+ });
187
+ TableBody.displayName = "TableBody";
188
+ var TableFooter = React.forwardRef((_a, ref) => {
189
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
190
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
191
+ "tfoot",
192
+ __spreadValues({
193
+ ref,
194
+ className: cn(
195
+ "border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",
196
+ className
197
+ )
198
+ }, props)
199
+ );
200
+ });
201
+ TableFooter.displayName = "TableFooter";
202
+ var TableRow = React.forwardRef((_a, ref) => {
203
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
204
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
205
+ "tr",
206
+ __spreadValues({
207
+ ref,
208
+ className: cn(
209
+ "border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",
210
+ className
211
+ )
212
+ }, props)
213
+ );
214
+ });
215
+ TableRow.displayName = "TableRow";
216
+ var TableHead = React.forwardRef((_a, ref) => {
217
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
218
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
219
+ "th",
220
+ __spreadValues({
221
+ ref,
222
+ className: cn(
223
+ "h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
224
+ className
225
+ )
226
+ }, props)
227
+ );
228
+ });
229
+ TableHead.displayName = "TableHead";
230
+ var TableCell = React.forwardRef((_a, ref) => {
231
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
232
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
233
+ "td",
234
+ __spreadValues({
235
+ ref,
236
+ className: cn(
237
+ "p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
238
+ className
239
+ )
240
+ }, props)
241
+ );
242
+ });
243
+ TableCell.displayName = "TableCell";
244
+ var TableCaption = React.forwardRef((_a, ref) => {
245
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
246
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
247
+ "caption",
248
+ __spreadValues({
249
+ ref,
250
+ className: cn("mt-4 text-sm text-muted-foreground", className)
251
+ }, props)
252
+ );
253
+ });
254
+ TableCaption.displayName = "TableCaption";
255
+
256
+ // src/components/dataDisplay/Table/components/DynamicTable/data-table-view-options.tsx
257
+ var import_react_dropdown_menu = require("@radix-ui/react-dropdown-menu");
258
+ var import_react_icons = require("@radix-ui/react-icons");
259
+
260
+ // src/components/ui/button.tsx
261
+ var React2 = __toESM(require("react"));
262
+ var import_react_slot = require("@radix-ui/react-slot");
263
+ var import_class_variance_authority = require("class-variance-authority");
264
+ var import_jsx_runtime2 = require("react/jsx-runtime");
265
+ var buttonVariants = (0, import_class_variance_authority.cva)(
266
+ "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
267
+ {
268
+ variants: {
269
+ variant: {
270
+ default: "bg-primary text-primary-foreground shadow hover:bg-primary/90",
271
+ destructive: "bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",
272
+ outline: "border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",
273
+ secondary: "bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",
274
+ ghost: "hover:bg-accent hover:text-accent-foreground",
275
+ link: "text-primary underline-offset-4 hover:underline"
276
+ },
277
+ size: {
278
+ default: "h-9 px-4 py-2",
279
+ sm: "h-8 rounded-md px-3 text-xs",
280
+ lg: "h-10 rounded-md px-8",
281
+ icon: "h-9 w-9"
282
+ }
283
+ },
284
+ defaultVariants: {
285
+ variant: "default",
286
+ size: "default"
287
+ }
288
+ }
289
+ );
290
+ var Button = React2.forwardRef(
291
+ (_a, ref) => {
292
+ var _b = _a, { className, variant, size, asChild = false } = _b, props = __objRest(_b, ["className", "variant", "size", "asChild"]);
293
+ const Comp = asChild ? import_react_slot.Slot : "button";
294
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
295
+ Comp,
296
+ __spreadValues({
297
+ className: cn(buttonVariants({ variant, size, className })),
298
+ ref
299
+ }, props)
300
+ );
301
+ }
302
+ );
303
+ Button.displayName = "Button";
304
+
305
+ // src/components/ui/dropdown-menu.tsx
306
+ var React3 = __toESM(require("react"));
307
+ var DropdownMenuPrimitive = __toESM(require("@radix-ui/react-dropdown-menu"));
308
+ var import_lucide_react = require("lucide-react");
309
+ var import_jsx_runtime3 = require("react/jsx-runtime");
310
+ var DropdownMenu = DropdownMenuPrimitive.Root;
311
+ var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
312
+ var DropdownMenuGroup = DropdownMenuPrimitive.Group;
313
+ var DropdownMenuPortal = DropdownMenuPrimitive.Portal;
314
+ var DropdownMenuSub = DropdownMenuPrimitive.Sub;
315
+ var DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
316
+ var DropdownMenuSubTrigger = React3.forwardRef((_a, ref) => {
317
+ var _b = _a, { className, inset, children } = _b, props = __objRest(_b, ["className", "inset", "children"]);
318
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
319
+ DropdownMenuPrimitive.SubTrigger,
320
+ __spreadProps(__spreadValues({
321
+ ref,
322
+ className: cn(
323
+ "flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
324
+ inset && "pl-8",
325
+ className
326
+ )
327
+ }, props), {
328
+ children: [
329
+ children,
330
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_lucide_react.ChevronRight, { className: "ml-auto" })
331
+ ]
332
+ })
333
+ );
334
+ });
335
+ DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
336
+ var DropdownMenuSubContent = React3.forwardRef((_a, ref) => {
337
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
338
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
339
+ DropdownMenuPrimitive.SubContent,
340
+ __spreadValues({
341
+ ref,
342
+ className: cn(
343
+ "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
344
+ className
345
+ )
346
+ }, props)
347
+ );
348
+ });
349
+ DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
350
+ var DropdownMenuContent = React3.forwardRef((_a, ref) => {
351
+ var _b = _a, { className, sideOffset = 4 } = _b, props = __objRest(_b, ["className", "sideOffset"]);
352
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
353
+ DropdownMenuPrimitive.Content,
354
+ __spreadValues({
355
+ ref,
356
+ sideOffset,
357
+ className: cn(
358
+ "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md",
359
+ "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
360
+ className
361
+ )
362
+ }, props)
363
+ ) });
364
+ });
365
+ DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
366
+ var DropdownMenuItem = React3.forwardRef((_a, ref) => {
367
+ var _b = _a, { className, inset } = _b, props = __objRest(_b, ["className", "inset"]);
368
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
369
+ DropdownMenuPrimitive.Item,
370
+ __spreadValues({
371
+ ref,
372
+ className: cn(
373
+ "relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",
374
+ inset && "pl-8",
375
+ className
376
+ )
377
+ }, props)
378
+ );
379
+ });
380
+ DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
381
+ var DropdownMenuCheckboxItem = React3.forwardRef((_a, ref) => {
382
+ var _b = _a, { className, children, checked } = _b, props = __objRest(_b, ["className", "children", "checked"]);
383
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
384
+ DropdownMenuPrimitive.CheckboxItem,
385
+ __spreadProps(__spreadValues({
386
+ ref,
387
+ className: cn(
388
+ "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
389
+ className
390
+ ),
391
+ checked
392
+ }, props), {
393
+ children: [
394
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_lucide_react.Check, { className: "h-4 w-4" }) }) }),
395
+ children
396
+ ]
397
+ })
398
+ );
399
+ });
400
+ DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
401
+ var DropdownMenuRadioItem = React3.forwardRef((_a, ref) => {
402
+ var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
403
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
404
+ DropdownMenuPrimitive.RadioItem,
405
+ __spreadProps(__spreadValues({
406
+ ref,
407
+ className: cn(
408
+ "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
409
+ className
410
+ )
411
+ }, props), {
412
+ children: [
413
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_lucide_react.Circle, { className: "h-2 w-2 fill-current" }) }) }),
414
+ children
415
+ ]
416
+ })
417
+ );
418
+ });
419
+ DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
420
+ var DropdownMenuLabel = React3.forwardRef((_a, ref) => {
421
+ var _b = _a, { className, inset } = _b, props = __objRest(_b, ["className", "inset"]);
422
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
423
+ DropdownMenuPrimitive.Label,
424
+ __spreadValues({
425
+ ref,
426
+ className: cn(
427
+ "px-2 py-1.5 text-sm font-semibold",
428
+ inset && "pl-8",
429
+ className
430
+ )
431
+ }, props)
432
+ );
433
+ });
434
+ DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
435
+ var DropdownMenuSeparator = React3.forwardRef((_a, ref) => {
436
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
437
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
438
+ DropdownMenuPrimitive.Separator,
439
+ __spreadValues({
440
+ ref,
441
+ className: cn("-mx-1 my-1 h-px bg-muted", className)
442
+ }, props)
443
+ );
444
+ });
445
+ DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
446
+ var DropdownMenuShortcut = (_a) => {
447
+ var _b = _a, {
448
+ className
449
+ } = _b, props = __objRest(_b, [
450
+ "className"
451
+ ]);
452
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
453
+ "span",
454
+ __spreadValues({
455
+ className: cn("ml-auto text-xs tracking-widest opacity-60", className)
456
+ }, props)
457
+ );
458
+ };
459
+ DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
460
+
461
+ // src/components/dataDisplay/Table/components/DynamicTable/data-table-view-options.tsx
462
+ var import_jsx_runtime4 = require("react/jsx-runtime");
463
+ function DataTableViewOptions({
464
+ table
465
+ }) {
466
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(DropdownMenu, { children: [
467
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_dropdown_menu.DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
468
+ Button,
469
+ {
470
+ variant: "outline",
471
+ size: "sm",
472
+ className: "ml-auto hidden h-8 lg:flex",
473
+ children: [
474
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_icons.MixerHorizontalIcon, { className: "mr-2 h-4 w-4" }),
475
+ "Colunas"
476
+ ]
477
+ }
478
+ ) }),
479
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(DropdownMenuContent, { align: "end", className: "w-[150px]", children: [
480
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(DropdownMenuLabel, { children: "Colunas vis\xEDveis" }),
481
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(DropdownMenuSeparator, {}),
482
+ table.getAllColumns().filter(
483
+ (column) => typeof column.accessorFn !== "undefined" && column.getCanHide()
484
+ ).map((column) => {
485
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
486
+ DropdownMenuCheckboxItem,
487
+ {
488
+ className: "capitalize",
489
+ checked: column.getIsVisible(),
490
+ onCheckedChange: (value) => column.toggleVisibility(!!value),
491
+ children: column.id
492
+ },
493
+ column.id
494
+ );
495
+ })
496
+ ] })
497
+ ] });
498
+ }
499
+
500
+ // src/components/dataDisplay/Table/components/DynamicTable/data-table-toolbar.tsx
501
+ var import_jsx_runtime5 = require("react/jsx-runtime");
502
+ function DataTableToolbar({
503
+ table,
504
+ filters,
505
+ showColumnVisibility
506
+ }) {
507
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex items-center justify-between", children: [
508
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "flex flex-1 items-center space-x-2", children: filters }),
509
+ showColumnVisibility && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(DataTableViewOptions, { table })
510
+ ] });
511
+ }
512
+
513
+ // src/components/dataDisplay/Table/components/DynamicTable/data-table-pagination.tsx
514
+ var import_react_icons2 = require("@radix-ui/react-icons");
515
+
516
+ // src/components/ui/select.tsx
517
+ var React4 = __toESM(require("react"));
518
+ var SelectPrimitive = __toESM(require("@radix-ui/react-select"));
519
+ var import_lucide_react2 = require("lucide-react");
520
+ var import_jsx_runtime6 = require("react/jsx-runtime");
521
+ var Select = SelectPrimitive.Root;
522
+ var SelectValue = SelectPrimitive.Value;
523
+ var SelectTrigger = React4.forwardRef((_a, ref) => {
524
+ var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
525
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
526
+ SelectPrimitive.Trigger,
527
+ __spreadProps(__spreadValues({
528
+ ref,
529
+ className: cn(
530
+ "flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
531
+ className
532
+ )
533
+ }, props), {
534
+ children: [
535
+ children,
536
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_lucide_react2.ChevronDown, { className: "h-4 w-4 opacity-50" }) })
537
+ ]
538
+ })
539
+ );
540
+ });
541
+ SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
542
+ var SelectScrollUpButton = React4.forwardRef((_a, ref) => {
543
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
544
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
545
+ SelectPrimitive.ScrollUpButton,
546
+ __spreadProps(__spreadValues({
547
+ ref,
548
+ className: cn(
549
+ "flex cursor-default items-center justify-center py-1",
550
+ className
551
+ )
552
+ }, props), {
553
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_lucide_react2.ChevronUp, { className: "h-4 w-4" })
554
+ })
555
+ );
556
+ });
557
+ SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
558
+ var SelectScrollDownButton = React4.forwardRef((_a, ref) => {
559
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
560
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
561
+ SelectPrimitive.ScrollDownButton,
562
+ __spreadProps(__spreadValues({
563
+ ref,
564
+ className: cn(
565
+ "flex cursor-default items-center justify-center py-1",
566
+ className
567
+ )
568
+ }, props), {
569
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_lucide_react2.ChevronDown, { className: "h-4 w-4" })
570
+ })
571
+ );
572
+ });
573
+ SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
574
+ var SelectContent = React4.forwardRef((_a, ref) => {
575
+ var _b = _a, { className, children, position = "popper" } = _b, props = __objRest(_b, ["className", "children", "position"]);
576
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SelectPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
577
+ SelectPrimitive.Content,
578
+ __spreadProps(__spreadValues({
579
+ ref,
580
+ className: cn(
581
+ "relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
582
+ position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
583
+ className
584
+ ),
585
+ position
586
+ }, props), {
587
+ children: [
588
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SelectScrollUpButton, {}),
589
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
590
+ SelectPrimitive.Viewport,
591
+ {
592
+ className: cn(
593
+ "p-1",
594
+ position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
595
+ ),
596
+ children
597
+ }
598
+ ),
599
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SelectScrollDownButton, {})
600
+ ]
601
+ })
602
+ ) });
603
+ });
604
+ SelectContent.displayName = SelectPrimitive.Content.displayName;
605
+ var SelectLabel = React4.forwardRef((_a, ref) => {
606
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
607
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
608
+ SelectPrimitive.Label,
609
+ __spreadValues({
610
+ ref,
611
+ className: cn("px-2 py-1.5 text-sm font-semibold", className)
612
+ }, props)
613
+ );
614
+ });
615
+ SelectLabel.displayName = SelectPrimitive.Label.displayName;
616
+ var SelectItem = React4.forwardRef((_a, ref) => {
617
+ var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
618
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
619
+ SelectPrimitive.Item,
620
+ __spreadProps(__spreadValues({
621
+ ref,
622
+ className: cn(
623
+ "relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
624
+ className
625
+ )
626
+ }, props), {
627
+ children: [
628
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_lucide_react2.Check, { className: "h-4 w-4" }) }) }),
629
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SelectPrimitive.ItemText, { children })
630
+ ]
631
+ })
632
+ );
633
+ });
634
+ SelectItem.displayName = SelectPrimitive.Item.displayName;
635
+ var SelectSeparator = React4.forwardRef((_a, ref) => {
636
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
637
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
638
+ SelectPrimitive.Separator,
639
+ __spreadValues({
640
+ ref,
641
+ className: cn("-mx-1 my-1 h-px bg-muted", className)
642
+ }, props)
643
+ );
644
+ });
645
+ SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
646
+
647
+ // src/components/dataDisplay/Table/components/DynamicTable/data-table-pagination.tsx
648
+ var import_jsx_runtime7 = require("react/jsx-runtime");
649
+ function DataTablePagination({
650
+ table,
651
+ pageSizeOptions = [10, 20, 30, 40, 50]
652
+ }) {
653
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex items-center justify-between px-2", children: [
654
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex-1 text-sm text-muted-foreground", children: [
655
+ table.getFilteredSelectedRowModel().rows.length,
656
+ " de",
657
+ " ",
658
+ table.getFilteredRowModel().rows.length,
659
+ " linha(s) selecionada(s)."
660
+ ] }),
661
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex items-center space-x-6 lg:space-x-8", children: [
662
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex items-center space-x-2", children: [
663
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { className: "text-sm font-medium", children: "Linhas por p\xE1gina" }),
664
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
665
+ Select,
666
+ {
667
+ value: `${table.getState().pagination.pageSize}`,
668
+ onValueChange: (value) => {
669
+ table.setPageSize(Number(value));
670
+ },
671
+ children: [
672
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SelectTrigger, { className: "h-8 w-[70px]", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SelectValue, { placeholder: table.getState().pagination.pageSize }) }),
673
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SelectContent, { side: "top", children: pageSizeOptions.map((pageSize) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SelectItem, { value: `${pageSize}`, children: pageSize }, pageSize)) })
674
+ ]
675
+ }
676
+ )
677
+ ] }),
678
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex w-[100px] items-center justify-center text-sm font-medium", children: [
679
+ "P\xE1gina ",
680
+ table.getState().pagination.pageIndex + 1,
681
+ " de",
682
+ " ",
683
+ table.getPageCount()
684
+ ] }),
685
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex items-center space-x-2", children: [
686
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
687
+ Button,
688
+ {
689
+ variant: "outline",
690
+ className: "hidden h-8 w-8 p-0 lg:flex",
691
+ onClick: () => table.setPageIndex(0),
692
+ disabled: !table.getCanPreviousPage(),
693
+ children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react_icons2.DoubleArrowLeftIcon, { className: "h-4 w-4" })
694
+ }
695
+ ),
696
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
697
+ Button,
698
+ {
699
+ variant: "outline",
700
+ className: "h-8 w-8 p-0",
701
+ onClick: () => table.previousPage(),
702
+ disabled: !table.getCanPreviousPage(),
703
+ children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react_icons2.ChevronLeftIcon, { className: "h-4 w-4" })
704
+ }
705
+ ),
706
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
707
+ Button,
708
+ {
709
+ variant: "outline",
710
+ className: "h-8 w-8 p-0",
711
+ onClick: () => table.nextPage(),
712
+ disabled: !table.getCanNextPage(),
713
+ children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react_icons2.ChevronRightIcon, { className: "h-4 w-4" })
714
+ }
715
+ ),
716
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
717
+ Button,
718
+ {
719
+ variant: "outline",
720
+ className: "hidden h-8 w-8 p-0 lg:flex",
721
+ onClick: () => table.setPageIndex(table.getPageCount() - 1),
722
+ disabled: !table.getCanNextPage(),
723
+ children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react_icons2.DoubleArrowRightIcon, { className: "h-4 w-4" })
724
+ }
725
+ )
726
+ ] })
727
+ ] })
728
+ ] });
729
+ }
730
+
731
+ // src/components/dataDisplay/Table/components/DynamicTable/data-table-column-header.tsx
732
+ var import_react_icons3 = require("@radix-ui/react-icons");
733
+ var import_jsx_runtime8 = require("react/jsx-runtime");
734
+ function DataTableColumnHeader({
735
+ column,
736
+ title,
737
+ className
738
+ }) {
739
+ if (!column.getCanSort()) {
740
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: cn(className), children: title });
741
+ }
742
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: cn("flex items-center space-x-2", className), children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(DropdownMenu, { children: [
743
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
744
+ Button,
745
+ {
746
+ variant: "ghost",
747
+ size: "sm",
748
+ className: "-ml-3 h-8 data-[state=open]:bg-accent",
749
+ children: [
750
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { children: title }),
751
+ column.getIsSorted() === "desc" ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_icons3.ArrowDownIcon, { className: "ml-2 h-4 w-4" }) : column.getIsSorted() === "asc" ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_icons3.ArrowUpIcon, { className: "ml-2 h-4 w-4" }) : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_icons3.CaretSortIcon, { className: "ml-2 h-4 w-4" })
752
+ ]
753
+ }
754
+ ) }),
755
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(DropdownMenuContent, { align: "start", children: [
756
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(DropdownMenuItem, { onClick: () => column.toggleSorting(false), children: [
757
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_icons3.ArrowUpIcon, { className: "mr-2 h-3.5 w-3.5 text-muted-foreground/70" }),
758
+ "Crescente"
759
+ ] }),
760
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(DropdownMenuItem, { onClick: () => column.toggleSorting(true), children: [
761
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_icons3.ArrowDownIcon, { className: "mr-2 h-3.5 w-3.5 text-muted-foreground/70" }),
762
+ "Decrescente"
763
+ ] }),
764
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(DropdownMenuSeparator, {}),
765
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(DropdownMenuItem, { onClick: () => column.toggleVisibility(false), children: [
766
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_icons3.EyeNoneIcon, { className: "mr-2 h-3.5 w-3.5 text-muted-foreground/70" }),
767
+ "Ocultar"
768
+ ] })
769
+ ] })
770
+ ] }) });
771
+ }
772
+
773
+ // src/components/dataDisplay/Table/components/DynamicTable/index.tsx
774
+ var import_jsx_runtime9 = require("react/jsx-runtime");
775
+ function DynamicTable({
776
+ data,
777
+ columns,
778
+ className,
779
+ toolbar,
780
+ pagination: showPagination = true,
781
+ sorting: showSorting = true,
782
+ columnVisibility: showColumnVisibility = true,
783
+ filters,
784
+ rowsPerPage = [10, 20, 30, 40, 50],
785
+ defaultSort = [],
786
+ defaultVisibility = {}
787
+ }) {
788
+ var _a;
789
+ const [sorting, setSorting] = React5.useState(defaultSort);
790
+ const [columnVisibility, setColumnVisibility] = React5.useState(defaultVisibility);
791
+ const [{ pageIndex, pageSize }, setPagination] = React5.useState({
792
+ pageIndex: 0,
793
+ pageSize: rowsPerPage[0]
794
+ });
795
+ const pagination = React5.useMemo(
796
+ () => ({
797
+ pageIndex,
798
+ pageSize
799
+ }),
800
+ [pageIndex, pageSize]
801
+ );
802
+ const table = (0, import_react_table.useReactTable)({
803
+ data,
804
+ columns,
805
+ getCoreRowModel: (0, import_react_table.getCoreRowModel)(),
806
+ onSortingChange: setSorting,
807
+ getSortedRowModel: showSorting ? (0, import_react_table.getSortedRowModel)() : void 0,
808
+ getPaginationRowModel: (0, import_react_table.getPaginationRowModel)(),
809
+ onColumnVisibilityChange: setColumnVisibility,
810
+ onPaginationChange: setPagination,
811
+ manualPagination: false,
812
+ pageCount: Math.ceil(data.length / pageSize),
813
+ state: {
814
+ sorting,
815
+ columnVisibility,
816
+ pagination
817
+ },
818
+ enableSorting: showSorting
819
+ });
820
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "space-y-4", children: [
821
+ (toolbar || filters || showColumnVisibility) && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
822
+ DataTableToolbar,
823
+ {
824
+ table,
825
+ filters,
826
+ showColumnVisibility
827
+ }
828
+ ),
829
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: cn("rounded-md border", className), children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(Table, { children: [
830
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(TableHeader, { children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(TableRow, { children: headerGroup.headers.map((header) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(TableHead, { children: header.isPlaceholder ? null : /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
831
+ DataTableColumnHeader,
832
+ {
833
+ column: header.column,
834
+ title: header.column.columnDef.header
835
+ }
836
+ ) }, header.id)) }, headerGroup.id)) }),
837
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(TableBody, { children: ((_a = table.getRowModel().rows) == null ? void 0 : _a.length) ? table.getRowModel().rows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(TableRow, { children: row.getVisibleCells().map((cell) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(TableCell, { children: (0, import_react_table.flexRender)(
838
+ cell.column.columnDef.cell,
839
+ cell.getContext()
840
+ ) }, cell.id)) }, row.id)) : /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
841
+ TableCell,
842
+ {
843
+ colSpan: columns.length,
844
+ className: "h-24 text-center",
845
+ children: "Nenhum resultado encontrado."
846
+ }
847
+ ) }) })
848
+ ] }) }),
849
+ showPagination && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(DataTablePagination, { table, pageSizeOptions: rowsPerPage })
850
+ ] });
851
+ }
852
+
853
+ // src/components/ui/badge.tsx
854
+ var import_class_variance_authority2 = require("class-variance-authority");
855
+ var import_jsx_runtime10 = require("react/jsx-runtime");
856
+ var badgeVariants = (0, import_class_variance_authority2.cva)(
857
+ "inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
858
+ {
859
+ variants: {
860
+ variant: {
861
+ default: "border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",
862
+ secondary: "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
863
+ destructive: "border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",
864
+ success: "border-transparent bg-success text-primary-foreground shadow hover:bg-success/80",
865
+ warning: "border-transparent bg-warning text-primary-foreground shadow hover:bg-warning/80",
866
+ outline: "text-foreground"
867
+ }
868
+ },
869
+ defaultVariants: {
870
+ variant: "default"
871
+ }
872
+ }
873
+ );
874
+ function Badge(_a) {
875
+ var _b = _a, { className, variant } = _b, props = __objRest(_b, ["className", "variant"]);
876
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", __spreadValues({ className: cn(badgeVariants({ variant }), className) }, props));
877
+ }
878
+
879
+ // src/components/dataDisplay/Icon/Icon.tsx
880
+ var import_react = require("react");
881
+ var import_react_icons4 = require("react-icons");
882
+ var import_jsx_runtime11 = require("react/jsx-runtime");
883
+ var Icon2 = (_a) => {
884
+ var _b = _a, { name, size = 24 } = _b, rest = __objRest(_b, ["name", "size"]);
885
+ const nameIcon = (0, import_react.useMemo)(() => name, [name]);
886
+ const iconsModulePath = (0, import_react.useMemo)(
887
+ () => ({
888
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
889
+ md: require("react-icons/md"),
890
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
891
+ fa: require("react-icons/fa"),
892
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
893
+ bs: require("react-icons/bs")
894
+ }),
895
+ []
896
+ );
897
+ const typeIcon = (0, import_react.useMemo)(() => {
898
+ var _a2;
899
+ const matches = [...nameIcon.matchAll(/[A-Z]/g)];
900
+ return String(
901
+ nameIcon.slice(0, (_a2 = matches[1]) == null ? void 0 : _a2.index) || ""
902
+ ).toLocaleLowerCase();
903
+ }, [nameIcon]);
904
+ const Icon3 = (0, import_react.useCallback)(
905
+ (props) => {
906
+ var _a2, _b2;
907
+ try {
908
+ if (!typeIcon || !nameIcon) return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_jsx_runtime11.Fragment, {});
909
+ return (_b2 = (_a2 = iconsModulePath[typeIcon])[nameIcon]) == null ? void 0 : _b2.call(_a2, props);
910
+ } catch (e) {
911
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_jsx_runtime11.Fragment, {});
912
+ }
913
+ },
914
+ [iconsModulePath, nameIcon, typeIcon]
915
+ );
916
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_icons4.IconContext.Provider, { value: { size: String(size) }, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Icon3, __spreadValues({}, rest)) });
917
+ };
918
+
919
+ // src/components/ui/avatar.tsx
920
+ var React7 = __toESM(require("react"));
921
+ var AvatarPrimitive = __toESM(require("@radix-ui/react-avatar"));
922
+ var import_jsx_runtime12 = require("react/jsx-runtime");
923
+ var Avatar = React7.forwardRef((_a, ref) => {
924
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
925
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
926
+ AvatarPrimitive.Root,
927
+ __spreadValues({
928
+ ref,
929
+ className: cn(
930
+ "relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",
931
+ className
932
+ )
933
+ }, props)
934
+ );
935
+ });
936
+ Avatar.displayName = AvatarPrimitive.Root.displayName;
937
+ var AvatarImage = React7.forwardRef((_a, ref) => {
938
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
939
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
940
+ AvatarPrimitive.Image,
941
+ __spreadValues({
942
+ ref,
943
+ className: cn("aspect-square h-full w-full", className)
944
+ }, props)
945
+ );
946
+ });
947
+ AvatarImage.displayName = AvatarPrimitive.Image.displayName;
948
+ var AvatarFallback = React7.forwardRef((_a, ref) => {
949
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
950
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
951
+ AvatarPrimitive.Fallback,
952
+ __spreadValues({
953
+ ref,
954
+ className: cn(
955
+ "flex h-full w-full items-center justify-center rounded-full bg-muted",
956
+ className
957
+ )
958
+ }, props)
959
+ );
960
+ });
961
+ AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;
962
+
963
+ // src/components/dataDisplay/DataPairList/DataPairList.tsx
964
+ var import_lodash = require("lodash");
965
+
966
+ // src/components/dataDisplay/Text/Text.tsx
967
+ var import_class_variance_authority3 = require("class-variance-authority");
968
+ var import_jsx_runtime13 = require("react/jsx-runtime");
969
+ var textVariants = (0, import_class_variance_authority3.cva)("", {
970
+ variants: {
971
+ variant: {
972
+ display: "text-5xl font-extrabold tracking-tight",
973
+ title: "text-3xl font-bold tracking-tight",
974
+ subtitle: "text-2xl font-semibold",
975
+ normal: "text-base font-normal",
976
+ caption: "text-sm font-medium",
977
+ muted: "text-sm font-normal text-muted-foreground"
978
+ },
979
+ align: {
980
+ left: "text-left",
981
+ center: "text-center",
982
+ right: "text-right",
983
+ justify: "text-justify"
984
+ }
985
+ },
986
+ defaultVariants: {
987
+ variant: "normal",
988
+ align: "left"
989
+ }
990
+ });
991
+ var tagMap = {
992
+ display: "h1",
993
+ title: "h2",
994
+ subtitle: "h3",
995
+ normal: "p",
996
+ caption: "small",
997
+ muted: "p"
998
+ };
999
+ function Text({
1000
+ variant = "normal",
1001
+ align,
1002
+ className,
1003
+ children
1004
+ }) {
1005
+ const Tag = tagMap[variant || "normal"] || "p";
1006
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Tag, { className: cn(textVariants({ variant, align }), className), children });
1007
+ }
1008
+
1009
+ // src/components/dataDisplay/DataPairList/DataPairList.tsx
1010
+ var import_jsx_runtime14 = require("react/jsx-runtime");
1011
+ var DataPairList = ({
1012
+ title,
1013
+ data,
1014
+ labels,
1015
+ className,
1016
+ infoDirection = "horizontal",
1017
+ direction = "vertical",
1018
+ withBorder = false,
1019
+ header = /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_jsx_runtime14.Fragment, {})
1020
+ }) => {
1021
+ if ((0, import_lodash.isEmpty)(data)) return null;
1022
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
1023
+ "div",
1024
+ {
1025
+ className: cn(
1026
+ "flex flex-col gap-2 rounded-md p-4",
1027
+ withBorder && "border border-muted",
1028
+ className
1029
+ ),
1030
+ children: [
1031
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex gap-3", children: [
1032
+ title && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Text, { variant: "title", children: title }),
1033
+ header
1034
+ ] }),
1035
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1036
+ "div",
1037
+ {
1038
+ className: cn(
1039
+ "grid grid-cols-1 mt-5",
1040
+ direction === "vertical" ? "gap-3" : "sm:grid-cols-2 md:grid-cols-4 gap-10"
1041
+ ),
1042
+ children: Object.entries(data || {}).map(([key, value], index) => /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
1043
+ "div",
1044
+ {
1045
+ className: cn(
1046
+ "flex gap-3",
1047
+ infoDirection === "horizontal" ? "flex-row" : "flex-col"
1048
+ ),
1049
+ children: [
1050
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(Text, { className: "uppercase text-muted-foreground font-bold", children: [
1051
+ (labels == null ? void 0 : labels[key]) || key,
1052
+ ":"
1053
+ ] }),
1054
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Text, { children: value })
1055
+ ]
1056
+ },
1057
+ index
1058
+ ))
1059
+ }
1060
+ )
1061
+ ]
1062
+ }
1063
+ );
1064
+ };
1065
+
1066
+ // src/components/dataInput/checkbox/Checkbox.tsx
1067
+ var import_react_hook_form3 = require("react-hook-form");
1068
+
1069
+ // src/components/ui/checkbox.tsx
1070
+ var React8 = __toESM(require("react"));
1071
+ var CheckboxPrimitive = __toESM(require("@radix-ui/react-checkbox"));
1072
+ var import_lucide_react3 = require("lucide-react");
1073
+ var import_jsx_runtime15 = require("react/jsx-runtime");
1074
+ var Checkbox = React8.forwardRef((_a, ref) => {
1075
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
1076
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1077
+ CheckboxPrimitive.Root,
1078
+ __spreadProps(__spreadValues({
1079
+ ref,
1080
+ className: cn(
1081
+ "peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",
1082
+ className
1083
+ )
1084
+ }, props), {
1085
+ children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1086
+ CheckboxPrimitive.Indicator,
1087
+ {
1088
+ className: cn("flex items-center justify-center text-current"),
1089
+ children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react3.Check, { className: "h-4 w-4" })
1090
+ }
1091
+ )
1092
+ })
1093
+ );
1094
+ });
1095
+ Checkbox.displayName = CheckboxPrimitive.Root.displayName;
1096
+
1097
+ // src/components/ui/label.tsx
1098
+ var React9 = __toESM(require("react"));
1099
+ var LabelPrimitive = __toESM(require("@radix-ui/react-label"));
1100
+ var import_class_variance_authority4 = require("class-variance-authority");
1101
+ var import_jsx_runtime16 = require("react/jsx-runtime");
1102
+ var labelVariants = (0, import_class_variance_authority4.cva)(
1103
+ "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
1104
+ );
1105
+ var Label3 = React9.forwardRef((_a, ref) => {
1106
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
1107
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1108
+ LabelPrimitive.Root,
1109
+ __spreadValues({
1110
+ ref,
1111
+ className: cn(labelVariants(), className)
1112
+ }, props)
1113
+ );
1114
+ });
1115
+ Label3.displayName = LabelPrimitive.Root.displayName;
1116
+
1117
+ // src/components/dataInput/form/index.ts
1118
+ var import_react_hook_form2 = require("react-hook-form");
1119
+
1120
+ // src/components/ui/form.tsx
1121
+ var React10 = __toESM(require("react"));
1122
+ var import_react_slot2 = require("@radix-ui/react-slot");
1123
+ var import_react_hook_form = require("react-hook-form");
1124
+ var import_jsx_runtime17 = require("react/jsx-runtime");
1125
+ var Form = import_react_hook_form.FormProvider;
1126
+ var FormFieldContext = React10.createContext(
1127
+ {}
1128
+ );
1129
+ var FormField = (_a) => {
1130
+ var props = __objRest(_a, []);
1131
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(FormFieldContext.Provider, { value: { name: props.name }, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_hook_form.Controller, __spreadValues({}, props)) });
1132
+ };
1133
+ var useFormField = () => {
1134
+ const fieldContext = React10.useContext(FormFieldContext);
1135
+ const itemContext = React10.useContext(FormItemContext);
1136
+ const { getFieldState, formState } = (0, import_react_hook_form.useFormContext)();
1137
+ const fieldState = getFieldState(fieldContext.name, formState);
1138
+ if (!fieldContext) {
1139
+ throw new Error("useFormField should be used within <FormField>");
1140
+ }
1141
+ const { id } = itemContext;
1142
+ return __spreadValues({
1143
+ id,
1144
+ name: fieldContext.name,
1145
+ formItemId: `${id}-form-item`,
1146
+ formDescriptionId: `${id}-form-item-description`,
1147
+ formMessageId: `${id}-form-item-message`
1148
+ }, fieldState);
1149
+ };
1150
+ var FormItemContext = React10.createContext(
1151
+ {}
1152
+ );
1153
+ var FormItem = React10.forwardRef((_a, ref) => {
1154
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
1155
+ const id = React10.useId();
1156
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(FormItemContext.Provider, { value: { id }, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", __spreadValues({ ref, className: cn("space-y-2", className) }, props)) });
1157
+ });
1158
+ FormItem.displayName = "FormItem";
1159
+ var FormLabel = React10.forwardRef((_a, ref) => {
1160
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
1161
+ const { error, formItemId } = useFormField();
1162
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1163
+ Label3,
1164
+ __spreadValues({
1165
+ ref,
1166
+ className: cn(error && "text-destructive", className),
1167
+ htmlFor: formItemId
1168
+ }, props)
1169
+ );
1170
+ });
1171
+ FormLabel.displayName = "FormLabel";
1172
+ var FormControl = React10.forwardRef((_a, ref) => {
1173
+ var props = __objRest(_a, []);
1174
+ const { error, formItemId, formDescriptionId, formMessageId } = useFormField();
1175
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1176
+ import_react_slot2.Slot,
1177
+ __spreadValues({
1178
+ ref,
1179
+ id: formItemId,
1180
+ "aria-describedby": !error ? `${formDescriptionId}` : `${formDescriptionId} ${formMessageId}`,
1181
+ "aria-invalid": !!error
1182
+ }, props)
1183
+ );
1184
+ });
1185
+ FormControl.displayName = "FormControl";
1186
+ var FormDescription = React10.forwardRef((_a, ref) => {
1187
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
1188
+ const { formDescriptionId } = useFormField();
1189
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1190
+ "p",
1191
+ __spreadValues({
1192
+ ref,
1193
+ id: formDescriptionId,
1194
+ className: cn("text-[0.8rem] text-muted-foreground", className)
1195
+ }, props)
1196
+ );
1197
+ });
1198
+ FormDescription.displayName = "FormDescription";
1199
+ var FormMessage = React10.forwardRef((_a, ref) => {
1200
+ var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
1201
+ const { error, formMessageId } = useFormField();
1202
+ const body = error ? String(error == null ? void 0 : error.message) : children;
1203
+ if (!body) {
1204
+ return null;
1205
+ }
1206
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1207
+ "p",
1208
+ __spreadProps(__spreadValues({
1209
+ ref,
1210
+ id: formMessageId,
1211
+ className: cn("text-[0.8rem] font-medium text-destructive", className)
1212
+ }, props), {
1213
+ children: body
1214
+ })
1215
+ );
1216
+ });
1217
+ FormMessage.displayName = "FormMessage";
1218
+
1219
+ // src/components/dataDisplay/ErrorMessage/ErrorMessage.tsx
1220
+ var import_jsx_runtime18 = require("react/jsx-runtime");
1221
+ var ErrorMessage = ({ children }) => {
1222
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "text-sm font-medium text-destructive", children });
1223
+ };
1224
+
1225
+ // src/components/dataInput/checkbox/Checkbox.tsx
1226
+ var import_jsx_runtime19 = require("react/jsx-runtime");
1227
+ var Checkbox2 = (_a) => {
1228
+ var _b = _a, {
1229
+ label,
1230
+ error,
1231
+ withoutForm
1232
+ } = _b, props = __objRest(_b, [
1233
+ "label",
1234
+ "error",
1235
+ "withoutForm"
1236
+ ]);
1237
+ var _a2;
1238
+ const form = (0, import_react_hook_form3.useFormContext)();
1239
+ const hasForm = !withoutForm && !!form && !!props.name;
1240
+ if (!hasForm)
1241
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "flex items-center space-x-2", children: [
1242
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Checkbox, __spreadValues({}, props)),
1243
+ label && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Label3, { htmlFor: props.id, children: label }),
1244
+ error && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(ErrorMessage, { children: error })
1245
+ ] });
1246
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1247
+ FormField,
1248
+ {
1249
+ control: form.control,
1250
+ name: (_a2 = props.name) != null ? _a2 : "",
1251
+ render: ({ field }) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(FormItem, { className: "flex flex-row items-start space-x-3 space-y-0 rounded-md border p-4", children: [
1252
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(FormControl, { children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1253
+ Checkbox,
1254
+ {
1255
+ checked: field.value,
1256
+ onCheckedChange: field.onChange
1257
+ }
1258
+ ) }),
1259
+ label && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "space-y-1 leading-none", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(FormLabel, { children: label }) })
1260
+ ] })
1261
+ }
1262
+ );
1263
+ };
1264
+
1265
+ // src/components/ui/input.tsx
1266
+ var React11 = __toESM(require("react"));
1267
+ var import_jsx_runtime20 = require("react/jsx-runtime");
1268
+ var Input = React11.forwardRef(
1269
+ (_a, ref) => {
1270
+ var _b = _a, { className, type } = _b, props = __objRest(_b, ["className", "type"]);
1271
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1272
+ "input",
1273
+ __spreadValues({
1274
+ type,
1275
+ className: cn(
1276
+ "flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
1277
+ className
1278
+ ),
1279
+ ref
1280
+ }, props)
1281
+ );
1282
+ }
1283
+ );
1284
+ Input.displayName = "Input";
1285
+
1286
+ // src/components/dataInput/Input/components/Input/index.tsx
1287
+ var import_react3 = require("react");
1288
+
1289
+ // src/components/feedback/ErrorLabel/index.tsx
1290
+ var import_jsx_runtime21 = require("react/jsx-runtime");
1291
+ var ErrorLabel = ({
1292
+ children,
1293
+ className,
1294
+ "data-testid": dataTestId
1295
+ }) => {
1296
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
1297
+ "div",
1298
+ {
1299
+ className: cn("flex items-center gap-2 my-2", className),
1300
+ "data-testid": `${dataTestId}-error-label`,
1301
+ children: [
1302
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Icon2, { name: "MdErrorOutline", size: 18, className: "text-destructive" }),
1303
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "text-destructive text-sm", children })
1304
+ ]
1305
+ }
1306
+ );
1307
+ };
1308
+
1309
+ // src/components/dataInput/Input/components/InputBase/index.tsx
1310
+ var import_jsx_runtime22 = require("react/jsx-runtime");
1311
+ var InputBase = ({
1312
+ label,
1313
+ error,
1314
+ children,
1315
+ required,
1316
+ "data-testid": testId
1317
+ }) => {
1318
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { children: [
1319
+ label && /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(Label3, { "data-testid": `${testId}-label`, children: [
1320
+ `${label} ${required ? "*" : ""}`,
1321
+ " "
1322
+ ] }),
1323
+ children,
1324
+ error && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(ErrorLabel, { "data-testid": testId, children: error })
1325
+ ] });
1326
+ };
1327
+
1328
+ // src/hooks/use-conditional-controller.tsx
1329
+ var import_react2 = require("react");
1330
+ var import_react_hook_form4 = require("react-hook-form");
1331
+ var useConditionalController = ({
1332
+ name,
1333
+ withoutForm
1334
+ }) => {
1335
+ const form = (0, import_react_hook_form4.useFormContext)();
1336
+ const hasForm = (0, import_react2.useMemo)(() => {
1337
+ return !withoutForm && !!(form == null ? void 0 : form.control);
1338
+ }, [withoutForm, form]);
1339
+ const tempForm = (0, import_react_hook_form4.useForm)();
1340
+ const controlToUse = (0, import_react2.useMemo)(() => {
1341
+ return hasForm ? form.control : tempForm.control;
1342
+ }, [tempForm, form, hasForm]);
1343
+ const controller = (0, import_react_hook_form4.useController)({
1344
+ control: controlToUse,
1345
+ name: name || "temp"
1346
+ });
1347
+ return hasForm ? controller.field : {};
1348
+ };
1349
+
1350
+ // src/components/dataInput/Input/components/Input/index.tsx
1351
+ var import_jsx_runtime23 = require("react/jsx-runtime");
1352
+ var Input2 = (_a) => {
1353
+ var _b = _a, {
1354
+ "data-testid": dataTestId,
1355
+ withoutForm = false,
1356
+ extraElement,
1357
+ containerClassName
1358
+ } = _b, props = __objRest(_b, [
1359
+ "data-testid",
1360
+ "withoutForm",
1361
+ "extraElement",
1362
+ "containerClassName"
1363
+ ]);
1364
+ const formData = useConditionalController({
1365
+ name: props.name || "",
1366
+ withoutForm
1367
+ });
1368
+ const inputProps = (0, import_react3.useMemo)(() => {
1369
+ return __spreadValues(__spreadValues({}, formData), props);
1370
+ }, [formData, props]);
1371
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
1372
+ InputBase,
1373
+ {
1374
+ label: props.label,
1375
+ error: props.error,
1376
+ required: props.required,
1377
+ "data-testid": dataTestId,
1378
+ children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: cn("flex items-center gap-2", containerClassName), children: [
1379
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
1380
+ Input,
1381
+ __spreadProps(__spreadValues({}, inputProps), {
1382
+ "data-testid": dataTestId,
1383
+ className: cn(
1384
+ props.className,
1385
+ props.error && "border-destructive focus:border-destructive focus-visible:ring-0"
1386
+ )
1387
+ })
1388
+ ),
1389
+ extraElement
1390
+ ] })
1391
+ }
1392
+ );
1393
+ };
1394
+
1395
+ // src/components/dataInput/Input/components/NumberInput/number-input.tsx
1396
+ var import_react_number_format = require("react-number-format");
1397
+ var import_react4 = require("react");
1398
+ var import_jsx_runtime24 = require("react/jsx-runtime");
1399
+ var NumberInput = (props) => {
1400
+ const formData = useConditionalController({
1401
+ name: props.name || "",
1402
+ withoutForm: props.withoutForm
1403
+ });
1404
+ const inputProps = (0, import_react4.useMemo)(() => {
1405
+ return __spreadValues(__spreadValues({}, formData), props);
1406
+ }, [formData, props]);
1407
+ const onValueChange = (0, import_react4.useCallback)(
1408
+ (data, sourceInfo) => {
1409
+ var _a, _b;
1410
+ const syntheticEvent = {
1411
+ target: {
1412
+ value: data.formattedValue,
1413
+ name: props.name
1414
+ },
1415
+ currentTarget: {
1416
+ value: data.formattedValue,
1417
+ name: props.name
1418
+ }
1419
+ };
1420
+ (_a = props.onChange) == null ? void 0 : _a.call(props, syntheticEvent);
1421
+ (_b = props.onValueChange) == null ? void 0 : _b.call(props, data, sourceInfo);
1422
+ if (formData.onChange) {
1423
+ formData.onChange(data.formattedValue);
1424
+ }
1425
+ },
1426
+ [props, formData]
1427
+ );
1428
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(InputBase, __spreadProps(__spreadValues({}, props), { children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
1429
+ import_react_number_format.NumericFormat,
1430
+ __spreadProps(__spreadValues({}, inputProps), {
1431
+ customInput: Input,
1432
+ value: props.value,
1433
+ onValueChange
1434
+ })
1435
+ ) }));
1436
+ };
1437
+
1438
+ // src/components/dataInput/Input/components/MaskInput/mask-input.tsx
1439
+ var React12 = __toESM(require("react"));
1440
+
1441
+ // src/hooks/use-mask.tsx
1442
+ var import_react5 = require("react");
1443
+ var useMask = (_a) => {
1444
+ var _b = _a, { mask } = _b, options = __objRest(_b, ["mask"]);
1445
+ const [value, setValue] = (0, import_react5.useState)("");
1446
+ const applyMask = (0, import_react5.useCallback)(
1447
+ (inputValue) => {
1448
+ if (!inputValue || !mask) return "";
1449
+ const cleanValue = inputValue.replace(/[^a-zA-Z0-9]/g, "");
1450
+ let maskedValue = "";
1451
+ let cleanIndex = 0;
1452
+ for (let i = 0; i < mask.length && cleanIndex < cleanValue.length; i++) {
1453
+ const maskChar = mask[i];
1454
+ const inputChar = cleanValue[cleanIndex];
1455
+ if (maskChar === "9") {
1456
+ if (/\d/.test(inputChar)) {
1457
+ maskedValue += inputChar;
1458
+ cleanIndex++;
1459
+ } else {
1460
+ cleanIndex++;
1461
+ i--;
1462
+ }
1463
+ } else if (maskChar === "A") {
1464
+ if (/[a-zA-Z]/.test(inputChar)) {
1465
+ let char = inputChar;
1466
+ if (options.transform === "uppercase") char = char.toUpperCase();
1467
+ else if (options.transform === "lowercase")
1468
+ char = char.toLowerCase();
1469
+ maskedValue += char;
1470
+ cleanIndex++;
1471
+ } else {
1472
+ cleanIndex++;
1473
+ i--;
1474
+ }
1475
+ } else {
1476
+ maskedValue += maskChar;
1477
+ }
1478
+ }
1479
+ return maskedValue;
1480
+ },
1481
+ [mask, options.transform]
1482
+ );
1483
+ const handleSetValue = (0, import_react5.useCallback)(
1484
+ (newValue) => {
1485
+ const maskedValue = applyMask(newValue);
1486
+ setValue(maskedValue);
1487
+ },
1488
+ [applyMask]
1489
+ );
1490
+ const getRawValue = (0, import_react5.useCallback)(() => {
1491
+ return value.replace(/[^a-zA-Z0-9]/g, "");
1492
+ }, [value]);
1493
+ const isComplete = (0, import_react5.useCallback)(() => {
1494
+ return value.length === mask.length;
1495
+ }, [value, mask]);
1496
+ const isValid = (0, import_react5.useCallback)(() => {
1497
+ return isComplete() && value.length > 0;
1498
+ }, [isComplete, value]);
1499
+ const clear = (0, import_react5.useCallback)(() => {
1500
+ setValue("");
1501
+ }, []);
1502
+ const getFormProps = (0, import_react5.useCallback)(
1503
+ () => ({
1504
+ value,
1505
+ onChange: (e) => {
1506
+ handleSetValue(e.target.value);
1507
+ },
1508
+ placeholder: options.placeholder
1509
+ }),
1510
+ [value, handleSetValue, options.placeholder]
1511
+ );
1512
+ return {
1513
+ value,
1514
+ setValue: handleSetValue,
1515
+ rawValue: getRawValue(),
1516
+ isComplete: isComplete(),
1517
+ isValid: isValid(),
1518
+ applyMask,
1519
+ clear,
1520
+ placeholder: options.placeholder || mask.replace(/[9A]/g, "_"),
1521
+ formProps: getFormProps()
1522
+ };
1523
+ };
1524
+
1525
+ // src/components/dataInput/Input/components/MaskInput/mask-input.tsx
1526
+ var import_react6 = require("react");
1527
+ var import_jsx_runtime25 = require("react/jsx-runtime");
1528
+ var MaskInput = (_a) => {
1529
+ var _b = _a, {
1530
+ "data-testid": dataTestId,
1531
+ withoutForm = false,
1532
+ extraElement,
1533
+ mask = ""
1534
+ } = _b, props = __objRest(_b, [
1535
+ "data-testid",
1536
+ "withoutForm",
1537
+ "extraElement",
1538
+ "mask"
1539
+ ]);
1540
+ const formData = useConditionalController({
1541
+ name: props.name || "",
1542
+ withoutForm
1543
+ });
1544
+ const inputProps = React12.useMemo(() => {
1545
+ return __spreadValues(__spreadValues({}, formData), props);
1546
+ }, [formData, props]);
1547
+ const { applyMask } = useMask({ mask });
1548
+ const inputRef = (0, import_react6.useRef)(null);
1549
+ const applyMaskToInput = React12.useCallback(
1550
+ (value) => {
1551
+ if (inputRef.current && mask) {
1552
+ const maskedValue = applyMask(value);
1553
+ inputRef.current.value = maskedValue;
1554
+ }
1555
+ },
1556
+ [applyMask, mask]
1557
+ );
1558
+ const handleChange = React12.useCallback(
1559
+ (e) => {
1560
+ var _a2;
1561
+ const maskedValue = mask ? applyMask(e.target.value) : e.target.value;
1562
+ const response = __spreadProps(__spreadValues({}, e), {
1563
+ target: __spreadProps(__spreadValues({}, e.target), {
1564
+ value: maskedValue
1565
+ })
1566
+ });
1567
+ applyMaskToInput(maskedValue);
1568
+ return (_a2 = inputProps == null ? void 0 : inputProps.onChange) == null ? void 0 : _a2.call(inputProps, response);
1569
+ },
1570
+ [applyMask, inputProps, mask, applyMaskToInput]
1571
+ );
1572
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
1573
+ Input2,
1574
+ __spreadProps(__spreadValues({}, inputProps), {
1575
+ ref: inputRef,
1576
+ onChange: handleChange,
1577
+ extraElement,
1578
+ "data-testid": dataTestId,
1579
+ withoutForm: true
1580
+ })
1581
+ );
1582
+ };
1583
+
1584
+ // src/components/actions/Button/Button.tsx
1585
+ var import_react7 = require("react");
1586
+
1587
+ // src/components/ui/spinner.tsx
1588
+ var import_class_variance_authority5 = require("class-variance-authority");
1589
+ var import_jsx_runtime26 = require("react/jsx-runtime");
1590
+ var spinnerVariants = (0, import_class_variance_authority5.cva)("flex-col items-center justify-center", {
1591
+ variants: {
1592
+ show: {
1593
+ true: "flex",
1594
+ false: "hidden"
1595
+ }
1596
+ },
1597
+ defaultVariants: {
1598
+ show: true
1599
+ }
1600
+ });
1601
+ var loaderVariants = (0, import_class_variance_authority5.cva)("animate-spin text-primary", {
1602
+ variants: {
1603
+ size: {
1604
+ small: "size-6",
1605
+ medium: "size-8",
1606
+ large: "size-12"
1607
+ }
1608
+ },
1609
+ defaultVariants: {
1610
+ size: "medium"
1611
+ }
1612
+ });
1613
+ function Spinner({
1614
+ size,
1615
+ show,
1616
+ children,
1617
+ className
1618
+ }) {
1619
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("span", { className: spinnerVariants({ show }), children: [
1620
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
1621
+ Icon2,
1622
+ {
1623
+ name: "FaSpinner",
1624
+ className: cn(loaderVariants({ size }), className)
1625
+ }
1626
+ ),
1627
+ children
1628
+ ] });
1629
+ }
1630
+
1631
+ // src/hooks/use-toast.ts
1632
+ var React13 = __toESM(require("react"));
1633
+ var TOAST_LIMIT = 1;
1634
+ var TOAST_REMOVE_DELAY = 1e6;
1635
+ var count = 0;
1636
+ function genId() {
1637
+ count = (count + 1) % Number.MAX_SAFE_INTEGER;
1638
+ return count.toString();
1639
+ }
1640
+ var toastTimeouts = /* @__PURE__ */ new Map();
1641
+ var addToRemoveQueue = (toastId) => {
1642
+ if (toastTimeouts.has(toastId)) {
1643
+ return;
1644
+ }
1645
+ const timeout = setTimeout(() => {
1646
+ toastTimeouts.delete(toastId);
1647
+ dispatch({
1648
+ type: "REMOVE_TOAST",
1649
+ toastId
1650
+ });
1651
+ }, TOAST_REMOVE_DELAY);
1652
+ toastTimeouts.set(toastId, timeout);
1653
+ };
1654
+ var reducer = (state, action) => {
1655
+ switch (action.type) {
1656
+ case "ADD_TOAST":
1657
+ return __spreadProps(__spreadValues({}, state), {
1658
+ toasts: [action.toast, ...state.toasts].slice(0, TOAST_LIMIT)
1659
+ });
1660
+ case "UPDATE_TOAST":
1661
+ return __spreadProps(__spreadValues({}, state), {
1662
+ toasts: state.toasts.map(
1663
+ (t) => t.id === action.toast.id ? __spreadValues(__spreadValues({}, t), action.toast) : t
1664
+ )
1665
+ });
1666
+ case "DISMISS_TOAST": {
1667
+ const { toastId } = action;
1668
+ if (toastId) {
1669
+ addToRemoveQueue(toastId);
1670
+ } else {
1671
+ state.toasts.forEach((toast2) => {
1672
+ addToRemoveQueue(toast2.id);
1673
+ });
1674
+ }
1675
+ return __spreadProps(__spreadValues({}, state), {
1676
+ toasts: state.toasts.map(
1677
+ (t) => t.id === toastId || toastId === void 0 ? __spreadProps(__spreadValues({}, t), {
1678
+ open: false
1679
+ }) : t
1680
+ )
1681
+ });
1682
+ }
1683
+ case "REMOVE_TOAST":
1684
+ if (action.toastId === void 0) {
1685
+ return __spreadProps(__spreadValues({}, state), {
1686
+ toasts: []
1687
+ });
1688
+ }
1689
+ return __spreadProps(__spreadValues({}, state), {
1690
+ toasts: state.toasts.filter((t) => t.id !== action.toastId)
1691
+ });
1692
+ }
1693
+ };
1694
+ var listeners = [];
1695
+ var memoryState = { toasts: [] };
1696
+ function dispatch(action) {
1697
+ memoryState = reducer(memoryState, action);
1698
+ listeners.forEach((listener) => {
1699
+ listener(memoryState);
1700
+ });
1701
+ }
1702
+ function toast(_a) {
1703
+ var props = __objRest(_a, []);
1704
+ const id = genId();
1705
+ const update = (props2) => dispatch({
1706
+ type: "UPDATE_TOAST",
1707
+ toast: __spreadProps(__spreadValues({}, props2), { id })
1708
+ });
1709
+ const dismiss = () => dispatch({ type: "DISMISS_TOAST", toastId: id });
1710
+ dispatch({
1711
+ type: "ADD_TOAST",
1712
+ toast: __spreadProps(__spreadValues({}, props), {
1713
+ id,
1714
+ open: true,
1715
+ onOpenChange: (open) => {
1716
+ if (!open) dismiss();
1717
+ }
1718
+ })
1719
+ });
1720
+ return {
1721
+ id,
1722
+ dismiss,
1723
+ update
1724
+ };
1725
+ }
1726
+ function useToast() {
1727
+ const [state, setState] = React13.useState(memoryState);
1728
+ React13.useEffect(() => {
1729
+ listeners.push(setState);
1730
+ return () => {
1731
+ const index = listeners.indexOf(setState);
1732
+ if (index > -1) {
1733
+ listeners.splice(index, 1);
1734
+ }
1735
+ };
1736
+ }, [state]);
1737
+ return __spreadProps(__spreadValues({}, state), {
1738
+ toast,
1739
+ dismiss: (toastId) => dispatch({ type: "DISMISS_TOAST", toastId })
1740
+ });
1741
+ }
1742
+
1743
+ // src/components/ui/toast.tsx
1744
+ var React14 = __toESM(require("react"));
1745
+ var ToastPrimitives = __toESM(require("@radix-ui/react-toast"));
1746
+ var import_class_variance_authority6 = require("class-variance-authority");
1747
+ var import_lucide_react4 = require("lucide-react");
1748
+ var import_jsx_runtime27 = require("react/jsx-runtime");
1749
+ var ToastProvider = ToastPrimitives.Provider;
1750
+ var ToastViewport = React14.forwardRef((_a, ref) => {
1751
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
1752
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
1753
+ ToastPrimitives.Viewport,
1754
+ __spreadValues({
1755
+ ref,
1756
+ className: cn(
1757
+ "fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",
1758
+ className
1759
+ )
1760
+ }, props)
1761
+ );
1762
+ });
1763
+ ToastViewport.displayName = ToastPrimitives.Viewport.displayName;
1764
+ var toastVariants = (0, import_class_variance_authority6.cva)(
1765
+ "group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",
1766
+ {
1767
+ variants: {
1768
+ variant: {
1769
+ default: "border bg-background text-foreground",
1770
+ success: "border-success bg-success text-success-foreground",
1771
+ destructive: "destructive group border-destructive bg-destructive text-destructive-foreground"
1772
+ }
1773
+ },
1774
+ defaultVariants: {
1775
+ variant: "default"
1776
+ }
1777
+ }
1778
+ );
1779
+ var Toast = React14.forwardRef((_a, ref) => {
1780
+ var _b = _a, { className, variant } = _b, props = __objRest(_b, ["className", "variant"]);
1781
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
1782
+ ToastPrimitives.Root,
1783
+ __spreadValues({
1784
+ ref,
1785
+ className: cn(toastVariants({ variant }), className)
1786
+ }, props)
1787
+ );
1788
+ });
1789
+ Toast.displayName = ToastPrimitives.Root.displayName;
1790
+ var ToastAction = React14.forwardRef((_a, ref) => {
1791
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
1792
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
1793
+ ToastPrimitives.Action,
1794
+ __spreadValues({
1795
+ ref,
1796
+ className: cn(
1797
+ "inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors hover:bg-secondary focus:outline-none focus:ring-1 focus:ring-ring disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",
1798
+ className
1799
+ )
1800
+ }, props)
1801
+ );
1802
+ });
1803
+ ToastAction.displayName = ToastPrimitives.Action.displayName;
1804
+ var ToastClose = React14.forwardRef((_a, ref) => {
1805
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
1806
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
1807
+ ToastPrimitives.Close,
1808
+ __spreadProps(__spreadValues({
1809
+ ref,
1810
+ className: cn(
1811
+ "absolute right-1 top-1 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",
1812
+ className
1813
+ ),
1814
+ "toast-close": ""
1815
+ }, props), {
1816
+ children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_lucide_react4.X, { className: "h-4 w-4" })
1817
+ })
1818
+ );
1819
+ });
1820
+ ToastClose.displayName = ToastPrimitives.Close.displayName;
1821
+ var ToastTitle = React14.forwardRef((_a, ref) => {
1822
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
1823
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
1824
+ ToastPrimitives.Title,
1825
+ __spreadValues({
1826
+ ref,
1827
+ className: cn("text-sm font-semibold [&+div]:text-xs", className)
1828
+ }, props)
1829
+ );
1830
+ });
1831
+ ToastTitle.displayName = ToastPrimitives.Title.displayName;
1832
+ var ToastDescription = React14.forwardRef((_a, ref) => {
1833
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
1834
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
1835
+ ToastPrimitives.Description,
1836
+ __spreadValues({
1837
+ ref,
1838
+ className: cn("text-sm opacity-90", className)
1839
+ }, props)
1840
+ );
1841
+ });
1842
+ ToastDescription.displayName = ToastPrimitives.Description.displayName;
1843
+
1844
+ // src/components/ui/toaster.tsx
1845
+ var import_jsx_runtime28 = require("react/jsx-runtime");
1846
+ function Toaster() {
1847
+ const { toasts } = useToast();
1848
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(ToastProvider, { children: [
1849
+ toasts.map(function(_a) {
1850
+ var _b = _a, { id, title, description, action } = _b, props = __objRest(_b, ["id", "title", "description", "action"]);
1851
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Toast, __spreadProps(__spreadValues({}, props), { children: [
1852
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "grid gap-1", children: [
1853
+ title && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(ToastTitle, { children: title }),
1854
+ description && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(ToastDescription, { children: description })
1855
+ ] }),
1856
+ action,
1857
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(ToastClose, {})
1858
+ ] }), id);
1859
+ }),
1860
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(ToastViewport, {})
1861
+ ] });
1862
+ }
1863
+
1864
+ // src/components/actions/Button/Button.tsx
1865
+ var import_jsx_runtime29 = require("react/jsx-runtime");
1866
+ var Button2 = (0, import_react7.forwardRef)(
1867
+ (_a, ref) => {
1868
+ var _b = _a, { children, disabled, loading } = _b, rest = __objRest(_b, ["children", "disabled", "loading"]);
1869
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Button, __spreadProps(__spreadValues({}, rest), { disabled: disabled || loading, ref, children: [
1870
+ loading && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Spinner, { className: "fill-white" }),
1871
+ children
1872
+ ] }));
1873
+ }
1874
+ );
1875
+ Button2.displayName = "Button";
1876
+
1877
+ // src/components/dataInput/Input/components/MultipleInput/MultipleInput.tsx
1878
+ var import_react8 = require("react");
1879
+ var import_jsx_runtime30 = require("react/jsx-runtime");
1880
+ var MultipleInput = (_a) => {
1881
+ var _b = _a, {
1882
+ data = [],
1883
+ onAdd = () => {
1884
+ },
1885
+ defaultValue = "",
1886
+ onRemove = () => {
1887
+ },
1888
+ withoutForm = false
1889
+ } = _b, props = __objRest(_b, [
1890
+ "data",
1891
+ "onAdd",
1892
+ "defaultValue",
1893
+ "onRemove",
1894
+ "withoutForm"
1895
+ ]);
1896
+ const [inputValue, setInputValue] = (0, import_react8.useState)(defaultValue);
1897
+ const formData = useConditionalController({
1898
+ name: props.name || "",
1899
+ withoutForm
1900
+ });
1901
+ const inputItems = (0, import_react8.useMemo)(() => {
1902
+ if (formData == null ? void 0 : formData.value) {
1903
+ return formData.value;
1904
+ }
1905
+ return data;
1906
+ }, [data, formData]);
1907
+ const onAddData = (0, import_react8.useCallback)(() => {
1908
+ const trimmedValue = inputValue.trim();
1909
+ if (trimmedValue) {
1910
+ if (formData == null ? void 0 : formData.onChange) {
1911
+ formData.onChange([...inputItems, trimmedValue]);
1912
+ } else {
1913
+ onAdd(trimmedValue);
1914
+ }
1915
+ setInputValue("");
1916
+ }
1917
+ }, [inputValue, formData, onAdd, inputItems]);
1918
+ const onRemoveData = (0, import_react8.useCallback)(
1919
+ (index) => {
1920
+ if (formData == null ? void 0 : formData.onChange) {
1921
+ const newData = inputItems.filter(
1922
+ (_2, i) => i !== index
1923
+ );
1924
+ formData.onChange(newData);
1925
+ } else {
1926
+ onRemove(index);
1927
+ }
1928
+ },
1929
+ [formData, inputItems, onRemove]
1930
+ );
1931
+ const renderItens = (0, import_react8.useCallback)(() => {
1932
+ return inputItems == null ? void 0 : inputItems.map((item, index) => {
1933
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex justify-between", children: [
1934
+ item,
1935
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
1936
+ Button2,
1937
+ {
1938
+ variant: "ghost",
1939
+ className: "text-destructive",
1940
+ size: "icon",
1941
+ onClick: () => onRemoveData(index),
1942
+ children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Icon2, { name: "MdDelete" })
1943
+ }
1944
+ )
1945
+ ] }, item);
1946
+ });
1947
+ }, [inputItems, onRemoveData]);
1948
+ const extraElement = (0, import_react8.useMemo)(
1949
+ () => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Button2, { type: "button", onClick: onAddData, disabled: !inputValue, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Icon2, { name: "MdAdd" }) }),
1950
+ [onAddData, inputValue]
1951
+ );
1952
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex flex-col gap-2", children: [
1953
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
1954
+ MaskInput,
1955
+ __spreadProps(__spreadValues({}, props), {
1956
+ withoutForm: true,
1957
+ extraElement,
1958
+ onChange: (e) => {
1959
+ setInputValue(e.target.value);
1960
+ },
1961
+ value: inputValue
1962
+ })
1963
+ ),
1964
+ renderItens()
1965
+ ] });
1966
+ };
1967
+
1968
+ // src/components/ui/dialog.tsx
1969
+ var React15 = __toESM(require("react"));
1970
+ var DialogPrimitive = __toESM(require("@radix-ui/react-dialog"));
1971
+ var import_lucide_react5 = require("lucide-react");
1972
+ var import_jsx_runtime31 = require("react/jsx-runtime");
1973
+ var Dialog = DialogPrimitive.Root;
1974
+ var DialogPortal = DialogPrimitive.Portal;
1975
+ var DialogClose = DialogPrimitive.Close;
1976
+ var DialogOverlay = React15.forwardRef((_a, ref) => {
1977
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
1978
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
1979
+ DialogPrimitive.Overlay,
1980
+ __spreadValues({
1981
+ ref,
1982
+ className: cn(
1983
+ "fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
1984
+ className
1985
+ )
1986
+ }, props)
1987
+ );
1988
+ });
1989
+ DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
1990
+ var DialogContent = React15.forwardRef((_a, ref) => {
1991
+ var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
1992
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(DialogPortal, { children: [
1993
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(DialogOverlay, {}),
1994
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
1995
+ DialogPrimitive.Content,
1996
+ __spreadProps(__spreadValues({
1997
+ ref,
1998
+ className: cn(
1999
+ "fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg overflow-auto max-h-[80vh]",
2000
+ className
2001
+ )
2002
+ }, props), {
2003
+ children: [
2004
+ children,
2005
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(DialogPrimitive.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground", children: [
2006
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_lucide_react5.X, { className: "h-4 w-4" }),
2007
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "sr-only", children: "Close" })
2008
+ ] })
2009
+ ]
2010
+ })
2011
+ )
2012
+ ] });
2013
+ });
2014
+ DialogContent.displayName = DialogPrimitive.Content.displayName;
2015
+ var DialogHeader = (_a) => {
2016
+ var _b = _a, {
2017
+ className
2018
+ } = _b, props = __objRest(_b, [
2019
+ "className"
2020
+ ]);
2021
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2022
+ "div",
2023
+ __spreadValues({
2024
+ className: cn(
2025
+ "flex flex-col space-y-1.5 text-center sm:text-left",
2026
+ className
2027
+ )
2028
+ }, props)
2029
+ );
2030
+ };
2031
+ DialogHeader.displayName = "DialogHeader";
2032
+ var DialogFooter = (_a) => {
2033
+ var _b = _a, {
2034
+ className
2035
+ } = _b, props = __objRest(_b, [
2036
+ "className"
2037
+ ]);
2038
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2039
+ "div",
2040
+ __spreadValues({
2041
+ className: cn(
2042
+ "flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
2043
+ className
2044
+ )
2045
+ }, props)
2046
+ );
2047
+ };
2048
+ DialogFooter.displayName = "DialogFooter";
2049
+ var DialogTitle = React15.forwardRef((_a, ref) => {
2050
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
2051
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2052
+ DialogPrimitive.Title,
2053
+ __spreadValues({
2054
+ ref,
2055
+ className: cn(
2056
+ "text-lg font-semibold leading-none tracking-tight",
2057
+ className
2058
+ )
2059
+ }, props)
2060
+ );
2061
+ });
2062
+ DialogTitle.displayName = DialogPrimitive.Title.displayName;
2063
+ var DialogDescription = React15.forwardRef((_a, ref) => {
2064
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
2065
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2066
+ DialogPrimitive.Description,
2067
+ __spreadValues({
2068
+ ref,
2069
+ className: cn("text-sm text-muted-foreground", className)
2070
+ }, props)
2071
+ );
2072
+ });
2073
+ DialogDescription.displayName = DialogPrimitive.Description.displayName;
2074
+
2075
+ // src/components/actions/Dialog/Dialog.tsx
2076
+ var import_react9 = require("react");
2077
+ var import_jsx_runtime32 = require("react/jsx-runtime");
2078
+ function Dialog2(_a) {
2079
+ var _b = _a, {
2080
+ title,
2081
+ description,
2082
+ className,
2083
+ children,
2084
+ footer = () => null
2085
+ } = _b, props = __objRest(_b, [
2086
+ "title",
2087
+ "description",
2088
+ "className",
2089
+ "children",
2090
+ "footer"
2091
+ ]);
2092
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Dialog, __spreadProps(__spreadValues({}, props), { children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(DialogContent, { className, children: [
2093
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(DialogHeader, { children: [
2094
+ title && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(DialogTitle, { children: title }),
2095
+ description && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(DialogDescription, { children: description })
2096
+ ] }),
2097
+ children,
2098
+ footer && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(DialogFooter, { children: footer() })
2099
+ ] }) }));
2100
+ }
2101
+ var DialogWithForm = (_a) => {
2102
+ var _b = _a, {
2103
+ title,
2104
+ description,
2105
+ className,
2106
+ children,
2107
+ footer = () => null,
2108
+ onSubmit = () => {
2109
+ }
2110
+ } = _b, props = __objRest(_b, [
2111
+ "title",
2112
+ "description",
2113
+ "className",
2114
+ "children",
2115
+ "footer",
2116
+ "onSubmit"
2117
+ ]);
2118
+ const dialogRef = (0, import_react9.useRef)(null);
2119
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Dialog, __spreadProps(__spreadValues({}, props), { children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(DialogContent, { className, ref: dialogRef, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("form", { onSubmit, className: "flex flex-col gap-4", children: [
2120
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(DialogHeader, { children: [
2121
+ title && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(DialogTitle, { children: title }),
2122
+ description && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(DialogDescription, { children: description })
2123
+ ] }),
2124
+ children,
2125
+ footer && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(DialogFooter, { children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "flex justify-between w-full", children: [
2126
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(DialogClose, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Button2, { type: "button", variant: "secondary", children: "Fechar" }) }),
2127
+ footer()
2128
+ ] }) })
2129
+ ] }) }) }));
2130
+ };
2131
+
2132
+ // src/components/ui/collapsible.tsx
2133
+ var CollapsiblePrimitive = __toESM(require("@radix-ui/react-collapsible"));
2134
+ var Collapsible = CollapsiblePrimitive.Root;
2135
+ var CollapsibleTrigger2 = CollapsiblePrimitive.CollapsibleTrigger;
2136
+ var CollapsibleContent2 = CollapsiblePrimitive.CollapsibleContent;
2137
+
2138
+ // src/components/actions/Steps/Steps.tsx
2139
+ var import_react12 = require("react");
2140
+
2141
+ // src/components/ui/drawer.tsx
2142
+ var React16 = __toESM(require("react"));
2143
+ var import_vaul = require("vaul");
2144
+ var import_jsx_runtime33 = require("react/jsx-runtime");
2145
+ var Drawer = (_a) => {
2146
+ var _b = _a, { shouldScaleBackground = true } = _b, props = __objRest(_b, ["shouldScaleBackground"]);
2147
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
2148
+ import_vaul.Drawer.Root,
2149
+ __spreadValues({
2150
+ shouldScaleBackground
2151
+ }, props)
2152
+ );
2153
+ };
2154
+ Drawer.displayName = "Drawer";
2155
+ var DrawerTrigger = import_vaul.Drawer.Trigger;
2156
+ var DrawerPortal = import_vaul.Drawer.Portal;
2157
+ var DrawerClose = import_vaul.Drawer.Close;
2158
+ var DrawerOverlay = React16.forwardRef((_a, ref) => {
2159
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
2160
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
2161
+ import_vaul.Drawer.Overlay,
2162
+ __spreadValues({
2163
+ ref,
2164
+ className: cn("fixed inset-0 z-50 bg-black/80", className)
2165
+ }, props)
2166
+ );
2167
+ });
2168
+ DrawerOverlay.displayName = import_vaul.Drawer.Overlay.displayName;
2169
+ var DrawerContent = React16.forwardRef((_a, ref) => {
2170
+ var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
2171
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(DrawerPortal, { children: [
2172
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(DrawerOverlay, {}),
2173
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
2174
+ import_vaul.Drawer.Content,
2175
+ __spreadProps(__spreadValues({
2176
+ ref,
2177
+ className: cn(
2178
+ "fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background",
2179
+ className
2180
+ )
2181
+ }, props), {
2182
+ children: [
2183
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted" }),
2184
+ children
2185
+ ]
2186
+ })
2187
+ )
2188
+ ] });
2189
+ });
2190
+ DrawerContent.displayName = "DrawerContent";
2191
+ var DrawerHeader = (_a) => {
2192
+ var _b = _a, {
2193
+ className
2194
+ } = _b, props = __objRest(_b, [
2195
+ "className"
2196
+ ]);
2197
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
2198
+ "div",
2199
+ __spreadValues({
2200
+ className: cn("grid gap-1.5 p-4 text-center sm:text-left", className)
2201
+ }, props)
2202
+ );
2203
+ };
2204
+ DrawerHeader.displayName = "DrawerHeader";
2205
+ var DrawerFooter = (_a) => {
2206
+ var _b = _a, {
2207
+ className
2208
+ } = _b, props = __objRest(_b, [
2209
+ "className"
2210
+ ]);
2211
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
2212
+ "div",
2213
+ __spreadValues({
2214
+ className: cn("mt-auto flex flex-col gap-2 p-4", className)
2215
+ }, props)
2216
+ );
2217
+ };
2218
+ DrawerFooter.displayName = "DrawerFooter";
2219
+ var DrawerTitle = React16.forwardRef((_a, ref) => {
2220
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
2221
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
2222
+ import_vaul.Drawer.Title,
2223
+ __spreadValues({
2224
+ ref,
2225
+ className: cn(
2226
+ "text-lg font-semibold leading-none tracking-tight",
2227
+ className
2228
+ )
2229
+ }, props)
2230
+ );
2231
+ });
2232
+ DrawerTitle.displayName = import_vaul.Drawer.Title.displayName;
2233
+ var DrawerDescription = React16.forwardRef((_a, ref) => {
2234
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
2235
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
2236
+ import_vaul.Drawer.Description,
2237
+ __spreadValues({
2238
+ ref,
2239
+ className: cn("text-sm text-muted-foreground", className)
2240
+ }, props)
2241
+ );
2242
+ });
2243
+ DrawerDescription.displayName = import_vaul.Drawer.Description.displayName;
2244
+
2245
+ // src/components/layout/Drawer/CustomDrawer/index.tsx
2246
+ var import_jsx_runtime34 = require("react/jsx-runtime");
2247
+ function CustomDrawer(_a) {
2248
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
2249
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Drawer, __spreadProps(__spreadValues({}, props), { children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(DrawerContent, { className, children: props.children }) }));
2250
+ }
2251
+
2252
+ // src/components/ui/sheet.tsx
2253
+ var React17 = __toESM(require("react"));
2254
+ var SheetPrimitive = __toESM(require("@radix-ui/react-dialog"));
2255
+ var import_class_variance_authority7 = require("class-variance-authority");
2256
+ var import_lucide_react6 = require("lucide-react");
2257
+ var import_jsx_runtime35 = require("react/jsx-runtime");
2258
+ var Sheet = SheetPrimitive.Root;
2259
+ var SheetPortal = SheetPrimitive.Portal;
2260
+ var SheetOverlay = React17.forwardRef((_a, ref) => {
2261
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
2262
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
2263
+ SheetPrimitive.Overlay,
2264
+ __spreadProps(__spreadValues({
2265
+ className: cn(
2266
+ "fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
2267
+ className
2268
+ )
2269
+ }, props), {
2270
+ ref
2271
+ })
2272
+ );
2273
+ });
2274
+ SheetOverlay.displayName = SheetPrimitive.Overlay.displayName;
2275
+ var sheetVariants = (0, import_class_variance_authority7.cva)(
2276
+ "fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",
2277
+ {
2278
+ variants: {
2279
+ side: {
2280
+ top: "inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
2281
+ bottom: "inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",
2282
+ left: "inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",
2283
+ right: "inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"
2284
+ }
2285
+ },
2286
+ defaultVariants: {
2287
+ side: "right"
2288
+ }
2289
+ }
2290
+ );
2291
+ var SheetContent = React17.forwardRef((_a, ref) => {
2292
+ var _b = _a, { side = "right", className, children } = _b, props = __objRest(_b, ["side", "className", "children"]);
2293
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(SheetPortal, { children: [
2294
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(SheetOverlay, {}),
2295
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
2296
+ SheetPrimitive.Content,
2297
+ __spreadProps(__spreadValues({
2298
+ ref,
2299
+ className: cn(sheetVariants({ side }), className)
2300
+ }, props), {
2301
+ children: [
2302
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(SheetPrimitive.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary", children: [
2303
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_lucide_react6.X, { className: "h-4 w-4" }),
2304
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "sr-only", children: "Close" })
2305
+ ] }),
2306
+ children
2307
+ ]
2308
+ })
2309
+ )
2310
+ ] });
2311
+ });
2312
+ SheetContent.displayName = SheetPrimitive.Content.displayName;
2313
+ var SheetHeader = (_a) => {
2314
+ var _b = _a, {
2315
+ className
2316
+ } = _b, props = __objRest(_b, [
2317
+ "className"
2318
+ ]);
2319
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
2320
+ "div",
2321
+ __spreadValues({
2322
+ className: cn(
2323
+ "flex flex-col space-y-2 text-center sm:text-left",
2324
+ className
2325
+ )
2326
+ }, props)
2327
+ );
2328
+ };
2329
+ SheetHeader.displayName = "SheetHeader";
2330
+ var SheetFooter = (_a) => {
2331
+ var _b = _a, {
2332
+ className
2333
+ } = _b, props = __objRest(_b, [
2334
+ "className"
2335
+ ]);
2336
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
2337
+ "div",
2338
+ __spreadValues({
2339
+ className: cn(
2340
+ "flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
2341
+ className
2342
+ )
2343
+ }, props)
2344
+ );
2345
+ };
2346
+ SheetFooter.displayName = "SheetFooter";
2347
+ var SheetTitle = React17.forwardRef((_a, ref) => {
2348
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
2349
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
2350
+ SheetPrimitive.Title,
2351
+ __spreadValues({
2352
+ ref,
2353
+ className: cn("text-lg font-semibold text-foreground", className)
2354
+ }, props)
2355
+ );
2356
+ });
2357
+ SheetTitle.displayName = SheetPrimitive.Title.displayName;
2358
+ var SheetDescription = React17.forwardRef((_a, ref) => {
2359
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
2360
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
2361
+ SheetPrimitive.Description,
2362
+ __spreadValues({
2363
+ ref,
2364
+ className: cn("text-sm text-muted-foreground", className)
2365
+ }, props)
2366
+ );
2367
+ });
2368
+ SheetDescription.displayName = SheetPrimitive.Description.displayName;
2369
+
2370
+ // src/components/layout/Sheet/Sheet.tsx
2371
+ var import_jsx_runtime36 = require("react/jsx-runtime");
2372
+ function Sheet2(_a) {
2373
+ var _b = _a, { side, className, children } = _b, props = __objRest(_b, ["side", "className", "children"]);
2374
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Sheet, __spreadProps(__spreadValues({}, props), { children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(SheetContent, { side, className, children }) }));
2375
+ }
2376
+
2377
+ // src/components/ui/sidebar.tsx
2378
+ var React21 = __toESM(require("react"));
2379
+ var import_react_slot3 = require("@radix-ui/react-slot");
2380
+ var import_class_variance_authority8 = require("class-variance-authority");
2381
+ var import_lucide_react7 = require("lucide-react");
2382
+
2383
+ // src/hooks/use-mobile.tsx
2384
+ var React18 = __toESM(require("react"));
2385
+ var MOBILE_BREAKPOINT = 768;
2386
+ function useIsMobile() {
2387
+ const [isMobile, setIsMobile] = React18.useState(void 0);
2388
+ React18.useEffect(() => {
2389
+ const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
2390
+ const onChange = () => {
2391
+ setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
2392
+ };
2393
+ mql.addEventListener("change", onChange);
2394
+ setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
2395
+ return () => mql.removeEventListener("change", onChange);
2396
+ }, []);
2397
+ return !!isMobile;
2398
+ }
2399
+
2400
+ // src/components/ui/separator.tsx
2401
+ var React19 = __toESM(require("react"));
2402
+ var SeparatorPrimitive = __toESM(require("@radix-ui/react-separator"));
2403
+ var import_jsx_runtime37 = require("react/jsx-runtime");
2404
+ var Separator3 = React19.forwardRef(
2405
+ (_a, ref) => {
2406
+ var _b = _a, { className, orientation = "horizontal", decorative = true } = _b, props = __objRest(_b, ["className", "orientation", "decorative"]);
2407
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
2408
+ SeparatorPrimitive.Root,
2409
+ __spreadValues({
2410
+ ref,
2411
+ decorative,
2412
+ orientation,
2413
+ className: cn(
2414
+ "shrink-0 bg-border",
2415
+ orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]",
2416
+ className
2417
+ )
2418
+ }, props)
2419
+ );
2420
+ }
2421
+ );
2422
+ Separator3.displayName = SeparatorPrimitive.Root.displayName;
2423
+
2424
+ // src/components/ui/skeleton.tsx
2425
+ var import_jsx_runtime38 = require("react/jsx-runtime");
2426
+ function Skeleton(_a) {
2427
+ var _b = _a, {
2428
+ className
2429
+ } = _b, props = __objRest(_b, [
2430
+ "className"
2431
+ ]);
2432
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
2433
+ "div",
2434
+ __spreadValues({
2435
+ className: cn("animate-pulse rounded-md bg-primary/10", className)
2436
+ }, props)
2437
+ );
2438
+ }
2439
+
2440
+ // src/components/ui/tooltip.tsx
2441
+ var React20 = __toESM(require("react"));
2442
+ var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"));
2443
+ var import_jsx_runtime39 = require("react/jsx-runtime");
2444
+ var TooltipProvider = TooltipPrimitive.Provider;
2445
+ var Tooltip = TooltipPrimitive.Root;
2446
+ var TooltipTrigger = TooltipPrimitive.Trigger;
2447
+ var TooltipContent = React20.forwardRef((_a, ref) => {
2448
+ var _b = _a, { className, sideOffset = 4 } = _b, props = __objRest(_b, ["className", "sideOffset"]);
2449
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(TooltipPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
2450
+ TooltipPrimitive.Content,
2451
+ __spreadValues({
2452
+ ref,
2453
+ sideOffset,
2454
+ className: cn(
2455
+ "z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
2456
+ className
2457
+ )
2458
+ }, props)
2459
+ ) });
2460
+ });
2461
+ TooltipContent.displayName = TooltipPrimitive.Content.displayName;
2462
+
2463
+ // src/components/ui/sidebar.tsx
2464
+ var import_jsx_runtime40 = require("react/jsx-runtime");
2465
+ var SIDEBAR_COOKIE_NAME = "sidebar:state";
2466
+ var SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
2467
+ var SIDEBAR_WIDTH = "16rem";
2468
+ var SIDEBAR_WIDTH_MOBILE = "18rem";
2469
+ var SIDEBAR_WIDTH_ICON = "3rem";
2470
+ var SIDEBAR_KEYBOARD_SHORTCUT = "b";
2471
+ var SidebarContext = React21.createContext(null);
2472
+ function useSidebar() {
2473
+ const context = React21.useContext(SidebarContext);
2474
+ if (!context) {
2475
+ throw new Error("useSidebar must be used within a SidebarProvider.");
2476
+ }
2477
+ return context;
2478
+ }
2479
+ var SidebarProvider = React21.forwardRef(
2480
+ (_a, ref) => {
2481
+ var _b = _a, {
2482
+ defaultOpen = true,
2483
+ open: openProp,
2484
+ onOpenChange: setOpenProp,
2485
+ className,
2486
+ style,
2487
+ children
2488
+ } = _b, props = __objRest(_b, [
2489
+ "defaultOpen",
2490
+ "open",
2491
+ "onOpenChange",
2492
+ "className",
2493
+ "style",
2494
+ "children"
2495
+ ]);
2496
+ const isMobile = useIsMobile();
2497
+ const [openMobile, setOpenMobile] = React21.useState(false);
2498
+ const [_open, _setOpen] = React21.useState(defaultOpen);
2499
+ const open = openProp != null ? openProp : _open;
2500
+ const setOpen = React21.useCallback(
2501
+ (value) => {
2502
+ const openState = typeof value === "function" ? value(open) : value;
2503
+ if (setOpenProp) {
2504
+ setOpenProp(openState);
2505
+ } else {
2506
+ _setOpen(openState);
2507
+ }
2508
+ document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`;
2509
+ },
2510
+ [setOpenProp, open]
2511
+ );
2512
+ const toggleSidebar = React21.useCallback(() => {
2513
+ return isMobile ? setOpenMobile((open2) => !open2) : setOpen((open2) => !open2);
2514
+ }, [isMobile, setOpen, setOpenMobile]);
2515
+ React21.useEffect(() => {
2516
+ const handleKeyDown = (event) => {
2517
+ if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
2518
+ event.preventDefault();
2519
+ toggleSidebar();
2520
+ }
2521
+ };
2522
+ window.addEventListener("keydown", handleKeyDown);
2523
+ return () => window.removeEventListener("keydown", handleKeyDown);
2524
+ }, [toggleSidebar]);
2525
+ const state = open ? "expanded" : "collapsed";
2526
+ const contextValue = React21.useMemo(
2527
+ () => ({
2528
+ state,
2529
+ open,
2530
+ setOpen,
2531
+ isMobile,
2532
+ openMobile,
2533
+ setOpenMobile,
2534
+ toggleSidebar
2535
+ }),
2536
+ [state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar]
2537
+ );
2538
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(SidebarContext.Provider, { value: contextValue, children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
2539
+ "div",
2540
+ __spreadProps(__spreadValues({
2541
+ style: __spreadValues({
2542
+ "--sidebar-width": SIDEBAR_WIDTH,
2543
+ "--sidebar-width-icon": SIDEBAR_WIDTH_ICON
2544
+ }, style),
2545
+ className: cn(
2546
+ "group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-sidebar",
2547
+ className
2548
+ ),
2549
+ ref
2550
+ }, props), {
2551
+ children
2552
+ })
2553
+ ) }) });
2554
+ }
2555
+ );
2556
+ SidebarProvider.displayName = "SidebarProvider";
2557
+ var Sidebar = React21.forwardRef(
2558
+ (_a, ref) => {
2559
+ var _b = _a, {
2560
+ side = "left",
2561
+ variant = "sidebar",
2562
+ collapsible = "offcanvas",
2563
+ className,
2564
+ children
2565
+ } = _b, props = __objRest(_b, [
2566
+ "side",
2567
+ "variant",
2568
+ "collapsible",
2569
+ "className",
2570
+ "children"
2571
+ ]);
2572
+ const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
2573
+ if (collapsible === "none") {
2574
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
2575
+ "div",
2576
+ __spreadProps(__spreadValues({
2577
+ className: cn(
2578
+ "flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",
2579
+ className
2580
+ ),
2581
+ ref
2582
+ }, props), {
2583
+ children
2584
+ })
2585
+ );
2586
+ }
2587
+ if (isMobile) {
2588
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Sheet, __spreadProps(__spreadValues({ open: openMobile, onOpenChange: setOpenMobile }, props), { children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
2589
+ SheetContent,
2590
+ {
2591
+ "data-sidebar": "sidebar",
2592
+ "data-mobile": "true",
2593
+ className: "w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",
2594
+ style: {
2595
+ "--sidebar-width": SIDEBAR_WIDTH_MOBILE
2596
+ },
2597
+ side,
2598
+ children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "flex h-full w-full flex-col", children })
2599
+ }
2600
+ ) }));
2601
+ }
2602
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
2603
+ "div",
2604
+ {
2605
+ ref,
2606
+ className: "group peer hidden md:block text-sidebar-foreground",
2607
+ "data-state": state,
2608
+ "data-collapsible": state === "collapsed" ? collapsible : "",
2609
+ "data-variant": variant,
2610
+ "data-side": side,
2611
+ children: [
2612
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
2613
+ "div",
2614
+ {
2615
+ className: cn(
2616
+ "duration-200 relative h-svh w-[--sidebar-width] bg-transparent transition-[width] ease-linear",
2617
+ "group-data-[collapsible=offcanvas]:w-0",
2618
+ "group-data-[side=right]:rotate-180",
2619
+ variant === "floating" || variant === "inset" ? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]" : "group-data-[collapsible=icon]:w-[--sidebar-width-icon]"
2620
+ )
2621
+ }
2622
+ ),
2623
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
2624
+ "div",
2625
+ __spreadProps(__spreadValues({
2626
+ className: cn(
2627
+ "duration-200 fixed inset-y-0 z-10 hidden h-svh w-[--sidebar-width] transition-[left,right,width] ease-linear md:flex",
2628
+ side === "left" ? "left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]" : "right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",
2629
+ // Adjust the padding for floating and inset variants.
2630
+ variant === "floating" || variant === "inset" ? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]" : "group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l",
2631
+ className
2632
+ )
2633
+ }, props), {
2634
+ children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
2635
+ "div",
2636
+ {
2637
+ "data-sidebar": "sidebar",
2638
+ className: "flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",
2639
+ children
2640
+ }
2641
+ )
2642
+ })
2643
+ )
2644
+ ]
2645
+ }
2646
+ );
2647
+ }
2648
+ );
2649
+ Sidebar.displayName = "Sidebar";
2650
+ var SidebarTrigger = React21.forwardRef((_a, ref) => {
2651
+ var _b = _a, { className, onClick } = _b, props = __objRest(_b, ["className", "onClick"]);
2652
+ const { toggleSidebar } = useSidebar();
2653
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
2654
+ Button,
2655
+ __spreadProps(__spreadValues({
2656
+ ref,
2657
+ "data-sidebar": "trigger",
2658
+ variant: "ghost",
2659
+ size: "icon",
2660
+ className: cn("h-7 w-7", className),
2661
+ onClick: (event) => {
2662
+ onClick == null ? void 0 : onClick(event);
2663
+ toggleSidebar();
2664
+ }
2665
+ }, props), {
2666
+ children: [
2667
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_lucide_react7.PanelLeft, {}),
2668
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "sr-only", children: "Toggle Sidebar" })
2669
+ ]
2670
+ })
2671
+ );
2672
+ });
2673
+ SidebarTrigger.displayName = "SidebarTrigger";
2674
+ var SidebarRail = React21.forwardRef((_a, ref) => {
2675
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
2676
+ const { toggleSidebar } = useSidebar();
2677
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
2678
+ "button",
2679
+ __spreadValues({
2680
+ ref,
2681
+ "data-sidebar": "rail",
2682
+ "aria-label": "Toggle Sidebar",
2683
+ tabIndex: -1,
2684
+ onClick: toggleSidebar,
2685
+ title: "Toggle Sidebar",
2686
+ className: cn(
2687
+ "absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex",
2688
+ "[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize",
2689
+ "[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize",
2690
+ "group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar",
2691
+ "[[data-side=left][data-collapsible=offcanvas]_&]:-right-2",
2692
+ "[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",
2693
+ className
2694
+ )
2695
+ }, props)
2696
+ );
2697
+ });
2698
+ SidebarRail.displayName = "SidebarRail";
2699
+ var SidebarInset = React21.forwardRef((_a, ref) => {
2700
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
2701
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
2702
+ "main",
2703
+ __spreadValues({
2704
+ ref,
2705
+ className: cn(
2706
+ "relative flex min-h-svh flex-1 flex-col bg-background",
2707
+ "peer-data-[variant=inset]:min-h-[calc(100svh-theme(spacing.4))] md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",
2708
+ className
2709
+ )
2710
+ }, props)
2711
+ );
2712
+ });
2713
+ SidebarInset.displayName = "SidebarInset";
2714
+ var SidebarInput = React21.forwardRef((_a, ref) => {
2715
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
2716
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
2717
+ Input,
2718
+ __spreadValues({
2719
+ ref,
2720
+ "data-sidebar": "input",
2721
+ className: cn(
2722
+ "h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",
2723
+ className
2724
+ )
2725
+ }, props)
2726
+ );
2727
+ });
2728
+ SidebarInput.displayName = "SidebarInput";
2729
+ var SidebarHeader = React21.forwardRef((_a, ref) => {
2730
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
2731
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
2732
+ "div",
2733
+ __spreadValues({
2734
+ ref,
2735
+ "data-sidebar": "header",
2736
+ className: cn("flex flex-col gap-2 p-2", className)
2737
+ }, props)
2738
+ );
2739
+ });
2740
+ SidebarHeader.displayName = "SidebarHeader";
2741
+ var SidebarFooter = React21.forwardRef((_a, ref) => {
2742
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
2743
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
2744
+ "div",
2745
+ __spreadValues({
2746
+ ref,
2747
+ "data-sidebar": "footer",
2748
+ className: cn("flex flex-col gap-2 p-2", className)
2749
+ }, props)
2750
+ );
2751
+ });
2752
+ SidebarFooter.displayName = "SidebarFooter";
2753
+ var SidebarSeparator = React21.forwardRef((_a, ref) => {
2754
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
2755
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
2756
+ Separator3,
2757
+ __spreadValues({
2758
+ ref,
2759
+ "data-sidebar": "separator",
2760
+ className: cn("mx-2 w-auto bg-sidebar-border", className)
2761
+ }, props)
2762
+ );
2763
+ });
2764
+ SidebarSeparator.displayName = "SidebarSeparator";
2765
+ var SidebarContent = React21.forwardRef((_a, ref) => {
2766
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
2767
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
2768
+ "div",
2769
+ __spreadValues({
2770
+ ref,
2771
+ "data-sidebar": "content",
2772
+ className: cn(
2773
+ "flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",
2774
+ className
2775
+ )
2776
+ }, props)
2777
+ );
2778
+ });
2779
+ SidebarContent.displayName = "SidebarContent";
2780
+ var SidebarGroup = React21.forwardRef((_a, ref) => {
2781
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
2782
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
2783
+ "div",
2784
+ __spreadValues({
2785
+ ref,
2786
+ "data-sidebar": "group",
2787
+ className: cn("relative flex w-full min-w-0 flex-col p-2", className)
2788
+ }, props)
2789
+ );
2790
+ });
2791
+ SidebarGroup.displayName = "SidebarGroup";
2792
+ var SidebarGroupLabel = React21.forwardRef((_a, ref) => {
2793
+ var _b = _a, { className, asChild = false } = _b, props = __objRest(_b, ["className", "asChild"]);
2794
+ const Comp = asChild ? import_react_slot3.Slot : "div";
2795
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
2796
+ Comp,
2797
+ __spreadValues({
2798
+ ref,
2799
+ "data-sidebar": "group-label",
2800
+ className: cn(
2801
+ "duration-200 flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opa] ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
2802
+ "group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",
2803
+ className
2804
+ )
2805
+ }, props)
2806
+ );
2807
+ });
2808
+ SidebarGroupLabel.displayName = "SidebarGroupLabel";
2809
+ var SidebarGroupAction = React21.forwardRef((_a, ref) => {
2810
+ var _b = _a, { className, asChild = false } = _b, props = __objRest(_b, ["className", "asChild"]);
2811
+ const Comp = asChild ? import_react_slot3.Slot : "button";
2812
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
2813
+ Comp,
2814
+ __spreadValues({
2815
+ ref,
2816
+ "data-sidebar": "group-action",
2817
+ className: cn(
2818
+ "absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
2819
+ // Increases the hit area of the button on mobile.
2820
+ "after:absolute after:-inset-2 after:md:hidden",
2821
+ "group-data-[collapsible=icon]:hidden",
2822
+ className
2823
+ )
2824
+ }, props)
2825
+ );
2826
+ });
2827
+ SidebarGroupAction.displayName = "SidebarGroupAction";
2828
+ var SidebarGroupContent = React21.forwardRef((_a, ref) => {
2829
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
2830
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
2831
+ "div",
2832
+ __spreadValues({
2833
+ ref,
2834
+ "data-sidebar": "group-content",
2835
+ className: cn("w-full text-sm", className)
2836
+ }, props)
2837
+ );
2838
+ });
2839
+ SidebarGroupContent.displayName = "SidebarGroupContent";
2840
+ var SidebarMenu = React21.forwardRef((_a, ref) => {
2841
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
2842
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
2843
+ "ul",
2844
+ __spreadValues({
2845
+ ref,
2846
+ "data-sidebar": "menu",
2847
+ className: cn("flex w-full min-w-0 flex-col gap-1", className)
2848
+ }, props)
2849
+ );
2850
+ });
2851
+ SidebarMenu.displayName = "SidebarMenu";
2852
+ var SidebarMenuItem = React21.forwardRef((_a, ref) => {
2853
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
2854
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
2855
+ "li",
2856
+ __spreadValues({
2857
+ ref,
2858
+ "data-sidebar": "menu-item",
2859
+ className: cn("group/menu-item relative", className)
2860
+ }, props)
2861
+ );
2862
+ });
2863
+ SidebarMenuItem.displayName = "SidebarMenuItem";
2864
+ var sidebarMenuButtonVariants = (0, import_class_variance_authority8.cva)(
2865
+ "peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",
2866
+ {
2867
+ variants: {
2868
+ variant: {
2869
+ default: "hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
2870
+ outline: "bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"
2871
+ },
2872
+ size: {
2873
+ default: "h-8 text-sm",
2874
+ sm: "h-7 text-xs",
2875
+ lg: "h-12 text-sm group-data-[collapsible=icon]:!p-0"
2876
+ }
2877
+ },
2878
+ defaultVariants: {
2879
+ variant: "default",
2880
+ size: "default"
2881
+ }
2882
+ }
2883
+ );
2884
+ var SidebarMenuButton = React21.forwardRef(
2885
+ (_a, ref) => {
2886
+ var _b = _a, {
2887
+ asChild = false,
2888
+ isActive = false,
2889
+ variant = "default",
2890
+ size = "default",
2891
+ tooltip,
2892
+ className
2893
+ } = _b, props = __objRest(_b, [
2894
+ "asChild",
2895
+ "isActive",
2896
+ "variant",
2897
+ "size",
2898
+ "tooltip",
2899
+ "className"
2900
+ ]);
2901
+ const Comp = asChild ? import_react_slot3.Slot : "button";
2902
+ const { isMobile, state } = useSidebar();
2903
+ const button = /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
2904
+ Comp,
2905
+ __spreadValues({
2906
+ ref,
2907
+ "data-sidebar": "menu-button",
2908
+ "data-size": size,
2909
+ "data-active": isActive,
2910
+ className: cn(sidebarMenuButtonVariants({ variant, size }), className)
2911
+ }, props)
2912
+ );
2913
+ if (!tooltip) {
2914
+ return button;
2915
+ }
2916
+ if (typeof tooltip === "string") {
2917
+ tooltip = {
2918
+ children: tooltip
2919
+ };
2920
+ }
2921
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(Tooltip, { children: [
2922
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(TooltipTrigger, { asChild: true, children: button }),
2923
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
2924
+ TooltipContent,
2925
+ __spreadValues({
2926
+ side: "right",
2927
+ align: "center",
2928
+ hidden: state !== "collapsed" || isMobile
2929
+ }, tooltip)
2930
+ )
2931
+ ] });
2932
+ }
2933
+ );
2934
+ SidebarMenuButton.displayName = "SidebarMenuButton";
2935
+ var SidebarMenuAction = React21.forwardRef((_a, ref) => {
2936
+ var _b = _a, { className, asChild = false, showOnHover = false } = _b, props = __objRest(_b, ["className", "asChild", "showOnHover"]);
2937
+ const Comp = asChild ? import_react_slot3.Slot : "button";
2938
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
2939
+ Comp,
2940
+ __spreadValues({
2941
+ ref,
2942
+ "data-sidebar": "menu-action",
2943
+ className: cn(
2944
+ "absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0",
2945
+ // Increases the hit area of the button on mobile.
2946
+ "after:absolute after:-inset-2 after:md:hidden",
2947
+ "peer-data-[size=sm]/menu-button:top-1",
2948
+ "peer-data-[size=default]/menu-button:top-1.5",
2949
+ "peer-data-[size=lg]/menu-button:top-2.5",
2950
+ "group-data-[collapsible=icon]:hidden",
2951
+ showOnHover && "group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",
2952
+ className
2953
+ )
2954
+ }, props)
2955
+ );
2956
+ });
2957
+ SidebarMenuAction.displayName = "SidebarMenuAction";
2958
+ var SidebarMenuBadge = React21.forwardRef((_a, ref) => {
2959
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
2960
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
2961
+ "div",
2962
+ __spreadValues({
2963
+ ref,
2964
+ "data-sidebar": "menu-badge",
2965
+ className: cn(
2966
+ "absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground select-none pointer-events-none",
2967
+ "peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground",
2968
+ "peer-data-[size=sm]/menu-button:top-1",
2969
+ "peer-data-[size=default]/menu-button:top-1.5",
2970
+ "peer-data-[size=lg]/menu-button:top-2.5",
2971
+ "group-data-[collapsible=icon]:hidden",
2972
+ className
2973
+ )
2974
+ }, props)
2975
+ );
2976
+ });
2977
+ SidebarMenuBadge.displayName = "SidebarMenuBadge";
2978
+ var SidebarMenuSkeleton = React21.forwardRef((_a, ref) => {
2979
+ var _b = _a, { className, showIcon = false } = _b, props = __objRest(_b, ["className", "showIcon"]);
2980
+ const width = React21.useMemo(() => {
2981
+ return `${Math.floor(Math.random() * 40) + 50}%`;
2982
+ }, []);
2983
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
2984
+ "div",
2985
+ __spreadProps(__spreadValues({
2986
+ ref,
2987
+ "data-sidebar": "menu-skeleton",
2988
+ className: cn("rounded-md h-8 flex gap-2 px-2 items-center", className)
2989
+ }, props), {
2990
+ children: [
2991
+ showIcon && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
2992
+ Skeleton,
2993
+ {
2994
+ className: "size-4 rounded-md",
2995
+ "data-sidebar": "menu-skeleton-icon"
2996
+ }
2997
+ ),
2998
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
2999
+ Skeleton,
3000
+ {
3001
+ className: "h-4 flex-1 max-w-[--skeleton-width]",
3002
+ "data-sidebar": "menu-skeleton-text",
3003
+ style: {
3004
+ "--skeleton-width": width
3005
+ }
3006
+ }
3007
+ )
3008
+ ]
3009
+ })
3010
+ );
3011
+ });
3012
+ SidebarMenuSkeleton.displayName = "SidebarMenuSkeleton";
3013
+ var SidebarMenuSub = React21.forwardRef((_a, ref) => {
3014
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
3015
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
3016
+ "ul",
3017
+ __spreadValues({
3018
+ ref,
3019
+ "data-sidebar": "menu-sub",
3020
+ className: cn(
3021
+ "mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5",
3022
+ "group-data-[collapsible=icon]:hidden",
3023
+ className
3024
+ )
3025
+ }, props)
3026
+ );
3027
+ });
3028
+ SidebarMenuSub.displayName = "SidebarMenuSub";
3029
+ var SidebarMenuSubItem = React21.forwardRef((_a, ref) => {
3030
+ var props = __objRest(_a, []);
3031
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("li", __spreadValues({ ref }, props));
3032
+ });
3033
+ SidebarMenuSubItem.displayName = "SidebarMenuSubItem";
3034
+ var SidebarMenuSubButton = React21.forwardRef((_a, ref) => {
3035
+ var _b = _a, { asChild = false, size = "md", isActive, className } = _b, props = __objRest(_b, ["asChild", "size", "isActive", "className"]);
3036
+ const Comp = asChild ? import_react_slot3.Slot : "a";
3037
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
3038
+ Comp,
3039
+ __spreadValues({
3040
+ ref,
3041
+ "data-sidebar": "menu-sub-button",
3042
+ "data-size": size,
3043
+ "data-active": isActive,
3044
+ className: cn(
3045
+ "flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground",
3046
+ "data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",
3047
+ size === "sm" && "text-xs",
3048
+ size === "md" && "text-sm",
3049
+ "group-data-[collapsible=icon]:hidden",
3050
+ className
3051
+ )
3052
+ }, props)
3053
+ );
3054
+ });
3055
+ SidebarMenuSubButton.displayName = "SidebarMenuSubButton";
3056
+
3057
+ // src/components/layout/Sidebar/components/app-sidebar.tsx
3058
+ var import_lucide_react9 = require("lucide-react");
3059
+
3060
+ // src/components/layout/Sidebar/components/team-switcher.tsx
3061
+ var import_lucide_react8 = require("lucide-react");
3062
+ var import_jsx_runtime41 = require("react/jsx-runtime");
3063
+ function TeamSwitcher({
3064
+ teams
3065
+ }) {
3066
+ const { isMobile } = useSidebar();
3067
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(SidebarMenu, { children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(SidebarMenuItem, { children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(DropdownMenu, { children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
3068
+ SidebarMenuButton,
3069
+ {
3070
+ size: "lg",
3071
+ className: "data-[state=open]:bg-sidebar-accent data-[state=open]:text-sidebar-accent-foreground",
3072
+ children: [
3073
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "flex aspect-square size-8 items-center justify-center rounded-lg bg-sidebar-primary text-sidebar-primary-foreground" }),
3074
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "grid flex-1 text-left text-sm leading-tight", children: [
3075
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "truncate font-semibold", children: teams == null ? void 0 : teams.name }),
3076
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "truncate text-xs", children: teams == null ? void 0 : teams.plan })
3077
+ ] }),
3078
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_lucide_react8.ChevronsUpDown, { className: "ml-auto" })
3079
+ ]
3080
+ }
3081
+ ) }) }) }) });
3082
+ }
3083
+
3084
+ // src/components/layout/Sidebar/components/menus.tsx
3085
+ var import_jsx_runtime42 = require("react/jsx-runtime");
3086
+ function Menus({
3087
+ items
3088
+ }) {
3089
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_jsx_runtime42.Fragment, { children: items.map((item, index) => {
3090
+ var _a;
3091
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(SidebarGroup, { children: [
3092
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(SidebarGroupLabel, { children: item.title }),
3093
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(SidebarMenu, { children: (_a = item.items) == null ? void 0 : _a.map((subItem) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(SidebarMenuItem, { children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
3094
+ SidebarMenuButton,
3095
+ {
3096
+ asChild: true,
3097
+ className: cn(
3098
+ (subItem == null ? void 0 : subItem.isActive) && "bg-sidebar-accent font-semibold"
3099
+ ),
3100
+ children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("a", { href: subItem.url, children: [
3101
+ (subItem == null ? void 0 : subItem.icon) && subItem.icon(),
3102
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { children: subItem.title })
3103
+ ] })
3104
+ }
3105
+ ) }, subItem.title)) })
3106
+ ] }, index);
3107
+ }) });
3108
+ }
3109
+
3110
+ // src/components/layout/Sidebar/components/app-sidebar.tsx
3111
+ var import_jsx_runtime43 = require("react/jsx-runtime");
3112
+ function AppSidebar(_a) {
3113
+ var _b = _a, {
3114
+ navbar = [],
3115
+ enterprise = {
3116
+ name: "Acme Inc",
3117
+ logo: () => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_lucide_react9.GalleryVerticalEnd, {}),
3118
+ plan: "Enterprise"
3119
+ },
3120
+ footer
3121
+ } = _b, props = __objRest(_b, [
3122
+ "navbar",
3123
+ "enterprise",
3124
+ "footer"
3125
+ ]);
3126
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(Sidebar, __spreadProps(__spreadValues({ collapsible: "icon" }, props), { children: [
3127
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(SidebarHeader, { children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(TeamSwitcher, { teams: enterprise }) }),
3128
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(SidebarContent, { children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Menus, { items: navbar }) }),
3129
+ footer && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(SidebarFooter, { children: footer() }),
3130
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(SidebarRail, {})
3131
+ ] }));
3132
+ }
3133
+
3134
+ // src/components/ui/breadcrumb.tsx
3135
+ var React22 = __toESM(require("react"));
3136
+ var import_react_slot4 = require("@radix-ui/react-slot");
3137
+ var import_lucide_react10 = require("lucide-react");
3138
+ var import_jsx_runtime44 = require("react/jsx-runtime");
3139
+ var Breadcrumb = React22.forwardRef((_a, ref) => {
3140
+ var props = __objRest(_a, []);
3141
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("nav", __spreadValues({ ref, "aria-label": "breadcrumb" }, props));
3142
+ });
3143
+ Breadcrumb.displayName = "Breadcrumb";
3144
+ var BreadcrumbList = React22.forwardRef((_a, ref) => {
3145
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
3146
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
3147
+ "ol",
3148
+ __spreadValues({
3149
+ ref,
3150
+ className: cn(
3151
+ "flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5",
3152
+ className
3153
+ )
3154
+ }, props)
3155
+ );
3156
+ });
3157
+ BreadcrumbList.displayName = "BreadcrumbList";
3158
+ var BreadcrumbItem = React22.forwardRef((_a, ref) => {
3159
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
3160
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
3161
+ "li",
3162
+ __spreadValues({
3163
+ ref,
3164
+ className: cn("inline-flex items-center gap-1.5", className)
3165
+ }, props)
3166
+ );
3167
+ });
3168
+ BreadcrumbItem.displayName = "BreadcrumbItem";
3169
+ var BreadcrumbLink = React22.forwardRef((_a, ref) => {
3170
+ var _b = _a, { asChild, className } = _b, props = __objRest(_b, ["asChild", "className"]);
3171
+ const Comp = asChild ? import_react_slot4.Slot : "a";
3172
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
3173
+ Comp,
3174
+ __spreadValues({
3175
+ ref,
3176
+ className: cn("transition-colors hover:text-foreground", className)
3177
+ }, props)
3178
+ );
3179
+ });
3180
+ BreadcrumbLink.displayName = "BreadcrumbLink";
3181
+ var BreadcrumbPage = React22.forwardRef((_a, ref) => {
3182
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
3183
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
3184
+ "span",
3185
+ __spreadValues({
3186
+ ref,
3187
+ role: "link",
3188
+ "aria-disabled": "true",
3189
+ "aria-current": "page",
3190
+ className: cn("font-normal text-foreground", className)
3191
+ }, props)
3192
+ );
3193
+ });
3194
+ BreadcrumbPage.displayName = "BreadcrumbPage";
3195
+ var BreadcrumbSeparator = (_a) => {
3196
+ var _b = _a, {
3197
+ children,
3198
+ className
3199
+ } = _b, props = __objRest(_b, [
3200
+ "children",
3201
+ "className"
3202
+ ]);
3203
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
3204
+ "li",
3205
+ __spreadProps(__spreadValues({
3206
+ role: "presentation",
3207
+ "aria-hidden": "true",
3208
+ className: cn("[&>svg]:w-3.5 [&>svg]:h-3.5", className)
3209
+ }, props), {
3210
+ children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_lucide_react10.ChevronRight, {})
3211
+ })
3212
+ );
3213
+ };
3214
+ BreadcrumbSeparator.displayName = "BreadcrumbSeparator";
3215
+ var BreadcrumbEllipsis = (_a) => {
3216
+ var _b = _a, {
3217
+ className
3218
+ } = _b, props = __objRest(_b, [
3219
+ "className"
3220
+ ]);
3221
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
3222
+ "span",
3223
+ __spreadProps(__spreadValues({
3224
+ role: "presentation",
3225
+ "aria-hidden": "true",
3226
+ className: cn("flex h-9 w-9 items-center justify-center", className)
3227
+ }, props), {
3228
+ children: [
3229
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_lucide_react10.MoreHorizontal, { className: "h-4 w-4" }),
3230
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: "sr-only", children: "More" })
3231
+ ]
3232
+ })
3233
+ );
3234
+ };
3235
+ BreadcrumbEllipsis.displayName = "BreadcrumbElipssis";
3236
+
3237
+ // src/components/layout/Sidebar/provider/index.tsx
3238
+ var import_react10 = require("react");
3239
+ var import_jsx_runtime45 = require("react/jsx-runtime");
3240
+ var SidebarContext2 = (0, import_react10.createContext)({});
3241
+ function SidebarProvider2({
3242
+ children,
3243
+ defaultPath = "/",
3244
+ defaultCollapsed = false
3245
+ }) {
3246
+ const [isCollapsed, setIsCollapsed] = (0, import_react10.useState)(defaultCollapsed);
3247
+ const [currentPath, setCurrentPath] = (0, import_react10.useState)(defaultPath);
3248
+ const toggleCollapse = () => setIsCollapsed((prev) => !prev);
3249
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
3250
+ SidebarContext2.Provider,
3251
+ {
3252
+ value: {
3253
+ currentPath,
3254
+ isCollapsed,
3255
+ toggleCollapse,
3256
+ setCurrentPath
3257
+ },
3258
+ children
3259
+ }
3260
+ );
3261
+ }
3262
+ function useSidebar2() {
3263
+ const context = (0, import_react10.useContext)(SidebarContext2);
3264
+ if (!context) {
3265
+ throw new Error("useSidebar must be used within a SidebarProvider");
3266
+ }
3267
+ return context;
3268
+ }
3269
+
3270
+ // src/components/layout/Sidebar/components/header-sidebar.tsx
3271
+ var import_jsx_runtime46 = require("react/jsx-runtime");
3272
+ var routeMap = {
3273
+ dashboard: "Dashboard",
3274
+ users: "Usu\xE1rios",
3275
+ documents: "Documentos",
3276
+ settings: "Configura\xE7\xF5es",
3277
+ create: "Criar",
3278
+ edit: "Editar",
3279
+ profile: "Perfil",
3280
+ analytics: "An\xE1lises",
3281
+ reports: "Relat\xF3rios"
3282
+ };
3283
+ var BreadcrumbElement = ({ isLast, path, label }) => {
3284
+ if (isLast) {
3285
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(BreadcrumbItem, { children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(BreadcrumbPage, { className: "capitalize", children: label }) });
3286
+ }
3287
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(BreadcrumbItem, { children: [
3288
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(BreadcrumbLink, { href: path, className: "capitalize", children: label }),
3289
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(BreadcrumbSeparator, {})
3290
+ ] });
3291
+ };
3292
+ var HeaderSidebar = () => {
3293
+ const { currentPath } = useSidebar2();
3294
+ const breadcrumbItems = currentPath.split("/").filter(Boolean).map((segment, index, array) => {
3295
+ const path = `/${array.slice(0, index + 1).join("/")}`;
3296
+ const isLast = index === array.length - 1;
3297
+ const label = routeMap[segment] || segment;
3298
+ return {
3299
+ path,
3300
+ label,
3301
+ isLast
3302
+ };
3303
+ });
3304
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("header", { className: "flex h-16 shrink-0 items-center border-b border-border bg-background px-4 transition-[width,height] ease-linear group-has-[[data-collapsible=icon]]/sidebar-wrapper:h-12", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "flex items-center gap-4", children: [
3305
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(SidebarTrigger, { className: "-ml-2 h-9 w-9" }),
3306
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Separator3, { orientation: "vertical", className: "h-6" }),
3307
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Breadcrumb, { children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(BreadcrumbList, { children: [
3308
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(BreadcrumbItem, { children: [
3309
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(BreadcrumbLink, { href: "/", className: "capitalize", children: "Home" }),
3310
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(BreadcrumbSeparator, {})
3311
+ ] }),
3312
+ breadcrumbItems.map((item) => /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(BreadcrumbElement, __spreadValues({}, item), item.path))
3313
+ ] }) })
3314
+ ] }) });
3315
+ };
3316
+
3317
+ // src/components/layout/Sidebar/components/footer-sidebar.tsx
3318
+ var import_jsx_runtime47 = require("react/jsx-runtime");
3319
+ var FooterSidebar = () => {
3320
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("footer", { className: "h-[65px]", children: [
3321
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Separator3, {}),
3322
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "flex items-center justify-between h-16 bg-background px-5", children: [
3323
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("span", { className: "text-sm text-muted-foreground", children: [
3324
+ "\xA9 ",
3325
+ (/* @__PURE__ */ new Date()).getFullYear(),
3326
+ " Your Company"
3327
+ ] }),
3328
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "text-sm text-muted-foreground", children: "Feito na terra do sol \u{1F31E}" })
3329
+ ] })
3330
+ ] });
3331
+ };
3332
+
3333
+ // src/components/layout/Sidebar/Sidebar.tsx
3334
+ var import_jsx_runtime48 = require("react/jsx-runtime");
3335
+ var Sidebar2 = (_a) => {
3336
+ var _b = _a, {
3337
+ children,
3338
+ contentClassName,
3339
+ showFooter = true,
3340
+ defaultPath,
3341
+ defaultCollapsed
3342
+ } = _b, rest = __objRest(_b, [
3343
+ "children",
3344
+ "contentClassName",
3345
+ "showFooter",
3346
+ "defaultPath",
3347
+ "defaultCollapsed"
3348
+ ]);
3349
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
3350
+ SidebarProvider2,
3351
+ {
3352
+ defaultPath,
3353
+ defaultCollapsed,
3354
+ children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(SidebarProvider, { children: [
3355
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(AppSidebar, __spreadValues({}, rest)),
3356
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(SidebarInset, { className: "overflow-auto bg-slate-50", children: [
3357
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(HeaderSidebar, {}),
3358
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
3359
+ "main",
3360
+ {
3361
+ className: cn(
3362
+ "flex flex-1 flex-col gap-4 p-4 pt-0",
3363
+ contentClassName
3364
+ ),
3365
+ children
3366
+ }
3367
+ ),
3368
+ showFooter && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(FooterSidebar, {})
3369
+ ] })
3370
+ ] })
3371
+ }
3372
+ );
3373
+ };
3374
+
3375
+ // src/components/layout/Sidebar/components/nav-user.tsx
3376
+ var import_lucide_react11 = require("lucide-react");
3377
+ var import_react11 = require("react");
3378
+ var import_jsx_runtime49 = require("react/jsx-runtime");
3379
+ function NavUser({
3380
+ user,
3381
+ logoutAction = () => {
3382
+ }
3383
+ }) {
3384
+ const { isMobile } = useSidebar();
3385
+ const renderUserInformation = (0, import_react11.useCallback)(() => {
3386
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_jsx_runtime49.Fragment, { children: [
3387
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Avatar, { className: "h-8 w-8 rounded-lg", children: [
3388
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(AvatarImage, { src: user == null ? void 0 : user.avatar, alt: user == null ? void 0 : user.name }),
3389
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(AvatarFallback, { className: "rounded-lg", children: "CN" })
3390
+ ] }),
3391
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "grid flex-1 text-left text-sm leading-tight", children: [
3392
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "truncate font-semibold", children: user == null ? void 0 : user.name }),
3393
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "truncate text-xs", children: user == null ? void 0 : user.email })
3394
+ ] })
3395
+ ] });
3396
+ }, [user]);
3397
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(SidebarMenu, { children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(SidebarMenuItem, { children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(DropdownMenu, { children: [
3398
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
3399
+ SidebarMenuButton,
3400
+ {
3401
+ size: "lg",
3402
+ className: "data-[state=open]:bg-sidebar-accent data-[state=open]:text-sidebar-accent-foreground",
3403
+ children: [
3404
+ renderUserInformation(),
3405
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_lucide_react11.ChevronsUpDown, { className: "ml-auto size-4" })
3406
+ ]
3407
+ }
3408
+ ) }),
3409
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
3410
+ DropdownMenuContent,
3411
+ {
3412
+ className: "w-[--radix-dropdown-menu-trigger-width] min-w-56 rounded-lg",
3413
+ side: isMobile ? "bottom" : "right",
3414
+ align: "end",
3415
+ sideOffset: 4,
3416
+ children: [
3417
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(DropdownMenuLabel, { className: "p-0 font-normal", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "flex items-center gap-2 px-1 py-1.5 text-left text-sm", children: renderUserInformation() }) }),
3418
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(DropdownMenuSeparator, {}),
3419
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(DropdownMenuGroup, { children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(DropdownMenuItem, { children: [
3420
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_lucide_react11.Sparkles, {}),
3421
+ "Upgrade to Pro"
3422
+ ] }) }),
3423
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(DropdownMenuSeparator, {}),
3424
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(DropdownMenuGroup, { children: [
3425
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(DropdownMenuItem, { children: [
3426
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_lucide_react11.BadgeCheck, {}),
3427
+ "Account"
3428
+ ] }),
3429
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(DropdownMenuItem, { children: [
3430
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_lucide_react11.CreditCard, {}),
3431
+ "Billing"
3432
+ ] }),
3433
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(DropdownMenuItem, { children: [
3434
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_lucide_react11.Bell, {}),
3435
+ "Notifications"
3436
+ ] })
3437
+ ] }),
3438
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(DropdownMenuSeparator, {}),
3439
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(DropdownMenuItem, { onClick: logoutAction, children: [
3440
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_lucide_react11.LogOut, {}),
3441
+ "Log out"
3442
+ ] })
3443
+ ]
3444
+ }
3445
+ )
3446
+ ] }) }) });
3447
+ }
3448
+
3449
+ // src/components/layout/PageLayout/index.tsx
3450
+ var import_jsx_runtime50 = require("react/jsx-runtime");
3451
+ var PageLayout = ({
3452
+ subtitle,
3453
+ title,
3454
+ children,
3455
+ header
3456
+ }) => {
3457
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "m-5 p-4 bg-white", children: [
3458
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "flex justify-between", children: [
3459
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { children: [
3460
+ title && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Text, { variant: "title", children: title }),
3461
+ subtitle && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Text, { variant: "muted", children: subtitle })
3462
+ ] }),
3463
+ header
3464
+ ] }),
3465
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "mt-5", children })
3466
+ ] });
3467
+ };
3468
+
3469
+ // src/components/ui/tabs.tsx
3470
+ var React23 = __toESM(require("react"));
3471
+ var TabsPrimitive = __toESM(require("@radix-ui/react-tabs"));
3472
+ var import_jsx_runtime51 = require("react/jsx-runtime");
3473
+ var Tabs = TabsPrimitive.Root;
3474
+ var TabsList = React23.forwardRef((_a, ref) => {
3475
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
3476
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
3477
+ TabsPrimitive.List,
3478
+ __spreadValues({
3479
+ ref,
3480
+ className: cn(
3481
+ "inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",
3482
+ className
3483
+ )
3484
+ }, props)
3485
+ );
3486
+ });
3487
+ TabsList.displayName = TabsPrimitive.List.displayName;
3488
+ var TabsTrigger = React23.forwardRef((_a, ref) => {
3489
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
3490
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
3491
+ TabsPrimitive.Trigger,
3492
+ __spreadValues({
3493
+ ref,
3494
+ className: cn(
3495
+ "inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",
3496
+ className
3497
+ )
3498
+ }, props)
3499
+ );
3500
+ });
3501
+ TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
3502
+ var TabsContent = React23.forwardRef((_a, ref) => {
3503
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
3504
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
3505
+ TabsPrimitive.Content,
3506
+ __spreadValues({
3507
+ ref,
3508
+ className: cn(
3509
+ "mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
3510
+ className
3511
+ )
3512
+ }, props)
3513
+ );
3514
+ });
3515
+ TabsContent.displayName = TabsPrimitive.Content.displayName;
3516
+
3517
+ // src/components/layout/Tabs/Tabs.tsx
3518
+ var import_jsx_runtime52 = require("react/jsx-runtime");
3519
+ var Tabs2 = ({
3520
+ tabs,
3521
+ activeTabIndex = 0,
3522
+ onTabChange,
3523
+ className
3524
+ }) => {
3525
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
3526
+ Tabs,
3527
+ {
3528
+ value: tabs[activeTabIndex].label,
3529
+ onValueChange: (value) => {
3530
+ const index = tabs.findIndex((tab) => tab.label === value);
3531
+ if (onTabChange) onTabChange(index);
3532
+ },
3533
+ className: cn("w-full", className),
3534
+ children: [
3535
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(TabsList, { children: tabs.map((tab, index) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(TabsTrigger, { value: tab.label, children: tab.label }, index)) }),
3536
+ tabs.map((tab, index) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(TabsContent, { value: tab.label, children: tab.content }, index))
3537
+ ]
3538
+ }
3539
+ );
3540
+ };
3541
+
3542
+ // src/components/actions/Steps/Steps.tsx
3543
+ var import_jsx_runtime53 = require("react/jsx-runtime");
3544
+ var Steps = ({ data, onClick = () => {
3545
+ }, value }) => {
3546
+ const renderSteps = (0, import_react12.useCallback)(() => {
3547
+ return data.map(({ label, id }, index) => {
3548
+ const isLast = index === data.length - 1;
3549
+ const isActive = typeof value === "number" && id <= value;
3550
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: cn(!isLast && "w-full flex items-center"), children: [
3551
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
3552
+ Button2,
3553
+ {
3554
+ onClick: () => onClick && onClick(id),
3555
+ variant: isActive ? "default" : "outline",
3556
+ size: "icon",
3557
+ className: "rounded-full",
3558
+ children: isActive ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Icon2, { name: "MdCheck" }) : index + 1
3559
+ }
3560
+ ) }),
3561
+ label && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("p", { className: "absolute", children: label }),
3562
+ !isLast && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
3563
+ Separator3,
3564
+ {
3565
+ orientation: "horizontal",
3566
+ className: cn(isActive && "bg-primary h-[2px]")
3567
+ }
3568
+ )
3569
+ ] }, index);
3570
+ });
3571
+ }, [data, onClick, value]);
3572
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "flex w-full", children: renderSteps() });
3573
+ };
3574
+
3575
+ // src/components/ui/alert-dialog.tsx
3576
+ var React24 = __toESM(require("react"));
3577
+ var AlertDialogPrimitive = __toESM(require("@radix-ui/react-alert-dialog"));
3578
+ var import_jsx_runtime54 = require("react/jsx-runtime");
3579
+ var AlertDialog = AlertDialogPrimitive.Root;
3580
+ var AlertDialogTrigger = AlertDialogPrimitive.Trigger;
3581
+ var AlertDialogPortal = AlertDialogPrimitive.Portal;
3582
+ var AlertDialogOverlay = React24.forwardRef((_a, ref) => {
3583
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
3584
+ return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
3585
+ AlertDialogPrimitive.Overlay,
3586
+ __spreadProps(__spreadValues({
3587
+ className: cn(
3588
+ "fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
3589
+ className
3590
+ )
3591
+ }, props), {
3592
+ ref
3593
+ })
3594
+ );
3595
+ });
3596
+ AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName;
3597
+ var AlertDialogContent = React24.forwardRef((_a, ref) => {
3598
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
3599
+ return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(AlertDialogPortal, { children: [
3600
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(AlertDialogOverlay, {}),
3601
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
3602
+ AlertDialogPrimitive.Content,
3603
+ __spreadValues({
3604
+ ref,
3605
+ className: cn(
3606
+ "fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
3607
+ className
3608
+ )
3609
+ }, props)
3610
+ )
3611
+ ] });
3612
+ });
3613
+ AlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName;
3614
+ var AlertDialogHeader = (_a) => {
3615
+ var _b = _a, {
3616
+ className
3617
+ } = _b, props = __objRest(_b, [
3618
+ "className"
3619
+ ]);
3620
+ return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
3621
+ "div",
3622
+ __spreadValues({
3623
+ className: cn(
3624
+ "flex flex-col space-y-2 text-center sm:text-left",
3625
+ className
3626
+ )
3627
+ }, props)
3628
+ );
3629
+ };
3630
+ AlertDialogHeader.displayName = "AlertDialogHeader";
3631
+ var AlertDialogFooter = (_a) => {
3632
+ var _b = _a, {
3633
+ className
3634
+ } = _b, props = __objRest(_b, [
3635
+ "className"
3636
+ ]);
3637
+ return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
3638
+ "div",
3639
+ __spreadValues({
3640
+ className: cn(
3641
+ "flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
3642
+ className
3643
+ )
3644
+ }, props)
3645
+ );
3646
+ };
3647
+ AlertDialogFooter.displayName = "AlertDialogFooter";
3648
+ var AlertDialogTitle = React24.forwardRef((_a, ref) => {
3649
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
3650
+ return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
3651
+ AlertDialogPrimitive.Title,
3652
+ __spreadValues({
3653
+ ref,
3654
+ className: cn("text-lg font-semibold", className)
3655
+ }, props)
3656
+ );
3657
+ });
3658
+ AlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName;
3659
+ var AlertDialogDescription = React24.forwardRef((_a, ref) => {
3660
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
3661
+ return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
3662
+ AlertDialogPrimitive.Description,
3663
+ __spreadValues({
3664
+ ref,
3665
+ className: cn("text-sm text-muted-foreground", className)
3666
+ }, props)
3667
+ );
3668
+ });
3669
+ AlertDialogDescription.displayName = AlertDialogPrimitive.Description.displayName;
3670
+ var AlertDialogAction = React24.forwardRef((_a, ref) => {
3671
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
3672
+ return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
3673
+ AlertDialogPrimitive.Action,
3674
+ __spreadValues({
3675
+ ref,
3676
+ className: cn(buttonVariants(), className)
3677
+ }, props)
3678
+ );
3679
+ });
3680
+ AlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName;
3681
+ var AlertDialogCancel = React24.forwardRef((_a, ref) => {
3682
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
3683
+ return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
3684
+ AlertDialogPrimitive.Cancel,
3685
+ __spreadValues({
3686
+ ref,
3687
+ className: cn(
3688
+ buttonVariants({ variant: "outline" }),
3689
+ "mt-2 sm:mt-0",
3690
+ className
3691
+ )
3692
+ }, props)
3693
+ );
3694
+ });
3695
+ AlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName;
3696
+
3697
+ // src/components/actions/AlertDialog/AlertDialog.tsx
3698
+ var import_jsx_runtime55 = require("react/jsx-runtime");
3699
+ var AlertDialog2 = ({
3700
+ title,
3701
+ description,
3702
+ children,
3703
+ onConfirm,
3704
+ onCancel
3705
+ }) => {
3706
+ return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(AlertDialog, { children: [
3707
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(AlertDialogTrigger, { asChild: true, children }),
3708
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(AlertDialogContent, { children: [
3709
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(AlertDialogHeader, { children: [
3710
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(AlertDialogTitle, { children: title }),
3711
+ description && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(AlertDialogDescription, { children: description })
3712
+ ] }),
3713
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(AlertDialogFooter, { children: [
3714
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(AlertDialogCancel, { onClick: onCancel, children: "Cancel" }),
3715
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(AlertDialogAction, { onClick: onConfirm, children: "Continue" })
3716
+ ] })
3717
+ ] })
3718
+ ] });
3719
+ };
3720
+
3721
+ // src/components/dataInput/Input/components/MultipleInput/MultipleInputBase.tsx
3722
+ var import_react13 = require("react");
3723
+ var import_react_hook_form5 = require("react-hook-form");
3724
+ var import_lodash2 = __toESM(require("lodash"));
3725
+ var import_jsx_runtime56 = require("react/jsx-runtime");
3726
+ var MultipleInputBase = ({
3727
+ children,
3728
+ data = [],
3729
+ name,
3730
+ onChangeData = () => {
3731
+ },
3732
+ error
3733
+ }) => {
3734
+ const form = (0, import_react_hook_form5.useFormContext)();
3735
+ const withForm = !!form && !!name;
3736
+ const [inputValue, setInputValue] = (0, import_react13.useState)("");
3737
+ const inputData = (0, import_react13.useMemo)(() => {
3738
+ if (withForm) {
3739
+ return import_lodash2.default.get(form.watch(), name) || [];
3740
+ }
3741
+ return data;
3742
+ }, [withForm, form, name, data]);
3743
+ const errorMessage = (0, import_react13.useMemo)(() => {
3744
+ var _a;
3745
+ if (withForm) {
3746
+ return (_a = import_lodash2.default.get(form.formState.errors, name)) == null ? void 0 : _a.message;
3747
+ }
3748
+ return error;
3749
+ }, [error, form, name, withForm]);
3750
+ const updateData = (0, import_react13.useCallback)(() => {
3751
+ if (!inputValue.length) return;
3752
+ if (withForm) {
3753
+ form.setValue(name, [...inputData, inputValue]);
3754
+ } else {
3755
+ onChangeData == null ? void 0 : onChangeData(inputData.concat(inputValue));
3756
+ }
3757
+ setInputValue("");
3758
+ }, [inputData, inputValue, withForm, form, name, onChangeData]);
3759
+ const removeItem = (0, import_react13.useCallback)(
3760
+ (index) => {
3761
+ if (withForm) {
3762
+ form.setValue(
3763
+ name,
3764
+ inputData.filter((_2, i) => i !== index)
3765
+ );
3766
+ } else {
3767
+ onChangeData == null ? void 0 : onChangeData(inputData.filter((_2, i) => i !== index));
3768
+ }
3769
+ },
3770
+ [withForm, form, name, inputData, onChangeData]
3771
+ );
3772
+ const renderOptions = (0, import_react13.useCallback)(() => {
3773
+ return inputData == null ? void 0 : inputData.map((item, index) => {
3774
+ return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "flex justify-between mt-2", children: [
3775
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { children: item }),
3776
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
3777
+ Button2,
3778
+ {
3779
+ onClick: () => removeItem(index),
3780
+ variant: "ghost",
3781
+ size: "icon",
3782
+ type: "button",
3783
+ children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Icon2, { name: "MdDelete", className: "fill-destructive" })
3784
+ }
3785
+ )
3786
+ ] }, index);
3787
+ });
3788
+ }, [inputData, removeItem]);
3789
+ return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { children: [
3790
+ children({
3791
+ onChange: ({ target: { value } }) => {
3792
+ setInputValue(value);
3793
+ },
3794
+ addItem: updateData,
3795
+ value: inputValue,
3796
+ error: errorMessage
3797
+ }),
3798
+ renderOptions()
3799
+ ] });
3800
+ };
3801
+
3802
+ // src/components/dataInput/Input/components/MultipleInput/MultipleMaskInput.tsx
3803
+ var import_jsx_runtime57 = require("react/jsx-runtime");
3804
+ var MultipleMaskInput = (_a) => {
3805
+ var _b = _a, {
3806
+ data = []
3807
+ } = _b, props = __objRest(_b, [
3808
+ "data"
3809
+ ]);
3810
+ return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(MultipleInputBase, __spreadProps(__spreadValues({ data }, props), { children: ({ onChange, addItem, value }) => {
3811
+ return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
3812
+ MaskInput,
3813
+ __spreadProps(__spreadValues({}, props), {
3814
+ value,
3815
+ onChange,
3816
+ withoutForm: true,
3817
+ component: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Button2, { type: "button", onClick: () => addItem(), children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Icon2, { name: "MdAdd" }) })
3818
+ })
3819
+ );
3820
+ } }));
3821
+ };
3822
+
3823
+ // src/components/dataInput/Select/SelectBase.tsx
3824
+ var import_react14 = require("react");
3825
+ var import_jsx_runtime58 = require("react/jsx-runtime");
3826
+ var SelectBase = (_a) => {
3827
+ var _b = _a, {
3828
+ options,
3829
+ placeholder,
3830
+ onChange = () => {
3831
+ },
3832
+ onChangeCallback = () => {
3833
+ },
3834
+ value
3835
+ } = _b, rest = __objRest(_b, [
3836
+ "options",
3837
+ "placeholder",
3838
+ "onChange",
3839
+ "onChangeCallback",
3840
+ "value"
3841
+ ]);
3842
+ const onSelect = (0, import_react14.useCallback)(
3843
+ (value2) => {
3844
+ onChange(value2);
3845
+ onChangeCallback(value2);
3846
+ },
3847
+ [onChange, onChangeCallback]
3848
+ );
3849
+ return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
3850
+ Select,
3851
+ __spreadProps(__spreadValues({}, rest), {
3852
+ onValueChange: onSelect,
3853
+ defaultValue: value,
3854
+ value,
3855
+ children: [
3856
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(SelectTrigger, { children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(SelectValue, { placeholder }) }),
3857
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(SelectContent, { children: options == null ? void 0 : options.map((option, index) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(SelectItem, { value: String(option.value), children: option.label }, index)) })
3858
+ ]
3859
+ })
3860
+ );
3861
+ };
3862
+
3863
+ // src/components/dataInput/Select/Select.tsx
3864
+ var import_react_hook_form6 = require("react-hook-form");
3865
+ var import_jsx_runtime59 = require("react/jsx-runtime");
3866
+ var Select2 = (_a) => {
3867
+ var _b = _a, {
3868
+ name,
3869
+ label,
3870
+ description,
3871
+ error,
3872
+ className,
3873
+ withoutForm,
3874
+ options,
3875
+ placeholder
3876
+ } = _b, props = __objRest(_b, [
3877
+ "name",
3878
+ "label",
3879
+ "description",
3880
+ "error",
3881
+ "className",
3882
+ "withoutForm",
3883
+ "options",
3884
+ "placeholder"
3885
+ ]);
3886
+ const form = (0, import_react_hook_form6.useFormContext)();
3887
+ const hasForm = !!form && !!name;
3888
+ if (!hasForm || withoutForm) {
3889
+ return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: cn("space-y-2", className), children: [
3890
+ label && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Label3, { children: label }),
3891
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(SelectBase, __spreadValues({ options, placeholder }, props)),
3892
+ description && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("p", { className: "text-sm text-muted-foreground", children: description }),
3893
+ error && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(ErrorMessage, { children: error })
3894
+ ] });
3895
+ }
3896
+ return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
3897
+ FormField,
3898
+ {
3899
+ control: form.control,
3900
+ name,
3901
+ render: ({ field }) => /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(FormItem, { className, children: [
3902
+ label && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(FormLabel, { children: label }),
3903
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(FormControl, { children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
3904
+ SelectBase,
3905
+ __spreadValues(__spreadValues({
3906
+ options,
3907
+ placeholder
3908
+ }, props), field)
3909
+ ) }),
3910
+ description && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(FormDescription, { children: description }),
3911
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(FormMessage, {})
3912
+ ] })
3913
+ }
3914
+ );
3915
+ };
3916
+
3917
+ // src/components/dataDisplay/Label/Label.tsx
3918
+ var import_jsx_runtime60 = require("react/jsx-runtime");
3919
+ var Label4 = (props) => {
3920
+ return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Label3, __spreadValues({}, props));
3921
+ };
3922
+
3923
+ // src/components/dataInput/Select/MultiSelect/MultiSelectBase.tsx
3924
+ var React25 = __toESM(require("react"));
3925
+ var import_lucide_react12 = require("lucide-react");
3926
+ var Popover = __toESM(require("@radix-ui/react-popover"));
3927
+ var import_jsx_runtime61 = require("react/jsx-runtime");
3928
+ function MultiSelectBase({
3929
+ options = [],
3930
+ selected = [],
3931
+ onChange = () => {
3932
+ },
3933
+ placeholder = "Select frameworks...",
3934
+ className
3935
+ }) {
3936
+ const [open, setOpen] = React25.useState(false);
3937
+ const [inputValue, setInputValue] = React25.useState("");
3938
+ const inputRef = React25.useRef(null);
3939
+ const handleRemoveItem = (valueToRemove) => {
3940
+ onChange(selected.filter((value) => value !== valueToRemove));
3941
+ };
3942
+ const handleSelectItem = (value) => {
3943
+ if (selected.includes(value)) {
3944
+ onChange(selected.filter((v) => v !== value));
3945
+ } else {
3946
+ onChange([...selected, value]);
3947
+ }
3948
+ };
3949
+ const filteredOptions = options.filter(
3950
+ (option) => option.label.toLowerCase().includes(inputValue.toLowerCase())
3951
+ );
3952
+ return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(Popover.Root, { open, onOpenChange: setOpen, children: [
3953
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(Popover.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
3954
+ "div",
3955
+ {
3956
+ className: cn(
3957
+ "flex min-h-[40px] w-full flex-wrap gap-1.5 rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2",
3958
+ className
3959
+ ),
3960
+ children: [
3961
+ selected.map((value) => {
3962
+ const option = options.find((o) => o.value === value);
3963
+ if (!option) return null;
3964
+ return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
3965
+ "div",
3966
+ {
3967
+ className: "flex items-center gap-1 rounded-md bg-secondary px-2 py-1 text-sm text-secondary-foreground",
3968
+ children: [
3969
+ option.label,
3970
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
3971
+ "button",
3972
+ {
3973
+ type: "button",
3974
+ onClick: (e) => {
3975
+ e.stopPropagation();
3976
+ handleRemoveItem(value);
3977
+ },
3978
+ className: "rounded-full hover:bg-secondary-foreground/20",
3979
+ children: [
3980
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_lucide_react12.X, { className: "h-3 w-3" }),
3981
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("span", { className: "sr-only", children: [
3982
+ "Remove ",
3983
+ option.label
3984
+ ] })
3985
+ ]
3986
+ }
3987
+ )
3988
+ ]
3989
+ },
3990
+ value
3991
+ );
3992
+ }),
3993
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "flex-1", children: selected.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("span", { className: "text-muted-foreground", children: placeholder }) })
3994
+ ]
3995
+ }
3996
+ ) }),
3997
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(Popover.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
3998
+ Popover.Content,
3999
+ {
4000
+ className: "w-[--radix-popover-trigger-width] z-50 mt-1 overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95",
4001
+ align: "start",
4002
+ sideOffset: 4,
4003
+ children: [
4004
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "flex items-center border-b border-border px-3 py-2", children: [
4005
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_lucide_react12.Search, { className: "h-4 w-4 text-muted-foreground" }),
4006
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
4007
+ "input",
4008
+ {
4009
+ ref: inputRef,
4010
+ value: inputValue,
4011
+ onChange: (e) => setInputValue(e.target.value),
4012
+ placeholder: "Search...",
4013
+ className: "flex-1 bg-transparent px-2 outline-none placeholder:text-muted-foreground"
4014
+ }
4015
+ )
4016
+ ] }),
4017
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "max-h-[200px] overflow-auto", children: filteredOptions.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "px-2 py-4 text-center text-sm text-muted-foreground", children: "No results found." }) : filteredOptions.map((option) => /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
4018
+ "div",
4019
+ {
4020
+ onClick: () => handleSelectItem(option.value),
4021
+ className: cn(
4022
+ "flex cursor-pointer items-center gap-2 px-4 py-2 text-sm hover:bg-accent",
4023
+ selected.includes(option.value) && "bg-accent"
4024
+ ),
4025
+ children: [
4026
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
4027
+ "div",
4028
+ {
4029
+ className: cn(
4030
+ "flex h-4 w-4 items-center justify-center rounded border border-primary",
4031
+ selected.includes(option.value) && "bg-primary text-primary-foreground"
4032
+ ),
4033
+ children: selected.includes(option.value) && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("span", { className: "text-[10px]", children: "\u2713" })
4034
+ }
4035
+ ),
4036
+ option.label
4037
+ ]
4038
+ },
4039
+ option.value
4040
+ )) })
4041
+ ]
4042
+ }
4043
+ ) })
4044
+ ] });
4045
+ }
4046
+
4047
+ // src/components/dataInput/Select/MultiSelect/index.tsx
4048
+ var import_react_hook_form7 = require("react-hook-form");
4049
+ var import_jsx_runtime62 = require("react/jsx-runtime");
4050
+ function MultiSelect(_a) {
4051
+ var _b = _a, {
4052
+ label,
4053
+ name,
4054
+ withoutForm,
4055
+ className,
4056
+ required,
4057
+ "data-testid": testId
4058
+ } = _b, props = __objRest(_b, [
4059
+ "label",
4060
+ "name",
4061
+ "withoutForm",
4062
+ "className",
4063
+ "required",
4064
+ "data-testid"
4065
+ ]);
4066
+ const form = (0, import_react_hook_form7.useFormContext)();
4067
+ const hasForm = !withoutForm && !!form && !!name;
4068
+ if (!hasForm)
4069
+ return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: "grid w-full items-center gap-3", children: [
4070
+ label && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Label4, { htmlFor: name, children: label }),
4071
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(MultiSelectBase, __spreadValues({}, props))
4072
+ ] });
4073
+ return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
4074
+ FormField,
4075
+ {
4076
+ control: form.control,
4077
+ name,
4078
+ render: (_a2) => {
4079
+ var { field: _b2 } = _a2, _c = _b2, { value } = _c, rest = __objRest(_c, ["value"]);
4080
+ return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
4081
+ FormItem,
4082
+ {
4083
+ className,
4084
+ "data-testid": testId ? `form-item-${testId}` : void 0,
4085
+ children: [
4086
+ label && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
4087
+ FormLabel,
4088
+ {
4089
+ htmlFor: name,
4090
+ "data-testid": testId ? `form-label-${testId}` : void 0,
4091
+ children: `${label}${required ? " *" : ""}`
4092
+ }
4093
+ ),
4094
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(FormControl, { children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: "flex w-full items-center space-x-2", children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(MultiSelectBase, __spreadProps(__spreadValues(__spreadValues({}, props), rest), { selected: value })) }) }),
4095
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
4096
+ FormMessage,
4097
+ {
4098
+ role: "alert",
4099
+ "data-testid": testId ? `form-message-${testId}` : void 0
4100
+ }
4101
+ )
4102
+ ]
4103
+ }
4104
+ );
4105
+ }
4106
+ }
4107
+ );
4108
+ }
4109
+
4110
+ // src/components/ui/switch.tsx
4111
+ var React26 = __toESM(require("react"));
4112
+ var SwitchPrimitives = __toESM(require("@radix-ui/react-switch"));
4113
+ var import_jsx_runtime63 = require("react/jsx-runtime");
4114
+ var Switch = React26.forwardRef((_a, ref) => {
4115
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
4116
+ return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
4117
+ SwitchPrimitives.Root,
4118
+ __spreadProps(__spreadValues({
4119
+ className: cn(
4120
+ "peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",
4121
+ className
4122
+ )
4123
+ }, props), {
4124
+ ref,
4125
+ children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
4126
+ SwitchPrimitives.Thumb,
4127
+ {
4128
+ className: cn(
4129
+ "pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0"
4130
+ )
4131
+ }
4132
+ )
4133
+ })
4134
+ );
4135
+ });
4136
+ Switch.displayName = SwitchPrimitives.Root.displayName;
4137
+
4138
+ // src/components/dataInput/Switch/Switch.tsx
4139
+ var import_react_hook_form8 = require("react-hook-form");
4140
+ var import_jsx_runtime64 = require("react/jsx-runtime");
4141
+ function Switch2(_a) {
4142
+ var _b = _a, {
4143
+ label,
4144
+ withoutForm,
4145
+ className
4146
+ } = _b, props = __objRest(_b, [
4147
+ "label",
4148
+ "withoutForm",
4149
+ "className"
4150
+ ]);
4151
+ var _a2;
4152
+ const form = (0, import_react_hook_form8.useFormContext)();
4153
+ const hasForm = !!form && !withoutForm && !!props.name;
4154
+ if (!hasForm)
4155
+ return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { className: "flex items-center space-x-2", children: [
4156
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(Switch, __spreadValues({}, props)),
4157
+ label && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(Label3, { htmlFor: props.id, children: label })
4158
+ ] });
4159
+ return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
4160
+ FormField,
4161
+ {
4162
+ control: form.control,
4163
+ name: (_a2 = props.name) != null ? _a2 : "",
4164
+ render: ({ field }) => /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(
4165
+ FormItem,
4166
+ {
4167
+ className: cn(className, "flex items-center space-x-2 space-y-0"),
4168
+ children: [
4169
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(FormControl, { children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(Switch2, { checked: field.value, onCheckedChange: field.onChange }) }),
4170
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(FormLabel, { children: label })
4171
+ ]
4172
+ }
4173
+ )
4174
+ }
4175
+ );
4176
+ }
4177
+ // Annotate the CommonJS export names for ESM import in node:
4178
+ 0 && (module.exports = {
4179
+ AlertDialog,
4180
+ Avatar,
4181
+ AvatarFallback,
4182
+ AvatarImage,
4183
+ Badge,
4184
+ Breadcrumb,
4185
+ BreadcrumbEllipsis,
4186
+ BreadcrumbItem,
4187
+ BreadcrumbLink,
4188
+ BreadcrumbList,
4189
+ BreadcrumbPage,
4190
+ BreadcrumbSeparator,
4191
+ Button,
4192
+ Checkbox,
4193
+ Collapsible,
4194
+ CollapsibleContent,
4195
+ CollapsibleTrigger,
4196
+ CustomDrawer,
4197
+ DataPairList,
4198
+ Dialog,
4199
+ DialogWithForm,
4200
+ Drawer,
4201
+ DrawerClose,
4202
+ DrawerContent,
4203
+ DrawerDescription,
4204
+ DrawerFooter,
4205
+ DrawerHeader,
4206
+ DrawerOverlay,
4207
+ DrawerPortal,
4208
+ DrawerTitle,
4209
+ DrawerTrigger,
4210
+ DropdownMenu,
4211
+ DropdownMenuCheckboxItem,
4212
+ DropdownMenuContent,
4213
+ DropdownMenuGroup,
4214
+ DropdownMenuItem,
4215
+ DropdownMenuLabel,
4216
+ DropdownMenuPortal,
4217
+ DropdownMenuRadioGroup,
4218
+ DropdownMenuRadioItem,
4219
+ DropdownMenuSeparator,
4220
+ DropdownMenuShortcut,
4221
+ DropdownMenuSub,
4222
+ DropdownMenuSubContent,
4223
+ DropdownMenuSubTrigger,
4224
+ DropdownMenuTrigger,
4225
+ DynamicTable,
4226
+ Form,
4227
+ FormControl,
4228
+ FormDescription,
4229
+ FormField,
4230
+ FormItem,
4231
+ FormLabel,
4232
+ FormMessage,
4233
+ Icon,
4234
+ Input,
4235
+ MaskInput,
4236
+ MultiSelect,
4237
+ MultipleInput,
4238
+ MultipleMaskInput,
4239
+ NavUser,
4240
+ NumberInput,
4241
+ PageLayout,
4242
+ Select,
4243
+ Separator,
4244
+ Sheet,
4245
+ Sidebar,
4246
+ Spinner,
4247
+ Steps,
4248
+ Switch,
4249
+ Tabs,
4250
+ Text,
4251
+ Toaster,
4252
+ badgeVariants,
4253
+ reducer,
4254
+ toast,
4255
+ useFormContext,
4256
+ useFormField,
4257
+ useToast
4258
+ });
4259
+ //# sourceMappingURL=index.js.map