Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Tabbar、VTabs、Tabs、Checklist、Input、ImageUpload dark style #314

Merged
merged 2 commits into from
Oct 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion demo/pages/Checklist/index.acss
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
.demo-checklist-label {
font-size: 32rpx;
color: #999;
padding: 36rpx 0 16rpx 16rpx;
}

Expand Down
2 changes: 1 addition & 1 deletion demo/pages/Checklist/index.axml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
onChange="onChange"
>
<view slot="icon">
<icon color='red' type="LikeOutline" size="x-small" class="demo-checklist-checked-icon"/>
<icon style='color:red' type="LikeOutline" class="demo-checklist-checked-icon"/>
</view>
<view slot="content" slot-scope="props">
title: {{props.item.title}}
Expand Down
2 changes: 1 addition & 1 deletion demo/pages/ImageUpload/index.acss
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
.demo-image-upload-show {
padding: 8rpx;
background-color: #fff;
}

.demo-image-upload-title {
font-size: 28rpx;
padding: 16rpx;
height: 32rpx;
color: rgb(105 123 140);
}
2 changes: 1 addition & 1 deletion demo/pages/ImageUpload/index.axml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
onChange="onChange"
>
<view slot="uploadIcon">
<am-icon type="CameraOutline" color="#999" size="small"/>
<am-icon type="CameraOutline" style="color:#999"/>
</view>
</uploader>
</view>
Expand Down
15 changes: 6 additions & 9 deletions demo/pages/TabBar/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,19 +45,16 @@ Page({
text: '首页',
},
{
type: 'image',
icon: 'https://gw.alipayobjects.com/mdn/rms_616c05/afts/img/A*lyJlRJMLJEEAAAAAAAAAAAAAARQnAQ',
icon: 'https://gw.alipayobjects.com/mdn/industry_lifee/afts/img/A*rF7uRZrUpiEAAAAAAAAAAAAAARQnAQ',
activeIcon:
'https://gw.alipayobjects.com/mdn/rms_616c05/afts/img/A*lyJlRJMLJEEAAAAAAAAAAAAAARQnAQ',
text: '新车报价',
'https://gw.alipayobjects.com/mdn/industry_lifee/afts/img/A*a29CQa2-9VIAAAAAAAAAAAAAARQnAQ',
text: '导航',
},
{
type: 'image',
icon: 'https://gw.alipayobjects.com/mdn/rms_616c05/afts/img/A*lyJlRJMLJEEAAAAAAAAAAAAAARQnAQ',
icon: 'https://gw.alipayobjects.com/mdn/industry_lifee/afts/img/A*lZCJTa_1JSYAAAAAAAAAAAAAARQnAQ',
activeIcon:
'https://gw.alipayobjects.com/mdn/rms_616c05/afts/img/A*lyJlRJMLJEEAAAAAAAAAAAAAARQnAQ',
text: '新车报价',
imageMode: 'scaleToFill',
'https://gw.alipayobjects.com/mdn/industry_lifee/afts/img/A*W7e3R58X0XkAAAAAAAAAAAAAARQnAQ',
text: '我的',
},
],

Expand Down
10 changes: 0 additions & 10 deletions demo/pages/Tabs/index.acss
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
.demo-block-title {
height: 48rpx;
padding: 48rpx 0 24rpx 8px;
line-height: 1.4;
font-size: 15px;
color: #999;
background-color: #FAFBFC;
}


.content {
padding: 24rpx;
}
Expand Down
4 changes: 2 additions & 2 deletions demo/pages/VTabs/index.acss
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
.vtabItem {
transition: all 200ms linear;
background-color: #fff;

}

.currentItem {
color: #f00;
background-color: #fff;

}

