Skip to content
This repository has been archived by the owner on Dec 8, 2022. It is now read-only.

Radio and checkbox icon buttons #1892

Merged
merged 45 commits into from
Aug 29, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
d445d96
initial component scaffolding
blackbaud-conorwright Aug 3, 2018
016df73
Merge remote-tracking branch 'upstream/master' into radio-checkbox-ic…
blackbaud-conorwright Aug 7, 2018
99740f4
created initial icon functionality
blackbaud-conorwright Aug 8, 2018
7177c03
increased size. Added colors
blackbaud-conorwright Aug 9, 2018
5f406f5
finished styling. Added testing
blackbaud-conorwright Aug 10, 2018
0ab7e35
Merge branch 'master' into radio-checkbox-icon-buttons
blackbaud-conorwright Aug 10, 2018
2d656fd
Merge remote-tracking branch 'upstream/master' into radio-checkbox-ic…
blackbaud-conorwright Aug 10, 2018
44b19ff
added fixed radio icon comp import
blackbaud-conorwright Aug 10, 2018
fb2c56a
added labels to the visual tests
blackbaud-conorwright Aug 10, 2018
d12d130
override max width
Blackbaud-ToddRoberts Aug 14, 2018
4b4f96f
add css to handle grouped icon buttons
Blackbaud-ToddRoberts Aug 15, 2018
7ba4468
Merge branch 'master' into radio-checkbox-icon-buttons
Blackbaud-AlexKingman Aug 15, 2018
d41db87
added group examples. Addressed comments
blackbaud-conorwright Aug 15, 2018
0fa4333
Merge branch 'master' into radio-checkbox-icon-buttons
blackbaud-conorwright Aug 15, 2018
8ba3989
fixed scss spacing
blackbaud-conorwright Aug 15, 2018
d4a8787
Merge branch 'radio-checkbox-icon-buttons' of github.com:blackbaud/sk…
blackbaud-conorwright Aug 15, 2018
6674ff8
fixed spacing issue
blackbaud-conorwright Aug 15, 2018
b3d2659
updated demos to have switch group displays
blackbaud-conorwright Aug 16, 2018
f22cd55
Merge branch 'master' into radio-checkbox-icon-buttons
Blackbaud-TrevorBurch Aug 16, 2018
29e576b
Merge branch 'master' into radio-checkbox-icon-buttons
Blackbaud-TrevorBurch Aug 16, 2018
9d81df5
Merge branch 'master' into radio-checkbox-icon-buttons
Blackbaud-TrevorBurch Aug 16, 2018
727ecfd
Merge branch 'master' into radio-checkbox-icon-buttons
Blackbaud-AlexKingman Aug 17, 2018
0a92fdb
updated width of buttons. Moved disabled demo. Updated list-toolbar demo
blackbaud-conorwright Aug 17, 2018
e356a7f
Merge branch 'radio-checkbox-icon-buttons' of github.com:blackbaud/sk…
blackbaud-conorwright Aug 17, 2018
d5aec0c
Merge remote-tracking branch 'upstream/master' into radio-checkbox-ic…
blackbaud-conorwright Aug 17, 2018
c82d3a1
removed radio-icon html file
blackbaud-conorwright Aug 17, 2018
a53155b
removed icon html and empty scss file
blackbaud-conorwright Aug 17, 2018
08506af
switched to icon buttons being just property additions
blackbaud-conorwright Aug 17, 2018
2f0ca42
Merge branch 'master' into radio-checkbox-icon-buttons
blackbaud-conorwright Aug 17, 2018
54e7e89
minor ts lint fix
blackbaud-conorwright Aug 17, 2018
f9a3cfc
Merge branch 'radio-checkbox-icon-buttons' of github.com:blackbaud/sk…
blackbaud-conorwright Aug 17, 2018
f0436c8
Merge branch 'master' into radio-checkbox-icon-buttons
Blackbaud-AlexKingman Aug 20, 2018
17217a9
Merge branch 'master' into radio-checkbox-icon-buttons
Blackbaud-TrevorBurch Aug 20, 2018
dde85c2
Merge branch 'master' into radio-checkbox-icon-buttons
Blackbaud-TrevorBurch Aug 20, 2018
a590880
Merge branch 'master' into radio-checkbox-icon-buttons
blackbaud-conorwright Aug 21, 2018
3763df5
Merge branch 'master' into radio-checkbox-icon-buttons
Blackbaud-TrevorBurch Aug 22, 2018
da0c651
Merge remote-tracking branch 'upstream/master' into radio-checkbox-ic…
blackbaud-conorwright Aug 27, 2018
bc35a2d
updated skyux theme and made it take all minor revisions
blackbaud-conorwright Aug 28, 2018
8b3aba6
Merge branch 'master' into radio-checkbox-icon-buttons
blackbaud-conorwright Aug 28, 2018
cc92df7
Change theme dependency to use exact version
blackbaud-conorwright Aug 28, 2018
28560a9
added theme dependency to visual tests
blackbaud-conorwright Aug 29, 2018
7a209e9
fixed visual tests for icon switches
blackbaud-conorwright Aug 29, 2018
6b0754d
Merge branch 'master' into radio-checkbox-icon-buttons
blackbaud-conorwright Aug 29, 2018
ea856f9
Merge branch 'master' into radio-checkbox-icon-buttons
blackbaud-conorwright Aug 29, 2018
1d3f2f4
Merge branch 'master' into radio-checkbox-icon-buttons
Blackbaud-TrevorBurch Aug 29, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"wdio": "wdio"
},
"dependencies": {
"@skyux/theme": "3.0.0",
"@skyux/theme": "3.1.0",
"dragula": "3.7.2",
"intl": "1.2.5",
"microedge-rxstate": "2.0.2",
Expand Down
5 changes: 3 additions & 2 deletions skyux-spa-visual-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@
"devDependencies": {
"@blackbaud/skyux": "latest",
"@blackbaud/skyux-builder": "1.13.0",
"pix-diff": "2.0.0",
"browserstack-local": "1.3.0"
"@skyux/theme": "3.1.0",
"browserstack-local": "1.3.0",
"pix-diff": "2.0.0"
},
"peerDependencies": {
"http-server": "^0.10.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,63 @@
<sky-checkbox-label>Unchecked Checkbox</sky-checkbox-label>
</sky-checkbox>
</div>
<div id="screenshot-icon-checkbox">
<sky-checkbox
icon="bold"
label="bold"
[checked]="true">
</sky-checkbox>
<sky-checkbox
icon="bold"
label="bold"
[checked]="false">
</sky-checkbox>
<sky-checkbox
icon="umbrella"
checkboxType="info"
label="umbrella"
[checked]="true">
</sky-checkbox>
<sky-checkbox
icon="umbrella"
checkboxType="info"
label="umbrella"
[checked]="false">
</sky-checkbox>
<sky-checkbox
icon="star"
checkboxType="success"
label="favorite"
[checked]="true">
</sky-checkbox>
<sky-checkbox
icon="star"
checkboxType="success"
label="favorite"
[checked]="false">
</sky-checkbox>
<sky-checkbox
icon="exclamation-triangle"
checkboxType="warning"
label="careful"
[checked]="true">
</sky-checkbox>
<sky-checkbox
icon="exclamation-triangle"
checkboxType="warning"
label="careful"
[checked]="false">
</sky-checkbox>
<sky-checkbox
icon="ban"
checkboxType="danger"
label="wrong"
[checked]="true">
</sky-checkbox>
<sky-checkbox
icon="ban"
checkboxType="danger"
label="wrong"
[checked]="false">
</sky-checkbox>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,15 @@ describe('Checkbox', () => {
selector: '#screenshot-checkbox'
});
});
});

