Skip to content

Commit

Permalink
Fixed merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
pulkonet committed Jun 21, 2019
2 parents c82d2f1 + 66bc346 commit 86b1bc8
Show file tree
Hide file tree
Showing 111 changed files with 12,009 additions and 508 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,6 @@ exports[`DOM snapshots SLDSBuilderHeader After Successful Save 1`] = `
}
>
<span
aria-describedby="status-tooltip"
className="slds-color__text_gray-10 slds-align-middle slds-m-right_small"
onBlur={[Function]}
onFocus={[Function]}
Expand Down Expand Up @@ -1533,7 +1532,6 @@ exports[`DOM snapshots SLDSBuilderHeader Failed Save 1`] = `
}
>
<span
aria-describedby="status-tooltip"
className="slds-color__text_gray-10 slds-align-middle slds-m-right_x-small"
onBlur={[Function]}
onFocus={[Function]}
Expand Down
134 changes: 28 additions & 106 deletions components/combobox/__docs__/__snapshots__/storybook-stories.storyshot

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion components/combobox/__examples__/input-prop.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ class Example extends React.Component {
// example of passing in an SLDSInput component to a SLDSCombobox
const inputElement = (
<Input
label="Search"
autoComplete="test"
id="id_from_input_prop"
placeholder="My overridden placeholder"
/>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ class Example extends React.Component {
return (
<IconSettings iconPath="/assets/icons">
<Combobox
assistiveText={{ label: 'Search' }}
id="combobox-unique-id"
labels={{
placeholder: 'Search Salesforce',
Expand Down
35 changes: 20 additions & 15 deletions components/combobox/combobox.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ class Combobox extends React.Component {
footer: popoverFooter,
footerClassName: 'slds-popover__footer_form',
hasNoNubbin: true,
id: `${this.getId()}`,
id: this.getId(),
isOpen: this.state.isOpen,
hasNoTriggerStyles: true,
onOpen: this.handleOpen,
Expand Down Expand Up @@ -959,12 +959,14 @@ class Combobox extends React.Component {
aria-expanded={this.getIsOpen()}
aria-haspopup="listbox" // eslint-disable-line jsx-a11y/aria-proptypes
// used on menu's listbox
aria-owns={`${this.getId()}-listbox`} // eslint-disable-line jsx-a11y/aria-proptypes
aria-owns={this.getIsOpen() ? `${this.getId()}-listbox` : undefined} // eslint-disable-line jsx-a11y/aria-proptypes
role="combobox"
>
<InnerInput
aria-autocomplete="list"
aria-controls={`${this.getId()}-listbox`}
aria-controls={
this.getIsOpen() ? `${this.getId()}-listbox` : undefined
}
aria-activedescendant={
this.state.activeOption
? `${this.getId()}-listbox-option-${this.state.activeOption.id}`
Expand Down Expand Up @@ -1097,7 +1099,9 @@ class Combobox extends React.Component {
>
<InnerInput
aria-autocomplete="list"
aria-controls={`${this.getId()}-listbox`}
aria-controls={
this.getIsOpen() ? `${this.getId()}-listbox` : undefined
}
aria-activedescendant={
this.state.activeOption
? `${this.getId()}-listbox-option-${this.state.activeOption.id}`
Expand All @@ -1107,8 +1111,6 @@ class Combobox extends React.Component {
autoComplete="off"
className="slds-combobox__input"
containerProps={{
'aria-expanded': this.getIsOpen(),
'aria-haspopup': 'listbox',
className: 'slds-combobox__form-element',
role: 'none',
}}
Expand Down Expand Up @@ -1196,7 +1198,9 @@ class Combobox extends React.Component {
>
<InnerInput
aria-autocomplete="list"
aria-controls={`${this.getId()}-listbox`}
aria-controls={
this.getIsOpen() ? `${this.getId()}-listbox` : undefined
}
aria-activedescendant={
this.state.activeOption
? `${this.getId()}-listbox-option-${
Expand Down Expand Up @@ -1348,13 +1352,14 @@ class Combobox extends React.Component {
)}
aria-expanded={this.getIsOpen()}
aria-haspopup="dialog" // eslint-disable-line jsx-a11y/aria-proptypes
aria-owns={`${this.getId()}`} // eslint-disable-line jsx-a11y/aria-proptypes
role="combobox"
>
<Popover {...popoverProps}>
<InnerInput
aria-autocomplete="none"
aria-controls={`${this.getId()}`}
aria-controls={
this.getIsOpen() ? `${this.getId()}-popover` : undefined
}
aria-describedby={this.getErrorId()}
autoComplete="off"
className="slds-combobox__input"
Expand Down Expand Up @@ -1431,7 +1436,9 @@ class Combobox extends React.Component {
>
<InnerInput
aria-autocomplete="list"
aria-controls={`${this.getId()}-listbox`}
aria-controls={
this.getIsOpen() ? `${this.getId()}-listbox` : undefined
}
aria-activedescendant={
this.state.activeOption
? `${this.getId()}-listbox-option-${
Expand All @@ -1443,8 +1450,6 @@ class Combobox extends React.Component {
autoComplete="off"
className="slds-combobox__input"
containerProps={{
'aria-expanded': this.getIsOpen(),
'aria-haspopup': 'listbox',
className: 'slds-combobox__form-element',
role: 'none',
}}
Expand Down Expand Up @@ -1543,7 +1548,9 @@ class Combobox extends React.Component {
>
<InnerInput
aria-autocomplete="list"
aria-controls={`${this.getId()}-listbox`}
aria-controls={
this.getIsOpen() ? `${this.getId()}-listbox` : undefined
}
aria-activedescendant={
this.state.activeOption
? `${this.getId()}-listbox-option-${
Expand All @@ -1555,8 +1562,6 @@ class Combobox extends React.Component {
autoComplete="off"
className="slds-combobox__input"
containerProps={{
'aria-expanded': this.getIsOpen(),
'aria-haspopup': 'listbox',
className: 'slds-combobox__form-element',
role: 'none',
}}
Expand Down
112 changes: 101 additions & 11 deletions components/component-docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -2991,8 +2991,7 @@
"name": "shape",
"value": {
"heading": {
"name": "custom",
"raw": "PropTypes.heading",
"name": "string",
"required": false
},
"label": {
Expand Down Expand Up @@ -3131,21 +3130,21 @@
},
"onRenderVisualPicker": {
"type": {
"name": "node"
"name": "func"
},
"required": false,
"description": "Allows icon to shown with checkbox (only for non-coverable visual picker variant)"
},
"onRenderVisualPickerSelected": {
"type": {
"name": "node"
"name": "func"
},
"required": false,
"description": "Allows icon to shown if checkbox is not selected (only for visual picker variant)"
},
"onRenderVisualPickerNotSelected": {
"type": {
"name": "node"
"name": "func"
},
"required": false,
"description": "Allows icon to shown if checkbox is not selected (only for visual picker variant)"
Expand Down Expand Up @@ -12410,8 +12409,7 @@
"name": "shape",
"value": {
"heading": {
"name": "custom",
"raw": "PropTypes.heading",
"name": "string",
"required": false
},
"label": {
Expand All @@ -12421,7 +12419,7 @@
}
},
"required": false,
"description": "**Text labels for internationalization**\nThis object is merged with the default props object on every render.\n* `heading`: Heading for the visual picker variant\n* `label`: Label for the _enabled_ state of the Toggle variant. Defaults to \"Enabled\".\n* `toggleDisabled`: Label for the _disabled_ state of the Toggle variant. Defaults to \"Disabled\". Note that this uses SLDS language, and meaning, of \"Enabled\" and \"Disabled\"; referring to the state of whatever the checkbox is _toggling_, not whether the checkbox itself is enabled or disabled.\n* `toggleEnabled`: Label for the _enabled_ state of the Toggle variant. Defaults to \"Enabled\"."
"description": "**Text labels for internationalization**\nThis object is merged with the default props object on every render.\n* `heading`: Heading for the visual picker variant\n* `label`: Label for the radio input"
},
"name": {
"type": {
Expand Down Expand Up @@ -12493,21 +12491,21 @@
},
"onRenderVisualPicker": {
"type": {
"name": "node"
"name": "func"
},
"required": false,
"description": "Allows icon to shown if radio is not selected (only for non-coverable visual picker variant)"
},
"onRenderVisualPickerSelected": {
"type": {
"name": "node"
"name": "func"
},
"required": false,
"description": "Allows icon to shown if radio is not selected (only for visual picker variant)"
},
"onRenderVisualPickerNotSelected": {
"type": {
"name": "node"
"name": "func"
},
"required": false,
"description": "Allows icon to shown if radio is not selected (only for visual picker variant)"
Expand Down Expand Up @@ -15807,5 +15805,97 @@
"display-name": "Vertical Navigation",
"SLDS-component-path": "/components/vertical-navigation",
"dependencies": []
},
"visual-picker": {
"description": "Visual Picker Component",
"methods": [],
"props": {
"id": {
"type": {
"name": "string"
},
"required": false,
"description": "HTML id for component."
},
"className": {
"type": {
"name": "union",
"value": [
{
"name": "array"
},
{
"name": "object"
},
{
"name": "string"
}
]
},
"required": false,
"description": "CSS classes to be added to tag with `.slds-form-element`. Uses `classNames` [API](https://github.com/JedWatson/classnames)."
},
"label": {
"type": {
"name": "string"
},
"required": false,
"description": "Label for the visual picker"
},
"coverable": {
"type": {
"name": "bool"
},
"required": false,
"description": "Whether the visual picker is coverable on selection"
},
"vertical": {
"type": {
"name": "bool"
},
"required": false,
"description": "Whether the visual picker has a vertical layout",
"defaultValue": {
"value": "false",
"computed": false
}
},
"links": {
"type": {
"name": "bool"
},
"required": false,
"description": "Whether the visual picker has links as children",
"defaultValue": {
"value": "false",
"computed": false
}
},
"size": {
"type": {
"name": "enum",
"value": [
{
"value": "'medium'",
"computed": false
},
{
"value": "'large'",
"computed": false
}
]
},
"required": false,
"description": "Size for visual picker",
"defaultValue": {
"value": "'medium'",
"computed": false
}
}
},
"route": "visual-pickers",
"display-name": "Visual Pickers",
"SLDS-component-path": "/components/visual-picker",
"dependencies": []
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ exports[`DOM snapshots SLDSGlobalHeader Doc site Default 1`] = `
<div
aria-expanded={false}
aria-haspopup="listbox"
aria-owns="header-search-custom-id-listbox"
className="slds-combobox slds-dropdown-trigger slds-dropdown-trigger_click ignore-react-onclickoutside"
role="combobox"
>
Expand All @@ -62,7 +61,6 @@ exports[`DOM snapshots SLDSGlobalHeader Doc site Default 1`] = `
<input
aria-activedescendant={null}
aria-autocomplete="list"
aria-controls="header-search-custom-id-listbox"
autoComplete="off"
className="slds-input slds-combobox__input"
id="header-search-custom-id"
Expand Down Expand Up @@ -537,7 +535,6 @@ exports[`DOM snapshots SLDSGlobalHeader Search + Navigation 1`] = `
<div
aria-expanded={false}
aria-haspopup="listbox"
aria-owns="header-search-custom-id-listbox"
className="slds-combobox slds-dropdown-trigger slds-dropdown-trigger_click ignore-react-onclickoutside"
role="combobox"
>
Expand All @@ -548,7 +545,6 @@ exports[`DOM snapshots SLDSGlobalHeader Search + Navigation 1`] = `
<input
aria-activedescendant={null}
aria-autocomplete="list"
aria-controls="header-search-custom-id-listbox"
autoComplete="off"
className="slds-input slds-combobox__input"
id="header-search-custom-id"
Expand Down Expand Up @@ -914,7 +910,6 @@ exports[`DOM snapshots SLDSGlobalHeader With custom <Avatar/> 1`] = `
<div
aria-expanded={false}
aria-haspopup="listbox"
aria-owns="header-search-custom-id-listbox"
className="slds-combobox slds-dropdown-trigger slds-dropdown-trigger_click ignore-react-onclickoutside"
role="combobox"
>
Expand All @@ -925,7 +920,6 @@ exports[`DOM snapshots SLDSGlobalHeader With custom <Avatar/> 1`] = `
<input
aria-activedescendant={null}
aria-autocomplete="list"
aria-controls="header-search-custom-id-listbox"
autoComplete="off"
className="slds-input slds-combobox__input"
id="header-search-custom-id"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1616,7 +1616,6 @@ exports[`DOM snapshots SLDSInput Field Level Help 1`] = `
}
>
<button
aria-describedby="field-level-help-tooltip"
aria-disabled={true}
className="slds-button slds-button_icon"
disabled={false}
Expand Down Expand Up @@ -1712,7 +1711,7 @@ exports[`DOM snapshots SLDSInput Field Level Help, Tooltip Open 1`] = `
Help
</span>
</button>
<section
<div
className="absolute-positioned slds-nubbin_bottom-left slds-popover slds-popover_tooltip"
id="field-level-help-tooltip"
onKeyDown={[Function]}
Expand All @@ -1730,7 +1729,7 @@ exports[`DOM snapshots SLDSInput Field Level Help, Tooltip Open 1`] = `
>
Some helpful information
</div>
</section>
</div>
</div>
<div
className="slds-form-element__control"
Expand Down
Loading

0 comments on commit 86b1bc8

Please sign in to comment.