UNPKG

smartwizard

Version:
404 lines (351 loc) 8.88 kB
/*! * jQuery SmartWizard v6.x * The awesome step wizard plugin for jQuery * http://www.techlaboratory.net/jquery-smartwizard * * Created by Dipu Raj (http://dipu.me) * * Licensed under the terms of the MIT License * https://github.com/techlab/jquery-smartwizard/blob/master/LICENSE */ /* Variables */ /* Root */ :root { --sw-border-color: #eeeeee; --sw-toolbar-btn-color: #ffffff; --sw-toolbar-btn-background-color: #009EF7; --sw-anchor-default-primary-color: #f8f9fa; --sw-anchor-default-secondary-color: #b0b0b1; --sw-anchor-active-primary-color: #009EF7; --sw-anchor-active-secondary-color: #ffffff; --sw-anchor-done-primary-color: #90d4fa; --sw-anchor-done-secondary-color: #fefefe; --sw-anchor-disabled-primary-color: #f8f9fa; --sw-anchor-disabled-secondary-color: #dbe0e5; --sw-anchor-error-primary-color: #dc3545; --sw-anchor-error-secondary-color: #ffffff; --sw-anchor-warning-primary-color: #ffc107; --sw-anchor-warning-secondary-color: #ffffff; --sw-progress-color: #009EF7; --sw-progress-background-color: #f8f9fa; --sw-loader-color: #009EF7; --sw-loader-background-color: #f8f9fa; --sw-loader-background-wrapper-color: rgba(255, 255, 255, 0.7); } /* Base Styles */ .sw { position: relative; } .sw *, .sw *::before, .sw *::after { box-sizing: border-box; } .sw > .tab-content { position: relative; overflow: hidden; } .sw > .tab-content > .tab-pane { padding: 0.8rem; } .sw .toolbar { padding: 0.8rem; text-align: right; } .sw .toolbar > .sw-btn { display: inline-block; text-decoration: none; text-align: center; text-transform: none; vertical-align: middle; -webkit-user-select: none; -moz-user-select: none; user-select: none; margin-left: 0.2rem; margin-right: 0.2rem; cursor: pointer; padding: 0.375rem 0.75rem; border-radius: 0.25rem; font-weight: 400; color: var(--sw-toolbar-btn-color); background-color: var(--sw-toolbar-btn-background-color); border: 1px solid var(--sw-toolbar-btn-background-color); } .sw .toolbar > .sw-btn.disabled, .sw .toolbar > .sw-btn:disabled { opacity: 0.65; } .sw[dir=rtl] > .toolbar { text-align: left; } .sw > .nav { display: flex; flex-wrap: wrap; list-style: none; padding-left: 0; margin-top: 0; margin-bottom: 0; } @media screen and (max-width: 640px) { .sw > .nav { flex-direction: column !important; flex: 1 auto; } } .sw > .nav .nav-link { display: block; padding: 0.5rem 1rem; text-decoration: none; } .sw > .nav .nav-link:hover, .sw > .nav .nav-link:active, .sw > .nav .nav-link:focus { text-decoration: none; } .sw > .nav .nav-link::-moz-focus-inner { border: 0; } .sw > .nav .nav-link.disabled { pointer-events: none; cursor: not-allowed; } .sw > .nav .nav-link.hidden { display: none; visibility: none; } .sw > .nav .nav-link > .num { display: flex; justify-content: center; align-items: center; float: left; pointer-events: none; height: 100%; padding-left: 0.5rem; padding-right: 0.5rem; border-radius: 10em; text-align: center; font-size: 2em; font-weight: 800; clear: both; line-height: 1; text-decoration: none; } .sw[dir=rtl] > .nav .nav-link > .num { float: right; } .sw > .progress { padding: 0; margin: 0; border: 0; width: 100%; height: 5px; background: var(--sw-progress-background-color); overflow: hidden; } .sw > .progress > .progress-bar { height: 5px; width: 0%; background-color: var(--sw-progress-color); transition: width 0.5s ease-in-out; } .sw.sw-justified > .nav > li, .sw.sw-justified > .nav .nav-link { flex-basis: 0; flex-grow: 1; text-align: center; } .sw.sw-loading { -webkit-user-select: none; -moz-user-select: none; user-select: none; } .sw.sw-loading::after { content: ""; display: block; position: absolute; opacity: 1; top: 0; left: 0; height: 100%; width: 100%; background: var(--sw-loader-background-wrapper-color); z-index: 2; } .sw.sw-loading::before { content: ""; display: inline-block; position: absolute; top: 45%; left: 45%; width: 2rem; height: 2rem; border: 10px solid var(--sw-loader-color); border-top: 10px solid var(--sw-loader-background-color); border-radius: 50%; z-index: 10; -webkit-animation: spin 1s linear infinite; animation: spin 1s linear infinite; } @-webkit-keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } /* Theme: Round */ .sw-theme-square > .nav { position: relative; margin-bottom: 10px; } .sw-theme-square > .nav::before { content: " "; position: absolute; top: 18px; left: 0; width: 100%; border-radius: 8px; z-index: 1; border: 3px dashed var(--sw-border-color); } @media screen and (max-width: 640px) { .sw-theme-square > .nav::before { top: 0; left: 17px; width: 6px; height: 100%; } } .sw-theme-square > .nav .nav-link { position: relative; margin-top: 40px; } @media screen and (max-width: 640px) { .sw-theme-square > .nav .nav-link { margin-top: unset; margin-bottom: 20px; padding-left: 55px; text-align: left !important; } } .sw-theme-square > .nav .nav-link::before { content: " "; position: absolute; display: block; left: 0; right: 0; margin-left: auto; margin-right: auto; border-radius: 0.475rem; top: -40px; width: 40px; height: 40px; border: none; background: var(--sw-border-color); text-decoration: none; z-index: 98; transition: all 0.5s ease-in-out; } @media screen and (max-width: 640px) { .sw-theme-square > .nav .nav-link::before { top: 0; right: unset; } } .sw-theme-square > .nav .nav-link > .num { position: absolute; display: block; left: 0; right: 0; top: -38px; margin-left: auto; margin-right: auto; z-index: 100; transition: all 0.5s ease-in-out; } @media screen and (max-width: 640px) { .sw-theme-square > .nav .nav-link > .num { top: 0; right: unset; width: 40px; padding-top: 3px; } } .sw-theme-square > .nav .nav-link.default { color: var(--sw-anchor-default-secondary-color); cursor: not-allowed; } .sw-theme-square > .nav .nav-link.default::after { background-color: var(--sw-anchor-default-secondary-color); } .sw-theme-square > .nav .nav-link.active { color: var(--sw-anchor-active-primary-color) !important; cursor: pointer; } .sw-theme-square > .nav .nav-link.active > .num { color: var(--sw-anchor-active-secondary-color) !important; } .sw-theme-square > .nav .nav-link.active::before { background-color: var(--sw-anchor-active-primary-color) !important; box-shadow: 0px 1px 7px 1px rgba(0, 0, 0, 0.3); } .sw-theme-square > .nav .nav-link.done { color: var(--sw-anchor-done-primary-color); cursor: pointer; } .sw-theme-square > .nav .nav-link.done > .num { color: var(--sw-anchor-done-secondary-color) !important; } .sw-theme-square > .nav .nav-link.done::before { background-color: var(--sw-anchor-done-primary-color) !important; } .sw-theme-square > .nav .nav-link.disabled { color: var(--sw-anchor-disabled-primary-color); } .sw-theme-square > .nav .nav-link.disabled::after { background-color: var(--sw-anchor-disabled-primary-color); } .sw-theme-square > .nav .nav-link.error { color: var(--sw-anchor-error-primary-color) !important; cursor: pointer; } .sw-theme-square > .nav .nav-link.error::after { background-color: var(--sw-anchor-error-primary-color) !important; } .sw-theme-square > .nav .nav-link.warning { color: var(--sw-anchor-warning-primary-color) !important; cursor: pointer; } .sw-theme-square > .nav .nav-link.warning::after { background-color: var(--sw-anchor-warning-primary-color) !important; } .sw-theme-square > .nav-progress::after { content: " "; position: absolute; top: 18px; left: 0; width: var(--sw-progress-width); border-radius: 8px; z-index: 1; height: 6px; background-color: var(--sw-progress-color); z-index: 2; transition: width 0.5s ease-in-out; } @media screen and (max-width: 640px) { .sw-theme-square > .nav-progress::after { top: 0; left: 17px; width: 6px; height: var(--sw-progress-width); } } .sw-theme-square[dir=rtl] > .nav-progress::after { left: unset; right: 0; }