it('should match previous icon checkbox screenshot', () => {
return SkyVisualTest.setupTest('checkbox')
.then(() => {
return SkyVisualTest.compareScreenshot({
screenshotName: 'checkbox-icon',
selector: '#screenshot-icon-checkbox'
});
});
});
});
44 changes: 42 additions & 2 deletions skyux-spa-visual-tests/src/app/radio/radio-visual.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@
<div>
<sky-radio
name="radiotest"
disabled="true"
[ngModel]="selectedValue"
[value]="valueGuy"
(ngModelChange)="selectedValue = $event"
disabled="true"
[value]="valueGuy">
>
<sky-radio-label>Option 2</sky-radio-label>
</sky-radio>
</div>
Expand All @@ -23,4 +24,43 @@
</sky-radio>
</div>
</div>

<div id="screenshot-icon-radio">
<ul class="sky-list-unstyled">
<li>
<sky-radio
icon="thumbs-o-up"
label="I like it"
name="iconradiotest"
value="1"
[(ngModel)]="iconSelectedValue"
#cb="ngModel"
>
</sky-radio>
</li>
<li>
<sky-radio
disabled="true"
icon="balance-scale"
label="meh"
name="iconradiotest"
[ngModel]="iconSelectedValue"
[value]="valueGuy"
(ngModelChange)="iconSelectedValue = $event"
>
</sky-radio>
</li>
<li>
<sky-radio
icon="thumbs-o-down"
label="I hate it"
name="iconradiotest"
value="3"
[ngModel]="iconSelectedValue"
(ngModelChange)="iconSelectedValue = $event"
>
</sky-radio>
</li>
</ul>
</div>
</form>
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ import { Component } from '@angular/core';
})
export class RadioVisualComponent {
public selectedValue = '3';
public iconSelectedValue = '2';
public valueGuy = '2';
}
9 changes: 9 additions & 0 deletions skyux-spa-visual-tests/src/app/radio/radio.visual-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,15 @@ describe('Radio component', () => {
selector: '#screenshot-radio'
});
});
});

