Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add basic and control statuses #2047

Merged
merged 74 commits into from
Oct 31, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
91643a4
refactor: change basic control base color to white
yggg Oct 17, 2019
bb8e791
feat: add transparent semantic variables
yggg Oct 28, 2019
8fa6820
refactor: change default text color
yggg Oct 28, 2019
d8586e3
feat: add basic and control statuses
yggg Oct 28, 2019
2a9ddb0
feat(toastr): add basic and control statuses
yggg Oct 28, 2019
3d9a6d4
fix(playground): skip control background class generation
yggg Oct 28, 2019
b507d84
docs(toastr): update default status
yggg Oct 28, 2019
cdb5ec8
feat(button): add basic and control statuses
yggg Oct 28, 2019
bd0cb28
feat(input): add basic and control statuses
yggg Oct 28, 2019
8754ad2
feat(checkbox): add basic and control statuses
yggg Oct 28, 2019
20bfd67
feat(badge): add basic and control statuses
yggg Oct 28, 2019
73ddf53
feat(progress bar): add basic and control statuses
yggg Oct 28, 2019
988a948
feat(alert): add basic and control statuses
yggg Oct 28, 2019
753bdf3
fix(playground): prevent components overlay overflow by spinners
yggg Oct 28, 2019
5046255
feat(spinner): add basic and control statuses
yggg Oct 28, 2019
ba51efa
feat(tooltip): add basic and control statuses
yggg Oct 28, 2019
73c8f59
feat(radio): add basic and control statuses
yggg Oct 28, 2019
6ab012a
feat(icon): add basic and control statuses
yggg Oct 28, 2019
1b248f7
feat(toggle): add basic and control statuses
yggg Oct 28, 2019
4d562e2
fix(input): set proper text color for control status
yggg Oct 28, 2019
59f4b8d
feat(select): add basic and control statuses
yggg Oct 28, 2019
5e7039e
refactor(playground): use primary color as control examples background
yggg Oct 29, 2019
03256cc
refactor(input): move disabled mappings to each status
yggg Oct 29, 2019
f99ed65
refactor(select): move disabled mappings to each status
yggg Oct 29, 2019
58de8fa
feat(card): add basic and control statuses
yggg Oct 29, 2019
4337b62
feat(chat): add basic and control statuses
yggg Oct 29, 2019
b394a10
refactor: use nb-outline mixin
yggg Oct 29, 2019
702827a
fix(toggle): update basic and control statuses according design
yggg Oct 29, 2019
be43268
feat(toggle): allow checked input to be set as an attribute
yggg Oct 29, 2019
49f654e
refactor: revert default status breaking changes
yggg Oct 29, 2019
6989ef3
refactor(input): update padding according to design
yggg Oct 29, 2019
54e4d6b
refactor(select): make text and placeholder same as input
yggg Oct 29, 2019
98d16e0
refactor(select): update padding according to design
yggg Oct 29, 2019
a96614e
docs(select): update theme properties list
yggg Oct 29, 2019
3d5783c
feat(toggle): add disabled state theme properties for each status
yggg Oct 29, 2019
6cc16ba
fix(playground): add missing file
yggg Oct 29, 2019
013b6a5
test(layout): update expected color
yggg Oct 30, 2019
47b7b8e
test(toastr): update expected status
yggg Oct 30, 2019
bc1956a
fix(tooltip): set correct colors for basic status
yggg Oct 30, 2019
4b5f767
refactor(toggle): update control colors
yggg Oct 30, 2019
f1ec21d
refactor(checkbox): add disabled state for each status
yggg Oct 30, 2019
c971238
refactor(radio): add disabled state for each status
yggg Oct 30, 2019
6a550a4
refactor(checkbox): allow to set checked via attribute
yggg Oct 30, 2019
53a5bdf
refactor(input): set disabled text color to white
yggg Oct 30, 2019
2f61ec6
refactor(select): set disabled text color to white
yggg Oct 30, 2019
55e4626
docs(checkbox): set basic status for basic example
yggg Oct 30, 2019
27c3489
docs(input): set basic status for basic example
yggg Oct 30, 2019
00b530f
docs(select): add basic and control examples
yggg Oct 30, 2019
e25b26c
refactor(input, select): remove outline on focus
yggg Oct 30, 2019
c223eb6
fix(icon): use current color for basic icon
yggg Oct 30, 2019
515bc40
fix(icon): set default status if it's not provided in config
yggg Oct 30, 2019
ed7c338
refactor(tooltip): update icon size according to design
yggg Oct 30, 2019
2aadba1
refactor(spinner): update sizes according to design
yggg Oct 30, 2019
8d7a03d
refactor(input, spinner): make input and select same height as buttons
yggg Oct 30, 2019
96696c8
fix(button): change icon depending on size
yggg Oct 30, 2019
dea19d2
refactor(icon): make status optional
yggg Oct 30, 2019
51f17f1
refactor(tooltip): make status optional
yggg Oct 30, 2019
a613aff
Merge branch 'master' into feat/add-basic-and-control-statuses
yggg Oct 30, 2019
b054807
fix(select): use correct variable for adjacent border
yggg Oct 30, 2019
eee5db0
refactor(spinner): convert empty status value to basic
yggg Oct 30, 2019
5f7b67b
docs(tooltip): update theme properties list
yggg Oct 30, 2019
5ee17e0
docs(chat): update theme properties list
yggg Oct 30, 2019
cad2de4
docs(icon): update theme properties list
yggg Oct 30, 2019
d1fa646
style: remove tab symbol
yggg Oct 30, 2019
1ba549b
refactor(toastr): move status before state in theme variable name
yggg Oct 30, 2019
663f442
Merge branch 'master' into feat/add-basic-and-control-statuses
yggg Oct 31, 2019
c6cfe4e
Merge branch 'master' into feat/add-basic-and-control-statuses
yggg Oct 31, 2019
8c3676f
fix(chat): set status on input hover and focus
yggg Oct 31, 2019
9cf8eba
fix(chat): make basic default status
yggg Oct 31, 2019
5502e2a
docs(checkbox): add space between checkboxes
yggg Oct 31, 2019
d8fd0a5
refactor(overlay): use color from Eva
yggg Oct 31, 2019
4b74beb
docs(infinite list): make placeholders full width
yggg Oct 31, 2019
14c2163
fix(popover): set text color for any popover
yggg Oct 31, 2019
afde53e
refactor(chat): add empty status deprecation warning
yggg Oct 31, 2019
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
Prev Previous commit
Next Next commit
feat(progress bar): add basic and control statuses
Progress now has `basic` status by default.
  • Loading branch information
