analytica-frontend-lib 1.2.12 → 1.2.14

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 (66) hide show
  1. package/dist/AlertManager/index.css +19117 -0
  2. package/dist/AlertManager/index.css.map +1 -0
  3. package/dist/AlertManager/index.d.mts +12 -0
  4. package/dist/AlertManager/index.d.ts +12 -0
  5. package/dist/AlertManager/index.js +6018 -0
  6. package/dist/AlertManager/index.js.map +1 -0
  7. package/dist/AlertManager/index.mjs +6045 -0
  8. package/dist/AlertManager/index.mjs.map +1 -0
  9. package/dist/AlertManagerView/index.d.mts +25 -0
  10. package/dist/AlertManagerView/index.d.ts +25 -0
  11. package/dist/AlertManagerView/index.js +975 -0
  12. package/dist/AlertManagerView/index.js.map +1 -0
  13. package/dist/AlertManagerView/index.mjs +958 -0
  14. package/dist/AlertManagerView/index.mjs.map +1 -0
  15. package/dist/CheckBox/index.d.mts +1 -1
  16. package/dist/CheckBox/index.d.ts +1 -1
  17. package/dist/DropdownMenu/index.js +3 -2
  18. package/dist/DropdownMenu/index.js.map +1 -1
  19. package/dist/DropdownMenu/index.mjs +3 -2
  20. package/dist/DropdownMenu/index.mjs.map +1 -1
  21. package/dist/Modal/index.d.mts +2 -1
  22. package/dist/Modal/index.d.ts +2 -1
  23. package/dist/Modal/index.js +3 -2
  24. package/dist/Modal/index.js.map +1 -1
  25. package/dist/Modal/index.mjs +3 -2
  26. package/dist/Modal/index.mjs.map +1 -1
  27. package/dist/NotificationCard/index.js +3 -2
  28. package/dist/NotificationCard/index.js.map +1 -1
  29. package/dist/NotificationCard/index.mjs +3 -2
  30. package/dist/NotificationCard/index.mjs.map +1 -1
  31. package/dist/Quiz/index.js +3 -2
  32. package/dist/Quiz/index.js.map +1 -1
  33. package/dist/Quiz/index.mjs +3 -2
  34. package/dist/Quiz/index.mjs.map +1 -1
  35. package/dist/Radio/index.d.mts +2 -2
  36. package/dist/Radio/index.d.ts +2 -2
  37. package/dist/Search/index.d.mts +1 -1
  38. package/dist/Search/index.d.ts +1 -1
  39. package/dist/Search/index.js +3 -2
  40. package/dist/Search/index.js.map +1 -1
  41. package/dist/Search/index.mjs +3 -2
  42. package/dist/Search/index.mjs.map +1 -1
  43. package/dist/Stepper/index.js +1 -1
  44. package/dist/Stepper/index.js.map +1 -1
  45. package/dist/Stepper/index.mjs +1 -1
  46. package/dist/Stepper/index.mjs.map +1 -1
  47. package/dist/Table/index.d.mts +14 -0
  48. package/dist/Table/index.d.ts +14 -0
  49. package/dist/Table/index.js +279 -30
  50. package/dist/Table/index.js.map +1 -1
  51. package/dist/Table/index.mjs +284 -32
  52. package/dist/Table/index.mjs.map +1 -1
  53. package/dist/index.css +32 -0
  54. package/dist/index.css.map +1 -1
  55. package/dist/index.d.mts +8 -19
  56. package/dist/index.d.ts +8 -19
  57. package/dist/index.js +3229 -2246
  58. package/dist/index.js.map +1 -1
  59. package/dist/index.mjs +3182 -2192
  60. package/dist/index.mjs.map +1 -1
  61. package/dist/notification-TD7ZFRLL.png +0 -0
  62. package/dist/styles.css +32 -0
  63. package/dist/styles.css.map +1 -1
  64. package/dist/types-DMycdI4U.d.mts +88 -0
  65. package/dist/types-DMycdI4U.d.ts +88 -0
  66. package/package.json +1 -1
