mirror of
https://github.com/akveo/ngx-admin.git
synced 2026-02-22 07:54:06 +01:00
feat: add a bunch of new Nebular demos (#1911)
This commit is contained in:
parent
c594a5a4c5
commit
3f1f4c558b
185 changed files with 5176 additions and 422 deletions
|
|
@ -0,0 +1,17 @@
|
|||
<nb-card>
|
||||
<nb-card-body>
|
||||
<div class="action-groups-header">
|
||||
Action Groups
|
||||
</div>
|
||||
<nb-actions size="medium">
|
||||
<nb-action icon="nb-menu"></nb-action>
|
||||
<nb-action icon="nb-search"></nb-action>
|
||||
<nb-action icon="nb-email"></nb-action>
|
||||
<nb-action disabled icon="nb-notifications"></nb-action>
|
||||
<nb-action>
|
||||
<nb-user name="Han Solo"></nb-user>
|
||||
</nb-action>
|
||||
<nb-action icon="nb-gear"></nb-action>
|
||||
</nb-actions>
|
||||
</nb-card-body>
|
||||
</nb-card>
|
||||
|
|
@ -0,0 +1,77 @@
|
|||
@import '../../../../@theme/styles/themes';
|
||||
@import '~@nebular/theme/components/card/card.component.theme';
|
||||
@import '~bootstrap/scss/mixins/breakpoints';
|
||||
@import '~@nebular/theme/styles/global/breakpoints';
|
||||
|
||||
@include nb-install-component() {
|
||||
|
||||
nb-card-body {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.action-groups-header {
|
||||
flex-basis: 20%;
|
||||
|
||||
color: nb-theme(card-header-fg-heading);
|
||||
font-family: nb-theme(card-header-font-family);
|
||||
font-size: nb-theme(card-header-font-size);
|
||||
font-weight: nb-theme(card-header-font-weight);
|
||||
}
|
||||
|
||||
.nb-actions {
|
||||
flex-basis: 80%;
|
||||
}
|
||||
|
||||
@include media-breakpoint-down(sm) {
|
||||
nb-card-body {
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
padding: 0.75rem;
|
||||
|
||||
.action-groups-header {
|
||||
@include nb-ltr(margin, 0 0 0.5rem 0.25rem);
|
||||
@include nb-rtl(margin, 0 0.25rem 0.5rem 0);
|
||||
}
|
||||
}
|
||||
|
||||
nb-action {
|
||||
padding: 0 0.5rem;
|
||||
/deep/ .control-icon {
|
||||
font-size: 1.75rem;
|
||||
}
|
||||
}
|
||||
nb-user /deep/ {
|
||||
.user-container {
|
||||
font-size: 0.875rem;
|
||||
}
|
||||
.user-picture {
|
||||
height: 1.75rem;
|
||||
width: 1.75rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@include media-breakpoint-down(xs) {
|
||||
|
||||
nb-action {
|
||||
padding: 0 0.375rem;
|
||||
/deep/ .control-icon {
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
}
|
||||
nb-user /deep/ {
|
||||
.user-container {
|
||||
font-size: 0.75rem;
|
||||
}
|
||||
.user-picture {
|
||||
height: 1.5rem;
|
||||
width: 1.5rem;
|
||||
}
|
||||
}
|
||||
nb-card-body {
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
import { Component } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'ngx-action-groups',
|
||||
styleUrls: ['./action-groups.component.scss'],
|
||||
templateUrl: './action-groups.component.html',
|
||||
})
|
||||
export class ActionGroupsComponent {
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
<nb-card>
|
||||
<nb-card-header>Button Elements</nb-card-header>
|
||||
<nb-card-body>
|
||||
<div class="button-container">
|
||||
<button (click)="onClick()" nbButton>Button</button>
|
||||
</div>
|
||||
<div class="button-container">
|
||||
<input (click)="onClick()" nbButton type="submit" value="Input Submit"/>
|
||||
</div>
|
||||
<div class="button-container">
|
||||
<input (click)="onClick()" nbButton type="button" value="Input Button"/>
|
||||
</div>
|
||||
<div class="button-container">
|
||||
<a (click)="onClick()" href="#" nbButton>Link</a>
|
||||
</div>
|
||||
</nb-card-body>
|
||||
</nb-card>
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
@import '../../../../@theme/styles/themes';
|
||||
@import '~@nebular/bootstrap/styles/buttons';
|
||||
|
||||
@include nb-install-component() {
|
||||
|
||||
nb-card-body {
|
||||
padding: 0 1.25rem 1.25rem 0;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.button-container {
|
||||
margin: 1.25rem 0 0 1.25rem;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
import { Component } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'ngx-button-elements',
|
||||
styleUrls: ['./button-elements.component.scss'],
|
||||
templateUrl: './button-elements.component.html',
|
||||
})
|
||||
export class ButtonElementsComponent {
|
||||
|
||||
onClick() {
|
||||
}
|
||||
}
|
||||
16
src/app/pages/forms/buttons/buttons.component.html
Normal file
16
src/app/pages/forms/buttons/buttons.component.html
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<ngx-hero-buttons></ngx-hero-buttons>
|
||||
<ngx-default-buttons></ngx-default-buttons>
|
||||
<ngx-outline-buttons></ngx-outline-buttons>
|
||||
</div>
|
||||
<div class="col-md-12 col-lg-12 col-xxxl-6">
|
||||
<ngx-shape-buttons></ngx-shape-buttons>
|
||||
<ngx-action-groups></ngx-action-groups>
|
||||
<ngx-labeled-actions-group></ngx-labeled-actions-group>
|
||||
</div>
|
||||
<div class="col-md-12 col-lg-12 col-xxxl-6">
|
||||
<ngx-size-buttons></ngx-size-buttons>
|
||||
<ngx-button-elements></ngx-button-elements>
|
||||
</div>
|
||||
</div>
|
||||
103
src/app/pages/forms/buttons/buttons.component.scss
Normal file
103
src/app/pages/forms/buttons/buttons.component.scss
Normal file
|
|
@ -0,0 +1,103 @@
|
|||
@import '../../../@theme/styles/themes';
|
||||
@import '~@nebular/bootstrap/styles/buttons';
|
||||
@import '~bootstrap/scss/mixins/breakpoints';
|
||||
@import '~@nebular/theme/styles/global/breakpoints';
|
||||
|
||||
@include nb-install-component() {
|
||||
/deep/ {
|
||||
$button-size: 50px;
|
||||
|
||||
.container-title {
|
||||
color: nb-theme(color-fg);
|
||||
font-family: nb-theme(font-secondary);
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.header {
|
||||
color: nb-theme(color-fg-header);
|
||||
font-size: 0.875rem;
|
||||
}
|
||||
|
||||
.subheader {
|
||||
font-size: 0.75rem;
|
||||
font-weight: nb-theme(font-weight-light);
|
||||
color: nb-theme(color-fg);
|
||||
}
|
||||
|
||||
.btn-demo {
|
||||
width: 180px;
|
||||
}
|
||||
|
||||
.state-container {
|
||||
display: flex;
|
||||
|
||||
&:not(:last-child) {
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.state-value {
|
||||
width: $button-size;
|
||||
height: $button-size;
|
||||
border-radius: nb-theme(btn-border-radius);
|
||||
|
||||
@include nb-for-theme(corporate) {
|
||||
border-radius: nb-theme(btn-semi-round-border-radius);
|
||||
}
|
||||
}
|
||||
|
||||
.state-details {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
margin-left: 1rem;
|
||||
margin-right: 1rem;
|
||||
height: $button-size;
|
||||
}
|
||||
}
|
||||
|
||||
.example-container {
|
||||
@include nb-ltr(padding-right, 0);
|
||||
@include nb-rtl(padding-left, 0);
|
||||
}
|
||||
|
||||
.example-container .container-btn {
|
||||
margin-bottom: 1.5rem;
|
||||
}
|
||||
|
||||
.block-level-buttons .btn-group {
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
}
|
||||
|
||||
@include media-breakpoint-down(is) {
|
||||
ngx-default-buttons /deep/ nb-card-header {
|
||||
flex-direction: column;
|
||||
align-items: left;
|
||||
|
||||
span {
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@include media-breakpoint-down(xs) {
|
||||
|
||||
/deep/.icon-buttons .icon-button-examples {
|
||||
button {
|
||||
@include nb-ltr(margin-right, 1rem);
|
||||
@include nb-rtl(margin-left, 1rem);
|
||||
}
|
||||
}
|
||||
|
||||
ngx-default-buttons /deep/ nb-card-header {
|
||||
flex-direction: column;
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
ngx-block-level-buttons /deep/ {
|
||||
.btn-primary {
|
||||
padding: 0.75rem 1rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
9
src/app/pages/forms/buttons/buttons.component.ts
Normal file
9
src/app/pages/forms/buttons/buttons.component.ts
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
import { Component } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'ngx-buttons',
|
||||
styleUrls: ['./buttons.component.scss'],
|
||||
templateUrl: './buttons.component.html',
|
||||
})
|
||||
export class ButtonsComponent {
|
||||
}
|
||||
38
src/app/pages/forms/buttons/buttons.module.ts
Normal file
38
src/app/pages/forms/buttons/buttons.module.ts
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
|
||||
import { ThemeModule } from '../../../@theme/theme.module';
|
||||
import { DefaultButtonsComponent } from './default-buttons/default-buttons.component';
|
||||
import { HeroButtonComponent } from './hero-buttons/hero-buttons.component';
|
||||
import { ShapeButtonsComponent } from './shape-buttons/shape-buttons.component';
|
||||
import { SizeButtonsComponent } from './size-buttons/size-buttons.component';
|
||||
import { ButtonsComponent } from './buttons.component';
|
||||
import { ActionGroupsComponent } from './action-groups/action-groups.component';
|
||||
import { LabeledActionsGroupComponent } from './labeled-actions-group/labeled-actions-group.component';
|
||||
import { OutlineButtonsComponent } from './outline-buttons/outline-buttons.component';
|
||||
import { ButtonElementsComponent } from './button-elements/button-elements.component';
|
||||
|
||||
const components = [
|
||||
ButtonsComponent,
|
||||
DefaultButtonsComponent,
|
||||
OutlineButtonsComponent,
|
||||
HeroButtonComponent,
|
||||
ShapeButtonsComponent,
|
||||
SizeButtonsComponent,
|
||||
ActionGroupsComponent,
|
||||
LabeledActionsGroupComponent,
|
||||
ButtonElementsComponent,
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
ThemeModule,
|
||||
],
|
||||
exports: [
|
||||
...components,
|
||||
],
|
||||
declarations: [
|
||||
...components,
|
||||
],
|
||||
providers: [],
|
||||
})
|
||||
export class ButtonsModule { }
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
<nb-card>
|
||||
<nb-card-header>
|
||||
<span>Default Buttons</span>
|
||||
</nb-card-header>
|
||||
<nb-card-body>
|
||||
<div class="row">
|
||||
<div class="example-container col-md-4" *ngFor="let b of buttons">
|
||||
<div class="container-title">
|
||||
<span>{{ b.containerTitle }}</span>
|
||||
</div>
|
||||
<div class="container-btn">
|
||||
<button nbButton
|
||||
status="{{ b.status }}"
|
||||
class="btn-demo">
|
||||
{{ b.title }}
|
||||
</button>
|
||||
</div>
|
||||
<div class="{{ b.container }}">
|
||||
<div class="state-container">
|
||||
<div class="state-value original"></div>
|
||||
<div class="state-details">
|
||||
<span class="header">Default</span>
|
||||
<span class="subheader">{{ b.default }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="state-container">
|
||||
<div class="state-value hover"></div>
|
||||
<div class="state-details">
|
||||
<span class="header">Hover</span>
|
||||
<span class="subheader">14% white</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="state-container">
|
||||
<div class="state-value active"></div>
|
||||
<div class="state-details">
|
||||
<span class="header">Active</span>
|
||||
<span class="subheader">14% black</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</nb-card-body>
|
||||
</nb-card>
|
||||
|
|
@ -0,0 +1,130 @@
|
|||
@import '../../../../@theme/styles/themes';
|
||||
@import '~@nebular/bootstrap/styles/buttons';
|
||||
@import '~bootstrap/scss/mixins/breakpoints';
|
||||
@import '~@nebular/theme/styles/global/breakpoints';
|
||||
|
||||
@include nb-install-component() {
|
||||
|
||||
nb-card-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
nb-card-body {
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
.example-container {
|
||||
margin-bottom: 1.5rem;
|
||||
}
|
||||
|
||||
.primary-container {
|
||||
.original {
|
||||
background-color: nb-theme(btn-primary-bg);
|
||||
}
|
||||
.hover {
|
||||
@include btn-primary-hover();
|
||||
}
|
||||
.active {
|
||||
@include btn-primary-active();
|
||||
}
|
||||
}
|
||||
|
||||
.primary-container.outline .original {
|
||||
background-color: transparent;
|
||||
border: 2px solid nb-theme(btn-primary-bg);
|
||||
}
|
||||
|
||||
.success-container {
|
||||
.original {
|
||||
background-color: nb-theme(btn-success-bg);
|
||||
}
|
||||
.hover {
|
||||
@include btn-success-hover();
|
||||
}
|
||||
.active {
|
||||
@include btn-success-active();
|
||||
}
|
||||
}
|
||||
|
||||
.success-container.outline .original {
|
||||
background-color: transparent;
|
||||
border: 2px solid nb-theme(btn-success-bg);
|
||||
}
|
||||
|
||||
.warning-container {
|
||||
.original {
|
||||
background-color: nb-theme(btn-warning-bg);
|
||||
}
|
||||
.hover {
|
||||
@include btn-warning-hover();
|
||||
}
|
||||
.active {
|
||||
@include btn-warning-active();
|
||||
}
|
||||
}
|
||||
|
||||
.warning-container.outline .original {
|
||||
background-color: transparent;
|
||||
border: 2px solid nb-theme(btn-warning-bg);
|
||||
}
|
||||
|
||||
.info-container {
|
||||
.original {
|
||||
background-color: nb-theme(btn-info-bg);
|
||||
}
|
||||
.hover {
|
||||
@include btn-info-hover();
|
||||
}
|
||||
.active {
|
||||
@include btn-info-active();
|
||||
}
|
||||
}
|
||||
|
||||
.info-container.outline .original {
|
||||
background-color: transparent;
|
||||
border: 2px solid nb-theme(btn-info-bg);
|
||||
}
|
||||
|
||||
.danger-container {
|
||||
.original {
|
||||
background-color: nb-theme(btn-danger-bg);
|
||||
}
|
||||
.hover {
|
||||
@include btn-danger-hover();
|
||||
}
|
||||
.active {
|
||||
@include btn-danger-active();
|
||||
}
|
||||
}
|
||||
|
||||
.danger-container.outline .original {
|
||||
background-color: transparent;
|
||||
border: 2px solid nb-theme(btn-danger-bg);
|
||||
}
|
||||
|
||||
.secondary-container {
|
||||
.original {
|
||||
border: 2px solid nb-theme(btn-secondary-border);
|
||||
}
|
||||
.hover {
|
||||
@include btn-secondary-hover();
|
||||
}
|
||||
.active {
|
||||
@include btn-secondary-active();
|
||||
}
|
||||
}
|
||||
|
||||
.secondary-container.outline .original {
|
||||
background-color: transparent;
|
||||
border: 2px solid nb-theme(btn-secondary-border);
|
||||
}
|
||||
|
||||
@include media-breakpoint-up(xxl) {
|
||||
.example-container {
|
||||
flex: 0 0 20%;
|
||||
max-width: 20%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
import { Component } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'ngx-default-buttons',
|
||||
styleUrls: ['./default-buttons.component.scss'],
|
||||
templateUrl: './default-buttons.component.html',
|
||||
})
|
||||
export class DefaultButtonsComponent {
|
||||
|
||||
buttons = [
|
||||
{
|
||||
status: 'primary',
|
||||
container: 'primary-container',
|
||||
containerTitle: 'Primary Button',
|
||||
title: 'Primary',
|
||||
default: '#7659ff',
|
||||
},
|
||||
{
|
||||
status: 'warning',
|
||||
container: 'warning-container',
|
||||
containerTitle: 'Warning Button',
|
||||
title: 'Warning',
|
||||
default: '#ffcb17',
|
||||
},
|
||||
{
|
||||
status: 'success',
|
||||
container: 'success-container',
|
||||
containerTitle: 'Success Button',
|
||||
title: 'Success',
|
||||
default: '#00d977',
|
||||
},
|
||||
{
|
||||
status: 'info',
|
||||
container: 'info-container',
|
||||
containerTitle: 'Info Button',
|
||||
title: 'Info',
|
||||
default: '#0088ff',
|
||||
},
|
||||
{
|
||||
status: 'danger',
|
||||
container: 'danger-container',
|
||||
containerTitle: 'Danger Button',
|
||||
title: 'Danger',
|
||||
default: '#ff386a',
|
||||
},
|
||||
];
|
||||
}
|
||||
|
|
@ -0,0 +1,72 @@
|
|||
<nb-card>
|
||||
<nb-card-header>Hero Buttons</nb-card-header>
|
||||
<nb-card-body>
|
||||
<div class="row">
|
||||
<div class="example-container col-sm-6 col-md-4 col-xl-3 col-xxxl-2" *ngFor="let hb of settings">
|
||||
<div class="container-title">
|
||||
<span>{{ hb.title }}</span>
|
||||
</div>
|
||||
<div class="container-btn">
|
||||
<button class="btn-demo" nbButton hero status="{{ hb.status }}">{{ hb.buttonTitle }}</button>
|
||||
</div>
|
||||
<div class="{{ hb.container }}">
|
||||
<div class="state-container" *ngIf="hb[themeName].border">
|
||||
<div class="state-value border"></div>
|
||||
<div class="state-details">
|
||||
<span class="header">Border</span>
|
||||
<span class="subheader">{{ hb[themeName].border }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="state-container" *ngIf="hb[themeName].color">
|
||||
<div class="state-value color"></div>
|
||||
<div class="state-details">
|
||||
<span class="header">Color</span>
|
||||
<span class="subheader">{{ hb[themeName].color }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="state-container" *ngIf="hb[themeName].gradientLeft">
|
||||
<div class="state-value gradient"></div>
|
||||
<div class="state-details">
|
||||
<span class="header">Linear Gradient</span>
|
||||
<span class="subheader">{{ hb[themeName].gradientLeft }}</span>
|
||||
<span class="subheader">{{ hb[themeName].gradientRight }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="state-container">
|
||||
<div class="state-value bevel" [ngClass]="{ 'none': !hb[themeName].bevel }"></div>
|
||||
<div class="state-details" *ngIf="hb[themeName].bevel">
|
||||
<span class="header">Bevel</span>
|
||||
<span class="subheader">0 3px 0 0</span>
|
||||
<span class="subheader">{{ hb[themeName].bevel }}</span>
|
||||
</div>
|
||||
<div class="state-details" *ngIf="!hb[themeName].bevel">
|
||||
<span class="header">No Bevel</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="state-container">
|
||||
<div class="state-value shadow" [ngClass]="{ 'none': !hb[themeName].shadow }"></div>
|
||||
<div class="state-details" *ngIf="hb[themeName].shadow">
|
||||
<span class="header">Shadow</span>
|
||||
<span class="subheader">0 4px 10px 0</span>
|
||||
<span class="subheader">{{ hb[themeName].shadow }}</span>
|
||||
</div>
|
||||
<div class="state-details" *ngIf="!hb[themeName].shadow">
|
||||
<span class="header">No Shadow</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="state-container">
|
||||
<div class="state-value glow" [ngClass]="{ 'none': !hb[themeName].glow }"></div>
|
||||
<div class="state-details" *ngIf="hb[themeName].glow">
|
||||
<span class="header">Glow</span>
|
||||
<span class="subheader">{{ hb[themeName].glow.params }}</span>
|
||||
<span class="subheader">{{ hb[themeName].glow.color }}</span>
|
||||
</div>
|
||||
<div class="state-details" *ngIf="!hb[themeName].glow">
|
||||
<span class="header">No Glow</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</nb-card-body>
|
||||
</nb-card>
|
||||
|
|
@ -0,0 +1,144 @@
|
|||
@import '../../../../@theme/styles/themes';
|
||||
@import '~@nebular/bootstrap/styles/buttons';
|
||||
@import '~bootstrap/scss/mixins/breakpoints';
|
||||
@import '~@nebular/theme/styles/global/breakpoints';
|
||||
|
||||
@include nb-install-component() {
|
||||
|
||||
nb-card-body {
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
.none {
|
||||
position: relative;
|
||||
transform: rotate(45deg);
|
||||
|
||||
&::before, &::after {
|
||||
position: absolute;
|
||||
content: '';
|
||||
background: nb-theme(form-control-border-color);
|
||||
}
|
||||
|
||||
&::before {
|
||||
left: 50%;
|
||||
top: 10%;
|
||||
transform: translateX(-50%);
|
||||
width: 1px;
|
||||
height: 80%;
|
||||
}
|
||||
|
||||
&::after {
|
||||
top: 50%;
|
||||
left: 10%;
|
||||
transform: translateY(-50%);
|
||||
height: 1px;
|
||||
width: 80%;
|
||||
}
|
||||
}
|
||||
|
||||
.shadow {
|
||||
box-shadow: nb-theme(btn-hero-shadow);
|
||||
}
|
||||
|
||||
.primary-container {
|
||||
.color {
|
||||
background-color: nb-theme(color-primary);
|
||||
}
|
||||
.gradient {
|
||||
@include btn-hero-primary-gradient();
|
||||
}
|
||||
.glow {
|
||||
box-shadow: btn-hero-primary-glow();
|
||||
}
|
||||
.bevel {
|
||||
box-shadow: btn-hero-primary-bevel();
|
||||
}
|
||||
}
|
||||
|
||||
.warning-container {
|
||||
.color {
|
||||
background-color: nb-theme(color-warning);
|
||||
}
|
||||
.gradient {
|
||||
@include btn-hero-warning-gradient();
|
||||
}
|
||||
.glow {
|
||||
box-shadow: btn-hero-warning-glow();
|
||||
}
|
||||
.bevel {
|
||||
box-shadow: btn-hero-warning-bevel();
|
||||
}
|
||||
}
|
||||
|
||||
.success-container {
|
||||
.color {
|
||||
background-color: nb-theme(color-success);
|
||||
}
|
||||
.gradient {
|
||||
@include btn-hero-success-gradient();
|
||||
}
|
||||
.glow {
|
||||
box-shadow: btn-hero-success-glow();
|
||||
}
|
||||
.bevel {
|
||||
box-shadow: btn-hero-success-bevel();
|
||||
}
|
||||
}
|
||||
|
||||
.info-container {
|
||||
.color {
|
||||
background-color: nb-theme(color-info);
|
||||
}
|
||||
.gradient {
|
||||
@include btn-hero-info-gradient();
|
||||
}
|
||||
.glow {
|
||||
box-shadow: btn-hero-info-glow();
|
||||
}
|
||||
.bevel {
|
||||
box-shadow: btn-hero-info-bevel();
|
||||
}
|
||||
}
|
||||
|
||||
.danger-container {
|
||||
.color {
|
||||
background-color: nb-theme(color-danger);
|
||||
}
|
||||
.gradient {
|
||||
@include btn-hero-danger-gradient();
|
||||
}
|
||||
.glow {
|
||||
box-shadow: btn-hero-danger-glow();
|
||||
}
|
||||
.bevel {
|
||||
box-shadow: btn-hero-danger-bevel();
|
||||
}
|
||||
}
|
||||
|
||||
.secondary-container {
|
||||
.color {
|
||||
background-color: nb-theme(btn-secondary-bg);
|
||||
}
|
||||
.border {
|
||||
color: nb-theme(btn-secondary-color);
|
||||
border: nb-theme(btn-secondary-border-width) solid nb-theme(btn-secondary-border);
|
||||
}
|
||||
.glow {
|
||||
box-shadow: btn-hero-secondary-glow();
|
||||
}
|
||||
.bevel {
|
||||
box-shadow: btn-hero-secondary-bevel();
|
||||
}
|
||||
}
|
||||
|
||||
.example-container {
|
||||
margin-bottom: 1.5rem;
|
||||
}
|
||||
|
||||
@include media-breakpoint-up(xxl) {
|
||||
.example-container {
|
||||
flex: 0 0 20%;
|
||||
max-width: 20%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,166 @@
|
|||
import { Component, OnDestroy } from '@angular/core';
|
||||
import { NbThemeService } from '@nebular/theme';
|
||||
import { Subscription } from 'rxjs';
|
||||
|
||||
@Component({
|
||||
selector: 'ngx-hero-buttons',
|
||||
styleUrls: ['./hero-buttons.component.scss'],
|
||||
templateUrl: './hero-buttons.component.html',
|
||||
})
|
||||
export class HeroButtonComponent implements OnDestroy {
|
||||
|
||||
themeName = 'default';
|
||||
settings: Array<any>;
|
||||
themeSubscription: Subscription;
|
||||
|
||||
constructor(private themeService: NbThemeService) {
|
||||
this.themeSubscription = this.themeService.getJsTheme().subscribe(theme => {
|
||||
this.themeName = theme.name;
|
||||
this.init(theme.variables);
|
||||
});
|
||||
}
|
||||
|
||||
init(colors: any) {
|
||||
this.settings = [
|
||||
{
|
||||
status: 'primary',
|
||||
container: 'primary-container',
|
||||
title: 'Primary Button',
|
||||
buttonTitle: 'Primary',
|
||||
default: {
|
||||
gradientLeft: `adjust-hue(${colors.primary}, 20deg)`,
|
||||
gradientRight: colors.primary,
|
||||
},
|
||||
corporate: {
|
||||
color: colors.primary,
|
||||
glow: {
|
||||
params: '0 0 20px 0',
|
||||
color: 'rgba (115, 161, 255, 0.5)',
|
||||
},
|
||||
},
|
||||
cosmic: {
|
||||
gradientLeft: `adjust-hue(${colors.primary}, 20deg)`,
|
||||
gradientRight: colors.primary,
|
||||
bevel: `shade(${colors.primary}, 14%)`,
|
||||
shadow: 'rgba (6, 7, 64, 0.5)',
|
||||
glow: {
|
||||
params: '0 2px 12px 0',
|
||||
color: `adjust-hue(${colors.primary}, 10deg)`,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
status: 'warning',
|
||||
container: 'warning-container',
|
||||
title: 'Warning Button',
|
||||
buttonTitle: 'Warning',
|
||||
default: {
|
||||
gradientLeft: `adjust-hue(${colors.warning}, 10deg)`,
|
||||
gradientRight: colors.warning,
|
||||
},
|
||||
corporate: {
|
||||
color: colors.warning,
|
||||
glow: {
|
||||
params: '0 0 20px 0',
|
||||
color: 'rgba (256, 163, 107, 0.5)',
|
||||
},
|
||||
},
|
||||
cosmic: {
|
||||
gradientLeft: `adjust-hue(${colors.warning}, 10deg)`,
|
||||
gradientRight: colors.warning,
|
||||
bevel: `shade(${colors.warning}, 14%)`,
|
||||
shadow: 'rgba (33, 7, 77, 0.5)',
|
||||
glow: {
|
||||
params: '0 2px 12px 0',
|
||||
color: `adjust-hue(${colors.warning}, 5deg)`,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
status: 'success',
|
||||
container: 'success-container',
|
||||
title: 'Success Button',
|
||||
buttonTitle: 'Success',
|
||||
default: {
|
||||
gradientLeft: `adjust-hue(${colors.success}, 20deg)`,
|
||||
gradientRight: colors.success,
|
||||
},
|
||||
corporate: {
|
||||
color: colors.success,
|
||||
glow: {
|
||||
params: '0 0 20px 0',
|
||||
color: 'rgba (93, 207, 227, 0.5)',
|
||||
},
|
||||
},
|
||||
cosmic: {
|
||||
gradientLeft: `adjust-hue(${colors.success}, 20deg)`,
|
||||
gradientRight: colors.success,
|
||||
bevel: `shade(${colors.success}, 14%)`,
|
||||
shadow: 'rgba (33, 7, 77, 0.5)',
|
||||
glow: {
|
||||
params: '0 2px 12px 0',
|
||||
color: `adjust-hue(${colors.success}, 10deg)`,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
status: 'info',
|
||||
container: 'info-container',
|
||||
title: 'Info Button',
|
||||
buttonTitle: 'Info',
|
||||
default: {
|
||||
gradientLeft: `adjust-hue(${colors.info}, -10deg)`,
|
||||
gradientRight: colors.info,
|
||||
},
|
||||
corporate: {
|
||||
color: colors.info,
|
||||
glow: {
|
||||
params: '0 0 20px 0',
|
||||
color: 'rgba (186, 127, 236, 0.5)',
|
||||
},
|
||||
},
|
||||
cosmic: {
|
||||
gradientLeft: `adjust-hue(${colors.info}, -10deg)`,
|
||||
gradientRight: colors.info,
|
||||
bevel: `shade(${colors.info}, 14%)`,
|
||||
shadow: 'rgba (33, 7, 77, 0.5)',
|
||||
glow: {
|
||||
params: '0 2px 12px 0',
|
||||
color: `adjust-hue(${colors.info}, -5deg)`,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
status: 'danger',
|
||||
container: 'danger-container',
|
||||
title: 'Danger Button',
|
||||
buttonTitle: 'Danger',
|
||||
default: {
|
||||
gradientLeft: `adjust-hue(${colors.danger}, -20deg)`,
|
||||
gradientRight: colors.danger,
|
||||
},
|
||||
corporate: {
|
||||
color: colors.danger,
|
||||
glow: {
|
||||
params: '0 0 20px 0',
|
||||
color: 'rgba (255, 107, 131, 0.5)',
|
||||
},
|
||||
},
|
||||
cosmic: {
|
||||
gradientLeft: `adjust-hue(${colors.danger}, -20deg)`,
|
||||
gradientRight: colors.danger,
|
||||
bevel: `shade(${colors.danger}, 14%)`,
|
||||
shadow: 'rgba (33, 7, 77, 0.5)',
|
||||
glow: {
|
||||
params: '0 2px 12px 0',
|
||||
color: `adjust-hue(${colors.danger}, -10deg)`,
|
||||
},
|
||||
},
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
ngOnDestroy() {
|
||||
this.themeSubscription.unsubscribe();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
<nb-card>
|
||||
<nb-card-body>
|
||||
<nb-actions size="medium" fullWidth>
|
||||
<nb-action>
|
||||
<i class="nb-pause-outline"></i><span>Pause</span>
|
||||
</nb-action>
|
||||
<nb-action>
|
||||
<i class="nb-list"></i><span>Logs</span>
|
||||
</nb-action>
|
||||
<nb-action>
|
||||
<i class="nb-search"></i><span>Search</span>
|
||||
</nb-action>
|
||||
<nb-action>
|
||||
<i class="nb-gear"></i><span>Setup</span>
|
||||
</nb-action>
|
||||
</nb-actions>
|
||||
</nb-card-body>
|
||||
</nb-card>
|
||||
|
|
@ -0,0 +1,60 @@
|
|||
@import '../../../../@theme/styles/themes';
|
||||
@import '~bootstrap/scss/mixins/breakpoints';
|
||||
@import '~@nebular/theme/styles/global/breakpoints';
|
||||
|
||||
@include nb-install-component() {
|
||||
|
||||
nb-actions > nb-action {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
nb-action {
|
||||
i {
|
||||
color: nb-theme(color-fg);
|
||||
font-size: 2.5rem;
|
||||
@include nb-ltr(margin-right, 1rem);
|
||||
@include nb-rtl(margin-left, 1rem);
|
||||
|
||||
@include nb-for-theme(corporate) {
|
||||
color: nb-theme(actions-fg);
|
||||
}
|
||||
}
|
||||
|
||||
span {
|
||||
font-family: nb-theme(font-secondary);
|
||||
font-weight: nb-theme(font-weight-bold);
|
||||
color: nb-theme(color-fg-heading);
|
||||
text-transform: uppercase;
|
||||
}
|
||||
}
|
||||
|
||||
@include media-breakpoint-down(md) {
|
||||
nb-actions nb-action {
|
||||
padding: 0 0.75rem;
|
||||
}
|
||||
}
|
||||
@include media-breakpoint-down(sm) {
|
||||
nb-card-body {
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
nb-action {
|
||||
font-size: 0.75rem;
|
||||
i {
|
||||
font-size: 2rem;
|
||||
@include nb-ltr(margin-right, 0.5rem);
|
||||
@include nb-rtl(margin-left, 0.5rem);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@include media-breakpoint-down(is) {
|
||||
nb-action i {
|
||||
font-size: 1.75rem;
|
||||
margin: 0;
|
||||
}
|
||||
span {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
import { Component } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'ngx-labeled-actions-group',
|
||||
styleUrls: ['./labeled-actions-group.component.scss'],
|
||||
templateUrl: './labeled-actions-group.component.html',
|
||||
})
|
||||
export class LabeledActionsGroupComponent {
|
||||
}
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
<nb-card>
|
||||
<nb-card-header>
|
||||
<span>Default Buttons</span>
|
||||
</nb-card-header>
|
||||
<nb-card-body>
|
||||
<div class="row">
|
||||
<div class="example-container col-md-4" *ngFor="let b of buttons">
|
||||
<div class="container-title">
|
||||
<span>{{ b.containerTitle }}</span>
|
||||
</div>
|
||||
<div class="container-btn">
|
||||
<button nbButton
|
||||
outline
|
||||
status="{{ b.status }}"
|
||||
class="btn-demo">
|
||||
{{ b.title }}
|
||||
</button>
|
||||
</div>
|
||||
<div class="{{ b.container }}">
|
||||
<div class="state-container">
|
||||
<div class="state-value original"></div>
|
||||
<div class="state-details">
|
||||
<span class="header">Default</span>
|
||||
<span class="subheader">{{ b.default }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="state-container">
|
||||
<div class="state-value hover"></div>
|
||||
<div class="state-details">
|
||||
<span class="header">Hover</span>
|
||||
<span class="subheader">14% white</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="state-container">
|
||||
<div class="state-value active"></div>
|
||||
<div class="state-details">
|
||||
<span class="header">Active</span>
|
||||
<span class="subheader">14% black</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</nb-card-body>
|
||||
</nb-card>
|
||||
|
|
@ -0,0 +1,130 @@
|
|||
@import '../../../../@theme/styles/themes';
|
||||
@import '~@nebular/bootstrap/styles/buttons';
|
||||
@import '~bootstrap/scss/mixins/breakpoints';
|
||||
@import '~@nebular/theme/styles/global/breakpoints';
|
||||
|
||||
@include nb-install-component() {
|
||||
|
||||
nb-card-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
nb-card-body {
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
.example-container {
|
||||
margin-bottom: 1.5rem;
|
||||
}
|
||||
|
||||
.primary-container {
|
||||
.original {
|
||||
background-color: nb-theme(btn-primary-bg);
|
||||
}
|
||||
.hover {
|
||||
@include btn-primary-hover();
|
||||
}
|
||||
.active {
|
||||
@include btn-primary-active();
|
||||
}
|
||||
}
|
||||
|
||||
.primary-container.outline .original {
|
||||
background-color: transparent;
|
||||
border: 2px solid nb-theme(btn-primary-bg);
|
||||
}
|
||||
|
||||
.success-container {
|
||||
.original {
|
||||
background-color: nb-theme(btn-success-bg);
|
||||
}
|
||||
.hover {
|
||||
@include btn-success-hover();
|
||||
}
|
||||
.active {
|
||||
@include btn-success-active();
|
||||
}
|
||||
}
|
||||
|
||||
.success-container.outline .original {
|
||||
background-color: transparent;
|
||||
border: 2px solid nb-theme(btn-success-bg);
|
||||
}
|
||||
|
||||
.warning-container {
|
||||
.original {
|
||||
background-color: nb-theme(btn-warning-bg);
|
||||
}
|
||||
.hover {
|
||||
@include btn-warning-hover();
|
||||
}
|
||||
.active {
|
||||
@include btn-warning-active();
|
||||
}
|
||||
}
|
||||
|
||||
.warning-container.outline .original {
|
||||
background-color: transparent;
|
||||
border: 2px solid nb-theme(btn-warning-bg);
|
||||
}
|
||||
|
||||
.info-container {
|
||||
.original {
|
||||
background-color: nb-theme(btn-info-bg);
|
||||
}
|
||||
.hover {
|
||||
@include btn-info-hover();
|
||||
}
|
||||
.active {
|
||||
@include btn-info-active();
|
||||
}
|
||||
}
|
||||
|
||||
.info-container.outline .original {
|
||||
background-color: transparent;
|
||||
border: 2px solid nb-theme(btn-info-bg);
|
||||
}
|
||||
|
||||
.danger-container {
|
||||
.original {
|
||||
background-color: nb-theme(btn-danger-bg);
|
||||
}
|
||||
.hover {
|
||||
@include btn-danger-hover();
|
||||
}
|
||||
.active {
|
||||
@include btn-danger-active();
|
||||
}
|
||||
}
|
||||
|
||||
.danger-container.outline .original {
|
||||
background-color: transparent;
|
||||
border: 2px solid nb-theme(btn-danger-bg);
|
||||
}
|
||||
|
||||
.secondary-container {
|
||||
.original {
|
||||
border: 2px solid nb-theme(btn-secondary-border);
|
||||
}
|
||||
.hover {
|
||||
@include btn-secondary-hover();
|
||||
}
|
||||
.active {
|
||||
@include btn-secondary-active();
|
||||
}
|
||||
}
|
||||
|
||||
.secondary-container.outline .original {
|
||||
background-color: transparent;
|
||||
border: 2px solid nb-theme(btn-secondary-border);
|
||||
}
|
||||
|
||||
@include media-breakpoint-up(xxl) {
|
||||
.example-container {
|
||||
flex: 0 0 20%;
|
||||
max-width: 20%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
import { Component } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'ngx-outline-buttons',
|
||||
styleUrls: ['./outline-buttons.component.scss'],
|
||||
templateUrl: './outline-buttons.component.html',
|
||||
})
|
||||
export class OutlineButtonsComponent {
|
||||
|
||||
buttons = [
|
||||
{
|
||||
status: 'primary',
|
||||
container: 'primary-container outline',
|
||||
containerTitle: 'Primary Button',
|
||||
title: 'Primary',
|
||||
default: '#7659ff',
|
||||
},
|
||||
{
|
||||
status: 'warning',
|
||||
container: 'warning-container outline',
|
||||
containerTitle: 'Warning Button',
|
||||
title: 'Warning',
|
||||
default: '#ffcb17',
|
||||
},
|
||||
{
|
||||
status: 'success',
|
||||
container: 'success-container outline',
|
||||
containerTitle: 'Success Button',
|
||||
title: 'Success',
|
||||
default: '#00d977',
|
||||
},
|
||||
{
|
||||
status: 'info',
|
||||
container: 'info-container',
|
||||
containerTitle: 'Info Button',
|
||||
title: 'Info',
|
||||
default: '#0088ff',
|
||||
},
|
||||
{
|
||||
status: 'danger',
|
||||
container: 'danger-container outline',
|
||||
containerTitle: 'Danger Button',
|
||||
title: 'Danger',
|
||||
default: '#ff386a',
|
||||
},
|
||||
];
|
||||
}
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
<nb-card>
|
||||
<nb-card-header>Button Shapes</nb-card-header>
|
||||
<nb-card-body>
|
||||
<div class="shape-container">
|
||||
<div class="container-title">
|
||||
<span>Rectangle Button</span>
|
||||
</div>
|
||||
<div class="subheader">
|
||||
<span>Border radius:</span>
|
||||
<span>4px</span>
|
||||
</div>
|
||||
<div>
|
||||
<button nbButton shape="rectangle" status="success" class="btn-demo">Rectangle</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="shape-container">
|
||||
<div class="container-title">
|
||||
<span>Semi-round Button</span>
|
||||
</div>
|
||||
<div class="subheader">
|
||||
<span>Border radius:</span>
|
||||
<span>12px</span>
|
||||
</div>
|
||||
<div>
|
||||
<button nbButton shape="semi-round" status="success" class="btn-demo">Semi-round</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="shape-container">
|
||||
<div class="container-title">
|
||||
<span>Rounded Button</span>
|
||||
</div>
|
||||
<div class="subheader">
|
||||
<span>Border radius:</span>
|
||||
<span>round</span>
|
||||
</div>
|
||||
<div>
|
||||
<button nbButton shape="round" status="success" class="btn-demo">Round</button>
|
||||
</div>
|
||||
</div>
|
||||
</nb-card-body>
|
||||
</nb-card>
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
@import '../../../../@theme/styles/themes';
|
||||
@import '~@nebular/bootstrap/styles/buttons';
|
||||
|
||||
@include nb-install-component() {
|
||||
|
||||
nb-card-body {
|
||||
padding: 0 0 29px;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.shape-container {
|
||||
margin: 1.25rem 1.25rem 0;
|
||||
}
|
||||
|
||||
.container-title {
|
||||
margin-bottom: 0.25rem;
|
||||
}
|
||||
|
||||
.subheader {
|
||||
margin-bottom: 1rem;
|
||||
font-size: 0.875rem;
|
||||
|
||||
span:nth-child(2) {
|
||||
color: nb-theme(color-fg-heading);
|
||||
font-weight: nb-theme(font-weight-bold);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
import { Component } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'ngx-shape-buttons',
|
||||
styleUrls: ['./shape-buttons.component.scss'],
|
||||
templateUrl: './shape-buttons.component.html',
|
||||
})
|
||||
export class ShapeButtonsComponent {
|
||||
}
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
<nb-card>
|
||||
<nb-card-header>Button Sizes</nb-card-header>
|
||||
|
||||
<nb-card-body>
|
||||
<div class="size-container">
|
||||
<div class="container-title">
|
||||
<span>Large Button</span>
|
||||
</div>
|
||||
<div class="subheader">
|
||||
<span>0.875rem 1.75rem</span>
|
||||
</div>
|
||||
<div>
|
||||
<button nbButton size="large">Large Button</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="size-container">
|
||||
<div class="container-title">
|
||||
<span>Medium Button</span>
|
||||
</div>
|
||||
<div class="subheader">
|
||||
<span>0.75rem 1.5rem</span>
|
||||
</div>
|
||||
<div>
|
||||
<button nbButton size="medium">Medium Button</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="size-container">
|
||||
<div class="container-title">
|
||||
<span>Small Button</span>
|
||||
</div>
|
||||
<div class="subheader">
|
||||
<span>0.675rem 1.5rem</span>
|
||||
</div>
|
||||
<div>
|
||||
<button nbButton size="small">Small Button</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="size-container">
|
||||
<div class="container-title">
|
||||
<span>X-Small Button</span>
|
||||
</div>
|
||||
<div class="subheader">
|
||||
<span>0.5rem 1.25rem</span>
|
||||
</div>
|
||||
<div>
|
||||
<button nbButton size="xsmall">X-Small Button</button>
|
||||
</div>
|
||||
</div>
|
||||
</nb-card-body>
|
||||
</nb-card>
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
@import '../../../../@theme/styles/themes';
|
||||
@import '~@nebular/bootstrap/styles/buttons';
|
||||
|
||||
@include nb-install-component() {
|
||||
|
||||
nb-card-body {
|
||||
padding: 0 1.25rem 1.25rem 0;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.container-title {
|
||||
margin-bottom: 0.25rem;
|
||||
}
|
||||
|
||||
.size-container {
|
||||
margin: 1.25rem 0 0 1.25rem;
|
||||
}
|
||||
|
||||
.subheader {
|
||||
margin-bottom: 0.75rem;
|
||||
font-size: 0.875rem;
|
||||
font-weight: nb-theme(font-weight-bolder);
|
||||
color: nb-theme(color-fg-heading);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
import { Component } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'ngx-size-buttons',
|
||||
styleUrls: ['./size-buttons.component.scss'],
|
||||
templateUrl: './size-buttons.component.html',
|
||||
})
|
||||
export class SizeButtonsComponent {
|
||||
}
|
||||
32
src/app/pages/forms/datepicker/datepicker.component.html
Normal file
32
src/app/pages/forms/datepicker/datepicker.component.html
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
<div class="row">
|
||||
<div class="col-md-12 col-lg-4 col-xxxl-4">
|
||||
<nb-card>
|
||||
<nb-card-header>Common Datepicker</nb-card-header>
|
||||
<nb-card-body>
|
||||
<input nbInput
|
||||
placeholder="Form Picker"
|
||||
[nbDatepicker]="formpicker">
|
||||
<nb-datepicker #formpicker></nb-datepicker>
|
||||
</nb-card-body>
|
||||
</nb-card>
|
||||
</div>
|
||||
|
||||
<div class="col-md-12 col-lg-4 col-xxxl-4">
|
||||
<nb-card>
|
||||
<nb-card-header>Datepicker With Rang</nb-card-header>
|
||||
<nb-card-body>
|
||||
<input nbInput placeholder="Range Picker" [nbDatepicker]="rangepicker">
|
||||
<nb-rangepicker #rangepicker></nb-rangepicker>
|
||||
</nb-card-body>
|
||||
</nb-card>
|
||||
</div>
|
||||
<div class="col-md-12 col-lg-4 col-xxxl-4">
|
||||
<nb-card>
|
||||
<nb-card-header>Datepicker With Disabled Min Max Values</nb-card-header>
|
||||
<nb-card-body>
|
||||
<input nbInput placeholder="Min Max Picker" [nbDatepicker]="picker">
|
||||
<nb-datepicker #picker [min]="min" [max]="max"></nb-datepicker>
|
||||
</nb-card-body>
|
||||
</nb-card>
|
||||
</div>
|
||||
</div>
|
||||
12
src/app/pages/forms/datepicker/datepicker.component.scss
Normal file
12
src/app/pages/forms/datepicker/datepicker.component.scss
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
@import '../../../@theme/styles/themes';
|
||||
|
||||
@include nb-install-component() {
|
||||
nb-card-body {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
input {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
18
src/app/pages/forms/datepicker/datepicker.component.ts
Normal file
18
src/app/pages/forms/datepicker/datepicker.component.ts
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
import { Component } from '@angular/core';
|
||||
import { NbDateService } from '@nebular/theme';
|
||||
|
||||
@Component({
|
||||
selector: 'ngx-datepicker',
|
||||
templateUrl: 'datepicker.component.html',
|
||||
styleUrls: ['datepicker.component.scss'],
|
||||
})
|
||||
export class DatepickerComponent {
|
||||
|
||||
min: Date;
|
||||
max: Date;
|
||||
|
||||
constructor(protected dateService: NbDateService<Date>) {
|
||||
this.min = this.dateService.addDay(this.dateService.today(), -5);
|
||||
this.max = this.dateService.addDay(this.dateService.today(), 5);
|
||||
}
|
||||
}
|
||||
|
|
@ -4,161 +4,71 @@
|
|||
<nb-card-header>Default Inputs</nb-card-header>
|
||||
<nb-card-body>
|
||||
<div class="input-group">
|
||||
<input type="text" placeholder="Project" class="form-control"/>
|
||||
<input type="text" nbInput fullWidth placeholder="Project">
|
||||
</div>
|
||||
<div class="row full-name-inputs">
|
||||
<div class="col-sm-6 input-group">
|
||||
<input type="text" placeholder="Nick" class="form-control"/>
|
||||
<input type="text" nbInput fullWidth placeholder="Nick">
|
||||
</div>
|
||||
<div class="col-sm-6 input-group">
|
||||
<input type="text" placeholder="Last Name" class="form-control"/>
|
||||
<input type="text" nbInput fullWidth placeholder="Last Name">
|
||||
</div>
|
||||
</div>
|
||||
<div class="input-group">
|
||||
<input type="password" placeholder="Password" class="form-control"/>
|
||||
<input type="password" nbInput fullWidth placeholder="Password">
|
||||
</div>
|
||||
<div class="input-group has-person-icon">
|
||||
<input type="text" placeholder="With Icon" class="form-control"/>
|
||||
</div>
|
||||
<div class="input-group input-group-rounded">
|
||||
<input type="text" placeholder="Rounded border" class="form-control"/>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="text" placeholder="Project" class="form-control"/>
|
||||
<small class="form-text">A block of help text that breaks into a new line and may extend beyond one line.
|
||||
</small>
|
||||
<div class="input-group">
|
||||
<input type="text" nbInput fullWidth shape="rectangle" placeholder="Rectangle border">
|
||||
</div>
|
||||
<div class="input-group">
|
||||
<input type="text" placeholder="Disabled input" class="form-control" disabled/>
|
||||
<input type="text" nbInput fullWidth shape="semi-round" placeholder="Semi-round border">
|
||||
</div>
|
||||
<div class="input-group">
|
||||
<textarea rows="5" placeholder="Text Area" class="form-control"></textarea>
|
||||
<input type="text" nbInput fullWidth shape="round" placeholder="Rounded border">
|
||||
</div>
|
||||
<div class="input-group">
|
||||
<input type="text" nbInput fullWidth placeholder="Disabled input" disabled/>
|
||||
</div>
|
||||
<div class="input-group">
|
||||
<textarea rows="5" nbInput fullWidth shape="round" placeholder="Text Area"></textarea>
|
||||
</div>
|
||||
<div class="input-group input-group-sm">
|
||||
<input type="text" placeholder="Small Input" class="form-control"/>
|
||||
<input type="text" nbInput fullWidth fieldSize="small" placeholder="Small Input">
|
||||
</div>
|
||||
<div class="input-group input-group-lg">
|
||||
<input type="text" placeholder="Large Input" class="form-control"/>
|
||||
<input type="text" nbInput fullWidth fieldSize="medium" placeholder="Medium Input">
|
||||
</div>
|
||||
</nb-card-body>
|
||||
</nb-card>
|
||||
|
||||
<nb-card>
|
||||
<nb-card-header>Input Groups</nb-card-header>
|
||||
<nb-card-body>
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon success">@</span>
|
||||
<input type="text" class="form-control" placeholder="Username"/>
|
||||
</div>
|
||||
|
||||
<div class="input-group mail-btn-group">
|
||||
<span class="input-group-prepend">
|
||||
<button class="btn btn-primary btn-icon input-group-text">
|
||||
<i class="ion-ios-email-outline"></i>
|
||||
</button>
|
||||
</span>
|
||||
<input type="text" class="form-control" placeholder="Recipient's username">
|
||||
<span class="input-group-append">
|
||||
<button class="btn btn-primary input-group-text">
|
||||
@example.com
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" placeholder="Search for...">
|
||||
<span class="input-group-append">
|
||||
<button class="btn btn-danger input-group-text">
|
||||
Search
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
<div class="input-group">
|
||||
<div class="dropdown input-group-prepend input-group-btn" ngbDropdown>
|
||||
<button type="button" class="btn btn-success dropdown-toggle" ngbDropdownToggle>
|
||||
Action
|
||||
</button>
|
||||
<ul class="dropdown-menu" ngbDropdownMenu>
|
||||
<li class="dropdown-item">Action</li>
|
||||
<li class="dropdown-item">Another action</li>
|
||||
<li class="dropdown-item">Something else here</li>
|
||||
<div role="separator" class="dropdown-divider"></div>
|
||||
<li class="dropdown-item">Separated link</li>
|
||||
</ul>
|
||||
</div>
|
||||
<input type="text" class="form-control">
|
||||
</div>
|
||||
</nb-card-body>
|
||||
</nb-card>
|
||||
|
||||
<nb-card>
|
||||
<nb-card-header>Selects</nb-card-header>
|
||||
<nb-card-body>
|
||||
<div class="form-group">
|
||||
<label>Simple Select</label>
|
||||
<select class="form-control">
|
||||
<option>Minsk</option>
|
||||
<option>Gomel</option>
|
||||
<option>Brest</option>
|
||||
<option>Grodno</option>
|
||||
<option>Mogilev</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Multiple Select</label>
|
||||
<select multiple class="form-control">
|
||||
<option>Item 1</option>
|
||||
<option>Item 2</option>
|
||||
<option>Item 3</option>
|
||||
<option>Item 4</option>
|
||||
<option>Item 5</option>
|
||||
</select>
|
||||
<div class="input-group input-group-lg">
|
||||
<input type="text" nbInput fullWidth fieldSize="large" placeholder="Large Input">
|
||||
</div>
|
||||
</nb-card-body>
|
||||
</nb-card>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-6">
|
||||
<nb-card>
|
||||
<nb-card-header>Input Styles</nb-card-header>
|
||||
<nb-card-body>
|
||||
<div class="input-group input-group-border-only">
|
||||
<input type="text" placeholder="Border Only" class="form-control"/>
|
||||
</div>
|
||||
<div class="input-group">
|
||||
<input type="text" placeholder="Default Input" class="form-control">
|
||||
</div>
|
||||
<div class="input-group input-group-fill-only">
|
||||
<input type="text" placeholder="Fill Only" class="form-control">
|
||||
</div>
|
||||
</nb-card-body>
|
||||
</nb-card>
|
||||
|
||||
<nb-card>
|
||||
<nb-card-header>Validation States</nb-card-header>
|
||||
<nb-card-body>
|
||||
<div class="form-group">
|
||||
<input type="text" placeholder="Input with Success" class="form-control form-control-success">
|
||||
<input type="text" nbInput fullWidth status="info" placeholder="Input with Info">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="text" placeholder="Input with Warning" class="form-control form-control-warning">
|
||||
<input type="text" nbInput fullWidth status="success" placeholder="Input with Warning">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="text" placeholder="Input with Danger" class="form-control form-control-danger">
|
||||
<input type="text" nbInput fullWidth status="warning" placeholder="Input with Danger">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="text" nbInput fullWidth status="danger" placeholder="Input with Danger">
|
||||
</div>
|
||||
<div class="form-group validation-checkboxes row">
|
||||
<nb-checkbox status="success" class="col-sm-4">Checkbox with Success</nb-checkbox>
|
||||
<nb-checkbox status="warning" class="col-sm-4">Checkbox with Warning</nb-checkbox>
|
||||
<nb-checkbox status="danger" class="col-sm-4">Checkbox with Danger</nb-checkbox>
|
||||
</div>
|
||||
<div class="form-group has-success">
|
||||
<input type="text" placeholder="Input with Success Icon" class="form-control form-control-success">
|
||||
</div>
|
||||
<div class="form-group has-warning">
|
||||
<input type="text" placeholder="Input with Warning Icon" class="form-control form-control-warning">
|
||||
</div>
|
||||
<div class="form-group has-danger">
|
||||
<input type="text" placeholder="Input with Danger Icon" class="form-control form-control-danger">
|
||||
</div>
|
||||
</nb-card-body>
|
||||
</nb-card>
|
||||
|
||||
|
|
@ -169,67 +79,34 @@
|
|||
<div class="demo-checkboxes col-sm-4">
|
||||
<nb-checkbox>Checkbox 1</nb-checkbox>
|
||||
<nb-checkbox [value]="true">Checkbox 2</nb-checkbox>
|
||||
|
||||
<div class="custom-control custom-checkbox">
|
||||
<input type="checkbox" class="custom-control-input" id="b-checkbox">
|
||||
<label class="custom-control-label" for="b-checkbox">Bootstrap Checkbox</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="demo-radio col-sm-4">
|
||||
<label class="custom-control custom-radio">
|
||||
<input type="radio" class="custom-control-input" name="customRadio">
|
||||
<span class="custom-control-indicator"></span>
|
||||
<span class="custom-control-description">Radio 1</span>
|
||||
</label>
|
||||
<label class="custom-control custom-radio">
|
||||
<input type="radio" class="custom-control-input" name="customRadio" checked>
|
||||
<span class="custom-control-indicator"></span>
|
||||
<span class="custom-control-description">Radio 2</span>
|
||||
</label>
|
||||
<label class="custom-control custom-radio">
|
||||
<input type="radio" class="custom-control-input" name="customRadio">
|
||||
<span class="custom-control-indicator"></span>
|
||||
<span class="custom-control-description">Radio 3</span>
|
||||
</label>
|
||||
<nb-radio-group [(value)]="radioGroupValue">
|
||||
<nb-radio
|
||||
[value]="'This is value 1'">
|
||||
Radio 1
|
||||
</nb-radio>
|
||||
<nb-radio
|
||||
[value]="'This is value 2'">
|
||||
Radio 2
|
||||
</nb-radio>
|
||||
<nb-radio
|
||||
[value]="'This is value 3'">
|
||||
Radio 3
|
||||
</nb-radio>
|
||||
</nb-radio-group>
|
||||
</div>
|
||||
<div class="demo-disabled-checkbox-radio col-sm-4">
|
||||
<nb-checkbox disabled>Disabled Checkbox</nb-checkbox>
|
||||
<label class="custom-control custom-radio">
|
||||
<input type="radio" class="custom-control-input" disabled>
|
||||
<span class="custom-control-indicator"></span>
|
||||
<span class="custom-control-description">Disabled Radio</span>
|
||||
</label>
|
||||
<nb-radio-group disabled>
|
||||
<nb-radio
|
||||
[value]="'Disabled Value'">
|
||||
Disabled Radio
|
||||
</nb-radio>
|
||||
</nb-radio-group>
|
||||
</div>
|
||||
</div>
|
||||
</nb-card-body>
|
||||
</nb-card>
|
||||
|
||||
<nb-card>
|
||||
<nb-card-body class="demo-rating">
|
||||
<span class="rating-header">Rating</span>
|
||||
<div>
|
||||
<ngb-rating [(rate)]="starRate" max=5>
|
||||
<ng-template let-fill="fill">
|
||||
<span class="star fill" [class.filled]="fill === 100">
|
||||
<i class="ion-android-star" *ngIf="fill === 100"></i>
|
||||
<i class="ion-android-star-outline" *ngIf="fill !== 100"></i>
|
||||
</span>
|
||||
</ng-template>
|
||||
</ngb-rating>
|
||||
<span class="current-rate">{{ starRate }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<ngb-rating [(rate)]="heartRate" max=5>
|
||||
<ng-template let-fill="fill">
|
||||
<span class="star fill" [class.filled]="fill === 100">
|
||||
<i class="ion-ios-heart" *ngIf="fill === 100"></i>
|
||||
<i class="ion-ios-heart-outline" *ngIf="fill !== 100"></i>
|
||||
</span>
|
||||
</ng-template>
|
||||
</ngb-rating>
|
||||
<span class="current-rate">{{ heartRate }}</span>
|
||||
</div>
|
||||
</nb-card-body>
|
||||
</nb-card>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -9,4 +9,5 @@ export class FormInputsComponent {
|
|||
|
||||
starRate = 2;
|
||||
heartRate = 4;
|
||||
radioGroupValue = 'This is value 2';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,17 +4,34 @@ import { Routes, RouterModule } from '@angular/router';
|
|||
import { FormsComponent } from './forms.component';
|
||||
import { FormInputsComponent } from './form-inputs/form-inputs.component';
|
||||
import { FormLayoutsComponent } from './form-layouts/form-layouts.component';
|
||||
import { DatepickerComponent } from './datepicker/datepicker.component';
|
||||
import { ButtonsComponent } from './buttons/buttons.component';
|
||||
|
||||
const routes: Routes = [{
|
||||
path: '',
|
||||
component: FormsComponent,
|
||||
children: [{
|
||||
path: 'inputs',
|
||||
component: FormInputsComponent,
|
||||
}, {
|
||||
path: 'layouts',
|
||||
component: FormLayoutsComponent,
|
||||
}],
|
||||
children: [
|
||||
{
|
||||
path: 'inputs',
|
||||
component: FormInputsComponent,
|
||||
},
|
||||
{
|
||||
path: 'layouts',
|
||||
component: FormLayoutsComponent,
|
||||
},
|
||||
{
|
||||
path: 'layouts',
|
||||
component: FormLayoutsComponent,
|
||||
},
|
||||
{
|
||||
path: 'buttons',
|
||||
component: ButtonsComponent,
|
||||
},
|
||||
{
|
||||
path: 'datepicker',
|
||||
component: DatepickerComponent,
|
||||
},
|
||||
],
|
||||
}];
|
||||
|
||||
@NgModule({
|
||||
|
|
@ -33,4 +50,5 @@ export const routedComponents = [
|
|||
FormsComponent,
|
||||
FormInputsComponent,
|
||||
FormLayoutsComponent,
|
||||
DatepickerComponent,
|
||||
];
|
||||
|
|
|
|||
|
|
@ -2,11 +2,13 @@ import { NgModule } from '@angular/core';
|
|||
|
||||
import { ThemeModule } from '../../@theme/theme.module';
|
||||
import { FormsRoutingModule, routedComponents } from './forms-routing.module';
|
||||
import { ButtonsModule } from './buttons/buttons.module';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
ThemeModule,
|
||||
FormsRoutingModule,
|
||||
ButtonsModule,
|
||||
],
|
||||
declarations: [
|
||||
...routedComponents,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue