atenea-components 1.4.17
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/components/atoms/ActionDropdown.d.ts +20 -0
- package/dist/components/atoms/ActionDropdown.js +56 -0
- package/dist/components/atoms/Button.d.ts +10 -0
- package/dist/components/atoms/Button.js +55 -0
- package/dist/components/atoms/Checkbox.d.ts +13 -0
- package/dist/components/atoms/Checkbox.js +60 -0
- package/dist/components/atoms/Dropdown.d.ts +18 -0
- package/dist/components/atoms/Dropdown.js +116 -0
- package/dist/components/atoms/Input.d.ts +15 -0
- package/dist/components/atoms/Input.js +118 -0
- package/dist/components/atoms/IntroIllustration.d.ts +6 -0
- package/dist/components/atoms/IntroIllustration.js +12 -0
- package/dist/components/atoms/List.d.ts +7 -0
- package/dist/components/atoms/List.js +13 -0
- package/dist/components/atoms/ListItem.d.ts +9 -0
- package/dist/components/atoms/ListItem.js +12 -0
- package/dist/components/atoms/MenuItem.d.ts +12 -0
- package/dist/components/atoms/MenuItem.js +47 -0
- package/dist/components/atoms/Radio.d.ts +13 -0
- package/dist/components/atoms/Radio.js +52 -0
- package/dist/components/atoms/SelectDropdown.d.ts +19 -0
- package/dist/components/atoms/SelectDropdown.js +146 -0
- package/dist/components/atoms/Toggle.d.ts +11 -0
- package/dist/components/atoms/Toggle.js +59 -0
- package/dist/components/icons/IconArrowDown.d.ts +2 -0
- package/dist/components/icons/IconArrowDown.js +10 -0
- package/dist/components/icons/IconArrowLeft.d.ts +2 -0
- package/dist/components/icons/IconArrowLeft.js +10 -0
- package/dist/components/icons/IconArrowRight.d.ts +2 -0
- package/dist/components/icons/IconArrowRight.js +10 -0
- package/dist/components/icons/IconArrowUp.d.ts +2 -0
- package/dist/components/icons/IconArrowUp.js +10 -0
- package/dist/components/icons/IconBase.d.ts +10 -0
- package/dist/components/icons/IconBase.js +30 -0
- package/dist/components/icons/IconBook.d.ts +2 -0
- package/dist/components/icons/IconBook.js +10 -0
- package/dist/components/icons/IconBookmark.d.ts +2 -0
- package/dist/components/icons/IconBookmark.js +10 -0
- package/dist/components/icons/IconCalendar.d.ts +2 -0
- package/dist/components/icons/IconCalendar.js +10 -0
- package/dist/components/icons/IconCancel.d.ts +2 -0
- package/dist/components/icons/IconCancel.js +10 -0
- package/dist/components/icons/IconCheck.d.ts +2 -0
- package/dist/components/icons/IconCheck.js +10 -0
- package/dist/components/icons/IconCheckCircle.d.ts +2 -0
- package/dist/components/icons/IconCheckCircle.js +10 -0
- package/dist/components/icons/IconChevronDown.d.ts +2 -0
- package/dist/components/icons/IconChevronDown.js +10 -0
- package/dist/components/icons/IconChevronLeft.d.ts +2 -0
- package/dist/components/icons/IconChevronLeft.js +10 -0
- package/dist/components/icons/IconChevronRight.d.ts +2 -0
- package/dist/components/icons/IconChevronRight.js +10 -0
- package/dist/components/icons/IconChevronUp.d.ts +2 -0
- package/dist/components/icons/IconChevronUp.js +10 -0
- package/dist/components/icons/IconClipboard.d.ts +2 -0
- package/dist/components/icons/IconClipboard.js +10 -0
- package/dist/components/icons/IconCreditCard.d.ts +2 -0
- package/dist/components/icons/IconCreditCard.js +10 -0
- package/dist/components/icons/IconExclamationOctagon.d.ts +2 -0
- package/dist/components/icons/IconExclamationOctagon.js +10 -0
- package/dist/components/icons/IconExclamationTriangle.d.ts +2 -0
- package/dist/components/icons/IconExclamationTriangle.js +10 -0
- package/dist/components/icons/IconFile.d.ts +2 -0
- package/dist/components/icons/IconFile.js +10 -0
- package/dist/components/icons/IconFileScan.d.ts +2 -0
- package/dist/components/icons/IconFileScan.js +10 -0
- package/dist/components/icons/IconHouse.d.ts +2 -0
- package/dist/components/icons/IconHouse.js +10 -0
- package/dist/components/icons/IconInformationCircle.d.ts +2 -0
- package/dist/components/icons/IconInformationCircle.js +10 -0
- package/dist/components/icons/IconKanban.d.ts +2 -0
- package/dist/components/icons/IconKanban.js +10 -0
- package/dist/components/icons/IconLayout.d.ts +2 -0
- package/dist/components/icons/IconLayout.js +10 -0
- package/dist/components/icons/IconList.d.ts +2 -0
- package/dist/components/icons/IconList.js +10 -0
- package/dist/components/icons/IconListArrow.d.ts +2 -0
- package/dist/components/icons/IconListArrow.js +10 -0
- package/dist/components/icons/IconLogout.d.ts +2 -0
- package/dist/components/icons/IconLogout.js +10 -0
- package/dist/components/icons/IconMessage.d.ts +2 -0
- package/dist/components/icons/IconMessage.js +10 -0
- package/dist/components/icons/IconMessagePlus.d.ts +2 -0
- package/dist/components/icons/IconMessagePlus.js +10 -0
- package/dist/components/icons/IconPause.d.ts +2 -0
- package/dist/components/icons/IconPause.js +10 -0
- package/dist/components/icons/IconPencil.d.ts +2 -0
- package/dist/components/icons/IconPencil.js +10 -0
- package/dist/components/icons/IconPlay.d.ts +2 -0
- package/dist/components/icons/IconPlay.js +10 -0
- package/dist/components/icons/IconSidebar.d.ts +2 -0
- package/dist/components/icons/IconSidebar.js +10 -0
- package/dist/components/icons/IconSidebarCollapse.d.ts +2 -0
- package/dist/components/icons/IconSidebarCollapse.js +10 -0
- package/dist/components/icons/IconSidebarExpand.d.ts +2 -0
- package/dist/components/icons/IconSidebarExpand.js +10 -0
- package/dist/components/icons/IconTimer.d.ts +2 -0
- package/dist/components/icons/IconTimer.js +10 -0
- package/dist/components/icons/IconTrash.d.ts +2 -0
- package/dist/components/icons/IconTrash.js +10 -0
- package/dist/components/icons/IconUser.d.ts +2 -0
- package/dist/components/icons/IconUser.js +10 -0
- package/dist/components/icons/IconVerticalDots.d.ts +2 -0
- package/dist/components/icons/IconVerticalDots.js +10 -0
- package/dist/components/molecules/AnswerOption.d.ts +15 -0
- package/dist/components/molecules/AnswerOption.js +49 -0
- package/dist/components/molecules/Avatar.d.ts +15 -0
- package/dist/components/molecules/Avatar.js +39 -0
- package/dist/components/molecules/Breadcrumb.d.ts +26 -0
- package/dist/components/molecules/Breadcrumb.js +20 -0
- package/dist/components/molecules/Card.d.ts +46 -0
- package/dist/components/molecules/Card.js +16 -0
- package/dist/components/molecules/CommentCard.d.ts +9 -0
- package/dist/components/molecules/CommentCard.js +9 -0
- package/dist/components/molecules/CountdownCard.d.ts +14 -0
- package/dist/components/molecules/CountdownCard.js +30 -0
- package/dist/components/molecules/DashboardCard.d.ts +13 -0
- package/dist/components/molecules/DashboardCard.js +9 -0
- package/dist/components/molecules/FilterBar.d.ts +19 -0
- package/dist/components/molecules/FilterBar.js +15 -0
- package/dist/components/molecules/Flashcard.d.ts +13 -0
- package/dist/components/molecules/Flashcard.js +20 -0
- package/dist/components/molecules/GlobalProgressCard.d.ts +22 -0
- package/dist/components/molecules/GlobalProgressCard.js +36 -0
- package/dist/components/molecules/MoodTracker.d.ts +13 -0
- package/dist/components/molecules/MoodTracker.js +25 -0
- package/dist/components/molecules/NewsItem.d.ts +12 -0
- package/dist/components/molecules/NewsItem.js +10 -0
- package/dist/components/molecules/PercentageItem.d.ts +10 -0
- package/dist/components/molecules/PercentageItem.js +27 -0
- package/dist/components/molecules/SleepTracker.d.ts +13 -0
- package/dist/components/molecules/SleepTracker.js +25 -0
- package/dist/components/molecules/StreakCard.d.ts +11 -0
- package/dist/components/molecules/StreakCard.js +12 -0
- package/dist/components/molecules/StudyMaterialIntro.d.ts +13 -0
- package/dist/components/molecules/StudyMaterialIntro.js +9 -0
- package/dist/components/molecules/TaskItem.d.ts +25 -0
- package/dist/components/molecules/TaskItem.js +33 -0
- package/dist/components/molecules/Timer.d.ts +13 -0
- package/dist/components/molecules/Timer.js +60 -0
- package/dist/components/molecules/WeekDaySelector.d.ts +23 -0
- package/dist/components/molecules/WeekDaySelector.js +17 -0
- package/dist/components/molecules/WeeklyObjectivesCard.d.ts +11 -0
- package/dist/components/molecules/WeeklyObjectivesCard.js +12 -0
- package/dist/components/organisms/FeatureList.d.ts +12 -0
- package/dist/components/organisms/FeatureList.js +14 -0
- package/dist/components/organisms/NewsList.d.ts +20 -0
- package/dist/components/organisms/NewsList.js +45 -0
- package/dist/components/organisms/PercentageCard.d.ts +14 -0
- package/dist/components/organisms/PercentageCard.js +26 -0
- package/dist/index.d.ts +74 -0
- package/dist/index.js +86 -0
- package/dist/tokens/borders.d.ts +8 -0
- package/dist/tokens/borders.js +12 -0
- package/dist/tokens/colors.d.ts +116 -0
- package/dist/tokens/colors.js +120 -0
- package/dist/tokens/index.d.ts +5 -0
- package/dist/tokens/index.js +21 -0
- package/dist/tokens/spacing.d.ts +3 -0
- package/dist/tokens/spacing.js +7 -0
- package/dist/tokens/theme.d.ts +247 -0
- package/dist/tokens/theme.js +17 -0
- package/dist/tokens/typography.d.ts +120 -0
- package/dist/tokens/typography.js +87 -0
- package/package.json +69 -0
- package/readme.md +88 -0
- package/theme.js +335 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export type Probability = "alta" | "media" | "baja";
|
|
3
|
+
interface CountdownCardProps {
|
|
4
|
+
/** Days remaining until exam */
|
|
5
|
+
daysRemaining: number;
|
|
6
|
+
/** Exam date string (e.g., "30/07/2026") */
|
|
7
|
+
examDate: string;
|
|
8
|
+
/** Probability level */
|
|
9
|
+
probability?: Probability;
|
|
10
|
+
/** Optional className */
|
|
11
|
+
className?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare const CountdownCard: React.FC<CountdownCardProps>;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.CountdownCard = void 0;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const clsx_1 = __importDefault(require("clsx"));
|
|
9
|
+
const probabilityConfig = {
|
|
10
|
+
alta: {
|
|
11
|
+
label: "Alta",
|
|
12
|
+
color: "text-primary-600",
|
|
13
|
+
bgColor: "bg-primary-500",
|
|
14
|
+
},
|
|
15
|
+
media: {
|
|
16
|
+
label: "Media",
|
|
17
|
+
color: "text-amber-600",
|
|
18
|
+
bgColor: "bg-amber-500",
|
|
19
|
+
},
|
|
20
|
+
baja: {
|
|
21
|
+
label: "Baja",
|
|
22
|
+
color: "text-red-600",
|
|
23
|
+
bgColor: "bg-red-500",
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
const CountdownCard = ({ daysRemaining, examDate, probability = "alta", className, }) => {
|
|
27
|
+
const config = probabilityConfig[probability];
|
|
28
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: (0, clsx_1.default)("p-5 bg-white rounded-2xl border border-gray-100", className), children: [(0, jsx_runtime_1.jsx)("p", { className: "text-sm text-textAtenea-500 mb-1", children: "Todav\u00EDa faltan..." }), (0, jsx_runtime_1.jsxs)("p", { className: "text-4xl font-bold text-textAtenea-900 mb-1", children: [daysRemaining, " d\u00EDas"] }), (0, jsx_runtime_1.jsxs)("p", { className: "text-xs text-textAtenea-500 mb-4", children: ["Fecha de tu examen: ", examDate] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-between mb-2", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-sm text-textAtenea-500", children: "Probabilidad de aprobado" }), (0, jsx_runtime_1.jsx)("span", { className: (0, clsx_1.default)("text-sm font-semibold", config.color), children: config.label })] }), (0, jsx_runtime_1.jsx)("div", { className: "w-full h-2 bg-gray-100 rounded-full overflow-hidden", children: (0, jsx_runtime_1.jsx)("div", { className: (0, clsx_1.default)("h-full rounded-full transition-all", config.bgColor), style: { width: probability === "alta" ? "100%" : probability === "media" ? "60%" : "30%" } }) })] }));
|
|
29
|
+
};
|
|
30
|
+
exports.CountdownCard = CountdownCard;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface DashboardCardProps {
|
|
3
|
+
title?: string;
|
|
4
|
+
mainText?: string;
|
|
5
|
+
countdown?: string;
|
|
6
|
+
caption?: string;
|
|
7
|
+
button?: {
|
|
8
|
+
label: string;
|
|
9
|
+
onClick: () => void;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
export declare const DashboardCard: React.FC<DashboardCardProps>;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DashboardCard = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const Button_1 = require("../atoms/Button");
|
|
6
|
+
const DashboardCard = ({ title, mainText, countdown, caption, button, }) => {
|
|
7
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: "bg-white border border-grey-200 rounded-lg p-6 flex flex-col h-full", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col gap-2 flex-grow", children: [title && (0, jsx_runtime_1.jsx)("p", { className: "text-s2 text-grey-400", children: title }), mainText && (0, jsx_runtime_1.jsx)("p", { className: "text-s1 text-grey-900", children: mainText }), countdown && ((0, jsx_runtime_1.jsx)("div", { className: "text-h1 text-violetAtenea-500", children: countdown })), caption && (0, jsx_runtime_1.jsx)("p", { className: "text-c1 text-grey-500", children: caption })] }), button && ((0, jsx_runtime_1.jsx)("div", { className: "pt-4 mt-auto", children: (0, jsx_runtime_1.jsx)(Button_1.Button, { onClick: button.onClick, variant: "secondary", size: "small", children: button.label }) }))] }));
|
|
8
|
+
};
|
|
9
|
+
exports.DashboardCard = DashboardCard;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface FilterConfig {
|
|
3
|
+
key: string;
|
|
4
|
+
label: string;
|
|
5
|
+
options: {
|
|
6
|
+
label: string;
|
|
7
|
+
value: string;
|
|
8
|
+
}[];
|
|
9
|
+
value?: string;
|
|
10
|
+
placeholder?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface FilterBarProps {
|
|
13
|
+
filters: FilterConfig[];
|
|
14
|
+
onFilterChange: (key: string, value: string | undefined) => void;
|
|
15
|
+
onClearAll?: () => void;
|
|
16
|
+
clearAllLabel?: string;
|
|
17
|
+
className?: string;
|
|
18
|
+
}
|
|
19
|
+
export declare const FilterBar: React.FC<FilterBarProps>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FilterBar = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const SelectDropdown_1 = require("../atoms/SelectDropdown");
|
|
6
|
+
const Button_1 = require("../atoms/Button");
|
|
7
|
+
const IconCancel_1 = require("../icons/IconCancel");
|
|
8
|
+
const FilterBar = ({ filters, onFilterChange, onClearAll, clearAllLabel = "Clear all filters", className = "", }) => {
|
|
9
|
+
const hasActiveFilters = filters.some((filter) => filter.value);
|
|
10
|
+
const handleClearFilter = (key) => {
|
|
11
|
+
onFilterChange(key, undefined);
|
|
12
|
+
};
|
|
13
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: `flex flex-wrap items-center gap-4 ${className}`, children: [filters.map((filter) => ((0, jsx_runtime_1.jsx)("div", { className: "flex items-center gap-2", children: (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-2", children: [(0, jsx_runtime_1.jsxs)("label", { className: "text-sm font-medium text-grey-700 whitespace-nowrap", children: [filter.label, ":"] }), (0, jsx_runtime_1.jsxs)("div", { className: "relative flex items-center", children: [(0, jsx_runtime_1.jsx)(SelectDropdown_1.SelectDropdown, { options: filter.options, value: filter.value, onChange: (value) => onFilterChange(filter.key, value), placeholder: filter.placeholder || `Select ${filter.label.toLowerCase()}`, size: "small" }), filter.value && ((0, jsx_runtime_1.jsx)("button", { onClick: () => handleClearFilter(filter.key), className: "ml-2 p-1 text-grey-400 hover:text-grey-600 transition-colors flex-shrink-0", "aria-label": `Clear ${filter.label} filter`, children: (0, jsx_runtime_1.jsx)(IconCancel_1.IconCancel, { className: "w-4 h-4" }) }))] })] }) }, filter.key))), hasActiveFilters && onClearAll && ((0, jsx_runtime_1.jsx)(Button_1.Button, { onClick: onClearAll, variant: "secondary", size: "small", children: clearAllLabel }))] }));
|
|
14
|
+
};
|
|
15
|
+
exports.FilterBar = FilterBar;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface FlashcardProps {
|
|
3
|
+
/** Content to display in the default state (usually a question) */
|
|
4
|
+
defaultContent: string;
|
|
5
|
+
/** Content to display in the flipped state (usually an answer) */
|
|
6
|
+
flippedContent: string;
|
|
7
|
+
/** Text for the flip handler button */
|
|
8
|
+
flipHandlerText?: string;
|
|
9
|
+
/** Additional classes for the container */
|
|
10
|
+
className?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare const Flashcard: React.FC<FlashcardProps>;
|
|
13
|
+
export default Flashcard;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.Flashcard = void 0;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const react_1 = require("react");
|
|
9
|
+
const clsx_1 = __importDefault(require("clsx"));
|
|
10
|
+
const baseContainer = "w-[90vw] h-[300px] sm:w-[500px] sm:h-[350px] md:w-[660px] md:h-[400px] max-w-full [perspective:1000px]";
|
|
11
|
+
const cardBase = "absolute w-full h-full rounded-lg border flex flex-col items-center justify-center p-6 text-center";
|
|
12
|
+
const Flashcard = ({ defaultContent, flippedContent, flipHandlerText = "Voltea", className, }) => {
|
|
13
|
+
const [isFlipped, setIsFlipped] = (0, react_1.useState)(false);
|
|
14
|
+
const handleFlip = () => {
|
|
15
|
+
setIsFlipped((prev) => !prev);
|
|
16
|
+
};
|
|
17
|
+
return ((0, jsx_runtime_1.jsx)("div", { className: (0, clsx_1.default)(baseContainer, className), onClick: handleFlip, children: (0, jsx_runtime_1.jsxs)("div", { className: (0, clsx_1.default)("relative w-full h-full transition-transform duration-700 [transform-style:preserve-3d]", isFlipped && "[transform:rotateY(180deg)]"), children: [(0, jsx_runtime_1.jsxs)("div", { className: (0, clsx_1.default)(cardBase, "bg-white-100 border-grey-200 hover:border-grey-300 [backface-visibility:hidden]"), children: [(0, jsx_runtime_1.jsx)("span", { className: "text-textAtenea-700 text-h5 leading-relaxed", children: defaultContent }), (0, jsx_runtime_1.jsx)("div", { className: "absolute bottom-4 left-1/2 -translate-x-1/2 text-grey-500 text-b1 hover:text-grey-700 transition-colors", children: flipHandlerText })] }), (0, jsx_runtime_1.jsxs)("div", { className: (0, clsx_1.default)(cardBase, "bg-grey-200 border-grey-300 [backface-visibility:hidden] [transform:rotateY(180deg)]"), children: [(0, jsx_runtime_1.jsx)("span", { className: "text-textAtenea-700 text-s1 leading-relaxed", children: flippedContent }), (0, jsx_runtime_1.jsx)("div", { className: "absolute bottom-4 left-1/2 -translate-x-1/2 text-grey-500 text-b1 hover:text-grey-700 transition-colors", children: flipHandlerText })] })] }) }));
|
|
18
|
+
};
|
|
19
|
+
exports.Flashcard = Flashcard;
|
|
20
|
+
exports.default = exports.Flashcard;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export type ProgressCategory = "teoria" | "supuestos" | "programacion";
|
|
3
|
+
export interface ProgressItem {
|
|
4
|
+
/** Category identifier */
|
|
5
|
+
category: ProgressCategory;
|
|
6
|
+
/** Display label */
|
|
7
|
+
label: string;
|
|
8
|
+
/** Subtitle (e.g., "20 temas estudiados") */
|
|
9
|
+
subtitle: string;
|
|
10
|
+
/** Percentage (0-100) */
|
|
11
|
+
percentage: number;
|
|
12
|
+
}
|
|
13
|
+
interface GlobalProgressCardProps {
|
|
14
|
+
/** Array of progress items */
|
|
15
|
+
items: ProgressItem[];
|
|
16
|
+
/** Card title */
|
|
17
|
+
title?: string;
|
|
18
|
+
/** Optional className */
|
|
19
|
+
className?: string;
|
|
20
|
+
}
|
|
21
|
+
export declare const GlobalProgressCard: React.FC<GlobalProgressCardProps>;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.GlobalProgressCard = void 0;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const clsx_1 = __importDefault(require("clsx"));
|
|
9
|
+
const IconBook_1 = require("../icons/IconBook");
|
|
10
|
+
const IconPencil_1 = require("../icons/IconPencil");
|
|
11
|
+
const IconFile_1 = require("../icons/IconFile");
|
|
12
|
+
const categoryConfig = {
|
|
13
|
+
teoria: {
|
|
14
|
+
icon: IconBook_1.IconBook,
|
|
15
|
+
iconBg: "bg-orange-100",
|
|
16
|
+
iconColor: "text-orange-600",
|
|
17
|
+
},
|
|
18
|
+
supuestos: {
|
|
19
|
+
icon: IconPencil_1.IconPencil,
|
|
20
|
+
iconBg: "bg-primary-100",
|
|
21
|
+
iconColor: "text-primary-600",
|
|
22
|
+
},
|
|
23
|
+
programacion: {
|
|
24
|
+
icon: IconFile_1.IconFile,
|
|
25
|
+
iconBg: "bg-violet-100",
|
|
26
|
+
iconColor: "text-violet-600",
|
|
27
|
+
},
|
|
28
|
+
};
|
|
29
|
+
const GlobalProgressCard = ({ items, title = "Progreso global", className, }) => {
|
|
30
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: (0, clsx_1.default)("p-5 bg-white rounded-2xl border border-gray-100", className), children: [(0, jsx_runtime_1.jsx)("h3", { className: "text-base font-semibold text-textAtenea-900 mb-4", children: title }), (0, jsx_runtime_1.jsx)("div", { className: "space-y-4", children: items.map((item) => {
|
|
31
|
+
const config = categoryConfig[item.category];
|
|
32
|
+
const IconComponent = config.icon;
|
|
33
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-3", children: [(0, jsx_runtime_1.jsx)("div", { className: (0, clsx_1.default)("w-10 h-10 rounded-lg flex items-center justify-center", config.iconBg), children: (0, jsx_runtime_1.jsx)(IconComponent, { size: 20, className: config.iconColor }) }), (0, jsx_runtime_1.jsxs)("div", { className: "flex-1 min-w-0", children: [(0, jsx_runtime_1.jsx)("p", { className: "text-sm font-medium text-textAtenea-900", children: item.label }), (0, jsx_runtime_1.jsx)("p", { className: "text-xs text-textAtenea-500", children: item.subtitle })] }), (0, jsx_runtime_1.jsxs)("span", { className: "text-base font-bold text-textAtenea-900", children: [item.percentage, "%"] })] }, item.category));
|
|
34
|
+
}) })] }));
|
|
35
|
+
};
|
|
36
|
+
exports.GlobalProgressCard = GlobalProgressCard;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface MoodTrackerProps {
|
|
3
|
+
/** Selected mood value (1-5, or null if none) */
|
|
4
|
+
value: number | null;
|
|
5
|
+
/** Callback when mood is selected */
|
|
6
|
+
onChange: (value: number) => void;
|
|
7
|
+
/** Optional question label */
|
|
8
|
+
label?: string;
|
|
9
|
+
/** Optional className */
|
|
10
|
+
className?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare const MoodTracker: React.FC<MoodTrackerProps>;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.MoodTracker = void 0;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const clsx_1 = __importDefault(require("clsx"));
|
|
9
|
+
// Mood options with emoji images (using public path)
|
|
10
|
+
const moodOptions = [
|
|
11
|
+
{ value: 1, image: "/images/studyplan/Emoji.png", alt: "Muy mal" },
|
|
12
|
+
{ value: 2, image: "/images/studyplan/Emoji-1.png", alt: "Mal" },
|
|
13
|
+
{ value: 3, image: "/images/studyplan/Emoji-2.png", alt: "Normal" },
|
|
14
|
+
{ value: 4, image: "/images/studyplan/Emoji-3.png", alt: "Bien" },
|
|
15
|
+
{ value: 5, image: "/images/studyplan/Emoji-4.png", alt: "Muy bien" },
|
|
16
|
+
];
|
|
17
|
+
const MoodTracker = ({ value, onChange, label = "¿Cómo te sientes?", className, }) => {
|
|
18
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: (0, clsx_1.default)("p-5 bg-white rounded-2xl border border-gray-100", className), children: [(0, jsx_runtime_1.jsx)("p", { className: "text-sm font-medium text-textAtenea-900 text-center mb-4", children: label }), (0, jsx_runtime_1.jsx)("div", { className: "flex items-center justify-between gap-2", children: moodOptions.map((option) => {
|
|
19
|
+
const isSelected = value === option.value;
|
|
20
|
+
return ((0, jsx_runtime_1.jsx)("button", { onClick: () => onChange(option.value), className: (0, clsx_1.default)("w-12 h-12 rounded-full flex items-center justify-center transition-all duration-200", "focus:outline-none focus:ring-2 focus:ring-primary-200", isSelected
|
|
21
|
+
? "ring-2 ring-primary-500 ring-offset-2"
|
|
22
|
+
: "hover:scale-110"), "aria-label": option.alt, "aria-pressed": isSelected, children: (0, jsx_runtime_1.jsx)("img", { src: option.image, alt: option.alt, className: "w-10 h-10 object-contain" }) }, option.value));
|
|
23
|
+
}) }), (0, jsx_runtime_1.jsxs)("div", { className: "flex justify-between mt-2", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-xs text-textAtenea-400", children: "Muy mal" }), (0, jsx_runtime_1.jsx)("span", { className: "text-xs text-textAtenea-400", children: "Muy bien" })] })] }));
|
|
24
|
+
};
|
|
25
|
+
exports.MoodTracker = MoodTracker;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NewsItem = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const Button_1 = require("../atoms/Button");
|
|
6
|
+
const IconArrowRight_1 = require("../icons/IconArrowRight");
|
|
7
|
+
const NewsItem = ({ tag, title, date, time, onClick, }) => {
|
|
8
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-between py-3 border-b border-gray-200 last:border-b-0", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex-1", children: [tag && ((0, jsx_runtime_1.jsx)("div", { className: "mb-2", children: (0, jsx_runtime_1.jsx)("span", { className: "inline-block px-3 py-1 text-c2 rounded-md bg-gray-100 text-gray-600", children: tag.text }) })), (0, jsx_runtime_1.jsx)("h3", { className: "text-s2 text-textAtenea-900 font-semibold mb-1", children: title }), (date || time) && ((0, jsx_runtime_1.jsx)("p", { className: "text-b3 text-textAtenea-500", children: date && time ? `${date} ${time}` : date || time }))] }), (0, jsx_runtime_1.jsx)("div", { className: "ml-4", children: (0, jsx_runtime_1.jsx)(Button_1.Button, { variant: "tertiary", size: "small", onClick: onClick, className: "w-8 h-8", children: (0, jsx_runtime_1.jsx)(IconArrowRight_1.IconArrowRight, { color: "primary-600", size: 20 }) }) })] }));
|
|
9
|
+
};
|
|
10
|
+
exports.NewsItem = NewsItem;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export type PercentageItemColor = "orange" | "pink" | "blue";
|
|
3
|
+
interface PercentageItemProps {
|
|
4
|
+
label: string;
|
|
5
|
+
percentage: number;
|
|
6
|
+
color?: PercentageItemColor;
|
|
7
|
+
className?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const PercentageItem: React.FC<PercentageItemProps>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PercentageItem = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const colorVariants = {
|
|
6
|
+
orange: {
|
|
7
|
+
background: "bg-orange-100",
|
|
8
|
+
fill: "bg-orange-500",
|
|
9
|
+
text: "text-orange-500",
|
|
10
|
+
},
|
|
11
|
+
pink: {
|
|
12
|
+
background: "bg-pink-100",
|
|
13
|
+
fill: "bg-pink-500",
|
|
14
|
+
text: "text-pink-500",
|
|
15
|
+
},
|
|
16
|
+
blue: {
|
|
17
|
+
background: "bg-blue-100",
|
|
18
|
+
fill: "bg-blue-500",
|
|
19
|
+
text: "text-blue-500",
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
const PercentageItem = ({ label, percentage, color = "orange", className = "", }) => {
|
|
23
|
+
const colors = colorVariants[color];
|
|
24
|
+
const clampedPercentage = Math.min(Math.max(percentage, 0), 100);
|
|
25
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: `flex flex-col gap-2 ${className}`, children: [(0, jsx_runtime_1.jsx)("div", { className: "text-textAtenea-900 text-s1", children: label }), (0, jsx_runtime_1.jsx)("div", { className: `w-full h-6 rounded-md ${colors.background} overflow-hidden`, children: (0, jsx_runtime_1.jsx)("div", { className: `h-full ${colors.fill} transition-all duration-300 ease-out`, style: { width: `${clampedPercentage}%` } }) }), (0, jsx_runtime_1.jsxs)("span", { className: `text-b3 ${colors.text}`, children: [clampedPercentage, "%"] })] }));
|
|
26
|
+
};
|
|
27
|
+
exports.PercentageItem = PercentageItem;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface SleepTrackerProps {
|
|
3
|
+
/** Selected sleep quality value (1-5, or null if none) */
|
|
4
|
+
value: number | null;
|
|
5
|
+
/** Callback when sleep quality is selected */
|
|
6
|
+
onChange: (value: number) => void;
|
|
7
|
+
/** Optional question label */
|
|
8
|
+
label?: string;
|
|
9
|
+
/** Optional className */
|
|
10
|
+
className?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare const SleepTracker: React.FC<SleepTrackerProps>;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.SleepTracker = void 0;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const clsx_1 = __importDefault(require("clsx"));
|
|
9
|
+
// Sleep options with pillow images (using public path)
|
|
10
|
+
const sleepOptions = [
|
|
11
|
+
{ value: 1, image: "/images/studyplan/Container.png", alt: "Nada" },
|
|
12
|
+
{ value: 2, image: "/images/studyplan/Container-1.png", alt: "Poco" },
|
|
13
|
+
{ value: 3, image: "/images/studyplan/Container-2.png", alt: "Normal" },
|
|
14
|
+
{ value: 4, image: "/images/studyplan/Container-3.png", alt: "Bien" },
|
|
15
|
+
{ value: 5, image: "/images/studyplan/Container-4.png", alt: "Mucho" },
|
|
16
|
+
];
|
|
17
|
+
const SleepTracker = ({ value, onChange, label = "¿Cómo has dormido?", className, }) => {
|
|
18
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: (0, clsx_1.default)("p-5 bg-white rounded-2xl border border-gray-100", className), children: [(0, jsx_runtime_1.jsx)("p", { className: "text-sm font-medium text-textAtenea-900 text-center mb-4", children: label }), (0, jsx_runtime_1.jsx)("div", { className: "flex items-center justify-between gap-2", children: sleepOptions.map((option) => {
|
|
19
|
+
const isSelected = value === option.value;
|
|
20
|
+
return ((0, jsx_runtime_1.jsx)("button", { onClick: () => onChange(option.value), className: (0, clsx_1.default)("w-12 h-12 rounded-xl flex items-center justify-center transition-all duration-200", "focus:outline-none focus:ring-2 focus:ring-primary-200", isSelected
|
|
21
|
+
? "ring-2 ring-primary-500 ring-offset-2 bg-primary-50"
|
|
22
|
+
: "bg-gray-50 hover:bg-gray-100"), "aria-label": option.alt, "aria-pressed": isSelected, children: (0, jsx_runtime_1.jsx)("img", { src: option.image, alt: option.alt, className: "w-8 h-8 object-contain" }) }, option.value));
|
|
23
|
+
}) }), (0, jsx_runtime_1.jsxs)("div", { className: "flex justify-between mt-2", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-xs text-textAtenea-400", children: "Nada" }), (0, jsx_runtime_1.jsx)("span", { className: "text-xs text-textAtenea-400", children: "Mucho" })] })] }));
|
|
24
|
+
};
|
|
25
|
+
exports.SleepTracker = SleepTracker;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface StreakCardProps {
|
|
3
|
+
/** Number of consecutive study days */
|
|
4
|
+
streakDays: number;
|
|
5
|
+
/** Optional label (defaults to "Tu racha") */
|
|
6
|
+
label?: string;
|
|
7
|
+
/** Optional className */
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const StreakCard: React.FC<StreakCardProps>;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.StreakCard = void 0;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const clsx_1 = __importDefault(require("clsx"));
|
|
9
|
+
const StreakCard = ({ streakDays, label = "Tu racha", className, }) => {
|
|
10
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: (0, clsx_1.default)("flex items-center gap-3 p-4 bg-white rounded-2xl border border-gray-100", className), children: [(0, jsx_runtime_1.jsx)("span", { className: "text-2xl", role: "img", "aria-label": "fuego", children: "\uD83D\uDD25" }), (0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col", children: [(0, jsx_runtime_1.jsxs)("span", { className: "text-2xl font-bold text-textAtenea-900", children: [streakDays, " d\u00EDas"] }), (0, jsx_runtime_1.jsx)("span", { className: "text-xs text-textAtenea-500", children: label })] })] }));
|
|
11
|
+
};
|
|
12
|
+
exports.StreakCard = StreakCard;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
interface StudyMaterialIntroProps {
|
|
2
|
+
title: string;
|
|
3
|
+
description: string;
|
|
4
|
+
showPrimaryButton?: boolean;
|
|
5
|
+
showSecondaryButton?: boolean;
|
|
6
|
+
primaryButtonText?: string;
|
|
7
|
+
secondaryButtonText?: string;
|
|
8
|
+
onPrimaryClick?: () => void;
|
|
9
|
+
onSecondaryClick?: () => void;
|
|
10
|
+
illustrationVariant?: "quiz" | "flashcard";
|
|
11
|
+
}
|
|
12
|
+
export default function StudyMaterialIntro({ title, description, showPrimaryButton, showSecondaryButton, primaryButtonText, secondaryButtonText, onPrimaryClick, onSecondaryClick, illustrationVariant, }: StudyMaterialIntroProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = StudyMaterialIntro;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const Button_1 = require("../atoms/Button");
|
|
6
|
+
const IntroIllustration_1 = require("../atoms/IntroIllustration");
|
|
7
|
+
function StudyMaterialIntro({ title, description, showPrimaryButton = true, showSecondaryButton = true, primaryButtonText = "Continuar", secondaryButtonText = "Cancelar", onPrimaryClick, onSecondaryClick, illustrationVariant = "quiz", }) {
|
|
8
|
+
return ((0, jsx_runtime_1.jsx)("div", { className: "flex justify-center items-center min-h-[60vh] p-8 h-full", children: (0, jsx_runtime_1.jsxs)("div", { className: "bg-gray-50 rounded-lg p-8 flex flex-col justify-center items-center max-w-4xl w-full text-center min-h-[60vh]", children: [(0, jsx_runtime_1.jsx)("div", { className: "mb-6 flex justify-center items-center h-full", children: (0, jsx_runtime_1.jsx)(IntroIllustration_1.IntroIllustration, { variant: illustrationVariant }) }), (0, jsx_runtime_1.jsx)("h2", { className: "text-h3 font-semibold text-textAtenea-900 mb-3 px-12", children: title }), (0, jsx_runtime_1.jsx)("p", { className: "text-textAtenea-700 text-b2 mb-8 px-12", children: description }), (showPrimaryButton || showSecondaryButton) && ((0, jsx_runtime_1.jsxs)("div", { className: "flex gap-4 justify-center", children: [showSecondaryButton && ((0, jsx_runtime_1.jsx)(Button_1.Button, { variant: "secondary", size: "medium", onClick: onSecondaryClick, children: secondaryButtonText })), showPrimaryButton && ((0, jsx_runtime_1.jsx)(Button_1.Button, { variant: "primary", size: "medium", onClick: onPrimaryClick, children: primaryButtonText }))] }))] }) }));
|
|
9
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export type TaskType = "estudio" | "practica" | "programacion";
|
|
3
|
+
export interface TaskInfo {
|
|
4
|
+
/** Unique task identifier */
|
|
5
|
+
id: string;
|
|
6
|
+
/** Task title */
|
|
7
|
+
title: string;
|
|
8
|
+
/** Task type for badge */
|
|
9
|
+
type: TaskType;
|
|
10
|
+
/** Estimated duration (e.g., "1h 30 min") */
|
|
11
|
+
duration: string;
|
|
12
|
+
/** Whether task is completed */
|
|
13
|
+
completed: boolean;
|
|
14
|
+
}
|
|
15
|
+
interface TaskItemProps {
|
|
16
|
+
task: TaskInfo;
|
|
17
|
+
/** Callback when task completion toggled */
|
|
18
|
+
onComplete?: (id: string) => void;
|
|
19
|
+
/** Callback when navigate to task */
|
|
20
|
+
onNavigate?: (id: string) => void;
|
|
21
|
+
/** Optional className */
|
|
22
|
+
className?: string;
|
|
23
|
+
}
|
|
24
|
+
export declare const TaskItem: React.FC<TaskItemProps>;
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.TaskItem = void 0;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const clsx_1 = __importDefault(require("clsx"));
|
|
9
|
+
const IconChevronRight_1 = require("../icons/IconChevronRight");
|
|
10
|
+
const typeConfig = {
|
|
11
|
+
estudio: {
|
|
12
|
+
label: "Estudio",
|
|
13
|
+
bgColor: "bg-primary-100",
|
|
14
|
+
textColor: "text-primary-700",
|
|
15
|
+
},
|
|
16
|
+
practica: {
|
|
17
|
+
label: "Práctica",
|
|
18
|
+
bgColor: "bg-pink-100",
|
|
19
|
+
textColor: "text-pink-700",
|
|
20
|
+
},
|
|
21
|
+
programacion: {
|
|
22
|
+
label: "Programación",
|
|
23
|
+
bgColor: "bg-violet-100",
|
|
24
|
+
textColor: "text-violet-700",
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
const TaskItem = ({ task, onComplete, onNavigate, className, }) => {
|
|
28
|
+
const config = typeConfig[task.type];
|
|
29
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: (0, clsx_1.default)("flex items-start gap-3 p-4 rounded-2xl border border-gray-100 bg-white", task.completed && "opacity-60", className), children: [(0, jsx_runtime_1.jsx)("button", { onClick: () => onComplete === null || onComplete === void 0 ? void 0 : onComplete(task.id), className: (0, clsx_1.default)("flex-shrink-0 w-6 h-6 rounded-full border-2 flex items-center justify-center transition-colors mt-0.5", task.completed
|
|
30
|
+
? "bg-primary-500 border-primary-500"
|
|
31
|
+
: "border-gray-300 hover:border-primary-400"), "aria-label": task.completed ? "Marcar como pendiente" : "Marcar como completada", children: task.completed && ((0, jsx_runtime_1.jsx)("svg", { className: "w-3.5 h-3.5 text-white", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 3, children: (0, jsx_runtime_1.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M5 13l4 4L19 7" }) })) }), (0, jsx_runtime_1.jsxs)("div", { className: "flex-1 min-w-0", children: [(0, jsx_runtime_1.jsx)("p", { className: (0, clsx_1.default)("text-sm font-medium text-textAtenea-900 leading-snug", task.completed && "line-through"), children: task.title }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-2 mt-2", children: [(0, jsx_runtime_1.jsx)("span", { className: (0, clsx_1.default)("px-2 py-0.5 rounded-md text-xs font-medium", config.bgColor, config.textColor), children: config.label }), (0, jsx_runtime_1.jsxs)("span", { className: "flex items-center gap-1 text-xs text-textAtenea-500", children: [(0, jsx_runtime_1.jsx)("svg", { className: "w-3.5 h-3.5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: (0, jsx_runtime_1.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z" }) }), task.duration] })] })] }), onNavigate && !task.completed && ((0, jsx_runtime_1.jsxs)("button", { onClick: () => onNavigate(task.id), className: "flex items-center gap-1 px-3 py-1.5 text-xs font-medium text-primary-600 bg-primary-50 rounded-lg hover:bg-primary-100 transition-colors", children: ["Ir a tarea", (0, jsx_runtime_1.jsx)(IconChevronRight_1.IconChevronRight, { size: 14 })] }))] }));
|
|
32
|
+
};
|
|
33
|
+
exports.TaskItem = TaskItem;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface TimerProps {
|
|
3
|
+
label?: string;
|
|
4
|
+
initialTime: number;
|
|
5
|
+
hasControl?: boolean;
|
|
6
|
+
autoStart?: boolean;
|
|
7
|
+
showIcon?: boolean;
|
|
8
|
+
onTimeUp?: () => void;
|
|
9
|
+
onStateChange?: (isRunning: boolean) => void;
|
|
10
|
+
className?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare const Timer: React.FC<TimerProps>;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Timer = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const Button_1 = require("../atoms/Button");
|
|
7
|
+
const IconPlay_1 = require("../icons/IconPlay");
|
|
8
|
+
const IconPause_1 = require("../icons/IconPause");
|
|
9
|
+
const IconTimer_1 = require("../icons/IconTimer");
|
|
10
|
+
const Timer = ({ label, initialTime, hasControl = false, autoStart = false, showIcon = false, onTimeUp, onStateChange, className = "", }) => {
|
|
11
|
+
const [timeLeft, setTimeLeft] = (0, react_1.useState)(initialTime);
|
|
12
|
+
const [isRunning, setIsRunning] = (0, react_1.useState)(autoStart);
|
|
13
|
+
const formatTime = (0, react_1.useCallback)((seconds) => {
|
|
14
|
+
const hours = Math.floor(seconds / 3600);
|
|
15
|
+
const minutes = Math.floor((seconds % 3600) / 60);
|
|
16
|
+
const remainingSeconds = seconds % 60;
|
|
17
|
+
if (initialTime >= 3600) {
|
|
18
|
+
return `${hours.toString().padStart(2, "0")}:${minutes
|
|
19
|
+
.toString()
|
|
20
|
+
.padStart(2, "0")}:${remainingSeconds.toString().padStart(2, "0")}`;
|
|
21
|
+
}
|
|
22
|
+
else {
|
|
23
|
+
return `${minutes.toString().padStart(2, "0")}:${remainingSeconds
|
|
24
|
+
.toString()
|
|
25
|
+
.padStart(2, "0")}`;
|
|
26
|
+
}
|
|
27
|
+
}, [initialTime]);
|
|
28
|
+
const toggleTimer = (0, react_1.useCallback)(() => {
|
|
29
|
+
setIsRunning((prev) => {
|
|
30
|
+
const newState = !prev;
|
|
31
|
+
onStateChange === null || onStateChange === void 0 ? void 0 : onStateChange(newState);
|
|
32
|
+
return newState;
|
|
33
|
+
});
|
|
34
|
+
}, [onStateChange]);
|
|
35
|
+
(0, react_1.useEffect)(() => {
|
|
36
|
+
let interval = null;
|
|
37
|
+
if (isRunning && timeLeft > 0) {
|
|
38
|
+
interval = setInterval(() => {
|
|
39
|
+
setTimeLeft((prev) => {
|
|
40
|
+
if (prev <= 1) {
|
|
41
|
+
setIsRunning(false);
|
|
42
|
+
onTimeUp === null || onTimeUp === void 0 ? void 0 : onTimeUp();
|
|
43
|
+
return 0;
|
|
44
|
+
}
|
|
45
|
+
return prev - 1;
|
|
46
|
+
});
|
|
47
|
+
}, 1000);
|
|
48
|
+
}
|
|
49
|
+
return () => {
|
|
50
|
+
if (interval) {
|
|
51
|
+
clearInterval(interval);
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
}, [isRunning, timeLeft, onTimeUp]);
|
|
55
|
+
(0, react_1.useEffect)(() => {
|
|
56
|
+
setTimeLeft(initialTime);
|
|
57
|
+
}, [initialTime]);
|
|
58
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: `flex items-center gap-3 ${className}`, children: [showIcon && (0, jsx_runtime_1.jsx)(IconTimer_1.IconTimer, { size: 20, color: "textAtenea-500" }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-3", children: [label && (0, jsx_runtime_1.jsx)("span", { className: "text-b3 text-textAtenea-500", children: label }), (0, jsx_runtime_1.jsx)("span", { className: "text-b3 text-textAtenea-900 w-16 text-right", children: formatTime(timeLeft) }), hasControl && ((0, jsx_runtime_1.jsx)(Button_1.Button, { variant: "secondary", size: "small", onClick: toggleTimer, className: "w-8 h-8", children: isRunning ? (0, jsx_runtime_1.jsx)(IconPause_1.IconPause, { size: 16 }) : (0, jsx_runtime_1.jsx)(IconPlay_1.IconPlay, { size: 16 }) }))] })] }));
|
|
59
|
+
};
|
|
60
|
+
exports.Timer = Timer;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface DayInfo {
|
|
3
|
+
/** Day abbreviation (L, M, X, J, V, S, D) */
|
|
4
|
+
label: string;
|
|
5
|
+
/** Day number (15, 16, 17...) */
|
|
6
|
+
date: number;
|
|
7
|
+
/** ISO date string for identification */
|
|
8
|
+
dateKey: string;
|
|
9
|
+
/** Whether this day has tasks/activities */
|
|
10
|
+
hasActivity?: boolean;
|
|
11
|
+
}
|
|
12
|
+
interface WeekDaySelectorProps {
|
|
13
|
+
/** Array of 7 days to display */
|
|
14
|
+
days: DayInfo[];
|
|
15
|
+
/** Currently selected day's dateKey */
|
|
16
|
+
selectedDay: string;
|
|
17
|
+
/** Callback when a day is selected */
|
|
18
|
+
onDaySelect: (dateKey: string) => void;
|
|
19
|
+
/** Optional className for container */
|
|
20
|
+
className?: string;
|
|
21
|
+
}
|
|
22
|
+
export declare const WeekDaySelector: React.FC<WeekDaySelectorProps>;
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.WeekDaySelector = void 0;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const clsx_1 = __importDefault(require("clsx"));
|
|
9
|
+
const WeekDaySelector = ({ days, selectedDay, onDaySelect, className, }) => {
|
|
10
|
+
return ((0, jsx_runtime_1.jsx)("div", { className: (0, clsx_1.default)("flex items-center justify-between gap-2 py-2", className), children: days.map((day) => {
|
|
11
|
+
const isSelected = day.dateKey === selectedDay;
|
|
12
|
+
return ((0, jsx_runtime_1.jsxs)("button", { onClick: () => onDaySelect(day.dateKey), className: (0, clsx_1.default)("flex flex-col items-center gap-1 min-w-[40px] py-2 px-1 rounded-xl transition-all duration-200", "focus:outline-none focus:ring-2 focus:ring-primary-200", isSelected
|
|
13
|
+
? "bg-primary-500"
|
|
14
|
+
: "hover:bg-gray-100"), "aria-label": `${day.label} ${day.date}`, "aria-pressed": isSelected, children: [(0, jsx_runtime_1.jsx)("span", { className: (0, clsx_1.default)("text-xs font-medium uppercase", isSelected ? "text-textAtenea-900" : "text-textAtenea-500"), children: day.label }), (0, jsx_runtime_1.jsx)("span", { className: (0, clsx_1.default)("text-base font-semibold", isSelected ? "text-textAtenea-900" : "text-textAtenea-900"), children: day.date }), day.hasActivity && !isSelected && ((0, jsx_runtime_1.jsx)("span", { className: "w-1.5 h-1.5 rounded-full bg-pink-400" })), day.hasActivity && isSelected && ((0, jsx_runtime_1.jsx)("span", { className: "w-1.5 h-1.5 rounded-full bg-textAtenea-900" })), !day.hasActivity && (0, jsx_runtime_1.jsx)("span", { className: "w-1.5 h-1.5" })] }, day.dateKey));
|
|
15
|
+
}) }));
|
|
16
|
+
};
|
|
17
|
+
exports.WeekDaySelector = WeekDaySelector;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface WeeklyObjectivesCardProps {
|
|
3
|
+
/** Current percentage (0-100) */
|
|
4
|
+
percentage: number;
|
|
5
|
+
/** Card title */
|
|
6
|
+
title?: string;
|
|
7
|
+
/** Optional className */
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const WeeklyObjectivesCard: React.FC<WeeklyObjectivesCardProps>;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.WeeklyObjectivesCard = void 0;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const clsx_1 = __importDefault(require("clsx"));
|
|
9
|
+
const WeeklyObjectivesCard = ({ percentage, title = "Objetivos semanales", className, }) => {
|
|
10
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: (0, clsx_1.default)("p-4 bg-white rounded-2xl border border-gray-100", className), children: [(0, jsx_runtime_1.jsx)("h4", { className: "text-sm font-medium text-textAtenea-900 mb-2", children: title }), (0, jsx_runtime_1.jsxs)("p", { className: "text-2xl font-bold text-primary-600 mb-2", children: [percentage, "%"] }), (0, jsx_runtime_1.jsx)("div", { className: "w-full h-2 bg-gray-100 rounded-full overflow-hidden", children: (0, jsx_runtime_1.jsx)("div", { className: "h-full bg-primary-500 rounded-full transition-all", style: { width: `${Math.min(percentage, 100)}%` } }) })] }));
|
|
11
|
+
};
|
|
12
|
+
exports.WeeklyObjectivesCard = WeeklyObjectivesCard;
|