mirror of
https://github.com/tenrok/vue-form-wizard.git
synced 2026-06-24 01:50:33 +03:00
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<form-wizard @on-complete="onComplete"
|
<form-wizard @on-complete="onComplete"
|
||||||
shape="square"
|
shape="circle"
|
||||||
color="gray"
|
color="gray"
|
||||||
@on-loading="setLoading"
|
@on-loading="setLoading"
|
||||||
@on-error="setError"
|
@on-error="setError"
|
||||||
|
|||||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
@@ -1,5 +1,5 @@
|
|||||||
.vue-form-wizard .btn,
|
.vue-form-wizard .wizard-btn,
|
||||||
.vue-form-wizard .navbar .navbar-nav > li > a.btn {
|
.vue-form-wizard .navbar .navbar-nav > li > a.wizard-btn {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
border-width: $border-thick;
|
border-width: $border-thick;
|
||||||
background-color: $transparent-bg;
|
background-color: $transparent-bg;
|
||||||
@@ -13,8 +13,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.vue-form-wizard {
|
.vue-form-wizard {
|
||||||
.navbar .navbar-nav > li > a.btn.btn-wd,
|
.navbar .navbar-nav > li > a.wizard-btn.wizard-btn-wd,
|
||||||
.btn-wd {
|
.wizard-btn-wd {
|
||||||
min-width: 140px;
|
min-width: 140px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
.vue-form-wizard .nav-pills {
|
.vue-form-wizard .wizard-nav-pills {
|
||||||
margin-top:0;
|
margin-top:0;
|
||||||
position: relative;
|
position: relative;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
background: $danger-states-color !important;
|
background: $danger-states-color !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.icon-circle {
|
.wizard-icon-circle {
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
border: 3px solid $gray-input-bg;
|
border: 3px solid $gray-input-bg;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
@@ -29,7 +29,7 @@
|
|||||||
background-color: $gray-input-bg;
|
background-color: $gray-input-bg;
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
}
|
}
|
||||||
.icon-container {
|
.wizard-icon-container {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
@@ -50,10 +50,6 @@
|
|||||||
padding: 30px 20px 10px;
|
padding: 30px 20px 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-footer {
|
|
||||||
padding: 0 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.wizard-header {
|
.wizard-header {
|
||||||
padding: 15px 15px 15px 15px;
|
padding: 15px 15px 15px 15px;
|
||||||
position: relative;
|
position: relative;
|
||||||
@@ -78,13 +74,13 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.wizard-navigation {
|
.wizard-navigation {
|
||||||
.progress-with-circle {
|
.wizard-progress-with-circle {
|
||||||
position: relative;
|
position: relative;
|
||||||
top: 40px;
|
top: 40px;
|
||||||
z-index: 50;
|
z-index: 50;
|
||||||
height: 4px;
|
height: 4px;
|
||||||
|
|
||||||
.progress-bar {
|
.wizard-progress-bar {
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
-webkit-transition: width .3s ease;
|
-webkit-transition: width .3s ease;
|
||||||
-o-transition: width .3s ease;
|
-o-transition: width .3s ease;
|
||||||
@@ -93,13 +89,14 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-footer{
|
.wizard-card-footer{
|
||||||
|
padding: 0 20px;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
flex-wrap:wrap;
|
flex-wrap:wrap;
|
||||||
flex-flow: row wrap;
|
flex-flow: row wrap;
|
||||||
.card-footer-left{
|
.wizard-footer-left{
|
||||||
flex:1;
|
flex:1;
|
||||||
justify-self:flex-start;
|
justify-self:flex-start;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
@import "bs_variables";
|
@import "bs_variables";
|
||||||
@import "mixins";
|
@import "mixins";
|
||||||
|
|
||||||
.vue-form-wizard .btn {
|
.vue-form-wizard .wizard-btn {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin-bottom: 0; // For input.btn
|
margin-bottom: 0; // For input.btn
|
||||||
font-weight: $btn-font-weight;
|
font-weight: $btn-font-weight;
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
.vue-form-wizard a{
|
.vue-form-wizard a{
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
.vue-form-wizard .nav {
|
.vue-form-wizard .wizard-nav {
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
padding-left: 0; // Override default ul/ol
|
padding-left: 0; // Override default ul/ol
|
||||||
list-style: none;
|
list-style: none;
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Bar of progress
|
// Bar of progress
|
||||||
.vue-form-wizard .progress-bar {
|
.vue-form-wizard .wizard-progress-bar {
|
||||||
float: left;
|
float: left;
|
||||||
width: 0%;
|
width: 0%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|||||||
@@ -1,92 +1,3 @@
|
|||||||
@mixin btn-styles($btn-color, $btn-states-color) {
|
|
||||||
border-color: $btn-color;
|
|
||||||
color: $btn-color;
|
|
||||||
|
|
||||||
&:hover,
|
|
||||||
&:focus,
|
|
||||||
&:active,
|
|
||||||
&.active,
|
|
||||||
&:active:focus,
|
|
||||||
&:active:hover,
|
|
||||||
.open > &.dropdown-toggle,
|
|
||||||
.open > &.dropdown-toggle:focus,
|
|
||||||
.open > &.dropdown-toggle:hover {
|
|
||||||
background-color: $btn-color ;
|
|
||||||
color: $fill-font-color ;
|
|
||||||
border-color: $btn-color ;
|
|
||||||
.caret{
|
|
||||||
border-top-color: $fill-font-color;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&.disabled,
|
|
||||||
&:disabled,
|
|
||||||
&[disabled],
|
|
||||||
fieldset[disabled] & {
|
|
||||||
&,
|
|
||||||
&:hover,
|
|
||||||
&:focus,
|
|
||||||
&.focus,
|
|
||||||
&:active,
|
|
||||||
&.active {
|
|
||||||
background-color: $transparent-bg;
|
|
||||||
border-color: $btn-color;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
&.btn-fill {
|
|
||||||
color: $white-color;
|
|
||||||
background-color: $btn-color;
|
|
||||||
@include opacity(1);
|
|
||||||
|
|
||||||
&:hover,
|
|
||||||
&:focus,
|
|
||||||
&:active,
|
|
||||||
&.active,
|
|
||||||
.open > &.dropdown-toggle{
|
|
||||||
background-color: $btn-states-color;
|
|
||||||
color: $white-color;
|
|
||||||
border-color: $btn-states-color;
|
|
||||||
}
|
|
||||||
|
|
||||||
.caret{
|
|
||||||
border-top-color: $white-color;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&.btn-simple {
|
|
||||||
&:hover,
|
|
||||||
&:focus,
|
|
||||||
&:active,
|
|
||||||
&.active,
|
|
||||||
.open > &.dropdown-toggle{
|
|
||||||
background-color: $transparent-bg;
|
|
||||||
color: $btn-states-color;
|
|
||||||
}
|
|
||||||
|
|
||||||
.caret{
|
|
||||||
border-top-color: $white-color;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.caret{
|
|
||||||
border-top-color: $btn-color;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@mixin btn-size($padding-vertical, $padding-horizontal, $font-size, $border, $line-height){
|
|
||||||
font-size: $font-size;
|
|
||||||
border-radius: $border;
|
|
||||||
padding: $padding-vertical $padding-horizontal;
|
|
||||||
|
|
||||||
&.btn-simple{
|
|
||||||
padding: $padding-vertical + 2 $padding-horizontal;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// Button sizes
|
// Button sizes
|
||||||
@mixin button-size($padding-vertical, $padding-horizontal, $font-size, $line-height, $border-radius) {
|
@mixin button-size($padding-vertical, $padding-horizontal, $font-size, $line-height, $border-radius) {
|
||||||
padding: $padding-vertical $padding-horizontal;
|
padding: $padding-vertical $padding-horizontal;
|
||||||
|
|||||||
@@ -7,19 +7,19 @@
|
|||||||
</slot>
|
</slot>
|
||||||
</div>
|
</div>
|
||||||
<div class="wizard-navigation">
|
<div class="wizard-navigation">
|
||||||
<div class="progress-with-circle">
|
<div class="wizard-progress-with-circle">
|
||||||
<div class="progress-bar"
|
<div class="wizard-progress-bar"
|
||||||
:style="progressBarStyle"></div>
|
:style="progressBarStyle"></div>
|
||||||
</div>
|
</div>
|
||||||
<ul class="nav nav-pills">
|
<ul class="wizard-nav wizard-nav-pills">
|
||||||
<li v-for="(tab, index) in tabs" :class="{active:tab.active}">
|
<li v-for="(tab, index) in tabs" :class="{active:tab.active}">
|
||||||
<a href="" @click.prevent="navigateToTab(index)">
|
<a href="" @click.prevent="navigateToTab(index)">
|
||||||
<div class="icon-circle"
|
<div class="wizard-icon-circle"
|
||||||
:class="{checked:isChecked(index),square_shape:isStepSquare, tab_shape:isTabShape}"
|
:class="{checked:isChecked(index),square_shape:isStepSquare, tab_shape:isTabShape}"
|
||||||
:style="[isChecked(index)? stepCheckedStyle : {}, tab.validationError ? errorStyle : {}]">
|
:style="[isChecked(index)? stepCheckedStyle : {}, tab.validationError ? errorStyle : {}]">
|
||||||
|
|
||||||
<transition :name="transition" mode="out-in">
|
<transition :name="transition" mode="out-in">
|
||||||
<div v-if="tab.active" class="icon-container"
|
<div v-if="tab.active" class="wizard-icon-container"
|
||||||
:class="{square_shape:isStepSquare, tab_shape:isTabShape}"
|
:class="{square_shape:isStepSquare, tab_shape:isTabShape}"
|
||||||
:style="[tab.active ? iconActiveStyle: {}, tab.validationError ? errorStyle : {}]">
|
:style="[tab.active ? iconActiveStyle: {}, tab.validationError ? errorStyle : {}]">
|
||||||
<i v-if="tab.icon" :class="tab.icon" class="icon"></i>
|
<i v-if="tab.icon" :class="tab.icon" class="icon"></i>
|
||||||
@@ -45,11 +45,11 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="card-footer">
|
<div class="wizard-card-footer">
|
||||||
<template>
|
<template>
|
||||||
<span @click="prevTab" v-if="displayPrevButton" class="card-footer-left">
|
<span @click="prevTab" v-if="displayPrevButton" class="wizard-footer-left">
|
||||||
<slot name="prev">
|
<slot name="prev">
|
||||||
<button type="button" class="btn btn-default btn-wd" :style="fillButtonStyle" :disabled="loading">
|
<button type="button" class="wizard-btn btn-default wizard-btn-wd" :style="fillButtonStyle" :disabled="loading">
|
||||||
{{backButtonText}}
|
{{backButtonText}}
|
||||||
</button>
|
</button>
|
||||||
</slot>
|
</slot>
|
||||||
@@ -57,9 +57,9 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<span @click="finish" class="card-footer-right" v-if="isLastStep">
|
<span @click="finish" class="wizard-footer-right" v-if="isLastStep">
|
||||||
<slot name="finish">
|
<slot name="finish">
|
||||||
<button type="button" class="btn btn-fill btn-wd btn-next" :style="fillButtonStyle">
|
<button type="button" class="wizard-btn btn-fill wizard-btn-wd btn-next" :style="fillButtonStyle">
|
||||||
{{finishButtonText}}
|
{{finishButtonText}}
|
||||||
</button>
|
</button>
|
||||||
</slot>
|
</slot>
|
||||||
@@ -67,9 +67,9 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<span @click="nextTab" class="card-footer-right" v-if="!isLastStep">
|
<span @click="nextTab" class="wizard-footer-right" v-if="!isLastStep">
|
||||||
<slot name="next">
|
<slot name="next">
|
||||||
<button type="button" class="btn btn-fill btn-wd btn-next" :style="fillButtonStyle" :disabled="loading">
|
<button type="button" class="wizard-btn btn-fill wizard-btn-wd btn-next" :style="fillButtonStyle" :disabled="loading">
|
||||||
{{nextButtonText}}
|
{{nextButtonText}}
|
||||||
</button>
|
</button>
|
||||||
</slot>
|
</slot>
|
||||||
|
|||||||
Reference in New Issue
Block a user