@mgdis/mg-components 6.23.0 → 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/mg-action-more_36.cjs.entry.js +20 -12
- package/dist/cjs/mg-input-combobox.cjs.entry.js +7 -6
- package/dist/cjs/mg-input-rich-text-editor.cjs.entry.js +808 -135
- package/dist/cjs/mg-progress.cjs.entry.js +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-combobox/mg-input-combobox.js +7 -6
- package/dist/collection/components/molecules/mg-message/mg-message.js +2 -2
- package/dist/collection/components/molecules/mg-modal/mg-modal.js +2 -2
- package/dist/collection/components/molecules/mg-panel/mg-panel.js +1 -1
- 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/mg-illustrated-message.js +1 -1
- package/dist/components/mg-input-combobox.js +1 -1
- package/dist/components/mg-input-rich-text-editor.js +238 -239
- package/dist/components/mg-message2.js +1 -1
- package/dist/components/mg-modal.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-tabs2.js +1 -1
- package/dist/esm/mg-action-more_36.entry.js +20 -12
- package/dist/esm/mg-input-combobox.entry.js +7 -6
- package/dist/esm/mg-input-rich-text-editor.entry.js +808 -135
- package/dist/esm/mg-progress.entry.js +1 -1
- package/dist/mg-components/mg-components.esm.js +1 -1
- package/dist/mg-components/{p-236bb1d2.entry.js → p-08d3d957.entry.js} +1 -1
- package/dist/mg-components/p-9953b835.entry.js +1 -0
- package/dist/mg-components/{p-d698fa67.entry.js → p-9c0a9fc7.entry.js} +203 -204
- package/dist/mg-components/p-a338088e.entry.js +1 -0
- package/ide/intellij/web-types.json +1 -1
- package/package.json +18 -18
- package/dist/mg-components/p-79265ad3.entry.js +0 -1
- package/dist/mg-components/p-a0e2c886.entry.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{transformTag as e,proxyCustomElement as s,HTMLElement as a,h as c}from"@stencil/core/internal/client";import{C as g,t as r}from"./index2.js";import{d as m}from"./mg-card2.js";import{d as t}from"./mg-icon2.js";const
|
|
1
|
+
import{transformTag as e,proxyCustomElement as s,HTMLElement as a,h as c}from"@stencil/core/internal/client";import{C as g,t as r}from"./index2.js";import{d as m}from"./mg-card2.js";import{d as t}from"./mg-icon2.js";const i=["info","warning","success","danger"],o=["bar-left","background"],n=s(class extends a{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.classBase="mg-c-message",this.classFullWidth="mg-c-message--full-width",this.variant="info",this.variantStyle="bar-left",this.fullWidth=!1,this.classCollection=new g(["mg-c-message"]),this.hasActions=!1,this.getIcon=()=>{switch(this.variant){case"info":return"info-circle";case"warning":return"exclamation-triangle";case"success":return"check-circle";case"danger":return"exclamation-circle"}}}watchVariant(e,s){if(!i.includes(e))throw new Error(`<mg-message> prop "variant" must be one of: ${i.join(", ")}. Passed value: ${r(e)}.`);void 0!==e&&this.classCollection.add(`${this.classBase}--${e}`),void 0!==s&&this.classCollection.delete(`${this.classBase}--${s}`)}watchVariantStyle(e,s){if(!o.includes(e))throw new Error(`<mg-message> prop "variantStyle" must be one of: ${o.join(", ")}. Passed value: ${r(e)}.`);void 0!==e&&this.classCollection.add(`${this.classBase}--${e}`),void 0!==s&&this.classCollection.delete(`${this.classBase}--${s}`)}watchFullWidth(e){e?this.classCollection.add(this.classFullWidth):this.classCollection.delete(this.classFullWidth)}componentWillLoad(){this.watchVariant(this.variant),this.watchVariantStyle(this.variantStyle),this.watchFullWidth(this.fullWidth),this.hasActions=null!==this.element.querySelector('[slot="actions"]')}render(){return c("div",{key:"7a91fbc1a334d006013cdc8dd8ce6bce52947b90",class:this.classCollection.join()},c("mg-card",{key:"8cffef0275a4c8e10f13974577fedc7857a41b7b",shadow:"background"!==this.variantStyle},c("span",{key:"7dea80369d39b5662a2257f7990b847115e7547f",class:"mg-c-message__icon"},c("mg-icon",{key:"843d6ba95d234f7e0e7986fc904058bd8e7dca95",icon:this.getIcon()})),c("div",{key:"903125d7b30bbc386bd9f5c690b38cd3df67a661",class:"mg-c-message__content"},c("span",{key:"3efffe2f4ebe5db86a4d42f156517caf4888e0c9",class:"mg-c-message__content-slot"},c("slot",{key:"f4dc15ab614ab7eb7a6d4c5ad11baba8037f6f18"})),this.hasActions&&[c("span",{class:"mg-c-message__content-separator",key:"content-separator"}),c("span",{class:"mg-c-message__content-actions-slot",key:"content-actions-slot"},c("slot",{key:"4b3861414a1ca22792bb77d0d7bf38280d812aa1",name:"actions"}))])))}get element(){return this}static get watchers(){return{variant:[{watchVariant:0}],variantStyle:[{watchVariantStyle:0}],fullWidth:[{watchFullWidth:0}]}}static get style(){return":host{--mg-c-card-spacing:0;--mg-c-card-border-radius:var(--mg-c-message-border-radius);--mg-c-card-border:none;--mg-c-card-overflow:hidden}.mg-c-message{display:inline-block;min-block-size:var(--mg-b-size-min-height)}.mg-c-message.mg-c-message--danger .mg-c-message__icon{color:var(--mg-b-color-danger)}.mg-c-message.mg-c-message--danger.mg-c-message--bar-left .mg-c-message__content{border-inline-start:var(--mg-b-size-4) solid var(--mg-b-color-danger)}.mg-c-message.mg-c-message--danger.mg-c-message--background{--mg-c-card-color-background:var(--mg-b-color-red-20, color-mix(in srgb, var(--mg-b-color-danger), white 80%))}.mg-c-message.mg-c-message--info .mg-c-message__icon{color:var(--mg-b-color-info)}.mg-c-message.mg-c-message--info.mg-c-message--bar-left .mg-c-message__content{border-inline-start:var(--mg-b-size-4) solid var(--mg-b-color-info)}.mg-c-message.mg-c-message--info.mg-c-message--background{--mg-c-card-color-background:var(--mg-b-color-blue-20, color-mix(in srgb, var(--mg-b-color-info), white 80%))}.mg-c-message.mg-c-message--success .mg-c-message__icon{color:var(--mg-b-color-success)}.mg-c-message.mg-c-message--success.mg-c-message--bar-left .mg-c-message__content{border-inline-start:var(--mg-b-size-4) solid var(--mg-b-color-success)}.mg-c-message.mg-c-message--success.mg-c-message--background{--mg-c-card-color-background:var(--mg-b-color-green-20, color-mix(in srgb, var(--mg-b-color-success), white 80%))}.mg-c-message.mg-c-message--warning .mg-c-message__icon{color:var(--mg-b-color-warning)}.mg-c-message.mg-c-message--warning.mg-c-message--bar-left .mg-c-message__content{border-inline-start:var(--mg-b-size-4) solid var(--mg-b-color-warning)}.mg-c-message.mg-c-message--warning.mg-c-message--background{--mg-c-card-color-background:var(--mg-b-color-yellow-20, color-mix(in srgb, var(--mg-b-color-warning), white 80%))}.mg-c-message.mg-c-message--background{--mg-c-card-border-radius:var(--mg-b-size-8)}.mg-c-message ::slotted(*){padding:0;margin:0}.mg-c-message__icon{position:absolute;inset-block-start:calc((var(--mg-b-size-min-height) - var(--mg-b-size-16))/2);inset-inline-start:var(--mg-b-size-8);line-height:1}.mg-c-message.mg-c-message--bar-left .mg-c-message__icon{inset-inline-start:calc(var(--mg-b-size-4) + var(--mg-b-size-8))}.mg-c-message__content{display:flex;box-sizing:border-box;flex-wrap:wrap;padding-block:0;padding-inline:calc(var(--mg-b-size-8) + var(--mg-b-size-16) + var(--mg-b-size-8)) var(--mg-b-size-8);place-content:stretch flex-end}.mg-c-message__content-slot{flex-grow:1;margin:var(--mg-b-size-8) 0}.mg-c-message__content-separator{display:inline-block;block-size:0;inline-size:var(--mg-b-size-40)}.mg-c-message__content-actions-slot{padding:var(--mg-b-size-8) 0;text-align:end}.mg-c-message ::slotted(*:not(mg-panel,mg-message,mg-modal)){--mg-c-card-border:var(--mg-c-card-border-default);--mg-c-card-spacing:var(--mg-c-card-spacing-default);--mg-c-card-border-radius:var(--mg-c-card-border-radius-default);--mg-c-card-color-background:var(--mg-c-card-color-background-default);--mg-c-card-box-shadow:var(--mg-c-card-box-shadow-default);--mg-c-card-max-width:unset;--mg-c-card-min-width:unset;--mg-c-card-max-height:unset;--mg-c-card-overflow:var(--mg-c-card-overflow-default)}.mg-c-message,.mg-c-message mg-message{max-inline-size:100%}.mg-c-message.mg-c-message--full-width{display:block;inline-size:100%}"}},[257,"mg-message",{variant:[1],variantStyle:[1,"variant-style"],fullWidth:[4,"full-width"],classCollection:[32],hasActions:[32]},void 0,{variant:[{watchVariant:0}],variantStyle:[{watchVariantStyle:0}],fullWidth:[{watchFullWidth:0}]}]);function l(){"undefined"!=typeof customElements&&["mg-message","mg-card","mg-icon"].forEach((s=>{switch(s){case"mg-message":customElements.get(e(s))||customElements.define(e(s),n);break;case"mg-card":customElements.get(e(s))||m();break;case"mg-icon":customElements.get(e(s))||t()}}))}l();export{n as M,l as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{transformTag as e,proxyCustomElement as a,HTMLElement as t,createEvent as i,h as o}from"@stencil/core/internal/client";import{c as d,C as c,a as s,t as l,i as r}from"./index2.js";import{i as m}from"./index4.js";import{d as n}from"./mg-button2.js";import{d as g}from"./mg-card2.js";import{d as h}from"./mg-icon2.js";const
|
|
1
|
+
import{transformTag as e,proxyCustomElement as a,HTMLElement as t,createEvent as i,h as o}from"@stencil/core/internal/client";import{c as d,C as c,a as s,t as l,i as r}from"./index2.js";import{i as m}from"./index4.js";import{d as n}from"./mg-button2.js";import{d as g}from"./mg-card2.js";import{d as h}from"./mg-icon2.js";const f=["dialog","alertdialog"],b=a(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.componentShow=i(this,"component-show",7),this.componentHide=i(this,"component-hide",7),this.componentClose=i(this,"component-close",7),this.titleId="",this.identifier=d("mg-modal"),this.dialogRole="dialog",this.closeButton=!1,this.open=!1,this.hasActions=!1,this.classCollection=new c(["mg-c-modal"]),this.handleClose=()=>{this.open=!1,this.componentClose.emit()}}watchIdentifier(e){if(!s(e))throw Error(`<mg-modal> prop "identifier" value is invalid. Passed value: ${l(e)}.`)}validateDialogRole(e){if(!f.includes(e))throw Error(`<mg-modal> prop "dialogRole" must be one of: ${f.join(", ")}. Passed value: ${l(e)}.`)}validateModalTitle(e){if(!r(e))throw Error(`<mg-modal> prop "modalTitle" is required. Passed value: ${l(e)}.`)}watchOpen(e){e?(this.dialog.showModal(),this.componentShow.emit(),document.body.style.overflow="hidden"):(this.dialog.close(),this.componentHide.emit(),document.body.style.overflow=this.bodyOverflow)}componentWillLoad(){this.bodyOverflow=document.body.style.overflow,this.messages=m(this.element).messages,this.hasActions=null!==this.element.querySelector('[slot="actions"]'),this.titleId=this.identifier+"-title",this.watchIdentifier(this.identifier),this.validateModalTitle(this.modalTitle),this.validateDialogRole(this.dialogRole)}componentDidLoad(){this.watchOpen(this.open),this.dialog.addEventListener("close",(()=>{this.open=!1,this.componentClose.emit()}))}render(){return o("dialog",{key:"7e07f2e52ec70012b98a8cf1097a9a3fde516e90",role:this.dialogRole,id:this.identifier,class:this.classCollection.join(),"aria-labelledby":this.titleId,ref:e=>{null!==e&&(this.dialog=e)}},o("mg-card",{key:"8c1465a6bb2ee834dfb5e56c847ed989de3e7f85",shadow:!0},o("div",{key:"5897cc498704d96f11e0c164f6ca9f466dd796e2",class:"mg-c-modal__dialog"},o("header",{key:"362442dfe15aa7a1a0ee9c5d108eeb4d06267216",class:"mg-c-modal__header"},this.closeButton&&o("span",{key:"3e67791bec888b3d79433ecdfc61f47d6b3be8ec",class:"mg-c-modal__close-button"},o("mg-button",{key:"7d7c4b9947737392e178ce125f77bb6c7d376322","is-icon":!0,variant:"flat",label:this.messages.modal.closeButton,onClick:this.handleClose},o("mg-icon",{key:"27d293b26e3b2e7b36cf92fc02ed7ffae90da736",icon:"cross"}))),o("h1",{key:"fa0a8c9db3a3cd0e7facf944dd0e23786b59191d",class:"mg-c-modal__title",id:this.titleId},this.modalTitle)),o("article",{key:"60079c102f0db39e5b05613ed0b03db167740d47",class:"mg-c-modal__content"},o("slot",{key:"5c52b794b06d07c2206aa05e4ca809f369c06811"})),this.hasActions&&o("footer",{key:"793cf6f99e16b10f5af17691194fd2dd6101a3b7",class:"mg-c-modal__footer"},o("slot",{key:"7d2b3b264a7bf167d5066b14db8fed880e985013",name:"actions"})))))}get element(){return this}static get watchers(){return{identifier:[{watchIdentifier:0}],dialogRole:[{validateDialogRole:0}],modalTitle:[{validateModalTitle:0}],open:[{watchOpen:0}]}}static get style(){return":host{--mg-c-card-border-radius:var(--mg-c-modal-border-radius);--mg-c-card-spacing:var(--mg-b-size-16) var(--mg-b-size-24);--mg-c-card-border:none}.mg-c-modal{max-height:100dvh;box-sizing:border-box;border:none;background:none;color:inherit}.mg-c-modal[open]{display:flex;padding:var(--mg-b-size-24) var(--mg-b-size-8)}.mg-c-modal::backdrop{background-color:var(--mg-b-color-dark);opacity:.65}.mg-c-modal mg-card{display:flex;width:calc(75*var(--mg-b-size-8));max-width:100%;max-height:100dvh}.mg-c-modal__dialog{position:relative;display:flex;height:fit-content;max-height:100%;flex-direction:column;align-self:center;row-gap:var(--mg-b-size-24)}.mg-c-modal__title{margin:0;font-family:var(--mg-b-font-family-heading);font-size:var(--mg-c-modal-title-font-size);font-weight:600}.mg-c-modal__close-button{height:var(--mg-c-modal-title-font-size);margin-top:calc((var(--mg-b-size-min-height) - var(--mg-c-modal-title-font-size)*var(--mg-b-line-height))/2*-1);margin-right:calc((var(--mg-b-size-min-height) - var(--mg-b-size-16))/2*-1);margin-left:var(--mg-b-size-16);float:right}.mg-c-modal__content{padding:var(--mg-b-size-16);margin:calc(var(--mg-b-size-16)*-1);overflow-y:auto}.mg-c-modal ::slotted(*:not(mg-panel,mg-message,mg-modal)){--mg-c-card-border:var(--mg-c-card-border-default);--mg-c-card-spacing:var(--mg-c-card-spacing-default);--mg-c-card-border-radius:var(--mg-c-card-border-radius-default);--mg-c-card-color-background:var(--mg-c-card-color-background-default);--mg-c-card-box-shadow:var(--mg-c-card-box-shadow-default);--mg-c-card-max-width:unset;--mg-c-card-min-width:unset;--mg-c-card-max-height:unset;--mg-c-card-overflow:var(--mg-c-card-overflow-default)}"}},[257,"mg-modal",{identifier:[1],dialogRole:[1,"dialog-role"],modalTitle:[1,"modal-title"],closeButton:[4,"close-button"],open:[1028],hasActions:[32],classCollection:[32]},void 0,{identifier:[{watchIdentifier:0}],dialogRole:[{validateDialogRole:0}],modalTitle:[{validateModalTitle:0}],open:[{watchOpen:0}]}]);function u(){"undefined"!=typeof customElements&&["mg-modal","mg-button","mg-card","mg-icon"].forEach((a=>{switch(a){case"mg-modal":customElements.get(e(a))||customElements.define(e(a),b);break;case"mg-button":customElements.get(e(a))||n();break;case"mg-card":customElements.get(e(a))||g();break;case"mg-icon":customElements.get(e(a))||h()}}))}u();const v=b,p=u;export{v as MgModal,p as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{transformTag as t,proxyCustomElement as e,HTMLElement as i,createEvent as a,h as s}from"@stencil/core/internal/client";import{c as n,C as l,a as o,t as r,i as c}from"./index2.js";import{n as d}from"./index3.js";import{i as h}from"./index4.js";import{d as m}from"./mg-button2.js";import{d as g}from"./mg-card2.js";import{d as p}from"./mg-character-left2.js";import{d as u}from"./mg-icon2.js";import{d as
|
|
1
|
+
import{transformTag as t,proxyCustomElement as e,HTMLElement as i,createEvent as a,h as s}from"@stencil/core/internal/client";import{c as n,C as l,a as o,t as r,i as c}from"./index2.js";import{n as d}from"./index3.js";import{i as h}from"./index4.js";import{d as m}from"./mg-button2.js";import{d as g}from"./mg-card2.js";import{d as p}from"./mg-character-left2.js";import{d as u}from"./mg-icon2.js";import{d as f}from"./mg-input2.js";import{d as b}from"./mg-input-text2.js";import{d as v}from"./mg-input-title2.js";import{d as x}from"./mg-tooltip2.js";import{d as _}from"./mg-tooltip-content2.js";const E=["text","icon"],w=["left","right"],T=e(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.titleChange=a(this,"title-change",7),this.expandedChange=a(this,"expanded-change",7),this.identifier=n("mg-panel"),this.titleEditable=!1,this.titlePosition="left",this.expanded=!1,this.expandToggleDisplay="text",this.expandToggleDisabled=!1,this.shadow=!1,this.classCollection=new l(["mg-c-panel"]),this.isEditing=!1,this.hasPanelTitleSlot=()=>null!==this.element.querySelector('[slot="panel-title"]'),this.toggleIsEditing=()=>{this.isEditing=!this.isEditing},this.handleCollapseButton=()=>{this.expandToggleDisabled||(this.expanded=!this.expanded)},this.handleEditButton=()=>{this.toggleIsEditing()},this.handleUpdateTitle=t=>{this.updatedPanelTitle=t.detail},this.handleCancelEditButton=()=>{this.updatedPanelTitle=void 0,this.toggleIsEditing()},this.handleValidateEditButton=()=>{this.editInputElement.valid&&(void 0!==this.updatedPanelTitle&&(this.panelTitle=this.updatedPanelTitle),this.toggleIsEditing())},this.renderCollapseButton=()=>s("mg-button",{onClick:this.handleCollapseButton,variant:"flat","aria-expanded":""+this.expanded,"aria-controls":this.identifier+"-content",disabled:this.expandToggleDisabled,isIcon:"icon"===this.expandToggleDisplay,label:"icon"===this.expandToggleDisplay?this.panelTitle:void 0},s("span",{class:"mg-c-panel__collapse-button-content"},s("mg-icon",{icon:"chevron-up",class:{"mg-c-panel__collapse-button-icon":!0,"mg-c-panel__collapse-button-icon--reverse":!this.expanded}}),!this.isEditing&&"icon"!==this.expandToggleDisplay&&(this.hasPanelTitleSlot()?s("slot",{name:"panel-title"}):this.panelTitle))),this.renderEditButton=()=>s("mg-button",{key:"edit-button","is-icon":!0,variant:"flat",label:this.messages.panel.editLabel,onClick:this.handleEditButton},s("mg-icon",{icon:"pen"})),this.renderEditInput=()=>s("mg-input-text",{key:"edition-input",label:this.messages.panel.editLabel,"label-hide":!0,value:this.panelTitle,"onValue-change":this.handleUpdateTitle,characterLeftHide:!0,pattern:this.titlePattern,"pattern-error-message":this.titlePatternErrorMessage,identifier:this.identifier+"-edition-input",ref:t=>this.editInputElement=t},s("mg-button",{slot:"append-input",label:this.messages.general.cancel,"is-icon":!0,variant:"secondary",onClick:this.handleCancelEditButton},s("mg-icon",{icon:"cross"})),s("mg-button",{slot:"append-input",label:this.messages.general.confirm,"is-icon":!0,variant:"secondary",onClick:this.handleValidateEditButton},s("mg-icon",{icon:"check"}))),this.renderTitle=()=>{const t=[this.renderCollapseButton()];return this.titleEditable&&!this.hasPanelTitleSlot()&&t.push(this.isEditing?this.renderEditInput():this.renderEditButton()),"right"===this.titlePosition?t.reverse():t},this.renderHeaderChildren=()=>{const t=[s("div",{class:{"mg-c-panel__header-title":!0,"mg-c-panel__header-title--full":this.isEditing,"mg-c-panel__header-title--reverse":"right"===this.titlePosition},key:this.panelTitle},this.renderTitle()),s("div",{class:"mg-c-panel__header-content",key:"slot-header"},s("slot",{name:"header-right"}))];return"right"===this.titlePosition?t.reverse():t}}watchIdentifier(t){o(t)||console.error(`<mg-panel> prop "identifier" value is invalid. Passed value: ${r(t)}.`)}validatePanelTitle(t){if(void 0!==t){if(!c(t))throw Error(`<mg-panel> prop "panelTitle" must be a string. Passed value: ${r(t)}.`);this.titleChange.emit(t)}}validateTitlePattern(t){if(void 0!==t&&!this.titleEditable)throw Error('<mg-panel> prop "titleEditable" must be set to "true".')}validateTitleEditable(t){if(t&&this.hasPanelTitleSlot())throw Error('<mg-panel> prop "titleEditable" cannot be used with panel-title slot.')}validateTitlePosition(t){if(t+""!=""){if(!w.includes(t))throw Error(`<mg-panel> prop "titlePosition" must be one of: ${w.join(", ")}. Passed value: ${r(t)}.`)}else this.titlePosition="left"}handleExpanded(t){this.expandedChange.emit(t)}validateExpandToggleDisplay(t){if(t+""!=""){if(!E.includes(t))throw Error(`<mg-panel> prop "expandToggleDisplay" must be one of: ${E.join(", ")}. Passed value: ${r(t)}.`);if("icon"===t&&this.titleEditable&&(this.titleEditable=!1),"icon"===t&&this.hasPanelTitleSlot())throw Error('<mg-panel> prop "expandToggleDisplay" cannot be "icon" when panel-title slot is used.')}else this.expandToggleDisplay="text"}componentWillLoad(){if(this.messages=h(this.element).messages,d(this),this.watchIdentifier(this.identifier),this.validateTitlePattern(this.titlePattern),this.validateTitlePattern(this.titlePatternErrorMessage),!this.hasPanelTitleSlot()){if(!c(this.panelTitle))throw Error('<mg-panel> prop "panelTitle" is required when panel-title slot is not used.');this.validatePanelTitle(this.panelTitle)}this.validateExpandToggleDisplay(this.expandToggleDisplay),this.validateTitlePosition(this.titlePosition),this.validateTitleEditable(this.titleEditable)}componentDidRender(){this.isEditing&&this.editInputElement.setFocus()}render(){const t=this.identifier+"-header";return s("section",{key:"39d956a9b2c54b794c7ab9f2896dd1152834e8ef",class:this.classCollection.join(),id:this.identifier},s("mg-card",{key:"13d0facc8eb2f4cf0c5cfc7580aafd49d3debf9a",shadow:this.shadow},s("header",{key:"e008bee0a091c655b41712f8f9dff3beadaf437d",class:{"mg-c-panel__header":!0,"mg-c-panel__header--reverse":"right"===this.titlePosition},id:t},this.renderHeaderChildren()),s("article",{key:"a2efbe980ed634f9aeb296eb4c0f7a3f117a8e51",class:"mg-c-panel__content",id:this.identifier+"-content","aria-labelledby":t,hidden:!this.expanded},s("slot",{key:"20849cd8295bed06e647e5befd3906e787dae698"}))))}get element(){return this}static get watchers(){return{identifier:[{watchIdentifier:0}],panelTitle:[{validatePanelTitle:0}],titlePattern:[{validateTitlePattern:0}],titlePatternErrorMessage:[{validateTitlePattern:0}],titleEditable:[{validateTitleEditable:0}],titlePosition:[{validateTitlePosition:0}],expanded:[{handleExpanded:0}],expandToggleDisplay:[{validateExpandToggleDisplay:0}]}}static get style(){return":host{--mg-c-card-spacing:0;--mg-c-card-border-radius:var(--mg-c-panel-border-radius);--mg-c-card-color-background:var(--mg-c-panel-color-background);--mg-c-card-box-shadow:var(--mg-c-panel-box-shadow)}.mg-c-panel__header{display:flex;flex-wrap:wrap;align-items:flex-start;justify-content:space-between;padding:0 var(--mg-b-size-4)}.mg-c-panel__header-title,.mg-c-panel__header-content{display:flex;margin:var(--mg-b-size-4) 0}.mg-c-panel__header-content{min-height:var(--mg-b-size-min-height);flex:1 auto;align-items:center;padding-left:var(--mg-b-size-4)}.mg-c-panel__header-title mg-input-text{flex-grow:1;margin-left:var(--mg-b-size-4)}.mg-c-panel__header-title mg-button+mg-button:not([slot=append-input]){margin-left:var(--mg-b-size-4)}.mg-c-panel__header-title.mg-c-panel__header-title--full{flex:1 1 auto}.mg-c-panel__collapse-button-content{--mg-b-font-size:var(--mg-b-font-size-h5);--mg-c-button-font-weight:600}.mg-c-panel__collapse-button-icon.mg-c-panel__collapse-button-icon--reverse{transform:rotate(180deg)}.mg-c-panel__content{padding:var(--mg-c-panel-content-spacing)}.mg-c-panel ::slotted([slot=header-right]){display:flex;flex-wrap:wrap;margin-left:auto;gap:var(--mg-b-spacing-actions)}.mg-c-panel ::slotted(*:not(mg-panel,mg-message,mg-modal)){--mg-c-card-border:var(--mg-c-card-border-default);--mg-c-card-spacing:var(--mg-c-card-spacing-default);--mg-c-card-border-radius:var(--mg-c-card-border-radius-default);--mg-c-card-color-background:var(--mg-c-card-color-background-default);--mg-c-card-box-shadow:var(--mg-c-card-box-shadow-default);--mg-c-card-max-width:unset;--mg-c-card-min-width:unset;--mg-c-card-max-height:unset;--mg-c-card-overflow:var(--mg-c-card-overflow-default)}"}},[257,"mg-panel",{identifier:[1],panelTitle:[1025,"panel-title"],titlePattern:[1,"title-pattern"],titlePatternErrorMessage:[1,"title-pattern-error-message"],titleEditable:[1028,"title-editable"],titlePosition:[1025,"title-position"],expanded:[1028],expandToggleDisplay:[1025,"expand-toggle-display"],expandToggleDisabled:[4,"expand-toggle-disabled"],shadow:[4],classCollection:[32],isEditing:[32],updatedPanelTitle:[32]},void 0,{identifier:[{watchIdentifier:0}],panelTitle:[{validatePanelTitle:0}],titlePattern:[{validateTitlePattern:0}],titlePatternErrorMessage:[{validateTitlePattern:0}],titleEditable:[{validateTitleEditable:0}],titlePosition:[{validateTitlePosition:0}],expanded:[{handleExpanded:0}],expandToggleDisplay:[{validateExpandToggleDisplay:0}]}]);function k(){"undefined"!=typeof customElements&&["mg-panel","mg-button","mg-card","mg-character-left","mg-icon","mg-input","mg-input-text","mg-input-title","mg-tooltip","mg-tooltip-content"].forEach((e=>{switch(e){case"mg-panel":customElements.get(t(e))||customElements.define(t(e),T);break;case"mg-button":customElements.get(t(e))||m();break;case"mg-card":customElements.get(t(e))||g();break;case"mg-character-left":customElements.get(t(e))||p();break;case"mg-icon":customElements.get(t(e))||u();break;case"mg-input":customElements.get(t(e))||f();break;case"mg-input-text":customElements.get(t(e))||b();break;case"mg-input-title":customElements.get(t(e))||v();break;case"mg-tooltip":customElements.get(t(e))||x();break;case"mg-tooltip-content":customElements.get(t(e))||_()}}))}k();const y=T,P=k;export{y as MgPanel,P as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{transformTag as t,proxyCustomElement as o,HTMLElement as e,createEvent as r,h as a,Host as s}from"@stencil/core/internal/client";import{C as
|
|
1
|
+
import{transformTag as t,proxyCustomElement as o,HTMLElement as e,createEvent as r,h as a,Host as s}from"@stencil/core/internal/client";import{C as d,b as p}from"./index2.js";import{i as c}from"./index4.js";import{d as l}from"./mg-button2.js";import{d as i}from"./mg-card2.js";import{d as m}from"./mg-icon2.js";const n=o(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.hideContent=r(this,"hide-content",7),this.closeButton=!1,this.classCollection=new d(["mg-c-popover-content"]),this.handleCloseButton=()=>{this.hideContent.emit()}}componentWillLoad(){this.messages=c(this.element).messages}componentDidLoad(){const t=["h1","h2","h3","h4","h5","h6"],o=this.element.querySelector('[slot="title"]');if(o&&!p(o,t))throw new Error(`<mg-popover> Slotted title must be a heading: ${t.join(", ")}.`)}render(){return a(s,{key:"e3de7dc2ddf9cba900f1980a6237e95f7a5daea1"},a("mg-card",{key:"775c623b0cfd3f5cb08ce34281ac558a5dfd52df",class:this.classCollection.join(),shadow:!0},this.closeButton&&a("mg-button",{key:"48269416813e32ef03cc4f02dae4e42fb542b053","is-icon":!0,variant:"flat",label:this.messages.general.close,onClick:this.handleCloseButton},a("mg-icon",{key:"d947151a3751052261c3a1d67eca570b6f991d80",icon:"cross"})),a("div",{key:"6c447184b41381b2563dcee874153a55521ff7aa",class:"mg-c-popover-content__title"},a("slot",{key:"5b05e6c30fa020a8765f83d7008b4b9ecad63433",name:"title"})),a("slot",{key:"386dbb305a8862cb55f8b06aa35d08b65051a07d",name:"content"})),a("slot",{key:"16093d6e34d8558677222da720142b7afe443adf",name:"arrow"}))}get element(){return this}static get style(){return':host{position:relative;z-index:2000;display:none;padding:var(--mg-b-size-8);color:var(--mg-c-popover-color-text)}:host([data-show]){display:block}:host([data-popper-placement^=left-start]),:host([data-popper-placement^=left-end]),:host([data-popper-placement^=right-start]),:host([data-popper-placement^=right-end]){padding:0 var(--mg-b-size-8)}.mg-c-popover-content{--mg-c-card-max-width:var(--mg-c-popover-max-width);--mg-c-card-min-width:var(--mg-c-popover-min-width);--mg-c-card-max-height:min( var(--mg-c-popover-max-height), 100vh - calc(var(--mg-b-size-min-height) + var(--mg-b-size-32)) );--mg-c-card-overflow:var(--mg-c-popover-overflow)}.mg-c-popover-content mg-button{margin-top:calc(-1*(var(--mg-b-size-min-height) - var(--mg-c-popover-title-font-size)*var(--mg-b-line-height))/2);margin-right:calc(-1*(var(--mg-b-size-min-height) - var(--mg-b-size-16))/2);margin-left:var(--mg-b-size-32);float:right}.mg-c-popover-content__title ::slotted([slot=title]){margin:0 0 var(--mg-b-size-12) !important;font-size:var(--mg-c-popover-title-font-size) !important;font-weight:600 !important}.mg-c-popover-content ::slotted(*:not(mg-panel,mg-message,mg-modal)){--mg-c-card-border:var(--mg-c-card-border-default);--mg-c-card-spacing:var(--mg-c-card-spacing-default);--mg-c-card-border-radius:var(--mg-c-card-border-radius-default);--mg-c-card-color-background:var(--mg-c-card-color-background-default);--mg-c-card-box-shadow:var(--mg-c-card-box-shadow-default);--mg-c-card-max-width:unset;--mg-c-card-min-width:unset;--mg-c-card-max-height:unset;--mg-c-card-overflow:var(--mg-c-card-overflow-default)}:host([data-popper-placement^=top][data-arrow-hide]){padding-bottom:0}:host([data-popper-placement^=bottom][data-arrow-hide]){padding-top:0}:host([data-popper-placement$=end][data-arrow-hide]),:host([data-popper-placement^=left][data-arrow-hide]){padding-right:0}:host([data-popper-placement$=start][data-arrow-hide]),:host([data-popper-placement^=right][data-arrow-hide]){padding-left:0}::slotted([slot=arrow]){position:absolute;width:calc(var(--mg-b-size-24) + 2*var(--mg-c-popover-border-radius) + 2*var(--mg-b-size-8));height:calc(var(--mg-b-size-24) + 2*var(--mg-c-popover-border-radius) + 2*var(--mg-b-size-8));visibility:hidden}::slotted([slot=arrow])::before{position:absolute;content:"";visibility:visible}:host([data-arrow-hide]) ::slotted([slot=arrow]){display:none}:host([data-popper-placement^=top]) ::slotted([slot=arrow]),:host([data-popper-placement^=bottom]) ::slotted([slot=arrow]){height:var(--mg-b-size-8)}:host([data-popper-placement^=top]) ::slotted([slot=arrow])::before,:host([data-popper-placement^=bottom]) ::slotted([slot=arrow])::before{left:calc(var(--mg-c-popover-border-radius) + var(--mg-b-size-8));border-right:calc(var(--mg-b-size-24)/2) solid rgba(0,0,0,0);border-left:calc(var(--mg-b-size-24)/2) solid rgba(0,0,0,0)}:host([data-popper-placement^=top]) ::slotted([slot=arrow]){bottom:var(--mg-b-size-border);filter:drop-shadow(0 0.5rem 0.25rem color-mix(in srgb, var(--mg-b-color-dark), transparent 85%))}:host([data-popper-placement^=top]) ::slotted([slot=arrow])::before{border-top:var(--mg-b-size-8) solid var(--mg-c-popover-color-background)}:host([data-popper-placement^=bottom]) ::slotted([slot=arrow]){top:var(--mg-b-size-border);filter:drop-shadow(0 -0.5rem 0.25rem color-mix(in srgb, var(--mg-b-color-dark), transparent 85%))}:host([data-popper-placement^=bottom]) ::slotted([slot=arrow])::before{border-bottom:var(--mg-b-size-8) solid var(--mg-c-popover-color-background)}:host([data-popper-placement^=left]) ::slotted([slot=arrow]),:host([data-popper-placement^=right]) ::slotted([slot=arrow]){width:var(--mg-b-size-8)}:host([data-popper-placement^=left]) ::slotted([slot=arrow])::before,:host([data-popper-placement^=right]) ::slotted([slot=arrow])::before{top:calc(var(--mg-c-popover-border-radius) + var(--mg-b-size-8));border-top:calc(var(--mg-b-size-24)/2) solid rgba(0,0,0,0);border-bottom:calc(var(--mg-b-size-24)/2) solid rgba(0,0,0,0)}:host([data-popper-placement^=left]) ::slotted([slot=arrow]){right:var(--mg-b-size-border);filter:drop-shadow(0.5rem 0 0.25rem color-mix(in srgb, var(--mg-b-color-dark), transparent 85%))}:host([data-popper-placement^=left]) ::slotted([slot=arrow])::before{border-left:var(--mg-b-size-8) solid var(--mg-c-popover-color-background)}:host([data-popper-placement^=right]) ::slotted([slot=arrow]){left:var(--mg-b-size-border);filter:drop-shadow(-0.5rem 0 0.25rem color-mix(in srgb, var(--mg-b-color-dark), transparent 85%))}:host([data-popper-placement^=right]) ::slotted([slot=arrow])::before{border-right:var(--mg-b-size-8) solid var(--mg-c-popover-color-background)}:host([data-popper-placement^=left-start]) ::slotted([slot=arrow]),:host([data-popper-placement^=left-end]) ::slotted([slot=arrow]),:host([data-popper-placement^=right-start]) ::slotted([slot=arrow]),:host([data-popper-placement^=right-end]) ::slotted([slot=arrow]){height:calc(var(--mg-b-size-24) + 2*var(--mg-c-popover-border-radius))}:host([data-popper-placement^=left-start]) ::slotted([slot=arrow])::before,:host([data-popper-placement^=left-end]) ::slotted([slot=arrow])::before,:host([data-popper-placement^=right-start]) ::slotted([slot=arrow])::before,:host([data-popper-placement^=right-end]) ::slotted([slot=arrow])::before{top:var(--mg-c-popover-border-radius)}'}},[257,"mg-popover-content",{closeButton:[4,"close-button"],classCollection:[32]}]);function g(){"undefined"!=typeof customElements&&["mg-popover-content","mg-button","mg-card","mg-icon"].forEach((o=>{switch(o){case"mg-popover-content":customElements.get(t(o))||customElements.define(t(o),n);break;case"mg-button":customElements.get(t(o))||l();break;case"mg-card":customElements.get(t(o))||i();break;case"mg-icon":customElements.get(t(o))||m()}}))}g();export{n as M,g as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{transformTag as t,proxyCustomElement as
|
|
1
|
+
import{transformTag as t,proxyCustomElement as i,HTMLElement as e,createEvent as s,h as o,Host as a}from"@stencil/core/internal/client";import{c as n,a as r,t as h,g as c}from"./index2.js";import{d}from"./mg-button2.js";import{d as l}from"./mg-card2.js";import{d as m}from"./mg-icon2.js";import{d as p}from"./mg-popover-content2.js";import{c as v}from"./popper.js";const g=i(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.displayChange=s(this,"display-change",7),this.componentClose=s(this,"component-close",7),this.identifier=n("mg-popover"),this.placement="bottom",this.arrowHide=!1,this.closeButton=!1,this.display=!1,this.disabled=!1,this.clickOutside=t=>{const i=t.composedPath(),s=i.includes(this.element)||i.some((t=>t instanceof e&&t.dataset.mgPopoverGuard===this.identifier));this.disabled||s||(this.display=!1)},this.show=()=>{this.mgPopover.dataset.show="",this.interactiveElement.setAttribute("aria-expanded","true"),this.setPopperListeners(!0),setTimeout((()=>{this.manageClickOutsideListeners("addEventListener")}))},this.hide=()=>{this.mgPopover.removeAttribute("data-show"),this.interactiveElement.setAttribute("aria-expanded","false"),this.setPopperListeners(!1),this.manageClickOutsideListeners("removeEventListener")},this.setPopperListeners=t=>{this.popper.setOptions((i=>Object.assign(Object.assign({},i),{modifiers:[...i.modifiers,{name:"eventListeners",enabled:t}]})))},this.manageClickOutsideListeners=t=>{var i,e;[...Array.from((null===(e=null===(i=document.querySelector(`[data-mg-popover-guard="${this.identifier}"]`))||void 0===i?void 0:i.shadowRoot)||void 0===e?void 0:e.children)||new Set),...this.windows].forEach((i=>{null!==i&&i[t]("click",this.clickOutside,!1)}))},this.handleHideContent=()=>{this.display=!1,this.componentClose.emit()},this.renderPopoverContent=()=>{const t=this.element.querySelector("mg-popover-content");if(null===t){this.mgPopoverContent=document.createElement("mg-popover-content"),this.mgPopoverContent.setAttribute("slot","content"),this.mgPopoverContent.setAttribute("id",this.identifier),this.mgPopoverContent.addEventListener("hide-content",this.handleHideContent);const t=document.createElement("div");t.setAttribute("slot","arrow"),t.dataset.popperArrow="",this.mgPopoverContent.appendChild(t),['[slot="title"]','[slot="content"]:not(mg-popover-content)'].forEach((t=>{Array.from(this.element.querySelectorAll(t)).forEach((t=>{this.mgPopoverContent.appendChild(t)}))})),this.element.appendChild(this.mgPopoverContent)}else t.setAttribute("id",this.identifier)}}validateIdentifier(t){if(!r(t))throw new Error(`<mg-popover> prop "identifier" value is invalid. Passed value: ${h(t)}.`);this.renderPopoverContent()}validateArrowHide(t){t?this.mgPopoverContent.dataset.arrowHide="":delete this.mgPopoverContent.dataset.arrowHide}validateCloseButton(t){this.mgPopoverContent.closeButton=t}handleDisplay(t){t?this.show():this.hide(),this.displayChange.emit(t)}componentDidUpdate(){this.popper.update()}componentWillLoad(){this.windows=c(window),this.renderPopoverContent(),this.validateCloseButton(this.closeButton),this.validateIdentifier(this.identifier),this.validateArrowHide(this.arrowHide)}componentDidLoad(){this.mgPopover=this.element.querySelector(`#${this.identifier}`),this.interactiveElement=this.element.querySelector(":not([slot])"),this.interactiveElement.setAttribute("aria-controls",this.identifier),this.interactiveElement.setAttribute("aria-expanded",`${this.display}`);const t=[];void 0!==this.element.dataset.fallbackPlacement&&t.push(this.element.dataset.fallbackPlacement),this.popper=v(this.interactiveElement,this.mgPopover,{placement:this.placement,strategy:"fixed",modifiers:[{name:"offset",options:{offset:[0,0]}},{name:"flip",options:{fallbackPlacements:[...t,"auto"]}}]}),[this.interactiveElement,this.element.querySelector("mg-popover-content")].forEach((t=>{new ResizeObserver((()=>{this.popper.update()})).observe(t)})),this.interactiveElement.addEventListener("click",(()=>{this.disabled||(this.display=!this.display)})),this.element.addEventListener("click",(t=>{const i=t.target.closest("[popovertargetaction]");!0===this.display&&null!==i&&"hide"===i.getAttribute("popovertargetaction")&&(this.display=!1)})),this.element.addEventListener("keydown",(t=>{this.disabled||"Escape"!==t.code||(this.display=!1,this.componentClose.emit(),this.interactiveElement.focus())})),this.handleDisplay(this.display)}render(){return o(a,{key:"422ac3fe8b6d3784bd667074096996ffe6f52cb6"},o("slot",{key:"c8a2b51b1ca454f823d73ed2e72fff9aa1162b3f"}),o("slot",{key:"3f7c21389b13c497204de5415613c90aeabe3c86",name:"content"}))}get element(){return this}static get watchers(){return{identifier:[{validateIdentifier:0}],arrowHide:[{validateArrowHide:0}],closeButton:[{validateCloseButton:0}],display:[{handleDisplay:0}]}}static get style(){return":host{--mg-c-card-spacing:var(--mg-c-popover-spacing-vertical, var(--mg-b-size-16)) var(--mg-c-popover-spacing-horizontal, var(--mg-b-size-16));--mg-c-card-border:none;--mg-c-card-border-radius:var(--mg-c-popover-border-radius);--mg-c-card-color-background:var(--mg-c-popover-color-background);position:relative;display:contents}:host::slotted(*){display:inline-block}"}},[257,"mg-popover",{identifier:[1],placement:[1],arrowHide:[4,"arrow-hide"],closeButton:[4,"close-button"],display:[1028],disabled:[4]},void 0,{identifier:[{validateIdentifier:0}],arrowHide:[{validateArrowHide:0}],closeButton:[{validateCloseButton:0}],display:[{handleDisplay:0}]}]);function u(){"undefined"!=typeof customElements&&["mg-popover","mg-button","mg-card","mg-icon","mg-popover-content"].forEach((i=>{switch(i){case"mg-popover":customElements.get(t(i))||customElements.define(t(i),g);break;case"mg-button":customElements.get(t(i))||d();break;case"mg-card":customElements.get(t(i))||l();break;case"mg-icon":customElements.get(t(i))||m();break;case"mg-popover-content":customElements.get(t(i))||p()}}))}u();export{g as M,u as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{transformTag as r,proxyCustomElement as e,HTMLElement as s,h as a,Host as t}from"@stencil/core/internal/client";import{i,t as o,p as c}from"./index2.js";const l=["progressbar","meter"],h=e(class extends s{constructor(r){super(),!1!==r&&this.__registerHost(),this.__attachShadow(),this.ariaRole="progressbar",this.value=0,this.min=0,this.max=100}watchLabel(r){if(!i(r))throw Error(`<mg-progress> prop "label" must be a valid string. Passed value: ${o(r)}.`)}watchAriaRole(r){if(r&&!l.includes(r))throw Error(`<mg-progress> prop "ariaRole" must be one of: ${l.join(", ")}. Passed value: ${o(r)}.`)}watchValue(r){if(!(void 0===r||c(r)&&r>=this.min&&r<=this.max))throw Error(`<mg-progress> prop “value” must be a number within the range ${this.min} to ${this.max}. Passed value: ${o(r)}.`)}watchMin(r){if(0!==r&&void 0!==r&&(!c(r)||r>=this.max))throw Error(`<mg-progress> prop “min” must be a number lower than: ${this.max}. Passed value: ${o(r)}.`)}watchMax(r){if(100!==r&&void 0!==r&&(!c(r)||r<=this.min))throw Error(`<mg-progress> prop “max” must be a number greater than: ${this.min}. Passed value: ${o(r)}.`)}componentWillLoad(){this.watchLabel(this.label),this.watchAriaRole(this.ariaRole),this.watchMin(this.min),this.watchMax(this.max),this.watchValue(this.value)}render(){return a(t,{key:"
|
|
1
|
+
import{transformTag as r,proxyCustomElement as e,HTMLElement as s,h as a,Host as t}from"@stencil/core/internal/client";import{i,t as o,p as c}from"./index2.js";const l=["progressbar","meter"],h=e(class extends s{constructor(r){super(),!1!==r&&this.__registerHost(),this.__attachShadow(),this.ariaRole="progressbar",this.value=0,this.min=0,this.max=100}watchLabel(r){if(!i(r))throw Error(`<mg-progress> prop "label" must be a valid string. Passed value: ${o(r)}.`)}watchAriaRole(r){if(r&&!l.includes(r))throw Error(`<mg-progress> prop "ariaRole" must be one of: ${l.join(", ")}. Passed value: ${o(r)}.`)}watchValue(r){if(!(void 0===r||c(r)&&r>=this.min&&r<=this.max))throw Error(`<mg-progress> prop “value” must be a number within the range ${this.min} to ${this.max}. Passed value: ${o(r)}.`)}watchMin(r){if(0!==r&&void 0!==r&&(!c(r)||r>=this.max))throw Error(`<mg-progress> prop “min” must be a number lower than: ${this.max}. Passed value: ${o(r)}.`)}watchMax(r){if(100!==r&&void 0!==r&&(!c(r)||r<=this.min))throw Error(`<mg-progress> prop “max” must be a number greater than: ${this.min}. Passed value: ${o(r)}.`)}componentWillLoad(){this.watchLabel(this.label),this.watchAriaRole(this.ariaRole),this.watchMin(this.min),this.watchMax(this.max),this.watchValue(this.value)}render(){return a(t,{key:"d5027418b3a6fe08cd7e6800fd1cb01a268750f6",role:this.ariaRole,"aria-label":this.label,"aria-valuenow":this.value,"aria-valuemin":this.min,"aria-valuemax":this.max},a("div",{key:"963659f80b05db089d564095a6eaa5558ece4ffd",class:"mg-c-progress"},a("div",{key:"ad019298b3d3ecf3df00946af3e7b897910bbaf7",class:{"mg-c-progress__bar":!0,"mg-c-progress__bar--active":this.value>this.min}},a("div",{key:"921f637985dc611a606ebc4c62da4ba188b3d407",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}]}}static get style(){return".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)}"}},[1,"mg-progress",{label:[1],ariaRole:[1,"aria-role"],value:[2],min:[2],max:[2]},void 0,{label:[{watchLabel:0}],ariaRole:[{watchAriaRole:0}],value:[{watchValue:0}],min:[{watchMin:0}],max:[{watchMax:0}]}]);function g(){"undefined"!=typeof customElements&&["mg-progress"].forEach((e=>{"mg-progress"===e&&(customElements.get(r(e))||customElements.define(r(e),h))}))}g();const m=h,d=g;export{m as MgProgress,d as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{transformTag as i,proxyCustomElement as s,HTMLElement as t,createEvent as n,h as
|
|
1
|
+
import{transformTag as i,proxyCustomElement as s,HTMLElement as t,createEvent as n,h as e}from"@stencil/core/internal/client";import{i as a}from"./index4.js";import{i as l}from"./index2.js";const r=s(class extends t{constructor(i){super(),!1!==i&&this.__registerHost(),this.__attachShadow(),this.goToAnchor=n(this,"go-to-anchor",7),this.handleLinkCLick=i=>{const s=i.currentTarget;s.blur(),this.goToAnchor.emit(s.getAttribute("href"))}}validateLinks(i){if(void 0===i||0===i.length||i.some((i=>!l(i.href)||!i.href.startsWith("#")||!l(i.label))))throw Error('<mg-skip-links> prop "links": Cannot be empty and each link must contains an href starting with a "#" and a non empty label attributes.')}componentWillLoad(){this.validateLinks(this.links),this.messages=a(this.element).messages}render(){return e("nav",{key:"ddae15101123757391d8dced8c88854c852563c1",class:"mg-c-skip-links",role:"navigation","aria-label":this.messages.skipLinks.navLabel},e("ul",{key:"df27b144dbf68f3e2fceeeb8575a81c51b74c4d4",class:"mg-c-skip-links__list",role:"list"},this.links.map((i=>e("li",{key:i.href},e("a",{class:"mg-c-skip-links__link",href:i.href,onClick:this.handleLinkCLick},i.label))))))}get element(){return this}static get watchers(){return{links:[{validateLinks:0}]}}static get style(){return".mg-c-skip-links{position:absolute;display:flex;min-height:var(--mg-b-size-56);align-items:center;background:var(--mg-b-color-light);opacity:0;transform:translateY(-100%)}.mg-c-skip-links:focus-within{position:relative;opacity:1;transform:translateY(0)}.mg-c-skip-links__list{display:flex;flex-wrap:wrap;align-items:center;padding:0 var(--mg-b-size-16);margin:0;gap:var(--mg-b-spacing-actions);list-style:none}.mg-c-skip-links__link{display:inline-block;padding:var(--mg-b-size-8) var(--mg-b-size-16);color:var(--mg-b-color-dark)}.mg-c-skip-links__link:hover{background:color-mix(in srgb, var(--mg-b-color-dark), transparent 90%)}"}},[1,"mg-skip-links",{links:[16]},void 0,{links:[{validateLinks:0}]}]);function o(){"undefined"!=typeof customElements&&["mg-skip-links"].forEach((s=>{"mg-skip-links"===s&&(customElements.get(i(s))||customElements.define(i(s),r))}))}o();const c=r,k=o;export{c as MgSkipLinks,k as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{transformTag as t,proxyCustomElement as a,HTMLElement as i,createEvent as s,h as e}from"@stencil/core/internal/client";import{c as o,C as n,n as r,a as b,t as c,i as g,d as h}from"./index2.js";import{K as l}from"./events.utils.js";import{d as m}from"./mg-badge2.js";import{d}from"./mg-icon2.js";const v={VISIBLE:"visible",HIDDEN:"hidden",DISABLED:"disabled",ACTIVE:"active"},u=t=>"object"==typeof t&&"string"==typeof t.label,_=a(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.activeTabChange=s(this,"active-tab-change",7),this.tabPanel="panel",this.buttonTabBaseClass="mg-c-tabs__navigation-button",this.startIndex=1,this.identifier=o("mg-tabs"),this.tabs=[],this.classCollection=new n(["mg-c-tabs"]),this.isActivableTab=t=>[void 0,v.ACTIVE,v.VISIBLE].includes(t.status),this.tabHasStatus=(t,a)=>t.status===a,this.getElementId=(t,a)=>`${t}-${this.getTabItemIndex(a)}`,this.getTabItemIndex=t=>t+this.startIndex,this.handleClick=t=>{const a=t.currentTarget.dataset.index;this.isActivableTab(this.tabs[Number(a)-this.startIndex])?(this.activeTab=Number(a),this.tabFocus=void 0):t.preventDefault()},this.getNavigationButtonClass=t=>`${this.buttonTabBaseClass}--${t}`,this.handleKeydown=t=>{const a=t.target.parentElement;if([l.ARROWLEFT,l.ARROWRIGHT].includes(t.key)){this.tabFocus=Number(t.target.dataset.index),a.querySelector(`[data-index="${this.tabFocus}"]`).setAttribute("tabindex","-1"),t.key===l.ARROWRIGHT?(this.tabFocus++,this.tabFocus>this.tabs.length&&(this.tabFocus=this.startIndex)):t.key===l.ARROWLEFT&&(this.tabFocus--,this.tabFocus<this.startIndex&&(this.tabFocus=this.tabs.length));const i=a.querySelector(`[data-index="${this.tabFocus}"]`);this.tabHasStatus(this.tabs[this.tabFocus-1],v.HIDDEN)?i.dispatchEvent(new KeyboardEvent("keydown",{key:t.key,bubbles:!0})):(i.setAttribute("tabindex","0"),i.focus())}else t.key===l.TAB&&this.resetFocus()},this.handleDocumentClick=t=>{t.target.closest("mg-tabs")!==this.element&&this.resetFocus()},this.resetFocus=()=>{r((()=>{this.tabFocus=void 0,Array.from(this.element.shadowRoot.querySelectorAll("[data-index]")).forEach(((t,a)=>{t.setAttribute("tabindex",this.activeTab-this.startIndex!==a?"-1":"0")}))}))},this.validateSlots=()=>{if(Array.from(this.element.children).filter((t=>{var a;return null===(a=t.getAttribute("slot"))||void 0===a?void 0:a.includes("tab_content-")})).length!==this.tabs.length)throw new Error("<mg-tabs> Must have slots counts equal to tabs count.")}}watchIdentifier(t){b(t)||console.error(`<mg-tabs> prop "identifier" value is invalid. Passed value: ${c(t)}.`)}validateLabel(t){if(!g(t))throw new Error(`<mg-tabs> prop "label" is required and must be a string. Passed value: ${c(t)}.`)}validateItems(t){if(h(t))this.tabs=t.map((t=>({label:t,status:v.VISIBLE})));else{if(!(Array.isArray(t)&&t.length>0&&t.every(u)))throw new Error(`<mg-tabs> prop "items" is required and all items must be the same type: TabItem. Passed value: ${c(t)}.`);this.tabs=t}}validateActiveTab(t){if(void 0===t)this.activeTab=this.tabs.some((t=>this.tabHasStatus(t,v.ACTIVE)))?this.getTabItemIndex(this.tabs.findIndex((t=>this.tabHasStatus(t,v.ACTIVE)))):this.startIndex;else{if(!("number"==typeof t&&t>=this.startIndex&&t<=this.tabs.length&&this.isActivableTab(this.tabs[t-this.startIndex])))throw new Error(`<mg-tabs> prop "activeTab" must be a number between ${this.startIndex} and ${this.tabs.length} and new value must be "activable". Passed value: ${c(t)}.`);this.tabs.forEach(((a,i)=>{const s=i===t-this.startIndex;this.tabHasStatus(a,v.ACTIVE)&&!s?a.status=v.VISIBLE:this.isActivableTab(a)&&s&&(a.status=v.ACTIVE)})),this.activeTabChange.emit(t)}}componentWillLoad(){this.watchIdentifier(this.identifier),this.validateLabel(this.label),this.validateItems(this.items),this.validateActiveTab(this.activeTab),this.validateSlots()}componentDidLoad(){document.addEventListener("click",this.handleDocumentClick,!1)}disconnectedCallback(){document.removeEventListener("keydown",this.handleDocumentClick)}render(){return e("div",{key:"
|
|
1
|
+
import{transformTag as t,proxyCustomElement as a,HTMLElement as i,createEvent as s,h as e}from"@stencil/core/internal/client";import{c as o,C as n,n as r,a as b,t as c,i as g,d as h}from"./index2.js";import{K as l}from"./events.utils.js";import{d as m}from"./mg-badge2.js";import{d}from"./mg-icon2.js";const v={VISIBLE:"visible",HIDDEN:"hidden",DISABLED:"disabled",ACTIVE:"active"},u=t=>"object"==typeof t&&"string"==typeof t.label,_=a(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.activeTabChange=s(this,"active-tab-change",7),this.tabPanel="panel",this.buttonTabBaseClass="mg-c-tabs__navigation-button",this.startIndex=1,this.identifier=o("mg-tabs"),this.tabs=[],this.classCollection=new n(["mg-c-tabs"]),this.isActivableTab=t=>[void 0,v.ACTIVE,v.VISIBLE].includes(t.status),this.tabHasStatus=(t,a)=>t.status===a,this.getElementId=(t,a)=>`${t}-${this.getTabItemIndex(a)}`,this.getTabItemIndex=t=>t+this.startIndex,this.handleClick=t=>{const a=t.currentTarget.dataset.index;this.isActivableTab(this.tabs[Number(a)-this.startIndex])?(this.activeTab=Number(a),this.tabFocus=void 0):t.preventDefault()},this.getNavigationButtonClass=t=>`${this.buttonTabBaseClass}--${t}`,this.handleKeydown=t=>{const a=t.target.parentElement;if([l.ARROWLEFT,l.ARROWRIGHT].includes(t.key)){this.tabFocus=Number(t.target.dataset.index),a.querySelector(`[data-index="${this.tabFocus}"]`).setAttribute("tabindex","-1"),t.key===l.ARROWRIGHT?(this.tabFocus++,this.tabFocus>this.tabs.length&&(this.tabFocus=this.startIndex)):t.key===l.ARROWLEFT&&(this.tabFocus--,this.tabFocus<this.startIndex&&(this.tabFocus=this.tabs.length));const i=a.querySelector(`[data-index="${this.tabFocus}"]`);this.tabHasStatus(this.tabs[this.tabFocus-1],v.HIDDEN)?i.dispatchEvent(new KeyboardEvent("keydown",{key:t.key,bubbles:!0})):(i.setAttribute("tabindex","0"),i.focus())}else t.key===l.TAB&&this.resetFocus()},this.handleDocumentClick=t=>{t.target.closest("mg-tabs")!==this.element&&this.resetFocus()},this.resetFocus=()=>{r((()=>{this.tabFocus=void 0,Array.from(this.element.shadowRoot.querySelectorAll("[data-index]")).forEach(((t,a)=>{t.setAttribute("tabindex",this.activeTab-this.startIndex!==a?"-1":"0")}))}))},this.validateSlots=()=>{if(Array.from(this.element.children).filter((t=>{var a;return null===(a=t.getAttribute("slot"))||void 0===a?void 0:a.includes("tab_content-")})).length!==this.tabs.length)throw new Error("<mg-tabs> Must have slots counts equal to tabs count.")}}watchIdentifier(t){b(t)||console.error(`<mg-tabs> prop "identifier" value is invalid. Passed value: ${c(t)}.`)}validateLabel(t){if(!g(t))throw new Error(`<mg-tabs> prop "label" is required and must be a string. Passed value: ${c(t)}.`)}validateItems(t){if(h(t))this.tabs=t.map((t=>({label:t,status:v.VISIBLE})));else{if(!(Array.isArray(t)&&t.length>0&&t.every(u)))throw new Error(`<mg-tabs> prop "items" is required and all items must be the same type: TabItem. Passed value: ${c(t)}.`);this.tabs=t}}validateActiveTab(t){if(void 0===t)this.activeTab=this.tabs.some((t=>this.tabHasStatus(t,v.ACTIVE)))?this.getTabItemIndex(this.tabs.findIndex((t=>this.tabHasStatus(t,v.ACTIVE)))):this.startIndex;else{if(!("number"==typeof t&&t>=this.startIndex&&t<=this.tabs.length&&this.isActivableTab(this.tabs[t-this.startIndex])))throw new Error(`<mg-tabs> prop "activeTab" must be a number between ${this.startIndex} and ${this.tabs.length} and new value must be "activable". Passed value: ${c(t)}.`);this.tabs.forEach(((a,i)=>{const s=i===t-this.startIndex;this.tabHasStatus(a,v.ACTIVE)&&!s?a.status=v.VISIBLE:this.isActivableTab(a)&&s&&(a.status=v.ACTIVE)})),this.activeTabChange.emit(t)}}componentWillLoad(){this.watchIdentifier(this.identifier),this.validateLabel(this.label),this.validateItems(this.items),this.validateActiveTab(this.activeTab),this.validateSlots()}componentDidLoad(){document.addEventListener("click",this.handleDocumentClick,!1)}disconnectedCallback(){document.removeEventListener("keydown",this.handleDocumentClick)}render(){return e("div",{key:"25edcc3793e5f060bd3df862ec0c2963c4ec6bdd",class:this.classCollection.join()},e("header",{key:"fe9f0e13f798bb88a4c00e2e5ad8e9adf841b05e",role:"tablist","aria-label":this.label,class:"mg-c-tabs__header"},this.tabs.map(((t,a)=>e("button",{key:t.label,role:"tab",id:this.getElementId(this.identifier,a),class:{[`${this.buttonTabBaseClass}`]:!0,[`${this.buttonTabBaseClass}--horizontal`]:!0,[`${this.getNavigationButtonClass(v.ACTIVE)}`]:this.tabHasStatus(t,v.ACTIVE),[`${this.getNavigationButtonClass(v.DISABLED)}`]:this.tabHasStatus(t,v.DISABLED),[`${this.getNavigationButtonClass(v.HIDDEN)}`]:this.tabHasStatus(t,v.HIDDEN)},tabindex:this.tabHasStatus(t,v.ACTIVE)?0:-1,"aria-selected":this.tabHasStatus(t,v.ACTIVE).toString(),"aria-controls":this.getElementId(this.tabPanel,a),"aria-disabled":this.tabHasStatus(t,v.DISABLED),onClick:this.handleClick,onKeyDown:this.handleKeydown,"data-index":this.getTabItemIndex(a)},void 0!==t.icon&&e("mg-icon",{icon:t.icon,size:"small"}),t.label,void 0!==t.badge&&e("mg-badge",{variant:"text-color",value:t.badge.value,label:t.badge.label,outline:"information"===t.badge.role}))))),this.tabs.map(((t,a)=>e("article",{key:t.label,role:"tabpanel",id:this.getElementId(this.tabPanel,a),hidden:!this.tabHasStatus(t,v.ACTIVE),"aria-labelledby":this.getElementId(this.identifier,a),tabindex:this.tabHasStatus(t,v.ACTIVE)?0:-1,class:"mg-c-tabs__content-container"},e("slot",{name:this.getElementId("tab_content",a)})))))}get element(){return this}static get watchers(){return{identifier:[{watchIdentifier:0}],label:[{validateLabel:0}],items:[{validateItems:0}],activeTab:[{validateActiveTab:0}]}}static get style(){return'.mg-c-tabs__navigation-button{position:relative;display:flex;height:calc(var(--mg-c-tabs-button-spacing-vertical)*2 + var(--mg-c-tabs-height));box-sizing:border-box;align-items:center;padding:var(--mg-c-tabs-button-spacing-vertical) calc(var(--mg-c-tabs-button-margin-horizontal) + var(--mg-c-tabs-button-padding-horizontal)) var(--mg-c-tabs-button-spacing-vertical) calc(var(--mg-c-tabs-button-margin-horizontal) + var(--mg-c-tabs-button-padding-horizontal));border:none;border-radius:var(--mg-b-size-8);background-color:unset;color:var(--mg-c-tabs-color-text, var(--mg-b-color-dark));column-gap:var(--mg-b-size-8);cursor:pointer;font-family:var(--mg-b-font-family);font-weight:400;line-height:var(--mg-b-line-height);text-decoration:none;white-space:nowrap}.mg-c-tabs__navigation-button::after{position:absolute;background-color:var(--mg-c-tabs-color);content:""}.mg-c-tabs__navigation-button:disabled,.mg-c-tabs__navigation-button--disabled{cursor:default;opacity:var(--mg-b-opacity-element-disabled)}.mg-c-tabs__navigation-button:hover,.mg-c-tabs__navigation-button:focus-visible{z-index:10}.mg-c-tabs__navigation-button:hover:not(.mg-c-tabs__navigation-button--disabled)::before,.mg-c-tabs__navigation-button:focus-visible:not(.mg-c-tabs__navigation-button--disabled)::before{position:absolute;z-index:-1;top:0;left:0;width:stretch;height:var(--mg-c-tabs-height);box-sizing:border-box;border-radius:var(--mg-b-size-8);margin-right:var(--mg-c-tabs-button-margin-horizontal);margin-left:var(--mg-c-tabs-button-margin-horizontal);background-color:color-mix(in srgb, var(--mg-c-tabs-color-text, var(--mg-b-color-dark)), transparent 90%);content:""}.mg-c-tabs__navigation-button,.mg-c-tabs__navigation-button ::slotted([slot=label]),.mg-c-tabs__navigation-button ::slotted([slot=metadata]){font-size:var(--mg-b-font-size)}.mg-c-tabs__navigation-button:not(.mg-c-tabs__navigation-button--disabled).mg-c-tabs__navigation-button--horizontal::before{margin:var(--mg-c-tabs-button-spacing-vertical) var(--mg-c-tabs-button-margin-horizontal)}.mg-c-tabs__navigation-button:not(.mg-c-tabs__navigation-button--disabled).mg-c-tabs__navigation-button--vertical::before{height:100%;margin:0 var(--mg-c-tabs-button-margin-horizontal)}.mg-c-tabs__navigation-button.mg-c-tabs__navigation-button--active{color:var(--mg-c-tabs-color);font-weight:600}.mg-c-tabs__navigation-button.mg-c-tabs__navigation-button--active.mg-c-tabs__navigation-button--horizontal::after{bottom:0;left:50%;width:calc(100% - var(--mg-b-size-12)*2);height:var(--mg-b-size-4);border-top-left-radius:var(--mg-b-size-8);border-top-right-radius:var(--mg-b-size-8);transform:translateX(-50%)}.mg-c-tabs__navigation-button.mg-c-tabs__navigation-button--active.mg-c-tabs__navigation-button--vertical::after{top:50%;left:0;width:var(--mg-b-size-4);height:calc(100% - var(--mg-b-size-8)*2);border-bottom-right-radius:var(--mg-b-size-8);border-top-right-radius:var(--mg-b-size-8);transform:translateY(-50%)}.mg-c-tabs__navigation-button.mg-c-tabs__navigation-button--hidden{display:none}.mg-c-tabs__header{display:flex;flex-flow:row wrap;border-bottom:var(--mg-b-size-border) solid var(--mg-b-color-neutral-30)}.mg-c-tabs__content-container:focus-visible{outline:none}.mg-c-tabs__navigation-button-text{flex:0 0 content}.mg-c-tabs__navigation-button.mg-c-tabs__navigation-button--horizontal{--mg-c-tabs-height:var(--mg-b-size-24);--mg-c-tabs-button-spacing-vertical:var(--mg-b-size-8);--mg-c-tabs-button-margin-horizontal:var(--mg-b-size-4);--mg-c-tabs-button-padding-horizontal:var(--mg-b-size-8)}'}},[257,"mg-tabs",{identifier:[1],label:[1],size:[16],items:[16],activeTab:[1538,"active-tab"],tabs:[32],classCollection:[32]},void 0,{identifier:[{watchIdentifier:0}],label:[{validateLabel:0}],items:[{validateItems:0}],activeTab:[{validateActiveTab:0}]}]);function f(){"undefined"!=typeof customElements&&["mg-tabs","mg-badge","mg-icon"].forEach((a=>{switch(a){case"mg-tabs":customElements.get(t(a))||customElements.define(t(a),_);break;case"mg-badge":customElements.get(t(a))||m();break;case"mg-icon":customElements.get(t(a))||d()}}))}f();export{_ as M,v as S,f as d}
|
|
@@ -1203,7 +1203,7 @@ const sizes$1 = ['small', 'medium', 'large'];
|
|
|
1203
1203
|
*/
|
|
1204
1204
|
const directions = ['vertical', 'horizontal'];
|
|
1205
1205
|
|
|
1206
|
-
const mgIllustratedMessageCss = () => `.mg-c-illustrated-message{display:flex;box-sizing:border-box;flex-direction:column;justify-content:center;padding:var(--mg-c-illustrated-message-spacing-vertical) var(--mg-b-size-16);margin:auto;gap:var(--mg-b-size-16) var(--mg-b-size-64);max-inline-size:calc(60*var(--mg-b-size-8));text-align:center}.mg-c-illustrated-message__illustration{max-block-size:calc(15*var(--mg-b-size-8))}.mg-c-illustrated-message__illustration ::slotted([slot=illustration]){block-size:auto;inline-size:100%;max-block-size:calc(15*var(--mg-b-size-8));max-inline-size:calc(15*var(--mg-b-size-8))}.mg-c-illustrated-message__slots{display:flex;flex-direction:column;gap:var(--mg-b-size-8)}.mg-c-illustrated-message__slots ::slotted([slot=title]){margin:0;font-family:var(--mg-b-font-family-heading) !important;font-size:var(--mg-b-font-size-h2) !important}.mg-c-illustrated-message__slots ::slotted([slot=details]){margin:0}.mg-c-illustrated-message.mg-c-illustrated-message--size-small{--mg-c-illustrated-message-spacing-vertical:var(--mg-b-size-24)}.mg-c-illustrated-message.mg-c-illustrated-message--size-small .mg-c-illustrated-message__slots{gap:calc(var(--mg-b-size-4)/2)}.mg-c-illustrated-message.mg-c-illustrated-message--size-small .mg-c-illustrated-message__illustration{max-block-size:var(--mg-b-size-64)}.mg-c-illustrated-message.mg-c-illustrated-message--size-small .mg-c-illustrated-message__illustration ::slotted([slot=illustration]){max-block-size:var(--mg-b-size-64);max-inline-size:var(--mg-b-size-64)}.mg-c-illustrated-message.mg-c-illustrated-message--size-large .mg-c-illustrated-message__illustration{max-block-size:calc(23*var(--mg-b-size-8))}.mg-c-illustrated-message.mg-c-illustrated-message--size-large .mg-c-illustrated-message__illustration ::slotted([slot=illustration]){max-block-size:calc(23*var(--mg-b-size-8));max-inline-size:calc(23*var(--mg-b-size-8))}.mg-c-illustrated-message.mg-c-illustrated-message--direction-horizontal{max-inline-size:unset}.mg-c-illustrated-message.mg-c-illustrated-message--direction-horizontal .mg-c-illustrated-message__slots{max-inline-size:calc(60*var(--mg-b-size-8))}@container (width > 52.8rem){.mg-c-illustrated-message.mg-c-illustrated-message--direction-horizontal{flex-direction:row;align-items:center;column-gap:var(--mg-b-size-48);text-align:left}.mg-c-illustrated-message.mg-c-illustrated-message--direction-horizontal .mg-c-illustrated-message__slots{max-inline-size:unset}.mg-c-illustrated-message.mg-c-illustrated-message--direction-horizontal .mg-c-illustrated-message__illustration{flex:1 0 auto;max-inline-size:fit-content}.mg-c-illustrated-message.mg-c-illustrated-message--direction-horizontal.mg-c-illustrated-message--size-small{column-gap:var(--mg-b-size-24)}.mg-c-illustrated-message.mg-c-illustrated-message--direction-horizontal.mg-c-illustrated-message--size-large{column-gap:var(--mg-b-size-64)}}:host{display:block;container-type:inline-size}`;
|
|
1206
|
+
const mgIllustratedMessageCss = () => `.mg-c-illustrated-message{display:flex;box-sizing:border-box;flex-direction:column;justify-content:center;padding:var(--mg-c-illustrated-message-spacing-vertical) var(--mg-b-size-16);margin:auto;gap:var(--mg-b-size-16) var(--mg-b-size-64);max-inline-size:calc(60*var(--mg-b-size-8));text-align:center}.mg-c-illustrated-message__illustration{max-block-size:calc(15*var(--mg-b-size-8))}.mg-c-illustrated-message__illustration ::slotted([slot=illustration]){block-size:auto;inline-size:100%;max-block-size:calc(15*var(--mg-b-size-8));max-inline-size:calc(15*var(--mg-b-size-8))}.mg-c-illustrated-message__slots{display:flex;flex-direction:column;gap:var(--mg-b-size-8)}.mg-c-illustrated-message__slots ::slotted([slot=title]){margin:0;font-family:var(--mg-b-font-family-heading) !important;font-size:var(--mg-b-font-size-h2) !important}.mg-c-illustrated-message__slots ::slotted([slot=details]){margin:0}.mg-c-illustrated-message.mg-c-illustrated-message--size-small{--mg-c-illustrated-message-spacing-vertical:var(--mg-b-size-24)}.mg-c-illustrated-message.mg-c-illustrated-message--size-small .mg-c-illustrated-message__slots{gap:calc(var(--mg-b-size-4)/2)}.mg-c-illustrated-message.mg-c-illustrated-message--size-small .mg-c-illustrated-message__illustration{max-block-size:var(--mg-b-size-64)}.mg-c-illustrated-message.mg-c-illustrated-message--size-small .mg-c-illustrated-message__illustration ::slotted([slot=illustration]){max-block-size:var(--mg-b-size-64);max-inline-size:var(--mg-b-size-64)}.mg-c-illustrated-message.mg-c-illustrated-message--size-large .mg-c-illustrated-message__illustration{max-block-size:calc(23*var(--mg-b-size-8))}.mg-c-illustrated-message.mg-c-illustrated-message--size-large .mg-c-illustrated-message__illustration ::slotted([slot=illustration]){max-block-size:calc(23*var(--mg-b-size-8));max-inline-size:calc(23*var(--mg-b-size-8))}.mg-c-illustrated-message.mg-c-illustrated-message--direction-horizontal{max-inline-size:unset}.mg-c-illustrated-message.mg-c-illustrated-message--direction-horizontal .mg-c-illustrated-message__slots{max-inline-size:calc(60*var(--mg-b-size-8))}.mg-c-illustrated-message.mg-c-illustrated-message--direction-horizontal .mg-c-illustrated-message__illustration ::slotted(img[slot=illustration]){block-size:calc(15*var(--mg-b-size-8));inline-size:auto}.mg-c-illustrated-message.mg-c-illustrated-message--direction-horizontal.mg-c-illustrated-message--size-small .mg-c-illustrated-message__illustration ::slotted(img[slot=illustration]){block-size:var(--mg-b-size-64)}.mg-c-illustrated-message.mg-c-illustrated-message--direction-horizontal.mg-c-illustrated-message--size-large .mg-c-illustrated-message__illustration ::slotted(img[slot=illustration]){block-size:calc(23*var(--mg-b-size-8))}@container (width > 52.8rem){.mg-c-illustrated-message.mg-c-illustrated-message--direction-horizontal{flex-direction:row;align-items:center;column-gap:var(--mg-b-size-48);text-align:left}.mg-c-illustrated-message.mg-c-illustrated-message--direction-horizontal .mg-c-illustrated-message__slots{max-inline-size:unset}.mg-c-illustrated-message.mg-c-illustrated-message--direction-horizontal .mg-c-illustrated-message__illustration{flex:1 0 auto;max-inline-size:fit-content}.mg-c-illustrated-message.mg-c-illustrated-message--direction-horizontal.mg-c-illustrated-message--size-small{column-gap:var(--mg-b-size-24)}.mg-c-illustrated-message.mg-c-illustrated-message--direction-horizontal.mg-c-illustrated-message--size-large{column-gap:var(--mg-b-size-64)}}:host{display:block;container-type:inline-size;inline-size:100%}`;
|
|
1207
1207
|
|
|
1208
1208
|
const MgIllustratedMessage = class {
|
|
1209
1209
|
constructor(hostRef) {
|
|
@@ -6250,7 +6250,7 @@ const variants$1 = ['info', 'warning', 'success', 'danger'];
|
|
|
6250
6250
|
*/
|
|
6251
6251
|
const variantStyles = ['bar-left', 'background'];
|
|
6252
6252
|
|
|
6253
|
-
const mgMessageCss = () => `:host{--mg-c-card-spacing:0;--mg-c-card-border-radius:var(--mg-c-message-border-radius);--mg-c-card-border:none;--mg-c-card-overflow:hidden}.mg-c-message{display:inline-block;min-block-size:var(--mg-b-size-min-height)}.mg-c-message.mg-c-message--danger .mg-c-message__icon{color:var(--mg-b-color-danger)}.mg-c-message.mg-c-message--danger.mg-c-message--bar-left .mg-c-
|
|
6253
|
+
const mgMessageCss = () => `:host{--mg-c-card-spacing:0;--mg-c-card-border-radius:var(--mg-c-message-border-radius);--mg-c-card-border:none;--mg-c-card-overflow:hidden}.mg-c-message{display:inline-block;min-block-size:var(--mg-b-size-min-height)}.mg-c-message.mg-c-message--danger .mg-c-message__icon{color:var(--mg-b-color-danger)}.mg-c-message.mg-c-message--danger.mg-c-message--bar-left .mg-c-message__content{border-inline-start:var(--mg-b-size-4) solid var(--mg-b-color-danger)}.mg-c-message.mg-c-message--danger.mg-c-message--background{--mg-c-card-color-background:var(--mg-b-color-red-20, color-mix(in srgb, var(--mg-b-color-danger), white 80%))}.mg-c-message.mg-c-message--info .mg-c-message__icon{color:var(--mg-b-color-info)}.mg-c-message.mg-c-message--info.mg-c-message--bar-left .mg-c-message__content{border-inline-start:var(--mg-b-size-4) solid var(--mg-b-color-info)}.mg-c-message.mg-c-message--info.mg-c-message--background{--mg-c-card-color-background:var(--mg-b-color-blue-20, color-mix(in srgb, var(--mg-b-color-info), white 80%))}.mg-c-message.mg-c-message--success .mg-c-message__icon{color:var(--mg-b-color-success)}.mg-c-message.mg-c-message--success.mg-c-message--bar-left .mg-c-message__content{border-inline-start:var(--mg-b-size-4) solid var(--mg-b-color-success)}.mg-c-message.mg-c-message--success.mg-c-message--background{--mg-c-card-color-background:var(--mg-b-color-green-20, color-mix(in srgb, var(--mg-b-color-success), white 80%))}.mg-c-message.mg-c-message--warning .mg-c-message__icon{color:var(--mg-b-color-warning)}.mg-c-message.mg-c-message--warning.mg-c-message--bar-left .mg-c-message__content{border-inline-start:var(--mg-b-size-4) solid var(--mg-b-color-warning)}.mg-c-message.mg-c-message--warning.mg-c-message--background{--mg-c-card-color-background:var(--mg-b-color-yellow-20, color-mix(in srgb, var(--mg-b-color-warning), white 80%))}.mg-c-message.mg-c-message--background{--mg-c-card-border-radius:var(--mg-b-size-8)}.mg-c-message ::slotted(*){padding:0;margin:0}.mg-c-message__icon{position:absolute;inset-block-start:calc((var(--mg-b-size-min-height) - var(--mg-b-size-16))/2);inset-inline-start:var(--mg-b-size-8);line-height:1}.mg-c-message.mg-c-message--bar-left .mg-c-message__icon{inset-inline-start:calc(var(--mg-b-size-4) + var(--mg-b-size-8))}.mg-c-message__content{display:flex;box-sizing:border-box;flex-wrap:wrap;padding-block:0;padding-inline:calc(var(--mg-b-size-8) + var(--mg-b-size-16) + var(--mg-b-size-8)) var(--mg-b-size-8);place-content:stretch flex-end}.mg-c-message__content-slot{flex-grow:1;margin:var(--mg-b-size-8) 0}.mg-c-message__content-separator{display:inline-block;block-size:0;inline-size:var(--mg-b-size-40)}.mg-c-message__content-actions-slot{padding:var(--mg-b-size-8) 0;text-align:end}.mg-c-message ::slotted(*:not(mg-panel,mg-message,mg-modal)){--mg-c-card-border:var(--mg-c-card-border-default);--mg-c-card-spacing:var(--mg-c-card-spacing-default);--mg-c-card-border-radius:var(--mg-c-card-border-radius-default);--mg-c-card-color-background:var(--mg-c-card-color-background-default);--mg-c-card-box-shadow:var(--mg-c-card-box-shadow-default);--mg-c-card-max-width:unset;--mg-c-card-min-width:unset;--mg-c-card-max-height:unset;--mg-c-card-overflow:var(--mg-c-card-overflow-default)}.mg-c-message,.mg-c-message mg-message{max-inline-size:100%}.mg-c-message.mg-c-message--full-width{display:block;inline-size:100%}`;
|
|
6254
6254
|
|
|
6255
6255
|
const MgMessage = class {
|
|
6256
6256
|
constructor(hostRef) {
|
|
@@ -6346,9 +6346,9 @@ const MgMessage = class {
|
|
|
6346
6346
|
* @returns HTML Element
|
|
6347
6347
|
*/
|
|
6348
6348
|
render() {
|
|
6349
|
-
return (h("div", { key: '7a91fbc1a334d006013cdc8dd8ce6bce52947b90', class: this.classCollection.join() }, h("mg-card", { key: '
|
|
6349
|
+
return (h("div", { key: '7a91fbc1a334d006013cdc8dd8ce6bce52947b90', class: this.classCollection.join() }, h("mg-card", { key: '8cffef0275a4c8e10f13974577fedc7857a41b7b', shadow: this.variantStyle !== 'background' }, h("span", { key: '7dea80369d39b5662a2257f7990b847115e7547f', class: "mg-c-message__icon" }, h("mg-icon", { key: '843d6ba95d234f7e0e7986fc904058bd8e7dca95', icon: this.getIcon() })), h("div", { key: '903125d7b30bbc386bd9f5c690b38cd3df67a661', class: "mg-c-message__content" }, h("span", { key: '3efffe2f4ebe5db86a4d42f156517caf4888e0c9', class: "mg-c-message__content-slot" }, h("slot", { key: 'f4dc15ab614ab7eb7a6d4c5ad11baba8037f6f18' })), this.hasActions && [
|
|
6350
6350
|
h("span", { class: "mg-c-message__content-separator", key: "content-separator" }),
|
|
6351
|
-
h("span", { class: "mg-c-message__content-actions-slot", key: "content-actions-slot" }, h("slot", { key: '
|
|
6351
|
+
h("span", { class: "mg-c-message__content-actions-slot", key: "content-actions-slot" }, h("slot", { key: '4b3861414a1ca22792bb77d0d7bf38280d812aa1', name: "actions" })),
|
|
6352
6352
|
]))));
|
|
6353
6353
|
}
|
|
6354
6354
|
get element() { return getElement(this); }
|
|
@@ -6477,11 +6477,11 @@ const MgModal = class {
|
|
|
6477
6477
|
* @returns HTML Element
|
|
6478
6478
|
*/
|
|
6479
6479
|
render() {
|
|
6480
|
-
return (h("dialog", { key: '
|
|
6480
|
+
return (h("dialog", { key: '7e07f2e52ec70012b98a8cf1097a9a3fde516e90', role: this.dialogRole, id: this.identifier, class: this.classCollection.join(), "aria-labelledby": this.titleId, ref: (el) => {
|
|
6481
6481
|
if (el !== null) {
|
|
6482
6482
|
this.dialog = el;
|
|
6483
6483
|
}
|
|
6484
|
-
} }, h("mg-card", { key: '
|
|
6484
|
+
} }, h("mg-card", { key: '8c1465a6bb2ee834dfb5e56c847ed989de3e7f85', shadow: true }, h("div", { key: '5897cc498704d96f11e0c164f6ca9f466dd796e2', class: "mg-c-modal__dialog" }, h("header", { key: '362442dfe15aa7a1a0ee9c5d108eeb4d06267216', class: "mg-c-modal__header" }, this.closeButton && (h("span", { key: '3e67791bec888b3d79433ecdfc61f47d6b3be8ec', class: "mg-c-modal__close-button" }, h("mg-button", { key: '7d7c4b9947737392e178ce125f77bb6c7d376322', "is-icon": true, variant: "flat", label: this.messages.modal.closeButton, onClick: this.handleClose }, h("mg-icon", { key: '27d293b26e3b2e7b36cf92fc02ed7ffae90da736', icon: "cross" })))), h("h1", { key: 'fa0a8c9db3a3cd0e7facf944dd0e23786b59191d', class: "mg-c-modal__title", id: this.titleId }, this.modalTitle)), h("article", { key: '60079c102f0db39e5b05613ed0b03db167740d47', class: "mg-c-modal__content" }, h("slot", { key: '5c52b794b06d07c2206aa05e4ca809f369c06811' })), this.hasActions && (h("footer", { key: '793cf6f99e16b10f5af17691194fd2dd6101a3b7', class: "mg-c-modal__footer" }, h("slot", { key: '7d2b3b264a7bf167d5066b14db8fed880e985013', name: "actions" })))))));
|
|
6485
6485
|
}
|
|
6486
6486
|
get element() { return getElement(this); }
|
|
6487
6487
|
static get watchers() { return {
|
|
@@ -6904,7 +6904,7 @@ const MgPanel = class {
|
|
|
6904
6904
|
*/
|
|
6905
6905
|
render() {
|
|
6906
6906
|
const headerId = `${this.identifier}-header`;
|
|
6907
|
-
return (h("section", { key: '
|
|
6907
|
+
return (h("section", { key: '39d956a9b2c54b794c7ab9f2896dd1152834e8ef', class: this.classCollection.join(), id: this.identifier }, h("mg-card", { key: '13d0facc8eb2f4cf0c5cfc7580aafd49d3debf9a', shadow: this.shadow }, h("header", { key: 'e008bee0a091c655b41712f8f9dff3beadaf437d', class: { 'mg-c-panel__header': true, 'mg-c-panel__header--reverse': this.titlePosition === 'right' }, id: headerId }, this.renderHeaderChildren()), h("article", { key: 'a2efbe980ed634f9aeb296eb4c0f7a3f117a8e51', class: "mg-c-panel__content", id: `${this.identifier}-content`, "aria-labelledby": headerId, hidden: !this.expanded }, h("slot", { key: '20849cd8295bed06e647e5befd3906e787dae698' })))));
|
|
6908
6908
|
}
|
|
6909
6909
|
get element() { return getElement(this); }
|
|
6910
6910
|
static get watchers() { return {
|
|
@@ -8762,7 +8762,15 @@ const MgPopover = class {
|
|
|
8762
8762
|
* @param event - mouse event
|
|
8763
8763
|
*/
|
|
8764
8764
|
this.clickOutside = (event) => {
|
|
8765
|
-
|
|
8765
|
+
// `click` is a composed event, so `composedPath()` lists every node it travels
|
|
8766
|
+
// through, including across shadow boundaries. Relying on it instead of
|
|
8767
|
+
// `event.target` keeps the popover open when it (or its guarded trigger) is
|
|
8768
|
+
// nested inside another component's shadow DOM: there `event.target` is
|
|
8769
|
+
// retargeted to the outer shadow host and `closest()` cannot reach the popover
|
|
8770
|
+
// nor the `data-mg-popover-guard` element.
|
|
8771
|
+
const path = event.composedPath();
|
|
8772
|
+
const isInside = path.includes(this.element) || path.some(node => node instanceof HTMLElement && node.dataset.mgPopoverGuard === this.identifier);
|
|
8773
|
+
if (!this.disabled && !isInside) {
|
|
8766
8774
|
this.display = false;
|
|
8767
8775
|
}
|
|
8768
8776
|
};
|
|
@@ -8966,7 +8974,7 @@ const MgPopover = class {
|
|
|
8966
8974
|
* @returns HTML Element
|
|
8967
8975
|
*/
|
|
8968
8976
|
render() {
|
|
8969
|
-
return (h(Host, { key: '
|
|
8977
|
+
return (h(Host, { key: '422ac3fe8b6d3784bd667074096996ffe6f52cb6' }, h("slot", { key: 'c8a2b51b1ca454f823d73ed2e72fff9aa1162b3f' }), h("slot", { key: '3f7c21389b13c497204de5415613c90aeabe3c86', name: "content" })));
|
|
8970
8978
|
}
|
|
8971
8979
|
get element() { return getElement(this); }
|
|
8972
8980
|
static get watchers() { return {
|
|
@@ -9032,7 +9040,7 @@ const MgPopoverContent = class {
|
|
|
9032
9040
|
* @returns HTML Element
|
|
9033
9041
|
*/
|
|
9034
9042
|
render() {
|
|
9035
|
-
return (h(Host, { key: '
|
|
9043
|
+
return (h(Host, { key: 'e3de7dc2ddf9cba900f1980a6237e95f7a5daea1' }, h("mg-card", { key: '775c623b0cfd3f5cb08ce34281ac558a5dfd52df', class: this.classCollection.join(), shadow: true }, this.closeButton && (h("mg-button", { key: '48269416813e32ef03cc4f02dae4e42fb542b053', "is-icon": true, variant: "flat", label: this.messages.general.close, onClick: this.handleCloseButton }, h("mg-icon", { key: 'd947151a3751052261c3a1d67eca570b6f991d80', icon: "cross" }))), h("div", { key: '6c447184b41381b2563dcee874153a55521ff7aa', class: "mg-c-popover-content__title" }, h("slot", { key: '5b05e6c30fa020a8765f83d7008b4b9ecad63433', name: "title" })), h("slot", { key: '386dbb305a8862cb55f8b06aa35d08b65051a07d', name: "content" })), h("slot", { key: '16093d6e34d8558677222da720142b7afe443adf', name: "arrow" })));
|
|
9036
9044
|
}
|
|
9037
9045
|
get element() { return getElement(this); }
|
|
9038
9046
|
};
|
|
@@ -9077,7 +9085,7 @@ const MgSkipLinks = class {
|
|
|
9077
9085
|
* @returns HTML Element
|
|
9078
9086
|
*/
|
|
9079
9087
|
render() {
|
|
9080
|
-
return (h("nav", { key: '
|
|
9088
|
+
return (h("nav", { key: 'ddae15101123757391d8dced8c88854c852563c1', class: "mg-c-skip-links", role: "navigation", "aria-label": this.messages.skipLinks.navLabel }, h("ul", { key: 'df27b144dbf68f3e2fceeeb8575a81c51b74c4d4', class: "mg-c-skip-links__list", role: "list" }, this.links.map(link => (h("li", { key: link.href }, h("a", { class: "mg-c-skip-links__link", href: link.href, onClick: this.handleLinkCLick }, link.label)))))));
|
|
9081
9089
|
}
|
|
9082
9090
|
get element() { return getElement(this); }
|
|
9083
9091
|
static get watchers() { return {
|
|
@@ -9611,7 +9619,7 @@ const MgTabs = class {
|
|
|
9611
9619
|
* @returns HTML Element
|
|
9612
9620
|
*/
|
|
9613
9621
|
render() {
|
|
9614
|
-
return (h("div", { key: '
|
|
9622
|
+
return (h("div", { key: '25edcc3793e5f060bd3df862ec0c2963c4ec6bdd', class: this.classCollection.join() }, h("header", { key: 'fe9f0e13f798bb88a4c00e2e5ad8e9adf841b05e', role: "tablist", "aria-label": this.label, class: "mg-c-tabs__header" }, this.tabs.map((tab, index) => (h("button", { key: tab.label, role: "tab", id: this.getElementId(this.identifier, index), class: {
|
|
9615
9623
|
[`${this.buttonTabBaseClass}`]: true,
|
|
9616
9624
|
[`${this.buttonTabBaseClass}--horizontal`]: true,
|
|
9617
9625
|
[`${this.getNavigationButtonClass(Status.ACTIVE)}`]: this.tabHasStatus(tab, Status.ACTIVE),
|
|
@@ -479,11 +479,12 @@ const MgInputCombobox = class {
|
|
|
479
479
|
});
|
|
480
480
|
const total = Number(getObjectValueFromKey(json, this.fetchmappings.response.total, 0));
|
|
481
481
|
let next = getObjectValueFromKey(json, this.fetchmappings.response.next);
|
|
482
|
-
if (
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
482
|
+
if (Boolean(next) && !URL.canParse(next)) {
|
|
483
|
+
// `next` is a relative link returned by the API: resolve it against the request URL (RFC 3986).
|
|
484
|
+
// The request URL is first made absolute against the document base so a root-relative `fetchurl`
|
|
485
|
+
// resolves the next page on the API path, not against the document location (which would 404).
|
|
486
|
+
const requestUrl = new URL(updateUrl, this.element.ownerDocument.baseURI);
|
|
487
|
+
next = new URL(next, requestUrl).toString();
|
|
487
488
|
}
|
|
488
489
|
return { items, total, next, top: items.length };
|
|
489
490
|
}
|
|
@@ -768,7 +769,7 @@ const MgInputCombobox = class {
|
|
|
768
769
|
else {
|
|
769
770
|
activeDescendant = (_e = this.value) === null || _e === void 0 ? void 0 : _e.value;
|
|
770
771
|
}
|
|
771
|
-
return (h("mg-input", { key: '
|
|
772
|
+
return (h("mg-input", { key: '5c24478bb10ab8f1d292d38a9be162e370b0fdb2', label: this.label, identifier: this.identifier, class: this.classCollection.classes.join(' '), ariaDescribedbyIDs: popoverContent && popoverContent !== 'list' ? popoverContent : undefined, labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, tooltip: this.tooltip, tooltipPosition: this.readonly && this.value === undefined ? 'label' : this.tooltipPosition, helpText: this.helpText, errorMessage: this.errorMessage }, this.readonly ? (readonlyValue && h("b", { class: "mg-c-input__readonly-value" }, readonlyValue)) : (h("mg-popover", { identifier: this.popoverId, placement: "bottom-start", display: this.popoverDisplay, "arrow-hide": true, style: {
|
|
772
773
|
'--mg-c-input-list-width': ((_f = this.input) === null || _f === void 0 ? void 0 : _f.offsetWidth) > 0 ? `${this.input.offsetWidth}px` : undefined,
|
|
773
774
|
}, "data-fallback-placement": "bottom-end", "onDisplay-change": this.handlePopoverDisplay }, h("div", { class: "mg-c-input__input-group-container" }, h("mg-icon", { icon: "magnifying-glass" }), h("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": listId, "aria-invalid": (this.invalid === true).toString(), "aria-activedescendant": formatID(activeDescendant), onInput: this.handleFilterInput, onBlur: this.handleFilterBlur, onFocus: this.handleFilterFocus, onKeyDown: this.handleFilterKeydown, ref: (el) => {
|
|
774
775
|
if (el !== null)
|