@maggioli-design-system/mds-input-range 2.0.0 → 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.
Files changed (91) hide show
  1. package/dist/cjs/{index-f984e289.js → index-52e46581.js} +4 -1
  2. package/dist/cjs/loader.cjs.js +2 -2
  3. package/dist/cjs/mds-input-range.cjs.entry.js +21 -5
  4. package/dist/cjs/mds-input-range.cjs.js +2 -2
  5. package/dist/collection/common/aria.js +17 -1
  6. package/dist/collection/common/device.js +6 -0
  7. package/dist/collection/common/keyboard-manager.js +2 -2
  8. package/dist/collection/common/slot.js +13 -0
  9. package/dist/collection/components/mds-input-range/mds-input-range.css +22 -2
  10. package/dist/collection/components/mds-input-range/mds-input-range.js +38 -3
  11. package/dist/collection/components/mds-input-range/test/mds-input-range.stories.js +12 -4
  12. package/dist/collection/dictionary/animation.js +5 -0
  13. package/dist/collection/dictionary/file-extensions.js +61 -56
  14. package/dist/collection/dictionary/text.js +60 -1
  15. package/dist/collection/fixtures/filenames.js +62 -1
  16. package/dist/collection/type/animation.js +1 -0
  17. package/dist/collection/type/variant-file-format.js +5 -0
  18. package/dist/components/mds-input-range.js +22 -4
  19. package/dist/documentation.json +25 -1
  20. package/dist/esm/{index-e0ac0a55.js → index-36162582.js} +4 -1
  21. package/dist/esm/loader.js +3 -3
  22. package/dist/esm/mds-input-range.entry.js +21 -5
  23. package/dist/esm/mds-input-range.js +3 -3
  24. package/dist/esm-es5/index-36162582.js +1 -0
  25. package/dist/esm-es5/loader.js +1 -1
  26. package/dist/esm-es5/mds-input-range.entry.js +1 -1
  27. package/dist/esm-es5/mds-input-range.js +1 -1
  28. package/dist/mds-input-range/mds-input-range.esm.js +1 -1
  29. package/dist/mds-input-range/mds-input-range.js +1 -1
  30. package/dist/mds-input-range/p-939e9c32.system.js +1 -0
  31. package/dist/mds-input-range/p-c39460f4.system.js +2 -0
  32. package/{www/build/p-f6cc8c2e.js → dist/mds-input-range/p-d06a229e.js} +1 -1
  33. package/dist/mds-input-range/p-d9e1b94c.system.entry.js +1 -0
  34. package/dist/mds-input-range/p-e5a76261.entry.js +1 -0
  35. package/dist/stats.json +84 -32
  36. package/dist/types/common/aria.d.ts +3 -1
  37. package/dist/types/common/device.d.ts +2 -0
  38. package/dist/types/common/slot.d.ts +2 -0
  39. package/dist/types/components/mds-input-range/mds-input-range.d.ts +7 -0
  40. package/dist/types/components/mds-input-range/test/mds-input-range.stories.d.ts +7 -4
  41. package/dist/types/components.d.ts +8 -0
  42. package/dist/types/dictionary/animation.d.ts +2 -0
  43. package/dist/types/dictionary/text.d.ts +3 -1
  44. package/dist/types/fixtures/filenames.d.ts +62 -1
  45. package/dist/types/type/animation.d.ts +1 -0
  46. package/dist/types/type/file-types.d.ts +1 -1
  47. package/dist/types/type/text.d.ts +2 -0
  48. package/dist/types/type/variant-file-format.d.ts +1 -1
  49. package/documentation.json +49 -10
  50. package/package.json +2 -2
  51. package/readme.md +7 -6
  52. package/src/common/aria.ts +22 -2
  53. package/src/common/device.ts +9 -0
  54. package/src/common/keyboard-manager.ts +2 -2
  55. package/src/common/slot.ts +15 -0
  56. package/src/components/mds-input-range/css/mds-input-range-disabled.css +9 -0
  57. package/src/components/mds-input-range/mds-input-range.css +12 -2
  58. package/src/components/mds-input-range/mds-input-range.tsx +26 -0
  59. package/src/components/mds-input-range/readme.md +7 -6
  60. package/src/components/mds-input-range/test/mds-input-range.stories.tsx +13 -4
  61. package/src/components.d.ts +8 -0
  62. package/src/dictionary/animation.ts +8 -0
  63. package/src/dictionary/file-extensions.ts +61 -56
  64. package/src/dictionary/text.ts +64 -0
  65. package/src/fixtures/filenames.ts +63 -0
  66. package/src/fixtures/icons.json +9 -0
  67. package/src/fixtures/iconsauce.json +5 -0
  68. package/src/meta/file-format/locale.el.json +44 -0
  69. package/src/meta/file-format/locale.en.json +44 -0
  70. package/src/meta/file-format/locale.es.json +44 -0
  71. package/src/meta/file-format/locale.it.json +44 -0
  72. package/src/type/animation.ts +3 -0
  73. package/src/type/file-types.ts +6 -0
  74. package/src/type/text.ts +59 -0
  75. package/src/type/variant-file-format.ts +6 -0
  76. package/www/build/mds-input-range.esm.js +1 -1
  77. package/www/build/mds-input-range.js +1 -1
  78. package/www/build/p-939e9c32.system.js +1 -0
  79. package/www/build/p-c39460f4.system.js +2 -0
  80. package/{dist/mds-input-range/p-f6cc8c2e.js → www/build/p-d06a229e.js} +1 -1
  81. package/www/build/p-d9e1b94c.system.entry.js +1 -0
  82. package/www/build/p-e5a76261.entry.js +1 -0
  83. package/dist/esm-es5/index-e0ac0a55.js +0 -1
  84. package/dist/mds-input-range/p-4e0b934e.system.js +0 -2
  85. package/dist/mds-input-range/p-76412b19.system.js +0 -1
  86. package/dist/mds-input-range/p-a84fc6af.system.entry.js +0 -1
  87. package/dist/mds-input-range/p-b81446a9.entry.js +0 -1
  88. package/www/build/p-4e0b934e.system.js +0 -2
  89. package/www/build/p-76412b19.system.js +0 -1
  90. package/www/build/p-a84fc6af.system.entry.js +0 -1
  91. package/www/build/p-b81446a9.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: false, propMutable: true, propNumber: true, propString: false, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: true, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: false, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: false, watchCallback: true };
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
  }