.vtabItem text {
Expand Down
17 changes: 9 additions & 8 deletions src/Checklist/ChecklistItem/index.less
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
@import (reference) "../variable.less";
@import (reference) "../../style/mixins/hairline.less";
@import (reference) '../variable.less';
@import (reference) '../../style/mixins/hairline.less';

@checklistItemPrefix: amd-checklist-item;

.@{checklistItemPrefix} {
background-color: @color-fill-grey-inverse;
background-color: @COLOR_CARD;

&-hover {
background-color: #eee;
background-color: @COLOR_BORDER;
}

&-content {
display: flex;
align-items: center;
padding: @v-spacing-large @h-spacing-large;
color: @COLOR_TEXT_PRIMARY;
&-disabled {
opacity: @opacity-disabled;
}
Expand Down Expand Up @@ -43,22 +44,22 @@
}

&-title {
color: @color-text-title;
color: @COLOR_TEXT_PRIMARY;
font-size: @font-size-list;
line-height: 48 * @rpx;
}

&-description {
font-size: @font-size-content;
color: @color-text-subtitle;
color: @COLOR_TEXT_ASSIST;
margin-top: 2 * @rpx;
line-height: 36 * @rpx;
}
}

&-checked {
&-disabled {
opacity: @opacity-disabled;
opacity: @opacity-disabled;
}
}

Expand All @@ -71,6 +72,6 @@
&-line {
margin-left: @h-spacing-large;
position: relative;
.hairline("bottom", @color-divider-line);
.hairline('bottom', @COLOR_BORDER);
}
}
2 changes: 1 addition & 1 deletion src/Checklist/index.axml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
</view>
<view slot="icon">
<slot name="icon">
<icon type="CheckOutline" fontSize="18px" color="#1677ff" class="amd-checklist-item-check-icon" />
<icon type="CheckOutline" class="amd-checklist-item-check-icon" />
</slot>
</view>
</checklist-item>
Expand Down
3 changes: 2 additions & 1 deletion src/Checklist/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
overflow: hidden;
}

&-item-checked-icon {
&-item-check-icon {
font-size: @font-size-title;
color: @COLOR_BRAND1;
}
}
2 changes: 1 addition & 1 deletion src/Checklist/variable.less
Original file line number Diff line number Diff line change
@@ -1 +1 @@
@import (reference) "../_base/index.less";
@import (reference) '../style/themes/index.less';
4 changes: 2 additions & 2 deletions src/ImageUpload/index.axml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<view class="amd-image-upload-cover-loading-text">上传中...</view>
</view>
<view a:if="{{item.status === 'error'}}" class="amd-image-upload-cover-error">
<am-icon class="amd-image-upload-cover-error-icon" type="CloseCircleOutline" color="#fff" size="small" />
<am-icon class="amd-image-upload-cover-error-icon" type="CloseCircleOutline"/>
<view class="amd-image-upload-cover-error-text">上传失败</view>
</view>
</view>
Expand All @@ -37,7 +37,7 @@
onTap="onChooseImage"
>
<slot name='uploadIcon'>
<am-icon size="small" type="AddOutline" color="#999" />
<am-icon type="AddOutline" className="amd-image-upload-add-image-icon" />
</slot>
</view>
</view>
12 changes: 8 additions & 4 deletions src/ImageUpload/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
.@{imageUploadPrefix} {
display: flex;
flex-wrap: wrap;
background: @COLOR_CARD;

&-show {
position: relative;
Expand All @@ -31,10 +32,12 @@
align-items: center;
justify-content: center;
margin: @image-upload-add-image-container-margin;
background-color: @color-divider-background;
background-color: @COLOR_BACKGROUND;
border-radius: @corner-radius-md;
}

&-add-image-icon {
color: @COLOR_TEXT_ASSIST;
}
&-cover {
position: absolute;
margin: @image-upload-common-margin;
Expand All @@ -56,7 +59,7 @@
}

&-text {
color: #fff;
color: @COLOR_WHITE;
font-size: 24rpx;
margin-top: 8rpx;
}
Expand All @@ -67,10 +70,11 @@

&-icon {
font-size: 48rpx;
color: @COLOR_WHITE;
}

&-text {
color: #fff;
color: @COLOR_WHITE;
font-size: 24rpx;
margin-top: 8rpx;
}
Expand Down
2 changes: 1 addition & 1 deletion src/ImageUpload/variable.less
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import (reference) "../_base/index.less";
@import (reference) '../style/themes/index.less';

@image-upload-size-base: 4 * @rpx;

Expand Down
2 changes: 1 addition & 1 deletion src/InputItem/index.axml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<view class="amd-input-item {{disabled ? 'amd-input-item-content-disabled' : ''}} {{className ? className : ''}}">
<view class="amd-input-item {{disabled ? 'amd-input-item-disabled' : ''}} {{className ? className : ''}}">
<view class="amd-input-item-line">
<view class="amd-input-item-layer">
<input
Expand Down
12 changes: 6 additions & 6 deletions src/InputItem/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
.@{inputItemPrefix} {
display: flex;
align-items: center;
background: @color-fill-grey-inverse;
background: @COLOR_CARD;
&-disabled {
opacity: 0.4;
}
Expand Down Expand Up @@ -50,12 +50,12 @@
padding: 0;
font-size: 34 * @rpx;
text-align: left;
color: #333;

color: @input-item-color;
background: @COLOR_CARD;
.a-input-placeholder {
font-family: PingFangSC-Regular;
font-size: 34 * @rpx;
color: #ccc;
color: @input-item-placeholder-color;
}
}

Expand All @@ -69,7 +69,7 @@
align-items: center;
border-radius: 16 * @rpx;
&-icon {
color: #ccc;
color: @COLOR_TEXT_WEAK;
font-size: 34 * @rpx;
}
}
Expand All @@ -82,6 +82,6 @@
pointer-events: none;
}
&-placeholder-base {
color: #ccc;
color: @input-item-placeholder-color;
}
}
10 changes: 4 additions & 6 deletions src/InputItem/variable.less
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
@import (reference) "../_base/index.less";
@import (reference) '../style/themes/index.less';

