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.
Files changed (47) hide show
  1. package/components/air-datepicker/air-datepicker.js +152 -0
  2. package/components/alert/alert.js +54 -0
  3. package/components/button/buttons.js +220 -0
  4. package/components/card/cards.js +149 -0
  5. package/components/carousel/carousel.js +574 -0
  6. package/components/carousel/slider.js +340 -0
  7. package/components/chip/chips.js +341 -0
  8. package/components/collapsible/collapsible.js +156 -0
  9. package/components/color-input/color-input.js +166 -0
  10. package/components/datepicker/datepicker.js +1035 -0
  11. package/components/dialog/materialbox.js +377 -0
  12. package/components/dialog/modal.js +72 -0
  13. package/components/dropdown/dropdown.js +505 -0
  14. package/components/file-input/file-input.js +169 -0
  15. package/components/kanban/_kanban.scss +69 -0
  16. package/components/kanban/kanban.js +168 -0
  17. package/components/kanban/kanban.ts +57 -8
  18. package/components/loading/_loading.scss +68 -0
  19. package/components/loading/loading.ts +104 -0
  20. package/components/loading/loadingSpec.js +102 -0
  21. package/components/navigation-drawer/sidenav.js +454 -0
  22. package/components/number-input/number-input.js +68 -0
  23. package/components/password-input/password-input.js +49 -0
  24. package/components/popup/_popup.scss +106 -0
  25. package/components/popup/popup.ts +113 -0
  26. package/components/popup/popupSpec.js +140 -0
  27. package/components/search/autocomplete.js +470 -0
  28. package/components/slider/range.js +169 -0
  29. package/components/snackbar/toasts.js +244 -0
  30. package/components/tabs/tabs.js +289 -0
  31. package/components/textfield/forms.js +172 -0
  32. package/components/textfield/select.js +385 -0
  33. package/components/timepicker/timepicker.js +698 -0
  34. package/components/tom-select/tom-select-field.js +130 -0
  35. package/components/toolbar/toolbar.js +134 -0
  36. package/components/tooltip/tooltip.js +270 -0
  37. package/dist/css/materialize.colors.min.css +1 -1
  38. package/dist/css/materialize.css +322 -1
  39. package/dist/css/materialize.min.css +2 -2
  40. package/dist/css/materialize.min.css.map +1 -1
  41. package/dist/js/materialize.cjs.js +258 -42
  42. package/dist/js/materialize.d.ts +50 -3
  43. package/dist/js/materialize.js +258 -42
  44. package/dist/js/materialize.min.js +2 -2
  45. package/dist/js/materialize.mjs +257 -43
  46. package/package.json +6 -1
  47. package/sass/materialize.scss +2 -0
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Materialize v2.3.3-1.0.21 (https://materializeweb.com)
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
  */
@@ -399,7 +399,7 @@ class Component {
399
399
  }
400
400
  }
401
401
 
