@kengic/uni 0.3.2-beta.13 → 0.3.2-beta.15
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/dist/uni/uni-ui/index.ts +62 -60
- package/dist/uni/uni-ui/uni-col/uni-col.vue +1 -1
- package/dist/uni/uni-ui/uni-row/uni-row.vue +2 -2
- package/dist/uni/uni-ui/uni-scss/changelog.md +8 -8
- package/dist/uni/uni-ui/uni-scss/index.scss +1 -1
- package/dist/uni/uni-ui/uni-scss/package.json +82 -82
- package/dist/uni/uni-ui/uni-scss/readme.md +3 -3
- package/dist/uni/uni-ui/uni-scss/styles/index.scss +7 -7
- package/dist/uni/uni-ui/uni-scss/styles/setting/_border.scss +2 -2
- package/dist/uni/uni-ui/uni-scss/styles/setting/_color.scss +66 -66
- package/dist/uni/uni-ui/uni-scss/styles/setting/_radius.scss +55 -55
- package/dist/uni/uni-ui/uni-scss/styles/setting/_space.scss +55 -55
- package/dist/uni/uni-ui/uni-scss/styles/setting/_styles.scss +167 -167
- package/dist/uni/uni-ui/uni-scss/styles/setting/_text.scss +24 -24
- package/dist/uni/uni-ui/uni-scss/styles/setting/_variables.scss +146 -146
- package/dist/uni/uni-ui/uni-scss/styles/tools/functions.scss +19 -19
- package/dist/uni/uni-ui/uni-scss/theme.scss +31 -31
- package/dist/uni/uni-ui/uni-scss/variables.scss +62 -62
- package/dist/uni/uni-ui/uni-swipe-action-item/uni-swipe-action-item.vue +1 -1
- package/package.json +3 -1
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
|
|
2
|
-
@mixin fn($space,$direction,$size,$n) {
|
|
3
|
-
@if $n {
|
|
4
|
-
#{$space}-#{$direction}: #{$size*$uni-space-root}px
|
|
5
|
-
} @else {
|
|
6
|
-
#{$space}-#{$direction}: #{-$size*$uni-space-root}px
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
@mixin get-styles($direction,$i,$space,$n){
|
|
10
|
-
@if $direction == t {
|
|
11
|
-
@include fn($space, top,$i,$n);
|
|
12
|
-
}
|
|
13
|
-
@if $direction == r {
|
|
14
|
-
@include fn($space, right,$i,$n);
|
|
15
|
-
}
|
|
16
|
-
@if $direction == b {
|
|
17
|
-
@include fn($space, bottom,$i,$n);
|
|
18
|
-
}
|
|
19
|
-
@if $direction == l {
|
|
20
|
-
@include fn($space, left,$i,$n);
|
|
21
|
-
}
|
|
22
|
-
@if $direction == x {
|
|
23
|
-
@include fn($space, left,$i,$n);
|
|
24
|
-
@include fn($space, right,$i,$n);
|
|
25
|
-
}
|
|
26
|
-
@if $direction == y {
|
|
27
|
-
@include fn($space, top,$i,$n);
|
|
28
|
-
@include fn($space, bottom,$i,$n);
|
|
29
|
-
}
|
|
30
|
-
@if $direction == a {
|
|
31
|
-
@if $n {
|
|
32
|
-
#{$space}:#{$i*$uni-space-root}px;
|
|
33
|
-
} @else {
|
|
34
|
-
#{$space}:#{-$i*$uni-space-root}px;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
@each $orientation in m,p {
|
|
40
|
-
$space: margin;
|
|
41
|
-
@if $orientation == m {
|
|
42
|
-
$space: margin;
|
|
43
|
-
} @else {
|
|
44
|
-
$space: padding;
|
|
45
|
-
}
|
|
46
|
-
@for $i from 0 through 16 {
|
|
47
|
-
@each $direction in t, r, b, l, x, y, a {
|
|
48
|
-
.uni-#{$orientation}#{$direction}-#{$i} {
|
|
49
|
-
@include get-styles($direction,$i,$space,true);
|
|
50
|
-
}
|
|
51
|
-
.uni-#{$orientation}#{$direction}-n#{$i} {
|
|
52
|
-
@include get-styles($direction,$i,$space,false);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
}
|
|
1
|
+
|
|
2
|
+
@mixin fn($space,$direction,$size,$n) {
|
|
3
|
+
@if $n {
|
|
4
|
+
#{$space}-#{$direction}: #{$size*$uni-space-root}px
|
|
5
|
+
} @else {
|
|
6
|
+
#{$space}-#{$direction}: #{-$size*$uni-space-root}px
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
@mixin get-styles($direction,$i,$space,$n){
|
|
10
|
+
@if $direction == t {
|
|
11
|
+
@include fn($space, top,$i,$n);
|
|
12
|
+
}
|
|
13
|
+
@if $direction == r {
|
|
14
|
+
@include fn($space, right,$i,$n);
|
|
15
|
+
}
|
|
16
|
+
@if $direction == b {
|
|
17
|
+
@include fn($space, bottom,$i,$n);
|
|
18
|
+
}
|
|
19
|
+
@if $direction == l {
|
|
20
|
+
@include fn($space, left,$i,$n);
|
|
21
|
+
}
|
|
22
|
+
@if $direction == x {
|
|
23
|
+
@include fn($space, left,$i,$n);
|
|
24
|
+
@include fn($space, right,$i,$n);
|
|
25
|
+
}
|
|
26
|
+
@if $direction == y {
|
|
27
|
+
@include fn($space, top,$i,$n);
|
|
28
|
+
@include fn($space, bottom,$i,$n);
|
|
29
|
+
}
|
|
30
|
+
@if $direction == a {
|
|
31
|
+
@if $n {
|
|
32
|
+
#{$space}:#{$i*$uni-space-root}px;
|
|
33
|
+
} @else {
|
|
34
|
+
#{$space}:#{-$i*$uni-space-root}px;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
@each $orientation in m,p {
|
|
40
|
+
$space: margin;
|
|
41
|
+
@if $orientation == m {
|
|
42
|
+
$space: margin;
|
|
43
|
+
} @else {
|
|
44
|
+
$space: padding;
|
|
45
|
+
}
|
|
46
|
+
@for $i from 0 through 16 {
|
|
47
|
+
@each $direction in t, r, b, l, x, y, a {
|
|
48
|
+
.uni-#{$orientation}#{$direction}-#{$i} {
|
|
49
|
+
@include get-styles($direction,$i,$space,true);
|
|
50
|
+
}
|
|
51
|
+
.uni-#{$orientation}#{$direction}-n#{$i} {
|
|
52
|
+
@include get-styles($direction,$i,$space,false);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
56
|
}
|
|
@@ -1,167 +1,167 @@
|
|
|
1
|
-
/* #ifndef APP-NVUE */
|
|
2
|
-
|
|
3
|
-
$-color-white:#fff;
|
|
4
|
-
$-color-black:#000;
|
|
5
|
-
@mixin base-style($color) {
|
|
6
|
-
color: #fff;
|
|
7
|
-
background-color: $color;
|
|
8
|
-
border-color: mix($-color-black, $color, 8%);
|
|
9
|
-
&:not([hover-class]):active {
|
|
10
|
-
background: mix($-color-black, $color, 10%);
|
|
11
|
-
border-color: mix($-color-black, $color, 20%);
|
|
12
|
-
color: $-color-white;
|
|
13
|
-
outline: none;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
@mixin is-color($color) {
|
|
17
|
-
@include base-style($color);
|
|
18
|
-
&[loading] {
|
|
19
|
-
@include base-style($color);
|
|
20
|
-
&::before {
|
|
21
|
-
margin-right:5px;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
&[disabled] {
|
|
25
|
-
&,
|
|
26
|
-
&[loading],
|
|
27
|
-
&:not([hover-class]):active {
|
|
28
|
-
color: $-color-white;
|
|
29
|
-
border-color: mix(darken($color,10%), $-color-white);
|
|
30
|
-
background-color: mix($color, $-color-white);
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
}
|
|
35
|
-
@mixin base-plain-style($color) {
|
|
36
|
-
color:$color;
|
|
37
|
-
background-color: mix($-color-white, $color, 90%);
|
|
38
|
-
border-color: mix($-color-white, $color, 70%);
|
|
39
|
-
&:not([hover-class]):active {
|
|
40
|
-
background: mix($-color-white, $color, 80%);
|
|
41
|
-
color: $color;
|
|
42
|
-
outline: none;
|
|
43
|
-
border-color: mix($-color-white, $color, 50%);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
@mixin is-plain($color){
|
|
47
|
-
&[plain] {
|
|
48
|
-
@include base-plain-style($color);
|
|
49
|
-
&[loading] {
|
|
50
|
-
@include base-plain-style($color);
|
|
51
|
-
&::before {
|
|
52
|
-
margin-right:5px;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
&[disabled] {
|
|
56
|
-
&,
|
|
57
|
-
&:active {
|
|
58
|
-
color: mix($-color-white, $color, 40%);
|
|
59
|
-
background-color: mix($-color-white, $color, 90%);
|
|
60
|
-
border-color: mix($-color-white, $color, 80%);
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
.uni-btn {
|
|
68
|
-
margin: 5px;
|
|
69
|
-
color: #393939;
|
|
70
|
-
border:1px solid #ccc;
|
|
71
|
-
font-size: 16px;
|
|
72
|
-
font-weight: 200;
|
|
73
|
-
background-color: #F9F9F9;
|
|
74
|
-
// TODO 暂时处理边框隐藏一边的问题
|
|
75
|
-
overflow: visible;
|
|
76
|
-
&::after{
|
|
77
|
-
border: none;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
&:not([type]),&[type=default] {
|
|
81
|
-
color: #999;
|
|
82
|
-
&[loading] {
|
|
83
|
-
background: none;
|
|
84
|
-
&::before {
|
|
85
|
-
margin-right:5px;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
&[disabled]{
|
|
92
|
-
color: mix($-color-white, #999, 60%);
|
|
93
|
-
&,
|
|
94
|
-
&[loading],
|
|
95
|
-
&:active {
|
|
96
|
-
color: mix($-color-white, #999, 60%);
|
|
97
|
-
background-color: mix($-color-white,$-color-black , 98%);
|
|
98
|
-
border-color: mix($-color-white, #999, 85%);
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
&[plain] {
|
|
103
|
-
color: #999;
|
|
104
|
-
background: none;
|
|
105
|
-
border-color: $uni-border-1;
|
|
106
|
-
&:not([hover-class]):active {
|
|
107
|
-
background: none;
|
|
108
|
-
color: mix($-color-white, $-color-black, 80%);
|
|
109
|
-
border-color: mix($-color-white, $-color-black, 90%);
|
|
110
|
-
outline: none;
|
|
111
|
-
}
|
|
112
|
-
&[disabled]{
|
|
113
|
-
&,
|
|
114
|
-
&[loading],
|
|
115
|
-
&:active {
|
|
116
|
-
background: none;
|
|
117
|
-
color: mix($-color-white, #999, 60%);
|
|
118
|
-
border-color: mix($-color-white, #999, 85%);
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
&:not([hover-class]):active {
|
|
125
|
-
color: mix($-color-white, $-color-black, 50%);
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
&[size=mini] {
|
|
129
|
-
font-size: 16px;
|
|
130
|
-
font-weight: 200;
|
|
131
|
-
border-radius: 8px;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
&.uni-btn-small {
|
|
137
|
-
font-size: 14px;
|
|
138
|
-
}
|
|
139
|
-
&.uni-btn-mini {
|
|
140
|
-
font-size: 12px;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
&.uni-btn-radius {
|
|
144
|
-
border-radius: 999px;
|
|
145
|
-
}
|
|
146
|
-
&[type=primary] {
|
|
147
|
-
@include is-color($uni-primary);
|
|
148
|
-
@include is-plain($uni-primary)
|
|
149
|
-
}
|
|
150
|
-
&[type=success] {
|
|
151
|
-
@include is-color($uni-success);
|
|
152
|
-
@include is-plain($uni-success)
|
|
153
|
-
}
|
|
154
|
-
&[type=error] {
|
|
155
|
-
@include is-color($uni-error);
|
|
156
|
-
@include is-plain($uni-error)
|
|
157
|
-
}
|
|
158
|
-
&[type=warning] {
|
|
159
|
-
@include is-color($uni-warning);
|
|
160
|
-
@include is-plain($uni-warning)
|
|
161
|
-
}
|
|
162
|
-
&[type=info] {
|
|
163
|
-
@include is-color($uni-info);
|
|
164
|
-
@include is-plain($uni-info)
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
/* #endif */
|
|
1
|
+
/* #ifndef APP-NVUE */
|
|
2
|
+
|
|
3
|
+
$-color-white:#fff;
|
|
4
|
+
$-color-black:#000;
|
|
5
|
+
@mixin base-style($color) {
|
|
6
|
+
color: #fff;
|
|
7
|
+
background-color: $color;
|
|
8
|
+
border-color: mix($-color-black, $color, 8%);
|
|
9
|
+
&:not([hover-class]):active {
|
|
10
|
+
background: mix($-color-black, $color, 10%);
|
|
11
|
+
border-color: mix($-color-black, $color, 20%);
|
|
12
|
+
color: $-color-white;
|
|
13
|
+
outline: none;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
@mixin is-color($color) {
|
|
17
|
+
@include base-style($color);
|
|
18
|
+
&[loading] {
|
|
19
|
+
@include base-style($color);
|
|
20
|
+
&::before {
|
|
21
|
+
margin-right:5px;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
&[disabled] {
|
|
25
|
+
&,
|
|
26
|
+
&[loading],
|
|
27
|
+
&:not([hover-class]):active {
|
|
28
|
+
color: $-color-white;
|
|
29
|
+
border-color: mix(darken($color,10%), $-color-white);
|
|
30
|
+
background-color: mix($color, $-color-white);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
}
|
|
35
|
+
@mixin base-plain-style($color) {
|
|
36
|
+
color:$color;
|
|
37
|
+
background-color: mix($-color-white, $color, 90%);
|
|
38
|
+
border-color: mix($-color-white, $color, 70%);
|
|
39
|
+
&:not([hover-class]):active {
|
|
40
|
+
background: mix($-color-white, $color, 80%);
|
|
41
|
+
color: $color;
|
|
42
|
+
outline: none;
|
|
43
|
+
border-color: mix($-color-white, $color, 50%);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
@mixin is-plain($color){
|
|
47
|
+
&[plain] {
|
|
48
|
+
@include base-plain-style($color);
|
|
49
|
+
&[loading] {
|
|
50
|
+
@include base-plain-style($color);
|
|
51
|
+
&::before {
|
|
52
|
+
margin-right:5px;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
&[disabled] {
|
|
56
|
+
&,
|
|
57
|
+
&:active {
|
|
58
|
+
color: mix($-color-white, $color, 40%);
|
|
59
|
+
background-color: mix($-color-white, $color, 90%);
|
|
60
|
+
border-color: mix($-color-white, $color, 80%);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
.uni-btn {
|
|
68
|
+
margin: 5px;
|
|
69
|
+
color: #393939;
|
|
70
|
+
border:1px solid #ccc;
|
|
71
|
+
font-size: 16px;
|
|
72
|
+
font-weight: 200;
|
|
73
|
+
background-color: #F9F9F9;
|
|
74
|
+
// TODO 暂时处理边框隐藏一边的问题
|
|
75
|
+
overflow: visible;
|
|
76
|
+
&::after{
|
|
77
|
+
border: none;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
&:not([type]),&[type=default] {
|
|
81
|
+
color: #999;
|
|
82
|
+
&[loading] {
|
|
83
|
+
background: none;
|
|
84
|
+
&::before {
|
|
85
|
+
margin-right:5px;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
&[disabled]{
|
|
92
|
+
color: mix($-color-white, #999, 60%);
|
|
93
|
+
&,
|
|
94
|
+
&[loading],
|
|
95
|
+
&:active {
|
|
96
|
+
color: mix($-color-white, #999, 60%);
|
|
97
|
+
background-color: mix($-color-white,$-color-black , 98%);
|
|
98
|
+
border-color: mix($-color-white, #999, 85%);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
&[plain] {
|
|
103
|
+
color: #999;
|
|
104
|
+
background: none;
|
|
105
|
+
border-color: $uni-border-1;
|
|
106
|
+
&:not([hover-class]):active {
|
|
107
|
+
background: none;
|
|
108
|
+
color: mix($-color-white, $-color-black, 80%);
|
|
109
|
+
border-color: mix($-color-white, $-color-black, 90%);
|
|
110
|
+
outline: none;
|
|
111
|
+
}
|
|
112
|
+
&[disabled]{
|
|
113
|
+
&,
|
|
114
|
+
&[loading],
|
|
115
|
+
&:active {
|
|
116
|
+
background: none;
|
|
117
|
+
color: mix($-color-white, #999, 60%);
|
|
118
|
+
border-color: mix($-color-white, #999, 85%);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
&:not([hover-class]):active {
|
|
125
|
+
color: mix($-color-white, $-color-black, 50%);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
&[size=mini] {
|
|
129
|
+
font-size: 16px;
|
|
130
|
+
font-weight: 200;
|
|
131
|
+
border-radius: 8px;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
&.uni-btn-small {
|
|
137
|
+
font-size: 14px;
|
|
138
|
+
}
|
|
139
|
+
&.uni-btn-mini {
|
|
140
|
+
font-size: 12px;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
&.uni-btn-radius {
|
|
144
|
+
border-radius: 999px;
|
|
145
|
+
}
|
|
146
|
+
&[type=primary] {
|
|
147
|
+
@include is-color($uni-primary);
|
|
148
|
+
@include is-plain($uni-primary)
|
|
149
|
+
}
|
|
150
|
+
&[type=success] {
|
|
151
|
+
@include is-color($uni-success);
|
|
152
|
+
@include is-plain($uni-success)
|
|
153
|
+
}
|
|
154
|
+
&[type=error] {
|
|
155
|
+
@include is-color($uni-error);
|
|
156
|
+
@include is-plain($uni-error)
|
|
157
|
+
}
|
|
158
|
+
&[type=warning] {
|
|
159
|
+
@include is-color($uni-warning);
|
|
160
|
+
@include is-plain($uni-warning)
|
|
161
|
+
}
|
|
162
|
+
&[type=info] {
|
|
163
|
+
@include is-color($uni-info);
|
|
164
|
+
@include is-plain($uni-info)
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
/* #endif */
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
@mixin get-styles($k,$c) {
|
|
2
|
-
@if $k == size or $k == weight{
|
|
3
|
-
font-#{$k}:#{$c}
|
|
4
|
-
}@else{
|
|
5
|
-
#{$k}:#{$c}
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
@each $key, $child in $uni-headings {
|
|
10
|
-
/* #ifndef APP-NVUE */
|
|
11
|
-
.uni-#{$key} {
|
|
12
|
-
@each $k, $c in $child {
|
|
13
|
-
@include get-styles($k,$c)
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
/* #endif */
|
|
17
|
-
/* #ifdef APP-NVUE */
|
|
18
|
-
.container .uni-#{$key} {
|
|
19
|
-
@each $k, $c in $child {
|
|
20
|
-
@include get-styles($k,$c)
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
/* #endif */
|
|
24
|
-
}
|
|
1
|
+
@mixin get-styles($k,$c) {
|
|
2
|
+
@if $k == size or $k == weight{
|
|
3
|
+
font-#{$k}:#{$c}
|
|
4
|
+
}@else{
|
|
5
|
+
#{$k}:#{$c}
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
@each $key, $child in $uni-headings {
|
|
10
|
+
/* #ifndef APP-NVUE */
|
|
11
|
+
.uni-#{$key} {
|
|
12
|
+
@each $k, $c in $child {
|
|
13
|
+
@include get-styles($k,$c)
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
/* #endif */
|
|
17
|
+
/* #ifdef APP-NVUE */
|
|
18
|
+
.container .uni-#{$key} {
|
|
19
|
+
@each $k, $c in $child {
|
|
20
|
+
@include get-styles($k,$c)
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
/* #endif */
|
|
24
|
+
}
|