@maggioli-design-system/mds-input-range 2.3.1 → 2.5.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.
Files changed (63) hide show
  1. package/dist/cjs/{index-9509a00b.js → index-37d5e60f.js} +13 -2
  2. package/dist/cjs/loader.cjs.js +2 -2
  3. package/dist/cjs/mds-input-range.cjs.entry.js +25 -12
  4. package/dist/cjs/mds-input-range.cjs.js +2 -2
  5. package/dist/collection/common/floating-controller.js +25 -4
  6. package/dist/collection/common/keyboard-manager.js +3 -2
  7. package/dist/collection/components/mds-input-range/mds-input-range.js +41 -11
  8. package/dist/collection/components/mds-input-range/test/mds-input-range.stories.js +11 -0
  9. package/dist/collection/dictionary/button.js +2 -0
  10. package/dist/collection/type/input-tip.js +1 -0
  11. package/dist/components/mds-input-range.js +25 -11
  12. package/dist/documentation.json +26 -1
  13. package/dist/esm/{index-476f378c.js → index-e9d1fa7e.js} +13 -2
  14. package/dist/esm/loader.js +3 -3
  15. package/dist/esm/mds-input-range.entry.js +25 -12
  16. package/dist/esm/mds-input-range.js +3 -3
  17. package/dist/esm-es5/index-e9d1fa7e.js +1 -0
  18. package/dist/esm-es5/loader.js +1 -1
  19. package/dist/esm-es5/mds-input-range.entry.js +1 -1
  20. package/dist/esm-es5/mds-input-range.js +1 -1
  21. package/dist/mds-input-range/mds-input-range.esm.js +1 -1
  22. package/dist/mds-input-range/mds-input-range.js +1 -1
  23. package/dist/mds-input-range/p-155deafe.js +2 -0
  24. package/dist/mds-input-range/p-55273f42.entry.js +1 -0
  25. package/dist/mds-input-range/p-7315ada7.system.js +2 -0
  26. package/dist/mds-input-range/{p-c22c5274.system.entry.js → p-b3abfa80.system.entry.js} +1 -1
  27. package/dist/mds-input-range/p-b6d99f83.system.js +1 -0
  28. package/dist/stats.json +76 -33
  29. package/dist/types/common/floating-controller.d.ts +1 -0
  30. package/dist/types/components/mds-input-range/mds-input-range.d.ts +7 -1
  31. package/dist/types/components/mds-input-range/test/mds-input-range.stories.d.ts +1 -0
  32. package/dist/types/components.d.ts +8 -0
  33. package/dist/types/type/button.d.ts +1 -1
  34. package/dist/types/type/input-tip.d.ts +1 -0
  35. package/documentation.json +53 -13
  36. package/package.json +3 -3
  37. package/readme.md +8 -7
  38. package/src/common/floating-controller.ts +26 -3
  39. package/src/common/keyboard-manager.ts +1 -0
  40. package/src/components/mds-input-range/mds-input-range.tsx +28 -11
  41. package/src/components/mds-input-range/readme.md +8 -7
  42. package/src/components/mds-input-range/test/mds-input-range.stories.tsx +17 -0
  43. package/src/components.d.ts +8 -0
  44. package/src/dictionary/button.ts +2 -0
  45. package/src/fixtures/icons.json +6 -0
  46. package/src/type/button.ts +2 -0
  47. package/src/type/input-tip.ts +11 -0
  48. package/www/build/mds-input-range.esm.js +1 -1
  49. package/www/build/mds-input-range.js +1 -1
  50. package/www/build/p-155deafe.js +2 -0
  51. package/www/build/p-55273f42.entry.js +1 -0
  52. package/www/build/p-7315ada7.system.js +2 -0
  53. package/www/build/{p-c22c5274.system.entry.js → p-b3abfa80.system.entry.js} +1 -1
  54. package/www/build/p-b6d99f83.system.js +1 -0
  55. package/dist/esm-es5/index-476f378c.js +0 -1
  56. package/dist/mds-input-range/p-87f42ab7.js +0 -2
  57. package/dist/mds-input-range/p-d47766b6.system.js +0 -1
  58. package/dist/mds-input-range/p-e79d51c6.system.js +0 -2
  59. package/dist/mds-input-range/p-e838760a.entry.js +0 -1
  60. package/www/build/p-87f42ab7.js +0 -2
  61. package/www/build/p-d47766b6.system.js +0 -1
  62. package/www/build/p-e79d51c6.system.js +0 -2
  63. package/www/build/p-e838760a.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, constructableCSS: true, cssAnnotations: true, devTools: false, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: true, hasRenderFn: true, hostListener: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: true, hydratedClass: false, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, modernPropertyDecls: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: true, propNumber: true, propString: false, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: true, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: false, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: false, watchCallback: true };
24
+ const BUILD = /* mds-input-range */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, constructableCSS: true, cssAnnotations: true, devTools: false, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: true, hasRenderFn: true, hostListener: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: true, hydratedClass: false, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, modernPropertyDecls: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: true, propNumber: true, propString: false, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: true, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: false, watchCallback: true };
25
25
 