@@ -2,13 +2,13 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-f984e289.js');
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-f984e289.js');
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-09));\n --mds-input-range-track-size: 0.5rem;\n --mds-input-range-track-progress-background: rgb(var(--variant-primary-03));\n gap: 0.25rem;\n -webkit-transition-duration: 200ms;\n transition-duration: 200ms;\n\n display: grid;\n -webkit-transition-property: color;\n transition-property: color;\n}\n\n.header {\n gap: 0.5rem;\n\n display: -ms-flexbox;\n\n display: flex;\n}\n\n.label {\n min-width: 0rem;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.value {\n margin-left: auto;\n}\n\n.range {\n -ms-flex-align: center;\n align-items: center;\n display: -ms-flexbox;\n display: flex;\n height: var(--mds-input-range-thumb-size);\n position: relative;\n}\n\n.track {\n width: 100%;\n\n --margin: calc(var(--mds-input-range-track-size) / 2);\n\n -webkit-box-sizing: border-box;\n\n box-sizing: border-box;\n padding: 0 var(--margin);\n position: absolute;\n}\n\n.field {\n -webkit-animation-duration: var(--magma-outline-animation-duration, 1s);\n animation-duration: var(--magma-outline-animation-duration, 1s);\n -webkit-animation-fill-mode: forwards;\n animation-fill-mode: forwards;\n -webkit-animation-iteration-count: infinite;\n animation-iteration-count: infinite;\n -webkit-animation-name: focus-bounce;\n animation-name: focus-bounce;\n -webkit-animation-play-state: paused;\n animation-play-state: paused;\n -webkit-animation-timing-function: cubic-bezier(0, 0, 0.2, 1);\n animation-timing-function: cubic-bezier(0, 0, 0.2, 1);\n outline: var(--magma-outline-blur);\n -webkit-transition-duration: 200ms;\n transition-duration: 200ms;\n -webkit-transition-property: background-color, border-color, color, fill, outline, outline-offset, -webkit-box-shadow, -webkit-transform;\n transition-property: background-color, border-color, color, fill, outline, outline-offset, -webkit-box-shadow, -webkit-transform;\n transition-property: background-color, border-color, box-shadow, color, fill, outline, outline-offset, transform;\n transition-property: background-color, border-color, box-shadow, color, fill, outline, outline-offset, transform, -webkit-box-shadow, -webkit-transform;\n -webkit-transition-timing-function: ease-in-out;\n transition-timing-function: ease-in-out;\n }\n\n.field:focus-visible {\n\n --magma-outline-blur: var(--magma-outline-focus);\n\n -webkit-animation-play-state: running;\n\n animation-play-state: running;\n }\n\n.field {\n z-index: 20;\n height: 1rem;\n\n -webkit-appearance: none;\n\n -moz-appearance: none;\n\n appearance: none;\n background-color: transparent;\n border-radius: 1000px;\n -ms-flex-positive: 1;\n flex-grow: 1;\n margin: 0;\n}\n\n.field:focus-visible {\n\n --magma-outline-blur: var(--magma-outline-focus);\n\n -webkit-animation-play-state: running;\n\n animation-play-state: running;\n }\n\n.field::-webkit-slider-thumb {\n -webkit-appearance: none;\n appearance: none;\n background-color: var(--mds-input-range-thumb-background);\n border: 0;\n border-radius: var(--mds-input-range-thumb-size);\n -webkit-box-shadow: var(--mds-input-range-thumb-shadow);\n box-shadow: var(--mds-input-range-thumb-shadow);\n cursor: -webkit-grab;\n cursor: grab;\n height: var(--mds-input-range-thumb-size);\n line-height: 0;\n -webkit-transform: translate(0, -50%);\n transform: translate(0, -50%);\n width: var(--mds-input-range-thumb-size);\n}\n\n.field::-webkit-slider-runnable-track {\n -webkit-appearance: none;\n appearance: none;\n border: 0;\n height: 0;\n width: 100%;\n}\n\n.track-progress {\n -webkit-transition-duration: 300ms;\n transition-duration: 300ms;\n -webkit-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n\n background-color: var(--mds-input-range-track-progress-background);\n display: -ms-flexbox;\n display: flex;\n height: var(--mds-input-range-track-size);\n -webkit-transition-property: background-color;\n transition-property: background-color;\n}\n\n.track-total {\n -webkit-transition-duration: 300ms;\n transition-duration: 300ms;\n -webkit-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n\n background-color: var(--mds-input-range-track-background);\n border-radius: var(--mds-input-range-track-size);\n display: -ms-flexbox;\n display: flex;\n height: var(--mds-input-range-track-size);\n overflow: hidden;\n -webkit-transition-property: background-color;\n transition-property: background-color;\n width: 100%;\n}\n\n.contrast-area {\n margin-left: 0.25rem;\n margin-right: 0.25rem;\n\n border-radius: var(--mds-input-range-track-size);\n}\n\n@tailwind utilities;\n\n@container style(--magma-pref-animation: reduce) {\n :host,\n .field::-webkit-slider-thumb,\n .field::-webkit-slider-runnable-track,\n .track-progress,\n .track-total {\n -webkit-transition-duration: 0s;\n transition-duration: 0s;\n }\n}\n\n@container style(--magma-pref-animation: system) {\n\n @media (prefers-reduced-motion) {\n :host,\n .field::-webkit-slider-thumb,\n .field::-webkit-slider-runnable-track,\n .track-progress,\n .track-total {\n -webkit-transition-duration: 0s;\n transition-duration: 0s;\n }\n }\n}\n\n@tailwind utilities;\n\n@container style(--magma-pref-theme: dark) {\n :host {\n\n --mds-input-range-thumb-background: rgb(var(--variant-primary-04));\n --mds-input-range-track-background: rgb(var(--tone-neutral-07));\n --mds-input-range-track-progress-background: rgb(var(--variant-primary-05));\n }\n}\n\n@container style(--magma-pref-theme: system) {\n\n @media (prefers-color-scheme: dark) {\n :host {\n\n --mds-input-range-thumb-background: rgb(var(--variant-primary-04));\n --mds-input-range-track-background: rgb(var(--tone-neutral-07));\n --mds-input-range-track-progress-background: rgb(var(--variant-primary-05));\n }\n }\n}\n\n@container style(--magma-pref-contrast: more) {\n :host {\n color: rgb(var(--tone-neutral-01));\n }\n}\n\n@container style(--magma-pref-contrast: system) {\n\n @media (prefers-contrast: more) {\n :host {\n color: rgb(var(--tone-neutral-01));\n }\n }\n}\n\n\n";
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,18 +70,23 @@ 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
- var _a;
64
- this.inputElement = (_a = this.element.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.field');
77
+ var _a, _b;
78
+ this.label = (_a = this.element.textContent) !== null && _a !== void 0 ? _a : '';
79
+ this.inputElement = (_b = this.element.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector('.field');
65
80
  this.value = parseInt(this.inputElement.value);
66
81
  this.calculateProgress();
67
82
  }
68
83
  render() {
69
- return (index.h(index.Host, { key: '1bf968bd8ada3e6859369e0748d4c91441d54d32' }, index.h("header", { key: '1871c6d5eb4b437563e045fbbed982061e31a145', class: "header", part: "header" }, index.h("mds-text", { key: '9db4e20a523bb0182b4df3413161485c7d8649b7', class: "label", typography: "label" }, index.h("slot", { key: 'b5c8da4e94dc2a6adce7dd411b36f0f8dc78f461' })), index.h("mds-text", { key: '018703c3f4470b2f9f9971d404e2ac1de9f23b96', class: "value", typography: "label" }, this.value)), index.h("div", { key: '46fc7c92462b5b5ad72c95cbceabaa2a63f68b29', class: "range" }, index.h("div", { key: '7c4c6590c8f4b497370a1e992593080dea24037f', class: "track" }, index.h("div", { key: '8d8c34357408bd1ddd44cda3a3bdd7883aaaa70c', class: "contrast-area" }), index.h("div", { key: '25f597c9b4a1889568468ec8a4e6130dd68e0afa', class: "track-total" }, index.h("div", { key: 'f64b454fac7145354eae16804315bb424507dc70', class: "track-progress", style: { width: `${this.progress}%` } }))), index.h("input", { key: '17ffd9fe1584698de222e619d17e3b849b5b82ae', class: "field", max: this.max, min: this.min, onInput: this.onInput, step: this.step, type: "range", value: this.value }))));
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 }))));
70
85
  }
71
86
  static get formAssociated() { return true; }
72
87
  get element() { return index.getElement(this); }
73
88
  static get watchers() { return {
89
+ "disabled": ["disabledChanged"],
74
90
  "value": ["valueChanged"],
75
91
  "min": ["minChanged"],
76
92
  "max": ["maxChanged"],
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-f984e289.js');
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;
@@ -18,6 +18,22 @@ const setAttributeIfEmpty = (element, attribute, value) => {
18
18
  element.setAttribute(attribute, value);
19
19
  return value;
20
20
  };
21
+ const removeAttributesIf = (element, attribute, valueCheck = 'true', cleanAttributes) => {
22
+ if (ifAttribute(element, attribute, valueCheck)) {
23
+ const attributesList = Array.isArray(cleanAttributes) ? cleanAttributes : [cleanAttributes];
24
+ attributesList.forEach(attributeToRemove => {
25
+ element.removeAttribute(attributeToRemove);
26
+ });
27
+ return true;
28
+ }
29
+ return false;
30
+ };
31
+ const ifAttribute = (element, attribute, valueCheck = 'true') => {
32
+ if (element.hasAttribute(attribute) && element.getAttribute(attribute) === valueCheck) {
33
+ return true;
34
+ }
35
+ return false;
36
+ };
21
37
  const hashValue = (value) => `${value}-${hash(value)}`;
22
38
  const hashRandomValue = (value) => {
23
39
  const randomValue = randomInt(1000000);
@@ -26,4 +42,4 @@ const hashRandomValue = (value) => {
26
42
  }
27
43
  return hash(randomValue.toString());
28
44
  };
29
- export { unslugName, setAttributeIfEmpty, hashRandomValue, hashValue, };
45
+ export { hashRandomValue, hashValue, removeAttributesIf, setAttributeIfEmpty, ifAttribute, unslugName, };
@@ -0,0 +1,6 @@
1
+ const isMobileDevice = () => {
2
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
3
+ const userAgent = navigator.userAgent || navigator.vendor || window.opera;
4
+ return /android|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(userAgent);
5
+ };
6
+ export { isMobileDevice, };
@@ -31,13 +31,13 @@ export class KeyboardManager {
31
31
  };
32
32
  this.attachEscapeBehavior = (callback) => {
33
33
  this.escapeCallback = callback;
34
- if (window !== undefined) {
34
+ if (typeof window !== 'undefined') {
35
35
  window.addEventListener('keydown', this.handleEscapeBehaviorDispatchEvent.bind(this));
36
36
  }
37
37
  };
38
38
  this.detachEscapeBehavior = () => {
39
39
  this.escapeCallback = () => { return; };
40
- if (window !== undefined) {
40
+ if (typeof window !== 'undefined') {
41
41
  window.removeEventListener('keydown', this.handleEscapeBehaviorDispatchEvent.bind(this));
42
42
  }
43
43
  };
@@ -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-09));
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: 200ms;
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,14 +56,18 @@ 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
- var _a;
50
- this.inputElement = (_a = this.element.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.field');
63
+ var _a, _b;
64
+ this.label = (_a = this.element.textContent) !== null && _a !== void 0 ? _a : '';
65
+ this.inputElement = (_b = this.element.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector('.field');
51
66
  this.value = parseInt(this.inputElement.value);
52
67
  this.calculateProgress();
53
68
  }
54
69
  render() {
55
- return (h(Host, { key: '1bf968bd8ada3e6859369e0748d4c91441d54d32' }, h("header", { key: '1871c6d5eb4b437563e045fbbed982061e31a145', class: "header", part: "header" }, h("mds-text", { key: '9db4e20a523bb0182b4df3413161485c7d8649b7', class: "label", typography: "label" }, h("slot", { key: 'b5c8da4e94dc2a6adce7dd411b36f0f8dc78f461' })), h("mds-text", { key: '018703c3f4470b2f9f9971d404e2ac1de9f23b96', class: "value", typography: "label" }, this.value)), h("div", { key: '46fc7c92462b5b5ad72c95cbceabaa2a63f68b29', class: "range" }, h("div", { key: '7c4c6590c8f4b497370a1e992593080dea24037f', class: "track" }, h("div", { key: '8d8c34357408bd1ddd44cda3a3bdd7883aaaa70c', class: "contrast-area" }), h("div", { key: '25f597c9b4a1889568468ec8a4e6130dd68e0afa', class: "track-total" }, h("div", { key: 'f64b454fac7145354eae16804315bb424507dc70', class: "track-progress", style: { width: `${this.progress}%` } }))), h("input", { key: '17ffd9fe1584698de222e619d17e3b849b5b82ae', class: "field", max: this.max, min: this.min, onInput: this.onInput, step: this.step, type: "range", value: this.value }))));
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 }))));
56
71
  }
