@mgdis/mg-components 6.22.1 → 6.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (139) hide show
  1. package/dist/cjs/{index-Dz2LAZQT.js → index-BEF-cqV9.js} +1 -1
  2. package/dist/cjs/loader.cjs.js +2 -2
  3. package/dist/cjs/mg-action-more_36.cjs.entry.js +178 -79
  4. package/dist/cjs/mg-alert.cjs.entry.js +6 -2
  5. package/dist/cjs/mg-breadcrumb.cjs.entry.js +1 -1
  6. package/dist/cjs/mg-components.cjs.js +3 -3
  7. package/dist/cjs/mg-fieldset.cjs.entry.js +4 -3
  8. package/dist/cjs/mg-input-combobox.cjs.entry.js +10 -8
  9. package/dist/cjs/mg-input-file.cjs.entry.js +5 -4
  10. package/dist/cjs/mg-input-rich-text-editor.cjs.entry.js +8291 -6518
  11. package/dist/cjs/mg-input.conf-wgTh7iBb.js +84 -0
  12. package/dist/cjs/mg-loader.cjs.entry.js +1 -1
  13. package/dist/cjs/mg-progress.cjs.entry.js +2 -2
  14. package/dist/collection/assets/icons/index.js +1 -1
  15. package/dist/collection/collection-manifest.json +1 -1
  16. package/dist/collection/components/atoms/internals/mg-input-title/mg-input-title.js +5 -2
  17. package/dist/collection/components/atoms/mg-badge/mg-badge.js +10 -2
  18. package/dist/collection/components/atoms/mg-button/mg-button.js +3 -1
  19. package/dist/collection/components/atoms/mg-card/mg-card.js +14 -6
  20. package/dist/collection/components/atoms/mg-icon/mg-icon.js +8 -5
  21. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js +7 -2
  22. package/dist/collection/components/molecules/inputs/mg-input/mg-input.js +11 -11
  23. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js +3 -1
  24. package/dist/collection/components/molecules/inputs/mg-input-combobox/mg-input-combobox.js +10 -7
  25. package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js +4 -2
  26. package/dist/collection/components/molecules/inputs/mg-input-file/mg-input-file.js +5 -3
  27. package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js +3 -1
  28. package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js +3 -1
  29. package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js +3 -1
  30. package/dist/collection/components/molecules/inputs/mg-input-rich-text-editor/mg-input-rich-text-editor.js +3 -1
  31. package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js +54 -26
  32. package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js +5 -3
  33. package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js +3 -1
  34. package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js +3 -1
  35. package/dist/collection/components/molecules/internals/mg-item-more/mg-item-more.js +1 -1
  36. package/dist/collection/components/molecules/menus/mg-menu-item/mg-menu-item.js +4 -2
  37. package/dist/collection/components/molecules/mg-action-more/mg-action-more.js +1 -1
  38. package/dist/collection/components/molecules/mg-alert/mg-alert.js +25 -1
  39. package/dist/collection/components/molecules/mg-details/mg-details.js +3 -1
  40. package/dist/collection/components/molecules/mg-fieldset/mg-fieldset.js +3 -1
  41. package/dist/collection/components/molecules/mg-form/mg-form.js +4 -2
  42. package/dist/collection/components/molecules/mg-message/mg-message.js +39 -2
  43. package/dist/collection/components/molecules/mg-modal/mg-modal.js +2 -2
  44. package/dist/collection/components/molecules/mg-panel/mg-panel.js +16 -4
  45. package/dist/collection/components/molecules/mg-popover/mg-popover-content/mg-popover-content.js +1 -1
  46. package/dist/collection/components/molecules/mg-popover/mg-popover.js +10 -2
  47. package/dist/collection/components/molecules/mg-progress/mg-progress.js +1 -1
  48. package/dist/collection/components/molecules/mg-skip-links/mg-skip-links.js +1 -1
  49. package/dist/collection/components/molecules/mg-tabs/mg-tabs.js +1 -1
  50. package/dist/components/index3.js +1 -1
  51. package/dist/components/index4.js +1 -0
  52. package/dist/components/mg-action-more.js +1 -1
  53. package/dist/components/mg-alert.js +1 -1
  54. package/dist/components/mg-badge2.js +1 -1
  55. package/dist/components/mg-breadcrumb.js +1 -1
  56. package/dist/components/mg-button2.js +1 -1
  57. package/dist/components/mg-card2.js +1 -1
  58. package/dist/components/mg-character-left2.js +1 -1
  59. package/dist/components/mg-details.js +1 -1
  60. package/dist/components/mg-divider2.js +1 -1
  61. package/dist/components/mg-fieldset.js +1 -1
  62. package/dist/components/mg-form.js +1 -1
  63. package/dist/components/mg-icon2.js +1 -1
  64. package/dist/components/mg-illustrated-message.js +1 -1
  65. package/dist/components/mg-input-checkbox.js +1 -1
  66. package/dist/components/mg-input-combobox.js +1 -1
  67. package/dist/components/mg-input-date.js +1 -1
  68. package/dist/components/mg-input-file.js +1 -1
  69. package/dist/components/mg-input-numeric.js +1 -1
  70. package/dist/components/mg-input-password.js +1 -1
  71. package/dist/components/mg-input-radio.js +1 -1
  72. package/dist/components/mg-input-rich-text-editor.js +288 -289
  73. package/dist/components/mg-input-select2.js +1 -1
  74. package/dist/components/mg-input-text2.js +1 -1
  75. package/dist/components/mg-input-textarea.js +1 -1
  76. package/dist/components/mg-input-title2.js +1 -1
  77. package/dist/components/mg-input-toggle.js +1 -1
  78. package/dist/components/mg-input2.js +1 -1
  79. package/dist/components/mg-item-more2.js +1 -1
  80. package/dist/components/mg-loader2.js +1 -1
  81. package/dist/components/mg-menu-item2.js +1 -1
  82. package/dist/components/mg-message2.js +1 -1
  83. package/dist/components/mg-modal.js +1 -1
  84. package/dist/components/mg-pagination.js +1 -1
  85. package/dist/components/mg-panel.js +1 -1
  86. package/dist/components/mg-popover-content2.js +1 -1
  87. package/dist/components/mg-popover2.js +1 -1
  88. package/dist/components/mg-progress.js +1 -1
  89. package/dist/components/mg-skip-links.js +1 -1
  90. package/dist/components/mg-table.js +1 -1
  91. package/dist/components/mg-tabs2.js +1 -1
  92. package/dist/components/mg-tooltip2.js +1 -1
  93. package/dist/custom-elements.json +8828 -0
  94. package/dist/esm/{index-C3jUhxdI.js → index-DshvCiTL.js} +1 -1
  95. package/dist/esm/loader.js +3 -3
  96. package/dist/esm/mg-action-more_36.entry.js +178 -79
  97. package/dist/esm/mg-alert.entry.js +6 -2
  98. package/dist/esm/mg-breadcrumb.entry.js +1 -1
  99. package/dist/esm/mg-components.js +4 -4
  100. package/dist/esm/mg-fieldset.entry.js +4 -3
  101. package/dist/esm/mg-input-combobox.entry.js +10 -8
  102. package/dist/esm/mg-input-file.entry.js +5 -4
  103. package/dist/esm/mg-input-rich-text-editor.entry.js +8291 -6518
  104. package/dist/esm/mg-input.conf-DOi9lJXy.js +73 -0
  105. package/dist/esm/mg-loader.entry.js +1 -1
  106. package/dist/esm/mg-progress.entry.js +2 -2
  107. package/dist/mg-components/mg-components.esm.js +1 -1
  108. package/dist/mg-components/{p-c1aeb277.entry.js → p-08d3d957.entry.js} +1 -1
  109. package/dist/mg-components/{p-661da56b.entry.js → p-13feb37a.entry.js} +1 -1
  110. package/dist/mg-components/{p-8e256086.entry.js → p-7c63e469.entry.js} +1 -1
  111. package/dist/mg-components/p-7fd3e519.entry.js +1 -0
  112. package/dist/mg-components/p-9953b835.entry.js +1 -0
  113. package/dist/mg-components/p-9c0a9fc7.entry.js +1657 -0
  114. package/dist/mg-components/p-DOi9lJXy.js +1 -0
  115. package/dist/mg-components/p-a338088e.entry.js +1 -0
  116. package/dist/mg-components/p-cdb01923.entry.js +1 -0
  117. package/dist/mg-components/p-d0b6d8f5.entry.js +1 -0
  118. package/dist/types/assets/icons/index.d.ts +2 -0
  119. package/dist/types/components/atoms/internals/mg-input-title/mg-input-title.d.ts +4 -0
  120. package/dist/types/components/atoms/mg-badge/mg-badge.d.ts +4 -0
  121. package/dist/types/components/molecules/inputs/mg-input-select/mg-input-select.d.ts +12 -6
  122. package/dist/types/components/molecules/mg-alert/mg-alert.d.ts +4 -0
  123. package/dist/types/components/molecules/mg-message/mg-message.d.ts +6 -0
  124. package/dist/types/components.d.ts +22 -0
  125. package/dist/types/stencil-public-runtime.d.ts +1 -0
  126. package/ide/intellij/web-types.json +207 -3472
  127. package/ide/vscode/css-custom-data.json +1 -1
  128. package/ide/vscode/html-custom-data.json +58 -314
  129. package/package.json +32 -27
  130. package/dist/cjs/mg-input.conf-BNpeATnq.js +0 -35
  131. package/dist/esm/mg-input.conf-C9rmNQIL.js +0 -25
  132. package/dist/mg-components/p-06fbdb2f.entry.js +0 -1
  133. package/dist/mg-components/p-188b9ca9.entry.js +0 -1
  134. package/dist/mg-components/p-4667078d.entry.js +0 -1
  135. package/dist/mg-components/p-5a859ecf.entry.js +0 -1658
  136. package/dist/mg-components/p-C9rmNQIL.js +0 -1
  137. package/dist/mg-components/p-b0b8c58f.entry.js +0 -1
  138. package/dist/mg-components/p-bbcef41c.entry.js +0 -1
  139. /package/dist/mg-components/{p-C3jUhxdI.js → p-DshvCiTL.js} +0 -0