26
26
  /*
27
27
  Stencil Client Platform v4.27.2 | MIT Licensed | https://stenciljs.com
@@ -473,7 +473,11 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
473
473
  }
474
474
  }
475
475
  }
476
- } else if (memberName === "key") ; else if ((!isProp ) && memberName[0] === "o" && memberName[1] === "n") {
476
+ } else if (memberName === "key") ; else if (memberName === "ref") {
477
+ if (newValue) {
478
+ newValue(elm);
479
+ }
480
+ } else if ((!isProp ) && memberName[0] === "o" && memberName[1] === "n") {
477
481
  if (memberName[2] === "-") {
478
482
  memberName = memberName.slice(3);
479
483
  } else if (isMemberInElement(win, ln)) {
@@ -631,6 +635,7 @@ var removeVnodes = (vnodes, startIdx, endIdx) => {
631
635
  const vnode = vnodes[index];
632
636
  if (vnode) {
633
637
  const elm = vnode.$elm$;
638
+ nullifyVNodeRefs(vnode);
634
639
  if (elm) {
635
640
  elm.remove();
636
641
  }
@@ -759,6 +764,12 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
759
764
  elm.data = text;
760
765
  }
761
766
  };
767
+ var nullifyVNodeRefs = (vNode) => {
768
+ {
769
+ vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
770
+ vNode.$children$ && vNode.$children$.map(nullifyVNodeRefs);
771
+ }
772
+ };
762
773
  var insertBefore = (parent, newNode, reference) => {
763
774
  {
764
775
  return parent == null ? void 0 : parent.insertBefore(newNode, reference);
@@ -2,13 +2,13 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-9509a00b.js');
5
+ const index = require('./index-37d5e60f.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],"disabled":[1540],"value":[1538],"progress":[32]},null,{"disabled":["disabledChanged"],"value":["valueChanged"],"min":["minChanged"],"max":["maxChanged"],"step":["stepChanged"]}]]]], options);
11
+ return index.bootstrapLazy([["mds-input-range.cjs",[[65,"mds-input-range",{"formatValue":[16],"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,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-9509a00b.js');
5
+ const index = require('./index-37d5e60f.js');
6
6
 
7
7
  const mdsInputRangeCss = "@-webkit-keyframes focus-bounce{0%,75%,100%{outline-offset:var(--magma-outline-focus-offset, 6px)}50%{outline-offset:var(--magma-outline-blur-offset, 2px)}}@keyframes focus-bounce{0%,75%,100%{outline-offset:var(--magma-outline-focus-offset, 6px)}50%{outline-offset:var(--magma-outline-blur-offset, 2px)}}@tailwind components; :host{--mds-input-range-thumb-size:1rem;--mds-input-range-thumb-background:rgb(var(--variant-primary-04));--mds-input-range-thumb-shadow:0 0 0 2px rgb(var(--tone-neutral));--mds-input-range-track-background:rgb(var(--tone-neutral-08));--mds-input-range-track-size:0.5rem;--mds-input-range-track-progress-background:rgb(var(--variant-primary-03));--mds-input-range-thumb-background-disabled:rgb(var(--tone-neutral-06));--mds-input-range-track-background-disabled:rgb(var(--tone-neutral-08));--mds-input-range-track-progress-background-disabled:rgb(var(--tone-neutral-06));gap:0.25rem;-webkit-transition-duration:300ms;transition-duration:300ms;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);display:grid;-webkit-transition-property:color;transition-property:color}.header{gap:0.5rem;display:-ms-flexbox;display:flex}.label{min-width:0rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.value{margin-left:auto}.range{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;height:var(--mds-input-range-thumb-size);position:relative}.track{width:100%;--margin:calc(var(--mds-input-range-track-size) / 2);-webkit-box-sizing:border-box;box-sizing:border-box;padding:0 var(--margin);position:absolute}.field{-webkit-animation-duration:var(--magma-outline-animation-duration, 1s);animation-duration:var(--magma-outline-animation-duration, 1s);-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;-webkit-animation-name:focus-bounce;animation-name:focus-bounce;-webkit-animation-play-state:paused;animation-play-state:paused;-webkit-animation-timing-function:cubic-bezier(0, 0, 0.2, 1);animation-timing-function:cubic-bezier(0, 0, 0.2, 1);outline:var(--magma-outline-blur);-webkit-transition-duration:200ms;transition-duration:200ms;-webkit-transition-property:background-color, border-color, color, fill, outline, outline-offset, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, fill, outline, outline-offset, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, fill, outline, outline-offset, transform;transition-property:background-color, border-color, box-shadow, color, fill, outline, outline-offset, transform, -webkit-box-shadow, -webkit-transform;-webkit-transition-timing-function:ease-in-out;transition-timing-function:ease-in-out}.field:focus-visible{--magma-outline-blur:var(--magma-outline-focus);-webkit-animation-play-state:running;animation-play-state:running}.field{z-index:20;height:1rem;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:transparent;border-radius:1000px;-ms-flex-positive:1;flex-grow:1;margin:0}.field:focus-visible{--magma-outline-blur:var(--magma-outline-focus);-webkit-animation-play-state:running;animation-play-state:running}.field::-webkit-slider-thumb{-webkit-transition-duration:300ms;transition-duration:300ms;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-appearance:none;appearance:none;background-color:var(--mds-input-range-thumb-background);border:0;border-radius:var(--mds-input-range-thumb-size);-webkit-box-shadow:var(--mds-input-range-thumb-shadow);box-shadow:var(--mds-input-range-thumb-shadow);cursor:-webkit-grab;cursor:grab;height:var(--mds-input-range-thumb-size);line-height:0;-webkit-transform:translate(0, -50%);transform:translate(0, -50%);-webkit-transition-property:background-color, box-shadow;-webkit-transition-property:background-color, -webkit-box-shadow;transition-property:background-color, -webkit-box-shadow;transition-property:background-color, box-shadow;transition-property:background-color, box-shadow, -webkit-box-shadow;width:var(--mds-input-range-thumb-size)}.field::-webkit-slider-runnable-track{-webkit-appearance:none;appearance:none;border:0;height:0;width:100%}.track-progress{-webkit-transition-duration:300ms;transition-duration:300ms;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);background-color:var(--mds-input-range-track-progress-background);display:-ms-flexbox;display:flex;height:var(--mds-input-range-track-size);-webkit-transition-property:background-color;transition-property:background-color}.track-total{-webkit-transition-duration:300ms;transition-duration:300ms;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);background-color:var(--mds-input-range-track-background);border-radius:var(--mds-input-range-track-size);display:-ms-flexbox;display:flex;height:var(--mds-input-range-track-size);overflow:hidden;-webkit-transition-property:background-color;transition-property:background-color;width:100%}.contrast-area{margin-left:0.25rem;margin-right:0.25rem;border-radius:var(--mds-input-range-track-size)}:host([disabled]:not([disabled=\"false\"])){--mds-input-range-thumb-background:var(--mds-input-range-thumb-background-disabled);--mds-input-range-track-background:var(--mds-input-range-track-background-disabled);--mds-input-range-track-progress-background:var(--mds-input-range-track-progress-background-disabled)}:host([disabled]:not([disabled=\"false\"])) .field::-webkit-slider-thumb{cursor:not-allowed}:host-context(.pref-animation-reduce),:host-context(.pref-animation-reduce) .field::-webkit-slider-thumb,:host-context(.pref-animation-reduce) .field::-webkit-slider-runnable-track,:host-context(.pref-animation-reduce) .track-progress,:host-context(.pref-animation-reduce) .track-total{-webkit-transition-duration:0s;transition-duration:0s}@media (prefers-reduced-motion){:host-context(.pref-animation-system),:host-context(.pref-animation-system) .field::-webkit-slider-thumb,:host-context(.pref-animation-system) .field::-webkit-slider-runnable-track,:host-context(.pref-animation-system) .track-progress,:host-context(.pref-animation-system) .track-total{-webkit-transition-duration:0s;transition-duration:0s}}:host-context(.pref-theme-dark){--mds-input-range-thumb-background:rgb(var(--variant-primary-04));--mds-input-range-track-background:rgb(var(--tone-neutral-07));--mds-input-range-track-progress-background:rgb(var(--variant-primary-05))}@media (prefers-color-scheme: dark){:host-context(.pref-theme-system){--mds-input-range-thumb-background:rgb(var(--variant-primary-04));--mds-input-range-track-background:rgb(var(--tone-neutral-07));--mds-input-range-track-progress-background:rgb(var(--variant-primary-05))}}:host-context(.pref-contrast-more){color:rgb(var(--tone-neutral-01))}@media (prefers-contrast: more){:host-context(.pref-contrast-system){color:rgb(var(--tone-neutral-01))}}:host(:not(:is([hydrated],.hydrated))){-webkit-animation-duration:0s;animation-duration:0s;border-color:transparent;-webkit-box-shadow:0 0 0 transparent;box-shadow:0 0 0 transparent;opacity:0;outline-color:transparent;-webkit-transition-delay:0s;transition-delay:0s;-webkit-transition-duration:0s;transition-duration:0s;visibility:hidden}mds-accordion:not(:is([hydrated],.hydrated)),mds-accordion-item:not(:is([hydrated],.hydrated)),mds-accordion-timer:not(:is([hydrated],.hydrated)),mds-accordion-timer-item:not(:is([hydrated],.hydrated)),mds-author:not(:is([hydrated],.hydrated)),mds-avatar:not(:is([hydrated],.hydrated)),mds-badge:not(:is([hydrated],.hydrated)),mds-banner:not(:is([hydrated],.hydrated)),mds-benchmark-bar:not(:is([hydrated],.hydrated)),mds-bibliography:not(:is([hydrated],.hydrated)),mds-breadcrumb:not(:is([hydrated],.hydrated)),mds-breadcrumb-item:not(:is([hydrated],.hydrated)),mds-button:not(:is([hydrated],.hydrated)),mds-card:not(:is([hydrated],.hydrated)),mds-card-content:not(:is([hydrated],.hydrated)),mds-card-footer:not(:is([hydrated],.hydrated)),mds-card-header:not(:is([hydrated],.hydrated)),mds-card-media:not(:is([hydrated],.hydrated)),mds-chip:not(:is([hydrated],.hydrated)),mds-details:not(:is([hydrated],.hydrated)),mds-dropdown:not(:is([hydrated],.hydrated)),mds-entity:not(:is([hydrated],.hydrated)),mds-file:not(:is([hydrated],.hydrated)),mds-file-preview:not(:is([hydrated],.hydrated)),mds-filter:not(:is([hydrated],.hydrated)),mds-filter-item:not(:is([hydrated],.hydrated)),mds-header:not(:is([hydrated],.hydrated)),mds-header-bar:not(:is([hydrated],.hydrated)),mds-help:not(:is([hydrated],.hydrated)),mds-horizontal-scroll:not(:is([hydrated],.hydrated)),mds-hr:not(:is([hydrated],.hydrated)),mds-icon:not(:is([hydrated],.hydrated)),mds-img:not(:is([hydrated],.hydrated)),mds-input:not(:is([hydrated],.hydrated)),mds-input-field:not(:is([hydrated],.hydrated)),mds-input-range:not(:is([hydrated],.hydrated)),mds-input-select:not(:is([hydrated],.hydrated)),mds-input-switch:not(:is([hydrated],.hydrated)),mds-input-tip:not(:is([hydrated],.hydrated)),mds-input-tip-item:not(:is([hydrated],.hydrated)),mds-input-upload:not(:is([hydrated],.hydrated)),mds-keyboard:not(:is([hydrated],.hydrated)),mds-keyboard-key:not(:is([hydrated],.hydrated)),mds-kpi:not(:is([hydrated],.hydrated)),mds-kpi-item:not(:is([hydrated],.hydrated)),mds-label:not(:is([hydrated],.hydrated)),mds-list:not(:is([hydrated],.hydrated)),mds-list-item:not(:is([hydrated],.hydrated)),mds-modal:not(:is([hydrated],.hydrated)),mds-note:not(:is([hydrated],.hydrated)),mds-notification:not(:is([hydrated],.hydrated)),mds-paginator:not(:is([hydrated],.hydrated)),mds-paginator-item:not(:is([hydrated],.hydrated)),mds-pref:not(:is([hydrated],.hydrated)),mds-pref-animation:not(:is([hydrated],.hydrated)),mds-pref-consumption:not(:is([hydrated],.hydrated)),mds-pref-contrast:not(:is([hydrated],.hydrated)),mds-pref-language:not(:is([hydrated],.hydrated)),mds-pref-language-item:not(:is([hydrated],.hydrated)),mds-pref-theme:not(:is([hydrated],.hydrated)),mds-price-table:not(:is([hydrated],.hydrated)),mds-price-table-features:not(:is([hydrated],.hydrated)),mds-price-table-features-cell:not(:is([hydrated],.hydrated)),mds-price-table-features-row:not(:is([hydrated],.hydrated)),mds-price-table-header:not(:is([hydrated],.hydrated)),mds-price-table-list:not(:is([hydrated],.hydrated)),mds-price-table-list-item:not(:is([hydrated],.hydrated)),mds-progress:not(:is([hydrated],.hydrated)),mds-push-notification:not(:is([hydrated],.hydrated)),mds-push-notifications:not(:is([hydrated],.hydrated)),mds-quote:not(:is([hydrated],.hydrated)),mds-separator:not(:is([hydrated],.hydrated)),mds-spinner:not(:is([hydrated],.hydrated)),mds-stepper-bar:not(:is([hydrated],.hydrated)),mds-stepper-bar-item:not(:is([hydrated],.hydrated)),mds-tab:not(:is([hydrated],.hydrated)),mds-tab-bar:not(:is([hydrated],.hydrated)),mds-tab-bar-item:not(:is([hydrated],.hydrated)),mds-tab-item:not(:is([hydrated],.hydrated)),mds-table:not(:is([hydrated],.hydrated)),mds-table-body:not(:is([hydrated],.hydrated)),mds-table-cell:not(:is([hydrated],.hydrated)),mds-table-footer:not(:is([hydrated],.hydrated)),mds-table-header:not(:is([hydrated],.hydrated)),mds-table-header-cell:not(:is([hydrated],.hydrated)),mds-table-row:not(:is([hydrated],.hydrated)),mds-text:not(:is([hydrated],.hydrated)),mds-toast:not(:is([hydrated],.hydrated)),mds-tooltip:not(:is([hydrated],.hydrated)),mds-tree:not(:is([hydrated],.hydrated)),mds-tree-item:not(:is([hydrated],.hydrated)),mds-url-view:not(:is([hydrated],.hydrated)),mds-usage:not(:is([hydrated],.hydrated)),mds-video-wall:not(:is([hydrated],.hydrated)),mds-zero:not(:is([hydrated],.hydrated)){-webkit-animation-duration:0s;animation-duration:0s;border-color:transparent;-webkit-box-shadow:0 0 0 transparent;box-shadow:0 0 0 transparent;opacity:0;outline-color:transparent;-webkit-transition-delay:0s;transition-delay:0s;-webkit-transition-duration:0s;transition-duration:0s;visibility:hidden}";
8
8
  const MdsInputRangeStyle0 = mdsInputRangeCss;
@@ -32,24 +32,34 @@ const MdsInputRange = class {
32
32
  */
