@maggioli-design-system/mds-input-tip 1.1.3 → 1.2.2

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 (99) hide show
  1. package/dist/cjs/{index-f87612f6.js → index-442db91d.js} +14 -3
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/mds-input-tip.cjs.entry.js +2 -2
  4. package/dist/cjs/mds-input-tip.cjs.js +2 -2
  5. package/dist/collection/collection-manifest.json +2 -2
  6. package/dist/collection/common/aria.js +17 -1
  7. package/dist/collection/common/device.js +6 -0
  8. package/dist/collection/common/keyboard-manager.js +2 -2
  9. package/dist/collection/common/locale.js +17 -5
  10. package/dist/collection/components/mds-input-tip/mds-input-tip.css +1 -228
  11. package/dist/collection/dictionary/button.js +1 -0
  12. package/dist/collection/dictionary/file-extensions.js +114 -56
  13. package/dist/collection/dictionary/text.js +60 -1
  14. package/dist/collection/dictionary/variant.js +10 -1
  15. package/dist/collection/type/variant-file-format.js +0 -34
  16. package/dist/components/mds-input-tip.js +1 -1
  17. package/dist/documentation.json +3 -3
  18. package/dist/esm/{index-a04da9f4.js → index-8fed469d.js} +14 -3
  19. package/dist/esm/loader.js +2 -2
  20. package/dist/esm/mds-input-tip.entry.js +2 -2
  21. package/dist/esm/mds-input-tip.js +3 -3
  22. package/dist/esm-es5/index-8fed469d.js +1 -0
  23. package/dist/esm-es5/loader.js +1 -1
  24. package/dist/esm-es5/mds-input-tip.entry.js +1 -1
  25. package/dist/esm-es5/mds-input-tip.js +1 -1
  26. package/dist/mds-input-tip/mds-input-tip.esm.js +1 -1
  27. package/dist/mds-input-tip/mds-input-tip.js +1 -1
  28. package/dist/mds-input-tip/p-37c61f56.system.js +2 -0
  29. package/dist/mds-input-tip/p-3e967425.js +2 -0
  30. package/dist/mds-input-tip/p-4486a5e4.entry.js +1 -0
  31. package/dist/mds-input-tip/{p-ca408384.system.js → p-c915dfb3.system.js} +1 -1
  32. package/dist/mds-input-tip/p-fadf816e.system.entry.js +1 -0
  33. package/dist/stats.json +34 -34
  34. package/dist/types/common/aria.d.ts +3 -1
  35. package/dist/types/common/date.d.ts +1 -1
  36. package/dist/types/common/device.d.ts +2 -0
  37. package/dist/types/common/file.d.ts +3 -4
  38. package/dist/types/common/locale.d.ts +3 -1
  39. package/dist/types/dictionary/file-extensions.d.ts +2 -1
  40. package/dist/types/dictionary/text.d.ts +3 -1
  41. package/dist/types/dictionary/variant.d.ts +2 -1
  42. package/dist/types/stencil-public-runtime.d.ts +6 -0
  43. package/dist/types/type/autocomplete.d.ts +1 -1
  44. package/dist/types/type/button.d.ts +1 -1
  45. package/dist/types/type/header-bar.d.ts +2 -0
  46. package/dist/types/type/input.d.ts +3 -0
  47. package/dist/types/type/text.d.ts +2 -0
  48. package/dist/types/type/variant-file-format.d.ts +4 -4
  49. package/dist/types/type/variant.d.ts +2 -1
  50. package/documentation.json +46 -26
  51. package/package.json +5 -5
  52. package/src/common/aria.ts +22 -2
  53. package/src/common/device.ts +9 -0
  54. package/src/common/file.ts +2 -3
  55. package/src/common/keyboard-manager.ts +2 -2
  56. package/src/common/locale.ts +20 -6
  57. package/src/common/unit.ts +1 -1
  58. package/src/components/mds-input-tip/.gitlab-ci.yml +5 -10
  59. package/src/components/mds-input-tip/mds-input-tip.css +2 -2
  60. package/src/dictionary/button.ts +1 -0
  61. package/src/dictionary/file-extensions.ts +118 -57
  62. package/src/dictionary/text.ts +64 -0
  63. package/src/dictionary/variant.ts +11 -0
  64. package/src/fixtures/icons.json +37 -3
  65. package/src/fixtures/iconsauce.json +26 -1
  66. package/src/meta/file-format/locale.el.json +39 -0
  67. package/src/meta/file-format/locale.en.json +39 -0
  68. package/src/meta/file-format/locale.es.json +39 -0
  69. package/src/meta/file-format/locale.it.json +39 -0
  70. package/src/tailwind/components.css +1 -1
  71. package/src/type/autocomplete.ts +0 -1
  72. package/src/type/button.ts +1 -0
  73. package/src/type/header-bar.ts +11 -0
  74. package/src/type/input.ts +4 -0
  75. package/src/type/text.ts +59 -0
  76. package/src/type/variant-file-format.ts +20 -37
  77. package/src/type/variant.ts +9 -1
  78. package/www/build/mds-input-tip.esm.js +1 -1
  79. package/www/build/mds-input-tip.js +1 -1
  80. package/www/build/p-37c61f56.system.js +2 -0
  81. package/www/build/p-3e967425.js +2 -0
  82. package/www/build/p-4486a5e4.entry.js +1 -0
  83. package/www/build/{p-ca408384.system.js → p-c915dfb3.system.js} +1 -1
  84. package/www/build/p-fadf816e.system.entry.js +1 -0
  85. package/dist/collection/type/language.js +0 -1
  86. package/dist/esm-es5/index-a04da9f4.js +0 -1
  87. package/dist/mds-input-tip/p-14639038.entry.js +0 -1
  88. package/dist/mds-input-tip/p-58828816.system.js +0 -2
  89. package/dist/mds-input-tip/p-96bf634c.js +0 -2
  90. package/dist/mds-input-tip/p-ed74ada1.system.entry.js +0 -1
  91. package/dist/types/interface/input-value.d.ts +0 -4
  92. package/dist/types/type/language.d.ts +0 -1
  93. package/src/interface/input-value.ts +0 -5
  94. package/src/type/language.ts +0 -4
  95. package/www/build/p-14639038.entry.js +0 -1
  96. package/www/build/p-58828816.system.js +0 -2
  97. package/www/build/p-96bf634c.js +0 -2
  98. package/www/build/p-ed74ada1.system.entry.js +0 -1
  99. /package/dist/collection/{interface/input-value.js → type/header-bar.js} +0 -0
