Skip to content

Commit

Permalink
Spring 18 to Summer 18 (#3049)
Browse files Browse the repository at this point in the history
* chore(checkbox-button-group): Add test (#3023)

* chore(checkbox-button-group): Add test

* chore(checkbox-button-group): skip tests

* chore(checkbox-toggle): Add test (#3029)

* chore(checkbox-toggle): Add test

* chore(checkbox-toggle): skip tests until min/max height issue is fixed

* chore(checkbox-toggle): change component names

* chore(tokens): add scope flag to components (#3044)
  • Loading branch information
engai authored Jan 30, 2018
1 parent 57f3bd0 commit 6de28b6
Show file tree
Hide file tree
Showing 83 changed files with 311 additions and 7 deletions.
1 change: 1 addition & 0 deletions ui/components/badges/tokens/background-color.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
global:
scope: component
type: color
category: background-color
cssProperties:
Expand Down
1 change: 1 addition & 0 deletions ui/components/brand-band/tokens/background-color.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
global:
scope: component
type: color
category: background-color
cssProperties:
Expand Down
1 change: 1 addition & 0 deletions ui/components/brand-band/tokens/sizing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license

global:
scope: component
type: size
category: sizing
cssProperties:
Expand Down
1 change: 1 addition & 0 deletions ui/components/brand-band/tokens/spacing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license

global:
scope: component
category: spacing
type: size
cssProperties:
Expand Down
1 change: 1 addition & 0 deletions ui/components/buttons/tokens/border-color.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license

global:
scope: component
type: color
category: border-color
cssProperties:
Expand Down
1 change: 1 addition & 0 deletions ui/components/buttons/tokens/border-radius.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license

global:
scope: component
type: size
category: radius
cssProperties:
Expand Down
1 change: 1 addition & 0 deletions ui/components/buttons/tokens/color.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
global:
scope: component
type: color
category: background-color
cssProperties:
Expand Down
1 change: 1 addition & 0 deletions ui/components/buttons/tokens/line-height.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
global:
scope: component
category: "line-height"
type: number
cssProperties:
Expand Down
1 change: 1 addition & 0 deletions ui/components/buttons/tokens/text-color.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license

global:
scope: component
type: color
category: text-color
cssProperties:
Expand Down
1 change: 1 addition & 0 deletions ui/components/cards/tokens/background-color.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
global:
scope: component
type: color
category: background-color
cssProperties:
Expand Down
1 change: 1 addition & 0 deletions ui/components/cards/tokens/border-color.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license

global:
scope: component
type: color
category: border-color
cssProperties:
Expand Down
1 change: 1 addition & 0 deletions ui/components/cards/tokens/box-shadow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license

global:
scope: component
type: box-shadow
category: shadow
cssProperties:
Expand Down
1 change: 1 addition & 0 deletions ui/components/cards/tokens/font-weight.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license

global:
scope: component
category: font
type: font-weight
cssProperties:
Expand Down
1 change: 1 addition & 0 deletions ui/components/cards/tokens/spacing.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
global:
scope: component
category: spacing
type: size
comment: ''
Expand Down
1 change: 1 addition & 0 deletions ui/components/cards/tokens/text-align.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license

global:
scope: component
category: text
type: text-align
cssProperties:
Expand Down
1 change: 1 addition & 0 deletions ui/components/carousel/tokens/background-color.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
global:
scope: component
type: color
category: background-color
cssProperties:
Expand Down
1 change: 1 addition & 0 deletions ui/components/carousel/tokens/sizing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license

global:
scope: component
type: size
category: sizing
cssProperties:
Expand Down
1 change: 1 addition & 0 deletions ui/components/chat/tokens/background-color.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
global:
scope: component
type: color
category: background-color
cssProperties:
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

69 changes: 69 additions & 0 deletions ui/components/checkbox-button-group/__tests__/index.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
/* eslint-env jest */
import React from 'react';
import { Checkbox, CheckboxGroup, Fieldset } from '../base/example';

import createHelpers from '../../../../jest.setup';

const { matchesMarkupAndStyle } = createHelpers(__dirname);

xit('renders a default checkbox button group', () =>
matchesMarkupAndStyle(
<Fieldset>
<CheckboxGroup>
<Checkbox id="monday">Mon</Checkbox>
<Checkbox id="tuesday">Tue</Checkbox>
<Checkbox id="wednesday">Wed</Checkbox>
<Checkbox id="thursday">Thu</Checkbox>
<Checkbox id="friday">Fri</Checkbox>
</CheckboxGroup>
</Fieldset>
));

xit('renders a default checkbox button group with error', () =>
matchesMarkupAndStyle(
<Fieldset className="slds-has-error">
<CheckboxGroup>
<Checkbox errorId="error_01" id="monday">
Mon
</Checkbox>
<Checkbox errorId="error_01" id="tuesday">
Tue
</Checkbox>
<Checkbox errorId="error_01" id="wednesday">
Wed
</Checkbox>
<Checkbox errorId="error_01" id="thursday">
Thu
</Checkbox>
<Checkbox errorId="error_01" id="friday">
Fri
</Checkbox>
</CheckboxGroup>
<div id="error_01" className="slds-form-element__help">
This field is required
</div>
</Fieldset>
));

xit('renders a disabled checkbox button group', () =>
matchesMarkupAndStyle(
<Fieldset>
<CheckboxGroup>
<Checkbox id="monday" disabled="true">
Mon
</Checkbox>
<Checkbox id="tuesday" disabled="true">
Tue
</Checkbox>
<Checkbox id="wednesday" disabled="true">
Wed
</Checkbox>
<Checkbox id="thursday" disabled="true">
Thu
</Checkbox>
<Checkbox id="friday" disabled="true">
Fri
</Checkbox>
</CheckboxGroup>
</Fieldset>
));
2 changes: 1 addition & 1 deletion ui/components/checkbox-button-group/base/example.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import classNames from 'classnames';
// Partial(s)
/// ////////////////////////////////////////

let Fieldset = props => (
export let Fieldset = props => (
<fieldset className={classNames('slds-form-element', props.className)}>
<legend className="slds-form-element__legend slds-form-element__label">
Scheduled Day(s)
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

20 changes: 20 additions & 0 deletions ui/components/checkbox-toggle/__tests__/index.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/* eslint-env jest */
import React from 'react';
import {
CheckboxToggle,
CheckboxToggleChecked,
CheckboxToggleDisabled
} from '../base/example';

import createHelpers from '../../../../jest.setup';

const { matchesMarkupAndStyle } = createHelpers(__dirname);

xit('renders a default checkbox toggle', () =>
matchesMarkupAndStyle(<CheckboxToggle />));

xit('renders a checked checkbox toggle', () =>
matchesMarkupAndStyle(<CheckboxToggleChecked />));

xit('renders a disabled checkbox toggle', () =>
matchesMarkupAndStyle(<CheckboxToggleDisabled />));
12 changes: 6 additions & 6 deletions ui/components/checkbox-toggle/base/example.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export let Toggle = props => (
/// ////////////////////////////////////////
// State Constructor(s)
/// ////////////////////////////////////////
let StateA = props => (
export let CheckboxToggle = props => (
<Demo>
<LabelWrapper>
<Label>
Expand All @@ -87,7 +87,7 @@ let StateA = props => (
</Demo>
);

let StateB = props => (
export let CheckboxToggleChecked = props => (
<Demo>
<LabelWrapper>
<Label>
Expand All @@ -99,7 +99,7 @@ let StateB = props => (
</Demo>
);

let StateC = props => (
export let CheckboxToggleDisabled = props => (
<Demo>
<LabelWrapper>
<Label>
Expand All @@ -115,17 +115,17 @@ let StateC = props => (
// Export
/// ////////////////////////////////////////

export default <StateA />;
export default <CheckboxToggle />;

export let states = [
{
id: 'checkbox-toggle-checked',
label: 'Checked',
element: <StateB />
element: <CheckboxToggleChecked />
},
{
id: 'checkbox-toggle-disabled',
label: 'Disabled',
element: <StateC />
element: <CheckboxToggleDisabled />
}
];
1 change: 1 addition & 0 deletions ui/components/checkbox-toggle/tokens/line-height.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
global:
scope: component
category: line-height
type: number
cssProperties:
Expand Down
1 change: 1 addition & 0 deletions ui/components/checkbox-toggle/tokens/sizing.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
global:
scope: component
type: size
category: sizing
cssProperties:
Expand Down
1 change: 1 addition & 0 deletions ui/components/color-picker/tokens/background-color.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license

global:
scope: component
type: color
category: background-color
cssProperties:
Expand Down
1 change: 1 addition & 0 deletions ui/components/color-picker/tokens/border-color.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license

global:
scope: component
type: color
category: border-color
cssProperties:
Expand Down
1 change: 1 addition & 0 deletions ui/components/color-picker/tokens/font-size.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license

global:
scope: component
category: font-size
type: font-size
cssProperties:
Expand Down
1 change: 1 addition & 0 deletions ui/components/color-picker/tokens/sizing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license

global:
scope: component
category: sizing
type: size
cssProperties:
Expand Down
1 change: 1 addition & 0 deletions ui/components/data-tables/tokens/background-color.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
global:
scope: component
type: color
category: background-color
cssProperties:
Expand Down
1 change: 1 addition & 0 deletions ui/components/data-tables/tokens/border-radius.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license

global:
scope: component
type: size
category: radius
cssProperties:
Expand Down
1 change: 1 addition & 0 deletions ui/components/data-tables/tokens/spacing.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
global:
scope: component
category: spacing
type: size
comment: ''
Expand Down
1 change: 1 addition & 0 deletions ui/components/data-tables/tokens/text-color.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license

global:
scope: component
type: color
category: text-color
cssProperties:
Expand Down
1 change: 1 addition & 0 deletions ui/components/docked-composer/tokens/color.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
global:
scope: component
type: color
category: background-color
cssProperties:
Expand Down
1 change: 1 addition & 0 deletions ui/components/docked-composer/tokens/sizing.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
global:
scope: component
type: size
category: sizing
cssProperties:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
global:
scope: component
type: color
category: background-color
cssProperties:
Expand Down
1 change: 1 addition & 0 deletions ui/components/dynamic-icons/tokens/background-color.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
global:
scope: component
type: color
category: background-color
cssProperties:
Expand Down
1 change: 1 addition & 0 deletions ui/components/dynamic-icons/tokens/fill.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license

global:
scope: component
category: fill
type: color
cssProperties:
Expand Down
1 change: 1 addition & 0 deletions ui/components/dynamic-icons/tokens/size.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license

global:
scope: component
category: sizing
type: size
cssProperties:
Expand Down
1 change: 1 addition & 0 deletions ui/components/einstein-header/tokens/background-color.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
global:
scope: component
type: color
category: background-color
cssProperties:
Expand Down
1 change: 1 addition & 0 deletions ui/components/einstein-header/tokens/text-shadow.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
global:
scope: component
type: shadow
category: text-shadow
cssProperties:
Expand Down
Loading

0 comments on commit 6de28b6

Please sign in to comment.