@maggioli-design-system/magma 1.12.0 → 1.12.1

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 (38) hide show
  1. package/dist/cjs/mds-button_3.cjs.entry.js +3 -2
  2. package/dist/cjs/mds-paginator.cjs.entry.js +24 -8
  3. package/dist/cjs/mds-text.cjs.entry.js +7 -4
  4. package/dist/collection/components/mds-button/mds-button.js +3 -2
  5. package/dist/collection/components/mds-input-date-range/mds-input-date-range.js +1 -1
  6. package/dist/collection/components/mds-paginator/mds-paginator.js +24 -8
  7. package/dist/collection/components/mds-text/mds-text.js +7 -4
  8. package/dist/components/mds-button2.js +3 -2
  9. package/dist/components/mds-paginator.js +24 -8
  10. package/dist/components/mds-text2.js +7 -4
  11. package/dist/documentation.json +2 -2
  12. package/dist/esm/mds-button_3.entry.js +3 -2
  13. package/dist/esm/mds-paginator.entry.js +24 -8
  14. package/dist/esm/mds-text.entry.js +7 -4
  15. package/dist/esm/polyfills/core-js.js +0 -0
  16. package/dist/esm/polyfills/dom.js +0 -0
  17. package/dist/esm/polyfills/es5-html-element.js +0 -0
  18. package/dist/esm/polyfills/index.js +0 -0
  19. package/dist/esm/polyfills/system.js +0 -0
  20. package/dist/esm-es5/mds-button_3.entry.js +1 -1
  21. package/dist/esm-es5/mds-paginator.entry.js +1 -1
  22. package/dist/esm-es5/mds-text.entry.js +1 -1
  23. package/dist/hydrate/index.js +34 -14
  24. package/dist/hydrate/index.mjs +34 -14
  25. package/dist/magma-components/magma-components.esm.js +1 -1
  26. package/dist/magma-components/p-26cd6ec8.system.js +1 -1
  27. package/dist/magma-components/p-3e72a9f4.entry.js +1 -0
  28. package/dist/magma-components/{p-1e686661.system.entry.js → p-4ece2e21.system.entry.js} +1 -1
  29. package/dist/magma-components/{p-ff8d8818.system.entry.js → p-68dde65c.system.entry.js} +1 -1
  30. package/dist/magma-components/{p-7262712f.system.entry.js → p-cae04975.system.entry.js} +1 -1
  31. package/dist/magma-components/p-e137eebd.entry.js +1 -0
  32. package/dist/magma-components/p-f3f64ecf.entry.js +1 -0
  33. package/dist/stats.json +378 -378
  34. package/dist/types/components/mds-paginator/mds-paginator.d.ts +9 -1
  35. package/package.json +6 -2
  36. package/dist/magma-components/p-3bf7d52c.entry.js +0 -1
  37. package/dist/magma-components/p-9c97817b.entry.js +0 -1
  38. package/dist/magma-components/p-fe0446d4.entry.js +0 -1
@@ -218,8 +218,9 @@ const MdsButton = class {
218
218
  this.km.detachClickBehavior();
219
219
  }
220
220
  render() {
221
- this.typography = buttonSizeTypographyVariant[this.size];
222
- return (index.h(index.Host, { key: '4686bd8d7cb9225f100a4127b6a126377b518d19', onMouseDown: this.mouseDown, onMouseUp: this.mouseUp, onMouseOut: this.mouseUp, tabindex: "0" }, index.h("div", { key: 'df39bb0ebb2a804af20924648169709397af2c7e', class: "await" }, index.h("mds-spinner", { key: '2815525a17ea474db3f4064a3bbdf6e953211b13', class: "spinner", running: this.await })), this.icon && this.iconPosition === 'left' && index.h("mds-icon", { key: 'f464e79898cfa4f68d05fefcb454c26e6088cfaf', "aria-hidden": "true", class: "icon", name: this.icon, part: "icon" }), index.h("mds-text", { key: '0f30b6ca2508f8928f4fc28c6deb28e93e963db5', class: "text", part: "label", typography: this.typography, truncate: this.truncate }, index.h("slot", { key: '1d5d0ae7bcdf9abbc87ddbb4bea702971b618e9d', onSlotchange: this.onSlotChangeHandler })), this.hasNotification && index.h("slot", { key: '0d9dca292a5cb40f51e4c517a399e85286047fc4', name: "notification" }), this.icon && this.iconPosition === 'right' && index.h("mds-icon", { key: 'f97aff53f85a69e3bd51517fb66f781123c37373', "aria-hidden": "true", class: "icon", name: this.icon, part: "icon" })));
221
+ var _a;
222
+ this.typography = ((_a = buttonSizeTypographyVariant[this.size]) !== null && _a !== void 0 ? _a : buttonSizeTypographyVariant.md);
223
+ return (index.h(index.Host, { key: '680ba324eacade3bbd8f36508574cb6dad57566b', onMouseDown: this.mouseDown, onMouseUp: this.mouseUp, onMouseOut: this.mouseUp, tabindex: "0" }, index.h("div", { key: '5136e1431685a185d32e9dc8493cd28e7281bb52', class: "await" }, index.h("mds-spinner", { key: 'a3760887578e2e69d1e429a253aab3c9624c6c91', class: "spinner", running: this.await })), this.icon && this.iconPosition === 'left' && index.h("mds-icon", { key: '9007494247bb1890fafccd4029af9933fb6dcb56', "aria-hidden": "true", class: "icon", name: this.icon, part: "icon" }), index.h("mds-text", { key: '4103a169c1cd6cca7c698685d520cb4b9f178765', class: "text", part: "label", typography: this.typography, truncate: this.truncate }, index.h("slot", { key: '41645942af98977c653ada8f65f12f00c55568e2', onSlotchange: this.onSlotChangeHandler })), this.hasNotification && index.h("slot", { key: '8b98cd1f404b15b94c8e6e70bad62bda6dca3848', name: "notification" }), this.icon && this.iconPosition === 'right' && index.h("mds-icon", { key: 'e6d27b07a707896b25fb5728ad8c38cbbd8abee1', "aria-hidden": "true", class: "icon", name: this.icon, part: "icon" })));
223
224
  }