57
72
  static get is() { return "mds-input-range"; }
58
73
  static get encapsulation() { return "shadow"; }
@@ -123,6 +138,23 @@ export class MdsInputRange {
123
138
  "reflect": false,
124
139
  "defaultValue": "1"
125
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
+ },
126
158
  "value": {
127
159
  "type": "number",
128
160
  "mutable": true,
@@ -168,6 +200,9 @@ export class MdsInputRange {
168
200
  static get elementRef() { return "element"; }
169
201
  static get watchers() {
170
202
  return [{
203
+ "propName": "disabled",
204
+ "methodName": "disabledChanged"
205
+ }, {
171
206
  "propName": "value",
172
207
  "methodName": "valueChanged"
173
208
  }, {
@@ -2,20 +2,24 @@ 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
- type: { name: 'number', required: true },
10
+ type: { name: 'number' },
7
11
  description: 'The lowest value in the range of permitted values',
8
12
  },
9
13
  max: {
10
- type: { name: 'number', required: true },
14
+ type: { name: 'number' },
11
15
  description: 'The greatest value in the range of permitted values',
12
16
  },
13
17
  step: {
14
- type: { name: 'number', required: true },
18
+ type: { name: 'number' },
15
19
  description: 'The step attribute is a number that specifies the granularity that the value must adhere to, or the special value any, which is described below',
16
20
  },
17
21
  value: {
18
- type: { name: 'number', required: true },
22
+ type: { name: 'number' },
19
23
  description: 'The value attribute contains a number which contains a representation of the selected number',
20
24
  },
21
25
  },
@@ -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,
@@ -0,0 +1,5 @@
1
+ const horizontalActionsAnimationDictionary = [
2
+ 'fade',
3
+ 'slide',
4
+ ];
5
+ export { horizontalActionsAnimationDictionary, };
@@ -1,60 +1,65 @@
1
1
  const fileExtensionsDictionary = {
2
- '7z': { format: 'archive', description: 'Archivio compresso' },
3
- ace: { format: 'archive', description: 'Archivio compresso' },
4
- ai: { format: 'vector', description: 'Vettoriale Adobe Illustrator' },
5
- dart: { format: 'code', description: 'Dart' },
6
- db: { format: 'data', description: 'File di database' },
7
- default: { format: 'attachment', description: 'Formato sconosciuto' },
8
- dmg: { format: 'executable', description: 'Apple Disk Image' },
9
- doc: { format: 'text', description: 'Documento Microsoft Word' },
10
- docm: { format: 'text', description: 'Documento Microsoft Word' },
11
- docx: { format: 'text', description: 'Documento Microsoft Word Compresso' },
12
- eml: { format: 'email', description: 'E-mail di posta elettronica' },
13
- eps: { format: 'vector', description: 'Vettoriale Corel Draw' },
14
- exe: { format: 'executable', description: 'File eseguibile Windows' },
15
- flac: { format: 'audio', description: 'Audio non compresso' },
16
- gif: { format: 'image', description: 'Immagine compressa', preview: true },
17
- htm: { format: 'markup', description: 'Pagina web' },
18
- heic: { format: 'image', description: 'High Efficiency Image File Format' },
19
- html: { format: 'markup', description: 'Pagina web' },
20
- jpe: { format: 'image', description: 'Immagine compressa', preview: true },
21
- jpeg: { format: 'image', description: 'Immagine compressa', preview: true },
22
- jpg: { format: 'image', description: 'Immagine compressa', preview: true },
23
- js: { format: 'code', description: 'JavaScript' },
24
- json: { format: 'data', description: 'JavaScript Object Notation' },
25
- jsx: { format: 'code', description: 'JavaScript' },
26
- m2v: { format: 'video', description: 'Filmato SD' },
27
- mp2: { format: 'audio', description: 'Audio compresso' },
28
- mp3: { format: 'audio', description: 'Audio compresso' },
29
- mp4: { format: 'video', description: 'Filmato HD' },
30
- mp4v: { format: 'video', description: 'Filmato HD' },
31
- mpeg: { format: 'video', description: 'Filmato SD' },
32
- mpg4: { format: 'video', description: 'Filmato SD' },
33
- mpg: { format: 'video', description: 'Filmato SD' },
34
- mpga: { format: 'audio', description: 'Audio compresso' },
35
- odp: { format: 'slide', description: 'Slide di presentazione LibreOffice' },
36
- ods: { format: 'spreadsheet', description: 'Foglio di calcolo LibreOffice' },
37
- odt: { format: 'text', description: 'File di testo LibreOffice' },
38
- pdf: { format: 'document', description: 'Documento Adobe' },
39
- php: { format: 'code', description: 'Hypertext Preprocessor' },
40
- png: { format: 'image', description: 'Immagine Portable Network Graphics', preview: true },
41
- ppt: { format: 'slide', description: 'Slide di presentazione PowerPoint' },
42
- rar: { format: 'archive', description: 'Archivio compresso' },
43
- rtf: { format: 'text', description: 'Documento di testo Rich Text Format' },
44
- sass: { format: 'code', description: 'Syntactically Awesome StyleSheets' },
45
- shtml: { format: 'markup', description: 'Pagina web' },
46
- svg: { format: 'vector', description: 'Scalable Vector Graphics', preview: true },
47
- tar: { format: 'archive', description: 'Archivio non compresso' },
48
- tiff: { format: 'image', description: 'Tag Image File Format' },
49
- ts: { format: 'code', description: 'TypeScript' },
50
- tsx: { format: 'code', description: 'TypeScript Extended Syntax' },
51
- txt: { format: 'text', description: 'Documento di testo non formattato' },
52
- wav: { format: 'audio', description: 'Audio non compresso' },
53
- webp: { format: 'image', description: 'Immagine Web Picture', preview: true },
54
- xar: { format: 'archive', description: 'Archivio compresso' },
55
- xls: { format: 'spreadsheet', description: 'Foglio di calcolo Office' },
56
- xlsx: { format: 'spreadsheet', description: 'Foglio di calcolo Office' },
57
- zip: { format: 'archive', description: 'Archivio compresso' },
2
+ '7z': { format: 'archive', description: 'compressedArchive' },
3
+ ace: { format: 'archive', description: 'compressedArchive' },
4
+ ai: { format: 'vector', description: 'fileAI' },
5
+ dart: { format: 'code', description: 'dart' },
6
+ db: { format: 'data', description: 'fileDB' },
7
+ default: { format: 'attachment', description: 'unknown' },
8
+ dmg: { format: 'executable', description: 'appleDiskImage' },
9
+ doc: { format: 'text', description: 'documentMS' },
10
+ docm: { format: 'text', description: 'documentMS' },
11
+ docx: { format: 'text', description: 'compressedDocumentMS' },
12
+ eml: { format: 'email', description: 'email' },
13
+ eps: { format: 'vector', description: 'fileEPS' },
14
+ exe: { format: 'executable', description: 'fileEXE' },
15
+ flac: { format: 'audio', description: 'uncompressedAudio' },
16
+ gif: { format: 'image', description: 'compressedImage', preview: true },
17
+ heic: { format: 'image', description: 'imageHEFF' },
18
+ htm: { format: 'markup', description: 'documentWeb' },
19
+ html: { format: 'markup', description: 'documentWeb' },
20
+ jpe: { format: 'image', description: 'compressedImage', preview: true },
21
+ jpeg: { format: 'image', description: 'compressedImage', preview: true },
22
+ jpg: { format: 'image', description: 'compressedImage', preview: true },
23
+ js: { format: 'code', description: 'fileJS' },
24
+ json: { format: 'data', description: 'fileJSON' },
25
+ jsx: { format: 'code', description: 'fileJS' },
26
+ m2v: { format: 'video', description: 'videoSD' },
27
+ mp2: { format: 'audio', description: 'compressedAudio' },
28
+ mp3: { format: 'audio', description: 'compressedAudio' },
29
+ mp4: { format: 'video', description: 'videoHD' },
30
+ mp4v: { format: 'video', description: 'videoHD' },
31
+ mpeg: { format: 'video', description: 'videoSD' },
32
+ mpg4: { format: 'video', description: 'videoSD' },
33
+ mpg: { format: 'video', description: 'videoSD' },
34
+ mpga: { format: 'audio', description: 'compressedAudio' },
35
+ odf: { format: 'document', description: 'openDocumentFormat' },
36
+ odp: { format: 'slide', description: 'slideLO' },
37
+ ods: { format: 'spreadsheet', description: 'spreadsheetLO' },
38
+ odt: { format: 'text', description: 'documentLO' },
39
+ ole: { format: 'document', description: 'objectLinkingAndEmbedding' },
40
+ p7m: { format: 'certificate', description: 'documentDigitalSingnature' },
41
+ pdf: { format: 'document', description: 'documentAdobe' },
42
+ php: { format: 'code', description: 'filePHP' },
43
+ png: { format: 'image', description: 'imagePNG', preview: true },
44
+ ppt: { format: 'slide', description: 'slidePowerPoint' },
45
+ rar: { format: 'archive', description: 'compressedArchive' },
46
+ rtf: { format: 'text', description: 'documentRTF' },
47
+ sass: { format: 'code', description: 'fileSASS' },
48
+ shtml: { format: 'markup', description: 'documentWeb' },
49
+ svg: { format: 'vector', description: 'imageSVG', preview: true },
50
+ tar: { format: 'archive', description: 'uncompressedArchive' },
51
+ tiff: { format: 'image', description: 'imageTIFF' },
52
+ ts: { format: 'code', description: 'fileTS' },
53
+ tsd: { format: 'certificate', description: 'certificateTSD' },
54
+ tsx: { format: 'code', description: 'fileTSX' },
55
+ txt: { format: 'text', description: 'documentTXT' },
56
+ wav: { format: 'audio', description: 'uncompressedAudio' },
57
+ webp: { format: 'image', description: 'imageWEBP', preview: true },
58
+ xar: { format: 'archive', description: 'compressedArchive' },
59
+ xls: { format: 'spreadsheet', description: 'spreadsheetMS' },
60
+ xlsx: { format: 'spreadsheet', description: 'spreadsheetMS' },
61
+ xml: { format: 'markup', description: 'extensibleMarkupLanguage' },
62
+ zip: { format: 'archive', description: 'compressedArchive' },
58
63
  };
59
64
  const genericMimeToExt = new Map([
60
65
  ['image', ['.png', '.jpg', '.jpeg', '.tiff', '.webp', '.jpe', '.gif', '.heic']],
@@ -1,6 +1,65 @@
1
+ const typographyTagDictionary = [
2
+ 'abbr',
3
+ 'address',
4
+ 'article',
5
+ 'b',
6
+ 'bdo',
7
+ 'blockquote',
8
+ 'cite',
9
+ 'code',
10
+ 'dd',
11
+ 'del',
12
+ 'details',
13
+ 'dfn',
14
+ 'div',
15
+ 'dl',
16
+ 'dt',
17
+ 'em',
18
+ 'figcaption',
19
+ 'h1',
20
+ 'h2',
21
+ 'h3',
22
+ 'h4',
23
+ 'h5',
24
+ 'h6',
25
+ 'i',
26
+ 'ins',
27
+ 'kbd',
28
+ 'label',
29
+ 'legend',
30
+ 'li',
31
+ 'mark',
32
+ 'ol',
33
+ 'p',
34
+ 'pre',
35
+ 'q',
36
+ 'rb',
37
+ 'rt',
38
+ 'ruby',
39
+ 's',
40
+ 'samp',
41
+ 'small',
42
+ 'span',
43
+ 'strong',
44
+ 'sub',
45
+ 'summary',
46
+ 'sup',
47
+ 'time',
48
+ 'u',
49
+ 'ul',
50
+ 'var',
51
+ ];
52
+ const typographyHeadingTagDictionary = [
53
+ 'h1',
54
+ 'h2',
55
+ 'h3',
56
+ 'h4',
57
+ 'h5',
58
+ 'h6',
59
+ ];
1
60
  const truncateDictionary = [
2
61
  'all',
3
62
  'none',
4
63
  'word',
5
64
  ];
6
- export { truncateDictionary, };
65
+ export { truncateDictionary, typographyHeadingTagDictionary, typographyTagDictionary, };