@mgdis/mg-components 6.25.0 → 6.27.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 (95) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/mg-action-more_36.cjs.entry.js +217 -95
  3. package/dist/cjs/mg-components.cjs.js +1 -1
  4. package/dist/cjs/mg-illustration.cjs.entry.js +1 -1
  5. package/dist/cjs/mg-input-combobox.cjs.entry.js +25 -7
  6. package/dist/cjs/mg-input-file.cjs.entry.js +1 -1
  7. package/dist/cjs/mg-input-rich-text-editor.cjs.entry.js +1595 -637
  8. package/dist/cjs/mg-loader.cjs.entry.js +1 -1
  9. package/dist/cjs/mg-progress.cjs.entry.js +1 -1
  10. package/dist/collection/assets/illustrations/index.js +1 -1
  11. package/dist/collection/assets/jodit/jodit.css +5834 -0
  12. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js +103 -55
  13. package/dist/collection/components/molecules/inputs/mg-input/mg-input.js +39 -4
  14. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js +2 -4
  15. package/dist/collection/components/molecules/inputs/mg-input-combobox/mg-input-combobox.js +24 -6
  16. package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js +3 -2
  17. package/dist/collection/components/molecules/inputs/mg-input-rich-text-editor/editor/custom-properties.css +50 -0
  18. package/dist/collection/components/molecules/inputs/mg-input-rich-text-editor/mg-input-rich-text-editor.js +3 -3
  19. package/dist/collection/components/molecules/mg-details/mg-details.js +5 -1
  20. package/dist/collection/components/molecules/mg-form/mg-form.js +10 -2
  21. package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.conf.js +4 -0
  22. package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.js +51 -2
  23. package/dist/collection/components/molecules/mg-loader/mg-loader.js +1 -1
  24. package/dist/collection/components/molecules/mg-message/mg-message.js +3 -3
  25. package/dist/collection/components/molecules/mg-modal/mg-modal.js +2 -2
  26. package/dist/collection/components/molecules/mg-panel/mg-panel.js +1 -1
  27. package/dist/collection/components/molecules/mg-popover/mg-popover-content/mg-popover-content.js +1 -1
  28. package/dist/collection/components/molecules/mg-popover/mg-popover.js +4 -1
  29. package/dist/collection/components/molecules/mg-progress/mg-progress.js +1 -1
  30. package/dist/collection/components/molecules/mg-skip-links/mg-skip-links.js +1 -1
  31. package/dist/collection/components/molecules/mg-tabs/mg-tabs.js +1 -1
  32. package/dist/components/mg-button2.js +1 -1
  33. package/dist/components/mg-card2.js +1 -1
  34. package/dist/components/mg-details.js +1 -1
  35. package/dist/components/mg-form.js +1 -1
  36. package/dist/components/mg-illustrated-message.js +1 -1
  37. package/dist/components/mg-illustration.js +1 -1
  38. package/dist/components/mg-input-checkbox.js +1 -1
  39. package/dist/components/mg-input-combobox.js +1 -1
  40. package/dist/components/mg-input-date.js +1 -1
  41. package/dist/components/mg-input-file.js +1 -1
  42. package/dist/components/mg-input-numeric.js +1 -1
  43. package/dist/components/mg-input-password.js +1 -1
  44. package/dist/components/mg-input-radio.js +1 -1
  45. package/dist/components/mg-input-rich-text-editor.js +282 -282
  46. package/dist/components/mg-input-select2.js +1 -1
  47. package/dist/components/mg-input-text2.js +1 -1
  48. package/dist/components/mg-input-textarea.js +1 -1
  49. package/dist/components/mg-input-toggle.js +1 -1
  50. package/dist/components/mg-input2.js +1 -1
  51. package/dist/components/mg-loader2.js +1 -1
  52. package/dist/components/mg-menu-item2.js +1 -1
  53. package/dist/components/mg-message2.js +1 -1
  54. package/dist/components/mg-modal.js +1 -1
  55. package/dist/components/mg-panel.js +1 -1
  56. package/dist/components/mg-popover-content2.js +1 -1
  57. package/dist/components/mg-popover2.js +1 -1
  58. package/dist/components/mg-progress.js +1 -1
  59. package/dist/components/mg-skip-links.js +1 -1
  60. package/dist/components/mg-tabs2.js +1 -1
  61. package/dist/components/mg-tooltip2.js +1 -1
  62. package/dist/custom-elements.json +19 -0
  63. package/dist/esm/loader.js +1 -1
  64. package/dist/esm/mg-action-more_36.entry.js +217 -95
  65. package/dist/esm/mg-components.js +1 -1
  66. package/dist/esm/mg-illustration.entry.js +1 -1
  67. package/dist/esm/mg-input-combobox.entry.js +25 -7
  68. package/dist/esm/mg-input-file.entry.js +1 -1
  69. package/dist/esm/mg-input-rich-text-editor.entry.js +1595 -637
  70. package/dist/esm/mg-loader.entry.js +1 -1
  71. package/dist/esm/mg-progress.entry.js +1 -1
  72. package/dist/mg-components/mg-components.esm.js +1 -1
  73. package/dist/mg-components/{p-3ad7441c.entry.js → p-32a55ddb.entry.js} +1 -1
  74. package/dist/mg-components/p-6f492676.entry.js +1667 -0
  75. package/dist/mg-components/p-813d69c7.entry.js +1 -0
  76. package/dist/mg-components/p-85ebacd6.entry.js +1 -0
  77. package/dist/mg-components/p-a2445605.entry.js +1 -0
  78. package/dist/mg-components/{p-96fc508e.entry.js → p-c2beff2c.entry.js} +1 -1
  79. package/dist/mg-components/p-f308e2e4.entry.js +1 -0
  80. package/dist/types/components/atoms/mg-tooltip/mg-tooltip.d.ts +33 -6
  81. package/dist/types/components/molecules/inputs/mg-input/mg-input.d.ts +2 -1
  82. package/dist/types/components/molecules/inputs/mg-input-combobox/mg-input-combobox.d.ts +11 -0
  83. package/dist/types/components/molecules/mg-form/mg-form.d.ts +4 -0
  84. package/dist/types/components/molecules/mg-illustrated-message/mg-illustrated-message.conf.d.ts +8 -0
  85. package/dist/types/components/molecules/mg-illustrated-message/mg-illustrated-message.d.ts +9 -1
  86. package/dist/types/components.d.ts +13 -2
  87. package/ide/intellij/web-types.json +12 -2
  88. package/ide/vscode/html-custom-data.json +26 -1
  89. package/package.json +20 -20
  90. package/dist/collection/components/molecules/inputs/mg-input-rich-text-editor/editor/custom-properties.scss +0 -212
  91. package/dist/mg-components/p-4693077a.entry.js +0 -1
  92. package/dist/mg-components/p-5dff879a.entry.js +0 -1
  93. package/dist/mg-components/p-b20f3698.entry.js +0 -1
  94. package/dist/mg-components/p-ec4bd337.entry.js +0 -1667
  95. package/dist/mg-components/p-f8e58181.entry.js +0 -1