33
33
  this.step = 1;
34
34
  this.onInput = () => {
35
+ if (Number.isNaN(this.inputElement.value))
36
+ throw Error(`Entered value ${this.inputElement.value} is not a Number`);
35
37
  // trigger valueChanged that update progress and emit event
36
- this.value = parseInt(this.inputElement.value);
38
+ this.value = Number(this.inputElement.value);
37
39
  };
38
40
  }
39
41
  calculateProgress() {
40
42
  // validate value
41
- let v = parseInt(this.inputElement.value);
43
+ let v = Number(this.inputElement.value);
44
+ // multiplier is needed to manage decimal value and step, so we can work with integer value and avoid decimal division
45
+ const multiplier = Math.pow(10, this.decimalPlaces);
42
46
  if (v > this.max)
43
47
  v = this.max;
44
48
  else if (v < this.min)
45
49
  v = this.min;
46
- if ((v - this.min) % (this.step) !== 0)
47
- v = Math.round(v / this.step) * this.step - this.min;
50
+ if ((v - this.min) * multiplier % (this.step * multiplier) !== 0) {
51
+ v = (Math.round((v * multiplier - this.min * multiplier) / (this.step * multiplier)) * (this.step * multiplier) + this.min * multiplier) / multiplier;
52
+ }
48
53
  this.value = v;
49
54
  this.internals.setFormValue(this.value.toString());
50
55
  const total = this.max - this.min;
51
56
  const current = this.value - this.min;
52
- this.progress = current * 100 / total;
57
+ this.progress = current / total * 100;
58
+ }
59
+ countDecimals(num) {
60
+ if (Math.floor(num) === num)
61
+ return 0;
62
+ return num.toString().split('.')[1].length || 0;
53
63
  }
