analytica-frontend-lib 1.2.22 → 1.2.23
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.
- package/dist/AlertManager/index.css +20 -0
- package/dist/AlertManager/index.css.map +1 -1
- package/dist/AlertManagerView/index.js +149 -114
- package/dist/AlertManagerView/index.js.map +1 -1
- package/dist/AlertManagerView/index.mjs +149 -114
- package/dist/AlertManagerView/index.mjs.map +1 -1
- package/dist/EmptyState/index.d.mts +65 -0
- package/dist/EmptyState/index.d.ts +65 -0
- package/dist/EmptyState/index.js +185 -0
- package/dist/EmptyState/index.js.map +1 -0
- package/dist/EmptyState/index.mjs +162 -0
- package/dist/EmptyState/index.mjs.map +1 -0
- package/dist/Table/index.d.mts +1 -1
- package/dist/Table/index.d.ts +1 -1
- package/dist/Table/index.js +124 -89
- package/dist/Table/index.js.map +1 -1
- package/dist/Table/index.mjs +124 -89
- package/dist/Table/index.mjs.map +1 -1
- package/dist/TableProvider/index.css +20 -0
- package/dist/TableProvider/index.css.map +1 -1
- package/dist/TableProvider/index.d.mts +1 -1
- package/dist/TableProvider/index.d.ts +1 -1
- package/dist/TableProvider/index.js +484 -449
- package/dist/TableProvider/index.js.map +1 -1
- package/dist/TableProvider/index.mjs +484 -449
- package/dist/TableProvider/index.mjs.map +1 -1
- package/dist/{TableProvider-DyhwEkPT.d.mts → TableProvider-BnAnv3OV.d.mts} +12 -4
- package/dist/{TableProvider-48a6wb7j.d.ts → TableProvider-GfPlLqzg.d.ts} +12 -4
- package/dist/index.css +20 -0
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +3 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +1041 -1004
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1040 -1004
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +20 -0
- package/dist/styles.css.map +1 -1
- package/package.json +2 -1
|
@@ -187,9 +187,52 @@ var Button = ({
|
|
|
187
187
|
};
|
|
188
188
|
var Button_default = Button;
|
|
189
189
|
|
|
190
|
+
// src/components/EmptyState/EmptyState.tsx
|
|
191
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
192
|
+
var EmptyState = ({
|
|
193
|
+
image,
|
|
194
|
+
title,
|
|
195
|
+
description,
|
|
196
|
+
buttonText,
|
|
197
|
+
buttonIcon,
|
|
198
|
+
onButtonClick,
|
|
199
|
+
buttonVariant = "solid",
|
|
200
|
+
buttonAction = "primary"
|
|
201
|
+
}) => {
|
|
202
|
+
const displayTitle = title || "Nenhum dado dispon\xEDvel";
|
|
203
|
+
const displayDescription = description || "N\xE3o h\xE1 dados para exibir no momento.";
|
|
204
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex flex-col justify-center items-center gap-6 w-full min-h-[705px] bg-background rounded-xl p-6", children: [
|
|
205
|
+
image && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("img", { src: image, alt: displayTitle, className: "w-[170px] h-[150px]" }),
|
|
206
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex flex-col items-center gap-4 w-full max-w-[600px] px-6", children: [
|
|
207
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
208
|
+
Text_default,
|
|
209
|
+
{
|
|
210
|
+
as: "h2",
|
|
211
|
+
className: "text-text-950 font-semibold text-3xl leading-[35px] text-center",
|
|
212
|
+
children: displayTitle
|
|
213
|
+
}
|
|
214
|
+
),
|
|
215
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text_default, { className: "text-text-600 font-normal text-[18px] leading-[27px] text-center", children: displayDescription })
|
|
216
|
+
] }),
|
|
217
|
+
buttonText && onButtonClick && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
218
|
+
Button_default,
|
|
219
|
+
{
|
|
220
|
+
variant: buttonVariant,
|
|
221
|
+
action: buttonAction,
|
|
222
|
+
size: "large",
|
|
223
|
+
onClick: onButtonClick,
|
|
224
|
+
iconLeft: buttonIcon,
|
|
225
|
+
className: "rounded-full px-5 py-2.5",
|
|
226
|
+
children: buttonText
|
|
227
|
+
}
|
|
228
|
+
)
|
|
229
|
+
] });
|
|
230
|
+
};
|
|
231
|
+
var EmptyState_default = EmptyState;
|
|
232
|
+
|
|
190
233
|
// src/components/Skeleton/Skeleton.tsx
|
|
191
234
|
var import_react = require("react");
|
|
192
|
-
var
|
|
235
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
193
236
|
var SKELETON_ANIMATION_CLASSES = {
|
|
194
237
|
pulse: "animate-pulse",
|
|
195
238
|
none: ""
|
|
@@ -226,13 +269,13 @@ var Skeleton = (0, import_react.forwardRef)(
|
|
|
226
269
|
height: typeof height === "number" ? `${height}px` : height
|
|
227
270
|
};
|
|
228
271
|
if (variant === "text" && lines > 1) {
|
|
229
|
-
return /* @__PURE__ */ (0,
|
|
272
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
230
273
|
"div",
|
|
231
274
|
{
|
|
232
275
|
ref,
|
|
233
276
|
className: cn("flex flex-col", spacingClass, className),
|
|
234
277
|
...props,
|
|
235
|
-
children: Array.from({ length: lines }, (_, index) => /* @__PURE__ */ (0,
|
|
278
|
+
children: Array.from({ length: lines }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
236
279
|
"div",
|
|
237
280
|
{
|
|
238
281
|
className: cn(variantClass, animationClass),
|
|
@@ -243,7 +286,7 @@ var Skeleton = (0, import_react.forwardRef)(
|
|
|
243
286
|
}
|
|
244
287
|
);
|
|
245
288
|
}
|
|
246
|
-
return /* @__PURE__ */ (0,
|
|
289
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
247
290
|
"div",
|
|
248
291
|
{
|
|
249
292
|
ref,
|
|
@@ -256,11 +299,11 @@ var Skeleton = (0, import_react.forwardRef)(
|
|
|
256
299
|
}
|
|
257
300
|
);
|
|
258
301
|
var SkeletonText = (0, import_react.forwardRef)(
|
|
259
|
-
(props, ref) => /* @__PURE__ */ (0,
|
|
302
|
+
(props, ref) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Skeleton, { ref, variant: "text", ...props })
|
|
260
303
|
);
|
|
261
|
-
var SkeletonCircle = (0, import_react.forwardRef)((props, ref) => /* @__PURE__ */ (0,
|
|
262
|
-
var SkeletonRectangle = (0, import_react.forwardRef)((props, ref) => /* @__PURE__ */ (0,
|
|
263
|
-
var SkeletonRounded = (0, import_react.forwardRef)((props, ref) => /* @__PURE__ */ (0,
|
|
304
|
+
var SkeletonCircle = (0, import_react.forwardRef)((props, ref) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Skeleton, { ref, variant: "circular", ...props }));
|
|
305
|
+
var SkeletonRectangle = (0, import_react.forwardRef)((props, ref) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Skeleton, { ref, variant: "rectangular", ...props }));
|
|
306
|
+
var SkeletonRounded = (0, import_react.forwardRef)((props, ref) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Skeleton, { ref, variant: "rounded", ...props }));
|
|
264
307
|
var SkeletonCard = (0, import_react.forwardRef)(
|
|
265
308
|
({
|
|
266
309
|
showAvatar = true,
|
|
@@ -271,7 +314,7 @@ var SkeletonCard = (0, import_react.forwardRef)(
|
|
|
271
314
|
className = "",
|
|
272
315
|
...props
|
|
273
316
|
}, ref) => {
|
|
274
|
-
return /* @__PURE__ */ (0,
|
|
317
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
275
318
|
"div",
|
|
276
319
|
{
|
|
277
320
|
ref,
|
|
@@ -281,16 +324,16 @@ var SkeletonCard = (0, import_react.forwardRef)(
|
|
|
281
324
|
),
|
|
282
325
|
...props,
|
|
283
326
|
children: [
|
|
284
|
-
/* @__PURE__ */ (0,
|
|
285
|
-
showAvatar && /* @__PURE__ */ (0,
|
|
286
|
-
/* @__PURE__ */ (0,
|
|
287
|
-
showTitle && /* @__PURE__ */ (0,
|
|
288
|
-
showDescription && /* @__PURE__ */ (0,
|
|
327
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex items-start space-x-3", children: [
|
|
328
|
+
showAvatar && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(SkeletonCircle, { width: 40, height: 40 }),
|
|
329
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex-1 space-y-2", children: [
|
|
330
|
+
showTitle && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(SkeletonText, { width: "60%", height: 20 }),
|
|
331
|
+
showDescription && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(SkeletonText, { lines, spacing: "small" })
|
|
289
332
|
] })
|
|
290
333
|
] }),
|
|
291
|
-
showActions && /* @__PURE__ */ (0,
|
|
292
|
-
/* @__PURE__ */ (0,
|
|
293
|
-
/* @__PURE__ */ (0,
|
|
334
|
+
showActions && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex justify-end space-x-2 mt-4", children: [
|
|
335
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(SkeletonRectangle, { width: 80, height: 32 }),
|
|
336
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(SkeletonRectangle, { width: 80, height: 32 })
|
|
294
337
|
] })
|
|
295
338
|
]
|
|
296
339
|
}
|
|
@@ -307,19 +350,19 @@ var SkeletonList = (0, import_react.forwardRef)(
|
|
|
307
350
|
className = "",
|
|
308
351
|
...props
|
|
309
352
|
}, ref) => {
|
|
310
|
-
return /* @__PURE__ */ (0,
|
|
311
|
-
showAvatar && /* @__PURE__ */ (0,
|
|
312
|
-
/* @__PURE__ */ (0,
|
|
313
|
-
showTitle && /* @__PURE__ */ (0,
|
|
314
|
-
showDescription && /* @__PURE__ */ (0,
|
|
353
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { ref, className: cn("space-y-3", className), ...props, children: Array.from({ length: items }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex items-start space-x-3 p-3", children: [
|
|
354
|
+
showAvatar && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(SkeletonCircle, { width: 32, height: 32 }),
|
|
355
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex-1 space-y-2", children: [
|
|
356
|
+
showTitle && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(SkeletonText, { width: "40%", height: 16 }),
|
|
357
|
+
showDescription && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(SkeletonText, { lines, spacing: "small" })
|
|
315
358
|
] })
|
|
316
359
|
] }, index)) });
|
|
317
360
|
}
|
|
318
361
|
);
|
|
319
362
|
var SkeletonTable = (0, import_react.forwardRef)(
|
|
320
363
|
({ rows = 5, columns = 4, showHeader = true, className = "", ...props }, ref) => {
|
|
321
|
-
return /* @__PURE__ */ (0,
|
|
322
|
-
showHeader && /* @__PURE__ */ (0,
|
|
364
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { ref, className: cn("w-full", className), ...props, children: [
|
|
365
|
+
showHeader && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "flex space-x-2 mb-3", children: Array.from({ length: columns }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
323
366
|
SkeletonText,
|
|
324
367
|
{
|
|
325
368
|
width: `${100 / columns}%`,
|
|
@@ -327,7 +370,7 @@ var SkeletonTable = (0, import_react.forwardRef)(
|
|
|
327
370
|
},
|
|
328
371
|
index
|
|
329
372
|
)) }),
|
|
330
|
-
/* @__PURE__ */ (0,
|
|
373
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "space-y-2", children: Array.from({ length: rows }, (_, rowIndex) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "flex space-x-2", children: Array.from({ length: columns }, (_2, colIndex) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
331
374
|
SkeletonText,
|
|
332
375
|
{
|
|
333
376
|
width: `${100 / columns}%`,
|
|
@@ -341,7 +384,7 @@ var SkeletonTable = (0, import_react.forwardRef)(
|
|
|
341
384
|
|
|
342
385
|
// src/components/Table/TablePagination.tsx
|
|
343
386
|
var import_phosphor_react = require("phosphor-react");
|
|
344
|
-
var
|
|
387
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
345
388
|
var TablePagination = ({
|
|
346
389
|
totalItems,
|
|
347
390
|
currentPage,
|
|
@@ -372,7 +415,7 @@ var TablePagination = ({
|
|
|
372
415
|
};
|
|
373
416
|
const isFirstPage = currentPage === 1;
|
|
374
417
|
const isLastPage = currentPage === totalPages;
|
|
375
|
-
return /* @__PURE__ */ (0,
|
|
418
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
376
419
|
"div",
|
|
377
420
|
{
|
|
378
421
|
className: cn(
|
|
@@ -382,29 +425,29 @@ var TablePagination = ({
|
|
|
382
425
|
),
|
|
383
426
|
...props,
|
|
384
427
|
children: [
|
|
385
|
-
/* @__PURE__ */ (0,
|
|
428
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { className: "font-normal text-xs leading-[14px] text-text-800", children: [
|
|
386
429
|
startItem,
|
|
387
430
|
" de ",
|
|
388
431
|
totalItems,
|
|
389
432
|
" ",
|
|
390
433
|
itemLabel
|
|
391
434
|
] }),
|
|
392
|
-
/* @__PURE__ */ (0,
|
|
393
|
-
onItemsPerPageChange && /* @__PURE__ */ (0,
|
|
394
|
-
/* @__PURE__ */ (0,
|
|
435
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex flex-wrap sm:flex-nowrap items-center gap-2 sm:gap-4 justify-center sm:justify-start", children: [
|
|
436
|
+
onItemsPerPageChange && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "relative", children: [
|
|
437
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
395
438
|
"select",
|
|
396
439
|
{
|
|
397
440
|
value: itemsPerPage,
|
|
398
441
|
onChange: handleItemsPerPageChange,
|
|
399
442
|
className: "w-24 h-9 py-0 px-3 pr-8 bg-background border border-border-300 rounded appearance-none cursor-pointer font-normal text-sm leading-[21px] text-text-900",
|
|
400
443
|
"aria-label": "Items por p\xE1gina",
|
|
401
|
-
children: itemsPerPageOptions.map((option) => /* @__PURE__ */ (0,
|
|
444
|
+
children: itemsPerPageOptions.map((option) => /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("option", { value: option, children: [
|
|
402
445
|
option,
|
|
403
446
|
" itens"
|
|
404
447
|
] }, option))
|
|
405
448
|
}
|
|
406
449
|
),
|
|
407
|
-
/* @__PURE__ */ (0,
|
|
450
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
408
451
|
import_phosphor_react.CaretDown,
|
|
409
452
|
{
|
|
410
453
|
size: 14,
|
|
@@ -413,13 +456,13 @@ var TablePagination = ({
|
|
|
413
456
|
}
|
|
414
457
|
)
|
|
415
458
|
] }),
|
|
416
|
-
/* @__PURE__ */ (0,
|
|
459
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { className: "font-normal text-xs leading-[14px] text-text-950", children: [
|
|
417
460
|
"P\xE1gina ",
|
|
418
461
|
currentPage,
|
|
419
462
|
" de ",
|
|
420
463
|
totalPages
|
|
421
464
|
] }),
|
|
422
|
-
/* @__PURE__ */ (0,
|
|
465
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
423
466
|
"button",
|
|
424
467
|
{
|
|
425
468
|
onClick: handlePrevious,
|
|
@@ -430,12 +473,12 @@ var TablePagination = ({
|
|
|
430
473
|
),
|
|
431
474
|
"aria-label": "P\xE1gina anterior",
|
|
432
475
|
children: [
|
|
433
|
-
/* @__PURE__ */ (0,
|
|
434
|
-
/* @__PURE__ */ (0,
|
|
476
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_phosphor_react.CaretLeft, { size: 12, weight: "bold", className: "text-primary-950" }),
|
|
477
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "font-medium text-xs leading-[14px] text-primary-950", children: "Anterior" })
|
|
435
478
|
]
|
|
436
479
|
}
|
|
437
480
|
),
|
|
438
|
-
/* @__PURE__ */ (0,
|
|
481
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
439
482
|
"button",
|
|
440
483
|
{
|
|
441
484
|
onClick: handleNext,
|
|
@@ -446,8 +489,8 @@ var TablePagination = ({
|
|
|
446
489
|
),
|
|
447
490
|
"aria-label": "Pr\xF3xima p\xE1gina",
|
|
448
491
|
children: [
|
|
449
|
-
/* @__PURE__ */ (0,
|
|
450
|
-
/* @__PURE__ */ (0,
|
|
492
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "font-medium text-xs leading-[14px] text-primary-950", children: "Pr\xF3xima" }),
|
|
493
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_phosphor_react.CaretRight, { size: 12, weight: "bold", className: "text-primary-950" })
|
|
451
494
|
]
|
|
452
495
|
}
|
|
453
496
|
)
|
|
@@ -460,7 +503,7 @@ TablePagination.displayName = "TablePagination";
|
|
|
460
503
|
var TablePagination_default = TablePagination;
|
|
461
504
|
|
|
462
505
|
// src/components/Table/Table.tsx
|
|
463
|
-
var
|
|
506
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
464
507
|
function useTableSort(data, options = {}) {
|
|
465
508
|
const { syncWithUrl = false } = options;
|
|
466
509
|
const getInitialState = () => {
|
|
@@ -543,7 +586,7 @@ var getNoSearchResultContent = (config, defaultTitle, defaultDescription) => {
|
|
|
543
586
|
return config.component;
|
|
544
587
|
}
|
|
545
588
|
if (config.image) {
|
|
546
|
-
return /* @__PURE__ */ (0,
|
|
589
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
547
590
|
NoSearchResult_default,
|
|
548
591
|
{
|
|
549
592
|
image: config.image,
|
|
@@ -552,39 +595,31 @@ var getNoSearchResultContent = (config, defaultTitle, defaultDescription) => {
|
|
|
552
595
|
}
|
|
553
596
|
);
|
|
554
597
|
}
|
|
555
|
-
return /* @__PURE__ */ (0,
|
|
556
|
-
/* @__PURE__ */ (0,
|
|
557
|
-
/* @__PURE__ */ (0,
|
|
598
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "text-center", children: [
|
|
599
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { className: "text-text-600 text-lg font-semibold mb-2", children: config.title || defaultTitle }),
|
|
600
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { className: "text-text-500 text-sm", children: config.description || defaultDescription })
|
|
558
601
|
] });
|
|
559
602
|
};
|
|
560
|
-
var getEmptyStateContent = (config,
|
|
603
|
+
var getEmptyStateContent = (config, defaultTitle, defaultDescription) => {
|
|
561
604
|
if (config?.component) {
|
|
562
605
|
return config.component;
|
|
563
606
|
}
|
|
564
|
-
return /* @__PURE__ */ (0,
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
variant: "solid",
|
|
578
|
-
action: "primary",
|
|
579
|
-
size: "medium",
|
|
580
|
-
onClick: config?.onButtonClick || onButtonClick,
|
|
581
|
-
children: config?.buttonText || defaultButtonText
|
|
582
|
-
}
|
|
583
|
-
)
|
|
584
|
-
] });
|
|
607
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
608
|
+
EmptyState_default,
|
|
609
|
+
{
|
|
610
|
+
image: config?.image,
|
|
611
|
+
title: config?.title || defaultTitle,
|
|
612
|
+
description: config?.description || defaultDescription,
|
|
613
|
+
buttonText: config?.buttonText,
|
|
614
|
+
buttonIcon: config?.buttonIcon,
|
|
615
|
+
onButtonClick: config?.onButtonClick,
|
|
616
|
+
buttonVariant: config?.buttonVariant,
|
|
617
|
+
buttonAction: config?.buttonAction
|
|
618
|
+
}
|
|
619
|
+
);
|
|
585
620
|
};
|
|
586
621
|
var renderTableWrapper = (variant, tableRef, className, children, stateContent, tableProps) => {
|
|
587
|
-
return /* @__PURE__ */ (0,
|
|
622
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
588
623
|
"div",
|
|
589
624
|
{
|
|
590
625
|
className: cn(
|
|
@@ -592,7 +627,7 @@ var renderTableWrapper = (variant, tableRef, className, children, stateContent,
|
|
|
592
627
|
variant === "default" && "border border-border-200 rounded-xl"
|
|
593
628
|
),
|
|
594
629
|
children: [
|
|
595
|
-
/* @__PURE__ */ (0,
|
|
630
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
596
631
|
"table",
|
|
597
632
|
{
|
|
598
633
|
ref: tableRef,
|
|
@@ -604,7 +639,7 @@ var renderTableWrapper = (variant, tableRef, className, children, stateContent,
|
|
|
604
639
|
children: renderHeaderElements(children)
|
|
605
640
|
}
|
|
606
641
|
),
|
|
607
|
-
/* @__PURE__ */ (0,
|
|
642
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "py-8 flex justify-center", children: stateContent })
|
|
608
643
|
]
|
|
609
644
|
}
|
|
610
645
|
);
|
|
@@ -627,13 +662,13 @@ var Table = (0, import_react2.forwardRef)(
|
|
|
627
662
|
description: "N\xE3o encontramos nenhum resultado com esse nome. Tente revisar a busca ou usar outra palavra-chave."
|
|
628
663
|
};
|
|
629
664
|
const defaultEmptyState = {
|
|
630
|
-
|
|
631
|
-
|
|
665
|
+
title: "Nenhum dado dispon\xEDvel",
|
|
666
|
+
description: "N\xE3o h\xE1 dados para exibir no momento."
|
|
632
667
|
};
|
|
633
668
|
const finalNoSearchResultState = noSearchResultState || defaultNoSearchResultState;
|
|
634
669
|
const finalEmptyState = emptyState || defaultEmptyState;
|
|
635
670
|
if (showLoading) {
|
|
636
|
-
const loadingContent = loadingState?.component || /* @__PURE__ */ (0,
|
|
671
|
+
const loadingContent = loadingState?.component || /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonTable, { rows: 5, columns: 4, showHeader: false });
|
|
637
672
|
return renderTableWrapper(
|
|
638
673
|
variant,
|
|
639
674
|
ref,
|
|
@@ -661,8 +696,8 @@ var Table = (0, import_react2.forwardRef)(
|
|
|
661
696
|
if (showEmpty) {
|
|
662
697
|
const emptyContent = getEmptyStateContent(
|
|
663
698
|
finalEmptyState,
|
|
664
|
-
defaultEmptyState.
|
|
665
|
-
defaultEmptyState.
|
|
699
|
+
defaultEmptyState.title || "Nenhum dado dispon\xEDvel",
|
|
700
|
+
defaultEmptyState.description || "N\xE3o h\xE1 dados para exibir no momento."
|
|
666
701
|
);
|
|
667
702
|
return renderTableWrapper(
|
|
668
703
|
variant,
|
|
@@ -673,14 +708,14 @@ var Table = (0, import_react2.forwardRef)(
|
|
|
673
708
|
props
|
|
674
709
|
);
|
|
675
710
|
}
|
|
676
|
-
return /* @__PURE__ */ (0,
|
|
711
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
677
712
|
"div",
|
|
678
713
|
{
|
|
679
714
|
className: cn(
|
|
680
715
|
"relative w-full overflow-x-auto",
|
|
681
716
|
variant === "default" && "border border-border-200 rounded-xl"
|
|
682
717
|
),
|
|
683
|
-
children: /* @__PURE__ */ (0,
|
|
718
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
684
719
|
"table",
|
|
685
720
|
{
|
|
686
721
|
ref,
|
|
@@ -694,7 +729,7 @@ var Table = (0, import_react2.forwardRef)(
|
|
|
694
729
|
children: [
|
|
695
730
|
!import_react2.Children.toArray(children).some(
|
|
696
731
|
(child) => (0, import_react2.isValidElement)(child) && child.type === TableCaption
|
|
697
|
-
) && /* @__PURE__ */ (0,
|
|
732
|
+
) && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("caption", { className: "sr-only", children: "My Table" }),
|
|
698
733
|
children
|
|
699
734
|
]
|
|
700
735
|
}
|
|
@@ -704,7 +739,7 @@ var Table = (0, import_react2.forwardRef)(
|
|
|
704
739
|
}
|
|
705
740
|
);
|
|
706
741
|
Table.displayName = "Table";
|
|
707
|
-
var TableHeader = (0, import_react2.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
742
|
+
var TableHeader = (0, import_react2.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
708
743
|
"thead",
|
|
709
744
|
{
|
|
710
745
|
ref,
|
|
@@ -714,7 +749,7 @@ var TableHeader = (0, import_react2.forwardRef)(({ className, ...props }, ref) =
|
|
|
714
749
|
));
|
|
715
750
|
TableHeader.displayName = "TableHeader";
|
|
716
751
|
var TableBody = (0, import_react2.forwardRef)(
|
|
717
|
-
({ className, variant = "default", ...props }, ref) => /* @__PURE__ */ (0,
|
|
752
|
+
({ className, variant = "default", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
718
753
|
"tbody",
|
|
719
754
|
{
|
|
720
755
|
ref,
|
|
@@ -729,7 +764,7 @@ var TableBody = (0, import_react2.forwardRef)(
|
|
|
729
764
|
);
|
|
730
765
|
TableBody.displayName = "TableBody";
|
|
731
766
|
var TableFooter = (0, import_react2.forwardRef)(
|
|
732
|
-
({ variant = "default", className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
767
|
+
({ variant = "default", className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
733
768
|
"tfoot",
|
|
734
769
|
{
|
|
735
770
|
ref,
|
|
@@ -773,7 +808,7 @@ var TableRow = (0, import_react2.forwardRef)(
|
|
|
773
808
|
className,
|
|
774
809
|
...props
|
|
775
810
|
}, ref) => {
|
|
776
|
-
return /* @__PURE__ */ (0,
|
|
811
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
777
812
|
"tr",
|
|
778
813
|
{
|
|
779
814
|
ref,
|
|
@@ -805,7 +840,7 @@ var TableHead = (0, import_react2.forwardRef)(
|
|
|
805
840
|
onSort();
|
|
806
841
|
}
|
|
807
842
|
};
|
|
808
|
-
return /* @__PURE__ */ (0,
|
|
843
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
809
844
|
"th",
|
|
810
845
|
{
|
|
811
846
|
ref,
|
|
@@ -816,11 +851,11 @@ var TableHead = (0, import_react2.forwardRef)(
|
|
|
816
851
|
),
|
|
817
852
|
onClick: handleClick,
|
|
818
853
|
...props,
|
|
819
|
-
children: /* @__PURE__ */ (0,
|
|
854
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
820
855
|
children,
|
|
821
|
-
sortable && /* @__PURE__ */ (0,
|
|
822
|
-
sortDirection === "asc" && /* @__PURE__ */ (0,
|
|
823
|
-
sortDirection === "desc" && /* @__PURE__ */ (0,
|
|
856
|
+
sortable && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex flex-col", children: [
|
|
857
|
+
sortDirection === "asc" && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_phosphor_react2.CaretUp, { size: 16, weight: "fill", className: "text-text-800" }),
|
|
858
|
+
sortDirection === "desc" && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_phosphor_react2.CaretDown, { size: 16, weight: "fill", className: "text-text-800" })
|
|
824
859
|
] })
|
|
825
860
|
] })
|
|
826
861
|
}
|
|
@@ -828,7 +863,7 @@ var TableHead = (0, import_react2.forwardRef)(
|
|
|
828
863
|
}
|
|
829
864
|
);
|
|
830
865
|
TableHead.displayName = "TableHead";
|
|
831
|
-
var TableCell = (0, import_react2.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
866
|
+
var TableCell = (0, import_react2.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
832
867
|
"td",
|
|
833
868
|
{
|
|
834
869
|
ref,
|
|
@@ -840,7 +875,7 @@ var TableCell = (0, import_react2.forwardRef)(({ className, ...props }, ref) =>
|
|
|
840
875
|
}
|
|
841
876
|
));
|
|
842
877
|
TableCell.displayName = "TableCell";
|
|
843
|
-
var TableCaption = (0, import_react2.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
878
|
+
var TableCaption = (0, import_react2.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
844
879
|
"caption",
|
|
845
880
|
{
|
|
846
881
|
ref,
|
|
@@ -1008,7 +1043,7 @@ var getYouTubeEmbedUrl = (videoId) => {
|
|
|
1008
1043
|
};
|
|
1009
1044
|
|
|
1010
1045
|
// src/components/Modal/Modal.tsx
|
|
1011
|
-
var
|
|
1046
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
1012
1047
|
var SIZE_CLASSES2 = {
|
|
1013
1048
|
xs: "max-w-[360px]",
|
|
1014
1049
|
sm: "max-w-[420px]",
|
|
@@ -1093,7 +1128,7 @@ var Modal = ({
|
|
|
1093
1128
|
}
|
|
1094
1129
|
};
|
|
1095
1130
|
if (variant === "activity") {
|
|
1096
|
-
return /* @__PURE__ */ (0,
|
|
1131
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.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_runtime8.jsxs)(
|
|
1097
1132
|
"dialog",
|
|
1098
1133
|
{
|
|
1099
1134
|
className: modalClasses,
|
|
@@ -1101,17 +1136,17 @@ var Modal = ({
|
|
|
1101
1136
|
"aria-modal": "true",
|
|
1102
1137
|
open: true,
|
|
1103
1138
|
children: [
|
|
1104
|
-
/* @__PURE__ */ (0,
|
|
1139
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "flex justify-end p-6 pb-0", children: !hideCloseButton && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1105
1140
|
"button",
|
|
1106
1141
|
{
|
|
1107
1142
|
onClick: onClose,
|
|
1108
1143
|
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",
|
|
1109
1144
|
"aria-label": "Fechar modal",
|
|
1110
|
-
children: /* @__PURE__ */ (0,
|
|
1145
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_phosphor_react3.X, { size: 18 })
|
|
1111
1146
|
}
|
|
1112
1147
|
) }),
|
|
1113
|
-
/* @__PURE__ */ (0,
|
|
1114
|
-
image && /* @__PURE__ */ (0,
|
|
1148
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex flex-col items-center px-6 pb-6 gap-5", children: [
|
|
1149
|
+
image && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "flex justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1115
1150
|
"img",
|
|
1116
1151
|
{
|
|
1117
1152
|
src: image,
|
|
@@ -1119,7 +1154,7 @@ var Modal = ({
|
|
|
1119
1154
|
className: "w-[122px] h-[122px] object-contain"
|
|
1120
1155
|
}
|
|
1121
1156
|
) }),
|
|
1122
|
-
/* @__PURE__ */ (0,
|
|
1157
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1123
1158
|
"h2",
|
|
1124
1159
|
{
|
|
1125
1160
|
id: titleId,
|
|
@@ -1127,15 +1162,15 @@ var Modal = ({
|
|
|
1127
1162
|
children: title
|
|
1128
1163
|
}
|
|
1129
1164
|
),
|
|
1130
|
-
description && /* @__PURE__ */ (0,
|
|
1131
|
-
actionLink && /* @__PURE__ */ (0,
|
|
1165
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "text-sm font-normal text-text-400 text-center max-w-md leading-[21px]", children: description }),
|
|
1166
|
+
actionLink && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "w-full", children: [
|
|
1132
1167
|
(() => {
|
|
1133
1168
|
const normalized = normalizeUrl(actionLink);
|
|
1134
1169
|
const isYT = isYouTubeUrl(normalized);
|
|
1135
1170
|
if (!isYT) return null;
|
|
1136
1171
|
const id = getYouTubeVideoId(normalized);
|
|
1137
1172
|
if (!id) {
|
|
1138
|
-
return /* @__PURE__ */ (0,
|
|
1173
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1139
1174
|
Button_default,
|
|
1140
1175
|
{
|
|
1141
1176
|
variant: "solid",
|
|
@@ -1147,7 +1182,7 @@ var Modal = ({
|
|
|
1147
1182
|
}
|
|
1148
1183
|
);
|
|
1149
1184
|
}
|
|
1150
|
-
return /* @__PURE__ */ (0,
|
|
1185
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1151
1186
|
"iframe",
|
|
1152
1187
|
{
|
|
1153
1188
|
src: getYouTubeEmbedUrl(id),
|
|
@@ -1158,7 +1193,7 @@ var Modal = ({
|
|
|
1158
1193
|
}
|
|
1159
1194
|
);
|
|
1160
1195
|
})(),
|
|
1161
|
-
!isYouTubeUrl(normalizeUrl(actionLink)) && /* @__PURE__ */ (0,
|
|
1196
|
+
!isYouTubeUrl(normalizeUrl(actionLink)) && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1162
1197
|
Button_default,
|
|
1163
1198
|
{
|
|
1164
1199
|
variant: "solid",
|
|
@@ -1175,7 +1210,7 @@ var Modal = ({
|
|
|
1175
1210
|
}
|
|
1176
1211
|
) });
|
|
1177
1212
|
}
|
|
1178
|
-
return /* @__PURE__ */ (0,
|
|
1213
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.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_runtime8.jsxs)(
|
|
1179
1214
|
"dialog",
|
|
1180
1215
|
{
|
|
1181
1216
|
className: modalClasses,
|
|
@@ -1183,20 +1218,20 @@ var Modal = ({
|
|
|
1183
1218
|
"aria-modal": "true",
|
|
1184
1219
|
open: true,
|
|
1185
1220
|
children: [
|
|
1186
|
-
/* @__PURE__ */ (0,
|
|
1187
|
-
/* @__PURE__ */ (0,
|
|
1188
|
-
!hideCloseButton && /* @__PURE__ */ (0,
|
|
1221
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex items-center justify-between px-6 py-6", children: [
|
|
1222
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("h2", { id: titleId, className: "text-lg font-semibold text-text-950", children: title }),
|
|
1223
|
+
!hideCloseButton && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1189
1224
|
"button",
|
|
1190
1225
|
{
|
|
1191
1226
|
onClick: onClose,
|
|
1192
1227
|
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",
|
|
1193
1228
|
"aria-label": "Fechar modal",
|
|
1194
|
-
children: /* @__PURE__ */ (0,
|
|
1229
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_phosphor_react3.X, { size: 18 })
|
|
1195
1230
|
}
|
|
1196
1231
|
)
|
|
1197
1232
|
] }),
|
|
1198
|
-
children && /* @__PURE__ */ (0,
|
|
1199
|
-
footer && /* @__PURE__ */ (0,
|
|
1233
|
+
children && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: cn("px-6 pb-6", contentClassName), children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "text-text-500 font-normal text-sm leading-6", children }) }),
|
|
1234
|
+
footer && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "flex justify-end gap-3 px-6 pb-6", children: footer })
|
|
1200
1235
|
]
|
|
1201
1236
|
}
|
|
1202
1237
|
) });
|
|
@@ -1209,7 +1244,7 @@ var import_react7 = require("react");
|
|
|
1209
1244
|
|
|
1210
1245
|
// src/components/SelectionButton/SelectionButton.tsx
|
|
1211
1246
|
var import_react5 = require("react");
|
|
1212
|
-
var
|
|
1247
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
1213
1248
|
var SelectionButton = (0, import_react5.forwardRef)(
|
|
1214
1249
|
({ icon, label, selected = false, className = "", disabled, ...props }, ref) => {
|
|
1215
1250
|
const baseClasses = [
|
|
@@ -1242,7 +1277,7 @@ var SelectionButton = (0, import_react5.forwardRef)(
|
|
|
1242
1277
|
];
|
|
1243
1278
|
const stateClasses = selected ? ["ring-primary-950", "ring-2", "ring-offset-0", "shadow-none"] : [];
|
|
1244
1279
|
const allClasses = [...baseClasses, ...stateClasses].join(" ");
|
|
1245
|
-
return /* @__PURE__ */ (0,
|
|
1280
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
1246
1281
|
"button",
|
|
1247
1282
|
{
|
|
1248
1283
|
ref,
|
|
@@ -1252,8 +1287,8 @@ var SelectionButton = (0, import_react5.forwardRef)(
|
|
|
1252
1287
|
"aria-pressed": selected,
|
|
1253
1288
|
...props,
|
|
1254
1289
|
children: [
|
|
1255
|
-
/* @__PURE__ */ (0,
|
|
1256
|
-
/* @__PURE__ */ (0,
|
|
1290
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "flex items-center justify-center w-6 h-6", children: icon }),
|
|
1291
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { children: label })
|
|
1257
1292
|
]
|
|
1258
1293
|
}
|
|
1259
1294
|
);
|
|
@@ -1384,7 +1419,7 @@ var useTheme = () => {
|
|
|
1384
1419
|
};
|
|
1385
1420
|
|
|
1386
1421
|
// src/components/ThemeToggle/ThemeToggle.tsx
|
|
1387
|
-
var
|
|
1422
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
1388
1423
|
var ThemeToggle = ({
|
|
1389
1424
|
variant = "default",
|
|
1390
1425
|
onToggle
|
|
@@ -1398,17 +1433,17 @@ var ThemeToggle = ({
|
|
|
1398
1433
|
{
|
|
1399
1434
|
id: "light",
|
|
1400
1435
|
title: "Claro",
|
|
1401
|
-
icon: /* @__PURE__ */ (0,
|
|
1436
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_phosphor_react4.Sun, { size: 24 })
|
|
1402
1437
|
},
|
|
1403
1438
|
{
|
|
1404
1439
|
id: "dark",
|
|
1405
1440
|
title: "Escuro",
|
|
1406
|
-
icon: /* @__PURE__ */ (0,
|
|
1441
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_phosphor_react4.Moon, { size: 24 })
|
|
1407
1442
|
},
|
|
1408
1443
|
{
|
|
1409
1444
|
id: "system",
|
|
1410
1445
|
title: "Sistema",
|
|
1411
|
-
icon: /* @__PURE__ */ (0,
|
|
1446
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
1412
1447
|
"svg",
|
|
1413
1448
|
{
|
|
1414
1449
|
width: "25",
|
|
@@ -1416,7 +1451,7 @@ var ThemeToggle = ({
|
|
|
1416
1451
|
viewBox: "0 0 25 25",
|
|
1417
1452
|
fill: "none",
|
|
1418
1453
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1419
|
-
children: /* @__PURE__ */ (0,
|
|
1454
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
1420
1455
|
"path",
|
|
1421
1456
|
{
|
|
1422
1457
|
d: "M12.5 2.75C15.085 2.75276 17.5637 3.78054 19.3916 5.6084C21.2195 7.43628 22.2473 9.915 22.25 12.5C22.25 14.4284 21.6778 16.3136 20.6064 17.917C19.5352 19.5201 18.0128 20.7699 16.2314 21.5078C14.4499 22.2458 12.489 22.4387 10.5977 22.0625C8.70642 21.6863 6.96899 20.758 5.60547 19.3945C4.24197 18.031 3.31374 16.2936 2.9375 14.4023C2.56129 12.511 2.75423 10.5501 3.49219 8.76855C4.23012 6.98718 5.47982 5.46483 7.08301 4.39355C8.68639 3.32221 10.5716 2.75 12.5 2.75ZM11.75 4.28516C9.70145 4.47452 7.7973 5.42115 6.41016 6.94043C5.02299 8.4599 4.25247 10.4426 4.25 12.5C4.25247 14.5574 5.02299 16.5401 6.41016 18.0596C7.7973 19.5789 9.70145 20.5255 11.75 20.7148V4.28516Z",
|
|
@@ -1438,7 +1473,7 @@ var ThemeToggle = ({
|
|
|
1438
1473
|
}
|
|
1439
1474
|
};
|
|
1440
1475
|
const currentTheme = variant === "with-save" ? tempTheme : themeMode;
|
|
1441
|
-
return /* @__PURE__ */ (0,
|
|
1476
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "flex flex-row gap-2 sm:gap-4 py-2", children: problemTypes.map((type) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
1442
1477
|
SelectionButton_default,
|
|
1443
1478
|
{
|
|
1444
1479
|
icon: type.icon,
|
|
@@ -1452,7 +1487,7 @@ var ThemeToggle = ({
|
|
|
1452
1487
|
};
|
|
1453
1488
|
|
|
1454
1489
|
// src/components/DropdownMenu/DropdownMenu.tsx
|
|
1455
|
-
var
|
|
1490
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
1456
1491
|
function createDropdownStore() {
|
|
1457
1492
|
return (0, import_zustand2.create)((set) => ({
|
|
1458
1493
|
open: false,
|
|
@@ -1560,7 +1595,7 @@ var DropdownMenu = ({
|
|
|
1560
1595
|
setOpen(propOpen);
|
|
1561
1596
|
}
|
|
1562
1597
|
}, [propOpen]);
|
|
1563
|
-
return /* @__PURE__ */ (0,
|
|
1598
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "relative", ref: menuRef, children: injectStore(children, store) });
|
|
1564
1599
|
};
|
|
1565
1600
|
var DropdownMenuTrigger = ({
|
|
1566
1601
|
className,
|
|
@@ -1572,7 +1607,7 @@ var DropdownMenuTrigger = ({
|
|
|
1572
1607
|
const store = useDropdownStore(externalStore);
|
|
1573
1608
|
const open = (0, import_zustand2.useStore)(store, (s) => s.open);
|
|
1574
1609
|
const toggleOpen = () => store.setState({ open: !open });
|
|
1575
|
-
return /* @__PURE__ */ (0,
|
|
1610
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1576
1611
|
"div",
|
|
1577
1612
|
{
|
|
1578
1613
|
onClick: (e) => {
|
|
@@ -1617,7 +1652,7 @@ var MENUCONTENT_VARIANT_CLASSES = {
|
|
|
1617
1652
|
profile: "p-6"
|
|
1618
1653
|
};
|
|
1619
1654
|
var MenuLabel = (0, import_react8.forwardRef)(({ className, inset, store: _store, ...props }, ref) => {
|
|
1620
|
-
return /* @__PURE__ */ (0,
|
|
1655
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1621
1656
|
"div",
|
|
1622
1657
|
{
|
|
1623
1658
|
ref,
|
|
@@ -1656,7 +1691,7 @@ var DropdownMenuContent = (0, import_react8.forwardRef)(
|
|
|
1656
1691
|
return `absolute ${vertical} ${horizontal}`;
|
|
1657
1692
|
};
|
|
1658
1693
|
const variantClasses = MENUCONTENT_VARIANT_CLASSES[variant];
|
|
1659
|
-
return /* @__PURE__ */ (0,
|
|
1694
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1660
1695
|
"div",
|
|
1661
1696
|
{
|
|
1662
1697
|
ref,
|
|
@@ -1725,7 +1760,7 @@ var DropdownMenuItem = (0, import_react8.forwardRef)(
|
|
|
1725
1760
|
const getVariantProps = () => {
|
|
1726
1761
|
return variant === "profile" ? { "data-variant": "profile" } : {};
|
|
1727
1762
|
};
|
|
1728
|
-
return /* @__PURE__ */ (0,
|
|
1763
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
1729
1764
|
"div",
|
|
1730
1765
|
{
|
|
1731
1766
|
ref,
|
|
@@ -1751,7 +1786,7 @@ var DropdownMenuItem = (0, import_react8.forwardRef)(
|
|
|
1751
1786
|
...props,
|
|
1752
1787
|
children: [
|
|
1753
1788
|
iconLeft,
|
|
1754
|
-
/* @__PURE__ */ (0,
|
|
1789
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "w-full", children }),
|
|
1755
1790
|
iconRight
|
|
1756
1791
|
]
|
|
1757
1792
|
}
|
|
@@ -1759,7 +1794,7 @@ var DropdownMenuItem = (0, import_react8.forwardRef)(
|
|
|
1759
1794
|
}
|
|
1760
1795
|
);
|
|
1761
1796
|
DropdownMenuItem.displayName = "DropdownMenuItem";
|
|
1762
|
-
var DropdownMenuSeparator = (0, import_react8.forwardRef)(({ className, store: _store, ...props }, ref) => /* @__PURE__ */ (0,
|
|
1797
|
+
var DropdownMenuSeparator = (0, import_react8.forwardRef)(({ className, store: _store, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1763
1798
|
"div",
|
|
1764
1799
|
{
|
|
1765
1800
|
ref,
|
|
@@ -1772,7 +1807,7 @@ var ProfileMenuTrigger = (0, import_react8.forwardRef)(({ className, onClick, st
|
|
|
1772
1807
|
const store = useDropdownStore(externalStore);
|
|
1773
1808
|
const open = (0, import_zustand2.useStore)(store, (s) => s.open);
|
|
1774
1809
|
const toggleOpen = () => store.setState({ open: !open });
|
|
1775
|
-
return /* @__PURE__ */ (0,
|
|
1810
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1776
1811
|
"button",
|
|
1777
1812
|
{
|
|
1778
1813
|
ref,
|
|
@@ -1787,13 +1822,13 @@ var ProfileMenuTrigger = (0, import_react8.forwardRef)(({ className, onClick, st
|
|
|
1787
1822
|
},
|
|
1788
1823
|
"aria-expanded": open,
|
|
1789
1824
|
...props,
|
|
1790
|
-
children: /* @__PURE__ */ (0,
|
|
1825
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "size-6 rounded-full bg-primary-100 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_phosphor_react5.User, { className: "text-primary-950", size: 18 }) })
|
|
1791
1826
|
}
|
|
1792
1827
|
);
|
|
1793
1828
|
});
|
|
1794
1829
|
ProfileMenuTrigger.displayName = "ProfileMenuTrigger";
|
|
1795
1830
|
var ProfileMenuHeader = (0, import_react8.forwardRef)(({ className, name, email, photoUrl, store: _store, ...props }, ref) => {
|
|
1796
|
-
return /* @__PURE__ */ (0,
|
|
1831
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
1797
1832
|
"div",
|
|
1798
1833
|
{
|
|
1799
1834
|
ref,
|
|
@@ -1804,16 +1839,16 @@ var ProfileMenuHeader = (0, import_react8.forwardRef)(({ className, name, email,
|
|
|
1804
1839
|
),
|
|
1805
1840
|
...props,
|
|
1806
1841
|
children: [
|
|
1807
|
-
/* @__PURE__ */ (0,
|
|
1842
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "w-16 h-16 bg-primary-100 rounded-full flex items-center justify-center overflow-hidden flex-shrink-0", children: photoUrl ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1808
1843
|
"img",
|
|
1809
1844
|
{
|
|
1810
1845
|
src: photoUrl,
|
|
1811
1846
|
alt: "Foto de perfil",
|
|
1812
1847
|
className: "w-full h-full object-cover"
|
|
1813
1848
|
}
|
|
1814
|
-
) : /* @__PURE__ */ (0,
|
|
1815
|
-
/* @__PURE__ */ (0,
|
|
1816
|
-
/* @__PURE__ */ (0,
|
|
1849
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_phosphor_react5.User, { size: 34, className: "text-primary-800" }) }),
|
|
1850
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex flex-col min-w-0", children: [
|
|
1851
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1817
1852
|
Text_default,
|
|
1818
1853
|
{
|
|
1819
1854
|
size: "xl",
|
|
@@ -1823,7 +1858,7 @@ var ProfileMenuHeader = (0, import_react8.forwardRef)(({ className, name, email,
|
|
|
1823
1858
|
children: name
|
|
1824
1859
|
}
|
|
1825
1860
|
),
|
|
1826
|
-
/* @__PURE__ */ (0,
|
|
1861
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Text_default, { size: "md", color: "text-text-600", className: "truncate", children: email })
|
|
1827
1862
|
] })
|
|
1828
1863
|
]
|
|
1829
1864
|
}
|
|
@@ -1839,7 +1874,7 @@ var ProfileMenuInfo = (0, import_react8.forwardRef)(
|
|
|
1839
1874
|
store: _store,
|
|
1840
1875
|
...props
|
|
1841
1876
|
}, ref) => {
|
|
1842
|
-
return /* @__PURE__ */ (0,
|
|
1877
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
1843
1878
|
"div",
|
|
1844
1879
|
{
|
|
1845
1880
|
ref,
|
|
@@ -1847,13 +1882,13 @@ var ProfileMenuInfo = (0, import_react8.forwardRef)(
|
|
|
1847
1882
|
className: cn("flex flex-row gap-4 items-center", className),
|
|
1848
1883
|
...props,
|
|
1849
1884
|
children: [
|
|
1850
|
-
/* @__PURE__ */ (0,
|
|
1851
|
-
/* @__PURE__ */ (0,
|
|
1852
|
-
/* @__PURE__ */ (0,
|
|
1853
|
-
/* @__PURE__ */ (0,
|
|
1854
|
-
/* @__PURE__ */ (0,
|
|
1855
|
-
/* @__PURE__ */ (0,
|
|
1856
|
-
/* @__PURE__ */ (0,
|
|
1885
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "w-16 h-16" }),
|
|
1886
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex flex-col ", children: [
|
|
1887
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Text_default, { size: "md", color: "text-text-600", children: schoolName }),
|
|
1888
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("span", { className: "flex flex-row items-center gap-2", children: [
|
|
1889
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Text_default, { size: "md", color: "text-text-600", children: classYearName }),
|
|
1890
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("p", { className: "text-text-600 text-xs align-middle", children: "\u25CF" }),
|
|
1891
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Text_default, { size: "md", color: "text-text-600", children: schoolYearName })
|
|
1857
1892
|
] })
|
|
1858
1893
|
] })
|
|
1859
1894
|
]
|
|
@@ -1888,14 +1923,14 @@ var ProfileToggleTheme = ({
|
|
|
1888
1923
|
setModalThemeToggle(false);
|
|
1889
1924
|
setOpen(false);
|
|
1890
1925
|
};
|
|
1891
|
-
return /* @__PURE__ */ (0,
|
|
1892
|
-
/* @__PURE__ */ (0,
|
|
1926
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_jsx_runtime11.Fragment, { children: [
|
|
1927
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1893
1928
|
DropdownMenuItem,
|
|
1894
1929
|
{
|
|
1895
1930
|
variant: "profile",
|
|
1896
1931
|
preventClose: true,
|
|
1897
1932
|
store,
|
|
1898
|
-
iconLeft: /* @__PURE__ */ (0,
|
|
1933
|
+
iconLeft: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1899
1934
|
"svg",
|
|
1900
1935
|
{
|
|
1901
1936
|
width: "24",
|
|
@@ -1903,7 +1938,7 @@ var ProfileToggleTheme = ({
|
|
|
1903
1938
|
viewBox: "0 0 25 25",
|
|
1904
1939
|
fill: "none",
|
|
1905
1940
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1906
|
-
children: /* @__PURE__ */ (0,
|
|
1941
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1907
1942
|
"path",
|
|
1908
1943
|
{
|
|
1909
1944
|
d: "M12.5 2.75C15.085 2.75276 17.5637 3.78054 19.3916 5.6084C21.2195 7.43628 22.2473 9.915 22.25 12.5C22.25 14.4284 21.6778 16.3136 20.6064 17.917C19.5352 19.5201 18.0128 20.7699 16.2314 21.5078C14.4499 22.2458 12.489 22.4387 10.5977 22.0625C8.70642 21.6863 6.96899 20.758 5.60547 19.3945C4.24197 18.031 3.31374 16.2936 2.9375 14.4023C2.56129 12.511 2.75423 10.5501 3.49219 8.76855C4.23012 6.98718 5.47982 5.46483 7.08301 4.39355C8.68639 3.32221 10.5716 2.75 12.5 2.75ZM11.75 4.28516C9.70145 4.47452 7.7973 5.42115 6.41016 6.94043C5.02299 8.4599 4.25247 10.4426 4.25 12.5C4.25247 14.5574 5.02299 16.5401 6.41016 18.0596C7.7973 19.5789 9.70145 20.5255 11.75 20.7148V4.28516Z",
|
|
@@ -1912,7 +1947,7 @@ var ProfileToggleTheme = ({
|
|
|
1912
1947
|
)
|
|
1913
1948
|
}
|
|
1914
1949
|
),
|
|
1915
|
-
iconRight: /* @__PURE__ */ (0,
|
|
1950
|
+
iconRight: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_phosphor_react5.CaretRight, {}),
|
|
1916
1951
|
onClick: handleClick,
|
|
1917
1952
|
onKeyDown: (e) => {
|
|
1918
1953
|
if (e.key === "Enter" || e.key === " ") {
|
|
@@ -1922,23 +1957,23 @@ var ProfileToggleTheme = ({
|
|
|
1922
1957
|
}
|
|
1923
1958
|
},
|
|
1924
1959
|
...props,
|
|
1925
|
-
children: /* @__PURE__ */ (0,
|
|
1960
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Text_default, { size: "md", color: "text-text-700", children: "Apar\xEAncia" })
|
|
1926
1961
|
}
|
|
1927
1962
|
),
|
|
1928
|
-
/* @__PURE__ */ (0,
|
|
1963
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1929
1964
|
Modal_default,
|
|
1930
1965
|
{
|
|
1931
1966
|
isOpen: modalThemeToggle,
|
|
1932
1967
|
onClose: handleCancel,
|
|
1933
1968
|
title: "Apar\xEAncia",
|
|
1934
1969
|
size: "md",
|
|
1935
|
-
footer: /* @__PURE__ */ (0,
|
|
1936
|
-
/* @__PURE__ */ (0,
|
|
1937
|
-
/* @__PURE__ */ (0,
|
|
1970
|
+
footer: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex gap-3", children: [
|
|
1971
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Button_default, { variant: "outline", onClick: handleCancel, children: "Cancelar" }),
|
|
1972
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Button_default, { variant: "solid", onClick: handleSave, children: "Salvar" })
|
|
1938
1973
|
] }),
|
|
1939
|
-
children: /* @__PURE__ */ (0,
|
|
1940
|
-
/* @__PURE__ */ (0,
|
|
1941
|
-
/* @__PURE__ */ (0,
|
|
1974
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex flex-col", children: [
|
|
1975
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("p", { className: "text-sm text-text-500", children: "Escolha o tema:" }),
|
|
1976
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ThemeToggle, { variant: "with-save", onToggle: setSelectedTheme })
|
|
1942
1977
|
] })
|
|
1943
1978
|
}
|
|
1944
1979
|
)
|
|
@@ -1946,7 +1981,7 @@ var ProfileToggleTheme = ({
|
|
|
1946
1981
|
};
|
|
1947
1982
|
ProfileToggleTheme.displayName = "ProfileToggleTheme";
|
|
1948
1983
|
var ProfileMenuSection = (0, import_react8.forwardRef)(({ className, children, store: _store, ...props }, ref) => {
|
|
1949
|
-
return /* @__PURE__ */ (0,
|
|
1984
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { ref, className: cn("flex flex-col p-2", className), ...props, children });
|
|
1950
1985
|
});
|
|
1951
1986
|
ProfileMenuSection.displayName = "ProfileMenuSection";
|
|
1952
1987
|
var ProfileMenuFooter = ({
|
|
@@ -1958,7 +1993,7 @@ var ProfileMenuFooter = ({
|
|
|
1958
1993
|
}) => {
|
|
1959
1994
|
const store = useDropdownStore(externalStore);
|
|
1960
1995
|
const setOpen = (0, import_zustand2.useStore)(store, (s) => s.setOpen);
|
|
1961
|
-
return /* @__PURE__ */ (0,
|
|
1996
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
1962
1997
|
Button_default,
|
|
1963
1998
|
{
|
|
1964
1999
|
variant: "outline",
|
|
@@ -1970,8 +2005,8 @@ var ProfileMenuFooter = ({
|
|
|
1970
2005
|
},
|
|
1971
2006
|
...props,
|
|
1972
2007
|
children: [
|
|
1973
|
-
/* @__PURE__ */ (0,
|
|
1974
|
-
/* @__PURE__ */ (0,
|
|
2008
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "mr-2 flex items-center", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_phosphor_react5.SignOut, { className: "text-inherit" }) }),
|
|
2009
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Text_default, { color: "inherit", children: "Sair" })
|
|
1975
2010
|
]
|
|
1976
2011
|
}
|
|
1977
2012
|
);
|
|
@@ -1980,7 +2015,7 @@ ProfileMenuFooter.displayName = "ProfileMenuFooter";
|
|
|
1980
2015
|
var DropdownMenu_default = DropdownMenu;
|
|
1981
2016
|
|
|
1982
2017
|
// src/components/Search/Search.tsx
|
|
1983
|
-
var
|
|
2018
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
1984
2019
|
var filterOptions = (options, query) => {
|
|
1985
2020
|
if (!query || query.length < 1) return [];
|
|
1986
2021
|
return options.filter(
|
|
@@ -2126,14 +2161,14 @@ var Search = (0, import_react9.forwardRef)(
|
|
|
2126
2161
|
const hasValue = String(value ?? "").length > 0;
|
|
2127
2162
|
const showClearButton = hasValue && !disabled && !readOnly;
|
|
2128
2163
|
const showSearchIcon = !hasValue && !disabled && !readOnly;
|
|
2129
|
-
return /* @__PURE__ */ (0,
|
|
2164
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
2130
2165
|
"div",
|
|
2131
2166
|
{
|
|
2132
2167
|
ref: dropdownRef,
|
|
2133
2168
|
className: `w-full max-w-lg md:w-[488px] ${containerClassName}`,
|
|
2134
2169
|
children: [
|
|
2135
|
-
/* @__PURE__ */ (0,
|
|
2136
|
-
/* @__PURE__ */ (0,
|
|
2170
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "relative flex items-center", children: [
|
|
2171
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2137
2172
|
"input",
|
|
2138
2173
|
{
|
|
2139
2174
|
ref: (node) => {
|
|
@@ -2161,35 +2196,35 @@ var Search = (0, import_react9.forwardRef)(
|
|
|
2161
2196
|
...props
|
|
2162
2197
|
}
|
|
2163
2198
|
),
|
|
2164
|
-
showClearButton && /* @__PURE__ */ (0,
|
|
2199
|
+
showClearButton && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "absolute right-3 top-1/2 transform -translate-y-1/2", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2165
2200
|
"button",
|
|
2166
2201
|
{
|
|
2167
2202
|
type: "button",
|
|
2168
2203
|
className: "p-0 border-0 bg-transparent cursor-pointer",
|
|
2169
2204
|
onMouseDown: handleClearClick,
|
|
2170
2205
|
"aria-label": "Limpar busca",
|
|
2171
|
-
children: /* @__PURE__ */ (0,
|
|
2206
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "w-6 h-6 text-text-800 flex items-center justify-center hover:text-text-600 transition-colors", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_phosphor_react6.X, {}) })
|
|
2172
2207
|
}
|
|
2173
2208
|
) }),
|
|
2174
|
-
showSearchIcon && /* @__PURE__ */ (0,
|
|
2209
|
+
showSearchIcon && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "absolute right-3 top-1/2 transform -translate-y-1/2", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2175
2210
|
"button",
|
|
2176
2211
|
{
|
|
2177
2212
|
type: "button",
|
|
2178
2213
|
className: "p-0 border-0 bg-transparent cursor-pointer",
|
|
2179
2214
|
onMouseDown: handleSearchIconClick,
|
|
2180
2215
|
"aria-label": "Buscar",
|
|
2181
|
-
children: /* @__PURE__ */ (0,
|
|
2216
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "w-6 h-6 text-text-800 flex items-center justify-center hover:text-text-600 transition-colors", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_phosphor_react6.MagnifyingGlass, {}) })
|
|
2182
2217
|
}
|
|
2183
2218
|
) })
|
|
2184
2219
|
] }),
|
|
2185
|
-
showDropdown && /* @__PURE__ */ (0,
|
|
2220
|
+
showDropdown && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(DropdownMenu_default, { open: showDropdown, onOpenChange: setDropdownOpen, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2186
2221
|
DropdownMenuContent,
|
|
2187
2222
|
{
|
|
2188
2223
|
id: dropdownId,
|
|
2189
2224
|
className: "w-full mt-1",
|
|
2190
2225
|
style: { maxHeight: dropdownMaxHeight },
|
|
2191
2226
|
align: "start",
|
|
2192
|
-
children: filteredOptions.length > 0 ? filteredOptions.map((option) => /* @__PURE__ */ (0,
|
|
2227
|
+
children: filteredOptions.length > 0 ? filteredOptions.map((option) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2193
2228
|
DropdownMenuItem,
|
|
2194
2229
|
{
|
|
2195
2230
|
onClick: () => handleSelectOption(option),
|
|
@@ -2197,7 +2232,7 @@ var Search = (0, import_react9.forwardRef)(
|
|
|
2197
2232
|
children: option
|
|
2198
2233
|
},
|
|
2199
2234
|
option
|
|
2200
|
-
)) : /* @__PURE__ */ (0,
|
|
2235
|
+
)) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "px-3 py-3 text-text-700 text-base", children: noResultsText })
|
|
2201
2236
|
}
|
|
2202
2237
|
) })
|
|
2203
2238
|
]
|
|
@@ -2213,7 +2248,7 @@ var import_react15 = require("react");
|
|
|
2213
2248
|
|
|
2214
2249
|
// src/components/Badge/Badge.tsx
|
|
2215
2250
|
var import_phosphor_react7 = require("phosphor-react");
|
|
2216
|
-
var
|
|
2251
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
2217
2252
|
var VARIANT_ACTION_CLASSES2 = {
|
|
2218
2253
|
solid: {
|
|
2219
2254
|
error: "bg-error-background text-error-700 focus-visible:outline-none",
|
|
@@ -2275,14 +2310,14 @@ var Badge = ({
|
|
|
2275
2310
|
const baseClasses = "inline-flex items-center justify-center rounded-xs font-normal gap-1 relative";
|
|
2276
2311
|
const baseClassesIcon = "flex items-center";
|
|
2277
2312
|
if (variant === "notification") {
|
|
2278
|
-
return /* @__PURE__ */ (0,
|
|
2313
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
2279
2314
|
"div",
|
|
2280
2315
|
{
|
|
2281
2316
|
className: cn(baseClasses, variantClasses, sizeClasses, className),
|
|
2282
2317
|
...props,
|
|
2283
2318
|
children: [
|
|
2284
|
-
/* @__PURE__ */ (0,
|
|
2285
|
-
notificationActive && /* @__PURE__ */ (0,
|
|
2319
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_phosphor_react7.Bell, { size: 24, className: "text-current", "aria-hidden": "true" }),
|
|
2320
|
+
notificationActive && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2286
2321
|
"span",
|
|
2287
2322
|
{
|
|
2288
2323
|
"data-testid": "notification-dot",
|
|
@@ -2293,15 +2328,15 @@ var Badge = ({
|
|
|
2293
2328
|
}
|
|
2294
2329
|
);
|
|
2295
2330
|
}
|
|
2296
|
-
return /* @__PURE__ */ (0,
|
|
2331
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
2297
2332
|
"div",
|
|
2298
2333
|
{
|
|
2299
2334
|
className: cn(baseClasses, variantClasses, sizeClasses, className),
|
|
2300
2335
|
...props,
|
|
2301
2336
|
children: [
|
|
2302
|
-
iconLeft && /* @__PURE__ */ (0,
|
|
2337
|
+
iconLeft && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: cn(baseClassesIcon, sizeClassesIcon), children: iconLeft }),
|
|
2303
2338
|
children,
|
|
2304
|
-
iconRight && /* @__PURE__ */ (0,
|
|
2339
|
+
iconRight && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: cn(baseClassesIcon, sizeClassesIcon), children: iconRight })
|
|
2305
2340
|
]
|
|
2306
2341
|
}
|
|
2307
2342
|
);
|
|
@@ -2311,7 +2346,7 @@ var Badge_default = Badge;
|
|
|
2311
2346
|
// src/components/CheckBox/CheckBox.tsx
|
|
2312
2347
|
var import_react10 = require("react");
|
|
2313
2348
|
var import_phosphor_react8 = require("phosphor-react");
|
|
2314
|
-
var
|
|
2349
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
2315
2350
|
var SIZE_CLASSES4 = {
|
|
2316
2351
|
small: {
|
|
2317
2352
|
checkbox: "w-4 h-4",
|
|
@@ -2412,7 +2447,7 @@ var CheckBox = (0, import_react10.forwardRef)(
|
|
|
2412
2447
|
);
|
|
2413
2448
|
const renderIcon = () => {
|
|
2414
2449
|
if (indeterminate) {
|
|
2415
|
-
return /* @__PURE__ */ (0,
|
|
2450
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
2416
2451
|
import_phosphor_react8.Minus,
|
|
2417
2452
|
{
|
|
2418
2453
|
size: sizeClasses.iconSize,
|
|
@@ -2422,7 +2457,7 @@ var CheckBox = (0, import_react10.forwardRef)(
|
|
|
2422
2457
|
);
|
|
2423
2458
|
}
|
|
2424
2459
|
if (checked) {
|
|
2425
|
-
return /* @__PURE__ */ (0,
|
|
2460
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
2426
2461
|
import_phosphor_react8.Check,
|
|
2427
2462
|
{
|
|
2428
2463
|
size: sizeClasses.iconSize,
|
|
@@ -2433,8 +2468,8 @@ var CheckBox = (0, import_react10.forwardRef)(
|
|
|
2433
2468
|
}
|
|
2434
2469
|
return null;
|
|
2435
2470
|
};
|
|
2436
|
-
return /* @__PURE__ */ (0,
|
|
2437
|
-
/* @__PURE__ */ (0,
|
|
2471
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex flex-col", children: [
|
|
2472
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
2438
2473
|
"div",
|
|
2439
2474
|
{
|
|
2440
2475
|
className: cn(
|
|
@@ -2443,7 +2478,7 @@ var CheckBox = (0, import_react10.forwardRef)(
|
|
|
2443
2478
|
disabled ? "opacity-40" : ""
|
|
2444
2479
|
),
|
|
2445
2480
|
children: [
|
|
2446
|
-
/* @__PURE__ */ (0,
|
|
2481
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
2447
2482
|
"input",
|
|
2448
2483
|
{
|
|
2449
2484
|
ref,
|
|
@@ -2456,15 +2491,15 @@ var CheckBox = (0, import_react10.forwardRef)(
|
|
|
2456
2491
|
...props
|
|
2457
2492
|
}
|
|
2458
2493
|
),
|
|
2459
|
-
/* @__PURE__ */ (0,
|
|
2460
|
-
label && /* @__PURE__ */ (0,
|
|
2494
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("label", { htmlFor: inputId, className: checkboxClasses, children: renderIcon() }),
|
|
2495
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
2461
2496
|
"div",
|
|
2462
2497
|
{
|
|
2463
2498
|
className: cn(
|
|
2464
2499
|
"flex flex-row items-center",
|
|
2465
2500
|
sizeClasses.labelHeight
|
|
2466
2501
|
),
|
|
2467
|
-
children: /* @__PURE__ */ (0,
|
|
2502
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
2468
2503
|
Text_default,
|
|
2469
2504
|
{
|
|
2470
2505
|
as: "label",
|
|
@@ -2483,7 +2518,7 @@ var CheckBox = (0, import_react10.forwardRef)(
|
|
|
2483
2518
|
]
|
|
2484
2519
|
}
|
|
2485
2520
|
),
|
|
2486
|
-
errorMessage && /* @__PURE__ */ (0,
|
|
2521
|
+
errorMessage && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
2487
2522
|
Text_default,
|
|
2488
2523
|
{
|
|
2489
2524
|
size: "sm",
|
|
@@ -2493,7 +2528,7 @@ var CheckBox = (0, import_react10.forwardRef)(
|
|
|
2493
2528
|
children: errorMessage
|
|
2494
2529
|
}
|
|
2495
2530
|
),
|
|
2496
|
-
helperText && !errorMessage && /* @__PURE__ */ (0,
|
|
2531
|
+
helperText && !errorMessage && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
2497
2532
|
Text_default,
|
|
2498
2533
|
{
|
|
2499
2534
|
size: "sm",
|
|
@@ -2510,7 +2545,7 @@ CheckBox.displayName = "CheckBox";
|
|
|
2510
2545
|
var CheckBox_default = CheckBox;
|
|
2511
2546
|
|
|
2512
2547
|
// src/components/Divider/Divider.tsx
|
|
2513
|
-
var
|
|
2548
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
2514
2549
|
var Divider = ({
|
|
2515
2550
|
orientation = "horizontal",
|
|
2516
2551
|
className = "",
|
|
@@ -2521,7 +2556,7 @@ var Divider = ({
|
|
|
2521
2556
|
horizontal: "w-full h-px",
|
|
2522
2557
|
vertical: "h-full w-px"
|
|
2523
2558
|
};
|
|
2524
|
-
return /* @__PURE__ */ (0,
|
|
2559
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
2525
2560
|
"hr",
|
|
2526
2561
|
{
|
|
2527
2562
|
className: cn(baseClasses, orientationClasses[orientation], className),
|
|
@@ -2533,7 +2568,7 @@ var Divider = ({
|
|
|
2533
2568
|
var Divider_default = Divider;
|
|
2534
2569
|
|
|
2535
2570
|
// src/components/ProgressBar/ProgressBar.tsx
|
|
2536
|
-
var
|
|
2571
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
2537
2572
|
var SIZE_CLASSES5 = {
|
|
2538
2573
|
small: {
|
|
2539
2574
|
container: "h-1",
|
|
@@ -2645,20 +2680,20 @@ var renderStackedHitCountDisplay = (showHitCount, showPercentage, clampedValue,
|
|
|
2645
2680
|
max,
|
|
2646
2681
|
percentage
|
|
2647
2682
|
);
|
|
2648
|
-
return /* @__PURE__ */ (0,
|
|
2683
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
2649
2684
|
"div",
|
|
2650
2685
|
{
|
|
2651
2686
|
className: cn(
|
|
2652
2687
|
"text-xs font-medium leading-[14px] text-right",
|
|
2653
2688
|
percentageClassName
|
|
2654
2689
|
),
|
|
2655
|
-
children: displayPriority.type === "hitCount" ? /* @__PURE__ */ (0,
|
|
2656
|
-
/* @__PURE__ */ (0,
|
|
2657
|
-
/* @__PURE__ */ (0,
|
|
2690
|
+
children: displayPriority.type === "hitCount" ? /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
|
|
2691
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "text-success-200", children: Math.round(clampedValue) }),
|
|
2692
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("span", { className: "text-text-600", children: [
|
|
2658
2693
|
" de ",
|
|
2659
2694
|
max
|
|
2660
2695
|
] })
|
|
2661
|
-
] }) : /* @__PURE__ */ (0,
|
|
2696
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(Text_default, { size: "xs", weight: "medium", className: "text-success-200", children: [
|
|
2662
2697
|
Math.round(percentage),
|
|
2663
2698
|
"%"
|
|
2664
2699
|
] })
|
|
@@ -2673,7 +2708,7 @@ var ProgressBarBase = ({
|
|
|
2673
2708
|
variantClasses,
|
|
2674
2709
|
containerClassName,
|
|
2675
2710
|
fillClassName
|
|
2676
|
-
}) => /* @__PURE__ */ (0,
|
|
2711
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
2677
2712
|
"div",
|
|
2678
2713
|
{
|
|
2679
2714
|
className: cn(
|
|
@@ -2682,7 +2717,7 @@ var ProgressBarBase = ({
|
|
|
2682
2717
|
"overflow-hidden relative"
|
|
2683
2718
|
),
|
|
2684
2719
|
children: [
|
|
2685
|
-
/* @__PURE__ */ (0,
|
|
2720
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
2686
2721
|
"progress",
|
|
2687
2722
|
{
|
|
2688
2723
|
value: clampedValue,
|
|
@@ -2691,7 +2726,7 @@ var ProgressBarBase = ({
|
|
|
2691
2726
|
className: "absolute inset-0 w-full h-full opacity-0"
|
|
2692
2727
|
}
|
|
2693
2728
|
),
|
|
2694
|
-
/* @__PURE__ */ (0,
|
|
2729
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
2695
2730
|
"div",
|
|
2696
2731
|
{
|
|
2697
2732
|
className: cn(
|
|
@@ -2717,7 +2752,7 @@ var StackedLayout = ({
|
|
|
2717
2752
|
percentage,
|
|
2718
2753
|
variantClasses,
|
|
2719
2754
|
dimensions
|
|
2720
|
-
}) => /* @__PURE__ */ (0,
|
|
2755
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
2721
2756
|
"div",
|
|
2722
2757
|
{
|
|
2723
2758
|
className: cn(
|
|
@@ -2727,8 +2762,8 @@ var StackedLayout = ({
|
|
|
2727
2762
|
className
|
|
2728
2763
|
),
|
|
2729
2764
|
children: [
|
|
2730
|
-
shouldShowHeader(label, showPercentage, showHitCount) && /* @__PURE__ */ (0,
|
|
2731
|
-
label && /* @__PURE__ */ (0,
|
|
2765
|
+
shouldShowHeader(label, showPercentage, showHitCount) && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex flex-row justify-between items-center w-full h-[19px]", children: [
|
|
2766
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
2732
2767
|
Text_default,
|
|
2733
2768
|
{
|
|
2734
2769
|
as: "div",
|
|
@@ -2747,7 +2782,7 @@ var StackedLayout = ({
|
|
|
2747
2782
|
percentageClassName
|
|
2748
2783
|
)
|
|
2749
2784
|
] }),
|
|
2750
|
-
/* @__PURE__ */ (0,
|
|
2785
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
2751
2786
|
ProgressBarBase,
|
|
2752
2787
|
{
|
|
2753
2788
|
clampedValue,
|
|
@@ -2789,7 +2824,7 @@ var CompactLayout = ({
|
|
|
2789
2824
|
percentageClassName,
|
|
2790
2825
|
labelClassName
|
|
2791
2826
|
});
|
|
2792
|
-
return /* @__PURE__ */ (0,
|
|
2827
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
2793
2828
|
"div",
|
|
2794
2829
|
{
|
|
2795
2830
|
className: cn(
|
|
@@ -2799,7 +2834,7 @@ var CompactLayout = ({
|
|
|
2799
2834
|
className
|
|
2800
2835
|
),
|
|
2801
2836
|
children: [
|
|
2802
|
-
shouldShowHeader(label, showPercentage, showHitCount) && /* @__PURE__ */ (0,
|
|
2837
|
+
shouldShowHeader(label, showPercentage, showHitCount) && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
2803
2838
|
Text_default,
|
|
2804
2839
|
{
|
|
2805
2840
|
as: "div",
|
|
@@ -2810,7 +2845,7 @@ var CompactLayout = ({
|
|
|
2810
2845
|
children: content
|
|
2811
2846
|
}
|
|
2812
2847
|
),
|
|
2813
|
-
/* @__PURE__ */ (0,
|
|
2848
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
2814
2849
|
ProgressBarBase,
|
|
2815
2850
|
{
|
|
2816
2851
|
clampedValue,
|
|
@@ -2846,9 +2881,9 @@ var DefaultLayout = ({
|
|
|
2846
2881
|
label,
|
|
2847
2882
|
showPercentage
|
|
2848
2883
|
);
|
|
2849
|
-
return /* @__PURE__ */ (0,
|
|
2850
|
-
displayConfig.showHeader && /* @__PURE__ */ (0,
|
|
2851
|
-
label && /* @__PURE__ */ (0,
|
|
2884
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: cn("flex", sizeClasses.layout, gapClass, className), children: [
|
|
2885
|
+
displayConfig.showHeader && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex flex-row items-center justify-between w-full", children: [
|
|
2886
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
2852
2887
|
Text_default,
|
|
2853
2888
|
{
|
|
2854
2889
|
as: "div",
|
|
@@ -2861,7 +2896,7 @@ var DefaultLayout = ({
|
|
|
2861
2896
|
children: label
|
|
2862
2897
|
}
|
|
2863
2898
|
),
|
|
2864
|
-
showPercentage && /* @__PURE__ */ (0,
|
|
2899
|
+
showPercentage && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
2865
2900
|
Text_default,
|
|
2866
2901
|
{
|
|
2867
2902
|
size: "xs",
|
|
@@ -2877,7 +2912,7 @@ var DefaultLayout = ({
|
|
|
2877
2912
|
}
|
|
2878
2913
|
)
|
|
2879
2914
|
] }),
|
|
2880
|
-
/* @__PURE__ */ (0,
|
|
2915
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
2881
2916
|
ProgressBarBase,
|
|
2882
2917
|
{
|
|
2883
2918
|
clampedValue,
|
|
@@ -2897,7 +2932,7 @@ var DefaultLayout = ({
|
|
|
2897
2932
|
)
|
|
2898
2933
|
}
|
|
2899
2934
|
),
|
|
2900
|
-
displayConfig.showPercentage && /* @__PURE__ */ (0,
|
|
2935
|
+
displayConfig.showPercentage && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
2901
2936
|
Text_default,
|
|
2902
2937
|
{
|
|
2903
2938
|
size: "xs",
|
|
@@ -2912,7 +2947,7 @@ var DefaultLayout = ({
|
|
|
2912
2947
|
]
|
|
2913
2948
|
}
|
|
2914
2949
|
),
|
|
2915
|
-
displayConfig.showLabel && /* @__PURE__ */ (0,
|
|
2950
|
+
displayConfig.showLabel && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
2916
2951
|
Text_default,
|
|
2917
2952
|
{
|
|
2918
2953
|
as: "div",
|
|
@@ -2948,7 +2983,7 @@ var ProgressBar = ({
|
|
|
2948
2983
|
const sizeClasses = SIZE_CLASSES5[size];
|
|
2949
2984
|
const variantClasses = VARIANT_CLASSES[variant];
|
|
2950
2985
|
if (layout === "stacked") {
|
|
2951
|
-
return /* @__PURE__ */ (0,
|
|
2986
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
2952
2987
|
StackedLayout,
|
|
2953
2988
|
{
|
|
2954
2989
|
className,
|
|
@@ -2969,7 +3004,7 @@ var ProgressBar = ({
|
|
|
2969
3004
|
);
|
|
2970
3005
|
}
|
|
2971
3006
|
if (layout === "compact") {
|
|
2972
|
-
return /* @__PURE__ */ (0,
|
|
3007
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
2973
3008
|
CompactLayout,
|
|
2974
3009
|
{
|
|
2975
3010
|
className,
|
|
@@ -2989,7 +3024,7 @@ var ProgressBar = ({
|
|
|
2989
3024
|
}
|
|
2990
3025
|
);
|
|
2991
3026
|
}
|
|
2992
|
-
return /* @__PURE__ */ (0,
|
|
3027
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
2993
3028
|
DefaultLayout,
|
|
2994
3029
|
{
|
|
2995
3030
|
className,
|
|
@@ -3009,8 +3044,8 @@ var ProgressBar = ({
|
|
|
3009
3044
|
var ProgressBar_default = ProgressBar;
|
|
3010
3045
|
|
|
3011
3046
|
// src/assets/icons/subjects/ChatEN.tsx
|
|
3012
|
-
var
|
|
3013
|
-
var ChatEN = ({ size, color }) => /* @__PURE__ */ (0,
|
|
3047
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
3048
|
+
var ChatEN = ({ size, color }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
3014
3049
|
"svg",
|
|
3015
3050
|
{
|
|
3016
3051
|
width: size,
|
|
@@ -3019,21 +3054,21 @@ var ChatEN = ({ size, color }) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)
|
|
|
3019
3054
|
fill: "none",
|
|
3020
3055
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3021
3056
|
children: [
|
|
3022
|
-
/* @__PURE__ */ (0,
|
|
3057
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
3023
3058
|
"path",
|
|
3024
3059
|
{
|
|
3025
3060
|
d: "M27 6H5.00004C4.4696 6 3.9609 6.21071 3.58582 6.58579C3.21075 6.96086 3.00004 7.46957 3.00004 8V28C2.99773 28.3814 3.10562 28.7553 3.31074 29.0768C3.51585 29.3984 3.80947 29.6538 4.15629 29.8125C4.42057 29.9356 4.7085 29.9995 5.00004 30C5.46954 29.9989 5.92347 29.8315 6.28129 29.5275L6.29254 29.5187L10.375 26H27C27.5305 26 28.0392 25.7893 28.4142 25.4142C28.7893 25.0391 29 24.5304 29 24V8C29 7.46957 28.7893 6.96086 28.4142 6.58579C28.0392 6.21071 27.5305 6 27 6ZM27 24H10C9.75992 24.0001 9.52787 24.0866 9.34629 24.2437L5.00004 28V8H27V24Z",
|
|
3026
3061
|
fill: color
|
|
3027
3062
|
}
|
|
3028
3063
|
),
|
|
3029
|
-
/* @__PURE__ */ (0,
|
|
3064
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
3030
3065
|
"path",
|
|
3031
3066
|
{
|
|
3032
3067
|
d: "M22.5488 12V20.5312H21.0781L17.252 14.4199V20.5312H15.7812V12H17.252L21.0898 18.123V12H22.5488Z",
|
|
3033
3068
|
fill: color
|
|
3034
3069
|
}
|
|
3035
3070
|
),
|
|
3036
|
-
/* @__PURE__ */ (0,
|
|
3071
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
3037
3072
|
"path",
|
|
3038
3073
|
{
|
|
3039
3074
|
d: "M14.584 19.3652V20.5312H10.0547V19.3652H14.584ZM10.4707 12V20.5312H9V12H10.4707ZM13.9922 15.5625V16.7109H10.0547V15.5625H13.9922ZM14.5547 12V13.1719H10.0547V12H14.5547Z",
|
|
@@ -3045,8 +3080,8 @@ var ChatEN = ({ size, color }) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)
|
|
|
3045
3080
|
);
|
|
3046
3081
|
|
|
3047
3082
|
// src/assets/icons/subjects/ChatES.tsx
|
|
3048
|
-
var
|
|
3049
|
-
var ChatES = ({ size, color }) => /* @__PURE__ */ (0,
|
|
3083
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
3084
|
+
var ChatES = ({ size, color }) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
3050
3085
|
"svg",
|
|
3051
3086
|
{
|
|
3052
3087
|
width: size,
|
|
@@ -3055,21 +3090,21 @@ var ChatES = ({ size, color }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)
|
|
|
3055
3090
|
fill: "none",
|
|
3056
3091
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3057
3092
|
children: [
|
|
3058
|
-
/* @__PURE__ */ (0,
|
|
3093
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
3059
3094
|
"path",
|
|
3060
3095
|
{
|
|
3061
3096
|
d: "M27 6H5.00004C4.4696 6 3.9609 6.21071 3.58582 6.58579C3.21075 6.96086 3.00004 7.46957 3.00004 8V28C2.99773 28.3814 3.10562 28.7553 3.31074 29.0768C3.51585 29.3984 3.80947 29.6538 4.15629 29.8125C4.42057 29.9356 4.7085 29.9995 5.00004 30C5.46954 29.9989 5.92347 29.8315 6.28129 29.5275L6.29254 29.5187L10.375 26H27C27.5305 26 28.0392 25.7893 28.4142 25.4142C28.7893 25.0391 29 24.5304 29 24V8C29 7.46957 28.7893 6.96086 28.4142 6.58579C28.0392 6.21071 27.5305 6 27 6ZM27 24H10C9.75992 24.0001 9.52787 24.0866 9.34629 24.2437L5.00004 28V8H27V24Z",
|
|
3062
3097
|
fill: color
|
|
3063
3098
|
}
|
|
3064
3099
|
),
|
|
3065
|
-
/* @__PURE__ */ (0,
|
|
3100
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
3066
3101
|
"path",
|
|
3067
3102
|
{
|
|
3068
3103
|
d: "M21.1426 17.8027C21.1426 17.627 21.1152 17.4707 21.0605 17.334C21.0098 17.1973 20.918 17.0723 20.7852 16.959C20.6523 16.8457 20.4648 16.7363 20.2227 16.6309C19.9844 16.5215 19.6797 16.4102 19.3086 16.2969C18.9023 16.1719 18.5273 16.0332 18.1836 15.8809C17.8438 15.7246 17.5469 15.5449 17.293 15.3418C17.0391 15.1348 16.8418 14.8984 16.7012 14.6328C16.5605 14.3633 16.4902 14.0527 16.4902 13.7012C16.4902 13.3535 16.5625 13.0371 16.707 12.752C16.8555 12.4668 17.0645 12.2207 17.334 12.0137C17.6074 11.8027 17.9297 11.6406 18.3008 11.5273C18.6719 11.4102 19.082 11.3516 19.5312 11.3516C20.1641 11.3516 20.709 11.4688 21.166 11.7031C21.627 11.9375 21.9805 12.252 22.2266 12.6465C22.4766 13.041 22.6016 13.4766 22.6016 13.9531H21.1426C21.1426 13.6719 21.082 13.4238 20.9609 13.209C20.8438 12.9902 20.6641 12.8184 20.4219 12.6934C20.1836 12.5684 19.8809 12.5059 19.5137 12.5059C19.166 12.5059 18.877 12.5586 18.6465 12.6641C18.416 12.7695 18.2441 12.9121 18.1309 13.0918C18.0176 13.2715 17.9609 13.4746 17.9609 13.7012C17.9609 13.8613 17.998 14.0078 18.0723 14.1406C18.1465 14.2695 18.2598 14.3906 18.4121 14.5039C18.5645 14.6133 18.7559 14.7168 18.9863 14.8145C19.2168 14.9121 19.4883 15.0059 19.8008 15.0957C20.2734 15.2363 20.6855 15.3926 21.0371 15.5645C21.3887 15.7324 21.6816 15.9238 21.916 16.1387C22.1504 16.3535 22.3262 16.5977 22.4434 16.8711C22.5605 17.1406 22.6191 17.4473 22.6191 17.791C22.6191 18.1504 22.5469 18.4746 22.4023 18.7637C22.2578 19.0488 22.0508 19.293 21.7812 19.4961C21.5156 19.6953 21.1953 19.8496 20.8203 19.959C20.4492 20.0645 20.0352 20.1172 19.5781 20.1172C19.168 20.1172 18.7637 20.0625 18.3652 19.9531C17.9707 19.8438 17.6113 19.6777 17.2871 19.4551C16.9629 19.2285 16.7051 18.9473 16.5137 18.6113C16.3223 18.2715 16.2266 17.875 16.2266 17.4219H17.6973C17.6973 17.6992 17.7441 17.9355 17.8379 18.1309C17.9355 18.3262 18.0703 18.4863 18.2422 18.6113C18.4141 18.7324 18.6133 18.8223 18.8398 18.8809C19.0703 18.9395 19.3164 18.9688 19.5781 18.9688C19.9219 18.9688 20.209 18.9199 20.4395 18.8223C20.6738 18.7246 20.8496 18.5879 20.9668 18.4121C21.084 18.2363 21.1426 18.0332 21.1426 17.8027Z",
|
|
3069
3104
|
fill: color
|
|
3070
3105
|
}
|
|
3071
3106
|
),
|
|
3072
|
-
/* @__PURE__ */ (0,
|
|
3107
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
3073
3108
|
"path",
|
|
3074
3109
|
{
|
|
3075
3110
|
d: "M15.4512 18.834V20H10.9219V18.834H15.4512ZM11.3379 11.4688V20H9.86719V11.4688H11.3379ZM14.8594 15.0312V16.1797H10.9219V15.0312H14.8594ZM15.4219 11.4688V12.6406H10.9219V11.4688H15.4219Z",
|
|
@@ -3081,8 +3116,8 @@ var ChatES = ({ size, color }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)
|
|
|
3081
3116
|
);
|
|
3082
3117
|
|
|
3083
3118
|
// src/assets/icons/subjects/ChatPT.tsx
|
|
3084
|
-
var
|
|
3085
|
-
var ChatPT = ({ size, color }) => /* @__PURE__ */ (0,
|
|
3119
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
3120
|
+
var ChatPT = ({ size, color }) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
3086
3121
|
"svg",
|
|
3087
3122
|
{
|
|
3088
3123
|
width: size,
|
|
@@ -3091,21 +3126,21 @@ var ChatPT = ({ size, color }) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)
|
|
|
3091
3126
|
fill: "none",
|
|
3092
3127
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3093
3128
|
children: [
|
|
3094
|
-
/* @__PURE__ */ (0,
|
|
3129
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
3095
3130
|
"path",
|
|
3096
3131
|
{
|
|
3097
3132
|
d: "M27 6H5.00004C4.4696 6 3.9609 6.21071 3.58582 6.58579C3.21075 6.96086 3.00004 7.46957 3.00004 8V28C2.99773 28.3814 3.10562 28.7553 3.31074 29.0768C3.51585 29.3984 3.80947 29.6538 4.15629 29.8125C4.42057 29.9356 4.7085 29.9995 5.00004 30C5.46954 29.9989 5.92347 29.8315 6.28129 29.5275L6.29254 29.5187L10.375 26H27C27.5305 26 28.0392 25.7893 28.4142 25.4142C28.7893 25.0391 29 24.5304 29 24V8C29 7.46957 28.7893 6.96086 28.4142 6.58579C28.0392 6.21071 27.5305 6 27 6ZM27 24H10C9.75992 24.0001 9.52787 24.0866 9.34629 24.2437L5.00004 28V8H27V24Z",
|
|
3098
3133
|
fill: color
|
|
3099
3134
|
}
|
|
3100
3135
|
),
|
|
3101
|
-
/* @__PURE__ */ (0,
|
|
3136
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
3102
3137
|
"path",
|
|
3103
3138
|
{
|
|
3104
3139
|
d: "M21.1758 12V20.5312H19.7168V12H21.1758ZM23.8535 12V13.1719H17.0625V12H23.8535Z",
|
|
3105
3140
|
fill: color
|
|
3106
3141
|
}
|
|
3107
3142
|
),
|
|
3108
|
-
/* @__PURE__ */ (0,
|
|
3143
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
3109
3144
|
"path",
|
|
3110
3145
|
{
|
|
3111
3146
|
d: "M13.2402 17.3496H11.0195V16.1836H13.2402C13.627 16.1836 13.9395 16.1211 14.1777 15.9961C14.416 15.8711 14.5898 15.6992 14.6992 15.4805C14.8125 15.2578 14.8691 15.0039 14.8691 14.7188C14.8691 14.4492 14.8125 14.1973 14.6992 13.9629C14.5898 13.7246 14.416 13.5332 14.1777 13.3887C13.9395 13.2441 13.627 13.1719 13.2402 13.1719H11.4707V20.5312H10V12H13.2402C13.9004 12 14.4609 12.1172 14.9219 12.3516C15.3867 12.582 15.7402 12.9023 15.9824 13.3125C16.2246 13.7188 16.3457 14.1836 16.3457 14.707C16.3457 15.2578 16.2246 15.7305 15.9824 16.125C15.7402 16.5195 15.3867 16.8223 14.9219 17.0332C14.4609 17.2441 13.9004 17.3496 13.2402 17.3496Z",
|
|
@@ -3123,7 +3158,7 @@ var import_phosphor_react9 = require("phosphor-react");
|
|
|
3123
3158
|
// src/components/IconRender/IconRender.tsx
|
|
3124
3159
|
var import_react11 = require("react");
|
|
3125
3160
|
var PhosphorIcons = __toESM(require("phosphor-react"));
|
|
3126
|
-
var
|
|
3161
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
3127
3162
|
var IconRender = ({
|
|
3128
3163
|
iconName,
|
|
3129
3164
|
color = "#000000",
|
|
@@ -3133,14 +3168,14 @@ var IconRender = ({
|
|
|
3133
3168
|
if (typeof iconName === "string") {
|
|
3134
3169
|
switch (iconName) {
|
|
3135
3170
|
case "Chat_PT":
|
|
3136
|
-
return /* @__PURE__ */ (0,
|
|
3171
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ChatPT, { size, color });
|
|
3137
3172
|
case "Chat_EN":
|
|
3138
|
-
return /* @__PURE__ */ (0,
|
|
3173
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ChatEN, { size, color });
|
|
3139
3174
|
case "Chat_ES":
|
|
3140
|
-
return /* @__PURE__ */ (0,
|
|
3175
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ChatES, { size, color });
|
|
3141
3176
|
default: {
|
|
3142
3177
|
const IconComponent = PhosphorIcons[iconName] || PhosphorIcons.Question;
|
|
3143
|
-
return /* @__PURE__ */ (0,
|
|
3178
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(IconComponent, { size, color, weight });
|
|
3144
3179
|
}
|
|
3145
3180
|
}
|
|
3146
3181
|
} else {
|
|
@@ -3153,7 +3188,7 @@ var IconRender = ({
|
|
|
3153
3188
|
var IconRender_default = IconRender;
|
|
3154
3189
|
|
|
3155
3190
|
// src/components/Card/Card.tsx
|
|
3156
|
-
var
|
|
3191
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
3157
3192
|
var CARD_BASE_CLASSES = {
|
|
3158
3193
|
default: "w-full bg-background border border-border-50 rounded-xl",
|
|
3159
3194
|
compact: "w-full bg-background border border-border-50 rounded-lg",
|
|
@@ -3195,7 +3230,7 @@ var CardBase = (0, import_react12.forwardRef)(
|
|
|
3195
3230
|
const minHeightClasses = CARD_MIN_HEIGHT_CLASSES[minHeight];
|
|
3196
3231
|
const layoutClasses = CARD_LAYOUT_CLASSES[layout];
|
|
3197
3232
|
const cursorClasses = CARD_CURSOR_CLASSES[cursor];
|
|
3198
|
-
return /* @__PURE__ */ (0,
|
|
3233
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
3199
3234
|
"div",
|
|
3200
3235
|
{
|
|
3201
3236
|
ref,
|
|
@@ -3253,7 +3288,7 @@ var CardActivitiesResults = (0, import_react12.forwardRef)(
|
|
|
3253
3288
|
const actionIconClasses = ACTION_ICON_CLASSES[action];
|
|
3254
3289
|
const actionSubTitleClasses = ACTION_SUBTITLE_CLASSES[action];
|
|
3255
3290
|
const actionHeaderClasses = ACTION_HEADER_CLASSES[action];
|
|
3256
|
-
return /* @__PURE__ */ (0,
|
|
3291
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
3257
3292
|
"div",
|
|
3258
3293
|
{
|
|
3259
3294
|
ref,
|
|
@@ -3263,7 +3298,7 @@ var CardActivitiesResults = (0, import_react12.forwardRef)(
|
|
|
3263
3298
|
),
|
|
3264
3299
|
...props,
|
|
3265
3300
|
children: [
|
|
3266
|
-
/* @__PURE__ */ (0,
|
|
3301
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
3267
3302
|
"div",
|
|
3268
3303
|
{
|
|
3269
3304
|
className: cn(
|
|
@@ -3272,7 +3307,7 @@ var CardActivitiesResults = (0, import_react12.forwardRef)(
|
|
|
3272
3307
|
extended ? "rounded-t-xl" : "rounded-xl"
|
|
3273
3308
|
),
|
|
3274
3309
|
children: [
|
|
3275
|
-
/* @__PURE__ */ (0,
|
|
3310
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
3276
3311
|
"span",
|
|
3277
3312
|
{
|
|
3278
3313
|
className: cn(
|
|
@@ -3282,7 +3317,7 @@ var CardActivitiesResults = (0, import_react12.forwardRef)(
|
|
|
3282
3317
|
children: icon
|
|
3283
3318
|
}
|
|
3284
3319
|
),
|
|
3285
|
-
/* @__PURE__ */ (0,
|
|
3320
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
3286
3321
|
Text_default,
|
|
3287
3322
|
{
|
|
3288
3323
|
size: "2xs",
|
|
@@ -3291,7 +3326,7 @@ var CardActivitiesResults = (0, import_react12.forwardRef)(
|
|
|
3291
3326
|
children: title
|
|
3292
3327
|
}
|
|
3293
3328
|
),
|
|
3294
|
-
/* @__PURE__ */ (0,
|
|
3329
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
3295
3330
|
"p",
|
|
3296
3331
|
{
|
|
3297
3332
|
className: cn("text-lg font-bold truncate", actionSubTitleClasses),
|
|
@@ -3301,8 +3336,8 @@ var CardActivitiesResults = (0, import_react12.forwardRef)(
|
|
|
3301
3336
|
]
|
|
3302
3337
|
}
|
|
3303
3338
|
),
|
|
3304
|
-
extended && /* @__PURE__ */ (0,
|
|
3305
|
-
/* @__PURE__ */ (0,
|
|
3339
|
+
extended && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex flex-col items-center gap-2.5 pb-9.5 pt-2.5", children: [
|
|
3340
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
3306
3341
|
"p",
|
|
3307
3342
|
{
|
|
3308
3343
|
className: cn(
|
|
@@ -3312,7 +3347,7 @@ var CardActivitiesResults = (0, import_react12.forwardRef)(
|
|
|
3312
3347
|
children: header
|
|
3313
3348
|
}
|
|
3314
3349
|
),
|
|
3315
|
-
/* @__PURE__ */ (0,
|
|
3350
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Badge_default, { size: "large", action: "info", children: description })
|
|
3316
3351
|
] })
|
|
3317
3352
|
]
|
|
3318
3353
|
}
|
|
@@ -3331,7 +3366,7 @@ var CardQuestions = (0, import_react12.forwardRef)(
|
|
|
3331
3366
|
const isDone = state === "done";
|
|
3332
3367
|
const stateLabel = isDone ? "Realizado" : "N\xE3o Realizado";
|
|
3333
3368
|
const buttonLabel = isDone ? "Ver Resultado" : "Responder";
|
|
3334
|
-
return /* @__PURE__ */ (0,
|
|
3369
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
3335
3370
|
CardBase,
|
|
3336
3371
|
{
|
|
3337
3372
|
ref,
|
|
@@ -3341,9 +3376,9 @@ var CardQuestions = (0, import_react12.forwardRef)(
|
|
|
3341
3376
|
className: cn("justify-between gap-4", className),
|
|
3342
3377
|
...props,
|
|
3343
3378
|
children: [
|
|
3344
|
-
/* @__PURE__ */ (0,
|
|
3345
|
-
/* @__PURE__ */ (0,
|
|
3346
|
-
/* @__PURE__ */ (0,
|
|
3379
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("section", { className: "flex flex-col gap-1 flex-1 min-w-0", children: [
|
|
3380
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: "font-bold text-xs text-text-950 truncate", children: header }),
|
|
3381
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "flex flex-row gap-6 items-center", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
3347
3382
|
Badge_default,
|
|
3348
3383
|
{
|
|
3349
3384
|
size: "medium",
|
|
@@ -3353,7 +3388,7 @@ var CardQuestions = (0, import_react12.forwardRef)(
|
|
|
3353
3388
|
}
|
|
3354
3389
|
) })
|
|
3355
3390
|
] }),
|
|
3356
|
-
/* @__PURE__ */ (0,
|
|
3391
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "flex-shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
3357
3392
|
Button_default,
|
|
3358
3393
|
{
|
|
3359
3394
|
size: "extra-small",
|
|
@@ -3384,19 +3419,19 @@ var CardProgress = (0, import_react12.forwardRef)(
|
|
|
3384
3419
|
}, ref) => {
|
|
3385
3420
|
const isHorizontal = direction === "horizontal";
|
|
3386
3421
|
const contentComponent = {
|
|
3387
|
-
horizontal: /* @__PURE__ */ (0,
|
|
3388
|
-
showDates && /* @__PURE__ */ (0,
|
|
3389
|
-
initialDate && /* @__PURE__ */ (0,
|
|
3390
|
-
/* @__PURE__ */ (0,
|
|
3391
|
-
/* @__PURE__ */ (0,
|
|
3422
|
+
horizontal: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_jsx_runtime21.Fragment, { children: [
|
|
3423
|
+
showDates && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex flex-row gap-6 items-center", children: [
|
|
3424
|
+
initialDate && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("span", { className: "flex flex-row gap-1 items-center text-2xs", children: [
|
|
3425
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: "text-text-800 font-semibold", children: "In\xEDcio" }),
|
|
3426
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: "text-text-600", children: initialDate })
|
|
3392
3427
|
] }),
|
|
3393
|
-
endDate && /* @__PURE__ */ (0,
|
|
3394
|
-
/* @__PURE__ */ (0,
|
|
3395
|
-
/* @__PURE__ */ (0,
|
|
3428
|
+
endDate && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("span", { className: "flex flex-row gap-1 items-center text-2xs", children: [
|
|
3429
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: "text-text-800 font-semibold", children: "Fim" }),
|
|
3430
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: "text-text-600", children: endDate })
|
|
3396
3431
|
] })
|
|
3397
3432
|
] }),
|
|
3398
|
-
/* @__PURE__ */ (0,
|
|
3399
|
-
/* @__PURE__ */ (0,
|
|
3433
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("span", { className: "grid grid-cols-[1fr_auto] items-center gap-2", children: [
|
|
3434
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
3400
3435
|
ProgressBar_default,
|
|
3401
3436
|
{
|
|
3402
3437
|
size: "small",
|
|
@@ -3405,7 +3440,7 @@ var CardProgress = (0, import_react12.forwardRef)(
|
|
|
3405
3440
|
"data-testid": "progress-bar"
|
|
3406
3441
|
}
|
|
3407
3442
|
),
|
|
3408
|
-
/* @__PURE__ */ (0,
|
|
3443
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
3409
3444
|
Text_default,
|
|
3410
3445
|
{
|
|
3411
3446
|
size: "xs",
|
|
@@ -3421,9 +3456,9 @@ var CardProgress = (0, import_react12.forwardRef)(
|
|
|
3421
3456
|
)
|
|
3422
3457
|
] })
|
|
3423
3458
|
] }),
|
|
3424
|
-
vertical: /* @__PURE__ */ (0,
|
|
3459
|
+
vertical: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: "text-sm text-text-800", children: subhead })
|
|
3425
3460
|
};
|
|
3426
|
-
return /* @__PURE__ */ (0,
|
|
3461
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
3427
3462
|
CardBase,
|
|
3428
3463
|
{
|
|
3429
3464
|
ref,
|
|
@@ -3434,7 +3469,7 @@ var CardProgress = (0, import_react12.forwardRef)(
|
|
|
3434
3469
|
className: cn(isHorizontal ? "h-20" : "", className),
|
|
3435
3470
|
...props,
|
|
3436
3471
|
children: [
|
|
3437
|
-
/* @__PURE__ */ (0,
|
|
3472
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
3438
3473
|
"div",
|
|
3439
3474
|
{
|
|
3440
3475
|
className: cn(
|
|
@@ -3447,7 +3482,7 @@ var CardProgress = (0, import_react12.forwardRef)(
|
|
|
3447
3482
|
children: icon
|
|
3448
3483
|
}
|
|
3449
3484
|
),
|
|
3450
|
-
/* @__PURE__ */ (0,
|
|
3485
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
3451
3486
|
"div",
|
|
3452
3487
|
{
|
|
3453
3488
|
className: cn(
|
|
@@ -3455,7 +3490,7 @@ var CardProgress = (0, import_react12.forwardRef)(
|
|
|
3455
3490
|
!isHorizontal && "gap-4"
|
|
3456
3491
|
),
|
|
3457
3492
|
children: [
|
|
3458
|
-
/* @__PURE__ */ (0,
|
|
3493
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Text_default, { size: "sm", weight: "bold", className: "text-text-950 truncate", children: header }),
|
|
3459
3494
|
contentComponent[direction]
|
|
3460
3495
|
]
|
|
3461
3496
|
}
|
|
@@ -3475,7 +3510,7 @@ var CardTopic = (0, import_react12.forwardRef)(
|
|
|
3475
3510
|
className = "",
|
|
3476
3511
|
...props
|
|
3477
3512
|
}, ref) => {
|
|
3478
|
-
return /* @__PURE__ */ (0,
|
|
3513
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
3479
3514
|
CardBase,
|
|
3480
3515
|
{
|
|
3481
3516
|
ref,
|
|
@@ -3486,13 +3521,13 @@ var CardTopic = (0, import_react12.forwardRef)(
|
|
|
3486
3521
|
className: cn("justify-center gap-2 py-2 px-4", className),
|
|
3487
3522
|
...props,
|
|
3488
3523
|
children: [
|
|
3489
|
-
subHead && /* @__PURE__ */ (0,
|
|
3490
|
-
/* @__PURE__ */ (0,
|
|
3491
|
-
index < subHead.length - 1 && /* @__PURE__ */ (0,
|
|
3524
|
+
subHead && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "text-text-600 text-2xs flex flex-row gap-1", children: subHead.map((text, index) => /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_react12.Fragment, { children: [
|
|
3525
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { children: text }),
|
|
3526
|
+
index < subHead.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { children: "\u2022" })
|
|
3492
3527
|
] }, `${text} - ${index}`)) }),
|
|
3493
|
-
/* @__PURE__ */ (0,
|
|
3494
|
-
/* @__PURE__ */ (0,
|
|
3495
|
-
/* @__PURE__ */ (0,
|
|
3528
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: "text-sm text-text-950 font-bold truncate", children: header }),
|
|
3529
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("span", { className: "grid grid-cols-[1fr_auto] items-center gap-2", children: [
|
|
3530
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
3496
3531
|
ProgressBar_default,
|
|
3497
3532
|
{
|
|
3498
3533
|
size: "small",
|
|
@@ -3501,7 +3536,7 @@ var CardTopic = (0, import_react12.forwardRef)(
|
|
|
3501
3536
|
"data-testid": "progress-bar"
|
|
3502
3537
|
}
|
|
3503
3538
|
),
|
|
3504
|
-
showPercentage && /* @__PURE__ */ (0,
|
|
3539
|
+
showPercentage && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
3505
3540
|
Text_default,
|
|
3506
3541
|
{
|
|
3507
3542
|
size: "xs",
|
|
@@ -3535,7 +3570,7 @@ var CardPerformance = (0, import_react12.forwardRef)(
|
|
|
3535
3570
|
...props
|
|
3536
3571
|
}, ref) => {
|
|
3537
3572
|
const hasProgress = progress !== void 0;
|
|
3538
|
-
return /* @__PURE__ */ (0,
|
|
3573
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
3539
3574
|
CardBase,
|
|
3540
3575
|
{
|
|
3541
3576
|
ref,
|
|
@@ -3549,10 +3584,10 @@ var CardPerformance = (0, import_react12.forwardRef)(
|
|
|
3549
3584
|
onClick: () => actionVariant == "caret" && onClickButton?.(valueButton),
|
|
3550
3585
|
...props,
|
|
3551
3586
|
children: [
|
|
3552
|
-
/* @__PURE__ */ (0,
|
|
3553
|
-
/* @__PURE__ */ (0,
|
|
3554
|
-
/* @__PURE__ */ (0,
|
|
3555
|
-
actionVariant === "button" && /* @__PURE__ */ (0,
|
|
3587
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "w-full flex flex-col justify-between gap-2", children: [
|
|
3588
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex flex-row justify-between items-center gap-2", children: [
|
|
3589
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: "text-lg font-bold text-text-950 truncate flex-1 min-w-0", children: header }),
|
|
3590
|
+
actionVariant === "button" && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
3556
3591
|
Button_default,
|
|
3557
3592
|
{
|
|
3558
3593
|
variant: "outline",
|
|
@@ -3563,16 +3598,16 @@ var CardPerformance = (0, import_react12.forwardRef)(
|
|
|
3563
3598
|
}
|
|
3564
3599
|
)
|
|
3565
3600
|
] }),
|
|
3566
|
-
/* @__PURE__ */ (0,
|
|
3601
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "w-full", children: hasProgress ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
3567
3602
|
ProgressBar_default,
|
|
3568
3603
|
{
|
|
3569
3604
|
value: progress,
|
|
3570
3605
|
label: `${progress}% ${labelProgress}`,
|
|
3571
3606
|
variant: progressVariant
|
|
3572
3607
|
}
|
|
3573
|
-
) : /* @__PURE__ */ (0,
|
|
3608
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: "text-xs text-text-600 truncate", children: description }) })
|
|
3574
3609
|
] }),
|
|
3575
|
-
actionVariant == "caret" && /* @__PURE__ */ (0,
|
|
3610
|
+
actionVariant == "caret" && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
3576
3611
|
import_phosphor_react9.CaretRight,
|
|
3577
3612
|
{
|
|
3578
3613
|
className: "size-4.5 text-text-800 cursor-pointer",
|
|
@@ -3596,7 +3631,7 @@ var CardResults = (0, import_react12.forwardRef)(
|
|
|
3596
3631
|
...props
|
|
3597
3632
|
}, ref) => {
|
|
3598
3633
|
const isRow = direction == "row";
|
|
3599
|
-
return /* @__PURE__ */ (0,
|
|
3634
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
3600
3635
|
CardBase,
|
|
3601
3636
|
{
|
|
3602
3637
|
ref,
|
|
@@ -3606,7 +3641,7 @@ var CardResults = (0, import_react12.forwardRef)(
|
|
|
3606
3641
|
className: cn("items-stretch cursor-pointer pr-4", className),
|
|
3607
3642
|
...props,
|
|
3608
3643
|
children: [
|
|
3609
|
-
/* @__PURE__ */ (0,
|
|
3644
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
3610
3645
|
"div",
|
|
3611
3646
|
{
|
|
3612
3647
|
className: cn(
|
|
@@ -3615,11 +3650,11 @@ var CardResults = (0, import_react12.forwardRef)(
|
|
|
3615
3650
|
style: {
|
|
3616
3651
|
backgroundColor: color
|
|
3617
3652
|
},
|
|
3618
|
-
children: /* @__PURE__ */ (0,
|
|
3653
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(IconRender_default, { iconName: icon, color: "currentColor", size: 20 })
|
|
3619
3654
|
}
|
|
3620
3655
|
),
|
|
3621
|
-
/* @__PURE__ */ (0,
|
|
3622
|
-
/* @__PURE__ */ (0,
|
|
3656
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "w-full flex flex-row justify-between items-center", children: [
|
|
3657
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
3623
3658
|
"div",
|
|
3624
3659
|
{
|
|
3625
3660
|
className: cn(
|
|
@@ -3627,28 +3662,28 @@ var CardResults = (0, import_react12.forwardRef)(
|
|
|
3627
3662
|
isRow ? "flex-row items-center gap-2" : "flex-col"
|
|
3628
3663
|
),
|
|
3629
3664
|
children: [
|
|
3630
|
-
/* @__PURE__ */ (0,
|
|
3631
|
-
/* @__PURE__ */ (0,
|
|
3632
|
-
/* @__PURE__ */ (0,
|
|
3665
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: "text-sm font-bold text-text-950 flex-1", children: header }),
|
|
3666
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("span", { className: "flex flex-wrap flex-row gap-1 items-center", children: [
|
|
3667
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
3633
3668
|
Badge_default,
|
|
3634
3669
|
{
|
|
3635
3670
|
action: "success",
|
|
3636
3671
|
variant: "solid",
|
|
3637
3672
|
size: "large",
|
|
3638
|
-
iconLeft: /* @__PURE__ */ (0,
|
|
3673
|
+
iconLeft: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_phosphor_react9.CheckCircle, {}),
|
|
3639
3674
|
children: [
|
|
3640
3675
|
correct_answers,
|
|
3641
3676
|
" Corretas"
|
|
3642
3677
|
]
|
|
3643
3678
|
}
|
|
3644
3679
|
),
|
|
3645
|
-
/* @__PURE__ */ (0,
|
|
3680
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
3646
3681
|
Badge_default,
|
|
3647
3682
|
{
|
|
3648
3683
|
action: "error",
|
|
3649
3684
|
variant: "solid",
|
|
3650
3685
|
size: "large",
|
|
3651
|
-
iconLeft: /* @__PURE__ */ (0,
|
|
3686
|
+
iconLeft: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_phosphor_react9.XCircle, {}),
|
|
3652
3687
|
children: [
|
|
3653
3688
|
incorrect_answers,
|
|
3654
3689
|
" Incorretas"
|
|
@@ -3659,7 +3694,7 @@ var CardResults = (0, import_react12.forwardRef)(
|
|
|
3659
3694
|
]
|
|
3660
3695
|
}
|
|
3661
3696
|
),
|
|
3662
|
-
/* @__PURE__ */ (0,
|
|
3697
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_phosphor_react9.CaretRight, { className: "min-w-6 min-h-6 text-text-800" })
|
|
3663
3698
|
] })
|
|
3664
3699
|
]
|
|
3665
3700
|
}
|
|
@@ -3685,13 +3720,13 @@ var CardStatus = (0, import_react12.forwardRef)(
|
|
|
3685
3720
|
const getIconBadge = (status2) => {
|
|
3686
3721
|
switch (status2) {
|
|
3687
3722
|
case "correct":
|
|
3688
|
-
return /* @__PURE__ */ (0,
|
|
3723
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_phosphor_react9.CheckCircle, {});
|
|
3689
3724
|
case "incorrect":
|
|
3690
|
-
return /* @__PURE__ */ (0,
|
|
3725
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_phosphor_react9.XCircle, {});
|
|
3691
3726
|
case "pending":
|
|
3692
|
-
return /* @__PURE__ */ (0,
|
|
3727
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_phosphor_react9.Clock, {});
|
|
3693
3728
|
default:
|
|
3694
|
-
return /* @__PURE__ */ (0,
|
|
3729
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_phosphor_react9.XCircle, {});
|
|
3695
3730
|
}
|
|
3696
3731
|
};
|
|
3697
3732
|
const getActionBadge = (status2) => {
|
|
@@ -3706,7 +3741,7 @@ var CardStatus = (0, import_react12.forwardRef)(
|
|
|
3706
3741
|
return "info";
|
|
3707
3742
|
}
|
|
3708
3743
|
};
|
|
3709
|
-
return /* @__PURE__ */ (0,
|
|
3744
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
3710
3745
|
CardBase,
|
|
3711
3746
|
{
|
|
3712
3747
|
ref,
|
|
@@ -3715,10 +3750,10 @@ var CardStatus = (0, import_react12.forwardRef)(
|
|
|
3715
3750
|
minHeight: "medium",
|
|
3716
3751
|
className: cn("items-center cursor-pointer", className),
|
|
3717
3752
|
...props,
|
|
3718
|
-
children: /* @__PURE__ */ (0,
|
|
3719
|
-
/* @__PURE__ */ (0,
|
|
3720
|
-
/* @__PURE__ */ (0,
|
|
3721
|
-
status && /* @__PURE__ */ (0,
|
|
3753
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex justify-between w-full h-full flex-row items-center gap-2", children: [
|
|
3754
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: "text-sm font-bold text-text-950 truncate flex-1 min-w-0", children: header }),
|
|
3755
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("span", { className: "flex flex-row gap-1 items-center flex-shrink-0", children: [
|
|
3756
|
+
status && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
3722
3757
|
Badge_default,
|
|
3723
3758
|
{
|
|
3724
3759
|
action: getActionBadge(status),
|
|
@@ -3728,9 +3763,9 @@ var CardStatus = (0, import_react12.forwardRef)(
|
|
|
3728
3763
|
children: getLabelBadge(status)
|
|
3729
3764
|
}
|
|
3730
3765
|
),
|
|
3731
|
-
label && /* @__PURE__ */ (0,
|
|
3766
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: "text-sm text-text-800", children: label })
|
|
3732
3767
|
] }),
|
|
3733
|
-
/* @__PURE__ */ (0,
|
|
3768
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_phosphor_react9.CaretRight, { className: "min-w-6 min-h-6 text-text-800 cursor-pointer flex-shrink-0 ml-2" })
|
|
3734
3769
|
] })
|
|
3735
3770
|
}
|
|
3736
3771
|
);
|
|
@@ -3738,7 +3773,7 @@ var CardStatus = (0, import_react12.forwardRef)(
|
|
|
3738
3773
|
);
|
|
3739
3774
|
var CardSettings = (0, import_react12.forwardRef)(
|
|
3740
3775
|
({ header, className, icon, ...props }, ref) => {
|
|
3741
|
-
return /* @__PURE__ */ (0,
|
|
3776
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
3742
3777
|
CardBase,
|
|
3743
3778
|
{
|
|
3744
3779
|
ref,
|
|
@@ -3751,9 +3786,9 @@ var CardSettings = (0, import_react12.forwardRef)(
|
|
|
3751
3786
|
),
|
|
3752
3787
|
...props,
|
|
3753
3788
|
children: [
|
|
3754
|
-
/* @__PURE__ */ (0,
|
|
3755
|
-
/* @__PURE__ */ (0,
|
|
3756
|
-
/* @__PURE__ */ (0,
|
|
3789
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "[&>svg]:size-6", children: icon }),
|
|
3790
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: "w-full text-sm truncate", children: header }),
|
|
3791
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_phosphor_react9.CaretRight, { size: 24, className: "cursor-pointer" })
|
|
3757
3792
|
]
|
|
3758
3793
|
}
|
|
3759
3794
|
);
|
|
@@ -3761,7 +3796,7 @@ var CardSettings = (0, import_react12.forwardRef)(
|
|
|
3761
3796
|
);
|
|
3762
3797
|
var CardSupport = (0, import_react12.forwardRef)(
|
|
3763
3798
|
({ header, className, direction = "col", children, ...props }, ref) => {
|
|
3764
|
-
return /* @__PURE__ */ (0,
|
|
3799
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
3765
3800
|
CardBase,
|
|
3766
3801
|
{
|
|
3767
3802
|
ref,
|
|
@@ -3774,7 +3809,7 @@ var CardSupport = (0, import_react12.forwardRef)(
|
|
|
3774
3809
|
),
|
|
3775
3810
|
...props,
|
|
3776
3811
|
children: [
|
|
3777
|
-
/* @__PURE__ */ (0,
|
|
3812
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
3778
3813
|
"div",
|
|
3779
3814
|
{
|
|
3780
3815
|
className: cn(
|
|
@@ -3782,12 +3817,12 @@ var CardSupport = (0, import_react12.forwardRef)(
|
|
|
3782
3817
|
direction == "col" ? "flex-col" : "flex-row items-center"
|
|
3783
3818
|
),
|
|
3784
3819
|
children: [
|
|
3785
|
-
/* @__PURE__ */ (0,
|
|
3786
|
-
/* @__PURE__ */ (0,
|
|
3820
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "w-full min-w-0", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: "text-sm text-text-950 font-bold truncate", children: header }) }),
|
|
3821
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "flex flex-row gap-1", children })
|
|
3787
3822
|
]
|
|
3788
3823
|
}
|
|
3789
3824
|
),
|
|
3790
|
-
/* @__PURE__ */ (0,
|
|
3825
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_phosphor_react9.CaretRight, { className: "text-text-800 cursor-pointer", size: 24 })
|
|
3791
3826
|
]
|
|
3792
3827
|
}
|
|
3793
3828
|
);
|
|
@@ -3807,7 +3842,7 @@ var CardForum = (0, import_react12.forwardRef)(
|
|
|
3807
3842
|
hour,
|
|
3808
3843
|
...props
|
|
3809
3844
|
}, ref) => {
|
|
3810
|
-
return /* @__PURE__ */ (0,
|
|
3845
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
3811
3846
|
CardBase,
|
|
3812
3847
|
{
|
|
3813
3848
|
ref,
|
|
@@ -3818,7 +3853,7 @@ var CardForum = (0, import_react12.forwardRef)(
|
|
|
3818
3853
|
className: cn("w-auto h-auto gap-3", className),
|
|
3819
3854
|
...props,
|
|
3820
3855
|
children: [
|
|
3821
|
-
/* @__PURE__ */ (0,
|
|
3856
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
3822
3857
|
"button",
|
|
3823
3858
|
{
|
|
3824
3859
|
type: "button",
|
|
@@ -3827,18 +3862,18 @@ var CardForum = (0, import_react12.forwardRef)(
|
|
|
3827
3862
|
className: "min-w-8 h-8 rounded-full bg-background-950"
|
|
3828
3863
|
}
|
|
3829
3864
|
),
|
|
3830
|
-
/* @__PURE__ */ (0,
|
|
3831
|
-
/* @__PURE__ */ (0,
|
|
3832
|
-
/* @__PURE__ */ (0,
|
|
3833
|
-
/* @__PURE__ */ (0,
|
|
3865
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex flex-col gap-2 flex-1 min-w-0", children: [
|
|
3866
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex flex-row gap-1 items-center flex-wrap", children: [
|
|
3867
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: "text-xs font-semibold text-primary-700 truncate", children: title }),
|
|
3868
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("p", { className: "text-xs text-text-600", children: [
|
|
3834
3869
|
"\u2022 ",
|
|
3835
3870
|
date,
|
|
3836
3871
|
" \u2022 ",
|
|
3837
3872
|
hour
|
|
3838
3873
|
] })
|
|
3839
3874
|
] }),
|
|
3840
|
-
/* @__PURE__ */ (0,
|
|
3841
|
-
/* @__PURE__ */ (0,
|
|
3875
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: "text-text-950 text-sm line-clamp-2 truncate", children: content }),
|
|
3876
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
3842
3877
|
"button",
|
|
3843
3878
|
{
|
|
3844
3879
|
type: "button",
|
|
@@ -3846,8 +3881,8 @@ var CardForum = (0, import_react12.forwardRef)(
|
|
|
3846
3881
|
onClick: () => onClickComments?.(valueComments),
|
|
3847
3882
|
className: "text-text-600 flex flex-row gap-2 items-center",
|
|
3848
3883
|
children: [
|
|
3849
|
-
/* @__PURE__ */ (0,
|
|
3850
|
-
/* @__PURE__ */ (0,
|
|
3884
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_phosphor_react9.ChatCircleText, { "aria-hidden": "true", size: 16 }),
|
|
3885
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("p", { className: "text-xs", children: [
|
|
3851
3886
|
comments,
|
|
3852
3887
|
" respostas"
|
|
3853
3888
|
] })
|
|
@@ -3950,12 +3985,12 @@ var CardAudio = (0, import_react12.forwardRef)(
|
|
|
3950
3985
|
};
|
|
3951
3986
|
const getVolumeIcon = () => {
|
|
3952
3987
|
if (volume === 0) {
|
|
3953
|
-
return /* @__PURE__ */ (0,
|
|
3988
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_phosphor_react9.SpeakerSimpleX, { size: 24 });
|
|
3954
3989
|
}
|
|
3955
3990
|
if (volume < 0.5) {
|
|
3956
|
-
return /* @__PURE__ */ (0,
|
|
3991
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_phosphor_react9.SpeakerLow, { size: 24 });
|
|
3957
3992
|
}
|
|
3958
|
-
return /* @__PURE__ */ (0,
|
|
3993
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_phosphor_react9.SpeakerHigh, { size: 24 });
|
|
3959
3994
|
};
|
|
3960
3995
|
(0, import_react12.useEffect)(() => {
|
|
3961
3996
|
const handleClickOutside = (event) => {
|
|
@@ -3971,7 +4006,7 @@ var CardAudio = (0, import_react12.forwardRef)(
|
|
|
3971
4006
|
document.removeEventListener("mousedown", handleClickOutside);
|
|
3972
4007
|
};
|
|
3973
4008
|
}, []);
|
|
3974
|
-
return /* @__PURE__ */ (0,
|
|
4009
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
3975
4010
|
CardBase,
|
|
3976
4011
|
{
|
|
3977
4012
|
ref,
|
|
@@ -3984,7 +4019,7 @@ var CardAudio = (0, import_react12.forwardRef)(
|
|
|
3984
4019
|
),
|
|
3985
4020
|
...props,
|
|
3986
4021
|
children: [
|
|
3987
|
-
/* @__PURE__ */ (0,
|
|
4022
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
3988
4023
|
"audio",
|
|
3989
4024
|
{
|
|
3990
4025
|
ref: audioRef,
|
|
@@ -3996,7 +4031,7 @@ var CardAudio = (0, import_react12.forwardRef)(
|
|
|
3996
4031
|
onEnded: handleEnded,
|
|
3997
4032
|
"data-testid": "audio-element",
|
|
3998
4033
|
"aria-label": title,
|
|
3999
|
-
children: tracks ? tracks.map((track) => /* @__PURE__ */ (0,
|
|
4034
|
+
children: tracks ? tracks.map((track) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
4000
4035
|
"track",
|
|
4001
4036
|
{
|
|
4002
4037
|
kind: track.kind,
|
|
@@ -4006,7 +4041,7 @@ var CardAudio = (0, import_react12.forwardRef)(
|
|
|
4006
4041
|
default: track.default
|
|
4007
4042
|
},
|
|
4008
4043
|
track.src
|
|
4009
|
-
)) : /* @__PURE__ */ (0,
|
|
4044
|
+
)) : /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
4010
4045
|
"track",
|
|
4011
4046
|
{
|
|
4012
4047
|
kind: "captions",
|
|
@@ -4017,7 +4052,7 @@ var CardAudio = (0, import_react12.forwardRef)(
|
|
|
4017
4052
|
)
|
|
4018
4053
|
}
|
|
4019
4054
|
),
|
|
4020
|
-
/* @__PURE__ */ (0,
|
|
4055
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
4021
4056
|
"button",
|
|
4022
4057
|
{
|
|
4023
4058
|
type: "button",
|
|
@@ -4025,14 +4060,14 @@ var CardAudio = (0, import_react12.forwardRef)(
|
|
|
4025
4060
|
disabled: !src,
|
|
4026
4061
|
className: "cursor-pointer text-text-950 hover:text-primary-600 disabled:text-text-400 disabled:cursor-not-allowed",
|
|
4027
4062
|
"aria-label": isPlaying ? "Pausar" : "Reproduzir",
|
|
4028
|
-
children: isPlaying ? /* @__PURE__ */ (0,
|
|
4029
|
-
/* @__PURE__ */ (0,
|
|
4030
|
-
/* @__PURE__ */ (0,
|
|
4031
|
-
] }) }) : /* @__PURE__ */ (0,
|
|
4063
|
+
children: isPlaying ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "w-6 h-6 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex gap-0.5", children: [
|
|
4064
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "w-1 h-4 bg-current rounded-sm" }),
|
|
4065
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "w-1 h-4 bg-current rounded-sm" })
|
|
4066
|
+
] }) }) : /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_phosphor_react9.Play, { size: 24 })
|
|
4032
4067
|
}
|
|
4033
4068
|
),
|
|
4034
|
-
/* @__PURE__ */ (0,
|
|
4035
|
-
/* @__PURE__ */ (0,
|
|
4069
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: "text-text-800 text-md font-medium min-w-[2.5rem]", children: formatTime(currentTime) }),
|
|
4070
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "flex-1 relative", "data-testid": "progress-bar", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
4036
4071
|
"button",
|
|
4037
4072
|
{
|
|
4038
4073
|
type: "button",
|
|
@@ -4047,7 +4082,7 @@ var CardAudio = (0, import_react12.forwardRef)(
|
|
|
4047
4082
|
}
|
|
4048
4083
|
},
|
|
4049
4084
|
"aria-label": "Barra de progresso do \xE1udio",
|
|
4050
|
-
children: /* @__PURE__ */ (0,
|
|
4085
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
4051
4086
|
"div",
|
|
4052
4087
|
{
|
|
4053
4088
|
className: "h-full bg-primary-600 rounded-full transition-all duration-100",
|
|
@@ -4058,19 +4093,19 @@ var CardAudio = (0, import_react12.forwardRef)(
|
|
|
4058
4093
|
)
|
|
4059
4094
|
}
|
|
4060
4095
|
) }),
|
|
4061
|
-
/* @__PURE__ */ (0,
|
|
4062
|
-
/* @__PURE__ */ (0,
|
|
4063
|
-
/* @__PURE__ */ (0,
|
|
4096
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: "text-text-800 text-md font-medium min-w-[2.5rem]", children: formatTime(duration) }),
|
|
4097
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "relative h-6", ref: volumeControlRef, children: [
|
|
4098
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
4064
4099
|
"button",
|
|
4065
4100
|
{
|
|
4066
4101
|
type: "button",
|
|
4067
4102
|
onClick: toggleVolumeControl,
|
|
4068
4103
|
className: "cursor-pointer text-text-950 hover:text-primary-600",
|
|
4069
4104
|
"aria-label": "Controle de volume",
|
|
4070
|
-
children: /* @__PURE__ */ (0,
|
|
4105
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "w-6 h-6 flex items-center justify-center", children: getVolumeIcon() })
|
|
4071
4106
|
}
|
|
4072
4107
|
),
|
|
4073
|
-
showVolumeControl && /* @__PURE__ */ (0,
|
|
4108
|
+
showVolumeControl && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
4074
4109
|
"button",
|
|
4075
4110
|
{
|
|
4076
4111
|
type: "button",
|
|
@@ -4080,7 +4115,7 @@ var CardAudio = (0, import_react12.forwardRef)(
|
|
|
4080
4115
|
setShowVolumeControl(false);
|
|
4081
4116
|
}
|
|
4082
4117
|
},
|
|
4083
|
-
children: /* @__PURE__ */ (0,
|
|
4118
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
4084
4119
|
"input",
|
|
4085
4120
|
{
|
|
4086
4121
|
type: "range",
|
|
@@ -4121,22 +4156,22 @@ var CardAudio = (0, import_react12.forwardRef)(
|
|
|
4121
4156
|
}
|
|
4122
4157
|
)
|
|
4123
4158
|
] }),
|
|
4124
|
-
/* @__PURE__ */ (0,
|
|
4125
|
-
/* @__PURE__ */ (0,
|
|
4159
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "relative h-6", ref: speedMenuRef, children: [
|
|
4160
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
4126
4161
|
"button",
|
|
4127
4162
|
{
|
|
4128
4163
|
type: "button",
|
|
4129
4164
|
onClick: toggleSpeedMenu,
|
|
4130
4165
|
className: "cursor-pointer text-text-950 hover:text-primary-600",
|
|
4131
4166
|
"aria-label": "Op\xE7\xF5es de velocidade",
|
|
4132
|
-
children: /* @__PURE__ */ (0,
|
|
4167
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_phosphor_react9.DotsThreeVertical, { size: 24 })
|
|
4133
4168
|
}
|
|
4134
4169
|
),
|
|
4135
|
-
showSpeedMenu && /* @__PURE__ */ (0,
|
|
4170
|
+
showSpeedMenu && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "absolute bottom-full right-0 mb-2 p-2 bg-background border border-border-100 rounded-lg shadow-lg min-w-24 z-10", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "flex flex-col gap-1", children: [
|
|
4136
4171
|
{ speed: 1, label: "1x" },
|
|
4137
4172
|
{ speed: 1.5, label: "1.5x" },
|
|
4138
4173
|
{ speed: 2, label: "2x" }
|
|
4139
|
-
].map(({ speed, label }) => /* @__PURE__ */ (0,
|
|
4174
|
+
].map(({ speed, label }) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
4140
4175
|
"button",
|
|
4141
4176
|
{
|
|
4142
4177
|
type: "button",
|
|
@@ -4164,7 +4199,7 @@ var SIMULADO_BACKGROUND_CLASSES = {
|
|
|
4164
4199
|
var CardSimulado = (0, import_react12.forwardRef)(
|
|
4165
4200
|
({ title, duration, info, backgroundColor, className, ...props }, ref) => {
|
|
4166
4201
|
const backgroundClass = SIMULADO_BACKGROUND_CLASSES[backgroundColor];
|
|
4167
|
-
return /* @__PURE__ */ (0,
|
|
4202
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
4168
4203
|
CardBase,
|
|
4169
4204
|
{
|
|
4170
4205
|
ref,
|
|
@@ -4177,18 +4212,18 @@ var CardSimulado = (0, import_react12.forwardRef)(
|
|
|
4177
4212
|
className
|
|
4178
4213
|
),
|
|
4179
4214
|
...props,
|
|
4180
|
-
children: /* @__PURE__ */ (0,
|
|
4181
|
-
/* @__PURE__ */ (0,
|
|
4182
|
-
/* @__PURE__ */ (0,
|
|
4183
|
-
/* @__PURE__ */ (0,
|
|
4184
|
-
duration && /* @__PURE__ */ (0,
|
|
4185
|
-
/* @__PURE__ */ (0,
|
|
4186
|
-
/* @__PURE__ */ (0,
|
|
4215
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex justify-between items-center w-full gap-4", children: [
|
|
4216
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex flex-col gap-1 flex-1 min-w-0", children: [
|
|
4217
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Text_default, { size: "lg", weight: "bold", className: "text-text-950 truncate", children: title }),
|
|
4218
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex items-center gap-4 text-text-700", children: [
|
|
4219
|
+
duration && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex items-center gap-1", children: [
|
|
4220
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_phosphor_react9.Clock, { size: 16, className: "flex-shrink-0" }),
|
|
4221
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Text_default, { size: "sm", children: duration })
|
|
4187
4222
|
] }),
|
|
4188
|
-
/* @__PURE__ */ (0,
|
|
4223
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Text_default, { size: "sm", className: "truncate", children: info })
|
|
4189
4224
|
] })
|
|
4190
4225
|
] }),
|
|
4191
|
-
/* @__PURE__ */ (0,
|
|
4226
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
4192
4227
|
import_phosphor_react9.CaretRight,
|
|
4193
4228
|
{
|
|
4194
4229
|
size: 24,
|
|
@@ -4233,7 +4268,7 @@ var CardTest = (0, import_react12.forwardRef)(
|
|
|
4233
4268
|
const interactiveClasses = isSelectable ? "cursor-pointer focus:outline-none focus:ring-2 focus:ring-primary-950 focus:ring-offset-2" : "";
|
|
4234
4269
|
const selectedClasses = selected ? "ring-2 ring-primary-950 ring-offset-2" : "";
|
|
4235
4270
|
if (isSelectable) {
|
|
4236
|
-
return /* @__PURE__ */ (0,
|
|
4271
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
4237
4272
|
"button",
|
|
4238
4273
|
{
|
|
4239
4274
|
ref,
|
|
@@ -4245,8 +4280,8 @@ var CardTest = (0, import_react12.forwardRef)(
|
|
|
4245
4280
|
onKeyDown: handleKeyDown,
|
|
4246
4281
|
"aria-pressed": selected,
|
|
4247
4282
|
...props,
|
|
4248
|
-
children: /* @__PURE__ */ (0,
|
|
4249
|
-
/* @__PURE__ */ (0,
|
|
4283
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex flex-col justify-between gap-[27px] flex-grow min-h-[67px] w-full min-w-0", children: [
|
|
4284
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
4250
4285
|
Text_default,
|
|
4251
4286
|
{
|
|
4252
4287
|
size: "md",
|
|
@@ -4255,10 +4290,10 @@ var CardTest = (0, import_react12.forwardRef)(
|
|
|
4255
4290
|
children: title
|
|
4256
4291
|
}
|
|
4257
4292
|
),
|
|
4258
|
-
/* @__PURE__ */ (0,
|
|
4259
|
-
duration && /* @__PURE__ */ (0,
|
|
4260
|
-
/* @__PURE__ */ (0,
|
|
4261
|
-
/* @__PURE__ */ (0,
|
|
4293
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex flex-row justify-start items-end gap-4 w-full", children: [
|
|
4294
|
+
duration && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex flex-row items-center gap-1 flex-shrink-0", children: [
|
|
4295
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_phosphor_react9.Clock, { size: 16, className: "text-text-700" }),
|
|
4296
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
4262
4297
|
Text_default,
|
|
4263
4298
|
{
|
|
4264
4299
|
size: "sm",
|
|
@@ -4267,7 +4302,7 @@ var CardTest = (0, import_react12.forwardRef)(
|
|
|
4267
4302
|
}
|
|
4268
4303
|
)
|
|
4269
4304
|
] }),
|
|
4270
|
-
/* @__PURE__ */ (0,
|
|
4305
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
4271
4306
|
Text_default,
|
|
4272
4307
|
{
|
|
4273
4308
|
size: "sm",
|
|
@@ -4280,14 +4315,14 @@ var CardTest = (0, import_react12.forwardRef)(
|
|
|
4280
4315
|
}
|
|
4281
4316
|
);
|
|
4282
4317
|
}
|
|
4283
|
-
return /* @__PURE__ */ (0,
|
|
4318
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
4284
4319
|
"div",
|
|
4285
4320
|
{
|
|
4286
4321
|
ref,
|
|
4287
4322
|
className: cn(`${baseClasses} ${className}`.trim()),
|
|
4288
4323
|
...props,
|
|
4289
|
-
children: /* @__PURE__ */ (0,
|
|
4290
|
-
/* @__PURE__ */ (0,
|
|
4324
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex flex-col justify-between gap-[27px] flex-grow min-h-[67px] w-full min-w-0", children: [
|
|
4325
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
4291
4326
|
Text_default,
|
|
4292
4327
|
{
|
|
4293
4328
|
size: "md",
|
|
@@ -4296,10 +4331,10 @@ var CardTest = (0, import_react12.forwardRef)(
|
|
|
4296
4331
|
children: title
|
|
4297
4332
|
}
|
|
4298
4333
|
),
|
|
4299
|
-
/* @__PURE__ */ (0,
|
|
4300
|
-
duration && /* @__PURE__ */ (0,
|
|
4301
|
-
/* @__PURE__ */ (0,
|
|
4302
|
-
/* @__PURE__ */ (0,
|
|
4334
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex flex-row justify-start items-end gap-4 w-full", children: [
|
|
4335
|
+
duration && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex flex-row items-center gap-1 flex-shrink-0", children: [
|
|
4336
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_phosphor_react9.Clock, { size: 16, className: "text-text-700" }),
|
|
4337
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
4303
4338
|
Text_default,
|
|
4304
4339
|
{
|
|
4305
4340
|
size: "sm",
|
|
@@ -4308,7 +4343,7 @@ var CardTest = (0, import_react12.forwardRef)(
|
|
|
4308
4343
|
}
|
|
4309
4344
|
)
|
|
4310
4345
|
] }),
|
|
4311
|
-
/* @__PURE__ */ (0,
|
|
4346
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
4312
4347
|
Text_default,
|
|
4313
4348
|
{
|
|
4314
4349
|
size: "sm",
|
|
@@ -4345,14 +4380,14 @@ var SIMULATION_TYPE_STYLES = {
|
|
|
4345
4380
|
}
|
|
4346
4381
|
};
|
|
4347
4382
|
var CardSimulationHistory = (0, import_react12.forwardRef)(({ data, onSimulationClick, className, ...props }, ref) => {
|
|
4348
|
-
return /* @__PURE__ */ (0,
|
|
4383
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
4349
4384
|
"div",
|
|
4350
4385
|
{
|
|
4351
4386
|
ref,
|
|
4352
4387
|
className: cn("w-full max-w-[992px] h-auto", className),
|
|
4353
4388
|
...props,
|
|
4354
|
-
children: /* @__PURE__ */ (0,
|
|
4355
|
-
data.map((section, sectionIndex) => /* @__PURE__ */ (0,
|
|
4389
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex flex-col gap-0", children: [
|
|
4390
|
+
data.map((section, sectionIndex) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "flex flex-col", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
4356
4391
|
"div",
|
|
4357
4392
|
{
|
|
4358
4393
|
className: cn(
|
|
@@ -4360,7 +4395,7 @@ var CardSimulationHistory = (0, import_react12.forwardRef)(({ data, onSimulation
|
|
|
4360
4395
|
sectionIndex === 0 ? "rounded-t-3xl" : ""
|
|
4361
4396
|
),
|
|
4362
4397
|
children: [
|
|
4363
|
-
/* @__PURE__ */ (0,
|
|
4398
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
4364
4399
|
Text_default,
|
|
4365
4400
|
{
|
|
4366
4401
|
size: "xs",
|
|
@@ -4369,9 +4404,9 @@ var CardSimulationHistory = (0, import_react12.forwardRef)(({ data, onSimulation
|
|
|
4369
4404
|
children: section.date
|
|
4370
4405
|
}
|
|
4371
4406
|
),
|
|
4372
|
-
/* @__PURE__ */ (0,
|
|
4407
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "flex flex-col gap-2 flex-1", children: section.simulations.map((simulation) => {
|
|
4373
4408
|
const typeStyles = SIMULATION_TYPE_STYLES[simulation.type];
|
|
4374
|
-
return /* @__PURE__ */ (0,
|
|
4409
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
4375
4410
|
CardBase,
|
|
4376
4411
|
{
|
|
4377
4412
|
layout: "horizontal",
|
|
@@ -4383,9 +4418,9 @@ var CardSimulationHistory = (0, import_react12.forwardRef)(({ data, onSimulation
|
|
|
4383
4418
|
transition-shadow duration-200 h-auto min-h-[61px]`
|
|
4384
4419
|
),
|
|
4385
4420
|
onClick: () => onSimulationClick?.(simulation),
|
|
4386
|
-
children: /* @__PURE__ */ (0,
|
|
4387
|
-
/* @__PURE__ */ (0,
|
|
4388
|
-
/* @__PURE__ */ (0,
|
|
4421
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex justify-between items-center w-full gap-2", children: [
|
|
4422
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex flex-wrap flex-col justify-between sm:flex-row gap-2 flex-1 min-w-0", children: [
|
|
4423
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
4389
4424
|
Text_default,
|
|
4390
4425
|
{
|
|
4391
4426
|
size: "lg",
|
|
@@ -4394,8 +4429,8 @@ var CardSimulationHistory = (0, import_react12.forwardRef)(({ data, onSimulation
|
|
|
4394
4429
|
children: simulation.title
|
|
4395
4430
|
}
|
|
4396
4431
|
),
|
|
4397
|
-
/* @__PURE__ */ (0,
|
|
4398
|
-
/* @__PURE__ */ (0,
|
|
4432
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
4433
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
4399
4434
|
Badge_default,
|
|
4400
4435
|
{
|
|
4401
4436
|
variant: "examsOutlined",
|
|
@@ -4404,10 +4439,10 @@ var CardSimulationHistory = (0, import_react12.forwardRef)(({ data, onSimulation
|
|
|
4404
4439
|
children: typeStyles.text
|
|
4405
4440
|
}
|
|
4406
4441
|
),
|
|
4407
|
-
/* @__PURE__ */ (0,
|
|
4442
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Text_default, { size: "sm", className: "text-text-800 truncate", children: simulation.info })
|
|
4408
4443
|
] })
|
|
4409
4444
|
] }),
|
|
4410
|
-
/* @__PURE__ */ (0,
|
|
4445
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
4411
4446
|
import_phosphor_react9.CaretRight,
|
|
4412
4447
|
{
|
|
4413
4448
|
size: 24,
|
|
@@ -4423,7 +4458,7 @@ var CardSimulationHistory = (0, import_react12.forwardRef)(({ data, onSimulation
|
|
|
4423
4458
|
]
|
|
4424
4459
|
}
|
|
4425
4460
|
) }, section.date)),
|
|
4426
|
-
data.length > 0 && /* @__PURE__ */ (0,
|
|
4461
|
+
data.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "w-full h-6 bg-background rounded-b-3xl" })
|
|
4427
4462
|
] })
|
|
4428
4463
|
}
|
|
4429
4464
|
);
|
|
@@ -4432,7 +4467,7 @@ var CardSimulationHistory = (0, import_react12.forwardRef)(({ data, onSimulation
|
|
|
4432
4467
|
// src/components/Accordation/Accordation.tsx
|
|
4433
4468
|
var import_react13 = require("react");
|
|
4434
4469
|
var import_phosphor_react10 = require("phosphor-react");
|
|
4435
|
-
var
|
|
4470
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
4436
4471
|
var CardAccordation = (0, import_react13.forwardRef)(
|
|
4437
4472
|
({
|
|
4438
4473
|
trigger,
|
|
@@ -4471,7 +4506,7 @@ var CardAccordation = (0, import_react13.forwardRef)(
|
|
|
4471
4506
|
handleToggle();
|
|
4472
4507
|
}
|
|
4473
4508
|
};
|
|
4474
|
-
return /* @__PURE__ */ (0,
|
|
4509
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
4475
4510
|
CardBase,
|
|
4476
4511
|
{
|
|
4477
4512
|
ref,
|
|
@@ -4481,7 +4516,7 @@ var CardAccordation = (0, import_react13.forwardRef)(
|
|
|
4481
4516
|
className: cn("overflow-hidden", className),
|
|
4482
4517
|
...props,
|
|
4483
4518
|
children: [
|
|
4484
|
-
/* @__PURE__ */ (0,
|
|
4519
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
4485
4520
|
"button",
|
|
4486
4521
|
{
|
|
4487
4522
|
id: headerId,
|
|
@@ -4499,7 +4534,7 @@ var CardAccordation = (0, import_react13.forwardRef)(
|
|
|
4499
4534
|
"data-value": value,
|
|
4500
4535
|
children: [
|
|
4501
4536
|
trigger,
|
|
4502
|
-
/* @__PURE__ */ (0,
|
|
4537
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
4503
4538
|
import_phosphor_react10.CaretRight,
|
|
4504
4539
|
{
|
|
4505
4540
|
size: 20,
|
|
@@ -4514,7 +4549,7 @@ var CardAccordation = (0, import_react13.forwardRef)(
|
|
|
4514
4549
|
]
|
|
4515
4550
|
}
|
|
4516
4551
|
),
|
|
4517
|
-
/* @__PURE__ */ (0,
|
|
4552
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
4518
4553
|
"section",
|
|
4519
4554
|
{
|
|
4520
4555
|
id: contentId,
|
|
@@ -4526,7 +4561,7 @@ var CardAccordation = (0, import_react13.forwardRef)(
|
|
|
4526
4561
|
),
|
|
4527
4562
|
"data-testid": "accordion-content",
|
|
4528
4563
|
"data-value": value,
|
|
4529
|
-
children: /* @__PURE__ */ (0,
|
|
4564
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "p-4 pt-0", children })
|
|
4530
4565
|
}
|
|
4531
4566
|
)
|
|
4532
4567
|
]
|
|
@@ -4539,7 +4574,7 @@ CardAccordation.displayName = "CardAccordation";
|
|
|
4539
4574
|
// src/components/Accordation/AccordionGroup.tsx
|
|
4540
4575
|
var import_react14 = require("react");
|
|
4541
4576
|
var import_zustand3 = require("zustand");
|
|
4542
|
-
var
|
|
4577
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
4543
4578
|
function createAccordionGroupStore(type, initialValue, collapsible) {
|
|
4544
4579
|
return (0, import_zustand3.create)((set, get) => ({
|
|
4545
4580
|
type,
|
|
@@ -4679,13 +4714,13 @@ var AccordionGroup = (0, import_react14.forwardRef)(
|
|
|
4679
4714
|
indexRef,
|
|
4680
4715
|
handleItemToggle
|
|
4681
4716
|
);
|
|
4682
|
-
return /* @__PURE__ */ (0,
|
|
4717
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { ref, className, ...props, children: enhancedChildren });
|
|
4683
4718
|
}
|
|
4684
4719
|
);
|
|
4685
4720
|
AccordionGroup.displayName = "AccordionGroup";
|
|
4686
4721
|
|
|
4687
4722
|
// src/components/CheckBoxGroup/CheckBoxGroup.tsx
|
|
4688
|
-
var
|
|
4723
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
4689
4724
|
var CheckboxGroup = ({
|
|
4690
4725
|
categories,
|
|
4691
4726
|
onCategoriesChange
|
|
@@ -4973,7 +5008,7 @@ var CheckboxGroup = ({
|
|
|
4973
5008
|
};
|
|
4974
5009
|
const renderCheckboxItem = (item, categoryKey) => {
|
|
4975
5010
|
const uniqueId = `${categoryKey}-${item.id}`;
|
|
4976
|
-
return /* @__PURE__ */ (0,
|
|
5011
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
4977
5012
|
"div",
|
|
4978
5013
|
{
|
|
4979
5014
|
className: "flex items-center gap-3 px-2",
|
|
@@ -4983,7 +5018,7 @@ var CheckboxGroup = ({
|
|
|
4983
5018
|
onMouseUp: (e) => e.stopPropagation(),
|
|
4984
5019
|
onKeyDown: (e) => e.stopPropagation(),
|
|
4985
5020
|
children: [
|
|
4986
|
-
/* @__PURE__ */ (0,
|
|
5021
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
4987
5022
|
CheckBox_default,
|
|
4988
5023
|
{
|
|
4989
5024
|
id: uniqueId,
|
|
@@ -4991,7 +5026,7 @@ var CheckboxGroup = ({
|
|
|
4991
5026
|
onChange: () => toggleItem(categoryKey, item.id)
|
|
4992
5027
|
}
|
|
4993
5028
|
),
|
|
4994
|
-
/* @__PURE__ */ (0,
|
|
5029
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
4995
5030
|
"label",
|
|
4996
5031
|
{
|
|
4997
5032
|
htmlFor: uniqueId,
|
|
@@ -5004,12 +5039,12 @@ var CheckboxGroup = ({
|
|
|
5004
5039
|
item.id
|
|
5005
5040
|
);
|
|
5006
5041
|
};
|
|
5007
|
-
const renderFormattedGroup = (formattedGroup, idx, categoryKey) => /* @__PURE__ */ (0,
|
|
5042
|
+
const renderFormattedGroup = (formattedGroup, idx, categoryKey) => /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
5008
5043
|
"div",
|
|
5009
5044
|
{
|
|
5010
5045
|
className: "flex flex-col gap-3",
|
|
5011
5046
|
children: [
|
|
5012
|
-
"groupLabel" in formattedGroup && formattedGroup.groupLabel && /* @__PURE__ */ (0,
|
|
5047
|
+
"groupLabel" in formattedGroup && formattedGroup.groupLabel && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Text_default, { size: "sm", className: "mt-2", weight: "semibold", children: formattedGroup.groupLabel }),
|
|
5013
5048
|
formattedGroup.itens?.map(
|
|
5014
5049
|
(item) => renderCheckboxItem(item, categoryKey)
|
|
5015
5050
|
)
|
|
@@ -5017,9 +5052,9 @@ var CheckboxGroup = ({
|
|
|
5017
5052
|
},
|
|
5018
5053
|
formattedGroup.groupLabel || `group-${idx}`
|
|
5019
5054
|
);
|
|
5020
|
-
const renderAccordionTrigger = (category, isEnabled) => /* @__PURE__ */ (0,
|
|
5021
|
-
/* @__PURE__ */ (0,
|
|
5022
|
-
/* @__PURE__ */ (0,
|
|
5055
|
+
const renderAccordionTrigger = (category, isEnabled) => /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "flex items-center justify-between w-full p-2", children: [
|
|
5056
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
5057
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
5023
5058
|
CheckBox_default,
|
|
5024
5059
|
{
|
|
5025
5060
|
checked: isMinimalOneCheckBoxIsSelected(category.key),
|
|
@@ -5028,7 +5063,7 @@ var CheckboxGroup = ({
|
|
|
5028
5063
|
onChange: () => toggleAllInCategory(category.key)
|
|
5029
5064
|
}
|
|
5030
5065
|
),
|
|
5031
|
-
/* @__PURE__ */ (0,
|
|
5066
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
5032
5067
|
Text_default,
|
|
5033
5068
|
{
|
|
5034
5069
|
size: "sm",
|
|
@@ -5038,7 +5073,7 @@ var CheckboxGroup = ({
|
|
|
5038
5073
|
}
|
|
5039
5074
|
)
|
|
5040
5075
|
] }),
|
|
5041
|
-
(openAccordion === category.key || isEnabled) && /* @__PURE__ */ (0,
|
|
5076
|
+
(openAccordion === category.key || isEnabled) && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Badge_default, { variant: "solid", action: "info", children: (() => {
|
|
5042
5077
|
const visibleIds = getFormattedItems(category.key).flatMap((group) => group.itens || []).map((i) => i.id);
|
|
5043
5078
|
const selectedVisibleCount = visibleIds.filter(
|
|
5044
5079
|
(id) => category.selectedIds?.includes(id)
|
|
@@ -5060,8 +5095,8 @@ var CheckboxGroup = ({
|
|
|
5060
5095
|
const hasNoItems = formattedItems.every(
|
|
5061
5096
|
(group) => !group.itens || group.itens.length === 0
|
|
5062
5097
|
);
|
|
5063
|
-
return /* @__PURE__ */ (0,
|
|
5064
|
-
/* @__PURE__ */ (0,
|
|
5098
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { children: [
|
|
5099
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
5065
5100
|
CardAccordation,
|
|
5066
5101
|
{
|
|
5067
5102
|
value: category.key,
|
|
@@ -5071,12 +5106,12 @@ var CheckboxGroup = ({
|
|
|
5071
5106
|
openAccordion === category.key && "bg-background-50 border-none"
|
|
5072
5107
|
),
|
|
5073
5108
|
trigger: renderAccordionTrigger(category, isEnabled),
|
|
5074
|
-
children: /* @__PURE__ */ (0,
|
|
5109
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "flex flex-col gap-3 pt-2", children: hasNoItems && isEnabled ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "px-2 py-4", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Text_default, { size: "sm", className: "text-text-500 text-center", children: "Sem dados" }) }) : formattedItems.map(
|
|
5075
5110
|
(formattedGroup, idx) => renderFormattedGroup(formattedGroup, idx, category.key)
|
|
5076
5111
|
) })
|
|
5077
5112
|
}
|
|
5078
5113
|
),
|
|
5079
|
-
openAccordion !== category.key && /* @__PURE__ */ (0,
|
|
5114
|
+
openAccordion !== category.key && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Divider_default, {})
|
|
5080
5115
|
] }, category.key);
|
|
5081
5116
|
};
|
|
5082
5117
|
(0, import_react15.useEffect)(() => {
|
|
@@ -5093,7 +5128,7 @@ var CheckboxGroup = ({
|
|
|
5093
5128
|
}, 0);
|
|
5094
5129
|
}
|
|
5095
5130
|
}, [categories, openAccordion]);
|
|
5096
|
-
return /* @__PURE__ */ (0,
|
|
5131
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
5097
5132
|
AccordionGroup,
|
|
5098
5133
|
{
|
|
5099
5134
|
type: "single",
|
|
@@ -5120,7 +5155,7 @@ var CheckboxGroup = ({
|
|
|
5120
5155
|
};
|
|
5121
5156
|
|
|
5122
5157
|
// src/components/Filter/FilterModal.tsx
|
|
5123
|
-
var
|
|
5158
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
5124
5159
|
var FilterModal = ({
|
|
5125
5160
|
isOpen,
|
|
5126
5161
|
onClose,
|
|
@@ -5148,20 +5183,20 @@ var FilterModal = ({
|
|
|
5148
5183
|
const handleClear = () => {
|
|
5149
5184
|
onClear();
|
|
5150
5185
|
};
|
|
5151
|
-
return /* @__PURE__ */ (0,
|
|
5186
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
5152
5187
|
Modal_default,
|
|
5153
5188
|
{
|
|
5154
5189
|
isOpen,
|
|
5155
5190
|
onClose,
|
|
5156
5191
|
title,
|
|
5157
5192
|
size,
|
|
5158
|
-
footer: /* @__PURE__ */ (0,
|
|
5159
|
-
/* @__PURE__ */ (0,
|
|
5160
|
-
/* @__PURE__ */ (0,
|
|
5193
|
+
footer: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex gap-3 justify-end w-full", children: [
|
|
5194
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Button_default, { variant: "outline", onClick: handleClear, children: clearLabel }),
|
|
5195
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Button_default, { onClick: handleApply, children: applyLabel })
|
|
5161
5196
|
] }),
|
|
5162
|
-
children: /* @__PURE__ */ (0,
|
|
5163
|
-
/* @__PURE__ */ (0,
|
|
5164
|
-
config.key === "academic" && /* @__PURE__ */ (0,
|
|
5197
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "flex flex-col gap-6", children: filterConfigs.map((config, index) => /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex flex-col gap-4", children: [
|
|
5198
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex items-center gap-2 text-text-400 text-sm font-medium uppercase", children: [
|
|
5199
|
+
config.key === "academic" && /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
5165
5200
|
"svg",
|
|
5166
5201
|
{
|
|
5167
5202
|
width: "16",
|
|
@@ -5171,7 +5206,7 @@ var FilterModal = ({
|
|
|
5171
5206
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5172
5207
|
className: "text-text-400",
|
|
5173
5208
|
children: [
|
|
5174
|
-
/* @__PURE__ */ (0,
|
|
5209
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
5175
5210
|
"path",
|
|
5176
5211
|
{
|
|
5177
5212
|
d: "M8 2L2 5.33333L8 8.66667L14 5.33333L8 2Z",
|
|
@@ -5181,7 +5216,7 @@ var FilterModal = ({
|
|
|
5181
5216
|
strokeLinejoin: "round"
|
|
5182
5217
|
}
|
|
5183
5218
|
),
|
|
5184
|
-
/* @__PURE__ */ (0,
|
|
5219
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
5185
5220
|
"path",
|
|
5186
5221
|
{
|
|
5187
5222
|
d: "M2 10.6667L8 14L14 10.6667",
|
|
@@ -5191,7 +5226,7 @@ var FilterModal = ({
|
|
|
5191
5226
|
strokeLinejoin: "round"
|
|
5192
5227
|
}
|
|
5193
5228
|
),
|
|
5194
|
-
/* @__PURE__ */ (0,
|
|
5229
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
5195
5230
|
"path",
|
|
5196
5231
|
{
|
|
5197
5232
|
d: "M2 8L8 11.3333L14 8",
|
|
@@ -5204,7 +5239,7 @@ var FilterModal = ({
|
|
|
5204
5239
|
]
|
|
5205
5240
|
}
|
|
5206
5241
|
),
|
|
5207
|
-
config.key === "content" && /* @__PURE__ */ (0,
|
|
5242
|
+
config.key === "content" && /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
5208
5243
|
"svg",
|
|
5209
5244
|
{
|
|
5210
5245
|
width: "16",
|
|
@@ -5214,7 +5249,7 @@ var FilterModal = ({
|
|
|
5214
5249
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5215
5250
|
className: "text-text-400",
|
|
5216
5251
|
children: [
|
|
5217
|
-
/* @__PURE__ */ (0,
|
|
5252
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
5218
5253
|
"path",
|
|
5219
5254
|
{
|
|
5220
5255
|
d: "M3.33333 2H12.6667C13.403 2 14 2.59695 14 3.33333V12.6667C14 13.403 13.403 14 12.6667 14H3.33333C2.59695 14 2 13.403 2 12.6667V3.33333C2 2.59695 2.59695 2 3.33333 2Z",
|
|
@@ -5224,7 +5259,7 @@ var FilterModal = ({
|
|
|
5224
5259
|
strokeLinejoin: "round"
|
|
5225
5260
|
}
|
|
5226
5261
|
),
|
|
5227
|
-
/* @__PURE__ */ (0,
|
|
5262
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
5228
5263
|
"path",
|
|
5229
5264
|
{
|
|
5230
5265
|
d: "M2 6H14",
|
|
@@ -5234,7 +5269,7 @@ var FilterModal = ({
|
|
|
5234
5269
|
strokeLinejoin: "round"
|
|
5235
5270
|
}
|
|
5236
5271
|
),
|
|
5237
|
-
/* @__PURE__ */ (0,
|
|
5272
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
5238
5273
|
"path",
|
|
5239
5274
|
{
|
|
5240
5275
|
d: "M6 2V14",
|
|
@@ -5247,9 +5282,9 @@ var FilterModal = ({
|
|
|
5247
5282
|
]
|
|
5248
5283
|
}
|
|
5249
5284
|
),
|
|
5250
|
-
/* @__PURE__ */ (0,
|
|
5285
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { children: config.label })
|
|
5251
5286
|
] }),
|
|
5252
|
-
/* @__PURE__ */ (0,
|
|
5287
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
5253
5288
|
CheckboxGroup,
|
|
5254
5289
|
{
|
|
5255
5290
|
categories: config.categories,
|
|
@@ -5263,7 +5298,7 @@ var FilterModal = ({
|
|
|
5263
5298
|
|
|
5264
5299
|
// src/components/TableProvider/TableProvider.tsx
|
|
5265
5300
|
var import_phosphor_react11 = require("phosphor-react");
|
|
5266
|
-
var
|
|
5301
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
5267
5302
|
function TableProvider({
|
|
5268
5303
|
data,
|
|
5269
5304
|
headers,
|
|
@@ -5402,21 +5437,21 @@ function TableProvider({
|
|
|
5402
5437
|
const showLoading = loading;
|
|
5403
5438
|
const showNoSearchResult = !loading && data.length === 0 && searchQuery.trim() !== "";
|
|
5404
5439
|
const showEmpty = !loading && data.length === 0 && searchQuery.trim() === "";
|
|
5405
|
-
const controls = (enableSearch || enableFilters) && /* @__PURE__ */ (0,
|
|
5406
|
-
enableFilters && /* @__PURE__ */ (0,
|
|
5440
|
+
const controls = (enableSearch || enableFilters) && /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex items-center gap-4", children: [
|
|
5441
|
+
enableFilters && /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
5407
5442
|
Button_default,
|
|
5408
5443
|
{
|
|
5409
5444
|
variant: "outline",
|
|
5410
5445
|
size: "medium",
|
|
5411
5446
|
onClick: () => setIsFilterModalOpen(true),
|
|
5412
5447
|
children: [
|
|
5413
|
-
/* @__PURE__ */ (0,
|
|
5448
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_phosphor_react11.Funnel, { size: 20 }),
|
|
5414
5449
|
"Filtros",
|
|
5415
|
-
hasActiveFilters && /* @__PURE__ */ (0,
|
|
5450
|
+
hasActiveFilters && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "ml-2 rounded-full bg-primary-500 px-2 py-0.5 text-xs text-white", children: Object.keys(activeFilters).length })
|
|
5416
5451
|
]
|
|
5417
5452
|
}
|
|
5418
5453
|
),
|
|
5419
|
-
enableSearch && /* @__PURE__ */ (0,
|
|
5454
|
+
enableSearch && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
5420
5455
|
Search_default,
|
|
5421
5456
|
{
|
|
5422
5457
|
value: searchQuery,
|
|
@@ -5427,7 +5462,7 @@ function TableProvider({
|
|
|
5427
5462
|
}
|
|
5428
5463
|
) })
|
|
5429
5464
|
] });
|
|
5430
|
-
const table = /* @__PURE__ */ (0,
|
|
5465
|
+
const table = /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "w-full overflow-x-auto", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
5431
5466
|
Table_default,
|
|
5432
5467
|
{
|
|
5433
5468
|
variant,
|
|
@@ -5438,11 +5473,11 @@ function TableProvider({
|
|
|
5438
5473
|
showEmpty,
|
|
5439
5474
|
emptyState,
|
|
5440
5475
|
children: [
|
|
5441
|
-
/* @__PURE__ */ (0,
|
|
5476
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
5442
5477
|
TableRow,
|
|
5443
5478
|
{
|
|
5444
5479
|
variant: variant === "borderless" ? "defaultBorderless" : "default",
|
|
5445
|
-
children: headers.map((header, index) => /* @__PURE__ */ (0,
|
|
5480
|
+
children: headers.map((header, index) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
5446
5481
|
TableHead,
|
|
5447
5482
|
{
|
|
5448
5483
|
sortable: enableTableSort && header.sortable,
|
|
@@ -5456,7 +5491,7 @@ function TableProvider({
|
|
|
5456
5491
|
))
|
|
5457
5492
|
}
|
|
5458
5493
|
) }),
|
|
5459
|
-
/* @__PURE__ */ (0,
|
|
5494
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(TableBody, { children: loading ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(TableCell, { colSpan: headers.length, className: "text-center py-8", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "text-text-400 text-sm", children: "Carregando..." }) }) }) : displayData.map((row, rowIndex) => {
|
|
5460
5495
|
const effectiveIndex = useInternalPagination ? (currentPage - 1) * itemsPerPage + rowIndex : rowIndex;
|
|
5461
5496
|
const rowKeyValue = rowKey ? (() => {
|
|
5462
5497
|
const keyValue = row[rowKey];
|
|
@@ -5468,7 +5503,7 @@ function TableProvider({
|
|
|
5468
5503
|
}
|
|
5469
5504
|
return String(keyValue);
|
|
5470
5505
|
})() : `row-${effectiveIndex}`;
|
|
5471
|
-
return /* @__PURE__ */ (0,
|
|
5506
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
5472
5507
|
TableRow,
|
|
5473
5508
|
{
|
|
5474
5509
|
variant: variant === "borderless" ? "defaultBorderless" : "default",
|
|
@@ -5489,7 +5524,7 @@ function TableProvider({
|
|
|
5489
5524
|
}
|
|
5490
5525
|
}
|
|
5491
5526
|
const content = header.render ? header.render(value, row, effectiveIndex) : defaultContent;
|
|
5492
|
-
return /* @__PURE__ */ (0,
|
|
5527
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
5493
5528
|
TableCell,
|
|
5494
5529
|
{
|
|
5495
5530
|
className: header.className,
|
|
@@ -5508,7 +5543,7 @@ function TableProvider({
|
|
|
5508
5543
|
]
|
|
5509
5544
|
}
|
|
5510
5545
|
) });
|
|
5511
|
-
const pagination = enablePagination && !isEmpty && /* @__PURE__ */ (0,
|
|
5546
|
+
const pagination = enablePagination && !isEmpty && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "flex justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
5512
5547
|
TablePagination_default,
|
|
5513
5548
|
{
|
|
5514
5549
|
currentPage,
|
|
@@ -5522,9 +5557,9 @@ function TableProvider({
|
|
|
5522
5557
|
}
|
|
5523
5558
|
) });
|
|
5524
5559
|
if (children) {
|
|
5525
|
-
return /* @__PURE__ */ (0,
|
|
5560
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_jsx_runtime26.Fragment, { children: [
|
|
5526
5561
|
children({ controls, table, pagination }),
|
|
5527
|
-
enableFilters && /* @__PURE__ */ (0,
|
|
5562
|
+
enableFilters && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
5528
5563
|
FilterModal,
|
|
5529
5564
|
{
|
|
5530
5565
|
isOpen: isFilterModalOpen,
|
|
@@ -5537,11 +5572,11 @@ function TableProvider({
|
|
|
5537
5572
|
)
|
|
5538
5573
|
] });
|
|
5539
5574
|
}
|
|
5540
|
-
return /* @__PURE__ */ (0,
|
|
5575
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "w-full space-y-4", children: [
|
|
5541
5576
|
controls,
|
|
5542
5577
|
table,
|
|
5543
5578
|
pagination,
|
|
5544
|
-
enableFilters && /* @__PURE__ */ (0,
|
|
5579
|
+
enableFilters && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
5545
5580
|
FilterModal,
|
|
5546
5581
|
{
|
|
5547
5582
|
isOpen: isFilterModalOpen,
|