@kengic/uni 0.3.2-beta.10
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 +1 -0
- package/dist/index.css +1 -0
- package/dist/kengic-uni.js +5 -0
- package/dist/src/consts/i18n/en.d.ts +45 -0
- package/dist/src/consts/i18n/index.d.ts +90 -0
- package/dist/src/consts/i18n/zh_CN.d.ts +45 -0
- package/dist/src/consts/index.d.ts +1 -0
- package/dist/src/index.d.ts +2 -0
- package/dist/src/utils/index.d.ts +1 -0
- package/dist/src/utils/kg.util.d.ts +5 -0
- package/dist/uni-ui/index.ts +11 -0
- package/dist/uni-ui/uni-badge/uni-badge.vue +253 -0
- package/dist/uni-ui/uni-breadcrumb/uni-breadcrumb.vue +41 -0
- package/dist/uni-ui/uni-breadcrumb-item/uni-breadcrumb-item.vue +121 -0
- package/dist/uni-ui/uni-calendar/calendar.js +546 -0
- package/dist/uni-ui/uni-calendar/i18n/en.json +12 -0
- package/dist/uni-ui/uni-calendar/i18n/index.js +8 -0
- package/dist/uni-ui/uni-calendar/i18n/zh-Hans.json +12 -0
- package/dist/uni-ui/uni-calendar/i18n/zh-Hant.json +12 -0
- package/dist/uni-ui/uni-calendar/uni-calendar-item.vue +187 -0
- package/dist/uni-ui/uni-calendar/uni-calendar.vue +566 -0
- package/dist/uni-ui/uni-calendar/util.js +360 -0
- package/dist/uni-ui/uni-card/uni-card.vue +281 -0
- package/dist/uni-ui/uni-col/uni-col.vue +317 -0
- package/dist/uni-ui/uni-collapse/uni-collapse.vue +147 -0
- package/dist/uni-ui/uni-collapse-item/uni-collapse-item.vue +402 -0
- package/dist/uni-ui/uni-combox/uni-combox.vue +294 -0
- package/dist/uni-ui/uni-countdown/i18n/en.json +6 -0
- package/dist/uni-ui/uni-countdown/i18n/index.js +8 -0
- package/dist/uni-ui/uni-countdown/i18n/zh-Hans.json +6 -0
- package/dist/uni-ui/uni-countdown/i18n/zh-Hant.json +6 -0
- package/dist/uni-ui/uni-countdown/uni-countdown.vue +267 -0
- package/dist/uni-ui/uni-data-checkbox/uni-data-checkbox.vue +821 -0
- package/dist/uni-ui/uni-data-picker/keypress.js +45 -0
- package/dist/uni-ui/uni-data-picker/uni-data-picker.vue +551 -0
- package/dist/uni-ui/uni-data-pickerview/uni-data-picker.js +622 -0
- package/dist/uni-ui/uni-data-pickerview/uni-data-pickerview.vue +323 -0
- package/dist/uni-ui/uni-data-select/uni-data-select.vue +517 -0
- package/dist/uni-ui/uni-dateformat/date-format.js +200 -0
- package/dist/uni-ui/uni-dateformat/uni-dateformat.vue +88 -0
- package/dist/uni-ui/uni-datetime-picker/calendar-item.vue +177 -0
- package/dist/uni-ui/uni-datetime-picker/calendar.vue +928 -0
- package/dist/uni-ui/uni-datetime-picker/i18n/en.json +22 -0
- package/dist/uni-ui/uni-datetime-picker/i18n/index.js +8 -0
- package/dist/uni-ui/uni-datetime-picker/i18n/zh-Hans.json +22 -0
- package/dist/uni-ui/uni-datetime-picker/i18n/zh-Hant.json +22 -0
- package/dist/uni-ui/uni-datetime-picker/time-picker.vue +934 -0
- package/dist/uni-ui/uni-datetime-picker/uni-datetime-picker.vue +1026 -0
- package/dist/uni-ui/uni-datetime-picker/util.js +403 -0
- package/dist/uni-ui/uni-drawer/keypress.js +45 -0
- package/dist/uni-ui/uni-drawer/uni-drawer.vue +181 -0
- package/dist/uni-ui/uni-easyinput/common.js +56 -0
- package/dist/uni-ui/uni-easyinput/uni-easyinput.vue +660 -0
- package/dist/uni-ui/uni-fab/uni-fab.vue +491 -0
- package/dist/uni-ui/uni-fav/i18n/en.json +4 -0
- package/dist/uni-ui/uni-fav/i18n/index.js +8 -0
- package/dist/uni-ui/uni-fav/i18n/zh-Hans.json +4 -0
- package/dist/uni-ui/uni-fav/i18n/zh-Hant.json +4 -0
- package/dist/uni-ui/uni-fav/uni-fav.vue +161 -0
- package/dist/uni-ui/uni-file-picker/choose-and-upload-file.js +224 -0
- package/dist/uni-ui/uni-file-picker/uni-file-picker.vue +667 -0
- package/dist/uni-ui/uni-file-picker/upload-file.vue +325 -0
- package/dist/uni-ui/uni-file-picker/upload-image.vue +292 -0
- package/dist/uni-ui/uni-file-picker/utils.js +109 -0
- package/dist/uni-ui/uni-forms/uni-forms.vue +398 -0
- package/dist/uni-ui/uni-forms/utils.js +293 -0
- package/dist/uni-ui/uni-forms/validate.js +486 -0
- package/dist/uni-ui/uni-forms-item/uni-forms-item.vue +601 -0
- package/dist/uni-ui/uni-goods-nav/i18n/en.json +6 -0
- package/dist/uni-ui/uni-goods-nav/i18n/index.js +8 -0
- package/dist/uni-ui/uni-goods-nav/i18n/zh-Hans.json +6 -0
- package/dist/uni-ui/uni-goods-nav/i18n/zh-Hant.json +6 -0
- package/dist/uni-ui/uni-goods-nav/uni-goods-nav.vue +229 -0
- package/dist/uni-ui/uni-grid/uni-grid.vue +143 -0
- package/dist/uni-ui/uni-grid-item/uni-grid-item.vue +129 -0
- package/dist/uni-ui/uni-group/uni-group.vue +134 -0
- package/dist/uni-ui/uni-icons/icons.js +1169 -0
- package/dist/uni-ui/uni-icons/uni-icons.vue +96 -0
- package/dist/uni-ui/uni-icons/uniicons.css +663 -0
- package/dist/uni-ui/uni-icons/uniicons.ttf +0 -0
- package/dist/uni-ui/uni-indexed-list/uni-indexed-list-item.vue +144 -0
- package/dist/uni-ui/uni-indexed-list/uni-indexed-list.vue +367 -0
- package/dist/uni-ui/uni-link/uni-link.vue +128 -0
- package/dist/uni-ui/uni-list/uni-list.vue +123 -0
- package/dist/uni-ui/uni-list/uni-refresh.vue +65 -0
- package/dist/uni-ui/uni-list/uni-refresh.wxs +87 -0
- package/dist/uni-ui/uni-list-ad/uni-list-ad.vue +107 -0
- package/dist/uni-ui/uni-list-chat/uni-list-chat.scss +58 -0
- package/dist/uni-ui/uni-list-chat/uni-list-chat.vue +593 -0
- package/dist/uni-ui/uni-list-item/uni-list-item.vue +534 -0
- package/dist/uni-ui/uni-load-more/i18n/en.json +5 -0
- package/dist/uni-ui/uni-load-more/i18n/index.js +8 -0
- package/dist/uni-ui/uni-load-more/i18n/zh-Hans.json +5 -0
- package/dist/uni-ui/uni-load-more/i18n/zh-Hant.json +5 -0
- package/dist/uni-ui/uni-load-more/uni-load-more.vue +399 -0
- package/dist/uni-ui/uni-nav-bar/uni-nav-bar.vue +357 -0
- package/dist/uni-ui/uni-nav-bar/uni-status-bar.vue +24 -0
- package/dist/uni-ui/uni-notice-bar/uni-notice-bar.vue +426 -0
- package/dist/uni-ui/uni-number-box/uni-number-box.vue +221 -0
- package/dist/uni-ui/uni-pagination/i18n/en.json +5 -0
- package/dist/uni-ui/uni-pagination/i18n/es.json +5 -0
- package/dist/uni-ui/uni-pagination/i18n/fr.json +5 -0
- package/dist/uni-ui/uni-pagination/i18n/index.js +12 -0
- package/dist/uni-ui/uni-pagination/i18n/zh-Hans.json +5 -0
- package/dist/uni-ui/uni-pagination/i18n/zh-Hant.json +5 -0
- package/dist/uni-ui/uni-pagination/uni-pagination.vue +465 -0
- package/dist/uni-ui/uni-popup/i18n/en.json +7 -0
- package/dist/uni-ui/uni-popup/i18n/index.js +9 -0
- package/dist/uni-ui/uni-popup/i18n/zh-Hans.json +7 -0
- package/dist/uni-ui/uni-popup/i18n/zh-Hant.json +7 -0
- package/dist/uni-ui/uni-popup/keypress.js +45 -0
- package/dist/uni-ui/uni-popup/popup.js +23 -0
- package/dist/uni-ui/uni-popup/uni-popup.vue +464 -0
- package/dist/uni-ui/uni-popup-dialog/keypress.js +45 -0
- package/dist/uni-ui/uni-popup-dialog/uni-popup-dialog.vue +275 -0
- package/dist/uni-ui/uni-popup-message/uni-popup-message.vue +143 -0
- package/dist/uni-ui/uni-popup-share/uni-popup-share.vue +187 -0
- package/dist/uni-ui/uni-rate/uni-rate.vue +365 -0
- package/dist/uni-ui/uni-row/uni-row.vue +190 -0
- package/dist/uni-ui/uni-scss/changelog.md +8 -0
- package/dist/uni-ui/uni-scss/index.scss +1 -0
- package/dist/uni-ui/uni-scss/package.json +82 -0
- package/dist/uni-ui/uni-scss/readme.md +4 -0
- package/dist/uni-ui/uni-scss/styles/index.scss +7 -0
- package/dist/uni-ui/uni-scss/styles/setting/_border.scss +3 -0
- package/dist/uni-ui/uni-scss/styles/setting/_color.scss +66 -0
- package/dist/uni-ui/uni-scss/styles/setting/_radius.scss +55 -0
- package/dist/uni-ui/uni-scss/styles/setting/_space.scss +56 -0
- package/dist/uni-ui/uni-scss/styles/setting/_styles.scss +167 -0
- package/dist/uni-ui/uni-scss/styles/setting/_text.scss +24 -0
- package/dist/uni-ui/uni-scss/styles/setting/_variables.scss +146 -0
- package/dist/uni-ui/uni-scss/styles/tools/functions.scss +19 -0
- package/dist/uni-ui/uni-scss/theme.scss +31 -0
- package/dist/uni-ui/uni-scss/variables.scss +62 -0
- package/dist/uni-ui/uni-search-bar/i18n/en.json +4 -0
- package/dist/uni-ui/uni-search-bar/i18n/index.js +8 -0
- package/dist/uni-ui/uni-search-bar/i18n/zh-Hans.json +4 -0
- package/dist/uni-ui/uni-search-bar/i18n/zh-Hant.json +4 -0
- package/dist/uni-ui/uni-search-bar/uni-search-bar.vue +298 -0
- package/dist/uni-ui/uni-section/uni-section.vue +167 -0
- package/dist/uni-ui/uni-segmented-control/uni-segmented-control.vue +145 -0
- package/dist/uni-ui/uni-steps/uni-steps.vue +269 -0
- package/dist/uni-ui/uni-swipe-action/uni-swipe-action.vue +60 -0
- package/dist/uni-ui/uni-swipe-action-item/bindingx.js +302 -0
- package/dist/uni-ui/uni-swipe-action-item/isPC.js +12 -0
- package/dist/uni-ui/uni-swipe-action-item/mpalipay.js +195 -0
- package/dist/uni-ui/uni-swipe-action-item/mpother.js +260 -0
- package/dist/uni-ui/uni-swipe-action-item/mpwxs.js +84 -0
- package/dist/uni-ui/uni-swipe-action-item/render.js +270 -0
- package/dist/uni-ui/uni-swipe-action-item/uni-swipe-action-item.vue +347 -0
- package/dist/uni-ui/uni-swipe-action-item/wx.wxs +341 -0
- package/dist/uni-ui/uni-swiper-dot/uni-swiper-dot.vue +218 -0
- package/dist/uni-ui/uni-table/uni-table.vue +455 -0
- package/dist/uni-ui/uni-tag/uni-tag.vue +252 -0
- package/dist/uni-ui/uni-tbody/uni-tbody.vue +29 -0
- package/dist/uni-ui/uni-td/uni-td.vue +90 -0
- package/dist/uni-ui/uni-th/filter-dropdown.vue +511 -0
- package/dist/uni-ui/uni-th/uni-th.vue +285 -0
- package/dist/uni-ui/uni-thead/uni-thead.vue +129 -0
- package/dist/uni-ui/uni-title/uni-title.vue +171 -0
- package/dist/uni-ui/uni-tooltip/uni-tooltip.vue +68 -0
- package/dist/uni-ui/uni-tr/table-checkbox.vue +179 -0
- package/dist/uni-ui/uni-tr/uni-tr.vue +171 -0
- package/dist/uni-ui/uni-transition/createAnimation.js +131 -0
- package/dist/uni-ui/uni-transition/uni-transition.vue +281 -0
- package/package.json +90 -0
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
|
|
2
|
+
// TODO 暂时不需要 class ,需要用户使用变量实现 ,如果使用类名其实并不推荐
|
|
3
|
+
// @mixin get-styles($k,$c) {
|
|
4
|
+
// @if $k == size or $k == weight{
|
|
5
|
+
// font-#{$k}:#{$c}
|
|
6
|
+
// }@else{
|
|
7
|
+
// #{$k}:#{$c}
|
|
8
|
+
// }
|
|
9
|
+
// }
|
|
10
|
+
$uni-ui-color:(
|
|
11
|
+
// 主色
|
|
12
|
+
primary: $uni-primary,
|
|
13
|
+
primary-disable: $uni-primary-disable,
|
|
14
|
+
primary-light: $uni-primary-light,
|
|
15
|
+
// 辅助色
|
|
16
|
+
success: $uni-success,
|
|
17
|
+
success-disable: $uni-success-disable,
|
|
18
|
+
success-light: $uni-success-light,
|
|
19
|
+
warning: $uni-warning,
|
|
20
|
+
warning-disable: $uni-warning-disable,
|
|
21
|
+
warning-light: $uni-warning-light,
|
|
22
|
+
error: $uni-error,
|
|
23
|
+
error-disable: $uni-error-disable,
|
|
24
|
+
error-light: $uni-error-light,
|
|
25
|
+
info: $uni-info,
|
|
26
|
+
info-disable: $uni-info-disable,
|
|
27
|
+
info-light: $uni-info-light,
|
|
28
|
+
// 中性色
|
|
29
|
+
main-color: $uni-main-color,
|
|
30
|
+
base-color: $uni-base-color,
|
|
31
|
+
secondary-color: $uni-secondary-color,
|
|
32
|
+
extra-color: $uni-extra-color,
|
|
33
|
+
// 背景色
|
|
34
|
+
bg-color: $uni-bg-color,
|
|
35
|
+
// 边框颜色
|
|
36
|
+
border-1: $uni-border-1,
|
|
37
|
+
border-2: $uni-border-2,
|
|
38
|
+
border-3: $uni-border-3,
|
|
39
|
+
border-4: $uni-border-4,
|
|
40
|
+
// 黑色
|
|
41
|
+
black:$uni-black,
|
|
42
|
+
// 白色
|
|
43
|
+
white:$uni-white,
|
|
44
|
+
// 透明
|
|
45
|
+
transparent:$uni-transparent
|
|
46
|
+
) !default;
|
|
47
|
+
@each $key, $child in $uni-ui-color {
|
|
48
|
+
.uni-#{"" + $key} {
|
|
49
|
+
color: $child;
|
|
50
|
+
}
|
|
51
|
+
.uni-#{"" + $key}-bg {
|
|
52
|
+
background-color: $child;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
.uni-shadow-sm {
|
|
56
|
+
box-shadow: $uni-shadow-sm;
|
|
57
|
+
}
|
|
58
|
+
.uni-shadow-base {
|
|
59
|
+
box-shadow: $uni-shadow-base;
|
|
60
|
+
}
|
|
61
|
+
.uni-shadow-lg {
|
|
62
|
+
box-shadow: $uni-shadow-lg;
|
|
63
|
+
}
|
|
64
|
+
.uni-mask {
|
|
65
|
+
background-color:$uni-mask;
|
|
66
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
@mixin radius($r,$d:null ,$important: false){
|
|
2
|
+
$radius-value:map-get($uni-radius, $r) if($important, !important, null);
|
|
3
|
+
// Key exists within the $uni-radius variable
|
|
4
|
+
@if (map-has-key($uni-radius, $r) and $d){
|
|
5
|
+
@if $d == t {
|
|
6
|
+
border-top-left-radius:$radius-value;
|
|
7
|
+
border-top-right-radius:$radius-value;
|
|
8
|
+
}@else if $d == r {
|
|
9
|
+
border-top-right-radius:$radius-value;
|
|
10
|
+
border-bottom-right-radius:$radius-value;
|
|
11
|
+
}@else if $d == b {
|
|
12
|
+
border-bottom-left-radius:$radius-value;
|
|
13
|
+
border-bottom-right-radius:$radius-value;
|
|
14
|
+
}@else if $d == l {
|
|
15
|
+
border-top-left-radius:$radius-value;
|
|
16
|
+
border-bottom-left-radius:$radius-value;
|
|
17
|
+
}@else if $d == tl {
|
|
18
|
+
border-top-left-radius:$radius-value;
|
|
19
|
+
}@else if $d == tr {
|
|
20
|
+
border-top-right-radius:$radius-value;
|
|
21
|
+
}@else if $d == br {
|
|
22
|
+
border-bottom-right-radius:$radius-value;
|
|
23
|
+
}@else if $d == bl {
|
|
24
|
+
border-bottom-left-radius:$radius-value;
|
|
25
|
+
}
|
|
26
|
+
}@else{
|
|
27
|
+
border-radius:$radius-value;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
@each $key, $child in $uni-radius {
|
|
32
|
+
@if($key){
|
|
33
|
+
.uni-radius-#{"" + $key} {
|
|
34
|
+
@include radius($key)
|
|
35
|
+
}
|
|
36
|
+
}@else{
|
|
37
|
+
.uni-radius {
|
|
38
|
+
@include radius($key)
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
@each $direction in t, r, b, l,tl, tr, br, bl {
|
|
44
|
+
@each $key, $child in $uni-radius {
|
|
45
|
+
@if($key){
|
|
46
|
+
.uni-radius-#{"" + $direction}-#{"" + $key} {
|
|
47
|
+
@include radius($key,$direction,false)
|
|
48
|
+
}
|
|
49
|
+
}@else{
|
|
50
|
+
.uni-radius-#{$direction} {
|
|
51
|
+
@include radius($key,$direction,false)
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
@@ -0,0 +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
|
+
}
|
|
56
|
+
}
|
|
@@ -0,0 +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 */
|
|
@@ -0,0 +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
|
+
}
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
// @use "sass:math";
|
|
2
|
+
@import 'functions';
|
|
3
|
+
// 间距基础倍数
|
|
4
|
+
$uni-space-root: 2 !default;
|
|
5
|
+
// 边框半径默认值
|
|
6
|
+
$uni-radius-root:5px !default;
|
|
7
|
+
$uni-radius: () !default;
|
|
8
|
+
// 边框半径断点
|
|
9
|
+
$uni-radius: map-deep-merge(
|
|
10
|
+
(
|
|
11
|
+
0: 0,
|
|
12
|
+
// TODO 当前版本暂时不支持 sm 属性
|
|
13
|
+
// 'sm': math.div($uni-radius-root, 2),
|
|
14
|
+
null: $uni-radius-root,
|
|
15
|
+
'lg': $uni-radius-root * 2,
|
|
16
|
+
'xl': $uni-radius-root * 6,
|
|
17
|
+
'pill': 9999px,
|
|
18
|
+
'circle': 50%
|
|
19
|
+
),
|
|
20
|
+
$uni-radius
|
|
21
|
+
);
|
|
22
|
+
// 字体家族
|
|
23
|
+
$body-font-family: 'Roboto', sans-serif !default;
|
|
24
|
+
// 文本
|
|
25
|
+
$heading-font-family: $body-font-family !default;
|
|
26
|
+
$uni-headings: () !default;
|
|
27
|
+
$letterSpacing: -0.01562em;
|
|
28
|
+
$uni-headings: map-deep-merge(
|
|
29
|
+
(
|
|
30
|
+
'h1': (
|
|
31
|
+
size: 32px,
|
|
32
|
+
weight: 300,
|
|
33
|
+
line-height: 50px,
|
|
34
|
+
// letter-spacing:-0.01562em
|
|
35
|
+
),
|
|
36
|
+
'h2': (
|
|
37
|
+
size: 28px,
|
|
38
|
+
weight: 300,
|
|
39
|
+
line-height: 40px,
|
|
40
|
+
// letter-spacing: -0.00833em
|
|
41
|
+
),
|
|
42
|
+
'h3': (
|
|
43
|
+
size: 24px,
|
|
44
|
+
weight: 400,
|
|
45
|
+
line-height: 32px,
|
|
46
|
+
// letter-spacing: normal
|
|
47
|
+
),
|
|
48
|
+
'h4': (
|
|
49
|
+
size: 20px,
|
|
50
|
+
weight: 400,
|
|
51
|
+
line-height: 30px,
|
|
52
|
+
// letter-spacing: 0.00735em
|
|
53
|
+
),
|
|
54
|
+
'h5': (
|
|
55
|
+
size: 16px,
|
|
56
|
+
weight: 400,
|
|
57
|
+
line-height: 24px,
|
|
58
|
+
// letter-spacing: normal
|
|
59
|
+
),
|
|
60
|
+
'h6': (
|
|
61
|
+
size: 14px,
|
|
62
|
+
weight: 500,
|
|
63
|
+
line-height: 18px,
|
|
64
|
+
// letter-spacing: 0.0125em
|
|
65
|
+
),
|
|
66
|
+
'subtitle': (
|
|
67
|
+
size: 12px,
|
|
68
|
+
weight: 400,
|
|
69
|
+
line-height: 20px,
|
|
70
|
+
// letter-spacing: 0.00937em
|
|
71
|
+
),
|
|
72
|
+
'body': (
|
|
73
|
+
font-size: 14px,
|
|
74
|
+
font-weight: 400,
|
|
75
|
+
line-height: 22px,
|
|
76
|
+
// letter-spacing: 0.03125em
|
|
77
|
+
),
|
|
78
|
+
'caption': (
|
|
79
|
+
'size': 12px,
|
|
80
|
+
'weight': 400,
|
|
81
|
+
'line-height': 20px,
|
|
82
|
+
// 'letter-spacing': 0.03333em,
|
|
83
|
+
// 'text-transform': false
|
|
84
|
+
)
|
|
85
|
+
),
|
|
86
|
+
$uni-headings
|
|
87
|
+
);
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
// 主色
|
|
92
|
+
$uni-primary: #2979ff !default;
|
|
93
|
+
$uni-primary-disable:lighten($uni-primary,20%) !default;
|
|
94
|
+
$uni-primary-light: lighten($uni-primary,25%) !default;
|
|
95
|
+
|
|
96
|
+
// 辅助色
|
|
97
|
+
// 除了主色外的场景色,需要在不同的场景中使用(例如危险色表示危险的操作)。
|
|
98
|
+
$uni-success: #18bc37 !default;
|
|
99
|
+
$uni-success-disable:lighten($uni-success,20%) !default;
|
|
100
|
+
$uni-success-light: lighten($uni-success,25%) !default;
|
|
101
|
+
|
|
102
|
+
$uni-warning: #f3a73f !default;
|
|
103
|
+
$uni-warning-disable:lighten($uni-warning,20%) !default;
|
|
104
|
+
$uni-warning-light: lighten($uni-warning,25%) !default;
|
|
105
|
+
|
|
106
|
+
$uni-error: #e43d33 !default;
|
|
107
|
+
$uni-error-disable:lighten($uni-error,20%) !default;
|
|
108
|
+
$uni-error-light: lighten($uni-error,25%) !default;
|
|
109
|
+
|
|
110
|
+
$uni-info: #8f939c !default;
|
|
111
|
+
$uni-info-disable:lighten($uni-info,20%) !default;
|
|
112
|
+
$uni-info-light: lighten($uni-info,25%) !default;
|
|
113
|
+
|
|
114
|
+
// 中性色
|
|
115
|
+
// 中性色用于文本、背景和边框颜色。通过运用不同的中性色,来表现层次结构。
|
|
116
|
+
$uni-main-color: #3a3a3a !default; // 主要文字
|
|
117
|
+
$uni-base-color: #6a6a6a !default; // 常规文字
|
|
118
|
+
$uni-secondary-color: #909399 !default; // 次要文字
|
|
119
|
+
$uni-extra-color: #c7c7c7 !default; // 辅助说明
|
|
120
|
+
|
|
121
|
+
// 边框颜色
|
|
122
|
+
$uni-border-1: #F0F0F0 !default;
|
|
123
|
+
$uni-border-2: #EDEDED !default;
|
|
124
|
+
$uni-border-3: #DCDCDC !default;
|
|
125
|
+
$uni-border-4: #B9B9B9 !default;
|
|
126
|
+
|
|
127
|
+
// 常规色
|
|
128
|
+
$uni-black: #000000 !default;
|
|
129
|
+
$uni-white: #ffffff !default;
|
|
130
|
+
$uni-transparent: rgba($color: #000000, $alpha: 0) !default;
|
|
131
|
+
|
|
132
|
+
// 背景色
|
|
133
|
+
$uni-bg-color: #f7f7f7 !default;
|
|
134
|
+
|
|
135
|
+
/* 水平间距 */
|
|
136
|
+
$uni-spacing-sm: 8px !default;
|
|
137
|
+
$uni-spacing-base: 15px !default;
|
|
138
|
+
$uni-spacing-lg: 30px !default;
|
|
139
|
+
|
|
140
|
+
// 阴影
|
|
141
|
+
$uni-shadow-sm:0 0 5px rgba($color: #d8d8d8, $alpha: 0.5) !default;
|
|
142
|
+
$uni-shadow-base:0 1px 8px 1px rgba($color: #a5a5a5, $alpha: 0.2) !default;
|
|
143
|
+
$uni-shadow-lg:0px 1px 10px 2px rgba($color: #a5a4a4, $alpha: 0.5) !default;
|
|
144
|
+
|
|
145
|
+
// 蒙版
|
|
146
|
+
$uni-mask: rgba($color: #000000, $alpha: 0.4) !default;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// 合并 map
|
|
2
|
+
@function map-deep-merge($parent-map, $child-map){
|
|
3
|
+
$result: $parent-map;
|
|
4
|
+
@each $key, $child in $child-map {
|
|
5
|
+
$parent-has-key: map-has-key($result, $key);
|
|
6
|
+
$parent-value: map-get($result, $key);
|
|
7
|
+
$parent-type: type-of($parent-value);
|
|
8
|
+
$child-type: type-of($child);
|
|
9
|
+
$parent-is-map: $parent-type == map;
|
|
10
|
+
$child-is-map: $child-type == map;
|
|
11
|
+
|
|
12
|
+
@if (not $parent-has-key) or ($parent-type != $child-type) or (not ($parent-is-map and $child-is-map)){
|
|
13
|
+
$result: map-merge($result, ( $key: $child ));
|
|
14
|
+
}@else {
|
|
15
|
+
$result: map-merge($result, ( $key: map-deep-merge($parent-value, $child) ));
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
@return $result;
|
|
19
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// 间距基础倍数
|
|
2
|
+
$uni-space-root: 2;
|
|
3
|
+
// 边框半径默认值
|
|
4
|
+
$uni-radius-root:5px;
|
|
5
|
+
// 主色
|
|
6
|
+
$uni-primary: #2979ff;
|
|
7
|
+
// 辅助色
|
|
8
|
+
$uni-success: #4cd964;
|
|
9
|
+
// 警告色
|
|
10
|
+
$uni-warning: #f0ad4e;
|
|
11
|
+
// 错误色
|
|
12
|
+
$uni-error: #dd524d;
|
|
13
|
+
// 描述色
|
|
14
|
+
$uni-info: #909399;
|
|
15
|
+
// 中性色
|
|
16
|
+
$uni-main-color: #303133;
|
|
17
|
+
$uni-base-color: #606266;
|
|
18
|
+
$uni-secondary-color: #909399;
|
|
19
|
+
$uni-extra-color: #C0C4CC;
|
|
20
|
+
// 背景色
|
|
21
|
+
$uni-bg-color: #f5f5f5;
|
|
22
|
+
// 边框颜色
|
|
23
|
+
$uni-border-1: #DCDFE6;
|
|
24
|
+
$uni-border-2: #E4E7ED;
|
|
25
|
+
$uni-border-3: #EBEEF5;
|
|
26
|
+
$uni-border-4: #F2F6FC;
|
|
27
|
+
|
|
28
|
+
// 常规色
|
|
29
|
+
$uni-black: #000000;
|
|
30
|
+
$uni-white: #ffffff;
|
|
31
|
+
$uni-transparent: rgba($color: #000000, $alpha: 0);
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
@import 'variables';
|
|
2
|
+
// 间距基础倍数
|
|
3
|
+
$uni-space-root: 2;
|
|
4
|
+
// 边框半径默认值
|
|
5
|
+
$uni-radius-root:5px;
|
|
6
|
+
|
|
7
|
+
// 主色
|
|
8
|
+
$uni-primary: #2979ff;
|
|
9
|
+
$uni-primary-disable:mix(#fff,$uni-primary,50%);
|
|
10
|
+
$uni-primary-light: mix(#fff,$uni-primary,80%);
|
|
11
|
+
|
|
12
|
+
// 辅助色
|
|
13
|
+
// 除了主色外的场景色,需要在不同的场景中使用(例如危险色表示危险的操作)。
|
|
14
|
+
$uni-success: #18bc37;
|
|
15
|
+
$uni-success-disable:mix(#fff,$uni-success,50%);
|
|
16
|
+
$uni-success-light: mix(#fff,$uni-success,80%);
|
|
17
|
+
|
|
18
|
+
$uni-warning: #f3a73f;
|
|
19
|
+
$uni-warning-disable:mix(#fff,$uni-warning,50%);
|
|
20
|
+
$uni-warning-light: mix(#fff,$uni-warning,80%);
|
|
21
|
+
|
|
22
|
+
$uni-error: #e43d33;
|
|
23
|
+
$uni-error-disable:mix(#fff,$uni-error,50%);
|
|
24
|
+
$uni-error-light: mix(#fff,$uni-error,80%);
|
|
25
|
+
|
|
26
|
+
$uni-info: #8f939c;
|
|
27
|
+
$uni-info-disable:mix(#fff,$uni-info,50%);
|
|
28
|
+
$uni-info-light: mix(#fff,$uni-info,80%);
|
|
29
|
+
|
|
30
|
+
// 中性色
|
|
31
|
+
// 中性色用于文本、背景和边框颜色。通过运用不同的中性色,来表现层次结构。
|
|
32
|
+
$uni-main-color: #3a3a3a; // 主要文字
|
|
33
|
+
$uni-base-color: #6a6a6a; // 常规文字
|
|
34
|
+
$uni-secondary-color: #909399; // 次要文字
|
|
35
|
+
$uni-extra-color: #c7c7c7; // 辅助说明
|
|
36
|
+
|
|
37
|
+
// 边框颜色
|
|
38
|
+
$uni-border-1: #F0F0F0;
|
|
39
|
+
$uni-border-2: #EDEDED;
|
|
40
|
+
$uni-border-3: #DCDCDC;
|
|
41
|
+
$uni-border-4: #B9B9B9;
|
|
42
|
+
|
|
43
|
+
// 常规色
|
|
44
|
+
$uni-black: #000000;
|
|
45
|
+
$uni-white: #ffffff;
|
|
46
|
+
$uni-transparent: rgba($color: #000000, $alpha: 0);
|
|
47
|
+
|
|
48
|
+
// 背景色
|
|
49
|
+
$uni-bg-color: #f7f7f7;
|
|
50
|
+
|
|
51
|
+
/* 水平间距 */
|
|
52
|
+
$uni-spacing-sm: 8px;
|
|
53
|
+
$uni-spacing-base: 15px;
|
|
54
|
+
$uni-spacing-lg: 30px;
|
|
55
|
+
|
|
56
|
+
// 阴影
|
|
57
|
+
$uni-shadow-sm:0 0 5px rgba($color: #d8d8d8, $alpha: 0.5);
|
|
58
|
+
$uni-shadow-base:0 1px 8px 1px rgba($color: #a5a5a5, $alpha: 0.2);
|
|
59
|
+
$uni-shadow-lg:0px 1px 10px 2px rgba($color: #a5a4a4, $alpha: 0.5);
|
|
60
|
+
|
|
61
|
+
// 蒙版
|
|
62
|
+
$uni-mask: rgba($color: #000000, $alpha: 0.4);
|