@maggioli-design-system/mds-paginator-item 2.8.0 → 2.8.2
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/{index-96b46685.js → index-29fd42e7.js} +28 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/mds-paginator-item.cjs.entry.js +28 -23
- package/dist/cjs/mds-paginator-item.cjs.js +1 -1
- package/dist/collection/common/keyboard-manager.js +16 -11
- package/dist/collection/components/mds-paginator-item/mds-paginator-item.js +11 -11
- package/dist/components/mds-paginator-item.js +27 -22
- package/dist/documentation.json +1 -1
- package/dist/esm/{index-d5935a07.js → index-1bfe34b4.js} +28 -0
- package/dist/esm/loader.js +2 -2
- package/dist/esm/mds-paginator-item.entry.js +28 -23
- package/dist/esm/mds-paginator-item.js +2 -2
- package/dist/esm-es5/index-1bfe34b4.js +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/mds-paginator-item.entry.js +1 -1
- package/dist/esm-es5/mds-paginator-item.js +1 -1
- package/dist/mds-paginator-item/mds-paginator-item.esm.js +1 -1
- package/dist/mds-paginator-item/mds-paginator-item.js +1 -1
- package/dist/mds-paginator-item/p-10819660.entry.js +1 -0
- package/dist/mds-paginator-item/p-4b042873.system.entry.js +1 -0
- package/dist/mds-paginator-item/p-76f1815c.js +2 -0
- package/dist/mds-paginator-item/p-ba0d92c9.system.js +1 -0
- package/dist/mds-paginator-item/p-c408e54f.system.js +2 -0
- package/dist/stats.json +32 -32
- package/dist/types/common/keyboard-manager.d.ts +2 -1
- package/documentation.json +10 -5
- package/package.json +2 -2
- package/src/common/keyboard-manager.ts +16 -12
- package/src/components/mds-paginator-item/mds-paginator-item.tsx +2 -2
- package/src/fixtures/icons.json +1 -0
- package/src/fixtures/iconsauce.json +1 -0
- package/www/build/mds-paginator-item.esm.js +1 -1
- package/www/build/mds-paginator-item.js +1 -1
- package/www/build/p-10819660.entry.js +1 -0
- package/www/build/p-4b042873.system.entry.js +1 -0
- package/www/build/p-76f1815c.js +2 -0
- package/www/build/p-ba0d92c9.system.js +1 -0
- package/www/build/p-c408e54f.system.js +2 -0
- package/dist/esm-es5/index-d5935a07.js +0 -1
- package/dist/mds-paginator-item/p-15441494.entry.js +0 -1
- package/dist/mds-paginator-item/p-703ec1c4.system.js +0 -2
- package/dist/mds-paginator-item/p-ce69c72b.system.entry.js +0 -1
- package/dist/mds-paginator-item/p-d69d9ae1.system.js +0 -1
- package/dist/mds-paginator-item/p-e9044500.js +0 -2
- package/www/build/p-15441494.entry.js +0 -1
- package/www/build/p-703ec1c4.system.js +0 -2
- package/www/build/p-ce69c72b.system.entry.js +0 -1
- package/www/build/p-d69d9ae1.system.js +0 -1
- package/www/build/p-e9044500.js +0 -2
|
@@ -995,6 +995,7 @@ const postUpdateComponent = (hostRef) => {
|
|
|
995
995
|
const tagName = hostRef.$cmpMeta$.$tagName$;
|
|
996
996
|
const elm = hostRef.$hostElement$;
|
|
997
997
|
const endPostUpdate = createTime('postUpdate', tagName);
|
|
998
|
+
const instance = hostRef.$lazyInstance$ ;
|
|
998
999
|
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
999
1000
|
if (!(hostRef.$flags$ & 64 /* HOST_FLAGS.hasLoadedComponent */)) {
|
|
1000
1001
|
hostRef.$flags$ |= 64 /* HOST_FLAGS.hasLoadedComponent */;
|
|
@@ -1002,6 +1003,9 @@ const postUpdateComponent = (hostRef) => {
|
|
|
1002
1003
|
// DOM WRITE!
|
|
1003
1004
|
addHydratedFlag(elm);
|
|
1004
1005
|
}
|
|
1006
|
+
{
|
|
1007
|
+
safeCall(instance, 'componentDidLoad');
|
|
1008
|
+
}
|
|
1005
1009
|
endPostUpdate();
|
|
1006
1010
|
{
|
|
1007
1011
|
hostRef.$onReadyResolve$(elm);
|
|
@@ -1011,6 +1015,9 @@ const postUpdateComponent = (hostRef) => {
|
|
|
1011
1015
|
}
|
|
1012
1016
|
}
|
|
1013
1017
|
else {
|
|
1018
|
+
{
|
|
1019
|
+
safeCall(instance, 'componentDidUpdate');
|
|
1020
|
+
}
|
|
1014
1021
|
endPostUpdate();
|
|
1015
1022
|
}
|
|
1016
1023
|
// load events fire from bottom to top
|
|
@@ -1037,6 +1044,27 @@ const appDidLoad = (who) => {
|
|
|
1037
1044
|
}
|
|
1038
1045
|
nextTick(() => emitEvent(win, 'appload', { detail: { namespace: NAMESPACE } }));
|
|
1039
1046
|
};
|
|
1047
|
+
/**
|
|
1048
|
+
* Allows to safely call a method, e.g. `componentDidLoad`, on an instance,
|
|
1049
|
+
* e.g. custom element node. If a build figures out that e.g. no component
|
|
1050
|
+
* has a `componentDidLoad` method, the instance method gets removed from the
|
|
1051
|
+
* output bundle and this function returns `undefined`.
|
|
1052
|
+
* @param instance any object that may or may not contain methods
|
|
1053
|
+
* @param method method name
|
|
1054
|
+
* @param arg single arbitrary argument
|
|
1055
|
+
* @returns result of method call if it exists, otherwise `undefined`
|
|
1056
|
+
*/
|
|
1057
|
+
const safeCall = (instance, method, arg) => {
|
|
1058
|
+
if (instance && instance[method]) {
|
|
1059
|
+
try {
|
|
1060
|
+
return instance[method](arg);
|
|
1061
|
+
}
|
|
1062
|
+
catch (e) {
|
|
1063
|
+
consoleError(e);
|
|
1064
|
+
}
|
|
1065
|
+
}
|
|
1066
|
+
return undefined;
|
|
1067
|
+
};
|
|
1040
1068
|
const addHydratedFlag = (elm) => elm.setAttribute('hydrated', '')
|
|
1041
1069
|
;
|
|
1042
1070
|
const getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-29fd42e7.js');
|
|
6
6
|
|
|
7
7
|
const defineCustomElements = (win, options) => {
|
|
8
8
|
if (typeof window === 'undefined') return undefined;
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-29fd42e7.js');
|
|
6
6
|
|
|
7
7
|
class KeyboardManager {
|
|
8
8
|
constructor() {
|
|
9
|
-
this.elements =
|
|
9
|
+
this.elements = new Map();
|
|
10
10
|
this.handleClickBehaviorDispatchEvent = (event) => {
|
|
11
|
-
if (event.code === '
|
|
11
|
+
if (event.code === 'Enter' || event.code === 'NumpadEnter') {
|
|
12
12
|
event.target.click();
|
|
13
13
|
}
|
|
14
14
|
};
|
|
@@ -18,20 +18,25 @@ class KeyboardManager {
|
|
|
18
18
|
}
|
|
19
19
|
};
|
|
20
20
|
this.addElement = (el, name = 'element') => {
|
|
21
|
-
|
|
21
|
+
if (!el) {
|
|
22
|
+
throw Error(`Passed an ${el} element parameter to KeyboardManager.addElement`);
|
|
23
|
+
}
|
|
24
|
+
this.elements.set(name, el);
|
|
25
|
+
};
|
|
26
|
+
this.removeElement = (name = 'element') => {
|
|
27
|
+
this.detachClickBehavior(name);
|
|
28
|
+
this.elements.delete(name);
|
|
22
29
|
};
|
|
23
30
|
this.attachClickBehavior = (name = 'element') => {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
31
|
+
var _a;
|
|
32
|
+
(_a = this.elements.get(name)) === null || _a === void 0 ? void 0 : _a.addEventListener('keydown', this.handleClickBehaviorDispatchEvent);
|
|
27
33
|
};
|
|
28
34
|
this.detachClickBehavior = (name = 'element') => {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}
|
|
35
|
+
var _a;
|
|
36
|
+
(_a = this.elements.get(name)) === null || _a === void 0 ? void 0 : _a.removeEventListener('keydown', this.handleClickBehaviorDispatchEvent);
|
|
32
37
|
};
|
|
33
|
-
this.attachEscapeBehavior = (
|
|
34
|
-
this.escapeCallback =
|
|
38
|
+
this.attachEscapeBehavior = (callback) => {
|
|
39
|
+
this.escapeCallback = callback;
|
|
35
40
|
if (window !== undefined) {
|
|
36
41
|
window.addEventListener('keydown', this.handleEscapeBehaviorDispatchEvent.bind(this));
|
|
37
42
|
}
|
|
@@ -51,17 +56,6 @@ const MdsPaginatorItem = class {
|
|
|
51
56
|
constructor(hostRef) {
|
|
52
57
|
index.registerInstance(this, hostRef);
|
|
53
58
|
this.km = new KeyboardManager();
|
|
54
|
-
this.componentDidLoad = () => {
|
|
55
|
-
this.km.addElement(this.host);
|
|
56
|
-
this.km.attachClickBehavior();
|
|
57
|
-
};
|
|
58
|
-
this.componentDidUpdate = () => {
|
|
59
|
-
if (!this.disabled && !this.selected) {
|
|
60
|
-
this.km.attachClickBehavior();
|
|
61
|
-
return;
|
|
62
|
-
}
|
|
63
|
-
this.km.detachClickBehavior();
|
|
64
|
-
};
|
|
65
59
|
this.disconnectedCallback = () => {
|
|
66
60
|
this.km.detachClickBehavior();
|
|
67
61
|
};
|
|
@@ -69,6 +63,17 @@ const MdsPaginatorItem = class {
|
|
|
69
63
|
this.selected = undefined;
|
|
70
64
|
this.disabled = undefined;
|
|
71
65
|
}
|
|
66
|
+
componentDidLoad() {
|
|
67
|
+
this.km.addElement(this.host);
|
|
68
|
+
this.km.attachClickBehavior();
|
|
69
|
+
}
|
|
70
|
+
componentDidUpdate() {
|
|
71
|
+
if (!this.disabled && !this.selected) {
|
|
72
|
+
this.km.attachClickBehavior();
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
this.km.detachClickBehavior();
|
|
76
|
+
}
|
|
72
77
|
render() {
|
|
73
78
|
return (index.h(index.Host, { tabindex: "0" }, this.icon !== undefined
|
|
74
79
|
? index.h("mds-icon", { name: this.icon })
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export class KeyboardManager {
|
|
2
2
|
constructor() {
|
|
3
|
-
this.elements =
|
|
3
|
+
this.elements = new Map();
|
|
4
4
|
this.handleClickBehaviorDispatchEvent = (event) => {
|
|
5
|
-
if (event.code === '
|
|
5
|
+
if (event.code === 'Enter' || event.code === 'NumpadEnter') {
|
|
6
6
|
event.target.click();
|
|
7
7
|
}
|
|
8
8
|
};
|
|
@@ -12,20 +12,25 @@ export class KeyboardManager {
|
|
|
12
12
|
}
|
|
13
13
|
};
|
|
14
14
|
this.addElement = (el, name = 'element') => {
|
|
15
|
-
|
|
15
|
+
if (!el) {
|
|
16
|
+
throw Error(`Passed an ${el} element parameter to KeyboardManager.addElement`);
|
|
17
|
+
}
|
|
18
|
+
this.elements.set(name, el);
|
|
19
|
+
};
|
|
20
|
+
this.removeElement = (name = 'element') => {
|
|
21
|
+
this.detachClickBehavior(name);
|
|
22
|
+
this.elements.delete(name);
|
|
16
23
|
};
|
|
17
24
|
this.attachClickBehavior = (name = 'element') => {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
25
|
+
var _a;
|
|
26
|
+
(_a = this.elements.get(name)) === null || _a === void 0 ? void 0 : _a.addEventListener('keydown', this.handleClickBehaviorDispatchEvent);
|
|
21
27
|
};
|
|
22
28
|
this.detachClickBehavior = (name = 'element') => {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
29
|
+
var _a;
|
|
30
|
+
(_a = this.elements.get(name)) === null || _a === void 0 ? void 0 : _a.removeEventListener('keydown', this.handleClickBehaviorDispatchEvent);
|
|
26
31
|
};
|
|
27
|
-
this.attachEscapeBehavior = (
|
|
28
|
-
this.escapeCallback =
|
|
32
|
+
this.attachEscapeBehavior = (callback) => {
|
|
33
|
+
this.escapeCallback = callback;
|
|
29
34
|
if (window !== undefined) {
|
|
30
35
|
window.addEventListener('keydown', this.handleEscapeBehaviorDispatchEvent.bind(this));
|
|
31
36
|
}
|
|
@@ -6,17 +6,6 @@ import { KeyboardManager } from "../../common/keyboard-manager";
|
|
|
6
6
|
export class MdsPaginatorItem {
|
|
7
7
|
constructor() {
|
|
8
8
|
this.km = new KeyboardManager();
|
|
9
|
-
this.componentDidLoad = () => {
|
|
10
|
-
this.km.addElement(this.host);
|
|
11
|
-
this.km.attachClickBehavior();
|
|
12
|
-
};
|
|
13
|
-
this.componentDidUpdate = () => {
|
|
14
|
-
if (!this.disabled && !this.selected) {
|
|
15
|
-
this.km.attachClickBehavior();
|
|
16
|
-
return;
|
|
17
|
-
}
|
|
18
|
-
this.km.detachClickBehavior();
|
|
19
|
-
};
|
|
20
9
|
this.disconnectedCallback = () => {
|
|
21
10
|
this.km.detachClickBehavior();
|
|
22
11
|
};
|
|
@@ -24,6 +13,17 @@ export class MdsPaginatorItem {
|
|
|
24
13
|
this.selected = undefined;
|
|
25
14
|
this.disabled = undefined;
|
|
26
15
|
}
|
|
16
|
+
componentDidLoad() {
|
|
17
|
+
this.km.addElement(this.host);
|
|
18
|
+
this.km.attachClickBehavior();
|
|
19
|
+
}
|
|
20
|
+
componentDidUpdate() {
|
|
21
|
+
if (!this.disabled && !this.selected) {
|
|
22
|
+
this.km.attachClickBehavior();
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
this.km.detachClickBehavior();
|
|
26
|
+
}
|
|
27
27
|
render() {
|
|
28
28
|
return (h(Host, { tabindex: "0" }, this.icon !== undefined
|
|
29
29
|
? h("mds-icon", { name: this.icon })
|
|
@@ -2,9 +2,9 @@ import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal
|
|
|
2
2
|
|
|
3
3
|
class KeyboardManager {
|
|
4
4
|
constructor() {
|
|
5
|
-
this.elements =
|
|
5
|
+
this.elements = new Map();
|
|
6
6
|
this.handleClickBehaviorDispatchEvent = (event) => {
|
|
7
|
-
if (event.code === '
|
|
7
|
+
if (event.code === 'Enter' || event.code === 'NumpadEnter') {
|
|
8
8
|
event.target.click();
|
|
9
9
|
}
|
|
10
10
|
};
|
|
@@ -14,20 +14,25 @@ class KeyboardManager {
|
|
|
14
14
|
}
|
|
15
15
|
};
|
|
16
16
|
this.addElement = (el, name = 'element') => {
|
|
17
|
-
|
|
17
|
+
if (!el) {
|
|
18
|
+
throw Error(`Passed an ${el} element parameter to KeyboardManager.addElement`);
|
|
19
|
+
}
|
|
20
|
+
this.elements.set(name, el);
|
|
21
|
+
};
|
|
22
|
+
this.removeElement = (name = 'element') => {
|
|
23
|
+
this.detachClickBehavior(name);
|
|
24
|
+
this.elements.delete(name);
|
|
18
25
|
};
|
|
19
26
|
this.attachClickBehavior = (name = 'element') => {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
27
|
+
var _a;
|
|
28
|
+
(_a = this.elements.get(name)) === null || _a === void 0 ? void 0 : _a.addEventListener('keydown', this.handleClickBehaviorDispatchEvent);
|
|
23
29
|
};
|
|
24
30
|
this.detachClickBehavior = (name = 'element') => {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
31
|
+
var _a;
|
|
32
|
+
(_a = this.elements.get(name)) === null || _a === void 0 ? void 0 : _a.removeEventListener('keydown', this.handleClickBehaviorDispatchEvent);
|
|
28
33
|
};
|
|
29
|
-
this.attachEscapeBehavior = (
|
|
30
|
-
this.escapeCallback =
|
|
34
|
+
this.attachEscapeBehavior = (callback) => {
|
|
35
|
+
this.escapeCallback = callback;
|
|
31
36
|
if (window !== undefined) {
|
|
32
37
|
window.addEventListener('keydown', this.handleEscapeBehaviorDispatchEvent.bind(this));
|
|
33
38
|
}
|
|
@@ -49,17 +54,6 @@ const MdsPaginatorItem$1 = /*@__PURE__*/ proxyCustomElement(class MdsPaginatorIt
|
|
|
49
54
|
this.__registerHost();
|
|
50
55
|
this.__attachShadow();
|
|
51
56
|
this.km = new KeyboardManager();
|
|
52
|
-
this.componentDidLoad = () => {
|
|
53
|
-
this.km.addElement(this.host);
|
|
54
|
-
this.km.attachClickBehavior();
|
|
55
|
-
};
|
|
56
|
-
this.componentDidUpdate = () => {
|
|
57
|
-
if (!this.disabled && !this.selected) {
|
|
58
|
-
this.km.attachClickBehavior();
|
|
59
|
-
return;
|
|
60
|
-
}
|
|
61
|
-
this.km.detachClickBehavior();
|
|
62
|
-
};
|
|
63
57
|
this.disconnectedCallback = () => {
|
|
64
58
|
this.km.detachClickBehavior();
|
|
65
59
|
};
|
|
@@ -67,6 +61,17 @@ const MdsPaginatorItem$1 = /*@__PURE__*/ proxyCustomElement(class MdsPaginatorIt
|
|
|
67
61
|
this.selected = undefined;
|
|
68
62
|
this.disabled = undefined;
|
|
69
63
|
}
|
|
64
|
+
componentDidLoad() {
|
|
65
|
+
this.km.addElement(this.host);
|
|
66
|
+
this.km.attachClickBehavior();
|
|
67
|
+
}
|
|
68
|
+
componentDidUpdate() {
|
|
69
|
+
if (!this.disabled && !this.selected) {
|
|
70
|
+
this.km.attachClickBehavior();
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
this.km.detachClickBehavior();
|
|
74
|
+
}
|
|
70
75
|
render() {
|
|
71
76
|
return (h(Host, { tabindex: "0" }, this.icon !== undefined
|
|
72
77
|
? h("mds-icon", { name: this.icon })
|
package/dist/documentation.json
CHANGED
|
@@ -973,6 +973,7 @@ const postUpdateComponent = (hostRef) => {
|
|
|
973
973
|
const tagName = hostRef.$cmpMeta$.$tagName$;
|
|
974
974
|
const elm = hostRef.$hostElement$;
|
|
975
975
|
const endPostUpdate = createTime('postUpdate', tagName);
|
|
976
|
+
const instance = hostRef.$lazyInstance$ ;
|
|
976
977
|
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
977
978
|
if (!(hostRef.$flags$ & 64 /* HOST_FLAGS.hasLoadedComponent */)) {
|
|
978
979
|
hostRef.$flags$ |= 64 /* HOST_FLAGS.hasLoadedComponent */;
|
|
@@ -980,6 +981,9 @@ const postUpdateComponent = (hostRef) => {
|
|
|
980
981
|
// DOM WRITE!
|
|
981
982
|
addHydratedFlag(elm);
|
|
982
983
|
}
|
|
984
|
+
{
|
|
985
|
+
safeCall(instance, 'componentDidLoad');
|
|
986
|
+
}
|
|
983
987
|
endPostUpdate();
|
|
984
988
|
{
|
|
985
989
|
hostRef.$onReadyResolve$(elm);
|
|
@@ -989,6 +993,9 @@ const postUpdateComponent = (hostRef) => {
|
|
|
989
993
|
}
|
|
990
994
|
}
|
|
991
995
|
else {
|
|
996
|
+
{
|
|
997
|
+
safeCall(instance, 'componentDidUpdate');
|
|
998
|
+
}
|
|
992
999
|
endPostUpdate();
|
|
993
1000
|
}
|
|
994
1001
|
// load events fire from bottom to top
|
|
@@ -1015,6 +1022,27 @@ const appDidLoad = (who) => {
|
|
|
1015
1022
|
}
|
|
1016
1023
|
nextTick(() => emitEvent(win, 'appload', { detail: { namespace: NAMESPACE } }));
|
|
1017
1024
|
};
|
|
1025
|
+
/**
|
|
1026
|
+
* Allows to safely call a method, e.g. `componentDidLoad`, on an instance,
|
|
1027
|
+
* e.g. custom element node. If a build figures out that e.g. no component
|
|
1028
|
+
* has a `componentDidLoad` method, the instance method gets removed from the
|
|
1029
|
+
* output bundle and this function returns `undefined`.
|
|
1030
|
+
* @param instance any object that may or may not contain methods
|
|
1031
|
+
* @param method method name
|
|
1032
|
+
* @param arg single arbitrary argument
|
|
1033
|
+
* @returns result of method call if it exists, otherwise `undefined`
|
|
1034
|
+
*/
|
|
1035
|
+
const safeCall = (instance, method, arg) => {
|
|
1036
|
+
if (instance && instance[method]) {
|
|
1037
|
+
try {
|
|
1038
|
+
return instance[method](arg);
|
|
1039
|
+
}
|
|
1040
|
+
catch (e) {
|
|
1041
|
+
consoleError(e);
|
|
1042
|
+
}
|
|
1043
|
+
}
|
|
1044
|
+
return undefined;
|
|
1045
|
+
};
|
|
1018
1046
|
const addHydratedFlag = (elm) => elm.setAttribute('hydrated', '')
|
|
1019
1047
|
;
|
|
1020
1048
|
const getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
|
package/dist/esm/loader.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { b as bootstrapLazy } from './index-
|
|
2
|
-
export { s as setNonce } from './index-
|
|
1
|
+
import { b as bootstrapLazy } from './index-1bfe34b4.js';
|
|
2
|
+
export { s as setNonce } from './index-1bfe34b4.js';
|
|
3
3
|
|
|
4
4
|
const defineCustomElements = (win, options) => {
|
|
5
5
|
if (typeof window === 'undefined') return undefined;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, h, H as Host, g as getElement } from './index-1bfe34b4.js';
|
|
2
2
|
|
|
3
3
|
class KeyboardManager {
|
|
4
4
|
constructor() {
|
|
5
|
-
this.elements =
|
|
5
|
+
this.elements = new Map();
|
|
6
6
|
this.handleClickBehaviorDispatchEvent = (event) => {
|
|
7
|
-
if (event.code === '
|
|
7
|
+
if (event.code === 'Enter' || event.code === 'NumpadEnter') {
|
|
8
8
|
event.target.click();
|
|
9
9
|
}
|
|
10
10
|
};
|
|
@@ -14,20 +14,25 @@ class KeyboardManager {
|
|
|
14
14
|
}
|
|
15
15
|
};
|
|
16
16
|
this.addElement = (el, name = 'element') => {
|
|
17
|
-
|
|
17
|
+
if (!el) {
|
|
18
|
+
throw Error(`Passed an ${el} element parameter to KeyboardManager.addElement`);
|
|
19
|
+
}
|
|
20
|
+
this.elements.set(name, el);
|
|
21
|
+
};
|
|
22
|
+
this.removeElement = (name = 'element') => {
|
|
23
|
+
this.detachClickBehavior(name);
|
|
24
|
+
this.elements.delete(name);
|
|
18
25
|
};
|
|
19
26
|
this.attachClickBehavior = (name = 'element') => {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
27
|
+
var _a;
|
|
28
|
+
(_a = this.elements.get(name)) === null || _a === void 0 ? void 0 : _a.addEventListener('keydown', this.handleClickBehaviorDispatchEvent);
|
|
23
29
|
};
|
|
24
30
|
this.detachClickBehavior = (name = 'element') => {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
31
|
+
var _a;
|
|
32
|
+
(_a = this.elements.get(name)) === null || _a === void 0 ? void 0 : _a.removeEventListener('keydown', this.handleClickBehaviorDispatchEvent);
|
|
28
33
|
};
|
|
29
|
-
this.attachEscapeBehavior = (
|
|
30
|
-
this.escapeCallback =
|
|
34
|
+
this.attachEscapeBehavior = (callback) => {
|
|
35
|
+
this.escapeCallback = callback;
|
|
31
36
|
if (window !== undefined) {
|
|
32
37
|
window.addEventListener('keydown', this.handleEscapeBehaviorDispatchEvent.bind(this));
|
|
33
38
|
}
|
|
@@ -47,17 +52,6 @@ const MdsPaginatorItem = class {
|
|
|
47
52
|
constructor(hostRef) {
|
|
48
53
|
registerInstance(this, hostRef);
|
|
49
54
|
this.km = new KeyboardManager();
|
|
50
|
-
this.componentDidLoad = () => {
|
|
51
|
-
this.km.addElement(this.host);
|
|
52
|
-
this.km.attachClickBehavior();
|
|
53
|
-
};
|
|
54
|
-
this.componentDidUpdate = () => {
|
|
55
|
-
if (!this.disabled && !this.selected) {
|
|
56
|
-
this.km.attachClickBehavior();
|
|
57
|
-
return;
|
|
58
|
-
}
|
|
59
|
-
this.km.detachClickBehavior();
|
|
60
|
-
};
|
|
61
55
|
this.disconnectedCallback = () => {
|
|
62
56
|
this.km.detachClickBehavior();
|
|
63
57
|
};
|
|
@@ -65,6 +59,17 @@ const MdsPaginatorItem = class {
|
|
|
65
59
|
this.selected = undefined;
|
|
66
60
|
this.disabled = undefined;
|
|
67
61
|
}
|
|
62
|
+
componentDidLoad() {
|
|
63
|
+
this.km.addElement(this.host);
|
|
64
|
+
this.km.attachClickBehavior();
|
|
65
|
+
}
|
|
66
|
+
componentDidUpdate() {
|
|
67
|
+
if (!this.disabled && !this.selected) {
|
|
68
|
+
this.km.attachClickBehavior();
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
this.km.detachClickBehavior();
|
|
72
|
+
}
|
|
68
73
|
render() {
|
|
69
74
|
return (h(Host, { tabindex: "0" }, this.icon !== undefined
|
|
70
75
|
? h("mds-icon", { name: this.icon })
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
2
|
-
export { s as setNonce } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-1bfe34b4.js';
|
|
2
|
+
export { s as setNonce } from './index-1bfe34b4.js';
|
|
3
3
|
|
|
4
4
|
/*
|
|
5
5
|
Stencil Client Patch Browser v4.10.0 | MIT Licensed | https://stenciljs.com
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var __extends=this&&this.__extends||function(){var e=function(n,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r))e[r]=n[r]};return e(n,r)};return function(n,r){if(typeof r!=="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(n,r);function t(){this.constructor=n}n.prototype=r===null?Object.create(r):(t.prototype=r.prototype,new t)}}();var __awaiter=this&&this.__awaiter||function(e,n,r,t){function a(e){return e instanceof r?e:new r((function(n){n(e)}))}return new(r||(r=Promise))((function(r,i){function o(e){try{f(t.next(e))}catch(e){i(e)}}function u(e){try{f(t["throw"](e))}catch(e){i(e)}}function f(e){e.done?r(e.value):a(e.value).then(o,u)}f((t=t.apply(e,n||[])).next())}))};var __generator=this&&this.__generator||function(e,n){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},t,a,i,o;return o={next:u(0),throw:u(1),return:u(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function u(e){return function(n){return f([e,n])}}function f(u){if(t)throw new TypeError("Generator is already executing.");while(o&&(o=0,u[0]&&(r=0)),r)try{if(t=1,a&&(i=u[0]&2?a["return"]:u[0]?a["throw"]||((i=a["return"])&&i.call(a),0):a.next)&&!(i=i.call(a,u[1])).done)return i;if(a=0,i)u=[u[0]&2,i.value];switch(u[0]){case 0:case 1:i=u;break;case 4:r.label++;return{value:u[1],done:false};case 5:r.label++;a=u[1];u=[0];continue;case 7:u=r.ops.pop();r.trys.pop();continue;default:if(!(i=r.trys,i=i.length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){r.label=u[1];break}if(u[0]===6&&r.label<i[1]){r.label=i[1];i=u;break}if(i&&r.label<i[2]){r.label=i[2];r.ops.push(u);break}if(i[2])r.ops.pop();r.trys.pop();continue}u=n.call(e,r)}catch(e){u=[6,e];a=0}finally{t=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,n,r){if(r||arguments.length===2)for(var t=0,a=n.length,i;t<a;t++){if(i||!(t in n)){if(!i)i=Array.prototype.slice.call(n,0,t);i[t]=n[t]}}return e.concat(i||Array.prototype.slice.call(n))};var NAMESPACE="mds-paginator-item";var scopeId;var hostTagName;var isSvgMode=false;var queuePending=false;var createTime=function(e,n){if(n===void 0){n=""}{return function(){return}}};var uniqueTime=function(e,n){{return function(){return}}};var HYDRATED_CSS="{visibility:hidden}[hydrated]{visibility:inherit}";var SLOT_FB_CSS="slot-fb{display:contents}slot-fb[hidden]{display:none}";var EMPTY_OBJ={};var isDef=function(e){return e!=null};var isComplexType=function(e){e=typeof e;return e==="object"||e==="function"};function queryNonceMetaTagContent(e){var n,r,t;return(t=(r=(n=e.head)===null||n===void 0?void 0:n.querySelector('meta[name="csp-nonce"]'))===null||r===void 0?void 0:r.getAttribute("content"))!==null&&t!==void 0?t:undefined}var h=function(e,n){var r=[];for(var t=2;t<arguments.length;t++){r[t-2]=arguments[t]}var a=null;var i=false;var o=false;var u=[];var f=function(n){for(var r=0;r<n.length;r++){a=n[r];if(Array.isArray(a)){f(a)}else if(a!=null&&typeof a!=="boolean"){if(i=typeof e!=="function"&&!isComplexType(a)){a=String(a)}if(i&&o){u[u.length-1].t+=a}else{u.push(i?newVNode(null,a):a)}o=i}}};f(r);if(n){{var s=n.className||n.class;if(s){n.class=typeof s!=="object"?s:Object.keys(s).filter((function(e){return s[e]})).join(" ")}}}var l=newVNode(e,null);l.i=n;if(u.length>0){l.o=u}return l};var newVNode=function(e,n){var r={u:0,l:e,t:n,v:null,o:null};{r.i=null}return r};var Host={};var isHost=function(e){return e&&e.l===Host};var parsePropertyValue=function(e,n){if(e!=null&&!isComplexType(e)){if(n&4){return e==="false"?false:e===""||!!e}if(n&1){return String(e)}return e}return e};var getElement=function(e){return getHostRef(e).$hostElement$};var emitEvent=function(e,n,r){var t=plt.ce(n,r);e.dispatchEvent(t);return t};var rootAppliedStyles=new WeakMap;var registerStyle=function(e,n,r){var t=styles.get(e);if(supportsConstructableStylesheets&&r){t=t||new CSSStyleSheet;if(typeof t==="string"){t=n}else{t.replaceSync(n)}}else{t=n}styles.set(e,t)};var addStyle=function(e,n,r){var t;var a=getScopeId(n);var i=styles.get(a);e=e.nodeType===11?e:doc;if(i){if(typeof i==="string"){e=e.head||e;var o=rootAppliedStyles.get(e);var u=void 0;if(!o){rootAppliedStyles.set(e,o=new Set)}if(!o.has(a)){{u=doc.createElement("style");u.innerHTML=i;var f=(t=plt.p)!==null&&t!==void 0?t:queryNonceMetaTagContent(doc);if(f!=null){u.setAttribute("nonce",f)}e.insertBefore(u,e.querySelector("link"))}if(n.u&4){u.innerHTML+=SLOT_FB_CSS}if(o){o.add(a)}}}else if(!e.adoptedStyleSheets.includes(i)){e.adoptedStyleSheets=__spreadArray(__spreadArray([],e.adoptedStyleSheets,true),[i],false)}}return a};var attachStyles=function(e){var n=e.m;var r=e.$hostElement$;var t=n.u;var a=createTime("attachStyles",n.h);var i=addStyle(r.shadowRoot?r.shadowRoot:r.getRootNode(),n);if(t&10){r["s-sc"]=i;r.classList.add(i+"-h")}a()};var getScopeId=function(e,n){return"sc-"+e.h};var setAccessor=function(e,n,r,t,a,i){if(r!==t){var o=isMemberInElement(e,n);n.toLowerCase();if(n==="class"){var u=e.classList;var f=parseClassList(r);var s=parseClassList(t);u.remove.apply(u,f.filter((function(e){return e&&!s.includes(e)})));u.add.apply(u,s.filter((function(e){return e&&!f.includes(e)})))}else{var l=isComplexType(t);if((o||l&&t!==null)&&!a){try{if(!e.tagName.includes("-")){var c=t==null?"":t;if(n==="list"){o=false}else if(r==null||e[n]!=c){e[n]=c}}else{e[n]=t}}catch(e){}}if(t==null||t===false){if(t!==false||e.getAttribute(n)===""){{e.removeAttribute(n)}}}else if((!o||i&4||a)&&!l){t=t===true?"":t;{e.setAttribute(n,t)}}}}};var parseClassListRegex=/\s/;var parseClassList=function(e){return!e?[]:e.split(parseClassListRegex)};var updateElement=function(e,n,r,t){var a=n.v.nodeType===11&&n.v.host?n.v.host:n.v;var i=e&&e.i||EMPTY_OBJ;var o=n.i||EMPTY_OBJ;{for(t in i){if(!(t in o)){setAccessor(a,t,i[t],undefined,r,n.u)}}}for(t in o){setAccessor(a,t,i[t],o[t],r,n.u)}};var createElm=function(e,n,r,t){var a=n.o[r];var i=0;var o;var u;if(a.t!==null){o=a.v=doc.createTextNode(a.t)}else{o=a.v=doc.createElement(a.l);{updateElement(null,a,isSvgMode)}if(isDef(scopeId)&&o["s-si"]!==scopeId){o.classList.add(o["s-si"]=scopeId)}if(a.o){for(i=0;i<a.o.length;++i){u=createElm(e,a,i);if(u){o.appendChild(u)}}}}o["s-hn"]=hostTagName;return o};var addVnodes=function(e,n,r,t,a,i){var o=e;var u;if(o.shadowRoot&&o.tagName===hostTagName){o=o.shadowRoot}for(;a<=i;++a){if(t[a]){u=createElm(null,r,a);if(u){t[a].v=u;o.insertBefore(u,n)}}}};var removeVnodes=function(e,n,r){for(var t=n;t<=r;++t){var a=e[t];if(a){var i=a.v;if(i){i.remove()}}}};var updateChildren=function(e,n,r,t,a){if(a===void 0){a=false}var i=0;var o=0;var u=n.length-1;var f=n[0];var s=n[u];var l=t.length-1;var c=t[0];var v=t[l];var d;while(i<=u&&o<=l){if(f==null){f=n[++i]}else if(s==null){s=n[--u]}else if(c==null){c=t[++o]}else if(v==null){v=t[--l]}else if(isSameVnode(f,c,a)){patch(f,c,a);f=n[++i];c=t[++o]}else if(isSameVnode(s,v,a)){patch(s,v,a);s=n[--u];v=t[--l]}else if(isSameVnode(f,v,a)){patch(f,v,a);e.insertBefore(f.v,s.v.nextSibling);f=n[++i];v=t[--l]}else if(isSameVnode(s,c,a)){patch(s,c,a);e.insertBefore(s.v,f.v);s=n[--u];c=t[++o]}else{{d=createElm(n&&n[o],r,o);c=t[++o]}if(d){{f.v.parentNode.insertBefore(d,f.v)}}}}if(i>u){addVnodes(e,t[l+1]==null?null:t[l+1].v,r,t,o,l)}else if(o>l){removeVnodes(n,i,u)}};var isSameVnode=function(e,n,r){if(r===void 0){r=false}if(e.l===n.l){return true}return false};var patch=function(e,n,r){if(r===void 0){r=false}var t=n.v=e.v;var a=e.o;var i=n.o;var o=n.l;var u=n.t;if(u===null){{if(o==="slot");else{updateElement(e,n,isSvgMode)}}if(a!==null&&i!==null){updateChildren(t,a,n,i,r)}else if(i!==null){if(e.t!==null){t.textContent=""}addVnodes(t,null,n,i,0,i.length-1)}else if(a!==null){removeVnodes(a,0,a.length-1)}}else if(e.t!==u){t.data=u}};var renderVdom=function(e,n,r){if(r===void 0){r=false}var t=e.$hostElement$;var a=e.m;var i=e.S||newVNode(null,null);var o=isHost(n)?n:h(null,null,n);hostTagName=t.tagName;if(a.C){o.i=o.i||{};a.C.map((function(e){var n=e[0],r=e[1];return o.i[r]=t[n]}))}if(r&&o.i){for(var u=0,f=Object.keys(o.i);u<f.length;u++){var s=f[u];if(t.hasAttribute(s)&&!["key","ref","style","class"].includes(s)){o.i[s]=t[s]}}}o.l=null;o.u|=4;e.S=o;o.v=i.v=t.shadowRoot||t;{scopeId=t["s-sc"]}patch(i,o,r)};var attachToAncestor=function(e,n){if(n&&!e.T&&n["s-p"]){n["s-p"].push(new Promise((function(n){return e.T=n})))}};var scheduleUpdate=function(e,n){{e.u|=16}if(e.u&4){e.u|=512;return}attachToAncestor(e,e._);var r=function(){return dispatchHooks(e,n)};return writeTask(r)};var dispatchHooks=function(e,n){var r=createTime("scheduleUpdate",e.m.h);var t=e.$;var a;r();return enqueue(a,(function(){return updateComponent(e,t,n)}))};var enqueue=function(e,n){return isPromisey(e)?e.then(n):n()};var isPromisey=function(e){return e instanceof Promise||e&&e.then&&typeof e.then==="function"};var updateComponent=function(e,n,r){return __awaiter(void 0,void 0,void 0,(function(){var t,a,i,o,u,f,s;return __generator(this,(function(l){a=e.$hostElement$;i=createTime("update",e.m.h);o=a["s-rc"];if(r){attachStyles(e)}u=createTime("render",e.m.h);{callRender(e,n,a,r)}if(o){o.map((function(e){return e()}));a["s-rc"]=undefined}u();i();{f=(t=a["s-p"])!==null&&t!==void 0?t:[];s=function(){return postUpdateComponent(e)};if(f.length===0){s()}else{Promise.all(f).then(s);e.u|=4;f.length=0}}return[2]}))}))};var callRender=function(e,n,r,t){try{n=n.render();{e.u&=~16}{e.u|=2}{{{renderVdom(e,n,t)}}}}catch(n){consoleError(n,e.$hostElement$)}return null};var postUpdateComponent=function(e){var n=e.m.h;var r=e.$hostElement$;var t=createTime("postUpdate",n);var a=e.$;var i=e._;if(!(e.u&64)){e.u|=64;{addHydratedFlag(r)}{safeCall(a,"componentDidLoad")}t();{e.M(r);if(!i){appDidLoad()}}}else{{safeCall(a,"componentDidUpdate")}t()}{if(e.T){e.T();e.T=undefined}if(e.u&512){nextTick((function(){return scheduleUpdate(e,false)}))}e.u&=~(4|512)}};var appDidLoad=function(e){{addHydratedFlag(doc.documentElement)}nextTick((function(){return emitEvent(win,"appload",{detail:{namespace:NAMESPACE}})}))};var safeCall=function(e,n,r){if(e&&e[n]){try{return e[n](r)}catch(e){consoleError(e)}}return undefined};var addHydratedFlag=function(e){return e.setAttribute("hydrated","")};var getValue=function(e,n){return getHostRef(e).k.get(n)};var setValue=function(e,n,r,t){var a=getHostRef(e);var i=a.k.get(n);var o=a.u;var u=a.$;r=parsePropertyValue(r,t.A[n][0]);var f=Number.isNaN(i)&&Number.isNaN(r);var s=r!==i&&!f;if((!(o&8)||i===undefined)&&s){a.k.set(n,r);if(u){if((o&(2|16))===2){scheduleUpdate(a,false)}}}};var proxyComponent=function(e,n,r){var t;var a=e.prototype;if(n.A){var i=Object.entries(n.A);i.map((function(e){var t=e[0],i=e[1][0];if(i&31||r&2&&i&32){Object.defineProperty(a,t,{get:function(){return getValue(this,t)},set:function(e){setValue(this,t,e,n)},configurable:true,enumerable:true})}}));if(r&1){var o=new Map;a.attributeChangedCallback=function(e,r,t){var i=this;plt.jmp((function(){var u;var f=o.get(e);if(i.hasOwnProperty(f)){t=i[f];delete i[f]}else if(a.hasOwnProperty(f)&&typeof i[f]==="number"&&i[f]==t){return}else if(f==null){var s=getHostRef(i);var l=s===null||s===void 0?void 0:s.u;if(l&&!(l&8)&&l&128&&t!==r){var c=s.$;var v=(u=n.R)===null||u===void 0?void 0:u[e];v===null||v===void 0?void 0:v.forEach((function(n){if(c[n]!=null){c[n].call(c,t,r,e)}}))}return}i[f]=t===null&&typeof i[f]==="boolean"?false:t}))};e.observedAttributes=Array.from(new Set(__spreadArray(__spreadArray([],Object.keys((t=n.R)!==null&&t!==void 0?t:{}),true),i.filter((function(e){var n=e[0],r=e[1];return r[0]&15})).map((function(e){var r=e[0],t=e[1];var a;var i=t[1]||r;o.set(i,r);if(t[0]&512){(a=n.C)===null||a===void 0?void 0:a.push([r,i])}return i})),true)))}}return e};var initializeComponent=function(e,n,r,t){return __awaiter(void 0,void 0,void 0,(function(){var e,t,a,i,o,u,f,s;return __generator(this,(function(l){switch(l.label){case 0:if(!((n.u&32)===0))return[3,3];n.u|=32;e=loadModule(r);if(!e.then)return[3,2];t=uniqueTime();return[4,e];case 1:e=l.sent();t();l.label=2;case 2:if(!e.isProxied){proxyComponent(e,r,2);e.isProxied=true}a=createTime("createInstance",r.h);{n.u|=8}try{new e(n)}catch(e){consoleError(e)}{n.u&=~8}a();if(e.style){i=e.style;o=getScopeId(r);if(!styles.has(o)){u=createTime("registerStyles",r.h);registerStyle(o,i,!!(r.u&1));u()}}l.label=3;case 3:f=n._;s=function(){return scheduleUpdate(n,true)};if(f&&f["s-rc"]){f["s-rc"].push(s)}else{s()}return[2]}}))}))};var fireConnectedCallback=function(e){};var connectedCallback=function(e){if((plt.u&1)===0){var n=getHostRef(e);var r=n.m;var t=createTime("connectedCallback",r.h);if(!(n.u&1)){n.u|=1;{var a=e;while(a=a.parentNode||a.host){if(a["s-p"]){attachToAncestor(n,n._=a);break}}}if(r.A){Object.entries(r.A).map((function(n){var r=n[0],t=n[1][0];if(t&31&&e.hasOwnProperty(r)){var a=e[r];delete e[r];e[r]=a}}))}{initializeComponent(e,n,r)}}else{if(n===null||n===void 0?void 0:n.$);else if(n===null||n===void 0?void 0:n.H){n.H.then((function(){return fireConnectedCallback()}))}}t()}};var disconnectInstance=function(e){};var disconnectedCallback=function(e){return __awaiter(void 0,void 0,void 0,(function(){var n;return __generator(this,(function(r){if((plt.u&1)===0){n=getHostRef(e);if(n===null||n===void 0?void 0:n.$);else if(n===null||n===void 0?void 0:n.H){n.H.then((function(){return disconnectInstance()}))}}return[2]}))}))};var bootstrapLazy=function(e,n){if(n===void 0){n={}}var r;var t=createTime();var a=[];var i=n.exclude||[];var o=win.customElements;var u=doc.head;var f=u.querySelector("meta[charset]");var s=doc.createElement("style");var l=[];var c;var v=true;Object.assign(plt,n);plt.V=new URL(n.resourcesUrl||"./",doc.baseURI).href;var d=false;e.map((function(e){e[1].map((function(n){var r={u:n[0],h:n[1],A:n[2],q:n[3]};if(r.u&4){d=true}{r.A=n[2]}{r.C=[]}var t=r.h;var u=function(e){__extends(n,e);function n(n){var t=e.call(this,n)||this;n=t;registerHost(n,r);if(r.u&1){{{n.attachShadow({mode:"open"})}}}return t}n.prototype.connectedCallback=function(){var e=this;if(c){clearTimeout(c);c=null}if(v){l.push(this)}else{plt.jmp((function(){return connectedCallback(e)}))}};n.prototype.disconnectedCallback=function(){var e=this;plt.jmp((function(){return disconnectedCallback(e)}))};n.prototype.componentOnReady=function(){return getHostRef(this).H};return n}(HTMLElement);r.P=e[0];if(!i.includes(t)&&!o.get(t)){a.push(t);o.define(t,proxyComponent(u,r,1))}}))}));if(d){s.innerHTML+=SLOT_FB_CSS}{s.innerHTML+=a+HYDRATED_CSS}if(s.innerHTML.length){s.setAttribute("data-styles","");var p=(r=plt.p)!==null&&r!==void 0?r:queryNonceMetaTagContent(doc);if(p!=null){s.setAttribute("nonce",p)}u.insertBefore(s,f?f.nextSibling:u.firstChild)}v=false;if(l.length){l.map((function(e){return e.connectedCallback()}))}else{{plt.jmp((function(){return c=setTimeout(appDidLoad,30)}))}}t()};var setNonce=function(e){return plt.p=e};var hostRefs=new WeakMap;var getHostRef=function(e){return hostRefs.get(e)};var registerInstance=function(e,n){return hostRefs.set(n.$=e,n)};var registerHost=function(e,n){var r={u:0,$hostElement$:e,m:n,k:new Map};{r.H=new Promise((function(e){return r.M=e}));e["s-p"]=[];e["s-rc"]=[]}return hostRefs.set(e,r)};var isMemberInElement=function(e,n){return n in e};var consoleError=function(e,n){return(0,console.error)(e,n)};var cmpModules=new Map;var loadModule=function(e,n,r){var t=e.h.replace(/-/g,"_");var a=e.P;var i=cmpModules.get(a);if(i){return i[t]}if(!r||!BUILD.hotModuleReplacement){var o=function(e){cmpModules.set(a,e);return e[t]};switch(a){case"mds-paginator-item":return import("./mds-paginator-item.entry.js").then(o,consoleError)}}return import("./".concat(a,".entry.js").concat("")).then((function(e){{cmpModules.set(a,e)}return e[t]}),consoleError)};var styles=new Map;var win=typeof window!=="undefined"?window:{};var doc=win.document||{head:{}};var plt={u:0,V:"",jmp:function(e){return e()},raf:function(e){return requestAnimationFrame(e)},ael:function(e,n,r,t){return e.addEventListener(n,r,t)},rel:function(e,n,r,t){return e.removeEventListener(n,r,t)},ce:function(e,n){return new CustomEvent(e,n)}};var promiseResolve=function(e){return Promise.resolve(e)};var supportsConstructableStylesheets=function(){try{new CSSStyleSheet;return typeof(new CSSStyleSheet).replaceSync==="function"}catch(e){}return false}();var queueDomReads=[];var queueDomWrites=[];var queueTask=function(e,n){return function(r){e.push(r);if(!queuePending){queuePending=true;if(n&&plt.u&4){nextTick(flush)}else{plt.raf(flush)}}}};var consume=function(e){for(var n=0;n<e.length;n++){try{e[n](performance.now())}catch(e){consoleError(e)}}e.length=0};var flush=function(){consume(queueDomReads);{consume(queueDomWrites);if(queuePending=queueDomReads.length>0){plt.raf(flush)}}};var nextTick=function(e){return promiseResolve().then(e)};var writeTask=queueTask(queueDomWrites,true);export{Host as H,bootstrapLazy as b,getElement as g,h,promiseResolve as p,registerInstance as r,setNonce as s};
|
package/dist/esm-es5/loader.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as bootstrapLazy}from"./index-
|
|
1
|
+
import{b as bootstrapLazy}from"./index-1bfe34b4.js";export{s as setNonce}from"./index-1bfe34b4.js";var defineCustomElements=function(e,t){if(typeof window==="undefined")return undefined;return bootstrapLazy([["mds-paginator-item",[[1,"mds-paginator-item",{icon:[513],selected:[516],disabled:[516]}]]]],t)};export{defineCustomElements};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as registerInstance,h,H as Host,g as getElement}from"./index-d5935a07.js";var KeyboardManager=function(){function t(){var t=this;this.elements=[];this.handleClickBehaviorDispatchEvent=function(t){if(t.code==="Space"||t.code==="Enter"||t.code==="NumpadEnter"){t.target.click()}};this.handleEscapeBehaviorDispatchEvent=function(a){if(a.code==="Escape"&&t.escapeCallback){t.escapeCallback()}};this.addElement=function(a,o){if(o===void 0){o="element"}t.elements[o]=a};this.attachClickBehavior=function(a){if(a===void 0){a="element"}if(t.elements[a]){t.elements[a].addEventListener("keydown",t.handleClickBehaviorDispatchEvent)}};this.detachClickBehavior=function(a){if(a===void 0){a="element"}if(t.elements[a]){t.elements[a].removeEventListener("keydown",t.handleClickBehaviorDispatchEvent)}};this.attachEscapeBehavior=function(a){t.escapeCallback=a;if(window!==undefined){window.addEventListener("keydown",t.handleEscapeBehaviorDispatchEvent.bind(t))}};this.detachEscapeBehavior=function(){t.escapeCallback=function(){return};if(window!==undefined){window.removeEventListener("keydown",t.handleEscapeBehaviorDispatchEvent.bind(t))}}}return t}();var mdsPaginatorItemCss="@-webkit-keyframes focus-bounce{0%,75%,100%{outline-offset:var(--magma-outline-focus-offset, 6px)}50%{outline-offset:var(--magma-outline-blur-offset, 2px)}}@keyframes focus-bounce{0%,75%,100%{outline-offset:var(--magma-outline-focus-offset, 6px)}50%{outline-offset:var(--magma-outline-blur-offset, 2px)}}@tailwind components; .svg{display:-ms-flexbox;display:flex}.svg svg{aspect-ratio:1/1;height:100%;width:100%}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.border{border-width:1px}.bg-label-amaranth-10{--tw-bg-opacity:1;background-color:rgb(var(--label-amaranth-10) / var(--tw-bg-opacity))}.bg-label-aqua-10{--tw-bg-opacity:1;background-color:rgb(var(--label-aqua-10) / var(--tw-bg-opacity))}.bg-label-blue-10{--tw-bg-opacity:1;background-color:rgb(var(--label-blue-10) / var(--tw-bg-opacity))}.bg-label-green-10{--tw-bg-opacity:1;background-color:rgb(var(--label-green-10) / var(--tw-bg-opacity))}.bg-label-lime-10{--tw-bg-opacity:1;background-color:rgb(var(--label-lime-10) / var(--tw-bg-opacity))}.bg-label-orange-10{--tw-bg-opacity:1;background-color:rgb(var(--label-orange-10) / var(--tw-bg-opacity))}.bg-label-orchid-10{--tw-bg-opacity:1;background-color:rgb(var(--label-orchid-10) / var(--tw-bg-opacity))}.bg-label-violet-10{--tw-bg-opacity:1;background-color:rgb(var(--label-violet-10) / var(--tw-bg-opacity))}.bg-label-yellow-10{--tw-bg-opacity:1;background-color:rgb(var(--label-yellow-10) / var(--tw-bg-opacity))}.bg-tone-neutral-10{--tw-bg-opacity:1;background-color:rgb(var(--tone-neutral-10) / var(--tw-bg-opacity))}.fill-label-amaranth-04{fill:rgb(var(--label-amaranth-04))}.fill-label-aqua-04{fill:rgb(var(--label-aqua-04))}.fill-label-blue-04{fill:rgb(var(--label-blue-04))}.fill-label-green-04{fill:rgb(var(--label-green-04))}.fill-label-lime-04{fill:rgb(var(--label-lime-04))}.fill-label-orange-04{fill:rgb(var(--label-orange-04))}.fill-label-orchid-04{fill:rgb(var(--label-orchid-04))}.fill-label-violet-04{fill:rgb(var(--label-violet-04))}.fill-label-yellow-04{fill:rgb(var(--label-yellow-04))}.fill-tone-neutral-04{fill:rgb(var(--tone-neutral-04))}.text-label-amaranth-04{--tw-text-opacity:1;color:rgb(var(--label-amaranth-04) / var(--tw-text-opacity))}.text-label-aqua-04{--tw-text-opacity:1;color:rgb(var(--label-aqua-04) / var(--tw-text-opacity))}.text-label-blue-04{--tw-text-opacity:1;color:rgb(var(--label-blue-04) / var(--tw-text-opacity))}.text-label-green-04{--tw-text-opacity:1;color:rgb(var(--label-green-04) / var(--tw-text-opacity))}.text-label-lime-04{--tw-text-opacity:1;color:rgb(var(--label-lime-04) / var(--tw-text-opacity))}.text-label-orange-04{--tw-text-opacity:1;color:rgb(var(--label-orange-04) / var(--tw-text-opacity))}.text-label-orchid-04{--tw-text-opacity:1;color:rgb(var(--label-orchid-04) / var(--tw-text-opacity))}.text-label-violet-04{--tw-text-opacity:1;color:rgb(var(--label-violet-04) / var(--tw-text-opacity))}.text-label-yellow-04{--tw-text-opacity:1;color:rgb(var(--label-yellow-04) / var(--tw-text-opacity))}.text-tone-neutral-04{--tw-text-opacity:1;color:rgb(var(--tone-neutral-04) / var(--tw-text-opacity))}.shadow{--tw-shadow:0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);-webkit-box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}:host{--mds-paginator-item-background-disabled:rgb(var(--tone-neutral-09));--mds-paginator-item-background-hover:rgb(var(--tone-neutral-08));--mds-paginator-item-background-selected:rgb(var(--brand-maggioli-03));--mds-paginator-item-background:transparent;--mds-paginator-item-color-disabled:rgb(var(--tone-neutral-06));--mds-paginator-item-color-hover:rgb(var(--tone-neutral-02));--mds-paginator-item-color-selected:rgb(var(--tone-neutral));--mds-paginator-item-color:rgb(var(--tone-neutral-02));--mds-paginator-item-radius:200px;--mds-paginator-item-shadow-disabled:none;--mds-paginator-item-shadow-hover:none;--mds-paginator-item-shadow-selected:0 0 1px 1px rgb(0 0 0 / 0.06), 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -1px rgb(0 0 0 / 0.06);--mds-paginator-item-shadow:none;--mds-paginator-item-size:2.25rem;-webkit-animation-duration:var(--magma-outline-animation-duration, 1s);animation-duration:var(--magma-outline-animation-duration, 1s);-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;-webkit-animation-name:focus-bounce;animation-name:focus-bounce;-webkit-animation-play-state:paused;animation-play-state:paused;-webkit-animation-timing-function:cubic-bezier(0, 0, 0.2, 1);animation-timing-function:cubic-bezier(0, 0, 0.2, 1);outline:var(--magma-outline-blur);-webkit-transition-duration:200ms;transition-duration:200ms;-webkit-transition-property:background-color, border-color, color, fill, outline, outline-offset, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, fill, outline, outline-offset, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, fill, outline, outline-offset, transform;transition-property:background-color, border-color, box-shadow, color, fill, outline, outline-offset, transform, -webkit-box-shadow, -webkit-transform;-webkit-transition-timing-function:ease-in-out;transition-timing-function:ease-in-out}:host:focus-visible{--magma-outline-blur:var(--magma-outline-focus);-webkit-animation-play-state:running;animation-play-state:running}:host{padding-left:0.75rem;padding-right:0.75rem;-webkit-transition-duration:200ms;transition-duration:200ms;-webkit-transition-timing-function:cubic-bezier(0, 0, 0.2, 1);transition-timing-function:cubic-bezier(0, 0, 0.2, 1);-ms-flex-align:center;align-items:center;background-color:var(--mds-paginator-item-background);border-radius:var(--mds-paginator-item-radius);-webkit-box-shadow:var(--mds-paginator-item-shadow);box-shadow:var(--mds-paginator-item-shadow);-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--mds-paginator-item-color);cursor:pointer;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-negative:0;flex-shrink:0;height:var(--mds-paginator-item-size);-ms-flex-pack:center;justify-content:center;min-width:var(--mds-paginator-item-size);-webkit-transition-property:background-color, color, outline, outline-offset, -webkit-box-shadow;transition-property:background-color, color, outline, outline-offset, -webkit-box-shadow;transition-property:background-color, box-shadow, color, outline, outline-offset;transition-property:background-color, box-shadow, color, outline, outline-offset, -webkit-box-shadow;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host(:focus-visible){--magma-outline-blur:var(--magma-outline-focus);-webkit-animation-play-state:running;animation-play-state:running}:host(:hover){background-color:var(--mds-paginator-item-background-hover);-webkit-box-shadow:var(--mds-paginator-item-shadow-hover);box-shadow:var(--mds-paginator-item-shadow-hover);color:var(--mds-paginator-item-color-hover);fill:var(--mds-paginator-item-color-hover)}:host([icon]){padding:0rem}:host([selected]){background-color:var(--mds-paginator-item-background-selected);-webkit-box-shadow:var(--mds-paginator-item-shadow-selected);box-shadow:var(--mds-paginator-item-shadow-selected);color:var(--mds-paginator-item-color-selected);fill:var(--mds-paginator-item-color-selected);pointer-events:none}:host([disabled]){background-color:var(--mds-paginator-item-background-disabled);-webkit-box-shadow:var(--mds-paginator-item-shadow-disabled);box-shadow:var(--mds-paginator-item-shadow-disabled);color:var(--mds-paginator-item-color-disabled);fill:var(--mds-paginator-item-color-disabled);pointer-events:none}.icon{padding-left:0rem;padding-right:0rem}";var MdsPaginatorItem=function(){function t(t){var a=this;registerInstance(this,t);this.km=new KeyboardManager;this.componentDidLoad=function(){a.km.addElement(a.host);a.km.attachClickBehavior()};this.componentDidUpdate=function(){if(!a.disabled&&!a.selected){a.km.attachClickBehavior();return}a.km.detachClickBehavior()};this.disconnectedCallback=function(){a.km.detachClickBehavior()};this.icon=undefined;this.selected=undefined;this.disabled=undefined}t.prototype.render=function(){return h(Host,{tabindex:"0"},this.icon!==undefined?h("mds-icon",{name:this.icon}):h("mds-text",{class:"text",typography:"detail"},h("slot",null)))};Object.defineProperty(t.prototype,"host",{get:function(){return getElement(this)},enumerable:false,configurable:true});return t}();MdsPaginatorItem.style=mdsPaginatorItemCss;export{MdsPaginatorItem as mds_paginator_item};
|
|
1
|
+
import{r as registerInstance,h,H as Host,g as getElement}from"./index-1bfe34b4.js";var KeyboardManager=function(){function t(){var t=this;this.elements=new Map;this.handleClickBehaviorDispatchEvent=function(t){if(t.code==="Enter"||t.code==="NumpadEnter"){t.target.click()}};this.handleEscapeBehaviorDispatchEvent=function(o){if(o.code==="Escape"&&t.escapeCallback){t.escapeCallback()}};this.addElement=function(o,a){if(a===void 0){a="element"}if(!o){throw Error("Passed an ".concat(o," element parameter to KeyboardManager.addElement"))}t.elements.set(a,o)};this.removeElement=function(o){if(o===void 0){o="element"}t.detachClickBehavior(o);t.elements.delete(o)};this.attachClickBehavior=function(o){if(o===void 0){o="element"}var a;(a=t.elements.get(o))===null||a===void 0?void 0:a.addEventListener("keydown",t.handleClickBehaviorDispatchEvent)};this.detachClickBehavior=function(o){if(o===void 0){o="element"}var a;(a=t.elements.get(o))===null||a===void 0?void 0:a.removeEventListener("keydown",t.handleClickBehaviorDispatchEvent)};this.attachEscapeBehavior=function(o){t.escapeCallback=o;if(window!==undefined){window.addEventListener("keydown",t.handleEscapeBehaviorDispatchEvent.bind(t))}};this.detachEscapeBehavior=function(){t.escapeCallback=function(){return};if(window!==undefined){window.removeEventListener("keydown",t.handleEscapeBehaviorDispatchEvent.bind(t))}}}return t}();var mdsPaginatorItemCss="@-webkit-keyframes focus-bounce{0%,75%,100%{outline-offset:var(--magma-outline-focus-offset, 6px)}50%{outline-offset:var(--magma-outline-blur-offset, 2px)}}@keyframes focus-bounce{0%,75%,100%{outline-offset:var(--magma-outline-focus-offset, 6px)}50%{outline-offset:var(--magma-outline-blur-offset, 2px)}}@tailwind components; .svg{display:-ms-flexbox;display:flex}.svg svg{aspect-ratio:1/1;height:100%;width:100%}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.border{border-width:1px}.bg-label-amaranth-10{--tw-bg-opacity:1;background-color:rgb(var(--label-amaranth-10) / var(--tw-bg-opacity))}.bg-label-aqua-10{--tw-bg-opacity:1;background-color:rgb(var(--label-aqua-10) / var(--tw-bg-opacity))}.bg-label-blue-10{--tw-bg-opacity:1;background-color:rgb(var(--label-blue-10) / var(--tw-bg-opacity))}.bg-label-green-10{--tw-bg-opacity:1;background-color:rgb(var(--label-green-10) / var(--tw-bg-opacity))}.bg-label-lime-10{--tw-bg-opacity:1;background-color:rgb(var(--label-lime-10) / var(--tw-bg-opacity))}.bg-label-orange-10{--tw-bg-opacity:1;background-color:rgb(var(--label-orange-10) / var(--tw-bg-opacity))}.bg-label-orchid-10{--tw-bg-opacity:1;background-color:rgb(var(--label-orchid-10) / var(--tw-bg-opacity))}.bg-label-violet-10{--tw-bg-opacity:1;background-color:rgb(var(--label-violet-10) / var(--tw-bg-opacity))}.bg-label-yellow-10{--tw-bg-opacity:1;background-color:rgb(var(--label-yellow-10) / var(--tw-bg-opacity))}.bg-tone-neutral-10{--tw-bg-opacity:1;background-color:rgb(var(--tone-neutral-10) / var(--tw-bg-opacity))}.fill-label-amaranth-04{fill:rgb(var(--label-amaranth-04))}.fill-label-aqua-04{fill:rgb(var(--label-aqua-04))}.fill-label-blue-04{fill:rgb(var(--label-blue-04))}.fill-label-green-04{fill:rgb(var(--label-green-04))}.fill-label-lime-04{fill:rgb(var(--label-lime-04))}.fill-label-orange-04{fill:rgb(var(--label-orange-04))}.fill-label-orchid-04{fill:rgb(var(--label-orchid-04))}.fill-label-violet-04{fill:rgb(var(--label-violet-04))}.fill-label-yellow-04{fill:rgb(var(--label-yellow-04))}.fill-tone-neutral-04{fill:rgb(var(--tone-neutral-04))}.text-label-amaranth-04{--tw-text-opacity:1;color:rgb(var(--label-amaranth-04) / var(--tw-text-opacity))}.text-label-aqua-04{--tw-text-opacity:1;color:rgb(var(--label-aqua-04) / var(--tw-text-opacity))}.text-label-blue-04{--tw-text-opacity:1;color:rgb(var(--label-blue-04) / var(--tw-text-opacity))}.text-label-green-04{--tw-text-opacity:1;color:rgb(var(--label-green-04) / var(--tw-text-opacity))}.text-label-lime-04{--tw-text-opacity:1;color:rgb(var(--label-lime-04) / var(--tw-text-opacity))}.text-label-orange-04{--tw-text-opacity:1;color:rgb(var(--label-orange-04) / var(--tw-text-opacity))}.text-label-orchid-04{--tw-text-opacity:1;color:rgb(var(--label-orchid-04) / var(--tw-text-opacity))}.text-label-violet-04{--tw-text-opacity:1;color:rgb(var(--label-violet-04) / var(--tw-text-opacity))}.text-label-yellow-04{--tw-text-opacity:1;color:rgb(var(--label-yellow-04) / var(--tw-text-opacity))}.text-tone-neutral-04{--tw-text-opacity:1;color:rgb(var(--tone-neutral-04) / var(--tw-text-opacity))}.shadow{--tw-shadow:0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);-webkit-box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}:host{--mds-paginator-item-background-disabled:rgb(var(--tone-neutral-09));--mds-paginator-item-background-hover:rgb(var(--tone-neutral-08));--mds-paginator-item-background-selected:rgb(var(--brand-maggioli-03));--mds-paginator-item-background:transparent;--mds-paginator-item-color-disabled:rgb(var(--tone-neutral-06));--mds-paginator-item-color-hover:rgb(var(--tone-neutral-02));--mds-paginator-item-color-selected:rgb(var(--tone-neutral));--mds-paginator-item-color:rgb(var(--tone-neutral-02));--mds-paginator-item-radius:200px;--mds-paginator-item-shadow-disabled:none;--mds-paginator-item-shadow-hover:none;--mds-paginator-item-shadow-selected:0 0 1px 1px rgb(0 0 0 / 0.06), 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -1px rgb(0 0 0 / 0.06);--mds-paginator-item-shadow:none;--mds-paginator-item-size:2.25rem;-webkit-animation-duration:var(--magma-outline-animation-duration, 1s);animation-duration:var(--magma-outline-animation-duration, 1s);-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;-webkit-animation-name:focus-bounce;animation-name:focus-bounce;-webkit-animation-play-state:paused;animation-play-state:paused;-webkit-animation-timing-function:cubic-bezier(0, 0, 0.2, 1);animation-timing-function:cubic-bezier(0, 0, 0.2, 1);outline:var(--magma-outline-blur);-webkit-transition-duration:200ms;transition-duration:200ms;-webkit-transition-property:background-color, border-color, color, fill, outline, outline-offset, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, fill, outline, outline-offset, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, fill, outline, outline-offset, transform;transition-property:background-color, border-color, box-shadow, color, fill, outline, outline-offset, transform, -webkit-box-shadow, -webkit-transform;-webkit-transition-timing-function:ease-in-out;transition-timing-function:ease-in-out}:host:focus-visible{--magma-outline-blur:var(--magma-outline-focus);-webkit-animation-play-state:running;animation-play-state:running}:host{padding-left:0.75rem;padding-right:0.75rem;-webkit-transition-duration:200ms;transition-duration:200ms;-webkit-transition-timing-function:cubic-bezier(0, 0, 0.2, 1);transition-timing-function:cubic-bezier(0, 0, 0.2, 1);-ms-flex-align:center;align-items:center;background-color:var(--mds-paginator-item-background);border-radius:var(--mds-paginator-item-radius);-webkit-box-shadow:var(--mds-paginator-item-shadow);box-shadow:var(--mds-paginator-item-shadow);-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--mds-paginator-item-color);cursor:pointer;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-negative:0;flex-shrink:0;height:var(--mds-paginator-item-size);-ms-flex-pack:center;justify-content:center;min-width:var(--mds-paginator-item-size);-webkit-transition-property:background-color, color, outline, outline-offset, -webkit-box-shadow;transition-property:background-color, color, outline, outline-offset, -webkit-box-shadow;transition-property:background-color, box-shadow, color, outline, outline-offset;transition-property:background-color, box-shadow, color, outline, outline-offset, -webkit-box-shadow;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host(:focus-visible){--magma-outline-blur:var(--magma-outline-focus);-webkit-animation-play-state:running;animation-play-state:running}:host(:hover){background-color:var(--mds-paginator-item-background-hover);-webkit-box-shadow:var(--mds-paginator-item-shadow-hover);box-shadow:var(--mds-paginator-item-shadow-hover);color:var(--mds-paginator-item-color-hover);fill:var(--mds-paginator-item-color-hover)}:host([icon]){padding:0rem}:host([selected]){background-color:var(--mds-paginator-item-background-selected);-webkit-box-shadow:var(--mds-paginator-item-shadow-selected);box-shadow:var(--mds-paginator-item-shadow-selected);color:var(--mds-paginator-item-color-selected);fill:var(--mds-paginator-item-color-selected);pointer-events:none}:host([disabled]){background-color:var(--mds-paginator-item-background-disabled);-webkit-box-shadow:var(--mds-paginator-item-shadow-disabled);box-shadow:var(--mds-paginator-item-shadow-disabled);color:var(--mds-paginator-item-color-disabled);fill:var(--mds-paginator-item-color-disabled);pointer-events:none}.icon{padding-left:0rem;padding-right:0rem}";var MdsPaginatorItem=function(){function t(t){var o=this;registerInstance(this,t);this.km=new KeyboardManager;this.disconnectedCallback=function(){o.km.detachClickBehavior()};this.icon=undefined;this.selected=undefined;this.disabled=undefined}t.prototype.componentDidLoad=function(){this.km.addElement(this.host);this.km.attachClickBehavior()};t.prototype.componentDidUpdate=function(){if(!this.disabled&&!this.selected){this.km.attachClickBehavior();return}this.km.detachClickBehavior()};t.prototype.render=function(){return h(Host,{tabindex:"0"},this.icon!==undefined?h("mds-icon",{name:this.icon}):h("mds-text",{class:"text",typography:"detail"},h("slot",null)))};Object.defineProperty(t.prototype,"host",{get:function(){return getElement(this)},enumerable:false,configurable:true});return t}();MdsPaginatorItem.style=mdsPaginatorItemCss;export{MdsPaginatorItem as mds_paginator_item};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as promiseResolve,b as bootstrapLazy}from"./index-
|
|
1
|
+
import{p as promiseResolve,b as bootstrapLazy}from"./index-1bfe34b4.js";export{s as setNonce}from"./index-1bfe34b4.js";var patchBrowser=function(){var e=import.meta.url;var r={};if(e!==""){r.resourcesUrl=new URL(".",e).href}return promiseResolve(r)};patchBrowser().then((function(e){return bootstrapLazy([["mds-paginator-item",[[1,"mds-paginator-item",{icon:[513],selected:[516],disabled:[516]}]]]],e)}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as t}from"./p-
|
|
1
|
+
import{p as e,b as t}from"./p-76f1815c.js";export{s as setNonce}from"./p-76f1815c.js";(()=>{const s=import.meta.url,t={};return""!==s&&(t.resourcesUrl=new URL(".",s).href),e(t)})().then((e=>t([["p-10819660",[[1,"mds-paginator-item",{icon:[513],selected:[516],disabled:[516]}]]]],e)));
|
|
@@ -115,7 +115,7 @@ DOMTokenList
|
|
|
115
115
|
var resourcesUrl = scriptElm ? scriptElm.getAttribute('data-resources-url') || scriptElm.src : '';
|
|
116
116
|
var start = function() {
|
|
117
117
|
// if src is not present then origin is "null", and new URL() throws TypeError: Failed to construct 'URL': Invalid base URL
|
|
118
|
-
var url = new URL('./p-
|
|
118
|
+
var url = new URL('./p-ba0d92c9.system.js', new URL(resourcesUrl, window.location.origin !== 'null' ? window.location.origin : undefined));
|
|
119
119
|
System.import(url.href);
|
|
120
120
|
};
|
|
121
121
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,h as o,H as a,g as e}from"./p-76f1815c.js";class i{constructor(){this.elements=new Map,this.handleClickBehaviorDispatchEvent=t=>{"Enter"!==t.code&&"NumpadEnter"!==t.code||t.target.click()},this.handleEscapeBehaviorDispatchEvent=t=>{"Escape"===t.code&&this.escapeCallback&&this.escapeCallback()},this.addElement=(t,o="element")=>{if(!t)throw Error(`Passed an ${t} element parameter to KeyboardManager.addElement`);this.elements.set(o,t)},this.removeElement=(t="element")=>{this.detachClickBehavior(t),this.elements.delete(t)},this.attachClickBehavior=(t="element")=>{var o;null===(o=this.elements.get(t))||void 0===o||o.addEventListener("keydown",this.handleClickBehaviorDispatchEvent)},this.detachClickBehavior=(t="element")=>{var o;null===(o=this.elements.get(t))||void 0===o||o.removeEventListener("keydown",this.handleClickBehaviorDispatchEvent)},this.attachEscapeBehavior=t=>{this.escapeCallback=t,void 0!==window&&window.addEventListener("keydown",this.handleEscapeBehaviorDispatchEvent.bind(this))},this.detachEscapeBehavior=()=>{this.escapeCallback=()=>{},void 0!==window&&window.removeEventListener("keydown",this.handleEscapeBehaviorDispatchEvent.bind(this))}}}const r=class{constructor(o){t(this,o),this.km=new i,this.disconnectedCallback=()=>{this.km.detachClickBehavior()},this.icon=void 0,this.selected=void 0,this.disabled=void 0}componentDidLoad(){this.km.addElement(this.host),this.km.attachClickBehavior()}componentDidUpdate(){this.disabled||this.selected?this.km.detachClickBehavior():this.km.attachClickBehavior()}render(){return o(a,{tabindex:"0"},void 0!==this.icon?o("mds-icon",{name:this.icon}):o("mds-text",{class:"text",typography:"detail"},o("slot",null)))}get host(){return e(this)}};r.style="@-webkit-keyframes focus-bounce{0%,75%,100%{outline-offset:var(--magma-outline-focus-offset, 6px)}50%{outline-offset:var(--magma-outline-blur-offset, 2px)}}@keyframes focus-bounce{0%,75%,100%{outline-offset:var(--magma-outline-focus-offset, 6px)}50%{outline-offset:var(--magma-outline-blur-offset, 2px)}}@tailwind components; .svg{display:-ms-flexbox;display:flex}.svg svg{aspect-ratio:1/1;height:100%;width:100%}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.border{border-width:1px}.bg-label-amaranth-10{--tw-bg-opacity:1;background-color:rgb(var(--label-amaranth-10) / var(--tw-bg-opacity))}.bg-label-aqua-10{--tw-bg-opacity:1;background-color:rgb(var(--label-aqua-10) / var(--tw-bg-opacity))}.bg-label-blue-10{--tw-bg-opacity:1;background-color:rgb(var(--label-blue-10) / var(--tw-bg-opacity))}.bg-label-green-10{--tw-bg-opacity:1;background-color:rgb(var(--label-green-10) / var(--tw-bg-opacity))}.bg-label-lime-10{--tw-bg-opacity:1;background-color:rgb(var(--label-lime-10) / var(--tw-bg-opacity))}.bg-label-orange-10{--tw-bg-opacity:1;background-color:rgb(var(--label-orange-10) / var(--tw-bg-opacity))}.bg-label-orchid-10{--tw-bg-opacity:1;background-color:rgb(var(--label-orchid-10) / var(--tw-bg-opacity))}.bg-label-violet-10{--tw-bg-opacity:1;background-color:rgb(var(--label-violet-10) / var(--tw-bg-opacity))}.bg-label-yellow-10{--tw-bg-opacity:1;background-color:rgb(var(--label-yellow-10) / var(--tw-bg-opacity))}.bg-tone-neutral-10{--tw-bg-opacity:1;background-color:rgb(var(--tone-neutral-10) / var(--tw-bg-opacity))}.fill-label-amaranth-04{fill:rgb(var(--label-amaranth-04))}.fill-label-aqua-04{fill:rgb(var(--label-aqua-04))}.fill-label-blue-04{fill:rgb(var(--label-blue-04))}.fill-label-green-04{fill:rgb(var(--label-green-04))}.fill-label-lime-04{fill:rgb(var(--label-lime-04))}.fill-label-orange-04{fill:rgb(var(--label-orange-04))}.fill-label-orchid-04{fill:rgb(var(--label-orchid-04))}.fill-label-violet-04{fill:rgb(var(--label-violet-04))}.fill-label-yellow-04{fill:rgb(var(--label-yellow-04))}.fill-tone-neutral-04{fill:rgb(var(--tone-neutral-04))}.text-label-amaranth-04{--tw-text-opacity:1;color:rgb(var(--label-amaranth-04) / var(--tw-text-opacity))}.text-label-aqua-04{--tw-text-opacity:1;color:rgb(var(--label-aqua-04) / var(--tw-text-opacity))}.text-label-blue-04{--tw-text-opacity:1;color:rgb(var(--label-blue-04) / var(--tw-text-opacity))}.text-label-green-04{--tw-text-opacity:1;color:rgb(var(--label-green-04) / var(--tw-text-opacity))}.text-label-lime-04{--tw-text-opacity:1;color:rgb(var(--label-lime-04) / var(--tw-text-opacity))}.text-label-orange-04{--tw-text-opacity:1;color:rgb(var(--label-orange-04) / var(--tw-text-opacity))}.text-label-orchid-04{--tw-text-opacity:1;color:rgb(var(--label-orchid-04) / var(--tw-text-opacity))}.text-label-violet-04{--tw-text-opacity:1;color:rgb(var(--label-violet-04) / var(--tw-text-opacity))}.text-label-yellow-04{--tw-text-opacity:1;color:rgb(var(--label-yellow-04) / var(--tw-text-opacity))}.text-tone-neutral-04{--tw-text-opacity:1;color:rgb(var(--tone-neutral-04) / var(--tw-text-opacity))}.shadow{--tw-shadow:0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);-webkit-box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}:host{--mds-paginator-item-background-disabled:rgb(var(--tone-neutral-09));--mds-paginator-item-background-hover:rgb(var(--tone-neutral-08));--mds-paginator-item-background-selected:rgb(var(--brand-maggioli-03));--mds-paginator-item-background:transparent;--mds-paginator-item-color-disabled:rgb(var(--tone-neutral-06));--mds-paginator-item-color-hover:rgb(var(--tone-neutral-02));--mds-paginator-item-color-selected:rgb(var(--tone-neutral));--mds-paginator-item-color:rgb(var(--tone-neutral-02));--mds-paginator-item-radius:200px;--mds-paginator-item-shadow-disabled:none;--mds-paginator-item-shadow-hover:none;--mds-paginator-item-shadow-selected:0 0 1px 1px rgb(0 0 0 / 0.06), 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -1px rgb(0 0 0 / 0.06);--mds-paginator-item-shadow:none;--mds-paginator-item-size:2.25rem;-webkit-animation-duration:var(--magma-outline-animation-duration, 1s);animation-duration:var(--magma-outline-animation-duration, 1s);-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;-webkit-animation-name:focus-bounce;animation-name:focus-bounce;-webkit-animation-play-state:paused;animation-play-state:paused;-webkit-animation-timing-function:cubic-bezier(0, 0, 0.2, 1);animation-timing-function:cubic-bezier(0, 0, 0.2, 1);outline:var(--magma-outline-blur);-webkit-transition-duration:200ms;transition-duration:200ms;-webkit-transition-property:background-color, border-color, color, fill, outline, outline-offset, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, fill, outline, outline-offset, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, fill, outline, outline-offset, transform;transition-property:background-color, border-color, box-shadow, color, fill, outline, outline-offset, transform, -webkit-box-shadow, -webkit-transform;-webkit-transition-timing-function:ease-in-out;transition-timing-function:ease-in-out}:host:focus-visible{--magma-outline-blur:var(--magma-outline-focus);-webkit-animation-play-state:running;animation-play-state:running}:host{padding-left:0.75rem;padding-right:0.75rem;-webkit-transition-duration:200ms;transition-duration:200ms;-webkit-transition-timing-function:cubic-bezier(0, 0, 0.2, 1);transition-timing-function:cubic-bezier(0, 0, 0.2, 1);-ms-flex-align:center;align-items:center;background-color:var(--mds-paginator-item-background);border-radius:var(--mds-paginator-item-radius);-webkit-box-shadow:var(--mds-paginator-item-shadow);box-shadow:var(--mds-paginator-item-shadow);-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--mds-paginator-item-color);cursor:pointer;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-negative:0;flex-shrink:0;height:var(--mds-paginator-item-size);-ms-flex-pack:center;justify-content:center;min-width:var(--mds-paginator-item-size);-webkit-transition-property:background-color, color, outline, outline-offset, -webkit-box-shadow;transition-property:background-color, color, outline, outline-offset, -webkit-box-shadow;transition-property:background-color, box-shadow, color, outline, outline-offset;transition-property:background-color, box-shadow, color, outline, outline-offset, -webkit-box-shadow;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host(:focus-visible){--magma-outline-blur:var(--magma-outline-focus);-webkit-animation-play-state:running;animation-play-state:running}:host(:hover){background-color:var(--mds-paginator-item-background-hover);-webkit-box-shadow:var(--mds-paginator-item-shadow-hover);box-shadow:var(--mds-paginator-item-shadow-hover);color:var(--mds-paginator-item-color-hover);fill:var(--mds-paginator-item-color-hover)}:host([icon]){padding:0rem}:host([selected]){background-color:var(--mds-paginator-item-background-selected);-webkit-box-shadow:var(--mds-paginator-item-shadow-selected);box-shadow:var(--mds-paginator-item-shadow-selected);color:var(--mds-paginator-item-color-selected);fill:var(--mds-paginator-item-color-selected);pointer-events:none}:host([disabled]){background-color:var(--mds-paginator-item-background-disabled);-webkit-box-shadow:var(--mds-paginator-item-shadow-disabled);box-shadow:var(--mds-paginator-item-shadow-disabled);color:var(--mds-paginator-item-color-disabled);fill:var(--mds-paginator-item-color-disabled);pointer-events:none}.icon{padding-left:0rem;padding-right:0rem}";export{r as mds_paginator_item}
|