@maggioli-design-system/mds-accordion-timer 2.2.0 → 3.0.0
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-6821dfbc.js → index-d958b818.js} +56 -1
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/mds-accordion-timer.cjs.entry.js +1 -1
- package/dist/cjs/mds-accordion-timer.cjs.js +3 -3
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/common/keyboard-manager.js +40 -0
- package/dist/collection/components/mds-accordion-timer/mds-accordion-timer.js +3 -3
- package/dist/collection/dictionary/icon.js +3 -1
- package/dist/collection/dictionary/typography.js +5 -1
- package/dist/components/mds-accordion-timer.js +1 -1
- package/dist/esm/{index-5ca2b649.js → index-22b73a3a.js} +56 -1
- package/dist/esm/loader.js +4 -4
- package/dist/esm/mds-accordion-timer.entry.js +1 -1
- package/dist/esm/mds-accordion-timer.js +4 -4
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/mds-accordion-timer.entry.js +1 -1
- package/dist/esm-es5/mds-accordion-timer.js +1 -1
- package/dist/mds-accordion-timer/mds-accordion-timer.esm.js +1 -1
- package/dist/mds-accordion-timer/mds-accordion-timer.js +1 -1
- package/dist/mds-accordion-timer/{p-e66497f2.system.entry.js → p-118bf4e5.system.entry.js} +1 -1
- package/dist/mds-accordion-timer/p-c6d75694.system.js +1 -0
- package/dist/mds-accordion-timer/{p-f0c71bfc.entry.js → p-f44da2be.entry.js} +1 -1
- package/dist/stats.json +36 -33
- package/dist/types/common/keyboard-manager.d.ts +11 -0
- package/dist/types/dictionary/icon.d.ts +2 -1
- package/dist/types/dictionary/typography.d.ts +2 -1
- package/dist/types/stencil-public-runtime.d.ts +11 -0
- package/dist/types/types/typography.d.ts +1 -0
- package/package.json +4 -4
- package/src/common/keyboard-manager.ts +46 -0
- package/src/components/mds-accordion-timer/mds-accordion-timer.tsx +3 -3
- package/src/dictionary/icon.ts +4 -0
- package/src/dictionary/typography.ts +9 -3
- package/src/fixtures/icons.json +174 -0
- package/src/fixtures/iconsauce.json +175 -0
- package/src/tailwind/components.css +1 -0
- package/src/types/typography.ts +4 -0
- package/www/build/mds-accordion-timer.esm.js +1 -1
- package/www/build/mds-accordion-timer.js +1 -1
- package/www/build/{p-e66497f2.system.entry.js → p-118bf4e5.system.entry.js} +1 -1
- package/www/build/p-c6d75694.system.js +1 -0
- package/www/build/{p-f0c71bfc.entry.js → p-f44da2be.entry.js} +1 -1
- package/dist/mds-accordion-timer/p-c4b2aa5c.system.js +0 -1
- package/www/build/p-c4b2aa5c.system.js +0 -1
- /package/dist/esm-es5/{index-5ca2b649.js → index-22b73a3a.js} +0 -0
- /package/dist/mds-accordion-timer/{p-59116e2a.system.js → p-3face4e0.system.js} +0 -0
- /package/dist/mds-accordion-timer/{p-5d8e384d.js → p-9084d19f.js} +0 -0
- /package/www/build/{p-59116e2a.system.js → p-3face4e0.system.js} +0 -0
- /package/www/build/{p-5d8e384d.js → p-9084d19f.js} +0 -0
|
@@ -111,6 +111,14 @@ const h = (nodeName, vnodeData, ...children) => {
|
|
|
111
111
|
}
|
|
112
112
|
return vnode;
|
|
113
113
|
};
|
|
114
|
+
/**
|
|
115
|
+
* A utility function for creating a virtual DOM node from a tag and some
|
|
116
|
+
* possible text content.
|
|
117
|
+
*
|
|
118
|
+
* @param tag the tag for this element
|
|
119
|
+
* @param text possible text content for the node
|
|
120
|
+
* @returns a newly-minted virtual DOM node
|
|
121
|
+
*/
|
|
114
122
|
const newVNode = (tag, text) => {
|
|
115
123
|
const vnode = {
|
|
116
124
|
$flags$: 0,
|
|
@@ -122,6 +130,12 @@ const newVNode = (tag, text) => {
|
|
|
122
130
|
return vnode;
|
|
123
131
|
};
|
|
124
132
|
const Host = {};
|
|
133
|
+
/**
|
|
134
|
+
* Check whether a given node is a Host node or not
|
|
135
|
+
*
|
|
136
|
+
* @param node the virtual DOM node to check
|
|
137
|
+
* @returns whether it's a Host node or not
|
|
138
|
+
*/
|
|
125
139
|
const isHost = (node) => node && node.$tag$ === Host;
|
|
126
140
|
/**
|
|
127
141
|
* Parse a new property value for a given property type.
|
|
@@ -300,6 +314,21 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
300
314
|
}
|
|
301
315
|
return elm;
|
|
302
316
|
};
|
|
317
|
+
/**
|
|
318
|
+
* Create DOM nodes corresponding to a list of {@link d.Vnode} objects and
|
|
319
|
+
* add them to the DOM in the appropriate place.
|
|
320
|
+
*
|
|
321
|
+
* @param parentElm the DOM node which should be used as a parent for the new
|
|
322
|
+
* DOM nodes
|
|
323
|
+
* @param before a child of the `parentElm` which the new children should be
|
|
324
|
+
* inserted before (optional)
|
|
325
|
+
* @param parentVNode the parent virtual DOM node
|
|
326
|
+
* @param vnodes the new child virtual DOM nodes to produce DOM nodes for
|
|
327
|
+
* @param startIdx the index in the child virtual DOM nodes at which to start
|
|
328
|
+
* creating DOM nodes (inclusive)
|
|
329
|
+
* @param endIdx the index in the child virtual DOM nodes at which to stop
|
|
330
|
+
* creating DOM nodes (inclusive)
|
|
331
|
+
*/
|
|
303
332
|
const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
|
|
304
333
|
let containerElm = (parentElm);
|
|
305
334
|
let childNode;
|
|
@@ -316,6 +345,19 @@ const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) =>
|
|
|
316
345
|
}
|
|
317
346
|
}
|
|
318
347
|
};
|
|
348
|
+
/**
|
|
349
|
+
* Remove the DOM elements corresponding to a list of {@link d.VNode} objects.
|
|
350
|
+
* This can be used to, for instance, clean up after a list of children which
|
|
351
|
+
* should no longer be shown.
|
|
352
|
+
*
|
|
353
|
+
* This function also handles some of Stencil's slot relocation logic.
|
|
354
|
+
*
|
|
355
|
+
* @param vnodes a list of virtual DOM nodes to remove
|
|
356
|
+
* @param startIdx the index at which to start removing nodes (inclusive)
|
|
357
|
+
* @param endIdx the index at which to stop removing nodes (inclusive)
|
|
358
|
+
* @param vnode a VNode
|
|
359
|
+
* @param elm an element
|
|
360
|
+
*/
|
|
319
361
|
const removeVnodes = (vnodes, startIdx, endIdx, vnode, elm) => {
|
|
320
362
|
for (; startIdx <= endIdx; ++startIdx) {
|
|
321
363
|
if ((vnode = vnodes[startIdx])) {
|
|
@@ -507,7 +549,8 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
507
549
|
*
|
|
508
550
|
* So, in other words, if `key` attrs are not set on VNodes which may be
|
|
509
551
|
* changing order within a `children` array or something along those lines then
|
|
510
|
-
* we could obtain a false
|
|
552
|
+
* we could obtain a false negative and then have to do needless re-rendering
|
|
553
|
+
* (i.e. we'd say two VNodes aren't equal when in fact they should be).
|
|
511
554
|
*
|
|
512
555
|
* @param leftVNode the first VNode to check
|
|
513
556
|
* @param rightVNode the second VNode to check
|
|
@@ -549,6 +592,18 @@ const patch = (oldVNode, newVNode) => {
|
|
|
549
592
|
}
|
|
550
593
|
}
|
|
551
594
|
};
|
|
595
|
+
/**
|
|
596
|
+
* The main entry point for Stencil's virtual DOM-based rendering engine
|
|
597
|
+
*
|
|
598
|
+
* Given a {@link d.HostRef} container and some virtual DOM nodes, this
|
|
599
|
+
* function will handle creating a virtual DOM tree with a single root, patching
|
|
600
|
+
* the current virtual DOM tree onto an old one (if any), dealing with slot
|
|
601
|
+
* relocation, and reflecting attributes.
|
|
602
|
+
*
|
|
603
|
+
* @param hostRef data needed to root and render the virtual DOM tree, such as
|
|
604
|
+
* the DOM node into which it should be rendered.
|
|
605
|
+
* @param renderFnResults the virtual DOM nodes to be rendered
|
|
606
|
+
*/
|
|
552
607
|
const renderVdom = (hostRef, renderFnResults) => {
|
|
553
608
|
const hostElm = hostRef.$hostElement$;
|
|
554
609
|
const oldVNode = hostRef.$vnode$ || newVNode(null, null);
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-d958b818.js');
|
|
6
6
|
|
|
7
7
|
/*
|
|
8
|
-
Stencil Client Patch Esm v2.22.
|
|
8
|
+
Stencil Client Patch Esm v2.22.2 | MIT Licensed | https://stenciljs.com
|
|
9
9
|
*/
|
|
10
10
|
const patchEsm = () => {
|
|
11
11
|
return index.promiseResolve();
|
|
@@ -14,7 +14,7 @@ const patchEsm = () => {
|
|
|
14
14
|
const defineCustomElements = (win, options) => {
|
|
15
15
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
16
16
|
return patchEsm().then(() => {
|
|
17
|
-
return index.bootstrapLazy([["mds-accordion-timer.cjs",[[1,"mds-accordion-timer",{"duration":[2],"time":[32]},[[0,"
|
|
17
|
+
return index.bootstrapLazy([["mds-accordion-timer.cjs",[[1,"mds-accordion-timer",{"duration":[2],"time":[32]},[[0,"activeClicked","onClickActive"],[0,"activeMouseEnter","onMouseEnterActive"],[0,"activeMouseLeave","onMouseLeaveActive"]]]]]], options);
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-d958b818.js');
|
|
6
6
|
|
|
7
7
|
/*
|
|
8
|
-
Stencil Client Patch Browser v2.22.
|
|
8
|
+
Stencil Client Patch Browser v2.22.2 | MIT Licensed | https://stenciljs.com
|
|
9
9
|
*/
|
|
10
10
|
const patchBrowser = () => {
|
|
11
11
|
const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('mds-accordion-timer.cjs.js', document.baseURI).href));
|
|
@@ -17,7 +17,7 @@ const patchBrowser = () => {
|
|
|
17
17
|
};
|
|
18
18
|
|
|
19
19
|
patchBrowser().then(options => {
|
|
20
|
-
return index.bootstrapLazy([["mds-accordion-timer.cjs",[[1,"mds-accordion-timer",{"duration":[2],"time":[32]},[[0,"
|
|
20
|
+
return index.bootstrapLazy([["mds-accordion-timer.cjs",[[1,"mds-accordion-timer",{"duration":[2],"time":[32]},[[0,"activeClicked","onClickActive"],[0,"activeMouseEnter","onMouseEnterActive"],[0,"activeMouseLeave","onMouseLeaveActive"]]]]]], options);
|
|
21
21
|
});
|
|
22
22
|
|
|
23
23
|
exports.setNonce = index.setNonce;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export class KeyboardManager {
|
|
2
|
+
constructor() {
|
|
3
|
+
this.elements = [];
|
|
4
|
+
this.handleClickBehaviorDispatchEvent = (event) => {
|
|
5
|
+
if (event.code === 'Space' || event.code === 'Enter' || event.code === 'NumpadEnter') {
|
|
6
|
+
event.target.click();
|
|
7
|
+
}
|
|
8
|
+
};
|
|
9
|
+
this.handleEscapeBehaviorDispatchEvent = (event) => {
|
|
10
|
+
if (event.code === 'Escape' && this.escapeCallback) {
|
|
11
|
+
this.escapeCallback();
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
this.addElement = (el, name = 'element') => {
|
|
15
|
+
this.elements[name] = el;
|
|
16
|
+
};
|
|
17
|
+
this.attachClickBehavior = (name = 'element') => {
|
|
18
|
+
if (this.elements[name]) {
|
|
19
|
+
this.elements[name].addEventListener('keydown', this.handleClickBehaviorDispatchEvent);
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
this.detachClickBehavior = (name = 'element') => {
|
|
23
|
+
if (this.elements[name]) {
|
|
24
|
+
this.elements[name].removeEventListener('keydown', this.handleClickBehaviorDispatchEvent);
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
this.attachEscapeBehavior = (callBack) => {
|
|
28
|
+
this.escapeCallback = callBack;
|
|
29
|
+
if (typeof window !== undefined) {
|
|
30
|
+
window.addEventListener('keydown', this.handleEscapeBehaviorDispatchEvent.bind(this));
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
this.detachEscapeBehavior = () => {
|
|
34
|
+
this.escapeCallback = null;
|
|
35
|
+
if (typeof window !== undefined) {
|
|
36
|
+
window.removeEventListener('keydown', this.handleEscapeBehaviorDispatchEvent.bind(this));
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -170,19 +170,19 @@ export class MdsAccordionTimer {
|
|
|
170
170
|
static get elementRef() { return "element"; }
|
|
171
171
|
static get listeners() {
|
|
172
172
|
return [{
|
|
173
|
-
"name": "
|
|
173
|
+
"name": "activeClicked",
|
|
174
174
|
"method": "onClickActive",
|
|
175
175
|
"target": undefined,
|
|
176
176
|
"capture": false,
|
|
177
177
|
"passive": false
|
|
178
178
|
}, {
|
|
179
|
-
"name": "
|
|
179
|
+
"name": "activeMouseEnter",
|
|
180
180
|
"method": "onMouseEnterActive",
|
|
181
181
|
"target": undefined,
|
|
182
182
|
"capture": false,
|
|
183
183
|
"passive": false
|
|
184
184
|
}, {
|
|
185
|
-
"name": "
|
|
185
|
+
"name": "activeMouseLeave",
|
|
186
186
|
"method": "onMouseLeaveActive",
|
|
187
187
|
"target": undefined,
|
|
188
188
|
"capture": false,
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
import jsonIconsDictionary from '../fixtures/icons.json';
|
|
2
|
+
import jsonMggIconsDictionary from '../fixtures/iconsauce.json';
|
|
2
3
|
const iconsDictionary = jsonIconsDictionary;
|
|
3
|
-
|
|
4
|
+
const mggIconsDictionary = jsonMggIconsDictionary;
|
|
5
|
+
export { iconsDictionary, mggIconsDictionary, };
|
|
@@ -21,6 +21,10 @@ const typographyVariationsDictionary = [
|
|
|
21
21
|
'read',
|
|
22
22
|
'code',
|
|
23
23
|
];
|
|
24
|
+
const typographyReadingVariationsDictionary = [
|
|
25
|
+
'info',
|
|
26
|
+
'read',
|
|
27
|
+
];
|
|
24
28
|
const typographyMonoDictionary = [
|
|
25
29
|
'snippet',
|
|
26
30
|
'hack',
|
|
@@ -56,4 +60,4 @@ const typographyTooltipDictionary = [
|
|
|
56
60
|
'detail',
|
|
57
61
|
'tip',
|
|
58
62
|
];
|
|
59
|
-
export { typographyDictionary,
|
|
63
|
+
export { typographyDictionary, typographyInfoDictionary, typographyReadingVariationsDictionary, typographyMonoDictionary, typographyReadDictionary, typographySmallerDictionary, typographyTitleDictionary, typographyTooltipDictionary, typographyVariationsDictionary, };
|
|
@@ -122,7 +122,7 @@ const MdsAccordionTimer$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLE
|
|
|
122
122
|
}, [1, "mds-accordion-timer", {
|
|
123
123
|
"duration": [2],
|
|
124
124
|
"time": [32]
|
|
125
|
-
}, [[0, "
|
|
125
|
+
}, [[0, "activeClicked", "onClickActive"], [0, "activeMouseEnter", "onMouseEnterActive"], [0, "activeMouseLeave", "onMouseLeaveActive"]]]);
|
|
126
126
|
function defineCustomElement$1() {
|
|
127
127
|
if (typeof customElements === "undefined") {
|
|
128
128
|
return;
|
|
@@ -89,6 +89,14 @@ const h = (nodeName, vnodeData, ...children) => {
|
|
|
89
89
|
}
|
|
90
90
|
return vnode;
|
|
91
91
|
};
|
|
92
|
+
/**
|
|
93
|
+
* A utility function for creating a virtual DOM node from a tag and some
|
|
94
|
+
* possible text content.
|
|
95
|
+
*
|
|
96
|
+
* @param tag the tag for this element
|
|
97
|
+
* @param text possible text content for the node
|
|
98
|
+
* @returns a newly-minted virtual DOM node
|
|
99
|
+
*/
|
|
92
100
|
const newVNode = (tag, text) => {
|
|
93
101
|
const vnode = {
|
|
94
102
|
$flags$: 0,
|
|
@@ -100,6 +108,12 @@ const newVNode = (tag, text) => {
|
|
|
100
108
|
return vnode;
|
|
101
109
|
};
|
|
102
110
|
const Host = {};
|
|
111
|
+
/**
|
|
112
|
+
* Check whether a given node is a Host node or not
|
|
113
|
+
*
|
|
114
|
+
* @param node the virtual DOM node to check
|
|
115
|
+
* @returns whether it's a Host node or not
|
|
116
|
+
*/
|
|
103
117
|
const isHost = (node) => node && node.$tag$ === Host;
|
|
104
118
|
/**
|
|
105
119
|
* Parse a new property value for a given property type.
|
|
@@ -278,6 +292,21 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
278
292
|
}
|
|
279
293
|
return elm;
|
|
280
294
|
};
|
|
295
|
+
/**
|
|
296
|
+
* Create DOM nodes corresponding to a list of {@link d.Vnode} objects and
|
|
297
|
+
* add them to the DOM in the appropriate place.
|
|
298
|
+
*
|
|
299
|
+
* @param parentElm the DOM node which should be used as a parent for the new
|
|
300
|
+
* DOM nodes
|
|
301
|
+
* @param before a child of the `parentElm` which the new children should be
|
|
302
|
+
* inserted before (optional)
|
|
303
|
+
* @param parentVNode the parent virtual DOM node
|
|
304
|
+
* @param vnodes the new child virtual DOM nodes to produce DOM nodes for
|
|
305
|
+
* @param startIdx the index in the child virtual DOM nodes at which to start
|
|
306
|
+
* creating DOM nodes (inclusive)
|
|
307
|
+
* @param endIdx the index in the child virtual DOM nodes at which to stop
|
|
308
|
+
* creating DOM nodes (inclusive)
|
|
309
|
+
*/
|
|
281
310
|
const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
|
|
282
311
|
let containerElm = (parentElm);
|
|
283
312
|
let childNode;
|
|
@@ -294,6 +323,19 @@ const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) =>
|
|
|
294
323
|
}
|
|
295
324
|
}
|
|
296
325
|
};
|
|
326
|
+
/**
|
|
327
|
+
* Remove the DOM elements corresponding to a list of {@link d.VNode} objects.
|
|
328
|
+
* This can be used to, for instance, clean up after a list of children which
|
|
329
|
+
* should no longer be shown.
|
|
330
|
+
*
|
|
331
|
+
* This function also handles some of Stencil's slot relocation logic.
|
|
332
|
+
*
|
|
333
|
+
* @param vnodes a list of virtual DOM nodes to remove
|
|
334
|
+
* @param startIdx the index at which to start removing nodes (inclusive)
|
|
335
|
+
* @param endIdx the index at which to stop removing nodes (inclusive)
|
|
336
|
+
* @param vnode a VNode
|
|
337
|
+
* @param elm an element
|
|
338
|
+
*/
|
|
297
339
|
const removeVnodes = (vnodes, startIdx, endIdx, vnode, elm) => {
|
|
298
340
|
for (; startIdx <= endIdx; ++startIdx) {
|
|
299
341
|
if ((vnode = vnodes[startIdx])) {
|
|
@@ -485,7 +527,8 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
485
527
|
*
|
|
486
528
|
* So, in other words, if `key` attrs are not set on VNodes which may be
|
|
487
529
|
* changing order within a `children` array or something along those lines then
|
|
488
|
-
* we could obtain a false
|
|
530
|
+
* we could obtain a false negative and then have to do needless re-rendering
|
|
531
|
+
* (i.e. we'd say two VNodes aren't equal when in fact they should be).
|
|
489
532
|
*
|
|
490
533
|
* @param leftVNode the first VNode to check
|
|
491
534
|
* @param rightVNode the second VNode to check
|
|
@@ -527,6 +570,18 @@ const patch = (oldVNode, newVNode) => {
|
|
|
527
570
|
}
|
|
528
571
|
}
|
|
529
572
|
};
|
|
573
|
+
/**
|
|
574
|
+
* The main entry point for Stencil's virtual DOM-based rendering engine
|
|
575
|
+
*
|
|
576
|
+
* Given a {@link d.HostRef} container and some virtual DOM nodes, this
|
|
577
|
+
* function will handle creating a virtual DOM tree with a single root, patching
|
|
578
|
+
* the current virtual DOM tree onto an old one (if any), dealing with slot
|
|
579
|
+
* relocation, and reflecting attributes.
|
|
580
|
+
*
|
|
581
|
+
* @param hostRef data needed to root and render the virtual DOM tree, such as
|
|
582
|
+
* the DOM node into which it should be rendered.
|
|
583
|
+
* @param renderFnResults the virtual DOM nodes to be rendered
|
|
584
|
+
*/
|
|
530
585
|
const renderVdom = (hostRef, renderFnResults) => {
|
|
531
586
|
const hostElm = hostRef.$hostElement$;
|
|
532
587
|
const oldVNode = hostRef.$vnode$ || newVNode(null, null);
|
package/dist/esm/loader.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
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-22b73a3a.js';
|
|
2
|
+
export { s as setNonce } from './index-22b73a3a.js';
|
|
3
3
|
|
|
4
4
|
/*
|
|
5
|
-
Stencil Client Patch Esm v2.22.
|
|
5
|
+
Stencil Client Patch Esm v2.22.2 | MIT Licensed | https://stenciljs.com
|
|
6
6
|
*/
|
|
7
7
|
const patchEsm = () => {
|
|
8
8
|
return promiseResolve();
|
|
@@ -11,7 +11,7 @@ const patchEsm = () => {
|
|
|
11
11
|
const defineCustomElements = (win, options) => {
|
|
12
12
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
13
13
|
return patchEsm().then(() => {
|
|
14
|
-
return bootstrapLazy([["mds-accordion-timer",[[1,"mds-accordion-timer",{"duration":[2],"time":[32]},[[0,"
|
|
14
|
+
return bootstrapLazy([["mds-accordion-timer",[[1,"mds-accordion-timer",{"duration":[2],"time":[32]},[[0,"activeClicked","onClickActive"],[0,"activeMouseEnter","onMouseEnterActive"],[0,"activeMouseLeave","onMouseLeaveActive"]]]]]], options);
|
|
15
15
|
});
|
|
16
16
|
};
|
|
17
17
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-22b73a3a.js';
|
|
2
2
|
|
|
3
3
|
const mdsAccordionTimerCss = ":host{display:block}";
|
|
4
4
|
|
|
@@ -1,8 +1,8 @@
|
|
|
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-22b73a3a.js';
|
|
2
|
+
export { s as setNonce } from './index-22b73a3a.js';
|
|
3
3
|
|
|
4
4
|
/*
|
|
5
|
-
Stencil Client Patch Browser v2.22.
|
|
5
|
+
Stencil Client Patch Browser v2.22.2 | MIT Licensed | https://stenciljs.com
|
|
6
6
|
*/
|
|
7
7
|
const patchBrowser = () => {
|
|
8
8
|
const importMeta = import.meta.url;
|
|
@@ -14,5 +14,5 @@ const patchBrowser = () => {
|
|
|
14
14
|
};
|
|
15
15
|
|
|
16
16
|
patchBrowser().then(options => {
|
|
17
|
-
return bootstrapLazy([["mds-accordion-timer",[[1,"mds-accordion-timer",{"duration":[2],"time":[32]},[[0,"
|
|
17
|
+
return bootstrapLazy([["mds-accordion-timer",[[1,"mds-accordion-timer",{"duration":[2],"time":[32]},[[0,"activeClicked","onClickActive"],[0,"activeMouseEnter","onMouseEnterActive"],[0,"activeMouseLeave","onMouseLeaveActive"]]]]]], options);
|
|
18
18
|
});
|
package/dist/esm-es5/loader.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as promiseResolve,b as bootstrapLazy}from"./index-
|
|
1
|
+
import{p as promiseResolve,b as bootstrapLazy}from"./index-22b73a3a.js";export{s as setNonce}from"./index-22b73a3a.js";var patchEsm=function(){return promiseResolve()};var defineCustomElements=function(e,o){if(typeof window==="undefined")return Promise.resolve();return patchEsm().then((function(){return bootstrapLazy([["mds-accordion-timer",[[1,"mds-accordion-timer",{duration:[2],time:[32]},[[0,"activeClicked","onClickActive"],[0,"activeMouseEnter","onMouseEnterActive"],[0,"activeMouseLeave","onMouseLeaveActive"]]]]]],o)}))};export{defineCustomElements};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-
|
|
1
|
+
import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-22b73a3a.js";var mdsAccordionTimerCss=":host{display:block}";var MdsAccordionTimer=function(){function e(e){var t=this;registerInstance(this,e);this.itemActivated=createEvent(this,"itemActivated",7);this.clearIntervals=function(){window.clearInterval(t.timer);window.clearInterval(t.timeChecker);t.timer=null;t.timeChecker=null};this.progress=function(){return Math.abs(t.remainingTime()/t.duration-1)};this.addTimeListener=function(){t.timeChecker=window.setInterval((function(){var e=t.progress();if(t.activeItem!==undefined){t.activeItem.progress=e}if(e===1){t.activeItem.progress=0;t.startNext()}}),100)};this.beginningTime=function(){t.timeStarted=(new Date).getTime();return t.timeStarted};this.remainingTime=function(){var e=t.activeItemDurationTime-((new Date).getTime()-t.timeStarted);return e>=0?e:0};this.setActiveItem=function(e){t.children.forEach((function(i,n){if(n===e){i.active=true;t.activeItem=i;t.itemActivated.emit(e)}else{i.active=false}}))};this.startNext=function(){var e=t.activeItem.uuid+1>t.children.length-1?0:t.activeItem.uuid+1;t.setActiveItem(e);t.startTimer()};this.startTimer=function(){t.clearIntervals();t.time=t.beginningTime();t.activeItemDurationTime=t.duration;t.addTimeListener()};this.playTimer=function(){t.beginningTime();t.addTimeListener()};this.pauseTimer=function(){t.clearIntervals();t.activeItemDurationTime=t.remainingTime()};this.stopTimer=function(){t.clearIntervals();t.time=null};this.time=0;this.duration=1e4}e.prototype.componentDidLoad=function(){var e=this;this.children=this.element.querySelectorAll("mds-accordion-timer-item");this.children.forEach((function(t,i){t.uuid=i;if(t.active){e.activeItem=t}}))};e.prototype.connectedCallback=function(){this.startTimer()};e.prototype.disconnectedCallback=function(){this.stopTimer();this.clearIntervals()};e.prototype.onClickActive=function(e){if(e.detail===this.activeItem.description){return}var t;this.children.forEach((function(i){i.progress=0;if(i.description===e.detail){t=i.uuid}}));this.setActiveItem(t);this.startTimer();this.pauseTimer()};e.prototype.onMouseEnterActive=function(){this.pauseTimer()};e.prototype.onMouseLeaveActive=function(){if(this.timeChecker===null){this.playTimer()}};e.prototype.render=function(){return h(Host,null,h("slot",null))};Object.defineProperty(e.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();MdsAccordionTimer.style=mdsAccordionTimerCss;export{MdsAccordionTimer as mds_accordion_timer};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as promiseResolve,b as bootstrapLazy}from"./index-
|
|
1
|
+
import{p as promiseResolve,b as bootstrapLazy}from"./index-22b73a3a.js";export{s as setNonce}from"./index-22b73a3a.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-accordion-timer",[[1,"mds-accordion-timer",{duration:[2],time:[32]},[[0,"activeClicked","onClickActive"],[0,"activeMouseEnter","onMouseEnterActive"],[0,"activeMouseLeave","onMouseLeaveActive"]]]]]],e)}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as o}from"./p-
|
|
1
|
+
import{p as e,b as o}from"./p-9084d19f.js";export{s as setNonce}from"./p-9084d19f.js";(()=>{const o=import.meta.url,t={};return""!==o&&(t.resourcesUrl=new URL(".",o).href),e(t)})().then((e=>o([["p-f44da2be",[[1,"mds-accordion-timer",{duration:[2],time:[32]},[[0,"activeClicked","onClickActive"],[0,"activeMouseEnter","onMouseEnterActive"],[0,"activeMouseLeave","onMouseLeaveActive"]]]]]],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-c6d75694.system.js', new URL(resourcesUrl, window.location.origin !== 'null' ? window.location.origin : undefined));
|
|
119
119
|
System.import(url.href);
|
|
120
120
|
};
|
|
121
121
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./p-
|
|
1
|
+
System.register(["./p-3face4e0.system.js"],(function(t){"use strict";var e,i,n,r,c;return{setters:[function(t){e=t.r;i=t.c;n=t.h;r=t.H;c=t.g}],execute:function(){var a=":host{display:block}";var s=t("mds_accordion_timer",function(){function t(t){var n=this;e(this,t);this.itemActivated=i(this,"itemActivated",7);this.clearIntervals=function(){window.clearInterval(n.timer);window.clearInterval(n.timeChecker);n.timer=null;n.timeChecker=null};this.progress=function(){return Math.abs(n.remainingTime()/n.duration-1)};this.addTimeListener=function(){n.timeChecker=window.setInterval((function(){var t=n.progress();if(n.activeItem!==undefined){n.activeItem.progress=t}if(t===1){n.activeItem.progress=0;n.startNext()}}),100)};this.beginningTime=function(){n.timeStarted=(new Date).getTime();return n.timeStarted};this.remainingTime=function(){var t=n.activeItemDurationTime-((new Date).getTime()-n.timeStarted);return t>=0?t:0};this.setActiveItem=function(t){n.children.forEach((function(e,i){if(i===t){e.active=true;n.activeItem=e;n.itemActivated.emit(t)}else{e.active=false}}))};this.startNext=function(){var t=n.activeItem.uuid+1>n.children.length-1?0:n.activeItem.uuid+1;n.setActiveItem(t);n.startTimer()};this.startTimer=function(){n.clearIntervals();n.time=n.beginningTime();n.activeItemDurationTime=n.duration;n.addTimeListener()};this.playTimer=function(){n.beginningTime();n.addTimeListener()};this.pauseTimer=function(){n.clearIntervals();n.activeItemDurationTime=n.remainingTime()};this.stopTimer=function(){n.clearIntervals();n.time=null};this.time=0;this.duration=1e4}t.prototype.componentDidLoad=function(){var t=this;this.children=this.element.querySelectorAll("mds-accordion-timer-item");this.children.forEach((function(e,i){e.uuid=i;if(e.active){t.activeItem=e}}))};t.prototype.connectedCallback=function(){this.startTimer()};t.prototype.disconnectedCallback=function(){this.stopTimer();this.clearIntervals()};t.prototype.onClickActive=function(t){if(t.detail===this.activeItem.description){return}var e;this.children.forEach((function(i){i.progress=0;if(i.description===t.detail){e=i.uuid}}));this.setActiveItem(e);this.startTimer();this.pauseTimer()};t.prototype.onMouseEnterActive=function(){this.pauseTimer()};t.prototype.onMouseLeaveActive=function(){if(this.timeChecker===null){this.playTimer()}};t.prototype.render=function(){return n(r,null,n("slot",null))};Object.defineProperty(t.prototype,"element",{get:function(){return c(this)},enumerable:false,configurable:true});return t}());s.style=a}}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["./p-3face4e0.system.js"],(function(e,t){"use strict";var r,n;return{setters:[function(t){r=t.p;n=t.b;e("setNonce",t.s)}],execute:function(){var e=function(){var e=t.meta.url;var n={};if(e!==""){n.resourcesUrl=new URL(".",e).href}return r(n)};e().then((function(e){return n([["p-118bf4e5.system",[[1,"mds-accordion-timer",{duration:[2],time:[32]},[[0,"activeClicked","onClickActive"],[0,"activeMouseEnter","onMouseEnterActive"],[0,"activeMouseLeave","onMouseLeaveActive"]]]]]],e)}))}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as i,h as s,H as h,g as e}from"./p-
|
|
1
|
+
import{r as t,c as i,h as s,H as h,g as e}from"./p-9084d19f.js";const n=class{constructor(s){t(this,s),this.itemActivated=i(this,"itemActivated",7),this.clearIntervals=()=>{window.clearInterval(this.timer),window.clearInterval(this.timeChecker),this.timer=null,this.timeChecker=null},this.progress=()=>Math.abs(this.remainingTime()/this.duration-1),this.addTimeListener=()=>{this.timeChecker=window.setInterval((()=>{const t=this.progress();void 0!==this.activeItem&&(this.activeItem.progress=t),1===t&&(this.activeItem.progress=0,this.startNext())}),100)},this.beginningTime=()=>(this.timeStarted=(new Date).getTime(),this.timeStarted),this.remainingTime=()=>{const t=this.activeItemDurationTime-((new Date).getTime()-this.timeStarted);return t>=0?t:0},this.setActiveItem=t=>{this.children.forEach(((i,s)=>{s===t?(i.active=!0,this.activeItem=i,this.itemActivated.emit(t)):i.active=!1}))},this.startNext=()=>{this.setActiveItem(this.activeItem.uuid+1>this.children.length-1?0:this.activeItem.uuid+1),this.startTimer()},this.startTimer=()=>{this.clearIntervals(),this.time=this.beginningTime(),this.activeItemDurationTime=this.duration,this.addTimeListener()},this.playTimer=()=>{this.beginningTime(),this.addTimeListener()},this.pauseTimer=()=>{this.clearIntervals(),this.activeItemDurationTime=this.remainingTime()},this.stopTimer=()=>{this.clearIntervals(),this.time=null},this.time=0,this.duration=1e4}componentDidLoad(){this.children=this.element.querySelectorAll("mds-accordion-timer-item"),this.children.forEach(((t,i)=>{t.uuid=i,t.active&&(this.activeItem=t)}))}connectedCallback(){this.startTimer()}disconnectedCallback(){this.stopTimer(),this.clearIntervals()}onClickActive(t){if(t.detail===this.activeItem.description)return;let i;this.children.forEach((s=>{s.progress=0,s.description===t.detail&&(i=s.uuid)})),this.setActiveItem(i),this.startTimer(),this.pauseTimer()}onMouseEnterActive(){this.pauseTimer()}onMouseLeaveActive(){null===this.timeChecker&&this.playTimer()}render(){return s(h,null,s("slot",null))}get element(){return e(this)}};n.style=":host{display:block}";export{n as mds_accordion_timer}
|