yggg committed Oct 28, 2019
commit 73ddf53b87d0863cf0afc9d6191a77502ef829f7
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ import { NbComponentStatus } from '../component-status';
* progress-bar-giant-text-font-size:
* progress-bar-giant-text-font-weight:
* progress-bar-giant-text-line-height:
* progress-bar-basic-background-color:
* progress-bar-basic-filled-background-color:
* progress-bar-basic-text-color:
* progress-bar-primary-background-color:
* progress-bar-primary-filled-background-color:
* progress-bar-primary-text-color:
Expand All @@ -86,6 +89,9 @@ import { NbComponentStatus } from '../component-status';
* progress-bar-danger-background-color:
* progress-bar-danger-filled-background-color:
* progress-bar-danger-text-color:
* progress-bar-control-background-color:
* progress-bar-control-filled-background-color:
* progress-bar-control-text-color:
*/
@Component({
selector: 'nb-progress-bar',
Expand All @@ -107,9 +113,9 @@ export class NbProgressBarComponent {
@Input() value: number = 0;

/**
* Progress bar background (`primary` (default), `info`, `success`, `warning`, `danger`)
* Progress bar background (`basic` (default), `primary`, `info`, `success`, `warning`, `danger`, `control`)
*/
@Input() status: NbComponentStatus = 'primary';
@Input() status: NbComponentStatus = 'basic';

/**
* Progress bar size (`tiny`, `small`, `medium` (default), `large`, `giant`)
Expand Down Expand Up @@ -170,4 +176,14 @@ export class NbProgressBarComponent {
get danger(): boolean {
return this.status === 'danger';
}

@HostBinding('class.status-basic')
get basic(): boolean {
return this.status === 'basic';
}

@HostBinding('class.status-control')
get control(): boolean {
return this.status === 'control';
}
}
13 changes: 12 additions & 1 deletion src/framework/theme/styles/themes/_mapping.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1328,23 +1328,34 @@ $eva-mapping: (
progress-bar-giant-text-font-weight: text-subtitle-font-weight,
progress-bar-giant-text-line-height: text-subtitle-line-height,

progress-bar-basic-background-color: background-basic-color-2,
progress-bar-basic-filled-background-color: background-basic-color-4,
progress-bar-basic-text-color: text-basic-color,

progress-bar-primary-background-color: background-basic-color-3,
progress-bar-primary-filled-background-color: color-primary-default,
progress-bar-primary-text-color: text-control-color,

progress-bar-success-background-color: background-basic-color-3,
progress-bar-success-filled-background-color: color-success-default,
progress-bar-success-text-color: text-control-color,

progress-bar-info-background-color: background-basic-color-3,
progress-bar-info-filled-background-color: color-info-default,
progress-bar-info-text-color: text-control-color,

progress-bar-warning-background-color: background-basic-color-3,
progress-bar-warning-filled-background-color: color-warning-default,
progress-bar-warning-text-color: text-control-color,

progress-bar-danger-background-color: background-basic-color-3,
progress-bar-danger-filled-background-color: color-danger-default,
progress-bar-danger-text-color: text-control-color,

alert-background-color: background-basic-color-2,
progress-bar-control-background-color: background-basic-color-3,
progress-bar-control-filled-background-color: color-control-default,
progress-bar-control-text-color: color-basic-800,

alert-border-radius: border-radius,
alert-bottom-margin: 1.5rem,
alert-padding: 1rem 1.125rem,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
<nb-card>
<nb-card-body>
<nb-progress-bar [value]="20" status="primary">primary</nb-progress-bar>
<nb-progress-bar [value]="40" status="info">info</nb-progress-bar>
<nb-progress-bar [value]="20" status="basic">basic</nb-progress-bar>
<nb-progress-bar [value]="30" status="primary">primary</nb-progress-bar>
<nb-progress-bar [value]="50" status="info">info</nb-progress-bar>
<nb-progress-bar [value]="60" status="success">success</nb-progress-bar>
<nb-progress-bar [value]="80" status="warning">warning</nb-progress-bar>
<nb-progress-bar [value]="100" status="danger">danger</nb-progress-bar>
<nb-progress-bar [value]="70" status="warning">warning</nb-progress-bar>
<nb-progress-bar [value]="80" status="danger">danger</nb-progress-bar>
<div class="control-status-example">
<nb-progress-bar [value]="90" status="control">control</nb-progress-bar>
</div>
</nb-card-body>
</nb-card>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
@import '../../styles/themes';

nb-progress-bar ~ nb-progress-bar {
margin-top: 1rem;
}

.control-status-example {
margin-top: 1rem;
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,7 @@ import { Component } from '@angular/core';
@Component({
selector: 'nb-progress-bar-status',
templateUrl: './progress-bar-status.component.html',
styles: [`
nb-progress-bar ~ nb-progress-bar {
margin-top: 1rem;
}
`],
styleUrls: ['./progress-bar-status.component.scss'],
})

export class ProgressBarStatusComponent {
Expand Down