From 646da06db1fe937f3b138673d47d4316780e2113 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=87=E5=A4=A9?= Date: Wed, 27 Jan 2021 20:52:23 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0UI=E9=A3=8E=E6=A0=BC=E4=B8=BA?= =?UTF-8?q?=E5=9C=86=E8=A7=92=E5=AE=9E=E5=BF=83=E9=A3=8E=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.dev.js | 4 +- src/avatar/index.wc | 10 +- src/badge/index.wc | 8 +- src/css/reset-basic.css | 17 +- src/form/button.wc | 316 +++++++++++++------------------------- src/form/checkbox-item.wc | 12 +- src/form/input.wc | 2 +- src/form/number.wc | 2 +- src/form/progress.wc | 8 +- src/form/radio-item.wc | 10 +- src/form/select.wc | 2 +- src/form/star.wc | 12 +- src/form/switch.wc | 12 +- src/icon/index.wc | 35 ++--- src/pager/index.wc | 51 +++--- src/slider/index.wc | 10 +- 16 files changed, 206 insertions(+), 305 deletions(-) diff --git a/build.dev.js b/build.dev.js index 7a75a03..d1e2866 100644 --- a/build.dev.js +++ b/build.dev.js @@ -16,11 +16,11 @@ const BUILD_DATE = new Date().format() const BASE_SCSS = ` @mixin focus1(){ - box-shadow: 0 0 2px #88f7df; + box-shadow: 0 0 3px var(--color-blue-1); } @mixin focus2(){ - box-shadow: 0 0 2px #f3be4d; + box-shadow: 0 0 3px var(--color-orange-1); } * { diff --git a/src/avatar/index.wc b/src/avatar/index.wc index 8553d0c..0256549 100644 --- a/src/avatar/index.wc +++ b/src/avatar/index.wc @@ -39,25 +39,25 @@ } } -:host([color='red']) { +:host([type='danger']) { background: #ff5061; } -:host([color='teal']) { +:host([type='primary']) { background: #3fc2a7; } :host([color='purple']) { background: #ac61ce; } -:host([color='green']) { +:host([type='success']) { background: #58d68d; } :host([color='orange']) { background: #ffb618; } -:host([color='dark']) { +:host([type='inverse']) { background: #62778d; } -:host([color='blue']) { +:host([type='info']) { background: #66b1ff; } diff --git a/src/badge/index.wc b/src/badge/index.wc index f48793c..57db8aa 100644 --- a/src/badge/index.wc +++ b/src/badge/index.wc @@ -33,13 +33,13 @@ padding: 2px 4px; } } -:host([color='dark']) .dot { +:host([type='inverse']) .dot { background: var(--color-dark-1); } -:host([color='green']) .dot { +:host([type='success']) .dot { background: var(--color-green-1); } -:host([color='blue']) .dot { +:host([type='info']) .dot { background: var(--color-blue-1); } :host([color='orange']) .dot { @@ -48,7 +48,7 @@ :host([color='purple']) .dot { background: var(--color-purple-1); } -:host([color='teal']) .dot { +:host([type='primary']) .dot { background: var(--color-teal-1); } diff --git a/src/css/reset-basic.css b/src/css/reset-basic.css index 01d793b..13f8844 100644 --- a/src/css/reset-basic.css +++ b/src/css/reset-basic.css @@ -44,30 +44,35 @@ code,pre,samp {font-family:Menlo,Monaco,Consolas,"Courier New",monospace;} :root { + /* primary */ --color-teal-1: #4db6ac; --color-teal-2: #26a69a; --color-teal-3: #009688; + /* sucess */ --color-green-1: #81c784; --color-green-2: #66bb6a; --color-green-3: #4caf50; - --color-purple-1: #9575cd; - --color-purple-2: #9575cd; - --color-purple-3: #673ab7; + /* info */ --color-blue-1: #64b5f6; --color-blue-2: #42a5f5; --color-blue-3: #2196f3; + /* danger */ --color-red-1: #ff5061; --color-red-2: #eb3b48; --color-red-3: #ce3742; + /* warning */ --color-orange-1: #ffb618; --color-orange-2: #f39c12; --color-orange-3: #e67e22; + /* default1 */ --color-plain-1: #f2f5fc; --color-plain-2: #e8ebf4; --color-plain-3: #dae1e9; - --color-grey-1: #bdbdbd; - --color-grey-2: #9e9e9e; - --color-grey-3: #757575; + /* default2 */ + --color-grey-1: #cacfd2; + --color-grey-2: #bdc3c7; + --color-grey-3: #a1a6a9; + /* inverse */ --color-dark-1: #62778d; --color-dark-2: #526273; --color-dark-3: #425064; diff --git a/src/form/button.wc b/src/form/button.wc index a8d89ca..a054318 100644 --- a/src/form/button.wc +++ b/src/form/button.wc @@ -8,14 +8,15 @@