analytica-frontend-lib 1.0.80 → 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.mjs CHANGED
@@ -4167,6 +4167,166 @@ var CardTest = forwardRef9(
4167
4167
  );
4168
4168
  }
4169
4169
  );
4170
+ var SIMULATION_TYPE_STYLES = {
4171
+ enem: {
4172
+ background: "bg-exam-1",
4173
+ badge: "exam1",
4174
+ text: "Enem"
4175
+ },
4176
+ prova: {
4177
+ background: "bg-exam-2",
4178
+ badge: "exam2",
4179
+ text: "Prova"
4180
+ },
4181
+ simulado: {
4182
+ background: "bg-exam-3",
4183
+ badge: "exam3",
4184
+ text: "Simulado"
4185
+ },
4186
+ vestibular: {
4187
+ background: "bg-exam-4",
4188
+ badge: "exam4",
4189
+ text: "Vestibular"
4190
+ }
4191
+ };
4192
+ var CardSimulationHistory = forwardRef9(
4193
+ ({
4194
+ title = "Simulados",
4195
+ activeTab = "history",
4196
+ data,
4197
+ onTabChange,
4198
+ onSimulationClick,
4199
+ className,
4200
+ ...props
4201
+ }, ref) => {
4202
+ return /* @__PURE__ */ jsxs18(
4203
+ "div",
4204
+ {
4205
+ ref,
4206
+ className: `w-full max-w-[992px] h-auto ${className}`,
4207
+ ...props,
4208
+ children: [
4209
+ /* @__PURE__ */ jsxs18("div", { className: "flex flex-row items-end justify-between gap-4 mb-4", children: [
4210
+ /* @__PURE__ */ jsx23(Text_default, { size: "2xl", weight: "bold", className: "text-text-950 flex-1", children: title }),
4211
+ /* @__PURE__ */ jsxs18("div", { className: "flex flex-row gap-2", children: [
4212
+ /* @__PURE__ */ jsxs18(
4213
+ "button",
4214
+ {
4215
+ type: "button",
4216
+ onClick: () => onTabChange?.("create"),
4217
+ className: `
4218
+ flex flex-row justify-center items-center px-4 py-3 gap-2 rounded-md relative
4219
+ ${activeTab === "create" ? "text-text-950" : "text-text-950 hover:bg-background-50"}
4220
+ `,
4221
+ children: [
4222
+ /* @__PURE__ */ jsx23(Text_default, { size: "xs", weight: "bold", className: "leading-4 tracking-wide", children: "Criar Simulado" }),
4223
+ activeTab === "create" && /* @__PURE__ */ jsx23("div", { className: "absolute bottom-0 left-2 right-2 h-1 bg-primary-950 rounded-lg" })
4224
+ ]
4225
+ }
4226
+ ),
4227
+ /* @__PURE__ */ jsxs18(
4228
+ "button",
4229
+ {
4230
+ type: "button",
4231
+ onClick: () => onTabChange?.("history"),
4232
+ className: `
4233
+ flex flex-row justify-center items-center px-4 py-3 gap-2 rounded-md relative
4234
+ ${activeTab === "history" ? "text-text-950" : "text-text-950 hover:bg-background-50"}
4235
+ `,
4236
+ children: [
4237
+ /* @__PURE__ */ jsx23(Text_default, { size: "xs", weight: "bold", className: "leading-4 tracking-wide", children: "Hist\xF3rico" }),
4238
+ activeTab === "history" && /* @__PURE__ */ jsx23("div", { className: "absolute bottom-0 left-2 right-2 h-1 bg-primary-950 rounded-lg" })
4239
+ ]
4240
+ }
4241
+ )
4242
+ ] })
4243
+ ] }),
4244
+ /* @__PURE__ */ jsxs18("div", { className: "flex flex-col gap-0", children: [
4245
+ data.map((section, sectionIndex) => /* @__PURE__ */ jsx23("div", { className: "flex flex-col", children: /* @__PURE__ */ jsxs18(
4246
+ "div",
4247
+ {
4248
+ className: `
4249
+ flex flex-row justify-center items-start px-4 py-6 gap-2 w-full bg-white
4250
+ ${sectionIndex === 0 ? "rounded-t-3xl" : ""}
4251
+ `,
4252
+ children: [
4253
+ /* @__PURE__ */ jsx23(
4254
+ Text_default,
4255
+ {
4256
+ size: "xs",
4257
+ weight: "bold",
4258
+ className: "text-text-800 w-11 flex-shrink-0",
4259
+ children: section.date
4260
+ }
4261
+ ),
4262
+ /* @__PURE__ */ jsx23("div", { className: "flex flex-col gap-2 flex-1", children: section.simulations.map((simulation) => {
4263
+ const typeStyles = SIMULATION_TYPE_STYLES[simulation.type];
4264
+ return /* @__PURE__ */ jsx23(
4265
+ CardBase,
4266
+ {
4267
+ layout: "horizontal",
4268
+ padding: "medium",
4269
+ minHeight: "none",
4270
+ cursor: "pointer",
4271
+ className: `
4272
+ ${typeStyles.background} rounded-xl hover:shadow-soft-shadow-2
4273
+ transition-shadow duration-200 h-auto min-h-[61px]
4274
+ `,
4275
+ onClick: () => onSimulationClick?.(simulation),
4276
+ children: /* @__PURE__ */ jsxs18("div", { className: "flex justify-between items-center w-full gap-2", children: [
4277
+ /* @__PURE__ */ jsxs18("div", { className: "flex flex-col gap-2 flex-1 min-w-0", children: [
4278
+ /* @__PURE__ */ jsx23(
4279
+ Text_default,
4280
+ {
4281
+ size: "lg",
4282
+ weight: "bold",
4283
+ className: "text-text-950 truncate",
4284
+ children: simulation.title
4285
+ }
4286
+ ),
4287
+ /* @__PURE__ */ jsxs18("div", { className: "flex items-center gap-2", children: [
4288
+ /* @__PURE__ */ jsx23(
4289
+ Badge_default,
4290
+ {
4291
+ variant: "examsOutlined",
4292
+ action: typeStyles.badge,
4293
+ size: "medium",
4294
+ children: typeStyles.text
4295
+ }
4296
+ ),
4297
+ /* @__PURE__ */ jsx23(
4298
+ Text_default,
4299
+ {
4300
+ size: "sm",
4301
+ className: "text-text-800 truncate",
4302
+ children: simulation.info
4303
+ }
4304
+ )
4305
+ ] })
4306
+ ] }),
4307
+ /* @__PURE__ */ jsx23(
4308
+ CaretRight,
4309
+ {
4310
+ size: 24,
4311
+ className: "text-text-800 flex-shrink-0",
4312
+ "data-testid": "caret-icon"
4313
+ }
4314
+ )
4315
+ ] })
4316
+ },
4317
+ simulation.id
4318
+ );
4319
+ }) })
4320
+ ]
4321
+ }
4322
+ ) }, section.date)),
4323
+ data.length > 0 && /* @__PURE__ */ jsx23("div", { className: "w-full h-6 bg-white rounded-b-3xl" })
4324
+ ] })
4325
+ ]
4326
+ }
4327
+ );
4328
+ }
4329
+ );
4170
4330
 
4171
4331
  // src/components/Accordation/Accordation.tsx
4172
4332
  import { CaretRight as CaretRight2 } from "phosphor-react";
@@ -6155,6 +6315,7 @@ export {
6155
6315
  CardQuestions,
6156
6316
  CardResults,
6157
6317
  CardSimulado,
6318
+ CardSimulationHistory,
6158
6319
  CardStatus,
6159
6320
  CardTest,
6160
6321
  CardTopic,