54
64
  disabledChanged(newValue) {
55
65
  /**
@@ -61,7 +71,9 @@ const MdsInputRange = class {
61
71
  this.internals.setFormValue(null);
62
72
  }
63
73
  }
64
- valueChanged() {
74
+ valueChanged(newValue, oldValue) {
75
+ if (newValue === oldValue)
76
+ return;
65
77
  this.inputElement.value = this.value.toString();
66
78
  this.calculateProgress();
67
79
  this.changeEvent.emit(this.value);
@@ -73,22 +85,23 @@ const MdsInputRange = class {
73
85
  this.calculateProgress();
74
86
  }
75
87
  stepChanged() {
76
- if (this.step < 1)
88
+ if (this.step <= 0)
77
89
  throw Error('step cant be negative or zero');
90
+ this.decimalPlaces = this.countDecimals(this.step);
78
91
  this.calculateProgress();
79
92
  }
80
93
  formResetCallback() {
81
94
  this.internals.setFormValue('');
82
95
  }
83
96
  componentDidLoad() {
84
- var _a, _b;
97
+ var _a;
98
+ this.decimalPlaces = this.countDecimals(this.step);
99
+ this.onInput(); // define value
85
100
  this.label = (_a = this.element.textContent) !== null && _a !== void 0 ? _a : '';
86
- this.inputElement = (_b = this.element.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector('.field');
87
- this.value = parseInt(this.inputElement.value);
88
101
  this.calculateProgress();
89
102
  }
90
103
  render() {
91
- 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 }))));
104
+ return (index.h(index.Host, { key: 'c7f40ef34fa414e4f99881e815fa805dfc089667' }, index.h("header", { key: '285c789e06277c9f0f2068b4a49036faf29dd70b', class: "header", part: "header" }, index.h("mds-text", { key: '485ff525a7fbca6e7a7e121bde7f44ad193bd880', class: "label", typography: "label" }, index.h("slot", { key: '3147cbc8b650bfa3fd87f69f6356687ccdc38024' })), index.h("mds-text", { key: 'c1bafcdfb7d5beda33473240b95a9f733ed7c8b9', class: "value", typography: "label" }, this.formatValue ? this.formatValue(this.value) : this.value)), index.h("div", { key: '26043966f0e431585aea5b453231591ebfec5dff', class: "range" }, index.h("div", { key: '291fa31c69d3a2a34d4eb14aeab1a9cb51f7bcb3', class: "track" }, index.h("div", { key: '8ee7c29eef91b226bbfe96abe62e95fad2094e7a', class: "contrast-area" }), index.h("div", { key: 'd3e4433931276f474ebe24893826da680f17d541', class: "track-total" }, index.h("div", { key: '87fa236d8538776e5a3372239307032de90e8e91', class: "track-progress", style: { width: `${this.progress}%` } }))), index.h("input", { key: '0eb811c18c9e9fe81d5df4e5ce019e800aad75e2', ref: el => this.inputElement = el, 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 }))));
92
105
  }
93
106
  static get formAssociated() { return true; }
94
107
  get element() { return index.getElement(this); }
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-9509a00b.js');
5
+ const index = require('./index-37d5e60f.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],"disabled":[1540],"value":[1538],"progress":[32]},null,{"disabled":["disabledChanged"],"value":["valueChanged"],"min":["minChanged"],"max":["maxChanged"],"step":["stepChanged"]}]]]], options);
22
+ return index.bootstrapLazy([["mds-input-range.cjs",[[65,"mds-input-range",{"formatValue":[16],"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;
@@ -65,6 +65,23 @@ export class FloatingController {
65
65
  return { transformOrigin: 'center top' };
66
66
  }
67
67
  };
68
+ this.convertToTransformOrigin = (position) => {
69
+ const positions = {
70
+ top: 'center bottom',
71
+ right: 'left center',
72
+ bottom: 'center top',
73
+ left: 'right center',
74
+ 'bottom-end': 'top right',
75
+ 'bottom-start': 'top left',
76
+ 'left-end': 'right bottom',
77
+ 'left-start': 'right top',
78
+ 'right-end': 'left bottom',
79
+ 'right-start': 'left top',
80
+ 'top-end': 'bottom right',
81
+ 'top-start': 'bottom left',
82
+ };
83
+ return positions[position];
84
+ };
68
85
  this.calculatePosition = () => {
69
86
  if (!this._caller)
70
87
  return;
@@ -99,6 +116,8 @@ export class FloatingController {
99
116
  Object.assign(this._host.style, {
100
117
  left: `${x}px`,
101
118
  top: `${y}px`,
119
+ transformOrigin: this.convertToTransformOrigin(placement),
120
+ position: this._host.strategy,
102
121
  });
103
122
  const arrowStyle = {};
104
123
  const arrowPosition = {
@@ -133,12 +152,14 @@ export class FloatingController {
133
152
  return caller;
134
153
  }
135
154
  updatePosition() {
136
- if (this.cleanupAutoUpdate)
137
- this.cleanupAutoUpdate();
138
- this.cleanupAutoUpdate = autoUpdate(this._caller, this._host, this.calculatePosition);
155
+ if (this._host.visible) {
156
+ this.dismiss(); // to clean the old update function before update function
157
+ this.cleanupAutoUpdate = autoUpdate(this._caller, this._host, this.calculatePosition);
158
+ }
139
159
  }
140
160
  dismiss() {
141
- this.cleanupAutoUpdate();
161
+ if (this.cleanupAutoUpdate)
162
+ this.cleanupAutoUpdate();
142
163
  }
143
164
  }
144
165
  export class Backdrop {
@@ -22,8 +22,9 @@ export class KeyboardManager {
22
22
  this.elements.delete(name);
23
23
  };
24
24
  this.attachClickBehavior = (name = 'element') => {
25
- var _a;
26
- (_a = this.elements.get(name)) === null || _a === void 0 ? void 0 : _a.addEventListener('keydown', this.handleClickBehaviorDispatchEvent);
25
+ var _a, _b;
26
+ (_a = this.elements.get(name)) === null || _a === void 0 ? void 0 : _a.removeEventListener('keydown', this.handleClickBehaviorDispatchEvent);
27
+ (_b = this.elements.get(name)) === null || _b === void 0 ? void 0 : _b.addEventListener('keydown', this.handleClickBehaviorDispatchEvent);
27
28
  };
28
29
  this.detachClickBehavior = (name = 'element') => {
29
30
  var _a;
@@ -18,24 +18,34 @@ export class MdsInputRange {
18
18
  */
19
19
  this.step = 1;
20
20
  this.onInput = () => {
21
+ if (Number.isNaN(this.inputElement.value))
22
+ throw Error(`Entered value ${this.inputElement.value} is not a Number`);
21
23
  // trigger valueChanged that update progress and emit event
22
- this.value = parseInt(this.inputElement.value);
24
+ this.value = Number(this.inputElement.value);
23
25
  };
24
26
  }
