diff --git a/ui/components/combobox/base/_index.scss b/ui/components/combobox/base/_index.scss index 83f65b6194..b27fd9055c 100644 --- a/ui/components/combobox/base/_index.scss +++ b/ui/components/combobox/base/_index.scss @@ -71,7 +71,6 @@ display: inline-flex; flex-wrap: wrap; flex-shrink: 0; - max-width: 75%; align-items: center; margin-left: $spacing-xxx-small; margin-right: $spacing-xxx-small; @@ -148,6 +147,11 @@ text-decoration: none; } + .slds-listbox__option[role="presentation"]:hover { + background-color: transparent; + cursor: default; + } + /** * Modifies the listbox option if it contains an plain object or string * @@ -344,6 +348,13 @@ } } -.slds-has-inline-listbox .slds-combobox__input[value] { - box-shadow: 0 0 0 2px #fff inset, 0 0 0 3px $color-border inset; +.slds-has-inline-listbox { + + [role="listbox"] { + display: inline-flex; + } + + .slds-combobox__input[value] { + box-shadow: 0 0 0 2px #fff inset, 0 0 0 3px $color-border inset; + } } diff --git a/ui/components/combobox/base/example.jsx b/ui/components/combobox/base/example.jsx index d040d4f384..e1e2bd9083 100644 --- a/ui/components/combobox/base/example.jsx +++ b/ui/components/combobox/base/example.jsx @@ -24,6 +24,7 @@ const listboxSelectionsId = 'listbox-selections-unique-id'; const comboboxId = 'combobox-unique-id'; const listboxOptionId01 = 'listbox-option-unique-id-01'; const listboxOptionId02 = 'listbox-option-unique-id-02'; +const accounts = ['Acme','Edge SLA','Express Logistics SLA','GenePoint Lab Generators','GenePoint SLA','Pyramid Emergency Generators','United Oil Installations','United Oil Plant Standby Generators','University of AZ Installations','University of AZ Portable Generators']; /** * Generic Listbox container @@ -36,23 +37,27 @@ const listboxOptionId02 = 'listbox-option-unique-id-02'; * @prop {string} aria-label - */ export let Listbox = props => - ; + + ; /** * Generic list item within a listbox @@ -390,93 +395,39 @@ const ListboxDropdown = props => ; const ListboxList = props => - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +
  • + +

    My Favorites

    +
    +
  • + { accounts.slice(0, props.length).map(value => + + + + )}
    ; +const Footer = props => + ; + /* ----------------------------------------------------------------------------- Exports ----------------------------------------------------------------------------- */ @@ -567,21 +518,62 @@ export let states = [ // Examples export let examples = [ { - id: 'non-modal-dialog', - label: 'Non-modal Dialog', + id: 'non-modal-dialog-list-0-items', + label: 'Dynamic list — 0 Items (Non-modal Dialog)', + element: + } + > +

    + My Favorites +

    +

    You can favorite any page!

    +
    + }, + { + id: 'non-modal-dialog-list-1-item', + label: 'Dynamic list — 1 Item (Non-modal Dialog)', + element: + } + > + + + }, + { + id: 'non-modal-dialog-list-sub-10-item', + label: 'Dynamic list — <10 Items (Non-modal Dialog)', + element: + } + > + + + }, + { + id: 'non-modal-dialog-list-over-10-item', + label: 'Dynamic list — >10 Items (Non-modal Dialog)', element: } > } + inputContainerClassName="slds-m-around_small" + listbox={} staticListbox={true} />