Skip to content

Commit 5f5388d

Browse files
committed
Fix merge errors:
2 parents 1da287a + 36ec304 commit 5f5388d

File tree

475 files changed

+23903
-15845
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

475 files changed

+23903
-15845
lines changed

components/SLDSButton/index.js

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import React from 'react';
1313
const classNames = require('classnames');
1414
import createChainedFunction from '../utils/create-chained-function';
1515
import {ButtonIcon, Icon} from '../SLDSIcons.js';
16-
import {omit} from 'lodash';
16+
import omit from 'lodash.omit';
1717

1818
class Button extends React.Component {
1919

@@ -60,6 +60,7 @@ class Button extends React.Component {
6060
render() {
6161
const props = omit('className', this.props);
6262
const click = createChainedFunction(this.props.onClick, this.onClick.bind(this));
63+
if (this.props.disabled) { props['disabled'] = 'disabled' };
6364

6465
//If the button is only an icon render this:
6566
if(this.props.variant === 'icon'){
@@ -69,7 +70,7 @@ class Button extends React.Component {
6970
name={this.props.iconName}
7071
category='utility'
7172
size={this.props.iconSize}
72-
className={'slds-icon'} />
73+
/>
7374
<span className="slds-assistive-text">{this.props.label}</span>
7475
</button>
7576
);
@@ -78,13 +79,9 @@ class Button extends React.Component {
7879
else{
7980
return (
8081
<button className={this.getClassName()} {...props} onClick={click}>
81-
82-
{this.props.iconPosition === 'right' ? this.props.label : null}
83-
84-
{this.renderIcon()}
85-
86-
{(this.props.iconPosition === 'left' || !this.props.iconPosition) ? this.props.label : null}
87-
82+
{this.props.iconPosition === 'right' ? this.props.label : null}
83+
{this.renderIcon()}
84+
{(this.props.iconPosition === 'left' || !this.props.iconPosition) ? this.props.label : null}
8885
</button>
8986
);
9087
}
@@ -94,6 +91,7 @@ class Button extends React.Component {
9491
Button.propTypes = {
9592
label: React.PropTypes.string.isRequired,
9693
variant: React.PropTypes.oneOf(['base', 'neutral', 'brand', 'icon']),
94+
disabled: React.PropTypes.bool,
9795
iconName: React.PropTypes.string,
9896
iconSize: React.PropTypes.oneOf(['x-small', 'small', 'medium', 'large']),
9997
iconPosition: React.PropTypes.oneOf(['left', 'right']),

components/SLDSDropdowns/index.js

Lines changed: 0 additions & 217 deletions
This file was deleted.

components/SLDSGrid/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
1010
*/
1111

1212
const React = require('react');
13-
import {omit} from 'lodash';
13+
import omit from 'lodash.omit';
1414
const classNames = require('classnames');
1515

1616
class GridColumn extends React.Component {

components/SLDSIcons.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
1111
import React from 'react';
1212

1313
import SLDSSettings from './SLDSSettings';
14+
import SLDSUtilityIcon from './SLDSUtilityIcon';
1415

1516

1617
export const ButtonIcon = React.createClass({
@@ -42,6 +43,9 @@ export const ButtonIcon = React.createClass({
4243
if (this.props.hint) {
4344
className = className + ' slds-button__icon--hint';
4445
}
46+
if(this.props.category === 'utility'){
47+
return <SLDSUtilityIcon name={this.props.name} aria-hidden='true' className={className} />;
48+
}
4549
return <svg aria-hidden='true' className={className} dangerouslySetInnerHTML={{__html: useTag }} />;
4650
}
4751

@@ -72,6 +76,9 @@ export const Icon = React.createClass({
7276
className += ' slds-icon--' + this.props.position;
7377
}
7478
className = className + ' slds-icon-' + this.props.category + '-' + (this.props.theme || this.props.name);
79+
if(this.props.category === 'utility'){
80+
return <span className='slds-icon__container'><SLDSUtilityIcon name={this.props.name} aria-hidden='true' className={className} style={this.props.style} /></span>;
81+
}
7582
return <span className='slds-icon__container'><svg aria-hidden='true' className={className} style={this.props.style} dangerouslySetInnerHTML={{__html: useTag }} /></span>;
7683
}
7784

@@ -82,7 +89,7 @@ export const InputIcon = React.createClass({
8289
render() {
8390
const useTag = '<use xlink:href="'+SLDSSettings.getAssetsPath()+'icons/utility-sprite/svg/symbols.svg#' + this.props.name + '" />';
8491
const className = 'slds-input__icon slds-icon-text-default';
85-
return <svg aria-hidden='true' className={className} dangerouslySetInnerHTML={{__html: useTag }} />;
92+
return <SLDSUtilityIcon name={this.props.name} aria-hidden='true' className={className} />;
8693
}
8794

8895
});

components/SLDSLookup/index.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ import React, { Component } from 'react';
1111
import Menu from './Menu';
1212
import {InputIcon, ButtonIcon} from "./../SLDSIcons";
1313
import {Icon} from "../SLDSIcons";
14-
import _ from "lodash";
1514
import {KEYS,EventUtil} from '../utils';
15+
import escapeRegExp from 'lodash.escaperegexp';
1616

1717
const defaultFilter = (term, item) => {
1818
if(!term) return true;
19-
return item.label.match(new RegExp(_.escapeRegExp(term), 'ig'));
19+
return item.label.match(new RegExp(escapeRegExp(term), 'ig'));
2020
};
2121

2222
class SLDSLookup extends React.Component {

0 commit comments

Comments
 (0)