@maggioli-design-system/mds-input 7.7.1 → 7.8.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 (61) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/mds-input.cjs.entry.js +141 -31
  3. package/dist/cjs/mds-input.cjs.js +1 -1
  4. package/dist/collection/common/number.js +5 -0
  5. package/dist/collection/common/unit.js +16 -1
  6. package/dist/collection/components/mds-input/mds-input.css +40 -1
  7. package/dist/collection/components/mds-input/mds-input.js +136 -21
  8. package/dist/collection/components/mds-input/test/mds-input.stories.js +17 -2
  9. package/dist/collection/dictionary/button.js +16 -1
  10. package/dist/collection/dictionary/variant.js +9 -1
  11. package/dist/components/mds-input.js +147 -33
  12. package/dist/documentation.json +68 -12
  13. package/dist/esm/loader.js +1 -1
  14. package/dist/esm/mds-input.entry.js +141 -31
  15. package/dist/esm/mds-input.js +1 -1
  16. package/dist/esm-es5/loader.js +1 -1
  17. package/dist/esm-es5/mds-input.entry.js +2 -2
  18. package/dist/esm-es5/mds-input.js +1 -1
  19. package/dist/mds-input/mds-input.esm.js +1 -1
  20. package/dist/mds-input/p-3d99713e.system.js +1 -1
  21. package/dist/mds-input/p-ae3c84eb.system.entry.js +6 -0
  22. package/dist/mds-input/p-dbfb8643.entry.js +6 -0
  23. package/dist/stats.json +130 -33
  24. package/dist/types/common/number.d.ts +2 -0
  25. package/dist/types/common/unit.d.ts +3 -1
  26. package/dist/types/components/mds-input/mds-input.d.ts +24 -5
  27. package/dist/types/components/mds-input/test/mds-input.stories.d.ts +8 -0
  28. package/dist/types/components.d.ts +19 -6
  29. package/dist/types/dictionary/button.d.ts +3 -1
  30. package/dist/types/dictionary/variant.d.ts +2 -1
  31. package/dist/types/type/button.d.ts +1 -0
  32. package/dist/types/type/variant.d.ts +1 -0
  33. package/documentation.json +83 -12
  34. package/package.json +6 -6
  35. package/readme.md +5 -2
  36. package/src/common/number.ts +8 -0
  37. package/src/common/unit.ts +23 -0
  38. package/src/components/mds-input/css/mds-input-variant.css +11 -0
  39. package/src/components/mds-input/mds-input.css +23 -1
  40. package/src/components/mds-input/mds-input.tsx +109 -5
  41. package/src/components/mds-input/meta/locale.el.json +6 -3
  42. package/src/components/mds-input/meta/locale.en.json +6 -3
  43. package/src/components/mds-input/meta/locale.es.json +6 -3
  44. package/src/components/mds-input/meta/locale.it.json +5 -2
  45. package/src/components/mds-input/readme.md +5 -2
  46. package/src/components/mds-input/test/mds-input.stories.tsx +19 -2
  47. package/src/components.d.ts +19 -6
  48. package/src/dictionary/button.ts +19 -0
  49. package/src/dictionary/variant.ts +11 -1
  50. package/src/fixtures/icons.json +11 -0
  51. package/src/fixtures/iconsauce.json +4 -0
  52. package/src/type/button.ts +11 -0
  53. package/src/type/variant.ts +8 -0
  54. package/www/build/mds-input.esm.js +1 -1
  55. package/www/build/p-3d99713e.system.js +1 -1
  56. package/www/build/p-ae3c84eb.system.entry.js +6 -0
  57. package/www/build/p-dbfb8643.entry.js +6 -0
  58. package/dist/mds-input/p-65072ca2.system.entry.js +0 -6
  59. package/dist/mds-input/p-83542c96.entry.js +0 -6
  60. package/www/build/p-65072ca2.system.entry.js +0 -6
  61. package/www/build/p-83542c96.entry.js +0 -6
@@ -8,7 +8,7 @@ const appGlobals = require('./app-globals-3a1e7e63.js');
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.cjs",[[65,"mds-input",{"autocomplete":[513],"autofocus":[516],"await":[516],"controlsLayout":[513,"controls-layout"],"controlsIcon":[513,"controls-icon"],"controlIncreaseLabel":[513,"control-increase-label"],"controlDecreaseLabel":[513,"control-decrease-label"],"datalist":[16],"disabled":[516],"icon":[513],"max":[513],"maxlength":[1538],"min":[520],"minlength":[514],"name":[513],"pattern":[513],"placeholder":[513],"readonly":[516],"required":[516],"variant":[1537],"tip":[513],"step":[513],"type":[513],"typography":[513],"value":[1537],"hasFocus":[32],"language":[32],"currentLengthLabel":[32],"countVariant":[32],"isPasswordVisible":[32],"updateLang":[64],"addValidator":[64],"removeValidator":[64],"hasValidator":[64],"getErrors":[64],"setFocus":[64],"getInputElement":[64]},null,{"value":["valueChanged"],"maxlength":["maxLengthChanged"],"disabled":["disabledChanged"]}]]]], options);
11
+ return index.bootstrapLazy([["mds-input.cjs",[[65,"mds-input",{"autocomplete":[513],"autofocus":[516],"await":[516],"controlsLayout":[513,"controls-layout"],"controlsIcon":[513,"controls-icon"],"controlIncreaseLabel":[513,"control-increase-label"],"controlDecreaseLabel":[513,"control-decrease-label"],"datalist":[16],"disabled":[516],"icon":[1537],"max":[520],"maxlength":[1538],"mic":[516],"min":[520],"minlength":[514],"name":[513],"pattern":[513],"placeholder":[513],"readonly":[516],"required":[516],"variant":[1537],"tip":[513],"step":[513],"type":[513],"typography":[513],"value":[1537],"hasFocus":[32],"language":[32],"isRecording":[32],"currentLengthLabel":[32],"countVariant":[32],"isPasswordVisible":[32],"transcript":[32],"updateLang":[64],"addValidator":[64],"removeValidator":[64],"hasValidator":[64],"getErrors":[64],"setFocus":[64],"getInputElement":[64]},null,{"value":["valueChanged"],"variant":["variantChanged"],"maxlength":["maxLengthChanged"],"disabled":["disabledChanged"]}]]]], options);
12
12
  };
13
13
 
14
14
  exports.setNonce = index.setNonce;
@@ -6,6 +6,13 @@ const index = require('./index-6d818446.js');
6
6
 
