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,247 @@
1
+ export declare const theme: {
2
+ fontSize: {
3
+ readonly xs: readonly ["0.75rem", {
4
+ readonly lineHeight: "1rem";
5
+ }];
6
+ readonly sm: readonly ["0.875rem", {
7
+ readonly lineHeight: "1.25rem";
8
+ }];
9
+ readonly base: readonly ["1rem", {
10
+ readonly lineHeight: "1.5rem";
11
+ }];
12
+ readonly lg: readonly ["clamp(1rem, 0.875rem + 0.5vw, 1.125rem)", {
13
+ readonly lineHeight: "1.75rem";
14
+ }];
15
+ readonly xl: readonly ["clamp(1.125rem, 1rem + 0.5vw, 1.25rem)", {
16
+ readonly lineHeight: "1.75rem";
17
+ }];
18
+ readonly "2xl": readonly ["clamp(1.25rem, 1.125rem + 0.75vw, 1.5rem)", {
19
+ readonly lineHeight: "2rem";
20
+ }];
21
+ readonly "3xl": readonly ["clamp(1.5rem, 1.375rem + 0.75vw, 1.875rem)", {
22
+ readonly lineHeight: "2.25rem";
23
+ }];
24
+ readonly "4xl": readonly ["clamp(1.75rem, 1.5rem + 1vw, 2.25rem)", {
25
+ readonly lineHeight: "2.5rem";
26
+ }];
27
+ readonly h1: readonly ["clamp(2rem, 1.5rem + 2.5vw, 3rem)", {
28
+ readonly lineHeight: "clamp(2.5rem, 2.125rem + 3vw, 3.625rem)";
29
+ readonly fontWeight: 600;
30
+ }];
31
+ readonly h2: readonly ["clamp(1.75rem, 1.375rem + 2vw, 2.5rem)", {
32
+ readonly lineHeight: "clamp(2.125rem, 1.75rem + 2.5vw, 3rem)";
33
+ readonly fontWeight: 600;
34
+ }];
35
+ readonly h3: readonly ["clamp(1.5rem, 1.25rem + 1.5vw, 2rem)", {
36
+ readonly lineHeight: "clamp(1.875rem, 1.625rem + 2vw, 2.375rem)";
37
+ readonly fontWeight: 600;
38
+ }];
39
+ readonly h4: readonly ["clamp(1.375rem, 1.125rem + 1.25vw, 1.75rem)", {
40
+ readonly lineHeight: "clamp(1.625rem, 1.375rem + 1.5vw, 2.125rem)";
41
+ readonly fontWeight: 600;
42
+ }];
43
+ readonly h5: readonly ["clamp(1.25rem, 1.125rem + 1vw, 1.5rem)", {
44
+ readonly lineHeight: "clamp(1.5rem, 1.375rem + 1.25vw, 1.75rem)";
45
+ readonly fontWeight: 600;
46
+ }];
47
+ readonly s1: readonly ["clamp(1rem, 0.9375rem + 0.5vw, 1.125rem)", {
48
+ readonly lineHeight: "1.75rem";
49
+ readonly fontWeight: 400;
50
+ }];
51
+ readonly s2: readonly ["1rem", {
52
+ readonly lineHeight: "1.5rem";
53
+ readonly fontWeight: 600;
54
+ }];
55
+ readonly b1: readonly ["1rem", {
56
+ readonly lineHeight: "1.5rem";
57
+ readonly fontWeight: 400;
58
+ }];
59
+ readonly b2: readonly ["1rem", {
60
+ readonly lineHeight: "1.5rem";
61
+ readonly fontWeight: 500;
62
+ }];
63
+ readonly b3: readonly ["0.875rem", {
64
+ readonly lineHeight: "1.25rem";
65
+ readonly fontWeight: 400;
66
+ }];
67
+ readonly b4: readonly ["0.875rem", {
68
+ readonly lineHeight: "1.25rem";
69
+ readonly fontWeight: 500;
70
+ }];
71
+ readonly c1: readonly ["0.75rem", {
72
+ readonly lineHeight: "1rem";
73
+ readonly fontWeight: 500;
74
+ }];
75
+ readonly c2: readonly ["0.75rem", {
76
+ readonly lineHeight: "1rem";
77
+ readonly fontWeight: 500;
78
+ }];
79
+ readonly c3: readonly ["0.625rem", {
80
+ readonly lineHeight: "0.875rem";
81
+ readonly fontWeight: 500;
82
+ }];
83
+ readonly label: readonly ["0.75rem", {
84
+ readonly lineHeight: "1rem";
85
+ readonly fontWeight: 500;
86
+ }];
87
+ readonly buttonGiant: readonly ["clamp(1rem, 0.9375rem + 0.5vw, 1.125rem)", {
88
+ readonly lineHeight: "1.5rem";
89
+ readonly fontWeight: 600;
90
+ }];
91
+ readonly buttonLarge: readonly ["1rem", {
92
+ readonly lineHeight: "1.25rem";
93
+ readonly fontWeight: 600;
94
+ }];
95
+ readonly buttonMedium: readonly ["0.875rem", {
96
+ readonly lineHeight: "1rem";
97
+ readonly fontWeight: 600;
98
+ }];
99
+ readonly buttonSmall: readonly ["0.75rem", {
100
+ readonly lineHeight: "1rem";
101
+ readonly fontWeight: 600;
102
+ }];
103
+ readonly buttonTiny: readonly ["0.625rem", {
104
+ readonly lineHeight: "0.75rem";
105
+ readonly fontWeight: 600;
106
+ }];
107
+ };
108
+ fontFamily: {
109
+ readonly sans: readonly ["Onest", "system-ui", "sans-serif"];
110
+ };
111
+ fontWeight: {
112
+ readonly regular: 400;
113
+ readonly medium: 500;
114
+ readonly semibold: 600;
115
+ readonly bold: 700;
116
+ };
117
+ letterSpacing: {
118
+ readonly normal: "0";
119
+ };
120
+ colors: {
121
+ black: {
122
+ 100: string;
123
+ 90: string;
124
+ 80: string;
125
+ 70: string;
126
+ 60: string;
127
+ 50: string;
128
+ 40: string;
129
+ 30: string;
130
+ 20: string;
131
+ 10: string;
132
+ };
133
+ white: {
134
+ 100: string;
135
+ 90: string;
136
+ 80: string;
137
+ 70: string;
138
+ 60: string;
139
+ 50: string;
140
+ 40: string;
141
+ 30: string;
142
+ 20: string;
143
+ 10: string;
144
+ };
145
+ primary: {
146
+ 900: string;
147
+ 800: string;
148
+ 700: string;
149
+ 600: string;
150
+ 500: string;
151
+ 400: string;
152
+ 300: string;
153
+ 200: string;
154
+ 100: string;
155
+ 50: string;
156
+ };
157
+ textAtenea: {
158
+ 900: string;
159
+ 700: string;
160
+ 500: string;
161
+ 300: string;
162
+ 200: string;
163
+ 100: string;
164
+ 50: string;
165
+ };
166
+ grey: {
167
+ 900: string;
168
+ 800: string;
169
+ 700: string;
170
+ 600: string;
171
+ 500: string;
172
+ 400: string;
173
+ 300: string;
174
+ 200: string;
175
+ 100: string;
176
+ 50: string;
177
+ };
178
+ greenSuccess: {
179
+ 900: string;
180
+ 800: string;
181
+ 700: string;
182
+ 600: string;
183
+ 500: string;
184
+ 400: string;
185
+ 300: string;
186
+ 200: string;
187
+ 100: string;
188
+ 50: string;
189
+ };
190
+ redDanger: {
191
+ 900: string;
192
+ 800: string;
193
+ 700: string;
194
+ 500: string;
195
+ 300: string;
196
+ 100: string;
197
+ 50: string;
198
+ };
199
+ yellowWarning: {
200
+ 900: string;
201
+ 800: string;
202
+ 700: string;
203
+ 500: string;
204
+ 300: string;
205
+ 100: string;
206
+ 50: string;
207
+ };
208
+ blueInfo: {
209
+ 900: string;
210
+ 800: string;
211
+ 700: string;
212
+ 600: string;
213
+ 500: string;
214
+ 400: string;
215
+ 300: string;
216
+ 200: string;
217
+ 100: string;
218
+ 50: string;
219
+ };
220
+ pinkAtenea: {
221
+ 500: string;
222
+ 300: string;
223
+ 100: string;
224
+ };
225
+ violetAtenea: {
226
+ 500: string;
227
+ 300: string;
228
+ 100: string;
229
+ };
230
+ orangeAtenea: {
231
+ 500: string;
232
+ 300: string;
233
+ 100: string;
234
+ };
235
+ };
236
+ spacing: {
237
+ 2.5: string;
238
+ };
239
+ borders: {
240
+ ringWidth: {
241
+ 2: string;
242
+ };
243
+ borderRadius: {
244
+ md: string;
245
+ };
246
+ };
247
+ };
@@ -0,0 +1,17 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.theme = void 0;
5
+ const colors_1 = require("./colors");
6
+ const typography_1 = require("./typography");
7
+ const spacing_1 = require("./spacing");
8
+ const borders_1 = require("./borders");
9
+ exports.theme = {
10
+ fontSize: typography_1.typography.fontSize,
11
+ fontFamily: typography_1.typography.fontFamily,
12
+ fontWeight: typography_1.typography.fontWeight,
13
+ letterSpacing: typography_1.typography.letterSpacing,
14
+ colors: colors_1.colors,
15
+ spacing: spacing_1.spacing,
16
+ borders: borders_1.borders,
17
+ };
@@ -0,0 +1,120 @@
1
+ export declare const typography: {
2
+ readonly fontFamily: {
3
+ readonly sans: readonly ["Onest", "system-ui", "sans-serif"];
4
+ };
5
+ readonly fontWeight: {
6
+ readonly regular: 400;
7
+ readonly medium: 500;
8
+ readonly semibold: 600;
9
+ readonly bold: 700;
10
+ };
11
+ readonly fontSize: {
12
+ readonly xs: readonly ["0.75rem", {
13
+ readonly lineHeight: "1rem";
14
+ }];
15
+ readonly sm: readonly ["0.875rem", {
16
+ readonly lineHeight: "1.25rem";
17
+ }];
18
+ readonly base: readonly ["1rem", {
19
+ readonly lineHeight: "1.5rem";
20
+ }];
21
+ readonly lg: readonly ["clamp(1rem, 0.875rem + 0.5vw, 1.125rem)", {
22
+ readonly lineHeight: "1.75rem";
23
+ }];
24
+ readonly xl: readonly ["clamp(1.125rem, 1rem + 0.5vw, 1.25rem)", {
25
+ readonly lineHeight: "1.75rem";
26
+ }];
27
+ readonly "2xl": readonly ["clamp(1.25rem, 1.125rem + 0.75vw, 1.5rem)", {
28
+ readonly lineHeight: "2rem";
29
+ }];
30
+ readonly "3xl": readonly ["clamp(1.5rem, 1.375rem + 0.75vw, 1.875rem)", {
31
+ readonly lineHeight: "2.25rem";
32
+ }];
33
+ readonly "4xl": readonly ["clamp(1.75rem, 1.5rem + 1vw, 2.25rem)", {
34
+ readonly lineHeight: "2.5rem";
35
+ }];
36
+ readonly h1: readonly ["clamp(2rem, 1.5rem + 2.5vw, 3rem)", {
37
+ readonly lineHeight: "clamp(2.5rem, 2.125rem + 3vw, 3.625rem)";
38
+ readonly fontWeight: 600;
39
+ }];
40
+ readonly h2: readonly ["clamp(1.75rem, 1.375rem + 2vw, 2.5rem)", {
41
+ readonly lineHeight: "clamp(2.125rem, 1.75rem + 2.5vw, 3rem)";
42
+ readonly fontWeight: 600;
43
+ }];
44
+ readonly h3: readonly ["clamp(1.5rem, 1.25rem + 1.5vw, 2rem)", {
45
+ readonly lineHeight: "clamp(1.875rem, 1.625rem + 2vw, 2.375rem)";
46
+ readonly fontWeight: 600;
47
+ }];
48
+ readonly h4: readonly ["clamp(1.375rem, 1.125rem + 1.25vw, 1.75rem)", {
49
+ readonly lineHeight: "clamp(1.625rem, 1.375rem + 1.5vw, 2.125rem)";
50
+ readonly fontWeight: 600;
51
+ }];
52
+ readonly h5: readonly ["clamp(1.25rem, 1.125rem + 1vw, 1.5rem)", {
53
+ readonly lineHeight: "clamp(1.5rem, 1.375rem + 1.25vw, 1.75rem)";
54
+ readonly fontWeight: 600;
55
+ }];
56
+ readonly s1: readonly ["clamp(1rem, 0.9375rem + 0.5vw, 1.125rem)", {
57
+ readonly lineHeight: "1.75rem";
58
+ readonly fontWeight: 400;
59
+ }];
60
+ readonly s2: readonly ["1rem", {
61
+ readonly lineHeight: "1.5rem";
62
+ readonly fontWeight: 600;
63
+ }];
64
+ readonly b1: readonly ["1rem", {
65
+ readonly lineHeight: "1.5rem";
66
+ readonly fontWeight: 400;
67
+ }];
68
+ readonly b2: readonly ["1rem", {
69
+ readonly lineHeight: "1.5rem";
70
+ readonly fontWeight: 500;
71
+ }];
72
+ readonly b3: readonly ["0.875rem", {
73
+ readonly lineHeight: "1.25rem";
74
+ readonly fontWeight: 400;
75
+ }];
76
+ readonly b4: readonly ["0.875rem", {
77
+ readonly lineHeight: "1.25rem";
78
+ readonly fontWeight: 500;
79
+ }];
80
+ readonly c1: readonly ["0.75rem", {
81
+ readonly lineHeight: "1rem";
82
+ readonly fontWeight: 500;
83
+ }];
84
+ readonly c2: readonly ["0.75rem", {
85
+ readonly lineHeight: "1rem";
86
+ readonly fontWeight: 500;
87
+ }];
88
+ readonly c3: readonly ["0.625rem", {
89
+ readonly lineHeight: "0.875rem";
90
+ readonly fontWeight: 500;
91
+ }];
92
+ readonly label: readonly ["0.75rem", {
93
+ readonly lineHeight: "1rem";
94
+ readonly fontWeight: 500;
95
+ }];
96
+ readonly buttonGiant: readonly ["clamp(1rem, 0.9375rem + 0.5vw, 1.125rem)", {
97
+ readonly lineHeight: "1.5rem";
98
+ readonly fontWeight: 600;
99
+ }];
100
+ readonly buttonLarge: readonly ["1rem", {
101
+ readonly lineHeight: "1.25rem";
102
+ readonly fontWeight: 600;
103
+ }];
104
+ readonly buttonMedium: readonly ["0.875rem", {
105
+ readonly lineHeight: "1rem";
106
+ readonly fontWeight: 600;
107
+ }];
108
+ readonly buttonSmall: readonly ["0.75rem", {
109
+ readonly lineHeight: "1rem";
110
+ readonly fontWeight: 600;
111
+ }];
112
+ readonly buttonTiny: readonly ["0.625rem", {
113
+ readonly lineHeight: "0.75rem";
114
+ readonly fontWeight: 600;
115
+ }];
116
+ };
117
+ readonly letterSpacing: {
118
+ readonly normal: "0";
119
+ };
120
+ };
@@ -0,0 +1,87 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.typography = void 0;
5
+ exports.typography = {
6
+ fontFamily: {
7
+ sans: ["Onest", "system-ui", "sans-serif"],
8
+ },
9
+ fontWeight: {
10
+ regular: 400,
11
+ medium: 500,
12
+ semibold: 600,
13
+ bold: 700,
14
+ },
15
+ fontSize: {
16
+ xs: ["0.75rem", { lineHeight: "1rem" }],
17
+ sm: ["0.875rem", { lineHeight: "1.25rem" }],
18
+ base: ["1rem", { lineHeight: "1.5rem" }],
19
+ lg: ["clamp(1rem, 0.875rem + 0.5vw, 1.125rem)", { lineHeight: "1.75rem" }],
20
+ xl: ["clamp(1.125rem, 1rem + 0.5vw, 1.25rem)", { lineHeight: "1.75rem" }],
21
+ "2xl": [
22
+ "clamp(1.25rem, 1.125rem + 0.75vw, 1.5rem)",
23
+ { lineHeight: "2rem" },
24
+ ],
25
+ "3xl": [
26
+ "clamp(1.5rem, 1.375rem + 0.75vw, 1.875rem)",
27
+ { lineHeight: "2.25rem" },
28
+ ],
29
+ "4xl": ["clamp(1.75rem, 1.5rem + 1vw, 2.25rem)", { lineHeight: "2.5rem" }],
30
+ h1: [
31
+ "clamp(2rem, 1.5rem + 2.5vw, 3rem)",
32
+ {
33
+ lineHeight: "clamp(2.5rem, 2.125rem + 3vw, 3.625rem)",
34
+ fontWeight: 600,
35
+ },
36
+ ],
37
+ h2: [
38
+ "clamp(1.75rem, 1.375rem + 2vw, 2.5rem)",
39
+ { lineHeight: "clamp(2.125rem, 1.75rem + 2.5vw, 3rem)", fontWeight: 600 },
40
+ ],
41
+ h3: [
42
+ "clamp(1.5rem, 1.25rem + 1.5vw, 2rem)",
43
+ {
44
+ lineHeight: "clamp(1.875rem, 1.625rem + 2vw, 2.375rem)",
45
+ fontWeight: 600,
46
+ },
47
+ ],
48
+ h4: [
49
+ "clamp(1.375rem, 1.125rem + 1.25vw, 1.75rem)",
50
+ {
51
+ lineHeight: "clamp(1.625rem, 1.375rem + 1.5vw, 2.125rem)",
52
+ fontWeight: 600,
53
+ },
54
+ ],
55
+ h5: [
56
+ "clamp(1.25rem, 1.125rem + 1vw, 1.5rem)",
57
+ {
58
+ lineHeight: "clamp(1.5rem, 1.375rem + 1.25vw, 1.75rem)",
59
+ fontWeight: 600,
60
+ },
61
+ ],
62
+ s1: [
63
+ "clamp(1rem, 0.9375rem + 0.5vw, 1.125rem)",
64
+ { lineHeight: "1.75rem", fontWeight: 400 },
65
+ ],
66
+ s2: ["1rem", { lineHeight: "1.5rem", fontWeight: 600 }],
67
+ b1: ["1rem", { lineHeight: "1.5rem", fontWeight: 400 }],
68
+ b2: ["1rem", { lineHeight: "1.5rem", fontWeight: 500 }],
69
+ b3: ["0.875rem", { lineHeight: "1.25rem", fontWeight: 400 }],
70
+ b4: ["0.875rem", { lineHeight: "1.25rem", fontWeight: 500 }],
71
+ c1: ["0.75rem", { lineHeight: "1rem", fontWeight: 500 }],
72
+ c2: ["0.75rem", { lineHeight: "1rem", fontWeight: 500 }],
73
+ c3: ["0.625rem", { lineHeight: "0.875rem", fontWeight: 500 }],
74
+ label: ["0.75rem", { lineHeight: "1rem", fontWeight: 500 }],
75
+ buttonGiant: [
76
+ "clamp(1rem, 0.9375rem + 0.5vw, 1.125rem)",
77
+ { lineHeight: "1.5rem", fontWeight: 600 },
78
+ ],
79
+ buttonLarge: ["1rem", { lineHeight: "1.25rem", fontWeight: 600 }],
80
+ buttonMedium: ["0.875rem", { lineHeight: "1rem", fontWeight: 600 }],
81
+ buttonSmall: ["0.75rem", { lineHeight: "1rem", fontWeight: 600 }],
82
+ buttonTiny: ["0.625rem", { lineHeight: "0.75rem", fontWeight: 600 }],
83
+ },
84
+ letterSpacing: {
85
+ normal: "0",
86
+ },
87
+ };
package/package.json ADDED
@@ -0,0 +1,69 @@
1
+ {
2
+ "name": "atenea-components",
3
+ "version": "1.4.17",
4
+ "description": "React component library for Atenea",
5
+ "main": "dist/index.js",
6
+ "module": "dist/index.esm.js",
7
+ "types": "dist/index.d.ts",
8
+ "theme": "theme.js",
9
+ "typesVersions": {
10
+ "*": {
11
+ "theme": [
12
+ "./dist/tokens/theme.d.ts"
13
+ ]
14
+ }
15
+ },
16
+ "scripts": {
17
+ "dev": "vite",
18
+ "build:tsc": "tsc",
19
+ "build:rollup": "rollup -c",
20
+ "build": "npm run build:tsc && npm run build:rollup",
21
+ "storybook": "storybook dev -p 6006",
22
+ "build-storybook": "storybook build",
23
+ "prepublishOnly": "npm run build",
24
+ "build:theme": "node scripts/build-theme.js"
25
+ },
26
+ "keywords": [
27
+ "react",
28
+ "components",
29
+ "ui",
30
+ "atenea"
31
+ ],
32
+ "author": "",
33
+ "license": "MIT",
34
+ "repository": {
35
+ "type": "git",
36
+ "url": "git+https://github.com/yourusername/atenea-web-components.git"
37
+ },
38
+ "dependencies": {
39
+ "clsx": "^2.1.0",
40
+ "react": "^18.2.0",
41
+ "react-dom": "^18.2.0",
42
+ "react-icons": "^5.5.0"
43
+ },
44
+ "peerDependencies": {
45
+ "react": "^18.2.0",
46
+ "react-dom": "^18.2.0"
47
+ },
48
+ "devDependencies": {
49
+ "@rollup/plugin-commonjs": "^28.0.5",
50
+ "@rollup/plugin-typescript": "^11.1.5",
51
+ "@storybook/addon-essentials": "^8.0.0",
52
+ "@storybook/addon-postcss": "^1.0.0",
53
+ "@storybook/react-vite": "^8.0.0",
54
+ "@types/react": "^18.0.37",
55
+ "@types/react-dom": "^18.0.11",
56
+ "@vitejs/plugin-react": "^4.0.3",
57
+ "autoprefixer": "^10.4.14",
58
+ "postcss": "^8.4.24",
59
+ "rollup": "^4.14.0",
60
+ "tailwindcss": "^3.3.2",
61
+ "ts-node": "^10.9.2",
62
+ "typescript": "^5.4.2",
63
+ "vite": "^5.2.0"
64
+ },
65
+ "files": [
66
+ "dist",
67
+ "theme.js"
68
+ ]
69
+ }
package/readme.md ADDED
@@ -0,0 +1,88 @@
1
+ # Atenea Web Components – Tailwind Theme Integration
2
+
3
+ ## Automated Tailwind Theme Export
4
+
5
+ This project provides a design system and a set of custom Tailwind utilities (such as `text-h1`, `text-h2`, custom colors, etc.) that can be used both internally and in external projects. To ensure all custom utilities are available, the theme is defined in TypeScript and automatically exported to a CommonJS JavaScript file for Tailwind consumption.
6
+
7
+ ---
8
+
9
+ ### How It Works
10
+
11
+ - The source of truth for the theme is `src/tokens/theme.ts` (TypeScript).
12
+ - A build script (`scripts/build-theme.js`) generates a CommonJS-compatible `theme.js` in the project root.
13
+ - The generated `theme.js` is imported in your `tailwind.config.js` to provide all custom utilities to Tailwind.
14
+
15
+ ---
16
+
17
+ ## Usage in This Project
18
+
19
+ 1. **Edit your theme in TypeScript:**
20
+ - Make changes in `src/tokens/theme.ts`.
21
+ 2. **Generate the JS theme:**
22
+ - Run:
23
+ ```sh
24
+ npm run build:theme
25
+ ```
26
+ - This will create/update `theme.js` in the root directory.
27
+ 3. **Tailwind config setup:**
28
+ - Your `tailwind.config.js` should look like this:
29
+ ```js
30
+ const { theme } = require('./theme');
31
+ module.exports = {
32
+ content: ['./src/**/*.{js,ts,jsx,tsx}'],
33
+ theme: {
34
+ extend: theme
35
+ },
36
+ plugins: [],
37
+ };
38
+ ```
39
+
40
+ ---
41
+
42
+ ## Usage in External Projects (Consumers)
43
+
44
+ If you want to use these custom utilities in another project:
45
+
46
+ 1. **Install this package as a dependency.**
47
+ 2. **Import the generated theme in your Tailwind config:**
48
+ ```js
49
+ const { theme } = require('atenea-web-components/theme');
50
+ module.exports = {
51
+ content: [
52
+ './src/**/*.{js,ts,jsx,tsx}',
53
+ './node_modules/atenea-web-components/**/*.{js,ts,jsx,tsx}'
54
+ ],
55
+ theme: {
56
+ extend: theme
57
+ },
58
+ plugins: [],
59
+ };
60
+ ```
61
+ 3. **Ensure the theme is up to date:**
62
+ - If you update the package or its theme, run:
63
+ ```sh
64
+ npm run build:theme
65
+ ```
66
+ - (If you use a monorepo, you may want to automate this step in your build pipeline.)
67
+
68
+ ---
69
+
70
+ ## Recommendations
71
+
72
+ - **Always run `npm run build:theme` after changing the theme in TypeScript.**
73
+ - **Add the build step to your CI/CD pipeline** to avoid mismatches between TS and JS theme files.
74
+ - **Document for consumers** that they must use the generated `theme.js` for full utility support (including custom font sizes like `text-h1`).
75
+ - **If you publish this package,** ensure `theme.js` is included in the published files (not gitignored or npmignored).
76
+
77
+ ---
78
+
79
+ ## Troubleshooting
80
+
81
+ - If custom utilities like `text-h1` do not work, ensure:
82
+ - The consumer project is importing the correct `theme.js`.
83
+ - The build script has been run after any theme changes.
84
+ - The `content` array in `tailwind.config.js` includes the package source files.
85
+
86
+ ---
87
+
88
+ **For questions or improvements, please open an issue or PR!**