@@ -24,7 +24,7 @@ const NAMESPACE = 'mds-input-tip';
24
24
  const BUILD = /* mds-input-tip */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: false, 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: false, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, 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: false, lifecycleDOMEvents: false, member: true, method: false, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: false, propNumber: false, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: true, slotChildNodesFix: false, slotRelocation: false, state: false, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: false, vdomFunctional: false, vdomKey: true, vdomListener: false, vdomPropOrAttr: true, vdomRef: false, vdomRender: true, vdomStyle: false, vdomText: false, vdomXlink: false, watchCallback: false };
25
25
 
26
26
  /*
27
- Stencil Client Platform v4.21.0 | MIT Licensed | https://stenciljs.com
27
+ Stencil Client Platform v4.22.2 | MIT Licensed | https://stenciljs.com
28
28
  */
29
29
  var __defProp = Object.defineProperty;
30
30
  var __export = (target, all) => {
@@ -343,10 +343,21 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
343
343
  if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
344
344
  if (styleContainerNode.nodeName === "HEAD") {
345
345
  const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
346
- const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : document.querySelector("style");
346
+ const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
347
347
  styleContainerNode.insertBefore(styleElm, referenceNode2);
348
348
  } else if ("host" in styleContainerNode) {
349
- styleContainerNode.prepend(styleElm);
349
+ if (supportsConstructableStylesheets) {
350
+ const stylesheet = new CSSStyleSheet();
351
+ stylesheet.replaceSync(style);
352
+ styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
353
+ } else {
354
+ const existingStyleContainer = styleContainerNode.querySelector("style");
355
+ if (existingStyleContainer) {
356
+ existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
357
+ } else {
358
+ styleContainerNode.prepend(styleElm);
359
+ }
360
+ }
350
361
  } else {
351
362
  styleContainerNode.append(styleElm);
352
363
  }
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-f87612f6.js');
5
+ const index = require('./index-442db91d.js');
6
6
  const appGlobals = require('./app-globals-3a1e7e63.js');
7
7
 
8
8
  const defineCustomElements = async (win, options) => {
@@ -2,9 +2,9 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-f87612f6.js');
5
+ const index = require('./index-442db91d.js');
6
6
 
7
- const mdsInputTipCss = "@tailwind utilities;\n\n:host {\n\n --mds-input-tip-active-translate: translate(0, 0);\n\n left: 0.25rem;\n\n right: 0.25rem;\n\n gap: 0.25rem;\n\n -webkit-transition-property: background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;\n\n transition-property: background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;\n\n transition-property: background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;\n\n transition-property: background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width, -webkit-box-shadow, -webkit-transform;\n\n -webkit-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n\n -webkit-transition-duration: 300ms;\n\n transition-duration: 300ms;\n\n -webkit-transition-timing-function: cubic-bezier(0.19, 1, 0.22, 1);\n\n transition-timing-function: cubic-bezier(0.19, 1, 0.22, 1);\n\n display: -ms-flexbox;\n\n display: flex;\n -ms-flex-pack: end;\n justify-content: flex-end;\n pointer-events: none;\n position: absolute;\n -webkit-transform: var(--mds-input-tip-active-translate);\n transform: var(--mds-input-tip-active-translate);\n}\n\n:host(:empty) {\n display: none;\n}\n\n:host([position=\"top\"]) {\n top: 0.25rem;\n}\n\n:host([position=\"bottom\"]) {\n bottom: 0.25rem;\n}\n\n:host([position=\"top\"][active]:not([active=\"false\"])) {\n\n --mds-input-tip-active-translate: translate(calc(0.25rem * -1), calc(0.25rem * -1));\n}\n\n:host([position=\"top\"][active]:not([active=\"false\"])) ::slotted( mds-input-tip-item ) {\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n}\n\n:host([position=\"bottom\"][active]:not([active=\"false\"])) {\n\n --mds-input-tip-active-translate: translate(calc(0.25rem * -1), 0.25rem);\n}\n\n:host([position=\"bottom\"][active]:not([active=\"false\"])) ::slotted( mds-input-tip-item ) {\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n}\n\n.static{\n\n position: static;\n}\n\n.fixed{\n\n position: fixed;\n}\n\n.absolute{\n\n position: absolute;\n}\n\n.relative{\n\n position: relative;\n}\n\n.border{\n\n border-width: 1px;\n}\n\n.bg-label-amaranth-10{\n\n --tw-bg-opacity: 1;\n\n background-color: rgb(var(--label-amaranth-10) / var(--tw-bg-opacity));\n}\n\n.bg-label-aqua-10{\n\n --tw-bg-opacity: 1;\n\n background-color: rgb(var(--label-aqua-10) / var(--tw-bg-opacity));\n}\n\n.bg-label-blue-10{\n\n --tw-bg-opacity: 1;\n\n background-color: rgb(var(--label-blue-10) / var(--tw-bg-opacity));\n}\n\n.bg-label-green-10{\n\n --tw-bg-opacity: 1;\n\n background-color: rgb(var(--label-green-10) / var(--tw-bg-opacity));\n}\n\n.bg-label-lime-10{\n\n --tw-bg-opacity: 1;\n\n background-color: rgb(var(--label-lime-10) / var(--tw-bg-opacity));\n}\n\n.bg-label-orange-10{\n\n --tw-bg-opacity: 1;\n\n background-color: rgb(var(--label-orange-10) / var(--tw-bg-opacity));\n}\n\n.bg-label-orchid-10{\n\n --tw-bg-opacity: 1;\n\n background-color: rgb(var(--label-orchid-10) / var(--tw-bg-opacity));\n}\n\n.bg-label-violet-10{\n\n --tw-bg-opacity: 1;\n\n background-color: rgb(var(--label-violet-10) / var(--tw-bg-opacity));\n}\n\n.bg-label-yellow-10{\n\n --tw-bg-opacity: 1;\n\n background-color: rgb(var(--label-yellow-10) / var(--tw-bg-opacity));\n}\n\n.bg-tone-neutral-10{\n\n --tw-bg-opacity: 1;\n\n background-color: rgb(var(--tone-neutral-10) / var(--tw-bg-opacity));\n}\n\n.fill-label-amaranth-04{\n\n fill: rgb(var(--label-amaranth-04));\n}\n\n.fill-label-aqua-04{\n\n fill: rgb(var(--label-aqua-04));\n}\n\n.fill-label-blue-04{\n\n fill: rgb(var(--label-blue-04));\n}\n\n.fill-label-green-04{\n\n fill: rgb(var(--label-green-04));\n}\n\n.fill-label-lime-04{\n\n fill: rgb(var(--label-lime-04));\n}\n\n.fill-label-orange-04{\n\n fill: rgb(var(--label-orange-04));\n}\n\n.fill-label-orchid-04{\n\n fill: rgb(var(--label-orchid-04));\n}\n\n.fill-label-violet-04{\n\n fill: rgb(var(--label-violet-04));\n}\n\n.fill-label-yellow-04{\n\n fill: rgb(var(--label-yellow-04));\n}\n\n.fill-tone-neutral-04{\n\n fill: rgb(var(--tone-neutral-04));\n}\n\n.text-label-amaranth-04{\n\n --tw-text-opacity: 1;\n\n color: rgb(var(--label-amaranth-04) / var(--tw-text-opacity));\n}\n\n.text-label-aqua-04{\n\n --tw-text-opacity: 1;\n\n color: rgb(var(--label-aqua-04) / var(--tw-text-opacity));\n}\n\n.text-label-blue-04{\n\n --tw-text-opacity: 1;\n\n color: rgb(var(--label-blue-04) / var(--tw-text-opacity));\n}\n\n.text-label-green-04{\n\n --tw-text-opacity: 1;\n\n color: rgb(var(--label-green-04) / var(--tw-text-opacity));\n}\n\n.text-label-lime-04{\n\n --tw-text-opacity: 1;\n\n color: rgb(var(--label-lime-04) / var(--tw-text-opacity));\n}\n\n.text-label-orange-04{\n\n --tw-text-opacity: 1;\n\n color: rgb(var(--label-orange-04) / var(--tw-text-opacity));\n}\n\n.text-label-orchid-04{\n\n --tw-text-opacity: 1;\n\n color: rgb(var(--label-orchid-04) / var(--tw-text-opacity));\n}\n\n.text-label-violet-04{\n\n --tw-text-opacity: 1;\n\n color: rgb(var(--label-violet-04) / var(--tw-text-opacity));\n}\n\n.text-label-yellow-04{\n\n --tw-text-opacity: 1;\n\n color: rgb(var(--label-yellow-04) / var(--tw-text-opacity));\n}\n\n.text-tone-neutral-04{\n\n --tw-text-opacity: 1;\n\n color: rgb(var(--tone-neutral-04) / var(--tw-text-opacity));\n}\n\n.shadow{\n\n --tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);\n\n --tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);\n\n -webkit-box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n\n@container style(--magma-pref-animation: reduce) {\n :host {\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 -webkit-transition-duration: 0s;\n transition-duration: 0s;\n }\n }\n}\n\n";
7
+ const mdsInputTipCss = "@tailwind utilities;\n\n:host {\n\n --mds-input-tip-active-translate: translate(0, 0);\n\n left: 0.25rem;\n\n right: 0.25rem;\n\n gap: 0.25rem;\n\n -webkit-transition-duration: 300ms;\n\n transition-duration: 300ms;\n\n -webkit-transition-timing-function: cubic-bezier(0.19, 1, 0.22, 1);\n\n transition-timing-function: cubic-bezier(0.19, 1, 0.22, 1);\n\n display: -ms-flexbox;\n\n display: flex;\n -ms-flex-pack: end;\n justify-content: flex-end;\n pointer-events: none;\n position: absolute;\n -webkit-transform: var(--mds-input-tip-active-translate);\n transform: var(--mds-input-tip-active-translate);\n -webkit-transition-property: -webkit-transform;\n transition-property: -webkit-transform;\n transition-property: transform;\n transition-property: transform, -webkit-transform;\n}\n\n:host(:empty) {\n display: none;\n}\n\n:host([position=\"top\"]) {\n top: 0.25rem;\n}\n\n:host([position=\"bottom\"]) {\n bottom: 0.25rem;\n}\n\n:host([position=\"top\"][active]:not([active=\"false\"])) {\n\n --mds-input-tip-active-translate: translate(calc(0.25rem * -1), calc(0.25rem * -1));\n}\n\n:host([position=\"top\"][active]:not([active=\"false\"])) ::slotted( mds-input-tip-item ) {\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n}\n\n:host([position=\"bottom\"][active]:not([active=\"false\"])) {\n\n --mds-input-tip-active-translate: translate(calc(0.25rem * -1), 0.25rem);\n}\n\n:host([position=\"bottom\"][active]:not([active=\"false\"])) ::slotted( mds-input-tip-item ) {\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n}\n\n@container style(--magma-pref-animation: reduce) {\n :host {\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 -webkit-transition-duration: 0s;\n transition-duration: 0s;\n }\n }\n}\n\n";
8
8
  const MdsInputTipStyle0 = mdsInputTipCss;
9
9
 
10
10
  const MdsInputTip = class {
@@ -2,11 +2,11 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-f87612f6.js');
5
+ const index = require('./index-442db91d.js');
6
6
  const appGlobals = require('./app-globals-3a1e7e63.js');
7
7
 
8
8
  /*
9
- Stencil Client Patch Browser v4.21.0 | MIT Licensed | https://stenciljs.com
9
+ Stencil Client Patch Browser v4.22.2 | MIT Licensed | https://stenciljs.com
10
10
  */
11
11
  var patchBrowser = () => {
12
12
  const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('mds-input-tip.cjs.js', document.baseURI).href));
@@ -4,8 +4,8 @@
4
4
  ],
5
5
  "compiler": {
6
6
  "name": "@stencil/core",
7
- "version": "4.21.0",
8
- "typescriptVersion": "5.5.3"
7
+ "version": "4.22.2",
8
+ "typescriptVersion": "5.5.4"
9
9
  },
10
10
  "collections": [],
11
11
  "bundles": []
@@ -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
  };
