diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index e1de8e4..613c6af 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1,6 +1,6 @@ # These are supported funding model platforms -github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] +github: techlab patreon: # Replace with a single Patreon username open_collective: techlab ko_fi: # Replace with a single Ko-fi username diff --git a/.gitignore b/.gitignore index 3ec9837..14f4758 100644 --- a/.gitignore +++ b/.gitignore @@ -4,11 +4,32 @@ /vendor/ /public/ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +node_modules +dist +dist-ssr +*.local +.rollup-cache + # IDE Files #------------------------- /nbproject/ .idea/* .vscode/* +.DS_Store +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? ## Sublime Text cache files *.tmlanguage.cache diff --git a/.npmignore b/.npmignore index b1cef55..443ff59 100644 --- a/.npmignore +++ b/.npmignore @@ -3,10 +3,12 @@ .DS_Store .git .github +.gitignore .hg .lock-wscript .svn .wafpickle-* +.rollup-cache CVS npm-debug.log @@ -24,6 +26,7 @@ work build src test +examples spec pids logs @@ -58,7 +61,20 @@ Thumbs.db .Spotlight-V100 .Trashes -/ref.txt /node_modules/ /bower_components/ /vendor/ + +/ref.txt +/CODE_OF_CONDUCT.md +/CONTRIBUTING.md +/composer.json +/gulpfile.js +/karma.conf.js +/.travis.yml +/playwright.config.js +/vitest.config.js +/vite.config.ts +/rollup.config.mjs +/tsconfig.json +/jest.config.js \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 2197832..0000000 --- a/.travis.yml +++ /dev/null @@ -1,3 +0,0 @@ -language: node_js -node_js: - - "node" diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..18e7a25 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,208 @@ +CHANGELOG +========= + +v7.0.1 +----- +**All new jQuery SmartWizard v7 — full TypeScript rewrite** + +- **Added:** Complete rewrite in TypeScript with bundled type declarations (`dist/types/`) +- **Added:** `displayMode` option — `auto` (follows system preference) | `dark` | `light` | `none` +- **Added:** `swipeNavigation` option — swipe left/right on touch devices to navigate steps (`enabled`, `threshold`) +- **Added:** Horizontal mouse-wheel scroll on the nav bar when steps overflow +- **Added:** `behavior.useUrlHash` and `behavior.supportBrowserHistory` options replace old `enableUrlHash` / `backButtonSupport` +- **Added:** `navigation.completed.clickable` option — control whether completed steps are re-clickable +- **Added:** `DATA_ATTRIBUTES` constants for `data-theme` attribute management +- **Added:** `contentLoader` callback for dynamic step content loading +- **Added:** CSS animation support for transitions via `transition.css` (`prefix`, `forward`, `backward` class groups) +- **Added:** Nav scroll buttons shown automatically when nav content overflows +- **Added:** UMD, ESM, and CJS build outputs +- **Added:** `scrollToView` option — scroll the active step anchor into view on step change + +- **Changed:** All options restructured with clearer namespacing (see README for full reference) + - `selected` → `initialStep` + - `autoAdjustHeight` → `behavior.autoHeight` + - `enableUrlHash` → `behavior.useUrlHash` + - `backButtonSupport` → `behavior.supportBrowserHistory` + - `anchor.enableNavigation` → `navigation.enabled` + - `anchor.enableNavigationAlways` → `navigation.alwaysClickable` + - `anchor.enableDoneState` → `navigation.completed.enabled` + - `anchor.markPreviousStepsAsDone` → `navigation.completed.completeAllPreviousSteps` + - `anchor.unDoneOnBackNavigation` → `navigation.completed.clearOnBack` + - `anchor.enableDoneStateNavigation` → `navigation.completed.clickable` + - `transition.animation` → `transition.effect` + - `toolbar.showNextButton` / `showPreviousButton` → `toolbar.buttons.showNext` / `showPrevious` + - `toolbar.extraHtml` → `toolbar.extraElements` + - `keyboard.keyNavigation` → `keyboardNavigation.enabled` + - `keyboard.keyLeft` / `keyRight` → `keyboardNavigation.keys.left` / `right` + - `lang` → `localization.buttons` + - `disabledSteps`, `errorSteps`, `warningSteps`, `hiddenSteps` → `stepStates.disabled`, `.error`, `.warning`, `.hidden` + - `getContent` → `contentLoader` +- **Changed:** Events renamed for consistency + - `leaveStep` → `leave.sw` + - `showStep` → `shown.sw` + - `initialized` → `initialized.sw` + - `loaded` → `loaded.sw` +- **Changed:** `reset()` no longer manipulates URL hash unless `useUrlHash` + `supportBrowserHistory` are both enabled +- **Changed:** `transition.css` animations require the element to be visible before class is applied (fixes `animationend` not firing) +- **Changed:** `this.default(...)` references inside transition handlers replaced with direct `transitions.default(...)` to prevent `TypeError` when handlers are invoked without object context +- **Changed:** Progressbar width uses `.toFixed(2)` for cleaner CSS values +- **Changed:** `ANIMATIONEND` / `ANIMATIONCANCEL` events are now namespaced (`.sw`) + +- **Fixed:** `this is undefined` TypeError in CSS / fade / slide transition fallbacks +- **Fixed:** `animationend` event not firing on hidden elements (element now shown before animation class is applied) +- **Fixed:** Double-invocation of transition `complete` callback (guard flag added) +- **Fixed:** URL hash incorrectly always set; now only when both `useUrlHash` and `supportBrowserHistory` are `true` + +- **Removed:** `justified` option (layout handled by CSS) +- **Removed:** `cycleNavigation` option +- **Removed:** `STEPCHANGE` and `RESET` events (use `shown.sw` and handle externally) + +v6.0.6 +----- +- **Fixed:** History back on step1 not working https://github.com/techlab/jquery-smartwizard/issues/152 + +v6.0.5 +----- +- **Fixed:** unDoneOnBackNavigation not working https://github.com/techlab/jquery-smartwizard/issues/146 + +v6.0.4 +----- +- **Changed:** Code optimizations + +v6.0.3 +----- +- **Fixed:** Navigation not properly maintained when navigate fast +- **Changed:** Code optimizations + +v6.0.1 +----- +- **Added:** Support for jQuery Slim version +- **Added:** Public function `fixHeight`. See http://techlaboratory.net/jquery-smartwizard#func-fixheight +- **Added:** Public function `setState`. See http://techlaboratory.net/jquery-smartwizard#func-setstate https://github.com/techlab/jquery-smartwizard/issues/131 +- **Added:** Public function `unsetState`. See http://techlaboratory.net/jquery-smartwizard#func-unsetstate +- **Added:** Public function `getStepInfo` to get step index and total steps. See http://techlaboratory.net/jquery-smartwizard#func-getstepinfo +- **Added:** `goToStep` function with force parameter. See http://techlaboratory.net/jquery-smartwizard#func-gotostep +- **Added:** Built-in progressbar +- **Added:** New themes, Square and Round +- **Added:** Dots and Square these can have progressbar on navigation by adding `nav-progress` CSS Class. +- **Added:** Colors are changable dynamically using CSS variables. +- **Added:** Bootstrap 5 support +- **Added:** Num(badge) class support on all themes +- **Added:** RTL (Right-to-left language) support https://github.com/techlab/jquery-smartwizard/issues/72 +- **Added:** `initialized` event . See http://techlaboratory.net/jquery-smartwizard#event-initialized https://github.com/techlab/jquery-smartwizard/issues/118 +- **Added:** Move CSS class names to options +- **Added:** Transition animations can be extended +- **Added:** CSS Animations support on transition animations. Supports [Animate.css](https://animate.style/) + +- **Changed:** JavaScript and CSS code is rewritten +- **Changed:** Imporoved all CSS themes +- **Changed:** Made most of the options can changed with `setOptions` function +- **Changed:** Rewritten option names and properties with minimal and meaningful names +- **Changed:** Improved transition animations + +- **Fixed:** Reset doesn't clear the existing steps of the error state. https://github.com/techlab/jquery-smartwizard/issues/134 +- **Fixed:** `goToStep` method fails to recognize the correct step https://github.com/techlab/jquery-smartwizard/issues/133 +- **Fixed:** URL Navigation to check if step visited. https://github.com/techlab/jquery-smartwizard/issues/140 +- **Fixed:** Fixed and also added `fixHeight` public function to refresh content height. https://github.com/techlab/jquery-smartwizard/issues/142 https://github.com/techlab/jquery-smartwizard/issues/116 https://github.com/techlab/jquery-smartwizard/issues/88 https://github.com/techlab/jquery-smartwizard/issues/114 https://github.com/techlab/jquery-smartwizard/issues/101 +- **Fixed:** CSS Files are empty https://github.com/techlab/jquery-smartwizard/issues/113 +- **Fixed:** stepNumber is incorrect on showStep event when no transition https://github.com/techlab/jquery-smartwizard/issues/112 +- **Fixed:** showStep showing Null instead of index 0 on initializing https://github.com/techlab/jquery-smartwizard/issues/109 +- **Fixed:** showStep's stepIndex contains previous index https://github.com/techlab/jquery-smartwizard/issues/103 +- **Fixed:** Content not showing when used inside a Bootrap 4 modal https://github.com/techlab/jquery-smartwizard/issues/98 +- **Fixed:** Other fixes https://github.com/techlab/jquery-smartwizard/issues/111 https://github.com/techlab/jquery-smartwizard/issues/107 https://github.com/techlab/jquery-smartwizard/issues/86 + +- **Removed:** `this.options.toolbar.buttonPosition` is removed +- **Removed:** `cycleNavigation` is removed +- **Removed:** Dark mode is removed. Added CSS variable support to change any colors. See example for dark colors. + +v5.1.1 +----- +- **Added:** Accessibility +- **Added:** Dark Mode support for all themes +- **Added:** New theme "Progress" +- **Added:** leaveStep event has new parameter => nextStepIndex +- **Added:** UMD ([Universal Module Definition](https://github.com/umdjs/umd)) support +- **Changed:** `leaveStep` event has new parameter => `nextStepIndex` +- **Fixed:** `stepDirection` on `leaveStep` event +- **Fixed:** Incorrect stepDirection on leaveStep event (#91) + +v5.0.0 +----- +**All new jQuery SmartWizard v5** + +- **Added:** External Ajax content support via Promise +- **Added:** New navigation animations +- **Added:** New themes +- **Added:** New public functions +- **Added:** New content loading event +- **Added:** Standalone CSS with Bootstrap compatibility +- **Changed:** Complete rewrite of JavaScript and CSS +- **Changed:** CSS to SCSS +- **Changed:** Updated all build packages + +v4.4.1 +----- +- **Added:** Two new public functions, `goToStep` and `hiddenSteps`. +- **Changed:** Build system packages updated to latest available. + +v4.3.1 +----- +- **Added:** Bootstrap 4 support added +- **Added:** Yarn package manager added +- **Added:** Ajax loader UI updated +- **Fixed:** Fixes and improvements + +v4.2.2 +----- +- **Added:** Example for multiple wizard in a page +- **Fixed:** Auto height adjust when content height change after step is shown + +v4.2.1 +----- +- **Added:** Gulp automation tasks +- **Added:** Validation and bundling +- **Added:** Test file +- **Changed:** Repository structure with `src`, `dist`, `test` + +v4.1.7 +----- +- **Updated:** Themes (dots and circles) +- **Updated:** Examples pages + +v4.1.5 +----- +- **Updated:** Updated to v4.1.5 +- **Added:** New option `contentCache` +- **Added:** On or Off caching of step contents on ajax calls, if false content is fetched always from ajax url +- **Added:** New option `ajaxSettings` +- **Added:** Extra settings for step ajax content calls + +v4.1.2 +----- +***Patch version*** + +- **Changed:** Option `markAllPreviousStepsAsDone` is enabled for `selected` option +- **Changed:** While reset, set hash is now controllable using `showStepURLhash` option + +v4.1.1 +----- +- **Added:** New options `showStepURLhash`, `removeDoneStepOnNavigateBack`, `markAllPreviousStepsAsDone`, `hiddenSteps` +- **Added:** New parameter on `showStep` event, name: `stepPosition` values: `first`, `final`, `middle` +- **Added:** New public method, `stepState` to Dynamically disable/enable hide/show steps +- **Added:** Compatible with latest jQuery versions (jQuery 1.9+, jQuery 2+, jQuery 3+) +- **Changed:** Option `toolbarExtraButtons` now accepts elements as jQuery objects +- **Changed:** Code optimized +- **Fixed:** General bugs + +v4.0.5 +----- +- **Added:** Get direction navigaion on `leaveStep` and `showStep` events +- **Added:** New Events `beginReset`, `endReset`, `themeChanged` +- **Updated:** Example pages + +v4.0.1 +----- +- **Changed:** Completely rewritten the code from scratch +- **Added:** Bootstrap support +- **Added:** Theme support +- **Added:** Customizable toolbar diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index eaaecf4..bd23a5c 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -55,7 +55,7 @@ further defined and clarified by project maintainers. ## Enforcement Instances of abusive, harassing, or otherwise unacceptable behavior may be -reported by contacting the project team at dipumedayil@gmail.com. All +reported by contacting the project team at hello.techlab@gmail.com. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index cd9bd22..0b63b09 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -7,7 +7,7 @@ - Add new test cases. - Add documentation. - Add a demo page. -- [Donate](https://www.paypal.me/dipuraj) money for the project on [![Paypal](https://img.shields.io/badge/PayPal-dipuraj-blue.svg)](https://www.paypal.me/dipuraj) +- [GitHub Sponsor](https://github.com/sponsors/techlab) - Sponsor on GitHub. ## How to contribute code? Here are the basic steps to get started contributing code: @@ -16,7 +16,7 @@ Here are the basic steps to get started contributing code: 2. Install the dependencies, run `npm install`. 3. Start the project, run `npm start`. 4. Replicate the issue you're trying to fix or spec out the feature you're trying to add. -5. Modify the code to fix the bug or to add the feature. All changes should happen in the relevant `src/js/*.js` and `src/scss/*.scss` files. +5. Modify the code to fix the bug or to add the feature. All changes should happen in the relevant `src/ts/*.js` and `src/styles/*.scss` files. 6. Verify that your fix or feature works. 7. Run the test cases by running `npm test`, you can also add more test cases based on your new change. 8. Build the code by running `npm run build`. diff --git a/LICENSE b/LICENSE index d6afa2d..226bc0e 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2020 Dipu Raj +Copyright (c) 2026 Dipu Raj http://techlaboratory.net Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/MIGRATING.md b/MIGRATING.md new file mode 100644 index 0000000..60a0531 --- /dev/null +++ b/MIGRATING.md @@ -0,0 +1,346 @@ +# Migrating from SmartWizard v6 to v7 + +This guide covers all the breaking changes and new features you need to be aware of when upgrading from SmartWizard v6 to v7. + +--- + +## Overview + +v7 is a **complete TypeScript rewrite** of the plugin. The core API surface has been redesigned for clarity and consistency. While the HTML structure remains the same, nearly all option names, event names, and public method signatures have changed. + +--- + +## 1. Installation + +Update the package: + +```bash +npm install smartwizard@latest +``` + +Update CDN links: + +```html + + + + + + + + +``` + +> **Note:** In v7, `smart_wizard_all.min.css` is split into a base CSS file and separate per-theme files. Include the base CSS and the theme CSS separately. + +--- + +## 2. HTML Structure + +The HTML structure is **unchanged**. Your existing markup will work as-is. + +```html +
+ +
+
...
+
...
+
+ +
+
+
+
+``` + +--- + +## 3. Options + +All options have been restructured into logical groups. Below is the full mapping from v6 to v7. + +### Quick reference table + +| v6 Option | v7 Option | +|---|---| +| `selected` | `initialStep` | +| `theme` | `theme` ✅ unchanged | +| `justified` | ❌ Removed (use CSS) | +| `autoAdjustHeight` | `behavior.autoHeight` | +| `backButtonSupport` | `behavior.supportBrowserHistory` | +| `enableUrlHash` | `behavior.useUrlHash` | +| `transition.animation` | `transition.effect` | +| `transition.speed` | `transition.speed` ✅ unchanged | +| `transition.easing` | `transition.easing` ✅ unchanged | +| `transition.prefixCss` | `transition.css.prefix` | +| `transition.fwdShowCss` | `transition.css.forward.show` | +| `transition.fwdHideCss` | `transition.css.forward.hide` | +| `transition.bckShowCss` | `transition.css.backward.show` | +| `transition.bckHideCss` | `transition.css.backward.hide` | +| `toolbar.position` | `toolbar.position` ✅ unchanged | +| `toolbar.showNextButton` | `toolbar.buttons.showNext` | +| `toolbar.showPreviousButton` | `toolbar.buttons.showPrevious` | +| `toolbar.extraHtml` | `toolbar.extraElements` | +| `anchor.enableNavigation` | `navigation.enabled` | +| `anchor.enableNavigationAlways` | `navigation.alwaysClickable` | +| `anchor.enableDoneState` | `navigation.completed.enabled` | +| `anchor.markPreviousStepsAsDone` | `navigation.completed.completeAllPreviousSteps` | +| `anchor.unDoneOnBackNavigation` | `navigation.completed.clearOnBack` | +| `anchor.enableDoneStateNavigation` | `navigation.completed.clickable` | +| `keyboard.keyNavigation` | `keyboardNavigation.enabled` | +| `keyboard.keyLeft` | `keyboardNavigation.keys.left` | +| `keyboard.keyRight` | `keyboardNavigation.keys.right` | +| `lang.next` | `localization.buttons.next` | +| `lang.previous` | `localization.buttons.previous` | +| `disabledSteps` | `stepStates.disabled` | +| `errorSteps` | `stepStates.error` | +| `warningSteps` | `stepStates.warning` | +| `hiddenSteps` | `stepStates.hidden` | +| `getContent` | `contentLoader` | + +### Before (v6) + +```javascript +$('#smartwizard').smartWizard({ + selected: 0, + theme: 'arrows', + autoAdjustHeight: true, + backButtonSupport: true, + enableUrlHash: false, + transition: { + animation: 'fade', + speed: 400, + easing: '', + prefixCss: 'animate__animated', + fwdShowCss: 'animate__fadeIn', + fwdHideCss: 'animate__fadeOut', + bckShowCss: 'animate__fadeIn', + bckHideCss: 'animate__fadeOut', + }, + toolbar: { + position: 'bottom', + showNextButton: true, + showPreviousButton: true, + extraHtml: '', + }, + anchor: { + enableNavigation: true, + enableNavigationAlways: false, + enableDoneState: true, + markPreviousStepsAsDone: true, + unDoneOnBackNavigation: false, + enableDoneStateNavigation: true, + }, + keyboard: { + keyNavigation: true, + keyLeft: [37], + keyRight: [39], + }, + lang: { + next: 'Next', + previous: 'Previous', + }, + disabledSteps: [2], + errorSteps: [], + warningSteps: [], + hiddenSteps: [], + getContent: null, +}); +``` + +### After (v7) + +```javascript +$('#smartwizard').smartWizard({ + initialStep: 0, + theme: 'arrows', + displayMode: 'auto', // NEW: 'auto' | 'dark' | 'light' | 'none' + behavior: { + autoHeight: true, + supportBrowserHistory: true, + useUrlHash: false, + }, + transition: { + effect: 'css', // renamed from 'animation' + speed: 400, + easing: '', + css: { + prefix: 'animate__animated', + forward: { show: 'animate__fadeIn', hide: 'animate__fadeOut' }, + backward: { show: 'animate__fadeIn', hide: 'animate__fadeOut' }, + }, + }, + toolbar: { + position: 'bottom', + buttons: { + showNext: true, + showPrevious: true, + }, + extraElements: '', + }, + navigation: { + enabled: true, + alwaysClickable: false, + completed: { + enabled: true, + completeAllPreviousSteps: true, + clearOnBack: false, + clickable: true, + }, + }, + keyboardNavigation: { + enabled: true, + keys: { + left: [37], + right: [39], + }, + }, + swipeNavigation: { // NEW + enabled: false, + threshold: 50, + }, + localization: { + buttons: { + next: 'Next', + previous: 'Previous', + }, + }, + stepStates: { + disabled: [2], + error: [], + warning: [], + hidden: [], + completed: [], + }, + contentLoader: null, +}); +``` + +--- + +## 4. Events + +All event names now use the `.sw` namespace suffix. + +| v6 Event | v7 Event | +|---|---| +| `leaveStep` | `leave.sw` | +| `showStep` | `shown.sw` | +| `initialized` | `initialized.sw` | +| `loaded` | `loaded.sw` | + +### Before (v6) + +```javascript +$('#smartwizard') + .on('leaveStep', function(e, anchorObject, stepIndex, nextStepIndex, stepDirection) { + console.log(stepIndex, nextStepIndex); + // return false to cancel + }) + .on('showStep', function(e, anchorObject, stepIndex, stepDirection, stepPosition) { + console.log(stepIndex, stepPosition); + }); +``` + +### After (v7) + +```javascript +$('#smartwizard') + .on('leave.sw', function(e, args) { + // args: { stepIndex, nextStepIndex, stepElement, stepDirection, stepPosition } + console.log(args.stepIndex, args.nextStepIndex); + // return false to cancel + }) + .on('shown.sw', function(e, args) { + // args: { stepIndex, stepElement, stepDirection, stepPosition } + console.log(args.stepIndex, args.stepPosition); + }) + .on('initialized.sw', function(e) { }) + .on('loaded.sw', function(e) { }); +``` + +> **Note:** Event callback arguments are now passed as a **single object** (`args`) rather than individual positional parameters. + +--- + +## 5. Public Methods + +Most method names are unchanged. Key differences: + +| v6 Method | v7 Method | Notes | +|---|---|---| +| `smartWizard('goToStep', idx)` | `smartWizard('goToStep', idx)` | ✅ unchanged | +| `smartWizard('goToStep', idx, true)` | `smartWizard('goToStep', idx, true)` | ✅ unchanged | +| `smartWizard('next')` | `smartWizard('next')` | ✅ unchanged | +| `smartWizard('prev')` | `smartWizard('prev')` | ✅ unchanged | +| `smartWizard('reset')` | `smartWizard('reset')` | ✅ unchanged | +| `smartWizard('fixHeight')` | `smartWizard('adjustHeight')` | Renamed | +| `smartWizard('setState', [n], 'disabled')` | `smartWizard('setState', [n], 'disable')` | State name changed | +| `smartWizard('unsetState', [n], 'disabled')` | `smartWizard('unsetState', [n], 'disable')` | State name changed | +| `smartWizard('setOptions', opts)` | `smartWizard('setOptions', opts)` | ✅ unchanged; now also calls `load()` | +| `smartWizard('loader', 'show')` | `smartWizard('loader', 'show')` | ✅ unchanged | +| `smartWizard('getStepInfo')` | `smartWizard('getStepInfo')` | ✅ unchanged | + +> **`setState` / `unsetState`:** The state string `'disabled'` has been renamed to `'disable'` to match the internal style class name convention. + +--- + +## 6. New Features in v7 + +These are entirely new capabilities not available in v6: + +- **`displayMode`** option — `'auto'` (system preference) | `'dark'` | `'light'` | `'none'` +- **`swipeNavigation`** — swipe left/right on touch devices to navigate steps +- **Horizontal nav scroll** — mouse wheel over the nav bar scrolls horizontally when steps overflow +- **TypeScript support** — full type declarations in `dist/types/` + +--- + +## 7. Removed Options + +| Removed | Reason | +|---|---| +| `justified` | Layout is now CSS-only | +| `cycleNavigation` | Removed; handle externally if needed | +| `anchor.enableDoneState` + dark mode variables | Replaced by `navigation.completed.*` and `displayMode` | + +--- + +## 8. CSS Changes + +- The single `smart_wizard_all.css` file is now split into: + - `dist/css/smartwizard.css` — core base styles + - `dist/css/themes/.css` — one file per theme +- CSS custom properties (variables) are the primary way to customize colors +- `data-theme="dark"` / `data-theme="light"` is set on the wizard element automatically when `displayMode` is `'auto'`, `'dark'`, or `'light'` + +--- + +## 9. Module Format + +v7 ships three formats: + +| Format | File | +|---|---| +| Browser global (UMD) | `dist/js/jquery.smartWizard.js` | +| CommonJS | `dist/js/jquery.smartWizard.cjs.js` | +| ES Module | `dist/js/jquery.smartWizard.esm.js` | +| TypeScript types | `dist/types/index.d.ts` | + +You no longer need to use `require('smartwizard/dist/js/...')` directly — the `main`, `module`, and `browser` fields in `package.json` resolve automatically. + +--- + +## Checklist + +- [ ] Update `npm install smartwizard@latest` +- [ ] Update CDN links — split base CSS + theme CSS +- [ ] Rename all options per the mapping table above +- [ ] Update event listeners to use `.sw` suffix and new `args` object +- [ ] Update `setState`/`unsetState` state name from `'disabled'` to `'disable'` +- [ ] Replace `fixHeight` calls with `adjustHeight` +- [ ] Test CSS transitions — `transition.css` structure has changed +- [ ] Remove references to `justified`, `cycleNavigation` diff --git a/README.md b/README.md index 531d4dd..410b49b 100644 --- a/README.md +++ b/README.md @@ -1,46 +1,38 @@ -# jQuery Smart Wizard v5 -#### The awesome jQuery step wizard plugin. +# jQuery Smart Wizard v7 +### A modern and accessible step wizard plugin for jQuery -[![Build Status](https://travis-ci.org/techlab/jquery-smartwizard.svg?branch=master)](https://travis-ci.org/techlab/jquery-smartwizard) [![npm version](https://badge.fury.io/js/smartwizard.svg)](https://www.npmjs.com/package/smartwizard) -[![Packagist Version](https://badgen.net/packagist/v/techlab/smartwizard)](https://packagist.org/packages/techlab/smartwizard) -[![Npm Downloadsl](https://badgen.net/npm/dm/smartwizard?icon=npm)](https://www.npmjs.com/package/smartwizard) [![jsDelivr Hits](https://data.jsdelivr.com/v1/package/npm/smartwizard/badge?style=rounded)](https://www.jsdelivr.com/package/npm/smartwizard) +[![Npm Downloads](https://badgen.net/npm/dm/smartwizard?icon=npm)](https://www.npmjs.com/package/smartwizard) [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/techlab/jquery-smartwizard/master/LICENSE) [![GitHub Repo](https://badgen.net/badge/icon/jquery-smartwizard?icon=github&label=&color=0da4d3)](https://github.com/techlab/jquery-smartwizard) -[![Donate on Paypal](https://img.shields.io/badge/PayPal-dipuraj-blue.svg)](https://www.paypal.me/dipuraj) +[![GitHub Sponsor](https://img.shields.io/badge/Sponsor-techlab-blue.svg?logo=github)](https://github.com/sponsors/techlab) -**jQuery Smart Wizard** is an accessible step wizard plugin for jQuery. -Provides a neat and stylish interface for your forms, checkout screen, registration steps, etc. -Easy implementation, Bootstrap compatiblity, customizable toolbars, themes, events and Ajax support are few of the features. +**jQuery Smart Wizard v7** is a lightweight and extensible step wizard plugin built for modern web applications using jQuery. It provides a clean, intuitive interface for managing multi-step processes such as registration forms, checkout screens, surveys, configuration flows, and more. -+ [Homepage](http://techlaboratory.net/jquery-smartwizard) -+ [Documentation](http://techlaboratory.net/jquery-smartwizard#documentation) -+ [Demos](http://techlaboratory.net/jquery-smartwizard#demo) -+ [StackOverflow Q&A](http://stackoverflow.com/questions/tagged/smart-wizard) +**jQuery Smart Wizard v7** focuses on usability and flexibility. It offers customizable navigation styles, toolbars, transitions, and events, making it easy to integrate into existing applications. Whether you’re building a simple step form or a complex workflow, Smart Wizard adapts to your needs. + ++ [Homepage](https://techlaboratory.net/jquery-smartwizard) ++ [Documentation](https://techlaboratory.net/jquery-smartwizard#documentation) ++ [Demos](https://techlaboratory.net/jquery-smartwizard#demo) ++ [StackOverflow Q&A](https://stackoverflow.com/questions/tagged/smart-wizard) + [GitHub Issues](https://github.com/techlab/jquery-smartwizard/issues) Demos ----- -+ [Basic Example](http://techlaboratory.net/projects/demo/jquery-smart-wizard/v5) -+ [Ajax Example](http://techlaboratory.net/projects/demo/jquery-smart-wizard/v5/ajax) -+ [Multiple Wizard Example](http://techlaboratory.net/projects/demo/jquery-smart-wizard/v5/multiple) ++ [Basic Example](https://techlaboratory.net/jquery-smartwizard/v7/demo#basic-example) ++ [Ajax Content Example](https://techlaboratory.net/jquery-smartwizard/v7/demo#ajax-content-example) ++ [Form Validation Example](https://techlaboratory.net/jquery-smartwizard/v7/demo#form-validation-example) ++ [RTL (Right-to-left Language) Example](https://techlaboratory.net/jquery-smartwizard/v7/demo#rtl-right-to-left-language-example) Screenshots ----- -![Smart Wizard Default](http://techlaboratory.net/assets/media/jquery-smart-wizard/jquery-smartwizard-v5-default.png) - -![Smart Wizard Arrows](http://techlaboratory.net/assets/media/jquery-smart-wizard/jquery-smartwizard-v5-arrows.png) - -![Smart Wizard Black](http://techlaboratory.net/assets/media/jquery-smart-wizard/jquery-smartwizard-v5-dark.png) - -![Smart Wizard Dots](http://techlaboratory.net/assets/media/jquery-smart-wizard/jquery-smartwizard-v5-dots.png) - +![Smart Wizard](https://techlaboratory.net/media/jquery-smart-wizard/v7/all-screens.png) Requirements ----- - + [jQuery](http://jquery.com/) (supports from jQuery-1.11.1+ to the latest jQuery-3.5) + + [jQuery](https://jquery.com/) >= 1.11.1 (jQuery 4.x and jQuery Slim versions are also supported) Installation ----- @@ -51,24 +43,51 @@ Installation ### [Yarn](https://yarn.pm/smartwizard) yarn add smartwizard -### [Composer](https://packagist.org/packages/techlab/smartwizard) - composer require techlab/smartwizard - ### [CDN - jsDelivr](https://www.jsdelivr.com/package/npm/smartwizard) ```html - - + + + + + - + ``` ### [CDN - UNPKG](https://unpkg.com/browse/smartwizard/) ```html - - + + + + + - + +``` + +### ES Module / Bundler +```js +import $ from "jquery"; +import "smartwizard/dist/css/smartwizard.min.css"; +import "smartwizard/dist/css/themes/arrows.min.css"; +import smartWizard from "smartwizard"; + +$(function() { + $('#smartwizard').smartWizard(); +}); +``` + +### CommonJS / Webpack +```js +var $ = require("jquery"); +require("smartwizard/dist/css/smartwizard.min.css"); +require("smartwizard/dist/css/themes/arrows.min.css"); +const smartWizard = require("smartwizard"); + +$(function() { + $('#smartwizard').smartWizard(); +}); ``` ### Download @@ -76,158 +95,257 @@ Installation Features ----- - -- Standalone CSS -- Accessible controls -- Bootstrap compatible -- Cool themes included -- Dark mode -- URL navigation and selection -- Event support -- Ajax content support -- Keyboard navigation -- Auto height adjustment -- Cool transition animations (fade/slide-horizontal/slide-vertical/slide-swing) -- External anchor support -- Easy to implement and minimal HTML required -- Customizable toolbar, option to add extra buttons -- Responsive design -- reset option -- Easy navigation with step anchors and navigation buttons -- Easy to implement and minimal HTML required -- Supports all modern browsers -- Compatible with all jQuery versions (jQuery 1.11.1+, jQuery 2+, jQuery 3.5+) +- Easy to implement with minimal and clean HTML structure +- Fully rewritten in TypeScript (v7) with built-in type declarations +- Compatible with all modern browsers +- Responsive and mobile-ready design +- Multiple built-in themes (`basic` | `arrows` | `glow` | `pills`), easily customizable +- Flexible color customization using CSS variables +- Light / dark / auto display mode support +- Built-in transition animations (`default` | `fade` | `slideHorizontal` | `slideVertical` | `slideSwing` | `css`) +- Compatible with CSS animation libraries (including [Animate.css](https://animate.style/)) +- Extendable transition system with custom animation handlers +- Comprehensive step states: `completed`, `active`, `disabled`, `hidden`, `error`, `warning` +- Runtime option updates via `setOptions()` +- Automatic horizontal scrolling when steps overflow (mouse wheel supported) +- Keyboard navigation (left/right arrow keys) +- Form validation support via `leave.sw` event +- RTL (right-to-left language) support +- Accessible navigation controls +- Support for external navigation controls +- Dynamic content loading via `contentLoader` callback +- Auto content height adjustment +- Customizable toolbar with support for additional HTML elements +- Integrated progress bar +- URL hash navigation with browser history integration +- UMD (Universal Module Definition) compatible +- Supports jQuery >= 1.11.1, jQuery 3.x, jQuery 4.x, and jQuery Slim versions Usage ----- Include SmartWizard CSS ```html - + ``` -Include HTML (*This is the basic HTML markup for the Smart Wizard. You can customize it by adding your on steps content*). +Include HTML (*This is the basic HTML markup. Customize it by adding your own step content*). ```html +
-
- Step 1 Content + Step 1 content
- Step 2 Content + Step 2 content
- Step 3 Content + Step 3 content
- Step 4 Content + Step 4 content
+ + +
+
+
+
``` -Include jQuery (*ignore this if you have already included on the page*). -```html - -``` +### Include JavaScript +_Note:- jQuery should be included before the jQuery SmartWizard JavaScript file._ -Include SmartWizard plugin +Include SmartWizard plugin JavaScript ```html - + ``` -Initialize the SmartWizard -```html - ``` + That's it! -Please see the [documentation](http://techlaboratory.net/jquery-smartwizard#documentation) for more details on implementation and usage. +Please see the detailed [documentation](https://techlaboratory.net/jquery-smartwizard#documentation) for implementation and usage. -##### All options +### All options -```JavaScript +```javascript $('#smartwizard').smartWizard({ - selected: 0, // Initial selected step, 0 = first step - theme: 'default', // theme for the wizard, related css need to include for other than default theme - justified: true, // Nav menu justification. true/false - darkMode:false, // Enable/disable Dark Mode if the theme supports. true/false - autoAdjustHeight: true, // Automatically adjust content height - cycleSteps: false, // Allows to cycle the navigation of steps - backButtonSupport: true, // Enable the back button support - enableURLhash: true, // Enable selection of the step based on url hash - transition: { - animation: 'none', // Effect on navigation, none/fade/slide-horizontal/slide-vertical/slide-swing - speed: '400', // Transion animation speed - easing:'' // Transition animation easing. Not supported without a jQuery easing plugin - }, - toolbarSettings: { - toolbarPosition: 'bottom', // none, top, bottom, both - toolbarButtonPosition: 'right', // left, right, center - showNextButton: true, // show/hide a Next button - showPreviousButton: true, // show/hide a Previous button - toolbarExtraButtons: [] // Extra buttons to show on toolbar, array of jQuery input/buttons elements - }, - anchorSettings: { - anchorClickable: true, // Enable/Disable anchor navigation - enableAllAnchors: false, // Activates all anchors clickable all times - markDoneStep: true, // Add done state on navigation - markAllPreviousStepsAsDone: true, // When a step selected by url hash, all previous steps are marked done - removeDoneStepOnNavigateBack: false, // While navigate back done step after active step will be cleared - enableAnchorOnDoneStep: true // Enable/Disable the done steps navigation - }, - keyboardSettings: { - keyNavigation: true, // Enable/Disable keyboard navigation(left and right keys are used if enabled) - keyLeft: [37], // Left key code - keyRight: [39] // Right key code - }, - lang: { // Language variables for button - next: 'Next', - previous: 'Previous' - }, - disabledSteps: [], // Array Steps disabled - errorSteps: [], // Highlight step with errors - hiddenSteps: [] // Hidden steps + initialStep: 0, // Initial selected step (0 = first step) + theme: 'basic', // Theme: basic | arrows | dots | round | square | progress (ensure related CSS is included) + displayMode: 'auto', // Display mode: auto (system preference) | dark | light | none + + behavior: { + autoHeight: true, // Auto-adjust content height to active step + useUrlHash: false, // Enable step selection via URL hash + supportBrowserHistory: false // Enable browser back/forward button support + }, + + navigation: { + enabled: true, // Enable/disable anchor click navigation + alwaysClickable: false, // Allow clicking any step at any time + completed: { + enabled: true, // Mark visited steps as completed + completeAllPreviousSteps: true, // Mark all prior steps done when navigating via URL hash + clearOnBack: false, // Clear completed state when navigating backward + clickable: true // Allow navigating back to completed steps + } + }, + + transition: { + effect: 'default', // none | fade | slideHorizontal | slideVertical | slideSwing | css + speed: 400, // Animation speed in ms (not used for 'css') + easing: '', // jQuery easing (requires easing plugin; not used for 'css') + css: { // Settings used only when effect is 'css' + prefix: '', // CSS animation class prefix (e.g. 'animate__animated') + forward: { show: '', hide: '' }, // Classes for forward animation + backward: { show: '', hide: '' } // Classes for backward animation + } + }, + + toolbar: { + position: 'bottom', // none | top | bottom | both + buttons: { + showNext: true, // Show/hide the Next button + showPrevious: true // Show/hide the Previous button + }, + extraElements: '' // Additional HTML or jQuery elements to append to toolbar + }, + + keyboardNavigation: { + enabled: true, // Enable left/right arrow key navigation + keys: { + left: [37], // Key codes for backward navigation + right: [39] // Key codes for forward navigation + } + }, + + swipeNavigation: { + enabled: false, // Enable swipe navigation on touch devices + threshold: 50 // Minimum swipe distance in px to trigger navigation + }, + + localization: { + buttons: { + next: 'Next', + previous: 'Previous' + } + }, + + stepStates: { + completed: [], // Step indexes to mark as completed on init + disabled: [], // Step indexes to disable on init + hidden: [], // Step indexes to hide on init + error: [], // Step indexes to mark as error on init + warning: [] // Step indexes to mark as warning on init + }, + + scrollToView: false, // Scroll the active step anchor into view on step change + + contentLoader: null // function(stepIndex, stepDirection, stepPosition, stepElement, callback) + // Dynamically load step content; call callback(htmlContent) when ready +}); +``` + +### Events + +```javascript +// Fires after the wizard is fully initialized +$('#smartwizard').on('initialized.sw', function(e) { }); + +// Fires after the initial step is shown for the first time +$('#smartwizard').on('loaded.sw', function(e) { }); + +// Fires before leaving the current step +// Return false from the handler to cancel navigation +$('#smartwizard').on('leave.sw', function(e, args) { + // args: { stepIndex, nextStepIndex, stepElement, stepDirection, stepPosition } +}); + +// Fires after a new step is shown +$('#smartwizard').on('shown.sw', function(e, args) { + // args: { stepIndex, stepElement, stepDirection, stepPosition } }); ``` +### Public methods + +```javascript +const wizard = $('#smartwizard'); + +wizard.smartWizard('next'); // Navigate to next step +wizard.smartWizard('prev'); // Navigate to previous step +wizard.smartWizard('goToStep', 2); // Go to step index 2 +wizard.smartWizard('goToStep', 2, true); // Go to step index 2 (force, marks previous as done) +wizard.smartWizard('reset'); // Reset wizard to initial state +wizard.smartWizard('setOptions', { theme: 'arrows' }); // Update options at runtime + +wizard.smartWizard('setState', [1, 2], 'disable'); // Disable steps 1 and 2 +wizard.smartWizard('setState', [3], 'error'); // Mark step 3 as error +wizard.smartWizard('unsetState', [1, 2], 'disable'); // Re-enable steps 1 and 2 + +wizard.smartWizard('loader', 'show'); // Show loader +wizard.smartWizard('loader', 'hide'); // Hide loader + +wizard.smartWizard('adjustHeight'); // Manually re-adjust content height + +const info = wizard.smartWizard('getStepInfo'); +// Returns: { currentStep, totalSteps } +``` + License ---- -[MIT License](https://github.com/techlab/jquery-smartwizard/blob/master/LICENSE) + +**jQuery SmartWizard v7** is dual-licensed: + +**[MIT License](https://github.com/techlab/jquery-smartwizard/blob/master/LICENSE)** — Free for personal and open-source projects. + +**[Commercial License](https://techlaboratory.net/jquery-smartwizard#license)** — Required for closed-source, SaaS, or any commercial projects. +If you use **jQuery SmartWizard v7** in a commercial or client application, please purchase a commercial license. + +Commercial licenses help support continued development, maintenance, and new features. Contribute ---- If you like the project please support with your contribution. -[Donate on Paypal](https://www.paypal.me/dipuraj) +[GitHub Sponsor](https://github.com/sponsors/techlab) -Thank you :) +Happy Coding :heart: diff --git a/composer.json b/composer.json deleted file mode 100644 index 046b169..0000000 --- a/composer.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "name": "techlab/smartwizard", - "description": "The awesome jQuery step wizard plugin", - "homepage": "http://techlaboratory.net/jquery-smartwizard", - "license": "MIT", - "support": { - "source": "https://github.com/techlab/jquery-smartwizard", - "issues": "https://github.com/techlab/jquery-smartwizard/issues", - "docs": "http://techlaboratory.net/jquery-smartwizard#documentation" - }, - "keywords": [ - "bootstrap", - "wizard", - "step", - "ui", - "jquery-plugin", - "jquery", - "wizard plugin" - ], - "authors": [ - { - "name": "Dipu Raj", - "email": "hello.techlab@gmail.com", - "homepage": "http://dipu.me" - } - ], - "require": { - } -} diff --git a/dist/css/smart_wizard.css b/dist/css/smart_wizard.css deleted file mode 100644 index aefd26b..0000000 --- a/dist/css/smart_wizard.css +++ /dev/null @@ -1,241 +0,0 @@ -/*! - * jQuery SmartWizard v5 - * jQuery Wizard Plugin - * http://www.techlaboratory.net/smartwizard - * - * Created by Dipu Raj - * http://dipu.me - * - * Licensed under the terms of MIT License - * https://github.com/techlab/jquery-smartwizard/blob/master/LICENSE - */ -/* SmartWizard Base Styles */ -.sw { - position: relative; -} - -.sw *, -.sw *::before, -.sw *::after { - box-sizing: border-box; -} - -.sw > .tab-content { - position: relative; - overflow: hidden; -} - -.sw .toolbar { - padding: .8rem; -} - -.sw .toolbar > .btn { - display: inline-block; - text-decoration: none; - text-align: center; - text-transform: none; - vertical-align: middle; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - margin-left: .2rem; - margin-right: .2rem; - cursor: pointer; -} - -.sw .toolbar > .btn.disabled, .sw .toolbar > .btn:disabled { - opacity: .65; -} - -.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: .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 !important; -} - -.sw > .nav .nav-link.disabled { - color: #ccc !important; - pointer-events: none; - cursor: default; -} - -.sw > .nav .nav-link.hidden { - display: none !important; -} - -.sw.sw-justified > .nav > li, .sw.sw-justified > .nav .nav-link { - flex-basis: 0; - flex-grow: 1; - text-align: center; -} - -.sw.sw-dark { - color: rgba(255, 255, 255, 0.95); - background: #000; -} - -.sw.sw-loading { - -webkit-user-select: none; - -moz-user-select: none; - -ms-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: rgba(255, 255, 255, 0.7); - z-index: 2; - transition: all .2s ease; -} - -.sw.sw-loading::before { - content: ''; - display: inline-block; - position: absolute; - top: 45%; - left: 45%; - width: 2rem; - height: 2rem; - border: 10px solid #f3f3f3; - border-top: 10px solid #3498db; - 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); - } -} - -/* SmartWizard Theme: Default */ -.sw-theme-default { - border: 1px solid #eeeeee; -} - -.sw-theme-default > .tab-content > .tab-pane { - padding: 10px; -} - -.sw-theme-default .toolbar > .btn { - color: #fff; - background-color: #17a2b8; - border: 1px solid #17a2b8; - padding: .375rem .75rem; - border-radius: .25rem; - font-weight: 400; -} - -.sw-theme-default > .nav { - box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.1) !important; -} - -.sw-theme-default > .nav .nav-link { - position: relative; - height: 100%; - min-height: 100%; -} - -.sw-theme-default > .nav .nav-link::after { - content: ""; - position: absolute; - height: 2px; - width: 0; - left: 0px; - bottom: -1px; - background: #999999; - transition: all .35s ease .15s; -} - -.sw-theme-default > .nav .nav-link.inactive { - color: #999999; - cursor: not-allowed; -} - -.sw-theme-default > .nav .nav-link.active { - color: #17a2b8 !important; - cursor: pointer; -} - -.sw-theme-default > .nav .nav-link.active::after { - background: #17a2b8 !important; - width: 100%; -} - -.sw-theme-default > .nav .nav-link.done { - color: #5cb85c !important; - cursor: pointer; -} - -.sw-theme-default > .nav .nav-link.done::after { - background: #5cb85c; - width: 100%; -} - -.sw-theme-default > .nav .nav-link.disabled { - color: #dddddd !important; - cursor: not-allowed; -} - -.sw-theme-default > .nav .nav-link.disabled::after { - background: #dddddd; - width: 100%; -} - -.sw-theme-default > .nav .nav-link.danger { - color: #d9534f !important; - cursor: pointer; -} - -.sw-theme-default > .nav .nav-link.danger::after { - background: #d9534f; - width: 100%; -} diff --git a/dist/css/smart_wizard.min.css b/dist/css/smart_wizard.min.css deleted file mode 100644 index ff8e04e..0000000 --- a/dist/css/smart_wizard.min.css +++ /dev/null @@ -1,11 +0,0 @@ -/*! - * jQuery SmartWizard v5 - * jQuery Wizard Plugin - * http://www.techlaboratory.net/smartwizard - * - * Created by Dipu Raj - * http://dipu.me - * - * Licensed under the terms of MIT License - * https://github.com/techlab/jquery-smartwizard/blob/master/LICENSE - */.sw{position:relative}.sw *,.sw ::after,.sw ::before{box-sizing:border-box}.sw>.tab-content{position:relative;overflow:hidden}.sw .toolbar{padding:.8rem}.sw .toolbar>.btn{display:inline-block;text-decoration:none;text-align:center;text-transform:none;vertical-align:middle;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;margin-left:.2rem;margin-right:.2rem;cursor:pointer}.sw .toolbar>.btn.disabled,.sw .toolbar>.btn:disabled{opacity:.65}.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:.5rem 1rem;text-decoration:none}.sw>.nav .nav-link:active,.sw>.nav .nav-link:focus,.sw>.nav .nav-link:hover{text-decoration:none}.sw>.nav .nav-link::-moz-focus-inner{border:0!important}.sw>.nav .nav-link.disabled{color:#ccc!important;pointer-events:none;cursor:default}.sw>.nav .nav-link.hidden{display:none!important}.sw.sw-justified>.nav .nav-link,.sw.sw-justified>.nav>li{flex-basis:0;flex-grow:1;text-align:center}.sw.sw-dark{color:rgba(255,255,255,.95);background:#000}.sw.sw-loading{-webkit-user-select:none;-moz-user-select:none;-ms-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:rgba(255,255,255,.7);z-index:2;transition:all .2s ease}.sw.sw-loading::before{content:'';display:inline-block;position:absolute;top:45%;left:45%;width:2rem;height:2rem;border:10px solid #f3f3f3;border-top:10px solid #3498db;border-radius:50%;z-index:10;-webkit-animation:spin 1s linear infinite;animation:spin 1s linear infinite}@-webkit-keyframes spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@keyframes spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}.sw-theme-default{border:1px solid #eee}.sw-theme-default>.tab-content>.tab-pane{padding:10px}.sw-theme-default .toolbar>.btn{color:#fff;background-color:#17a2b8;border:1px solid #17a2b8;padding:.375rem .75rem;border-radius:.25rem;font-weight:400}.sw-theme-default>.nav{box-shadow:0 .125rem .25rem rgba(0,0,0,.1)!important}.sw-theme-default>.nav .nav-link{position:relative;height:100%;min-height:100%}.sw-theme-default>.nav .nav-link::after{content:"";position:absolute;height:2px;width:0;left:0;bottom:-1px;background:#999;transition:all .35s ease .15s}.sw-theme-default>.nav .nav-link.inactive{color:#999;cursor:not-allowed}.sw-theme-default>.nav .nav-link.active{color:#17a2b8!important;cursor:pointer}.sw-theme-default>.nav .nav-link.active::after{background:#17a2b8!important;width:100%}.sw-theme-default>.nav .nav-link.done{color:#5cb85c!important;cursor:pointer}.sw-theme-default>.nav .nav-link.done::after{background:#5cb85c;width:100%}.sw-theme-default>.nav .nav-link.disabled{color:#ddd!important;cursor:not-allowed}.sw-theme-default>.nav .nav-link.disabled::after{background:#ddd;width:100%}.sw-theme-default>.nav .nav-link.danger{color:#d9534f!important;cursor:pointer}.sw-theme-default>.nav .nav-link.danger::after{background:#d9534f;width:100%} \ No newline at end of file diff --git a/dist/css/smart_wizard_all.css b/dist/css/smart_wizard_all.css deleted file mode 100644 index ef54a64..0000000 --- a/dist/css/smart_wizard_all.css +++ /dev/null @@ -1,683 +0,0 @@ -/*! - * jQuery SmartWizard v5 - * jQuery Wizard Plugin - * http://www.techlaboratory.net/smartwizard - * - * Created by Dipu Raj - * http://dipu.me - * - * Licensed under the terms of MIT License - * https://github.com/techlab/jquery-smartwizard/blob/master/LICENSE - */ -/* SmartWizard Base Styles */ -.sw { - position: relative; -} - -.sw *, -.sw *::before, -.sw *::after { - box-sizing: border-box; -} - -.sw > .tab-content { - position: relative; - overflow: hidden; -} - -.sw .toolbar { - padding: .8rem; -} - -.sw .toolbar > .btn { - display: inline-block; - text-decoration: none; - text-align: center; - text-transform: none; - vertical-align: middle; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - margin-left: .2rem; - margin-right: .2rem; - cursor: pointer; -} - -.sw .toolbar > .btn.disabled, .sw .toolbar > .btn:disabled { - opacity: .65; -} - -.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: .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 !important; -} - -.sw > .nav .nav-link.disabled { - color: #ccc !important; - pointer-events: none; - cursor: default; -} - -.sw > .nav .nav-link.hidden { - display: none !important; -} - -.sw.sw-justified > .nav > li, .sw.sw-justified > .nav .nav-link { - flex-basis: 0; - flex-grow: 1; - text-align: center; -} - -.sw.sw-dark { - color: rgba(255, 255, 255, 0.95); - background: #000; -} - -.sw.sw-loading { - -webkit-user-select: none; - -moz-user-select: none; - -ms-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: rgba(255, 255, 255, 0.7); - z-index: 2; - transition: all .2s ease; -} - -.sw.sw-loading::before { - content: ''; - display: inline-block; - position: absolute; - top: 45%; - left: 45%; - width: 2rem; - height: 2rem; - border: 10px solid #f3f3f3; - border-top: 10px solid #3498db; - 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); - } -} - -/* SmartWizard Theme: Default */ -.sw-theme-default { - border: 1px solid #eeeeee; -} - -.sw-theme-default > .tab-content > .tab-pane { - padding: 10px; -} - -.sw-theme-default .toolbar > .btn { - color: #fff; - background-color: #17a2b8; - border: 1px solid #17a2b8; - padding: .375rem .75rem; - border-radius: .25rem; - font-weight: 400; -} - -.sw-theme-default > .nav { - box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.1) !important; -} - -.sw-theme-default > .nav .nav-link { - position: relative; - height: 100%; - min-height: 100%; -} - -.sw-theme-default > .nav .nav-link::after { - content: ""; - position: absolute; - height: 2px; - width: 0; - left: 0px; - bottom: -1px; - background: #999999; - transition: all .35s ease .15s; -} - -.sw-theme-default > .nav .nav-link.inactive { - color: #999999; - cursor: not-allowed; -} - -.sw-theme-default > .nav .nav-link.active { - color: #17a2b8 !important; - cursor: pointer; -} - -.sw-theme-default > .nav .nav-link.active::after { - background: #17a2b8 !important; - width: 100%; -} - -.sw-theme-default > .nav .nav-link.done { - color: #5cb85c !important; - cursor: pointer; -} - -.sw-theme-default > .nav .nav-link.done::after { - background: #5cb85c; - width: 100%; -} - -.sw-theme-default > .nav .nav-link.disabled { - color: #dddddd !important; - cursor: not-allowed; -} - -.sw-theme-default > .nav .nav-link.disabled::after { - background: #dddddd; - width: 100%; -} - -.sw-theme-default > .nav .nav-link.danger { - color: #d9534f !important; - cursor: pointer; -} - -.sw-theme-default > .nav .nav-link.danger::after { - background: #d9534f; - width: 100%; -} - -/* SmartWizard Theme: Arrows */ -.sw-theme-arrows { - border: 1px solid #eeeeee; -} - -.sw-theme-arrows > .tab-content > .tab-pane { - padding: 10px; -} - -.sw-theme-arrows .toolbar > .btn { - color: #ffffff; - background-color: #17a2b8; - border: 1px solid #17a2b8; - padding: .375rem .75rem; - border-radius: .25rem; - font-weight: 400; -} - -.sw-theme-arrows > .nav { - overflow: hidden; - border-bottom: 1px solid #eeeeee; -} - -.sw-theme-arrows > .nav .nav-link { - position: relative; - height: 100%; - min-height: 100%; - margin-right: 30px; - margin-left: -30px; - padding-left: 40px; -} - -@media screen and (max-width: 640px) { - .sw-theme-arrows > .nav .nav-link { - overflow: hidden; - margin-bottom: 1px; - margin-right: unset; - } -} - -.sw-theme-arrows > .nav .nav-link::after { - content: ""; - position: absolute; - display: block; - width: 0; - height: 0; - top: 50%; - left: 100%; - margin-top: -50px; - border-top: 50px solid transparent; - border-bottom: 50px solid transparent; - border-left: 30px solid #f8f8f8; - z-index: 2; -} - -.sw-theme-arrows > .nav .nav-link::before { - content: " "; - position: absolute; - display: block; - width: 0; - height: 0; - top: 50%; - left: 100%; - margin-top: -50px; - margin-left: 1px; - border-top: 50px solid transparent; - border-bottom: 50px solid transparent; - border-left: 30px solid #eeeeee; - z-index: 1; -} - -.sw-theme-arrows > .nav .nav-link.inactive { - color: #999999; - border-color: #f8f8f8; - background: #f8f8f8; - cursor: not-allowed; -} - -.sw-theme-arrows > .nav .nav-link.active { - color: #ffffff; - border-color: #5bc0de; - background: #5bc0de; - cursor: pointer; -} - -.sw-theme-arrows > .nav .nav-link.active::after { - border-left-color: #5bc0de; -} - -.sw-theme-arrows > .nav .nav-link.done { - color: #ffffff; - border-color: #5cb85c; - background: #5cb85c; - cursor: pointer; -} - -.sw-theme-arrows > .nav .nav-link.done::after { - border-left-color: #5cb85c; -} - -.sw-theme-arrows > .nav .nav-link.disabled { - color: #eeeeee; - border-color: #f9f9f9; - background: #f9f9f9; - cursor: not-allowed; -} - -.sw-theme-arrows > .nav .nav-link.disabled::after { - border-left-color: #f9f9f9; -} - -.sw-theme-arrows > .nav .nav-link.danger { - color: #ffffff; - border-color: #d9534f; - background: #d9534f; - cursor: pointer; -} - -.sw-theme-arrows > .nav .nav-link.danger::after { - border-left-color: #d9534f; -} - -.sw-theme-arrows.sw-dark { - color: rgba(255, 255, 255, 0.95); - background: #000; -} - -.sw-theme-arrows.sw-dark > .nav { - border-bottom: 1px solid #555555; -} - -.sw-theme-arrows.sw-dark > .nav .nav-link::after { - border-left: 30px solid #5f5f5f; -} - -.sw-theme-arrows.sw-dark > .nav .nav-link::before { - border-left: 30px solid #555555; -} - -.sw-theme-arrows.sw-dark > .nav .nav-link.inactive { - color: white; - border-color: #5f5f5f; - background: #5f5f5f; -} - -.sw-theme-arrows.sw-dark > .nav .nav-link.inactive::after { - border-left-color: #5f5f5f; -} - -.sw-theme-arrows.sw-dark > .nav .nav-link.active { - color: white; - border-color: #010506; - background: #0a2730; -} - -.sw-theme-arrows.sw-dark > .nav .nav-link.active::after { - border-left-color: #0a2730; -} - -.sw-theme-arrows.sw-dark > .nav .nav-link.done { - color: white; - border-color: black; - background: black; -} - -.sw-theme-arrows.sw-dark > .nav .nav-link.done::after { - border-left-color: black; -} - -.sw-theme-arrows.sw-dark > .nav .nav-link.disabled { - color: #555555 !important; - border-color: #f9f9f9; - background: #474747; -} - -.sw-theme-arrows.sw-dark > .nav .nav-link.disabled::after { - border-left-color: #474747; -} - -.sw-theme-arrows.sw-dark > .nav .nav-link.danger { - color: #ffffff; - border-color: #d9534f; - background: #d9534f; -} - -.sw-theme-arrows.sw-dark > .nav .nav-link.danger::after { - border-left-color: #d9534f; -} - -/* SmartWizard Theme: Dots */ -.sw-theme-dots > .tab-content > .tab-pane { - padding: 10px; -} - -.sw-theme-dots .toolbar > .btn { - color: #ffffff; - background-color: #17a2b8; - border: 1px solid #17a2b8; - padding: .375rem .75rem; - border-radius: .25rem; - font-weight: 400; -} - -.sw-theme-dots > .nav { - position: relative; - margin-bottom: 10px; -} - -.sw-theme-dots > .nav::before { - content: " "; - position: absolute; - top: 18px; - left: 0; - width: 100%; - height: 5px; - background-color: #eeeeee; - border-radius: 3px; - z-index: 1; -} - -.sw-theme-dots > .nav .nav-link { - position: relative; - margin-top: 40px; -} - -.sw-theme-dots > .nav .nav-link::before { - content: " "; - position: absolute; - display: block; - top: -36px; - left: 0; - right: 0; - margin-left: auto; - margin-right: auto; - width: 32px; - height: 32px; - border-radius: 50%; - border: none; - background: #f5f5f5; - color: #428bca; - text-decoration: none; - z-index: 98; -} - -.sw-theme-dots > .nav .nav-link::after { - content: " "; - position: absolute; - display: block; - top: -28px; - left: 0; - right: 0; - margin-left: auto; - margin-right: auto; - width: 16px; - height: 16px; - border-radius: 50%; - z-index: 99; -} - -.sw-theme-dots > .nav .nav-link.inactive { - color: #999999; - cursor: not-allowed; -} - -.sw-theme-dots > .nav .nav-link.inactive::after { - background-color: #999999; -} - -.sw-theme-dots > .nav .nav-link.active { - color: #5bc0de !important; - cursor: pointer; -} - -.sw-theme-dots > .nav .nav-link.active::after { - background-color: #5bc0de !important; -} - -.sw-theme-dots > .nav .nav-link.done { - color: #5cb85c; - cursor: pointer; -} - -.sw-theme-dots > .nav .nav-link.done::after { - background-color: #5cb85c; -} - -.sw-theme-dots > .nav .nav-link.disabled { - color: #f9f9f9; - cursor: not-allowed; -} - -.sw-theme-dots > .nav .nav-link.disabled::after { - background-color: #f9f9f9; -} - -.sw-theme-dots > .nav .nav-link.danger { - color: #d9534f; - cursor: pointer; -} - -.sw-theme-dots > .nav .nav-link.danger::after { - background-color: #d9534f; -} - -.sw-theme-dots.sw-dark { - color: rgba(255, 255, 255, 0.95); - background: #000; -} - -.sw-theme-dots.sw-dark > .nav::before { - background-color: #3c3c3c; -} - -.sw-theme-dots.sw-dark > .nav .nav-link::before { - background: #434343; - color: black; -} - -/* SmartWizard Theme: Progress */ -.sw-theme-progress { - border: 1px solid #eeeeee; -} - -.sw-theme-progress > .tab-content > .tab-pane { - padding: 10px; -} - -.sw-theme-progress .toolbar > .btn { - color: #ffffff; - background-color: #17a2b8; - border: 1px solid #17a2b8; - padding: .375rem .75rem; - border-radius: .25rem; - font-weight: 400; -} - -.sw-theme-progress > .nav { - box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.1) !important; -} - -.sw-theme-progress > .nav .nav-link { - position: relative; - height: 100%; - min-height: 100%; - background: transparent; - overflow: hidden; - z-index: 2; -} - -.sw-theme-progress > .nav .nav-link::after { - content: ""; - position: absolute; - height: 150%; - width: 0; - left: 0; - top: 0; - background: #ffffff; - z-index: -1; - transition: all .35s ease .10s; -} - -.sw-theme-progress > .nav .nav-link.inactive { - color: #999999; - cursor: not-allowed; -} - -.sw-theme-progress > .nav .nav-link.active { - color: #ffffff !important; - cursor: pointer; -} - -.sw-theme-progress > .nav .nav-link.active::after { - background-color: #5cb85c; - width: 100%; -} - -.sw-theme-progress > .nav .nav-link.done { - color: #ffffff !important; - cursor: pointer; -} - -.sw-theme-progress > .nav .nav-link.done::after { - background: #5cb85c; - width: 100%; -} - -.sw-theme-progress > .nav .nav-link.disabled { - color: #dddddd !important; - cursor: not-allowed; -} - -.sw-theme-progress > .nav .nav-link.disabled::after { - background: #f9f9f9; - width: 100%; -} - -.sw-theme-progress > .nav .nav-link.danger { - color: #ffffff !important; - cursor: pointer; -} - -.sw-theme-progress > .nav .nav-link.danger::after { - background: #d9534f; - width: 100%; -} - -.sw-theme-progress.sw-dark { - color: rgba(255, 255, 255, 0.95); -} - -.sw-theme-progress.sw-dark > .nav .nav-link.active { - color: white; -} - -.sw-theme-progress.sw-dark > .nav .nav-link.active::after { - background-color: #333; -} - -.sw-theme-progress.sw-dark > .nav .nav-link.done { - color: #ffffff !important; -} - -.sw-theme-progress.sw-dark > .nav .nav-link.done::after { - background: #333; -} - -.sw-theme-progress.sw-dark > .nav .nav-link.disabled { - color: #2b2b2b !important; -} - -.sw-theme-progress.sw-dark > .nav .nav-link.disabled::after { - background: #474747; -} - -.sw-theme-progress.sw-dark > .nav .nav-link.danger { - color: #ffffff !important; -} - -.sw-theme-progress.sw-dark > .nav .nav-link.danger::after { - background: #d9534f; -} diff --git a/dist/css/smart_wizard_all.min.css b/dist/css/smart_wizard_all.min.css deleted file mode 100644 index 217d3aa..0000000 --- a/dist/css/smart_wizard_all.min.css +++ /dev/null @@ -1,11 +0,0 @@ -/*! - * jQuery SmartWizard v5 - * jQuery Wizard Plugin - * http://www.techlaboratory.net/smartwizard - * - * Created by Dipu Raj - * http://dipu.me - * - * Licensed under the terms of MIT License - * https://github.com/techlab/jquery-smartwizard/blob/master/LICENSE - */.sw{position:relative}.sw *,.sw ::after,.sw ::before{box-sizing:border-box}.sw>.tab-content{position:relative;overflow:hidden}.sw .toolbar{padding:.8rem}.sw .toolbar>.btn{display:inline-block;text-decoration:none;text-align:center;text-transform:none;vertical-align:middle;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;margin-left:.2rem;margin-right:.2rem;cursor:pointer}.sw .toolbar>.btn.disabled,.sw .toolbar>.btn:disabled{opacity:.65}.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:.5rem 1rem;text-decoration:none}.sw>.nav .nav-link:active,.sw>.nav .nav-link:focus,.sw>.nav .nav-link:hover{text-decoration:none}.sw>.nav .nav-link::-moz-focus-inner{border:0!important}.sw>.nav .nav-link.disabled{color:#ccc!important;pointer-events:none;cursor:default}.sw>.nav .nav-link.hidden{display:none!important}.sw.sw-justified>.nav .nav-link,.sw.sw-justified>.nav>li{flex-basis:0;flex-grow:1;text-align:center}.sw.sw-dark{color:rgba(255,255,255,.95);background:#000}.sw.sw-loading{-webkit-user-select:none;-moz-user-select:none;-ms-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:rgba(255,255,255,.7);z-index:2;transition:all .2s ease}.sw.sw-loading::before{content:'';display:inline-block;position:absolute;top:45%;left:45%;width:2rem;height:2rem;border:10px solid #f3f3f3;border-top:10px solid #3498db;border-radius:50%;z-index:10;-webkit-animation:spin 1s linear infinite;animation:spin 1s linear infinite}@-webkit-keyframes spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@keyframes spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}.sw-theme-default{border:1px solid #eee}.sw-theme-default>.tab-content>.tab-pane{padding:10px}.sw-theme-default .toolbar>.btn{color:#fff;background-color:#17a2b8;border:1px solid #17a2b8;padding:.375rem .75rem;border-radius:.25rem;font-weight:400}.sw-theme-default>.nav{box-shadow:0 .125rem .25rem rgba(0,0,0,.1)!important}.sw-theme-default>.nav .nav-link{position:relative;height:100%;min-height:100%}.sw-theme-default>.nav .nav-link::after{content:"";position:absolute;height:2px;width:0;left:0;bottom:-1px;background:#999;transition:all .35s ease .15s}.sw-theme-default>.nav .nav-link.inactive{color:#999;cursor:not-allowed}.sw-theme-default>.nav .nav-link.active{color:#17a2b8!important;cursor:pointer}.sw-theme-default>.nav .nav-link.active::after{background:#17a2b8!important;width:100%}.sw-theme-default>.nav .nav-link.done{color:#5cb85c!important;cursor:pointer}.sw-theme-default>.nav .nav-link.done::after{background:#5cb85c;width:100%}.sw-theme-default>.nav .nav-link.disabled{color:#ddd!important;cursor:not-allowed}.sw-theme-default>.nav .nav-link.disabled::after{background:#ddd;width:100%}.sw-theme-default>.nav .nav-link.danger{color:#d9534f!important;cursor:pointer}.sw-theme-default>.nav .nav-link.danger::after{background:#d9534f;width:100%}.sw-theme-arrows{border:1px solid #eee}.sw-theme-arrows>.tab-content>.tab-pane{padding:10px}.sw-theme-arrows .toolbar>.btn{color:#fff;background-color:#17a2b8;border:1px solid #17a2b8;padding:.375rem .75rem;border-radius:.25rem;font-weight:400}.sw-theme-arrows>.nav{overflow:hidden;border-bottom:1px solid #eee}.sw-theme-arrows>.nav .nav-link{position:relative;height:100%;min-height:100%;margin-right:30px;margin-left:-30px;padding-left:40px}@media screen and (max-width:640px){.sw-theme-arrows>.nav .nav-link{overflow:hidden;margin-bottom:1px;margin-right:unset}}.sw-theme-arrows>.nav .nav-link::after{content:"";position:absolute;display:block;width:0;height:0;top:50%;left:100%;margin-top:-50px;border-top:50px solid transparent;border-bottom:50px solid transparent;border-left:30px solid #f8f8f8;z-index:2}.sw-theme-arrows>.nav .nav-link::before{content:" ";position:absolute;display:block;width:0;height:0;top:50%;left:100%;margin-top:-50px;margin-left:1px;border-top:50px solid transparent;border-bottom:50px solid transparent;border-left:30px solid #eee;z-index:1}.sw-theme-arrows>.nav .nav-link.inactive{color:#999;border-color:#f8f8f8;background:#f8f8f8;cursor:not-allowed}.sw-theme-arrows>.nav .nav-link.active{color:#fff;border-color:#5bc0de;background:#5bc0de;cursor:pointer}.sw-theme-arrows>.nav .nav-link.active::after{border-left-color:#5bc0de}.sw-theme-arrows>.nav .nav-link.done{color:#fff;border-color:#5cb85c;background:#5cb85c;cursor:pointer}.sw-theme-arrows>.nav .nav-link.done::after{border-left-color:#5cb85c}.sw-theme-arrows>.nav .nav-link.disabled{color:#eee;border-color:#f9f9f9;background:#f9f9f9;cursor:not-allowed}.sw-theme-arrows>.nav .nav-link.disabled::after{border-left-color:#f9f9f9}.sw-theme-arrows>.nav .nav-link.danger{color:#fff;border-color:#d9534f;background:#d9534f;cursor:pointer}.sw-theme-arrows>.nav .nav-link.danger::after{border-left-color:#d9534f}.sw-theme-arrows.sw-dark{color:rgba(255,255,255,.95);background:#000}.sw-theme-arrows.sw-dark>.nav{border-bottom:1px solid #555}.sw-theme-arrows.sw-dark>.nav .nav-link::after{border-left:30px solid #5f5f5f}.sw-theme-arrows.sw-dark>.nav .nav-link::before{border-left:30px solid #555}.sw-theme-arrows.sw-dark>.nav .nav-link.inactive{color:#fff;border-color:#5f5f5f;background:#5f5f5f}.sw-theme-arrows.sw-dark>.nav .nav-link.inactive::after{border-left-color:#5f5f5f}.sw-theme-arrows.sw-dark>.nav .nav-link.active{color:#fff;border-color:#010506;background:#0a2730}.sw-theme-arrows.sw-dark>.nav .nav-link.active::after{border-left-color:#0a2730}.sw-theme-arrows.sw-dark>.nav .nav-link.done{color:#fff;border-color:#000;background:#000}.sw-theme-arrows.sw-dark>.nav .nav-link.done::after{border-left-color:#000}.sw-theme-arrows.sw-dark>.nav .nav-link.disabled{color:#555!important;border-color:#f9f9f9;background:#474747}.sw-theme-arrows.sw-dark>.nav .nav-link.disabled::after{border-left-color:#474747}.sw-theme-arrows.sw-dark>.nav .nav-link.danger{color:#fff;border-color:#d9534f;background:#d9534f}.sw-theme-arrows.sw-dark>.nav .nav-link.danger::after{border-left-color:#d9534f}.sw-theme-dots>.tab-content>.tab-pane{padding:10px}.sw-theme-dots .toolbar>.btn{color:#fff;background-color:#17a2b8;border:1px solid #17a2b8;padding:.375rem .75rem;border-radius:.25rem;font-weight:400}.sw-theme-dots>.nav{position:relative;margin-bottom:10px}.sw-theme-dots>.nav::before{content:" ";position:absolute;top:18px;left:0;width:100%;height:5px;background-color:#eee;border-radius:3px;z-index:1}.sw-theme-dots>.nav .nav-link{position:relative;margin-top:40px}.sw-theme-dots>.nav .nav-link::before{content:" ";position:absolute;display:block;top:-36px;left:0;right:0;margin-left:auto;margin-right:auto;width:32px;height:32px;border-radius:50%;border:none;background:#f5f5f5;color:#428bca;text-decoration:none;z-index:98}.sw-theme-dots>.nav .nav-link::after{content:" ";position:absolute;display:block;top:-28px;left:0;right:0;margin-left:auto;margin-right:auto;width:16px;height:16px;border-radius:50%;z-index:99}.sw-theme-dots>.nav .nav-link.inactive{color:#999;cursor:not-allowed}.sw-theme-dots>.nav .nav-link.inactive::after{background-color:#999}.sw-theme-dots>.nav .nav-link.active{color:#5bc0de!important;cursor:pointer}.sw-theme-dots>.nav .nav-link.active::after{background-color:#5bc0de!important}.sw-theme-dots>.nav .nav-link.done{color:#5cb85c;cursor:pointer}.sw-theme-dots>.nav .nav-link.done::after{background-color:#5cb85c}.sw-theme-dots>.nav .nav-link.disabled{color:#f9f9f9;cursor:not-allowed}.sw-theme-dots>.nav .nav-link.disabled::after{background-color:#f9f9f9}.sw-theme-dots>.nav .nav-link.danger{color:#d9534f;cursor:pointer}.sw-theme-dots>.nav .nav-link.danger::after{background-color:#d9534f}.sw-theme-dots.sw-dark{color:rgba(255,255,255,.95);background:#000}.sw-theme-dots.sw-dark>.nav::before{background-color:#3c3c3c}.sw-theme-dots.sw-dark>.nav .nav-link::before{background:#434343;color:#000}.sw-theme-progress{border:1px solid #eee}.sw-theme-progress>.tab-content>.tab-pane{padding:10px}.sw-theme-progress .toolbar>.btn{color:#fff;background-color:#17a2b8;border:1px solid #17a2b8;padding:.375rem .75rem;border-radius:.25rem;font-weight:400}.sw-theme-progress>.nav{box-shadow:0 .125rem .25rem rgba(0,0,0,.1)!important}.sw-theme-progress>.nav .nav-link{position:relative;height:100%;min-height:100%;background:0 0;overflow:hidden;z-index:2}.sw-theme-progress>.nav .nav-link::after{content:"";position:absolute;height:150%;width:0;left:0;top:0;background:#fff;z-index:-1;transition:all .35s ease .1s}.sw-theme-progress>.nav .nav-link.inactive{color:#999;cursor:not-allowed}.sw-theme-progress>.nav .nav-link.active{color:#fff!important;cursor:pointer}.sw-theme-progress>.nav .nav-link.active::after{background-color:#5cb85c;width:100%}.sw-theme-progress>.nav .nav-link.done{color:#fff!important;cursor:pointer}.sw-theme-progress>.nav .nav-link.done::after{background:#5cb85c;width:100%}.sw-theme-progress>.nav .nav-link.disabled{color:#ddd!important;cursor:not-allowed}.sw-theme-progress>.nav .nav-link.disabled::after{background:#f9f9f9;width:100%}.sw-theme-progress>.nav .nav-link.danger{color:#fff!important;cursor:pointer}.sw-theme-progress>.nav .nav-link.danger::after{background:#d9534f;width:100%}.sw-theme-progress.sw-dark{color:rgba(255,255,255,.95)}.sw-theme-progress.sw-dark>.nav .nav-link.active{color:#fff}.sw-theme-progress.sw-dark>.nav .nav-link.active::after{background-color:#333}.sw-theme-progress.sw-dark>.nav .nav-link.done{color:#fff!important}.sw-theme-progress.sw-dark>.nav .nav-link.done::after{background:#333}.sw-theme-progress.sw-dark>.nav .nav-link.disabled{color:#2b2b2b!important}.sw-theme-progress.sw-dark>.nav .nav-link.disabled::after{background:#474747}.sw-theme-progress.sw-dark>.nav .nav-link.danger{color:#fff!important}.sw-theme-progress.sw-dark>.nav .nav-link.danger::after{background:#d9534f} \ No newline at end of file diff --git a/dist/css/smart_wizard_arrows.css b/dist/css/smart_wizard_arrows.css deleted file mode 100644 index 9cca631..0000000 --- a/dist/css/smart_wizard_arrows.css +++ /dev/null @@ -1,346 +0,0 @@ -/*! - * jQuery SmartWizard v5 - * jQuery Wizard Plugin - * http://www.techlaboratory.net/smartwizard - * - * Created by Dipu Raj - * http://dipu.me - * - * Licensed under the terms of MIT License - * https://github.com/techlab/jquery-smartwizard/blob/master/LICENSE - */ -/* SmartWizard Base Styles */ -.sw { - position: relative; -} - -.sw *, -.sw *::before, -.sw *::after { - box-sizing: border-box; -} - -.sw > .tab-content { - position: relative; - overflow: hidden; -} - -.sw .toolbar { - padding: .8rem; -} - -.sw .toolbar > .btn { - display: inline-block; - text-decoration: none; - text-align: center; - text-transform: none; - vertical-align: middle; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - margin-left: .2rem; - margin-right: .2rem; - cursor: pointer; -} - -.sw .toolbar > .btn.disabled, .sw .toolbar > .btn:disabled { - opacity: .65; -} - -.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: .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 !important; -} - -.sw > .nav .nav-link.disabled { - color: #ccc !important; - pointer-events: none; - cursor: default; -} - -.sw > .nav .nav-link.hidden { - display: none !important; -} - -.sw.sw-justified > .nav > li, .sw.sw-justified > .nav .nav-link { - flex-basis: 0; - flex-grow: 1; - text-align: center; -} - -.sw.sw-dark { - color: rgba(255, 255, 255, 0.95); - background: #000; -} - -.sw.sw-loading { - -webkit-user-select: none; - -moz-user-select: none; - -ms-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: rgba(255, 255, 255, 0.7); - z-index: 2; - transition: all .2s ease; -} - -.sw.sw-loading::before { - content: ''; - display: inline-block; - position: absolute; - top: 45%; - left: 45%; - width: 2rem; - height: 2rem; - border: 10px solid #f3f3f3; - border-top: 10px solid #3498db; - 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); - } -} - -/* SmartWizard Theme: Arrows */ -.sw-theme-arrows { - border: 1px solid #eeeeee; -} - -.sw-theme-arrows > .tab-content > .tab-pane { - padding: 10px; -} - -.sw-theme-arrows .toolbar > .btn { - color: #ffffff; - background-color: #17a2b8; - border: 1px solid #17a2b8; - padding: .375rem .75rem; - border-radius: .25rem; - font-weight: 400; -} - -.sw-theme-arrows > .nav { - overflow: hidden; - border-bottom: 1px solid #eeeeee; -} - -.sw-theme-arrows > .nav .nav-link { - position: relative; - height: 100%; - min-height: 100%; - margin-right: 30px; - margin-left: -30px; - padding-left: 40px; -} - -@media screen and (max-width: 640px) { - .sw-theme-arrows > .nav .nav-link { - overflow: hidden; - margin-bottom: 1px; - margin-right: unset; - } -} - -.sw-theme-arrows > .nav .nav-link::after { - content: ""; - position: absolute; - display: block; - width: 0; - height: 0; - top: 50%; - left: 100%; - margin-top: -50px; - border-top: 50px solid transparent; - border-bottom: 50px solid transparent; - border-left: 30px solid #f8f8f8; - z-index: 2; -} - -.sw-theme-arrows > .nav .nav-link::before { - content: " "; - position: absolute; - display: block; - width: 0; - height: 0; - top: 50%; - left: 100%; - margin-top: -50px; - margin-left: 1px; - border-top: 50px solid transparent; - border-bottom: 50px solid transparent; - border-left: 30px solid #eeeeee; - z-index: 1; -} - -.sw-theme-arrows > .nav .nav-link.inactive { - color: #999999; - border-color: #f8f8f8; - background: #f8f8f8; - cursor: not-allowed; -} - -.sw-theme-arrows > .nav .nav-link.active { - color: #ffffff; - border-color: #5bc0de; - background: #5bc0de; - cursor: pointer; -} - -.sw-theme-arrows > .nav .nav-link.active::after { - border-left-color: #5bc0de; -} - -.sw-theme-arrows > .nav .nav-link.done { - color: #ffffff; - border-color: #5cb85c; - background: #5cb85c; - cursor: pointer; -} - -.sw-theme-arrows > .nav .nav-link.done::after { - border-left-color: #5cb85c; -} - -.sw-theme-arrows > .nav .nav-link.disabled { - color: #eeeeee; - border-color: #f9f9f9; - background: #f9f9f9; - cursor: not-allowed; -} - -.sw-theme-arrows > .nav .nav-link.disabled::after { - border-left-color: #f9f9f9; -} - -.sw-theme-arrows > .nav .nav-link.danger { - color: #ffffff; - border-color: #d9534f; - background: #d9534f; - cursor: pointer; -} - -.sw-theme-arrows > .nav .nav-link.danger::after { - border-left-color: #d9534f; -} - -.sw-theme-arrows.sw-dark { - color: rgba(255, 255, 255, 0.95); - background: #000; -} - -.sw-theme-arrows.sw-dark > .nav { - border-bottom: 1px solid #555555; -} - -.sw-theme-arrows.sw-dark > .nav .nav-link::after { - border-left: 30px solid #5f5f5f; -} - -.sw-theme-arrows.sw-dark > .nav .nav-link::before { - border-left: 30px solid #555555; -} - -.sw-theme-arrows.sw-dark > .nav .nav-link.inactive { - color: white; - border-color: #5f5f5f; - background: #5f5f5f; -} - -.sw-theme-arrows.sw-dark > .nav .nav-link.inactive::after { - border-left-color: #5f5f5f; -} - -.sw-theme-arrows.sw-dark > .nav .nav-link.active { - color: white; - border-color: #010506; - background: #0a2730; -} - -.sw-theme-arrows.sw-dark > .nav .nav-link.active::after { - border-left-color: #0a2730; -} - -.sw-theme-arrows.sw-dark > .nav .nav-link.done { - color: white; - border-color: black; - background: black; -} - -.sw-theme-arrows.sw-dark > .nav .nav-link.done::after { - border-left-color: black; -} - -.sw-theme-arrows.sw-dark > .nav .nav-link.disabled { - color: #555555 !important; - border-color: #f9f9f9; - background: #474747; -} - -.sw-theme-arrows.sw-dark > .nav .nav-link.disabled::after { - border-left-color: #474747; -} - -.sw-theme-arrows.sw-dark > .nav .nav-link.danger { - color: #ffffff; - border-color: #d9534f; - background: #d9534f; -} - -.sw-theme-arrows.sw-dark > .nav .nav-link.danger::after { - border-left-color: #d9534f; -} diff --git a/dist/css/smart_wizard_arrows.min.css b/dist/css/smart_wizard_arrows.min.css deleted file mode 100644 index fac0284..0000000 --- a/dist/css/smart_wizard_arrows.min.css +++ /dev/null @@ -1,11 +0,0 @@ -/*! - * jQuery SmartWizard v5 - * jQuery Wizard Plugin - * http://www.techlaboratory.net/smartwizard - * - * Created by Dipu Raj - * http://dipu.me - * - * Licensed under the terms of MIT License - * https://github.com/techlab/jquery-smartwizard/blob/master/LICENSE - */.sw{position:relative}.sw *,.sw ::after,.sw ::before{box-sizing:border-box}.sw>.tab-content{position:relative;overflow:hidden}.sw .toolbar{padding:.8rem}.sw .toolbar>.btn{display:inline-block;text-decoration:none;text-align:center;text-transform:none;vertical-align:middle;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;margin-left:.2rem;margin-right:.2rem;cursor:pointer}.sw .toolbar>.btn.disabled,.sw .toolbar>.btn:disabled{opacity:.65}.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:.5rem 1rem;text-decoration:none}.sw>.nav .nav-link:active,.sw>.nav .nav-link:focus,.sw>.nav .nav-link:hover{text-decoration:none}.sw>.nav .nav-link::-moz-focus-inner{border:0!important}.sw>.nav .nav-link.disabled{color:#ccc!important;pointer-events:none;cursor:default}.sw>.nav .nav-link.hidden{display:none!important}.sw.sw-justified>.nav .nav-link,.sw.sw-justified>.nav>li{flex-basis:0;flex-grow:1;text-align:center}.sw.sw-dark{color:rgba(255,255,255,.95);background:#000}.sw.sw-loading{-webkit-user-select:none;-moz-user-select:none;-ms-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:rgba(255,255,255,.7);z-index:2;transition:all .2s ease}.sw.sw-loading::before{content:'';display:inline-block;position:absolute;top:45%;left:45%;width:2rem;height:2rem;border:10px solid #f3f3f3;border-top:10px solid #3498db;border-radius:50%;z-index:10;-webkit-animation:spin 1s linear infinite;animation:spin 1s linear infinite}@-webkit-keyframes spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@keyframes spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}.sw-theme-arrows{border:1px solid #eee}.sw-theme-arrows>.tab-content>.tab-pane{padding:10px}.sw-theme-arrows .toolbar>.btn{color:#fff;background-color:#17a2b8;border:1px solid #17a2b8;padding:.375rem .75rem;border-radius:.25rem;font-weight:400}.sw-theme-arrows>.nav{overflow:hidden;border-bottom:1px solid #eee}.sw-theme-arrows>.nav .nav-link{position:relative;height:100%;min-height:100%;margin-right:30px;margin-left:-30px;padding-left:40px}@media screen and (max-width:640px){.sw-theme-arrows>.nav .nav-link{overflow:hidden;margin-bottom:1px;margin-right:unset}}.sw-theme-arrows>.nav .nav-link::after{content:"";position:absolute;display:block;width:0;height:0;top:50%;left:100%;margin-top:-50px;border-top:50px solid transparent;border-bottom:50px solid transparent;border-left:30px solid #f8f8f8;z-index:2}.sw-theme-arrows>.nav .nav-link::before{content:" ";position:absolute;display:block;width:0;height:0;top:50%;left:100%;margin-top:-50px;margin-left:1px;border-top:50px solid transparent;border-bottom:50px solid transparent;border-left:30px solid #eee;z-index:1}.sw-theme-arrows>.nav .nav-link.inactive{color:#999;border-color:#f8f8f8;background:#f8f8f8;cursor:not-allowed}.sw-theme-arrows>.nav .nav-link.active{color:#fff;border-color:#5bc0de;background:#5bc0de;cursor:pointer}.sw-theme-arrows>.nav .nav-link.active::after{border-left-color:#5bc0de}.sw-theme-arrows>.nav .nav-link.done{color:#fff;border-color:#5cb85c;background:#5cb85c;cursor:pointer}.sw-theme-arrows>.nav .nav-link.done::after{border-left-color:#5cb85c}.sw-theme-arrows>.nav .nav-link.disabled{color:#eee;border-color:#f9f9f9;background:#f9f9f9;cursor:not-allowed}.sw-theme-arrows>.nav .nav-link.disabled::after{border-left-color:#f9f9f9}.sw-theme-arrows>.nav .nav-link.danger{color:#fff;border-color:#d9534f;background:#d9534f;cursor:pointer}.sw-theme-arrows>.nav .nav-link.danger::after{border-left-color:#d9534f}.sw-theme-arrows.sw-dark{color:rgba(255,255,255,.95);background:#000}.sw-theme-arrows.sw-dark>.nav{border-bottom:1px solid #555}.sw-theme-arrows.sw-dark>.nav .nav-link::after{border-left:30px solid #5f5f5f}.sw-theme-arrows.sw-dark>.nav .nav-link::before{border-left:30px solid #555}.sw-theme-arrows.sw-dark>.nav .nav-link.inactive{color:#fff;border-color:#5f5f5f;background:#5f5f5f}.sw-theme-arrows.sw-dark>.nav .nav-link.inactive::after{border-left-color:#5f5f5f}.sw-theme-arrows.sw-dark>.nav .nav-link.active{color:#fff;border-color:#010506;background:#0a2730}.sw-theme-arrows.sw-dark>.nav .nav-link.active::after{border-left-color:#0a2730}.sw-theme-arrows.sw-dark>.nav .nav-link.done{color:#fff;border-color:#000;background:#000}.sw-theme-arrows.sw-dark>.nav .nav-link.done::after{border-left-color:#000}.sw-theme-arrows.sw-dark>.nav .nav-link.disabled{color:#555!important;border-color:#f9f9f9;background:#474747}.sw-theme-arrows.sw-dark>.nav .nav-link.disabled::after{border-left-color:#474747}.sw-theme-arrows.sw-dark>.nav .nav-link.danger{color:#fff;border-color:#d9534f;background:#d9534f}.sw-theme-arrows.sw-dark>.nav .nav-link.danger::after{border-left-color:#d9534f} \ No newline at end of file diff --git a/dist/css/smart_wizard_dark.css b/dist/css/smart_wizard_dark.css deleted file mode 100644 index 0043e73..0000000 --- a/dist/css/smart_wizard_dark.css +++ /dev/null @@ -1,243 +0,0 @@ -/*! - * jQuery SmartWizard v5 - * jQuery Wizard Plugin - * http://www.techlaboratory.net/smartwizard - * - * Created by Dipu Raj - * http://dipu.me - * - * Licensed under the terms of MIT License - * https://github.com/techlab/jquery-smartwizard/blob/master/LICENSE - */ -/* SmartWizard Base Styles */ -.sw { - position: relative; -} - -.sw *, -.sw *::before, -.sw *::after { - box-sizing: border-box; -} - -.sw > .tab-content { - position: relative; - overflow: hidden; -} - -.sw .toolbar { - padding: .8rem; -} - -.sw .toolbar > .btn { - display: inline-block; - text-decoration: none; - text-align: center; - text-transform: none; - vertical-align: middle; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - margin-left: .2rem; - margin-right: .2rem; - cursor: pointer; -} - -.sw .toolbar > .btn.disabled, .sw .toolbar > .btn:disabled { - opacity: .65; -} - -.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: .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 !important; -} - -.sw > .nav .nav-link.disabled { - color: #ccc !important; - pointer-events: none; - cursor: default; -} - -.sw > .nav .nav-link.hidden { - display: none !important; -} - -.sw.sw-justified > .nav > li, .sw.sw-justified > .nav .nav-link { - flex-basis: 0; - flex-grow: 1; - text-align: center; -} - -.sw.sw-dark { - color: rgba(255, 255, 255, 0.95); - background: #000; -} - -.sw.sw-loading { - -webkit-user-select: none; - -moz-user-select: none; - -ms-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: rgba(255, 255, 255, 0.7); - z-index: 2; - transition: all .2s ease; -} - -.sw.sw-loading::before { - content: ''; - display: inline-block; - position: absolute; - top: 45%; - left: 45%; - width: 2rem; - height: 2rem; - border: 10px solid #f3f3f3; - border-top: 10px solid #3498db; - 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); - } -} - -/* SmartWizard Theme: Dark */ -.sw-theme-dark { - border: 1px solid #eeeeee; - box-shadow: 0 1px 10px rgba(130, 130, 134, 0.1); - color: rgba(255, 255, 255, 0.95); - background: #181c20; -} - -.sw-theme-dark > .tab-content > .tab-pane { - padding: 10px; -} - -.sw-theme-dark .toolbar > .btn { - color: #fff; - background-color: #17a2b8; - border: 1px solid #17a2b8; - padding: .375rem .75rem; - border-radius: .25rem; - font-weight: 400; -} - -.sw-theme-dark > .nav { - background: #0D0F12; -} - -.sw-theme-dark > .nav .nav-link { - position: relative; - height: 100%; - min-height: 100%; -} - -.sw-theme-dark > .nav .nav-link::after { - content: ""; - position: absolute; - height: 2px; - width: 100%; - left: 0px; - bottom: -1px; - background: #999999; - transition: all 250ms ease 0s; - transform: scale(0); -} - -.sw-theme-dark > .nav .nav-link.inactive { - color: #999999; - cursor: not-allowed; -} - -.sw-theme-dark > .nav .nav-link.active { - color: #17a2b8 !important; - cursor: pointer; -} - -.sw-theme-dark > .nav .nav-link.active::after { - background: #17a2b8 !important; - transform: scale(1); -} - -.sw-theme-dark > .nav .nav-link.done { - color: #5cb85c !important; - cursor: pointer; -} - -.sw-theme-dark > .nav .nav-link.done::after { - background: #5cb85c; - transform: scale(1); -} - -.sw-theme-dark > .nav .nav-link.disabled { - color: #f9f9f9 !important; - cursor: not-allowed; -} - -.sw-theme-dark > .nav .nav-link.disabled::after { - background: #f9f9f9; -} - -.sw-theme-dark > .nav .nav-link.danger { - color: #d9534f !important; - cursor: pointer; -} - -.sw-theme-dark > .nav .nav-link.danger::after { - background: #d9534f; -} diff --git a/dist/css/smart_wizard_dark.min.css b/dist/css/smart_wizard_dark.min.css deleted file mode 100644 index 037a20c..0000000 --- a/dist/css/smart_wizard_dark.min.css +++ /dev/null @@ -1,11 +0,0 @@ -/*! - * jQuery SmartWizard v5 - * jQuery Wizard Plugin - * http://www.techlaboratory.net/smartwizard - * - * Created by Dipu Raj - * http://dipu.me - * - * Licensed under the terms of MIT License - * https://github.com/techlab/jquery-smartwizard/blob/master/LICENSE - */.sw{position:relative}.sw *,.sw ::after,.sw ::before{box-sizing:border-box}.sw>.tab-content{position:relative;overflow:hidden}.sw .toolbar{padding:.8rem}.sw .toolbar>.btn{display:inline-block;text-decoration:none;text-align:center;text-transform:none;vertical-align:middle;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;margin-left:.2rem;margin-right:.2rem;cursor:pointer}.sw .toolbar>.btn.disabled,.sw .toolbar>.btn:disabled{opacity:.65}.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:.5rem 1rem;text-decoration:none}.sw>.nav .nav-link:active,.sw>.nav .nav-link:focus,.sw>.nav .nav-link:hover{text-decoration:none}.sw>.nav .nav-link::-moz-focus-inner{border:0!important}.sw>.nav .nav-link.disabled{color:#ccc!important;pointer-events:none;cursor:default}.sw>.nav .nav-link.hidden{display:none!important}.sw.sw-justified>.nav .nav-link,.sw.sw-justified>.nav>li{flex-basis:0;flex-grow:1;text-align:center}.sw.sw-dark{color:rgba(255,255,255,.95);background:#000}.sw.sw-loading{-webkit-user-select:none;-moz-user-select:none;-ms-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:rgba(255,255,255,.7);z-index:2;transition:all .2s ease}.sw.sw-loading::before{content:'';display:inline-block;position:absolute;top:45%;left:45%;width:2rem;height:2rem;border:10px solid #f3f3f3;border-top:10px solid #3498db;border-radius:50%;z-index:10;-webkit-animation:spin 1s linear infinite;animation:spin 1s linear infinite}@-webkit-keyframes spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@keyframes spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}.sw-theme-dark{border:1px solid #eee;box-shadow:0 1px 10px rgba(130,130,134,.1);color:rgba(255,255,255,.95);background:#181c20}.sw-theme-dark>.tab-content>.tab-pane{padding:10px}.sw-theme-dark .toolbar>.btn{color:#fff;background-color:#17a2b8;border:1px solid #17a2b8;padding:.375rem .75rem;border-radius:.25rem;font-weight:400}.sw-theme-dark>.nav{background:#0d0f12}.sw-theme-dark>.nav .nav-link{position:relative;height:100%;min-height:100%}.sw-theme-dark>.nav .nav-link::after{content:"";position:absolute;height:2px;width:100%;left:0;bottom:-1px;background:#999;transition:all 250ms ease 0s;transform:scale(0)}.sw-theme-dark>.nav .nav-link.inactive{color:#999;cursor:not-allowed}.sw-theme-dark>.nav .nav-link.active{color:#17a2b8!important;cursor:pointer}.sw-theme-dark>.nav .nav-link.active::after{background:#17a2b8!important;transform:scale(1)}.sw-theme-dark>.nav .nav-link.done{color:#5cb85c!important;cursor:pointer}.sw-theme-dark>.nav .nav-link.done::after{background:#5cb85c;transform:scale(1)}.sw-theme-dark>.nav .nav-link.disabled{color:#f9f9f9!important;cursor:not-allowed}.sw-theme-dark>.nav .nav-link.disabled::after{background:#f9f9f9}.sw-theme-dark>.nav .nav-link.danger{color:#d9534f!important;cursor:pointer}.sw-theme-dark>.nav .nav-link.danger::after{background:#d9534f} \ No newline at end of file diff --git a/dist/css/smart_wizard_dots.css b/dist/css/smart_wizard_dots.css deleted file mode 100644 index e69de29..0000000 diff --git a/dist/css/smart_wizard_dots.min.css b/dist/css/smart_wizard_dots.min.css deleted file mode 100644 index e69de29..0000000 diff --git a/dist/css/smart_wizard_progress.css b/dist/css/smart_wizard_progress.css deleted file mode 100644 index e69de29..0000000 diff --git a/dist/css/smart_wizard_progress.min.css b/dist/css/smart_wizard_progress.min.css deleted file mode 100644 index e69de29..0000000 diff --git a/dist/js/jquery.smartWizard.js b/dist/js/jquery.smartWizard.js deleted file mode 100644 index 0adda81..0000000 --- a/dist/js/jquery.smartWizard.js +++ /dev/null @@ -1,1053 +0,0 @@ -"use strict"; - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } - -function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } - -/*! - * jQuery SmartWizard v5.1.1 - * The awesome jQuery step wizard plugin - * http://www.techlaboratory.net/jquery-smartwizard - * - * Created by Dipu Raj - * http://dipu.me - * - * @license Licensed under the terms of the MIT License - * https://github.com/techlab/jquery-smartwizard/blob/master/LICENSE - */ -(function (factory) { - if (typeof define === 'function' && define.amd) { - // AMD. Register as an anonymous module. - define(['jquery'], factory); - } else if ((typeof module === "undefined" ? "undefined" : _typeof(module)) === 'object' && module.exports) { - // Node/CommonJS - module.exports = function (root, jQuery) { - if (jQuery === undefined) { - // require('jQuery') returns a factory that requires window to - // build a jQuery instance, we normalize how we use modules - // that require this pattern but the window provided is a noop - // if it's defined (how jquery works) - if (typeof window !== 'undefined') { - jQuery = require('jquery'); - } else { - jQuery = require('jquery')(root); - } - } - - factory(jQuery); - return jQuery; - }; - } else { - // Browser globals - factory(jQuery); - } -})(function ($) { - "use strict"; // Default options - - var defaults = { - selected: 0, - // Initial selected step, 0 = first step - theme: 'default', - // theme for the wizard, related css need to include for other than default theme - justified: true, - // Nav menu justification. true/false - darkMode: false, - // Enable/disable Dark Mode if the theme supports. true/false - autoAdjustHeight: true, - // Automatically adjust content height - cycleSteps: false, - // Allows to cycle the navigation of steps - backButtonSupport: true, - // Enable the back button support - enableURLhash: true, - // Enable selection of the step based on url hash - transition: { - animation: 'none', - // Effect on navigation, none/fade/slide-horizontal/slide-vertical/slide-swing - speed: '400', - // Transion animation speed - easing: '' // Transition animation easing. Not supported without a jQuery easing plugin - - }, - toolbarSettings: { - toolbarPosition: 'bottom', - // none, top, bottom, both - toolbarButtonPosition: 'right', - // left, right, center - showNextButton: true, - // show/hide a Next button - showPreviousButton: true, - // show/hide a Previous button - toolbarExtraButtons: [] // Extra buttons to show on toolbar, array of jQuery input/buttons elements - - }, - anchorSettings: { - anchorClickable: true, - // Enable/Disable anchor navigation - enableAllAnchors: false, - // Activates all anchors clickable all times - markDoneStep: true, - // Add done state on navigation - markAllPreviousStepsAsDone: true, - // When a step selected by url hash, all previous steps are marked done - removeDoneStepOnNavigateBack: false, - // While navigate back done step after active step will be cleared - enableAnchorOnDoneStep: true // Enable/Disable the done steps navigation - - }, - keyboardSettings: { - keyNavigation: true, - // Enable/Disable keyboard navigation(left and right keys are used if enabled) - keyLeft: [37], - // Left key code - keyRight: [39] // Right key code - - }, - lang: { - // Language variables for button - next: 'Next', - previous: 'Previous' - }, - disabledSteps: [], - // Array Steps disabled - errorSteps: [], - // Highlight step with errors - hiddenSteps: [] // Hidden steps - - }; - - var SmartWizard = /*#__PURE__*/function () { - function SmartWizard(element, options) { - _classCallCheck(this, SmartWizard); - - // Merge user settings with default - this.options = $.extend(true, {}, defaults, options); // Main container element - - this.main = $(element); // Navigation bar element - - this.nav = this._getFirstDescendant('.nav'); // Step anchor elements - - this.steps = this.nav.find('.nav-link'); // Content container - - this.container = this._getFirstDescendant('.tab-content'); // Content pages - - this.pages = this.container.children('.tab-pane'); // Assign options - - this._initOptions(); // Initial load - - - this._initLoad(); - } // Initial Load Method - - - _createClass(SmartWizard, [{ - key: "_initLoad", - value: function _initLoad() { - // Clean the elements - this.pages.hide(); - this.steps.removeClass('done active'); // Active step index - - this.current_index = null; // Get the initial step index - - var idx = this._getStepIndex(); // Mark any previous steps done - - - this._setPreviousStepsDone(idx); // Show the initial step - - - this._showStep(idx); - } // Initialize options - - }, { - key: "_initOptions", - value: function _initOptions() { - // Set the elements - this._setElements(); // Add toolbar - - - this._setToolbar(); // Assign plugin events - - - this._setEvents(); - } - }, { - key: "_getFirstDescendant", - value: function _getFirstDescendant(selector) { - // Check for first level element - var elm = this.main.children(selector); - - if (elm.length > 0) { - return elm; - } // Check for second level element - - - this.main.children().each(function (i, n) { - var tmp = $(n).children(selector); - - if (tmp.length > 0) { - elm = tmp; - return false; - } - }); - - if (elm.length > 0) { - return elm; - } // Element not found - - - this._showError("Element not found " + selector); - - return false; - } - }, { - key: "_setElements", - value: function _setElements() { - // Set the main element - this.main.addClass('sw'); - - this._setTheme(this.options.theme); - - this._setJustify(this.options.justified); - - this._setDarkMode(this.options.darkMode); // Set the anchor default style - - - if (this.options.anchorSettings.enableAllAnchors !== true || this.options.anchorSettings.anchorClickable !== true) { - this.steps.addClass('inactive'); - } // Disabled steps - - - this._setCSSClass(this.options.disabledSteps, "disabled"); // Error steps - - - this._setCSSClass(this.options.errorSteps, "danger"); // Hidden steps - - - this._setCSSClass(this.options.hiddenSteps, "hidden"); - } - }, { - key: "_setEvents", - value: function _setEvents() { - var _this = this; - - // Check if event handler already exists - if (this.main.data('click-init')) { - return true; - } // Flag item to prevent attaching handler again - - - this.main.data('click-init', true); // Anchor click event - - $(this.steps).on("click", function (e) { - e.preventDefault(); - - if (_this.options.anchorSettings.anchorClickable === false) { - return true; - } // Get the step index - - - var idx = _this.steps.index(e.currentTarget); - - if (idx === _this.current_index) { - return true; - } - - if (_this.options.anchorSettings.enableAnchorOnDoneStep === false && _this._isDone(idx)) { - return true; - } - - if (_this.options.anchorSettings.enableAllAnchors !== false || _this._isDone(idx)) { - _this._showStep(idx); - } - }); // Next button event - - this.main.find('.sw-btn-next').on("click", function (e) { - e.preventDefault(); - - _this._showNext(); - }); // Previous button event - - this.main.find('.sw-btn-prev').on("click", function (e) { - e.preventDefault(); - - _this._showPrevious(); - }); // Keyboard navigation event - - if (this.options.keyboardSettings.keyNavigation) { - $(document).keyup(function (e) { - _this._keyNav(e); - }); - } // Back/forward browser button event - - - if (this.options.backButtonSupport) { - $(window).on('hashchange', function (e) { - var idx = _this._getURLHashIndex(); - - if (idx !== false) { - e.preventDefault(); - - _this._showStep(idx); - } - }); - } - } - }, { - key: "_setToolbar", - value: function _setToolbar() { - // Skip right away if the toolbar is not enabled - if (this.options.toolbarSettings.toolbarPosition === 'none') { - return true; - } // Append toolbar based on the position - - - switch (this.options.toolbarSettings.toolbarPosition) { - case 'top': - this.container.before(this._createToolbar('top')); - break; - - case 'bottom': - this.container.after(this._createToolbar('bottom')); - break; - - case 'both': - this.container.before(this._createToolbar('top')); - this.container.after(this._createToolbar('bottom')); - break; - - default: - this.container.after(this._createToolbar('bottom')); - break; - } - } - }, { - key: "_createToolbar", - value: function _createToolbar(position) { - // Skip if the toolbar is already created - if (this.main.find('.toolbar-' + position).length > 0) { - return null; - } - - var toolbar = $('
').addClass('toolbar toolbar-' + position).attr('role', 'toolbar'); // Create the toolbar buttons - - var btnNext = this.options.toolbarSettings.showNextButton !== false ? $('').text(this.options.lang.next).addClass('btn sw-btn-next').attr('type', 'button') : null; - var btnPrevious = this.options.toolbarSettings.showPreviousButton !== false ? $('').text(this.options.lang.previous).addClass('btn sw-btn-prev').attr('type', 'button') : null; - toolbar.append(btnPrevious, btnNext); // Add extra toolbar buttons - - if (this.options.toolbarSettings.toolbarExtraButtons && this.options.toolbarSettings.toolbarExtraButtons.length > 0) { - $.each(this.options.toolbarSettings.toolbarExtraButtons, function (_i, n) { - toolbar.append(n.clone(true)); - }); - } - - toolbar.css('text-align', this.options.toolbarSettings.toolbarButtonPosition); - return toolbar; - } - }, { - key: "_showNext", - value: function _showNext() { - var si = this._getNextShowable(this.current_index); - - if (si === false) { - return false; - } - - this._showStep(si); - } - }, { - key: "_showPrevious", - value: function _showPrevious() { - var si = this._getPreviousShowable(this.current_index); - - if (si === false) { - return false; - } - - this._showStep(si); - } - }, { - key: "_showStep", - value: function _showStep(idx) { - // If current step is requested again, skip - if (idx == this.current_index) { - return false; - } // If step not found, skip - - - if (!this.steps.eq(idx)) { - return false; - } // If it is a disabled step, skip - - - if (!this._isShowable(idx)) { - return false; - } // Load step content - - - this._loadStep(idx); - } - }, { - key: "_getNextShowable", - value: function _getNextShowable(idx) { - var si = false; // Find the next showable step - - for (var i = idx + 1; i < this.steps.length; i++) { - if (this._isShowable(i)) { - si = i; - break; - } - } - - if (si !== false && this.steps.length <= si) { - if (!this.options.cycleSteps) { - return false; - } - - si = 0; - } - - return si; - } - }, { - key: "_getPreviousShowable", - value: function _getPreviousShowable(idx) { - var si = false; // Find the previous showable step - - for (var i = idx - 1; i >= 0; i--) { - if (this._isShowable(i)) { - si = i; - break; - } - } - - if (si !== false && 0 > si) { - if (!this.options.cycleSteps) { - return false; - } - - si = this.steps.length - 1; - } - - return si; - } - }, { - key: "_isShowable", - value: function _isShowable(idx) { - var elm = this.steps.eq(idx); - - if (elm.hasClass('disabled') || elm.hasClass('hidden')) { - return false; - } - - return true; - } - }, { - key: "_isDone", - value: function _isDone(idx) { - var elm = this.steps.eq(idx); - - if (elm.hasClass('done')) { - return true; - } - - return false; - } - }, { - key: "_setPreviousStepsDone", - value: function _setPreviousStepsDone(idx) { - if (idx > 0 && this.options.anchorSettings.markDoneStep && this.options.anchorSettings.markAllPreviousStepsAsDone) { - // Mark previous steps of the active step as done - for (var i = idx; i >= 0; i--) { - this._setCSSClass(i, "done"); - } - } - } - }, { - key: "_setCSSClass", - value: function _setCSSClass(idx, cls) { - var _this2 = this; - - if (idx === null) { - return false; - } - - var idxs = $.isArray(idx) ? idx : [idx]; - idxs.map(function (i) { - _this2.steps.eq(i).addClass(cls); - }); - } - }, { - key: "_resetCSSClass", - value: function _resetCSSClass(idx, cls) { - var _this3 = this; - - var idxs = $.isArray(idx) ? idx : [idx]; - idxs.map(function (i) { - _this3.steps.eq(i).removeClass(cls); - }); - } - }, { - key: "_getStepDirection", - value: function _getStepDirection(idx) { - if (this.current_index == null) { - return ''; - } - - return this.current_index < idx ? "forward" : "backward"; - } - }, { - key: "_getStepPosition", - value: function _getStepPosition(idx) { - var stepPosition = 'middle'; - - if (idx === 0) { - stepPosition = 'first'; - } else if (idx === this.steps.length - 1) { - stepPosition = 'last'; - } - - return stepPosition; - } - }, { - key: "_getStepAnchor", - value: function _getStepAnchor(idx) { - if (idx == null) { - return null; - } - - return this.steps.eq(idx); - } - }, { - key: "_getStepPage", - value: function _getStepPage(idx) { - if (idx == null) { - return null; - } - - var anchor = this._getStepAnchor(idx); - - return anchor.length > 0 ? this.main.find(anchor.attr("href")) : null; - } - }, { - key: "_setStepContent", - value: function _setStepContent(idx, html) { - var page = this._getStepPage(idx); - - if (page) { - page.html(html); - } - } - }, { - key: "_loadStep", - value: function _loadStep(idx) { - var _this4 = this; - - // Get current step element - var curStep = this._getStepAnchor(this.current_index); // Get step direction - - - var stepDirection = this._getStepDirection(idx); // Get the direction of step navigation - - - if (this.current_index !== null) { - // Trigger "leaveStep" event - if (this._triggerEvent("leaveStep", [curStep, this.current_index, idx, stepDirection]) === false) { - return false; - } - } // Get next step element - - - var selStep = this._getStepAnchor(idx); // Get the content if used - - - var getStepContent = this._triggerEvent("stepContent", [selStep, idx, stepDirection]); - - if (getStepContent) { - if (_typeof(getStepContent) == "object") { - getStepContent.then(function (res) { - _this4._setStepContent(idx, res); - - _this4._transitStep(idx); - })["catch"](function (err) { - console.error(err); - - _this4._setStepContent(idx, err); - - _this4._transitStep(idx); - }); - } else if (typeof getStepContent == "string") { - this._setStepContent(idx, getStepContent); - - this._transitStep(idx); - } else { - this._transitStep(idx); - } - } else { - this._transitStep(idx); - } - } - }, { - key: "_transitStep", - value: function _transitStep(idx) { - var _this5 = this; - - // Get step to show element - var selStep = this._getStepAnchor(idx); // Change the url hash to new step - - - this._setURLHash(selStep.attr("href")); // Update controls - - - this._setAnchor(idx); // Get the direction of step navigation - - - var stepDirection = this._getStepDirection(idx); // Get the position of step - - - var stepPosition = this._getStepPosition(idx); // Animate the step - - - this._doStepAnimation(idx, function () { - // Fix height with content - _this5._fixHeight(idx); // Trigger "showStep" event - - - _this5._triggerEvent("showStep", [selStep, _this5.current_index, stepDirection, stepPosition]); - }); // Update the current index - - - this.current_index = idx; // Set the buttons based on the step - - this._setButtons(idx); - } - }, { - key: "_doStepAnimation", - value: function _doStepAnimation(idx, callback) { - var _this6 = this; - - // Get current step element - var curPage = this._getStepPage(this.current_index); // Get next step element - - - var selPage = this._getStepPage(idx); // Get the animation - - - var animation = this.options.transition.animation.toLowerCase(); // Complete any ongoing animations - - this._stopAnimations(); - - switch (animation) { - case 'slide-horizontal': - case 'slide-h': - // horizontal slide - var containerWidth = this.container.width(); - var curLastLeft = containerWidth; - var nextFirstLeft = containerWidth * -2; // Forward direction - - if (idx > this.current_index) { - curLastLeft = containerWidth * -1; - nextFirstLeft = containerWidth; - } // First load set the container width - - - if (this.current_index == null) { - this.container.height(selPage.outerHeight()); - } - - var css_pos, css_left; - - if (curPage) { - css_pos = curPage.css("position"); - css_left = curPage.css("left"); - curPage.css("position", 'absolute').css("left", 0).animate({ - left: curLastLeft - }, this.options.transition.speed, this.options.transition.easing, function () { - $(this).hide(); - curPage.css("position", css_pos).css("left", css_left); - }); - } - - css_pos = selPage.css("position"); - css_left = selPage.css("left"); - selPage.css("position", 'absolute').css("left", nextFirstLeft).outerWidth(containerWidth).show().animate({ - left: 0 - }, this.options.transition.speed, this.options.transition.easing, function () { - selPage.css("position", css_pos).css("left", css_left); - callback(); - }); - break; - - case 'slide-vertical': - case 'slide-v': - // vertical slide - var containerHeight = this.container.height(); - var curLastTop = containerHeight; - var nextFirstTop = containerHeight * -2; // Forward direction - - if (idx > this.current_index) { - curLastTop = containerHeight * -1; - nextFirstTop = containerHeight; - } - - var css_vpos, css_vtop; - - if (curPage) { - css_vpos = curPage.css("position"); - css_vtop = curPage.css("top"); - curPage.css("position", 'absolute').css("top", 0).animate({ - top: curLastTop - }, this.options.transition.speed, this.options.transition.easing, function () { - $(this).hide(); - curPage.css("position", css_vpos).css("top", css_vtop); - }); - } - - css_vpos = selPage.css("position"); - css_vtop = selPage.css("top"); - selPage.css("position", 'absolute').css("top", nextFirstTop).show().animate({ - top: 0 - }, this.options.transition.speed, this.options.transition.easing, function () { - selPage.css("position", css_vpos).css("top", css_vtop); - callback(); - }); - break; - - case 'slide-swing': - case 'slide-s': - // normal slide - if (curPage) { - curPage.slideUp('fast', this.options.transition.easing, function () { - selPage.slideDown(_this6.options.transition.speed, _this6.options.transition.easing, function () { - callback(); - }); - }); - } else { - selPage.slideDown(this.options.transition.speed, this.options.transition.easing, function () { - callback(); - }); - } - - break; - - case 'fade': - // normal fade - if (curPage) { - curPage.fadeOut('fast', this.options.transition.easing, function () { - selPage.fadeIn('fast', _this6.options.transition.easing, function () { - callback(); - }); - }); - } else { - selPage.fadeIn(this.options.transition.speed, this.options.transition.easing, function () { - callback(); - }); - } - - break; - - default: - if (curPage) { - curPage.hide(); - } - - selPage.show(); - callback(); - break; - } - } - }, { - key: "_stopAnimations", - value: function _stopAnimations() { - this.pages.finish(); - this.container.finish(); - } - }, { - key: "_setAnchor", - value: function _setAnchor(idx) { - // Current step anchor > Remove other classes and add done class - this._resetCSSClass(this.current_index, "active"); - - if (this.options.anchorSettings.markDoneStep !== false && this.current_index !== null) { - this._setCSSClass(this.current_index, "done"); - - if (this.options.anchorSettings.removeDoneStepOnNavigateBack !== false && this._getStepDirection(idx) === 'backward') { - this._resetCSSClass(this.current_index, "done"); - } - } // Next step anchor > Remove other classes and add active class - - - this._resetCSSClass(idx, "done"); - - this._setCSSClass(idx, "active"); - } - }, { - key: "_setButtons", - value: function _setButtons(idx) { - // Previous/Next Button enable/disable based on step - if (!this.options.cycleSteps) { - this.main.find('.sw-btn-prev').removeClass("disabled"); - this.main.find('.sw-btn-next').removeClass("disabled"); - - switch (this._getStepPosition(idx)) { - case 'first': - this.main.find('.sw-btn-prev').addClass("disabled"); - break; - - case 'last': - this.main.find('.sw-btn-next').addClass("disabled"); - break; - - default: - if (this._getNextShowable(idx) === false) { - this.main.find('.sw-btn-next').addClass("disabled"); - } - - if (this._getPreviousShowable(idx) === false) { - this.main.find('.sw-btn-prev').addClass("disabled"); - } - - break; - } - } - } - }, { - key: "_getStepIndex", - value: function _getStepIndex() { - // Get selected step from the url - var idx = this._getURLHashIndex(); - - return idx === false ? this.options.selected : idx; - } - }, { - key: "_setTheme", - value: function _setTheme(theme) { - this.main.removeClass(function (index, className) { - return (className.match(/(^|\s)sw-theme-\S+/g) || []).join(' '); - }).addClass('sw-theme-' + theme); - } - }, { - key: "_setJustify", - value: function _setJustify(justified) { - if (justified === true) { - this.main.addClass('sw-justified'); - } else { - this.main.removeClass('sw-justified'); - } - } - }, { - key: "_setDarkMode", - value: function _setDarkMode(darkMode) { - if (darkMode === true) { - this.main.addClass('sw-dark'); - } else { - this.main.removeClass('sw-dark'); - } - } // HELPER FUNCTIONS - - }, { - key: "_keyNav", - value: function _keyNav(e) { - // Keyboard navigation - if ($.inArray(e.which, this.options.keyboardSettings.keyLeft) > -1) { - // left - this._showPrevious(); - - e.preventDefault(); - } else if ($.inArray(e.which, this.options.keyboardSettings.keyRight) > -1) { - // right - this._showNext(); - - e.preventDefault(); - } else { - return; // exit this handler for other keys - } - } - }, { - key: "_fixHeight", - value: function _fixHeight(idx) { - // Auto adjust height of the container - if (this.options.autoAdjustHeight) { - var selPage = this._getStepPage(idx); - - this.container.finish().animate({ - height: selPage.outerHeight() - }, this.options.transition.speed); - } - } - }, { - key: "_triggerEvent", - value: function _triggerEvent(name, params) { - // Trigger an event - var e = $.Event(name); - this.main.trigger(e, params); - - if (e.isDefaultPrevented()) { - return false; - } - - return e.result; - } - }, { - key: "_setURLHash", - value: function _setURLHash(hash) { - if (this.options.enableURLhash && window.location.hash !== hash) { - history.pushState(null, null, hash); - } - } - }, { - key: "_getURLHashIndex", - value: function _getURLHashIndex() { - if (this.options.enableURLhash) { - // Get step number from url hash if available - var hash = window.location.hash; - - if (hash.length > 0) { - var elm = this.nav.find("a[href*='" + hash + "']"); - - if (elm.length > 0) { - return this.steps.index(elm); - } - } - } - - return false; - } - }, { - key: "_loader", - value: function _loader(action) { - switch (action) { - case 'show': - this.main.addClass('sw-loading'); - break; - - case 'hide': - this.main.removeClass('sw-loading'); - break; - - default: - this.main.toggleClass('sw-loading'); - } - } - }, { - key: "_showError", - value: function _showError(msg) { - console.error(msg); - } // PUBLIC FUNCTIONS - - }, { - key: "goToStep", - value: function goToStep(stepIndex) { - this._showStep(stepIndex); - } - }, { - key: "next", - value: function next() { - this._showNext(); - } - }, { - key: "prev", - value: function prev() { - this._showPrevious(); - } - }, { - key: "reset", - value: function reset() { - // Reset all - this._setURLHash('#'); - - this._initOptions(); - - this._initLoad(); - } - }, { - key: "stepState", - value: function stepState(stepArray, state) { - if (!stepArray) { - return false; - } - - switch (state) { - case 'disable': - this._setCSSClass(stepArray, 'disabled'); - - break; - - case 'enable': - this._resetCSSClass(stepArray, 'disabled'); - - break; - - case 'hide': - this._setCSSClass(stepArray, 'hidden'); - - break; - - case 'show': - this._resetCSSClass(stepArray, 'hidden'); - - break; - - case 'error-on': - this._setCSSClass(stepArray, 'danger'); - - break; - - case 'error-off': - this._resetCSSClass(stepArray, 'danger'); - - break; - } - } - }, { - key: "setOptions", - value: function setOptions(options) { - this.options = $.extend(true, {}, this.options, options); - - this._initOptions(); - } - }, { - key: "getStepIndex", - value: function getStepIndex() { - return this.current_index; - } - }, { - key: "loader", - value: function loader(state) { - if (state === "show") { - this.main.addClass('sw-loading'); - } else { - this.main.removeClass('sw-loading'); - } - } - }]); - - return SmartWizard; - }(); // Wrapper for the plugin - - - $.fn.smartWizard = function (options) { - if (options === undefined || _typeof(options) === 'object') { - return this.each(function () { - if (!$.data(this, "smartWizard")) { - $.data(this, "smartWizard", new SmartWizard(this, options)); - } - }); - } else if (typeof options === 'string' && options[0] !== '_' && options !== 'init') { - var instance = $.data(this[0], 'smartWizard'); - - if (options === 'destroy') { - $.data(this, 'smartWizard', null); - } - - if (instance instanceof SmartWizard && typeof instance[options] === 'function') { - return instance[options].apply(instance, Array.prototype.slice.call(arguments, 1)); - } else { - return this; - } - } - }; -}); \ No newline at end of file diff --git a/dist/js/jquery.smartWizard.min.js b/dist/js/jquery.smartWizard.min.js deleted file mode 100644 index bdbcf7e..0000000 --- a/dist/js/jquery.smartWizard.min.js +++ /dev/null @@ -1,13 +0,0 @@ -"use strict";function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,e){for(var s=0;s").addClass("toolbar toolbar-"+t).attr("role","toolbar"),e=!1!==this.options.toolbarSettings.showNextButton?v("").text(this.options.lang.next).addClass("btn sw-btn-next").attr("type","button"):null,i=!1!==this.options.toolbarSettings.showPreviousButton?v("").text(this.options.lang.previous).addClass("btn sw-btn-prev").attr("type","button"):null;return s.append(i,e),this.options.toolbarSettings.toolbarExtraButtons&&0this.current_index&&(l=-1*h,u=h),null==this.current_index&&this.container.height(n.outerHeight()),i&&(a=i.css("position"),r=i.css("left"),i.css("position","absolute").css("left",0).animate({left:l},this.options.transition.speed,this.options.transition.easing,function(){v(this).hide(),i.css("position",a).css("left",r)})),a=n.css("position"),r=n.css("left"),n.css("position","absolute").css("left",u).outerWidth(h).show().animate({left:0},this.options.transition.speed,this.options.transition.easing,function(){n.css("position",a).css("left",r),e()});break;case"slide-vertical":case"slide-v":var c,d,p=this.container.height(),f=p,_=-2*p;t>this.current_index&&(f=-1*p,_=p),i&&(c=i.css("position"),d=i.css("top"),i.css("position","absolute").css("top",0).animate({top:f},this.options.transition.speed,this.options.transition.easing,function(){v(this).hide(),i.css("position",c).css("top",d)})),c=n.css("position"),d=n.css("top"),n.css("position","absolute").css("top",_).show().animate({top:0},this.options.transition.speed,this.options.transition.easing,function(){n.css("position",c).css("top",d),e()});break;case"slide-swing":case"slide-s":i?i.slideUp("fast",this.options.transition.easing,function(){n.slideDown(s.options.transition.speed,s.options.transition.easing,function(){e()})}):n.slideDown(this.options.transition.speed,this.options.transition.easing,function(){e()});break;case"fade":i?i.fadeOut("fast",this.options.transition.easing,function(){n.fadeIn("fast",s.options.transition.easing,function(){e()})}):n.fadeIn(this.options.transition.speed,this.options.transition.easing,function(){e()});break;default:i&&i.hide(),n.show(),e()}}},{key:"_stopAnimations",value:function(){this.pages.finish(),this.container.finish()}},{key:"_setAnchor",value:function(t){this._resetCSSClass(this.current_index,"active"),!1!==this.options.anchorSettings.markDoneStep&&null!==this.current_index&&(this._setCSSClass(this.current_index,"done"),!1!==this.options.anchorSettings.removeDoneStepOnNavigateBack&&"backward"===this._getStepDirection(t)&&this._resetCSSClass(this.current_index,"done")),this._resetCSSClass(t,"done"),this._setCSSClass(t,"active")}},{key:"_setButtons",value:function(t){if(!this.options.cycleSteps)switch(this.main.find(".sw-btn-prev").removeClass("disabled"),this.main.find(".sw-btn-next").removeClass("disabled"),this._getStepPosition(t)){case"first":this.main.find(".sw-btn-prev").addClass("disabled");break;case"last":this.main.find(".sw-btn-next").addClass("disabled");break;default:!1===this._getNextShowable(t)&&this.main.find(".sw-btn-next").addClass("disabled"),!1===this._getPreviousShowable(t)&&this.main.find(".sw-btn-prev").addClass("disabled")}}},{key:"_getStepIndex",value:function(){var t=this._getURLHashIndex();return!1===t?this.options.selected:t}},{key:"_setTheme",value:function(t){this.main.removeClass(function(t,e){return(e.match(/(^|\s)sw-theme-\S+/g)||[]).join(" ")}).addClass("sw-theme-"+t)}},{key:"_setJustify",value:function(t){!0===t?this.main.addClass("sw-justified"):this.main.removeClass("sw-justified")}},{key:"_setDarkMode",value:function(t){!0===t?this.main.addClass("sw-dark"):this.main.removeClass("sw-dark")}},{key:"_keyNav",value:function(t){if(-1