@arco-design/mobile-react 2.38.2 → 2.38.3

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 (45) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.en-US.md +2 -2
  3. package/README.md +2 -2
  4. package/cjs/action-sheet/index.d.ts +11 -10
  5. package/cjs/action-sheet/index.js +6 -2
  6. package/cjs/action-sheet/methods.d.ts +2 -2
  7. package/cjs/cell/cell.d.ts +1 -1
  8. package/cjs/cell/cell.js +36 -7
  9. package/cjs/cell/style/css/index.css +46 -16
  10. package/cjs/cell/style/index.less +52 -11
  11. package/cjs/cell/type.d.ts +8 -1
  12. package/dist/index.js +42 -9
  13. package/dist/index.min.js +1 -1
  14. package/dist/style.css +33 -8
  15. package/dist/style.min.css +1 -1
  16. package/esm/action-sheet/index.d.ts +11 -10
  17. package/esm/action-sheet/index.js +6 -2
  18. package/esm/action-sheet/methods.d.ts +2 -2
  19. package/esm/cell/cell.d.ts +1 -1
  20. package/esm/cell/cell.js +37 -8
  21. package/esm/cell/style/css/index.css +46 -16
  22. package/esm/cell/style/index.less +52 -11
  23. package/esm/cell/type.d.ts +8 -1
  24. package/esnext/action-sheet/index.d.ts +11 -10
  25. package/esnext/action-sheet/index.js +7 -3
  26. package/esnext/action-sheet/methods.d.ts +2 -2
  27. package/esnext/cell/cell.d.ts +1 -1
  28. package/esnext/cell/cell.js +19 -3
  29. package/esnext/cell/style/css/index.css +46 -16
  30. package/esnext/cell/style/index.less +52 -11
  31. package/esnext/cell/type.d.ts +8 -1
  32. package/package.json +3 -3
  33. package/tokens/app/arcodesign/default/css-variables.less +2 -0
  34. package/tokens/app/arcodesign/default/index.d.ts +2 -0
  35. package/tokens/app/arcodesign/default/index.js +2 -0
  36. package/tokens/app/arcodesign/default/index.json +20 -0
  37. package/tokens/app/arcodesign/default/index.less +2 -0
  38. package/umd/action-sheet/index.d.ts +11 -10
  39. package/umd/action-sheet/index.js +6 -2
  40. package/umd/action-sheet/methods.d.ts +2 -2
  41. package/umd/cell/cell.d.ts +1 -1
  42. package/umd/cell/cell.js +36 -7
  43. package/umd/cell/style/css/index.css +46 -16
  44. package/umd/cell/style/index.less +52 -11
  45. package/umd/cell/type.d.ts +8 -1
@@ -569,16 +569,40 @@
569
569
  border-radius: 0;
570
570
  }
571
571
  }
