@maggioli-design-system/mds-input-range 2.1.1 → 2.3.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-27635fed.js → index-9509a00b.js} +148 -105
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/mds-input-range.cjs.entry.js +2 -2
- 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 +3 -3
- package/dist/collection/common/slot.js +10 -1
- package/dist/collection/common/string.js +30 -0
- package/dist/collection/components/mds-input-range/mds-input-range.css +139 -46
- package/dist/collection/dictionary/keyboard.js +84 -0
- package/dist/collection/type/keyboard.js +1 -0
- package/dist/components/mds-input-range.js +1 -1
- package/dist/documentation.json +2 -2
- package/dist/esm/{index-c0c11860.js → index-476f378c.js} +148 -105
- package/dist/esm/loader.js +2 -2
- package/dist/esm/mds-input-range.entry.js +2 -2
- package/dist/esm/mds-input-range.js +3 -3
- package/dist/esm-es5/index-476f378c.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-87f42ab7.js +2 -0
- package/dist/mds-input-range/p-c22c5274.system.entry.js +1 -0
- package/dist/mds-input-range/p-d47766b6.system.js +1 -0
- package/dist/mds-input-range/p-e79d51c6.system.js +2 -0
- package/dist/mds-input-range/p-e838760a.entry.js +1 -0
- package/dist/stats.json +38 -33
- package/dist/types/common/slot.d.ts +2 -1
- package/dist/types/common/string.d.ts +4 -0
- package/dist/types/dictionary/keyboard.d.ts +2 -0
- package/dist/types/type/keyboard.d.ts +12 -0
- package/documentation.json +22 -2
- package/package.json +4 -4
- package/src/common/floating-controller.ts +6 -6
- package/src/common/slot.ts +11 -0
- package/src/common/string.ts +42 -0
- package/src/components/mds-input-range/css/mds-input-range-pref-animation.css +13 -20
- package/src/components/mds-input-range/css/mds-input-range-pref-contrast.css +5 -13
- package/src/components/mds-input-range/css/mds-input-range-pref-theme.css +7 -16
- package/src/components/mds-input-range/mds-input-range.css +1 -4
- package/src/dictionary/keyboard.ts +87 -0
- package/src/fixtures/icons.json +18 -1
- package/src/meta/keyboard/keys.json +83 -0
- package/src/tailwind/components.css +11 -46
- package/src/tailwind/fouc.css +118 -0
- package/src/tailwind/index.css +4 -0
- package/src/type/keyboard.ts +93 -0
- package/www/build/mds-input-range.esm.js +1 -1
- package/www/build/mds-input-range.js +1 -1
- package/www/build/p-87f42ab7.js +2 -0
- package/www/build/p-c22c5274.system.entry.js +1 -0
- package/www/build/p-d47766b6.system.js +1 -0
- package/www/build/p-e79d51c6.system.js +2 -0
- package/www/build/p-e838760a.entry.js +1 -0
- package/dist/esm-es5/index-c0c11860.js +0 -1
- package/dist/mds-input-range/p-16118dde.system.entry.js +0 -1
- package/dist/mds-input-range/p-71d27af5.system.js +0 -2
- package/dist/mds-input-range/p-7a612415.system.js +0 -1
- package/dist/mds-input-range/p-8951c4d3.entry.js +0 -1
- package/dist/mds-input-range/p-dd7b28fc.js +0 -2
- package/www/build/p-16118dde.system.entry.js +0 -1
- package/www/build/p-71d27af5.system.js +0 -2
- package/www/build/p-7a612415.system.js +0 -1
- package/www/build/p-8951c4d3.entry.js +0 -1
- package/www/build/p-dd7b28fc.js +0 -2
|
@@ -21,10 +21,10 @@ 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,
|
|
24
|
+
const BUILD = /* mds-input-range */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, constructableCSS: true, cssAnnotations: true, devTools: 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.27.2 | MIT Licensed | https://stenciljs.com
|
|
28
28
|
*/
|
|
29
29
|
var __defProp = Object.defineProperty;
|
|
30
30
|
var __export = (target, all) => {
|
|
@@ -33,10 +33,15 @@ var __export = (target, all) => {
|
|
|
33
33
|
};
|
|
34
34
|
|
|
35
35
|
// src/client/client-host-ref.ts
|
|
36
|
-
var
|
|
37
|
-
|
|
36
|
+
var getHostRef = (ref) => {
|
|
37
|
+
if (ref.__stencil__getHostRef) {
|
|
38
|
+
return ref.__stencil__getHostRef();
|
|
39
|
+
}
|
|
40
|
+
return void 0;
|
|
41
|
+
};
|
|
38
42
|
var registerInstance = (lazyInstance, hostRef) => {
|
|
39
|
-
|
|
43
|
+
lazyInstance.__stencil__getHostRef = () => hostRef;
|
|
44
|
+
hostRef.$lazyInstance$ = lazyInstance;
|
|
40
45
|
};
|
|
41
46
|
var registerHost = (hostElement, cmpMeta) => {
|
|
42
47
|
const hostRef = {
|
|
@@ -50,7 +55,8 @@ var registerHost = (hostElement, cmpMeta) => {
|
|
|
50
55
|
hostElement["s-p"] = [];
|
|
51
56
|
hostElement["s-rc"] = [];
|
|
52
57
|
}
|
|
53
|
-
const ref =
|
|
58
|
+
const ref = hostRef;
|
|
59
|
+
hostElement.__stencil__getHostRef = () => ref;
|
|
54
60
|
return ref;
|
|
55
61
|
};
|
|
56
62
|
var isMemberInElement = (elm, memberName) => memberName in elm;
|
|
@@ -113,7 +119,6 @@ var FORM_ASSOCIATED_CUSTOM_ELEMENT_CALLBACKS = [
|
|
|
113
119
|
"formStateRestoreCallback"
|
|
114
120
|
];
|
|
115
121
|
var win = typeof window !== "undefined" ? window : {};
|
|
116
|
-
var doc = win.document || { head: {} };
|
|
117
122
|
var plt = {
|
|
118
123
|
$flags$: 0,
|
|
119
124
|
$resourcesUrl$: "",
|
|
@@ -173,9 +178,9 @@ var isComplexType = (o) => {
|
|
|
173
178
|
};
|
|
174
179
|
|
|
175
180
|
// src/utils/query-nonce-meta-tag-content.ts
|
|
176
|
-
function queryNonceMetaTagContent(
|
|
181
|
+
function queryNonceMetaTagContent(doc) {
|
|
177
182
|
var _a, _b, _c;
|
|
178
|
-
return (_c = (_b = (_a =
|
|
183
|
+
return (_c = (_b = (_a = doc.head) == null ? void 0 : _a.querySelector('meta[name="csp-nonce"]')) == null ? void 0 : _b.getAttribute("content")) != null ? _c : void 0;
|
|
179
184
|
}
|
|
180
185
|
|
|
181
186
|
// src/utils/result.ts
|
|
@@ -356,7 +361,10 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
356
361
|
var _a;
|
|
357
362
|
const scopeId2 = getScopeId(cmpMeta);
|
|
358
363
|
const style = styles.get(scopeId2);
|
|
359
|
-
|
|
364
|
+
if (!win.document) {
|
|
365
|
+
return scopeId2;
|
|
366
|
+
}
|
|
367
|
+
styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : win.document;
|
|
360
368
|
if (style) {
|
|
361
369
|
if (typeof style === "string") {
|
|
362
370
|
styleContainerNode = styleContainerNode.head || styleContainerNode;
|
|
@@ -367,9 +375,9 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
367
375
|
}
|
|
368
376
|
if (!appliedStyles.has(scopeId2)) {
|
|
369
377
|
{
|
|
370
|
-
styleElm = document.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`) ||
|
|
378
|
+
styleElm = document.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`) || win.document.createElement("style");
|
|
371
379
|
styleElm.innerHTML = style;
|
|
372
|
-
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(
|
|
380
|
+
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
|
|
373
381
|
if (nonce != null) {
|
|
374
382
|
styleElm.setAttribute("nonce", nonce);
|
|
375
383
|
}
|
|
@@ -398,7 +406,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
398
406
|
styleContainerNode.append(styleElm);
|
|
399
407
|
}
|
|
400
408
|
}
|
|
401
|
-
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */
|
|
409
|
+
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
402
410
|
styleContainerNode.insertBefore(styleElm, null);
|
|
403
411
|
}
|
|
404
412
|
}
|
|
@@ -423,7 +431,7 @@ var attachStyles = (hostRef) => {
|
|
|
423
431
|
const scopeId2 = addStyle(
|
|
424
432
|
elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
|
|
425
433
|
cmpMeta);
|
|
426
|
-
if (flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */) {
|
|
434
|
+
if ((flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */ || flags & 128 /* shadowNeedsScopedCss */)) {
|
|
427
435
|
elm["s-sc"] = scopeId2;
|
|
428
436
|
elm.classList.add(scopeId2 + "-h");
|
|
429
437
|
}
|
|
@@ -431,89 +439,90 @@ var attachStyles = (hostRef) => {
|
|
|
431
439
|
};
|
|
432
440
|
var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
|
|
433
441
|
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRender) => {
|
|
434
|
-
if (oldValue
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
} else {
|
|
452
|
-
elm.style[prop] = "";
|
|
453
|
-
}
|
|
454
|
-
}
|
|
455
|
-
}
|
|
456
|
-
}
|
|
457
|
-
for (const prop in newValue) {
|
|
458
|
-
if (!oldValue || newValue[prop] !== oldValue[prop]) {
|
|
442
|
+
if (oldValue === newValue) {
|
|
443
|
+
return;
|
|
444
|
+
}
|
|
445
|
+
let isProp = isMemberInElement(elm, memberName);
|
|
446
|
+
let ln = memberName.toLowerCase();
|
|
447
|
+
if (memberName === "class") {
|
|
448
|
+
const classList = elm.classList;
|
|
449
|
+
const oldClasses = parseClassList(oldValue);
|
|
450
|
+
let newClasses = parseClassList(newValue);
|
|
451
|
+
{
|
|
452
|
+
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
453
|
+
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
454
|
+
}
|
|
455
|
+
} else if (memberName === "style") {
|
|
456
|
+
{
|
|
457
|
+
for (const prop in oldValue) {
|
|
458
|
+
if (!newValue || newValue[prop] == null) {
|
|
459
459
|
if (prop.includes("-")) {
|
|
460
|
-
elm.style.
|
|
460
|
+
elm.style.removeProperty(prop);
|
|
461
461
|
} else {
|
|
462
|
-
elm.style[prop] =
|
|
462
|
+
elm.style[prop] = "";
|
|
463
463
|
}
|
|
464
464
|
}
|
|
465
465
|
}
|
|
466
|
-
}
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
}
|
|
474
|
-
if (oldValue || newValue) {
|
|
475
|
-
const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
|
|
476
|
-
memberName = memberName.replace(CAPTURE_EVENT_REGEX, "");
|
|
477
|
-
if (oldValue) {
|
|
478
|
-
plt.rel(elm, memberName, oldValue, capture);
|
|
479
|
-
}
|
|
480
|
-
if (newValue) {
|
|
481
|
-
plt.ael(elm, memberName, newValue, capture);
|
|
466
|
+
}
|
|
467
|
+
for (const prop in newValue) {
|
|
468
|
+
if (!oldValue || newValue[prop] !== oldValue[prop]) {
|
|
469
|
+
if (prop.includes("-")) {
|
|
470
|
+
elm.style.setProperty(prop, newValue[prop]);
|
|
471
|
+
} else {
|
|
472
|
+
elm.style[prop] = newValue[prop];
|
|
482
473
|
}
|
|
483
474
|
}
|
|
475
|
+
}
|
|
476
|
+
} else if (memberName === "key") ; else if ((!isProp ) && memberName[0] === "o" && memberName[1] === "n") {
|
|
477
|
+
if (memberName[2] === "-") {
|
|
478
|
+
memberName = memberName.slice(3);
|
|
479
|
+
} else if (isMemberInElement(win, ln)) {
|
|
480
|
+
memberName = ln.slice(2);
|
|
484
481
|
} else {
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
482
|
+
memberName = ln[2] + memberName.slice(3);
|
|
483
|
+
}
|
|
484
|
+
if (oldValue || newValue) {
|
|
485
|
+
const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
|
|
486
|
+
memberName = memberName.replace(CAPTURE_EVENT_REGEX, "");
|
|
487
|
+
if (oldValue) {
|
|
488
|
+
plt.rel(elm, memberName, oldValue, capture);
|
|
489
|
+
}
|
|
490
|
+
if (newValue) {
|
|
491
|
+
plt.ael(elm, memberName, newValue, capture);
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
} else {
|
|
495
|
+
const isComplex = isComplexType(newValue);
|
|
496
|
+
if ((isProp || isComplex && newValue !== null) && !isSvg) {
|
|
497
|
+
try {
|
|
498
|
+
if (!elm.tagName.includes("-")) {
|
|
499
|
+
const n = newValue == null ? "" : newValue;
|
|
500
|
+
if (memberName === "list") {
|
|
501
|
+
isProp = false;
|
|
502
|
+
} else if (oldValue == null || elm[memberName] != n) {
|
|
503
|
+
if (typeof elm.__lookupSetter__(memberName) === "function") {
|
|
504
|
+
elm[memberName] = n;
|
|
505
|
+
} else {
|
|
506
|
+
elm.setAttribute(memberName, n);
|
|
498
507
|
}
|
|
499
|
-
} else if (elm[memberName] !== newValue) {
|
|
500
|
-
elm[memberName] = newValue;
|
|
501
508
|
}
|
|
502
|
-
}
|
|
509
|
+
} else if (elm[memberName] !== newValue) {
|
|
510
|
+
elm[memberName] = newValue;
|
|
503
511
|
}
|
|
512
|
+
} catch (e) {
|
|
504
513
|
}
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
elm.removeAttribute(memberName);
|
|
509
|
-
}
|
|
510
|
-
}
|
|
511
|
-
} else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex) {
|
|
512
|
-
newValue = newValue === true ? "" : newValue;
|
|
514
|
+
}
|
|
515
|
+
if (newValue == null || newValue === false) {
|
|
516
|
+
if (newValue !== false || elm.getAttribute(memberName) === "") {
|
|
513
517
|
{
|
|
514
|
-
elm.
|
|
518
|
+
elm.removeAttribute(memberName);
|
|
515
519
|
}
|
|
516
520
|
}
|
|
521
|
+
} else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex && elm.nodeType === 1 /* ElementNode */) {
|
|
522
|
+
newValue = newValue === true ? "" : newValue;
|
|
523
|
+
{
|
|
524
|
+
elm.setAttribute(memberName, newValue);
|
|
525
|
+
}
|
|
517
526
|
}
|
|
518
527
|
}
|
|
519
528
|
};
|
|
@@ -576,9 +585,14 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
|
576
585
|
let elm;
|
|
577
586
|
let childNode;
|
|
578
587
|
if (newVNode2.$text$ !== null) {
|
|
579
|
-
elm = newVNode2.$elm$ =
|
|
588
|
+
elm = newVNode2.$elm$ = win.document.createTextNode(newVNode2.$text$);
|
|
580
589
|
} else {
|
|
581
|
-
|
|
590
|
+
if (!win.document) {
|
|
591
|
+
throw new Error(
|
|
592
|
+
"You are trying to render a Stencil component in an environment that doesn't support the DOM. Make sure to populate the [`window`](https://developer.mozilla.org/en-US/docs/Web/API/Window/window) object before rendering a component."
|
|
593
|
+
);
|
|
594
|
+
}
|
|
595
|
+
elm = newVNode2.$elm$ = win.document.createElement(
|
|
582
596
|
!useNativeShadowDom && BUILD.slotRelocation && newVNode2.$flags$ & 2 /* isSlotFallback */ ? "slot-fb" : newVNode2.$tag$
|
|
583
597
|
);
|
|
584
598
|
{
|
|
@@ -723,13 +737,10 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
723
737
|
const elm = newVNode2.$elm$ = oldVNode.$elm$;
|
|
724
738
|
const oldChildren = oldVNode.$children$;
|
|
725
739
|
const newChildren = newVNode2.$children$;
|
|
726
|
-
const tag = newVNode2.$tag$;
|
|
727
740
|
const text = newVNode2.$text$;
|
|
728
741
|
if (text === null) {
|
|
729
742
|
{
|
|
730
|
-
|
|
731
|
-
updateElement(oldVNode, newVNode2, isSvgMode);
|
|
732
|
-
}
|
|
743
|
+
updateElement(oldVNode, newVNode2, isSvgMode);
|
|
733
744
|
}
|
|
734
745
|
if (oldChildren !== null && newChildren !== null) {
|
|
735
746
|
updateChildren(elm, oldChildren, newVNode2, newChildren, isInitialRender);
|
|
@@ -776,7 +787,7 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
776
787
|
rootVnode.$flags$ |= 4 /* isHost */;
|
|
777
788
|
hostRef.$vnode$ = rootVnode;
|
|
778
789
|
rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
|
|
779
|
-
useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)
|
|
790
|
+
useNativeShadowDom = !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) && !(cmpMeta.$flags$ & 128 /* shadowNeedsScopedCss */);
|
|
780
791
|
patch(oldVNode, rootVnode, isInitialLoad);
|
|
781
792
|
};
|
|
782
793
|
|
|
@@ -815,6 +826,12 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
815
826
|
);
|
|
816
827
|
}
|
|
817
828
|
let maybePromise;
|
|
829
|
+
if (isInitialLoad) {
|
|
830
|
+
maybePromise = safeCall(instance, "componentWillLoad", void 0, elm);
|
|
831
|
+
} else {
|
|
832
|
+
maybePromise = safeCall(instance, "componentWillUpdate", void 0, elm);
|
|
833
|
+
}
|
|
834
|
+
maybePromise = enqueue(maybePromise, () => safeCall(instance, "componentWillRender", void 0, elm));
|
|
818
835
|
endSchedule();
|
|
819
836
|
return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
|
|
820
837
|
};
|
|
@@ -880,14 +897,13 @@ var postUpdateComponent = (hostRef) => {
|
|
|
880
897
|
const endPostUpdate = createTime("postUpdate", tagName);
|
|
881
898
|
const instance = hostRef.$lazyInstance$ ;
|
|
882
899
|
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
900
|
+
safeCall(instance, "componentDidRender", void 0, elm);
|
|
883
901
|
if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
|
|
884
902
|
hostRef.$flags$ |= 64 /* hasLoadedComponent */;
|
|
885
903
|
{
|
|
886
904
|
addHydratedFlag(elm);
|
|
887
905
|
}
|
|
888
|
-
|
|
889
|
-
safeCall(instance, "componentDidLoad", void 0, elm);
|
|
890
|
-
}
|
|
906
|
+
safeCall(instance, "componentDidLoad", void 0, elm);
|
|
891
907
|
endPostUpdate();
|
|
892
908
|
{
|
|
893
909
|
hostRef.$onReadyResolve$(elm);
|
|
@@ -896,6 +912,7 @@ var postUpdateComponent = (hostRef) => {
|
|
|
896
912
|
}
|
|
897
913
|
}
|
|
898
914
|
} else {
|
|
915
|
+
safeCall(instance, "componentDidUpdate", void 0, elm);
|
|
899
916
|
endPostUpdate();
|
|
900
917
|
}
|
|
901
918
|
{
|
|
@@ -910,9 +927,6 @@ var postUpdateComponent = (hostRef) => {
|
|
|
910
927
|
}
|
|
911
928
|
};
|
|
912
929
|
var appDidLoad = (who) => {
|
|
913
|
-
{
|
|
914
|
-
addHydratedFlag(doc.documentElement);
|
|
915
|
-
}
|
|
916
930
|
nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
|
|
917
931
|
};
|
|
918
932
|
var safeCall = (instance, method, arg, elm) => {
|
|
@@ -936,7 +950,7 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
936
950
|
const hostRef = getHostRef(ref);
|
|
937
951
|
if (!hostRef) {
|
|
938
952
|
throw new Error(
|
|
939
|
-
`Couldn't find host element for "${cmpMeta.$tagName$}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/
|
|
953
|
+
`Couldn't find host element for "${cmpMeta.$tagName$}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/stenciljs/core/issues/5457).`
|
|
940
954
|
);
|
|
941
955
|
}
|
|
942
956
|
const elm = hostRef.$hostElement$ ;
|
|
@@ -962,6 +976,11 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
962
976
|
}
|
|
963
977
|
}
|
|
964
978
|
if ((flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
|
|
979
|
+
if (instance.componentShouldUpdate) {
|
|
980
|
+
if (instance.componentShouldUpdate(newVal, oldVal, propName) === false) {
|
|
981
|
+
return;
|
|
982
|
+
}
|
|
983
|
+
}
|
|
965
984
|
scheduleUpdate(hostRef, false);
|
|
966
985
|
}
|
|
967
986
|
}
|
|
@@ -1120,7 +1139,8 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1120
1139
|
let Cstr;
|
|
1121
1140
|
if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
|
|
1122
1141
|
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
1123
|
-
|
|
1142
|
+
const bundleId = cmpMeta.$lazyBundleId$;
|
|
1143
|
+
if (bundleId) {
|
|
1124
1144
|
const CstrImport = loadModule(cmpMeta, hostRef);
|
|
1125
1145
|
if (CstrImport && "then" in CstrImport) {
|
|
1126
1146
|
const endLoad = uniqueTime();
|
|
@@ -1155,6 +1175,11 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1155
1175
|
hostRef.$flags$ |= 128 /* isWatchReady */;
|
|
1156
1176
|
}
|
|
1157
1177
|
endNewInstance();
|
|
1178
|
+
fireConnectedCallback(hostRef.$lazyInstance$, elm);
|
|
1179
|
+
} else {
|
|
1180
|
+
Cstr = elm.constructor;
|
|
1181
|
+
const cmpTag = elm.localName;
|
|
1182
|
+
customElements.whenDefined(cmpTag).then(() => hostRef.$flags$ |= 128 /* isWatchReady */);
|
|
1158
1183
|
}
|
|
1159
1184
|
if (Cstr && Cstr.style) {
|
|
1160
1185
|
let style;
|
|
@@ -1178,6 +1203,9 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1178
1203
|
}
|
|
1179
1204
|
};
|
|
1180
1205
|
var fireConnectedCallback = (instance, elm) => {
|
|
1206
|
+
{
|
|
1207
|
+
safeCall(instance, "connectedCallback", void 0, elm);
|
|
1208
|
+
}
|
|
1181
1209
|
};
|
|
1182
1210
|
|
|
1183
1211
|
// src/runtime/connected-callback.ts
|
|
@@ -1210,20 +1238,27 @@ var connectedCallback = (elm) => {
|
|
|
1210
1238
|
initializeComponent(elm, hostRef, cmpMeta);
|
|
1211
1239
|
}
|
|
1212
1240
|
} else {
|
|
1213
|
-
if (hostRef == null ? void 0 : hostRef.$lazyInstance$)
|
|
1214
|
-
hostRef.$
|
|
1241
|
+
if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
|
|
1242
|
+
fireConnectedCallback(hostRef.$lazyInstance$, elm);
|
|
1243
|
+
} else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
|
|
1244
|
+
hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance$, elm));
|
|
1215
1245
|
}
|
|
1216
1246
|
}
|
|
1217
1247
|
endConnected();
|
|
1218
1248
|
}
|
|
1219
1249
|
};
|
|
1220
1250
|
var disconnectInstance = (instance, elm) => {
|
|
1251
|
+
{
|
|
1252
|
+
safeCall(instance, "disconnectedCallback", void 0, elm || instance);
|
|
1253
|
+
}
|
|
1221
1254
|
};
|
|
1222
1255
|
var disconnectedCallback = async (elm) => {
|
|
1223
1256
|
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
1224
1257
|
const hostRef = getHostRef(elm);
|
|
1225
|
-
if (hostRef == null ? void 0 : hostRef.$lazyInstance$)
|
|
1226
|
-
hostRef.$
|
|
1258
|
+
if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
|
|
1259
|
+
disconnectInstance(hostRef.$lazyInstance$, elm);
|
|
1260
|
+
} else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
|
|
1261
|
+
hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$, elm));
|
|
1227
1262
|
}
|
|
1228
1263
|
}
|
|
1229
1264
|
if (rootAppliedStyles.has(elm)) {
|
|
@@ -1237,18 +1272,22 @@ var disconnectedCallback = async (elm) => {
|
|
|
1237
1272
|
// src/runtime/bootstrap-lazy.ts
|
|
1238
1273
|
var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
1239
1274
|
var _a;
|
|
1275
|
+
if (!win.document) {
|
|
1276
|
+
console.warn("Stencil: No document found. Skipping bootstrapping lazy components.");
|
|
1277
|
+
return;
|
|
1278
|
+
}
|
|
1240
1279
|
const endBootstrap = createTime();
|
|
1241
1280
|
const cmpTags = [];
|
|
1242
1281
|
const exclude = options.exclude || [];
|
|
1243
1282
|
const customElements2 = win.customElements;
|
|
1244
|
-
const head =
|
|
1283
|
+
const head = win.document.head;
|
|
1245
1284
|
const metaCharset = /* @__PURE__ */ head.querySelector("meta[charset]");
|
|
1246
|
-
const dataStyles = /* @__PURE__ */
|
|
1285
|
+
const dataStyles = /* @__PURE__ */ win.document.createElement("style");
|
|
1247
1286
|
const deferredConnectedCallbacks = [];
|
|
1248
1287
|
let appLoadFallback;
|
|
1249
1288
|
let isBootstrapping = true;
|
|
1250
1289
|
Object.assign(plt, options);
|
|
1251
|
-
plt.$resourcesUrl$ = new URL(options.resourcesUrl || "./",
|
|
1290
|
+
plt.$resourcesUrl$ = new URL(options.resourcesUrl || "./", win.document.baseURI).href;
|
|
1252
1291
|
let hasSlotRelocation = false;
|
|
1253
1292
|
lazyBundles.map((lazyBundle) => {
|
|
1254
1293
|
lazyBundle[1].map((compactMeta) => {
|
|
@@ -1315,6 +1354,10 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1315
1354
|
plt.raf(() => {
|
|
1316
1355
|
var _a3;
|
|
1317
1356
|
const hostRef = getHostRef(this);
|
|
1357
|
+
const i2 = deferredConnectedCallbacks.findIndex((host) => host === this);
|
|
1358
|
+
if (i2 > -1) {
|
|
1359
|
+
deferredConnectedCallbacks.splice(i2, 1);
|
|
1360
|
+
}
|
|
1318
1361
|
if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
|
|
1319
1362
|
delete hostRef.$vnode$.$elm$;
|
|
1320
1363
|
}
|
|
@@ -1346,7 +1389,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1346
1389
|
}
|
|
1347
1390
|
if (dataStyles.innerHTML.length) {
|
|
1348
1391
|
dataStyles.setAttribute("data-styles", "");
|
|
1349
|
-
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(
|
|
1392
|
+
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
|
|
1350
1393
|
if (nonce != null) {
|
|
1351
1394
|
dataStyles.setAttribute("nonce", nonce);
|
|
1352
1395
|
}
|
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-9509a00b.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-9509a00b.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{0%,75%,100%{outline-offset:var(--magma-outline-focus-offset, 6px)}50%{outline-offset:var(--magma-outline-blur-offset, 2px)}}@keyframes focus-bounce{0%,75%,100%{outline-offset:var(--magma-outline-focus-offset, 6px)}50%{outline-offset:var(--magma-outline-blur-offset, 2px)}}@tailwind components; :host{--mds-input-range-thumb-size:1rem;--mds-input-range-thumb-background:rgb(var(--variant-primary-04));--mds-input-range-thumb-shadow:0 0 0 2px rgb(var(--tone-neutral));--mds-input-range-track-background:rgb(var(--tone-neutral-08));--mds-input-range-track-size:0.5rem;--mds-input-range-track-progress-background:rgb(var(--variant-primary-03));--mds-input-range-thumb-background-disabled:rgb(var(--tone-neutral-06));--mds-input-range-track-background-disabled:rgb(var(--tone-neutral-08));--mds-input-range-track-progress-background-disabled:rgb(var(--tone-neutral-06));gap:0.25rem;-webkit-transition-duration:300ms;transition-duration:300ms;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);display:grid;-webkit-transition-property:color;transition-property:color}.header{gap:0.5rem;display:-ms-flexbox;display:flex}.label{min-width:0rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.value{margin-left:auto}.range{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;height:var(--mds-input-range-thumb-size);position:relative}.track{width:100%;--margin:calc(var(--mds-input-range-track-size) / 2);-webkit-box-sizing:border-box;box-sizing:border-box;padding:0 var(--margin);position:absolute}.field{-webkit-animation-duration:var(--magma-outline-animation-duration, 1s);animation-duration:var(--magma-outline-animation-duration, 1s);-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;-webkit-animation-name:focus-bounce;animation-name:focus-bounce;-webkit-animation-play-state:paused;animation-play-state:paused;-webkit-animation-timing-function:cubic-bezier(0, 0, 0.2, 1);animation-timing-function:cubic-bezier(0, 0, 0.2, 1);outline:var(--magma-outline-blur);-webkit-transition-duration:200ms;transition-duration:200ms;-webkit-transition-property:background-color, border-color, color, fill, outline, outline-offset, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, fill, outline, outline-offset, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, fill, outline, outline-offset, transform;transition-property:background-color, border-color, box-shadow, color, fill, outline, outline-offset, transform, -webkit-box-shadow, -webkit-transform;-webkit-transition-timing-function:ease-in-out;transition-timing-function:ease-in-out}.field:focus-visible{--magma-outline-blur:var(--magma-outline-focus);-webkit-animation-play-state:running;animation-play-state:running}.field{z-index:20;height:1rem;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:transparent;border-radius:1000px;-ms-flex-positive:1;flex-grow:1;margin:0}.field:focus-visible{--magma-outline-blur:var(--magma-outline-focus);-webkit-animation-play-state:running;animation-play-state:running}.field::-webkit-slider-thumb{-webkit-transition-duration:300ms;transition-duration:300ms;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-appearance:none;appearance:none;background-color:var(--mds-input-range-thumb-background);border:0;border-radius:var(--mds-input-range-thumb-size);-webkit-box-shadow:var(--mds-input-range-thumb-shadow);box-shadow:var(--mds-input-range-thumb-shadow);cursor:-webkit-grab;cursor:grab;height:var(--mds-input-range-thumb-size);line-height:0;-webkit-transform:translate(0, -50%);transform:translate(0, -50%);-webkit-transition-property:background-color, box-shadow;-webkit-transition-property:background-color, -webkit-box-shadow;transition-property:background-color, -webkit-box-shadow;transition-property:background-color, box-shadow;transition-property:background-color, box-shadow, -webkit-box-shadow;width:var(--mds-input-range-thumb-size)}.field::-webkit-slider-runnable-track{-webkit-appearance:none;appearance:none;border:0;height:0;width:100%}.track-progress{-webkit-transition-duration:300ms;transition-duration:300ms;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);background-color:var(--mds-input-range-track-progress-background);display:-ms-flexbox;display:flex;height:var(--mds-input-range-track-size);-webkit-transition-property:background-color;transition-property:background-color}.track-total{-webkit-transition-duration:300ms;transition-duration:300ms;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);background-color:var(--mds-input-range-track-background);border-radius:var(--mds-input-range-track-size);display:-ms-flexbox;display:flex;height:var(--mds-input-range-track-size);overflow:hidden;-webkit-transition-property:background-color;transition-property:background-color;width:100%}.contrast-area{margin-left:0.25rem;margin-right:0.25rem;border-radius:var(--mds-input-range-track-size)}:host([disabled]:not([disabled=\"false\"])){--mds-input-range-thumb-background:var(--mds-input-range-thumb-background-disabled);--mds-input-range-track-background:var(--mds-input-range-track-background-disabled);--mds-input-range-track-progress-background:var(--mds-input-range-track-progress-background-disabled)}:host([disabled]:not([disabled=\"false\"])) .field::-webkit-slider-thumb{cursor:not-allowed}:host-context(.pref-animation-reduce),:host-context(.pref-animation-reduce) .field::-webkit-slider-thumb,:host-context(.pref-animation-reduce) .field::-webkit-slider-runnable-track,:host-context(.pref-animation-reduce) .track-progress,:host-context(.pref-animation-reduce) .track-total{-webkit-transition-duration:0s;transition-duration:0s}@media (prefers-reduced-motion){:host-context(.pref-animation-system),:host-context(.pref-animation-system) .field::-webkit-slider-thumb,:host-context(.pref-animation-system) .field::-webkit-slider-runnable-track,:host-context(.pref-animation-system) .track-progress,:host-context(.pref-animation-system) .track-total{-webkit-transition-duration:0s;transition-duration:0s}}:host-context(.pref-theme-dark){--mds-input-range-thumb-background:rgb(var(--variant-primary-04));--mds-input-range-track-background:rgb(var(--tone-neutral-07));--mds-input-range-track-progress-background:rgb(var(--variant-primary-05))}@media (prefers-color-scheme: dark){:host-context(.pref-theme-system){--mds-input-range-thumb-background:rgb(var(--variant-primary-04));--mds-input-range-track-background:rgb(var(--tone-neutral-07));--mds-input-range-track-progress-background:rgb(var(--variant-primary-05))}}:host-context(.pref-contrast-more){color:rgb(var(--tone-neutral-01))}@media (prefers-contrast: more){:host-context(.pref-contrast-system){color:rgb(var(--tone-neutral-01))}}:host(:not(:is([hydrated],.hydrated))){-webkit-animation-duration:0s;animation-duration:0s;border-color:transparent;-webkit-box-shadow:0 0 0 transparent;box-shadow:0 0 0 transparent;opacity:0;outline-color:transparent;-webkit-transition-delay:0s;transition-delay:0s;-webkit-transition-duration:0s;transition-duration:0s;visibility:hidden}mds-accordion:not(:is([hydrated],.hydrated)),mds-accordion-item:not(:is([hydrated],.hydrated)),mds-accordion-timer:not(:is([hydrated],.hydrated)),mds-accordion-timer-item:not(:is([hydrated],.hydrated)),mds-author:not(:is([hydrated],.hydrated)),mds-avatar:not(:is([hydrated],.hydrated)),mds-badge:not(:is([hydrated],.hydrated)),mds-banner:not(:is([hydrated],.hydrated)),mds-benchmark-bar:not(:is([hydrated],.hydrated)),mds-bibliography:not(:is([hydrated],.hydrated)),mds-breadcrumb:not(:is([hydrated],.hydrated)),mds-breadcrumb-item:not(:is([hydrated],.hydrated)),mds-button:not(:is([hydrated],.hydrated)),mds-card:not(:is([hydrated],.hydrated)),mds-card-content:not(:is([hydrated],.hydrated)),mds-card-footer:not(:is([hydrated],.hydrated)),mds-card-header:not(:is([hydrated],.hydrated)),mds-card-media:not(:is([hydrated],.hydrated)),mds-chip:not(:is([hydrated],.hydrated)),mds-details:not(:is([hydrated],.hydrated)),mds-dropdown:not(:is([hydrated],.hydrated)),mds-entity:not(:is([hydrated],.hydrated)),mds-file:not(:is([hydrated],.hydrated)),mds-file-preview:not(:is([hydrated],.hydrated)),mds-filter:not(:is([hydrated],.hydrated)),mds-filter-item:not(:is([hydrated],.hydrated)),mds-header:not(:is([hydrated],.hydrated)),mds-header-bar:not(:is([hydrated],.hydrated)),mds-help:not(:is([hydrated],.hydrated)),mds-horizontal-scroll:not(:is([hydrated],.hydrated)),mds-hr:not(:is([hydrated],.hydrated)),mds-icon:not(:is([hydrated],.hydrated)),mds-img:not(:is([hydrated],.hydrated)),mds-input:not(:is([hydrated],.hydrated)),mds-input-field:not(:is([hydrated],.hydrated)),mds-input-range:not(:is([hydrated],.hydrated)),mds-input-select:not(:is([hydrated],.hydrated)),mds-input-switch:not(:is([hydrated],.hydrated)),mds-input-tip:not(:is([hydrated],.hydrated)),mds-input-tip-item:not(:is([hydrated],.hydrated)),mds-input-upload:not(:is([hydrated],.hydrated)),mds-keyboard:not(:is([hydrated],.hydrated)),mds-keyboard-key:not(:is([hydrated],.hydrated)),mds-kpi:not(:is([hydrated],.hydrated)),mds-kpi-item:not(:is([hydrated],.hydrated)),mds-label:not(:is([hydrated],.hydrated)),mds-list:not(:is([hydrated],.hydrated)),mds-list-item:not(:is([hydrated],.hydrated)),mds-modal:not(:is([hydrated],.hydrated)),mds-note:not(:is([hydrated],.hydrated)),mds-notification:not(:is([hydrated],.hydrated)),mds-paginator:not(:is([hydrated],.hydrated)),mds-paginator-item:not(:is([hydrated],.hydrated)),mds-pref:not(:is([hydrated],.hydrated)),mds-pref-animation:not(:is([hydrated],.hydrated)),mds-pref-consumption:not(:is([hydrated],.hydrated)),mds-pref-contrast:not(:is([hydrated],.hydrated)),mds-pref-language:not(:is([hydrated],.hydrated)),mds-pref-language-item:not(:is([hydrated],.hydrated)),mds-pref-theme:not(:is([hydrated],.hydrated)),mds-price-table:not(:is([hydrated],.hydrated)),mds-price-table-features:not(:is([hydrated],.hydrated)),mds-price-table-features-cell:not(:is([hydrated],.hydrated)),mds-price-table-features-row:not(:is([hydrated],.hydrated)),mds-price-table-header:not(:is([hydrated],.hydrated)),mds-price-table-list:not(:is([hydrated],.hydrated)),mds-price-table-list-item:not(:is([hydrated],.hydrated)),mds-progress:not(:is([hydrated],.hydrated)),mds-push-notification:not(:is([hydrated],.hydrated)),mds-push-notifications:not(:is([hydrated],.hydrated)),mds-quote:not(:is([hydrated],.hydrated)),mds-separator:not(:is([hydrated],.hydrated)),mds-spinner:not(:is([hydrated],.hydrated)),mds-stepper-bar:not(:is([hydrated],.hydrated)),mds-stepper-bar-item:not(:is([hydrated],.hydrated)),mds-tab:not(:is([hydrated],.hydrated)),mds-tab-bar:not(:is([hydrated],.hydrated)),mds-tab-bar-item:not(:is([hydrated],.hydrated)),mds-tab-item:not(:is([hydrated],.hydrated)),mds-table:not(:is([hydrated],.hydrated)),mds-table-body:not(:is([hydrated],.hydrated)),mds-table-cell:not(:is([hydrated],.hydrated)),mds-table-footer:not(:is([hydrated],.hydrated)),mds-table-header:not(:is([hydrated],.hydrated)),mds-table-header-cell:not(:is([hydrated],.hydrated)),mds-table-row:not(:is([hydrated],.hydrated)),mds-text:not(:is([hydrated],.hydrated)),mds-toast:not(:is([hydrated],.hydrated)),mds-tooltip:not(:is([hydrated],.hydrated)),mds-tree:not(:is([hydrated],.hydrated)),mds-tree-item:not(:is([hydrated],.hydrated)),mds-url-view:not(:is([hydrated],.hydrated)),mds-usage:not(:is([hydrated],.hydrated)),mds-video-wall:not(:is([hydrated],.hydrated)),mds-zero:not(:is([hydrated],.hydrated)){-webkit-animation-duration:0s;animation-duration:0s;border-color:transparent;-webkit-box-shadow:0 0 0 transparent;box-shadow:0 0 0 transparent;opacity:0;outline-color:transparent;-webkit-transition-delay:0s;transition-delay:0s;-webkit-transition-duration:0s;transition-duration:0s;visibility:hidden}";
|
|
8
8
|
const MdsInputRangeStyle0 = mdsInputRangeCss;
|
|
9
9
|
|
|
10
10
|
const MdsInputRange = class {
|
|
@@ -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-9509a00b.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.27.2 | 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));
|
|
@@ -143,12 +143,12 @@ export class FloatingController {
|
|
|
143
143
|
}
|
|
144
144
|
export class Backdrop {
|
|
145
145
|
constructor(backdropId) {
|
|
146
|
-
this.defaultBackdropId = '
|
|
146
|
+
this.defaultBackdropId = 'magma-backdrop';
|
|
147
147
|
this.backdropBackgroundVisible = 'rgba(var(--magma-backdrop-color, 0 0 0) / var(--magma-backdrop-opacity, 0.1))';
|
|
148
148
|
this.backdropBackgroundHidden = 'rgba(var(--magma-backdrop-color, 0 0 0) / 0)';
|
|
149
149
|
this.backdropId = backdropId !== null && backdropId !== void 0 ? backdropId : this.defaultBackdropId;
|
|
150
|
-
this.cssBackdropZIndex = `var(--${this.backdropId}-z-index)`;
|
|
151
|
-
this.cssBackdropDuration = `var(--${this.backdropId}-duration)`;
|
|
150
|
+
this.cssBackdropZIndex = `var(--${this.backdropId}-z-index, 4000)`;
|
|
151
|
+
this.cssBackdropDuration = `var(--${this.backdropId}-animation-duration, 300ms)`;
|
|
152
152
|
}
|
|
153
153
|
attachBackdrop() {
|
|
154
154
|
if (!this.backdropEl) {
|
|
@@ -16,4 +16,13 @@ const hasSlottedNodes = (el, name) => {
|
|
|
16
16
|
}
|
|
17
17
|
return false;
|
|
18
18
|
};
|
|
19
|
-
|
|
19
|
+
const hasSlotted = (el, name) => {
|
|
20
|
+
var _a;
|
|
21
|
+
const query = name ? `slot[name="${name}"]` : 'slot:not([name])';
|
|
22
|
+
const slot = (_a = el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(query);
|
|
23
|
+
if (slot) {
|
|
24
|
+
return slot.assignedNodes().length > 0 || slot.assignedElements().length > 0;
|
|
25
|
+
}
|
|
26
|
+
return false;
|
|
27
|
+
};
|
|
28
|
+
export { hasSlottedElements, hasSlottedNodes, hasSlotted, };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
const levenshteinDistance = (a, b) => {
|
|
2
|
+
const dp = Array.from({ length: a.length + 1 }, (_, i) =>
|
|
3
|
+
// eslint-disable-next-line no-nested-ternary
|
|
4
|
+
Array.from({ length: b.length + 1 }, (_, j) => (i === 0 ? j : j === 0 ? i : 0)));
|
|
5
|
+
for (let i = 1; i <= a.length; i++) {
|
|
6
|
+
for (let j = 1; j <= b.length; j++) {
|
|
7
|
+
if (a[i - 1] === b[j - 1]) {
|
|
8
|
+
dp[i][j] = dp[i - 1][j - 1];
|
|
9
|
+
}
|
|
10
|
+
else {
|
|
11
|
+
dp[i][j] = 1 + Math.min(dp[i - 1][j], dp[i][j - 1], dp[i - 1][j - 1]);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
return dp[a.length][b.length];
|
|
16
|
+
};
|
|
17
|
+
const closest = (input, validCodes) => {
|
|
18
|
+
let [closest] = validCodes;
|
|
19
|
+
let minDistance = levenshteinDistance(input, closest);
|
|
20
|
+
for (const code of validCodes) {
|
|
21
|
+
const distance = levenshteinDistance(input, code);
|
|
22
|
+
if (distance < minDistance) {
|
|
23
|
+
minDistance = distance;
|
|
24
|
+
closest = code;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
return closest;
|
|
28
|
+
};
|
|
29
|
+
const firstLetterUppercase = (str) => str.charAt(0).toUpperCase() + str.slice(1);
|
|
30
|
+
export { closest, firstLetterUppercase, levenshteinDistance, };
|