Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mdbootstrap

Package Overview
Dependencies
Maintainers
2
Versions
64
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mdbootstrap - npm Package Compare versions

Comparing version 4.5.16 to 4.6.0

4

js/modules/default-file-input.js

@@ -1,6 +0,5 @@

'use strict';
"use strict";
(function ($) {
$('.input-default-wrapper').on('change', '.input-default-js', function (e) {
var $this = $(e.target),

@@ -16,2 +15,3 @@ $label = $this.next('label'),

}
if (fileName) {

@@ -18,0 +18,0 @@ $label.find('.span-choose-file').html(fileName);

@@ -1,18 +0,16 @@

'use strict';
"use strict";
var _this = void 0;
(function ($) {
var inputSelector = ['text', 'password', 'email', 'url', 'tel', 'number', 'search', 'search-md'].map(function (selector) {
return 'input[type=' + selector + ']';
}).join(', ') + ', textarea';
var inputSelector = "".concat(['text', 'password', 'email', 'url', 'tel', 'number', 'search', 'search-md'].map(function (selector) {
return "input[type=".concat(selector, "]");
}).join(', '), ", textarea");
var textAreaSelector = '.materialize-textarea';
var updateTextFields = function updateTextFields($input) {
var $labelAndIcon = $input.siblings('label, i');
var hasValue = $input.val().length;
var hasPlaceholder = $input.attr('placeholder');
var addOrRemove = (hasValue || hasPlaceholder ? 'add' : 'remove') + 'Class';
var addOrRemove = "".concat(hasValue || hasPlaceholder ? 'add' : 'remove', "Class");
$labelAndIcon[addOrRemove]('active');

@@ -22,5 +20,3 @@ };

var validateField = function validateField($input) {
if ($input.hasClass('validate')) {
var value = $input.val();

@@ -31,6 +27,4 @@ var noValue = !value.length;

if (noValue && isValid) {
$input.removeClass('valid').removeClass('invalid');
} else {
var valid = $input.is(':valid');

@@ -40,6 +34,4 @@ var length = Number($input.attr('length')) || 0;

if (valid && (!length || length > value.length)) {
$input.removeClass('invalid').addClass('valid');
} else {
$input.removeClass('valid').addClass('invalid');

@@ -52,6 +44,5 @@ }

var textAreaAutoResize = function textAreaAutoResize() {
var $textarea = $(_this);
var $textarea = $(undefined);
if ($textarea.val().length) {
var $hiddenDiv = $('.hiddendiv');

@@ -62,3 +53,2 @@ var fontFamily = $textarea.css('font-family');

if (fontSize) {
$hiddenDiv.css('font-size', fontSize);

@@ -68,3 +58,2 @@ }

if (fontFamily) {
$hiddenDiv.css('font-family', fontFamily);

@@ -74,12 +63,10 @@ }

if ($textarea.attr('wrap') === 'off') {
$hiddenDiv.css('overflow-wrap', 'normal').css('white-space', 'pre');
}
$hiddenDiv.text($textarea.val() + '\n');
$hiddenDiv.text("".concat($textarea.val(), "\n"));
var content = $hiddenDiv.html().replace(/\n/g, '<br>');
$hiddenDiv.html(content);
$hiddenDiv.html(content); // When textarea is hidden, width goes crazy.
// Approximate with half of window size
// When textarea is hidden, width goes crazy.
// Approximate with half of window size
$hiddenDiv.css('width', $textarea.is(':visible') ? $textarea.width() : $(window).width() / 2);

@@ -91,3 +78,2 @@ $textarea.css('height', $hiddenDiv.height());

$(inputSelector).each(function (index, input) {
var $this = $(input);

@@ -97,15 +83,11 @@ var $labelAndIcon = $this.siblings('label, i');

var isValid = input.validity.badInput;
if (isValid) {
$labelAndIcon.addClass('active');
}
});
$(document).on('focus', inputSelector, function (e) {
$(e.target).siblings('label, i').addClass('active');
});
$(document).on('blur', inputSelector, function (e) {
var $this = $(e.target);

@@ -117,3 +99,2 @@ var noValue = !$this.val();

if (noValue && invalid && noPlaceholder) {
$this.siblings('label, i').removeClass('active');

@@ -124,5 +105,3 @@ }

});
$(document).on('change', inputSelector, function (e) {
var $this = $(e.target);

@@ -132,16 +111,13 @@ updateTextFields($this);

});
$('input[autofocus]').siblings('label, i').addClass('active');
$(document).on('reset', function (e) {
var $formReset = $(e.target);
var $formReset = $(e.target);
if ($formReset.is('form')) {
var $formInputs = $formReset.find(inputSelector);
$formInputs.removeClass('valid').removeClass('invalid').each(function (index, input) {
var $this = $(input);
var noDefaultValue = !$this.val();
var noPlaceholder = !$this.attr('placeholder');
if (noDefaultValue && noPlaceholder) {

@@ -151,9 +127,6 @@ $this.siblings('label, i').removeClass('active');

});
$formReset.find('select.initialized').each(function (index, select) {
var $select = $(select);
var $visibleInput = $select.siblings('input.select-dropdown');
var defaultValue = $select.children('[selected]').val();
$select.val(defaultValue);

@@ -166,17 +139,13 @@ $visibleInput.val(defaultValue);

function init() {
var $text = $('.md-textarea-auto');
var $text = $('.md-textarea-auto');
if ($text.length) {
var observe;
var observe = void 0;
if (window.attachEvent) {
observe = function observe(element, event, handler) {
element.attachEvent('on' + event, handler);
element.attachEvent("on".concat(event), handler);
};
} else {
observe = function observe(element, event, handler) {
element.addEventListener(event, handler, false);

@@ -187,13 +156,10 @@ };

$text.each(function () {
var self = this;
function resize() {
self.style.height = 'auto';
self.style.height = self.scrollHeight + 'px';
self.style.height = "".concat(self.scrollHeight, "px");
}
function delayedResize() {
window.setTimeout(resize, 0);

@@ -207,3 +173,2 @@ }

observe(self, 'keydown', delayedResize);
resize();

@@ -213,7 +178,7 @@ });

}
init();
var $body = $('body');
var $body = $('body');
if (!$('.hiddendiv').first().length) {
var $hiddenDiv = $('<div class="hiddendiv common"></div>');

@@ -220,0 +185,0 @@ $body.append($hiddenDiv);

@@ -1,17 +0,12 @@

'use strict';
"use strict";
(function ($) {
var SCROLLING_NAVBAR_OFFSET_TOP = 50;
$(window).on('scroll', function () {
var $navbar = $('.navbar');
var $navbar = $('.navbar');
if ($navbar.length) {
if ($navbar.offset().top > SCROLLING_NAVBAR_OFFSET_TOP) {
$('.scrolling-navbar').addClass('top-nav-collapse');
} else {
$('.scrolling-navbar').removeClass('top-nav-collapse');

@@ -18,0 +13,0 @@ }

{
"name": "mdbootstrap",
"version": "4.5.16",
"version": "4.6.0",
"description": "Material Design for Bootstrap (MDB) is a powerful Material Design UI KIT for most popular HTML, CSS, and JS framework - Bootstrap.",

@@ -5,0 +5,0 @@ "main": "js/mdb.min.js",

@@ -1,2 +0,2 @@

[![Material Design for Bootstrap](https://mdbootstrap.com/img/Marketing/free/social/jquery/mdb-jquery-free.jpg)](https://mdbootstrap.com/docs/jquery/)
[![Material Design for Bootstrap](https://mdbootstrap.com/img/Marketing/products/jquery/mdb-free.jpg)](https://mdbootstrap.com/docs/jquery/)

@@ -3,0 +3,0 @@ # Material Design for Bootstrap 4

Material Design for Bootstrap
Version: MDB Free 4.5.16
version: MDB Free 4.6.0

@@ -5,0 +5,0 @@ Documentation:

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc