arco-clone-react 1.3.0 → 1.3.1

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 (3) hide show
  1. package/README.md +27 -13
  2. package/dist/index.css +241 -241
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
  [![TypeScript](https://img.shields.io/badge/TypeScript-5.7-blue.svg)](https://www.typescriptlang.org/)
6
6
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
7
7
 
8
- # ⚠️ This is just a proof of concept, its purpose is to showcase my design-system implementation/tooling skills, not really intended to be used in production.
8
+ ## ⚠️ This is just a proof of concept, not really intended to be used in production.
9
9
 
10
10
  A React component library and design system built with TypeScript and CSS Modules (using figma tokens, based on [Arco Design system](https://www.figma.com/community/file/1053233047330321743/arco-design-system) )
11
11
  Test reports are automatically generated and deployed for every pull request.
@@ -24,8 +24,8 @@ Test reports are automatically generated and deployed for every pull request.
24
24
 
25
25
  ## ~~Installation~~
26
26
 
27
-
28
27
  🚨 to be configured later.
28
+
29
29
  ```bash
30
30
  npm install design-system-poc
31
31
  ```
@@ -61,16 +61,27 @@ This will automatically load the Nunito Sans font from Google Fonts and apply th
61
61
  If you prefer to manage fonts yourself, add this to your HTML `<head>`:
62
62
 
63
63
  ```html
64
- <link rel="preconnect" href="https://fonts.googleapis.com">
65
- <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
66
- <link href="https://fonts.googleapis.com/css2?family=Nunito+Sans:ital,opsz,wght@0,6..12,200..1000;1,6..12,200..1000&display=swap" rel="stylesheet">
64
+ <link rel="preconnect" href="https://fonts.googleapis.com" />
65
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
66
+ <link
67
+ href="https://fonts.googleapis.com/css2?family=Nunito+Sans:ital,opsz,wght@0,6..12,200..1000;1,6..12,200..1000&display=swap"
68
+ rel="stylesheet"
69
+ />
67
70
  ```
68
71
 
69
72
  Then set the font family in your CSS:
70
73
 
71
74
  ```css
72
75
  body {
73
- font-family: 'Nunito Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
76
+ font-family:
77
+ 'Nunito Sans',
78
+ -apple-system,
79
+ BlinkMacSystemFont,
80
+ 'Segoe UI',
81
+ Roboto,
82
+ 'Helvetica Neue',
83
+ Arial,
84
+ sans-serif;
74
85
  }
75
86
  ```
76
87
 
@@ -196,13 +207,13 @@ This project uses [Conventional Commits](https://www.conventionalcommits.org/):
196
207
 
197
208
  Every pull request and push to `main` triggers automated checks:
198
209
 
199
- | Job | Description | Artifacts |
200
- |-----|-------------|-----------|
201
- | **Lint** | ESLint checks for code quality | - |
202
- | **Type Check** | TypeScript compilation and type safety | - |
203
- | **Test** | Unit tests with Vitest + Storybook tests | Test results, coverage |
204
- | **Visual Regression** | Playwright screenshot comparison | Visual diffs, HTML report |
205
- | **Build** | Library and Storybook build verification | Build output |
210
+ | Job | Description | Artifacts |
211
+ | --------------------- | ---------------------------------------- | ------------------------- |
212
+ | **Lint** | ESLint checks for code quality | - |
213
+ | **Type Check** | TypeScript compilation and type safety | - |
214
+ | **Test** | Unit tests with Vitest + Storybook tests | Test results, coverage |
215
+ | **Visual Regression** | Playwright screenshot comparison | Visual diffs, HTML report |
216
+ | **Build** | Library and Storybook build verification | Build output |
206
217
 
207
218
  ### Pull Request Workflow
208
219
 
@@ -215,15 +226,18 @@ Every pull request and push to `main` triggers automated checks:
215
226
  ### Viewing Test Results
216
227
 
217
228
  **Option 1: GitHub Actions UI**
229
+
218
230
  1. Go to the "Actions" tab in GitHub
219
231
  2. Click on the workflow run for your PR
220
232
  3. Download artifacts (visual-regression-results, test-results, build-output)
221
233
 
222
234
  **Option 2: PR Comments**
235
+
223
236
  - Visual regression results are automatically commented on PRs
224
237
  - Includes links to artifacts and instructions for updating snapshots
225
238
 
226
239
  **Option 3: Local Testing**
240
+
227
241
  ```bash
228
242
  # Run all checks locally before pushing
229
243
  npm run lint
package/dist/index.css CHANGED
@@ -1,90 +1,3 @@
1
- /* src/components/Stack/Stack.module.css */
2
- /**
3
- * Stack Component Styles
4
- * One-directional flex container with consistent spacing
5
- */
6
-
7
- .stack {
8
- display: flex;
9
- gap: var(--stack-spacing, 16px);
10
- }
11
-
12
- /* Direction */
13
- .stack--vertical {
14
- flex-direction: column;
15
- }
16
-
17
- .stack--horizontal {
18
- flex-direction: row;
19
- }
20
-
21
- /* Wrap */
22
- .stack--wrap {
23
- flex-wrap: wrap;
24
- }
25
-
26
- /* Alignment */
27
- .stack--align-start {
28
- align-items: start;
29
- }
30
-
31
- .stack--align-center {
32
- align-items: center;
33
- }
34
-
35
- .stack--align-end {
36
- align-items: end;
37
- }
38
-
39
- .stack--align-stretch {
40
- align-items: stretch;
41
- }
42
-
43
- .stack--align-baseline {
44
- align-items: baseline;
45
- }
46
-
47
- /* Justify */
48
- .stack--justify-start {
49
- justify-content: start;
50
- }
51
-
52
- .stack--justify-center {
53
- justify-content: center;
54
- }
55
-
56
- .stack--justify-end {
57
- justify-content: end;
58
- }
59
-
60
- .stack--justify-space-between {
61
- justify-content: space-between;
62
- }
63
-
64
- .stack--justify-space-around {
65
- justify-content: space-around;
66
- }
67
-
68
- .stack--justify-space-evenly {
69
- justify-content: space-evenly;
70
- }
71
-
72
- /* Divider */
73
- .stackDivider {
74
- flex-shrink: 0;
75
- }
76
-
77
- .stack--vertical .stackDivider {
78
- width: 100%;
79
- height: 1px;
80
- }
81
-
82
- .stack--horizontal .stackDivider {
83
- width: 1px;
84
- height: 100%;
85
- }
86
-
87
-
88
1
  /* src/components/Tabs/Tabs.module.css */
89
2
  /* Tabs Component Styles */
90
3
 
@@ -270,6 +183,93 @@
270
183
  }
271
184
 
272
185
 
186
+ /* src/components/Stack/Stack.module.css */
187
+ /**
188
+ * Stack Component Styles
189
+ * One-directional flex container with consistent spacing
190
+ */
191
+
192
+ .stack {
193
+ display: flex;
194
+ gap: var(--stack-spacing, 16px);
195
+ }
196
+
197
+ /* Direction */
198
+ .stack--vertical {
199
+ flex-direction: column;
200
+ }
201
+
202
+ .stack--horizontal {
203
+ flex-direction: row;
204
+ }
205
+
206
+ /* Wrap */
207
+ .stack--wrap {
208
+ flex-wrap: wrap;
209
+ }
210
+
211
+ /* Alignment */
212
+ .stack--align-start {
213
+ align-items: start;
214
+ }
215
+
216
+ .stack--align-center {
217
+ align-items: center;
218
+ }
219
+
220
+ .stack--align-end {
221
+ align-items: end;
222
+ }
223
+
224
+ .stack--align-stretch {
225
+ align-items: stretch;
226
+ }
227
+
228
+ .stack--align-baseline {
229
+ align-items: baseline;
230
+ }
231
+
232
+ /* Justify */
233
+ .stack--justify-start {
234
+ justify-content: start;
235
+ }
236
+
237
+ .stack--justify-center {
238
+ justify-content: center;
239
+ }
240
+
241
+ .stack--justify-end {
242
+ justify-content: end;
243
+ }
244
+
245
+ .stack--justify-space-between {
246
+ justify-content: space-between;
247
+ }
248
+
249
+ .stack--justify-space-around {
250
+ justify-content: space-around;
251
+ }
252
+
253
+ .stack--justify-space-evenly {
254
+ justify-content: space-evenly;
255
+ }
256
+
257
+ /* Divider */
258
+ .stackDivider {
259
+ flex-shrink: 0;
260
+ }
261
+
262
+ .stack--vertical .stackDivider {
263
+ width: 100%;
264
+ height: 1px;
265
+ }
266
+
267
+ .stack--horizontal .stackDivider {
268
+ width: 1px;
269
+ height: 100%;
270
+ }
271
+
272
+
273
273
  /* src/components/Inline/Inline.module.css */
274
274
  /**
275
275
  * Inline Component Styles
@@ -496,139 +496,65 @@
496
496
  }
497
497
 
498
498
 
499
- /* src/components/Collapse/Collapse.module.css */
499
+ /* src/components/Container/Container.module.css */
500
500
  /**
501
- * Collapse Component Styles
502
- *
503
- * Styling for Collapse component with smooth animations.
501
+ * Container Component Styles
502
+ * Responsive container with max-widths at each breakpoint
504
503
  */
505
504
 
506
- .collapse {
507
- display: block;
508
- background-color: #ffffff;
509
- overflow: hidden;
510
- }
511
-
512
- .bordered {
513
- border: 1px solid #e5e6eb;
514
- border-radius: 4px;
515
- }
516
-
517
- .disabled {
518
- opacity: 0.6;
519
- cursor: not-allowed;
520
- }
521
-
522
- /* Header */
523
- .header {
524
- display: flex;
525
- align-items: center;
526
- gap: 8px;
527
- cursor: pointer;
528
- user-select: none;
529
- transition: background-color 0.2s ease;
530
- font-family:
531
- 'Nunito Sans',
532
- -apple-system,
533
- BlinkMacSystemFont,
534
- 'Segoe UI',
535
- Roboto,
536
- sans-serif;
537
- font-weight: 600;
538
- color: #1d2129;
539
- }
540
-
541
- .header:hover:not(.disabled .header) {
542
- background-color: #f7f8fa;
543
- }
544
-
545
- .header:focus-visible {
546
- outline: 2px solid #165dff;
547
- outline-offset: -2px;
548
- }
549
-
550
- .disabled .header {
551
- cursor: not-allowed;
552
- }
553
-
554
- /* Sizes */
555
- .small .header {
556
- padding: 8px 12px;
557
- font-size: 12px;
558
- }
559
-
560
- .medium .header {
561
- padding: 12px 16px;
562
- font-size: 14px;
563
- }
564
-
565
- .large .header {
566
- padding: 16px 20px;
567
- font-size: 16px;
568
- }
569
-
570
- /* Icon */
571
- .icon {
572
- display: inline-flex;
573
- align-items: center;
574
- justify-content: center;
575
- width: 16px;
576
- height: 16px;
577
- font-size: 10px;
578
- color: #86909c;
579
- transition: transform 0.3s ease;
580
- flex-shrink: 0;
581
- }
582
-
583
- .expanded .icon {
584
- transform: rotate(0deg);
505
+ .container {
506
+ width: 100%;
507
+ margin-left: auto;
508
+ margin-right: auto;
509
+ max-width: var(--container-max-width, 100%);
585
510
  }
586
511
 
587
- .header:not(.expanded) .icon {
588
- transform: rotate(-90deg);
512
+ /* Padded variant */
513
+ .container--padded {
514
+ padding-left: var(--container-padding, 16px);
515
+ padding-right: var(--container-padding, 16px);
589
516
  }
590
517
 
591
- /* Header content */
592
- .headerContent {
593
- flex: 1;
518
+ /* Fluid variant - no max-width */
519
+ .container--fluid {
520
+ max-width: none;
594
521
  }
595
522
 
596
- /* Content */
597
- .content {
598
- height: 0;
599
- overflow: hidden;
600
- transition: height 0.3s ease;
523
+ /* Responsive max-widths (when not fluid) */
524
+ @media (min-width: 576px) {
525
+ .container:not(.container--fluid) {
526
+ max-width: 540px;
527
+ }
601
528
  }
602
529
 
603
- .contentExpanded {
604
- overflow: visible;
530
+ @media (min-width: 768px) {
531
+ .container:not(.container--fluid) {
532
+ max-width: 720px;
533
+ }
605
534
  }
606
535
 
607
- .contentInner {
608
- padding: 0 16px 16px 16px;
609
- color: #4e5969;
610
- font-family:
611
- 'Nunito Sans',
612
- -apple-system,
613
- BlinkMacSystemFont,
614
- 'Segoe UI',
615
- Roboto,
616
- sans-serif;
536
+ @media (min-width: 992px) {
537
+ .container:not(.container--fluid) {
538
+ max-width: 960px;
539
+ }
617
540
  }
618
541
 
619
- .small .contentInner {
620
- padding: 0 12px 8px 12px;
621
- font-size: 12px;
542
+ @media (min-width: 1200px) {
543
+ .container:not(.container--fluid) {
544
+ max-width: 1152px;
545
+ }
622
546
  }
623
547
 
624
- .medium .contentInner {
625
- padding: 0 16px 12px 16px;
626
- font-size: 14px;
548
+ @media (min-width: 1600px) {
549
+ .container:not(.container--fluid) {
550
+ max-width: 1536px;
551
+ }
627
552
  }
628
553
 
629
- .large .contentInner {
630
- padding: 0 20px 16px 20px;
631
- font-size: 16px;
554
+ @media (min-width: 2000px) {
555
+ .container:not(.container--fluid) {
556
+ max-width: 1920px;
557
+ }
632
558
  }
633
559
 
634
560
 
@@ -1194,65 +1120,139 @@
1194
1120
  }
1195
1121
 
1196
1122
 
1197
- /* src/components/Container/Container.module.css */
1123
+ /* src/components/Collapse/Collapse.module.css */
1198
1124
  /**
1199
- * Container Component Styles
1200
- * Responsive container with max-widths at each breakpoint
1125
+ * Collapse Component Styles
1126
+ *
1127
+ * Styling for Collapse component with smooth animations.
1201
1128
  */
1202
1129
 
1203
- .container {
1204
- width: 100%;
1205
- margin-left: auto;
1206
- margin-right: auto;
1207
- max-width: var(--container-max-width, 100%);
1130
+ .collapse {
1131
+ display: block;
1132
+ background-color: #ffffff;
1133
+ overflow: hidden;
1208
1134
  }
1209
1135
 
1210
- /* Padded variant */
1211
- .container--padded {
1212
- padding-left: var(--container-padding, 16px);
1213
- padding-right: var(--container-padding, 16px);
1136
+ .bordered {
1137
+ border: 1px solid #e5e6eb;
1138
+ border-radius: 4px;
1214
1139
  }
1215
1140
 
1216
- /* Fluid variant - no max-width */
1217
- .container--fluid {
1218
- max-width: none;
1141
+ .disabled {
1142
+ opacity: 0.6;
1143
+ cursor: not-allowed;
1219
1144
  }
1220
1145
 
1221
- /* Responsive max-widths (when not fluid) */
1222
- @media (min-width: 576px) {
1223
- .container:not(.container--fluid) {
1224
- max-width: 540px;
1225
- }
1146
+ /* Header */
1147
+ .header {
1148
+ display: flex;
1149
+ align-items: center;
1150
+ gap: 8px;
1151
+ cursor: pointer;
1152
+ user-select: none;
1153
+ transition: background-color 0.2s ease;
1154
+ font-family:
1155
+ 'Nunito Sans',
1156
+ -apple-system,
1157
+ BlinkMacSystemFont,
1158
+ 'Segoe UI',
1159
+ Roboto,
1160
+ sans-serif;
1161
+ font-weight: 600;
1162
+ color: #1d2129;
1226
1163
  }
1227
1164
 
1228
- @media (min-width: 768px) {
1229
- .container:not(.container--fluid) {
1230
- max-width: 720px;
1231
- }
1165
+ .header:hover:not(.disabled .header) {
1166
+ background-color: #f7f8fa;
1232
1167
  }
1233
1168
 
1234
- @media (min-width: 992px) {
1235
- .container:not(.container--fluid) {
1236
- max-width: 960px;
1237
- }
1169
+ .header:focus-visible {
1170
+ outline: 2px solid #165dff;
1171
+ outline-offset: -2px;
1238
1172
  }
1239
1173
 
1240
- @media (min-width: 1200px) {
1241
- .container:not(.container--fluid) {
1242
- max-width: 1152px;
1243
- }
1174
+ .disabled .header {
1175
+ cursor: not-allowed;
1244
1176
  }
1245
1177
 
1246
- @media (min-width: 1600px) {
1247
- .container:not(.container--fluid) {
1248
- max-width: 1536px;
1249
- }
1178
+ /* Sizes */
1179
+ .small .header {
1180
+ padding: 8px 12px;
1181
+ font-size: 12px;
1250
1182
  }
1251
1183
 
1252
- @media (min-width: 2000px) {
1253
- .container:not(.container--fluid) {
1254
- max-width: 1920px;
1255
- }
1184
+ .medium .header {
1185
+ padding: 12px 16px;
1186
+ font-size: 14px;
1187
+ }
1188
+
1189
+ .large .header {
1190
+ padding: 16px 20px;
1191
+ font-size: 16px;
1192
+ }
1193
+
1194
+ /* Icon */
1195
+ .icon {
1196
+ display: inline-flex;
1197
+ align-items: center;
1198
+ justify-content: center;
1199
+ width: 16px;
1200
+ height: 16px;
1201
+ font-size: 10px;
1202
+ color: #86909c;
1203
+ transition: transform 0.3s ease;
1204
+ flex-shrink: 0;
1205
+ }
1206
+
1207
+ .expanded .icon {
1208
+ transform: rotate(0deg);
1209
+ }
1210
+
1211
+ .header:not(.expanded) .icon {
1212
+ transform: rotate(-90deg);
1213
+ }
1214
+
1215
+ /* Header content */
1216
+ .headerContent {
1217
+ flex: 1;
1218
+ }
1219
+
1220
+ /* Content */
1221
+ .content {
1222
+ height: 0;
1223
+ overflow: hidden;
1224
+ transition: height 0.3s ease;
1225
+ }
1226
+
1227
+ .contentExpanded {
1228
+ overflow: visible;
1229
+ }
1230
+
1231
+ .contentInner {
1232
+ padding: 0 16px 16px 16px;
1233
+ color: #4e5969;
1234
+ font-family:
1235
+ 'Nunito Sans',
1236
+ -apple-system,
1237
+ BlinkMacSystemFont,
1238
+ 'Segoe UI',
1239
+ Roboto,
1240
+ sans-serif;
1241
+ }
1242
+
1243
+ .small .contentInner {
1244
+ padding: 0 12px 8px 12px;
1245
+ font-size: 12px;
1246
+ }
1247
+
1248
+ .medium .contentInner {
1249
+ padding: 0 16px 12px 16px;
1250
+ font-size: 14px;
1251
+ }
1252
+
1253
+ .large .contentInner {
1254
+ padding: 0 20px 16px 20px;
1255
+ font-size: 16px;
1256
1256
  }
1257
1257
 
1258
1258
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "arco-clone-react",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "description": "A React component library and design system",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",