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

fix(theme): finalize themes with design system #1481

Merged
merged 38 commits into from
May 24, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
5654c42
refactor: background-default -> background-basic
nnixaa May 22, 2019
dc96b6a
refactor: remove old variables
nnixaa May 22, 2019
6ef13da
fix(checkbox): use proper background theme property
yggg May 22, 2019
4076164
fix: change theme buttons wrapper
yggg May 22, 2019
c79e83c
fix: remove input inner shadow on ios
yggg May 22, 2019
2501958
feat(input): add focus outline
yggg May 22, 2019
f03e0a6
refactor(card): use same text color for all status cards
yggg May 22, 2019
b4451cd
docs: change phrasing
yggg May 22, 2019
00d8bc6
fix(smart table): use existing theme variable
yggg May 22, 2019
aeac1fe
fix: use proper theme property name
yggg May 22, 2019
b40df83
fix(docs): add missing theme properties
yggg May 22, 2019
d6e1e6d
Merge branch 'master' into feat/theme-finalization
yggg May 22, 2019
9cfd375
fix(docs): update layout background colors
yggg May 23, 2019
ba05fff
feat(select): add options list border theme properties
yggg May 23, 2019
004612b
refactor(dark theme): remove wrong divider color
yggg May 23, 2019
3b28efb
refactor(default theme): update theme colors
yggg May 23, 2019
a4aeee5
refactor(cosmic theme): update theme colors
yggg May 23, 2019
9e715fc
refactor(cosmic theme): remove unnecessary overrides
yggg May 23, 2019
add1828
refactor(corporate): use common variables to change values
yggg May 23, 2019
e31fdcb
refactor(badge): use common border radius
yggg May 23, 2019
7d50e04
Merge branch 'master' into feat/theme-finalization
yggg May 23, 2019
6c202d4
feat(docs): enable css custom properties in docs apps
yggg May 23, 2019
f82162e
fix(card): use alternate text color on status card headers
yggg May 23, 2019
cc9894e
fix(example): use new cosmic background color
yggg May 23, 2019
8f7a655
feat(playground): add design system fonts
yggg May 23, 2019
4733c7c
docs(input): remove shape setting from textarea
yggg May 23, 2019
97e506c
feat(link): add focus color
yggg May 23, 2019
b87ea37
feat(typography): add label and caption
yggg May 23, 2019
0fee2f7
refactor(auth): use caption and label in auth
yggg May 23, 2019
93eab8c
docs(menu): remove padding around menu examples
yggg May 23, 2019
e4ecdec
refactor(tooltip): decrease padding
yggg May 23, 2019
9f78231
fix(radio): increase active selector weight
yggg May 23, 2019
13bad86
feat(radio): add no status variant
yggg May 23, 2019
0d573d1
feat(checkbox): add no status variant
yggg May 23, 2019
e8a60a8
refactor: remove feather from docs
yggg May 23, 2019
4a661da
fix(chat): make input full width
yggg May 23, 2019
d355cee
refactor(button): use disable text color in ghost appearance
yggg May 23, 2019
8333b38
refactor(button): lighter focus colors
yggg May 23, 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
569 changes: 0 additions & 569 deletions docs/app/@theme/styles/_feather.scss

This file was deleted.

6 changes: 5 additions & 1 deletion docs/app/@theme/styles/themes.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
@import '../../../../src/framework/theme/styles/themes/default';
@import '../../../../src/framework/theme/styles/global/breakpoints';

$nb-enable-css-custom-properties: true;

