@maggioli-design-system/mds-input-range 1.2.3 → 2.0.1
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-a544b1ef.js → index-f984e289.js} +14 -3
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/mds-input-range.cjs.entry.js +6 -5
- package/dist/cjs/mds-input-range.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/common/aria.js +17 -1
- package/dist/collection/common/device.js +6 -0
- package/dist/collection/common/keyboard-manager.js +2 -2
- package/dist/collection/common/locale.js +17 -5
- package/dist/collection/components/mds-input-range/mds-input-range.css +16 -270
- package/dist/collection/components/mds-input-range/mds-input-range.js +4 -3
- package/dist/collection/components/mds-input-range/test/mds-input-range.stories.js +4 -4
- package/dist/collection/dictionary/button.js +1 -0
- package/dist/collection/dictionary/file-extensions.js +114 -56
- package/dist/collection/dictionary/text.js +60 -1
- package/dist/collection/dictionary/variant.js +10 -1
- package/dist/collection/type/variant-file-format.js +0 -34
- package/dist/components/mds-input-range.js +5 -4
- package/dist/documentation.json +3 -3
- package/dist/esm/{index-9cf44097.js → index-e0ac0a55.js} +14 -3
- package/dist/esm/loader.js +2 -2
- package/dist/esm/mds-input-range.entry.js +6 -5
- package/dist/esm/mds-input-range.js +3 -3
- package/dist/esm-es5/index-e0ac0a55.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-48fdc5db.system.entry.js +1 -0
- package/dist/mds-input-range/p-4e0b934e.system.js +2 -0
- package/dist/mds-input-range/{p-ca462756.system.js → p-76412b19.system.js} +1 -1
- package/dist/mds-input-range/p-d697edb0.entry.js +1 -0
- package/dist/mds-input-range/p-f6cc8c2e.js +2 -0
- package/dist/stats.json +36 -35
- package/dist/types/common/aria.d.ts +3 -1
- package/dist/types/common/date.d.ts +1 -1
- package/dist/types/common/device.d.ts +2 -0
- package/dist/types/common/file.d.ts +3 -4
- package/dist/types/common/locale.d.ts +3 -1
- package/dist/types/components/mds-input-range/mds-input-range.d.ts +1 -0
- package/dist/types/components/mds-input-range/test/mds-input-range.stories.d.ts +0 -4
- package/dist/types/dictionary/file-extensions.d.ts +2 -1
- package/dist/types/dictionary/text.d.ts +3 -1
- package/dist/types/dictionary/variant.d.ts +2 -1
- package/dist/types/stencil-public-runtime.d.ts +6 -0
- package/dist/types/type/autocomplete.d.ts +1 -1
- package/dist/types/type/button.d.ts +1 -1
- package/dist/types/type/header-bar.d.ts +2 -0
- package/dist/types/type/input.d.ts +3 -0
- package/dist/types/type/text.d.ts +2 -0
- package/dist/types/type/variant-file-format.d.ts +4 -4
- package/dist/types/type/variant.d.ts +2 -1
- package/documentation.json +48 -28
- package/package.json +5 -5
- package/readme.md +12 -1
- package/src/common/aria.ts +22 -2
- package/src/common/device.ts +9 -0
- package/src/common/file.ts +2 -3
- package/src/common/keyboard-manager.ts +2 -2
- package/src/common/locale.ts +20 -6
- package/src/common/unit.ts +1 -1
- package/src/components/mds-input-range/.gitlab-ci.yml +5 -10
- package/src/components/mds-input-range/css/mds-input-range-pref-theme.css +4 -4
- package/src/components/mds-input-range/mds-input-range.css +14 -22
- package/src/components/mds-input-range/mds-input-range.tsx +3 -0
- package/src/components/mds-input-range/test/mds-input-range.stories.tsx +4 -4
- package/src/dictionary/button.ts +1 -0
- package/src/dictionary/file-extensions.ts +118 -57
- package/src/dictionary/text.ts +64 -0
- package/src/dictionary/variant.ts +11 -0
- package/src/fixtures/icons.json +37 -3
- package/src/fixtures/iconsauce.json +26 -1
- package/src/meta/file-format/locale.el.json +39 -0
- package/src/meta/file-format/locale.en.json +39 -0
- package/src/meta/file-format/locale.es.json +39 -0
- package/src/meta/file-format/locale.it.json +39 -0
- package/src/tailwind/components.css +1 -1
- package/src/type/autocomplete.ts +0 -1
- package/src/type/button.ts +1 -0
- package/src/type/header-bar.ts +11 -0
- package/src/type/input.ts +4 -0
- package/src/type/text.ts +59 -0
- package/src/type/variant-file-format.ts +20 -37
- package/src/type/variant.ts +9 -1
- package/www/build/mds-input-range.esm.js +1 -1
- package/www/build/mds-input-range.js +1 -1
- package/www/build/p-48fdc5db.system.entry.js +1 -0
- package/www/build/p-4e0b934e.system.js +2 -0
- package/www/build/{p-ca462756.system.js → p-76412b19.system.js} +1 -1
- package/www/build/p-d697edb0.entry.js +1 -0
- package/www/build/p-f6cc8c2e.js +2 -0
- package/dist/collection/type/language.js +0 -1
- package/dist/esm-es5/index-9cf44097.js +0 -1
- package/dist/mds-input-range/p-47995aad.system.entry.js +0 -1
- package/dist/mds-input-range/p-51b9684c.system.js +0 -2
- package/dist/mds-input-range/p-54651c4c.js +0 -2
- package/dist/mds-input-range/p-b8731af1.entry.js +0 -1
- package/dist/types/interface/input-value.d.ts +0 -4
- package/dist/types/type/language.d.ts +0 -1
- package/src/interface/input-value.ts +0 -5
- package/src/type/language.ts +0 -4
- package/www/build/p-47995aad.system.entry.js +0 -1
- package/www/build/p-51b9684c.system.js +0 -2
- package/www/build/p-54651c4c.js +0 -2
- package/www/build/p-b8731af1.entry.js +0 -1
- /package/dist/collection/{interface/input-value.js → type/header-bar.js} +0 -0
|
@@ -24,7 +24,7 @@ const NAMESPACE = 'mds-input-range';
|
|
|
24
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: false, 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.22.2 | MIT Licensed | https://stenciljs.com
|
|
28
28
|
*/
|
|
29
29
|
var __defProp = Object.defineProperty;
|
|
30
30
|
var __export = (target, all) => {
|
|
@@ -368,10 +368,21 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
368
368
|
if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
|
|
369
369
|
if (styleContainerNode.nodeName === "HEAD") {
|
|
370
370
|
const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
|
|
371
|
-
const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling :
|
|
371
|
+
const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
|
|
372
372
|
styleContainerNode.insertBefore(styleElm, referenceNode2);
|
|
373
373
|
} else if ("host" in styleContainerNode) {
|
|
374
|
-
|
|
374
|
+
if (supportsConstructableStylesheets) {
|
|
375
|
+
const stylesheet = new CSSStyleSheet();
|
|
376
|
+
stylesheet.replaceSync(style);
|
|
377
|
+
styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
|
|
378
|
+
} else {
|
|
379
|
+
const existingStyleContainer = styleContainerNode.querySelector("style");
|
|
380
|
+
if (existingStyleContainer) {
|
|
381
|
+
existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
|
|
382
|
+
} else {
|
|
383
|
+
styleContainerNode.prepend(styleElm);
|
|
384
|
+
}
|
|
385
|
+
}
|
|
375
386
|
} else {
|
|
376
387
|
styleContainerNode.append(styleElm);
|
|
377
388
|
}
|
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-f984e289.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-f984e289.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.svg {\n display: -ms-flexbox;\n display: flex;\n}\n\n\n.svg svg {\n aspect-ratio: 1/1;\n height: 100%;\n width: 100%;\n}\n\n\n.contrast-area {\n border-radius: inherit;\n -webkit-box-shadow: 0 0 0 2px rgb(var(--tone-neutral-01) / 0.3) inset;\n box-shadow: 0 0 0 2px rgb(var(--tone-neutral-01) / 0.3) inset;\n display: none;\n inset: 0;\n opacity: 0;\n pointer-events: none;\n position: absolute;\n transition-behavior: allow-discrete;\n -webkit-transition-property: display opacity;\n transition-property: display opacity;\n\n -webkit-box-shadow: 0 0 0 1px rgb(var(--tone-neutral-01) / 0.3) inset;\n\n box-shadow: 0 0 0 1px rgb(var(--tone-neutral-01) / 0.3) inset;\n }\n\n\n@container style(--magma-pref-contrast: more) {\n .contrast-area,\n .contrast-area-50 {\n display: block;\n opacity: 1;\n\n /* @starting-style {\n opacity: 0;\n } */\n }\n }\n\n\n@container style(--magma-pref-contrast: system) {\n\n @media (prefers-contrast: more) {\n .contrast-area,\n .contrast-area-50 {\n display: block;\n opacity: 1;\n\n /* @starting-style {\n opacity: 0;\n } */\n }\n }\n }\n\n\n@container style(--magma-pref-animation: reduce) {\n .contrast-area,\n .contrast-area-50 {\n -webkit-transition-duration: 0s;\n transition-duration: 0s;\n }\n }\n\n\n@container style(--magma-pref-animation: system) {\n \n @media (prefers-reduced-motion) {\n .contrast-area,\n .contrast-area-50 {\n -webkit-transition-duration: 0s;\n transition-duration: 0s;\n }\n }\n }\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(--brand-maggioli-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-09));\n --mds-input-range-track-size: 0.5rem;\n --mds-input-range-track-progress-background: rgb(var(--brand-maggioli-03));\n gap: 0.25rem;\n -webkit-transition-duration: 200ms;\n transition-duration: 200ms;\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-property: background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;\n -webkit-transition-property: background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;\n transition-property: background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;\n transition-property: background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;\n transition-property: background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width, -webkit-box-shadow, -webkit-transform;\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 -webkit-transition-duration: 200ms;\n transition-duration: 200ms;\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 width: var(--mds-input-range-thumb-size);\n}\n\n.field::-webkit-slider-runnable-track {\n -webkit-transition-property: background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;\n -webkit-transition-property: background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;\n transition-property: background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;\n transition-property: background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;\n transition-property: background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width, -webkit-box-shadow, -webkit-transform;\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 -webkit-transition-duration: 200ms;\n transition-duration: 200ms;\n\n -webkit-appearance: none;\n\n appearance: none;\n border: 0;\n height: 0;\n width: 100%;\n}\n\n.track-progress {\n -webkit-transition-property: color, background-color, border-color, fill, stroke, -webkit-text-decoration-color;\n transition-property: color, background-color, border-color, fill, stroke, -webkit-text-decoration-color;\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, -webkit-text-decoration-color;\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 -webkit-transition-duration: 200ms;\n transition-duration: 200ms;\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}\n\n.track-total {\n -webkit-transition-property: color, background-color, border-color, fill, stroke, -webkit-text-decoration-color;\n transition-property: color, background-color, border-color, fill, stroke, -webkit-text-decoration-color;\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, -webkit-text-decoration-color;\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 -webkit-transition-duration: 200ms;\n transition-duration: 200ms;\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 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@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(--brand-maggioli-04));\n --mds-input-range-track-background: rgb(var(--tone-neutral-07));\n --mds-input-range-track-progress-background: rgb(var(--brand-maggioli-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(--brand-maggioli-04));\n --mds-input-range-track-background: rgb(var(--tone-neutral-07));\n --mds-input-range-track-progress-background: rgb(var(--brand-maggioli-05));\n }\n }\n}\n\n.visible {\n visibility: visible;\n}\n\n.static {\n position: static;\n}\n\n.fixed {\n position: fixed;\n}\n\n.absolute {\n position: absolute;\n}\n\n.border {\n border-width: 1px;\n}\n\n.bg-label-amaranth-10 {\n --tw-bg-opacity: 1;\n background-color: rgb(var(--label-amaranth-10) / var(--tw-bg-opacity));\n}\n\n.bg-label-aqua-10 {\n --tw-bg-opacity: 1;\n background-color: rgb(var(--label-aqua-10) / var(--tw-bg-opacity));\n}\n\n.bg-label-blue-10 {\n --tw-bg-opacity: 1;\n background-color: rgb(var(--label-blue-10) / var(--tw-bg-opacity));\n}\n\n.bg-label-green-10 {\n --tw-bg-opacity: 1;\n background-color: rgb(var(--label-green-10) / var(--tw-bg-opacity));\n}\n\n.bg-label-lime-10 {\n --tw-bg-opacity: 1;\n background-color: rgb(var(--label-lime-10) / var(--tw-bg-opacity));\n}\n\n.bg-label-orange-10 {\n --tw-bg-opacity: 1;\n background-color: rgb(var(--label-orange-10) / var(--tw-bg-opacity));\n}\n\n.bg-label-orchid-10 {\n --tw-bg-opacity: 1;\n background-color: rgb(var(--label-orchid-10) / var(--tw-bg-opacity));\n}\n\n.bg-label-violet-10 {\n --tw-bg-opacity: 1;\n background-color: rgb(var(--label-violet-10) / var(--tw-bg-opacity));\n}\n\n.bg-label-yellow-10 {\n --tw-bg-opacity: 1;\n background-color: rgb(var(--label-yellow-10) / var(--tw-bg-opacity));\n}\n\n.bg-tone-neutral-10 {\n --tw-bg-opacity: 1;\n background-color: rgb(var(--tone-neutral-10) / var(--tw-bg-opacity));\n}\n\n.fill-label-amaranth-04 {\n fill: rgb(var(--label-amaranth-04));\n}\n\n.fill-label-aqua-04 {\n fill: rgb(var(--label-aqua-04));\n}\n\n.fill-label-blue-04 {\n fill: rgb(var(--label-blue-04));\n}\n\n.fill-label-green-04 {\n fill: rgb(var(--label-green-04));\n}\n\n.fill-label-lime-04 {\n fill: rgb(var(--label-lime-04));\n}\n\n.fill-label-orange-04 {\n fill: rgb(var(--label-orange-04));\n}\n\n.fill-label-orchid-04 {\n fill: rgb(var(--label-orchid-04));\n}\n\n.fill-label-violet-04 {\n fill: rgb(var(--label-violet-04));\n}\n\n.fill-label-yellow-04 {\n fill: rgb(var(--label-yellow-04));\n}\n\n.fill-tone-neutral-04 {\n fill: rgb(var(--tone-neutral-04));\n}\n\n.text-label-amaranth-04 {\n --tw-text-opacity: 1;\n color: rgb(var(--label-amaranth-04) / var(--tw-text-opacity));\n}\n\n.text-label-aqua-04 {\n --tw-text-opacity: 1;\n color: rgb(var(--label-aqua-04) / var(--tw-text-opacity));\n}\n\n.text-label-blue-04 {\n --tw-text-opacity: 1;\n color: rgb(var(--label-blue-04) / var(--tw-text-opacity));\n}\n\n.text-label-green-04 {\n --tw-text-opacity: 1;\n color: rgb(var(--label-green-04) / var(--tw-text-opacity));\n}\n\n.text-label-lime-04 {\n --tw-text-opacity: 1;\n color: rgb(var(--label-lime-04) / var(--tw-text-opacity));\n}\n\n.text-label-orange-04 {\n --tw-text-opacity: 1;\n color: rgb(var(--label-orange-04) / var(--tw-text-opacity));\n}\n\n.text-label-orchid-04 {\n --tw-text-opacity: 1;\n color: rgb(var(--label-orchid-04) / var(--tw-text-opacity));\n}\n\n.text-label-violet-04 {\n --tw-text-opacity: 1;\n color: rgb(var(--label-violet-04) / var(--tw-text-opacity));\n}\n\n.text-label-yellow-04 {\n --tw-text-opacity: 1;\n color: rgb(var(--label-yellow-04) / var(--tw-text-opacity));\n}\n\n.text-tone-neutral-04 {\n --tw-text-opacity: 1;\n color: rgb(var(--tone-neutral-04) / var(--tw-text-opacity));\n}\n\n.shadow {\n --tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);\n --tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);\n -webkit-box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\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-09));\n --mds-input-range-track-size: 0.5rem;\n --mds-input-range-track-progress-background: rgb(var(--variant-primary-03));\n gap: 0.25rem;\n -webkit-transition-duration: 200ms;\n transition-duration: 200ms;\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-appearance: none;\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 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@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";
|
|
8
8
|
const MdsInputRangeStyle0 = mdsInputRangeCss;
|
|
9
9
|
|
|
10
10
|
const MdsInputRange = class {
|
|
@@ -60,13 +60,14 @@ const MdsInputRange = class {
|
|
|
60
60
|
this.calculateProgress();
|
|
61
61
|
}
|
|
62
62
|
componentDidLoad() {
|
|
63
|
-
var _a;
|
|
64
|
-
this.
|
|
63
|
+
var _a, _b;
|
|
64
|
+
this.label = (_a = this.element.textContent) !== null && _a !== void 0 ? _a : '';
|
|
65
|
+
this.inputElement = (_b = this.element.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector('.field');
|
|
65
66
|
this.value = parseInt(this.inputElement.value);
|
|
66
67
|
this.calculateProgress();
|
|
67
68
|
}
|
|
68
69
|
render() {
|
|
69
|
-
return (index.h(index.Host, { key: '
|
|
70
|
+
return (index.h(index.Host, { key: '4f58f56b2bf1af905741bbcab323e583dd907a35' }, index.h("header", { key: '69a2e6c483558f0ce70eca8e1ec45f4ce7f63b10', class: "header", part: "header" }, index.h("mds-text", { key: '1d5f89b89f5bdf1ca6746567eb23d2b96444c2d9', class: "label", typography: "label" }, index.h("slot", { key: '534eb663ff412980069c4308a2a15a784e2bf1cf' })), index.h("mds-text", { key: 'e187c33fb9124f1d20032c822b535d0ddc839fe3', class: "value", typography: "label" }, this.value)), index.h("div", { key: 'fb3245af7eefbab656b68810577d77a328e312c5', class: "range" }, index.h("div", { key: 'f146b8b59fbd5bbb3db2350d94686fad986b4dfc', class: "track" }, index.h("div", { key: '04aaec03384f51e3ad2ad8cc695274c36062d6bf', class: "contrast-area" }), index.h("div", { key: '2de981fb668e8056a24ca82163dca106fcc5878e', class: "track-total" }, index.h("div", { key: '2044a5ce25454e56d950c2c7f68ce11369babd87', class: "track-progress", style: { width: `${this.progress}%` } }))), index.h("input", { key: '423eb3d5b176748d0376374888c7ef3298dc54d9', class: "field", "aria-label": this.label, max: this.max, min: this.min, onInput: this.onInput, step: this.step, type: "range", value: this.value }))));
|
|
70
71
|
}
|
|
71
72
|
static get formAssociated() { return true; }
|
|
72
73
|
get element() { return index.getElement(this); }
|
|
@@ -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-f984e289.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.22.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));
|
|
@@ -18,6 +18,22 @@ const setAttributeIfEmpty = (element, attribute, value) => {
|
|
|
18
18
|
element.setAttribute(attribute, value);
|
|
19
19
|
return value;
|
|
20
20
|
};
|
|
21
|
+
const removeAttributesIf = (element, attribute, valueCheck = 'true', cleanAttributes) => {
|
|
22
|
+
if (ifAttribute(element, attribute, valueCheck)) {
|
|
23
|
+
const attributesList = Array.isArray(cleanAttributes) ? cleanAttributes : [cleanAttributes];
|
|
24
|
+
attributesList.forEach(attributeToRemove => {
|
|
25
|
+
element.removeAttribute(attributeToRemove);
|
|
26
|
+
});
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
return false;
|
|
30
|
+
};
|
|
31
|
+
const ifAttribute = (element, attribute, valueCheck = 'true') => {
|
|
32
|
+
if (element.hasAttribute(attribute) && element.getAttribute(attribute) === valueCheck) {
|
|
33
|
+
return true;
|
|
34
|
+
}
|
|
35
|
+
return false;
|
|
36
|
+
};
|
|
21
37
|
const hashValue = (value) => `${value}-${hash(value)}`;
|
|
22
38
|
const hashRandomValue = (value) => {
|
|
23
39
|
const randomValue = randomInt(1000000);
|
|
@@ -26,4 +42,4 @@ const hashRandomValue = (value) => {
|
|
|
26
42
|
}
|
|
27
43
|
return hash(randomValue.toString());
|
|
28
44
|
};
|
|
29
|
-
export {
|
|
45
|
+
export { hashRandomValue, hashValue, removeAttributesIf, setAttributeIfEmpty, ifAttribute, unslugName, };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
const isMobileDevice = () => {
|
|
2
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3
|
+
const userAgent = navigator.userAgent || navigator.vendor || window.opera;
|
|
4
|
+
return /android|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(userAgent);
|
|
5
|
+
};
|
|
6
|
+
export { isMobileDevice, };
|
|
@@ -31,13 +31,13 @@ export class KeyboardManager {
|
|
|
31
31
|
};
|
|
32
32
|
this.attachEscapeBehavior = (callback) => {
|
|
33
33
|
this.escapeCallback = callback;
|
|
34
|
-
if (window !== undefined) {
|
|
34
|
+
if (typeof window !== 'undefined') {
|
|
35
35
|
window.addEventListener('keydown', this.handleEscapeBehaviorDispatchEvent.bind(this));
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
38
|
this.detachEscapeBehavior = () => {
|
|
39
39
|
this.escapeCallback = () => { return; };
|
|
40
|
-
if (window !== undefined) {
|
|
40
|
+
if (typeof window !== 'undefined') {
|
|
41
41
|
window.removeEventListener('keydown', this.handleEscapeBehaviorDispatchEvent.bind(this));
|
|
42
42
|
}
|
|
43
43
|
};
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { render } from "mustache";
|
|
2
2
|
export class Locale {
|
|
3
3
|
constructor(configData) {
|
|
4
4
|
this.rollbackLanguage = 'en';
|
|
5
5
|
this.set = (configData) => {
|
|
6
6
|
this.config = configData;
|
|
7
7
|
};
|
|
8
|
-
this.lang = (
|
|
9
|
-
this.
|
|
8
|
+
this.lang = (el) => {
|
|
9
|
+
this.element = el;
|
|
10
|
+
this.closestElement = this.element.closest('[lang]');
|
|
10
11
|
if (this.closestElement) {
|
|
11
12
|
if (this.closestElement.lang) {
|
|
12
13
|
this.language = this.closestElement.lang;
|
|
@@ -16,6 +17,18 @@ export class Locale {
|
|
|
16
17
|
this.language = this.rollbackLanguage;
|
|
17
18
|
return this.language;
|
|
18
19
|
};
|
|
20
|
+
this.update = (doc) => {
|
|
21
|
+
const context = doc !== null && doc !== void 0 ? doc : this.element.shadowRoot;
|
|
22
|
+
context && context.querySelectorAll('*').forEach(el => {
|
|
23
|
+
if (el.tagName.toLowerCase().startsWith('mds-')) {
|
|
24
|
+
// eslint-disable-next-line no-restricted-syntax
|
|
25
|
+
if (el && 'updateLang' in el) {
|
|
26
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
27
|
+
el.updateLang();
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
};
|
|
19
32
|
this.pluralize = (tag, context) => {
|
|
20
33
|
const languagePhrase = this.config[this.language] ? this.config[this.language][tag] : this.config[this.rollbackLanguage][tag];
|
|
21
34
|
const phrases = [];
|
|
@@ -38,8 +51,7 @@ export class Locale {
|
|
|
38
51
|
}
|
|
39
52
|
}
|
|
40
53
|
}
|
|
41
|
-
|
|
42
|
-
return template(context);
|
|
54
|
+
return render(translatePhrase, context);
|
|
43
55
|
};
|
|
44
56
|
this.get = (tag, context) => {
|
|
45
57
|
if (context) {
|
|
@@ -11,98 +11,22 @@
|
|
|
11
11
|
@tailwind components;
|
|
12
12
|
@tailwind utilities;
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
.svg {
|
|
16
|
-
display: flex;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
.svg svg {
|
|
21
|
-
aspect-ratio: 1/1;
|
|
22
|
-
height: 100%;
|
|
23
|
-
width: 100%;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
.contrast-area {
|
|
28
|
-
border-radius: inherit;
|
|
29
|
-
box-shadow: 0 0 0 2px rgb(var(--tone-neutral-01) / 0.3) inset;
|
|
30
|
-
display: none;
|
|
31
|
-
inset: 0;
|
|
32
|
-
opacity: 0;
|
|
33
|
-
pointer-events: none;
|
|
34
|
-
position: absolute;
|
|
35
|
-
transition-behavior: allow-discrete;
|
|
36
|
-
transition-property: display opacity;
|
|
37
|
-
|
|
38
|
-
box-shadow: 0 0 0 1px rgb(var(--tone-neutral-01) / 0.3) inset;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
@container style(--magma-pref-contrast: more) {
|
|
43
|
-
.contrast-area,
|
|
44
|
-
.contrast-area-50 {
|
|
45
|
-
display: block;
|
|
46
|
-
opacity: 1;
|
|
47
|
-
|
|
48
|
-
/* @starting-style {
|
|
49
|
-
opacity: 0;
|
|
50
|
-
} */
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
@container style(--magma-pref-contrast: system) {
|
|
56
|
-
|
|
57
|
-
@media (prefers-contrast: more) {
|
|
58
|
-
.contrast-area,
|
|
59
|
-
.contrast-area-50 {
|
|
60
|
-
display: block;
|
|
61
|
-
opacity: 1;
|
|
62
|
-
|
|
63
|
-
/* @starting-style {
|
|
64
|
-
opacity: 0;
|
|
65
|
-
} */
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
@container style(--magma-pref-animation: reduce) {
|
|
72
|
-
.contrast-area,
|
|
73
|
-
.contrast-area-50 {
|
|
74
|
-
transition-duration: 0s;
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
@container style(--magma-pref-animation: system) {
|
|
80
|
-
|
|
81
|
-
@media (prefers-reduced-motion) {
|
|
82
|
-
.contrast-area,
|
|
83
|
-
.contrast-area-50 {
|
|
84
|
-
transition-duration: 0s;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
@tailwind utilities;
|
|
89
|
-
|
|
90
14
|
/**
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
15
|
+
* @prop --mds-input-range-thumb-size: Sets the thumb width and height of the component
|
|
16
|
+
* @prop --mds-input-range-thumb-background:
|
|
17
|
+
* @prop --mds-input-range-track-background:
|
|
18
|
+
* @prop --mds-input-range-track-size:
|
|
19
|
+
* @prop --mds-input-range-track-progress-background:
|
|
20
|
+
*/
|
|
97
21
|
|
|
98
22
|
:host {
|
|
99
23
|
|
|
100
24
|
--mds-input-range-thumb-size: 1rem;
|
|
101
|
-
--mds-input-range-thumb-background: rgb(var(--
|
|
25
|
+
--mds-input-range-thumb-background: rgb(var(--variant-primary-04));
|
|
102
26
|
--mds-input-range-thumb-shadow: 0 0 0 2px rgb(var(--tone-neutral));
|
|
103
27
|
--mds-input-range-track-background: rgb(var(--tone-neutral-09));
|
|
104
28
|
--mds-input-range-track-size: 0.5rem;
|
|
105
|
-
--mds-input-range-track-progress-background: rgb(var(--
|
|
29
|
+
--mds-input-range-track-progress-background: rgb(var(--variant-primary-03));
|
|
106
30
|
gap: 0.25rem;
|
|
107
31
|
transition-duration: 200ms;
|
|
108
32
|
|
|
@@ -187,13 +111,7 @@
|
|
|
187
111
|
}
|
|
188
112
|
|
|
189
113
|
.field::-webkit-slider-thumb {
|
|
190
|
-
-webkit-transition-property: background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;
|
|
191
|
-
transition-property: background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;
|
|
192
|
-
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
193
|
-
transition-duration: 200ms;
|
|
194
|
-
|
|
195
114
|
-webkit-appearance: none;
|
|
196
|
-
|
|
197
115
|
appearance: none;
|
|
198
116
|
background-color: var(--mds-input-range-thumb-background);
|
|
199
117
|
border: 0;
|
|
@@ -207,13 +125,7 @@
|
|
|
207
125
|
}
|
|
208
126
|
|
|
209
127
|
.field::-webkit-slider-runnable-track {
|
|
210
|
-
-webkit-transition-property: background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;
|
|
211
|
-
transition-property: background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;
|
|
212
|
-
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
213
|
-
transition-duration: 200ms;
|
|
214
|
-
|
|
215
128
|
-webkit-appearance: none;
|
|
216
|
-
|
|
217
129
|
appearance: none;
|
|
218
130
|
border: 0;
|
|
219
131
|
height: 0;
|
|
@@ -221,25 +133,25 @@
|
|
|
221
133
|
}
|
|
222
134
|
|
|
223
135
|
.track-progress {
|
|
224
|
-
transition-
|
|
136
|
+
transition-duration: 300ms;
|
|
225
137
|
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
226
|
-
transition-duration: 200ms;
|
|
227
138
|
|
|
228
139
|
background-color: var(--mds-input-range-track-progress-background);
|
|
229
140
|
display: flex;
|
|
230
141
|
height: var(--mds-input-range-track-size);
|
|
142
|
+
transition-property: background-color;
|
|
231
143
|
}
|
|
232
144
|
|
|
233
145
|
.track-total {
|
|
234
|
-
transition-
|
|
146
|
+
transition-duration: 300ms;
|
|
235
147
|
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
236
|
-
transition-duration: 200ms;
|
|
237
148
|
|
|
238
149
|
background-color: var(--mds-input-range-track-background);
|
|
239
150
|
border-radius: var(--mds-input-range-track-size);
|
|
240
151
|
display: flex;
|
|
241
152
|
height: var(--mds-input-range-track-size);
|
|
242
153
|
overflow: hidden;
|
|
154
|
+
transition-property: background-color;
|
|
243
155
|
width: 100%;
|
|
244
156
|
}
|
|
245
157
|
|
|
@@ -280,9 +192,9 @@
|
|
|
280
192
|
@container style(--magma-pref-theme: dark) {
|
|
281
193
|
:host {
|
|
282
194
|
|
|
283
|
-
--mds-input-range-thumb-background: rgb(var(--
|
|
195
|
+
--mds-input-range-thumb-background: rgb(var(--variant-primary-04));
|
|
284
196
|
--mds-input-range-track-background: rgb(var(--tone-neutral-07));
|
|
285
|
-
--mds-input-range-track-progress-background: rgb(var(--
|
|
197
|
+
--mds-input-range-track-progress-background: rgb(var(--variant-primary-05));
|
|
286
198
|
}
|
|
287
199
|
}
|
|
288
200
|
|
|
@@ -291,179 +203,13 @@
|
|
|
291
203
|
@media (prefers-color-scheme: dark) {
|
|
292
204
|
:host {
|
|
293
205
|
|
|
294
|
-
--mds-input-range-thumb-background: rgb(var(--
|
|
206
|
+
--mds-input-range-thumb-background: rgb(var(--variant-primary-04));
|
|
295
207
|
--mds-input-range-track-background: rgb(var(--tone-neutral-07));
|
|
296
|
-
--mds-input-range-track-progress-background: rgb(var(--
|
|
208
|
+
--mds-input-range-track-progress-background: rgb(var(--variant-primary-05));
|
|
297
209
|
}
|
|
298
210
|
}
|
|
299
211
|
}
|
|
300
212
|
|
|
301
|
-
.visible {
|
|
302
|
-
visibility: visible;
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
.static {
|
|
306
|
-
position: static;
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
.fixed {
|
|
310
|
-
position: fixed;
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
.absolute {
|
|
314
|
-
position: absolute;
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
.border {
|
|
318
|
-
border-width: 1px;
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
.bg-label-amaranth-10 {
|
|
322
|
-
--tw-bg-opacity: 1;
|
|
323
|
-
background-color: rgb(var(--label-amaranth-10) / var(--tw-bg-opacity));
|
|
324
|
-
}
|
|
325
|
-
|
|
326
|
-
.bg-label-aqua-10 {
|
|
327
|
-
--tw-bg-opacity: 1;
|
|
328
|
-
background-color: rgb(var(--label-aqua-10) / var(--tw-bg-opacity));
|
|
329
|
-
}
|
|
330
|
-
|
|
331
|
-
.bg-label-blue-10 {
|
|
332
|
-
--tw-bg-opacity: 1;
|
|
333
|
-
background-color: rgb(var(--label-blue-10) / var(--tw-bg-opacity));
|
|
334
|
-
}
|
|
335
|
-
|
|
336
|
-
.bg-label-green-10 {
|
|
337
|
-
--tw-bg-opacity: 1;
|
|
338
|
-
background-color: rgb(var(--label-green-10) / var(--tw-bg-opacity));
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
.bg-label-lime-10 {
|
|
342
|
-
--tw-bg-opacity: 1;
|
|
343
|
-
background-color: rgb(var(--label-lime-10) / var(--tw-bg-opacity));
|
|
344
|
-
}
|
|
345
|
-
|
|
346
|
-
.bg-label-orange-10 {
|
|
347
|
-
--tw-bg-opacity: 1;
|
|
348
|
-
background-color: rgb(var(--label-orange-10) / var(--tw-bg-opacity));
|
|
349
|
-
}
|
|
350
|
-
|
|
351
|
-
.bg-label-orchid-10 {
|
|
352
|
-
--tw-bg-opacity: 1;
|
|
353
|
-
background-color: rgb(var(--label-orchid-10) / var(--tw-bg-opacity));
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
.bg-label-violet-10 {
|
|
357
|
-
--tw-bg-opacity: 1;
|
|
358
|
-
background-color: rgb(var(--label-violet-10) / var(--tw-bg-opacity));
|
|
359
|
-
}
|
|
360
|
-
|
|
361
|
-
.bg-label-yellow-10 {
|
|
362
|
-
--tw-bg-opacity: 1;
|
|
363
|
-
background-color: rgb(var(--label-yellow-10) / var(--tw-bg-opacity));
|
|
364
|
-
}
|
|
365
|
-
|
|
366
|
-
.bg-tone-neutral-10 {
|
|
367
|
-
--tw-bg-opacity: 1;
|
|
368
|
-
background-color: rgb(var(--tone-neutral-10) / var(--tw-bg-opacity));
|
|
369
|
-
}
|
|
370
|
-
|
|
371
|
-
.fill-label-amaranth-04 {
|
|
372
|
-
fill: rgb(var(--label-amaranth-04));
|
|
373
|
-
}
|
|
374
|
-
|
|
375
|
-
.fill-label-aqua-04 {
|
|
376
|
-
fill: rgb(var(--label-aqua-04));
|
|
377
|
-
}
|
|
378
|
-
|
|
379
|
-
.fill-label-blue-04 {
|
|
380
|
-
fill: rgb(var(--label-blue-04));
|
|
381
|
-
}
|
|
382
|
-
|
|
383
|
-
.fill-label-green-04 {
|
|
384
|
-
fill: rgb(var(--label-green-04));
|
|
385
|
-
}
|
|
386
|
-
|
|
387
|
-
.fill-label-lime-04 {
|
|
388
|
-
fill: rgb(var(--label-lime-04));
|
|
389
|
-
}
|
|
390
|
-
|
|
391
|
-
.fill-label-orange-04 {
|
|
392
|
-
fill: rgb(var(--label-orange-04));
|
|
393
|
-
}
|
|
394
|
-
|
|
395
|
-
.fill-label-orchid-04 {
|
|
396
|
-
fill: rgb(var(--label-orchid-04));
|
|
397
|
-
}
|
|
398
|
-
|
|
399
|
-
.fill-label-violet-04 {
|
|
400
|
-
fill: rgb(var(--label-violet-04));
|
|
401
|
-
}
|
|
402
|
-
|
|
403
|
-
.fill-label-yellow-04 {
|
|
404
|
-
fill: rgb(var(--label-yellow-04));
|
|
405
|
-
}
|
|
406
|
-
|
|
407
|
-
.fill-tone-neutral-04 {
|
|
408
|
-
fill: rgb(var(--tone-neutral-04));
|
|
409
|
-
}
|
|
410
|
-
|
|
411
|
-
.text-label-amaranth-04 {
|
|
412
|
-
--tw-text-opacity: 1;
|
|
413
|
-
color: rgb(var(--label-amaranth-04) / var(--tw-text-opacity));
|
|
414
|
-
}
|
|
415
|
-
|
|
416
|
-
.text-label-aqua-04 {
|
|
417
|
-
--tw-text-opacity: 1;
|
|
418
|
-
color: rgb(var(--label-aqua-04) / var(--tw-text-opacity));
|
|
419
|
-
}
|
|
420
|
-
|
|
421
|
-
.text-label-blue-04 {
|
|
422
|
-
--tw-text-opacity: 1;
|
|
423
|
-
color: rgb(var(--label-blue-04) / var(--tw-text-opacity));
|
|
424
|
-
}
|
|
425
|
-
|
|
426
|
-
.text-label-green-04 {
|
|
427
|
-
--tw-text-opacity: 1;
|
|
428
|
-
color: rgb(var(--label-green-04) / var(--tw-text-opacity));
|
|
429
|
-
}
|
|
430
|
-
|
|
431
|
-
.text-label-lime-04 {
|
|
432
|
-
--tw-text-opacity: 1;
|
|
433
|
-
color: rgb(var(--label-lime-04) / var(--tw-text-opacity));
|
|
434
|
-
}
|
|
435
|
-
|
|
436
|
-
.text-label-orange-04 {
|
|
437
|
-
--tw-text-opacity: 1;
|
|
438
|
-
color: rgb(var(--label-orange-04) / var(--tw-text-opacity));
|
|
439
|
-
}
|
|
440
|
-
|
|
441
|
-
.text-label-orchid-04 {
|
|
442
|
-
--tw-text-opacity: 1;
|
|
443
|
-
color: rgb(var(--label-orchid-04) / var(--tw-text-opacity));
|
|
444
|
-
}
|
|
445
|
-
|
|
446
|
-
.text-label-violet-04 {
|
|
447
|
-
--tw-text-opacity: 1;
|
|
448
|
-
color: rgb(var(--label-violet-04) / var(--tw-text-opacity));
|
|
449
|
-
}
|
|
450
|
-
|
|
451
|
-
.text-label-yellow-04 {
|
|
452
|
-
--tw-text-opacity: 1;
|
|
453
|
-
color: rgb(var(--label-yellow-04) / var(--tw-text-opacity));
|
|
454
|
-
}
|
|
455
|
-
|
|
456
|
-
.text-tone-neutral-04 {
|
|
457
|
-
--tw-text-opacity: 1;
|
|
458
|
-
color: rgb(var(--tone-neutral-04) / var(--tw-text-opacity));
|
|
459
|
-
}
|
|
460
|
-
|
|
461
|
-
.shadow {
|
|
462
|
-
--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
|
|
463
|
-
--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);
|
|
464
|
-
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
|
|
465
|
-
}
|
|
466
|
-
|
|
467
213
|
@container style(--magma-pref-contrast: more) {
|
|
468
214
|
:host {
|
|
469
215
|
color: rgb(var(--tone-neutral-01));
|
|
@@ -46,13 +46,14 @@ export class MdsInputRange {
|
|
|
46
46
|
this.calculateProgress();
|
|
47
47
|
}
|
|
48
48
|
componentDidLoad() {
|
|
49
|
-
var _a;
|
|
50
|
-
this.
|
|
49
|
+
var _a, _b;
|
|
50
|
+
this.label = (_a = this.element.textContent) !== null && _a !== void 0 ? _a : '';
|
|
51
|
+
this.inputElement = (_b = this.element.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector('.field');
|
|
51
52
|
this.value = parseInt(this.inputElement.value);
|
|
52
53
|
this.calculateProgress();
|
|
53
54
|
}
|
|
54
55
|
render() {
|
|
55
|
-
return (h(Host, { key: '
|
|
56
|
+
return (h(Host, { key: '4f58f56b2bf1af905741bbcab323e583dd907a35' }, h("header", { key: '69a2e6c483558f0ce70eca8e1ec45f4ce7f63b10', class: "header", part: "header" }, h("mds-text", { key: '1d5f89b89f5bdf1ca6746567eb23d2b96444c2d9', class: "label", typography: "label" }, h("slot", { key: '534eb663ff412980069c4308a2a15a784e2bf1cf' })), h("mds-text", { key: 'e187c33fb9124f1d20032c822b535d0ddc839fe3', class: "value", typography: "label" }, this.value)), h("div", { key: 'fb3245af7eefbab656b68810577d77a328e312c5', class: "range" }, h("div", { key: 'f146b8b59fbd5bbb3db2350d94686fad986b4dfc', class: "track" }, h("div", { key: '04aaec03384f51e3ad2ad8cc695274c36062d6bf', class: "contrast-area" }), h("div", { key: '2de981fb668e8056a24ca82163dca106fcc5878e', class: "track-total" }, h("div", { key: '2044a5ce25454e56d950c2c7f68ce11369babd87', class: "track-progress", style: { width: `${this.progress}%` } }))), h("input", { key: '423eb3d5b176748d0376374888c7ef3298dc54d9', class: "field", "aria-label": this.label, max: this.max, min: this.min, onInput: this.onInput, step: this.step, type: "range", value: this.value }))));
|
|
56
57
|
}
|
|
57
58
|
static get is() { return "mds-input-range"; }
|
|
58
59
|
static get encapsulation() { return "shadow"; }
|
|
@@ -3,19 +3,19 @@ export default {
|
|
|
3
3
|
title: 'Form / Range',
|
|
4
4
|
argTypes: {
|
|
5
5
|
min: {
|
|
6
|
-
type: { name: 'number'
|
|
6
|
+
type: { name: 'number' },
|
|
7
7
|
description: 'The lowest value in the range of permitted values',
|
|
8
8
|
},
|
|
9
9
|
max: {
|
|
10
|
-
type: { name: 'number'
|
|
10
|
+
type: { name: 'number' },
|
|
11
11
|
description: 'The greatest value in the range of permitted values',
|
|
12
12
|
},
|
|
13
13
|
step: {
|
|
14
|
-
type: { name: 'number'
|
|
14
|
+
type: { name: 'number' },
|
|
15
15
|
description: 'The step attribute is a number that specifies the granularity that the value must adhere to, or the special value any, which is described below',
|
|
16
16
|
},
|
|
17
17
|
value: {
|
|
18
|
-
type: { name: 'number'
|
|
18
|
+
type: { name: 'number' },
|
|
19
19
|
description: 'The value attribute contains a number which contains a representation of the selected number',
|
|
20
20
|
},
|
|
21
21
|
},
|