analytica-frontend-lib 1.2.78 → 1.2.79
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/ActivitiesHistory/index.js +485 -418
- package/dist/ActivitiesHistory/index.js.map +1 -1
- package/dist/ActivitiesHistory/index.mjs +478 -411
- package/dist/ActivitiesHistory/index.mjs.map +1 -1
- package/dist/RecommendedLessonsHistory/index.d.ts +1 -1
- package/dist/RecommendedLessonsHistory/index.d.ts.map +1 -1
- package/dist/RecommendedLessonsHistory/index.js +1183 -381
- package/dist/RecommendedLessonsHistory/index.js.map +1 -1
- package/dist/RecommendedLessonsHistory/index.mjs +1176 -372
- package/dist/RecommendedLessonsHistory/index.mjs.map +1 -1
- package/dist/SendActivityModal/SendActivityModal.d.ts.map +1 -1
- package/dist/SendActivityModal/SendActivityModal.js +4261 -4117
- package/dist/SendActivityModal/SendActivityModal.js.map +1 -1
- package/dist/SendActivityModal/SendActivityModal.mjs +4282 -4139
- package/dist/SendActivityModal/SendActivityModal.mjs.map +1 -1
- package/dist/SendActivityModal/hooks/useSendActivityModal.d.ts.map +1 -1
- package/dist/SendActivityModal/hooks/useSendActivityModal.js +16 -18
- package/dist/SendActivityModal/hooks/useSendActivityModal.js.map +1 -1
- package/dist/SendActivityModal/hooks/useSendActivityModal.mjs +16 -18
- package/dist/SendActivityModal/hooks/useSendActivityModal.mjs.map +1 -1
- package/dist/SendActivityModal/index.js +1285 -1141
- package/dist/SendActivityModal/index.js.map +1 -1
- package/dist/SendActivityModal/index.mjs +1164 -1021
- package/dist/SendActivityModal/index.mjs.map +1 -1
- package/dist/hooks/useGoalModels.d.ts +171 -0
- package/dist/hooks/useGoalModels.d.ts.map +1 -0
- package/dist/index.d.ts +9 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1864 -1716
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1896 -1765
- package/dist/index.mjs.map +1 -1
- package/dist/types/recommendedLessons/index.d.ts +61 -0
- package/dist/types/recommendedLessons/index.d.ts.map +1 -1
- package/dist/types/recommendedLessons/index.js +7 -0
- package/dist/types/recommendedLessons/index.js.map +1 -1
- package/dist/types/recommendedLessons/index.mjs +6 -0
- package/dist/types/recommendedLessons/index.mjs.map +1 -1
- package/dist/types/recommendedLessons.d.ts +61 -0
- package/dist/types/recommendedLessons.d.ts.map +1 -1
- package/dist/utils/extractStudentsFromCategories.d.ts +15 -0
- package/dist/utils/extractStudentsFromCategories.d.ts.map +1 -0
- package/dist/utils/renderSubjectCell.d.ts +11 -0
- package/dist/utils/renderSubjectCell.d.ts.map +1 -0
- package/package.json +3 -2
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
// src/components/SendActivityModal/SendActivityModal.tsx
|
|
2
|
-
import { useCallback, useEffect as useEffect11, useRef as useRef8 } from "react";
|
|
3
|
-
import {
|
|
4
|
-
CaretLeftIcon,
|
|
5
|
-
ArrowRightIcon,
|
|
6
|
-
PaperPlaneTiltIcon,
|
|
7
|
-
WarningCircleIcon
|
|
8
|
-
} from "@phosphor-icons/react";
|
|
2
|
+
import { useCallback as useCallback2, useEffect as useEffect11, useRef as useRef8 } from "react";
|
|
9
3
|
|
|
10
4
|
// src/components/Modal/Modal.tsx
|
|
11
5
|
import { useEffect, useId } from "react";
|
|
@@ -1431,208 +1425,531 @@ var RadioGroupItem = forwardRef3(
|
|
|
1431
1425
|
);
|
|
1432
1426
|
RadioGroupItem.displayName = "RadioGroupItem";
|
|
1433
1427
|
|
|
1434
|
-
// src/components/
|
|
1435
|
-
import {
|
|
1428
|
+
// src/components/SendActivityModal/hooks/useSendActivityModal.ts
|
|
1429
|
+
import { create as create2 } from "zustand";
|
|
1436
1430
|
|
|
1437
|
-
// src/components/
|
|
1438
|
-
import {
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
muted: "bg-background-muted text-background-800 focus-visible:outline-none"
|
|
1447
|
-
},
|
|
1448
|
-
outlined: {
|
|
1449
|
-
error: "bg-error text-error-700 border border-error-300 focus-visible:outline-none",
|
|
1450
|
-
warning: "bg-warning text-warning-800 border border-warning-300 focus-visible:outline-none",
|
|
1451
|
-
success: "bg-success text-success-800 border border-success-300 focus-visible:outline-none",
|
|
1452
|
-
info: "bg-info text-info-800 border border-info-300 focus-visible:outline-none",
|
|
1453
|
-
muted: "bg-background-muted text-background-800 border border-border-300 focus-visible:outline-none"
|
|
1454
|
-
},
|
|
1455
|
-
exams: {
|
|
1456
|
-
exam1: "bg-exam-1 text-info-700 focus-visible:outline-none",
|
|
1457
|
-
exam2: "bg-exam-2 text-typography-1 focus-visible:outline-none",
|
|
1458
|
-
exam3: "bg-exam-3 text-typography-2 focus-visible:outline-none",
|
|
1459
|
-
exam4: "bg-exam-4 text-success-700 focus-visible:outline-none"
|
|
1460
|
-
},
|
|
1461
|
-
examsOutlined: {
|
|
1462
|
-
exam1: "bg-exam-1 text-info-700 border border-info-700 focus-visible:outline-none",
|
|
1463
|
-
exam2: "bg-exam-2 text-typography-1 border border-typography-1 focus-visible:outline-none",
|
|
1464
|
-
exam3: "bg-exam-3 text-typography-2 border border-typography-2 focus-visible:outline-none",
|
|
1465
|
-
exam4: "bg-exam-4 text-success-700 border border-success-700 focus-visible:outline-none"
|
|
1466
|
-
},
|
|
1467
|
-
resultStatus: {
|
|
1468
|
-
negative: "bg-error text-error-800 focus-visible:outline-none",
|
|
1469
|
-
positive: "bg-success text-success-800 focus-visible:outline-none"
|
|
1470
|
-
},
|
|
1471
|
-
notification: "text-primary"
|
|
1472
|
-
};
|
|
1473
|
-
var SIZE_CLASSES7 = {
|
|
1474
|
-
small: "text-2xs px-2 py-1",
|
|
1475
|
-
medium: "text-xs px-2 py-1",
|
|
1476
|
-
large: "text-sm px-2 py-1"
|
|
1477
|
-
};
|
|
1478
|
-
var SIZE_CLASSES_ICON = {
|
|
1479
|
-
small: "size-3",
|
|
1480
|
-
medium: "size-3.5",
|
|
1481
|
-
large: "size-4"
|
|
1431
|
+
// src/components/SendActivityModal/validation.ts
|
|
1432
|
+
import { z } from "zod";
|
|
1433
|
+
var ERROR_MESSAGES = {
|
|
1434
|
+
SUBTYPE_REQUIRED: "Campo obrigat\xF3rio! Por favor, selecione uma op\xE7\xE3o para continuar.",
|
|
1435
|
+
TITLE_REQUIRED: "Campo obrigat\xF3rio! Por favor, preencha este campo para continuar.",
|
|
1436
|
+
STUDENTS_REQUIRED: "Campo obrigat\xF3rio! Por favor, selecione pelo menos um aluno para continuar.",
|
|
1437
|
+
START_DATE_REQUIRED: "Campo obrigat\xF3rio! Por favor, preencha este campo para continuar.",
|
|
1438
|
+
FINAL_DATE_REQUIRED: "Campo obrigat\xF3rio! Por favor, preencha este campo para continuar.",
|
|
1439
|
+
FINAL_DATE_INVALID: "A data final deve ser maior ou igual \xE0 data inicial."
|
|
1482
1440
|
};
|
|
1483
|
-
var
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
const baseClasses = "inline-flex items-center justify-center rounded-xs font-normal gap-1 relative";
|
|
1499
|
-
const baseClassesIcon = "flex items-center";
|
|
1500
|
-
if (variant === "notification") {
|
|
1501
|
-
return /* @__PURE__ */ jsxs8(
|
|
1502
|
-
"div",
|
|
1503
|
-
{
|
|
1504
|
-
className: cn(baseClasses, variantClasses, sizeClasses, className),
|
|
1505
|
-
...props,
|
|
1506
|
-
children: [
|
|
1507
|
-
/* @__PURE__ */ jsx9(Bell, { size: 24, className: "text-current", "aria-hidden": "true" }),
|
|
1508
|
-
notificationActive && /* @__PURE__ */ jsx9(
|
|
1509
|
-
"span",
|
|
1510
|
-
{
|
|
1511
|
-
"data-testid": "notification-dot",
|
|
1512
|
-
className: "absolute top-[5px] right-[10px] block h-2 w-2 rounded-full bg-indicator-error ring-2 ring-white"
|
|
1513
|
-
}
|
|
1514
|
-
)
|
|
1515
|
-
]
|
|
1516
|
-
}
|
|
1517
|
-
);
|
|
1518
|
-
}
|
|
1519
|
-
return /* @__PURE__ */ jsxs8(
|
|
1520
|
-
"div",
|
|
1441
|
+
var activityStepSchema = z.object({
|
|
1442
|
+
subtype: z.enum(["TAREFA", "TRABALHO", "PROVA"], {
|
|
1443
|
+
errorMap: () => ({ message: ERROR_MESSAGES.SUBTYPE_REQUIRED })
|
|
1444
|
+
}),
|
|
1445
|
+
title: z.string({ required_error: ERROR_MESSAGES.TITLE_REQUIRED }).transform((val) => val.trim()).refine((val) => val.length > 0, {
|
|
1446
|
+
message: ERROR_MESSAGES.TITLE_REQUIRED
|
|
1447
|
+
}),
|
|
1448
|
+
notification: z.string().optional()
|
|
1449
|
+
});
|
|
1450
|
+
var recipientStepSchema = z.object({
|
|
1451
|
+
students: z.array(
|
|
1452
|
+
z.object({
|
|
1453
|
+
studentId: z.string(),
|
|
1454
|
+
userInstitutionId: z.string()
|
|
1455
|
+
}),
|
|
1521
1456
|
{
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
children: [
|
|
1525
|
-
iconLeft && /* @__PURE__ */ jsx9("span", { className: cn(baseClassesIcon, sizeClassesIcon), children: iconLeft }),
|
|
1526
|
-
children,
|
|
1527
|
-
iconRight && /* @__PURE__ */ jsx9("span", { className: cn(baseClassesIcon, sizeClassesIcon), children: iconRight })
|
|
1528
|
-
]
|
|
1457
|
+
required_error: ERROR_MESSAGES.STUDENTS_REQUIRED,
|
|
1458
|
+
invalid_type_error: ERROR_MESSAGES.STUDENTS_REQUIRED
|
|
1529
1459
|
}
|
|
1530
|
-
)
|
|
1531
|
-
};
|
|
1532
|
-
var
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
(
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
"font-bold",
|
|
1553
|
-
"shadow-soft-shadow-1",
|
|
1554
|
-
"hover:bg-background-100",
|
|
1555
|
-
"focus-visible:outline-none",
|
|
1556
|
-
"focus-visible:ring-2",
|
|
1557
|
-
"focus-visible:ring-indicator-info",
|
|
1558
|
-
"focus-visible:ring-offset-0",
|
|
1559
|
-
"focus-visible:shadow-none",
|
|
1560
|
-
"active:ring-2",
|
|
1561
|
-
"active:ring-primary-950",
|
|
1562
|
-
"active:ring-offset-0",
|
|
1563
|
-
"active:shadow-none",
|
|
1564
|
-
"disabled:opacity-50",
|
|
1565
|
-
"disabled:cursor-not-allowed"
|
|
1566
|
-
];
|
|
1567
|
-
const stateClasses = selected ? ["ring-primary-950", "ring-2", "ring-offset-0", "shadow-none"] : [];
|
|
1568
|
-
const allClasses = [...baseClasses, ...stateClasses].join(" ");
|
|
1569
|
-
return /* @__PURE__ */ jsxs9(
|
|
1570
|
-
"button",
|
|
1571
|
-
{
|
|
1572
|
-
ref,
|
|
1573
|
-
type: "button",
|
|
1574
|
-
className: cn(allClasses, className),
|
|
1575
|
-
disabled,
|
|
1576
|
-
"aria-pressed": selected,
|
|
1577
|
-
...props,
|
|
1578
|
-
children: [
|
|
1579
|
-
/* @__PURE__ */ jsx10("span", { className: "flex items-center justify-center w-6 h-6", children: icon }),
|
|
1580
|
-
/* @__PURE__ */ jsx10("span", { children: label })
|
|
1581
|
-
]
|
|
1582
|
-
}
|
|
1583
|
-
);
|
|
1584
|
-
}
|
|
1585
|
-
);
|
|
1586
|
-
SelectionButton.displayName = "SelectionButton";
|
|
1587
|
-
var SelectionButton_default = SelectionButton;
|
|
1588
|
-
|
|
1589
|
-
// src/components/CheckBox/CheckBox.tsx
|
|
1590
|
-
import {
|
|
1591
|
-
forwardRef as forwardRef5,
|
|
1592
|
-
useState as useState4,
|
|
1593
|
-
useId as useId5
|
|
1594
|
-
} from "react";
|
|
1595
|
-
import { Check as Check3, Minus } from "phosphor-react";
|
|
1596
|
-
import { jsx as jsx11, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1597
|
-
var SIZE_CLASSES8 = {
|
|
1598
|
-
small: {
|
|
1599
|
-
checkbox: "w-4 h-4",
|
|
1600
|
-
// 16px x 16px
|
|
1601
|
-
textSize: "sm",
|
|
1602
|
-
spacing: "gap-1.5",
|
|
1603
|
-
// 6px
|
|
1604
|
-
borderWidth: "border-2",
|
|
1605
|
-
iconSize: 14,
|
|
1606
|
-
// pixels for Phosphor icons
|
|
1607
|
-
labelHeight: "h-[21px]"
|
|
1608
|
-
},
|
|
1609
|
-
medium: {
|
|
1610
|
-
checkbox: "w-5 h-5",
|
|
1611
|
-
// 20px x 20px
|
|
1612
|
-
textSize: "md",
|
|
1613
|
-
spacing: "gap-2",
|
|
1614
|
-
// 8px
|
|
1615
|
-
borderWidth: "border-2",
|
|
1616
|
-
iconSize: 16,
|
|
1617
|
-
// pixels for Phosphor icons
|
|
1618
|
-
labelHeight: "h-6"
|
|
1460
|
+
).min(1, ERROR_MESSAGES.STUDENTS_REQUIRED)
|
|
1461
|
+
});
|
|
1462
|
+
var DATE_REGEX = /^\d{4}-\d{2}-\d{2}$/;
|
|
1463
|
+
var TIME_REGEX = /^\d{2}:\d{2}$/;
|
|
1464
|
+
var deadlineStepBaseSchema = z.object({
|
|
1465
|
+
startDate: z.string({
|
|
1466
|
+
required_error: ERROR_MESSAGES.START_DATE_REQUIRED,
|
|
1467
|
+
invalid_type_error: ERROR_MESSAGES.START_DATE_REQUIRED
|
|
1468
|
+
}).min(1, ERROR_MESSAGES.START_DATE_REQUIRED).regex(DATE_REGEX, ERROR_MESSAGES.START_DATE_REQUIRED),
|
|
1469
|
+
startTime: z.string().regex(TIME_REGEX).default("00:00"),
|
|
1470
|
+
finalDate: z.string({
|
|
1471
|
+
required_error: ERROR_MESSAGES.FINAL_DATE_REQUIRED,
|
|
1472
|
+
invalid_type_error: ERROR_MESSAGES.FINAL_DATE_REQUIRED
|
|
1473
|
+
}).min(1, ERROR_MESSAGES.FINAL_DATE_REQUIRED).regex(DATE_REGEX, ERROR_MESSAGES.FINAL_DATE_REQUIRED),
|
|
1474
|
+
finalTime: z.string().regex(TIME_REGEX).default("23:59"),
|
|
1475
|
+
canRetry: z.boolean().default(false)
|
|
1476
|
+
});
|
|
1477
|
+
var deadlineStepSchema = deadlineStepBaseSchema.refine(
|
|
1478
|
+
(data) => {
|
|
1479
|
+
const start = /* @__PURE__ */ new Date(`${data.startDate}T${data.startTime}`);
|
|
1480
|
+
const end = /* @__PURE__ */ new Date(`${data.finalDate}T${data.finalTime}`);
|
|
1481
|
+
return end >= start;
|
|
1619
1482
|
},
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1483
|
+
{ message: ERROR_MESSAGES.FINAL_DATE_INVALID, path: ["finalDate"] }
|
|
1484
|
+
);
|
|
1485
|
+
function validateActivityStep(data) {
|
|
1486
|
+
const errors = {};
|
|
1487
|
+
const result = activityStepSchema.safeParse({
|
|
1488
|
+
subtype: data.subtype,
|
|
1489
|
+
title: data.title,
|
|
1490
|
+
notification: data.notification
|
|
1491
|
+
});
|
|
1492
|
+
if (!result.success) {
|
|
1493
|
+
result.error.issues.forEach((issue) => {
|
|
1494
|
+
const field = issue.path[0];
|
|
1495
|
+
if (field === "subtype" || field === "title") {
|
|
1496
|
+
errors[field] = issue.message;
|
|
1497
|
+
}
|
|
1498
|
+
});
|
|
1631
1499
|
}
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1500
|
+
return errors;
|
|
1501
|
+
}
|
|
1502
|
+
function validateRecipientStep(data) {
|
|
1503
|
+
const errors = {};
|
|
1504
|
+
const result = recipientStepSchema.safeParse({
|
|
1505
|
+
students: data.students ?? []
|
|
1506
|
+
});
|
|
1507
|
+
if (!result.success) {
|
|
1508
|
+
result.error.issues.forEach((issue) => {
|
|
1509
|
+
if (issue.path[0] === "students") {
|
|
1510
|
+
errors.students = issue.message;
|
|
1511
|
+
}
|
|
1512
|
+
});
|
|
1513
|
+
}
|
|
1514
|
+
return errors;
|
|
1515
|
+
}
|
|
1516
|
+
function validateDeadlineStep(data) {
|
|
1517
|
+
const errors = {};
|
|
1518
|
+
if (!data.startDate) {
|
|
1519
|
+
errors.startDate = ERROR_MESSAGES.START_DATE_REQUIRED;
|
|
1520
|
+
}
|
|
1521
|
+
if (!data.finalDate) {
|
|
1522
|
+
errors.finalDate = ERROR_MESSAGES.FINAL_DATE_REQUIRED;
|
|
1523
|
+
}
|
|
1524
|
+
if (data.startDate && data.finalDate) {
|
|
1525
|
+
const result = deadlineStepSchema.safeParse({
|
|
1526
|
+
startDate: data.startDate,
|
|
1527
|
+
startTime: data.startTime ?? "00:00",
|
|
1528
|
+
finalDate: data.finalDate,
|
|
1529
|
+
finalTime: data.finalTime ?? "23:59",
|
|
1530
|
+
canRetry: data.canRetry ?? false
|
|
1531
|
+
});
|
|
1532
|
+
if (!result.success) {
|
|
1533
|
+
result.error.issues.forEach((issue) => {
|
|
1534
|
+
const field = issue.path[0];
|
|
1535
|
+
if (field === "startDate" || field === "finalDate") {
|
|
1536
|
+
errors[field] = issue.message;
|
|
1537
|
+
}
|
|
1538
|
+
});
|
|
1539
|
+
}
|
|
1540
|
+
}
|
|
1541
|
+
return errors;
|
|
1542
|
+
}
|
|
1543
|
+
function validateStep(step, data) {
|
|
1544
|
+
switch (step) {
|
|
1545
|
+
case 1:
|
|
1546
|
+
return validateActivityStep(data);
|
|
1547
|
+
case 2:
|
|
1548
|
+
return validateRecipientStep(data);
|
|
1549
|
+
case 3:
|
|
1550
|
+
return validateDeadlineStep(data);
|
|
1551
|
+
default:
|
|
1552
|
+
return {};
|
|
1553
|
+
}
|
|
1554
|
+
}
|
|
1555
|
+
function isStepValid(step, data) {
|
|
1556
|
+
const errors = validateStep(step, data);
|
|
1557
|
+
return Object.keys(errors).length === 0;
|
|
1558
|
+
}
|
|
1559
|
+
function isFormValid(data) {
|
|
1560
|
+
return isStepValid(1, data) && isStepValid(2, data) && isStepValid(3, data);
|
|
1561
|
+
}
|
|
1562
|
+
|
|
1563
|
+
// src/utils/extractStudentsFromCategories.ts
|
|
1564
|
+
function extractStudentsFromCategories(categories) {
|
|
1565
|
+
const studentsCategory = categories.find((cat) => cat.key === "students");
|
|
1566
|
+
if (!studentsCategory?.selectedIds || !studentsCategory.itens) {
|
|
1567
|
+
return [];
|
|
1568
|
+
}
|
|
1569
|
+
return studentsCategory.selectedIds.map((id) => {
|
|
1570
|
+
const student = studentsCategory.itens?.find((item) => item.id === id);
|
|
1571
|
+
if (student) {
|
|
1572
|
+
const rawStudentId = student.studentId;
|
|
1573
|
+
const rawUserInstId = student.userInstitutionId;
|
|
1574
|
+
const rawInstId = student.institutionId;
|
|
1575
|
+
const studentId = typeof rawStudentId === "string" || typeof rawStudentId === "number" ? String(rawStudentId) : student.id;
|
|
1576
|
+
let userInstitutionId = "";
|
|
1577
|
+
if (typeof rawUserInstId === "string" || typeof rawUserInstId === "number") {
|
|
1578
|
+
userInstitutionId = String(rawUserInstId);
|
|
1579
|
+
} else if (typeof rawInstId === "string" || typeof rawInstId === "number") {
|
|
1580
|
+
userInstitutionId = String(rawInstId);
|
|
1581
|
+
}
|
|
1582
|
+
if (!userInstitutionId) {
|
|
1583
|
+
return null;
|
|
1584
|
+
}
|
|
1585
|
+
return { studentId, userInstitutionId };
|
|
1586
|
+
}
|
|
1587
|
+
return null;
|
|
1588
|
+
}).filter((s) => s !== null);
|
|
1589
|
+
}
|
|
1590
|
+
|
|
1591
|
+
// src/components/SendActivityModal/hooks/useSendActivityModal.ts
|
|
1592
|
+
var initialState = {
|
|
1593
|
+
formData: {
|
|
1594
|
+
canRetry: false,
|
|
1595
|
+
startTime: "00:00",
|
|
1596
|
+
finalTime: "23:59"
|
|
1597
|
+
},
|
|
1598
|
+
currentStep: 1,
|
|
1599
|
+
completedSteps: [],
|
|
1600
|
+
errors: {},
|
|
1601
|
+
categories: []
|
|
1602
|
+
};
|
|
1603
|
+
var useSendActivityModalStore = create2(
|
|
1604
|
+
(set, get) => ({
|
|
1605
|
+
...initialState,
|
|
1606
|
+
setFormData: (data) => {
|
|
1607
|
+
set((state) => ({
|
|
1608
|
+
formData: { ...state.formData, ...data }
|
|
1609
|
+
}));
|
|
1610
|
+
},
|
|
1611
|
+
goToStep: (step) => {
|
|
1612
|
+
if (step >= 1 && step <= 3) {
|
|
1613
|
+
set({ currentStep: step, errors: {} });
|
|
1614
|
+
}
|
|
1615
|
+
},
|
|
1616
|
+
nextStep: () => {
|
|
1617
|
+
const state = get();
|
|
1618
|
+
const isValid = state.validateCurrentStep();
|
|
1619
|
+
if (isValid && state.currentStep < 3) {
|
|
1620
|
+
set((prev) => ({
|
|
1621
|
+
currentStep: prev.currentStep + 1,
|
|
1622
|
+
completedSteps: prev.completedSteps.includes(prev.currentStep) ? prev.completedSteps : [...prev.completedSteps, prev.currentStep],
|
|
1623
|
+
errors: {}
|
|
1624
|
+
}));
|
|
1625
|
+
return true;
|
|
1626
|
+
}
|
|
1627
|
+
return isValid;
|
|
1628
|
+
},
|
|
1629
|
+
previousStep: () => {
|
|
1630
|
+
const state = get();
|
|
1631
|
+
if (state.currentStep > 1) {
|
|
1632
|
+
set({ currentStep: state.currentStep - 1, errors: {} });
|
|
1633
|
+
}
|
|
1634
|
+
},
|
|
1635
|
+
setErrors: (errors) => {
|
|
1636
|
+
set({ errors });
|
|
1637
|
+
},
|
|
1638
|
+
validateCurrentStep: () => {
|
|
1639
|
+
const state = get();
|
|
1640
|
+
let formDataToValidate = state.formData;
|
|
1641
|
+
let updatedFormData = state.formData;
|
|
1642
|
+
if (state.currentStep === 2 && state.categories.length > 0) {
|
|
1643
|
+
const students = extractStudentsFromCategories(state.categories);
|
|
1644
|
+
formDataToValidate = { ...state.formData, students };
|
|
1645
|
+
updatedFormData = formDataToValidate;
|
|
1646
|
+
}
|
|
1647
|
+
const errors = validateStep(state.currentStep, formDataToValidate);
|
|
1648
|
+
set({ formData: updatedFormData, errors });
|
|
1649
|
+
return Object.keys(errors).length === 0;
|
|
1650
|
+
},
|
|
1651
|
+
validateAllSteps: () => {
|
|
1652
|
+
const state = get();
|
|
1653
|
+
let formDataForStep2 = state.formData;
|
|
1654
|
+
if (state.categories.length > 0) {
|
|
1655
|
+
const students = extractStudentsFromCategories(state.categories);
|
|
1656
|
+
formDataForStep2 = { ...state.formData, students };
|
|
1657
|
+
}
|
|
1658
|
+
const errors1 = validateStep(1, state.formData);
|
|
1659
|
+
const errors2 = validateStep(2, formDataForStep2);
|
|
1660
|
+
const errors3 = validateStep(3, state.formData);
|
|
1661
|
+
const allErrors = { ...errors1, ...errors2, ...errors3 };
|
|
1662
|
+
set({ errors: allErrors });
|
|
1663
|
+
return Object.keys(allErrors).length === 0;
|
|
1664
|
+
},
|
|
1665
|
+
setCategories: (categories) => {
|
|
1666
|
+
const students = extractStudentsFromCategories(categories);
|
|
1667
|
+
set((state) => ({
|
|
1668
|
+
categories,
|
|
1669
|
+
formData: { ...state.formData, students }
|
|
1670
|
+
}));
|
|
1671
|
+
},
|
|
1672
|
+
reset: () => {
|
|
1673
|
+
set({
|
|
1674
|
+
...initialState,
|
|
1675
|
+
categories: []
|
|
1676
|
+
});
|
|
1677
|
+
}
|
|
1678
|
+
})
|
|
1679
|
+
);
|
|
1680
|
+
function useSendActivityModal() {
|
|
1681
|
+
return useSendActivityModalStore();
|
|
1682
|
+
}
|
|
1683
|
+
|
|
1684
|
+
// src/components/SendActivityModal/types.ts
|
|
1685
|
+
var ACTIVITY_TYPE_OPTIONS = [
|
|
1686
|
+
{ value: "TAREFA", label: "Tarefa" },
|
|
1687
|
+
{ value: "TRABALHO", label: "Trabalho" },
|
|
1688
|
+
{ value: "PROVA", label: "Prova" }
|
|
1689
|
+
];
|
|
1690
|
+
|
|
1691
|
+
// src/components/shared/SendModalBase/hooks/useDateTimeHandlers.ts
|
|
1692
|
+
import { useCallback } from "react";
|
|
1693
|
+
function useDateTimeHandlers({ setFormData }) {
|
|
1694
|
+
const handleStartDateChange = useCallback(
|
|
1695
|
+
(value) => {
|
|
1696
|
+
setFormData({ startDate: value });
|
|
1697
|
+
},
|
|
1698
|
+
[setFormData]
|
|
1699
|
+
);
|
|
1700
|
+
const handleStartTimeChange = useCallback(
|
|
1701
|
+
(value) => {
|
|
1702
|
+
setFormData({ startTime: value });
|
|
1703
|
+
},
|
|
1704
|
+
[setFormData]
|
|
1705
|
+
);
|
|
1706
|
+
const handleFinalDateChange = useCallback(
|
|
1707
|
+
(value) => {
|
|
1708
|
+
setFormData({ finalDate: value });
|
|
1709
|
+
},
|
|
1710
|
+
[setFormData]
|
|
1711
|
+
);
|
|
1712
|
+
const handleFinalTimeChange = useCallback(
|
|
1713
|
+
(value) => {
|
|
1714
|
+
setFormData({ finalTime: value });
|
|
1715
|
+
},
|
|
1716
|
+
[setFormData]
|
|
1717
|
+
);
|
|
1718
|
+
return {
|
|
1719
|
+
handleStartDateChange,
|
|
1720
|
+
handleStartTimeChange,
|
|
1721
|
+
handleFinalDateChange,
|
|
1722
|
+
handleFinalTimeChange
|
|
1723
|
+
};
|
|
1724
|
+
}
|
|
1725
|
+
|
|
1726
|
+
// src/components/shared/SendModalBase/components/SendModalError.tsx
|
|
1727
|
+
import { WarningCircle as WarningCircleIcon } from "phosphor-react";
|
|
1728
|
+
import { jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1729
|
+
var SendModalError = ({
|
|
1730
|
+
error,
|
|
1731
|
+
testId
|
|
1732
|
+
}) => {
|
|
1733
|
+
if (!error) return null;
|
|
1734
|
+
return /* @__PURE__ */ jsxs8(
|
|
1735
|
+
Text_default,
|
|
1736
|
+
{
|
|
1737
|
+
as: "p",
|
|
1738
|
+
size: "sm",
|
|
1739
|
+
color: "text-error-600",
|
|
1740
|
+
className: "flex items-center gap-1 mt-1",
|
|
1741
|
+
"data-testid": testId,
|
|
1742
|
+
"aria-live": "polite",
|
|
1743
|
+
children: [
|
|
1744
|
+
/* @__PURE__ */ jsx9(WarningCircleIcon, { size: 16 }),
|
|
1745
|
+
error
|
|
1746
|
+
]
|
|
1747
|
+
}
|
|
1748
|
+
);
|
|
1749
|
+
};
|
|
1750
|
+
|
|
1751
|
+
// src/components/CheckBoxGroup/CheckBoxGroup.tsx
|
|
1752
|
+
import { useEffect as useEffect10, useMemo as useMemo3, useRef as useRef7, useState as useState12 } from "react";
|
|
1753
|
+
|
|
1754
|
+
// src/components/Badge/Badge.tsx
|
|
1755
|
+
import { Bell } from "phosphor-react";
|
|
1756
|
+
import { jsx as jsx10, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1757
|
+
var VARIANT_ACTION_CLASSES2 = {
|
|
1758
|
+
solid: {
|
|
1759
|
+
error: "bg-error-background text-error-700 focus-visible:outline-none",
|
|
1760
|
+
warning: "bg-warning text-warning-800 focus-visible:outline-none",
|
|
1761
|
+
success: "bg-success text-success-800 focus-visible:outline-none",
|
|
1762
|
+
info: "bg-info text-info-800 focus-visible:outline-none",
|
|
1763
|
+
muted: "bg-background-muted text-background-800 focus-visible:outline-none"
|
|
1764
|
+
},
|
|
1765
|
+
outlined: {
|
|
1766
|
+
error: "bg-error text-error-700 border border-error-300 focus-visible:outline-none",
|
|
1767
|
+
warning: "bg-warning text-warning-800 border border-warning-300 focus-visible:outline-none",
|
|
1768
|
+
success: "bg-success text-success-800 border border-success-300 focus-visible:outline-none",
|
|
1769
|
+
info: "bg-info text-info-800 border border-info-300 focus-visible:outline-none",
|
|
1770
|
+
muted: "bg-background-muted text-background-800 border border-border-300 focus-visible:outline-none"
|
|
1771
|
+
},
|
|
1772
|
+
exams: {
|
|
1773
|
+
exam1: "bg-exam-1 text-info-700 focus-visible:outline-none",
|
|
1774
|
+
exam2: "bg-exam-2 text-typography-1 focus-visible:outline-none",
|
|
1775
|
+
exam3: "bg-exam-3 text-typography-2 focus-visible:outline-none",
|
|
1776
|
+
exam4: "bg-exam-4 text-success-700 focus-visible:outline-none"
|
|
1777
|
+
},
|
|
1778
|
+
examsOutlined: {
|
|
1779
|
+
exam1: "bg-exam-1 text-info-700 border border-info-700 focus-visible:outline-none",
|
|
1780
|
+
exam2: "bg-exam-2 text-typography-1 border border-typography-1 focus-visible:outline-none",
|
|
1781
|
+
exam3: "bg-exam-3 text-typography-2 border border-typography-2 focus-visible:outline-none",
|
|
1782
|
+
exam4: "bg-exam-4 text-success-700 border border-success-700 focus-visible:outline-none"
|
|
1783
|
+
},
|
|
1784
|
+
resultStatus: {
|
|
1785
|
+
negative: "bg-error text-error-800 focus-visible:outline-none",
|
|
1786
|
+
positive: "bg-success text-success-800 focus-visible:outline-none"
|
|
1787
|
+
},
|
|
1788
|
+
notification: "text-primary"
|
|
1789
|
+
};
|
|
1790
|
+
var SIZE_CLASSES7 = {
|
|
1791
|
+
small: "text-2xs px-2 py-1",
|
|
1792
|
+
medium: "text-xs px-2 py-1",
|
|
1793
|
+
large: "text-sm px-2 py-1"
|
|
1794
|
+
};
|
|
1795
|
+
var SIZE_CLASSES_ICON = {
|
|
1796
|
+
small: "size-3",
|
|
1797
|
+
medium: "size-3.5",
|
|
1798
|
+
large: "size-4"
|
|
1799
|
+
};
|
|
1800
|
+
var Badge = ({
|
|
1801
|
+
children,
|
|
1802
|
+
iconLeft,
|
|
1803
|
+
iconRight,
|
|
1804
|
+
size = "medium",
|
|
1805
|
+
variant = "solid",
|
|
1806
|
+
action = "error",
|
|
1807
|
+
className = "",
|
|
1808
|
+
notificationActive = false,
|
|
1809
|
+
...props
|
|
1810
|
+
}) => {
|
|
1811
|
+
const sizeClasses = SIZE_CLASSES7[size];
|
|
1812
|
+
const sizeClassesIcon = SIZE_CLASSES_ICON[size];
|
|
1813
|
+
const variantActionMap = VARIANT_ACTION_CLASSES2[variant] || {};
|
|
1814
|
+
const variantClasses = typeof variantActionMap === "string" ? variantActionMap : variantActionMap[action] ?? variantActionMap.muted ?? "";
|
|
1815
|
+
const baseClasses = "inline-flex items-center justify-center rounded-xs font-normal gap-1 relative";
|
|
1816
|
+
const baseClassesIcon = "flex items-center";
|
|
1817
|
+
if (variant === "notification") {
|
|
1818
|
+
return /* @__PURE__ */ jsxs9(
|
|
1819
|
+
"div",
|
|
1820
|
+
{
|
|
1821
|
+
className: cn(baseClasses, variantClasses, sizeClasses, className),
|
|
1822
|
+
...props,
|
|
1823
|
+
children: [
|
|
1824
|
+
/* @__PURE__ */ jsx10(Bell, { size: 24, className: "text-current", "aria-hidden": "true" }),
|
|
1825
|
+
notificationActive && /* @__PURE__ */ jsx10(
|
|
1826
|
+
"span",
|
|
1827
|
+
{
|
|
1828
|
+
"data-testid": "notification-dot",
|
|
1829
|
+
className: "absolute top-[5px] right-[10px] block h-2 w-2 rounded-full bg-indicator-error ring-2 ring-white"
|
|
1830
|
+
}
|
|
1831
|
+
)
|
|
1832
|
+
]
|
|
1833
|
+
}
|
|
1834
|
+
);
|
|
1835
|
+
}
|
|
1836
|
+
return /* @__PURE__ */ jsxs9(
|
|
1837
|
+
"div",
|
|
1838
|
+
{
|
|
1839
|
+
className: cn(baseClasses, variantClasses, sizeClasses, className),
|
|
1840
|
+
...props,
|
|
1841
|
+
children: [
|
|
1842
|
+
iconLeft && /* @__PURE__ */ jsx10("span", { className: cn(baseClassesIcon, sizeClassesIcon), children: iconLeft }),
|
|
1843
|
+
children,
|
|
1844
|
+
iconRight && /* @__PURE__ */ jsx10("span", { className: cn(baseClassesIcon, sizeClassesIcon), children: iconRight })
|
|
1845
|
+
]
|
|
1846
|
+
}
|
|
1847
|
+
);
|
|
1848
|
+
};
|
|
1849
|
+
var Badge_default = Badge;
|
|
1850
|
+
|
|
1851
|
+
// src/components/SelectionButton/SelectionButton.tsx
|
|
1852
|
+
import { forwardRef as forwardRef4 } from "react";
|
|
1853
|
+
import { jsx as jsx11, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1854
|
+
var SelectionButton = forwardRef4(
|
|
1855
|
+
({ icon, label, selected = false, className = "", disabled, ...props }, ref) => {
|
|
1856
|
+
const baseClasses = [
|
|
1857
|
+
"inline-flex",
|
|
1858
|
+
"items-center",
|
|
1859
|
+
"justify-start",
|
|
1860
|
+
"gap-2",
|
|
1861
|
+
"p-4",
|
|
1862
|
+
"rounded-xl",
|
|
1863
|
+
"cursor-pointer",
|
|
1864
|
+
"border",
|
|
1865
|
+
"border-border-50",
|
|
1866
|
+
"bg-background",
|
|
1867
|
+
"text-sm",
|
|
1868
|
+
"text-text-700",
|
|
1869
|
+
"font-bold",
|
|
1870
|
+
"shadow-soft-shadow-1",
|
|
1871
|
+
"hover:bg-background-100",
|
|
1872
|
+
"focus-visible:outline-none",
|
|
1873
|
+
"focus-visible:ring-2",
|
|
1874
|
+
"focus-visible:ring-indicator-info",
|
|
1875
|
+
"focus-visible:ring-offset-0",
|
|
1876
|
+
"focus-visible:shadow-none",
|
|
1877
|
+
"active:ring-2",
|
|
1878
|
+
"active:ring-primary-950",
|
|
1879
|
+
"active:ring-offset-0",
|
|
1880
|
+
"active:shadow-none",
|
|
1881
|
+
"disabled:opacity-50",
|
|
1882
|
+
"disabled:cursor-not-allowed"
|
|
1883
|
+
];
|
|
1884
|
+
const stateClasses = selected ? ["ring-primary-950", "ring-2", "ring-offset-0", "shadow-none"] : [];
|
|
1885
|
+
const allClasses = [...baseClasses, ...stateClasses].join(" ");
|
|
1886
|
+
return /* @__PURE__ */ jsxs10(
|
|
1887
|
+
"button",
|
|
1888
|
+
{
|
|
1889
|
+
ref,
|
|
1890
|
+
type: "button",
|
|
1891
|
+
className: cn(allClasses, className),
|
|
1892
|
+
disabled,
|
|
1893
|
+
"aria-pressed": selected,
|
|
1894
|
+
...props,
|
|
1895
|
+
children: [
|
|
1896
|
+
/* @__PURE__ */ jsx11("span", { className: "flex items-center justify-center w-6 h-6", children: icon }),
|
|
1897
|
+
/* @__PURE__ */ jsx11("span", { children: label })
|
|
1898
|
+
]
|
|
1899
|
+
}
|
|
1900
|
+
);
|
|
1901
|
+
}
|
|
1902
|
+
);
|
|
1903
|
+
SelectionButton.displayName = "SelectionButton";
|
|
1904
|
+
var SelectionButton_default = SelectionButton;
|
|
1905
|
+
|
|
1906
|
+
// src/components/CheckBox/CheckBox.tsx
|
|
1907
|
+
import {
|
|
1908
|
+
forwardRef as forwardRef5,
|
|
1909
|
+
useState as useState4,
|
|
1910
|
+
useId as useId5
|
|
1911
|
+
} from "react";
|
|
1912
|
+
import { Check as Check3, Minus } from "phosphor-react";
|
|
1913
|
+
import { jsx as jsx12, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1914
|
+
var SIZE_CLASSES8 = {
|
|
1915
|
+
small: {
|
|
1916
|
+
checkbox: "w-4 h-4",
|
|
1917
|
+
// 16px x 16px
|
|
1918
|
+
textSize: "sm",
|
|
1919
|
+
spacing: "gap-1.5",
|
|
1920
|
+
// 6px
|
|
1921
|
+
borderWidth: "border-2",
|
|
1922
|
+
iconSize: 14,
|
|
1923
|
+
// pixels for Phosphor icons
|
|
1924
|
+
labelHeight: "h-[21px]"
|
|
1925
|
+
},
|
|
1926
|
+
medium: {
|
|
1927
|
+
checkbox: "w-5 h-5",
|
|
1928
|
+
// 20px x 20px
|
|
1929
|
+
textSize: "md",
|
|
1930
|
+
spacing: "gap-2",
|
|
1931
|
+
// 8px
|
|
1932
|
+
borderWidth: "border-2",
|
|
1933
|
+
iconSize: 16,
|
|
1934
|
+
// pixels for Phosphor icons
|
|
1935
|
+
labelHeight: "h-6"
|
|
1936
|
+
},
|
|
1937
|
+
large: {
|
|
1938
|
+
checkbox: "w-6 h-6",
|
|
1939
|
+
// 24px x 24px
|
|
1940
|
+
textSize: "lg",
|
|
1941
|
+
spacing: "gap-2",
|
|
1942
|
+
// 8px
|
|
1943
|
+
borderWidth: "border-[3px]",
|
|
1944
|
+
// 3px border
|
|
1945
|
+
iconSize: 20,
|
|
1946
|
+
// pixels for Phosphor icons
|
|
1947
|
+
labelHeight: "h-[27px]"
|
|
1948
|
+
}
|
|
1949
|
+
};
|
|
1950
|
+
var BASE_CHECKBOX_CLASSES = "rounded border cursor-pointer transition-all duration-200 flex items-center justify-center focus:outline-none";
|
|
1951
|
+
var STATE_CLASSES6 = {
|
|
1952
|
+
default: {
|
|
1636
1953
|
unchecked: "border-border-400 bg-background hover:border-border-500",
|
|
1637
1954
|
checked: "border-primary-950 bg-primary-950 text-text hover:border-primary-800 hover:bg-primary-800"
|
|
1638
1955
|
},
|
|
@@ -1694,7 +2011,7 @@ var CheckBox = forwardRef5(
|
|
|
1694
2011
|
);
|
|
1695
2012
|
const renderIcon = () => {
|
|
1696
2013
|
if (indeterminate) {
|
|
1697
|
-
return /* @__PURE__ */
|
|
2014
|
+
return /* @__PURE__ */ jsx12(
|
|
1698
2015
|
Minus,
|
|
1699
2016
|
{
|
|
1700
2017
|
size: sizeClasses.iconSize,
|
|
@@ -1704,7 +2021,7 @@ var CheckBox = forwardRef5(
|
|
|
1704
2021
|
);
|
|
1705
2022
|
}
|
|
1706
2023
|
if (checked) {
|
|
1707
|
-
return /* @__PURE__ */
|
|
2024
|
+
return /* @__PURE__ */ jsx12(
|
|
1708
2025
|
Check3,
|
|
1709
2026
|
{
|
|
1710
2027
|
size: sizeClasses.iconSize,
|
|
@@ -1715,8 +2032,8 @@ var CheckBox = forwardRef5(
|
|
|
1715
2032
|
}
|
|
1716
2033
|
return null;
|
|
1717
2034
|
};
|
|
1718
|
-
return /* @__PURE__ */
|
|
1719
|
-
/* @__PURE__ */
|
|
2035
|
+
return /* @__PURE__ */ jsxs11("div", { className: "flex flex-col", children: [
|
|
2036
|
+
/* @__PURE__ */ jsxs11(
|
|
1720
2037
|
"div",
|
|
1721
2038
|
{
|
|
1722
2039
|
className: cn(
|
|
@@ -1725,7 +2042,7 @@ var CheckBox = forwardRef5(
|
|
|
1725
2042
|
disabled ? "opacity-40" : ""
|
|
1726
2043
|
),
|
|
1727
2044
|
children: [
|
|
1728
|
-
/* @__PURE__ */
|
|
2045
|
+
/* @__PURE__ */ jsx12(
|
|
1729
2046
|
"input",
|
|
1730
2047
|
{
|
|
1731
2048
|
ref,
|
|
@@ -1738,15 +2055,15 @@ var CheckBox = forwardRef5(
|
|
|
1738
2055
|
...props
|
|
1739
2056
|
}
|
|
1740
2057
|
),
|
|
1741
|
-
/* @__PURE__ */
|
|
1742
|
-
label && /* @__PURE__ */
|
|
2058
|
+
/* @__PURE__ */ jsx12("label", { htmlFor: inputId, className: checkboxClasses, children: renderIcon() }),
|
|
2059
|
+
label && /* @__PURE__ */ jsx12(
|
|
1743
2060
|
"div",
|
|
1744
2061
|
{
|
|
1745
2062
|
className: cn(
|
|
1746
2063
|
"flex flex-row items-center",
|
|
1747
2064
|
sizeClasses.labelHeight
|
|
1748
2065
|
),
|
|
1749
|
-
children: /* @__PURE__ */
|
|
2066
|
+
children: /* @__PURE__ */ jsx12(
|
|
1750
2067
|
Text_default,
|
|
1751
2068
|
{
|
|
1752
2069
|
as: "label",
|
|
@@ -1765,7 +2082,7 @@ var CheckBox = forwardRef5(
|
|
|
1765
2082
|
]
|
|
1766
2083
|
}
|
|
1767
2084
|
),
|
|
1768
|
-
errorMessage && /* @__PURE__ */
|
|
2085
|
+
errorMessage && /* @__PURE__ */ jsx12(
|
|
1769
2086
|
Text_default,
|
|
1770
2087
|
{
|
|
1771
2088
|
size: "sm",
|
|
@@ -1775,7 +2092,7 @@ var CheckBox = forwardRef5(
|
|
|
1775
2092
|
children: errorMessage
|
|
1776
2093
|
}
|
|
1777
2094
|
),
|
|
1778
|
-
helperText && !errorMessage && /* @__PURE__ */
|
|
2095
|
+
helperText && !errorMessage && /* @__PURE__ */ jsx12(
|
|
1779
2096
|
Text_default,
|
|
1780
2097
|
{
|
|
1781
2098
|
size: "sm",
|
|
@@ -1792,7 +2109,7 @@ CheckBox.displayName = "CheckBox";
|
|
|
1792
2109
|
var CheckBox_default = CheckBox;
|
|
1793
2110
|
|
|
1794
2111
|
// src/components/Divider/Divider.tsx
|
|
1795
|
-
import { jsx as
|
|
2112
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
1796
2113
|
var Divider = ({
|
|
1797
2114
|
orientation = "horizontal",
|
|
1798
2115
|
className = "",
|
|
@@ -1803,7 +2120,7 @@ var Divider = ({
|
|
|
1803
2120
|
horizontal: "w-full h-px",
|
|
1804
2121
|
vertical: "h-full w-px"
|
|
1805
2122
|
};
|
|
1806
|
-
return /* @__PURE__ */
|
|
2123
|
+
return /* @__PURE__ */ jsx13(
|
|
1807
2124
|
"hr",
|
|
1808
2125
|
{
|
|
1809
2126
|
className: cn(baseClasses, orientationClasses[orientation], className),
|
|
@@ -1827,7 +2144,7 @@ import {
|
|
|
1827
2144
|
useState as useState6
|
|
1828
2145
|
} from "react";
|
|
1829
2146
|
import { createPortal } from "react-dom";
|
|
1830
|
-
import { create as
|
|
2147
|
+
import { create as create4, useStore as useStore2 } from "zustand";
|
|
1831
2148
|
|
|
1832
2149
|
// src/components/ThemeToggle/ThemeToggle.tsx
|
|
1833
2150
|
import { Moon, Sun } from "phosphor-react";
|
|
@@ -1837,7 +2154,7 @@ import { useState as useState5, useEffect as useEffect4 } from "react";
|
|
|
1837
2154
|
import { useEffect as useEffect3 } from "react";
|
|
1838
2155
|
|
|
1839
2156
|
// src/store/themeStore.ts
|
|
1840
|
-
import { create as
|
|
2157
|
+
import { create as create3 } from "zustand";
|
|
1841
2158
|
import { devtools, persist } from "zustand/middleware";
|
|
1842
2159
|
var applyThemeToDOM = (mode) => {
|
|
1843
2160
|
const htmlElement = document.documentElement;
|
|
@@ -1871,7 +2188,7 @@ var saveOriginalTheme = () => {
|
|
|
1871
2188
|
htmlElement.setAttribute("data-original-theme", currentTheme);
|
|
1872
2189
|
}
|
|
1873
2190
|
};
|
|
1874
|
-
var useThemeStore =
|
|
2191
|
+
var useThemeStore = create3()(
|
|
1875
2192
|
devtools(
|
|
1876
2193
|
persist(
|
|
1877
2194
|
(set, get) => ({
|
|
@@ -1955,7 +2272,7 @@ var useTheme = () => {
|
|
|
1955
2272
|
};
|
|
1956
2273
|
|
|
1957
2274
|
// src/components/ThemeToggle/ThemeToggle.tsx
|
|
1958
|
-
import { jsx as
|
|
2275
|
+
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
1959
2276
|
var ThemeToggle = ({
|
|
1960
2277
|
variant = "default",
|
|
1961
2278
|
onToggle
|
|
@@ -1969,17 +2286,17 @@ var ThemeToggle = ({
|
|
|
1969
2286
|
{
|
|
1970
2287
|
id: "light",
|
|
1971
2288
|
title: "Claro",
|
|
1972
|
-
icon: /* @__PURE__ */
|
|
2289
|
+
icon: /* @__PURE__ */ jsx14(Sun, { size: 24 })
|
|
1973
2290
|
},
|
|
1974
2291
|
{
|
|
1975
2292
|
id: "dark",
|
|
1976
2293
|
title: "Escuro",
|
|
1977
|
-
icon: /* @__PURE__ */
|
|
2294
|
+
icon: /* @__PURE__ */ jsx14(Moon, { size: 24 })
|
|
1978
2295
|
},
|
|
1979
2296
|
{
|
|
1980
2297
|
id: "system",
|
|
1981
2298
|
title: "Sistema",
|
|
1982
|
-
icon: /* @__PURE__ */
|
|
2299
|
+
icon: /* @__PURE__ */ jsx14(
|
|
1983
2300
|
"svg",
|
|
1984
2301
|
{
|
|
1985
2302
|
width: "25",
|
|
@@ -1987,7 +2304,7 @@ var ThemeToggle = ({
|
|
|
1987
2304
|
viewBox: "0 0 25 25",
|
|
1988
2305
|
fill: "none",
|
|
1989
2306
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1990
|
-
children: /* @__PURE__ */
|
|
2307
|
+
children: /* @__PURE__ */ jsx14(
|
|
1991
2308
|
"path",
|
|
1992
2309
|
{
|
|
1993
2310
|
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",
|
|
@@ -2009,7 +2326,7 @@ var ThemeToggle = ({
|
|
|
2009
2326
|
}
|
|
2010
2327
|
};
|
|
2011
2328
|
const currentTheme = variant === "with-save" ? tempTheme : themeMode;
|
|
2012
|
-
return /* @__PURE__ */
|
|
2329
|
+
return /* @__PURE__ */ jsx14("div", { className: "flex flex-row gap-2 sm:gap-4 py-2", children: problemTypes.map((type) => /* @__PURE__ */ jsx14(
|
|
2013
2330
|
SelectionButton_default,
|
|
2014
2331
|
{
|
|
2015
2332
|
icon: type.icon,
|
|
@@ -2023,9 +2340,9 @@ var ThemeToggle = ({
|
|
|
2023
2340
|
};
|
|
2024
2341
|
|
|
2025
2342
|
// src/components/DropdownMenu/DropdownMenu.tsx
|
|
2026
|
-
import { Fragment, jsx as
|
|
2343
|
+
import { Fragment, jsx as jsx15, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
2027
2344
|
function createDropdownStore() {
|
|
2028
|
-
return
|
|
2345
|
+
return create4((set) => ({
|
|
2029
2346
|
open: false,
|
|
2030
2347
|
setOpen: (open) => set({ open })
|
|
2031
2348
|
}));
|
|
@@ -2136,13 +2453,13 @@ var DropdownMenu = ({
|
|
|
2136
2453
|
setOpen(propOpen);
|
|
2137
2454
|
}
|
|
2138
2455
|
}, [propOpen]);
|
|
2139
|
-
return /* @__PURE__ */
|
|
2456
|
+
return /* @__PURE__ */ jsx15("div", { className: "relative", ref: menuRef, children: injectStore2(children, store) });
|
|
2140
2457
|
};
|
|
2141
2458
|
var DropdownMenuTrigger = forwardRef6(({ className, children, onClick, store: externalStore, ...props }, ref) => {
|
|
2142
2459
|
const store = useDropdownStore(externalStore);
|
|
2143
2460
|
const open = useStore2(store, (s) => s.open);
|
|
2144
2461
|
const toggleOpen = () => store.setState({ open: !open });
|
|
2145
|
-
return /* @__PURE__ */
|
|
2462
|
+
return /* @__PURE__ */ jsx15(
|
|
2146
2463
|
"button",
|
|
2147
2464
|
{
|
|
2148
2465
|
ref,
|
|
@@ -2183,7 +2500,7 @@ var MENUCONTENT_VARIANT_CLASSES = {
|
|
|
2183
2500
|
profile: "p-6"
|
|
2184
2501
|
};
|
|
2185
2502
|
var MenuLabel = forwardRef6(({ className, inset, store: _store, ...props }, ref) => {
|
|
2186
|
-
return /* @__PURE__ */
|
|
2503
|
+
return /* @__PURE__ */ jsx15(
|
|
2187
2504
|
"div",
|
|
2188
2505
|
{
|
|
2189
2506
|
ref,
|
|
@@ -2268,7 +2585,7 @@ var DropdownMenuContent = forwardRef6(
|
|
|
2268
2585
|
return baseStyle;
|
|
2269
2586
|
};
|
|
2270
2587
|
const variantClasses = MENUCONTENT_VARIANT_CLASSES[variant];
|
|
2271
|
-
const content = /* @__PURE__ */
|
|
2588
|
+
const content = /* @__PURE__ */ jsx15(
|
|
2272
2589
|
"div",
|
|
2273
2590
|
{
|
|
2274
2591
|
ref: portal ? contentRef : ref,
|
|
@@ -2344,7 +2661,7 @@ var DropdownMenuItem = forwardRef6(
|
|
|
2344
2661
|
const getVariantProps = () => {
|
|
2345
2662
|
return variant === "profile" ? { "data-variant": "profile" } : {};
|
|
2346
2663
|
};
|
|
2347
|
-
return /* @__PURE__ */
|
|
2664
|
+
return /* @__PURE__ */ jsxs12(
|
|
2348
2665
|
"div",
|
|
2349
2666
|
{
|
|
2350
2667
|
ref,
|
|
@@ -2370,7 +2687,7 @@ var DropdownMenuItem = forwardRef6(
|
|
|
2370
2687
|
...props,
|
|
2371
2688
|
children: [
|
|
2372
2689
|
iconLeft,
|
|
2373
|
-
/* @__PURE__ */
|
|
2690
|
+
/* @__PURE__ */ jsx15("div", { className: "w-full", children }),
|
|
2374
2691
|
iconRight
|
|
2375
2692
|
]
|
|
2376
2693
|
}
|
|
@@ -2378,7 +2695,7 @@ var DropdownMenuItem = forwardRef6(
|
|
|
2378
2695
|
}
|
|
2379
2696
|
);
|
|
2380
2697
|
DropdownMenuItem.displayName = "DropdownMenuItem";
|
|
2381
|
-
var DropdownMenuSeparator = forwardRef6(({ className, store: _store, ...props }, ref) => /* @__PURE__ */
|
|
2698
|
+
var DropdownMenuSeparator = forwardRef6(({ className, store: _store, ...props }, ref) => /* @__PURE__ */ jsx15(
|
|
2382
2699
|
"div",
|
|
2383
2700
|
{
|
|
2384
2701
|
ref,
|
|
@@ -2391,7 +2708,7 @@ var ProfileMenuTrigger = forwardRef6(({ className, onClick, store: externalStore
|
|
|
2391
2708
|
const store = useDropdownStore(externalStore);
|
|
2392
2709
|
const open = useStore2(store, (s) => s.open);
|
|
2393
2710
|
const toggleOpen = () => store.setState({ open: !open });
|
|
2394
|
-
return /* @__PURE__ */
|
|
2711
|
+
return /* @__PURE__ */ jsx15(
|
|
2395
2712
|
"button",
|
|
2396
2713
|
{
|
|
2397
2714
|
ref,
|
|
@@ -2406,13 +2723,13 @@ var ProfileMenuTrigger = forwardRef6(({ className, onClick, store: externalStore
|
|
|
2406
2723
|
},
|
|
2407
2724
|
"aria-expanded": open,
|
|
2408
2725
|
...props,
|
|
2409
|
-
children: /* @__PURE__ */
|
|
2726
|
+
children: /* @__PURE__ */ jsx15("span", { className: "size-6 rounded-full bg-primary-100 flex items-center justify-center", children: /* @__PURE__ */ jsx15(User, { className: "text-primary-950", size: 18 }) })
|
|
2410
2727
|
}
|
|
2411
2728
|
);
|
|
2412
2729
|
});
|
|
2413
2730
|
ProfileMenuTrigger.displayName = "ProfileMenuTrigger";
|
|
2414
2731
|
var ProfileMenuHeader = forwardRef6(({ className, name, email, photoUrl, store: _store, ...props }, ref) => {
|
|
2415
|
-
return /* @__PURE__ */
|
|
2732
|
+
return /* @__PURE__ */ jsxs12(
|
|
2416
2733
|
"div",
|
|
2417
2734
|
{
|
|
2418
2735
|
ref,
|
|
@@ -2423,16 +2740,16 @@ var ProfileMenuHeader = forwardRef6(({ className, name, email, photoUrl, store:
|
|
|
2423
2740
|
),
|
|
2424
2741
|
...props,
|
|
2425
2742
|
children: [
|
|
2426
|
-
/* @__PURE__ */
|
|
2743
|
+
/* @__PURE__ */ jsx15("span", { className: "w-16 h-16 bg-primary-100 rounded-full flex items-center justify-center overflow-hidden flex-shrink-0", children: photoUrl ? /* @__PURE__ */ jsx15(
|
|
2427
2744
|
"img",
|
|
2428
2745
|
{
|
|
2429
2746
|
src: photoUrl,
|
|
2430
2747
|
alt: "Foto de perfil",
|
|
2431
2748
|
className: "w-full h-full object-cover"
|
|
2432
2749
|
}
|
|
2433
|
-
) : /* @__PURE__ */
|
|
2434
|
-
/* @__PURE__ */
|
|
2435
|
-
/* @__PURE__ */
|
|
2750
|
+
) : /* @__PURE__ */ jsx15(User, { size: 34, className: "text-primary-800" }) }),
|
|
2751
|
+
/* @__PURE__ */ jsxs12("div", { className: "flex flex-col min-w-0", children: [
|
|
2752
|
+
/* @__PURE__ */ jsx15(
|
|
2436
2753
|
Text_default,
|
|
2437
2754
|
{
|
|
2438
2755
|
size: "xl",
|
|
@@ -2442,7 +2759,7 @@ var ProfileMenuHeader = forwardRef6(({ className, name, email, photoUrl, store:
|
|
|
2442
2759
|
children: name
|
|
2443
2760
|
}
|
|
2444
2761
|
),
|
|
2445
|
-
/* @__PURE__ */
|
|
2762
|
+
/* @__PURE__ */ jsx15(Text_default, { size: "md", color: "text-text-600", className: "truncate", children: email })
|
|
2446
2763
|
] })
|
|
2447
2764
|
]
|
|
2448
2765
|
}
|
|
@@ -2458,7 +2775,7 @@ var ProfileMenuInfo = forwardRef6(
|
|
|
2458
2775
|
store: _store,
|
|
2459
2776
|
...props
|
|
2460
2777
|
}, ref) => {
|
|
2461
|
-
return /* @__PURE__ */
|
|
2778
|
+
return /* @__PURE__ */ jsxs12(
|
|
2462
2779
|
"div",
|
|
2463
2780
|
{
|
|
2464
2781
|
ref,
|
|
@@ -2466,13 +2783,13 @@ var ProfileMenuInfo = forwardRef6(
|
|
|
2466
2783
|
className: cn("flex flex-row gap-4 items-center", className),
|
|
2467
2784
|
...props,
|
|
2468
2785
|
children: [
|
|
2469
|
-
/* @__PURE__ */
|
|
2470
|
-
/* @__PURE__ */
|
|
2471
|
-
/* @__PURE__ */
|
|
2472
|
-
/* @__PURE__ */
|
|
2473
|
-
/* @__PURE__ */
|
|
2474
|
-
/* @__PURE__ */
|
|
2475
|
-
/* @__PURE__ */
|
|
2786
|
+
/* @__PURE__ */ jsx15("span", { className: "w-16 h-16" }),
|
|
2787
|
+
/* @__PURE__ */ jsxs12("div", { className: "flex flex-col ", children: [
|
|
2788
|
+
/* @__PURE__ */ jsx15(Text_default, { size: "md", color: "text-text-600", children: schoolName }),
|
|
2789
|
+
/* @__PURE__ */ jsxs12("span", { className: "flex flex-row items-center gap-2", children: [
|
|
2790
|
+
/* @__PURE__ */ jsx15(Text_default, { size: "md", color: "text-text-600", children: classYearName }),
|
|
2791
|
+
/* @__PURE__ */ jsx15("p", { className: "text-text-600 text-xs align-middle", children: "\u25CF" }),
|
|
2792
|
+
/* @__PURE__ */ jsx15(Text_default, { size: "md", color: "text-text-600", children: schoolYearName })
|
|
2476
2793
|
] })
|
|
2477
2794
|
] })
|
|
2478
2795
|
]
|
|
@@ -2507,14 +2824,14 @@ var ProfileToggleTheme = ({
|
|
|
2507
2824
|
setModalThemeToggle(false);
|
|
2508
2825
|
setOpen(false);
|
|
2509
2826
|
};
|
|
2510
|
-
return /* @__PURE__ */
|
|
2511
|
-
/* @__PURE__ */
|
|
2827
|
+
return /* @__PURE__ */ jsxs12(Fragment, { children: [
|
|
2828
|
+
/* @__PURE__ */ jsx15(
|
|
2512
2829
|
DropdownMenuItem,
|
|
2513
2830
|
{
|
|
2514
2831
|
variant: "profile",
|
|
2515
2832
|
preventClose: true,
|
|
2516
2833
|
store,
|
|
2517
|
-
iconLeft: /* @__PURE__ */
|
|
2834
|
+
iconLeft: /* @__PURE__ */ jsx15(
|
|
2518
2835
|
"svg",
|
|
2519
2836
|
{
|
|
2520
2837
|
width: "24",
|
|
@@ -2522,7 +2839,7 @@ var ProfileToggleTheme = ({
|
|
|
2522
2839
|
viewBox: "0 0 25 25",
|
|
2523
2840
|
fill: "none",
|
|
2524
2841
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2525
|
-
children: /* @__PURE__ */
|
|
2842
|
+
children: /* @__PURE__ */ jsx15(
|
|
2526
2843
|
"path",
|
|
2527
2844
|
{
|
|
2528
2845
|
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",
|
|
@@ -2531,7 +2848,7 @@ var ProfileToggleTheme = ({
|
|
|
2531
2848
|
)
|
|
2532
2849
|
}
|
|
2533
2850
|
),
|
|
2534
|
-
iconRight: /* @__PURE__ */
|
|
2851
|
+
iconRight: /* @__PURE__ */ jsx15(CaretRight, {}),
|
|
2535
2852
|
onClick: handleClick,
|
|
2536
2853
|
onKeyDown: (e) => {
|
|
2537
2854
|
if (e.key === "Enter" || e.key === " ") {
|
|
@@ -2541,23 +2858,23 @@ var ProfileToggleTheme = ({
|
|
|
2541
2858
|
}
|
|
2542
2859
|
},
|
|
2543
2860
|
...props,
|
|
2544
|
-
children: /* @__PURE__ */
|
|
2861
|
+
children: /* @__PURE__ */ jsx15(Text_default, { size: "md", color: "text-text-700", children: "Apar\xEAncia" })
|
|
2545
2862
|
}
|
|
2546
2863
|
),
|
|
2547
|
-
/* @__PURE__ */
|
|
2864
|
+
/* @__PURE__ */ jsx15(
|
|
2548
2865
|
Modal_default,
|
|
2549
2866
|
{
|
|
2550
2867
|
isOpen: modalThemeToggle,
|
|
2551
2868
|
onClose: handleCancel,
|
|
2552
2869
|
title: "Apar\xEAncia",
|
|
2553
2870
|
size: "md",
|
|
2554
|
-
footer: /* @__PURE__ */
|
|
2555
|
-
/* @__PURE__ */
|
|
2556
|
-
/* @__PURE__ */
|
|
2871
|
+
footer: /* @__PURE__ */ jsxs12("div", { className: "flex gap-3", children: [
|
|
2872
|
+
/* @__PURE__ */ jsx15(Button_default, { variant: "outline", onClick: handleCancel, children: "Cancelar" }),
|
|
2873
|
+
/* @__PURE__ */ jsx15(Button_default, { variant: "solid", onClick: handleSave, children: "Salvar" })
|
|
2557
2874
|
] }),
|
|
2558
|
-
children: /* @__PURE__ */
|
|
2559
|
-
/* @__PURE__ */
|
|
2560
|
-
/* @__PURE__ */
|
|
2875
|
+
children: /* @__PURE__ */ jsxs12("div", { className: "flex flex-col", children: [
|
|
2876
|
+
/* @__PURE__ */ jsx15("p", { className: "text-sm text-text-500", children: "Escolha o tema:" }),
|
|
2877
|
+
/* @__PURE__ */ jsx15(ThemeToggle, { variant: "with-save", onToggle: setSelectedTheme })
|
|
2561
2878
|
] })
|
|
2562
2879
|
}
|
|
2563
2880
|
)
|
|
@@ -2565,7 +2882,7 @@ var ProfileToggleTheme = ({
|
|
|
2565
2882
|
};
|
|
2566
2883
|
ProfileToggleTheme.displayName = "ProfileToggleTheme";
|
|
2567
2884
|
var ProfileMenuSection = forwardRef6(({ className, children, store: _store, ...props }, ref) => {
|
|
2568
|
-
return /* @__PURE__ */
|
|
2885
|
+
return /* @__PURE__ */ jsx15("div", { ref, className: cn("flex flex-col p-2", className), ...props, children });
|
|
2569
2886
|
});
|
|
2570
2887
|
ProfileMenuSection.displayName = "ProfileMenuSection";
|
|
2571
2888
|
var ProfileMenuFooter = ({
|
|
@@ -2577,7 +2894,7 @@ var ProfileMenuFooter = ({
|
|
|
2577
2894
|
}) => {
|
|
2578
2895
|
const store = useDropdownStore(externalStore);
|
|
2579
2896
|
const setOpen = useStore2(store, (s) => s.setOpen);
|
|
2580
|
-
return /* @__PURE__ */
|
|
2897
|
+
return /* @__PURE__ */ jsxs12(
|
|
2581
2898
|
Button_default,
|
|
2582
2899
|
{
|
|
2583
2900
|
variant: "outline",
|
|
@@ -2589,8 +2906,8 @@ var ProfileMenuFooter = ({
|
|
|
2589
2906
|
},
|
|
2590
2907
|
...props,
|
|
2591
2908
|
children: [
|
|
2592
|
-
/* @__PURE__ */
|
|
2593
|
-
/* @__PURE__ */
|
|
2909
|
+
/* @__PURE__ */ jsx15("span", { className: "mr-2 flex items-center", children: /* @__PURE__ */ jsx15(SignOut, { className: "text-inherit" }) }),
|
|
2910
|
+
/* @__PURE__ */ jsx15(Text_default, { color: "inherit", children: "Sair" })
|
|
2594
2911
|
]
|
|
2595
2912
|
}
|
|
2596
2913
|
);
|
|
@@ -2599,7 +2916,7 @@ ProfileMenuFooter.displayName = "ProfileMenuFooter";
|
|
|
2599
2916
|
var DropdownMenu_default = DropdownMenu;
|
|
2600
2917
|
|
|
2601
2918
|
// src/components/ProgressBar/ProgressBar.tsx
|
|
2602
|
-
import { Fragment as Fragment2, jsx as
|
|
2919
|
+
import { Fragment as Fragment2, jsx as jsx16, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
2603
2920
|
var SIZE_CLASSES9 = {
|
|
2604
2921
|
small: {
|
|
2605
2922
|
container: "h-1",
|
|
@@ -2711,20 +3028,20 @@ var renderStackedHitCountDisplay = (showHitCount, showPercentage, clampedValue,
|
|
|
2711
3028
|
max,
|
|
2712
3029
|
percentage
|
|
2713
3030
|
);
|
|
2714
|
-
return /* @__PURE__ */
|
|
3031
|
+
return /* @__PURE__ */ jsx16(
|
|
2715
3032
|
"div",
|
|
2716
3033
|
{
|
|
2717
3034
|
className: cn(
|
|
2718
3035
|
"text-xs font-medium leading-[14px] text-right",
|
|
2719
3036
|
percentageClassName
|
|
2720
3037
|
),
|
|
2721
|
-
children: displayPriority.type === "hitCount" ? /* @__PURE__ */
|
|
2722
|
-
/* @__PURE__ */
|
|
2723
|
-
/* @__PURE__ */
|
|
3038
|
+
children: displayPriority.type === "hitCount" ? /* @__PURE__ */ jsxs13(Fragment2, { children: [
|
|
3039
|
+
/* @__PURE__ */ jsx16("span", { className: "text-success-200", children: Math.round(clampedValue) }),
|
|
3040
|
+
/* @__PURE__ */ jsxs13("span", { className: "text-text-600", children: [
|
|
2724
3041
|
" de ",
|
|
2725
3042
|
max
|
|
2726
3043
|
] })
|
|
2727
|
-
] }) : /* @__PURE__ */
|
|
3044
|
+
] }) : /* @__PURE__ */ jsxs13(Text_default, { size: "xs", weight: "medium", className: "text-success-200", children: [
|
|
2728
3045
|
Math.round(percentage),
|
|
2729
3046
|
"%"
|
|
2730
3047
|
] })
|
|
@@ -2739,7 +3056,7 @@ var ProgressBarBase = ({
|
|
|
2739
3056
|
variantClasses,
|
|
2740
3057
|
containerClassName,
|
|
2741
3058
|
fillClassName
|
|
2742
|
-
}) => /* @__PURE__ */
|
|
3059
|
+
}) => /* @__PURE__ */ jsxs13(
|
|
2743
3060
|
"div",
|
|
2744
3061
|
{
|
|
2745
3062
|
className: cn(
|
|
@@ -2748,7 +3065,7 @@ var ProgressBarBase = ({
|
|
|
2748
3065
|
"overflow-hidden relative"
|
|
2749
3066
|
),
|
|
2750
3067
|
children: [
|
|
2751
|
-
/* @__PURE__ */
|
|
3068
|
+
/* @__PURE__ */ jsx16(
|
|
2752
3069
|
"progress",
|
|
2753
3070
|
{
|
|
2754
3071
|
value: clampedValue,
|
|
@@ -2757,7 +3074,7 @@ var ProgressBarBase = ({
|
|
|
2757
3074
|
className: "absolute inset-0 w-full h-full opacity-0"
|
|
2758
3075
|
}
|
|
2759
3076
|
),
|
|
2760
|
-
/* @__PURE__ */
|
|
3077
|
+
/* @__PURE__ */ jsx16(
|
|
2761
3078
|
"div",
|
|
2762
3079
|
{
|
|
2763
3080
|
className: cn(
|
|
@@ -2783,7 +3100,7 @@ var StackedLayout = ({
|
|
|
2783
3100
|
percentage,
|
|
2784
3101
|
variantClasses,
|
|
2785
3102
|
dimensions
|
|
2786
|
-
}) => /* @__PURE__ */
|
|
3103
|
+
}) => /* @__PURE__ */ jsxs13(
|
|
2787
3104
|
"div",
|
|
2788
3105
|
{
|
|
2789
3106
|
className: cn(
|
|
@@ -2793,8 +3110,8 @@ var StackedLayout = ({
|
|
|
2793
3110
|
className
|
|
2794
3111
|
),
|
|
2795
3112
|
children: [
|
|
2796
|
-
shouldShowHeader(label, showPercentage, showHitCount) && /* @__PURE__ */
|
|
2797
|
-
label && /* @__PURE__ */
|
|
3113
|
+
shouldShowHeader(label, showPercentage, showHitCount) && /* @__PURE__ */ jsxs13("div", { className: "flex flex-row justify-between items-center w-full h-[19px]", children: [
|
|
3114
|
+
label && /* @__PURE__ */ jsx16(
|
|
2798
3115
|
Text_default,
|
|
2799
3116
|
{
|
|
2800
3117
|
as: "div",
|
|
@@ -2813,7 +3130,7 @@ var StackedLayout = ({
|
|
|
2813
3130
|
percentageClassName
|
|
2814
3131
|
)
|
|
2815
3132
|
] }),
|
|
2816
|
-
/* @__PURE__ */
|
|
3133
|
+
/* @__PURE__ */ jsx16(
|
|
2817
3134
|
ProgressBarBase,
|
|
2818
3135
|
{
|
|
2819
3136
|
clampedValue,
|
|
@@ -2855,7 +3172,7 @@ var CompactLayout = ({
|
|
|
2855
3172
|
percentageClassName,
|
|
2856
3173
|
labelClassName
|
|
2857
3174
|
});
|
|
2858
|
-
return /* @__PURE__ */
|
|
3175
|
+
return /* @__PURE__ */ jsxs13(
|
|
2859
3176
|
"div",
|
|
2860
3177
|
{
|
|
2861
3178
|
className: cn(
|
|
@@ -2865,7 +3182,7 @@ var CompactLayout = ({
|
|
|
2865
3182
|
className
|
|
2866
3183
|
),
|
|
2867
3184
|
children: [
|
|
2868
|
-
shouldShowHeader(label, showPercentage, showHitCount) && /* @__PURE__ */
|
|
3185
|
+
shouldShowHeader(label, showPercentage, showHitCount) && /* @__PURE__ */ jsx16(
|
|
2869
3186
|
Text_default,
|
|
2870
3187
|
{
|
|
2871
3188
|
as: "div",
|
|
@@ -2876,7 +3193,7 @@ var CompactLayout = ({
|
|
|
2876
3193
|
children: content
|
|
2877
3194
|
}
|
|
2878
3195
|
),
|
|
2879
|
-
/* @__PURE__ */
|
|
3196
|
+
/* @__PURE__ */ jsx16(
|
|
2880
3197
|
ProgressBarBase,
|
|
2881
3198
|
{
|
|
2882
3199
|
clampedValue,
|
|
@@ -2912,9 +3229,9 @@ var DefaultLayout = ({
|
|
|
2912
3229
|
label,
|
|
2913
3230
|
showPercentage
|
|
2914
3231
|
);
|
|
2915
|
-
return /* @__PURE__ */
|
|
2916
|
-
displayConfig.showHeader && /* @__PURE__ */
|
|
2917
|
-
label && /* @__PURE__ */
|
|
3232
|
+
return /* @__PURE__ */ jsxs13("div", { className: cn("flex", sizeClasses.layout, gapClass, className), children: [
|
|
3233
|
+
displayConfig.showHeader && /* @__PURE__ */ jsxs13("div", { className: "flex flex-row items-center justify-between w-full", children: [
|
|
3234
|
+
label && /* @__PURE__ */ jsx16(
|
|
2918
3235
|
Text_default,
|
|
2919
3236
|
{
|
|
2920
3237
|
as: "div",
|
|
@@ -2927,7 +3244,7 @@ var DefaultLayout = ({
|
|
|
2927
3244
|
children: label
|
|
2928
3245
|
}
|
|
2929
3246
|
),
|
|
2930
|
-
showPercentage && /* @__PURE__ */
|
|
3247
|
+
showPercentage && /* @__PURE__ */ jsxs13(
|
|
2931
3248
|
Text_default,
|
|
2932
3249
|
{
|
|
2933
3250
|
size: "xs",
|
|
@@ -2943,7 +3260,7 @@ var DefaultLayout = ({
|
|
|
2943
3260
|
}
|
|
2944
3261
|
)
|
|
2945
3262
|
] }),
|
|
2946
|
-
/* @__PURE__ */
|
|
3263
|
+
/* @__PURE__ */ jsx16(
|
|
2947
3264
|
ProgressBarBase,
|
|
2948
3265
|
{
|
|
2949
3266
|
clampedValue,
|
|
@@ -2963,7 +3280,7 @@ var DefaultLayout = ({
|
|
|
2963
3280
|
)
|
|
2964
3281
|
}
|
|
2965
3282
|
),
|
|
2966
|
-
displayConfig.showPercentage && /* @__PURE__ */
|
|
3283
|
+
displayConfig.showPercentage && /* @__PURE__ */ jsxs13(
|
|
2967
3284
|
Text_default,
|
|
2968
3285
|
{
|
|
2969
3286
|
size: "xs",
|
|
@@ -2978,7 +3295,7 @@ var DefaultLayout = ({
|
|
|
2978
3295
|
]
|
|
2979
3296
|
}
|
|
2980
3297
|
),
|
|
2981
|
-
displayConfig.showLabel && /* @__PURE__ */
|
|
3298
|
+
displayConfig.showLabel && /* @__PURE__ */ jsx16(
|
|
2982
3299
|
Text_default,
|
|
2983
3300
|
{
|
|
2984
3301
|
as: "div",
|
|
@@ -3014,7 +3331,7 @@ var ProgressBar = ({
|
|
|
3014
3331
|
const sizeClasses = SIZE_CLASSES9[size];
|
|
3015
3332
|
const variantClasses = VARIANT_CLASSES2[variant];
|
|
3016
3333
|
if (layout === "stacked") {
|
|
3017
|
-
return /* @__PURE__ */
|
|
3334
|
+
return /* @__PURE__ */ jsx16(
|
|
3018
3335
|
StackedLayout,
|
|
3019
3336
|
{
|
|
3020
3337
|
className,
|
|
@@ -3035,7 +3352,7 @@ var ProgressBar = ({
|
|
|
3035
3352
|
);
|
|
3036
3353
|
}
|
|
3037
3354
|
if (layout === "compact") {
|
|
3038
|
-
return /* @__PURE__ */
|
|
3355
|
+
return /* @__PURE__ */ jsx16(
|
|
3039
3356
|
CompactLayout,
|
|
3040
3357
|
{
|
|
3041
3358
|
className,
|
|
@@ -3055,7 +3372,7 @@ var ProgressBar = ({
|
|
|
3055
3372
|
}
|
|
3056
3373
|
);
|
|
3057
3374
|
}
|
|
3058
|
-
return /* @__PURE__ */
|
|
3375
|
+
return /* @__PURE__ */ jsx16(
|
|
3059
3376
|
DefaultLayout,
|
|
3060
3377
|
{
|
|
3061
3378
|
className,
|
|
@@ -3081,7 +3398,7 @@ import {
|
|
|
3081
3398
|
useEffect as useEffect6,
|
|
3082
3399
|
useRef as useRef3
|
|
3083
3400
|
} from "react";
|
|
3084
|
-
import { jsx as
|
|
3401
|
+
import { jsx as jsx17, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
3085
3402
|
var WEEK_DAYS = ["SEG", "TER", "QUA", "QUI", "SEX", "S\xC1B", "DOM"];
|
|
3086
3403
|
var WEEK_DAYS_SHORT = ["S", "T", "Q", "Q", "S", "S", "D"];
|
|
3087
3404
|
var MONTH_NAMES = [
|
|
@@ -3104,15 +3421,15 @@ var MonthYearPicker = ({
|
|
|
3104
3421
|
currentDate,
|
|
3105
3422
|
onYearChange,
|
|
3106
3423
|
onMonthChange
|
|
3107
|
-
}) => /* @__PURE__ */
|
|
3424
|
+
}) => /* @__PURE__ */ jsxs14(
|
|
3108
3425
|
"div",
|
|
3109
3426
|
{
|
|
3110
3427
|
ref: monthPickerRef,
|
|
3111
3428
|
className: "absolute top-full left-0 z-50 mt-1 bg-background rounded-lg shadow-lg border border-border-200 p-4 min-w-[280px]",
|
|
3112
3429
|
children: [
|
|
3113
|
-
/* @__PURE__ */
|
|
3114
|
-
/* @__PURE__ */
|
|
3115
|
-
/* @__PURE__ */
|
|
3430
|
+
/* @__PURE__ */ jsxs14("div", { className: "mb-4", children: [
|
|
3431
|
+
/* @__PURE__ */ jsx17("h3", { className: "text-sm font-medium text-text-700 mb-2", children: "Selecionar Ano" }),
|
|
3432
|
+
/* @__PURE__ */ jsx17("div", { className: "grid grid-cols-4 gap-1 max-h-32 overflow-y-auto", children: availableYears.map((year) => /* @__PURE__ */ jsx17(
|
|
3116
3433
|
"button",
|
|
3117
3434
|
{
|
|
3118
3435
|
onClick: () => onYearChange(year),
|
|
@@ -3125,9 +3442,9 @@ var MonthYearPicker = ({
|
|
|
3125
3442
|
year
|
|
3126
3443
|
)) })
|
|
3127
3444
|
] }),
|
|
3128
|
-
/* @__PURE__ */
|
|
3129
|
-
/* @__PURE__ */
|
|
3130
|
-
/* @__PURE__ */
|
|
3445
|
+
/* @__PURE__ */ jsxs14("div", { children: [
|
|
3446
|
+
/* @__PURE__ */ jsx17("h3", { className: "text-sm font-medium text-text-700 mb-2", children: "Selecionar M\xEAs" }),
|
|
3447
|
+
/* @__PURE__ */ jsx17("div", { className: "grid grid-cols-3 gap-1", children: MONTH_NAMES.map((month, index) => /* @__PURE__ */ jsx17(
|
|
3131
3448
|
"button",
|
|
3132
3449
|
{
|
|
3133
3450
|
onClick: () => onMonthChange(index, currentDate.getFullYear()),
|
|
@@ -3259,28 +3576,28 @@ var Calendar = ({
|
|
|
3259
3576
|
onDateSelect?.(day.date);
|
|
3260
3577
|
};
|
|
3261
3578
|
if (variant === "navigation") {
|
|
3262
|
-
return /* @__PURE__ */
|
|
3263
|
-
/* @__PURE__ */
|
|
3264
|
-
/* @__PURE__ */
|
|
3265
|
-
/* @__PURE__ */
|
|
3579
|
+
return /* @__PURE__ */ jsxs14("div", { className: cn("bg-background rounded-xl pt-6", className), children: [
|
|
3580
|
+
/* @__PURE__ */ jsxs14("div", { className: "flex items-center justify-between mb-4 px-6", children: [
|
|
3581
|
+
/* @__PURE__ */ jsxs14("div", { className: "relative", ref: monthPickerContainerRef, children: [
|
|
3582
|
+
/* @__PURE__ */ jsxs14(
|
|
3266
3583
|
"button",
|
|
3267
3584
|
{
|
|
3268
3585
|
onClick: toggleMonthPicker,
|
|
3269
3586
|
className: "flex items-center group gap-1 rounded transition-colors cursor-pointer",
|
|
3270
3587
|
children: [
|
|
3271
|
-
/* @__PURE__ */
|
|
3588
|
+
/* @__PURE__ */ jsxs14("span", { className: "text-sm font-medium text-text-600 group-hover:text-primary-950", children: [
|
|
3272
3589
|
MONTH_NAMES[currentDate.getMonth()],
|
|
3273
3590
|
" ",
|
|
3274
3591
|
currentDate.getFullYear()
|
|
3275
3592
|
] }),
|
|
3276
|
-
/* @__PURE__ */
|
|
3593
|
+
/* @__PURE__ */ jsx17(
|
|
3277
3594
|
"svg",
|
|
3278
3595
|
{
|
|
3279
3596
|
className: `w-4 h-4 text-primary-950 transition-transform ${isMonthPickerOpen ? "rotate-180" : ""}`,
|
|
3280
3597
|
fill: "none",
|
|
3281
3598
|
stroke: "currentColor",
|
|
3282
3599
|
viewBox: "0 0 24 24",
|
|
3283
|
-
children: /* @__PURE__ */
|
|
3600
|
+
children: /* @__PURE__ */ jsx17(
|
|
3284
3601
|
"path",
|
|
3285
3602
|
{
|
|
3286
3603
|
strokeLinecap: "round",
|
|
@@ -3294,7 +3611,7 @@ var Calendar = ({
|
|
|
3294
3611
|
]
|
|
3295
3612
|
}
|
|
3296
3613
|
),
|
|
3297
|
-
isMonthPickerOpen && /* @__PURE__ */
|
|
3614
|
+
isMonthPickerOpen && /* @__PURE__ */ jsx17(
|
|
3298
3615
|
MonthYearPicker,
|
|
3299
3616
|
{
|
|
3300
3617
|
monthPickerRef,
|
|
@@ -3305,21 +3622,21 @@ var Calendar = ({
|
|
|
3305
3622
|
}
|
|
3306
3623
|
)
|
|
3307
3624
|
] }),
|
|
3308
|
-
/* @__PURE__ */
|
|
3309
|
-
/* @__PURE__ */
|
|
3625
|
+
/* @__PURE__ */ jsxs14("div", { className: "flex items-center gap-10", children: [
|
|
3626
|
+
/* @__PURE__ */ jsx17(
|
|
3310
3627
|
"button",
|
|
3311
3628
|
{
|
|
3312
3629
|
onClick: goToPreviousMonth,
|
|
3313
3630
|
className: "p-1 rounded hover:bg-background-100 transition-colors",
|
|
3314
3631
|
"aria-label": "M\xEAs anterior",
|
|
3315
|
-
children: /* @__PURE__ */
|
|
3632
|
+
children: /* @__PURE__ */ jsx17(
|
|
3316
3633
|
"svg",
|
|
3317
3634
|
{
|
|
3318
3635
|
className: "w-6 h-6 text-primary-950",
|
|
3319
3636
|
fill: "none",
|
|
3320
3637
|
stroke: "currentColor",
|
|
3321
3638
|
viewBox: "0 0 24 24",
|
|
3322
|
-
children: /* @__PURE__ */
|
|
3639
|
+
children: /* @__PURE__ */ jsx17(
|
|
3323
3640
|
"path",
|
|
3324
3641
|
{
|
|
3325
3642
|
strokeLinecap: "round",
|
|
@@ -3332,20 +3649,20 @@ var Calendar = ({
|
|
|
3332
3649
|
)
|
|
3333
3650
|
}
|
|
3334
3651
|
),
|
|
3335
|
-
/* @__PURE__ */
|
|
3652
|
+
/* @__PURE__ */ jsx17(
|
|
3336
3653
|
"button",
|
|
3337
3654
|
{
|
|
3338
3655
|
onClick: goToNextMonth,
|
|
3339
3656
|
className: "p-1 rounded hover:bg-background-100 transition-colors",
|
|
3340
3657
|
"aria-label": "Pr\xF3ximo m\xEAs",
|
|
3341
|
-
children: /* @__PURE__ */
|
|
3658
|
+
children: /* @__PURE__ */ jsx17(
|
|
3342
3659
|
"svg",
|
|
3343
3660
|
{
|
|
3344
3661
|
className: "w-6 h-6 text-primary-950",
|
|
3345
3662
|
fill: "none",
|
|
3346
3663
|
stroke: "currentColor",
|
|
3347
3664
|
viewBox: "0 0 24 24",
|
|
3348
|
-
children: /* @__PURE__ */
|
|
3665
|
+
children: /* @__PURE__ */ jsx17(
|
|
3349
3666
|
"path",
|
|
3350
3667
|
{
|
|
3351
3668
|
strokeLinecap: "round",
|
|
@@ -3360,7 +3677,7 @@ var Calendar = ({
|
|
|
3360
3677
|
)
|
|
3361
3678
|
] })
|
|
3362
3679
|
] }),
|
|
3363
|
-
/* @__PURE__ */
|
|
3680
|
+
/* @__PURE__ */ jsx17("div", { className: "grid grid-cols-7 gap-1 mb-2 px-3", children: WEEK_DAYS_SHORT.map((day, index) => /* @__PURE__ */ jsx17(
|
|
3364
3681
|
"div",
|
|
3365
3682
|
{
|
|
3366
3683
|
className: "h-9 flex items-center justify-center text-xs font-normal text-text-600",
|
|
@@ -3368,13 +3685,13 @@ var Calendar = ({
|
|
|
3368
3685
|
},
|
|
3369
3686
|
`${day}-${index}`
|
|
3370
3687
|
)) }),
|
|
3371
|
-
/* @__PURE__ */
|
|
3688
|
+
/* @__PURE__ */ jsx17("div", { className: "grid grid-cols-7 gap-1 px-3", children: calendarData.map((day) => {
|
|
3372
3689
|
if (!day.isCurrentMonth) {
|
|
3373
|
-
return /* @__PURE__ */
|
|
3690
|
+
return /* @__PURE__ */ jsx17(
|
|
3374
3691
|
"div",
|
|
3375
3692
|
{
|
|
3376
3693
|
className: "flex items-center justify-center",
|
|
3377
|
-
children: /* @__PURE__ */
|
|
3694
|
+
children: /* @__PURE__ */ jsx17("div", { className: "w-9 h-9" })
|
|
3378
3695
|
},
|
|
3379
3696
|
day.date.getTime()
|
|
3380
3697
|
);
|
|
@@ -3390,11 +3707,11 @@ var Calendar = ({
|
|
|
3390
3707
|
} else if (day.isSelected) {
|
|
3391
3708
|
spanClass = "h-6 w-6 rounded-full bg-primary-950 text-text";
|
|
3392
3709
|
}
|
|
3393
|
-
return /* @__PURE__ */
|
|
3710
|
+
return /* @__PURE__ */ jsx17(
|
|
3394
3711
|
"div",
|
|
3395
3712
|
{
|
|
3396
3713
|
className: "flex items-center justify-center",
|
|
3397
|
-
children: /* @__PURE__ */
|
|
3714
|
+
children: /* @__PURE__ */ jsx17(
|
|
3398
3715
|
"button",
|
|
3399
3716
|
{
|
|
3400
3717
|
className: `
|
|
@@ -3410,7 +3727,7 @@ var Calendar = ({
|
|
|
3410
3727
|
"aria-label": `${day.date.getDate()} de ${MONTH_NAMES[day.date.getMonth()]}`,
|
|
3411
3728
|
"aria-current": day.isToday ? "date" : void 0,
|
|
3412
3729
|
tabIndex: 0,
|
|
3413
|
-
children: /* @__PURE__ */
|
|
3730
|
+
children: /* @__PURE__ */ jsx17("span", { className: spanClass, children: day.date.getDate() })
|
|
3414
3731
|
}
|
|
3415
3732
|
)
|
|
3416
3733
|
},
|
|
@@ -3419,28 +3736,28 @@ var Calendar = ({
|
|
|
3419
3736
|
}) })
|
|
3420
3737
|
] });
|
|
3421
3738
|
}
|
|
3422
|
-
return /* @__PURE__ */
|
|
3423
|
-
/* @__PURE__ */
|
|
3424
|
-
/* @__PURE__ */
|
|
3425
|
-
/* @__PURE__ */
|
|
3739
|
+
return /* @__PURE__ */ jsxs14("div", { className: cn("bg-background rounded-xl p-4", className), children: [
|
|
3740
|
+
/* @__PURE__ */ jsxs14("div", { className: "flex items-center justify-between mb-3.5", children: [
|
|
3741
|
+
/* @__PURE__ */ jsxs14("div", { className: "relative", ref: monthPickerContainerRef, children: [
|
|
3742
|
+
/* @__PURE__ */ jsxs14(
|
|
3426
3743
|
"button",
|
|
3427
3744
|
{
|
|
3428
3745
|
onClick: toggleMonthPicker,
|
|
3429
3746
|
className: "flex items-center gap-2 hover:bg-background-100 rounded px-2 py-1 transition-colors",
|
|
3430
3747
|
children: [
|
|
3431
|
-
/* @__PURE__ */
|
|
3748
|
+
/* @__PURE__ */ jsxs14("h2", { className: "text-lg font-semibold text-text-950", children: [
|
|
3432
3749
|
MONTH_NAMES[currentDate.getMonth()],
|
|
3433
3750
|
" ",
|
|
3434
3751
|
currentDate.getFullYear()
|
|
3435
3752
|
] }),
|
|
3436
|
-
/* @__PURE__ */
|
|
3753
|
+
/* @__PURE__ */ jsx17(
|
|
3437
3754
|
"svg",
|
|
3438
3755
|
{
|
|
3439
3756
|
className: `w-4 h-4 text-text-400 transition-transform ${isMonthPickerOpen ? "rotate-180" : ""}`,
|
|
3440
3757
|
fill: "none",
|
|
3441
3758
|
stroke: "currentColor",
|
|
3442
3759
|
viewBox: "0 0 24 24",
|
|
3443
|
-
children: /* @__PURE__ */
|
|
3760
|
+
children: /* @__PURE__ */ jsx17(
|
|
3444
3761
|
"path",
|
|
3445
3762
|
{
|
|
3446
3763
|
strokeLinecap: "round",
|
|
@@ -3454,7 +3771,7 @@ var Calendar = ({
|
|
|
3454
3771
|
]
|
|
3455
3772
|
}
|
|
3456
3773
|
),
|
|
3457
|
-
isMonthPickerOpen && /* @__PURE__ */
|
|
3774
|
+
isMonthPickerOpen && /* @__PURE__ */ jsx17(
|
|
3458
3775
|
MonthYearPicker,
|
|
3459
3776
|
{
|
|
3460
3777
|
monthPickerRef,
|
|
@@ -3465,21 +3782,21 @@ var Calendar = ({
|
|
|
3465
3782
|
}
|
|
3466
3783
|
)
|
|
3467
3784
|
] }),
|
|
3468
|
-
/* @__PURE__ */
|
|
3469
|
-
/* @__PURE__ */
|
|
3785
|
+
/* @__PURE__ */ jsxs14("div", { className: "flex items-center gap-1", children: [
|
|
3786
|
+
/* @__PURE__ */ jsx17(
|
|
3470
3787
|
"button",
|
|
3471
3788
|
{
|
|
3472
3789
|
onClick: goToPreviousMonth,
|
|
3473
3790
|
className: "p-1 rounded-md hover:bg-background-100 transition-colors",
|
|
3474
3791
|
"aria-label": "M\xEAs anterior",
|
|
3475
|
-
children: /* @__PURE__ */
|
|
3792
|
+
children: /* @__PURE__ */ jsx17(
|
|
3476
3793
|
"svg",
|
|
3477
3794
|
{
|
|
3478
3795
|
className: "w-6 h-6 text-primary-950",
|
|
3479
3796
|
fill: "none",
|
|
3480
3797
|
stroke: "currentColor",
|
|
3481
3798
|
viewBox: "0 0 24 24",
|
|
3482
|
-
children: /* @__PURE__ */
|
|
3799
|
+
children: /* @__PURE__ */ jsx17(
|
|
3483
3800
|
"path",
|
|
3484
3801
|
{
|
|
3485
3802
|
strokeLinecap: "round",
|
|
@@ -3492,20 +3809,20 @@ var Calendar = ({
|
|
|
3492
3809
|
)
|
|
3493
3810
|
}
|
|
3494
3811
|
),
|
|
3495
|
-
/* @__PURE__ */
|
|
3812
|
+
/* @__PURE__ */ jsx17(
|
|
3496
3813
|
"button",
|
|
3497
3814
|
{
|
|
3498
3815
|
onClick: goToNextMonth,
|
|
3499
3816
|
className: "p-1 rounded-md hover:bg-background-100 transition-colors",
|
|
3500
3817
|
"aria-label": "Pr\xF3ximo m\xEAs",
|
|
3501
|
-
children: /* @__PURE__ */
|
|
3818
|
+
children: /* @__PURE__ */ jsx17(
|
|
3502
3819
|
"svg",
|
|
3503
3820
|
{
|
|
3504
3821
|
className: "w-6 h-6 text-primary-950",
|
|
3505
3822
|
fill: "none",
|
|
3506
3823
|
stroke: "currentColor",
|
|
3507
3824
|
viewBox: "0 0 24 24",
|
|
3508
|
-
children: /* @__PURE__ */
|
|
3825
|
+
children: /* @__PURE__ */ jsx17(
|
|
3509
3826
|
"path",
|
|
3510
3827
|
{
|
|
3511
3828
|
strokeLinecap: "round",
|
|
@@ -3520,7 +3837,7 @@ var Calendar = ({
|
|
|
3520
3837
|
)
|
|
3521
3838
|
] })
|
|
3522
3839
|
] }),
|
|
3523
|
-
/* @__PURE__ */
|
|
3840
|
+
/* @__PURE__ */ jsx17("div", { className: "grid grid-cols-7 mb-2", children: WEEK_DAYS.map((day) => /* @__PURE__ */ jsx17(
|
|
3524
3841
|
"div",
|
|
3525
3842
|
{
|
|
3526
3843
|
className: "h-4 flex items-center justify-center text-xs font-semibold text-text-500",
|
|
@@ -3528,13 +3845,13 @@ var Calendar = ({
|
|
|
3528
3845
|
},
|
|
3529
3846
|
day
|
|
3530
3847
|
)) }),
|
|
3531
|
-
/* @__PURE__ */
|
|
3848
|
+
/* @__PURE__ */ jsx17("div", { className: "grid grid-cols-7", children: calendarData.map((day) => {
|
|
3532
3849
|
if (!day.isCurrentMonth) {
|
|
3533
|
-
return /* @__PURE__ */
|
|
3850
|
+
return /* @__PURE__ */ jsx17(
|
|
3534
3851
|
"div",
|
|
3535
3852
|
{
|
|
3536
3853
|
className: "flex items-center justify-center",
|
|
3537
|
-
children: /* @__PURE__ */
|
|
3854
|
+
children: /* @__PURE__ */ jsx17("div", { className: "w-10 h-10" })
|
|
3538
3855
|
},
|
|
3539
3856
|
day.date.getTime()
|
|
3540
3857
|
);
|
|
@@ -3544,11 +3861,11 @@ var Calendar = ({
|
|
|
3544
3861
|
variant,
|
|
3545
3862
|
showActivities
|
|
3546
3863
|
);
|
|
3547
|
-
return /* @__PURE__ */
|
|
3864
|
+
return /* @__PURE__ */ jsx17(
|
|
3548
3865
|
"div",
|
|
3549
3866
|
{
|
|
3550
3867
|
className: "flex items-center justify-center",
|
|
3551
|
-
children: /* @__PURE__ */
|
|
3868
|
+
children: /* @__PURE__ */ jsx17(
|
|
3552
3869
|
"button",
|
|
3553
3870
|
{
|
|
3554
3871
|
className: `
|
|
@@ -3579,7 +3896,7 @@ var Calendar_default = Calendar;
|
|
|
3579
3896
|
// src/components/DateTimeInput/DateTimeInput.tsx
|
|
3580
3897
|
import { useRef as useRef4, useState as useState8 } from "react";
|
|
3581
3898
|
import { CalendarBlank } from "phosphor-react";
|
|
3582
|
-
import { jsx as
|
|
3899
|
+
import { jsx as jsx18, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
3583
3900
|
var formatDateToInput = (dateObj) => {
|
|
3584
3901
|
const year = dateObj.getFullYear();
|
|
3585
3902
|
const month = String(dateObj.getMonth() + 1).padStart(2, "0");
|
|
@@ -3634,7 +3951,7 @@ var DateTimeInput = ({
|
|
|
3634
3951
|
onTimeChange(e.target.value);
|
|
3635
3952
|
};
|
|
3636
3953
|
const inputValue = date ? `${date}T${time || defaultTime}` : "";
|
|
3637
|
-
return /* @__PURE__ */
|
|
3954
|
+
return /* @__PURE__ */ jsxs15(
|
|
3638
3955
|
DropdownMenu_default,
|
|
3639
3956
|
{
|
|
3640
3957
|
open: !disabled && isCalendarOpen,
|
|
@@ -3644,13 +3961,13 @@ var DateTimeInput = ({
|
|
|
3644
3961
|
}
|
|
3645
3962
|
},
|
|
3646
3963
|
children: [
|
|
3647
|
-
/* @__PURE__ */
|
|
3964
|
+
/* @__PURE__ */ jsx18(
|
|
3648
3965
|
DropdownMenuTrigger,
|
|
3649
3966
|
{
|
|
3650
3967
|
className,
|
|
3651
3968
|
ref: triggerRef,
|
|
3652
3969
|
disabled,
|
|
3653
|
-
children: /* @__PURE__ */
|
|
3970
|
+
children: /* @__PURE__ */ jsx18(
|
|
3654
3971
|
Input_default,
|
|
3655
3972
|
{
|
|
3656
3973
|
label,
|
|
@@ -3662,13 +3979,13 @@ var DateTimeInput = ({
|
|
|
3662
3979
|
errorMessage,
|
|
3663
3980
|
disabled,
|
|
3664
3981
|
"data-testid": testId ? `${testId}-input` : void 0,
|
|
3665
|
-
iconRight: /* @__PURE__ */
|
|
3982
|
+
iconRight: /* @__PURE__ */ jsx18(CalendarBlank, { size: 14 }),
|
|
3666
3983
|
className: "[&::-webkit-calendar-picker-indicator]:hidden"
|
|
3667
3984
|
}
|
|
3668
3985
|
)
|
|
3669
3986
|
}
|
|
3670
3987
|
),
|
|
3671
|
-
/* @__PURE__ */
|
|
3988
|
+
/* @__PURE__ */ jsxs15(
|
|
3672
3989
|
DropdownMenuContent,
|
|
3673
3990
|
{
|
|
3674
3991
|
align: "start",
|
|
@@ -3676,7 +3993,7 @@ var DateTimeInput = ({
|
|
|
3676
3993
|
portal: true,
|
|
3677
3994
|
triggerRef,
|
|
3678
3995
|
children: [
|
|
3679
|
-
/* @__PURE__ */
|
|
3996
|
+
/* @__PURE__ */ jsx18(
|
|
3680
3997
|
Calendar_default,
|
|
3681
3998
|
{
|
|
3682
3999
|
variant: "selection",
|
|
@@ -3685,7 +4002,7 @@ var DateTimeInput = ({
|
|
|
3685
4002
|
showActivities: false
|
|
3686
4003
|
}
|
|
3687
4004
|
),
|
|
3688
|
-
/* @__PURE__ */
|
|
4005
|
+
/* @__PURE__ */ jsx18("div", { className: "p-3 border-t border-border-200", children: /* @__PURE__ */ jsx18(
|
|
3689
4006
|
Input_default,
|
|
3690
4007
|
{
|
|
3691
4008
|
label: timeLabel,
|
|
@@ -3739,8 +4056,8 @@ import { cloneElement as cloneElement3 } from "react";
|
|
|
3739
4056
|
import * as PhosphorIcons from "phosphor-react";
|
|
3740
4057
|
|
|
3741
4058
|
// src/assets/icons/subjects/ChatPT.tsx
|
|
3742
|
-
import { jsx as
|
|
3743
|
-
var ChatPT = ({ size, color }) => /* @__PURE__ */
|
|
4059
|
+
import { jsx as jsx19, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
4060
|
+
var ChatPT = ({ size, color }) => /* @__PURE__ */ jsxs16(
|
|
3744
4061
|
"svg",
|
|
3745
4062
|
{
|
|
3746
4063
|
width: size,
|
|
@@ -3749,21 +4066,21 @@ var ChatPT = ({ size, color }) => /* @__PURE__ */ jsxs15(
|
|
|
3749
4066
|
fill: "none",
|
|
3750
4067
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3751
4068
|
children: [
|
|
3752
|
-
/* @__PURE__ */
|
|
4069
|
+
/* @__PURE__ */ jsx19(
|
|
3753
4070
|
"path",
|
|
3754
4071
|
{
|
|
3755
4072
|
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",
|
|
3756
4073
|
fill: color
|
|
3757
4074
|
}
|
|
3758
4075
|
),
|
|
3759
|
-
/* @__PURE__ */
|
|
4076
|
+
/* @__PURE__ */ jsx19(
|
|
3760
4077
|
"path",
|
|
3761
4078
|
{
|
|
3762
4079
|
d: "M21.1758 12V20.5312H19.7168V12H21.1758ZM23.8535 12V13.1719H17.0625V12H23.8535Z",
|
|
3763
4080
|
fill: color
|
|
3764
4081
|
}
|
|
3765
4082
|
),
|
|
3766
|
-
/* @__PURE__ */
|
|
4083
|
+
/* @__PURE__ */ jsx19(
|
|
3767
4084
|
"path",
|
|
3768
4085
|
{
|
|
3769
4086
|
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",
|
|
@@ -3775,8 +4092,8 @@ var ChatPT = ({ size, color }) => /* @__PURE__ */ jsxs15(
|
|
|
3775
4092
|
);
|
|
3776
4093
|
|
|
3777
4094
|
// src/assets/icons/subjects/ChatEN.tsx
|
|
3778
|
-
import { jsx as
|
|
3779
|
-
var ChatEN = ({ size, color }) => /* @__PURE__ */
|
|
4095
|
+
import { jsx as jsx20, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
4096
|
+
var ChatEN = ({ size, color }) => /* @__PURE__ */ jsxs17(
|
|
3780
4097
|
"svg",
|
|
3781
4098
|
{
|
|
3782
4099
|
width: size,
|
|
@@ -3785,21 +4102,21 @@ var ChatEN = ({ size, color }) => /* @__PURE__ */ jsxs16(
|
|
|
3785
4102
|
fill: "none",
|
|
3786
4103
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3787
4104
|
children: [
|
|
3788
|
-
/* @__PURE__ */
|
|
4105
|
+
/* @__PURE__ */ jsx20(
|
|
3789
4106
|
"path",
|
|
3790
4107
|
{
|
|
3791
4108
|
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",
|
|
3792
4109
|
fill: color
|
|
3793
4110
|
}
|
|
3794
4111
|
),
|
|
3795
|
-
/* @__PURE__ */
|
|
4112
|
+
/* @__PURE__ */ jsx20(
|
|
3796
4113
|
"path",
|
|
3797
4114
|
{
|
|
3798
4115
|
d: "M22.5488 12V20.5312H21.0781L17.252 14.4199V20.5312H15.7812V12H17.252L21.0898 18.123V12H22.5488Z",
|
|
3799
4116
|
fill: color
|
|
3800
4117
|
}
|
|
3801
4118
|
),
|
|
3802
|
-
/* @__PURE__ */
|
|
4119
|
+
/* @__PURE__ */ jsx20(
|
|
3803
4120
|
"path",
|
|
3804
4121
|
{
|
|
3805
4122
|
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",
|
|
@@ -3811,8 +4128,8 @@ var ChatEN = ({ size, color }) => /* @__PURE__ */ jsxs16(
|
|
|
3811
4128
|
);
|
|
3812
4129
|
|
|
3813
4130
|
// src/assets/icons/subjects/ChatES.tsx
|
|
3814
|
-
import { jsx as
|
|
3815
|
-
var ChatES = ({ size, color }) => /* @__PURE__ */
|
|
4131
|
+
import { jsx as jsx21, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
4132
|
+
var ChatES = ({ size, color }) => /* @__PURE__ */ jsxs18(
|
|
3816
4133
|
"svg",
|
|
3817
4134
|
{
|
|
3818
4135
|
width: size,
|
|
@@ -3821,21 +4138,21 @@ var ChatES = ({ size, color }) => /* @__PURE__ */ jsxs17(
|
|
|
3821
4138
|
fill: "none",
|
|
3822
4139
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3823
4140
|
children: [
|
|
3824
|
-
/* @__PURE__ */
|
|
4141
|
+
/* @__PURE__ */ jsx21(
|
|
3825
4142
|
"path",
|
|
3826
4143
|
{
|
|
3827
4144
|
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",
|
|
3828
4145
|
fill: color
|
|
3829
4146
|
}
|
|
3830
4147
|
),
|
|
3831
|
-
/* @__PURE__ */
|
|
4148
|
+
/* @__PURE__ */ jsx21(
|
|
3832
4149
|
"path",
|
|
3833
4150
|
{
|
|
3834
4151
|
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",
|
|
3835
4152
|
fill: color
|
|
3836
4153
|
}
|
|
3837
4154
|
),
|
|
3838
|
-
/* @__PURE__ */
|
|
4155
|
+
/* @__PURE__ */ jsx21(
|
|
3839
4156
|
"path",
|
|
3840
4157
|
{
|
|
3841
4158
|
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",
|
|
@@ -3847,7 +4164,7 @@ var ChatES = ({ size, color }) => /* @__PURE__ */ jsxs17(
|
|
|
3847
4164
|
);
|
|
3848
4165
|
|
|
3849
4166
|
// src/components/IconRender/IconRender.tsx
|
|
3850
|
-
import { jsx as
|
|
4167
|
+
import { jsx as jsx22 } from "react/jsx-runtime";
|
|
3851
4168
|
var IconRender = ({
|
|
3852
4169
|
iconName,
|
|
3853
4170
|
color = "#000000",
|
|
@@ -3857,14 +4174,14 @@ var IconRender = ({
|
|
|
3857
4174
|
if (typeof iconName === "string") {
|
|
3858
4175
|
switch (iconName) {
|
|
3859
4176
|
case "Chat_PT":
|
|
3860
|
-
return /* @__PURE__ */
|
|
4177
|
+
return /* @__PURE__ */ jsx22(ChatPT, { size, color });
|
|
3861
4178
|
case "Chat_EN":
|
|
3862
|
-
return /* @__PURE__ */
|
|
4179
|
+
return /* @__PURE__ */ jsx22(ChatEN, { size, color });
|
|
3863
4180
|
case "Chat_ES":
|
|
3864
|
-
return /* @__PURE__ */
|
|
4181
|
+
return /* @__PURE__ */ jsx22(ChatES, { size, color });
|
|
3865
4182
|
default: {
|
|
3866
4183
|
const IconComponent = PhosphorIcons[iconName] || PhosphorIcons.Question;
|
|
3867
|
-
return /* @__PURE__ */
|
|
4184
|
+
return /* @__PURE__ */ jsx22(IconComponent, { size, color, weight });
|
|
3868
4185
|
}
|
|
3869
4186
|
}
|
|
3870
4187
|
} else {
|
|
@@ -3877,7 +4194,7 @@ var IconRender = ({
|
|
|
3877
4194
|
var IconRender_default = IconRender;
|
|
3878
4195
|
|
|
3879
4196
|
// src/components/Card/Card.tsx
|
|
3880
|
-
import { Fragment as Fragment4, jsx as
|
|
4197
|
+
import { Fragment as Fragment4, jsx as jsx23, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
3881
4198
|
var CARD_BASE_CLASSES = {
|
|
3882
4199
|
default: "w-full bg-background border border-border-50 rounded-xl",
|
|
3883
4200
|
compact: "w-full bg-background border border-border-50 rounded-lg",
|
|
@@ -3919,7 +4236,7 @@ var CardBase = forwardRef7(
|
|
|
3919
4236
|
const minHeightClasses = CARD_MIN_HEIGHT_CLASSES[minHeight];
|
|
3920
4237
|
const layoutClasses = CARD_LAYOUT_CLASSES[layout];
|
|
3921
4238
|
const cursorClasses = CARD_CURSOR_CLASSES[cursor];
|
|
3922
|
-
return /* @__PURE__ */
|
|
4239
|
+
return /* @__PURE__ */ jsx23(
|
|
3923
4240
|
"div",
|
|
3924
4241
|
{
|
|
3925
4242
|
ref,
|
|
@@ -3977,7 +4294,7 @@ var CardActivitiesResults = forwardRef7(
|
|
|
3977
4294
|
const actionIconClasses = ACTION_ICON_CLASSES[action];
|
|
3978
4295
|
const actionSubTitleClasses = ACTION_SUBTITLE_CLASSES[action];
|
|
3979
4296
|
const actionHeaderClasses = ACTION_HEADER_CLASSES[action];
|
|
3980
|
-
return /* @__PURE__ */
|
|
4297
|
+
return /* @__PURE__ */ jsxs19(
|
|
3981
4298
|
"div",
|
|
3982
4299
|
{
|
|
3983
4300
|
ref,
|
|
@@ -3987,7 +4304,7 @@ var CardActivitiesResults = forwardRef7(
|
|
|
3987
4304
|
),
|
|
3988
4305
|
...props,
|
|
3989
4306
|
children: [
|
|
3990
|
-
/* @__PURE__ */
|
|
4307
|
+
/* @__PURE__ */ jsxs19(
|
|
3991
4308
|
"div",
|
|
3992
4309
|
{
|
|
3993
4310
|
className: cn(
|
|
@@ -3996,7 +4313,7 @@ var CardActivitiesResults = forwardRef7(
|
|
|
3996
4313
|
extended ? "rounded-t-xl" : "rounded-xl"
|
|
3997
4314
|
),
|
|
3998
4315
|
children: [
|
|
3999
|
-
/* @__PURE__ */
|
|
4316
|
+
/* @__PURE__ */ jsx23(
|
|
4000
4317
|
"span",
|
|
4001
4318
|
{
|
|
4002
4319
|
className: cn(
|
|
@@ -4006,7 +4323,7 @@ var CardActivitiesResults = forwardRef7(
|
|
|
4006
4323
|
children: icon
|
|
4007
4324
|
}
|
|
4008
4325
|
),
|
|
4009
|
-
/* @__PURE__ */
|
|
4326
|
+
/* @__PURE__ */ jsx23(
|
|
4010
4327
|
Text_default,
|
|
4011
4328
|
{
|
|
4012
4329
|
size: "2xs",
|
|
@@ -4015,7 +4332,7 @@ var CardActivitiesResults = forwardRef7(
|
|
|
4015
4332
|
children: title
|
|
4016
4333
|
}
|
|
4017
4334
|
),
|
|
4018
|
-
/* @__PURE__ */
|
|
4335
|
+
/* @__PURE__ */ jsx23(
|
|
4019
4336
|
"p",
|
|
4020
4337
|
{
|
|
4021
4338
|
className: cn("text-lg font-bold truncate", actionSubTitleClasses),
|
|
@@ -4025,8 +4342,8 @@ var CardActivitiesResults = forwardRef7(
|
|
|
4025
4342
|
]
|
|
4026
4343
|
}
|
|
4027
4344
|
),
|
|
4028
|
-
extended && /* @__PURE__ */
|
|
4029
|
-
/* @__PURE__ */
|
|
4345
|
+
extended && /* @__PURE__ */ jsxs19("div", { className: "flex flex-col items-center gap-2.5 pb-9.5 pt-2.5", children: [
|
|
4346
|
+
/* @__PURE__ */ jsx23(
|
|
4030
4347
|
"p",
|
|
4031
4348
|
{
|
|
4032
4349
|
className: cn(
|
|
@@ -4036,7 +4353,7 @@ var CardActivitiesResults = forwardRef7(
|
|
|
4036
4353
|
children: header
|
|
4037
4354
|
}
|
|
4038
4355
|
),
|
|
4039
|
-
/* @__PURE__ */
|
|
4356
|
+
/* @__PURE__ */ jsx23(Badge_default, { size: "large", action: "info", children: description })
|
|
4040
4357
|
] })
|
|
4041
4358
|
]
|
|
4042
4359
|
}
|
|
@@ -4055,7 +4372,7 @@ var CardQuestions = forwardRef7(
|
|
|
4055
4372
|
const isDone = state === "done";
|
|
4056
4373
|
const stateLabel = isDone ? "Realizado" : "N\xE3o Realizado";
|
|
4057
4374
|
const buttonLabel = isDone ? "Ver Resultado" : "Responder";
|
|
4058
|
-
return /* @__PURE__ */
|
|
4375
|
+
return /* @__PURE__ */ jsxs19(
|
|
4059
4376
|
CardBase,
|
|
4060
4377
|
{
|
|
4061
4378
|
ref,
|
|
@@ -4065,9 +4382,9 @@ var CardQuestions = forwardRef7(
|
|
|
4065
4382
|
className: cn("justify-between gap-4", className),
|
|
4066
4383
|
...props,
|
|
4067
4384
|
children: [
|
|
4068
|
-
/* @__PURE__ */
|
|
4069
|
-
/* @__PURE__ */
|
|
4070
|
-
/* @__PURE__ */
|
|
4385
|
+
/* @__PURE__ */ jsxs19("section", { className: "flex flex-col gap-1 flex-1 min-w-0", children: [
|
|
4386
|
+
/* @__PURE__ */ jsx23("p", { className: "font-bold text-xs text-text-950 truncate", children: header }),
|
|
4387
|
+
/* @__PURE__ */ jsx23("div", { className: "flex flex-row gap-6 items-center", children: /* @__PURE__ */ jsx23(
|
|
4071
4388
|
Badge_default,
|
|
4072
4389
|
{
|
|
4073
4390
|
size: "medium",
|
|
@@ -4077,7 +4394,7 @@ var CardQuestions = forwardRef7(
|
|
|
4077
4394
|
}
|
|
4078
4395
|
) })
|
|
4079
4396
|
] }),
|
|
4080
|
-
/* @__PURE__ */
|
|
4397
|
+
/* @__PURE__ */ jsx23("span", { className: "flex-shrink-0", children: /* @__PURE__ */ jsx23(
|
|
4081
4398
|
Button_default,
|
|
4082
4399
|
{
|
|
4083
4400
|
size: "extra-small",
|
|
@@ -4108,19 +4425,19 @@ var CardProgress = forwardRef7(
|
|
|
4108
4425
|
}, ref) => {
|
|
4109
4426
|
const isHorizontal = direction === "horizontal";
|
|
4110
4427
|
const contentComponent = {
|
|
4111
|
-
horizontal: /* @__PURE__ */
|
|
4112
|
-
showDates && /* @__PURE__ */
|
|
4113
|
-
initialDate && /* @__PURE__ */
|
|
4114
|
-
/* @__PURE__ */
|
|
4115
|
-
/* @__PURE__ */
|
|
4428
|
+
horizontal: /* @__PURE__ */ jsxs19(Fragment4, { children: [
|
|
4429
|
+
showDates && /* @__PURE__ */ jsxs19("div", { className: "flex flex-row gap-6 items-center", children: [
|
|
4430
|
+
initialDate && /* @__PURE__ */ jsxs19("span", { className: "flex flex-row gap-1 items-center text-2xs", children: [
|
|
4431
|
+
/* @__PURE__ */ jsx23("p", { className: "text-text-800 font-semibold", children: "In\xEDcio" }),
|
|
4432
|
+
/* @__PURE__ */ jsx23("p", { className: "text-text-600", children: initialDate })
|
|
4116
4433
|
] }),
|
|
4117
|
-
endDate && /* @__PURE__ */
|
|
4118
|
-
/* @__PURE__ */
|
|
4119
|
-
/* @__PURE__ */
|
|
4434
|
+
endDate && /* @__PURE__ */ jsxs19("span", { className: "flex flex-row gap-1 items-center text-2xs", children: [
|
|
4435
|
+
/* @__PURE__ */ jsx23("p", { className: "text-text-800 font-semibold", children: "Fim" }),
|
|
4436
|
+
/* @__PURE__ */ jsx23("p", { className: "text-text-600", children: endDate })
|
|
4120
4437
|
] })
|
|
4121
4438
|
] }),
|
|
4122
|
-
/* @__PURE__ */
|
|
4123
|
-
/* @__PURE__ */
|
|
4439
|
+
/* @__PURE__ */ jsxs19("span", { className: "grid grid-cols-[1fr_auto] items-center gap-2", children: [
|
|
4440
|
+
/* @__PURE__ */ jsx23(
|
|
4124
4441
|
ProgressBar_default,
|
|
4125
4442
|
{
|
|
4126
4443
|
size: "small",
|
|
@@ -4129,7 +4446,7 @@ var CardProgress = forwardRef7(
|
|
|
4129
4446
|
"data-testid": "progress-bar"
|
|
4130
4447
|
}
|
|
4131
4448
|
),
|
|
4132
|
-
/* @__PURE__ */
|
|
4449
|
+
/* @__PURE__ */ jsxs19(
|
|
4133
4450
|
Text_default,
|
|
4134
4451
|
{
|
|
4135
4452
|
size: "xs",
|
|
@@ -4145,9 +4462,9 @@ var CardProgress = forwardRef7(
|
|
|
4145
4462
|
)
|
|
4146
4463
|
] })
|
|
4147
4464
|
] }),
|
|
4148
|
-
vertical: /* @__PURE__ */
|
|
4465
|
+
vertical: /* @__PURE__ */ jsx23("p", { className: "text-sm text-text-800", children: subhead })
|
|
4149
4466
|
};
|
|
4150
|
-
return /* @__PURE__ */
|
|
4467
|
+
return /* @__PURE__ */ jsxs19(
|
|
4151
4468
|
CardBase,
|
|
4152
4469
|
{
|
|
4153
4470
|
ref,
|
|
@@ -4158,7 +4475,7 @@ var CardProgress = forwardRef7(
|
|
|
4158
4475
|
className: cn(isHorizontal ? "h-20" : "", className),
|
|
4159
4476
|
...props,
|
|
4160
4477
|
children: [
|
|
4161
|
-
/* @__PURE__ */
|
|
4478
|
+
/* @__PURE__ */ jsx23(
|
|
4162
4479
|
"div",
|
|
4163
4480
|
{
|
|
4164
4481
|
className: cn(
|
|
@@ -4171,7 +4488,7 @@ var CardProgress = forwardRef7(
|
|
|
4171
4488
|
children: icon
|
|
4172
4489
|
}
|
|
4173
4490
|
),
|
|
4174
|
-
/* @__PURE__ */
|
|
4491
|
+
/* @__PURE__ */ jsxs19(
|
|
4175
4492
|
"div",
|
|
4176
4493
|
{
|
|
4177
4494
|
className: cn(
|
|
@@ -4179,7 +4496,7 @@ var CardProgress = forwardRef7(
|
|
|
4179
4496
|
!isHorizontal && "gap-4"
|
|
4180
4497
|
),
|
|
4181
4498
|
children: [
|
|
4182
|
-
/* @__PURE__ */
|
|
4499
|
+
/* @__PURE__ */ jsx23(Text_default, { size: "sm", weight: "bold", className: "text-text-950 truncate", children: header }),
|
|
4183
4500
|
contentComponent[direction]
|
|
4184
4501
|
]
|
|
4185
4502
|
}
|
|
@@ -4199,7 +4516,7 @@ var CardTopic = forwardRef7(
|
|
|
4199
4516
|
className = "",
|
|
4200
4517
|
...props
|
|
4201
4518
|
}, ref) => {
|
|
4202
|
-
return /* @__PURE__ */
|
|
4519
|
+
return /* @__PURE__ */ jsxs19(
|
|
4203
4520
|
CardBase,
|
|
4204
4521
|
{
|
|
4205
4522
|
ref,
|
|
@@ -4210,13 +4527,13 @@ var CardTopic = forwardRef7(
|
|
|
4210
4527
|
className: cn("justify-center gap-2 py-2 px-4", className),
|
|
4211
4528
|
...props,
|
|
4212
4529
|
children: [
|
|
4213
|
-
subHead && /* @__PURE__ */
|
|
4214
|
-
/* @__PURE__ */
|
|
4215
|
-
index < subHead.length - 1 && /* @__PURE__ */
|
|
4530
|
+
subHead && /* @__PURE__ */ jsx23("span", { className: "text-text-600 text-2xs flex flex-row gap-1", children: subHead.map((text, index) => /* @__PURE__ */ jsxs19(Fragment3, { children: [
|
|
4531
|
+
/* @__PURE__ */ jsx23("p", { children: text }),
|
|
4532
|
+
index < subHead.length - 1 && /* @__PURE__ */ jsx23("p", { children: "\u2022" })
|
|
4216
4533
|
] }, `${text} - ${index}`)) }),
|
|
4217
|
-
/* @__PURE__ */
|
|
4218
|
-
/* @__PURE__ */
|
|
4219
|
-
/* @__PURE__ */
|
|
4534
|
+
/* @__PURE__ */ jsx23("p", { className: "text-sm text-text-950 font-bold truncate", children: header }),
|
|
4535
|
+
/* @__PURE__ */ jsxs19("span", { className: "grid grid-cols-[1fr_auto] items-center gap-2", children: [
|
|
4536
|
+
/* @__PURE__ */ jsx23(
|
|
4220
4537
|
ProgressBar_default,
|
|
4221
4538
|
{
|
|
4222
4539
|
size: "small",
|
|
@@ -4225,7 +4542,7 @@ var CardTopic = forwardRef7(
|
|
|
4225
4542
|
"data-testid": "progress-bar"
|
|
4226
4543
|
}
|
|
4227
4544
|
),
|
|
4228
|
-
showPercentage && /* @__PURE__ */
|
|
4545
|
+
showPercentage && /* @__PURE__ */ jsxs19(
|
|
4229
4546
|
Text_default,
|
|
4230
4547
|
{
|
|
4231
4548
|
size: "xs",
|
|
@@ -4259,7 +4576,7 @@ var CardPerformance = forwardRef7(
|
|
|
4259
4576
|
...props
|
|
4260
4577
|
}, ref) => {
|
|
4261
4578
|
const hasProgress = progress !== void 0;
|
|
4262
|
-
return /* @__PURE__ */
|
|
4579
|
+
return /* @__PURE__ */ jsxs19(
|
|
4263
4580
|
CardBase,
|
|
4264
4581
|
{
|
|
4265
4582
|
ref,
|
|
@@ -4273,10 +4590,10 @@ var CardPerformance = forwardRef7(
|
|
|
4273
4590
|
onClick: () => actionVariant == "caret" && onClickButton?.(valueButton),
|
|
4274
4591
|
...props,
|
|
4275
4592
|
children: [
|
|
4276
|
-
/* @__PURE__ */
|
|
4277
|
-
/* @__PURE__ */
|
|
4278
|
-
/* @__PURE__ */
|
|
4279
|
-
actionVariant === "button" && /* @__PURE__ */
|
|
4593
|
+
/* @__PURE__ */ jsxs19("div", { className: "w-full flex flex-col justify-between gap-2", children: [
|
|
4594
|
+
/* @__PURE__ */ jsxs19("div", { className: "flex flex-row justify-between items-center gap-2", children: [
|
|
4595
|
+
/* @__PURE__ */ jsx23("p", { className: "text-lg font-bold text-text-950 truncate flex-1 min-w-0", children: header }),
|
|
4596
|
+
actionVariant === "button" && /* @__PURE__ */ jsx23(
|
|
4280
4597
|
Button_default,
|
|
4281
4598
|
{
|
|
4282
4599
|
variant: "outline",
|
|
@@ -4287,16 +4604,16 @@ var CardPerformance = forwardRef7(
|
|
|
4287
4604
|
}
|
|
4288
4605
|
)
|
|
4289
4606
|
] }),
|
|
4290
|
-
/* @__PURE__ */
|
|
4607
|
+
/* @__PURE__ */ jsx23("div", { className: "w-full", children: hasProgress ? /* @__PURE__ */ jsx23(
|
|
4291
4608
|
ProgressBar_default,
|
|
4292
4609
|
{
|
|
4293
4610
|
value: progress,
|
|
4294
4611
|
label: `${progress}% ${labelProgress}`,
|
|
4295
4612
|
variant: progressVariant
|
|
4296
4613
|
}
|
|
4297
|
-
) : /* @__PURE__ */
|
|
4614
|
+
) : /* @__PURE__ */ jsx23("p", { className: "text-xs text-text-600 truncate", children: description }) })
|
|
4298
4615
|
] }),
|
|
4299
|
-
actionVariant == "caret" && /* @__PURE__ */
|
|
4616
|
+
actionVariant == "caret" && /* @__PURE__ */ jsx23(
|
|
4300
4617
|
CaretRight2,
|
|
4301
4618
|
{
|
|
4302
4619
|
className: "size-4.5 text-text-800 cursor-pointer",
|
|
@@ -4320,7 +4637,7 @@ var CardResults = forwardRef7(
|
|
|
4320
4637
|
...props
|
|
4321
4638
|
}, ref) => {
|
|
4322
4639
|
const isRow = direction == "row";
|
|
4323
|
-
return /* @__PURE__ */
|
|
4640
|
+
return /* @__PURE__ */ jsxs19(
|
|
4324
4641
|
CardBase,
|
|
4325
4642
|
{
|
|
4326
4643
|
ref,
|
|
@@ -4330,7 +4647,7 @@ var CardResults = forwardRef7(
|
|
|
4330
4647
|
className: cn("items-stretch cursor-pointer pr-4", className),
|
|
4331
4648
|
...props,
|
|
4332
4649
|
children: [
|
|
4333
|
-
/* @__PURE__ */
|
|
4650
|
+
/* @__PURE__ */ jsx23(
|
|
4334
4651
|
"div",
|
|
4335
4652
|
{
|
|
4336
4653
|
className: cn(
|
|
@@ -4339,11 +4656,11 @@ var CardResults = forwardRef7(
|
|
|
4339
4656
|
style: {
|
|
4340
4657
|
backgroundColor: color
|
|
4341
4658
|
},
|
|
4342
|
-
children: /* @__PURE__ */
|
|
4659
|
+
children: /* @__PURE__ */ jsx23(IconRender_default, { iconName: icon, color: "currentColor", size: 20 })
|
|
4343
4660
|
}
|
|
4344
4661
|
),
|
|
4345
|
-
/* @__PURE__ */
|
|
4346
|
-
/* @__PURE__ */
|
|
4662
|
+
/* @__PURE__ */ jsxs19("div", { className: "w-full flex flex-row justify-between items-center", children: [
|
|
4663
|
+
/* @__PURE__ */ jsxs19(
|
|
4347
4664
|
"div",
|
|
4348
4665
|
{
|
|
4349
4666
|
className: cn(
|
|
@@ -4351,28 +4668,28 @@ var CardResults = forwardRef7(
|
|
|
4351
4668
|
isRow ? "flex-row items-center gap-2" : "flex-col"
|
|
4352
4669
|
),
|
|
4353
4670
|
children: [
|
|
4354
|
-
/* @__PURE__ */
|
|
4355
|
-
/* @__PURE__ */
|
|
4356
|
-
/* @__PURE__ */
|
|
4671
|
+
/* @__PURE__ */ jsx23("p", { className: "text-sm font-bold text-text-950 flex-1", children: header }),
|
|
4672
|
+
/* @__PURE__ */ jsxs19("span", { className: "flex flex-wrap flex-row gap-1 items-center", children: [
|
|
4673
|
+
/* @__PURE__ */ jsxs19(
|
|
4357
4674
|
Badge_default,
|
|
4358
4675
|
{
|
|
4359
4676
|
action: "success",
|
|
4360
4677
|
variant: "solid",
|
|
4361
4678
|
size: "large",
|
|
4362
|
-
iconLeft: /* @__PURE__ */
|
|
4679
|
+
iconLeft: /* @__PURE__ */ jsx23(CheckCircle, {}),
|
|
4363
4680
|
children: [
|
|
4364
4681
|
correct_answers,
|
|
4365
4682
|
" Corretas"
|
|
4366
4683
|
]
|
|
4367
4684
|
}
|
|
4368
4685
|
),
|
|
4369
|
-
/* @__PURE__ */
|
|
4686
|
+
/* @__PURE__ */ jsxs19(
|
|
4370
4687
|
Badge_default,
|
|
4371
4688
|
{
|
|
4372
4689
|
action: "error",
|
|
4373
4690
|
variant: "solid",
|
|
4374
4691
|
size: "large",
|
|
4375
|
-
iconLeft: /* @__PURE__ */
|
|
4692
|
+
iconLeft: /* @__PURE__ */ jsx23(XCircle, {}),
|
|
4376
4693
|
children: [
|
|
4377
4694
|
incorrect_answers,
|
|
4378
4695
|
" Incorretas"
|
|
@@ -4383,7 +4700,7 @@ var CardResults = forwardRef7(
|
|
|
4383
4700
|
]
|
|
4384
4701
|
}
|
|
4385
4702
|
),
|
|
4386
|
-
/* @__PURE__ */
|
|
4703
|
+
/* @__PURE__ */ jsx23(CaretRight2, { className: "min-w-6 min-h-6 text-text-800" })
|
|
4387
4704
|
] })
|
|
4388
4705
|
]
|
|
4389
4706
|
}
|
|
@@ -4409,13 +4726,13 @@ var CardStatus = forwardRef7(
|
|
|
4409
4726
|
const getIconBadge = (status2) => {
|
|
4410
4727
|
switch (status2) {
|
|
4411
4728
|
case "correct":
|
|
4412
|
-
return /* @__PURE__ */
|
|
4729
|
+
return /* @__PURE__ */ jsx23(CheckCircle, {});
|
|
4413
4730
|
case "incorrect":
|
|
4414
|
-
return /* @__PURE__ */
|
|
4731
|
+
return /* @__PURE__ */ jsx23(XCircle, {});
|
|
4415
4732
|
case "pending":
|
|
4416
|
-
return /* @__PURE__ */
|
|
4733
|
+
return /* @__PURE__ */ jsx23(Clock, {});
|
|
4417
4734
|
default:
|
|
4418
|
-
return /* @__PURE__ */
|
|
4735
|
+
return /* @__PURE__ */ jsx23(XCircle, {});
|
|
4419
4736
|
}
|
|
4420
4737
|
};
|
|
4421
4738
|
const getActionBadge = (status2) => {
|
|
@@ -4430,7 +4747,7 @@ var CardStatus = forwardRef7(
|
|
|
4430
4747
|
return "info";
|
|
4431
4748
|
}
|
|
4432
4749
|
};
|
|
4433
|
-
return /* @__PURE__ */
|
|
4750
|
+
return /* @__PURE__ */ jsx23(
|
|
4434
4751
|
CardBase,
|
|
4435
4752
|
{
|
|
4436
4753
|
ref,
|
|
@@ -4439,10 +4756,10 @@ var CardStatus = forwardRef7(
|
|
|
4439
4756
|
minHeight: "medium",
|
|
4440
4757
|
className: cn("items-center cursor-pointer", className),
|
|
4441
4758
|
...props,
|
|
4442
|
-
children: /* @__PURE__ */
|
|
4443
|
-
/* @__PURE__ */
|
|
4444
|
-
/* @__PURE__ */
|
|
4445
|
-
status && /* @__PURE__ */
|
|
4759
|
+
children: /* @__PURE__ */ jsxs19("div", { className: "flex justify-between w-full h-full flex-row items-center gap-2", children: [
|
|
4760
|
+
/* @__PURE__ */ jsx23("p", { className: "text-sm font-bold text-text-950 truncate flex-1 min-w-0", children: header }),
|
|
4761
|
+
/* @__PURE__ */ jsxs19("span", { className: "flex flex-row gap-1 items-center flex-shrink-0", children: [
|
|
4762
|
+
status && /* @__PURE__ */ jsx23(
|
|
4446
4763
|
Badge_default,
|
|
4447
4764
|
{
|
|
4448
4765
|
action: getActionBadge(status),
|
|
@@ -4452,9 +4769,9 @@ var CardStatus = forwardRef7(
|
|
|
4452
4769
|
children: getLabelBadge(status)
|
|
4453
4770
|
}
|
|
4454
4771
|
),
|
|
4455
|
-
label && /* @__PURE__ */
|
|
4772
|
+
label && /* @__PURE__ */ jsx23("p", { className: "text-sm text-text-800", children: label })
|
|
4456
4773
|
] }),
|
|
4457
|
-
/* @__PURE__ */
|
|
4774
|
+
/* @__PURE__ */ jsx23(CaretRight2, { className: "min-w-6 min-h-6 text-text-800 cursor-pointer flex-shrink-0 ml-2" })
|
|
4458
4775
|
] })
|
|
4459
4776
|
}
|
|
4460
4777
|
);
|
|
@@ -4462,7 +4779,7 @@ var CardStatus = forwardRef7(
|
|
|
4462
4779
|
);
|
|
4463
4780
|
var CardSettings = forwardRef7(
|
|
4464
4781
|
({ header, className, icon, ...props }, ref) => {
|
|
4465
|
-
return /* @__PURE__ */
|
|
4782
|
+
return /* @__PURE__ */ jsxs19(
|
|
4466
4783
|
CardBase,
|
|
4467
4784
|
{
|
|
4468
4785
|
ref,
|
|
@@ -4475,9 +4792,9 @@ var CardSettings = forwardRef7(
|
|
|
4475
4792
|
),
|
|
4476
4793
|
...props,
|
|
4477
4794
|
children: [
|
|
4478
|
-
/* @__PURE__ */
|
|
4479
|
-
/* @__PURE__ */
|
|
4480
|
-
/* @__PURE__ */
|
|
4795
|
+
/* @__PURE__ */ jsx23("span", { className: "[&>svg]:size-6", children: icon }),
|
|
4796
|
+
/* @__PURE__ */ jsx23("p", { className: "w-full text-sm truncate", children: header }),
|
|
4797
|
+
/* @__PURE__ */ jsx23(CaretRight2, { size: 24, className: "cursor-pointer" })
|
|
4481
4798
|
]
|
|
4482
4799
|
}
|
|
4483
4800
|
);
|
|
@@ -4485,7 +4802,7 @@ var CardSettings = forwardRef7(
|
|
|
4485
4802
|
);
|
|
4486
4803
|
var CardSupport = forwardRef7(
|
|
4487
4804
|
({ header, className, direction = "col", children, ...props }, ref) => {
|
|
4488
|
-
return /* @__PURE__ */
|
|
4805
|
+
return /* @__PURE__ */ jsxs19(
|
|
4489
4806
|
CardBase,
|
|
4490
4807
|
{
|
|
4491
4808
|
ref,
|
|
@@ -4498,7 +4815,7 @@ var CardSupport = forwardRef7(
|
|
|
4498
4815
|
),
|
|
4499
4816
|
...props,
|
|
4500
4817
|
children: [
|
|
4501
|
-
/* @__PURE__ */
|
|
4818
|
+
/* @__PURE__ */ jsxs19(
|
|
4502
4819
|
"div",
|
|
4503
4820
|
{
|
|
4504
4821
|
className: cn(
|
|
@@ -4506,12 +4823,12 @@ var CardSupport = forwardRef7(
|
|
|
4506
4823
|
direction == "col" ? "flex-col" : "flex-row items-center"
|
|
4507
4824
|
),
|
|
4508
4825
|
children: [
|
|
4509
|
-
/* @__PURE__ */
|
|
4510
|
-
/* @__PURE__ */
|
|
4826
|
+
/* @__PURE__ */ jsx23("span", { className: "w-full min-w-0", children: /* @__PURE__ */ jsx23("p", { className: "text-sm text-text-950 font-bold truncate", children: header }) }),
|
|
4827
|
+
/* @__PURE__ */ jsx23("span", { className: "flex flex-row gap-1", children })
|
|
4511
4828
|
]
|
|
4512
4829
|
}
|
|
4513
4830
|
),
|
|
4514
|
-
/* @__PURE__ */
|
|
4831
|
+
/* @__PURE__ */ jsx23(CaretRight2, { className: "text-text-800 cursor-pointer", size: 24 })
|
|
4515
4832
|
]
|
|
4516
4833
|
}
|
|
4517
4834
|
);
|
|
@@ -4531,7 +4848,7 @@ var CardForum = forwardRef7(
|
|
|
4531
4848
|
hour,
|
|
4532
4849
|
...props
|
|
4533
4850
|
}, ref) => {
|
|
4534
|
-
return /* @__PURE__ */
|
|
4851
|
+
return /* @__PURE__ */ jsxs19(
|
|
4535
4852
|
CardBase,
|
|
4536
4853
|
{
|
|
4537
4854
|
ref,
|
|
@@ -4542,7 +4859,7 @@ var CardForum = forwardRef7(
|
|
|
4542
4859
|
className: cn("w-auto h-auto gap-3", className),
|
|
4543
4860
|
...props,
|
|
4544
4861
|
children: [
|
|
4545
|
-
/* @__PURE__ */
|
|
4862
|
+
/* @__PURE__ */ jsx23(
|
|
4546
4863
|
"button",
|
|
4547
4864
|
{
|
|
4548
4865
|
type: "button",
|
|
@@ -4551,18 +4868,18 @@ var CardForum = forwardRef7(
|
|
|
4551
4868
|
className: "min-w-8 h-8 rounded-full bg-background-950"
|
|
4552
4869
|
}
|
|
4553
4870
|
),
|
|
4554
|
-
/* @__PURE__ */
|
|
4555
|
-
/* @__PURE__ */
|
|
4556
|
-
/* @__PURE__ */
|
|
4557
|
-
/* @__PURE__ */
|
|
4871
|
+
/* @__PURE__ */ jsxs19("div", { className: "flex flex-col gap-2 flex-1 min-w-0", children: [
|
|
4872
|
+
/* @__PURE__ */ jsxs19("div", { className: "flex flex-row gap-1 items-center flex-wrap", children: [
|
|
4873
|
+
/* @__PURE__ */ jsx23("p", { className: "text-xs font-semibold text-primary-700 truncate", children: title }),
|
|
4874
|
+
/* @__PURE__ */ jsxs19("p", { className: "text-xs text-text-600", children: [
|
|
4558
4875
|
"\u2022 ",
|
|
4559
4876
|
date,
|
|
4560
4877
|
" \u2022 ",
|
|
4561
4878
|
hour
|
|
4562
4879
|
] })
|
|
4563
4880
|
] }),
|
|
4564
|
-
/* @__PURE__ */
|
|
4565
|
-
/* @__PURE__ */
|
|
4881
|
+
/* @__PURE__ */ jsx23("p", { className: "text-text-950 text-sm line-clamp-2 truncate", children: content }),
|
|
4882
|
+
/* @__PURE__ */ jsxs19(
|
|
4566
4883
|
"button",
|
|
4567
4884
|
{
|
|
4568
4885
|
type: "button",
|
|
@@ -4570,8 +4887,8 @@ var CardForum = forwardRef7(
|
|
|
4570
4887
|
onClick: () => onClickComments?.(valueComments),
|
|
4571
4888
|
className: "text-text-600 flex flex-row gap-2 items-center",
|
|
4572
4889
|
children: [
|
|
4573
|
-
/* @__PURE__ */
|
|
4574
|
-
/* @__PURE__ */
|
|
4890
|
+
/* @__PURE__ */ jsx23(ChatCircleText, { "aria-hidden": "true", size: 16 }),
|
|
4891
|
+
/* @__PURE__ */ jsxs19("p", { className: "text-xs", children: [
|
|
4575
4892
|
comments,
|
|
4576
4893
|
" respostas"
|
|
4577
4894
|
] })
|
|
@@ -4674,12 +4991,12 @@ var CardAudio = forwardRef7(
|
|
|
4674
4991
|
};
|
|
4675
4992
|
const getVolumeIcon = () => {
|
|
4676
4993
|
if (volume === 0) {
|
|
4677
|
-
return /* @__PURE__ */
|
|
4994
|
+
return /* @__PURE__ */ jsx23(SpeakerSimpleX, { size: 24 });
|
|
4678
4995
|
}
|
|
4679
4996
|
if (volume < 0.5) {
|
|
4680
|
-
return /* @__PURE__ */
|
|
4997
|
+
return /* @__PURE__ */ jsx23(SpeakerLow, { size: 24 });
|
|
4681
4998
|
}
|
|
4682
|
-
return /* @__PURE__ */
|
|
4999
|
+
return /* @__PURE__ */ jsx23(SpeakerHigh, { size: 24 });
|
|
4683
5000
|
};
|
|
4684
5001
|
useEffect7(() => {
|
|
4685
5002
|
const handleClickOutside = (event) => {
|
|
@@ -4695,7 +5012,7 @@ var CardAudio = forwardRef7(
|
|
|
4695
5012
|
document.removeEventListener("mousedown", handleClickOutside);
|
|
4696
5013
|
};
|
|
4697
5014
|
}, []);
|
|
4698
|
-
return /* @__PURE__ */
|
|
5015
|
+
return /* @__PURE__ */ jsxs19(
|
|
4699
5016
|
CardBase,
|
|
4700
5017
|
{
|
|
4701
5018
|
ref,
|
|
@@ -4708,7 +5025,7 @@ var CardAudio = forwardRef7(
|
|
|
4708
5025
|
),
|
|
4709
5026
|
...props,
|
|
4710
5027
|
children: [
|
|
4711
|
-
/* @__PURE__ */
|
|
5028
|
+
/* @__PURE__ */ jsx23(
|
|
4712
5029
|
"audio",
|
|
4713
5030
|
{
|
|
4714
5031
|
ref: audioRef,
|
|
@@ -4720,7 +5037,7 @@ var CardAudio = forwardRef7(
|
|
|
4720
5037
|
onEnded: handleEnded,
|
|
4721
5038
|
"data-testid": "audio-element",
|
|
4722
5039
|
"aria-label": title,
|
|
4723
|
-
children: tracks ? tracks.map((track) => /* @__PURE__ */
|
|
5040
|
+
children: tracks ? tracks.map((track) => /* @__PURE__ */ jsx23(
|
|
4724
5041
|
"track",
|
|
4725
5042
|
{
|
|
4726
5043
|
kind: track.kind,
|
|
@@ -4730,7 +5047,7 @@ var CardAudio = forwardRef7(
|
|
|
4730
5047
|
default: track.default
|
|
4731
5048
|
},
|
|
4732
5049
|
track.src
|
|
4733
|
-
)) : /* @__PURE__ */
|
|
5050
|
+
)) : /* @__PURE__ */ jsx23(
|
|
4734
5051
|
"track",
|
|
4735
5052
|
{
|
|
4736
5053
|
kind: "captions",
|
|
@@ -4741,7 +5058,7 @@ var CardAudio = forwardRef7(
|
|
|
4741
5058
|
)
|
|
4742
5059
|
}
|
|
4743
5060
|
),
|
|
4744
|
-
/* @__PURE__ */
|
|
5061
|
+
/* @__PURE__ */ jsx23(
|
|
4745
5062
|
"button",
|
|
4746
5063
|
{
|
|
4747
5064
|
type: "button",
|
|
@@ -4749,14 +5066,14 @@ var CardAudio = forwardRef7(
|
|
|
4749
5066
|
disabled: !src,
|
|
4750
5067
|
className: "cursor-pointer text-text-950 hover:text-primary-600 disabled:text-text-400 disabled:cursor-not-allowed",
|
|
4751
5068
|
"aria-label": isPlaying ? "Pausar" : "Reproduzir",
|
|
4752
|
-
children: isPlaying ? /* @__PURE__ */
|
|
4753
|
-
/* @__PURE__ */
|
|
4754
|
-
/* @__PURE__ */
|
|
4755
|
-
] }) }) : /* @__PURE__ */
|
|
5069
|
+
children: isPlaying ? /* @__PURE__ */ jsx23("div", { className: "w-6 h-6 flex items-center justify-center", children: /* @__PURE__ */ jsxs19("div", { className: "flex gap-0.5", children: [
|
|
5070
|
+
/* @__PURE__ */ jsx23("div", { className: "w-1 h-4 bg-current rounded-sm" }),
|
|
5071
|
+
/* @__PURE__ */ jsx23("div", { className: "w-1 h-4 bg-current rounded-sm" })
|
|
5072
|
+
] }) }) : /* @__PURE__ */ jsx23(Play, { size: 24 })
|
|
4756
5073
|
}
|
|
4757
5074
|
),
|
|
4758
|
-
/* @__PURE__ */
|
|
4759
|
-
/* @__PURE__ */
|
|
5075
|
+
/* @__PURE__ */ jsx23("p", { className: "text-text-800 text-md font-medium min-w-[2.5rem]", children: formatTime(currentTime) }),
|
|
5076
|
+
/* @__PURE__ */ jsx23("div", { className: "flex-1 relative", "data-testid": "progress-bar", children: /* @__PURE__ */ jsx23(
|
|
4760
5077
|
"button",
|
|
4761
5078
|
{
|
|
4762
5079
|
type: "button",
|
|
@@ -4771,7 +5088,7 @@ var CardAudio = forwardRef7(
|
|
|
4771
5088
|
}
|
|
4772
5089
|
},
|
|
4773
5090
|
"aria-label": "Barra de progresso do \xE1udio",
|
|
4774
|
-
children: /* @__PURE__ */
|
|
5091
|
+
children: /* @__PURE__ */ jsx23(
|
|
4775
5092
|
"div",
|
|
4776
5093
|
{
|
|
4777
5094
|
className: "h-full bg-primary-600 rounded-full transition-all duration-100",
|
|
@@ -4782,19 +5099,19 @@ var CardAudio = forwardRef7(
|
|
|
4782
5099
|
)
|
|
4783
5100
|
}
|
|
4784
5101
|
) }),
|
|
4785
|
-
/* @__PURE__ */
|
|
4786
|
-
/* @__PURE__ */
|
|
4787
|
-
/* @__PURE__ */
|
|
5102
|
+
/* @__PURE__ */ jsx23("p", { className: "text-text-800 text-md font-medium min-w-[2.5rem]", children: formatTime(duration) }),
|
|
5103
|
+
/* @__PURE__ */ jsxs19("div", { className: "relative h-6", ref: volumeControlRef, children: [
|
|
5104
|
+
/* @__PURE__ */ jsx23(
|
|
4788
5105
|
"button",
|
|
4789
5106
|
{
|
|
4790
5107
|
type: "button",
|
|
4791
5108
|
onClick: toggleVolumeControl,
|
|
4792
5109
|
className: "cursor-pointer text-text-950 hover:text-primary-600",
|
|
4793
5110
|
"aria-label": "Controle de volume",
|
|
4794
|
-
children: /* @__PURE__ */
|
|
5111
|
+
children: /* @__PURE__ */ jsx23("div", { className: "w-6 h-6 flex items-center justify-center", children: getVolumeIcon() })
|
|
4795
5112
|
}
|
|
4796
5113
|
),
|
|
4797
|
-
showVolumeControl && /* @__PURE__ */
|
|
5114
|
+
showVolumeControl && /* @__PURE__ */ jsx23(
|
|
4798
5115
|
"button",
|
|
4799
5116
|
{
|
|
4800
5117
|
type: "button",
|
|
@@ -4804,7 +5121,7 @@ var CardAudio = forwardRef7(
|
|
|
4804
5121
|
setShowVolumeControl(false);
|
|
4805
5122
|
}
|
|
4806
5123
|
},
|
|
4807
|
-
children: /* @__PURE__ */
|
|
5124
|
+
children: /* @__PURE__ */ jsx23(
|
|
4808
5125
|
"input",
|
|
4809
5126
|
{
|
|
4810
5127
|
type: "range",
|
|
@@ -4845,22 +5162,22 @@ var CardAudio = forwardRef7(
|
|
|
4845
5162
|
}
|
|
4846
5163
|
)
|
|
4847
5164
|
] }),
|
|
4848
|
-
/* @__PURE__ */
|
|
4849
|
-
/* @__PURE__ */
|
|
5165
|
+
/* @__PURE__ */ jsxs19("div", { className: "relative h-6", ref: speedMenuRef, children: [
|
|
5166
|
+
/* @__PURE__ */ jsx23(
|
|
4850
5167
|
"button",
|
|
4851
5168
|
{
|
|
4852
5169
|
type: "button",
|
|
4853
5170
|
onClick: toggleSpeedMenu,
|
|
4854
5171
|
className: "cursor-pointer text-text-950 hover:text-primary-600",
|
|
4855
5172
|
"aria-label": "Op\xE7\xF5es de velocidade",
|
|
4856
|
-
children: /* @__PURE__ */
|
|
5173
|
+
children: /* @__PURE__ */ jsx23(DotsThreeVertical, { size: 24 })
|
|
4857
5174
|
}
|
|
4858
5175
|
),
|
|
4859
|
-
showSpeedMenu && /* @__PURE__ */
|
|
5176
|
+
showSpeedMenu && /* @__PURE__ */ jsx23("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__ */ jsx23("div", { className: "flex flex-col gap-1", children: [
|
|
4860
5177
|
{ speed: 1, label: "1x" },
|
|
4861
5178
|
{ speed: 1.5, label: "1.5x" },
|
|
4862
5179
|
{ speed: 2, label: "2x" }
|
|
4863
|
-
].map(({ speed, label }) => /* @__PURE__ */
|
|
5180
|
+
].map(({ speed, label }) => /* @__PURE__ */ jsx23(
|
|
4864
5181
|
"button",
|
|
4865
5182
|
{
|
|
4866
5183
|
type: "button",
|
|
@@ -4888,7 +5205,7 @@ var SIMULADO_BACKGROUND_CLASSES = {
|
|
|
4888
5205
|
var CardSimulado = forwardRef7(
|
|
4889
5206
|
({ title, duration, info, backgroundColor, className, ...props }, ref) => {
|
|
4890
5207
|
const backgroundClass = SIMULADO_BACKGROUND_CLASSES[backgroundColor];
|
|
4891
|
-
return /* @__PURE__ */
|
|
5208
|
+
return /* @__PURE__ */ jsx23(
|
|
4892
5209
|
CardBase,
|
|
4893
5210
|
{
|
|
4894
5211
|
ref,
|
|
@@ -4901,18 +5218,18 @@ var CardSimulado = forwardRef7(
|
|
|
4901
5218
|
className
|
|
4902
5219
|
),
|
|
4903
5220
|
...props,
|
|
4904
|
-
children: /* @__PURE__ */
|
|
4905
|
-
/* @__PURE__ */
|
|
4906
|
-
/* @__PURE__ */
|
|
4907
|
-
/* @__PURE__ */
|
|
4908
|
-
duration && /* @__PURE__ */
|
|
4909
|
-
/* @__PURE__ */
|
|
4910
|
-
/* @__PURE__ */
|
|
5221
|
+
children: /* @__PURE__ */ jsxs19("div", { className: "flex justify-between items-center w-full gap-4", children: [
|
|
5222
|
+
/* @__PURE__ */ jsxs19("div", { className: "flex flex-col gap-1 flex-1 min-w-0", children: [
|
|
5223
|
+
/* @__PURE__ */ jsx23(Text_default, { size: "lg", weight: "bold", className: "text-text-950 truncate", children: title }),
|
|
5224
|
+
/* @__PURE__ */ jsxs19("div", { className: "flex items-center gap-4 text-text-700", children: [
|
|
5225
|
+
duration && /* @__PURE__ */ jsxs19("div", { className: "flex items-center gap-1", children: [
|
|
5226
|
+
/* @__PURE__ */ jsx23(Clock, { size: 16, className: "flex-shrink-0" }),
|
|
5227
|
+
/* @__PURE__ */ jsx23(Text_default, { size: "sm", children: duration })
|
|
4911
5228
|
] }),
|
|
4912
|
-
/* @__PURE__ */
|
|
5229
|
+
/* @__PURE__ */ jsx23(Text_default, { size: "sm", className: "truncate", children: info })
|
|
4913
5230
|
] })
|
|
4914
5231
|
] }),
|
|
4915
|
-
/* @__PURE__ */
|
|
5232
|
+
/* @__PURE__ */ jsx23(
|
|
4916
5233
|
CaretRight2,
|
|
4917
5234
|
{
|
|
4918
5235
|
size: 24,
|
|
@@ -4957,7 +5274,7 @@ var CardTest = forwardRef7(
|
|
|
4957
5274
|
const interactiveClasses = isSelectable ? "cursor-pointer focus:outline-none focus:ring-2 focus:ring-primary-950 focus:ring-offset-2" : "";
|
|
4958
5275
|
const selectedClasses = selected ? "ring-2 ring-primary-950 ring-offset-2" : "";
|
|
4959
5276
|
if (isSelectable) {
|
|
4960
|
-
return /* @__PURE__ */
|
|
5277
|
+
return /* @__PURE__ */ jsx23(
|
|
4961
5278
|
"button",
|
|
4962
5279
|
{
|
|
4963
5280
|
ref,
|
|
@@ -4969,8 +5286,8 @@ var CardTest = forwardRef7(
|
|
|
4969
5286
|
onKeyDown: handleKeyDown,
|
|
4970
5287
|
"aria-pressed": selected,
|
|
4971
5288
|
...props,
|
|
4972
|
-
children: /* @__PURE__ */
|
|
4973
|
-
/* @__PURE__ */
|
|
5289
|
+
children: /* @__PURE__ */ jsxs19("div", { className: "flex flex-col justify-between gap-[27px] flex-grow min-h-[67px] w-full min-w-0", children: [
|
|
5290
|
+
/* @__PURE__ */ jsx23(
|
|
4974
5291
|
Text_default,
|
|
4975
5292
|
{
|
|
4976
5293
|
size: "md",
|
|
@@ -4979,10 +5296,10 @@ var CardTest = forwardRef7(
|
|
|
4979
5296
|
children: title
|
|
4980
5297
|
}
|
|
4981
5298
|
),
|
|
4982
|
-
/* @__PURE__ */
|
|
4983
|
-
duration && /* @__PURE__ */
|
|
4984
|
-
/* @__PURE__ */
|
|
4985
|
-
/* @__PURE__ */
|
|
5299
|
+
/* @__PURE__ */ jsxs19("div", { className: "flex flex-row justify-start items-end gap-4 w-full", children: [
|
|
5300
|
+
duration && /* @__PURE__ */ jsxs19("div", { className: "flex flex-row items-center gap-1 flex-shrink-0", children: [
|
|
5301
|
+
/* @__PURE__ */ jsx23(Clock, { size: 16, className: "text-text-700" }),
|
|
5302
|
+
/* @__PURE__ */ jsx23(
|
|
4986
5303
|
Text_default,
|
|
4987
5304
|
{
|
|
4988
5305
|
size: "sm",
|
|
@@ -4991,7 +5308,7 @@ var CardTest = forwardRef7(
|
|
|
4991
5308
|
}
|
|
4992
5309
|
)
|
|
4993
5310
|
] }),
|
|
4994
|
-
/* @__PURE__ */
|
|
5311
|
+
/* @__PURE__ */ jsx23(
|
|
4995
5312
|
Text_default,
|
|
4996
5313
|
{
|
|
4997
5314
|
size: "sm",
|
|
@@ -5004,14 +5321,14 @@ var CardTest = forwardRef7(
|
|
|
5004
5321
|
}
|
|
5005
5322
|
);
|
|
5006
5323
|
}
|
|
5007
|
-
return /* @__PURE__ */
|
|
5324
|
+
return /* @__PURE__ */ jsx23(
|
|
5008
5325
|
"div",
|
|
5009
5326
|
{
|
|
5010
5327
|
ref,
|
|
5011
5328
|
className: cn(`${baseClasses} ${className}`.trim()),
|
|
5012
5329
|
...props,
|
|
5013
|
-
children: /* @__PURE__ */
|
|
5014
|
-
/* @__PURE__ */
|
|
5330
|
+
children: /* @__PURE__ */ jsxs19("div", { className: "flex flex-col justify-between gap-[27px] flex-grow min-h-[67px] w-full min-w-0", children: [
|
|
5331
|
+
/* @__PURE__ */ jsx23(
|
|
5015
5332
|
Text_default,
|
|
5016
5333
|
{
|
|
5017
5334
|
size: "md",
|
|
@@ -5020,10 +5337,10 @@ var CardTest = forwardRef7(
|
|
|
5020
5337
|
children: title
|
|
5021
5338
|
}
|
|
5022
5339
|
),
|
|
5023
|
-
/* @__PURE__ */
|
|
5024
|
-
duration && /* @__PURE__ */
|
|
5025
|
-
/* @__PURE__ */
|
|
5026
|
-
/* @__PURE__ */
|
|
5340
|
+
/* @__PURE__ */ jsxs19("div", { className: "flex flex-row justify-start items-end gap-4 w-full", children: [
|
|
5341
|
+
duration && /* @__PURE__ */ jsxs19("div", { className: "flex flex-row items-center gap-1 flex-shrink-0", children: [
|
|
5342
|
+
/* @__PURE__ */ jsx23(Clock, { size: 16, className: "text-text-700" }),
|
|
5343
|
+
/* @__PURE__ */ jsx23(
|
|
5027
5344
|
Text_default,
|
|
5028
5345
|
{
|
|
5029
5346
|
size: "sm",
|
|
@@ -5032,7 +5349,7 @@ var CardTest = forwardRef7(
|
|
|
5032
5349
|
}
|
|
5033
5350
|
)
|
|
5034
5351
|
] }),
|
|
5035
|
-
/* @__PURE__ */
|
|
5352
|
+
/* @__PURE__ */ jsx23(
|
|
5036
5353
|
Text_default,
|
|
5037
5354
|
{
|
|
5038
5355
|
size: "sm",
|
|
@@ -5069,14 +5386,14 @@ var SIMULATION_TYPE_STYLES = {
|
|
|
5069
5386
|
}
|
|
5070
5387
|
};
|
|
5071
5388
|
var CardSimulationHistory = forwardRef7(({ data, onSimulationClick, className, ...props }, ref) => {
|
|
5072
|
-
return /* @__PURE__ */
|
|
5389
|
+
return /* @__PURE__ */ jsx23(
|
|
5073
5390
|
"div",
|
|
5074
5391
|
{
|
|
5075
5392
|
ref,
|
|
5076
5393
|
className: cn("w-full max-w-[992px] h-auto", className),
|
|
5077
5394
|
...props,
|
|
5078
|
-
children: /* @__PURE__ */
|
|
5079
|
-
data.map((section, sectionIndex) => /* @__PURE__ */
|
|
5395
|
+
children: /* @__PURE__ */ jsxs19("div", { className: "flex flex-col gap-0", children: [
|
|
5396
|
+
data.map((section, sectionIndex) => /* @__PURE__ */ jsx23("div", { className: "flex flex-col", children: /* @__PURE__ */ jsxs19(
|
|
5080
5397
|
"div",
|
|
5081
5398
|
{
|
|
5082
5399
|
className: cn(
|
|
@@ -5084,7 +5401,7 @@ var CardSimulationHistory = forwardRef7(({ data, onSimulationClick, className, .
|
|
|
5084
5401
|
sectionIndex === 0 ? "rounded-t-3xl" : ""
|
|
5085
5402
|
),
|
|
5086
5403
|
children: [
|
|
5087
|
-
/* @__PURE__ */
|
|
5404
|
+
/* @__PURE__ */ jsx23(
|
|
5088
5405
|
Text_default,
|
|
5089
5406
|
{
|
|
5090
5407
|
size: "xs",
|
|
@@ -5093,9 +5410,9 @@ var CardSimulationHistory = forwardRef7(({ data, onSimulationClick, className, .
|
|
|
5093
5410
|
children: section.date
|
|
5094
5411
|
}
|
|
5095
5412
|
),
|
|
5096
|
-
/* @__PURE__ */
|
|
5413
|
+
/* @__PURE__ */ jsx23("div", { className: "flex flex-col gap-2 flex-1", children: section.simulations.map((simulation) => {
|
|
5097
5414
|
const typeStyles = SIMULATION_TYPE_STYLES[simulation.type];
|
|
5098
|
-
return /* @__PURE__ */
|
|
5415
|
+
return /* @__PURE__ */ jsx23(
|
|
5099
5416
|
CardBase,
|
|
5100
5417
|
{
|
|
5101
5418
|
layout: "horizontal",
|
|
@@ -5107,9 +5424,9 @@ var CardSimulationHistory = forwardRef7(({ data, onSimulationClick, className, .
|
|
|
5107
5424
|
transition-shadow duration-200 h-auto min-h-[61px]`
|
|
5108
5425
|
),
|
|
5109
5426
|
onClick: () => onSimulationClick?.(simulation),
|
|
5110
|
-
children: /* @__PURE__ */
|
|
5111
|
-
/* @__PURE__ */
|
|
5112
|
-
/* @__PURE__ */
|
|
5427
|
+
children: /* @__PURE__ */ jsxs19("div", { className: "flex justify-between items-center w-full gap-2", children: [
|
|
5428
|
+
/* @__PURE__ */ jsxs19("div", { className: "flex flex-wrap flex-col justify-between sm:flex-row gap-2 flex-1 min-w-0", children: [
|
|
5429
|
+
/* @__PURE__ */ jsx23(
|
|
5113
5430
|
Text_default,
|
|
5114
5431
|
{
|
|
5115
5432
|
size: "lg",
|
|
@@ -5118,8 +5435,8 @@ var CardSimulationHistory = forwardRef7(({ data, onSimulationClick, className, .
|
|
|
5118
5435
|
children: simulation.title
|
|
5119
5436
|
}
|
|
5120
5437
|
),
|
|
5121
|
-
/* @__PURE__ */
|
|
5122
|
-
/* @__PURE__ */
|
|
5438
|
+
/* @__PURE__ */ jsxs19("div", { className: "flex items-center gap-2", children: [
|
|
5439
|
+
/* @__PURE__ */ jsx23(
|
|
5123
5440
|
Badge_default,
|
|
5124
5441
|
{
|
|
5125
5442
|
variant: "examsOutlined",
|
|
@@ -5128,10 +5445,10 @@ var CardSimulationHistory = forwardRef7(({ data, onSimulationClick, className, .
|
|
|
5128
5445
|
children: typeStyles.text
|
|
5129
5446
|
}
|
|
5130
5447
|
),
|
|
5131
|
-
/* @__PURE__ */
|
|
5448
|
+
/* @__PURE__ */ jsx23(Text_default, { size: "sm", className: "text-text-800 truncate", children: simulation.info })
|
|
5132
5449
|
] })
|
|
5133
5450
|
] }),
|
|
5134
|
-
/* @__PURE__ */
|
|
5451
|
+
/* @__PURE__ */ jsx23(
|
|
5135
5452
|
CaretRight2,
|
|
5136
5453
|
{
|
|
5137
5454
|
size: 24,
|
|
@@ -5147,7 +5464,7 @@ var CardSimulationHistory = forwardRef7(({ data, onSimulationClick, className, .
|
|
|
5147
5464
|
]
|
|
5148
5465
|
}
|
|
5149
5466
|
) }, section.date)),
|
|
5150
|
-
data.length > 0 && /* @__PURE__ */
|
|
5467
|
+
data.length > 0 && /* @__PURE__ */ jsx23("div", { className: "w-full h-6 bg-background rounded-b-3xl" })
|
|
5151
5468
|
] })
|
|
5152
5469
|
}
|
|
5153
5470
|
);
|
|
@@ -5155,7 +5472,7 @@ var CardSimulationHistory = forwardRef7(({ data, onSimulationClick, className, .
|
|
|
5155
5472
|
|
|
5156
5473
|
// src/components/Accordation/Accordation.tsx
|
|
5157
5474
|
import { CaretRight as CaretRight3 } from "phosphor-react";
|
|
5158
|
-
import { jsx as
|
|
5475
|
+
import { jsx as jsx24, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
5159
5476
|
var CardAccordation = forwardRef8(
|
|
5160
5477
|
({
|
|
5161
5478
|
trigger,
|
|
@@ -5196,7 +5513,7 @@ var CardAccordation = forwardRef8(
|
|
|
5196
5513
|
handleToggle();
|
|
5197
5514
|
}
|
|
5198
5515
|
};
|
|
5199
|
-
return /* @__PURE__ */
|
|
5516
|
+
return /* @__PURE__ */ jsxs20(
|
|
5200
5517
|
CardBase,
|
|
5201
5518
|
{
|
|
5202
5519
|
ref,
|
|
@@ -5206,7 +5523,7 @@ var CardAccordation = forwardRef8(
|
|
|
5206
5523
|
className: cn("overflow-hidden", className),
|
|
5207
5524
|
...props,
|
|
5208
5525
|
children: [
|
|
5209
|
-
/* @__PURE__ */
|
|
5526
|
+
/* @__PURE__ */ jsxs20(
|
|
5210
5527
|
"button",
|
|
5211
5528
|
{
|
|
5212
5529
|
id: headerId,
|
|
@@ -5225,7 +5542,7 @@ var CardAccordation = forwardRef8(
|
|
|
5225
5542
|
"data-value": value,
|
|
5226
5543
|
children: [
|
|
5227
5544
|
trigger,
|
|
5228
|
-
/* @__PURE__ */
|
|
5545
|
+
/* @__PURE__ */ jsx24(
|
|
5229
5546
|
CaretRight3,
|
|
5230
5547
|
{
|
|
5231
5548
|
size: 20,
|
|
@@ -5240,7 +5557,7 @@ var CardAccordation = forwardRef8(
|
|
|
5240
5557
|
]
|
|
5241
5558
|
}
|
|
5242
5559
|
),
|
|
5243
|
-
/* @__PURE__ */
|
|
5560
|
+
/* @__PURE__ */ jsx24(
|
|
5244
5561
|
"section",
|
|
5245
5562
|
{
|
|
5246
5563
|
id: contentId,
|
|
@@ -5252,7 +5569,7 @@ var CardAccordation = forwardRef8(
|
|
|
5252
5569
|
),
|
|
5253
5570
|
"data-testid": "accordion-content",
|
|
5254
5571
|
"data-value": value,
|
|
5255
|
-
children: /* @__PURE__ */
|
|
5572
|
+
children: /* @__PURE__ */ jsx24("div", { className: cn("p-4 pt-0", contentClassName), children })
|
|
5256
5573
|
}
|
|
5257
5574
|
)
|
|
5258
5575
|
]
|
|
@@ -5272,10 +5589,10 @@ import {
|
|
|
5272
5589
|
useRef as useRef6,
|
|
5273
5590
|
useState as useState11
|
|
5274
5591
|
} from "react";
|
|
5275
|
-
import { create as
|
|
5276
|
-
import { jsx as
|
|
5592
|
+
import { create as create5 } from "zustand";
|
|
5593
|
+
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
5277
5594
|
function createAccordionGroupStore(type, initialValue, collapsible) {
|
|
5278
|
-
return
|
|
5595
|
+
return create5((set, get) => ({
|
|
5279
5596
|
type,
|
|
5280
5597
|
value: initialValue,
|
|
5281
5598
|
collapsible,
|
|
@@ -5413,7 +5730,7 @@ var AccordionGroup = forwardRef9(
|
|
|
5413
5730
|
indexRef,
|
|
5414
5731
|
handleItemToggle
|
|
5415
5732
|
);
|
|
5416
|
-
return /* @__PURE__ */
|
|
5733
|
+
return /* @__PURE__ */ jsx25("div", { ref, className, ...props, children: enhancedChildren });
|
|
5417
5734
|
}
|
|
5418
5735
|
);
|
|
5419
5736
|
AccordionGroup.displayName = "AccordionGroup";
|
|
@@ -5500,7 +5817,7 @@ var calculateFormattedItemsForAutoSelection = (category, allCategories) => {
|
|
|
5500
5817
|
};
|
|
5501
5818
|
|
|
5502
5819
|
// src/components/CheckBoxGroup/CheckBoxGroup.tsx
|
|
5503
|
-
import { jsx as
|
|
5820
|
+
import { jsx as jsx26, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
5504
5821
|
var CheckboxGroup = ({
|
|
5505
5822
|
categories,
|
|
5506
5823
|
onCategoriesChange,
|
|
@@ -5803,7 +6120,7 @@ var CheckboxGroup = ({
|
|
|
5803
6120
|
};
|
|
5804
6121
|
const renderCheckboxItem = (item, categoryKey) => {
|
|
5805
6122
|
const uniqueId = `${categoryKey}-${item.id}`;
|
|
5806
|
-
return /* @__PURE__ */
|
|
6123
|
+
return /* @__PURE__ */ jsxs21(
|
|
5807
6124
|
"div",
|
|
5808
6125
|
{
|
|
5809
6126
|
className: "flex items-center gap-3 px-2",
|
|
@@ -5813,7 +6130,7 @@ var CheckboxGroup = ({
|
|
|
5813
6130
|
onMouseUp: (e) => e.stopPropagation(),
|
|
5814
6131
|
onKeyDown: (e) => e.stopPropagation(),
|
|
5815
6132
|
children: [
|
|
5816
|
-
/* @__PURE__ */
|
|
6133
|
+
/* @__PURE__ */ jsx26(
|
|
5817
6134
|
CheckBox_default,
|
|
5818
6135
|
{
|
|
5819
6136
|
id: uniqueId,
|
|
@@ -5821,7 +6138,7 @@ var CheckboxGroup = ({
|
|
|
5821
6138
|
onChange: () => toggleItem(categoryKey, item.id)
|
|
5822
6139
|
}
|
|
5823
6140
|
),
|
|
5824
|
-
/* @__PURE__ */
|
|
6141
|
+
/* @__PURE__ */ jsx26(
|
|
5825
6142
|
"label",
|
|
5826
6143
|
{
|
|
5827
6144
|
htmlFor: uniqueId,
|
|
@@ -5834,12 +6151,12 @@ var CheckboxGroup = ({
|
|
|
5834
6151
|
item.id
|
|
5835
6152
|
);
|
|
5836
6153
|
};
|
|
5837
|
-
const renderFormattedGroup = (formattedGroup, idx, categoryKey) => /* @__PURE__ */
|
|
6154
|
+
const renderFormattedGroup = (formattedGroup, idx, categoryKey) => /* @__PURE__ */ jsxs21(
|
|
5838
6155
|
"div",
|
|
5839
6156
|
{
|
|
5840
6157
|
className: "flex flex-col gap-3",
|
|
5841
6158
|
children: [
|
|
5842
|
-
"groupLabel" in formattedGroup && formattedGroup.groupLabel && /* @__PURE__ */
|
|
6159
|
+
"groupLabel" in formattedGroup && formattedGroup.groupLabel && /* @__PURE__ */ jsx26(Text_default, { size: "sm", className: "mt-2", weight: "semibold", children: formattedGroup.groupLabel }),
|
|
5843
6160
|
formattedGroup.itens?.map(
|
|
5844
6161
|
(item) => renderCheckboxItem(item, categoryKey)
|
|
5845
6162
|
)
|
|
@@ -5847,9 +6164,9 @@ var CheckboxGroup = ({
|
|
|
5847
6164
|
},
|
|
5848
6165
|
formattedGroup.groupLabel || `group-${idx}`
|
|
5849
6166
|
);
|
|
5850
|
-
const renderAccordionTrigger = (category, isEnabled) => /* @__PURE__ */
|
|
5851
|
-
/* @__PURE__ */
|
|
5852
|
-
/* @__PURE__ */
|
|
6167
|
+
const renderAccordionTrigger = (category, isEnabled) => /* @__PURE__ */ jsxs21("div", { className: "flex items-center justify-between w-full p-2", children: [
|
|
6168
|
+
/* @__PURE__ */ jsxs21("div", { className: "flex items-center gap-3", children: [
|
|
6169
|
+
/* @__PURE__ */ jsx26(
|
|
5853
6170
|
CheckBox_default,
|
|
5854
6171
|
{
|
|
5855
6172
|
checked: isMinimalOneCheckBoxIsSelected(category.key),
|
|
@@ -5858,7 +6175,7 @@ var CheckboxGroup = ({
|
|
|
5858
6175
|
onChange: () => toggleAllInCategory(category.key)
|
|
5859
6176
|
}
|
|
5860
6177
|
),
|
|
5861
|
-
/* @__PURE__ */
|
|
6178
|
+
/* @__PURE__ */ jsx26(
|
|
5862
6179
|
Text_default,
|
|
5863
6180
|
{
|
|
5864
6181
|
size: "sm",
|
|
@@ -5868,7 +6185,7 @@ var CheckboxGroup = ({
|
|
|
5868
6185
|
}
|
|
5869
6186
|
)
|
|
5870
6187
|
] }),
|
|
5871
|
-
(openAccordion === category.key || isEnabled) && /* @__PURE__ */
|
|
6188
|
+
(openAccordion === category.key || isEnabled) && /* @__PURE__ */ jsx26(Badge_default, { variant: "solid", action: "info", children: getBadgeText2(category) })
|
|
5872
6189
|
] });
|
|
5873
6190
|
const renderCompactSingleItem = (category) => {
|
|
5874
6191
|
const formattedItems = getFormattedItems(category.key);
|
|
@@ -5877,13 +6194,13 @@ var CheckboxGroup = ({
|
|
|
5877
6194
|
return null;
|
|
5878
6195
|
}
|
|
5879
6196
|
const singleItem = allItems[0];
|
|
5880
|
-
return /* @__PURE__ */
|
|
6197
|
+
return /* @__PURE__ */ jsxs21(
|
|
5881
6198
|
"div",
|
|
5882
6199
|
{
|
|
5883
6200
|
className: "flex items-center justify-between w-full px-3 py-2",
|
|
5884
6201
|
children: [
|
|
5885
|
-
/* @__PURE__ */
|
|
5886
|
-
/* @__PURE__ */
|
|
6202
|
+
/* @__PURE__ */ jsx26(Text_default, { size: "sm", weight: "bold", className: "text-text-800", children: category.label }),
|
|
6203
|
+
/* @__PURE__ */ jsx26(Text_default, { size: "sm", className: "text-text-950", children: singleItem.name })
|
|
5887
6204
|
]
|
|
5888
6205
|
},
|
|
5889
6206
|
category.key
|
|
@@ -5899,16 +6216,16 @@ var CheckboxGroup = ({
|
|
|
5899
6216
|
const allItems = formattedItems.flatMap((group) => group.itens || []);
|
|
5900
6217
|
const hasOnlyOneAvailableItem = allItems.length === 1;
|
|
5901
6218
|
if (compactSingleItem && hasOnlyOneAvailableItem && isEnabled) {
|
|
5902
|
-
return /* @__PURE__ */
|
|
6219
|
+
return /* @__PURE__ */ jsxs21("div", { children: [
|
|
5903
6220
|
renderCompactSingleItem(category),
|
|
5904
|
-
showDivider && /* @__PURE__ */
|
|
6221
|
+
showDivider && /* @__PURE__ */ jsx26(Divider_default, {})
|
|
5905
6222
|
] }, category.key);
|
|
5906
6223
|
}
|
|
5907
6224
|
const hasNoItems = formattedItems.every(
|
|
5908
6225
|
(group) => !group.itens || group.itens.length === 0
|
|
5909
6226
|
);
|
|
5910
|
-
return /* @__PURE__ */
|
|
5911
|
-
/* @__PURE__ */
|
|
6227
|
+
return /* @__PURE__ */ jsxs21("div", { children: [
|
|
6228
|
+
/* @__PURE__ */ jsx26(
|
|
5912
6229
|
CardAccordation,
|
|
5913
6230
|
{
|
|
5914
6231
|
value: category.key,
|
|
@@ -5918,12 +6235,12 @@ var CheckboxGroup = ({
|
|
|
5918
6235
|
openAccordion === category.key && "bg-background-50 border-none"
|
|
5919
6236
|
),
|
|
5920
6237
|
trigger: renderAccordionTrigger(category, isEnabled),
|
|
5921
|
-
children: /* @__PURE__ */
|
|
6238
|
+
children: /* @__PURE__ */ jsx26("div", { className: "flex flex-col gap-3 pt-2", children: hasNoItems && isEnabled ? /* @__PURE__ */ jsx26("div", { className: "px-2 py-4", children: /* @__PURE__ */ jsx26(Text_default, { size: "sm", className: "text-text-500 text-center", children: "Sem dados" }) }) : formattedItems.map(
|
|
5922
6239
|
(formattedGroup, idx) => renderFormattedGroup(formattedGroup, idx, category.key)
|
|
5923
6240
|
) })
|
|
5924
6241
|
}
|
|
5925
6242
|
),
|
|
5926
|
-
openAccordion !== category.key && showDivider && /* @__PURE__ */
|
|
6243
|
+
openAccordion !== category.key && showDivider && /* @__PURE__ */ jsx26(Divider_default, {})
|
|
5927
6244
|
] }, category.key);
|
|
5928
6245
|
};
|
|
5929
6246
|
useEffect10(() => {
|
|
@@ -5937,7 +6254,7 @@ var CheckboxGroup = ({
|
|
|
5937
6254
|
}, 0);
|
|
5938
6255
|
}
|
|
5939
6256
|
}, [categories, openAccordion]);
|
|
5940
|
-
return /* @__PURE__ */
|
|
6257
|
+
return /* @__PURE__ */ jsx26(
|
|
5941
6258
|
AccordionGroup,
|
|
5942
6259
|
{
|
|
5943
6260
|
type: "single",
|
|
@@ -5948,279 +6265,204 @@ var CheckboxGroup = ({
|
|
|
5948
6265
|
}
|
|
5949
6266
|
);
|
|
5950
6267
|
};
|
|
5951
|
-
|
|
5952
|
-
// src/components/
|
|
5953
|
-
import {
|
|
5954
|
-
|
|
5955
|
-
|
|
5956
|
-
|
|
5957
|
-
|
|
5958
|
-
|
|
5959
|
-
|
|
5960
|
-
|
|
5961
|
-
|
|
5962
|
-
|
|
5963
|
-
|
|
5964
|
-
|
|
5965
|
-
|
|
5966
|
-
|
|
5967
|
-
|
|
5968
|
-
|
|
5969
|
-
|
|
5970
|
-
|
|
5971
|
-
|
|
5972
|
-
|
|
5973
|
-
|
|
5974
|
-
|
|
5975
|
-
|
|
5976
|
-
|
|
5977
|
-
|
|
5978
|
-
|
|
5979
|
-
|
|
5980
|
-
|
|
5981
|
-
|
|
5982
|
-
|
|
5983
|
-
|
|
5984
|
-
|
|
5985
|
-
|
|
5986
|
-
|
|
5987
|
-
|
|
5988
|
-
|
|
5989
|
-
|
|
5990
|
-
|
|
5991
|
-
|
|
5992
|
-
|
|
5993
|
-
|
|
5994
|
-
|
|
5995
|
-
|
|
5996
|
-
|
|
5997
|
-
|
|
5998
|
-
finalTime: z.string().regex(TIME_REGEX).default("23:59"),
|
|
5999
|
-
canRetry: z.boolean().default(false)
|
|
6000
|
-
});
|
|
6001
|
-
var deadlineStepSchema = deadlineStepBaseSchema.refine(
|
|
6002
|
-
(data) => {
|
|
6003
|
-
const start = /* @__PURE__ */ new Date(`${data.startDate}T${data.startTime}`);
|
|
6004
|
-
const end = /* @__PURE__ */ new Date(`${data.finalDate}T${data.finalTime}`);
|
|
6005
|
-
return end >= start;
|
|
6006
|
-
},
|
|
6007
|
-
{ message: ERROR_MESSAGES.FINAL_DATE_INVALID, path: ["finalDate"] }
|
|
6008
|
-
);
|
|
6009
|
-
function validateActivityStep(data) {
|
|
6010
|
-
const errors = {};
|
|
6011
|
-
const result = activityStepSchema.safeParse({
|
|
6012
|
-
subtype: data.subtype,
|
|
6013
|
-
title: data.title,
|
|
6014
|
-
notification: data.notification
|
|
6015
|
-
});
|
|
6016
|
-
if (!result.success) {
|
|
6017
|
-
result.error.issues.forEach((issue) => {
|
|
6018
|
-
const field = issue.path[0];
|
|
6019
|
-
if (field === "subtype" || field === "title") {
|
|
6020
|
-
errors[field] = issue.message;
|
|
6021
|
-
}
|
|
6022
|
-
});
|
|
6023
|
-
}
|
|
6024
|
-
return errors;
|
|
6025
|
-
}
|
|
6026
|
-
function validateRecipientStep(data) {
|
|
6027
|
-
const errors = {};
|
|
6028
|
-
const result = recipientStepSchema.safeParse({
|
|
6029
|
-
students: data.students ?? []
|
|
6030
|
-
});
|
|
6031
|
-
if (!result.success) {
|
|
6032
|
-
result.error.issues.forEach((issue) => {
|
|
6033
|
-
if (issue.path[0] === "students") {
|
|
6034
|
-
errors.students = issue.message;
|
|
6035
|
-
}
|
|
6036
|
-
});
|
|
6037
|
-
}
|
|
6038
|
-
return errors;
|
|
6039
|
-
}
|
|
6040
|
-
function validateDeadlineStep(data) {
|
|
6041
|
-
const errors = {};
|
|
6042
|
-
if (!data.startDate) {
|
|
6043
|
-
errors.startDate = ERROR_MESSAGES.START_DATE_REQUIRED;
|
|
6044
|
-
}
|
|
6045
|
-
if (!data.finalDate) {
|
|
6046
|
-
errors.finalDate = ERROR_MESSAGES.FINAL_DATE_REQUIRED;
|
|
6047
|
-
}
|
|
6048
|
-
if (data.startDate && data.finalDate) {
|
|
6049
|
-
const result = deadlineStepSchema.safeParse({
|
|
6050
|
-
startDate: data.startDate,
|
|
6051
|
-
startTime: data.startTime ?? "00:00",
|
|
6052
|
-
finalDate: data.finalDate,
|
|
6053
|
-
finalTime: data.finalTime ?? "23:59",
|
|
6054
|
-
canRetry: data.canRetry ?? false
|
|
6055
|
-
});
|
|
6056
|
-
if (!result.success) {
|
|
6057
|
-
result.error.issues.forEach((issue) => {
|
|
6058
|
-
const field = issue.path[0];
|
|
6059
|
-
if (field === "startDate" || field === "finalDate") {
|
|
6060
|
-
errors[field] = issue.message;
|
|
6061
|
-
}
|
|
6062
|
-
});
|
|
6063
|
-
}
|
|
6064
|
-
}
|
|
6065
|
-
return errors;
|
|
6066
|
-
}
|
|
6067
|
-
function validateStep(step, data) {
|
|
6068
|
-
switch (step) {
|
|
6069
|
-
case 1:
|
|
6070
|
-
return validateActivityStep(data);
|
|
6071
|
-
case 2:
|
|
6072
|
-
return validateRecipientStep(data);
|
|
6073
|
-
case 3:
|
|
6074
|
-
return validateDeadlineStep(data);
|
|
6075
|
-
default:
|
|
6076
|
-
return {};
|
|
6077
|
-
}
|
|
6078
|
-
}
|
|
6079
|
-
function isStepValid(step, data) {
|
|
6080
|
-
const errors = validateStep(step, data);
|
|
6081
|
-
return Object.keys(errors).length === 0;
|
|
6082
|
-
}
|
|
6083
|
-
function isFormValid(data) {
|
|
6084
|
-
return isStepValid(1, data) && isStepValid(2, data) && isStepValid(3, data);
|
|
6085
|
-
}
|
|
6086
|
-
|
|
6087
|
-
// src/components/SendActivityModal/hooks/useSendActivityModal.ts
|
|
6088
|
-
var initialState = {
|
|
6089
|
-
formData: {
|
|
6090
|
-
canRetry: false,
|
|
6091
|
-
startTime: "00:00",
|
|
6092
|
-
finalTime: "23:59"
|
|
6093
|
-
},
|
|
6094
|
-
currentStep: 1,
|
|
6095
|
-
completedSteps: [],
|
|
6096
|
-
errors: {},
|
|
6097
|
-
categories: []
|
|
6098
|
-
};
|
|
6099
|
-
function extractStudentsFromCategories(categories) {
|
|
6100
|
-
const studentsCategory = categories.find(
|
|
6101
|
-
(cat) => cat.key === "students" || cat.key === "alunos" || cat.key === "student"
|
|
6102
|
-
);
|
|
6103
|
-
if (!studentsCategory?.selectedIds || !studentsCategory.itens) {
|
|
6104
|
-
return [];
|
|
6105
|
-
}
|
|
6106
|
-
return studentsCategory.selectedIds.map((id) => {
|
|
6107
|
-
const student = studentsCategory.itens?.find((item) => item.id === id);
|
|
6108
|
-
if (student) {
|
|
6109
|
-
const rawStudentId = student.studentId;
|
|
6110
|
-
const rawUserInstId = student.userInstitutionId;
|
|
6111
|
-
const rawInstId = student.institutionId;
|
|
6112
|
-
const studentId = typeof rawStudentId === "string" || typeof rawStudentId === "number" ? String(rawStudentId) : student.id;
|
|
6113
|
-
let userInstitutionId = "";
|
|
6114
|
-
if (typeof rawUserInstId === "string" || typeof rawUserInstId === "number") {
|
|
6115
|
-
userInstitutionId = String(rawUserInstId);
|
|
6116
|
-
} else if (typeof rawInstId === "string" || typeof rawInstId === "number") {
|
|
6117
|
-
userInstitutionId = String(rawInstId);
|
|
6118
|
-
}
|
|
6119
|
-
if (!userInstitutionId) {
|
|
6120
|
-
return null;
|
|
6121
|
-
}
|
|
6122
|
-
return { studentId, userInstitutionId };
|
|
6268
|
+
|
|
6269
|
+
// src/components/shared/SendModalBase/components/RecipientStep.tsx
|
|
6270
|
+
import { jsx as jsx27, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
6271
|
+
var RecipientStep = ({
|
|
6272
|
+
categories,
|
|
6273
|
+
onCategoriesChange,
|
|
6274
|
+
entityNameWithArticle,
|
|
6275
|
+
studentsError,
|
|
6276
|
+
testIdPrefix
|
|
6277
|
+
}) => {
|
|
6278
|
+
return /* @__PURE__ */ jsxs22(
|
|
6279
|
+
"div",
|
|
6280
|
+
{
|
|
6281
|
+
className: "flex flex-col gap-4",
|
|
6282
|
+
"data-testid": testIdPrefix ? `${testIdPrefix}-recipient-step` : void 0,
|
|
6283
|
+
children: [
|
|
6284
|
+
/* @__PURE__ */ jsxs22(Text_default, { size: "sm", weight: "medium", color: "text-text-700", children: [
|
|
6285
|
+
"Para quem voc\xEA vai enviar ",
|
|
6286
|
+
entityNameWithArticle,
|
|
6287
|
+
"?"
|
|
6288
|
+
] }),
|
|
6289
|
+
/* @__PURE__ */ jsx27(
|
|
6290
|
+
"div",
|
|
6291
|
+
{
|
|
6292
|
+
className: cn(
|
|
6293
|
+
"max-h-[300px] overflow-y-auto",
|
|
6294
|
+
"scrollbar-thin scrollbar-thumb-border-300 scrollbar-track-transparent"
|
|
6295
|
+
),
|
|
6296
|
+
children: /* @__PURE__ */ jsx27(
|
|
6297
|
+
CheckboxGroup,
|
|
6298
|
+
{
|
|
6299
|
+
categories,
|
|
6300
|
+
onCategoriesChange,
|
|
6301
|
+
compactSingleItem: true,
|
|
6302
|
+
showDivider: true
|
|
6303
|
+
}
|
|
6304
|
+
)
|
|
6305
|
+
}
|
|
6306
|
+
),
|
|
6307
|
+
/* @__PURE__ */ jsx27(
|
|
6308
|
+
SendModalError,
|
|
6309
|
+
{
|
|
6310
|
+
error: studentsError,
|
|
6311
|
+
testId: testIdPrefix ? `${testIdPrefix}-students-error` : void 0
|
|
6312
|
+
}
|
|
6313
|
+
)
|
|
6314
|
+
]
|
|
6123
6315
|
}
|
|
6124
|
-
return null;
|
|
6125
|
-
}).filter(
|
|
6126
|
-
(s) => s !== null
|
|
6127
6316
|
);
|
|
6128
|
-
}
|
|
6129
|
-
|
|
6130
|
-
|
|
6131
|
-
|
|
6132
|
-
|
|
6133
|
-
|
|
6134
|
-
|
|
6135
|
-
|
|
6136
|
-
|
|
6137
|
-
|
|
6138
|
-
|
|
6139
|
-
|
|
6140
|
-
|
|
6141
|
-
|
|
6142
|
-
|
|
6143
|
-
|
|
6144
|
-
|
|
6145
|
-
|
|
6146
|
-
|
|
6147
|
-
|
|
6148
|
-
|
|
6149
|
-
|
|
6150
|
-
|
|
6151
|
-
|
|
6152
|
-
|
|
6153
|
-
|
|
6154
|
-
|
|
6155
|
-
|
|
6156
|
-
|
|
6157
|
-
|
|
6158
|
-
|
|
6159
|
-
|
|
6160
|
-
|
|
6161
|
-
|
|
6162
|
-
|
|
6163
|
-
|
|
6164
|
-
|
|
6165
|
-
|
|
6166
|
-
|
|
6167
|
-
|
|
6168
|
-
|
|
6169
|
-
|
|
6170
|
-
|
|
6171
|
-
|
|
6172
|
-
|
|
6173
|
-
|
|
6174
|
-
|
|
6175
|
-
|
|
6176
|
-
|
|
6177
|
-
|
|
6178
|
-
|
|
6179
|
-
|
|
6180
|
-
|
|
6181
|
-
|
|
6182
|
-
|
|
6183
|
-
}
|
|
6184
|
-
const errors1 = validateStep(1, state.formData);
|
|
6185
|
-
const errors2 = validateStep(2, formDataForStep2);
|
|
6186
|
-
const errors3 = validateStep(3, state.formData);
|
|
6187
|
-
const allErrors = { ...errors1, ...errors2, ...errors3 };
|
|
6188
|
-
set({ errors: allErrors });
|
|
6189
|
-
return Object.keys(allErrors).length === 0;
|
|
6190
|
-
},
|
|
6191
|
-
setCategories: (categories) => {
|
|
6192
|
-
const students = extractStudentsFromCategories(categories);
|
|
6193
|
-
set((state) => ({
|
|
6194
|
-
categories,
|
|
6195
|
-
formData: { ...state.formData, students }
|
|
6196
|
-
}));
|
|
6197
|
-
},
|
|
6198
|
-
reset: () => {
|
|
6199
|
-
set({
|
|
6200
|
-
...initialState,
|
|
6201
|
-
categories: []
|
|
6202
|
-
});
|
|
6317
|
+
};
|
|
6318
|
+
|
|
6319
|
+
// src/components/shared/SendModalBase/components/DeadlineStep.tsx
|
|
6320
|
+
import { jsx as jsx28, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
6321
|
+
var DeadlineStep = ({
|
|
6322
|
+
startDate,
|
|
6323
|
+
startTime,
|
|
6324
|
+
finalDate,
|
|
6325
|
+
finalTime,
|
|
6326
|
+
onStartDateChange,
|
|
6327
|
+
onStartTimeChange,
|
|
6328
|
+
onFinalDateChange,
|
|
6329
|
+
onFinalTimeChange,
|
|
6330
|
+
errors,
|
|
6331
|
+
testIdPrefix,
|
|
6332
|
+
children
|
|
6333
|
+
}) => {
|
|
6334
|
+
return /* @__PURE__ */ jsxs23(
|
|
6335
|
+
"div",
|
|
6336
|
+
{
|
|
6337
|
+
className: "flex flex-col gap-4 sm:gap-6 pt-6",
|
|
6338
|
+
"data-testid": testIdPrefix ? `${testIdPrefix}-deadline-step` : void 0,
|
|
6339
|
+
children: [
|
|
6340
|
+
/* @__PURE__ */ jsxs23("div", { className: "grid grid-cols-2 gap-2", children: [
|
|
6341
|
+
/* @__PURE__ */ jsx28(
|
|
6342
|
+
DateTimeInput_default,
|
|
6343
|
+
{
|
|
6344
|
+
label: "Iniciar em*",
|
|
6345
|
+
date: startDate,
|
|
6346
|
+
time: startTime,
|
|
6347
|
+
onDateChange: onStartDateChange,
|
|
6348
|
+
onTimeChange: onStartTimeChange,
|
|
6349
|
+
errorMessage: [errors.startDate, errors.startTime].filter(Boolean).join(" ") || void 0,
|
|
6350
|
+
defaultTime: "00:00",
|
|
6351
|
+
testId: testIdPrefix ? `${testIdPrefix}-start-datetime` : "start-datetime",
|
|
6352
|
+
className: "w-full"
|
|
6353
|
+
}
|
|
6354
|
+
),
|
|
6355
|
+
/* @__PURE__ */ jsx28(
|
|
6356
|
+
DateTimeInput_default,
|
|
6357
|
+
{
|
|
6358
|
+
label: "Finalizar at\xE9*",
|
|
6359
|
+
date: finalDate,
|
|
6360
|
+
time: finalTime,
|
|
6361
|
+
onDateChange: onFinalDateChange,
|
|
6362
|
+
onTimeChange: onFinalTimeChange,
|
|
6363
|
+
errorMessage: [errors.finalDate, errors.finalTime].filter(Boolean).join(" ") || void 0,
|
|
6364
|
+
defaultTime: "23:59",
|
|
6365
|
+
testId: testIdPrefix ? `${testIdPrefix}-final-datetime` : "final-datetime",
|
|
6366
|
+
className: "w-full"
|
|
6367
|
+
}
|
|
6368
|
+
)
|
|
6369
|
+
] }),
|
|
6370
|
+
children
|
|
6371
|
+
]
|
|
6203
6372
|
}
|
|
6204
|
-
|
|
6205
|
-
|
|
6206
|
-
function useSendActivityModal() {
|
|
6207
|
-
return useSendActivityModalStore();
|
|
6208
|
-
}
|
|
6373
|
+
);
|
|
6374
|
+
};
|
|
6209
6375
|
|
|
6210
|
-
// src/components/
|
|
6211
|
-
|
|
6212
|
-
|
|
6213
|
-
|
|
6214
|
-
|
|
6215
|
-
|
|
6376
|
+
// src/components/shared/SendModalBase/components/SendModalFooter.tsx
|
|
6377
|
+
import {
|
|
6378
|
+
CaretLeft as CaretLeftIcon,
|
|
6379
|
+
ArrowRight as ArrowRightIcon,
|
|
6380
|
+
PaperPlaneTilt as PaperPlaneTiltIcon
|
|
6381
|
+
} from "phosphor-react";
|
|
6382
|
+
import { jsx as jsx29, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
6383
|
+
var SendModalFooter = ({
|
|
6384
|
+
currentStep,
|
|
6385
|
+
maxSteps,
|
|
6386
|
+
isLoading,
|
|
6387
|
+
onCancel,
|
|
6388
|
+
onPreviousStep,
|
|
6389
|
+
onNextStep,
|
|
6390
|
+
onSubmit,
|
|
6391
|
+
entityName,
|
|
6392
|
+
testIdPrefix
|
|
6393
|
+
}) => {
|
|
6394
|
+
const isLastStep = currentStep >= maxSteps;
|
|
6395
|
+
const showPreviousButton = currentStep > 1;
|
|
6396
|
+
return /* @__PURE__ */ jsxs24(
|
|
6397
|
+
"div",
|
|
6398
|
+
{
|
|
6399
|
+
className: "flex flex-col-reverse sm:flex-row items-center justify-between gap-3 w-full",
|
|
6400
|
+
"data-testid": testIdPrefix ? `${testIdPrefix}-footer` : void 0,
|
|
6401
|
+
children: [
|
|
6402
|
+
/* @__PURE__ */ jsx29(
|
|
6403
|
+
Button_default,
|
|
6404
|
+
{
|
|
6405
|
+
variant: "link",
|
|
6406
|
+
action: "primary",
|
|
6407
|
+
onClick: onCancel,
|
|
6408
|
+
className: "w-full sm:w-auto",
|
|
6409
|
+
"data-testid": testIdPrefix ? `${testIdPrefix}-cancel-button` : void 0,
|
|
6410
|
+
children: "Cancelar"
|
|
6411
|
+
}
|
|
6412
|
+
),
|
|
6413
|
+
/* @__PURE__ */ jsxs24("div", { className: "flex flex-col-reverse sm:flex-row items-center gap-2 sm:gap-3 w-full sm:w-auto", children: [
|
|
6414
|
+
showPreviousButton && /* @__PURE__ */ jsx29(
|
|
6415
|
+
Button_default,
|
|
6416
|
+
{
|
|
6417
|
+
variant: "outline",
|
|
6418
|
+
action: "primary",
|
|
6419
|
+
onClick: onPreviousStep,
|
|
6420
|
+
iconLeft: /* @__PURE__ */ jsx29(CaretLeftIcon, { size: 16 }),
|
|
6421
|
+
className: "w-full sm:w-auto",
|
|
6422
|
+
"data-testid": testIdPrefix ? `${testIdPrefix}-previous-button` : void 0,
|
|
6423
|
+
children: "Anterior"
|
|
6424
|
+
}
|
|
6425
|
+
),
|
|
6426
|
+
isLastStep ? /* @__PURE__ */ jsx29(
|
|
6427
|
+
Button_default,
|
|
6428
|
+
{
|
|
6429
|
+
variant: "solid",
|
|
6430
|
+
action: "primary",
|
|
6431
|
+
onClick: onSubmit,
|
|
6432
|
+
disabled: isLoading,
|
|
6433
|
+
iconLeft: /* @__PURE__ */ jsx29(PaperPlaneTiltIcon, { size: 16 }),
|
|
6434
|
+
className: "w-full sm:w-auto",
|
|
6435
|
+
"data-testid": testIdPrefix ? `${testIdPrefix}-submit-button` : void 0,
|
|
6436
|
+
children: isLoading ? "Enviando..." : `Enviar ${entityName}`
|
|
6437
|
+
}
|
|
6438
|
+
) : /* @__PURE__ */ jsx29(
|
|
6439
|
+
Button_default,
|
|
6440
|
+
{
|
|
6441
|
+
variant: "solid",
|
|
6442
|
+
action: "primary",
|
|
6443
|
+
onClick: onNextStep,
|
|
6444
|
+
iconRight: /* @__PURE__ */ jsx29(ArrowRightIcon, { size: 16 }),
|
|
6445
|
+
className: "w-full sm:w-auto",
|
|
6446
|
+
"data-testid": testIdPrefix ? `${testIdPrefix}-next-button` : void 0,
|
|
6447
|
+
children: "Pr\xF3ximo"
|
|
6448
|
+
}
|
|
6449
|
+
)
|
|
6450
|
+
] })
|
|
6451
|
+
]
|
|
6452
|
+
}
|
|
6453
|
+
);
|
|
6454
|
+
};
|
|
6216
6455
|
|
|
6217
6456
|
// src/components/SendActivityModal/SendActivityModal.tsx
|
|
6218
|
-
import { jsx as
|
|
6457
|
+
import { jsx as jsx30, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
6219
6458
|
var STEPPER_STEPS = [
|
|
6220
6459
|
{ id: "activity", label: "Atividade", state: "pending" },
|
|
6221
6460
|
{ id: "recipient", label: "Destinat\xE1rio", state: "pending" },
|
|
6222
6461
|
{ id: "deadline", label: "Prazo", state: "pending" }
|
|
6223
6462
|
];
|
|
6463
|
+
var MAX_STEPS = 3;
|
|
6464
|
+
var ENTITY_NAME = "atividade";
|
|
6465
|
+
var ENTITY_NAME_WITH_ARTICLE = "a atividade";
|
|
6224
6466
|
var SendActivityModal = ({
|
|
6225
6467
|
isOpen,
|
|
6226
6468
|
onClose,
|
|
@@ -6266,62 +6508,44 @@ var SendActivityModal = ({
|
|
|
6266
6508
|
prevInitialDataRef.current = void 0;
|
|
6267
6509
|
}
|
|
6268
6510
|
}, [isOpen, reset]);
|
|
6269
|
-
const
|
|
6511
|
+
const {
|
|
6512
|
+
handleStartDateChange,
|
|
6513
|
+
handleStartTimeChange,
|
|
6514
|
+
handleFinalDateChange,
|
|
6515
|
+
handleFinalTimeChange
|
|
6516
|
+
} = useDateTimeHandlers({ setFormData: store.setFormData });
|
|
6517
|
+
const handleCategoriesChange = useCallback2(
|
|
6270
6518
|
(updatedCategories) => {
|
|
6271
6519
|
setCategories(updatedCategories);
|
|
6272
6520
|
onCategoriesChange?.(updatedCategories);
|
|
6273
6521
|
},
|
|
6274
6522
|
[setCategories, onCategoriesChange]
|
|
6275
6523
|
);
|
|
6276
|
-
const handleActivityTypeSelect =
|
|
6524
|
+
const handleActivityTypeSelect = useCallback2(
|
|
6277
6525
|
(subtype) => {
|
|
6278
6526
|
store.setFormData({ subtype });
|
|
6279
6527
|
},
|
|
6280
6528
|
[store]
|
|
6281
6529
|
);
|
|
6282
|
-
const handleTitleChange =
|
|
6530
|
+
const handleTitleChange = useCallback2(
|
|
6283
6531
|
(e) => {
|
|
6284
6532
|
store.setFormData({ title: e.target.value });
|
|
6285
6533
|
},
|
|
6286
6534
|
[store]
|
|
6287
6535
|
);
|
|
6288
|
-
const handleNotificationChange =
|
|
6536
|
+
const handleNotificationChange = useCallback2(
|
|
6289
6537
|
(e) => {
|
|
6290
6538
|
store.setFormData({ notification: e.target.value });
|
|
6291
6539
|
},
|
|
6292
6540
|
[store]
|
|
6293
6541
|
);
|
|
6294
|
-
const
|
|
6295
|
-
(date) => {
|
|
6296
|
-
store.setFormData({ startDate: date });
|
|
6297
|
-
},
|
|
6298
|
-
[store]
|
|
6299
|
-
);
|
|
6300
|
-
const handleStartTimeChange = useCallback(
|
|
6301
|
-
(time) => {
|
|
6302
|
-
store.setFormData({ startTime: time });
|
|
6303
|
-
},
|
|
6304
|
-
[store]
|
|
6305
|
-
);
|
|
6306
|
-
const handleFinalDateChange = useCallback(
|
|
6307
|
-
(date) => {
|
|
6308
|
-
store.setFormData({ finalDate: date });
|
|
6309
|
-
},
|
|
6310
|
-
[store]
|
|
6311
|
-
);
|
|
6312
|
-
const handleFinalTimeChange = useCallback(
|
|
6313
|
-
(time) => {
|
|
6314
|
-
store.setFormData({ finalTime: time });
|
|
6315
|
-
},
|
|
6316
|
-
[store]
|
|
6317
|
-
);
|
|
6318
|
-
const handleRetryChange = useCallback(
|
|
6542
|
+
const handleRetryChange = useCallback2(
|
|
6319
6543
|
(value) => {
|
|
6320
6544
|
store.setFormData({ canRetry: value === "yes" });
|
|
6321
6545
|
},
|
|
6322
6546
|
[store]
|
|
6323
6547
|
);
|
|
6324
|
-
const handleSubmit =
|
|
6548
|
+
const handleSubmit = useCallback2(async () => {
|
|
6325
6549
|
const isValid = store.validateAllSteps();
|
|
6326
6550
|
if (!isValid) return;
|
|
6327
6551
|
try {
|
|
@@ -6335,29 +6559,13 @@ var SendActivityModal = ({
|
|
|
6335
6559
|
}
|
|
6336
6560
|
}
|
|
6337
6561
|
}, [store, onSubmit, onError]);
|
|
6338
|
-
const handleCancel =
|
|
6562
|
+
const handleCancel = useCallback2(() => {
|
|
6339
6563
|
onClose();
|
|
6340
6564
|
}, [onClose]);
|
|
6341
|
-
const
|
|
6342
|
-
|
|
6343
|
-
|
|
6344
|
-
|
|
6345
|
-
{
|
|
6346
|
-
as: "p",
|
|
6347
|
-
size: "sm",
|
|
6348
|
-
color: "text-error-600",
|
|
6349
|
-
className: "flex items-center gap-1 mt-1",
|
|
6350
|
-
children: [
|
|
6351
|
-
/* @__PURE__ */ jsx26(WarningCircleIcon, { size: 16 }),
|
|
6352
|
-
error
|
|
6353
|
-
]
|
|
6354
|
-
}
|
|
6355
|
-
);
|
|
6356
|
-
};
|
|
6357
|
-
const renderActivityStep = () => /* @__PURE__ */ jsxs21("div", { className: "flex flex-col gap-6", children: [
|
|
6358
|
-
/* @__PURE__ */ jsxs21("div", { children: [
|
|
6359
|
-
/* @__PURE__ */ jsx26(Text_default, { size: "sm", weight: "medium", color: "text-text-700", className: "mb-3", children: "Tipo de atividade*" }),
|
|
6360
|
-
/* @__PURE__ */ jsx26("div", { className: "flex flex-wrap gap-2", children: ACTIVITY_TYPE_OPTIONS.map((type) => /* @__PURE__ */ jsx26(
|
|
6565
|
+
const renderActivityStep = () => /* @__PURE__ */ jsxs25("div", { className: "flex flex-col gap-6", children: [
|
|
6566
|
+
/* @__PURE__ */ jsxs25("div", { children: [
|
|
6567
|
+
/* @__PURE__ */ jsx30(Text_default, { size: "sm", weight: "medium", color: "text-text-700", className: "mb-3", children: "Tipo de atividade*" }),
|
|
6568
|
+
/* @__PURE__ */ jsx30("div", { className: "flex flex-wrap gap-2", children: ACTIVITY_TYPE_OPTIONS.map((type) => /* @__PURE__ */ jsx30(
|
|
6361
6569
|
Chips_default,
|
|
6362
6570
|
{
|
|
6363
6571
|
selected: store.formData.subtype === type.value,
|
|
@@ -6366,9 +6574,9 @@ var SendActivityModal = ({
|
|
|
6366
6574
|
},
|
|
6367
6575
|
type.value
|
|
6368
6576
|
)) }),
|
|
6369
|
-
|
|
6577
|
+
/* @__PURE__ */ jsx30(SendModalError, { error: store.errors.subtype })
|
|
6370
6578
|
] }),
|
|
6371
|
-
/* @__PURE__ */
|
|
6579
|
+
/* @__PURE__ */ jsx30(
|
|
6372
6580
|
Input_default,
|
|
6373
6581
|
{
|
|
6374
6582
|
label: "T\xEDtulo",
|
|
@@ -6380,7 +6588,7 @@ var SendActivityModal = ({
|
|
|
6380
6588
|
errorMessage: store.errors.title
|
|
6381
6589
|
}
|
|
6382
6590
|
),
|
|
6383
|
-
/* @__PURE__ */
|
|
6591
|
+
/* @__PURE__ */ jsx30(
|
|
6384
6592
|
TextArea_default,
|
|
6385
6593
|
{
|
|
6386
6594
|
label: "Mensagem da notifica\xE7\xE3o",
|
|
@@ -6390,164 +6598,99 @@ var SendActivityModal = ({
|
|
|
6390
6598
|
}
|
|
6391
6599
|
)
|
|
6392
6600
|
] });
|
|
6393
|
-
const
|
|
6394
|
-
|
|
6395
|
-
|
|
6396
|
-
|
|
6397
|
-
|
|
6398
|
-
"
|
|
6399
|
-
|
|
6400
|
-
|
|
6401
|
-
|
|
6402
|
-
|
|
6403
|
-
|
|
6404
|
-
|
|
6405
|
-
|
|
6406
|
-
|
|
6407
|
-
|
|
6408
|
-
|
|
6409
|
-
|
|
6410
|
-
|
|
6411
|
-
|
|
6412
|
-
|
|
6413
|
-
|
|
6414
|
-
|
|
6415
|
-
|
|
6416
|
-
|
|
6417
|
-
|
|
6418
|
-
|
|
6419
|
-
|
|
6420
|
-
|
|
6421
|
-
|
|
6422
|
-
|
|
6423
|
-
|
|
6424
|
-
|
|
6425
|
-
|
|
6426
|
-
|
|
6427
|
-
|
|
6428
|
-
|
|
6429
|
-
|
|
6430
|
-
|
|
6431
|
-
|
|
6432
|
-
|
|
6433
|
-
),
|
|
6434
|
-
/* @__PURE__ */ jsx26(
|
|
6435
|
-
DateTimeInput_default,
|
|
6436
|
-
{
|
|
6437
|
-
label: "Finalizar at\xE9*",
|
|
6438
|
-
date: store.formData.finalDate || "",
|
|
6439
|
-
time: store.formData.finalTime || "",
|
|
6440
|
-
onDateChange: handleFinalDateChange,
|
|
6441
|
-
onTimeChange: handleFinalTimeChange,
|
|
6442
|
-
errorMessage: store.errors.finalDate,
|
|
6443
|
-
defaultTime: "23:59",
|
|
6444
|
-
testId: "final-datetime",
|
|
6445
|
-
className: "w-full"
|
|
6446
|
-
}
|
|
6447
|
-
)
|
|
6448
|
-
] }),
|
|
6449
|
-
/* @__PURE__ */ jsxs21("div", { children: [
|
|
6450
|
-
/* @__PURE__ */ jsx26(Text_default, { size: "sm", weight: "medium", color: "text-text-700", className: "mb-3", children: "Permitir refazer?" }),
|
|
6451
|
-
/* @__PURE__ */ jsxs21(
|
|
6452
|
-
RadioGroup,
|
|
6453
|
-
{
|
|
6454
|
-
value: store.formData.canRetry ? "yes" : "no",
|
|
6455
|
-
onValueChange: handleRetryChange,
|
|
6456
|
-
className: "flex flex-row gap-6",
|
|
6457
|
-
children: [
|
|
6458
|
-
/* @__PURE__ */ jsxs21("div", { className: "flex items-center gap-2", children: [
|
|
6459
|
-
/* @__PURE__ */ jsx26(RadioGroupItem, { value: "yes", id: "radio-item-yes" }),
|
|
6460
|
-
/* @__PURE__ */ jsx26(
|
|
6461
|
-
Text_default,
|
|
6462
|
-
{
|
|
6463
|
-
as: "label",
|
|
6464
|
-
size: "sm",
|
|
6465
|
-
color: "text-text-700",
|
|
6466
|
-
className: "cursor-pointer",
|
|
6467
|
-
htmlFor: "radio-item-yes",
|
|
6468
|
-
children: "Sim"
|
|
6469
|
-
}
|
|
6470
|
-
)
|
|
6471
|
-
] }),
|
|
6472
|
-
/* @__PURE__ */ jsxs21("div", { className: "flex items-center gap-2", children: [
|
|
6473
|
-
/* @__PURE__ */ jsx26(RadioGroupItem, { value: "no", id: "radio-item-no" }),
|
|
6474
|
-
/* @__PURE__ */ jsx26(
|
|
6475
|
-
Text_default,
|
|
6476
|
-
{
|
|
6477
|
-
as: "label",
|
|
6478
|
-
size: "sm",
|
|
6479
|
-
color: "text-text-700",
|
|
6480
|
-
className: "cursor-pointer",
|
|
6481
|
-
htmlFor: "radio-item-no",
|
|
6482
|
-
children: "N\xE3o"
|
|
6483
|
-
}
|
|
6484
|
-
)
|
|
6485
|
-
] })
|
|
6486
|
-
]
|
|
6487
|
-
}
|
|
6488
|
-
)
|
|
6489
|
-
] })
|
|
6601
|
+
const renderRetryOption = () => /* @__PURE__ */ jsxs25("div", { children: [
|
|
6602
|
+
/* @__PURE__ */ jsx30(Text_default, { size: "sm", weight: "medium", color: "text-text-700", className: "mb-3", children: "Permitir refazer?" }),
|
|
6603
|
+
/* @__PURE__ */ jsxs25(
|
|
6604
|
+
RadioGroup,
|
|
6605
|
+
{
|
|
6606
|
+
value: store.formData.canRetry ? "yes" : "no",
|
|
6607
|
+
onValueChange: handleRetryChange,
|
|
6608
|
+
className: "flex flex-row gap-6",
|
|
6609
|
+
children: [
|
|
6610
|
+
/* @__PURE__ */ jsxs25("div", { className: "flex items-center gap-2", children: [
|
|
6611
|
+
/* @__PURE__ */ jsx30(RadioGroupItem, { value: "yes", id: "radio-item-yes" }),
|
|
6612
|
+
/* @__PURE__ */ jsx30(
|
|
6613
|
+
Text_default,
|
|
6614
|
+
{
|
|
6615
|
+
as: "label",
|
|
6616
|
+
size: "sm",
|
|
6617
|
+
color: "text-text-700",
|
|
6618
|
+
className: "cursor-pointer",
|
|
6619
|
+
htmlFor: "radio-item-yes",
|
|
6620
|
+
children: "Sim"
|
|
6621
|
+
}
|
|
6622
|
+
)
|
|
6623
|
+
] }),
|
|
6624
|
+
/* @__PURE__ */ jsxs25("div", { className: "flex items-center gap-2", children: [
|
|
6625
|
+
/* @__PURE__ */ jsx30(RadioGroupItem, { value: "no", id: "radio-item-no" }),
|
|
6626
|
+
/* @__PURE__ */ jsx30(
|
|
6627
|
+
Text_default,
|
|
6628
|
+
{
|
|
6629
|
+
as: "label",
|
|
6630
|
+
size: "sm",
|
|
6631
|
+
color: "text-text-700",
|
|
6632
|
+
className: "cursor-pointer",
|
|
6633
|
+
htmlFor: "radio-item-no",
|
|
6634
|
+
children: "N\xE3o"
|
|
6635
|
+
}
|
|
6636
|
+
)
|
|
6637
|
+
] })
|
|
6638
|
+
]
|
|
6639
|
+
}
|
|
6640
|
+
)
|
|
6490
6641
|
] });
|
|
6491
6642
|
const renderStepContent = () => {
|
|
6643
|
+
const categoriesToRender = storeCategories.length > 0 ? storeCategories : initialCategories;
|
|
6492
6644
|
switch (store.currentStep) {
|
|
6493
6645
|
case 1:
|
|
6494
6646
|
return renderActivityStep();
|
|
6495
6647
|
case 2:
|
|
6496
|
-
return
|
|
6648
|
+
return /* @__PURE__ */ jsx30(
|
|
6649
|
+
RecipientStep,
|
|
6650
|
+
{
|
|
6651
|
+
categories: categoriesToRender,
|
|
6652
|
+
onCategoriesChange: handleCategoriesChange,
|
|
6653
|
+
entityNameWithArticle: ENTITY_NAME_WITH_ARTICLE,
|
|
6654
|
+
studentsError: store.errors.students
|
|
6655
|
+
}
|
|
6656
|
+
);
|
|
6497
6657
|
case 3:
|
|
6498
|
-
return
|
|
6658
|
+
return /* @__PURE__ */ jsx30(
|
|
6659
|
+
DeadlineStep,
|
|
6660
|
+
{
|
|
6661
|
+
startDate: store.formData.startDate || "",
|
|
6662
|
+
startTime: store.formData.startTime || "",
|
|
6663
|
+
finalDate: store.formData.finalDate || "",
|
|
6664
|
+
finalTime: store.formData.finalTime || "",
|
|
6665
|
+
onStartDateChange: handleStartDateChange,
|
|
6666
|
+
onStartTimeChange: handleStartTimeChange,
|
|
6667
|
+
onFinalDateChange: handleFinalDateChange,
|
|
6668
|
+
onFinalTimeChange: handleFinalTimeChange,
|
|
6669
|
+
errors: {
|
|
6670
|
+
startDate: store.errors.startDate,
|
|
6671
|
+
finalDate: store.errors.finalDate
|
|
6672
|
+
},
|
|
6673
|
+
children: renderRetryOption()
|
|
6674
|
+
}
|
|
6675
|
+
);
|
|
6499
6676
|
default:
|
|
6500
6677
|
return null;
|
|
6501
6678
|
}
|
|
6502
6679
|
};
|
|
6503
|
-
const renderFooter = () => /* @__PURE__ */
|
|
6504
|
-
|
|
6505
|
-
|
|
6506
|
-
|
|
6507
|
-
|
|
6508
|
-
|
|
6509
|
-
|
|
6510
|
-
|
|
6511
|
-
|
|
6512
|
-
|
|
6513
|
-
|
|
6514
|
-
|
|
6515
|
-
|
|
6516
|
-
|
|
6517
|
-
{
|
|
6518
|
-
variant: "outline",
|
|
6519
|
-
action: "primary",
|
|
6520
|
-
onClick: store.previousStep,
|
|
6521
|
-
iconLeft: /* @__PURE__ */ jsx26(CaretLeftIcon, { size: 16 }),
|
|
6522
|
-
className: "w-full sm:w-auto",
|
|
6523
|
-
children: "Anterior"
|
|
6524
|
-
}
|
|
6525
|
-
),
|
|
6526
|
-
store.currentStep < 3 ? /* @__PURE__ */ jsx26(
|
|
6527
|
-
Button_default,
|
|
6528
|
-
{
|
|
6529
|
-
variant: "solid",
|
|
6530
|
-
action: "primary",
|
|
6531
|
-
onClick: () => store.nextStep(),
|
|
6532
|
-
iconRight: /* @__PURE__ */ jsx26(ArrowRightIcon, { size: 16 }),
|
|
6533
|
-
className: "w-full sm:w-auto",
|
|
6534
|
-
children: "Pr\xF3ximo"
|
|
6535
|
-
}
|
|
6536
|
-
) : /* @__PURE__ */ jsx26(
|
|
6537
|
-
Button_default,
|
|
6538
|
-
{
|
|
6539
|
-
variant: "solid",
|
|
6540
|
-
action: "primary",
|
|
6541
|
-
onClick: handleSubmit,
|
|
6542
|
-
disabled: isLoading,
|
|
6543
|
-
iconLeft: /* @__PURE__ */ jsx26(PaperPlaneTiltIcon, { size: 16 }),
|
|
6544
|
-
className: "w-full sm:w-auto",
|
|
6545
|
-
children: isLoading ? "Enviando..." : "Enviar atividade"
|
|
6546
|
-
}
|
|
6547
|
-
)
|
|
6548
|
-
] })
|
|
6549
|
-
] });
|
|
6550
|
-
return /* @__PURE__ */ jsxs21(
|
|
6680
|
+
const renderFooter = () => /* @__PURE__ */ jsx30(
|
|
6681
|
+
SendModalFooter,
|
|
6682
|
+
{
|
|
6683
|
+
currentStep: store.currentStep,
|
|
6684
|
+
maxSteps: MAX_STEPS,
|
|
6685
|
+
isLoading,
|
|
6686
|
+
onCancel: handleCancel,
|
|
6687
|
+
onPreviousStep: store.previousStep,
|
|
6688
|
+
onNextStep: () => store.nextStep(),
|
|
6689
|
+
onSubmit: handleSubmit,
|
|
6690
|
+
entityName: ENTITY_NAME
|
|
6691
|
+
}
|
|
6692
|
+
);
|
|
6693
|
+
return /* @__PURE__ */ jsxs25(
|
|
6551
6694
|
Modal_default,
|
|
6552
6695
|
{
|
|
6553
6696
|
isOpen,
|
|
@@ -6557,7 +6700,7 @@ var SendActivityModal = ({
|
|
|
6557
6700
|
footer: renderFooter(),
|
|
6558
6701
|
contentClassName: "flex flex-col gap-8 sm:gap-10 max-h-[70vh] overflow-y-auto",
|
|
6559
6702
|
children: [
|
|
6560
|
-
/* @__PURE__ */
|
|
6703
|
+
/* @__PURE__ */ jsx30(
|
|
6561
6704
|
Stepper_default,
|
|
6562
6705
|
{
|
|
6563
6706
|
steps: STEPPER_STEPS,
|