arco-clone-react 1.3.0 → 1.5.0

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 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.
@@ -22,12 +22,10 @@ Test reports are automatically generated and deployed for every pull request.
22
22
  - Semantic versioning with automated releases
23
23
  - GitHub Actions CI/CD pipeline
24
24
 
25
- ## ~~Installation~~
25
+ ## Installation
26
26
 
27
-
28
- 🚨 to be configured later.
29
27
  ```bash
30
- npm install design-system-poc
28
+ npm install arco-clone-react
31
29
  ```
32
30
 
33
31
  ## Usage
@@ -61,16 +59,27 @@ This will automatically load the Nunito Sans font from Google Fonts and apply th
61
59
  If you prefer to manage fonts yourself, add this to your HTML `<head>`:
62
60
 
63
61
  ```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">
62
+ <link rel="preconnect" href="https://fonts.googleapis.com" />
63
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
64
+ <link
65
+ href="https://fonts.googleapis.com/css2?family=Nunito+Sans:ital,opsz,wght@0,6..12,200..1000;1,6..12,200..1000&display=swap"
66
+ rel="stylesheet"
67
+ />
67
68
  ```
68
69
 
69
70
  Then set the font family in your CSS:
70
71
 
71
72
  ```css
72
73
  body {
73
- font-family: 'Nunito Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
74
+ font-family:
75
+ 'Nunito Sans',
76
+ -apple-system,
77
+ BlinkMacSystemFont,
78
+ 'Segoe UI',
79
+ Roboto,
80
+ 'Helvetica Neue',
81
+ Arial,
82
+ sans-serif;
74
83
  }
75
84
  ```
76
85
 
