@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.
- package/dist/cjs/mds-button_3.cjs.entry.js +3 -2
- package/dist/cjs/mds-paginator.cjs.entry.js +24 -8
- package/dist/cjs/mds-text.cjs.entry.js +7 -4
- package/dist/collection/components/mds-button/mds-button.js +3 -2
- package/dist/collection/components/mds-input-date-range/mds-input-date-range.js +1 -1
- package/dist/collection/components/mds-paginator/mds-paginator.js +24 -8
- package/dist/collection/components/mds-text/mds-text.js +7 -4
- package/dist/components/mds-button2.js +3 -2
- package/dist/components/mds-paginator.js +24 -8
- package/dist/components/mds-text2.js +7 -4
- package/dist/documentation.json +2 -2
- package/dist/esm/mds-button_3.entry.js +3 -2
- package/dist/esm/mds-paginator.entry.js +24 -8
- package/dist/esm/mds-text.entry.js +7 -4
- package/dist/esm/polyfills/core-js.js +0 -0
- package/dist/esm/polyfills/dom.js +0 -0
- package/dist/esm/polyfills/es5-html-element.js +0 -0
- package/dist/esm/polyfills/index.js +0 -0
- package/dist/esm/polyfills/system.js +0 -0
- package/dist/esm-es5/mds-button_3.entry.js +1 -1
- package/dist/esm-es5/mds-paginator.entry.js +1 -1
- package/dist/esm-es5/mds-text.entry.js +1 -1
- package/dist/hydrate/index.js +34 -14
- package/dist/hydrate/index.mjs +34 -14
- package/dist/magma-components/magma-components.esm.js +1 -1
- package/dist/magma-components/p-26cd6ec8.system.js +1 -1
- package/dist/magma-components/p-3e72a9f4.entry.js +1 -0
- package/dist/magma-components/{p-1e686661.system.entry.js → p-4ece2e21.system.entry.js} +1 -1
- package/dist/magma-components/{p-ff8d8818.system.entry.js → p-68dde65c.system.entry.js} +1 -1
- package/dist/magma-components/{p-7262712f.system.entry.js → p-cae04975.system.entry.js} +1 -1
- package/dist/magma-components/p-e137eebd.entry.js +1 -0
- package/dist/magma-components/p-f3f64ecf.entry.js +1 -0
- package/dist/stats.json +378 -378
- package/dist/types/components/mds-paginator/mds-paginator.d.ts +9 -1
- package/package.json +6 -2
- package/dist/magma-components/p-3bf7d52c.entry.js +0 -1
- package/dist/magma-components/p-9c97817b.entry.js +0 -1
- 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
|
-
|
|
222
|
-
|
|
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
|
-
|
|
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
|
|
48
|
-
|
|
49
|
-
|
|
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: '
|
|
71
|
-
index.h("div", { key: '
|
|
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
|
-
|
|
274
|
-
|
|
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: '
|
|
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
|
-
|
|
189
|
-
|
|
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": "/
|
|
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
|
-
|
|
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
|
|
38
|
-
|
|
39
|
-
|
|
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: '
|
|
61
|
-
h("div", { key: '
|
|
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
|
-
|
|
51
|
-
|
|
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: '
|
|
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
|
-
|
|
202
|
-
|
|
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
|
-
|
|
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
|
|
49
|
-
|
|
50
|
-
|
|
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: '
|
|
72
|
-
h("div", { key: '
|
|
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
|
-
|
|
272
|
-
|
|
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: '
|
|
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
|
}
|
package/dist/documentation.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"timestamp": "2026-
|
|
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": "/
|
|
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
|
-
|
|
218
|
-
|
|
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
|
-
|
|
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
|
|
44
|
-
|
|
45
|
-
|
|
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: '
|
|
67
|
-
h("div", { key: '
|
|
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
|
-
|
|
270
|
-
|
|
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: '
|
|
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
|