// input 字体颜色
@input-item-color: @color-text-title;
@input-item-color: @COLOR_TEXT_PRIMARY;
// input 字体大小
@input-item-size: @font-size-content;
// input disabled color
@input-item-color-disabled: #bbb;
// input placeholder 颜色
@input-item-placeholder-color: @color-text-weak;
@input-item-placeholder-color: @COLOR_TEXT_WEAK;
// input 清除 颜色
@input-item-clear-color: @color-text-subtitle;
@input-item-clear-color: @COLOR_TEXT_ASSIST;
6 changes: 3 additions & 3 deletions src/TabBar/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
&-wrap {
display: flex;
align-items: center;
background-color: #fff;
background-color: @COLOR_CARD;
}
&-item {
flex: 1;
Expand All @@ -17,9 +17,9 @@
align-items: center;
justify-content: center;
padding: 8 * @rpx 0;
color: #666;
color: @COLOR_TEXT_SECONDARY;
&-active {
color: #1677ff;
color: @COLOR_BRAND1;
}
}

Expand Down
8 changes: 2 additions & 6 deletions src/TabBar/variable.less
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import (reference) "../_base/index.less";
@import (reference) '../style/themes/index.less';

// 基础类型的颜色 文本和下划线同一个颜色、未选中的文本颜色,无背景色
// 胶囊类型的颜色,文本和背景色,选中状态的文本和背景色
Expand All @@ -15,8 +15,4 @@
// 混合:主标题文本黑色,文本灰色无背景

// 黑色、灰色、白色、蓝色
@tabs-basis-color: @color-text-title;
@tabs-weaken-color: @color-text-subtitle;
@tabs-inverse-color: @color-text-base;
@tabs-active-color: @color-brand-1;
@tabs-active-decorate-color: @color-brand-1;

1 change: 1 addition & 0 deletions src/Tabs/TabItem/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
height: auto;
flex-shrink: 0;
align-self: flex-start;
color: @tabs-basis-color;
&-pane {
width: 100%;
will-change: auto;
Expand Down
Loading