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.
Files changed (167) hide show
  1. package/dist/components/atoms/ActionDropdown.d.ts +20 -0
  2. package/dist/components/atoms/ActionDropdown.js +56 -0
  3. package/dist/components/atoms/Button.d.ts +10 -0
  4. package/dist/components/atoms/Button.js +55 -0
  5. package/dist/components/atoms/Checkbox.d.ts +13 -0
  6. package/dist/components/atoms/Checkbox.js +60 -0
  7. package/dist/components/atoms/Dropdown.d.ts +18 -0
  8. package/dist/components/atoms/Dropdown.js +116 -0
  9. package/dist/components/atoms/Input.d.ts +15 -0
  10. package/dist/components/atoms/Input.js +118 -0
  11. package/dist/components/atoms/IntroIllustration.d.ts +6 -0
  12. package/dist/components/atoms/IntroIllustration.js +12 -0
  13. package/dist/components/atoms/List.d.ts +7 -0
  14. package/dist/components/atoms/List.js +13 -0
  15. package/dist/components/atoms/ListItem.d.ts +9 -0
  16. package/dist/components/atoms/ListItem.js +12 -0
  17. package/dist/components/atoms/MenuItem.d.ts +12 -0
  18. package/dist/components/atoms/MenuItem.js +47 -0
  19. package/dist/components/atoms/Radio.d.ts +13 -0
  20. package/dist/components/atoms/Radio.js +52 -0
  21. package/dist/components/atoms/SelectDropdown.d.ts +19 -0
  22. package/dist/components/atoms/SelectDropdown.js +146 -0
  23. package/dist/components/atoms/Toggle.d.ts +11 -0
  24. package/dist/components/atoms/Toggle.js +59 -0
  25. package/dist/components/icons/IconArrowDown.d.ts +2 -0
  26. package/dist/components/icons/IconArrowDown.js +10 -0
  27. package/dist/components/icons/IconArrowLeft.d.ts +2 -0
  28. package/dist/components/icons/IconArrowLeft.js +10 -0
  29. package/dist/components/icons/IconArrowRight.d.ts +2 -0
  30. package/dist/components/icons/IconArrowRight.js +10 -0
  31. package/dist/components/icons/IconArrowUp.d.ts +2 -0
  32. package/dist/components/icons/IconArrowUp.js +10 -0
  33. package/dist/components/icons/IconBase.d.ts +10 -0
  34. package/dist/components/icons/IconBase.js +30 -0
  35. package/dist/components/icons/IconBook.d.ts +2 -0
  36. package/dist/components/icons/IconBook.js +10 -0
  37. package/dist/components/icons/IconBookmark.d.ts +2 -0
  38. package/dist/components/icons/IconBookmark.js +10 -0
  39. package/dist/components/icons/IconCalendar.d.ts +2 -0
  40. package/dist/components/icons/IconCalendar.js +10 -0
  41. package/dist/components/icons/IconCancel.d.ts +2 -0
  42. package/dist/components/icons/IconCancel.js +10 -0
  43. package/dist/components/icons/IconCheck.d.ts +2 -0
  44. package/dist/components/icons/IconCheck.js +10 -0
  45. package/dist/components/icons/IconCheckCircle.d.ts +2 -0
  46. package/dist/components/icons/IconCheckCircle.js +10 -0
  47. package/dist/components/icons/IconChevronDown.d.ts +2 -0
  48. package/dist/components/icons/IconChevronDown.js +10 -0
  49. package/dist/components/icons/IconChevronLeft.d.ts +2 -0
  50. package/dist/components/icons/IconChevronLeft.js +10 -0
  51. package/dist/components/icons/IconChevronRight.d.ts +2 -0
  52. package/dist/components/icons/IconChevronRight.js +10 -0
  53. package/dist/components/icons/IconChevronUp.d.ts +2 -0
  54. package/dist/components/icons/IconChevronUp.js +10 -0
  55. package/dist/components/icons/IconClipboard.d.ts +2 -0
  56. package/dist/components/icons/IconClipboard.js +10 -0
  57. package/dist/components/icons/IconCreditCard.d.ts +2 -0
  58. package/dist/components/icons/IconCreditCard.js +10 -0
  59. package/dist/components/icons/IconExclamationOctagon.d.ts +2 -0
  60. package/dist/components/icons/IconExclamationOctagon.js +10 -0
  61. package/dist/components/icons/IconExclamationTriangle.d.ts +2 -0
  62. package/dist/components/icons/IconExclamationTriangle.js +10 -0
  63. package/dist/components/icons/IconFile.d.ts +2 -0
  64. package/dist/components/icons/IconFile.js +10 -0
  65. package/dist/components/icons/IconFileScan.d.ts +2 -0
  66. package/dist/components/icons/IconFileScan.js +10 -0
  67. package/dist/components/icons/IconHouse.d.ts +2 -0
  68. package/dist/components/icons/IconHouse.js +10 -0
  69. package/dist/components/icons/IconInformationCircle.d.ts +2 -0
  70. package/dist/components/icons/IconInformationCircle.js +10 -0
  71. package/dist/components/icons/IconKanban.d.ts +2 -0
  72. package/dist/components/icons/IconKanban.js +10 -0
  73. package/dist/components/icons/IconLayout.d.ts +2 -0
  74. package/dist/components/icons/IconLayout.js +10 -0
  75. package/dist/components/icons/IconList.d.ts +2 -0
  76. package/dist/components/icons/IconList.js +10 -0
  77. package/dist/components/icons/IconListArrow.d.ts +2 -0
  78. package/dist/components/icons/IconListArrow.js +10 -0
  79. package/dist/components/icons/IconLogout.d.ts +2 -0
  80. package/dist/components/icons/IconLogout.js +10 -0
  81. package/dist/components/icons/IconMessage.d.ts +2 -0
  82. package/dist/components/icons/IconMessage.js +10 -0
  83. package/dist/components/icons/IconMessagePlus.d.ts +2 -0
  84. package/dist/components/icons/IconMessagePlus.js +10 -0
  85. package/dist/components/icons/IconPause.d.ts +2 -0
  86. package/dist/components/icons/IconPause.js +10 -0
  87. package/dist/components/icons/IconPencil.d.ts +2 -0
  88. package/dist/components/icons/IconPencil.js +10 -0
  89. package/dist/components/icons/IconPlay.d.ts +2 -0
  90. package/dist/components/icons/IconPlay.js +10 -0
  91. package/dist/components/icons/IconSidebar.d.ts +2 -0
  92. package/dist/components/icons/IconSidebar.js +10 -0
  93. package/dist/components/icons/IconSidebarCollapse.d.ts +2 -0
  94. package/dist/components/icons/IconSidebarCollapse.js +10 -0
  95. package/dist/components/icons/IconSidebarExpand.d.ts +2 -0
  96. package/dist/components/icons/IconSidebarExpand.js +10 -0
  97. package/dist/components/icons/IconTimer.d.ts +2 -0
  98. package/dist/components/icons/IconTimer.js +10 -0
  99. package/dist/components/icons/IconTrash.d.ts +2 -0
  100. package/dist/components/icons/IconTrash.js +10 -0
  101. package/dist/components/icons/IconUser.d.ts +2 -0
  102. package/dist/components/icons/IconUser.js +10 -0
  103. package/dist/components/icons/IconVerticalDots.d.ts +2 -0
  104. package/dist/components/icons/IconVerticalDots.js +10 -0
  105. package/dist/components/molecules/AnswerOption.d.ts +15 -0
  106. package/dist/components/molecules/AnswerOption.js +49 -0
  107. package/dist/components/molecules/Avatar.d.ts +15 -0
  108. package/dist/components/molecules/Avatar.js +39 -0
  109. package/dist/components/molecules/Breadcrumb.d.ts +26 -0
  110. package/dist/components/molecules/Breadcrumb.js +20 -0
  111. package/dist/components/molecules/Card.d.ts +46 -0
  112. package/dist/components/molecules/Card.js +16 -0
  113. package/dist/components/molecules/CommentCard.d.ts +9 -0
  114. package/dist/components/molecules/CommentCard.js +9 -0
  115. package/dist/components/molecules/CountdownCard.d.ts +14 -0
  116. package/dist/components/molecules/CountdownCard.js +30 -0
  117. package/dist/components/molecules/DashboardCard.d.ts +13 -0
  118. package/dist/components/molecules/DashboardCard.js +9 -0
  119. package/dist/components/molecules/FilterBar.d.ts +19 -0
  120. package/dist/components/molecules/FilterBar.js +15 -0
  121. package/dist/components/molecules/Flashcard.d.ts +13 -0
  122. package/dist/components/molecules/Flashcard.js +20 -0
  123. package/dist/components/molecules/GlobalProgressCard.d.ts +22 -0
  124. package/dist/components/molecules/GlobalProgressCard.js +36 -0
  125. package/dist/components/molecules/MoodTracker.d.ts +13 -0
  126. package/dist/components/molecules/MoodTracker.js +25 -0
  127. package/dist/components/molecules/NewsItem.d.ts +12 -0
  128. package/dist/components/molecules/NewsItem.js +10 -0
  129. package/dist/components/molecules/PercentageItem.d.ts +10 -0
  130. package/dist/components/molecules/PercentageItem.js +27 -0
  131. package/dist/components/molecules/SleepTracker.d.ts +13 -0
  132. package/dist/components/molecules/SleepTracker.js +25 -0
  133. package/dist/components/molecules/StreakCard.d.ts +11 -0
  134. package/dist/components/molecules/StreakCard.js +12 -0
  135. package/dist/components/molecules/StudyMaterialIntro.d.ts +13 -0
  136. package/dist/components/molecules/StudyMaterialIntro.js +9 -0
  137. package/dist/components/molecules/TaskItem.d.ts +25 -0
  138. package/dist/components/molecules/TaskItem.js +33 -0
  139. package/dist/components/molecules/Timer.d.ts +13 -0
  140. package/dist/components/molecules/Timer.js +60 -0
  141. package/dist/components/molecules/WeekDaySelector.d.ts +23 -0
  142. package/dist/components/molecules/WeekDaySelector.js +17 -0
  143. package/dist/components/molecules/WeeklyObjectivesCard.d.ts +11 -0
  144. package/dist/components/molecules/WeeklyObjectivesCard.js +12 -0
  145. package/dist/components/organisms/FeatureList.d.ts +12 -0
  146. package/dist/components/organisms/FeatureList.js +14 -0
  147. package/dist/components/organisms/NewsList.d.ts +20 -0
  148. package/dist/components/organisms/NewsList.js +45 -0
  149. package/dist/components/organisms/PercentageCard.d.ts +14 -0
  150. package/dist/components/organisms/PercentageCard.js +26 -0
  151. package/dist/index.d.ts +74 -0
  152. package/dist/index.js +86 -0
  153. package/dist/tokens/borders.d.ts +8 -0
  154. package/dist/tokens/borders.js +12 -0
  155. package/dist/tokens/colors.d.ts +116 -0
  156. package/dist/tokens/colors.js +120 -0
  157. package/dist/tokens/index.d.ts +5 -0
  158. package/dist/tokens/index.js +21 -0
  159. package/dist/tokens/spacing.d.ts +3 -0
  160. package/dist/tokens/spacing.js +7 -0
  161. package/dist/tokens/theme.d.ts +247 -0
  162. package/dist/tokens/theme.js +17 -0
  163. package/dist/tokens/typography.d.ts +120 -0
  164. package/dist/tokens/typography.js +87 -0
  165. package/package.json +69 -0
  166. package/readme.md +88 -0
  167. package/theme.js +335 -0