25
27
  calculateProgress() {
26
28
  // validate value
27
- let v = parseInt(this.inputElement.value);
29
+ let v = Number(this.inputElement.value);
30
+ // multiplier is needed to manage decimal value and step, so we can work with integer value and avoid decimal division
31
+ const multiplier = Math.pow(10, this.decimalPlaces);
28
32
  if (v > this.max)
29
33
  v = this.max;
30
34
  else if (v < this.min)
31
35
  v = this.min;
32
- if ((v - this.min) % (this.step) !== 0)
33
- v = Math.round(v / this.step) * this.step - this.min;
36
+ if ((v - this.min) * multiplier % (this.step * multiplier) !== 0) {
37
+ v = (Math.round((v * multiplier - this.min * multiplier) / (this.step * multiplier)) * (this.step * multiplier) + this.min * multiplier) / multiplier;
38
+ }
34
39
  this.value = v;
35
40
  this.internals.setFormValue(this.value.toString());
36
41
  const total = this.max - this.min;
37
42
  const current = this.value - this.min;
38
- this.progress = current * 100 / total;
43
+ this.progress = current / total * 100;
44
+ }
45
+ countDecimals(num) {
46
+ if (Math.floor(num) === num)
47
+ return 0;
48
+ return num.toString().split('.')[1].length || 0;
39
49
  }
