This commit is contained in:
Kevin Ross 2015-12-02 15:03:02 -06:00
parent 80fb3a75be
commit e9f523476d
53 changed files with 18148 additions and 743 deletions

View File

@ -447,14 +447,14 @@ html {
width: device-width;
}
/* line 60, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_reboot.scss */
/* line 62, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_reboot.scss */
html {
font-size: 16px;
-webkit-tap-highlight-color: transparent;
}
/* line 67, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_reboot.scss */
/* line 69, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_reboot.scss */
body {
font-family: "Roboto", "Helvetica", "Arial", sans-serif;
font-size: 1rem;
@ -463,33 +463,33 @@ body {
background-color: #eee;
}
/* line 87, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_reboot.scss */
/* line 89, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_reboot.scss */
h1, h2, h3, h4, h5, h6 {
margin-top: 0;
margin-bottom: .5rem;
}
/* line 96, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_reboot.scss */
/* line 98, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_reboot.scss */
p {
margin-top: 0;
margin-bottom: 1rem;
}
/* line 102, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_reboot.scss */
/* line 104, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_reboot.scss */
abbr[title],
abbr[data-original-title] {
cursor: help;
border-bottom: 1px dotted #818a91;
}
/* line 109, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_reboot.scss */
/* line 111, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_reboot.scss */
address {
margin-bottom: 1rem;
font-style: normal;
line-height: inherit;
}
/* line 115, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_reboot.scss */
/* line 117, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_reboot.scss */
ol,
ul,
dl {
@ -497,7 +497,7 @@ dl {
margin-bottom: 1rem;
}
/* line 122, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_reboot.scss */
/* line 124, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_reboot.scss */
ol ol,
ul ul,
ol ul,
@ -505,23 +505,23 @@ ul ol {
margin-bottom: 0;
}
/* line 129, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_reboot.scss */
/* line 131, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_reboot.scss */
dt {
font-weight: bold;
}
/* line 133, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_reboot.scss */
/* line 135, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_reboot.scss */
dd {
margin-bottom: .5rem;
margin-left: 0;
}
/* line 138, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_reboot.scss */
/* line 140, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_reboot.scss */
blockquote {
margin: 0 0 1rem;
}
/* line 147, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_reboot.scss */
/* line 149, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_reboot.scss */
a {
color: #009688;
text-decoration: none;
@ -533,35 +533,35 @@ a:focus, a:hover {
text-decoration: underline;
}
/* line 156, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_reboot.scss */
/* line 158, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_reboot.scss */
a:focus {
outline: thin dotted;
outline: 5px auto -webkit-focus-ring-color;
outline-offset: -2px;
}
/* line 166, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_reboot.scss */
/* line 168, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_reboot.scss */
pre {
margin-top: 0;
margin-bottom: 1rem;
}
/* line 178, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_reboot.scss */
/* line 180, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_reboot.scss */
figure {
margin: 0 0 1rem;
}
/* line 190, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_reboot.scss */
/* line 192, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_reboot.scss */
img {
vertical-align: middle;
}
/* line 205, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_reboot.scss */
/* line 207, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_reboot.scss */
[role="button"] {
cursor: pointer;
}
/* line 220, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_reboot.scss */
/* line 222, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_reboot.scss */
a,
area,
button,
@ -575,12 +575,12 @@ textarea {
touch-action: manipulation;
}
/* line 236, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_reboot.scss */
/* line 238, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_reboot.scss */
table {
background-color: transparent;
}
/* line 241, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_reboot.scss */
/* line 243, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_reboot.scss */
caption {
padding-top: .75rem;
padding-bottom: .75rem;
@ -589,18 +589,18 @@ caption {
caption-side: bottom;
}
/* line 249, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_reboot.scss */
/* line 251, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_reboot.scss */
th {
text-align: left;
}
/* line 259, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_reboot.scss */
/* line 261, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_reboot.scss */
label {
display: inline-block;
margin-bottom: .5rem;
}
/* line 265, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_reboot.scss */
/* line 267, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_reboot.scss */
input,
button,
select,
@ -610,12 +610,12 @@ textarea {
border-radius: 0;
}
/* line 279, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_reboot.scss */
/* line 281, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_reboot.scss */
textarea {
resize: vertical;
}
/* line 284, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_reboot.scss */
/* line 286, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_reboot.scss */
fieldset {
min-width: 0;
padding: 0;
@ -623,7 +623,7 @@ fieldset {
border: 0;
}
/* line 295, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_reboot.scss */
/* line 297, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_reboot.scss */
legend {
display: block;
width: 100%;
@ -633,19 +633,19 @@ legend {
line-height: inherit;
}
/* line 306, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_reboot.scss */
/* line 308, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_reboot.scss */
input[type="search"] {
-webkit-box-sizing: inherit;
box-sizing: inherit;
-webkit-appearance: none;
}
/* line 317, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_reboot.scss */
/* line 319, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_reboot.scss */
output {
display: inline-block;
}
/* line 325, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_reboot.scss */
/* line 327, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_reboot.scss */
[hidden] {
display: none !important;
}
@ -4331,21 +4331,26 @@ input[type="button"].btn-block {
flex: 1;
}
/* line 44, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_input-group.scss */
/* line 53, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/mixins/_hover.scss */
.input-group .form-control:focus, .input-group .form-control:active, .input-group .form-control:hover {
z-index: 3;
}
/* line 48, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_input-group.scss */
.input-group-addon:not(:first-child):not(:last-child),
.input-group-btn:not(:first-child):not(:last-child),
.input-group .form-control:not(:first-child):not(:last-child) {
border-radius: 0;
}
/* line 49, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_input-group.scss */
/* line 53, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_input-group.scss */
.input-group-addon,
.input-group-btn {
white-space: nowrap;
vertical-align: middle;
}
/* line 82, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_input-group.scss */
/* line 86, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_input-group.scss */
.input-group-addon {
padding: .375rem .75rem;
font-size: 1rem;
@ -4358,7 +4363,7 @@ input[type="button"].btn-block {
border-radius: .25rem;
}
/* line 94, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_input-group.scss */
/* line 98, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_input-group.scss */
.input-group-addon.form-control-sm,
.input-group-sm > .input-group-addon,
.input-group-sm > .input-group-btn > .input-group-addon.btn {
@ -4367,7 +4372,7 @@ input[type="button"].btn-block {
border-radius: .2rem;
}
/* line 99, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_input-group.scss */
/* line 103, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_input-group.scss */
.input-group-addon.form-control-lg,
.input-group-lg > .input-group-addon,
.input-group-lg > .input-group-btn > .input-group-addon.btn {
@ -4376,13 +4381,13 @@ input[type="button"].btn-block {
border-radius: .3rem;
}
/* line 106, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_input-group.scss */
/* line 110, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_input-group.scss */
.input-group-addon input[type="radio"],
.input-group-addon input[type="checkbox"] {
margin-top: 0;
}
/* line 117, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_input-group.scss */
/* line 121, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_input-group.scss */
.input-group .form-control:first-child,
.input-group-addon:first-child,
.input-group-btn:first-child > .btn,
@ -4394,12 +4399,12 @@ input[type="button"].btn-block {
border-bottom-right-radius: 0;
}
/* line 126, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_input-group.scss */
/* line 130, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_input-group.scss */
.input-group-addon:first-child {
border-right: 0;
}
/* line 129, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_input-group.scss */
/* line 133, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_input-group.scss */
.input-group .form-control:last-child,
.input-group-addon:last-child,
.input-group-btn:last-child > .btn,
@ -4411,46 +4416,54 @@ input[type="button"].btn-block {
border-bottom-left-radius: 0;
}
/* line 138, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_input-group.scss */
/* line 142, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_input-group.scss */
.input-group-addon:last-child {
border-left: 0;
}
/* line 147, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_input-group.scss */
/* line 151, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_input-group.scss */
.input-group-btn {
position: relative;
font-size: 0;
white-space: nowrap;
}
/* line 156, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_input-group.scss */
/* line 160, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_input-group.scss */
.input-group-btn > .btn {
position: relative;
}
/* line 158, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_input-group.scss */
/* line 162, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_input-group.scss */
.input-group-btn > .btn + .btn {
margin-left: -1px;
}
/* line 53, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/mixins/_hover.scss */
.input-group-btn > .btn:focus, .input-group-btn > .btn:active, .input-group-btn > .btn:hover {
z-index: 2;
z-index: 3;
}
/* line 169, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_input-group.scss */
/* line 173, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_input-group.scss */
.input-group-btn:first-child > .btn,
.input-group-btn:first-child > .btn-group {
margin-right: -1px;
}
/* line 175, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_input-group.scss */
/* line 179, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_input-group.scss */
.input-group-btn:last-child > .btn,
.input-group-btn:last-child > .btn-group {
z-index: 2;
margin-left: -1px;
}
/* line 53, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/mixins/_hover.scss */
.input-group-btn:last-child > .btn:focus, .input-group-btn:last-child > .btn:active, .input-group-btn:last-child > .btn:hover,
.input-group-btn:last-child > .btn-group:focus,
.input-group-btn:last-child > .btn-group:active,
.input-group-btn:last-child > .btn-group:hover {
z-index: 3;
}
/* line 10, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_custom-forms.scss */
.c-input {
position: relative;
@ -4629,7 +4642,7 @@ input[type="button"].btn-block {
-ms-user-select: none;
user-select: none;
background-color: #fff;
border: .075rem solid #ddd;
border: 1px solid #ddd;
border-radius: .25rem;
}
@ -4652,7 +4665,7 @@ input[type="button"].btn-block {
color: #555;
content: "Browse";
background-color: #eee;
border: .075rem solid #ddd;
border: 1px solid #ddd;
border-radius: 0 .25rem .25rem 0;
}
@ -4686,11 +4699,17 @@ input[type="button"].btn-block {
}
/* line 35, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_nav.scss */
.nav-inline .nav-item {
display: inline-block;
}
/* line 39, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_nav.scss */
.nav-inline .nav-item + .nav-item,
.nav-inline .nav-link + .nav-link {
margin-left: 1rem;
}
/* line 45, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_nav.scss */
/* line 50, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_nav.scss */
.nav-tabs {
border-bottom: 1px solid #ddd;
}
@ -4702,18 +4721,18 @@ input[type="button"].btn-block {
content: "";
}
/* line 49, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_nav.scss */
/* line 54, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_nav.scss */
.nav-tabs .nav-item {
float: left;
margin-bottom: -1px;
}
/* line 54, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_nav.scss */
/* line 59, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_nav.scss */
.nav-tabs .nav-item + .nav-item {
margin-left: .2rem;
}
/* line 59, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_nav.scss */
/* line 64, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_nav.scss */
.nav-tabs .nav-link {
display: block;
padding: .5em 1em;
@ -4750,17 +4769,17 @@ input[type="button"].btn-block {
content: "";
}
/* line 96, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_nav.scss */
/* line 101, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_nav.scss */
.nav-pills .nav-item {
float: left;
}
/* line 99, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_nav.scss */
/* line 104, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_nav.scss */
.nav-pills .nav-item + .nav-item {
margin-left: .2rem;
}
/* line 104, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_nav.scss */
/* line 109, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_nav.scss */
.nav-pills .nav-link {
display: block;
padding: .5em 1em;
@ -4777,29 +4796,29 @@ input[type="button"].btn-block {
background-color: #009688;
}
/* line 121, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_nav.scss */
/* line 126, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_nav.scss */
.nav-stacked .nav-item {
display: block;
float: none;
}
/* line 125, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_nav.scss */
/* line 130, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_nav.scss */
.nav-stacked .nav-item + .nav-item {
margin-top: .2rem;
margin-left: 0;
}
/* line 139, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_nav.scss */
/* line 144, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_nav.scss */
.tab-content > .tab-pane {
display: none;
}
/* line 142, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_nav.scss */
/* line 147, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_nav.scss */
.tab-content > .active {
display: block;
}
/* line 152, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_nav.scss */
/* line 157, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_nav.scss */
.nav-tabs .dropdown-menu {
margin-top: -1px;
border-top-left-radius: 0;
@ -5160,7 +5179,7 @@ input[type="button"].btn-block {
/* line 122, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_card.scss */
.card-inverse .card-header,
.card-inverse .card-footer {
border-bottom: .075rem solid rgba(255, 255, 255, .2);
border-bottom: .0625rem solid rgba(255, 255, 255, .2);
}
/* line 126, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_card.scss */
@ -5642,19 +5661,19 @@ a.label:focus, a.label:hover {
border-radius: .3rem;
}
/* line 8, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_jumbotron.scss */
.jumbotron-hr {
border-top-color: #d0d5d8;
}
@media (min-width: 544px) {
/* line 13, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_jumbotron.scss */
/* line 1, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_jumbotron.scss */
.jumbotron {
padding: 4rem 2rem;
}
}
/* line 18, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_jumbotron.scss */
/* line 12, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_jumbotron.scss */
.jumbotron-hr {
border-top-color: #d0d5d8;
}
/* line 16, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_jumbotron.scss */
.jumbotron-fluid {
padding-right: 0;
padding-left: 0;
@ -7098,17 +7117,82 @@ button.close {
margin-left: auto;
}
/* line 13, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_utilities.scss */
.pull-right {
float: right !important;
}
/* line 17, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_utilities.scss */
.pull-left {
/* line 15, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_utilities.scss */
.pull-xs-left {
float: left !important;
}
/* line 26, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_utilities.scss */
/* line 18, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_utilities.scss */
.pull-xs-right {
float: right !important;
}
/* line 21, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_utilities.scss */
.pull-xs-none {
float: none !important;
}
@media (min-width: 544px) {
/* line 15, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_utilities.scss */
.pull-sm-left {
float: left !important;
}
/* line 18, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_utilities.scss */
.pull-sm-right {
float: right !important;
}
/* line 21, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_utilities.scss */
.pull-sm-none {
float: none !important;
}
}
@media (min-width: 768px) {
/* line 15, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_utilities.scss */
.pull-md-left {
float: left !important;
}
/* line 18, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_utilities.scss */
.pull-md-right {
float: right !important;
}
/* line 21, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_utilities.scss */
.pull-md-none {
float: none !important;
}
}
@media (min-width: 992px) {
/* line 15, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_utilities.scss */
.pull-lg-left {
float: left !important;
}
/* line 18, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_utilities.scss */
.pull-lg-right {
float: right !important;
}
/* line 21, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_utilities.scss */
.pull-lg-none {
float: none !important;
}
}
@media (min-width: 1200px) {
/* line 15, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_utilities.scss */
.pull-xl-left {
float: left !important;
}
/* line 18, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_utilities.scss */
.pull-xl-right {
float: right !important;
}
/* line 21, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_utilities.scss */
.pull-xl-none {
float: none !important;
}
}
/* line 32, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_utilities.scss */
.sr-only {
position: absolute;
width: 1px;
@ -7130,12 +7214,12 @@ button.close {
clip: auto;
}
/* line 34, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_utilities.scss */
/* line 40, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_utilities.scss */
.invisible {
visibility: hidden !important;
}
/* line 38, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_utilities.scss */
/* line 44, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_utilities.scss */
.text-hide {
font: "0/0" a;
color: transparent;
@ -7144,129 +7228,114 @@ button.close {
border: 0;
}
/* line 49, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_utilities.scss */
.text-left {
text-align: left !important;
}
/* line 50, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_utilities.scss */
.text-right {
text-align: right !important;
}
/* line 51, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_utilities.scss */
.text-center {
text-align: center !important;
}
/* line 52, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_utilities.scss */
/* line 55, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_utilities.scss */
.text-justify {
text-align: justify !important;
}
/* line 53, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_utilities.scss */
/* line 56, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_utilities.scss */
.text-nowrap {
white-space: nowrap !important;
}
/* line 54, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_utilities.scss */
/* line 57, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_utilities.scss */
.text-truncate {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
/* line 60, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_utilities.scss */
/* line 63, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_utilities.scss */
.text-xs-left {
text-align: left !important;
}
/* line 61, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_utilities.scss */
/* line 64, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_utilities.scss */
.text-xs-right {
text-align: right !important;
}
/* line 62, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_utilities.scss */
/* line 65, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_utilities.scss */
.text-xs-center {
text-align: center !important;
}
@media (min-width: 544px) {
/* line 60, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_utilities.scss */
/* line 63, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_utilities.scss */
.text-sm-left {
text-align: left !important;
}
/* line 61, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_utilities.scss */
/* line 64, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_utilities.scss */
.text-sm-right {
text-align: right !important;
}
/* line 62, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_utilities.scss */
/* line 65, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_utilities.scss */
.text-sm-center {
text-align: center !important;
}
}
@media (min-width: 768px) {
/* line 60, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_utilities.scss */
/* line 63, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_utilities.scss */
.text-md-left {
text-align: left !important;
}
/* line 61, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_utilities.scss */
/* line 64, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_utilities.scss */
.text-md-right {
text-align: right !important;
}
/* line 62, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_utilities.scss */
/* line 65, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_utilities.scss */
.text-md-center {
text-align: center !important;
}
}
@media (min-width: 992px) {
/* line 60, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_utilities.scss */
/* line 63, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_utilities.scss */
.text-lg-left {
text-align: left !important;
}
/* line 61, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_utilities.scss */
/* line 64, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_utilities.scss */
.text-lg-right {
text-align: right !important;
}
/* line 62, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_utilities.scss */
/* line 65, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_utilities.scss */
.text-lg-center {
text-align: center !important;
}
}
@media (min-width: 1200px) {
/* line 60, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_utilities.scss */
/* line 63, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_utilities.scss */
.text-xl-left {
text-align: left !important;
}
/* line 61, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_utilities.scss */
/* line 64, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_utilities.scss */
.text-xl-right {
text-align: right !important;
}
/* line 62, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_utilities.scss */
/* line 65, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_utilities.scss */
.text-xl-center {
text-align: center !important;
}
}
/* line 68, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_utilities.scss */
/* line 71, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_utilities.scss */
.text-lowercase {
text-transform: lowercase !important;
}
/* line 69, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_utilities.scss */
/* line 72, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_utilities.scss */
.text-uppercase {
text-transform: uppercase !important;
}
/* line 70, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_utilities.scss */
/* line 73, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_utilities.scss */
.text-capitalize {
text-transform: capitalize !important;
}
/* line 74, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_utilities.scss */
/* line 77, /Users/kross/alienfast/bootstrap-material-design/bower_components/bootstrap/scss/_utilities.scss */
.text-muted {
color: #818a91;
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

10
dist/js/npm.js vendored
View File

@ -1,2 +1,10 @@
// This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment.
require('./umd/ripples.js')
require('./umd/util.js')
require('./umd/ripples.js')
require('./umd/autofill.js')
require('./umd/input.js')
require('./umd/checkbox.js')
require('./umd/togglebutton.js')
require('./umd/radio.js')
require('./umd/fileinput.js')
require('./umd/bootstrapMaterialDesign.js')

147
dist/js/umd/autofill.js vendored Normal file
View File

@ -0,0 +1,147 @@
(function (global, factory) {
if (typeof define === 'function' && define.amd) {
define(['exports', 'module'], factory);
} else if (typeof exports !== 'undefined' && typeof module !== 'undefined') {
factory(exports, module);
} else {
var mod = {
exports: {}
};
factory(mod.exports, mod);
global.autofill = mod.exports;
}
})(this, function (exports, module) {
//import Util from './util'
'use strict';
var _createClass = (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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
var Autofill = (function ($) {
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
var NAME = 'autofill';
var DATA_KEY = 'mdb.' + NAME;
var JQUERY_NO_CONFLICT = $.fn[NAME];
var Default = {};
/**
* ------------------------------------------------------------------------
* Class Definition
* ------------------------------------------------------------------------
*/
var Autofill = (function () {
function Autofill(element, config) {
_classCallCheck(this, Autofill);
this.element = element;
this.config = $.extend({}, Default, config);
this._watchLoading();
this._attachEventHandlers();
}
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
*/
_createClass(Autofill, [{
key: 'dispose',
value: function dispose() {
$.removeData(this.element, DATA_KEY);
this.element = null;
this.config = null;
}
// ------------------------------------------------------------------------
// private
}, {
key: '_watchLoading',
value: function _watchLoading() {
var _this = this;
// After 10 seconds we are quite sure all the needed inputs are autofilled then we can stop checking them
setTimeout(function () {
clearInterval(_this._onLoading);
}, 10000);
}
// This part of code will detect autofill when the page is loading (username and password inputs for example)
}, {
key: '_onLoading',
value: function _onLoading() {
setInterval(function () {
$('input[type!=checkbox]').each(function (index, element) {
var $element = $(element);
if ($element.val() && $element.val() !== $element.attr('value')) {
$element.triggerStart('change');
}
});
}, 100);
}
}, {
key: '_attachEventHandlers',
value: function _attachEventHandlers() {
// Listen on inputs of the focused form
// (because user can select from the autofill dropdown only when the input has focus)
var focused = null;
$(document).on('focus', 'input', function (event) {
var $inputs = $(event.currentTarget).closest('form').find('input').not('[type=file]');
focused = setInterval(function () {
$inputs.each(function (index, element) {
var $element = $(element);
if ($element.val() !== $element.attr('value')) {
$element.triggerStart('change');
}
});
}, 100);
}).on('blur', '.form-group input', function () {
clearInterval(focused);
});
}
// ------------------------------------------------------------------------
// static
}], [{
key: '_jQueryInterface',
value: function _jQueryInterface(config) {
var _this2 = this;
return this.each(function () {
var $element = $(_this2);
var data = $element.data(DATA_KEY);
if (!data) {
data = new Autofill(_this2, config);
$element.data(DATA_KEY, data);
}
});
}
}]);
return Autofill;
})();
$.fn[NAME] = Autofill._jQueryInterface;
$.fn[NAME].Constructor = Autofill;
$.fn[NAME].noConflict = function () {
$.fn[NAME] = JQUERY_NO_CONFLICT;
return Autofill._jQueryInterface;
};
return Autofill;
})(jQuery);
module.exports = Autofill;
});

184
dist/js/umd/bootstrapMaterialDesign.js vendored Normal file
View File

@ -0,0 +1,184 @@
(function (global, factory) {
if (typeof define === 'function' && define.amd) {
define(['exports', 'module'], factory);
} else if (typeof exports !== 'undefined' && typeof module !== 'undefined') {
factory(exports, module);
} else {
var mod = {
exports: {}
};
factory(mod.exports, mod);
global.bootstrapMaterialDesign = mod.exports;
}
})(this, function (exports, module) {
//import Util from './util'
/**
* $.bootstrapMaterialDesign(config) is a macro class to configure the components generally
* used in Material Design for Bootstrap. You may pass overrides to the configurations
* which will be passed into each component, or you may omit use of this class and
* configure each component separately.
*
* NOTE: If omitting use of this class, please note that the Input component must be
* initialized prior to other decorating components such as radio, checkbox,
* togglebutton, fileInput.
*
*/
'use strict';
var _createClass = (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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
var BootstrapMaterialDesign = (function ($) {
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
var NAME = 'bootstrapMaterialDesign';
var DATA_KEY = 'mdb.' + NAME;
var JQUERY_NO_CONFLICT = $.fn[NAME];
/**
*
* Default macro configuration for each component (primarily selectors).
* - selector: may be a string or an array. Any array will be joined with a comma to generate the selector
* - disable any component by defining it as false with an override. e.g. $.bootstrapMaterialDesign({ autofill: false })
*
* @see each individual component for more configuration settings.
*/
var Default = {
ripples: {
selector: ['.btn:not(.btn-link):not(.ripple-none)', '.card-image:not(.ripple-none)', '.navbar a:not(.ripple-none)', '.dropdown-menu a:not(.ripple-none)', '.nav-tabs a:not(.ripple-none)', '.pagination li:not(.active):not(.disabled) a:not(.ripple-none)', '.ripple' // generic marker class to add ripple to elements
]
},
input: {
selector: ['input.form-control', 'textarea.form-control', 'select.form-control']
},
checkbox: {
selector: '.checkbox > label > input[type=checkbox]'
},
togglebutton: {
selector: '.togglebutton > label > input[type=checkbox]'
},
radio: {
selector: '.radio > label > input[type=radio]'
},
fileInput: {
selector: 'input[type=file]'
},
autofill: {
selector: 'body'
},
arrive: true,
// create an ordered component list for instantiation
instantiation: ['ripples', 'input', 'checkbox', 'togglebutton', 'radio', 'fileInput', 'autofill']
};
/**
* ------------------------------------------------------------------------
* Class Definition
* ------------------------------------------------------------------------
*/
var BootstrapMaterialDesign = (function () {
function BootstrapMaterialDesign(element, config) {
var _this = this;
_classCallCheck(this, BootstrapMaterialDesign);
this.element = element;
this.config = $.extend({}, Default, config);
var $document = $(document);
var _loop = function (component) {
// the component's config fragment is passed in directly, allowing users to override
var componentConfig = _this.config[component];
// check to make sure component config is enabled (not `false`)
if (componentConfig) {
// assemble the selector as it may be an array
var selector = _this._resolveSelector(componentConfig);
// instantiate component on selector elements with config
$(selector)[component](componentConfig);
// add to arrive if present and enabled
if (document.arrive && _this.config.arrive) {
$document.arrive(selector, function (element) {
// eslint-disable-line no-loop-func
$(element)[component](componentConfig);
});
}
}
};
for (var component in this.config.instantiation) {
_loop(component);
}
}
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
*/
_createClass(BootstrapMaterialDesign, [{
key: 'dispose',
value: function dispose() {
$.removeData(this.element, DATA_KEY);
this.element = null;
this.config = null;
}
// ------------------------------------------------------------------------
// private
}, {
key: '_resolveSelector',
value: function _resolveSelector(componentConfig) {
var selector = componentConfig['selector'];
if (Array.isArray(selector)) {
selector = selector.join(', ');
}
return selector;
}
// ------------------------------------------------------------------------
// static
}], [{
key: '_jQueryInterface',
value: function _jQueryInterface(config) {
return this.each(function () {
var $element = $(this);
var data = $element.data(DATA_KEY);
if (!data) {
data = new BootstrapMaterialDesign(this, config);
$element.data(DATA_KEY, data);
}
});
}
}]);
return BootstrapMaterialDesign;
})();
$.fn[NAME] = BootstrapMaterialDesign._jQueryInterface;
$.fn[NAME].Constructor = BootstrapMaterialDesign;
$.fn[NAME].noConflict = function () {
$.fn[NAME] = JQUERY_NO_CONFLICT;
return BootstrapMaterialDesign._jQueryInterface;
};
return BootstrapMaterialDesign;
})(jQuery);
module.exports = BootstrapMaterialDesign;
});

124
dist/js/umd/checkbox.js vendored Normal file
View File

@ -0,0 +1,124 @@
(function (global, factory) {
if (typeof define === 'function' && define.amd) {
define(['exports', 'module', './util'], factory);
} else if (typeof exports !== 'undefined' && typeof module !== 'undefined') {
factory(exports, module, require('./util'));
} else {
var mod = {
exports: {}
};
factory(mod.exports, mod, global.Util);
global.checkbox = mod.exports;
}
})(this, function (exports, module, _util) {
'use strict';
var _createClass = (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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
var _Util = _interopRequireDefault(_util);
// Checkbox decorator, to be called after Input
var Checkbox = (function ($) {
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
var NAME = 'checkbox';
var DATA_KEY = 'mdb.' + NAME;
var JQUERY_NO_CONFLICT = $.fn[NAME];
var Default = {
template: '<span class=\'checkbox-material\'><span class=\'check\'></span></span>'
};
/**
* ------------------------------------------------------------------------
* Class Definition
* ------------------------------------------------------------------------
*/
var Checkbox = (function () {
function Checkbox(element, config) {
_classCallCheck(this, Checkbox);
this.element = element;
this.config = $.extend({}, Default, config);
this.element.after(this.config.template);
this.formGroup = _Util['default'].findFormGroup(this.element);
this._bindEventListeners();
}
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
*/
_createClass(Checkbox, [{
key: 'dispose',
value: function dispose() {
$.removeData(this.element, DATA_KEY);
this.element = null;
this.formGroup = null;
this.config = null;
}
// ------------------------------------------------------------------------
// private
}, {
key: '_bindEventListeners',
value: function _bindEventListeners() {
var _this = this;
// checkboxes didn't appear to bubble to the document, so we'll bind these directly
this.formGroup.find('.checkbox label').hover(function () {
_Util['default'].addFormGroupFocus(_this.formGroup);
}, function () {
_Util['default'].removeFormGroupFocus(_this.formGroup);
});
this.element.change(function () {
_this.element.blur();
});
}
// ------------------------------------------------------------------------
// static
}], [{
key: '_jQueryInterface',
value: function _jQueryInterface(config) {
return this.each(function () {
var $element = $(this);
var data = $element.data(DATA_KEY);
if (!data) {
data = new Checkbox(this, config);
$element.data(DATA_KEY, data);
}
});
}
}]);
return Checkbox;
})();
$.fn[NAME] = Checkbox._jQueryInterface;
$.fn[NAME].Constructor = Checkbox;
$.fn[NAME].noConflict = function () {
$.fn[NAME] = JQUERY_NO_CONFLICT;
return Checkbox._jQueryInterface;
};
return Checkbox;
})(jQuery);
module.exports = Checkbox;
});

147
dist/js/umd/fileinput.js vendored Normal file
View File

@ -0,0 +1,147 @@
(function (global, factory) {
if (typeof define === 'function' && define.amd) {
define(['exports', 'module', './util'], factory);
} else if (typeof exports !== 'undefined' && typeof module !== 'undefined') {
factory(exports, module, require('./util'));
} else {
var mod = {
exports: {}
};
factory(mod.exports, mod, global.Util);
global.fileInput = mod.exports;
}
})(this, function (exports, module, _util) {
'use strict';
var _createClass = (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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
var _Util = _interopRequireDefault(_util);
// FileInput decorator, to be called after Input
var FileInput = (function ($) {
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
var NAME = 'fileInput';
var DATA_KEY = 'mdb.' + NAME;
var JQUERY_NO_CONFLICT = $.fn[NAME];
var Default = {};
var ClassName = {
IS_FILEINPUT: 'is-fileinput',
IS_EMPTY: 'is-empty'
};
/**
* ------------------------------------------------------------------------
* Class Definition
* ------------------------------------------------------------------------
*/
var FileInput = (function () {
function FileInput(element, config) {
_classCallCheck(this, FileInput);
this.element = element;
this.config = $.extend({}, Default, config);
this.formGroup = _Util['default'].findFormGroup(this.element);
this.formGroup.addClass(ClassName.IS_FILEINPUT);
this._bindEventListeners();
}
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
*/
_createClass(FileInput, [{
key: 'dispose',
value: function dispose() {
$.removeData(this.element, DATA_KEY);
this.element = null;
this.formGroup = null;
this.config = null;
}
// ------------------------------------------------------------------------
// private
}, {
key: '_bindEventListeners',
value: function _bindEventListeners() {
var _this = this;
this.formGroup.on('focus', function () {
_Util['default'].addFormGroupFocus(_this.formGroup);
}).on('blur', function () {
_Util['default'].removeFormGroupFocus(_this.formGroup);
});
// set the fileinput readonly field with the name of the file
this.element.on('change', function () {
var value = '';
$.each(_this.element.files, function (i, file) {
value += file.name + ' , ';
});
value = value.substring(0, value.length - 2);
if (value) {
_this._removeIsEmpty();
} else {
_this._addIsEmpty();
}
_this.formGroup.find('input.form-control[readonly]').val(value);
});
}
}, {
key: '_addIsEmpty',
value: function _addIsEmpty() {
this.formGroup.addClass(ClassName.IS_EMPTY);
}
}, {
key: '_removeIsEmpty',
value: function _removeIsEmpty() {
this.formGroup.removeClass(ClassName.IS_EMPTY);
}
// ------------------------------------------------------------------------
// static
}], [{
key: '_jQueryInterface',
value: function _jQueryInterface(config) {
return this.each(function () {
var $element = $(this);
var data = $element.data(DATA_KEY);
if (!data) {
data = new FileInput(this, config);
$element.data(DATA_KEY, data);
}
});
}
}]);
return FileInput;
})();
$.fn[NAME] = FileInput._jQueryInterface;
$.fn[NAME].Constructor = FileInput;
$.fn[NAME].noConflict = function () {
$.fn[NAME] = JQUERY_NO_CONFLICT;
return FileInput._jQueryInterface;
};
return FileInput;
})(jQuery);
module.exports = FileInput;
});

236
dist/js/umd/input.js vendored Normal file
View File

@ -0,0 +1,236 @@
(function (global, factory) {
if (typeof define === 'function' && define.amd) {
define(['exports', 'module', './util'], factory);
} else if (typeof exports !== 'undefined' && typeof module !== 'undefined') {
factory(exports, module, require('./util'));
} else {
var mod = {
exports: {}
};
factory(mod.exports, mod, global.Util);
global.input = mod.exports;
}
})(this, function (exports, module, _util) {
'use strict';
var _createClass = (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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
var _Util = _interopRequireDefault(_util);
var Input = (function ($) {
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
var NAME = 'input';
var DATA_KEY = 'mdb.' + NAME;
var JQUERY_NO_CONFLICT = $.fn[NAME];
var Default = {
convertInputSizeVariations: true,
template: '<span class=\'material-input\'></span>',
formGroup: {
template: '<div class=\'form-group\'></div>'
}
};
var InputSizeConversions = {
'input-lg': 'form-group-lg',
'input-sm': 'form-group-sm'
};
var ClassName = {
IS_EMPTY: 'is-empty',
FORM_GROUP: 'form-group',
HAS_ERROR: 'has-error'
};
var Selector = {
FORM_GROUP: '.' + ClassName.FORM_GROUP //,
};
/**
* ------------------------------------------------------------------------
* Class Definition
* ------------------------------------------------------------------------
*/
var Input = (function () {
function Input(element, config) {
_classCallCheck(this, Input);
this.element = element;
this.config = $.extend({}, Default, config);
// Requires form-group standard markup (will add it if necessary)
this.formGroup = this._findOrCreateFormGroup();
this._convertInputSizeVariations();
// Initially mark as empty
if (this._isEmpty()) {
this.formGroup.addClass(ClassName.IS_EMPTY);
}
// Add marker div the end of the form-group
this.formGroup.append(this.config.template);
this._bindEventListeners();
}
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
*/
_createClass(Input, [{
key: 'dispose',
value: function dispose() {
$.removeData(this.element, DATA_KEY);
this.element = null;
this.formGroup = null;
this.config = null;
}
// ------------------------------------------------------------------------
// private
}, {
key: '_bindEventListeners',
value: function _bindEventListeners() {
var _this = this;
this.element.on('keydown paste', function (event) {
if (_Util['default'].isChar(event)) {
_this._removeIsEmpty();
}
}).on('keyup change', function (event) {
var isValid = typeof _this.element[0].checkValidity === 'undefined' || _this.element[0].checkValidity();
if (_this.element.val() === '' && isValid) {
_this._addIsEmpty();
} else {
_this._removeIsEmpty();
}
// Validation events do not bubble, so they must be attached directly to the input: http://jsfiddle.net/PEpRM/1/
// Further, even the bind method is being caught, but since we are already calling #checkValidity here, just alter
// the form-group on change.
//
// NOTE: I'm not sure we should be intervening regarding validation, this seems better as a README and snippet of code.
// BUT, I've left it here for backwards compatibility.
if (isValid) {
_this._removeHasError();
} else {
_this._addHasError();
}
}).on('focus', function () {
_Util['default'].addFormGroupFocus(_this.formGroup);
}).on('blur', function () {
_Util['default'].removeFormGroupFocus(_this.formGroup);
})
// make sure empty is added back when there is a programmatic value change.
// NOTE: programmatic changing of value using $.val() must trigger the change event i.e. $.val('x').trigger('change')
.on('change', function () {
if (_this.element.attr('type') === 'file') {
return;
}
var value = _this.element.val();
if (value) {
_this._removeIsEmpty();
} else {
_this._addIsEmpty();
}
});
}
}, {
key: '_addHasError',
value: function _addHasError() {
this.formGroup.addClass(ClassName.HAS_ERROR);
}
}, {
key: '_removeHasError',
value: function _removeHasError() {
this.formGroup.removeClass(ClassName.HAS_ERROR);
}
}, {
key: '_addIsEmpty',
value: function _addIsEmpty() {
this.formGroup.addClass(ClassName.IS_EMPTY);
}
}, {
key: '_removeIsEmpty',
value: function _removeIsEmpty() {
this.formGroup.removeClass(ClassName.IS_EMPTY);
}
}, {
key: '_isEmpty',
value: function _isEmpty() {
return this.element.val() === null || this.element.val() === undefined || this.element.val() === '';
}
}, {
key: '_convertInputSizeVariations',
value: function _convertInputSizeVariations() {
if (!this.config.convertInputSizeVariations) {
return;
}
// Modification - Change input-sm/lg to form-group-sm/lg instead (preferred standard and simpler css/less variants)
for (var inputSize in InputSizeConversions) {
if (this.element.hasClass(inputSize)) {
this.element.removeClass(inputSize);
this.formGroup.addClass(InputSizeConversions[inputSize]);
}
}
}
}, {
key: '_findOrCreateFormGroup',
value: function _findOrCreateFormGroup() {
var fg = this.element.closest(Selector.FORM_GROUP); // note that form-group may be grandparent in the case of an input-group
if (fg.length === 0) {
this.element.wrap(this.config.formGroup.template);
fg = this.element.closest(Selector.FORM_GROUP); // find node after attached (otherwise additional attachments don't work)
}
return fg;
}
// ------------------------------------------------------------------------
// static
}], [{
key: '_jQueryInterface',
value: function _jQueryInterface(config) {
return this.each(function () {
var $element = $(this);
var data = $element.data(DATA_KEY);
if (!data) {
data = new Input(this, config);
$element.data(DATA_KEY, data);
}
});
}
}]);
return Input;
})();
$.fn[NAME] = Input._jQueryInterface;
$.fn[NAME].Constructor = Input;
$.fn[NAME].noConflict = function () {
$.fn[NAME] = JQUERY_NO_CONFLICT;
return Input._jQueryInterface;
};
return Input;
})(jQuery);
module.exports = Input;
});

102
dist/js/umd/radio.js vendored Normal file
View File

@ -0,0 +1,102 @@
(function (global, factory) {
if (typeof define === 'function' && define.amd) {
define(['exports', 'module'], factory);
} else if (typeof exports !== 'undefined' && typeof module !== 'undefined') {
factory(exports, module);
} else {
var mod = {
exports: {}
};
factory(mod.exports, mod);
global.radio = mod.exports;
}
})(this, function (exports, module) {
//import Util from './util'
// Radio decorator, to be called after Input
'use strict';
var _createClass = (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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
var Radio = (function ($) {
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
var NAME = 'radio';
var DATA_KEY = 'mdb.' + NAME;
var JQUERY_NO_CONFLICT = $.fn[NAME];
var Default = {
template: '<span class=\'circle\'></span><span class=\'check\'></span>'
};
/**
* ------------------------------------------------------------------------
* Class Definition
* ------------------------------------------------------------------------
*/
var Radio = (function () {
function Radio(element, config) {
_classCallCheck(this, Radio);
this.element = element;
this.config = $.extend({}, Default, config);
this.element.after(this.config.template);
}
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
*/
_createClass(Radio, [{
key: 'dispose',
value: function dispose() {
$.removeData(this.element, DATA_KEY);
this.element = null;
this.config = null;
}
// ------------------------------------------------------------------------
// private
// ------------------------------------------------------------------------
// static
}], [{
key: '_jQueryInterface',
value: function _jQueryInterface(config) {
return this.each(function () {
var $element = $(this);
var data = $element.data(DATA_KEY);
if (!data) {
data = new Radio(this, config);
$element.data(DATA_KEY, data);
}
});
}
}]);
return Radio;
})();
$.fn[NAME] = Radio._jQueryInterface;
$.fn[NAME].Constructor = Radio;
$.fn[NAME].noConflict = function () {
$.fn[NAME] = JQUERY_NO_CONFLICT;
return Radio._jQueryInterface;
};
return Radio;
})(jQuery);
module.exports = Radio;
});

367
dist/js/umd/ripples.js vendored
View File

@ -1,22 +1,26 @@
(function (global, factory) {
if (typeof define === 'function' && define.amd) {
define(['exports', 'module'], factory);
define(['exports', 'module', './util'], factory);
} else if (typeof exports !== 'undefined' && typeof module !== 'undefined') {
factory(exports, module);
factory(exports, module, require('./util'));
} else {
var mod = {
exports: {}
};
factory(mod.exports, mod);
factory(mod.exports, mod, global.Util);
global.ripples = mod.exports;
}
})(this, function (exports, module) {
})(this, function (exports, module, _util) {
'use strict';
var _createClass = (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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
var _Util = _interopRequireDefault(_util);
var Ripples = (function ($) {
/**
@ -25,20 +29,32 @@
* ------------------------------------------------------------------------
*/
var NAME = 'ripples';
var DATA_KEY = 'bmd.' + NAME;
var EVENT_KEY = '.' + DATA_KEY;
var DATA_API_KEY = '.data-api';
var DATA_KEY = 'mdb.' + NAME;
var JQUERY_NO_CONFLICT = $.fn[NAME];
var DEFAULT_OPTIONS = {};
var Selector = {
DATA_DISMISS: '[data-dismiss="ripples"]'
var ClassName = {
CONTAINER: 'ripple-container',
DECORATOR: 'ripple-decorator'
};
var Event = {
CLOSE: 'close' + EVENT_KEY,
CLOSED: 'closed' + EVENT_KEY,
CLICK_DATA_API: 'click' + EVENT_KEY + DATA_API_KEY
var Selector = {
CONTAINER: '.' + ClassName.CONTAINER,
DECORATOR: '.' + ClassName.DECORATOR //,
};
var Default = {
container: {
template: '<div class=\'' + ClassName.CONTAINER + '\'></div>'
},
decorator: {
template: ClassName.DECORATOR + '\'></div>'
},
trigger: {
start: 'mousedown touchstart',
end: 'mouseup mouseleave touchend'
},
touchUserAgentRegex: /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i,
duration: 500
};
/**
@ -48,176 +64,129 @@
*/
var Ripples = (function () {
function Ripples(element, options) {
function Ripples(element, config) {
_classCallCheck(this, Ripples);
this.element = $(element);
this.config = $.extend({}, DEFAULT_OPTIONS, options);
this.config = $.extend({}, Default, config);
this.element.on("mousedown touchstart", this._createRipple);
// attach initial listener
this.element.on(this.config.triggerStart, this._onStartRipple);
}
/**
* ------------------------------------------------------------------------
* Data Api implementation
* ------------------------------------------------------------------------
*/
//$(document).on(
// Event.CLICK_DATA_API,
// Selector.DATA_DISMISS,
// Ripples._handleClose(new Ripples())
//)
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
*/
// getters
_createClass(Ripples, [{
key: 'close',
// public
value: function close(element) {
element = element || this.element;
var rootElement = this._getRootElement(element);
var customEvent = this._triggerCloseEvent(rootElement);
if (customEvent.isDefaultPrevented()) {
return;
}
this._removeElement(rootElement);
}
}, {
key: 'dispose',
value: function dispose() {
$.removeData(this.element, DATA_KEY);
this.element = null;
this.containerElement = null;
this.decoratorElement = null;
this.config = null;
}
// ------------------------------------------------------------------------
// private
}, {
key: '_createRipple',
value: function _createRipple(event) {
key: '_onStartRipple',
value: function _onStartRipple(event) {
var _this = this;
/**
* Verify if the user is just touching on a device and return if so
*/
if (this.isTouch() && event.type === "mousedown") {
// Verify if the user is just touching on a device and return if so
if (this.isTouch() && event.type === 'mousedown') {
return;
}
/**
* Verify if the current element already has a ripple wrapper element and
* creates if it doesn't
*/
if (!this.element.find(".ripple-container").length) {
this.element.append("<div class=\"ripple-container\"></div>");
}
// Find or create the ripple container element
this._findOrCreateContainer();
/**
* Find the ripple wrapper
*/
var $container = this.element.children(".ripple-container");
// Get relY and relX positions of the container element
var relY = this._getRelY(event);
var relX = this._getRelX(event);
/**
* Get relY and relX positions
*/
var relY = this._getRelY($container, event);
var relX = this._getRelX($container, event);
/**
* If relY and/or relX are false, return the event
*/
// If relY and/or relX are false, return the event
if (!relY && !relX) {
return;
}
/**
* Get the ripple color
*/
var rippleColor = this._getRipplesColor(this.element);
/**
* Create the ripple element
*/
var $ripple = $("<div></div>");
$ripple.addClass("ripple").css({
"left": relX,
"top": relY,
"background-color": rippleColor
// set the location and color each time (even if element is cached)
this.decoratorElement.css({
'left': relX,
'top': relY,
'background-color': this._getRipplesColor()
});
/**
* Append the ripple to the wrapper
*/
$container.append($ripple);
// Make sure the ripple has the styles applied (ugly hack but it works)
this._forceStyleApplication();
/**
* Make sure the ripple has the styles applied (ugly hack but it works)
*/
(function () {
return window.getComputedStyle($ripple[0]).opacity;
})();
// Turn on the ripple animation
this.rippleOn();
/**
* Turn on the ripple animation
*/
this.rippleOn(this.element, $ripple);
/**
* Call the rippleEnd function when the transition "on" ends
*/
// Call the rippleEnd function when the transition 'on' ends
setTimeout(function () {
this.rippleEnd($ripple);
}, 500);
_this.rippleEnd();
}, this.config.duration);
/**
* Detect when the user leaves the element
*/
this.element.on("mouseup mouseleave touchend", function () {
$ripple.data("mousedown", "off");
// Detect when the user leaves the element (attach only when necessary for performance)
this.element.on(this.config.triggerEnd, function () {
_this.decoratorElement.data('mousedown', 'off');
if ($ripple.data("animating") === "off") {
this.rippleOut($ripple);
if (_this.decoratorElement.data('animating') === 'off') {
_this.rippleOut();
}
});
}
}, {
key: '_findOrCreateContainer',
value: function _findOrCreateContainer() {
if (!this.containerElement || !this.containerElement.length > 0) {
this.element.append(this.config.container.template);
this.containerElement = this.element.find(Selector.CONTAINER);
}
// always add the rippleElement, it is always removed
this.containerElement.append(this.config.element.template);
this.decoratorElement = this.containerElement.find(Selector.DECORATOR);
}
// Make sure the ripple has the styles applied (ugly hack but it works)
}, {
key: '_forceStyleApplication',
value: function _forceStyleApplication() {
return window.getComputedStyle(this.decoratorElement[0]).opacity;
}
/**
* Get the relX
*/
}, {
key: '_getRelX',
value: function _getRelX($container, event) {
var wrapperOffset = $container.offset();
value: function _getRelX(event) {
var wrapperOffset = this.containerElement.offset();
var result = null;
if (!this.isTouch()) {
/**
* Get the mouse position relative to the ripple wrapper
*/
return event.pageX - wrapperOffset.left;
// Get the mouse position relative to the ripple wrapper
result = event.pageX - wrapperOffset.left;
} else {
/**
* Make sure the user is using only one finger and then get the touch
* position relative to the ripple wrapper
*/
// Make sure the user is using only one finger and then get the touch
// position relative to the ripple wrapper
event = event.originalEvent;
if (event.touches.length === 1) {
return event.touches[0].pageX - wrapperOffset.left;
result = event.touches[0].pageX - wrapperOffset.left;
} else {
result = false;
}
return false;
}
return result;
}
/**
@ -225,14 +194,15 @@
*/
}, {
key: '_getRelY',
value: function _getRelY($container, event) {
var wrapperOffset = $container.offset();
value: function _getRelY(event) {
var containerOffset = this.containerElement.offset();
var result = null;
if (!this.isTouch()) {
/**
* Get the mouse position relative to the ripple wrapper
*/
return event.pageY - wrapperOffset.top;
result = event.pageY - containerOffset.top;
} else {
/**
* Make sure the user is using only one finger and then get the touch
@ -241,11 +211,13 @@
event = event.originalEvent;
if (event.touches.length === 1) {
return event.touches[0].pageY - wrapperOffset.top;
result = event.touches[0].pageY - containerOffset.top;
} else {
result = false;
}
return false;
}
return result;
}
/**
@ -253,35 +225,18 @@
*/
}, {
key: '_getRipplesColor',
value: function _getRipplesColor($element) {
var color = $element.data("ripple-color") ? $element.data("ripple-color") : window.getComputedStyle($element[0]).color;
value: function _getRipplesColor() {
var color = this.element.data('ripple-color') ? this.element.data('ripple-color') : window.getComputedStyle(this.element[0]).color;
return color;
}
/**
* Verify if the client browser has transistion support
*/
}, {
key: '_hasTransitionSupport',
value: function _hasTransitionSupport() {
var thisBody = document.body || document.documentElement;
var thisStyle = thisBody.style;
var support = thisStyle.transition !== undefined || thisStyle.WebkitTransition !== undefined || thisStyle.MozTransition !== undefined || thisStyle.MsTransition !== undefined || thisStyle.OTransition !== undefined;
return support;
}
/**
* Verify if the client is using a mobile device
*/
}, {
key: 'isTouch',
value: function isTouch() {
return (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)
);
return this.config.touchUserAgentRegex.test(navigator.userAgent);
}
/**
@ -289,11 +244,11 @@
*/
}, {
key: 'rippleEnd',
value: function rippleEnd($ripple) {
$ripple.data("animating", "off");
value: function rippleEnd() {
this.decoratorElement.data('animating', 'off');
if ($ripple.data("mousedown") === "off") {
this.rippleOut($ripple);
if (this.decoratorElement.data('mousedown') === 'off') {
this.rippleOut(this.decoratorElement);
}
}
@ -302,19 +257,22 @@
*/
}, {
key: 'rippleOut',
value: function rippleOut($ripple) {
$ripple.off();
value: function rippleOut() {
var _this2 = this;
if (this._hasTransitionSupport()) {
$ripple.addClass("ripple-out");
this.decoratorElement.off();
if (_Util['default'].transitionEndSupported()) {
this.decoratorElement.addClass('ripple-out');
} else {
$ripple.animate({ "opacity": 0 }, 100, function () {
$ripple.triggerStart("transitionend");
this.decoratorElement.animate({ 'opacity': 0 }, 100, function () {
_this2.decoratorElement.triggerStart('transitionend');
});
}
$ripple.on("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd", function () {
$ripple.remove();
this.decoratorElement.on(_Util['default'].transitionEndSelector(), function () {
_this2.decoratorElement.remove();
_this2.decoratorElement = null;
});
}
@ -323,67 +281,58 @@
*/
}, {
key: 'rippleOn',
value: function rippleOn($element, $ripple) {
var size = this._getNewSize($element, $ripple);
value: function rippleOn() {
var _this3 = this;
if (this._hasTransitionSupport()) {
$ripple.css({
"-ms-transform": "scale(" + size + ")",
"-moz-transform": "scale(" + size + ")",
"-webkit-transform": "scale(" + size + ")",
"transform": "scale(" + size + ")"
}).addClass("ripple-on").data("animating", "on").data("mousedown", "on");
var size = this._getNewSize();
if (_Util['default'].transitionEndSupported()) {
this.decoratorElement.css({
'-ms-transform': 'scale(' + size + ')',
'-moz-transform': 'scale(' + size + ')',
'-webkit-transform': 'scale(' + size + ')',
'transform': 'scale(' + size + ')'
}).addClass('ripple-on').data('animating', 'on').data('mousedown', 'on');
} else {
$ripple.animate({
"width": Math.max($element.outerWidth(), $element.outerHeight()) * 2,
"height": Math.max($element.outerWidth(), $element.outerHeight()) * 2,
"margin-left": Math.max($element.outerWidth(), $element.outerHeight()) * -1,
"margin-top": Math.max($element.outerWidth(), $element.outerHeight()) * -1,
"opacity": 0.2
}, 500, function () {
$ripple.triggerStart("transitionend");
this.decoratorElement.animate({
'width': Math.max(this.element.outerWidth(), this.element.outerHeight()) * 2,
'height': Math.max(this.element.outerWidth(), this.element.outerHeight()) * 2,
'margin-left': Math.max(this.element.outerWidth(), this.element.outerHeight()) * -1,
'margin-top': Math.max(this.element.outerWidth(), this.element.outerHeight()) * -1,
'opacity': 0.2
}, this.config.duration, function () {
_this3.decoratorElement.triggerStart('transitionend');
});
}
}
// ------------------------------------------------------------------------
// static
/**
* Get the new size based on the element height/width and the ripple width
*/
}], [{
key: '_getNewSize',
value: function _getNewSize($element, $ripple) {
return Math.max($element.outerWidth(), $element.outerHeight()) / $ripple.outerWidth() * 2.5;
}
}, {
key: '_getNewSize',
value: function _getNewSize() {
return Math.max(this.element.outerWidth(), this.element.outerHeight()) / this.decoratorElement.outerWidth() * 2.5;
}
// ------------------------------------------------------------------------
// static
}], [{
key: '_jQueryInterface',
value: function _jQueryInterface(options) {
value: function _jQueryInterface(config) {
var _this4 = this;
return this.each(function () {
var $element = $(this);
var data = $element.data(DATA_KEY);
var element = $(_this4);
var data = element.data(DATA_KEY);
if (!data) {
data = new Ripples(this, options);
$element.data(DATA_KEY, data);
data = new Ripples(_this4, config);
element.data(DATA_KEY, data);
}
});
}
//static _handleClose(fooInstance) {
// return function (event) {
// if (event) {
// event.preventDefault()
// }
//
// fooInstance.close(this)
// }
//}
}, {
key: 'NAME',
get: function get() {
return NAME;
}
}]);
return Ripples;

102
dist/js/umd/togglebutton.js vendored Normal file
View File

@ -0,0 +1,102 @@
(function (global, factory) {
if (typeof define === 'function' && define.amd) {
define(['exports', 'module'], factory);
} else if (typeof exports !== 'undefined' && typeof module !== 'undefined') {
factory(exports, module);
} else {
var mod = {
exports: {}
};
factory(mod.exports, mod);
global.togglebutton = mod.exports;
}
})(this, function (exports, module) {
//import Util from './util'
// Togglebutton decorator, to be called after Input
'use strict';
var _createClass = (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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
var Togglebutton = (function ($) {
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
var NAME = 'togglebutton';
var DATA_KEY = 'mdb.' + NAME;
var JQUERY_NO_CONFLICT = $.fn[NAME];
var Default = {
template: '<span class=\'toggle\'></span>'
};
/**
* ------------------------------------------------------------------------
* Class Definition
* ------------------------------------------------------------------------
*/
var Togglebutton = (function () {
function Togglebutton(element, config) {
_classCallCheck(this, Togglebutton);
this.element = element;
this.config = $.extend({}, Default, config);
this.element.after(this.config.template);
}
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
*/
_createClass(Togglebutton, [{
key: 'dispose',
value: function dispose() {
$.removeData(this.element, DATA_KEY);
this.element = null;
this.config = null;
}
// ------------------------------------------------------------------------
// private
// ------------------------------------------------------------------------
// static
}], [{
key: '_jQueryInterface',
value: function _jQueryInterface(config) {
return this.each(function () {
var $element = $(this);
var data = $element.data(DATA_KEY);
if (!data) {
data = new Togglebutton(this, config);
$element.data(DATA_KEY, data);
}
});
}
}]);
return Togglebutton;
})();
$.fn[NAME] = Togglebutton._jQueryInterface;
$.fn[NAME].Constructor = Togglebutton;
$.fn[NAME].noConflict = function () {
$.fn[NAME] = JQUERY_NO_CONFLICT;
return Togglebutton._jQueryInterface;
};
return Togglebutton;
})(jQuery);
module.exports = Togglebutton;
});

118
dist/js/umd/util.js vendored Normal file
View File

@ -0,0 +1,118 @@
(function (global, factory) {
if (typeof define === 'function' && define.amd) {
define(['exports', 'module'], factory);
} else if (typeof exports !== 'undefined' && typeof module !== 'undefined') {
factory(exports, module);
} else {
var mod = {
exports: {}
};
factory(mod.exports, mod);
global.util = mod.exports;
}
})(this, function (exports, module) {
'use strict';
var Util = (function ($) {
/**
* ------------------------------------------------------------------------
* Private TransitionEnd Helpers
* ------------------------------------------------------------------------
*/
var transitionEnd = false;
var _transitionEndSelector = '';
var TransitionEndEvent = {
WebkitTransition: 'webkitTransitionEnd',
MozTransition: 'transitionend',
OTransition: 'oTransitionEnd otransitionend',
transition: 'transitionend'
};
var ClassName = {
IS_FOCUSED: 'is-focused',
FORM_GROUP: 'form-group'
};
var Selector = {
FORM_GROUP: '.' + ClassName.FORM_GROUP //,
};
function transitionEndTest() {
if (window.QUnit) {
return false;
}
var el = document.createElement('mdb');
for (var _name in TransitionEndEvent) {
if (el.style[_name] !== undefined) {
return TransitionEndEvent[_name]; // { end: TransitionEndEvent[name] }
}
}
return false;
}
function setTransitionEndSupport() {
transitionEnd = transitionEndTest();
// generate a concatenated transition end event selector
for (var _name2 in TransitionEndEvent) {
_transitionEndSelector += ' ' + TransitionEndEvent[_name2];
}
}
/**
* --------------------------------------------------------------------------
* Public Util Api
* --------------------------------------------------------------------------
*/
var Util = {
transitionEndSupported: function transitionEndSupported() {
return transitionEnd;
},
transitionEndSelector: function transitionEndSelector() {
return _transitionEndSelector;
},
isChar: function isChar(event) {
if (typeof event.which === 'undefined') {
return true;
} else if (typeof event.which === 'number' && event.which > 0) {
return !event.ctrlKey && !event.metaKey && !event.altKey && event.which !== 8 && event.which !== 9;
}
return false;
},
addFormGroupFocus: function addFormGroupFocus(formGroup) {
formGroup.addClass(ClassName.IS_FOCUSED);
},
removeFormGroupFocus: function removeFormGroupFocus(formGroup) {
formGroup.removeClass(ClassName.IS_FOCUSED);
},
/**
Find expected form-group
*/
findFormGroup: function findFormGroup(element) {
var fg = element.closest(Selector.FORM_GROUP); // note that form-group may be grandparent in the case of an input-group
if (fg.length === 0) {
$.error('Failed to find form-group for ' + element);
}
return fg;
}
};
setTransitionEndSupport();
return Util;
})(jQuery);
module.exports = Util;
});

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

10
docs/dist/js/npm.js vendored Normal file
View File

@ -0,0 +1,10 @@
// This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment.
require('./umd/util.js')
require('./umd/ripples.js')
require('./umd/autofill.js')
require('./umd/input.js')
require('./umd/checkbox.js')
require('./umd/togglebutton.js')
require('./umd/radio.js')
require('./umd/fileinput.js')
require('./umd/bootstrapMaterialDesign.js')

147
docs/dist/js/umd/autofill.js vendored Normal file
View File

@ -0,0 +1,147 @@
(function (global, factory) {
if (typeof define === 'function' && define.amd) {
define(['exports', 'module'], factory);
} else if (typeof exports !== 'undefined' && typeof module !== 'undefined') {
factory(exports, module);
} else {
var mod = {
exports: {}
};
factory(mod.exports, mod);
global.autofill = mod.exports;
}
})(this, function (exports, module) {
//import Util from './util'
'use strict';
var _createClass = (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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
var Autofill = (function ($) {
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
var NAME = 'autofill';
var DATA_KEY = 'mdb.' + NAME;
var JQUERY_NO_CONFLICT = $.fn[NAME];
var Default = {};
/**
* ------------------------------------------------------------------------
* Class Definition
* ------------------------------------------------------------------------
*/
var Autofill = (function () {
function Autofill(element, config) {
_classCallCheck(this, Autofill);
this.element = element;
this.config = $.extend({}, Default, config);
this._watchLoading();
this._attachEventHandlers();
}
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
*/
_createClass(Autofill, [{
key: 'dispose',
value: function dispose() {
$.removeData(this.element, DATA_KEY);
this.element = null;
this.config = null;
}
// ------------------------------------------------------------------------
// private
}, {
key: '_watchLoading',
value: function _watchLoading() {
var _this = this;
// After 10 seconds we are quite sure all the needed inputs are autofilled then we can stop checking them
setTimeout(function () {
clearInterval(_this._onLoading);
}, 10000);
}
// This part of code will detect autofill when the page is loading (username and password inputs for example)
}, {
key: '_onLoading',
value: function _onLoading() {
setInterval(function () {
$('input[type!=checkbox]').each(function (index, element) {
var $element = $(element);
if ($element.val() && $element.val() !== $element.attr('value')) {
$element.triggerStart('change');
}
});
}, 100);
}
}, {
key: '_attachEventHandlers',
value: function _attachEventHandlers() {
// Listen on inputs of the focused form
// (because user can select from the autofill dropdown only when the input has focus)
var focused = null;
$(document).on('focus', 'input', function (event) {
var $inputs = $(event.currentTarget).closest('form').find('input').not('[type=file]');
focused = setInterval(function () {
$inputs.each(function (index, element) {
var $element = $(element);
if ($element.val() !== $element.attr('value')) {
$element.triggerStart('change');
}
});
}, 100);
}).on('blur', '.form-group input', function () {
clearInterval(focused);
});
}
// ------------------------------------------------------------------------
// static
}], [{
key: '_jQueryInterface',
value: function _jQueryInterface(config) {
var _this2 = this;
return this.each(function () {
var $element = $(_this2);
var data = $element.data(DATA_KEY);
if (!data) {
data = new Autofill(_this2, config);
$element.data(DATA_KEY, data);
}
});
}
}]);
return Autofill;
})();
$.fn[NAME] = Autofill._jQueryInterface;
$.fn[NAME].Constructor = Autofill;
$.fn[NAME].noConflict = function () {
$.fn[NAME] = JQUERY_NO_CONFLICT;
return Autofill._jQueryInterface;
};
return Autofill;
})(jQuery);
module.exports = Autofill;
});

View File

@ -0,0 +1,184 @@
(function (global, factory) {
if (typeof define === 'function' && define.amd) {
define(['exports', 'module'], factory);
} else if (typeof exports !== 'undefined' && typeof module !== 'undefined') {
factory(exports, module);
} else {
var mod = {
exports: {}
};
factory(mod.exports, mod);
global.bootstrapMaterialDesign = mod.exports;
}
})(this, function (exports, module) {
//import Util from './util'
/**
* $.bootstrapMaterialDesign(config) is a macro class to configure the components generally
* used in Material Design for Bootstrap. You may pass overrides to the configurations
* which will be passed into each component, or you may omit use of this class and
* configure each component separately.
*
* NOTE: If omitting use of this class, please note that the Input component must be
* initialized prior to other decorating components such as radio, checkbox,
* togglebutton, fileInput.
*
*/
'use strict';
var _createClass = (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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
var BootstrapMaterialDesign = (function ($) {
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
var NAME = 'bootstrapMaterialDesign';
var DATA_KEY = 'mdb.' + NAME;
var JQUERY_NO_CONFLICT = $.fn[NAME];
/**
*
* Default macro configuration for each component (primarily selectors).
* - selector: may be a string or an array. Any array will be joined with a comma to generate the selector
* - disable any component by defining it as false with an override. e.g. $.bootstrapMaterialDesign({ autofill: false })
*
* @see each individual component for more configuration settings.
*/
var Default = {
ripples: {
selector: ['.btn:not(.btn-link):not(.ripple-none)', '.card-image:not(.ripple-none)', '.navbar a:not(.ripple-none)', '.dropdown-menu a:not(.ripple-none)', '.nav-tabs a:not(.ripple-none)', '.pagination li:not(.active):not(.disabled) a:not(.ripple-none)', '.ripple' // generic marker class to add ripple to elements
]
},
input: {
selector: ['input.form-control', 'textarea.form-control', 'select.form-control']
},
checkbox: {
selector: '.checkbox > label > input[type=checkbox]'
},
togglebutton: {
selector: '.togglebutton > label > input[type=checkbox]'
},
radio: {
selector: '.radio > label > input[type=radio]'
},
fileInput: {
selector: 'input[type=file]'
},
autofill: {
selector: 'body'
},
arrive: true,
// create an ordered component list for instantiation
instantiation: ['ripples', 'input', 'checkbox', 'togglebutton', 'radio', 'fileInput', 'autofill']
};
/**
* ------------------------------------------------------------------------
* Class Definition
* ------------------------------------------------------------------------
*/
var BootstrapMaterialDesign = (function () {
function BootstrapMaterialDesign(element, config) {
var _this = this;
_classCallCheck(this, BootstrapMaterialDesign);
this.element = element;
this.config = $.extend({}, Default, config);
var $document = $(document);
var _loop = function (component) {
// the component's config fragment is passed in directly, allowing users to override
var componentConfig = _this.config[component];
// check to make sure component config is enabled (not `false`)
if (componentConfig) {
// assemble the selector as it may be an array
var selector = _this._resolveSelector(componentConfig);
// instantiate component on selector elements with config
$(selector)[component](componentConfig);
// add to arrive if present and enabled
if (document.arrive && _this.config.arrive) {
$document.arrive(selector, function (element) {
// eslint-disable-line no-loop-func
$(element)[component](componentConfig);
});
}
}
};
for (var component in this.config.instantiation) {
_loop(component);
}
}
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
*/
_createClass(BootstrapMaterialDesign, [{
key: 'dispose',
value: function dispose() {
$.removeData(this.element, DATA_KEY);
this.element = null;
this.config = null;
}
// ------------------------------------------------------------------------
// private
}, {
key: '_resolveSelector',
value: function _resolveSelector(componentConfig) {
var selector = componentConfig['selector'];
if (Array.isArray(selector)) {
selector = selector.join(', ');
}
return selector;
}
// ------------------------------------------------------------------------
// static
}], [{
key: '_jQueryInterface',
value: function _jQueryInterface(config) {
return this.each(function () {
var $element = $(this);
var data = $element.data(DATA_KEY);
if (!data) {
data = new BootstrapMaterialDesign(this, config);
$element.data(DATA_KEY, data);
}
});
}
}]);
return BootstrapMaterialDesign;
})();
$.fn[NAME] = BootstrapMaterialDesign._jQueryInterface;
$.fn[NAME].Constructor = BootstrapMaterialDesign;
$.fn[NAME].noConflict = function () {
$.fn[NAME] = JQUERY_NO_CONFLICT;
return BootstrapMaterialDesign._jQueryInterface;
};
return BootstrapMaterialDesign;
})(jQuery);
module.exports = BootstrapMaterialDesign;
});

124
docs/dist/js/umd/checkbox.js vendored Normal file
View File

@ -0,0 +1,124 @@
(function (global, factory) {
if (typeof define === 'function' && define.amd) {
define(['exports', 'module', './util'], factory);
} else if (typeof exports !== 'undefined' && typeof module !== 'undefined') {
factory(exports, module, require('./util'));
} else {
var mod = {
exports: {}
};
factory(mod.exports, mod, global.Util);
global.checkbox = mod.exports;
}
})(this, function (exports, module, _util) {
'use strict';
var _createClass = (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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
var _Util = _interopRequireDefault(_util);
// Checkbox decorator, to be called after Input
var Checkbox = (function ($) {
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
var NAME = 'checkbox';
var DATA_KEY = 'mdb.' + NAME;
var JQUERY_NO_CONFLICT = $.fn[NAME];
var Default = {
template: '<span class=\'checkbox-material\'><span class=\'check\'></span></span>'
};
/**
* ------------------------------------------------------------------------
* Class Definition
* ------------------------------------------------------------------------
*/
var Checkbox = (function () {
function Checkbox(element, config) {
_classCallCheck(this, Checkbox);
this.element = element;
this.config = $.extend({}, Default, config);
this.element.after(this.config.template);
this.formGroup = _Util['default'].findFormGroup(this.element);
this._bindEventListeners();
}
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
*/
_createClass(Checkbox, [{
key: 'dispose',
value: function dispose() {
$.removeData(this.element, DATA_KEY);
this.element = null;
this.formGroup = null;
this.config = null;
}
// ------------------------------------------------------------------------
// private
}, {
key: '_bindEventListeners',
value: function _bindEventListeners() {
var _this = this;
// checkboxes didn't appear to bubble to the document, so we'll bind these directly
this.formGroup.find('.checkbox label').hover(function () {
_Util['default'].addFormGroupFocus(_this.formGroup);
}, function () {
_Util['default'].removeFormGroupFocus(_this.formGroup);
});
this.element.change(function () {
_this.element.blur();
});
}
// ------------------------------------------------------------------------
// static
}], [{
key: '_jQueryInterface',
value: function _jQueryInterface(config) {
return this.each(function () {
var $element = $(this);
var data = $element.data(DATA_KEY);
if (!data) {
data = new Checkbox(this, config);
$element.data(DATA_KEY, data);
}
});
}
}]);
return Checkbox;
})();
$.fn[NAME] = Checkbox._jQueryInterface;
$.fn[NAME].Constructor = Checkbox;
$.fn[NAME].noConflict = function () {
$.fn[NAME] = JQUERY_NO_CONFLICT;
return Checkbox._jQueryInterface;
};
return Checkbox;
})(jQuery);
module.exports = Checkbox;
});

147
docs/dist/js/umd/fileinput.js vendored Normal file
View File

@ -0,0 +1,147 @@
(function (global, factory) {
if (typeof define === 'function' && define.amd) {
define(['exports', 'module', './util'], factory);
} else if (typeof exports !== 'undefined' && typeof module !== 'undefined') {
factory(exports, module, require('./util'));
} else {
var mod = {
exports: {}
};
factory(mod.exports, mod, global.Util);
global.fileInput = mod.exports;
}
})(this, function (exports, module, _util) {
'use strict';
var _createClass = (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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
var _Util = _interopRequireDefault(_util);
// FileInput decorator, to be called after Input
var FileInput = (function ($) {
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
var NAME = 'fileInput';
var DATA_KEY = 'mdb.' + NAME;
var JQUERY_NO_CONFLICT = $.fn[NAME];
var Default = {};
var ClassName = {
IS_FILEINPUT: 'is-fileinput',
IS_EMPTY: 'is-empty'
};
/**
* ------------------------------------------------------------------------
* Class Definition
* ------------------------------------------------------------------------
*/
var FileInput = (function () {
function FileInput(element, config) {
_classCallCheck(this, FileInput);
this.element = element;
this.config = $.extend({}, Default, config);
this.formGroup = _Util['default'].findFormGroup(this.element);
this.formGroup.addClass(ClassName.IS_FILEINPUT);
this._bindEventListeners();
}
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
*/
_createClass(FileInput, [{
key: 'dispose',
value: function dispose() {
$.removeData(this.element, DATA_KEY);
this.element = null;
this.formGroup = null;
this.config = null;
}
// ------------------------------------------------------------------------
// private
}, {
key: '_bindEventListeners',
value: function _bindEventListeners() {
var _this = this;
this.formGroup.on('focus', function () {
_Util['default'].addFormGroupFocus(_this.formGroup);
}).on('blur', function () {
_Util['default'].removeFormGroupFocus(_this.formGroup);
});
// set the fileinput readonly field with the name of the file
this.element.on('change', function () {
var value = '';
$.each(_this.element.files, function (i, file) {
value += file.name + ' , ';
});
value = value.substring(0, value.length - 2);
if (value) {
_this._removeIsEmpty();
} else {
_this._addIsEmpty();
}
_this.formGroup.find('input.form-control[readonly]').val(value);
});
}
}, {
key: '_addIsEmpty',
value: function _addIsEmpty() {
this.formGroup.addClass(ClassName.IS_EMPTY);
}
}, {
key: '_removeIsEmpty',
value: function _removeIsEmpty() {
this.formGroup.removeClass(ClassName.IS_EMPTY);
}
// ------------------------------------------------------------------------
// static
}], [{
key: '_jQueryInterface',
value: function _jQueryInterface(config) {
return this.each(function () {
var $element = $(this);
var data = $element.data(DATA_KEY);
if (!data) {
data = new FileInput(this, config);
$element.data(DATA_KEY, data);
}
});
}
}]);
return FileInput;
})();
$.fn[NAME] = FileInput._jQueryInterface;
$.fn[NAME].Constructor = FileInput;
$.fn[NAME].noConflict = function () {
$.fn[NAME] = JQUERY_NO_CONFLICT;
return FileInput._jQueryInterface;
};
return FileInput;
})(jQuery);
module.exports = FileInput;
});

236
docs/dist/js/umd/input.js vendored Normal file
View File

@ -0,0 +1,236 @@
(function (global, factory) {
if (typeof define === 'function' && define.amd) {
define(['exports', 'module', './util'], factory);
} else if (typeof exports !== 'undefined' && typeof module !== 'undefined') {
factory(exports, module, require('./util'));
} else {
var mod = {
exports: {}
};
factory(mod.exports, mod, global.Util);
global.input = mod.exports;
}
})(this, function (exports, module, _util) {
'use strict';
var _createClass = (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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
var _Util = _interopRequireDefault(_util);
var Input = (function ($) {
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
var NAME = 'input';
var DATA_KEY = 'mdb.' + NAME;
var JQUERY_NO_CONFLICT = $.fn[NAME];
var Default = {
convertInputSizeVariations: true,
template: '<span class=\'material-input\'></span>',
formGroup: {
template: '<div class=\'form-group\'></div>'
}
};
var InputSizeConversions = {
'input-lg': 'form-group-lg',
'input-sm': 'form-group-sm'
};
var ClassName = {
IS_EMPTY: 'is-empty',
FORM_GROUP: 'form-group',
HAS_ERROR: 'has-error'
};
var Selector = {
FORM_GROUP: '.' + ClassName.FORM_GROUP //,
};
/**
* ------------------------------------------------------------------------
* Class Definition
* ------------------------------------------------------------------------
*/
var Input = (function () {
function Input(element, config) {
_classCallCheck(this, Input);
this.element = element;
this.config = $.extend({}, Default, config);
// Requires form-group standard markup (will add it if necessary)
this.formGroup = this._findOrCreateFormGroup();
this._convertInputSizeVariations();
// Initially mark as empty
if (this._isEmpty()) {
this.formGroup.addClass(ClassName.IS_EMPTY);
}
// Add marker div the end of the form-group
this.formGroup.append(this.config.template);
this._bindEventListeners();
}
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
*/
_createClass(Input, [{
key: 'dispose',
value: function dispose() {
$.removeData(this.element, DATA_KEY);
this.element = null;
this.formGroup = null;
this.config = null;
}
// ------------------------------------------------------------------------
// private
}, {
key: '_bindEventListeners',
value: function _bindEventListeners() {
var _this = this;
this.element.on('keydown paste', function (event) {
if (_Util['default'].isChar(event)) {
_this._removeIsEmpty();
}
}).on('keyup change', function (event) {
var isValid = typeof _this.element[0].checkValidity === 'undefined' || _this.element[0].checkValidity();
if (_this.element.val() === '' && isValid) {
_this._addIsEmpty();
} else {
_this._removeIsEmpty();
}
// Validation events do not bubble, so they must be attached directly to the input: http://jsfiddle.net/PEpRM/1/
// Further, even the bind method is being caught, but since we are already calling #checkValidity here, just alter
// the form-group on change.
//
// NOTE: I'm not sure we should be intervening regarding validation, this seems better as a README and snippet of code.
// BUT, I've left it here for backwards compatibility.
if (isValid) {
_this._removeHasError();
} else {
_this._addHasError();
}
}).on('focus', function () {
_Util['default'].addFormGroupFocus(_this.formGroup);
}).on('blur', function () {
_Util['default'].removeFormGroupFocus(_this.formGroup);
})
// make sure empty is added back when there is a programmatic value change.
// NOTE: programmatic changing of value using $.val() must trigger the change event i.e. $.val('x').trigger('change')
.on('change', function () {
if (_this.element.attr('type') === 'file') {
return;
}
var value = _this.element.val();
if (value) {
_this._removeIsEmpty();
} else {
_this._addIsEmpty();
}
});
}
}, {
key: '_addHasError',
value: function _addHasError() {
this.formGroup.addClass(ClassName.HAS_ERROR);
}
}, {
key: '_removeHasError',
value: function _removeHasError() {
this.formGroup.removeClass(ClassName.HAS_ERROR);
}
}, {
key: '_addIsEmpty',
value: function _addIsEmpty() {
this.formGroup.addClass(ClassName.IS_EMPTY);
}
}, {
key: '_removeIsEmpty',
value: function _removeIsEmpty() {
this.formGroup.removeClass(ClassName.IS_EMPTY);
}
}, {
key: '_isEmpty',
value: function _isEmpty() {
return this.element.val() === null || this.element.val() === undefined || this.element.val() === '';
}
}, {
key: '_convertInputSizeVariations',
value: function _convertInputSizeVariations() {
if (!this.config.convertInputSizeVariations) {
return;
}
// Modification - Change input-sm/lg to form-group-sm/lg instead (preferred standard and simpler css/less variants)
for (var inputSize in InputSizeConversions) {
if (this.element.hasClass(inputSize)) {
this.element.removeClass(inputSize);
this.formGroup.addClass(InputSizeConversions[inputSize]);
}
}
}
}, {
key: '_findOrCreateFormGroup',
value: function _findOrCreateFormGroup() {
var fg = this.element.closest(Selector.FORM_GROUP); // note that form-group may be grandparent in the case of an input-group
if (fg.length === 0) {
this.element.wrap(this.config.formGroup.template);
fg = this.element.closest(Selector.FORM_GROUP); // find node after attached (otherwise additional attachments don't work)
}
return fg;
}
// ------------------------------------------------------------------------
// static
}], [{
key: '_jQueryInterface',
value: function _jQueryInterface(config) {
return this.each(function () {
var $element = $(this);
var data = $element.data(DATA_KEY);
if (!data) {
data = new Input(this, config);
$element.data(DATA_KEY, data);
}
});
}
}]);
return Input;
})();
$.fn[NAME] = Input._jQueryInterface;
$.fn[NAME].Constructor = Input;
$.fn[NAME].noConflict = function () {
$.fn[NAME] = JQUERY_NO_CONFLICT;
return Input._jQueryInterface;
};
return Input;
})(jQuery);
module.exports = Input;
});

102
docs/dist/js/umd/radio.js vendored Normal file
View File

@ -0,0 +1,102 @@
(function (global, factory) {
if (typeof define === 'function' && define.amd) {
define(['exports', 'module'], factory);
} else if (typeof exports !== 'undefined' && typeof module !== 'undefined') {
factory(exports, module);
} else {
var mod = {
exports: {}
};
factory(mod.exports, mod);
global.radio = mod.exports;
}
})(this, function (exports, module) {
//import Util from './util'
// Radio decorator, to be called after Input
'use strict';
var _createClass = (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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
var Radio = (function ($) {
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
var NAME = 'radio';
var DATA_KEY = 'mdb.' + NAME;
var JQUERY_NO_CONFLICT = $.fn[NAME];
var Default = {
template: '<span class=\'circle\'></span><span class=\'check\'></span>'
};
/**
* ------------------------------------------------------------------------
* Class Definition
* ------------------------------------------------------------------------
*/
var Radio = (function () {
function Radio(element, config) {
_classCallCheck(this, Radio);
this.element = element;
this.config = $.extend({}, Default, config);
this.element.after(this.config.template);
}
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
*/
_createClass(Radio, [{
key: 'dispose',
value: function dispose() {
$.removeData(this.element, DATA_KEY);
this.element = null;
this.config = null;
}
// ------------------------------------------------------------------------
// private
// ------------------------------------------------------------------------
// static
}], [{
key: '_jQueryInterface',
value: function _jQueryInterface(config) {
return this.each(function () {
var $element = $(this);
var data = $element.data(DATA_KEY);
if (!data) {
data = new Radio(this, config);
$element.data(DATA_KEY, data);
}
});
}
}]);
return Radio;
})();
$.fn[NAME] = Radio._jQueryInterface;
$.fn[NAME].Constructor = Radio;
$.fn[NAME].noConflict = function () {
$.fn[NAME] = JQUERY_NO_CONFLICT;
return Radio._jQueryInterface;
};
return Radio;
})(jQuery);
module.exports = Radio;
});

352
docs/dist/js/umd/ripples.js vendored Normal file
View File

@ -0,0 +1,352 @@
(function (global, factory) {
if (typeof define === 'function' && define.amd) {
define(['exports', 'module', './util'], factory);
} else if (typeof exports !== 'undefined' && typeof module !== 'undefined') {
factory(exports, module, require('./util'));
} else {
var mod = {
exports: {}
};
factory(mod.exports, mod, global.Util);
global.ripples = mod.exports;
}
})(this, function (exports, module, _util) {
'use strict';
var _createClass = (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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
var _Util = _interopRequireDefault(_util);
var Ripples = (function ($) {
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
var NAME = 'ripples';
var DATA_KEY = 'mdb.' + NAME;
var JQUERY_NO_CONFLICT = $.fn[NAME];
var ClassName = {
CONTAINER: 'ripple-container',
DECORATOR: 'ripple-decorator'
};
var Selector = {
CONTAINER: '.' + ClassName.CONTAINER,
DECORATOR: '.' + ClassName.DECORATOR //,
};
var Default = {
container: {
template: '<div class=\'' + ClassName.CONTAINER + '\'></div>'
},
decorator: {
template: ClassName.DECORATOR + '\'></div>'
},
trigger: {
start: 'mousedown touchstart',
end: 'mouseup mouseleave touchend'
},
touchUserAgentRegex: /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i,
duration: 500
};
/**
* ------------------------------------------------------------------------
* Class Definition
* ------------------------------------------------------------------------
*/
var Ripples = (function () {
function Ripples(element, config) {
_classCallCheck(this, Ripples);
this.element = $(element);
this.config = $.extend({}, Default, config);
// attach initial listener
this.element.on(this.config.triggerStart, this._onStartRipple);
}
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
*/
_createClass(Ripples, [{
key: 'dispose',
value: function dispose() {
$.removeData(this.element, DATA_KEY);
this.element = null;
this.containerElement = null;
this.decoratorElement = null;
this.config = null;
}
// ------------------------------------------------------------------------
// private
}, {
key: '_onStartRipple',
value: function _onStartRipple(event) {
var _this = this;
// Verify if the user is just touching on a device and return if so
if (this.isTouch() && event.type === 'mousedown') {
return;
}
// Find or create the ripple container element
this._findOrCreateContainer();
// Get relY and relX positions of the container element
var relY = this._getRelY(event);
var relX = this._getRelX(event);
// If relY and/or relX are false, return the event
if (!relY && !relX) {
return;
}
// set the location and color each time (even if element is cached)
this.decoratorElement.css({
'left': relX,
'top': relY,
'background-color': this._getRipplesColor()
});
// Make sure the ripple has the styles applied (ugly hack but it works)
this._forceStyleApplication();
// Turn on the ripple animation
this.rippleOn();
// Call the rippleEnd function when the transition 'on' ends
setTimeout(function () {
_this.rippleEnd();
}, this.config.duration);
// Detect when the user leaves the element (attach only when necessary for performance)
this.element.on(this.config.triggerEnd, function () {
_this.decoratorElement.data('mousedown', 'off');
if (_this.decoratorElement.data('animating') === 'off') {
_this.rippleOut();
}
});
}
}, {
key: '_findOrCreateContainer',
value: function _findOrCreateContainer() {
if (!this.containerElement || !this.containerElement.length > 0) {
this.element.append(this.config.container.template);
this.containerElement = this.element.find(Selector.CONTAINER);
}
// always add the rippleElement, it is always removed
this.containerElement.append(this.config.element.template);
this.decoratorElement = this.containerElement.find(Selector.DECORATOR);
}
// Make sure the ripple has the styles applied (ugly hack but it works)
}, {
key: '_forceStyleApplication',
value: function _forceStyleApplication() {
return window.getComputedStyle(this.decoratorElement[0]).opacity;
}
/**
* Get the relX
*/
}, {
key: '_getRelX',
value: function _getRelX(event) {
var wrapperOffset = this.containerElement.offset();
var result = null;
if (!this.isTouch()) {
// Get the mouse position relative to the ripple wrapper
result = event.pageX - wrapperOffset.left;
} else {
// Make sure the user is using only one finger and then get the touch
// position relative to the ripple wrapper
event = event.originalEvent;
if (event.touches.length === 1) {
result = event.touches[0].pageX - wrapperOffset.left;
} else {
result = false;
}
}
return result;
}
/**
* Get the relY
*/
}, {
key: '_getRelY',
value: function _getRelY(event) {
var containerOffset = this.containerElement.offset();
var result = null;
if (!this.isTouch()) {
/**
* Get the mouse position relative to the ripple wrapper
*/
result = event.pageY - containerOffset.top;
} else {
/**
* Make sure the user is using only one finger and then get the touch
* position relative to the ripple wrapper
*/
event = event.originalEvent;
if (event.touches.length === 1) {
result = event.touches[0].pageY - containerOffset.top;
} else {
result = false;
}
}
return result;
}
/**
* Get the ripple color
*/
}, {
key: '_getRipplesColor',
value: function _getRipplesColor() {
var color = this.element.data('ripple-color') ? this.element.data('ripple-color') : window.getComputedStyle(this.element[0]).color;
return color;
}
/**
* Verify if the client is using a mobile device
*/
}, {
key: 'isTouch',
value: function isTouch() {
return this.config.touchUserAgentRegex.test(navigator.userAgent);
}
/**
* End the animation of the ripple
*/
}, {
key: 'rippleEnd',
value: function rippleEnd() {
this.decoratorElement.data('animating', 'off');
if (this.decoratorElement.data('mousedown') === 'off') {
this.rippleOut(this.decoratorElement);
}
}
/**
* Turn off the ripple effect
*/
}, {
key: 'rippleOut',
value: function rippleOut() {
var _this2 = this;
this.decoratorElement.off();
if (_Util['default'].transitionEndSupported()) {
this.decoratorElement.addClass('ripple-out');
} else {
this.decoratorElement.animate({ 'opacity': 0 }, 100, function () {
_this2.decoratorElement.triggerStart('transitionend');
});
}
this.decoratorElement.on(_Util['default'].transitionEndSelector(), function () {
_this2.decoratorElement.remove();
_this2.decoratorElement = null;
});
}
/**
* Turn on the ripple effect
*/
}, {
key: 'rippleOn',
value: function rippleOn() {
var _this3 = this;
var size = this._getNewSize();
if (_Util['default'].transitionEndSupported()) {
this.decoratorElement.css({
'-ms-transform': 'scale(' + size + ')',
'-moz-transform': 'scale(' + size + ')',
'-webkit-transform': 'scale(' + size + ')',
'transform': 'scale(' + size + ')'
}).addClass('ripple-on').data('animating', 'on').data('mousedown', 'on');
} else {
this.decoratorElement.animate({
'width': Math.max(this.element.outerWidth(), this.element.outerHeight()) * 2,
'height': Math.max(this.element.outerWidth(), this.element.outerHeight()) * 2,
'margin-left': Math.max(this.element.outerWidth(), this.element.outerHeight()) * -1,
'margin-top': Math.max(this.element.outerWidth(), this.element.outerHeight()) * -1,
'opacity': 0.2
}, this.config.duration, function () {
_this3.decoratorElement.triggerStart('transitionend');
});
}
}
/**
* Get the new size based on the element height/width and the ripple width
*/
}, {
key: '_getNewSize',
value: function _getNewSize() {
return Math.max(this.element.outerWidth(), this.element.outerHeight()) / this.decoratorElement.outerWidth() * 2.5;
}
// ------------------------------------------------------------------------
// static
}], [{
key: '_jQueryInterface',
value: function _jQueryInterface(config) {
var _this4 = this;
return this.each(function () {
var element = $(_this4);
var data = element.data(DATA_KEY);
if (!data) {
data = new Ripples(_this4, config);
element.data(DATA_KEY, data);
}
});
}
}]);
return Ripples;
})();
$.fn[NAME] = Ripples._jQueryInterface;
$.fn[NAME].Constructor = Ripples;
$.fn[NAME].noConflict = function () {
$.fn[NAME] = JQUERY_NO_CONFLICT;
return Ripples._jQueryInterface;
};
return Ripples;
})(jQuery);
module.exports = Ripples;
});

102
docs/dist/js/umd/togglebutton.js vendored Normal file
View File

@ -0,0 +1,102 @@
(function (global, factory) {
if (typeof define === 'function' && define.amd) {
define(['exports', 'module'], factory);
} else if (typeof exports !== 'undefined' && typeof module !== 'undefined') {
factory(exports, module);
} else {
var mod = {
exports: {}
};
factory(mod.exports, mod);
global.togglebutton = mod.exports;
}
})(this, function (exports, module) {
//import Util from './util'
// Togglebutton decorator, to be called after Input
'use strict';
var _createClass = (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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
var Togglebutton = (function ($) {
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
var NAME = 'togglebutton';
var DATA_KEY = 'mdb.' + NAME;
var JQUERY_NO_CONFLICT = $.fn[NAME];
var Default = {
template: '<span class=\'toggle\'></span>'
};
/**
* ------------------------------------------------------------------------
* Class Definition
* ------------------------------------------------------------------------
*/
var Togglebutton = (function () {
function Togglebutton(element, config) {
_classCallCheck(this, Togglebutton);
this.element = element;
this.config = $.extend({}, Default, config);
this.element.after(this.config.template);
}
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
*/
_createClass(Togglebutton, [{
key: 'dispose',
value: function dispose() {
$.removeData(this.element, DATA_KEY);
this.element = null;
this.config = null;
}
// ------------------------------------------------------------------------
// private
// ------------------------------------------------------------------------
// static
}], [{
key: '_jQueryInterface',
value: function _jQueryInterface(config) {
return this.each(function () {
var $element = $(this);
var data = $element.data(DATA_KEY);
if (!data) {
data = new Togglebutton(this, config);
$element.data(DATA_KEY, data);
}
});
}
}]);
return Togglebutton;
})();
$.fn[NAME] = Togglebutton._jQueryInterface;
$.fn[NAME].Constructor = Togglebutton;
$.fn[NAME].noConflict = function () {
$.fn[NAME] = JQUERY_NO_CONFLICT;
return Togglebutton._jQueryInterface;
};
return Togglebutton;
})(jQuery);
module.exports = Togglebutton;
});

118
docs/dist/js/umd/util.js vendored Normal file
View File

@ -0,0 +1,118 @@
(function (global, factory) {
if (typeof define === 'function' && define.amd) {
define(['exports', 'module'], factory);
} else if (typeof exports !== 'undefined' && typeof module !== 'undefined') {
factory(exports, module);
} else {
var mod = {
exports: {}
};
factory(mod.exports, mod);
global.util = mod.exports;
}
})(this, function (exports, module) {
'use strict';
var Util = (function ($) {
/**
* ------------------------------------------------------------------------
* Private TransitionEnd Helpers
* ------------------------------------------------------------------------
*/
var transitionEnd = false;
var _transitionEndSelector = '';
var TransitionEndEvent = {
WebkitTransition: 'webkitTransitionEnd',
MozTransition: 'transitionend',
OTransition: 'oTransitionEnd otransitionend',
transition: 'transitionend'
};
var ClassName = {
IS_FOCUSED: 'is-focused',
FORM_GROUP: 'form-group'
};
var Selector = {
FORM_GROUP: '.' + ClassName.FORM_GROUP //,
};
function transitionEndTest() {
if (window.QUnit) {
return false;
}
var el = document.createElement('mdb');
for (var _name in TransitionEndEvent) {
if (el.style[_name] !== undefined) {
return TransitionEndEvent[_name]; // { end: TransitionEndEvent[name] }
}
}
return false;
}
function setTransitionEndSupport() {
transitionEnd = transitionEndTest();
// generate a concatenated transition end event selector
for (var _name2 in TransitionEndEvent) {
_transitionEndSelector += ' ' + TransitionEndEvent[_name2];
}
}
/**
* --------------------------------------------------------------------------
* Public Util Api
* --------------------------------------------------------------------------
*/
var Util = {
transitionEndSupported: function transitionEndSupported() {
return transitionEnd;
},
transitionEndSelector: function transitionEndSelector() {
return _transitionEndSelector;
},
isChar: function isChar(event) {
if (typeof event.which === 'undefined') {
return true;
} else if (typeof event.which === 'number' && event.which > 0) {
return !event.ctrlKey && !event.metaKey && !event.altKey && event.which !== 8 && event.which !== 9;
}
return false;
},
addFormGroupFocus: function addFormGroupFocus(formGroup) {
formGroup.addClass(ClassName.IS_FOCUSED);
},
removeFormGroupFocus: function removeFormGroupFocus(formGroup) {
formGroup.removeClass(ClassName.IS_FOCUSED);
},
/**
Find expected form-group
*/
findFormGroup: function findFormGroup(element) {
var fg = element.closest(Selector.FORM_GROUP); // note that form-group may be grandparent in the case of an input-group
if (fg.length === 0) {
$.error('Failed to find form-group for ' + element);
}
return fg;
}
};
setTransitionEndSupport();
return Util;
})(jQuery);
module.exports = Util;
});

132
js/dist/autofill.js vendored Normal file
View File

@ -0,0 +1,132 @@
//import Util from './util'
'use strict';
var _createClass = (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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
var Autofill = (function ($) {
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
var NAME = 'autofill';
var DATA_KEY = 'mdb.' + NAME;
var JQUERY_NO_CONFLICT = $.fn[NAME];
var Default = {};
/**
* ------------------------------------------------------------------------
* Class Definition
* ------------------------------------------------------------------------
*/
var Autofill = (function () {
function Autofill(element, config) {
_classCallCheck(this, Autofill);
this.element = element;
this.config = $.extend({}, Default, config);
this._watchLoading();
this._attachEventHandlers();
}
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
*/
_createClass(Autofill, [{
key: 'dispose',
value: function dispose() {
$.removeData(this.element, DATA_KEY);
this.element = null;
this.config = null;
}
// ------------------------------------------------------------------------
// private
}, {
key: '_watchLoading',
value: function _watchLoading() {
var _this = this;
// After 10 seconds we are quite sure all the needed inputs are autofilled then we can stop checking them
setTimeout(function () {
clearInterval(_this._onLoading);
}, 10000);
}
// This part of code will detect autofill when the page is loading (username and password inputs for example)
}, {
key: '_onLoading',
value: function _onLoading() {
setInterval(function () {
$('input[type!=checkbox]').each(function (index, element) {
var $element = $(element);
if ($element.val() && $element.val() !== $element.attr('value')) {
$element.triggerStart('change');
}
});
}, 100);
}
}, {
key: '_attachEventHandlers',
value: function _attachEventHandlers() {
// Listen on inputs of the focused form
// (because user can select from the autofill dropdown only when the input has focus)
var focused = null;
$(document).on('focus', 'input', function (event) {
var $inputs = $(event.currentTarget).closest('form').find('input').not('[type=file]');
focused = setInterval(function () {
$inputs.each(function (index, element) {
var $element = $(element);
if ($element.val() !== $element.attr('value')) {
$element.triggerStart('change');
}
});
}, 100);
}).on('blur', '.form-group input', function () {
clearInterval(focused);
});
}
// ------------------------------------------------------------------------
// static
}], [{
key: '_jQueryInterface',
value: function _jQueryInterface(config) {
var _this2 = this;
return this.each(function () {
var $element = $(_this2);
var data = $element.data(DATA_KEY);
if (!data) {
data = new Autofill(_this2, config);
$element.data(DATA_KEY, data);
}
});
}
}]);
return Autofill;
})();
$.fn[NAME] = Autofill._jQueryInterface;
$.fn[NAME].Constructor = Autofill;
$.fn[NAME].noConflict = function () {
$.fn[NAME] = JQUERY_NO_CONFLICT;
return Autofill._jQueryInterface;
};
return Autofill;
})(jQuery);
//# sourceMappingURL=autofill.js.map

1
js/dist/autofill.js.map vendored Normal file

File diff suppressed because one or more lines are too long

169
js/dist/bootstrapMaterialDesign.js vendored Normal file
View File

@ -0,0 +1,169 @@
//import Util from './util'
/**
* $.bootstrapMaterialDesign(config) is a macro class to configure the components generally
* used in Material Design for Bootstrap. You may pass overrides to the configurations
* which will be passed into each component, or you may omit use of this class and
* configure each component separately.
*
* NOTE: If omitting use of this class, please note that the Input component must be
* initialized prior to other decorating components such as radio, checkbox,
* togglebutton, fileInput.
*
*/
'use strict';
var _createClass = (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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
var BootstrapMaterialDesign = (function ($) {
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
var NAME = 'bootstrapMaterialDesign';
var DATA_KEY = 'mdb.' + NAME;
var JQUERY_NO_CONFLICT = $.fn[NAME];
/**
*
* Default macro configuration for each component (primarily selectors).
* - selector: may be a string or an array. Any array will be joined with a comma to generate the selector
* - disable any component by defining it as false with an override. e.g. $.bootstrapMaterialDesign({ autofill: false })
*
* @see each individual component for more configuration settings.
*/
var Default = {
ripples: {
selector: ['.btn:not(.btn-link):not(.ripple-none)', '.card-image:not(.ripple-none)', '.navbar a:not(.ripple-none)', '.dropdown-menu a:not(.ripple-none)', '.nav-tabs a:not(.ripple-none)', '.pagination li:not(.active):not(.disabled) a:not(.ripple-none)', '.ripple' // generic marker class to add ripple to elements
]
},
input: {
selector: ['input.form-control', 'textarea.form-control', 'select.form-control']
},
checkbox: {
selector: '.checkbox > label > input[type=checkbox]'
},
togglebutton: {
selector: '.togglebutton > label > input[type=checkbox]'
},
radio: {
selector: '.radio > label > input[type=radio]'
},
fileInput: {
selector: 'input[type=file]'
},
autofill: {
selector: 'body'
},
arrive: true,
// create an ordered component list for instantiation
instantiation: ['ripples', 'input', 'checkbox', 'togglebutton', 'radio', 'fileInput', 'autofill']
};
/**
* ------------------------------------------------------------------------
* Class Definition
* ------------------------------------------------------------------------
*/
var BootstrapMaterialDesign = (function () {
function BootstrapMaterialDesign(element, config) {
var _this = this;
_classCallCheck(this, BootstrapMaterialDesign);
this.element = element;
this.config = $.extend({}, Default, config);
var $document = $(document);
var _loop = function (component) {
// the component's config fragment is passed in directly, allowing users to override
var componentConfig = _this.config[component];
// check to make sure component config is enabled (not `false`)
if (componentConfig) {
// assemble the selector as it may be an array
var selector = _this._resolveSelector(componentConfig);
// instantiate component on selector elements with config
$(selector)[component](componentConfig);
// add to arrive if present and enabled
if (document.arrive && _this.config.arrive) {
$document.arrive(selector, function (element) {
// eslint-disable-line no-loop-func
$(element)[component](componentConfig);
});
}
}
};
for (var component in this.config.instantiation) {
_loop(component);
}
}
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
*/
_createClass(BootstrapMaterialDesign, [{
key: 'dispose',
value: function dispose() {
$.removeData(this.element, DATA_KEY);
this.element = null;
this.config = null;
}
// ------------------------------------------------------------------------
// private
}, {
key: '_resolveSelector',
value: function _resolveSelector(componentConfig) {
var selector = componentConfig['selector'];
if (Array.isArray(selector)) {
selector = selector.join(', ');
}
return selector;
}
// ------------------------------------------------------------------------
// static
}], [{
key: '_jQueryInterface',
value: function _jQueryInterface(config) {
return this.each(function () {
var $element = $(this);
var data = $element.data(DATA_KEY);
if (!data) {
data = new BootstrapMaterialDesign(this, config);
$element.data(DATA_KEY, data);
}
});
}
}]);
return BootstrapMaterialDesign;
})();
$.fn[NAME] = BootstrapMaterialDesign._jQueryInterface;
$.fn[NAME].Constructor = BootstrapMaterialDesign;
$.fn[NAME].noConflict = function () {
$.fn[NAME] = JQUERY_NO_CONFLICT;
return BootstrapMaterialDesign._jQueryInterface;
};
return BootstrapMaterialDesign;
})(jQuery);
//# sourceMappingURL=bootstrapMaterialDesign.js.map

File diff suppressed because one or more lines are too long

105
js/dist/checkbox.js vendored Normal file
View File

@ -0,0 +1,105 @@
'use strict';
var _createClass = (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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
// Checkbox decorator, to be called after Input
var Checkbox = (function ($) {
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
var NAME = 'checkbox';
var DATA_KEY = 'mdb.' + NAME;
var JQUERY_NO_CONFLICT = $.fn[NAME];
var Default = {
template: '<span class=\'checkbox-material\'><span class=\'check\'></span></span>'
};
/**
* ------------------------------------------------------------------------
* Class Definition
* ------------------------------------------------------------------------
*/
var Checkbox = (function () {
function Checkbox(element, config) {
_classCallCheck(this, Checkbox);
this.element = element;
this.config = $.extend({}, Default, config);
this.element.after(this.config.template);
this.formGroup = Util.findFormGroup(this.element);
this._bindEventListeners();
}
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
*/
_createClass(Checkbox, [{
key: 'dispose',
value: function dispose() {
$.removeData(this.element, DATA_KEY);
this.element = null;
this.formGroup = null;
this.config = null;
}
// ------------------------------------------------------------------------
// private
}, {
key: '_bindEventListeners',
value: function _bindEventListeners() {
var _this = this;
// checkboxes didn't appear to bubble to the document, so we'll bind these directly
this.formGroup.find('.checkbox label').hover(function () {
Util.addFormGroupFocus(_this.formGroup);
}, function () {
Util.removeFormGroupFocus(_this.formGroup);
});
this.element.change(function () {
_this.element.blur();
});
}
// ------------------------------------------------------------------------
// static
}], [{
key: '_jQueryInterface',
value: function _jQueryInterface(config) {
return this.each(function () {
var $element = $(this);
var data = $element.data(DATA_KEY);
if (!data) {
data = new Checkbox(this, config);
$element.data(DATA_KEY, data);
}
});
}
}]);
return Checkbox;
})();
$.fn[NAME] = Checkbox._jQueryInterface;
$.fn[NAME].Constructor = Checkbox;
$.fn[NAME].noConflict = function () {
$.fn[NAME] = JQUERY_NO_CONFLICT;
return Checkbox._jQueryInterface;
};
return Checkbox;
})(jQuery);
//# sourceMappingURL=checkbox.js.map

1
js/dist/checkbox.js.map vendored Normal file
View File

@ -0,0 +1 @@
{"version":3,"sources":["../src/checkbox.js"],"names":[],"mappings":";;;;;;;AAGA,IAAM,QAAQ,GAAG,CAAC,UAAC,CAAC,EAAK;;;;;;;AAOvB,MAAM,IAAI,GAAG,UAAU,CAAA;AACvB,MAAM,QAAQ,YAAU,IAAI,AAAE,CAAA;AAC9B,MAAM,kBAAkB,GAAG,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAA;;AAErC,MAAM,OAAO,GAAG;AACd,YAAQ,0EAAsE;GAC/E,CAAA;;;;;;;;MAOK,QAAQ;AAED,aAFP,QAAQ,CAEA,OAAO,EAAE,MAAM,EAAE;4BAFzB,QAAQ;;AAGV,UAAI,CAAC,OAAO,GAAG,OAAO,CAAA;AACtB,UAAI,CAAC,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,EAAE,MAAM,CAAC,CAAA;;AAE3C,UAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAA;AACxC,UAAI,CAAC,SAAS,GAAG,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;;AAEjD,UAAI,CAAC,mBAAmB,EAAE,CAAA;KAC3B;;;;;;;;iBAVG,QAAQ;;aAYL,mBAAG;AACR,SAAC,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAA;AACpC,YAAI,CAAC,OAAO,GAAG,IAAI,CAAA;AACnB,YAAI,CAAC,SAAS,GAAG,IAAI,CAAA;AACrB,YAAI,CAAC,MAAM,GAAG,IAAI,CAAA;OACnB;;;;;;aAIkB,+BAAG;;;;AAEpB,YAAI,CAAC,SAAS,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC,KAAK,CAAC,YAAM;AACjD,cAAI,CAAC,iBAAiB,CAAC,MAAK,SAAS,CAAC,CAAA;SACvC,EAAE,YAAM;AACP,cAAI,CAAC,oBAAoB,CAAC,MAAK,SAAS,CAAC,CAAA;SAC1C,CAAC,CAAA;;AAEF,YAAI,CAAC,OAAO,CAAC,MAAM,CAAC,YAAM;AACxB,gBAAK,OAAO,CAAC,IAAI,EAAE,CAAA;SACpB,CAAC,CAAA;OACH;;;;;;aAIsB,0BAAC,MAAM,EAAE;AAC9B,eAAO,IAAI,CAAC,IAAI,CAAC,YAAY;AAC3B,cAAI,QAAQ,GAAG,CAAC,CAAC,IAAI,CAAC,CAAA;AACtB,cAAI,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;;AAElC,cAAI,CAAC,IAAI,EAAE;AACT,gBAAI,GAAG,IAAI,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,CAAA;AACjC,oBAAQ,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAA;WAC9B;SACF,CAAC,CAAA;OACH;;;WA9CG,QAAQ;;;AAsDd,GAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAC,gBAAgB,CAAA;AACtC,GAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,WAAW,GAAG,QAAQ,CAAA;AACjC,GAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,UAAU,GAAG,YAAM;AAC5B,KAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,kBAAkB,CAAA;AAC/B,WAAO,QAAQ,CAAC,gBAAgB,CAAA;GACjC,CAAA;;AAED,SAAO,QAAQ,CAAA;CAEhB,CAAA,CAAE,MAAM,CAAC,CAAA","file":"checkbox.js","sourcesContent":["import Util from './util'\n\n// Checkbox decorator, to be called after Input\nconst Checkbox = (($) => {\n\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n const NAME = 'checkbox'\n const DATA_KEY = `mdb.${NAME}`\n const JQUERY_NO_CONFLICT = $.fn[NAME]\n\n const Default = {\n template: `<span class='checkbox-material'><span class='check'></span></span>`\n }\n\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n class Checkbox {\n\n constructor(element, config) {\n this.element = element\n this.config = $.extend({}, Default, config)\n\n this.element.after(this.config.template)\n this.formGroup = Util.findFormGroup(this.element)\n\n this._bindEventListeners()\n }\n\n dispose() {\n $.removeData(this.element, DATA_KEY)\n this.element = null\n this.formGroup = null\n this.config = null\n }\n\n // ------------------------------------------------------------------------\n // private\n _bindEventListeners() {\n // checkboxes didn't appear to bubble to the document, so we'll bind these directly\n this.formGroup.find('.checkbox label').hover(() => {\n Util.addFormGroupFocus(this.formGroup)\n }, () => {\n Util.removeFormGroupFocus(this.formGroup)\n })\n\n this.element.change(() => {\n this.element.blur()\n })\n }\n\n // ------------------------------------------------------------------------\n // static\n static _jQueryInterface(config) {\n return this.each(function () {\n let $element = $(this)\n let data = $element.data(DATA_KEY)\n\n if (!data) {\n data = new Checkbox(this, config)\n $element.data(DATA_KEY, data)\n }\n })\n }\n }\n\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n $.fn[NAME] = Checkbox._jQueryInterface\n $.fn[NAME].Constructor = Checkbox\n $.fn[NAME].noConflict = () => {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Checkbox._jQueryInterface\n }\n\n return Checkbox\n\n})(jQuery)\n\nexport default Checkbox\n"]}

128
js/dist/fileinput.js vendored Normal file
View File

@ -0,0 +1,128 @@
'use strict';
var _createClass = (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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
// FileInput decorator, to be called after Input
var FileInput = (function ($) {
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
var NAME = 'fileInput';
var DATA_KEY = 'mdb.' + NAME;
var JQUERY_NO_CONFLICT = $.fn[NAME];
var Default = {};
var ClassName = {
IS_FILEINPUT: 'is-fileinput',
IS_EMPTY: 'is-empty'
};
/**
* ------------------------------------------------------------------------
* Class Definition
* ------------------------------------------------------------------------
*/
var FileInput = (function () {
function FileInput(element, config) {
_classCallCheck(this, FileInput);
this.element = element;
this.config = $.extend({}, Default, config);
this.formGroup = Util.findFormGroup(this.element);
this.formGroup.addClass(ClassName.IS_FILEINPUT);
this._bindEventListeners();
}
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
*/
_createClass(FileInput, [{
key: 'dispose',
value: function dispose() {
$.removeData(this.element, DATA_KEY);
this.element = null;
this.formGroup = null;
this.config = null;
}
// ------------------------------------------------------------------------
// private
}, {
key: '_bindEventListeners',
value: function _bindEventListeners() {
var _this = this;
this.formGroup.on('focus', function () {
Util.addFormGroupFocus(_this.formGroup);
}).on('blur', function () {
Util.removeFormGroupFocus(_this.formGroup);
});
// set the fileinput readonly field with the name of the file
this.element.on('change', function () {
var value = '';
$.each(_this.element.files, function (i, file) {
value += file.name + ' , ';
});
value = value.substring(0, value.length - 2);
if (value) {
_this._removeIsEmpty();
} else {
_this._addIsEmpty();
}
_this.formGroup.find('input.form-control[readonly]').val(value);
});
}
}, {
key: '_addIsEmpty',
value: function _addIsEmpty() {
this.formGroup.addClass(ClassName.IS_EMPTY);
}
}, {
key: '_removeIsEmpty',
value: function _removeIsEmpty() {
this.formGroup.removeClass(ClassName.IS_EMPTY);
}
// ------------------------------------------------------------------------
// static
}], [{
key: '_jQueryInterface',
value: function _jQueryInterface(config) {
return this.each(function () {
var $element = $(this);
var data = $element.data(DATA_KEY);
if (!data) {
data = new FileInput(this, config);
$element.data(DATA_KEY, data);
}
});
}
}]);
return FileInput;
})();
$.fn[NAME] = FileInput._jQueryInterface;
$.fn[NAME].Constructor = FileInput;
$.fn[NAME].noConflict = function () {
$.fn[NAME] = JQUERY_NO_CONFLICT;
return FileInput._jQueryInterface;
};
return FileInput;
})(jQuery);
//# sourceMappingURL=fileinput.js.map

1
js/dist/fileinput.js.map vendored Normal file

File diff suppressed because one or more lines are too long

217
js/dist/input.js vendored Normal file
View File

@ -0,0 +1,217 @@
'use strict';
var _createClass = (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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
var Input = (function ($) {
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
var NAME = 'input';
var DATA_KEY = 'mdb.' + NAME;
var JQUERY_NO_CONFLICT = $.fn[NAME];
var Default = {
convertInputSizeVariations: true,
template: '<span class=\'material-input\'></span>',
formGroup: {
template: '<div class=\'form-group\'></div>'
}
};
var InputSizeConversions = {
'input-lg': 'form-group-lg',
'input-sm': 'form-group-sm'
};
var ClassName = {
IS_EMPTY: 'is-empty',
FORM_GROUP: 'form-group',
HAS_ERROR: 'has-error'
};
var Selector = {
FORM_GROUP: '.' + ClassName.FORM_GROUP //,
};
/**
* ------------------------------------------------------------------------
* Class Definition
* ------------------------------------------------------------------------
*/
var Input = (function () {
function Input(element, config) {
_classCallCheck(this, Input);
this.element = element;
this.config = $.extend({}, Default, config);
// Requires form-group standard markup (will add it if necessary)
this.formGroup = this._findOrCreateFormGroup();
this._convertInputSizeVariations();
// Initially mark as empty
if (this._isEmpty()) {
this.formGroup.addClass(ClassName.IS_EMPTY);
}
// Add marker div the end of the form-group
this.formGroup.append(this.config.template);
this._bindEventListeners();
}
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
*/
_createClass(Input, [{
key: 'dispose',
value: function dispose() {
$.removeData(this.element, DATA_KEY);
this.element = null;
this.formGroup = null;
this.config = null;
}
// ------------------------------------------------------------------------
// private
}, {
key: '_bindEventListeners',
value: function _bindEventListeners() {
var _this = this;
this.element.on('keydown paste', function (event) {
if (Util.isChar(event)) {
_this._removeIsEmpty();
}
}).on('keyup change', function (event) {
var isValid = typeof _this.element[0].checkValidity === 'undefined' || _this.element[0].checkValidity();
if (_this.element.val() === '' && isValid) {
_this._addIsEmpty();
} else {
_this._removeIsEmpty();
}
// Validation events do not bubble, so they must be attached directly to the input: http://jsfiddle.net/PEpRM/1/
// Further, even the bind method is being caught, but since we are already calling #checkValidity here, just alter
// the form-group on change.
//
// NOTE: I'm not sure we should be intervening regarding validation, this seems better as a README and snippet of code.
// BUT, I've left it here for backwards compatibility.
if (isValid) {
_this._removeHasError();
} else {
_this._addHasError();
}
}).on('focus', function () {
Util.addFormGroupFocus(_this.formGroup);
}).on('blur', function () {
Util.removeFormGroupFocus(_this.formGroup);
})
// make sure empty is added back when there is a programmatic value change.
// NOTE: programmatic changing of value using $.val() must trigger the change event i.e. $.val('x').trigger('change')
.on('change', function () {
if (_this.element.attr('type') === 'file') {
return;
}
var value = _this.element.val();
if (value) {
_this._removeIsEmpty();
} else {
_this._addIsEmpty();
}
});
}
}, {
key: '_addHasError',
value: function _addHasError() {
this.formGroup.addClass(ClassName.HAS_ERROR);
}
}, {
key: '_removeHasError',
value: function _removeHasError() {
this.formGroup.removeClass(ClassName.HAS_ERROR);
}
}, {
key: '_addIsEmpty',
value: function _addIsEmpty() {
this.formGroup.addClass(ClassName.IS_EMPTY);
}
}, {
key: '_removeIsEmpty',
value: function _removeIsEmpty() {
this.formGroup.removeClass(ClassName.IS_EMPTY);
}
}, {
key: '_isEmpty',
value: function _isEmpty() {
return this.element.val() === null || this.element.val() === undefined || this.element.val() === '';
}
}, {
key: '_convertInputSizeVariations',
value: function _convertInputSizeVariations() {
if (!this.config.convertInputSizeVariations) {
return;
}
// Modification - Change input-sm/lg to form-group-sm/lg instead (preferred standard and simpler css/less variants)
for (var inputSize in InputSizeConversions) {
if (this.element.hasClass(inputSize)) {
this.element.removeClass(inputSize);
this.formGroup.addClass(InputSizeConversions[inputSize]);
}
}
}
}, {
key: '_findOrCreateFormGroup',
value: function _findOrCreateFormGroup() {
var fg = this.element.closest(Selector.FORM_GROUP); // note that form-group may be grandparent in the case of an input-group
if (fg.length === 0) {
this.element.wrap(this.config.formGroup.template);
fg = this.element.closest(Selector.FORM_GROUP); // find node after attached (otherwise additional attachments don't work)
}
return fg;
}
// ------------------------------------------------------------------------
// static
}], [{
key: '_jQueryInterface',
value: function _jQueryInterface(config) {
return this.each(function () {
var $element = $(this);
var data = $element.data(DATA_KEY);
if (!data) {
data = new Input(this, config);
$element.data(DATA_KEY, data);
}
});
}
}]);
return Input;
})();
$.fn[NAME] = Input._jQueryInterface;
$.fn[NAME].Constructor = Input;
$.fn[NAME].noConflict = function () {
$.fn[NAME] = JQUERY_NO_CONFLICT;
return Input._jQueryInterface;
};
return Input;
})(jQuery);
//# sourceMappingURL=input.js.map

1
js/dist/input.js.map vendored Normal file

File diff suppressed because one or more lines are too long

87
js/dist/radio.js vendored Normal file
View File

@ -0,0 +1,87 @@
//import Util from './util'
// Radio decorator, to be called after Input
'use strict';
var _createClass = (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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
var Radio = (function ($) {
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
var NAME = 'radio';
var DATA_KEY = 'mdb.' + NAME;
var JQUERY_NO_CONFLICT = $.fn[NAME];
var Default = {
template: '<span class=\'circle\'></span><span class=\'check\'></span>'
};
/**
* ------------------------------------------------------------------------
* Class Definition
* ------------------------------------------------------------------------
*/
var Radio = (function () {
function Radio(element, config) {
_classCallCheck(this, Radio);
this.element = element;
this.config = $.extend({}, Default, config);
this.element.after(this.config.template);
}
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
*/
_createClass(Radio, [{
key: 'dispose',
value: function dispose() {
$.removeData(this.element, DATA_KEY);
this.element = null;
this.config = null;
}
// ------------------------------------------------------------------------
// private
// ------------------------------------------------------------------------
// static
}], [{
key: '_jQueryInterface',
value: function _jQueryInterface(config) {
return this.each(function () {
var $element = $(this);
var data = $element.data(DATA_KEY);
if (!data) {
data = new Radio(this, config);
$element.data(DATA_KEY, data);
}
});
}
}]);
return Radio;
})();
$.fn[NAME] = Radio._jQueryInterface;
$.fn[NAME].Constructor = Radio;
$.fn[NAME].noConflict = function () {
$.fn[NAME] = JQUERY_NO_CONFLICT;
return Radio._jQueryInterface;
};
return Radio;
})(jQuery);
//# sourceMappingURL=radio.js.map

1
js/dist/radio.js.map vendored Normal file
View File

@ -0,0 +1 @@
{"version":3,"sources":["../src/radio.js"],"names":[],"mappings":";;;;;;;;;AAGA,IAAM,KAAK,GAAG,CAAC,UAAC,CAAC,EAAK;;;;;;;AAOpB,MAAM,IAAI,GAAG,OAAO,CAAA;AACpB,MAAM,QAAQ,YAAU,IAAI,AAAE,CAAA;AAC9B,MAAM,kBAAkB,GAAG,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAA;;AAErC,MAAM,OAAO,GAAG;AACd,YAAQ,+DAA2D;GACpE,CAAA;;;;;;;;MAOK,KAAK;AAEE,aAFP,KAAK,CAEG,OAAO,EAAE,MAAM,EAAE;4BAFzB,KAAK;;AAGP,UAAI,CAAC,OAAO,GAAG,OAAO,CAAA;AACtB,UAAI,CAAC,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,EAAE,MAAM,CAAC,CAAA;;AAE3C,UAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAA;KACzC;;;;;;;;iBAPG,KAAK;;aASF,mBAAG;AACR,SAAC,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAA;AACpC,YAAI,CAAC,OAAO,GAAG,IAAI,CAAA;AACnB,YAAI,CAAC,MAAM,GAAG,IAAI,CAAA;OACnB;;;;;;;;;aAOsB,0BAAC,MAAM,EAAE;AAC9B,eAAO,IAAI,CAAC,IAAI,CAAC,YAAY;AAC3B,cAAI,QAAQ,GAAG,CAAC,CAAC,IAAI,CAAC,CAAA;AACtB,cAAI,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;;AAElC,cAAI,CAAC,IAAI,EAAE;AACT,gBAAI,GAAG,IAAI,KAAK,CAAC,IAAI,EAAE,MAAM,CAAC,CAAA;AAC9B,oBAAQ,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAA;WAC9B;SACF,CAAC,CAAA;OACH;;;WA9BG,KAAK;;;AAsCX,GAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,gBAAgB,CAAA;AACnC,GAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,WAAW,GAAG,KAAK,CAAA;AAC9B,GAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,UAAU,GAAG,YAAM;AAC5B,KAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,kBAAkB,CAAA;AAC/B,WAAO,KAAK,CAAC,gBAAgB,CAAA;GAC9B,CAAA;;AAED,SAAO,KAAK,CAAA;CAEb,CAAA,CAAE,MAAM,CAAC,CAAA","file":"radio.js","sourcesContent":["//import Util from './util'\n\n// Radio decorator, to be called after Input\nconst Radio = (($) => {\n\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n const NAME = 'radio'\n const DATA_KEY = `mdb.${NAME}`\n const JQUERY_NO_CONFLICT = $.fn[NAME]\n\n const Default = {\n template: `<span class='circle'></span><span class='check'></span>`\n }\n\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n class Radio {\n\n constructor(element, config) {\n this.element = element\n this.config = $.extend({}, Default, config)\n\n this.element.after(this.config.template)\n }\n\n dispose() {\n $.removeData(this.element, DATA_KEY)\n this.element = null\n this.config = null\n }\n\n // ------------------------------------------------------------------------\n // private\n\n // ------------------------------------------------------------------------\n // static\n static _jQueryInterface(config) {\n return this.each(function () {\n let $element = $(this)\n let data = $element.data(DATA_KEY)\n\n if (!data) {\n data = new Radio(this, config)\n $element.data(DATA_KEY, data)\n }\n })\n }\n }\n\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n $.fn[NAME] = Radio._jQueryInterface\n $.fn[NAME].Constructor = Radio\n $.fn[NAME].noConflict = () => {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Radio._jQueryInterface\n }\n\n return Radio\n\n})(jQuery)\n\nexport default Radio\n"]}

355
js/dist/ripples.js vendored
View File

@ -12,20 +12,32 @@ var Ripples = (function ($) {
* ------------------------------------------------------------------------
*/
var NAME = 'ripples';
var DATA_KEY = 'bmd.' + NAME;
var EVENT_KEY = '.' + DATA_KEY;
var DATA_API_KEY = '.data-api';
var DATA_KEY = 'mdb.' + NAME;
var JQUERY_NO_CONFLICT = $.fn[NAME];
var DEFAULT_OPTIONS = {};
var Selector = {
DATA_DISMISS: '[data-dismiss="ripples"]'
var ClassName = {
CONTAINER: 'ripple-container',
DECORATOR: 'ripple-decorator'
};
var Event = {
CLOSE: 'close' + EVENT_KEY,
CLOSED: 'closed' + EVENT_KEY,
CLICK_DATA_API: 'click' + EVENT_KEY + DATA_API_KEY
var Selector = {
CONTAINER: '.' + ClassName.CONTAINER,
DECORATOR: '.' + ClassName.DECORATOR //,
};
var Default = {
container: {
template: '<div class=\'' + ClassName.CONTAINER + '\'></div>'
},
decorator: {
template: ClassName.DECORATOR + '\'></div>'
},
trigger: {
start: 'mousedown touchstart',
end: 'mouseup mouseleave touchend'
},
touchUserAgentRegex: /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i,
duration: 500
};
/**
@ -35,176 +47,129 @@ var Ripples = (function ($) {
*/
var Ripples = (function () {
function Ripples(element, options) {
function Ripples(element, config) {
_classCallCheck(this, Ripples);
this.element = $(element);
this.config = $.extend({}, DEFAULT_OPTIONS, options);
this.config = $.extend({}, Default, config);
this.element.on("mousedown touchstart", this._createRipple);
// attach initial listener
this.element.on(this.config.triggerStart, this._onStartRipple);
}
/**
* ------------------------------------------------------------------------
* Data Api implementation
* ------------------------------------------------------------------------
*/
//$(document).on(
// Event.CLICK_DATA_API,
// Selector.DATA_DISMISS,
// Ripples._handleClose(new Ripples())
//)
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
*/
// getters
_createClass(Ripples, [{
key: 'close',
// public
value: function close(element) {
element = element || this.element;
var rootElement = this._getRootElement(element);
var customEvent = this._triggerCloseEvent(rootElement);
if (customEvent.isDefaultPrevented()) {
return;
}
this._removeElement(rootElement);
}
}, {
key: 'dispose',
value: function dispose() {
$.removeData(this.element, DATA_KEY);
this.element = null;
this.containerElement = null;
this.decoratorElement = null;
this.config = null;
}
// ------------------------------------------------------------------------
// private
}, {
key: '_createRipple',
value: function _createRipple(event) {
key: '_onStartRipple',
value: function _onStartRipple(event) {
var _this = this;
/**
* Verify if the user is just touching on a device and return if so
*/
if (this.isTouch() && event.type === "mousedown") {
// Verify if the user is just touching on a device and return if so
if (this.isTouch() && event.type === 'mousedown') {
return;
}
/**
* Verify if the current element already has a ripple wrapper element and
* creates if it doesn't
*/
if (!this.element.find(".ripple-container").length) {
this.element.append("<div class=\"ripple-container\"></div>");
}
// Find or create the ripple container element
this._findOrCreateContainer();
/**
* Find the ripple wrapper
*/
var $container = this.element.children(".ripple-container");
// Get relY and relX positions of the container element
var relY = this._getRelY(event);
var relX = this._getRelX(event);
/**
* Get relY and relX positions
*/
var relY = this._getRelY($container, event);
var relX = this._getRelX($container, event);
/**
* If relY and/or relX are false, return the event
*/
// If relY and/or relX are false, return the event
if (!relY && !relX) {
return;
}
/**
* Get the ripple color
*/
var rippleColor = this._getRipplesColor(this.element);
/**
* Create the ripple element
*/
var $ripple = $("<div></div>");
$ripple.addClass("ripple").css({
"left": relX,
"top": relY,
"background-color": rippleColor
// set the location and color each time (even if element is cached)
this.decoratorElement.css({
'left': relX,
'top': relY,
'background-color': this._getRipplesColor()
});
/**
* Append the ripple to the wrapper
*/
$container.append($ripple);
// Make sure the ripple has the styles applied (ugly hack but it works)
this._forceStyleApplication();
/**
* Make sure the ripple has the styles applied (ugly hack but it works)
*/
(function () {
return window.getComputedStyle($ripple[0]).opacity;
})();
// Turn on the ripple animation
this.rippleOn();
/**
* Turn on the ripple animation
*/
this.rippleOn(this.element, $ripple);
/**
* Call the rippleEnd function when the transition "on" ends
*/
// Call the rippleEnd function when the transition 'on' ends
setTimeout(function () {
this.rippleEnd($ripple);
}, 500);
_this.rippleEnd();
}, this.config.duration);
/**
* Detect when the user leaves the element
*/
this.element.on("mouseup mouseleave touchend", function () {
$ripple.data("mousedown", "off");
// Detect when the user leaves the element (attach only when necessary for performance)
this.element.on(this.config.triggerEnd, function () {
_this.decoratorElement.data('mousedown', 'off');
if ($ripple.data("animating") === "off") {
this.rippleOut($ripple);
if (_this.decoratorElement.data('animating') === 'off') {
_this.rippleOut();
}
});
}
}, {
key: '_findOrCreateContainer',
value: function _findOrCreateContainer() {
if (!this.containerElement || !this.containerElement.length > 0) {
this.element.append(this.config.container.template);
this.containerElement = this.element.find(Selector.CONTAINER);
}
// always add the rippleElement, it is always removed
this.containerElement.append(this.config.element.template);
this.decoratorElement = this.containerElement.find(Selector.DECORATOR);
}
// Make sure the ripple has the styles applied (ugly hack but it works)
}, {
key: '_forceStyleApplication',
value: function _forceStyleApplication() {
return window.getComputedStyle(this.decoratorElement[0]).opacity;
}
/**
* Get the relX
*/
}, {
key: '_getRelX',
value: function _getRelX($container, event) {
var wrapperOffset = $container.offset();
value: function _getRelX(event) {
var wrapperOffset = this.containerElement.offset();
var result = null;
if (!this.isTouch()) {
/**
* Get the mouse position relative to the ripple wrapper
*/
return event.pageX - wrapperOffset.left;
// Get the mouse position relative to the ripple wrapper
result = event.pageX - wrapperOffset.left;
} else {
/**
* Make sure the user is using only one finger and then get the touch
* position relative to the ripple wrapper
*/
// Make sure the user is using only one finger and then get the touch
// position relative to the ripple wrapper
event = event.originalEvent;
if (event.touches.length === 1) {
return event.touches[0].pageX - wrapperOffset.left;
result = event.touches[0].pageX - wrapperOffset.left;
} else {
result = false;
}
return false;
}
return result;
}
/**
@ -212,14 +177,15 @@ var Ripples = (function ($) {
*/
}, {
key: '_getRelY',
value: function _getRelY($container, event) {
var wrapperOffset = $container.offset();
value: function _getRelY(event) {
var containerOffset = this.containerElement.offset();
var result = null;
if (!this.isTouch()) {
/**
* Get the mouse position relative to the ripple wrapper
*/
return event.pageY - wrapperOffset.top;
result = event.pageY - containerOffset.top;
} else {
/**
* Make sure the user is using only one finger and then get the touch
@ -228,11 +194,13 @@ var Ripples = (function ($) {
event = event.originalEvent;
if (event.touches.length === 1) {
return event.touches[0].pageY - wrapperOffset.top;
result = event.touches[0].pageY - containerOffset.top;
} else {
result = false;
}
return false;
}
return result;
}
/**
@ -240,35 +208,18 @@ var Ripples = (function ($) {
*/
}, {
key: '_getRipplesColor',
value: function _getRipplesColor($element) {
var color = $element.data("ripple-color") ? $element.data("ripple-color") : window.getComputedStyle($element[0]).color;
value: function _getRipplesColor() {
var color = this.element.data('ripple-color') ? this.element.data('ripple-color') : window.getComputedStyle(this.element[0]).color;
return color;
}
/**
* Verify if the client browser has transistion support
*/
}, {
key: '_hasTransitionSupport',
value: function _hasTransitionSupport() {
var thisBody = document.body || document.documentElement;
var thisStyle = thisBody.style;
var support = thisStyle.transition !== undefined || thisStyle.WebkitTransition !== undefined || thisStyle.MozTransition !== undefined || thisStyle.MsTransition !== undefined || thisStyle.OTransition !== undefined;
return support;
}
/**
* Verify if the client is using a mobile device
*/
}, {
key: 'isTouch',
value: function isTouch() {
return (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)
);
return this.config.touchUserAgentRegex.test(navigator.userAgent);
}
/**
@ -276,11 +227,11 @@ var Ripples = (function ($) {
*/
}, {
key: 'rippleEnd',
value: function rippleEnd($ripple) {
$ripple.data("animating", "off");
value: function rippleEnd() {
this.decoratorElement.data('animating', 'off');
if ($ripple.data("mousedown") === "off") {
this.rippleOut($ripple);
if (this.decoratorElement.data('mousedown') === 'off') {
this.rippleOut(this.decoratorElement);
}
}
@ -289,19 +240,22 @@ var Ripples = (function ($) {
*/
}, {
key: 'rippleOut',
value: function rippleOut($ripple) {
$ripple.off();
value: function rippleOut() {
var _this2 = this;
if (this._hasTransitionSupport()) {
$ripple.addClass("ripple-out");
this.decoratorElement.off();
if (Util.transitionEndSupported()) {
this.decoratorElement.addClass('ripple-out');
} else {
$ripple.animate({ "opacity": 0 }, 100, function () {
$ripple.triggerStart("transitionend");
this.decoratorElement.animate({ 'opacity': 0 }, 100, function () {
_this2.decoratorElement.triggerStart('transitionend');
});
}
$ripple.on("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd", function () {
$ripple.remove();
this.decoratorElement.on(Util.transitionEndSelector(), function () {
_this2.decoratorElement.remove();
_this2.decoratorElement = null;
});
}
@ -310,67 +264,58 @@ var Ripples = (function ($) {
*/
}, {
key: 'rippleOn',
value: function rippleOn($element, $ripple) {
var size = this._getNewSize($element, $ripple);
value: function rippleOn() {
var _this3 = this;
if (this._hasTransitionSupport()) {
$ripple.css({
"-ms-transform": "scale(" + size + ")",
"-moz-transform": "scale(" + size + ")",
"-webkit-transform": "scale(" + size + ")",
"transform": "scale(" + size + ")"
}).addClass("ripple-on").data("animating", "on").data("mousedown", "on");
var size = this._getNewSize();
if (Util.transitionEndSupported()) {
this.decoratorElement.css({
'-ms-transform': 'scale(' + size + ')',
'-moz-transform': 'scale(' + size + ')',
'-webkit-transform': 'scale(' + size + ')',
'transform': 'scale(' + size + ')'
}).addClass('ripple-on').data('animating', 'on').data('mousedown', 'on');
} else {
$ripple.animate({
"width": Math.max($element.outerWidth(), $element.outerHeight()) * 2,
"height": Math.max($element.outerWidth(), $element.outerHeight()) * 2,
"margin-left": Math.max($element.outerWidth(), $element.outerHeight()) * -1,
"margin-top": Math.max($element.outerWidth(), $element.outerHeight()) * -1,
"opacity": 0.2
}, 500, function () {
$ripple.triggerStart("transitionend");
this.decoratorElement.animate({
'width': Math.max(this.element.outerWidth(), this.element.outerHeight()) * 2,
'height': Math.max(this.element.outerWidth(), this.element.outerHeight()) * 2,
'margin-left': Math.max(this.element.outerWidth(), this.element.outerHeight()) * -1,
'margin-top': Math.max(this.element.outerWidth(), this.element.outerHeight()) * -1,
'opacity': 0.2
}, this.config.duration, function () {
_this3.decoratorElement.triggerStart('transitionend');
});
}
}
// ------------------------------------------------------------------------
// static
/**
* Get the new size based on the element height/width and the ripple width
*/
}], [{
key: '_getNewSize',
value: function _getNewSize($element, $ripple) {
return Math.max($element.outerWidth(), $element.outerHeight()) / $ripple.outerWidth() * 2.5;
}
}, {
key: '_getNewSize',
value: function _getNewSize() {
return Math.max(this.element.outerWidth(), this.element.outerHeight()) / this.decoratorElement.outerWidth() * 2.5;
}
// ------------------------------------------------------------------------
// static
}], [{
key: '_jQueryInterface',
value: function _jQueryInterface(options) {
value: function _jQueryInterface(config) {
var _this4 = this;
return this.each(function () {
var $element = $(this);
var data = $element.data(DATA_KEY);
var element = $(_this4);
var data = element.data(DATA_KEY);
if (!data) {
data = new Ripples(this, options);
$element.data(DATA_KEY, data);
data = new Ripples(_this4, config);
element.data(DATA_KEY, data);
}
});
}
//static _handleClose(fooInstance) {
// return function (event) {
// if (event) {
// event.preventDefault()
// }
//
// fooInstance.close(this)
// }
//}
}, {
key: 'NAME',
get: function get() {
return NAME;
}
}]);
return Ripples;

File diff suppressed because one or more lines are too long

87
js/dist/togglebutton.js vendored Normal file
View File

@ -0,0 +1,87 @@
//import Util from './util'
// Togglebutton decorator, to be called after Input
'use strict';
var _createClass = (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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
var Togglebutton = (function ($) {
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
var NAME = 'togglebutton';
var DATA_KEY = 'mdb.' + NAME;
var JQUERY_NO_CONFLICT = $.fn[NAME];
var Default = {
template: '<span class=\'toggle\'></span>'
};
/**
* ------------------------------------------------------------------------
* Class Definition
* ------------------------------------------------------------------------
*/
var Togglebutton = (function () {
function Togglebutton(element, config) {
_classCallCheck(this, Togglebutton);
this.element = element;
this.config = $.extend({}, Default, config);
this.element.after(this.config.template);
}
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
*/
_createClass(Togglebutton, [{
key: 'dispose',
value: function dispose() {
$.removeData(this.element, DATA_KEY);
this.element = null;
this.config = null;
}
// ------------------------------------------------------------------------
// private
// ------------------------------------------------------------------------
// static
}], [{
key: '_jQueryInterface',
value: function _jQueryInterface(config) {
return this.each(function () {
var $element = $(this);
var data = $element.data(DATA_KEY);
if (!data) {
data = new Togglebutton(this, config);
$element.data(DATA_KEY, data);
}
});
}
}]);
return Togglebutton;
})();
$.fn[NAME] = Togglebutton._jQueryInterface;
$.fn[NAME].Constructor = Togglebutton;
$.fn[NAME].noConflict = function () {
$.fn[NAME] = JQUERY_NO_CONFLICT;
return Togglebutton._jQueryInterface;
};
return Togglebutton;
})(jQuery);
//# sourceMappingURL=togglebutton.js.map

1
js/dist/togglebutton.js.map vendored Normal file
View File

@ -0,0 +1 @@
{"version":3,"sources":["../src/togglebutton.js"],"names":[],"mappings":";;;;;;;;;AAGA,IAAM,YAAY,GAAG,CAAC,UAAC,CAAC,EAAK;;;;;;;AAO3B,MAAM,IAAI,GAAG,cAAc,CAAA;AAC3B,MAAM,QAAQ,YAAU,IAAI,AAAE,CAAA;AAC9B,MAAM,kBAAkB,GAAG,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAA;;AAErC,MAAM,OAAO,GAAG;AACd,YAAQ,kCAAgC;GACzC,CAAA;;;;;;;;MAOK,YAAY;AAEL,aAFP,YAAY,CAEJ,OAAO,EAAE,MAAM,EAAE;4BAFzB,YAAY;;AAGd,UAAI,CAAC,OAAO,GAAG,OAAO,CAAA;AACtB,UAAI,CAAC,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,EAAE,MAAM,CAAC,CAAA;;AAE3C,UAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAA;KACzC;;;;;;;;iBAPG,YAAY;;aAST,mBAAG;AACR,SAAC,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAA;AACpC,YAAI,CAAC,OAAO,GAAG,IAAI,CAAA;AACnB,YAAI,CAAC,MAAM,GAAG,IAAI,CAAA;OACnB;;;;;;;;;aAOsB,0BAAC,MAAM,EAAE;AAC9B,eAAO,IAAI,CAAC,IAAI,CAAC,YAAY;AAC3B,cAAI,QAAQ,GAAG,CAAC,CAAC,IAAI,CAAC,CAAA;AACtB,cAAI,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;;AAElC,cAAI,CAAC,IAAI,EAAE;AACT,gBAAI,GAAG,IAAI,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAA;AACrC,oBAAQ,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAA;WAC9B;SACF,CAAC,CAAA;OACH;;;WA9BG,YAAY;;;AAsClB,GAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,YAAY,CAAC,gBAAgB,CAAA;AAC1C,GAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,WAAW,GAAG,YAAY,CAAA;AACrC,GAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,UAAU,GAAG,YAAM;AAC5B,KAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,kBAAkB,CAAA;AAC/B,WAAO,YAAY,CAAC,gBAAgB,CAAA;GACrC,CAAA;;AAED,SAAO,YAAY,CAAA;CAEpB,CAAA,CAAE,MAAM,CAAC,CAAA","file":"togglebutton.js","sourcesContent":["//import Util from './util'\n\n// Togglebutton decorator, to be called after Input\nconst Togglebutton = (($) => {\n\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n const NAME = 'togglebutton'\n const DATA_KEY = `mdb.${NAME}`\n const JQUERY_NO_CONFLICT = $.fn[NAME]\n\n const Default = {\n template: `<span class='toggle'></span>`\n }\n\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n class Togglebutton {\n\n constructor(element, config) {\n this.element = element\n this.config = $.extend({}, Default, config)\n\n this.element.after(this.config.template)\n }\n\n dispose() {\n $.removeData(this.element, DATA_KEY)\n this.element = null\n this.config = null\n }\n\n // ------------------------------------------------------------------------\n // private\n\n // ------------------------------------------------------------------------\n // static\n static _jQueryInterface(config) {\n return this.each(function () {\n let $element = $(this)\n let data = $element.data(DATA_KEY)\n\n if (!data) {\n data = new Togglebutton(this, config)\n $element.data(DATA_KEY, data)\n }\n })\n }\n }\n\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n $.fn[NAME] = Togglebutton._jQueryInterface\n $.fn[NAME].Constructor = Togglebutton\n $.fn[NAME].noConflict = () => {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Togglebutton._jQueryInterface\n }\n\n return Togglebutton\n\n})(jQuery)\n\nexport default Togglebutton\n"]}

103
js/dist/util.js vendored Normal file
View File

@ -0,0 +1,103 @@
'use strict';
var Util = (function ($) {
/**
* ------------------------------------------------------------------------
* Private TransitionEnd Helpers
* ------------------------------------------------------------------------
*/
var transitionEnd = false;
var _transitionEndSelector = '';
var TransitionEndEvent = {
WebkitTransition: 'webkitTransitionEnd',
MozTransition: 'transitionend',
OTransition: 'oTransitionEnd otransitionend',
transition: 'transitionend'
};
var ClassName = {
IS_FOCUSED: 'is-focused',
FORM_GROUP: 'form-group'
};
var Selector = {
FORM_GROUP: '.' + ClassName.FORM_GROUP //,
};
function transitionEndTest() {
if (window.QUnit) {
return false;
}
var el = document.createElement('mdb');
for (var _name in TransitionEndEvent) {
if (el.style[_name] !== undefined) {
return TransitionEndEvent[_name]; // { end: TransitionEndEvent[name] }
}
}
return false;
}
function setTransitionEndSupport() {
transitionEnd = transitionEndTest();
// generate a concatenated transition end event selector
for (var _name2 in TransitionEndEvent) {
_transitionEndSelector += ' ' + TransitionEndEvent[_name2];
}
}
/**
* --------------------------------------------------------------------------
* Public Util Api
* --------------------------------------------------------------------------
*/
var Util = {
transitionEndSupported: function transitionEndSupported() {
return transitionEnd;
},
transitionEndSelector: function transitionEndSelector() {
return _transitionEndSelector;
},
isChar: function isChar(event) {
if (typeof event.which === 'undefined') {
return true;
} else if (typeof event.which === 'number' && event.which > 0) {
return !event.ctrlKey && !event.metaKey && !event.altKey && event.which !== 8 && event.which !== 9;
}
return false;
},
addFormGroupFocus: function addFormGroupFocus(formGroup) {
formGroup.addClass(ClassName.IS_FOCUSED);
},
removeFormGroupFocus: function removeFormGroupFocus(formGroup) {
formGroup.removeClass(ClassName.IS_FOCUSED);
},
/**
Find expected form-group
*/
findFormGroup: function findFormGroup(element) {
var fg = element.closest(Selector.FORM_GROUP); // note that form-group may be grandparent in the case of an input-group
if (fg.length === 0) {
$.error('Failed to find form-group for ' + element);
}
return fg;
}
};
setTransitionEndSupport();
return Util;
})(jQuery);
//# sourceMappingURL=util.js.map

1
js/dist/util.js.map vendored Normal file
View File

@ -0,0 +1 @@
{"version":3,"sources":["../src/util.js"],"names":[],"mappings":";;AAAA,IAAM,IAAI,GAAG,CAAC,UAAC,CAAC,EAAK;;;;;;;;AAQnB,MAAI,aAAa,GAAG,KAAK,CAAA;AACzB,MAAI,sBAAqB,GAAG,EAAE,CAAA;;AAE9B,MAAM,kBAAkB,GAAG;AACzB,oBAAgB,EAAE,qBAAqB;AACvC,iBAAa,EAAE,eAAe;AAC9B,eAAW,EAAE,+BAA+B;AAC5C,cAAU,EAAE,eAAe;GAC5B,CAAA;;AAED,MAAM,SAAS,GAAG;AAChB,cAAU,EAAE,YAAY;AACxB,cAAU,EAAE,YAAY;GACzB,CAAA;;AAED,MAAM,QAAQ,GAAG;AACf,cAAU,QAAM,SAAS,CAAC,UAAU,AAAE;GACvC,CAAA;;AAED,WAAS,iBAAiB,GAAG;AAC3B,QAAI,MAAM,CAAC,KAAK,EAAE;AAChB,aAAO,KAAK,CAAA;KACb;;AAED,QAAI,EAAE,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAA;;AAEtC,SAAK,IAAI,KAAI,IAAI,kBAAkB,EAAE;AACnC,UAAI,EAAE,CAAC,KAAK,CAAC,KAAI,CAAC,KAAK,SAAS,EAAE;AAChC,eAAO,kBAAkB,CAAC,KAAI,CAAC,CAAA;OAChC;KACF;;AAED,WAAO,KAAK,CAAA;GACb;;AAED,WAAS,uBAAuB,GAAG;AACjC,iBAAa,GAAG,iBAAiB,EAAE,CAAA;;;AAGnC,SAAK,IAAI,MAAI,IAAI,kBAAkB,EAAE;AACnC,4BAAqB,UAAQ,kBAAkB,CAAC,MAAI,CAAC,AAAE,CAAA;KACxD;GACF;;;;;;;;AAQD,MAAI,IAAI,GAAG;;AAET,0BAAsB,EAAA,kCAAG;AACvB,aAAO,aAAa,CAAA;KACrB;;AAED,yBAAqB,EAAA,iCAAI;AACvB,aAAO,sBAAqB,CAAA;KAC7B;;AAED,UAAM,EAAA,gBAAC,KAAK,EAAE;AACZ,UAAI,OAAO,KAAK,CAAC,KAAK,KAAK,WAAW,EAAE;AACtC,eAAO,IAAI,CAAA;OACZ,MAAM,IAAI,OAAO,KAAK,CAAC,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,KAAK,GAAG,CAAC,EAAE;AAC7D,eAAO,CAAC,KAAK,CAAC,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,KAAK,KAAK,CAAC,IAAI,KAAK,CAAC,KAAK,KAAK,CAAC,CAAA;OACnG;AACD,aAAO,KAAK,CAAA;KACb;;AAED,qBAAiB,EAAA,2BAAC,SAAS,EAAE;AAC3B,eAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,UAAU,CAAC,CAAA;KACzC;;AAED,wBAAoB,EAAA,8BAAC,SAAS,EAAE;AAC9B,eAAS,CAAC,WAAW,CAAC,SAAS,CAAC,UAAU,CAAC,CAAA;KAC5C;;;;;AAKD,iBAAa,EAAA,uBAAC,OAAO,EAAE;AACrB,UAAI,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAA;AAC7C,UAAI,EAAE,CAAC,MAAM,KAAK,CAAC,EAAE;AACnB,SAAC,CAAC,KAAK,oCAAkC,OAAO,CAAG,CAAA;OACpD;AACD,aAAO,EAAE,CAAA;KACV;GACF,CAAA;;AAED,yBAAuB,EAAE,CAAA;AACzB,SAAO,IAAI,CAAA;CAEZ,CAAA,CAAE,MAAM,CAAC,CAAA","file":"util.js","sourcesContent":["const Util = (($) => {\n\n /**\n * ------------------------------------------------------------------------\n * Private TransitionEnd Helpers\n * ------------------------------------------------------------------------\n */\n\n let transitionEnd = false\n let transitionEndSelector = ''\n\n const TransitionEndEvent = {\n WebkitTransition: 'webkitTransitionEnd',\n MozTransition: 'transitionend',\n OTransition: 'oTransitionEnd otransitionend',\n transition: 'transitionend'\n }\n\n const ClassName = {\n IS_FOCUSED: 'is-focused',\n FORM_GROUP: 'form-group'\n }\n\n const Selector = {\n FORM_GROUP: `.${ClassName.FORM_GROUP}` //,\n }\n\n function transitionEndTest() {\n if (window.QUnit) {\n return false\n }\n\n let el = document.createElement('mdb')\n\n for (let name in TransitionEndEvent) {\n if (el.style[name] !== undefined) {\n return TransitionEndEvent[name] // { end: TransitionEndEvent[name] }\n }\n }\n\n return false\n }\n\n function setTransitionEndSupport() {\n transitionEnd = transitionEndTest()\n\n // generate a concatenated transition end event selector\n for (let name in TransitionEndEvent) {\n transitionEndSelector += ` ${TransitionEndEvent[name]}`\n }\n }\n\n /**\n * --------------------------------------------------------------------------\n * Public Util Api\n * --------------------------------------------------------------------------\n */\n\n let Util = {\n\n transitionEndSupported() {\n return transitionEnd\n },\n\n transitionEndSelector() {\n return transitionEndSelector\n },\n\n isChar(event) {\n if (typeof event.which === 'undefined') {\n return true\n } else if (typeof event.which === 'number' && event.which > 0) {\n return !event.ctrlKey && !event.metaKey && !event.altKey && event.which !== 8 && event.which !== 9\n }\n return false\n },\n\n addFormGroupFocus(formGroup) {\n formGroup.addClass(ClassName.IS_FOCUSED)\n },\n\n removeFormGroupFocus(formGroup) {\n formGroup.removeClass(ClassName.IS_FOCUSED)\n },\n\n /**\n Find expected form-group\n */\n findFormGroup(element) {\n let fg = element.closest(Selector.FORM_GROUP) // note that form-group may be grandparent in the case of an input-group\n if (fg.length === 0) {\n $.error(`Failed to find form-group for ${element}`)\n }\n return fg\n }\n }\n\n setTransitionEndSupport()\n return Util\n\n})(jQuery)\n\nexport default Util\n"]}