/*
We have to overwrite breakpoints because we need to add *macpro* breakpoint.
But if we add it using *map-merge* function we'll get the warning and *media-breakpoint-down* will stop working.
Expand Down Expand Up @@ -34,12 +36,14 @@ $nb-themes: nb-register-theme((
footer-menu-fg: color-fg-text,
code-block-bg: linear-gradient(225deg, #333c66 0%, #1d2447 100%),
color-gray-light: #ced5dd,
radius: 0.375rem,
color-fg-highlight: #40dc7e,

color-fg: white,
color-fg-heading: #0d1c2e,
color-fg-text: #919fb1,
shadow: none,
layout-bg: transparent,
layout-background-color: transparent,
layout-padding: 0,
layout-medium-padding: 0,
layout-small-padding: 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

.component-name {
color: nb-theme(color-fg-heading-light);
font-weight: nb-theme(font-weight-bolder);
font-weight: 500;
}

.component-navigate-link {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
// colors
$action-bg: white;
$action-fg: nb-theme(color-fg-heading-light);
$block-bg-default: #f7f8fa;
$block-bg-cosmic: #292766;
$block-bg-default: #edf0f4;
$block-bg-cosmic: #1b1b38;
$block-fg-cosmic: #e8e9fa;
$block-bg-corporate: #f7f8fa;
$block-bg-dark: #232a39;
$block-bg-corporate: #edf0f4;
$block-bg-dark: #1a1f33;
$block-fg-dark: #f7f8fa;

display: flex;
Expand Down
2 changes: 1 addition & 1 deletion docs/app/documentation/page/page.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@
margin-top: 1rem;

nb-card-body {
background-color: nb-theme(layout-bg);
background-color: nb-theme(layout-background-color);
padding: 0;
overflow: visible;
}
Expand Down
4 changes: 2 additions & 2 deletions src/app/layout-theme-toggle/layout-theme-toggle.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ import { NbThemeService } from '@nebular/theme';
selector: 'nb-layout-theme-toggle',
styleUrls: ['./layout-theme-toggle.component.scss'],
template: `
<label dir="ltr">
<div dir="ltr">
<button (click)="enable('default')">Default</button>
<button (click)="enable('dark')">Dark</button>
<button (click)="enable('cosmic')">Cosmic</button>
<button (click)="enable('corporate')">Corporate</button>
</label>
</div>
`,
})
export class LayoutThemeToggleComponent {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
color: nb-theme(text-hint-color);
}

.error-message {
color: nb-theme(color-danger-500);
.forgot-password {
color: nb-theme(text-disabled-color);
}

.socials a {
Expand Down
22 changes: 10 additions & 12 deletions src/framework/auth/components/auth-block/auth-block.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,12 @@
margin-bottom: 0.5rem;
}

.error-message {
.forgot-password {
text-decoration: none;
margin-bottom: 0.5rem;
}

.caption {
margin-top: 0.5rem;
}

Expand All @@ -38,13 +43,6 @@
text-align: center;
}

.checkbox {
display: flex;
justify-content: space-between;
margin-bottom: 10px;
font-weight: normal;
}

.form-control-group {
margin-bottom: 2rem;
}
Expand All @@ -53,10 +51,11 @@
display: flex;
justify-content: space-between;
margin: 2rem 0;
}

.forgot-password {
line-height: 2;
}
.label-with-link {
display: flex;
justify-content: space-between;
}

.links {
Expand All @@ -70,7 +69,6 @@
.socials a {
margin: 0 1rem;
text-decoration: none;
font-size: 1rem;
vertical-align: middle;

&.with-icon {
Expand Down
2 changes: 2 additions & 0 deletions src/framework/auth/components/auth.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@
}

.navigation .link {
display: inline-block;
text-decoration: none;

nb-icon {
font-size: 2rem;
vertical-align: middle;
}
}

Expand Down
4 changes: 3 additions & 1 deletion src/framework/auth/components/auth.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ import { takeWhile } from 'rxjs/operators';
<nb-card>
<nb-card-header>
<nav class="navigation">
<a href="#" (click)="back()" class="link" aria-label="Back"><nb-icon icon="arrow-back"></nb-icon></a>
<a href="#" (click)="back()" class="link back-link" aria-label="Back">
<nb-icon icon="arrow-back"></nb-icon>
</a>
</nav>
</nb-card-header>
<nb-card-body>
Expand Down
20 changes: 11 additions & 9 deletions src/framework/auth/components/login/login.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,23 +27,26 @@ <h1 id="title" class="title">Login</h1>
id="input-email"
pattern=".+@.+\..+"
placeholder="Email address"
fieldSize="giant"
fieldSize="large"
autofocus
[status]="email.dirty ? (email.invalid ? 'danger' : 'success') : ''"
[required]="getConfigValue('forms.validation.email.required')"
[attr.aria-invalid]="email.invalid && email.touched ? true : null">
<ng-container *ngIf="email.invalid && email.touched">
<p class="error-message" *ngIf="email.errors?.required">
<p class="caption status-danger" *ngIf="email.errors?.required">
Email is required!
</p>
<p class="error-message" *ngIf="email.errors?.pattern">
<p class="caption status-danger" *ngIf="email.errors?.pattern">
Email should be the real one!
</p>
</ng-container>
</div>

<div class="form-control-group">
<label class="label" for="input-password">Password:</label>
<span class="label-with-link">
<label class="label" for="input-password">Password:</label>
<a class="forgot-password caption-2" routerLink="../request-password">Forgot Password?</a>
</span>
<input nbInput
fullWidth
[(ngModel)]="user.password"
Expand All @@ -52,17 +55,17 @@ <h1 id="title" class="title">Login</h1>
type="password"
id="input-password"
placeholder="Password"
fieldSize="giant"
fieldSize="large"
[status]="password.dirty ? (password.invalid ? 'danger' : 'success') : ''"
[required]="getConfigValue('forms.validation.password.required')"
[minlength]="getConfigValue('forms.validation.password.minLength')"
[maxlength]="getConfigValue('forms.validation.password.maxLength')"
[attr.aria-invalid]="password.invalid && password.touched ? true : null">
<ng-container *ngIf="password.invalid && password.touched ">
<p class="error-message" *ngIf="password.errors?.required">
<p class="caption status-danger" *ngIf="password.errors?.required">
Password is required!
</p>
<p class="error-message" *ngIf="password.errors?.minlength || password.errors?.maxlength">
<p class="caption status-danger" *ngIf="password.errors?.minlength || password.errors?.maxlength">
Password should contains
from {{ getConfigValue('forms.validation.password.minLength') }}
to {{ getConfigValue('forms.validation.password.maxLength') }}
Expand All @@ -73,13 +76,12 @@ <h1 id="title" class="title">Login</h1>

<div class="form-control-group accept-group">
<nb-checkbox name="rememberMe" [(ngModel)]="user.rememberMe" *ngIf="rememberMe">Remember me</nb-checkbox>
<a class="forgot-password" routerLink="../request-password">Forgot Password?</a>
</div>

<button nbButton
fullWidth
status="primary"
size="giant"
size="large"
[disabled]="submitted || !form.valid"
[class.btn-pulse]="submitted">
Log In
Expand Down
26 changes: 13 additions & 13 deletions src/framework/auth/components/register/register.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,17 @@ <h1 id="title" class="title">Register</h1>
placeholder="Full name"
autofocus
fullWidth
fieldSize="giant"
fieldSize="large"
[status]="fullName.dirty ? (fullName.invalid ? 'danger' : 'success') : ''"
[required]="getConfigValue('forms.validation.fullName.required')"
[minlength]="getConfigValue('forms.validation.fullName.minLength')"
[maxlength]="getConfigValue('forms.validation.fullName.maxLength')"
[attr.aria-invalid]="fullName.invalid && fullName.touched ? true : null">
<ng-container *ngIf="fullName.invalid && fullName.touched">
<p class="error-message" *ngIf="fullName.errors?.required">
<p class="caption status-danger" *ngIf="fullName.errors?.required">
Full name is required!
</p>
<p class="error-message" *ngIf="fullName.errors?.minlength || fullName.errors?.maxlength">
<p class="caption status-danger" *ngIf="fullName.errors?.minlength || fullName.errors?.maxlength">
Full name should contains
from {{getConfigValue('forms.validation.fullName.minLength')}}
to {{getConfigValue('forms.validation.fullName.maxLength')}}
Expand All @@ -55,15 +55,15 @@ <h1 id="title" class="title">Register</h1>
pattern=".+@.+..+"
placeholder="Email address"
fullWidth
fieldSize="giant"
fieldSize="large"
[status]="email.dirty ? (email.invalid ? 'danger' : 'success') : ''"
[required]="getConfigValue('forms.validation.email.required')"
[attr.aria-invalid]="email.invalid && email.touched ? true : null">
<ng-container *ngIf="email.invalid && email.touched">
<p class="error-message" *ngIf="email.errors?.required">
<p class="caption status-danger" *ngIf="email.errors?.required">
Email is required!
</p>
<p class="error-message" *ngIf="email.errors?.pattern">
<p class="caption status-danger" *ngIf="email.errors?.pattern">
Email should be the real one!
</p>
</ng-container>
Expand All @@ -79,17 +79,17 @@ <h1 id="title" class="title">Register</h1>
name="password"
placeholder="Password"
fullWidth
fieldSize="giant"
fieldSize="large"
[status]="password.dirty ? (password.invalid ? 'danger' : 'success') : ''"
[required]="getConfigValue('forms.validation.password.required')"
[minlength]="getConfigValue('forms.validation.password.minLength')"
[maxlength]="getConfigValue('forms.validation.password.maxLength')"
[attr.aria-invalid]="password.invalid && password.touched ? true : null">
<ng-container *ngIf="password.invalid && password.touched">
<p class="error-message" *ngIf="password.errors?.required">
<p class="caption status-danger" *ngIf="password.errors?.required">
Password is required!
</p>
<p class="error-message" *ngIf="password.errors?.minlength || password.errors?.maxlength">
<p class="caption status-danger" *ngIf="password.errors?.minlength || password.errors?.maxlength">
Password should contains
from {{ getConfigValue('forms.validation.password.minLength') }}
to {{ getConfigValue('forms.validation.password.maxLength') }}
Expand All @@ -108,15 +108,15 @@ <h1 id="title" class="title">Register</h1>
name="rePass"
placeholder="Confirm Password"
fullWidth
fieldSize="giant"
fieldSize="large"
[status]="rePass.dirty ? (rePass.invalid || password.value != rePass.value ? 'danger' : 'success') : ''"
[required]="getConfigValue('forms.validation.password.required')"
[attr.aria-invalid]="rePass.invalid && rePass.touched ? true : null">
<ng-container *ngIf="rePass.invalid && rePass.touched">
<p class="error-message" *ngIf="rePass.errors?.required">
<p class="caption status-danger" *ngIf="rePass.errors?.required">
Password confirmation is required!
</p>
<p class="error-message" *ngIf="password.value != rePass.value && !rePass.errors?.required">
<p class="caption status-danger" *ngIf="password.value != rePass.value && !rePass.errors?.required">
Password does not match the confirm password.
</p>
</ng-container>
Expand All @@ -131,7 +131,7 @@ <h1 id="title" class="title">Register</h1>
<button nbButton
fullWidth
status="primary"
size="giant"
size="large"
[disabled]="submitted || !form.valid"
[class.btn-pulse]="submitted">
Register
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ <h1 id="title" class="title">Forgot Password</h1>
placeholder="Email address"
autofocus
fullWidth
fieldSize="giant"
fieldSize="large"
[status]="email.dirty ? (email.invalid ? 'danger' : 'success') : ''"
[required]="getConfigValue('forms.validation.email.required')"
[attr.aria-invalid]="email.invalid && email.touched ? true : null">
<ng-container *ngIf="email.invalid && email.touched">
<p class="error-message" *ngIf="email.errors?.required">
<p class="caption status-danger" *ngIf="email.errors?.required">
Email is required!
</p>
<p class="error-message" *ngIf="email.errors?.pattern">
<p class="caption status-danger" *ngIf="email.errors?.pattern">
Email should be the real one!
</p>
</ng-container>
Expand All @@ -45,7 +45,7 @@ <h1 id="title" class="title">Forgot Password</h1>
<button nbButton
fullWidth
status="primary"
size="giant"
size="large"
[disabled]="submitted || !requestPassForm.valid"
[class.btn-pulse]="submitted">
Request password
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,17 @@ <h1 id="title" class="title">Change password</h1>
placeholder="New Password"
autofocus
fullWidth
fieldSize="giant"
fieldSize="large"
[status]="password.dirty ? (password.invalid ? 'danger' : 'success') : ''"
[required]="getConfigValue('forms.validation.password.required')"
[minlength]="getConfigValue('forms.validation.password.minLength')"
[maxlength]="getConfigValue('forms.validation.password.maxLength')"
[attr.aria-invalid]="password.invalid && password.touched ? true : null">
<ng-container *ngIf="password.invalid && password.touched">
<p class="error-message" *ngIf="password.errors?.required">
<p class="caption status-danger" *ngIf="password.errors?.required">
Password is required!
</p>
<p class="error-message" *ngIf="password.errors?.minlength || password.errors?.maxlength">
<p class="caption status-danger" *ngIf="password.errors?.minlength || password.errors?.maxlength">
Password should contains
from {{getConfigValue('forms.validation.password.minLength')}}
to {{getConfigValue('forms.validation.password.maxLength')}}
Expand All @@ -59,17 +59,17 @@ <h1 id="title" class="title">Change password</h1>
class="last"
placeholder="Confirm Password"
fullWidth
fieldSize="giant"
fieldSize="large"
[status]="rePass.touched
? (rePass.invalid || password.value != rePass.value ? 'danger' : 'success')
: ''"
[required]="getConfigValue('forms.validation.password.required')"
[attr.aria-invalid]="rePass.invalid && rePass.touched ? true : null">
<ng-container *ngIf="rePass.touched">
<p class="error-message" *ngIf="rePass.invalid && rePass.errors?.required">
<p class="caption status-danger" *ngIf="rePass.invalid && rePass.errors?.required">
Password confirmation is required!
</p>
<p class="error-message" *ngIf="password.value != rePass.value && !rePass.errors?.required">
<p class="caption status-danger" *ngIf="password.value != rePass.value && !rePass.errors?.required">
Password does not match the confirm password.
</p>
</ng-container>
Expand All @@ -78,7 +78,7 @@ <h1 id="title" class="title">Change password</h1>
<button nbButton
status="primary"
fullWidth
size="giant"
size="large"
[disabled]="submitted || !resetPassForm.valid"
[class.btn-pulse]="submitted">
Change password
Expand Down
Loading