@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.
- package/dist/cjs/{index-Dz2LAZQT.js → index-BEF-cqV9.js} +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/mg-action-more_36.cjs.entry.js +178 -79
- package/dist/cjs/mg-alert.cjs.entry.js +6 -2
- package/dist/cjs/mg-breadcrumb.cjs.entry.js +1 -1
- package/dist/cjs/mg-components.cjs.js +3 -3
- package/dist/cjs/mg-fieldset.cjs.entry.js +4 -3
- package/dist/cjs/mg-input-combobox.cjs.entry.js +10 -8
- package/dist/cjs/mg-input-file.cjs.entry.js +5 -4
- package/dist/cjs/mg-input-rich-text-editor.cjs.entry.js +8291 -6518
- package/dist/cjs/mg-input.conf-wgTh7iBb.js +84 -0
- package/dist/cjs/mg-loader.cjs.entry.js +1 -1
- package/dist/cjs/mg-progress.cjs.entry.js +2 -2
- package/dist/collection/assets/icons/index.js +1 -1
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/atoms/internals/mg-input-title/mg-input-title.js +5 -2
- package/dist/collection/components/atoms/mg-badge/mg-badge.js +10 -2
- package/dist/collection/components/atoms/mg-button/mg-button.js +3 -1
- package/dist/collection/components/atoms/mg-card/mg-card.js +14 -6
- package/dist/collection/components/atoms/mg-icon/mg-icon.js +8 -5
- package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js +7 -2
- package/dist/collection/components/molecules/inputs/mg-input/mg-input.js +11 -11
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js +3 -1
- package/dist/collection/components/molecules/inputs/mg-input-combobox/mg-input-combobox.js +10 -7
- package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js +4 -2
- package/dist/collection/components/molecules/inputs/mg-input-file/mg-input-file.js +5 -3
- package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js +3 -1
- package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js +3 -1
- package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js +3 -1
- package/dist/collection/components/molecules/inputs/mg-input-rich-text-editor/mg-input-rich-text-editor.js +3 -1
- package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js +54 -26
- package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js +5 -3
- package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js +3 -1
- package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js +3 -1
- package/dist/collection/components/molecules/internals/mg-item-more/mg-item-more.js +1 -1
- package/dist/collection/components/molecules/menus/mg-menu-item/mg-menu-item.js +4 -2
- package/dist/collection/components/molecules/mg-action-more/mg-action-more.js +1 -1
- package/dist/collection/components/molecules/mg-alert/mg-alert.js +25 -1
- package/dist/collection/components/molecules/mg-details/mg-details.js +3 -1
- package/dist/collection/components/molecules/mg-fieldset/mg-fieldset.js +3 -1
- package/dist/collection/components/molecules/mg-form/mg-form.js +4 -2
- package/dist/collection/components/molecules/mg-message/mg-message.js +39 -2
- package/dist/collection/components/molecules/mg-modal/mg-modal.js +2 -2
- package/dist/collection/components/molecules/mg-panel/mg-panel.js +16 -4
- package/dist/collection/components/molecules/mg-popover/mg-popover-content/mg-popover-content.js +1 -1
- package/dist/collection/components/molecules/mg-popover/mg-popover.js +10 -2
- package/dist/collection/components/molecules/mg-progress/mg-progress.js +1 -1
- package/dist/collection/components/molecules/mg-skip-links/mg-skip-links.js +1 -1
- package/dist/collection/components/molecules/mg-tabs/mg-tabs.js +1 -1
- package/dist/components/index3.js +1 -1
- package/dist/components/index4.js +1 -0
- package/dist/components/mg-action-more.js +1 -1
- package/dist/components/mg-alert.js +1 -1
- package/dist/components/mg-badge2.js +1 -1
- package/dist/components/mg-breadcrumb.js +1 -1
- package/dist/components/mg-button2.js +1 -1
- package/dist/components/mg-card2.js +1 -1
- package/dist/components/mg-character-left2.js +1 -1
- package/dist/components/mg-details.js +1 -1
- package/dist/components/mg-divider2.js +1 -1
- package/dist/components/mg-fieldset.js +1 -1
- package/dist/components/mg-form.js +1 -1
- package/dist/components/mg-icon2.js +1 -1
- package/dist/components/mg-illustrated-message.js +1 -1
- package/dist/components/mg-input-checkbox.js +1 -1
- package/dist/components/mg-input-combobox.js +1 -1
- package/dist/components/mg-input-date.js +1 -1
- package/dist/components/mg-input-file.js +1 -1
- package/dist/components/mg-input-numeric.js +1 -1
- package/dist/components/mg-input-password.js +1 -1
- package/dist/components/mg-input-radio.js +1 -1
- package/dist/components/mg-input-rich-text-editor.js +288 -289
- package/dist/components/mg-input-select2.js +1 -1
- package/dist/components/mg-input-text2.js +1 -1
- package/dist/components/mg-input-textarea.js +1 -1
- package/dist/components/mg-input-title2.js +1 -1
- package/dist/components/mg-input-toggle.js +1 -1
- package/dist/components/mg-input2.js +1 -1
- package/dist/components/mg-item-more2.js +1 -1
- package/dist/components/mg-loader2.js +1 -1
- package/dist/components/mg-menu-item2.js +1 -1
- package/dist/components/mg-message2.js +1 -1
- package/dist/components/mg-modal.js +1 -1
- package/dist/components/mg-pagination.js +1 -1
- package/dist/components/mg-panel.js +1 -1
- package/dist/components/mg-popover-content2.js +1 -1
- package/dist/components/mg-popover2.js +1 -1
- package/dist/components/mg-progress.js +1 -1
- package/dist/components/mg-skip-links.js +1 -1
- package/dist/components/mg-table.js +1 -1
- package/dist/components/mg-tabs2.js +1 -1
- package/dist/components/mg-tooltip2.js +1 -1
- package/dist/custom-elements.json +8828 -0
- package/dist/esm/{index-C3jUhxdI.js → index-DshvCiTL.js} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/mg-action-more_36.entry.js +178 -79
- package/dist/esm/mg-alert.entry.js +6 -2
- package/dist/esm/mg-breadcrumb.entry.js +1 -1
- package/dist/esm/mg-components.js +4 -4
- package/dist/esm/mg-fieldset.entry.js +4 -3
- package/dist/esm/mg-input-combobox.entry.js +10 -8
- package/dist/esm/mg-input-file.entry.js +5 -4
- package/dist/esm/mg-input-rich-text-editor.entry.js +8291 -6518
- package/dist/esm/mg-input.conf-DOi9lJXy.js +73 -0
- package/dist/esm/mg-loader.entry.js +1 -1
- package/dist/esm/mg-progress.entry.js +2 -2
- package/dist/mg-components/mg-components.esm.js +1 -1
- package/dist/mg-components/{p-c1aeb277.entry.js → p-08d3d957.entry.js} +1 -1
- package/dist/mg-components/{p-661da56b.entry.js → p-13feb37a.entry.js} +1 -1
- package/dist/mg-components/{p-8e256086.entry.js → p-7c63e469.entry.js} +1 -1
- package/dist/mg-components/p-7fd3e519.entry.js +1 -0
- package/dist/mg-components/p-9953b835.entry.js +1 -0
- package/dist/mg-components/p-9c0a9fc7.entry.js +1657 -0
- package/dist/mg-components/p-DOi9lJXy.js +1 -0
- package/dist/mg-components/p-a338088e.entry.js +1 -0
- package/dist/mg-components/p-cdb01923.entry.js +1 -0
- package/dist/mg-components/p-d0b6d8f5.entry.js +1 -0
- package/dist/types/assets/icons/index.d.ts +2 -0
- package/dist/types/components/atoms/internals/mg-input-title/mg-input-title.d.ts +4 -0
- package/dist/types/components/atoms/mg-badge/mg-badge.d.ts +4 -0
- package/dist/types/components/molecules/inputs/mg-input-select/mg-input-select.d.ts +12 -6
- package/dist/types/components/molecules/mg-alert/mg-alert.d.ts +4 -0
- package/dist/types/components/molecules/mg-message/mg-message.d.ts +6 -0
- package/dist/types/components.d.ts +22 -0
- package/dist/types/stencil-public-runtime.d.ts +1 -0
- package/ide/intellij/web-types.json +207 -3472
- package/ide/vscode/css-custom-data.json +1 -1
- package/ide/vscode/html-custom-data.json +58 -314
- package/package.json +32 -27
- package/dist/cjs/mg-input.conf-BNpeATnq.js +0 -35
- package/dist/esm/mg-input.conf-C9rmNQIL.js +0 -25
- package/dist/mg-components/p-06fbdb2f.entry.js +0 -1
- package/dist/mg-components/p-188b9ca9.entry.js +0 -1
- package/dist/mg-components/p-4667078d.entry.js +0 -1
- package/dist/mg-components/p-5a859ecf.entry.js +0 -1658
- package/dist/mg-components/p-C9rmNQIL.js +0 -1
- package/dist/mg-components/p-b0b8c58f.entry.js +0 -1
- package/dist/mg-components/p-bbcef41c.entry.js +0 -1
- /package/dist/mg-components/{p-C3jUhxdI.js → p-DshvCiTL.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{transformTag as t,proxyCustomElement as i,HTMLElement as e,createEvent as s,h as a}from"@stencil/core/internal/client";import{C as n,d as r,t as o,i as h}from"./index2.js";import{a as
|
|
1
|
+
import{transformTag as t,proxyCustomElement as i,HTMLElement as e,createEvent as s,h as a}from"@stencil/core/internal/client";import{C as n,d as r,t as o,i as h}from"./index2.js";import{n as l}from"./index3.js";import{a as m,c as p,b as c}from"./mg-input.conf.js";import{i as u}from"./index4.js";import{d}from"./mg-icon2.js";import{d as g}from"./mg-input2.js";import{d as b}from"./mg-input-title2.js";import{d as v}from"./mg-tooltip2.js";import{d as f}from"./mg-tooltip-content2.js";const y=t=>"object"==typeof t&&"string"==typeof t.title&&void 0!==t.value,w=i(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.valueChange=s(this,"value-change",7),this.inputValid=s(this,"input-valid",7),this.inputs=[],this.classVerticalList="mg-c-input--vertical-list",this.hasDisplayedError=!1,this.customErrorMessage={lock:!1},this.name=this.identifier,this.labelOnTop=!1,this.labelHide=!1,this.inputVerticalList=!1,this.required=!1,this.readonly=!1,this.disabled=!1,this.tooltipPosition="input",this.classCollection=new n(["mg-c-input--radio",m]),this.handleInput=t=>{this.checkValidity(),this.value=this.options[t.target.value].value},this.handleBlur=()=>{this.handlerInProgress="blur",this.checkValidity(),this.setErrorMessage(),this.handlerInProgress=void 0},this.checkValidity=()=>{this.setValidity(this.readonly||this.disabled||void 0===this.getInvalidElement())},this.setErrorMessage=(t=!1)=>{const i=this.getInvalidElement();this.errorMessage=void 0,this.valid||(t||this.customErrorMessage.lock&&void 0!==this.customErrorMessage.message?this.errorMessage=this.customErrorMessage.message:i.validity.valueMissing&&(this.errorMessage=this.messages.errors.required))},this.getInvalidElement=()=>this.inputs.find((t=>!t.disabled&&!t.readOnly&&!t.checkValidity()))}watchValue(t){var i;this.readonlyValue=r(this.items)&&"string"==typeof t?t:Array.isArray(this.items)&&this.items.every(y)?null===(i=this.items.find((i=>i.value===t)))||void 0===i?void 0:i.title:null,this.valueChange.emit(t)}validateItems(t){if("object"==typeof t&&t.length<2)throw Error(`<mg-input-radio> prop "items" require at least 2 items. Passed value: ${o(t)}.`);if(r(t))this.options=t.map((t=>({title:t,value:t,disabled:this.disabled})));else{if(!t||!t.every((t=>y(t))))throw Error(`<mg-input-radio> prop "items" is required and all items must be the same type, string or RadioOption. Passed value: ${o(t)}.`);this.options=t}}watchInputVerticalList(t){t?this.classCollection.add(this.classVerticalList):this.classCollection.delete(this.classVerticalList)}watchReadonly(t){t?this.classCollection.add(p):this.classCollection.delete(p)}handleValidityChange(t,i,e){this.inputs.forEach((i=>{i[e]=t})),this.checkValidity(),this.hasDisplayedError&&(this.setErrorMessage(),this.hasDisplayedError=!1)}watchDisabled(t){t?this.classCollection.add(c):this.classCollection.delete(c)}async setFocus(){this.inputs.length>0&&this.inputs[0].focus()}displayError(){return new Promise((t=>{requestAnimationFrame((()=>{this.checkValidity(),this.setErrorMessage(),this.hasDisplayedError=this.invalid,t()}))}))}async setError(t,i,e=!1){if("boolean"!=typeof t)throw Error('<mg-input-radio> method "setError()" param "valid" must be a boolean.');if(void 0!==i&&!h(i))throw Error('<mg-input-radio> method "setError()" param "errorMessage" must be a string.');this.customErrorMessage={lock:!t&&e,message:t?void 0:i},this.setValidity(t),this.setErrorMessage(!0),this.hasDisplayedError=this.invalid}async reset(){if(!this.readonly)return this.value=void 0,new Promise((t=>{requestAnimationFrame((()=>{this.customErrorMessage={lock:!1},this.checkValidity(),this.errorMessage=void 0,this.hasDisplayedError=!1,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=u(this.element).messages,l(this),this.validateItems(this.items),this.watchInputVerticalList(this.inputVerticalList),this.watchReadonly(this.readonly),this.watchDisabled(this.disabled),this.watchValue(this.value),setTimeout((()=>{this.checkValidity()}),0)}render(){return a("mg-input",{key:"a749870b0b690a52d75a5ab6340e26cf0b1449c0",label:this.label,identifier:this.identifier,class:this.classCollection.join(),labelOnTop:this.labelOnTop,labelHide:this.labelHide,required:this.required,tooltip:this.tooltip,tooltipPosition:this.readonly&&!this.value?"label":this.tooltipPosition,helpText:this.helpText,errorMessage:this.errorMessage},this.readonly?this.readonlyValue&&a("b",{class:"mg-c-input__readonly-value"},this.readonlyValue):a("div",{class:"mg-c-input__input-group-container"},this.options.map(((t,i)=>a("div",{key:t.title,class:{"mg-c-input__input-group":!0,"mg-c-input__input-group--disabled":this.disabled||t.disabled}},a("input",{type:"radio",id:this.identifier+"_"+i,name:this.identifier,value:i,checked:JSON.stringify(this.value)===JSON.stringify(this.options[i].value),disabled:this.disabled||t.disabled,required:this.required,onBlur:this.handleBlur,onInput:this.handleInput,ref:t=>{null!==t&&(this.inputs[i]=t)}}),a("label",{htmlFor:this.identifier+"_"+i},t.title))))))}get element(){return this}static get watchers(){return{value:[{watchValue:0}],items:[{validateItems:0}],inputVerticalList:[{watchInputVerticalList:0}],readonly:[{watchReadonly:0},{handleValidityChange:0}],required:[{handleValidityChange:0}],disabled:[{handleValidityChange:0},{watchDisabled:0}]}}static get style(){return".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.mg-c-input--fieldset{padding:0;border:0;margin-right:0;margin-left:0}.mg-c-input.mg-c-input--fieldset input[type=radio],.mg-c-input.mg-c-input--fieldset input[type=checkbox]{width:var(--mg-c-input-check-size);height:var(--mg-c-input-check-size);flex-shrink:0;margin:calc((var(--mg-b-font-size)*var(--mg-b-line-height) - var(--mg-c-input-check-size))/2) var(--mg-b-size-8) 0 0}.mg-c-input.mg-c-input--fieldset .mg-c-input__input-group{display:flex;align-items:start}.mg-c-input.mg-c-input--fieldset .mg-c-input__input-group-container{display:flex;flex-wrap:wrap;padding:0;margin:0;margin-top:calc((var(--mg-b-size-min-height) - var(--mg-b-font-size)*var(--mg-b-line-height))/2);gap:var(--mg-b-size-12) var(--mg-b-size-24);list-style:none}.mg-c-input.mg-c-input--fieldset .mg-c-input__input-group.mg-c-input__input-group--disabled label{opacity:var(--mg-b-opacity-element-disabled)}.mg-c-input.mg-c-input--fieldset.mg-c-input--vertical-list .mg-c-input__input-group-container,.mg-c-input.mg-c-input--fieldset.mg-c-input--checkbox-multi .mg-c-input__input-group-container{flex-direction:column}.mg-c-input.mg-c-input--fieldset.mg-c-input--label-on-top .mg-c-input__input-group-container{margin-top:var(--mg-b-size-8)}.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}}a{color:inherit;text-decoration:underline}a:hover,a:focus,a:active{text-decoration:none}"}},[1,"mg-input-radio",{value:[1032],items:[16],identifier:[1],name:[1],label:[1],labelOnTop:[4,"label-on-top"],labelHide:[4,"label-hide"],inputVerticalList:[4,"input-vertical-list"],required:[4],readonly:[4],disabled:[4],tooltip:[1],tooltipPosition:[1,"tooltip-position"],helpText:[1,"help-text"],valid:[1028],invalid:[1028],classCollection:[32],errorMessage:[32],options:[32],readonlyValue:[32],setFocus:[64],displayError:[64],setError:[64],reset:[64]},void 0,{value:[{watchValue:0}],items:[{validateItems:0}],inputVerticalList:[{watchInputVerticalList:0}],readonly:[{watchReadonly:0},{handleValidityChange:0}],required:[{handleValidityChange:0}],disabled:[{handleValidityChange:0},{watchDisabled:0}]}]);function _(){"undefined"!=typeof customElements&&["mg-input-radio","mg-icon","mg-input","mg-input-title","mg-tooltip","mg-tooltip-content"].forEach((i=>{switch(i){case"mg-input-radio":customElements.get(t(i))||customElements.define(t(i),w);break;case"mg-icon":customElements.get(t(i))||d();break;case"mg-input":customElements.get(t(i))||g();break;case"mg-input-title":customElements.get(t(i))||b();break;case"mg-tooltip":customElements.get(t(i))||v();break;case"mg-tooltip-content":customElements.get(t(i))||f()}}))}_();const x=w,E=_;export{x as MgInputRadio,E as defineCustomElement}
|