From a14d9ff6d51b3196640fbf3c085b9318bd15e163 Mon Sep 17 00:00:00 2001 From: Yuriy Yevstihnyeyev Date: Thu, 29 Nov 2018 14:16:53 +0200 Subject: [PATCH 01/13] Update themes styles --- theme/lumo/vaadin-text-area-styles.html | 9 +++-- theme/lumo/vaadin-text-field-styles.html | 39 +++++++++++++++----- theme/material/vaadin-text-field-styles.html | 32 +++++++++++----- 3 files changed, 57 insertions(+), 23 deletions(-) diff --git a/theme/lumo/vaadin-text-area-styles.html b/theme/lumo/vaadin-text-area-styles.html index 9f49d8e1..38344c11 100644 --- a/theme/lumo/vaadin-text-area-styles.html +++ b/theme/lumo/vaadin-text-area-styles.html @@ -5,7 +5,8 @@ + + From 261a6084573d5e0baf7ba0bdadb367f041cc168c Mon Sep 17 00:00:00 2001 From: Yuriy Yevstihnyeyev Date: Thu, 29 Nov 2018 15:27:10 +0200 Subject: [PATCH 05/13] Fix clear button change event --- src/vaadin-text-field-mixin.html | 14 ++++++++------ test/text-field.html | 2 +- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/vaadin-text-field-mixin.html b/src/vaadin-text-field-mixin.html index 6000c48b..9f3cab00 100644 --- a/src/vaadin-text-field-mixin.html +++ b/src/vaadin-text-field-mixin.html @@ -350,6 +350,13 @@ if (newVal === '' && oldVal === undefined) { return; } + + if (newVal !== '' && newVal != null) { + this.hasValue = true; + } else { + this.hasValue = false; + } + if (this.__userInput) { this.__userInput = false; return; @@ -362,11 +369,6 @@ if (this.invalid) { this.validate(); } - if (newVal !== '' && newVal != null) { - this.hasValue = true; - } else { - this.hasValue = false; - } } _labelChanged(label) { @@ -526,7 +528,7 @@ this.focusElement.focus(); this.clear(); this._valueClearing = false; - this.focusElement.dispatchEvent(new Event('change', {bubbles: true})); + this.focusElement.dispatchEvent(new Event('change', {bubbles: !this._slottedInput})); } _onKeyDown(e) { diff --git a/test/text-field.html b/test/text-field.html index 5875f9c0..c3c0d4e6 100644 --- a/test/text-field.html +++ b/test/text-field.html @@ -130,7 +130,7 @@ expect(textField._valueClearing).to.be.true; // Emulates native change coming from input. - textField.focusElement.dispatchEvent(new Event('change', {bubbles: true})); + textField.focusElement.dispatchEvent(new Event('change', {bubbles: !condition})); textField.$.clearButton.dispatchEvent(new CustomEvent('click')); expect(textField._valueClearing).to.be.false; From 6d444cfa327ac4473f2e28522cfecc0833df26b5 Mon Sep 17 00:00:00 2001 From: Yuriy Yevstihnyeyev Date: Thu, 29 Nov 2018 16:03:58 +0200 Subject: [PATCH 06/13] Fix IE11 change event test and workaround --- src/vaadin-text-field-mixin.html | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/src/vaadin-text-field-mixin.html b/src/vaadin-text-field-mixin.html index 9f3cab00..81169a22 100644 --- a/src/vaadin-text-field-mixin.html +++ b/src/vaadin-text-field-mixin.html @@ -460,20 +460,12 @@ } _addInputListeners(node) { - if (!node) { - return; - } - node.addEventListener('input', this._boundOnInput); node.addEventListener('change', this._boundOnChange); node.addEventListener('blur', this._boundOnBlur); } _removeInputListeners(node) { - if (!node) { - return; - } - node.removeEventListener('input', this._boundOnInput); node.removeEventListener('change', this._boundOnChange); node.removeEventListener('blur', this._boundOnBlur); @@ -489,7 +481,11 @@ const defaultInput = this.shadowRoot.querySelector('[part="value"]'); this._slottedInput = this.querySelector(`${this._slottedTagName}[slot="${this._slottedTagName}"]`); this._addInputListeners(defaultInput); - this._addInputListeners(this._slottedInput); + this._addIEListeners(defaultInput); + if (this._slottedInput) { + this._addIEListeners(this._slottedInput); + this._addInputListeners(this._slottedInput); + } this.shadowRoot.querySelector('[name="input"], [name="textarea"]') .addEventListener('slotchange', this._onSlotChange.bind(this)); @@ -505,8 +501,6 @@ var uniqueId = Vaadin.TextFieldMixin._uniqueId = 1 + Vaadin.TextFieldMixin._uniqueId || 0; this._errorId = `${this.constructor.is}-error-${uniqueId}`; this._labelId = `${this.constructor.is}-label-${uniqueId}`; - - this._addIEListeners(defaultInput); } /** From 7ff31e4b52da2098ddf5b73c311078fee8c77e7c Mon Sep 17 00:00:00 2001 From: Yuriy Yevstihnyeyev Date: Thu, 29 Nov 2018 16:42:55 +0200 Subject: [PATCH 07/13] Add visual tests and screenshots --- .../password-field-custom-input/chrome.png | Bin 0 -> 1439 bytes .../password-field-custom-input/firefox.png | Bin 0 -> 1134 bytes .../password-field-custom-input/chrome.png | Bin 0 -> 1036 bytes .../password-field-custom-input/firefox.png | Bin 0 -> 901 bytes .../text-area-custom-textarea/chrome.png | Bin 0 -> 1217 bytes .../text-area-custom-textarea/firefox.png | Bin 0 -> 934 bytes .../text-area-custom-textarea/chrome.png | Bin 0 -> 704 bytes .../text-area-custom-textarea/firefox.png | Bin 0 -> 671 bytes .../text-field-custom-input/chrome.png | Bin 0 -> 1163 bytes .../text-field-custom-input/firefox.png | Bin 0 -> 816 bytes .../text-field-custom-input/chrome.png | Bin 0 -> 682 bytes .../text-field-custom-input/firefox.png | Bin 0 -> 651 bytes .../password-field-custom-input.html | 29 ++++++++++++++++++ .../text-area-custom-textarea.html | 29 ++++++++++++++++++ .../text-field-custom-input.html | 29 ++++++++++++++++++ 15 files changed, 87 insertions(+) create mode 100644 test/visual/screens/vaadin-text-field/password-field-custom-input-lumo/password-field-custom-input/chrome.png create mode 100644 test/visual/screens/vaadin-text-field/password-field-custom-input-lumo/password-field-custom-input/firefox.png create mode 100644 test/visual/screens/vaadin-text-field/password-field-custom-input-material/password-field-custom-input/chrome.png create mode 100644 test/visual/screens/vaadin-text-field/password-field-custom-input-material/password-field-custom-input/firefox.png create mode 100644 test/visual/screens/vaadin-text-field/text-area-custom-textarea-lumo/text-area-custom-textarea/chrome.png create mode 100644 test/visual/screens/vaadin-text-field/text-area-custom-textarea-lumo/text-area-custom-textarea/firefox.png create mode 100644 test/visual/screens/vaadin-text-field/text-area-custom-textarea-material/text-area-custom-textarea/chrome.png create mode 100644 test/visual/screens/vaadin-text-field/text-area-custom-textarea-material/text-area-custom-textarea/firefox.png create mode 100644 test/visual/screens/vaadin-text-field/text-field-custom-input-lumo/text-field-custom-input/chrome.png create mode 100644 test/visual/screens/vaadin-text-field/text-field-custom-input-lumo/text-field-custom-input/firefox.png create mode 100644 test/visual/screens/vaadin-text-field/text-field-custom-input-material/text-field-custom-input/chrome.png create mode 100644 test/visual/screens/vaadin-text-field/text-field-custom-input-material/text-field-custom-input/firefox.png create mode 100644 test/visual/vaadin-password-field/password-field-custom-input.html create mode 100644 test/visual/vaadin-text-area/text-area-custom-textarea.html create mode 100644 test/visual/vaadin-text-field/text-field-custom-input.html diff --git a/test/visual/screens/vaadin-text-field/password-field-custom-input-lumo/password-field-custom-input/chrome.png b/test/visual/screens/vaadin-text-field/password-field-custom-input-lumo/password-field-custom-input/chrome.png new file mode 100644 index 0000000000000000000000000000000000000000..ff858482afa7b264e7cf07a811f9675ee0e63427 GIT binary patch literal 1439 zcmZ{kX*3%M5XTd@kXlzA)kZbW)mWY)B-*+vh_j7EP*me+Q&Nu=N2qmHsXJ9sl{&Tu zt6id6l%lC9LAK6PSL%rSYON)k{jgv9c0bI_n|brz{NK!*Uxusm1u#ez1ONcQD0>@s zLHs1Ja}r_#PdZd-0suq_D4X*aqiHJ>KEWPAYRru=LhKWh6t8QK6+??JZG7l8BKcXM z(hO8u@x;oAe#3>r7PlzV@SoO)p8BAb6~xSmESd)c_eNHkOMkP9CvcD+M($9mOJJm(C19Fn&4ei@Alq;req}{_c#JJ65 zs%NG-$&Lw;cR^?t|8crFuf-dt1do_(M<$#gW0poM;!Fzfa3!<0TT@|rht>%r`Fy_iAb_a6cyBE5&F+h9cwPg2S{*rDOKJ(DQqoH{K3^8+yaHsu>fedXb}-^ssFm;?)s{rchU=Uw37d< zdJ39pChd!4qxgVRLmCK+CpbLL>co-qW2N3rCLbjB3TnL4n0VWoVgI@{nO7DuAz{Qy zIzcHCQkX-1Cz+*xUm6UKm|HM3SwXZt-i_#-mGqm@>d*9{M46g!Hb0tvI@mAc`^w+d zHv34)Mq9{)3wl#iQ_*+yRIc3_55mJ&A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JNwHA>i(vF zonpNDRL;%b=J1@X(#W9tFBRSqn`Y~-ai5s|bZz|kt#O{0{JuqAy%CVIL*Raq+w0PK z3o{em?<@a1#rV4Dz9e(LxQi>zyQB9UpZUsoVM3zr>YkM%vEdu6+)~B5qR#|WvaS)n zeBj>C3K#jgB}!I{{C5Fet8Ha!AQtL!>C%}cayp@Fd>(F4nzZfNa?`r}pvT|UObz!d zuMEF__-W#9@BXfGv1-$(ok!OQKb|dP{^e+S`KrYhAJ@h2J$}%7-K#LAD8b84g|ox$ z;;yZ}cw|A9is$UA7{S<|6}3NuR)*M#b+Mg}Qp8HGY{J0yg%H(|brDT`3Wk^lopD)L> z{Y&QvGdU-7^UK-qEflPnC1(IkHApFY9rNd(HDaF`;;OgSe2ZnjcInLA+KOP^`L)*@ zfr{|imgufKahLs1T-$O# z`_pgHH#w`H1|10A(anLBWl-%z$xR3;4F%8a?Chw>$ek~CGVmVXzH#G3ezx=9x&;~T bRC2Dbh~NJz+Wru*9AWTu^>bP0l+XkK0ofU% literal 0 HcmV?d00001 diff --git a/test/visual/screens/vaadin-text-field/password-field-custom-input-material/password-field-custom-input/chrome.png b/test/visual/screens/vaadin-text-field/password-field-custom-input-material/password-field-custom-input/chrome.png new file mode 100644 index 0000000000000000000000000000000000000000..685c6736a3924ec1d80a16c20d062a3b33549b57 GIT binary patch literal 1036 zcmeAS@N?(olHy`uVBq!ia0vp^cYxT1gAGW&%8y>pz`%Uj)5S5QV$R!JiUq4Z7}`I+ z&(oUV@#NH84V85sDvOvTBLf2^BY&p2xTd7IunKj$EHXMV^~BU2))TjRe$IQAc5B1j z>Hq4D=f2EQh@H4TN9Ryxbkzt+L-Zc63GuhnDi(me|$<6m%_FU-}hdE*) zu6>=)=k_&CUi~!oY~JOE_t+jy*>q;3np)DK-HqGUy|n$YFYz*e%6HMHJy%~^&xujB ze{*Bbu{18ZaM78*9m)z_o;hw?tCkq#vs>;u+jh60&UDWleOB{r+C|wX!*w73&N!bo zGjX%(?0*$G`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-8;I7HdrW0?b|vp00i_>zopr0MXu(m;e9( literal 0 HcmV?d00001 diff --git a/test/visual/screens/vaadin-text-field/text-area-custom-textarea-lumo/text-area-custom-textarea/chrome.png b/test/visual/screens/vaadin-text-field/text-area-custom-textarea-lumo/text-area-custom-textarea/chrome.png new file mode 100644 index 0000000000000000000000000000000000000000..a459edba9fb654d616c5de9745d72c8eaddc31e3 GIT binary patch literal 1217 zcmeAS@N?(olHy`uVBq!ia0vp^cYrvBgAGW&JsdZafq|vN)5S5QV$Rz;{vNZ-WsZM5 zzc?~zb>r5lJ5Q$Nx-WN8>o`khp>;vHsLG$F9Y@e(BGWjar#pvf2NcdEkBh4-XE1eqQ}! zZ{;NUMZ&#qo0&GeWNK`%nIyv3{@Ip$!`h`mD}NvK3^I^7^W5gZHnINWq8uzCQ{Fo^ z%x!tV;LO4ig2cLmUL4#rwGmoH5!imrKm)qQU6y#Q1{%mSwWT@Hc`6)@i zi)7sAJyM$bR&V0@*LKp^^LMl!O+9;O-sPgS)*Bn%rf!bZO%F3EuJ+^ZKE3Y!W2+tZ z&&6ZxMQ)rbiu}E<`ShAKyXrJHOntiPTP*wW;~sB9cCM){(`3Zugbp08d-}!R*DNc` zVv+FT|2A?~ri+Z-PwBWZa5Z@rl!v}px-HH2@$UK~`|oFeuUNn!!S;R0Jo{@4C)|J6 z>9Ej{=iU9YetsD#6)~MBC6|V-`gM41)!NO@y8dgdGe3&QcJ{u!+`0N!o}bqJ=+zf4 z@|AAAe(L)HYv$I)3TD2S;^$s|o!|eW%Y4OT=Je8kA*;XDTCdx;uGs5Nly!F0#(8mH zd;hO{mArS?kGl1J<~o{&U*=V{FaK<5w;{1Df5#F(ccs^L`B!Fcv}^ryU3CA1kX`S5 zYt1gKD)J0kJBx4XE0=H|al83pD?Vo~Rkyo#;e1>v56`OI58uhYdM&jzf2DKn;$$zE zUq5zqHBCS6JNbCX%c)d_QLTm30A!e@))A zs(xMIt~poMo2v@SaLLS8YgqWFzJ2woK#!nDpT2voxBqv0$~wH3oJ-TYdHUl!hbwSVEe#l4^Id%e1JVaK|uvKN1D zTdv~Ce(PR9N=d-Rf8{2(Z>|&P_q6xx$$pZ(e%3DKti;(u(GLHbCzmX!4G{l+Oyu_y z@44^fr|+r0QuJeo-K#oR(`?0`vr3AdtXb8b)Wu)Fz}q`0HFWc#_up1MZtdE0jz4D# zC{aHwh&Y(=VWHlhng5a}yD@RyfBdxH?#fSFTU)O7!>k`<`EEF(q+eW#2bi>}E47pF zT;ZJm#e4~;Po%!x&37*N%xOXEV7=`7U#Bir-3?3qa@)no@b+yEEFGH?7Js zdtJq`;DTkJvVY;kQ)SanJTINw`}={)$>(2BJpcN-#cQcZ|8Y=` le_IL6|JUjma@Or<=*fIL?bpSv%D|$D!PC{xWt~$(698^6GRgn| literal 0 HcmV?d00001 diff --git a/test/visual/screens/vaadin-text-field/text-area-custom-textarea-lumo/text-area-custom-textarea/firefox.png b/test/visual/screens/vaadin-text-field/text-area-custom-textarea-lumo/text-area-custom-textarea/firefox.png new file mode 100644 index 0000000000000000000000000000000000000000..c03df7019f294fa99e615fa49dd616f0f87f6153 GIT binary patch literal 934 zcmeAS@N?(olHy`uVBq!ia0vp^H-I>egAGWod=USFfq^;K)5S5QV$Rz;_8wCTWsZM5 z|M|{h#TBKdKid~gQz*#*0-lF#6Sdi=FHp@W%Hnj-T%nl58O0YRrPImgD5YPJkrB`& zaOz-=mh<8hm!C^$A?@Pm$vq#NgEYjJ1;FtEUu!(U#e}DR_dH!0m{Cif^x|oYs|B0nH$ejK% z7vc1mARvzAKmSitf`ZaSYOW z>9RB2-O9Qm*5#pV;1cDzvQ~9#+&x!{?Af>W``#d#)iqmo&s}<8;UP_>1eb&c!A3?m z7B&e%3BsICm9=ZuWMpP)zTV5wD!g{xIFVdQ I&MBb@0J$)ag#Z8m literal 0 HcmV?d00001 diff --git a/test/visual/screens/vaadin-text-field/text-area-custom-textarea-material/text-area-custom-textarea/chrome.png b/test/visual/screens/vaadin-text-field/text-area-custom-textarea-material/text-area-custom-textarea/chrome.png new file mode 100644 index 0000000000000000000000000000000000000000..a5a8d5252e60669db05a1e18302a3e15db71f1e1 GIT binary patch literal 704 zcmeAS@N?(olHy`uVBq!ia0vp^cYxT7gAGVtNVU4pz`)e*>EaktG3V_a#ezox60Q$- zTX%S9+$8X1!Zl4sS~H3&`=YK>^$;z)w{CYcQsXKpZ@Z- z#@O(Kx=k_LCy5_s^Uv3FIK01Pa@Aqdy7lYN?-f(Xy8ZTBdBLQT%F4=fUl{_U*I)O# z9CH8sUV#VNiWUbt9xy03G52ur87L9pEI#;K`Tw;wP0P0D+m{#L&ze@c(@J2z-$Bnw zYTj43?{r%)=QrtGINPGjwic>VYMn2*E9O6y%L~^JeUjWNU@}uL#I${KTEqEu-yht{ zTD2#~G|p~CrdgC|=c~+xp`SNODzM#cuHJLef~9r(@nX$(_t4XGyF!;nngvbb5&abO z^wEObn}Vv}@CbCiJLo%Y)oi!3ryo~VZ_53$AZGH1=bDK%OE2VYxh-$W?6T;(@8rM1 z+M2(sj~AKz+Pb>(439u}-1~=Zixpn>ZeOu{?kxT@3>#mRUsg%kb*cGP_|q-3qkbD) zJNn^-q=L|2w&^}0I(i{zxz^57m*uP8TDr1m=k+x@B7Jiil`j6i&a`kxcr074Soo<; z8`G{j{;XX)`%SX31CLeitdz~)R^>#sYnGr8nXShjK= dKf~W&oP37Iv=aU~9S5dN22WQ%mvv4FO#p=LD!Tvx literal 0 HcmV?d00001 diff --git a/test/visual/screens/vaadin-text-field/text-area-custom-textarea-material/text-area-custom-textarea/firefox.png b/test/visual/screens/vaadin-text-field/text-area-custom-textarea-material/text-area-custom-textarea/firefox.png new file mode 100644 index 0000000000000000000000000000000000000000..c22b5ecc4bc34f567725fecc71e2598441cab978 GIT binary patch literal 671 zcmeAS@N?(olHy`uVBq!ia0vp^H-OlOgAGXXU$5N3z`&H|>EaktG3V`_jajb>B-%c1 zXHQoQ7dY{5l6FU{-`yie4bxvdy0I~ZOV+yVWr5MIj_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)qMHLp)_$dPoL2|pbw`X zo*d+?U^M69_kvVa)fH!xOM>i_6 z=2zG>cHfV8T6(+n(-q<}S_1`|@z@_Wq>2I>zs2rV2v6i}Y{wKYH}_ zMxDQ`i0eVKcv-h|eT$xNy?*iDF6OJDadZBah%7%>(-zBrzn?37=f&ktTXYUL2aB-s z-?`qj=~2=b+1JPKF|R-LP^01fJ1Ltl3DPm=j2IeDhqg8Amn_`=-dV=>T7N{2*lhFA z})wG$eC2&(j*}>QGv}}r31<>VLx7P61>hU{oQN6b90V&D?eQZO2+$jPHcZ^r*ScA z+POQ||LQC~TP3?LT&Cu!!PA!iucsc)wB3`lbw=V=k!7C+T`XJ8lQ7Ihvj&ZOhCzU< tRe*=BSB^XIn(^vYUHj`gGD`n)hO-G83m%=m5?IJEc)I$ztaD0e0s!{_BjEr5 literal 0 HcmV?d00001 diff --git a/test/visual/screens/vaadin-text-field/text-field-custom-input-lumo/text-field-custom-input/firefox.png b/test/visual/screens/vaadin-text-field/text-field-custom-input-lumo/text-field-custom-input/firefox.png new file mode 100644 index 0000000000000000000000000000000000000000..13c37edfad6f442212e90d978aa0eda57b42487f GIT binary patch literal 816 zcmeAS@N?(olHy`uVBq!ia0vp^H-OlQgAGWU-jz7Pz`*p~)5S5QV$R#UwjR=nGRHsO zj}>zDxD;po)5&|cNEe^1m4$_vVzbAp=I#eUFP=OJl3D6(EfU+J*Qm$0G02MJk|Aq5 zpX`(-j$F3*W!DxROmC39aGqlPyPA#{Q@xh9F~scJx6f{= z>dFWmx4q&Df#1G;6Ja@c|A30-{PXTRW*$L_ zgpLCY&Ma&aN(Ki68X4OziTBSb7izm@ZxQnMM?~U@aLI`=``&9#_S2sJHo$6XQT+Q| z4^()**5=2%Z?!5^{CH@?!o^Xs_H}YERCwlIw`Si~U*Hk3qX;P69KV0=bxZcJ)$-Q& zSv;De_P*P5%yNTU^K$WZ%fjy6v2bOoEGh12%ExxHp>`DLlu_btk6GnTDc**>kD z?a@IK1J6r;Id%7FtvLS2&Ee07E)I!J^-Zx4?qsJtoT)XLe@=RXMb{V3ZC2K+HvWvR z+87j;x^&H{Q*+c-pEou5eKV7-L;LrEeN#-#ELJsMo_{@R>XNysdn2c{rOjLMzhpPg^nD{IioG-Fo zySq59_QG-h^mXswyjuP4rC<4EV}~AB@rZE8$E+{^e%XKjq>AV6sG7)2RS!41?V2@* zF-hlA@~?jXXg}r`4aX1vSnzS_1v_E9Y(xs(ktAiKKyUYd_=Ha27C0(Vg77$ zK1tr;&DKvh%lX#m3je&H!89@B>E`z`5qh^3??2aUTYdDq?bA)N?_S4pz`#`K>EaktG3V`V#R<0pMBEZ}nK?PQkhbWl(h*`K;R%_8wa0(3kg!MYHU8`KfRW@tM32aqw6l|WEGVj zuBmzd#338K9$zF?P+9bZD8mUuW<3Rmt5X~EM99bR&dhK^;JnkpQtPI z*-cR&*IiKB1#gTe~DWM4ffuI|t literal 0 HcmV?d00001 diff --git a/test/visual/screens/vaadin-text-field/text-field-custom-input-material/text-field-custom-input/firefox.png b/test/visual/screens/vaadin-text-field/text-field-custom-input-material/text-field-custom-input/firefox.png new file mode 100644 index 0000000000000000000000000000000000000000..f05e319b6058573cb175bb4aca0d21e3998460c8 GIT binary patch literal 651 zcmeAS@N?(olHy`uVBq!ia0vp^H-OlUgAGWo^NG60z`zvb>EaktG3V{Ajajb>B-%c1 zXHQoQ7dY{5l6FU{-`yie4bxvdy0I~ZOV+yVWr5MIj_Bo1k3~}oMVjIor(ZCZ(RDx9 zxaw`UN^RYPB)bpMazg*B0!5C_W~kX2w|;q_3NKr8@q4B%r_weD3b52OOz4}~j zL)gr-X;M6FzY5>EHkc_J9OyW}pv=VF!@*;qL>_0w=Z`1$KP#VD=l8EZ_si;QwVyhB z8^kO%4LpP9temrqYkz^{g4_xhmYy|@Yr7XN(x|HE?f&X%>=1mDDO%k5Yq6$w_SMq0 zyUr}xvtRszqOrr|xpEOxSO330SG`NgwfytjqdVt)@+$ncpya!%uFuyAM^}APKg&Ol zan{=}2OjyP?%n(OP2BFshktgfb(PlctY;C5i_^a5qW_sWy`k;#1ZI%0P6$U7EuE-k zyZ@bh*qZqHp_xloKRF<|;Gs|X1{d?lHCp?x{%(A*>q2gv=DEBnGB(U6w_pB$^21?< zUuf2fI{Tn~wfg70d@p}kA-UkBAD7O~^`Y_x;>&`szI>kEu + + + + + + + + + + + +
+ + + +
+ + diff --git a/test/visual/vaadin-text-area/text-area-custom-textarea.html b/test/visual/vaadin-text-area/text-area-custom-textarea.html new file mode 100644 index 00000000..539c3d1b --- /dev/null +++ b/test/visual/vaadin-text-area/text-area-custom-textarea.html @@ -0,0 +1,29 @@ + + + + + + + + + + + + +
+ + + +
+ + diff --git a/test/visual/vaadin-text-field/text-field-custom-input.html b/test/visual/vaadin-text-field/text-field-custom-input.html new file mode 100644 index 00000000..1ae28129 --- /dev/null +++ b/test/visual/vaadin-text-field/text-field-custom-input.html @@ -0,0 +1,29 @@ + + + + + + + + + + + + +
+ + + +
+ + From 41c008daf942eb83bc745016c374bd97351936d4 Mon Sep 17 00:00:00 2001 From: Yuriy Yevstihnyeyev Date: Fri, 30 Nov 2018 16:07:32 +0200 Subject: [PATCH 08/13] Add placeholder styles and update demos, docs --- demo/index.html | 8 ++ demo/text-field-custom-demos.html | 29 +++++--- src/vaadin-password-field.html | 17 +++++ src/vaadin-text-area.html | 17 +++++ src/vaadin-text-field.html | 17 +++++ theme/lumo/vaadin-placeholder-styles.html | 73 +++++++++++++++++++ theme/lumo/vaadin-text-field-styles.html | 28 ++----- theme/material/vaadin-placeholder-styles.html | 66 +++++++++++++++++ theme/material/vaadin-text-field-styles.html | 24 ++---- 9 files changed, 234 insertions(+), 45 deletions(-) create mode 100644 theme/lumo/vaadin-placeholder-styles.html create mode 100644 theme/material/vaadin-placeholder-styles.html diff --git a/demo/index.html b/demo/index.html index a296cc7d..c12e0af4 100644 --- a/demo/index.html +++ b/demo/index.html @@ -18,6 +18,7 @@ + @@ -35,6 +36,13 @@ + + + + + diff --git a/demo/text-field-custom-demos.html b/demo/text-field-custom-demos.html index 9e986f82..5d199684 100644 --- a/demo/text-field-custom-demos.html +++ b/demo/text-field-custom-demos.html @@ -6,6 +6,26 @@ } +