@@ -1,12 +1,13 @@
1
- import Handlebars from "handlebars";
1
+ import { render } from "mustache";
2
2
  export class Locale {
3
3
  constructor(configData) {
4
4
  this.rollbackLanguage = 'en';
5
5
  this.set = (configData) => {
6
6
  this.config = configData;
7
7
  };
8
- this.lang = (element) => {
9
- this.closestElement = element.closest('[lang]');
8
+ this.lang = (el) => {
9
+ this.element = el;
10
+ this.closestElement = this.element.closest('[lang]');
10
11
  if (this.closestElement) {
11
12
  if (this.closestElement.lang) {
12
13
  this.language = this.closestElement.lang;
@@ -16,6 +17,18 @@ export class Locale {
16
17
  this.language = this.rollbackLanguage;
17
18
  return this.language;
18
19
  };
20
+ this.update = (doc) => {
21
+ const context = doc !== null && doc !== void 0 ? doc : this.element.shadowRoot;
22
+ context && context.querySelectorAll('*').forEach(el => {
23
+ if (el.tagName.toLowerCase().startsWith('mds-')) {
24
+ // eslint-disable-next-line no-restricted-syntax
25
+ if (el && 'updateLang' in el) {
26
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
27
+ el.updateLang();
28
+ }
29
+ }
30
+ });
31
+ };
19
32
  this.pluralize = (tag, context) => {
20
33
  const languagePhrase = this.config[this.language] ? this.config[this.language][tag] : this.config[this.rollbackLanguage][tag];
21
34
  const phrases = [];
@@ -38,8 +51,7 @@ export class Locale {
38
51
  }
39
52
  }
40
53
  }
41
- const template = Handlebars.compile(translatePhrase);
42
- return template(context);
54
+ return render(translatePhrase, context);
43
55
  };
44
56
  this.get = (tag, context) => {
45
57
  if (context) {
@@ -10,10 +10,6 @@
10
10
 
11
11
  gap: 0.25rem;
12
12
 
13
- transition-property: background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;
14
-
15
- transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
16
-
17
13
  transition-duration: 300ms;
18
14
 
19
15
  transition-timing-function: cubic-bezier(0.19, 1, 0.22, 1);
@@ -23,6 +19,7 @@
23
19
  pointer-events: none;
24
20
  position: absolute;
25
21
  transform: var(--mds-input-tip-active-translate);
22
+ transition-property: transform;
26
23
  }
27
24
 
28
25
  :host(:empty) {
@@ -57,230 +54,6 @@
57
54
  border-bottom-right-radius: 0;
58
55
  }
59
56
 
60
- .static{
61
-
62
- position: static;
63
- }
64
-
65
- .fixed{
66
-
67
- position: fixed;
68
- }
69
-
70
- .absolute{
71
-
72
- position: absolute;
73
- }
74
-
75
- .relative{
76
-
77
- position: relative;
78
- }
79
-
80
- .border{
81
-
82
- border-width: 1px;
83
- }
84
-
85
- .bg-label-amaranth-10{
86
-
87
- --tw-bg-opacity: 1;
88
-
89
- background-color: rgb(var(--label-amaranth-10) / var(--tw-bg-opacity));
90
- }
91
-
92
- .bg-label-aqua-10{
93
-
94
- --tw-bg-opacity: 1;
95
-
96
- background-color: rgb(var(--label-aqua-10) / var(--tw-bg-opacity));
97
- }
98
-
99
- .bg-label-blue-10{
100
-
101
- --tw-bg-opacity: 1;
102
-
103
- background-color: rgb(var(--label-blue-10) / var(--tw-bg-opacity));
104
- }
105
-
106
- .bg-label-green-10{
107
-
108
- --tw-bg-opacity: 1;
109
-
110
- background-color: rgb(var(--label-green-10) / var(--tw-bg-opacity));
111
- }
112
-
113
- .bg-label-lime-10{
114
-
115
- --tw-bg-opacity: 1;
116
-
117
- background-color: rgb(var(--label-lime-10) / var(--tw-bg-opacity));
118
- }
119
-
120
- .bg-label-orange-10{
121
-
122
- --tw-bg-opacity: 1;
123
-
124
- background-color: rgb(var(--label-orange-10) / var(--tw-bg-opacity));
125
- }
126
-
127
- .bg-label-orchid-10{
128
-
129
- --tw-bg-opacity: 1;
130
-
131
- background-color: rgb(var(--label-orchid-10) / var(--tw-bg-opacity));
132
- }
133
-
134
- .bg-label-violet-10{
135
-
136
- --tw-bg-opacity: 1;
137
-
138
- background-color: rgb(var(--label-violet-10) / var(--tw-bg-opacity));
139
- }
140
-
141
- .bg-label-yellow-10{
142
-
143
- --tw-bg-opacity: 1;
144
-
145
- background-color: rgb(var(--label-yellow-10) / var(--tw-bg-opacity));
146
- }
147
-
148
- .bg-tone-neutral-10{
149
-
150
- --tw-bg-opacity: 1;
151
-
152
- background-color: rgb(var(--tone-neutral-10) / var(--tw-bg-opacity));
153
- }
154
-
155
- .fill-label-amaranth-04{
156
-
157
- fill: rgb(var(--label-amaranth-04));
158
- }
159
-
160
- .fill-label-aqua-04{
161
-
162
- fill: rgb(var(--label-aqua-04));
163
- }
164
-
165
- .fill-label-blue-04{
166
-
167
- fill: rgb(var(--label-blue-04));
168
- }
169
-
170
- .fill-label-green-04{
171
-
172
- fill: rgb(var(--label-green-04));
173
- }
174
-
175
- .fill-label-lime-04{
176
-
177
- fill: rgb(var(--label-lime-04));
178
- }
179
-
180
- .fill-label-orange-04{
181
-
182
- fill: rgb(var(--label-orange-04));
183
- }
184
-
185
- .fill-label-orchid-04{
186
-
187
- fill: rgb(var(--label-orchid-04));
188
- }
189
-
190
- .fill-label-violet-04{
191
-
192
- fill: rgb(var(--label-violet-04));
193
- }
194
-
195
- .fill-label-yellow-04{
196
-
197
- fill: rgb(var(--label-yellow-04));
198
- }
199
-
200
- .fill-tone-neutral-04{
201
-
202
- fill: rgb(var(--tone-neutral-04));
203
- }
204
-
205
- .text-label-amaranth-04{
206
-
207
- --tw-text-opacity: 1;
208
-
209
- color: rgb(var(--label-amaranth-04) / var(--tw-text-opacity));
210
- }
211
-
212
- .text-label-aqua-04{
213
-
214
- --tw-text-opacity: 1;
215
-
216
- color: rgb(var(--label-aqua-04) / var(--tw-text-opacity));
217
- }
218
-
219
- .text-label-blue-04{
220
-
221
- --tw-text-opacity: 1;
222
-
223
- color: rgb(var(--label-blue-04) / var(--tw-text-opacity));
224
- }
225
-
226
- .text-label-green-04{
227
-
228
- --tw-text-opacity: 1;
229
-
230
- color: rgb(var(--label-green-04) / var(--tw-text-opacity));
231
- }
232
-
233
- .text-label-lime-04{
234
-
235
- --tw-text-opacity: 1;
236
-
237
- color: rgb(var(--label-lime-04) / var(--tw-text-opacity));
238
- }
239
-
240
- .text-label-orange-04{
241
-
242
- --tw-text-opacity: 1;
243
-
244
- color: rgb(var(--label-orange-04) / var(--tw-text-opacity));
245
- }
246
-
247
- .text-label-orchid-04{
248
-
249
- --tw-text-opacity: 1;
250
-
251
- color: rgb(var(--label-orchid-04) / var(--tw-text-opacity));
252
- }
253
-
254
- .text-label-violet-04{
255
-
256
- --tw-text-opacity: 1;
257
-
258
- color: rgb(var(--label-violet-04) / var(--tw-text-opacity));
259
- }
260
-
261
- .text-label-yellow-04{
262
-
263
- --tw-text-opacity: 1;
264
-
265
- color: rgb(var(--label-yellow-04) / var(--tw-text-opacity));
266
- }
267
-
268
- .text-tone-neutral-04{
269
-
270
- --tw-text-opacity: 1;
271
-
272
- color: rgb(var(--tone-neutral-04) / var(--tw-text-opacity));
273
- }
274
-
275
- .shadow{
276
-
277
- --tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
278
-
279
- --tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);
280
-
281
- box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
282
- }
283
-
284
57
  @container style(--magma-pref-animation: reduce) {
285
58
  :host {
286
59
  transition-duration: 0s;
@@ -4,6 +4,7 @@ const buttonVariantDictionary = [
4
4
  'info',
5
5
  'light',
6
6
  'primary',
7
+ 'secondary',
7
8
  'success',
8
9
  'warning',
9
10
  ];
@@ -1,61 +1,119 @@
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
+ htm: { format: 'markup', description: 'documentWeb' },
18
+ heic: { format: 'image', description: 'imageHEFF' },
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
+ odp: { format: 'slide', description: 'slideLO' },
36
+ ods: { format: 'spreadsheet', description: 'spreadsheetLO' },
37
+ odt: { format: 'text', description: 'documentLO' },
38
+ pdf: { format: 'document', description: 'documentAdobe' },
39
+ php: { format: 'code', description: 'filePHP' },
40
+ png: { format: 'image', description: 'imagePNG', preview: true },
41
+ ppt: { format: 'slide', description: 'slidePowerPoint' },
42
+ rar: { format: 'archive', description: 'compressedArchive' },
43
+ rtf: { format: 'text', description: 'documentRTF' },
44
+ sass: { format: 'code', description: 'fileSASS' },
45
+ shtml: { format: 'markup', description: 'documentWeb' },
46
+ svg: { format: 'vector', description: 'imageSVG', preview: true },
47
+ tar: { format: 'archive', description: 'uncompressedArchive' },
48
+ tiff: { format: 'image', description: 'imageTIFF' },
49
+ ts: { format: 'code', description: 'fileTS' },
50
+ tsx: { format: 'code', description: 'fileTSX' },
51
+ txt: { format: 'text', description: 'documentTXT' },
52
+ wav: { format: 'audio', description: 'uncompressedAudio' },
53
+ webp: { format: 'image', description: 'imageWEBP', preview: true },
54
+ xar: { format: 'archive', description: 'compressedArchive' },
55
+ xls: { format: 'spreadsheet', description: 'spreadsheetMS' },
56
+ xlsx: { format: 'spreadsheet', description: 'spreadsheetMS' },
57
+ zip: { format: 'archive', description: 'compressedArchive' },
58
58
  };
59
+ // const fileExtensionsDictionary: FileExtenstion = {
60
+ // '7z': { format: 'archive', description: 'Archivio compresso' },
61
+ // ace: { format: 'archive', description: 'Archivio compresso' },
62
+ // ai: { format: 'vector', description: 'Vettoriale Adobe Illustrator' },
63
+ // dart: { format: 'code', description: 'Dart' },
64
+ // db: { format: 'data', description: 'File di database' },
65
+ // default: { format: 'attachment', description: 'Formato sconosciuto' },
66
+ // dmg: { format: 'executable', description: 'Apple Disk Image' },
67
+ // doc: { format: 'text', description: 'Documento Microsoft Word' },
68
+ // docm: { format: 'text', description: 'Documento Microsoft Word' },
69
+ // docx: { format: 'text', description: 'Documento Microsoft Word Compresso' },
70
+ // eml: { format: 'email', description: 'E-mail di posta elettronica' },
71
+ // eps: { format: 'vector', description: 'Vettoriale Corel Draw' },
72
+ // exe: { format: 'executable', description: 'File eseguibile Windows' },
73
+ // flac: { format: 'audio', description: 'Audio non compresso' },
74
+ // gif: { format: 'image', description: 'Immagine compressa', preview: true },
75
+ // htm: { format: 'markup', description: 'Pagina web' },
76
+ // heic: { format: 'image', description: 'High Efficiency Image File Format' },
77
+ // html: { format: 'markup', description: 'Pagina web' },
78
+ // jpe: { format: 'image', description: 'Immagine compressa', preview: true },
79
+ // jpeg: { format: 'image', description: 'Immagine compressa', preview: true },
80
+ // jpg: { format: 'image', description: 'Immagine compressa', preview: true },
81
+ // js: { format: 'code', description: 'JavaScript' },
82
+ // json: { format: 'data', description: 'JavaScript Object Notation' },
83
+ // jsx: { format: 'code', description: 'JavaScript' },
84
+ // m2v: { format: 'video', description: 'Filmato SD' },
85
+ // mp2: { format: 'audio', description: 'Audio compresso' },
86
+ // mp3: { format: 'audio', description: 'Audio compresso' },
87
+ // mp4: { format: 'video', description: 'Filmato HD' },
88
+ // mp4v: { format: 'video', description: 'Filmato HD' },
89
+ // mpeg: { format: 'video', description: 'Filmato SD' },
90
+ // mpg4: { format: 'video', description: 'Filmato SD' },
91
+ // mpg: { format: 'video', description: 'Filmato SD' },
92
+ // mpga: { format: 'audio', description: 'Audio compresso' },
93
+ // odp: { format: 'slide', description: 'Slide di presentazione LibreOffice' },
94
+ // ods: { format: 'spreadsheet', description: 'Foglio di calcolo LibreOffice' },
95
+ // odt: { format: 'text', description: 'File di testo LibreOffice' },
96
+ // pdf: { format: 'document', description: 'Documento Adobe' },
97
+ // php: { format: 'code', description: 'Hypertext Preprocessor' },
98
+ // png: { format: 'image', description: 'Immagine Portable Network Graphics', preview: true },
99
+ // ppt: { format: 'slide', description: 'Slide di presentazione PowerPoint' },
100
+ // rar: { format: 'archive', description: 'Archivio compresso' },
101
+ // rtf: { format: 'text', description: 'Documento di testo Rich Text Format' },
102
+ // sass: { format: 'code', description: 'Syntactically Awesome StyleSheets' },
103
+ // shtml: { format: 'markup', description: 'Pagina web' },
104
+ // svg: { format: 'vector', description: 'Scalable Vector Graphics', preview: true },
105
+ // tar: { format: 'archive', description: 'Archivio non compresso' },
106
+ // tiff: { format: 'image', description: 'Tag Image File Format' },
107
+ // ts: { format: 'code', description: 'TypeScript' },
108
+ // tsx: { format: 'code', description: 'TypeScript Extended Syntax' },
109
+ // txt: { format: 'text', description: 'Documento di testo non formattato' },
110
+ // wav: { format: 'audio', description: 'Audio non compresso' },
111
+ // webp: { format: 'image', description: 'Immagine Web Picture', preview: true },
112
+ // xar: { format: 'archive', description: 'Archivio compresso' },
113
+ // xls: { format: 'spreadsheet', description: 'Foglio di calcolo Office' },
114
+ // xlsx: { format: 'spreadsheet', description: 'Foglio di calcolo Office' },
115
+ // zip: { format: 'archive', description: 'Archivio compresso' },
116
+ // }
59
117
  const genericMimeToExt = new Map([
60
118
  ['image', ['.png', '.jpg', '.jpeg', '.tiff', '.webp', '.jpe', '.gif', '.heic']],
61
119
  ['audio', ['.mp2', '.mp3', '.mpga', '.wav', '.flac']],