analytica-frontend-lib 1.2.21 → 1.2.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AlertManager/index.css +20 -3
- package/dist/AlertManager/index.css.map +1 -1
- package/dist/AlertManagerView/index.js +382 -159
- package/dist/AlertManagerView/index.js.map +1 -1
- package/dist/AlertManagerView/index.mjs +381 -159
- package/dist/AlertManagerView/index.mjs.map +1 -1
- package/dist/EmptyState/index.d.mts +65 -0
- package/dist/EmptyState/index.d.ts +65 -0
- package/dist/EmptyState/index.js +185 -0
- package/dist/EmptyState/index.js.map +1 -0
- package/dist/EmptyState/index.mjs +162 -0
- package/dist/EmptyState/index.mjs.map +1 -0
- package/dist/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 +363 -140
- package/dist/Table/index.js.map +1 -1
- package/dist/Table/index.mjs +358 -136
- package/dist/Table/index.mjs.map +1 -1
- package/dist/TableProvider/index.css +20 -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 +861 -629
- package/dist/TableProvider/index.js.map +1 -1
- package/dist/TableProvider/index.mjs +772 -541
- package/dist/TableProvider/index.mjs.map +1 -1
- package/dist/{TableProvider-CDcL1tDj.d.mts → TableProvider-BnAnv3OV.d.mts} +51 -4
- package/dist/{TableProvider-D4Ak7ofz.d.ts → TableProvider-GfPlLqzg.d.ts} +51 -4
- package/dist/index.css +20 -3
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +4 -3
- package/dist/index.d.ts +4 -3
- package/dist/index.js +1361 -1279
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1318 -1238
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +20 -3
- package/dist/styles.css.map +1 -1
- package/package.json +2 -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,204 @@ var Button = ({
|
|
|
160
159
|
};
|
|
161
160
|
var Button_default = Button;
|
|
162
161
|
|
|
162
|
+
// src/components/EmptyState/EmptyState.tsx
|
|
163
|
+
import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
164
|
+
var EmptyState = ({
|
|
165
|
+
image,
|
|
166
|
+
title,
|
|
167
|
+
description,
|
|
168
|
+
buttonText,
|
|
169
|
+
buttonIcon,
|
|
170
|
+
onButtonClick,
|
|
171
|
+
buttonVariant = "solid",
|
|
172
|
+
buttonAction = "primary"
|
|
173
|
+
}) => {
|
|
174
|
+
const displayTitle = title || "Nenhum dado dispon\xEDvel";
|
|
175
|
+
const displayDescription = description || "N\xE3o h\xE1 dados para exibir no momento.";
|
|
176
|
+
return /* @__PURE__ */ jsxs3("div", { className: "flex flex-col justify-center items-center gap-6 w-full min-h-[705px] bg-background rounded-xl p-6", children: [
|
|
177
|
+
image && /* @__PURE__ */ jsx4("img", { src: image, alt: displayTitle, className: "w-[170px] h-[150px]" }),
|
|
178
|
+
/* @__PURE__ */ jsxs3("div", { className: "flex flex-col items-center gap-4 w-full max-w-[600px] px-6", children: [
|
|
179
|
+
/* @__PURE__ */ jsx4(
|
|
180
|
+
Text_default,
|
|
181
|
+
{
|
|
182
|
+
as: "h2",
|
|
183
|
+
className: "text-text-950 font-semibold text-3xl leading-[35px] text-center",
|
|
184
|
+
children: displayTitle
|
|
185
|
+
}
|
|
186
|
+
),
|
|
187
|
+
/* @__PURE__ */ jsx4(Text_default, { className: "text-text-600 font-normal text-[18px] leading-[27px] text-center", children: displayDescription })
|
|
188
|
+
] }),
|
|
189
|
+
buttonText && onButtonClick && /* @__PURE__ */ jsx4(
|
|
190
|
+
Button_default,
|
|
191
|
+
{
|
|
192
|
+
variant: buttonVariant,
|
|
193
|
+
action: buttonAction,
|
|
194
|
+
size: "large",
|
|
195
|
+
onClick: onButtonClick,
|
|
196
|
+
iconLeft: buttonIcon,
|
|
197
|
+
className: "rounded-full px-5 py-2.5",
|
|
198
|
+
children: buttonText
|
|
199
|
+
}
|
|
200
|
+
)
|
|
201
|
+
] });
|
|
202
|
+
};
|
|
203
|
+
var EmptyState_default = EmptyState;
|
|
204
|
+
|
|
205
|
+
// src/components/Skeleton/Skeleton.tsx
|
|
206
|
+
import { forwardRef } from "react";
|
|
207
|
+
import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
208
|
+
var SKELETON_ANIMATION_CLASSES = {
|
|
209
|
+
pulse: "animate-pulse",
|
|
210
|
+
none: ""
|
|
211
|
+
};
|
|
212
|
+
var SKELETON_VARIANT_CLASSES = {
|
|
213
|
+
text: "h-4 bg-background-200 rounded",
|
|
214
|
+
circular: "bg-background-200 rounded-full",
|
|
215
|
+
rectangular: "bg-background-200",
|
|
216
|
+
rounded: "bg-background-200 rounded-lg"
|
|
217
|
+
};
|
|
218
|
+
var SPACING_CLASSES = {
|
|
219
|
+
none: "",
|
|
220
|
+
small: "space-y-1",
|
|
221
|
+
medium: "space-y-2",
|
|
222
|
+
large: "space-y-3"
|
|
223
|
+
};
|
|
224
|
+
var Skeleton = forwardRef(
|
|
225
|
+
({
|
|
226
|
+
variant = "text",
|
|
227
|
+
width,
|
|
228
|
+
height,
|
|
229
|
+
animation = "pulse",
|
|
230
|
+
lines = 1,
|
|
231
|
+
spacing = "none",
|
|
232
|
+
className = "",
|
|
233
|
+
children,
|
|
234
|
+
...props
|
|
235
|
+
}, ref) => {
|
|
236
|
+
const animationClass = SKELETON_ANIMATION_CLASSES[animation];
|
|
237
|
+
const variantClass = SKELETON_VARIANT_CLASSES[variant];
|
|
238
|
+
const spacingClass = SPACING_CLASSES[spacing];
|
|
239
|
+
const style = {
|
|
240
|
+
width: typeof width === "number" ? `${width}px` : width,
|
|
241
|
+
height: typeof height === "number" ? `${height}px` : height
|
|
242
|
+
};
|
|
243
|
+
if (variant === "text" && lines > 1) {
|
|
244
|
+
return /* @__PURE__ */ jsx5(
|
|
245
|
+
"div",
|
|
246
|
+
{
|
|
247
|
+
ref,
|
|
248
|
+
className: cn("flex flex-col", spacingClass, className),
|
|
249
|
+
...props,
|
|
250
|
+
children: Array.from({ length: lines }, (_, index) => /* @__PURE__ */ jsx5(
|
|
251
|
+
"div",
|
|
252
|
+
{
|
|
253
|
+
className: cn(variantClass, animationClass),
|
|
254
|
+
style: index === lines - 1 ? { width: "60%" } : void 0
|
|
255
|
+
},
|
|
256
|
+
index
|
|
257
|
+
))
|
|
258
|
+
}
|
|
259
|
+
);
|
|
260
|
+
}
|
|
261
|
+
return /* @__PURE__ */ jsx5(
|
|
262
|
+
"div",
|
|
263
|
+
{
|
|
264
|
+
ref,
|
|
265
|
+
className: cn(variantClass, animationClass, className),
|
|
266
|
+
style,
|
|
267
|
+
...props,
|
|
268
|
+
children
|
|
269
|
+
}
|
|
270
|
+
);
|
|
271
|
+
}
|
|
272
|
+
);
|
|
273
|
+
var SkeletonText = forwardRef(
|
|
274
|
+
(props, ref) => /* @__PURE__ */ jsx5(Skeleton, { ref, variant: "text", ...props })
|
|
275
|
+
);
|
|
276
|
+
var SkeletonCircle = forwardRef((props, ref) => /* @__PURE__ */ jsx5(Skeleton, { ref, variant: "circular", ...props }));
|
|
277
|
+
var SkeletonRectangle = forwardRef((props, ref) => /* @__PURE__ */ jsx5(Skeleton, { ref, variant: "rectangular", ...props }));
|
|
278
|
+
var SkeletonRounded = forwardRef((props, ref) => /* @__PURE__ */ jsx5(Skeleton, { ref, variant: "rounded", ...props }));
|
|
279
|
+
var SkeletonCard = forwardRef(
|
|
280
|
+
({
|
|
281
|
+
showAvatar = true,
|
|
282
|
+
showTitle = true,
|
|
283
|
+
showDescription = true,
|
|
284
|
+
showActions = true,
|
|
285
|
+
lines = 2,
|
|
286
|
+
className = "",
|
|
287
|
+
...props
|
|
288
|
+
}, ref) => {
|
|
289
|
+
return /* @__PURE__ */ jsxs4(
|
|
290
|
+
"div",
|
|
291
|
+
{
|
|
292
|
+
ref,
|
|
293
|
+
className: cn(
|
|
294
|
+
"w-full p-4 bg-background border border-border-200 rounded-lg",
|
|
295
|
+
className
|
|
296
|
+
),
|
|
297
|
+
...props,
|
|
298
|
+
children: [
|
|
299
|
+
/* @__PURE__ */ jsxs4("div", { className: "flex items-start space-x-3", children: [
|
|
300
|
+
showAvatar && /* @__PURE__ */ jsx5(SkeletonCircle, { width: 40, height: 40 }),
|
|
301
|
+
/* @__PURE__ */ jsxs4("div", { className: "flex-1 space-y-2", children: [
|
|
302
|
+
showTitle && /* @__PURE__ */ jsx5(SkeletonText, { width: "60%", height: 20 }),
|
|
303
|
+
showDescription && /* @__PURE__ */ jsx5(SkeletonText, { lines, spacing: "small" })
|
|
304
|
+
] })
|
|
305
|
+
] }),
|
|
306
|
+
showActions && /* @__PURE__ */ jsxs4("div", { className: "flex justify-end space-x-2 mt-4", children: [
|
|
307
|
+
/* @__PURE__ */ jsx5(SkeletonRectangle, { width: 80, height: 32 }),
|
|
308
|
+
/* @__PURE__ */ jsx5(SkeletonRectangle, { width: 80, height: 32 })
|
|
309
|
+
] })
|
|
310
|
+
]
|
|
311
|
+
}
|
|
312
|
+
);
|
|
313
|
+
}
|
|
314
|
+
);
|
|
315
|
+
var SkeletonList = forwardRef(
|
|
316
|
+
({
|
|
317
|
+
items = 3,
|
|
318
|
+
showAvatar = true,
|
|
319
|
+
showTitle = true,
|
|
320
|
+
showDescription = true,
|
|
321
|
+
lines = 1,
|
|
322
|
+
className = "",
|
|
323
|
+
...props
|
|
324
|
+
}, ref) => {
|
|
325
|
+
return /* @__PURE__ */ jsx5("div", { ref, className: cn("space-y-3", className), ...props, children: Array.from({ length: items }, (_, index) => /* @__PURE__ */ jsxs4("div", { className: "flex items-start space-x-3 p-3", children: [
|
|
326
|
+
showAvatar && /* @__PURE__ */ jsx5(SkeletonCircle, { width: 32, height: 32 }),
|
|
327
|
+
/* @__PURE__ */ jsxs4("div", { className: "flex-1 space-y-2", children: [
|
|
328
|
+
showTitle && /* @__PURE__ */ jsx5(SkeletonText, { width: "40%", height: 16 }),
|
|
329
|
+
showDescription && /* @__PURE__ */ jsx5(SkeletonText, { lines, spacing: "small" })
|
|
330
|
+
] })
|
|
331
|
+
] }, index)) });
|
|
332
|
+
}
|
|
333
|
+
);
|
|
334
|
+
var SkeletonTable = forwardRef(
|
|
335
|
+
({ rows = 5, columns = 4, showHeader = true, className = "", ...props }, ref) => {
|
|
336
|
+
return /* @__PURE__ */ jsxs4("div", { ref, className: cn("w-full", className), ...props, children: [
|
|
337
|
+
showHeader && /* @__PURE__ */ jsx5("div", { className: "flex space-x-2 mb-3", children: Array.from({ length: columns }, (_, index) => /* @__PURE__ */ jsx5(
|
|
338
|
+
SkeletonText,
|
|
339
|
+
{
|
|
340
|
+
width: `${100 / columns}%`,
|
|
341
|
+
height: 20
|
|
342
|
+
},
|
|
343
|
+
index
|
|
344
|
+
)) }),
|
|
345
|
+
/* @__PURE__ */ jsx5("div", { className: "space-y-2", children: Array.from({ length: rows }, (_, rowIndex) => /* @__PURE__ */ jsx5("div", { className: "flex space-x-2", children: Array.from({ length: columns }, (_2, colIndex) => /* @__PURE__ */ jsx5(
|
|
346
|
+
SkeletonText,
|
|
347
|
+
{
|
|
348
|
+
width: `${100 / columns}%`,
|
|
349
|
+
height: 16
|
|
350
|
+
},
|
|
351
|
+
colIndex
|
|
352
|
+
)) }, rowIndex)) })
|
|
353
|
+
] });
|
|
354
|
+
}
|
|
355
|
+
);
|
|
356
|
+
|
|
163
357
|
// src/components/Table/TablePagination.tsx
|
|
164
358
|
import { CaretLeft, CaretRight, CaretDown } from "phosphor-react";
|
|
165
|
-
import { jsx as
|
|
359
|
+
import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
166
360
|
var TablePagination = ({
|
|
167
361
|
totalItems,
|
|
168
362
|
currentPage,
|
|
@@ -193,7 +387,7 @@ var TablePagination = ({
|
|
|
193
387
|
};
|
|
194
388
|
const isFirstPage = currentPage === 1;
|
|
195
389
|
const isLastPage = currentPage === totalPages;
|
|
196
|
-
return /* @__PURE__ */
|
|
390
|
+
return /* @__PURE__ */ jsxs5(
|
|
197
391
|
"div",
|
|
198
392
|
{
|
|
199
393
|
className: cn(
|
|
@@ -203,29 +397,29 @@ var TablePagination = ({
|
|
|
203
397
|
),
|
|
204
398
|
...props,
|
|
205
399
|
children: [
|
|
206
|
-
/* @__PURE__ */
|
|
400
|
+
/* @__PURE__ */ jsxs5("span", { className: "font-normal text-xs leading-[14px] text-text-800", children: [
|
|
207
401
|
startItem,
|
|
208
402
|
" de ",
|
|
209
403
|
totalItems,
|
|
210
404
|
" ",
|
|
211
405
|
itemLabel
|
|
212
406
|
] }),
|
|
213
|
-
/* @__PURE__ */
|
|
214
|
-
onItemsPerPageChange && /* @__PURE__ */
|
|
215
|
-
/* @__PURE__ */
|
|
407
|
+
/* @__PURE__ */ jsxs5("div", { className: "flex flex-wrap sm:flex-nowrap items-center gap-2 sm:gap-4 justify-center sm:justify-start", children: [
|
|
408
|
+
onItemsPerPageChange && /* @__PURE__ */ jsxs5("div", { className: "relative", children: [
|
|
409
|
+
/* @__PURE__ */ jsx6(
|
|
216
410
|
"select",
|
|
217
411
|
{
|
|
218
412
|
value: itemsPerPage,
|
|
219
413
|
onChange: handleItemsPerPageChange,
|
|
220
414
|
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
415
|
"aria-label": "Items por p\xE1gina",
|
|
222
|
-
children: itemsPerPageOptions.map((option) => /* @__PURE__ */
|
|
416
|
+
children: itemsPerPageOptions.map((option) => /* @__PURE__ */ jsxs5("option", { value: option, children: [
|
|
223
417
|
option,
|
|
224
418
|
" itens"
|
|
225
419
|
] }, option))
|
|
226
420
|
}
|
|
227
421
|
),
|
|
228
|
-
/* @__PURE__ */
|
|
422
|
+
/* @__PURE__ */ jsx6(
|
|
229
423
|
CaretDown,
|
|
230
424
|
{
|
|
231
425
|
size: 14,
|
|
@@ -234,13 +428,13 @@ var TablePagination = ({
|
|
|
234
428
|
}
|
|
235
429
|
)
|
|
236
430
|
] }),
|
|
237
|
-
/* @__PURE__ */
|
|
431
|
+
/* @__PURE__ */ jsxs5("span", { className: "font-normal text-xs leading-[14px] text-text-950", children: [
|
|
238
432
|
"P\xE1gina ",
|
|
239
433
|
currentPage,
|
|
240
434
|
" de ",
|
|
241
435
|
totalPages
|
|
242
436
|
] }),
|
|
243
|
-
/* @__PURE__ */
|
|
437
|
+
/* @__PURE__ */ jsxs5(
|
|
244
438
|
"button",
|
|
245
439
|
{
|
|
246
440
|
onClick: handlePrevious,
|
|
@@ -251,12 +445,12 @@ var TablePagination = ({
|
|
|
251
445
|
),
|
|
252
446
|
"aria-label": "P\xE1gina anterior",
|
|
253
447
|
children: [
|
|
254
|
-
/* @__PURE__ */
|
|
255
|
-
/* @__PURE__ */
|
|
448
|
+
/* @__PURE__ */ jsx6(CaretLeft, { size: 12, weight: "bold", className: "text-primary-950" }),
|
|
449
|
+
/* @__PURE__ */ jsx6("span", { className: "font-medium text-xs leading-[14px] text-primary-950", children: "Anterior" })
|
|
256
450
|
]
|
|
257
451
|
}
|
|
258
452
|
),
|
|
259
|
-
/* @__PURE__ */
|
|
453
|
+
/* @__PURE__ */ jsxs5(
|
|
260
454
|
"button",
|
|
261
455
|
{
|
|
262
456
|
onClick: handleNext,
|
|
@@ -267,8 +461,8 @@ var TablePagination = ({
|
|
|
267
461
|
),
|
|
268
462
|
"aria-label": "Pr\xF3xima p\xE1gina",
|
|
269
463
|
children: [
|
|
270
|
-
/* @__PURE__ */
|
|
271
|
-
/* @__PURE__ */
|
|
464
|
+
/* @__PURE__ */ jsx6("span", { className: "font-medium text-xs leading-[14px] text-primary-950", children: "Pr\xF3xima" }),
|
|
465
|
+
/* @__PURE__ */ jsx6(CaretRight, { size: 12, weight: "bold", className: "text-primary-950" })
|
|
272
466
|
]
|
|
273
467
|
}
|
|
274
468
|
)
|
|
@@ -281,7 +475,7 @@ TablePagination.displayName = "TablePagination";
|
|
|
281
475
|
var TablePagination_default = TablePagination;
|
|
282
476
|
|
|
283
477
|
// src/components/Table/Table.tsx
|
|
284
|
-
import { jsx as
|
|
478
|
+
import { jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
285
479
|
function useTableSort(data, options = {}) {
|
|
286
480
|
const { syncWithUrl = false } = options;
|
|
287
481
|
const getInitialState = () => {
|
|
@@ -351,121 +545,149 @@ function useTableSort(data, options = {}) {
|
|
|
351
545
|
}, [data, sortColumn, sortDirection]);
|
|
352
546
|
return { sortedData, sortColumn, sortDirection, handleSort };
|
|
353
547
|
}
|
|
354
|
-
var
|
|
548
|
+
var renderHeaderElements = (children) => {
|
|
549
|
+
return Children.map(children, (child) => {
|
|
550
|
+
if (isValidElement(child) && (child.type === TableCaption || child.type === TableHeader)) {
|
|
551
|
+
return child;
|
|
552
|
+
}
|
|
553
|
+
return null;
|
|
554
|
+
});
|
|
555
|
+
};
|
|
556
|
+
var getNoSearchResultContent = (config, defaultTitle, defaultDescription) => {
|
|
557
|
+
if (config.component) {
|
|
558
|
+
return config.component;
|
|
559
|
+
}
|
|
560
|
+
if (config.image) {
|
|
561
|
+
return /* @__PURE__ */ jsx7(
|
|
562
|
+
NoSearchResult_default,
|
|
563
|
+
{
|
|
564
|
+
image: config.image,
|
|
565
|
+
title: config.title || defaultTitle,
|
|
566
|
+
description: config.description || defaultDescription
|
|
567
|
+
}
|
|
568
|
+
);
|
|
569
|
+
}
|
|
570
|
+
return /* @__PURE__ */ jsxs6("div", { className: "text-center", children: [
|
|
571
|
+
/* @__PURE__ */ jsx7("p", { className: "text-text-600 text-lg font-semibold mb-2", children: config.title || defaultTitle }),
|
|
572
|
+
/* @__PURE__ */ jsx7("p", { className: "text-text-500 text-sm", children: config.description || defaultDescription })
|
|
573
|
+
] });
|
|
574
|
+
};
|
|
575
|
+
var getEmptyStateContent = (config, defaultTitle, defaultDescription) => {
|
|
576
|
+
if (config?.component) {
|
|
577
|
+
return config.component;
|
|
578
|
+
}
|
|
579
|
+
return /* @__PURE__ */ jsx7(
|
|
580
|
+
EmptyState_default,
|
|
581
|
+
{
|
|
582
|
+
image: config?.image,
|
|
583
|
+
title: config?.title || defaultTitle,
|
|
584
|
+
description: config?.description || defaultDescription,
|
|
585
|
+
buttonText: config?.buttonText,
|
|
586
|
+
buttonIcon: config?.buttonIcon,
|
|
587
|
+
onButtonClick: config?.onButtonClick,
|
|
588
|
+
buttonVariant: config?.buttonVariant,
|
|
589
|
+
buttonAction: config?.buttonAction
|
|
590
|
+
}
|
|
591
|
+
);
|
|
592
|
+
};
|
|
593
|
+
var renderTableWrapper = (variant, tableRef, className, children, stateContent, tableProps) => {
|
|
594
|
+
return /* @__PURE__ */ jsxs6(
|
|
595
|
+
"div",
|
|
596
|
+
{
|
|
597
|
+
className: cn(
|
|
598
|
+
"relative w-full overflow-x-auto",
|
|
599
|
+
variant === "default" && "border border-border-200 rounded-xl"
|
|
600
|
+
),
|
|
601
|
+
children: [
|
|
602
|
+
/* @__PURE__ */ jsx7(
|
|
603
|
+
"table",
|
|
604
|
+
{
|
|
605
|
+
ref: tableRef,
|
|
606
|
+
className: cn(
|
|
607
|
+
"analytica-table w-full caption-bottom text-sm border-separate border-spacing-0",
|
|
608
|
+
className
|
|
609
|
+
),
|
|
610
|
+
...tableProps,
|
|
611
|
+
children: renderHeaderElements(children)
|
|
612
|
+
}
|
|
613
|
+
),
|
|
614
|
+
/* @__PURE__ */ jsx7("div", { className: "py-8 flex justify-center", children: stateContent })
|
|
615
|
+
]
|
|
616
|
+
}
|
|
617
|
+
);
|
|
618
|
+
};
|
|
619
|
+
var Table = forwardRef2(
|
|
355
620
|
({
|
|
356
621
|
variant = "default",
|
|
357
622
|
className,
|
|
358
623
|
children,
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
onEmptyStateButtonClick,
|
|
624
|
+
showLoading = false,
|
|
625
|
+
loadingState,
|
|
626
|
+
showNoSearchResult = false,
|
|
627
|
+
noSearchResultState,
|
|
628
|
+
showEmpty = false,
|
|
629
|
+
emptyState,
|
|
366
630
|
...props
|
|
367
631
|
}, 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;
|
|
632
|
+
const defaultNoSearchResultState = {
|
|
633
|
+
title: "Nenhum resultado encontrado",
|
|
634
|
+
description: "N\xE3o encontramos nenhum resultado com esse nome. Tente revisar a busca ou usar outra palavra-chave."
|
|
635
|
+
};
|
|
636
|
+
const defaultEmptyState = {
|
|
637
|
+
title: "Nenhum dado dispon\xEDvel",
|
|
638
|
+
description: "N\xE3o h\xE1 dados para exibir no momento."
|
|
639
|
+
};
|
|
640
|
+
const finalNoSearchResultState = noSearchResultState || defaultNoSearchResultState;
|
|
641
|
+
const finalEmptyState = emptyState || defaultEmptyState;
|
|
642
|
+
if (showLoading) {
|
|
643
|
+
const loadingContent = loadingState?.component || /* @__PURE__ */ jsx7(SkeletonTable, { rows: 5, columns: 4, showHeader: false });
|
|
644
|
+
return renderTableWrapper(
|
|
645
|
+
variant,
|
|
646
|
+
ref,
|
|
647
|
+
className,
|
|
648
|
+
children,
|
|
649
|
+
loadingContent,
|
|
650
|
+
props
|
|
651
|
+
);
|
|
652
|
+
}
|
|
400
653
|
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
|
-
}
|
|
654
|
+
const noSearchContent = getNoSearchResultContent(
|
|
655
|
+
finalNoSearchResultState,
|
|
656
|
+
defaultNoSearchResultState.title || "",
|
|
657
|
+
defaultNoSearchResultState.description || ""
|
|
658
|
+
);
|
|
659
|
+
return renderTableWrapper(
|
|
660
|
+
variant,
|
|
661
|
+
ref,
|
|
662
|
+
className,
|
|
663
|
+
children,
|
|
664
|
+
noSearchContent,
|
|
665
|
+
props
|
|
439
666
|
);
|
|
440
667
|
}
|
|
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(
|
|
668
|
+
if (showEmpty) {
|
|
669
|
+
const emptyContent = getEmptyStateContent(
|
|
670
|
+
finalEmptyState,
|
|
671
|
+
defaultEmptyState.title || "Nenhum dado dispon\xEDvel",
|
|
672
|
+
defaultEmptyState.description || "N\xE3o h\xE1 dados para exibir no momento."
|
|
673
|
+
);
|
|
674
|
+
return renderTableWrapper(
|
|
675
|
+
variant,
|
|
676
|
+
ref,
|
|
677
|
+
className,
|
|
678
|
+
children,
|
|
679
|
+
emptyContent,
|
|
680
|
+
props
|
|
681
|
+
);
|
|
682
|
+
}
|
|
683
|
+
return /* @__PURE__ */ jsx7(
|
|
462
684
|
"div",
|
|
463
685
|
{
|
|
464
686
|
className: cn(
|
|
465
687
|
"relative w-full overflow-x-auto",
|
|
466
688
|
variant === "default" && "border border-border-200 rounded-xl"
|
|
467
689
|
),
|
|
468
|
-
children: /* @__PURE__ */
|
|
690
|
+
children: /* @__PURE__ */ jsxs6(
|
|
469
691
|
"table",
|
|
470
692
|
{
|
|
471
693
|
ref,
|
|
@@ -479,8 +701,8 @@ var Table = forwardRef(
|
|
|
479
701
|
children: [
|
|
480
702
|
!Children.toArray(children).some(
|
|
481
703
|
(child) => isValidElement(child) && child.type === TableCaption
|
|
482
|
-
) && /* @__PURE__ */
|
|
483
|
-
|
|
704
|
+
) && /* @__PURE__ */ jsx7("caption", { className: "sr-only", children: "My Table" }),
|
|
705
|
+
children
|
|
484
706
|
]
|
|
485
707
|
}
|
|
486
708
|
)
|
|
@@ -489,7 +711,7 @@ var Table = forwardRef(
|
|
|
489
711
|
}
|
|
490
712
|
);
|
|
491
713
|
Table.displayName = "Table";
|
|
492
|
-
var TableHeader =
|
|
714
|
+
var TableHeader = forwardRef2(({ className, ...props }, ref) => /* @__PURE__ */ jsx7(
|
|
493
715
|
"thead",
|
|
494
716
|
{
|
|
495
717
|
ref,
|
|
@@ -498,8 +720,8 @@ var TableHeader = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ j
|
|
|
498
720
|
}
|
|
499
721
|
));
|
|
500
722
|
TableHeader.displayName = "TableHeader";
|
|
501
|
-
var TableBody =
|
|
502
|
-
({ className, variant = "default", ...props }, ref) => /* @__PURE__ */
|
|
723
|
+
var TableBody = forwardRef2(
|
|
724
|
+
({ className, variant = "default", ...props }, ref) => /* @__PURE__ */ jsx7(
|
|
503
725
|
"tbody",
|
|
504
726
|
{
|
|
505
727
|
ref,
|
|
@@ -513,8 +735,8 @@ var TableBody = forwardRef(
|
|
|
513
735
|
)
|
|
514
736
|
);
|
|
515
737
|
TableBody.displayName = "TableBody";
|
|
516
|
-
var TableFooter =
|
|
517
|
-
({ variant = "default", className, ...props }, ref) => /* @__PURE__ */
|
|
738
|
+
var TableFooter = forwardRef2(
|
|
739
|
+
({ variant = "default", className, ...props }, ref) => /* @__PURE__ */ jsx7(
|
|
518
740
|
"tfoot",
|
|
519
741
|
{
|
|
520
742
|
ref,
|
|
@@ -550,7 +772,7 @@ var VARIANT_STATES_ROW = {
|
|
|
550
772
|
borderless: "bg-background-50 opacity-50 cursor-not-allowed"
|
|
551
773
|
}
|
|
552
774
|
};
|
|
553
|
-
var TableRow =
|
|
775
|
+
var TableRow = forwardRef2(
|
|
554
776
|
({
|
|
555
777
|
variant = "default",
|
|
556
778
|
state = "default",
|
|
@@ -558,7 +780,7 @@ var TableRow = forwardRef(
|
|
|
558
780
|
className,
|
|
559
781
|
...props
|
|
560
782
|
}, ref) => {
|
|
561
|
-
return /* @__PURE__ */
|
|
783
|
+
return /* @__PURE__ */ jsx7(
|
|
562
784
|
"tr",
|
|
563
785
|
{
|
|
564
786
|
ref,
|
|
@@ -576,7 +798,7 @@ var TableRow = forwardRef(
|
|
|
576
798
|
}
|
|
577
799
|
);
|
|
578
800
|
TableRow.displayName = "TableRow";
|
|
579
|
-
var TableHead =
|
|
801
|
+
var TableHead = forwardRef2(
|
|
580
802
|
({
|
|
581
803
|
className,
|
|
582
804
|
sortable = true,
|
|
@@ -590,7 +812,7 @@ var TableHead = forwardRef(
|
|
|
590
812
|
onSort();
|
|
591
813
|
}
|
|
592
814
|
};
|
|
593
|
-
return /* @__PURE__ */
|
|
815
|
+
return /* @__PURE__ */ jsx7(
|
|
594
816
|
"th",
|
|
595
817
|
{
|
|
596
818
|
ref,
|
|
@@ -601,11 +823,11 @@ var TableHead = forwardRef(
|
|
|
601
823
|
),
|
|
602
824
|
onClick: handleClick,
|
|
603
825
|
...props,
|
|
604
|
-
children: /* @__PURE__ */
|
|
826
|
+
children: /* @__PURE__ */ jsxs6("div", { className: "flex items-center gap-2", children: [
|
|
605
827
|
children,
|
|
606
|
-
sortable && /* @__PURE__ */
|
|
607
|
-
sortDirection === "asc" && /* @__PURE__ */
|
|
608
|
-
sortDirection === "desc" && /* @__PURE__ */
|
|
828
|
+
sortable && /* @__PURE__ */ jsxs6("div", { className: "flex flex-col", children: [
|
|
829
|
+
sortDirection === "asc" && /* @__PURE__ */ jsx7(CaretUp, { size: 16, weight: "fill", className: "text-text-800" }),
|
|
830
|
+
sortDirection === "desc" && /* @__PURE__ */ jsx7(CaretDown2, { size: 16, weight: "fill", className: "text-text-800" })
|
|
609
831
|
] })
|
|
610
832
|
] })
|
|
611
833
|
}
|
|
@@ -613,7 +835,7 @@ var TableHead = forwardRef(
|
|
|
613
835
|
}
|
|
614
836
|
);
|
|
615
837
|
TableHead.displayName = "TableHead";
|
|
616
|
-
var TableCell =
|
|
838
|
+
var TableCell = forwardRef2(({ className, ...props }, ref) => /* @__PURE__ */ jsx7(
|
|
617
839
|
"td",
|
|
618
840
|
{
|
|
619
841
|
ref,
|
|
@@ -625,7 +847,7 @@ var TableCell = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx
|
|
|
625
847
|
}
|
|
626
848
|
));
|
|
627
849
|
TableCell.displayName = "TableCell";
|
|
628
|
-
var TableCaption =
|
|
850
|
+
var TableCaption = forwardRef2(({ className, ...props }, ref) => /* @__PURE__ */ jsx7(
|
|
629
851
|
"caption",
|
|
630
852
|
{
|
|
631
853
|
ref,
|
|
@@ -738,7 +960,7 @@ var useTableFilter = (initialConfigs, options = {}) => {
|
|
|
738
960
|
// src/components/Search/Search.tsx
|
|
739
961
|
import { X as X2, MagnifyingGlass } from "phosphor-react";
|
|
740
962
|
import {
|
|
741
|
-
forwardRef as
|
|
963
|
+
forwardRef as forwardRef5,
|
|
742
964
|
useState as useState5,
|
|
743
965
|
useId as useId2,
|
|
744
966
|
useMemo as useMemo3,
|
|
@@ -749,12 +971,12 @@ import {
|
|
|
749
971
|
// src/components/DropdownMenu/DropdownMenu.tsx
|
|
750
972
|
import { CaretRight as CaretRight2, SignOut, User } from "phosphor-react";
|
|
751
973
|
import {
|
|
752
|
-
forwardRef as
|
|
974
|
+
forwardRef as forwardRef4,
|
|
753
975
|
useEffect as useEffect6,
|
|
754
976
|
useRef,
|
|
755
977
|
isValidElement as isValidElement2,
|
|
756
978
|
Children as Children2,
|
|
757
|
-
cloneElement
|
|
979
|
+
cloneElement,
|
|
758
980
|
useState as useState4
|
|
759
981
|
} from "react";
|
|
760
982
|
import { create as create2, useStore } from "zustand";
|
|
@@ -808,7 +1030,7 @@ var getYouTubeEmbedUrl = (videoId) => {
|
|
|
808
1030
|
};
|
|
809
1031
|
|
|
810
1032
|
// src/components/Modal/Modal.tsx
|
|
811
|
-
import { jsx as
|
|
1033
|
+
import { jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
812
1034
|
var SIZE_CLASSES2 = {
|
|
813
1035
|
xs: "max-w-[360px]",
|
|
814
1036
|
sm: "max-w-[420px]",
|
|
@@ -893,7 +1115,7 @@ var Modal = ({
|
|
|
893
1115
|
}
|
|
894
1116
|
};
|
|
895
1117
|
if (variant === "activity") {
|
|
896
|
-
return /* @__PURE__ */
|
|
1118
|
+
return /* @__PURE__ */ jsx8("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__ */ jsxs7(
|
|
897
1119
|
"dialog",
|
|
898
1120
|
{
|
|
899
1121
|
className: modalClasses,
|
|
@@ -901,17 +1123,17 @@ var Modal = ({
|
|
|
901
1123
|
"aria-modal": "true",
|
|
902
1124
|
open: true,
|
|
903
1125
|
children: [
|
|
904
|
-
/* @__PURE__ */
|
|
1126
|
+
/* @__PURE__ */ jsx8("div", { className: "flex justify-end p-6 pb-0", children: !hideCloseButton && /* @__PURE__ */ jsx8(
|
|
905
1127
|
"button",
|
|
906
1128
|
{
|
|
907
1129
|
onClick: onClose,
|
|
908
1130
|
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
1131
|
"aria-label": "Fechar modal",
|
|
910
|
-
children: /* @__PURE__ */
|
|
1132
|
+
children: /* @__PURE__ */ jsx8(X, { size: 18 })
|
|
911
1133
|
}
|
|
912
1134
|
) }),
|
|
913
|
-
/* @__PURE__ */
|
|
914
|
-
image && /* @__PURE__ */
|
|
1135
|
+
/* @__PURE__ */ jsxs7("div", { className: "flex flex-col items-center px-6 pb-6 gap-5", children: [
|
|
1136
|
+
image && /* @__PURE__ */ jsx8("div", { className: "flex justify-center", children: /* @__PURE__ */ jsx8(
|
|
915
1137
|
"img",
|
|
916
1138
|
{
|
|
917
1139
|
src: image,
|
|
@@ -919,7 +1141,7 @@ var Modal = ({
|
|
|
919
1141
|
className: "w-[122px] h-[122px] object-contain"
|
|
920
1142
|
}
|
|
921
1143
|
) }),
|
|
922
|
-
/* @__PURE__ */
|
|
1144
|
+
/* @__PURE__ */ jsx8(
|
|
923
1145
|
"h2",
|
|
924
1146
|
{
|
|
925
1147
|
id: titleId,
|
|
@@ -927,15 +1149,15 @@ var Modal = ({
|
|
|
927
1149
|
children: title
|
|
928
1150
|
}
|
|
929
1151
|
),
|
|
930
|
-
description && /* @__PURE__ */
|
|
931
|
-
actionLink && /* @__PURE__ */
|
|
1152
|
+
description && /* @__PURE__ */ jsx8("p", { className: "text-sm font-normal text-text-400 text-center max-w-md leading-[21px]", children: description }),
|
|
1153
|
+
actionLink && /* @__PURE__ */ jsxs7("div", { className: "w-full", children: [
|
|
932
1154
|
(() => {
|
|
933
1155
|
const normalized = normalizeUrl(actionLink);
|
|
934
1156
|
const isYT = isYouTubeUrl(normalized);
|
|
935
1157
|
if (!isYT) return null;
|
|
936
1158
|
const id = getYouTubeVideoId(normalized);
|
|
937
1159
|
if (!id) {
|
|
938
|
-
return /* @__PURE__ */
|
|
1160
|
+
return /* @__PURE__ */ jsx8(
|
|
939
1161
|
Button_default,
|
|
940
1162
|
{
|
|
941
1163
|
variant: "solid",
|
|
@@ -947,7 +1169,7 @@ var Modal = ({
|
|
|
947
1169
|
}
|
|
948
1170
|
);
|
|
949
1171
|
}
|
|
950
|
-
return /* @__PURE__ */
|
|
1172
|
+
return /* @__PURE__ */ jsx8(
|
|
951
1173
|
"iframe",
|
|
952
1174
|
{
|
|
953
1175
|
src: getYouTubeEmbedUrl(id),
|
|
@@ -958,7 +1180,7 @@ var Modal = ({
|
|
|
958
1180
|
}
|
|
959
1181
|
);
|
|
960
1182
|
})(),
|
|
961
|
-
!isYouTubeUrl(normalizeUrl(actionLink)) && /* @__PURE__ */
|
|
1183
|
+
!isYouTubeUrl(normalizeUrl(actionLink)) && /* @__PURE__ */ jsx8(
|
|
962
1184
|
Button_default,
|
|
963
1185
|
{
|
|
964
1186
|
variant: "solid",
|
|
@@ -975,7 +1197,7 @@ var Modal = ({
|
|
|
975
1197
|
}
|
|
976
1198
|
) });
|
|
977
1199
|
}
|
|
978
|
-
return /* @__PURE__ */
|
|
1200
|
+
return /* @__PURE__ */ jsx8("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__ */ jsxs7(
|
|
979
1201
|
"dialog",
|
|
980
1202
|
{
|
|
981
1203
|
className: modalClasses,
|
|
@@ -983,20 +1205,20 @@ var Modal = ({
|
|
|
983
1205
|
"aria-modal": "true",
|
|
984
1206
|
open: true,
|
|
985
1207
|
children: [
|
|
986
|
-
/* @__PURE__ */
|
|
987
|
-
/* @__PURE__ */
|
|
988
|
-
!hideCloseButton && /* @__PURE__ */
|
|
1208
|
+
/* @__PURE__ */ jsxs7("div", { className: "flex items-center justify-between px-6 py-6", children: [
|
|
1209
|
+
/* @__PURE__ */ jsx8("h2", { id: titleId, className: "text-lg font-semibold text-text-950", children: title }),
|
|
1210
|
+
!hideCloseButton && /* @__PURE__ */ jsx8(
|
|
989
1211
|
"button",
|
|
990
1212
|
{
|
|
991
1213
|
onClick: onClose,
|
|
992
1214
|
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
1215
|
"aria-label": "Fechar modal",
|
|
994
|
-
children: /* @__PURE__ */
|
|
1216
|
+
children: /* @__PURE__ */ jsx8(X, { size: 18 })
|
|
995
1217
|
}
|
|
996
1218
|
)
|
|
997
1219
|
] }),
|
|
998
|
-
children && /* @__PURE__ */
|
|
999
|
-
footer && /* @__PURE__ */
|
|
1220
|
+
children && /* @__PURE__ */ jsx8("div", { className: cn("px-6 pb-6", contentClassName), children: /* @__PURE__ */ jsx8("div", { className: "text-text-500 font-normal text-sm leading-6", children }) }),
|
|
1221
|
+
footer && /* @__PURE__ */ jsx8("div", { className: "flex justify-end gap-3 px-6 pb-6", children: footer })
|
|
1000
1222
|
]
|
|
1001
1223
|
}
|
|
1002
1224
|
) });
|
|
@@ -1008,9 +1230,9 @@ import { Moon, Sun } from "phosphor-react";
|
|
|
1008
1230
|
import { useState as useState3, useEffect as useEffect5 } from "react";
|
|
1009
1231
|
|
|
1010
1232
|
// src/components/SelectionButton/SelectionButton.tsx
|
|
1011
|
-
import { forwardRef as
|
|
1012
|
-
import { jsx as
|
|
1013
|
-
var SelectionButton =
|
|
1233
|
+
import { forwardRef as forwardRef3 } from "react";
|
|
1234
|
+
import { jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1235
|
+
var SelectionButton = forwardRef3(
|
|
1014
1236
|
({ icon, label, selected = false, className = "", disabled, ...props }, ref) => {
|
|
1015
1237
|
const baseClasses = [
|
|
1016
1238
|
"inline-flex",
|
|
@@ -1042,7 +1264,7 @@ var SelectionButton = forwardRef2(
|
|
|
1042
1264
|
];
|
|
1043
1265
|
const stateClasses = selected ? ["ring-primary-950", "ring-2", "ring-offset-0", "shadow-none"] : [];
|
|
1044
1266
|
const allClasses = [...baseClasses, ...stateClasses].join(" ");
|
|
1045
|
-
return /* @__PURE__ */
|
|
1267
|
+
return /* @__PURE__ */ jsxs8(
|
|
1046
1268
|
"button",
|
|
1047
1269
|
{
|
|
1048
1270
|
ref,
|
|
@@ -1052,8 +1274,8 @@ var SelectionButton = forwardRef2(
|
|
|
1052
1274
|
"aria-pressed": selected,
|
|
1053
1275
|
...props,
|
|
1054
1276
|
children: [
|
|
1055
|
-
/* @__PURE__ */
|
|
1056
|
-
/* @__PURE__ */
|
|
1277
|
+
/* @__PURE__ */ jsx9("span", { className: "flex items-center justify-center w-6 h-6", children: icon }),
|
|
1278
|
+
/* @__PURE__ */ jsx9("span", { children: label })
|
|
1057
1279
|
]
|
|
1058
1280
|
}
|
|
1059
1281
|
);
|
|
@@ -1184,7 +1406,7 @@ var useTheme = () => {
|
|
|
1184
1406
|
};
|
|
1185
1407
|
|
|
1186
1408
|
// src/components/ThemeToggle/ThemeToggle.tsx
|
|
1187
|
-
import { jsx as
|
|
1409
|
+
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
1188
1410
|
var ThemeToggle = ({
|
|
1189
1411
|
variant = "default",
|
|
1190
1412
|
onToggle
|
|
@@ -1198,17 +1420,17 @@ var ThemeToggle = ({
|
|
|
1198
1420
|
{
|
|
1199
1421
|
id: "light",
|
|
1200
1422
|
title: "Claro",
|
|
1201
|
-
icon: /* @__PURE__ */
|
|
1423
|
+
icon: /* @__PURE__ */ jsx10(Sun, { size: 24 })
|
|
1202
1424
|
},
|
|
1203
1425
|
{
|
|
1204
1426
|
id: "dark",
|
|
1205
1427
|
title: "Escuro",
|
|
1206
|
-
icon: /* @__PURE__ */
|
|
1428
|
+
icon: /* @__PURE__ */ jsx10(Moon, { size: 24 })
|
|
1207
1429
|
},
|
|
1208
1430
|
{
|
|
1209
1431
|
id: "system",
|
|
1210
1432
|
title: "Sistema",
|
|
1211
|
-
icon: /* @__PURE__ */
|
|
1433
|
+
icon: /* @__PURE__ */ jsx10(
|
|
1212
1434
|
"svg",
|
|
1213
1435
|
{
|
|
1214
1436
|
width: "25",
|
|
@@ -1216,7 +1438,7 @@ var ThemeToggle = ({
|
|
|
1216
1438
|
viewBox: "0 0 25 25",
|
|
1217
1439
|
fill: "none",
|
|
1218
1440
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1219
|
-
children: /* @__PURE__ */
|
|
1441
|
+
children: /* @__PURE__ */ jsx10(
|
|
1220
1442
|
"path",
|
|
1221
1443
|
{
|
|
1222
1444
|
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 +1460,7 @@ var ThemeToggle = ({
|
|
|
1238
1460
|
}
|
|
1239
1461
|
};
|
|
1240
1462
|
const currentTheme = variant === "with-save" ? tempTheme : themeMode;
|
|
1241
|
-
return /* @__PURE__ */
|
|
1463
|
+
return /* @__PURE__ */ jsx10("div", { className: "flex flex-row gap-2 sm:gap-4 py-2", children: problemTypes.map((type) => /* @__PURE__ */ jsx10(
|
|
1242
1464
|
SelectionButton_default,
|
|
1243
1465
|
{
|
|
1244
1466
|
icon: type.icon,
|
|
@@ -1252,7 +1474,7 @@ var ThemeToggle = ({
|
|
|
1252
1474
|
};
|
|
1253
1475
|
|
|
1254
1476
|
// src/components/DropdownMenu/DropdownMenu.tsx
|
|
1255
|
-
import { Fragment, jsx as
|
|
1477
|
+
import { Fragment, jsx as jsx11, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1256
1478
|
function createDropdownStore() {
|
|
1257
1479
|
return create2((set) => ({
|
|
1258
1480
|
open: false,
|
|
@@ -1291,7 +1513,7 @@ var injectStore = (children, store) => {
|
|
|
1291
1513
|
if (typedChild.props.children) {
|
|
1292
1514
|
newProps.children = injectStore(typedChild.props.children, store);
|
|
1293
1515
|
}
|
|
1294
|
-
return
|
|
1516
|
+
return cloneElement(typedChild, newProps);
|
|
1295
1517
|
}
|
|
1296
1518
|
return child;
|
|
1297
1519
|
});
|
|
@@ -1360,7 +1582,7 @@ var DropdownMenu = ({
|
|
|
1360
1582
|
setOpen(propOpen);
|
|
1361
1583
|
}
|
|
1362
1584
|
}, [propOpen]);
|
|
1363
|
-
return /* @__PURE__ */
|
|
1585
|
+
return /* @__PURE__ */ jsx11("div", { className: "relative", ref: menuRef, children: injectStore(children, store) });
|
|
1364
1586
|
};
|
|
1365
1587
|
var DropdownMenuTrigger = ({
|
|
1366
1588
|
className,
|
|
@@ -1372,7 +1594,7 @@ var DropdownMenuTrigger = ({
|
|
|
1372
1594
|
const store = useDropdownStore(externalStore);
|
|
1373
1595
|
const open = useStore(store, (s) => s.open);
|
|
1374
1596
|
const toggleOpen = () => store.setState({ open: !open });
|
|
1375
|
-
return /* @__PURE__ */
|
|
1597
|
+
return /* @__PURE__ */ jsx11(
|
|
1376
1598
|
"div",
|
|
1377
1599
|
{
|
|
1378
1600
|
onClick: (e) => {
|
|
@@ -1416,8 +1638,8 @@ var MENUCONTENT_VARIANT_CLASSES = {
|
|
|
1416
1638
|
menu: "p-1",
|
|
1417
1639
|
profile: "p-6"
|
|
1418
1640
|
};
|
|
1419
|
-
var MenuLabel =
|
|
1420
|
-
return /* @__PURE__ */
|
|
1641
|
+
var MenuLabel = forwardRef4(({ className, inset, store: _store, ...props }, ref) => {
|
|
1642
|
+
return /* @__PURE__ */ jsx11(
|
|
1421
1643
|
"div",
|
|
1422
1644
|
{
|
|
1423
1645
|
ref,
|
|
@@ -1427,7 +1649,7 @@ var MenuLabel = forwardRef3(({ className, inset, store: _store, ...props }, ref)
|
|
|
1427
1649
|
);
|
|
1428
1650
|
});
|
|
1429
1651
|
MenuLabel.displayName = "MenuLabel";
|
|
1430
|
-
var DropdownMenuContent =
|
|
1652
|
+
var DropdownMenuContent = forwardRef4(
|
|
1431
1653
|
({
|
|
1432
1654
|
className,
|
|
1433
1655
|
align = "start",
|
|
@@ -1456,7 +1678,7 @@ var DropdownMenuContent = forwardRef3(
|
|
|
1456
1678
|
return `absolute ${vertical} ${horizontal}`;
|
|
1457
1679
|
};
|
|
1458
1680
|
const variantClasses = MENUCONTENT_VARIANT_CLASSES[variant];
|
|
1459
|
-
return /* @__PURE__ */
|
|
1681
|
+
return /* @__PURE__ */ jsx11(
|
|
1460
1682
|
"div",
|
|
1461
1683
|
{
|
|
1462
1684
|
ref,
|
|
@@ -1481,7 +1703,7 @@ var DropdownMenuContent = forwardRef3(
|
|
|
1481
1703
|
}
|
|
1482
1704
|
);
|
|
1483
1705
|
DropdownMenuContent.displayName = "DropdownMenuContent";
|
|
1484
|
-
var DropdownMenuItem =
|
|
1706
|
+
var DropdownMenuItem = forwardRef4(
|
|
1485
1707
|
({
|
|
1486
1708
|
className,
|
|
1487
1709
|
size = "small",
|
|
@@ -1525,7 +1747,7 @@ var DropdownMenuItem = forwardRef3(
|
|
|
1525
1747
|
const getVariantProps = () => {
|
|
1526
1748
|
return variant === "profile" ? { "data-variant": "profile" } : {};
|
|
1527
1749
|
};
|
|
1528
|
-
return /* @__PURE__ */
|
|
1750
|
+
return /* @__PURE__ */ jsxs9(
|
|
1529
1751
|
"div",
|
|
1530
1752
|
{
|
|
1531
1753
|
ref,
|
|
@@ -1551,7 +1773,7 @@ var DropdownMenuItem = forwardRef3(
|
|
|
1551
1773
|
...props,
|
|
1552
1774
|
children: [
|
|
1553
1775
|
iconLeft,
|
|
1554
|
-
/* @__PURE__ */
|
|
1776
|
+
/* @__PURE__ */ jsx11("div", { className: "w-full", children }),
|
|
1555
1777
|
iconRight
|
|
1556
1778
|
]
|
|
1557
1779
|
}
|
|
@@ -1559,7 +1781,7 @@ var DropdownMenuItem = forwardRef3(
|
|
|
1559
1781
|
}
|
|
1560
1782
|
);
|
|
1561
1783
|
DropdownMenuItem.displayName = "DropdownMenuItem";
|
|
1562
|
-
var DropdownMenuSeparator =
|
|
1784
|
+
var DropdownMenuSeparator = forwardRef4(({ className, store: _store, ...props }, ref) => /* @__PURE__ */ jsx11(
|
|
1563
1785
|
"div",
|
|
1564
1786
|
{
|
|
1565
1787
|
ref,
|
|
@@ -1568,11 +1790,11 @@ var DropdownMenuSeparator = forwardRef3(({ className, store: _store, ...props },
|
|
|
1568
1790
|
}
|
|
1569
1791
|
));
|
|
1570
1792
|
DropdownMenuSeparator.displayName = "DropdownMenuSeparator";
|
|
1571
|
-
var ProfileMenuTrigger =
|
|
1793
|
+
var ProfileMenuTrigger = forwardRef4(({ className, onClick, store: externalStore, ...props }, ref) => {
|
|
1572
1794
|
const store = useDropdownStore(externalStore);
|
|
1573
1795
|
const open = useStore(store, (s) => s.open);
|
|
1574
1796
|
const toggleOpen = () => store.setState({ open: !open });
|
|
1575
|
-
return /* @__PURE__ */
|
|
1797
|
+
return /* @__PURE__ */ jsx11(
|
|
1576
1798
|
"button",
|
|
1577
1799
|
{
|
|
1578
1800
|
ref,
|
|
@@ -1587,13 +1809,13 @@ var ProfileMenuTrigger = forwardRef3(({ className, onClick, store: externalStore
|
|
|
1587
1809
|
},
|
|
1588
1810
|
"aria-expanded": open,
|
|
1589
1811
|
...props,
|
|
1590
|
-
children: /* @__PURE__ */
|
|
1812
|
+
children: /* @__PURE__ */ jsx11("span", { className: "size-6 rounded-full bg-primary-100 flex items-center justify-center", children: /* @__PURE__ */ jsx11(User, { className: "text-primary-950", size: 18 }) })
|
|
1591
1813
|
}
|
|
1592
1814
|
);
|
|
1593
1815
|
});
|
|
1594
1816
|
ProfileMenuTrigger.displayName = "ProfileMenuTrigger";
|
|
1595
|
-
var ProfileMenuHeader =
|
|
1596
|
-
return /* @__PURE__ */
|
|
1817
|
+
var ProfileMenuHeader = forwardRef4(({ className, name, email, photoUrl, store: _store, ...props }, ref) => {
|
|
1818
|
+
return /* @__PURE__ */ jsxs9(
|
|
1597
1819
|
"div",
|
|
1598
1820
|
{
|
|
1599
1821
|
ref,
|
|
@@ -1604,16 +1826,16 @@ var ProfileMenuHeader = forwardRef3(({ className, name, email, photoUrl, store:
|
|
|
1604
1826
|
),
|
|
1605
1827
|
...props,
|
|
1606
1828
|
children: [
|
|
1607
|
-
/* @__PURE__ */
|
|
1829
|
+
/* @__PURE__ */ jsx11("span", { className: "w-16 h-16 bg-primary-100 rounded-full flex items-center justify-center overflow-hidden flex-shrink-0", children: photoUrl ? /* @__PURE__ */ jsx11(
|
|
1608
1830
|
"img",
|
|
1609
1831
|
{
|
|
1610
1832
|
src: photoUrl,
|
|
1611
1833
|
alt: "Foto de perfil",
|
|
1612
1834
|
className: "w-full h-full object-cover"
|
|
1613
1835
|
}
|
|
1614
|
-
) : /* @__PURE__ */
|
|
1615
|
-
/* @__PURE__ */
|
|
1616
|
-
/* @__PURE__ */
|
|
1836
|
+
) : /* @__PURE__ */ jsx11(User, { size: 34, className: "text-primary-800" }) }),
|
|
1837
|
+
/* @__PURE__ */ jsxs9("div", { className: "flex flex-col min-w-0", children: [
|
|
1838
|
+
/* @__PURE__ */ jsx11(
|
|
1617
1839
|
Text_default,
|
|
1618
1840
|
{
|
|
1619
1841
|
size: "xl",
|
|
@@ -1623,14 +1845,14 @@ var ProfileMenuHeader = forwardRef3(({ className, name, email, photoUrl, store:
|
|
|
1623
1845
|
children: name
|
|
1624
1846
|
}
|
|
1625
1847
|
),
|
|
1626
|
-
/* @__PURE__ */
|
|
1848
|
+
/* @__PURE__ */ jsx11(Text_default, { size: "md", color: "text-text-600", className: "truncate", children: email })
|
|
1627
1849
|
] })
|
|
1628
1850
|
]
|
|
1629
1851
|
}
|
|
1630
1852
|
);
|
|
1631
1853
|
});
|
|
1632
1854
|
ProfileMenuHeader.displayName = "ProfileMenuHeader";
|
|
1633
|
-
var ProfileMenuInfo =
|
|
1855
|
+
var ProfileMenuInfo = forwardRef4(
|
|
1634
1856
|
({
|
|
1635
1857
|
className,
|
|
1636
1858
|
schoolName,
|
|
@@ -1639,7 +1861,7 @@ var ProfileMenuInfo = forwardRef3(
|
|
|
1639
1861
|
store: _store,
|
|
1640
1862
|
...props
|
|
1641
1863
|
}, ref) => {
|
|
1642
|
-
return /* @__PURE__ */
|
|
1864
|
+
return /* @__PURE__ */ jsxs9(
|
|
1643
1865
|
"div",
|
|
1644
1866
|
{
|
|
1645
1867
|
ref,
|
|
@@ -1647,13 +1869,13 @@ var ProfileMenuInfo = forwardRef3(
|
|
|
1647
1869
|
className: cn("flex flex-row gap-4 items-center", className),
|
|
1648
1870
|
...props,
|
|
1649
1871
|
children: [
|
|
1650
|
-
/* @__PURE__ */
|
|
1651
|
-
/* @__PURE__ */
|
|
1652
|
-
/* @__PURE__ */
|
|
1653
|
-
/* @__PURE__ */
|
|
1654
|
-
/* @__PURE__ */
|
|
1655
|
-
/* @__PURE__ */
|
|
1656
|
-
/* @__PURE__ */
|
|
1872
|
+
/* @__PURE__ */ jsx11("span", { className: "w-16 h-16" }),
|
|
1873
|
+
/* @__PURE__ */ jsxs9("div", { className: "flex flex-col ", children: [
|
|
1874
|
+
/* @__PURE__ */ jsx11(Text_default, { size: "md", color: "text-text-600", children: schoolName }),
|
|
1875
|
+
/* @__PURE__ */ jsxs9("span", { className: "flex flex-row items-center gap-2", children: [
|
|
1876
|
+
/* @__PURE__ */ jsx11(Text_default, { size: "md", color: "text-text-600", children: classYearName }),
|
|
1877
|
+
/* @__PURE__ */ jsx11("p", { className: "text-text-600 text-xs align-middle", children: "\u25CF" }),
|
|
1878
|
+
/* @__PURE__ */ jsx11(Text_default, { size: "md", color: "text-text-600", children: schoolYearName })
|
|
1657
1879
|
] })
|
|
1658
1880
|
] })
|
|
1659
1881
|
]
|
|
@@ -1688,14 +1910,14 @@ var ProfileToggleTheme = ({
|
|
|
1688
1910
|
setModalThemeToggle(false);
|
|
1689
1911
|
setOpen(false);
|
|
1690
1912
|
};
|
|
1691
|
-
return /* @__PURE__ */
|
|
1692
|
-
/* @__PURE__ */
|
|
1913
|
+
return /* @__PURE__ */ jsxs9(Fragment, { children: [
|
|
1914
|
+
/* @__PURE__ */ jsx11(
|
|
1693
1915
|
DropdownMenuItem,
|
|
1694
1916
|
{
|
|
1695
1917
|
variant: "profile",
|
|
1696
1918
|
preventClose: true,
|
|
1697
1919
|
store,
|
|
1698
|
-
iconLeft: /* @__PURE__ */
|
|
1920
|
+
iconLeft: /* @__PURE__ */ jsx11(
|
|
1699
1921
|
"svg",
|
|
1700
1922
|
{
|
|
1701
1923
|
width: "24",
|
|
@@ -1703,7 +1925,7 @@ var ProfileToggleTheme = ({
|
|
|
1703
1925
|
viewBox: "0 0 25 25",
|
|
1704
1926
|
fill: "none",
|
|
1705
1927
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1706
|
-
children: /* @__PURE__ */
|
|
1928
|
+
children: /* @__PURE__ */ jsx11(
|
|
1707
1929
|
"path",
|
|
1708
1930
|
{
|
|
1709
1931
|
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 +1934,7 @@ var ProfileToggleTheme = ({
|
|
|
1712
1934
|
)
|
|
1713
1935
|
}
|
|
1714
1936
|
),
|
|
1715
|
-
iconRight: /* @__PURE__ */
|
|
1937
|
+
iconRight: /* @__PURE__ */ jsx11(CaretRight2, {}),
|
|
1716
1938
|
onClick: handleClick,
|
|
1717
1939
|
onKeyDown: (e) => {
|
|
1718
1940
|
if (e.key === "Enter" || e.key === " ") {
|
|
@@ -1722,31 +1944,31 @@ var ProfileToggleTheme = ({
|
|
|
1722
1944
|
}
|
|
1723
1945
|
},
|
|
1724
1946
|
...props,
|
|
1725
|
-
children: /* @__PURE__ */
|
|
1947
|
+
children: /* @__PURE__ */ jsx11(Text_default, { size: "md", color: "text-text-700", children: "Apar\xEAncia" })
|
|
1726
1948
|
}
|
|
1727
1949
|
),
|
|
1728
|
-
/* @__PURE__ */
|
|
1950
|
+
/* @__PURE__ */ jsx11(
|
|
1729
1951
|
Modal_default,
|
|
1730
1952
|
{
|
|
1731
1953
|
isOpen: modalThemeToggle,
|
|
1732
1954
|
onClose: handleCancel,
|
|
1733
1955
|
title: "Apar\xEAncia",
|
|
1734
1956
|
size: "md",
|
|
1735
|
-
footer: /* @__PURE__ */
|
|
1736
|
-
/* @__PURE__ */
|
|
1737
|
-
/* @__PURE__ */
|
|
1957
|
+
footer: /* @__PURE__ */ jsxs9("div", { className: "flex gap-3", children: [
|
|
1958
|
+
/* @__PURE__ */ jsx11(Button_default, { variant: "outline", onClick: handleCancel, children: "Cancelar" }),
|
|
1959
|
+
/* @__PURE__ */ jsx11(Button_default, { variant: "solid", onClick: handleSave, children: "Salvar" })
|
|
1738
1960
|
] }),
|
|
1739
|
-
children: /* @__PURE__ */
|
|
1740
|
-
/* @__PURE__ */
|
|
1741
|
-
/* @__PURE__ */
|
|
1961
|
+
children: /* @__PURE__ */ jsxs9("div", { className: "flex flex-col", children: [
|
|
1962
|
+
/* @__PURE__ */ jsx11("p", { className: "text-sm text-text-500", children: "Escolha o tema:" }),
|
|
1963
|
+
/* @__PURE__ */ jsx11(ThemeToggle, { variant: "with-save", onToggle: setSelectedTheme })
|
|
1742
1964
|
] })
|
|
1743
1965
|
}
|
|
1744
1966
|
)
|
|
1745
1967
|
] });
|
|
1746
1968
|
};
|
|
1747
1969
|
ProfileToggleTheme.displayName = "ProfileToggleTheme";
|
|
1748
|
-
var ProfileMenuSection =
|
|
1749
|
-
return /* @__PURE__ */
|
|
1970
|
+
var ProfileMenuSection = forwardRef4(({ className, children, store: _store, ...props }, ref) => {
|
|
1971
|
+
return /* @__PURE__ */ jsx11("div", { ref, className: cn("flex flex-col p-2", className), ...props, children });
|
|
1750
1972
|
});
|
|
1751
1973
|
ProfileMenuSection.displayName = "ProfileMenuSection";
|
|
1752
1974
|
var ProfileMenuFooter = ({
|
|
@@ -1758,7 +1980,7 @@ var ProfileMenuFooter = ({
|
|
|
1758
1980
|
}) => {
|
|
1759
1981
|
const store = useDropdownStore(externalStore);
|
|
1760
1982
|
const setOpen = useStore(store, (s) => s.setOpen);
|
|
1761
|
-
return /* @__PURE__ */
|
|
1983
|
+
return /* @__PURE__ */ jsxs9(
|
|
1762
1984
|
Button_default,
|
|
1763
1985
|
{
|
|
1764
1986
|
variant: "outline",
|
|
@@ -1770,8 +1992,8 @@ var ProfileMenuFooter = ({
|
|
|
1770
1992
|
},
|
|
1771
1993
|
...props,
|
|
1772
1994
|
children: [
|
|
1773
|
-
/* @__PURE__ */
|
|
1774
|
-
/* @__PURE__ */
|
|
1995
|
+
/* @__PURE__ */ jsx11("span", { className: "mr-2 flex items-center", children: /* @__PURE__ */ jsx11(SignOut, { className: "text-inherit" }) }),
|
|
1996
|
+
/* @__PURE__ */ jsx11(Text_default, { color: "inherit", children: "Sair" })
|
|
1775
1997
|
]
|
|
1776
1998
|
}
|
|
1777
1999
|
);
|
|
@@ -1780,7 +2002,7 @@ ProfileMenuFooter.displayName = "ProfileMenuFooter";
|
|
|
1780
2002
|
var DropdownMenu_default = DropdownMenu;
|
|
1781
2003
|
|
|
1782
2004
|
// src/components/Search/Search.tsx
|
|
1783
|
-
import { jsx as
|
|
2005
|
+
import { jsx as jsx12, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1784
2006
|
var filterOptions = (options, query) => {
|
|
1785
2007
|
if (!query || query.length < 1) return [];
|
|
1786
2008
|
return options.filter(
|
|
@@ -1805,7 +2027,7 @@ var updateInputValue = (value, ref, onChange) => {
|
|
|
1805
2027
|
onChange(event);
|
|
1806
2028
|
}
|
|
1807
2029
|
};
|
|
1808
|
-
var Search =
|
|
2030
|
+
var Search = forwardRef5(
|
|
1809
2031
|
({
|
|
1810
2032
|
options = [],
|
|
1811
2033
|
onSelect,
|
|
@@ -1926,14 +2148,14 @@ var Search = forwardRef4(
|
|
|
1926
2148
|
const hasValue = String(value ?? "").length > 0;
|
|
1927
2149
|
const showClearButton = hasValue && !disabled && !readOnly;
|
|
1928
2150
|
const showSearchIcon = !hasValue && !disabled && !readOnly;
|
|
1929
|
-
return /* @__PURE__ */
|
|
2151
|
+
return /* @__PURE__ */ jsxs10(
|
|
1930
2152
|
"div",
|
|
1931
2153
|
{
|
|
1932
2154
|
ref: dropdownRef,
|
|
1933
2155
|
className: `w-full max-w-lg md:w-[488px] ${containerClassName}`,
|
|
1934
2156
|
children: [
|
|
1935
|
-
/* @__PURE__ */
|
|
1936
|
-
/* @__PURE__ */
|
|
2157
|
+
/* @__PURE__ */ jsxs10("div", { className: "relative flex items-center", children: [
|
|
2158
|
+
/* @__PURE__ */ jsx12(
|
|
1937
2159
|
"input",
|
|
1938
2160
|
{
|
|
1939
2161
|
ref: (node) => {
|
|
@@ -1961,35 +2183,35 @@ var Search = forwardRef4(
|
|
|
1961
2183
|
...props
|
|
1962
2184
|
}
|
|
1963
2185
|
),
|
|
1964
|
-
showClearButton && /* @__PURE__ */
|
|
2186
|
+
showClearButton && /* @__PURE__ */ jsx12("div", { className: "absolute right-3 top-1/2 transform -translate-y-1/2", children: /* @__PURE__ */ jsx12(
|
|
1965
2187
|
"button",
|
|
1966
2188
|
{
|
|
1967
2189
|
type: "button",
|
|
1968
2190
|
className: "p-0 border-0 bg-transparent cursor-pointer",
|
|
1969
2191
|
onMouseDown: handleClearClick,
|
|
1970
2192
|
"aria-label": "Limpar busca",
|
|
1971
|
-
children: /* @__PURE__ */
|
|
2193
|
+
children: /* @__PURE__ */ jsx12("span", { className: "w-6 h-6 text-text-800 flex items-center justify-center hover:text-text-600 transition-colors", children: /* @__PURE__ */ jsx12(X2, {}) })
|
|
1972
2194
|
}
|
|
1973
2195
|
) }),
|
|
1974
|
-
showSearchIcon && /* @__PURE__ */
|
|
2196
|
+
showSearchIcon && /* @__PURE__ */ jsx12("div", { className: "absolute right-3 top-1/2 transform -translate-y-1/2", children: /* @__PURE__ */ jsx12(
|
|
1975
2197
|
"button",
|
|
1976
2198
|
{
|
|
1977
2199
|
type: "button",
|
|
1978
2200
|
className: "p-0 border-0 bg-transparent cursor-pointer",
|
|
1979
2201
|
onMouseDown: handleSearchIconClick,
|
|
1980
2202
|
"aria-label": "Buscar",
|
|
1981
|
-
children: /* @__PURE__ */
|
|
2203
|
+
children: /* @__PURE__ */ jsx12("span", { className: "w-6 h-6 text-text-800 flex items-center justify-center hover:text-text-600 transition-colors", children: /* @__PURE__ */ jsx12(MagnifyingGlass, {}) })
|
|
1982
2204
|
}
|
|
1983
2205
|
) })
|
|
1984
2206
|
] }),
|
|
1985
|
-
showDropdown && /* @__PURE__ */
|
|
2207
|
+
showDropdown && /* @__PURE__ */ jsx12(DropdownMenu_default, { open: showDropdown, onOpenChange: setDropdownOpen, children: /* @__PURE__ */ jsx12(
|
|
1986
2208
|
DropdownMenuContent,
|
|
1987
2209
|
{
|
|
1988
2210
|
id: dropdownId,
|
|
1989
2211
|
className: "w-full mt-1",
|
|
1990
2212
|
style: { maxHeight: dropdownMaxHeight },
|
|
1991
2213
|
align: "start",
|
|
1992
|
-
children: filteredOptions.length > 0 ? filteredOptions.map((option) => /* @__PURE__ */
|
|
2214
|
+
children: filteredOptions.length > 0 ? filteredOptions.map((option) => /* @__PURE__ */ jsx12(
|
|
1993
2215
|
DropdownMenuItem,
|
|
1994
2216
|
{
|
|
1995
2217
|
onClick: () => handleSelectOption(option),
|
|
@@ -1997,7 +2219,7 @@ var Search = forwardRef4(
|
|
|
1997
2219
|
children: option
|
|
1998
2220
|
},
|
|
1999
2221
|
option
|
|
2000
|
-
)) : /* @__PURE__ */
|
|
2222
|
+
)) : /* @__PURE__ */ jsx12("div", { className: "px-3 py-3 text-text-700 text-base", children: noResultsText })
|
|
2001
2223
|
}
|
|
2002
2224
|
) })
|
|
2003
2225
|
]
|
|
@@ -2013,7 +2235,7 @@ import { useEffect as useEffect11, useMemo as useMemo4, useRef as useRef5, useSt
|
|
|
2013
2235
|
|
|
2014
2236
|
// src/components/Badge/Badge.tsx
|
|
2015
2237
|
import { Bell } from "phosphor-react";
|
|
2016
|
-
import { jsx as
|
|
2238
|
+
import { jsx as jsx13, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
2017
2239
|
var VARIANT_ACTION_CLASSES2 = {
|
|
2018
2240
|
solid: {
|
|
2019
2241
|
error: "bg-error-background text-error-700 focus-visible:outline-none",
|
|
@@ -2075,14 +2297,14 @@ var Badge = ({
|
|
|
2075
2297
|
const baseClasses = "inline-flex items-center justify-center rounded-xs font-normal gap-1 relative";
|
|
2076
2298
|
const baseClassesIcon = "flex items-center";
|
|
2077
2299
|
if (variant === "notification") {
|
|
2078
|
-
return /* @__PURE__ */
|
|
2300
|
+
return /* @__PURE__ */ jsxs11(
|
|
2079
2301
|
"div",
|
|
2080
2302
|
{
|
|
2081
2303
|
className: cn(baseClasses, variantClasses, sizeClasses, className),
|
|
2082
2304
|
...props,
|
|
2083
2305
|
children: [
|
|
2084
|
-
/* @__PURE__ */
|
|
2085
|
-
notificationActive && /* @__PURE__ */
|
|
2306
|
+
/* @__PURE__ */ jsx13(Bell, { size: 24, className: "text-current", "aria-hidden": "true" }),
|
|
2307
|
+
notificationActive && /* @__PURE__ */ jsx13(
|
|
2086
2308
|
"span",
|
|
2087
2309
|
{
|
|
2088
2310
|
"data-testid": "notification-dot",
|
|
@@ -2093,15 +2315,15 @@ var Badge = ({
|
|
|
2093
2315
|
}
|
|
2094
2316
|
);
|
|
2095
2317
|
}
|
|
2096
|
-
return /* @__PURE__ */
|
|
2318
|
+
return /* @__PURE__ */ jsxs11(
|
|
2097
2319
|
"div",
|
|
2098
2320
|
{
|
|
2099
2321
|
className: cn(baseClasses, variantClasses, sizeClasses, className),
|
|
2100
2322
|
...props,
|
|
2101
2323
|
children: [
|
|
2102
|
-
iconLeft && /* @__PURE__ */
|
|
2324
|
+
iconLeft && /* @__PURE__ */ jsx13("span", { className: cn(baseClassesIcon, sizeClassesIcon), children: iconLeft }),
|
|
2103
2325
|
children,
|
|
2104
|
-
iconRight && /* @__PURE__ */
|
|
2326
|
+
iconRight && /* @__PURE__ */ jsx13("span", { className: cn(baseClassesIcon, sizeClassesIcon), children: iconRight })
|
|
2105
2327
|
]
|
|
2106
2328
|
}
|
|
2107
2329
|
);
|
|
@@ -2110,12 +2332,12 @@ var Badge_default = Badge;
|
|
|
2110
2332
|
|
|
2111
2333
|
// src/components/CheckBox/CheckBox.tsx
|
|
2112
2334
|
import {
|
|
2113
|
-
forwardRef as
|
|
2335
|
+
forwardRef as forwardRef6,
|
|
2114
2336
|
useState as useState6,
|
|
2115
2337
|
useId as useId3
|
|
2116
2338
|
} from "react";
|
|
2117
2339
|
import { Check, Minus } from "phosphor-react";
|
|
2118
|
-
import { jsx as
|
|
2340
|
+
import { jsx as jsx14, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
2119
2341
|
var SIZE_CLASSES4 = {
|
|
2120
2342
|
small: {
|
|
2121
2343
|
checkbox: "w-4 h-4",
|
|
@@ -2175,7 +2397,7 @@ var STATE_CLASSES = {
|
|
|
2175
2397
|
checked: "border-primary-600 bg-primary-600 text-text cursor-not-allowed opacity-40"
|
|
2176
2398
|
}
|
|
2177
2399
|
};
|
|
2178
|
-
var CheckBox =
|
|
2400
|
+
var CheckBox = forwardRef6(
|
|
2179
2401
|
({
|
|
2180
2402
|
label,
|
|
2181
2403
|
size = "medium",
|
|
@@ -2216,7 +2438,7 @@ var CheckBox = forwardRef5(
|
|
|
2216
2438
|
);
|
|
2217
2439
|
const renderIcon = () => {
|
|
2218
2440
|
if (indeterminate) {
|
|
2219
|
-
return /* @__PURE__ */
|
|
2441
|
+
return /* @__PURE__ */ jsx14(
|
|
2220
2442
|
Minus,
|
|
2221
2443
|
{
|
|
2222
2444
|
size: sizeClasses.iconSize,
|
|
@@ -2226,7 +2448,7 @@ var CheckBox = forwardRef5(
|
|
|
2226
2448
|
);
|
|
2227
2449
|
}
|
|
2228
2450
|
if (checked) {
|
|
2229
|
-
return /* @__PURE__ */
|
|
2451
|
+
return /* @__PURE__ */ jsx14(
|
|
2230
2452
|
Check,
|
|
2231
2453
|
{
|
|
2232
2454
|
size: sizeClasses.iconSize,
|
|
@@ -2237,8 +2459,8 @@ var CheckBox = forwardRef5(
|
|
|
2237
2459
|
}
|
|
2238
2460
|
return null;
|
|
2239
2461
|
};
|
|
2240
|
-
return /* @__PURE__ */
|
|
2241
|
-
/* @__PURE__ */
|
|
2462
|
+
return /* @__PURE__ */ jsxs12("div", { className: "flex flex-col", children: [
|
|
2463
|
+
/* @__PURE__ */ jsxs12(
|
|
2242
2464
|
"div",
|
|
2243
2465
|
{
|
|
2244
2466
|
className: cn(
|
|
@@ -2247,7 +2469,7 @@ var CheckBox = forwardRef5(
|
|
|
2247
2469
|
disabled ? "opacity-40" : ""
|
|
2248
2470
|
),
|
|
2249
2471
|
children: [
|
|
2250
|
-
/* @__PURE__ */
|
|
2472
|
+
/* @__PURE__ */ jsx14(
|
|
2251
2473
|
"input",
|
|
2252
2474
|
{
|
|
2253
2475
|
ref,
|
|
@@ -2260,15 +2482,15 @@ var CheckBox = forwardRef5(
|
|
|
2260
2482
|
...props
|
|
2261
2483
|
}
|
|
2262
2484
|
),
|
|
2263
|
-
/* @__PURE__ */
|
|
2264
|
-
label && /* @__PURE__ */
|
|
2485
|
+
/* @__PURE__ */ jsx14("label", { htmlFor: inputId, className: checkboxClasses, children: renderIcon() }),
|
|
2486
|
+
label && /* @__PURE__ */ jsx14(
|
|
2265
2487
|
"div",
|
|
2266
2488
|
{
|
|
2267
2489
|
className: cn(
|
|
2268
2490
|
"flex flex-row items-center",
|
|
2269
2491
|
sizeClasses.labelHeight
|
|
2270
2492
|
),
|
|
2271
|
-
children: /* @__PURE__ */
|
|
2493
|
+
children: /* @__PURE__ */ jsx14(
|
|
2272
2494
|
Text_default,
|
|
2273
2495
|
{
|
|
2274
2496
|
as: "label",
|
|
@@ -2287,7 +2509,7 @@ var CheckBox = forwardRef5(
|
|
|
2287
2509
|
]
|
|
2288
2510
|
}
|
|
2289
2511
|
),
|
|
2290
|
-
errorMessage && /* @__PURE__ */
|
|
2512
|
+
errorMessage && /* @__PURE__ */ jsx14(
|
|
2291
2513
|
Text_default,
|
|
2292
2514
|
{
|
|
2293
2515
|
size: "sm",
|
|
@@ -2297,7 +2519,7 @@ var CheckBox = forwardRef5(
|
|
|
2297
2519
|
children: errorMessage
|
|
2298
2520
|
}
|
|
2299
2521
|
),
|
|
2300
|
-
helperText && !errorMessage && /* @__PURE__ */
|
|
2522
|
+
helperText && !errorMessage && /* @__PURE__ */ jsx14(
|
|
2301
2523
|
Text_default,
|
|
2302
2524
|
{
|
|
2303
2525
|
size: "sm",
|
|
@@ -2314,7 +2536,7 @@ CheckBox.displayName = "CheckBox";
|
|
|
2314
2536
|
var CheckBox_default = CheckBox;
|
|
2315
2537
|
|
|
2316
2538
|
// src/components/Divider/Divider.tsx
|
|
2317
|
-
import { jsx as
|
|
2539
|
+
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
2318
2540
|
var Divider = ({
|
|
2319
2541
|
orientation = "horizontal",
|
|
2320
2542
|
className = "",
|
|
@@ -2325,7 +2547,7 @@ var Divider = ({
|
|
|
2325
2547
|
horizontal: "w-full h-px",
|
|
2326
2548
|
vertical: "h-full w-px"
|
|
2327
2549
|
};
|
|
2328
|
-
return /* @__PURE__ */
|
|
2550
|
+
return /* @__PURE__ */ jsx15(
|
|
2329
2551
|
"hr",
|
|
2330
2552
|
{
|
|
2331
2553
|
className: cn(baseClasses, orientationClasses[orientation], className),
|
|
@@ -2337,7 +2559,7 @@ var Divider = ({
|
|
|
2337
2559
|
var Divider_default = Divider;
|
|
2338
2560
|
|
|
2339
2561
|
// src/components/ProgressBar/ProgressBar.tsx
|
|
2340
|
-
import { Fragment as Fragment2, jsx as
|
|
2562
|
+
import { Fragment as Fragment2, jsx as jsx16, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
2341
2563
|
var SIZE_CLASSES5 = {
|
|
2342
2564
|
small: {
|
|
2343
2565
|
container: "h-1",
|
|
@@ -2449,20 +2671,20 @@ var renderStackedHitCountDisplay = (showHitCount, showPercentage, clampedValue,
|
|
|
2449
2671
|
max,
|
|
2450
2672
|
percentage
|
|
2451
2673
|
);
|
|
2452
|
-
return /* @__PURE__ */
|
|
2674
|
+
return /* @__PURE__ */ jsx16(
|
|
2453
2675
|
"div",
|
|
2454
2676
|
{
|
|
2455
2677
|
className: cn(
|
|
2456
2678
|
"text-xs font-medium leading-[14px] text-right",
|
|
2457
2679
|
percentageClassName
|
|
2458
2680
|
),
|
|
2459
|
-
children: displayPriority.type === "hitCount" ? /* @__PURE__ */
|
|
2460
|
-
/* @__PURE__ */
|
|
2461
|
-
/* @__PURE__ */
|
|
2681
|
+
children: displayPriority.type === "hitCount" ? /* @__PURE__ */ jsxs13(Fragment2, { children: [
|
|
2682
|
+
/* @__PURE__ */ jsx16("span", { className: "text-success-200", children: Math.round(clampedValue) }),
|
|
2683
|
+
/* @__PURE__ */ jsxs13("span", { className: "text-text-600", children: [
|
|
2462
2684
|
" de ",
|
|
2463
2685
|
max
|
|
2464
2686
|
] })
|
|
2465
|
-
] }) : /* @__PURE__ */
|
|
2687
|
+
] }) : /* @__PURE__ */ jsxs13(Text_default, { size: "xs", weight: "medium", className: "text-success-200", children: [
|
|
2466
2688
|
Math.round(percentage),
|
|
2467
2689
|
"%"
|
|
2468
2690
|
] })
|
|
@@ -2477,7 +2699,7 @@ var ProgressBarBase = ({
|
|
|
2477
2699
|
variantClasses,
|
|
2478
2700
|
containerClassName,
|
|
2479
2701
|
fillClassName
|
|
2480
|
-
}) => /* @__PURE__ */
|
|
2702
|
+
}) => /* @__PURE__ */ jsxs13(
|
|
2481
2703
|
"div",
|
|
2482
2704
|
{
|
|
2483
2705
|
className: cn(
|
|
@@ -2486,7 +2708,7 @@ var ProgressBarBase = ({
|
|
|
2486
2708
|
"overflow-hidden relative"
|
|
2487
2709
|
),
|
|
2488
2710
|
children: [
|
|
2489
|
-
/* @__PURE__ */
|
|
2711
|
+
/* @__PURE__ */ jsx16(
|
|
2490
2712
|
"progress",
|
|
2491
2713
|
{
|
|
2492
2714
|
value: clampedValue,
|
|
@@ -2495,7 +2717,7 @@ var ProgressBarBase = ({
|
|
|
2495
2717
|
className: "absolute inset-0 w-full h-full opacity-0"
|
|
2496
2718
|
}
|
|
2497
2719
|
),
|
|
2498
|
-
/* @__PURE__ */
|
|
2720
|
+
/* @__PURE__ */ jsx16(
|
|
2499
2721
|
"div",
|
|
2500
2722
|
{
|
|
2501
2723
|
className: cn(
|
|
@@ -2521,7 +2743,7 @@ var StackedLayout = ({
|
|
|
2521
2743
|
percentage,
|
|
2522
2744
|
variantClasses,
|
|
2523
2745
|
dimensions
|
|
2524
|
-
}) => /* @__PURE__ */
|
|
2746
|
+
}) => /* @__PURE__ */ jsxs13(
|
|
2525
2747
|
"div",
|
|
2526
2748
|
{
|
|
2527
2749
|
className: cn(
|
|
@@ -2531,8 +2753,8 @@ var StackedLayout = ({
|
|
|
2531
2753
|
className
|
|
2532
2754
|
),
|
|
2533
2755
|
children: [
|
|
2534
|
-
shouldShowHeader(label, showPercentage, showHitCount) && /* @__PURE__ */
|
|
2535
|
-
label && /* @__PURE__ */
|
|
2756
|
+
shouldShowHeader(label, showPercentage, showHitCount) && /* @__PURE__ */ jsxs13("div", { className: "flex flex-row justify-between items-center w-full h-[19px]", children: [
|
|
2757
|
+
label && /* @__PURE__ */ jsx16(
|
|
2536
2758
|
Text_default,
|
|
2537
2759
|
{
|
|
2538
2760
|
as: "div",
|
|
@@ -2551,7 +2773,7 @@ var StackedLayout = ({
|
|
|
2551
2773
|
percentageClassName
|
|
2552
2774
|
)
|
|
2553
2775
|
] }),
|
|
2554
|
-
/* @__PURE__ */
|
|
2776
|
+
/* @__PURE__ */ jsx16(
|
|
2555
2777
|
ProgressBarBase,
|
|
2556
2778
|
{
|
|
2557
2779
|
clampedValue,
|
|
@@ -2593,7 +2815,7 @@ var CompactLayout = ({
|
|
|
2593
2815
|
percentageClassName,
|
|
2594
2816
|
labelClassName
|
|
2595
2817
|
});
|
|
2596
|
-
return /* @__PURE__ */
|
|
2818
|
+
return /* @__PURE__ */ jsxs13(
|
|
2597
2819
|
"div",
|
|
2598
2820
|
{
|
|
2599
2821
|
className: cn(
|
|
@@ -2603,7 +2825,7 @@ var CompactLayout = ({
|
|
|
2603
2825
|
className
|
|
2604
2826
|
),
|
|
2605
2827
|
children: [
|
|
2606
|
-
shouldShowHeader(label, showPercentage, showHitCount) && /* @__PURE__ */
|
|
2828
|
+
shouldShowHeader(label, showPercentage, showHitCount) && /* @__PURE__ */ jsx16(
|
|
2607
2829
|
Text_default,
|
|
2608
2830
|
{
|
|
2609
2831
|
as: "div",
|
|
@@ -2614,7 +2836,7 @@ var CompactLayout = ({
|
|
|
2614
2836
|
children: content
|
|
2615
2837
|
}
|
|
2616
2838
|
),
|
|
2617
|
-
/* @__PURE__ */
|
|
2839
|
+
/* @__PURE__ */ jsx16(
|
|
2618
2840
|
ProgressBarBase,
|
|
2619
2841
|
{
|
|
2620
2842
|
clampedValue,
|
|
@@ -2650,9 +2872,9 @@ var DefaultLayout = ({
|
|
|
2650
2872
|
label,
|
|
2651
2873
|
showPercentage
|
|
2652
2874
|
);
|
|
2653
|
-
return /* @__PURE__ */
|
|
2654
|
-
displayConfig.showHeader && /* @__PURE__ */
|
|
2655
|
-
label && /* @__PURE__ */
|
|
2875
|
+
return /* @__PURE__ */ jsxs13("div", { className: cn("flex", sizeClasses.layout, gapClass, className), children: [
|
|
2876
|
+
displayConfig.showHeader && /* @__PURE__ */ jsxs13("div", { className: "flex flex-row items-center justify-between w-full", children: [
|
|
2877
|
+
label && /* @__PURE__ */ jsx16(
|
|
2656
2878
|
Text_default,
|
|
2657
2879
|
{
|
|
2658
2880
|
as: "div",
|
|
@@ -2665,7 +2887,7 @@ var DefaultLayout = ({
|
|
|
2665
2887
|
children: label
|
|
2666
2888
|
}
|
|
2667
2889
|
),
|
|
2668
|
-
showPercentage && /* @__PURE__ */
|
|
2890
|
+
showPercentage && /* @__PURE__ */ jsxs13(
|
|
2669
2891
|
Text_default,
|
|
2670
2892
|
{
|
|
2671
2893
|
size: "xs",
|
|
@@ -2681,7 +2903,7 @@ var DefaultLayout = ({
|
|
|
2681
2903
|
}
|
|
2682
2904
|
)
|
|
2683
2905
|
] }),
|
|
2684
|
-
/* @__PURE__ */
|
|
2906
|
+
/* @__PURE__ */ jsx16(
|
|
2685
2907
|
ProgressBarBase,
|
|
2686
2908
|
{
|
|
2687
2909
|
clampedValue,
|
|
@@ -2701,7 +2923,7 @@ var DefaultLayout = ({
|
|
|
2701
2923
|
)
|
|
2702
2924
|
}
|
|
2703
2925
|
),
|
|
2704
|
-
displayConfig.showPercentage && /* @__PURE__ */
|
|
2926
|
+
displayConfig.showPercentage && /* @__PURE__ */ jsxs13(
|
|
2705
2927
|
Text_default,
|
|
2706
2928
|
{
|
|
2707
2929
|
size: "xs",
|
|
@@ -2716,7 +2938,7 @@ var DefaultLayout = ({
|
|
|
2716
2938
|
]
|
|
2717
2939
|
}
|
|
2718
2940
|
),
|
|
2719
|
-
displayConfig.showLabel && /* @__PURE__ */
|
|
2941
|
+
displayConfig.showLabel && /* @__PURE__ */ jsx16(
|
|
2720
2942
|
Text_default,
|
|
2721
2943
|
{
|
|
2722
2944
|
as: "div",
|
|
@@ -2752,7 +2974,7 @@ var ProgressBar = ({
|
|
|
2752
2974
|
const sizeClasses = SIZE_CLASSES5[size];
|
|
2753
2975
|
const variantClasses = VARIANT_CLASSES[variant];
|
|
2754
2976
|
if (layout === "stacked") {
|
|
2755
|
-
return /* @__PURE__ */
|
|
2977
|
+
return /* @__PURE__ */ jsx16(
|
|
2756
2978
|
StackedLayout,
|
|
2757
2979
|
{
|
|
2758
2980
|
className,
|
|
@@ -2773,7 +2995,7 @@ var ProgressBar = ({
|
|
|
2773
2995
|
);
|
|
2774
2996
|
}
|
|
2775
2997
|
if (layout === "compact") {
|
|
2776
|
-
return /* @__PURE__ */
|
|
2998
|
+
return /* @__PURE__ */ jsx16(
|
|
2777
2999
|
CompactLayout,
|
|
2778
3000
|
{
|
|
2779
3001
|
className,
|
|
@@ -2793,7 +3015,7 @@ var ProgressBar = ({
|
|
|
2793
3015
|
}
|
|
2794
3016
|
);
|
|
2795
3017
|
}
|
|
2796
|
-
return /* @__PURE__ */
|
|
3018
|
+
return /* @__PURE__ */ jsx16(
|
|
2797
3019
|
DefaultLayout,
|
|
2798
3020
|
{
|
|
2799
3021
|
className,
|
|
@@ -2813,8 +3035,8 @@ var ProgressBar = ({
|
|
|
2813
3035
|
var ProgressBar_default = ProgressBar;
|
|
2814
3036
|
|
|
2815
3037
|
// src/assets/icons/subjects/ChatEN.tsx
|
|
2816
|
-
import { jsx as
|
|
2817
|
-
var ChatEN = ({ size, color }) => /* @__PURE__ */
|
|
3038
|
+
import { jsx as jsx17, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
3039
|
+
var ChatEN = ({ size, color }) => /* @__PURE__ */ jsxs14(
|
|
2818
3040
|
"svg",
|
|
2819
3041
|
{
|
|
2820
3042
|
width: size,
|
|
@@ -2823,21 +3045,21 @@ var ChatEN = ({ size, color }) => /* @__PURE__ */ jsxs12(
|
|
|
2823
3045
|
fill: "none",
|
|
2824
3046
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2825
3047
|
children: [
|
|
2826
|
-
/* @__PURE__ */
|
|
3048
|
+
/* @__PURE__ */ jsx17(
|
|
2827
3049
|
"path",
|
|
2828
3050
|
{
|
|
2829
3051
|
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
3052
|
fill: color
|
|
2831
3053
|
}
|
|
2832
3054
|
),
|
|
2833
|
-
/* @__PURE__ */
|
|
3055
|
+
/* @__PURE__ */ jsx17(
|
|
2834
3056
|
"path",
|
|
2835
3057
|
{
|
|
2836
3058
|
d: "M22.5488 12V20.5312H21.0781L17.252 14.4199V20.5312H15.7812V12H17.252L21.0898 18.123V12H22.5488Z",
|
|
2837
3059
|
fill: color
|
|
2838
3060
|
}
|
|
2839
3061
|
),
|
|
2840
|
-
/* @__PURE__ */
|
|
3062
|
+
/* @__PURE__ */ jsx17(
|
|
2841
3063
|
"path",
|
|
2842
3064
|
{
|
|
2843
3065
|
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 +3071,8 @@ var ChatEN = ({ size, color }) => /* @__PURE__ */ jsxs12(
|
|
|
2849
3071
|
);
|
|
2850
3072
|
|
|
2851
3073
|
// src/assets/icons/subjects/ChatES.tsx
|
|
2852
|
-
import { jsx as
|
|
2853
|
-
var ChatES = ({ size, color }) => /* @__PURE__ */
|
|
3074
|
+
import { jsx as jsx18, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
3075
|
+
var ChatES = ({ size, color }) => /* @__PURE__ */ jsxs15(
|
|
2854
3076
|
"svg",
|
|
2855
3077
|
{
|
|
2856
3078
|
width: size,
|
|
@@ -2859,21 +3081,21 @@ var ChatES = ({ size, color }) => /* @__PURE__ */ jsxs13(
|
|
|
2859
3081
|
fill: "none",
|
|
2860
3082
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2861
3083
|
children: [
|
|
2862
|
-
/* @__PURE__ */
|
|
3084
|
+
/* @__PURE__ */ jsx18(
|
|
2863
3085
|
"path",
|
|
2864
3086
|
{
|
|
2865
3087
|
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
3088
|
fill: color
|
|
2867
3089
|
}
|
|
2868
3090
|
),
|
|
2869
|
-
/* @__PURE__ */
|
|
3091
|
+
/* @__PURE__ */ jsx18(
|
|
2870
3092
|
"path",
|
|
2871
3093
|
{
|
|
2872
3094
|
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
3095
|
fill: color
|
|
2874
3096
|
}
|
|
2875
3097
|
),
|
|
2876
|
-
/* @__PURE__ */
|
|
3098
|
+
/* @__PURE__ */ jsx18(
|
|
2877
3099
|
"path",
|
|
2878
3100
|
{
|
|
2879
3101
|
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 +3107,8 @@ var ChatES = ({ size, color }) => /* @__PURE__ */ jsxs13(
|
|
|
2885
3107
|
);
|
|
2886
3108
|
|
|
2887
3109
|
// src/assets/icons/subjects/ChatPT.tsx
|
|
2888
|
-
import { jsx as
|
|
2889
|
-
var ChatPT = ({ size, color }) => /* @__PURE__ */
|
|
3110
|
+
import { jsx as jsx19, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
3111
|
+
var ChatPT = ({ size, color }) => /* @__PURE__ */ jsxs16(
|
|
2890
3112
|
"svg",
|
|
2891
3113
|
{
|
|
2892
3114
|
width: size,
|
|
@@ -2895,21 +3117,21 @@ var ChatPT = ({ size, color }) => /* @__PURE__ */ jsxs14(
|
|
|
2895
3117
|
fill: "none",
|
|
2896
3118
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2897
3119
|
children: [
|
|
2898
|
-
/* @__PURE__ */
|
|
3120
|
+
/* @__PURE__ */ jsx19(
|
|
2899
3121
|
"path",
|
|
2900
3122
|
{
|
|
2901
3123
|
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
3124
|
fill: color
|
|
2903
3125
|
}
|
|
2904
3126
|
),
|
|
2905
|
-
/* @__PURE__ */
|
|
3127
|
+
/* @__PURE__ */ jsx19(
|
|
2906
3128
|
"path",
|
|
2907
3129
|
{
|
|
2908
3130
|
d: "M21.1758 12V20.5312H19.7168V12H21.1758ZM23.8535 12V13.1719H17.0625V12H23.8535Z",
|
|
2909
3131
|
fill: color
|
|
2910
3132
|
}
|
|
2911
3133
|
),
|
|
2912
|
-
/* @__PURE__ */
|
|
3134
|
+
/* @__PURE__ */ jsx19(
|
|
2913
3135
|
"path",
|
|
2914
3136
|
{
|
|
2915
3137
|
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 +3144,7 @@ var ChatPT = ({ size, color }) => /* @__PURE__ */ jsxs14(
|
|
|
2922
3144
|
|
|
2923
3145
|
// src/components/Card/Card.tsx
|
|
2924
3146
|
import {
|
|
2925
|
-
forwardRef as
|
|
3147
|
+
forwardRef as forwardRef7,
|
|
2926
3148
|
Fragment as Fragment3,
|
|
2927
3149
|
useState as useState7,
|
|
2928
3150
|
useRef as useRef3,
|
|
@@ -2942,9 +3164,9 @@ import {
|
|
|
2942
3164
|
} from "phosphor-react";
|
|
2943
3165
|
|
|
2944
3166
|
// src/components/IconRender/IconRender.tsx
|
|
2945
|
-
import { cloneElement as
|
|
3167
|
+
import { cloneElement as cloneElement2 } from "react";
|
|
2946
3168
|
import * as PhosphorIcons from "phosphor-react";
|
|
2947
|
-
import { jsx as
|
|
3169
|
+
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
2948
3170
|
var IconRender = ({
|
|
2949
3171
|
iconName,
|
|
2950
3172
|
color = "#000000",
|
|
@@ -2954,18 +3176,18 @@ var IconRender = ({
|
|
|
2954
3176
|
if (typeof iconName === "string") {
|
|
2955
3177
|
switch (iconName) {
|
|
2956
3178
|
case "Chat_PT":
|
|
2957
|
-
return /* @__PURE__ */
|
|
3179
|
+
return /* @__PURE__ */ jsx20(ChatPT, { size, color });
|
|
2958
3180
|
case "Chat_EN":
|
|
2959
|
-
return /* @__PURE__ */
|
|
3181
|
+
return /* @__PURE__ */ jsx20(ChatEN, { size, color });
|
|
2960
3182
|
case "Chat_ES":
|
|
2961
|
-
return /* @__PURE__ */
|
|
3183
|
+
return /* @__PURE__ */ jsx20(ChatES, { size, color });
|
|
2962
3184
|
default: {
|
|
2963
3185
|
const IconComponent = PhosphorIcons[iconName] || PhosphorIcons.Question;
|
|
2964
|
-
return /* @__PURE__ */
|
|
3186
|
+
return /* @__PURE__ */ jsx20(IconComponent, { size, color, weight });
|
|
2965
3187
|
}
|
|
2966
3188
|
}
|
|
2967
3189
|
} else {
|
|
2968
|
-
return
|
|
3190
|
+
return cloneElement2(iconName, {
|
|
2969
3191
|
size,
|
|
2970
3192
|
color: "currentColor"
|
|
2971
3193
|
});
|
|
@@ -2974,7 +3196,7 @@ var IconRender = ({
|
|
|
2974
3196
|
var IconRender_default = IconRender;
|
|
2975
3197
|
|
|
2976
3198
|
// src/components/Card/Card.tsx
|
|
2977
|
-
import { Fragment as Fragment4, jsx as
|
|
3199
|
+
import { Fragment as Fragment4, jsx as jsx21, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
2978
3200
|
var CARD_BASE_CLASSES = {
|
|
2979
3201
|
default: "w-full bg-background border border-border-50 rounded-xl",
|
|
2980
3202
|
compact: "w-full bg-background border border-border-50 rounded-lg",
|
|
@@ -3000,7 +3222,7 @@ var CARD_CURSOR_CLASSES = {
|
|
|
3000
3222
|
default: "",
|
|
3001
3223
|
pointer: "cursor-pointer"
|
|
3002
3224
|
};
|
|
3003
|
-
var CardBase =
|
|
3225
|
+
var CardBase = forwardRef7(
|
|
3004
3226
|
({
|
|
3005
3227
|
children,
|
|
3006
3228
|
variant = "default",
|
|
@@ -3016,7 +3238,7 @@ var CardBase = forwardRef6(
|
|
|
3016
3238
|
const minHeightClasses = CARD_MIN_HEIGHT_CLASSES[minHeight];
|
|
3017
3239
|
const layoutClasses = CARD_LAYOUT_CLASSES[layout];
|
|
3018
3240
|
const cursorClasses = CARD_CURSOR_CLASSES[cursor];
|
|
3019
|
-
return /* @__PURE__ */
|
|
3241
|
+
return /* @__PURE__ */ jsx21(
|
|
3020
3242
|
"div",
|
|
3021
3243
|
{
|
|
3022
3244
|
ref,
|
|
@@ -3058,7 +3280,7 @@ var ACTION_HEADER_CLASSES = {
|
|
|
3058
3280
|
error: "text-error-300",
|
|
3059
3281
|
info: "text-info-300"
|
|
3060
3282
|
};
|
|
3061
|
-
var CardActivitiesResults =
|
|
3283
|
+
var CardActivitiesResults = forwardRef7(
|
|
3062
3284
|
({
|
|
3063
3285
|
icon,
|
|
3064
3286
|
title,
|
|
@@ -3074,7 +3296,7 @@ var CardActivitiesResults = forwardRef6(
|
|
|
3074
3296
|
const actionIconClasses = ACTION_ICON_CLASSES[action];
|
|
3075
3297
|
const actionSubTitleClasses = ACTION_SUBTITLE_CLASSES[action];
|
|
3076
3298
|
const actionHeaderClasses = ACTION_HEADER_CLASSES[action];
|
|
3077
|
-
return /* @__PURE__ */
|
|
3299
|
+
return /* @__PURE__ */ jsxs17(
|
|
3078
3300
|
"div",
|
|
3079
3301
|
{
|
|
3080
3302
|
ref,
|
|
@@ -3084,7 +3306,7 @@ var CardActivitiesResults = forwardRef6(
|
|
|
3084
3306
|
),
|
|
3085
3307
|
...props,
|
|
3086
3308
|
children: [
|
|
3087
|
-
/* @__PURE__ */
|
|
3309
|
+
/* @__PURE__ */ jsxs17(
|
|
3088
3310
|
"div",
|
|
3089
3311
|
{
|
|
3090
3312
|
className: cn(
|
|
@@ -3093,7 +3315,7 @@ var CardActivitiesResults = forwardRef6(
|
|
|
3093
3315
|
extended ? "rounded-t-xl" : "rounded-xl"
|
|
3094
3316
|
),
|
|
3095
3317
|
children: [
|
|
3096
|
-
/* @__PURE__ */
|
|
3318
|
+
/* @__PURE__ */ jsx21(
|
|
3097
3319
|
"span",
|
|
3098
3320
|
{
|
|
3099
3321
|
className: cn(
|
|
@@ -3103,7 +3325,7 @@ var CardActivitiesResults = forwardRef6(
|
|
|
3103
3325
|
children: icon
|
|
3104
3326
|
}
|
|
3105
3327
|
),
|
|
3106
|
-
/* @__PURE__ */
|
|
3328
|
+
/* @__PURE__ */ jsx21(
|
|
3107
3329
|
Text_default,
|
|
3108
3330
|
{
|
|
3109
3331
|
size: "2xs",
|
|
@@ -3112,7 +3334,7 @@ var CardActivitiesResults = forwardRef6(
|
|
|
3112
3334
|
children: title
|
|
3113
3335
|
}
|
|
3114
3336
|
),
|
|
3115
|
-
/* @__PURE__ */
|
|
3337
|
+
/* @__PURE__ */ jsx21(
|
|
3116
3338
|
"p",
|
|
3117
3339
|
{
|
|
3118
3340
|
className: cn("text-lg font-bold truncate", actionSubTitleClasses),
|
|
@@ -3122,8 +3344,8 @@ var CardActivitiesResults = forwardRef6(
|
|
|
3122
3344
|
]
|
|
3123
3345
|
}
|
|
3124
3346
|
),
|
|
3125
|
-
extended && /* @__PURE__ */
|
|
3126
|
-
/* @__PURE__ */
|
|
3347
|
+
extended && /* @__PURE__ */ jsxs17("div", { className: "flex flex-col items-center gap-2.5 pb-9.5 pt-2.5", children: [
|
|
3348
|
+
/* @__PURE__ */ jsx21(
|
|
3127
3349
|
"p",
|
|
3128
3350
|
{
|
|
3129
3351
|
className: cn(
|
|
@@ -3133,14 +3355,14 @@ var CardActivitiesResults = forwardRef6(
|
|
|
3133
3355
|
children: header
|
|
3134
3356
|
}
|
|
3135
3357
|
),
|
|
3136
|
-
/* @__PURE__ */
|
|
3358
|
+
/* @__PURE__ */ jsx21(Badge_default, { size: "large", action: "info", children: description })
|
|
3137
3359
|
] })
|
|
3138
3360
|
]
|
|
3139
3361
|
}
|
|
3140
3362
|
);
|
|
3141
3363
|
}
|
|
3142
3364
|
);
|
|
3143
|
-
var CardQuestions =
|
|
3365
|
+
var CardQuestions = forwardRef7(
|
|
3144
3366
|
({
|
|
3145
3367
|
header,
|
|
3146
3368
|
state = "undone",
|
|
@@ -3152,7 +3374,7 @@ var CardQuestions = forwardRef6(
|
|
|
3152
3374
|
const isDone = state === "done";
|
|
3153
3375
|
const stateLabel = isDone ? "Realizado" : "N\xE3o Realizado";
|
|
3154
3376
|
const buttonLabel = isDone ? "Ver Resultado" : "Responder";
|
|
3155
|
-
return /* @__PURE__ */
|
|
3377
|
+
return /* @__PURE__ */ jsxs17(
|
|
3156
3378
|
CardBase,
|
|
3157
3379
|
{
|
|
3158
3380
|
ref,
|
|
@@ -3162,9 +3384,9 @@ var CardQuestions = forwardRef6(
|
|
|
3162
3384
|
className: cn("justify-between gap-4", className),
|
|
3163
3385
|
...props,
|
|
3164
3386
|
children: [
|
|
3165
|
-
/* @__PURE__ */
|
|
3166
|
-
/* @__PURE__ */
|
|
3167
|
-
/* @__PURE__ */
|
|
3387
|
+
/* @__PURE__ */ jsxs17("section", { className: "flex flex-col gap-1 flex-1 min-w-0", children: [
|
|
3388
|
+
/* @__PURE__ */ jsx21("p", { className: "font-bold text-xs text-text-950 truncate", children: header }),
|
|
3389
|
+
/* @__PURE__ */ jsx21("div", { className: "flex flex-row gap-6 items-center", children: /* @__PURE__ */ jsx21(
|
|
3168
3390
|
Badge_default,
|
|
3169
3391
|
{
|
|
3170
3392
|
size: "medium",
|
|
@@ -3174,7 +3396,7 @@ var CardQuestions = forwardRef6(
|
|
|
3174
3396
|
}
|
|
3175
3397
|
) })
|
|
3176
3398
|
] }),
|
|
3177
|
-
/* @__PURE__ */
|
|
3399
|
+
/* @__PURE__ */ jsx21("span", { className: "flex-shrink-0", children: /* @__PURE__ */ jsx21(
|
|
3178
3400
|
Button_default,
|
|
3179
3401
|
{
|
|
3180
3402
|
size: "extra-small",
|
|
@@ -3188,7 +3410,7 @@ var CardQuestions = forwardRef6(
|
|
|
3188
3410
|
);
|
|
3189
3411
|
}
|
|
3190
3412
|
);
|
|
3191
|
-
var CardProgress =
|
|
3413
|
+
var CardProgress = forwardRef7(
|
|
3192
3414
|
({
|
|
3193
3415
|
header,
|
|
3194
3416
|
subhead,
|
|
@@ -3205,19 +3427,19 @@ var CardProgress = forwardRef6(
|
|
|
3205
3427
|
}, ref) => {
|
|
3206
3428
|
const isHorizontal = direction === "horizontal";
|
|
3207
3429
|
const contentComponent = {
|
|
3208
|
-
horizontal: /* @__PURE__ */
|
|
3209
|
-
showDates && /* @__PURE__ */
|
|
3210
|
-
initialDate && /* @__PURE__ */
|
|
3211
|
-
/* @__PURE__ */
|
|
3212
|
-
/* @__PURE__ */
|
|
3430
|
+
horizontal: /* @__PURE__ */ jsxs17(Fragment4, { children: [
|
|
3431
|
+
showDates && /* @__PURE__ */ jsxs17("div", { className: "flex flex-row gap-6 items-center", children: [
|
|
3432
|
+
initialDate && /* @__PURE__ */ jsxs17("span", { className: "flex flex-row gap-1 items-center text-2xs", children: [
|
|
3433
|
+
/* @__PURE__ */ jsx21("p", { className: "text-text-800 font-semibold", children: "In\xEDcio" }),
|
|
3434
|
+
/* @__PURE__ */ jsx21("p", { className: "text-text-600", children: initialDate })
|
|
3213
3435
|
] }),
|
|
3214
|
-
endDate && /* @__PURE__ */
|
|
3215
|
-
/* @__PURE__ */
|
|
3216
|
-
/* @__PURE__ */
|
|
3436
|
+
endDate && /* @__PURE__ */ jsxs17("span", { className: "flex flex-row gap-1 items-center text-2xs", children: [
|
|
3437
|
+
/* @__PURE__ */ jsx21("p", { className: "text-text-800 font-semibold", children: "Fim" }),
|
|
3438
|
+
/* @__PURE__ */ jsx21("p", { className: "text-text-600", children: endDate })
|
|
3217
3439
|
] })
|
|
3218
3440
|
] }),
|
|
3219
|
-
/* @__PURE__ */
|
|
3220
|
-
/* @__PURE__ */
|
|
3441
|
+
/* @__PURE__ */ jsxs17("span", { className: "grid grid-cols-[1fr_auto] items-center gap-2", children: [
|
|
3442
|
+
/* @__PURE__ */ jsx21(
|
|
3221
3443
|
ProgressBar_default,
|
|
3222
3444
|
{
|
|
3223
3445
|
size: "small",
|
|
@@ -3226,7 +3448,7 @@ var CardProgress = forwardRef6(
|
|
|
3226
3448
|
"data-testid": "progress-bar"
|
|
3227
3449
|
}
|
|
3228
3450
|
),
|
|
3229
|
-
/* @__PURE__ */
|
|
3451
|
+
/* @__PURE__ */ jsxs17(
|
|
3230
3452
|
Text_default,
|
|
3231
3453
|
{
|
|
3232
3454
|
size: "xs",
|
|
@@ -3242,9 +3464,9 @@ var CardProgress = forwardRef6(
|
|
|
3242
3464
|
)
|
|
3243
3465
|
] })
|
|
3244
3466
|
] }),
|
|
3245
|
-
vertical: /* @__PURE__ */
|
|
3467
|
+
vertical: /* @__PURE__ */ jsx21("p", { className: "text-sm text-text-800", children: subhead })
|
|
3246
3468
|
};
|
|
3247
|
-
return /* @__PURE__ */
|
|
3469
|
+
return /* @__PURE__ */ jsxs17(
|
|
3248
3470
|
CardBase,
|
|
3249
3471
|
{
|
|
3250
3472
|
ref,
|
|
@@ -3255,7 +3477,7 @@ var CardProgress = forwardRef6(
|
|
|
3255
3477
|
className: cn(isHorizontal ? "h-20" : "", className),
|
|
3256
3478
|
...props,
|
|
3257
3479
|
children: [
|
|
3258
|
-
/* @__PURE__ */
|
|
3480
|
+
/* @__PURE__ */ jsx21(
|
|
3259
3481
|
"div",
|
|
3260
3482
|
{
|
|
3261
3483
|
className: cn(
|
|
@@ -3268,7 +3490,7 @@ var CardProgress = forwardRef6(
|
|
|
3268
3490
|
children: icon
|
|
3269
3491
|
}
|
|
3270
3492
|
),
|
|
3271
|
-
/* @__PURE__ */
|
|
3493
|
+
/* @__PURE__ */ jsxs17(
|
|
3272
3494
|
"div",
|
|
3273
3495
|
{
|
|
3274
3496
|
className: cn(
|
|
@@ -3276,7 +3498,7 @@ var CardProgress = forwardRef6(
|
|
|
3276
3498
|
!isHorizontal && "gap-4"
|
|
3277
3499
|
),
|
|
3278
3500
|
children: [
|
|
3279
|
-
/* @__PURE__ */
|
|
3501
|
+
/* @__PURE__ */ jsx21(Text_default, { size: "sm", weight: "bold", className: "text-text-950 truncate", children: header }),
|
|
3280
3502
|
contentComponent[direction]
|
|
3281
3503
|
]
|
|
3282
3504
|
}
|
|
@@ -3286,7 +3508,7 @@ var CardProgress = forwardRef6(
|
|
|
3286
3508
|
);
|
|
3287
3509
|
}
|
|
3288
3510
|
);
|
|
3289
|
-
var CardTopic =
|
|
3511
|
+
var CardTopic = forwardRef7(
|
|
3290
3512
|
({
|
|
3291
3513
|
header,
|
|
3292
3514
|
subHead,
|
|
@@ -3296,7 +3518,7 @@ var CardTopic = forwardRef6(
|
|
|
3296
3518
|
className = "",
|
|
3297
3519
|
...props
|
|
3298
3520
|
}, ref) => {
|
|
3299
|
-
return /* @__PURE__ */
|
|
3521
|
+
return /* @__PURE__ */ jsxs17(
|
|
3300
3522
|
CardBase,
|
|
3301
3523
|
{
|
|
3302
3524
|
ref,
|
|
@@ -3307,13 +3529,13 @@ var CardTopic = forwardRef6(
|
|
|
3307
3529
|
className: cn("justify-center gap-2 py-2 px-4", className),
|
|
3308
3530
|
...props,
|
|
3309
3531
|
children: [
|
|
3310
|
-
subHead && /* @__PURE__ */
|
|
3311
|
-
/* @__PURE__ */
|
|
3312
|
-
index < subHead.length - 1 && /* @__PURE__ */
|
|
3532
|
+
subHead && /* @__PURE__ */ jsx21("span", { className: "text-text-600 text-2xs flex flex-row gap-1", children: subHead.map((text, index) => /* @__PURE__ */ jsxs17(Fragment3, { children: [
|
|
3533
|
+
/* @__PURE__ */ jsx21("p", { children: text }),
|
|
3534
|
+
index < subHead.length - 1 && /* @__PURE__ */ jsx21("p", { children: "\u2022" })
|
|
3313
3535
|
] }, `${text} - ${index}`)) }),
|
|
3314
|
-
/* @__PURE__ */
|
|
3315
|
-
/* @__PURE__ */
|
|
3316
|
-
/* @__PURE__ */
|
|
3536
|
+
/* @__PURE__ */ jsx21("p", { className: "text-sm text-text-950 font-bold truncate", children: header }),
|
|
3537
|
+
/* @__PURE__ */ jsxs17("span", { className: "grid grid-cols-[1fr_auto] items-center gap-2", children: [
|
|
3538
|
+
/* @__PURE__ */ jsx21(
|
|
3317
3539
|
ProgressBar_default,
|
|
3318
3540
|
{
|
|
3319
3541
|
size: "small",
|
|
@@ -3322,7 +3544,7 @@ var CardTopic = forwardRef6(
|
|
|
3322
3544
|
"data-testid": "progress-bar"
|
|
3323
3545
|
}
|
|
3324
3546
|
),
|
|
3325
|
-
showPercentage && /* @__PURE__ */
|
|
3547
|
+
showPercentage && /* @__PURE__ */ jsxs17(
|
|
3326
3548
|
Text_default,
|
|
3327
3549
|
{
|
|
3328
3550
|
size: "xs",
|
|
@@ -3342,7 +3564,7 @@ var CardTopic = forwardRef6(
|
|
|
3342
3564
|
);
|
|
3343
3565
|
}
|
|
3344
3566
|
);
|
|
3345
|
-
var CardPerformance =
|
|
3567
|
+
var CardPerformance = forwardRef7(
|
|
3346
3568
|
({
|
|
3347
3569
|
header,
|
|
3348
3570
|
progress,
|
|
@@ -3356,7 +3578,7 @@ var CardPerformance = forwardRef6(
|
|
|
3356
3578
|
...props
|
|
3357
3579
|
}, ref) => {
|
|
3358
3580
|
const hasProgress = progress !== void 0;
|
|
3359
|
-
return /* @__PURE__ */
|
|
3581
|
+
return /* @__PURE__ */ jsxs17(
|
|
3360
3582
|
CardBase,
|
|
3361
3583
|
{
|
|
3362
3584
|
ref,
|
|
@@ -3370,10 +3592,10 @@ var CardPerformance = forwardRef6(
|
|
|
3370
3592
|
onClick: () => actionVariant == "caret" && onClickButton?.(valueButton),
|
|
3371
3593
|
...props,
|
|
3372
3594
|
children: [
|
|
3373
|
-
/* @__PURE__ */
|
|
3374
|
-
/* @__PURE__ */
|
|
3375
|
-
/* @__PURE__ */
|
|
3376
|
-
actionVariant === "button" && /* @__PURE__ */
|
|
3595
|
+
/* @__PURE__ */ jsxs17("div", { className: "w-full flex flex-col justify-between gap-2", children: [
|
|
3596
|
+
/* @__PURE__ */ jsxs17("div", { className: "flex flex-row justify-between items-center gap-2", children: [
|
|
3597
|
+
/* @__PURE__ */ jsx21("p", { className: "text-lg font-bold text-text-950 truncate flex-1 min-w-0", children: header }),
|
|
3598
|
+
actionVariant === "button" && /* @__PURE__ */ jsx21(
|
|
3377
3599
|
Button_default,
|
|
3378
3600
|
{
|
|
3379
3601
|
variant: "outline",
|
|
@@ -3384,16 +3606,16 @@ var CardPerformance = forwardRef6(
|
|
|
3384
3606
|
}
|
|
3385
3607
|
)
|
|
3386
3608
|
] }),
|
|
3387
|
-
/* @__PURE__ */
|
|
3609
|
+
/* @__PURE__ */ jsx21("div", { className: "w-full", children: hasProgress ? /* @__PURE__ */ jsx21(
|
|
3388
3610
|
ProgressBar_default,
|
|
3389
3611
|
{
|
|
3390
3612
|
value: progress,
|
|
3391
3613
|
label: `${progress}% ${labelProgress}`,
|
|
3392
3614
|
variant: progressVariant
|
|
3393
3615
|
}
|
|
3394
|
-
) : /* @__PURE__ */
|
|
3616
|
+
) : /* @__PURE__ */ jsx21("p", { className: "text-xs text-text-600 truncate", children: description }) })
|
|
3395
3617
|
] }),
|
|
3396
|
-
actionVariant == "caret" && /* @__PURE__ */
|
|
3618
|
+
actionVariant == "caret" && /* @__PURE__ */ jsx21(
|
|
3397
3619
|
CaretRight3,
|
|
3398
3620
|
{
|
|
3399
3621
|
className: "size-4.5 text-text-800 cursor-pointer",
|
|
@@ -3405,7 +3627,7 @@ var CardPerformance = forwardRef6(
|
|
|
3405
3627
|
);
|
|
3406
3628
|
}
|
|
3407
3629
|
);
|
|
3408
|
-
var CardResults =
|
|
3630
|
+
var CardResults = forwardRef7(
|
|
3409
3631
|
({
|
|
3410
3632
|
header,
|
|
3411
3633
|
correct_answers,
|
|
@@ -3417,7 +3639,7 @@ var CardResults = forwardRef6(
|
|
|
3417
3639
|
...props
|
|
3418
3640
|
}, ref) => {
|
|
3419
3641
|
const isRow = direction == "row";
|
|
3420
|
-
return /* @__PURE__ */
|
|
3642
|
+
return /* @__PURE__ */ jsxs17(
|
|
3421
3643
|
CardBase,
|
|
3422
3644
|
{
|
|
3423
3645
|
ref,
|
|
@@ -3427,7 +3649,7 @@ var CardResults = forwardRef6(
|
|
|
3427
3649
|
className: cn("items-stretch cursor-pointer pr-4", className),
|
|
3428
3650
|
...props,
|
|
3429
3651
|
children: [
|
|
3430
|
-
/* @__PURE__ */
|
|
3652
|
+
/* @__PURE__ */ jsx21(
|
|
3431
3653
|
"div",
|
|
3432
3654
|
{
|
|
3433
3655
|
className: cn(
|
|
@@ -3436,11 +3658,11 @@ var CardResults = forwardRef6(
|
|
|
3436
3658
|
style: {
|
|
3437
3659
|
backgroundColor: color
|
|
3438
3660
|
},
|
|
3439
|
-
children: /* @__PURE__ */
|
|
3661
|
+
children: /* @__PURE__ */ jsx21(IconRender_default, { iconName: icon, color: "currentColor", size: 20 })
|
|
3440
3662
|
}
|
|
3441
3663
|
),
|
|
3442
|
-
/* @__PURE__ */
|
|
3443
|
-
/* @__PURE__ */
|
|
3664
|
+
/* @__PURE__ */ jsxs17("div", { className: "w-full flex flex-row justify-between items-center", children: [
|
|
3665
|
+
/* @__PURE__ */ jsxs17(
|
|
3444
3666
|
"div",
|
|
3445
3667
|
{
|
|
3446
3668
|
className: cn(
|
|
@@ -3448,28 +3670,28 @@ var CardResults = forwardRef6(
|
|
|
3448
3670
|
isRow ? "flex-row items-center gap-2" : "flex-col"
|
|
3449
3671
|
),
|
|
3450
3672
|
children: [
|
|
3451
|
-
/* @__PURE__ */
|
|
3452
|
-
/* @__PURE__ */
|
|
3453
|
-
/* @__PURE__ */
|
|
3673
|
+
/* @__PURE__ */ jsx21("p", { className: "text-sm font-bold text-text-950 flex-1", children: header }),
|
|
3674
|
+
/* @__PURE__ */ jsxs17("span", { className: "flex flex-wrap flex-row gap-1 items-center", children: [
|
|
3675
|
+
/* @__PURE__ */ jsxs17(
|
|
3454
3676
|
Badge_default,
|
|
3455
3677
|
{
|
|
3456
3678
|
action: "success",
|
|
3457
3679
|
variant: "solid",
|
|
3458
3680
|
size: "large",
|
|
3459
|
-
iconLeft: /* @__PURE__ */
|
|
3681
|
+
iconLeft: /* @__PURE__ */ jsx21(CheckCircle, {}),
|
|
3460
3682
|
children: [
|
|
3461
3683
|
correct_answers,
|
|
3462
3684
|
" Corretas"
|
|
3463
3685
|
]
|
|
3464
3686
|
}
|
|
3465
3687
|
),
|
|
3466
|
-
/* @__PURE__ */
|
|
3688
|
+
/* @__PURE__ */ jsxs17(
|
|
3467
3689
|
Badge_default,
|
|
3468
3690
|
{
|
|
3469
3691
|
action: "error",
|
|
3470
3692
|
variant: "solid",
|
|
3471
3693
|
size: "large",
|
|
3472
|
-
iconLeft: /* @__PURE__ */
|
|
3694
|
+
iconLeft: /* @__PURE__ */ jsx21(XCircle, {}),
|
|
3473
3695
|
children: [
|
|
3474
3696
|
incorrect_answers,
|
|
3475
3697
|
" Incorretas"
|
|
@@ -3480,14 +3702,14 @@ var CardResults = forwardRef6(
|
|
|
3480
3702
|
]
|
|
3481
3703
|
}
|
|
3482
3704
|
),
|
|
3483
|
-
/* @__PURE__ */
|
|
3705
|
+
/* @__PURE__ */ jsx21(CaretRight3, { className: "min-w-6 min-h-6 text-text-800" })
|
|
3484
3706
|
] })
|
|
3485
3707
|
]
|
|
3486
3708
|
}
|
|
3487
3709
|
);
|
|
3488
3710
|
}
|
|
3489
3711
|
);
|
|
3490
|
-
var CardStatus =
|
|
3712
|
+
var CardStatus = forwardRef7(
|
|
3491
3713
|
({ header, className, status, label, ...props }, ref) => {
|
|
3492
3714
|
const getLabelBadge = (status2) => {
|
|
3493
3715
|
switch (status2) {
|
|
@@ -3506,13 +3728,13 @@ var CardStatus = forwardRef6(
|
|
|
3506
3728
|
const getIconBadge = (status2) => {
|
|
3507
3729
|
switch (status2) {
|
|
3508
3730
|
case "correct":
|
|
3509
|
-
return /* @__PURE__ */
|
|
3731
|
+
return /* @__PURE__ */ jsx21(CheckCircle, {});
|
|
3510
3732
|
case "incorrect":
|
|
3511
|
-
return /* @__PURE__ */
|
|
3733
|
+
return /* @__PURE__ */ jsx21(XCircle, {});
|
|
3512
3734
|
case "pending":
|
|
3513
|
-
return /* @__PURE__ */
|
|
3735
|
+
return /* @__PURE__ */ jsx21(Clock, {});
|
|
3514
3736
|
default:
|
|
3515
|
-
return /* @__PURE__ */
|
|
3737
|
+
return /* @__PURE__ */ jsx21(XCircle, {});
|
|
3516
3738
|
}
|
|
3517
3739
|
};
|
|
3518
3740
|
const getActionBadge = (status2) => {
|
|
@@ -3527,7 +3749,7 @@ var CardStatus = forwardRef6(
|
|
|
3527
3749
|
return "info";
|
|
3528
3750
|
}
|
|
3529
3751
|
};
|
|
3530
|
-
return /* @__PURE__ */
|
|
3752
|
+
return /* @__PURE__ */ jsx21(
|
|
3531
3753
|
CardBase,
|
|
3532
3754
|
{
|
|
3533
3755
|
ref,
|
|
@@ -3536,10 +3758,10 @@ var CardStatus = forwardRef6(
|
|
|
3536
3758
|
minHeight: "medium",
|
|
3537
3759
|
className: cn("items-center cursor-pointer", className),
|
|
3538
3760
|
...props,
|
|
3539
|
-
children: /* @__PURE__ */
|
|
3540
|
-
/* @__PURE__ */
|
|
3541
|
-
/* @__PURE__ */
|
|
3542
|
-
status && /* @__PURE__ */
|
|
3761
|
+
children: /* @__PURE__ */ jsxs17("div", { className: "flex justify-between w-full h-full flex-row items-center gap-2", children: [
|
|
3762
|
+
/* @__PURE__ */ jsx21("p", { className: "text-sm font-bold text-text-950 truncate flex-1 min-w-0", children: header }),
|
|
3763
|
+
/* @__PURE__ */ jsxs17("span", { className: "flex flex-row gap-1 items-center flex-shrink-0", children: [
|
|
3764
|
+
status && /* @__PURE__ */ jsx21(
|
|
3543
3765
|
Badge_default,
|
|
3544
3766
|
{
|
|
3545
3767
|
action: getActionBadge(status),
|
|
@@ -3549,17 +3771,17 @@ var CardStatus = forwardRef6(
|
|
|
3549
3771
|
children: getLabelBadge(status)
|
|
3550
3772
|
}
|
|
3551
3773
|
),
|
|
3552
|
-
label && /* @__PURE__ */
|
|
3774
|
+
label && /* @__PURE__ */ jsx21("p", { className: "text-sm text-text-800", children: label })
|
|
3553
3775
|
] }),
|
|
3554
|
-
/* @__PURE__ */
|
|
3776
|
+
/* @__PURE__ */ jsx21(CaretRight3, { className: "min-w-6 min-h-6 text-text-800 cursor-pointer flex-shrink-0 ml-2" })
|
|
3555
3777
|
] })
|
|
3556
3778
|
}
|
|
3557
3779
|
);
|
|
3558
3780
|
}
|
|
3559
3781
|
);
|
|
3560
|
-
var CardSettings =
|
|
3782
|
+
var CardSettings = forwardRef7(
|
|
3561
3783
|
({ header, className, icon, ...props }, ref) => {
|
|
3562
|
-
return /* @__PURE__ */
|
|
3784
|
+
return /* @__PURE__ */ jsxs17(
|
|
3563
3785
|
CardBase,
|
|
3564
3786
|
{
|
|
3565
3787
|
ref,
|
|
@@ -3572,17 +3794,17 @@ var CardSettings = forwardRef6(
|
|
|
3572
3794
|
),
|
|
3573
3795
|
...props,
|
|
3574
3796
|
children: [
|
|
3575
|
-
/* @__PURE__ */
|
|
3576
|
-
/* @__PURE__ */
|
|
3577
|
-
/* @__PURE__ */
|
|
3797
|
+
/* @__PURE__ */ jsx21("span", { className: "[&>svg]:size-6", children: icon }),
|
|
3798
|
+
/* @__PURE__ */ jsx21("p", { className: "w-full text-sm truncate", children: header }),
|
|
3799
|
+
/* @__PURE__ */ jsx21(CaretRight3, { size: 24, className: "cursor-pointer" })
|
|
3578
3800
|
]
|
|
3579
3801
|
}
|
|
3580
3802
|
);
|
|
3581
3803
|
}
|
|
3582
3804
|
);
|
|
3583
|
-
var CardSupport =
|
|
3805
|
+
var CardSupport = forwardRef7(
|
|
3584
3806
|
({ header, className, direction = "col", children, ...props }, ref) => {
|
|
3585
|
-
return /* @__PURE__ */
|
|
3807
|
+
return /* @__PURE__ */ jsxs17(
|
|
3586
3808
|
CardBase,
|
|
3587
3809
|
{
|
|
3588
3810
|
ref,
|
|
@@ -3595,7 +3817,7 @@ var CardSupport = forwardRef6(
|
|
|
3595
3817
|
),
|
|
3596
3818
|
...props,
|
|
3597
3819
|
children: [
|
|
3598
|
-
/* @__PURE__ */
|
|
3820
|
+
/* @__PURE__ */ jsxs17(
|
|
3599
3821
|
"div",
|
|
3600
3822
|
{
|
|
3601
3823
|
className: cn(
|
|
@@ -3603,18 +3825,18 @@ var CardSupport = forwardRef6(
|
|
|
3603
3825
|
direction == "col" ? "flex-col" : "flex-row items-center"
|
|
3604
3826
|
),
|
|
3605
3827
|
children: [
|
|
3606
|
-
/* @__PURE__ */
|
|
3607
|
-
/* @__PURE__ */
|
|
3828
|
+
/* @__PURE__ */ jsx21("span", { className: "w-full min-w-0", children: /* @__PURE__ */ jsx21("p", { className: "text-sm text-text-950 font-bold truncate", children: header }) }),
|
|
3829
|
+
/* @__PURE__ */ jsx21("span", { className: "flex flex-row gap-1", children })
|
|
3608
3830
|
]
|
|
3609
3831
|
}
|
|
3610
3832
|
),
|
|
3611
|
-
/* @__PURE__ */
|
|
3833
|
+
/* @__PURE__ */ jsx21(CaretRight3, { className: "text-text-800 cursor-pointer", size: 24 })
|
|
3612
3834
|
]
|
|
3613
3835
|
}
|
|
3614
3836
|
);
|
|
3615
3837
|
}
|
|
3616
3838
|
);
|
|
3617
|
-
var CardForum =
|
|
3839
|
+
var CardForum = forwardRef7(
|
|
3618
3840
|
({
|
|
3619
3841
|
title,
|
|
3620
3842
|
content,
|
|
@@ -3628,7 +3850,7 @@ var CardForum = forwardRef6(
|
|
|
3628
3850
|
hour,
|
|
3629
3851
|
...props
|
|
3630
3852
|
}, ref) => {
|
|
3631
|
-
return /* @__PURE__ */
|
|
3853
|
+
return /* @__PURE__ */ jsxs17(
|
|
3632
3854
|
CardBase,
|
|
3633
3855
|
{
|
|
3634
3856
|
ref,
|
|
@@ -3639,7 +3861,7 @@ var CardForum = forwardRef6(
|
|
|
3639
3861
|
className: cn("w-auto h-auto gap-3", className),
|
|
3640
3862
|
...props,
|
|
3641
3863
|
children: [
|
|
3642
|
-
/* @__PURE__ */
|
|
3864
|
+
/* @__PURE__ */ jsx21(
|
|
3643
3865
|
"button",
|
|
3644
3866
|
{
|
|
3645
3867
|
type: "button",
|
|
@@ -3648,18 +3870,18 @@ var CardForum = forwardRef6(
|
|
|
3648
3870
|
className: "min-w-8 h-8 rounded-full bg-background-950"
|
|
3649
3871
|
}
|
|
3650
3872
|
),
|
|
3651
|
-
/* @__PURE__ */
|
|
3652
|
-
/* @__PURE__ */
|
|
3653
|
-
/* @__PURE__ */
|
|
3654
|
-
/* @__PURE__ */
|
|
3873
|
+
/* @__PURE__ */ jsxs17("div", { className: "flex flex-col gap-2 flex-1 min-w-0", children: [
|
|
3874
|
+
/* @__PURE__ */ jsxs17("div", { className: "flex flex-row gap-1 items-center flex-wrap", children: [
|
|
3875
|
+
/* @__PURE__ */ jsx21("p", { className: "text-xs font-semibold text-primary-700 truncate", children: title }),
|
|
3876
|
+
/* @__PURE__ */ jsxs17("p", { className: "text-xs text-text-600", children: [
|
|
3655
3877
|
"\u2022 ",
|
|
3656
3878
|
date,
|
|
3657
3879
|
" \u2022 ",
|
|
3658
3880
|
hour
|
|
3659
3881
|
] })
|
|
3660
3882
|
] }),
|
|
3661
|
-
/* @__PURE__ */
|
|
3662
|
-
/* @__PURE__ */
|
|
3883
|
+
/* @__PURE__ */ jsx21("p", { className: "text-text-950 text-sm line-clamp-2 truncate", children: content }),
|
|
3884
|
+
/* @__PURE__ */ jsxs17(
|
|
3663
3885
|
"button",
|
|
3664
3886
|
{
|
|
3665
3887
|
type: "button",
|
|
@@ -3667,8 +3889,8 @@ var CardForum = forwardRef6(
|
|
|
3667
3889
|
onClick: () => onClickComments?.(valueComments),
|
|
3668
3890
|
className: "text-text-600 flex flex-row gap-2 items-center",
|
|
3669
3891
|
children: [
|
|
3670
|
-
/* @__PURE__ */
|
|
3671
|
-
/* @__PURE__ */
|
|
3892
|
+
/* @__PURE__ */ jsx21(ChatCircleText, { "aria-hidden": "true", size: 16 }),
|
|
3893
|
+
/* @__PURE__ */ jsxs17("p", { className: "text-xs", children: [
|
|
3672
3894
|
comments,
|
|
3673
3895
|
" respostas"
|
|
3674
3896
|
] })
|
|
@@ -3681,7 +3903,7 @@ var CardForum = forwardRef6(
|
|
|
3681
3903
|
);
|
|
3682
3904
|
}
|
|
3683
3905
|
);
|
|
3684
|
-
var CardAudio =
|
|
3906
|
+
var CardAudio = forwardRef7(
|
|
3685
3907
|
({
|
|
3686
3908
|
src,
|
|
3687
3909
|
title,
|
|
@@ -3771,12 +3993,12 @@ var CardAudio = forwardRef6(
|
|
|
3771
3993
|
};
|
|
3772
3994
|
const getVolumeIcon = () => {
|
|
3773
3995
|
if (volume === 0) {
|
|
3774
|
-
return /* @__PURE__ */
|
|
3996
|
+
return /* @__PURE__ */ jsx21(SpeakerSimpleX, { size: 24 });
|
|
3775
3997
|
}
|
|
3776
3998
|
if (volume < 0.5) {
|
|
3777
|
-
return /* @__PURE__ */
|
|
3999
|
+
return /* @__PURE__ */ jsx21(SpeakerLow, { size: 24 });
|
|
3778
4000
|
}
|
|
3779
|
-
return /* @__PURE__ */
|
|
4001
|
+
return /* @__PURE__ */ jsx21(SpeakerHigh, { size: 24 });
|
|
3780
4002
|
};
|
|
3781
4003
|
useEffect8(() => {
|
|
3782
4004
|
const handleClickOutside = (event) => {
|
|
@@ -3792,7 +4014,7 @@ var CardAudio = forwardRef6(
|
|
|
3792
4014
|
document.removeEventListener("mousedown", handleClickOutside);
|
|
3793
4015
|
};
|
|
3794
4016
|
}, []);
|
|
3795
|
-
return /* @__PURE__ */
|
|
4017
|
+
return /* @__PURE__ */ jsxs17(
|
|
3796
4018
|
CardBase,
|
|
3797
4019
|
{
|
|
3798
4020
|
ref,
|
|
@@ -3805,7 +4027,7 @@ var CardAudio = forwardRef6(
|
|
|
3805
4027
|
),
|
|
3806
4028
|
...props,
|
|
3807
4029
|
children: [
|
|
3808
|
-
/* @__PURE__ */
|
|
4030
|
+
/* @__PURE__ */ jsx21(
|
|
3809
4031
|
"audio",
|
|
3810
4032
|
{
|
|
3811
4033
|
ref: audioRef,
|
|
@@ -3817,7 +4039,7 @@ var CardAudio = forwardRef6(
|
|
|
3817
4039
|
onEnded: handleEnded,
|
|
3818
4040
|
"data-testid": "audio-element",
|
|
3819
4041
|
"aria-label": title,
|
|
3820
|
-
children: tracks ? tracks.map((track) => /* @__PURE__ */
|
|
4042
|
+
children: tracks ? tracks.map((track) => /* @__PURE__ */ jsx21(
|
|
3821
4043
|
"track",
|
|
3822
4044
|
{
|
|
3823
4045
|
kind: track.kind,
|
|
@@ -3827,7 +4049,7 @@ var CardAudio = forwardRef6(
|
|
|
3827
4049
|
default: track.default
|
|
3828
4050
|
},
|
|
3829
4051
|
track.src
|
|
3830
|
-
)) : /* @__PURE__ */
|
|
4052
|
+
)) : /* @__PURE__ */ jsx21(
|
|
3831
4053
|
"track",
|
|
3832
4054
|
{
|
|
3833
4055
|
kind: "captions",
|
|
@@ -3838,7 +4060,7 @@ var CardAudio = forwardRef6(
|
|
|
3838
4060
|
)
|
|
3839
4061
|
}
|
|
3840
4062
|
),
|
|
3841
|
-
/* @__PURE__ */
|
|
4063
|
+
/* @__PURE__ */ jsx21(
|
|
3842
4064
|
"button",
|
|
3843
4065
|
{
|
|
3844
4066
|
type: "button",
|
|
@@ -3846,14 +4068,14 @@ var CardAudio = forwardRef6(
|
|
|
3846
4068
|
disabled: !src,
|
|
3847
4069
|
className: "cursor-pointer text-text-950 hover:text-primary-600 disabled:text-text-400 disabled:cursor-not-allowed",
|
|
3848
4070
|
"aria-label": isPlaying ? "Pausar" : "Reproduzir",
|
|
3849
|
-
children: isPlaying ? /* @__PURE__ */
|
|
3850
|
-
/* @__PURE__ */
|
|
3851
|
-
/* @__PURE__ */
|
|
3852
|
-
] }) }) : /* @__PURE__ */
|
|
4071
|
+
children: isPlaying ? /* @__PURE__ */ jsx21("div", { className: "w-6 h-6 flex items-center justify-center", children: /* @__PURE__ */ jsxs17("div", { className: "flex gap-0.5", children: [
|
|
4072
|
+
/* @__PURE__ */ jsx21("div", { className: "w-1 h-4 bg-current rounded-sm" }),
|
|
4073
|
+
/* @__PURE__ */ jsx21("div", { className: "w-1 h-4 bg-current rounded-sm" })
|
|
4074
|
+
] }) }) : /* @__PURE__ */ jsx21(Play, { size: 24 })
|
|
3853
4075
|
}
|
|
3854
4076
|
),
|
|
3855
|
-
/* @__PURE__ */
|
|
3856
|
-
/* @__PURE__ */
|
|
4077
|
+
/* @__PURE__ */ jsx21("p", { className: "text-text-800 text-md font-medium min-w-[2.5rem]", children: formatTime(currentTime) }),
|
|
4078
|
+
/* @__PURE__ */ jsx21("div", { className: "flex-1 relative", "data-testid": "progress-bar", children: /* @__PURE__ */ jsx21(
|
|
3857
4079
|
"button",
|
|
3858
4080
|
{
|
|
3859
4081
|
type: "button",
|
|
@@ -3868,7 +4090,7 @@ var CardAudio = forwardRef6(
|
|
|
3868
4090
|
}
|
|
3869
4091
|
},
|
|
3870
4092
|
"aria-label": "Barra de progresso do \xE1udio",
|
|
3871
|
-
children: /* @__PURE__ */
|
|
4093
|
+
children: /* @__PURE__ */ jsx21(
|
|
3872
4094
|
"div",
|
|
3873
4095
|
{
|
|
3874
4096
|
className: "h-full bg-primary-600 rounded-full transition-all duration-100",
|
|
@@ -3879,19 +4101,19 @@ var CardAudio = forwardRef6(
|
|
|
3879
4101
|
)
|
|
3880
4102
|
}
|
|
3881
4103
|
) }),
|
|
3882
|
-
/* @__PURE__ */
|
|
3883
|
-
/* @__PURE__ */
|
|
3884
|
-
/* @__PURE__ */
|
|
4104
|
+
/* @__PURE__ */ jsx21("p", { className: "text-text-800 text-md font-medium min-w-[2.5rem]", children: formatTime(duration) }),
|
|
4105
|
+
/* @__PURE__ */ jsxs17("div", { className: "relative h-6", ref: volumeControlRef, children: [
|
|
4106
|
+
/* @__PURE__ */ jsx21(
|
|
3885
4107
|
"button",
|
|
3886
4108
|
{
|
|
3887
4109
|
type: "button",
|
|
3888
4110
|
onClick: toggleVolumeControl,
|
|
3889
4111
|
className: "cursor-pointer text-text-950 hover:text-primary-600",
|
|
3890
4112
|
"aria-label": "Controle de volume",
|
|
3891
|
-
children: /* @__PURE__ */
|
|
4113
|
+
children: /* @__PURE__ */ jsx21("div", { className: "w-6 h-6 flex items-center justify-center", children: getVolumeIcon() })
|
|
3892
4114
|
}
|
|
3893
4115
|
),
|
|
3894
|
-
showVolumeControl && /* @__PURE__ */
|
|
4116
|
+
showVolumeControl && /* @__PURE__ */ jsx21(
|
|
3895
4117
|
"button",
|
|
3896
4118
|
{
|
|
3897
4119
|
type: "button",
|
|
@@ -3901,7 +4123,7 @@ var CardAudio = forwardRef6(
|
|
|
3901
4123
|
setShowVolumeControl(false);
|
|
3902
4124
|
}
|
|
3903
4125
|
},
|
|
3904
|
-
children: /* @__PURE__ */
|
|
4126
|
+
children: /* @__PURE__ */ jsx21(
|
|
3905
4127
|
"input",
|
|
3906
4128
|
{
|
|
3907
4129
|
type: "range",
|
|
@@ -3942,22 +4164,22 @@ var CardAudio = forwardRef6(
|
|
|
3942
4164
|
}
|
|
3943
4165
|
)
|
|
3944
4166
|
] }),
|
|
3945
|
-
/* @__PURE__ */
|
|
3946
|
-
/* @__PURE__ */
|
|
4167
|
+
/* @__PURE__ */ jsxs17("div", { className: "relative h-6", ref: speedMenuRef, children: [
|
|
4168
|
+
/* @__PURE__ */ jsx21(
|
|
3947
4169
|
"button",
|
|
3948
4170
|
{
|
|
3949
4171
|
type: "button",
|
|
3950
4172
|
onClick: toggleSpeedMenu,
|
|
3951
4173
|
className: "cursor-pointer text-text-950 hover:text-primary-600",
|
|
3952
4174
|
"aria-label": "Op\xE7\xF5es de velocidade",
|
|
3953
|
-
children: /* @__PURE__ */
|
|
4175
|
+
children: /* @__PURE__ */ jsx21(DotsThreeVertical, { size: 24 })
|
|
3954
4176
|
}
|
|
3955
4177
|
),
|
|
3956
|
-
showSpeedMenu && /* @__PURE__ */
|
|
4178
|
+
showSpeedMenu && /* @__PURE__ */ jsx21("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__ */ jsx21("div", { className: "flex flex-col gap-1", children: [
|
|
3957
4179
|
{ speed: 1, label: "1x" },
|
|
3958
4180
|
{ speed: 1.5, label: "1.5x" },
|
|
3959
4181
|
{ speed: 2, label: "2x" }
|
|
3960
|
-
].map(({ speed, label }) => /* @__PURE__ */
|
|
4182
|
+
].map(({ speed, label }) => /* @__PURE__ */ jsx21(
|
|
3961
4183
|
"button",
|
|
3962
4184
|
{
|
|
3963
4185
|
type: "button",
|
|
@@ -3982,10 +4204,10 @@ var SIMULADO_BACKGROUND_CLASSES = {
|
|
|
3982
4204
|
simuladao: "bg-exam-3",
|
|
3983
4205
|
vestibular: "bg-exam-4"
|
|
3984
4206
|
};
|
|
3985
|
-
var CardSimulado =
|
|
4207
|
+
var CardSimulado = forwardRef7(
|
|
3986
4208
|
({ title, duration, info, backgroundColor, className, ...props }, ref) => {
|
|
3987
4209
|
const backgroundClass = SIMULADO_BACKGROUND_CLASSES[backgroundColor];
|
|
3988
|
-
return /* @__PURE__ */
|
|
4210
|
+
return /* @__PURE__ */ jsx21(
|
|
3989
4211
|
CardBase,
|
|
3990
4212
|
{
|
|
3991
4213
|
ref,
|
|
@@ -3998,18 +4220,18 @@ var CardSimulado = forwardRef6(
|
|
|
3998
4220
|
className
|
|
3999
4221
|
),
|
|
4000
4222
|
...props,
|
|
4001
|
-
children: /* @__PURE__ */
|
|
4002
|
-
/* @__PURE__ */
|
|
4003
|
-
/* @__PURE__ */
|
|
4004
|
-
/* @__PURE__ */
|
|
4005
|
-
duration && /* @__PURE__ */
|
|
4006
|
-
/* @__PURE__ */
|
|
4007
|
-
/* @__PURE__ */
|
|
4223
|
+
children: /* @__PURE__ */ jsxs17("div", { className: "flex justify-between items-center w-full gap-4", children: [
|
|
4224
|
+
/* @__PURE__ */ jsxs17("div", { className: "flex flex-col gap-1 flex-1 min-w-0", children: [
|
|
4225
|
+
/* @__PURE__ */ jsx21(Text_default, { size: "lg", weight: "bold", className: "text-text-950 truncate", children: title }),
|
|
4226
|
+
/* @__PURE__ */ jsxs17("div", { className: "flex items-center gap-4 text-text-700", children: [
|
|
4227
|
+
duration && /* @__PURE__ */ jsxs17("div", { className: "flex items-center gap-1", children: [
|
|
4228
|
+
/* @__PURE__ */ jsx21(Clock, { size: 16, className: "flex-shrink-0" }),
|
|
4229
|
+
/* @__PURE__ */ jsx21(Text_default, { size: "sm", children: duration })
|
|
4008
4230
|
] }),
|
|
4009
|
-
/* @__PURE__ */
|
|
4231
|
+
/* @__PURE__ */ jsx21(Text_default, { size: "sm", className: "truncate", children: info })
|
|
4010
4232
|
] })
|
|
4011
4233
|
] }),
|
|
4012
|
-
/* @__PURE__ */
|
|
4234
|
+
/* @__PURE__ */ jsx21(
|
|
4013
4235
|
CaretRight3,
|
|
4014
4236
|
{
|
|
4015
4237
|
size: 24,
|
|
@@ -4022,7 +4244,7 @@ var CardSimulado = forwardRef6(
|
|
|
4022
4244
|
);
|
|
4023
4245
|
}
|
|
4024
4246
|
);
|
|
4025
|
-
var CardTest =
|
|
4247
|
+
var CardTest = forwardRef7(
|
|
4026
4248
|
({
|
|
4027
4249
|
title,
|
|
4028
4250
|
duration,
|
|
@@ -4054,7 +4276,7 @@ var CardTest = forwardRef6(
|
|
|
4054
4276
|
const interactiveClasses = isSelectable ? "cursor-pointer focus:outline-none focus:ring-2 focus:ring-primary-950 focus:ring-offset-2" : "";
|
|
4055
4277
|
const selectedClasses = selected ? "ring-2 ring-primary-950 ring-offset-2" : "";
|
|
4056
4278
|
if (isSelectable) {
|
|
4057
|
-
return /* @__PURE__ */
|
|
4279
|
+
return /* @__PURE__ */ jsx21(
|
|
4058
4280
|
"button",
|
|
4059
4281
|
{
|
|
4060
4282
|
ref,
|
|
@@ -4066,8 +4288,8 @@ var CardTest = forwardRef6(
|
|
|
4066
4288
|
onKeyDown: handleKeyDown,
|
|
4067
4289
|
"aria-pressed": selected,
|
|
4068
4290
|
...props,
|
|
4069
|
-
children: /* @__PURE__ */
|
|
4070
|
-
/* @__PURE__ */
|
|
4291
|
+
children: /* @__PURE__ */ jsxs17("div", { className: "flex flex-col justify-between gap-[27px] flex-grow min-h-[67px] w-full min-w-0", children: [
|
|
4292
|
+
/* @__PURE__ */ jsx21(
|
|
4071
4293
|
Text_default,
|
|
4072
4294
|
{
|
|
4073
4295
|
size: "md",
|
|
@@ -4076,10 +4298,10 @@ var CardTest = forwardRef6(
|
|
|
4076
4298
|
children: title
|
|
4077
4299
|
}
|
|
4078
4300
|
),
|
|
4079
|
-
/* @__PURE__ */
|
|
4080
|
-
duration && /* @__PURE__ */
|
|
4081
|
-
/* @__PURE__ */
|
|
4082
|
-
/* @__PURE__ */
|
|
4301
|
+
/* @__PURE__ */ jsxs17("div", { className: "flex flex-row justify-start items-end gap-4 w-full", children: [
|
|
4302
|
+
duration && /* @__PURE__ */ jsxs17("div", { className: "flex flex-row items-center gap-1 flex-shrink-0", children: [
|
|
4303
|
+
/* @__PURE__ */ jsx21(Clock, { size: 16, className: "text-text-700" }),
|
|
4304
|
+
/* @__PURE__ */ jsx21(
|
|
4083
4305
|
Text_default,
|
|
4084
4306
|
{
|
|
4085
4307
|
size: "sm",
|
|
@@ -4088,7 +4310,7 @@ var CardTest = forwardRef6(
|
|
|
4088
4310
|
}
|
|
4089
4311
|
)
|
|
4090
4312
|
] }),
|
|
4091
|
-
/* @__PURE__ */
|
|
4313
|
+
/* @__PURE__ */ jsx21(
|
|
4092
4314
|
Text_default,
|
|
4093
4315
|
{
|
|
4094
4316
|
size: "sm",
|
|
@@ -4101,14 +4323,14 @@ var CardTest = forwardRef6(
|
|
|
4101
4323
|
}
|
|
4102
4324
|
);
|
|
4103
4325
|
}
|
|
4104
|
-
return /* @__PURE__ */
|
|
4326
|
+
return /* @__PURE__ */ jsx21(
|
|
4105
4327
|
"div",
|
|
4106
4328
|
{
|
|
4107
4329
|
ref,
|
|
4108
4330
|
className: cn(`${baseClasses} ${className}`.trim()),
|
|
4109
4331
|
...props,
|
|
4110
|
-
children: /* @__PURE__ */
|
|
4111
|
-
/* @__PURE__ */
|
|
4332
|
+
children: /* @__PURE__ */ jsxs17("div", { className: "flex flex-col justify-between gap-[27px] flex-grow min-h-[67px] w-full min-w-0", children: [
|
|
4333
|
+
/* @__PURE__ */ jsx21(
|
|
4112
4334
|
Text_default,
|
|
4113
4335
|
{
|
|
4114
4336
|
size: "md",
|
|
@@ -4117,10 +4339,10 @@ var CardTest = forwardRef6(
|
|
|
4117
4339
|
children: title
|
|
4118
4340
|
}
|
|
4119
4341
|
),
|
|
4120
|
-
/* @__PURE__ */
|
|
4121
|
-
duration && /* @__PURE__ */
|
|
4122
|
-
/* @__PURE__ */
|
|
4123
|
-
/* @__PURE__ */
|
|
4342
|
+
/* @__PURE__ */ jsxs17("div", { className: "flex flex-row justify-start items-end gap-4 w-full", children: [
|
|
4343
|
+
duration && /* @__PURE__ */ jsxs17("div", { className: "flex flex-row items-center gap-1 flex-shrink-0", children: [
|
|
4344
|
+
/* @__PURE__ */ jsx21(Clock, { size: 16, className: "text-text-700" }),
|
|
4345
|
+
/* @__PURE__ */ jsx21(
|
|
4124
4346
|
Text_default,
|
|
4125
4347
|
{
|
|
4126
4348
|
size: "sm",
|
|
@@ -4129,7 +4351,7 @@ var CardTest = forwardRef6(
|
|
|
4129
4351
|
}
|
|
4130
4352
|
)
|
|
4131
4353
|
] }),
|
|
4132
|
-
/* @__PURE__ */
|
|
4354
|
+
/* @__PURE__ */ jsx21(
|
|
4133
4355
|
Text_default,
|
|
4134
4356
|
{
|
|
4135
4357
|
size: "sm",
|
|
@@ -4165,15 +4387,15 @@ var SIMULATION_TYPE_STYLES = {
|
|
|
4165
4387
|
text: "Vestibular"
|
|
4166
4388
|
}
|
|
4167
4389
|
};
|
|
4168
|
-
var CardSimulationHistory =
|
|
4169
|
-
return /* @__PURE__ */
|
|
4390
|
+
var CardSimulationHistory = forwardRef7(({ data, onSimulationClick, className, ...props }, ref) => {
|
|
4391
|
+
return /* @__PURE__ */ jsx21(
|
|
4170
4392
|
"div",
|
|
4171
4393
|
{
|
|
4172
4394
|
ref,
|
|
4173
4395
|
className: cn("w-full max-w-[992px] h-auto", className),
|
|
4174
4396
|
...props,
|
|
4175
|
-
children: /* @__PURE__ */
|
|
4176
|
-
data.map((section, sectionIndex) => /* @__PURE__ */
|
|
4397
|
+
children: /* @__PURE__ */ jsxs17("div", { className: "flex flex-col gap-0", children: [
|
|
4398
|
+
data.map((section, sectionIndex) => /* @__PURE__ */ jsx21("div", { className: "flex flex-col", children: /* @__PURE__ */ jsxs17(
|
|
4177
4399
|
"div",
|
|
4178
4400
|
{
|
|
4179
4401
|
className: cn(
|
|
@@ -4181,7 +4403,7 @@ var CardSimulationHistory = forwardRef6(({ data, onSimulationClick, className, .
|
|
|
4181
4403
|
sectionIndex === 0 ? "rounded-t-3xl" : ""
|
|
4182
4404
|
),
|
|
4183
4405
|
children: [
|
|
4184
|
-
/* @__PURE__ */
|
|
4406
|
+
/* @__PURE__ */ jsx21(
|
|
4185
4407
|
Text_default,
|
|
4186
4408
|
{
|
|
4187
4409
|
size: "xs",
|
|
@@ -4190,9 +4412,9 @@ var CardSimulationHistory = forwardRef6(({ data, onSimulationClick, className, .
|
|
|
4190
4412
|
children: section.date
|
|
4191
4413
|
}
|
|
4192
4414
|
),
|
|
4193
|
-
/* @__PURE__ */
|
|
4415
|
+
/* @__PURE__ */ jsx21("div", { className: "flex flex-col gap-2 flex-1", children: section.simulations.map((simulation) => {
|
|
4194
4416
|
const typeStyles = SIMULATION_TYPE_STYLES[simulation.type];
|
|
4195
|
-
return /* @__PURE__ */
|
|
4417
|
+
return /* @__PURE__ */ jsx21(
|
|
4196
4418
|
CardBase,
|
|
4197
4419
|
{
|
|
4198
4420
|
layout: "horizontal",
|
|
@@ -4204,9 +4426,9 @@ var CardSimulationHistory = forwardRef6(({ data, onSimulationClick, className, .
|
|
|
4204
4426
|
transition-shadow duration-200 h-auto min-h-[61px]`
|
|
4205
4427
|
),
|
|
4206
4428
|
onClick: () => onSimulationClick?.(simulation),
|
|
4207
|
-
children: /* @__PURE__ */
|
|
4208
|
-
/* @__PURE__ */
|
|
4209
|
-
/* @__PURE__ */
|
|
4429
|
+
children: /* @__PURE__ */ jsxs17("div", { className: "flex justify-between items-center w-full gap-2", children: [
|
|
4430
|
+
/* @__PURE__ */ jsxs17("div", { className: "flex flex-wrap flex-col justify-between sm:flex-row gap-2 flex-1 min-w-0", children: [
|
|
4431
|
+
/* @__PURE__ */ jsx21(
|
|
4210
4432
|
Text_default,
|
|
4211
4433
|
{
|
|
4212
4434
|
size: "lg",
|
|
@@ -4215,8 +4437,8 @@ var CardSimulationHistory = forwardRef6(({ data, onSimulationClick, className, .
|
|
|
4215
4437
|
children: simulation.title
|
|
4216
4438
|
}
|
|
4217
4439
|
),
|
|
4218
|
-
/* @__PURE__ */
|
|
4219
|
-
/* @__PURE__ */
|
|
4440
|
+
/* @__PURE__ */ jsxs17("div", { className: "flex items-center gap-2", children: [
|
|
4441
|
+
/* @__PURE__ */ jsx21(
|
|
4220
4442
|
Badge_default,
|
|
4221
4443
|
{
|
|
4222
4444
|
variant: "examsOutlined",
|
|
@@ -4225,10 +4447,10 @@ var CardSimulationHistory = forwardRef6(({ data, onSimulationClick, className, .
|
|
|
4225
4447
|
children: typeStyles.text
|
|
4226
4448
|
}
|
|
4227
4449
|
),
|
|
4228
|
-
/* @__PURE__ */
|
|
4450
|
+
/* @__PURE__ */ jsx21(Text_default, { size: "sm", className: "text-text-800 truncate", children: simulation.info })
|
|
4229
4451
|
] })
|
|
4230
4452
|
] }),
|
|
4231
|
-
/* @__PURE__ */
|
|
4453
|
+
/* @__PURE__ */ jsx21(
|
|
4232
4454
|
CaretRight3,
|
|
4233
4455
|
{
|
|
4234
4456
|
size: 24,
|
|
@@ -4244,7 +4466,7 @@ var CardSimulationHistory = forwardRef6(({ data, onSimulationClick, className, .
|
|
|
4244
4466
|
]
|
|
4245
4467
|
}
|
|
4246
4468
|
) }, section.date)),
|
|
4247
|
-
data.length > 0 && /* @__PURE__ */
|
|
4469
|
+
data.length > 0 && /* @__PURE__ */ jsx21("div", { className: "w-full h-6 bg-background rounded-b-3xl" })
|
|
4248
4470
|
] })
|
|
4249
4471
|
}
|
|
4250
4472
|
);
|
|
@@ -4252,14 +4474,14 @@ var CardSimulationHistory = forwardRef6(({ data, onSimulationClick, className, .
|
|
|
4252
4474
|
|
|
4253
4475
|
// src/components/Accordation/Accordation.tsx
|
|
4254
4476
|
import {
|
|
4255
|
-
forwardRef as
|
|
4477
|
+
forwardRef as forwardRef8,
|
|
4256
4478
|
useId as useId4,
|
|
4257
4479
|
useState as useState8,
|
|
4258
4480
|
useEffect as useEffect9
|
|
4259
4481
|
} from "react";
|
|
4260
4482
|
import { CaretRight as CaretRight4 } from "phosphor-react";
|
|
4261
|
-
import { jsx as
|
|
4262
|
-
var CardAccordation =
|
|
4483
|
+
import { jsx as jsx22, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
4484
|
+
var CardAccordation = forwardRef8(
|
|
4263
4485
|
({
|
|
4264
4486
|
trigger,
|
|
4265
4487
|
children,
|
|
@@ -4297,7 +4519,7 @@ var CardAccordation = forwardRef7(
|
|
|
4297
4519
|
handleToggle();
|
|
4298
4520
|
}
|
|
4299
4521
|
};
|
|
4300
|
-
return /* @__PURE__ */
|
|
4522
|
+
return /* @__PURE__ */ jsxs18(
|
|
4301
4523
|
CardBase,
|
|
4302
4524
|
{
|
|
4303
4525
|
ref,
|
|
@@ -4307,7 +4529,7 @@ var CardAccordation = forwardRef7(
|
|
|
4307
4529
|
className: cn("overflow-hidden", className),
|
|
4308
4530
|
...props,
|
|
4309
4531
|
children: [
|
|
4310
|
-
/* @__PURE__ */
|
|
4532
|
+
/* @__PURE__ */ jsxs18(
|
|
4311
4533
|
"button",
|
|
4312
4534
|
{
|
|
4313
4535
|
id: headerId,
|
|
@@ -4325,7 +4547,7 @@ var CardAccordation = forwardRef7(
|
|
|
4325
4547
|
"data-value": value,
|
|
4326
4548
|
children: [
|
|
4327
4549
|
trigger,
|
|
4328
|
-
/* @__PURE__ */
|
|
4550
|
+
/* @__PURE__ */ jsx22(
|
|
4329
4551
|
CaretRight4,
|
|
4330
4552
|
{
|
|
4331
4553
|
size: 20,
|
|
@@ -4340,7 +4562,7 @@ var CardAccordation = forwardRef7(
|
|
|
4340
4562
|
]
|
|
4341
4563
|
}
|
|
4342
4564
|
),
|
|
4343
|
-
/* @__PURE__ */
|
|
4565
|
+
/* @__PURE__ */ jsx22(
|
|
4344
4566
|
"section",
|
|
4345
4567
|
{
|
|
4346
4568
|
id: contentId,
|
|
@@ -4352,7 +4574,7 @@ var CardAccordation = forwardRef7(
|
|
|
4352
4574
|
),
|
|
4353
4575
|
"data-testid": "accordion-content",
|
|
4354
4576
|
"data-value": value,
|
|
4355
|
-
children: /* @__PURE__ */
|
|
4577
|
+
children: /* @__PURE__ */ jsx22("div", { className: "p-4 pt-0", children })
|
|
4356
4578
|
}
|
|
4357
4579
|
)
|
|
4358
4580
|
]
|
|
@@ -4365,15 +4587,15 @@ CardAccordation.displayName = "CardAccordation";
|
|
|
4365
4587
|
// src/components/Accordation/AccordionGroup.tsx
|
|
4366
4588
|
import {
|
|
4367
4589
|
Children as Children3,
|
|
4368
|
-
cloneElement as
|
|
4369
|
-
forwardRef as
|
|
4590
|
+
cloneElement as cloneElement3,
|
|
4591
|
+
forwardRef as forwardRef9,
|
|
4370
4592
|
isValidElement as isValidElement3,
|
|
4371
4593
|
useEffect as useEffect10,
|
|
4372
4594
|
useRef as useRef4,
|
|
4373
4595
|
useState as useState9
|
|
4374
4596
|
} from "react";
|
|
4375
4597
|
import { create as create3 } from "zustand";
|
|
4376
|
-
import { jsx as
|
|
4598
|
+
import { jsx as jsx23 } from "react/jsx-runtime";
|
|
4377
4599
|
function createAccordionGroupStore(type, initialValue, collapsible) {
|
|
4378
4600
|
return create3((set, get) => ({
|
|
4379
4601
|
type,
|
|
@@ -4419,16 +4641,16 @@ var injectStore2 = (children, store, indexRef, onItemToggle) => {
|
|
|
4419
4641
|
if (displayName === "CardAccordation") {
|
|
4420
4642
|
newProps.children = processedChildren;
|
|
4421
4643
|
} else if (processedChildren !== typedChild.props.children) {
|
|
4422
|
-
return
|
|
4644
|
+
return cloneElement3(typedChild, { children: processedChildren });
|
|
4423
4645
|
}
|
|
4424
4646
|
}
|
|
4425
4647
|
if (Object.keys(newProps).length > 0) {
|
|
4426
|
-
return
|
|
4648
|
+
return cloneElement3(typedChild, newProps);
|
|
4427
4649
|
}
|
|
4428
4650
|
return child;
|
|
4429
4651
|
});
|
|
4430
4652
|
};
|
|
4431
|
-
var AccordionGroup =
|
|
4653
|
+
var AccordionGroup = forwardRef9(
|
|
4432
4654
|
({
|
|
4433
4655
|
type = "single",
|
|
4434
4656
|
defaultValue,
|
|
@@ -4513,13 +4735,13 @@ var AccordionGroup = forwardRef8(
|
|
|
4513
4735
|
indexRef,
|
|
4514
4736
|
handleItemToggle
|
|
4515
4737
|
);
|
|
4516
|
-
return /* @__PURE__ */
|
|
4738
|
+
return /* @__PURE__ */ jsx23("div", { ref, className, ...props, children: enhancedChildren });
|
|
4517
4739
|
}
|
|
4518
4740
|
);
|
|
4519
4741
|
AccordionGroup.displayName = "AccordionGroup";
|
|
4520
4742
|
|
|
4521
4743
|
// src/components/CheckBoxGroup/CheckBoxGroup.tsx
|
|
4522
|
-
import { jsx as
|
|
4744
|
+
import { jsx as jsx24, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
4523
4745
|
var CheckboxGroup = ({
|
|
4524
4746
|
categories,
|
|
4525
4747
|
onCategoriesChange
|
|
@@ -4807,7 +5029,7 @@ var CheckboxGroup = ({
|
|
|
4807
5029
|
};
|
|
4808
5030
|
const renderCheckboxItem = (item, categoryKey) => {
|
|
4809
5031
|
const uniqueId = `${categoryKey}-${item.id}`;
|
|
4810
|
-
return /* @__PURE__ */
|
|
5032
|
+
return /* @__PURE__ */ jsxs19(
|
|
4811
5033
|
"div",
|
|
4812
5034
|
{
|
|
4813
5035
|
className: "flex items-center gap-3 px-2",
|
|
@@ -4817,7 +5039,7 @@ var CheckboxGroup = ({
|
|
|
4817
5039
|
onMouseUp: (e) => e.stopPropagation(),
|
|
4818
5040
|
onKeyDown: (e) => e.stopPropagation(),
|
|
4819
5041
|
children: [
|
|
4820
|
-
/* @__PURE__ */
|
|
5042
|
+
/* @__PURE__ */ jsx24(
|
|
4821
5043
|
CheckBox_default,
|
|
4822
5044
|
{
|
|
4823
5045
|
id: uniqueId,
|
|
@@ -4825,7 +5047,7 @@ var CheckboxGroup = ({
|
|
|
4825
5047
|
onChange: () => toggleItem(categoryKey, item.id)
|
|
4826
5048
|
}
|
|
4827
5049
|
),
|
|
4828
|
-
/* @__PURE__ */
|
|
5050
|
+
/* @__PURE__ */ jsx24(
|
|
4829
5051
|
"label",
|
|
4830
5052
|
{
|
|
4831
5053
|
htmlFor: uniqueId,
|
|
@@ -4838,12 +5060,12 @@ var CheckboxGroup = ({
|
|
|
4838
5060
|
item.id
|
|
4839
5061
|
);
|
|
4840
5062
|
};
|
|
4841
|
-
const renderFormattedGroup = (formattedGroup, idx, categoryKey) => /* @__PURE__ */
|
|
5063
|
+
const renderFormattedGroup = (formattedGroup, idx, categoryKey) => /* @__PURE__ */ jsxs19(
|
|
4842
5064
|
"div",
|
|
4843
5065
|
{
|
|
4844
5066
|
className: "flex flex-col gap-3",
|
|
4845
5067
|
children: [
|
|
4846
|
-
"groupLabel" in formattedGroup && formattedGroup.groupLabel && /* @__PURE__ */
|
|
5068
|
+
"groupLabel" in formattedGroup && formattedGroup.groupLabel && /* @__PURE__ */ jsx24(Text_default, { size: "sm", className: "mt-2", weight: "semibold", children: formattedGroup.groupLabel }),
|
|
4847
5069
|
formattedGroup.itens?.map(
|
|
4848
5070
|
(item) => renderCheckboxItem(item, categoryKey)
|
|
4849
5071
|
)
|
|
@@ -4851,9 +5073,9 @@ var CheckboxGroup = ({
|
|
|
4851
5073
|
},
|
|
4852
5074
|
formattedGroup.groupLabel || `group-${idx}`
|
|
4853
5075
|
);
|
|
4854
|
-
const renderAccordionTrigger = (category, isEnabled) => /* @__PURE__ */
|
|
4855
|
-
/* @__PURE__ */
|
|
4856
|
-
/* @__PURE__ */
|
|
5076
|
+
const renderAccordionTrigger = (category, isEnabled) => /* @__PURE__ */ jsxs19("div", { className: "flex items-center justify-between w-full p-2", children: [
|
|
5077
|
+
/* @__PURE__ */ jsxs19("div", { className: "flex items-center gap-3", children: [
|
|
5078
|
+
/* @__PURE__ */ jsx24(
|
|
4857
5079
|
CheckBox_default,
|
|
4858
5080
|
{
|
|
4859
5081
|
checked: isMinimalOneCheckBoxIsSelected(category.key),
|
|
@@ -4862,7 +5084,7 @@ var CheckboxGroup = ({
|
|
|
4862
5084
|
onChange: () => toggleAllInCategory(category.key)
|
|
4863
5085
|
}
|
|
4864
5086
|
),
|
|
4865
|
-
/* @__PURE__ */
|
|
5087
|
+
/* @__PURE__ */ jsx24(
|
|
4866
5088
|
Text_default,
|
|
4867
5089
|
{
|
|
4868
5090
|
size: "sm",
|
|
@@ -4872,7 +5094,7 @@ var CheckboxGroup = ({
|
|
|
4872
5094
|
}
|
|
4873
5095
|
)
|
|
4874
5096
|
] }),
|
|
4875
|
-
(openAccordion === category.key || isEnabled) && /* @__PURE__ */
|
|
5097
|
+
(openAccordion === category.key || isEnabled) && /* @__PURE__ */ jsx24(Badge_default, { variant: "solid", action: "info", children: (() => {
|
|
4876
5098
|
const visibleIds = getFormattedItems(category.key).flatMap((group) => group.itens || []).map((i) => i.id);
|
|
4877
5099
|
const selectedVisibleCount = visibleIds.filter(
|
|
4878
5100
|
(id) => category.selectedIds?.includes(id)
|
|
@@ -4894,8 +5116,8 @@ var CheckboxGroup = ({
|
|
|
4894
5116
|
const hasNoItems = formattedItems.every(
|
|
4895
5117
|
(group) => !group.itens || group.itens.length === 0
|
|
4896
5118
|
);
|
|
4897
|
-
return /* @__PURE__ */
|
|
4898
|
-
/* @__PURE__ */
|
|
5119
|
+
return /* @__PURE__ */ jsxs19("div", { children: [
|
|
5120
|
+
/* @__PURE__ */ jsx24(
|
|
4899
5121
|
CardAccordation,
|
|
4900
5122
|
{
|
|
4901
5123
|
value: category.key,
|
|
@@ -4905,12 +5127,12 @@ var CheckboxGroup = ({
|
|
|
4905
5127
|
openAccordion === category.key && "bg-background-50 border-none"
|
|
4906
5128
|
),
|
|
4907
5129
|
trigger: renderAccordionTrigger(category, isEnabled),
|
|
4908
|
-
children: /* @__PURE__ */
|
|
5130
|
+
children: /* @__PURE__ */ jsx24("div", { className: "flex flex-col gap-3 pt-2", children: hasNoItems && isEnabled ? /* @__PURE__ */ jsx24("div", { className: "px-2 py-4", children: /* @__PURE__ */ jsx24(Text_default, { size: "sm", className: "text-text-500 text-center", children: "Sem dados" }) }) : formattedItems.map(
|
|
4909
5131
|
(formattedGroup, idx) => renderFormattedGroup(formattedGroup, idx, category.key)
|
|
4910
5132
|
) })
|
|
4911
5133
|
}
|
|
4912
5134
|
),
|
|
4913
|
-
openAccordion !== category.key && /* @__PURE__ */
|
|
5135
|
+
openAccordion !== category.key && /* @__PURE__ */ jsx24(Divider_default, {})
|
|
4914
5136
|
] }, category.key);
|
|
4915
5137
|
};
|
|
4916
5138
|
useEffect11(() => {
|
|
@@ -4927,7 +5149,7 @@ var CheckboxGroup = ({
|
|
|
4927
5149
|
}, 0);
|
|
4928
5150
|
}
|
|
4929
5151
|
}, [categories, openAccordion]);
|
|
4930
|
-
return /* @__PURE__ */
|
|
5152
|
+
return /* @__PURE__ */ jsx24(
|
|
4931
5153
|
AccordionGroup,
|
|
4932
5154
|
{
|
|
4933
5155
|
type: "single",
|
|
@@ -4954,7 +5176,7 @@ var CheckboxGroup = ({
|
|
|
4954
5176
|
};
|
|
4955
5177
|
|
|
4956
5178
|
// src/components/Filter/FilterModal.tsx
|
|
4957
|
-
import { jsx as
|
|
5179
|
+
import { jsx as jsx25, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
4958
5180
|
var FilterModal = ({
|
|
4959
5181
|
isOpen,
|
|
4960
5182
|
onClose,
|
|
@@ -4982,20 +5204,20 @@ var FilterModal = ({
|
|
|
4982
5204
|
const handleClear = () => {
|
|
4983
5205
|
onClear();
|
|
4984
5206
|
};
|
|
4985
|
-
return /* @__PURE__ */
|
|
5207
|
+
return /* @__PURE__ */ jsx25(
|
|
4986
5208
|
Modal_default,
|
|
4987
5209
|
{
|
|
4988
5210
|
isOpen,
|
|
4989
5211
|
onClose,
|
|
4990
5212
|
title,
|
|
4991
5213
|
size,
|
|
4992
|
-
footer: /* @__PURE__ */
|
|
4993
|
-
/* @__PURE__ */
|
|
4994
|
-
/* @__PURE__ */
|
|
5214
|
+
footer: /* @__PURE__ */ jsxs20("div", { className: "flex gap-3 justify-end w-full", children: [
|
|
5215
|
+
/* @__PURE__ */ jsx25(Button_default, { variant: "outline", onClick: handleClear, children: clearLabel }),
|
|
5216
|
+
/* @__PURE__ */ jsx25(Button_default, { onClick: handleApply, children: applyLabel })
|
|
4995
5217
|
] }),
|
|
4996
|
-
children: /* @__PURE__ */
|
|
4997
|
-
/* @__PURE__ */
|
|
4998
|
-
config.key === "academic" && /* @__PURE__ */
|
|
5218
|
+
children: /* @__PURE__ */ jsx25("div", { className: "flex flex-col gap-6", children: filterConfigs.map((config, index) => /* @__PURE__ */ jsxs20("div", { className: "flex flex-col gap-4", children: [
|
|
5219
|
+
/* @__PURE__ */ jsxs20("div", { className: "flex items-center gap-2 text-text-400 text-sm font-medium uppercase", children: [
|
|
5220
|
+
config.key === "academic" && /* @__PURE__ */ jsxs20(
|
|
4999
5221
|
"svg",
|
|
5000
5222
|
{
|
|
5001
5223
|
width: "16",
|
|
@@ -5005,7 +5227,7 @@ var FilterModal = ({
|
|
|
5005
5227
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5006
5228
|
className: "text-text-400",
|
|
5007
5229
|
children: [
|
|
5008
|
-
/* @__PURE__ */
|
|
5230
|
+
/* @__PURE__ */ jsx25(
|
|
5009
5231
|
"path",
|
|
5010
5232
|
{
|
|
5011
5233
|
d: "M8 2L2 5.33333L8 8.66667L14 5.33333L8 2Z",
|
|
@@ -5015,7 +5237,7 @@ var FilterModal = ({
|
|
|
5015
5237
|
strokeLinejoin: "round"
|
|
5016
5238
|
}
|
|
5017
5239
|
),
|
|
5018
|
-
/* @__PURE__ */
|
|
5240
|
+
/* @__PURE__ */ jsx25(
|
|
5019
5241
|
"path",
|
|
5020
5242
|
{
|
|
5021
5243
|
d: "M2 10.6667L8 14L14 10.6667",
|
|
@@ -5025,7 +5247,7 @@ var FilterModal = ({
|
|
|
5025
5247
|
strokeLinejoin: "round"
|
|
5026
5248
|
}
|
|
5027
5249
|
),
|
|
5028
|
-
/* @__PURE__ */
|
|
5250
|
+
/* @__PURE__ */ jsx25(
|
|
5029
5251
|
"path",
|
|
5030
5252
|
{
|
|
5031
5253
|
d: "M2 8L8 11.3333L14 8",
|
|
@@ -5038,7 +5260,7 @@ var FilterModal = ({
|
|
|
5038
5260
|
]
|
|
5039
5261
|
}
|
|
5040
5262
|
),
|
|
5041
|
-
config.key === "content" && /* @__PURE__ */
|
|
5263
|
+
config.key === "content" && /* @__PURE__ */ jsxs20(
|
|
5042
5264
|
"svg",
|
|
5043
5265
|
{
|
|
5044
5266
|
width: "16",
|
|
@@ -5048,7 +5270,7 @@ var FilterModal = ({
|
|
|
5048
5270
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5049
5271
|
className: "text-text-400",
|
|
5050
5272
|
children: [
|
|
5051
|
-
/* @__PURE__ */
|
|
5273
|
+
/* @__PURE__ */ jsx25(
|
|
5052
5274
|
"path",
|
|
5053
5275
|
{
|
|
5054
5276
|
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 +5280,7 @@ var FilterModal = ({
|
|
|
5058
5280
|
strokeLinejoin: "round"
|
|
5059
5281
|
}
|
|
5060
5282
|
),
|
|
5061
|
-
/* @__PURE__ */
|
|
5283
|
+
/* @__PURE__ */ jsx25(
|
|
5062
5284
|
"path",
|
|
5063
5285
|
{
|
|
5064
5286
|
d: "M2 6H14",
|
|
@@ -5068,7 +5290,7 @@ var FilterModal = ({
|
|
|
5068
5290
|
strokeLinejoin: "round"
|
|
5069
5291
|
}
|
|
5070
5292
|
),
|
|
5071
|
-
/* @__PURE__ */
|
|
5293
|
+
/* @__PURE__ */ jsx25(
|
|
5072
5294
|
"path",
|
|
5073
5295
|
{
|
|
5074
5296
|
d: "M6 2V14",
|
|
@@ -5081,9 +5303,9 @@ var FilterModal = ({
|
|
|
5081
5303
|
]
|
|
5082
5304
|
}
|
|
5083
5305
|
),
|
|
5084
|
-
/* @__PURE__ */
|
|
5306
|
+
/* @__PURE__ */ jsx25("span", { children: config.label })
|
|
5085
5307
|
] }),
|
|
5086
|
-
/* @__PURE__ */
|
|
5308
|
+
/* @__PURE__ */ jsx25(
|
|
5087
5309
|
CheckboxGroup,
|
|
5088
5310
|
{
|
|
5089
5311
|
categories: config.categories,
|
|
@@ -5097,7 +5319,7 @@ var FilterModal = ({
|
|
|
5097
5319
|
|
|
5098
5320
|
// src/components/TableProvider/TableProvider.tsx
|
|
5099
5321
|
import { Funnel } from "phosphor-react";
|
|
5100
|
-
import { Fragment as Fragment5, jsx as
|
|
5322
|
+
import { Fragment as Fragment5, jsx as jsx26, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
5101
5323
|
function TableProvider({
|
|
5102
5324
|
data,
|
|
5103
5325
|
headers,
|
|
@@ -5111,7 +5333,9 @@ function TableProvider({
|
|
|
5111
5333
|
initialFilters = [],
|
|
5112
5334
|
paginationConfig = {},
|
|
5113
5335
|
searchPlaceholder = "Buscar...",
|
|
5114
|
-
|
|
5336
|
+
emptyState,
|
|
5337
|
+
loadingState,
|
|
5338
|
+
noSearchResultState,
|
|
5115
5339
|
rowKey,
|
|
5116
5340
|
onParamsChange,
|
|
5117
5341
|
onRowClick,
|
|
@@ -5230,22 +5454,25 @@ function TableProvider({
|
|
|
5230
5454
|
const start = (currentPage - 1) * itemsPerPage;
|
|
5231
5455
|
return sortedData.slice(start, start + itemsPerPage);
|
|
5232
5456
|
}, [useInternalPagination, sortedData, currentPage, itemsPerPage]);
|
|
5233
|
-
const isEmpty =
|
|
5234
|
-
const
|
|
5235
|
-
|
|
5457
|
+
const isEmpty = data.length === 0;
|
|
5458
|
+
const showLoading = loading;
|
|
5459
|
+
const showNoSearchResult = !loading && data.length === 0 && searchQuery.trim() !== "";
|
|
5460
|
+
const showEmpty = !loading && data.length === 0 && searchQuery.trim() === "";
|
|
5461
|
+
const controls = (enableSearch || enableFilters) && /* @__PURE__ */ jsxs21("div", { className: "flex items-center gap-4", children: [
|
|
5462
|
+
enableFilters && /* @__PURE__ */ jsxs21(
|
|
5236
5463
|
Button_default,
|
|
5237
5464
|
{
|
|
5238
5465
|
variant: "outline",
|
|
5239
5466
|
size: "medium",
|
|
5240
5467
|
onClick: () => setIsFilterModalOpen(true),
|
|
5241
5468
|
children: [
|
|
5242
|
-
/* @__PURE__ */
|
|
5469
|
+
/* @__PURE__ */ jsx26(Funnel, { size: 20 }),
|
|
5243
5470
|
"Filtros",
|
|
5244
|
-
hasActiveFilters && /* @__PURE__ */
|
|
5471
|
+
hasActiveFilters && /* @__PURE__ */ jsx26("span", { className: "ml-2 rounded-full bg-primary-500 px-2 py-0.5 text-xs text-white", children: Object.keys(activeFilters).length })
|
|
5245
5472
|
]
|
|
5246
5473
|
}
|
|
5247
5474
|
),
|
|
5248
|
-
enableSearch && /* @__PURE__ */
|
|
5475
|
+
enableSearch && /* @__PURE__ */ jsx26("div", { className: "flex-1", children: /* @__PURE__ */ jsx26(
|
|
5249
5476
|
Search_default,
|
|
5250
5477
|
{
|
|
5251
5478
|
value: searchQuery,
|
|
@@ -5256,18 +5483,22 @@ function TableProvider({
|
|
|
5256
5483
|
}
|
|
5257
5484
|
) })
|
|
5258
5485
|
] });
|
|
5259
|
-
const table = /* @__PURE__ */
|
|
5486
|
+
const table = /* @__PURE__ */ jsx26("div", { className: "w-full overflow-x-auto", children: /* @__PURE__ */ jsxs21(
|
|
5260
5487
|
Table_default,
|
|
5261
5488
|
{
|
|
5262
5489
|
variant,
|
|
5263
|
-
|
|
5264
|
-
|
|
5490
|
+
showLoading,
|
|
5491
|
+
loadingState,
|
|
5492
|
+
showNoSearchResult,
|
|
5493
|
+
noSearchResultState,
|
|
5494
|
+
showEmpty,
|
|
5495
|
+
emptyState,
|
|
5265
5496
|
children: [
|
|
5266
|
-
/* @__PURE__ */
|
|
5497
|
+
/* @__PURE__ */ jsx26("thead", { children: /* @__PURE__ */ jsx26(
|
|
5267
5498
|
TableRow,
|
|
5268
5499
|
{
|
|
5269
5500
|
variant: variant === "borderless" ? "defaultBorderless" : "default",
|
|
5270
|
-
children: headers.map((header, index) => /* @__PURE__ */
|
|
5501
|
+
children: headers.map((header, index) => /* @__PURE__ */ jsx26(
|
|
5271
5502
|
TableHead,
|
|
5272
5503
|
{
|
|
5273
5504
|
sortable: enableTableSort && header.sortable,
|
|
@@ -5281,7 +5512,7 @@ function TableProvider({
|
|
|
5281
5512
|
))
|
|
5282
5513
|
}
|
|
5283
5514
|
) }),
|
|
5284
|
-
/* @__PURE__ */
|
|
5515
|
+
/* @__PURE__ */ jsx26(TableBody, { children: loading ? /* @__PURE__ */ jsx26(TableRow, { children: /* @__PURE__ */ jsx26(TableCell, { colSpan: headers.length, className: "text-center py-8", children: /* @__PURE__ */ jsx26("span", { className: "text-text-400 text-sm", children: "Carregando..." }) }) }) : displayData.map((row, rowIndex) => {
|
|
5285
5516
|
const effectiveIndex = useInternalPagination ? (currentPage - 1) * itemsPerPage + rowIndex : rowIndex;
|
|
5286
5517
|
const rowKeyValue = rowKey ? (() => {
|
|
5287
5518
|
const keyValue = row[rowKey];
|
|
@@ -5293,7 +5524,7 @@ function TableProvider({
|
|
|
5293
5524
|
}
|
|
5294
5525
|
return String(keyValue);
|
|
5295
5526
|
})() : `row-${effectiveIndex}`;
|
|
5296
|
-
return /* @__PURE__ */
|
|
5527
|
+
return /* @__PURE__ */ jsx26(
|
|
5297
5528
|
TableRow,
|
|
5298
5529
|
{
|
|
5299
5530
|
variant: variant === "borderless" ? "defaultBorderless" : "default",
|
|
@@ -5314,7 +5545,7 @@ function TableProvider({
|
|
|
5314
5545
|
}
|
|
5315
5546
|
}
|
|
5316
5547
|
const content = header.render ? header.render(value, row, effectiveIndex) : defaultContent;
|
|
5317
|
-
return /* @__PURE__ */
|
|
5548
|
+
return /* @__PURE__ */ jsx26(
|
|
5318
5549
|
TableCell,
|
|
5319
5550
|
{
|
|
5320
5551
|
className: header.className,
|
|
@@ -5333,7 +5564,7 @@ function TableProvider({
|
|
|
5333
5564
|
]
|
|
5334
5565
|
}
|
|
5335
5566
|
) });
|
|
5336
|
-
const pagination = enablePagination && !isEmpty && /* @__PURE__ */
|
|
5567
|
+
const pagination = enablePagination && !isEmpty && /* @__PURE__ */ jsx26("div", { className: "flex justify-end", children: /* @__PURE__ */ jsx26(
|
|
5337
5568
|
TablePagination_default,
|
|
5338
5569
|
{
|
|
5339
5570
|
currentPage,
|
|
@@ -5347,9 +5578,9 @@ function TableProvider({
|
|
|
5347
5578
|
}
|
|
5348
5579
|
) });
|
|
5349
5580
|
if (children) {
|
|
5350
|
-
return /* @__PURE__ */
|
|
5581
|
+
return /* @__PURE__ */ jsxs21(Fragment5, { children: [
|
|
5351
5582
|
children({ controls, table, pagination }),
|
|
5352
|
-
enableFilters && /* @__PURE__ */
|
|
5583
|
+
enableFilters && /* @__PURE__ */ jsx26(
|
|
5353
5584
|
FilterModal,
|
|
5354
5585
|
{
|
|
5355
5586
|
isOpen: isFilterModalOpen,
|
|
@@ -5362,11 +5593,11 @@ function TableProvider({
|
|
|
5362
5593
|
)
|
|
5363
5594
|
] });
|
|
5364
5595
|
}
|
|
5365
|
-
return /* @__PURE__ */
|
|
5596
|
+
return /* @__PURE__ */ jsxs21("div", { className: "w-full space-y-4", children: [
|
|
5366
5597
|
controls,
|
|
5367
5598
|
table,
|
|
5368
5599
|
pagination,
|
|
5369
|
-
enableFilters && /* @__PURE__ */
|
|
5600
|
+
enableFilters && /* @__PURE__ */ jsx26(
|
|
5370
5601
|
FilterModal,
|
|
5371
5602
|
{
|
|
5372
5603
|
isOpen: isFilterModalOpen,
|