@@ -196,13 +205,13 @@ This project uses [Conventional Commits](https://www.conventionalcommits.org/):
196
205
 
197
206
  Every pull request and push to `main` triggers automated checks:
198
207
 
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 |
208
+ | Job | Description | Artifacts |
209
+ | --------------------- | ---------------------------------------- | ------------------------- |
210
+ | **Lint** | ESLint checks for code quality | - |
211
+ | **Type Check** | TypeScript compilation and type safety | - |
212
+ | **Test** | Unit tests with Vitest + Storybook tests | Test results, coverage |
213
+ | **Visual Regression** | Playwright screenshot comparison | Visual diffs, HTML report |
214
+ | **Build** | Library and Storybook build verification | Build output |
206
215
 
207
216
  ### Pull Request Workflow
208
217
 
@@ -215,15 +224,18 @@ Every pull request and push to `main` triggers automated checks:
215
224
  ### Viewing Test Results
216
225
 
217
226
  **Option 1: GitHub Actions UI**
227
+
218
228
  1. Go to the "Actions" tab in GitHub
219
229
  2. Click on the workflow run for your PR
220
230
  3. Download artifacts (visual-regression-results, test-results, build-output)
221
231
 
222
232
  **Option 2: PR Comments**
233
+
223
234
  - Visual regression results are automatically commented on PRs
224
235
  - Includes links to artifacts and instructions for updating snapshots
225
236
 
226
237
  **Option 3: Local Testing**
238
+
227
239
  ```bash
228
240
  # Run all checks locally before pushing
229
241
  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,6 +496,329 @@
496
496
  }
497
497
 
498
498
 
499
+ /* src/components/Drawer/Drawer.module.css */
500
+ /* Drawer Component Styles */
501
+
502
+ .drawerContainer {
503
+ position: fixed;
504
+ top: 0;
505
+ left: 0;
506
+ right: 0;
507
+ bottom: 0;
508
+ pointer-events: none;
509
+ }
510
+
511
+ .drawerContainer > * {
512
+ pointer-events: auto;
513
+ }
514
+
515
+ /* Overlay */
516
+ .overlay {
517
+ position: fixed;
518
+ top: 0;
519
+ left: 0;
520
+ right: 0;
521
+ bottom: 0;
522
+ background: rgba(0, 0, 0, 0.5);
523
+ animation: fadeIn 0.3s ease;
524
+ }
525
+
526
+ @keyframes fadeIn {
527
+ from {
528
+ opacity: 0;
529
+ }
530
+ to {
531
+ opacity: 1;
532
+ }
533
+ }
534
+
535
+ /* Drawer */
536
+ .drawer {
537
+ position: fixed;
538
+ background: var(--color-bg-white, #fff);
539
+ box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
540
+ display: flex;
541
+ flex-direction: column;
542
+ outline: none;
543
+ }
544
+
545
+ /* Placement: Right (default) */
546
+ .drawer.right {
547
+ top: 0;
548
+ right: 0;
549
+ bottom: 0;
550
+ animation: slideInRight 0.3s ease;
551
+ }
552
+
553
+ @keyframes slideInRight {
554
+ from {
555
+ transform: translateX(100%);
556
+ }
557
+ to {
558
+ transform: translateX(0);
559
+ }
560
+ }
561
+
562
+ /* Placement: Left */
563
+ .drawer.left {
564
+ top: 0;
565
+ left: 0;
566
+ bottom: 0;
567
+ animation: slideInLeft 0.3s ease;
568
+ }
569
+
570
+ @keyframes slideInLeft {
571
+ from {
572
+ transform: translateX(-100%);
573
+ }
574
+ to {
575
+ transform: translateX(0);
576
+ }
577
+ }
578
+
579
+ /* Placement: Top */
580
+ .drawer.top {
581
+ top: 0;
582
+ left: 0;
583
+ right: 0;
584
+ animation: slideInTop 0.3s ease;
585
+ }
586
+
587
+ @keyframes slideInTop {
588
+ from {
589
+ transform: translateY(-100%);
590
+ }
591
+ to {
592
+ transform: translateY(0);
593
+ }
594
+ }
595
+
596
+ /* Placement: Bottom */
597
+ .drawer.bottom {
598
+ bottom: 0;
599
+ left: 0;
600
+ right: 0;
601
+ animation: slideInBottom 0.3s ease;
602
+ }
603
+
604
+ @keyframes slideInBottom {
605
+ from {
606
+ transform: translateY(100%);
607
+ }
608
+ to {
609
+ transform: translateY(0);
610
+ }
611
+ }
612
+
613
+ /* Size: Small */
614
+ .drawer.right.small,
615
+ .drawer.left.small {
616
+ width: 320px;
617
+ }
618
+
619
+ .drawer.top.small,
620
+ .drawer.bottom.small {
621
+ height: 240px;
622
+ }
623
+
624
+ /* Size: Medium (default) */
625
+ .drawer.right.medium,
626
+ .drawer.left.medium {
627
+ width: 480px;
628
+ }
629
+
630
+ .drawer.top.medium,
631
+ .drawer.bottom.medium {
632
+ height: 360px;
633
+ }
634
+
635
+ /* Size: Large */
636
+ .drawer.right.large,
637
+ .drawer.left.large {
638
+ width: 640px;
639
+ }
640
+
641
+ .drawer.top.large,
642
+ .drawer.bottom.large {
643
+ height: 480px;
644
+ }
645
+
646
+ /* Size: Full */
647
+ .drawer.right.full,
648
+ .drawer.left.full {
649
+ width: 100%;
650
+ }
651
+
652
+ .drawer.top.full,
653
+ .drawer.bottom.full {
654
+ height: 100%;
655
+ }
656
+
657
+ /* Header */
658
+ .header {
659
+ display: flex;
660
+ align-items: center;
661
+ justify-content: space-between;
662
+ padding: 1.5rem;
663
+ border-bottom: 1px solid var(--color-border, #e0e0e0);
664
+ flex-shrink: 0;
665
+ }
666
+
667
+ .title {
668
+ margin: 0;
669
+ font-size: 1.25rem;
670
+ font-weight: 600;
671
+ color: var(--color-text-primary, #333);
672
+ }
673
+
674
+ .closeButton {
675
+ display: flex;
676
+ align-items: center;
677
+ justify-content: center;
678
+ padding: 0.5rem;
679
+ background: transparent;
680
+ border: none;
681
+ border-radius: 0.25rem;
682
+ cursor: pointer;
683
+ color: var(--color-text-secondary, #666);
684
+ transition: all 0.2s ease;
685
+ margin-left: auto;
686
+ }
687
+
688
+ .closeButton:hover {
689
+ background: var(--color-bg-hover, rgba(0, 0, 0, 0.04));
690
+ color: var(--color-text-primary, #333);
691
+ }
692
+
693
+ .closeButton:focus-visible {
694
+ outline: 2px solid var(--color-primary, #1890ff);
695
+ outline-offset: 2px;
696
+ }
697
+
698
+ .closeButton:active {
699
+ transform: scale(0.95);
700
+ }
701
+
702
+ /* Body */
703
+ .body {
704
+ flex: 1;
705
+ overflow-y: auto;
706
+ padding: 1.5rem;
707
+ }
708
+
709
+ /* Footer */
710
+ .footer {
711
+ padding: 1rem 1.5rem;
712
+ border-top: 1px solid var(--color-border, #e0e0e0);
713
+ flex-shrink: 0;
714
+ }
715
+
716
+ /* Responsive */
717
+ @media (max-width: 768px) {
718
+ .drawer.right.small,
719
+ .drawer.left.small,
720
+ .drawer.right.medium,
721
+ .drawer.left.medium {
722
+ width: 100%;
723
+ }
724
+
725
+ .drawer.top.small,
726
+ .drawer.bottom.small,
727
+ .drawer.top.medium,
728
+ .drawer.bottom.medium {
729
+ height: 80%;
730
+ }
731
+
732
+ .drawer.right.large,
733
+ .drawer.left.large {
734
+ width: 100%;
735
+ }
736
+
737
+ .drawer.top.large,
738
+ .drawer.bottom.large {
739
+ height: 90%;
740
+ }
741
+
742
+ .header {
743
+ padding: 1rem;
744
+ }
745
+
746
+ .body {
747
+ padding: 1rem;
748
+ }
749
+
750
+ .footer {
751
+ padding: 0.75rem 1rem;
752
+ }
753
+
754
+ .title {
755
+ font-size: 1.125rem;
756
+ }
757
+ }
758
+
759
+
760
+ /* src/components/Container/Container.module.css */
761
+ /**
762
+ * Container Component Styles
763
+ * Responsive container with max-widths at each breakpoint
764
+ */
765
+
766
+ .container {
767
+ width: 100%;
768
+ margin-left: auto;
769
+ margin-right: auto;
770
+ max-width: var(--container-max-width, 100%);
771
+ }
772
+
773
+ /* Padded variant */
774
+ .container--padded {
775
+ padding-left: var(--container-padding, 16px);
776
+ padding-right: var(--container-padding, 16px);
777
+ }
778
+
779
+ /* Fluid variant - no max-width */
780
+ .container--fluid {
781
+ max-width: none;
782
+ }
783
+
784
+ /* Responsive max-widths (when not fluid) */
785
+ @media (min-width: 576px) {
786
+ .container:not(.container--fluid) {
787
+ max-width: 540px;
788
+ }
789
+ }
790
+
791
+ @media (min-width: 768px) {
792
+ .container:not(.container--fluid) {
793
+ max-width: 720px;
794
+ }
795
+ }
796
+
797
+ @media (min-width: 992px) {
798
+ .container:not(.container--fluid) {
799
+ max-width: 960px;
800
+ }
801
+ }
802
+
803
+ @media (min-width: 1200px) {
804
+ .container:not(.container--fluid) {
805
+ max-width: 1152px;
806
+ }
807
+ }
808
+
809
+ @media (min-width: 1600px) {
810
+ .container:not(.container--fluid) {
811
+ max-width: 1536px;
812
+ }
813
+ }
814
+
815
+ @media (min-width: 2000px) {
816
+ .container:not(.container--fluid) {
817
+ max-width: 1920px;
818
+ }
819
+ }
820
+
821
+
499
822
  /* src/components/Collapse/Collapse.module.css */
500
823
  /**
501
824
  * Collapse Component Styles
@@ -1194,65 +1517,3 @@
1194
1517
  }
1195
1518
 
1196
1519
 
1197
- /* src/components/Container/Container.module.css */
1198
- /**
1199
- * Container Component Styles
1200
- * Responsive container with max-widths at each breakpoint
1201
- */
1202
-
1203
- .container {
1204
- width: 100%;
1205
- margin-left: auto;
1206
- margin-right: auto;
1207
- max-width: var(--container-max-width, 100%);
1208
- }
1209
-
1210
- /* Padded variant */
1211
- .container--padded {
1212
- padding-left: var(--container-padding, 16px);
1213
- padding-right: var(--container-padding, 16px);
1214
- }
1215
-
1216
- /* Fluid variant - no max-width */
1217
- .container--fluid {
1218
- max-width: none;
1219
- }
1220
-
1221
- /* Responsive max-widths (when not fluid) */
1222
- @media (min-width: 576px) {
1223
- .container:not(.container--fluid) {
1224
- max-width: 540px;
1225
- }
1226
- }
1227
-
1228
- @media (min-width: 768px) {
1229
- .container:not(.container--fluid) {
1230
- max-width: 720px;
1231
- }
1232
- }
1233
-
1234
- @media (min-width: 992px) {
1235
- .container:not(.container--fluid) {
1236
- max-width: 960px;
1237
- }
1238
- }
1239
-
1240
- @media (min-width: 1200px) {
1241
- .container:not(.container--fluid) {
1242
- max-width: 1152px;
1243
- }
1244
- }
1245
-
1246
- @media (min-width: 1600px) {
1247
- .container:not(.container--fluid) {
1248
- max-width: 1536px;
1249
- }
1250
- }
1251
-
1252
- @media (min-width: 2000px) {
1253
- .container:not(.container--fluid) {
1254
- max-width: 1920px;
1255
- }
1256
- }
1257
-
1258
-