-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(component): prepend support on textfield & select
BREAKING CHANGE: textfields and selects that have icons (and not prepends) need to be wrapped in an extra div with a class name of "#{$ray-class-prefix}#{$class}__wrapper" re #81
- Loading branch information
Ramin B
committed
May 10, 2019
1 parent
3d0e76e
commit e9ef9d6
Showing
11 changed files
with
399 additions
and
170 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,25 @@ | ||
<div class="ray-form-item"> | ||
<div class="ray-select ray-select--with-icon-left"> | ||
<svg class="ray-select__icon--left" viewBox="0 0 25 25"> | ||
<g id="budicon-profile-picture"> | ||
<path | ||
d="M12.5,4A4.5,4.5,0,1,0,17,8.5,4.5,4.5,0,0,0,12.5,4Zm0,8A3.5,3.5,0,1,1,16,8.5,3.504,3.504,0,0,1,12.5,12Zm0-12A12.4886,12.4886,0,0,0,5.0007,22.4834v0a12.4325,12.4325,0,0,0,14.9983,0v0q.5-.3761.9593-.7988l0,0A12.4869,12.4869,0,0,0,12.5,0Zm0,24a11.4432,11.4432,0,0,1-7.3931-2.7041,7.4887,7.4887,0,0,1,14.7863,0A11.4432,11.4432,0,0,1,12.5,24Zm8.25-3.5061a8.4871,8.4871,0,0,0-16.5,0,11.5,11.5,0,1,1,16.5,0Z" | ||
/> | ||
</g> | ||
</svg> | ||
<select class="ray-select__input"> | ||
<option value="" disabled selected data-ray-placeholder></option> | ||
<option value="Pikachu">WeWork</option> | ||
<option value="Squirtle">WeLive</option> | ||
<option value="Bulbasaur">WeGrow</option> | ||
<option value="Charmander">WeTech</option> | ||
</select> | ||
|
||
<label class="ray-select__label"> | ||
Better Together | ||
</label> | ||
<div class="ray-select__icon--left"> | ||
<svg viewBox="0 0 25 25" style="height: 1rem;"> | ||
<g id="budicon-profile-picture"> | ||
<path | ||
d="M12.5,4A4.5,4.5,0,1,0,17,8.5,4.5,4.5,0,0,0,12.5,4Zm0,8A3.5,3.5,0,1,1,16,8.5,3.504,3.504,0,0,1,12.5,12Zm0-12A12.4886,12.4886,0,0,0,5.0007,22.4834v0a12.4325,12.4325,0,0,0,14.9983,0v0q.5-.3761.9593-.7988l0,0A12.4869,12.4869,0,0,0,12.5,0Zm0,24a11.4432,11.4432,0,0,1-7.3931-2.7041,7.4887,7.4887,0,0,1,14.7863,0A11.4432,11.4432,0,0,1,12.5,24Zm8.25-3.5061a8.4871,8.4871,0,0,0-16.5,0,11.5,11.5,0,1,1,16.5,0Z" | ||
/> | ||
</g> | ||
</svg> | ||
</div> | ||
<div class="ray-select__wrapper"> | ||
<select class="ray-select__input"> | ||
<option value="" disabled selected data-ray-placeholder></option> | ||
<option value="Pikachu">WeWork</option> | ||
<option value="Squirtle">WeLive</option> | ||
<option value="Bulbasaur">WeGrow</option> | ||
<option value="Charmander">WeTech</option> | ||
</select> | ||
<label class="ray-select__label"> | ||
Better Together | ||
</label> | ||
</div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<div class="ray-form-item"> | ||
<div class="ray-select ray-select--with-prepend"> | ||
<div class="ray-select__prepend"> | ||
<svg viewBox="0 0 25 25" style="height: 1rem;"> | ||
<g id="budicon-profile-picture"> | ||
<path | ||
d="M12.5,4A4.5,4.5,0,1,0,17,8.5,4.5,4.5,0,0,0,12.5,4Zm0,8A3.5,3.5,0,1,1,16,8.5,3.504,3.504,0,0,1,12.5,12Zm0-12A12.4886,12.4886,0,0,0,5.0007,22.4834v0a12.4325,12.4325,0,0,0,14.9983,0v0q.5-.3761.9593-.7988l0,0A12.4869,12.4869,0,0,0,12.5,0Zm0,24a11.4432,11.4432,0,0,1-7.3931-2.7041,7.4887,7.4887,0,0,1,14.7863,0A11.4432,11.4432,0,0,1,12.5,24Zm8.25-3.5061a8.4871,8.4871,0,0,0-16.5,0,11.5,11.5,0,1,1,16.5,0Z" | ||
/> | ||
</g> | ||
</svg> | ||
</div> | ||
<div class="ray-select__wrapper"> | ||
<select class="ray-select__input"> | ||
<option value="" disabled selected data-ray-placeholder></option> | ||
<option value="Pikachu">WeWork</option> | ||
<option value="Squirtle">WeLive</option> | ||
<option value="Bulbasaur">WeGrow</option> | ||
<option value="Charmander">WeTech</option> | ||
</select> | ||
|
||
<label class="ray-select__label"> | ||
Better Together | ||
</label> | ||
</div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,49 @@ | ||
<div class="ray-form-item"> | ||
<div class="ray-text-field ray-text-field--with-icon-left"> | ||
<svg class="ray-text-field__icon--left" viewBox="0 0 25 25"> | ||
<g id="budicon-profile-picture"> | ||
<path | ||
d="M12.5,4A4.5,4.5,0,1,0,17,8.5,4.5,4.5,0,0,0,12.5,4Zm0,8A3.5,3.5,0,1,1,16,8.5,3.504,3.504,0,0,1,12.5,12Zm0-12A12.4886,12.4886,0,0,0,5.0007,22.4834v0a12.4325,12.4325,0,0,0,14.9983,0v0q.5-.3761.9593-.7988l0,0A12.4869,12.4869,0,0,0,12.5,0Zm0,24a11.4432,11.4432,0,0,1-7.3931-2.7041,7.4887,7.4887,0,0,1,14.7863,0A11.4432,11.4432,0,0,1,12.5,24Zm8.25-3.5061a8.4871,8.4871,0,0,0-16.5,0,11.5,11.5,0,1,1,16.5,0Z" | ||
/> | ||
</g> | ||
</svg> | ||
|
||
<input | ||
type="text" | ||
class="ray-text-field__input" | ||
id="input-with-icon" | ||
placeholder="Few people are aware..." | ||
/> | ||
<label class="ray-text-field__label" for="input-with-icon"> | ||
Fun fact about Ray Eames | ||
</label> | ||
<div class="ray-text-field__icon--left"> | ||
<svg viewBox="0 0 25 25" style="height: 1rem;"> | ||
<g id="budicon-profile-picture"> | ||
<path | ||
d="M12.5,4A4.5,4.5,0,1,0,17,8.5,4.5,4.5,0,0,0,12.5,4Zm0,8A3.5,3.5,0,1,1,16,8.5,3.504,3.504,0,0,1,12.5,12Zm0-12A12.4886,12.4886,0,0,0,5.0007,22.4834v0a12.4325,12.4325,0,0,0,14.9983,0v0q.5-.3761.9593-.7988l0,0A12.4869,12.4869,0,0,0,12.5,0Zm0,24a11.4432,11.4432,0,0,1-7.3931-2.7041,7.4887,7.4887,0,0,1,14.7863,0A11.4432,11.4432,0,0,1,12.5,24Zm8.25-3.5061a8.4871,8.4871,0,0,0-16.5,0,11.5,11.5,0,1,1,16.5,0Z" | ||
/> | ||
</g> | ||
</svg> | ||
</div> | ||
<div class="ray-text-field__wrapper"> | ||
<input | ||
type="text" | ||
class="ray-text-field__input" | ||
id="input-with-icon" | ||
placeholder="Few people are aware..." | ||
/> | ||
<label class="ray-text-field__label" for="input-with-icon"> | ||
Fun fact about Ray Eames | ||
</label> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div class="ray-form-item"> | ||
<div class="ray-text-field ray-text-field--with-icon-right"> | ||
<svg class="ray-text-field__icon--right" viewBox="0 0 25 25"> | ||
<g id="budicon-profile-picture"> | ||
<path | ||
d="M12.5,4A4.5,4.5,0,1,0,17,8.5,4.5,4.5,0,0,0,12.5,4Zm0,8A3.5,3.5,0,1,1,16,8.5,3.504,3.504,0,0,1,12.5,12Zm0-12A12.4886,12.4886,0,0,0,5.0007,22.4834v0a12.4325,12.4325,0,0,0,14.9983,0v0q.5-.3761.9593-.7988l0,0A12.4869,12.4869,0,0,0,12.5,0Zm0,24a11.4432,11.4432,0,0,1-7.3931-2.7041,7.4887,7.4887,0,0,1,14.7863,0A11.4432,11.4432,0,0,1,12.5,24Zm8.25-3.5061a8.4871,8.4871,0,0,0-16.5,0,11.5,11.5,0,1,1,16.5,0Z" | ||
/> | ||
</g> | ||
</svg> | ||
|
||
<input | ||
type="text" | ||
class="ray-text-field__input" | ||
id="input-with-icon2" | ||
placeholder="Few people are aware..." | ||
/> | ||
<label class="ray-text-field__label" for="input-with-icon2"> | ||
Fun fact about Ray Eames | ||
</label> | ||
<div class="ray-text-field__icon--right"> | ||
<svg viewBox="0 0 25 25" style="height: 1rem;"> | ||
<g id="budicon-profile-picture"> | ||
<path | ||
d="M12.5,4A4.5,4.5,0,1,0,17,8.5,4.5,4.5,0,0,0,12.5,4Zm0,8A3.5,3.5,0,1,1,16,8.5,3.504,3.504,0,0,1,12.5,12Zm0-12A12.4886,12.4886,0,0,0,5.0007,22.4834v0a12.4325,12.4325,0,0,0,14.9983,0v0q.5-.3761.9593-.7988l0,0A12.4869,12.4869,0,0,0,12.5,0Zm0,24a11.4432,11.4432,0,0,1-7.3931-2.7041,7.4887,7.4887,0,0,1,14.7863,0A11.4432,11.4432,0,0,1,12.5,24Zm8.25-3.5061a8.4871,8.4871,0,0,0-16.5,0,11.5,11.5,0,1,1,16.5,0Z" | ||
/> | ||
</g> | ||
</svg> | ||
</div> | ||
<div class="ray-text-field__wrapper"> | ||
<input | ||
type="text" | ||
class="ray-text-field__input" | ||
id="input-with-icon2" | ||
placeholder="Few people are aware..." | ||
/> | ||
<label class="ray-text-field__label" for="input-with-icon2"> | ||
Fun fact about Ray Eames | ||
</label> | ||
</div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<div class="ray-form-item"> | ||
<div class="ray-text-field ray-text-field--with-prepend"> | ||
<div class="ray-text-field__prepend"> | ||
<svg viewBox="0 0 25 25" style="height: 1rem;"> | ||
<g id="budicon-profile-picture"> | ||
<path | ||
d="M12.5,4A4.5,4.5,0,1,0,17,8.5,4.5,4.5,0,0,0,12.5,4Zm0,8A3.5,3.5,0,1,1,16,8.5,3.504,3.504,0,0,1,12.5,12Zm0-12A12.4886,12.4886,0,0,0,5.0007,22.4834v0a12.4325,12.4325,0,0,0,14.9983,0v0q.5-.3761.9593-.7988l0,0A12.4869,12.4869,0,0,0,12.5,0Zm0,24a11.4432,11.4432,0,0,1-7.3931-2.7041,7.4887,7.4887,0,0,1,14.7863,0A11.4432,11.4432,0,0,1,12.5,24Zm8.25-3.5061a8.4871,8.4871,0,0,0-16.5,0,11.5,11.5,0,1,1,16.5,0Z" | ||
/> | ||
</g> | ||
</svg> | ||
</div> | ||
<div class="ray-text-field__wrapper"> | ||
<input | ||
type="text" | ||
class="ray-text-field__input" | ||
id="input-with-icon" | ||
placeholder="Few people are aware..." | ||
/> | ||
<label class="ray-text-field__label" for="input-with-icon"> | ||
Fun fact about Ray Eames | ||
</label> | ||
</div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.