@@ -0,0 +1 @@
1
+ import{r as i,c as t,h as e,a as s}from"./p-DshvCiTL.js";import{C as r,b as o,t as n,i as a,c as h}from"./p-C7xjtdiw.js";import{a as l,n as p}from"./p-DOi9lJXy.js";import{l as c,i as m}from"./p-DSEloqPn.js";const g=class{constructor(s){i(this,s),this.valueChange=t(this,"value-change",7),this.inputValid=t(this,"input-valid",7),this.hasDisplayedError=!1,this.customErrorMessage={lock:!1},this.name=this.identifier,this.labelOnTop=!1,this.labelHide=!1,this.multiple=!1,this.required=!1,this.disabled=!1,this.tooltipPosition="input",this.classCollection=new r(["mg-c-input--file"]),this.files=[],this.setValidity=i=>{const t=this.valid;this.customErrorMessage.lock&&(void 0===this.customErrorMessage.message||i)||(this.valid=i),this.invalid=!this.valid,(void 0===this.handlerInProgress||"blur"===this.handlerInProgress&&this.valid!==t)&&this.inputValid.emit(this.valid)},this.handleInputChange=i=>{this.checkValidity(),this.hasDisplayedError&&this.setErrorMessage(),this.files=Array.from(i.target.files),this.fileButtonElement.focus()},this.handleInputFocus=()=>{this.fileButtonElement.dataset.focusVisible=""},this.handleInputBlur=()=>{this.handlerInProgress="blur",this.displayError().finally((()=>{this.handlerInProgress=void 0})),delete this.fileButtonElement.dataset.focusVisible},this.handleButtonBlur=()=>{this.inputElement.blur()},this.handleButtonClick=()=>{this.inputElement.click()},this.checkValidity=()=>{this.setValidity(this.disabled||!this.isMaxSizeExceeded()&&this.inputElement.checkValidity())},this.handleDeleteFileClick=()=>{this.files=[],this.fileButtonElement.focus()},this.setErrorMessage=(i=!1)=>{this.errorMessage=void 0,this.valid||(i||this.customErrorMessage.lock&&void 0!==this.customErrorMessage.message?this.errorMessage=this.customErrorMessage.message:this.isMaxSizeExceeded()?this.errorMessage=this.messages.input.file.errors.maxSize.replace("{{maxSize}}",c(this.maxSize,this.locale)):this.inputElement.validity.valueMissing&&(this.errorMessage=this.messages.errors.required))},this.isMaxSizeExceeded=()=>this.maxSize>=0&&this.files.some((i=>i.size>this.maxSize)),this.renderFiles=()=>{const i=`${this.identifier}-file-list`,t=i=>e("span",{class:"mg-c-input__file-item-name"},i.name,i.size>0?e("span",{class:"mg-c-input__file-item-size"},` ${c(i.size,this.locale)}`):void 0),s=()=>e("mg-button",{variant:"flat",class:"mg-c-input__file-delete-button","is-icon":!0,label:this.messages.input.file.deleteButton,type:"button",disabled:this.disabled,"aria-controls":[this.identifier,i].join(" "),onClick:this.handleDeleteFileClick},e("mg-icon",{icon:"cross"}));return 0===this.files.length?null:1===this.files.length?e("div",{class:"mg-c-input__file-item"},t(this.files[0]),s()):e("div",{class:"mg-c-input__file-list-container"},e("ul",{role:"list",class:"mg-c-input__file-list",id:i},Array.from(this.files).map(((i,s)=>e("li",{class:"mg-c-input__file-item",key:`${i.name}-${s}`},t(i))))),s())}}watchValue(i){if(o(i))this.files=this.value.map((i=>new File([],i)));else if(t=i,Array.isArray(t)&&t.every((i=>h(i)&&"string"==typeof i.name&&"number"==typeof i.size)))this.files=this.value;else{if(void 0!==i)throw new Error(`<mg-input-file> prop "value" must be an array of strings or File objects. Passed value: ${n(i)}.`);this.files=[]}var t;this.valueChange.emit(i)}watchMultiple(){if(!1===this.multiple&&this.files.length>1)throw new Error('<mg-input-file> prop "value" must be a single file when prop "multiple" is set to false.')}watchAccept(i){if(void 0!==i&&!a(i))throw new Error('<mg-input-file> prop "accept" must be a valid string.')}handleValidityChange(i,t,e){void 0!==this.inputElement&&(this.inputElement[e]=i,this.checkValidity(),this.hasDisplayedError&&(this.setErrorMessage(),this.hasDisplayedError=!1))}watchDisabled(i){i?this.classCollection.add(l):this.classCollection.delete(l)}watchHelpText(){if(!a(this.helpText)){const i=[];void 0!==this.maxSize&&i.push(this.messages.input.file.helpText.maxSize.replace("{{maxSize}}",c(this.maxSize,this.locale))),void 0!==this.accept&&i.push(this.messages.input.file.helpText.accept.replace("{{accept}}",this.accept)),this.helpText=i.join(". ")}}watchFiles(i,t){n(i)!==n(t)&&(this.value=i.length>0?i:void 0)}async setFocus(){this.fileButtonElement.focus()}displayError(){return new Promise((i=>{requestAnimationFrame((()=>{this.checkValidity(),this.setErrorMessage(),this.hasDisplayedError=this.invalid,i()}))}))}async setError(i,t,e=!1){if("boolean"!=typeof i)throw new Error('<mg-input-file> method "setError()" param "valid" must be a boolean.');if(void 0!==t&&!a(t))throw new Error('<mg-input-file> method "setError()" param "errorMessage" must be a string.');this.customErrorMessage={lock:!i&&e,message:i?void 0:t},this.setValidity(i),this.setErrorMessage(!0),this.hasDisplayedError=this.invalid}async reset(){return this.files=[],new Promise((i=>{requestAnimationFrame((()=>{this.customErrorMessage={lock:!1},this.checkValidity(),this.errorMessage=void 0,this.hasDisplayedError=!1,i()}))}))}componentWillLoad(){const i=m(this.element);return this.locale=i.locale,this.messages=i.messages,p(this),this.watchValue(this.value),this.watchDisabled(this.disabled),this.watchHelpText(),this.watchAccept(this.accept),this.watchMultiple(),setTimeout((()=>{this.checkValidity()}),0)}render(){return e("mg-input",{key:"0ca01b9b4697f55406262e93438946c2fe12e5f5",label:this.label,identifier:this.identifier,class:this.classCollection.join(),labelOnTop:this.labelOnTop,labelHide:this.labelHide,required:this.required,tooltip:this.tooltip,tooltipPosition:this.tooltipPosition,helpText:this.helpText,errorMessage:this.errorMessage},e("div",{key:"99fe30d5339687054392ca2fd8773af76af35396",class:"mg-c-input__file-container"},e("input",{key:"84d9bee62d4c0c5975b561cc3e261905c759556f",name:this.name,id:this.identifier,class:"mg-u-visually-hidden",type:"file",multiple:!0===this.multiple,capture:this.capture,accept:this.accept,disabled:this.disabled,required:0===this.files.length&&this.required,onFocus:this.handleInputFocus,onBlur:this.handleInputBlur,onChange:this.handleInputChange,"aria-invalid":(!0===this.invalid).toString(),ref:i=>{this.inputElement=i}}),e("mg-button",{key:"1b6694f7c36fa2c8a2c5347d93a9cb07678e9363",variant:"secondary",class:"mg-c-input__file-button",type:"button",disabled:this.disabled,onClick:this.handleButtonClick,onBlur:this.handleButtonBlur,tabindex:"-1",ref:i=>{this.fileButtonElement=i}},this.messages.input.file.browse),this.renderFiles()))}get element(){return s(this)}static get watchers(){return{value:[{watchValue:0},{watchMultiple:0}],multiple:[{watchMultiple:0}],accept:[{watchAccept:0},{watchHelpText:0}],required:[{handleValidityChange:0}],disabled:[{handleValidityChange:0},{watchDisabled:0}],helpText:[{watchHelpText:0}],maxSize:[{watchHelpText:0}],files:[{watchFiles:0}]}}};g.style=".mg-c-input__readonly-value{min-height:var(--mg-b-font-size);align-self:flex-start;margin-top:calc((var(--mg-b-size-min-height) - var(--mg-b-font-size)*var(--mg-b-line-height))/2);overflow-wrap:anywhere}.mg-c-input__box{height:var(--mg-b-size-min-height);box-sizing:border-box;padding:calc((var(--mg-b-size-min-height) - var(--mg-b-font-size)*var(--mg-b-line-height))/2) var(--mg-b-size-8);border-width:var(--mg-c-input-border-width);border-style:solid;border-color:var(--mg-c-input-color-border);border-radius:var(--mg-c-input-border-radius);background-color:var(--mg-b-color-light);color:var(--mg-b-color-dark);font-family:inherit;font-size:var(--mg-b-font-size);text-align:var(--mg-c-input-text-align, left)}.mg-c-input__box::placeholder{color:var(--mg-c-input-placeholder-color-text);font-style:italic}.mg-c-input__box:focus{box-shadow:0 0 var(--mg-b-size-4) var(--mg-c-input-color-box-shadow-focus)}.mg-c-input__box:disabled{opacity:var(--mg-b-opacity-element-disabled)}.mg-c-input.mg-c-input--has-error .mg-c-input__box{border-color:var(--mg-b-color-danger)}.mg-c-input.mg-c-input--is-input-group-append{--mg-c-button-border-radius-top-left:0;--mg-c-button-border-radius-bottom-left:0}.mg-c-input.mg-c-input--is-input-group-append .mg-c-input__box{margin-right:calc(-1*var(--mg-b-size-border));border-bottom-right-radius:0;border-top-right-radius:0}.mg-c-input.mg-c-input--is-input-group-append .mg-c-input__box:focus-visible{outline-offset:-0.2rem;outline-style:solid;outline-width:.2rem}.mg-c-input.mg-c-input--has-buttons-group-append ::slotted([slot=append-input]){--mg-c-button-border-radius-top-right:0;--mg-c-button-border-radius-bottom-right:0}.mg-c-input.mg-c-input--has-buttons-group-append ::slotted([slot=append-input]:not(:last-of-type)){--mg-c-button-border-right-width:0}.mg-c-input.mg-c-input--has-buttons-group-append ::slotted([slot=append-input]:last-of-type){--mg-c-button-border-radius-top-right:var(--mg-c-input-border-radius);--mg-c-button-border-radius-bottom-right:var(--mg-c-input-border-radius)}.mg-c-input.mg-c-input--is-append-input-slot-content:not(.mg-c-input--readonly) ::slotted([slot=append-input]){align-self:start;padding-top:calc((var(--mg-b-size-min-height) - var(--mg-b-size-16))/2)}.mg-c-input.mg-c-input--has-icon .mg-c-input__input-group-container{position:relative}.mg-c-input.mg-c-input--has-icon .mg-c-input__input-group-container>mg-icon:first-of-type{position:absolute;top:50%;left:var(--mg-b-size-8);color:var(--mg-c-input-color-icon);transform:translateY(-50%)}.mg-c-input.mg-c-input--has-icon .mg-c-input__input-group-container .mg-c-input__box{padding-left:calc(var(--mg-b-size-16) + var(--mg-b-size-8)*2)}.mg-u-visually-hidden{position:absolute !important;overflow:hidden !important;width:.1rem !important;height:.1rem !important;padding:0 !important;border:0 !important;margin:-0.1rem !important;clip:rect(0.1rem, 0.1rem, 0.1rem, 0.1rem) !important;clip-path:inset(50%) !important;white-space:nowrap !important}*:focus:not(:focus-visible){outline:none}@media (prefers-reduced-motion){*{animation:none !important;transition:none !important}}.mg-c-input__file-container{display:flex;flex-direction:column;gap:var(--mg-b-size-8)}.mg-c-input__file-item{display:inline-flex;min-height:var(--mg-b-size-min-height);align-items:center;padding-left:var(--mg-b-size-8);background-color:var(--mg-b-color-neutral-10);font-weight:600;gap:var(--mg-b-size-8)}.mg-c-input__file-item-name{word-break:break-all}.mg-c-input__file-item-size{color:var(--mg-b-color-neutral-90);font-weight:400;word-break:normal}.mg-c-input__file-delete-button{align-self:flex-start}.mg-c-input__file-list{display:flex;flex-direction:column;padding:0;margin:0;gap:var(--mg-b-size-4);list-style:none}.mg-c-input__file-list .mg-c-input__file-item{min-height:unset;padding:var(--mg-b-size-8)}.mg-c-input__file-list-container{position:relative;padding:var(--mg-b-size-8) calc(var(--mg-b-size-8) + var(--mg-b-size-min-height)) var(--mg-b-size-8) var(--mg-b-size-8);border:var(--mg-b-size-border) solid var(--mg-b-color-neutral-30);border-radius:var(--mg-b-size-4)}.mg-c-input__file-list-container .mg-c-input__file-delete-button{position:absolute;top:0;right:0}";export{g as mg_input_file}
@@ -0,0 +1 @@
1
+ import{r as t,c as s,f as i,h as e,a}from"./p-DshvCiTL.js";import{C as h,t as o}from"./p-C7xjtdiw.js";import{i as n}from"./p-DSEloqPn.js";const r=["info","warning","success","danger"],c=["bar-left","background"],l=class{constructor(i){t(this,i),this.componentShow=s(this,"component-show",3),this.componentHide=s(this,"component-hide",3),this.componentClose=s(this,"component-close",3),this.classCloseButton="mg-c-alert--close-button",this.storedTimer=null,this.isFocused=!1,this.isHovered=!1,this.variant="info",this.variantStyle="bar-left",this.fullWidth=!1,this.classCollection=new h(["mg-c-alert"]),this.hasActions=!1,this.setTimer=()=>{this.storedTimer=setTimeout((()=>this.element.hidden=!0),1e3*this.delay)},this.clearTimer=()=>{clearTimeout(this.storedTimer)},this.timerEvents=t=>{this.clearTimer();const s="mouseenter"===t.type;this[s?"isHovered":"isFocused"]=!0,this.element.addEventListener(s?"mouseleave":"focusout",(t=>{this["mouseleave"===t.type?"isHovered":"isFocused"]=!1,this.isFocused||this.isHovered||this.setTimer()}),{once:!0})},this.handleClose=()=>{this.element.hidden=!0,this.componentClose.emit()}}watchDelay(t){if(void 0!==t&&t<2)throw new Error(`<mg-alert> prop "delay" must be greater than 2 seconds. Passed value: ${o(t)}.`)}watchVariant(t){if(t&&!r.includes(t))throw new Error(`<mg-alert> prop "variant" must be one of: ${r.join(", ")}. Passed value: ${o(t)}.`)}watchVariantStyle(t){if(t&&!c.includes(t))throw new Error(`<mg-alert> prop "variantStyle" must be one of: ${c.join(", ")}. Passed value: ${o(t)}.`)}watchHidden(t){"string"==typeof t&&""===t&&(t=!0),t?(this.componentHide.emit(),["focusin","mouseenter"].forEach((t=>{this.element.removeEventListener(t,this.timerEvents)})),this.clearTimer()):(this.componentShow.emit(),this.delay>1&&(this.setTimer(),["focusin","mouseenter"].forEach((t=>{this.element.addEventListener(t,this.timerEvents)})))),i(this)}componentWillLoad(){this.messages=n(this.element).messages,this.watchVariant(this.variant),this.watchVariantStyle(this.variantStyle),this.watchDelay(this.delay),this.watchHidden(this.element.hidden),this.hasActions=null!==this.element.querySelector('[slot="actions"]'),this.hasActions||this.classCollection.add(this.classCloseButton)}render(){return e("mg-message",{key:"8d10696cd86b00304d8ae409e36691a41a16702e",class:this.classCollection.join(),role:["info","success"].includes(this.variant)?"status":"alert",variant:this.variant,variantStyle:this.variantStyle,fullWidth:this.fullWidth},e("slot",{key:"598a86d657b77006f5a9e9dbf33e7969669be125"}),this.hasActions?e("span",{slot:"actions"},e("slot",{name:"actions"})):e("span",{class:"mg-c-alert__close-button"},e("mg-button",{"is-icon":!0,variant:"flat",label:this.messages.alert.closeButton,onClick:this.handleClose},e("mg-icon",{icon:"cross"}))))}get element(){return a(this)}static get watchers(){return{delay:[{watchDelay:0}],variant:[{watchVariant:0}],variantStyle:[{watchVariantStyle:0}],hidden:[{watchHidden:0}]}}};l.style=".mg-c-alert__close-button{position:absolute;top:0;right:0}.mg-c-alert.mg-c-alert--close-button{--mg-c-card-spacing:0 var(--mg-b-size-min-height) 0 0}";export{l as mg_alert}
@@ -132,6 +132,8 @@ export declare const icons: {
132
132
  'folders-outline': string;
133
133
  gavel: string;
134
134
  'gavel-outline': string;
135
+ glitters: string;
136
+ 'glitters-outline': string;
135
137
  'graduation-cap': string;
136
138
  'graduation-cap-outline': string;
137
139
  'hand-euro': string;
@@ -2,6 +2,10 @@
2
2
  * @internal
3
3
  */
4
4
  export declare class MgInputTitle {
5
+ /**
6
+ * Get component DOM element
7
+ */
8
+ element: HTMLMgInputTitleElement;
5
9
  /**
6
10
  * Label input id
7
11
  */
@@ -8,6 +8,10 @@ export declare class MgBadge {
8
8
  /**************
9
9
  * Decorators *
10
10
  **************/
11
+ /**
12
+ * Get component DOM element
13
+ */
14
+ element: HTMLMgBadgeElement;
11
15
  /**
12
16
  * Badge value
13
17
  */
@@ -159,15 +159,20 @@ export declare class MgInputSelect {
159
159
  */
160
160
  private setValidity;
161
161
  /**
162
- * Handle input event
162
+ * Get the rendered options as a flat list, in render order
163
+ * The select value is the position of an option in this list, so it uniquely identifies an option even when several share the same title
164
+ * @returns flat select options
163
165
  */
164
- private handleInput;
166
+ private getOptions;
167
+ /**
168
+ * Get the option matching the current select value
169
+ * @returns matching option or undefined
170
+ */
171
+ private getSelectedOption;
165
172
  /**
166
- * Method to compare item with input.value
167
- * @param item - item to compare with
168
- * @returns truthy if input.value is an item
173
+ * Handle input event
169
174
  */
170
- private isInputValue;
175
+ private handleInput;
171
176
  /**
172
177
  * Handle blur event
173
178
  */
@@ -197,6 +202,7 @@ export declare class MgInputSelect {
197
202
  /**
198
203
  * Render option
199
204
  * @param option - to render
205
+ * @param index - option position in the flat list of rendered options, used as the option value
200
206
  * @returns render option
201
207
  */
202
208
  private renderOption;
@@ -37,6 +37,10 @@ export declare class MgAlert {
37
37
  */
38
38
  variantStyle?: VariantStyleType;
39
39
  watchVariantStyle(newValue: MgAlert['variantStyle']): void;
40
+ /**
41
+ * Define if alert fits its parent element
42
+ */
43
+ fullWidth: boolean;
40
44
  /**
41
45
  * Watch hidden prop
42
46
  */
@@ -9,6 +9,7 @@ export declare class MgMessage {
9
9
  * Internal *
10
10
  ************/
11
11
  private readonly classBase;
12
+ private readonly classFullWidth;
12
13
  /**************
13
14
  * Decorators *
14
15
  **************/
@@ -26,6 +27,11 @@ export declare class MgMessage {
26
27
  */
27
28
  variantStyle: VariantStyleType;
28
29
  watchVariantStyle(newValue: MgMessage['variantStyle'], oldValue?: MgMessage['variantStyle']): void;
30
+ /**
31
+ * Define if message fits its parent element
32
+ */
33
+ fullWidth: boolean;
34
+ watchFullWidth(newValue: MgMessage['fullWidth']): void;
29
35
  /**
30
36
  * Component classes
31
37
  */
@@ -97,6 +97,11 @@ export namespace Components {
97
97
  * Add a delay to hide/close message when it passed Value is defined in seconds and must greater than 2 seconds
98
98
  */
99
99
  "delay"?: number;
100
+ /**
101
+ * Define if alert fits its parent element
102
+ * @default false
103
+ */
104
+ "fullWidth": boolean;
100
105
  /**
101
106
  * Define variant
102
107
  * @default 'info'
@@ -1820,6 +1825,11 @@ export namespace Components {
1820
1825
  "target"?: TargetType;
1821
1826
  }
1822
1827
  interface MgMessage {
1828
+ /**
1829
+ * Define if message fits its parent element
1830
+ * @default false
1831
+ */
1832
+ "fullWidth": boolean;
1823
1833
  /**
1824
1834
  * Define variant
1825
1835
  * @default 'info'
@@ -2831,6 +2841,11 @@ declare namespace LocalJSX {
2831
2841
  * Add a delay to hide/close message when it passed Value is defined in seconds and must greater than 2 seconds
2832
2842
  */
2833
2843
  "delay"?: number;
2844
+ /**
2845
+ * Define if alert fits its parent element
2846
+ * @default false
2847
+ */
2848
+ "fullWidth"?: boolean;
2834
2849
  /**
2835
2850
  * Emmited event when alert is closed
2836
2851
  */
@@ -4452,6 +4467,11 @@ declare namespace LocalJSX {
4452
4467
  "target"?: TargetType;
4453
4468
  }
4454
4469
  interface MgMessage {
4470
+ /**
4471
+ * Define if message fits its parent element
4472
+ * @default false
4473
+ */
4474
+ "fullWidth"?: boolean;
4455
4475
  /**
4456
4476
  * Define variant
4457
4477
  * @default 'info'
@@ -4790,6 +4810,7 @@ declare namespace LocalJSX {
4790
4810
  "delay": number;
4791
4811
  "variant": VariantType;
4792
4812
  "variantStyle": VariantStyleType;
4813
+ "fullWidth": boolean;
4793
4814
  }
4794
4815
  interface MgBadgeAttributes {
4795
4816
  "value": string;
@@ -5144,6 +5165,7 @@ declare namespace LocalJSX {
5144
5165
  interface MgMessageAttributes {
5145
5166
  "variant": VariantType;
5146
5167
  "variantStyle": VariantStyleType;
5168
+ "fullWidth": boolean;
5147
5169
  }
5148
5170
  interface MgModalAttributes {
5149
5171
  "identifier": string;
@@ -1070,6 +1070,7 @@ export declare namespace JSXBase {
1070
1070
  importance?: 'low' | 'auto' | 'high';
1071
1071
  height?: number | string;
1072
1072
  loading?: 'lazy' | 'auto' | 'eager';
1073
+ referrerPolicy?: ReferrerPolicy;
1073
1074
  sizes?: string;
1074
1075
  src?: string;
1075
1076
  srcSet?: string;