402
- const _defaults$x = {
402
+ const _defaults$y = {
403
403
  alignment: 'left',
404
404
  autoFocus: true,
405
405
  constrainWidth: true,
@@ -452,7 +452,7 @@ class Dropdown extends Component {
452
452
  this._setupEventHandlers();
453
453
  }
454
454
  static get defaults() {
455
- return _defaults$x;
455
+ return _defaults$y;
456
456
  }
457
457
  /**
458
458
  * Initializes instances of Dropdown.
@@ -903,7 +903,7 @@ class Dropdown extends Component {
903
903
  };
904
904
  }
905
905
 
906
- const _defaults$w = {
906
+ const _defaults$x = {
907
907
  data: [], // Autocomplete data set
908
908
  onAutocomplete: null, // Callback for when autocompleted
909
909
  dropdownOptions: {
@@ -963,7 +963,7 @@ class Autocomplete extends Component {
963
963
  this._setupEventHandlers();
964
964
  }
965
965
  static get defaults() {
966
- return _defaults$w;
966
+ return _defaults$x;
967
967
  }
968
968
  /**
969
969
  * Initializes instances of Autocomplete.
@@ -1371,6 +1371,194 @@ class Autocomplete extends Component {
1371
1371
  }
1372
1372
  }
1373
1373
 
1374
+ const _cache = new Map();
1375
+ async function loadPeer(spec, importer) {
1376
+ if (_cache.has(spec.specifier))
1377
+ return _cache.get(spec.specifier);
1378
+ try {
1379
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1380
+ const mod = await importer();
1381
+ const resolved = mod?.default ?? mod;
1382
+ _cache.set(spec.specifier, resolved);
1383
+ return resolved;
1384
+ }
1385
+ catch {
1386
+ // fall through to the global-scope lookup below
1387
+ }
1388
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1389
+ const globalScope = typeof window !== 'undefined' ? window : undefined;
1390
+ if (globalScope && globalScope[spec.globalName]) {
1391
+ const resolved = globalScope[spec.globalName];
1392
+ _cache.set(spec.specifier, resolved);
1393
+ return resolved;
1394
+ }
1395
+ throw new Error(`kmaterialize's ${spec.feature} requires "${spec.specifier}", which isn't installed/loaded.\n` +
1396
+ `- If you're using a bundler: npm/pnpm/yarn install "${spec.specifier}".\n` +
1397
+ `- If you're using the plain <script> (no-bundler) build: add\n` +
1398
+ ` ${spec.cdnHint}\n` +
1399
+ ` before initializing this component, so window.${spec.globalName} is defined.`);
1400
+ }
1401
+
1402
+ function withClass(required, custom) {
1403
+ return [
1404
+ required,
1405
+ ...(typeof custom === 'string'
1406
+ ? custom.split(/\s+/)
1407
+ : custom ?? [])
1408
+ ]
1409
+ .filter((value, index, values) => value && values.indexOf(value) === index)
1410
+ .join(' ');
1411
+ }
1412
+ /** Materialize-themed SweetAlert2 dialogs. No element initialization is needed. */
1413
+ class Popup {
1414
+ /** Fresh defaults so per-dialog customization cannot affect later popups. */
1415
+ static get defaults() {
1416
+ return {
1417
+ buttonsStyling: false,
1418
+ heightAuto: false,
1419
+ customClass: {
1420
+ container: 'popup-container',
1421
+ popup: 'popup',
1422
+ confirmButton: 'btn filled',
1423
+ cancelButton: 'btn outlined',
1424
+ denyButton: 'btn tonal'
1425
+ }
1426
+ };
1427
+ }
1428
+ static _load() {
1429
+ // Use the JS-only build: the consumer controls stylesheet order.
1430
+ return loadPeer({
1431
+ specifier: 'sweetalert2',
1432
+ globalName: 'Swal',
1433
+ feature: 'Popup',
1434
+ cdnHint: '<link rel="stylesheet" href="path/to/sweetalert2.min.css">\n' +
1435
+ ' <script src="path/to/sweetalert2.min.js"></script>\n' +
1436
+ ' (copy from node_modules/sweetalert2/dist/; load the CSS before materialize.css)'
1437
+ }, () => import('sweetalert2/dist/sweetalert2.js'));
1438
+ }
1439
+ /** Open a dialog and resolve with SweetAlert2's confirmation/dismissal result. */
1440
+ static async fire(options = {}) {
1441
+ const swal = await Popup._load();
1442
+ const defaults = Popup.defaults;
1443
+ const customClass = {
1444
+ ...defaults.customClass,
1445
+ ...options.customClass,
1446
+ // Keep the scoped theme even when consumers add their own classes.
1447
+ container: withClass('popup-container', options.customClass?.container),
1448
+ popup: withClass('popup', options.customClass?.popup)
1449
+ };
1450
+ /*
1451
+ * SweetAlertOptions is a discriminated union because `input: "file"`
1452
+ * uses a different inputValidator signature. Object spreading causes
1453
+ * TypeScript to lose that correlation, even though the resulting
1454
+ * object is valid.
1455
+ */
1456
+ const mergedOptions = {
1457
+ ...defaults,
1458
+ ...options,
1459
+ customClass
1460
+ };
1461
+ const result = await swal.fire(mergedOptions);
1462
+ /*
1463
+ * SweetAlert2 declares its own internal Awaited<T>, while modern
1464
+ * TypeScript provides the global Awaited<T>. They are semantically
1465
+ * equivalent here but TypeScript can report them as unrelated.
1466
+ */
1467
+ return result;
1468
+ }
1469
+ /** Close the current SweetAlert2 dialog, resolving its pending result. */
1470
+ static async close() {
1471
+ const swal = await Popup._load();
1472
+ swal.close();
1473
+ }
1474
+ }
1475
+
1476
+ const _defaults$w = {
1477
+ active: true,
1478
+ label: 'Loading…',
1479
+ completeLabel: 'Ready'
1480
+ };
1481
+ /** A circular loading indicator with an optional centered logo or icon. */
1482
+ class Loading extends Component {
1483
+ _originalAttributes = {};
1484
+ _originalActive;
1485
+ _originalLoading;
1486
+ _generatedSpinner = null;
1487
+ constructor(el, options = {}) {
1488
+ super(el, options, Loading);
1489
+ this.options = { ...Loading.defaults, ...options };
1490
+ this.el['M_Loading'] = this;
1491
+ this._originalActive = this.el.classList.contains('active');
1492
+ this._originalLoading = this.el.classList.contains('loading');
1493
+ for (const name of ['role', 'aria-live', 'aria-busy', 'aria-label']) {
1494
+ this._originalAttributes[name] = this.el.getAttribute(name);
1495
+ }
1496
+ // Preserve an accessible name supplied in the markup unless overridden.
1497
+ if (options.label === undefined && this.el.hasAttribute('aria-label')) {
1498
+ this.options.label = this.el.getAttribute('aria-label');
1499
+ }
1500
+ this.el.classList.add('loading');
1501
+ // Reuse authored Preloader markup; generate it for the compact JS API.
1502
+ if (!this.el.querySelector(':scope > .preloader-wrapper')) {
1503
+ this._generatedSpinner = document.createElement('div');
1504
+ this._generatedSpinner.className = 'preloader-wrapper active';
1505
+ this._generatedSpinner.setAttribute('aria-hidden', 'true');
1506
+ this._generatedSpinner.innerHTML = `<div class="spinner-layer">
1507
+ <div class="circle-clipper left"><div class="circle"></div></div>
1508
+ <div class="gap-patch"><div class="circle"></div></div>
1509
+ <div class="circle-clipper right"><div class="circle"></div></div>
1510
+ </div>`;
1511
+ this.el.appendChild(this._generatedSpinner);
1512
+ }
1513
+ if (!this.el.hasAttribute('role'))
1514
+ this.el.setAttribute('role', 'status');
1515
+ if (!this.el.hasAttribute('aria-live'))
1516
+ this.el.setAttribute('aria-live', 'polite');
1517
+ if (this.options.active)
1518
+ this.start();
1519
+ else
1520
+ this.stop();
1521
+ }
1522
+ static get defaults() {
1523
+ return _defaults$w;
1524
+ }
1525
+ static init(els, options = {}) {
1526
+ return super.init(els, options, Loading);
1527
+ }
1528
+ static getInstance(el) {
1529
+ return el['M_Loading'];
1530
+ }
1531
+ get isActive() {
1532
+ return this.el.classList.contains('active');
1533
+ }
1534
+ /** Show the animated ring and announce the loading status. */
1535
+ start(label = this.options.label) {
1536
+ this.el.setAttribute('aria-label', label);
1537
+ this.el.setAttribute('aria-busy', 'true');
1538
+ this.el.classList.add('active');
1539
+ }
1540
+ /** Hide the ring, keeping the centered content visible. */
1541
+ stop(label = this.options.completeLabel) {
1542
+ this.el.setAttribute('aria-label', label);
1543
+ this.el.setAttribute('aria-busy', 'false');
1544
+ this.el.classList.remove('active');
1545
+ }
1546
+ /** Restore the original markup state and remove the instance. */
1547
+ destroy() {
1548
+ this._generatedSpinner?.remove();
1549
+ this._generatedSpinner = null;
1550
+ for (const [name, value] of Object.entries(this._originalAttributes)) {
1551
+ if (value === null)
1552
+ this.el.removeAttribute(name);
1553
+ else
1554
+ this.el.setAttribute(name, value);
1555
+ }
1556
+ this.el.classList.toggle('active', this._originalActive);
1557
+ this.el.classList.toggle('loading', this._originalLoading);
1558
+ delete this.el['M_Loading'];
1559
+ }
1560
+ }
1561
+
1374
1562
  const _defaults$v = {
1375
1563
  dismissible: true
1376
1564
  };
@@ -1432,13 +1620,24 @@ const _defaults$u = {
1432
1620
  class Kanban extends Component {
1433
1621
  _draggedCard = null;
1434
1622
  _dragSourceColumn = null;
1623
+ _dropPreview = null;
1624
+ _dragImage = null;
1625
+ _previewHeight = 64;
1435
1626
  _onDragStart = (event) => {
1436
1627
  const card = event.target?.closest('.kanban-card');
1437
- if (!card || !this.options.draggable)
1628
+ if (!card || !this.options.draggable || card.classList.contains('is-disabled') || card.getAttribute('aria-disabled') === 'true')
1438
1629
  return;
1439
1630
  this._draggedCard = card;
1440
1631
  this._dragSourceColumn = card.closest('.kanban-column');
1632
+ this._previewHeight = Math.max(64, Math.round(card.getBoundingClientRect().height));
1441
1633
  card.classList.add('is-dragging');
1634
+ this._dragImage = card.cloneNode(true);
1635
+ this._dragImage.classList.remove('is-dragging');
1636
+ this._dragImage.classList.add('kanban-drag-image');
1637
+ this._dragImage.setAttribute('aria-hidden', 'true');
1638
+ this._dragImage.style.width = `${card.getBoundingClientRect().width}px`;
1639
+ document.body.appendChild(this._dragImage);
1640
+ event.dataTransfer?.setDragImage(this._dragImage, card.offsetWidth / 2, card.offsetHeight / 2);
1442
1641
  event.dataTransfer?.setData('text/plain', card.dataset.kanbanCard || '');
1443
1642
  if (event.dataTransfer)
1444
1643
  event.dataTransfer.effectAllowed = 'move';
@@ -1454,6 +1653,7 @@ class Kanban extends Component {
1454
1653
  event.dataTransfer.dropEffect = 'move';
1455
1654
  this.el.querySelectorAll('.kanban-column.is-drag-over').forEach((item) => item.classList.remove('is-drag-over'));
1456
1655
  column.classList.add('is-drag-over');
1656
+ this._updateDropPreview(column, event);
1457
1657
  };
1458
1658
  _onDrop = (event) => {
1459
1659
  if (!this._draggedCard)
@@ -1465,17 +1665,21 @@ class Kanban extends Component {
1465
1665
  const body = column.querySelector('.kanban-column-body') || column;
1466
1666
  const targetCard = event.target?.closest('.kanban-card');
1467
1667
  const source = this._dragSourceColumn;
1468
- if (targetCard && targetCard !== this._draggedCard && targetCard.parentElement === body) {
1469
- const box = targetCard.getBoundingClientRect();
1470
- body.insertBefore(this._draggedCard, event.clientY < box.top + box.height / 2 ? targetCard : targetCard.nextSibling);
1668
+ const movedCard = this._draggedCard;
1669
+ if (this._dropPreview?.parentElement === body) {
1670
+ body.insertBefore(movedCard, this._dropPreview);
1671
+ this._dropPreview.remove();
1672
+ }
1673
+ else if (targetCard && targetCard !== movedCard && targetCard.parentElement === body) {
1674
+ body.insertBefore(movedCard, targetCard);
1471
1675
  }
1472
1676
  else {
1473
- body.appendChild(this._draggedCard);
1677
+ body.appendChild(movedCard);
1474
1678
  }
1475
1679
  this._clearDragState();
1476
1680
  this._updateCounts();
1477
1681
  if (source && source !== column)
1478
- this.options.onMove?.({ card: this._draggedCard, from: source, to: column });
1682
+ this.options.onMove?.({ card: movedCard, from: source, to: column });
1479
1683
  };
1480
1684
  _onDragEnd = () => this._clearDragState();
1481
1685
  constructor(el, options) {
@@ -1504,9 +1708,15 @@ class Kanban extends Component {
1504
1708
  body.setAttribute('role', 'list');
1505
1709
  column.querySelectorAll('.kanban-card').forEach((card) => {
1506
1710
  card.setAttribute('role', 'listitem');
1507
- card.setAttribute('tabindex', '0');
1508
- if (this.options.draggable)
1711
+ const disabled = card.classList.contains('is-disabled') || card.getAttribute('aria-disabled') === 'true';
1712
+ card.setAttribute('tabindex', disabled ? '-1' : '0');
1713
+ if (disabled) {
1714
+ card.setAttribute('aria-disabled', 'true');
1715
+ card.draggable = false;
1716
+ }
1717
+ else if (this.options.draggable) {
1509
1718
  card.draggable = true;
1719
+ }
1510
1720
  });
1511
1721
  });
1512
1722
  this._updateCounts();
@@ -1518,10 +1728,15 @@ class Kanban extends Component {
1518
1728
  this.el.addEventListener('dragend', this._onDragEnd);
1519
1729
  }
1520
1730
  _clearDragState() {
1731
+ this._dragImage?.remove();
1732
+ this._dragImage = null;
1733
+ this._dropPreview?.remove();
1734
+ this._dropPreview = null;
1521
1735
  this._draggedCard?.classList.remove('is-dragging');
1522
1736
  this.el.querySelectorAll('.kanban-column.is-drag-over').forEach((item) => item.classList.remove('is-drag-over'));
1523
1737
  this._draggedCard = null;
1524
1738
  this._dragSourceColumn = null;
1739
+ this._previewHeight = 64;
1525
1740
  }
1526
1741
  _updateCounts() {
1527
1742
  this.el.querySelectorAll('.kanban-column').forEach((column) => {
@@ -1529,8 +1744,33 @@ class Kanban extends Component {
1529
1744
  const body = column.querySelector('.kanban-column-body');
1530
1745
  if (count && body)
1531
1746
  count.textContent = String(body.querySelectorAll(':scope > .kanban-card').length);
1747
+ const empty = body?.querySelector('.kanban-empty');
1748
+ if (empty && body)
1749
+ empty.hidden = body.querySelectorAll(':scope > .kanban-card').length > 0;
1532
1750
  });
1533
1751
  }
1752
+ _updateDropPreview(column, event) {
1753
+ const body = column.querySelector('.kanban-column-body') || column;
1754
+ const targetCard = event.target?.closest('.kanban-card');
1755
+ if (targetCard === this._draggedCard)
1756
+ return;
1757
+ if (!this._dropPreview) {
1758
+ this._dropPreview = document.createElement('div');
1759
+ this._dropPreview.className = 'kanban-drop-preview';
1760
+ this._dropPreview.setAttribute('aria-hidden', 'true');
1761
+ }
1762
+ // Keep the preview tied to the dragged card's original height. Using the
1763
+ // hovered card's height makes the placeholder jump as the pointer crosses
1764
+ // cards with different content lengths.
1765
+ this._dropPreview.style.height = `${this._previewHeight}px`;
1766
+ if (targetCard && targetCard.parentElement === body) {
1767
+ const box = targetCard.getBoundingClientRect();
1768
+ body.insertBefore(this._dropPreview, event.clientY < box.top + box.height / 2 ? targetCard : targetCard.nextSibling);
1769
+ }
1770
+ else if (this._dropPreview.parentElement !== body) {
1771
+ body.appendChild(this._dropPreview);
1772
+ }
1773
+ }
1534
1774
  destroy() {
1535
1775
  this._clearDragState();
1536
1776
  this.el.removeEventListener('dragstart', this._onDragStart);
@@ -7793,34 +8033,6 @@ class PasswordInput extends Component {
7793
8033
  };
7794
8034
  }
7795
8035
 
7796
- const _cache = new Map();
7797
- async function loadPeer(spec, importer) {
7798
- if (_cache.has(spec.specifier))
7799
- return _cache.get(spec.specifier);
7800
- try {
7801
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
7802
- const mod = await importer();
7803
- const resolved = mod?.default ?? mod;
7804
- _cache.set(spec.specifier, resolved);
7805
- return resolved;
7806
- }
7807
- catch {
7808
- // fall through to the global-scope lookup below
7809
- }
7810
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
7811
- const globalScope = typeof window !== 'undefined' ? window : undefined;
7812
- if (globalScope && globalScope[spec.globalName]) {
7813
- const resolved = globalScope[spec.globalName];
7814
- _cache.set(spec.specifier, resolved);
7815
- return resolved;
7816
- }
7817
- throw new Error(`kmaterialize's ${spec.feature} requires "${spec.specifier}", which isn't installed/loaded.\n` +
7818
- `- If you're using a bundler: npm/pnpm/yarn install "${spec.specifier}".\n` +
7819
- `- If you're using the plain <script> (no-bundler) build: add\n` +
7820
- ` ${spec.cdnHint}\n` +
7821
- ` before initializing this component, so window.${spec.globalName} is defined.`);
7822
- }
7823
-
7824
8036
  const _defaults$9 = {
7825
8037
  thousandsSeparator: ' ',
7826
8038
  radix: '.',
@@ -9380,7 +9592,7 @@ class Waves {
9380
9592
  }
9381
9593
 
9382
9594
  /* eslint-disable @typescript-eslint/no-unused-vars */
9383
- const version = '2.3.3-1.0.21';
9595
+ const version = '2.3.3-1.0.23';
9384
9596
  /**
9385
9597
  * Convenience helper matching v1's `M.toast({...})` call, since Toast is a
9386
9598
  * class in v2 with no bare functional equivalent of its own.
@@ -9395,6 +9607,7 @@ function toast(options) {
9395
9607
  */
9396
9608
  function AutoInit(context = document.body, options) {
9397
9609
  const registry = {
9610
+ Loading: context.querySelectorAll('.loading:not(.no-autoinit)'),
9398
9611
  Alert: context.querySelectorAll('.alert:not(.no-autoinit)'),
9399
9612
  Kanban: context.querySelectorAll('.kanban-board:not(.no-autoinit)'),
9400
9613
  Autocomplete: context.querySelectorAll('.autocomplete:not(.no-autoinit)'),
@@ -9429,6 +9642,7 @@ function AutoInit(context = document.body, options) {
9429
9642
  TomSelectField: context.querySelectorAll('select.tomselected:not(.no-autoinit)')
9430
9643
  };
9431
9644
  Autocomplete.init(registry.Autocomplete, options?.Autocomplete ?? {});
9645
+ Loading.init(registry.Loading, options?.Loading ?? {});
9432
9646
  Alert.init(registry.Alert, options?.Alert ?? {});
9433
9647
  Kanban.init(registry.Kanban, options?.Kanban ?? {});
9434
9648
  Cards.init(registry.Cards, options?.Cards ?? {});
@@ -9487,11 +9701,13 @@ exports.FloatingActionButton = FloatingActionButton;
9487
9701
  exports.FormSelect = FormSelect;
9488
9702
  exports.Forms = Forms;
9489
9703
  exports.Kanban = Kanban;
9704
+ exports.Loading = Loading;
9490
9705
  exports.Materialbox = Materialbox;
9491
9706
  exports.Modal = Modal;
9492
9707
  exports.NumberInput = NumberInput;
9493
9708
  exports.Parallax = Parallax;
9494
9709
  exports.PasswordInput = PasswordInput;
9710
+ exports.Popup = Popup;
9495
9711
  exports.Pushpin = Pushpin;
9496
9712
  exports.Range = Range;
9497
9713
  exports.ScrollSpy = ScrollSpy;
@@ -1,3 +1,4 @@
1
+ import { SweetAlertOptions, SweetAlertResult } from 'sweetalert2';
1
2
  import { InputMask, MaskedNumberOptions } from 'imask';
2
3
  import PickrCtor from '@simonwep/pickr';
3
4
  import AirDatepickerCtor from 'air-datepicker';
@@ -380,6 +381,47 @@ declare class Autocomplete extends Component<AutocompleteOptions> {
380
381
  selectOptions(ids: []): void;
381
382
  }
382
383
 
384
+ type PopupOptions = SweetAlertOptions;
385
+ type PopupResult<T = unknown> = SweetAlertResult<T>;
386
+ /** Materialize-themed SweetAlert2 dialogs. No element initialization is needed. */
387
+ declare class Popup {
388
+ /** Fresh defaults so per-dialog customization cannot affect later popups. */
389
+ static get defaults(): PopupOptions;
390
+ private static _load;
391
+ /** Open a dialog and resolve with SweetAlert2's confirmation/dismissal result. */
392
+ static fire<T = unknown>(options?: PopupOptions): Promise<PopupResult<Awaited<T>>>;
393
+ /** Close the current SweetAlert2 dialog, resolving its pending result. */
394
+ static close(): Promise<void>;
395
+ }
396
+
397
+ interface LoadingOptions extends BaseOptions$1 {
398
+ /** Start animating immediately. */
399
+ active: boolean;
400
+ /** Accessible status while work is in progress. */
401
+ label: string;
402
+ /** Accessible status when work has finished. */
403
+ completeLabel: string;
404
+ }
405
+ /** A circular loading indicator with an optional centered logo or icon. */
406
+ declare class Loading extends Component<LoadingOptions> {
407
+ private _originalAttributes;
408
+ private _originalActive;
409
+ private _originalLoading;
410
+ private _generatedSpinner;
411
+ constructor(el: HTMLElement, options?: Partial<LoadingOptions>);
412
+ static get defaults(): LoadingOptions;
413
+ static init(el: HTMLElement, options?: Partial<LoadingOptions>): Loading;
414
+ static init(els: InitElements<MElement>, options?: Partial<LoadingOptions>): Loading[];
415
+ static getInstance(el: HTMLElement): Loading;
416
+ get isActive(): boolean;
417
+ /** Show the animated ring and announce the loading status. */
418
+ start(label?: string): void;
419
+ /** Hide the ring, keeping the centered content visible. */
420
+ stop(label?: string): void;
421
+ /** Restore the original markup state and remove the instance. */
422
+ destroy(): void;
423
+ }
424
+
383
425
  interface AlertOptions extends BaseOptions$1 {
384
426
  /** Automatically wire a `.alert-close` button when present. */
385
427
  dismissible: boolean;
@@ -418,6 +460,9 @@ interface KanbanOptions extends BaseOptions$1 {
418
460
  declare class Kanban extends Component<KanbanOptions> {
419
461
  private _draggedCard;
420
462
  private _dragSourceColumn;
463
+ private _dropPreview;
464
+ private _dragImage;
465
+ private _previewHeight;
421
466
  private _onDragStart;
422
467
  private _onDragOver;
423
468
  private _onDrop;
@@ -431,6 +476,7 @@ declare class Kanban extends Component<KanbanOptions> {
431
476
  private _bindEvents;
432
477
  private _clearDragState;
433
478
  private _updateCounts;
479
+ private _updateDropPreview;
434
480
  destroy(): void;
435
481
  }
436
482
 
@@ -2808,13 +2854,14 @@ class Waves {
2808
2854
  }
2809
2855
  }
2810
2856
 
2811
- declare const version = "2.3.3-1.0.21";
2857
+ declare const version = "2.3.3-1.0.23";
2812
2858
  /**
2813
2859
  * Convenience helper matching v1's `M.toast({...})` call, since Toast is a
2814
2860
  * class in v2 with no bare functional equivalent of its own.
2815
2861
  */
2816
2862
  declare function toast(options: Partial<ToastOptions>): Toast;
2817
2863
  interface AutoInitOptions {
2864
+ Loading?: Partial<LoadingOptions>;
2818
2865
  Alert?: Partial<AlertOptions>;
2819
2866
  Kanban?: Partial<KanbanOptions>;
2820
2867
  Autocomplete?: Partial<AutocompleteOptions>;
@@ -2851,5 +2898,5 @@ interface AutoInitOptions {
2851
2898
  */
2852
2899
  declare function AutoInit(context?: HTMLElement, options?: Partial<AutoInitOptions>): void;
2853
2900
 
2854
- 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 };
2855
- export type { AutoInitOptions };
2901
+ 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 };
2902
+ export type { AutoInitOptions, PopupOptions, PopupResult };