@@ -0,0 +1 @@
1
+ import{r as t,c as i,h as s,a as o}from"./p-D4bO_UCn.js";import{P as e,C as n,t as a,a as h,n as r,g as c,b as p,i as m,c as u,f as l,d as g}from"./p-91BOpzAB.js";import{c as d,a as b,w as v,n as f}from"./p-DOi9lJXy.js";import{i as w}from"./p-BfblyCaJ.js";import{K as _}from"./p-yMGqY8YG.js";const x=t=>t&&"object"==typeof t&&"string"==typeof t.title&&void 0!==t.value,y=class{constructor(s){t(this,s),this.valueChange=i(this,"value-change",7),this.filterChange=i(this,"filter-change",7),this.showMore=i(this,"load-more",7),this.inputValid=i(this,"input-valid",7),this.fetchError=i(this,"fetch-error",7),this.hasDisplayedError=!1,this.customErrorMessage={lock:!1},this.name=this.identifier,this.labelOnTop=!1,this.labelHide=!1,this.required=!1,this.readonly=!1,this.disabled=!1,this.mgWidth="full",this.popoverPlacement="bottom-start",this.tooltipPosition="input",this.options=new e([]),this.filter="",this.classCollection=new n(["mg-c-input--combobox","mg-c-input--has-icon","mg-c-input--input-append"]),this.popoverDisplay=!1,this.handleOptionClick=t=>{this.setValue(this.options.items.find((i=>a(i.value)===t.target.dataset.value))),this.popoverDisplay=!1},this.handleResetButton=t=>{t.stopPropagation(),this.reset().then((()=>{this.input.focus()}))},this.handlePopoverDisplay=t=>{this.popoverDisplay=t.detail},this.handleFilterInput=()=>{this.checkValidity(),this.hasDisplayedError&&this.setErrorMessage(),this.popoverDisplay||(this.popoverDisplay=!0),this.debounce||(this.debounce=!0,setTimeout((()=>{this.filter=this.input.value,this.debounce=!1}),250))},this.handleFilterBlur=t=>{this.popoverDisplay?(t.stopImmediatePropagation(),this.input.focus()):(this.handlerInProgress="blur",this.displayError().finally((()=>{this.handlerInProgress=void 0})))},this.handleFilterFocus=()=>{this.isLoading||(this.option=null)},this.handleLoadMoreButton=()=>{this.loadingWrapper({name:"load-more",cursor:h.NEXT}).then((()=>{this.input.focus()}))},this.handleFilterKeydown=t=>{var i;if(this.disabled||t.ctrlKey||t.shiftKey)return;let s=!1;switch(t.key){case _.TAB:case _.ENTER:{s=t.key===_.ENTER;const o=null!==(i=this.option)&&void 0!==i?i:this.options.items.find(this.isCurrentOption);this.popoverDisplay&&this.setValue(o),this.popoverDisplay=!1;break}case _.DOWN:case _.ARROWDOWN:case _.UP:case _.ARROWUP:{if(s=!0,this.isLoading||0===this.page.total){this.popoverDisplay=!0;break}if(Boolean(t.altKey)&&[_.DOWN,_.ARROWDOWN].includes(t.key)){this.popoverDisplay=!0;break}let i;const o=this.popoverDisplay&&x(this.option);[_.DOWN,_.ARROWDOWN].includes(t.key)?i=o?h.NEXT:h.FIRST:[_.UP,_.ARROWUP].includes(t.key)&&(i=o?h.PREVIOUS:h.LAST),this.loadingWrapper({name:"scroll",cursor:i}),this.popoverDisplay=!0;break}case _.LEFT:case _.ARROWLEFT:case _.HOME:case _.RIGHT:case _.ARROWRIGHT:case _.END:{if(!x(this.option))break;let i;s=!0,this.option=null,_.HOME===t.key?i=0:_.END===t.key&&(i=this.filter.length),"number"==typeof i&&this.input.setSelectionRange(i,i);break}case _.ESC:case _.ESCAPE:s=!0,this.popoverDisplay?this.popoverDisplay=!1:(this.setValue(null),this.filter="",this.option=null);break;default:this.option=null}s&&(t.stopPropagation(),t.preventDefault())},this.scrollToIndex=t=>{requestAnimationFrame((()=>{var i;this.popoverDisplay&&(null===(i=this.element.shadowRoot.querySelector(`li:nth-of-type(${(t||0)+this.page.baseIndex})`))||void 0===i||i.scrollIntoView({block:"nearest"}))}))},this.isCurrentOption=t=>(x(this.value)?this.value.value:this.value)===t.value,this.getValueTitle=()=>this.value&&x(this.value)?this.value.title:"string"==typeof this.value?this.value:"",this.checkValidity=()=>{this.setValidity(this.readonly||this.disabled||this.input.checkValidity())},this.setErrorMessage=(t=!1)=>{this.errorMessage=void 0,this.valid||(t||this.customErrorMessage.lock&&void 0!==this.customErrorMessage.message?this.errorMessage=this.customErrorMessage.message:this.input.validity.valueMissing&&(this.errorMessage=this.messages.errors.required))},this.matchFilter=t=>""===this.filter||t.title.toLocaleLowerCase().includes(this.filter.toLocaleLowerCase()),this.getFilteredOptions=()=>this.options.items.filter(this.matchFilter),this.getFirstPage=()=>{const t=this.options.getPage(0,this.matchFilter);return void 0===this.fetchurl&&(t.total=this.getFilteredOptions().length),t},this.loadingWrapper=t=>{var i;let s,o;if(null!==(i=this.loadingAction)&&void 0!==i||(this.loadingAction=t.name),Boolean(this.option)&&"load-more"!==this.loadingAction?o=this.page.items.findIndex((t=>a(t.value)===a(this.option.value))):"load-more"===this.loadingAction&&(o=this.page.items.length-this.page.baseIndex),"load-more"===t.name)this.isLoading=!0,s=this.goToNextPage;else{if(t.cursor===h.NEXT&&this.page.items.length<=this.page.total&&o+this.page.baseIndex===this.page.items.length&&o+this.page.baseIndex<this.page.total)return void this.loadMoreElement.click();s="scroll"===t.name?r:this.updatePage}return s().then((()=>{const i=this.getFilteredOptions();"load-data"!==t.name&&(o=this.page.getIndexFromCursor(t.cursor,"load-more"===this.loadingAction&&o>=0?i[o]:this.option)),this.option=i[o],this.scrollToIndex(o)})).finally((()=>{requestAnimationFrame((()=>{this.isLoading=!1,this.loadingAction=void 0}))}))},this.goToNextPage=()=>(this.showMore.emit(),void 0!==this.fetchurl?this.getOptions("string"==typeof this.page.next?this.page.next:void 0).then((t=>{if(void 0!==t){const i=[...this.page.items,...t.items];this.options=new e(i,{total:t.total,next:t.next,top:i.length})}})):r((()=>{if("function"==typeof this.page.next){const t=this.page.next();this.page=new g(Object.assign(Object.assign({},t),{items:[...this.page.items,...t.items],total:this.getFilteredOptions().length}))}}))),this.updatePage=async()=>{if(void 0!==this.fetchurl)return this.getOptions().then((t=>{void 0!==t&&(this.options=new e(t.items,{total:t.total,next:t.next,top:t.top}))}));this.page=this.getFirstPage()},this.getOptions=async(t=this.fetchurl)=>{const i="function"==typeof this.fetchmappings.request.filterTransform?this.fetchmappings.request.filterTransform(this.filter):this.filter,s=("string"==typeof t?t:t.toString()).replaceAll(this.fetchmappings.request.filter,encodeURIComponent(i));try{const t=await fetch(s,this.fetchoptions);if(!t.ok)return void this.fetchError.emit(new Error(`${t.status} - ${t.statusText}`));const i=await t.json(),o=c(i,this.fetchmappings.response.items).map((t=>{var i;return{title:c(t,this.fetchmappings.response.itemTitle),value:null!==(i=c(t,this.fetchmappings.response.itemValue))&&void 0!==i?i:t}})),e=Number(c(i,this.fetchmappings.response.total,0));let n=c(i,this.fetchmappings.response.next);if(Boolean(n)&&!URL.canParse(n)){const t=new URL(s,this.element.ownerDocument.baseURI);n=new URL(n,t).toString()}return{items:o,total:e,next:n,top:o.length}}catch(t){this.fetchError.emit(t)}}}watchValue(t){this.filter=this.getValueTitle(),this.valueChange.emit(t)}watchItems(t){if(void 0===this.fetchurl||void 0!==t){if(void 0!==this.fetchurl&&void 0!==t)throw new Error(`<mg-input-combobox> prop "items" values cannot be use with "fetchurl" prop defined. Passed value: ${a(t)}.`);if(Array.isArray(t)&&0===t.length)this.options=new e([]);else if(p(t))this.options=new e(t.map((t=>({title:t,value:t}))),{total:t.length});else{if(i=t,!Array.isArray(i)||!i.every(x))throw new Error(`<mg-input-combobox> prop "items" values must be the same type, string or Option. Passed value: ${a(t)}.`);this.options=new e(t,{total:t.length})}var i}}watchIdentifier(t){m(t)&&(this.popoverId=`${t}-popover`,this.element.dataset.mgPopoverGuard=this.popoverId)}watchReadonly(t){t?this.classCollection.add(d):this.classCollection.delete(d)}watchValidityChange(t,i,s){void 0!==this.input&&(this.input[s]=t,this.checkValidity(),this.hasDisplayedError&&(this.setErrorMessage(),this.hasDisplayedError=!1))}watchDisabled(t){t?this.classCollection.add(b):this.classCollection.delete(b)}watchMgWidth(t){v.forEach((t=>{this.classCollection.delete(`mg-c-input--width-${t}`)})),void 0!==t&&this.classCollection.add(`mg-c-input--width-${this.mgWidth}`),this.classCollection=new n(this.classCollection.classes)}watchFetchUrl(t){void 0!==t&&this.loadingWrapper({name:"load-data"})}watchFetchOptions(t){if(this.fetchurl&&t&&!u(t))throw new Error(`<mg-input-combobox> prop "fetchoptions" value must be a valid RequestInit. Passed value: ${a(t)}.`)}watchFetchMappings(t){if(void 0!==this.fetchurl&&!u(t))throw new Error('<mg-input-combobox> prop "fetchmappings" is required with "fetchurl" prop.');if(void 0!==t&&!(t=>{const i=u(t)&&Object.hasOwn(t,"request")&&Object.hasOwn(t,"response");if(i){const{request:i,response:s}=t;return![i,s].some((t=>!u(t)))&&!("string"!=typeof i.filter||void 0!==i.filterTransform&&"function"!=typeof i.filterTransform||"object"!=typeof s||"string"!=typeof s.total||"string"!=typeof s.items||"string"!=typeof s.next||"string"!=typeof s.itemTitle||"string"!=typeof s.itemValue&&void 0!==s.itemValue)}return i})(t))throw new Error(`<mg-input-combobox> prop "fetchmappings" value must be { request: RequestMappingType, response: ResponseMappingType }. Passed value: ${a(t)}.`)}watchOptions(){this.page=this.getFirstPage()}watchFilter(t){this.loadingWrapper({name:"load-data"}),this.filterChange.emit(t)}watchPopoverDisplay(t){t?this.input.focus():(this.option=null,this.filter=this.getValueTitle(),this.handlerInProgress="blur",this.displayError().finally((()=>{this.handlerInProgress=void 0})))}async setFocus(){var t;null===(t=this.input)||void 0===t||t.focus()}displayError(){return new Promise((t=>{requestAnimationFrame((()=>{this.checkValidity(),this.setErrorMessage(),this.hasDisplayedError=this.invalid,t()}))}))}async setError(t,i,s=!1){if("boolean"!=typeof t)throw new Error('<mg-input-combobox> method "setError()" param "valid" must be a boolean.');if(void 0!==i&&!m(i))throw new Error('<mg-input-combobox> method "setError()" param "errorMessage" must be a string.');this.customErrorMessage={lock:!t&&s,message:t?void 0:i},this.setValidity(t),this.setErrorMessage(!0),this.hasDisplayedError=this.invalid}async reset(){if(!this.readonly)return this.setValue(null),this.option=null,this.filter="",new Promise((t=>{requestAnimationFrame((()=>{this.customErrorMessage={lock:!1},this.checkValidity(),this.errorMessage=void 0,this.hasDisplayedError=!1,t()}))}))}setValue(t){this.value=x(t)?p(this.items||this.options.items)?t.title:Object.assign({},t):""}setValidity(t){const i=this.valid;this.customErrorMessage.lock&&(void 0===this.customErrorMessage.message||t)||(this.valid=t),this.invalid=!this.valid,(void 0===this.handlerInProgress||"blur"===this.handlerInProgress&&this.valid!==i)&&this.inputValid.emit(this.valid)}componentWillLoad(){return this.messages=w(this.element).messages,f(this),this.watchIdentifier(this.identifier),this.watchItems(this.items),void 0!==this.fetchurl&&(this.watchFetchOptions(this.fetchoptions),this.watchFetchMappings(this.fetchmappings),this.loadingWrapper({name:"load-data"})),this.watchValue(this.value),this.watchOptions(),this.watchMgWidth(this.mgWidth),this.watchReadonly(this.readonly),this.watchDisabled(this.disabled),setTimeout((()=>{this.checkValidity()}),0)}render(){var t,i,o,e,n,h;const r=`${this.identifier}-list`,c=this.getValueTitle(),p=this.value&&!this.disabled;let m,u;return(null===(t=this.page)||void 0===t?void 0:t.items.length)>0?m="list":0===(null===(i=this.page)||void 0===i?void 0:i.items.length)&&this.filter.length>0?m="notfound":0===(null===(o=this.page)||void 0===o?void 0:o.items.length)&&(m="notavailable"),u=void 0!==(null===(e=this.option)||void 0===e?void 0:e.value)?this.option.value:"string"==typeof this.value?this.value:null===(n=this.value)||void 0===n?void 0:n.value,s("mg-input",{key:"047c14310f70117e1aec89161d2261f175487be7",label:this.label,identifier:this.identifier,class:this.classCollection.classes.join(" "),ariaDescribedbyIDs:m&&"list"!==m?m:void 0,labelOnTop:this.labelOnTop,labelHide:this.labelHide,required:this.required,tooltip:this.tooltip,tooltipPosition:this.readonly&&void 0===this.value?"label":this.tooltipPosition,helpText:this.helpText,errorMessage:this.errorMessage},this.readonly?c&&s("b",{class:"mg-c-input__readonly-value"},c):s("mg-popover",{identifier:this.popoverId,placement:this.popoverPlacement,display:this.popoverDisplay,style:{"--mg-c-input-list-width":(null===(h=this.input)||void 0===h?void 0:h.offsetWidth)>0?`${this.input.offsetWidth}px`:void 0},"data-fallback-placement":"bottom-end","onDisplay-change":this.handlePopoverDisplay},s("div",{class:"mg-c-input__input-group-container"},s("mg-icon",{icon:"magnifying-glass"}),s("input",{type:"text",role:"combobox",class:"mg-c-input__box mg-c-input__box--width",value:this.filter,id:this.identifier,name:this.name,placeholder:this.placeholder,title:this.placeholder,disabled:this.disabled,required:this.required,autocomplete:"off","aria-autocomplete":"list","aria-expanded":this.popoverDisplay.toString(),"aria-controls":r,"aria-invalid":(!0===this.invalid).toString(),"aria-activedescendant":l(u),onInput:this.handleFilterInput,onBlur:this.handleFilterBlur,onFocus:this.handleFilterFocus,onKeyDown:this.handleFilterKeydown,ref:t=>{null!==t&&(this.input=t)}}),p?s("mg-button",{class:"mg-c-input__box-append mg-c-input__reset",variant:"flat","is-icon":!0,label:this.messages.general.reset,"aria-controls":this.identifier,tabindex:"-1",onClick:this.handleResetButton},s("mg-icon",{icon:"cross"})):s("mg-button",{class:"mg-c-input__box-append",variant:"flat","is-icon":!0,label:this.itemsLabel,tabindex:"-1",disabled:this.disabled},s("mg-icon",{icon:"chevron-"+(this.popoverDisplay?"up":"down")}))),s("div",{slot:"content",class:"mg-c-input__popover-container"},"list"===m&&[s("ul",{key:"list",class:"mg-c-input__input-list",role:"listbox",id:r,"aria-label":this.itemsLabel,"aria-setsize":this.page.total},this.page.items.map((t=>{var i;return s("li",{role:"option",class:{"mg-c-input__input-list-item":!0,"mg-c-input__input-list-item--focus-visible":JSON.stringify(null===(i=this.option)||void 0===i?void 0:i.value)===JSON.stringify(t.value),"mg-c-input__input-list-item--selected":this.isCurrentOption(t)},key:t.title,id:l(t.value),"aria-selected":this.isCurrentOption(t).toString(),"data-value":a(t.value),onClick:this.handleOptionClick},t.title,this.isCurrentOption(t)&&s("mg-icon",{icon:"check"}))}))),this.isLoading&&s("mg-loader",{key:"loader",message:this.messages.input.combobox.search,class:{"mg-u-visually-hidden":Boolean(this.page.next)}}),this.page.next&&s("mg-button",{key:"load-more",variant:"flat",class:"mg-c-input__load-more",tabIndex:-1,disabled:this.isLoading,"full-width":!0,"disable-on-click":!0,onClick:this.handleLoadMoreButton,"aria-controls":r,ref:t=>{null!==t&&(this.loadMoreElement=t)}},s("mg-icon",{icon:"chevron-down"}),this.messages.input.showMore)],"notfound"===m&&s("p",{id:m,class:"mg-c-input__popover-info"},this.messages.input.combobox.notFound),"notavailable"===m&&s("p",{id:m,class:"mg-c-input__popover-info"},this.messages.input.combobox.notAvailable))))}get element(){return o(this)}static get watchers(){return{value:[{watchValue:0}],items:[{watchItems:0}],identifier:[{watchIdentifier:0}],readonly:[{watchReadonly:0},{watchValidityChange:0}],required:[{watchValidityChange:0}],disabled:[{watchValidityChange:0},{watchDisabled:0}],mgWidth:[{watchMgWidth:0}],fetchurl:[{watchFetchUrl:0}],fetchoptions:[{watchFetchOptions:0}],fetchmappings:[{watchFetchMappings:0}],options:[{watchOptions:0}],filter:[{watchFilter:0}],popoverDisplay:[{watchPopoverDisplay:0}]}}};y.style=".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:calc(-1*var(--mg-b-size-2));outline-style:solid;outline-width:var(--mg-b-size-2)}.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-c-input__popover-info{padding:var(--mg-b-size-8);margin:0;color:var(--mg-b-color-neutral-90);text-align:center}.mg-c-input__input-container{width:100%;flex:1 auto}.mg-c-input.mg-c-input--width-full .mg-c-input__box{width:100%}.mg-c-input.mg-c-input--width-full .mg-c-input__input-group-container{width:100%;flex-grow:1}.mg-c-input.mg-c-input--width-2.mg-c-input--display-character-left .mg-c-input__input-group-container,.mg-c-input.mg-c-input--width-4.mg-c-input--display-character-left .mg-c-input__input-group-container,.mg-c-input.mg-c-input--width-16.mg-c-input--display-character-left .mg-c-input__input-group-container{width:max-content}.mg-c-input.mg-c-input--width-2 .mg-c-input__box{width:var(--mg-b-size-48)}.mg-c-input.mg-c-input--width-2.mg-c-input--text.mg-c-input--display-character-left .mg-c-input__box{width:calc(var(--mg-b-size-48) + var(--mg-c-character-left-message-length)*(.35ch + .3rem))}.mg-c-input.mg-c-input--width-4 .mg-c-input__box{width:var(--mg-b-size-72)}.mg-c-input.mg-c-input--width-4.mg-c-input--text.mg-c-input--display-character-left .mg-c-input__box{width:calc(var(--mg-b-size-72) + var(--mg-c-character-left-message-length)*(.35ch + .3rem))}.mg-c-input.mg-c-input--width-16 .mg-c-input__box{width:calc(26*var(--mg-b-size-8))}.mg-c-input.mg-c-input--width-16.mg-c-input--text.mg-c-input--display-character-left .mg-c-input__box{width:calc(calc(26 * var(--mg-b-size-8)) + var(--mg-c-character-left-message-length)*(.35ch + .3rem))}.mg-c-input.mg-c-input--width-full:not(.mg-c-input--label-on-top){justify-content:stretch}.mg-c-input.mg-c-input--is-input-group-append ::slotted([slot=append-input]),.mg-c-input.mg-c-input--is-append-input-slot-content ::slotted([slot=append-input]){width:auto}:host(.mg-c-input.mg-c-input--width-full) ::slotted(*:not(mg-input-title)){width:100%;max-width:100%}.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--label-on-top .mg-c-input__readonly-value{margin-top:0}.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-path:inset(50%) !important;white-space:nowrap !important}.mg-u-visually-hidden *{overflow:hidden !important}*:focus:not(:focus-visible){outline:none}@media (prefers-reduced-motion){*{animation:none !important;transition:none !important}}a{color:inherit;text-decoration:underline}a:has(mg-icon){display:inline-flex;align-items:center;gap:var(--mg-b-size-4)}a:hover,a:focus,a:active{text-decoration:none}.mg-c-input.mg-c-input--combobox mg-popover{--mg-c-popover-overflow:auto;--mg-c-popover-spacing-vertical:0;--mg-c-popover-spacing-horizontal:0;--mg-c-popover-min-width:var(--mg-c-input-list-width);--mg-c-popover-max-height:calc(50 * var(--mg-b-size-8) - var(--mg-b-size-32))}.mg-c-input.mg-c-input--combobox .mg-c-input__input-group-container{position:relative}.mg-c-input.mg-c-input--combobox .mg-c-input__box{cursor:pointer}.mg-c-input.mg-c-input--combobox .mg-c-input__popover-container{display:flex;flex-direction:column;gap:var(--mg-b-size-4)}.mg-c-input.mg-c-input--combobox .mg-c-input__load-more{padding:0 var(--mg-b-size-8) var(--mg-b-size-4)}.mg-c-input.mg-c-input--combobox .mg-c-input__input-list{padding:0;margin:0;cursor:pointer;list-style:none}.mg-c-input.mg-c-input--combobox .mg-c-input__input-list-item{display:flex;padding:var(--mg-b-size-8)}.mg-c-input.mg-c-input--combobox .mg-c-input__input-list-item:hover,.mg-c-input.mg-c-input--combobox .mg-c-input__input-list-item.mg-c-input__input-list-item--focus-visible{background-color:var(--mg-b-color-neutral-20)}.mg-c-input.mg-c-input--combobox .mg-c-input__input-list-item.mg-c-input__input-list-item--selected{font-weight:700}.mg-c-input.mg-c-input--combobox .mg-c-input__input-list-item.mg-c-input__input-list-item--selected mg-icon{margin-left:auto}.mg-c-input.mg-c-input--combobox.mg-c-input--width-2 .mg-c-input__box{width:calc(var(--mg-b-size-16) + var(--mg-b-size-8)*2 + var(--mg-b-size-24) + var(--mg-b-size-min-height) + var(--mg-b-size-4))}.mg-c-input.mg-c-input--combobox.mg-c-input--width-4 .mg-c-input__box{width:calc(var(--mg-b-size-16) + var(--mg-b-size-8)*2 + var(--mg-b-size-48) + var(--mg-b-size-min-height) + var(--mg-b-size-4))}.mg-c-input.mg-c-input--combobox.mg-c-input--width-16 .mg-c-input__box{width:calc(var(--mg-b-size-16) + var(--mg-b-size-8)*2 + calc(23 * var(--mg-b-size-8)) + var(--mg-b-size-min-height) + var(--mg-b-size-4))}.mg-c-input.mg-c-input--combobox.mg-c-input--width-full mg-popover{--mg-c-popover-max-width:var(--mg-c-input-list-width, var(--mg-c-popover-max-width))}.mg-c-input.mg-c-input--combobox.mg-c-input--width-full .mg-c-input__input-group-container{display:flex;width:100%}.mg-c-input.mg-c-input--combobox.mg-c-input--width-full .mg-c-input__box{flex:1}.mg-c-input.mg-c-input--combobox.mg-c-input--input-append .mg-c-input__box{padding-right:calc(var(--mg-b-size-min-height) + var(--mg-b-size-4))}.mg-c-input.mg-c-input--combobox.mg-c-input--input-append .mg-c-input__box-append{position:absolute;top:0;right:0}";export{y as mg_input_combobox}
@@ -1 +1 @@
1
- import{r,h as s,H as e}from"./p-D4bO_UCn.js";import{i as a,t as i,e as o}from"./p-91BOpzAB.js";const t=["progressbar","meter"],h=class{constructor(s){r(this,s),this.ariaRole="progressbar",this.value=0,this.min=0,this.max=100}watchLabel(r){if(!a(r))throw new Error(`<mg-progress> prop "label" must be a valid string. Passed value: ${i(r)}.`)}watchAriaRole(r){if(r&&!t.includes(r))throw new Error(`<mg-progress> prop "ariaRole" must be one of: ${t.join(", ")}. Passed value: ${i(r)}.`)}watchValue(r){if(!(void 0===r||o(r)&&r>=this.min&&r<=this.max))throw new Error(`<mg-progress> prop “value” must be a number within the range ${this.min} to ${this.max}. Passed value: ${i(r)}.`)}watchMin(r){if(0!==r&&void 0!==r&&(!o(r)||r>=this.max))throw new Error(`<mg-progress> prop “min” must be a number lower than: ${this.max}. Passed value: ${i(r)}.`)}watchMax(r){if(100!==r&&void 0!==r&&(!o(r)||r<=this.min))throw new Error(`<mg-progress> prop “max” must be a number greater than: ${this.min}. Passed value: ${i(r)}.`)}componentWillLoad(){this.watchLabel(this.label),this.watchAriaRole(this.ariaRole),this.watchMin(this.min),this.watchMax(this.max),this.watchValue(this.value)}render(){return s(e,{key:"3682d5f1980678e39594dab8223805deb4b425d4",role:this.ariaRole,"aria-label":this.label,"aria-valuenow":this.value,"aria-valuemin":this.min,"aria-valuemax":this.max},s("div",{key:"001d511a866ec0526c4ffd01a8a90448b6f40819",class:"mg-c-progress"},s("div",{key:"504fa583f5b8186236871f3f2cd886acb40614ef",class:{"mg-c-progress__bar":!0,"mg-c-progress__bar--active":this.value>this.min}},s("div",{key:"044c9297d5a12c9d8c6d3b76d17dd2ba6a1a9719",class:"mg-c-progress__fill",style:{width:`${Math.round((this.value-this.min)/(this.max-this.min)*100)}%`}}))))}static get watchers(){return{label:[{watchLabel:0}],ariaRole:[{watchAriaRole:0}],value:[{watchValue:0}],min:[{watchMin:0}],max:[{watchMax:0}]}}};h.style=".mg-c-progress{min-width:calc(var(--mg-b-size-16)*4)}.mg-c-progress__bar{position:relative;overflow:hidden;height:var(--mg-c-progress-size);border-width:var(--mg-b-size-border);border-style:solid;border-color:var(--mg-c-progress-border-color);border-radius:calc((var(--mg-c-progress-size) + var(--mg-b-size-border)*2)/2);background-color:var(--mg-c-progress-bar-color-background)}.mg-c-progress__fill{height:100%;border-radius:calc((var(--mg-c-progress-size) + var(--mg-b-size-border)*2)/2);transition:width 300ms ease-in-out}.mg-c-progress__bar.mg-c-progress__bar--active .mg-c-progress__fill{background-color:var(--mg-c-progress-fill-color-background)}";export{h as mg_progress}
1
+ import{r,h as s,H as e}from"./p-D4bO_UCn.js";import{i as a,t as i,e as o}from"./p-91BOpzAB.js";const t=["progressbar","meter"],h=class{constructor(s){r(this,s),this.ariaRole="progressbar",this.value=0,this.min=0,this.max=100}watchLabel(r){if(!a(r))throw new Error(`<mg-progress> prop "label" must be a valid string. Passed value: ${i(r)}.`)}watchAriaRole(r){if(r&&!t.includes(r))throw new Error(`<mg-progress> prop "ariaRole" must be one of: ${t.join(", ")}. Passed value: ${i(r)}.`)}watchValue(r){if(!(void 0===r||o(r)&&r>=this.min&&r<=this.max))throw new Error(`<mg-progress> prop “value” must be a number within the range ${this.min} to ${this.max}. Passed value: ${i(r)}.`)}watchMin(r){if(0!==r&&void 0!==r&&(!o(r)||r>=this.max))throw new Error(`<mg-progress> prop “min” must be a number lower than: ${this.max}. Passed value: ${i(r)}.`)}watchMax(r){if(100!==r&&void 0!==r&&(!o(r)||r<=this.min))throw new Error(`<mg-progress> prop “max” must be a number greater than: ${this.min}. Passed value: ${i(r)}.`)}componentWillLoad(){this.watchLabel(this.label),this.watchAriaRole(this.ariaRole),this.watchMin(this.min),this.watchMax(this.max),this.watchValue(this.value)}render(){return s(e,{key:"c0df3a5d374a8e5761efcd1e340775e5a33b17b4",role:this.ariaRole,"aria-label":this.label,"aria-valuenow":this.value,"aria-valuemin":this.min,"aria-valuemax":this.max},s("div",{key:"9481f0fdb3bb5b9c0a27cd47113207537dcf0eec",class:"mg-c-progress"},s("div",{key:"67bf52635d482d56a8b0a85f31da78c243054e22",class:{"mg-c-progress__bar":!0,"mg-c-progress__bar--active":this.value>this.min}},s("div",{key:"9a55b0bf8132bcec41350941d2bbd470194d7981",class:"mg-c-progress__fill",style:{width:`${Math.round((this.value-this.min)/(this.max-this.min)*100)}%`}}))))}static get watchers(){return{label:[{watchLabel:0}],ariaRole:[{watchAriaRole:0}],value:[{watchValue:0}],min:[{watchMin:0}],max:[{watchMax:0}]}}};h.style=".mg-c-progress{min-width:calc(var(--mg-b-size-16)*4)}.mg-c-progress__bar{position:relative;overflow:hidden;height:var(--mg-c-progress-size);border-width:var(--mg-b-size-border);border-style:solid;border-color:var(--mg-c-progress-border-color);border-radius:calc((var(--mg-c-progress-size) + var(--mg-b-size-border)*2)/2);background-color:var(--mg-c-progress-bar-color-background)}.mg-c-progress__fill{height:100%;border-radius:calc((var(--mg-c-progress-size) + var(--mg-b-size-border)*2)/2);transition:width 300ms ease-in-out}.mg-c-progress__bar.mg-c-progress__bar--active .mg-c-progress__fill{background-color:var(--mg-c-progress-fill-color-background)}";export{h as mg_progress}
@@ -0,0 +1 @@
1
+ import{r as e,h as t,a as i}from"./p-D4bO_UCn.js";import{i as a}from"./p-BfblyCaJ.js";import{i as r,t as s}from"./p-91BOpzAB.js";const o=class{constructor(t){e(this,t),this.messageHide=!1}watchMessage(e){if(e&&!r(e))throw new Error(`<mg-loader> prop "message" must be a valid string. Passed value: ${s(e)}.`)}componentWillLoad(){this.messages=a(this.element).messages,this.watchMessage(this.message)}render(){return t("div",{key:"55e8bc6908f1cd83f9ffc0e30dd28ede501e30d8",class:"mg-c-loader","aria-live":"polite"},t("mg-icon",{key:"4306e748a509ac3c546d565bf2bed74529ce3c24",icon:"loader",spin:!0}),t("span",{key:"6636df5f58654f6de7f0b79e8e4dd32e4fe2bfc7",class:{"mg-u-visually-hidden":this.messageHide}},this.message||this.messages.loader.inProgress))}get element(){return i(this)}static get watchers(){return{message:[{watchMessage:0}]}}};o.style=".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-path:inset(50%) !important;white-space:nowrap !important}.mg-u-visually-hidden *{overflow:hidden !important}*:focus:not(:focus-visible){outline:none}@media (prefers-reduced-motion){*{animation:none !important;transition:none !important}}:host{display:block}.mg-c-loader{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:var(--mg-b-size-4);text-align:center}";export{o as mg_loader}
@@ -43,7 +43,12 @@ export declare class MgTooltip {
43
43
  * Disable tooltip
44
44
  */
45
45
  disabled: boolean;
46
- watchDisabled(newValue: MgTooltip['disabled']): void;
46
+ watchDisabled(): void;
47
+ /**
48
+ * Toggle the popper scroll and resize listeners, only needed while the tooltip is visible
49
+ * @param enabled - listeners state to apply
50
+ */
51
+ private setPopperEventListeners;
47
52
  /**
48
53
  * Show tooltip
49
54
  */
@@ -79,14 +84,35 @@ export declare class MgTooltip {
79
84
  * Method to reset guard value
80
85
  */
81
86
  private resetGuard;
87
+ /**
88
+ * Display tooltip when the tooltiped element takes focus
89
+ */
90
+ private handleTooltipedElementFocus;
91
+ /**
92
+ * Hide tooltip when the tooltiped element loses focus
93
+ */
94
+ private handleTooltipedElementBlur;
95
+ /**
96
+ * Display tooltip when the tooltiped element is hovered
97
+ */
98
+ private handleTooltipedElementMouseenter;
99
+ /**
100
+ * Hide tooltip when the tooltiped element is not hovered anymore
101
+ */
102
+ private handleTooltipedElementMouseleave;
103
+ /**
104
+ * Manage all tooltiped element listeners
105
+ * @param element - element to bind or unbind
106
+ * @param action - process to apply on element listeners
107
+ */
108
+ private manageTooltipedElementListeners;
82
109
  /**
83
110
  * Update slot content when it is a mg-button
84
111
  * @param mgButton - slotted mg-button
85
112
  */
86
113
  private setMgButtonWrapper;
87
114
  /**
88
- * Set popper instance
89
- * @param strategy - popper strategy to apply on instance
115
+ * Set popper instance on the current tooltiped element
90
116
  */
91
117
  private setPopper;
92
118
  /**
@@ -100,10 +126,11 @@ export declare class MgTooltip {
100
126
  */
101
127
  private setMgButtonMutationObserver;
102
128
  /**
103
- * Set tooltiped element aria-describedby
104
- * @param element - element to update
129
+ * Reconcile the tooltiped element a11y: the tooltip is restituted — `aria-describedby` exposed, and a
130
+ * non-interactive element made focusable (`tabindex` + `role`) — unless it is disabled and not displayed.
131
+ * Pre-existing `aria-describedby` ids are preserved.
105
132
  */
106
- private setAriaDescribedby;
133
+ private updateTooltipedElementA11y;
107
134
  /**
108
135
  * Render tooltip content element and init listeners
109
136
  */
@@ -11,7 +11,8 @@ export declare class MgInput {
11
11
  private readonly slotLabel;
12
12
  private readonly slotError;
13
13
  private readonly slotHelpText;
14
- private readonly blockLevelContentRegExp;
14
+ private readonly blockLevelTags;
15
+ private readonly openingTagRegExp;
15
16
  private errorMessageSlotElement;
16
17
  private helptextMessageSlotElement;
17
18
  private readonly classInput;
@@ -308,6 +308,17 @@ export declare class MgInputCombobox {
308
308
  * @param fromSetErrorContext - context come from `setError` method
309
309
  */
310
310
  private setErrorMessage;
311
+ /**
312
+ * Check if an option matches the current filter
313
+ * @param option - option to match
314
+ * @returns true if the option matches the filter
315
+ */
316
+ private matchFilter;
317
+ /**
318
+ * Get all the options matching the current filter
319
+ * @returns filtered options
320
+ */
321
+ private getFilteredOptions;
311
322
  /**
312
323
  * Get first page with filter applied
313
324
  * @returns first page with filter applied
@@ -78,6 +78,10 @@ export declare class MgForm {
78
78
  * Required message
79
79
  */
80
80
  requiredMessageText: string;
81
+ /**
82
+ * Whether the form has slotted actions
83
+ */
84
+ hasActions: boolean;
81
85
  /**
82
86
  * Emitted event on form validity check
83
87
  * Tells if form is valid or not
@@ -15,3 +15,11 @@ export declare const directions: readonly ["vertical", "horizontal"];
15
15
  * IllustratedMessage direction type
16
16
  */
17
17
  export type IllustratedMessageDirectionType = Direction & (typeof directions)[number];
18
+ /**
19
+ * List of all possibles horizontal alignments
20
+ */
21
+ export declare const aligns: readonly ["left", "center", "right"];
22
+ /**
23
+ * IllustratedMessage align type
24
+ */
25
+ export type IllustratedMessageAlignType = (typeof aligns)[number];
@@ -1,5 +1,5 @@
1
1
  import { ClassList } from '@mgdis/core-ui-helpers/dist/utils';
2
- import { type IllustratedMessageDirectionType, type IllustratedMessageSizeType } from './mg-illustrated-message.conf';
2
+ import { type IllustratedMessageAlignType, type IllustratedMessageDirectionType, type IllustratedMessageSizeType } from './mg-illustrated-message.conf';
3
3
  /**
4
4
  * @slot illustration - Illustration content
5
5
  * @slot title - Title content
@@ -23,6 +23,14 @@ export declare class MgIllustratedMessage {
23
23
  */
24
24
  direction: IllustratedMessageDirectionType;
25
25
  watchDirection(newValue: IllustratedMessageDirectionType, oldValue?: IllustratedMessageDirectionType): void;
26
+ /**
27
+ * Define the horizontal alignment of the message inside its container.
28
+ * The message is sized to its content, so `align` positions it in both the vertical and
29
+ * horizontal directions. When the content is wide enough to fill the container there is
30
+ * no room left, so `align` has no visible effect.
31
+ */
32
+ align: IllustratedMessageAlignType;
33
+ watchAlign(newValue: IllustratedMessageAlignType, oldValue?: IllustratedMessageAlignType): void;
26
34
  /**
27
35
  * Component classes
28
36
  */
@@ -15,7 +15,7 @@ import { DividerDirectionType } from "./components/atoms/mg-divider/mg-divider.c
15
15
  import { labelHeading, TooltipPosition, Width } from "./components/molecules/inputs/mg-input/mg-input.conf";
16
16
  import { AriaRoleType, RequiredMessageStatusType } from "./components/molecules/mg-form/mg-form.conf";
17
17
  import { IconSizeType, IconType, IconVariantStyleType, IconVariantType } from "./components/atoms/mg-icon/mg-icon.conf";
18
- import { IllustratedMessageDirectionType, IllustratedMessageSizeType } from "./components/molecules/mg-illustrated-message/mg-illustrated-message.conf";
18
+ import { IllustratedMessageAlignType, IllustratedMessageDirectionType, IllustratedMessageSizeType } from "./components/molecules/mg-illustrated-message/mg-illustrated-message.conf";
19
19
  import { IllustrationType } from "./components/atoms/mg-illustration/mg-illustration.conf";
20
20
  import { CheckboxType, ICheckboxValue } from "./components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.conf";
21
21
  import { Direction, Option, Option as ToggleOption } from "./types";
@@ -51,7 +51,7 @@ export { DividerDirectionType } from "./components/atoms/mg-divider/mg-divider.c
51
51
  export { labelHeading, TooltipPosition, Width } from "./components/molecules/inputs/mg-input/mg-input.conf";
52
52
  export { AriaRoleType, RequiredMessageStatusType } from "./components/molecules/mg-form/mg-form.conf";
53
53
  export { IconSizeType, IconType, IconVariantStyleType, IconVariantType } from "./components/atoms/mg-icon/mg-icon.conf";
54
- export { IllustratedMessageDirectionType, IllustratedMessageSizeType } from "./components/molecules/mg-illustrated-message/mg-illustrated-message.conf";
54
+ export { IllustratedMessageAlignType, IllustratedMessageDirectionType, IllustratedMessageSizeType } from "./components/molecules/mg-illustrated-message/mg-illustrated-message.conf";
55
55
  export { IllustrationType } from "./components/atoms/mg-illustration/mg-illustration.conf";
56
56
  export { CheckboxType, ICheckboxValue } from "./components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.conf";
57
57
  export { Direction, Option, Option as ToggleOption } from "./types";
@@ -379,6 +379,11 @@ export namespace Components {
379
379
  "variantStyle": IconVariantStyleType;
380
380
  }
381
381
  interface MgIllustratedMessage {
382
+ /**
383
+ * Define the horizontal alignment of the message inside its container. The message is sized to its content, so `align` positions it in both the vertical and horizontal directions. When the content is wide enough to fill the container there is no room left, so `align` has no visible effect.
384
+ * @default 'center'
385
+ */
386
+ "align": IllustratedMessageAlignType;
382
387
  /**
383
388
  * Define component orientation
384
389
  * @default 'vertical'
@@ -3202,6 +3207,11 @@ declare namespace LocalJSX {
3202
3207
  "variantStyle"?: IconVariantStyleType;
3203
3208
  }
3204
3209
  interface MgIllustratedMessage {
3210
+ /**
3211
+ * Define the horizontal alignment of the message inside its container. The message is sized to its content, so `align` positions it in both the vertical and horizontal directions. When the content is wide enough to fill the container there is no room left, so `align` has no visible effect.
3212
+ * @default 'center'
3213
+ */
3214
+ "align"?: IllustratedMessageAlignType;
3205
3215
  /**
3206
3216
  * Define component orientation
3207
3217
  * @default 'vertical'
@@ -4980,6 +4990,7 @@ declare namespace LocalJSX {
4980
4990
  interface MgIllustratedMessageAttributes {
4981
4991
  "size": IllustratedMessageSizeType;
4982
4992
  "direction": IllustratedMessageDirectionType;
4993
+ "align": IllustratedMessageAlignType;
4983
4994
  }
4984
4995
  interface MgIllustrationAttributes {
4985
4996
  "illustration": IllustrationType;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@mgdis/mg-components",
4
- "version": "6.25.0",
4
+ "version": "6.27.0",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -979,9 +979,19 @@
979
979
  },
980
980
  {
981
981
  "name": "mg-illustrated-message",
982
- "description": "Attributes:\n- `direction`: Define component orientation\n- `size`: Define illustration size\n\nSlots:\n- `details`: Details content\n- `illustration`: Illustration content\n- `title`: Title content\n\n",
982
+ "description": "Attributes:\n- `align`: Define the horizontal alignment of the message inside its container.\nThe message is sized to its content, so `align` positions it in both the vertical and\nhorizontal directions. When the content is wide enough to fill the container there is\nno room left, so `align` has no visible effect.\n- `direction`: Define component orientation\n- `size`: Define illustration size\n\nSlots:\n- `details`: Details content\n- `illustration`: Illustration content\n- `title`: Title content\n\n",
983
983
  "doc-url": "http://core.pages.mgdis.fr/core-ui/core-ui/storybook/?path=/docs/molecules-mg-illustrated-message--docs",
984
984
  "attributes": [
985
+ {
986
+ "name": "align",
987
+ "description": "Define the horizontal alignment of the message inside its container.\nThe message is sized to its content, so `align` positions it in both the vertical and\nhorizontal directions. When the content is wide enough to fill the container there is\nno room left, so `align` has no visible effect.\n\nType: `\"center\" | \"left\" | \"right\"`",
988
+ "doc-url": "http://core.pages.mgdis.fr/core-ui/core-ui/storybook/?path=/docs/molecules-mg-illustrated-message--docs",
989
+ "value": {
990
+ "type": "\"center\" | \"left\" | \"right\"",
991
+ "default": "'center'",
992
+ "required": false
993
+ }
994
+ },
985
995
  {
986
996
  "name": "direction",
987
997
  "description": "Define component orientation\n\nType: `\"horizontal\" | \"vertical\"`",
@@ -1796,8 +1796,33 @@
1796
1796
  },
1797
1797
  {
1798
1798
  "name": "mg-illustrated-message",
1799
- "description": "Attributes:\n- `direction`: Define component orientation\n- `size`: Define illustration size\n\nSlots:\n- `details`: Details content\n- `illustration`: Illustration content\n- `title`: Title content\n\n",
1799
+ "description": "Attributes:\n- `align`: Define the horizontal alignment of the message inside its container.\nThe message is sized to its content, so `align` positions it in both the vertical and\nhorizontal directions. When the content is wide enough to fill the container there is\nno room left, so `align` has no visible effect.\n- `direction`: Define component orientation\n- `size`: Define illustration size\n\nSlots:\n- `details`: Details content\n- `illustration`: Illustration content\n- `title`: Title content\n\n",
1800
1800
  "attributes": [
1801
+ {
1802
+ "name": "align",
1803
+ "description": "Define the horizontal alignment of the message inside its container.\nThe message is sized to its content, so `align` positions it in both the vertical and\nhorizontal directions. When the content is wide enough to fill the container there is\nno room left, so `align` has no visible effect.\n\nType: `\"center\" | \"left\" | \"right\"`",
1804
+ "values": [
1805
+ {
1806
+ "name": "center"
1807
+ },
1808
+ {
1809
+ "name": "left"
1810
+ },
1811
+ {
1812
+ "name": "right"
1813
+ }
1814
+ ],
1815
+ "references": [
1816
+ {
1817
+ "name": "Storybook",
1818
+ "url": "http://core.pages.mgdis.fr/core-ui/core-ui/storybook/?path=/docs/molecules-mg-illustrated-message--docs"
1819
+ },
1820
+ {
1821
+ "name": "Sources",
1822
+ "url": "https://gitlab.mgdis.fr/core/core-ui/core-ui/-/tree/master/packages/mg-components/src/components/molecules/mg-illustrated-message/mg-illustrated-message.tsx"
1823
+ }
1824
+ ]
1825
+ },
1801
1826
  {
1802
1827
  "name": "direction",
1803
1828
  "description": "Define component orientation\n\nType: `\"horizontal\" | \"vertical\"`",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mgdis/mg-components",
3
- "version": "6.25.0",
3
+ "version": "6.27.0",
4
4
  "description": "MG Components",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.js",
@@ -40,41 +40,41 @@
40
40
  "dependencies": {
41
41
  "@popperjs/core": "2.11.8",
42
42
  "@stencil/core": "4.43.5",
43
- "jodit": "4.13.8",
44
- "@mgdis/sanitize-html": "1.1.3",
45
- "@mgdis/styles": "2.20.0",
46
- "@mgdis/core-ui-helpers": "1.2.2",
47
- "@mgdis/img": "2.7.2"
43
+ "jodit": "4.13.22",
44
+ "@mgdis/core-ui-helpers": "1.3.0",
45
+ "@mgdis/img": "3.0.0",
46
+ "@mgdis/sanitize-html": "1.1.4",
47
+ "@mgdis/styles": "2.22.0"
48
48
  },
49
49
  "devDependencies": {
50
50
  "@playwright/test": "1.61.1",
51
- "@storybook/addon-a11y": "10.5.2",
52
- "@storybook/addon-docs": "10.5.2",
53
- "@storybook/addon-links": "10.5.2",
54
- "@storybook/html": "10.5.2",
55
- "@storybook/html-vite": "10.5.2",
51
+ "@storybook/addon-a11y": "10.5.8",
52
+ "@storybook/addon-docs": "10.5.8",
53
+ "@storybook/addon-links": "10.5.8",
54
+ "@storybook/html": "10.5.8",
55
+ "@storybook/html-vite": "10.5.8",
56
56
  "@types/jest": "29.5.14",
57
57
  "@types/node": "24.13.3",
58
- "chromatic": "18.1.0",
59
- "eslint": "9.39.5",
60
- "eslint-plugin-storybook": "10.5.2",
58
+ "chromatic": "18.2.0",
59
+ "eslint": "10.8.1",
60
+ "eslint-plugin-storybook": "10.5.8",
61
61
  "jest": "29.7.0",
62
62
  "jest-cli": "29.7.0",
63
63
  "jest-junit": "17.0.0",
64
64
  "jest-transform-stub": "2.0.0",
65
65
  "react": "19.2.8",
66
- "react-dom": "19.2.7",
67
- "sass": "1.101.0",
68
- "storybook": "10.5.2",
66
+ "react-dom": "19.2.8",
67
+ "sass": "1.102.0",
68
+ "storybook": "10.5.8",
69
69
  "storybook-addon-tag-badges": "3.1.0",
70
70
  "typescript": "5.9.3",
71
- "vite": "8.1.5",
71
+ "vite": "8.2.1",
72
72
  "@core-ui/jest-config": "1.0.9",
73
- "@mgdis/linting-stencil": "2.0.0"
73
+ "@mgdis/linting-stencil": "2.1.0"
74
74
  },
75
75
  "license": "BSD-3-Clause",
76
76
  "scripts": {
77
- "prebuild": "node ./bin/build-svg-assets",
77
+ "prebuild": "node ./bin/build-svg-assets && node ./bin/build-jodit-styles",
78
78
  "build": "pnpm prebuild && stencil build --docs",
79
79
  "start": "pnpm prebuild && stencil build --dev --watch --serve",
80
80
  "test": "TZ=UTC stencil test --spec --e2e",
@@ -1,212 +0,0 @@
1
- :host {
2
- /**
3
- * Colors - Base
4
- */
5
- --jd-color-white: rgb(255 255 255);
6
- --jd-color-dark: rgb(76 76 76);
7
- --jd-color-default: var(--jd-color-dark);
8
- --jd-color-gray: rgb(218 218 218);
9
- --jd-color-gray-dark: rgb(165 165 165);
10
- --jd-color-red: rgb(255 59 59);
11
- --jd-color-blue: rgb(181 214 253);
12
- --jd-color-light-blue: rgb(181 214 253 / 50%);
13
- --jd-color-light-red: rgb(255 59 59 / 40%);
14
- --jd-color-error: var(--jd-color-red);
15
-
16
- /**
17
- * Colors - Background
18
- */
19
- --jd-color-background-default: var(--jd-color-white);
20
- --jd-color-background-light-gray: rgb(245 245 246);
21
- --jd-color-background-gray: var(--jd-color-gray);
22
- --jd-color-background-gray-hover: rgb(248 248 248);
23
- --jd-color-background-active: rgb(33 150 243);
24
- --jd-color-background-button-hover: rgb(236 235 233);
25
- --jd-color-background-button-hover-opacity30: rgb(234 234 234 / 30%);
26
- --jd-color-background-button-hover-opacity40: rgb(219 219 219 / 40%);
27
- --jd-color-background-button-hover-opacity60: rgb(219 219 219 / 60%);
28
- --jd-color-background-filebrowser-folders: rgb(248 249 250);
29
- --jd-color-background-progress: rgb(185 31 31);
30
- --jd-color-background-selection: rgb(181 214 253);
31
- --jd-color-background-selection-opacity50: rgb(181 214 253 / 99.5%);
32
- --jd-color-panel: rgb(249 249 249);
33
- --jd-color-source-area: rgb(50 50 50);
34
- --jd-info-background: rgb(233 233 233);
35
-
36
- /**
37
- * Colors - Border
38
- */
39
- --jd-color-border: var(--jd-color-gray);
40
- --jd-color-border-dark: var(--jd-color-dark);
41
- --jd-color-border-active: rgb(181 181 181);
42
- --jd-color-border-selected: rgb(30 136 229);
43
- --jd-color-separator: var(--jd-color-border);
44
- --jd-color-resizer: rgb(200 200 200);
45
-
46
- /**
47
- * Colors - Text
48
- */
49
- --jd-color-text: rgb(34 34 34);
50
- --jd-color-text-icons: rgb(0 0 0 / 75%);
51
- --jd-color-text-selection: var(--jd-color-white);
52
- --jd-color-icon: var(--jd-color-dark);
53
- --jd-color-label: var(--jd-color-gray-dark);
54
- --jd-color-placeholder: var(--jd-color-gray-dark);
55
- --jd-color-folder-title: rgb(177 177 177);
56
- --jd-color-selection: var(--jd-color-dark);
57
-
58
- /**
59
- * Colors - Button
60
- */
61
- --jd-color-button-background-hover: rgb(220 220 220);
62
- --jd-color-button-background-hover-opacity40: rgb(219 219 219 / 40%);
63
- --jd-color-button-background-hover-opacity60: rgb(219 219 219 / 60%);
64
-
65
- /**
66
- * Colors - Selection
67
- */
68
- --jd-color-selection-area: rgb(189 189 189);
69
- --jd-color-table-cell-background-hover: rgb(0 0 0 / 5%);
70
-
71
- /**
72
- * Colors - Dark mode
73
- */
74
- --jd-dark-background-color: rgb(87 87 87);
75
- --jd-dark-background-darknes: rgb(53 53 53);
76
- --jd-dark-background-ligher: rgb(192 192 192);
77
- --jd-dark-border-color: rgb(68 68 68);
78
- --jd-dark-color-border-selected: rgb(21 47 95);
79
- --jd-dark-icon-color: rgb(192 192 192);
80
- --jd-dark-text-color: rgb(209 204 204);
81
- --jd-dark-text-color-opacity50: rgb(206 206 206 / 50%);
82
- --jd-dark-text-color-opacity80: rgb(206 206 206 / 80%);
83
- --jd-dark-toolbar-color: rgb(95 92 92);
84
- --jd-dark-toolbar-seperator-color1: rgb(81 81 81 / 41%);
85
- --jd-dark-toolbar-seperator-color2: rgb(104 103 103);
86
- --jd-dark-toolbar-seperator-color3: rgb(105 105 105 / 75%);
87
- --jd-dark-toolbar-seperator-color-opacity80: rgb(105 105 105 / 80%);
88
-
89
- /**
90
- * Colors - Special
91
- */
92
- --jd-color-picker-cell-size: 2.4rem;
93
- --jd-image-editor-resizer-border-color: rgb(5 255 0);
94
- --jd-image-editor-resizer-target-bg-color: rgb(140 120 120);
95
- --jd-image-editor-resizer-target-border-color: rgb(56 56 56);
96
- --jd-resizer-border-color: rgb(152 193 241);
97
- --jd-resizer-handle-color: rgb(91 164 243);
98
- --jd-resizer-handle-hover-color: rgb(83 126 187);
99
-
100
- /**
101
- * Colors - Em (Alert/Message)
102
- */
103
- --jd-em-color-bg: rgb(207 226 255);
104
- --jd-em-color-border: rgb(182 212 254);
105
- --jd-em-color-color: rgb(8 66 152);
106
-
107
- /**
108
- * Sizes - Buttons
109
- */
110
- --jd-button-icon-size: 1.4rem;
111
- --jd-button-trigger-size: 1.4rem;
112
- --jd-button-df-size: calc((var(--jd-button-icon-size) - 0.4rem) * 2);
113
- --jd-button-size: calc(var(--jd-button-icon-size) + var(--jd-button-df-size) + var(--jd-margin-v) * 2);
114
-
115
- /**
116
- * Sizes - Icons
117
- */
118
- --jd-icon-size: 1.2rem;
119
- --jd-icon-loader-size: 4.8rem;
120
-
121
- /**
122
- * Sizes - Height
123
- */
124
- --jd-height: 1.8rem;
125
- --jd-height-element-default: 1.8rem;
126
- --jd-height-search: 3rem;
127
- --jd-input-height: 3.2rem;
128
- --jd-switche-height: 3.2rem;
129
- --jd-viewer-height: 2.4rem;
130
-
131
- /**
132
- * Sizes - Width
133
- */
134
- --jd-width-default: 18rem;
135
- --jd-width-element-default: 1.8rem;
136
- --jd-width-input-min: var(--jd-width-default);
137
- --jd-width-search: 32rem;
138
- --jd-width-search-count-box: 15%;
139
- --jd-width-search-input-box: 60%;
140
- --jd-viewer-width: 7rem;
141
- --jd-switche-width: 6rem;
142
- --jd-col-size: 15rem;
143
- --jd-first-column: 31%;
144
- --jd-image-editor-resizer-target-size: padding-default;
145
-
146
- /**
147
- * Sizes - Spacing
148
- */
149
- --jd-padding-default: 0.8rem;
150
- --jd-margin-v: 0.2rem;
151
- --jd-switche-slider-margin: 0.4rem;
152
- --jd-em-padding: calc(1rem / 2) 1rem;
153
-
154
- /**
155
- * Sizes - Other
156
- */
157
- --jd-resizer-handle-size: 1rem;
158
- --jd-switche-slider-size: calc(var(--jd-switche-height) - var(--jd-switche-slider-margin) * 2);
159
- --jd-cols: 4;
160
-
161
- /**
162
- * Border and radius
163
- */
164
- --jd-border-radius-default: 0.3rem;
165
- --jd-em-border-radius: 0.375rem;
166
-
167
- /**
168
- * Font
169
- */
170
- --jd-font-default: -apple-system, blinkmacsystemfont, 'Segoe UI', roboto, oxygen-sans, ubuntu, cantarell, 'Helvetica Neue', sans-serif;
171
- --jd-font-size-default: 1.4rem;
172
- --jd-font-size-small: 1.1rem;
173
- --jd-em-font-size: 1rem;
174
-
175
- /**
176
- * Shadow
177
- */
178
- --jd-box-shadow-1: 0 0.8rem 1.6rem rgb(0 0 0 / 19%);
179
- --jd-box-shadow-blur: 1.6rem;
180
- --jd-box-shadow-tabs: 0 0.2rem 0.4rem rgb(0 0 0 / 10%);
181
- --jd-popup-box-shadow: 0 0.4rem 0.1rem -0.2rem rgb(76 76 76 / 20%), 0 0.3rem 0.3rem 0 rgb(76 76 76 / 15%), 0 0.1rem 0.4rem 0 rgb(76 76 76 / 13%);
182
- --jd-popup-max-height: max(50vh, 35rem);
183
- --jd-focus-input-box-shadow: 0 0 0 0.05rem rgb(0 123 255 / 25%);
184
-
185
- /**
186
- * Z-index
187
- */
188
- --jd-z-index-dialog: 20000004;
189
- --jd-z-index-dialog-overlay: 20000003;
190
- --jd-z-index-popup: 10000001;
191
- --jd-z-index-full-size: 100000;
192
- --jd-z-index-context-menu: 30000005;
193
- --jd-z-index-tooltip: 30000006;
194
-
195
- /**
196
- * Animation and transition
197
- */
198
- --jd-anl-color-new-line: var(--jd-color-border);
199
- --jd-anl-handle-offset: calc(100% - var(--jd-anl-handle-size));
200
- --jd-anl-handle-size: 2rem;
201
- --jd-timeout-button-active: 0.1s;
202
- --jd-transform-button-active: 0.95;
203
-
204
- /**
205
- * Tooltip
206
- */
207
- --jd-tooltip-color: rgb(255 255 255);
208
- --jd-tooltip-background-color: rgb(0 0 0 / 70%);
209
- --jd-tooltip-sfx-shadow: rgb(0 0 0 / 15%);
210
- --jd-tooltip-border-width: 0;
211
- --jd-tooltip-border-color: rgb(229 229 229);
212
- }