-
Notifications
You must be signed in to change notification settings - Fork 162
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
mmart1n
committed
Oct 28, 2021
1 parent
45d5f42
commit 45c8c9c
Showing
7 changed files
with
455 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,224 @@ | ||
<div class="sample-actions"> | ||
<button igxButton="outlined" (click)="changeOrientation()">Change Orientation</button> | ||
<div class="sample-actions__btg"> | ||
<p>Vertical Animation Type</p> | ||
<igx-buttongroup [values]="verticalAnimationTypes" (selected)="toggleVerticalAnimations($event)"> | ||
</igx-buttongroup> | ||
</div> | ||
<div class="sample-actions__btg"> | ||
<p>Horizontal Animation Type</p> | ||
<igx-buttongroup [values]="horizontalAnimationTypes" (selected)="toggleHorizontalAnimations($event)"> | ||
</igx-buttongroup> | ||
</div> | ||
<igx-input-group type="border"> | ||
<label igxLabel>Animation Duration</label> | ||
<input igxInput type="number" [(ngModel)]="animationDuration"> | ||
<igx-suffix>ms</igx-suffix> | ||
</igx-input-group> | ||
</div> | ||
<div class="sample-actions"> | ||
<igx-switch [checked]="false" (change)="setTitlePosition($event)">Set Title Position</igx-switch> | ||
<div class="sample-actions__btg"> | ||
<p>Title Position</p> | ||
<igx-buttongroup [values]="titlePositions" (selected)="toggleTitlePos($event)"> | ||
</igx-buttongroup> | ||
</div> | ||
<div class="sample-actions__btg"> | ||
<p>Step Type</p> | ||
<igx-buttongroup [values]="stepTypes" (selected)="toggleStepTypes($event)"></igx-buttongroup> | ||
</div> | ||
</div> | ||
|
||
<div class="sample-stepper-wrapper"> | ||
<igx-stepper #stepper [verticalAnimationType]="verticalAnimationType" | ||
[horizontalAnimationType]="horizontalAnimationType" [animationDuration]="animationDuration" | ||
(activeStepChanging)="activeStepChanging($event)" (activeStepChanged)="activeChanged($event)" | ||
[stepType]="stepType"> | ||
|
||
<ng-template igxStepActiveIndicator> | ||
<igx-icon>edit</igx-icon> | ||
</ng-template> | ||
|
||
<!-- <ng-template igxStepInvalidIndicator> | ||
<igx-icon>error</igx-icon> | ||
</ng-template> --> | ||
|
||
<!-- <ng-template igxStepCompletedIndicator> | ||
<igx-icon>check</igx-icon> | ||
</ng-template> --> | ||
|
||
<igx-step #step (activeChange)="activeStepChange($event)" [isValid]="form1.form.valid" | ||
[completed]="form1.form.valid && stepper.linear"> | ||
<igx-icon igxStepIndicator>shopping_cart</igx-icon> | ||
<span igxStepTitle>Shopping Card</span> | ||
<span igxStepSubTitle>{{stepper.linear === true ? '(Required)' : 'Optional'}}</span> | ||
<div igxStepContent class="sample-body" [tabIndex]="-1"> | ||
<form #form1="ngForm"> | ||
<igx-input-group> | ||
<input igxInput name="firstName" type="text" [(ngModel)]="user.firstName" required /> | ||
<label igxLabel for="firstName">First Name</label> | ||
</igx-input-group> | ||
|
||
<igx-input-group> | ||
<input igxInput name="lastName" type="text" [(ngModel)]="user.lastName" /> | ||
<label igxLabel for="lastName">Last Name</label> | ||
</igx-input-group> | ||
|
||
<div class="nav-buttons"> | ||
<button igxButton="outlined" (click)="stepper.next()" | ||
[disabled]="!form1.form.valid && stepper.linear">NEXT | ||
</button> | ||
</div> | ||
</form> | ||
</div> | ||
</igx-step> | ||
<igx-step #step1 (activeChange)="activeStepChange($event)" [completed]="true"> | ||
<igx-icon igxStepIndicator>place</igx-icon> | ||
<span igxStepTitle>Delivery Address</span> | ||
<span igxStepSubTitle>(Required)</span> | ||
<div igxStepContent class="sample-body"> | ||
Lorem ipsum dolor sit amet consectetur adipisicing elit. Cum eos asperiores, doloribus reiciendis, esse | ||
earum, iusto expedita rem quo mollitia voluptatem quas saepe quia! Rem illum quo officia eum quisquam? | ||
</div> | ||
</igx-step> | ||
|
||
<igx-step *ngIf="displayStep"></igx-step> | ||
|
||
<igx-step #step2 [active]="true" (activeChange)="activeStepChange($event)" [isValid]="form2.form.valid" | ||
[completed]="form2.form.valid && stepper.linear"> | ||
|
||
<div igxStepIndicator> | ||
<igx-avatar src="https://www.infragistics.com/angular-demos/assets/images/men/1.jpg" | ||
[roundShape]="true"></igx-avatar> | ||
<igx-badge icon="check" type="success"></igx-badge> | ||
</div> | ||
|
||
<span igxStepTitle>User Details</span> | ||
<span igxStepSubTitle>(Requred)</span> | ||
<div igxStepContent class="sample-body"> | ||
<form #form2="ngForm"> | ||
<igx-input-group> | ||
<input igxInput name="password" type="password" [(ngModel)]="user1.password" required /> | ||
<label igxLabel for="password">Password</label> | ||
</igx-input-group> | ||
|
||
<igx-input-group> | ||
<input igxInput name="phone" type="tel" [(ngModel)]="user1.phone" required /> | ||
<label igxLabel for="phone">Phone</label> | ||
</igx-input-group> | ||
|
||
<igx-input-group> | ||
<input igxInput name="dateOfBirth" type="date" [(ngModel)]="user1.dateOfBirth" /> | ||
<label igxLabel for="dateOfBirth">Date of Birth</label> | ||
</igx-input-group> | ||
|
||
<div class="nav-buttons"> | ||
<button igxButton="outlined" (click)="stepper.prev()">PREV</button> | ||
<button igxButton="outlined" (click)="stepper.next()">NEXT</button> | ||
</div> | ||
</form> | ||
</div> | ||
</igx-step> | ||
|
||
<igx-step #step3 [disabled]="true" (activeChange)="activeStepChange($event)" [isValid]="form3.form.valid"> | ||
<igx-icon igxStepIndicator>attach_money</igx-icon> | ||
<span igxStepTitle>Payment method</span> | ||
<span igxStepSubTitle>Currently you can pay only cash</span> | ||
<div igxStepContent class="sample-body"> | ||
<form #form3="ngForm"> | ||
<igx-input-group> | ||
<input igxInput name="firstName" type="text" [(ngModel)]="user2.firstName" required /> | ||
<label igxLabel for="firstName">First Name</label> | ||
</igx-input-group> | ||
|
||
<igx-input-group> | ||
<input igxInput name="lastName" type="text" [(ngModel)]="user2.lastName" /> | ||
<label igxLabel for="lastName">Last Name</label> | ||
</igx-input-group> | ||
<igx-time-picker></igx-time-picker> | ||
|
||
<div class="nav-buttons"> | ||
<button igxButton="outlined" (click)="stepper.prev()">PREV</button> | ||
<button igxButton="outlined" (click)="stepper.next()" [disabled]="!form3.form.valid">NEXT | ||
</button> | ||
</div> | ||
</form> | ||
</div> | ||
</igx-step> | ||
|
||
<igx-step #step4 (activeChange)="activeStepChange($event)" [isValid]="user3.valid" | ||
[completed]="user3.valid && stepper.linear"> | ||
<igx-icon igxStepIndicator>notes</igx-icon> | ||
<span igxStepTitle>Additional notes</span> | ||
<span igxStepSubTitle>{{stepper.linear === true ? '(Required)' : 'Optional'}}</span> | ||
<div igxStepContent class="sample-body"> | ||
<form [formGroup]="user3"> | ||
<div> | ||
<igx-input-group> | ||
<input igxInput name="fullName" type="text" formControlName="fullName" /> | ||
<label igxLabel for="fullName">Full Name</label> | ||
<igx-suffix> | ||
<igx-icon>person</igx-icon> | ||
</igx-suffix> | ||
</igx-input-group> | ||
<igx-input-group> | ||
<label igxLabel for="email">Email address</label> | ||
<input igxInput name="email" type="email" formControlName="email" /> | ||
<igx-suffix> | ||
<igx-icon>email</igx-icon> | ||
</igx-suffix> | ||
</igx-input-group> | ||
|
||
<igx-select [placeholder]="'Pick One'"> | ||
<igx-select-item [value]="'Apple'" [disabled]="true">Apple</igx-select-item> | ||
<igx-select-item [value]="'Orange'">Orange</igx-select-item> | ||
<igx-select-item [value]="'Grapes'">Grapes</igx-select-item> | ||
<igx-select-item [value]="'Banana'">Banana</igx-select-item> | ||
</igx-select> | ||
</div> | ||
<div class="nav-buttons"> | ||
<button igxButton="outlined" (click)="stepper.prev()">PREV</button> | ||
<button igxButton="outlined" (click)="stepper.next()" | ||
[disabled]="!user3.valid && stepper.linear">NEXT | ||
</button> | ||
</div> | ||
</form> | ||
</div> | ||
</igx-step> | ||
|
||
<igx-step #step5 (activeChange)="activeStepChange($event)" [isValid]="user4.valid"> | ||
<igx-icon igxStepIndicator>receipt_long</igx-icon> | ||
<span igxStepTitle>Finish order</span> | ||
<span igxStepSubTitle>(#12542653)</span> | ||
<div igxStepContent class="sample-body"> | ||
<form [formGroup]="user4"> | ||
<div> | ||
<igx-time-picker name="dateTime" formControlName="dateTime"></igx-time-picker> | ||
<igx-input-group> | ||
<igx-prefix>+359</igx-prefix> | ||
<label igxLabel for="phone">Phone</label> | ||
<input igxInput name="phone" type="text" formControlName="phone" /> | ||
<igx-suffix> | ||
<igx-icon>phone</igx-icon> | ||
</igx-suffix> | ||
<igx-hint position="start">Ex.: +359 888 123 456</igx-hint> | ||
</igx-input-group> | ||
</div> | ||
<div class="nav-buttons"> | ||
<button igxButton="outlined" (click)="stepper.prev()">PREV</button> | ||
<button igxButton="outlined" [disabled]="!user4.valid">Submit</button> | ||
</div> | ||
</form> | ||
</div> | ||
</igx-step> | ||
</igx-stepper> | ||
</div> | ||
|
||
<div class="sample-actions"> | ||
<button igxButton="outlined" (click)="stepper.contentTop = !stepper.contentTop">change horizontal content | ||
position</button> | ||
<button igxButton="outlined" (click)="stepper.navigateTo(2)">navigate to third</button> | ||
<button igxButton="outlined" (click)="stepper.reset()">reset</button> | ||
<igx-switch [(ngModel)]="stepper.linear">Linear</igx-switch> | ||
<igx-switch [(ngModel)]="displayStep">Display Step</igx-switch> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
.sample-actions { | ||
margin: 20px 0; | ||
display: flex; | ||
gap: 25px; | ||
|
||
p { | ||
margin-top: 0; | ||
margin-bottom: 4px; | ||
font-size: 14px; | ||
} | ||
|
||
button { | ||
align-self: center; | ||
} | ||
|
||
&__btg { | ||
width: 250px; | ||
} | ||
} | ||
|
||
igx-badge { | ||
position: absolute; | ||
top: -6px; | ||
right: -6px; | ||
width: 16px; | ||
height: 16px; | ||
min-width: 0; | ||
} | ||
|
||
.nav-buttons { | ||
margin: 40px 0; | ||
|
||
> * { | ||
margin-right: 16px; | ||
} | ||
} | ||
|
||
.sample-stepper-wrapper { | ||
margin: 16px 0; | ||
padding: 16px; | ||
border: 1px solid rgba(54, 54, 54, .43); | ||
} |
Oops, something went wrong.