@maggioli-design-system/magma 1.10.8 → 1.10.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/magma-components.cjs.js +1 -1
- package/dist/cjs/mds-input-upload.cjs.entry.js +19 -6
- package/dist/cjs/mds-input.cjs.entry.js +9 -9
- package/dist/cjs/mds-text.cjs.entry.js +3 -2
- package/dist/collection/components/mds-input/mds-input.js +9 -9
- package/dist/collection/components/mds-input-upload/mds-input-upload.js +47 -6
- package/dist/collection/components/mds-text/mds-text.js +3 -2
- package/dist/components/mds-input-upload.js +21 -6
- package/dist/components/mds-input2.js +9 -9
- package/dist/components/mds-text2.js +3 -2
- package/dist/documentation.json +46 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/magma-components.js +1 -1
- package/dist/esm/mds-input-upload.entry.js +19 -6
- package/dist/esm/mds-input.entry.js +9 -9
- package/dist/esm/mds-text.entry.js +3 -2
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/magma-components.js +1 -1
- package/dist/esm-es5/mds-input-upload.entry.js +1 -1
- package/dist/esm-es5/mds-input.entry.js +1 -1
- package/dist/esm-es5/mds-text.entry.js +1 -1
- package/dist/hydrate/index.js +32 -17
- package/dist/hydrate/index.mjs +32 -17
- package/dist/magma-components/magma-components.esm.js +1 -1
- package/dist/magma-components/{p-a33c13d4.entry.js → p-0598a2c0.entry.js} +1 -1
- package/dist/magma-components/{p-19b97678.system.entry.js → p-13183284.system.entry.js} +1 -1
- package/dist/magma-components/p-26cd6ec8.system.js +1 -1
- package/dist/magma-components/p-548830f0.entry.js +1 -0
- package/dist/magma-components/{p-51a66fbc.system.entry.js → p-7e0ec4be.system.entry.js} +1 -1
- package/dist/magma-components/p-9a5bea2b.entry.js +1 -0
- package/dist/magma-components/{p-9bf7546f.system.entry.js → p-fee4342a.system.entry.js} +1 -1
- package/dist/stats.json +104 -40
- package/dist/types/components/mds-input-upload/mds-input-upload.d.ts +5 -0
- package/dist/types/components.d.ts +8 -0
- package/package.json +1 -1
- package/dist/magma-components/p-75487b6d.entry.js +0 -1
- package/dist/magma-components/p-cc65db79.entry.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(t,n,e,r){function i(t){return t instanceof e?t:new e((function(n){n(t)}))}return new(e||(e=Promise))((function(e,o){function a(t){try{d(r.next(t))}catch(t){o(t)}}function s(t){try{d(r["throw"](t))}catch(t){o(t)}}function d(t){t.done?e(t.value):i(t.value).then(a,s)}d((r=r.apply(t,n||[])).next())}))};var __generator=this&&this.__generator||function(t,n){var e={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(t){return function(n){return d([t,n])}}function d(s){if(r)throw new TypeError("Generator is already executing.");while(a&&(a=0,s[0]&&(e=0)),e)try{if(r=1,i&&(o=s[0]&2?i["return"]:s[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;if(i=0,o)s=[s[0]&2,o.value];switch(s[0]){case 0:case 1:o=s;break;case 4:e.label++;return{value:s[1],done:false};case 5:e.label++;i=s[1];s=[0];continue;case 7:s=e.ops.pop();e.trys.pop();continue;default:if(!(o=e.trys,o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){e=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){e.label=s[1];break}if(s[0]===6&&e.label<o[1]){e.label=o[1];o=s;break}if(o&&e.label<o[2]){e.label=o[2];e.ops.push(s);break}if(o[2])e.ops.pop();e.trys.pop();continue}s=n.call(t,e)}catch(t){s=[6,t];i=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-7f153b9b.js";import{c as clsx}from"./clsx-297c1ffe.js";import{m as miBaselineKeyboardArrowDown}from"./keyboard-arrow-down-b79b8faf.js";import{m as miBaselineKeyboardArrowUp}from"./keyboard-arrow-up-4ec6c125.js";import{m as miBaselineRemove}from"./remove-777e39e1.js";import{m as miBaselineDone}from"./done-4ea2a18b.js";import{L as Locale}from"./locale-2adad180.js";import{h as hashRandomValue}from"./aria-ed9d415d.js";import"./_commonjsHelpers-bdec4bbd.js";var mggAiChatbotOutline='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <path d="M10 11H8V8h2zM16 11h-2V8h2z"/>\n <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"/>\n <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"/>\n</svg>\n';var 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>';var miBaselineVisible='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5s5 2.24 5 5s-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3s3-1.34 3-3s-1.34-3-3-3z"/></svg>';var 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>';var 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>';var 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>';var decrease$3="Μείωση";var hidePassword$3="Απόκρυψη κωδικού";var increase$3="Αύξηση";var showPassword$3="Εμφάνιση κωδικού";var speechToTextError$3="Η φωνητική υπαγόρευση δεν υποστηρίζεται από αυτό το πρόγραμμα περιήγησης";var speechToTextOff$3="Διακοπή φωνητικής υπαγόρευσης";var speechToTextOn$3="Έναρξη φωνητικής υπαγόρευσης";var localeEl={decrease:decrease$3,hidePassword:hidePassword$3,increase:increase$3,showPassword:showPassword$3,speechToTextError:speechToTextError$3,speechToTextOff:speechToTextOff$3,speechToTextOn:speechToTextOn$3};var decrease$2="Decrease";var hidePassword$2="Hide password";var increase$2="Increase";var showPassword$2="Show password";var speechToTextError$2="Voice dictation is not supported by this browser";var speechToTextOff$2="Stop voice dictation";var speechToTextOn$2="Start voice dictation";var localeEn={decrease:decrease$2,hidePassword:hidePassword$2,increase:increase$2,showPassword:showPassword$2,speechToTextError:speechToTextError$2,speechToTextOff:speechToTextOff$2,speechToTextOn:speechToTextOn$2};var decrease$1="Disminuir";var hidePassword$1="Ocultar contraseña";var increase$1="Aumentar";var showPassword$1="Mostrar contraseña";var speechToTextError$1="El dictado por voz no es compatible con este navegador";var speechToTextOff$1="Detener dictado por voz";var speechToTextOn$1="Iniciar dictado por voz";var localeEs={decrease:decrease$1,hidePassword:hidePassword$1,increase:increase$1,showPassword:showPassword$1,speechToTextError:speechToTextError$1,speechToTextOff:speechToTextOff$1,speechToTextOn:speechToTextOn$1};var decrease="Diminuisci";var hidePassword="Nascondi password";var increase="Aumenta";var showPassword="Visualizza password";var speechToTextError="Dettatura vocale non supportata da questo browser";var speechToTextOff="Ferma dettatura vocale";var speechToTextOn="Inizia dettatura vocale";var localeIt={decrease:decrease,hidePassword:hidePassword,increase:increase,showPassword:showPassword,speechToTextError:speechToTextError,speechToTextOff:speechToTextOff,speechToTextOn:speechToTextOn};var NullValidator=function(){return null};var requiredValidor=function(t){return t.length>0?null:{required:""}};var maxValidator=function(t){return function(n){if(n===""||t===null){return null}var e=parseFloat(n);return!isNaN(e)&&e>t?{max:"valore massimo ".concat(t)}:null}};var minValidator=function(t){return function(n){if(n===""||t===null){return null}var e=parseFloat(n);return!isNaN(e)&&e<t?{min:"valore minimo ".concat(t)}:null}};var maxLenghtValidator=function(t){return function(n){if(n===""||t===null){return null}return n.length>t?{minLenght:"La lunghezza massima accettata è ".concat(t)}:null}};var minLenghtValidator=function(t){return function(n){if(n===""||t===null){return null}return n.length<t?{minLenght:"La lunghezza minima accettata è ".concat(t)}:null}};var isbnValidatorFn=function(t){if(t==="")return null;if(Number.isNaN(t.slice(0,-1))||t.length!==10&&t.length!==13)return{"isbn-error":"formato isbn non correto"};var n=t.split("").map((function(t){return t==="X"?10:Number(t)}));var e=0;if(t.length===10){var r=n.reduce((function(t,n,e){return t+(10-e)*n}),0);e=r%11}else{var r=n.reduce((function(t,n,e){var r=e%2===0?1:3;return t+n*r}),0);e=r%10}return e===0?null:{"isbn-error":"codice isbn non valido"}};var Validator=function(){function t(){this._validators=[];this._errors=null;this.isValid=true}t.prototype.addValidator=function(t){var n;if(Array.isArray(t)){(n=this._validators).push.apply(n,t)}else{this._validators.push(t)}};t.prototype._hasValidator=function(t,n){return Array.isArray(t)?t.includes(n):t===n};t.prototype.hasValidator=function(t){return t?this._hasValidator(this._validators,t):this._validators.length>0};t.prototype.removeValidator=function(t){var n=this;this._validators=this._validators.filter((function(e){return!n._hasValidator(t,e)}))};t.prototype.validate=function(t){var n=this._validators.map((function(n){return n(t)})).reduce((function(t,n){return Object.assign(Object.assign({},t),n)}),NullValidator);this._errors=Object.keys(n).length===0?null:n;this.isValid=!this._errors};Object.defineProperty(t.prototype,"errors",{get:function(){return this._errors},enumerable:false,configurable:true});return t}();var InputMaskPattern=function(){function t(){}return t}();InputMaskPattern.CF_Regex=/^(?:[A-Z][AEIOU][AEIOUX]|[AEIOU]X{2}|[B-DF-HJ-NP-TV-Z]{2}[A-Z]){2}(?:[\dLMNP-V]{2}(?:[A-EHLMPR-T](?:[04LQ][1-9MNP-V]|[15MR][\dLMNP-V]|[26NS][0-8LMNP-U])|[DHPS][37PT][0L]|[ACELMRT][37PT][01LM]|[AC-EHLMPR-T][26NS][9V])|(?:[02468LNQSU][048LQU]|[13579MPRTV][26NS])B[26NS][9V])(?:[A-MZ][1-9MNP-V][\dLMNP-V]{2}|[A-M][0L](?:[1-9MNP-V][\dLMNP-V]|[0L][1-9MNP-V]))[A-Z]$/i;InputMaskPattern.CF_MASK="A{6}(99|AA)A(99|AA)A(999|AAA)A";InputMaskPattern.CC_MASK="9999-9999-9999-9999";var InputValidationManager=function(){function t(t){this.validator=new Validator;this.pattern=t}t.prototype.mask=function(t){if(!this.pattern){throw new Error("no pattern found, set pattern before mask")}};t.prototype.isValid=function(t){this.validator.validate(t);return this.validator.isValid};return t}();function createInputValidationManager(t){var n;switch(t){case"tel":n=new InputValidationManager("");break;case"url":n=new InputValidationManager("");break;case"cc":n=new InputValidationManager(InputMaskPattern.CC_MASK);break;case"cf":n=new InputValidationManager(InputMaskPattern.CF_MASK);n.validator.addValidator((function(t){if(t==="")return null;return InputMaskPattern.CF_Regex.test(t)?null:{"cf-regex":"Codice fiscale inserito non corretto"}}));n.validator.addValidator((function(t){if(t==="")return null;return t.length===16?null:{"cf-length":"Codice fiscale deve essere lungo 16 caratteri"}}));break;case"isbn":n=new InputValidationManager;n.validator.addValidator(isbnValidatorFn);break;case"piva":n=new InputValidationManager("");break;default:n=new InputValidationManager("")}return n}var 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';var MdsInputStyle0=mdsInputCss;var MdsInput=function(){function t(t){var n=this;registerInstance(this,t);this.changeEvent=createEvent(this,"mdsInputChange",7);this.keyDownEvent=createEvent(this,"mdsInputKeydown",7);this.blurEvent=createEvent(this,"mdsInputBlur",7);this.focusEvent=createEvent(this,"mdsInputFocus",7);this.speechEvent=createEvent(this,"mdsInputSpeechEnd",7);this.validationEvent=createEvent(this,"mdsInputValidation",7);if(t.$hostElement$["s-ei"]){this.internals=t.$hostElement$["s-ei"]}else{this.internals=t.$hostElement$.attachInternals();t.$hostElement$["s-ei"]=this.internals}this.speechToTextIcon=miOutlineMic;this.hasFocus=false;this.isRecording=false;this.countVariant="count-empty";this.isPasswordVisible=false;this.t=new Locale({el:localeEl,en:localeEn,es:localeEs,it:localeIt});this.autocomplete="off";this.autofocus=false;this.await=false;this.controlsLayout="vertical";this.controlsIcon="arrow";this.controlIncreaseLabel="Aumenta";this.controlDecreaseLabel="Riduci";this.disabled=false;this.readonly=false;this.required=false;this.variant="primary";this.type="text";this.typography="detail";this.value="";this.countMaxLength=function(){var t,e,r;if(!n.maxlength)return;if(n.value===undefined)return;n.currentLengthLabel="".concat((e=(t=n.value)===null||t===void 0?void 0:t.length)!==null&&e!==void 0?e:0," / ").concat(n.maxlength);var i=Math.round(n.value.length*100/n.maxlength);if(((r=n.value)===null||r===void 0?void 0:r.length)===n.maxlength){n.countVariant="count-full";return}if(i>=100){n.countVariant="count-full";return}if(i>=75){n.countVariant="count-almost-full";return}if(i>=50){n.countVariant="count-almost";return}if(i>=25){n.countVariant="count-incomplete";return}n.countVariant="count-empty"};this.onInput=function(t){var e=t.target;if(e){n.value=e.value;n.internals.setFormValue(n.value)}n.keyDownEvent.emit(t)};this.onBlur=function(){n.hasFocus=false;n.validateInput();n.blurEvent.emit()};this.onFocus=function(t){var e=t.target;n.hasFocus=true;n.focusEvent.emit();if(n.readonly){setTimeout((function(){e.select()}),10)}};this.stepUp=function(){if(n.nativeInput&&!n.readonly&&!n.disabled){n.nativeInput.stepUp();n.value=n.nativeInput.value}};this.stepDown=function(){if(n.nativeInput&&!n.readonly&&!n.disabled){n.nativeInput.stepDown();n.value=n.nativeInput.value}};this.toggleTextRecognition=function(){n.isRecording=!n.isRecording;if(!n.isRecording){n.speechToTextLabel=n.t.get("speechToTextOn");n.speechToTextIcon=miOutlineMic;n.stopRecognition();return}n.speechToTextLabel=n.t.get("speechToTextOff");n.speechToTextIcon=miBaselineDone;n.startRecognition()};this.onSpeechRecognitionError=function(){console.error("SpeechRecognition API may not work properly on Chrome based browsers.");n.speechButton.classList.remove("mic-toggle-button--recording");n.speechButton.classList.add("toggle-button--error");n.isRecording=false;n.speechToTextLabel=n.t.get("speechToTextError");n.speechToTextIcon=miOutlineMicOff};this.startRecognition=function(){var t,e,r;if(!n.speechButton){n.speechButton=(e=(t=n.el)===null||t===void 0?void 0:t.shadowRoot)===null||e===void 0?void 0:e.querySelector(".mic-toggle-button")}var i=(r=window.SpeechRecognition)!==null&&r!==void 0?r:window.webkitSpeechRecognition;n.value="";if(!i){n.onSpeechRecognitionError();return}n.recognition=new i;n.recognition.continuous=true;n.recognition.lang=navigator.language||"it-IT";n.recognition.interimResults=true;n.recognition.maxAlternatives=1;var o="";var a=0;n.recognition.onresult=function(t){var e=t.results;var r=e[a];if(r.isFinal){o+=r[0].transcript;n.value=o;a+=1;return}n.value=o+r[0].transcript};n.recognition.onerror=function(t){console.error("SpeechRecognition API error:",t.error);n.onSpeechRecognitionError()};n.recognition.start()};this.stopRecognition=function(){if(n.recognition){n.recognition.stop();n.speechEvent.emit()}}}t.prototype.updateLang=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.language=this.t.lang(this.el);this.t.update();return[2]}))}))};t.prototype.formResetCallback=function(){this.internals.setFormValue("")};t.prototype.connectedCallback=function(){this.datalistId="datalist-".concat(hashRandomValue())};t.prototype.componentWillLoad=function(){var t=this;var n;this.language=this.t.lang(this.el);this.speechToTextLabel=this.t.get("speechToTextOn");if(this.el.hasAttribute("tabindex")){var e=this.el.getAttribute("tabindex");this.tabindex=e!==null?parseInt(e):undefined;this.el.removeAttribute("tabindex")}this.internals.setFormValue((n=this.value)!==null&&n!==void 0?n:null);this.maxLengthChanged(this.maxlength);this.isValid=!(this.required&&this.value==="");this.el.focus=function(){var n;(n=t.nativeInput)===null||n===void 0?void 0:n.focus()}};t.prototype.componentDidLoad=function(){var t,n,e;this.inputValidation=createInputValidationManager(this.type);this.setValidators();(t=this.nativeInput)===null||t===void 0?void 0:t.setAttribute("pattern",String(this.inputValidation.pattern));if(this.autofocus){(n=this.nativeInput)===null||n===void 0?void 0:n.focus()}this.variantChanged((e=this.variant)!==null&&e!==void 0?e:"primary")};t.prototype.setValidators=function(){if(this.required)this.inputValidation.validator.addValidator(requiredValidor);if(this.max!==""&&Number(this.max))this.inputValidation.validator.addValidator(maxValidator(Number(this.max)));if(this.min!==""&&Number(this.min))this.inputValidation.validator.addValidator(minValidator(Number(this.max)));if(this.maxlength)this.inputValidation.validator.addValidator(maxLenghtValidator(this.maxlength));if(this.minlength)this.inputValidation.validator.addValidator(minLenghtValidator(this.minlength))};t.prototype.valueChanged=function(){var t;this.changeEvent.emit({value:this.value});this.internals.setFormValue((t=this.value)!==null&&t!==void 0?t:null);if(this.maxlength!==undefined){this.countMaxLength()}if(this.value==="")return;if(!this.isValid)this.validateInput()};t.prototype.variantChanged=function(t){if(t==="ai"&&this.icon===undefined){this.icon=mggAiChatbotOutline}};t.prototype.maxLengthChanged=function(t){if(t===undefined)return;if(t<=0){this.maxlength=undefined;return}this.countMaxLength()};t.prototype.addValidator=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){this.inputValidation.validator.addValidator(t);return[2,Promise.resolve()]}))}))};t.prototype.removeValidator=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){this.inputValidation.validator.removeValidator(t);return[2]}))}))};t.prototype.hasValidator=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){return[2,this.inputValidation.validator.hasValidator(t)]}))}))};t.prototype.getErrors=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,Promise.resolve(this.inputValidation.validator.errors)]}))}))};t.prototype.validateInput=function(){if(this.inputValidation.validator.hasValidator()){this.isValid=this.inputValidation.isValid(this.value);if(this.value===""&&!this.required)this.variant="primary";else this.variant=this.isValid?"success":"error";this.validationEvent.emit(this.isValid)}return this.isValid};t.prototype.disabledChanged=function(t){if(t){this.internals.setFormValue(null)}};t.prototype.setFocus=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){if(this.nativeInput){this.nativeInput.focus()}return[2]}))}))};t.prototype.getInputElement=function(){return Promise.resolve(this.nativeInput)};t.prototype.componentWillRender=function(){this.t.lang(this.el)};t.prototype.render=function(){var t=this;var n,e;return h(Host,{key:"6904606bb94fbe4039190d44dc6b146561cb1c9d"},this.type==="number"&&this.controlsLayout==="horizontal"&&h("mds-button",{key:"e529d4c484cd78950a425b884fe927199acc0b05",class:"counter-button counter-button--horizontal counter-button--decrease",icon:this.controlsIcon==="arrow"?miBaselineKeyboardArrowDown:miBaselineRemove,onClick:this.stepDown,tabindex:"0",title:this.t.get("decrease"),part:"counter-button-decrease"}),this.type==="textarea"?h("textarea",{class:clsx("input",((n=this.icon)!==null&&n!==void 0?n: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:function(n){return t.nativeInput=n},required:this.required,tabIndex:this.tabindex,value:this.value}):h("input",{class:clsx("input",((e=this.icon)!==null&&e!==void 0?e: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.datalistId,part:"field",placeholder:this.placeholder,readOnly:this.readonly,ref:function(n){return t.nativeInput=n},required:this.required,step:this.step,tabIndex:this.tabindex,type:this.type==="password"&&this.isPasswordVisible?"text":this.type,value:this.value}),this.type==="number"&&this.controlsLayout==="vertical"&&h("div",{key:"d000022047e1333c236edce58b177c5f619f4385",class:"counter counter--vertical"},h("mds-button",{key:"c96ebc62547c9feec928ffe5ff818015ff011032",class:"counter-button",icon:this.controlsIcon==="arrow"?miBaselineKeyboardArrowUp:miBaselineAdd,onClick:this.stepUp,tabindex:"0",title:this.t.get("increase"),part:"counter-button-increase"}),h("mds-button",{key:"ee82c65fd71d66b08714461ac8263f4bbfebcc9d",class:"counter-button",icon:this.controlsIcon==="arrow"?miBaselineKeyboardArrowDown:miBaselineRemove,onClick:this.stepDown,tabindex:"0",title:this.t.get("decrease"),part:"counter-button-decrease"})),this.type==="number"&&this.controlsLayout==="horizontal"&&h("mds-button",{key:"b4621ae846273b4b70642d6747aa5d69fa234342",class:"counter-button counter-button--horizontal counter-button--increase",icon:this.controlsIcon==="arrow"?miBaselineKeyboardArrowUp:miBaselineAdd,onClick:this.stepUp,tabindex:"0",title:this.t.get("increase"),part:"counter-button-increase"}),this.type==="password"&&h("mds-button",{key:"fa637888acee00fb2df6d6b5770f5b40eeae7031",class:"password-toggle-button",icon:this.isPasswordVisible?miBaselineVisibleOff:miBaselineVisible,onClick:function(){return t.isPasswordVisible=!t.isPasswordVisible},tabindex:"0",tone:"quiet",title:this.isPasswordVisible?this.t.get("hidePassword"):this.t.get("showPassword"),part:"password-toggle-button"}),this.mic&&h("mds-button",{key:"85613ac5d7b424dc43770a4e54296d0bc9e7794a",class:clsx("mic-toggle-button",this.isRecording&&"mic-toggle-button--recording"),icon:this.speechToTextIcon,onClick:function(){return t.toggleTextRecognition()},tabindex:"0",variant:"dark",tone:"quiet",title:this.speechToTextLabel,part:"mic-toggle-button"}),h("mds-input-tip",{key:"156b330252d0f8483c7996d902e1321bcc05dd7c",lang:this.language,position:"top",active:this.hasFocus},this.disabled&&h("mds-input-tip-item",{key:"5ccb7a0700d723bc05bab4fdac21d7bf823cf12f",expanded:true,variant:"disabled"}),this.readonly&&h("mds-input-tip-item",{key:"eed82a87a109822b60e8d0a9ff6b078517087135",expanded:true,variant:"readonly"}),this.required&&h("mds-input-tip-item",{key:"53daa9c77147a4fda3d13e55fdf4bca4c8471b29",expanded:this.hasFocus,variant:this.isValid?"required-success":"required"})),h("mds-input-tip",{key:"c95aa6e4c98c074712c772fe3a7513640c4daa63",lang:this.language,position:"bottom",active:this.hasFocus},this.tip&&h("mds-input-tip-item",{key:"a7813d9e3675924fe00e93248292a48d5e273ada",expanded:true,variant:"text"},this.tip),this.maxlength&&h("mds-input-tip-item",{key:"01305a14e95334b7352dbe9cbccc90af18c0cc1d",part:"tip-count",expanded:true,variant:this.countVariant},this.currentLengthLabel)),this.datalist&&h("datalist",{key:"f99c96b4bbb45760252e2a5fc5965dddfbc60c21",id:this.datalistId,class:"datalist"},this.datalist.map((function(t,n){return h("option",{key:n,value:t})}))),this.icon&&!this.await&&h("mds-icon",{key:"41f6e990e5f47dbc8821934fc486c44a388d0386",class:clsx("icon",this.variant),name:this.icon}),h("mds-spinner",{key:"85598d3e10e75fff275693b7fe2d17b392e3e8c2",running:this.await,class:clsx("await",this.variant)}))};Object.defineProperty(t,"formAssociated",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{value:["valueChanged"],variant:["variantChanged"],maxlength:["maxLengthChanged"],disabled:["disabledChanged"]}},enumerable:false,configurable:true});return t}();MdsInput.style=MdsInputStyle0;export{MdsInput as mds_input};
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(t,n,e,r){function i(t){return t instanceof e?t:new e((function(n){n(t)}))}return new(e||(e=Promise))((function(e,o){function a(t){try{d(r.next(t))}catch(t){o(t)}}function s(t){try{d(r["throw"](t))}catch(t){o(t)}}function d(t){t.done?e(t.value):i(t.value).then(a,s)}d((r=r.apply(t,n||[])).next())}))};var __generator=this&&this.__generator||function(t,n){var e={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(t){return function(n){return d([t,n])}}function d(s){if(r)throw new TypeError("Generator is already executing.");while(a&&(a=0,s[0]&&(e=0)),e)try{if(r=1,i&&(o=s[0]&2?i["return"]:s[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;if(i=0,o)s=[s[0]&2,o.value];switch(s[0]){case 0:case 1:o=s;break;case 4:e.label++;return{value:s[1],done:false};case 5:e.label++;i=s[1];s=[0];continue;case 7:s=e.ops.pop();e.trys.pop();continue;default:if(!(o=e.trys,o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){e=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){e.label=s[1];break}if(s[0]===6&&e.label<o[1]){e.label=o[1];o=s;break}if(o&&e.label<o[2]){e.label=o[2];e.ops.push(s);break}if(o[2])e.ops.pop();e.trys.pop();continue}s=n.call(t,e)}catch(t){s=[6,t];i=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-7f153b9b.js";import{c as clsx}from"./clsx-297c1ffe.js";import{m as miBaselineKeyboardArrowDown}from"./keyboard-arrow-down-b79b8faf.js";import{m as miBaselineKeyboardArrowUp}from"./keyboard-arrow-up-4ec6c125.js";import{m as miBaselineRemove}from"./remove-777e39e1.js";import{m as miBaselineDone}from"./done-4ea2a18b.js";import{L as Locale}from"./locale-2adad180.js";import{h as hashRandomValue}from"./aria-ed9d415d.js";import"./_commonjsHelpers-bdec4bbd.js";var mggAiChatbotOutline='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <path d="M10 11H8V8h2zM16 11h-2V8h2z"/>\n <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"/>\n <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"/>\n</svg>\n';var 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>';var miBaselineVisible='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5s5 2.24 5 5s-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3s3-1.34 3-3s-1.34-3-3-3z"/></svg>';var 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>';var 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>';var 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>';var decrease$3="Μείωση";var hidePassword$3="Απόκρυψη κωδικού";var increase$3="Αύξηση";var showPassword$3="Εμφάνιση κωδικού";var speechToTextError$3="Η φωνητική υπαγόρευση δεν υποστηρίζεται από αυτό το πρόγραμμα περιήγησης";var speechToTextOff$3="Διακοπή φωνητικής υπαγόρευσης";var speechToTextOn$3="Έναρξη φωνητικής υπαγόρευσης";var localeEl={decrease:decrease$3,hidePassword:hidePassword$3,increase:increase$3,showPassword:showPassword$3,speechToTextError:speechToTextError$3,speechToTextOff:speechToTextOff$3,speechToTextOn:speechToTextOn$3};var decrease$2="Decrease";var hidePassword$2="Hide password";var increase$2="Increase";var showPassword$2="Show password";var speechToTextError$2="Voice dictation is not supported by this browser";var speechToTextOff$2="Stop voice dictation";var speechToTextOn$2="Start voice dictation";var localeEn={decrease:decrease$2,hidePassword:hidePassword$2,increase:increase$2,showPassword:showPassword$2,speechToTextError:speechToTextError$2,speechToTextOff:speechToTextOff$2,speechToTextOn:speechToTextOn$2};var decrease$1="Disminuir";var hidePassword$1="Ocultar contraseña";var increase$1="Aumentar";var showPassword$1="Mostrar contraseña";var speechToTextError$1="El dictado por voz no es compatible con este navegador";var speechToTextOff$1="Detener dictado por voz";var speechToTextOn$1="Iniciar dictado por voz";var localeEs={decrease:decrease$1,hidePassword:hidePassword$1,increase:increase$1,showPassword:showPassword$1,speechToTextError:speechToTextError$1,speechToTextOff:speechToTextOff$1,speechToTextOn:speechToTextOn$1};var decrease="Diminuisci";var hidePassword="Nascondi password";var increase="Aumenta";var showPassword="Visualizza password";var speechToTextError="Dettatura vocale non supportata da questo browser";var speechToTextOff="Ferma dettatura vocale";var speechToTextOn="Inizia dettatura vocale";var localeIt={decrease:decrease,hidePassword:hidePassword,increase:increase,showPassword:showPassword,speechToTextError:speechToTextError,speechToTextOff:speechToTextOff,speechToTextOn:speechToTextOn};var NullValidator=function(){return null};var requiredValidor=function(t){return t.length>0?null:{required:""}};var maxValidator=function(t){return function(n){if(n===""||t===null){return null}var e=parseFloat(n);return!isNaN(e)&&e>t?{max:"valore massimo ".concat(t)}:null}};var minValidator=function(t){return function(n){if(n===""||t===null){return null}var e=parseFloat(n);return!isNaN(e)&&e<t?{min:"valore minimo ".concat(t)}:null}};var maxLenghtValidator=function(t){return function(n){if(n===""||t===null){return null}return n.length>t?{minLenght:"La lunghezza massima accettata è ".concat(t)}:null}};var minLenghtValidator=function(t){return function(n){if(n===""||t===null){return null}return n.length<t?{minLenght:"La lunghezza minima accettata è ".concat(t)}:null}};var isbnValidatorFn=function(t){if(t==="")return null;if(Number.isNaN(t.slice(0,-1))||t.length!==10&&t.length!==13)return{"isbn-error":"formato isbn non correto"};var n=t.split("").map((function(t){return t==="X"?10:Number(t)}));var e=0;if(t.length===10){var r=n.reduce((function(t,n,e){return t+(10-e)*n}),0);e=r%11}else{var r=n.reduce((function(t,n,e){var r=e%2===0?1:3;return t+n*r}),0);e=r%10}return e===0?null:{"isbn-error":"codice isbn non valido"}};var Validator=function(){function t(){this._validators=[];this._errors=null;this.isValid=true}t.prototype.addValidator=function(t){var n;if(Array.isArray(t)){(n=this._validators).push.apply(n,t)}else{this._validators.push(t)}};t.prototype._hasValidator=function(t,n){return Array.isArray(t)?t.includes(n):t===n};t.prototype.hasValidator=function(t){return t?this._hasValidator(this._validators,t):this._validators.length>0};t.prototype.removeValidator=function(t){var n=this;this._validators=this._validators.filter((function(e){return!n._hasValidator(t,e)}))};t.prototype.validate=function(t){var n=this._validators.map((function(n){return n(t)})).reduce((function(t,n){return Object.assign(Object.assign({},t),n)}),NullValidator);this._errors=Object.keys(n).length===0?null:n;this.isValid=!this._errors};Object.defineProperty(t.prototype,"errors",{get:function(){return this._errors},enumerable:false,configurable:true});return t}();var InputMaskPattern=function(){function t(){}return t}();InputMaskPattern.CF_Regex=/^(?:[A-Z][AEIOU][AEIOUX]|[AEIOU]X{2}|[B-DF-HJ-NP-TV-Z]{2}[A-Z]){2}(?:[\dLMNP-V]{2}(?:[A-EHLMPR-T](?:[04LQ][1-9MNP-V]|[15MR][\dLMNP-V]|[26NS][0-8LMNP-U])|[DHPS][37PT][0L]|[ACELMRT][37PT][01LM]|[AC-EHLMPR-T][26NS][9V])|(?:[02468LNQSU][048LQU]|[13579MPRTV][26NS])B[26NS][9V])(?:[A-MZ][1-9MNP-V][\dLMNP-V]{2}|[A-M][0L](?:[1-9MNP-V][\dLMNP-V]|[0L][1-9MNP-V]))[A-Z]$/i;InputMaskPattern.CF_MASK="A{6}(99|AA)A(99|AA)A(999|AAA)A";InputMaskPattern.CC_MASK="9999-9999-9999-9999";var InputValidationManager=function(){function t(t){this.validator=new Validator;this.pattern=t}t.prototype.mask=function(t){if(!this.pattern){throw new Error("no pattern found, set pattern before mask")}};t.prototype.isValid=function(t){this.validator.validate(t);return this.validator.isValid};return t}();function createInputValidationManager(t){var n;switch(t){case"tel":n=new InputValidationManager("");break;case"url":n=new InputValidationManager("");break;case"cc":n=new InputValidationManager(InputMaskPattern.CC_MASK);break;case"cf":n=new InputValidationManager(InputMaskPattern.CF_MASK);n.validator.addValidator((function(t){if(t==="")return null;return InputMaskPattern.CF_Regex.test(t)?null:{"cf-regex":"Codice fiscale inserito non corretto"}}));n.validator.addValidator((function(t){if(t==="")return null;return t.length===16?null:{"cf-length":"Codice fiscale deve essere lungo 16 caratteri"}}));break;case"isbn":n=new InputValidationManager;n.validator.addValidator(isbnValidatorFn);break;case"piva":n=new InputValidationManager("");break;default:n=new InputValidationManager("")}return n}var 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';var MdsInputStyle0=mdsInputCss;var MdsInput=function(){function t(t){var n=this;registerInstance(this,t);this.changeEvent=createEvent(this,"mdsInputChange",7);this.keyDownEvent=createEvent(this,"mdsInputKeydown",7);this.blurEvent=createEvent(this,"mdsInputBlur",7);this.focusEvent=createEvent(this,"mdsInputFocus",7);this.speechEvent=createEvent(this,"mdsInputSpeechEnd",7);this.validationEvent=createEvent(this,"mdsInputValidation",7);if(t.$hostElement$["s-ei"]){this.internals=t.$hostElement$["s-ei"]}else{this.internals=t.$hostElement$.attachInternals();t.$hostElement$["s-ei"]=this.internals}this.speechToTextIcon=miOutlineMic;this.hasFocus=false;this.isRecording=false;this.countVariant="count-empty";this.isPasswordVisible=false;this.t=new Locale({el:localeEl,en:localeEn,es:localeEs,it:localeIt});this.autocomplete="off";this.autofocus=false;this.await=false;this.controlsLayout="vertical";this.controlsIcon="arrow";this.controlIncreaseLabel="Aumenta";this.controlDecreaseLabel="Riduci";this.disabled=false;this.readonly=false;this.required=false;this.variant="primary";this.type="text";this.typography="detail";this.value="";this.countMaxLength=function(){var t,e,r;if(!n.maxlength)return;if(n.value===undefined)return;n.currentLengthLabel="".concat((e=(t=n.value)===null||t===void 0?void 0:t.length)!==null&&e!==void 0?e:0," / ").concat(n.maxlength);var i=Math.round(n.value.length*100/n.maxlength);if(((r=n.value)===null||r===void 0?void 0:r.length)===n.maxlength){n.countVariant="count-full";return}if(i>=100){n.countVariant="count-full";return}if(i>=75){n.countVariant="count-almost-full";return}if(i>=50){n.countVariant="count-almost";return}if(i>=25){n.countVariant="count-incomplete";return}n.countVariant="count-empty"};this.onInput=function(t){var e=t.target;if(e){n.value=e.value;n.internals.setFormValue(n.value)}n.keyDownEvent.emit(t)};this.onBlur=function(){n.hasFocus=false;n.validateInput();n.blurEvent.emit()};this.onFocus=function(t){var e=t.target;n.hasFocus=true;n.focusEvent.emit();if(n.readonly){setTimeout((function(){e.select()}),10)}};this.stepUp=function(){if(n.nativeInput&&!n.readonly&&!n.disabled){n.nativeInput.stepUp();n.value=n.nativeInput.value}};this.stepDown=function(){if(n.nativeInput&&!n.readonly&&!n.disabled){n.nativeInput.stepDown();n.value=n.nativeInput.value}};this.toggleTextRecognition=function(){n.isRecording=!n.isRecording;if(!n.isRecording){n.speechToTextLabel=n.t.get("speechToTextOn");n.speechToTextIcon=miOutlineMic;n.stopRecognition();return}n.speechToTextLabel=n.t.get("speechToTextOff");n.speechToTextIcon=miBaselineDone;n.startRecognition()};this.onSpeechRecognitionError=function(){console.error("SpeechRecognition API may not work properly on Chrome based browsers.");n.speechButton.classList.remove("mic-toggle-button--recording");n.speechButton.classList.add("toggle-button--error");n.isRecording=false;n.speechToTextLabel=n.t.get("speechToTextError");n.speechToTextIcon=miOutlineMicOff};this.startRecognition=function(){var t,e,r;if(!n.speechButton){n.speechButton=(e=(t=n.el)===null||t===void 0?void 0:t.shadowRoot)===null||e===void 0?void 0:e.querySelector(".mic-toggle-button")}var i=(r=window.SpeechRecognition)!==null&&r!==void 0?r:window.webkitSpeechRecognition;n.value="";if(!i){n.onSpeechRecognitionError();return}n.recognition=new i;n.recognition.continuous=true;n.recognition.lang=navigator.language||"it-IT";n.recognition.interimResults=true;n.recognition.maxAlternatives=1;var o="";var a=0;n.recognition.onresult=function(t){var e=t.results;var r=e[a];if(r.isFinal){o+=r[0].transcript;n.value=o;a+=1;return}n.value=o+r[0].transcript};n.recognition.onerror=function(t){console.error("SpeechRecognition API error:",t.error);n.onSpeechRecognitionError()};n.recognition.start()};this.stopRecognition=function(){if(n.recognition){n.recognition.stop();n.speechEvent.emit()}}}t.prototype.updateLang=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.language=this.t.lang(this.el);this.t.update();return[2]}))}))};t.prototype.formResetCallback=function(){this.internals.setFormValue("")};t.prototype.connectedCallback=function(){this.datalistId="datalist-".concat(hashRandomValue())};t.prototype.componentWillLoad=function(){var t=this;var n;this.language=this.t.lang(this.el);this.speechToTextLabel=this.t.get("speechToTextOn");if(this.el.hasAttribute("tabindex")){var e=this.el.getAttribute("tabindex");this.tabindex=e!==null?parseInt(e):undefined;this.el.removeAttribute("tabindex")}this.internals.setFormValue((n=this.value)!==null&&n!==void 0?n:null);this.maxLengthChanged(this.maxlength);this.isValid=!(this.required&&this.value==="");this.el.focus=function(){var n;(n=t.nativeInput)===null||n===void 0?void 0:n.focus()}};t.prototype.componentDidLoad=function(){var t,n,e;this.inputValidation=createInputValidationManager(this.type);this.setValidators();(t=this.nativeInput)===null||t===void 0?void 0:t.setAttribute("pattern",String(this.inputValidation.pattern));if(this.autofocus){(n=this.nativeInput)===null||n===void 0?void 0:n.focus()}this.variantChanged((e=this.variant)!==null&&e!==void 0?e:"primary")};t.prototype.setValidators=function(){if(this.required)this.inputValidation.validator.addValidator(requiredValidor);if(this.max!==""&&Number(this.max))this.inputValidation.validator.addValidator(maxValidator(Number(this.max)));if(this.min!==""&&Number(this.min))this.inputValidation.validator.addValidator(minValidator(Number(this.max)));if(this.maxlength)this.inputValidation.validator.addValidator(maxLenghtValidator(this.maxlength));if(this.minlength)this.inputValidation.validator.addValidator(minLenghtValidator(this.minlength))};t.prototype.valueChanged=function(){var t;this.changeEvent.emit({value:this.value});this.internals.setFormValue((t=this.value)!==null&&t!==void 0?t:null);if(this.maxlength!==undefined){this.countMaxLength()}if(this.value==="")return;if(!this.isValid)this.validateInput()};t.prototype.variantChanged=function(t){if(t==="ai"&&this.icon===undefined){this.icon=mggAiChatbotOutline}};t.prototype.maxLengthChanged=function(t){if(t===undefined)return;if(t<=0){this.maxlength=undefined;return}this.countMaxLength()};t.prototype.addValidator=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){this.inputValidation.validator.addValidator(t);return[2,Promise.resolve()]}))}))};t.prototype.removeValidator=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){this.inputValidation.validator.removeValidator(t);return[2]}))}))};t.prototype.hasValidator=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){return[2,this.inputValidation.validator.hasValidator(t)]}))}))};t.prototype.getErrors=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,Promise.resolve(this.inputValidation.validator.errors)]}))}))};t.prototype.validateInput=function(){if(this.inputValidation.validator.hasValidator()){this.isValid=this.inputValidation.isValid(this.value);if(this.value===""&&!this.required)this.variant="primary";else this.variant=this.isValid?"success":"error";this.validationEvent.emit(this.isValid)}return this.isValid};t.prototype.disabledChanged=function(t){if(t){this.internals.setFormValue(null)}};t.prototype.setFocus=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){if(this.nativeInput){this.nativeInput.focus()}return[2]}))}))};t.prototype.getInputElement=function(){return Promise.resolve(this.nativeInput)};t.prototype.componentWillRender=function(){this.t.lang(this.el)};t.prototype.render=function(){var t=this;var n,e;return h(Host,{key:"6d45a6e848a28e4f548dd7fa35b5ce937b7f25aa"},this.type==="number"&&this.controlsLayout==="horizontal"&&h("mds-button",{key:"0384e9d5f042131c7c28fdb1d50a9222e8cf5e0d",class:"counter-button counter-button--horizontal counter-button--decrease",icon:this.controlsIcon==="arrow"?miBaselineKeyboardArrowDown:miBaselineRemove,onClick:this.stepDown,tabindex:"0",title:this.t.get("decrease"),part:"counter-button-decrease"}),this.type==="textarea"?h("textarea",{class:clsx("input",((n=this.icon)!==null&&n!==void 0?n: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:function(n){return t.nativeInput=n},required:this.required,tabIndex:this.tabindex,value:this.value}):h("input",{class:clsx("input",((e=this.icon)!==null&&e!==void 0?e: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.datalistId,part:"field",placeholder:this.placeholder,readOnly:this.readonly,ref:function(n){return t.nativeInput=n},required:this.required,step:this.step,tabIndex:this.tabindex,type:this.type==="password"&&this.isPasswordVisible?"text":this.type,value:this.value}),this.type==="number"&&this.controlsLayout==="vertical"&&h("div",{key:"751cfdc465e5ad26294774105a20e40054d0ca8e",class:"counter counter--vertical"},h("mds-button",{key:"13350c09d537edf216e553756094b711a48b0e08",class:"counter-button",icon:this.controlsIcon==="arrow"?miBaselineKeyboardArrowUp:miBaselineAdd,onClick:this.stepUp,tabindex:"0",title:this.t.get("increase"),part:"counter-button-increase"}),h("mds-button",{key:"6f6a4423ceed21a6675634a39e6ee95599056c40",class:"counter-button",icon:this.controlsIcon==="arrow"?miBaselineKeyboardArrowDown:miBaselineRemove,onClick:this.stepDown,tabindex:"0",title:this.t.get("decrease"),part:"counter-button-decrease"})),this.type==="number"&&this.controlsLayout==="horizontal"&&h("mds-button",{key:"0f473cb643237ed76fb4f0139772a00ee0f8abcd",class:"counter-button counter-button--horizontal counter-button--increase",icon:this.controlsIcon==="arrow"?miBaselineKeyboardArrowUp:miBaselineAdd,onClick:this.stepUp,tabindex:"0",title:this.t.get("increase"),part:"counter-button-increase"}),this.type==="password"&&h("mds-button",{key:"15be745254d2d8864c0c37c83d8e5628ed23b6c5",class:"password-toggle-button",icon:this.isPasswordVisible?miBaselineVisibleOff:miBaselineVisible,onClick:function(){return t.isPasswordVisible=!t.isPasswordVisible},tabindex:"0",tone:"quiet",title:this.isPasswordVisible?this.t.get("hidePassword"):this.t.get("showPassword"),part:"password-toggle-button"}),this.mic&&h("mds-button",{key:"f3c8a952f354a68c461943fce3d85586292b06f2",class:clsx("mic-toggle-button",this.isRecording&&"mic-toggle-button--recording"),icon:this.speechToTextIcon,onClick:function(){return t.toggleTextRecognition()},tabindex:"0",variant:"dark",tone:"quiet",title:this.speechToTextLabel,part:"mic-toggle-button"}),h("mds-input-tip",{key:"46825f67b6af02d703ccc6035cefecb1f23bc1b1",lang:this.language,position:"top",active:this.hasFocus,part:"tip-top"},this.disabled&&h("mds-input-tip-item",{key:"268436f08a8e3c91407694c5b4d3492dcbb700d5",expanded:true,variant:"disabled"}),this.readonly&&h("mds-input-tip-item",{key:"d01e7052fb7f9be3f7a8d8752782db5aeeb2cf75",expanded:true,variant:"readonly"}),this.required&&h("mds-input-tip-item",{key:"1717e91489cb374911d7181a10eb72c244f18093",expanded:this.hasFocus,variant:this.isValid?"required-success":"required"})),h("mds-input-tip",{key:"616a3c9170a42b59e682cbb2f75bd237d845df13",lang:this.language,position:"bottom",active:this.hasFocus,part:"tip-bottom"},this.tip&&h("mds-input-tip-item",{key:"a535ac2ef3415693d58c03ba0786f4a3b51bb964",expanded:true,variant:"text"},this.tip),this.maxlength&&h("mds-input-tip-item",{key:"522b5f3e1a3380ba65e9b7e49e56274844988009",part:"tip-count",expanded:true,variant:this.countVariant},this.currentLengthLabel)),this.datalist&&h("datalist",{key:"cb742a0c5edf17d9357ca9f24e1477baa410e408",id:this.datalistId,class:"datalist"},this.datalist.map((function(t,n){return h("option",{key:n,value:t})}))),this.icon&&!this.await&&h("mds-icon",{key:"ebebe67bfe59337025066e1694d310d4814f3847",class:clsx("icon",this.variant),name:this.icon}),h("mds-spinner",{key:"2b1f07e743294862129f60fb293177c28eff5522",running:this.await,class:clsx("await",this.variant)}))};Object.defineProperty(t,"formAssociated",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{value:["valueChanged"],variant:["variantChanged"],maxlength:["maxLengthChanged"],disabled:["disabledChanged"]}},enumerable:false,configurable:true});return t}();MdsInput.style=MdsInputStyle0;export{MdsInput as mds_input};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __spreadArray=this&&this.__spreadArray||function(t,e,a){if(a||arguments.length===2)for(var o=0,r=e.length,i;o<r;o++){if(i||!(o in e)){if(!i)i=Array.prototype.slice.call(e,0,o);i[o]=e[o]}}return t.concat(i||Array.prototype.slice.call(e))};import{r as registerInstance,h,H as Host,g as getElement}from"./index-7f153b9b.js";var typographyDefaultsVariant={action:{tag:"span",selector:{default:"text-title-action",title:"text-title-action"}},caption:{tag:"span",selector:{default:"text-info-caption",info:"text-info-caption",read:"text-read-caption"}},detail:{tag:"p",selector:{default:"text-info-detail",info:"text-info-detail",read:"text-read-detail"}},h1:{tag:"h1",selector:{default:"text-title-h1",title:"text-title-h1"}},h2:{tag:"h2",selector:{default:"text-title-h2",title:"text-title-h2"}},h3:{tag:"h3",selector:{default:"text-title-h3",title:"text-title-h3"}},h4:{tag:"h4",selector:{default:"text-title-h4",title:"text-title-h4"}},h5:{tag:"h5",selector:{default:"text-title-h5",title:"text-title-h5"}},h6:{tag:"h6",selector:{default:"text-title-h6",title:"text-title-h6"}},hack:{tag:"code",selector:{default:"text-code-hack",mono:"text-code-hack"}},label:{tag:"label",selector:{default:"text-info-label",info:"text-info-label"}},option:{tag:"label",selector:{default:"text-info-option",info:"text-info-option"}},paragraph:{tag:"p",selector:{default:"text-info-paragraph",secondary:"text-secondary-paragraph",info:"text-info-paragraph",read:"text-read-paragraph"}},snippet:{tag:"code",selector:{default:"text-code-snippet",mono:"text-code-snippet"}},tip:{tag:"div",selector:{default:"text-info-tip",info:"text-info-tip"}}};var int32=2147483647;var gen=function(t){return t*16807%int32};var randomFloat=function(t){return gen(t)/int32};var randomInt=function(t){return gen(t)};var generator=function(t){if(t===void 0){t=1}var e=t<1?1:t;var a=function(){e=randomInt(e);return e};return{random:function(){return a()},randomFloat:function(){return randomFloat(a())},range:function(t,e){var o=t-.4999;var r=e+.4999;return Math.round(o+(r-o)*randomFloat(a()))},rangeFloat:function(t,e){return t+(e-t)*randomFloat(a())}}};var strToCharCodeArray=function(t){return t.split("").map((function(t){return t.charCodeAt(0)}))};var randomSign=function(){return(Math.round(Math.random())-.5)*2};var minMaxLooped=function(t,e){return function(a){if(a>e)return t+(a-e);if(a<t)return e+(a-t);return a}};var rand=generator();var random=function(t,e){return function(){return(t+rand.range(0,e))*randomSign()}};var generateRandomCharCodeArray=function(t,e){return function(a){return strToCharCodeArray(a).map(random(t,e))}};var charCodeArrayToString=function(t){var e=t.str,a=t.minCharCode,o=t.maxCharCode,r=t.placeholderChar,i=t.charStep;return function(t){return t.reduce((function(t,n,s){if(n!==0){if(Math.abs(n)>i){return t+r}return t+String.fromCharCode(minMaxLooped(a,o)(e.charCodeAt(s)+n))}return t+e.charAt(s)}),"")}};var noop=function(){};var RandomText=function(){function t(e){var a=this;this.start=function(){var t=a,e=t.frameOffset,o=t.charOffset,r=t.str,i=t.speed;var n=generateRandomCharCodeArray(e,o)(r);a.stop();a.rafId=requestAnimationFrame((function(){a.step(n,i,i)}))};Object.assign(this,Object.assign(Object.assign({},t.defaults),e))}t.prototype.stop=function(){cancelAnimationFrame(this.rafId)};t.prototype.step=function(t,e,a){var o=this;var r=this,i=r.str,n=r.charStep,s=r.minCharCode,d=r.maxCharCode,h=r.placeholderChar,m=r.onProgress,l=r.onComplete;var y=t.slice(0,e);var g=y.map((function(t){if(t>0)return t-1;if(t<0)return t+1;return 0}));var f=charCodeArrayToString({str:i,minCharCode:s,maxCharCode:d,placeholderChar:h,charStep:n})(g);var p=__spreadArray(__spreadArray([],g,true),t.slice(e),true);m(f);if(f!==i){this.rafId=requestAnimationFrame((function(){o.step(p,e+a,a)}))}else{l(f)}};return t}();RandomText.defaults={str:"",speed:2,placeholderChar:"_",frameOffset:30,charOffset:20,charStep:10,minCharCode:32,maxCharCode:122,onProgress:noop,onComplete:noop};var mdsTextCss=':host{--mds-text-selection-background:rgb(var(--label-sky-09));--mds-text-selection-color:rgb(var(--label-sky-01));--mds-text-line-clamp:3;--mds-text-animation-speed:0.5;--mds-text-animation-placeholder-char:" ";display:-ms-flexbox;display:flex;min-width:0}.text::-moz-selection{background-color:var(--mds-text-selection-background);color:var(--mds-text-selection-color)}.text::selection{background-color:var(--mds-text-selection-background);color:var(--mds-text-selection-color)}.text{cursor:inherit;display:inherit}:host([typography="snippet"]){min-height:1.5rem;font-family:\'Roboto Mono\', \'Courier New\', monospace;font-size:1rem;line-height:1.5rem;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}:host([typography="hack"]){min-height:1.25rem;font-family:\'Roboto Mono\', \'Courier New\', monospace;font-size:0.875rem;line-height:1.25rem;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}:host([typography="h1"]){min-height:3rem;font-family:Roboto, system-ui, -apple-system, BlinkMacSystemFont, \'Segoe UI\', sans-serif;font-size:3rem;line-height:3rem;letter-spacing:-0.025em;font-weight:900;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}:host([typography="h2"]){min-height:2.5rem;font-family:Roboto, system-ui, -apple-system, BlinkMacSystemFont, \'Segoe UI\', sans-serif;font-size:2.25rem;line-height:2.5rem;letter-spacing:-0.025em;font-weight:900;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}:host([typography="h3"]){min-height:2.25rem;font-family:Roboto, system-ui, -apple-system, BlinkMacSystemFont, \'Segoe UI\', sans-serif;font-size:1.875rem;line-height:2.25rem;letter-spacing:-0.025em;font-weight:900;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}:host([typography="h4"]){min-height:2rem;font-family:Roboto, system-ui, -apple-system, BlinkMacSystemFont, \'Segoe UI\', sans-serif;font-size:1.5rem;line-height:2rem;letter-spacing:-0.025em;font-weight:700;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}:host([typography="h5"]){min-height:1.75rem;font-family:Roboto, system-ui, -apple-system, BlinkMacSystemFont, \'Segoe UI\', sans-serif;font-size:1.25rem;line-height:1.75rem;letter-spacing:-0.025em;font-weight:700;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}:host([typography="h6"]){min-height:1.5rem;font-family:Roboto, system-ui, -apple-system, BlinkMacSystemFont, \'Segoe UI\', sans-serif;font-size:1rem;line-height:1.5rem;letter-spacing:-0.025em;font-weight:700;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}:host([typography="h1"]),:host([typography="h2"]),:host([typography="h3"]),:host([typography="h4"]),:host([typography="h5"]),:host([typography="h6"]){text-wrap:balance}:host([typography="action"]){min-height:1.5rem;font-family:Roboto, system-ui, -apple-system, BlinkMacSystemFont, \'Segoe UI\', sans-serif;font-size:0.875rem;line-height:1.5rem;font-weight:500;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}:host([typography="paragraph"]){min-height:2rem;font-family:Karla, system-ui, -apple-system, BlinkMacSystemFont, \'Segoe UI\', sans-serif;font-size:1.25rem;line-height:2rem;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}:host([typography="detail"]){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}:host([typography="caption"]){min-height:1.25rem;font-family:Karla, system-ui, -apple-system, BlinkMacSystemFont, \'Segoe UI\', sans-serif;font-size:0.875rem;line-height:1.25rem;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}:host([typography="paragraph"]),:host([typography="detail"]),:host([typography="caption"]){text-wrap:pretty}:host([typography="label"]){min-height:1rem;font-family:Karla, system-ui, -apple-system, BlinkMacSystemFont, \'Segoe UI\', sans-serif;font-size:0.75rem;line-height:1rem;font-weight:700;text-transform:uppercase;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}:host([typography="tip"]){min-height:1rem;font-family:Karla, system-ui, -apple-system, BlinkMacSystemFont, \'Segoe UI\', sans-serif;font-size:0.75rem;line-height:1rem;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}:host([typography="option"]){min-height:0.625rem;font-family:Karla, system-ui, -apple-system, BlinkMacSystemFont, \'Segoe UI\', sans-serif;font-size:0.625rem;line-height:0.625rem;letter-spacing:-0.025em;font-weight:700;text-transform:uppercase;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}:host([typography="paragraph"][variant="read"]){min-height:2rem;font-family:\'Merriweather\', Times, \'Times New Roman\', serif;font-size:1.25rem;line-height:2rem;font-weight:300;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}:host([typography="detail"][variant="read"]){min-height:1.5rem;font-family:\'Merriweather\', Times, \'Times New Roman\', serif;font-size:1rem;line-height:1.5rem;font-weight:300;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}:host([typography="caption"][variant="read"]){min-height:1.25rem;font-family:\'Merriweather\', Times, \'Times New Roman\', serif;font-size:0.875rem;line-height:1.25rem;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}:host([tag="article"]),:host([tag="blockquote"]),:host([tag="dd"]),:host([tag="details"]),:host([tag="div"]),:host([tag="dl"]),:host([tag="dt"]),:host([tag="figcaption"]),:host([tag="h1"]),:host([tag="h2"]),:host([tag="h3"]),:host([tag="h4"]),:host([tag="h5"]),:host([tag="h6"]),:host([tag="label"]),:host([tag="legend"]),:host([tag="li"]),:host([tag="ol"]),:host([tag="p"]),:host([tag="pre"]),:host([tag="summary"]),:host([tag="ul"]){display:block}:host([tag="abbr"]),:host([tag="address"]),:host([tag="b"]),:host([tag="bdo"]),:host([tag="cite"]),:host([tag="code"]),:host([tag="del"]),:host([tag="dfn"]),:host([tag="em"]),:host([tag="i"]),:host([tag="ins"]),:host([tag="kbd"]),:host([tag="mark"]),:host([tag="q"]),:host([tag="rb"]),:host([tag="rt"]),:host([tag="ruby"]),:host([tag="s"]),:host([tag="samp"]),:host([tag="small"]),:host([tag="span"]),:host([tag="strong"]),:host([tag="sub"]),:host([tag="sup"]),:host([tag="time"]),:host([tag="u"]),:host([tag="var"]){display:inline}:host([tag="code"]){border-radius:0.25rem;padding-left:0.25rem;padding-right:0.25rem;padding-top:0.0625rem;padding-bottom:0.0625rem;-webkit-transition-duration:200ms;transition-duration:200ms;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);background-color:rgb(var(--tone-neutral-09));-webkit-box-shadow:rgb(var(--tone-neutral-08)) 0 0 0 1px;box-shadow:rgb(var(--tone-neutral-08)) 0 0 0 1px;color:rgb(var(--tone-neutral-03));-webkit-transition-property:color, background-color;transition-property:color, background-color}:host([truncate]) .text{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis}:host([truncate="word"]) .text{white-space:nowrap}@supports (line-clamp: 1){:host([truncate="all"]) .text{line-clamp:var(--mds-text-line-clamp, 1)}}@supports (display: -webkit-box){:host([truncate="all"]) .text{-webkit-box-orient:vertical;display:-webkit-box;-webkit-line-clamp:var(--mds-text-line-clamp, 1)}}abbr,address,article,b,bdo,blockquote,cite,code,dd,del,details,dfn,div,dl,dt,em,figcaption,h1,h2,h3,h4,h5,h6,i,ins,kbd,label,legend,li,mark,ol,p,pre,q,rb,rt,ruby,s,samp,small,span,strong,sub,summary,sup,time,u,ul,var,wbr{font-family:inherit;font-size:inherit;font-weight:inherit;line-height:inherit;margin:0;overflow:inherit;text-overflow:inherit}:host-context(.pref-animation-reduce){-webkit-transition-duration:0s;transition-duration:0s}@media (prefers-reduced-motion){:host-context(.pref-animation-system){-webkit-transition-duration:0s;transition-duration:0s}}:host(:not(:is([hydrated],.hydrated))){-webkit-animation-duration:0s;animation-duration:0s;border-color:transparent;-webkit-box-shadow:0 0 0 transparent;box-shadow:0 0 0 transparent;opacity:0;outline-color:transparent;-webkit-transition-delay:0s;transition-delay:0s;-webkit-transition-duration:0s;transition-duration:0s;visibility:hidden}mds-accordion:not(:is([hydrated],.hydrated)),mds-accordion-item:not(:is([hydrated],.hydrated)),mds-accordion-timer:not(:is([hydrated],.hydrated)),mds-accordion-timer-item:not(:is([hydrated],.hydrated)),mds-author:not(:is([hydrated],.hydrated)),mds-avatar:not(:is([hydrated],.hydrated)),mds-badge:not(:is([hydrated],.hydrated)),mds-banner:not(:is([hydrated],.hydrated)),mds-benchmark-bar:not(:is([hydrated],.hydrated)),mds-bibliography:not(:is([hydrated],.hydrated)),mds-breadcrumb:not(:is([hydrated],.hydrated)),mds-breadcrumb-item:not(:is([hydrated],.hydrated)),mds-button:not(:is([hydrated],.hydrated)),mds-card:not(:is([hydrated],.hydrated)),mds-card-content:not(:is([hydrated],.hydrated)),mds-card-footer:not(:is([hydrated],.hydrated)),mds-card-header:not(:is([hydrated],.hydrated)),mds-card-media:not(:is([hydrated],.hydrated)),mds-chip:not(:is([hydrated],.hydrated)),mds-details:not(:is([hydrated],.hydrated)),mds-dropdown:not(:is([hydrated],.hydrated)),mds-entity:not(:is([hydrated],.hydrated)),mds-file:not(:is([hydrated],.hydrated)),mds-file-preview:not(:is([hydrated],.hydrated)),mds-filter:not(:is([hydrated],.hydrated)),mds-filter-item:not(:is([hydrated],.hydrated)),mds-header:not(:is([hydrated],.hydrated)),mds-header-bar:not(:is([hydrated],.hydrated)),mds-help:not(:is([hydrated],.hydrated)),mds-horizontal-scroll:not(:is([hydrated],.hydrated)),mds-hr:not(:is([hydrated],.hydrated)),mds-icon:not(:is([hydrated],.hydrated)),mds-img:not(:is([hydrated],.hydrated)),mds-input:not(:is([hydrated],.hydrated)),mds-input-field:not(:is([hydrated],.hydrated)),mds-input-range:not(:is([hydrated],.hydrated)),mds-input-select:not(:is([hydrated],.hydrated)),mds-input-switch:not(:is([hydrated],.hydrated)),mds-input-tip:not(:is([hydrated],.hydrated)),mds-input-tip-item:not(:is([hydrated],.hydrated)),mds-input-upload:not(:is([hydrated],.hydrated)),mds-keyboard:not(:is([hydrated],.hydrated)),mds-keyboard-key:not(:is([hydrated],.hydrated)),mds-kpi:not(:is([hydrated],.hydrated)),mds-kpi-item:not(:is([hydrated],.hydrated)),mds-label:not(:is([hydrated],.hydrated)),mds-list:not(:is([hydrated],.hydrated)),mds-list-item:not(:is([hydrated],.hydrated)),mds-modal:not(:is([hydrated],.hydrated)),mds-note:not(:is([hydrated],.hydrated)),mds-notification:not(:is([hydrated],.hydrated)),mds-paginator:not(:is([hydrated],.hydrated)),mds-paginator-item:not(:is([hydrated],.hydrated)),mds-pref:not(:is([hydrated],.hydrated)),mds-pref-animation:not(:is([hydrated],.hydrated)),mds-pref-consumption:not(:is([hydrated],.hydrated)),mds-pref-contrast:not(:is([hydrated],.hydrated)),mds-pref-language:not(:is([hydrated],.hydrated)),mds-pref-language-item:not(:is([hydrated],.hydrated)),mds-pref-theme:not(:is([hydrated],.hydrated)),mds-price-table:not(:is([hydrated],.hydrated)),mds-price-table-features:not(:is([hydrated],.hydrated)),mds-price-table-features-cell:not(:is([hydrated],.hydrated)),mds-price-table-features-row:not(:is([hydrated],.hydrated)),mds-price-table-header:not(:is([hydrated],.hydrated)),mds-price-table-list:not(:is([hydrated],.hydrated)),mds-price-table-list-item:not(:is([hydrated],.hydrated)),mds-progress:not(:is([hydrated],.hydrated)),mds-push-notification:not(:is([hydrated],.hydrated)),mds-push-notifications:not(:is([hydrated],.hydrated)),mds-quote:not(:is([hydrated],.hydrated)),mds-separator:not(:is([hydrated],.hydrated)),mds-spinner:not(:is([hydrated],.hydrated)),mds-stepper-bar:not(:is([hydrated],.hydrated)),mds-stepper-bar-item:not(:is([hydrated],.hydrated)),mds-tab:not(:is([hydrated],.hydrated)),mds-tab-bar:not(:is([hydrated],.hydrated)),mds-tab-bar-item:not(:is([hydrated],.hydrated)),mds-tab-item:not(:is([hydrated],.hydrated)),mds-table:not(:is([hydrated],.hydrated)),mds-table-body:not(:is([hydrated],.hydrated)),mds-table-cell:not(:is([hydrated],.hydrated)),mds-table-footer:not(:is([hydrated],.hydrated)),mds-table-header:not(:is([hydrated],.hydrated)),mds-table-header-cell:not(:is([hydrated],.hydrated)),mds-table-row:not(:is([hydrated],.hydrated)),mds-text:not(:is([hydrated],.hydrated)),mds-toast:not(:is([hydrated],.hydrated)),mds-tooltip:not(:is([hydrated],.hydrated)),mds-tree:not(:is([hydrated],.hydrated)),mds-tree-item:not(:is([hydrated],.hydrated)),mds-url-view:not(:is([hydrated],.hydrated)),mds-usage:not(:is([hydrated],.hydrated)),mds-video-wall:not(:is([hydrated],.hydrated)),mds-zero:not(:is([hydrated],.hydrated)){-webkit-animation-duration:0s;animation-duration:0s;border-color:transparent;-webkit-box-shadow:0 0 0 transparent;box-shadow:0 0 0 transparent;opacity:0;outline-color:transparent;-webkit-transition-delay:0s;transition-delay:0s;-webkit-transition-duration:0s;transition-duration:0s;visibility:hidden}';var MdsTextStyle0=mdsTextCss;var MdsText=function(){function t(t){var e=this;registerInstance(this,t);this.cssTextAnimationSpeed=2;this.cssTextAnimationPlaceholderChar=" ";this.randomTextOptions={speed:this.cssTextAnimationSpeed,placeholderChar:this.cssTextAnimationPlaceholderChar,frameOffset:10,charOffset:20,charStep:15};this.animation="none";this.typography="detail";this.animateText=function(t){var a;var o=(a=e.host.shadowRoot)===null||a===void 0?void 0:a.querySelector(".text");e.randomTextOptions.speed=e.cssTextAnimationSpeed;e.randomTextOptions.placeholderChar=e.cssTextAnimationPlaceholderChar;console.info("animateText",e.cssTextAnimationPlaceholderChar);e.randomText=new RandomText(Object.assign({str:t,onProgress:function(t){o.innerHTML=t}},e.randomTextOptions));e.randomText.start()};this.updateCSSCustomProps=function(){if(typeof window==="undefined")return;var t=window.getComputedStyle(e.host);e.cssTextAnimationSpeed=Number(t.getPropertyValue("--mds-text-animation-speed"));var a=t.getPropertyValue("--mds-text-animation-placeholder-char");if(a==='" "'||a==="' '"){e.cssTextAnimationPlaceholderChar=" ";return}e.cssTextAnimationPlaceholderChar=a}}t.prototype.componentWillRender=function(){var t;var e=typographyDefaultsVariant[this.typography].tag;this.tag=(t=this.tag)!==null&&t!==void 0?t:e};t.prototype.componentDidLoad=function(){this.updateCSSCustomProps()};t.prototype.textHandler=function(t){if(this.animation==="none"){return}if(this.randomText){this.randomText.stop()}if(t){this.animateText(t)}};t.prototype.render=function(){return h(Host,{key:"be2fe2a0408f4021fe38199c85d05b766fcc69ef"},h(this.tag,{key:"179a5b0c33ec88d31459f77b686c3f318b06a410",class:"text"},!this.text?h("slot",null):this.text))};Object.defineProperty(t.prototype,"host",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{text:["textHandler"]}},enumerable:false,configurable:true});return t}();MdsText.style=MdsTextStyle0;export{MdsText as mds_text};
|
|
1
|
+
var __spreadArray=this&&this.__spreadArray||function(t,e,a){if(a||arguments.length===2)for(var o=0,r=e.length,i;o<r;o++){if(i||!(o in e)){if(!i)i=Array.prototype.slice.call(e,0,o);i[o]=e[o]}}return t.concat(i||Array.prototype.slice.call(e))};import{r as registerInstance,h,H as Host,g as getElement}from"./index-7f153b9b.js";var typographyDefaultsVariant={action:{tag:"span",selector:{default:"text-title-action",title:"text-title-action"}},caption:{tag:"span",selector:{default:"text-info-caption",info:"text-info-caption",read:"text-read-caption"}},detail:{tag:"p",selector:{default:"text-info-detail",info:"text-info-detail",read:"text-read-detail"}},h1:{tag:"h1",selector:{default:"text-title-h1",title:"text-title-h1"}},h2:{tag:"h2",selector:{default:"text-title-h2",title:"text-title-h2"}},h3:{tag:"h3",selector:{default:"text-title-h3",title:"text-title-h3"}},h4:{tag:"h4",selector:{default:"text-title-h4",title:"text-title-h4"}},h5:{tag:"h5",selector:{default:"text-title-h5",title:"text-title-h5"}},h6:{tag:"h6",selector:{default:"text-title-h6",title:"text-title-h6"}},hack:{tag:"code",selector:{default:"text-code-hack",mono:"text-code-hack"}},label:{tag:"label",selector:{default:"text-info-label",info:"text-info-label"}},option:{tag:"label",selector:{default:"text-info-option",info:"text-info-option"}},paragraph:{tag:"p",selector:{default:"text-info-paragraph",secondary:"text-secondary-paragraph",info:"text-info-paragraph",read:"text-read-paragraph"}},snippet:{tag:"code",selector:{default:"text-code-snippet",mono:"text-code-snippet"}},tip:{tag:"div",selector:{default:"text-info-tip",info:"text-info-tip"}}};var int32=2147483647;var gen=function(t){return t*16807%int32};var randomFloat=function(t){return gen(t)/int32};var randomInt=function(t){return gen(t)};var generator=function(t){if(t===void 0){t=1}var e=t<1?1:t;var a=function(){e=randomInt(e);return e};return{random:function(){return a()},randomFloat:function(){return randomFloat(a())},range:function(t,e){var o=t-.4999;var r=e+.4999;return Math.round(o+(r-o)*randomFloat(a()))},rangeFloat:function(t,e){return t+(e-t)*randomFloat(a())}}};var strToCharCodeArray=function(t){return t.split("").map((function(t){return t.charCodeAt(0)}))};var randomSign=function(){return(Math.round(Math.random())-.5)*2};var minMaxLooped=function(t,e){return function(a){if(a>e)return t+(a-e);if(a<t)return e+(a-t);return a}};var rand=generator();var random=function(t,e){return function(){return(t+rand.range(0,e))*randomSign()}};var generateRandomCharCodeArray=function(t,e){return function(a){return strToCharCodeArray(a).map(random(t,e))}};var charCodeArrayToString=function(t){var e=t.str,a=t.minCharCode,o=t.maxCharCode,r=t.placeholderChar,i=t.charStep;return function(t){return t.reduce((function(t,n,s){if(n!==0){if(Math.abs(n)>i){return t+r}return t+String.fromCharCode(minMaxLooped(a,o)(e.charCodeAt(s)+n))}return t+e.charAt(s)}),"")}};var noop=function(){};var RandomText=function(){function t(e){var a=this;this.start=function(){var t=a,e=t.frameOffset,o=t.charOffset,r=t.str,i=t.speed;var n=generateRandomCharCodeArray(e,o)(r);a.stop();a.rafId=requestAnimationFrame((function(){a.step(n,i,i)}))};Object.assign(this,Object.assign(Object.assign({},t.defaults),e))}t.prototype.stop=function(){cancelAnimationFrame(this.rafId)};t.prototype.step=function(t,e,a){var o=this;var r=this,i=r.str,n=r.charStep,s=r.minCharCode,d=r.maxCharCode,h=r.placeholderChar,m=r.onProgress,y=r.onComplete;var l=t.slice(0,e);var g=l.map((function(t){if(t>0)return t-1;if(t<0)return t+1;return 0}));var f=charCodeArrayToString({str:i,minCharCode:s,maxCharCode:d,placeholderChar:h,charStep:n})(g);var p=__spreadArray(__spreadArray([],g,true),t.slice(e),true);m(f);if(f!==i){this.rafId=requestAnimationFrame((function(){o.step(p,e+a,a)}))}else{y(f)}};return t}();RandomText.defaults={str:"",speed:2,placeholderChar:"_",frameOffset:30,charOffset:20,charStep:10,minCharCode:32,maxCharCode:122,onProgress:noop,onComplete:noop};var mdsTextCss=':host{--mds-text-selection-background:rgb(var(--label-sky-09));--mds-text-selection-color:rgb(var(--label-sky-01));--mds-text-line-clamp:3;--mds-text-animation-speed:0.5;--mds-text-animation-placeholder-char:" ";display:-ms-flexbox;display:flex;min-width:0}.text::-moz-selection{background-color:var(--mds-text-selection-background);color:var(--mds-text-selection-color)}.text::selection{background-color:var(--mds-text-selection-background);color:var(--mds-text-selection-color)}.text{cursor:inherit;display:inherit}:host([typography="snippet"]){min-height:1.5rem;font-family:\'Roboto Mono\', \'Courier New\', monospace;font-size:1rem;line-height:1.5rem;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}:host([typography="hack"]){min-height:1.25rem;font-family:\'Roboto Mono\', \'Courier New\', monospace;font-size:0.875rem;line-height:1.25rem;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}:host([typography="h1"]){min-height:3rem;font-family:Roboto, system-ui, -apple-system, BlinkMacSystemFont, \'Segoe UI\', sans-serif;font-size:3rem;line-height:3rem;letter-spacing:-0.025em;font-weight:900;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}:host([typography="h2"]){min-height:2.5rem;font-family:Roboto, system-ui, -apple-system, BlinkMacSystemFont, \'Segoe UI\', sans-serif;font-size:2.25rem;line-height:2.5rem;letter-spacing:-0.025em;font-weight:900;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}:host([typography="h3"]){min-height:2.25rem;font-family:Roboto, system-ui, -apple-system, BlinkMacSystemFont, \'Segoe UI\', sans-serif;font-size:1.875rem;line-height:2.25rem;letter-spacing:-0.025em;font-weight:900;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}:host([typography="h4"]){min-height:2rem;font-family:Roboto, system-ui, -apple-system, BlinkMacSystemFont, \'Segoe UI\', sans-serif;font-size:1.5rem;line-height:2rem;letter-spacing:-0.025em;font-weight:700;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}:host([typography="h5"]){min-height:1.75rem;font-family:Roboto, system-ui, -apple-system, BlinkMacSystemFont, \'Segoe UI\', sans-serif;font-size:1.25rem;line-height:1.75rem;letter-spacing:-0.025em;font-weight:700;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}:host([typography="h6"]){min-height:1.5rem;font-family:Roboto, system-ui, -apple-system, BlinkMacSystemFont, \'Segoe UI\', sans-serif;font-size:1rem;line-height:1.5rem;letter-spacing:-0.025em;font-weight:700;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}:host([typography="h1"]),:host([typography="h2"]),:host([typography="h3"]),:host([typography="h4"]),:host([typography="h5"]),:host([typography="h6"]){text-wrap:balance}:host([typography="action"]){min-height:1.5rem;font-family:Roboto, system-ui, -apple-system, BlinkMacSystemFont, \'Segoe UI\', sans-serif;font-size:0.875rem;line-height:1.5rem;font-weight:500;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}:host([typography="paragraph"]){min-height:2rem;font-family:Karla, system-ui, -apple-system, BlinkMacSystemFont, \'Segoe UI\', sans-serif;font-size:1.25rem;line-height:2rem;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}:host([typography="detail"]){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}:host([typography="caption"]){min-height:1.25rem;font-family:Karla, system-ui, -apple-system, BlinkMacSystemFont, \'Segoe UI\', sans-serif;font-size:0.875rem;line-height:1.25rem;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}:host([typography="paragraph"]),:host([typography="detail"]),:host([typography="caption"]){text-wrap:pretty}:host([typography="label"]){min-height:1rem;font-family:Karla, system-ui, -apple-system, BlinkMacSystemFont, \'Segoe UI\', sans-serif;font-size:0.75rem;line-height:1rem;font-weight:700;text-transform:uppercase;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}:host([typography="tip"]){min-height:1rem;font-family:Karla, system-ui, -apple-system, BlinkMacSystemFont, \'Segoe UI\', sans-serif;font-size:0.75rem;line-height:1rem;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}:host([typography="option"]){min-height:0.625rem;font-family:Karla, system-ui, -apple-system, BlinkMacSystemFont, \'Segoe UI\', sans-serif;font-size:0.625rem;line-height:0.625rem;letter-spacing:-0.025em;font-weight:700;text-transform:uppercase;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}:host([typography="paragraph"][variant="read"]){min-height:2rem;font-family:\'Merriweather\', Times, \'Times New Roman\', serif;font-size:1.25rem;line-height:2rem;font-weight:300;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}:host([typography="detail"][variant="read"]){min-height:1.5rem;font-family:\'Merriweather\', Times, \'Times New Roman\', serif;font-size:1rem;line-height:1.5rem;font-weight:300;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}:host([typography="caption"][variant="read"]){min-height:1.25rem;font-family:\'Merriweather\', Times, \'Times New Roman\', serif;font-size:0.875rem;line-height:1.25rem;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}:host([tag="article"]),:host([tag="blockquote"]),:host([tag="dd"]),:host([tag="details"]),:host([tag="div"]),:host([tag="dl"]),:host([tag="dt"]),:host([tag="figcaption"]),:host([tag="h1"]),:host([tag="h2"]),:host([tag="h3"]),:host([tag="h4"]),:host([tag="h5"]),:host([tag="h6"]),:host([tag="label"]),:host([tag="legend"]),:host([tag="li"]),:host([tag="ol"]),:host([tag="p"]),:host([tag="pre"]),:host([tag="summary"]),:host([tag="ul"]){display:block}:host([tag="abbr"]),:host([tag="address"]),:host([tag="b"]),:host([tag="bdo"]),:host([tag="cite"]),:host([tag="code"]),:host([tag="del"]),:host([tag="dfn"]),:host([tag="em"]),:host([tag="i"]),:host([tag="ins"]),:host([tag="kbd"]),:host([tag="mark"]),:host([tag="q"]),:host([tag="rb"]),:host([tag="rt"]),:host([tag="ruby"]),:host([tag="s"]),:host([tag="samp"]),:host([tag="small"]),:host([tag="span"]),:host([tag="strong"]),:host([tag="sub"]),:host([tag="sup"]),:host([tag="time"]),:host([tag="u"]),:host([tag="var"]){display:inline}:host([tag="code"]){border-radius:0.25rem;padding-left:0.25rem;padding-right:0.25rem;padding-top:0.0625rem;padding-bottom:0.0625rem;-webkit-transition-duration:200ms;transition-duration:200ms;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);background-color:rgb(var(--tone-neutral-09));-webkit-box-shadow:rgb(var(--tone-neutral-08)) 0 0 0 1px;box-shadow:rgb(var(--tone-neutral-08)) 0 0 0 1px;color:rgb(var(--tone-neutral-03));-webkit-transition-property:color, background-color;transition-property:color, background-color}:host([truncate]) .text{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis}:host([truncate="word"]) .text{white-space:nowrap}@supports (line-clamp: 1){:host([truncate="all"]) .text{line-clamp:var(--mds-text-line-clamp, 1)}}@supports (display: -webkit-box){:host([truncate="all"]) .text{-webkit-box-orient:vertical;display:-webkit-box;-webkit-line-clamp:var(--mds-text-line-clamp, 1)}}abbr,address,article,b,bdo,blockquote,cite,code,dd,del,details,dfn,div,dl,dt,em,figcaption,h1,h2,h3,h4,h5,h6,i,ins,kbd,label,legend,li,mark,ol,p,pre,q,rb,rt,ruby,s,samp,small,span,strong,sub,summary,sup,time,u,ul,var,wbr{font-family:inherit;font-size:inherit;font-weight:inherit;line-height:inherit;margin:0;overflow:inherit;text-overflow:inherit}:host-context(.pref-animation-reduce){-webkit-transition-duration:0s;transition-duration:0s}@media (prefers-reduced-motion){:host-context(.pref-animation-system){-webkit-transition-duration:0s;transition-duration:0s}}:host(:not(:is([hydrated],.hydrated))){-webkit-animation-duration:0s;animation-duration:0s;border-color:transparent;-webkit-box-shadow:0 0 0 transparent;box-shadow:0 0 0 transparent;opacity:0;outline-color:transparent;-webkit-transition-delay:0s;transition-delay:0s;-webkit-transition-duration:0s;transition-duration:0s;visibility:hidden}mds-accordion:not(:is([hydrated],.hydrated)),mds-accordion-item:not(:is([hydrated],.hydrated)),mds-accordion-timer:not(:is([hydrated],.hydrated)),mds-accordion-timer-item:not(:is([hydrated],.hydrated)),mds-author:not(:is([hydrated],.hydrated)),mds-avatar:not(:is([hydrated],.hydrated)),mds-badge:not(:is([hydrated],.hydrated)),mds-banner:not(:is([hydrated],.hydrated)),mds-benchmark-bar:not(:is([hydrated],.hydrated)),mds-bibliography:not(:is([hydrated],.hydrated)),mds-breadcrumb:not(:is([hydrated],.hydrated)),mds-breadcrumb-item:not(:is([hydrated],.hydrated)),mds-button:not(:is([hydrated],.hydrated)),mds-card:not(:is([hydrated],.hydrated)),mds-card-content:not(:is([hydrated],.hydrated)),mds-card-footer:not(:is([hydrated],.hydrated)),mds-card-header:not(:is([hydrated],.hydrated)),mds-card-media:not(:is([hydrated],.hydrated)),mds-chip:not(:is([hydrated],.hydrated)),mds-details:not(:is([hydrated],.hydrated)),mds-dropdown:not(:is([hydrated],.hydrated)),mds-entity:not(:is([hydrated],.hydrated)),mds-file:not(:is([hydrated],.hydrated)),mds-file-preview:not(:is([hydrated],.hydrated)),mds-filter:not(:is([hydrated],.hydrated)),mds-filter-item:not(:is([hydrated],.hydrated)),mds-header:not(:is([hydrated],.hydrated)),mds-header-bar:not(:is([hydrated],.hydrated)),mds-help:not(:is([hydrated],.hydrated)),mds-horizontal-scroll:not(:is([hydrated],.hydrated)),mds-hr:not(:is([hydrated],.hydrated)),mds-icon:not(:is([hydrated],.hydrated)),mds-img:not(:is([hydrated],.hydrated)),mds-input:not(:is([hydrated],.hydrated)),mds-input-field:not(:is([hydrated],.hydrated)),mds-input-range:not(:is([hydrated],.hydrated)),mds-input-select:not(:is([hydrated],.hydrated)),mds-input-switch:not(:is([hydrated],.hydrated)),mds-input-tip:not(:is([hydrated],.hydrated)),mds-input-tip-item:not(:is([hydrated],.hydrated)),mds-input-upload:not(:is([hydrated],.hydrated)),mds-keyboard:not(:is([hydrated],.hydrated)),mds-keyboard-key:not(:is([hydrated],.hydrated)),mds-kpi:not(:is([hydrated],.hydrated)),mds-kpi-item:not(:is([hydrated],.hydrated)),mds-label:not(:is([hydrated],.hydrated)),mds-list:not(:is([hydrated],.hydrated)),mds-list-item:not(:is([hydrated],.hydrated)),mds-modal:not(:is([hydrated],.hydrated)),mds-note:not(:is([hydrated],.hydrated)),mds-notification:not(:is([hydrated],.hydrated)),mds-paginator:not(:is([hydrated],.hydrated)),mds-paginator-item:not(:is([hydrated],.hydrated)),mds-pref:not(:is([hydrated],.hydrated)),mds-pref-animation:not(:is([hydrated],.hydrated)),mds-pref-consumption:not(:is([hydrated],.hydrated)),mds-pref-contrast:not(:is([hydrated],.hydrated)),mds-pref-language:not(:is([hydrated],.hydrated)),mds-pref-language-item:not(:is([hydrated],.hydrated)),mds-pref-theme:not(:is([hydrated],.hydrated)),mds-price-table:not(:is([hydrated],.hydrated)),mds-price-table-features:not(:is([hydrated],.hydrated)),mds-price-table-features-cell:not(:is([hydrated],.hydrated)),mds-price-table-features-row:not(:is([hydrated],.hydrated)),mds-price-table-header:not(:is([hydrated],.hydrated)),mds-price-table-list:not(:is([hydrated],.hydrated)),mds-price-table-list-item:not(:is([hydrated],.hydrated)),mds-progress:not(:is([hydrated],.hydrated)),mds-push-notification:not(:is([hydrated],.hydrated)),mds-push-notifications:not(:is([hydrated],.hydrated)),mds-quote:not(:is([hydrated],.hydrated)),mds-separator:not(:is([hydrated],.hydrated)),mds-spinner:not(:is([hydrated],.hydrated)),mds-stepper-bar:not(:is([hydrated],.hydrated)),mds-stepper-bar-item:not(:is([hydrated],.hydrated)),mds-tab:not(:is([hydrated],.hydrated)),mds-tab-bar:not(:is([hydrated],.hydrated)),mds-tab-bar-item:not(:is([hydrated],.hydrated)),mds-tab-item:not(:is([hydrated],.hydrated)),mds-table:not(:is([hydrated],.hydrated)),mds-table-body:not(:is([hydrated],.hydrated)),mds-table-cell:not(:is([hydrated],.hydrated)),mds-table-footer:not(:is([hydrated],.hydrated)),mds-table-header:not(:is([hydrated],.hydrated)),mds-table-header-cell:not(:is([hydrated],.hydrated)),mds-table-row:not(:is([hydrated],.hydrated)),mds-text:not(:is([hydrated],.hydrated)),mds-toast:not(:is([hydrated],.hydrated)),mds-tooltip:not(:is([hydrated],.hydrated)),mds-tree:not(:is([hydrated],.hydrated)),mds-tree-item:not(:is([hydrated],.hydrated)),mds-url-view:not(:is([hydrated],.hydrated)),mds-usage:not(:is([hydrated],.hydrated)),mds-video-wall:not(:is([hydrated],.hydrated)),mds-zero:not(:is([hydrated],.hydrated)){-webkit-animation-duration:0s;animation-duration:0s;border-color:transparent;-webkit-box-shadow:0 0 0 transparent;box-shadow:0 0 0 transparent;opacity:0;outline-color:transparent;-webkit-transition-delay:0s;transition-delay:0s;-webkit-transition-duration:0s;transition-duration:0s;visibility:hidden}';var MdsTextStyle0=mdsTextCss;var MdsText=function(){function t(t){var e=this;registerInstance(this,t);this.cssTextAnimationSpeed=2;this.cssTextAnimationPlaceholderChar=" ";this.randomTextOptions={speed:this.cssTextAnimationSpeed,placeholderChar:this.cssTextAnimationPlaceholderChar,frameOffset:10,charOffset:20,charStep:15};this.animation="none";this.typography="detail";this.animateText=function(t){var a;var o=(a=e.host.shadowRoot)===null||a===void 0?void 0:a.querySelector(".text");e.randomTextOptions.speed=e.cssTextAnimationSpeed;e.randomTextOptions.placeholderChar=e.cssTextAnimationPlaceholderChar;console.info("animateText",e.cssTextAnimationPlaceholderChar);e.randomText=new RandomText(Object.assign({str:t,onProgress:function(t){o.innerHTML=t}},e.randomTextOptions));e.randomText.start()};this.updateCSSCustomProps=function(){if(typeof window==="undefined")return;var t=window.getComputedStyle(e.host);e.cssTextAnimationSpeed=Number(t.getPropertyValue("--mds-text-animation-speed"));var a=t.getPropertyValue("--mds-text-animation-placeholder-char");if(a==='" "'||a==="' '"){e.cssTextAnimationPlaceholderChar=" ";return}e.cssTextAnimationPlaceholderChar=a}}t.prototype.componentWillRender=function(){var t;var e=typographyDefaultsVariant[this.typography].tag;this.tag=(t=this.tag)!==null&&t!==void 0?t:e};t.prototype.componentDidLoad=function(){if(this.animation==="yugop")this.updateCSSCustomProps()};t.prototype.textHandler=function(t){if(this.animation==="none"){return}if(this.randomText){this.randomText.stop()}if(t){this.animateText(t)}};t.prototype.render=function(){return h(Host,{key:"b4e7633d031bd3a64fc985a508cb0ac8b40d18b8"},h(this.tag,{key:"92825cc9501fb91f8e8b13397c707dc47d1177e4",class:"text"},!this.text?h("slot",null):this.text))};Object.defineProperty(t.prototype,"host",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{text:["textHandler"]}},enumerable:false,configurable:true});return t}();MdsText.style=MdsTextStyle0;export{MdsText as mds_text};
|
package/dist/hydrate/index.js
CHANGED
|
@@ -34221,21 +34221,21 @@ class MdsInput {
|
|
|
34221
34221
|
}
|
|
34222
34222
|
render() {
|
|
34223
34223
|
var _a, _b;
|
|
34224
|
-
return (hAsync(Host, { key: '
|
|
34224
|
+
return (hAsync(Host, { key: '6d45a6e848a28e4f548dd7fa35b5ce937b7f25aa' }, this.type === 'number'
|
|
34225
34225
|
&& this.controlsLayout === 'horizontal'
|
|
34226
|
-
&& hAsync("mds-button", { key: '
|
|
34226
|
+
&& hAsync("mds-button", { key: '0384e9d5f042131c7c28fdb1d50a9222e8cf5e0d', class: "counter-button counter-button--horizontal counter-button--decrease", icon: this.controlsIcon === 'arrow' ? miBaselineKeyboardArrowDown : miBaselineRemove, onClick: this.stepDown, tabindex: "0", title: this.t.get('decrease'), part: "counter-button-decrease" }), this.type === 'textarea'
|
|
34227
34227
|
? hAsync("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 })
|
|
34228
34228
|
: hAsync("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.datalistId, 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'
|
|
34229
34229
|
&& this.controlsLayout === 'vertical'
|
|
34230
|
-
&& hAsync("div", { key: '
|
|
34230
|
+
&& hAsync("div", { key: '751cfdc465e5ad26294774105a20e40054d0ca8e', class: "counter counter--vertical" }, hAsync("mds-button", { key: '13350c09d537edf216e553756094b711a48b0e08', class: "counter-button", icon: this.controlsIcon === 'arrow' ? miBaselineKeyboardArrowUp : miBaselineAdd, onClick: this.stepUp, tabindex: "0", title: this.t.get('increase'), part: "counter-button-increase" }), hAsync("mds-button", { key: '6f6a4423ceed21a6675634a39e6ee95599056c40', class: "counter-button", icon: this.controlsIcon === 'arrow' ? miBaselineKeyboardArrowDown : miBaselineRemove, onClick: this.stepDown, tabindex: "0", title: this.t.get('decrease'), part: "counter-button-decrease" })), this.type === 'number'
|
|
34231
34231
|
&& this.controlsLayout === 'horizontal'
|
|
34232
|
-
&& hAsync("mds-button", { key: '
|
|
34233
|
-
&& hAsync("mds-button", { key: '
|
|
34234
|
-
&& hAsync("mds-button", { key: '
|
|
34235
|
-
hAsync("mds-input-tip-item", { key: '
|
|
34236
|
-
hAsync("datalist", { key: '
|
|
34232
|
+
&& hAsync("mds-button", { key: '0f473cb643237ed76fb4f0139772a00ee0f8abcd', class: "counter-button counter-button--horizontal counter-button--increase", icon: this.controlsIcon === 'arrow' ? miBaselineKeyboardArrowUp : miBaselineAdd, onClick: this.stepUp, tabindex: "0", title: this.t.get('increase'), part: "counter-button-increase" }), this.type === 'password'
|
|
34233
|
+
&& hAsync("mds-button", { key: '15be745254d2d8864c0c37c83d8e5628ed23b6c5', 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
|
|
34234
|
+
&& hAsync("mds-button", { key: 'f3c8a952f354a68c461943fce3d85586292b06f2', 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" }), hAsync("mds-input-tip", { key: '46825f67b6af02d703ccc6035cefecb1f23bc1b1', lang: this.language, position: "top", active: this.hasFocus, part: 'tip-top' }, this.disabled && hAsync("mds-input-tip-item", { key: '268436f08a8e3c91407694c5b4d3492dcbb700d5', expanded: true, variant: "disabled" }), this.readonly && hAsync("mds-input-tip-item", { key: 'd01e7052fb7f9be3f7a8d8752782db5aeeb2cf75', expanded: true, variant: "readonly" }), this.required &&
|
|
34235
|
+
hAsync("mds-input-tip-item", { key: '1717e91489cb374911d7181a10eb72c244f18093', expanded: this.hasFocus, variant: this.isValid ? 'required-success' : 'required' })), hAsync("mds-input-tip", { key: '616a3c9170a42b59e682cbb2f75bd237d845df13', lang: this.language, position: "bottom", active: this.hasFocus, part: 'tip-bottom' }, this.tip && hAsync("mds-input-tip-item", { key: 'a535ac2ef3415693d58c03ba0786f4a3b51bb964', expanded: true, variant: "text" }, this.tip), this.maxlength && hAsync("mds-input-tip-item", { key: '522b5f3e1a3380ba65e9b7e49e56274844988009', part: "tip-count", expanded: true, variant: this.countVariant }, this.currentLengthLabel)), this.datalist &&
|
|
34236
|
+
hAsync("datalist", { key: 'cb742a0c5edf17d9357ca9f24e1477baa410e408', id: this.datalistId, class: "datalist" }, this.datalist.map((element, i) => {
|
|
34237
34237
|
return hAsync("option", { key: i, value: element });
|
|
34238
|
-
})), this.icon && !this.await && hAsync("mds-icon", { key: '
|
|
34238
|
+
})), this.icon && !this.await && hAsync("mds-icon", { key: 'ebebe67bfe59337025066e1694d310d4814f3847', class: clsx('icon', this.variant), name: this.icon }), hAsync("mds-spinner", { key: '2b1f07e743294862129f60fb293177c28eff5522', running: this.await, class: clsx('await', this.variant) })));
|
|
34239
34239
|
}
|
|
34240
34240
|
static get formAssociated() { return true; }
|
|
34241
34241
|
get el() { return getElement(this); }
|
|
@@ -36010,8 +36010,15 @@ class MdsInputUpload {
|
|
|
36010
36010
|
event.preventDefault();
|
|
36011
36011
|
};
|
|
36012
36012
|
this.onAdd = (event) => {
|
|
36013
|
-
|
|
36014
|
-
|
|
36013
|
+
if (!event)
|
|
36014
|
+
return;
|
|
36015
|
+
if (event instanceof FileList || Array.isArray(event)) {
|
|
36016
|
+
this.update(this.nativeInput, this.prepareFiles(event));
|
|
36017
|
+
}
|
|
36018
|
+
else {
|
|
36019
|
+
const input = (event.target);
|
|
36020
|
+
this.update(input, this.prepareFiles(input.files));
|
|
36021
|
+
}
|
|
36015
36022
|
};
|
|
36016
36023
|
/**
|
|
36017
36024
|
* Delete single file from upload
|
|
@@ -36063,6 +36070,11 @@ class MdsInputUpload {
|
|
|
36063
36070
|
componentDidLoad() {
|
|
36064
36071
|
this.updateCSSCustomProps();
|
|
36065
36072
|
}
|
|
36073
|
+
updateInitialValue(newValue, oldValue) {
|
|
36074
|
+
if (!oldValue) {
|
|
36075
|
+
this.onAdd(newValue);
|
|
36076
|
+
}
|
|
36077
|
+
}
|
|
36066
36078
|
/**
|
|
36067
36079
|
* Returns a promise of files uploaded as Filelist or null if there's none
|
|
36068
36080
|
*/
|
|
@@ -36101,7 +36113,7 @@ class MdsInputUpload {
|
|
|
36101
36113
|
var _a;
|
|
36102
36114
|
if (!fileList)
|
|
36103
36115
|
return null;
|
|
36104
|
-
const files = Array.from(fileList);
|
|
36116
|
+
const files = fileList instanceof FileList ? Array.from(fileList) : fileList;
|
|
36105
36117
|
const data = new DataTransfer();
|
|
36106
36118
|
// prepare new file added
|
|
36107
36119
|
for (const file of files) {
|
|
@@ -36234,12 +36246,12 @@ class MdsInputUpload {
|
|
|
36234
36246
|
return !!this.sort && this.files.length > 1;
|
|
36235
36247
|
}
|
|
36236
36248
|
render() {
|
|
36237
|
-
return (hAsync(Host, { key: '
|
|
36249
|
+
return (hAsync(Host, { key: '5830e02f67805085aee61166081f9b12d9e6ea97' }, hAsync("div", { key: '492536fb9d00351f117e1983133efe73dedcd8ea', class: "drag-area", onDrop: this.onDropHandler, onDragOver: this.onDragOverHandler, onDragEnter: this.onDragEnterHandler, onDragLeave: this.onDragLeaveHandler, ref: dragArea => this.elDragArea = dragArea }, hAsync("div", { key: 'bbb4a910dc53d7832b7569facc9a058390a73403', class: "main-action" }, hAsync("div", { key: 'f7876514b715bb0c530ee1f949d2bda8d1bde4fc', class: "main-action-icon" }, hAsync("i", { key: '047d44913087109ba95db57398bec18f120842c8', class: "icon", innerHTML: miBaselineAddCircle })), hAsync("mds-text", { key: 'fe62cfa6b2d3a35e41ebeda6c7e4e1582270ef84', animation: this.animateText ? 'yugop' : 'none', variant: "title", typography: "action", text: this.actionTitle })), hAsync("div", { key: 'bf14e1c8a1ff89d12fa7032541d04a810a406352', class: "main-actions" }, hAsync("mds-button", { key: '657247d6c2f8f1d25e2982ce420593967cd3a0e2', variant: 'primary', onClick: () => { var _a; return (_a = this.nativeInput) === null || _a === void 0 ? void 0 : _a.click(); } }, " ", this.files ? this.t.get('addFile', { maxFiles: this.maxFiles }) : this.t.get('selectFile')), this.files.length > 0 && hAsync("mds-button", { key: '4e861024336d3425d638feb4599f576385621cc3', variant: 'error', onClick: this.onReset }, this.t.get('cancel'))), hAsync("div", { key: 'c3b35e02be6dd117168831414f325030284812bf', class: "main-infos" }, hAsync("mds-progress", { key: 'c73783112c3f35cf010827dcc5b4c492bfccf997', "aria-hidden": "true", class: "progress-bar", progress: this.progress }), this.files.length < 1
|
|
36238
36250
|
? hAsync("mds-text", { variant: "info", typography: "caption" }, this.t.get('maxFilesUpload', { maxFiles: this.maxFiles }))
|
|
36239
36251
|
: hAsync("mds-text", { variant: "info", typography: "caption" }, this.maxFiles
|
|
36240
36252
|
? this.t.get('currentFilesWithMax', { currentFiles: this.files.length, maxFiles: this.maxFiles })
|
|
36241
|
-
: this.t.get('currentFilesNoMax', { currentFiles: this.files.length })))), hAsync("input", { key: '
|
|
36242
|
-
hAsync("mds-tab", { key: '
|
|
36253
|
+
: this.t.get('currentFilesNoMax', { currentFiles: this.files.length })))), hAsync("input", { key: 'a909c2b5307c429b7d68a11c9255811cbc3d686c', type: 'file', accept: this.accept, hidden: true, ref: i => this.nativeInput = i, onChange: this.onAdd, multiple: this.maxFiles > 1 }), hAsync("div", { key: 'e4e6d4f611b625082b3fd9ff0efe44af89704e74', class: "additional-infos" }, hAsync("div", { key: '09982468b61a585bd0dedbd81b0e3f7953fad258', class: clsx('file-specs', this.isSortTabShown() && 'file-specs-sort') }, hAsync("mds-text", { key: '2c49035a77a90f6537bcc74a07cecc048824a7b5', variant: "info", typography: "caption" }, this.extensions ? `${this.t.get('canUpload')} ${this.extensions}` : this.t.get('canUploadAll')), hAsync("mds-text", { key: '22a334a6004ed3a749e7d3dae037ff8901fce539', variant: "info", typography: "caption" }, this.t.get('maxFileSizePerFile', { maxFileSize: this.maxFileSize }))), this.isSortTabShown() &&
|
|
36254
|
+
hAsync("mds-tab", { key: 'addbb438bcaeaea6f9eb2a40363de53dc424d5e7', class: "action-sort", onMdsTabChange: event => this.onChangeTab(event.detail) }, hAsync("mds-tab-item", { key: '69fba52d02a2f275efa5418ad1b0039d92402baa', icon: iconSortById, selected: this.userSort === 'date', title: this.t.get('sortByDate'), value: 'date' }), hAsync("mds-tab-item", { key: '3012c8683fea3233439ec1031a3853bca5b87854', icon: iconSortByStatus, selected: this.userSort === 'status', title: this.t.get('sortByStatus'), value: 'status' }))), hAsync("div", { key: '8ca350843850b6301b9c0a4b82fdfe38d920fdcd', class: clsx('file-list', this.files.length > this.cssMinCols && 'file-list--more-items') }, this.files.map(file => {
|
|
36243
36255
|
switch (file.status) {
|
|
36244
36256
|
case Status.ERROR:
|
|
36245
36257
|
return (hAsync("mds-file-preview", { deletable: true, variant: "error", filename: file.file.name, filesize: file.file.size.toString(), onMdsFileDelete: () => this.onCancel(file.key), message: file.errorMessage }));
|
|
@@ -36251,6 +36263,7 @@ class MdsInputUpload {
|
|
|
36251
36263
|
static get formAssociated() { return true; }
|
|
36252
36264
|
get host() { return getElement(this); }
|
|
36253
36265
|
static get watchers() { return {
|
|
36266
|
+
"initialValue": ["updateInitialValue"],
|
|
36254
36267
|
"maxFiles": ["updateActionTitle"]
|
|
36255
36268
|
}; }
|
|
36256
36269
|
static get style() { return MdsInputUploadStyle0; }
|
|
@@ -36262,6 +36275,7 @@ class MdsInputUpload {
|
|
|
36262
36275
|
"maxFileSize": [514, "max-file-size"],
|
|
36263
36276
|
"maxFiles": [514, "max-files"],
|
|
36264
36277
|
"sort": [513],
|
|
36278
|
+
"initialValue": [16],
|
|
36265
36279
|
"language": [32],
|
|
36266
36280
|
"actionTitle": [32],
|
|
36267
36281
|
"files": [32],
|
|
@@ -43132,7 +43146,8 @@ class MdsText {
|
|
|
43132
43146
|
this.tag = (_a = this.tag) !== null && _a !== void 0 ? _a : tag;
|
|
43133
43147
|
}
|
|
43134
43148
|
componentDidLoad() {
|
|
43135
|
-
this.
|
|
43149
|
+
if (this.animation === 'yugop')
|
|
43150
|
+
this.updateCSSCustomProps();
|
|
43136
43151
|
}
|
|
43137
43152
|
textHandler(newValue) {
|
|
43138
43153
|
if (this.animation === 'none') {
|
|
@@ -43146,7 +43161,7 @@ class MdsText {
|
|
|
43146
43161
|
}
|
|
43147
43162
|
}
|
|
43148
43163
|
render() {
|
|
43149
|
-
return (hAsync(Host, { key: '
|
|
43164
|
+
return (hAsync(Host, { key: 'b4e7633d031bd3a64fc985a508cb0ac8b40d18b8' }, hAsync(this.tag, { key: '92825cc9501fb91f8e8b13397c707dc47d1177e4', class: "text" }, !this.text
|
|
43150
43165
|
? hAsync("slot", null)
|
|
43151
43166
|
: this.text)));
|
|
43152
43167
|
}
|