40
50
  disabledChanged(newValue) {
41
51
  /**
@@ -47,7 +57,9 @@ export class MdsInputRange {
47
57
  this.internals.setFormValue(null);
48
58
  }
49
59
  }
50
- valueChanged() {
60
+ valueChanged(newValue, oldValue) {
61
+ if (newValue === oldValue)
62
+ return;
51
63
  this.inputElement.value = this.value.toString();
52
64
  this.calculateProgress();
53
65
  this.changeEvent.emit(this.value);
@@ -59,22 +71,23 @@ export class MdsInputRange {
59
71
  this.calculateProgress();
60
72
  }
61
73
  stepChanged() {
62
- if (this.step < 1)
74
+ if (this.step <= 0)
63
75
  throw Error('step cant be negative or zero');
76
+ this.decimalPlaces = this.countDecimals(this.step);
64
77
  this.calculateProgress();
65
78
  }
66
79
  formResetCallback() {
67
80
  this.internals.setFormValue('');
68
81
  }
69
82
  componentDidLoad() {
70
- var _a, _b;
83
+ var _a;
84
+ this.decimalPlaces = this.countDecimals(this.step);
85
+ this.onInput(); // define value
71
86
  this.label = (_a = this.element.textContent) !== null && _a !== void 0 ? _a : '';
72
- this.inputElement = (_b = this.element.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector('.field');
73
- this.value = parseInt(this.inputElement.value);
74
87
  this.calculateProgress();
75
88
  }
76
89
  render() {
77
- 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 }))));
90
+ return (h(Host, { key: 'c7f40ef34fa414e4f99881e815fa805dfc089667' }, h("header", { key: '285c789e06277c9f0f2068b4a49036faf29dd70b', class: "header", part: "header" }, h("mds-text", { key: '485ff525a7fbca6e7a7e121bde7f44ad193bd880', class: "label", typography: "label" }, h("slot", { key: '3147cbc8b650bfa3fd87f69f6356687ccdc38024' })), h("mds-text", { key: 'c1bafcdfb7d5beda33473240b95a9f733ed7c8b9', class: "value", typography: "label" }, this.formatValue ? this.formatValue(this.value) : this.value)), h("div", { key: '26043966f0e431585aea5b453231591ebfec5dff', class: "range" }, h("div", { key: '291fa31c69d3a2a34d4eb14aeab1a9cb51f7bcb3', class: "track" }, h("div", { key: '8ee7c29eef91b226bbfe96abe62e95fad2094e7a', class: "contrast-area" }), h("div", { key: 'd3e4433931276f474ebe24893826da680f17d541', class: "track-total" }, h("div", { key: '87fa236d8538776e5a3372239307032de90e8e91', class: "track-progress", style: { width: `${this.progress}%` } }))), h("input", { key: '0eb811c18c9e9fe81d5df4e5ce019e800aad75e2', ref: el => this.inputElement = el, 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 }))));
78
91
  }
79
92
  static get is() { return "mds-input-range"; }
80
93
  static get encapsulation() { return "shadow"; }
@@ -91,6 +104,23 @@ export class MdsInputRange {
91
104
  }
92
105
  static get properties() {
93
106
  return {
107
+ "formatValue": {
108
+ "type": "unknown",
109
+ "mutable": false,
110
+ "complexType": {
111
+ "original": "(value: number) => string",
112
+ "resolved": "((value: number) => string) | undefined",
113
+ "references": {}
114
+ },
115
+ "required": false,
116
+ "optional": true,
117
+ "docs": {
118
+ "tags": [],
119
+ "text": "A function to custom how value is represented"
120
+ },
121
+ "getter": false,
122
+ "setter": false
123
+ },
94
124
  "max": {
95
125
  "type": "number",
96
126
  "mutable": false,
@@ -1,4 +1,5 @@
1
1
  import { h } from "@stencil/core";
2
+ import { useEffect } from "react";
2
3
  export default {
3
4
  title: 'Form / Range',
4
5
  argTypes: {
@@ -25,6 +26,15 @@ export default {
25
26
  },
26
27
  };
27
28
  const Template = args => h("mds-input-range", Object.assign({}, args), "Range label");
29
+ const TemplateFormatLabel = args => {
30
+ useEffect(() => {
31
+ document.querySelector('#custom-labeled').formatValue = formatValue;
32
+ }, []);
33
+ function formatValue(v) {
34
+ return `Hai selezionato il valore ${v}`;
35
+ }
36
+ return h("div", null, h("mds-input-range", Object.assign({ id: "custom-labeled" }, args), "Range label"));
37
+ };
28
38
  const hideHeaderCss = `
29
39
  mds-input-range::part(header) {
30
40
  display: none;
@@ -52,4 +62,5 @@ export const Value = Template.bind({});
52
62
  Value.args = {
53
63
  value: 90,
54
64
  };
65
+ export const FormatLabel = TemplateFormatLabel.bind({});
55
66
  export const HideHeader = HideHeaderTemplate.bind({});
@@ -7,6 +7,8 @@ const buttonVariantDictionary = [
7
7
  'secondary',
8
8
  'success',
9
9
  'warning',
10
+ 'google',
11
+ 'apple',
10
12
  ];
11
13
  const buttonToneVariantDictionary = [
12
14
  'strong',
@@ -0,0 +1 @@
1
+ export {};
@@ -24,24 +24,34 @@ const MdsInputRange$1 = /*@__PURE__*/ proxyCustomElement(class MdsInputRange ext
24
24
  */
25
25
  this.step = 1;
26
26
  this.onInput = () => {
27
+ if (Number.isNaN(this.inputElement.value))
28
+ throw Error(`Entered value ${this.inputElement.value} is not a Number`);
27
29
  // trigger valueChanged that update progress and emit event
28
- this.value = parseInt(this.inputElement.value);
30
+ this.value = Number(this.inputElement.value);
29
31
  };
30
32
  }
31
33
  calculateProgress() {
32
34
  // validate value
33
- let v = parseInt(this.inputElement.value);
35
+ let v = Number(this.inputElement.value);
36
+ // multiplier is needed to manage decimal value and step, so we can work with integer value and avoid decimal division
37
+ const multiplier = Math.pow(10, this.decimalPlaces);
34
38
  if (v > this.max)
35
39
  v = this.max;
36
40
  else if (v < this.min)
37
41
  v = this.min;
38
- if ((v - this.min) % (this.step) !== 0)
39
- v = Math.round(v / this.step) * this.step - this.min;
42
+ if ((v - this.min) * multiplier % (this.step * multiplier) !== 0) {
43
+ v = (Math.round((v * multiplier - this.min * multiplier) / (this.step * multiplier)) * (this.step * multiplier) + this.min * multiplier) / multiplier;
44
+ }
40
45
  this.value = v;
41
46
  this.internals.setFormValue(this.value.toString());
42
47
  const total = this.max - this.min;
43
48
  const current = this.value - this.min;
44
- this.progress = current * 100 / total;
49
+ this.progress = current / total * 100;
50
+ }
51
+ countDecimals(num) {
52
+ if (Math.floor(num) === num)
53
+ return 0;
54
+ return num.toString().split('.')[1].length || 0;
45
55
  }
46
56
  disabledChanged(newValue) {
47
57
  /**
@@ -53,7 +63,9 @@ const MdsInputRange$1 = /*@__PURE__*/ proxyCustomElement(class MdsInputRange ext
53
63
  this.internals.setFormValue(null);
54
64
  }
55
65
  }
56
- valueChanged() {
66
+ valueChanged(newValue, oldValue) {
67
+ if (newValue === oldValue)
68
+ return;
57
69
  this.inputElement.value = this.value.toString();
58
70
  this.calculateProgress();
59
71
  this.changeEvent.emit(this.value);
@@ -65,22 +77,23 @@ const MdsInputRange$1 = /*@__PURE__*/ proxyCustomElement(class MdsInputRange ext
65
77
  this.calculateProgress();
66
78
  }
67
79
  stepChanged() {
68
- if (this.step < 1)
80
+ if (this.step <= 0)
69
81
  throw Error('step cant be negative or zero');
82
+ this.decimalPlaces = this.countDecimals(this.step);
70
83
  this.calculateProgress();
71
84
  }
72
85
  formResetCallback() {
73
86
  this.internals.setFormValue('');
74
87
  }
75
88
  componentDidLoad() {
76
- var _a, _b;
89
+ var _a;
90
+ this.decimalPlaces = this.countDecimals(this.step);
91
+ this.onInput(); // define value
77
92
  this.label = (_a = this.element.textContent) !== null && _a !== void 0 ? _a : '';
78
- this.inputElement = (_b = this.element.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector('.field');
79
- this.value = parseInt(this.inputElement.value);
80
93
  this.calculateProgress();
81
94
  }
82
95
  render() {
83
- 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 }))));
96
+ return (h(Host, { key: 'c7f40ef34fa414e4f99881e815fa805dfc089667' }, h("header", { key: '285c789e06277c9f0f2068b4a49036faf29dd70b', class: "header", part: "header" }, h("mds-text", { key: '485ff525a7fbca6e7a7e121bde7f44ad193bd880', class: "label", typography: "label" }, h("slot", { key: '3147cbc8b650bfa3fd87f69f6356687ccdc38024' })), h("mds-text", { key: 'c1bafcdfb7d5beda33473240b95a9f733ed7c8b9', class: "value", typography: "label" }, this.formatValue ? this.formatValue(this.value) : this.value)), h("div", { key: '26043966f0e431585aea5b453231591ebfec5dff', class: "range" }, h("div", { key: '291fa31c69d3a2a34d4eb14aeab1a9cb51f7bcb3', class: "track" }, h("div", { key: '8ee7c29eef91b226bbfe96abe62e95fad2094e7a', class: "contrast-area" }), h("div", { key: 'd3e4433931276f474ebe24893826da680f17d541', class: "track-total" }, h("div", { key: '87fa236d8538776e5a3372239307032de90e8e91', class: "track-progress", style: { width: `${this.progress}%` } }))), h("input", { key: '0eb811c18c9e9fe81d5df4e5ce019e800aad75e2', ref: el => this.inputElement = el, 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 }))));
84
97
  }
