-
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 combo-box component (#496)
- Loading branch information
1 parent
eb01fd7
commit f723daa
Showing
6 changed files
with
66 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# `combo-box` | ||
|
||
### SCSS | ||
|
||
#### Classes | ||
|
||
| Name | Description | | ||
|:------|:-------------| | ||
| `.bx--combo-box` | 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,16 @@ | ||
//----------------------------- | ||
// ComboBox | ||
//----------------------------- | ||
|
||
@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('combo-box') { | ||
.bx--combo-box > .bx--list-box__field { | ||
padding: 0; | ||
} | ||
} |
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,11 @@ | ||
<div class="bx--form-item bx--combo-box bx--list-box bx--list-box--disabled"> | ||
<div role="button" class="bx--list-box__field" tabindex="0" aria-label="open menu" aria-expanded="false" aria-haspopup="true" disabled=""> | ||
<input class="bx--text-input" role="combobox" aria-autocomplete="list" aria-expanded="false" autocomplete="off" value="" disabled="" id="downshift-input-13" placeholder="Filter..."> | ||
<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> |
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,28 @@ | ||
<div class="bx--form-item bx--combo-box bx--list-box"> | ||
<div role="button" class="bx--list-box__field" tabindex="0" aria-label="open menu" aria-expanded="false" aria-haspopup="true"> | ||
<input class="bx--text-input" role="combobox" aria-autocomplete="list" aria-expanded="false" autocomplete="off" value="" id="downshift-input-2" placeholder="Filter..."> | ||
<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--combo-box bx--list-box"> | ||
<div role="button" class="bx--list-box__field" tabindex="0" aria-label="close menu" aria-expanded="true" aria-haspopup="true"> | ||
<input class="bx--text-input" role="combobox" aria-autocomplete="list" aria-expanded="true" autocomplete="off" value="" id="downshift-input-2" placeholder="Filter..." aria-activedescendant="downshift-1-item-2"> | ||
<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">Option 1</div> | ||
<div class="bx--list-box__menu-item" id="downshift-1-item-1">Option 2</div> | ||
<div class="bx--list-box__menu-item bx--list-box__menu-item--highlighted" id="downshift-1-item-2">Option 3</div> | ||
<div class="bx--list-box__menu-item" id="downshift-1-item-3">Option 4</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