analytica-frontend-lib 1.0.45 → 1.0.47

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.
@@ -0,0 +1,1205 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/components/Card/Card.tsx
21
+ var Card_exports = {};
22
+ __export(Card_exports, {
23
+ CardActivesResults: () => CardActivesResults,
24
+ CardForum: () => CardForum,
25
+ CardPerformance: () => CardPerformance,
26
+ CardProgress: () => CardProgress,
27
+ CardQuestions: () => CardQuestions,
28
+ CardResults: () => CardResults,
29
+ CardSettings: () => CardSettings,
30
+ CardStatus: () => CardStatus,
31
+ CardSupport: () => CardSupport,
32
+ CardTopic: () => CardTopic
33
+ });
34
+ module.exports = __toCommonJS(Card_exports);
35
+ var import_react = require("react");
36
+
37
+ // src/components/Button/Button.tsx
38
+ var import_jsx_runtime = require("react/jsx-runtime");
39
+ var VARIANT_ACTION_CLASSES = {
40
+ solid: {
41
+ primary: "bg-primary-950 text-text border border-primary-950 hover:bg-primary-800 hover:border-primary-800 focus-visible:outline-none focus-visible:bg-primary-950 focus-visible:ring-2 focus-visible:ring-offset-0 focus-visible:ring-indicator-info active:bg-primary-700 active:border-primary-700 disabled:bg-primary-500 disabled:border-primary-500 disabled:opacity-40 disabled:cursor-not-allowed",
42
+ positive: "bg-success-500 text-text border border-success-500 hover:bg-success-600 hover:border-success-600 focus-visible:outline-none focus-visible:bg-success-500 focus-visible:ring-2 focus-visible:ring-offset-0 focus-visible:ring-indicator-info active:bg-success-700 active:border-success-700 disabled:bg-success-500 disabled:border-success-500 disabled:opacity-40 disabled:cursor-not-allowed",
43
+ negative: "bg-error-500 text-text border border-error-500 hover:bg-error-600 hover:border-error-600 focus-visible:outline-none focus-visible:bg-error-500 focus-visible:ring-2 focus-visible:ring-offset-0 focus-visible:ring-indicator-info active:bg-error-700 active:border-error-700 disabled:bg-error-500 disabled:border-error-500 disabled:opacity-40 disabled:cursor-not-allowed"
44
+ },
45
+ outline: {
46
+ primary: "bg-transparent text-primary-950 border border-primary-950 hover:bg-background-50 hover:text-primary-400 hover:border-primary-400 focus-visible:border-0 focus-visible:outline-none focus-visible:text-primary-600 focus-visible:ring-2 focus-visible:ring-offset-0 focus-visible:ring-indicator-info active:text-primary-700 active:border-primary-700 disabled:opacity-40 disabled:cursor-not-allowed",
47
+ positive: "bg-transparent text-success-500 border border-success-300 hover:bg-background-50 hover:text-success-400 hover:border-success-400 focus-visible:border-0 focus-visible:outline-none focus-visible:text-success-600 focus-visible:ring-2 focus-visible:ring-offset-0 focus-visible:ring-indicator-info active:text-success-700 active:border-success-700 disabled:opacity-40 disabled:cursor-not-allowed",
48
+ negative: "bg-transparent text-error-500 border border-error-300 hover:bg-background-50 hover:text-error-400 hover:border-error-400 focus-visible:border-0 focus-visible:outline-none focus-visible:text-error-600 focus-visible:ring-2 focus-visible:ring-offset-0 focus-visible:ring-indicator-info active:text-error-700 active:border-error-700 disabled:opacity-40 disabled:cursor-not-allowed"
49
+ },
50
+ link: {
51
+ primary: "bg-transparent text-primary-950 hover:text-primary-400 focus-visible:outline-none focus-visible:text-primary-600 focus-visible:ring-2 focus-visible:ring-offset-0 focus-visible:ring-indicator-info active:text-primary-700 disabled:opacity-40 disabled:cursor-not-allowed",
52
+ positive: "bg-transparent text-success-500 hover:text-success-400 focus-visible:outline-none focus-visible:text-success-600 focus-visible:ring-2 focus-visible:ring-offset-0 focus-visible:ring-indicator-info active:text-success-700 disabled:opacity-40 disabled:cursor-not-allowed",
53
+ negative: "bg-transparent text-error-500 hover:text-error-400 focus-visible:outline-none focus-visible:text-error-600 focus-visible:ring-2 focus-visible:ring-offset-0 focus-visible:ring-indicator-info active:text-error-700 disabled:opacity-40 disabled:cursor-not-allowed"
54
+ }
55
+ };
56
+ var SIZE_CLASSES = {
57
+ "extra-small": "text-xs px-3.5 py-2",
58
+ small: "text-sm px-4 py-2.5",
59
+ medium: "text-md px-5 py-2.5",
60
+ large: "text-lg px-6 py-3",
61
+ "extra-large": "text-lg px-7 py-3.5"
62
+ };
63
+ var Button = ({
64
+ children,
65
+ iconLeft,
66
+ iconRight,
67
+ size = "medium",
68
+ variant = "solid",
69
+ action = "primary",
70
+ className = "",
71
+ disabled,
72
+ type = "button",
73
+ ...props
74
+ }) => {
75
+ const sizeClasses = SIZE_CLASSES[size];
76
+ const variantClasses = VARIANT_ACTION_CLASSES[variant][action];
77
+ const baseClasses = "inline-flex items-center justify-center rounded-full cursor-pointer font-medium";
78
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
79
+ "button",
80
+ {
81
+ className: `${baseClasses} ${variantClasses} ${sizeClasses} ${className}`,
82
+ disabled,
83
+ type,
84
+ ...props,
85
+ children: [
86
+ iconLeft && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "mr-2 flex items-center", children: iconLeft }),
87
+ children,
88
+ iconRight && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "ml-2 flex items-center", children: iconRight })
89
+ ]
90
+ }
91
+ );
92
+ };
93
+ var Button_default = Button;
94
+
95
+ // src/components/Badge/Badge.tsx
96
+ var import_phosphor_react = require("phosphor-react");
97
+ var import_jsx_runtime2 = require("react/jsx-runtime");
98
+ var VARIANT_ACTION_CLASSES2 = {
99
+ solid: {
100
+ error: "bg-error text-error-700 focus-visible:outline-none",
101
+ warning: "bg-warning text-warning-800 focus-visible:outline-none",
102
+ success: "bg-success text-success-800 focus-visible:outline-none",
103
+ info: "bg-info text-info-800 focus-visible:outline-none",
104
+ muted: "bg-background-muted text-background-800 focus-visible:outline-none"
105
+ },
106
+ outlined: {
107
+ error: "bg-error text-error-700 border border-error-300 focus-visible:outline-none",
108
+ warning: "bg-warning text-warning-800 border border-warning-300 focus-visible:outline-none",
109
+ success: "bg-success text-success-800 border border-success-300 focus-visible:outline-none",
110
+ info: "bg-info text-info-800 border border-info-300 focus-visible:outline-none",
111
+ muted: "bg-background-muted text-background-800 border border-border-300 focus-visible:outline-none"
112
+ },
113
+ exams: {
114
+ exam1: "bg-exam-1 text-info-700 focus-visible:outline-none",
115
+ exam2: "bg-exam-2 text-typography-1 focus-visible:outline-none",
116
+ exam3: "bg-exam-3 text-typography-2 focus-visible:outline-none",
117
+ exam4: "bg-exam-4 text-success-700 focus-visible:outline-none"
118
+ },
119
+ resultStatus: {
120
+ negative: "bg-error text-error-800 focus-visible:outline-none",
121
+ positive: "bg-success text-success-800 focus-visible:outline-none"
122
+ },
123
+ notification: "text-primary"
124
+ };
125
+ var SIZE_CLASSES2 = {
126
+ small: "text-2xs px-2 py-1",
127
+ medium: "text-xs px-2 py-1",
128
+ large: "text-sm px-2 py-1"
129
+ };
130
+ var SIZE_CLASSES_ICON = {
131
+ small: "size-3",
132
+ medium: "size-3.5",
133
+ large: "size-4"
134
+ };
135
+ var Badge = ({
136
+ children,
137
+ iconLeft,
138
+ iconRight,
139
+ size = "medium",
140
+ variant = "solid",
141
+ action = "error",
142
+ className = "",
143
+ notificationActive = false,
144
+ ...props
145
+ }) => {
146
+ const sizeClasses = SIZE_CLASSES2[size];
147
+ const sizeClassesIcon = SIZE_CLASSES_ICON[size];
148
+ const variantActionMap = VARIANT_ACTION_CLASSES2[variant] || {};
149
+ const variantClasses = typeof variantActionMap === "string" ? variantActionMap : variantActionMap[action] ?? variantActionMap.muted ?? "";
150
+ const baseClasses = "inline-flex items-center justify-center rounded-xs font-normal gap-1 relative";
151
+ const baseClassesIcon = "flex items-center";
152
+ if (variant === "notification") {
153
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
154
+ "div",
155
+ {
156
+ className: `${baseClasses} ${variantClasses} ${sizeClasses} ${className}`,
157
+ ...props,
158
+ children: [
159
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_phosphor_react.Bell, { size: 24, className: "text-primary-950" }),
160
+ notificationActive && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
161
+ "span",
162
+ {
163
+ "data-testid": "notification-dot",
164
+ className: "absolute top-[5px] right-[10px] block h-2 w-2 rounded-full bg-indicator-error ring-2 ring-white"
165
+ }
166
+ )
167
+ ]
168
+ }
169
+ );
170
+ }
171
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
172
+ "div",
173
+ {
174
+ className: `${baseClasses} ${variantClasses} ${sizeClasses} ${className}`,
175
+ ...props,
176
+ children: [
177
+ iconLeft && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: `${baseClassesIcon} ${sizeClassesIcon}`, children: iconLeft }),
178
+ children,
179
+ iconRight && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: `${baseClassesIcon} ${sizeClassesIcon}`, children: iconRight })
180
+ ]
181
+ }
182
+ );
183
+ };
184
+ var Badge_default = Badge;
185
+
186
+ // src/components/Text/Text.tsx
187
+ var import_jsx_runtime3 = require("react/jsx-runtime");
188
+ var Text = ({
189
+ children,
190
+ size = "md",
191
+ weight = "normal",
192
+ color = "text-text-950",
193
+ as,
194
+ className = "",
195
+ ...props
196
+ }) => {
197
+ let sizeClasses = "";
198
+ let weightClasses = "";
199
+ const sizeClassMap = {
200
+ "2xs": "text-2xs",
201
+ xs: "text-xs",
202
+ sm: "text-sm",
203
+ md: "text-md",
204
+ lg: "text-lg",
205
+ xl: "text-xl",
206
+ "2xl": "text-2xl",
207
+ "3xl": "text-3xl",
208
+ "4xl": "text-4xl",
209
+ "5xl": "text-5xl",
210
+ "6xl": "text-6xl"
211
+ };
212
+ sizeClasses = sizeClassMap[size] ?? sizeClassMap.md;
213
+ const weightClassMap = {
214
+ hairline: "font-hairline",
215
+ light: "font-light",
216
+ normal: "font-normal",
217
+ medium: "font-medium",
218
+ semibold: "font-semibold",
219
+ bold: "font-bold",
220
+ extrabold: "font-extrabold",
221
+ black: "font-black"
222
+ };
223
+ weightClasses = weightClassMap[weight] ?? weightClassMap.normal;
224
+ const baseClasses = "font-primary";
225
+ const Component = as ?? "p";
226
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
227
+ Component,
228
+ {
229
+ className: `${baseClasses} ${sizeClasses} ${weightClasses} ${color} ${className}`,
230
+ ...props,
231
+ children
232
+ }
233
+ );
234
+ };
235
+ var Text_default = Text;
236
+
237
+ // src/components/ProgressBar/ProgressBar.tsx
238
+ var import_jsx_runtime4 = require("react/jsx-runtime");
239
+ var SIZE_CLASSES3 = {
240
+ small: {
241
+ container: "h-1",
242
+ // 4px height (h-1 = 4px in Tailwind)
243
+ bar: "h-1",
244
+ // 4px height for the fill bar
245
+ spacing: "gap-2",
246
+ // 8px gap between label and progress bar
247
+ layout: "flex-col",
248
+ // vertical layout for small
249
+ borderRadius: "rounded-full"
250
+ // 9999px border radius
251
+ },
252
+ medium: {
253
+ container: "h-2",
254
+ // 8px height (h-2 = 8px in Tailwind)
255
+ bar: "h-2",
256
+ // 8px height for the fill bar
257
+ spacing: "gap-2",
258
+ // 8px gap between progress bar and label
259
+ layout: "flex-row items-center",
260
+ // horizontal layout for medium
261
+ borderRadius: "rounded-lg"
262
+ // 8px border radius
263
+ }
264
+ };
265
+ var VARIANT_CLASSES = {
266
+ blue: {
267
+ background: "bg-background-300",
268
+ // Background track color (#D5D4D4)
269
+ fill: "bg-primary-700"
270
+ // Blue for activity progress (#2271C4)
271
+ },
272
+ green: {
273
+ background: "bg-background-300",
274
+ // Background track color (#D5D4D4)
275
+ fill: "bg-success-200"
276
+ // Green for performance (#84D3A2)
277
+ }
278
+ };
279
+ var calculateProgressValues = (value, max) => {
280
+ const safeValue = isNaN(value) ? 0 : value;
281
+ const clampedValue = Math.max(0, Math.min(safeValue, max));
282
+ const percentage = max === 0 ? 0 : clampedValue / max * 100;
283
+ return { clampedValue, percentage };
284
+ };
285
+ var shouldShowHeader = (label, showPercentage, showHitCount) => {
286
+ return !!(label || showPercentage || showHitCount);
287
+ };
288
+ var getDisplayPriority = (showHitCount, showPercentage, label, clampedValue, max, percentage) => {
289
+ if (showHitCount) {
290
+ return {
291
+ type: "hitCount",
292
+ content: `${Math.round(clampedValue)} de ${max}`,
293
+ hasMetrics: true
294
+ };
295
+ }
296
+ if (showPercentage) {
297
+ return {
298
+ type: "percentage",
299
+ content: `${Math.round(percentage)}%`,
300
+ hasMetrics: true
301
+ };
302
+ }
303
+ return {
304
+ type: "label",
305
+ content: label,
306
+ hasMetrics: false
307
+ };
308
+ };
309
+ var getCompactLayoutConfig = ({
310
+ showPercentage,
311
+ showHitCount,
312
+ percentage,
313
+ clampedValue,
314
+ max,
315
+ label,
316
+ percentageClassName,
317
+ labelClassName
318
+ }) => {
319
+ const displayPriority = getDisplayPriority(
320
+ showHitCount,
321
+ showPercentage,
322
+ label,
323
+ clampedValue,
324
+ max,
325
+ percentage
326
+ );
327
+ return {
328
+ color: displayPriority.hasMetrics ? "text-primary-600" : "text-primary-700",
329
+ className: displayPriority.hasMetrics ? percentageClassName : labelClassName,
330
+ content: displayPriority.content
331
+ };
332
+ };
333
+ var getDefaultLayoutDisplayConfig = (size, label, showPercentage) => ({
334
+ showHeader: size === "small" && !!(label || showPercentage),
335
+ showPercentage: size === "medium" && showPercentage,
336
+ showLabel: size === "medium" && !!label && !showPercentage
337
+ // Only show label when percentage is not shown
338
+ });
339
+ var renderStackedHitCountDisplay = (showHitCount, showPercentage, clampedValue, max, percentage, percentageClassName) => {
340
+ if (!showHitCount && !showPercentage) return null;
341
+ const displayPriority = getDisplayPriority(
342
+ showHitCount,
343
+ showPercentage,
344
+ null,
345
+ // label is not relevant for stacked layout metrics display
346
+ clampedValue,
347
+ max,
348
+ percentage
349
+ );
350
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
351
+ "div",
352
+ {
353
+ className: `text-xs font-medium leading-[14px] text-right ${percentageClassName}`,
354
+ children: displayPriority.type === "hitCount" ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
355
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "text-success-200", children: Math.round(clampedValue) }),
356
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("span", { className: "text-text-600", children: [
357
+ " de ",
358
+ max
359
+ ] })
360
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Text_default, { size: "xs", weight: "medium", className: "text-success-200", children: [
361
+ Math.round(percentage),
362
+ "%"
363
+ ] })
364
+ }
365
+ );
366
+ };
367
+ var ProgressBarBase = ({
368
+ clampedValue,
369
+ max,
370
+ percentage,
371
+ label,
372
+ variantClasses,
373
+ containerClassName,
374
+ fillClassName
375
+ }) => /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
376
+ "div",
377
+ {
378
+ className: `${containerClassName} ${variantClasses.background} overflow-hidden relative`,
379
+ children: [
380
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
381
+ "progress",
382
+ {
383
+ value: clampedValue,
384
+ max,
385
+ "aria-label": typeof label === "string" ? `${label}: ${Math.round(percentage)}% complete` : `Progress: ${Math.round(percentage)}% of ${max}`,
386
+ className: "absolute inset-0 w-full h-full opacity-0"
387
+ }
388
+ ),
389
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
390
+ "div",
391
+ {
392
+ className: `${fillClassName} ${variantClasses.fill} transition-all duration-300 ease-out`,
393
+ style: { width: `${percentage}%` }
394
+ }
395
+ )
396
+ ]
397
+ }
398
+ );
399
+ var StackedLayout = ({
400
+ className,
401
+ label,
402
+ showPercentage,
403
+ showHitCount,
404
+ labelClassName,
405
+ percentageClassName,
406
+ clampedValue,
407
+ max,
408
+ percentage,
409
+ variantClasses,
410
+ dimensions
411
+ }) => /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
412
+ "div",
413
+ {
414
+ className: `flex flex-col items-start gap-2 ${dimensions.width} ${dimensions.height} ${className}`,
415
+ children: [
416
+ shouldShowHeader(label, showPercentage, showHitCount) && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex flex-row justify-between items-center w-full h-[19px]", children: [
417
+ label && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
418
+ Text_default,
419
+ {
420
+ as: "div",
421
+ size: "md",
422
+ weight: "medium",
423
+ className: `text-text-600 leading-[19px] ${labelClassName}`,
424
+ children: label
425
+ }
426
+ ),
427
+ renderStackedHitCountDisplay(
428
+ showHitCount,
429
+ showPercentage,
430
+ clampedValue,
431
+ max,
432
+ percentage,
433
+ percentageClassName
434
+ )
435
+ ] }),
436
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
437
+ ProgressBarBase,
438
+ {
439
+ clampedValue,
440
+ max,
441
+ percentage,
442
+ label,
443
+ variantClasses,
444
+ containerClassName: "w-full h-2 rounded-lg",
445
+ fillClassName: "h-2 rounded-lg shadow-hard-shadow-3"
446
+ }
447
+ )
448
+ ]
449
+ }
450
+ );
451
+ var CompactLayout = ({
452
+ className,
453
+ label,
454
+ showPercentage,
455
+ showHitCount,
456
+ labelClassName,
457
+ percentageClassName,
458
+ clampedValue,
459
+ max,
460
+ percentage,
461
+ variantClasses,
462
+ dimensions
463
+ }) => {
464
+ const {
465
+ color,
466
+ className: compactClassName,
467
+ content
468
+ } = getCompactLayoutConfig({
469
+ showPercentage,
470
+ showHitCount,
471
+ percentage,
472
+ clampedValue,
473
+ max,
474
+ label,
475
+ percentageClassName,
476
+ labelClassName
477
+ });
478
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
479
+ "div",
480
+ {
481
+ className: `flex flex-col items-start gap-1 ${dimensions.width} ${dimensions.height} ${className}`,
482
+ children: [
483
+ shouldShowHeader(label, showPercentage, showHitCount) && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
484
+ Text_default,
485
+ {
486
+ as: "div",
487
+ size: "sm",
488
+ weight: "medium",
489
+ color,
490
+ className: `leading-4 w-full ${compactClassName}`,
491
+ children: content
492
+ }
493
+ ),
494
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
495
+ ProgressBarBase,
496
+ {
497
+ clampedValue,
498
+ max,
499
+ percentage,
500
+ label,
501
+ variantClasses,
502
+ containerClassName: "w-full h-1 rounded-full",
503
+ fillClassName: "h-1 rounded-full"
504
+ }
505
+ )
506
+ ]
507
+ }
508
+ );
509
+ };
510
+ var DefaultLayout = ({
511
+ className,
512
+ size,
513
+ sizeClasses,
514
+ variantClasses,
515
+ label,
516
+ showPercentage,
517
+ labelClassName,
518
+ percentageClassName,
519
+ clampedValue,
520
+ max,
521
+ percentage
522
+ }) => {
523
+ const gapClass = size === "medium" ? "gap-2" : sizeClasses.spacing;
524
+ const progressBarClass = size === "medium" ? "flex-grow" : "w-full";
525
+ const displayConfig = getDefaultLayoutDisplayConfig(
526
+ size,
527
+ label,
528
+ showPercentage
529
+ );
530
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: `flex ${sizeClasses.layout} ${gapClass} ${className}`, children: [
531
+ displayConfig.showHeader && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex flex-row items-center justify-between w-full", children: [
532
+ label && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
533
+ Text_default,
534
+ {
535
+ as: "div",
536
+ size: "xs",
537
+ weight: "medium",
538
+ className: `text-text-950 leading-none tracking-normal text-center ${labelClassName}`,
539
+ children: label
540
+ }
541
+ ),
542
+ showPercentage && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
543
+ Text_default,
544
+ {
545
+ size: "xs",
546
+ weight: "medium",
547
+ className: `text-text-950 leading-none tracking-normal text-center ${percentageClassName}`,
548
+ children: [
549
+ Math.round(percentage),
550
+ "%"
551
+ ]
552
+ }
553
+ )
554
+ ] }),
555
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
556
+ ProgressBarBase,
557
+ {
558
+ clampedValue,
559
+ max,
560
+ percentage,
561
+ label,
562
+ variantClasses,
563
+ containerClassName: `${progressBarClass} ${sizeClasses.container} ${sizeClasses.borderRadius}`,
564
+ fillClassName: `${sizeClasses.bar} ${sizeClasses.borderRadius} shadow-hard-shadow-3`
565
+ }
566
+ ),
567
+ displayConfig.showPercentage && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
568
+ Text_default,
569
+ {
570
+ size: "xs",
571
+ weight: "medium",
572
+ className: `text-text-950 leading-none tracking-normal text-center flex-none ${percentageClassName}`,
573
+ children: [
574
+ Math.round(percentage),
575
+ "%"
576
+ ]
577
+ }
578
+ ),
579
+ displayConfig.showLabel && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
580
+ Text_default,
581
+ {
582
+ as: "div",
583
+ size: "xs",
584
+ weight: "medium",
585
+ className: `text-text-950 leading-none tracking-normal text-center flex-none ${labelClassName}`,
586
+ children: label
587
+ }
588
+ )
589
+ ] });
590
+ };
591
+ var ProgressBar = ({
592
+ value,
593
+ max = 100,
594
+ size = "medium",
595
+ variant = "blue",
596
+ layout = "default",
597
+ label,
598
+ showPercentage = false,
599
+ showHitCount = false,
600
+ className = "",
601
+ labelClassName = "",
602
+ percentageClassName = "",
603
+ stackedWidth,
604
+ stackedHeight,
605
+ compactWidth,
606
+ compactHeight
607
+ }) => {
608
+ const { clampedValue, percentage } = calculateProgressValues(value, max);
609
+ const sizeClasses = SIZE_CLASSES3[size];
610
+ const variantClasses = VARIANT_CLASSES[variant];
611
+ if (layout === "stacked") {
612
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
613
+ StackedLayout,
614
+ {
615
+ className,
616
+ label,
617
+ showPercentage,
618
+ showHitCount,
619
+ labelClassName,
620
+ percentageClassName,
621
+ clampedValue,
622
+ max,
623
+ percentage,
624
+ variantClasses,
625
+ dimensions: {
626
+ width: stackedWidth ?? "w-[380px]",
627
+ height: stackedHeight ?? "h-[35px]"
628
+ }
629
+ }
630
+ );
631
+ }
632
+ if (layout === "compact") {
633
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
634
+ CompactLayout,
635
+ {
636
+ className,
637
+ label,
638
+ showPercentage,
639
+ showHitCount,
640
+ labelClassName,
641
+ percentageClassName,
642
+ clampedValue,
643
+ max,
644
+ percentage,
645
+ variantClasses,
646
+ dimensions: {
647
+ width: compactWidth ?? "w-[131px]",
648
+ height: compactHeight ?? "h-[24px]"
649
+ }
650
+ }
651
+ );
652
+ }
653
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
654
+ DefaultLayout,
655
+ {
656
+ className,
657
+ size,
658
+ sizeClasses,
659
+ variantClasses,
660
+ label,
661
+ showPercentage,
662
+ labelClassName,
663
+ percentageClassName,
664
+ clampedValue,
665
+ max,
666
+ percentage
667
+ }
668
+ );
669
+ };
670
+ var ProgressBar_default = ProgressBar;
671
+
672
+ // src/components/Card/Card.tsx
673
+ var import_phosphor_react2 = require("phosphor-react");
674
+ var import_jsx_runtime5 = require("react/jsx-runtime");
675
+ var ACTION_CARD_CLASSES = {
676
+ warning: "bg-warning-background",
677
+ success: "bg-success-300",
678
+ error: "bg-error-100",
679
+ info: "bg-info-background"
680
+ };
681
+ var ACTION_ICON_CLASSES = {
682
+ warning: "bg-warning-300 text-text",
683
+ success: "bg-yellow-300 text-text-950",
684
+ error: "bg-error-500 text-text",
685
+ info: "bg-info-500 text-text"
686
+ };
687
+ var ACTION_SUBTITLE_CLASSES = {
688
+ warning: "text-warning-600",
689
+ success: "text-success-700",
690
+ error: "text-error-700",
691
+ info: "text-info-700"
692
+ };
693
+ var ACTION_HEADER_CLASSES = {
694
+ warning: "text-warning-300",
695
+ success: "text-success-300",
696
+ error: "text-error-300",
697
+ info: "text-info-300"
698
+ };
699
+ var CardActivesResults = (0, import_react.forwardRef)(
700
+ ({
701
+ icon,
702
+ title,
703
+ subTitle,
704
+ header,
705
+ extended = false,
706
+ action = "success",
707
+ description,
708
+ className,
709
+ ...props
710
+ }, ref) => {
711
+ const actionCardClasses = ACTION_CARD_CLASSES[action];
712
+ const actionIconClasses = ACTION_ICON_CLASSES[action];
713
+ const actionSubTitleClasses = ACTION_SUBTITLE_CLASSES[action];
714
+ const actionHeaderClasses = ACTION_HEADER_CLASSES[action];
715
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
716
+ "div",
717
+ {
718
+ ref,
719
+ className: `w-full flex flex-col border border-border-50 bg-background rounded-xl ${className}`,
720
+ ...props,
721
+ children: [
722
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
723
+ "div",
724
+ {
725
+ className: `
726
+ flex flex-col gap-1 items-center justify-center p-4
727
+ ${actionCardClasses}
728
+ ${extended ? "rounded-t-xl" : "rounded-xl"}`,
729
+ children: [
730
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
731
+ "span",
732
+ {
733
+ className: `size-7.5 rounded-full flex items-center justify-center ${actionIconClasses}`,
734
+ children: icon
735
+ }
736
+ ),
737
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "text-text-800 font-medium uppercase text-2xs", children: title }),
738
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: `text-lg font-bold ${actionSubTitleClasses}`, children: subTitle })
739
+ ]
740
+ }
741
+ ),
742
+ extended && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex flex-col items-center gap-2.5 pb-9.5 pt-2.5", children: [
743
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
744
+ "p",
745
+ {
746
+ className: `text-2xs font-medium uppercase ${actionHeaderClasses}`,
747
+ children: header
748
+ }
749
+ ),
750
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "text-sm text-info-800 text-center", children: description })
751
+ ] })
752
+ ]
753
+ }
754
+ );
755
+ }
756
+ );
757
+ var CardQuestions = (0, import_react.forwardRef)(
758
+ ({
759
+ header,
760
+ state = "undone",
761
+ className,
762
+ onClickButton,
763
+ valueButton,
764
+ ...props
765
+ }, ref) => {
766
+ const isDone = state === "done";
767
+ const stateLabel = isDone ? "Realizado" : "N\xE3o Realizado";
768
+ const buttonLabel = isDone ? "Ver Quest\xE3o" : "Responder";
769
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
770
+ "div",
771
+ {
772
+ ref,
773
+ className: `
774
+ w-full flex flex-row justify-between rounded-xl p-4 gap-4 bg-background border border-border-50
775
+ ${className}
776
+ `,
777
+ ...props,
778
+ children: [
779
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("section", { className: "flex flex-col gap-1", children: [
780
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "font-bold text-xs text-text-950", children: header }),
781
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex flex-row gap-6 items-center", children: [
782
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
783
+ Badge_default,
784
+ {
785
+ size: "medium",
786
+ variant: "solid",
787
+ action: isDone ? "success" : "error",
788
+ children: stateLabel
789
+ }
790
+ ),
791
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { className: "flex flex-row items-center gap-1 text-text-700 text-xs", children: [
792
+ isDone ? "Nota" : "Sem nota",
793
+ isDone && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Badge_default, { size: "medium", action: "success", children: "00" })
794
+ ] })
795
+ ] })
796
+ ] }),
797
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
798
+ Button_default,
799
+ {
800
+ size: "extra-small",
801
+ onClick: () => onClickButton?.(valueButton),
802
+ children: buttonLabel
803
+ }
804
+ ) })
805
+ ]
806
+ }
807
+ );
808
+ }
809
+ );
810
+ var CardProgress = (0, import_react.forwardRef)(
811
+ ({
812
+ header,
813
+ subhead,
814
+ initialDate,
815
+ endDate,
816
+ progress = 0,
817
+ direction = "horizontal",
818
+ icon,
819
+ color = "#B7DFFF",
820
+ className,
821
+ ...props
822
+ }, ref) => {
823
+ const isHorizontal = direction === "horizontal";
824
+ const contentComponent = {
825
+ horizontal: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
826
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex flex-row gap-6 items-center", children: [
827
+ initialDate && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { className: "flex flex-row gap-1 items-center text-2xs", children: [
828
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "text-text-800 font-semibold", children: "In\xEDcio" }),
829
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "text-text-600", children: initialDate })
830
+ ] }),
831
+ endDate && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { className: "flex flex-row gap-1 items-center text-2xs", children: [
832
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "text-text-800 font-semibold", children: "Fim" }),
833
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "text-text-600", children: endDate })
834
+ ] })
835
+ ] }),
836
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
837
+ ProgressBar_default,
838
+ {
839
+ size: "medium",
840
+ showPercentage: true,
841
+ value: progress,
842
+ "data-testid": "progress-bar"
843
+ }
844
+ )
845
+ ] }),
846
+ vertical: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "text-sm text-text-800", children: subhead })
847
+ };
848
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
849
+ "div",
850
+ {
851
+ ref,
852
+ className: `
853
+ w-full flex border border-border-50 rounded-xl
854
+ ${isHorizontal ? "flex-row h-20" : "flex-col"}
855
+ ${className}
856
+ `,
857
+ ...props,
858
+ children: [
859
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
860
+ "div",
861
+ {
862
+ className: `
863
+ flex justify-center items-center [&>svg]:size-8 text-text-950
864
+ ${isHorizontal ? "w-20 h-full rounded-l-xl" : "min-h-[50px] w-full rounded-t-xl"}
865
+ `,
866
+ style: {
867
+ backgroundColor: color
868
+ },
869
+ children: icon
870
+ }
871
+ ),
872
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
873
+ "div",
874
+ {
875
+ className: `
876
+ p-4 flex flex-col justify-between w-full h-full
877
+ ${!isHorizontal && "gap-4"}
878
+ `,
879
+ children: [
880
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "text-xs font-bold text-text-950", children: header }),
881
+ contentComponent[direction]
882
+ ]
883
+ }
884
+ )
885
+ ]
886
+ }
887
+ );
888
+ }
889
+ );
890
+ var CardTopic = (0, import_react.forwardRef)(
891
+ ({
892
+ header,
893
+ subHead,
894
+ progress,
895
+ showPercentage = false,
896
+ className = "",
897
+ ...props
898
+ }, ref) => {
899
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
900
+ "div",
901
+ {
902
+ ref,
903
+ className: `w-full py-2 px-4 flex flex-col justify-center gap-2 border border-border-50 rounded-xl min-h-20 ${className}`,
904
+ ...props,
905
+ children: [
906
+ subHead && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "text-text-600 text-2xs flex flex-row gap-1", children: subHead.map((text, index) => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_react.Fragment, { children: [
907
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { children: text }),
908
+ index < subHead.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { children: "\u2022" })
909
+ ] }, `${text} - ${index}`)) }),
910
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "text-xs text-text-950 font-bold", children: header }),
911
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ProgressBar_default, { showPercentage, value: progress })
912
+ ]
913
+ }
914
+ );
915
+ }
916
+ );
917
+ var CardPerformance = (0, import_react.forwardRef)(
918
+ ({
919
+ header,
920
+ progress,
921
+ description = "Sem dados ainda! Voc\xEA ainda n\xE3o fez um question\xE1rio neste assunto.",
922
+ className = "",
923
+ onClickButton,
924
+ valueButton,
925
+ ...props
926
+ }, ref) => {
927
+ const hasProgress = progress !== void 0;
928
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
929
+ "div",
930
+ {
931
+ ref,
932
+ className: `w-full min-h-20.5 flex flex-row justify-between p-4 gap-2 bg-background border border-border-50 ${className}`,
933
+ ...props,
934
+ children: [
935
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "w-full flex flex-col justify-between gap-2", children: [
936
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex flex-row justify-between items-center", children: [
937
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "text-md font-bold text-text-950", children: header }),
938
+ hasProgress && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
939
+ Button_default,
940
+ {
941
+ variant: "outline",
942
+ size: "extra-small",
943
+ onClick: () => onClickButton?.(valueButton),
944
+ children: "Ver Aula"
945
+ }
946
+ )
947
+ ] }),
948
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "w-full", children: hasProgress ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ProgressBar_default, { value: progress, label: `${progress}% corretas` }) : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "text-xs text-text-600", children: description }) })
949
+ ] }),
950
+ !hasProgress && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
951
+ import_phosphor_react2.CaretRight,
952
+ {
953
+ className: "size-4.5 text-text-800",
954
+ "data-testid": "caret-icon",
955
+ onClick: () => onClickButton?.(valueButton)
956
+ }
957
+ )
958
+ ]
959
+ }
960
+ );
961
+ }
962
+ );
963
+ var CardResults = (0, import_react.forwardRef)(
964
+ ({
965
+ header,
966
+ correct_answers,
967
+ incorrect_answers,
968
+ icon,
969
+ direction = "col",
970
+ color = "#B7DFFF",
971
+ className,
972
+ ...props
973
+ }, ref) => {
974
+ const isRow = direction == "row";
975
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
976
+ "div",
977
+ {
978
+ ref,
979
+ className: `
980
+ w-full flex border border-border-50 rounded-xl min-h-20 flex-row items-center pr-4
981
+ ${className}
982
+ `,
983
+ ...props,
984
+ children: [
985
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
986
+ "div",
987
+ {
988
+ className: `
989
+ flex justify-center items-center [&>svg]:size-8 text-text-950 min-w-20 max-w-20 h-full rounded-l-xl
990
+ `,
991
+ style: {
992
+ backgroundColor: color
993
+ },
994
+ children: icon
995
+ }
996
+ ),
997
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
998
+ "div",
999
+ {
1000
+ className: `
1001
+ p-4 flex justify-between w-full h-full
1002
+ ${isRow ? "flex-row items-center" : "flex-col"}
1003
+ `,
1004
+ children: [
1005
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "text-xs font-bold text-text-950", children: header }),
1006
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { className: "flex flex-row gap-1 items-center", children: [
1007
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
1008
+ Badge_default,
1009
+ {
1010
+ action: "success",
1011
+ variant: "solid",
1012
+ size: "medium",
1013
+ iconLeft: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_phosphor_react2.CheckCircle, {}),
1014
+ children: [
1015
+ correct_answers,
1016
+ " Corretas"
1017
+ ]
1018
+ }
1019
+ ),
1020
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
1021
+ Badge_default,
1022
+ {
1023
+ action: "error",
1024
+ variant: "solid",
1025
+ size: "medium",
1026
+ iconLeft: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_phosphor_react2.XCircle, {}),
1027
+ children: [
1028
+ incorrect_answers,
1029
+ " Incorretas"
1030
+ ]
1031
+ }
1032
+ )
1033
+ ] })
1034
+ ]
1035
+ }
1036
+ ),
1037
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_phosphor_react2.CaretRight, { className: "min-w-6 min-h-6 text-text-800" })
1038
+ ]
1039
+ }
1040
+ );
1041
+ }
1042
+ );
1043
+ var CardStatus = (0, import_react.forwardRef)(
1044
+ ({ header, className, status, ...props }, ref) => {
1045
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
1046
+ "div",
1047
+ {
1048
+ ref,
1049
+ className: `
1050
+ w-full flex border border-border-50 rounded-xl min-h-20 flex-row items-center pr-4
1051
+ ${className}
1052
+ `,
1053
+ ...props,
1054
+ children: [
1055
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
1056
+ "div",
1057
+ {
1058
+ className: `
1059
+ p-4 flex justify-between w-full h-full flex-row items-center
1060
+ `,
1061
+ children: [
1062
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "text-xs font-bold text-text-950", children: header }),
1063
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { className: "flex flex-row gap-1 items-center", children: [
1064
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1065
+ Badge_default,
1066
+ {
1067
+ action: status == "correct" ? "success" : "error",
1068
+ variant: "solid",
1069
+ size: "medium",
1070
+ iconLeft: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_phosphor_react2.CheckCircle, {}),
1071
+ children: status == "correct" ? "Correta" : "Incorreta"
1072
+ }
1073
+ ),
1074
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "text-sm text-text-800", children: "Respondida" })
1075
+ ] })
1076
+ ]
1077
+ }
1078
+ ),
1079
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_phosphor_react2.CaretRight, { className: "min-w-6 min-h-6 text-text-800" })
1080
+ ]
1081
+ }
1082
+ );
1083
+ }
1084
+ );
1085
+ var CardSettings = (0, import_react.forwardRef)(
1086
+ ({ header, className, icon, ...props }, ref) => {
1087
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
1088
+ "div",
1089
+ {
1090
+ ref,
1091
+ className: `w-full p-2 flex flex-row items-center gap-2 text-text-700 bg-background rounded-xl ${className}`,
1092
+ ...props,
1093
+ children: [
1094
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "[&>svg]:size-6", children: icon }),
1095
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "w-full text-md", children: header }),
1096
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_phosphor_react2.CaretRight, { size: 24 })
1097
+ ]
1098
+ }
1099
+ );
1100
+ }
1101
+ );
1102
+ var CardSupport = (0, import_react.forwardRef)(
1103
+ ({ header, className, direction = "col", children, ...props }, ref) => {
1104
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
1105
+ "div",
1106
+ {
1107
+ ref,
1108
+ className: `w-full p-4 flex flex-row items-center gap-2 text-text-700 bg-background rounded-xl ${className}`,
1109
+ ...props,
1110
+ children: [
1111
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
1112
+ "div",
1113
+ {
1114
+ className: `
1115
+ w-full flex ${direction == "col" ? "flex-col" : "flex-row items-center"} gap-2
1116
+ `,
1117
+ children: [
1118
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "w-full", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "text-xs text-text-950 font-bold", children: header }) }),
1119
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "flex flex-row gap-1", children })
1120
+ ]
1121
+ }
1122
+ ),
1123
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_phosphor_react2.CaretRight, { className: "text-text-800", size: 24 })
1124
+ ]
1125
+ }
1126
+ );
1127
+ }
1128
+ );
1129
+ var CardForum = (0, import_react.forwardRef)(
1130
+ ({
1131
+ title,
1132
+ content,
1133
+ comments,
1134
+ onClickComments,
1135
+ valueComments,
1136
+ onClickProfile,
1137
+ valueProfile,
1138
+ className = "",
1139
+ date,
1140
+ hour,
1141
+ ...props
1142
+ }, ref) => {
1143
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
1144
+ "div",
1145
+ {
1146
+ ref,
1147
+ className: `w-auto h-auto p-4 rounded-lg flex flex-row gap-3 border border-border-100 bg-background ${className}`,
1148
+ ...props,
1149
+ children: [
1150
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1151
+ "button",
1152
+ {
1153
+ type: "button",
1154
+ "aria-label": "Ver perfil",
1155
+ onClick: () => onClickProfile?.(valueProfile),
1156
+ className: "min-w-8 h-8 rounded-full bg-background-950"
1157
+ }
1158
+ ),
1159
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex flex-col gap-2 flex-1", children: [
1160
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex flex-row gap-1 items-center flex-wrap", children: [
1161
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "text-xs font-semibold text-primary-700 truncate", children: title }),
1162
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("p", { className: "text-xs text-text-600", children: [
1163
+ "\u2022 ",
1164
+ date,
1165
+ " \u2022 ",
1166
+ hour
1167
+ ] })
1168
+ ] }),
1169
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "text-text-950 text-sm line-clamp-2", children: content }),
1170
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
1171
+ "button",
1172
+ {
1173
+ type: "button",
1174
+ "aria-label": "Ver coment\xE1rios",
1175
+ onClick: () => onClickComments?.(valueComments),
1176
+ className: "text-text-600 flex flex-row gap-2 items-center",
1177
+ children: [
1178
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_phosphor_react2.ChatCircleText, { "aria-hidden": "true", size: 16 }),
1179
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("p", { className: "text-xs", children: [
1180
+ comments,
1181
+ " respostas"
1182
+ ] })
1183
+ ]
1184
+ }
1185
+ )
1186
+ ] })
1187
+ ]
1188
+ }
1189
+ );
1190
+ }
1191
+ );
1192
+ // Annotate the CommonJS export names for ESM import in node:
1193
+ 0 && (module.exports = {
1194
+ CardActivesResults,
1195
+ CardForum,
1196
+ CardPerformance,
1197
+ CardProgress,
1198
+ CardQuestions,
1199
+ CardResults,
1200
+ CardSettings,
1201
+ CardStatus,
1202
+ CardSupport,
1203
+ CardTopic
1204
+ });
1205
+ //# sourceMappingURL=index.js.map