224
225
  static get formAssociated() { return true; }
225
226
  get host() { return index.getElement(this); }
@@ -40,15 +40,31 @@ const MdsPaginator = class {
40
40
  const pageItem = pagesItems[elementIndex];
41
41
  pagesElement.scrollLeft = pageItem.offsetLeft - pagesElement.offsetLeft - (pagesElement.offsetWidth / 2) + (pageItem.offsetWidth / 2);
42
42
  };
43
- this.focus = (ev) => {
43
+ /**
44
+ * The strip follows the focused item only when the focus comes from the keyboard.
45
+ * On a pointer interaction the item receives focus on mousedown: scrolling the strip
46
+ * at that moment moves the item away from under the pointer, the mouseup lands on
47
+ * another element and the browser dispatches the click on their common ancestor
48
+ * (the strip itself) instead of the item, so the page would never be selected.
49
+ */
50
+ this.isKeyboardFocus = (item) => {
51
+ try {
52
+ return item.matches(':focus-visible');
53
+ }
54
+ catch (_a) {
55
+ return true;
56
+ }
57
+ };
58
+ this.handleItemFocus = (ev) => {
44
59
  var _a;
60
+ const item = ev.target;
61
+ if (!item || !this.isKeyboardFocus(item))
62
+ return;
45
63
  const pagesElement = (_a = this.element.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.pages');
46
64
  const pagesItems = pagesElement === null || pagesElement === void 0 ? void 0 : pagesElement.querySelectorAll('mds-paginator-item');
47
- if (pagesItems && ev.target) {
48
- const elements = Array.from(pagesItems);
49
- const index = elements.indexOf(ev.target);
50
- this.scrollPage(index);
51
- }
65
+ if (!pagesItems)
66
+ return;
67
+ this.scrollPage(Array.from(pagesItems).indexOf(item));
52
68
  };
53
69
  this.goToPage = (selectedPage, caller) => {
54
70
  if (selectedPage < 1 || selectedPage > this.pages) {
@@ -67,8 +83,8 @@ const MdsPaginator = class {
67
83
  }, 10);
68
84
  }
69
85
  render() {
70
- return (index.h(index.Host, { key: 'b9d657eba839f340e6884a33a60679318d54f34d' }, index.h("mds-paginator-item", { key: 'cf00f632028acf9b723cd5262445d344d5eaf247', class: "item-icon", icon: arrowBack.miBaselineArrowBack, disabled: this.currentPage === 1, onClick: ev => this.goToPage(this.currentPage - 1, ev.target) }), this.pages > 0 && index.h("mds-paginator-item", { key: 'fa939c14a850380e2f176bab540822569ad69920', class: "item-first", selected: this.currentPage === 1, onClick: ev => this.goToPage(1, ev.target) }, "1"), this.pages > 2 &&
71
- index.h("div", { key: '59d2f6299c3272a5a9eeb775debd951c92b010d3', class: "pages" }, Array.from(Array(this.pages - 2).keys()).map(i => index.h("mds-paginator-item", { key: i, class: "item", selected: this.currentPage === i + 2, onClick: ev => this.goToPage(i + 2, ev.target), onFocus: this.focus }, i + 2))), this.pages > 1 && index.h("mds-paginator-item", { key: 'da7bdcac91a730b578d40d87d3eafe376c504d0a', class: "item-last", selected: this.currentPage === this.pages, onClick: ev => this.goToPage(this.pages, ev.target) }, this.pages), index.h("mds-paginator-item", { key: '96c940a778f155d35297834eada78c7fb5207ef6', class: "item-icon", icon: arrowForward.miBaselineArrowForward, disabled: this.currentPage === this.pages, onClick: ev => this.goToPage(this.currentPage + 1, ev.target) })));
86
+ return (index.h(index.Host, { key: 'fb183dd893041450d8ec460e761c946aca12ffec' }, index.h("mds-paginator-item", { key: 'c414cfc1de9edc2b6b84585c8425b72f07a52f02', class: "item-icon", icon: arrowBack.miBaselineArrowBack, disabled: this.currentPage === 1, onClick: ev => this.goToPage(this.currentPage - 1, ev.target) }), this.pages > 0 && index.h("mds-paginator-item", { key: '80a2376092e98eb3fa7caa905289d00241595983', class: "item-first", selected: this.currentPage === 1, onClick: ev => this.goToPage(1, ev.target) }, "1"), this.pages > 2 &&
87
+ index.h("div", { key: '25940c8714140163f3f82ad4c4b6092648b709ce', class: "pages" }, Array.from(Array(this.pages - 2).keys()).map(i => index.h("mds-paginator-item", { key: i, class: "item", selected: this.currentPage === i + 2, onClick: ev => this.goToPage(i + 2, ev.target), onFocus: this.handleItemFocus }, i + 2))), this.pages > 1 && index.h("mds-paginator-item", { key: '3a5e05ceb10558c055b1b3056a9e661a6e1c8246', class: "item-last", selected: this.currentPage === this.pages, onClick: ev => this.goToPage(this.pages, ev.target) }, this.pages), index.h("mds-paginator-item", { key: '1acf173fa49670472be1662957eb4e6e015ff716', class: "item-icon", icon: arrowForward.miBaselineArrowForward, disabled: this.currentPage === this.pages, onClick: ev => this.goToPage(this.currentPage + 1, ev.target) })));
72
88
  }
73
89
  get element() { return index.getElement(this); }
74
90
  };
@@ -269,9 +269,12 @@ const MdsText = class {
269
269
  };
270
270
  }