Custom Input

+

+ Note: In order to apply lumo or material theme styles to the placeholder + of the slotted input you should explicitly import a file + `theme/lumo/vaadin-placeholder-styles.html` or `theme/material/vaadin-placeholder-styles.html` + and include styles into the same scope as `vaadin-text-field`: + <custom-style><style include="lumo-placeholder-styles"></style></custom-style> OR + <custom-style><style include="material-placeholder-styles"></style></custom-style> +

+ + + +

Number Input

Note: All properties and attributes that `vaadin-text-field` has should be defined on the host. @@ -27,15 +47,6 @@

Email Input

-

Phone Input

- - - -

Password Field

-

Number Input

-

- Note: All properties and attributes that `vaadin-text-field` has should be defined on the host. -

- - -

Email Input

From 3da72921c235865ea218270dde732595fc11ba33 Mon Sep 17 00:00:00 2001 From: Yuriy Yevstihnyeyev Date: Tue, 4 Dec 2018 10:21:34 +0200 Subject: [PATCH 11/13] Remove vaadin field specific selectors from placeholder styles --- theme/lumo/vaadin-placeholder-styles.html | 60 ++++++++----------- theme/material/vaadin-placeholder-styles.html | 40 +++++-------- 2 files changed, 40 insertions(+), 60 deletions(-) diff --git a/theme/lumo/vaadin-placeholder-styles.html b/theme/lumo/vaadin-placeholder-styles.html index 9a27977a..64f99ede 100644 --- a/theme/lumo/vaadin-placeholder-styles.html +++ b/theme/lumo/vaadin-placeholder-styles.html @@ -1,71 +1,59 @@