analytica-frontend-lib 1.0.79 → 1.0.81

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/index.d.mts CHANGED
@@ -27,7 +27,7 @@ export { AlertDialog } from './AlertDialog/index.mjs';
27
27
  export { default as DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger, MenuLabel, ProfileMenuFooter, ProfileMenuHeader, ProfileMenuSection, ProfileMenuTrigger } from './DropdownMenu/index.mjs';
28
28
  export { default as Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from './Select/index.mjs';
29
29
  export { default as Menu, MenuContent, MenuItem, MenuOverflow } from './Menu/index.mjs';
30
- export { CardActivitiesResults, CardPerformance, CardProgress, CardQuestions, CardResults, CardSimulado, CardStatus, CardTest, CardTopic } from './Card/index.mjs';
30
+ export { CardActivitiesResults, CardPerformance, CardProgress, CardQuestions, CardResults, CardSimulado, CardSimulationHistory, CardStatus, CardTest, CardTopic } from './Card/index.mjs';
31
31
  export { Skeleton, SkeletonCard, SkeletonCircle, SkeletonList, SkeletonRectangle, SkeletonRounded, SkeletonTable, SkeletonText } from './Skeleton/index.mjs';
32
32
  export { default as NotFound } from './NotFound/index.mjs';
33
33
  export { AuthProvider, ProtectedRoute, PublicRoute, getRootDomain, useAuth, useAuthGuard, useRouteAuth, withAuth } from './Auth/index.mjs';
package/dist/index.d.ts CHANGED
@@ -27,7 +27,7 @@ export { AlertDialog } from './AlertDialog/index.js';
27
27
  export { default as DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger, MenuLabel, ProfileMenuFooter, ProfileMenuHeader, ProfileMenuSection, ProfileMenuTrigger } from './DropdownMenu/index.js';
28
28
  export { default as Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from './Select/index.js';
29
29
  export { default as Menu, MenuContent, MenuItem, MenuOverflow } from './Menu/index.js';
30
- export { CardActivitiesResults, CardPerformance, CardProgress, CardQuestions, CardResults, CardSimulado, CardStatus, CardTest, CardTopic } from './Card/index.js';
30
+ export { CardActivitiesResults, CardPerformance, CardProgress, CardQuestions, CardResults, CardSimulado, CardSimulationHistory, CardStatus, CardTest, CardTopic } from './Card/index.js';
31
31
  export { Skeleton, SkeletonCard, SkeletonCircle, SkeletonList, SkeletonRectangle, SkeletonRounded, SkeletonTable, SkeletonText } from './Skeleton/index.js';
32
32
  export { default as NotFound } from './NotFound/index.js';
33
33
  export { AuthProvider, ProtectedRoute, PublicRoute, getRootDomain, useAuth, useAuthGuard, useRouteAuth, withAuth } from './Auth/index.js';
package/dist/index.js CHANGED
@@ -34,6 +34,7 @@ __export(src_exports, {
34
34
  CardQuestions: () => CardQuestions,
35
35
  CardResults: () => CardResults,
36
36
  CardSimulado: () => CardSimulado,
37
+ CardSimulationHistory: () => CardSimulationHistory,
37
38
  CardStatus: () => CardStatus,
38
39
  CardTest: () => CardTest,
39
40
  CardTopic: () => CardTopic,
@@ -232,6 +233,12 @@ var VARIANT_ACTION_CLASSES2 = {
232
233
  exam3: "bg-exam-3 text-typography-2 focus-visible:outline-none",
233
234
  exam4: "bg-exam-4 text-success-700 focus-visible:outline-none"
234
235
  },
236
+ examsOutlined: {
237
+ exam1: "bg-exam-1 text-info-700 border border-info-700 focus-visible:outline-none",
238
+ exam2: "bg-exam-2 text-typography-1 border border-typography-1 focus-visible:outline-none",
239
+ exam3: "bg-exam-3 text-typography-2 border border-typography-2 focus-visible:outline-none",
240
+ exam4: "bg-exam-4 text-success-700 border border-success-700 focus-visible:outline-none"
241
+ },
235
242
  resultStatus: {
236
243
  negative: "bg-error text-error-800 focus-visible:outline-none",
237
244
  positive: "bg-success text-success-800 focus-visible:outline-none"
@@ -4215,6 +4222,166 @@ var CardTest = (0, import_react11.forwardRef)(
4215
4222
  );
4216
4223
  }
4217
4224
  );
4225
+ var SIMULATION_TYPE_STYLES = {
4226
+ enem: {
4227
+ background: "bg-exam-1",
4228
+ badge: "exam1",
4229
+ text: "Enem"
4230
+ },
4231
+ prova: {
4232
+ background: "bg-exam-2",
4233
+ badge: "exam2",
4234
+ text: "Prova"
4235
+ },
4236
+ simulado: {
4237
+ background: "bg-exam-3",
4238
+ badge: "exam3",
4239
+ text: "Simulado"
4240
+ },
4241
+ vestibular: {
4242
+ background: "bg-exam-4",
4243
+ badge: "exam4",
4244
+ text: "Vestibular"
4245
+ }
4246
+ };
4247
+ var CardSimulationHistory = (0, import_react11.forwardRef)(
4248
+ ({
4249
+ title = "Simulados",
4250
+ activeTab = "history",
4251
+ data,
4252
+ onTabChange,
4253
+ onSimulationClick,
4254
+ className,
4255
+ ...props
4256
+ }, ref) => {
4257
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
4258
+ "div",
4259
+ {
4260
+ ref,
4261
+ className: `w-full max-w-[992px] h-auto ${className}`,
4262
+ ...props,
4263
+ children: [
4264
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "flex flex-row items-end justify-between gap-4 mb-4", children: [
4265
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Text_default, { size: "2xl", weight: "bold", className: "text-text-950 flex-1", children: title }),
4266
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "flex flex-row gap-2", children: [
4267
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
4268
+ "button",
4269
+ {
4270
+ type: "button",
4271
+ onClick: () => onTabChange?.("create"),
4272
+ className: `
4273
+ flex flex-row justify-center items-center px-4 py-3 gap-2 rounded-md relative
4274
+ ${activeTab === "create" ? "text-text-950" : "text-text-950 hover:bg-background-50"}
4275
+ `,
4276
+ children: [
4277
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Text_default, { size: "xs", weight: "bold", className: "leading-4 tracking-wide", children: "Criar Simulado" }),
4278
+ activeTab === "create" && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "absolute bottom-0 left-2 right-2 h-1 bg-primary-950 rounded-lg" })
4279
+ ]
4280
+ }
4281
+ ),
4282
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
4283
+ "button",
4284
+ {
4285
+ type: "button",
4286
+ onClick: () => onTabChange?.("history"),
4287
+ className: `
4288
+ flex flex-row justify-center items-center px-4 py-3 gap-2 rounded-md relative
4289
+ ${activeTab === "history" ? "text-text-950" : "text-text-950 hover:bg-background-50"}
4290
+ `,
4291
+ children: [
4292
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Text_default, { size: "xs", weight: "bold", className: "leading-4 tracking-wide", children: "Hist\xF3rico" }),
4293
+ activeTab === "history" && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "absolute bottom-0 left-2 right-2 h-1 bg-primary-950 rounded-lg" })
4294
+ ]
4295
+ }
4296
+ )
4297
+ ] })
4298
+ ] }),
4299
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "flex flex-col gap-0", children: [
4300
+ data.map((section, sectionIndex) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "flex flex-col", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
4301
+ "div",
4302
+ {
4303
+ className: `
4304
+ flex flex-row justify-center items-start px-4 py-6 gap-2 w-full bg-white
4305
+ ${sectionIndex === 0 ? "rounded-t-3xl" : ""}
4306
+ `,
4307
+ children: [
4308
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
4309
+ Text_default,
4310
+ {
4311
+ size: "xs",
4312
+ weight: "bold",
4313
+ className: "text-text-800 w-11 flex-shrink-0",
4314
+ children: section.date
4315
+ }
4316
+ ),
4317
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "flex flex-col gap-2 flex-1", children: section.simulations.map((simulation) => {
4318
+ const typeStyles = SIMULATION_TYPE_STYLES[simulation.type];
4319
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
4320
+ CardBase,
4321
+ {
4322
+ layout: "horizontal",
4323
+ padding: "medium",
4324
+ minHeight: "none",
4325
+ cursor: "pointer",
4326
+ className: `
4327
+ ${typeStyles.background} rounded-xl hover:shadow-soft-shadow-2
4328
+ transition-shadow duration-200 h-auto min-h-[61px]
4329
+ `,
4330
+ onClick: () => onSimulationClick?.(simulation),
4331
+ children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "flex justify-between items-center w-full gap-2", children: [
4332
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "flex flex-col gap-2 flex-1 min-w-0", children: [
4333
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
4334
+ Text_default,
4335
+ {
4336
+ size: "lg",
4337
+ weight: "bold",
4338
+ className: "text-text-950 truncate",
4339
+ children: simulation.title
4340
+ }
4341
+ ),
4342
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "flex items-center gap-2", children: [
4343
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
4344
+ Badge_default,
4345
+ {
4346
+ variant: "examsOutlined",
4347
+ action: typeStyles.badge,
4348
+ size: "medium",
4349
+ children: typeStyles.text
4350
+ }
4351
+ ),
4352
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
4353
+ Text_default,
4354
+ {
4355
+ size: "sm",
4356
+ className: "text-text-800 truncate",
4357
+ children: simulation.info
4358
+ }
4359
+ )
4360
+ ] })
4361
+ ] }),
4362
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
4363
+ import_phosphor_react10.CaretRight,
4364
+ {
4365
+ size: 24,
4366
+ className: "text-text-800 flex-shrink-0",
4367
+ "data-testid": "caret-icon"
4368
+ }
4369
+ )
4370
+ ] })
4371
+ },
4372
+ simulation.id
4373
+ );
4374
+ }) })
4375
+ ]
4376
+ }
4377
+ ) }, section.date)),
4378
+ data.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "w-full h-6 bg-white rounded-b-3xl" })
4379
+ ] })
4380
+ ]
4381
+ }
4382
+ );
4383
+ }
4384
+ );
4218
4385
 
4219
4386
  // src/components/Accordation/Accordation.tsx
4220
4387
  var import_phosphor_react11 = require("phosphor-react");
@@ -6170,6 +6337,7 @@ function useApiConfig(api) {
6170
6337
  CardQuestions,
6171
6338
  CardResults,
6172
6339
  CardSimulado,
6340
+ CardSimulationHistory,
6173
6341
  CardStatus,
6174
6342
  CardTest,
6175
6343
  CardTopic,