kmaterialize 2.3.3-1.0.21 → 2.3.3-1.0.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/air-datepicker/air-datepicker.js +152 -0
- package/components/alert/alert.js +54 -0
- package/components/button/buttons.js +220 -0
- package/components/card/cards.js +149 -0
- package/components/carousel/carousel.js +574 -0
- package/components/carousel/slider.js +340 -0
- package/components/chip/chips.js +341 -0
- package/components/collapsible/collapsible.js +156 -0
- package/components/color-input/color-input.js +166 -0
- package/components/datepicker/datepicker.js +1035 -0
- package/components/dialog/materialbox.js +377 -0
- package/components/dialog/modal.js +72 -0
- package/components/dropdown/dropdown.js +505 -0
- package/components/file-input/file-input.js +169 -0
- package/components/kanban/_kanban.scss +69 -0
- package/components/kanban/kanban.js +168 -0
- package/components/kanban/kanban.ts +57 -8
- package/components/loading/_loading.scss +68 -0
- package/components/loading/loading.ts +104 -0
- package/components/loading/loadingSpec.js +102 -0
- package/components/navigation-drawer/sidenav.js +454 -0
- package/components/number-input/number-input.js +68 -0
- package/components/password-input/password-input.js +49 -0
- package/components/popup/_popup.scss +106 -0
- package/components/popup/popup.ts +113 -0
- package/components/popup/popupSpec.js +140 -0
- package/components/search/autocomplete.js +470 -0
- package/components/slider/range.js +169 -0
- package/components/snackbar/toasts.js +244 -0
- package/components/tabs/tabs.js +289 -0
- package/components/textfield/forms.js +172 -0
- package/components/textfield/select.js +385 -0
- package/components/timepicker/timepicker.js +698 -0
- package/components/tom-select/tom-select-field.js +130 -0
- package/components/toolbar/toolbar.js +134 -0
- package/components/tooltip/tooltip.js +270 -0
- package/dist/css/materialize.colors.min.css +1 -1
- package/dist/css/materialize.css +322 -1
- package/dist/css/materialize.min.css +2 -2
- package/dist/css/materialize.min.css.map +1 -1
- package/dist/js/materialize.cjs.js +258 -42
- package/dist/js/materialize.d.ts +50 -3
- package/dist/js/materialize.js +258 -42
- package/dist/js/materialize.min.js +2 -2
- package/dist/js/materialize.mjs +257 -43
- package/package.json +6 -1
- package/sass/materialize.scss +2 -0
package/dist/js/materialize.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Materialize v2.3.3-1.0.
|
|
2
|
+
* Materialize v2.3.3-1.0.23 (https://materializeweb.com)
|
|
3
3
|
* Copyright 2014-2026 Materialize
|
|
4
4
|
* MIT License (https://raw.githubusercontent.com/materializecss/materialize/master/LICENSE)
|
|
5
5
|
*/
|
|
@@ -397,7 +397,7 @@ class Component {
|
|
|
397
397
|
}
|
|
398
398
|
}
|
|
399
399
|
|
|
400
|
-
const _defaults$
|
|
400
|
+
const _defaults$y = {
|
|
401
401
|
alignment: 'left',
|
|
402
402
|
autoFocus: true,
|
|
403
403
|
constrainWidth: true,
|
|
@@ -450,7 +450,7 @@ class Dropdown extends Component {
|
|
|
450
450
|
this._setupEventHandlers();
|
|
451
451
|
}
|
|
452
452
|
static get defaults() {
|
|
453
|
-
return _defaults$
|
|
453
|
+
return _defaults$y;
|
|
454
454
|
}
|
|
455
455
|
/**
|
|
456
456
|
* Initializes instances of Dropdown.
|
|
@@ -901,7 +901,7 @@ class Dropdown extends Component {
|
|
|
901
901
|
};
|
|
902
902
|
}
|
|
903
903
|
|
|
904
|
-
const _defaults$
|
|
904
|
+
const _defaults$x = {
|
|
905
905
|
data: [], // Autocomplete data set
|
|
906
906
|
onAutocomplete: null, // Callback for when autocompleted
|
|
907
907
|
dropdownOptions: {
|
|
@@ -961,7 +961,7 @@ class Autocomplete extends Component {
|
|
|
961
961
|
this._setupEventHandlers();
|
|
962
962
|
}
|
|
963
963
|
static get defaults() {
|
|
964
|
-
return _defaults$
|
|
964
|
+
return _defaults$x;
|
|
965
965
|
}
|
|
966
966
|
/**
|
|
967
967
|
* Initializes instances of Autocomplete.
|
|
@@ -1369,6 +1369,194 @@ class Autocomplete extends Component {
|
|
|
1369
1369
|
}
|
|
1370
1370
|
}
|
|
1371
1371
|
|
|
1372
|
+
const _cache = new Map();
|
|
1373
|
+
async function loadPeer(spec, importer) {
|
|
1374
|
+
if (_cache.has(spec.specifier))
|
|
1375
|
+
return _cache.get(spec.specifier);
|
|
1376
|
+
try {
|
|
1377
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1378
|
+
const mod = await importer();
|
|
1379
|
+
const resolved = mod?.default ?? mod;
|
|
1380
|
+
_cache.set(spec.specifier, resolved);
|
|
1381
|
+
return resolved;
|
|
1382
|
+
}
|
|
1383
|
+
catch {
|
|
1384
|
+
// fall through to the global-scope lookup below
|
|
1385
|
+
}
|
|
1386
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1387
|
+
const globalScope = typeof window !== 'undefined' ? window : undefined;
|
|
1388
|
+
if (globalScope && globalScope[spec.globalName]) {
|
|
1389
|
+
const resolved = globalScope[spec.globalName];
|
|
1390
|
+
_cache.set(spec.specifier, resolved);
|
|
1391
|
+
return resolved;
|
|
1392
|
+
}
|
|
1393
|
+
throw new Error(`kmaterialize's ${spec.feature} requires "${spec.specifier}", which isn't installed/loaded.\n` +
|
|
1394
|
+
`- If you're using a bundler: npm/pnpm/yarn install "${spec.specifier}".\n` +
|
|
1395
|
+
`- If you're using the plain <script> (no-bundler) build: add\n` +
|
|
1396
|
+
` ${spec.cdnHint}\n` +
|
|
1397
|
+
` before initializing this component, so window.${spec.globalName} is defined.`);
|
|
1398
|
+
}
|
|
1399
|
+
|
|
1400
|
+
function withClass(required, custom) {
|
|
1401
|
+
return [
|
|
1402
|
+
required,
|
|
1403
|
+
...(typeof custom === 'string'
|
|
1404
|
+
? custom.split(/\s+/)
|
|
1405
|
+
: custom ?? [])
|
|
1406
|
+
]
|
|
1407
|
+
.filter((value, index, values) => value && values.indexOf(value) === index)
|
|
1408
|
+
.join(' ');
|
|
1409
|
+
}
|
|
1410
|
+
/** Materialize-themed SweetAlert2 dialogs. No element initialization is needed. */
|
|
1411
|
+
class Popup {
|
|
1412
|
+
/** Fresh defaults so per-dialog customization cannot affect later popups. */
|
|
1413
|
+
static get defaults() {
|
|
1414
|
+
return {
|
|
1415
|
+
buttonsStyling: false,
|
|
1416
|
+
heightAuto: false,
|
|
1417
|
+
customClass: {
|
|
1418
|
+
container: 'popup-container',
|
|
1419
|
+
popup: 'popup',
|
|
1420
|
+
confirmButton: 'btn filled',
|
|
1421
|
+
cancelButton: 'btn outlined',
|
|
1422
|
+
denyButton: 'btn tonal'
|
|
1423
|
+
}
|
|
1424
|
+
};
|
|
1425
|
+
}
|
|
1426
|
+
static _load() {
|
|
1427
|
+
// Use the JS-only build: the consumer controls stylesheet order.
|
|
1428
|
+
return loadPeer({
|
|
1429
|
+
specifier: 'sweetalert2',
|
|
1430
|
+
globalName: 'Swal',
|
|
1431
|
+
feature: 'Popup',
|
|
1432
|
+
cdnHint: '<link rel="stylesheet" href="path/to/sweetalert2.min.css">\n' +
|
|
1433
|
+
' <script src="path/to/sweetalert2.min.js"></script>\n' +
|
|
1434
|
+
' (copy from node_modules/sweetalert2/dist/; load the CSS before materialize.css)'
|
|
1435
|
+
}, () => import('sweetalert2/dist/sweetalert2.js'));
|
|
1436
|
+
}
|
|
1437
|
+
/** Open a dialog and resolve with SweetAlert2's confirmation/dismissal result. */
|
|
1438
|
+
static async fire(options = {}) {
|
|
1439
|
+
const swal = await Popup._load();
|
|
1440
|
+
const defaults = Popup.defaults;
|
|
1441
|
+
const customClass = {
|
|
1442
|
+
...defaults.customClass,
|
|
1443
|
+
...options.customClass,
|
|
1444
|
+
// Keep the scoped theme even when consumers add their own classes.
|
|
1445
|
+
container: withClass('popup-container', options.customClass?.container),
|
|
1446
|
+
popup: withClass('popup', options.customClass?.popup)
|
|
1447
|
+
};
|
|
1448
|
+
/*
|
|
1449
|
+
* SweetAlertOptions is a discriminated union because `input: "file"`
|
|
1450
|
+
* uses a different inputValidator signature. Object spreading causes
|
|
1451
|
+
* TypeScript to lose that correlation, even though the resulting
|
|
1452
|
+
* object is valid.
|
|
1453
|
+
*/
|
|
1454
|
+
const mergedOptions = {
|
|
1455
|
+
...defaults,
|
|
1456
|
+
...options,
|
|
1457
|
+
customClass
|
|
1458
|
+
};
|
|
1459
|
+
const result = await swal.fire(mergedOptions);
|
|
1460
|
+
/*
|
|
1461
|
+
* SweetAlert2 declares its own internal Awaited<T>, while modern
|
|
1462
|
+
* TypeScript provides the global Awaited<T>. They are semantically
|
|
1463
|
+
* equivalent here but TypeScript can report them as unrelated.
|
|
1464
|
+
*/
|
|
1465
|
+
return result;
|
|
1466
|
+
}
|
|
1467
|
+
/** Close the current SweetAlert2 dialog, resolving its pending result. */
|
|
1468
|
+
static async close() {
|
|
1469
|
+
const swal = await Popup._load();
|
|
1470
|
+
swal.close();
|
|
1471
|
+
}
|
|
1472
|
+
}
|
|
1473
|
+
|
|
1474
|
+
const _defaults$w = {
|
|
1475
|
+
active: true,
|
|
1476
|
+
label: 'Loading…',
|
|
1477
|
+
completeLabel: 'Ready'
|
|
1478
|
+
};
|
|
1479
|
+
/** A circular loading indicator with an optional centered logo or icon. */
|
|
1480
|
+
class Loading extends Component {
|
|
1481
|
+
_originalAttributes = {};
|
|
1482
|
+
_originalActive;
|
|
1483
|
+
_originalLoading;
|
|
1484
|
+
_generatedSpinner = null;
|
|
1485
|
+
constructor(el, options = {}) {
|
|
1486
|
+
super(el, options, Loading);
|
|
1487
|
+
this.options = { ...Loading.defaults, ...options };
|
|
1488
|
+
this.el['M_Loading'] = this;
|
|
1489
|
+
this._originalActive = this.el.classList.contains('active');
|
|
1490
|
+
this._originalLoading = this.el.classList.contains('loading');
|
|
1491
|
+
for (const name of ['role', 'aria-live', 'aria-busy', 'aria-label']) {
|
|
1492
|
+
this._originalAttributes[name] = this.el.getAttribute(name);
|
|
1493
|
+
}
|
|
1494
|
+
// Preserve an accessible name supplied in the markup unless overridden.
|
|
1495
|
+
if (options.label === undefined && this.el.hasAttribute('aria-label')) {
|
|
1496
|
+
this.options.label = this.el.getAttribute('aria-label');
|
|
1497
|
+
}
|
|
1498
|
+
this.el.classList.add('loading');
|
|
1499
|
+
// Reuse authored Preloader markup; generate it for the compact JS API.
|
|
1500
|
+
if (!this.el.querySelector(':scope > .preloader-wrapper')) {
|
|
1501
|
+
this._generatedSpinner = document.createElement('div');
|
|
1502
|
+
this._generatedSpinner.className = 'preloader-wrapper active';
|
|
1503
|
+
this._generatedSpinner.setAttribute('aria-hidden', 'true');
|
|
1504
|
+
this._generatedSpinner.innerHTML = `<div class="spinner-layer">
|
|
1505
|
+
<div class="circle-clipper left"><div class="circle"></div></div>
|
|
1506
|
+
<div class="gap-patch"><div class="circle"></div></div>
|
|
1507
|
+
<div class="circle-clipper right"><div class="circle"></div></div>
|
|
1508
|
+
</div>`;
|
|
1509
|
+
this.el.appendChild(this._generatedSpinner);
|
|
1510
|
+
}
|
|
1511
|
+
if (!this.el.hasAttribute('role'))
|
|
1512
|
+
this.el.setAttribute('role', 'status');
|
|
1513
|
+
if (!this.el.hasAttribute('aria-live'))
|
|
1514
|
+
this.el.setAttribute('aria-live', 'polite');
|
|
1515
|
+
if (this.options.active)
|
|
1516
|
+
this.start();
|
|
1517
|
+
else
|
|
1518
|
+
this.stop();
|
|
1519
|
+
}
|
|
1520
|
+
static get defaults() {
|
|
1521
|
+
return _defaults$w;
|
|
1522
|
+
}
|
|
1523
|
+
static init(els, options = {}) {
|
|
1524
|
+
return super.init(els, options, Loading);
|
|
1525
|
+
}
|
|
1526
|
+
static getInstance(el) {
|
|
1527
|
+
return el['M_Loading'];
|
|
1528
|
+
}
|
|
1529
|
+
get isActive() {
|
|
1530
|
+
return this.el.classList.contains('active');
|
|
1531
|
+
}
|
|
1532
|
+
/** Show the animated ring and announce the loading status. */
|
|
1533
|
+
start(label = this.options.label) {
|
|
1534
|
+
this.el.setAttribute('aria-label', label);
|
|
1535
|
+
this.el.setAttribute('aria-busy', 'true');
|
|
1536
|
+
this.el.classList.add('active');
|
|
1537
|
+
}
|
|
1538
|
+
/** Hide the ring, keeping the centered content visible. */
|
|
1539
|
+
stop(label = this.options.completeLabel) {
|
|
1540
|
+
this.el.setAttribute('aria-label', label);
|
|
1541
|
+
this.el.setAttribute('aria-busy', 'false');
|
|
1542
|
+
this.el.classList.remove('active');
|
|
1543
|
+
}
|
|
1544
|
+
/** Restore the original markup state and remove the instance. */
|
|
1545
|
+
destroy() {
|
|
1546
|
+
this._generatedSpinner?.remove();
|
|
1547
|
+
this._generatedSpinner = null;
|
|
1548
|
+
for (const [name, value] of Object.entries(this._originalAttributes)) {
|
|
1549
|
+
if (value === null)
|
|
1550
|
+
this.el.removeAttribute(name);
|
|
1551
|
+
else
|
|
1552
|
+
this.el.setAttribute(name, value);
|
|
1553
|
+
}
|
|
1554
|
+
this.el.classList.toggle('active', this._originalActive);
|
|
1555
|
+
this.el.classList.toggle('loading', this._originalLoading);
|
|
1556
|
+
delete this.el['M_Loading'];
|
|
1557
|
+
}
|
|
1558
|
+
}
|
|
1559
|
+
|
|
1372
1560
|
const _defaults$v = {
|
|
1373
1561
|
dismissible: true
|
|
1374
1562
|
};
|
|
@@ -1430,13 +1618,24 @@ const _defaults$u = {
|
|
|
1430
1618
|
class Kanban extends Component {
|
|
1431
1619
|
_draggedCard = null;
|
|
1432
1620
|
_dragSourceColumn = null;
|
|
1621
|
+
_dropPreview = null;
|
|
1622
|
+
_dragImage = null;
|
|
1623
|
+
_previewHeight = 64;
|
|
1433
1624
|
_onDragStart = (event) => {
|
|
1434
1625
|
const card = event.target?.closest('.kanban-card');
|
|
1435
|
-
if (!card || !this.options.draggable)
|
|
1626
|
+
if (!card || !this.options.draggable || card.classList.contains('is-disabled') || card.getAttribute('aria-disabled') === 'true')
|
|
1436
1627
|
return;
|
|
1437
1628
|
this._draggedCard = card;
|
|
1438
1629
|
this._dragSourceColumn = card.closest('.kanban-column');
|
|
1630
|
+
this._previewHeight = Math.max(64, Math.round(card.getBoundingClientRect().height));
|
|
1439
1631
|
card.classList.add('is-dragging');
|
|
1632
|
+
this._dragImage = card.cloneNode(true);
|
|
1633
|
+
this._dragImage.classList.remove('is-dragging');
|
|
1634
|
+
this._dragImage.classList.add('kanban-drag-image');
|
|
1635
|
+
this._dragImage.setAttribute('aria-hidden', 'true');
|
|
1636
|
+
this._dragImage.style.width = `${card.getBoundingClientRect().width}px`;
|
|
1637
|
+
document.body.appendChild(this._dragImage);
|
|
1638
|
+
event.dataTransfer?.setDragImage(this._dragImage, card.offsetWidth / 2, card.offsetHeight / 2);
|
|
1440
1639
|
event.dataTransfer?.setData('text/plain', card.dataset.kanbanCard || '');
|
|
1441
1640
|
if (event.dataTransfer)
|
|
1442
1641
|
event.dataTransfer.effectAllowed = 'move';
|
|
@@ -1452,6 +1651,7 @@ class Kanban extends Component {
|
|
|
1452
1651
|
event.dataTransfer.dropEffect = 'move';
|
|
1453
1652
|
this.el.querySelectorAll('.kanban-column.is-drag-over').forEach((item) => item.classList.remove('is-drag-over'));
|
|
1454
1653
|
column.classList.add('is-drag-over');
|
|
1654
|
+
this._updateDropPreview(column, event);
|
|
1455
1655
|
};
|
|
1456
1656
|
_onDrop = (event) => {
|
|
1457
1657
|
if (!this._draggedCard)
|
|
@@ -1463,17 +1663,21 @@ class Kanban extends Component {
|
|
|
1463
1663
|
const body = column.querySelector('.kanban-column-body') || column;
|
|
1464
1664
|
const targetCard = event.target?.closest('.kanban-card');
|
|
1465
1665
|
const source = this._dragSourceColumn;
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
body.insertBefore(
|
|
1666
|
+
const movedCard = this._draggedCard;
|
|
1667
|
+
if (this._dropPreview?.parentElement === body) {
|
|
1668
|
+
body.insertBefore(movedCard, this._dropPreview);
|
|
1669
|
+
this._dropPreview.remove();
|
|
1670
|
+
}
|
|
1671
|
+
else if (targetCard && targetCard !== movedCard && targetCard.parentElement === body) {
|
|
1672
|
+
body.insertBefore(movedCard, targetCard);
|
|
1469
1673
|
}
|
|
1470
1674
|
else {
|
|
1471
|
-
body.appendChild(
|
|
1675
|
+
body.appendChild(movedCard);
|
|
1472
1676
|
}
|
|
1473
1677
|
this._clearDragState();
|
|
1474
1678
|
this._updateCounts();
|
|
1475
1679
|
if (source && source !== column)
|
|
1476
|
-
this.options.onMove?.({ card:
|
|
1680
|
+
this.options.onMove?.({ card: movedCard, from: source, to: column });
|
|
1477
1681
|
};
|
|
1478
1682
|
_onDragEnd = () => this._clearDragState();
|
|
1479
1683
|
constructor(el, options) {
|
|
@@ -1502,9 +1706,15 @@ class Kanban extends Component {
|
|
|
1502
1706
|
body.setAttribute('role', 'list');
|
|
1503
1707
|
column.querySelectorAll('.kanban-card').forEach((card) => {
|
|
1504
1708
|
card.setAttribute('role', 'listitem');
|
|
1505
|
-
card.
|
|
1506
|
-
|
|
1709
|
+
const disabled = card.classList.contains('is-disabled') || card.getAttribute('aria-disabled') === 'true';
|
|
1710
|
+
card.setAttribute('tabindex', disabled ? '-1' : '0');
|
|
1711
|
+
if (disabled) {
|
|
1712
|
+
card.setAttribute('aria-disabled', 'true');
|
|
1713
|
+
card.draggable = false;
|
|
1714
|
+
}
|
|
1715
|
+
else if (this.options.draggable) {
|
|
1507
1716
|
card.draggable = true;
|
|
1717
|
+
}
|
|
1508
1718
|
});
|
|
1509
1719
|
});
|
|
1510
1720
|
this._updateCounts();
|
|
@@ -1516,10 +1726,15 @@ class Kanban extends Component {
|
|
|
1516
1726
|
this.el.addEventListener('dragend', this._onDragEnd);
|
|
1517
1727
|
}
|
|
1518
1728
|
_clearDragState() {
|
|
1729
|
+
this._dragImage?.remove();
|
|
1730
|
+
this._dragImage = null;
|
|
1731
|
+
this._dropPreview?.remove();
|
|
1732
|
+
this._dropPreview = null;
|
|
1519
1733
|
this._draggedCard?.classList.remove('is-dragging');
|
|
1520
1734
|
this.el.querySelectorAll('.kanban-column.is-drag-over').forEach((item) => item.classList.remove('is-drag-over'));
|
|
1521
1735
|
this._draggedCard = null;
|
|
1522
1736
|
this._dragSourceColumn = null;
|
|
1737
|
+
this._previewHeight = 64;
|
|
1523
1738
|
}
|
|
1524
1739
|
_updateCounts() {
|
|
1525
1740
|
this.el.querySelectorAll('.kanban-column').forEach((column) => {
|
|
@@ -1527,8 +1742,33 @@ class Kanban extends Component {
|
|
|
1527
1742
|
const body = column.querySelector('.kanban-column-body');
|
|
1528
1743
|
if (count && body)
|
|
1529
1744
|
count.textContent = String(body.querySelectorAll(':scope > .kanban-card').length);
|
|
1745
|
+
const empty = body?.querySelector('.kanban-empty');
|
|
1746
|
+
if (empty && body)
|
|
1747
|
+
empty.hidden = body.querySelectorAll(':scope > .kanban-card').length > 0;
|
|
1530
1748
|
});
|
|
1531
1749
|
}
|
|
1750
|
+
_updateDropPreview(column, event) {
|
|
1751
|
+
const body = column.querySelector('.kanban-column-body') || column;
|
|
1752
|
+
const targetCard = event.target?.closest('.kanban-card');
|
|
1753
|
+
if (targetCard === this._draggedCard)
|
|
1754
|
+
return;
|
|
1755
|
+
if (!this._dropPreview) {
|
|
1756
|
+
this._dropPreview = document.createElement('div');
|
|
1757
|
+
this._dropPreview.className = 'kanban-drop-preview';
|
|
1758
|
+
this._dropPreview.setAttribute('aria-hidden', 'true');
|
|
1759
|
+
}
|
|
1760
|
+
// Keep the preview tied to the dragged card's original height. Using the
|
|
1761
|
+
// hovered card's height makes the placeholder jump as the pointer crosses
|
|
1762
|
+
// cards with different content lengths.
|
|
1763
|
+
this._dropPreview.style.height = `${this._previewHeight}px`;
|
|
1764
|
+
if (targetCard && targetCard.parentElement === body) {
|
|
1765
|
+
const box = targetCard.getBoundingClientRect();
|
|
1766
|
+
body.insertBefore(this._dropPreview, event.clientY < box.top + box.height / 2 ? targetCard : targetCard.nextSibling);
|
|
1767
|
+
}
|
|
1768
|
+
else if (this._dropPreview.parentElement !== body) {
|
|
1769
|
+
body.appendChild(this._dropPreview);
|
|
1770
|
+
}
|
|
1771
|
+
}
|
|
1532
1772
|
destroy() {
|
|
1533
1773
|
this._clearDragState();
|
|
1534
1774
|
this.el.removeEventListener('dragstart', this._onDragStart);
|
|
@@ -7791,34 +8031,6 @@ class PasswordInput extends Component {
|
|
|
7791
8031
|
};
|
|
7792
8032
|
}
|
|
7793
8033
|
|
|
7794
|
-
const _cache = new Map();
|
|
7795
|
-
async function loadPeer(spec, importer) {
|
|
7796
|
-
if (_cache.has(spec.specifier))
|
|
7797
|
-
return _cache.get(spec.specifier);
|
|
7798
|
-
try {
|
|
7799
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
7800
|
-
const mod = await importer();
|
|
7801
|
-
const resolved = mod?.default ?? mod;
|
|
7802
|
-
_cache.set(spec.specifier, resolved);
|
|
7803
|
-
return resolved;
|
|
7804
|
-
}
|
|
7805
|
-
catch {
|
|
7806
|
-
// fall through to the global-scope lookup below
|
|
7807
|
-
}
|
|
7808
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
7809
|
-
const globalScope = typeof window !== 'undefined' ? window : undefined;
|
|
7810
|
-
if (globalScope && globalScope[spec.globalName]) {
|
|
7811
|
-
const resolved = globalScope[spec.globalName];
|
|
7812
|
-
_cache.set(spec.specifier, resolved);
|
|
7813
|
-
return resolved;
|
|
7814
|
-
}
|
|
7815
|
-
throw new Error(`kmaterialize's ${spec.feature} requires "${spec.specifier}", which isn't installed/loaded.\n` +
|
|
7816
|
-
`- If you're using a bundler: npm/pnpm/yarn install "${spec.specifier}".\n` +
|
|
7817
|
-
`- If you're using the plain <script> (no-bundler) build: add\n` +
|
|
7818
|
-
` ${spec.cdnHint}\n` +
|
|
7819
|
-
` before initializing this component, so window.${spec.globalName} is defined.`);
|
|
7820
|
-
}
|
|
7821
|
-
|
|
7822
8034
|
const _defaults$9 = {
|
|
7823
8035
|
thousandsSeparator: ' ',
|
|
7824
8036
|
radix: '.',
|
|
@@ -9378,7 +9590,7 @@ class Waves {
|
|
|
9378
9590
|
}
|
|
9379
9591
|
|
|
9380
9592
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
9381
|
-
const version = '2.3.3-1.0.
|
|
9593
|
+
const version = '2.3.3-1.0.23';
|
|
9382
9594
|
/**
|
|
9383
9595
|
* Convenience helper matching v1's `M.toast({...})` call, since Toast is a
|
|
9384
9596
|
* class in v2 with no bare functional equivalent of its own.
|
|
@@ -9393,6 +9605,7 @@ function toast(options) {
|
|
|
9393
9605
|
*/
|
|
9394
9606
|
function AutoInit(context = document.body, options) {
|
|
9395
9607
|
const registry = {
|
|
9608
|
+
Loading: context.querySelectorAll('.loading:not(.no-autoinit)'),
|
|
9396
9609
|
Alert: context.querySelectorAll('.alert:not(.no-autoinit)'),
|
|
9397
9610
|
Kanban: context.querySelectorAll('.kanban-board:not(.no-autoinit)'),
|
|
9398
9611
|
Autocomplete: context.querySelectorAll('.autocomplete:not(.no-autoinit)'),
|
|
@@ -9427,6 +9640,7 @@ function AutoInit(context = document.body, options) {
|
|
|
9427
9640
|
TomSelectField: context.querySelectorAll('select.tomselected:not(.no-autoinit)')
|
|
9428
9641
|
};
|
|
9429
9642
|
Autocomplete.init(registry.Autocomplete, options?.Autocomplete ?? {});
|
|
9643
|
+
Loading.init(registry.Loading, options?.Loading ?? {});
|
|
9430
9644
|
Alert.init(registry.Alert, options?.Alert ?? {});
|
|
9431
9645
|
Kanban.init(registry.Kanban, options?.Kanban ?? {});
|
|
9432
9646
|
Cards.init(registry.Cards, options?.Cards ?? {});
|
|
@@ -9468,4 +9682,4 @@ Waves.Init();
|
|
|
9468
9682
|
Range.Init();
|
|
9469
9683
|
Cards.Init();
|
|
9470
9684
|
|
|
9471
|
-
export { AirDatepickerField, Alert, AutoInit, Autocomplete, Cards, Carousel, CharacterCounter, Chips, Collapsible, ColorInput, Datepicker, Dropdown, FileInput, FloatingActionButton, FormSelect, Forms, Kanban, Materialbox, Modal, NumberInput, Parallax, PasswordInput, Pushpin, Range, ScrollSpy, Sidenav, Slider, Tabs, TapTarget, Timepicker, Toast, TomSelectField, Toolbar, Tooltip, Waves, toast, version };
|
|
9685
|
+
export { AirDatepickerField, Alert, AutoInit, Autocomplete, Cards, Carousel, CharacterCounter, Chips, Collapsible, ColorInput, Datepicker, Dropdown, FileInput, FloatingActionButton, FormSelect, Forms, Kanban, Loading, Materialbox, Modal, NumberInput, Parallax, PasswordInput, Popup, Pushpin, Range, ScrollSpy, Sidenav, Slider, Tabs, TapTarget, Timepicker, Toast, TomSelectField, Toolbar, Tooltip, Waves, toast, version };
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "The responsive front-end library based on Material Design from Google.",
|
|
4
4
|
"author": "The Materialize Team",
|
|
5
5
|
"homepage": "https://materialize.kevinzarshenas.com",
|
|
6
|
-
"version": "2.3.3-1.0.
|
|
6
|
+
"version": "2.3.3-1.0.23",
|
|
7
7
|
"style": "dist/css/materialize.css",
|
|
8
8
|
"sass": "sass/materialize.scss",
|
|
9
9
|
"typings": "dist/js/materialize.d.ts",
|
|
@@ -64,6 +64,7 @@
|
|
|
64
64
|
"filepond-plugin-image-exif-orientation": "^1.0.0",
|
|
65
65
|
"filepond-plugin-image-preview": "^4.6.0",
|
|
66
66
|
"imask": "^7.6.0",
|
|
67
|
+
"sweetalert2": "^11.26.25",
|
|
67
68
|
"tom-select": "^2.3.0"
|
|
68
69
|
},
|
|
69
70
|
"peerDependenciesMeta": {
|
|
@@ -88,6 +89,9 @@
|
|
|
88
89
|
"imask": {
|
|
89
90
|
"optional": true
|
|
90
91
|
},
|
|
92
|
+
"sweetalert2": {
|
|
93
|
+
"optional": true
|
|
94
|
+
},
|
|
91
95
|
"tom-select": {
|
|
92
96
|
"optional": true
|
|
93
97
|
}
|
|
@@ -122,6 +126,7 @@
|
|
|
122
126
|
"rollup-plugin-scss": "^4.0.0",
|
|
123
127
|
"sass": "^1.77.8",
|
|
124
128
|
"storybook": "^9.0.12",
|
|
129
|
+
"sweetalert2": "^11.26.25",
|
|
125
130
|
"tom-select": "^2.3.0",
|
|
126
131
|
"tslib": "^2.6.3",
|
|
127
132
|
"typescript": "^5.4.3",
|
package/sass/materialize.scss
CHANGED
|
@@ -37,6 +37,8 @@
|
|
|
37
37
|
@forward '../components/appbar/appbar.css';
|
|
38
38
|
@forward '../components/navigation-drawer/sidenav';
|
|
39
39
|
@forward '../components/progress/preloader';
|
|
40
|
+
@forward '../components/loading/loading';
|
|
41
|
+
@forward '../components/popup/popup';
|
|
40
42
|
@forward '../components/carousel/slider';
|
|
41
43
|
@forward '../components/carousel/carousel';
|
|
42
44
|
@forward '../components/datepicker/datepicker';
|