analytica-frontend-lib 1.2.21 → 1.2.22
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 +0 -3
- package/dist/AlertManager/index.css.map +1 -1
- package/dist/AlertManagerView/index.js +347 -159
- package/dist/AlertManagerView/index.js.map +1 -1
- package/dist/AlertManagerView/index.mjs +346 -159
- package/dist/AlertManagerView/index.mjs.map +1 -1
- package/dist/Radio/index.d.mts +1 -1
- package/dist/Radio/index.d.ts +1 -1
- package/dist/Table/index.d.mts +23 -24
- package/dist/Table/index.d.ts +23 -24
- package/dist/Table/index.js +328 -140
- package/dist/Table/index.js.map +1 -1
- package/dist/Table/index.mjs +323 -136
- package/dist/Table/index.mjs.map +1 -1
- package/dist/TableProvider/index.css +0 -3
- 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 +826 -629
- package/dist/TableProvider/index.js.map +1 -1
- package/dist/TableProvider/index.mjs +737 -541
- package/dist/TableProvider/index.mjs.map +1 -1
- package/dist/{TableProvider-D4Ak7ofz.d.ts → TableProvider-48a6wb7j.d.ts} +43 -4
- package/dist/{TableProvider-CDcL1tDj.d.mts → TableProvider-DyhwEkPT.d.mts} +43 -4
- package/dist/index.css +0 -3
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +643 -598
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +601 -557
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +0 -3
- package/dist/styles.css.map +1 -1
- package/package.json +1 -1
|
@@ -3,13 +3,12 @@ import { useState as useState11, useEffect as useEffect12, useMemo as useMemo5,
|
|
|
3
3
|
|
|
4
4
|
// src/components/Table/Table.tsx
|
|
5
5
|
import {
|
|
6
|
-
forwardRef,
|
|
6
|
+
forwardRef as forwardRef2,
|
|
7
7
|
useState,
|
|
8
8
|
useMemo,
|
|
9
9
|
useEffect,
|
|
10
10
|
Children,
|
|
11
|
-
isValidElement
|
|
12
|
-
cloneElement
|
|
11
|
+
isValidElement
|
|
13
12
|
} from "react";
|
|
14
13
|
|
|
15
14
|
// src/utils/utils.ts
|
|
@@ -160,9 +159,161 @@ var Button = ({
|
|
|
160
159
|
};
|
|
161
160
|
var Button_default = Button;
|
|
162
161
|
|
|
162
|
+
// src/components/Skeleton/Skeleton.tsx
|
|
163
|
+
import { forwardRef } from "react";
|
|
164
|
+
import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
165
|
+
var SKELETON_ANIMATION_CLASSES = {
|
|
166
|
+
pulse: "animate-pulse",
|
|
167
|
+
none: ""
|
|
168
|
+
};
|
|
169
|
+
var SKELETON_VARIANT_CLASSES = {
|
|
170
|
+
text: "h-4 bg-background-200 rounded",
|
|
171
|
+
circular: "bg-background-200 rounded-full",
|
|
172
|
+
rectangular: "bg-background-200",
|
|
173
|
+
rounded: "bg-background-200 rounded-lg"
|
|
174
|
+
};
|
|
175
|
+
var SPACING_CLASSES = {
|
|
176
|
+
none: "",
|
|
177
|
+
small: "space-y-1",
|
|
178
|
+
medium: "space-y-2",
|
|
179
|
+
large: "space-y-3"
|
|
180
|
+
};
|
|
181
|
+
var Skeleton = forwardRef(
|
|
182
|
+
({
|
|
183
|
+
variant = "text",
|
|
184
|
+
width,
|
|
185
|
+
height,
|
|
186
|
+
animation = "pulse",
|
|
187
|
+
lines = 1,
|
|
188
|
+
spacing = "none",
|
|
189
|
+
className = "",
|
|
190
|
+
children,
|
|
191
|
+
...props
|
|
192
|
+
}, ref) => {
|
|
193
|
+
const animationClass = SKELETON_ANIMATION_CLASSES[animation];
|
|
194
|
+
const variantClass = SKELETON_VARIANT_CLASSES[variant];
|
|
195
|
+
const spacingClass = SPACING_CLASSES[spacing];
|
|
196
|
+
const style = {
|
|
197
|
+
width: typeof width === "number" ? `${width}px` : width,
|
|
198
|
+
height: typeof height === "number" ? `${height}px` : height
|
|
199
|
+
};
|
|
200
|
+
if (variant === "text" && lines > 1) {
|
|
201
|
+
return /* @__PURE__ */ jsx4(
|
|
202
|
+
"div",
|
|
203
|
+
{
|
|
204
|
+
ref,
|
|
205
|
+
className: cn("flex flex-col", spacingClass, className),
|
|
206
|
+
...props,
|
|
207
|
+
children: Array.from({ length: lines }, (_, index) => /* @__PURE__ */ jsx4(
|
|
208
|
+
"div",
|
|
209
|
+
{
|
|
210
|
+
className: cn(variantClass, animationClass),
|
|
211
|
+
style: index === lines - 1 ? { width: "60%" } : void 0
|
|
212
|
+
},
|
|
213
|
+
index
|
|
214
|
+
))
|
|
215
|
+
}
|
|
216
|
+
);
|
|
217
|
+
}
|
|
218
|
+
return /* @__PURE__ */ jsx4(
|
|
219
|
+
"div",
|
|
220
|
+
{
|
|
221
|
+
ref,
|
|
222
|
+
className: cn(variantClass, animationClass, className),
|
|
223
|
+
style,
|
|
224
|
+
...props,
|
|
225
|
+
children
|
|
226
|
+
}
|
|
227
|
+
);
|
|
228
|
+
}
|
|
229
|
+
);
|
|
230
|
+
var SkeletonText = forwardRef(
|
|
231
|
+
(props, ref) => /* @__PURE__ */ jsx4(Skeleton, { ref, variant: "text", ...props })
|
|
232
|
+
);
|
|
233
|
+
var SkeletonCircle = forwardRef((props, ref) => /* @__PURE__ */ jsx4(Skeleton, { ref, variant: "circular", ...props }));
|
|
234
|
+
var SkeletonRectangle = forwardRef((props, ref) => /* @__PURE__ */ jsx4(Skeleton, { ref, variant: "rectangular", ...props }));
|
|
235
|
+
var SkeletonRounded = forwardRef((props, ref) => /* @__PURE__ */ jsx4(Skeleton, { ref, variant: "rounded", ...props }));
|
|
236
|
+
var SkeletonCard = forwardRef(
|
|
237
|
+
({
|
|
238
|
+
showAvatar = true,
|
|
239
|
+
showTitle = true,
|
|
240
|
+
showDescription = true,
|
|
241
|
+
showActions = true,
|
|
242
|
+
lines = 2,
|
|
243
|
+
className = "",
|
|
244
|
+
...props
|
|
245
|
+
}, ref) => {
|
|
246
|
+
return /* @__PURE__ */ jsxs3(
|
|
247
|
+
"div",
|
|
248
|
+
{
|
|
249
|
+
ref,
|
|
250
|
+
className: cn(
|
|
251
|
+
"w-full p-4 bg-background border border-border-200 rounded-lg",
|
|
252
|
+
className
|
|
253
|
+
),
|
|
254
|
+
...props,
|
|
255
|
+
children: [
|
|
256
|
+
/* @__PURE__ */ jsxs3("div", { className: "flex items-start space-x-3", children: [
|
|
257
|
+
showAvatar && /* @__PURE__ */ jsx4(SkeletonCircle, { width: 40, height: 40 }),
|
|
258
|
+
/* @__PURE__ */ jsxs3("div", { className: "flex-1 space-y-2", children: [
|
|
259
|
+
showTitle && /* @__PURE__ */ jsx4(SkeletonText, { width: "60%", height: 20 }),
|
|
260
|
+
showDescription && /* @__PURE__ */ jsx4(SkeletonText, { lines, spacing: "small" })
|
|
261
|
+
] })
|
|
262
|
+
] }),
|
|
263
|
+
showActions && /* @__PURE__ */ jsxs3("div", { className: "flex justify-end space-x-2 mt-4", children: [
|
|
264
|
+
/* @__PURE__ */ jsx4(SkeletonRectangle, { width: 80, height: 32 }),
|
|
265
|
+
/* @__PURE__ */ jsx4(SkeletonRectangle, { width: 80, height: 32 })
|
|
266
|
+
] })
|
|
267
|
+
]
|
|
268
|
+
}
|
|
269
|
+
);
|
|
270
|
+
}
|
|
271
|
+
);
|
|
272
|
+
var SkeletonList = forwardRef(
|
|
273
|
+
({
|
|
274
|
+
items = 3,
|
|
275
|
+
showAvatar = true,
|
|
276
|
+
showTitle = true,
|
|
277
|
+
showDescription = true,
|
|
278
|
+
lines = 1,
|
|
279
|
+
className = "",
|
|
280
|
+
...props
|
|
281
|
+
}, ref) => {
|
|
282
|
+
return /* @__PURE__ */ jsx4("div", { ref, className: cn("space-y-3", className), ...props, children: Array.from({ length: items }, (_, index) => /* @__PURE__ */ jsxs3("div", { className: "flex items-start space-x-3 p-3", children: [
|
|
283
|
+
showAvatar && /* @__PURE__ */ jsx4(SkeletonCircle, { width: 32, height: 32 }),
|
|
284
|
+
/* @__PURE__ */ jsxs3("div", { className: "flex-1 space-y-2", children: [
|
|
285
|
+
showTitle && /* @__PURE__ */ jsx4(SkeletonText, { width: "40%", height: 16 }),
|
|
286
|
+
showDescription && /* @__PURE__ */ jsx4(SkeletonText, { lines, spacing: "small" })
|
|
287
|
+
] })
|
|
288
|
+
] }, index)) });
|
|
289
|
+
}
|
|
290
|
+
);
|
|
291
|
+
var SkeletonTable = forwardRef(
|
|
292
|
+
({ rows = 5, columns = 4, showHeader = true, className = "", ...props }, ref) => {
|
|
293
|
+
return /* @__PURE__ */ jsxs3("div", { ref, className: cn("w-full", className), ...props, children: [
|
|
294
|
+
showHeader && /* @__PURE__ */ jsx4("div", { className: "flex space-x-2 mb-3", children: Array.from({ length: columns }, (_, index) => /* @__PURE__ */ jsx4(
|
|
295
|
+
SkeletonText,
|
|
296
|
+
{
|
|
297
|
+
width: `${100 / columns}%`,
|
|
298
|
+
height: 20
|
|
299
|
+
},
|
|
300
|
+
index
|
|
301
|
+
)) }),
|
|
302
|
+
/* @__PURE__ */ jsx4("div", { className: "space-y-2", children: Array.from({ length: rows }, (_, rowIndex) => /* @__PURE__ */ jsx4("div", { className: "flex space-x-2", children: Array.from({ length: columns }, (_2, colIndex) => /* @__PURE__ */ jsx4(
|
|
303
|
+
SkeletonText,
|
|
304
|
+
{
|
|
305
|
+
width: `${100 / columns}%`,
|
|
306
|
+
height: 16
|
|
307
|
+
},
|
|
308
|
+
colIndex
|
|
309
|
+
)) }, rowIndex)) })
|
|
310
|
+
] });
|
|
311
|
+
}
|
|
312
|
+
);
|
|
313
|
+
|
|
163
314
|
// src/components/Table/TablePagination.tsx
|
|
164
315
|
import { CaretLeft, CaretRight, CaretDown } from "phosphor-react";
|
|
165
|
-
import { jsx as
|
|
316
|
+
import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
166
317
|
var TablePagination = ({
|
|
167
318
|
totalItems,
|
|
168
319
|
currentPage,
|
|
@@ -193,7 +344,7 @@ var TablePagination = ({
|
|
|
193
344
|
};
|
|
194
345
|
const isFirstPage = currentPage === 1;
|
|
195
346
|
const isLastPage = currentPage === totalPages;
|
|
196
|
-
return /* @__PURE__ */
|
|
347
|
+
return /* @__PURE__ */ jsxs4(
|
|
197
348
|
"div",
|
|
198
349
|
{
|
|
199
350
|
className: cn(
|
|
@@ -203,29 +354,29 @@ var TablePagination = ({
|
|
|
203
354
|
),
|
|
204
355
|
...props,
|
|
205
356
|
children: [
|
|
206
|
-
/* @__PURE__ */
|
|
357
|
+
/* @__PURE__ */ jsxs4("span", { className: "font-normal text-xs leading-[14px] text-text-800", children: [
|
|
207
358
|
startItem,
|
|
208
359
|
" de ",
|
|
209
360
|
totalItems,
|
|
210
361
|
" ",
|
|
211
362
|
itemLabel
|
|
212
363
|
] }),
|
|
213
|
-
/* @__PURE__ */
|
|
214
|
-
onItemsPerPageChange && /* @__PURE__ */
|
|
215
|
-
/* @__PURE__ */
|
|
364
|
+
/* @__PURE__ */ jsxs4("div", { className: "flex flex-wrap sm:flex-nowrap items-center gap-2 sm:gap-4 justify-center sm:justify-start", children: [
|
|
365
|
+
onItemsPerPageChange && /* @__PURE__ */ jsxs4("div", { className: "relative", children: [
|
|
366
|
+
/* @__PURE__ */ jsx5(
|
|
216
367
|
"select",
|
|
217
368
|
{
|
|
218
369
|
value: itemsPerPage,
|
|
219
370
|
onChange: handleItemsPerPageChange,
|
|
220
371
|
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",
|
|
221
372
|
"aria-label": "Items por p\xE1gina",
|
|
222
|
-
children: itemsPerPageOptions.map((option) => /* @__PURE__ */
|
|
373
|
+
children: itemsPerPageOptions.map((option) => /* @__PURE__ */ jsxs4("option", { value: option, children: [
|
|
223
374
|
option,
|
|
224
375
|
" itens"
|
|
225
376
|
] }, option))
|
|
226
377
|
}
|
|
227
378
|
),
|
|
228
|
-
/* @__PURE__ */
|
|
379
|
+
/* @__PURE__ */ jsx5(
|
|
229
380
|
CaretDown,
|
|
230
381
|
{
|
|
231
382
|
size: 14,
|
|
@@ -234,13 +385,13 @@ var TablePagination = ({
|
|
|
234
385
|
}
|
|
235
386
|
)
|
|
236
387
|
] }),
|
|
237
|
-
/* @__PURE__ */
|
|
388
|
+
/* @__PURE__ */ jsxs4("span", { className: "font-normal text-xs leading-[14px] text-text-950", children: [
|
|
238
389
|
"P\xE1gina ",
|
|
239
390
|
currentPage,
|
|
240
391
|
" de ",
|
|
241
392
|
totalPages
|
|
242
393
|
] }),
|
|
243
|
-
/* @__PURE__ */
|
|
394
|
+
/* @__PURE__ */ jsxs4(
|
|
244
395
|
"button",
|
|
245
396
|
{
|
|
246
397
|
onClick: handlePrevious,
|
|
@@ -251,12 +402,12 @@ var TablePagination = ({
|
|
|
251
402
|
),
|
|
252
403
|
"aria-label": "P\xE1gina anterior",
|
|
253
404
|
children: [
|
|
254
|
-
/* @__PURE__ */
|
|
255
|
-
/* @__PURE__ */
|
|
405
|
+
/* @__PURE__ */ jsx5(CaretLeft, { size: 12, weight: "bold", className: "text-primary-950" }),
|
|
406
|
+
/* @__PURE__ */ jsx5("span", { className: "font-medium text-xs leading-[14px] text-primary-950", children: "Anterior" })
|
|
256
407
|
]
|
|
257
408
|
}
|
|
258
409
|
),
|
|
259
|
-
/* @__PURE__ */
|
|
410
|
+
/* @__PURE__ */ jsxs4(
|
|
260
411
|
"button",
|
|
261
412
|
{
|
|
262
413
|
onClick: handleNext,
|
|
@@ -267,8 +418,8 @@ var TablePagination = ({
|
|
|
267
418
|
),
|
|
268
419
|
"aria-label": "Pr\xF3xima p\xE1gina",
|
|
269
420
|
children: [
|
|
270
|
-
/* @__PURE__ */
|
|
271
|
-
/* @__PURE__ */
|
|
421
|
+
/* @__PURE__ */ jsx5("span", { className: "font-medium text-xs leading-[14px] text-primary-950", children: "Pr\xF3xima" }),
|
|
422
|
+
/* @__PURE__ */ jsx5(CaretRight, { size: 12, weight: "bold", className: "text-primary-950" })
|
|
272
423
|
]
|
|
273
424
|
}
|
|
274
425
|
)
|
|
@@ -281,7 +432,7 @@ TablePagination.displayName = "TablePagination";
|
|
|
281
432
|
var TablePagination_default = TablePagination;
|
|
282
433
|
|
|
283
434
|
// src/components/Table/Table.tsx
|
|
284
|
-
import { jsx as
|
|
435
|
+
import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
285
436
|
function useTableSort(data, options = {}) {
|
|
286
437
|
const { syncWithUrl = false } = options;
|
|
287
438
|
const getInitialState = () => {
|
|
@@ -351,121 +502,157 @@ function useTableSort(data, options = {}) {
|
|
|
351
502
|
}, [data, sortColumn, sortDirection]);
|
|
352
503
|
return { sortedData, sortColumn, sortDirection, handleSort };
|
|
353
504
|
}
|
|
354
|
-
var
|
|
505
|
+
var renderHeaderElements = (children) => {
|
|
506
|
+
return Children.map(children, (child) => {
|
|
507
|
+
if (isValidElement(child) && (child.type === TableCaption || child.type === TableHeader)) {
|
|
508
|
+
return child;
|
|
509
|
+
}
|
|
510
|
+
return null;
|
|
511
|
+
});
|
|
512
|
+
};
|
|
513
|
+
var getNoSearchResultContent = (config, defaultTitle, defaultDescription) => {
|
|
514
|
+
if (config.component) {
|
|
515
|
+
return config.component;
|
|
516
|
+
}
|
|
517
|
+
if (config.image) {
|
|
518
|
+
return /* @__PURE__ */ jsx6(
|
|
519
|
+
NoSearchResult_default,
|
|
520
|
+
{
|
|
521
|
+
image: config.image,
|
|
522
|
+
title: config.title || defaultTitle,
|
|
523
|
+
description: config.description || defaultDescription
|
|
524
|
+
}
|
|
525
|
+
);
|
|
526
|
+
}
|
|
527
|
+
return /* @__PURE__ */ jsxs5("div", { className: "text-center", children: [
|
|
528
|
+
/* @__PURE__ */ jsx6("p", { className: "text-text-600 text-lg font-semibold mb-2", children: config.title || defaultTitle }),
|
|
529
|
+
/* @__PURE__ */ jsx6("p", { className: "text-text-500 text-sm", children: config.description || defaultDescription })
|
|
530
|
+
] });
|
|
531
|
+
};
|
|
532
|
+
var getEmptyStateContent = (config, defaultMessage, defaultButtonText, onButtonClick) => {
|
|
533
|
+
if (config?.component) {
|
|
534
|
+
return config.component;
|
|
535
|
+
}
|
|
536
|
+
return /* @__PURE__ */ jsxs5("div", { className: "flex flex-col items-center justify-center gap-4", children: [
|
|
537
|
+
config?.image && /* @__PURE__ */ jsx6(
|
|
538
|
+
"img",
|
|
539
|
+
{
|
|
540
|
+
src: config.image,
|
|
541
|
+
alt: "Empty state",
|
|
542
|
+
className: "w-auto h-auto max-w-full"
|
|
543
|
+
}
|
|
544
|
+
),
|
|
545
|
+
/* @__PURE__ */ jsx6("p", { className: "text-text-600 text-base font-normal", children: config?.message || defaultMessage }),
|
|
546
|
+
(config?.onButtonClick || onButtonClick) && /* @__PURE__ */ jsx6(
|
|
547
|
+
Button_default,
|
|
548
|
+
{
|
|
549
|
+
variant: "solid",
|
|
550
|
+
action: "primary",
|
|
551
|
+
size: "medium",
|
|
552
|
+
onClick: config?.onButtonClick || onButtonClick,
|
|
553
|
+
children: config?.buttonText || defaultButtonText
|
|
554
|
+
}
|
|
555
|
+
)
|
|
556
|
+
] });
|
|
557
|
+
};
|
|
558
|
+
var renderTableWrapper = (variant, tableRef, className, children, stateContent, tableProps) => {
|
|
559
|
+
return /* @__PURE__ */ jsxs5(
|
|
560
|
+
"div",
|
|
561
|
+
{
|
|
562
|
+
className: cn(
|
|
563
|
+
"relative w-full overflow-x-auto",
|
|
564
|
+
variant === "default" && "border border-border-200 rounded-xl"
|
|
565
|
+
),
|
|
566
|
+
children: [
|
|
567
|
+
/* @__PURE__ */ jsx6(
|
|
568
|
+
"table",
|
|
569
|
+
{
|
|
570
|
+
ref: tableRef,
|
|
571
|
+
className: cn(
|
|
572
|
+
"analytica-table w-full caption-bottom text-sm border-separate border-spacing-0",
|
|
573
|
+
className
|
|
574
|
+
),
|
|
575
|
+
...tableProps,
|
|
576
|
+
children: renderHeaderElements(children)
|
|
577
|
+
}
|
|
578
|
+
),
|
|
579
|
+
/* @__PURE__ */ jsx6("div", { className: "py-8 flex justify-center", children: stateContent })
|
|
580
|
+
]
|
|
581
|
+
}
|
|
582
|
+
);
|
|
583
|
+
};
|
|
584
|
+
var Table = forwardRef2(
|
|
355
585
|
({
|
|
356
586
|
variant = "default",
|
|
357
587
|
className,
|
|
358
588
|
children,
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
onEmptyStateButtonClick,
|
|
589
|
+
showLoading = false,
|
|
590
|
+
loadingState,
|
|
591
|
+
showNoSearchResult = false,
|
|
592
|
+
noSearchResultState,
|
|
593
|
+
showEmpty = false,
|
|
594
|
+
emptyState,
|
|
366
595
|
...props
|
|
367
596
|
}, ref) => {
|
|
368
|
-
const
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
});
|
|
380
|
-
return
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
const rowProps = row.props;
|
|
390
|
-
count = Children.count(rowProps.children);
|
|
391
|
-
}
|
|
392
|
-
});
|
|
393
|
-
}
|
|
394
|
-
});
|
|
395
|
-
return count || 1;
|
|
396
|
-
}, [children]);
|
|
397
|
-
const hasSearchTerm = searchTerm && searchTerm.trim() !== "";
|
|
398
|
-
const showNoSearchResult = hasSearchTerm && isTableBodyEmpty;
|
|
399
|
-
const showEmptyState = !hasSearchTerm && isTableBodyEmpty;
|
|
597
|
+
const defaultNoSearchResultState = {
|
|
598
|
+
title: "Nenhum resultado encontrado",
|
|
599
|
+
description: "N\xE3o encontramos nenhum resultado com esse nome. Tente revisar a busca ou usar outra palavra-chave."
|
|
600
|
+
};
|
|
601
|
+
const defaultEmptyState = {
|
|
602
|
+
message: "Nenhum dado dispon\xEDvel no momento.",
|
|
603
|
+
buttonText: "Adicionar item"
|
|
604
|
+
};
|
|
605
|
+
const finalNoSearchResultState = noSearchResultState || defaultNoSearchResultState;
|
|
606
|
+
const finalEmptyState = emptyState || defaultEmptyState;
|
|
607
|
+
if (showLoading) {
|
|
608
|
+
const loadingContent = loadingState?.component || /* @__PURE__ */ jsx6(SkeletonTable, { rows: 5, columns: 4, showHeader: false });
|
|
609
|
+
return renderTableWrapper(
|
|
610
|
+
variant,
|
|
611
|
+
ref,
|
|
612
|
+
className,
|
|
613
|
+
children,
|
|
614
|
+
loadingContent,
|
|
615
|
+
props
|
|
616
|
+
);
|
|
617
|
+
}
|
|
400
618
|
if (showNoSearchResult) {
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
className: cn(
|
|
414
|
-
"analytica-table w-full caption-bottom text-sm border-separate border-spacing-0",
|
|
415
|
-
className
|
|
416
|
-
),
|
|
417
|
-
...props,
|
|
418
|
-
children: Children.map(children, (child) => {
|
|
419
|
-
if (isValidElement(child) && (child.type === TableCaption || child.type === TableHeader)) {
|
|
420
|
-
return child;
|
|
421
|
-
}
|
|
422
|
-
return null;
|
|
423
|
-
})
|
|
424
|
-
}
|
|
425
|
-
),
|
|
426
|
-
/* @__PURE__ */ jsx5("div", { className: "py-8 flex justify-center", children: noSearchResultImage ? /* @__PURE__ */ jsx5(
|
|
427
|
-
NoSearchResult_default,
|
|
428
|
-
{
|
|
429
|
-
image: noSearchResultImage,
|
|
430
|
-
title: noSearchResultTitle,
|
|
431
|
-
description: noSearchResultDescription
|
|
432
|
-
}
|
|
433
|
-
) : /* @__PURE__ */ jsxs4("div", { className: "text-center", children: [
|
|
434
|
-
/* @__PURE__ */ jsx5("p", { className: "text-text-600 text-lg font-semibold mb-2", children: noSearchResultTitle }),
|
|
435
|
-
/* @__PURE__ */ jsx5("p", { className: "text-text-500 text-sm", children: noSearchResultDescription })
|
|
436
|
-
] }) })
|
|
437
|
-
]
|
|
438
|
-
}
|
|
619
|
+
const noSearchContent = getNoSearchResultContent(
|
|
620
|
+
finalNoSearchResultState,
|
|
621
|
+
defaultNoSearchResultState.title || "",
|
|
622
|
+
defaultNoSearchResultState.description || ""
|
|
623
|
+
);
|
|
624
|
+
return renderTableWrapper(
|
|
625
|
+
variant,
|
|
626
|
+
ref,
|
|
627
|
+
className,
|
|
628
|
+
children,
|
|
629
|
+
noSearchContent,
|
|
630
|
+
props
|
|
439
631
|
);
|
|
440
632
|
}
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
});
|
|
458
|
-
}
|
|
459
|
-
return child;
|
|
460
|
-
});
|
|
461
|
-
return /* @__PURE__ */ jsx5(
|
|
633
|
+
if (showEmpty) {
|
|
634
|
+
const emptyContent = getEmptyStateContent(
|
|
635
|
+
finalEmptyState,
|
|
636
|
+
defaultEmptyState.message || "Nenhum dado dispon\xEDvel no momento.",
|
|
637
|
+
defaultEmptyState.buttonText || "Adicionar item"
|
|
638
|
+
);
|
|
639
|
+
return renderTableWrapper(
|
|
640
|
+
variant,
|
|
641
|
+
ref,
|
|
642
|
+
className,
|
|
643
|
+
children,
|
|
644
|
+
emptyContent,
|
|
645
|
+
props
|
|
646
|
+
);
|
|
647
|
+
}
|
|
648
|
+
return /* @__PURE__ */ jsx6(
|
|
462
649
|
"div",
|
|
463
650
|
{
|
|
464
651
|
className: cn(
|
|
465
652
|
"relative w-full overflow-x-auto",
|
|
466
653
|
variant === "default" && "border border-border-200 rounded-xl"
|
|
467
654
|
),
|
|
468
|
-
children: /* @__PURE__ */
|
|
655
|
+
children: /* @__PURE__ */ jsxs5(
|
|
469
656
|
"table",
|
|
470
657
|
{
|
|
471
658
|
ref,
|
|
@@ -479,8 +666,8 @@ var Table = forwardRef(
|
|
|
479
666
|
children: [
|
|
480
667
|
!Children.toArray(children).some(
|
|
481
668
|
(child) => isValidElement(child) && child.type === TableCaption
|
|
482
|
-
) && /* @__PURE__ */
|
|
483
|
-
|
|
669
|
+
) && /* @__PURE__ */ jsx6("caption", { className: "sr-only", children: "My Table" }),
|
|
670
|
+
children
|
|
484
671
|
]
|
|
485
672
|
}
|
|
486
673
|
)
|
|
@@ -489,7 +676,7 @@ var Table = forwardRef(
|
|
|
489
676
|
}
|
|
490
677
|
);
|
|
491
678
|
Table.displayName = "Table";
|
|
492
|
-
var TableHeader =
|
|
679
|
+
var TableHeader = forwardRef2(({ className, ...props }, ref) => /* @__PURE__ */ jsx6(
|
|
493
680
|
"thead",
|
|
494
681
|
{
|
|
495
682
|
ref,
|
|
@@ -498,8 +685,8 @@ var TableHeader = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ j
|
|
|
498
685
|
}
|
|
499
686
|
));
|
|
500
687
|
TableHeader.displayName = "TableHeader";
|
|
501
|
-
var TableBody =
|
|
502
|
-
({ className, variant = "default", ...props }, ref) => /* @__PURE__ */
|
|
688
|
+
var TableBody = forwardRef2(
|
|
689
|
+
({ className, variant = "default", ...props }, ref) => /* @__PURE__ */ jsx6(
|
|
503
690
|
"tbody",
|
|
504
691
|
{
|
|
505
692
|
ref,
|
|
@@ -513,8 +700,8 @@ var TableBody = forwardRef(
|
|
|
513
700
|
)
|
|
514
701
|
);
|
|
515
702
|
TableBody.displayName = "TableBody";
|
|
516
|
-
var TableFooter =
|
|
517
|
-
({ variant = "default", className, ...props }, ref) => /* @__PURE__ */
|
|
703
|
+
var TableFooter = forwardRef2(
|
|
704
|
+
({ variant = "default", className, ...props }, ref) => /* @__PURE__ */ jsx6(
|
|
518
705
|
"tfoot",
|
|
519
706
|
{
|
|
520
707
|
ref,
|
|
@@ -550,7 +737,7 @@ var VARIANT_STATES_ROW = {
|
|
|
550
737
|
borderless: "bg-background-50 opacity-50 cursor-not-allowed"
|
|
551
738
|
}
|
|
552
739
|
};
|
|
553
|
-
var TableRow =
|
|
740
|
+
var TableRow = forwardRef2(
|
|
554
741
|
({
|
|
555
742
|
variant = "default",
|
|
556
743
|
state = "default",
|
|
@@ -558,7 +745,7 @@ var TableRow = forwardRef(
|
|
|
558
745
|
className,
|
|
559
746
|
...props
|
|
560
747
|
}, ref) => {
|
|
561
|
-
return /* @__PURE__ */
|
|
748
|
+
return /* @__PURE__ */ jsx6(
|
|
562
749
|
"tr",
|
|
563
750
|
{
|
|
564
751
|
ref,
|
|
@@ -576,7 +763,7 @@ var TableRow = forwardRef(
|
|
|
576
763
|
}
|
|
577
764
|
);
|
|
578
765
|
TableRow.displayName = "TableRow";
|
|
579
|
-
var TableHead =
|
|
766
|
+
var TableHead = forwardRef2(
|
|
580
767
|
({
|
|
581
768
|
className,
|
|
582
769
|
sortable = true,
|
|
@@ -590,7 +777,7 @@ var TableHead = forwardRef(
|
|
|
590
777
|
onSort();
|
|
591
778
|
}
|
|
592
779
|
};
|
|
593
|
-
return /* @__PURE__ */
|
|
780
|
+
return /* @__PURE__ */ jsx6(
|
|
594
781
|
"th",
|
|
595
782
|
{
|
|
596
783
|
ref,
|
|
@@ -601,11 +788,11 @@ var TableHead = forwardRef(
|
|
|
601
788
|
),
|
|
602
789
|
onClick: handleClick,
|
|
603
790
|
...props,
|
|
604
|
-
children: /* @__PURE__ */
|
|
791
|
+
children: /* @__PURE__ */ jsxs5("div", { className: "flex items-center gap-2", children: [
|
|
605
792
|
children,
|
|
606
|
-
sortable && /* @__PURE__ */
|
|
607
|
-
sortDirection === "asc" && /* @__PURE__ */
|
|
608
|
-
sortDirection === "desc" && /* @__PURE__ */
|
|
793
|
+
sortable && /* @__PURE__ */ jsxs5("div", { className: "flex flex-col", children: [
|
|
794
|
+
sortDirection === "asc" && /* @__PURE__ */ jsx6(CaretUp, { size: 16, weight: "fill", className: "text-text-800" }),
|
|
795
|
+
sortDirection === "desc" && /* @__PURE__ */ jsx6(CaretDown2, { size: 16, weight: "fill", className: "text-text-800" })
|
|
609
796
|
] })
|
|
610
797
|
] })
|
|
611
798
|
}
|
|
@@ -613,7 +800,7 @@ var TableHead = forwardRef(
|
|
|
613
800
|
}
|
|
614
801
|
);
|
|
615
802
|
TableHead.displayName = "TableHead";
|
|
616
|
-
var TableCell =
|
|
803
|
+
var TableCell = forwardRef2(({ className, ...props }, ref) => /* @__PURE__ */ jsx6(
|
|
617
804
|
"td",
|
|
618
805
|
{
|
|
619
806
|
ref,
|
|
@@ -625,7 +812,7 @@ var TableCell = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx
|
|
|
625
812
|
}
|
|
626
813
|
));
|
|
627
814
|
TableCell.displayName = "TableCell";
|
|
628
|
-
var TableCaption =
|
|
815
|
+
var TableCaption = forwardRef2(({ className, ...props }, ref) => /* @__PURE__ */ jsx6(
|
|
629
816
|
"caption",
|
|
630
817
|
{
|
|
631
818
|
ref,
|
|
@@ -738,7 +925,7 @@ var useTableFilter = (initialConfigs, options = {}) => {
|
|
|
738
925
|
// src/components/Search/Search.tsx
|
|
739
926
|
import { X as X2, MagnifyingGlass } from "phosphor-react";
|
|
740
927
|
import {
|
|
741
|
-
forwardRef as
|
|
928
|
+
forwardRef as forwardRef5,
|
|
742
929
|
useState as useState5,
|
|
743
930
|
useId as useId2,
|
|
744
931
|
useMemo as useMemo3,
|
|
@@ -749,12 +936,12 @@ import {
|
|
|
749
936
|
// src/components/DropdownMenu/DropdownMenu.tsx
|
|
750
937
|
import { CaretRight as CaretRight2, SignOut, User } from "phosphor-react";
|
|
751
938
|
import {
|
|
752
|
-
forwardRef as
|
|
939
|
+
forwardRef as forwardRef4,
|
|
753
940
|
useEffect as useEffect6,
|
|
754
941
|
useRef,
|
|
755
942
|
isValidElement as isValidElement2,
|
|
756
943
|
Children as Children2,
|
|
757
|
-
cloneElement
|
|
944
|
+
cloneElement,
|
|
758
945
|
useState as useState4
|
|
759
946
|
} from "react";
|
|
760
947
|
import { create as create2, useStore } from "zustand";
|
|
@@ -808,7 +995,7 @@ var getYouTubeEmbedUrl = (videoId) => {
|
|
|
808
995
|
};
|
|
809
996
|
|
|
810
997
|
// src/components/Modal/Modal.tsx
|
|
811
|
-
import { jsx as
|
|
998
|
+
import { jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
812
999
|
var SIZE_CLASSES2 = {
|
|
813
1000
|
xs: "max-w-[360px]",
|
|
814
1001
|
sm: "max-w-[420px]",
|
|
@@ -893,7 +1080,7 @@ var Modal = ({
|
|
|
893
1080
|
}
|
|
894
1081
|
};
|
|
895
1082
|
if (variant === "activity") {
|
|
896
|
-
return /* @__PURE__ */
|
|
1083
|
+
return /* @__PURE__ */ jsx7("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__ */ jsxs6(
|
|
897
1084
|
"dialog",
|
|
898
1085
|
{
|
|
899
1086
|
className: modalClasses,
|
|
@@ -901,17 +1088,17 @@ var Modal = ({
|
|
|
901
1088
|
"aria-modal": "true",
|
|
902
1089
|
open: true,
|
|
903
1090
|
children: [
|
|
904
|
-
/* @__PURE__ */
|
|
1091
|
+
/* @__PURE__ */ jsx7("div", { className: "flex justify-end p-6 pb-0", children: !hideCloseButton && /* @__PURE__ */ jsx7(
|
|
905
1092
|
"button",
|
|
906
1093
|
{
|
|
907
1094
|
onClick: onClose,
|
|
908
1095
|
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",
|
|
909
1096
|
"aria-label": "Fechar modal",
|
|
910
|
-
children: /* @__PURE__ */
|
|
1097
|
+
children: /* @__PURE__ */ jsx7(X, { size: 18 })
|
|
911
1098
|
}
|
|
912
1099
|
) }),
|
|
913
|
-
/* @__PURE__ */
|
|
914
|
-
image && /* @__PURE__ */
|
|
1100
|
+
/* @__PURE__ */ jsxs6("div", { className: "flex flex-col items-center px-6 pb-6 gap-5", children: [
|
|
1101
|
+
image && /* @__PURE__ */ jsx7("div", { className: "flex justify-center", children: /* @__PURE__ */ jsx7(
|
|
915
1102
|
"img",
|
|
916
1103
|
{
|
|
917
1104
|
src: image,
|
|
@@ -919,7 +1106,7 @@ var Modal = ({
|
|
|
919
1106
|
className: "w-[122px] h-[122px] object-contain"
|
|
920
1107
|
}
|
|
921
1108
|
) }),
|
|
922
|
-
/* @__PURE__ */
|
|
1109
|
+
/* @__PURE__ */ jsx7(
|
|
923
1110
|
"h2",
|
|
924
1111
|
{
|
|
925
1112
|
id: titleId,
|
|
@@ -927,15 +1114,15 @@ var Modal = ({
|
|
|
927
1114
|
children: title
|
|
928
1115
|
}
|
|
929
1116
|
),
|
|
930
|
-
description && /* @__PURE__ */
|
|
931
|
-
actionLink && /* @__PURE__ */
|
|
1117
|
+
description && /* @__PURE__ */ jsx7("p", { className: "text-sm font-normal text-text-400 text-center max-w-md leading-[21px]", children: description }),
|
|
1118
|
+
actionLink && /* @__PURE__ */ jsxs6("div", { className: "w-full", children: [
|
|
932
1119
|
(() => {
|
|
933
1120
|
const normalized = normalizeUrl(actionLink);
|
|
934
1121
|
const isYT = isYouTubeUrl(normalized);
|
|
935
1122
|
if (!isYT) return null;
|
|
936
1123
|
const id = getYouTubeVideoId(normalized);
|
|
937
1124
|
if (!id) {
|
|
938
|
-
return /* @__PURE__ */
|
|
1125
|
+
return /* @__PURE__ */ jsx7(
|
|
939
1126
|
Button_default,
|
|
940
1127
|
{
|
|
941
1128
|
variant: "solid",
|
|
@@ -947,7 +1134,7 @@ var Modal = ({
|
|
|
947
1134
|
}
|
|
948
1135
|
);
|
|
949
1136
|
}
|
|
950
|
-
return /* @__PURE__ */
|
|
1137
|
+
return /* @__PURE__ */ jsx7(
|
|
951
1138
|
"iframe",
|
|
952
1139
|
{
|
|
953
1140
|
src: getYouTubeEmbedUrl(id),
|
|
@@ -958,7 +1145,7 @@ var Modal = ({
|
|
|
958
1145
|
}
|
|
959
1146
|
);
|
|
960
1147
|
})(),
|
|
961
|
-
!isYouTubeUrl(normalizeUrl(actionLink)) && /* @__PURE__ */
|
|
1148
|
+
!isYouTubeUrl(normalizeUrl(actionLink)) && /* @__PURE__ */ jsx7(
|
|
962
1149
|
Button_default,
|
|
963
1150
|
{
|
|
964
1151
|
variant: "solid",
|
|
@@ -975,7 +1162,7 @@ var Modal = ({
|
|
|
975
1162
|
}
|
|
976
1163
|
) });
|
|
977
1164
|
}
|
|
978
|
-
return /* @__PURE__ */
|
|
1165
|
+
return /* @__PURE__ */ jsx7("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__ */ jsxs6(
|
|
979
1166
|
"dialog",
|
|
980
1167
|
{
|
|
981
1168
|
className: modalClasses,
|
|
@@ -983,20 +1170,20 @@ var Modal = ({
|
|
|
983
1170
|
"aria-modal": "true",
|
|
984
1171
|
open: true,
|
|
985
1172
|
children: [
|
|
986
|
-
/* @__PURE__ */
|
|
987
|
-
/* @__PURE__ */
|
|
988
|
-
!hideCloseButton && /* @__PURE__ */
|
|
1173
|
+
/* @__PURE__ */ jsxs6("div", { className: "flex items-center justify-between px-6 py-6", children: [
|
|
1174
|
+
/* @__PURE__ */ jsx7("h2", { id: titleId, className: "text-lg font-semibold text-text-950", children: title }),
|
|
1175
|
+
!hideCloseButton && /* @__PURE__ */ jsx7(
|
|
989
1176
|
"button",
|
|
990
1177
|
{
|
|
991
1178
|
onClick: onClose,
|
|
992
1179
|
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",
|
|
993
1180
|
"aria-label": "Fechar modal",
|
|
994
|
-
children: /* @__PURE__ */
|
|
1181
|
+
children: /* @__PURE__ */ jsx7(X, { size: 18 })
|
|
995
1182
|
}
|
|
996
1183
|
)
|
|
997
1184
|
] }),
|
|
998
|
-
children && /* @__PURE__ */
|
|
999
|
-
footer && /* @__PURE__ */
|
|
1185
|
+
children && /* @__PURE__ */ jsx7("div", { className: cn("px-6 pb-6", contentClassName), children: /* @__PURE__ */ jsx7("div", { className: "text-text-500 font-normal text-sm leading-6", children }) }),
|
|
1186
|
+
footer && /* @__PURE__ */ jsx7("div", { className: "flex justify-end gap-3 px-6 pb-6", children: footer })
|
|
1000
1187
|
]
|
|
1001
1188
|
}
|
|
1002
1189
|
) });
|
|
@@ -1008,9 +1195,9 @@ import { Moon, Sun } from "phosphor-react";
|
|
|
1008
1195
|
import { useState as useState3, useEffect as useEffect5 } from "react";
|
|
1009
1196
|
|
|
1010
1197
|
// src/components/SelectionButton/SelectionButton.tsx
|
|
1011
|
-
import { forwardRef as
|
|
1012
|
-
import { jsx as
|
|
1013
|
-
var SelectionButton =
|
|
1198
|
+
import { forwardRef as forwardRef3 } from "react";
|
|
1199
|
+
import { jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1200
|
+
var SelectionButton = forwardRef3(
|
|
1014
1201
|
({ icon, label, selected = false, className = "", disabled, ...props }, ref) => {
|
|
1015
1202
|
const baseClasses = [
|
|
1016
1203
|
"inline-flex",
|
|
@@ -1042,7 +1229,7 @@ var SelectionButton = forwardRef2(
|
|
|
1042
1229
|
];
|
|
1043
1230
|
const stateClasses = selected ? ["ring-primary-950", "ring-2", "ring-offset-0", "shadow-none"] : [];
|
|
1044
1231
|
const allClasses = [...baseClasses, ...stateClasses].join(" ");
|
|
1045
|
-
return /* @__PURE__ */
|
|
1232
|
+
return /* @__PURE__ */ jsxs7(
|
|
1046
1233
|
"button",
|
|
1047
1234
|
{
|
|
1048
1235
|
ref,
|
|
@@ -1052,8 +1239,8 @@ var SelectionButton = forwardRef2(
|
|
|
1052
1239
|
"aria-pressed": selected,
|
|
1053
1240
|
...props,
|
|
1054
1241
|
children: [
|
|
1055
|
-
/* @__PURE__ */
|
|
1056
|
-
/* @__PURE__ */
|
|
1242
|
+
/* @__PURE__ */ jsx8("span", { className: "flex items-center justify-center w-6 h-6", children: icon }),
|
|
1243
|
+
/* @__PURE__ */ jsx8("span", { children: label })
|
|
1057
1244
|
]
|
|
1058
1245
|
}
|
|
1059
1246
|
);
|
|
@@ -1184,7 +1371,7 @@ var useTheme = () => {
|
|
|
1184
1371
|
};
|
|
1185
1372
|
|
|
1186
1373
|
// src/components/ThemeToggle/ThemeToggle.tsx
|
|
1187
|
-
import { jsx as
|
|
1374
|
+
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
1188
1375
|
var ThemeToggle = ({
|
|
1189
1376
|
variant = "default",
|
|
1190
1377
|
onToggle
|
|
@@ -1198,17 +1385,17 @@ var ThemeToggle = ({
|
|
|
1198
1385
|
{
|
|
1199
1386
|
id: "light",
|
|
1200
1387
|
title: "Claro",
|
|
1201
|
-
icon: /* @__PURE__ */
|
|
1388
|
+
icon: /* @__PURE__ */ jsx9(Sun, { size: 24 })
|
|
1202
1389
|
},
|
|
1203
1390
|
{
|
|
1204
1391
|
id: "dark",
|
|
1205
1392
|
title: "Escuro",
|
|
1206
|
-
icon: /* @__PURE__ */
|
|
1393
|
+
icon: /* @__PURE__ */ jsx9(Moon, { size: 24 })
|
|
1207
1394
|
},
|
|
1208
1395
|
{
|
|
1209
1396
|
id: "system",
|
|
1210
1397
|
title: "Sistema",
|
|
1211
|
-
icon: /* @__PURE__ */
|
|
1398
|
+
icon: /* @__PURE__ */ jsx9(
|
|
1212
1399
|
"svg",
|
|
1213
1400
|
{
|
|
1214
1401
|
width: "25",
|
|
@@ -1216,7 +1403,7 @@ var ThemeToggle = ({
|
|
|
1216
1403
|
viewBox: "0 0 25 25",
|
|
1217
1404
|
fill: "none",
|
|
1218
1405
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1219
|
-
children: /* @__PURE__ */
|
|
1406
|
+
children: /* @__PURE__ */ jsx9(
|
|
1220
1407
|
"path",
|
|
1221
1408
|
{
|
|
1222
1409
|
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",
|
|
@@ -1238,7 +1425,7 @@ var ThemeToggle = ({
|
|
|
1238
1425
|
}
|
|
1239
1426
|
};
|
|
1240
1427
|
const currentTheme = variant === "with-save" ? tempTheme : themeMode;
|
|
1241
|
-
return /* @__PURE__ */
|
|
1428
|
+
return /* @__PURE__ */ jsx9("div", { className: "flex flex-row gap-2 sm:gap-4 py-2", children: problemTypes.map((type) => /* @__PURE__ */ jsx9(
|
|
1242
1429
|
SelectionButton_default,
|
|
1243
1430
|
{
|
|
1244
1431
|
icon: type.icon,
|
|
@@ -1252,7 +1439,7 @@ var ThemeToggle = ({
|
|
|
1252
1439
|
};
|
|
1253
1440
|
|
|
1254
1441
|
// src/components/DropdownMenu/DropdownMenu.tsx
|
|
1255
|
-
import { Fragment, jsx as
|
|
1442
|
+
import { Fragment, jsx as jsx10, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1256
1443
|
function createDropdownStore() {
|
|
1257
1444
|
return create2((set) => ({
|
|
1258
1445
|
open: false,
|
|
@@ -1291,7 +1478,7 @@ var injectStore = (children, store) => {
|
|
|
1291
1478
|
if (typedChild.props.children) {
|
|
1292
1479
|
newProps.children = injectStore(typedChild.props.children, store);
|
|
1293
1480
|
}
|
|
1294
|
-
return
|
|
1481
|
+
return cloneElement(typedChild, newProps);
|
|
1295
1482
|
}
|
|
1296
1483
|
return child;
|
|
1297
1484
|
});
|
|
@@ -1360,7 +1547,7 @@ var DropdownMenu = ({
|
|
|
1360
1547
|
setOpen(propOpen);
|
|
1361
1548
|
}
|
|
1362
1549
|
}, [propOpen]);
|
|
1363
|
-
return /* @__PURE__ */
|
|
1550
|
+
return /* @__PURE__ */ jsx10("div", { className: "relative", ref: menuRef, children: injectStore(children, store) });
|
|
1364
1551
|
};
|
|
1365
1552
|
var DropdownMenuTrigger = ({
|
|
1366
1553
|
className,
|
|
@@ -1372,7 +1559,7 @@ var DropdownMenuTrigger = ({
|
|
|
1372
1559
|
const store = useDropdownStore(externalStore);
|
|
1373
1560
|
const open = useStore(store, (s) => s.open);
|
|
1374
1561
|
const toggleOpen = () => store.setState({ open: !open });
|
|
1375
|
-
return /* @__PURE__ */
|
|
1562
|
+
return /* @__PURE__ */ jsx10(
|
|
1376
1563
|
"div",
|
|
1377
1564
|
{
|
|
1378
1565
|
onClick: (e) => {
|
|
@@ -1416,8 +1603,8 @@ var MENUCONTENT_VARIANT_CLASSES = {
|
|
|
1416
1603
|
menu: "p-1",
|
|
1417
1604
|
profile: "p-6"
|
|
1418
1605
|
};
|
|
1419
|
-
var MenuLabel =
|
|
1420
|
-
return /* @__PURE__ */
|
|
1606
|
+
var MenuLabel = forwardRef4(({ className, inset, store: _store, ...props }, ref) => {
|
|
1607
|
+
return /* @__PURE__ */ jsx10(
|
|
1421
1608
|
"div",
|
|
1422
1609
|
{
|
|
1423
1610
|
ref,
|
|
@@ -1427,7 +1614,7 @@ var MenuLabel = forwardRef3(({ className, inset, store: _store, ...props }, ref)
|
|
|
1427
1614
|
);
|
|
1428
1615
|
});
|
|
1429
1616
|
MenuLabel.displayName = "MenuLabel";
|
|
1430
|
-
var DropdownMenuContent =
|
|
1617
|
+
var DropdownMenuContent = forwardRef4(
|
|
1431
1618
|
({
|
|
1432
1619
|
className,
|
|
1433
1620
|
align = "start",
|
|
@@ -1456,7 +1643,7 @@ var DropdownMenuContent = forwardRef3(
|
|
|
1456
1643
|
return `absolute ${vertical} ${horizontal}`;
|
|
1457
1644
|
};
|
|
1458
1645
|
const variantClasses = MENUCONTENT_VARIANT_CLASSES[variant];
|
|
1459
|
-
return /* @__PURE__ */
|
|
1646
|
+
return /* @__PURE__ */ jsx10(
|
|
1460
1647
|
"div",
|
|
1461
1648
|
{
|
|
1462
1649
|
ref,
|
|
@@ -1481,7 +1668,7 @@ var DropdownMenuContent = forwardRef3(
|
|
|
1481
1668
|
}
|
|
1482
1669
|
);
|
|
1483
1670
|
DropdownMenuContent.displayName = "DropdownMenuContent";
|
|
1484
|
-
var DropdownMenuItem =
|
|
1671
|
+
var DropdownMenuItem = forwardRef4(
|
|
1485
1672
|
({
|
|
1486
1673
|
className,
|
|
1487
1674
|
size = "small",
|
|
@@ -1525,7 +1712,7 @@ var DropdownMenuItem = forwardRef3(
|
|
|
1525
1712
|
const getVariantProps = () => {
|
|
1526
1713
|
return variant === "profile" ? { "data-variant": "profile" } : {};
|
|
1527
1714
|
};
|
|
1528
|
-
return /* @__PURE__ */
|
|
1715
|
+
return /* @__PURE__ */ jsxs8(
|
|
1529
1716
|
"div",
|
|
1530
1717
|
{
|
|
1531
1718
|
ref,
|
|
@@ -1551,7 +1738,7 @@ var DropdownMenuItem = forwardRef3(
|
|
|
1551
1738
|
...props,
|
|
1552
1739
|
children: [
|
|
1553
1740
|
iconLeft,
|
|
1554
|
-
/* @__PURE__ */
|
|
1741
|
+
/* @__PURE__ */ jsx10("div", { className: "w-full", children }),
|
|
1555
1742
|
iconRight
|
|
1556
1743
|
]
|
|
1557
1744
|
}
|
|
@@ -1559,7 +1746,7 @@ var DropdownMenuItem = forwardRef3(
|
|
|
1559
1746
|
}
|
|
1560
1747
|
);
|
|
1561
1748
|
DropdownMenuItem.displayName = "DropdownMenuItem";
|
|
1562
|
-
var DropdownMenuSeparator =
|
|
1749
|
+
var DropdownMenuSeparator = forwardRef4(({ className, store: _store, ...props }, ref) => /* @__PURE__ */ jsx10(
|
|
1563
1750
|
"div",
|
|
1564
1751
|
{
|
|
1565
1752
|
ref,
|
|
@@ -1568,11 +1755,11 @@ var DropdownMenuSeparator = forwardRef3(({ className, store: _store, ...props },
|
|
|
1568
1755
|
}
|
|
1569
1756
|
));
|
|
1570
1757
|
DropdownMenuSeparator.displayName = "DropdownMenuSeparator";
|
|
1571
|
-
var ProfileMenuTrigger =
|
|
1758
|
+
var ProfileMenuTrigger = forwardRef4(({ className, onClick, store: externalStore, ...props }, ref) => {
|
|
1572
1759
|
const store = useDropdownStore(externalStore);
|
|
1573
1760
|
const open = useStore(store, (s) => s.open);
|
|
1574
1761
|
const toggleOpen = () => store.setState({ open: !open });
|
|
1575
|
-
return /* @__PURE__ */
|
|
1762
|
+
return /* @__PURE__ */ jsx10(
|
|
1576
1763
|
"button",
|
|
1577
1764
|
{
|
|
1578
1765
|
ref,
|
|
@@ -1587,13 +1774,13 @@ var ProfileMenuTrigger = forwardRef3(({ className, onClick, store: externalStore
|
|
|
1587
1774
|
},
|
|
1588
1775
|
"aria-expanded": open,
|
|
1589
1776
|
...props,
|
|
1590
|
-
children: /* @__PURE__ */
|
|
1777
|
+
children: /* @__PURE__ */ jsx10("span", { className: "size-6 rounded-full bg-primary-100 flex items-center justify-center", children: /* @__PURE__ */ jsx10(User, { className: "text-primary-950", size: 18 }) })
|
|
1591
1778
|
}
|
|
1592
1779
|
);
|
|
1593
1780
|
});
|
|
1594
1781
|
ProfileMenuTrigger.displayName = "ProfileMenuTrigger";
|
|
1595
|
-
var ProfileMenuHeader =
|
|
1596
|
-
return /* @__PURE__ */
|
|
1782
|
+
var ProfileMenuHeader = forwardRef4(({ className, name, email, photoUrl, store: _store, ...props }, ref) => {
|
|
1783
|
+
return /* @__PURE__ */ jsxs8(
|
|
1597
1784
|
"div",
|
|
1598
1785
|
{
|
|
1599
1786
|
ref,
|
|
@@ -1604,16 +1791,16 @@ var ProfileMenuHeader = forwardRef3(({ className, name, email, photoUrl, store:
|
|
|
1604
1791
|
),
|
|
1605
1792
|
...props,
|
|
1606
1793
|
children: [
|
|
1607
|
-
/* @__PURE__ */
|
|
1794
|
+
/* @__PURE__ */ jsx10("span", { className: "w-16 h-16 bg-primary-100 rounded-full flex items-center justify-center overflow-hidden flex-shrink-0", children: photoUrl ? /* @__PURE__ */ jsx10(
|
|
1608
1795
|
"img",
|
|
1609
1796
|
{
|
|
1610
1797
|
src: photoUrl,
|
|
1611
1798
|
alt: "Foto de perfil",
|
|
1612
1799
|
className: "w-full h-full object-cover"
|
|
1613
1800
|
}
|
|
1614
|
-
) : /* @__PURE__ */
|
|
1615
|
-
/* @__PURE__ */
|
|
1616
|
-
/* @__PURE__ */
|
|
1801
|
+
) : /* @__PURE__ */ jsx10(User, { size: 34, className: "text-primary-800" }) }),
|
|
1802
|
+
/* @__PURE__ */ jsxs8("div", { className: "flex flex-col min-w-0", children: [
|
|
1803
|
+
/* @__PURE__ */ jsx10(
|
|
1617
1804
|
Text_default,
|
|
1618
1805
|
{
|
|
1619
1806
|
size: "xl",
|
|
@@ -1623,14 +1810,14 @@ var ProfileMenuHeader = forwardRef3(({ className, name, email, photoUrl, store:
|
|
|
1623
1810
|
children: name
|
|
1624
1811
|
}
|
|
1625
1812
|
),
|
|
1626
|
-
/* @__PURE__ */
|
|
1813
|
+
/* @__PURE__ */ jsx10(Text_default, { size: "md", color: "text-text-600", className: "truncate", children: email })
|
|
1627
1814
|
] })
|
|
1628
1815
|
]
|
|
1629
1816
|
}
|
|
1630
1817
|
);
|
|
1631
1818
|
});
|
|
1632
1819
|
ProfileMenuHeader.displayName = "ProfileMenuHeader";
|
|
1633
|
-
var ProfileMenuInfo =
|
|
1820
|
+
var ProfileMenuInfo = forwardRef4(
|
|
1634
1821
|
({
|
|
1635
1822
|
className,
|
|
1636
1823
|
schoolName,
|
|
@@ -1639,7 +1826,7 @@ var ProfileMenuInfo = forwardRef3(
|
|
|
1639
1826
|
store: _store,
|
|
1640
1827
|
...props
|
|
1641
1828
|
}, ref) => {
|
|
1642
|
-
return /* @__PURE__ */
|
|
1829
|
+
return /* @__PURE__ */ jsxs8(
|
|
1643
1830
|
"div",
|
|
1644
1831
|
{
|
|
1645
1832
|
ref,
|
|
@@ -1647,13 +1834,13 @@ var ProfileMenuInfo = forwardRef3(
|
|
|
1647
1834
|
className: cn("flex flex-row gap-4 items-center", className),
|
|
1648
1835
|
...props,
|
|
1649
1836
|
children: [
|
|
1650
|
-
/* @__PURE__ */
|
|
1651
|
-
/* @__PURE__ */
|
|
1652
|
-
/* @__PURE__ */
|
|
1653
|
-
/* @__PURE__ */
|
|
1654
|
-
/* @__PURE__ */
|
|
1655
|
-
/* @__PURE__ */
|
|
1656
|
-
/* @__PURE__ */
|
|
1837
|
+
/* @__PURE__ */ jsx10("span", { className: "w-16 h-16" }),
|
|
1838
|
+
/* @__PURE__ */ jsxs8("div", { className: "flex flex-col ", children: [
|
|
1839
|
+
/* @__PURE__ */ jsx10(Text_default, { size: "md", color: "text-text-600", children: schoolName }),
|
|
1840
|
+
/* @__PURE__ */ jsxs8("span", { className: "flex flex-row items-center gap-2", children: [
|
|
1841
|
+
/* @__PURE__ */ jsx10(Text_default, { size: "md", color: "text-text-600", children: classYearName }),
|
|
1842
|
+
/* @__PURE__ */ jsx10("p", { className: "text-text-600 text-xs align-middle", children: "\u25CF" }),
|
|
1843
|
+
/* @__PURE__ */ jsx10(Text_default, { size: "md", color: "text-text-600", children: schoolYearName })
|
|
1657
1844
|
] })
|
|
1658
1845
|
] })
|
|
1659
1846
|
]
|
|
@@ -1688,14 +1875,14 @@ var ProfileToggleTheme = ({
|
|
|
1688
1875
|
setModalThemeToggle(false);
|
|
1689
1876
|
setOpen(false);
|
|
1690
1877
|
};
|
|
1691
|
-
return /* @__PURE__ */
|
|
1692
|
-
/* @__PURE__ */
|
|
1878
|
+
return /* @__PURE__ */ jsxs8(Fragment, { children: [
|
|
1879
|
+
/* @__PURE__ */ jsx10(
|
|
1693
1880
|
DropdownMenuItem,
|
|
1694
1881
|
{
|
|
1695
1882
|
variant: "profile",
|
|
1696
1883
|
preventClose: true,
|
|
1697
1884
|
store,
|
|
1698
|
-
iconLeft: /* @__PURE__ */
|
|
1885
|
+
iconLeft: /* @__PURE__ */ jsx10(
|
|
1699
1886
|
"svg",
|
|
1700
1887
|
{
|
|
1701
1888
|
width: "24",
|
|
@@ -1703,7 +1890,7 @@ var ProfileToggleTheme = ({
|
|
|
1703
1890
|
viewBox: "0 0 25 25",
|
|
1704
1891
|
fill: "none",
|
|
1705
1892
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1706
|
-
children: /* @__PURE__ */
|
|
1893
|
+
children: /* @__PURE__ */ jsx10(
|
|
1707
1894
|
"path",
|
|
1708
1895
|
{
|
|
1709
1896
|
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",
|
|
@@ -1712,7 +1899,7 @@ var ProfileToggleTheme = ({
|
|
|
1712
1899
|
)
|
|
1713
1900
|
}
|
|
1714
1901
|
),
|
|
1715
|
-
iconRight: /* @__PURE__ */
|
|
1902
|
+
iconRight: /* @__PURE__ */ jsx10(CaretRight2, {}),
|
|
1716
1903
|
onClick: handleClick,
|
|
1717
1904
|
onKeyDown: (e) => {
|
|
1718
1905
|
if (e.key === "Enter" || e.key === " ") {
|
|
@@ -1722,31 +1909,31 @@ var ProfileToggleTheme = ({
|
|
|
1722
1909
|
}
|
|
1723
1910
|
},
|
|
1724
1911
|
...props,
|
|
1725
|
-
children: /* @__PURE__ */
|
|
1912
|
+
children: /* @__PURE__ */ jsx10(Text_default, { size: "md", color: "text-text-700", children: "Apar\xEAncia" })
|
|
1726
1913
|
}
|
|
1727
1914
|
),
|
|
1728
|
-
/* @__PURE__ */
|
|
1915
|
+
/* @__PURE__ */ jsx10(
|
|
1729
1916
|
Modal_default,
|
|
1730
1917
|
{
|
|
1731
1918
|
isOpen: modalThemeToggle,
|
|
1732
1919
|
onClose: handleCancel,
|
|
1733
1920
|
title: "Apar\xEAncia",
|
|
1734
1921
|
size: "md",
|
|
1735
|
-
footer: /* @__PURE__ */
|
|
1736
|
-
/* @__PURE__ */
|
|
1737
|
-
/* @__PURE__ */
|
|
1922
|
+
footer: /* @__PURE__ */ jsxs8("div", { className: "flex gap-3", children: [
|
|
1923
|
+
/* @__PURE__ */ jsx10(Button_default, { variant: "outline", onClick: handleCancel, children: "Cancelar" }),
|
|
1924
|
+
/* @__PURE__ */ jsx10(Button_default, { variant: "solid", onClick: handleSave, children: "Salvar" })
|
|
1738
1925
|
] }),
|
|
1739
|
-
children: /* @__PURE__ */
|
|
1740
|
-
/* @__PURE__ */
|
|
1741
|
-
/* @__PURE__ */
|
|
1926
|
+
children: /* @__PURE__ */ jsxs8("div", { className: "flex flex-col", children: [
|
|
1927
|
+
/* @__PURE__ */ jsx10("p", { className: "text-sm text-text-500", children: "Escolha o tema:" }),
|
|
1928
|
+
/* @__PURE__ */ jsx10(ThemeToggle, { variant: "with-save", onToggle: setSelectedTheme })
|
|
1742
1929
|
] })
|
|
1743
1930
|
}
|
|
1744
1931
|
)
|
|
1745
1932
|
] });
|
|
1746
1933
|
};
|
|
1747
1934
|
ProfileToggleTheme.displayName = "ProfileToggleTheme";
|
|
1748
|
-
var ProfileMenuSection =
|
|
1749
|
-
return /* @__PURE__ */
|
|
1935
|
+
var ProfileMenuSection = forwardRef4(({ className, children, store: _store, ...props }, ref) => {
|
|
1936
|
+
return /* @__PURE__ */ jsx10("div", { ref, className: cn("flex flex-col p-2", className), ...props, children });
|
|
1750
1937
|
});
|
|
1751
1938
|
ProfileMenuSection.displayName = "ProfileMenuSection";
|
|
1752
1939
|
var ProfileMenuFooter = ({
|
|
@@ -1758,7 +1945,7 @@ var ProfileMenuFooter = ({
|
|
|
1758
1945
|
}) => {
|
|
1759
1946
|
const store = useDropdownStore(externalStore);
|
|
1760
1947
|
const setOpen = useStore(store, (s) => s.setOpen);
|
|
1761
|
-
return /* @__PURE__ */
|
|
1948
|
+
return /* @__PURE__ */ jsxs8(
|
|
1762
1949
|
Button_default,
|
|
1763
1950
|
{
|
|
1764
1951
|
variant: "outline",
|
|
@@ -1770,8 +1957,8 @@ var ProfileMenuFooter = ({
|
|
|
1770
1957
|
},
|
|
1771
1958
|
...props,
|
|
1772
1959
|
children: [
|
|
1773
|
-
/* @__PURE__ */
|
|
1774
|
-
/* @__PURE__ */
|
|
1960
|
+
/* @__PURE__ */ jsx10("span", { className: "mr-2 flex items-center", children: /* @__PURE__ */ jsx10(SignOut, { className: "text-inherit" }) }),
|
|
1961
|
+
/* @__PURE__ */ jsx10(Text_default, { color: "inherit", children: "Sair" })
|
|
1775
1962
|
]
|
|
1776
1963
|
}
|
|
1777
1964
|
);
|
|
@@ -1780,7 +1967,7 @@ ProfileMenuFooter.displayName = "ProfileMenuFooter";
|
|
|
1780
1967
|
var DropdownMenu_default = DropdownMenu;
|
|
1781
1968
|
|
|
1782
1969
|
// src/components/Search/Search.tsx
|
|
1783
|
-
import { jsx as
|
|
1970
|
+
import { jsx as jsx11, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1784
1971
|
var filterOptions = (options, query) => {
|
|
1785
1972
|
if (!query || query.length < 1) return [];
|
|
1786
1973
|
return options.filter(
|
|
@@ -1805,7 +1992,7 @@ var updateInputValue = (value, ref, onChange) => {
|
|
|
1805
1992
|
onChange(event);
|
|
1806
1993
|
}
|
|
1807
1994
|
};
|
|
1808
|
-
var Search =
|
|
1995
|
+
var Search = forwardRef5(
|
|
1809
1996
|
({
|
|
1810
1997
|
options = [],
|
|
1811
1998
|
onSelect,
|
|
@@ -1926,14 +2113,14 @@ var Search = forwardRef4(
|
|
|
1926
2113
|
const hasValue = String(value ?? "").length > 0;
|
|
1927
2114
|
const showClearButton = hasValue && !disabled && !readOnly;
|
|
1928
2115
|
const showSearchIcon = !hasValue && !disabled && !readOnly;
|
|
1929
|
-
return /* @__PURE__ */
|
|
2116
|
+
return /* @__PURE__ */ jsxs9(
|
|
1930
2117
|
"div",
|
|
1931
2118
|
{
|
|
1932
2119
|
ref: dropdownRef,
|
|
1933
2120
|
className: `w-full max-w-lg md:w-[488px] ${containerClassName}`,
|
|
1934
2121
|
children: [
|
|
1935
|
-
/* @__PURE__ */
|
|
1936
|
-
/* @__PURE__ */
|
|
2122
|
+
/* @__PURE__ */ jsxs9("div", { className: "relative flex items-center", children: [
|
|
2123
|
+
/* @__PURE__ */ jsx11(
|
|
1937
2124
|
"input",
|
|
1938
2125
|
{
|
|
1939
2126
|
ref: (node) => {
|
|
@@ -1961,35 +2148,35 @@ var Search = forwardRef4(
|
|
|
1961
2148
|
...props
|
|
1962
2149
|
}
|
|
1963
2150
|
),
|
|
1964
|
-
showClearButton && /* @__PURE__ */
|
|
2151
|
+
showClearButton && /* @__PURE__ */ jsx11("div", { className: "absolute right-3 top-1/2 transform -translate-y-1/2", children: /* @__PURE__ */ jsx11(
|
|
1965
2152
|
"button",
|
|
1966
2153
|
{
|
|
1967
2154
|
type: "button",
|
|
1968
2155
|
className: "p-0 border-0 bg-transparent cursor-pointer",
|
|
1969
2156
|
onMouseDown: handleClearClick,
|
|
1970
2157
|
"aria-label": "Limpar busca",
|
|
1971
|
-
children: /* @__PURE__ */
|
|
2158
|
+
children: /* @__PURE__ */ jsx11("span", { className: "w-6 h-6 text-text-800 flex items-center justify-center hover:text-text-600 transition-colors", children: /* @__PURE__ */ jsx11(X2, {}) })
|
|
1972
2159
|
}
|
|
1973
2160
|
) }),
|
|
1974
|
-
showSearchIcon && /* @__PURE__ */
|
|
2161
|
+
showSearchIcon && /* @__PURE__ */ jsx11("div", { className: "absolute right-3 top-1/2 transform -translate-y-1/2", children: /* @__PURE__ */ jsx11(
|
|
1975
2162
|
"button",
|
|
1976
2163
|
{
|
|
1977
2164
|
type: "button",
|
|
1978
2165
|
className: "p-0 border-0 bg-transparent cursor-pointer",
|
|
1979
2166
|
onMouseDown: handleSearchIconClick,
|
|
1980
2167
|
"aria-label": "Buscar",
|
|
1981
|
-
children: /* @__PURE__ */
|
|
2168
|
+
children: /* @__PURE__ */ jsx11("span", { className: "w-6 h-6 text-text-800 flex items-center justify-center hover:text-text-600 transition-colors", children: /* @__PURE__ */ jsx11(MagnifyingGlass, {}) })
|
|
1982
2169
|
}
|
|
1983
2170
|
) })
|
|
1984
2171
|
] }),
|
|
1985
|
-
showDropdown && /* @__PURE__ */
|
|
2172
|
+
showDropdown && /* @__PURE__ */ jsx11(DropdownMenu_default, { open: showDropdown, onOpenChange: setDropdownOpen, children: /* @__PURE__ */ jsx11(
|
|
1986
2173
|
DropdownMenuContent,
|
|
1987
2174
|
{
|
|
1988
2175
|
id: dropdownId,
|
|
1989
2176
|
className: "w-full mt-1",
|
|
1990
2177
|
style: { maxHeight: dropdownMaxHeight },
|
|
1991
2178
|
align: "start",
|
|
1992
|
-
children: filteredOptions.length > 0 ? filteredOptions.map((option) => /* @__PURE__ */
|
|
2179
|
+
children: filteredOptions.length > 0 ? filteredOptions.map((option) => /* @__PURE__ */ jsx11(
|
|
1993
2180
|
DropdownMenuItem,
|
|
1994
2181
|
{
|
|
1995
2182
|
onClick: () => handleSelectOption(option),
|
|
@@ -1997,7 +2184,7 @@ var Search = forwardRef4(
|
|
|
1997
2184
|
children: option
|
|
1998
2185
|
},
|
|
1999
2186
|
option
|
|
2000
|
-
)) : /* @__PURE__ */
|
|
2187
|
+
)) : /* @__PURE__ */ jsx11("div", { className: "px-3 py-3 text-text-700 text-base", children: noResultsText })
|
|
2001
2188
|
}
|
|
2002
2189
|
) })
|
|
2003
2190
|
]
|
|
@@ -2013,7 +2200,7 @@ import { useEffect as useEffect11, useMemo as useMemo4, useRef as useRef5, useSt
|
|
|
2013
2200
|
|
|
2014
2201
|
// src/components/Badge/Badge.tsx
|
|
2015
2202
|
import { Bell } from "phosphor-react";
|
|
2016
|
-
import { jsx as
|
|
2203
|
+
import { jsx as jsx12, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
2017
2204
|
var VARIANT_ACTION_CLASSES2 = {
|
|
2018
2205
|
solid: {
|
|
2019
2206
|
error: "bg-error-background text-error-700 focus-visible:outline-none",
|
|
@@ -2075,14 +2262,14 @@ var Badge = ({
|
|
|
2075
2262
|
const baseClasses = "inline-flex items-center justify-center rounded-xs font-normal gap-1 relative";
|
|
2076
2263
|
const baseClassesIcon = "flex items-center";
|
|
2077
2264
|
if (variant === "notification") {
|
|
2078
|
-
return /* @__PURE__ */
|
|
2265
|
+
return /* @__PURE__ */ jsxs10(
|
|
2079
2266
|
"div",
|
|
2080
2267
|
{
|
|
2081
2268
|
className: cn(baseClasses, variantClasses, sizeClasses, className),
|
|
2082
2269
|
...props,
|
|
2083
2270
|
children: [
|
|
2084
|
-
/* @__PURE__ */
|
|
2085
|
-
notificationActive && /* @__PURE__ */
|
|
2271
|
+
/* @__PURE__ */ jsx12(Bell, { size: 24, className: "text-current", "aria-hidden": "true" }),
|
|
2272
|
+
notificationActive && /* @__PURE__ */ jsx12(
|
|
2086
2273
|
"span",
|
|
2087
2274
|
{
|
|
2088
2275
|
"data-testid": "notification-dot",
|
|
@@ -2093,15 +2280,15 @@ var Badge = ({
|
|
|
2093
2280
|
}
|
|
2094
2281
|
);
|
|
2095
2282
|
}
|
|
2096
|
-
return /* @__PURE__ */
|
|
2283
|
+
return /* @__PURE__ */ jsxs10(
|
|
2097
2284
|
"div",
|
|
2098
2285
|
{
|
|
2099
2286
|
className: cn(baseClasses, variantClasses, sizeClasses, className),
|
|
2100
2287
|
...props,
|
|
2101
2288
|
children: [
|
|
2102
|
-
iconLeft && /* @__PURE__ */
|
|
2289
|
+
iconLeft && /* @__PURE__ */ jsx12("span", { className: cn(baseClassesIcon, sizeClassesIcon), children: iconLeft }),
|
|
2103
2290
|
children,
|
|
2104
|
-
iconRight && /* @__PURE__ */
|
|
2291
|
+
iconRight && /* @__PURE__ */ jsx12("span", { className: cn(baseClassesIcon, sizeClassesIcon), children: iconRight })
|
|
2105
2292
|
]
|
|
2106
2293
|
}
|
|
2107
2294
|
);
|
|
@@ -2110,12 +2297,12 @@ var Badge_default = Badge;
|
|
|
2110
2297
|
|
|
2111
2298
|
// src/components/CheckBox/CheckBox.tsx
|
|
2112
2299
|
import {
|
|
2113
|
-
forwardRef as
|
|
2300
|
+
forwardRef as forwardRef6,
|
|
2114
2301
|
useState as useState6,
|
|
2115
2302
|
useId as useId3
|
|
2116
2303
|
} from "react";
|
|
2117
2304
|
import { Check, Minus } from "phosphor-react";
|
|
2118
|
-
import { jsx as
|
|
2305
|
+
import { jsx as jsx13, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
2119
2306
|
var SIZE_CLASSES4 = {
|
|
2120
2307
|
small: {
|
|
2121
2308
|
checkbox: "w-4 h-4",
|
|
@@ -2175,7 +2362,7 @@ var STATE_CLASSES = {
|
|
|
2175
2362
|
checked: "border-primary-600 bg-primary-600 text-text cursor-not-allowed opacity-40"
|
|
2176
2363
|
}
|
|
2177
2364
|
};
|
|
2178
|
-
var CheckBox =
|
|
2365
|
+
var CheckBox = forwardRef6(
|
|
2179
2366
|
({
|
|
2180
2367
|
label,
|
|
2181
2368
|
size = "medium",
|
|
@@ -2216,7 +2403,7 @@ var CheckBox = forwardRef5(
|
|
|
2216
2403
|
);
|
|
2217
2404
|
const renderIcon = () => {
|
|
2218
2405
|
if (indeterminate) {
|
|
2219
|
-
return /* @__PURE__ */
|
|
2406
|
+
return /* @__PURE__ */ jsx13(
|
|
2220
2407
|
Minus,
|
|
2221
2408
|
{
|
|
2222
2409
|
size: sizeClasses.iconSize,
|
|
@@ -2226,7 +2413,7 @@ var CheckBox = forwardRef5(
|
|
|
2226
2413
|
);
|
|
2227
2414
|
}
|
|
2228
2415
|
if (checked) {
|
|
2229
|
-
return /* @__PURE__ */
|
|
2416
|
+
return /* @__PURE__ */ jsx13(
|
|
2230
2417
|
Check,
|
|
2231
2418
|
{
|
|
2232
2419
|
size: sizeClasses.iconSize,
|
|
@@ -2237,8 +2424,8 @@ var CheckBox = forwardRef5(
|
|
|
2237
2424
|
}
|
|
2238
2425
|
return null;
|
|
2239
2426
|
};
|
|
2240
|
-
return /* @__PURE__ */
|
|
2241
|
-
/* @__PURE__ */
|
|
2427
|
+
return /* @__PURE__ */ jsxs11("div", { className: "flex flex-col", children: [
|
|
2428
|
+
/* @__PURE__ */ jsxs11(
|
|
2242
2429
|
"div",
|
|
2243
2430
|
{
|
|
2244
2431
|
className: cn(
|
|
@@ -2247,7 +2434,7 @@ var CheckBox = forwardRef5(
|
|
|
2247
2434
|
disabled ? "opacity-40" : ""
|
|
2248
2435
|
),
|
|
2249
2436
|
children: [
|
|
2250
|
-
/* @__PURE__ */
|
|
2437
|
+
/* @__PURE__ */ jsx13(
|
|
2251
2438
|
"input",
|
|
2252
2439
|
{
|
|
2253
2440
|
ref,
|
|
@@ -2260,15 +2447,15 @@ var CheckBox = forwardRef5(
|
|
|
2260
2447
|
...props
|
|
2261
2448
|
}
|
|
2262
2449
|
),
|
|
2263
|
-
/* @__PURE__ */
|
|
2264
|
-
label && /* @__PURE__ */
|
|
2450
|
+
/* @__PURE__ */ jsx13("label", { htmlFor: inputId, className: checkboxClasses, children: renderIcon() }),
|
|
2451
|
+
label && /* @__PURE__ */ jsx13(
|
|
2265
2452
|
"div",
|
|
2266
2453
|
{
|
|
2267
2454
|
className: cn(
|
|
2268
2455
|
"flex flex-row items-center",
|
|
2269
2456
|
sizeClasses.labelHeight
|
|
2270
2457
|
),
|
|
2271
|
-
children: /* @__PURE__ */
|
|
2458
|
+
children: /* @__PURE__ */ jsx13(
|
|
2272
2459
|
Text_default,
|
|
2273
2460
|
{
|
|
2274
2461
|
as: "label",
|
|
@@ -2287,7 +2474,7 @@ var CheckBox = forwardRef5(
|
|
|
2287
2474
|
]
|
|
2288
2475
|
}
|
|
2289
2476
|
),
|
|
2290
|
-
errorMessage && /* @__PURE__ */
|
|
2477
|
+
errorMessage && /* @__PURE__ */ jsx13(
|
|
2291
2478
|
Text_default,
|
|
2292
2479
|
{
|
|
2293
2480
|
size: "sm",
|
|
@@ -2297,7 +2484,7 @@ var CheckBox = forwardRef5(
|
|
|
2297
2484
|
children: errorMessage
|
|
2298
2485
|
}
|
|
2299
2486
|
),
|
|
2300
|
-
helperText && !errorMessage && /* @__PURE__ */
|
|
2487
|
+
helperText && !errorMessage && /* @__PURE__ */ jsx13(
|
|
2301
2488
|
Text_default,
|
|
2302
2489
|
{
|
|
2303
2490
|
size: "sm",
|
|
@@ -2314,7 +2501,7 @@ CheckBox.displayName = "CheckBox";
|
|
|
2314
2501
|
var CheckBox_default = CheckBox;
|
|
2315
2502
|
|
|
2316
2503
|
// src/components/Divider/Divider.tsx
|
|
2317
|
-
import { jsx as
|
|
2504
|
+
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
2318
2505
|
var Divider = ({
|
|
2319
2506
|
orientation = "horizontal",
|
|
2320
2507
|
className = "",
|
|
@@ -2325,7 +2512,7 @@ var Divider = ({
|
|
|
2325
2512
|
horizontal: "w-full h-px",
|
|
2326
2513
|
vertical: "h-full w-px"
|
|
2327
2514
|
};
|
|
2328
|
-
return /* @__PURE__ */
|
|
2515
|
+
return /* @__PURE__ */ jsx14(
|
|
2329
2516
|
"hr",
|
|
2330
2517
|
{
|
|
2331
2518
|
className: cn(baseClasses, orientationClasses[orientation], className),
|
|
@@ -2337,7 +2524,7 @@ var Divider = ({
|
|
|
2337
2524
|
var Divider_default = Divider;
|
|
2338
2525
|
|
|
2339
2526
|
// src/components/ProgressBar/ProgressBar.tsx
|
|
2340
|
-
import { Fragment as Fragment2, jsx as
|
|
2527
|
+
import { Fragment as Fragment2, jsx as jsx15, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
2341
2528
|
var SIZE_CLASSES5 = {
|
|
2342
2529
|
small: {
|
|
2343
2530
|
container: "h-1",
|
|
@@ -2449,20 +2636,20 @@ var renderStackedHitCountDisplay = (showHitCount, showPercentage, clampedValue,
|
|
|
2449
2636
|
max,
|
|
2450
2637
|
percentage
|
|
2451
2638
|
);
|
|
2452
|
-
return /* @__PURE__ */
|
|
2639
|
+
return /* @__PURE__ */ jsx15(
|
|
2453
2640
|
"div",
|
|
2454
2641
|
{
|
|
2455
2642
|
className: cn(
|
|
2456
2643
|
"text-xs font-medium leading-[14px] text-right",
|
|
2457
2644
|
percentageClassName
|
|
2458
2645
|
),
|
|
2459
|
-
children: displayPriority.type === "hitCount" ? /* @__PURE__ */
|
|
2460
|
-
/* @__PURE__ */
|
|
2461
|
-
/* @__PURE__ */
|
|
2646
|
+
children: displayPriority.type === "hitCount" ? /* @__PURE__ */ jsxs12(Fragment2, { children: [
|
|
2647
|
+
/* @__PURE__ */ jsx15("span", { className: "text-success-200", children: Math.round(clampedValue) }),
|
|
2648
|
+
/* @__PURE__ */ jsxs12("span", { className: "text-text-600", children: [
|
|
2462
2649
|
" de ",
|
|
2463
2650
|
max
|
|
2464
2651
|
] })
|
|
2465
|
-
] }) : /* @__PURE__ */
|
|
2652
|
+
] }) : /* @__PURE__ */ jsxs12(Text_default, { size: "xs", weight: "medium", className: "text-success-200", children: [
|
|
2466
2653
|
Math.round(percentage),
|
|
2467
2654
|
"%"
|
|
2468
2655
|
] })
|
|
@@ -2477,7 +2664,7 @@ var ProgressBarBase = ({
|
|
|
2477
2664
|
variantClasses,
|
|
2478
2665
|
containerClassName,
|
|
2479
2666
|
fillClassName
|
|
2480
|
-
}) => /* @__PURE__ */
|
|
2667
|
+
}) => /* @__PURE__ */ jsxs12(
|
|
2481
2668
|
"div",
|
|
2482
2669
|
{
|
|
2483
2670
|
className: cn(
|
|
@@ -2486,7 +2673,7 @@ var ProgressBarBase = ({
|
|
|
2486
2673
|
"overflow-hidden relative"
|
|
2487
2674
|
),
|
|
2488
2675
|
children: [
|
|
2489
|
-
/* @__PURE__ */
|
|
2676
|
+
/* @__PURE__ */ jsx15(
|
|
2490
2677
|
"progress",
|
|
2491
2678
|
{
|
|
2492
2679
|
value: clampedValue,
|
|
@@ -2495,7 +2682,7 @@ var ProgressBarBase = ({
|
|
|
2495
2682
|
className: "absolute inset-0 w-full h-full opacity-0"
|
|
2496
2683
|
}
|
|
2497
2684
|
),
|
|
2498
|
-
/* @__PURE__ */
|
|
2685
|
+
/* @__PURE__ */ jsx15(
|
|
2499
2686
|
"div",
|
|
2500
2687
|
{
|
|
2501
2688
|
className: cn(
|
|
@@ -2521,7 +2708,7 @@ var StackedLayout = ({
|
|
|
2521
2708
|
percentage,
|
|
2522
2709
|
variantClasses,
|
|
2523
2710
|
dimensions
|
|
2524
|
-
}) => /* @__PURE__ */
|
|
2711
|
+
}) => /* @__PURE__ */ jsxs12(
|
|
2525
2712
|
"div",
|
|
2526
2713
|
{
|
|
2527
2714
|
className: cn(
|
|
@@ -2531,8 +2718,8 @@ var StackedLayout = ({
|
|
|
2531
2718
|
className
|
|
2532
2719
|
),
|
|
2533
2720
|
children: [
|
|
2534
|
-
shouldShowHeader(label, showPercentage, showHitCount) && /* @__PURE__ */
|
|
2535
|
-
label && /* @__PURE__ */
|
|
2721
|
+
shouldShowHeader(label, showPercentage, showHitCount) && /* @__PURE__ */ jsxs12("div", { className: "flex flex-row justify-between items-center w-full h-[19px]", children: [
|
|
2722
|
+
label && /* @__PURE__ */ jsx15(
|
|
2536
2723
|
Text_default,
|
|
2537
2724
|
{
|
|
2538
2725
|
as: "div",
|
|
@@ -2551,7 +2738,7 @@ var StackedLayout = ({
|
|
|
2551
2738
|
percentageClassName
|
|
2552
2739
|
)
|
|
2553
2740
|
] }),
|
|
2554
|
-
/* @__PURE__ */
|
|
2741
|
+
/* @__PURE__ */ jsx15(
|
|
2555
2742
|
ProgressBarBase,
|
|
2556
2743
|
{
|
|
2557
2744
|
clampedValue,
|
|
@@ -2593,7 +2780,7 @@ var CompactLayout = ({
|
|
|
2593
2780
|
percentageClassName,
|
|
2594
2781
|
labelClassName
|
|
2595
2782
|
});
|
|
2596
|
-
return /* @__PURE__ */
|
|
2783
|
+
return /* @__PURE__ */ jsxs12(
|
|
2597
2784
|
"div",
|
|
2598
2785
|
{
|
|
2599
2786
|
className: cn(
|
|
@@ -2603,7 +2790,7 @@ var CompactLayout = ({
|
|
|
2603
2790
|
className
|
|
2604
2791
|
),
|
|
2605
2792
|
children: [
|
|
2606
|
-
shouldShowHeader(label, showPercentage, showHitCount) && /* @__PURE__ */
|
|
2793
|
+
shouldShowHeader(label, showPercentage, showHitCount) && /* @__PURE__ */ jsx15(
|
|
2607
2794
|
Text_default,
|
|
2608
2795
|
{
|
|
2609
2796
|
as: "div",
|
|
@@ -2614,7 +2801,7 @@ var CompactLayout = ({
|
|
|
2614
2801
|
children: content
|
|
2615
2802
|
}
|
|
2616
2803
|
),
|
|
2617
|
-
/* @__PURE__ */
|
|
2804
|
+
/* @__PURE__ */ jsx15(
|
|
2618
2805
|
ProgressBarBase,
|
|
2619
2806
|
{
|
|
2620
2807
|
clampedValue,
|
|
@@ -2650,9 +2837,9 @@ var DefaultLayout = ({
|
|
|
2650
2837
|
label,
|
|
2651
2838
|
showPercentage
|
|
2652
2839
|
);
|
|
2653
|
-
return /* @__PURE__ */
|
|
2654
|
-
displayConfig.showHeader && /* @__PURE__ */
|
|
2655
|
-
label && /* @__PURE__ */
|
|
2840
|
+
return /* @__PURE__ */ jsxs12("div", { className: cn("flex", sizeClasses.layout, gapClass, className), children: [
|
|
2841
|
+
displayConfig.showHeader && /* @__PURE__ */ jsxs12("div", { className: "flex flex-row items-center justify-between w-full", children: [
|
|
2842
|
+
label && /* @__PURE__ */ jsx15(
|
|
2656
2843
|
Text_default,
|
|
2657
2844
|
{
|
|
2658
2845
|
as: "div",
|
|
@@ -2665,7 +2852,7 @@ var DefaultLayout = ({
|
|
|
2665
2852
|
children: label
|
|
2666
2853
|
}
|
|
2667
2854
|
),
|
|
2668
|
-
showPercentage && /* @__PURE__ */
|
|
2855
|
+
showPercentage && /* @__PURE__ */ jsxs12(
|
|
2669
2856
|
Text_default,
|
|
2670
2857
|
{
|
|
2671
2858
|
size: "xs",
|
|
@@ -2681,7 +2868,7 @@ var DefaultLayout = ({
|
|
|
2681
2868
|
}
|
|
2682
2869
|
)
|
|
2683
2870
|
] }),
|
|
2684
|
-
/* @__PURE__ */
|
|
2871
|
+
/* @__PURE__ */ jsx15(
|
|
2685
2872
|
ProgressBarBase,
|
|
2686
2873
|
{
|
|
2687
2874
|
clampedValue,
|
|
@@ -2701,7 +2888,7 @@ var DefaultLayout = ({
|
|
|
2701
2888
|
)
|
|
2702
2889
|
}
|
|
2703
2890
|
),
|
|
2704
|
-
displayConfig.showPercentage && /* @__PURE__ */
|
|
2891
|
+
displayConfig.showPercentage && /* @__PURE__ */ jsxs12(
|
|
2705
2892
|
Text_default,
|
|
2706
2893
|
{
|
|
2707
2894
|
size: "xs",
|
|
@@ -2716,7 +2903,7 @@ var DefaultLayout = ({
|
|
|
2716
2903
|
]
|
|
2717
2904
|
}
|
|
2718
2905
|
),
|
|
2719
|
-
displayConfig.showLabel && /* @__PURE__ */
|
|
2906
|
+
displayConfig.showLabel && /* @__PURE__ */ jsx15(
|
|
2720
2907
|
Text_default,
|
|
2721
2908
|
{
|
|
2722
2909
|
as: "div",
|
|
@@ -2752,7 +2939,7 @@ var ProgressBar = ({
|
|
|
2752
2939
|
const sizeClasses = SIZE_CLASSES5[size];
|
|
2753
2940
|
const variantClasses = VARIANT_CLASSES[variant];
|
|
2754
2941
|
if (layout === "stacked") {
|
|
2755
|
-
return /* @__PURE__ */
|
|
2942
|
+
return /* @__PURE__ */ jsx15(
|
|
2756
2943
|
StackedLayout,
|
|
2757
2944
|
{
|
|
2758
2945
|
className,
|
|
@@ -2773,7 +2960,7 @@ var ProgressBar = ({
|
|
|
2773
2960
|
);
|
|
2774
2961
|
}
|
|
2775
2962
|
if (layout === "compact") {
|
|
2776
|
-
return /* @__PURE__ */
|
|
2963
|
+
return /* @__PURE__ */ jsx15(
|
|
2777
2964
|
CompactLayout,
|
|
2778
2965
|
{
|
|
2779
2966
|
className,
|
|
@@ -2793,7 +2980,7 @@ var ProgressBar = ({
|
|
|
2793
2980
|
}
|
|
2794
2981
|
);
|
|
2795
2982
|
}
|
|
2796
|
-
return /* @__PURE__ */
|
|
2983
|
+
return /* @__PURE__ */ jsx15(
|
|
2797
2984
|
DefaultLayout,
|
|
2798
2985
|
{
|
|
2799
2986
|
className,
|
|
@@ -2813,8 +3000,8 @@ var ProgressBar = ({
|
|
|
2813
3000
|
var ProgressBar_default = ProgressBar;
|
|
2814
3001
|
|
|
2815
3002
|
// src/assets/icons/subjects/ChatEN.tsx
|
|
2816
|
-
import { jsx as
|
|
2817
|
-
var ChatEN = ({ size, color }) => /* @__PURE__ */
|
|
3003
|
+
import { jsx as jsx16, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
3004
|
+
var ChatEN = ({ size, color }) => /* @__PURE__ */ jsxs13(
|
|
2818
3005
|
"svg",
|
|
2819
3006
|
{
|
|
2820
3007
|
width: size,
|
|
@@ -2823,21 +3010,21 @@ var ChatEN = ({ size, color }) => /* @__PURE__ */ jsxs12(
|
|
|
2823
3010
|
fill: "none",
|
|
2824
3011
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2825
3012
|
children: [
|
|
2826
|
-
/* @__PURE__ */
|
|
3013
|
+
/* @__PURE__ */ jsx16(
|
|
2827
3014
|
"path",
|
|
2828
3015
|
{
|
|
2829
3016
|
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",
|
|
2830
3017
|
fill: color
|
|
2831
3018
|
}
|
|
2832
3019
|
),
|
|
2833
|
-
/* @__PURE__ */
|
|
3020
|
+
/* @__PURE__ */ jsx16(
|
|
2834
3021
|
"path",
|
|
2835
3022
|
{
|
|
2836
3023
|
d: "M22.5488 12V20.5312H21.0781L17.252 14.4199V20.5312H15.7812V12H17.252L21.0898 18.123V12H22.5488Z",
|
|
2837
3024
|
fill: color
|
|
2838
3025
|
}
|
|
2839
3026
|
),
|
|
2840
|
-
/* @__PURE__ */
|
|
3027
|
+
/* @__PURE__ */ jsx16(
|
|
2841
3028
|
"path",
|
|
2842
3029
|
{
|
|
2843
3030
|
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",
|
|
@@ -2849,8 +3036,8 @@ var ChatEN = ({ size, color }) => /* @__PURE__ */ jsxs12(
|
|
|
2849
3036
|
);
|
|
2850
3037
|
|
|
2851
3038
|
// src/assets/icons/subjects/ChatES.tsx
|
|
2852
|
-
import { jsx as
|
|
2853
|
-
var ChatES = ({ size, color }) => /* @__PURE__ */
|
|
3039
|
+
import { jsx as jsx17, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
3040
|
+
var ChatES = ({ size, color }) => /* @__PURE__ */ jsxs14(
|
|
2854
3041
|
"svg",
|
|
2855
3042
|
{
|
|
2856
3043
|
width: size,
|
|
@@ -2859,21 +3046,21 @@ var ChatES = ({ size, color }) => /* @__PURE__ */ jsxs13(
|
|
|
2859
3046
|
fill: "none",
|
|
2860
3047
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2861
3048
|
children: [
|
|
2862
|
-
/* @__PURE__ */
|
|
3049
|
+
/* @__PURE__ */ jsx17(
|
|
2863
3050
|
"path",
|
|
2864
3051
|
{
|
|
2865
3052
|
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",
|
|
2866
3053
|
fill: color
|
|
2867
3054
|
}
|
|
2868
3055
|
),
|
|
2869
|
-
/* @__PURE__ */
|
|
3056
|
+
/* @__PURE__ */ jsx17(
|
|
2870
3057
|
"path",
|
|
2871
3058
|
{
|
|
2872
3059
|
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",
|
|
2873
3060
|
fill: color
|
|
2874
3061
|
}
|
|
2875
3062
|
),
|
|
2876
|
-
/* @__PURE__ */
|
|
3063
|
+
/* @__PURE__ */ jsx17(
|
|
2877
3064
|
"path",
|
|
2878
3065
|
{
|
|
2879
3066
|
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",
|
|
@@ -2885,8 +3072,8 @@ var ChatES = ({ size, color }) => /* @__PURE__ */ jsxs13(
|
|
|
2885
3072
|
);
|
|
2886
3073
|
|
|
2887
3074
|
// src/assets/icons/subjects/ChatPT.tsx
|
|
2888
|
-
import { jsx as
|
|
2889
|
-
var ChatPT = ({ size, color }) => /* @__PURE__ */
|
|
3075
|
+
import { jsx as jsx18, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
3076
|
+
var ChatPT = ({ size, color }) => /* @__PURE__ */ jsxs15(
|
|
2890
3077
|
"svg",
|
|
2891
3078
|
{
|
|
2892
3079
|
width: size,
|
|
@@ -2895,21 +3082,21 @@ var ChatPT = ({ size, color }) => /* @__PURE__ */ jsxs14(
|
|
|
2895
3082
|
fill: "none",
|
|
2896
3083
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2897
3084
|
children: [
|
|
2898
|
-
/* @__PURE__ */
|
|
3085
|
+
/* @__PURE__ */ jsx18(
|
|
2899
3086
|
"path",
|
|
2900
3087
|
{
|
|
2901
3088
|
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",
|
|
2902
3089
|
fill: color
|
|
2903
3090
|
}
|
|
2904
3091
|
),
|
|
2905
|
-
/* @__PURE__ */
|
|
3092
|
+
/* @__PURE__ */ jsx18(
|
|
2906
3093
|
"path",
|
|
2907
3094
|
{
|
|
2908
3095
|
d: "M21.1758 12V20.5312H19.7168V12H21.1758ZM23.8535 12V13.1719H17.0625V12H23.8535Z",
|
|
2909
3096
|
fill: color
|
|
2910
3097
|
}
|
|
2911
3098
|
),
|
|
2912
|
-
/* @__PURE__ */
|
|
3099
|
+
/* @__PURE__ */ jsx18(
|
|
2913
3100
|
"path",
|
|
2914
3101
|
{
|
|
2915
3102
|
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",
|
|
@@ -2922,7 +3109,7 @@ var ChatPT = ({ size, color }) => /* @__PURE__ */ jsxs14(
|
|
|
2922
3109
|
|
|
2923
3110
|
// src/components/Card/Card.tsx
|
|
2924
3111
|
import {
|
|
2925
|
-
forwardRef as
|
|
3112
|
+
forwardRef as forwardRef7,
|
|
2926
3113
|
Fragment as Fragment3,
|
|
2927
3114
|
useState as useState7,
|
|
2928
3115
|
useRef as useRef3,
|
|
@@ -2942,9 +3129,9 @@ import {
|
|
|
2942
3129
|
} from "phosphor-react";
|
|
2943
3130
|
|
|
2944
3131
|
// src/components/IconRender/IconRender.tsx
|
|
2945
|
-
import { cloneElement as
|
|
3132
|
+
import { cloneElement as cloneElement2 } from "react";
|
|
2946
3133
|
import * as PhosphorIcons from "phosphor-react";
|
|
2947
|
-
import { jsx as
|
|
3134
|
+
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
2948
3135
|
var IconRender = ({
|
|
2949
3136
|
iconName,
|
|
2950
3137
|
color = "#000000",
|
|
@@ -2954,18 +3141,18 @@ var IconRender = ({
|
|
|
2954
3141
|
if (typeof iconName === "string") {
|
|
2955
3142
|
switch (iconName) {
|
|
2956
3143
|
case "Chat_PT":
|
|
2957
|
-
return /* @__PURE__ */
|
|
3144
|
+
return /* @__PURE__ */ jsx19(ChatPT, { size, color });
|
|
2958
3145
|
case "Chat_EN":
|
|
2959
|
-
return /* @__PURE__ */
|
|
3146
|
+
return /* @__PURE__ */ jsx19(ChatEN, { size, color });
|
|
2960
3147
|
case "Chat_ES":
|
|
2961
|
-
return /* @__PURE__ */
|
|
3148
|
+
return /* @__PURE__ */ jsx19(ChatES, { size, color });
|
|
2962
3149
|
default: {
|
|
2963
3150
|
const IconComponent = PhosphorIcons[iconName] || PhosphorIcons.Question;
|
|
2964
|
-
return /* @__PURE__ */
|
|
3151
|
+
return /* @__PURE__ */ jsx19(IconComponent, { size, color, weight });
|
|
2965
3152
|
}
|
|
2966
3153
|
}
|
|
2967
3154
|
} else {
|
|
2968
|
-
return
|
|
3155
|
+
return cloneElement2(iconName, {
|
|
2969
3156
|
size,
|
|
2970
3157
|
color: "currentColor"
|
|
2971
3158
|
});
|
|
@@ -2974,7 +3161,7 @@ var IconRender = ({
|
|
|
2974
3161
|
var IconRender_default = IconRender;
|
|
2975
3162
|
|
|
2976
3163
|
// src/components/Card/Card.tsx
|
|
2977
|
-
import { Fragment as Fragment4, jsx as
|
|
3164
|
+
import { Fragment as Fragment4, jsx as jsx20, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
2978
3165
|
var CARD_BASE_CLASSES = {
|
|
2979
3166
|
default: "w-full bg-background border border-border-50 rounded-xl",
|
|
2980
3167
|
compact: "w-full bg-background border border-border-50 rounded-lg",
|
|
@@ -3000,7 +3187,7 @@ var CARD_CURSOR_CLASSES = {
|
|
|
3000
3187
|
default: "",
|
|
3001
3188
|
pointer: "cursor-pointer"
|
|
3002
3189
|
};
|
|
3003
|
-
var CardBase =
|
|
3190
|
+
var CardBase = forwardRef7(
|
|
3004
3191
|
({
|
|
3005
3192
|
children,
|
|
3006
3193
|
variant = "default",
|
|
@@ -3016,7 +3203,7 @@ var CardBase = forwardRef6(
|
|
|
3016
3203
|
const minHeightClasses = CARD_MIN_HEIGHT_CLASSES[minHeight];
|
|
3017
3204
|
const layoutClasses = CARD_LAYOUT_CLASSES[layout];
|
|
3018
3205
|
const cursorClasses = CARD_CURSOR_CLASSES[cursor];
|
|
3019
|
-
return /* @__PURE__ */
|
|
3206
|
+
return /* @__PURE__ */ jsx20(
|
|
3020
3207
|
"div",
|
|
3021
3208
|
{
|
|
3022
3209
|
ref,
|
|
@@ -3058,7 +3245,7 @@ var ACTION_HEADER_CLASSES = {
|
|
|
3058
3245
|
error: "text-error-300",
|
|
3059
3246
|
info: "text-info-300"
|
|
3060
3247
|
};
|
|
3061
|
-
var CardActivitiesResults =
|
|
3248
|
+
var CardActivitiesResults = forwardRef7(
|
|
3062
3249
|
({
|
|
3063
3250
|
icon,
|
|
3064
3251
|
title,
|
|
@@ -3074,7 +3261,7 @@ var CardActivitiesResults = forwardRef6(
|
|
|
3074
3261
|
const actionIconClasses = ACTION_ICON_CLASSES[action];
|
|
3075
3262
|
const actionSubTitleClasses = ACTION_SUBTITLE_CLASSES[action];
|
|
3076
3263
|
const actionHeaderClasses = ACTION_HEADER_CLASSES[action];
|
|
3077
|
-
return /* @__PURE__ */
|
|
3264
|
+
return /* @__PURE__ */ jsxs16(
|
|
3078
3265
|
"div",
|
|
3079
3266
|
{
|
|
3080
3267
|
ref,
|
|
@@ -3084,7 +3271,7 @@ var CardActivitiesResults = forwardRef6(
|
|
|
3084
3271
|
),
|
|
3085
3272
|
...props,
|
|
3086
3273
|
children: [
|
|
3087
|
-
/* @__PURE__ */
|
|
3274
|
+
/* @__PURE__ */ jsxs16(
|
|
3088
3275
|
"div",
|
|
3089
3276
|
{
|
|
3090
3277
|
className: cn(
|
|
@@ -3093,7 +3280,7 @@ var CardActivitiesResults = forwardRef6(
|
|
|
3093
3280
|
extended ? "rounded-t-xl" : "rounded-xl"
|
|
3094
3281
|
),
|
|
3095
3282
|
children: [
|
|
3096
|
-
/* @__PURE__ */
|
|
3283
|
+
/* @__PURE__ */ jsx20(
|
|
3097
3284
|
"span",
|
|
3098
3285
|
{
|
|
3099
3286
|
className: cn(
|
|
@@ -3103,7 +3290,7 @@ var CardActivitiesResults = forwardRef6(
|
|
|
3103
3290
|
children: icon
|
|
3104
3291
|
}
|
|
3105
3292
|
),
|
|
3106
|
-
/* @__PURE__ */
|
|
3293
|
+
/* @__PURE__ */ jsx20(
|
|
3107
3294
|
Text_default,
|
|
3108
3295
|
{
|
|
3109
3296
|
size: "2xs",
|
|
@@ -3112,7 +3299,7 @@ var CardActivitiesResults = forwardRef6(
|
|
|
3112
3299
|
children: title
|
|
3113
3300
|
}
|
|
3114
3301
|
),
|
|
3115
|
-
/* @__PURE__ */
|
|
3302
|
+
/* @__PURE__ */ jsx20(
|
|
3116
3303
|
"p",
|
|
3117
3304
|
{
|
|
3118
3305
|
className: cn("text-lg font-bold truncate", actionSubTitleClasses),
|
|
@@ -3122,8 +3309,8 @@ var CardActivitiesResults = forwardRef6(
|
|
|
3122
3309
|
]
|
|
3123
3310
|
}
|
|
3124
3311
|
),
|
|
3125
|
-
extended && /* @__PURE__ */
|
|
3126
|
-
/* @__PURE__ */
|
|
3312
|
+
extended && /* @__PURE__ */ jsxs16("div", { className: "flex flex-col items-center gap-2.5 pb-9.5 pt-2.5", children: [
|
|
3313
|
+
/* @__PURE__ */ jsx20(
|
|
3127
3314
|
"p",
|
|
3128
3315
|
{
|
|
3129
3316
|
className: cn(
|
|
@@ -3133,14 +3320,14 @@ var CardActivitiesResults = forwardRef6(
|
|
|
3133
3320
|
children: header
|
|
3134
3321
|
}
|
|
3135
3322
|
),
|
|
3136
|
-
/* @__PURE__ */
|
|
3323
|
+
/* @__PURE__ */ jsx20(Badge_default, { size: "large", action: "info", children: description })
|
|
3137
3324
|
] })
|
|
3138
3325
|
]
|
|
3139
3326
|
}
|
|
3140
3327
|
);
|
|
3141
3328
|
}
|
|
3142
3329
|
);
|
|
3143
|
-
var CardQuestions =
|
|
3330
|
+
var CardQuestions = forwardRef7(
|
|
3144
3331
|
({
|
|
3145
3332
|
header,
|
|
3146
3333
|
state = "undone",
|
|
@@ -3152,7 +3339,7 @@ var CardQuestions = forwardRef6(
|
|
|
3152
3339
|
const isDone = state === "done";
|
|
3153
3340
|
const stateLabel = isDone ? "Realizado" : "N\xE3o Realizado";
|
|
3154
3341
|
const buttonLabel = isDone ? "Ver Resultado" : "Responder";
|
|
3155
|
-
return /* @__PURE__ */
|
|
3342
|
+
return /* @__PURE__ */ jsxs16(
|
|
3156
3343
|
CardBase,
|
|
3157
3344
|
{
|
|
3158
3345
|
ref,
|
|
@@ -3162,9 +3349,9 @@ var CardQuestions = forwardRef6(
|
|
|
3162
3349
|
className: cn("justify-between gap-4", className),
|
|
3163
3350
|
...props,
|
|
3164
3351
|
children: [
|
|
3165
|
-
/* @__PURE__ */
|
|
3166
|
-
/* @__PURE__ */
|
|
3167
|
-
/* @__PURE__ */
|
|
3352
|
+
/* @__PURE__ */ jsxs16("section", { className: "flex flex-col gap-1 flex-1 min-w-0", children: [
|
|
3353
|
+
/* @__PURE__ */ jsx20("p", { className: "font-bold text-xs text-text-950 truncate", children: header }),
|
|
3354
|
+
/* @__PURE__ */ jsx20("div", { className: "flex flex-row gap-6 items-center", children: /* @__PURE__ */ jsx20(
|
|
3168
3355
|
Badge_default,
|
|
3169
3356
|
{
|
|
3170
3357
|
size: "medium",
|
|
@@ -3174,7 +3361,7 @@ var CardQuestions = forwardRef6(
|
|
|
3174
3361
|
}
|
|
3175
3362
|
) })
|
|
3176
3363
|
] }),
|
|
3177
|
-
/* @__PURE__ */
|
|
3364
|
+
/* @__PURE__ */ jsx20("span", { className: "flex-shrink-0", children: /* @__PURE__ */ jsx20(
|
|
3178
3365
|
Button_default,
|
|
3179
3366
|
{
|
|
3180
3367
|
size: "extra-small",
|
|
@@ -3188,7 +3375,7 @@ var CardQuestions = forwardRef6(
|
|
|
3188
3375
|
);
|
|
3189
3376
|
}
|
|
3190
3377
|
);
|
|
3191
|
-
var CardProgress =
|
|
3378
|
+
var CardProgress = forwardRef7(
|
|
3192
3379
|
({
|
|
3193
3380
|
header,
|
|
3194
3381
|
subhead,
|
|
@@ -3205,19 +3392,19 @@ var CardProgress = forwardRef6(
|
|
|
3205
3392
|
}, ref) => {
|
|
3206
3393
|
const isHorizontal = direction === "horizontal";
|
|
3207
3394
|
const contentComponent = {
|
|
3208
|
-
horizontal: /* @__PURE__ */
|
|
3209
|
-
showDates && /* @__PURE__ */
|
|
3210
|
-
initialDate && /* @__PURE__ */
|
|
3211
|
-
/* @__PURE__ */
|
|
3212
|
-
/* @__PURE__ */
|
|
3395
|
+
horizontal: /* @__PURE__ */ jsxs16(Fragment4, { children: [
|
|
3396
|
+
showDates && /* @__PURE__ */ jsxs16("div", { className: "flex flex-row gap-6 items-center", children: [
|
|
3397
|
+
initialDate && /* @__PURE__ */ jsxs16("span", { className: "flex flex-row gap-1 items-center text-2xs", children: [
|
|
3398
|
+
/* @__PURE__ */ jsx20("p", { className: "text-text-800 font-semibold", children: "In\xEDcio" }),
|
|
3399
|
+
/* @__PURE__ */ jsx20("p", { className: "text-text-600", children: initialDate })
|
|
3213
3400
|
] }),
|
|
3214
|
-
endDate && /* @__PURE__ */
|
|
3215
|
-
/* @__PURE__ */
|
|
3216
|
-
/* @__PURE__ */
|
|
3401
|
+
endDate && /* @__PURE__ */ jsxs16("span", { className: "flex flex-row gap-1 items-center text-2xs", children: [
|
|
3402
|
+
/* @__PURE__ */ jsx20("p", { className: "text-text-800 font-semibold", children: "Fim" }),
|
|
3403
|
+
/* @__PURE__ */ jsx20("p", { className: "text-text-600", children: endDate })
|
|
3217
3404
|
] })
|
|
3218
3405
|
] }),
|
|
3219
|
-
/* @__PURE__ */
|
|
3220
|
-
/* @__PURE__ */
|
|
3406
|
+
/* @__PURE__ */ jsxs16("span", { className: "grid grid-cols-[1fr_auto] items-center gap-2", children: [
|
|
3407
|
+
/* @__PURE__ */ jsx20(
|
|
3221
3408
|
ProgressBar_default,
|
|
3222
3409
|
{
|
|
3223
3410
|
size: "small",
|
|
@@ -3226,7 +3413,7 @@ var CardProgress = forwardRef6(
|
|
|
3226
3413
|
"data-testid": "progress-bar"
|
|
3227
3414
|
}
|
|
3228
3415
|
),
|
|
3229
|
-
/* @__PURE__ */
|
|
3416
|
+
/* @__PURE__ */ jsxs16(
|
|
3230
3417
|
Text_default,
|
|
3231
3418
|
{
|
|
3232
3419
|
size: "xs",
|
|
@@ -3242,9 +3429,9 @@ var CardProgress = forwardRef6(
|
|
|
3242
3429
|
)
|
|
3243
3430
|
] })
|
|
3244
3431
|
] }),
|
|
3245
|
-
vertical: /* @__PURE__ */
|
|
3432
|
+
vertical: /* @__PURE__ */ jsx20("p", { className: "text-sm text-text-800", children: subhead })
|
|
3246
3433
|
};
|
|
3247
|
-
return /* @__PURE__ */
|
|
3434
|
+
return /* @__PURE__ */ jsxs16(
|
|
3248
3435
|
CardBase,
|
|
3249
3436
|
{
|
|
3250
3437
|
ref,
|
|
@@ -3255,7 +3442,7 @@ var CardProgress = forwardRef6(
|
|
|
3255
3442
|
className: cn(isHorizontal ? "h-20" : "", className),
|
|
3256
3443
|
...props,
|
|
3257
3444
|
children: [
|
|
3258
|
-
/* @__PURE__ */
|
|
3445
|
+
/* @__PURE__ */ jsx20(
|
|
3259
3446
|
"div",
|
|
3260
3447
|
{
|
|
3261
3448
|
className: cn(
|
|
@@ -3268,7 +3455,7 @@ var CardProgress = forwardRef6(
|
|
|
3268
3455
|
children: icon
|
|
3269
3456
|
}
|
|
3270
3457
|
),
|
|
3271
|
-
/* @__PURE__ */
|
|
3458
|
+
/* @__PURE__ */ jsxs16(
|
|
3272
3459
|
"div",
|
|
3273
3460
|
{
|
|
3274
3461
|
className: cn(
|
|
@@ -3276,7 +3463,7 @@ var CardProgress = forwardRef6(
|
|
|
3276
3463
|
!isHorizontal && "gap-4"
|
|
3277
3464
|
),
|
|
3278
3465
|
children: [
|
|
3279
|
-
/* @__PURE__ */
|
|
3466
|
+
/* @__PURE__ */ jsx20(Text_default, { size: "sm", weight: "bold", className: "text-text-950 truncate", children: header }),
|
|
3280
3467
|
contentComponent[direction]
|
|
3281
3468
|
]
|
|
3282
3469
|
}
|
|
@@ -3286,7 +3473,7 @@ var CardProgress = forwardRef6(
|
|
|
3286
3473
|
);
|
|
3287
3474
|
}
|
|
3288
3475
|
);
|
|
3289
|
-
var CardTopic =
|
|
3476
|
+
var CardTopic = forwardRef7(
|
|
3290
3477
|
({
|
|
3291
3478
|
header,
|
|
3292
3479
|
subHead,
|
|
@@ -3296,7 +3483,7 @@ var CardTopic = forwardRef6(
|
|
|
3296
3483
|
className = "",
|
|
3297
3484
|
...props
|
|
3298
3485
|
}, ref) => {
|
|
3299
|
-
return /* @__PURE__ */
|
|
3486
|
+
return /* @__PURE__ */ jsxs16(
|
|
3300
3487
|
CardBase,
|
|
3301
3488
|
{
|
|
3302
3489
|
ref,
|
|
@@ -3307,13 +3494,13 @@ var CardTopic = forwardRef6(
|
|
|
3307
3494
|
className: cn("justify-center gap-2 py-2 px-4", className),
|
|
3308
3495
|
...props,
|
|
3309
3496
|
children: [
|
|
3310
|
-
subHead && /* @__PURE__ */
|
|
3311
|
-
/* @__PURE__ */
|
|
3312
|
-
index < subHead.length - 1 && /* @__PURE__ */
|
|
3497
|
+
subHead && /* @__PURE__ */ jsx20("span", { className: "text-text-600 text-2xs flex flex-row gap-1", children: subHead.map((text, index) => /* @__PURE__ */ jsxs16(Fragment3, { children: [
|
|
3498
|
+
/* @__PURE__ */ jsx20("p", { children: text }),
|
|
3499
|
+
index < subHead.length - 1 && /* @__PURE__ */ jsx20("p", { children: "\u2022" })
|
|
3313
3500
|
] }, `${text} - ${index}`)) }),
|
|
3314
|
-
/* @__PURE__ */
|
|
3315
|
-
/* @__PURE__ */
|
|
3316
|
-
/* @__PURE__ */
|
|
3501
|
+
/* @__PURE__ */ jsx20("p", { className: "text-sm text-text-950 font-bold truncate", children: header }),
|
|
3502
|
+
/* @__PURE__ */ jsxs16("span", { className: "grid grid-cols-[1fr_auto] items-center gap-2", children: [
|
|
3503
|
+
/* @__PURE__ */ jsx20(
|
|
3317
3504
|
ProgressBar_default,
|
|
3318
3505
|
{
|
|
3319
3506
|
size: "small",
|
|
@@ -3322,7 +3509,7 @@ var CardTopic = forwardRef6(
|
|
|
3322
3509
|
"data-testid": "progress-bar"
|
|
3323
3510
|
}
|
|
3324
3511
|
),
|
|
3325
|
-
showPercentage && /* @__PURE__ */
|
|
3512
|
+
showPercentage && /* @__PURE__ */ jsxs16(
|
|
3326
3513
|
Text_default,
|
|
3327
3514
|
{
|
|
3328
3515
|
size: "xs",
|
|
@@ -3342,7 +3529,7 @@ var CardTopic = forwardRef6(
|
|
|
3342
3529
|
);
|
|
3343
3530
|
}
|
|
3344
3531
|
);
|
|
3345
|
-
var CardPerformance =
|
|
3532
|
+
var CardPerformance = forwardRef7(
|
|
3346
3533
|
({
|
|
3347
3534
|
header,
|
|
3348
3535
|
progress,
|
|
@@ -3356,7 +3543,7 @@ var CardPerformance = forwardRef6(
|
|
|
3356
3543
|
...props
|
|
3357
3544
|
}, ref) => {
|
|
3358
3545
|
const hasProgress = progress !== void 0;
|
|
3359
|
-
return /* @__PURE__ */
|
|
3546
|
+
return /* @__PURE__ */ jsxs16(
|
|
3360
3547
|
CardBase,
|
|
3361
3548
|
{
|
|
3362
3549
|
ref,
|
|
@@ -3370,10 +3557,10 @@ var CardPerformance = forwardRef6(
|
|
|
3370
3557
|
onClick: () => actionVariant == "caret" && onClickButton?.(valueButton),
|
|
3371
3558
|
...props,
|
|
3372
3559
|
children: [
|
|
3373
|
-
/* @__PURE__ */
|
|
3374
|
-
/* @__PURE__ */
|
|
3375
|
-
/* @__PURE__ */
|
|
3376
|
-
actionVariant === "button" && /* @__PURE__ */
|
|
3560
|
+
/* @__PURE__ */ jsxs16("div", { className: "w-full flex flex-col justify-between gap-2", children: [
|
|
3561
|
+
/* @__PURE__ */ jsxs16("div", { className: "flex flex-row justify-between items-center gap-2", children: [
|
|
3562
|
+
/* @__PURE__ */ jsx20("p", { className: "text-lg font-bold text-text-950 truncate flex-1 min-w-0", children: header }),
|
|
3563
|
+
actionVariant === "button" && /* @__PURE__ */ jsx20(
|
|
3377
3564
|
Button_default,
|
|
3378
3565
|
{
|
|
3379
3566
|
variant: "outline",
|
|
@@ -3384,16 +3571,16 @@ var CardPerformance = forwardRef6(
|
|
|
3384
3571
|
}
|
|
3385
3572
|
)
|
|
3386
3573
|
] }),
|
|
3387
|
-
/* @__PURE__ */
|
|
3574
|
+
/* @__PURE__ */ jsx20("div", { className: "w-full", children: hasProgress ? /* @__PURE__ */ jsx20(
|
|
3388
3575
|
ProgressBar_default,
|
|
3389
3576
|
{
|
|
3390
3577
|
value: progress,
|
|
3391
3578
|
label: `${progress}% ${labelProgress}`,
|
|
3392
3579
|
variant: progressVariant
|
|
3393
3580
|
}
|
|
3394
|
-
) : /* @__PURE__ */
|
|
3581
|
+
) : /* @__PURE__ */ jsx20("p", { className: "text-xs text-text-600 truncate", children: description }) })
|
|
3395
3582
|
] }),
|
|
3396
|
-
actionVariant == "caret" && /* @__PURE__ */
|
|
3583
|
+
actionVariant == "caret" && /* @__PURE__ */ jsx20(
|
|
3397
3584
|
CaretRight3,
|
|
3398
3585
|
{
|
|
3399
3586
|
className: "size-4.5 text-text-800 cursor-pointer",
|
|
@@ -3405,7 +3592,7 @@ var CardPerformance = forwardRef6(
|
|
|
3405
3592
|
);
|
|
3406
3593
|
}
|
|
3407
3594
|
);
|
|
3408
|
-
var CardResults =
|
|
3595
|
+
var CardResults = forwardRef7(
|
|
3409
3596
|
({
|
|
3410
3597
|
header,
|
|
3411
3598
|
correct_answers,
|
|
@@ -3417,7 +3604,7 @@ var CardResults = forwardRef6(
|
|
|
3417
3604
|
...props
|
|
3418
3605
|
}, ref) => {
|
|
3419
3606
|
const isRow = direction == "row";
|
|
3420
|
-
return /* @__PURE__ */
|
|
3607
|
+
return /* @__PURE__ */ jsxs16(
|
|
3421
3608
|
CardBase,
|
|
3422
3609
|
{
|
|
3423
3610
|
ref,
|
|
@@ -3427,7 +3614,7 @@ var CardResults = forwardRef6(
|
|
|
3427
3614
|
className: cn("items-stretch cursor-pointer pr-4", className),
|
|
3428
3615
|
...props,
|
|
3429
3616
|
children: [
|
|
3430
|
-
/* @__PURE__ */
|
|
3617
|
+
/* @__PURE__ */ jsx20(
|
|
3431
3618
|
"div",
|
|
3432
3619
|
{
|
|
3433
3620
|
className: cn(
|
|
@@ -3436,11 +3623,11 @@ var CardResults = forwardRef6(
|
|
|
3436
3623
|
style: {
|
|
3437
3624
|
backgroundColor: color
|
|
3438
3625
|
},
|
|
3439
|
-
children: /* @__PURE__ */
|
|
3626
|
+
children: /* @__PURE__ */ jsx20(IconRender_default, { iconName: icon, color: "currentColor", size: 20 })
|
|
3440
3627
|
}
|
|
3441
3628
|
),
|
|
3442
|
-
/* @__PURE__ */
|
|
3443
|
-
/* @__PURE__ */
|
|
3629
|
+
/* @__PURE__ */ jsxs16("div", { className: "w-full flex flex-row justify-between items-center", children: [
|
|
3630
|
+
/* @__PURE__ */ jsxs16(
|
|
3444
3631
|
"div",
|
|
3445
3632
|
{
|
|
3446
3633
|
className: cn(
|
|
@@ -3448,28 +3635,28 @@ var CardResults = forwardRef6(
|
|
|
3448
3635
|
isRow ? "flex-row items-center gap-2" : "flex-col"
|
|
3449
3636
|
),
|
|
3450
3637
|
children: [
|
|
3451
|
-
/* @__PURE__ */
|
|
3452
|
-
/* @__PURE__ */
|
|
3453
|
-
/* @__PURE__ */
|
|
3638
|
+
/* @__PURE__ */ jsx20("p", { className: "text-sm font-bold text-text-950 flex-1", children: header }),
|
|
3639
|
+
/* @__PURE__ */ jsxs16("span", { className: "flex flex-wrap flex-row gap-1 items-center", children: [
|
|
3640
|
+
/* @__PURE__ */ jsxs16(
|
|
3454
3641
|
Badge_default,
|
|
3455
3642
|
{
|
|
3456
3643
|
action: "success",
|
|
3457
3644
|
variant: "solid",
|
|
3458
3645
|
size: "large",
|
|
3459
|
-
iconLeft: /* @__PURE__ */
|
|
3646
|
+
iconLeft: /* @__PURE__ */ jsx20(CheckCircle, {}),
|
|
3460
3647
|
children: [
|
|
3461
3648
|
correct_answers,
|
|
3462
3649
|
" Corretas"
|
|
3463
3650
|
]
|
|
3464
3651
|
}
|
|
3465
3652
|
),
|
|
3466
|
-
/* @__PURE__ */
|
|
3653
|
+
/* @__PURE__ */ jsxs16(
|
|
3467
3654
|
Badge_default,
|
|
3468
3655
|
{
|
|
3469
3656
|
action: "error",
|
|
3470
3657
|
variant: "solid",
|
|
3471
3658
|
size: "large",
|
|
3472
|
-
iconLeft: /* @__PURE__ */
|
|
3659
|
+
iconLeft: /* @__PURE__ */ jsx20(XCircle, {}),
|
|
3473
3660
|
children: [
|
|
3474
3661
|
incorrect_answers,
|
|
3475
3662
|
" Incorretas"
|
|
@@ -3480,14 +3667,14 @@ var CardResults = forwardRef6(
|
|
|
3480
3667
|
]
|
|
3481
3668
|
}
|
|
3482
3669
|
),
|
|
3483
|
-
/* @__PURE__ */
|
|
3670
|
+
/* @__PURE__ */ jsx20(CaretRight3, { className: "min-w-6 min-h-6 text-text-800" })
|
|
3484
3671
|
] })
|
|
3485
3672
|
]
|
|
3486
3673
|
}
|
|
3487
3674
|
);
|
|
3488
3675
|
}
|
|
3489
3676
|
);
|
|
3490
|
-
var CardStatus =
|
|
3677
|
+
var CardStatus = forwardRef7(
|
|
3491
3678
|
({ header, className, status, label, ...props }, ref) => {
|
|
3492
3679
|
const getLabelBadge = (status2) => {
|
|
3493
3680
|
switch (status2) {
|
|
@@ -3506,13 +3693,13 @@ var CardStatus = forwardRef6(
|
|
|
3506
3693
|
const getIconBadge = (status2) => {
|
|
3507
3694
|
switch (status2) {
|
|
3508
3695
|
case "correct":
|
|
3509
|
-
return /* @__PURE__ */
|
|
3696
|
+
return /* @__PURE__ */ jsx20(CheckCircle, {});
|
|
3510
3697
|
case "incorrect":
|
|
3511
|
-
return /* @__PURE__ */
|
|
3698
|
+
return /* @__PURE__ */ jsx20(XCircle, {});
|
|
3512
3699
|
case "pending":
|
|
3513
|
-
return /* @__PURE__ */
|
|
3700
|
+
return /* @__PURE__ */ jsx20(Clock, {});
|
|
3514
3701
|
default:
|
|
3515
|
-
return /* @__PURE__ */
|
|
3702
|
+
return /* @__PURE__ */ jsx20(XCircle, {});
|
|
3516
3703
|
}
|
|
3517
3704
|
};
|
|
3518
3705
|
const getActionBadge = (status2) => {
|
|
@@ -3527,7 +3714,7 @@ var CardStatus = forwardRef6(
|
|
|
3527
3714
|
return "info";
|
|
3528
3715
|
}
|
|
3529
3716
|
};
|
|
3530
|
-
return /* @__PURE__ */
|
|
3717
|
+
return /* @__PURE__ */ jsx20(
|
|
3531
3718
|
CardBase,
|
|
3532
3719
|
{
|
|
3533
3720
|
ref,
|
|
@@ -3536,10 +3723,10 @@ var CardStatus = forwardRef6(
|
|
|
3536
3723
|
minHeight: "medium",
|
|
3537
3724
|
className: cn("items-center cursor-pointer", className),
|
|
3538
3725
|
...props,
|
|
3539
|
-
children: /* @__PURE__ */
|
|
3540
|
-
/* @__PURE__ */
|
|
3541
|
-
/* @__PURE__ */
|
|
3542
|
-
status && /* @__PURE__ */
|
|
3726
|
+
children: /* @__PURE__ */ jsxs16("div", { className: "flex justify-between w-full h-full flex-row items-center gap-2", children: [
|
|
3727
|
+
/* @__PURE__ */ jsx20("p", { className: "text-sm font-bold text-text-950 truncate flex-1 min-w-0", children: header }),
|
|
3728
|
+
/* @__PURE__ */ jsxs16("span", { className: "flex flex-row gap-1 items-center flex-shrink-0", children: [
|
|
3729
|
+
status && /* @__PURE__ */ jsx20(
|
|
3543
3730
|
Badge_default,
|
|
3544
3731
|
{
|
|
3545
3732
|
action: getActionBadge(status),
|
|
@@ -3549,17 +3736,17 @@ var CardStatus = forwardRef6(
|
|
|
3549
3736
|
children: getLabelBadge(status)
|
|
3550
3737
|
}
|
|
3551
3738
|
),
|
|
3552
|
-
label && /* @__PURE__ */
|
|
3739
|
+
label && /* @__PURE__ */ jsx20("p", { className: "text-sm text-text-800", children: label })
|
|
3553
3740
|
] }),
|
|
3554
|
-
/* @__PURE__ */
|
|
3741
|
+
/* @__PURE__ */ jsx20(CaretRight3, { className: "min-w-6 min-h-6 text-text-800 cursor-pointer flex-shrink-0 ml-2" })
|
|
3555
3742
|
] })
|
|
3556
3743
|
}
|
|
3557
3744
|
);
|
|
3558
3745
|
}
|
|
3559
3746
|
);
|
|
3560
|
-
var CardSettings =
|
|
3747
|
+
var CardSettings = forwardRef7(
|
|
3561
3748
|
({ header, className, icon, ...props }, ref) => {
|
|
3562
|
-
return /* @__PURE__ */
|
|
3749
|
+
return /* @__PURE__ */ jsxs16(
|
|
3563
3750
|
CardBase,
|
|
3564
3751
|
{
|
|
3565
3752
|
ref,
|
|
@@ -3572,17 +3759,17 @@ var CardSettings = forwardRef6(
|
|
|
3572
3759
|
),
|
|
3573
3760
|
...props,
|
|
3574
3761
|
children: [
|
|
3575
|
-
/* @__PURE__ */
|
|
3576
|
-
/* @__PURE__ */
|
|
3577
|
-
/* @__PURE__ */
|
|
3762
|
+
/* @__PURE__ */ jsx20("span", { className: "[&>svg]:size-6", children: icon }),
|
|
3763
|
+
/* @__PURE__ */ jsx20("p", { className: "w-full text-sm truncate", children: header }),
|
|
3764
|
+
/* @__PURE__ */ jsx20(CaretRight3, { size: 24, className: "cursor-pointer" })
|
|
3578
3765
|
]
|
|
3579
3766
|
}
|
|
3580
3767
|
);
|
|
3581
3768
|
}
|
|
3582
3769
|
);
|
|
3583
|
-
var CardSupport =
|
|
3770
|
+
var CardSupport = forwardRef7(
|
|
3584
3771
|
({ header, className, direction = "col", children, ...props }, ref) => {
|
|
3585
|
-
return /* @__PURE__ */
|
|
3772
|
+
return /* @__PURE__ */ jsxs16(
|
|
3586
3773
|
CardBase,
|
|
3587
3774
|
{
|
|
3588
3775
|
ref,
|
|
@@ -3595,7 +3782,7 @@ var CardSupport = forwardRef6(
|
|
|
3595
3782
|
),
|
|
3596
3783
|
...props,
|
|
3597
3784
|
children: [
|
|
3598
|
-
/* @__PURE__ */
|
|
3785
|
+
/* @__PURE__ */ jsxs16(
|
|
3599
3786
|
"div",
|
|
3600
3787
|
{
|
|
3601
3788
|
className: cn(
|
|
@@ -3603,18 +3790,18 @@ var CardSupport = forwardRef6(
|
|
|
3603
3790
|
direction == "col" ? "flex-col" : "flex-row items-center"
|
|
3604
3791
|
),
|
|
3605
3792
|
children: [
|
|
3606
|
-
/* @__PURE__ */
|
|
3607
|
-
/* @__PURE__ */
|
|
3793
|
+
/* @__PURE__ */ jsx20("span", { className: "w-full min-w-0", children: /* @__PURE__ */ jsx20("p", { className: "text-sm text-text-950 font-bold truncate", children: header }) }),
|
|
3794
|
+
/* @__PURE__ */ jsx20("span", { className: "flex flex-row gap-1", children })
|
|
3608
3795
|
]
|
|
3609
3796
|
}
|
|
3610
3797
|
),
|
|
3611
|
-
/* @__PURE__ */
|
|
3798
|
+
/* @__PURE__ */ jsx20(CaretRight3, { className: "text-text-800 cursor-pointer", size: 24 })
|
|
3612
3799
|
]
|
|
3613
3800
|
}
|
|
3614
3801
|
);
|
|
3615
3802
|
}
|
|
3616
3803
|
);
|
|
3617
|
-
var CardForum =
|
|
3804
|
+
var CardForum = forwardRef7(
|
|
3618
3805
|
({
|
|
3619
3806
|
title,
|
|
3620
3807
|
content,
|
|
@@ -3628,7 +3815,7 @@ var CardForum = forwardRef6(
|
|
|
3628
3815
|
hour,
|
|
3629
3816
|
...props
|
|
3630
3817
|
}, ref) => {
|
|
3631
|
-
return /* @__PURE__ */
|
|
3818
|
+
return /* @__PURE__ */ jsxs16(
|
|
3632
3819
|
CardBase,
|
|
3633
3820
|
{
|
|
3634
3821
|
ref,
|
|
@@ -3639,7 +3826,7 @@ var CardForum = forwardRef6(
|
|
|
3639
3826
|
className: cn("w-auto h-auto gap-3", className),
|
|
3640
3827
|
...props,
|
|
3641
3828
|
children: [
|
|
3642
|
-
/* @__PURE__ */
|
|
3829
|
+
/* @__PURE__ */ jsx20(
|
|
3643
3830
|
"button",
|
|
3644
3831
|
{
|
|
3645
3832
|
type: "button",
|
|
@@ -3648,18 +3835,18 @@ var CardForum = forwardRef6(
|
|
|
3648
3835
|
className: "min-w-8 h-8 rounded-full bg-background-950"
|
|
3649
3836
|
}
|
|
3650
3837
|
),
|
|
3651
|
-
/* @__PURE__ */
|
|
3652
|
-
/* @__PURE__ */
|
|
3653
|
-
/* @__PURE__ */
|
|
3654
|
-
/* @__PURE__ */
|
|
3838
|
+
/* @__PURE__ */ jsxs16("div", { className: "flex flex-col gap-2 flex-1 min-w-0", children: [
|
|
3839
|
+
/* @__PURE__ */ jsxs16("div", { className: "flex flex-row gap-1 items-center flex-wrap", children: [
|
|
3840
|
+
/* @__PURE__ */ jsx20("p", { className: "text-xs font-semibold text-primary-700 truncate", children: title }),
|
|
3841
|
+
/* @__PURE__ */ jsxs16("p", { className: "text-xs text-text-600", children: [
|
|
3655
3842
|
"\u2022 ",
|
|
3656
3843
|
date,
|
|
3657
3844
|
" \u2022 ",
|
|
3658
3845
|
hour
|
|
3659
3846
|
] })
|
|
3660
3847
|
] }),
|
|
3661
|
-
/* @__PURE__ */
|
|
3662
|
-
/* @__PURE__ */
|
|
3848
|
+
/* @__PURE__ */ jsx20("p", { className: "text-text-950 text-sm line-clamp-2 truncate", children: content }),
|
|
3849
|
+
/* @__PURE__ */ jsxs16(
|
|
3663
3850
|
"button",
|
|
3664
3851
|
{
|
|
3665
3852
|
type: "button",
|
|
@@ -3667,8 +3854,8 @@ var CardForum = forwardRef6(
|
|
|
3667
3854
|
onClick: () => onClickComments?.(valueComments),
|
|
3668
3855
|
className: "text-text-600 flex flex-row gap-2 items-center",
|
|
3669
3856
|
children: [
|
|
3670
|
-
/* @__PURE__ */
|
|
3671
|
-
/* @__PURE__ */
|
|
3857
|
+
/* @__PURE__ */ jsx20(ChatCircleText, { "aria-hidden": "true", size: 16 }),
|
|
3858
|
+
/* @__PURE__ */ jsxs16("p", { className: "text-xs", children: [
|
|
3672
3859
|
comments,
|
|
3673
3860
|
" respostas"
|
|
3674
3861
|
] })
|
|
@@ -3681,7 +3868,7 @@ var CardForum = forwardRef6(
|
|
|
3681
3868
|
);
|
|
3682
3869
|
}
|
|
3683
3870
|
);
|
|
3684
|
-
var CardAudio =
|
|
3871
|
+
var CardAudio = forwardRef7(
|
|
3685
3872
|
({
|
|
3686
3873
|
src,
|
|
3687
3874
|
title,
|
|
@@ -3771,12 +3958,12 @@ var CardAudio = forwardRef6(
|
|
|
3771
3958
|
};
|
|
3772
3959
|
const getVolumeIcon = () => {
|
|
3773
3960
|
if (volume === 0) {
|
|
3774
|
-
return /* @__PURE__ */
|
|
3961
|
+
return /* @__PURE__ */ jsx20(SpeakerSimpleX, { size: 24 });
|
|
3775
3962
|
}
|
|
3776
3963
|
if (volume < 0.5) {
|
|
3777
|
-
return /* @__PURE__ */
|
|
3964
|
+
return /* @__PURE__ */ jsx20(SpeakerLow, { size: 24 });
|
|
3778
3965
|
}
|
|
3779
|
-
return /* @__PURE__ */
|
|
3966
|
+
return /* @__PURE__ */ jsx20(SpeakerHigh, { size: 24 });
|
|
3780
3967
|
};
|
|
3781
3968
|
useEffect8(() => {
|
|
3782
3969
|
const handleClickOutside = (event) => {
|
|
@@ -3792,7 +3979,7 @@ var CardAudio = forwardRef6(
|
|
|
3792
3979
|
document.removeEventListener("mousedown", handleClickOutside);
|
|
3793
3980
|
};
|
|
3794
3981
|
}, []);
|
|
3795
|
-
return /* @__PURE__ */
|
|
3982
|
+
return /* @__PURE__ */ jsxs16(
|
|
3796
3983
|
CardBase,
|
|
3797
3984
|
{
|
|
3798
3985
|
ref,
|
|
@@ -3805,7 +3992,7 @@ var CardAudio = forwardRef6(
|
|
|
3805
3992
|
),
|
|
3806
3993
|
...props,
|
|
3807
3994
|
children: [
|
|
3808
|
-
/* @__PURE__ */
|
|
3995
|
+
/* @__PURE__ */ jsx20(
|
|
3809
3996
|
"audio",
|
|
3810
3997
|
{
|
|
3811
3998
|
ref: audioRef,
|
|
@@ -3817,7 +4004,7 @@ var CardAudio = forwardRef6(
|
|
|
3817
4004
|
onEnded: handleEnded,
|
|
3818
4005
|
"data-testid": "audio-element",
|
|
3819
4006
|
"aria-label": title,
|
|
3820
|
-
children: tracks ? tracks.map((track) => /* @__PURE__ */
|
|
4007
|
+
children: tracks ? tracks.map((track) => /* @__PURE__ */ jsx20(
|
|
3821
4008
|
"track",
|
|
3822
4009
|
{
|
|
3823
4010
|
kind: track.kind,
|
|
@@ -3827,7 +4014,7 @@ var CardAudio = forwardRef6(
|
|
|
3827
4014
|
default: track.default
|
|
3828
4015
|
},
|
|
3829
4016
|
track.src
|
|
3830
|
-
)) : /* @__PURE__ */
|
|
4017
|
+
)) : /* @__PURE__ */ jsx20(
|
|
3831
4018
|
"track",
|
|
3832
4019
|
{
|
|
3833
4020
|
kind: "captions",
|
|
@@ -3838,7 +4025,7 @@ var CardAudio = forwardRef6(
|
|
|
3838
4025
|
)
|
|
3839
4026
|
}
|
|
3840
4027
|
),
|
|
3841
|
-
/* @__PURE__ */
|
|
4028
|
+
/* @__PURE__ */ jsx20(
|
|
3842
4029
|
"button",
|
|
3843
4030
|
{
|
|
3844
4031
|
type: "button",
|
|
@@ -3846,14 +4033,14 @@ var CardAudio = forwardRef6(
|
|
|
3846
4033
|
disabled: !src,
|
|
3847
4034
|
className: "cursor-pointer text-text-950 hover:text-primary-600 disabled:text-text-400 disabled:cursor-not-allowed",
|
|
3848
4035
|
"aria-label": isPlaying ? "Pausar" : "Reproduzir",
|
|
3849
|
-
children: isPlaying ? /* @__PURE__ */
|
|
3850
|
-
/* @__PURE__ */
|
|
3851
|
-
/* @__PURE__ */
|
|
3852
|
-
] }) }) : /* @__PURE__ */
|
|
4036
|
+
children: isPlaying ? /* @__PURE__ */ jsx20("div", { className: "w-6 h-6 flex items-center justify-center", children: /* @__PURE__ */ jsxs16("div", { className: "flex gap-0.5", children: [
|
|
4037
|
+
/* @__PURE__ */ jsx20("div", { className: "w-1 h-4 bg-current rounded-sm" }),
|
|
4038
|
+
/* @__PURE__ */ jsx20("div", { className: "w-1 h-4 bg-current rounded-sm" })
|
|
4039
|
+
] }) }) : /* @__PURE__ */ jsx20(Play, { size: 24 })
|
|
3853
4040
|
}
|
|
3854
4041
|
),
|
|
3855
|
-
/* @__PURE__ */
|
|
3856
|
-
/* @__PURE__ */
|
|
4042
|
+
/* @__PURE__ */ jsx20("p", { className: "text-text-800 text-md font-medium min-w-[2.5rem]", children: formatTime(currentTime) }),
|
|
4043
|
+
/* @__PURE__ */ jsx20("div", { className: "flex-1 relative", "data-testid": "progress-bar", children: /* @__PURE__ */ jsx20(
|
|
3857
4044
|
"button",
|
|
3858
4045
|
{
|
|
3859
4046
|
type: "button",
|
|
@@ -3868,7 +4055,7 @@ var CardAudio = forwardRef6(
|
|
|
3868
4055
|
}
|
|
3869
4056
|
},
|
|
3870
4057
|
"aria-label": "Barra de progresso do \xE1udio",
|
|
3871
|
-
children: /* @__PURE__ */
|
|
4058
|
+
children: /* @__PURE__ */ jsx20(
|
|
3872
4059
|
"div",
|
|
3873
4060
|
{
|
|
3874
4061
|
className: "h-full bg-primary-600 rounded-full transition-all duration-100",
|
|
@@ -3879,19 +4066,19 @@ var CardAudio = forwardRef6(
|
|
|
3879
4066
|
)
|
|
3880
4067
|
}
|
|
3881
4068
|
) }),
|
|
3882
|
-
/* @__PURE__ */
|
|
3883
|
-
/* @__PURE__ */
|
|
3884
|
-
/* @__PURE__ */
|
|
4069
|
+
/* @__PURE__ */ jsx20("p", { className: "text-text-800 text-md font-medium min-w-[2.5rem]", children: formatTime(duration) }),
|
|
4070
|
+
/* @__PURE__ */ jsxs16("div", { className: "relative h-6", ref: volumeControlRef, children: [
|
|
4071
|
+
/* @__PURE__ */ jsx20(
|
|
3885
4072
|
"button",
|
|
3886
4073
|
{
|
|
3887
4074
|
type: "button",
|
|
3888
4075
|
onClick: toggleVolumeControl,
|
|
3889
4076
|
className: "cursor-pointer text-text-950 hover:text-primary-600",
|
|
3890
4077
|
"aria-label": "Controle de volume",
|
|
3891
|
-
children: /* @__PURE__ */
|
|
4078
|
+
children: /* @__PURE__ */ jsx20("div", { className: "w-6 h-6 flex items-center justify-center", children: getVolumeIcon() })
|
|
3892
4079
|
}
|
|
3893
4080
|
),
|
|
3894
|
-
showVolumeControl && /* @__PURE__ */
|
|
4081
|
+
showVolumeControl && /* @__PURE__ */ jsx20(
|
|
3895
4082
|
"button",
|
|
3896
4083
|
{
|
|
3897
4084
|
type: "button",
|
|
@@ -3901,7 +4088,7 @@ var CardAudio = forwardRef6(
|
|
|
3901
4088
|
setShowVolumeControl(false);
|
|
3902
4089
|
}
|
|
3903
4090
|
},
|
|
3904
|
-
children: /* @__PURE__ */
|
|
4091
|
+
children: /* @__PURE__ */ jsx20(
|
|
3905
4092
|
"input",
|
|
3906
4093
|
{
|
|
3907
4094
|
type: "range",
|
|
@@ -3942,22 +4129,22 @@ var CardAudio = forwardRef6(
|
|
|
3942
4129
|
}
|
|
3943
4130
|
)
|
|
3944
4131
|
] }),
|
|
3945
|
-
/* @__PURE__ */
|
|
3946
|
-
/* @__PURE__ */
|
|
4132
|
+
/* @__PURE__ */ jsxs16("div", { className: "relative h-6", ref: speedMenuRef, children: [
|
|
4133
|
+
/* @__PURE__ */ jsx20(
|
|
3947
4134
|
"button",
|
|
3948
4135
|
{
|
|
3949
4136
|
type: "button",
|
|
3950
4137
|
onClick: toggleSpeedMenu,
|
|
3951
4138
|
className: "cursor-pointer text-text-950 hover:text-primary-600",
|
|
3952
4139
|
"aria-label": "Op\xE7\xF5es de velocidade",
|
|
3953
|
-
children: /* @__PURE__ */
|
|
4140
|
+
children: /* @__PURE__ */ jsx20(DotsThreeVertical, { size: 24 })
|
|
3954
4141
|
}
|
|
3955
4142
|
),
|
|
3956
|
-
showSpeedMenu && /* @__PURE__ */
|
|
4143
|
+
showSpeedMenu && /* @__PURE__ */ jsx20("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__ */ jsx20("div", { className: "flex flex-col gap-1", children: [
|
|
3957
4144
|
{ speed: 1, label: "1x" },
|
|
3958
4145
|
{ speed: 1.5, label: "1.5x" },
|
|
3959
4146
|
{ speed: 2, label: "2x" }
|
|
3960
|
-
].map(({ speed, label }) => /* @__PURE__ */
|
|
4147
|
+
].map(({ speed, label }) => /* @__PURE__ */ jsx20(
|
|
3961
4148
|
"button",
|
|
3962
4149
|
{
|
|
3963
4150
|
type: "button",
|
|
@@ -3982,10 +4169,10 @@ var SIMULADO_BACKGROUND_CLASSES = {
|
|
|
3982
4169
|
simuladao: "bg-exam-3",
|
|
3983
4170
|
vestibular: "bg-exam-4"
|
|
3984
4171
|
};
|
|
3985
|
-
var CardSimulado =
|
|
4172
|
+
var CardSimulado = forwardRef7(
|
|
3986
4173
|
({ title, duration, info, backgroundColor, className, ...props }, ref) => {
|
|
3987
4174
|
const backgroundClass = SIMULADO_BACKGROUND_CLASSES[backgroundColor];
|
|
3988
|
-
return /* @__PURE__ */
|
|
4175
|
+
return /* @__PURE__ */ jsx20(
|
|
3989
4176
|
CardBase,
|
|
3990
4177
|
{
|
|
3991
4178
|
ref,
|
|
@@ -3998,18 +4185,18 @@ var CardSimulado = forwardRef6(
|
|
|
3998
4185
|
className
|
|
3999
4186
|
),
|
|
4000
4187
|
...props,
|
|
4001
|
-
children: /* @__PURE__ */
|
|
4002
|
-
/* @__PURE__ */
|
|
4003
|
-
/* @__PURE__ */
|
|
4004
|
-
/* @__PURE__ */
|
|
4005
|
-
duration && /* @__PURE__ */
|
|
4006
|
-
/* @__PURE__ */
|
|
4007
|
-
/* @__PURE__ */
|
|
4188
|
+
children: /* @__PURE__ */ jsxs16("div", { className: "flex justify-between items-center w-full gap-4", children: [
|
|
4189
|
+
/* @__PURE__ */ jsxs16("div", { className: "flex flex-col gap-1 flex-1 min-w-0", children: [
|
|
4190
|
+
/* @__PURE__ */ jsx20(Text_default, { size: "lg", weight: "bold", className: "text-text-950 truncate", children: title }),
|
|
4191
|
+
/* @__PURE__ */ jsxs16("div", { className: "flex items-center gap-4 text-text-700", children: [
|
|
4192
|
+
duration && /* @__PURE__ */ jsxs16("div", { className: "flex items-center gap-1", children: [
|
|
4193
|
+
/* @__PURE__ */ jsx20(Clock, { size: 16, className: "flex-shrink-0" }),
|
|
4194
|
+
/* @__PURE__ */ jsx20(Text_default, { size: "sm", children: duration })
|
|
4008
4195
|
] }),
|
|
4009
|
-
/* @__PURE__ */
|
|
4196
|
+
/* @__PURE__ */ jsx20(Text_default, { size: "sm", className: "truncate", children: info })
|
|
4010
4197
|
] })
|
|
4011
4198
|
] }),
|
|
4012
|
-
/* @__PURE__ */
|
|
4199
|
+
/* @__PURE__ */ jsx20(
|
|
4013
4200
|
CaretRight3,
|
|
4014
4201
|
{
|
|
4015
4202
|
size: 24,
|
|
@@ -4022,7 +4209,7 @@ var CardSimulado = forwardRef6(
|
|
|
4022
4209
|
);
|
|
4023
4210
|
}
|
|
4024
4211
|
);
|
|
4025
|
-
var CardTest =
|
|
4212
|
+
var CardTest = forwardRef7(
|
|
4026
4213
|
({
|
|
4027
4214
|
title,
|
|
4028
4215
|
duration,
|
|
@@ -4054,7 +4241,7 @@ var CardTest = forwardRef6(
|
|
|
4054
4241
|
const interactiveClasses = isSelectable ? "cursor-pointer focus:outline-none focus:ring-2 focus:ring-primary-950 focus:ring-offset-2" : "";
|
|
4055
4242
|
const selectedClasses = selected ? "ring-2 ring-primary-950 ring-offset-2" : "";
|
|
4056
4243
|
if (isSelectable) {
|
|
4057
|
-
return /* @__PURE__ */
|
|
4244
|
+
return /* @__PURE__ */ jsx20(
|
|
4058
4245
|
"button",
|
|
4059
4246
|
{
|
|
4060
4247
|
ref,
|
|
@@ -4066,8 +4253,8 @@ var CardTest = forwardRef6(
|
|
|
4066
4253
|
onKeyDown: handleKeyDown,
|
|
4067
4254
|
"aria-pressed": selected,
|
|
4068
4255
|
...props,
|
|
4069
|
-
children: /* @__PURE__ */
|
|
4070
|
-
/* @__PURE__ */
|
|
4256
|
+
children: /* @__PURE__ */ jsxs16("div", { className: "flex flex-col justify-between gap-[27px] flex-grow min-h-[67px] w-full min-w-0", children: [
|
|
4257
|
+
/* @__PURE__ */ jsx20(
|
|
4071
4258
|
Text_default,
|
|
4072
4259
|
{
|
|
4073
4260
|
size: "md",
|
|
@@ -4076,10 +4263,10 @@ var CardTest = forwardRef6(
|
|
|
4076
4263
|
children: title
|
|
4077
4264
|
}
|
|
4078
4265
|
),
|
|
4079
|
-
/* @__PURE__ */
|
|
4080
|
-
duration && /* @__PURE__ */
|
|
4081
|
-
/* @__PURE__ */
|
|
4082
|
-
/* @__PURE__ */
|
|
4266
|
+
/* @__PURE__ */ jsxs16("div", { className: "flex flex-row justify-start items-end gap-4 w-full", children: [
|
|
4267
|
+
duration && /* @__PURE__ */ jsxs16("div", { className: "flex flex-row items-center gap-1 flex-shrink-0", children: [
|
|
4268
|
+
/* @__PURE__ */ jsx20(Clock, { size: 16, className: "text-text-700" }),
|
|
4269
|
+
/* @__PURE__ */ jsx20(
|
|
4083
4270
|
Text_default,
|
|
4084
4271
|
{
|
|
4085
4272
|
size: "sm",
|
|
@@ -4088,7 +4275,7 @@ var CardTest = forwardRef6(
|
|
|
4088
4275
|
}
|
|
4089
4276
|
)
|
|
4090
4277
|
] }),
|
|
4091
|
-
/* @__PURE__ */
|
|
4278
|
+
/* @__PURE__ */ jsx20(
|
|
4092
4279
|
Text_default,
|
|
4093
4280
|
{
|
|
4094
4281
|
size: "sm",
|
|
@@ -4101,14 +4288,14 @@ var CardTest = forwardRef6(
|
|
|
4101
4288
|
}
|
|
4102
4289
|
);
|
|
4103
4290
|
}
|
|
4104
|
-
return /* @__PURE__ */
|
|
4291
|
+
return /* @__PURE__ */ jsx20(
|
|
4105
4292
|
"div",
|
|
4106
4293
|
{
|
|
4107
4294
|
ref,
|
|
4108
4295
|
className: cn(`${baseClasses} ${className}`.trim()),
|
|
4109
4296
|
...props,
|
|
4110
|
-
children: /* @__PURE__ */
|
|
4111
|
-
/* @__PURE__ */
|
|
4297
|
+
children: /* @__PURE__ */ jsxs16("div", { className: "flex flex-col justify-between gap-[27px] flex-grow min-h-[67px] w-full min-w-0", children: [
|
|
4298
|
+
/* @__PURE__ */ jsx20(
|
|
4112
4299
|
Text_default,
|
|
4113
4300
|
{
|
|
4114
4301
|
size: "md",
|
|
@@ -4117,10 +4304,10 @@ var CardTest = forwardRef6(
|
|
|
4117
4304
|
children: title
|
|
4118
4305
|
}
|
|
4119
4306
|
),
|
|
4120
|
-
/* @__PURE__ */
|
|
4121
|
-
duration && /* @__PURE__ */
|
|
4122
|
-
/* @__PURE__ */
|
|
4123
|
-
/* @__PURE__ */
|
|
4307
|
+
/* @__PURE__ */ jsxs16("div", { className: "flex flex-row justify-start items-end gap-4 w-full", children: [
|
|
4308
|
+
duration && /* @__PURE__ */ jsxs16("div", { className: "flex flex-row items-center gap-1 flex-shrink-0", children: [
|
|
4309
|
+
/* @__PURE__ */ jsx20(Clock, { size: 16, className: "text-text-700" }),
|
|
4310
|
+
/* @__PURE__ */ jsx20(
|
|
4124
4311
|
Text_default,
|
|
4125
4312
|
{
|
|
4126
4313
|
size: "sm",
|
|
@@ -4129,7 +4316,7 @@ var CardTest = forwardRef6(
|
|
|
4129
4316
|
}
|
|
4130
4317
|
)
|
|
4131
4318
|
] }),
|
|
4132
|
-
/* @__PURE__ */
|
|
4319
|
+
/* @__PURE__ */ jsx20(
|
|
4133
4320
|
Text_default,
|
|
4134
4321
|
{
|
|
4135
4322
|
size: "sm",
|
|
@@ -4165,15 +4352,15 @@ var SIMULATION_TYPE_STYLES = {
|
|
|
4165
4352
|
text: "Vestibular"
|
|
4166
4353
|
}
|
|
4167
4354
|
};
|
|
4168
|
-
var CardSimulationHistory =
|
|
4169
|
-
return /* @__PURE__ */
|
|
4355
|
+
var CardSimulationHistory = forwardRef7(({ data, onSimulationClick, className, ...props }, ref) => {
|
|
4356
|
+
return /* @__PURE__ */ jsx20(
|
|
4170
4357
|
"div",
|
|
4171
4358
|
{
|
|
4172
4359
|
ref,
|
|
4173
4360
|
className: cn("w-full max-w-[992px] h-auto", className),
|
|
4174
4361
|
...props,
|
|
4175
|
-
children: /* @__PURE__ */
|
|
4176
|
-
data.map((section, sectionIndex) => /* @__PURE__ */
|
|
4362
|
+
children: /* @__PURE__ */ jsxs16("div", { className: "flex flex-col gap-0", children: [
|
|
4363
|
+
data.map((section, sectionIndex) => /* @__PURE__ */ jsx20("div", { className: "flex flex-col", children: /* @__PURE__ */ jsxs16(
|
|
4177
4364
|
"div",
|
|
4178
4365
|
{
|
|
4179
4366
|
className: cn(
|
|
@@ -4181,7 +4368,7 @@ var CardSimulationHistory = forwardRef6(({ data, onSimulationClick, className, .
|
|
|
4181
4368
|
sectionIndex === 0 ? "rounded-t-3xl" : ""
|
|
4182
4369
|
),
|
|
4183
4370
|
children: [
|
|
4184
|
-
/* @__PURE__ */
|
|
4371
|
+
/* @__PURE__ */ jsx20(
|
|
4185
4372
|
Text_default,
|
|
4186
4373
|
{
|
|
4187
4374
|
size: "xs",
|
|
@@ -4190,9 +4377,9 @@ var CardSimulationHistory = forwardRef6(({ data, onSimulationClick, className, .
|
|
|
4190
4377
|
children: section.date
|
|
4191
4378
|
}
|
|
4192
4379
|
),
|
|
4193
|
-
/* @__PURE__ */
|
|
4380
|
+
/* @__PURE__ */ jsx20("div", { className: "flex flex-col gap-2 flex-1", children: section.simulations.map((simulation) => {
|
|
4194
4381
|
const typeStyles = SIMULATION_TYPE_STYLES[simulation.type];
|
|
4195
|
-
return /* @__PURE__ */
|
|
4382
|
+
return /* @__PURE__ */ jsx20(
|
|
4196
4383
|
CardBase,
|
|
4197
4384
|
{
|
|
4198
4385
|
layout: "horizontal",
|
|
@@ -4204,9 +4391,9 @@ var CardSimulationHistory = forwardRef6(({ data, onSimulationClick, className, .
|
|
|
4204
4391
|
transition-shadow duration-200 h-auto min-h-[61px]`
|
|
4205
4392
|
),
|
|
4206
4393
|
onClick: () => onSimulationClick?.(simulation),
|
|
4207
|
-
children: /* @__PURE__ */
|
|
4208
|
-
/* @__PURE__ */
|
|
4209
|
-
/* @__PURE__ */
|
|
4394
|
+
children: /* @__PURE__ */ jsxs16("div", { className: "flex justify-between items-center w-full gap-2", children: [
|
|
4395
|
+
/* @__PURE__ */ jsxs16("div", { className: "flex flex-wrap flex-col justify-between sm:flex-row gap-2 flex-1 min-w-0", children: [
|
|
4396
|
+
/* @__PURE__ */ jsx20(
|
|
4210
4397
|
Text_default,
|
|
4211
4398
|
{
|
|
4212
4399
|
size: "lg",
|
|
@@ -4215,8 +4402,8 @@ var CardSimulationHistory = forwardRef6(({ data, onSimulationClick, className, .
|
|
|
4215
4402
|
children: simulation.title
|
|
4216
4403
|
}
|
|
4217
4404
|
),
|
|
4218
|
-
/* @__PURE__ */
|
|
4219
|
-
/* @__PURE__ */
|
|
4405
|
+
/* @__PURE__ */ jsxs16("div", { className: "flex items-center gap-2", children: [
|
|
4406
|
+
/* @__PURE__ */ jsx20(
|
|
4220
4407
|
Badge_default,
|
|
4221
4408
|
{
|
|
4222
4409
|
variant: "examsOutlined",
|
|
@@ -4225,10 +4412,10 @@ var CardSimulationHistory = forwardRef6(({ data, onSimulationClick, className, .
|
|
|
4225
4412
|
children: typeStyles.text
|
|
4226
4413
|
}
|
|
4227
4414
|
),
|
|
4228
|
-
/* @__PURE__ */
|
|
4415
|
+
/* @__PURE__ */ jsx20(Text_default, { size: "sm", className: "text-text-800 truncate", children: simulation.info })
|
|
4229
4416
|
] })
|
|
4230
4417
|
] }),
|
|
4231
|
-
/* @__PURE__ */
|
|
4418
|
+
/* @__PURE__ */ jsx20(
|
|
4232
4419
|
CaretRight3,
|
|
4233
4420
|
{
|
|
4234
4421
|
size: 24,
|
|
@@ -4244,7 +4431,7 @@ var CardSimulationHistory = forwardRef6(({ data, onSimulationClick, className, .
|
|
|
4244
4431
|
]
|
|
4245
4432
|
}
|
|
4246
4433
|
) }, section.date)),
|
|
4247
|
-
data.length > 0 && /* @__PURE__ */
|
|
4434
|
+
data.length > 0 && /* @__PURE__ */ jsx20("div", { className: "w-full h-6 bg-background rounded-b-3xl" })
|
|
4248
4435
|
] })
|
|
4249
4436
|
}
|
|
4250
4437
|
);
|
|
@@ -4252,14 +4439,14 @@ var CardSimulationHistory = forwardRef6(({ data, onSimulationClick, className, .
|
|
|
4252
4439
|
|
|
4253
4440
|
// src/components/Accordation/Accordation.tsx
|
|
4254
4441
|
import {
|
|
4255
|
-
forwardRef as
|
|
4442
|
+
forwardRef as forwardRef8,
|
|
4256
4443
|
useId as useId4,
|
|
4257
4444
|
useState as useState8,
|
|
4258
4445
|
useEffect as useEffect9
|
|
4259
4446
|
} from "react";
|
|
4260
4447
|
import { CaretRight as CaretRight4 } from "phosphor-react";
|
|
4261
|
-
import { jsx as
|
|
4262
|
-
var CardAccordation =
|
|
4448
|
+
import { jsx as jsx21, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
4449
|
+
var CardAccordation = forwardRef8(
|
|
4263
4450
|
({
|
|
4264
4451
|
trigger,
|
|
4265
4452
|
children,
|
|
@@ -4297,7 +4484,7 @@ var CardAccordation = forwardRef7(
|
|
|
4297
4484
|
handleToggle();
|
|
4298
4485
|
}
|
|
4299
4486
|
};
|
|
4300
|
-
return /* @__PURE__ */
|
|
4487
|
+
return /* @__PURE__ */ jsxs17(
|
|
4301
4488
|
CardBase,
|
|
4302
4489
|
{
|
|
4303
4490
|
ref,
|
|
@@ -4307,7 +4494,7 @@ var CardAccordation = forwardRef7(
|
|
|
4307
4494
|
className: cn("overflow-hidden", className),
|
|
4308
4495
|
...props,
|
|
4309
4496
|
children: [
|
|
4310
|
-
/* @__PURE__ */
|
|
4497
|
+
/* @__PURE__ */ jsxs17(
|
|
4311
4498
|
"button",
|
|
4312
4499
|
{
|
|
4313
4500
|
id: headerId,
|
|
@@ -4325,7 +4512,7 @@ var CardAccordation = forwardRef7(
|
|
|
4325
4512
|
"data-value": value,
|
|
4326
4513
|
children: [
|
|
4327
4514
|
trigger,
|
|
4328
|
-
/* @__PURE__ */
|
|
4515
|
+
/* @__PURE__ */ jsx21(
|
|
4329
4516
|
CaretRight4,
|
|
4330
4517
|
{
|
|
4331
4518
|
size: 20,
|
|
@@ -4340,7 +4527,7 @@ var CardAccordation = forwardRef7(
|
|
|
4340
4527
|
]
|
|
4341
4528
|
}
|
|
4342
4529
|
),
|
|
4343
|
-
/* @__PURE__ */
|
|
4530
|
+
/* @__PURE__ */ jsx21(
|
|
4344
4531
|
"section",
|
|
4345
4532
|
{
|
|
4346
4533
|
id: contentId,
|
|
@@ -4352,7 +4539,7 @@ var CardAccordation = forwardRef7(
|
|
|
4352
4539
|
),
|
|
4353
4540
|
"data-testid": "accordion-content",
|
|
4354
4541
|
"data-value": value,
|
|
4355
|
-
children: /* @__PURE__ */
|
|
4542
|
+
children: /* @__PURE__ */ jsx21("div", { className: "p-4 pt-0", children })
|
|
4356
4543
|
}
|
|
4357
4544
|
)
|
|
4358
4545
|
]
|
|
@@ -4365,15 +4552,15 @@ CardAccordation.displayName = "CardAccordation";
|
|
|
4365
4552
|
// src/components/Accordation/AccordionGroup.tsx
|
|
4366
4553
|
import {
|
|
4367
4554
|
Children as Children3,
|
|
4368
|
-
cloneElement as
|
|
4369
|
-
forwardRef as
|
|
4555
|
+
cloneElement as cloneElement3,
|
|
4556
|
+
forwardRef as forwardRef9,
|
|
4370
4557
|
isValidElement as isValidElement3,
|
|
4371
4558
|
useEffect as useEffect10,
|
|
4372
4559
|
useRef as useRef4,
|
|
4373
4560
|
useState as useState9
|
|
4374
4561
|
} from "react";
|
|
4375
4562
|
import { create as create3 } from "zustand";
|
|
4376
|
-
import { jsx as
|
|
4563
|
+
import { jsx as jsx22 } from "react/jsx-runtime";
|
|
4377
4564
|
function createAccordionGroupStore(type, initialValue, collapsible) {
|
|
4378
4565
|
return create3((set, get) => ({
|
|
4379
4566
|
type,
|
|
@@ -4419,16 +4606,16 @@ var injectStore2 = (children, store, indexRef, onItemToggle) => {
|
|
|
4419
4606
|
if (displayName === "CardAccordation") {
|
|
4420
4607
|
newProps.children = processedChildren;
|
|
4421
4608
|
} else if (processedChildren !== typedChild.props.children) {
|
|
4422
|
-
return
|
|
4609
|
+
return cloneElement3(typedChild, { children: processedChildren });
|
|
4423
4610
|
}
|
|
4424
4611
|
}
|
|
4425
4612
|
if (Object.keys(newProps).length > 0) {
|
|
4426
|
-
return
|
|
4613
|
+
return cloneElement3(typedChild, newProps);
|
|
4427
4614
|
}
|
|
4428
4615
|
return child;
|
|
4429
4616
|
});
|
|
4430
4617
|
};
|
|
4431
|
-
var AccordionGroup =
|
|
4618
|
+
var AccordionGroup = forwardRef9(
|
|
4432
4619
|
({
|
|
4433
4620
|
type = "single",
|
|
4434
4621
|
defaultValue,
|
|
@@ -4513,13 +4700,13 @@ var AccordionGroup = forwardRef8(
|
|
|
4513
4700
|
indexRef,
|
|
4514
4701
|
handleItemToggle
|
|
4515
4702
|
);
|
|
4516
|
-
return /* @__PURE__ */
|
|
4703
|
+
return /* @__PURE__ */ jsx22("div", { ref, className, ...props, children: enhancedChildren });
|
|
4517
4704
|
}
|
|
4518
4705
|
);
|
|
4519
4706
|
AccordionGroup.displayName = "AccordionGroup";
|
|
4520
4707
|
|
|
4521
4708
|
// src/components/CheckBoxGroup/CheckBoxGroup.tsx
|
|
4522
|
-
import { jsx as
|
|
4709
|
+
import { jsx as jsx23, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
4523
4710
|
var CheckboxGroup = ({
|
|
4524
4711
|
categories,
|
|
4525
4712
|
onCategoriesChange
|
|
@@ -4807,7 +4994,7 @@ var CheckboxGroup = ({
|
|
|
4807
4994
|
};
|
|
4808
4995
|
const renderCheckboxItem = (item, categoryKey) => {
|
|
4809
4996
|
const uniqueId = `${categoryKey}-${item.id}`;
|
|
4810
|
-
return /* @__PURE__ */
|
|
4997
|
+
return /* @__PURE__ */ jsxs18(
|
|
4811
4998
|
"div",
|
|
4812
4999
|
{
|
|
4813
5000
|
className: "flex items-center gap-3 px-2",
|
|
@@ -4817,7 +5004,7 @@ var CheckboxGroup = ({
|
|
|
4817
5004
|
onMouseUp: (e) => e.stopPropagation(),
|
|
4818
5005
|
onKeyDown: (e) => e.stopPropagation(),
|
|
4819
5006
|
children: [
|
|
4820
|
-
/* @__PURE__ */
|
|
5007
|
+
/* @__PURE__ */ jsx23(
|
|
4821
5008
|
CheckBox_default,
|
|
4822
5009
|
{
|
|
4823
5010
|
id: uniqueId,
|
|
@@ -4825,7 +5012,7 @@ var CheckboxGroup = ({
|
|
|
4825
5012
|
onChange: () => toggleItem(categoryKey, item.id)
|
|
4826
5013
|
}
|
|
4827
5014
|
),
|
|
4828
|
-
/* @__PURE__ */
|
|
5015
|
+
/* @__PURE__ */ jsx23(
|
|
4829
5016
|
"label",
|
|
4830
5017
|
{
|
|
4831
5018
|
htmlFor: uniqueId,
|
|
@@ -4838,12 +5025,12 @@ var CheckboxGroup = ({
|
|
|
4838
5025
|
item.id
|
|
4839
5026
|
);
|
|
4840
5027
|
};
|
|
4841
|
-
const renderFormattedGroup = (formattedGroup, idx, categoryKey) => /* @__PURE__ */
|
|
5028
|
+
const renderFormattedGroup = (formattedGroup, idx, categoryKey) => /* @__PURE__ */ jsxs18(
|
|
4842
5029
|
"div",
|
|
4843
5030
|
{
|
|
4844
5031
|
className: "flex flex-col gap-3",
|
|
4845
5032
|
children: [
|
|
4846
|
-
"groupLabel" in formattedGroup && formattedGroup.groupLabel && /* @__PURE__ */
|
|
5033
|
+
"groupLabel" in formattedGroup && formattedGroup.groupLabel && /* @__PURE__ */ jsx23(Text_default, { size: "sm", className: "mt-2", weight: "semibold", children: formattedGroup.groupLabel }),
|
|
4847
5034
|
formattedGroup.itens?.map(
|
|
4848
5035
|
(item) => renderCheckboxItem(item, categoryKey)
|
|
4849
5036
|
)
|
|
@@ -4851,9 +5038,9 @@ var CheckboxGroup = ({
|
|
|
4851
5038
|
},
|
|
4852
5039
|
formattedGroup.groupLabel || `group-${idx}`
|
|
4853
5040
|
);
|
|
4854
|
-
const renderAccordionTrigger = (category, isEnabled) => /* @__PURE__ */
|
|
4855
|
-
/* @__PURE__ */
|
|
4856
|
-
/* @__PURE__ */
|
|
5041
|
+
const renderAccordionTrigger = (category, isEnabled) => /* @__PURE__ */ jsxs18("div", { className: "flex items-center justify-between w-full p-2", children: [
|
|
5042
|
+
/* @__PURE__ */ jsxs18("div", { className: "flex items-center gap-3", children: [
|
|
5043
|
+
/* @__PURE__ */ jsx23(
|
|
4857
5044
|
CheckBox_default,
|
|
4858
5045
|
{
|
|
4859
5046
|
checked: isMinimalOneCheckBoxIsSelected(category.key),
|
|
@@ -4862,7 +5049,7 @@ var CheckboxGroup = ({
|
|
|
4862
5049
|
onChange: () => toggleAllInCategory(category.key)
|
|
4863
5050
|
}
|
|
4864
5051
|
),
|
|
4865
|
-
/* @__PURE__ */
|
|
5052
|
+
/* @__PURE__ */ jsx23(
|
|
4866
5053
|
Text_default,
|
|
4867
5054
|
{
|
|
4868
5055
|
size: "sm",
|
|
@@ -4872,7 +5059,7 @@ var CheckboxGroup = ({
|
|
|
4872
5059
|
}
|
|
4873
5060
|
)
|
|
4874
5061
|
] }),
|
|
4875
|
-
(openAccordion === category.key || isEnabled) && /* @__PURE__ */
|
|
5062
|
+
(openAccordion === category.key || isEnabled) && /* @__PURE__ */ jsx23(Badge_default, { variant: "solid", action: "info", children: (() => {
|
|
4876
5063
|
const visibleIds = getFormattedItems(category.key).flatMap((group) => group.itens || []).map((i) => i.id);
|
|
4877
5064
|
const selectedVisibleCount = visibleIds.filter(
|
|
4878
5065
|
(id) => category.selectedIds?.includes(id)
|
|
@@ -4894,8 +5081,8 @@ var CheckboxGroup = ({
|
|
|
4894
5081
|
const hasNoItems = formattedItems.every(
|
|
4895
5082
|
(group) => !group.itens || group.itens.length === 0
|
|
4896
5083
|
);
|
|
4897
|
-
return /* @__PURE__ */
|
|
4898
|
-
/* @__PURE__ */
|
|
5084
|
+
return /* @__PURE__ */ jsxs18("div", { children: [
|
|
5085
|
+
/* @__PURE__ */ jsx23(
|
|
4899
5086
|
CardAccordation,
|
|
4900
5087
|
{
|
|
4901
5088
|
value: category.key,
|
|
@@ -4905,12 +5092,12 @@ var CheckboxGroup = ({
|
|
|
4905
5092
|
openAccordion === category.key && "bg-background-50 border-none"
|
|
4906
5093
|
),
|
|
4907
5094
|
trigger: renderAccordionTrigger(category, isEnabled),
|
|
4908
|
-
children: /* @__PURE__ */
|
|
5095
|
+
children: /* @__PURE__ */ jsx23("div", { className: "flex flex-col gap-3 pt-2", children: hasNoItems && isEnabled ? /* @__PURE__ */ jsx23("div", { className: "px-2 py-4", children: /* @__PURE__ */ jsx23(Text_default, { size: "sm", className: "text-text-500 text-center", children: "Sem dados" }) }) : formattedItems.map(
|
|
4909
5096
|
(formattedGroup, idx) => renderFormattedGroup(formattedGroup, idx, category.key)
|
|
4910
5097
|
) })
|
|
4911
5098
|
}
|
|
4912
5099
|
),
|
|
4913
|
-
openAccordion !== category.key && /* @__PURE__ */
|
|
5100
|
+
openAccordion !== category.key && /* @__PURE__ */ jsx23(Divider_default, {})
|
|
4914
5101
|
] }, category.key);
|
|
4915
5102
|
};
|
|
4916
5103
|
useEffect11(() => {
|
|
@@ -4927,7 +5114,7 @@ var CheckboxGroup = ({
|
|
|
4927
5114
|
}, 0);
|
|
4928
5115
|
}
|
|
4929
5116
|
}, [categories, openAccordion]);
|
|
4930
|
-
return /* @__PURE__ */
|
|
5117
|
+
return /* @__PURE__ */ jsx23(
|
|
4931
5118
|
AccordionGroup,
|
|
4932
5119
|
{
|
|
4933
5120
|
type: "single",
|
|
@@ -4954,7 +5141,7 @@ var CheckboxGroup = ({
|
|
|
4954
5141
|
};
|
|
4955
5142
|
|
|
4956
5143
|
// src/components/Filter/FilterModal.tsx
|
|
4957
|
-
import { jsx as
|
|
5144
|
+
import { jsx as jsx24, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
4958
5145
|
var FilterModal = ({
|
|
4959
5146
|
isOpen,
|
|
4960
5147
|
onClose,
|
|
@@ -4982,20 +5169,20 @@ var FilterModal = ({
|
|
|
4982
5169
|
const handleClear = () => {
|
|
4983
5170
|
onClear();
|
|
4984
5171
|
};
|
|
4985
|
-
return /* @__PURE__ */
|
|
5172
|
+
return /* @__PURE__ */ jsx24(
|
|
4986
5173
|
Modal_default,
|
|
4987
5174
|
{
|
|
4988
5175
|
isOpen,
|
|
4989
5176
|
onClose,
|
|
4990
5177
|
title,
|
|
4991
5178
|
size,
|
|
4992
|
-
footer: /* @__PURE__ */
|
|
4993
|
-
/* @__PURE__ */
|
|
4994
|
-
/* @__PURE__ */
|
|
5179
|
+
footer: /* @__PURE__ */ jsxs19("div", { className: "flex gap-3 justify-end w-full", children: [
|
|
5180
|
+
/* @__PURE__ */ jsx24(Button_default, { variant: "outline", onClick: handleClear, children: clearLabel }),
|
|
5181
|
+
/* @__PURE__ */ jsx24(Button_default, { onClick: handleApply, children: applyLabel })
|
|
4995
5182
|
] }),
|
|
4996
|
-
children: /* @__PURE__ */
|
|
4997
|
-
/* @__PURE__ */
|
|
4998
|
-
config.key === "academic" && /* @__PURE__ */
|
|
5183
|
+
children: /* @__PURE__ */ jsx24("div", { className: "flex flex-col gap-6", children: filterConfigs.map((config, index) => /* @__PURE__ */ jsxs19("div", { className: "flex flex-col gap-4", children: [
|
|
5184
|
+
/* @__PURE__ */ jsxs19("div", { className: "flex items-center gap-2 text-text-400 text-sm font-medium uppercase", children: [
|
|
5185
|
+
config.key === "academic" && /* @__PURE__ */ jsxs19(
|
|
4999
5186
|
"svg",
|
|
5000
5187
|
{
|
|
5001
5188
|
width: "16",
|
|
@@ -5005,7 +5192,7 @@ var FilterModal = ({
|
|
|
5005
5192
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5006
5193
|
className: "text-text-400",
|
|
5007
5194
|
children: [
|
|
5008
|
-
/* @__PURE__ */
|
|
5195
|
+
/* @__PURE__ */ jsx24(
|
|
5009
5196
|
"path",
|
|
5010
5197
|
{
|
|
5011
5198
|
d: "M8 2L2 5.33333L8 8.66667L14 5.33333L8 2Z",
|
|
@@ -5015,7 +5202,7 @@ var FilterModal = ({
|
|
|
5015
5202
|
strokeLinejoin: "round"
|
|
5016
5203
|
}
|
|
5017
5204
|
),
|
|
5018
|
-
/* @__PURE__ */
|
|
5205
|
+
/* @__PURE__ */ jsx24(
|
|
5019
5206
|
"path",
|
|
5020
5207
|
{
|
|
5021
5208
|
d: "M2 10.6667L8 14L14 10.6667",
|
|
@@ -5025,7 +5212,7 @@ var FilterModal = ({
|
|
|
5025
5212
|
strokeLinejoin: "round"
|
|
5026
5213
|
}
|
|
5027
5214
|
),
|
|
5028
|
-
/* @__PURE__ */
|
|
5215
|
+
/* @__PURE__ */ jsx24(
|
|
5029
5216
|
"path",
|
|
5030
5217
|
{
|
|
5031
5218
|
d: "M2 8L8 11.3333L14 8",
|
|
@@ -5038,7 +5225,7 @@ var FilterModal = ({
|
|
|
5038
5225
|
]
|
|
5039
5226
|
}
|
|
5040
5227
|
),
|
|
5041
|
-
config.key === "content" && /* @__PURE__ */
|
|
5228
|
+
config.key === "content" && /* @__PURE__ */ jsxs19(
|
|
5042
5229
|
"svg",
|
|
5043
5230
|
{
|
|
5044
5231
|
width: "16",
|
|
@@ -5048,7 +5235,7 @@ var FilterModal = ({
|
|
|
5048
5235
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5049
5236
|
className: "text-text-400",
|
|
5050
5237
|
children: [
|
|
5051
|
-
/* @__PURE__ */
|
|
5238
|
+
/* @__PURE__ */ jsx24(
|
|
5052
5239
|
"path",
|
|
5053
5240
|
{
|
|
5054
5241
|
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",
|
|
@@ -5058,7 +5245,7 @@ var FilterModal = ({
|
|
|
5058
5245
|
strokeLinejoin: "round"
|
|
5059
5246
|
}
|
|
5060
5247
|
),
|
|
5061
|
-
/* @__PURE__ */
|
|
5248
|
+
/* @__PURE__ */ jsx24(
|
|
5062
5249
|
"path",
|
|
5063
5250
|
{
|
|
5064
5251
|
d: "M2 6H14",
|
|
@@ -5068,7 +5255,7 @@ var FilterModal = ({
|
|
|
5068
5255
|
strokeLinejoin: "round"
|
|
5069
5256
|
}
|
|
5070
5257
|
),
|
|
5071
|
-
/* @__PURE__ */
|
|
5258
|
+
/* @__PURE__ */ jsx24(
|
|
5072
5259
|
"path",
|
|
5073
5260
|
{
|
|
5074
5261
|
d: "M6 2V14",
|
|
@@ -5081,9 +5268,9 @@ var FilterModal = ({
|
|
|
5081
5268
|
]
|
|
5082
5269
|
}
|
|
5083
5270
|
),
|
|
5084
|
-
/* @__PURE__ */
|
|
5271
|
+
/* @__PURE__ */ jsx24("span", { children: config.label })
|
|
5085
5272
|
] }),
|
|
5086
|
-
/* @__PURE__ */
|
|
5273
|
+
/* @__PURE__ */ jsx24(
|
|
5087
5274
|
CheckboxGroup,
|
|
5088
5275
|
{
|
|
5089
5276
|
categories: config.categories,
|
|
@@ -5097,7 +5284,7 @@ var FilterModal = ({
|
|
|
5097
5284
|
|
|
5098
5285
|
// src/components/TableProvider/TableProvider.tsx
|
|
5099
5286
|
import { Funnel } from "phosphor-react";
|
|
5100
|
-
import { Fragment as Fragment5, jsx as
|
|
5287
|
+
import { Fragment as Fragment5, jsx as jsx25, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
5101
5288
|
function TableProvider({
|
|
5102
5289
|
data,
|
|
5103
5290
|
headers,
|
|
@@ -5111,7 +5298,9 @@ function TableProvider({
|
|
|
5111
5298
|
initialFilters = [],
|
|
5112
5299
|
paginationConfig = {},
|
|
5113
5300
|
searchPlaceholder = "Buscar...",
|
|
5114
|
-
|
|
5301
|
+
emptyState,
|
|
5302
|
+
loadingState,
|
|
5303
|
+
noSearchResultState,
|
|
5115
5304
|
rowKey,
|
|
5116
5305
|
onParamsChange,
|
|
5117
5306
|
onRowClick,
|
|
@@ -5230,22 +5419,25 @@ function TableProvider({
|
|
|
5230
5419
|
const start = (currentPage - 1) * itemsPerPage;
|
|
5231
5420
|
return sortedData.slice(start, start + itemsPerPage);
|
|
5232
5421
|
}, [useInternalPagination, sortedData, currentPage, itemsPerPage]);
|
|
5233
|
-
const isEmpty =
|
|
5234
|
-
const
|
|
5235
|
-
|
|
5422
|
+
const isEmpty = data.length === 0;
|
|
5423
|
+
const showLoading = loading;
|
|
5424
|
+
const showNoSearchResult = !loading && data.length === 0 && searchQuery.trim() !== "";
|
|
5425
|
+
const showEmpty = !loading && data.length === 0 && searchQuery.trim() === "";
|
|
5426
|
+
const controls = (enableSearch || enableFilters) && /* @__PURE__ */ jsxs20("div", { className: "flex items-center gap-4", children: [
|
|
5427
|
+
enableFilters && /* @__PURE__ */ jsxs20(
|
|
5236
5428
|
Button_default,
|
|
5237
5429
|
{
|
|
5238
5430
|
variant: "outline",
|
|
5239
5431
|
size: "medium",
|
|
5240
5432
|
onClick: () => setIsFilterModalOpen(true),
|
|
5241
5433
|
children: [
|
|
5242
|
-
/* @__PURE__ */
|
|
5434
|
+
/* @__PURE__ */ jsx25(Funnel, { size: 20 }),
|
|
5243
5435
|
"Filtros",
|
|
5244
|
-
hasActiveFilters && /* @__PURE__ */
|
|
5436
|
+
hasActiveFilters && /* @__PURE__ */ jsx25("span", { className: "ml-2 rounded-full bg-primary-500 px-2 py-0.5 text-xs text-white", children: Object.keys(activeFilters).length })
|
|
5245
5437
|
]
|
|
5246
5438
|
}
|
|
5247
5439
|
),
|
|
5248
|
-
enableSearch && /* @__PURE__ */
|
|
5440
|
+
enableSearch && /* @__PURE__ */ jsx25("div", { className: "flex-1", children: /* @__PURE__ */ jsx25(
|
|
5249
5441
|
Search_default,
|
|
5250
5442
|
{
|
|
5251
5443
|
value: searchQuery,
|
|
@@ -5256,18 +5448,22 @@ function TableProvider({
|
|
|
5256
5448
|
}
|
|
5257
5449
|
) })
|
|
5258
5450
|
] });
|
|
5259
|
-
const table = /* @__PURE__ */
|
|
5451
|
+
const table = /* @__PURE__ */ jsx25("div", { className: "w-full overflow-x-auto", children: /* @__PURE__ */ jsxs20(
|
|
5260
5452
|
Table_default,
|
|
5261
5453
|
{
|
|
5262
5454
|
variant,
|
|
5263
|
-
|
|
5264
|
-
|
|
5455
|
+
showLoading,
|
|
5456
|
+
loadingState,
|
|
5457
|
+
showNoSearchResult,
|
|
5458
|
+
noSearchResultState,
|
|
5459
|
+
showEmpty,
|
|
5460
|
+
emptyState,
|
|
5265
5461
|
children: [
|
|
5266
|
-
/* @__PURE__ */
|
|
5462
|
+
/* @__PURE__ */ jsx25("thead", { children: /* @__PURE__ */ jsx25(
|
|
5267
5463
|
TableRow,
|
|
5268
5464
|
{
|
|
5269
5465
|
variant: variant === "borderless" ? "defaultBorderless" : "default",
|
|
5270
|
-
children: headers.map((header, index) => /* @__PURE__ */
|
|
5466
|
+
children: headers.map((header, index) => /* @__PURE__ */ jsx25(
|
|
5271
5467
|
TableHead,
|
|
5272
5468
|
{
|
|
5273
5469
|
sortable: enableTableSort && header.sortable,
|
|
@@ -5281,7 +5477,7 @@ function TableProvider({
|
|
|
5281
5477
|
))
|
|
5282
5478
|
}
|
|
5283
5479
|
) }),
|
|
5284
|
-
/* @__PURE__ */
|
|
5480
|
+
/* @__PURE__ */ jsx25(TableBody, { children: loading ? /* @__PURE__ */ jsx25(TableRow, { children: /* @__PURE__ */ jsx25(TableCell, { colSpan: headers.length, className: "text-center py-8", children: /* @__PURE__ */ jsx25("span", { className: "text-text-400 text-sm", children: "Carregando..." }) }) }) : displayData.map((row, rowIndex) => {
|
|
5285
5481
|
const effectiveIndex = useInternalPagination ? (currentPage - 1) * itemsPerPage + rowIndex : rowIndex;
|
|
5286
5482
|
const rowKeyValue = rowKey ? (() => {
|
|
5287
5483
|
const keyValue = row[rowKey];
|
|
@@ -5293,7 +5489,7 @@ function TableProvider({
|
|
|
5293
5489
|
}
|
|
5294
5490
|
return String(keyValue);
|
|
5295
5491
|
})() : `row-${effectiveIndex}`;
|
|
5296
|
-
return /* @__PURE__ */
|
|
5492
|
+
return /* @__PURE__ */ jsx25(
|
|
5297
5493
|
TableRow,
|
|
5298
5494
|
{
|
|
5299
5495
|
variant: variant === "borderless" ? "defaultBorderless" : "default",
|
|
@@ -5314,7 +5510,7 @@ function TableProvider({
|
|
|
5314
5510
|
}
|
|
5315
5511
|
}
|
|
5316
5512
|
const content = header.render ? header.render(value, row, effectiveIndex) : defaultContent;
|
|
5317
|
-
return /* @__PURE__ */
|
|
5513
|
+
return /* @__PURE__ */ jsx25(
|
|
5318
5514
|
TableCell,
|
|
5319
5515
|
{
|
|
5320
5516
|
className: header.className,
|
|
@@ -5333,7 +5529,7 @@ function TableProvider({
|
|
|
5333
5529
|
]
|
|
5334
5530
|
}
|
|
5335
5531
|
) });
|
|
5336
|
-
const pagination = enablePagination && !isEmpty && /* @__PURE__ */
|
|
5532
|
+
const pagination = enablePagination && !isEmpty && /* @__PURE__ */ jsx25("div", { className: "flex justify-end", children: /* @__PURE__ */ jsx25(
|
|
5337
5533
|
TablePagination_default,
|
|
5338
5534
|
{
|
|
5339
5535
|
currentPage,
|
|
@@ -5347,9 +5543,9 @@ function TableProvider({
|
|
|
5347
5543
|
}
|
|
5348
5544
|
) });
|
|
5349
5545
|
if (children) {
|
|
5350
|
-
return /* @__PURE__ */
|
|
5546
|
+
return /* @__PURE__ */ jsxs20(Fragment5, { children: [
|
|
5351
5547
|
children({ controls, table, pagination }),
|
|
5352
|
-
enableFilters && /* @__PURE__ */
|
|
5548
|
+
enableFilters && /* @__PURE__ */ jsx25(
|
|
5353
5549
|
FilterModal,
|
|
5354
5550
|
{
|
|
5355
5551
|
isOpen: isFilterModalOpen,
|
|
@@ -5362,11 +5558,11 @@ function TableProvider({
|
|
|
5362
5558
|
)
|
|
5363
5559
|
] });
|
|
5364
5560
|
}
|
|
5365
|
-
return /* @__PURE__ */
|
|
5561
|
+
return /* @__PURE__ */ jsxs20("div", { className: "w-full space-y-4", children: [
|
|
5366
5562
|
controls,
|
|
5367
5563
|
table,
|
|
5368
5564
|
pagination,
|
|
5369
|
-
enableFilters && /* @__PURE__ */
|
|
5565
|
+
enableFilters && /* @__PURE__ */ jsx25(
|
|
5370
5566
|
FilterModal,
|
|
5371
5567
|
{
|
|
5372
5568
|
isOpen: isFilterModalOpen,
|