85
98
  static get formAssociated() { return true; }
86
99
  get element() { return this; }
@@ -93,6 +106,7 @@ const MdsInputRange$1 = /*@__PURE__*/ proxyCustomElement(class MdsInputRange ext
93
106
  }; }
94
107
  static get style() { return MdsInputRangeStyle0; }
95
108
  }, [65, "mds-input-range", {
109
+ "formatValue": [16],
96
110
  "max": [2],
97
111
  "min": [2],
98
112
  "step": [2],
@@ -1,5 +1,5 @@
1
1
  {
2
- "timestamp": "2025-03-10T12:32:28",
2
+ "timestamp": "2025-04-02T09:16:45",
3
3
  "compiler": {
4
4
  "name": "@stencil/core",
5
5
  "version": "4.27.2",
@@ -45,6 +45,31 @@
45
45
  "getter": false,
46
46
  "setter": false
47
47
  },
48
+ {
49
+ "name": "formatValue",
50
+ "type": "((value: number) => string) | undefined",
51
+ "complexType": {
52
+ "original": "(value: number) => string",
53
+ "resolved": "((value: number) => string) | undefined",
54
+ "references": {}
55
+ },
56
+ "mutable": false,
57
+ "reflectToAttr": false,
58
+ "docs": "A function to custom how value is represented",
59
+ "docsTags": [],
60
+ "values": [
61
+ {
62
+ "type": "((value: number) => string)"
63
+ },
64
+ {
65
+ "type": "undefined"
66
+ }
67
+ ],
68
+ "optional": true,
69
+ "required": false,
70
+ "getter": false,
71
+ "setter": false
72
+ },
48
73
  {
49
74
  "name": "max",
50
75
  "type": "number",
@@ -1,5 +1,5 @@
1
1
  const NAMESPACE = 'mds-input-range';
2
- const BUILD = /* mds-input-range */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, constructableCSS: true, cssAnnotations: true, devTools: false, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: true, hasRenderFn: true, hostListener: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: true, hydratedClass: false, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, modernPropertyDecls: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: true, propNumber: true, propString: false, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: true, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: false, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: false, watchCallback: true };
2
+ const BUILD = /* mds-input-range */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, constructableCSS: true, cssAnnotations: true, devTools: false, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: true, hasRenderFn: true, hostListener: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: true, hydratedClass: false, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, modernPropertyDecls: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: true, propNumber: true, propString: false, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: true, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: false, watchCallback: true };
3
3
 
4
4
  /*
5
5
  Stencil Client Platform v4.27.2 | MIT Licensed | https://stenciljs.com
@@ -451,7 +451,11 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
451
451
  }
452
452
  }
453
453
  }
454
- } else if (memberName === "key") ; else if ((!isProp ) && memberName[0] === "o" && memberName[1] === "n") {
454
+ } else if (memberName === "key") ; else if (memberName === "ref") {
455
+ if (newValue) {
456
+ newValue(elm);
457
+ }
458
+ } else if ((!isProp ) && memberName[0] === "o" && memberName[1] === "n") {
455
459
  if (memberName[2] === "-") {
456
460
  memberName = memberName.slice(3);
457
461
  } else if (isMemberInElement(win, ln)) {
@@ -609,6 +613,7 @@ var removeVnodes = (vnodes, startIdx, endIdx) => {
609
613
  const vnode = vnodes[index];
610
614
  if (vnode) {
611
615
  const elm = vnode.$elm$;
616
+ nullifyVNodeRefs(vnode);
612
617
  if (elm) {
613
618
  elm.remove();
614
619
  }
@@ -737,6 +742,12 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
737
742
  elm.data = text;
738
743
  }
739
744
  };
745
+ var nullifyVNodeRefs = (vNode) => {
746
+ {
747
+ vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
748
+ vNode.$children$ && vNode.$children$.map(nullifyVNodeRefs);
749
+ }
750
+ };
740
751
  var insertBefore = (parent, newNode, reference) => {
741
752
  {
742
753
  return parent == null ? void 0 : parent.insertBefore(newNode, reference);
@@ -1,11 +1,11 @@
1
- import { b as bootstrapLazy } from './index-476f378c.js';
2
- export { s as setNonce } from './index-476f378c.js';
1
+ import { b as bootstrapLazy } from './index-e9d1fa7e.js';
2
+ export { s as setNonce } from './index-e9d1fa7e.js';
3
3
  import { g as globalScripts } from './app-globals-0f993ce5.js';
4
4
 
5
5
  const defineCustomElements = async (win, options) => {
6
6
  if (typeof window === 'undefined') return undefined;
7
7
  await globalScripts();
8
- return bootstrapLazy([["mds-input-range",[[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);
8
+ return bootstrapLazy([["mds-input-range",[[65,"mds-input-range",{"formatValue":[16],"max":[2],"min":[2],"step":[2],"disabled":[1540],"value":[1538],"progress":[32]},null,{"disabled":["disabledChanged"],"value":["valueChanged"],"min":["minChanged"],"max":["maxChanged"],"step":["stepChanged"]}]]]], options);
9
9
  };
10
10
 
11
11
  export { defineCustomElements };