UNPKG

smokejs

Version:

Smoke form validation and components for Bootstrap

332 lines (287 loc) 7.14 kB
/** * Smoke form validation and components for Bootstrap * @package Smoke * @version 3.0 * @link https://github.com/alfredobarron/smoke The Smoke GitHub project * @author Alfredo Barron <alfredobarronc@gmail.com> * @copyright 2015 Alfredo Barron * @license https://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License * @note This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. */ /* |- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | Validate |- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ .has-feedback .smk-error-msg{ position: absolute; right: 0; font-size: 12px; margin-top: 0; margin-bottom: 0; } .smk-select .smk-error-icon{ right: 10px; } .smk-checkbox .smk-error-msg, .smk-radio .smk-error-msg{ margin-top: -12px; } /* form-horizontal */ .form-horizontal .has-feedback .smk-error-msg { right: 15px; } .form-horizontal .smk-select .smk-error-icon{ right: 25px; } .form-horizontal .smk-checkbox .smk-error-msg, .form-horizontal .smk-radio .smk-error-msg{ margin-top: 0; } /* |- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | Alerts |- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ .smk-alert-content{ position: fixed; width: 360px; z-index: 2060; } .smk-alert-content-top-right{ top: 20px; right: 20px; } .smk-alert-content-top-center{ top: 20px; margin: 0 0 0 -180px; left: 50%; } .smk-alert-content-top-left{ top: 20px; left: 20px; } .smk-alert-content-bottom-right{ bottom: 0; right: 20px; } .smk-alert-content-bottom-center{ bottom: 0; margin: 0 0 0 -180px; left: 50%; } .smk-alert-content-bottom-left{ bottom: 0; left: 20px; } .smk-alert { opacity: 0; filter: alpha(opacity=0); } .smk-alert .glyphicon { font-size: 20px; float: left; margin-right: 14px; } .smk-alert p{ display: table; } /* |- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | Confirmation |- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ .smk-confirm-back { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 1030; } .smk-confirm, .smk-prompt { position: absolute; opacity: 0; filter: alpha(opacity=0); top: -500px; right: 0; left: 0; margin: auto; max-width: 440px; z-index: 2060; box-shadow: 0 5px 25px -1px #333; -webkit-box-shadow: 0 5px 25px -1px #333; /* Chrome & Safari */ -moz-box-shadow: 0 5px 25px -1px #333; /* Firefox */ } .smk-confirm:focus, .smk-prompt:focus { outline: 0; box-shadow: 0 5px 25px -1px #333; -webkit-box-shadow: 0 5px 25px -1px #333; /* Chrome & Safari */ -moz-box-shadow: 0 5px 25px -1px #333; /* Firefox */ } .smk-confirm .panel-body, .smk-prompt .panel-body { padding-bottom: 30px; padding-top: 30px; } /* |- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | Progress |- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ .smk-progressbar{ left: 0; top: 0; right: 0; bottom: 0; z-index: 10000; } .smk-progressbar .progress { width: 100%; height: 4px; background-color: transparent; border-radius: 0; margin-bottom: 0; } .smk-progressbar-content{ position: absolute; left: 0; top: 0; right: 0; bottom: 0; display:-webkit-flex; display:flex; -webkit-justify-content:center; justify-content:center; -webkit-align-items:center; align-items:center; } /* |- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | Panel |- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ .panel-full{ position: fixed; left: 0; top: 0; width: 100%; height: 100%; border-radius: 0; z-index: 2050; } .panel-full>.panel-heading{ border-radius: 0; } .smk-btn-group-panel-title{ top:-22px; right: -4px } .smk-btn-group-panel{ top:-4px; right: -4px } a.smk-min, a.smk-min:focus, a.smk-remove, a.smk-remove:focus, a.smk-full, a.smk-full:focus { color: inherit; } /* |- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | Show Pass |- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ .smk-show-pass { position: relative; } .smk-btn-show-pass { position: absolute; right: 0; top: 25px; z-index: 2; display: block; width: 34px; height: 34px; line-height: 34px; text-align: center; } /* |- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | Helper Styles |- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ /* |- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | Elimina los spin del input number |- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ /*input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }*/ /* |- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | Al agregar padding a un div evita que su tamaño crezca |- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ .smk-sizing{ box-sizing: border-box; } /* Transition */ .smk-transition1 { transition: all .2s ease-in-out; -webkit-transition: all .2s ease-in-out; /* Chrome & Safari */ -moz-transition: all .2s ease-in-out; /* Firefox */ -o-transition: all .2s ease-in-out; /* Opera */ -ms-transition: all .2s ease-in-out; /* IE 9 */ } .smk-transition2 { transition: all .5s ease-in-out; -webkit-transition: all .5s ease-in-out; /* Chrome & Safari */ -moz-transition: all .5s ease-in-out; /* Firefox */ -o-transition: all .5s ease-in-out; /* Opera */ -ms-transition: all .5s ease-in-out; /* IE 9 */ } /* Shadow */ .smk-shadow { box-shadow: 3px 3px 5px 6px #ccc; -webkit-box-shadow: 3px 3px 5px 6px #ccc; /* Chrome & Safari */ -moz-box-shadow: 3px 3px 5px 6px #ccc; /* Firefox */ } /* Animations */ .smk-animation { animation: fadeOut 3.5s; -webkit-animation: fadeOut 3.5s; /* Chrome & Safari */ -moz-animation: fadeOut 3.5s; /* Firefox */ -o-animation: fadeOut 3.5s; /* Opera */ -ms-animation: fadeOut 3.5s; /* IE 9 */ } /* Translate */ .smk-translate { transform: translate(50px,100px); -webkit-transform: translate(50px,100px); /* Chrome & Safari */ -moz-transform: translate(50px,100px); /* Firefox */ -o-transform: translate(50px,100px); /* Opera */ -ms-transform: translate(50px,100px); /* IE 9 */ } /* Rotate */ .smk-rotate { transform: rotate(7deg); -webkit-transform: rotate(7deg); /* Chrome & Safari */ -moz-transition: rotate(7deg); /* Firefox */ -o-transition: rotate(7deg); /* Opera */ -ms-transform: rotate(7deg); /* IE 9 */ }