@maggioli-design-system/mds-tab 2.0.2 → 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-928add6f.js → index-1e286edd.js} +0 -91
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/mds-tab.cjs.entry.js +9 -5
- package/dist/cjs/mds-tab.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/mds-tab/mds-tab.css +11 -22
- package/dist/collection/components/mds-tab/mds-tab.js +7 -3
- package/dist/collection/components/mds-tab/test/mds-tab.stories.js +1 -1
- package/dist/components/mds-tab.js +8 -4
- package/dist/esm/{index-18b5f438.js → index-5928fc07.js} +0 -91
- package/dist/esm/loader.js +2 -2
- package/dist/esm/mds-tab.entry.js +9 -5
- package/dist/esm/mds-tab.js +2 -2
- package/dist/esm-es5/index-5928fc07.js +2 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/mds-tab.entry.js +1 -1
- package/dist/esm-es5/mds-tab.js +1 -1
- package/dist/mds-tab/mds-tab.esm.js +1 -1
- package/dist/mds-tab/mds-tab.js +1 -1
- package/dist/mds-tab/p-034fd2fd.js +2 -0
- package/dist/mds-tab/p-2b9bdf41.system.entry.js +1 -0
- package/dist/mds-tab/p-590a105d.system.js +2 -0
- package/dist/mds-tab/{p-7a6f973a.system.js → p-c1b0e916.system.js} +1 -1
- package/dist/mds-tab/p-d2967340.entry.js +1 -0
- package/dist/stats.json +32 -34
- package/package.json +5 -5
- package/src/components/mds-tab/mds-tab.css +6 -22
- package/src/components/mds-tab/mds-tab.tsx +7 -3
- package/src/components/mds-tab/test/mds-tab.stories.tsx +2 -1
- package/src/fixtures/icons.json +3 -0
- package/www/build/mds-tab.esm.js +1 -1
- package/www/build/mds-tab.js +1 -1
- package/www/build/p-034fd2fd.js +2 -0
- package/www/build/p-2b9bdf41.system.entry.js +1 -0
- package/www/build/p-590a105d.system.js +2 -0
- package/www/build/{p-7a6f973a.system.js → p-c1b0e916.system.js} +1 -1
- package/www/build/p-d2967340.entry.js +1 -0
- package/dist/esm-es5/index-18b5f438.js +0 -2
- package/dist/mds-tab/p-11ef3340.js +0 -2
- package/dist/mds-tab/p-2555fd7b.system.js +0 -2
- package/dist/mds-tab/p-35f2d92f.entry.js +0 -1
- package/dist/mds-tab/p-3625579e.system.entry.js +0 -1
- package/www/build/p-11ef3340.js +0 -2
- package/www/build/p-2555fd7b.system.js +0 -2
- package/www/build/p-35f2d92f.entry.js +0 -1
- package/www/build/p-3625579e.system.entry.js +0 -1
|
@@ -32,7 +32,6 @@ const NAMESPACE = 'mds-tab';
|
|
|
32
32
|
*/
|
|
33
33
|
let scopeId;
|
|
34
34
|
let hostTagName;
|
|
35
|
-
let isSvgMode = false;
|
|
36
35
|
let queuePending = false;
|
|
37
36
|
const createTime = (fnName, tagName = '') => {
|
|
38
37
|
{
|
|
@@ -49,14 +48,6 @@ const uniqueTime = (key, measureText) => {
|
|
|
49
48
|
}
|
|
50
49
|
};
|
|
51
50
|
const HYDRATED_CSS = '{visibility:hidden}.hydrated{visibility:inherit}';
|
|
52
|
-
/**
|
|
53
|
-
* Default style mode id
|
|
54
|
-
*/
|
|
55
|
-
/**
|
|
56
|
-
* Reusable empty obj/array
|
|
57
|
-
* Don't add values to these!!
|
|
58
|
-
*/
|
|
59
|
-
const EMPTY_OBJ = {};
|
|
60
51
|
const isDef = (v) => v != null;
|
|
61
52
|
const isComplexType = (o) => {
|
|
62
53
|
// https://jsperf.com/typeof-fn-object/5
|
|
@@ -117,9 +108,6 @@ const newVNode = (tag, text) => {
|
|
|
117
108
|
$elm$: null,
|
|
118
109
|
$children$: null,
|
|
119
110
|
};
|
|
120
|
-
{
|
|
121
|
-
vnode.$attrs$ = null;
|
|
122
|
-
}
|
|
123
111
|
return vnode;
|
|
124
112
|
};
|
|
125
113
|
const Host = {};
|
|
@@ -207,69 +195,6 @@ const attachStyles = (hostRef) => {
|
|
|
207
195
|
endAttachStyles();
|
|
208
196
|
};
|
|
209
197
|
const getScopeId = (cmp, mode) => 'sc-' + (cmp.$tagName$);
|
|
210
|
-
/**
|
|
211
|
-
* Production setAccessor() function based on Preact by
|
|
212
|
-
* Jason Miller (@developit)
|
|
213
|
-
* Licensed under the MIT License
|
|
214
|
-
* https://github.com/developit/preact/blob/master/LICENSE
|
|
215
|
-
*
|
|
216
|
-
* Modified for Stencil's compiler and vdom
|
|
217
|
-
*/
|
|
218
|
-
const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
219
|
-
if (oldValue !== newValue) {
|
|
220
|
-
let isProp = isMemberInElement(elm, memberName);
|
|
221
|
-
memberName.toLowerCase();
|
|
222
|
-
{
|
|
223
|
-
// Set property if it exists and it's not a SVG
|
|
224
|
-
const isComplex = isComplexType(newValue);
|
|
225
|
-
if ((isProp || (isComplex && newValue !== null)) && !isSvg) {
|
|
226
|
-
try {
|
|
227
|
-
if (!elm.tagName.includes('-')) {
|
|
228
|
-
const n = newValue == null ? '' : newValue;
|
|
229
|
-
// Workaround for Safari, moving the <input> caret when re-assigning the same valued
|
|
230
|
-
if (memberName === 'list') {
|
|
231
|
-
isProp = false;
|
|
232
|
-
}
|
|
233
|
-
else if (oldValue == null || elm[memberName] != n) {
|
|
234
|
-
elm[memberName] = n;
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
else {
|
|
238
|
-
elm[memberName] = newValue;
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
catch (e) { }
|
|
242
|
-
}
|
|
243
|
-
if (newValue == null || newValue === false) {
|
|
244
|
-
if (newValue !== false || elm.getAttribute(memberName) === '') {
|
|
245
|
-
{
|
|
246
|
-
elm.removeAttribute(memberName);
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
}
|
|
250
|
-
else if ((!isProp || flags & 4 /* VNODE_FLAGS.isHost */ || isSvg) && !isComplex) {
|
|
251
|
-
newValue = newValue === true ? '' : newValue;
|
|
252
|
-
{
|
|
253
|
-
elm.setAttribute(memberName, newValue);
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
};
|
|
259
|
-
const updateElement = (oldVnode, newVnode, isSvgMode, memberName) => {
|
|
260
|
-
// if the element passed in is a shadow root, which is a document fragment
|
|
261
|
-
// then we want to be adding attrs/props to the shadow root's "host" element
|
|
262
|
-
// if it's not a shadow root, then we add attrs/props to the same element
|
|
263
|
-
const elm = newVnode.$elm$.nodeType === 11 /* NODE_TYPE.DocumentFragment */ && newVnode.$elm$.host
|
|
264
|
-
? newVnode.$elm$.host
|
|
265
|
-
: newVnode.$elm$;
|
|
266
|
-
const oldVnodeAttrs = (oldVnode && oldVnode.$attrs$) || EMPTY_OBJ;
|
|
267
|
-
const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
|
|
268
|
-
// add new & update changed attributes
|
|
269
|
-
for (memberName in newVnodeAttrs) {
|
|
270
|
-
setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode, newVnode.$flags$);
|
|
271
|
-
}
|
|
272
|
-
};
|
|
273
198
|
/**
|
|
274
199
|
* Create a DOM Node corresponding to one of the children of a given VNode.
|
|
275
200
|
*
|
|
@@ -289,10 +214,6 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
289
214
|
{
|
|
290
215
|
// create element
|
|
291
216
|
elm = newVNode.$elm$ = (doc.createElement(newVNode.$tag$));
|
|
292
|
-
// add css classes, attrs, props, listeners, etc.
|
|
293
|
-
{
|
|
294
|
-
updateElement(null, newVNode, isSvgMode);
|
|
295
|
-
}
|
|
296
217
|
if (isDef(scopeId) && elm['s-si'] !== scopeId) {
|
|
297
218
|
// if there is a scopeId and this is the initial render
|
|
298
219
|
// then let's add the scopeId as a css class
|
|
@@ -339,18 +260,7 @@ const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) =>
|
|
|
339
260
|
const patch = (oldVNode, newVNode) => {
|
|
340
261
|
const elm = (newVNode.$elm$ = oldVNode.$elm$);
|
|
341
262
|
const newChildren = newVNode.$children$;
|
|
342
|
-
const tag = newVNode.$tag$;
|
|
343
263
|
{
|
|
344
|
-
{
|
|
345
|
-
if (tag === 'slot')
|
|
346
|
-
;
|
|
347
|
-
else {
|
|
348
|
-
// either this is the first render of an element OR it's an update
|
|
349
|
-
// AND we already know it's possible it could have changed
|
|
350
|
-
// this updates the element's css classes, attrs, props, listeners, etc.
|
|
351
|
-
updateElement(oldVNode, newVNode, isSvgMode);
|
|
352
|
-
}
|
|
353
|
-
}
|
|
354
264
|
if (newChildren !== null) {
|
|
355
265
|
// add the new vnode children
|
|
356
266
|
addVnodes(elm, null, newVNode, newChildren, 0, newChildren.length - 1);
|
|
@@ -802,7 +712,6 @@ const registerHost = (elm, cmpMeta) => {
|
|
|
802
712
|
addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
|
|
803
713
|
return hostRefs.set(elm, hostRef);
|
|
804
714
|
};
|
|
805
|
-
const isMemberInElement = (elm, memberName) => memberName in elm;
|
|
806
715
|
const consoleError = (e, el) => (0, console.error)(e, el);
|
|
807
716
|
const cmpModules = /*@__PURE__*/ new Map();
|
|
808
717
|
const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
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-1e286edd.js');
|
|
6
6
|
|
|
7
7
|
/*
|
|
8
|
-
Stencil Client Patch Esm v2.
|
|
8
|
+
Stencil Client Patch Esm v2.20.0 | MIT Licensed | https://stenciljs.com
|
|
9
9
|
*/
|
|
10
10
|
const patchEsm = () => {
|
|
11
11
|
return index.promiseResolve();
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-1e286edd.js');
|
|
6
6
|
|
|
7
|
-
const mdsTabCss = ".fixed{position:fixed}.absolute{position:absolute}.border{border-width:1px}.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{--
|
|
7
|
+
const mdsTabCss = ".visible{visibility:visible}.fixed{position:fixed}.absolute{position:absolute}.border{border-width:1px}.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-tab-background:rgb(var(--tone-neutral-09));--mds-tab-radius:1rem;display:-ms-flexbox;display:flex;gap:0.5rem;overflow:auto;padding:0.5rem;background-color:var(--mds-tab-background);border-radius:var(--mds-tab-radius);-webkit-overflow-scrolling:touch;-ms-overflow-style:none;scroll-behavior:smooth;-webkit-scroll-snap-type:x mandatory;-ms-scroll-snap-type:x mandatory;scroll-snap-type:x mandatory;scrollbar-width:none}:host::-webkit-scrollbar{display:none}@media (max-width: 767px){.mobile\\:flex-1{-ms-flex:1 1 0%;flex:1 1 0%}}";
|
|
8
8
|
|
|
9
9
|
const MdsTab = class {
|
|
10
10
|
constructor(hostRef) {
|
|
@@ -18,12 +18,16 @@ const MdsTab = class {
|
|
|
18
18
|
}
|
|
19
19
|
componentWillLoad() {
|
|
20
20
|
const items = this.queryItems();
|
|
21
|
-
items.forEach((item, key) =>
|
|
21
|
+
items.forEach((item, key) => {
|
|
22
|
+
if (!item.id) {
|
|
23
|
+
item.id = `mds-tab-item-${key}`;
|
|
24
|
+
}
|
|
25
|
+
});
|
|
22
26
|
}
|
|
23
27
|
changeEventHandler(event) {
|
|
24
28
|
const items = this.element.querySelectorAll('mds-tab-item');
|
|
25
29
|
items.forEach((item, key) => {
|
|
26
|
-
if (
|
|
30
|
+
if (item.id === event.detail) {
|
|
27
31
|
item.selected = true;
|
|
28
32
|
this.currentItem = key;
|
|
29
33
|
this.scrollTabs();
|
|
@@ -34,7 +38,7 @@ const MdsTab = class {
|
|
|
34
38
|
});
|
|
35
39
|
}
|
|
36
40
|
render() {
|
|
37
|
-
return (index.h(index.Host, null, index.h("slot",
|
|
41
|
+
return (index.h(index.Host, null, index.h("slot", null)));
|
|
38
42
|
}
|
|
39
43
|
get element() { return index.getElement(this); }
|
|
40
44
|
};
|
package/dist/cjs/mds-tab.cjs.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const index = require('./index-
|
|
3
|
+
const index = require('./index-1e286edd.js');
|
|
4
4
|
|
|
5
5
|
/*
|
|
6
|
-
Stencil Client Patch Browser v2.
|
|
6
|
+
Stencil Client Patch Browser v2.20.0 | MIT Licensed | https://stenciljs.com
|
|
7
7
|
*/
|
|
8
8
|
const patchBrowser = () => {
|
|
9
9
|
const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('mds-tab.cjs.js', document.baseURI).href));
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
.visible {
|
|
2
|
+
|
|
3
|
+
visibility: visible;
|
|
4
|
+
}
|
|
5
|
+
|
|
1
6
|
.fixed {
|
|
2
7
|
|
|
3
8
|
position: fixed;
|
|
@@ -23,37 +28,21 @@
|
|
|
23
28
|
}
|
|
24
29
|
|
|
25
30
|
/*
|
|
26
|
-
* @prop --background: Sets the background-color of the component
|
|
27
|
-
* @prop --
|
|
28
|
-
* @prop --button-background-selected: Sets the background-color of the button when it's selected
|
|
29
|
-
* @prop --button-background: Sets the background-color of the button
|
|
30
|
-
* @prop --button-color-hover: Sets the text color of the button when the mouse is over it
|
|
31
|
-
* @prop --button-color-selected: Sets the text color of the button when it's selected
|
|
32
|
-
* @prop --button-color: Sets the text color of the button
|
|
33
|
-
* @prop --button-radius: Sets the border-radius of the button
|
|
34
|
-
* @prop --button-shadow-selected: Sets the box-shadow of the button when it's selected
|
|
35
|
-
* @prop --radius: Sets the border-radius of the button when the mouse is over it
|
|
31
|
+
* @prop --mds-tab-background: Sets the background-color of the component
|
|
32
|
+
* @prop --mds-tab-radius: Sets the border-radius of the button when the mouse is over it
|
|
36
33
|
*/
|
|
37
34
|
|
|
38
35
|
:host {
|
|
39
36
|
|
|
40
|
-
--background: rgb(var(--tone-neutral-09));
|
|
41
|
-
--
|
|
42
|
-
--button-background-selected: rgb(var(--tone-neutral));
|
|
43
|
-
--button-background: transparent;
|
|
44
|
-
--button-color-hover: rgb(var(--tone-neutral-02));
|
|
45
|
-
--button-color-selected: rgb(var(--tone-neutral-02));
|
|
46
|
-
--button-color: rgb(var(--tone-neutral-04));
|
|
47
|
-
--button-radius: 0.5rem;
|
|
48
|
-
--button-shadow-selected: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
|
|
49
|
-
--radius: 1rem;
|
|
37
|
+
--mds-tab-background: rgb(var(--tone-neutral-09));
|
|
38
|
+
--mds-tab-radius: 1rem;
|
|
50
39
|
display: flex;
|
|
51
40
|
gap: 0.5rem;
|
|
52
41
|
overflow: auto;
|
|
53
42
|
padding: 0.5rem;
|
|
54
43
|
|
|
55
|
-
background-color: var(--background);
|
|
56
|
-
border-radius: var(--radius);
|
|
44
|
+
background-color: var(--mds-tab-background);
|
|
45
|
+
border-radius: var(--mds-tab-radius);
|
|
57
46
|
-webkit-overflow-scrolling: touch;
|
|
58
47
|
-ms-overflow-style: none;
|
|
59
48
|
scroll-behavior: smooth;
|
|
@@ -10,12 +10,16 @@ export class MdsTab {
|
|
|
10
10
|
}
|
|
11
11
|
componentWillLoad() {
|
|
12
12
|
const items = this.queryItems();
|
|
13
|
-
items.forEach((item, key) =>
|
|
13
|
+
items.forEach((item, key) => {
|
|
14
|
+
if (!item.id) {
|
|
15
|
+
item.id = `mds-tab-item-${key}`;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
14
18
|
}
|
|
15
19
|
changeEventHandler(event) {
|
|
16
20
|
const items = this.element.querySelectorAll('mds-tab-item');
|
|
17
21
|
items.forEach((item, key) => {
|
|
18
|
-
if (
|
|
22
|
+
if (item.id === event.detail) {
|
|
19
23
|
item.selected = true;
|
|
20
24
|
this.currentItem = key;
|
|
21
25
|
this.scrollTabs();
|
|
@@ -26,7 +30,7 @@ export class MdsTab {
|
|
|
26
30
|
});
|
|
27
31
|
}
|
|
28
32
|
render() {
|
|
29
|
-
return (h(Host, null, h("slot",
|
|
33
|
+
return (h(Host, null, h("slot", null)));
|
|
30
34
|
}
|
|
31
35
|
static get is() { return "mds-tab"; }
|
|
32
36
|
static get encapsulation() { return "shadow"; }
|
|
@@ -2,5 +2,5 @@ import { h } from '@stencil/core';
|
|
|
2
2
|
export default {
|
|
3
3
|
title: 'UI / Tab',
|
|
4
4
|
};
|
|
5
|
-
const Template = args => h("mds-tab", Object.assign({}, args), h("mds-tab-item", { selected: true, class: "mobile:flex-1" }, "First Blood"), h("mds-tab-item", { class: "mobile:flex-1" }, "Second Impact"), h("mds-tab-item", { class: "mobile:flex-1" }, "The Third Reich"));
|
|
5
|
+
const Template = args => h("mds-tab", Object.assign({}, args), h("mds-notification", { strategy: "absolute", target: "button", value: 14, visible: true }), h("mds-tab-item", { selected: true, class: "mobile:flex-1" }, "First Blood"), h("mds-tab-item", { icon: "mdi/alien", id: "button", class: "mobile:flex-1" }, "Second Impact"), h("mds-tab-item", { class: "mobile:flex-1" }, "The Third Reich"));
|
|
6
6
|
export const Default = Template.bind({});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
|
|
3
|
-
const mdsTabCss = ".fixed{position:fixed}.absolute{position:absolute}.border{border-width:1px}.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{--
|
|
3
|
+
const mdsTabCss = ".visible{visibility:visible}.fixed{position:fixed}.absolute{position:absolute}.border{border-width:1px}.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-tab-background:rgb(var(--tone-neutral-09));--mds-tab-radius:1rem;display:-ms-flexbox;display:flex;gap:0.5rem;overflow:auto;padding:0.5rem;background-color:var(--mds-tab-background);border-radius:var(--mds-tab-radius);-webkit-overflow-scrolling:touch;-ms-overflow-style:none;scroll-behavior:smooth;-webkit-scroll-snap-type:x mandatory;-ms-scroll-snap-type:x mandatory;scroll-snap-type:x mandatory;scrollbar-width:none}:host::-webkit-scrollbar{display:none}@media (max-width: 767px){.mobile\\:flex-1{-ms-flex:1 1 0%;flex:1 1 0%}}";
|
|
4
4
|
|
|
5
5
|
const MdsTab$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
6
6
|
constructor() {
|
|
@@ -16,12 +16,16 @@ const MdsTab$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
16
16
|
}
|
|
17
17
|
componentWillLoad() {
|
|
18
18
|
const items = this.queryItems();
|
|
19
|
-
items.forEach((item, key) =>
|
|
19
|
+
items.forEach((item, key) => {
|
|
20
|
+
if (!item.id) {
|
|
21
|
+
item.id = `mds-tab-item-${key}`;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
20
24
|
}
|
|
21
25
|
changeEventHandler(event) {
|
|
22
26
|
const items = this.element.querySelectorAll('mds-tab-item');
|
|
23
27
|
items.forEach((item, key) => {
|
|
24
|
-
if (
|
|
28
|
+
if (item.id === event.detail) {
|
|
25
29
|
item.selected = true;
|
|
26
30
|
this.currentItem = key;
|
|
27
31
|
this.scrollTabs();
|
|
@@ -32,7 +36,7 @@ const MdsTab$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
32
36
|
});
|
|
33
37
|
}
|
|
34
38
|
render() {
|
|
35
|
-
return (h(Host, null, h("slot",
|
|
39
|
+
return (h(Host, null, h("slot", null)));
|
|
36
40
|
}
|
|
37
41
|
get element() { return this; }
|
|
38
42
|
static get style() { return mdsTabCss; }
|
|
@@ -10,7 +10,6 @@ const NAMESPACE = 'mds-tab';
|
|
|
10
10
|
*/
|
|
11
11
|
let scopeId;
|
|
12
12
|
let hostTagName;
|
|
13
|
-
let isSvgMode = false;
|
|
14
13
|
let queuePending = false;
|
|
15
14
|
const createTime = (fnName, tagName = '') => {
|
|
16
15
|
{
|
|
@@ -27,14 +26,6 @@ const uniqueTime = (key, measureText) => {
|
|
|
27
26
|
}
|
|
28
27
|
};
|
|
29
28
|
const HYDRATED_CSS = '{visibility:hidden}.hydrated{visibility:inherit}';
|
|
30
|
-
/**
|
|
31
|
-
* Default style mode id
|
|
32
|
-
*/
|
|
33
|
-
/**
|
|
34
|
-
* Reusable empty obj/array
|
|
35
|
-
* Don't add values to these!!
|
|
36
|
-
*/
|
|
37
|
-
const EMPTY_OBJ = {};
|
|
38
29
|
const isDef = (v) => v != null;
|
|
39
30
|
const isComplexType = (o) => {
|
|
40
31
|
// https://jsperf.com/typeof-fn-object/5
|
|
@@ -95,9 +86,6 @@ const newVNode = (tag, text) => {
|
|
|
95
86
|
$elm$: null,
|
|
96
87
|
$children$: null,
|
|
97
88
|
};
|
|
98
|
-
{
|
|
99
|
-
vnode.$attrs$ = null;
|
|
100
|
-
}
|
|
101
89
|
return vnode;
|
|
102
90
|
};
|
|
103
91
|
const Host = {};
|
|
@@ -185,69 +173,6 @@ const attachStyles = (hostRef) => {
|
|
|
185
173
|
endAttachStyles();
|
|
186
174
|
};
|
|
187
175
|
const getScopeId = (cmp, mode) => 'sc-' + (cmp.$tagName$);
|
|
188
|
-
/**
|
|
189
|
-
* Production setAccessor() function based on Preact by
|
|
190
|
-
* Jason Miller (@developit)
|
|
191
|
-
* Licensed under the MIT License
|
|
192
|
-
* https://github.com/developit/preact/blob/master/LICENSE
|
|
193
|
-
*
|
|
194
|
-
* Modified for Stencil's compiler and vdom
|
|
195
|
-
*/
|
|
196
|
-
const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
197
|
-
if (oldValue !== newValue) {
|
|
198
|
-
let isProp = isMemberInElement(elm, memberName);
|
|
199
|
-
memberName.toLowerCase();
|
|
200
|
-
{
|
|
201
|
-
// Set property if it exists and it's not a SVG
|
|
202
|
-
const isComplex = isComplexType(newValue);
|
|
203
|
-
if ((isProp || (isComplex && newValue !== null)) && !isSvg) {
|
|
204
|
-
try {
|
|
205
|
-
if (!elm.tagName.includes('-')) {
|
|
206
|
-
const n = newValue == null ? '' : newValue;
|
|
207
|
-
// Workaround for Safari, moving the <input> caret when re-assigning the same valued
|
|
208
|
-
if (memberName === 'list') {
|
|
209
|
-
isProp = false;
|
|
210
|
-
}
|
|
211
|
-
else if (oldValue == null || elm[memberName] != n) {
|
|
212
|
-
elm[memberName] = n;
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
else {
|
|
216
|
-
elm[memberName] = newValue;
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
catch (e) { }
|
|
220
|
-
}
|
|
221
|
-
if (newValue == null || newValue === false) {
|
|
222
|
-
if (newValue !== false || elm.getAttribute(memberName) === '') {
|
|
223
|
-
{
|
|
224
|
-
elm.removeAttribute(memberName);
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
else if ((!isProp || flags & 4 /* VNODE_FLAGS.isHost */ || isSvg) && !isComplex) {
|
|
229
|
-
newValue = newValue === true ? '' : newValue;
|
|
230
|
-
{
|
|
231
|
-
elm.setAttribute(memberName, newValue);
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
};
|
|
237
|
-
const updateElement = (oldVnode, newVnode, isSvgMode, memberName) => {
|
|
238
|
-
// if the element passed in is a shadow root, which is a document fragment
|
|
239
|
-
// then we want to be adding attrs/props to the shadow root's "host" element
|
|
240
|
-
// if it's not a shadow root, then we add attrs/props to the same element
|
|
241
|
-
const elm = newVnode.$elm$.nodeType === 11 /* NODE_TYPE.DocumentFragment */ && newVnode.$elm$.host
|
|
242
|
-
? newVnode.$elm$.host
|
|
243
|
-
: newVnode.$elm$;
|
|
244
|
-
const oldVnodeAttrs = (oldVnode && oldVnode.$attrs$) || EMPTY_OBJ;
|
|
245
|
-
const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
|
|
246
|
-
// add new & update changed attributes
|
|
247
|
-
for (memberName in newVnodeAttrs) {
|
|
248
|
-
setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode, newVnode.$flags$);
|
|
249
|
-
}
|
|
250
|
-
};
|
|
251
176
|
/**
|
|
252
177
|
* Create a DOM Node corresponding to one of the children of a given VNode.
|
|
253
178
|
*
|
|
@@ -267,10 +192,6 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
267
192
|
{
|
|
268
193
|
// create element
|
|
269
194
|
elm = newVNode.$elm$ = (doc.createElement(newVNode.$tag$));
|
|
270
|
-
// add css classes, attrs, props, listeners, etc.
|
|
271
|
-
{
|
|
272
|
-
updateElement(null, newVNode, isSvgMode);
|
|
273
|
-
}
|
|
274
195
|
if (isDef(scopeId) && elm['s-si'] !== scopeId) {
|
|
275
196
|
// if there is a scopeId and this is the initial render
|
|
276
197
|
// then let's add the scopeId as a css class
|
|
@@ -317,18 +238,7 @@ const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) =>
|
|
|
317
238
|
const patch = (oldVNode, newVNode) => {
|
|
318
239
|
const elm = (newVNode.$elm$ = oldVNode.$elm$);
|
|
319
240
|
const newChildren = newVNode.$children$;
|
|
320
|
-
const tag = newVNode.$tag$;
|
|
321
241
|
{
|
|
322
|
-
{
|
|
323
|
-
if (tag === 'slot')
|
|
324
|
-
;
|
|
325
|
-
else {
|
|
326
|
-
// either this is the first render of an element OR it's an update
|
|
327
|
-
// AND we already know it's possible it could have changed
|
|
328
|
-
// this updates the element's css classes, attrs, props, listeners, etc.
|
|
329
|
-
updateElement(oldVNode, newVNode, isSvgMode);
|
|
330
|
-
}
|
|
331
|
-
}
|
|
332
242
|
if (newChildren !== null) {
|
|
333
243
|
// add the new vnode children
|
|
334
244
|
addVnodes(elm, null, newVNode, newChildren, 0, newChildren.length - 1);
|
|
@@ -780,7 +690,6 @@ const registerHost = (elm, cmpMeta) => {
|
|
|
780
690
|
addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
|
|
781
691
|
return hostRefs.set(elm, hostRef);
|
|
782
692
|
};
|
|
783
|
-
const isMemberInElement = (elm, memberName) => memberName in elm;
|
|
784
693
|
const consoleError = (e, el) => (0, console.error)(e, el);
|
|
785
694
|
const cmpModules = /*@__PURE__*/ new Map();
|
|
786
695
|
const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
package/dist/esm/loader.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-5928fc07.js';
|
|
2
2
|
|
|
3
3
|
/*
|
|
4
|
-
Stencil Client Patch Esm v2.
|
|
4
|
+
Stencil Client Patch Esm v2.20.0 | MIT Licensed | https://stenciljs.com
|
|
5
5
|
*/
|
|
6
6
|
const patchEsm = () => {
|
|
7
7
|
return promiseResolve();
|
|
@@ -1,6 +1,6 @@
|
|
|
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-5928fc07.js';
|
|
2
2
|
|
|
3
|
-
const mdsTabCss = ".fixed{position:fixed}.absolute{position:absolute}.border{border-width:1px}.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{--
|
|
3
|
+
const mdsTabCss = ".visible{visibility:visible}.fixed{position:fixed}.absolute{position:absolute}.border{border-width:1px}.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-tab-background:rgb(var(--tone-neutral-09));--mds-tab-radius:1rem;display:-ms-flexbox;display:flex;gap:0.5rem;overflow:auto;padding:0.5rem;background-color:var(--mds-tab-background);border-radius:var(--mds-tab-radius);-webkit-overflow-scrolling:touch;-ms-overflow-style:none;scroll-behavior:smooth;-webkit-scroll-snap-type:x mandatory;-ms-scroll-snap-type:x mandatory;scroll-snap-type:x mandatory;scrollbar-width:none}:host::-webkit-scrollbar{display:none}@media (max-width: 767px){.mobile\\:flex-1{-ms-flex:1 1 0%;flex:1 1 0%}}";
|
|
4
4
|
|
|
5
5
|
const MdsTab = class {
|
|
6
6
|
constructor(hostRef) {
|
|
@@ -14,12 +14,16 @@ const MdsTab = class {
|
|
|
14
14
|
}
|
|
15
15
|
componentWillLoad() {
|
|
16
16
|
const items = this.queryItems();
|
|
17
|
-
items.forEach((item, key) =>
|
|
17
|
+
items.forEach((item, key) => {
|
|
18
|
+
if (!item.id) {
|
|
19
|
+
item.id = `mds-tab-item-${key}`;
|
|
20
|
+
}
|
|
21
|
+
});
|
|
18
22
|
}
|
|
19
23
|
changeEventHandler(event) {
|
|
20
24
|
const items = this.element.querySelectorAll('mds-tab-item');
|
|
21
25
|
items.forEach((item, key) => {
|
|
22
|
-
if (
|
|
26
|
+
if (item.id === event.detail) {
|
|
23
27
|
item.selected = true;
|
|
24
28
|
this.currentItem = key;
|
|
25
29
|
this.scrollTabs();
|
|
@@ -30,7 +34,7 @@ const MdsTab = class {
|
|
|
30
34
|
});
|
|
31
35
|
}
|
|
32
36
|
render() {
|
|
33
|
-
return (h(Host, null, h("slot",
|
|
37
|
+
return (h(Host, null, h("slot", null)));
|
|
34
38
|
}
|
|
35
39
|
get element() { return getElement(this); }
|
|
36
40
|
};
|
package/dist/esm/mds-tab.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-5928fc07.js';
|
|
2
2
|
|
|
3
3
|
/*
|
|
4
|
-
Stencil Client Patch Browser v2.
|
|
4
|
+
Stencil Client Patch Browser v2.20.0 | MIT Licensed | https://stenciljs.com
|
|
5
5
|
*/
|
|
6
6
|
const patchBrowser = () => {
|
|
7
7
|
const importMeta = import.meta.url;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var __extends=this&&this.__extends||function(){var e=function(t,n){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n))e[n]=t[n]};return e(t,n)};return function(t,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var __awaiter=this&&this.__awaiter||function(e,t,n,r){function a(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function s(e){try{l(r.next(e))}catch(e){o(e)}}function i(e){try{l(r["throw"](e))}catch(e){o(e)}}function l(e){e.done?n(e.value):a(e.value).then(s,i)}l((r=r.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,a,o,s;return s={next:i(0),throw:i(1),return:i(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function i(e){return function(t){return l([e,t])}}function l(s){if(r)throw new TypeError("Generator is already executing.");while(n)try{if(r=1,a&&(o=s[0]&2?a["return"]:s[0]?a["throw"]||((o=a["return"])&&o.call(a),0):a.next)&&!(o=o.call(a,s[1])).done)return o;if(a=0,o)s=[s[0]&2,o.value];switch(s[0]){case 0:case 1:o=s;break;case 4:n.label++;return{value:s[1],done:false};case 5:n.label++;a=s[1];s=[0];continue;case 7:s=n.ops.pop();n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1];o=s;break}if(o&&n.label<o[2]){n.label=o[2];n.ops.push(s);break}if(o[2])n.ops.pop();n.trys.pop();continue}s=t.call(e,n)}catch(e){s=[6,e];a=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var r=0,a=t.length,o;r<a;r++){if(o||!(r in t)){if(!o)o=Array.prototype.slice.call(t,0,r);o[r]=t[r]}}return e.concat(o||Array.prototype.slice.call(t))};var NAMESPACE="mds-tab";var scopeId;var hostTagName;var queuePending=false;var createTime=function(e,t){if(t===void 0){t=""}{return function(){return}}};var uniqueTime=function(e,t){{return function(){return}}};var HYDRATED_CSS="{visibility:hidden}.hydrated{visibility:inherit}";var isDef=function(e){return e!=null};var isComplexType=function(e){e=typeof e;return e==="object"||e==="function"};var h=function(e,t){var n=[];for(var r=2;r<arguments.length;r++){n[r-2]=arguments[r]}var a=null;var o=false;var s=false;var i=[];var l=function(t){for(var n=0;n<t.length;n++){a=t[n];if(Array.isArray(a)){l(a)}else if(a!=null&&typeof a!=="boolean"){if(o=typeof e!=="function"&&!isComplexType(a)){a=String(a)}if(o&&s){i[i.length-1].$text$+=a}else{i.push(o?newVNode(null,a):a)}s=o}}};l(n);var u=newVNode(e,null);u.$attrs$=t;if(i.length>0){u.$children$=i}return u};var newVNode=function(e,t){var n={$flags$:0,$tag$:e,$text$:t,$elm$:null,$children$:null};return n};var Host={};var isHost=function(e){return e&&e.$tag$===Host};var getElement=function(e){return getHostRef(e).$hostElement$};var emitEvent=function(e,t,n){var r=plt.ce(t,n);e.dispatchEvent(r);return r};var rootAppliedStyles=new WeakMap;var registerStyle=function(e,t,n){var r=styles.get(e);if(supportsConstructableStylesheets&&n){r=r||new CSSStyleSheet;if(typeof r==="string"){r=t}else{r.replaceSync(t)}}else{r=t}styles.set(e,r)};var addStyle=function(e,t,n,r){var a=getScopeId(t);var o=styles.get(a);e=e.nodeType===11?e:doc;if(o){if(typeof o==="string"){e=e.head||e;var s=rootAppliedStyles.get(e);var i=void 0;if(!s){rootAppliedStyles.set(e,s=new Set)}if(!s.has(a)){{{i=doc.createElement("style");i.innerHTML=o}e.insertBefore(i,e.querySelector("link"))}if(s){s.add(a)}}}else if(!e.adoptedStyleSheets.includes(o)){e.adoptedStyleSheets=__spreadArray(__spreadArray([],e.adoptedStyleSheets,true),[o],false)}}return a};var attachStyles=function(e){var t=e.$cmpMeta$;var n=e.$hostElement$;var r=t.$flags$;var a=createTime("attachStyles",t.$tagName$);var o=addStyle(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);if(r&10){n["s-sc"]=o;n.classList.add(o+"-h")}a()};var getScopeId=function(e,t){return"sc-"+e.$tagName$};var createElm=function(e,t,n,r){var a=t.$children$[n];var o=0;var s;var i;{s=a.$elm$=doc.createElement(a.$tag$);if(isDef(scopeId)&&s["s-si"]!==scopeId){s.classList.add(s["s-si"]=scopeId)}if(a.$children$){for(o=0;o<a.$children$.length;++o){i=createElm(e,a,o);if(i){s.appendChild(i)}}}}return s};var addVnodes=function(e,t,n,r,a,o){var s=e;var i;if(s.shadowRoot&&s.tagName===hostTagName){s=s.shadowRoot}for(;a<=o;++a){if(r[a]){i=createElm(null,n,a);if(i){r[a].$elm$=i;s.insertBefore(i,t)}}}};var patch=function(e,t){var n=t.$elm$=e.$elm$;var r=t.$children$;{if(r!==null){addVnodes(n,null,t,r,0,r.length-1)}else;}};var renderVdom=function(e,t){var n=e.$hostElement$;var r=e.$vnode$||newVNode(null,null);var a=isHost(t)?t:h(null,null,t);hostTagName=n.tagName;a.$tag$=null;a.$flags$|=4;e.$vnode$=a;a.$elm$=r.$elm$=n.shadowRoot||n;{scopeId=n["s-sc"]}patch(r,a)};var attachToAncestor=function(e,t){if(t&&!e.$onRenderResolve$&&t["s-p"]){t["s-p"].push(new Promise((function(t){return e.$onRenderResolve$=t})))}};var scheduleUpdate=function(e,t){if(e.$flags$&4){e.$flags$|=512;return}attachToAncestor(e,e.$ancestorComponent$);var n=function(){return dispatchHooks(e,t)};return writeTask(n)};var dispatchHooks=function(e,t){var n=createTime("scheduleUpdate",e.$cmpMeta$.$tagName$);var r=e.$lazyInstance$;var a;if(t){{e.$flags$|=256;if(e.$queuedListeners$){e.$queuedListeners$.map((function(e){var t=e[0],n=e[1];return safeCall(r,t,n)}));e.$queuedListeners$=null}}{a=safeCall(r,"componentWillLoad")}}n();return then(a,(function(){return updateComponent(e,r,t)}))};var updateComponent=function(e,t,n){return __awaiter(void 0,void 0,void 0,(function(){var r,a,o,s,i,l;return __generator(this,(function(u){r=e.$hostElement$;a=createTime("update",e.$cmpMeta$.$tagName$);o=r["s-rc"];if(n){attachStyles(e)}s=createTime("render",e.$cmpMeta$.$tagName$);{callRender(e,t)}if(o){o.map((function(e){return e()}));r["s-rc"]=undefined}s();a();{i=r["s-p"];l=function(){return postUpdateComponent(e)};if(i.length===0){l()}else{Promise.all(i).then(l);e.$flags$|=4;i.length=0}}return[2]}))}))};var callRender=function(e,t,n){try{t=t.render();{e.$flags$|=2}{{{renderVdom(e,t)}}}}catch(t){consoleError(t,e.$hostElement$)}return null};var postUpdateComponent=function(e){var t=e.$cmpMeta$.$tagName$;var n=e.$hostElement$;var r=createTime("postUpdate",t);var a=e.$ancestorComponent$;if(!(e.$flags$&64)){e.$flags$|=64;{addHydratedFlag(n)}r();{e.$onReadyResolve$(n);if(!a){appDidLoad()}}}else{r()}{if(e.$onRenderResolve$){e.$onRenderResolve$();e.$onRenderResolve$=undefined}if(e.$flags$&512){nextTick((function(){return scheduleUpdate(e,false)}))}e.$flags$&=~(4|512)}};var appDidLoad=function(e){{addHydratedFlag(doc.documentElement)}nextTick((function(){return emitEvent(win,"appload",{detail:{namespace:NAMESPACE}})}))};var safeCall=function(e,t,n){if(e&&e[t]){try{return e[t](n)}catch(e){consoleError(e)}}return undefined};var then=function(e,t){return e&&e.then?e.then(t):t()};var addHydratedFlag=function(e){return e.classList.add("hydrated")};var proxyComponent=function(e,t,n){if(t.$members$){var r=Object.entries(t.$members$);r.map((function(e){var t=e[0],n=e[1][0]}))}return e};var initializeComponent=function(e,t,n,r,a){return __awaiter(void 0,void 0,void 0,(function(){var e,r,o,s,i,l,u;return __generator(this,(function(c){switch(c.label){case 0:if(!((t.$flags$&32)===0))return[3,3];t.$flags$|=32;a=loadModule(n);if(!a.then)return[3,2];e=uniqueTime();return[4,a];case 1:a=c.sent();e();c.label=2;case 2:if(!a.isProxied){proxyComponent(a,n);a.isProxied=true}r=createTime("createInstance",n.$tagName$);{t.$flags$|=8}try{new a(t)}catch(e){consoleError(e)}{t.$flags$&=~8}r();if(a.style){o=a.style;s=getScopeId(n);if(!styles.has(s)){i=createTime("registerStyles",n.$tagName$);registerStyle(s,o,!!(n.$flags$&1));i()}}c.label=3;case 3:l=t.$ancestorComponent$;u=function(){return scheduleUpdate(t,true)};if(l&&l["s-rc"]){l["s-rc"].push(u)}else{u()}return[2]}}))}))};var connectedCallback=function(e){if((plt.$flags$&1)===0){var t=getHostRef(e);var n=t.$cmpMeta$;var r=createTime("connectedCallback",n.$tagName$);if(!(t.$flags$&1)){t.$flags$|=1;{var a=e;while(a=a.parentNode||a.host){if(a["s-p"]){attachToAncestor(t,t.$ancestorComponent$=a);break}}}{initializeComponent(e,t,n)}}else{addHostEventListeners(e,t,n.$listeners$)}r()}};var disconnectedCallback=function(e){if((plt.$flags$&1)===0){var t=getHostRef(e);{if(t.$rmListeners$){t.$rmListeners$.map((function(e){return e()}));t.$rmListeners$=undefined}}}};var bootstrapLazy=function(e,t){if(t===void 0){t={}}var n=createTime();var r=[];var a=t.exclude||[];var o=win.customElements;var s=doc.head;var i=s.querySelector("meta[charset]");var l=doc.createElement("style");var u=[];var c;var f=true;Object.assign(plt,t);plt.$resourcesUrl$=new URL(t.resourcesUrl||"./",doc.baseURI).href;e.map((function(e){e[1].map((function(t){var n={$flags$:t[0],$tagName$:t[1],$members$:t[2],$listeners$:t[3]};{n.$members$=t[2]}{n.$listeners$=t[3]}var s=n.$tagName$;var i=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;t=r;registerHost(t,n);if(n.$flags$&1){{{t.attachShadow({mode:"open"})}}}return r}t.prototype.connectedCallback=function(){var e=this;if(c){clearTimeout(c);c=null}if(f){u.push(this)}else{plt.jmp((function(){return connectedCallback(e)}))}};t.prototype.disconnectedCallback=function(){var e=this;plt.jmp((function(){return disconnectedCallback(e)}))};t.prototype.componentOnReady=function(){return getHostRef(this).$onReadyPromise$};return t}(HTMLElement);n.$lazyBundleId$=e[0];if(!a.includes(s)&&!o.get(s)){r.push(s);o.define(s,proxyComponent(i,n))}}))}));{l.innerHTML=r+HYDRATED_CSS;l.setAttribute("data-styles","");s.insertBefore(l,i?i.nextSibling:s.firstChild)}f=false;if(u.length){u.map((function(e){return e.connectedCallback()}))}else{{plt.jmp((function(){return c=setTimeout(appDidLoad,30)}))}}n()};var addHostEventListeners=function(e,t,n,r){if(n){n.map((function(n){var r=n[0],a=n[1],o=n[2];var s=e;var i=hostListenerProxy(t,o);var l=hostListenerOpts(r);plt.ael(s,a,i,l);(t.$rmListeners$=t.$rmListeners$||[]).push((function(){return plt.rel(s,a,i,l)}))}))}};var hostListenerProxy=function(e,t){return function(n){try{{if(e.$flags$&256){e.$lazyInstance$[t](n)}else{(e.$queuedListeners$=e.$queuedListeners$||[]).push([t,n])}}}catch(e){consoleError(e)}}};var hostListenerOpts=function(e){return(e&2)!==0};var hostRefs=new WeakMap;var getHostRef=function(e){return hostRefs.get(e)};var registerInstance=function(e,t){return hostRefs.set(t.$lazyInstance$=e,t)};var registerHost=function(e,t){var n={$flags$:0,$hostElement$:e,$cmpMeta$:t,$instanceValues$:new Map};{n.$onReadyPromise$=new Promise((function(e){return n.$onReadyResolve$=e}));e["s-p"]=[];e["s-rc"]=[]}addHostEventListeners(e,n,t.$listeners$);return hostRefs.set(e,n)};var consoleError=function(e,t){return(0,console.error)(e,t)};var cmpModules=new Map;var loadModule=function(e,t,n){var r=e.$tagName$.replace(/-/g,"_");var a=e.$lazyBundleId$;var o=cmpModules.get(a);if(o){return o[r]}
|
|
2
|
+
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/return import("./".concat(a,".entry.js").concat("")).then((function(e){{cmpModules.set(a,e)}return e[r]}),consoleError)};var styles=new Map;var win=typeof window!=="undefined"?window:{};var doc=win.document||{head:{}};var plt={$flags$:0,$resourcesUrl$:"",jmp:function(e){return e()},raf:function(e){return requestAnimationFrame(e)},ael:function(e,t,n,r){return e.addEventListener(t,n,r)},rel:function(e,t,n,r){return e.removeEventListener(t,n,r)},ce:function(e,t){return new CustomEvent(e,t)}};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,t){return function(n){e.push(n);if(!queuePending){queuePending=true;if(t&&plt.$flags$&4){nextTick(flush)}else{plt.raf(flush)}}}};var consume=function(e){for(var t=0;t<e.length;t++){try{e[t](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};
|
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-5928fc07.js";var patchEsm=function(){return promiseResolve()};var defineCustomElements=function(e,t){if(typeof window==="undefined")return Promise.resolve();return patchEsm().then((function(){return bootstrapLazy([["mds-tab",[[1,"mds-tab",null,[[0,"selectedEvent","changeEventHandler"]]]]]],t)}))};export{defineCustomElements};
|
|
@@ -1 +1 @@
|
|
|
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-5928fc07.js";var mdsTabCss=".visible{visibility:visible}.fixed{position:fixed}.absolute{position:absolute}.border{border-width:1px}.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-tab-background:rgb(var(--tone-neutral-09));--mds-tab-radius:1rem;display:-ms-flexbox;display:flex;gap:0.5rem;overflow:auto;padding:0.5rem;background-color:var(--mds-tab-background);border-radius:var(--mds-tab-radius);-webkit-overflow-scrolling:touch;-ms-overflow-style:none;scroll-behavior:smooth;-webkit-scroll-snap-type:x mandatory;-ms-scroll-snap-type:x mandatory;scroll-snap-type:x mandatory;scrollbar-width:none}:host::-webkit-scrollbar{display:none}@media (max-width: 767px){.mobile\\:flex-1{-ms-flex:1 1 0%;flex:1 1 0%}}";var MdsTab=function(){function e(e){var t=this;registerInstance(this,e);this.queryItems=function(){return t.element.querySelectorAll("mds-tab-item")};this.scrollTabs=function(){var e=t.queryItems();var o=e[t.currentItem];t.element.scrollLeft=o.offsetLeft-t.element.offsetLeft-t.element.offsetWidth/2+o.offsetWidth/2}}e.prototype.componentWillLoad=function(){var e=this.queryItems();e.forEach((function(e,t){if(!e.id){e.id="mds-tab-item-".concat(t)}}))};e.prototype.changeEventHandler=function(e){var t=this;var o=this.element.querySelectorAll("mds-tab-item");o.forEach((function(o,r){if(o.id===e.detail){o.selected=true;t.currentItem=r;t.scrollTabs()}else{o.selected=false}}))};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}();MdsTab.style=mdsTabCss;export{MdsTab as mds_tab};
|
package/dist/esm-es5/mds-tab.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as promiseResolve,b as bootstrapLazy}from"./index-
|
|
1
|
+
import{p as promiseResolve,b as bootstrapLazy}from"./index-5928fc07.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-tab",[[1,"mds-tab",null,[[0,"selectedEvent","changeEventHandler"]]]]]],e)}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as n}from"./p-
|
|
1
|
+
import{p as e,b as n}from"./p-034fd2fd.js";(()=>{const n=import.meta.url,t={};return""!==n&&(t.resourcesUrl=new URL(".",n).href),e(t)})().then((e=>n([["p-d2967340",[[1,"mds-tab",null,[[0,"selectedEvent","changeEventHandler"]]]]]],e)));
|
package/dist/mds-tab/mds-tab.js
CHANGED
|
@@ -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-c1b0e916.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,2 @@
|
|
|
1
|
+
let e,t,n=!1;const l=e=>"object"==(e=typeof e)||"function"===e,s=(e,t,...n)=>{let s=null,r=!1,c=!1;const a=[],i=t=>{for(let n=0;n<t.length;n++)s=t[n],Array.isArray(s)?i(s):null!=s&&"boolean"!=typeof s&&((r="function"!=typeof e&&!l(s))&&(s+=""),r&&c?a[a.length-1].t+=s:a.push(r?o(null,s):s),c=r)};i(n);const u=o(e,null);return u.l=t,a.length>0&&(u.o=a),u},o=(e,t)=>({i:0,u:e,t,$:null,o:null}),r={},c=e=>x(e).m,a=new WeakMap,i=e=>"sc-"+e.p,u=(t,n,l)=>{const s=n.o[l];let o,r,c=0;if(o=s.$=R.createElement(s.u),null!=e&&o["s-si"]!==e&&o.classList.add(o["s-si"]=e),s.o)for(c=0;c<s.o.length;++c)r=u(t,s,c),r&&o.appendChild(r);return o},f=(n,l)=>{const c=n.m,a=n.h||o(null,null),i=(e=>e&&e.u===r)(l)?l:s(null,null,l);t=c.tagName,i.u=null,i.i|=4,n.h=i,i.$=a.$=c.shadowRoot||c,e=c["s-sc"],((e,n)=>{const l=n.$=e.$,s=n.o;null!==s&&((e,n,l,s,o,r)=>{let c,a=e;for(a.shadowRoot&&a.tagName===t&&(a=a.shadowRoot);o<=r;++o)s[o]&&(c=u(null,l,o),c&&(s[o].$=c,a.insertBefore(c,null)))})(l,0,n,s,0,s.length-1)})(a,i)},$=(e,t)=>{t&&!e.S&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.S=t)))},y=(e,t)=>{if(!(4&e.i))return $(e,e.g),G((()=>d(e,t)));e.i|=512},d=(e,t)=>{const n=e.M;let l;return t&&(e.i|=256,e.k&&(e.k.map((([e,t])=>S(n,e,t))),e.k=null),l=S(n,"componentWillLoad")),b(l,(()=>m(e,n,t)))},m=async(e,t,n)=>{const l=e.m,s=l["s-rc"];n&&(e=>{const t=e.v,n=e.m,l=t.i,s=((e,t)=>{let n=i(t);const l=A.get(n);if(e=11===e.nodeType?e:R,l)if("string"==typeof l){let t,s=a.get(e=e.head||e);s||a.set(e,s=new Set),s.has(n)||(t=R.createElement("style"),t.innerHTML=l,e.insertBefore(t,e.querySelector("link")),s&&s.add(n))}else e.adoptedStyleSheets.includes(l)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,l]);return n})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&l&&(n["s-sc"]=s,n.classList.add(s+"-h"))})(e);p(e,t),s&&(s.map((e=>e())),l["s-rc"]=void 0);{const t=l["s-p"],n=()=>h(e);0===t.length?n():(Promise.all(t).then(n),e.i|=4,t.length=0)}},p=(e,t)=>{try{t=t.render(),e.i|=2,f(e,t)}catch(t){O(t,e.m)}return null},h=e=>{const t=e.m,n=e.g;64&e.i||(e.i|=64,g(t),e.C(t),n||w()),e.S&&(e.S(),e.S=void 0),512&e.i&&D((()=>y(e,!1))),e.i&=-517},w=()=>{g(R.documentElement),D((()=>(e=>{const t=U.ce("appload",{detail:{namespace:"mds-tab"}});return e.dispatchEvent(t),t})(H)))},S=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){O(e)}},b=(e,t)=>e&&e.then?e.then(t):t(),g=e=>e.classList.add("hydrated"),M=(e,t)=>(t.j&&Object.entries(t.j).map((([e,[t]])=>{})),e),k=(e,t={})=>{const n=[],l=t.exclude||[],s=H.customElements,o=R.head,r=o.querySelector("meta[charset]"),c=R.createElement("style"),a=[];let u,f=!0;Object.assign(U,t),U.P=new URL(t.resourcesUrl||"./",R.baseURI).href,e.map((e=>{e[1].map((t=>{const o={i:t[0],p:t[1],j:t[2],L:t[3]};o.j=t[2],o.L=t[3];const r=o.p,c=class extends HTMLElement{constructor(e){super(e),L(e=this,o),1&o.i&&e.attachShadow({mode:"open"})}connectedCallback(){u&&(clearTimeout(u),u=null),f?a.push(this):U.jmp((()=>(e=>{if(0==(1&U.i)){const t=x(e),n=t.v,l=()=>{};if(1&t.i)v(e,t,n.L);else{t.i|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){$(t,t.g=n);break}}(async(e,t,n,l,s)=>{if(0==(32&t.i)){{if(t.i|=32,(s=W(n)).then){const e=()=>{};s=await s,e()}s.isProxied||(M(s,n),s.isProxied=!0);const e=()=>{};t.i|=8;try{new s(t)}catch(e){O(e)}t.i&=-9,e()}if(s.style){let e=s.style;const t=i(n);if(!A.has(t)){const l=()=>{};((e,t,n)=>{let l=A.get(e);F&&n?(l=l||new CSSStyleSheet,"string"==typeof l?l=t:l.replaceSync(t)):l=t,A.set(e,l)})(t,e,!!(1&n.i)),l()}}}const o=t.g,r=()=>y(t,!0);o&&o["s-rc"]?o["s-rc"].push(r):r()})(0,t,n)}l()}})(this)))}disconnectedCallback(){U.jmp((()=>(()=>{if(0==(1&U.i)){const e=x(this);e.O&&(e.O.map((e=>e())),e.O=void 0)}})()))}componentOnReady(){return x(this).T}};o.W=e[0],l.includes(r)||s.get(r)||(n.push(r),s.define(r,M(c,o)))}))})),c.innerHTML=n+"{visibility:hidden}.hydrated{visibility:inherit}",c.setAttribute("data-styles",""),o.insertBefore(c,r?r.nextSibling:o.firstChild),f=!1,a.length?a.map((e=>e.connectedCallback())):U.jmp((()=>u=setTimeout(w,30)))},v=(e,t,n)=>{n&&n.map((([n,l,s])=>{const o=e,r=C(t,s),c=j(n);U.ael(o,l,r,c),(t.O=t.O||[]).push((()=>U.rel(o,l,r,c)))}))},C=(e,t)=>n=>{try{256&e.i?e.M[t](n):(e.k=e.k||[]).push([t,n])}catch(e){O(e)}},j=e=>0!=(2&e),P=new WeakMap,x=e=>P.get(e),E=(e,t)=>P.set(t.M=e,t),L=(e,t)=>{const n={i:0,m:e,v:t,A:new Map};return n.T=new Promise((e=>n.C=e)),e["s-p"]=[],e["s-rc"]=[],v(e,n,t.L),P.set(e,n)},O=(e,t)=>(0,console.error)(e,t),T=new Map,W=e=>{const t=e.p.replace(/-/g,"_"),n=e.W,l=T.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(T.set(n,e),e[t])),O)
|
|
2
|
+
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/},A=new Map,H="undefined"!=typeof window?window:{},R=H.document||{head:{}},U={i:0,P:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,l)=>e.addEventListener(t,n,l),rel:(e,t,n,l)=>e.removeEventListener(t,n,l),ce:(e,t)=>new CustomEvent(e,t)},q=e=>Promise.resolve(e),F=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(e){}return!1})(),N=[],V=[],_=(e,t)=>l=>{e.push(l),n||(n=!0,t&&4&U.i?D(B):U.raf(B))},z=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){O(e)}e.length=0},B=()=>{z(N),z(V),(n=N.length>0)&&U.raf(B)},D=e=>q().then(e),G=_(V,!0);export{r as H,k as b,c as g,s as h,q as p,E as r}
|