@sankhyalabs/ezui 7.1.0-dev.10 → 7.1.0-dev.12
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/ez-grid.cjs.entry.js +4 -0
- package/dist/cjs/ez-modal-container.cjs.entry.js +15 -7
- package/dist/cjs/ezui.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +4 -0
- package/dist/collection/components/ez-modal-container/ez-modal-container.css +1 -0
- package/dist/collection/components/ez-modal-container/ez-modal-container.js +32 -6
- package/dist/custom-elements/index.js +20 -8
- package/dist/esm/ez-grid.entry.js +4 -0
- package/dist/esm/ez-modal-container.entry.js +15 -7
- package/dist/esm/ezui.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/p-7b999377.entry.js +1 -0
- package/dist/ezui/{p-8c57ffa4.entry.js → p-99fef4da.entry.js} +1 -1
- package/dist/types/components/ez-modal-container/ez-modal-container.d.ts +6 -0
- package/dist/types/components.d.ts +8 -0
- package/package.json +1 -1
- package/dist/ezui/p-e77610ef.entry.js +0 -1
|
@@ -38,6 +38,10 @@ export declare class EzModalContainer {
|
|
|
38
38
|
* Define a visibilidade do botão de fechar.
|
|
39
39
|
*/
|
|
40
40
|
showCloseButton?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Se true o modal container receberá o foco ao ser renderizado.
|
|
43
|
+
*/
|
|
44
|
+
autoFocus?: boolean;
|
|
41
45
|
/**
|
|
42
46
|
* Representa a interação com o usuário.
|
|
43
47
|
* OK - Quando o botão é acionado
|
|
@@ -49,7 +53,9 @@ export declare class EzModalContainer {
|
|
|
49
53
|
handleEzModalAction(event: CustomEvent<string>): Promise<void>;
|
|
50
54
|
private cancelIsVisible;
|
|
51
55
|
private okIsVisible;
|
|
56
|
+
private emitOkAction;
|
|
52
57
|
componentWillLoad(): Promise<void>;
|
|
58
|
+
connectedCallback(): void;
|
|
53
59
|
componentDidLoad(): void;
|
|
54
60
|
disconnectedCallback(): void;
|
|
55
61
|
private closeModal;
|
|
@@ -1801,6 +1801,10 @@ export namespace Components {
|
|
|
1801
1801
|
"scrim": "medium" | "light" | "none";
|
|
1802
1802
|
}
|
|
1803
1803
|
interface EzModalContainer {
|
|
1804
|
+
/**
|
|
1805
|
+
* Se true o modal container receberá o foco ao ser renderizado.
|
|
1806
|
+
*/
|
|
1807
|
+
"autoFocus"?: boolean;
|
|
1804
1808
|
/**
|
|
1805
1809
|
* Define o texto do botão de cancelamento.
|
|
1806
1810
|
*/
|
|
@@ -6017,6 +6021,10 @@ declare namespace LocalJSX {
|
|
|
6017
6021
|
"scrim"?: "medium" | "light" | "none";
|
|
6018
6022
|
}
|
|
6019
6023
|
interface EzModalContainer {
|
|
6024
|
+
/**
|
|
6025
|
+
* Se true o modal container receberá o foco ao ser renderizado.
|
|
6026
|
+
*/
|
|
6027
|
+
"autoFocus"?: boolean;
|
|
6020
6028
|
/**
|
|
6021
6029
|
* Define o texto do botão de cancelamento.
|
|
6022
6030
|
*/
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e,c as t,h as o,H as a,g as i}from"./p-23a36bb6.js";import{KeyboardManager as n}from"@sankhyalabs/core";import{i as l}from"./p-641ee538.js";var s;!function(e){e.CLOSE="CLOSE",e.OK="OK",e.CANCEL="CANCEL",e.LOAD="LOAD"}(s||(s={}));const r=s;var c;!function(e){e.ENABLED="ENABLED",e.DISABLED="DISABLED",e.HIDDEN="HIDDEN"}(c||(c={}));const d=c,m=class{constructor(o){e(this,o),this.ezModalAction=t(this,"ezModalAction",7),this.modalTitle=void 0,this.modalSubTitle=void 0,this.showTitleBar=!0,this.cancelButtonLabel=void 0,this.okButtonLabel=void 0,this.cancelButtonStatus=void 0,this.okButtonStatus=void 0,this.showCloseButton=!0}async handleEzModalAction(e){var t;(null==e?void 0:e.target)&&(null==e?void 0:e.target)===(null===(t=this._element)||void 0===t?void 0:t.parentElement)&&this.closeModal()}cancelIsVisible(){return this.cancelButtonStatus!==d.HIDDEN&&null!=this.cancelButtonLabel}okIsVisible(){return this.okButtonStatus!==d.HIDDEN&&null!=this.okButtonLabel}async componentWillLoad(){this.i18n=await l()}componentDidLoad(){window.requestAnimationFrame((()=>{this.ezModalAction.emit(r.LOAD),this._modalRef.focus()})),this._keyboardManager=new n({propagate:!1,element:this._element}).bind("Enter",this.ezModalAction.emit.bind(r.OK)).bind("Escape",(()=>this.closeModal())).bind("Esc",(()=>this.closeModal()))}disconnectedCallback(){var e;null===(e=this._keyboardManager)||void 0===e||e.unbindAllShortcutKeys()}closeModal(){this.ezModalAction.emit("CLOSE")}render(){return o(a,null,o("header",{ref:e=>this._modalRef=e,tabIndex:-1,class:"ez-modal-container__header-container"},this.showTitleBar&&o("div",{class:"ez-modal-container__header ez-margin-bottom--medium"},o("div",{class:"ez-col ez-align--middle ez-modal-container__title"},o("h2",{class:"ez-text ez-title--large ez-title--primary ez-text--bold ez-margin-vertical--extra-small"},this.modalTitle),this.modalSubTitle&&o("div",{class:"ez-text ez-text--medium ez-text--primary ez-margin-vertical--extra-small"},this.modalSubTitle)),this.showCloseButton&&o("button",{ref:e=>this._closeButton=e,class:"ez-modal-container__close-button",onClick:()=>this.ezModalAction.emit(r.CLOSE),"aria-label":this.i18n("app.close")},o("ez-icon",{class:"ez-modal-container__close-icon",size:"medium",iconName:"close"})))),o("main",{tabIndex:-1,class:"ez-modal-container__content"},o("slot",null)),o("footer",{tabIndex:-1,class:"ez-modal-container__footer"},this.cancelIsVisible()&&o("ez-button",{label:this.cancelButtonLabel||this.i18n("app.cancel"),isDisabled:this.cancelButtonStatus===d.DISABLED,onClick:()=>this.ezModalAction.emit(r.CANCEL)}),this.okIsVisible()&&o("ez-button",{ref:e=>this._okButton=e,class:"ez-button--primary",label:this.okButtonLabel||this.i18n("app.ok"),isDisabled:this.okButtonStatus===d.DISABLED,onClick:()=>this.ezModalAction.emit(r.OK)})))}get _element(){return i(this)}};m.style=".sc-ez-modal-container-h{--ez-modal-container-overflow-y:auto;--ez-modal-container-overflow-x:hidden;display:flex;flex-direction:column;width:100%;height:100%}.ez-modal-container__header-container.sc-ez-modal-container{outline:none}.ez-modal-container__header.sc-ez-modal-container{display:flex;flex-wrap:nowrap;flex-direction:row;justify-content:space-between;align-items:start}.ez-modal-container__content.sc-ez-modal-container{overflow-y:var(--ez-modal-container-overflow-y);overflow-x:var(--ez-modal-container-overflow-x);outline:none}.ez-modal-container__content.sc-ez-modal-container::-webkit-scrollbar{width:var(--space--small);min-width:var(--space--small);max-width:var(--space--small)}.ez-modal-container__footer.sc-ez-modal-container{display:flex;flex-direction:row;justify-content:flex-end;gap:var(--space--8, 8px);width:100%;padding-top:var(--space--small, 6px)}.ez-modal-container__title.sc-ez-modal-container{display:grid}.ez-modal-container__close-button.sc-ez-modal-container{cursor:pointer;background-color:transparent;border:none;outline:none;padding:var(--space--6, 6px) 0px}.ez-modal-container__close-icon.sc-ez-modal-container{--icon--color:var(--title--primary, #2B3A54)}";export{m as ez_modal_container}
|