@nutui/nutui-react 2.0.0-alpha.1 → 2.0.0-alpha.2

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.
@@ -1,18 +1,9 @@
1
- .nut-theme-dark {
2
- .nut-badge {
3
- &.show {
4
- background: $dark4;
5
- color: $dark1;
6
- }
7
- }
8
- }
9
-
10
1
  .nut-badge {
11
2
  position: relative;
12
3
  display: inline-block;
13
4
  margin-right: 40px;
14
5
 
15
- .slot-icon {
6
+ &__icon {
16
7
  display: flex;
17
8
  position: absolute;
18
9
  background: $badge-background-color;
@@ -25,10 +16,10 @@
25
16
  z-index: $badge-z-index;
26
17
  }
27
18
 
28
- .sup {
19
+ &__sup {
29
20
  position: absolute;
30
21
  background: $badge-background-color;
31
- color: $badge-default-background-color;
22
+ color: $badge-color;
32
23
  padding: $badge-padding;
33
24
  font-size: $badge-font-size;
34
25
  font-weight: normal;
@@ -38,15 +29,15 @@
38
29
  border-radius: $badge-border-radius;
39
30
  }
40
31
 
41
- .nut-badge__content {
32
+ &__content {
42
33
  transform: $badge-content-transform;
43
34
  }
44
35
 
45
- .is-dot {
36
+ &__dot {
46
37
  width: $badge-dot-width;
47
- height: $badge-dot-height;
38
+ height: $badge-dot-width;
48
39
  border: $badge-border;
49
- border-radius: $badge-dot-border-radius;
50
- padding: $badge-dot-padding;
40
+ border-radius: $badge-dot-width;
41
+ padding: 0;
51
42
  }
52
43
  }
@@ -1,22 +1,3 @@
1
- .nut-theme-dark {
2
- .nut-elevator {
3
- background-color: $dark6;
4
- &__list {
5
- &__inner {
6
- background-color: $dark6;
7
- }
8
- &__item {
9
- color: $dark1;
10
- &__code {
11
- color: $dark1;
12
- }
13
- }
14
- &__fixed {
15
- background-color: $dark6;
16
- }
17
- }
18
- }
19
- }
20
1
  .nut-elevator {
21
2
  width: 100%;
22
3
  display: block;
@@ -48,15 +29,8 @@
48
29
  padding: $elevator-list-item-code-padding;
49
30
  font-weight: $elevator-list-item-code-font-weight;
50
31
  box-sizing: border-box;
51
- &::after {
52
- content: ' ';
53
- width: $elevator-list-item-code-after-width;
54
- height: $elevator-list-item-code-after-height;
55
- position: absolute;
56
- left: 0;
57
- bottom: 0;
58
- background-color: $elevator-list-item-code-after-bg-color;
59
- }
32
+ border-bottom: $elevator-list-item-code-border-bottom solid
33
+ $elevator-list-item-code-border-bottom-color;
60
34
  }
61
35
  &__name {
62
36
  display: flex;
@@ -1,16 +1,5 @@
1
1
  @import '../../styles/mixins/text-ellipsis.scss';
2
2
 
3
- .nut-theme-dark {
4
- .nut-menu {
5
- .nut-menu__bar {
6
- background-color: $dark6;
7
- .nut-menu__item {
8
- color: $gray6;
9
- }
10
- }
11
- }
12
- }
13
-
14
3
  .nut-menu {
15
4
  &.scroll-fixed {
16
5
  position: fixed;
@@ -18,58 +7,58 @@
18
7
  z-index: $menu-scroll-fixed-z-index;
19
8
  width: 100%;
20
9
  }
10
+ }
21
11
 
22
- .nut-menu-relative {
23
- position: relative;
24
- }
25
-
26
- .nut-menu__bar {
27
- position: relative;
28
- display: flex;
29
- line-height: $menu-bar-line-height;
30
- background-color: $white;
31
- box-shadow: $menu-bar-box-shadow;
12
+ .nut-menu-relative {
13
+ position: relative;
14
+ }
32
15
 
33
- &.opened {
34
- z-index: $menu-bar-opened-z-index;
35
- }
16
+ .nut-menu__bar {
17
+ position: relative;
18
+ display: flex;
19
+ line-height: $menu-bar-line-height;
20
+ background-color: $white;
21
+ box-shadow: $menu-bar-box-shadow;
36
22
 
37
- .nut-menu__item {
38
- flex: 1;
39
- text-align: center;
40
- font-size: $menu-item-font-size;
41
- color: $menu-item-text-color;
42
- min-width: 0;
23
+ &.opened {
24
+ z-index: $menu-bar-opened-z-index;
25
+ }
26
+ }
43
27
 
44
- &.active {
45
- color: $menu-item-active-text-color;
46
- }
28
+ .nut-menu__item {
29
+ flex: 1;
30
+ text-align: center;
31
+ font-size: $menu-item-font-size;
32
+ color: $menu-item-text-color;
33
+ min-width: 0;
47
34
 
48
- &.disabled {
49
- color: $menu-item-disabled-color;
50
- }
35
+ &.active {
36
+ color: $menu-item-active-text-color;
37
+ }
51
38
 
52
- .nut-menu__title-icon {
53
- transition: all 0.2s linear;
54
- }
39
+ &.disabled {
40
+ color: $menu-item-disabled-color;
41
+ }
42
+ }
55
43
 
56
- .nut-menu__title {
57
- display: flex;
58
- align-items: center;
59
- justify-content: center;
60
- max-width: 100%;
44
+ .nut-menu__title-icon {
45
+ transition: all 0.2s linear;
46
+ }
61
47
 
62
- .nut-menu__title-text {
63
- @include text-ellipsis;
64
- display: block;
65
- padding-left: $menu-title-text-padding-left;
66
- padding-right: $menu-title-text-padding-right;
67
- }
48
+ .nut-menu__title {
49
+ display: flex;
50
+ align-items: center;
51
+ justify-content: center;
52
+ max-width: 100%;
68
53
 
69
- &.active .nut-menu__title-icon {
70
- transform: rotate(180deg);
71
- }
72
- }
73
- }
54
+ &.active .nut-menu__title-icon {
55
+ transform: rotate(180deg);
74
56
  }
75
57
  }
58
+
59
+ .nut-menu__title-text {
60
+ @include text-ellipsis;
61
+ display: block;
62
+ padding-left: $menu-title-text-padding-left;
63
+ padding-right: $menu-title-text-padding-right;
64
+ }
@@ -1,14 +1,4 @@
1
1
 
2
- .nut-theme-dark {
3
- .nut-menu-item__content {
4
- background: $dark6;
5
-
6
- .nut-menu-item__option {
7
- color: $dark1;
8
- }
9
- }
10
- }
11
-
12
2
  .nut-menu-item__content {
13
3
  padding: $menu-item-content-padding;
14
4
  max-height: $menu-item-content-max-height;
@@ -22,25 +12,25 @@
22
12
  opacity: 0;
23
13
  position: fixed;
24
14
  }
15
+ }
25
16
 
26
- .nut-menu-item__option {
27
- color: $title-color;
28
- font-size: $font-size-2;
29
- padding-top: $menu-item-option-padding-top;
30
- padding-bottom: $menu-item-option-padding-bottom;
31
- display: flex;
32
- align-items: center;
17
+ .nut-menu-item__option {
18
+ color: $title-color;
19
+ font-size: $font-size-2;
20
+ padding-top: $menu-item-option-padding-top;
21
+ padding-bottom: $menu-item-option-padding-bottom;
22
+ display: flex;
23
+ align-items: center;
33
24
 
34
- &.active {
35
- font-weight: 500;
36
- color: $menu-item-active-text-color;
37
- }
25
+ &.active {
26
+ font-weight: 500;
27
+ color: $menu-item-active-text-color;
28
+ }
38
29
 
39
- i {
40
- margin-right: $menu-item-option-i-margin-right;
41
- display: inline-flex;
42
- align-items: center;
43
- }
30
+ i {
31
+ margin-right: $menu-item-option-i-margin-right;
32
+ display: inline-flex;
33
+ align-items: center;
44
34
  }
45
35
  }
46
36
 
@@ -1,36 +1,3 @@
1
- .nut-theme-dark {
2
- .nut-navbar {
3
- background: $dark5;
4
- color: $dark1;
5
- box-shadow: none;
6
-
7
- .title {
8
- color: $dark1;
9
- }
10
-
11
- &__left {
12
- color: $dark2;
13
-
14
- i {
15
- color: $dark2 !important;
16
- }
17
- }
18
-
19
- &__right {
20
- color: $dark1;
21
- }
22
-
23
- &--border {
24
- border-bottom: none;
25
- }
26
- }
27
-
28
- .nut-tabs__titles-item__text {
29
- background: $dark5;
30
- color: $dark1;
31
- }
32
- }
33
-
34
1
  .nut-navbar {
35
2
  width: $navbar-width;
36
3
  position: relative;
@@ -41,19 +8,11 @@
41
8
  padding: $navbar-padding;
42
9
  background: $navbar-background;
43
10
  box-shadow: $navbar-box-shadow;
44
- font-size: $navbar-title-base-font;
11
+ font-size: $navbar-font-size;
45
12
  color: $navbar-color;
46
13
  margin-bottom: $navbar-margin-bottom;
47
14
  overflow: hidden;
48
15
 
49
- &:active::before {
50
- opacity: 0.1;
51
- }
52
-
53
- &--border {
54
- border-bottom: 1px solid #eee;
55
- }
56
-
57
16
  &--fixed {
58
17
  position: fixed;
59
18
  top: 0;
@@ -71,29 +30,6 @@
71
30
  padding-top: env(safe-area-inset-top);
72
31
  }
73
32
 
74
- &--clickable {
75
- &::before {
76
- position: absolute;
77
- content: ' ';
78
- top: 50%;
79
- left: 50%;
80
- width: 100%;
81
- height: 100%;
82
- background-color: $black;
83
- border: inherit;
84
- border-color: $black;
85
- border-radius: inherit;
86
- transform: translate(-50%, -50%);
87
- opacity: 0;
88
- }
89
- }
90
-
91
- .nutui-iconfont {
92
- .nut-icon-left {
93
- text-align: left;
94
- }
95
- }
96
-
97
33
  &__title {
98
34
  min-width: 53%;
99
35
  margin: 0 auto;
@@ -101,35 +37,9 @@
101
37
  display: flex;
102
38
  align-items: center;
103
39
  justify-content: center;
104
-
105
- .title {
106
- min-width: $navbar-title-width;
107
- font-size: $navbar-title-font;
108
- font-weight: $navbar-title-font-weight;
109
- color: $navbar-title-font-color;
110
- display: -webkit-box;
111
- -webkit-box-orient: vertical;
112
- -webkit-line-clamp: 1;
113
- overflow: hidden;
114
- }
115
-
116
- &.icon {
117
- .icon {
118
- margin: $navbar-title-icon-margin;
119
- }
120
- }
121
-
122
- .nut-icon {
123
- display: inline;
124
- }
125
-
126
- &-description {
127
- font-size: $cell-description-font-size;
128
- }
129
-
130
- .text__title {
131
- display: inline-block;
132
- }
40
+ font-size: $navbar-title-font-size;
41
+ font-weight: $navbar-title-font-weight;
42
+ color: $navbar-title-font-color;
133
43
 
134
44
  .nut-tabs__titles {
135
45
  background: $white;
@@ -148,11 +58,9 @@
148
58
  display: none;
149
59
  }
150
60
 
151
- &__left {
152
- font-size: $cell-extra-font-size;
153
- color: $gray2;
61
+ &__left,
62
+ &__right {
154
63
  position: absolute;
155
- left: 0;
156
64
  top: 0;
157
65
  bottom: 0;
158
66
  display: flex;
@@ -161,24 +69,17 @@
161
69
  padding: 0 16px;
162
70
  }
163
71
 
164
- &__right {
165
- font-size: $cell-extra-font-size;
166
- color: $gray2;
167
- position: absolute;
168
- right: 0;
169
- top: 0;
170
- bottom: 0;
171
- display: flex;
172
- align-items: center;
173
- padding: 0 16px;
174
- cursor: pointer;
175
-
176
- .rightIcon {
177
- margin-left: 16px;
72
+ &__left {
73
+ left: 0;
74
+ &__back {
75
+ display: flex;
76
+ align-items: center;
77
+ justify-content: center;
78
+ margin-right: 10px;
178
79
  }
80
+ }
179
81
 
180
- .leftIcon {
181
- margin-left: 16px;
182
- }
82
+ &__right {
83
+ right: 0;
183
84
  }
184
85
  }
@@ -1,30 +1,14 @@
1
- .nut-theme-dark {
2
- .nut-progress {
3
- &-text {
4
- .nut-icon-checked {
5
- color: rgba(38, 191, 38, 1) !important;
6
- }
7
- }
8
- }
9
- }
10
-
11
1
  .nut-progress {
12
2
  display: flex;
13
3
  align-items: center;
14
4
  position: relative;
15
5
  width: 100%;
16
6
 
17
- .nut-progress-text {
18
- color: $progress-text-color;
19
- }
20
-
21
7
  &-outer {
22
8
  flex: auto;
23
9
  border-radius: $progress-border-radius;
24
-
25
- .nut-progress-text {
26
- color: $progress-text-inner-color;
27
- }
10
+ height: $progress-height;
11
+ background: $progress-background;
28
12
 
29
13
  .nut-progress-active:before {
30
14
  content: '';
@@ -38,33 +22,6 @@
38
22
  }
39
23
  }
40
24
 
41
- &-small {
42
- height: $progress-small-height;
43
-
44
- .nut-progress-text {
45
- font-size: $progress-small-font-size;
46
- padding: $progress-small-padding;
47
- }
48
- }
49
-
50
- &-base {
51
- height: $progress-base-height;
52
-
53
- .nut-progress-text {
54
- font-size: $progress-base-font-size;
55
- padding: $progress-base-padding;
56
- }
57
- }
58
-
59
- &-large {
60
- height: $progress-large-height;
61
-
62
- .nut-progress-text {
63
- font-size: $progress-large-font-size;
64
- padding: $progress-large-padding;
65
- }
66
- }
67
-
68
25
  &-inner {
69
26
  height: 100%;
70
27
  display: flex;
@@ -72,26 +29,30 @@
72
29
  justify-content: center;
73
30
  transition: all 0.4s;
74
31
  border-radius: $progress-border-radius;
32
+ background: $progress-color;
75
33
  }
76
34
 
77
35
  &-text {
78
- display: flex;
79
- padding: $progress-text-padding;
80
- font-size: $progress-text-font-size;
81
- line-height: 1;
82
- min-width: 35px;
83
- }
84
-
85
- &-insidetext {
86
- position: absolute;
87
- top: $progress-insidetext-position-top;
88
- bottom: $progress-insidetext-position-bottom;
89
36
  display: flex;
90
37
  align-items: center;
91
- min-width: 0px;
38
+ position: absolute;
39
+ top: $progress-text-position-top;
40
+ bottom: $progress-text-position-bottom;
92
41
  transition: all 0.4s;
93
42
  transform: translate(-50%);
94
- border-radius: $progress-insidetext-border-radius;
43
+
44
+ &__inner {
45
+ display: flex;
46
+ align-items: center;
47
+ height: 100%;
48
+ width: 100%;
49
+ color: $progress-text-color;
50
+ padding: $progress-text-padding;
51
+ border-radius: $progress-text-border-radius;
52
+ font-size: $progress-text-font-size;
53
+ line-height: 1;
54
+ background: $progress-text-background;
55
+ }
95
56
  }
96
57
 
97
58
  @keyframes progressActive {