@maggioli-design-system/mds-input-range 2.0.1 → 2.1.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-f984e289.js → index-52e46581.js} +4 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/mds-input-range.cjs.entry.js +18 -3
- package/dist/cjs/mds-input-range.cjs.js +2 -2
- package/dist/collection/common/slot.js +13 -0
- package/dist/collection/components/mds-input-range/mds-input-range.css +22 -2
- package/dist/collection/components/mds-input-range/mds-input-range.js +35 -1
- package/dist/collection/components/mds-input-range/test/mds-input-range.stories.js +8 -0
- package/dist/collection/dictionary/animation.js +5 -0
- package/dist/collection/dictionary/file-extensions.js +6 -59
- package/dist/collection/fixtures/filenames.js +62 -1
- package/dist/collection/type/animation.js +1 -0
- package/dist/collection/type/variant-file-format.js +5 -0
- package/dist/components/mds-input-range.js +19 -2
- package/dist/documentation.json +25 -1
- package/dist/esm/{index-e0ac0a55.js → index-36162582.js} +4 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/mds-input-range.entry.js +18 -3
- package/dist/esm/mds-input-range.js +3 -3
- package/dist/esm-es5/index-36162582.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-939e9c32.system.js +1 -0
- package/dist/mds-input-range/p-c39460f4.system.js +2 -0
- package/dist/mds-input-range/{p-f6cc8c2e.js → p-d06a229e.js} +1 -1
- package/dist/mds-input-range/p-d9e1b94c.system.entry.js +1 -0
- package/dist/mds-input-range/p-e5a76261.entry.js +1 -0
- package/dist/stats.json +81 -32
- package/dist/types/common/slot.d.ts +2 -0
- package/dist/types/components/mds-input-range/mds-input-range.d.ts +6 -0
- package/dist/types/components/mds-input-range/test/mds-input-range.stories.d.ts +7 -0
- package/dist/types/components.d.ts +8 -0
- package/dist/types/dictionary/animation.d.ts +2 -0
- package/dist/types/fixtures/filenames.d.ts +62 -1
- package/dist/types/type/animation.d.ts +1 -0
- package/dist/types/type/file-types.d.ts +1 -1
- package/dist/types/type/variant-file-format.d.ts +1 -1
- package/documentation.json +41 -7
- package/package.json +1 -1
- package/readme.md +7 -6
- package/src/common/slot.ts +15 -0
- package/src/components/mds-input-range/css/mds-input-range-disabled.css +9 -0
- package/src/components/mds-input-range/mds-input-range.css +12 -2
- package/src/components/mds-input-range/mds-input-range.tsx +23 -0
- package/src/components/mds-input-range/readme.md +7 -6
- package/src/components/mds-input-range/test/mds-input-range.stories.tsx +9 -0
- package/src/components.d.ts +8 -0
- package/src/dictionary/animation.ts +8 -0
- package/src/dictionary/file-extensions.ts +6 -60
- package/src/fixtures/filenames.ts +63 -0
- package/src/fixtures/icons.json +1 -0
- package/src/meta/file-format/locale.el.json +26 -21
- package/src/meta/file-format/locale.en.json +26 -21
- package/src/meta/file-format/locale.es.json +26 -21
- package/src/meta/file-format/locale.it.json +26 -21
- package/src/type/animation.ts +3 -0
- package/src/type/file-types.ts +6 -0
- package/src/type/variant-file-format.ts +6 -0
- package/www/build/mds-input-range.esm.js +1 -1
- package/www/build/mds-input-range.js +1 -1
- package/www/build/p-939e9c32.system.js +1 -0
- package/www/build/p-c39460f4.system.js +2 -0
- package/www/build/{p-f6cc8c2e.js → p-d06a229e.js} +1 -1
- package/www/build/p-d9e1b94c.system.entry.js +1 -0
- package/www/build/p-e5a76261.entry.js +1 -0
- package/dist/esm-es5/index-e0ac0a55.js +0 -1
- package/dist/mds-input-range/p-48fdc5db.system.entry.js +0 -1
- package/dist/mds-input-range/p-4e0b934e.system.js +0 -2
- package/dist/mds-input-range/p-76412b19.system.js +0 -1
- package/dist/mds-input-range/p-d697edb0.entry.js +0 -1
- package/www/build/p-48fdc5db.system.entry.js +0 -1
- package/www/build/p-4e0b934e.system.js +0 -2
- package/www/build/p-76412b19.system.js +0 -1
- package/www/build/p-d697edb0.entry.js +0 -1
|
@@ -21,7 +21,7 @@ function _interopNamespace(e) {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
const NAMESPACE = 'mds-input-range';
|
|
24
|
-
const BUILD = /* mds-input-range */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: false, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: false, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: true, hasRenderFn: true, hostListener: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: true, hydratedClass: false, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean:
|
|
24
|
+
const BUILD = /* mds-input-range */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: false, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: false, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: true, hasRenderFn: true, hostListener: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: true, hydratedClass: false, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: true, propNumber: true, propString: false, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: true, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: false, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: false, watchCallback: true };
|
|
25
25
|
|
|
26
26
|
/*
|
|
27
27
|
Stencil Client Platform v4.22.2 | MIT Licensed | https://stenciljs.com
|
|
@@ -301,6 +301,9 @@ var Host = {};
|
|
|
301
301
|
var isHost = (node) => node && node.$tag$ === Host;
|
|
302
302
|
var parsePropertyValue = (propValue, propType) => {
|
|
303
303
|
if (propValue != null && !isComplexType(propValue)) {
|
|
304
|
+
if (propType & 4 /* Boolean */) {
|
|
305
|
+
return propValue === "false" ? false : propValue === "" || !!propValue;
|
|
306
|
+
}
|
|
304
307
|
if (propType & 2 /* Number */) {
|
|
305
308
|
return parseFloat(propValue);
|
|
306
309
|
}
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-52e46581.js');
|
|
6
6
|
const appGlobals = require('./app-globals-3a1e7e63.js');
|
|
7
7
|
|
|
8
8
|
const defineCustomElements = async (win, options) => {
|
|
9
9
|
if (typeof window === 'undefined') return undefined;
|
|
10
10
|
await appGlobals.globalScripts();
|
|
11
|
-
return index.bootstrapLazy([["mds-input-range.cjs",[[65,"mds-input-range",{"max":[2],"min":[2],"step":[2],"value":[1538],"progress":[32]},null,{"value":["valueChanged"],"min":["minChanged"],"max":["maxChanged"],"step":["stepChanged"]}]]]], options);
|
|
11
|
+
return index.bootstrapLazy([["mds-input-range.cjs",[[65,"mds-input-range",{"max":[2],"min":[2],"step":[2],"disabled":[1540],"value":[1538],"progress":[32]},null,{"disabled":["disabledChanged"],"value":["valueChanged"],"min":["minChanged"],"max":["maxChanged"],"step":["stepChanged"]}]]]], options);
|
|
12
12
|
};
|
|
13
13
|
|
|
14
14
|
exports.setNonce = index.setNonce;
|
|
@@ -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-52e46581.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-
|
|
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";
|
|
8
8
|
const MdsInputRangeStyle0 = mdsInputRangeCss;
|
|
9
9
|
|
|
10
10
|
const MdsInputRange = class {
|
|
@@ -26,6 +26,7 @@ const MdsInputRange = class {
|
|
|
26
26
|
this.max = 100;
|
|
27
27
|
this.min = 0;
|
|
28
28
|
this.step = 1;
|
|
29
|
+
this.disabled = undefined;
|
|
29
30
|
this.value = undefined;
|
|
30
31
|
}
|
|
31
32
|
calculateProgress() {
|
|
@@ -43,6 +44,16 @@ const MdsInputRange = class {
|
|
|
43
44
|
const current = this.value - this.min;
|
|
44
45
|
this.progress = current * 100 / total;
|
|
45
46
|
}
|
|
47
|
+
disabledChanged(newValue) {
|
|
48
|
+
/**
|
|
49
|
+
* This is related to ALL disabled attributes set on Magma input components
|
|
50
|
+
* if solved, please check mds-button, mds-input, mds-input-*
|
|
51
|
+
* https://github.com/ionic-team/stencil/issues/5461
|
|
52
|
+
*/
|
|
53
|
+
if (newValue) {
|
|
54
|
+
this.internals.setFormValue(null);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
46
57
|
valueChanged() {
|
|
47
58
|
this.inputElement.value = this.value.toString();
|
|
48
59
|
this.calculateProgress();
|
|
@@ -59,6 +70,9 @@ const MdsInputRange = class {
|
|
|
59
70
|
throw Error('step cant be negative or zero');
|
|
60
71
|
this.calculateProgress();
|
|
61
72
|
}
|
|
73
|
+
formResetCallback() {
|
|
74
|
+
this.internals.setFormValue('');
|
|
75
|
+
}
|
|
62
76
|
componentDidLoad() {
|
|
63
77
|
var _a, _b;
|
|
64
78
|
this.label = (_a = this.element.textContent) !== null && _a !== void 0 ? _a : '';
|
|
@@ -67,11 +81,12 @@ const MdsInputRange = class {
|
|
|
67
81
|
this.calculateProgress();
|
|
68
82
|
}
|
|
69
83
|
render() {
|
|
70
|
-
return (index.h(index.Host, { key: '
|
|
84
|
+
return (index.h(index.Host, { key: 'e1cf60063d451ad99e6e4943412119634a261dc6' }, index.h("header", { key: '786ee56712c0d48fce3b0107bf44e1a4e39a5cb2', class: "header", part: "header" }, index.h("mds-text", { key: 'b51d53ca91e1a39431b851dcefdbda983ae59a60', class: "label", typography: "label" }, index.h("slot", { key: '1e8a604c35454992794958088051f5074504a3cf' })), index.h("mds-text", { key: '64cdd428f13f52a6964ab55527707a74ef98d560', class: "value", typography: "label" }, this.value)), index.h("div", { key: '00f8ad9cd7bdaff91a766d7c8e50a5ad65b4983a', class: "range" }, index.h("div", { key: '64e70fc8df3951015535b0e0bee0177089c9c399', class: "track" }, index.h("div", { key: '255824ff26075a8da7e176f03e8a2e99d8e754e5', class: "contrast-area" }), index.h("div", { key: 'a5d3f15b29af3c95dcdaffe05ba3d9481bfafce2', class: "track-total" }, index.h("div", { key: 'f50dff46578030bc9ecd83d56dec99b4a099f0b5', class: "track-progress", style: { width: `${this.progress}%` } }))), index.h("input", { key: '34ba926affc23fb845c421c7813ec05f7ce03f5f', class: "field", "aria-label": this.label, disabled: this.disabled, max: this.max, min: this.min, onInput: this.onInput, step: this.step, type: "range", value: this.value }))));
|
|
71
85
|
}
|
|
72
86
|
static get formAssociated() { return true; }
|
|
73
87
|
get element() { return index.getElement(this); }
|
|
74
88
|
static get watchers() { return {
|
|
89
|
+
"disabled": ["disabledChanged"],
|
|
75
90
|
"value": ["valueChanged"],
|
|
76
91
|
"min": ["minChanged"],
|
|
77
92
|
"max": ["maxChanged"],
|
|
@@ -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-52e46581.js');
|
|
6
6
|
const appGlobals = require('./app-globals-3a1e7e63.js');
|
|
7
7
|
|
|
8
8
|
/*
|
|
@@ -19,7 +19,7 @@ var patchBrowser = () => {
|
|
|
19
19
|
|
|
20
20
|
patchBrowser().then(async (options) => {
|
|
21
21
|
await appGlobals.globalScripts();
|
|
22
|
-
return index.bootstrapLazy([["mds-input-range.cjs",[[65,"mds-input-range",{"max":[2],"min":[2],"step":[2],"value":[1538],"progress":[32]},null,{"value":["valueChanged"],"min":["minChanged"],"max":["maxChanged"],"step":["stepChanged"]}]]]], options);
|
|
22
|
+
return index.bootstrapLazy([["mds-input-range.cjs",[[65,"mds-input-range",{"max":[2],"min":[2],"step":[2],"disabled":[1540],"value":[1538],"progress":[32]},null,{"disabled":["disabledChanged"],"value":["valueChanged"],"min":["minChanged"],"max":["maxChanged"],"step":["stepChanged"]}]]]], options);
|
|
23
23
|
});
|
|
24
24
|
|
|
25
25
|
exports.setNonce = index.setNonce;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const hasSlottedElements = (el, name) => {
|
|
2
|
+
var _a;
|
|
3
|
+
let query = 'slot';
|
|
4
|
+
if (name) {
|
|
5
|
+
query = `slot[name=${name}]`;
|
|
6
|
+
}
|
|
7
|
+
const slot = (_a = el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(query);
|
|
8
|
+
if (slot) {
|
|
9
|
+
return slot.assignedNodes().length > 0;
|
|
10
|
+
}
|
|
11
|
+
return false;
|
|
12
|
+
};
|
|
13
|
+
export { hasSlottedElements, };
|
|
@@ -24,11 +24,15 @@
|
|
|
24
24
|
--mds-input-range-thumb-size: 1rem;
|
|
25
25
|
--mds-input-range-thumb-background: rgb(var(--variant-primary-04));
|
|
26
26
|
--mds-input-range-thumb-shadow: 0 0 0 2px rgb(var(--tone-neutral));
|
|
27
|
-
--mds-input-range-track-background: rgb(var(--tone-neutral-
|
|
27
|
+
--mds-input-range-track-background: rgb(var(--tone-neutral-08));
|
|
28
28
|
--mds-input-range-track-size: 0.5rem;
|
|
29
29
|
--mds-input-range-track-progress-background: rgb(var(--variant-primary-03));
|
|
30
|
+
--mds-input-range-thumb-background-disabled: rgb(var(--tone-neutral-06));
|
|
31
|
+
--mds-input-range-track-background-disabled: rgb(var(--tone-neutral-08));
|
|
32
|
+
--mds-input-range-track-progress-background-disabled: rgb(var(--tone-neutral-06));
|
|
30
33
|
gap: 0.25rem;
|
|
31
|
-
transition-duration:
|
|
34
|
+
transition-duration: 300ms;
|
|
35
|
+
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
32
36
|
|
|
33
37
|
display: grid;
|
|
34
38
|
transition-property: color;
|
|
@@ -111,7 +115,11 @@
|
|
|
111
115
|
}
|
|
112
116
|
|
|
113
117
|
.field::-webkit-slider-thumb {
|
|
118
|
+
transition-duration: 300ms;
|
|
119
|
+
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
120
|
+
|
|
114
121
|
-webkit-appearance: none;
|
|
122
|
+
|
|
115
123
|
appearance: none;
|
|
116
124
|
background-color: var(--mds-input-range-thumb-background);
|
|
117
125
|
border: 0;
|
|
@@ -121,6 +129,8 @@
|
|
|
121
129
|
height: var(--mds-input-range-thumb-size);
|
|
122
130
|
line-height: 0;
|
|
123
131
|
transform: translate(0, -50%);
|
|
132
|
+
-webkit-transition-property: background-color, box-shadow;
|
|
133
|
+
transition-property: background-color, box-shadow;
|
|
124
134
|
width: var(--mds-input-range-thumb-size);
|
|
125
135
|
}
|
|
126
136
|
|
|
@@ -162,6 +172,16 @@
|
|
|
162
172
|
border-radius: var(--mds-input-range-track-size);
|
|
163
173
|
}
|
|
164
174
|
|
|
175
|
+
:host([disabled]:not([disabled="false"])) {
|
|
176
|
+
--mds-input-range-thumb-background: var(--mds-input-range-thumb-background-disabled);
|
|
177
|
+
--mds-input-range-track-background: var(--mds-input-range-track-background-disabled);
|
|
178
|
+
--mds-input-range-track-progress-background: var(--mds-input-range-track-progress-background-disabled);
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
:host([disabled]:not([disabled="false"])) .field::-webkit-slider-thumb {
|
|
182
|
+
cursor: not-allowed;
|
|
183
|
+
}
|
|
184
|
+
|
|
165
185
|
@tailwind utilities;
|
|
166
186
|
|
|
167
187
|
@container style(--magma-pref-animation: reduce) {
|
|
@@ -12,6 +12,7 @@ export class MdsInputRange {
|
|
|
12
12
|
this.max = 100;
|
|
13
13
|
this.min = 0;
|
|
14
14
|
this.step = 1;
|
|
15
|
+
this.disabled = undefined;
|
|
15
16
|
this.value = undefined;
|
|
16
17
|
}
|
|
17
18
|
calculateProgress() {
|
|
@@ -29,6 +30,16 @@ export class MdsInputRange {
|
|
|
29
30
|
const current = this.value - this.min;
|
|
30
31
|
this.progress = current * 100 / total;
|
|
31
32
|
}
|
|
33
|
+
disabledChanged(newValue) {
|
|
34
|
+
/**
|
|
35
|
+
* This is related to ALL disabled attributes set on Magma input components
|
|
36
|
+
* if solved, please check mds-button, mds-input, mds-input-*
|
|
37
|
+
* https://github.com/ionic-team/stencil/issues/5461
|
|
38
|
+
*/
|
|
39
|
+
if (newValue) {
|
|
40
|
+
this.internals.setFormValue(null);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
32
43
|
valueChanged() {
|
|
33
44
|
this.inputElement.value = this.value.toString();
|
|
34
45
|
this.calculateProgress();
|
|
@@ -45,6 +56,9 @@ export class MdsInputRange {
|
|
|
45
56
|
throw Error('step cant be negative or zero');
|
|
46
57
|
this.calculateProgress();
|
|
47
58
|
}
|
|
59
|
+
formResetCallback() {
|
|
60
|
+
this.internals.setFormValue('');
|
|
61
|
+
}
|
|
48
62
|
componentDidLoad() {
|
|
49
63
|
var _a, _b;
|
|
50
64
|
this.label = (_a = this.element.textContent) !== null && _a !== void 0 ? _a : '';
|
|
@@ -53,7 +67,7 @@ export class MdsInputRange {
|
|
|
53
67
|
this.calculateProgress();
|
|
54
68
|
}
|
|
55
69
|
render() {
|
|
56
|
-
return (h(Host, { key: '
|
|
70
|
+
return (h(Host, { key: 'e1cf60063d451ad99e6e4943412119634a261dc6' }, h("header", { key: '786ee56712c0d48fce3b0107bf44e1a4e39a5cb2', class: "header", part: "header" }, h("mds-text", { key: 'b51d53ca91e1a39431b851dcefdbda983ae59a60', class: "label", typography: "label" }, h("slot", { key: '1e8a604c35454992794958088051f5074504a3cf' })), h("mds-text", { key: '64cdd428f13f52a6964ab55527707a74ef98d560', class: "value", typography: "label" }, this.value)), h("div", { key: '00f8ad9cd7bdaff91a766d7c8e50a5ad65b4983a', class: "range" }, h("div", { key: '64e70fc8df3951015535b0e0bee0177089c9c399', class: "track" }, h("div", { key: '255824ff26075a8da7e176f03e8a2e99d8e754e5', class: "contrast-area" }), h("div", { key: 'a5d3f15b29af3c95dcdaffe05ba3d9481bfafce2', class: "track-total" }, h("div", { key: 'f50dff46578030bc9ecd83d56dec99b4a099f0b5', class: "track-progress", style: { width: `${this.progress}%` } }))), h("input", { key: '34ba926affc23fb845c421c7813ec05f7ce03f5f', class: "field", "aria-label": this.label, disabled: this.disabled, max: this.max, min: this.min, onInput: this.onInput, step: this.step, type: "range", value: this.value }))));
|
|
57
71
|
}
|
|
58
72
|
static get is() { return "mds-input-range"; }
|
|
59
73
|
static get encapsulation() { return "shadow"; }
|
|
@@ -124,6 +138,23 @@ export class MdsInputRange {
|
|
|
124
138
|
"reflect": false,
|
|
125
139
|
"defaultValue": "1"
|
|
126
140
|
},
|
|
141
|
+
"disabled": {
|
|
142
|
+
"type": "boolean",
|
|
143
|
+
"mutable": true,
|
|
144
|
+
"complexType": {
|
|
145
|
+
"original": "boolean",
|
|
146
|
+
"resolved": "boolean | undefined",
|
|
147
|
+
"references": {}
|
|
148
|
+
},
|
|
149
|
+
"required": false,
|
|
150
|
+
"optional": true,
|
|
151
|
+
"docs": {
|
|
152
|
+
"tags": [],
|
|
153
|
+
"text": "Sets if the component is disabled"
|
|
154
|
+
},
|
|
155
|
+
"attribute": "disabled",
|
|
156
|
+
"reflect": true
|
|
157
|
+
},
|
|
127
158
|
"value": {
|
|
128
159
|
"type": "number",
|
|
129
160
|
"mutable": true,
|
|
@@ -169,6 +200,9 @@ export class MdsInputRange {
|
|
|
169
200
|
static get elementRef() { return "element"; }
|
|
170
201
|
static get watchers() {
|
|
171
202
|
return [{
|
|
203
|
+
"propName": "disabled",
|
|
204
|
+
"methodName": "disabledChanged"
|
|
205
|
+
}, {
|
|
172
206
|
"propName": "value",
|
|
173
207
|
"methodName": "valueChanged"
|
|
174
208
|
}, {
|
|
@@ -2,6 +2,10 @@ import { h } from "@stencil/core";
|
|
|
2
2
|
export default {
|
|
3
3
|
title: 'Form / Range',
|
|
4
4
|
argTypes: {
|
|
5
|
+
disabled: {
|
|
6
|
+
type: { name: 'boolean' },
|
|
7
|
+
description: 'Sets if the component is disabled',
|
|
8
|
+
},
|
|
5
9
|
min: {
|
|
6
10
|
type: { name: 'number' },
|
|
7
11
|
description: 'The lowest value in the range of permitted values',
|
|
@@ -28,6 +32,10 @@ const hideHeaderCss = `
|
|
|
28
32
|
`;
|
|
29
33
|
const HideHeaderTemplate = args => h("div", null, h("style", null, hideHeaderCss), h("mds-input-range", Object.assign({}, args), "This shouldn't be visible"));
|
|
30
34
|
export const Default = Template.bind({});
|
|
35
|
+
export const Disabled = Template.bind({});
|
|
36
|
+
Disabled.args = {
|
|
37
|
+
disabled: true,
|
|
38
|
+
};
|
|
31
39
|
export const Min = Template.bind({});
|
|
32
40
|
Min.args = {
|
|
33
41
|
min: -100,
|
|
@@ -14,8 +14,8 @@ const fileExtensionsDictionary = {
|
|
|
14
14
|
exe: { format: 'executable', description: 'fileEXE' },
|
|
15
15
|
flac: { format: 'audio', description: 'uncompressedAudio' },
|
|
16
16
|
gif: { format: 'image', description: 'compressedImage', preview: true },
|
|
17
|
-
htm: { format: 'markup', description: 'documentWeb' },
|
|
18
17
|
heic: { format: 'image', description: 'imageHEFF' },
|
|
18
|
+
htm: { format: 'markup', description: 'documentWeb' },
|
|
19
19
|
html: { format: 'markup', description: 'documentWeb' },
|
|
20
20
|
jpe: { format: 'image', description: 'compressedImage', preview: true },
|
|
21
21
|
jpeg: { format: 'image', description: 'compressedImage', preview: true },
|
|
@@ -32,9 +32,12 @@ const fileExtensionsDictionary = {
|
|
|
32
32
|
mpg4: { format: 'video', description: 'videoSD' },
|
|
33
33
|
mpg: { format: 'video', description: 'videoSD' },
|
|
34
34
|
mpga: { format: 'audio', description: 'compressedAudio' },
|
|
35
|
+
odf: { format: 'document', description: 'openDocumentFormat' },
|
|
35
36
|
odp: { format: 'slide', description: 'slideLO' },
|
|
36
37
|
ods: { format: 'spreadsheet', description: 'spreadsheetLO' },
|
|
37
38
|
odt: { format: 'text', description: 'documentLO' },
|
|
39
|
+
ole: { format: 'document', description: 'objectLinkingAndEmbedding' },
|
|
40
|
+
p7m: { format: 'certificate', description: 'documentDigitalSingnature' },
|
|
38
41
|
pdf: { format: 'document', description: 'documentAdobe' },
|
|
39
42
|
php: { format: 'code', description: 'filePHP' },
|
|
40
43
|
png: { format: 'image', description: 'imagePNG', preview: true },
|
|
@@ -47,6 +50,7 @@ const fileExtensionsDictionary = {
|
|
|
47
50
|
tar: { format: 'archive', description: 'uncompressedArchive' },
|
|
48
51
|
tiff: { format: 'image', description: 'imageTIFF' },
|
|
49
52
|
ts: { format: 'code', description: 'fileTS' },
|
|
53
|
+
tsd: { format: 'certificate', description: 'certificateTSD' },
|
|
50
54
|
tsx: { format: 'code', description: 'fileTSX' },
|
|
51
55
|
txt: { format: 'text', description: 'documentTXT' },
|
|
52
56
|
wav: { format: 'audio', description: 'uncompressedAudio' },
|
|
@@ -54,66 +58,9 @@ const fileExtensionsDictionary = {
|
|
|
54
58
|
xar: { format: 'archive', description: 'compressedArchive' },
|
|
55
59
|
xls: { format: 'spreadsheet', description: 'spreadsheetMS' },
|
|
56
60
|
xlsx: { format: 'spreadsheet', description: 'spreadsheetMS' },
|
|
61
|
+
xml: { format: 'markup', description: 'extensibleMarkupLanguage' },
|
|
57
62
|
zip: { format: 'archive', description: 'compressedArchive' },
|
|
58
63
|
};
|
|
59
|
-
// const fileExtensionsDictionary: FileExtenstion = {
|
|
60
|
-
// '7z': { format: 'archive', description: 'Archivio compresso' },
|
|
61
|
-
// ace: { format: 'archive', description: 'Archivio compresso' },
|
|
62
|
-
// ai: { format: 'vector', description: 'Vettoriale Adobe Illustrator' },
|
|
63
|
-
// dart: { format: 'code', description: 'Dart' },
|
|
64
|
-
// db: { format: 'data', description: 'File di database' },
|
|
65
|
-
// default: { format: 'attachment', description: 'Formato sconosciuto' },
|
|
66
|
-
// dmg: { format: 'executable', description: 'Apple Disk Image' },
|
|
67
|
-
// doc: { format: 'text', description: 'Documento Microsoft Word' },
|
|
68
|
-
// docm: { format: 'text', description: 'Documento Microsoft Word' },
|
|
69
|
-
// docx: { format: 'text', description: 'Documento Microsoft Word Compresso' },
|
|
70
|
-
// eml: { format: 'email', description: 'E-mail di posta elettronica' },
|
|
71
|
-
// eps: { format: 'vector', description: 'Vettoriale Corel Draw' },
|
|
72
|
-
// exe: { format: 'executable', description: 'File eseguibile Windows' },
|
|
73
|
-
// flac: { format: 'audio', description: 'Audio non compresso' },
|
|
74
|
-
// gif: { format: 'image', description: 'Immagine compressa', preview: true },
|
|
75
|
-
// htm: { format: 'markup', description: 'Pagina web' },
|
|
76
|
-
// heic: { format: 'image', description: 'High Efficiency Image File Format' },
|
|
77
|
-
// html: { format: 'markup', description: 'Pagina web' },
|
|
78
|
-
// jpe: { format: 'image', description: 'Immagine compressa', preview: true },
|
|
79
|
-
// jpeg: { format: 'image', description: 'Immagine compressa', preview: true },
|
|
80
|
-
// jpg: { format: 'image', description: 'Immagine compressa', preview: true },
|
|
81
|
-
// js: { format: 'code', description: 'JavaScript' },
|
|
82
|
-
// json: { format: 'data', description: 'JavaScript Object Notation' },
|
|
83
|
-
// jsx: { format: 'code', description: 'JavaScript' },
|
|
84
|
-
// m2v: { format: 'video', description: 'Filmato SD' },
|
|
85
|
-
// mp2: { format: 'audio', description: 'Audio compresso' },
|
|
86
|
-
// mp3: { format: 'audio', description: 'Audio compresso' },
|
|
87
|
-
// mp4: { format: 'video', description: 'Filmato HD' },
|
|
88
|
-
// mp4v: { format: 'video', description: 'Filmato HD' },
|
|
89
|
-
// mpeg: { format: 'video', description: 'Filmato SD' },
|
|
90
|
-
// mpg4: { format: 'video', description: 'Filmato SD' },
|
|
91
|
-
// mpg: { format: 'video', description: 'Filmato SD' },
|
|
92
|
-
// mpga: { format: 'audio', description: 'Audio compresso' },
|
|
93
|
-
// odp: { format: 'slide', description: 'Slide di presentazione LibreOffice' },
|
|
94
|
-
// ods: { format: 'spreadsheet', description: 'Foglio di calcolo LibreOffice' },
|
|
95
|
-
// odt: { format: 'text', description: 'File di testo LibreOffice' },
|
|
96
|
-
// pdf: { format: 'document', description: 'Documento Adobe' },
|
|
97
|
-
// php: { format: 'code', description: 'Hypertext Preprocessor' },
|
|
98
|
-
// png: { format: 'image', description: 'Immagine Portable Network Graphics', preview: true },
|
|
99
|
-
// ppt: { format: 'slide', description: 'Slide di presentazione PowerPoint' },
|
|
100
|
-
// rar: { format: 'archive', description: 'Archivio compresso' },
|
|
101
|
-
// rtf: { format: 'text', description: 'Documento di testo Rich Text Format' },
|
|
102
|
-
// sass: { format: 'code', description: 'Syntactically Awesome StyleSheets' },
|
|
103
|
-
// shtml: { format: 'markup', description: 'Pagina web' },
|
|
104
|
-
// svg: { format: 'vector', description: 'Scalable Vector Graphics', preview: true },
|
|
105
|
-
// tar: { format: 'archive', description: 'Archivio non compresso' },
|
|
106
|
-
// tiff: { format: 'image', description: 'Tag Image File Format' },
|
|
107
|
-
// ts: { format: 'code', description: 'TypeScript' },
|
|
108
|
-
// tsx: { format: 'code', description: 'TypeScript Extended Syntax' },
|
|
109
|
-
// txt: { format: 'text', description: 'Documento di testo non formattato' },
|
|
110
|
-
// wav: { format: 'audio', description: 'Audio non compresso' },
|
|
111
|
-
// webp: { format: 'image', description: 'Immagine Web Picture', preview: true },
|
|
112
|
-
// xar: { format: 'archive', description: 'Archivio compresso' },
|
|
113
|
-
// xls: { format: 'spreadsheet', description: 'Foglio di calcolo Office' },
|
|
114
|
-
// xlsx: { format: 'spreadsheet', description: 'Foglio di calcolo Office' },
|
|
115
|
-
// zip: { format: 'archive', description: 'Archivio compresso' },
|
|
116
|
-
// }
|
|
117
64
|
const genericMimeToExt = new Map([
|
|
118
65
|
['image', ['.png', '.jpg', '.jpeg', '.tiff', '.webp', '.jpe', '.gif', '.heic']],
|
|
119
66
|
['audio', ['.mp2', '.mp3', '.mpga', '.wav', '.flac']],
|
|
@@ -54,4 +54,65 @@ const filesList = [
|
|
|
54
54
|
'wisconsin_bypassing_small.xar',
|
|
55
55
|
'wooden.jsx',
|
|
56
56
|
];
|
|
57
|
-
|
|
57
|
+
const namedFilesList = {
|
|
58
|
+
'7z': 'frozen_haptic.7z',
|
|
59
|
+
'No extension file': 'this_is_an_extensionless_file',
|
|
60
|
+
'png with URL': 'https://i2.wp.com/clipart.info/images/ccovers/1495750818Apple-PNG-Clip-Art.png',
|
|
61
|
+
ace: 'sky_marketing.ace',
|
|
62
|
+
ai: 'foreground_overriding.ai',
|
|
63
|
+
db: 'matrix_black_hat.db',
|
|
64
|
+
default: 'copying.default',
|
|
65
|
+
dmg: 'protocol_designer.dmg',
|
|
66
|
+
doc: 'forges.doc',
|
|
67
|
+
docm: 'officer_somalia.docm',
|
|
68
|
+
docx: 'upgradable_gold.docx',
|
|
69
|
+
eml: 'brunei_logistical.eml',
|
|
70
|
+
eps: 'alarm_circuit_plastic.eps',
|
|
71
|
+
exe: 'rss_systematic_avon.exe',
|
|
72
|
+
flac: 'liaison_panel_central.flac',
|
|
73
|
+
gif: 'initiatives_group.gif',
|
|
74
|
+
htm: 'books_monetize_arizona.htm',
|
|
75
|
+
html: 'flexibility_auto_money.html',
|
|
76
|
+
jpe: 'intelligent_radical.jpe',
|
|
77
|
+
jpeg: 'iowa_installation.jpeg',
|
|
78
|
+
jpg: 'buckinghamshire_macao.jpg',
|
|
79
|
+
js: 'monitor.js',
|
|
80
|
+
json: 'calculating.json',
|
|
81
|
+
jsx: 'wooden.jsx',
|
|
82
|
+
m2v: 'interface_bedfordshire_solid.m2v',
|
|
83
|
+
mp2: 'explicit.mp2',
|
|
84
|
+
mp3: 'optimization_radical.mp3',
|
|
85
|
+
mp4: 'nebraska.mp4',
|
|
86
|
+
mp4v: 'reduced_regional_greenland.mp4v',
|
|
87
|
+
mpeg: 'impactful_alarm_handmade.mpeg',
|
|
88
|
+
mpg4: 'revolutionize.mpg4',
|
|
89
|
+
mpg: 'complexity_deposit.mpg',
|
|
90
|
+
mpga: 'ports_copy_granite.mpga',
|
|
91
|
+
odf: 'This is a file_to_read.odf',
|
|
92
|
+
odp: 'needs_based_solid.odp',
|
|
93
|
+
ods: 'compressing_black_colorado.ods',
|
|
94
|
+
odt: 'salad_compressing.odt',
|
|
95
|
+
ole: 'Document-RPF_Open-new.ole',
|
|
96
|
+
p7m: 'file with certificate from government.pdf.p7m',
|
|
97
|
+
pdf: 'connect_local_visualize.pdf',
|
|
98
|
+
php: 'fish.php',
|
|
99
|
+
png: 'awesome_orchestration.png',
|
|
100
|
+
ppt: 'gorgeous_manager_savings.ppt',
|
|
101
|
+
rar: 'unbranded.rar',
|
|
102
|
+
rtf: 'pound.rtf',
|
|
103
|
+
sass: 'open_source_gorgeous.sass',
|
|
104
|
+
shtml: 'brand.shtml',
|
|
105
|
+
svg: 'b2c_tan_sports.svg',
|
|
106
|
+
tar: 'graphic_frozen_bedfordshire.tar',
|
|
107
|
+
ts: 'forge_face.ts',
|
|
108
|
+
tsd: 'Marked file-7483274hy6Fg6R8.tsd',
|
|
109
|
+
txt: 'bedfordshire_iceland_identity.txt',
|
|
110
|
+
wav: 'synergistic.wav',
|
|
111
|
+
webp: 'open_source.webp',
|
|
112
|
+
xar: 'wisconsin_bypassing_small.xar',
|
|
113
|
+
xls: 'metrics_lempira_account.xls',
|
|
114
|
+
xlsx: 'hdd_navigate_panama.xlsx',
|
|
115
|
+
xml: 'Markup language.xml',
|
|
116
|
+
zip: 'tuna_table_fall.zip',
|
|
117
|
+
};
|
|
118
|
+
export { filesList, namedFilesList, };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -3,6 +3,7 @@ import baselineAttachFile from "@icon/mi/baseline/attach-file.svg";
|
|
|
3
3
|
import baselineAudiotrack from "@icon/mi/baseline/audiotrack.svg";
|
|
4
4
|
import baselineTerminal from "@icon/mi/baseline/terminal.svg";
|
|
5
5
|
import baselineInsertDriveFile from "@icon/mi/baseline/insert-drive-file.svg";
|
|
6
|
+
import mdiLicense from "@icon/mdi/license.svg";
|
|
6
7
|
import mdiHardDisk from "@icon/mdi/harddisk.svg";
|
|
7
8
|
import baselineEmail from "@icon/mi/baseline/email.svg";
|
|
8
9
|
import baselineWysiwyg from "@icon/mi/baseline/wysiwyg.svg";
|
|
@@ -26,6 +27,10 @@ const fileFormatsVariant = {
|
|
|
26
27
|
icon: baselineAudiotrack,
|
|
27
28
|
variant: 'violet',
|
|
28
29
|
},
|
|
30
|
+
certificate: {
|
|
31
|
+
icon: mdiLicense,
|
|
32
|
+
variant: 'orange',
|
|
33
|
+
},
|
|
29
34
|
code: {
|
|
30
35
|
icon: baselineTerminal,
|
|
31
36
|
variant: 'yellow',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
|
|
3
|
-
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-
|
|
3
|
+
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";
|
|
4
4
|
const MdsInputRangeStyle0 = mdsInputRangeCss;
|
|
5
5
|
|
|
6
6
|
const MdsInputRange$1 = /*@__PURE__*/ proxyCustomElement(class MdsInputRange extends HTMLElement {
|
|
@@ -18,6 +18,7 @@ const MdsInputRange$1 = /*@__PURE__*/ proxyCustomElement(class MdsInputRange ext
|
|
|
18
18
|
this.max = 100;
|
|
19
19
|
this.min = 0;
|
|
20
20
|
this.step = 1;
|
|
21
|
+
this.disabled = undefined;
|
|
21
22
|
this.value = undefined;
|
|
22
23
|
}
|
|
23
24
|
calculateProgress() {
|
|
@@ -35,6 +36,16 @@ const MdsInputRange$1 = /*@__PURE__*/ proxyCustomElement(class MdsInputRange ext
|
|
|
35
36
|
const current = this.value - this.min;
|
|
36
37
|
this.progress = current * 100 / total;
|
|
37
38
|
}
|
|
39
|
+
disabledChanged(newValue) {
|
|
40
|
+
/**
|
|
41
|
+
* This is related to ALL disabled attributes set on Magma input components
|
|
42
|
+
* if solved, please check mds-button, mds-input, mds-input-*
|
|
43
|
+
* https://github.com/ionic-team/stencil/issues/5461
|
|
44
|
+
*/
|
|
45
|
+
if (newValue) {
|
|
46
|
+
this.internals.setFormValue(null);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
38
49
|
valueChanged() {
|
|
39
50
|
this.inputElement.value = this.value.toString();
|
|
40
51
|
this.calculateProgress();
|
|
@@ -51,6 +62,9 @@ const MdsInputRange$1 = /*@__PURE__*/ proxyCustomElement(class MdsInputRange ext
|
|
|
51
62
|
throw Error('step cant be negative or zero');
|
|
52
63
|
this.calculateProgress();
|
|
53
64
|
}
|
|
65
|
+
formResetCallback() {
|
|
66
|
+
this.internals.setFormValue('');
|
|
67
|
+
}
|
|
54
68
|
componentDidLoad() {
|
|
55
69
|
var _a, _b;
|
|
56
70
|
this.label = (_a = this.element.textContent) !== null && _a !== void 0 ? _a : '';
|
|
@@ -59,11 +73,12 @@ const MdsInputRange$1 = /*@__PURE__*/ proxyCustomElement(class MdsInputRange ext
|
|
|
59
73
|
this.calculateProgress();
|
|
60
74
|
}
|
|
61
75
|
render() {
|
|
62
|
-
return (h(Host, { key: '
|
|
76
|
+
return (h(Host, { key: 'e1cf60063d451ad99e6e4943412119634a261dc6' }, h("header", { key: '786ee56712c0d48fce3b0107bf44e1a4e39a5cb2', class: "header", part: "header" }, h("mds-text", { key: 'b51d53ca91e1a39431b851dcefdbda983ae59a60', class: "label", typography: "label" }, h("slot", { key: '1e8a604c35454992794958088051f5074504a3cf' })), h("mds-text", { key: '64cdd428f13f52a6964ab55527707a74ef98d560', class: "value", typography: "label" }, this.value)), h("div", { key: '00f8ad9cd7bdaff91a766d7c8e50a5ad65b4983a', class: "range" }, h("div", { key: '64e70fc8df3951015535b0e0bee0177089c9c399', class: "track" }, h("div", { key: '255824ff26075a8da7e176f03e8a2e99d8e754e5', class: "contrast-area" }), h("div", { key: 'a5d3f15b29af3c95dcdaffe05ba3d9481bfafce2', class: "track-total" }, h("div", { key: 'f50dff46578030bc9ecd83d56dec99b4a099f0b5', class: "track-progress", style: { width: `${this.progress}%` } }))), h("input", { key: '34ba926affc23fb845c421c7813ec05f7ce03f5f', class: "field", "aria-label": this.label, disabled: this.disabled, max: this.max, min: this.min, onInput: this.onInput, step: this.step, type: "range", value: this.value }))));
|
|
63
77
|
}
|
|
64
78
|
static get formAssociated() { return true; }
|
|
65
79
|
get element() { return this; }
|
|
66
80
|
static get watchers() { return {
|
|
81
|
+
"disabled": ["disabledChanged"],
|
|
67
82
|
"value": ["valueChanged"],
|
|
68
83
|
"min": ["minChanged"],
|
|
69
84
|
"max": ["maxChanged"],
|
|
@@ -74,9 +89,11 @@ const MdsInputRange$1 = /*@__PURE__*/ proxyCustomElement(class MdsInputRange ext
|
|
|
74
89
|
"max": [2],
|
|
75
90
|
"min": [2],
|
|
76
91
|
"step": [2],
|
|
92
|
+
"disabled": [1540],
|
|
77
93
|
"value": [1538],
|
|
78
94
|
"progress": [32]
|
|
79
95
|
}, undefined, {
|
|
96
|
+
"disabled": ["disabledChanged"],
|
|
80
97
|
"value": ["valueChanged"],
|
|
81
98
|
"min": ["minChanged"],
|
|
82
99
|
"max": ["maxChanged"],
|