atomos_next_genesis 0.0.3-alpha

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/README.md ADDED
@@ -0,0 +1,464 @@
1
+ # Atomos Genesis Component Library
2
+
3
+ ## Step 1: Installation
4
+
5
+ Begin by installing the Atomos Genesis Component Library via npm:
6
+
7
+ ```bash
8
+ npm i @atomos_tech/genesis
9
+ ```
10
+
11
+ ## Step 2: Import CSS
12
+
13
+ Import the library's CSS in your root page to apply the default styles:
14
+
15
+ ```typescript
16
+ import "@atomos_tech/genesis/style";
17
+ ```
18
+
19
+ **Make sure to import it right above your global.css file to override the default colour palette!**
20
+
21
+ For example:
22
+
23
+ ```typescript
24
+ import "@atomos_tech/genesis/style";
25
+ import "./globals.css";
26
+ ```
27
+
28
+ ## Step 3: Set Up Theme Container
29
+
30
+ Wrap your application content within a `theme-primary` class to ensure consistent theming across your app. Add this snippet to your root or base page:
31
+
32
+ ```typescript
33
+ <div className="theme-primary">{children}</div>
34
+ ```
35
+
36
+ ## Step 4: Configure Tailwind
37
+
38
+ You can set up the Tailwind CSS configuration in your tailwind.config.ts or tailwind.config.js and copy the theme styling below:
39
+
40
+ ```
41
+ theme: {
42
+ extend: {
43
+ colors: {
44
+ backdrop: "rgba(0, 0, 0, 0.5)",
45
+
46
+ // Primary Colors
47
+ primary: {
48
+ 25: "var(--primary-25)",
49
+ 50: "var(--primary-50)",
50
+ 100: "var(--primary-100)",
51
+ 200: "var(--primary-200)",
52
+ 300: "var(--primary-300)",
53
+ 400: "var(--primary-400)",
54
+ 500: "var(--primary-500)",
55
+ 600: "var(--primary-600)",
56
+ 700: "var(--primary-700)",
57
+ 800: "var(--primary-800)",
58
+ 900: "var(--primary-900)",
59
+ },
60
+
61
+ // Gray Colors
62
+ gray: {
63
+ 25: "var(--gray-25)",
64
+ 50: "var(--gray-50)",
65
+ 100: "var(--gray-100)",
66
+ 200: "var(--gray-200)",
67
+ 300: "var(--gray-300)",
68
+ 400: "var(--gray-400)",
69
+ 500: "var(--gray-500)",
70
+ 600: "var(--gray-600)",
71
+ 700: "var(--gray-700)",
72
+ 800: "var(--gray-800)",
73
+ 900: "var(--gray-900)",
74
+ },
75
+
76
+ // Error Colors
77
+ error: {
78
+ 25: "var(--error-25)",
79
+ 50: "var(--error-50)",
80
+ 100: "var(--error-100)",
81
+ 200: "var(--error-200)",
82
+ 300: "var(--error-300)",
83
+ 400: "var(--error-400)",
84
+ 500: "var(--error-500)",
85
+ 600: "var(--error-600)",
86
+ 700: "var(--error-700)",
87
+ 800: "var(--error-800)",
88
+ 900: "var(--error-900)",
89
+ },
90
+
91
+ // Warning Colors
92
+ warning: {
93
+ 25: "var(--warning-25)",
94
+ 50: "var(--warning-50)",
95
+ 100: "var(--warning-100)",
96
+ 200: "var(--warning-200)",
97
+ 300: "var(--warning-300)",
98
+ 400: "var(--warning-400)",
99
+ 500: "var(--warning-500)",
100
+ 600: "var(--warning-600)",
101
+ 700: "var(--warning-700)",
102
+ 800: "var(--warning-800)",
103
+ 900: "var(--warning-900)",
104
+ },
105
+
106
+ // Success Colors
107
+ success: {
108
+ 25: "var(--success-25)",
109
+ 50: "var(--success-50)",
110
+ 100: "var(--success-100)",
111
+ 200: "var(--success-200)",
112
+ 300: "var(--success-300)",
113
+ 400: "var(--success-400)",
114
+ 500: "var(--success-500)",
115
+ 600: "var(--success-600)",
116
+ 700: "var(--success-700)",
117
+ 800: "var(--success-800)",
118
+ 900: "var(--success-900)",
119
+ },
120
+
121
+ bluegray: {
122
+ 25: "#fcfcfd",
123
+ 50: "#f8f9fc",
124
+ 100: "#eaecf5",
125
+ 200: "#d5d9eb",
126
+ 300: "#afb5d9",
127
+ 400: "#717bbc",
128
+ 500: "#4e5ba6",
129
+ 600: "#3e4784",
130
+ 700: "#363f72",
131
+ 800: "#293056",
132
+ 900: "#101323",
133
+ },
134
+
135
+ bluelight: {
136
+ 25: "#f5fbff",
137
+ 50: "#f0f9ff",
138
+ 100: "#e0f2fe",
139
+ 200: "#b9e6fe",
140
+ 300: "#7cd4fd",
141
+ 400: "#36bffa",
142
+ 500: "#0ba5ec",
143
+ 600: "#0086c9",
144
+ 700: "#026aa2",
145
+ 800: "#065986",
146
+ 900: "#0b4a6f",
147
+ },
148
+
149
+ indigo: {
150
+ 25: "#f5f8ff",
151
+ 50: "#eef4ff",
152
+ 100: "#e0eaff",
153
+ 200: "#c7d7fe",
154
+ 300: "#a4bcfd",
155
+ 400: "#8098f9",
156
+ 500: "#6172f3",
157
+ 600: "#444ce7",
158
+ 700: "#3538cd",
159
+ 800: "#2d31a6",
160
+ 900: "#2d3282",
161
+ },
162
+
163
+ purple: {
164
+ 25: "#fafaff",
165
+ 50: "#f4f3ff",
166
+ 100: "#ebe9fe",
167
+ 200: "#d9d6fe",
168
+ 300: "#bdb4fe",
169
+ 400: "#9b8afb",
170
+ 500: "#7a5af8",
171
+ 600: "#6938ef",
172
+ 700: "#5925dc",
173
+ 800: "#4a1fb8",
174
+ 900: "#3e1c96",
175
+ },
176
+
177
+ violet: {
178
+ 25: "#fcfaff",
179
+ 50: "#f9f5ff",
180
+ 100: "#f4ebff",
181
+ 200: "#e9d7fe",
182
+ 300: "#d6bbfb",
183
+ 400: "#b692f6",
184
+ 500: "#9e77ed",
185
+ 600: "#7f56d9",
186
+ 700: "#6941c6",
187
+ 800: "#53389e",
188
+ 900: "#42307d",
189
+ },
190
+
191
+ pink: {
192
+ 25: "#fef6fb",
193
+ 50: "#fdf2fa",
194
+ 100: "#fce7f6",
195
+ 200: "#fcceee",
196
+ 300: "#faa7e0",
197
+ 400: "#f670c7",
198
+ 500: "#ee46bc",
199
+ 600: "#dd2590",
200
+ 700: "#c11574",
201
+ 800: "#9e165f",
202
+ 900: "#851651",
203
+ },
204
+
205
+ rose: {
206
+ 25: " #fff5f6",
207
+ 50: "#fff1f3",
208
+ 100: "#ffe4e8",
209
+ 200: "#fecdd6",
210
+ 300: "#fea3b4",
211
+ 400: "#fd6f8e",
212
+ 500: "#f63d68",
213
+ 600: "#e31b54",
214
+ 700: "#c01048",
215
+ 800: "#a11043",
216
+ 900: "#89123e",
217
+ },
218
+
219
+ orange: {
220
+ 25: "#fffaf5",
221
+ 50: "#fff6ed",
222
+ 100: "#ffead5",
223
+ 200: "#fddcab",
224
+ 300: "#feb273",
225
+ 400: "#fd853a",
226
+ 500: "#fb6514",
227
+ 600: "#ec4a0a",
228
+ 700: "#c4320a",
229
+ 800: "#9c2a10",
230
+ 900: "#7e2410",
231
+ },
232
+ },
233
+ fontSize: {
234
+ "display-2xl": "4.5rem", // 72px
235
+ "display-xl": "3.75rem", // 60px
236
+ "display-lg": "3rem", // 48px
237
+ "display-md": "2.25rem", // 36px
238
+ "display-sm": "1.875rem", // 30px
239
+ "display-xs": "1.5rem", // 24px
240
+ "text-xl": "1.25rem", // 20px
241
+ "text-lg": "1.125rem", // 18px
242
+ "text-md": "1rem", // 16px
243
+ "text-sm": "0.875rem", // 14px
244
+ "text-xs": "0.75rem", // 12px
245
+ },
246
+ fontWeight: {
247
+ regular: "400",
248
+ medium: "500",
249
+ semibold: "600",
250
+ bold: "700",
251
+ },
252
+ boxShadow: {
253
+ sm: "0px 1px 2px 0px rgba(16, 24, 40, 0.06), 0px 1px 3px 0px rgba(16, 24, 40, 0.1)",
254
+ md: "1px 2px 12px 0px rgba(112, 112, 112, 0.25)",
255
+ lg: "0px 4px 12px 0px rgba(16, 24, 40, 0.25)",
256
+ table: "inset -3px 0px 0px 0px #EAECF0",
257
+ },
258
+ animation: {
259
+ "slide-in-top": "slide-in-top 0.5s ease forwards",
260
+ "slide-in-right": "slide-in-right 0.5s ease forwards",
261
+ "spin-slow": "spin-slow 1.5s linear infinite",
262
+ },
263
+ keyframes: {
264
+ "slide-in-top": {
265
+ from: {
266
+ transform: "translateY(-100%)",
267
+ },
268
+ to: {
269
+ transform: "translateY(0)",
270
+ },
271
+ },
272
+ "slide-in-right": {
273
+ from: {
274
+ transform: "translateX(100%)",
275
+ },
276
+ to: {
277
+ transform: "translateX(0)",
278
+ },
279
+ },
280
+ "spin-slow": {
281
+ from: {
282
+ transform: "rotate(0deg)",
283
+ },
284
+ to: {
285
+ transform: "rotate(360deg)",
286
+ },
287
+ },
288
+ },
289
+ },
290
+ },
291
+
292
+ ```
293
+
294
+ ## Step 5: Define Global Styles
295
+
296
+ Add the following CSS to your `global.css` file to define the theme variables and styles:
297
+
298
+ ```css
299
+ @layer base {
300
+ :root {
301
+ /* Theme Primary Colors */
302
+ .theme-primary {
303
+ --primary-25: #f5faff;
304
+ --primary-50: #eff8ff;
305
+ --primary-100: #d1e9ff;
306
+ --primary-200: #b2ddff;
307
+ --primary-300: #84caff;
308
+ --primary-400: #53b1fd;
309
+ --primary-500: #2e90fa;
310
+ --primary-600: #1570ef;
311
+ --primary-700: #175cd3;
312
+ --primary-800: #1849a9;
313
+ --primary-900: #194185;
314
+ }
315
+
316
+ /* Gray Colors */
317
+ --gray-25: #fff;
318
+ --gray-50: #f9fafb;
319
+ --gray-100: #f2f4f7;
320
+ --gray-200: #eaecf0;
321
+ --gray-300: #d0d5dd;
322
+ --gray-400: #98a2b3;
323
+ --gray-500: #667085;
324
+ --gray-600: #475467;
325
+ --gray-700: #344054;
326
+ --gray-800: #1d2939;
327
+ --gray-900: #101828;
328
+
329
+ /* Error Colors */
330
+ --error-25: #fffbfa;
331
+ --error-50: #fef3f2;
332
+ --error-100: #fee4e2;
333
+ --error-200: #fecdca;
334
+ --error-300: #fda29b;
335
+ --error-400: #f97066;
336
+ --error-500: #f04438;
337
+ --error-600: #d92d20;
338
+ --error-700: #b42318;
339
+ --error-800: #912018;
340
+ --error-900: #7a271a;
341
+
342
+ /* Warning Colors */
343
+ --warning-25: #fffdf5;
344
+ --warning-50: #fffaeb;
345
+ --warning-100: #fef0c7;
346
+ --warning-200: #fedf89;
347
+ --warning-300: #fec84b;
348
+ --warning-400: #fdb022;
349
+ --warning-500: #f79009;
350
+ --warning-600: #dc6803;
351
+ --warning-700: #b54708;
352
+ --warning-800: #93370d;
353
+ --warning-900: #7a2e0e;
354
+
355
+ /* Success Colors */
356
+ --success-25: #f6fef9;
357
+ --success-50: #ecfdf3;
358
+ --success-100: #d1fadf;
359
+ --success-200: #a6f4c5;
360
+ --success-300: #6ce9a6;
361
+ --success-400: #32d583;
362
+ --success-500: #12b76a;
363
+ --success-600: #039855;
364
+ --success-700: #027a48;
365
+ --success-800: #05603a;
366
+ --success-900: #054f31;
367
+ }
368
+ /* RDP Styles */
369
+ .rdp {
370
+ --rdp-cell-size: 28px;
371
+ --rdp-caption-font-size: 15px;
372
+ }
373
+ }
374
+ ```
375
+
376
+ ## Step 6: Usage
377
+
378
+ With the library set up, you can start using the provided components. Below are examples of how to implement the Button and Chip components.
379
+
380
+ ### Import Components
381
+
382
+ Import the required components from the `@atomos_tech/genesis` package:
383
+
384
+ ```typescript
385
+ import { Button, Chip } from "@atomos_tech/genesis";
386
+ ```
387
+
388
+ ### Example Usage
389
+
390
+ Here is how you can integrate the Button and Chip into your page:
391
+
392
+ ```typescript
393
+ <Button variant="filled" intent="primary">
394
+ Primary
395
+ </Button>
396
+ <Chip intent="primary" size="lg">
397
+ Primary
398
+ </Chip>
399
+ ```
400
+
401
+ ## Example Page
402
+
403
+ Here's an example of how you might set up a simple page using the library:
404
+
405
+ ```typescript
406
+ import { Button, Chip } from "@atomos_tech/genesis";
407
+
408
+ export default function ExamplePage() {
409
+ return (
410
+ <div className="theme-brand p-4">
411
+ <h1 className="text-2xl font-bold mb-4">Atomos Genesis Example</h1>
412
+ <div className="mb-4">
413
+ <Button variant="filled" intent="primary">
414
+ Primary Button
415
+ </Button>
416
+ </div>
417
+ <div>
418
+ <Chip intent="primary" size="lg">
419
+ Primary Chip
420
+ </Chip>
421
+ </div>
422
+ </div>
423
+ );
424
+ }
425
+ ```
426
+
427
+ ## Adding Interactivity
428
+
429
+ You can enhance the user experience by adding more interactive components and styles. Here's an example with a form and some interactive elements:
430
+
431
+ ```typescript
432
+ import { Button, Chip } from "@atomos_tech/genesis";
433
+ import { useState } from "react";
434
+
435
+ export default function InteractivePage() {
436
+ const [buttonClicked, setButtonClicked] = useState(false);
437
+
438
+ return (
439
+ <div className="theme-brand p-4">
440
+ <h1 className="text-2xl font-bold mb-4">
441
+ Interactive Atomos Genesis Example
442
+ </h1>
443
+
444
+ <div className="mb-4">
445
+ <Button
446
+ variant="filled"
447
+ intent="primary"
448
+ onClick={() => setButtonClicked(!buttonClicked)}
449
+ >
450
+ {buttonClicked ? "Clicked!" : "Click Me"}
451
+ </Button>
452
+ </div>
453
+
454
+ <div className="mb-4">
455
+ <Chip intent="primary" size="lg">
456
+ {buttonClicked ? "Active Chip" : "Inactive Chip"}
457
+ </Chip>
458
+ </div>
459
+ </div>
460
+ );
461
+ }
462
+ ```
463
+
464
+ These instructions will help you effectively integrate and utilize the `@atomos_tech/genesis` library in your web applications, providing a consistent and visually appealing user interface.