@@ -0,0 +1,20 @@
1
+ import React from "react";
2
+ export interface DropdownMenuItem {
3
+ id: string;
4
+ label: string;
5
+ icon?: React.ReactNode;
6
+ onClick: () => void;
7
+ disabled?: boolean;
8
+ className?: string;
9
+ }
10
+ interface ActionDropdownProps {
11
+ trigger: React.ReactNode;
12
+ items: DropdownMenuItem[];
13
+ align?: "start" | "center" | "end";
14
+ side?: "top" | "bottom";
15
+ className?: string;
16
+ menuClassName?: string;
17
+ itemClassName?: string;
18
+ }
19
+ export declare const ActionDropdown: React.FC<ActionDropdownProps>;
20
+ export {};
@@ -0,0 +1,56 @@
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.ActionDropdown = 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 ActionDropdown = ({ trigger, items, align = "end", side = "bottom", className = "", menuClassName = "", itemClassName = "", }) => {
11
+ const [isOpen, setIsOpen] = (0, react_1.useState)(false);
12
+ const dropdownRef = (0, react_1.useRef)(null);
13
+ (0, react_1.useEffect)(() => {
14
+ const handleClickOutside = (event) => {
15
+ if (dropdownRef.current &&
16
+ !dropdownRef.current.contains(event.target)) {
17
+ setIsOpen(false);
18
+ }
19
+ };
20
+ document.addEventListener("mousedown", handleClickOutside);
21
+ return () => document.removeEventListener("mousedown", handleClickOutside);
22
+ }, []);
23
+ const handleTriggerClick = () => {
24
+ setIsOpen(!isOpen);
25
+ };
26
+ const handleItemClick = (item) => {
27
+ if (!item.disabled) {
28
+ item.onClick();
29
+ setIsOpen(false);
30
+ }
31
+ };
32
+ const getAlignmentClasses = () => {
33
+ switch (align) {
34
+ case "start":
35
+ return "left-0";
36
+ case "center":
37
+ return "left-1/2 transform -translate-x-1/2";
38
+ case "end":
39
+ return "right-0";
40
+ default:
41
+ return "right-0";
42
+ }
43
+ };
44
+ const getSideClasses = () => {
45
+ switch (side) {
46
+ case "top":
47
+ return "bottom-full mb-2";
48
+ case "bottom":
49
+ return "top-full mt-2";
50
+ default:
51
+ return "top-full mt-2";
52
+ }
53
+ };
54
+ return ((0, jsx_runtime_1.jsxs)("div", { ref: dropdownRef, className: (0, clsx_1.default)("relative inline-block", className), children: [(0, jsx_runtime_1.jsx)("div", { onClick: handleTriggerClick, className: "cursor-pointer", children: trigger }), isOpen && ((0, jsx_runtime_1.jsx)("div", { className: (0, clsx_1.default)("absolute z-50 min-w-[200px] bg-white-100 border border-gray-200 rounded-lg shadow-lg py-1", getAlignmentClasses(), getSideClasses(), menuClassName), children: items.map((item) => ((0, jsx_runtime_1.jsxs)("button", { onClick: () => handleItemClick(item), disabled: item.disabled, className: (0, clsx_1.default)("w-full px-4 py-2 text-left text-sm hover:bg-gray-50 transition-colors flex items-center gap-2", item.disabled && "opacity-50 cursor-not-allowed text-gray-300", item.className, itemClassName), children: [item.icon && ((0, jsx_runtime_1.jsx)("span", { className: "flex-shrink-0 text-gray-400", children: item.icon })), (0, jsx_runtime_1.jsx)("span", { children: item.label })] }, item.id))) }))] }));
55
+ };
56
+ exports.ActionDropdown = ActionDropdown;
@@ -0,0 +1,10 @@
1
+ import React from "react";
2
+ type ButtonProps = React.ButtonHTMLAttributes<HTMLButtonElement> & {
3
+ variant?: "primary" | "secondary" | "tertiary";
4
+ size?: "giant" | "large" | "medium" | "small" | "tiny";
5
+ isLoading?: boolean;
6
+ iconRight?: React.ReactNode;
7
+ iconLeft?: React.ReactNode;
8
+ };
9
+ export declare const Button: React.FC<ButtonProps>;
10
+ export {};
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+ var __rest = (this && this.__rest) || function (s, e) {
3
+ var t = {};
4
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
+ t[p] = s[p];
6
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
+ t[p[i]] = s[p[i]];
10
+ }
11
+ return t;
12
+ };
13
+ var __importDefault = (this && this.__importDefault) || function (mod) {
14
+ return (mod && mod.__esModule) ? mod : { "default": mod };
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.Button = void 0;
18
+ const jsx_runtime_1 = require("react/jsx-runtime");
19
+ const clsx_1 = __importDefault(require("clsx"));
20
+ const baseClasses = 'inline-flex items-center justify-center font-medium transition-colors gap-2';
21
+ const sizeClasses = {
22
+ giant: 'h-14 px-6 text-buttonGiant rounded-lg',
23
+ large: 'h-12 px-5 text-buttonLarge rounded-lg',
24
+ medium: 'h-10 px-4 text-buttonMedium rounded-lg',
25
+ small: 'h-8 px-3 text-buttonSmall rounded-md',
26
+ tiny: 'h-6 px-2 text-buttonTiny rounded-md',
27
+ };
28
+ const variantClasses = {
29
+ primary: `
30
+ bg-primary-500 text-textAtenea-900
31
+ hover:bg-primary-600 hover:text-textAtenea-900
32
+ focus:ring-2 focus:ring-primary-200 focus:bg-primary-500 focus:text-textAtenea-900
33
+ active:bg-primary-600 active:text-textAtenea-900 active:ring-0
34
+ disabled:bg-grey-200 disabled:text-textAtenea-300 disabled:cursor-not-allowed
35
+ `,
36
+ secondary: `
37
+ bg-white text-primary-700 border border-primary-500
38
+ hover:bg-primary-100
39
+ focus:ring-2 focus:ring-primary-100 focus:bg-white-100
40
+ active:bg-green-200 active:ring-0
41
+ disabled:bg-gray-100 disabled:text-gray-400 disabled:border-gray-200 disabled:cursor-not-allowed
42
+ `,
43
+ tertiary: `
44
+ bg-white-100 text-primary-700
45
+ hover:bg-primary-100
46
+ focus:ring-2 focus:ring-primary-100 focus:bg-white-100
47
+ active:bg-primary-200 active:ring-0
48
+ disabled:text-gray-400 disabled:cursor-not-allowed
49
+ `,
50
+ };
51
+ const Button = (_a) => {
52
+ var { variant = "primary", size = "medium", isLoading = false, iconRight, iconLeft, children, disabled, className } = _a, props = __rest(_a, ["variant", "size", "isLoading", "iconRight", "iconLeft", "children", "disabled", "className"]);
53
+ return ((0, jsx_runtime_1.jsxs)("button", Object.assign({ disabled: disabled || isLoading, className: (0, clsx_1.default)(baseClasses, sizeClasses[size], variantClasses[variant], className) }, props, { children: [isLoading && ((0, jsx_runtime_1.jsx)("span", { className: "animate-spin border-2 border-white border-t-transparent rounded-full w-4 h-4" })), !isLoading && iconLeft && iconLeft, (0, jsx_runtime_1.jsx)("span", { children: children }), !isLoading && iconRight && iconRight] })));
54
+ };
55
+ exports.Button = Button;
@@ -0,0 +1,13 @@
1
+ import React from "react";
2
+ type CheckboxSize = "small" | "medium";
3
+ type CheckboxProps = {
4
+ checked?: boolean;
5
+ onChange?: (checked: boolean) => void;
6
+ disabled?: boolean;
7
+ size?: CheckboxSize;
8
+ label?: string;
9
+ className?: string;
10
+ id?: string;
11
+ };
12
+ export declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLInputElement>>;
13
+ export {};
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ var __rest = (this && this.__rest) || function (s, e) {
3
+ var t = {};
4
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
+ t[p] = s[p];
6
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
+ t[p[i]] = s[p[i]];
10
+ }
11
+ return t;
12
+ };
13
+ var __importDefault = (this && this.__importDefault) || function (mod) {
14
+ return (mod && mod.__esModule) ? mod : { "default": mod };
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.Checkbox = void 0;
18
+ const jsx_runtime_1 = require("react/jsx-runtime");
19
+ const react_1 = require("react");
20
+ const clsx_1 = __importDefault(require("clsx"));
21
+ const lu_1 = require("react-icons/lu");
22
+ exports.Checkbox = (0, react_1.forwardRef)((_a, ref) => {
23
+ var { checked = false, onChange, disabled = false, size = "medium", label, className = "", id } = _a, props = __rest(_a, ["checked", "onChange", "disabled", "size", "label", "className", "id"]);
24
+ const handleChange = (e) => {
25
+ if (!disabled && onChange) {
26
+ onChange(e.target.checked);
27
+ }
28
+ };
29
+ const handleKeyDown = (e) => {
30
+ if (e.key === "Enter" || e.key === " ") {
31
+ e.preventDefault();
32
+ if (!disabled && onChange) {
33
+ onChange(!checked);
34
+ }
35
+ }
36
+ };
37
+ const handleClick = () => {
38
+ if (!disabled && onChange) {
39
+ onChange(!checked);
40
+ }
41
+ };
42
+ const checkboxSize = size === "small" ? "w-4 h-4" : "w-5 h-5";
43
+ const labelSize = size === "small" ? "text-b3" : "text-b1";
44
+ const checkboxClasses = (0, clsx_1.default)("relative flex items-center justify-center rounded border cursor-pointer transition-all duration-200", checkboxSize,
45
+ // Default state
46
+ !disabled && !checked && "border-primary-500 bg-white",
47
+ // Hover state
48
+ !disabled && !checked && "hover:bg-primary-100",
49
+ // Focus state
50
+ !disabled &&
51
+ !checked &&
52
+ "focus:border-primary-500 focus:ring-2 focus:ring-primary-200",
53
+ // Selected state
54
+ !disabled && checked && "border-primary-500 bg-primary-500",
55
+ // Disabled state
56
+ disabled && "border-gray-200 bg-gray-100 cursor-not-allowed", className);
57
+ const labelClasses = (0, clsx_1.default)("ml-2 select-none transition-colors", labelSize, disabled ? "text-gray-400" : "text-gray-700");
58
+ return ((0, jsx_runtime_1.jsxs)("div", { className: "flex items-center", children: [(0, jsx_runtime_1.jsxs)("div", { className: checkboxClasses, tabIndex: disabled ? -1 : 0, onKeyDown: handleKeyDown, onClick: handleClick, role: "checkbox", "aria-checked": checked, "aria-disabled": disabled, children: [(0, jsx_runtime_1.jsx)("input", Object.assign({ ref: ref, type: "checkbox", checked: checked, onChange: handleChange, disabled: disabled, id: id, className: "sr-only" }, props)), checked && (0, jsx_runtime_1.jsx)(lu_1.LuCheck, { className: "w-3 h-3 text-white-100" })] }), label && ((0, jsx_runtime_1.jsx)("label", { htmlFor: id, className: labelClasses, onClick: handleClick, style: { cursor: disabled ? "not-allowed" : "pointer" }, children: label }))] }));
59
+ });
60
+ exports.Checkbox.displayName = "Checkbox";
@@ -0,0 +1,18 @@
1
+ import React from "react";
2
+ type Option = {
3
+ label: string;
4
+ value: string;
5
+ icon?: React.ReactNode;
6
+ disabled?: boolean;
7
+ };
8
+ type DropdownProps = {
9
+ options: Option[];
10
+ value?: string;
11
+ onChange: (value: string) => void;
12
+ placeholder?: string;
13
+ disabled?: boolean;
14
+ className?: string;
15
+ placeholderIcon?: React.ReactNode;
16
+ };
17
+ export declare const Dropdown: React.FC<DropdownProps>;
18
+ export {};
@@ -0,0 +1,116 @@
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.Dropdown = void 0;
7
+ const jsx_runtime_1 = require("react/jsx-runtime");
8
+ const react_1 = require("react");
9
+ const react_dom_1 = __importDefault(require("react-dom"));
10
+ const IconChevronDown_1 = require("../icons/IconChevronDown");
11
+ const IconChevronUp_1 = require("../icons/IconChevronUp");
12
+ const Dropdown = ({ options, value, onChange, placeholder = "Select", disabled = false, className = "", placeholderIcon, }) => {
13
+ const [isOpen, setIsOpen] = (0, react_1.useState)(false);
14
+ const [hoveredIndex, setHoveredIndex] = (0, react_1.useState)(null);
15
+ const [menuStyles, setMenuStyles] = (0, react_1.useState)({});
16
+ const [mounted, setMounted] = (0, react_1.useState)(false);
17
+ const [menuReady, setMenuReady] = (0, react_1.useState)(false);
18
+ const triggerRef = (0, react_1.useRef)(null);
19
+ const dropdownRef = (0, react_1.useRef)(null);
20
+ const menuRef = (0, react_1.useRef)(null);
21
+ (0, react_1.useEffect)(() => {
22
+ setMounted(true);
23
+ }, []);
24
+ const selectedOption = options.find((opt) => opt.value === value);
25
+ const triggerClass = [
26
+ "w-full flex items-center gap-2 px-4 py-2 rounded-lg transition-colors outline-none text-left text-base font-normal select-none",
27
+ "bg-white-100 border border-gray-300 hover:border-primary-500 focus:border-primary-500",
28
+ disabled ? "text-textAtenea-300 hover:border-gray-200 cursor-not-allowed border-gray-200" : "cursor-pointer",
29
+ isOpen && !disabled ? "border-primary-500 ring-2 ring-primary-200" : "",
30
+ className,
31
+ ].join(" ");
32
+ const listClass = "absolute z-10 mt-1 w-full bg-white-100 rounded-lg border border-gray-200 py-1 animate-fade-in";
33
+ const optionBase = "flex items-center gap-2 px-4 py-2 cursor-pointer transition-colors text-base";
34
+ const optionSelected = "bg-green-50 text-green-700";
35
+ const optionHover = "bg-gray-50";
36
+ const optionDisabled = "text-gray-300 cursor-not-allowed";
37
+ const handleKeyDown = (e) => {
38
+ if (disabled)
39
+ return;
40
+ if (e.key === "ArrowDown") {
41
+ e.preventDefault();
42
+ setIsOpen(true);
43
+ setHoveredIndex((prev) => prev === null || prev === options.length - 1 ? 0 : prev + 1);
44
+ }
45
+ else if (e.key === "ArrowUp") {
46
+ e.preventDefault();
47
+ setIsOpen(true);
48
+ setHoveredIndex((prev) => prev === null || prev === 0 ? options.length - 1 : prev - 1);
49
+ }
50
+ else if (e.key === "Enter" || e.key === " ") {
51
+ if (isOpen && hoveredIndex !== null && !options[hoveredIndex].disabled) {
52
+ onChange(options[hoveredIndex].value);
53
+ setIsOpen(false);
54
+ }
55
+ else {
56
+ setIsOpen((open) => !open);
57
+ }
58
+ }
59
+ else if (e.key === "Escape") {
60
+ setIsOpen(false);
61
+ }
62
+ };
63
+ // Calcula la posición del menú cuando se abre y al hacer scroll/resize
64
+ (0, react_1.useEffect)(() => {
65
+ if (!isOpen) {
66
+ setMenuReady(false);
67
+ return;
68
+ }
69
+ const updatePosition = () => {
70
+ if (triggerRef.current) {
71
+ const rect = triggerRef.current.getBoundingClientRect();
72
+ setMenuStyles({
73
+ position: "fixed",
74
+ top: rect.bottom + 4,
75
+ left: rect.left,
76
+ width: rect.width,
77
+ zIndex: 9999,
78
+ });
79
+ setMenuReady(true);
80
+ }
81
+ };
82
+ setTimeout(updatePosition, 0);
83
+ window.addEventListener("scroll", updatePosition, true);
84
+ window.addEventListener("resize", updatePosition);
85
+ // Cierra el menú si haces click fuera del trigger y del menú
86
+ const handleClick = (e) => {
87
+ var _a, _b;
88
+ const target = e.target;
89
+ const isInsideTrigger = (_a = triggerRef.current) === null || _a === void 0 ? void 0 : _a.contains(target);
90
+ const isInsideMenu = (_b = menuRef.current) === null || _b === void 0 ? void 0 : _b.contains(target);
91
+ if (!isInsideTrigger && !isInsideMenu) {
92
+ setIsOpen(false);
93
+ }
94
+ };
95
+ document.addEventListener("mousedown", handleClick);
96
+ return () => {
97
+ window.removeEventListener("scroll", updatePosition, true);
98
+ window.removeEventListener("resize", updatePosition);
99
+ document.removeEventListener("mousedown", handleClick);
100
+ };
101
+ }, [isOpen]);
102
+ // El menú del dropdown (portal)
103
+ const menu = ((0, jsx_runtime_1.jsx)("ul", { ref: menuRef, className: listClass, style: menuStyles, role: "listbox", tabIndex: -1, children: options.map((opt, idx) => ((0, jsx_runtime_1.jsxs)("li", { role: "option", "aria-selected": value === opt.value, className: [
104
+ optionBase,
105
+ value === opt.value ? optionSelected : "",
106
+ hoveredIndex === idx ? optionHover : "",
107
+ opt.disabled ? optionDisabled : "",
108
+ ].join(" "), onMouseEnter: () => setHoveredIndex(idx), onMouseLeave: () => setHoveredIndex(null), onClick: () => {
109
+ if (!opt.disabled) {
110
+ onChange(opt.value);
111
+ setIsOpen(false);
112
+ }
113
+ }, tabIndex: -1, children: [opt.icon ? ((0, jsx_runtime_1.jsx)("span", { className: value === opt.value ? "text-greenSuccess-800" : "text-gray-400", children: opt.icon })) : null, (0, jsx_runtime_1.jsx)("span", { className: opt.disabled ? "text-gray-300" : "", children: opt.label })] }, opt.value))) }));
114
+ return ((0, jsx_runtime_1.jsxs)("div", { className: "relative w-full", ref: dropdownRef, children: [(0, jsx_runtime_1.jsxs)("button", { ref: triggerRef, type: "button", className: triggerClass, onClick: () => !disabled && setIsOpen((open) => !open), onKeyDown: handleKeyDown, disabled: disabled, "aria-haspopup": "listbox", "aria-expanded": isOpen, tabIndex: 0, children: [(selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.icon) ? ((0, jsx_runtime_1.jsx)("span", { className: "text-greenSuccess-800", children: selectedOption.icon })) : placeholderIcon ? ((0, jsx_runtime_1.jsx)("span", { className: "text-gray-400", children: placeholderIcon })) : null, (0, jsx_runtime_1.jsx)("span", { className: selectedOption ? "textAtenea-900" : "text-gray-400", children: selectedOption ? selectedOption.label : placeholder }), (0, jsx_runtime_1.jsx)("span", { className: "ml-auto", children: isOpen ? ((0, jsx_runtime_1.jsx)("span", { className: "text-greenSuccess-800", children: (0, jsx_runtime_1.jsx)(IconChevronUp_1.IconChevronUp, {}) })) : ((0, jsx_runtime_1.jsx)("span", { className: "text-gray-400", children: (0, jsx_runtime_1.jsx)(IconChevronDown_1.IconChevronDown, {}) })) })] }), mounted && isOpen && menuReady && !disabled && typeof window !== "undefined" && react_dom_1.default.createPortal(menu, document.body)] }));
115
+ };
116
+ exports.Dropdown = Dropdown;
@@ -0,0 +1,15 @@
1
+ import React from "react";
2
+ export declare const Input: React.ForwardRefExoticComponent<React.InputHTMLAttributes<HTMLInputElement> & {
3
+ label?: string;
4
+ icon?: React.ReactNode;
5
+ helperText?: string;
6
+ error?: boolean;
7
+ warning?: boolean;
8
+ disabled?: boolean;
9
+ inputSize?: "large" | "medium";
10
+ variant?: "outline" | "filled";
11
+ className?: string;
12
+ showButton?: boolean;
13
+ onButtonClick?: () => void;
14
+ buttonIcon?: React.ReactNode;
15
+ } & React.RefAttributes<HTMLInputElement>>;
@@ -0,0 +1,118 @@
1
+ "use strict";
2
+ var __rest = (this && this.__rest) || function (s, e) {
3
+ var t = {};
4
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
+ t[p] = s[p];
6
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
+ t[p[i]] = s[p[i]];
10
+ }
11
+ return t;
12
+ };
13
+ var __importDefault = (this && this.__importDefault) || function (mod) {
14
+ return (mod && mod.__esModule) ? mod : { "default": mod };
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.Input = void 0;
18
+ const jsx_runtime_1 = require("react/jsx-runtime");
19
+ const react_1 = __importDefault(require("react"));
20
+ const clsx_1 = __importDefault(require("clsx"));
21
+ const IconArrowUp_1 = require("../icons/IconArrowUp");
22
+ const IconCalendar_1 = require("../icons/IconCalendar");
23
+ exports.Input = react_1.default.forwardRef((_a, ref) => {
24
+ var { label, icon, helperText, error = false, warning = false, disabled = false, inputSize = "large", variant = "outline", className, showButton = false, onButtonClick, buttonIcon, value, type, id } = _a, props = __rest(_a, ["label", "icon", "helperText", "error", "warning", "disabled", "inputSize", "variant", "className", "showButton", "onButtonClick", "buttonIcon", "value", "type", "id"]);
25
+ const hasValue = value ? String(value).trim().length > 0 : false;
26
+ const isDateType = type === "date" || type === "datetime-local" || type === "time";
27
+ // Detect iOS to not break the native datepicker
28
+ const isIOS = typeof navigator !== "undefined" &&
29
+ /iP(hone|od|ad)/.test(navigator.userAgent);
30
+ const internalRef = react_1.default.useRef(null);
31
+ const internalId = react_1.default.useId();
32
+ const inputId = id !== null && id !== void 0 ? id : internalId;
33
+ const setRefs = react_1.default.useCallback((node) => {
34
+ internalRef.current = node;
35
+ if (typeof ref === "function") {
36
+ ref(node);
37
+ }
38
+ else if (ref) {
39
+ ref.current =
40
+ node;
41
+ }
42
+ }, [ref]);
43
+ const handleDateIconClick = () => {
44
+ if (!internalRef.current || disabled)
45
+ return;
46
+ // Modern browsers (Chrome, Edge, etc.)
47
+ const anyInput = internalRef.current;
48
+ if (typeof anyInput.showPicker === "function") {
49
+ try {
50
+ anyInput.showPicker();
51
+ return;
52
+ }
53
+ catch (_a) {
54
+ // if it fails, go to the fallback
55
+ }
56
+ }
57
+ // Fallback: focus on the input (in iOS and browsers without showPicker)
58
+ internalRef.current.focus();
59
+ };
60
+ return ((0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col gap-1 w-full", children: [label && ((0, jsx_runtime_1.jsx)("label", { className: "text-textAtenea-900", htmlFor: inputId, children: label })), (0, jsx_runtime_1.jsxs)("div", { className: (0, clsx_1.default)("flex items-center rounded-xl border transition-colors relative", inputSize === "large" && "h-16 text-b1", inputSize === "medium" && "h-12 text-b2", icon
61
+ ? inputSize === "large"
62
+ ? "pl-6 pr-6"
63
+ : "pl-4 pr-4"
64
+ : inputSize === "large"
65
+ ? "px-6"
66
+ : "px-4", variant === "filled" &&
67
+ (error
68
+ ? "bg-redDanger-50"
69
+ : warning
70
+ ? "bg-yellowWarning-50"
71
+ : disabled
72
+ ? "bg-grey-100"
73
+ : "bg-grey-50"), variant === "outline" && "bg-white", error
74
+ ? "border-redDanger-500 text-redDanger-500"
75
+ : warning
76
+ ? "border-yellowWarning-500 text-yellowWarning-500"
77
+ : disabled
78
+ ? "border-grey-200 text-grey-300"
79
+ : "border-grey-200 text-grey-500 focus-within:border-primary-500 focus-within:text-primary-500", !disabled &&
80
+ !error &&
81
+ !warning &&
82
+ variant === "outline" &&
83
+ "hover:border-grey-400", !disabled &&
84
+ !error &&
85
+ !warning &&
86
+ variant === "filled" &&
87
+ "hover:border-grey-300", className), children: [icon && ((0, jsx_runtime_1.jsx)("span", { className: (0, clsx_1.default)("flex-shrink-0 z-10 relative", "mr-3"), children: icon })), (0, jsx_runtime_1.jsx)("input", Object.assign({ ref: setRefs, id: inputId, type: type, className: (0, clsx_1.default)("bg-transparent outline-none text-grey-900 placeholder:text-grey-400", disabled &&
88
+ "cursor-not-allowed text-grey-300 placeholder:text-grey-300", showButton || isDateType
89
+ ? "flex-1 pr-3 min-w-0"
90
+ : "flex-1 min-w-0",
91
+ // Hide native elements only when NOT iOS
92
+ isDateType &&
93
+ !isIOS &&
94
+ "appearance-none [&::-webkit-calendar-picker-indicator]:hidden [&::-webkit-inner-spin-button]:hidden [&::-webkit-clear-button]:hidden"), style: isDateType && !isIOS
95
+ ? {
96
+ colorScheme: "light",
97
+ WebkitAppearance: "none",
98
+ MozAppearance: "textfield",
99
+ }
100
+ : undefined, disabled: disabled, value: value }, props)), isDateType && !showButton && ((0, jsx_runtime_1.jsx)("label", { htmlFor: inputId,
101
+ // onClick for browsers with showPicker (Chrome, Storybook)
102
+ onClick: handleDateIconClick, className: (0, clsx_1.default)("flex items-center justify-center flex-shrink-0", disabled
103
+ ? "opacity-50 cursor-not-allowed"
104
+ : "cursor-pointer"), "aria-label": "Abrir calendario", children: (0, jsx_runtime_1.jsx)(IconCalendar_1.IconCalendar, { size: 20, color: disabled
105
+ ? "grey-300"
106
+ : error
107
+ ? "redDanger-500"
108
+ : warning
109
+ ? "yellowWarning-500"
110
+ : "grey-500" }) })), showButton && ((0, jsx_runtime_1.jsx)("button", { type: "button", onClick: hasValue && !error && !warning ? onButtonClick : undefined, disabled: disabled || !hasValue || error || warning, className: (0, clsx_1.default)("flex items-center justify-center transition-colors", inputSize === "large" && "w-10 h-10", inputSize === "medium" && "w-8 h-8", hasValue && "rounded-full", hasValue && !error && !warning && !disabled
111
+ ? "bg-primary-500 hover:bg-primary-600 text-textAtenea-900"
112
+ : "cursor-not-allowed text-grey-400"), children: buttonIcon || ((0, jsx_runtime_1.jsx)(IconArrowUp_1.IconArrowUp, { size: 16, color: hasValue ? "textAtenea-900" : "text-grey-400" })) }))] }), helperText && ((0, jsx_runtime_1.jsx)("span", { className: (0, clsx_1.default)("text-b3 mt-1", error
113
+ ? "text-redDanger-500"
114
+ : warning
115
+ ? "text-yellowWarning-500"
116
+ : "text-grey-400"), children: helperText }))] }));
117
+ });
118
+ exports.Input.displayName = "Input";
@@ -0,0 +1,6 @@
1
+ interface IntroIllustrationProps {
2
+ className?: string;
3
+ variant?: "quiz" | "flashcard";
4
+ }
5
+ export declare const IntroIllustration: React.FC<IntroIllustrationProps>;
6
+ export {};
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.IntroIllustration = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const IntroIllustration = ({ className = "", variant = "quiz", }) => {
6
+ if (variant === "flashcard") {
7
+ return ((0, jsx_runtime_1.jsx)("div", { className: `w-60 h-48 rounded-lg flex items-center justify-center bg-green-200 ${className}`, children: (0, jsx_runtime_1.jsxs)("div", { className: "relative", children: [(0, jsx_runtime_1.jsx)("div", { className: "w-48 h-32 rounded-lg bg-green-200" }), (0, jsx_runtime_1.jsx)("div", { className: "absolute top-0 left-0 w-48 h-32 rounded-md bg-gray-100 transform -translate-x-1 -translate-y-1" }), (0, jsx_runtime_1.jsxs)("div", { className: "absolute top-6 left-2 w-48 h-28 rounded-md bg-white-100", children: [(0, jsx_runtime_1.jsx)("div", { className: "w-54 h-16 m-3 rounded-md bg-gray-100" }), (0, jsx_runtime_1.jsx)("div", { className: "w-16 h-4 ml-16 rounded-md bg-gray-200" })] })] }) }));
8
+ }
9
+ // Default quiz variant
10
+ return ((0, jsx_runtime_1.jsx)("div", { className: `w-60 h-48 rounded-lg flex items-center justify-center bg-primary-300 ${className}`, children: (0, jsx_runtime_1.jsxs)("div", { className: "w-48 h-32 rounded bg-white-100 flex flex-col gap-2 p-4", children: [(0, jsx_runtime_1.jsx)("div", { className: "h-6 bg-gray-100 rounded-sm" }), (0, jsx_runtime_1.jsx)("div", { className: "h-3 bg-gray-100 rounded-sm" }), (0, jsx_runtime_1.jsx)("div", { className: "h-3 bg-gray-100 rounded-sm border border-primary-500" }), (0, jsx_runtime_1.jsx)("div", { className: "h-3 bg-gray-100 rounded-sm" }), (0, jsx_runtime_1.jsx)("div", { className: "h-3 bg-gray-100 rounded-sm" })] }) }));
11
+ };
12
+ exports.IntroIllustration = IntroIllustration;
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ type ListProps = {
3
+ children: React.ReactNode;
4
+ className?: string;
5
+ };
6
+ export declare const List: React.FC<ListProps>;
7
+ export {};
@@ -0,0 +1,13 @@
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.List = void 0;
7
+ const jsx_runtime_1 = require("react/jsx-runtime");
8
+ const react_1 = __importDefault(require("react"));
9
+ const clsx_1 = __importDefault(require("clsx"));
10
+ const List = ({ children, className = "" }) => {
11
+ return ((0, jsx_runtime_1.jsx)("div", { className: (0, clsx_1.default)("bg-white border border-gray-200 rounded-lg p-4 space-y-3", className), children: react_1.default.Children.map(children, (child, index) => ((0, jsx_runtime_1.jsxs)(react_1.default.Fragment, { children: [child, index < react_1.default.Children.count(children) - 1 && ((0, jsx_runtime_1.jsx)("div", { className: "border-t border-gray-200 mt-3 -mx-4 px-4" }))] }, index))) }));
12
+ };
13
+ exports.List = List;
@@ -0,0 +1,9 @@
1
+ import React from "react";
2
+ type ListItemProps = {
3
+ icon: React.ReactNode;
4
+ text: string;
5
+ iconColor?: string;
6
+ className?: string;
7
+ };
8
+ export declare const ListItem: React.FC<ListItemProps>;
9
+ 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.ListItem = void 0;
7
+ const jsx_runtime_1 = require("react/jsx-runtime");
8
+ const clsx_1 = __importDefault(require("clsx"));
9
+ const ListItem = ({ icon, text, iconColor = "text-blue-500", className = "", }) => {
10
+ return ((0, jsx_runtime_1.jsxs)("div", { className: (0, clsx_1.default)("flex items-start space-x-4 px-4 py-6", className), children: [(0, jsx_runtime_1.jsx)("div", { className: (0, clsx_1.default)("flex-shrink-0 w-6 h-6", iconColor), children: icon }), (0, jsx_runtime_1.jsx)("p", { className: "text-gray-500 text-b1 leading-relaxed", children: text })] }));
11
+ };
12
+ exports.ListItem = ListItem;
@@ -0,0 +1,12 @@
1
+ import React from "react";
2
+ type MenuItemProps = React.ButtonHTMLAttributes<HTMLButtonElement> & {
3
+ size?: "medium" | "small";
4
+ icon?: React.ReactNode;
5
+ children: React.ReactNode;
6
+ onClick?: () => void;
7
+ collapsed?: boolean;
8
+ isActive?: boolean;
9
+ disabled?: boolean;
10
+ };
11
+ export declare const MenuItem: React.FC<MenuItemProps>;
12
+ export {};
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ var __rest = (this && this.__rest) || function (s, e) {
3
+ var t = {};
4
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
+ t[p] = s[p];
6
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
+ t[p[i]] = s[p[i]];
10
+ }
11
+ return t;
12
+ };
13
+ var __importDefault = (this && this.__importDefault) || function (mod) {
14
+ return (mod && mod.__esModule) ? mod : { "default": mod };
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.MenuItem = void 0;
18
+ const jsx_runtime_1 = require("react/jsx-runtime");
19
+ const clsx_1 = __importDefault(require("clsx"));
20
+ const baseClasses = "flex items-center gap-2 transition-colors duration-150 rounded-md";
21
+ const sizeClasses = {
22
+ medium: "px-3 py-2 text-b4",
23
+ small: "px-2 py-1.5 text-c2",
24
+ };
25
+ const getStateClasses = (isActive, disabled) => {
26
+ if (disabled) {
27
+ return "text-gray-400 cursor-not-allowed opacity-30";
28
+ }
29
+ if (isActive) {
30
+ return "bg-primary-200 text-primary-700 cursor-pointer";
31
+ }
32
+ return "text-textAtenea-300 hover:bg-primary-100 hover:text-primary-700 active:bg-primary-200 active:text-primary-700 cursor-pointer";
33
+ };
34
+ const getIconClasses = (isActive, disabled) => {
35
+ if (disabled) {
36
+ return "text-gray-400 opacity-50";
37
+ }
38
+ if (isActive) {
39
+ return "text-primary-700";
40
+ }
41
+ return "text-textAtenea-300 group-hover:text-primary-700 group-active:text-primary-700";
42
+ };
43
+ const MenuItem = (_a) => {
44
+ var { size = "medium", icon, children, onClick, collapsed = false, isActive = false, disabled = false, className } = _a, props = __rest(_a, ["size", "icon", "children", "onClick", "collapsed", "isActive", "disabled", "className"]);
45
+ return ((0, jsx_runtime_1.jsxs)("button", Object.assign({ type: "button", className: (0, clsx_1.default)(baseClasses, sizeClasses[size], getStateClasses(isActive, disabled), "group w-full", collapsed ? "justify-center" : "text-left", className), onClick: onClick, disabled: disabled }, props, { children: [icon && ((0, jsx_runtime_1.jsx)("div", { className: (0, clsx_1.default)("flex-shrink-0 w-6 h-6 flex items-center justify-center", getIconClasses(isActive, disabled)), children: icon })), !collapsed && (0, jsx_runtime_1.jsx)("span", { className: "flex-1", children: children })] })));
46
+ };
47
+ exports.MenuItem = MenuItem;
@@ -0,0 +1,13 @@
1
+ import React from "react";
2
+ type RadioSize = "small" | "medium";
3
+ export declare const Radio: React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "type" | "onChange"> & {
4
+ checked?: boolean;
5
+ onChange?: (checked: boolean) => void;
6
+ disabled?: boolean;
7
+ size?: RadioSize;
8
+ label?: string;
9
+ helperText?: string;
10
+ className?: string;
11
+ id?: string;
12
+ } & React.RefAttributes<HTMLInputElement>>;
13
+ export {};