-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(components): add styles for multi-select (#494)
* feat(components): add styles for multi-select * fix(MultiSelect,ListBox): update selectors and HTML examples
- Loading branch information
Showing
8 changed files
with
1,725 additions
and
75 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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# `multi-select` | ||
|
||
### SCSS | ||
|
||
#### Classes | ||
|
||
| Name | Description | | ||
|:------|:-------------| | ||
| `.bx--multi-select` | Used on a container node to specify its control type | |
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,21 @@ | ||
//----------------------------- | ||
// List Box | ||
//----------------------------- | ||
|
||
@import '../../globals/scss/colors'; | ||
@import '../../globals/scss/css--helpers'; | ||
@import '../../globals/scss/layout'; | ||
@import '../../globals/scss/import-once'; | ||
@import '../../globals/scss/vars'; | ||
@import '../list-box/list-box'; | ||
|
||
@include exports('multi-select') { | ||
.bx--multi-select.bx--combo-box > .bx--list-box__field { | ||
padding: 0 1rem; | ||
} | ||
|
||
.bx--multi-select.bx--combo-box input[role='combobox'] { | ||
padding: 0; | ||
outline: none; | ||
} | ||
} |
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,80 @@ | ||
<div class="bx--form-item bx--multi-select bx--list-box bx--list-box--inline"> | ||
<div role="button" class="bx--list-box__field" tabindex="0" aria-label="open menu" aria-expanded="false" aria-haspopup="true"> | ||
<span class="bx--list-box__label">Label</span> | ||
<div class="bx--list-box__menu-icon"> | ||
<svg fill-rule="evenodd" height="5" name="caret--down" role="img" viewBox="0 0 10 5" width="10" aria-label="Open menu"> | ||
<title>Open menu</title> | ||
<path d="M10 0L5 5 0 0z"></path> | ||
</svg> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="bx--form-item bx--multi-select bx--list-box bx--list-box--inline"> | ||
<div role="button" class="bx--list-box__field" tabindex="0" aria-label="close menu" aria-expanded="true" aria-haspopup="true"> | ||
<span class="bx--list-box__label">Label</span> | ||
<div class="bx--list-box__menu-icon bx--list-box__menu-icon--open"> | ||
<svg fill-rule="evenodd" height="5" name="caret--down" role="img" viewBox="0 0 10 5" width="10" aria-label="Close menu"> | ||
<title>Close menu</title> | ||
<path d="M10 0L5 5 0 0z"></path> | ||
</svg> | ||
</div> | ||
</div> | ||
<div class="bx--list-box__menu"> | ||
<div class="bx--list-box__menu-item" id="downshift-1-item-0"> | ||
<div class="bx--form-item bx--checkbox-wrapper"> | ||
<label for="downshift-1-item-0" class="bx--checkbox-label"> | ||
<input type="checkbox" name="Option 1" readonly="" tabindex="-1" class="bx--checkbox" id="downshift-1-item-0" value="on"> | ||
<span class="bx--checkbox-appearance"> | ||
<svg class="bx--checkbox-checkmark" fill-rule="evenodd" height="9" name="checkmark" role="img" viewBox="0 0 12 9" width="12" aria-label="Select this item"> | ||
<title>Select this item</title> | ||
<path d="M4.1 6.1L1.4 3.4 0 4.9 4.1 9l7.6-7.6L10.3 0z"></path> | ||
</svg> | ||
</span> | ||
<span class="bx--checkbox-label-text">Option 1</span> | ||
</label> | ||
</div> | ||
</div> | ||
<div class="bx--list-box__menu-item" id="downshift-1-item-1"> | ||
<div class="bx--form-item bx--checkbox-wrapper"> | ||
<label for="downshift-1-item-1" class="bx--checkbox-label"> | ||
<input type="checkbox" name="Option 2" readonly="" tabindex="-1" class="bx--checkbox" id="downshift-1-item-1" value="on"> | ||
<span class="bx--checkbox-appearance"> | ||
<svg class="bx--checkbox-checkmark" fill-rule="evenodd" height="9" name="checkmark" role="img" viewBox="0 0 12 9" width="12" aria-label="Select this item"> | ||
<title>Select this item</title> | ||
<path d="M4.1 6.1L1.4 3.4 0 4.9 4.1 9l7.6-7.6L10.3 0z"></path> | ||
</svg> | ||
</span> | ||
<span class="bx--checkbox-label-text">Option 2</span> | ||
</label> | ||
</div> | ||
</div> | ||
<div class="bx--list-box__menu-item" id="downshift-1-item-2"> | ||
<div class="bx--form-item bx--checkbox-wrapper"> | ||
<label for="downshift-1-item-2" class="bx--checkbox-label"> | ||
<input type="checkbox" name="Option 3" readonly="" tabindex="-1" class="bx--checkbox" id="downshift-1-item-2" value="on"> | ||
<span class="bx--checkbox-appearance"> | ||
<svg class="bx--checkbox-checkmark" fill-rule="evenodd" height="9" name="checkmark" role="img" viewBox="0 0 12 9" width="12" aria-label="Select this item"> | ||
<title>Select this item</title> | ||
<path d="M4.1 6.1L1.4 3.4 0 4.9 4.1 9l7.6-7.6L10.3 0z"></path> | ||
</svg> | ||
</span> | ||
<span class="bx--checkbox-label-text">Option 3</span> | ||
</label> | ||
</div> | ||
</div> | ||
<div class="bx--list-box__menu-item" id="downshift-1-item-3"> | ||
<div class="bx--form-item bx--checkbox-wrapper"> | ||
<label for="downshift-1-item-3" class="bx--checkbox-label"> | ||
<input type="checkbox" name="Option 4" readonly="" tabindex="-1" class="bx--checkbox" id="downshift-1-item-3" value="on"> | ||
<span class="bx--checkbox-appearance"> | ||
<svg class="bx--checkbox-checkmark" fill-rule="evenodd" height="9" name="checkmark" role="img" viewBox="0 0 12 9" width="12" aria-label="Select this item"> | ||
<title>Select this item</title> | ||
<path d="M4.1 6.1L1.4 3.4 0 4.9 4.1 9l7.6-7.6L10.3 0z"></path> | ||
</svg> | ||
</span> | ||
<span class="bx--checkbox-label-text">Option 4</span> | ||
</label> | ||
</div> | ||
</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,80 @@ | ||
<div class="bx--form-item bx--multi-select bx--list-box"> | ||
<div role="button" class="bx--list-box__field" tabindex="0" aria-label="open menu" aria-expanded="false" aria-haspopup="true"> | ||
<span class="bx--list-box__label">Label</span> | ||
<div class="bx--list-box__menu-icon"> | ||
<svg fill-rule="evenodd" height="5" name="caret--down" role="img" viewBox="0 0 10 5" width="10" aria-label="Open menu"> | ||
<title>Open menu</title> | ||
<path d="M10 0L5 5 0 0z"></path> | ||
</svg> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="bx--form-item bx--multi-select bx--list-box"> | ||
<div role="button" class="bx--list-box__field" tabindex="0" aria-label="close menu" aria-expanded="true" aria-haspopup="true"> | ||
<span class="bx--list-box__label">Label</span> | ||
<div class="bx--list-box__menu-icon bx--list-box__menu-icon--open"> | ||
<svg fill-rule="evenodd" height="5" name="caret--down" role="img" viewBox="0 0 10 5" width="10" aria-label="Close menu"> | ||
<title>Close menu</title> | ||
<path d="M10 0L5 5 0 0z"></path> | ||
</svg> | ||
</div> | ||
</div> | ||
<div class="bx--list-box__menu"> | ||
<div class="bx--list-box__menu-item" id="downshift-1-item-0"> | ||
<div class="bx--form-item bx--checkbox-wrapper"> | ||
<label for="downshift-1-item-0" class="bx--checkbox-label"> | ||
<input type="checkbox" name="Option 1" readonly="" tabindex="-1" class="bx--checkbox" id="downshift-1-item-0" value="on"> | ||
<span class="bx--checkbox-appearance"> | ||
<svg class="bx--checkbox-checkmark" fill-rule="evenodd" height="9" name="checkmark" role="img" viewBox="0 0 12 9" width="12" aria-label="Select this item"> | ||
<title>Select this item</title> | ||
<path d="M4.1 6.1L1.4 3.4 0 4.9 4.1 9l7.6-7.6L10.3 0z"></path> | ||
</svg> | ||
</span> | ||
<span class="bx--checkbox-label-text">Option 1</span> | ||
</label> | ||
</div> | ||
</div> | ||
<div class="bx--list-box__menu-item" id="downshift-1-item-1"> | ||
<div class="bx--form-item bx--checkbox-wrapper"> | ||
<label for="downshift-1-item-1" class="bx--checkbox-label"> | ||
<input type="checkbox" name="Option 2" readonly="" tabindex="-1" class="bx--checkbox" id="downshift-1-item-1" value="on"> | ||
<span class="bx--checkbox-appearance"> | ||
<svg class="bx--checkbox-checkmark" fill-rule="evenodd" height="9" name="checkmark" role="img" viewBox="0 0 12 9" width="12" aria-label="Select this item"> | ||
<title>Select this item</title> | ||
<path d="M4.1 6.1L1.4 3.4 0 4.9 4.1 9l7.6-7.6L10.3 0z"></path> | ||
</svg> | ||
</span> | ||
<span class="bx--checkbox-label-text">Option 2</span> | ||
</label> | ||
</div> | ||
</div> | ||
<div class="bx--list-box__menu-item" id="downshift-1-item-2"> | ||
<div class="bx--form-item bx--checkbox-wrapper"> | ||
<label for="downshift-1-item-2" class="bx--checkbox-label"> | ||
<input type="checkbox" name="Option 3" readonly="" tabindex="-1" class="bx--checkbox" id="downshift-1-item-2" value="on"> | ||
<span class="bx--checkbox-appearance"> | ||
<svg class="bx--checkbox-checkmark" fill-rule="evenodd" height="9" name="checkmark" role="img" viewBox="0 0 12 9" width="12" aria-label="Select this item"> | ||
<title>Select this item</title> | ||
<path d="M4.1 6.1L1.4 3.4 0 4.9 4.1 9l7.6-7.6L10.3 0z"></path> | ||
</svg> | ||
</span> | ||
<span class="bx--checkbox-label-text">Option 3</span> | ||
</label> | ||
</div> | ||
</div> | ||
<div class="bx--list-box__menu-item" id="downshift-1-item-3"> | ||
<div class="bx--form-item bx--checkbox-wrapper"> | ||
<label for="downshift-1-item-3" class="bx--checkbox-label"> | ||
<input type="checkbox" name="Option 4" readonly="" tabindex="-1" class="bx--checkbox" id="downshift-1-item-3" value="on"> | ||
<span class="bx--checkbox-appearance"> | ||
<svg class="bx--checkbox-checkmark" fill-rule="evenodd" height="9" name="checkmark" role="img" viewBox="0 0 12 9" width="12" aria-label="Select this item"> | ||
<title>Select this item</title> | ||
<path d="M4.1 6.1L1.4 3.4 0 4.9 4.1 9l7.6-7.6L10.3 0z"></path> | ||
</svg> | ||
</span> | ||
<span class="bx--checkbox-label-text">Option 4</span> | ||
</label> | ||
</div> | ||
</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
Oops, something went wrong.