From 9b82a9cd3b1f0cc97e79cade16169628e62ff10a Mon Sep 17 00:00:00 2001 From: wangchangqi Date: Wed, 30 Nov 2022 10:32:41 +0800 Subject: [PATCH 1/2] =?UTF-8?q?(fix)=E4=BF=AE=E5=A4=8Dselect=E5=9C=A8?= =?UTF-8?q?=E5=A4=9A=E9=80=89=E4=B8=8BsetSelected=E7=9A=84=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/select/select.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/select/select.ts b/src/components/select/select.ts index 364d8d7..8901483 100644 --- a/src/components/select/select.ts +++ b/src/components/select/select.ts @@ -39,7 +39,7 @@ export class StarSelect extends StarBaseElement { /* 用于指示自身风格,包括: selector(默认), rightarrow, */ @property({type: String, reflect: true}) variant!: string - @state() label!: string + @state() label!: string | undefined @queryAssignedElements() optionsSlot!: StarLi[] @@ -103,6 +103,7 @@ export class StarSelect extends StarBaseElement { // 1. 遍历 optionsSlot 找到对等项 // 当经历上述过程后,this.label 还为空,说明 this.selected 为错值 // 那将继续使用 optionsSlot 中第一项的 value 和 label 作为默认值 + this.label = undefined for (const [index, option] of this.optionsSlot.entries()) { if (this.selected !== undefined) { if (this.multiple === false) { From 4a588281fc44410ee0945d373633b59ed43fcaf3 Mon Sep 17 00:00:00 2001 From: wangchangqi Date: Wed, 30 Nov 2022 10:36:04 +0800 Subject: [PATCH 2/2] =?UTF-8?q?(improve)=E9=80=82=E9=85=8D=E6=B7=B1?= =?UTF-8?q?=E8=89=B2=E6=A8=A1=E5=BC=8F=EF=BC=8C=E5=A4=9A=E8=89=B2=E5=9B=BE?= =?UTF-8?q?=E6=A0=87=E8=87=AA=E9=80=82=E5=BA=94=E6=B7=B1=E8=89=B2=E6=A8=A1?= =?UTF-8?q?=E5=BC=8F=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/base/global-style.ts | 42 +++++++++- src/components/button/button.css.ts | 8 +- src/components/card/card.css.ts | 2 +- src/components/checkbox/checkbox.ts | 2 +- src/components/dialog/select-dialog.ts | 1 + src/components/fonts/star-icons.ttf | Bin 114912 -> 118964 bytes src/components/li/li.css.ts | 7 +- src/components/li/li.ts | 2 +- src/components/section/section.ts | 11 ++- src/components/switch/switch.css.ts | 3 +- src/components/ul/ul.css.ts | 9 +- src/test/panels/button/button.ts | 79 ++---------------- src/test/panels/fonts/gaia-icons.ts | 2 +- src/test/panels/fonts/star-icons.ts | 50 ++++++++++- .../gesture/examples/test-multitouches.ts | 12 +++ src/test/panels/gesture/examples/test-pan.ts | 7 ++ .../panels/gesture/examples/test-swipe.ts | 30 +++++-- src/test/panels/gesture/examples/test-tap.ts | 21 ++++- src/test/panels/li/li.ts | 17 +++- 19 files changed, 195 insertions(+), 110 deletions(-) diff --git a/src/components/base/global-style.ts b/src/components/base/global-style.ts index e721f04..329cf17 100644 --- a/src/components/base/global-style.ts +++ b/src/components/base/global-style.ts @@ -37,6 +37,7 @@ const baseStyle = css` --devicePixelRatio: 2; --text-font-family: 'OPPPSans'; --icon-font-family: 'star-icons'; + --colorful-data-icon: attr(data-icon); /*****************************线性渐变*************************************/ --gradient-black: linear-gradient(180deg, #83eea1 0%, #24ba8d 100%); @@ -222,7 +223,7 @@ const baseStyle = css` --opacity-white-55: rgba(255, 255, 255, 0.55); --opacity-white-68: rgba(255, 255, 255, 0.68); --opacity-white-75: rgba(255, 255, 255, 0.75); - --opacity-white-1: rgba(255, 255, 255, 1); + --opacity-white-80: rgba(255, 255, 255, 0.8); /*******************************纯色***************************************/ --pure-white: rgba(255, 255, 255); --pure-black: rgba(0, 0, 0); @@ -469,10 +470,18 @@ const baseComponentStyle = css` --card-label: var(--font-main-black); --card-link: var(--linear-icon32-black); + /* Checkbox */ + --checkbox-bc: rgba(38, 38, 38, 0.2); + /* Selector */ --selector-icon-color: var(--linear-icon32-black); - + + /* Switch */ + --switch-bgc: var(--opacity-black-12); + /* Radio */ + --radio-checkmark-bc: rgba(38, 38, 38, 0.2); + --bor-radio-off: var(--auto-3px) solid rgba(38, 38, 38, 0.25); --bor-radio-off: var(--auto-3px) solid var(--opacity-white-25); /* border/未选中 */ @@ -797,6 +806,9 @@ const darkStyle = css` /* 商务/组件深/黑透渐变-竖(高斯) */ --bgc-black-vertical-gradient: var(--gradient-blackout-vertical); + --colorful-data-icon: attr(data-icon) '-dm'; + --split-line-color: var(--opacity-white-12); + /* 按钮button */ --bgc-btn-noraml: var(--bgc-btn-noraml-dm); --bgc-btn-noraml-pressed: var(--bgc-btn-noraml-pressed-dm); @@ -818,6 +830,32 @@ const darkStyle = css` --dialog-content: var(--font-secondary-white); --dialog-checkbox: var(--font-sec-auxiliary-white); + --li-label: var(--font-secondary-white); + --li-square: var(--font-auxiliary-white); + --li-bg-pressed: var(--opacity-white-12); + --li-info: var(--linear-icon-white); + --li-link: var(--linear-icon-white); + --li-value-default: var(--font-auxiliary-white); + --li-description: var(--font-sec-auxiliary-white); + --li-icon: var(--linear-icon-white); + + /* Card */ + --card-label: var(--font-secondary-white); + --card-link: var(--linear-icon-white); + + /* Checkbox */ + --checkbox-bc: var(--opacity-white-15); + + /* Radio */ + --radio-checkmark-bc: var(--opacity-white-15); + + /* Selector */ + --selector-icon-color: var(--linear-icon-white); + + /* Switch */ + --ball-bgc: var(--opacity-white-80); + --switch-bgc: var(--opacity-white-15); + /* 全/ click_dm */ --bgc-btn-click: var(--opacity-white-10); diff --git a/src/components/button/button.css.ts b/src/components/button/button.css.ts index df814c1..216b666 100644 --- a/src/components/button/button.css.ts +++ b/src/components/button/button.css.ts @@ -164,6 +164,12 @@ export default [ content: attr(data-icon); text-align: center; } + :host([type='pure'].colorful-icon) button::before, + :host([type='icon'].colorful-icon) button::before, + :host([type='ghost'].colorful-icon) button[data-icon]::before, + :host([type='special'].colorful-icon) button[data-icon]::before { + content: var(--colorful-data-icon); + } :host([type='pure'][label]) button, :host([type='icon']) button, :host([type='ghost']) button, @@ -283,8 +289,6 @@ export default [ :host([type='pure']:not([label])[size='extralarge']) { width: var(--auto-152px); height: var(--auto-152px); - color: var(--color-btn-pure-default); - background-color: var(--bgc-btn-pure-default); } /* 图标与文字之间的间隙 */ :host([type='pure'][label]) button::before { diff --git a/src/components/card/card.css.ts b/src/components/card/card.css.ts index a1040c0..3ecca68 100644 --- a/src/components/card/card.css.ts +++ b/src/components/card/card.css.ts @@ -143,7 +143,7 @@ export default css` height: var(--auto-30px); margin: auto var(--auto-12px) auto auto; box-sizing: border-box; - border: var(--auto-3px) solid rgba(38, 38, 38, 0.2); + border: var(--auto-3px) solid var(--checkbox-bc); font-family: var(--icon-font-family); color: #fff; line-height: var(--auto-30px); diff --git a/src/components/checkbox/checkbox.ts b/src/components/checkbox/checkbox.ts index 545a463..0ec082b 100644 --- a/src/components/checkbox/checkbox.ts +++ b/src/components/checkbox/checkbox.ts @@ -47,7 +47,7 @@ export class StarCheckbox extends StarBaseElement { width: var(--auto-30px); height: var(--auto-30px); box-sizing: border-box; - border: var(--auto-3px) solid rgba(38, 38, 38, 0.2); + border: var(--auto-3px) solid var(--radio-checkmark-bc); border-radius: var(--auto-5px); } :host([checked]) a::before { diff --git a/src/components/dialog/select-dialog.ts b/src/components/dialog/select-dialog.ts index 1666dad..55c27a2 100644 --- a/src/components/dialog/select-dialog.ts +++ b/src/components/dialog/select-dialog.ts @@ -209,6 +209,7 @@ export class StarSelectDialog extends StarBaseDialog { ^DWadg^YRtc|&jmdOB=s0#WJMdehIj6KY0m|n8n-6D zlziOT$%Q_x=^+3qT%F~Q#yr_4-vs(0# zffUJVz@VX{2S>-fvG1v3W0I&KLxxV8m~XPAlQAhI<6bv-!notdje|mq$R}Pm>XzX> zKD?))G1;|^oV|9$u)){n&wRTnbsJOOY6Jx5J9&}(wdCuL7(H=vuYTRz8e{I29*8$G!1 z^QI&f)8fXY@7;O5Q}Va0Nbl=JZ=Eq~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hcHn;FO$xhUtf9OVgyF0XvJIFZqwPq9C z+8vS`s}=WaMSwo$+C59<<9^H9F|;hjkX8}?bcL(?28LDoRvI6v-KNd6InVjsc$3{u z74h!r&Q-*F0aIM0%~x8R8?U_|H)*bL7yXCKcLAECT1m3%nHx)EZe24Yx^nYcza8m0 z?x1GX+%e70(o(=$;_5sH zs+m7Ea*xm8>hF*Q&jkXiag>rxs!?vKHro6DohPl`r=uv413K{q@{T*8+57Ix9rBd) za5HyGc6=rBXwi=v_<)9j`J=<;qi|DwWQzAwOC|K47g+pK7H?G0)Sm=q8hXBrciS~v;8&IUb1hFXvdSKyyNBN&GFGZ?`LfFII2g+Y zzby{~U(s;*m(+w`Jz$zKsUGetcsDmP^JxS~B=Fpm8LgPKA}8oS|p zB*zQMg^J{QBY9Nl^nz5a&JTxzgIHyufnEpQc32tV+k2#+baxZ?O12m4-Qha#%ND_S1oPVCWov(K&9@(->^`D6G|+z~B@T+4lw6YTRYV;|*<1O6DfLMw7)Ku{km zlU%JOL$=llCP$mo@`h>x&we!YLI%wAYBPvEnI` zE4zYnoV?~E17plge+2^>k@-Pd48J7Sr;;=2v8eJ-^mu-C`cL#YdC?@hg$JcdZ@y6K xl~|wQ^tCF`cPQ%;?InTVLa1Np^SVyRFO}-zqvgQB) diff --git a/src/components/li/li.css.ts b/src/components/li/li.css.ts index 95b6b9d..7ea2745 100644 --- a/src/components/li/li.css.ts +++ b/src/components/li/li.css.ts @@ -79,6 +79,9 @@ export default css` padding-inline-end: var(--auto-18px); margin: auto 0px; } + :host(.colorful-icon) a[data-icon]::before { + content: var(--colorful-data-icon); + } a[href]::after { color: var(--li-link); content: 'right-light'; @@ -208,7 +211,7 @@ export default css` min-width: var(--auto-32px); margin: auto 0px auto auto; box-sizing: border-box; - border: var(--auto-3px) solid rgba(38, 38, 38, 0.2); + border: var(--auto-3px) solid var(--radio-checkmark-bc); border-radius: 50%; } :host([type='radio'][checked]) a::after { @@ -237,7 +240,7 @@ export default css` height: var(--auto-32px); margin: auto 0px auto auto; box-sizing: border-box; - border: var(--auto-3px) solid rgba(38, 38, 38, 0.2); + border: var(--auto-3px) solid var(--radio-checkmark-bc); border-radius: var(--auto-5px); } :host([type='checkbox'][pos='left']) a::before { diff --git a/src/components/li/li.ts b/src/components/li/li.ts index eedd11f..9533d03 100644 --- a/src/components/li/li.ts +++ b/src/components/li/li.ts @@ -381,7 +381,7 @@ export class StarLi extends StarBaseElement { id="li-text-button" type="text" label=${this.label} - variant=${ifDefined(this.variant)} + variant=${this.variant || 'default'} > ` diff --git a/src/components/section/section.ts b/src/components/section/section.ts index badb0c5..43715e6 100644 --- a/src/components/section/section.ts +++ b/src/components/section/section.ts @@ -31,10 +31,7 @@ export class StarAnimateSection extends LitElement { static styles = css` :host { position: absolute; - width: 100%; /* 100vw会有x轴溢出 */ - height: 100vh; - /* overflow: hidden; */ - /* height: calc(100vh + 1px); */ /* 手动制造溢出 */ + width: 100%; animation-duration: 0.3s; background-color: #f0f0f0; } @@ -42,6 +39,12 @@ export class StarAnimateSection extends LitElement { section { overflow: auto; } + + @media (prefers-color-scheme: dark) { + :host { + background-color: #2e2e2e; + } + } ` } diff --git a/src/components/switch/switch.css.ts b/src/components/switch/switch.css.ts index d004581..5b265f5 100644 --- a/src/components/switch/switch.css.ts +++ b/src/components/switch/switch.css.ts @@ -27,7 +27,7 @@ export default css` width: inherit; height: inherit; border-radius: inherit; - background-color: rgba(0, 0, 0, 0.12); + background-color: var(--switch-bgc); } /*选中表单后的样式,:checked表示checkbox被选中后的状态*/ .base:checked + label { @@ -50,6 +50,7 @@ export default css` } .base:checked + label::before { /*checkbox选中时按钮的样式*/ + background-color: var(--pure-white); transition: 0.25s cubic-bezier(0.16, 0.67, 0.18, 1.1); left: calc( var(--switch-width) - var(--ball-diameter) - var(--ball-padding) diff --git a/src/components/ul/ul.css.ts b/src/components/ul/ul.css.ts index 388a934..817fb51 100644 --- a/src/components/ul/ul.css.ts +++ b/src/components/ul/ul.css.ts @@ -41,7 +41,7 @@ export default css` padding: 0; margin: 10px auto; max-width: 88vw; - background: var(--bg-ul, var(--pure-white)); + background: inherit; box-shadow: rgb(64 60 67 / 16%) 1px 1px 5px 1px; border-radius: inherit; } @@ -83,11 +83,4 @@ export default css` footer a:visited { color: blue; } - - /* Just for test */ - @media (prefers-color-scheme: dark) { - ul { - background-color: var(--base-black); - } - } ` diff --git a/src/test/panels/button/button.ts b/src/test/panels/button/button.ts index f7ad88a..edab11d 100644 --- a/src/test/panels/button/button.ts +++ b/src/test/panels/button/button.ts @@ -64,11 +64,6 @@ export class PanelButton extends LitElement { - - - - - @@ -123,21 +118,11 @@ export class PanelButton extends LitElement { - - - - - - - - - - @@ -174,10 +159,6 @@ export class PanelButton extends LitElement { - - - - @@ -226,18 +207,6 @@ export class PanelButton extends LitElement { - - - - - - - - - - - - @@ -256,29 +225,21 @@ export class PanelButton extends LitElement { - - - -

Ghost类型按钮使用场景:拍照、摄像应用,多端协同拍照控制界面

- - + + - - + + - - - - - - + + @@ -287,10 +248,6 @@ export class PanelButton extends LitElement { - - - - @@ -307,10 +264,6 @@ export class PanelButton extends LitElement { - - - - @@ -366,26 +319,6 @@ export class PanelButton extends LitElement { - - - - - - - - - - - - - - - - - - - - ` } diff --git a/src/test/panels/fonts/gaia-icons.ts b/src/test/panels/fonts/gaia-icons.ts index 70c683f..b35589d 100644 --- a/src/test/panels/fonts/gaia-icons.ts +++ b/src/test/panels/fonts/gaia-icons.ts @@ -278,7 +278,7 @@ export class PanelFontsGaiaIcons extends LitElement { } [data-icon]:before { - font-family: 'star-icons'; + font-family: 'gaia-icons'; content: attr(data-icon); display: inline-block; font-weight: 400; diff --git a/src/test/panels/fonts/star-icons.ts b/src/test/panels/fonts/star-icons.ts index ff99bf8..e263475 100644 --- a/src/test/panels/fonts/star-icons.ts +++ b/src/test/panels/fonts/star-icons.ts @@ -394,6 +394,7 @@ export class PanelFontsStarIcons extends LitElement { 'stop', 'storage-circle', 'storage', + 'switch-camera-dm', 'switch-camera', 'switch', 'sync', @@ -427,21 +428,36 @@ export class PanelFontsStarIcons extends LitElement { 'voicemail', 'wallpaper', 'wechat', + 'wifi-0-dm', 'wifi-0', + 'wifi-1-dm', 'wifi-1', + 'wifi-2-dm', 'wifi-2', + 'wifi-3-dm', 'wifi-3', + 'wifi-4-dm', 'wifi-4', + 'wifi-lock-0-dm', 'wifi-lock-0', + 'wifi-lock-1-dm', 'wifi-lock-1', + 'wifi-lock-2-dm', 'wifi-lock-2', + 'wifi-lock-3-dm', 'wifi-lock-3', + 'wifi-lock-4-dm', 'wifi-lock-4', + 'wifi-nonet-0-dm', 'wifi-nonet-0', + 'wifi-nonet-1-dm', 'wifi-nonet-1', + 'wifi-nonet-2-dm', 'wifi-nonet-2', + 'wifi-nonet-3-dm', 'wifi-nonet-3', - 'wifi-permissions', + 'wifi-nonet-4-dm', + 'wifi-nonet-4', ] render() { @@ -473,6 +489,38 @@ export class PanelFontsStarIcons extends LitElement { ` )} +

跟随黑暗模式的多色图标(需添加colorful-icon类名)

+ + ${map( + [ + 'switch-camera', + 'wifi-0', + 'wifi-1', + 'wifi-2', + 'wifi-3', + 'wifi-4', + 'wifi-lock-0', + 'wifi-lock-1', + 'wifi-lock-2', + 'wifi-lock-3', + 'wifi-lock-4', + 'wifi-nonet-0', + 'wifi-nonet-1', + 'wifi-nonet-2', + 'wifi-nonet-3', + 'wifi-nonet-4', + ], + (iconname, _) => html` + + ` + )} + ` } } diff --git a/src/test/panels/gesture/examples/test-multitouches.ts b/src/test/panels/gesture/examples/test-multitouches.ts index 9c81583..51fa14f 100644 --- a/src/test/panels/gesture/examples/test-multitouches.ts +++ b/src/test/panels/gesture/examples/test-multitouches.ts @@ -79,25 +79,36 @@ export class PanelTestMultiTouches extends StarBaseElement { return html`


+
@@ -110,6 +121,7 @@ export class PanelTestMultiTouches extends StarBaseElement { sharedStyles, css` star-button { + width: 100%; height: 15vh; } `, diff --git a/src/test/panels/gesture/examples/test-pan.ts b/src/test/panels/gesture/examples/test-pan.ts index cdb6777..25e68da 100644 --- a/src/test/panels/gesture/examples/test-pan.ts +++ b/src/test/panels/gesture/examples/test-pan.ts @@ -40,16 +40,22 @@ export class PanelTestPan extends StarBaseElement { return html`

@@ -62,6 +68,7 @@ export class PanelTestPan extends StarBaseElement { sharedStyles, css` star-button { + width: 100%; height: 20vh; } `, diff --git a/src/test/panels/gesture/examples/test-swipe.ts b/src/test/panels/gesture/examples/test-swipe.ts index f779034..15fb56e 100644 --- a/src/test/panels/gesture/examples/test-swipe.ts +++ b/src/test/panels/gesture/examples/test-swipe.ts @@ -47,15 +47,32 @@ export class PanelTestSwipe extends StarBaseElement { render() { return html` - -
- -
- +
+
+ +
+
` @@ -66,6 +83,7 @@ export class PanelTestSwipe extends StarBaseElement { sharedStyles, css` star-button { + width: 100%; height: 20vh; } `, diff --git a/src/test/panels/gesture/examples/test-tap.ts b/src/test/panels/gesture/examples/test-tap.ts index efa4c5e..dd96fa9 100644 --- a/src/test/panels/gesture/examples/test-tap.ts +++ b/src/test/panels/gesture/examples/test-tap.ts @@ -34,11 +34,26 @@ export class PanelTestTap extends StarBaseElement { render() { return html` - +
- +
- +
` } diff --git a/src/test/panels/li/li.ts b/src/test/panels/li/li.ts index 7c70766..c7d3485 100644 --- a/src/test/panels/li/li.ts +++ b/src/test/panels/li/li.ts @@ -162,11 +162,17 @@ export class PanelLi extends LitElement {
- + @@ -534,7 +541,8 @@ export class PanelLi extends LitElement { @@ -590,7 +599,7 @@ export class PanelLi extends LitElement { type="button" variant="primary" > - + ` }