Skip to content

Commit 6e36747

Browse files
committed
release: 7.3.1
1 parent 44dd149 commit 6e36747

17 files changed

+87
-53
lines changed

README.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
MDB5
2-
Version: FREE 7.3.0
2+
Version: FREE 7.3.1
33

44
Documentation:
55
https://mdbootstrap.com/docs/standard/

css/mdb.dark.min.css

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

css/mdb.dark.min.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

css/mdb.dark.rtl.min.css

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

css/mdb.min.css

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

css/mdb.min.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

css/mdb.rtl.min.css

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/mdb.es.min.js

Lines changed: 18 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/mdb.es.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/mdb.umd.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/mdb.umd.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mdb-ui-kit",
3-
"version": "7.3.0",
3+
"version": "7.3.1",
44
"type": "module",
55
"main": "./js/mdb.umd.min.js",
66
"module": "./js/mdb.es.min.js",

src/js/autoinit/callbacks/free.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ const inputCallback = (component, initSelector) => {
222222
});
223223

224224
// auto-init
225-
SelectorEngine.find(SELECTOR_DATA_INIT).map((element) => new Input(element));
225+
SelectorEngine.find(SELECTOR_DATA_INIT).map((element) => Input.getOrCreateInstance(element));
226226

227227
// form reset handler
228228
EventHandler.on(window, 'reset', (e) => {

src/js/autoinit/init.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ const initComponent = (component, manualInit = false) => {
3838
return;
3939
}
4040

41-
InitializedComponents.set(component.NAME);
41+
if (!manualInit) {
42+
InitializedComponents.set(component.NAME);
43+
}
4244

4345
const thisComponent = _defaultInitSelectors[component.NAME] || null;
4446
const isToggler = thisComponent?.isToggler || false;

src/js/free/input.js

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,9 +169,10 @@ class Input extends BaseComponent {
169169
}
170170

171171
_toggleDefaultDatePlaceholder(input = this.input) {
172-
const isTypeDate = input.getAttribute('type') === 'date';
172+
const type = input.getAttribute('type');
173+
const typesWithPlaceholder = ['date', 'time', 'datetime-local', 'month', 'week'];
173174

174-
if (!isTypeDate) {
175+
if (!typesWithPlaceholder.includes(type)) {
175176
return;
176177
}
177178

@@ -245,6 +246,11 @@ class Input extends BaseComponent {
245246
_activate(event) {
246247
onDOMContentLoaded(() => {
247248
this._getElements(event);
249+
250+
if (!this._element) {
251+
return;
252+
}
253+
248254
const input = event ? event.target : this.input;
249255

250256
if (input.value !== '') {
@@ -255,9 +261,19 @@ class Input extends BaseComponent {
255261
}
256262

257263
_getElements(event) {
264+
let initialized;
258265
if (event) {
259266
this._element = event.target.parentNode;
260267
this._label = SelectorEngine.findOne('label', this._element);
268+
269+
initialized = Manipulator.getDataAttribute(
270+
this._element,
271+
`${this.constructor.NAME}-initialized`
272+
);
273+
}
274+
275+
if (!initialized) {
276+
return;
261277
}
262278

263279
if (event && this._label) {

src/scss/free/_root.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
--#{$prefix}picker-header-bg: #{$picker-header-bg};
2323
--#{$prefix}timepicker-clock-face-bg: #{$timepicker-clock-face-bg};
2424
--#{$prefix}sidenav-backdrop-opacity: #{$sidenav-backdrop-opacity};
25+
--#{$prefix}input-focus-border-color: var(--#{$prefix}primary);
26+
--#{$prefix}input-focus-label-color: var(--#{$prefix}primary);
2527
--#{$prefix}form-control-border-color: #{$form-control-border-color};
2628
--#{$prefix}form-control-label-color: #{$form-control-label-color};
2729
--#{$prefix}form-control-disabled-bg: #{$form-control-disabled-bg};

src/scss/free/_variables.scss

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -703,6 +703,28 @@ $enable-negative-margins: true !default;
703703
$variable-prefix: mdb- !default;
704704
$prefix: $variable-prefix !default;
705705

706+
// Global MDB light theme variables
707+
708+
// scss-docs-start mdb-global-light-theme-variables
709+
$surface-color: $gray-800 !default;
710+
$surface-bg: $white !default;
711+
$surface-inverted-color: $white !default;
712+
$surface-inverted-bg: #6d6d6d !default;
713+
$divider-color: $gray-100 !default;
714+
$divider-blurry-color: hsl(0, 0%, 40%) !default;
715+
$highlight-bg-color: $gray-200 !default;
716+
$scrollbar-rail-bg: $gray-200 !default;
717+
$scrollbar-thumb-bg: $gray-500 !default;
718+
$picker-header-bg: $primary !default;
719+
$timepicker-clock-face-bg: var(--#{$prefix}secondary-bg) !default;
720+
$sidenav-backdrop-opacity: 0.1 !default;
721+
$form-control-border-color: $gray-400 !default;
722+
$form-control-label-color: $gray-600 !default;
723+
$form-control-disabled-bg: $gray-300 !default;
724+
$box-shadow-color: $black !default;
725+
$stepper-mobile-bg: $gray-50 !default;
726+
// scss-docs-start mdb-global-light-theme-variables
727+
706728
// Body
707729
//
708730
// Settings for the `<body>` element.
@@ -1052,9 +1074,9 @@ $form-label-transition: all 0.2s ease-out !default;
10521074
$form-label-color: var(--#{$prefix}form-control-label-color) !default;
10531075

10541076
$input-focus-active-label-transform: translateY(-1rem) translateY(0.1rem) scale(0.8) !default;
1055-
$input-focus-label-color: $primary !default;
1077+
$input-focus-label-color: var(--#{$prefix}input-focus-label-color) !default;
10561078
$input-focus-border-width: 0.125rem !default;
1057-
$input-focus-border-color: $primary !default;
1079+
$input-focus-border-color: var(--#{$prefix}input-focus-border-color) !default;
10581080
$input-disabled-background-color: var(--#{$prefix}form-control-disabled-bg) !default;
10591081

10601082
$input-font-size-lg: 1rem !default;
@@ -1451,7 +1473,7 @@ $accordion-flush-item-border-bottom: 2px solid var(--#{$prefix}divider-color) !d
14511473
$accordion-borderless-button-border-radius: 0.5rem !default;
14521474
$accordion-borderless-button-bgc: var(--#{$prefix}primary-bg-subtle) !default;
14531475
$accordion-borderless-button-color: var(--#{$prefix}primary-text-emphasis) !default;
1454-
$accordion-icon-color: var(--#{$prefix}surface-color) !default;
1476+
$accordion-icon-color: $surface-color !default;
14551477
$accordion-icon-active-color: $primary !default;
14561478
// scss-docs-end accordion-variables
14571479

@@ -1657,25 +1679,3 @@ $divider-blurry-vr-bg-image: linear-gradient(
16571679
) !default;
16581680
$divider-blurry-vr-width: 1px !default;
16591681
// scss-docs-end divider-variables
1660-
1661-
// Global MDB light theme variables
1662-
1663-
// scss-docs-start mdb-global-light-theme-variables
1664-
$surface-color: $gray-800 !default;
1665-
$surface-bg: $white !default;
1666-
$surface-inverted-color: $white !default;
1667-
$surface-inverted-bg: #6d6d6d !default;
1668-
$divider-color: $gray-100 !default;
1669-
$divider-blurry-color: hsl(0, 0%, 40%) !default;
1670-
$highlight-bg-color: $gray-200 !default;
1671-
$scrollbar-rail-bg: $gray-200 !default;
1672-
$scrollbar-thumb-bg: $gray-500 !default;
1673-
$picker-header-bg: $primary !default;
1674-
$timepicker-clock-face-bg: var(--#{$prefix}secondary-bg) !default;
1675-
$sidenav-backdrop-opacity: 0.1 !default;
1676-
$form-control-border-color: $gray-400 !default;
1677-
$form-control-label-color: $gray-600 !default;
1678-
$form-control-disabled-bg: $gray-300 !default;
1679-
$box-shadow-color: $black !default;
1680-
$stepper-mobile-bg: $gray-50 !default;
1681-
// scss-docs-start mdb-global-light-theme-variables

0 commit comments

Comments
 (0)