-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(multicolumnautocomplete): first implementation (#670)
* feat(multicolumnautocomplete): first implementation * fix(multicolumnautocomplete): add border right * fix(autocomplete): fix test and linter errors * feat(dropdown): add MultiColumn feature to DropdownMenu, Dropdown and ComplexFilter components * fix(autocomplete): fix autcomplete demo * refactor(autocomplete): remove AutocompleteBase and AutocompleteMultiColumn exports and stories and add both under the broader Autocomplete component * refactor(autocomplete): replace all DefaultDropdownMenuOptions with DefaultAutocompleteOption type * fix(autocomplete): fix typos and move AutocompleteBase, AutocompleteMultiColumn into the Autocomplete/components directory * fix(autocomplete): fix scroll reset bug and design review styles * fix(dropdownmenu): fix cognetive complexity error * feat(autocomplete): add custom PopperComponent for Autocomplete, AutocompleteMultiColumn DropdownMenu and Dropdown components * fix(storybook): upgrade to the latest version * refactor(sutocomplete): fix styles and code clean up BREAKING CHANGE: Autocomplte options type has changed from DefaultDropdownMenuOption to DefaultAutocompleteOption. * refactor(autocomplete): use MUI class names object * fix(autocomplete): remove dead code * refactor(autocomplete): update comments and code cleanup
- Loading branch information
1 parent
adf650d
commit 77342c6
Showing
37 changed files
with
4,240 additions
and
2,153 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
122 changes: 122 additions & 0 deletions
122
packages/components/src/common/AUTOCOMPLETE_MULTI_COLUMN_OPTIONS.tsx
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,122 @@ | ||
// (masoudmanson): The unit tests rely on the content in this file; do not alter it! | ||
|
||
import Icon from "../core/Icon"; | ||
|
||
export const AUTOCOMPLETE_MULTI_COLUMN_OPTIONS = [ | ||
{ | ||
icon: <Icon sdsIcon="chevronRight" sdsSize="xs" sdsType="static" />, | ||
name: "Column One", | ||
options: [ | ||
{ | ||
name: "Status: can't reproduce", | ||
}, | ||
{ | ||
name: "Status: confirmed", | ||
}, | ||
{ | ||
count: 3, | ||
name: "Status: duplicate", | ||
}, | ||
{ | ||
count: 5, | ||
name: "Status: needs information", | ||
}, | ||
{ | ||
details: "This will not be worked on", | ||
name: "Status: wont do/fix", | ||
}, | ||
{ | ||
details: "This is still in progress", | ||
name: "Status: work in progress", | ||
}, | ||
], | ||
width: 260, | ||
}, | ||
{ | ||
icon: <Icon sdsIcon="chevronRight" sdsSize="xs" sdsType="static" />, | ||
name: "Column Two", | ||
options: [ | ||
{ | ||
details: "This will be worked on", | ||
name: "Type: bug", | ||
}, | ||
{ | ||
count: 4, | ||
name: "Type: discussion", | ||
}, | ||
{ | ||
name: "Type: documentation", | ||
}, | ||
{ | ||
name: "Type: enhancement", | ||
}, | ||
{ | ||
name: "Type: epic", | ||
}, | ||
{ | ||
name: "Type: feature request", | ||
}, | ||
{ | ||
name: "Type: question", | ||
}, | ||
], | ||
width: 260, | ||
}, | ||
{ | ||
name: "Column Three", | ||
options: [ | ||
{ | ||
name: "Bacteria", | ||
sdsIcon: "bacteria", | ||
sdsIconProps: { | ||
color: "gray", | ||
}, | ||
}, | ||
{ | ||
name: "Puzzle Piece", | ||
sdsIcon: "puzzlePiece", | ||
sdsIconProps: { | ||
color: "gray", | ||
}, | ||
}, | ||
{ | ||
count: 10, | ||
name: "Copy", | ||
sdsIcon: "copy", | ||
sdsIconProps: { | ||
color: "gray", | ||
}, | ||
}, | ||
{ | ||
name: "Light Bulb", | ||
sdsIcon: "lightBulb", | ||
sdsIconProps: { | ||
color: "gray", | ||
}, | ||
}, | ||
{ | ||
count: 6, | ||
name: "List", | ||
sdsIcon: "list", | ||
sdsIconProps: { | ||
color: "gray", | ||
}, | ||
}, | ||
{ | ||
name: "Vertical Tree", | ||
sdsIcon: "treeVertical", | ||
sdsIconProps: { | ||
color: "gray", | ||
}, | ||
}, | ||
{ | ||
name: "Link", | ||
sdsIcon: "link", | ||
sdsIconProps: { | ||
color: "gray", | ||
}, | ||
}, | ||
], | ||
width: 180, | ||
}, | ||
]; |
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
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.