7
7
  function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);}else for(f in e)e[f]&&(n&&(n+=" "),n+=f);return n}function clsx(){for(var e,t,f=0,n="",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
8
8
 
9
+ const mggAiChatbotOutline = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
10
+ <path d="M10 11H8V8h2zM16 11h-2V8h2z"/>
11
+ <path fill-rule="evenodd" d="M21.544 10.436a3 3 0 0 1 0 3.128l-3.667 6A3 3 0 0 1 15.317 21H8.683a3 3 0 0 1-2.56-1.436l-3.666-6a3 3 0 0 1 0-3.128l3.667-6A3 3 0 0 1 8.683 3h6.635a3 3 0 0 1 2.56 1.436zM4.162 11.479a1 1 0 0 0 0 1.043l3.668 6a1 1 0 0 0 .853.478h6.634a1 1 0 0 0 .853-.479l3.667-6a1 1 0 0 0 0-1.042l-3.667-6A1 1 0 0 0 15.317 5H8.683a1 1 0 0 0-.853.479z" clip-rule="evenodd"/>
12
+ <path d="M16.707 14.707C15.477 15.937 13.698 16.5 12 16.5s-3.477-.563-4.707-1.793l1.414-1.414c.77.77 1.991 1.207 3.293 1.207s2.523-.437 3.293-1.207z"/>
13
+ </svg>
14
+ `;
15
+
9
16
  const miBaselineAdd = `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"/></svg>`;
10
17
 
11
18
  const miBaselineArrowDown = `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6l-6-6l1.41-1.41z"/></svg>`;
@@ -18,6 +25,12 @@ const miBaselineVisible = `<svg xmlns="http://www.w3.org/2000/svg" width="24" he
18
25
 
19
26
  const miBaselineVisibleOff = `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M12 7c2.76 0 5 2.24 5 5c0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75c-1.73-4.39-6-7.5-11-7.5c-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28l.46.46A11.804 11.804 0 0 0 1 12c1.73 4.39 6 7.5 11 7.5c1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22L21 20.73L3.27 3L2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65c0 1.66 1.34 3 3 3c.22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53c-2.76 0-5-2.24-5-5c0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15l.02-.16c0-1.66-1.34-3-3-3l-.17.01z"/></svg>`;
20
27
 
28
+ const miOutlineMic = `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M12 14c1.66 0 3-1.34 3-3V5c0-1.66-1.34-3-3-3S9 3.34 9 5v6c0 1.66 1.34 3 3 3z"/><path d="M17 11c0 2.76-2.24 5-5 5s-5-2.24-5-5H5c0 3.53 2.61 6.43 6 6.92V21h2v-3.08c3.39-.49 6-3.39 6-6.92h-2z"/></svg>`;
29
+
30
+ const miOutlineMicOff = `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M10.8 4.9c0-.66.54-1.2 1.2-1.2s1.2.54 1.2 1.2l-.01 3.91L15 10.6V5c0-1.66-1.34-3-3-3c-1.54 0-2.79 1.16-2.96 2.65l1.76 1.76V4.9zM19 11h-1.7c0 .58-.1 1.13-.27 1.64l1.27 1.27c.44-.88.7-1.87.7-2.91zM4.41 2.86L3 4.27l6 6V11c0 1.66 1.34 3 3 3c.23 0 .44-.03.65-.08l1.66 1.66c-.71.33-1.5.52-2.31.52c-2.76 0-5.3-2.1-5.3-5.1H5c0 3.41 2.72 6.23 6 6.72V21h2v-3.28a7.13 7.13 0 0 0 2.55-.9l4.2 4.2l1.41-1.41L4.41 2.86z"/></svg>`;
31
+
32
+ const miBaselineDone = `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M9 16.2L4.8 12l-1.4 1.4L9 19L21 7l-1.4-1.4L9 16.2z"/></svg>`;
33
+
21
34
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
22
35
 
23
36
  var mustache = {exports: {}};
@@ -860,48 +873,72 @@ class Locale {
860
873
  }
861
874
  }
862
875
 
863
- const increase$3 = "Αύξηση";
864
876
  const decrease$3 = "Μείωση";
865
- const showPassword$3 = "Εμφάνιση Κωδικού";
866
- const hidePassword$3 = "Απόκρυψη Κωδικού";
877
+ const hidePassword$3 = "Απόκρυψη κωδικού";
878
+ const increase$3 = "Αύξηση";
879
+ const showPassword$3 = "Εμφάνιση κωδικού";
880
+ const speechToTextError$3 = "Η φωνητική υπαγόρευση δεν υποστηρίζεται από αυτό το πρόγραμμα περιήγησης";
881
+ const speechToTextOff$3 = "Διακοπή φωνητικής υπαγόρευσης";
882
+ const speechToTextOn$3 = "Έναρξη φωνητικής υπαγόρευσης";
867
883
  const localeEl = {
868
- increase: increase$3,
869
884
  decrease: decrease$3,
885
+ hidePassword: hidePassword$3,
886
+ increase: increase$3,
870
887
  showPassword: showPassword$3,
871
- hidePassword: hidePassword$3
888
+ speechToTextError: speechToTextError$3,
889
+ speechToTextOff: speechToTextOff$3,
890
+ speechToTextOn: speechToTextOn$3
872
891
  };
873
892
 
874
- const increase$2 = "Increase";
875
893
  const decrease$2 = "Decrease";
876
- const showPassword$2 = "Show Password";
877
- const hidePassword$2 = "Hide Password";
894
+ const hidePassword$2 = "Hide password";
895
+ const increase$2 = "Increase";
896
+ const showPassword$2 = "Show password";
897
+ const speechToTextError$2 = "Voice dictation is not supported by this browser";
898
+ const speechToTextOff$2 = "Stop voice dictation";
899
+ const speechToTextOn$2 = "Start voice dictation";
878
900
  const localeEn = {
879
- increase: increase$2,
880
901
  decrease: decrease$2,
902
+ hidePassword: hidePassword$2,
903
+ increase: increase$2,
881
904
  showPassword: showPassword$2,
882
- hidePassword: hidePassword$2
905
+ speechToTextError: speechToTextError$2,
906
+ speechToTextOff: speechToTextOff$2,
907
+ speechToTextOn: speechToTextOn$2
883
908
  };
884
909
 
885
- const increase$1 = "Aumentar";
886
910
  const decrease$1 = "Disminuir";
887
- const showPassword$1 = "Mostrar Contraseña";
888
- const hidePassword$1 = "Ocultar Contraseña";
911
+ const hidePassword$1 = "Ocultar contraseña";
912
+ const increase$1 = "Aumentar";
913
+ const showPassword$1 = "Mostrar contraseña";
914
+ const speechToTextError$1 = "El dictado por voz no es compatible con este navegador";
915
+ const speechToTextOff$1 = "Detener dictado por voz";
916
+ const speechToTextOn$1 = "Iniciar dictado por voz";
889
917
  const localeEs = {
890
- increase: increase$1,
891
918
  decrease: decrease$1,
919
+ hidePassword: hidePassword$1,
920
+ increase: increase$1,
892
921
  showPassword: showPassword$1,
893
- hidePassword: hidePassword$1
922
+ speechToTextError: speechToTextError$1,
923
+ speechToTextOff: speechToTextOff$1,
924
+ speechToTextOn: speechToTextOn$1
894
925
  };
895
926
 
896
- const increase = "Aumenta";
897
927
  const decrease = "Diminuisci";
898
- const showPassword = "Visualizza password";
899
928
  const hidePassword = "Nascondi password";
929
+ const increase = "Aumenta";
930
+ const showPassword = "Visualizza password";
931
+ const speechToTextError = "Dettatura vocale non supportata da questo browser";
932
+ const speechToTextOff = "Ferma dettatura vocale";
933
+ const speechToTextOn = "Inizia dettatura vocale";
900
934
  const localeIt = {
901
- increase: increase,
902
935
  decrease: decrease,
936
+ hidePassword: hidePassword,
937
+ increase: increase,
903
938
  showPassword: showPassword,
904
- hidePassword: hidePassword
939
+ speechToTextError: speechToTextError,
940
+ speechToTextOff: speechToTextOff,
941
+ speechToTextOn: speechToTextOn
905
942
  };
906
943
 
907
944
  const NullValidator = () => null;
@@ -1031,7 +1068,7 @@ function createInputValidationManager(type) {
1031
1068
  return inputManager;
1032
1069
  }
1033
1070
 
1034
- const mdsInputCss = "\n\n/**\n * @prop --mds-input-background: Sets the background-color of the component\n * @prop --mds-input-icon-color: Sets the icon color of the component\n * @prop --mds-input-placeholder-default-color: Sets the color of the placeholder\n * @prop --mds-input-placeholder-focus-color: Sets the color of the placeholder when the input is focused\n * @prop --mds-input-placeholder-hover-color: Sets the color of the placeholder when the input is hovered\n * @prop --mds-input-ring: Sets the box-shadow of the component's input\n * @prop --mds-input-shadow: Sets the box-shadow of the component's input\n * @prop --mds-input-textarea-field-sizing: Sets the height of the textarea automatically, this is an EXPERIMENTAL css property, so it couldn't work in every browser\n * @prop --mds-input-textarea-max-height: Sets the `max-height` of the component when attribute `type` is set to `textarea`\n * @prop --mds-input-textarea-min-height: Sets the `min-height` of the component when attribute `type` is set to `textarea`\n * @prop --mds-input-tip-background: Sets the background color of the tip message at the bottom right of the component\n * @prop --mds-input-variant-color: Sets the variant colors of the component\n */\n\n:host {\n --mds-input-background: rgb(var(--tone-neutral));\n --mds-input-icon-color: var(--mds-input-variant-color);\n --mds-input-placeholder-default-color: rgb(var(--tone-neutral-06));\n --mds-input-placeholder-focus-color: rgb(var(--tone-neutral-07));\n --mds-input-placeholder-hover-color: var(--mds-input-placeholder-default-color);\n --mds-input-ring: 0 0 0 1px rgb(var(--mds-input-variant-color) / 0.1);\n --mds-input-shadow: 0 1px 3px 0 rgb(var(--mds-input-variant-color) / 0.1), 0 1px 2px 0 rgb(var(--mds-input-variant-color) / 0.06);\n --mds-input-textarea-field-sizing: content;\n --mds-input-textarea-resize: none;\n --mds-input-textarea-max-height: 16rem;\n --mds-input-textarea-min-height: 6rem;\n --mds-input-tip-background: 84 84 84;\n --mds-input-variant-color: 0 0 0;\n /* private */ --mds-input-controls-border: 2px solid rgb(var(--tone-neutral-09));\n /* private */ --mds-input-controls-color: rgb(var(--variant-primary-03)); min-height: 1.5rem; font-family: Karla, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; font-size: 1rem; line-height: 1.5rem; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; gap: 0.5rem;\n\n container-type: inline-size;\n display: -ms-flexbox;\n display: flex;\n position: relative;\n}\n\n:host([typography=\"detail\"]) .input {\n min-height: 1.5rem;\n font-family: Karla, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;\n font-size: 1rem;\n line-height: 1.5rem;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n:host([typography=\"snippet\"]) .input {\n min-height: 1.5rem;\n font-family: 'Roboto Mono', 'Courier New', monospace;\n font-size: 1rem;\n line-height: 1.5rem;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n.input {\n font-family: Karla, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;\n font-size: 1rem;\n line-height: 1.5rem;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n margin: 0rem;\n border-radius: 0.5rem;\n padding-left: 1rem;\n padding-right: 1rem;\n padding-top: 0.75rem;\n padding-bottom: 0.75rem;\n -webkit-transition-duration: 300ms;\n transition-duration: 300ms;\n -webkit-transition-timing-function: cubic-bezier(0.19, 1, 0.22, 1);\n transition-timing-function: cubic-bezier(0.19, 1, 0.22, 1);\n\n background-color: var(--mds-input-background);\n border: 0;\n -webkit-box-shadow: var(--mds-input-ring), var(--mds-input-shadow);\n box-shadow: var(--mds-input-ring), var(--mds-input-shadow);\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n color: rgb(var(--tone-neutral-02));\n max-width: 100%;\n min-height: 3rem;\n overflow: hidden;\n text-overflow: ellipsis;\n -webkit-transition-property: background-color, border-color, color, fill, margin, opacity, padding, -webkit-box-shadow, -webkit-transform;\n transition-property: background-color, border-color, color, fill, margin, opacity, padding, -webkit-box-shadow, -webkit-transform;\n transition-property: background-color, border-color, box-shadow, color, fill, margin, opacity, padding, transform;\n transition-property: background-color, border-color, box-shadow, color, fill, margin, opacity, padding, transform, -webkit-box-shadow, -webkit-transform;\n width: 100%;\n}\n\n.input::-moz-placeholder {\n transition-duration: 300ms;\n transition-timing-function: cubic-bezier(0.19, 1, 0.22, 1);\n\n color: var(--mds-input-placeholder-default-color);\n -moz-transition-property: color;\n transition-property: color;\n}\n\n.input::-webkit-input-placeholder {\n -webkit-transition-duration: 300ms;\n transition-duration: 300ms;\n -webkit-transition-timing-function: cubic-bezier(0.19, 1, 0.22, 1);\n transition-timing-function: cubic-bezier(0.19, 1, 0.22, 1);\n\n color: var(--mds-input-placeholder-default-color);\n -webkit-transition-property: color;\n transition-property: color;\n}\n\n.input:-ms-input-placeholder {\n transition-duration: 300ms;\n transition-timing-function: cubic-bezier(0.19, 1, 0.22, 1);\n\n color: var(--mds-input-placeholder-default-color);\n -ms-transition-property: color;\n transition-property: color;\n}\n\n.input::-ms-input-placeholder {\n transition-duration: 300ms;\n transition-timing-function: cubic-bezier(0.19, 1, 0.22, 1);\n\n color: var(--mds-input-placeholder-default-color);\n -ms-transition-property: color;\n transition-property: color;\n}\n\n.input::placeholder {\n -webkit-transition-duration: 300ms;\n transition-duration: 300ms;\n -webkit-transition-timing-function: cubic-bezier(0.19, 1, 0.22, 1);\n transition-timing-function: cubic-bezier(0.19, 1, 0.22, 1);\n\n color: var(--mds-input-placeholder-default-color);\n -webkit-transition-property: color;\n transition-property: color;\n}\n\n.input:hover::-moz-placeholder {\n color: var(--mds-input-placeholder-hover-color);\n}\n\n.input:hover::-webkit-input-placeholder {\n color: var(--mds-input-placeholder-hover-color);\n}\n\n.input:hover:-ms-input-placeholder {\n color: var(--mds-input-placeholder-hover-color);\n}\n\n.input:hover::-ms-input-placeholder {\n color: var(--mds-input-placeholder-hover-color);\n}\n\n.input:hover::placeholder {\n color: var(--mds-input-placeholder-hover-color);\n}\n\n.input:focus::-moz-placeholder {\n color: var(--mds-input-placeholder-focus-color);\n}\n\n.input:focus::-webkit-input-placeholder {\n color: var(--mds-input-placeholder-focus-color);\n}\n\n.input:focus:-ms-input-placeholder {\n color: var(--mds-input-placeholder-focus-color);\n}\n\n.input:focus::-ms-input-placeholder {\n color: var(--mds-input-placeholder-focus-color);\n}\n\n.input:focus::placeholder {\n color: var(--mds-input-placeholder-focus-color);\n}\n\n.input::-webkit-outer-spin-button,\n.input::-webkit-inner-spin-button {\n -webkit-appearance: none;\n appearance: none;\n display: none;\n margin: 0;\n}\n\n:host textarea.input,\n:host([typography]) textarea.input {\n border-bottom-right-radius: 0;\n\n field-sizing: var(--mds-input-textarea-field-sizing);\n max-height: var(--mds-input-textarea-max-height);\n min-height: var(--mds-input-textarea-min-height);\n overflow: auto;\n resize: var(--mds-input-textarea-resize);\n}\n\n.input:focus {\n outline: 2px solid transparent;\n outline-offset: 2px;\n\n --mds-input-ring: 0 0 0 3px rgb(var(--mds-input-variant-color) / 1);\n --mds-input-shadow: 0 4px 6px 3px rgb(var(--mds-input-variant-color) / 0.1), 0 2px 4px -1px rgb(var(--mds-input-variant-color) / 0.06);\n}\n\n.input:disabled {\n background-color: rgb(var(--tone-neutral-10));\n}\n\n.input:disabled::-moz-placeholder {\n color: rgb(var(--tone-neutral-05));\n}\n\n.input:disabled::-webkit-input-placeholder {\n color: rgb(var(--tone-neutral-05));\n}\n\n.input:disabled:-ms-input-placeholder {\n color: rgb(var(--tone-neutral-05));\n}\n\n.input:disabled::-ms-input-placeholder {\n color: rgb(var(--tone-neutral-05));\n}\n\n.input:disabled,\n.input:disabled::placeholder {\n color: rgb(var(--tone-neutral-05));\n}\n\n.input.has-icon {\n padding-left: 2.75rem;\n}\n\n\n.await,\n.icon {\n left: 0.75rem;\n top: 0.75rem;\n\n fill: rgb(var(--mds-input-icon-color));\n position: absolute;\n}\n\n.await {\n color: rgb(var(--mds-input-icon-color));\n height: 24px;\n width: 24px;\n}\n\n.counter {\n border-left: var(--mds-input-controls-border);\n display: -ms-flexbox;\n display: flex;\n -ms-flex-direction: column;\n flex-direction: column;\n gap: 0;\n position: absolute;\n right: 0;\n}\n\n.counter-button {\n height: 1.5rem;\n width: 1.75rem;\n border-radius: 0.5rem;\n\n --mds-button-background: transparent;\n\n border: 0;\n fill: var(--mds-input-controls-color);\n min-height: 0;\n padding: 0;\n}\n\n.counter-button:hover {\n --mds-button-background: rgb(var(--tone-neutral-09));\n}\n\n.counter .counter-button:first-child {\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n border-top-left-radius: 0;\n}\n\n.counter .counter-button:last-child {\n border-bottom-left-radius: 0;\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n}\n\n.counter-button--horizontal {\n height: 3rem;\n width: 3rem;\n\n bottom: 0;\n position: absolute;\n top: 0;\n}\n\n.counter-button--decrease {\n border-bottom-right-radius: 0;\n border-right: var(--mds-input-controls-border);\n border-top-right-radius: 0;\n left: 0;\n}\n\n.counter-button--increase {\n border-bottom-left-radius: 0;\n border-left: var(--mds-input-controls-border);\n border-top-left-radius: 0;\n right: 0;\n}\n\n.password-toggle-button {\n top: 0.375rem;\n right: 0.375rem;\n\n fill: var(--mds-input-controls-color);\n position: absolute;\n}\n\n:host([type=\"number\"]) .input {\n\n /* required to avoid input number buttons on firefox go be shown always */\n\n /* stylelint-disable-next-line property-no-vendor-prefix */\n -moz-appearance: textfield;\n padding-right: 2rem;\n}\n\n:host([type=\"number\"][controls-layout=\"horizontal\"]) .input {\n padding-left: 3.5rem;\n padding-right: 3.5rem;\n\n text-align: center;\n}\n\n:host([type=\"number\"][controls-layout=\"horizontal\"][icon]) .input {\n padding-left: 6rem;\n\n text-align: left;\n}\n\n\n:host([type=\"number\"][controls-layout=\"horizontal\"]) .icon {\n left: 3.75rem;\n}\n\n:host([type=\"password\"]) .input {\n padding-right: 2.5rem;\n}\n\n:host([type=\"password\"]) .input[type=\"password\"]:not(:-moz-placeholder-shown) {\n font-size: 3rem;\n max-height: 3rem;\n}\n\n:host([type=\"password\"]) .input[type=\"password\"]:not(:-ms-input-placeholder) {\n font-size: 3rem;\n max-height: 3rem;\n}\n\n:host([type=\"password\"]) .input[type=\"password\"]:not(:placeholder-shown) {\n font-size: 3rem;\n max-height: 3rem;\n}\n\n:host([type=\"password\"]) .input[type=\"text\"]:not(:-moz-placeholder-shown) {\n min-height: 1.5rem;\n font-family: 'Roboto Mono', 'Courier New', monospace;\n font-size: 1rem;\n line-height: 1.5rem;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n:host([type=\"password\"]) .input[type=\"text\"]:not(:-ms-input-placeholder) {\n min-height: 1.5rem;\n font-family: 'Roboto Mono', 'Courier New', monospace;\n font-size: 1rem;\n line-height: 1.5rem;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n:host([type=\"password\"]) .input[type=\"text\"]:not(:placeholder-shown) {\n min-height: 1.5rem;\n font-family: 'Roboto Mono', 'Courier New', monospace;\n font-size: 1rem;\n line-height: 1.5rem;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n:host([type=\"cf\"]) .input {\n min-height: 1.5rem;\n font-family: 'Roboto Mono', 'Courier New', monospace;\n font-size: 1rem;\n line-height: 1.5rem;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n text-transform: uppercase;\n}\n\n@container (max-width: 210px) {\n :host .tip__content,\n :host(:focus-within) .tip__content {\n grid-template-columns: 0fr;\n opacity: 0;\n }\n\n :host .tip {\n padding-left: 0;\n padding-right: 0;\n }\n\n :host {\n --mds-input-background: rgb(var(--variant-primary-07));\n }\n}\n\n:host {\n --mds-input-icon-color: var(--variant-primary-03);\n --mds-input-variant-color: 0 0 0;\n}\n\n:host(:focus) {\n --mds-input-variant-color: var(--variant-primary-04);\n}\n\n:host([variant=\"info\"]) {\n --mds-input-icon-color: var(--status-info-05);\n --mds-input-tip-background: var(--status-info-05);\n --mds-input-variant-color: 0 0 0;\n}\n\n:host([variant=\"info\"]:focus) {\n --mds-input-icon-color: var(--status-info-04);\n --mds-input-variant-color: var(--status-info-05);\n}\n\n:host([variant=\"success\"]) {\n --mds-input-icon-color: var(--status-success-05);\n --mds-input-tip-background: var(--status-success-05);\n --mds-input-variant-color: 0 0 0;\n}\n\n:host([variant=\"success\"]:focus) {\n --mds-input-icon-color: var(--status-success-04);\n --mds-input-variant-color: var(--status-success-05);\n}\n\n:host([variant=\"warning\"]) {\n --mds-input-icon-color: var(--status-warning-05);\n --mds-input-tip-background: var(--status-warning-05);\n --mds-input-variant-color: 0 0 0;\n}\n\n:host([variant=\"warning\"]:focus) {\n --mds-input-icon-color: var(--status-warning-04);\n --mds-input-variant-color: var(--status-warning-05);\n}\n\n:host([variant=\"error\"]) {\n --mds-input-icon-color: var(--status-error-05);\n --mds-input-tip-background: var(--status-error-05);\n --mds-input-variant-color: 0 0 0;\n}\n\n:host([variant=\"error\"]:focus) {\n --mds-input-icon-color: var(--status-error-04);\n --mds-input-variant-color: var(--status-error-05);\n}\n\n:host-context(.pref-animation-reduce) .input {\n -webkit-transition-duration: 0s;\n transition-duration: 0s;\n}\n\n@media (prefers-reduced-motion) {\n :host-context(.pref-animation-system) .input {\n -webkit-transition-duration: 0s;\n transition-duration: 0s;\n }\n}\n\n:host-context(.pref-theme-dark) {\n --mds-input-ring: 0 0 0 2px rgb(var(--tone-neutral-01) / 0.3);\n --mds-input-background: rgb(var(--tone-neutral-09));\n --mds-input-controls-border: 2px solid rgb(var(--tone-neutral-06));\n}\n\n:host-context(.pref-theme-dark) .counter-button:hover {\n --mds-button-background: rgb(var(--tone-neutral-08));\n}\n\n@media (prefers-color-scheme: dark) {\n :host-context(.pref-theme-system) {\n --mds-input-ring: 0 0 0 2px rgb(var(--tone-neutral-01) / 0.3);\n --mds-input-background: rgb(var(--tone-neutral-09));\n --mds-input-controls-border: 2px solid rgb(var(--tone-neutral-06));\n }\n\n :host-context(.pref-theme-system) .counter-button:hover {\n --mds-button-background: rgb(var(--tone-neutral-08));\n }\n}\n\n:host-context(.pref-contrast-more) {\n --mds-input-ring: 0 0 0 2px rgb(var(--tone-neutral-01) / 0.6);\n --mds-input-background: rgb(var(--tone-neutral-09));\n --mds-input-controls-border: 2px solid rgb(var(--tone-neutral-05));\n}\n\n:host-context(.pref-contrast-more) .input::-moz-placeholder {\n color: rgb(var(--tone-neutral-03));\n}\n\n:host-context(.pref-contrast-more) .input::-webkit-input-placeholder {\n color: rgb(var(--tone-neutral-03));\n}\n\n:host-context(.pref-contrast-more) .input:-ms-input-placeholder {\n color: rgb(var(--tone-neutral-03));\n}\n\n:host-context(.pref-contrast-more) .input::-ms-input-placeholder {\n color: rgb(var(--tone-neutral-03));\n}\n\n:host-context(.pref-contrast-more) .input::placeholder {\n color: rgb(var(--tone-neutral-03));\n}\n\n@media (prefers-contrast: more) {\n :host-context(.pref-contrast-system) {\n --mds-input-ring: 0 0 0 2px rgb(var(--tone-neutral-01) / 0.6);\n --mds-input-background: rgb(var(--tone-neutral-09));\n --mds-input-controls-border: 2px solid rgb(var(--tone-neutral-05));\n }\n\n :host-context(.pref-contrast-more) .input::-moz-placeholder {\n color: rgb(var(--tone-neutral-03));\n }\n\n :host-context(.pref-contrast-more) .input::-webkit-input-placeholder {\n color: rgb(var(--tone-neutral-03));\n }\n\n :host-context(.pref-contrast-more) .input:-ms-input-placeholder {\n color: rgb(var(--tone-neutral-03));\n }\n\n :host-context(.pref-contrast-more) .input::-ms-input-placeholder {\n color: rgb(var(--tone-neutral-03));\n }\n\n :host-context(.pref-contrast-more) .input::placeholder {\n color: rgb(var(--tone-neutral-03));\n }\n}\n\n:host(:not(:is([hydrated], .hydrated))) {\n -webkit-animation-duration: 0s;\n animation-duration: 0s;\n border-color: transparent;\n -webkit-box-shadow: 0 0 0 transparent;\n box-shadow: 0 0 0 transparent;\n opacity: 0;\n outline-color: transparent;\n -webkit-transition-delay: 0s;\n transition-delay: 0s;\n -webkit-transition-duration: 0s;\n transition-duration: 0s;\n visibility: hidden;\n}\n\n/* TODO refact(stencil): Uses only used selector from parent shadowDOM component */\n\nmds-accordion:not(:is([hydrated], .hydrated)),\nmds-accordion-item:not(:is([hydrated], .hydrated)),\nmds-accordion-timer:not(:is([hydrated], .hydrated)),\nmds-accordion-timer-item:not(:is([hydrated], .hydrated)),\nmds-author:not(:is([hydrated], .hydrated)),\nmds-avatar:not(:is([hydrated], .hydrated)),\nmds-badge:not(:is([hydrated], .hydrated)),\nmds-banner:not(:is([hydrated], .hydrated)),\nmds-benchmark-bar:not(:is([hydrated], .hydrated)),\nmds-bibliography:not(:is([hydrated], .hydrated)),\nmds-breadcrumb:not(:is([hydrated], .hydrated)),\nmds-breadcrumb-item:not(:is([hydrated], .hydrated)),\nmds-button:not(:is([hydrated], .hydrated)),\nmds-card:not(:is([hydrated], .hydrated)),\nmds-card-content:not(:is([hydrated], .hydrated)),\nmds-card-footer:not(:is([hydrated], .hydrated)),\nmds-card-header:not(:is([hydrated], .hydrated)),\nmds-card-media:not(:is([hydrated], .hydrated)),\nmds-chip:not(:is([hydrated], .hydrated)),\nmds-details:not(:is([hydrated], .hydrated)),\nmds-dropdown:not(:is([hydrated], .hydrated)),\nmds-entity:not(:is([hydrated], .hydrated)),\nmds-file:not(:is([hydrated], .hydrated)),\nmds-file-preview:not(:is([hydrated], .hydrated)),\nmds-filter:not(:is([hydrated], .hydrated)),\nmds-filter-item:not(:is([hydrated], .hydrated)),\nmds-header:not(:is([hydrated], .hydrated)),\nmds-header-bar:not(:is([hydrated], .hydrated)),\nmds-help:not(:is([hydrated], .hydrated)),\nmds-horizontal-scroll:not(:is([hydrated], .hydrated)),\nmds-hr:not(:is([hydrated], .hydrated)),\nmds-icon:not(:is([hydrated], .hydrated)),\nmds-img:not(:is([hydrated], .hydrated)),\nmds-input:not(:is([hydrated], .hydrated)),\nmds-input-field:not(:is([hydrated], .hydrated)),\nmds-input-range:not(:is([hydrated], .hydrated)),\nmds-input-select:not(:is([hydrated], .hydrated)),\nmds-input-switch:not(:is([hydrated], .hydrated)),\nmds-input-tip:not(:is([hydrated], .hydrated)),\nmds-input-tip-item:not(:is([hydrated], .hydrated)),\nmds-input-upload:not(:is([hydrated], .hydrated)),\nmds-keyboard:not(:is([hydrated], .hydrated)),\nmds-keyboard-key:not(:is([hydrated], .hydrated)),\nmds-kpi:not(:is([hydrated], .hydrated)),\nmds-kpi-item:not(:is([hydrated], .hydrated)),\nmds-label:not(:is([hydrated], .hydrated)),\nmds-list:not(:is([hydrated], .hydrated)),\nmds-list-item:not(:is([hydrated], .hydrated)),\nmds-modal:not(:is([hydrated], .hydrated)),\nmds-note:not(:is([hydrated], .hydrated)),\nmds-notification:not(:is([hydrated], .hydrated)),\nmds-paginator:not(:is([hydrated], .hydrated)),\nmds-paginator-item:not(:is([hydrated], .hydrated)),\nmds-pref:not(:is([hydrated], .hydrated)),\nmds-pref-animation:not(:is([hydrated], .hydrated)),\nmds-pref-consumption:not(:is([hydrated], .hydrated)),\nmds-pref-contrast:not(:is([hydrated], .hydrated)),\nmds-pref-language:not(:is([hydrated], .hydrated)),\nmds-pref-language-item:not(:is([hydrated], .hydrated)),\nmds-pref-theme:not(:is([hydrated], .hydrated)),\nmds-price-table:not(:is([hydrated], .hydrated)),\nmds-price-table-features:not(:is([hydrated], .hydrated)),\nmds-price-table-features-cell:not(:is([hydrated], .hydrated)),\nmds-price-table-features-row:not(:is([hydrated], .hydrated)),\nmds-price-table-header:not(:is([hydrated], .hydrated)),\nmds-price-table-list:not(:is([hydrated], .hydrated)),\nmds-price-table-list-item:not(:is([hydrated], .hydrated)),\nmds-progress:not(:is([hydrated], .hydrated)),\nmds-push-notification:not(:is([hydrated], .hydrated)),\nmds-push-notifications:not(:is([hydrated], .hydrated)),\nmds-quote:not(:is([hydrated], .hydrated)),\nmds-separator:not(:is([hydrated], .hydrated)),\nmds-spinner:not(:is([hydrated], .hydrated)),\nmds-stepper-bar:not(:is([hydrated], .hydrated)),\nmds-stepper-bar-item:not(:is([hydrated], .hydrated)),\nmds-tab:not(:is([hydrated], .hydrated)),\nmds-tab-bar:not(:is([hydrated], .hydrated)),\nmds-tab-bar-item:not(:is([hydrated], .hydrated)),\nmds-tab-item:not(:is([hydrated], .hydrated)),\nmds-table:not(:is([hydrated], .hydrated)),\nmds-table-body:not(:is([hydrated], .hydrated)),\nmds-table-cell:not(:is([hydrated], .hydrated)),\nmds-table-footer:not(:is([hydrated], .hydrated)),\nmds-table-header:not(:is([hydrated], .hydrated)),\nmds-table-header-cell:not(:is([hydrated], .hydrated)),\nmds-table-row:not(:is([hydrated], .hydrated)),\nmds-text:not(:is([hydrated], .hydrated)),\nmds-toast:not(:is([hydrated], .hydrated)),\nmds-tooltip:not(:is([hydrated], .hydrated)),\nmds-tree:not(:is([hydrated], .hydrated)),\nmds-tree-item:not(:is([hydrated], .hydrated)),\nmds-url-view:not(:is([hydrated], .hydrated)),\nmds-usage:not(:is([hydrated], .hydrated)),\nmds-video-wall:not(:is([hydrated], .hydrated)),\nmds-zero:not(:is([hydrated], .hydrated))\n{\n -webkit-animation-duration: 0s;\n animation-duration: 0s;\n border-color: transparent;\n -webkit-box-shadow: 0 0 0 transparent;\n box-shadow: 0 0 0 transparent;\n opacity: 0;\n outline-color: transparent;\n -webkit-transition-delay: 0s;\n transition-delay: 0s;\n -webkit-transition-duration: 0s;\n transition-duration: 0s;\n visibility: hidden;\n}\n\n";
1071
+ const mdsInputCss = "/**\n * @prop --mds-input-background: Sets the background-color of the component\n * @prop --mds-input-icon-color: Sets the icon color of the component\n * @prop --mds-input-placeholder-default-color: Sets the color of the placeholder\n * @prop --mds-input-placeholder-focus-color: Sets the color of the placeholder when the input is focused\n * @prop --mds-input-placeholder-hover-color: Sets the color of the placeholder when the input is hovered\n * @prop --mds-input-ring: Sets the box-shadow of the component's input\n * @prop --mds-input-shadow: Sets the box-shadow of the component's input\n * @prop --mds-input-textarea-field-sizing: Sets the height of the textarea automatically, this is an EXPERIMENTAL css property, so it couldn't work in every browser\n * @prop --mds-input-textarea-max-height: Sets the `max-height` of the component when attribute `type` is set to `textarea`\n * @prop --mds-input-textarea-min-height: Sets the `min-height` of the component when attribute `type` is set to `textarea`\n * @prop --mds-input-tip-background: Sets the background color of the tip message at the bottom right of the component\n * @prop --mds-input-variant-color: Sets the variant colors of the component\n */\n\n:host {\n --mds-input-background: rgb(var(--tone-neutral));\n --mds-input-icon-color: var(--mds-input-variant-color);\n --mds-input-placeholder-default-color: rgb(var(--tone-neutral-06));\n --mds-input-placeholder-focus-color: rgb(var(--tone-neutral-07));\n --mds-input-placeholder-hover-color: var(--mds-input-placeholder-default-color);\n --mds-input-ring: 0 0 0 1px rgb(var(--mds-input-variant-color) / 0.1);\n --mds-input-shadow: 0 1px 3px 0 rgb(var(--mds-input-variant-color) / 0.1), 0 1px 2px 0 rgb(var(--mds-input-variant-color) / 0.06);\n --mds-input-textarea-field-sizing: content;\n --mds-input-textarea-resize: none;\n --mds-input-textarea-max-height: 16rem;\n --mds-input-textarea-min-height: 6rem;\n --mds-input-tip-background: 84 84 84;\n --mds-input-variant-color: 0 0 0;\n /* private */ --mds-input-controls-border: 2px solid rgb(var(--tone-neutral-09));\n /* private */ --mds-input-controls-color: rgb(var(--tone-neutral-03)); min-height: 1.5rem; font-family: Karla, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; font-size: 1rem; line-height: 1.5rem; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; gap: 0.5rem;\n\n container-type: inline-size;\n display: -ms-flexbox;\n display: flex;\n position: relative;\n}\n\n:host([typography=\"detail\"]) .input {\n min-height: 1.5rem;\n font-family: Karla, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;\n font-size: 1rem;\n line-height: 1.5rem;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n:host([typography=\"snippet\"]) .input {\n min-height: 1.5rem;\n font-family: 'Roboto Mono', 'Courier New', monospace;\n font-size: 1rem;\n line-height: 1.5rem;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n.input {\n font-family: Karla, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;\n font-size: 1rem;\n line-height: 1.5rem;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n margin: 0rem;\n border-radius: 0.5rem;\n padding-left: 1rem;\n padding-right: 1rem;\n padding-top: 0.75rem;\n padding-bottom: 0.75rem;\n -webkit-transition-duration: 300ms;\n transition-duration: 300ms;\n -webkit-transition-timing-function: cubic-bezier(0.19, 1, 0.22, 1);\n transition-timing-function: cubic-bezier(0.19, 1, 0.22, 1);\n\n background-color: var(--mds-input-background);\n border: 0;\n -webkit-box-shadow: var(--mds-input-ring), var(--mds-input-shadow);\n box-shadow: var(--mds-input-ring), var(--mds-input-shadow);\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n color: rgb(var(--tone-neutral-02));\n max-width: 100%;\n min-height: 3rem;\n overflow: hidden;\n text-overflow: ellipsis;\n -webkit-transition-property: background-color, border-color, color, fill, margin, opacity, padding, -webkit-box-shadow, -webkit-transform;\n transition-property: background-color, border-color, color, fill, margin, opacity, padding, -webkit-box-shadow, -webkit-transform;\n transition-property: background-color, border-color, box-shadow, color, fill, margin, opacity, padding, transform;\n transition-property: background-color, border-color, box-shadow, color, fill, margin, opacity, padding, transform, -webkit-box-shadow, -webkit-transform;\n width: 100%;\n}\n\n.input::-moz-placeholder {\n transition-duration: 300ms;\n transition-timing-function: cubic-bezier(0.19, 1, 0.22, 1);\n\n color: var(--mds-input-placeholder-default-color);\n -moz-transition-property: color;\n transition-property: color;\n}\n\n.input::-webkit-input-placeholder {\n -webkit-transition-duration: 300ms;\n transition-duration: 300ms;\n -webkit-transition-timing-function: cubic-bezier(0.19, 1, 0.22, 1);\n transition-timing-function: cubic-bezier(0.19, 1, 0.22, 1);\n\n color: var(--mds-input-placeholder-default-color);\n -webkit-transition-property: color;\n transition-property: color;\n}\n\n.input:-ms-input-placeholder {\n transition-duration: 300ms;\n transition-timing-function: cubic-bezier(0.19, 1, 0.22, 1);\n\n color: var(--mds-input-placeholder-default-color);\n -ms-transition-property: color;\n transition-property: color;\n}\n\n.input::-ms-input-placeholder {\n transition-duration: 300ms;\n transition-timing-function: cubic-bezier(0.19, 1, 0.22, 1);\n\n color: var(--mds-input-placeholder-default-color);\n -ms-transition-property: color;\n transition-property: color;\n}\n\n.input::placeholder {\n -webkit-transition-duration: 300ms;\n transition-duration: 300ms;\n -webkit-transition-timing-function: cubic-bezier(0.19, 1, 0.22, 1);\n transition-timing-function: cubic-bezier(0.19, 1, 0.22, 1);\n\n color: var(--mds-input-placeholder-default-color);\n -webkit-transition-property: color;\n transition-property: color;\n}\n\n.input:hover::-moz-placeholder {\n color: var(--mds-input-placeholder-hover-color);\n}\n\n.input:hover::-webkit-input-placeholder {\n color: var(--mds-input-placeholder-hover-color);\n}\n\n.input:hover:-ms-input-placeholder {\n color: var(--mds-input-placeholder-hover-color);\n}\n\n.input:hover::-ms-input-placeholder {\n color: var(--mds-input-placeholder-hover-color);\n}\n\n.input:hover::placeholder {\n color: var(--mds-input-placeholder-hover-color);\n}\n\n.input:focus::-moz-placeholder {\n color: var(--mds-input-placeholder-focus-color);\n}\n\n.input:focus::-webkit-input-placeholder {\n color: var(--mds-input-placeholder-focus-color);\n}\n\n.input:focus:-ms-input-placeholder {\n color: var(--mds-input-placeholder-focus-color);\n}\n\n.input:focus::-ms-input-placeholder {\n color: var(--mds-input-placeholder-focus-color);\n}\n\n.input:focus::placeholder {\n color: var(--mds-input-placeholder-focus-color);\n}\n\n.input::-webkit-outer-spin-button,\n.input::-webkit-inner-spin-button {\n -webkit-appearance: none;\n appearance: none;\n display: none;\n margin: 0;\n}\n\n:host textarea.input,\n:host([typography]) textarea.input {\n border-bottom-right-radius: 0;\n\n field-sizing: var(--mds-input-textarea-field-sizing);\n max-height: var(--mds-input-textarea-max-height);\n min-height: var(--mds-input-textarea-min-height);\n overflow: auto;\n resize: var(--mds-input-textarea-resize);\n}\n\n.input:focus {\n outline: 2px solid transparent;\n outline-offset: 2px;\n\n --mds-input-ring: 0 0 0 3px rgb(var(--mds-input-variant-color) / 1);\n --mds-input-shadow: 0 4px 6px 3px rgb(var(--mds-input-variant-color) / 0.1), 0 2px 4px -1px rgb(var(--mds-input-variant-color) / 0.06);\n}\n\n.input:disabled {\n background-color: rgb(var(--tone-neutral-10));\n}\n\n.input:disabled::-moz-placeholder {\n color: rgb(var(--tone-neutral-05));\n}\n\n.input:disabled::-webkit-input-placeholder {\n color: rgb(var(--tone-neutral-05));\n}\n\n.input:disabled:-ms-input-placeholder {\n color: rgb(var(--tone-neutral-05));\n}\n\n.input:disabled::-ms-input-placeholder {\n color: rgb(var(--tone-neutral-05));\n}\n\n.input:disabled,\n.input:disabled::placeholder {\n color: rgb(var(--tone-neutral-05));\n}\n\n.input.has-icon {\n padding-left: 2.75rem;\n}\n\n.input.has-right-icon {\n padding-right: 2.75rem;\n}\n\n\n.await,\n.icon {\n left: 0.75rem;\n top: 0.75rem;\n\n fill: rgb(var(--mds-input-icon-color));\n position: absolute;\n}\n\n.await {\n color: rgb(var(--mds-input-icon-color));\n height: 24px;\n width: 24px;\n}\n\n.counter {\n border-left: var(--mds-input-controls-border);\n display: -ms-flexbox;\n display: flex;\n -ms-flex-direction: column;\n flex-direction: column;\n gap: 0;\n position: absolute;\n right: 0;\n}\n\n.counter-button {\n height: 1.5rem;\n width: 1.75rem;\n border-radius: 0.5rem;\n\n --mds-button-background: transparent;\n\n border: 0;\n fill: var(--mds-input-controls-color);\n min-height: 0;\n padding: 0;\n}\n\n.counter-button:hover {\n --mds-button-background: rgb(var(--tone-neutral-09));\n}\n\n.counter .counter-button:first-child {\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n border-top-left-radius: 0;\n}\n\n.counter .counter-button:last-child {\n border-bottom-left-radius: 0;\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n}\n\n.counter-button--horizontal {\n height: 3rem;\n width: 3rem;\n\n bottom: 0;\n position: absolute;\n top: 0;\n}\n\n.counter-button--decrease {\n border-bottom-right-radius: 0;\n border-right: var(--mds-input-controls-border);\n border-top-right-radius: 0;\n left: 0;\n}\n\n.counter-button--increase {\n border-bottom-left-radius: 0;\n border-left: var(--mds-input-controls-border);\n border-top-left-radius: 0;\n right: 0;\n}\n\n.password-toggle-button {\n top: 0.375rem;\n right: 0.375rem;\n\n fill: var(--mds-input-controls-color);\n position: absolute;\n}\n\n.mic-toggle-button {\n top: 0.375rem;\n right: 0.375rem;\n\n fill: var(--mds-input-controls-color);\n position: absolute;\n}\n\n.toggle-button--error {\n cursor: help;\n fill: rgb(var(--tone-neutral-06));\n}\n\n@-webkit-keyframes pulse {\n\n 50% {\n opacity: .5;\n }\n}\n\n@keyframes pulse {\n\n 50% {\n opacity: .5;\n }\n}\n\n.mic-toggle-button--recording {\n -webkit-animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;\n animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;\n}\n\n:host([type=\"number\"]) .input {\n\n /* required to avoid input number buttons on firefox go be shown always */\n\n /* stylelint-disable-next-line property-no-vendor-prefix */\n -moz-appearance: textfield;\n padding-right: 2rem;\n}\n\n:host([type=\"number\"][controls-layout=\"horizontal\"]) .input {\n padding-left: 3.5rem;\n padding-right: 3.5rem;\n\n text-align: center;\n}\n\n:host([type=\"number\"][controls-layout=\"horizontal\"][icon]) .input {\n padding-left: 6rem;\n\n text-align: left;\n}\n\n\n:host([type=\"number\"][controls-layout=\"horizontal\"]) .icon {\n left: 3.75rem;\n}\n\n:host([type=\"password\"]) .input {\n padding-right: 2.5rem;\n}\n\n:host([type=\"password\"]) .input[type=\"password\"]:not(:-moz-placeholder-shown) {\n font-size: 3rem;\n max-height: 3rem;\n}\n\n:host([type=\"password\"]) .input[type=\"password\"]:not(:-ms-input-placeholder) {\n font-size: 3rem;\n max-height: 3rem;\n}\n\n:host([type=\"password\"]) .input[type=\"password\"]:not(:placeholder-shown) {\n font-size: 3rem;\n max-height: 3rem;\n}\n\n:host([type=\"password\"]) .input[type=\"text\"]:not(:-moz-placeholder-shown) {\n min-height: 1.5rem;\n font-family: 'Roboto Mono', 'Courier New', monospace;\n font-size: 1rem;\n line-height: 1.5rem;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n:host([type=\"password\"]) .input[type=\"text\"]:not(:-ms-input-placeholder) {\n min-height: 1.5rem;\n font-family: 'Roboto Mono', 'Courier New', monospace;\n font-size: 1rem;\n line-height: 1.5rem;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n:host([type=\"password\"]) .input[type=\"text\"]:not(:placeholder-shown) {\n min-height: 1.5rem;\n font-family: 'Roboto Mono', 'Courier New', monospace;\n font-size: 1rem;\n line-height: 1.5rem;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n:host([type=\"cf\"]) .input {\n min-height: 1.5rem;\n font-family: 'Roboto Mono', 'Courier New', monospace;\n font-size: 1rem;\n line-height: 1.5rem;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n text-transform: uppercase;\n}\n\n@container (max-width: 210px) {\n :host .tip__content,\n :host(:focus-within) .tip__content {\n grid-template-columns: 0fr;\n opacity: 0;\n }\n\n :host .tip {\n padding-left: 0;\n padding-right: 0;\n }\n\n :host {\n --mds-input-background: rgb(var(--variant-primary-07));\n }\n}\n\n:host {\n --mds-input-icon-color: var(--variant-primary-03);\n --mds-input-variant-color: 0 0 0;\n}\n\n:host(:focus) {\n --mds-input-variant-color: var(--variant-primary-04);\n}\n\n:host([variant=\"ai\"]) {\n --mds-input-icon-color: var(--variant-ai-05);\n --mds-input-tip-background: var(--variant-ai-05);\n --mds-input-variant-color: 0 0 0;\n}\n\n:host([variant=\"ai\"]:focus) {\n --mds-input-icon-color: var(--variant-ai-04);\n --mds-input-variant-color: var(--variant-ai-05);\n}\n\n:host([variant=\"info\"]) {\n --mds-input-icon-color: var(--status-info-05);\n --mds-input-tip-background: var(--status-info-05);\n --mds-input-variant-color: 0 0 0;\n}\n\n:host([variant=\"info\"]:focus) {\n --mds-input-icon-color: var(--status-info-04);\n --mds-input-variant-color: var(--status-info-05);\n}\n\n:host([variant=\"success\"]) {\n --mds-input-icon-color: var(--status-success-05);\n --mds-input-tip-background: var(--status-success-05);\n --mds-input-variant-color: 0 0 0;\n}\n\n:host([variant=\"success\"]:focus) {\n --mds-input-icon-color: var(--status-success-04);\n --mds-input-variant-color: var(--status-success-05);\n}\n\n:host([variant=\"warning\"]) {\n --mds-input-icon-color: var(--status-warning-05);\n --mds-input-tip-background: var(--status-warning-05);\n --mds-input-variant-color: 0 0 0;\n}\n\n:host([variant=\"warning\"]:focus) {\n --mds-input-icon-color: var(--status-warning-04);\n --mds-input-variant-color: var(--status-warning-05);\n}\n\n:host([variant=\"error\"]) {\n --mds-input-icon-color: var(--status-error-05);\n --mds-input-tip-background: var(--status-error-05);\n --mds-input-variant-color: 0 0 0;\n}\n\n:host([variant=\"error\"]:focus) {\n --mds-input-icon-color: var(--status-error-04);\n --mds-input-variant-color: var(--status-error-05);\n}\n\n:host-context(.pref-animation-reduce) .input {\n -webkit-transition-duration: 0s;\n transition-duration: 0s;\n}\n\n@media (prefers-reduced-motion) {\n :host-context(.pref-animation-system) .input {\n -webkit-transition-duration: 0s;\n transition-duration: 0s;\n }\n}\n\n:host-context(.pref-theme-dark) {\n --mds-input-ring: 0 0 0 2px rgb(var(--tone-neutral-01) / 0.3);\n --mds-input-background: rgb(var(--tone-neutral-09));\n --mds-input-controls-border: 2px solid rgb(var(--tone-neutral-06));\n}\n\n:host-context(.pref-theme-dark) .counter-button:hover {\n --mds-button-background: rgb(var(--tone-neutral-08));\n}\n\n@media (prefers-color-scheme: dark) {\n :host-context(.pref-theme-system) {\n --mds-input-ring: 0 0 0 2px rgb(var(--tone-neutral-01) / 0.3);\n --mds-input-background: rgb(var(--tone-neutral-09));\n --mds-input-controls-border: 2px solid rgb(var(--tone-neutral-06));\n }\n\n :host-context(.pref-theme-system) .counter-button:hover {\n --mds-button-background: rgb(var(--tone-neutral-08));\n }\n}\n\n:host-context(.pref-contrast-more) {\n --mds-input-ring: 0 0 0 2px rgb(var(--tone-neutral-01) / 0.6);\n --mds-input-background: rgb(var(--tone-neutral-09));\n --mds-input-controls-border: 2px solid rgb(var(--tone-neutral-05));\n}\n\n:host-context(.pref-contrast-more) .input::-moz-placeholder {\n color: rgb(var(--tone-neutral-03));\n}\n\n:host-context(.pref-contrast-more) .input::-webkit-input-placeholder {\n color: rgb(var(--tone-neutral-03));\n}\n\n:host-context(.pref-contrast-more) .input:-ms-input-placeholder {\n color: rgb(var(--tone-neutral-03));\n}\n\n:host-context(.pref-contrast-more) .input::-ms-input-placeholder {\n color: rgb(var(--tone-neutral-03));\n}\n\n:host-context(.pref-contrast-more) .input::placeholder {\n color: rgb(var(--tone-neutral-03));\n}\n\n@media (prefers-contrast: more) {\n :host-context(.pref-contrast-system) {\n --mds-input-ring: 0 0 0 2px rgb(var(--tone-neutral-01) / 0.6);\n --mds-input-background: rgb(var(--tone-neutral-09));\n --mds-input-controls-border: 2px solid rgb(var(--tone-neutral-05));\n }\n\n :host-context(.pref-contrast-more) .input::-moz-placeholder {\n color: rgb(var(--tone-neutral-03));\n }\n\n :host-context(.pref-contrast-more) .input::-webkit-input-placeholder {\n color: rgb(var(--tone-neutral-03));\n }\n\n :host-context(.pref-contrast-more) .input:-ms-input-placeholder {\n color: rgb(var(--tone-neutral-03));\n }\n\n :host-context(.pref-contrast-more) .input::-ms-input-placeholder {\n color: rgb(var(--tone-neutral-03));\n }\n\n :host-context(.pref-contrast-more) .input::placeholder {\n color: rgb(var(--tone-neutral-03));\n }\n}\n\n:host(:not(:is([hydrated], .hydrated))) {\n -webkit-animation-duration: 0s;\n animation-duration: 0s;\n border-color: transparent;\n -webkit-box-shadow: 0 0 0 transparent;\n box-shadow: 0 0 0 transparent;\n opacity: 0;\n outline-color: transparent;\n -webkit-transition-delay: 0s;\n transition-delay: 0s;\n -webkit-transition-duration: 0s;\n transition-duration: 0s;\n visibility: hidden;\n}\n\n/* TODO refact(stencil): Uses only used selector from parent shadowDOM component */\n\nmds-accordion:not(:is([hydrated], .hydrated)),\nmds-accordion-item:not(:is([hydrated], .hydrated)),\nmds-accordion-timer:not(:is([hydrated], .hydrated)),\nmds-accordion-timer-item:not(:is([hydrated], .hydrated)),\nmds-author:not(:is([hydrated], .hydrated)),\nmds-avatar:not(:is([hydrated], .hydrated)),\nmds-badge:not(:is([hydrated], .hydrated)),\nmds-banner:not(:is([hydrated], .hydrated)),\nmds-benchmark-bar:not(:is([hydrated], .hydrated)),\nmds-bibliography:not(:is([hydrated], .hydrated)),\nmds-breadcrumb:not(:is([hydrated], .hydrated)),\nmds-breadcrumb-item:not(:is([hydrated], .hydrated)),\nmds-button:not(:is([hydrated], .hydrated)),\nmds-card:not(:is([hydrated], .hydrated)),\nmds-card-content:not(:is([hydrated], .hydrated)),\nmds-card-footer:not(:is([hydrated], .hydrated)),\nmds-card-header:not(:is([hydrated], .hydrated)),\nmds-card-media:not(:is([hydrated], .hydrated)),\nmds-chip:not(:is([hydrated], .hydrated)),\nmds-details:not(:is([hydrated], .hydrated)),\nmds-dropdown:not(:is([hydrated], .hydrated)),\nmds-entity:not(:is([hydrated], .hydrated)),\nmds-file:not(:is([hydrated], .hydrated)),\nmds-file-preview:not(:is([hydrated], .hydrated)),\nmds-filter:not(:is([hydrated], .hydrated)),\nmds-filter-item:not(:is([hydrated], .hydrated)),\nmds-header:not(:is([hydrated], .hydrated)),\nmds-header-bar:not(:is([hydrated], .hydrated)),\nmds-help:not(:is([hydrated], .hydrated)),\nmds-horizontal-scroll:not(:is([hydrated], .hydrated)),\nmds-hr:not(:is([hydrated], .hydrated)),\nmds-icon:not(:is([hydrated], .hydrated)),\nmds-img:not(:is([hydrated], .hydrated)),\nmds-input:not(:is([hydrated], .hydrated)),\nmds-input-field:not(:is([hydrated], .hydrated)),\nmds-input-range:not(:is([hydrated], .hydrated)),\nmds-input-select:not(:is([hydrated], .hydrated)),\nmds-input-switch:not(:is([hydrated], .hydrated)),\nmds-input-tip:not(:is([hydrated], .hydrated)),\nmds-input-tip-item:not(:is([hydrated], .hydrated)),\nmds-input-upload:not(:is([hydrated], .hydrated)),\nmds-keyboard:not(:is([hydrated], .hydrated)),\nmds-keyboard-key:not(:is([hydrated], .hydrated)),\nmds-kpi:not(:is([hydrated], .hydrated)),\nmds-kpi-item:not(:is([hydrated], .hydrated)),\nmds-label:not(:is([hydrated], .hydrated)),\nmds-list:not(:is([hydrated], .hydrated)),\nmds-list-item:not(:is([hydrated], .hydrated)),\nmds-modal:not(:is([hydrated], .hydrated)),\nmds-note:not(:is([hydrated], .hydrated)),\nmds-notification:not(:is([hydrated], .hydrated)),\nmds-paginator:not(:is([hydrated], .hydrated)),\nmds-paginator-item:not(:is([hydrated], .hydrated)),\nmds-pref:not(:is([hydrated], .hydrated)),\nmds-pref-animation:not(:is([hydrated], .hydrated)),\nmds-pref-consumption:not(:is([hydrated], .hydrated)),\nmds-pref-contrast:not(:is([hydrated], .hydrated)),\nmds-pref-language:not(:is([hydrated], .hydrated)),\nmds-pref-language-item:not(:is([hydrated], .hydrated)),\nmds-pref-theme:not(:is([hydrated], .hydrated)),\nmds-price-table:not(:is([hydrated], .hydrated)),\nmds-price-table-features:not(:is([hydrated], .hydrated)),\nmds-price-table-features-cell:not(:is([hydrated], .hydrated)),\nmds-price-table-features-row:not(:is([hydrated], .hydrated)),\nmds-price-table-header:not(:is([hydrated], .hydrated)),\nmds-price-table-list:not(:is([hydrated], .hydrated)),\nmds-price-table-list-item:not(:is([hydrated], .hydrated)),\nmds-progress:not(:is([hydrated], .hydrated)),\nmds-push-notification:not(:is([hydrated], .hydrated)),\nmds-push-notifications:not(:is([hydrated], .hydrated)),\nmds-quote:not(:is([hydrated], .hydrated)),\nmds-separator:not(:is([hydrated], .hydrated)),\nmds-spinner:not(:is([hydrated], .hydrated)),\nmds-stepper-bar:not(:is([hydrated], .hydrated)),\nmds-stepper-bar-item:not(:is([hydrated], .hydrated)),\nmds-tab:not(:is([hydrated], .hydrated)),\nmds-tab-bar:not(:is([hydrated], .hydrated)),\nmds-tab-bar-item:not(:is([hydrated], .hydrated)),\nmds-tab-item:not(:is([hydrated], .hydrated)),\nmds-table:not(:is([hydrated], .hydrated)),\nmds-table-body:not(:is([hydrated], .hydrated)),\nmds-table-cell:not(:is([hydrated], .hydrated)),\nmds-table-footer:not(:is([hydrated], .hydrated)),\nmds-table-header:not(:is([hydrated], .hydrated)),\nmds-table-header-cell:not(:is([hydrated], .hydrated)),\nmds-table-row:not(:is([hydrated], .hydrated)),\nmds-text:not(:is([hydrated], .hydrated)),\nmds-toast:not(:is([hydrated], .hydrated)),\nmds-tooltip:not(:is([hydrated], .hydrated)),\nmds-tree:not(:is([hydrated], .hydrated)),\nmds-tree-item:not(:is([hydrated], .hydrated)),\nmds-url-view:not(:is([hydrated], .hydrated)),\nmds-usage:not(:is([hydrated], .hydrated)),\nmds-video-wall:not(:is([hydrated], .hydrated)),\nmds-zero:not(:is([hydrated], .hydrated))\n{\n -webkit-animation-duration: 0s;\n animation-duration: 0s;\n border-color: transparent;\n -webkit-box-shadow: 0 0 0 transparent;\n box-shadow: 0 0 0 transparent;\n opacity: 0;\n outline-color: transparent;\n -webkit-transition-delay: 0s;\n transition-delay: 0s;\n -webkit-transition-duration: 0s;\n transition-duration: 0s;\n visibility: hidden;\n}\n\n";
1035
1072
  const MdsInputStyle0 = mdsInputCss;
1036
1073
 
1037
1074
  const MdsInput = class {
@@ -1041,6 +1078,7 @@ const MdsInput = class {
1041
1078
  this.keyDownEvent = index.createEvent(this, "mdsInputKeydown", 7);
1042
1079
  this.blurEvent = index.createEvent(this, "mdsInputBlur", 7);
1043
1080
  this.focusEvent = index.createEvent(this, "mdsInputFocus", 7);
1081
+ this.speechEvent = index.createEvent(this, "mdsInputSpeechEnd", 7);
1044
1082
  this.validationEvent = index.createEvent(this, "mdsInputValidation", 7);
1045
1083
  if (hostRef.$hostElement$["s-ei"]) {
1046
1084
  this.internals = hostRef.$hostElement$["s-ei"];
@@ -1049,9 +1087,12 @@ const MdsInput = class {
1049
1087
  this.internals = hostRef.$hostElement$.attachInternals();
1050
1088
  hostRef.$hostElement$["s-ei"] = this.internals;
1051
1089
  }
1090
+ this.speechToTextIcon = miOutlineMic;
1052
1091
  this.hasFocus = false;
1092
+ this.isRecording = false;
1053
1093
  this.countVariant = 'count-empty';
1054
1094
  this.isPasswordVisible = false;
1095
+ this.transcript = '';
1055
1096
  // private valuePristine?: string
1056
1097
  this.t = new Locale({
1057
1098
  el: localeEl,
@@ -1099,6 +1140,10 @@ const MdsInput = class {
1099
1140
  * Specifies that the element must be filled out before submitting the form
1100
1141
  */
1101
1142
  this.required = false;
1143
+ /**
1144
+ * Sets the variant of the input field
1145
+ */
1146
+ this.variant = 'primary';
1102
1147
  /**
1103
1148
  * Specifies the type of input element
1104
1149
  */
@@ -1180,6 +1225,62 @@ const MdsInput = class {
1180
1225
  this.value = this.nativeInput.value;
1181
1226
  }
1182
1227
  };
1228
+ this.toggleTextRecognition = () => {
1229
+ this.isRecording = !this.isRecording;
1230
+ if (!this.isRecording) {
1231
+ this.speechToTextLabel = this.t.get('speechToTextOn');
1232
+ this.speechToTextIcon = miOutlineMic;
1233
+ this.stopRecognition();
1234
+ return;
1235
+ }
1236
+ this.speechToTextLabel = this.t.get('speechToTextOff');
1237
+ this.speechToTextIcon = miBaselineDone;
1238
+ this.startRecognition();
1239
+ };
1240
+ this.onSpeechRecognitionError = () => {
1241
+ console.error('SpeechRecognition API may not work properly on Chrome based browsers.');
1242
+ this.speechButton.classList.remove('mic-toggle-button--recording');
1243
+ this.speechButton.classList.add('toggle-button--error');
1244
+ this.isRecording = false;
1245
+ this.speechToTextLabel = this.t.get('speechToTextError');
1246
+ this.speechToTextIcon = miOutlineMicOff;
1247
+ };
1248
+ this.startRecognition = () => {
1249
+ var _a, _b;
1250
+ if (!this.speechButton) {
1251
+ this.speechButton = (_b = (_a = this.el) === null || _a === void 0 ? void 0 : _a.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector('.mic-toggle-button');
1252
+ }
1253
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1254
+ const SpeechRecognition = window.SpeechRecognition || window.webkitSpeechRecognition;
1255
+ this.value = '';
1256
+ if (!SpeechRecognition) {
1257
+ this.onSpeechRecognitionError();
1258
+ return;
1259
+ }
1260
+ this.recognition = new SpeechRecognition();
1261
+ this.recognition.continuous = true;
1262
+ this.recognition.lang = navigator.language || 'it-IT';
1263
+ this.recognition.interimResults = true;
1264
+ this.recognition.maxAlternatives = 1;
1265
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1266
+ this.recognition.onresult = (event) => {
1267
+ const speechResult = event.results[0][0].transcript;
1268
+ this.transcript = speechResult;
1269
+ this.value = this.transcript;
1270
+ };
1271
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1272
+ this.recognition.onerror = (event) => {
1273
+ console.error('SpeechRecognition API error:', event.error);
1274
+ this.onSpeechRecognitionError();
1275
+ };
1276
+ this.recognition.start();
1277
+ };
1278
+ this.stopRecognition = () => {
1279
+ if (this.recognition) {
1280
+ this.recognition.stop();
1281
+ this.speechEvent.emit();
1282
+ }
1283
+ };
1183
1284
  }
1184
1285
  async updateLang() {
1185
1286
  this.language = this.t.lang(this.el);
@@ -1192,6 +1293,7 @@ const MdsInput = class {
1192
1293
  var _a;
1193
1294
  this.language = this.t.lang(this.el);
1194
1295
  // this.valuePristine = this.value
1296
+ this.speechToTextLabel = this.t.get('speechToTextOn');
1195
1297
  // If the mds-input has a tabindex attribute we get the value
1196
1298
  // and pass it down to the native input, then remove it from the
1197
1299
  // mds-input to avoid causing tabbing twice on the same element
@@ -1208,7 +1310,7 @@ const MdsInput = class {
1208
1310
  };
1209
1311
  }
1210
1312
  componentDidLoad() {
1211
- var _a, _b;
1313
+ var _a, _b, _c;
1212
1314
  this.inputValidation = createInputValidationManager(this.type);
1213
1315
  if (this.required) {
1214
1316
  this.inputValidation.validator.addValidator(requiredValidor);
@@ -1217,6 +1319,7 @@ const MdsInput = class {
1217
1319
  if (this.autofocus) {
1218
1320
  (_b = this.nativeInput) === null || _b === void 0 ? void 0 : _b.focus();
1219
1321
  }
1322
+ this.variantChanged((_c = this.variant) !== null && _c !== void 0 ? _c : 'primary');
1220
1323
  }
1221
1324
  /**
1222
1325
  * Emits the change event when the component value changes
@@ -1231,6 +1334,11 @@ const MdsInput = class {
1231
1334
  if (!this.isValid)
1232
1335
  this.validateInput();
1233
1336
  }
1337
+ variantChanged(newValue) {
1338
+ if (newValue === 'ai' && this.icon === undefined) {
1339
+ this.icon = mggAiChatbotOutline;
1340
+ }
1341
+ }
1234
1342
  maxLengthChanged(newValue) {
1235
1343
  if (newValue === undefined)
1236
1344
  return;
@@ -1299,25 +1407,27 @@ const MdsInput = class {
1299
1407
  }
1300
1408
  render() {
1301
1409
  var _a, _b;
1302
- return (index.h(index.Host, { key: '7bcf91aca53feb18a28157e00ee4da810e010fa1' }, this.type === 'number'
1410
+ return (index.h(index.Host, { key: 'd6c37e9e26f67a66397f4717938bc5880ae0d028' }, this.type === 'number'
1303
1411
  && this.controlsLayout === 'horizontal'
1304
- && index.h("mds-button", { key: '8b2dec6e8ea8f97a56860eb0dcad9906fca34db2', class: "counter-button counter-button--horizontal counter-button--decrease", icon: this.controlsIcon === 'arrow' ? miBaselineArrowDown : miBaselineRemove, onClick: this.stepDown, tabindex: "0", title: this.t.get('decrease'), part: "counter-button-decrease" }), this.type === 'textarea'
1305
- ? index.h("textarea", { class: clsx('input', ((_a = this.icon) !== null && _a !== void 0 ? _a : this.await) && 'has-icon'), autoFocus: this.autofocus, disabled: this.disabled, maxLength: this.maxlength, minLength: this.minlength, name: this.name, onBlur: this.onBlur, onFocus: this.onFocus, onInput: this.onInput, part: "field", placeholder: this.placeholder, readOnly: this.readonly, ref: input => (this.nativeInput = input), required: this.required, tabIndex: this.tabindex, value: this.value })
1306
- : index.h("input", { class: clsx('input', ((_b = this.icon) !== null && _b !== void 0 ? _b : this.await) && 'has-icon'), autoComplete: this.autocomplete, autoFocus: this.autofocus, disabled: this.disabled, max: this.max, maxLength: this.maxlength, min: this.min, minLength: this.minlength, name: this.name, onBlur: this.onBlur, onFocus: this.onFocus, onInput: this.onInput, pattern: this.pattern, list: this.datalist && 'datalist', part: "field", placeholder: this.placeholder, readOnly: this.readonly, ref: input => (this.nativeInput = input), required: this.required, step: this.step, tabIndex: this.tabindex, type: this.type === 'password' && this.isPasswordVisible ? 'text' : this.type, value: this.value }), this.type === 'number'
1412
+ && index.h("mds-button", { key: 'c91e72b759f8184201151c57af5f9d7ffc92bf59', class: "counter-button counter-button--horizontal counter-button--decrease", icon: this.controlsIcon === 'arrow' ? miBaselineArrowDown : miBaselineRemove, onClick: this.stepDown, tabindex: "0", title: this.t.get('decrease'), part: "counter-button-decrease" }), this.type === 'textarea'
1413
+ ? index.h("textarea", { class: clsx('input', ((_a = this.icon) !== null && _a !== void 0 ? _a : this.await) && 'has-icon', this.mic && 'has-right-icon'), autoFocus: this.autofocus, disabled: this.disabled, maxLength: this.maxlength, minLength: this.minlength, name: this.name, onBlur: this.onBlur, onFocus: this.onFocus, onInput: this.onInput, part: "field", placeholder: this.placeholder, readOnly: this.readonly, ref: input => (this.nativeInput = input), required: this.required, tabIndex: this.tabindex, value: this.value })
1414
+ : index.h("input", { class: clsx('input', ((_b = this.icon) !== null && _b !== void 0 ? _b : this.await) && 'has-icon', this.mic && 'has-right-icon'), autoComplete: this.autocomplete, autoFocus: this.autofocus, disabled: this.disabled, max: this.max, maxLength: this.maxlength, min: this.min, minLength: this.minlength, name: this.name, onBlur: this.onBlur, onFocus: this.onFocus, onInput: this.onInput, pattern: this.pattern, list: this.datalist && 'datalist', part: "field", placeholder: this.placeholder, readOnly: this.readonly, ref: input => (this.nativeInput = input), required: this.required, step: this.step, tabIndex: this.tabindex, type: this.type === 'password' && this.isPasswordVisible ? 'text' : this.type, value: this.value }), this.type === 'number'
1307
1415
  && this.controlsLayout === 'vertical'
1308
- && index.h("div", { key: '44152354d2e397d804a3cc1136d835893926637b', class: "counter counter--vertical" }, index.h("mds-button", { key: '838e644c66e08177b4aebd5f73e83a1cc80cc514', class: "counter-button", icon: this.controlsIcon === 'arrow' ? miBaselineArrowUp : miBaselineAdd, onClick: this.stepUp, tabindex: "0", title: this.t.get('increase'), part: "counter-button-increase" }), index.h("mds-button", { key: '65bb7254cbca18664b6c41302da0da0e091b610e', class: "counter-button", icon: this.controlsIcon === 'arrow' ? miBaselineArrowDown : miBaselineRemove, onClick: this.stepDown, tabindex: "0", title: this.t.get('decrease'), part: "counter-button-decrease" })), this.type === 'number'
1416
+ && index.h("div", { key: '0d317780e3f160356fcfc1f694318356785a5cdd', class: "counter counter--vertical" }, index.h("mds-button", { key: 'bb89e4edb82bbbb74c6a945e2c3726d295cc5c3f', class: "counter-button", icon: this.controlsIcon === 'arrow' ? miBaselineArrowUp : miBaselineAdd, onClick: this.stepUp, tabindex: "0", title: this.t.get('increase'), part: "counter-button-increase" }), index.h("mds-button", { key: '084a436ad6b1d592469a8bc81d6279bd71cd03b4', class: "counter-button", icon: this.controlsIcon === 'arrow' ? miBaselineArrowDown : miBaselineRemove, onClick: this.stepDown, tabindex: "0", title: this.t.get('decrease'), part: "counter-button-decrease" })), this.type === 'number'
1309
1417
  && this.controlsLayout === 'horizontal'
1310
- && index.h("mds-button", { key: 'b7aaf01c01071cca8a37084b4d2e41d0e1b84e4e', class: "counter-button counter-button--horizontal counter-button--increase", icon: this.controlsIcon === 'arrow' ? miBaselineArrowUp : miBaselineAdd, onClick: this.stepUp, tabindex: "0", title: this.t.get('increase'), part: "counter-button-increase" }), this.type === 'password'
1311
- && index.h("mds-button", { key: 'b961439524106e40471302d24270176973eebcb7', class: "password-toggle-button", icon: this.isPasswordVisible ? miBaselineVisibleOff : miBaselineVisible, onClick: () => this.isPasswordVisible = !this.isPasswordVisible, tabindex: "0", tone: "quiet", title: this.isPasswordVisible ? this.t.get('hidePassword') : this.t.get('showPassword'), part: "password-toggle-button" }), index.h("mds-input-tip", { key: 'a244562862771dde8f08020bbf44c63086b8f685', lang: this.language, position: "top", active: this.hasFocus }, this.disabled && index.h("mds-input-tip-item", { key: '28fd9702190626d711d414086d5a61de34fe08b1', expanded: true, variant: "disabled" }), this.readonly && index.h("mds-input-tip-item", { key: '64a95ac2e2d0ffee636bb5bfd55f45dcc9399a2c', expanded: true, variant: "readonly" }), this.required &&
1312
- index.h("mds-input-tip-item", { key: 'fa957185f104bec23eeebb1c4e98146ebc0789ab', expanded: this.hasFocus, variant: this.isValid ? 'required-success' : 'required' })), index.h("mds-input-tip", { key: '2a86141b562df5e7f1f4f28f5ccd55b04dea27c8', lang: this.language, position: "bottom", active: this.hasFocus }, this.tip && index.h("mds-input-tip-item", { key: 'a258201f5d84b1d6556194c37a0e48dd0172088b', expanded: true, variant: "text" }, this.tip), this.maxlength && index.h("mds-input-tip-item", { key: '325f117d6dc5cca6e29575ef5e9f4fb6957f975c', part: "tip-count", expanded: true, variant: this.countVariant }, this.currentLengthLabel)), this.datalist &&
1313
- index.h("datalist", { key: '0b2d39716babb08b0363598eb9362e531dd7bcdd', id: "datalist", class: "datalist" }, this.datalist.forEach(element => {
1418
+ && index.h("mds-button", { key: '850105f4b718bd906249857f7de600b74eddbdef', class: "counter-button counter-button--horizontal counter-button--increase", icon: this.controlsIcon === 'arrow' ? miBaselineArrowUp : miBaselineAdd, onClick: this.stepUp, tabindex: "0", title: this.t.get('increase'), part: "counter-button-increase" }), this.type === 'password'
1419
+ && index.h("mds-button", { key: '58cd6d4a727e73942a25081a7a19f8e60bc9ec7f', class: "password-toggle-button", icon: this.isPasswordVisible ? miBaselineVisibleOff : miBaselineVisible, onClick: () => this.isPasswordVisible = !this.isPasswordVisible, tabindex: "0", tone: "quiet", title: this.isPasswordVisible ? this.t.get('hidePassword') : this.t.get('showPassword'), part: "password-toggle-button" }), this.mic
1420
+ && index.h("mds-button", { key: '20e629c6e4719ce16f2ff3ed0b706fde0b70dabf', class: clsx('mic-toggle-button', this.isRecording && 'mic-toggle-button--recording'), icon: this.speechToTextIcon, onClick: () => this.toggleTextRecognition(), tabindex: "0", variant: "dark", tone: "quiet", title: this.speechToTextLabel, part: "mic-toggle-button" }), index.h("mds-input-tip", { key: '7895ccaca2b2be484dbbe93be56aba780d9c8ee2', lang: this.language, position: "top", active: this.hasFocus }, this.disabled && index.h("mds-input-tip-item", { key: 'a41b1e738f6c5ed0487dad36e560b5692d9b4f28', expanded: true, variant: "disabled" }), this.readonly && index.h("mds-input-tip-item", { key: 'e31f7871a0bf0eba2113a2e1223811c8a1bd088f', expanded: true, variant: "readonly" }), this.required &&
1421
+ index.h("mds-input-tip-item", { key: 'd4cdb3c66000296d1d8783e546f2b75be1df3d93', expanded: this.hasFocus, variant: this.isValid ? 'required-success' : 'required' })), index.h("mds-input-tip", { key: '8f28604dd8010f544ccfe6e657d71f026cee8c8d', lang: this.language, position: "bottom", active: this.hasFocus }, this.tip && index.h("mds-input-tip-item", { key: '67b4ffba4cdcb1631a80138d856ae67dd0c9a279', expanded: true, variant: "text" }, this.tip), this.maxlength && index.h("mds-input-tip-item", { key: '39a372c8594d6b61af8fdd6e740dee13125ff88a', part: "tip-count", expanded: true, variant: this.countVariant }, this.currentLengthLabel)), this.datalist &&
1422
+ index.h("datalist", { key: '8f655129f62508cb840fcb18804d976ca3c34b79', id: "datalist", class: "datalist" }, this.datalist.forEach(element => {
1314
1423
  return index.h("option", { value: element });
1315
- })), this.icon && !this.await && index.h("mds-icon", { key: 'a65f0a2ef1ab08c809b77e7e1384653fd88b1610', class: clsx('icon', this.variant), name: this.icon }), index.h("mds-spinner", { key: '20186147633cfb40ad5a27a3c5254810346e1dbf', running: this.await, class: clsx('await', this.variant) })));
1424
+ })), this.icon && !this.await && index.h("mds-icon", { key: '63563838b5fbf9ccf2bee02aa2f78de024853bf0', class: clsx('icon', this.variant), name: this.icon }), index.h("mds-spinner", { key: '2053c1b879c719cee9a93cd1b388fa8b906b7363', running: this.await, class: clsx('await', this.variant) })));
1316
1425
  }
1317
1426
  static get formAssociated() { return true; }
1318
1427
  get el() { return index.getElement(this); }
1319
1428
  static get watchers() { return {
1320
1429
  "value": ["valueChanged"],
1430
+ "variant": ["variantChanged"],
1321
1431
  "maxlength": ["maxLengthChanged"],
1322
1432
  "disabled": ["disabledChanged"]
1323
1433
  }; }
@@ -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.cjs",[[65,"mds-input",{"autocomplete":[513],"autofocus":[516],"await":[516],"controlsLayout":[513,"controls-layout"],"controlsIcon":[513,"controls-icon"],"controlIncreaseLabel":[513,"control-increase-label"],"controlDecreaseLabel":[513,"control-decrease-label"],"datalist":[16],"disabled":[516],"icon":[513],"max":[513],"maxlength":[1538],"min":[520],"minlength":[514],"name":[513],"pattern":[513],"placeholder":[513],"readonly":[516],"required":[516],"variant":[1537],"tip":[513],"step":[513],"type":[513],"typography":[513],"value":[1537],"hasFocus":[32],"language":[32],"currentLengthLabel":[32],"countVariant":[32],"isPasswordVisible":[32],"updateLang":[64],"addValidator":[64],"removeValidator":[64],"hasValidator":[64],"getErrors":[64],"setFocus":[64],"getInputElement":[64]},null,{"value":["valueChanged"],"maxlength":["maxLengthChanged"],"disabled":["disabledChanged"]}]]]], options);
22
+ return index.bootstrapLazy([["mds-input.cjs",[[65,"mds-input",{"autocomplete":[513],"autofocus":[516],"await":[516],"controlsLayout":[513,"controls-layout"],"controlsIcon":[513,"controls-icon"],"controlIncreaseLabel":[513,"control-increase-label"],"controlDecreaseLabel":[513,"control-decrease-label"],"datalist":[16],"disabled":[516],"icon":[1537],"max":[520],"maxlength":[1538],"mic":[516],"min":[520],"minlength":[514],"name":[513],"pattern":[513],"placeholder":[513],"readonly":[516],"required":[516],"variant":[1537],"tip":[513],"step":[513],"type":[513],"typography":[513],"value":[1537],"hasFocus":[32],"language":[32],"isRecording":[32],"currentLengthLabel":[32],"countVariant":[32],"isPasswordVisible":[32],"transcript":[32],"updateLang":[64],"addValidator":[64],"removeValidator":[64],"hasValidator":[64],"getErrors":[64],"setFocus":[64],"getInputElement":[64]},null,{"value":["valueChanged"],"variant":["variantChanged"],"maxlength":["maxLengthChanged"],"disabled":["disabledChanged"]}]]]], options);
23
23
  });
24
24
 
25
25
  exports.setNonce = index.setNonce;
@@ -0,0 +1,5 @@
1
+ const randomNumber = (min, max, integer = false) => {
2
+ const num = Math.random() * (max - min) + min;
3
+ return integer ? Math.floor(num) : num;
4
+ };
5
+ export { randomNumber, };
@@ -7,6 +7,15 @@ const cssDurationToMilliseconds = (duration, defaultValue = 1000) => {
7
7
  }
8
8
  return defaultValue;
9
9
  };
10
+ const cssDurationToSeconds = (duration, defaultValue = 1000) => {
11
+ if (duration.includes('ms')) {
12
+ return Number(duration.replace('ms', '')) / 1000;
13
+ }
14
+ if (duration.includes('s')) {
15
+ return Number(duration.replace('s', ''));
16
+ }
17
+ return defaultValue;
18
+ };
10
19
  const cssSizeToNumber = (size, defaultValue = 0) => {
11
20
  if (size.includes('px')) {
12
21
  return Number(size.replace('px', ''));
@@ -19,4 +28,10 @@ const cssSizeToNumber = (size, defaultValue = 0) => {
19
28
  }
20
29
  return defaultValue;
21
30
  };
22
- export { cssDurationToMilliseconds, cssSizeToNumber, };
31
+ const cssRotationToNumber = (size, defaultValue = 0) => {
32
+ if (size.includes('deg')) {
33
+ return Number(size.replace('deg', ''));
34
+ }
35
+ return defaultValue;
36
+ };
37
+ export { cssDurationToMilliseconds, cssDurationToSeconds, cssRotationToNumber, cssSizeToNumber, };
@@ -28,7 +28,7 @@
28
28
  --mds-input-tip-background: 84 84 84;
29
29
  --mds-input-variant-color: 0 0 0;
30
30
  /* private */ --mds-input-controls-border: 2px solid rgb(var(--tone-neutral-09));
31
- /* private */ --mds-input-controls-color: rgb(var(--variant-primary-03)); min-height: 1.5rem; font-family: Karla, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; font-size: 1rem; line-height: 1.5rem; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; gap: 0.5rem;
31
+ /* private */ --mds-input-controls-color: rgb(var(--tone-neutral-03)); min-height: 1.5rem; font-family: Karla, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; font-size: 1rem; line-height: 1.5rem; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; gap: 0.5rem;
32
32
 
33
33
  container-type: inline-size;
34
34
  display: flex;
@@ -158,6 +158,10 @@
158
158
  padding-left: 2.75rem;
159
159
  }
160
160
 
161
+ .input.has-right-icon {
162
+ padding-right: 2.75rem;
163
+ }
164
+
161
165
 
162
166
  .await,
163
167
  .icon {
@@ -243,6 +247,30 @@
243
247
  position: absolute;
244
248
  }
245
249
 
250
+ .mic-toggle-button {
251
+ top: 0.375rem;
252
+ right: 0.375rem;
253
+
254
+ fill: var(--mds-input-controls-color);
255
+ position: absolute;
256
+ }
257
+
258
+ .toggle-button--error {
259
+ cursor: help;
260
+ fill: rgb(var(--tone-neutral-06));
261
+ }
262
+
263
+ @keyframes pulse {
264
+
265
+ 50% {
266
+ opacity: .5;
267
+ }
268
+ }
269
+
270
+ .mic-toggle-button--recording {
271
+ animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
272
+ }
273
+
246
274
  :host([type="number"]) .input {
247
275
 
248
276
  /* required to avoid input number buttons on firefox go be shown always */
@@ -338,6 +366,17 @@
338
366
  --mds-input-variant-color: var(--variant-primary-04);
339
367
  }
340
368
 
369
+ :host([variant="ai"]) {
370
+ --mds-input-icon-color: var(--variant-ai-05);
371
+ --mds-input-tip-background: var(--variant-ai-05);
372
+ --mds-input-variant-color: 0 0 0;
373
+ }
374
+
375
+ :host([variant="ai"]:focus) {
376
+ --mds-input-icon-color: var(--variant-ai-04);
377
+ --mds-input-variant-color: var(--variant-ai-05);
378
+ }
379
+
341
380
  :host([variant="info"]) {
342
381
  --mds-input-icon-color: var(--status-info-05);
343
382
  --mds-input-tip-background: var(--status-info-05);