572
- .arco-cell.without-group {
572
+ .arco-cell-clickable {
573
+ -webkit-user-select: none;
574
+ user-select: none;
575
+ -webkit-tap-highlight-color: transparent;
576
+ -webkit-touch-callout: none;
577
+ touch-action: manipulation;
578
+ position: relative;
579
+ }
580
+ .arco-cell-clickable.arco-cell-pressed {
581
+ background-color: #F7F8FA ;
582
+ }
583
+ .arco-cell-clickable::after {
584
+ content: '';
585
+ position: absolute;
586
+ top: 0;
587
+ right: 100%;
588
+ width: 0.32rem ;
589
+ height: 100%;
590
+ background-color: inherit;
591
+ pointer-events: none;
592
+ }
593
+ .arco-cell-clickable.arco-cell-pressed::after {
594
+ background-color: #F7F8FA ;
595
+ }
596
+ .arco-cell-without-group {
573
597
  background-color: #FFFFFF ;
574
598
  padding-left: 0.32rem ;
575
599
  margin-left: 0;
576
600
  }
577
- .arco-cell.without-group.bordered {
601
+ .arco-cell-without-group.bordered {
578
602
  position: relative;
579
603
  border-width: 0;
580
604
  }
581
- .arco-cell.without-group.bordered::before {
605
+ .arco-cell-without-group.bordered::before {
582
606
  content: '';
583
607
  width: 100%;
584
608
  height: 1PX;
@@ -596,20 +620,20 @@
596
620
  border-radius: 0;
597
621
  }
598
622
  @media (-webkit-min-device-pixel-ratio: 2), (min-device-pixel-ratio: 2) {
599
- .arco-cell.without-group.bordered::before {
623
+ .arco-cell-without-group.bordered::before {
600
624
  transform: scaleY(0.5);
601
625
  -webkit-transform: scaleY(0.5);
602
626
  border-radius: 0;
603
627
  }
604
628
  }
605
629
  @media (-webkit-min-device-pixel-ratio: 3), (min-device-pixel-ratio: 3) {
606
- .arco-cell.without-group.bordered::before {
630
+ .arco-cell-without-group.bordered::before {
607
631
  transform: scaleY(0.33333333);
608
632
  -webkit-transform: scaleY(0.33333333);
609
633
  border-radius: 0;
610
634
  }
611
635
  }
612
- .arco-cell.without-group.bordered::after {
636
+ .arco-cell-without-group.bordered::after {
613
637
  content: '';
614
638
  width: 100%;
615
639
  height: 1PX;
@@ -627,14 +651,14 @@
627
651
  border-radius: 0;
628
652
  }
629
653
  @media (-webkit-min-device-pixel-ratio: 2), (min-device-pixel-ratio: 2) {
630
- .arco-cell.without-group.bordered::after {
654
+ .arco-cell-without-group.bordered::after {
631
655
  transform: scaleY(0.5);
632
656
  -webkit-transform: scaleY(0.5);
633
657
  border-radius: 0;
634
658
  }
635
659
  }
636
660
  @media (-webkit-min-device-pixel-ratio: 3), (min-device-pixel-ratio: 3) {
637
- .arco-cell.without-group.bordered::after {
661
+ .arco-cell-without-group.bordered::after {
638
662
  transform: scaleY(0.33333333);
639
663
  -webkit-transform: scaleY(0.33333333);
640
664
  border-radius: 0;
@@ -866,14 +890,20 @@
866
890
  border-radius: 0;
867
891
  }
868
892
  }
869
- .arco-theme-dark .arco-cell.without-group {
893
+ .arco-theme-dark .arco-cell-clickable.arco-cell-pressed {
894
+ background-color: hsla(0, 0%, 100%, 0.08) ;
895
+ }
896
+ .arco-theme-dark .arco-cell-clickable.arco-cell-pressed::after {
897
+ background-color: hsla(0, 0%, 100%, 0.08) ;
898
+ }
899
+ .arco-theme-dark .arco-cell-without-group {
870
900
  background-color: #232324 ;
871
901
  }
872
- .arco-theme-dark .arco-cell.without-group.bordered {
902
+ .arco-theme-dark .arco-cell-without-group.bordered {
873
903
  position: relative;
874
904
  border-width: 0;
875
905
  }
876
- .arco-theme-dark .arco-cell.without-group.bordered::before {
906
+ .arco-theme-dark .arco-cell-without-group.bordered::before {
877
907
  content: '';
878
908
  width: 100%;
879
909
  height: 1PX;
@@ -891,20 +921,20 @@
891
921
  border-radius: 0;
892
922
  }
893
923
  @media (-webkit-min-device-pixel-ratio: 2), (min-device-pixel-ratio: 2) {
894
- .arco-theme-dark .arco-cell.without-group.bordered::before {
924
+ .arco-theme-dark .arco-cell-without-group.bordered::before {
895
925
  transform: scaleY(0.5);
896
926
  -webkit-transform: scaleY(0.5);
897
927
  border-radius: 0;
898
928
  }
899
929
  }
900
930
  @media (-webkit-min-device-pixel-ratio: 3), (min-device-pixel-ratio: 3) {
901
- .arco-theme-dark .arco-cell.without-group.bordered::before {
931
+ .arco-theme-dark .arco-cell-without-group.bordered::before {
902
932
  transform: scaleY(0.33333333);
903
933
  -webkit-transform: scaleY(0.33333333);
904
934
  border-radius: 0;
905
935
  }
906
936
  }
907
- .arco-theme-dark .arco-cell.without-group.bordered::after {
937
+ .arco-theme-dark .arco-cell-without-group.bordered::after {
908
938
  content: '';
909
939
  width: 100%;
910
940
  height: 1PX;
@@ -922,14 +952,14 @@
922
952
  border-radius: 0;
923
953
  }
924
954
  @media (-webkit-min-device-pixel-ratio: 2), (min-device-pixel-ratio: 2) {
925
- .arco-theme-dark .arco-cell.without-group.bordered::after {
955
+ .arco-theme-dark .arco-cell-without-group.bordered::after {
926
956
  transform: scaleY(0.5);
927
957
  -webkit-transform: scaleY(0.5);
928
958
  border-radius: 0;
929
959
  }
930
960
  }
931
961
  @media (-webkit-min-device-pixel-ratio: 3), (min-device-pixel-ratio: 3) {
932
- .arco-theme-dark .arco-cell.without-group.bordered::after {
962
+ .arco-theme-dark .arco-cell-without-group.bordered::after {
933
963
  transform: scaleY(0.33333333);
934
964
  -webkit-transform: scaleY(0.33333333);
935
965
  border-radius: 0;
@@ -10,15 +10,42 @@
10
10
  .onepx-border-var(top, line-color);
11
11
  }
12
12
 
13
- &.without-group {
13
+ &-clickable {
14
+ user-select: none;
15
+ -webkit-tap-highlight-color: transparent;
16
+ -webkit-touch-callout: none;
17
+ touch-action: manipulation;
18
+ position: relative;
19
+
20
+ &.@{prefix}-cell-pressed {
21
+ .use-var(background-color, cell-clickable-background-color);
22
+ }
23
+
24
+ &::after {
25
+ content: '';
26
+ position: absolute;
27
+ top: 0;
28
+ right: 100%;
29
+ .use-var(width, cell-horizontal-padding);
30
+ height: 100%;
31
+ background-color: inherit;
32
+ pointer-events: none;
33
+ }
34
+
35
+ &.@{prefix}-cell-pressed::after {
36
+ .use-var(background-color, cell-clickable-background-color);
37
+ }
38
+ }
39
+
40
+ &-without-group {
14
41
  .use-var(background-color, cell-background-color);
15
42
  .use-var(padding-left, cell-horizontal-padding);
16
43
  margin-left: 0;
44
+ }
17
45
 
18
- &.bordered {
19
- .onepx-border-var(top, line-color);
20
- .onepx-border-var(bottom, line-color);
21
- }
46
+ &-without-group.bordered {
47
+ .onepx-border-var(top, line-color);
48
+ .onepx-border-var(bottom, line-color);
22
49
  }
23
50
 
24
51
  &-inner {
@@ -63,6 +90,7 @@
63
90
  .cell-label-icon {
64
91
  .use-var-with-rtl(margin-right, cell-label-icon-gutter);
65
92
  font-size: 0;
93
+
66
94
  .@{prefix}-icon {
67
95
  line-height: initial;
68
96
  .use-var(font-size, cell-label-icon-font-size);
@@ -76,6 +104,7 @@
76
104
  });
77
105
  .use-var-with-rtl(margin-left, cell-arrow-gutter);
78
106
  font-size: 0;
107
+
79
108
  .@{prefix}-icon {
80
109
  .use-var(font-size, cell-arrow-font-size);
81
110
  .use-var(color, cell-arrow-color);
@@ -148,17 +177,29 @@
148
177
  .onepx-border-var(top, dark-line-color);
149
178
  }
150
179
  }
151
- &.without-group {
152
- @{arco-dark-mode-selector} & {
153
- .use-var(background-color, dark-cell-background-color);
180
+ &-clickable {
181
+ &.@{prefix}-cell-pressed {
182
+ @{arco-dark-mode-selector} & {
183
+ .use-var(background-color, dark-cell-clickable-background-color);
184
+ }
154
185
  }
155
- &.bordered {
186
+ &.@{prefix}-cell-pressed::after {
156
187
  @{arco-dark-mode-selector} & {
157
- .onepx-border-var(top, dark-line-color);
158
- .onepx-border-var(bottom, dark-line-color);
188
+ .use-var(background-color, dark-cell-clickable-background-color);
159
189
  }
160
190
  }
161
191
  }
192
+ &-without-group {
193
+ @{arco-dark-mode-selector} & {
194
+ .use-var(background-color, dark-cell-background-color);
195
+ }
196
+ }
197
+ &-without-group.bordered {
198
+ @{arco-dark-mode-selector} & {
199
+ .onepx-border-var(top, dark-line-color);
200
+ .onepx-border-var(bottom, dark-line-color);
201
+ }
202
+ }
162
203
  .cell-label {
163
204
  @{arco-dark-mode-selector} & {
164
205
  .use-var(color, dark-cell-label-color);
@@ -1,4 +1,5 @@
1
- import React, { ReactNode } from 'react';
1
+ import type { ReactNode } from 'react';
2
+ import type React from 'react';
2
3
  export interface CellProps {
3
4
  /**
4
5
  * 自定义样式
@@ -60,6 +61,12 @@ export interface CellProps {
60
61
  * @default true
61
62
  */
62
63
  bordered?: boolean;
64
+ /**
65
+ * 是否启用点击态效果
66
+ * @en Whether to enable click effect
67
+ * @default false
68
+ */
69
+ clickable?: boolean;
63
70
  /**
64
71
  * 点击单元格事件回调
65
72
  * @en Callback for cell click event