@maggioli-design-system/mds-input-range 2.1.0 → 2.2.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-52e46581.js → index-27635fed.js} +168 -73
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/mds-input-range.cjs.entry.js +15 -8
- package/dist/cjs/mds-input-range.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/common/floating-controller.js +180 -0
- package/dist/collection/common/slot.js +19 -4
- package/dist/collection/common/string.js +30 -0
- package/dist/collection/components/mds-input-range/mds-input-range.css +119 -0
- package/dist/collection/components/mds-input-range/mds-input-range.js +23 -6
- package/dist/collection/dictionary/keyboard.js +84 -0
- package/dist/collection/dictionary/tree.js +13 -0
- package/dist/collection/type/keyboard.js +1 -0
- package/dist/collection/type/tree.js +1 -0
- package/dist/components/mds-input-range.js +14 -7
- package/dist/documentation.d.ts +8 -0
- package/dist/documentation.json +17 -7
- package/dist/esm/{index-36162582.js → index-c0c11860.js} +168 -73
- package/dist/esm/loader.js +2 -2
- package/dist/esm/mds-input-range.entry.js +15 -8
- package/dist/esm/mds-input-range.js +3 -3
- package/dist/esm-es5/index-c0c11860.js +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/mds-input-range.entry.js +1 -1
- package/dist/esm-es5/mds-input-range.js +1 -1
- package/dist/mds-input-range/mds-input-range.esm.js +1 -1
- package/dist/mds-input-range/mds-input-range.js +1 -1
- package/dist/mds-input-range/p-71d27af5.system.js +2 -0
- package/dist/mds-input-range/p-7a612415.system.js +1 -0
- package/dist/mds-input-range/p-88970243.system.entry.js +1 -0
- package/dist/mds-input-range/p-ba639fb6.entry.js +1 -0
- package/dist/mds-input-range/p-dd7b28fc.js +2 -0
- package/dist/stats.json +78 -42
- package/dist/types/common/floating-controller.d.ts +46 -0
- package/dist/types/common/slot.d.ts +3 -1
- package/dist/types/common/string.d.ts +4 -0
- package/dist/types/dictionary/keyboard.d.ts +2 -0
- package/dist/types/dictionary/tree.d.ts +4 -0
- package/dist/types/type/keyboard.d.ts +12 -0
- package/dist/types/type/tree.d.ts +3 -0
- package/documentation.json +62 -12
- package/package.json +4 -4
- package/src/common/floating-controller.ts +263 -0
- package/src/common/slot.ts +23 -3
- package/src/common/string.ts +42 -0
- package/src/components/mds-input-range/mds-input-range.css +1 -0
- package/src/dictionary/keyboard.ts +87 -0
- package/src/dictionary/tree.ts +21 -0
- package/src/fixtures/icons.json +38 -1
- package/src/fixtures/iconsauce.json +6 -0
- package/src/meta/keyboard/keys.json +83 -0
- package/src/tailwind/components.css +11 -0
- package/src/tailwind/fouc.css +118 -0
- package/src/type/keyboard.ts +93 -0
- package/src/type/tree.ts +12 -0
- package/www/build/mds-input-range.esm.js +1 -1
- package/www/build/mds-input-range.js +1 -1
- package/www/build/p-71d27af5.system.js +2 -0
- package/www/build/p-7a612415.system.js +1 -0
- package/www/build/p-88970243.system.entry.js +1 -0
- package/www/build/p-ba639fb6.entry.js +1 -0
- package/www/build/p-dd7b28fc.js +2 -0
- package/dist/esm-es5/index-36162582.js +0 -1
- package/dist/mds-input-range/p-939e9c32.system.js +0 -1
- package/dist/mds-input-range/p-c39460f4.system.js +0 -2
- package/dist/mds-input-range/p-d06a229e.js +0 -2
- package/dist/mds-input-range/p-d9e1b94c.system.entry.js +0 -1
- package/dist/mds-input-range/p-e5a76261.entry.js +0 -1
- package/www/build/p-939e9c32.system.js +0 -1
- package/www/build/p-c39460f4.system.js +0 -2
- package/www/build/p-d06a229e.js +0 -2
- package/www/build/p-d9e1b94c.system.entry.js +0 -1
- package/www/build/p-e5a76261.entry.js +0 -1
|
@@ -21,19 +21,23 @@ function _interopNamespace(e) {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
const NAMESPACE = 'mds-input-range';
|
|
24
|
-
const BUILD = /* mds-input-range */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: false, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: false, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: true, hasRenderFn: true, hostListener: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: true, hydratedClass: false, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: true, propNumber: true, propString: false, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: true, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: false, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: false, watchCallback: true };
|
|
24
|
+
const BUILD = /* mds-input-range */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: false, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: false, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: true, hasRenderFn: true, hostListener: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: true, hydratedClass: false, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, modernPropertyDecls: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: true, propNumber: true, propString: false, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: true, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: false, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: false, watchCallback: true };
|
|
25
25
|
|
|
26
26
|
/*
|
|
27
|
-
Stencil Client Platform v4.
|
|
27
|
+
Stencil Client Platform v4.25.1 | MIT Licensed | https://stenciljs.com
|
|
28
28
|
*/
|
|
29
29
|
var __defProp = Object.defineProperty;
|
|
30
30
|
var __export = (target, all) => {
|
|
31
31
|
for (var name in all)
|
|
32
32
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
33
33
|
};
|
|
34
|
+
|
|
35
|
+
// src/client/client-host-ref.ts
|
|
34
36
|
var hostRefs = /* @__PURE__ */ new WeakMap();
|
|
35
37
|
var getHostRef = (ref) => hostRefs.get(ref);
|
|
36
|
-
var registerInstance = (lazyInstance, hostRef) =>
|
|
38
|
+
var registerInstance = (lazyInstance, hostRef) => {
|
|
39
|
+
hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
|
|
40
|
+
};
|
|
37
41
|
var registerHost = (hostElement, cmpMeta) => {
|
|
38
42
|
const hostRef = {
|
|
39
43
|
$flags$: 0,
|
|
@@ -46,7 +50,8 @@ var registerHost = (hostElement, cmpMeta) => {
|
|
|
46
50
|
hostElement["s-p"] = [];
|
|
47
51
|
hostElement["s-rc"] = [];
|
|
48
52
|
}
|
|
49
|
-
|
|
53
|
+
const ref = hostRefs.set(hostElement, hostRef);
|
|
54
|
+
return ref;
|
|
50
55
|
};
|
|
51
56
|
var isMemberInElement = (elm, memberName) => memberName in elm;
|
|
52
57
|
var consoleError = (e, el) => (0, console.error)(e, el);
|
|
@@ -83,16 +88,22 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
83
88
|
/* webpackExclude: /\.system\.entry\.js$/ */
|
|
84
89
|
/* webpackMode: "lazy" */
|
|
85
90
|
`./${bundleId}.entry.js${""}`
|
|
86
|
-
)); }).then(
|
|
87
|
-
{
|
|
88
|
-
|
|
91
|
+
)); }).then(
|
|
92
|
+
(importedModule) => {
|
|
93
|
+
{
|
|
94
|
+
cmpModules.set(bundleId, importedModule);
|
|
95
|
+
}
|
|
96
|
+
return importedModule[exportName];
|
|
97
|
+
},
|
|
98
|
+
(e) => {
|
|
99
|
+
consoleError(e, hostRef.$hostElement$);
|
|
89
100
|
}
|
|
90
|
-
|
|
91
|
-
}, consoleError);
|
|
101
|
+
);
|
|
92
102
|
};
|
|
93
103
|
|
|
94
104
|
// src/client/client-style.ts
|
|
95
105
|
var styles = /* @__PURE__ */ new Map();
|
|
106
|
+
var HYDRATED_STYLE_ID = "sty-id";
|
|
96
107
|
var HYDRATED_CSS = "{visibility:hidden}[hydrated]{visibility:inherit}";
|
|
97
108
|
var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
|
|
98
109
|
var FORM_ASSOCIATED_CUSTOM_ELEMENT_CALLBACKS = [
|
|
@@ -156,12 +167,6 @@ var flush = () => {
|
|
|
156
167
|
};
|
|
157
168
|
var nextTick = (cb) => promiseResolve().then(cb);
|
|
158
169
|
var writeTask = /* @__PURE__ */ queueTask(queueDomWrites, true);
|
|
159
|
-
|
|
160
|
-
// src/utils/constants.ts
|
|
161
|
-
var EMPTY_OBJ = {};
|
|
162
|
-
|
|
163
|
-
// src/utils/helpers.ts
|
|
164
|
-
var isDef = (v) => v != null;
|
|
165
170
|
var isComplexType = (o) => {
|
|
166
171
|
o = typeof o;
|
|
167
172
|
return o === "object" || o === "function";
|
|
@@ -362,7 +367,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
362
367
|
}
|
|
363
368
|
if (!appliedStyles.has(scopeId2)) {
|
|
364
369
|
{
|
|
365
|
-
styleElm = doc.createElement("style");
|
|
370
|
+
styleElm = document.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`) || doc.createElement("style");
|
|
366
371
|
styleElm.innerHTML = style;
|
|
367
372
|
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
|
|
368
373
|
if (nonce != null) {
|
|
@@ -372,7 +377,10 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
372
377
|
if (styleContainerNode.nodeName === "HEAD") {
|
|
373
378
|
const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
|
|
374
379
|
const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
|
|
375
|
-
styleContainerNode.insertBefore(
|
|
380
|
+
styleContainerNode.insertBefore(
|
|
381
|
+
styleElm,
|
|
382
|
+
(referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
|
|
383
|
+
);
|
|
376
384
|
} else if ("host" in styleContainerNode) {
|
|
377
385
|
if (supportsConstructableStylesheets) {
|
|
378
386
|
const stylesheet = new CSSStyleSheet();
|
|
@@ -422,16 +430,18 @@ var attachStyles = (hostRef) => {
|
|
|
422
430
|
endAttachStyles();
|
|
423
431
|
};
|
|
424
432
|
var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
|
|
425
|
-
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
433
|
+
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRender) => {
|
|
426
434
|
if (oldValue !== newValue) {
|
|
427
435
|
let isProp = isMemberInElement(elm, memberName);
|
|
428
436
|
let ln = memberName.toLowerCase();
|
|
429
437
|
if (memberName === "class") {
|
|
430
438
|
const classList = elm.classList;
|
|
431
439
|
const oldClasses = parseClassList(oldValue);
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
440
|
+
let newClasses = parseClassList(newValue);
|
|
441
|
+
{
|
|
442
|
+
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
443
|
+
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
444
|
+
}
|
|
435
445
|
} else if (memberName === "style") {
|
|
436
446
|
{
|
|
437
447
|
for (const prop in oldValue) {
|
|
@@ -486,7 +496,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
486
496
|
elm.setAttribute(memberName, n);
|
|
487
497
|
}
|
|
488
498
|
}
|
|
489
|
-
} else {
|
|
499
|
+
} else if (elm[memberName] !== newValue) {
|
|
490
500
|
elm[memberName] = newValue;
|
|
491
501
|
}
|
|
492
502
|
} catch (e) {
|
|
@@ -508,24 +518,44 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
508
518
|
}
|
|
509
519
|
};
|
|
510
520
|
var parseClassListRegex = /\s/;
|
|
511
|
-
var parseClassList = (value) =>
|
|
521
|
+
var parseClassList = (value) => {
|
|
522
|
+
if (typeof value === "object" && value && "baseVal" in value) {
|
|
523
|
+
value = value.baseVal;
|
|
524
|
+
}
|
|
525
|
+
if (!value || typeof value !== "string") {
|
|
526
|
+
return [];
|
|
527
|
+
}
|
|
528
|
+
return value.split(parseClassListRegex);
|
|
529
|
+
};
|
|
512
530
|
var CAPTURE_EVENT_SUFFIX = "Capture";
|
|
513
531
|
var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
|
|
514
532
|
|
|
515
533
|
// src/runtime/vdom/update-element.ts
|
|
516
|
-
var updateElement = (oldVnode, newVnode, isSvgMode2) => {
|
|
534
|
+
var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
|
|
517
535
|
const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
|
|
518
|
-
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ ||
|
|
519
|
-
const newVnodeAttrs = newVnode.$attrs$ ||
|
|
536
|
+
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || {};
|
|
537
|
+
const newVnodeAttrs = newVnode.$attrs$ || {};
|
|
520
538
|
{
|
|
521
539
|
for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
|
|
522
540
|
if (!(memberName in newVnodeAttrs)) {
|
|
523
|
-
setAccessor(
|
|
541
|
+
setAccessor(
|
|
542
|
+
elm,
|
|
543
|
+
memberName,
|
|
544
|
+
oldVnodeAttrs[memberName],
|
|
545
|
+
void 0,
|
|
546
|
+
isSvgMode2,
|
|
547
|
+
newVnode.$flags$);
|
|
524
548
|
}
|
|
525
549
|
}
|
|
526
550
|
}
|
|
527
551
|
for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
|
|
528
|
-
setAccessor(
|
|
552
|
+
setAccessor(
|
|
553
|
+
elm,
|
|
554
|
+
memberName,
|
|
555
|
+
oldVnodeAttrs[memberName],
|
|
556
|
+
newVnodeAttrs[memberName],
|
|
557
|
+
isSvgMode2,
|
|
558
|
+
newVnode.$flags$);
|
|
529
559
|
}
|
|
530
560
|
};
|
|
531
561
|
function sortedAttrNames(attrNames) {
|
|
@@ -537,13 +567,10 @@ function sortedAttrNames(attrNames) {
|
|
|
537
567
|
attrNames
|
|
538
568
|
);
|
|
539
569
|
}
|
|
540
|
-
|
|
541
|
-
// src/runtime/vdom/vdom-render.ts
|
|
542
|
-
var scopeId;
|
|
543
570
|
var hostTagName;
|
|
544
571
|
var useNativeShadowDom = false;
|
|
545
572
|
var isSvgMode = false;
|
|
546
|
-
var createElm = (oldParentVNode, newParentVNode, childIndex
|
|
573
|
+
var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
547
574
|
const newVNode2 = newParentVNode.$children$[childIndex];
|
|
548
575
|
let i2 = 0;
|
|
549
576
|
let elm;
|
|
@@ -557,11 +584,6 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
557
584
|
{
|
|
558
585
|
updateElement(null, newVNode2, isSvgMode);
|
|
559
586
|
}
|
|
560
|
-
const rootNode = elm.getRootNode();
|
|
561
|
-
const isElementWithinShadowRoot = !rootNode.querySelector("body");
|
|
562
|
-
if (!isElementWithinShadowRoot && BUILD.scoped && isDef(scopeId) && elm["s-si"] !== scopeId) {
|
|
563
|
-
elm.classList.add(elm["s-si"] = scopeId);
|
|
564
|
-
}
|
|
565
587
|
if (newVNode2.$children$) {
|
|
566
588
|
for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
|
|
567
589
|
childNode = createElm(oldParentVNode, newVNode2, i2);
|
|
@@ -690,6 +712,9 @@ var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
|
|
|
690
712
|
if (!isInitialRender) {
|
|
691
713
|
return leftVNode.$key$ === rightVNode.$key$;
|
|
692
714
|
}
|
|
715
|
+
if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
|
|
716
|
+
leftVNode.$key$ = rightVNode.$key$;
|
|
717
|
+
}
|
|
693
718
|
return true;
|
|
694
719
|
}
|
|
695
720
|
return false;
|
|
@@ -724,8 +749,9 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
724
749
|
}
|
|
725
750
|
};
|
|
726
751
|
var insertBefore = (parent, newNode, reference) => {
|
|
727
|
-
|
|
728
|
-
|
|
752
|
+
{
|
|
753
|
+
return parent == null ? void 0 : parent.insertBefore(newNode, reference);
|
|
754
|
+
}
|
|
729
755
|
};
|
|
730
756
|
var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
731
757
|
const hostElm = hostRef.$hostElement$;
|
|
@@ -750,9 +776,6 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
750
776
|
rootVnode.$flags$ |= 4 /* isHost */;
|
|
751
777
|
hostRef.$vnode$ = rootVnode;
|
|
752
778
|
rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
|
|
753
|
-
{
|
|
754
|
-
scopeId = hostElm["s-sc"];
|
|
755
|
-
}
|
|
756
779
|
useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
|
|
757
780
|
patch(oldVNode, rootVnode, isInitialLoad);
|
|
758
781
|
};
|
|
@@ -760,7 +783,14 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
760
783
|
// src/runtime/update-component.ts
|
|
761
784
|
var attachToAncestor = (hostRef, ancestorComponent) => {
|
|
762
785
|
if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
|
|
763
|
-
ancestorComponent["s-p"].push(
|
|
786
|
+
const index = ancestorComponent["s-p"].push(
|
|
787
|
+
new Promise(
|
|
788
|
+
(r) => hostRef.$onRenderResolve$ = () => {
|
|
789
|
+
ancestorComponent["s-p"].splice(index - 1, 1);
|
|
790
|
+
r();
|
|
791
|
+
}
|
|
792
|
+
)
|
|
793
|
+
);
|
|
764
794
|
}
|
|
765
795
|
};
|
|
766
796
|
var scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
@@ -856,7 +886,7 @@ var postUpdateComponent = (hostRef) => {
|
|
|
856
886
|
addHydratedFlag(elm);
|
|
857
887
|
}
|
|
858
888
|
{
|
|
859
|
-
safeCall(instance, "componentDidLoad");
|
|
889
|
+
safeCall(instance, "componentDidLoad", void 0, elm);
|
|
860
890
|
}
|
|
861
891
|
endPostUpdate();
|
|
862
892
|
{
|
|
@@ -885,12 +915,12 @@ var appDidLoad = (who) => {
|
|
|
885
915
|
}
|
|
886
916
|
nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
|
|
887
917
|
};
|
|
888
|
-
var safeCall = (instance, method, arg) => {
|
|
918
|
+
var safeCall = (instance, method, arg, elm) => {
|
|
889
919
|
if (instance && instance[method]) {
|
|
890
920
|
try {
|
|
891
921
|
return instance[method](arg);
|
|
892
922
|
} catch (e) {
|
|
893
|
-
consoleError(e);
|
|
923
|
+
consoleError(e, elm);
|
|
894
924
|
}
|
|
895
925
|
}
|
|
896
926
|
return void 0;
|
|
@@ -943,23 +973,23 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
943
973
|
var _a, _b;
|
|
944
974
|
const prototype = Cstr.prototype;
|
|
945
975
|
if (cmpMeta.$flags$ & 64 /* formAssociated */ && flags & 1 /* isElementConstructor */) {
|
|
946
|
-
FORM_ASSOCIATED_CUSTOM_ELEMENT_CALLBACKS.forEach(
|
|
947
|
-
|
|
976
|
+
FORM_ASSOCIATED_CUSTOM_ELEMENT_CALLBACKS.forEach((cbName) => {
|
|
977
|
+
Object.defineProperty(prototype, cbName, {
|
|
948
978
|
value(...args) {
|
|
949
979
|
const hostRef = getHostRef(this);
|
|
950
980
|
const instance = hostRef.$lazyInstance$ ;
|
|
951
981
|
if (!instance) {
|
|
952
|
-
hostRef.$onReadyPromise$.then((
|
|
953
|
-
const cb =
|
|
954
|
-
typeof cb === "function" && cb.call(
|
|
982
|
+
hostRef.$onReadyPromise$.then((asyncInstance) => {
|
|
983
|
+
const cb = asyncInstance[cbName];
|
|
984
|
+
typeof cb === "function" && cb.call(asyncInstance, ...args);
|
|
955
985
|
});
|
|
956
986
|
} else {
|
|
957
|
-
const cb = instance[cbName];
|
|
987
|
+
const cb = instance[cbName] ;
|
|
958
988
|
typeof cb === "function" && cb.call(instance, ...args);
|
|
959
989
|
}
|
|
960
990
|
}
|
|
961
|
-
})
|
|
962
|
-
);
|
|
991
|
+
});
|
|
992
|
+
});
|
|
963
993
|
}
|
|
964
994
|
if (cmpMeta.$members$ || (cmpMeta.$watchers$ || Cstr.watchers)) {
|
|
965
995
|
if (Cstr.watchers && !cmpMeta.$watchers$) {
|
|
@@ -968,15 +998,68 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
968
998
|
const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
|
|
969
999
|
members.map(([memberName, [memberFlags]]) => {
|
|
970
1000
|
if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
|
|
1001
|
+
const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
|
|
1002
|
+
if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
|
|
1003
|
+
if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
|
|
1004
|
+
if (flags & 1 /* isElementConstructor */ || !origGetter) {
|
|
1005
|
+
Object.defineProperty(prototype, memberName, {
|
|
1006
|
+
get() {
|
|
1007
|
+
{
|
|
1008
|
+
if ((cmpMeta.$members$[memberName][0] & 2048 /* Getter */) === 0) {
|
|
1009
|
+
return getValue(this, memberName);
|
|
1010
|
+
}
|
|
1011
|
+
const ref = getHostRef(this);
|
|
1012
|
+
const instance = ref ? ref.$lazyInstance$ : prototype;
|
|
1013
|
+
if (!instance) return;
|
|
1014
|
+
return instance[memberName];
|
|
1015
|
+
}
|
|
1016
|
+
},
|
|
1017
|
+
configurable: true,
|
|
1018
|
+
enumerable: true
|
|
1019
|
+
});
|
|
1020
|
+
}
|
|
971
1021
|
Object.defineProperty(prototype, memberName, {
|
|
972
|
-
get() {
|
|
973
|
-
return getValue(this, memberName);
|
|
974
|
-
},
|
|
975
1022
|
set(newValue) {
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
1023
|
+
const ref = getHostRef(this);
|
|
1024
|
+
if (origSetter) {
|
|
1025
|
+
const currentValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
1026
|
+
if (typeof currentValue === "undefined" && ref.$instanceValues$.get(memberName)) {
|
|
1027
|
+
newValue = ref.$instanceValues$.get(memberName);
|
|
1028
|
+
} else if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
1029
|
+
ref.$instanceValues$.set(memberName, currentValue);
|
|
1030
|
+
}
|
|
1031
|
+
origSetter.apply(this, [parsePropertyValue(newValue, memberFlags)]);
|
|
1032
|
+
newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
1033
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
1034
|
+
return;
|
|
1035
|
+
}
|
|
1036
|
+
{
|
|
1037
|
+
if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
|
|
1038
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
1039
|
+
if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
|
|
1040
|
+
ref.$onReadyPromise$.then(() => {
|
|
1041
|
+
if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
|
|
1042
|
+
ref.$lazyInstance$[memberName] = newValue;
|
|
1043
|
+
}
|
|
1044
|
+
});
|
|
1045
|
+
}
|
|
1046
|
+
return;
|
|
1047
|
+
}
|
|
1048
|
+
const setterSetVal = () => {
|
|
1049
|
+
const currentValue = ref.$lazyInstance$[memberName];
|
|
1050
|
+
if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
1051
|
+
ref.$instanceValues$.set(memberName, currentValue);
|
|
1052
|
+
}
|
|
1053
|
+
ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, memberFlags);
|
|
1054
|
+
setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
|
|
1055
|
+
};
|
|
1056
|
+
if (ref.$lazyInstance$) {
|
|
1057
|
+
setterSetVal();
|
|
1058
|
+
} else {
|
|
1059
|
+
ref.$onReadyPromise$.then(() => setterSetVal());
|
|
1060
|
+
}
|
|
1061
|
+
}
|
|
1062
|
+
}
|
|
980
1063
|
});
|
|
981
1064
|
}
|
|
982
1065
|
});
|
|
@@ -986,7 +1069,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
986
1069
|
plt.jmp(() => {
|
|
987
1070
|
var _a2;
|
|
988
1071
|
const propName = attrNameToPropName.get(attrName);
|
|
989
|
-
if (this.hasOwnProperty(propName)) {
|
|
1072
|
+
if (this.hasOwnProperty(propName) && BUILD.lazyLoad) {
|
|
990
1073
|
newValue = this[propName];
|
|
991
1074
|
delete this[propName];
|
|
992
1075
|
} else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
|
|
@@ -1006,7 +1089,11 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1006
1089
|
}
|
|
1007
1090
|
return;
|
|
1008
1091
|
}
|
|
1009
|
-
|
|
1092
|
+
const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
|
|
1093
|
+
newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
|
|
1094
|
+
if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
|
|
1095
|
+
this[propName] = newValue;
|
|
1096
|
+
}
|
|
1010
1097
|
});
|
|
1011
1098
|
};
|
|
1012
1099
|
Cstr.observedAttributes = Array.from(
|
|
@@ -1033,9 +1120,8 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1033
1120
|
let Cstr;
|
|
1034
1121
|
if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
|
|
1035
1122
|
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
const CstrImport = loadModule(cmpMeta);
|
|
1123
|
+
{
|
|
1124
|
+
const CstrImport = loadModule(cmpMeta, hostRef);
|
|
1039
1125
|
if (CstrImport && "then" in CstrImport) {
|
|
1040
1126
|
const endLoad = uniqueTime();
|
|
1041
1127
|
Cstr = await CstrImport;
|
|
@@ -1060,7 +1146,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1060
1146
|
try {
|
|
1061
1147
|
new Cstr(hostRef);
|
|
1062
1148
|
} catch (e) {
|
|
1063
|
-
consoleError(e);
|
|
1149
|
+
consoleError(e, elm);
|
|
1064
1150
|
}
|
|
1065
1151
|
{
|
|
1066
1152
|
hostRef.$flags$ &= ~8 /* isConstructingInstance */;
|
|
@@ -1069,10 +1155,6 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1069
1155
|
hostRef.$flags$ |= 128 /* isWatchReady */;
|
|
1070
1156
|
}
|
|
1071
1157
|
endNewInstance();
|
|
1072
|
-
} else {
|
|
1073
|
-
Cstr = elm.constructor;
|
|
1074
|
-
const cmpTag = elm.localName;
|
|
1075
|
-
customElements.whenDefined(cmpTag).then(() => hostRef.$flags$ |= 128 /* isWatchReady */);
|
|
1076
1158
|
}
|
|
1077
1159
|
if (Cstr && Cstr.style) {
|
|
1078
1160
|
let style;
|
|
@@ -1095,7 +1177,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1095
1177
|
schedule();
|
|
1096
1178
|
}
|
|
1097
1179
|
};
|
|
1098
|
-
var fireConnectedCallback = (instance) => {
|
|
1180
|
+
var fireConnectedCallback = (instance, elm) => {
|
|
1099
1181
|
};
|
|
1100
1182
|
|
|
1101
1183
|
// src/runtime/connected-callback.ts
|
|
@@ -1135,7 +1217,7 @@ var connectedCallback = (elm) => {
|
|
|
1135
1217
|
endConnected();
|
|
1136
1218
|
}
|
|
1137
1219
|
};
|
|
1138
|
-
var disconnectInstance = (instance) => {
|
|
1220
|
+
var disconnectInstance = (instance, elm) => {
|
|
1139
1221
|
};
|
|
1140
1222
|
var disconnectedCallback = async (elm) => {
|
|
1141
1223
|
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
@@ -1144,6 +1226,12 @@ var disconnectedCallback = async (elm) => {
|
|
|
1144
1226
|
hostRef.$onReadyPromise$.then(() => disconnectInstance());
|
|
1145
1227
|
}
|
|
1146
1228
|
}
|
|
1229
|
+
if (rootAppliedStyles.has(elm)) {
|
|
1230
|
+
rootAppliedStyles.delete(elm);
|
|
1231
|
+
}
|
|
1232
|
+
if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
|
|
1233
|
+
rootAppliedStyles.delete(elm.shadowRoot);
|
|
1234
|
+
}
|
|
1147
1235
|
};
|
|
1148
1236
|
|
|
1149
1237
|
// src/runtime/bootstrap-lazy.ts
|
|
@@ -1224,6 +1312,13 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1224
1312
|
}
|
|
1225
1313
|
disconnectedCallback() {
|
|
1226
1314
|
plt.jmp(() => disconnectedCallback(this));
|
|
1315
|
+
plt.raf(() => {
|
|
1316
|
+
var _a3;
|
|
1317
|
+
const hostRef = getHostRef(this);
|
|
1318
|
+
if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
|
|
1319
|
+
delete hostRef.$vnode$.$elm$;
|
|
1320
|
+
}
|
|
1321
|
+
});
|
|
1227
1322
|
}
|
|
1228
1323
|
componentOnReady() {
|
|
1229
1324
|
return getHostRef(this).$onReadyPromise$;
|
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-27635fed.js');
|
|
6
6
|
const appGlobals = require('./app-globals-3a1e7e63.js');
|
|
7
7
|
|
|
8
8
|
const defineCustomElements = async (win, options) => {
|
|
@@ -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-27635fed.js');
|
|
6
6
|
|
|
7
|
-
const mdsInputRangeCss = "@-webkit-keyframes focus-bounce {\n 0%, 75%, 100% {\n outline-offset: var(--magma-outline-focus-offset, 6px);\n }\n\n 50% {\n outline-offset: var(--magma-outline-blur-offset, 2px);\n }\n}\n\n@keyframes focus-bounce {\n 0%, 75%, 100% {\n outline-offset: var(--magma-outline-focus-offset, 6px);\n }\n\n 50% {\n outline-offset: var(--magma-outline-blur-offset, 2px);\n }\n}\n\n@tailwind components;\n@tailwind utilities;\n\n/**\n * @prop --mds-input-range-thumb-size: Sets the thumb width and height of the component\n * @prop --mds-input-range-thumb-background:\n * @prop --mds-input-range-track-background:\n * @prop --mds-input-range-track-size:\n * @prop --mds-input-range-track-progress-background:\n */\n\n:host {\n\n --mds-input-range-thumb-size: 1rem;\n --mds-input-range-thumb-background: rgb(var(--variant-primary-04));\n --mds-input-range-thumb-shadow: 0 0 0 2px rgb(var(--tone-neutral));\n --mds-input-range-track-background: rgb(var(--tone-neutral-08));\n --mds-input-range-track-size: 0.5rem;\n --mds-input-range-track-progress-background: rgb(var(--variant-primary-03));\n --mds-input-range-thumb-background-disabled: rgb(var(--tone-neutral-06));\n --mds-input-range-track-background-disabled: rgb(var(--tone-neutral-08));\n --mds-input-range-track-progress-background-disabled: rgb(var(--tone-neutral-06));\n gap: 0.25rem;\n -webkit-transition-duration: 300ms;\n transition-duration: 300ms;\n -webkit-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n\n display: grid;\n -webkit-transition-property: color;\n transition-property: color;\n}\n\n.header {\n gap: 0.5rem;\n\n display: -ms-flexbox;\n\n display: flex;\n}\n\n.label {\n min-width: 0rem;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.value {\n margin-left: auto;\n}\n\n.range {\n -ms-flex-align: center;\n align-items: center;\n display: -ms-flexbox;\n display: flex;\n height: var(--mds-input-range-thumb-size);\n position: relative;\n}\n\n.track {\n width: 100%;\n\n --margin: calc(var(--mds-input-range-track-size) / 2);\n\n -webkit-box-sizing: border-box;\n\n box-sizing: border-box;\n padding: 0 var(--margin);\n position: absolute;\n}\n\n.field {\n -webkit-animation-duration: var(--magma-outline-animation-duration, 1s);\n animation-duration: var(--magma-outline-animation-duration, 1s);\n -webkit-animation-fill-mode: forwards;\n animation-fill-mode: forwards;\n -webkit-animation-iteration-count: infinite;\n animation-iteration-count: infinite;\n -webkit-animation-name: focus-bounce;\n animation-name: focus-bounce;\n -webkit-animation-play-state: paused;\n animation-play-state: paused;\n -webkit-animation-timing-function: cubic-bezier(0, 0, 0.2, 1);\n animation-timing-function: cubic-bezier(0, 0, 0.2, 1);\n outline: var(--magma-outline-blur);\n -webkit-transition-duration: 200ms;\n transition-duration: 200ms;\n -webkit-transition-property: background-color, border-color, color, fill, outline, outline-offset, -webkit-box-shadow, -webkit-transform;\n transition-property: background-color, border-color, color, fill, outline, outline-offset, -webkit-box-shadow, -webkit-transform;\n transition-property: background-color, border-color, box-shadow, color, fill, outline, outline-offset, transform;\n transition-property: background-color, border-color, box-shadow, color, fill, outline, outline-offset, transform, -webkit-box-shadow, -webkit-transform;\n -webkit-transition-timing-function: ease-in-out;\n transition-timing-function: ease-in-out;\n }\n\n.field:focus-visible {\n\n --magma-outline-blur: var(--magma-outline-focus);\n\n -webkit-animation-play-state: running;\n\n animation-play-state: running;\n }\n\n.field {\n z-index: 20;\n height: 1rem;\n\n -webkit-appearance: none;\n\n -moz-appearance: none;\n\n appearance: none;\n background-color: transparent;\n border-radius: 1000px;\n -ms-flex-positive: 1;\n flex-grow: 1;\n margin: 0;\n}\n\n.field:focus-visible {\n\n --magma-outline-blur: var(--magma-outline-focus);\n\n -webkit-animation-play-state: running;\n\n animation-play-state: running;\n }\n\n.field::-webkit-slider-thumb {\n -webkit-transition-duration: 300ms;\n transition-duration: 300ms;\n -webkit-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n\n -webkit-appearance: none;\n\n appearance: none;\n background-color: var(--mds-input-range-thumb-background);\n border: 0;\n border-radius: var(--mds-input-range-thumb-size);\n -webkit-box-shadow: var(--mds-input-range-thumb-shadow);\n box-shadow: var(--mds-input-range-thumb-shadow);\n cursor: -webkit-grab;\n cursor: grab;\n height: var(--mds-input-range-thumb-size);\n line-height: 0;\n -webkit-transform: translate(0, -50%);\n transform: translate(0, -50%);\n -webkit-transition-property: background-color, box-shadow;\n -webkit-transition-property: background-color, -webkit-box-shadow;\n transition-property: background-color, -webkit-box-shadow;\n transition-property: background-color, box-shadow;\n transition-property: background-color, box-shadow, -webkit-box-shadow;\n width: var(--mds-input-range-thumb-size);\n}\n\n.field::-webkit-slider-runnable-track {\n -webkit-appearance: none;\n appearance: none;\n border: 0;\n height: 0;\n width: 100%;\n}\n\n.track-progress {\n -webkit-transition-duration: 300ms;\n transition-duration: 300ms;\n -webkit-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n\n background-color: var(--mds-input-range-track-progress-background);\n display: -ms-flexbox;\n display: flex;\n height: var(--mds-input-range-track-size);\n -webkit-transition-property: background-color;\n transition-property: background-color;\n}\n\n.track-total {\n -webkit-transition-duration: 300ms;\n transition-duration: 300ms;\n -webkit-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n\n background-color: var(--mds-input-range-track-background);\n border-radius: var(--mds-input-range-track-size);\n display: -ms-flexbox;\n display: flex;\n height: var(--mds-input-range-track-size);\n overflow: hidden;\n -webkit-transition-property: background-color;\n transition-property: background-color;\n width: 100%;\n}\n\n.contrast-area {\n margin-left: 0.25rem;\n margin-right: 0.25rem;\n\n border-radius: var(--mds-input-range-track-size);\n}\n\n:host([disabled]:not([disabled=\"false\"])) {\n --mds-input-range-thumb-background: var(--mds-input-range-thumb-background-disabled);\n --mds-input-range-track-background: var(--mds-input-range-track-background-disabled);\n --mds-input-range-track-progress-background: var(--mds-input-range-track-progress-background-disabled);\n}\n\n:host([disabled]:not([disabled=\"false\"])) .field::-webkit-slider-thumb {\n cursor: not-allowed;\n}\n\n@tailwind utilities;\n\n@container style(--magma-pref-animation: reduce) {\n :host,\n .field::-webkit-slider-thumb,\n .field::-webkit-slider-runnable-track,\n .track-progress,\n .track-total {\n -webkit-transition-duration: 0s;\n transition-duration: 0s;\n }\n}\n\n@container style(--magma-pref-animation: system) {\n\n @media (prefers-reduced-motion) {\n :host,\n .field::-webkit-slider-thumb,\n .field::-webkit-slider-runnable-track,\n .track-progress,\n .track-total {\n -webkit-transition-duration: 0s;\n transition-duration: 0s;\n }\n }\n}\n\n@tailwind utilities;\n\n@container style(--magma-pref-theme: dark) {\n :host {\n\n --mds-input-range-thumb-background: rgb(var(--variant-primary-04));\n --mds-input-range-track-background: rgb(var(--tone-neutral-07));\n --mds-input-range-track-progress-background: rgb(var(--variant-primary-05));\n }\n}\n\n@container style(--magma-pref-theme: system) {\n\n @media (prefers-color-scheme: dark) {\n :host {\n\n --mds-input-range-thumb-background: rgb(var(--variant-primary-04));\n --mds-input-range-track-background: rgb(var(--tone-neutral-07));\n --mds-input-range-track-progress-background: rgb(var(--variant-primary-05));\n }\n }\n}\n\n@container style(--magma-pref-contrast: more) {\n :host {\n color: rgb(var(--tone-neutral-01));\n }\n}\n\n@container style(--magma-pref-contrast: system) {\n\n @media (prefers-contrast: more) {\n :host {\n color: rgb(var(--tone-neutral-01));\n }\n }\n}\n\n\n";
|
|
7
|
+
const mdsInputRangeCss = "@-webkit-keyframes focus-bounce {\n 0%, 75%, 100% {\n outline-offset: var(--magma-outline-focus-offset, 6px);\n }\n\n 50% {\n outline-offset: var(--magma-outline-blur-offset, 2px);\n }\n}\n\n@keyframes focus-bounce {\n 0%, 75%, 100% {\n outline-offset: var(--magma-outline-focus-offset, 6px);\n }\n\n 50% {\n outline-offset: var(--magma-outline-blur-offset, 2px);\n }\n}\n\n@tailwind components;\n@tailwind utilities;\n\n/**\n * @prop --mds-input-range-thumb-size: Sets the thumb width and height of the component\n * @prop --mds-input-range-thumb-background:\n * @prop --mds-input-range-track-background:\n * @prop --mds-input-range-track-size:\n * @prop --mds-input-range-track-progress-background:\n */\n\n:host {\n\n --mds-input-range-thumb-size: 1rem;\n --mds-input-range-thumb-background: rgb(var(--variant-primary-04));\n --mds-input-range-thumb-shadow: 0 0 0 2px rgb(var(--tone-neutral));\n --mds-input-range-track-background: rgb(var(--tone-neutral-08));\n --mds-input-range-track-size: 0.5rem;\n --mds-input-range-track-progress-background: rgb(var(--variant-primary-03));\n --mds-input-range-thumb-background-disabled: rgb(var(--tone-neutral-06));\n --mds-input-range-track-background-disabled: rgb(var(--tone-neutral-08));\n --mds-input-range-track-progress-background-disabled: rgb(var(--tone-neutral-06));\n gap: 0.25rem;\n -webkit-transition-duration: 300ms;\n transition-duration: 300ms;\n -webkit-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n\n display: grid;\n -webkit-transition-property: color;\n transition-property: color;\n}\n\n.header {\n gap: 0.5rem;\n\n display: -ms-flexbox;\n\n display: flex;\n}\n\n.label {\n min-width: 0rem;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.value {\n margin-left: auto;\n}\n\n.range {\n -ms-flex-align: center;\n align-items: center;\n display: -ms-flexbox;\n display: flex;\n height: var(--mds-input-range-thumb-size);\n position: relative;\n}\n\n.track {\n width: 100%;\n\n --margin: calc(var(--mds-input-range-track-size) / 2);\n\n -webkit-box-sizing: border-box;\n\n box-sizing: border-box;\n padding: 0 var(--margin);\n position: absolute;\n}\n\n.field {\n -webkit-animation-duration: var(--magma-outline-animation-duration, 1s);\n animation-duration: var(--magma-outline-animation-duration, 1s);\n -webkit-animation-fill-mode: forwards;\n animation-fill-mode: forwards;\n -webkit-animation-iteration-count: infinite;\n animation-iteration-count: infinite;\n -webkit-animation-name: focus-bounce;\n animation-name: focus-bounce;\n -webkit-animation-play-state: paused;\n animation-play-state: paused;\n -webkit-animation-timing-function: cubic-bezier(0, 0, 0.2, 1);\n animation-timing-function: cubic-bezier(0, 0, 0.2, 1);\n outline: var(--magma-outline-blur);\n -webkit-transition-duration: 200ms;\n transition-duration: 200ms;\n -webkit-transition-property: background-color, border-color, color, fill, outline, outline-offset, -webkit-box-shadow, -webkit-transform;\n transition-property: background-color, border-color, color, fill, outline, outline-offset, -webkit-box-shadow, -webkit-transform;\n transition-property: background-color, border-color, box-shadow, color, fill, outline, outline-offset, transform;\n transition-property: background-color, border-color, box-shadow, color, fill, outline, outline-offset, transform, -webkit-box-shadow, -webkit-transform;\n -webkit-transition-timing-function: ease-in-out;\n transition-timing-function: ease-in-out;\n }\n\n.field:focus-visible {\n\n --magma-outline-blur: var(--magma-outline-focus);\n\n -webkit-animation-play-state: running;\n\n animation-play-state: running;\n }\n\n.field {\n z-index: 20;\n height: 1rem;\n\n -webkit-appearance: none;\n\n -moz-appearance: none;\n\n appearance: none;\n background-color: transparent;\n border-radius: 1000px;\n -ms-flex-positive: 1;\n flex-grow: 1;\n margin: 0;\n}\n\n.field:focus-visible {\n\n --magma-outline-blur: var(--magma-outline-focus);\n\n -webkit-animation-play-state: running;\n\n animation-play-state: running;\n }\n\n.field::-webkit-slider-thumb {\n -webkit-transition-duration: 300ms;\n transition-duration: 300ms;\n -webkit-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n\n -webkit-appearance: none;\n\n appearance: none;\n background-color: var(--mds-input-range-thumb-background);\n border: 0;\n border-radius: var(--mds-input-range-thumb-size);\n -webkit-box-shadow: var(--mds-input-range-thumb-shadow);\n box-shadow: var(--mds-input-range-thumb-shadow);\n cursor: -webkit-grab;\n cursor: grab;\n height: var(--mds-input-range-thumb-size);\n line-height: 0;\n -webkit-transform: translate(0, -50%);\n transform: translate(0, -50%);\n -webkit-transition-property: background-color, box-shadow;\n -webkit-transition-property: background-color, -webkit-box-shadow;\n transition-property: background-color, -webkit-box-shadow;\n transition-property: background-color, box-shadow;\n transition-property: background-color, box-shadow, -webkit-box-shadow;\n width: var(--mds-input-range-thumb-size);\n}\n\n.field::-webkit-slider-runnable-track {\n -webkit-appearance: none;\n appearance: none;\n border: 0;\n height: 0;\n width: 100%;\n}\n\n.track-progress {\n -webkit-transition-duration: 300ms;\n transition-duration: 300ms;\n -webkit-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n\n background-color: var(--mds-input-range-track-progress-background);\n display: -ms-flexbox;\n display: flex;\n height: var(--mds-input-range-track-size);\n -webkit-transition-property: background-color;\n transition-property: background-color;\n}\n\n.track-total {\n -webkit-transition-duration: 300ms;\n transition-duration: 300ms;\n -webkit-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n\n background-color: var(--mds-input-range-track-background);\n border-radius: var(--mds-input-range-track-size);\n display: -ms-flexbox;\n display: flex;\n height: var(--mds-input-range-track-size);\n overflow: hidden;\n -webkit-transition-property: background-color;\n transition-property: background-color;\n width: 100%;\n}\n\n.contrast-area {\n margin-left: 0.25rem;\n margin-right: 0.25rem;\n\n border-radius: var(--mds-input-range-track-size);\n}\n\n:host([disabled]:not([disabled=\"false\"])) {\n --mds-input-range-thumb-background: var(--mds-input-range-thumb-background-disabled);\n --mds-input-range-track-background: var(--mds-input-range-track-background-disabled);\n --mds-input-range-track-progress-background: var(--mds-input-range-track-progress-background-disabled);\n}\n\n:host([disabled]:not([disabled=\"false\"])) .field::-webkit-slider-thumb {\n cursor: not-allowed;\n}\n\n@tailwind utilities;\n\n@container style(--magma-pref-animation: reduce) {\n :host,\n .field::-webkit-slider-thumb,\n .field::-webkit-slider-runnable-track,\n .track-progress,\n .track-total {\n -webkit-transition-duration: 0s;\n transition-duration: 0s;\n }\n}\n\n@container style(--magma-pref-animation: system) {\n\n @media (prefers-reduced-motion) {\n :host,\n .field::-webkit-slider-thumb,\n .field::-webkit-slider-runnable-track,\n .track-progress,\n .track-total {\n -webkit-transition-duration: 0s;\n transition-duration: 0s;\n }\n }\n}\n\n@tailwind utilities;\n\n@container style(--magma-pref-theme: dark) {\n :host {\n\n --mds-input-range-thumb-background: rgb(var(--variant-primary-04));\n --mds-input-range-track-background: rgb(var(--tone-neutral-07));\n --mds-input-range-track-progress-background: rgb(var(--variant-primary-05));\n }\n}\n\n@container style(--magma-pref-theme: system) {\n\n @media (prefers-color-scheme: dark) {\n :host {\n\n --mds-input-range-thumb-background: rgb(var(--variant-primary-04));\n --mds-input-range-track-background: rgb(var(--tone-neutral-07));\n --mds-input-range-track-progress-background: rgb(var(--variant-primary-05));\n }\n }\n}\n\n@container style(--magma-pref-contrast: more) {\n :host {\n color: rgb(var(--tone-neutral-01));\n }\n}\n\n@container style(--magma-pref-contrast: system) {\n\n @media (prefers-contrast: more) {\n :host {\n color: rgb(var(--tone-neutral-01));\n }\n }\n}\n\n\n:host(:not(:is([hydrated], .hydrated))) {\n -webkit-animation-duration: 0s;\n animation-duration: 0s;\n border-color: transparent;\n -webkit-box-shadow: 0 0 0 transparent;\n box-shadow: 0 0 0 transparent;\n opacity: 0;\n outline-color: transparent;\n -webkit-transition-delay: 0s;\n transition-delay: 0s;\n -webkit-transition-duration: 0s;\n transition-duration: 0s;\n visibility: hidden;\n}\n\n/* TODO refact(stencil): Uses only used selector from parent shadowDOM component */\n\nmds-accordion:not(:is([hydrated], .hydrated)),\nmds-accordion-item:not(:is([hydrated], .hydrated)),\nmds-accordion-timer:not(:is([hydrated], .hydrated)),\nmds-accordion-timer-item:not(:is([hydrated], .hydrated)),\nmds-author:not(:is([hydrated], .hydrated)),\nmds-avatar:not(:is([hydrated], .hydrated)),\nmds-badge:not(:is([hydrated], .hydrated)),\nmds-banner:not(:is([hydrated], .hydrated)),\nmds-benchmark-bar:not(:is([hydrated], .hydrated)),\nmds-bibliography:not(:is([hydrated], .hydrated)),\nmds-breadcrumb:not(:is([hydrated], .hydrated)),\nmds-breadcrumb-item:not(:is([hydrated], .hydrated)),\nmds-button:not(:is([hydrated], .hydrated)),\nmds-card:not(:is([hydrated], .hydrated)),\nmds-card-content:not(:is([hydrated], .hydrated)),\nmds-card-footer:not(:is([hydrated], .hydrated)),\nmds-card-header:not(:is([hydrated], .hydrated)),\nmds-card-media:not(:is([hydrated], .hydrated)),\nmds-chip:not(:is([hydrated], .hydrated)),\nmds-details:not(:is([hydrated], .hydrated)),\nmds-dropdown:not(:is([hydrated], .hydrated)),\nmds-entity:not(:is([hydrated], .hydrated)),\nmds-file:not(:is([hydrated], .hydrated)),\nmds-file-preview:not(:is([hydrated], .hydrated)),\nmds-filter:not(:is([hydrated], .hydrated)),\nmds-filter-item:not(:is([hydrated], .hydrated)),\nmds-header:not(:is([hydrated], .hydrated)),\nmds-header-bar:not(:is([hydrated], .hydrated)),\nmds-help:not(:is([hydrated], .hydrated)),\nmds-horizontal-scroll:not(:is([hydrated], .hydrated)),\nmds-hr:not(:is([hydrated], .hydrated)),\nmds-icon:not(:is([hydrated], .hydrated)),\nmds-img:not(:is([hydrated], .hydrated)),\nmds-input:not(:is([hydrated], .hydrated)),\nmds-input-field:not(:is([hydrated], .hydrated)),\nmds-input-range:not(:is([hydrated], .hydrated)),\nmds-input-select:not(:is([hydrated], .hydrated)),\nmds-input-switch:not(:is([hydrated], .hydrated)),\nmds-input-tip:not(:is([hydrated], .hydrated)),\nmds-input-tip-item:not(:is([hydrated], .hydrated)),\nmds-input-upload:not(:is([hydrated], .hydrated)),\nmds-keyboard:not(:is([hydrated], .hydrated)),\nmds-keyboard-key:not(:is([hydrated], .hydrated)),\nmds-kpi:not(:is([hydrated], .hydrated)),\nmds-kpi-item:not(:is([hydrated], .hydrated)),\nmds-label:not(:is([hydrated], .hydrated)),\nmds-list:not(:is([hydrated], .hydrated)),\nmds-list-item:not(:is([hydrated], .hydrated)),\nmds-modal:not(:is([hydrated], .hydrated)),\nmds-note:not(:is([hydrated], .hydrated)),\nmds-notification:not(:is([hydrated], .hydrated)),\nmds-paginator:not(:is([hydrated], .hydrated)),\nmds-paginator-item:not(:is([hydrated], .hydrated)),\nmds-pref:not(:is([hydrated], .hydrated)),\nmds-pref-animation:not(:is([hydrated], .hydrated)),\nmds-pref-consumption:not(:is([hydrated], .hydrated)),\nmds-pref-contrast:not(:is([hydrated], .hydrated)),\nmds-pref-language:not(:is([hydrated], .hydrated)),\nmds-pref-language-item:not(:is([hydrated], .hydrated)),\nmds-pref-theme:not(:is([hydrated], .hydrated)),\nmds-price-table:not(:is([hydrated], .hydrated)),\nmds-price-table-features:not(:is([hydrated], .hydrated)),\nmds-price-table-features-cell:not(:is([hydrated], .hydrated)),\nmds-price-table-features-row:not(:is([hydrated], .hydrated)),\nmds-price-table-header:not(:is([hydrated], .hydrated)),\nmds-price-table-list:not(:is([hydrated], .hydrated)),\nmds-price-table-list-item:not(:is([hydrated], .hydrated)),\nmds-progress:not(:is([hydrated], .hydrated)),\nmds-push-notification:not(:is([hydrated], .hydrated)),\nmds-push-notifications:not(:is([hydrated], .hydrated)),\nmds-quote:not(:is([hydrated], .hydrated)),\nmds-separator:not(:is([hydrated], .hydrated)),\nmds-spinner:not(:is([hydrated], .hydrated)),\nmds-stepper-bar:not(:is([hydrated], .hydrated)),\nmds-stepper-bar-item:not(:is([hydrated], .hydrated)),\nmds-tab:not(:is([hydrated], .hydrated)),\nmds-tab-bar:not(:is([hydrated], .hydrated)),\nmds-tab-bar-item:not(:is([hydrated], .hydrated)),\nmds-tab-item:not(:is([hydrated], .hydrated)),\nmds-table:not(:is([hydrated], .hydrated)),\nmds-table-body:not(:is([hydrated], .hydrated)),\nmds-table-cell:not(:is([hydrated], .hydrated)),\nmds-table-footer:not(:is([hydrated], .hydrated)),\nmds-table-header:not(:is([hydrated], .hydrated)),\nmds-table-header-cell:not(:is([hydrated], .hydrated)),\nmds-table-row:not(:is([hydrated], .hydrated)),\nmds-text:not(:is([hydrated], .hydrated)),\nmds-toast:not(:is([hydrated], .hydrated)),\nmds-tooltip:not(:is([hydrated], .hydrated)),\nmds-tree:not(:is([hydrated], .hydrated)),\nmds-tree-item:not(:is([hydrated], .hydrated)),\nmds-url-view:not(:is([hydrated], .hydrated)),\nmds-usage:not(:is([hydrated], .hydrated)),\nmds-video-wall:not(:is([hydrated], .hydrated)),\nmds-zero:not(:is([hydrated], .hydrated))\n{\n -webkit-animation-duration: 0s;\n animation-duration: 0s;\n border-color: transparent;\n -webkit-box-shadow: 0 0 0 transparent;\n box-shadow: 0 0 0 transparent;\n opacity: 0;\n outline-color: transparent;\n -webkit-transition-delay: 0s;\n transition-delay: 0s;\n -webkit-transition-duration: 0s;\n transition-duration: 0s;\n visibility: hidden;\n}\n\n";
|
|
8
8
|
const MdsInputRangeStyle0 = mdsInputRangeCss;
|
|
9
9
|
|
|
10
10
|
const MdsInputRange = class {
|
|
@@ -18,16 +18,23 @@ const MdsInputRange = class {
|
|
|
18
18
|
this.internals = hostRef.$hostElement$.attachInternals();
|
|
19
19
|
hostRef.$hostElement$["s-ei"] = this.internals;
|
|
20
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* The greatest value in the range of permitted values
|
|
23
|
+
*/
|
|
24
|
+
this.max = 100;
|
|
25
|
+
/**
|
|
26
|
+
* The lowest value in the range of permitted values
|
|
27
|
+
*/
|
|
28
|
+
this.min = 0;
|
|
29
|
+
/**
|
|
30
|
+
* The step attribute is a number that specifies the granularity that
|
|
31
|
+
* the value must adhere to, or the special value any, which is described below.
|
|
32
|
+
*/
|
|
33
|
+
this.step = 1;
|
|
21
34
|
this.onInput = () => {
|
|
22
35
|
// trigger valueChanged that update progress and emit event
|
|
23
36
|
this.value = parseInt(this.inputElement.value);
|
|
24
37
|
};
|
|
25
|
-
this.progress = undefined;
|
|
26
|
-
this.max = 100;
|
|
27
|
-
this.min = 0;
|
|
28
|
-
this.step = 1;
|
|
29
|
-
this.disabled = undefined;
|
|
30
|
-
this.value = undefined;
|
|
31
38
|
}
|
|
32
39
|
calculateProgress() {
|
|
33
40
|
// validate value
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-27635fed.js');
|
|
6
6
|
const appGlobals = require('./app-globals-3a1e7e63.js');
|
|
7
7
|
|
|
8
8
|
/*
|
|
9
|
-
Stencil Client Patch Browser v4.
|
|
9
|
+
Stencil Client Patch Browser v4.25.1 | MIT Licensed | https://stenciljs.com
|
|
10
10
|
*/
|
|
11
11
|
var patchBrowser = () => {
|
|
12
12
|
const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('mds-input-range.cjs.js', document.baseURI).href));
|