it('should match the icon radio input', () => {
return SkyVisualTest.setupTest('radio')
.then(() => {
return SkyVisualTest.compareScreenshot({
screenshotName: 'radio-icon',
selector: '#screenshot-icon-radio'
});
});
});
});
30 changes: 28 additions & 2 deletions src/demos/checkbox/checkbox-demo.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,37 @@ <h3>
<li *ngFor="let item of checkboxItems">
<sky-checkbox
[(ngModel)]="item.checked"
[disabled]="item.disabled"
>
[disabled]="item.disabled">
<sky-checkbox-label>
{{ item.label }}
</sky-checkbox-label>
</sky-checkbox>
</li>
</ul>

<h3>
Icon checkbox types
</h3>

<div>
<sky-checkbox
*ngFor="let item of iconCheckboxItems"
[disabled]="item.disabled"
[icon]="item.icon"
[checkboxType]="item.checkboxType"
[(ngModel)]="item.checked">
</sky-checkbox>
</div>

<h3>
Icon checkbox group
</h3>

<div
class="sky-switch-icon-group">
<sky-checkbox
*ngFor="let item of iconCheckboxGroup"
[icon]="item.icon"
[(ngModel)]="item.checked">
</sky-checkbox>
</div>
48 changes: 48 additions & 0 deletions src/demos/checkbox/checkbox-demo.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,52 @@ export class SkyCheckboxDemoComponent {
disabled: true
}
];
public iconCheckboxGroup = [
{
label: 'Bold',
checked: true,
icon: 'bold'
},
{
label: 'Italic',
checked: false,
icon: 'italic'
},
{
label: 'Underline',
checked: true,
icon: 'underline'
}
];
public iconCheckboxItems = [
{
label: 'Info icon checkbox 1',
checked: true,
icon: 'info'
},
{
label: 'Disabled info icon checkbox 1',
checked: true,
disabled: true,
icon: 'strikethrough'
},
{
label: 'Success icon checkbox',
checked: true,
icon: 'star',
checkboxType: 'success'
},
{
label: 'Warning icon checkbox',
checked: true,
icon: 'exclamation-triangle',
checkboxType: 'warning'
},
{
label: 'Danger icon checkbox',
checked: true,
icon: 'ban',
checkboxType: 'danger'
}
];
}
32 changes: 26 additions & 6 deletions src/demos/list-toolbar/list-toolbar-demo.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,32 @@
</sky-list-secondary-actions>

<sky-list-toolbar-view-actions>
<button
class="sky-btn sky-btn-default"
type="button"
>
Button
</button>
<div class="sky-switch-icon-group">
<sky-radio
icon="table"
name="iconradiogrouptest"
value="table"
[(ngModel)]="iconGroupSelectedValue">
</sky-radio>
<sky-radio
icon="list"
name="iconradiogrouptest"
value="list"
[(ngModel)]="iconGroupSelectedValue">
</sky-radio>
<sky-radio
icon="th-large"
name="iconradiogrouptest"
value="cards"
[(ngModel)]="iconGroupSelectedValue">
</sky-radio>
<sky-radio
icon="map-marker"
name="iconradiogrouptest"
value="map"
[(ngModel)]="iconGroupSelectedValue">
</sky-radio>
</div>
</sky-list-toolbar-view-actions>

</sky-list-toolbar>
Expand Down
1 change: 1 addition & 0 deletions src/demos/list-toolbar/list-toolbar-demo.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import 'rxjs/add/observable/of';
templateUrl: './list-toolbar-demo.component.html'
})
export class SkyListToolbarDemoComponent {
public iconGroupSelectedValue = 'table';
public items = Observable.of([
{ id: '1', column1: 101, column2: 'Apple', column3: 'Anne eats apples' },
{ id: '2', column1: 202, column2: 'Banana', column3: 'Ben eats bananas' },
Expand Down
Loading