@sankhyalabs/ezui 5.0.6 → 5.1.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/ez-dialog.cjs.entry.js +1 -1
- package/dist/cjs/ez-popover.cjs.entry.js +28 -17
- package/dist/cjs/ezui.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/ez-dialog/ez-dialog.css +1 -0
- package/dist/collection/components/ez-popover/ez-popover.js +54 -99
- package/dist/custom-elements/index.js +30 -19
- package/dist/esm/ez-dialog.entry.js +1 -1
- package/dist/esm/ez-popover.entry.js +28 -17
- 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-6f309d83.entry.js → p-5c3188b6.entry.js} +1 -1
- package/dist/ezui/p-85d87c43.entry.js +1 -0
- package/dist/types/components/ez-popover/ez-popover.d.ts +13 -18
- package/dist/types/components.d.ts +5 -32
- package/package.json +1 -1
- package/dist/ezui/p-e8a29680.entry.js +0 -1
|
@@ -9,22 +9,6 @@ export declare class EzPopover {
|
|
|
9
9
|
* Define que será fechado automaticamente quando o usuário clicar fora do conteúdo.
|
|
10
10
|
*/
|
|
11
11
|
autoClose: boolean;
|
|
12
|
-
/**
|
|
13
|
-
* Define a distância do topo. Devem ser usados valores válidos de CSS.
|
|
14
|
-
*/
|
|
15
|
-
top: string;
|
|
16
|
-
/**
|
|
17
|
-
* Define a distância do lado esquerdo. Devem ser usados valores válidos de CSS.
|
|
18
|
-
*/
|
|
19
|
-
left: string;
|
|
20
|
-
/**
|
|
21
|
-
* Define a distância de baixo. Devem ser usados valores válidos de CSS.
|
|
22
|
-
*/
|
|
23
|
-
bottom: string;
|
|
24
|
-
/**
|
|
25
|
-
* Define a distância do lado direito. Devem ser usados valores válidos de CSS.
|
|
26
|
-
*/
|
|
27
|
-
right: string;
|
|
28
12
|
/**
|
|
29
13
|
* Ajusta o comportamento da largura do popover.
|
|
30
14
|
*/
|
|
@@ -51,11 +35,17 @@ export declare class EzPopover {
|
|
|
51
35
|
/**
|
|
52
36
|
* Atualiza a posição do popover.
|
|
53
37
|
*/
|
|
54
|
-
updatePosition(top?: string, left?: string
|
|
38
|
+
updatePosition(top?: string, left?: string): Promise<void>;
|
|
55
39
|
/**
|
|
56
40
|
* Exibe o ez-popover.
|
|
57
41
|
*/
|
|
58
|
-
show(top?: string, left?: string
|
|
42
|
+
show(top?: string, left?: string): Promise<void>;
|
|
43
|
+
/**
|
|
44
|
+
* Ancora a exibição do popOver a um elemento HTML.
|
|
45
|
+
*/
|
|
46
|
+
showUnder(element: HTMLElement, options?: IEzPopoverAnchorOptions): Promise<void>;
|
|
47
|
+
private calculatePosition;
|
|
48
|
+
private float;
|
|
59
49
|
/**
|
|
60
50
|
* Oculta o ez-popover.
|
|
61
51
|
*/
|
|
@@ -63,3 +53,8 @@ export declare class EzPopover {
|
|
|
63
53
|
componentDidRender(): void;
|
|
64
54
|
render(): any;
|
|
65
55
|
}
|
|
56
|
+
export interface IEzPopoverAnchorOptions {
|
|
57
|
+
horizontalGap?: number;
|
|
58
|
+
verticalGap?: number;
|
|
59
|
+
fromRight?: boolean;
|
|
60
|
+
}
|
|
@@ -23,6 +23,7 @@ import { IGuideItem } from "./components/ez-guide-navigator/interfaces";
|
|
|
23
23
|
import { ListGroup, ListItem, TListMode } from "./components/ez-list/ez-list";
|
|
24
24
|
import { THeightMode } from "./components/ez-modal/ez-modal";
|
|
25
25
|
import { IMultiSelectionOption } from "./components/ez-multi-selection-list/interfaces/IMultiSelectionOption";
|
|
26
|
+
import { IEzPopoverAnchorOptions } from "./components/ez-popover/ez-popover";
|
|
26
27
|
import { Radio } from "./components/ez-radio-button/ez-radio-button";
|
|
27
28
|
import { EzScrollDirection } from "./components/ez-scroller/EzScrollDirection";
|
|
28
29
|
import { IOption as IOption1, ISearchArgument as ISearchArgument1 } from "./components/ez-combo-box/ez-combo-box";
|
|
@@ -928,10 +929,6 @@ export namespace Components {
|
|
|
928
929
|
* Define que será fechado automaticamente quando o usuário clicar fora do conteúdo.
|
|
929
930
|
*/
|
|
930
931
|
"autoClose": boolean;
|
|
931
|
-
/**
|
|
932
|
-
* Define a distância de baixo. Devem ser usados valores válidos de CSS.
|
|
933
|
-
*/
|
|
934
|
-
"bottom": string;
|
|
935
932
|
/**
|
|
936
933
|
* Ajusta o comportamento da largura do popover.
|
|
937
934
|
*/
|
|
@@ -944,10 +941,6 @@ export namespace Components {
|
|
|
944
941
|
* Define as tags que serão consideradas conteúdo.
|
|
945
942
|
*/
|
|
946
943
|
"innerElement": Array<string> | string;
|
|
947
|
-
/**
|
|
948
|
-
* Define a distância do lado esquerdo. Devem ser usados valores válidos de CSS.
|
|
949
|
-
*/
|
|
950
|
-
"left": string;
|
|
951
944
|
/**
|
|
952
945
|
* Define se o ez-popover está aberto.
|
|
953
946
|
*/
|
|
@@ -956,22 +949,18 @@ export namespace Components {
|
|
|
956
949
|
* Define o tipo de overlay do popover.
|
|
957
950
|
*/
|
|
958
951
|
"overlayType": "medium" | "light" | "none";
|
|
959
|
-
/**
|
|
960
|
-
* Define a distância do lado direito. Devem ser usados valores válidos de CSS.
|
|
961
|
-
*/
|
|
962
|
-
"right": string;
|
|
963
952
|
/**
|
|
964
953
|
* Exibe o ez-popover.
|
|
965
954
|
*/
|
|
966
|
-
"show": (top?: string, left?: string
|
|
955
|
+
"show": (top?: string, left?: string) => Promise<void>;
|
|
967
956
|
/**
|
|
968
|
-
*
|
|
957
|
+
* Ancora a exibição do popOver a um elemento HTML.
|
|
969
958
|
*/
|
|
970
|
-
"
|
|
959
|
+
"showUnder": (element: HTMLElement, options?: IEzPopoverAnchorOptions) => Promise<void>;
|
|
971
960
|
/**
|
|
972
961
|
* Atualiza a posição do popover.
|
|
973
962
|
*/
|
|
974
|
-
"updatePosition": (top?: string, left?: string
|
|
963
|
+
"updatePosition": (top?: string, left?: string) => Promise<void>;
|
|
975
964
|
}
|
|
976
965
|
interface EzPopup {
|
|
977
966
|
/**
|
|
@@ -2790,10 +2779,6 @@ declare namespace LocalJSX {
|
|
|
2790
2779
|
* Define que será fechado automaticamente quando o usuário clicar fora do conteúdo.
|
|
2791
2780
|
*/
|
|
2792
2781
|
"autoClose"?: boolean;
|
|
2793
|
-
/**
|
|
2794
|
-
* Define a distância de baixo. Devem ser usados valores válidos de CSS.
|
|
2795
|
-
*/
|
|
2796
|
-
"bottom"?: string;
|
|
2797
2782
|
/**
|
|
2798
2783
|
* Ajusta o comportamento da largura do popover.
|
|
2799
2784
|
*/
|
|
@@ -2802,10 +2787,6 @@ declare namespace LocalJSX {
|
|
|
2802
2787
|
* Define as tags que serão consideradas conteúdo.
|
|
2803
2788
|
*/
|
|
2804
2789
|
"innerElement"?: Array<string> | string;
|
|
2805
|
-
/**
|
|
2806
|
-
* Define a distância do lado esquerdo. Devem ser usados valores válidos de CSS.
|
|
2807
|
-
*/
|
|
2808
|
-
"left"?: string;
|
|
2809
2790
|
/**
|
|
2810
2791
|
* Emitido quando acontece a alteração de estado do componente.
|
|
2811
2792
|
*/
|
|
@@ -2818,14 +2799,6 @@ declare namespace LocalJSX {
|
|
|
2818
2799
|
* Define o tipo de overlay do popover.
|
|
2819
2800
|
*/
|
|
2820
2801
|
"overlayType"?: "medium" | "light" | "none";
|
|
2821
|
-
/**
|
|
2822
|
-
* Define a distância do lado direito. Devem ser usados valores válidos de CSS.
|
|
2823
|
-
*/
|
|
2824
|
-
"right"?: string;
|
|
2825
|
-
/**
|
|
2826
|
-
* Define a distância do topo. Devem ser usados valores válidos de CSS.
|
|
2827
|
-
*/
|
|
2828
|
-
"top"?: string;
|
|
2829
2802
|
}
|
|
2830
2803
|
interface EzPopup {
|
|
2831
2804
|
/**
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as i,h as o,H as s,g as e}from"./p-bfc7b8ca.js";import{FloatingManager as r}from"@sankhyalabs/core";const h=class{constructor(o){t(this,o),this.ezVisibilityChange=i(this,"ezVisibilityChange",7),this._firstRender=!0,this.innerClickTest=(t,i,o)=>{const s=[t];this.innerElement&&("string"==typeof this.innerElement?s.push(document.querySelector(`#${this.innerElement}`)):this.innerElement.forEach((t=>{s.push(document.querySelector(`#${t}`))})));const e=(null==o?void 0:o.composedPath())||[];for(var r=0;r<s.length;r++){let t=s[r];if(null!=t){if(e.includes(t))return!0;if(t.contains(i))return!0;if(o&&"nodeType"in(null==o?void 0:o.target)&&t.contains(o.target))return!0;if(t.shadowRoot&&t.shadowRoot.contains(i))return!0;if(t=this._host,t.lastElementChild.shadowRoot?t.lastElementChild.shadowRoot.contains(i):t.contains(i))return!0}}return!1},this.backClickListener=()=>{this.ezVisibilityChange.emit(!1)},this.autoClose=!0,this.top="0px",this.left="0px",this.bottom="0px",this.right="0px",this.boxWidth="fit-content",this.opened=void 0,this.innerElement=void 0,this.overlayType="light"}observeOpened(t,i){t!=i&&(i?this.hide():this.show(),this.ezVisibilityChange.emit(t))}async updatePosition(t=this.top,i=this.left,o=this.bottom,s=this.right){r.updateFloatPosition(this._box,this._container,{autoClose:this.autoClose,top:t,left:i,bottom:o,right:s,innerClickTest:this.innerClickTest,backClickListener:this.backClickListener})}async show(t=this.top,i=this.left,o=this.bottom,s=this.right){const e="none"!==this.overlayType,h=`ez-scrim ez-scrim--${this.overlayType}`;let n={autoClose:this.autoClose,top:t,left:i,bottom:o,right:s,innerClickTest:this.innerClickTest,backClickListener:this.backClickListener};e&&(n=Object.assign(Object.assign({},n),{autoClose:!0,useOverlay:e,overlayClassName:h})),this._floatingID=r.float(this._box,this._container,n),this.opened=!0}async hide(){void 0!==this._floatingID&&(r.close(this._floatingID),this._floatingID=void 0,this.opened=!1)}componentDidRender(){this._firstRender&&(this._box.remove(),this._firstRender=!1)}render(){return o(s,null,o("section",{ref:t=>this._container=t},o("div",{class:"popover__box "+("fit-content"===this.boxWidth?"popover__box--fit-content":"popover__box--full-width"),ref:t=>this._box=t},o("slot",null))))}get _host(){return e(this)}static get watchers(){return{opened:["observeOpened"]}}};h.style=":host{--ez-popover__box--border-radius:var(--border--radius-medium, 12px);--ez-popover__box--box-shadow:var(--shadow, 0px 0px 16px 0px #000);--ez-popover__box--background-color:var(--background--xlight, #fff);--ez-popover__box--z-index:var(--most-visible, 3);position:relative;display:flex;user-select:none}.popover__box{z-index:var(--ez-popover__box--z-index);display:flex;flex-direction:column;height:fit-content;background-color:var(--ez-popover__box--background-color);border-radius:var(--ez-popover__box--border-radius);box-shadow:var(--ez-popover__box--box-shadow)}.popover__box--fit-content{width:fit-content}.popover__box--full-width{width:100%}";export{h as ez_popover}
|