@@ -0,0 +1,975 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/components/AlertManagerView/AlertsManagerView.tsx
21
+ var AlertsManagerView_exports = {};
22
+ __export(AlertsManagerView_exports, {
23
+ AlertsManagerView: () => AlertsManagerView
24
+ });
25
+ module.exports = __toCommonJS(AlertsManagerView_exports);
26
+ var import_react3 = require("react");
27
+
28
+ // src/components/Modal/Modal.tsx
29
+ var import_react = require("react");
30
+ var import_phosphor_react = require("phosphor-react");
31
+
32
+ // src/utils/utils.ts
33
+ var import_clsx = require("clsx");
34
+ var import_tailwind_merge = require("tailwind-merge");
35
+ function cn(...inputs) {
36
+ return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
37
+ }
38
+
39
+ // src/components/Button/Button.tsx
40
+ var import_jsx_runtime = require("react/jsx-runtime");
41
+ var VARIANT_ACTION_CLASSES = {
42
+ solid: {
43
+ primary: "bg-primary-950 text-text border border-primary-950 hover:bg-primary-800 hover:border-primary-800 focus-visible:outline-none focus-visible:bg-primary-950 focus-visible:ring-2 focus-visible:ring-offset-0 focus-visible:ring-indicator-info active:bg-primary-700 active:border-primary-700 disabled:bg-primary-500 disabled:border-primary-500 disabled:opacity-40 disabled:cursor-not-allowed",
44
+ positive: "bg-success-500 text-text border border-success-500 hover:bg-success-600 hover:border-success-600 focus-visible:outline-none focus-visible:bg-success-500 focus-visible:ring-2 focus-visible:ring-offset-0 focus-visible:ring-indicator-info active:bg-success-700 active:border-success-700 disabled:bg-success-500 disabled:border-success-500 disabled:opacity-40 disabled:cursor-not-allowed",
45
+ negative: "bg-error-500 text-text border border-error-500 hover:bg-error-600 hover:border-error-600 focus-visible:outline-none focus-visible:bg-error-500 focus-visible:ring-2 focus-visible:ring-offset-0 focus-visible:ring-indicator-info active:bg-error-700 active:border-error-700 disabled:bg-error-500 disabled:border-error-500 disabled:opacity-40 disabled:cursor-not-allowed"
46
+ },
47
+ outline: {
48
+ primary: "bg-transparent text-primary-950 border border-primary-950 hover:bg-background-50 hover:text-primary-400 hover:border-primary-400 focus-visible:border-0 focus-visible:outline-none focus-visible:text-primary-600 focus-visible:ring-2 focus-visible:ring-offset-0 focus-visible:ring-indicator-info active:text-primary-700 active:border-primary-700 disabled:opacity-40 disabled:cursor-not-allowed",
49
+ positive: "bg-transparent text-success-500 border border-success-300 hover:bg-background-50 hover:text-success-400 hover:border-success-400 focus-visible:border-0 focus-visible:outline-none focus-visible:text-success-600 focus-visible:ring-2 focus-visible:ring-offset-0 focus-visible:ring-indicator-info active:text-success-700 active:border-success-700 disabled:opacity-40 disabled:cursor-not-allowed",
50
+ negative: "bg-transparent text-error-500 border border-error-300 hover:bg-background-50 hover:text-error-400 hover:border-error-400 focus-visible:border-0 focus-visible:outline-none focus-visible:text-error-600 focus-visible:ring-2 focus-visible:ring-offset-0 focus-visible:ring-indicator-info active:text-error-700 active:border-error-700 disabled:opacity-40 disabled:cursor-not-allowed"
51
+ },
52
+ link: {
53
+ primary: "bg-transparent text-primary-950 hover:text-primary-400 focus-visible:outline-none focus-visible:text-primary-600 focus-visible:ring-2 focus-visible:ring-offset-0 focus-visible:ring-indicator-info active:text-primary-700 disabled:opacity-40 disabled:cursor-not-allowed",
54
+ positive: "bg-transparent text-success-500 hover:text-success-400 focus-visible:outline-none focus-visible:text-success-600 focus-visible:ring-2 focus-visible:ring-offset-0 focus-visible:ring-indicator-info active:text-success-700 disabled:opacity-40 disabled:cursor-not-allowed",
55
+ negative: "bg-transparent text-error-500 hover:text-error-400 focus-visible:outline-none focus-visible:text-error-600 focus-visible:ring-2 focus-visible:ring-offset-0 focus-visible:ring-indicator-info active:text-error-700 disabled:opacity-40 disabled:cursor-not-allowed"
56
+ }
57
+ };
58
+ var SIZE_CLASSES = {
59
+ "extra-small": "text-xs px-3.5 py-2",
60
+ small: "text-sm px-4 py-2.5",
61
+ medium: "text-md px-5 py-2.5",
62
+ large: "text-lg px-6 py-3",
63
+ "extra-large": "text-lg px-7 py-3.5"
64
+ };
65
+ var Button = ({
66
+ children,
67
+ iconLeft,
68
+ iconRight,
69
+ size = "medium",
70
+ variant = "solid",
71
+ action = "primary",
72
+ className = "",
73
+ disabled,
74
+ type = "button",
75
+ ...props
76
+ }) => {
77
+ const sizeClasses = SIZE_CLASSES[size];
78
+ const variantClasses = VARIANT_ACTION_CLASSES[variant][action];
79
+ const baseClasses = "inline-flex items-center justify-center rounded-full cursor-pointer font-medium";
80
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
81
+ "button",
82
+ {
83
+ className: cn(baseClasses, variantClasses, sizeClasses, className),
84
+ disabled,
85
+ type,
86
+ ...props,
87
+ children: [
88
+ iconLeft && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "mr-2 flex items-center", children: iconLeft }),
89
+ children,
90
+ iconRight && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "ml-2 flex items-center", children: iconRight })
91
+ ]
92
+ }
93
+ );
94
+ };
95
+ var Button_default = Button;
96
+
97
+ // src/components/Modal/utils/videoUtils.ts
98
+ var isYouTubeUrl = (url) => {
99
+ const youtubeRegex = /^(https?:\/\/)?((www|m|music)\.)?(youtube\.com|youtu\.be|youtube-nocookie\.com)\/.+/i;
100
+ return youtubeRegex.test(url);
101
+ };
102
+ var isValidYouTubeHost = (host) => {
103
+ if (host === "youtu.be") return "youtu.be";
104
+ const isValidYouTubeCom = host === "youtube.com" || host.endsWith(".youtube.com") && /^(www|m|music)\.youtube\.com$/.test(host);
105
+ if (isValidYouTubeCom) return "youtube";
106
+ const isValidNoCookie = host === "youtube-nocookie.com" || host.endsWith(".youtube-nocookie.com") && /^(www|m|music)\.youtube-nocookie\.com$/.test(host);
107
+ if (isValidNoCookie) return "nocookie";
108
+ return null;
109
+ };
110
+ var extractYoutuBeId = (pathname) => {
111
+ const firstSeg = pathname.split("/").filter(Boolean)[0];
112
+ return firstSeg || null;
113
+ };
114
+ var extractYouTubeId = (pathname, searchParams) => {
115
+ const parts = pathname.split("/").filter(Boolean);
116
+ const [first, second] = parts;
117
+ if (first === "embed" && second) return second;
118
+ if (first === "shorts" && second) return second;
119
+ if (first === "live" && second) return second;
120
+ const v = searchParams.get("v");
121
+ if (v) return v;
122
+ return null;
123
+ };
124
+ var getYouTubeVideoId = (url) => {
125
+ try {
126
+ const u = new URL(url);
127
+ const hostType = isValidYouTubeHost(u.hostname.toLowerCase());
128
+ if (!hostType) return null;
129
+ if (hostType === "youtu.be") {
130
+ return extractYoutuBeId(u.pathname);
131
+ }
132
+ return extractYouTubeId(u.pathname, u.searchParams);
133
+ } catch {
134
+ return null;
135
+ }
136
+ };
137
+ var getYouTubeEmbedUrl = (videoId) => {
138
+ return `https://www.youtube-nocookie.com/embed/${videoId}?autoplay=0&rel=0&modestbranding=1`;
139
+ };
140
+
141
+ // src/components/Modal/Modal.tsx
142
+ var import_jsx_runtime2 = require("react/jsx-runtime");
143
+ var SIZE_CLASSES2 = {
144
+ xs: "max-w-[360px]",
145
+ sm: "max-w-[420px]",
146
+ md: "max-w-[510px]",
147
+ lg: "max-w-[640px]",
148
+ xl: "max-w-[970px]"
149
+ };
150
+ var Modal = ({
151
+ isOpen,
152
+ onClose,
153
+ title,
154
+ children,
155
+ size = "md",
156
+ className = "",
157
+ closeOnEscape = true,
158
+ footer,
159
+ hideCloseButton = false,
160
+ variant = "default",
161
+ description,
162
+ image,
163
+ imageAlt,
164
+ actionLink,
165
+ actionLabel,
166
+ contentClassName = ""
167
+ }) => {
168
+ const titleId = (0, import_react.useId)();
169
+ (0, import_react.useEffect)(() => {
170
+ if (!isOpen || !closeOnEscape) return;
171
+ const handleEscape = (event) => {
172
+ if (event.key === "Escape") {
173
+ onClose();
174
+ }
175
+ };
176
+ document.addEventListener("keydown", handleEscape);
177
+ return () => document.removeEventListener("keydown", handleEscape);
178
+ }, [isOpen, closeOnEscape, onClose]);
179
+ (0, import_react.useEffect)(() => {
180
+ if (!isOpen) return;
181
+ const scrollbarWidth = window.innerWidth - document.documentElement.clientWidth;
182
+ const originalOverflow = document.body.style.overflow;
183
+ const originalPaddingRight = document.body.style.paddingRight;
184
+ document.body.style.overflow = "hidden";
185
+ if (scrollbarWidth > 0) {
186
+ document.body.style.paddingRight = `${scrollbarWidth}px`;
187
+ const overlay = document.createElement("div");
188
+ overlay.id = "modal-scrollbar-overlay";
189
+ overlay.style.cssText = `
190
+ position: fixed;
191
+ top: 0;
192
+ right: 0;
193
+ width: ${scrollbarWidth}px;
194
+ height: 100vh;
195
+ background-color: rgb(0 0 0 / 0.6);
196
+ z-index: 40;
197
+ pointer-events: none;
198
+ `;
199
+ document.body.appendChild(overlay);
200
+ }
201
+ return () => {
202
+ document.body.style.overflow = originalOverflow;
203
+ document.body.style.paddingRight = originalPaddingRight;
204
+ const overlay = document.getElementById("modal-scrollbar-overlay");
205
+ if (overlay) {
206
+ overlay.remove();
207
+ }
208
+ };
209
+ }, [isOpen]);
210
+ if (!isOpen) return null;
211
+ const sizeClasses = SIZE_CLASSES2[size];
212
+ const baseClasses = "bg-secondary-50 rounded-3xl shadow-hard-shadow-2 border border-border-100 w-full mx-4";
213
+ const dialogResetClasses = "p-0 m-0 border-none outline-none max-h-none static";
214
+ const modalClasses = cn(
215
+ baseClasses,
216
+ sizeClasses,
217
+ dialogResetClasses,
218
+ className
219
+ );
220
+ const normalizeUrl = (href) => /^https?:\/\//i.test(href) ? href : `https://${href}`;
221
+ const handleActionClick = () => {
222
+ if (actionLink) {
223
+ window.open(normalizeUrl(actionLink), "_blank", "noopener,noreferrer");
224
+ }
225
+ };
226
+ if (variant === "activity") {
227
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-xs border-none p-0 m-0 w-full cursor-default", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
228
+ "dialog",
229
+ {
230
+ className: modalClasses,
231
+ "aria-labelledby": titleId,
232
+ "aria-modal": "true",
233
+ open: true,
234
+ children: [
235
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "flex justify-end p-6 pb-0", children: !hideCloseButton && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
236
+ "button",
237
+ {
238
+ onClick: onClose,
239
+ className: "p-1 text-text-500 hover:text-text-700 hover:bg-background-50 rounded-md transition-colors focus:outline-none focus:ring-2 focus:ring-indicator-info focus:ring-offset-2",
240
+ "aria-label": "Fechar modal",
241
+ children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_phosphor_react.X, { size: 18 })
242
+ }
243
+ ) }),
244
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "flex flex-col items-center px-6 pb-6 gap-5", children: [
245
+ image && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "flex justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
246
+ "img",
247
+ {
248
+ src: image,
249
+ alt: imageAlt ?? "",
250
+ className: "w-[122px] h-[122px] object-contain"
251
+ }
252
+ ) }),
253
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
254
+ "h2",
255
+ {
256
+ id: titleId,
257
+ className: "text-lg font-semibold text-text-950 text-center",
258
+ children: title
259
+ }
260
+ ),
261
+ description && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { className: "text-sm font-normal text-text-400 text-center max-w-md leading-[21px]", children: description }),
262
+ actionLink && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "w-full", children: [
263
+ (() => {
264
+ const normalized = normalizeUrl(actionLink);
265
+ const isYT = isYouTubeUrl(normalized);
266
+ if (!isYT) return null;
267
+ const id = getYouTubeVideoId(normalized);
268
+ if (!id) {
269
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
270
+ Button_default,
271
+ {
272
+ variant: "solid",
273
+ action: "primary",
274
+ size: "large",
275
+ className: "w-full",
276
+ onClick: handleActionClick,
277
+ children: actionLabel || "Iniciar Atividade"
278
+ }
279
+ );
280
+ }
281
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
282
+ "iframe",
283
+ {
284
+ src: getYouTubeEmbedUrl(id),
285
+ className: "w-full aspect-video rounded-lg",
286
+ allowFullScreen: true,
287
+ allow: "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",
288
+ title: "V\xEDdeo YouTube"
289
+ }
290
+ );
291
+ })(),
292
+ !isYouTubeUrl(normalizeUrl(actionLink)) && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
293
+ Button_default,
294
+ {
295
+ variant: "solid",
296
+ action: "primary",
297
+ size: "large",
298
+ className: "w-full",
299
+ onClick: handleActionClick,
300
+ children: actionLabel || "Iniciar Atividade"
301
+ }
302
+ )
303
+ ] })
304
+ ] })
305
+ ]
306
+ }
307
+ ) });
308
+ }
309
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-xs border-none p-0 m-0 w-full cursor-default", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
310
+ "dialog",
311
+ {
312
+ className: modalClasses,
313
+ "aria-labelledby": titleId,
314
+ "aria-modal": "true",
315
+ open: true,
316
+ children: [
317
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "flex items-center justify-between px-6 py-6", children: [
318
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("h2", { id: titleId, className: "text-lg font-semibold text-text-950", children: title }),
319
+ !hideCloseButton && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
320
+ "button",
321
+ {
322
+ onClick: onClose,
323
+ className: "p-1 text-text-500 hover:text-text-700 hover:bg-background-50 rounded-md transition-colors focus:outline-none focus:ring-2 focus:ring-indicator-info focus:ring-offset-2",
324
+ "aria-label": "Fechar modal",
325
+ children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_phosphor_react.X, { size: 18 })
326
+ }
327
+ )
328
+ ] }),
329
+ children && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: cn("px-6 pb-6", contentClassName), children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "text-text-500 font-normal text-sm leading-6", children }) }),
330
+ footer && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "flex justify-end gap-3 px-6 pb-6", children: footer })
331
+ ]
332
+ }
333
+ ) });
334
+ };
335
+ var Modal_default = Modal;
336
+
337
+ // src/components/Text/Text.tsx
338
+ var import_jsx_runtime3 = require("react/jsx-runtime");
339
+ var Text = ({
340
+ children,
341
+ size = "md",
342
+ weight = "normal",
343
+ color = "text-text-950",
344
+ as,
345
+ className = "",
346
+ ...props
347
+ }) => {
348
+ let sizeClasses = "";
349
+ let weightClasses = "";
350
+ const sizeClassMap = {
351
+ "2xs": "text-2xs",
352
+ xs: "text-xs",
353
+ sm: "text-sm",
354
+ md: "text-md",
355
+ lg: "text-lg",
356
+ xl: "text-xl",
357
+ "2xl": "text-2xl",
358
+ "3xl": "text-3xl",
359
+ "4xl": "text-4xl",
360
+ "5xl": "text-5xl",
361
+ "6xl": "text-6xl"
362
+ };
363
+ sizeClasses = sizeClassMap[size] ?? sizeClassMap.md;
364
+ const weightClassMap = {
365
+ hairline: "font-hairline",
366
+ light: "font-light",
367
+ normal: "font-normal",
368
+ medium: "font-medium",
369
+ semibold: "font-semibold",
370
+ bold: "font-bold",
371
+ extrabold: "font-extrabold",
372
+ black: "font-black"
373
+ };
374
+ weightClasses = weightClassMap[weight] ?? weightClassMap.normal;
375
+ const baseClasses = "font-primary";
376
+ const Component = as ?? "p";
377
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
378
+ Component,
379
+ {
380
+ className: cn(baseClasses, sizeClasses, weightClasses, color, className),
381
+ ...props,
382
+ children
383
+ }
384
+ );
385
+ };
386
+ var Text_default = Text;
387
+
388
+ // src/components/Divider/Divider.tsx
389
+ var import_jsx_runtime4 = require("react/jsx-runtime");
390
+ var Divider = ({
391
+ orientation = "horizontal",
392
+ className = "",
393
+ ...props
394
+ }) => {
395
+ const baseClasses = "bg-border-200 border-0";
396
+ const orientationClasses = {
397
+ horizontal: "w-full h-px",
398
+ vertical: "h-full w-px"
399
+ };
400
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
401
+ "hr",
402
+ {
403
+ className: cn(baseClasses, orientationClasses[orientation], className),
404
+ "aria-orientation": orientation,
405
+ ...props
406
+ }
407
+ );
408
+ };
409
+ var Divider_default = Divider;
410
+
411
+ // src/components/Table/Table.tsx
412
+ var import_react2 = require("react");
413
+ var import_phosphor_react2 = require("phosphor-react");
414
+
415
+ // src/components/NoSearchResult/NoSearchResult.tsx
416
+ var import_jsx_runtime5 = require("react/jsx-runtime");
417
+ var NoSearchResult = ({ image, title, description }) => {
418
+ const displayTitle = title || "Nenhum resultado encontrado";
419
+ const displayDescription = description || "N\xE3o encontramos nenhum resultado com esse nome. Tente revisar a busca ou usar outra palavra-chave.";
420
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex flex-row justify-center items-center gap-8 w-full max-w-4xl min-h-96", children: [
421
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "w-72 h-72 flex-shrink-0 relative", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
422
+ "img",
423
+ {
424
+ src: image,
425
+ alt: "No search results",
426
+ className: "w-full h-full object-contain"
427
+ }
428
+ ) }),
429
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex flex-col items-start w-full max-w-md", children: [
430
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "flex flex-row justify-between items-end px-6 pt-6 pb-4 w-full rounded-t-xl", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
431
+ Text_default,
432
+ {
433
+ as: "h2",
434
+ className: "text-text-950 font-semibold text-3xl leading-tight w-full flex items-center",
435
+ children: displayTitle
436
+ }
437
+ ) }),
438
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "flex flex-row justify-center items-center px-6 gap-2 w-full", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text_default, { className: "text-text-600 font-normal text-lg leading-relaxed w-full text-justify", children: displayDescription }) })
439
+ ] })
440
+ ] });
441
+ };
442
+ var NoSearchResult_default = NoSearchResult;
443
+
444
+ // src/components/Table/Table.tsx
445
+ var import_jsx_runtime6 = require("react/jsx-runtime");
446
+ var Table = (0, import_react2.forwardRef)(
447
+ ({
448
+ variant = "default",
449
+ className,
450
+ children,
451
+ searchTerm,
452
+ noSearchResultImage,
453
+ noSearchResultTitle = "Nenhum resultado encontrado",
454
+ noSearchResultDescription = "N\xE3o encontramos nenhum resultado com esse nome. Tente revisar a busca ou usar outra palavra-chave.",
455
+ emptyStateMessage = "Nenhum dado dispon\xEDvel no momento.",
456
+ emptyStateButtonText = "Adicionar item",
457
+ onEmptyStateButtonClick,
458
+ ...props
459
+ }, ref) => {
460
+ const isTableBodyEmpty = (0, import_react2.useMemo)(() => {
461
+ let foundBody = false;
462
+ let empty = true;
463
+ import_react2.Children.forEach(children, (child) => {
464
+ if ((0, import_react2.isValidElement)(child) && child.type === TableBody) {
465
+ foundBody = true;
466
+ const bodyProps = child.props;
467
+ if (import_react2.Children.count(bodyProps?.children) > 0) {
468
+ empty = false;
469
+ }
470
+ }
471
+ });
472
+ return foundBody ? empty : false;
473
+ }, [children]);
474
+ const columnCount = (0, import_react2.useMemo)(() => {
475
+ let count = 0;
476
+ import_react2.Children.forEach(children, (child) => {
477
+ if ((0, import_react2.isValidElement)(child) && child.type === TableHeader) {
478
+ const headerProps = child.props;
479
+ import_react2.Children.forEach(headerProps.children, (row) => {
480
+ if ((0, import_react2.isValidElement)(row) && row.type === TableRow) {
481
+ const rowProps = row.props;
482
+ count = import_react2.Children.count(rowProps.children);
483
+ }
484
+ });
485
+ }
486
+ });
487
+ return count || 1;
488
+ }, [children]);
489
+ const hasSearchTerm = searchTerm && searchTerm.trim() !== "";
490
+ const showNoSearchResult = hasSearchTerm && isTableBodyEmpty;
491
+ const showEmptyState = !hasSearchTerm && isTableBodyEmpty;
492
+ if (showNoSearchResult) {
493
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
494
+ "div",
495
+ {
496
+ className: cn(
497
+ "relative w-full overflow-x-auto",
498
+ variant === "default" && "border border-border-200 rounded-xl"
499
+ ),
500
+ children: [
501
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
502
+ "table",
503
+ {
504
+ ref,
505
+ className: cn(
506
+ "analytica-table w-full caption-bottom text-sm border-separate border-spacing-0",
507
+ className
508
+ ),
509
+ ...props,
510
+ children: import_react2.Children.map(children, (child) => {
511
+ if ((0, import_react2.isValidElement)(child) && (child.type === TableCaption || child.type === TableHeader)) {
512
+ return child;
513
+ }
514
+ return null;
515
+ })
516
+ }
517
+ ),
518
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "py-8 flex justify-center", children: noSearchResultImage ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
519
+ NoSearchResult_default,
520
+ {
521
+ image: noSearchResultImage,
522
+ title: noSearchResultTitle,
523
+ description: noSearchResultDescription
524
+ }
525
+ ) : /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "text-center", children: [
526
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "text-text-600 text-lg font-semibold mb-2", children: noSearchResultTitle }),
527
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "text-text-500 text-sm", children: noSearchResultDescription })
528
+ ] }) })
529
+ ]
530
+ }
531
+ );
532
+ }
533
+ const modifiedChildren = import_react2.Children.map(children, (child) => {
534
+ if ((0, import_react2.isValidElement)(child) && child.type === TableBody && showEmptyState) {
535
+ return (0, import_react2.cloneElement)(child, {
536
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(TableRow, { variant, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(TableCell, { colSpan: columnCount, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex flex-col items-center justify-center py-12 gap-4", children: [
537
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "text-text-600 text-base font-normal", children: emptyStateMessage }),
538
+ onEmptyStateButtonClick && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
539
+ Button_default,
540
+ {
541
+ variant: "solid",
542
+ action: "primary",
543
+ size: "medium",
544
+ onClick: onEmptyStateButtonClick,
545
+ children: emptyStateButtonText
546
+ }
547
+ )
548
+ ] }) }) })
549
+ });
550
+ }
551
+ return child;
552
+ });
553
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
554
+ "div",
555
+ {
556
+ className: cn(
557
+ "relative w-full overflow-x-auto",
558
+ variant === "default" && "border border-border-200 rounded-xl"
559
+ ),
560
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
561
+ "table",
562
+ {
563
+ ref,
564
+ className: cn(
565
+ "analytica-table w-full caption-bottom text-sm border-separate border-spacing-0",
566
+ className
567
+ ),
568
+ ...props,
569
+ children: [
570
+ !import_react2.Children.toArray(children).some(
571
+ (child) => (0, import_react2.isValidElement)(child) && child.type === TableCaption
572
+ ) && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("caption", { className: "sr-only", children: "My Table" }),
573
+ modifiedChildren
574
+ ]
575
+ }
576
+ )
577
+ }
578
+ );
579
+ }
580
+ );
581
+ Table.displayName = "Table";
582
+ var TableHeader = (0, import_react2.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
583
+ "thead",
584
+ {
585
+ ref,
586
+ className: cn("[&_tr:first-child]:border-0", className),
587
+ ...props
588
+ }
589
+ ));
590
+ TableHeader.displayName = "TableHeader";
591
+ var TableBody = (0, import_react2.forwardRef)(
592
+ ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
593
+ "tbody",
594
+ {
595
+ ref,
596
+ className: cn("[&_tr:last-child]:border-border-200", className),
597
+ ...props
598
+ }
599
+ )
600
+ );
601
+ TableBody.displayName = "TableBody";
602
+ var TableFooter = (0, import_react2.forwardRef)(
603
+ ({ variant = "default", className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
604
+ "tfoot",
605
+ {
606
+ ref,
607
+ className: cn(
608
+ "bg-background-50 font-medium [&>tr]:last:border-b-0 px-6 py-3.5",
609
+ variant === "default" && "border-t border-border-200",
610
+ className
611
+ ),
612
+ ...props
613
+ }
614
+ )
615
+ );
616
+ TableFooter.displayName = "TableFooter";
617
+ var VARIANT_STATES_ROW = {
618
+ default: {
619
+ default: "border border-border-200",
620
+ borderless: ""
621
+ },
622
+ selected: {
623
+ default: "border-b-2 border-indicator-primary",
624
+ borderless: "bg-indicator-primary/10"
625
+ },
626
+ invalid: {
627
+ default: "border-b-2 border-indicator-error",
628
+ borderless: "bg-indicator-error/10"
629
+ },
630
+ disabled: {
631
+ default: "border-b border-border-100 bg-background-50 opacity-50 cursor-not-allowed",
632
+ borderless: "bg-background-50 opacity-50 cursor-not-allowed"
633
+ }
634
+ };
635
+ var TableRow = (0, import_react2.forwardRef)(
636
+ ({
637
+ variant = "default",
638
+ state = "default",
639
+ clickable = false,
640
+ className,
641
+ ...props
642
+ }, ref) => {
643
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
644
+ "tr",
645
+ {
646
+ ref,
647
+ className: cn(
648
+ "transition-colors",
649
+ state === "disabled" ? "" : "hover:bg-muted/50",
650
+ state === "disabled" || !clickable ? "" : "cursor-pointer",
651
+ VARIANT_STATES_ROW[state][variant],
652
+ className
653
+ ),
654
+ "aria-disabled": state === "disabled",
655
+ ...props
656
+ }
657
+ );
658
+ }
659
+ );
660
+ TableRow.displayName = "TableRow";
661
+ var TableHead = (0, import_react2.forwardRef)(
662
+ ({
663
+ className,
664
+ sortable = true,
665
+ sortDirection = null,
666
+ onSort,
667
+ children,
668
+ ...props
669
+ }, ref) => {
670
+ const handleClick = () => {
671
+ if (sortable && onSort) {
672
+ onSort();
673
+ }
674
+ };
675
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
676
+ "th",
677
+ {
678
+ ref,
679
+ className: cn(
680
+ "h-10 px-6 py-3.5 text-left align-middle font-bold text-base text-text-800 tracking-[0.2px] leading-none [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] whitespace-nowrap",
681
+ sortable && "cursor-pointer select-none hover:bg-muted/30",
682
+ className
683
+ ),
684
+ onClick: handleClick,
685
+ ...props,
686
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex items-center gap-2", children: [
687
+ children,
688
+ sortable && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex flex-col", children: [
689
+ sortDirection === "asc" && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_phosphor_react2.CaretUp, { size: 16, weight: "fill", className: "text-text-800" }),
690
+ sortDirection === "desc" && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_phosphor_react2.CaretDown, { size: 16, weight: "fill", className: "text-text-800" })
691
+ ] })
692
+ ] })
693
+ }
694
+ );
695
+ }
696
+ );
697
+ TableHead.displayName = "TableHead";
698
+ var TableCell = (0, import_react2.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
699
+ "td",
700
+ {
701
+ ref,
702
+ className: cn(
703
+ "p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] text-base font-normal text-text-800 leading-[150%] tracking-normal px-6 py-3.5 whitespace-nowrap",
704
+ className
705
+ ),
706
+ ...props
707
+ }
708
+ ));
709
+ TableCell.displayName = "TableCell";
710
+ var TableCaption = (0, import_react2.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
711
+ "caption",
712
+ {
713
+ ref,
714
+ className: cn(
715
+ "border-t border-border-200 text-sm text-text-800 px-6 py-3.5",
716
+ className
717
+ ),
718
+ ...props
719
+ }
720
+ ));
721
+ TableCaption.displayName = "TableCaption";
722
+ var Table_default = Table;
723
+
724
+ // src/components/Badge/Badge.tsx
725
+ var import_phosphor_react3 = require("phosphor-react");
726
+ var import_jsx_runtime7 = require("react/jsx-runtime");
727
+ var VARIANT_ACTION_CLASSES2 = {
728
+ solid: {
729
+ error: "bg-error-background text-error-700 focus-visible:outline-none",
730
+ warning: "bg-warning text-warning-800 focus-visible:outline-none",
731
+ success: "bg-success text-success-800 focus-visible:outline-none",
732
+ info: "bg-info text-info-800 focus-visible:outline-none",
733
+ muted: "bg-background-muted text-background-800 focus-visible:outline-none"
734
+ },
735
+ outlined: {
736
+ error: "bg-error text-error-700 border border-error-300 focus-visible:outline-none",
737
+ warning: "bg-warning text-warning-800 border border-warning-300 focus-visible:outline-none",
738
+ success: "bg-success text-success-800 border border-success-300 focus-visible:outline-none",
739
+ info: "bg-info text-info-800 border border-info-300 focus-visible:outline-none",
740
+ muted: "bg-background-muted text-background-800 border border-border-300 focus-visible:outline-none"
741
+ },
742
+ exams: {
743
+ exam1: "bg-exam-1 text-info-700 focus-visible:outline-none",
744
+ exam2: "bg-exam-2 text-typography-1 focus-visible:outline-none",
745
+ exam3: "bg-exam-3 text-typography-2 focus-visible:outline-none",
746
+ exam4: "bg-exam-4 text-success-700 focus-visible:outline-none"
747
+ },
748
+ examsOutlined: {
749
+ exam1: "bg-exam-1 text-info-700 border border-info-700 focus-visible:outline-none",
750
+ exam2: "bg-exam-2 text-typography-1 border border-typography-1 focus-visible:outline-none",
751
+ exam3: "bg-exam-3 text-typography-2 border border-typography-2 focus-visible:outline-none",
752
+ exam4: "bg-exam-4 text-success-700 border border-success-700 focus-visible:outline-none"
753
+ },
754
+ resultStatus: {
755
+ negative: "bg-error text-error-800 focus-visible:outline-none",
756
+ positive: "bg-success text-success-800 focus-visible:outline-none"
757
+ },
758
+ notification: "text-primary"
759
+ };
760
+ var SIZE_CLASSES3 = {
761
+ small: "text-2xs px-2 py-1",
762
+ medium: "text-xs px-2 py-1",
763
+ large: "text-sm px-2 py-1"
764
+ };
765
+ var SIZE_CLASSES_ICON = {
766
+ small: "size-3",
767
+ medium: "size-3.5",
768
+ large: "size-4"
769
+ };
770
+ var Badge = ({
771
+ children,
772
+ iconLeft,
773
+ iconRight,
774
+ size = "medium",
775
+ variant = "solid",
776
+ action = "error",
777
+ className = "",
778
+ notificationActive = false,
779
+ ...props
780
+ }) => {
781
+ const sizeClasses = SIZE_CLASSES3[size];
782
+ const sizeClassesIcon = SIZE_CLASSES_ICON[size];
783
+ const variantActionMap = VARIANT_ACTION_CLASSES2[variant] || {};
784
+ const variantClasses = typeof variantActionMap === "string" ? variantActionMap : variantActionMap[action] ?? variantActionMap.muted ?? "";
785
+ const baseClasses = "inline-flex items-center justify-center rounded-xs font-normal gap-1 relative";
786
+ const baseClassesIcon = "flex items-center";
787
+ if (variant === "notification") {
788
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
789
+ "div",
790
+ {
791
+ className: cn(baseClasses, variantClasses, sizeClasses, className),
792
+ ...props,
793
+ children: [
794
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_phosphor_react3.Bell, { size: 24, className: "text-current", "aria-hidden": "true" }),
795
+ notificationActive && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
796
+ "span",
797
+ {
798
+ "data-testid": "notification-dot",
799
+ className: "absolute top-[5px] right-[10px] block h-2 w-2 rounded-full bg-indicator-error ring-2 ring-white"
800
+ }
801
+ )
802
+ ]
803
+ }
804
+ );
805
+ }
806
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
807
+ "div",
808
+ {
809
+ className: cn(baseClasses, variantClasses, sizeClasses, className),
810
+ ...props,
811
+ children: [
812
+ iconLeft && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: cn(baseClassesIcon, sizeClassesIcon), children: iconLeft }),
813
+ children,
814
+ iconRight && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: cn(baseClassesIcon, sizeClassesIcon), children: iconRight })
815
+ ]
816
+ }
817
+ );
818
+ };
819
+ var Badge_default = Badge;
820
+
821
+ // src/components/AlertManagerView/AlertsManagerView.tsx
822
+ var import_phosphor_react4 = require("phosphor-react");
823
+
824
+ // src/assets/img/notification.png
825
+ var notification_default = "../notification-TD7ZFRLL.png";
826
+
827
+ // src/components/AlertManagerView/AlertsManagerView.tsx
828
+ var import_jsx_runtime8 = require("react/jsx-runtime");
829
+ var AlertsManagerView = ({
830
+ alertData,
831
+ isOpen = false,
832
+ onClose,
833
+ currentPage = 1,
834
+ totalPages: externalTotalPages,
835
+ onPageChange,
836
+ itemsPerPage = 10
837
+ }) => {
838
+ const imageUrl = (0, import_react3.useMemo)(() => {
839
+ if (globalThis.window == void 0) {
840
+ return void 0;
841
+ }
842
+ if (alertData.image instanceof File) {
843
+ return globalThis.window.URL.createObjectURL(alertData.image);
844
+ }
845
+ return void 0;
846
+ }, [alertData.image]);
847
+ (0, import_react3.useEffect)(() => {
848
+ return () => {
849
+ if (imageUrl && globalThis.window !== void 0) {
850
+ URL.revokeObjectURL(imageUrl);
851
+ }
852
+ };
853
+ }, [imageUrl]);
854
+ const totalPages = externalTotalPages ?? Math.ceil(alertData.recipients.length / itemsPerPage);
855
+ const effectiveCurrentPage = Math.min(totalPages, Math.max(1, currentPage));
856
+ const startIndex = (effectiveCurrentPage - 1) * itemsPerPage;
857
+ const endIndex = startIndex + itemsPerPage;
858
+ const paginatedRecipients = alertData.recipients.slice(startIndex, endIndex);
859
+ const handleClose = () => {
860
+ onClose?.();
861
+ };
862
+ const formatDate = (dateInput) => {
863
+ const date = dateInput instanceof Date ? dateInput : new Date(dateInput);
864
+ if (Number.isNaN(date.getTime())) return String(dateInput);
865
+ return date.toLocaleDateString("pt-BR", {
866
+ day: "2-digit",
867
+ month: "2-digit",
868
+ year: "numeric"
869
+ });
870
+ };
871
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
872
+ Modal_default,
873
+ {
874
+ isOpen,
875
+ onClose: handleClose,
876
+ title: alertData.title,
877
+ size: "md",
878
+ contentClassName: "p-0",
879
+ children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "flex flex-col h-[calc(100vh-8rem)] max-h-[700px]", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex-1 overflow-y-auto px-6 py-4", children: [
880
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "bg-background-50 px-5 py-6 flex flex-col items-center gap-4 rounded-xl mb-4", children: [
881
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
882
+ "img",
883
+ {
884
+ src: imageUrl || notification_default,
885
+ alt: alertData.title || "Imagem do alerta"
886
+ }
887
+ ),
888
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex flex-col items-center text-center gap-3", children: [
889
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Text_default, { size: "lg", weight: "semibold", children: alertData.title || "Sem T\xEDtulo" }),
890
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Text_default, { size: "sm", weight: "normal", className: "text-text-500", children: alertData.message || "Sem mensagem" })
891
+ ] })
892
+ ] }),
893
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Divider_default, { className: "my-4" }),
894
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex justify-between items-center mb-4 px-2", children: [
895
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Text_default, { size: "sm", weight: "bold", className: "text-text-700", children: "Enviado em" }),
896
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Text_default, { size: "sm", weight: "medium", className: "text-text-900", children: formatDate(alertData.sentAt) })
897
+ ] }),
898
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Divider_default, { className: "my-4" }),
899
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "mb-4", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(Table_default, { variant: "borderless", className: "table-fixed", children: [
900
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(TableHeader, { children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(TableRow, { variant: "borderless", children: [
901
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(TableHead, { className: "py-2 px-3.5 text-start", children: "Destinat\xE1rio" }),
902
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(TableHead, { className: "py-2 px-3.5 w-[120px] text-start", children: "Status" })
903
+ ] }) }),
904
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(TableBody, { variant: "borderless", children: paginatedRecipients.map((recipient) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(TableRow, { children: [
905
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(TableCell, { className: "py-2 px-3.5 flex flex-row gap-2 text-start truncate", children: [
906
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "rounded-full size-6 bg-primary-100 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_phosphor_react4.User, { className: "text-primary-950", size: 18 }) }),
907
+ recipient.name
908
+ ] }),
909
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(TableCell, { className: "py-2 px-3.5 text-center", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "flex justify-center items-center gap-1", children: recipient.status === "viewed" ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Badge_default, { variant: "solid", action: "success", children: "Visualizado" }) : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Badge_default, { variant: "solid", action: "error", children: "Pendente" }) }) })
910
+ ] }, recipient.id)) })
911
+ ] }) }),
912
+ totalPages > 1 && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex justify-end items-center gap-2 bg-background-50 border border-border-200 py-3.5 px-2 rounded-b-2xl", children: [
913
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(Text_default, { size: "sm", className: "text-text-600", children: [
914
+ "P\xE1gina ",
915
+ effectiveCurrentPage,
916
+ " de ",
917
+ totalPages
918
+ ] }),
919
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "flex gap-2", children: onPageChange ? /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
920
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
921
+ Button_default,
922
+ {
923
+ variant: "link",
924
+ size: "extra-small",
925
+ onClick: () => onPageChange(Math.max(1, effectiveCurrentPage - 1)),
926
+ disabled: effectiveCurrentPage === 1,
927
+ iconLeft: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_phosphor_react4.CaretLeft, {}),
928
+ children: "Anterior"
929
+ }
930
+ ),
931
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
932
+ Button_default,
933
+ {
934
+ variant: "link",
935
+ size: "extra-small",
936
+ onClick: () => onPageChange(
937
+ Math.min(totalPages, effectiveCurrentPage + 1)
938
+ ),
939
+ disabled: effectiveCurrentPage === totalPages,
940
+ iconRight: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_phosphor_react4.CaretRight, {}),
941
+ children: "Pr\xF3ximo"
942
+ }
943
+ )
944
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
945
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
946
+ Button_default,
947
+ {
948
+ variant: "link",
949
+ size: "extra-small",
950
+ disabled: effectiveCurrentPage === 1,
951
+ iconLeft: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_phosphor_react4.CaretLeft, {}),
952
+ children: "Anterior"
953
+ }
954
+ ),
955
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
956
+ Button_default,
957
+ {
958
+ variant: "link",
959
+ size: "extra-small",
960
+ disabled: effectiveCurrentPage === totalPages,
961
+ iconRight: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_phosphor_react4.CaretRight, {}),
962
+ children: "Pr\xF3ximo"
963
+ }
964
+ )
965
+ ] }) })
966
+ ] })
967
+ ] }) })
968
+ }
969
+ );
970
+ };
971
+ // Annotate the CommonJS export names for ESM import in node:
972
+ 0 && (module.exports = {
973
+ AlertsManagerView
974
+ });
975
+ //# sourceMappingURL=index.js.map