271
271
  componentWillRender() {
272
- var _a;
273
- const { tag } = typographyDefaultsVariant[this.typography];
274
- this.tag = (_a = this.tag) !== null && _a !== void 0 ? _a : tag;
272
+ var _a, _b;
273
+ // Stencil sets a string @Prop to null when its attribute is removed, so `typography` can be
274
+ // outside TypographyType at runtime and the lookup misses; fall back to the documented default
275
+ // instead of throwing out of the lifecycle.
276
+ const { tag } = (_a = typographyDefaultsVariant[this.typography]) !== null && _a !== void 0 ? _a : typographyDefaultsVariant.detail;
277
+ this.tag = (_b = this.tag) !== null && _b !== void 0 ? _b : tag;
275
278
  }
276
279
  componentDidLoad() {
277
280
  if (this.animation === 'yugop')
@@ -289,7 +292,7 @@ const MdsText = class {
289
292
  }
290
293
  }
291
294
  render() {
292
- return (index.h(index.Host, { key: 'c2b975a38997a1ed8f5a6d49817398356a94cfc7' }, index.h(this.tag, { key: '830f1caa4906a64330278da005b0cd10b014d21f', class: "text" }, !this.text
295
+ return (index.h(index.Host, { key: 'd096756b0b83d56c456b7cbe31898f8f7163fe44' }, index.h(this.tag, { key: 'b13042971ea7d46f60cac8d0c119398bc36155fd', class: "text" }, !this.text
293
296
  ? index.h("slot", null)
294
297
  : this.text)));
295
298
  }
@@ -185,8 +185,9 @@ export class MdsButton {
185
185
  this.km.detachClickBehavior();
186
186
  }
187
187
  render() {
188
- this.typography = buttonSizeTypographyVariant[this.size];
189
- return (h(Host, { key: '4686bd8d7cb9225f100a4127b6a126377b518d19', onMouseDown: this.mouseDown, onMouseUp: this.mouseUp, onMouseOut: this.mouseUp, tabindex: "0" }, h("div", { key: 'df39bb0ebb2a804af20924648169709397af2c7e', class: "await" }, h("mds-spinner", { key: '2815525a17ea474db3f4064a3bbdf6e953211b13', class: "spinner", running: this.await })), this.icon && this.iconPosition === 'left' && h("mds-icon", { key: 'f464e79898cfa4f68d05fefcb454c26e6088cfaf', "aria-hidden": "true", class: "icon", name: this.icon, part: "icon" }), h("mds-text", { key: '0f30b6ca2508f8928f4fc28c6deb28e93e963db5', class: "text", part: "label", typography: this.typography, truncate: this.truncate }, h("slot", { key: '1d5d0ae7bcdf9abbc87ddbb4bea702971b618e9d', onSlotchange: this.onSlotChangeHandler })), this.hasNotification && h("slot", { key: '0d9dca292a5cb40f51e4c517a399e85286047fc4', name: "notification" }), this.icon && this.iconPosition === 'right' && h("mds-icon", { key: 'f97aff53f85a69e3bd51517fb66f781123c37373', "aria-hidden": "true", class: "icon", name: this.icon, part: "icon" })));
188
+ var _a;
189
+ this.typography = ((_a = buttonSizeTypographyVariant[this.size]) !== null && _a !== void 0 ? _a : buttonSizeTypographyVariant.md);
190
+ return (h(Host, { key: '680ba324eacade3bbd8f36508574cb6dad57566b', onMouseDown: this.mouseDown, onMouseUp: this.mouseUp, onMouseOut: this.mouseUp, tabindex: "0" }, h("div", { key: '5136e1431685a185d32e9dc8493cd28e7281bb52', class: "await" }, h("mds-spinner", { key: 'a3760887578e2e69d1e429a253aab3c9624c6c91', class: "spinner", running: this.await })), this.icon && this.iconPosition === 'left' && h("mds-icon", { key: '9007494247bb1890fafccd4029af9933fb6dcb56', "aria-hidden": "true", class: "icon", name: this.icon, part: "icon" }), h("mds-text", { key: '4103a169c1cd6cca7c698685d520cb4b9f178765', class: "text", part: "label", typography: this.typography, truncate: this.truncate }, h("slot", { key: '41645942af98977c653ada8f65f12f00c55568e2', onSlotchange: this.onSlotChangeHandler })), this.hasNotification && h("slot", { key: '8b98cd1f404b15b94c8e6e70bad62bda6dca3848', name: "notification" }), this.icon && this.iconPosition === 'right' && h("mds-icon", { key: 'e6d27b07a707896b25fb5728ad8c38cbbd8abee1', "aria-hidden": "true", class: "icon", name: this.icon, part: "icon" })));
190
191
  }
191
192
  static get is() { return "mds-button"; }
192
193
  static get encapsulation() { return "shadow"; }
@@ -673,7 +673,7 @@ export class MdsInputDateRange {
673
673
  },
674
674
  "EventDate": {
675
675
  "location": "local",
676
- "path": "/builds/maggiolispa/ricerca-sviluppo-new-media/magma/design-system/projects/stencil/src/components/mds-input-date-range/mds-input-date-range.tsx",
676
+ "path": "/home/runner/work/magma/magma/projects/stencil/src/components/mds-input-date-range/mds-input-date-range.tsx",
677
677
  "id": "src/components/mds-input-date-range/mds-input-date-range.tsx::EventDate"
678
678
  },
679
679
  "HTMLMdsInputDateRangePreselectionElement": {
@@ -30,15 +30,31 @@ export class MdsPaginator {
30
30
  const pageItem = pagesItems[elementIndex];
31
31
  pagesElement.scrollLeft = pageItem.offsetLeft - pagesElement.offsetLeft - (pagesElement.offsetWidth / 2) + (pageItem.offsetWidth / 2);
32
32
  };
33
- this.focus = (ev) => {
33
+ /**
34
+ * The strip follows the focused item only when the focus comes from the keyboard.
35
+ * On a pointer interaction the item receives focus on mousedown: scrolling the strip
36
+ * at that moment moves the item away from under the pointer, the mouseup lands on
37
+ * another element and the browser dispatches the click on their common ancestor
38
+ * (the strip itself) instead of the item, so the page would never be selected.
39
+ */
40
+ this.isKeyboardFocus = (item) => {
41
+ try {
42
+ return item.matches(':focus-visible');
43
+ }
44
+ catch (_a) {
45
+ return true;
46
+ }
47
+ };
48
+ this.handleItemFocus = (ev) => {
34
49
  var _a;
50
+ const item = ev.target;
51
+ if (!item || !this.isKeyboardFocus(item))
52
+ return;
35
53
  const pagesElement = (_a = this.element.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.pages');
36
54
  const pagesItems = pagesElement === null || pagesElement === void 0 ? void 0 : pagesElement.querySelectorAll('mds-paginator-item');
37
- if (pagesItems && ev.target) {
38
- const elements = Array.from(pagesItems);
39
- const index = elements.indexOf(ev.target);
40
- this.scrollPage(index);
41
- }
55
+ if (!pagesItems)
56
+ return;
57
+ this.scrollPage(Array.from(pagesItems).indexOf(item));
42
58
  };
43
59
  this.goToPage = (selectedPage, caller) => {
44
60
  if (selectedPage < 1 || selectedPage > this.pages) {
@@ -57,8 +73,8 @@ export class MdsPaginator {
57
73
  }, 10);
58
74
  }
59
75
  render() {
60
- return (h(Host, { key: 'b9d657eba839f340e6884a33a60679318d54f34d' }, h("mds-paginator-item", { key: 'cf00f632028acf9b723cd5262445d344d5eaf247', class: "item-icon", icon: miBaselineArrowBack, disabled: this.currentPage === 1, onClick: ev => this.goToPage(this.currentPage - 1, ev.target) }), this.pages > 0 && h("mds-paginator-item", { key: 'fa939c14a850380e2f176bab540822569ad69920', class: "item-first", selected: this.currentPage === 1, onClick: ev => this.goToPage(1, ev.target) }, "1"), this.pages > 2 &&
61
- h("div", { key: '59d2f6299c3272a5a9eeb775debd951c92b010d3', class: "pages" }, Array.from(Array(this.pages - 2).keys()).map(i => h("mds-paginator-item", { key: i, class: "item", selected: this.currentPage === i + 2, onClick: ev => this.goToPage(i + 2, ev.target), onFocus: this.focus }, i + 2))), this.pages > 1 && h("mds-paginator-item", { key: 'da7bdcac91a730b578d40d87d3eafe376c504d0a', class: "item-last", selected: this.currentPage === this.pages, onClick: ev => this.goToPage(this.pages, ev.target) }, this.pages), h("mds-paginator-item", { key: '96c940a778f155d35297834eada78c7fb5207ef6', class: "item-icon", icon: miBaselineArrowForward, disabled: this.currentPage === this.pages, onClick: ev => this.goToPage(this.currentPage + 1, ev.target) })));
76
+ return (h(Host, { key: 'fb183dd893041450d8ec460e761c946aca12ffec' }, h("mds-paginator-item", { key: 'c414cfc1de9edc2b6b84585c8425b72f07a52f02', class: "item-icon", icon: miBaselineArrowBack, disabled: this.currentPage === 1, onClick: ev => this.goToPage(this.currentPage - 1, ev.target) }), this.pages > 0 && h("mds-paginator-item", { key: '80a2376092e98eb3fa7caa905289d00241595983', class: "item-first", selected: this.currentPage === 1, onClick: ev => this.goToPage(1, ev.target) }, "1"), this.pages > 2 &&
77
+ h("div", { key: '25940c8714140163f3f82ad4c4b6092648b709ce', class: "pages" }, Array.from(Array(this.pages - 2).keys()).map(i => h("mds-paginator-item", { key: i, class: "item", selected: this.currentPage === i + 2, onClick: ev => this.goToPage(i + 2, ev.target), onFocus: this.handleItemFocus }, i + 2))), this.pages > 1 && h("mds-paginator-item", { key: '3a5e05ceb10558c055b1b3056a9e661a6e1c8246', class: "item-last", selected: this.currentPage === this.pages, onClick: ev => this.goToPage(this.pages, ev.target) }, this.pages), h("mds-paginator-item", { key: '1acf173fa49670472be1662957eb4e6e015ff716', class: "item-icon", icon: miBaselineArrowForward, disabled: this.currentPage === this.pages, onClick: ev => this.goToPage(this.currentPage + 1, ev.target) })));
62
78
  }
63
79
  static get is() { return "mds-paginator"; }
64
80
  static get encapsulation() { return "shadow"; }
@@ -46,9 +46,12 @@ export class MdsText {
46
46
  };
47
47
  }
48
48
  componentWillRender() {
49
- var _a;
50
- const { tag } = typographyDefaultsVariant[this.typography];
51
- this.tag = (_a = this.tag) !== null && _a !== void 0 ? _a : tag;
49
+ var _a, _b;
50
+ // Stencil sets a string @Prop to null when its attribute is removed, so `typography` can be
51
+ // outside TypographyType at runtime and the lookup misses; fall back to the documented default
52
+ // instead of throwing out of the lifecycle.
53
+ const { tag } = (_a = typographyDefaultsVariant[this.typography]) !== null && _a !== void 0 ? _a : typographyDefaultsVariant.detail;
54
+ this.tag = (_b = this.tag) !== null && _b !== void 0 ? _b : tag;
52
55
  }
53
56
  componentDidLoad() {
54
57
  if (this.animation === 'yugop')
@@ -66,7 +69,7 @@ export class MdsText {
66
69
  }
67
70
  }
68
71
  render() {
69
- return (h(Host, { key: 'c2b975a38997a1ed8f5a6d49817398356a94cfc7' }, h(this.tag, { key: '830f1caa4906a64330278da005b0cd10b014d21f', class: "text" }, !this.text
72
+ return (h(Host, { key: 'd096756b0b83d56c456b7cbe31898f8f7163fe44' }, h(this.tag, { key: 'b13042971ea7d46f60cac8d0c119398bc36155fd', class: "text" }, !this.text
70
73
  ? h("slot", null)
71
74
  : this.text)));
72
75
  }
@@ -198,8 +198,9 @@ const MdsButton = /*@__PURE__*/ proxyCustomElement(class MdsButton extends HTMLE
198
198
  this.km.detachClickBehavior();
199
199
  }
200
200
  render() {
201
- this.typography = buttonSizeTypographyVariant[this.size];
202
- return (h(Host, { key: '4686bd8d7cb9225f100a4127b6a126377b518d19', onMouseDown: this.mouseDown, onMouseUp: this.mouseUp, onMouseOut: this.mouseUp, tabindex: "0" }, h("div", { key: 'df39bb0ebb2a804af20924648169709397af2c7e', class: "await" }, h("mds-spinner", { key: '2815525a17ea474db3f4064a3bbdf6e953211b13', class: "spinner", running: this.await })), this.icon && this.iconPosition === 'left' && h("mds-icon", { key: 'f464e79898cfa4f68d05fefcb454c26e6088cfaf', "aria-hidden": "true", class: "icon", name: this.icon, part: "icon" }), h("mds-text", { key: '0f30b6ca2508f8928f4fc28c6deb28e93e963db5', class: "text", part: "label", typography: this.typography, truncate: this.truncate }, h("slot", { key: '1d5d0ae7bcdf9abbc87ddbb4bea702971b618e9d', onSlotchange: this.onSlotChangeHandler })), this.hasNotification && h("slot", { key: '0d9dca292a5cb40f51e4c517a399e85286047fc4', name: "notification" }), this.icon && this.iconPosition === 'right' && h("mds-icon", { key: 'f97aff53f85a69e3bd51517fb66f781123c37373', "aria-hidden": "true", class: "icon", name: this.icon, part: "icon" })));
201
+ var _a;
202
+ this.typography = ((_a = buttonSizeTypographyVariant[this.size]) !== null && _a !== void 0 ? _a : buttonSizeTypographyVariant.md);
203
+ return (h(Host, { key: '680ba324eacade3bbd8f36508574cb6dad57566b', onMouseDown: this.mouseDown, onMouseUp: this.mouseUp, onMouseOut: this.mouseUp, tabindex: "0" }, h("div", { key: '5136e1431685a185d32e9dc8493cd28e7281bb52', class: "await" }, h("mds-spinner", { key: 'a3760887578e2e69d1e429a253aab3c9624c6c91', class: "spinner", running: this.await })), this.icon && this.iconPosition === 'left' && h("mds-icon", { key: '9007494247bb1890fafccd4029af9933fb6dcb56', "aria-hidden": "true", class: "icon", name: this.icon, part: "icon" }), h("mds-text", { key: '4103a169c1cd6cca7c698685d520cb4b9f178765', class: "text", part: "label", typography: this.typography, truncate: this.truncate }, h("slot", { key: '41645942af98977c653ada8f65f12f00c55568e2', onSlotchange: this.onSlotChangeHandler })), this.hasNotification && h("slot", { key: '8b98cd1f404b15b94c8e6e70bad62bda6dca3848', name: "notification" }), this.icon && this.iconPosition === 'right' && h("mds-icon", { key: 'e6d27b07a707896b25fb5728ad8c38cbbd8abee1', "aria-hidden": "true", class: "icon", name: this.icon, part: "icon" })));
203
204
  }
204
205
  static get formAssociated() { return true; }
205
206
  get host() { return this; }
@@ -41,15 +41,31 @@ const MdsPaginator$1 = /*@__PURE__*/ proxyCustomElement(class MdsPaginator exten
41
41
  const pageItem = pagesItems[elementIndex];
42
42
  pagesElement.scrollLeft = pageItem.offsetLeft - pagesElement.offsetLeft - (pagesElement.offsetWidth / 2) + (pageItem.offsetWidth / 2);
43
43
  };
44
- this.focus = (ev) => {
44
+ /**
45
+ * The strip follows the focused item only when the focus comes from the keyboard.
46
+ * On a pointer interaction the item receives focus on mousedown: scrolling the strip
47
+ * at that moment moves the item away from under the pointer, the mouseup lands on
48
+ * another element and the browser dispatches the click on their common ancestor
49
+ * (the strip itself) instead of the item, so the page would never be selected.
50
+ */
51
+ this.isKeyboardFocus = (item) => {
52
+ try {
53
+ return item.matches(':focus-visible');
54
+ }
55
+ catch (_a) {
56
+ return true;
57
+ }
58
+ };
59
+ this.handleItemFocus = (ev) => {
45
60
  var _a;
61
+ const item = ev.target;
62
+ if (!item || !this.isKeyboardFocus(item))
63
+ return;
46
64
  const pagesElement = (_a = this.element.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.pages');
47
65
  const pagesItems = pagesElement === null || pagesElement === void 0 ? void 0 : pagesElement.querySelectorAll('mds-paginator-item');
48
- if (pagesItems && ev.target) {
49
- const elements = Array.from(pagesItems);
50
- const index = elements.indexOf(ev.target);
51
- this.scrollPage(index);
52
- }
66
+ if (!pagesItems)
67
+ return;
68
+ this.scrollPage(Array.from(pagesItems).indexOf(item));
53
69
  };
54
70
  this.goToPage = (selectedPage, caller) => {
55
71
  if (selectedPage < 1 || selectedPage > this.pages) {
@@ -68,8 +84,8 @@ const MdsPaginator$1 = /*@__PURE__*/ proxyCustomElement(class MdsPaginator exten
68
84
  }, 10);
69
85
  }
70
86
  render() {
71
- return (h(Host, { key: 'b9d657eba839f340e6884a33a60679318d54f34d' }, h("mds-paginator-item", { key: 'cf00f632028acf9b723cd5262445d344d5eaf247', class: "item-icon", icon: miBaselineArrowBack, disabled: this.currentPage === 1, onClick: ev => this.goToPage(this.currentPage - 1, ev.target) }), this.pages > 0 && h("mds-paginator-item", { key: 'fa939c14a850380e2f176bab540822569ad69920', class: "item-first", selected: this.currentPage === 1, onClick: ev => this.goToPage(1, ev.target) }, "1"), this.pages > 2 &&
72
- h("div", { key: '59d2f6299c3272a5a9eeb775debd951c92b010d3', class: "pages" }, Array.from(Array(this.pages - 2).keys()).map(i => h("mds-paginator-item", { key: i, class: "item", selected: this.currentPage === i + 2, onClick: ev => this.goToPage(i + 2, ev.target), onFocus: this.focus }, i + 2))), this.pages > 1 && h("mds-paginator-item", { key: 'da7bdcac91a730b578d40d87d3eafe376c504d0a', class: "item-last", selected: this.currentPage === this.pages, onClick: ev => this.goToPage(this.pages, ev.target) }, this.pages), h("mds-paginator-item", { key: '96c940a778f155d35297834eada78c7fb5207ef6', class: "item-icon", icon: miBaselineArrowForward, disabled: this.currentPage === this.pages, onClick: ev => this.goToPage(this.currentPage + 1, ev.target) })));
87
+ return (h(Host, { key: 'fb183dd893041450d8ec460e761c946aca12ffec' }, h("mds-paginator-item", { key: 'c414cfc1de9edc2b6b84585c8425b72f07a52f02', class: "item-icon", icon: miBaselineArrowBack, disabled: this.currentPage === 1, onClick: ev => this.goToPage(this.currentPage - 1, ev.target) }), this.pages > 0 && h("mds-paginator-item", { key: '80a2376092e98eb3fa7caa905289d00241595983', class: "item-first", selected: this.currentPage === 1, onClick: ev => this.goToPage(1, ev.target) }, "1"), this.pages > 2 &&
88
+ h("div", { key: '25940c8714140163f3f82ad4c4b6092648b709ce', class: "pages" }, Array.from(Array(this.pages - 2).keys()).map(i => h("mds-paginator-item", { key: i, class: "item", selected: this.currentPage === i + 2, onClick: ev => this.goToPage(i + 2, ev.target), onFocus: this.handleItemFocus }, i + 2))), this.pages > 1 && h("mds-paginator-item", { key: '3a5e05ceb10558c055b1b3056a9e661a6e1c8246', class: "item-last", selected: this.currentPage === this.pages, onClick: ev => this.goToPage(this.pages, ev.target) }, this.pages), h("mds-paginator-item", { key: '1acf173fa49670472be1662957eb4e6e015ff716', class: "item-icon", icon: miBaselineArrowForward, disabled: this.currentPage === this.pages, onClick: ev => this.goToPage(this.currentPage + 1, ev.target) })));
73
89
  }
74
90
  get element() { return this; }
75
91
  static get style() { return MdsPaginatorStyle0; }
@@ -267,9 +267,12 @@ const MdsText = /*@__PURE__*/ proxyCustomElement(class MdsText extends HTMLEleme
267
267
  };
268
268
  }
269
269
  componentWillRender() {
270
- var _a;
271
- const { tag } = typographyDefaultsVariant[this.typography];
272
- this.tag = (_a = this.tag) !== null && _a !== void 0 ? _a : tag;
270
+ var _a, _b;
271
+ // Stencil sets a string @Prop to null when its attribute is removed, so `typography` can be
272
+ // outside TypographyType at runtime and the lookup misses; fall back to the documented default
273
+ // instead of throwing out of the lifecycle.
274
+ const { tag } = (_a = typographyDefaultsVariant[this.typography]) !== null && _a !== void 0 ? _a : typographyDefaultsVariant.detail;
275
+ this.tag = (_b = this.tag) !== null && _b !== void 0 ? _b : tag;
273
276
  }
274
277
  componentDidLoad() {
275
278
  if (this.animation === 'yugop')
@@ -287,7 +290,7 @@ const MdsText = /*@__PURE__*/ proxyCustomElement(class MdsText extends HTMLEleme
287
290
  }
288
291
  }
289
292
  render() {
290
- return (h(Host, { key: 'c2b975a38997a1ed8f5a6d49817398356a94cfc7' }, h(this.tag, { key: '830f1caa4906a64330278da005b0cd10b014d21f', class: "text" }, !this.text
293
+ return (h(Host, { key: 'd096756b0b83d56c456b7cbe31898f8f7163fe44' }, h(this.tag, { key: 'b13042971ea7d46f60cac8d0c119398bc36155fd', class: "text" }, !this.text
291
294
  ? h("slot", null)
292
295
  : this.text)));
293
296
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "timestamp": "2026-06-17T10:50:02",
2
+ "timestamp": "2026-08-28T08:39:45",
3
3
  "compiler": {
4
4
  "name": "@stencil/core",
5
5
  "version": "4.27.2",
@@ -12237,7 +12237,7 @@
12237
12237
  },
12238
12238
  "EventDate": {
12239
12239
  "location": "local",
12240
- "path": "/builds/maggiolispa/ricerca-sviluppo-new-media/magma/design-system/projects/stencil/src/components/mds-input-date-range/mds-input-date-range.tsx",
12240
+ "path": "/home/runner/work/magma/magma/projects/stencil/src/components/mds-input-date-range/mds-input-date-range.tsx",
12241
12241
  "id": "src/components/mds-input-date-range/mds-input-date-range.tsx::EventDate"
12242
12242
  },
12243
12243
  "HTMLMdsInputDateRangePreselectionElement": {
@@ -214,8 +214,9 @@ const MdsButton = class {
214
214
  this.km.detachClickBehavior();
215
215
  }
216
216
  render() {
217
- this.typography = buttonSizeTypographyVariant[this.size];
218
- return (h(Host, { key: '4686bd8d7cb9225f100a4127b6a126377b518d19', onMouseDown: this.mouseDown, onMouseUp: this.mouseUp, onMouseOut: this.mouseUp, tabindex: "0" }, h("div", { key: 'df39bb0ebb2a804af20924648169709397af2c7e', class: "await" }, h("mds-spinner", { key: '2815525a17ea474db3f4064a3bbdf6e953211b13', class: "spinner", running: this.await })), this.icon && this.iconPosition === 'left' && h("mds-icon", { key: 'f464e79898cfa4f68d05fefcb454c26e6088cfaf', "aria-hidden": "true", class: "icon", name: this.icon, part: "icon" }), h("mds-text", { key: '0f30b6ca2508f8928f4fc28c6deb28e93e963db5', class: "text", part: "label", typography: this.typography, truncate: this.truncate }, h("slot", { key: '1d5d0ae7bcdf9abbc87ddbb4bea702971b618e9d', onSlotchange: this.onSlotChangeHandler })), this.hasNotification && h("slot", { key: '0d9dca292a5cb40f51e4c517a399e85286047fc4', name: "notification" }), this.icon && this.iconPosition === 'right' && h("mds-icon", { key: 'f97aff53f85a69e3bd51517fb66f781123c37373', "aria-hidden": "true", class: "icon", name: this.icon, part: "icon" })));
217
+ var _a;
218
+ this.typography = ((_a = buttonSizeTypographyVariant[this.size]) !== null && _a !== void 0 ? _a : buttonSizeTypographyVariant.md);
219
+ return (h(Host, { key: '680ba324eacade3bbd8f36508574cb6dad57566b', onMouseDown: this.mouseDown, onMouseUp: this.mouseUp, onMouseOut: this.mouseUp, tabindex: "0" }, h("div", { key: '5136e1431685a185d32e9dc8493cd28e7281bb52', class: "await" }, h("mds-spinner", { key: 'a3760887578e2e69d1e429a253aab3c9624c6c91', class: "spinner", running: this.await })), this.icon && this.iconPosition === 'left' && h("mds-icon", { key: '9007494247bb1890fafccd4029af9933fb6dcb56', "aria-hidden": "true", class: "icon", name: this.icon, part: "icon" }), h("mds-text", { key: '4103a169c1cd6cca7c698685d520cb4b9f178765', class: "text", part: "label", typography: this.typography, truncate: this.truncate }, h("slot", { key: '41645942af98977c653ada8f65f12f00c55568e2', onSlotchange: this.onSlotChangeHandler })), this.hasNotification && h("slot", { key: '8b98cd1f404b15b94c8e6e70bad62bda6dca3848', name: "notification" }), this.icon && this.iconPosition === 'right' && h("mds-icon", { key: 'e6d27b07a707896b25fb5728ad8c38cbbd8abee1', "aria-hidden": "true", class: "icon", name: this.icon, part: "icon" })));
219
220
  }
220
221
  static get formAssociated() { return true; }
221
222
  get host() { return getElement(this); }
@@ -36,15 +36,31 @@ const MdsPaginator = class {
36
36
  const pageItem = pagesItems[elementIndex];
37
37
  pagesElement.scrollLeft = pageItem.offsetLeft - pagesElement.offsetLeft - (pagesElement.offsetWidth / 2) + (pageItem.offsetWidth / 2);
38
38
  };
39
- this.focus = (ev) => {
39
+ /**
40
+ * The strip follows the focused item only when the focus comes from the keyboard.
41
+ * On a pointer interaction the item receives focus on mousedown: scrolling the strip
42
+ * at that moment moves the item away from under the pointer, the mouseup lands on
43
+ * another element and the browser dispatches the click on their common ancestor
44
+ * (the strip itself) instead of the item, so the page would never be selected.
45
+ */
46
+ this.isKeyboardFocus = (item) => {
47
+ try {
48
+ return item.matches(':focus-visible');
49
+ }
50
+ catch (_a) {
51
+ return true;
52
+ }
53
+ };
54
+ this.handleItemFocus = (ev) => {
40
55
  var _a;
56
+ const item = ev.target;
57
+ if (!item || !this.isKeyboardFocus(item))
58
+ return;
41
59
  const pagesElement = (_a = this.element.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.pages');
42
60
  const pagesItems = pagesElement === null || pagesElement === void 0 ? void 0 : pagesElement.querySelectorAll('mds-paginator-item');
43
- if (pagesItems && ev.target) {
44
- const elements = Array.from(pagesItems);
45
- const index = elements.indexOf(ev.target);
46
- this.scrollPage(index);
47
- }
61
+ if (!pagesItems)
62
+ return;
63
+ this.scrollPage(Array.from(pagesItems).indexOf(item));
48
64
  };
49
65
  this.goToPage = (selectedPage, caller) => {
50
66
  if (selectedPage < 1 || selectedPage > this.pages) {
@@ -63,8 +79,8 @@ const MdsPaginator = class {
63
79
  }, 10);
64
80
  }
65
81
  render() {
66
- return (h(Host, { key: 'b9d657eba839f340e6884a33a60679318d54f34d' }, h("mds-paginator-item", { key: 'cf00f632028acf9b723cd5262445d344d5eaf247', class: "item-icon", icon: miBaselineArrowBack, disabled: this.currentPage === 1, onClick: ev => this.goToPage(this.currentPage - 1, ev.target) }), this.pages > 0 && h("mds-paginator-item", { key: 'fa939c14a850380e2f176bab540822569ad69920', class: "item-first", selected: this.currentPage === 1, onClick: ev => this.goToPage(1, ev.target) }, "1"), this.pages > 2 &&
67
- h("div", { key: '59d2f6299c3272a5a9eeb775debd951c92b010d3', class: "pages" }, Array.from(Array(this.pages - 2).keys()).map(i => h("mds-paginator-item", { key: i, class: "item", selected: this.currentPage === i + 2, onClick: ev => this.goToPage(i + 2, ev.target), onFocus: this.focus }, i + 2))), this.pages > 1 && h("mds-paginator-item", { key: 'da7bdcac91a730b578d40d87d3eafe376c504d0a', class: "item-last", selected: this.currentPage === this.pages, onClick: ev => this.goToPage(this.pages, ev.target) }, this.pages), h("mds-paginator-item", { key: '96c940a778f155d35297834eada78c7fb5207ef6', class: "item-icon", icon: miBaselineArrowForward, disabled: this.currentPage === this.pages, onClick: ev => this.goToPage(this.currentPage + 1, ev.target) })));
82
+ return (h(Host, { key: 'fb183dd893041450d8ec460e761c946aca12ffec' }, h("mds-paginator-item", { key: 'c414cfc1de9edc2b6b84585c8425b72f07a52f02', class: "item-icon", icon: miBaselineArrowBack, disabled: this.currentPage === 1, onClick: ev => this.goToPage(this.currentPage - 1, ev.target) }), this.pages > 0 && h("mds-paginator-item", { key: '80a2376092e98eb3fa7caa905289d00241595983', class: "item-first", selected: this.currentPage === 1, onClick: ev => this.goToPage(1, ev.target) }, "1"), this.pages > 2 &&
83
+ h("div", { key: '25940c8714140163f3f82ad4c4b6092648b709ce', class: "pages" }, Array.from(Array(this.pages - 2).keys()).map(i => h("mds-paginator-item", { key: i, class: "item", selected: this.currentPage === i + 2, onClick: ev => this.goToPage(i + 2, ev.target), onFocus: this.handleItemFocus }, i + 2))), this.pages > 1 && h("mds-paginator-item", { key: '3a5e05ceb10558c055b1b3056a9e661a6e1c8246', class: "item-last", selected: this.currentPage === this.pages, onClick: ev => this.goToPage(this.pages, ev.target) }, this.pages), h("mds-paginator-item", { key: '1acf173fa49670472be1662957eb4e6e015ff716', class: "item-icon", icon: miBaselineArrowForward, disabled: this.currentPage === this.pages, onClick: ev => this.goToPage(this.currentPage + 1, ev.target) })));
68
84
  }
69
85
  get element() { return getElement(this); }
70
86
  };
@@ -265,9 +265,12 @@ const MdsText = class {
265
265
  };
266
266
  }
267
267
  componentWillRender() {
268
- var _a;
269
- const { tag } = typographyDefaultsVariant[this.typography];
270
- this.tag = (_a = this.tag) !== null && _a !== void 0 ? _a : tag;
268
+ var _a, _b;
269
+ // Stencil sets a string @Prop to null when its attribute is removed, so `typography` can be
270
+ // outside TypographyType at runtime and the lookup misses; fall back to the documented default
271
+ // instead of throwing out of the lifecycle.
272
+ const { tag } = (_a = typographyDefaultsVariant[this.typography]) !== null && _a !== void 0 ? _a : typographyDefaultsVariant.detail;
273
+ this.tag = (_b = this.tag) !== null && _b !== void 0 ? _b : tag;
271
274
  }
272
275
  componentDidLoad() {
273
276
  if (this.animation === 'yugop')
@@ -285,7 +288,7 @@ const MdsText = class {
285
288
  }
286
289
  }
287
290
  render() {
288
- return (h(Host, { key: 'c2b975a38997a1ed8f5a6d49817398356a94cfc7' }, h(this.tag, { key: '830f1caa4906a64330278da005b0cd10b014d21f', class: "text" }, !this.text
291
+ return (h(Host, { key: 'd096756b0b83d56c456b7cbe31898f8f7163fe44' }, h(this.tag, { key: 'b13042971ea7d46f60cac8d0c119398bc36155fd', class: "text" }, !this.text
289
292
  ? h("slot", null)
290
293
  : this.text)));
291
294
  }
File without changes
File without changes
File without changes
File without changes
File without changes